cleanup code indent

Cleanup the code indent using:

find . -name *.c -exec Lindent {} \;

It's really a big change, but can fix almost all of
the indent problem in C code, although we can't
ensure all of the changes are right, but the error
changes are really few.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
diff --git a/doc/examples/quickhit.c b/doc/examples/quickhit.c
index bd71099..3eabcdb 100644
--- a/doc/examples/quickhit.c
+++ b/doc/examples/quickhit.c
@@ -136,16 +136,16 @@
 static void help(void);
 static void cleanup(void);
 
-char *TCID = "link03";		/* Test program identifier.	*/
+char *TCID = "link03";		/* Test program identifier.     */
 int TST_TOTAL = 2;		/* Total number of test cases. */
 
-int exp_enos[] = {0, 0};
+int exp_enos[] = { 0, 0 };
 
 #define BASENAME	"lkfile"
 
 char Basename[255];
 char Fname[255];
-int Nlinks=0;
+int Nlinks = 0;
 
 /* To add command line options you need to declare a structure to pass to
  * parse_opts().  options is the structure used in this example.  The format is
@@ -159,15 +159,14 @@
 
 /* for test specific parse_opts options */
 option_t options[] = {
-		{ "N:",  &Nflag, &Nlinkarg },   /* -N #links */
-		{ NULL, NULL, NULL }
+	{"N:", &Nflag, &Nlinkarg},	/* -N #links */
+	{NULL, NULL, NULL}
 };
 
 /***********************************************************************
  * Main
  ***********************************************************************/
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc;
 	char *msg;
@@ -183,7 +182,7 @@
 	 * that understands many common options to control looping.  If you are
 	 * not adding any new options, pass NULL in place of options and &help.
 	 */
-	if ((msg=parse_opts(ac, av, options, &help)) != NULL) {
+	if ((msg = parse_opts(ac, av, options, &help)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -193,8 +192,8 @@
 		}
 		if (Nlinks > 1000) {
 			tst_resm(TWARN,
-				"--N option arg > 1000 - may get errno:%d "
-				"(EMLINK)", EMLINK);
+				 "--N option arg > 1000 - may get errno:%d "
+				 "(EMLINK)", EMLINK);
 		}
 	}
 
@@ -215,88 +214,90 @@
 	/* TEST_LOOPING() is a macro that will make sure the test continues
 	 * looping according to the standard command line args.
 	 */
-	for (lc=0; TEST_LOOPING(lc); lc++) {
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
-	/* reset Tst_count in case we are looping. */
-	Tst_count=0;
+		/* reset Tst_count in case we are looping. */
+		Tst_count = 0;
 
-	if (Nlinks)
-		nlinks = Nlinks;
-	else
-		/* min of 10 links and max of a 100 links */
-		nlinks = (lc%90)+10;
+		if (Nlinks)
+			nlinks = Nlinks;
+		else
+			/* min of 10 links and max of a 100 links */
+			nlinks = (lc % 90) + 10;
 
-	for (cnt=1; cnt < nlinks; cnt++) {
+		for (cnt = 1; cnt < nlinks; cnt++) {
 
-		sprintf(lname, "%s%d", Basename, cnt);
-		/*
-		 *  Call link(2)
-		 */
-		/* Use the TEST() macro to wrap your syscalls. It saves the
-		 * return code to TEST_RETURN and the errno to TEST_ERRNO
-		 */
-		TEST(link(Fname, lname));
-
-		/* check return code */
-		if (TEST_RETURN == -1) {
-			/* To gather stats on errnos returned, log the errno */
-			TEST_ERROR_LOG(TEST_ERRNO);
-			/* If you determine that testing shouldn't continue,
-			 * report your results using tst_brkm(). The remaining
-			 * testcases will be marked broken.  TFAIL is the
-			 * result type for a test failure, cleanup is the
-			 * cleanup routine to call, and the rest is your
-			 * message in printf form.
+			sprintf(lname, "%s%d", Basename, cnt);
+			/*
+			 *  Call link(2)
 			 */
-			tst_brkm(TFAIL|TTERRNO, cleanup, "link(%s, %s) failed",
-			    Fname, lname);
+			/* Use the TEST() macro to wrap your syscalls. It saves the
+			 * return code to TEST_RETURN and the errno to TEST_ERRNO
+			 */
+			TEST(link(Fname, lname));
+
+			/* check return code */
+			if (TEST_RETURN == -1) {
+				/* To gather stats on errnos returned, log the errno */
+				TEST_ERROR_LOG(TEST_ERRNO);
+				/* If you determine that testing shouldn't continue,
+				 * report your results using tst_brkm(). The remaining
+				 * testcases will be marked broken.  TFAIL is the
+				 * result type for a test failure, cleanup is the
+				 * cleanup routine to call, and the rest is your
+				 * message in printf form.
+				 */
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "link(%s, %s) failed", Fname, lname);
+			}
 		}
-	}
 
 	/***************************************************************
 	 * only perform functional verification if flag set (-f not given)
 	 ***************************************************************/
-	if (STD_FUNCTIONAL_TEST) {
-		stat(Fname, &fbuf);
+		if (STD_FUNCTIONAL_TEST) {
+			stat(Fname, &fbuf);
 
-		for (cnt=1; cnt < nlinks; cnt++) {
-			sprintf(lname, "%s%d", Basename, cnt);
+			for (cnt = 1; cnt < nlinks; cnt++) {
+				sprintf(lname, "%s%d", Basename, cnt);
 
-			if (stat(lname, &lbuf) == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "stat(%s) failed", lname);
+				if (stat(lname, &lbuf) == -1) {
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "stat(%s) failed", lname);
+				} else if (fbuf.st_nlink <= 1
+					   || lbuf.st_nlink <= 1
+					   || (fbuf.st_nlink !=
+					       lbuf.st_nlink)) {
+
+					/* When you have results to report, and testing
+					 * can continue, use tst_resm() to record those
+					 * results. Use TFAIL if the test case failed
+					 * and your message in printf style.
+					 */
+					tst_resm(TFAIL,
+						 "link(%s, %s[1-%d]) ret %d for %d files, stat "
+						 "values do not match %d %d",
+						 Fname, Basename, nlinks,
+						 TEST_RETURN, nlinks,
+						 fbuf.st_nlink, lbuf.st_nlink);
+					break;
+				}
 			}
-			else if ( fbuf.st_nlink <= 1 || lbuf.st_nlink <= 1 ||
-			    (fbuf.st_nlink != lbuf.st_nlink) ) {
-
-				/* When you have results to report, and testing
-				 * can continue, use tst_resm() to record those
-				 * results. Use TFAIL if the test case failed
-				 * and your message in printf style.
-				 */
-				tst_resm(TFAIL,
-				"link(%s, %s[1-%d]) ret %d for %d files, stat "
-				"values do not match %d %d",
-				Fname, Basename, nlinks, TEST_RETURN, nlinks,
-				fbuf.st_nlink, lbuf.st_nlink);
-				break;
+			if (cnt >= nlinks) {
+				/* Here the test case passed so we use TPASS */
+				tst_resm(TPASS,
+					 "link(%s, %s[1-%d]) ret %d for %d files, stat "
+					 "linkcounts match %d",
+					 Fname, Basename, nlinks, TEST_RETURN,
+					 nlinks, fbuf.st_nlink);
 			}
-		}
-		if (cnt >= nlinks) {
-			/* Here the test case passed so we use TPASS */
-			tst_resm(TPASS,
-			    "link(%s, %s[1-%d]) ret %d for %d files, stat "
-			    "linkcounts match %d",
-			    Fname, Basename, nlinks, TEST_RETURN, nlinks,
-			    fbuf.st_nlink);
-		}
-	} else
-		Tst_count++;
+		} else
+			Tst_count++;
 
 		/* Here we clean up after the test case so we can do another
 		 * iteration.
 		 */
-		for (cnt=1; cnt < nlinks; cnt++) {
+		for (cnt = 1; cnt < nlinks; cnt++) {
 			sprintf(lname, "%s%d", Basename, cnt);
 
 			if (unlink(lname) == -1) {
@@ -304,7 +305,7 @@
 			}
 		}
 
-	}	/* End for TEST_LOOPING */
+	}			/* End for TEST_LOOPING */
 
 	/***************************************************************
 	 * cleanup and exit
@@ -312,7 +313,7 @@
 	cleanup();
 	tst_exit();
 
-}	/* End main */
+}				/* End main */
 
 /***************************************************************
  * help
@@ -321,8 +322,7 @@
  * standard out.  Your help function will be called after the standard options
  * have been printed
  */
-static void
-help(void)
+static void help(void)
 {
 	printf("  -N #links : create #links hard links every iteration\n");
 }
@@ -330,8 +330,7 @@
 /***************************************************************
  * setup() - performs all ONE TIME setup for this test.
  ***************************************************************/
-void
-setup()
+void setup()
 {
 	int fd;
 
@@ -355,12 +354,11 @@
 	tst_tmpdir();
 
 	sprintf(Fname, "%s_%d", BASENAME, getpid());
-	if ((fd = open(Fname, O_RDWR|O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT,0700) failed",
-		    Fname);
+	if ((fd = open(Fname, O_RDWR | O_CREAT, 0700)) == -1) {
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", Fname);
 	} else if (close(fd) == -1) {
-		tst_res(TWARN|TERRNO, "close(%s) failed", Fname);
+		tst_res(TWARN | TERRNO, "close(%s) failed", Fname);
 	}
 	sprintf(Basename, "%s_%d.", BASENAME, getpid());
 }
@@ -369,8 +367,7 @@
  * cleanup() - performs all ONE TIME cleanup for this test at
  *		completion or premature exit.
  ***************************************************************/
-static void
-cleanup(void)
+static void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/include/cleanup.c b/include/cleanup.c
index bb2e2a6..040dff8 100644
--- a/include/cleanup.c
+++ b/include/cleanup.c
@@ -30,16 +30,18 @@
 
 /* Did the user define a cleanup function? */
 #ifndef CLEANUP
-# define USING_DUMMY_CLEANUP 1
-# define CLEANUP dummy_cleanup
+#define USING_DUMMY_CLEANUP 1
+#define CLEANUP dummy_cleanup
 #endif
 
 /* A freebie for defining the function prototype. */
-static void CLEANUP(void) __attribute__((unused));
+static void CLEANUP(void) __attribute__ ((unused));
 
 #ifdef USING_DUMMY_CLEANUP
 /* The stub function. Wewt.. */
-static void dummy_cleanup(void) { }
+static void dummy_cleanup(void)
+{
+}
 #endif
 
 #endif
diff --git a/lib/cloner.c b/lib/cloner.c
index 2be2216..990a562 100644
--- a/lib/cloner.c
+++ b/lib/cloner.c
@@ -23,24 +23,24 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <unistd.h> /* fork, getpid, sleep */
+#include <unistd.h>		/* fork, getpid, sleep */
 #include <string.h>
-#include <stdlib.h> /* exit */
-#include <sched.h> /* clone */
+#include <stdlib.h>		/* exit */
+#include <sched.h>		/* clone */
 #include "test.h"
 
-#undef clone /* we want to use clone() */
+#undef clone			/* we want to use clone() */
 
 /* copied from several other files under ltp */
 #if defined (__s390__) || (__s390x__)
 #define clone __clone
-extern int __clone(int(void*),void*,int,void*);
+extern int __clone(int (void *), void *, int, void *);
 #elif defined(__ia64__)
 #define clone2 __clone2
 /* Prototype provided by David Mosberger				*/
-extern int  __clone2(int (*fn) (void *arg), void *child_stack_base,
-		size_t child_stack_size, int flags, void *arg,
-		pid_t *parent_tid, void *tls, pid_t *child_tid);
+extern int __clone2(int (*fn) (void *arg), void *child_stack_base,
+		    size_t child_stack_size, int flags, void *arg,
+		    pid_t * parent_tid, void *tls, pid_t * child_tid);
 #endif
 
 /***********************************************************************
@@ -50,8 +50,8 @@
  *   3. all others take top of stack (stack grows down)
  ***********************************************************************/
 int
-ltp_clone(unsigned long clone_flags, int (*fn)(void *arg), void *arg,
-		size_t stack_size, void *stack)
+ltp_clone(unsigned long clone_flags, int (*fn) (void *arg), void *arg,
+	  size_t stack_size, void *stack)
 {
 	int ret;
 
@@ -64,8 +64,7 @@
 	 * For archs where stack grows downwards, stack points to the topmost
 	 * address of the memory space set up for the child stack.
 	 */
-	ret = clone(fn, (stack ? stack + stack_size : NULL),
-			clone_flags, arg);
+	ret = clone(fn, (stack ? stack + stack_size : NULL), clone_flags, arg);
 #endif
 
 	return ret;
@@ -76,8 +75,8 @@
  * caller-specified size.
  ***********************************************************************/
 int
-ltp_clone_malloc(unsigned long clone_flags, int (*fn)(void *arg), void *arg,
-		size_t stack_size)
+ltp_clone_malloc(unsigned long clone_flags, int (*fn) (void *arg), void *arg,
+		 size_t stack_size)
 {
 	void *stack;
 	int ret;
@@ -102,8 +101,7 @@
  * Experience thus far suggests that one page is often insufficient,
  * while 6*getpagesize() seems adequate.
  ***********************************************************************/
-int
-ltp_clone_quick(unsigned long clone_flags, int (*fn)(void *arg), void *arg)
+int ltp_clone_quick(unsigned long clone_flags, int (*fn) (void *arg), void *arg)
 {
 	size_t stack_size = getpagesize() * 6;
 
diff --git a/lib/dataascii.c b/lib/dataascii.c
index 60d1a38..5c577a9 100644
--- a/lib/dataascii.c
+++ b/lib/dataascii.c
@@ -37,181 +37,188 @@
 #define CHARS_SIZE	sizeof(CHARS)
 
 #ifdef UNIT_TEST
-#include <stdlib.h> /* malloc */
+#include <stdlib.h>		/* malloc */
 #endif
 
 static char Errmsg[80];
 
-int
-dataasciigen(listofchars, buffer, bsize, offset)
-char *listofchars;	/* a null terminated list of characters */
+int dataasciigen(listofchars, buffer, bsize, offset)
+char *listofchars;		/* a null terminated list of characters */
 char *buffer;
 int bsize;
 int offset;
 {
-   int cnt;
-   int total;
-   int ind;	/* index into CHARS array */
-   char *chr;
-   int chars_size;
-   char *charlist;
+	int cnt;
+	int total;
+	int ind;		/* index into CHARS array */
+	char *chr;
+	int chars_size;
+	char *charlist;
 
-	chr=buffer;
-	total=offset+bsize;
+	chr = buffer;
+	total = offset + bsize;
 
 	if (listofchars == NULL) {
-	    charlist=CHARS;
-	    chars_size=CHARS_SIZE;
-	}
-	else {
-	    charlist=listofchars;
-	    chars_size=strlen(listofchars);
+		charlist = CHARS;
+		chars_size = CHARS_SIZE;
+	} else {
+		charlist = listofchars;
+		chars_size = strlen(listofchars);
 	}
 
-	for (cnt=offset; cnt<total;  cnt++) {
-		ind=cnt%chars_size;
-		*chr++=charlist[ind];
+	for (cnt = offset; cnt < total; cnt++) {
+		ind = cnt % chars_size;
+		*chr++ = charlist[ind];
 	}
 
 	return bsize;
 
-}	/* end of dataasciigen */
+}				/* end of dataasciigen */
 
-int
-dataasciichk(listofchars, buffer, bsize, offset, errmsg)
-char *listofchars;	/* a null terminated list of characters */
+int dataasciichk(listofchars, buffer, bsize, offset, errmsg)
+char *listofchars;		/* a null terminated list of characters */
 char *buffer;
 int bsize;
 int offset;
 char **errmsg;
 {
-   int cnt;
-   int total;
-   int ind;	/* index into CHARS array */
-   char *chr;
-   int chars_size;
-   char *charlist;
+	int cnt;
+	int total;
+	int ind;		/* index into CHARS array */
+	char *chr;
+	int chars_size;
+	char *charlist;
 
-	chr=buffer;
-	total=offset+bsize;
+	chr = buffer;
+	total = offset + bsize;
 
 	if (listofchars == NULL) {
-	    charlist=CHARS;
-	    chars_size=CHARS_SIZE;
-	}
-	else {
-	    charlist=listofchars;
-	    chars_size=strlen(listofchars);
+		charlist = CHARS;
+		chars_size = CHARS_SIZE;
+	} else {
+		charlist = listofchars;
+		chars_size = strlen(listofchars);
 	}
 
 	if (errmsg != NULL) {
-	    *errmsg = Errmsg;
+		*errmsg = Errmsg;
 	}
 
-	for (cnt=offset; cnt<total;  chr++, cnt++) {
-	    ind=cnt%chars_size;
-	    if (*chr != charlist[ind]) {
-		sprintf(Errmsg,
-		    "data mismatch at offset %d, exp:%#o, act:%#o", cnt,
-		    charlist[ind], *chr);
-		return cnt;
-	    }
+	for (cnt = offset; cnt < total; chr++, cnt++) {
+		ind = cnt % chars_size;
+		if (*chr != charlist[ind]) {
+			sprintf(Errmsg,
+				"data mismatch at offset %d, exp:%#o, act:%#o",
+				cnt, charlist[ind], *chr);
+			return cnt;
+		}
 	}
 
 	sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
-	return -1;	/* buffer is ok */
+	return -1;		/* buffer is ok */
 
-}	/* end of dataasciichk */
-
+}				/* end of dataasciichk */
 
 #if UNIT_TEST
 
 /***********************************************************************
  * main for doing unit testing
  ***********************************************************************/
-int
-main(ac, ag)
+int main(ac, ag)
 int ac;
 char **ag;
 {
 
-int size=1023;
-char *buffer;
-int ret;
-char *errmsg;
+	int size = 1023;
+	char *buffer;
+	int ret;
+	char *errmsg;
 
-    if ((buffer=(char *)malloc(size)) == NULL) {
-        perror("malloc");
-        exit(2);
-    }
+	if ((buffer = (char *)malloc(size)) == NULL) {
+		perror("malloc");
+		exit(2);
+	}
 
-    dataasciigen(NULL, buffer, size, 0);
-    printf("dataasciigen(NULL, buffer, %d, 0)\n", size);
+	dataasciigen(NULL, buffer, size, 0);
+	printf("dataasciigen(NULL, buffer, %d, 0)\n", size);
 
-    ret=dataasciichk(NULL, buffer, size, 0, &errmsg);
-    printf("dataasciichk(NULL, buffer, %d, 0, &errmsg) returned %d %s\n",
-        size, ret, errmsg);
+	ret = dataasciichk(NULL, buffer, size, 0, &errmsg);
+	printf("dataasciichk(NULL, buffer, %d, 0, &errmsg) returned %d %s\n",
+	       size, ret, errmsg);
 
-    if (ret == -1)
-        printf("\tPASS return value is -1 as expected\n");
-    else
-        printf("\tFAIL return value is %d, expected -1\n", ret);
+	if (ret == -1)
+		printf("\tPASS return value is -1 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected -1\n", ret);
 
-    ret=dataasciichk(NULL, &buffer[1], size-1, 1, &errmsg);
-    printf("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = dataasciichk(NULL, &buffer[1], size - 1, 1, &errmsg);
+	printf
+	    ("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    if (ret == -1)
-        printf("\tPASS return value is -1 as expected\n");
-    else
-        printf("\tFAIL return value is %d, expected -1\n", ret);
+	if (ret == -1)
+		printf("\tPASS return value is -1 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected -1\n", ret);
 
-    buffer[25]= 0x0;
-    printf("changing char 25\n");
+	buffer[25] = 0x0;
+	printf("changing char 25\n");
 
-    ret=dataasciichk(NULL, &buffer[1], size-1, 1, &errmsg);
-    printf("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = dataasciichk(NULL, &buffer[1], size - 1, 1, &errmsg);
+	printf
+	    ("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    if (ret == 25)
-	printf("\tPASS return value is 25 as expected\n");
-    else
-	printf("\tFAIL return value is %d, expected 25\n", ret);
+	if (ret == 25)
+		printf("\tPASS return value is 25 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected 25\n", ret);
 
-    dataasciigen("this is a test of the my string" , buffer, size, 0);
-    printf("dataasciigen(\"this is a test of the my string\", buffer, %d, 0)\n", size);
+	dataasciigen("this is a test of the my string", buffer, size, 0);
+	printf
+	    ("dataasciigen(\"this is a test of the my string\", buffer, %d, 0)\n",
+	     size);
 
-    ret=dataasciichk("this is a test of the my string", buffer, size, 0, &errmsg);
-    printf("dataasciichk(\"this is a test of the my string\", buffer, %d, 0, &errmsg) returned %d %s\n",
-        size, ret, errmsg);
+	ret =
+	    dataasciichk("this is a test of the my string", buffer, size, 0,
+			 &errmsg);
+	printf
+	    ("dataasciichk(\"this is a test of the my string\", buffer, %d, 0, &errmsg) returned %d %s\n",
+	     size, ret, errmsg);
 
-    if (ret == -1)
-        printf("\tPASS return value is -1 as expected\n");
-    else
-        printf("\tFAIL return value is %d, expected -1\n", ret);
+	if (ret == -1)
+		printf("\tPASS return value is -1 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected -1\n", ret);
 
-    ret=dataasciichk("this is a test of the my string", &buffer[1], size-1, 1, &errmsg);
-    printf("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret =
+	    dataasciichk("this is a test of the my string", &buffer[1],
+			 size - 1, 1, &errmsg);
+	printf
+	    ("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    if (ret == -1)
-        printf("\tPASS return value is -1 as expected\n");
-    else
-        printf("\tFAIL return value is %d, expected -1\n", ret);
+	if (ret == -1)
+		printf("\tPASS return value is -1 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected -1\n", ret);
 
-    buffer[25]= 0x0;
-    printf("changing char 25\n");
+	buffer[25] = 0x0;
+	printf("changing char 25\n");
 
-    ret=dataasciichk("this is a test of the my string", &buffer[1], size-1, 1, &errmsg);
-    printf("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret =
+	    dataasciichk("this is a test of the my string", &buffer[1],
+			 size - 1, 1, &errmsg);
+	printf
+	    ("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    if (ret == 25)
-	printf("\tPASS return value is 25 as expected\n");
-    else
-	printf("\tFAIL return value is %d, expected 25\n", ret);
+	if (ret == 25)
+		printf("\tPASS return value is 25 as expected\n");
+	else
+		printf("\tFAIL return value is %d, expected 25\n", ret);
 
-    exit(0);
+	exit(0);
 }
 
 #endif
diff --git a/lib/databin.c b/lib/databin.c
index 3a888f7..f4f4f1c 100644
--- a/lib/databin.c
+++ b/lib/databin.c
@@ -31,8 +31,8 @@
  */
 #include <stdio.h>
 #include <sys/param.h>
-#include <string.h> /* memset */
-#include <stdlib.h> /* rand */
+#include <string.h>		/* memset */
+#include <stdlib.h>		/* rand */
 #include "databin.h"
 
 #if UNIT_TEST
@@ -41,45 +41,43 @@
 
 static char Errmsg[80];
 
-void
-databingen (mode, buffer, bsize, offset)
-int mode;	/* either a, c, r, o, z or C */
-char *buffer;	/* buffer pointer */
-int bsize;	/* size of buffer */
-int offset;	/* offset into the file where buffer starts */
+void databingen(mode, buffer, bsize, offset)
+int mode;			/* either a, c, r, o, z or C */
+char *buffer;			/* buffer pointer */
+int bsize;			/* size of buffer */
+int offset;			/* offset into the file where buffer starts */
 {
-int ind;
+	int ind;
 
-        switch (mode)
-        {
-        default:
-        case 'a':	/* alternating bit pattern */
-                memset(buffer,0x55,bsize);
-                break;
+	switch (mode) {
+	default:
+	case 'a':		/* alternating bit pattern */
+		memset(buffer, 0x55, bsize);
+		break;
 
-        case 'c':	/* checkerboard pattern */
-                memset(buffer,0xf0,bsize);
-                break;
+	case 'c':		/* checkerboard pattern */
+		memset(buffer, 0xf0, bsize);
+		break;
 
-	case 'C':	/* */
-                for (ind=0;ind< bsize;ind++) {
-		    buffer[ind] = ((offset+ind)%8 & 0177);
+	case 'C':		/* */
+		for (ind = 0; ind < bsize; ind++) {
+			buffer[ind] = ((offset + ind) % 8 & 0177);
 		}
 		break;
 
 	case 'o':
-		memset(buffer,0xff,bsize);
+		memset(buffer, 0xff, bsize);
 		break;
 
 	case 'z':
-		memset(buffer,0x0,bsize);
+		memset(buffer, 0x0, bsize);
 		break;
 
-        case 'r':	/* random */
-                for (ind=0;ind< bsize;ind++) {
-		    buffer[ind] = (rand () & 0177) | 0100;
+	case 'r':		/* random */
+		for (ind = 0; ind < bsize; ind++) {
+			buffer[ind] = (rand() & 0177) | 0100;
 		}
-        }
+	}
 }
 
 /***********************************************************************
@@ -88,74 +86,73 @@
  *      >= 0 : error at byte offset into the file, offset+buffer[0-(bsize-1)]
  *      < 0  : no error
  ***********************************************************************/
-int
-databinchk(mode, buffer, bsize, offset, errmsg)
-int mode;	/* either a, c, r, z, o, or C */
-char *buffer;	/* buffer pointer */
-int bsize;	/* size of buffer */
-int offset;	/* offset into the file where buffer starts */
+int databinchk(mode, buffer, bsize, offset, errmsg)
+int mode;			/* either a, c, r, z, o, or C */
+char *buffer;			/* buffer pointer */
+int bsize;			/* size of buffer */
+int offset;			/* offset into the file where buffer starts */
 char **errmsg;
 {
-    int cnt;
-    unsigned char *chr;
-    long expbits;
-    long actbits;
+	int cnt;
+	unsigned char *chr;
+	long expbits;
+	long actbits;
 
-	chr = (unsigned char *) buffer;
+	chr = (unsigned char *)buffer;
 
 	if (errmsg != NULL) {
-	    *errmsg = Errmsg;
+		*errmsg = Errmsg;
 	}
 
-        switch (mode)
-        {
-        default:
-        case 'a':	/* alternating bit pattern */
-		expbits=0x55;
-                break;
+	switch (mode) {
+	default:
+	case 'a':		/* alternating bit pattern */
+		expbits = 0x55;
+		break;
 
-        case 'c':	/* checkerboard pattern */
-		expbits=0xf0;
-                break;
+	case 'c':		/* checkerboard pattern */
+		expbits = 0xf0;
+		break;
 
-	case 'C':	/* counting pattern */
-                for (cnt=0;cnt< bsize;cnt++) {
-		    expbits = ((offset+cnt)%8 & 0177);
+	case 'C':		/* counting pattern */
+		for (cnt = 0; cnt < bsize; cnt++) {
+			expbits = ((offset + cnt) % 8 & 0177);
 
-		    if (buffer[cnt] != expbits) {
-			sprintf(Errmsg,
-			    "data mismatch at offset %d, exp:%#lo, act:%#o",
-			    offset+cnt, expbits, buffer[cnt]);
-			return offset+cnt;
-		    }
+			if (buffer[cnt] != expbits) {
+				sprintf(Errmsg,
+					"data mismatch at offset %d, exp:%#lo, act:%#o",
+					offset + cnt, expbits, buffer[cnt]);
+				return offset + cnt;
+			}
 		}
 		sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
 		return -1;
 
 	case 'o':
-		expbits=0xff;
+		expbits = 0xff;
 		break;
 
 	case 'z':
-		expbits=0;
+		expbits = 0;
 		break;
 
-        case 'r':
+	case 'r':
 		return -1;	/* no check can be done for random */
-        }
+	}
 
-	for (cnt=0; cnt<bsize; chr++, cnt++) {
-	    actbits = (long)*chr;
+	for (cnt = 0; cnt < bsize; chr++, cnt++) {
+		actbits = (long)*chr;
 
-	    if (actbits != expbits) {
-		sprintf(Errmsg, "data mismatch at offset %d, exp:%#lo, act:%#lo",
-		    offset+cnt, expbits, actbits);
-		return offset+cnt;
-	    }
+		if (actbits != expbits) {
+			sprintf(Errmsg,
+				"data mismatch at offset %d, exp:%#lo, act:%#lo",
+				offset + cnt, expbits, actbits);
+			return offset + cnt;
+		}
 	}
 
 	sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
-	return -1; /* all ok */
+	return -1;		/* all ok */
 }
 
 #if UNIT_TEST
@@ -163,132 +160,130 @@
 /***********************************************************************
  * main for doing unit testing
  ***********************************************************************/
-int
-main(ac, ag)
+int main(ac, ag)
 int ac;
 char **ag;
 {
 
-    int size=1023;
-    int offset;
-    int number;
-    unsigned char *buffer;
-    int ret;
-    char *errmsg;
+	int size = 1023;
+	int offset;
+	int number;
+	unsigned char *buffer;
+	int ret;
+	char *errmsg;
 
-    if ((buffer=(unsigned char *)malloc(size)) == NULL) {
-	perror("malloc");
-	exit(2);
-    }
+	if ((buffer = (unsigned char *)malloc(size)) == NULL) {
+		perror("malloc");
+		exit(2);
+	}
 
+	printf("***** for a ****************************\n");
+	databingen('a', buffer, size, 0);
+	printf("databingen('a', buffer, %d, 0)\n", size);
 
-printf("***** for a ****************************\n");
-    databingen('a', buffer, size, 0);
-    printf("databingen('a', buffer, %d, 0)\n", size);
+	ret = databinchk('a', buffer, size, 0, &errmsg);
+	printf("databinchk('a', buffer, %d, 0, &errmsg) returned %d: %s\n",
+	       size, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
-    ret=databinchk('a', buffer, size, 0, &errmsg);
-    printf("databinchk('a', buffer, %d, 0, &errmsg) returned %d: %s\n",
-	size, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	offset = 232400;
+	ret = databinchk('a', &buffer[1], size - 1, offset, &errmsg);
+	printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
+	       size, offset, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
-    offset=232400;
-    ret=databinchk('a', &buffer[1], size-1, offset, &errmsg);
-    printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
-	size, offset, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	buffer[15] = 0x0;
+	printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset,
+	       offset + 15);
+	number = offset + 15;
 
-    buffer[15]= 0x0;
-    printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset, offset+15);
-    number=offset+15;
+	ret = databinchk('a', &buffer[1], size - 1, offset + 1, &errmsg);
+	printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
+	       size - 1, offset + 1, ret, errmsg);
+	if (ret == number)
+		printf("\tPASS return value of %d as expected\n", number);
+	else
+		printf("\tFAIL return value %d, expected %d\n", ret, number);
 
-    ret=databinchk('a', &buffer[1], size-1, offset+1, &errmsg);
-    printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
-	size-1, offset+1, ret, errmsg);
-    if (ret == number)
-	printf("\tPASS return value of %d as expected\n", number);
-    else
-	printf("\tFAIL return value %d, expected %d\n", ret, number);
+	printf("***** for c ****************************\n");
+	databingen('c', buffer, size, 0);
+	printf("databingen('c', buffer, %d, 0)\n", size);
 
+	ret = databinchk('c', buffer, size, 0, &errmsg);
+	printf("databinchk('c', buffer, %d, 0, &errmsg) returned %d: %s\n",
+	       size, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
+	offset = 232400;
+	ret = databinchk('c', &buffer[1], size - 1, offset, &errmsg);
+	printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
+	       size, offset, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
-printf("***** for c ****************************\n");
-    databingen('c', buffer, size, 0);
-    printf("databingen('c', buffer, %d, 0)\n", size);
+	buffer[15] = 0x0;
+	printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset,
+	       offset + 15);
+	number = offset + 15;
 
-    ret=databinchk('c', buffer, size, 0, &errmsg);
-    printf("databinchk('c', buffer, %d, 0, &errmsg) returned %d: %s\n",
-	size, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	ret = databinchk('c', &buffer[1], size - 1, offset + 1, &errmsg);
+	printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
+	       size - 1, offset + 1, ret, errmsg);
+	if (ret == number)
+		printf("\tPASS return value of %d as expected\n", number);
+	else
+		printf("\tFAIL return value %d, expected %d\n", ret, number);
 
-    offset=232400;
-    ret=databinchk('c', &buffer[1], size-1, offset, &errmsg);
-    printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
-	size, offset, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	printf("***** for C ****************************\n");
 
-    buffer[15]= 0x0;
-    printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset, offset+15);
-    number=offset+15;
+	databingen('C', buffer, size, 0);
+	printf("databingen('C', buffer, %d, 0)\n", size);
 
-    ret=databinchk('c', &buffer[1], size-1, offset+1, &errmsg);
-    printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
-	size-1, offset+1, ret, errmsg);
-    if (ret == number)
-	printf("\tPASS return value of %d as expected\n", number);
-    else
-	printf("\tFAIL return value %d, expected %d\n", ret, number);
+	ret = databinchk('C', buffer, size, 0, &errmsg);
+	printf("databinchk('C', buffer, %d, 0, &errmsg) returned %d: %s\n",
+	       size, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
-printf("***** for C ****************************\n");
+	offset = 18;
+	ret = databinchk('C', &buffer[18], size - 18, 18, &errmsg);
+	printf
+	    ("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
+	     size - 18, ret, errmsg);
+	if (ret == -1)
+		printf("\tPASS return value of -1 as expected\n");
+	else
+		printf("\tFAIL return value %d, expected -1\n", ret);
 
-    databingen('C', buffer, size, 0);
-    printf("databingen('C', buffer, %d, 0)\n", size);
+	buffer[20] = 0x0;
+	buffer[21] = 0x0;
+	printf("changing char 20 and 21 to 0x0 (offset %d and %d)\n", 20, 21);
 
-    ret=databinchk('C', buffer, size, 0, &errmsg);
-    printf("databinchk('C', buffer, %d, 0, &errmsg) returned %d: %s\n",
-	size, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	ret = databinchk('C', &buffer[18], size - 18, 18, &errmsg);
+	printf
+	    ("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
+	     size - 18, ret, errmsg);
 
-    offset=18;
-    ret=databinchk('C', &buffer[18], size-18, 18, &errmsg);
-    printf("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
-	size-18, ret, errmsg);
-    if (ret == -1)
-	printf("\tPASS return value of -1 as expected\n");
-    else
-	printf("\tFAIL return value %d, expected -1\n", ret);
+	if (ret == 20 || ret == 21)
+		printf("\tPASS return value of %d or %d as expected\n", 20, 21);
+	else
+		printf("\tFAIL return value %d, expected %d or %d\n", ret,
+		       20, 21);
 
-    buffer[20]= 0x0;
-    buffer[21]= 0x0;
-    printf("changing char 20 and 21 to 0x0 (offset %d and %d)\n", 20,
-	21);
-
-    ret=databinchk('C', &buffer[18], size-18, 18, &errmsg);
-    printf("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
-	size-18, ret, errmsg);
-
-    if (ret == 20 || ret == 21)
-	printf("\tPASS return value of %d or %d as expected\n",
-	    20, 21);
-    else
-	printf("\tFAIL return value %d, expected %d or %d\n", ret,
-	    20, 21 );
-
-    exit(0);
+	exit(0);
 
 }
 
diff --git a/lib/datapid.c b/lib/datapid.c
index 9f34a61..23164d3 100644
--- a/lib/datapid.c
+++ b/lib/datapid.c
@@ -42,7 +42,6 @@
 ________________________________________________________________
 <    pid       >< offset in file of this word  ><    pid       >
 
-
 8 bits to a bytes == character
  NBPW            8
 ************/
@@ -64,7 +63,7 @@
 #define LOWBITS(WRD, bits) ( (-1 >> (64-bits)) & WRD)
 ****/
 
-#define NBPBYTE		8		/* number bits per byte */
+#define NBPBYTE		8	/* number bits per byte */
 
 #ifndef DEBUG
 #define DEBUG	0
@@ -82,8 +81,7 @@
  * thus, offset 16 is the start of  the second full word
  * Thus, offset 8 is in middle of word 1
  ***********************************************************************/
-int
-datapidgen(pid, buffer, bsize, offset)
+int datapidgen(pid, buffer, bsize, offset)
 int pid;
 char *buffer;
 int bsize;
@@ -91,83 +89,90 @@
 {
 #if CRAY
 
-   int cnt;
-   int tmp;
-   char *chr;
-   long *wptr;
-   long word;
-   int woff;	/* file offset for the word */
-   int boff;	/* buffer offset or index */
-   int num_full_words;
+	int cnt;
+	int tmp;
+	char *chr;
+	long *wptr;
+	long word;
+	int woff;		/* file offset for the word */
+	int boff;		/* buffer offset or index */
+	int num_full_words;
 
-    num_full_words = bsize/NBPW;
-    boff = 0;
+	num_full_words = bsize / NBPW;
+	boff = 0;
 
-    if (cnt=(offset % NBPW)) {	/* partial word */
+	if (cnt = (offset % NBPW)) {	/* partial word */
 
-	woff = offset - cnt;
+		woff = offset - cnt;
 #if DEBUG
-printf("partial at beginning, cnt = %d, woff = %d\n", cnt, woff);
+		printf("partial at beginning, cnt = %d, woff = %d\n", cnt,
+		       woff);
 #endif
 
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
 
-	chr = (char *)&word;
+		chr = (char *)&word;
 
-	for (tmp=0; tmp<cnt; tmp++) {   /* skip unused bytes */
-	    chr++;
-        }
+		for (tmp = 0; tmp < cnt; tmp++) {	/* skip unused bytes */
+			chr++;
+		}
 
-	for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) {
-	    buffer[boff] = *chr;
+		for (; boff < (NBPW - cnt) && boff < bsize; boff++, chr++) {
+			buffer[boff] = *chr;
+		}
 	}
-    }
 
-    /*
-     * full words
-     */
+	/*
+	 * full words
+	 */
 
-    num_full_words = (bsize-boff)/NBPW;
+	num_full_words = (bsize - boff) / NBPW;
 
-    woff = offset+boff;
+	woff = offset + boff;
 
-    for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++) {
+	for (cnt = 0; cnt < num_full_words; woff += NBPW, cnt++) {
 
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
 
-	chr = (char *)&word;
-	for (tmp=0; tmp<NBPW; tmp++, chr++) {
-	    buffer[boff++] = *chr;
-	}
+		chr = (char *)&word;
+		for (tmp = 0; tmp < NBPW; tmp++, chr++) {
+			buffer[boff++] = *chr;
+		}
 /****** Only if wptr is a word ellined
 	wptr = (long *)&buffer[boff];
 	*wptr = word;
 	boff += NBPW;
 *****/
 
-    }
-
-    /*
-     * partial word at end of buffer
-     */
-
-    if (cnt=((bsize-boff) % NBPW)) {
-#if DEBUG
-printf("partial at end\n");
-#endif
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
-	chr = (char *)&word;
-
-	for (tmp=0; tmp<cnt && boff<bsize; tmp++, chr++) {
-	    buffer[boff++] = *chr;
 	}
-    }
 
-    return bsize;
+	/*
+	 * partial word at end of buffer
+	 */
+
+	if (cnt = ((bsize - boff) % NBPW)) {
+#if DEBUG
+		printf("partial at end\n");
+#endif
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
+
+		chr = (char *)&word;
+
+		for (tmp = 0; tmp < cnt && boff < bsize; tmp++, chr++) {
+			buffer[boff++] = *chr;
+		}
+	}
+
+	return bsize;
 
 #else
-	return -1;	/* not support on non-64 bits word machines  */
+	return -1;		/* not support on non-64 bits word machines  */
 
 #endif
 
@@ -177,8 +182,7 @@
  *
  *
  ***********************************************************************/
-int
-datapidchk(pid, buffer, bsize, offset, errmsg)
+int datapidchk(pid, buffer, bsize, offset, errmsg)
 int pid;
 char *buffer;
 int bsize;
@@ -187,63 +191,67 @@
 {
 #if CRAY
 
-   int cnt;
-   int tmp;
-   char *chr;
-   long *wptr;
-   long word;
-   int woff;	/* file offset for the word */
-   int boff;	/* buffer offset or index */
-   int num_full_words;
+	int cnt;
+	int tmp;
+	char *chr;
+	long *wptr;
+	long word;
+	int woff;		/* file offset for the word */
+	int boff;		/* buffer offset or index */
+	int num_full_words;
 
-
-    if (errmsg != NULL) {
-        *errmsg = Errmsg;
-    }
-
-
-    num_full_words = bsize/NBPW;
-    boff = 0;
-
-    if (cnt=(offset % NBPW)) {	/* partial word */
-	woff = offset - cnt;
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
-	chr = (char *)&word;
-
-	for (tmp=0; tmp<cnt; tmp++) {   /* skip unused bytes */
-	    chr++;
-        }
-
-	for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) {
-	    if (buffer[boff] != *chr) {
-		sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
-		    offset+boff, *chr, buffer[boff]);
-		return offset+boff;
-	    }
+	if (errmsg != NULL) {
+		*errmsg = Errmsg;
 	}
-    }
 
-    /*
-     * full words
-     */
+	num_full_words = bsize / NBPW;
+	boff = 0;
 
-    num_full_words = (bsize-boff)/NBPW;
+	if (cnt = (offset % NBPW)) {	/* partial word */
+		woff = offset - cnt;
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
 
-    woff = offset+boff;
+		chr = (char *)&word;
 
-    for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++) {
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
+		for (tmp = 0; tmp < cnt; tmp++) {	/* skip unused bytes */
+			chr++;
+		}
 
-	chr = (char *)&word;
-	for (tmp=0; tmp<NBPW; tmp++, boff++, chr++) {
-	    if (buffer[boff] != *chr) {
-	        sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
-	            woff, *chr, buffer[boff]);
-	        return woff;
-	    }
+		for (; boff < (NBPW - cnt) && boff < bsize; boff++, chr++) {
+			if (buffer[boff] != *chr) {
+				sprintf(Errmsg,
+					"Data mismatch at offset %d, exp:%#o, act:%#o",
+					offset + boff, *chr, buffer[boff]);
+				return offset + boff;
+			}
+		}
 	}
 
+	/*
+	 * full words
+	 */
+
+	num_full_words = (bsize - boff) / NBPW;
+
+	woff = offset + boff;
+
+	for (cnt = 0; cnt < num_full_words; woff += NBPW, cnt++) {
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
+
+		chr = (char *)&word;
+		for (tmp = 0; tmp < NBPW; tmp++, boff++, chr++) {
+			if (buffer[boff] != *chr) {
+				sprintf(Errmsg,
+					"Data mismatch at offset %d, exp:%#o, act:%#o",
+					woff, *chr, buffer[boff]);
+				return woff;
+			}
+		}
+
 /****** only if a word elined
 	wptr = (long *)&buffer[boff];
 	if (*wptr != word) {
@@ -253,121 +261,122 @@
 	}
 	boff += NBPW;
 ******/
-    }
-
-    /*
-     * partial word at end of buffer
-     */
-
-    if (cnt=((bsize-boff) % NBPW)) {
-#if DEBUG
-printf("partial at end\n");
-#endif
-	word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
-	chr = (char *)&word;
-
-
-	for (tmp=0; tmp<cnt && boff<bsize; boff++, tmp++, chr++) {
-	    if (buffer[boff] != *chr) {
-		sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
-		    offset+boff, *chr, buffer[boff]);
-		return offset+boff;
-	    }
 	}
-    }
 
-    sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
-    return -1;      /* buffer is ok */
+	/*
+	 * partial word at end of buffer
+	 */
+
+	if (cnt = ((bsize - boff) % NBPW)) {
+#if DEBUG
+		printf("partial at end\n");
+#endif
+		word =
+		    ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) |
+		     LOWER16BITS(pid));
+
+		chr = (char *)&word;
+
+		for (tmp = 0; tmp < cnt && boff < bsize; boff++, tmp++, chr++) {
+			if (buffer[boff] != *chr) {
+				sprintf(Errmsg,
+					"Data mismatch at offset %d, exp:%#o, act:%#o",
+					offset + boff, *chr, buffer[boff]);
+				return offset + boff;
+			}
+		}
+	}
+
+	sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
+	return -1;		/* buffer is ok */
 
 #else
 
-    if (errmsg != NULL) {
-        *errmsg = Errmsg;
-    }
-    sprintf(Errmsg, "Not supported on this OS.");
-    return 0;
+	if (errmsg != NULL) {
+		*errmsg = Errmsg;
+	}
+	sprintf(Errmsg, "Not supported on this OS.");
+	return 0;
 
 #endif
 
-
-}       /* end of datapidchk */
+}				/* end of datapidchk */
 
 #if UNIT_TEST
 
 /***********************************************************************
  * main for doing unit testing
  ***********************************************************************/
-int
-main(ac, ag)
+int main(ac, ag)
 int ac;
 char **ag;
 {
 
-int size=1234;
-char *buffer;
-int ret;
-char *errmsg;
+	int size = 1234;
+	char *buffer;
+	int ret;
+	char *errmsg;
 
-    if ((buffer=(char *)malloc(size)) == NULL) {
-        perror("malloc");
-        exit(2);
-    }
+	if ((buffer = (char *)malloc(size)) == NULL) {
+		perror("malloc");
+		exit(2);
+	}
 
-
-    datapidgen(-1, buffer, size, 3);
+	datapidgen(-1, buffer, size, 3);
 
 /***
 fwrite(buffer, size, 1, stdout);
 fwrite("\n", 1, 1, stdout);
 ****/
 
-    printf("datapidgen(-1, buffer, size, 3)\n");
+	printf("datapidgen(-1, buffer, size, 3)\n");
 
-    ret=datapidchk(-1, buffer, size, 3, &errmsg);
-    printf("datapidchk(-1, buffer, %d, 3, &errmsg) returned %d %s\n",
-        size, ret, errmsg);
-    ret=datapidchk(-1, &buffer[1], size-1, 4, &errmsg);
-    printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = datapidchk(-1, buffer, size, 3, &errmsg);
+	printf("datapidchk(-1, buffer, %d, 3, &errmsg) returned %d %s\n",
+	       size, ret, errmsg);
+	ret = datapidchk(-1, &buffer[1], size - 1, 4, &errmsg);
+	printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
+	       size - 1, ret, errmsg);
 
-    buffer[25]= 0x0;
-    buffer[26]= 0x0;
-    buffer[27]= 0x0;
-    buffer[28]= 0x0;
-    printf("changing char 25-28\n");
+	buffer[25] = 0x0;
+	buffer[26] = 0x0;
+	buffer[27] = 0x0;
+	buffer[28] = 0x0;
+	printf("changing char 25-28\n");
 
-    ret=datapidchk(-1, &buffer[1], size-1, 4, &errmsg);
-    printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = datapidchk(-1, &buffer[1], size - 1, 4, &errmsg);
+	printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
+	       size - 1, ret, errmsg);
 
-printf("------------------------------------------\n");
+	printf("------------------------------------------\n");
 
-    datapidgen(getpid(), buffer, size, 5);
+	datapidgen(getpid(), buffer, size, 5);
 
 /*******
 fwrite(buffer, size, 1, stdout);
 fwrite("\n", 1, 1, stdout);
 ******/
 
-    printf("\ndatapidgen(getpid(), buffer, size, 5)\n");
+	printf("\ndatapidgen(getpid(), buffer, size, 5)\n");
 
-    ret=datapidchk(getpid(), buffer, size, 5, &errmsg);
-    printf("datapidchk(getpid(), buffer, %d, 5, &errmsg) returned %d %s\n",
-        size, ret, errmsg);
+	ret = datapidchk(getpid(), buffer, size, 5, &errmsg);
+	printf("datapidchk(getpid(), buffer, %d, 5, &errmsg) returned %d %s\n",
+	       size, ret, errmsg);
 
-    ret=datapidchk(getpid(), &buffer[1], size-1, 6, &errmsg);
-    printf("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = datapidchk(getpid(), &buffer[1], size - 1, 6, &errmsg);
+	printf
+	    ("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    buffer[25]= 0x0;
-    printf("changing char 25\n");
+	buffer[25] = 0x0;
+	printf("changing char 25\n");
 
-    ret=datapidchk(getpid(), &buffer[1], size-1, 6, &errmsg);
-    printf("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
-        size-1, ret, errmsg);
+	ret = datapidchk(getpid(), &buffer[1], size - 1, 6, &errmsg);
+	printf
+	    ("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
+	     size - 1, ret, errmsg);
 
-    exit(0);
+	exit(0);
 }
 
 #endif
diff --git a/lib/file_lock.c b/lib/file_lock.c
index d979552..52c8947 100644
--- a/lib/file_lock.c
+++ b/lib/file_lock.c
@@ -38,10 +38,9 @@
 #include <stdio.h>
 #include <errno.h>
 #include <sys/sysmacros.h>
-#include <string.h> /* memset, strerror */
+#include <string.h>		/* memset, strerror */
 #include "file_lock.h"
 
-
 #ifndef EFSEXCLWR
 #define EFSEXCLWR	503
 #endif
@@ -59,150 +58,149 @@
  * Test interface to the fcntl system call.
  * It will loop if the LOCK_NB flags is NOT set.
  ***********************************************************************/
-int
-file_lock(fd, flags, errormsg)
+int file_lock(fd, flags, errormsg)
 int fd;
 int flags;
 char **errormsg;
 {
-        register int cmd, ret;
-        struct flock flocks;
+	register int cmd, ret;
+	struct flock flocks;
 
-        memset(&flocks, 0, sizeof(struct flock));
+	memset(&flocks, 0, sizeof(struct flock));
 
-        if (flags&LOCK_NB)
-                cmd = F_SETLK;
-        else
-                cmd = F_SETLKW;
+	if (flags & LOCK_NB)
+		cmd = F_SETLK;
+	else
+		cmd = F_SETLKW;
 
-        flocks.l_whence = 0;
-        flocks.l_start = 0;
-        flocks.l_len = 0;
+	flocks.l_whence = 0;
+	flocks.l_start = 0;
+	flocks.l_len = 0;
 
-        if (flags&LOCK_UN)
-                flocks.l_type = F_UNLCK;
-        else if (flags&LOCK_EX)
-                flocks.l_type = F_WRLCK;
-        else if (flags&LOCK_SH)
-                flocks.l_type = F_RDLCK;
-        else {
-                errno = EINVAL;
-	    if (errormsg != NULL) {
-		sprintf(errmsg,
-		    "Programmer error, called file_lock with in valid flags\n");
-		*errormsg = errmsg;
-            }
-            return -1;
-        }
+	if (flags & LOCK_UN)
+		flocks.l_type = F_UNLCK;
+	else if (flags & LOCK_EX)
+		flocks.l_type = F_WRLCK;
+	else if (flags & LOCK_SH)
+		flocks.l_type = F_RDLCK;
+	else {
+		errno = EINVAL;
+		if (errormsg != NULL) {
+			sprintf(errmsg,
+				"Programmer error, called file_lock with in valid flags\n");
+			*errormsg = errmsg;
+		}
+		return -1;
+	}
 
 	sprintf(Fl_syscall_str,
-	    "fcntl(%d, %d, &flocks): type:%d whence:%d, start:%lld len:%lld\n",
-                fd, cmd, flocks.l_type, flocks.l_whence,
+		"fcntl(%d, %d, &flocks): type:%d whence:%d, start:%lld len:%lld\n",
+		fd, cmd, flocks.l_type, flocks.l_whence,
 		(long long)flocks.l_start, (long long)flocks.l_len);
 
 	while (1) {
-            ret = fcntl(fd, cmd, &flocks);
+		ret = fcntl(fd, cmd, &flocks);
 
-	    if (ret < 0) {
-	        if (cmd == F_SETLK)
-	            switch (errno) {
-		       /* these errors are okay */
-		        case EACCES:	/* Permission denied */
-		        case EINTR:		/* interrupted system call */
+		if (ret < 0) {
+			if (cmd == F_SETLK)
+				switch (errno) {
+					/* these errors are okay */
+				case EACCES:	/* Permission denied */
+				case EINTR:	/* interrupted system call */
 #ifdef EFILESH
-		        case EFILESH:	/* file shared */
+				case EFILESH:	/* file shared */
 #endif
-		        case EFSEXCLWR:	/* File is write protected */
-			    continue;	/* retry getting lock */
-	        }
-	        if (errormsg != NULL) {
-	            sprintf(errmsg, "fcntl(%d, %d, &flocks): errno:%d %s\n",
-		        fd, cmd, errno, strerror(errno));
-		    *errormsg = errmsg;
-	        }
-	        return -1;
-	    }
-	    break;
+				case EFSEXCLWR:	/* File is write protected */
+					continue;	/* retry getting lock */
+				}
+			if (errormsg != NULL) {
+				sprintf(errmsg,
+					"fcntl(%d, %d, &flocks): errno:%d %s\n",
+					fd, cmd, errno, strerror(errno));
+				*errormsg = errmsg;
+			}
+			return -1;
+		}
+		break;
 	}
 
-        return ret;
+	return ret;
 
-}	/* end of file_lock */
+}				/* end of file_lock */
 
 /***********************************************************************
  *
  * Test interface to the fcntl system call.
  * It will loop if the LOCK_NB flags is NOT set.
  ***********************************************************************/
-int
-record_lock(fd, flags, start, len, errormsg)
+int record_lock(fd, flags, start, len, errormsg)
 int fd;
 int flags;
 int start;
 int len;
 char **errormsg;
 {
-        register int cmd, ret;
-        struct flock flocks;
+	register int cmd, ret;
+	struct flock flocks;
 
-        memset(&flocks, 0, sizeof(struct flock));
+	memset(&flocks, 0, sizeof(struct flock));
 
-        if (flags&LOCK_NB)
-                cmd = F_SETLK;
-        else
-                cmd = F_SETLKW;
+	if (flags & LOCK_NB)
+		cmd = F_SETLK;
+	else
+		cmd = F_SETLKW;
 
-        flocks.l_whence = 0;
-        flocks.l_start = start;
-        flocks.l_len = len;
+	flocks.l_whence = 0;
+	flocks.l_start = start;
+	flocks.l_len = len;
 
-        if (flags&LOCK_UN)
-                flocks.l_type = F_UNLCK;
-        else if (flags&LOCK_EX)
-                flocks.l_type = F_WRLCK;
-        else if (flags&LOCK_SH)
-                flocks.l_type = F_RDLCK;
-        else {
-                errno = EINVAL;
-	    if (errormsg != NULL) {
-		sprintf(errmsg,
-		    "Programmer error, called record_lock with in valid flags\n");
-		*errormsg = errmsg;
-            }
-            return -1;
-        }
+	if (flags & LOCK_UN)
+		flocks.l_type = F_UNLCK;
+	else if (flags & LOCK_EX)
+		flocks.l_type = F_WRLCK;
+	else if (flags & LOCK_SH)
+		flocks.l_type = F_RDLCK;
+	else {
+		errno = EINVAL;
+		if (errormsg != NULL) {
+			sprintf(errmsg,
+				"Programmer error, called record_lock with in valid flags\n");
+			*errormsg = errmsg;
+		}
+		return -1;
+	}
 
 	sprintf(Fl_syscall_str,
-	    "fcntl(%d, %d, &flocks): type:%d whence:%d, start:%lld len:%lld\n",
-                fd, cmd, flocks.l_type, flocks.l_whence,
+		"fcntl(%d, %d, &flocks): type:%d whence:%d, start:%lld len:%lld\n",
+		fd, cmd, flocks.l_type, flocks.l_whence,
 		(long long)flocks.l_start, (long long)flocks.l_len);
 
 	while (1) {
-            ret = fcntl(fd, cmd, &flocks);
+		ret = fcntl(fd, cmd, &flocks);
 
-	    if (ret < 0) {
-	        if (cmd == F_SETLK)
-	            switch (errno) {
-		       /* these errors are okay */
-		        case EACCES:	/* Permission denied */
-		        case EINTR:		/* interrupted system call */
+		if (ret < 0) {
+			if (cmd == F_SETLK)
+				switch (errno) {
+					/* these errors are okay */
+				case EACCES:	/* Permission denied */
+				case EINTR:	/* interrupted system call */
 #ifdef EFILESH
-		        case EFILESH:	/* file shared */
+				case EFILESH:	/* file shared */
 #endif
-		        case EFSEXCLWR:	/* File is write protected */
-			    continue;	/* retry getting lock */
-	        }
-	        if (errormsg != NULL) {
-	            sprintf(errmsg, "fcntl(%d, %d, &flocks): errno:%d %s\n",
-		        fd, cmd, errno, strerror(errno));
-		    *errormsg = errmsg;
-	        }
-	        return -1;
-	    }
-	    break;
+				case EFSEXCLWR:	/* File is write protected */
+					continue;	/* retry getting lock */
+				}
+			if (errormsg != NULL) {
+				sprintf(errmsg,
+					"fcntl(%d, %d, &flocks): errno:%d %s\n",
+					fd, cmd, errno, strerror(errno));
+				*errormsg = errmsg;
+			}
+			return -1;
+		}
+		break;
 	}
 
-        return ret;
+	return ret;
 
-}	/* end of record_lock */
-
+}				/* end of record_lock */
diff --git a/lib/forker.c b/lib/forker.c
index 68e90b8..5e6ac48 100644
--- a/lib/forker.c
+++ b/lib/forker.c
@@ -109,13 +109,13 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include <unistd.h> /* fork, getpid, sleep */
+#include <unistd.h>		/* fork, getpid, sleep */
 #include <string.h>
-#include <stdlib.h> /* exit */
+#include <stdlib.h>		/* exit */
 #include "forker.h"
 
-int Forker_pids[FORKER_MAX_PIDS];      /* holds pids of forked processes */
-int Forker_npids=0;             /* number of entries in Forker_pids */
+int Forker_pids[FORKER_MAX_PIDS];	/* holds pids of forked processes */
+int Forker_npids = 0;		/* number of entries in Forker_pids */
 
 /***********************************************************************
  *
@@ -127,103 +127,107 @@
  *   0 : if fork did not fail
  *  !0 : if fork failed, the return value will be the errno.
  ***********************************************************************/
-int
-background(prefix)
+int background(prefix)
 char *prefix;
 {
-  switch (fork()) {
-  case -1:
-    if (prefix != NULL)
-        fprintf(stderr, "%s: In %s background(), fork() failed, errno:%d %s\n",
-	    prefix, __FILE__, errno, strerror(errno));
-    exit(errno);
+	switch (fork()) {
+	case -1:
+		if (prefix != NULL)
+			fprintf(stderr,
+				"%s: In %s background(), fork() failed, errno:%d %s\n",
+				prefix, __FILE__, errno, strerror(errno));
+		exit(errno);
 
-  case 0:	/* child process */
-    break;
+	case 0:		/* child process */
+		break;
 
-  default:
-    exit(0);
-  }
+	default:
+		exit(0);
+	}
 
-  return 0;
+	return 0;
 
-}	/* end of background */
+}				/* end of background */
 
 /***********************************************************************
  * Forker will fork ncopies-1 copies of self.
  *
  ***********************************************************************/
-int
-forker(ncopies, mode, prefix)
+int forker(ncopies, mode, prefix)
 int ncopies;
-int mode;	/* 0 - all childern of parent, 1 - only 1 direct child */
-char *prefix;   /* if ! NULL, an message will be printed to stderr */
+int mode;			/* 0 - all childern of parent, 1 - only 1 direct child */
+char *prefix;			/* if ! NULL, an message will be printed to stderr */
 		/* if fork fails.  The prefix (program name) will */
-	        /* preceed the message */
+		/* preceed the message */
 {
-    int cnt;
-    int pid;
-    static int ind = 0;
+	int cnt;
+	int pid;
+	static int ind = 0;
 
-    Forker_pids[ind]=0;
+	Forker_pids[ind] = 0;
 
-    for (cnt=1; cnt < ncopies; cnt++) {
+	for (cnt = 1; cnt < ncopies; cnt++) {
 
-	switch ( mode ) {
-        case 1  :	/* only 1 direct child */
-	    if ((pid = fork()) == -1) {
-		if (prefix != NULL)
-		    fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
-			prefix, __FILE__, errno, strerror(errno));
-	        return 0;
-	    }
-	    Forker_npids++;
+		switch (mode) {
+		case 1:	/* only 1 direct child */
+			if ((pid = fork()) == -1) {
+				if (prefix != NULL)
+					fprintf(stderr,
+						"%s: %s,forker(): fork() failed, errno:%d %s\n",
+						prefix, __FILE__, errno,
+						strerror(errno));
+				return 0;
+			}
+			Forker_npids++;
 
-	    switch (pid ) {
-            case 0:     /* child - continues the forking */
+			switch (pid) {
+			case 0:	/* child - continues the forking */
 
-		if (Forker_npids < FORKER_MAX_PIDS)
-                    Forker_pids[Forker_npids-1]=getpid();
-                break;
+				if (Forker_npids < FORKER_MAX_PIDS)
+					Forker_pids[Forker_npids - 1] =
+					    getpid();
+				break;
 
-            default:    /* parent - stop the forking */
-		if (Forker_npids < FORKER_MAX_PIDS)
-                    Forker_pids[Forker_npids-1]=pid;
-                return cnt-1;
-            }
+			default:	/* parent - stop the forking */
+				if (Forker_npids < FORKER_MAX_PIDS)
+					Forker_pids[Forker_npids - 1] = pid;
+				return cnt - 1;
+			}
 
-	    break;
+			break;
 
-	default :	/* all new processes are childern of parent */
-	    if ((pid = fork()) == -1) {
-		if (prefix != NULL)
-		    fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
-			prefix, __FILE__, errno, strerror(errno));
-	        return cnt-1;
-	    }
-	    Forker_npids++;
+		default:	/* all new processes are childern of parent */
+			if ((pid = fork()) == -1) {
+				if (prefix != NULL)
+					fprintf(stderr,
+						"%s: %s,forker(): fork() failed, errno:%d %s\n",
+						prefix, __FILE__, errno,
+						strerror(errno));
+				return cnt - 1;
+			}
+			Forker_npids++;
 
-	    switch (pid ) {
-	    case 0:	/* child - stops the forking */
-		if (Forker_npids < FORKER_MAX_PIDS)
-                    Forker_pids[Forker_npids-1]=getpid();
-	        return cnt;
+			switch (pid) {
+			case 0:	/* child - stops the forking */
+				if (Forker_npids < FORKER_MAX_PIDS)
+					Forker_pids[Forker_npids - 1] =
+					    getpid();
+				return cnt;
 
-	    default:	/* parent - continues the forking */
-		if (Forker_npids < FORKER_MAX_PIDS)
-                    Forker_pids[Forker_npids-1]=pid;
-                break;
-            }
-	    break;
+			default:	/* parent - continues the forking */
+				if (Forker_npids < FORKER_MAX_PIDS)
+					Forker_pids[Forker_npids - 1] = pid;
+				break;
+			}
+			break;
+		}
 	}
-    }
 
-    if (Forker_npids < FORKER_MAX_PIDS)
-        Forker_pids[Forker_npids]=0;
-    return cnt-1;
+	if (Forker_npids < FORKER_MAX_PIDS)
+		Forker_pids[Forker_npids] = 0;
+	return cnt - 1;
 
-}	/* end of forker */
-
+}				/* end of forker */
 
 #if UNIT_TEST
 
@@ -232,50 +236,49 @@
  * functions.
  */
 
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
-    int ncopies=1;
-    int mode=0;
-    int ret;
-    int ind;
+	int ncopies = 1;
+	int mode = 0;
+	int ret;
+	int ind;
 
-    if (argc == 1) {
-	printf("Usage: %s ncopies [mode]\n", argv[0]);
-	exit(1);
-    }
+	if (argc == 1) {
+		printf("Usage: %s ncopies [mode]\n", argv[0]);
+		exit(1);
+	}
 
-    if (sscanf(argv[1], "%i", &ncopies) != 1) {
-	printf("%s: ncopies argument must be integer\n", argv[0]);
-	exit(1);
-    }
+	if (sscanf(argv[1], "%i", &ncopies) != 1) {
+		printf("%s: ncopies argument must be integer\n", argv[0]);
+		exit(1);
+	}
 
-    if (argc == 3)
-	if (sscanf(argv[2], "%i", &mode) != 1) {
-        printf("%s: mode argument must be integer\n", argv[0]);
-        exit(1);
-    }
+	if (argc == 3)
+		if (sscanf(argv[2], "%i", &mode) != 1) {
+			printf("%s: mode argument must be integer\n", argv[0]);
+			exit(1);
+		}
 
-    printf("Starting Pid = %d\n", getpid());
-    ret=background(argv[0]);
-    printf("After background() ret:%d, pid = %d\n", ret, getpid());
+	printf("Starting Pid = %d\n", getpid());
+	ret = background(argv[0]);
+	printf("After background() ret:%d, pid = %d\n", ret, getpid());
 
-    ret=forker(ncopies, mode, argv[0]);
+	ret = forker(ncopies, mode, argv[0]);
 
-    printf("forker(%d, %d, %s) ret:%d, pid = %d, sleeping 30 seconds.\n",
-	ncopies, mode, argv[0], ret, getpid());
+	printf("forker(%d, %d, %s) ret:%d, pid = %d, sleeping 30 seconds.\n",
+	       ncopies, mode, argv[0], ret, getpid());
 
-    printf("%d My version of Forker_pids[],  Forker_npids = %d\n",
-	getpid(), Forker_npids);
+	printf("%d My version of Forker_pids[],  Forker_npids = %d\n",
+	       getpid(), Forker_npids);
 
-    for (ind=0; ind<Forker_npids; ind++) {
-	printf("%d ind:%-2d pid:%d\n", getpid(), ind, Forker_pids[ind]);
-    }
+	for (ind = 0; ind < Forker_npids; ind++) {
+		printf("%d ind:%-2d pid:%d\n", getpid(), ind, Forker_pids[ind]);
+	}
 
-    sleep(30);
-    exit(0);
+	sleep(30);
+	exit(0);
 }
 
-#endif  /* UNIT_TEST */
+#endif /* UNIT_TEST */
diff --git a/lib/get_high_address.c b/lib/get_high_address.c
index b357fe0..eed9cf1 100644
--- a/lib/get_high_address.c
+++ b/lib/get_high_address.c
@@ -36,5 +36,5 @@
 
 char *get_high_address(void)
 {
-       return (char *)sbrk(0) + (4 * getpagesize());
+	return (char *)sbrk(0) + (4 * getpagesize());
 }
diff --git a/lib/get_path.c b/lib/get_path.c
index aa78a81..c7bbead 100644
--- a/lib/get_path.c
+++ b/lib/get_path.c
@@ -54,12 +54,11 @@
 
 int tst_get_path(const char *prog_name, char *buf, size_t buf_len)
 {
-	const char *path = (const char*) getenv("PATH");
+	const char *path = (const char *)getenv("PATH");
 	const char *start = path;
 	const char *end;
 	size_t size, ret;
 
-
 	if (path == NULL)
 		return -1;
 
@@ -67,7 +66,8 @@
 		end = strchr(start, ':');
 
 		if (end != NULL)
-			snprintf(buf, MIN(buf_len, (size_t)(end - start + 1)), "%s", start);
+			snprintf(buf, MIN(buf_len, (size_t) (end - start + 1)),
+				 "%s", start);
 		else
 			snprintf(buf, buf_len, "%s", start);
 
@@ -86,9 +86,13 @@
 		 * If there is no '/' ad the end of path from $PATH add it.
 		 */
 		if (buf[size - 1] != '/')
-			ret = snprintf(buf + size, buf_len - size, "/%s", prog_name);
+			ret =
+			    snprintf(buf + size, buf_len - size, "/%s",
+				     prog_name);
 		else
-			ret = snprintf(buf + size, buf_len - size, "%s", prog_name);
+			ret =
+			    snprintf(buf + size, buf_len - size, "%s",
+				     prog_name);
 
 		if (buf_len - size > ret && file_exist(buf))
 			return 0;
diff --git a/lib/libtestsuite.c b/lib/libtestsuite.c
index 698a4eb..713d699 100644
--- a/lib/libtestsuite.c
+++ b/lib/libtestsuite.c
@@ -43,8 +43,7 @@
 #include "test.h"
 #include "usctest.h"
 
-struct passwd *
-my_getpwnam(char *name)
+struct passwd *my_getpwnam(char *name)
 {
 	struct passwd *saved_pwent;
 	struct passwd *pwent;
@@ -57,15 +56,14 @@
 
 	*saved_pwent = *pwent;
 
-	return(saved_pwent);
+	return (saved_pwent);
 }
 
-void
-do_file_setup(char *fname)
+void do_file_setup(char *fname)
 {
 	int fd;
 
-	if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
+	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
 		tst_resm(TBROK, "open(%s, O_RDWR|O_CREAT,0700) Failed, "
 			 "errno=%d : %s", fname, errno, strerror(errno));
 	}
@@ -84,7 +82,7 @@
 
 	p = strrchr(name, '/');
 	if (p == NULL)
-		p = (char *) name;
+		p = (char *)name;
 	else
 		p++;
 	snprintf(pipe_name, 255, "%s/ltp_fifo_%s", P_tmpdir, p);
@@ -118,9 +116,9 @@
 	int r = 0;
 
 	if (fd[0] != -1)
-		r = close (fd[0]);
+		r = close(fd[0]);
 	if (fd[1] != -1)
-		r |= close (fd[1]);
+		r |= close(fd[1]);
 
 	if (name != NULL) {
 		generate_pipe_name(name);
@@ -135,11 +133,11 @@
 	int r;
 
 	if (fd[1] != -1) {
-		close (fd[1]);
+		close(fd[1]);
 		fd[1] = -1;
 	}
 
-	r = read (fd[0], &buf, 1);
+	r = read(fd[0], &buf, 1);
 
 	if ((r != 1) || (buf != 'A'))
 		return -1;
@@ -152,11 +150,11 @@
 	int r;
 
 	if (fd[0] != -1) {
-		close (fd[0]);
+		close(fd[0]);
 		fd[0] = -1;
 	}
 
-	r = write (fd[1], &buf, 1);
+	r = write(fd[1], &buf, 1);
 
 	if (r != 1)
 		return -1;
diff --git a/lib/mount_utils.c b/lib/mount_utils.c
index 78b0578..03378a9 100644
--- a/lib/mount_utils.c
+++ b/lib/mount_utils.c
@@ -17,8 +17,7 @@
  * Returns NULL if the device isn't found, memory couldn't be allocated, or if
  * the `block device' isn't a real block device (e.g. nfs mounts, etc).
  */
-char *
-get_block_device(const char *path)
+char *get_block_device(const char *path)
 {
 
 	char *mnt_dir = NULL, *mnt_fsname = NULL;
@@ -31,8 +30,7 @@
 	if (path == NULL) {
 		errno = EINVAL;
 	} else if ((resolved_path = realpath(path, NULL)) != NULL &&
-		   (mtab_f = setmntent("/etc/mtab", "r")) != NULL)
-	{
+		   (mtab_f = setmntent("/etc/mtab", "r")) != NULL) {
 
 		do {
 
@@ -40,23 +38,42 @@
 
 			if (entry != NULL) {
 
-				if (!strncmp(entry->mnt_dir, resolved_path, strlen(entry->mnt_dir))) {
+				if (!strncmp
+				    (entry->mnt_dir, resolved_path,
+				     strlen(entry->mnt_dir))) {
 
 					char copy_string = 0;
 
 					if (mnt_dir == NULL) {
 
-						mnt_dir = malloc(strlen(entry->mnt_dir)+1);
-						mnt_fsname = malloc(strlen(entry->mnt_fsname)+1);
+						mnt_dir =
+						    malloc(strlen
+							   (entry->mnt_dir) +
+							   1);
+						mnt_fsname =
+						    malloc(strlen
+							   (entry->mnt_fsname) +
+							   1);
 
-						copy_string = mnt_dir != NULL && mnt_fsname != NULL;
+						copy_string = mnt_dir != NULL
+						    && mnt_fsname != NULL;
 
 					} else {
 
-						if (!strncmp(entry->mnt_dir, mnt_dir, strlen(entry->mnt_dir))) {
+						if (!strncmp
+						    (entry->mnt_dir, mnt_dir,
+						     strlen(entry->mnt_dir))) {
 
-							mnt_dir = realloc(mnt_dir, strlen(entry->mnt_dir));
-							mnt_fsname = realloc(mnt_fsname, strlen(entry->mnt_fsname));
+							mnt_dir =
+							    realloc(mnt_dir,
+								    strlen
+								    (entry->
+								     mnt_dir));
+							mnt_fsname =
+							    realloc(mnt_fsname,
+								    strlen
+								    (entry->
+								     mnt_fsname));
 							copy_string = 1;
 
 						}
@@ -65,17 +82,22 @@
 
 					if (copy_string != 0) {
 						strcpy(mnt_dir, entry->mnt_dir);
-						strcpy(mnt_fsname, entry->mnt_fsname);
+						strcpy(mnt_fsname,
+						       entry->mnt_fsname);
 #if DEBUG
-						printf("%s is a subset of %s\n", path, entry->mnt_dir);
+						printf("%s is a subset of %s\n",
+						       path, entry->mnt_dir);
 					} else {
-						printf("%s is not a subset of %s\n", path, entry->mnt_dir);
+						printf
+						    ("%s is not a subset of %s\n",
+						     path, entry->mnt_dir);
 #endif
 					}
 
 #if DEBUG
 				} else {
-					printf("%s is not a subset of %s\n", path, entry->mnt_dir);
+					printf("%s is not a subset of %s\n",
+					       path, entry->mnt_dir);
 #endif
 				}
 
@@ -111,8 +133,7 @@
  *
  * Returns NULL if memory couldn't be allocated.
  */
-char *
-get_mountpoint(const char *path)
+char *get_mountpoint(const char *path)
 {
 
 	char *mnt_dir = NULL;
@@ -124,8 +145,7 @@
 	if (path == NULL) {
 		errno = EINVAL;
 	} else if ((resolved_path = realpath(path, NULL)) != NULL &&
-		   (mtab_f = setmntent("/etc/mtab", "r")) != NULL)
-	{
+		   (mtab_f = setmntent("/etc/mtab", "r")) != NULL) {
 
 		do {
 
@@ -133,20 +153,31 @@
 
 			if (entry != NULL) {
 
-				if (!strncmp(entry->mnt_dir, resolved_path, strlen(entry->mnt_dir))) {
+				if (!strncmp
+				    (entry->mnt_dir, resolved_path,
+				     strlen(entry->mnt_dir))) {
 
 					char copy_string = 0;
 
 					if (mnt_dir == NULL) {
 
-						mnt_dir = malloc(strlen(entry->mnt_dir)+1);
+						mnt_dir =
+						    malloc(strlen
+							   (entry->mnt_dir) +
+							   1);
 						copy_string = mnt_dir != NULL;
 
 					} else {
 
-						if (!strncmp(entry->mnt_dir, mnt_dir, strlen(entry->mnt_dir))) {
+						if (!strncmp
+						    (entry->mnt_dir, mnt_dir,
+						     strlen(entry->mnt_dir))) {
 
-							mnt_dir = realloc(mnt_dir, strlen(entry->mnt_dir));
+							mnt_dir =
+							    realloc(mnt_dir,
+								    strlen
+								    (entry->
+								     mnt_dir));
 							copy_string = 1;
 
 						}
@@ -156,15 +187,19 @@
 					if (copy_string != 0) {
 						strcpy(mnt_dir, entry->mnt_dir);
 #if DEBUG
-						printf("%s is a subset of %s\n", path, entry->mnt_dir);
+						printf("%s is a subset of %s\n",
+						       path, entry->mnt_dir);
 					} else {
-						printf("%s is not a subset of %s\n", path, entry->mnt_dir);
+						printf
+						    ("%s is not a subset of %s\n",
+						     path, entry->mnt_dir);
 #endif
 					}
 
 #if DEBUG
 				} else {
-					printf("%s is not a subset of %s\n", path, entry->mnt_dir);
+					printf("%s is not a subset of %s\n",
+					       path, entry->mnt_dir);
 #endif
 				}
 
@@ -183,16 +218,16 @@
 	return mnt_dir;
 
 }
+
 #if UNIT_TEST
-int
-main(void)
+int main(void)
 {
 
 	char *mnt_fsname;
 	char *paths[] = {
 		"/home",
 		"/mnt",
-		"/tmp/foo", /* mkdir /tmp/foo; mount -t tmpfs none /tmp/foo/ */
+		"/tmp/foo",	/* mkdir /tmp/foo; mount -t tmpfs none /tmp/foo/ */
 		"/proc",
 		"/optimus/store"
 	};
diff --git a/lib/open_flags.c b/lib/open_flags.c
index ee3c13f..ff37a16 100644
--- a/lib/open_flags.c
+++ b/lib/open_flags.c
@@ -101,194 +101,192 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/param.h>
-#include <string.h> /* strcat */
+#include <string.h>		/* strcat */
 #include "open_flags.h"
 
 #define UNKNOWN_SYMBOL	"UNKNOWN"
 
-static char Open_symbols[512];	  /* space for openflags2symbols return value */
+static char Open_symbols[512];	/* space for openflags2symbols return value */
 
 struct open_flag_t {
-    char *symbol;
-    int  flag;
+	char *symbol;
+	int flag;
 };
 
 static struct open_flag_t Open_flags[] = {
-    { "O_RDONLY",	O_RDONLY },
-    { "O_WRONLY",	O_WRONLY },
-    { "O_RDWR",		O_RDWR },
-    { "O_SYNC",		O_SYNC },
-    { "O_CREAT",	O_CREAT },
-    { "O_TRUNC",	O_TRUNC },
-    { "O_EXCL",		O_EXCL },
-    { "O_APPEND",	O_APPEND },
-    { "O_NONBLOCK",	O_NONBLOCK },
+	{"O_RDONLY", O_RDONLY},
+	{"O_WRONLY", O_WRONLY},
+	{"O_RDWR", O_RDWR},
+	{"O_SYNC", O_SYNC},
+	{"O_CREAT", O_CREAT},
+	{"O_TRUNC", O_TRUNC},
+	{"O_EXCL", O_EXCL},
+	{"O_APPEND", O_APPEND},
+	{"O_NONBLOCK", O_NONBLOCK},
 #if O_NOCTTY
-    { "O_NOCTTY",	O_NOCTTY },
+	{"O_NOCTTY", O_NOCTTY},
 #endif
 #if O_DSYNC
-    { "O_DSYNC",	O_DSYNC },
+	{"O_DSYNC", O_DSYNC},
 #endif
 #if O_RSYNC
-    { "O_RSYNC",	O_RSYNC },
+	{"O_RSYNC", O_RSYNC},
 #endif
 #if O_ASYNC
-    { "O_ASYNC",	O_ASYNC },
+	{"O_ASYNC", O_ASYNC},
 #endif
 #if O_PTYIGN
-    { "O_PTYIGN",	O_PTYIGN },
+	{"O_PTYIGN", O_PTYIGN},
 #endif
 #if O_NDELAY
-    { "O_NDELAY",	O_NDELAY },
+	{"O_NDELAY", O_NDELAY},
 #endif
 #if O_RAW
-    { "O_RAW",		O_RAW },
+	{"O_RAW", O_RAW},
 #endif
 #ifdef O_SSD
-    { "O_SSD",		O_SSD },
+	{"O_SSD", O_SSD},
 #endif
 #if O_BIG
-    { "O_BIG",		O_BIG },
+	{"O_BIG", O_BIG},
 #endif
 #if O_PLACE
-    { "O_PLACE",	O_PLACE },
+	{"O_PLACE", O_PLACE},
 #endif
 #if O_RESTART
-    { "O_RESTART",	O_RESTART },
+	{"O_RESTART", O_RESTART},
 #endif
 #if O_SFSXOP
-    { "O_SFSXOP",	O_SFSXOP },
+	{"O_SFSXOP", O_SFSXOP},
 #endif
 #if O_SFS_DEFER_TM
-    { "O_SFS_DEFER_TM",	O_SFS_DEFER_TM },
+	{"O_SFS_DEFER_TM", O_SFS_DEFER_TM},
 #endif
 #if O_WELLFORMED
-    { "O_WELLFORMED",	O_WELLFORMED },
+	{"O_WELLFORMED", O_WELLFORMED},
 #endif
 #if O_LDRAW
-    { "O_LDRAW",	O_LDRAW },
+	{"O_LDRAW", O_LDRAW},
 #endif
 #if O_T3D
-    { "O_T3D",	O_T3D },
+	{"O_T3D", O_T3D},
 #endif /* O_T3D */
 #if O_PARALLEL
-    { "O_PARALLEL",	O_PARALLEL },
-    { "O_FSA",	O_PARALLEL|O_WELLFORMED|O_RAW },	/* short cut */
+	{"O_PARALLEL", O_PARALLEL},
+	{"O_FSA", O_PARALLEL | O_WELLFORMED | O_RAW},	/* short cut */
 #endif /* O_PARALLEL */
 #ifdef O_LARGEFILE
-    { "O_LARGEFILE",	O_LARGEFILE },
+	{"O_LARGEFILE", O_LARGEFILE},
 #endif
 #ifdef O_DIRECT
-    { "O_DIRECT",	O_DIRECT },
+	{"O_DIRECT", O_DIRECT},
 #endif
 #ifdef O_PRIV
-    { "O_PRIV",		O_PRIV },
+	{"O_PRIV", O_PRIV},
 #endif
 
 };
 
-int
-parse_open_flags(char *string, char **badname)
+int parse_open_flags(char *string, char **badname)
 {
-   int  bits = 0;
-   char *name;
-   char *cc;
-   char savecc;
-   int  found;
-   unsigned int  ind;
+	int bits = 0;
+	char *name;
+	char *cc;
+	char savecc;
+	int found;
+	unsigned int ind;
 
-   name=string;
-   cc=name;
+	name = string;
+	cc = name;
 
-   while ( 1 ) {
+	while (1) {
 
-      for (; ((*cc != ',') && (*cc != '\0')); cc++);
-      savecc = *cc;
-      *cc = '\0';
+		for (; ((*cc != ',') && (*cc != '\0')); cc++) ;
+		savecc = *cc;
+		*cc = '\0';
 
-      found = 0;
+		found = 0;
 
-      for (ind=0; ind < sizeof(Open_flags)/sizeof(struct open_flag_t); ind++) {
-          if (strcmp(name, Open_flags[ind].symbol) == 0) {
-              bits |= Open_flags[ind].flag;
-	      found=1;
-	      break;
-	  }
-      }
+		for (ind = 0;
+		     ind < sizeof(Open_flags) / sizeof(struct open_flag_t);
+		     ind++) {
+			if (strcmp(name, Open_flags[ind].symbol) == 0) {
+				bits |= Open_flags[ind].flag;
+				found = 1;
+				break;
+			}
+		}
 
-      *cc = savecc;	/* restore string */
+		*cc = savecc;	/* restore string */
 
-      if (found == 0) {	/* invalid name */
-         if (badname != NULL)
-           *badname = name;
-         return -1;
-      }
+		if (found == 0) {	/* invalid name */
+			if (badname != NULL)
+				*badname = name;
+			return -1;
+		}
 
-      if (savecc == '\0')
-	break;
+		if (savecc == '\0')
+			break;
 
-      name = ++cc;
+		name = ++cc;
 
-   }	/* end while */
+	}			/* end while */
 
-   return bits;
+	return bits;
 
-}	/* end of parse_open_flags */
+}				/* end of parse_open_flags */
 
-
-char *
-openflags2symbols(int openflags, char *sep, int mode)
+char *openflags2symbols(int openflags, char *sep, int mode)
 {
-    int ind;
-    int size;
-    int bits = openflags;
-    int havesome=0;
+	int ind;
+	int size;
+	int bits = openflags;
+	int havesome = 0;
 
-    Open_symbols[0]='\0';
+	Open_symbols[0] = '\0';
 
-    size=sizeof(Open_flags)/sizeof(struct open_flag_t);
+	size = sizeof(Open_flags) / sizeof(struct open_flag_t);
 
-    /*
-     * Deal with special case of O_RDONLY.  If O_WRONLY nor O_RDWR
-     * bits are not set, assume O_RDONLY.
-     */
+	/*
+	 * Deal with special case of O_RDONLY.  If O_WRONLY nor O_RDWR
+	 * bits are not set, assume O_RDONLY.
+	 */
 
-    if ((bits & (O_WRONLY | O_RDWR)) == 0) {
-	strcat(Open_symbols, "O_RDONLY");
-	havesome=1;
-    }
-
-    /*
-     *  Loop through all but O_RDONLY elments of Open_flags
-     */
-    for (ind=1; ind < size; ind++) {
-
-	if ((bits & Open_flags[ind].flag) == Open_flags[ind].flag) {
-	    if (havesome)
-		strcat(Open_symbols, sep);
-
-	    strcat(Open_symbols, Open_flags[ind].symbol);
-	    havesome++;
-
-	    /* remove flag bits from bits */
-	    bits = bits & (~Open_flags[ind].flag);
+	if ((bits & (O_WRONLY | O_RDWR)) == 0) {
+		strcat(Open_symbols, "O_RDONLY");
+		havesome = 1;
 	}
-    }
 
-    /*
-     * If not all bits were identified and mode was equal to 1,
-     * added UNKNOWN_SYMBOL to return string
-     */
-    if (bits && mode == 1)  {    /* not all bits were identified */
-        if (havesome)
-            strcat(Open_symbols, sep);
-	strcat(Open_symbols,  UNKNOWN_SYMBOL);
-    }
+	/*
+	 *  Loop through all but O_RDONLY elments of Open_flags
+	 */
+	for (ind = 1; ind < size; ind++) {
 
-    return Open_symbols;
+		if ((bits & Open_flags[ind].flag) == Open_flags[ind].flag) {
+			if (havesome)
+				strcat(Open_symbols, sep);
 
-}   /* end of openflags2symbols */
+			strcat(Open_symbols, Open_flags[ind].symbol);
+			havesome++;
 
+			/* remove flag bits from bits */
+			bits = bits & (~Open_flags[ind].flag);
+		}
+	}
+
+	/*
+	 * If not all bits were identified and mode was equal to 1,
+	 * added UNKNOWN_SYMBOL to return string
+	 */
+	if (bits && mode == 1) {	/* not all bits were identified */
+		if (havesome)
+			strcat(Open_symbols, sep);
+		strcat(Open_symbols, UNKNOWN_SYMBOL);
+	}
+
+	return Open_symbols;
+
+}				/* end of openflags2symbols */
 
 #ifdef UNIT_TEST
 
@@ -297,34 +295,36 @@
  * parse_open_flags and openflags2symbols functions.
  */
 
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
-    int bits;
-    int ret;
-    char *err;
+	int bits;
+	int ret;
+	char *err;
 
-    if (argc == 1) {
-	printf("Usage: %s openflagsbits\n\t%s symbols\n", argv[0], argv[0]);
-	exit(1);
-    }
+	if (argc == 1) {
+		printf("Usage: %s openflagsbits\n\t%s symbols\n", argv[0],
+		       argv[0]);
+		exit(1);
+	}
 
-    if (sscanf(argv[1], "%i", &bits) == 1) {
-	printf("openflags2symbols(%#o, \",\", 1) returned %s\n",
-	    bits, openflags2symbols(bits, ",", 1));
+	if (sscanf(argv[1], "%i", &bits) == 1) {
+		printf("openflags2symbols(%#o, \",\", 1) returned %s\n",
+		       bits, openflags2symbols(bits, ",", 1));
 
-    } else {
-	ret=parse_open_flags(argv[1], &err);
-	if (ret == -1)
-	    printf("parse_open_flags(%s, &err) returned -1, err = %s\n",
-	        argv[0], err);
-        else
-	    printf("parse_open_flags(%s, &err) returned %#o\n", argv[0], ret);
-    }
+	} else {
+		ret = parse_open_flags(argv[1], &err);
+		if (ret == -1)
+			printf
+			    ("parse_open_flags(%s, &err) returned -1, err = %s\n",
+			     argv[0], err);
+		else
+			printf("parse_open_flags(%s, &err) returned %#o\n",
+			       argv[0], ret);
+	}
 
-    exit(0);
+	exit(0);
 }
 
 #endif /* end of UNIT_TEST */
diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index 211299d..d07217c 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -84,7 +84,7 @@
 #endif /* UNIT_TEST */
 
 #include "test.h"
-#define _USC_LIB_   1	/* indicates we are the library to the usctest.h include */
+#define _USC_LIB_   1		/* indicates we are the library to the usctest.h include */
 #include "usctest.h"
 
 #ifndef USC_COPIES
@@ -100,80 +100,84 @@
 #endif
 
 /* The timing information block. */
-struct tblock tblock={0,((long) -1)>>1,0,0};
+struct tblock tblock = { 0, ((long)-1) >> 1, 0, 0 };
 
 #ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-extern pid_t	spawned_program_pid;
+extern pid_t spawned_program_pid;
 #endif
 
 /* Define flags and args for standard options */
-int STD_FUNCTIONAL_TEST=1,	/* flag indicating to do functional testing code */
-    STD_TIMING_ON=0,		/* flag indicating to print timing stats */
-    STD_PAUSE=0,		/* flag indicating to pause before actual start, */
-				/* for contention mode */
-    STD_INFINITE=0,		/* flag indciating to loop forever */
-    STD_LOOP_COUNT=1,		/* number of iterations */
-    STD_COPIES=1,		/* number of copies */
-    STD_ERRNO_LOG=0;		/* flag indicating to do errno logging */
+int STD_FUNCTIONAL_TEST = 1,	/* flag indicating to do functional testing code */
+    STD_TIMING_ON = 0,		/* flag indicating to print timing stats */
+    STD_PAUSE = 0,		/* flag indicating to pause before actual start, */
+    /* for contention mode */
+    STD_INFINITE = 0,		/* flag indciating to loop forever */
+    STD_LOOP_COUNT = 1,		/* number of iterations */
+    STD_COPIES = 1,		/* number of copies */
+    STD_ERRNO_LOG = 0;		/* flag indicating to do errno logging */
 
-float STD_LOOP_DURATION=0.0,    /* duration value in fractional seconds */
-      STD_LOOP_DELAY=0.0;	/* loop delay value in fractional seconds */
-
+float STD_LOOP_DURATION = 0.0,	/* duration value in fractional seconds */
+    STD_LOOP_DELAY = 0.0;	/* loop delay value in fractional seconds */
 
 char **STD_opt_arr = NULL;	/* array of option strings */
-int    STD_nopts=0,		/* number of elements in STD_opt_arr */
-       STD_argind=1;		/* argv index to next argv element */
+int STD_nopts = 0,		/* number of elements in STD_opt_arr */
+    STD_argind = 1;		/* argv index to next argv element */
 				/* (first argument) */
 				/* To getopt users, it is like optind */
 
 /*
  * The following variables are to support system testing additions.
  */
-static int  STD_TP_barrier=0;	/* flag to do barrier in TEST_PAUSE */
+static int STD_TP_barrier = 0;	/* flag to do barrier in TEST_PAUSE */
 				/* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
-static int  STD_LP_barrier=0;	/* flag to do barrier in TEST_LOOPING */
+static int STD_LP_barrier = 0;	/* flag to do barrier in TEST_LOOPING */
 				/* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
-static int  STD_TP_shmem_sz=0;	/* shmalloc this many words per pe in TEST_PAUSE */
-static int  STD_LD_shmem=0; 	/* flag to do shmem_puts and shmem_gets during delay */
-static int  STD_LP_shmem=0; 	/* flag to do shmem_puts and gets during TEST_LOOPING */
-static int  STD_LD_recfun=0;	/* do recressive function calls in loop delay */
-static int  STD_LP_recfun=0;	/* do recressive function calls in TEST_LOOPING */
-static int  STD_TP_sbrk=0;	/* do sbrk in TEST_PAUSE */
-static int  STD_LP_sbrk=0;	/* do sbrk in TEST_LOOPING */
-static char *STD_start_break=0; /* original sbrk size */
-static int  Debug=0;
+static int STD_TP_shmem_sz = 0;	/* shmalloc this many words per pe in TEST_PAUSE */
+static int STD_LD_shmem = 0;	/* flag to do shmem_puts and shmem_gets during delay */
+static int STD_LP_shmem = 0;	/* flag to do shmem_puts and gets during TEST_LOOPING */
+static int STD_LD_recfun = 0;	/* do recressive function calls in loop delay */
+static int STD_LP_recfun = 0;	/* do recressive function calls in TEST_LOOPING */
+static int STD_TP_sbrk = 0;	/* do sbrk in TEST_PAUSE */
+static int STD_LP_sbrk = 0;	/* do sbrk in TEST_LOOPING */
+static char *STD_start_break = 0;	/* original sbrk size */
+static int Debug = 0;
 
 struct std_option_t {
-    char *optstr;
-    char *help;
-    char *flag;
-    char **arg;
+	char *optstr;
+	char *help;
+	char *flag;
+	char **arg;
 } std_options[] = {
-    { "c:", "  -c n    Run n copies concurrently\n", NULL, NULL},
-    { "e" , "  -e      Turn on errno logging\n", NULL, NULL},
-    { "f" , "  -f      Turn off functional testing\n", NULL, NULL},
-    { "h" , "  -h      Show this help screen\n", NULL, NULL},
-    { "i:", "  -i n    Execute test n times\n", NULL, NULL},
-    { "I:", "  -I x    Execute test for x seconds\n", NULL, NULL},
-    { "p" , "  -p      Pause for SIGUSR1 before starting\n", NULL, NULL},
-    { "P:", "  -P x    Pause for x seconds between iterations\n", NULL, NULL},
-    { "t" , "  -t      Turn on syscall timing\n", NULL, NULL},
+	{
+	"c:", "  -c n    Run n copies concurrently\n", NULL, NULL}, {
+	"e", "  -e      Turn on errno logging\n", NULL, NULL}, {
+	"f", "  -f      Turn off functional testing\n", NULL, NULL}, {
+	"h", "  -h      Show this help screen\n", NULL, NULL}, {
+	"i:", "  -i n    Execute test n times\n", NULL, NULL}, {
+	"I:", "  -I x    Execute test for x seconds\n", NULL, NULL}, {
+	"p", "  -p      Pause for SIGUSR1 before starting\n", NULL, NULL}, {
+	"P:", "  -P x    Pause for x seconds between iterations\n", NULL, NULL},
+	{
+	"t", "  -t      Turn on syscall timing\n", NULL, NULL},
 #ifdef UCLINUX
-    { "C:", "  -C ARG  Run the child process with arguments ARG (for internal use)\n",
-      NULL, NULL},
+	{
+	"C:",
+		    "  -C ARG  Run the child process with arguments ARG (for internal use)\n",
+		    NULL, NULL},
 #endif
-    {NULL, NULL, NULL, NULL}};
+	{
+NULL, NULL, NULL, NULL}};
 
-void print_help(void (*user_help)());
+void print_help(void (*user_help) ());
 
 /*
  * Structure for usc_recressive_func argument
  */
 struct usc_bigstack_t {
-   char space[4096];
+	char space[4096];
 };
 
-static struct usc_bigstack_t *STD_bigstack=NULL;
+static struct usc_bigstack_t *STD_bigstack = NULL;
 
 /*
  * Counter of errnos returned (-e option).  Indexed by errno.
@@ -205,386 +209,411 @@
 /**********************************************************************
  * parse_opts:
  **********************************************************************/
-char *
-parse_opts(int ac, char **av, const option_t *user_optarr, void (*uhf)())
+char *parse_opts(int ac, char **av, const option_t * user_optarr,
+		 void (*uhf) ())
 {
-    int found;		/* flag to indicate that an option specified was */
-			/* found in the user's list */
-    int k;		/* scratch integer for returns and short time usage */
-    float  ftmp;	/* tmp float for parsing env variables */
-    char *ptr;		/* used in getting env variables */
-    int options=0;	/* no options specified */
-    int optstrlen, i;
-    char *optionstr;
-    int opt;		/* return of getopt */
+	int found;		/* flag to indicate that an option specified was */
+	/* found in the user's list */
+	int k;			/* scratch integer for returns and short time usage */
+	float ftmp;		/* tmp float for parsing env variables */
+	char *ptr;		/* used in getting env variables */
+	int options = 0;	/* no options specified */
+	int optstrlen, i;
+	char *optionstr;
+	int opt;		/* return of getopt */
 
-    /*
-     * If not the first time this function is called, release the old STD_opt_arr
-     * vector.
-     */
+	/*
+	 * If not the first time this function is called, release the old STD_opt_arr
+	 * vector.
+	 */
 
 #ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-    spawned_program_pid = getpid();
+	spawned_program_pid = getpid();
 #endif
 
-    if (STD_opt_arr != NULL) {
-	free(STD_opt_arr);
-	STD_opt_arr = NULL;
-    }
-    /* Calculate how much space we need for the option string */
-    optstrlen = 0;
-    for (i = 0; std_options[i].optstr; ++i)
-	optstrlen += strlen(std_options[i].optstr);
-    if (user_optarr)
-	for (i = 0; user_optarr[i].option; ++i) {
-	    if (strlen(user_optarr[i].option) > 2)
-		return "parse_opts: ERROR - Only short options are allowed";
-	    optstrlen += strlen(user_optarr[i].option);
+	if (STD_opt_arr != NULL) {
+		free(STD_opt_arr);
+		STD_opt_arr = NULL;
 	}
-    optstrlen += 1;
+	/* Calculate how much space we need for the option string */
+	optstrlen = 0;
+	for (i = 0; std_options[i].optstr; ++i)
+		optstrlen += strlen(std_options[i].optstr);
+	if (user_optarr)
+		for (i = 0; user_optarr[i].option; ++i) {
+			if (strlen(user_optarr[i].option) > 2)
+				return
+				    "parse_opts: ERROR - Only short options are allowed";
+			optstrlen += strlen(user_optarr[i].option);
+		}
+	optstrlen += 1;
 
-    /* Create the option string for getopt */
-    optionstr = malloc(optstrlen);
-    if (!optionstr)
-	return "parse_opts: ERROR - Could not allocate memory for optionstr";
+	/* Create the option string for getopt */
+	optionstr = malloc(optstrlen);
+	if (!optionstr)
+		return
+		    "parse_opts: ERROR - Could not allocate memory for optionstr";
 
-    optionstr[0] = '\0';
+	optionstr[0] = '\0';
 
-    for (i = 0; std_options[i].optstr; ++i)
-	strcat(optionstr, std_options[i].optstr);
-    if (user_optarr)
-	for (i = 0; user_optarr[i].option; ++i)
-	    /* only add the option if it wasn't there already */
-	    if (strchr(optionstr, user_optarr[i].option[0]) == NULL)
-		strcat(optionstr, user_optarr[i].option);
+	for (i = 0; std_options[i].optstr; ++i)
+		strcat(optionstr, std_options[i].optstr);
+	if (user_optarr)
+		for (i = 0; user_optarr[i].option; ++i)
+			/* only add the option if it wasn't there already */
+			if (strchr(optionstr, user_optarr[i].option[0]) == NULL)
+				strcat(optionstr, user_optarr[i].option);
 
 #if DEBUG > 1
-    printf("STD_nopts = %d\n", STD_nopts);
+	printf("STD_nopts = %d\n", STD_nopts);
 #endif
 
-    /*
-     *  Loop through av parsing options.
-     */
-    while ((opt = getopt(ac, av, optionstr)) > 0) {
+	/*
+	 *  Loop through av parsing options.
+	 */
+	while ((opt = getopt(ac, av, optionstr)) > 0) {
 
-	STD_argind = optind;
+		STD_argind = optind;
 #if DEBUG > 0
-	printf("parse_opts: getopt returned '%c'\n", opt);
+		printf("parse_opts: getopt returned '%c'\n", opt);
 #endif
 
-	switch (opt) {
-		case '?': /* Unknown option */
+		switch (opt) {
+		case '?':	/* Unknown option */
 			return "Unknown option";
 			break;
-		case ':': /* Missing Arg */
+		case ':':	/* Missing Arg */
 			return "Missing argument";
 			break;
-		case 'i': /* Iterations */
+		case 'i':	/* Iterations */
 			options |= OPT_iteration;
 			STD_LOOP_COUNT = atoi(optarg);
-			if (STD_LOOP_COUNT == 0) STD_INFINITE = 1;
+			if (STD_LOOP_COUNT == 0)
+				STD_INFINITE = 1;
 			break;
-		case 'P': /* Delay between iterations */
+		case 'P':	/* Delay between iterations */
 			options |= OPT_delay;
 			STD_LOOP_DELAY = atof(optarg);
 			break;
-		case 'I': /* Time duration */
+		case 'I':	/* Time duration */
 			options |= OPT_duration;
 			STD_LOOP_DURATION = atof(optarg);
-			if (STD_LOOP_DURATION == 0.0) STD_INFINITE=1;
+			if (STD_LOOP_DURATION == 0.0)
+				STD_INFINITE = 1;
 			break;
-		case 'c': /* Copies */
+		case 'c':	/* Copies */
 			fprintf(stderr,
-			        "WARNING * WARNING * WARNING * WARNING * "
-			        "WARNING * WARNING * WARNING * WARNING\n\n"
-			        "The -c option is broken by desing. See:\n\n"
-			        "http://www.mail-archive.com/"
-			        "ltp-list@lists.sourceforge.net/msg13418.html\n"
-			        "\nIn short don't use it in runtest files "
-			        "as the option will be removed.\n\n"
+				"WARNING * WARNING * WARNING * WARNING * "
+				"WARNING * WARNING * WARNING * WARNING\n\n"
+				"The -c option is broken by desing. See:\n\n"
+				"http://www.mail-archive.com/"
+				"ltp-list@lists.sourceforge.net/msg13418.html\n"
+				"\nIn short don't use it in runtest files "
+				"as the option will be removed.\n\n"
 				"WARNING * WARNING * WARNING * WARNING * "
 				"WARNING * WARNING * WARNING * WARNING\n\n");
 			options |= OPT_copies;
 			STD_COPIES = atoi(optarg);
 			break;
-		case 'f': /* Functional testing */
+		case 'f':	/* Functional testing */
 			STD_FUNCTIONAL_TEST = 0;
 			break;
-		case 'p': /* Pause for SIGUSR1 */
+		case 'p':	/* Pause for SIGUSR1 */
 			STD_PAUSE = 1;
 			break;
-		case 't': /* syscall timing */
+		case 't':	/* syscall timing */
 			STD_TIMING_ON = 1;
 			break;
-		case 'e': /* errno loggin */
+		case 'e':	/* errno loggin */
 			STD_ERRNO_LOG = 1;
 			break;
-		case 'h': /* Help */
+		case 'h':	/* Help */
 			print_help(uhf);
 			exit(0);
 			break;
 #ifdef UCLINUX
-		case 'C': /* Run child */
+		case 'C':	/* Run child */
 			child_args = optarg;
 			break;
 #endif
 		default:
 
-            /* Check all the user specified options */
-            found=0;
-	    for (i = 0; user_optarr[i].option; ++i) {
+			/* Check all the user specified options */
+			found = 0;
+			for (i = 0; user_optarr[i].option; ++i) {
 
-		if (opt == user_optarr[i].option[0]) {
-                    /* Yup, This is a user option, set the flag and look for argument */
-		    if (user_optarr[i].flag) {
-                        *user_optarr[i].flag=1;
-		    }
-                    found++;
+				if (opt == user_optarr[i].option[0]) {
+					/* Yup, This is a user option, set the flag and look for argument */
+					if (user_optarr[i].flag) {
+						*user_optarr[i].flag = 1;
+					}
+					found++;
 
-		    /* save the argument at the user's location */
-                    if (user_optarr[i].option[strlen(user_optarr[i].option)-1] == ':') {
-                        *user_optarr[i].arg = optarg;
-                    }
-                    break;  /* option found - break out of the for loop */
-                }
-            }
-	    /* This condition "should never happen".  SO CHECK FOR IT!!!! */
-            if (!found) {
-                sprintf(Mesg2,
-		    "parse_opts: ERROR - option:\"%c\" NOT FOUND... INTERNAL "
-		    "ERROR", opt);
-                return(Mesg2);
-            }
+					/* save the argument at the user's location */
+					if (user_optarr[i].
+					    option[strlen(user_optarr[i].option)
+						   - 1] == ':') {
+						*user_optarr[i].arg = optarg;
+					}
+					break;	/* option found - break out of the for loop */
+				}
+			}
+			/* This condition "should never happen".  SO CHECK FOR IT!!!! */
+			if (!found) {
+				sprintf(Mesg2,
+					"parse_opts: ERROR - option:\"%c\" NOT FOUND... INTERNAL "
+					"ERROR", opt);
+				return (Mesg2);
+			}
+		}
+
+	}			/* end of while */
+	free(optionstr);
+
+	STD_argind = optind;
+
+	/*
+	 * Turn on debug
+	 */
+	if ((ptr = getenv("USC_DEBUG")) != NULL) {
+		Debug = 1;
+		printf("env USC_DEBUG is defined, turning on debug\n");
+	}
+	if ((ptr = getenv("USC_VERBOSE")) != NULL) {
+		Debug = 1;
+		printf("env USC_VERBOSE is defined, turning on debug\n");
 	}
 
-    } /* end of while */
-    free(optionstr);
+	/*
+	 * If the USC_ITERATION_ENV environmental variable is set to
+	 * a number, use that number as iteration count (same as -c option).
+	 * The -c option with arg will be used even if this env var is set.
+	 */
+	if (!(options & OPT_iteration)
+	    && (ptr = getenv(USC_ITERATION_ENV)) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1) {
+			if (k == 0) {	/* if arg is 0, set infinite loop flag */
+				STD_INFINITE = 1;
+				if (Debug)
+					printf
+					    ("Using env %s, set STD_INFINITE to 1\n",
+					     USC_ITERATION_ENV);
+			} else {	/* else, set the loop count to the arguement */
+				STD_LOOP_COUNT = k;
+				if (Debug)
+					printf
+					    ("Using env %s, set STD_LOOP_COUNT to %d\n",
+					     USC_ITERATION_ENV, k);
+			}
+		}
+	}
 
-    STD_argind = optind;
-
-    /*
-     * Turn on debug
-     */
-    if ((ptr = getenv("USC_DEBUG")) != NULL) {
-	Debug = 1;
-        printf("env USC_DEBUG is defined, turning on debug\n");
-    }
-    if ((ptr = getenv("USC_VERBOSE")) != NULL) {
-	Debug = 1;
-        printf("env USC_VERBOSE is defined, turning on debug\n");
-    }
-
-    /*
-     * If the USC_ITERATION_ENV environmental variable is set to
-     * a number, use that number as iteration count (same as -c option).
-     * The -c option with arg will be used even if this env var is set.
-     */
-    if (!(options & OPT_iteration) && (ptr = getenv(USC_ITERATION_ENV)) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1) {
-            if (k == 0) {   /* if arg is 0, set infinite loop flag */
-                STD_INFINITE = 1;
+	/*
+	 * If the USC_NO_FUNC_CHECK environmental variable is set, we'll
+	 * unset the STD_FUNCTIONAL_TEST variable.
+	 */
+	if (!(options & OPT_nofunccheck) &&
+	    (ptr = getenv(USC_NO_FUNC_CHECK)) != NULL) {
+		STD_FUNCTIONAL_TEST = 0;	/* Turn off functional testing */
 		if (Debug)
-		   printf("Using env %s, set STD_INFINITE to 1\n",
-			USC_ITERATION_ENV);
-            } else {            /* else, set the loop count to the arguement */
-                STD_LOOP_COUNT=k;
+			printf("Using env %s, set STD_FUNCTIONAL_TEST to 0\n",
+			       USC_NO_FUNC_CHECK);
+	}
+
+	/*
+	 * If the USC_LOOP_WALLTIME environmental variable is set,
+	 * use that number as duration (same as -I option).
+	 * The -I option with arg will be used even if this env var is set.
+	 */
+
+	if (!(options & OPT_duration) &&
+	    (ptr = getenv(USC_LOOP_WALLTIME)) != NULL) {
+		if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
+			STD_LOOP_DURATION = ftmp;
+			if (Debug)
+				printf
+				    ("Using env %s, set STD_LOOP_DURATION to %f\n",
+				     USC_LOOP_WALLTIME, ftmp);
+			if (STD_LOOP_DURATION == 0.0) {	/* if arg is 0, set infinite loop flag */
+				STD_INFINITE = 1;
+				if (Debug)
+					printf
+					    ("Using env %s, set STD_INFINITE to 1\n",
+					     USC_LOOP_WALLTIME);
+			}
+		}
+	}
+	if (!(options & OPT_duration) && (ptr = getenv("USC_DURATION")) != NULL) {
+		if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
+			STD_LOOP_DURATION = ftmp;
+			if (Debug)
+				printf
+				    ("Using env USC_DURATION, set STD_LOOP_DURATION to %f\n",
+				     ftmp);
+			if (STD_LOOP_DURATION == 0.0) {	/* if arg is 0, set infinite loop flag */
+				STD_INFINITE = 1;
+				if (Debug)
+					printf
+					    ("Using env USC_DURATION, set STD_INFINITE to 1\n");
+			}
+		}
+	}
+	/*
+	 * If the USC_LOOP_DELAY environmental variable is set,
+	 * use that number as delay in factional seconds (same as -P option).
+	 * The -P option with arg will be used even if this env var is set.
+	 */
+	if (!(options & OPT_delay) && (ptr = getenv(USC_LOOP_DELAY)) != NULL) {
+		if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
+			STD_LOOP_DELAY = ftmp;
+			if (Debug)
+				printf
+				    ("Using env %s, set STD_LOOP_DELAY = %f\n",
+				     USC_LOOP_DELAY, ftmp);
+		}
+	}
+
+	/*
+	 * If the USC_COPIES environmental variable is set,
+	 * use that number as copies (same as -c option).
+	 * The -c option with arg will be used even if this env var is set.
+	 */
+	if (!(options & OPT_copies) && (ptr = getenv(USC_COPIES)) != NULL) {
+		if (sscanf(ptr, "%d", &STD_COPIES) == 1 && STD_COPIES >= 0) {
+			if (Debug)
+				printf("Using env %s, set STD_COPIES = %d\n",
+				       USC_COPIES, STD_COPIES);
+		}
+	}
+
+	/*
+	 * The following are special system testing envs to turn on special
+	 * hooks in the code.
+	 */
+	if ((ptr = getenv("USC_TP_BARRIER")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0)
+			STD_TP_barrier = k;
+		else
+			STD_TP_barrier = 1;
 		if (Debug)
-		   printf("Using env %s, set STD_LOOP_COUNT to %d\n",
-			USC_ITERATION_ENV, k);
-            }
-        }
-    }
+			printf
+			    ("using env USC_TP_BARRIER, Set STD_TP_barrier to %d\n",
+			     STD_TP_barrier);
+	}
 
-    /*
-     * If the USC_NO_FUNC_CHECK environmental variable is set, we'll
-     * unset the STD_FUNCTIONAL_TEST variable.
-     */
-    if (!(options & OPT_nofunccheck) &&
-        (ptr = getenv(USC_NO_FUNC_CHECK)) != NULL) {
-        STD_FUNCTIONAL_TEST=0; /* Turn off functional testing */
-	if (Debug)
-	    printf("Using env %s, set STD_FUNCTIONAL_TEST to 0\n",
-		USC_NO_FUNC_CHECK);
-    }
+	if ((ptr = getenv("USC_LP_BARRIER")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0)
+			STD_LP_barrier = k;
+		else
+			STD_LP_barrier = 1;
+		if (Debug)
+			printf
+			    ("using env USC_LP_BARRIER, Set STD_LP_barrier to %d\n",
+			     STD_LP_barrier);
+	}
 
-    /*
-     * If the USC_LOOP_WALLTIME environmental variable is set,
-     * use that number as duration (same as -I option).
-     * The -I option with arg will be used even if this env var is set.
-     */
+	if ((ptr = getenv("USC_TP_SHMEM")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_TP_shmem_sz = k;
+			if (Debug)
+				printf
+				    ("Using env USC_TP_SHMEM, Set STD_TP_shmem_sz to %d\n",
+				     STD_TP_shmem_sz);
+		}
+	}
 
-    if (!(options & OPT_duration) &&
-        (ptr = getenv(USC_LOOP_WALLTIME)) != NULL) {
-        if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
-	    STD_LOOP_DURATION = ftmp;
-	    if (Debug)
-	        printf("Using env %s, set STD_LOOP_DURATION to %f\n",
-		    USC_LOOP_WALLTIME, ftmp);
-            if (STD_LOOP_DURATION == 0.0) {   /* if arg is 0, set infinite loop flag */
-                STD_INFINITE = 1;
-	        if (Debug)
-	            printf("Using env %s, set STD_INFINITE to 1\n", USC_LOOP_WALLTIME);
-	    }
-        }
-    }
-    if (!(options & OPT_duration) && (ptr = getenv("USC_DURATION")) != NULL) {
-        if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
-	    STD_LOOP_DURATION = ftmp;
-	    if (Debug)
-	        printf("Using env USC_DURATION, set STD_LOOP_DURATION to %f\n", ftmp);
-            if (STD_LOOP_DURATION == 0.0) {   /* if arg is 0, set infinite loop flag */
-                STD_INFINITE = 1;
-	        if (Debug)
-	            printf("Using env USC_DURATION, set STD_INFINITE to 1\n");
-	    }
-        }
-    }
-    /*
-     * If the USC_LOOP_DELAY environmental variable is set,
-     * use that number as delay in factional seconds (same as -P option).
-     * The -P option with arg will be used even if this env var is set.
-     */
-    if (!(options & OPT_delay) && (ptr = getenv(USC_LOOP_DELAY)) != NULL) {
-        if (sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0) {
-	    STD_LOOP_DELAY = ftmp;
-	    if (Debug)
-		printf("Using env %s, set STD_LOOP_DELAY = %f\n",
-		    USC_LOOP_DELAY, ftmp);
-        }
-    }
+	if ((ptr = getenv("USC_LP_SHMEM")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_LP_shmem = k;
+			if (Debug)
+				printf
+				    ("Using env USC_LP_SHMEM, Set STD_LP_shmem to %d\n",
+				     STD_LP_shmem);
+		}
+	}
 
-    /*
-     * If the USC_COPIES environmental variable is set,
-     * use that number as copies (same as -c option).
-     * The -c option with arg will be used even if this env var is set.
-     */
-    if (!(options & OPT_copies) && (ptr = getenv(USC_COPIES)) != NULL) {
-        if (sscanf(ptr, "%d", &STD_COPIES) == 1 && STD_COPIES >= 0) {
-	    if (Debug)
-		printf("Using env %s, set STD_COPIES = %d\n",
-		    USC_COPIES, STD_COPIES);
-        }
-    }
+	if ((ptr = getenv("USC_LD_SHMEM")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_LD_shmem = k;
+			if (Debug)
+				printf
+				    ("Using env USC_LD_SHMEM, Set STD_LD_shmem to %d\n",
+				     STD_LD_shmem);
+		}
+	}
 
-    /*
-     * The following are special system testing envs to turn on special
-     * hooks in the code.
-     */
-    if ((ptr = getenv("USC_TP_BARRIER")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0)
-	    STD_TP_barrier=k;
-	else
-	    STD_TP_barrier=1;
-	if (Debug)
-	    printf("using env USC_TP_BARRIER, Set STD_TP_barrier to %d\n",
-	        STD_TP_barrier);
-    }
-
-    if ((ptr = getenv("USC_LP_BARRIER")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0)
-	    STD_LP_barrier=k;
-	else
-	    STD_LP_barrier=1;
-	if (Debug)
-	    printf("using env USC_LP_BARRIER, Set STD_LP_barrier to %d\n",
-	        STD_LP_barrier);
-    }
-
-    if ((ptr = getenv("USC_TP_SHMEM")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-            STD_TP_shmem_sz=k;
-	    if (Debug)
-	        printf("Using env USC_TP_SHMEM, Set STD_TP_shmem_sz to %d\n",
-		    STD_TP_shmem_sz);
-        }
-    }
-
-    if ((ptr = getenv("USC_LP_SHMEM")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-            STD_LP_shmem=k;
-	    if (Debug)
-	        printf("Using env USC_LP_SHMEM, Set STD_LP_shmem to %d\n",
-		    STD_LP_shmem);
-        }
-    }
-
-    if ((ptr = getenv("USC_LD_SHMEM")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-            STD_LD_shmem=k;
-	    if (Debug)
-	        printf("Using env USC_LD_SHMEM, Set STD_LD_shmem to %d\n",
-		    STD_LD_shmem);
-        }
-    }
-
-    if ((ptr = getenv("USC_TP_SBRK")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-            STD_TP_sbrk=k;
-	    if (Debug)
-	        printf("Using env USC_TP_SBRK, Set STD_TP_sbrk to %d\n",
-		    STD_TP_sbrk);
-        }
-    }
-
+	if ((ptr = getenv("USC_TP_SBRK")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_TP_sbrk = k;
+			if (Debug)
+				printf
+				    ("Using env USC_TP_SBRK, Set STD_TP_sbrk to %d\n",
+				     STD_TP_sbrk);
+		}
+	}
 #if !defined(UCLINUX)
-    if ((ptr = getenv("USC_LP_SBRK")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-            STD_LP_sbrk=k;
-	    if (Debug)
-	        printf("Using env USC_LP_SBRK, Set STD_LP_sbrk to %d\n",
-		    STD_LP_sbrk);
-        }
-    }
+	if ((ptr = getenv("USC_LP_SBRK")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_LP_sbrk = k;
+			if (Debug)
+				printf
+				    ("Using env USC_LP_SBRK, Set STD_LP_sbrk to %d\n",
+				     STD_LP_sbrk);
+		}
+	}
 #endif /* if !defined(UCLINUX) */
 
-    if ((ptr = getenv("USC_LP_RECFUN")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-	    STD_LP_recfun = k;
-	    if (STD_bigstack != NULL)
-		STD_bigstack = malloc(sizeof(struct usc_bigstack_t));
-	    if (Debug)
-                printf("Using env USC_LP_RECFUN, Set STD_LP_recfun to %d\n",
-		    STD_LP_recfun);
-        }
-    }
+	if ((ptr = getenv("USC_LP_RECFUN")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_LP_recfun = k;
+			if (STD_bigstack != NULL)
+				STD_bigstack =
+				    malloc(sizeof(struct usc_bigstack_t));
+			if (Debug)
+				printf
+				    ("Using env USC_LP_RECFUN, Set STD_LP_recfun to %d\n",
+				     STD_LP_recfun);
+		}
+	}
 
-    if ((ptr = getenv("USC_LD_RECFUN")) != NULL) {
-        if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
-	    STD_LD_recfun = k;
-	    if (STD_bigstack != NULL)
-		STD_bigstack = malloc(sizeof(struct usc_bigstack_t));
-	    if (Debug)
-                printf("Using env USC_LD_RECFUN, Set STD_LD_recfun to %d\n",
-		    STD_LD_recfun);
-        }
-    }
-
+	if ((ptr = getenv("USC_LD_RECFUN")) != NULL) {
+		if (sscanf(ptr, "%i", &k) == 1 && k >= 0) {
+			STD_LD_recfun = k;
+			if (STD_bigstack != NULL)
+				STD_bigstack =
+				    malloc(sizeof(struct usc_bigstack_t));
+			if (Debug)
+				printf
+				    ("Using env USC_LD_RECFUN, Set STD_LD_recfun to %d\n",
+				     STD_LD_recfun);
+		}
+	}
 #if UNIT_TEST
-    printf("The following variables after option and env parsing:\n");
-    printf("STD_FUNCTIONAL_TEST = %d\n", STD_FUNCTIONAL_TEST);
-    printf("STD_LOOP_DURATION   = %f\n", STD_LOOP_DURATION);
-    printf("STD_LOOP_DELAY      = %f\n", STD_LOOP_DELAY);
-    printf("STD_COPIES          = %d\n", STD_COPIES);
-    printf("STD_LOOP_COUNT      = %d\n", STD_LOOP_COUNT);
-    printf("STD_INFINITE        = %d\n", STD_INFINITE);
-    printf("STD_TIMING_ON       = %d\n", STD_TIMING_ON);
-    printf("STD_ERRNO_LOG       = %d\n", STD_ERRNO_LOG);
-    printf("STD_PAUSE           = %d\n", STD_PAUSE);
+	printf("The following variables after option and env parsing:\n");
+	printf("STD_FUNCTIONAL_TEST = %d\n", STD_FUNCTIONAL_TEST);
+	printf("STD_LOOP_DURATION   = %f\n", STD_LOOP_DURATION);
+	printf("STD_LOOP_DELAY      = %f\n", STD_LOOP_DELAY);
+	printf("STD_COPIES          = %d\n", STD_COPIES);
+	printf("STD_LOOP_COUNT      = %d\n", STD_LOOP_COUNT);
+	printf("STD_INFINITE        = %d\n", STD_INFINITE);
+	printf("STD_TIMING_ON       = %d\n", STD_TIMING_ON);
+	printf("STD_ERRNO_LOG       = %d\n", STD_ERRNO_LOG);
+	printf("STD_PAUSE           = %d\n", STD_PAUSE);
 #endif
 
-    return((char *) NULL);
+	return ((char *)NULL);
 
-}    /* end of parse_opts */
+}				/* end of parse_opts */
 
 /*********************************************************************
  * print_help() - print help message and user help message
  *********************************************************************/
-void print_help(void (*user_help)())
+void print_help(void (*user_help) ())
 {
-    STD_opts_help();
+	STD_opts_help();
 
-    if (user_help)
-        user_help();
+	if (user_help)
+		user_help();
 }
 
 /*********************************************************************
@@ -592,12 +621,12 @@
  *********************************************************************/
 void STD_opts_help()
 {
-    int i;
+	int i;
 
-    for (i = 0; std_options[i].optstr; ++i) {
-	if (std_options[i].help)
-	    printf("%s", std_options[i].help);
-    }
+	for (i = 0; std_options[i].optstr; ++i) {
+		if (std_options[i].help)
+			printf("%s", std_options[i].help);
+	}
 }
 
 /*
@@ -605,7 +634,7 @@
  */
 void STD_go(int sig)
 {
-   return;
+	return;
 }
 
 /***********************************************************************
@@ -618,66 +647,64 @@
 int usc_global_setup_hook()
 {
 #ifndef UCLINUX
-    int cnt;
-    /* temp variable to store old signal action to be restored after pause */
-    int (*_TMP_FUNC)(void);
+	int cnt;
+	/* temp variable to store old signal action to be restored after pause */
+	int (*_TMP_FUNC) (void);
 
-    /*
-     * Fork STD_COPIES-1 copies.
-     */
-    for (cnt=1;cnt<STD_COPIES;cnt++) {
-        switch (fork() ) {
-	    case -1:
-		fprintf(stderr, "%s: fork failed: %d - %s\n",
-                    __FILE__, errno, strerror(errno));
-		break;
-	    case 0:  /* child */
-	        cnt=STD_COPIES;   /* to stop the forking */
-		break;
+	/*
+	 * Fork STD_COPIES-1 copies.
+	 */
+	for (cnt = 1; cnt < STD_COPIES; cnt++) {
+		switch (fork()) {
+		case -1:
+			fprintf(stderr, "%s: fork failed: %d - %s\n",
+				__FILE__, errno, strerror(errno));
+			break;
+		case 0:	/* child */
+			cnt = STD_COPIES;	/* to stop the forking */
+			break;
 
-	    default: /* parent */
-		break;
+		default:	/* parent */
+			break;
+		}
 	}
-    }
 
-    /*
-     * pause waiting for sigusr1.
-     */
-    if (STD_PAUSE) {
-        _TMP_FUNC = (int (*)())signal(SIGUSR1, STD_go);
-        pause();
-        signal(SIGUSR1, (void (*)())_TMP_FUNC);
-    }
-
+	/*
+	 * pause waiting for sigusr1.
+	 */
+	if (STD_PAUSE) {
+		_TMP_FUNC = (int (*)())signal(SIGUSR1, STD_go);
+		pause();
+		signal(SIGUSR1, (void (*)())_TMP_FUNC);
+	}
 #if !defined(UCLINUX)
 
-    if (STD_TP_sbrk || STD_LP_sbrk) {
-	STD_start_break=sbrk(0);	/* get original sbreak size */
-    }
+	if (STD_TP_sbrk || STD_LP_sbrk) {
+		STD_start_break = sbrk(0);	/* get original sbreak size */
+	}
 
-    if (STD_TP_sbrk) {
-	sbrk(STD_TP_sbrk);
-	if (Debug)
-	    printf("after sbrk(%d)\n", STD_TP_sbrk);
-    }
-
+	if (STD_TP_sbrk) {
+		sbrk(STD_TP_sbrk);
+		if (Debug)
+			printf("after sbrk(%d)\n", STD_TP_sbrk);
+	}
 #endif /* if !defined(UCLINUX) */
 #endif
-    return 0;
+	return 0;
 }
 
-#define USECS_PER_SEC	1000000  /* microseconds per second */
+#define USECS_PER_SEC	1000000	/* microseconds per second */
 
 /***********************************************************************
  * Returns current time in microseconds since 1970.
  ***********************************************************************/
 static uint64_t get_current_time(void)
 {
-    struct timeval curtime;
+	struct timeval curtime;
 
-    gettimeofday(&curtime, NULL);
+	gettimeofday(&curtime, NULL);
 
-    return (((uint64_t)curtime.tv_sec)*USECS_PER_SEC) + curtime.tv_usec;
+	return (((uint64_t) curtime.tv_sec) * USECS_PER_SEC) + curtime.tv_usec;
 }
 
 /***********************************************************************
@@ -695,107 +722,108 @@
  ***********************************************************************/
 int usc_test_looping(int counter)
 {
-    static int first_time = 1;
-    static uint64_t stop_time = 0;
-    static uint64_t delay;
-    uint64_t ct, end;
-    int keepgoing = 0;
-
-    /*
-     * If this is the first iteration and we are looping for
-     * duration of STD_LOOP_DURATION seconds (fractional) or
-     * doing loop delays, get the clocks per second.
-     */
-    if (first_time) {
-	first_time = 0;
+	static int first_time = 1;
+	static uint64_t stop_time = 0;
+	static uint64_t delay;
+	uint64_t ct, end;
+	int keepgoing = 0;
 
 	/*
-	 * If looping for duration, calculate stop time in
-	 * clocks.
+	 * If this is the first iteration and we are looping for
+	 * duration of STD_LOOP_DURATION seconds (fractional) or
+	 * doing loop delays, get the clocks per second.
 	 */
-	if (STD_LOOP_DURATION) {
-	    stop_time = (uint64_t)(USECS_PER_SEC * STD_LOOP_DURATION)
-	                + get_current_time();
+	if (first_time) {
+		first_time = 0;
+
+		/*
+		 * If looping for duration, calculate stop time in
+		 * clocks.
+		 */
+		if (STD_LOOP_DURATION) {
+			stop_time =
+			    (uint64_t) (USECS_PER_SEC * STD_LOOP_DURATION)
+			    + get_current_time();
+		}
+
+		/*
+		 * If doing delay each iteration, calcuate the number
+		 * of clocks for each delay.
+		 */
+		if (STD_LOOP_DELAY)
+			delay = USECS_PER_SEC * STD_LOOP_DELAY;
 	}
 
 	/*
-	 * If doing delay each iteration, calcuate the number
-	 * of clocks for each delay.
+	 * if delay each iteration, loop for delay clocks.
+	 * This will not be done on first iteration.
+	 * The delay will happen before determining if
+	 * there will be another iteration.
 	 */
-	if (STD_LOOP_DELAY)
-	    delay = USECS_PER_SEC * STD_LOOP_DELAY;
-    }
+	else if (STD_LOOP_DELAY) {
+		ct = get_current_time();
+		end = ct + delay;
+		while (ct < end) {
+			/*
+			 * The following are special test hooks in the delay loop.
+			 */
+			if (STD_LD_recfun) {
+				if (Debug)
+					printf
+					    ("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
+					     STD_LD_recfun);
+				usc_recressive_func(0, STD_LD_recfun,
+						    *STD_bigstack);
+			}
 
-    /*
-     * if delay each iteration, loop for delay clocks.
-     * This will not be done on first iteration.
-     * The delay will happen before determining if
-     * there will be another iteration.
-     */
-    else if (STD_LOOP_DELAY) {
-	ct = get_current_time();
-        end = ct + delay;
-        while (ct < end) {
-	    /*
-	     * The following are special test hooks in the delay loop.
-	     */
-	    if (STD_LD_recfun) {
+			ct = get_current_time();
+		}
+	}
+
+	if (STD_INFINITE)
+		keepgoing++;
+
+	if (STD_LOOP_COUNT && counter < STD_LOOP_COUNT)
+		keepgoing++;
+
+	if (STD_LOOP_DURATION != 0.0 && get_current_time() < stop_time)
+		keepgoing++;
+
+	if (keepgoing == 0)
+		return 0;
+
+	/*
+	 * The following code allows special system testing hooks.
+	 */
+
+	if (STD_LP_recfun) {
 		if (Debug)
-		    printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
-		        STD_LD_recfun);
-		usc_recressive_func(0, STD_LD_recfun, *STD_bigstack);
-	    }
-
-	    ct=get_current_time();
+			printf
+			    ("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
+			     STD_LP_recfun);
+		usc_recressive_func(0, STD_LP_recfun, *STD_bigstack);
 	}
-    }
-
-    if (STD_INFINITE)
-	keepgoing++;
-
-    if (STD_LOOP_COUNT && counter < STD_LOOP_COUNT)
-	keepgoing++;
-
-    if (STD_LOOP_DURATION != 0.0 && get_current_time() < stop_time)
-	keepgoing++;
-
-    if (keepgoing == 0)
-	return 0;
-
-    /*
-     * The following code allows special system testing hooks.
-     */
-
-    if (STD_LP_recfun) {
-	if (Debug)
-	    printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
-	        STD_LP_recfun);
-	usc_recressive_func(0, STD_LP_recfun, *STD_bigstack);
-    }
-
 #if !defined(UCLINUX)
-    if (STD_LP_sbrk) {
-	if (Debug)
-	    printf("about to do sbrk(%d)\n", STD_LP_sbrk);
-	sbrk(STD_LP_sbrk);
-    }
+	if (STD_LP_sbrk) {
+		if (Debug)
+			printf("about to do sbrk(%d)\n", STD_LP_sbrk);
+		sbrk(STD_LP_sbrk);
+	}
 #endif
 
-
-    if (keepgoing)
-	return 1;
-    else
-        return 0;	/* done - stop iterating */
+	if (keepgoing)
+		return 1;
+	else
+		return 0;	/* done - stop iterating */
 }
 
-
 /*
  * This function recressively calls itself max times.
  */
 static void usc_recressive_func(int cnt, int max, struct usc_bigstack_t bstack)
 {
-    if (cnt < max)
-	usc_recressive_func(cnt+1, max, bstack);
+	if (cnt < max)
+		usc_recressive_func(cnt + 1, max, bstack);
 
 }
 
@@ -823,42 +851,41 @@
 
 /* for test specific parse_opts options */
 option_t Options[] = {
-        { "help",  &Help2, NULL },      /* -help option */
-        { "h",  &Help, NULL },          /* -h option */
+	{"help", &Help2, NULL},	/* -help option */
+	{"h", &Help, NULL},	/* -h option */
 
 #if INVALID_TEST_CASES
- 	{ "missingflag", NULL, &ptr },  /* error */
- 	{ "missingarg:", &Help, NULL }, /* error */
-#endif	/* INVALID_TEST_CASES */
+	{"missingflag", NULL, &ptr},	/* error */
+	{"missingarg:", &Help, NULL},	/* error */
+#endif /* INVALID_TEST_CASES */
 
-        { NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char **argv)
 {
-    int lc;
-    char *msg;
-    struct timeval t;
-    int cnt;
+	int lc;
+	char *msg;
+	struct timeval t;
+	int cnt;
 
-    if ((msg = parse_opts(argc, argv, Options, NULL)) != NULL) {
-	printf("ERROR: %s\n", msg);
-	exit(1);
-    }
+	if ((msg = parse_opts(argc, argv, Options, NULL)) != NULL) {
+		printf("ERROR: %s\n", msg);
+		exit(1);
+	}
 
-    TEST_PAUSE;
+	TEST_PAUSE;
 
-    for (lc = 0; TEST_LOOPING(lc); lc++) {
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
-        TEST(gettimeofday(&t, NULL));
-        printf("iter=%d: sec:%d, usec:%6.6d %s", lc+1, t.tv_sec,
-	    t.tv_usec, ctime(&t.tv_sec));
-    }
+		TEST(gettimeofday(&t, NULL));
+		printf("iter=%d: sec:%d, usec:%6.6d %s", lc + 1, t.tv_sec,
+		       t.tv_usec, ctime(&t.tv_sec));
+	}
 
+	TEST_CLEANUP;
 
-    TEST_CLEANUP;
-
-    exit(0);
+	exit(0);
 }
 
 #endif /* UNIT_TEST */
diff --git a/lib/pattern.c b/lib/pattern.c
index c507cbb..5863965 100644
--- a/lib/pattern.c
+++ b/lib/pattern.c
@@ -37,132 +37,130 @@
  * with/against a known pattern.
  */
 
-int
-pattern_check(buf, buflen, pat, patlen, patshift)
-char	*buf;
-int	buflen;
-char	*pat;
-int	patlen;
-int	patshift;
+int pattern_check(buf, buflen, pat, patlen, patshift)
+char *buf;
+int buflen;
+char *pat;
+int patlen;
+int patshift;
 {
-    int		nb, ncmp, nleft;
-    char	*cp;
+	int nb, ncmp, nleft;
+	char *cp;
 
-    if (patlen)
-	patshift = patshift % patlen;
+	if (patlen)
+		patshift = patshift % patlen;
 
-    cp = buf;
-    nleft = buflen;
+	cp = buf;
+	nleft = buflen;
 
-    /*
-     * The following 2 blocks of code are to compare the first patlen
-     * bytes of buf.  We need 2 checks if patshift is > 0 since we
-     * must check the last (patlen - patshift) bytes, and then the
-     * first (patshift) bytes.
-     */
+	/*
+	 * The following 2 blocks of code are to compare the first patlen
+	 * bytes of buf.  We need 2 checks if patshift is > 0 since we
+	 * must check the last (patlen - patshift) bytes, and then the
+	 * first (patshift) bytes.
+	 */
 
-    nb = patlen - patshift;
-    if (nleft < nb) {
-	return (memcmp(cp, pat + patshift, nleft) ? -1 : 0);
-    } else {
-        if (memcmp(cp, pat + patshift, nb))
-	    return -1;
-
-	nleft -= nb;
-	cp += nb;
-    }
-
-    if (patshift > 0) {
-	nb = patshift;
+	nb = patlen - patshift;
 	if (nleft < nb) {
-	    return (memcmp(cp, pat, nleft) ? -1 : 0);
+		return (memcmp(cp, pat + patshift, nleft) ? -1 : 0);
 	} else {
-	    if (memcmp(cp, pat, nb))
-		return -1;
+		if (memcmp(cp, pat + patshift, nb))
+			return -1;
 
-	    nleft -= nb;
-	    cp += nb;
+		nleft -= nb;
+		cp += nb;
 	}
-    }
 
-    /*
-     * Now, verify the rest of the buffer using the algorithm described
-     * in the function header.
-     */
+	if (patshift > 0) {
+		nb = patshift;
+		if (nleft < nb) {
+			return (memcmp(cp, pat, nleft) ? -1 : 0);
+		} else {
+			if (memcmp(cp, pat, nb))
+				return -1;
 
-    ncmp = cp - buf;
-    while (ncmp < buflen) {
-	nb = (ncmp < nleft) ? ncmp : nleft;
-	if (memcmp(buf, cp, nb))
-	    return -1;
+			nleft -= nb;
+			cp += nb;
+		}
+	}
 
-	cp += nb;
-	ncmp += nb;
-	nleft -= nb;
-    }
+	/*
+	 * Now, verify the rest of the buffer using the algorithm described
+	 * in the function header.
+	 */
 
-    return 0;
+	ncmp = cp - buf;
+	while (ncmp < buflen) {
+		nb = (ncmp < nleft) ? ncmp : nleft;
+		if (memcmp(buf, cp, nb))
+			return -1;
+
+		cp += nb;
+		ncmp += nb;
+		nleft -= nb;
+	}
+
+	return 0;
 }
 
-int
-pattern_fill(buf, buflen, pat, patlen, patshift)
-char	*buf;
-int	buflen;
-char	*pat;
-int	patlen;
-int	patshift;
+int pattern_fill(buf, buflen, pat, patlen, patshift)
+char *buf;
+int buflen;
+char *pat;
+int patlen;
+int patshift;
 {
-    int		trans, ncopied, nleft;
-    char	*cp;
+	int trans, ncopied, nleft;
+	char *cp;
 
-    if (patlen)
-	patshift = patshift % patlen;
+	if (patlen)
+		patshift = patshift % patlen;
 
-    cp = buf;
-    nleft = buflen;
+	cp = buf;
+	nleft = buflen;
 
-    /*
-     * The following 2 blocks of code are to fill the first patlen
-     * bytes of buf.  We need 2 sections if patshift is > 0 since we
-     * must first copy the last (patlen - patshift) bytes into buf[0]...,
-     * and then the first (patshift) bytes of pattern following them.
-     */
+	/*
+	 * The following 2 blocks of code are to fill the first patlen
+	 * bytes of buf.  We need 2 sections if patshift is > 0 since we
+	 * must first copy the last (patlen - patshift) bytes into buf[0]...,
+	 * and then the first (patshift) bytes of pattern following them.
+	 */
 
-    trans = patlen - patshift;
-    if (nleft < trans) {
-	memcpy(cp, pat + patshift, nleft);
-	return 0;
-    } else {
-	memcpy(cp, pat + patshift, trans);
-	nleft -= trans;
-	cp += trans;
-    }
-
-    if (patshift > 0) {
-        trans = patshift;
+	trans = patlen - patshift;
 	if (nleft < trans) {
-	    memcpy(cp, pat, nleft);
-	    return 0;
+		memcpy(cp, pat + patshift, nleft);
+		return 0;
 	} else {
-	    memcpy(cp, pat, trans);
-	    nleft -= trans;
-	    cp += trans;
+		memcpy(cp, pat + patshift, trans);
+		nleft -= trans;
+		cp += trans;
 	}
-    }
 
-    /*
-     * Now, fill the rest of the buffer using the algorithm described
-     * in the function header comment.
-     */
+	if (patshift > 0) {
+		trans = patshift;
+		if (nleft < trans) {
+			memcpy(cp, pat, nleft);
+			return 0;
+		} else {
+			memcpy(cp, pat, trans);
+			nleft -= trans;
+			cp += trans;
+		}
+	}
 
-    ncopied = cp - buf;
-    while (ncopied < buflen) {
-	trans = (ncopied < nleft) ? ncopied : nleft;
-	memcpy(cp, buf, trans);
-	cp += trans;
-	ncopied += trans;
-	nleft -= trans;
-    }
+	/*
+	 * Now, fill the rest of the buffer using the algorithm described
+	 * in the function header comment.
+	 */
 
-    return(0);
+	ncopied = cp - buf;
+	while (ncopied < buflen) {
+		trans = (ncopied < nleft) ? ncopied : nleft;
+		memcpy(cp, buf, trans);
+		cp += trans;
+		ncopied += trans;
+		nleft -= trans;
+	}
+
+	return (0);
 }
diff --git a/lib/random_range.c b/lib/random_range.c
index 3376e6a..cd2096c 100644
--- a/lib/random_range.c
+++ b/lib/random_range.c
@@ -40,9 +40,9 @@
  */
 
 struct range {
-	int	min;
-	int	max;
-	int	mult;
+	int min;
+	int max;
+	int mult;
 };
 
 /*
@@ -95,23 +95,22 @@
  * parse_range() returns -1 on error, or the number of ranges parsed.
  */
 
-static int       str_to_int();
+static int str_to_int();
 static long long divider(long long, long long, long long, long long);
 
-int
-parse_ranges(str, defmin, defmax, defmult, parse_func, rangeptr, errptr)
-char	*str;
-int	defmin;
-int	defmax;
-int	defmult;
-int	(*parse_func)();
-char	**rangeptr;
-char	**errptr;
+int parse_ranges(str, defmin, defmax, defmult, parse_func, rangeptr, errptr)
+char *str;
+int defmin;
+int defmax;
+int defmult;
+int (*parse_func) ();
+char **rangeptr;
+char **errptr;
 {
-	int		ncommas;
-	char		*tmpstr, *cp, *tok, *n1str, *n2str, *multstr;
-	struct range	*rp, *ranges;
-	static char	errmsg[256];
+	int ncommas;
+	char *tmpstr, *cp, *tok, *n1str, *n2str, *multstr;
+	struct range *rp, *ranges;
+	static char errmsg[256];
 
 	if (errptr != NULL) {
 		*errptr = errmsg;
@@ -128,7 +127,7 @@
 	}
 
 	tmpstr = strdup(str);
-	ranges = (struct range *)malloc((ncommas+1) * sizeof(struct range));
+	ranges = (struct range *)malloc((ncommas + 1) * sizeof(struct range));
 	rp = ranges;
 
 	tok = strtok(tmpstr, ",");
@@ -143,11 +142,11 @@
 
 		if ((cp = strchr(n1str, ':')) != NULL) {
 			*cp = '\0';
-			n2str = cp+1;
+			n2str = cp + 1;
 
 			if ((cp = strchr(n2str, ':')) != NULL) {
 				*cp = '\0';
-				multstr = cp+1;
+				multstr = cp + 1;
 			}
 		}
 
@@ -158,8 +157,10 @@
 		 */
 
 		if ((int)strlen(n1str) > 0) {
-			if ((*parse_func)(n1str, &rp->min) < 0) {
-				sprintf(errmsg, "error parsing string %s into an integer", n1str);
+			if ((*parse_func) (n1str, &rp->min) < 0) {
+				sprintf(errmsg,
+					"error parsing string %s into an integer",
+					n1str);
 				free(tmpstr);
 				free(ranges);
 				return -1;
@@ -176,8 +177,10 @@
 		if (n2str == NULL) {
 			rp->max = rp->min;
 		} else if ((int)strlen(n2str) > 0) {
-			if ((*parse_func)(n2str, &rp->max) < 0) {
-				sprintf(errmsg, "error parsing string %s into an integer", n2str);
+			if ((*parse_func) (n2str, &rp->max) < 0) {
+				sprintf(errmsg,
+					"error parsing string %s into an integer",
+					n2str);
 				free(tmpstr);
 				free(ranges);
 				return -1;
@@ -192,8 +195,10 @@
 		 */
 
 		if (multstr != NULL && (int)strlen(multstr) > 0) {
-			if ((*parse_func)(multstr, &rp->mult) < 0) {
-				sprintf(errmsg, "error parsing string %s into an integer", multstr);
+			if ((*parse_func) (multstr, &rp->mult) < 0) {
+				sprintf(errmsg,
+					"error parsing string %s into an integer",
+					multstr);
 				free(tmpstr);
 				free(ranges);
 				return -1;
@@ -209,7 +214,7 @@
 	if (rangeptr != NULL) {
 		*rangeptr = (char *)ranges;
 	} else {
-		free(ranges);		/* just running in parse mode */
+		free(ranges);	/* just running in parse mode */
 	}
 
 	return (rp - ranges);
@@ -219,12 +224,11 @@
  * The default integer-parsing function
  */
 
-static int
-str_to_int(str, ip)
-char	*str;
-int	*ip;
+static int str_to_int(str, ip)
+char *str;
+int *ip;
 {
-	char	c;
+	char c;
 
 	if (sscanf(str, "%i%c", ip, &c) != 1) {
 		return -1;
@@ -239,26 +243,23 @@
  * and that r is a valid range within that buffer.
  */
 
-int
-range_min(rbuf, r)
-char	*rbuf;
-int	r;
+int range_min(rbuf, r)
+char *rbuf;
+int r;
 {
 	return ((struct range *)rbuf)[r].min;
 }
 
-int
-range_max(rbuf, r)
-char	*rbuf;
-int	r;
+int range_max(rbuf, r)
+char *rbuf;
+int r;
 {
 	return ((struct range *)rbuf)[r].max;
 }
 
-int
-range_mult(rbuf, r)
-char	*rbuf;
-int	r;
+int range_mult(rbuf, r)
+char *rbuf;
+int r;
 {
 	return ((struct range *)rbuf)[r].mult;
 }
@@ -288,16 +289,15 @@
  *          setting the seed.
  *****************************************************************************/
 
-long
-random_range(min, max, mult, errp)
-int	min;
-int	max;
-int	mult;
-char	**errp;
+long random_range(min, max, mult, errp)
+int min;
+int max;
+int mult;
+char **errp;
 {
-	int     	r, nmults, orig_min, orig_max, orig_mult, tmp;
-	extern long	lrand48();
-	static char	errbuf[128];
+	int r, nmults, orig_min, orig_max, orig_mult, tmp;
+	extern long lrand48();
+	static char errbuf[128];
 
 	/*
 	 * Sanity check
@@ -333,44 +333,46 @@
 	 * select the random number
 	 */
 
-    	if ((r = min % mult))     /* bump to the next higher 'mult' multiple */
-        	min += mult - r;
+	if ((r = min % mult))	/* bump to the next higher 'mult' multiple */
+		min += mult - r;
 
-    	if ((r = max % mult))     /* reduce to the next lower 'mult' multiple */
-        	max -= r;
+	if ((r = max % mult))	/* reduce to the next lower 'mult' multiple */
+		max -= r;
 
-    	if (min > max) {         /* no 'mult' multiples between min & max */
+	if (min > max) {	/* no 'mult' multiples between min & max */
 		if (errp != NULL) {
-			sprintf(errbuf, "no numbers in the range %d:%d that are a multiple of %d", orig_min, orig_max, orig_mult);
+			sprintf(errbuf,
+				"no numbers in the range %d:%d that are a multiple of %d",
+				orig_min, orig_max, orig_mult);
 			*errp = errbuf;
 		}
-        	return -1;
+		return -1;
 	}
 
 	if (errp != NULL) {
 		*errp = NULL;
 	}
 
-    	nmults = ((max - min) / mult) + 1;
+	nmults = ((max - min) / mult) + 1;
 #if CRAY
-        /*
-         * If max is less than 2gb, then the value can fit in 32 bits
-         * and the standard lrand48() routine can be used.
-         */
-        if (max <= (long)2147483647) {
-            return (long) (min + (((long)lrand48() % nmults) * mult));
-        } else {
-            /*
-             * max is greater than 2gb - meeds more than 32 bits.
-             * Since lrand48 only will get a number up to 32bits.
-             */
-	    long randnum;
-            randnum=divider(min, max, 0, -1);
-            return (long) (min + ((randnum % nmults) * mult));
-        }
+	/*
+	 * If max is less than 2gb, then the value can fit in 32 bits
+	 * and the standard lrand48() routine can be used.
+	 */
+	if (max <= (long)2147483647) {
+		return (long)(min + (((long)lrand48() % nmults) * mult));
+	} else {
+		/*
+		 * max is greater than 2gb - meeds more than 32 bits.
+		 * Since lrand48 only will get a number up to 32bits.
+		 */
+		long randnum;
+		randnum = divider(min, max, 0, -1);
+		return (long)(min + ((randnum % nmults) * mult));
+	}
 
 #else
-        return (min + ((lrand48() % nmults) * mult));
+	return (min + ((lrand48() % nmults) * mult));
 #endif
 
 }
@@ -378,16 +380,15 @@
 /*
  * Just like random_range, but all values are longs.
  */
-long
-random_rangel(min, max, mult, errp)
-long	min;
-long	max;
-long	mult;
-char	**errp;
+long random_rangel(min, max, mult, errp)
+long min;
+long max;
+long mult;
+char **errp;
 {
-	long     	r, nmults, orig_min, orig_max, orig_mult, tmp;
-	extern long	lrand48();
-	static char	errbuf[128];
+	long r, nmults, orig_min, orig_max, orig_mult, tmp;
+	extern long lrand48();
+	static char errbuf[128];
 
 	/*
 	 * Sanity check
@@ -423,63 +424,62 @@
 	 * select the random number
 	 */
 
-    	if ((r = min % mult))     /* bump to the next higher 'mult' multiple */
-        	min += mult - r;
+	if ((r = min % mult))	/* bump to the next higher 'mult' multiple */
+		min += mult - r;
 
-    	if ((r = max % mult))     /* reduce to the next lower 'mult' multiple */
-        	max -= r;
+	if ((r = max % mult))	/* reduce to the next lower 'mult' multiple */
+		max -= r;
 
-    	if (min > max) {         /* no 'mult' multiples between min & max */
+	if (min > max) {	/* no 'mult' multiples between min & max */
 		if (errp != NULL) {
-		    sprintf(errbuf,
-			"no numbers in the range %ld:%ld that are a multiple of %ld",
-			orig_min, orig_max, orig_mult);
-		    *errp = errbuf;
+			sprintf(errbuf,
+				"no numbers in the range %ld:%ld that are a multiple of %ld",
+				orig_min, orig_max, orig_mult);
+			*errp = errbuf;
 		}
-        	return -1;
+		return -1;
 	}
 
 	if (errp != NULL) {
 		*errp = NULL;
 	}
 
-    	nmults = ((max - min) / mult) + 1;
+	nmults = ((max - min) / mult) + 1;
 #if CRAY || (_MIPS_SZLONG == 64)
-        /*
-         * If max is less than 2gb, then the value can fit in 32 bits
-         * and the standard lrand48() routine can be used.
-         */
-        if (max <= (long)2147483647) {
-            return (long) (min + (((long)lrand48() % nmults) * mult));
-        } else {
-            /*
-             * max is greater than 2gb - meeds more than 32 bits.
-             * Since lrand48 only will get a number up to 32bits.
-             */
-	    long randnum;
-            randnum=divider(min, max, 0, -1);
-            return (long) (min + ((randnum % nmults) * mult));
-        }
+	/*
+	 * If max is less than 2gb, then the value can fit in 32 bits
+	 * and the standard lrand48() routine can be used.
+	 */
+	if (max <= (long)2147483647) {
+		return (long)(min + (((long)lrand48() % nmults) * mult));
+	} else {
+		/*
+		 * max is greater than 2gb - meeds more than 32 bits.
+		 * Since lrand48 only will get a number up to 32bits.
+		 */
+		long randnum;
+		randnum = divider(min, max, 0, -1);
+		return (long)(min + ((randnum % nmults) * mult));
+	}
 
 #else
-    	return (min + ((lrand48() % nmults) * mult));
+	return (min + ((lrand48() % nmults) * mult));
 #endif
 }
 
 /*
  *  Attempts to be just like random_range, but everything is long long (64 bit)
  */
-long long
-random_rangell(min, max, mult, errp)
-long long	min;
-long long	max;
-long long	mult;
-char		**errp;
+long long random_rangell(min, max, mult, errp)
+long long min;
+long long max;
+long long mult;
+char **errp;
 {
-	long long     	r, nmults, orig_min, orig_max, orig_mult, tmp;
-        long long	randnum;
-	extern long	lrand48();
-	static char	errbuf[128];
+	long long r, nmults, orig_min, orig_max, orig_mult, tmp;
+	long long randnum;
+	extern long lrand48();
+	static char errbuf[128];
 
 	/*
 	 * Sanity check
@@ -515,41 +515,42 @@
 	 * select the random number
 	 */
 
-    	if ((r = min % mult))     /* bump to the next higher 'mult' multiple */
-        	min += mult - r;
+	if ((r = min % mult))	/* bump to the next higher 'mult' multiple */
+		min += mult - r;
 
-    	if ((r = max % mult))     /* reduce to the next lower 'mult' multiple */
-        	max -= r;
+	if ((r = max % mult))	/* reduce to the next lower 'mult' multiple */
+		max -= r;
 
-    	if (min > max) {         /* no 'mult' multiples between min & max */
+	if (min > max) {	/* no 'mult' multiples between min & max */
 		if (errp != NULL) {
-		    sprintf(errbuf,
-			"no numbers in the range %lld:%lld that are a multiple of %lld",
-			orig_min, orig_max, orig_mult);
-		    *errp = errbuf;
+			sprintf(errbuf,
+				"no numbers in the range %lld:%lld that are a multiple of %lld",
+				orig_min, orig_max, orig_mult);
+			*errp = errbuf;
 		}
-        	return -1;
+		return -1;
 	}
 
 	if (errp != NULL) {
 		*errp = NULL;
 	}
 
-    	nmults = ((max - min) / mult) + 1;
-        /*
+	nmults = ((max - min) / mult) + 1;
+	/*
 	 * If max is less than 2gb, then the value can fit in 32 bits
 	 * and the standard lrand48() routine can be used.
 	 */
 	if (max <= (long)2147483647) {
-    	    return (long long) (min + (((long long)lrand48() % nmults) * mult));
+		return (long long)(min +
+				   (((long long)lrand48() % nmults) * mult));
 	} else {
-	    /*
-	     * max is greater than 2gb - meeds more than 32 bits.
-	     * Since lrand48 only will get a number up to 32bits.
-	     */
-	    randnum=divider(min, max, 0, -1);
-	    return (long long) (min + ((randnum % nmults) * mult));
-        }
+		/*
+		 * max is greater than 2gb - meeds more than 32 bits.
+		 * Since lrand48 only will get a number up to 32bits.
+		 */
+		randnum = divider(min, max, 0, -1);
+		return (long long)(min + ((randnum % nmults) * mult));
+	}
 
 }
 
@@ -570,62 +571,62 @@
 static long long
 divider(long long min, long long max, long long cnt, long long rand)
 {
-    long long med, half, diff;
+	long long med, half, diff;
 
-    /*
-     * prevent run away code.  We are dividing by two each count.
-     * if we get to a count of more than 32, we should have gotten
-     * to 2gb.
-     */
-    if (cnt > 32)
-       return -1;
+	/*
+	 * prevent run away code.  We are dividing by two each count.
+	 * if we get to a count of more than 32, we should have gotten
+	 * to 2gb.
+	 */
+	if (cnt > 32)
+		return -1;
 
-    /*
-     * Only get a random number the first time.
-     */
-    if (cnt == 0 || rand < -1) {
-        rand = (long long)lrand48();  /* 32 bit random number */
-    }
-
-    diff = max - min;
-
-    if (diff <= 2147483647)
-	return min + rand;
-
-    half = diff/(long long)2;   /* half the distance between min and max */
-    med = min + half;	        /* med way point between min and max */
-
-#if DEBUG
-printf("divider: min=%lld, max=%lld, cnt=%lld, rand=%lld\n", min, max, cnt, rand);
-printf("   diff = %lld, half = %lld,   med = %lld\n", diff, half, med);
-#endif
-
-    if (half <= 2147483647) {
-        /*
-         * If half is smaller than 2gb, we can use the random number
-         * to pick the number within the min to med or med to max
-         * if the cnt bit of rand is zero or one, respectively.
-         */
-        if (rand & (1<<cnt))
-	    return med + rand;
-        else
-	    return min + rand;
-    } else {
-        /*
-	 * recursively call ourself to reduce the value to the bottom half
-	 * or top half (bit cnt is set).
-         */
-        if (rand & (1<<cnt)) {
-	    return divider(med, max, cnt+1, rand);
-	} else {
-	    return divider(min, med, cnt+1, rand);
+	/*
+	 * Only get a random number the first time.
+	 */
+	if (cnt == 0 || rand < -1) {
+		rand = (long long)lrand48();	/* 32 bit random number */
 	}
 
-    }
+	diff = max - min;
+
+	if (diff <= 2147483647)
+		return min + rand;
+
+	half = diff / (long long)2;	/* half the distance between min and max */
+	med = min + half;	/* med way point between min and max */
+
+#if DEBUG
+	printf("divider: min=%lld, max=%lld, cnt=%lld, rand=%lld\n", min, max,
+	       cnt, rand);
+	printf("   diff = %lld, half = %lld,   med = %lld\n", diff, half, med);
+#endif
+
+	if (half <= 2147483647) {
+		/*
+		 * If half is smaller than 2gb, we can use the random number
+		 * to pick the number within the min to med or med to max
+		 * if the cnt bit of rand is zero or one, respectively.
+		 */
+		if (rand & (1 << cnt))
+			return med + rand;
+		else
+			return min + rand;
+	} else {
+		/*
+		 * recursively call ourself to reduce the value to the bottom half
+		 * or top half (bit cnt is set).
+		 */
+		if (rand & (1 << cnt)) {
+			return divider(med, max, cnt + 1, rand);
+		} else {
+			return divider(min, med, cnt + 1, rand);
+		}
+
+	}
 
 }
 
-
 /*****************************************************************************
  * random_range_seed(s)
  *
@@ -633,13 +634,12 @@
  * be used in random_range().
  *****************************************************************************/
 
-void
-random_range_seed(s)
-long    s;
+void random_range_seed(s)
+long s;
 {
-    extern void srand48();
+	extern void srand48();
 
-    srand48(s);
+	srand48(s);
 }
 
 /****************************************************************************
@@ -649,57 +649,55 @@
  * set in mask.  If mask is zero, zero is returned.
  *
  ****************************************************************************/
-long
-random_bit(long mask)
+long random_bit(long mask)
 {
-    int nbits = 0;      /* number of set bits in mask */
-    long bit;           /* used to count bits and num of set bits choosen */
-    int nshift;         /* used to count bit shifts */
+	int nbits = 0;		/* number of set bits in mask */
+	long bit;		/* used to count bits and num of set bits choosen */
+	int nshift;		/* used to count bit shifts */
 
-    if (mask == 0)
-        return 0;
+	if (mask == 0)
+		return 0;
 
-    /*
-     * get the number of bits set in mask
-     */
+	/*
+	 * get the number of bits set in mask
+	 */
 #ifndef CRAY
 
-        bit=1L;
-        for (nshift=0; (unsigned int)nshift<sizeof(long)*8; nshift++) {
-                if (mask & bit)
-                        nbits++;
-                bit=bit<<1;
-        }
+	bit = 1L;
+	for (nshift = 0; (unsigned int)nshift < sizeof(long) * 8; nshift++) {
+		if (mask & bit)
+			nbits++;
+		bit = bit << 1;
+	}
 
 #else
-        nbits=_popcnt(mask);
-#endif  /* if CRAY */
+	nbits = _popcnt(mask);
+#endif /* if CRAY */
 
-    /*
-     * randomly choose a bit.
-     */
-    bit=random_range(1, nbits, 1, NULL);
+	/*
+	 * randomly choose a bit.
+	 */
+	bit = random_range(1, nbits, 1, NULL);
 
-    /*
-     * shift bits until you determine which bit was randomly choosen.
-     * nshift will hold the number of shifts to make.
-     */
+	/*
+	 * shift bits until you determine which bit was randomly choosen.
+	 * nshift will hold the number of shifts to make.
+	 */
 
-    nshift=0;
-    while (bit) {
-        /* check if the current one's bit is set */
-        if (mask & 1L) {
-            bit--;
-        }
-        mask = mask >> 1;
-        nshift++;
-    }
+	nshift = 0;
+	while (bit) {
+		/* check if the current one's bit is set */
+		if (mask & 1L) {
+			bit--;
+		}
+		mask = mask >> 1;
+		nshift++;
+	}
 
-    return 01L << (nshift-1);
+	return 01L << (nshift - 1);
 
 }
 
-
 #if RANDOM_BIT_UNITTEST
 /*
  *  The following is a unit test main function for random_bit().
@@ -708,210 +706,213 @@
 int argc;
 char **argv;
 {
-    int ind;
-    int cnt, iter;
-    long mask, ret;
+	int ind;
+	int cnt, iter;
+	long mask, ret;
 
-    printf("test for first and last bit set\n");
-    mask=1L;
-    ret=random_bit(mask);
-    printf("random_bit(%#o) returned %#o\n", mask, ret);
+	printf("test for first and last bit set\n");
+	mask = 1L;
+	ret = random_bit(mask);
+	printf("random_bit(%#o) returned %#o\n", mask, ret);
 
-    mask=1L<<(sizeof(long)*8-1);
-    ret=random_bit(mask);
-    printf("random_bit(%#o) returned %#o\n", mask, ret);
+	mask = 1L << (sizeof(long) * 8 - 1);
+	ret = random_bit(mask);
+	printf("random_bit(%#o) returned %#o\n", mask, ret);
 
-    if (argc >= 3) {
-        iter=atoi(argv[1]);
-        for (ind=2; ind<argc; ind++) {
-            printf("Calling random_bit %d times for mask %#o\n", iter, mask);
-            sscanf(argv[ind], "%i", &mask);
-            for (cnt=0; cnt<iter; cnt++) {
-                ret=random_bit(mask);
-                printf("random_bit(%#o) returned %#o\n", mask, ret);
-            }
-        }
-    }
-    exit(0);
+	if (argc >= 3) {
+		iter = atoi(argv[1]);
+		for (ind = 2; ind < argc; ind++) {
+			printf("Calling random_bit %d times for mask %#o\n",
+			       iter, mask);
+			sscanf(argv[ind], "%i", &mask);
+			for (cnt = 0; cnt < iter; cnt++) {
+				ret = random_bit(mask);
+				printf("random_bit(%#o) returned %#o\n", mask,
+				       ret);
+			}
+		}
+	}
+	exit(0);
 }
 
 #endif /* end if RANDOM_BIT_UNITTEST */
 
-
 #if UNIT_TEST
 /*
  *  The following is a unit test main function for random_range*().
  */
 
-#define PARTNUM	10	/* used to determine even distribution of random numbers */
+#define PARTNUM	10		/* used to determine even distribution of random numbers */
 #define MEG  1024*1024*1024
 #define GIG 1073741824
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
-    int ind;
-    int cnt, iter=10;
-    int imin=0, imult=1, itmin, itmax=0;
+	int ind;
+	int cnt, iter = 10;
+	int imin = 0, imult = 1, itmin, itmax = 0;
 #if CRAY
-    int imax=6*GIG;	/* higher than 32 bits */
+	int imax = 6 * GIG;	/* higher than 32 bits */
 #else
-    int imax=1048576;
+	int imax = 1048576;
 #endif
 
-    long lret, lmin=0, lmult=1, ltmin, ltmax=0;
+	long lret, lmin = 0, lmult = 1, ltmin, ltmax = 0;
 #if CRAY || (_MIPS_SZLONG == 64)
-    long lmax=6*(long)GIG;	/* higher than 32 bits */
+	long lmax = 6 * (long)GIG;	/* higher than 32 bits */
 #else
-    long lmax=1048576;
+	long lmax = 1048576;
 #endif
-    long long llret, llmin=0, llmult=1, lltmin, lltmax=0;
-    long long llmax=(long long)80*(long long)GIG;
+	long long llret, llmin = 0, llmult = 1, lltmin, lltmax = 0;
+	long long llmax = (long long)80 * (long long)GIG;
 
-    long part;
-    long long lpart;
-    long cntarr[PARTNUM];
-    long valbound[PARTNUM];
-    long long lvalbound[PARTNUM];
+	long part;
+	long long lpart;
+	long cntarr[PARTNUM];
+	long valbound[PARTNUM];
+	long long lvalbound[PARTNUM];
 
-    for (ind=0; ind<PARTNUM; ind++)
-	cntarr[ind]=0;
+	for (ind = 0; ind < PARTNUM; ind++)
+		cntarr[ind] = 0;
 
-    if (argc < 2) {
-        printf("Usage: %s func [iterations] \n", argv[0]);
-	printf("func can be random_range, random_rangel, random_rangell\n");
-	exit(1);
-    }
+	if (argc < 2) {
+		printf("Usage: %s func [iterations] \n", argv[0]);
+		printf
+		    ("func can be random_range, random_rangel, random_rangell\n");
+		exit(1);
+	}
 
-    if (argc >= 3) {
-        if (sscanf(argv[2], "%i", &iter) != 1) {
-            printf("Usage: %s [func iterations] \n", argv[0]);
-	    printf("argv[2] is not a number\n");
-	    exit(1);
-        }
-    }
-
-
-    /*
-     * random_rangel ()
-     */
-    if (strcmp(argv[1], "random_rangel") == 0) {
-	ltmin=lmax;
-        part = lmax/PARTNUM;
-        for (ind=0; ind<PARTNUM; ind++) {
-	    valbound[ind]=part*ind;
-        }
-
-	for (cnt=0; cnt<iter; cnt++) {
-	    lret=random_rangel(lmin, lmax, lmult, NULL);
-	    if (iter < 100)
-	        printf("%ld\n", lret);
-	    if (lret < ltmin)
-		ltmin = lret;
-	    if (lret > ltmax)
-		ltmax = lret;
-	    for (ind=0; ind<PARTNUM-1; ind++) {
-		if (valbound[ind]  < lret && lret <= valbound[ind+1]) {
-		    cntarr[ind]++;
-		    break;
+	if (argc >= 3) {
+		if (sscanf(argv[2], "%i", &iter) != 1) {
+			printf("Usage: %s [func iterations] \n", argv[0]);
+			printf("argv[2] is not a number\n");
+			exit(1);
 		}
-	    }
-	    if (lret > valbound[PARTNUM-1]) {
-		cntarr[PARTNUM-1]++;
-	    }
-        }
-        for (ind=0; ind<PARTNUM-1; ind++) {
-	    printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", ind+1,
-	        valbound[ind], valbound[ind+1], cntarr[ind],
-	        (float)(cntarr[ind]/(float)iter));
-        }
-        printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", PARTNUM,
-	    valbound[PARTNUM-1], lmax, cntarr[PARTNUM-1],
-	    (float)(cntarr[PARTNUM-1]/(float)iter));
-	printf("  min=%ld,  max=%ld\n", ltmin, ltmax);
+	}
 
-    } else if (strcmp(argv[1], "random_rangell") == 0) {
-       /*
-	* random_rangell() unit test
-        */
-	 lltmin=llmax;
-        lpart = llmax/PARTNUM;
-        for (ind=0; ind<PARTNUM; ind++) {
-	    lvalbound[ind]=(long long)(lpart*ind);
-        }
-
-	for (cnt=0; cnt<iter; cnt++) {
-	    llret=random_rangell(llmin, llmax, llmult, NULL);
-	    if (iter < 100)
-	        printf("random_rangell returned %lld\n", llret);
-            if (llret < lltmin)
-                lltmin = llret;
-            if (llret > lltmax)
-                lltmax = llret;
-
-	    for (ind=0; ind<PARTNUM-1; ind++) {
-		if (lvalbound[ind]  < llret && llret <= lvalbound[ind+1]) {
-		    cntarr[ind]++;
-		    break;
-		}
-	    }
-	    if (llret > lvalbound[PARTNUM-1]) {
-		cntarr[PARTNUM-1]++;
-	    }
-        }
-        for (ind=0; ind<PARTNUM-1; ind++) {
-            printf("%2d %-13lld to  %-13lld   %5ld %4.4f\n", ind+1,
-                lvalbound[ind], lvalbound[ind+1], cntarr[ind],
-                (float)(cntarr[ind]/(float)iter));
-        }
-        printf("%2d %-13lld to  %-13lld   %5ld %4.4f\n", PARTNUM,
-            lvalbound[PARTNUM-1], llmax, cntarr[PARTNUM-1],
-            (float)(cntarr[PARTNUM-1]/(float)iter));
-	printf("  min=%lld,  max=%lld\n", lltmin, lltmax);
-
-    } else {
 	/*
-	 * random_range() unit test
-         */
-	itmin=imax;
-        part = imax/PARTNUM;
-        for (ind=0; ind<PARTNUM; ind++) {
-	    valbound[ind]=part*ind;
-        }
-
-	for (cnt=0; cnt<iter; cnt++) {
-	    lret=random_range(imin, imax, imult, NULL);
-	    if (iter < 100)
-	        printf("%ld\n", lret);
-            if (lret < itmin)
-                itmin = lret;
-            if (lret > itmax)
-                itmax = lret;
-
-	    for (ind=0; ind<PARTNUM-1; ind++) {
-		if (valbound[ind]  < lret && lret <= valbound[ind+1]) {
-		    cntarr[ind]++;
-		    break;
+	 * random_rangel ()
+	 */
+	if (strcmp(argv[1], "random_rangel") == 0) {
+		ltmin = lmax;
+		part = lmax / PARTNUM;
+		for (ind = 0; ind < PARTNUM; ind++) {
+			valbound[ind] = part * ind;
 		}
-	    }
-	    if (lret > valbound[PARTNUM-1]) {
-		cntarr[PARTNUM-1]++;
-	    }
-        }
-        for (ind=0; ind<PARTNUM-1; ind++) {
-	    printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", ind+1,
-	        valbound[ind], valbound[ind+1], cntarr[ind],
-	        (float)(cntarr[ind]/(float)iter));
-        }
-        printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", PARTNUM,
-	    valbound[PARTNUM-1], (long)imax, cntarr[PARTNUM-1],
-	    (float)(cntarr[PARTNUM-1]/(float)iter));
-	printf("  min=%d,  max=%d\n", itmin, itmax);
 
-    }
+		for (cnt = 0; cnt < iter; cnt++) {
+			lret = random_rangel(lmin, lmax, lmult, NULL);
+			if (iter < 100)
+				printf("%ld\n", lret);
+			if (lret < ltmin)
+				ltmin = lret;
+			if (lret > ltmax)
+				ltmax = lret;
+			for (ind = 0; ind < PARTNUM - 1; ind++) {
+				if (valbound[ind] < lret
+				    && lret <= valbound[ind + 1]) {
+					cntarr[ind]++;
+					break;
+				}
+			}
+			if (lret > valbound[PARTNUM - 1]) {
+				cntarr[PARTNUM - 1]++;
+			}
+		}
+		for (ind = 0; ind < PARTNUM - 1; ind++) {
+			printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", ind + 1,
+			       valbound[ind], valbound[ind + 1], cntarr[ind],
+			       (float)(cntarr[ind] / (float)iter));
+		}
+		printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", PARTNUM,
+		       valbound[PARTNUM - 1], lmax, cntarr[PARTNUM - 1],
+		       (float)(cntarr[PARTNUM - 1] / (float)iter));
+		printf("  min=%ld,  max=%ld\n", ltmin, ltmax);
 
-    exit(0);
+	} else if (strcmp(argv[1], "random_rangell") == 0) {
+		/*
+		 * random_rangell() unit test
+		 */
+		lltmin = llmax;
+		lpart = llmax / PARTNUM;
+		for (ind = 0; ind < PARTNUM; ind++) {
+			lvalbound[ind] = (long long)(lpart * ind);
+		}
+
+		for (cnt = 0; cnt < iter; cnt++) {
+			llret = random_rangell(llmin, llmax, llmult, NULL);
+			if (iter < 100)
+				printf("random_rangell returned %lld\n", llret);
+			if (llret < lltmin)
+				lltmin = llret;
+			if (llret > lltmax)
+				lltmax = llret;
+
+			for (ind = 0; ind < PARTNUM - 1; ind++) {
+				if (lvalbound[ind] < llret
+				    && llret <= lvalbound[ind + 1]) {
+					cntarr[ind]++;
+					break;
+				}
+			}
+			if (llret > lvalbound[PARTNUM - 1]) {
+				cntarr[PARTNUM - 1]++;
+			}
+		}
+		for (ind = 0; ind < PARTNUM - 1; ind++) {
+			printf("%2d %-13lld to  %-13lld   %5ld %4.4f\n",
+			       ind + 1, lvalbound[ind], lvalbound[ind + 1],
+			       cntarr[ind], (float)(cntarr[ind] / (float)iter));
+		}
+		printf("%2d %-13lld to  %-13lld   %5ld %4.4f\n", PARTNUM,
+		       lvalbound[PARTNUM - 1], llmax, cntarr[PARTNUM - 1],
+		       (float)(cntarr[PARTNUM - 1] / (float)iter));
+		printf("  min=%lld,  max=%lld\n", lltmin, lltmax);
+
+	} else {
+		/*
+		 * random_range() unit test
+		 */
+		itmin = imax;
+		part = imax / PARTNUM;
+		for (ind = 0; ind < PARTNUM; ind++) {
+			valbound[ind] = part * ind;
+		}
+
+		for (cnt = 0; cnt < iter; cnt++) {
+			lret = random_range(imin, imax, imult, NULL);
+			if (iter < 100)
+				printf("%ld\n", lret);
+			if (lret < itmin)
+				itmin = lret;
+			if (lret > itmax)
+				itmax = lret;
+
+			for (ind = 0; ind < PARTNUM - 1; ind++) {
+				if (valbound[ind] < lret
+				    && lret <= valbound[ind + 1]) {
+					cntarr[ind]++;
+					break;
+				}
+			}
+			if (lret > valbound[PARTNUM - 1]) {
+				cntarr[PARTNUM - 1]++;
+			}
+		}
+		for (ind = 0; ind < PARTNUM - 1; ind++) {
+			printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", ind + 1,
+			       valbound[ind], valbound[ind + 1], cntarr[ind],
+			       (float)(cntarr[ind] / (float)iter));
+		}
+		printf("%2d %-13ld to  %-13ld   %5ld %4.4f\n", PARTNUM,
+		       valbound[PARTNUM - 1], (long)imax, cntarr[PARTNUM - 1],
+		       (float)(cntarr[PARTNUM - 1] / (float)iter));
+		printf("  min=%d,  max=%d\n", itmin, itmax);
+
+	}
+
+	exit(0);
 }
 
 #endif
diff --git a/lib/rmobj.c b/lib/rmobj.c
index 980b5a2..9b6a643 100644
--- a/lib/rmobj.c
+++ b/lib/rmobj.c
@@ -77,135 +77,139 @@
  *      NULL) and return -1.  Otherwise it will return 0.
  *
  ************************************************************/
-#include <errno.h>         /* for errno */
-#include <stdio.h>         /* for NULL */
-#include <stdlib.h>        /* for malloc() */
-#include <string.h>        /* for string function */
-#include <limits.h>        /* for PATH_MAX */
-#include <sys/types.h>     /* for opendir(), readdir(), closedir(), stat() */
-#include <sys/stat.h>      /* for [l]stat() */
-#include <dirent.h>        /* for opendir(), readdir(), closedir() */
-#include <unistd.h>        /* for rmdir(), unlink() */
+#include <errno.h>		/* for errno */
+#include <stdio.h>		/* for NULL */
+#include <stdlib.h>		/* for malloc() */
+#include <string.h>		/* for string function */
+#include <limits.h>		/* for PATH_MAX */
+#include <sys/types.h>		/* for opendir(), readdir(), closedir(), stat() */
+#include <sys/stat.h>		/* for [l]stat() */
+#include <dirent.h>		/* for opendir(), readdir(), closedir() */
+#include <unistd.h>		/* for rmdir(), unlink() */
 #include "rmobj.h"
 
 #define SYSERR strerror(errno)
 
-int
-rmobj(char *obj, char **errmsg)
+int rmobj(char *obj, char **errmsg)
 {
-   int           ret_val = 0;       /* return value from this routine */
-   DIR           *dir;              /* pointer to a directory */
-   struct dirent *dir_ent;          /* pointer to directory entries */
-   char          dirobj[PATH_MAX];  /* object inside directory to modify */
-   struct stat   statbuf;           /* used to hold stat information */
-   static char   err_msg[1024];     /* error message */
+	int ret_val = 0;	/* return value from this routine */
+	DIR *dir;		/* pointer to a directory */
+	struct dirent *dir_ent;	/* pointer to directory entries */
+	char dirobj[PATH_MAX];	/* object inside directory to modify */
+	struct stat statbuf;	/* used to hold stat information */
+	static char err_msg[1024];	/* error message */
 
-   /* Determine the file type */
-   if (lstat(obj, &statbuf) < 0) {
-      if (errmsg != NULL) {
-         sprintf(err_msg, "lstat(%s) failed; errno=%d: %s",
-                 obj, errno, SYSERR);
-         *errmsg = err_msg;
-      }
-      return -1;
-   }
+	/* Determine the file type */
+	if (lstat(obj, &statbuf) < 0) {
+		if (errmsg != NULL) {
+			sprintf(err_msg, "lstat(%s) failed; errno=%d: %s",
+				obj, errno, SYSERR);
+			*errmsg = err_msg;
+		}
+		return -1;
+	}
 
-   /* Take appropriate action, depending on the file type */
-   if ((statbuf.st_mode & S_IFMT) == S_IFDIR) {
-      /* object is a directory */
+	/* Take appropriate action, depending on the file type */
+	if ((statbuf.st_mode & S_IFMT) == S_IFDIR) {
+		/* object is a directory */
 
-      /* Do NOT perform the request if the directory is "/" */
-      if (!strcmp(obj, "/")) {
-         if (errmsg != NULL) {
-            sprintf(err_msg, "Cannot remove /");
-            *errmsg = err_msg;
-         }
-         return -1;
-      }
+		/* Do NOT perform the request if the directory is "/" */
+		if (!strcmp(obj, "/")) {
+			if (errmsg != NULL) {
+				sprintf(err_msg, "Cannot remove /");
+				*errmsg = err_msg;
+			}
+			return -1;
+		}
 
-      /* Open the directory to get access to what is in it */
-      if ((dir = opendir(obj)) == NULL) {
-         if (rmdir(obj) != 0) {
-            if (errmsg != NULL) {
-               sprintf(err_msg, "rmdir(%s) failed; errno=%d: %s",
-                       obj, errno, SYSERR);
-               *errmsg = err_msg;
-            }
-            return -1;
-         } else {
-            return 0;
-         }
-      }
+		/* Open the directory to get access to what is in it */
+		if ((dir = opendir(obj)) == NULL) {
+			if (rmdir(obj) != 0) {
+				if (errmsg != NULL) {
+					sprintf(err_msg,
+						"rmdir(%s) failed; errno=%d: %s",
+						obj, errno, SYSERR);
+					*errmsg = err_msg;
+				}
+				return -1;
+			} else {
+				return 0;
+			}
+		}
 
-      /* Loop through the entries in the directory, removing each one */
-      for (dir_ent = (struct dirent *)readdir(dir);
-            dir_ent != NULL;
-            dir_ent = (struct dirent *)readdir(dir)) {
+		/* Loop through the entries in the directory, removing each one */
+		for (dir_ent = (struct dirent *)readdir(dir);
+		     dir_ent != NULL; dir_ent = (struct dirent *)readdir(dir)) {
 
-         /* Don't remove "." or ".." */
-         if (!strcmp(dir_ent->d_name, ".") || !strcmp(dir_ent->d_name, ".."))
-            continue;
+			/* Don't remove "." or ".." */
+			if (!strcmp(dir_ent->d_name, ".")
+			    || !strcmp(dir_ent->d_name, ".."))
+				continue;
 
-         /* Recursively call this routine to remove the current entry */
-         sprintf(dirobj, "%s/%s", obj, dir_ent->d_name);
-         if (rmobj(dirobj, errmsg) != 0)
-            ret_val = -1;
-      }
+			/* Recursively call this routine to remove the current entry */
+			sprintf(dirobj, "%s/%s", obj, dir_ent->d_name);
+			if (rmobj(dirobj, errmsg) != 0)
+				ret_val = -1;
+		}
 
-      /* Close the directory */
-      closedir(dir);
+		/* Close the directory */
+		closedir(dir);
 
-      /* If there were problems removing an entry, don't attempt to
-         remove the directory itself */
-      if (ret_val == -1)
-         return -1;
+		/* If there were problems removing an entry, don't attempt to
+		   remove the directory itself */
+		if (ret_val == -1)
+			return -1;
 
-      /* Get the link count, now that all the entries have been removed */
-      if (lstat(obj, &statbuf) < 0) {
-         if (errmsg != NULL) {
-            sprintf(err_msg, "lstat(%s) failed; errno=%d: %s",
-                    obj, errno, SYSERR);
-            *errmsg = err_msg;
-         }
-         return -1;
-      }
+		/* Get the link count, now that all the entries have been removed */
+		if (lstat(obj, &statbuf) < 0) {
+			if (errmsg != NULL) {
+				sprintf(err_msg,
+					"lstat(%s) failed; errno=%d: %s", obj,
+					errno, SYSERR);
+				*errmsg = err_msg;
+			}
+			return -1;
+		}
 
-      /* Remove the directory itself */
-      if (statbuf.st_nlink >= 3) {
-         /* The directory is linked; unlink() must be used */
-         if (unlink(obj) < 0) {
-            if (errmsg != NULL) {
-               sprintf(err_msg, "unlink(%s) failed; errno=%d: %s",
-                       obj, errno, SYSERR);
-               *errmsg = err_msg;
-            }
-            return -1;
-         }
-      } else {
-         /* The directory is not linked; remove() can be used */
-         if (remove(obj) < 0) {
-            if (errmsg != NULL) {
-               sprintf(err_msg, "remove(%s) failed; errno=%d: %s",
-                       obj, errno, SYSERR);
-               *errmsg = err_msg;
-            }
-            return -1;
-         }
-      }
-   } else {
-      /* object is not a directory; just use unlink() */
-      if (unlink(obj) < 0) {
-         if (errmsg != NULL) {
-            sprintf(err_msg, "unlink(%s) failed; errno=%d: %s",
-                    obj, errno, SYSERR);
-            *errmsg = err_msg;
-         }
-         return -1;
-      }
-   }  /* if obj is a directory */
+		/* Remove the directory itself */
+		if (statbuf.st_nlink >= 3) {
+			/* The directory is linked; unlink() must be used */
+			if (unlink(obj) < 0) {
+				if (errmsg != NULL) {
+					sprintf(err_msg,
+						"unlink(%s) failed; errno=%d: %s",
+						obj, errno, SYSERR);
+					*errmsg = err_msg;
+				}
+				return -1;
+			}
+		} else {
+			/* The directory is not linked; remove() can be used */
+			if (remove(obj) < 0) {
+				if (errmsg != NULL) {
+					sprintf(err_msg,
+						"remove(%s) failed; errno=%d: %s",
+						obj, errno, SYSERR);
+					*errmsg = err_msg;
+				}
+				return -1;
+			}
+		}
+	} else {
+		/* object is not a directory; just use unlink() */
+		if (unlink(obj) < 0) {
+			if (errmsg != NULL) {
+				sprintf(err_msg,
+					"unlink(%s) failed; errno=%d: %s", obj,
+					errno, SYSERR);
+				*errmsg = err_msg;
+			}
+			return -1;
+		}
+	}			/* if obj is a directory */
 
-   /*
-    * Everything must have went ok.
-    */
-   return 0;
-}  /* rmobj() */
+	/*
+	 * Everything must have went ok.
+	 */
+	return 0;
+}				/* rmobj() */
diff --git a/lib/safe_file_ops.c b/lib/safe_file_ops.c
index b1b11f3..b602345 100644
--- a/lib/safe_file_ops.c
+++ b/lib/safe_file_ops.c
@@ -49,17 +49,17 @@
 				flag = 1;
 				cnt++;
 			}
-		break;
+			break;
 		case '*':
 			if (flag) {
 				cnt--;
 				flag = 0;
 			}
-		break;
+			break;
 		default:
 			flag = 0;
 		}
-	
+
 		fmt++;
 	}
 
@@ -67,7 +67,7 @@
 }
 
 void safe_file_scanf(const char *file, const int lineno,
-                     void (*cleanup_fn)(void),
+		     void (*cleanup_fn) (void),
 		     const char *path, const char *fmt, ...)
 {
 	va_list va;
@@ -78,34 +78,33 @@
 
 	if (f == NULL) {
 		tst_brkm(TBROK | TERRNO, cleanup_fn,
-		         "Failed to open FILE '%s' for reading at %s:%d",
-		         path, file, lineno);
+			 "Failed to open FILE '%s' for reading at %s:%d",
+			 path, file, lineno);
 	}
-	
+
 	exp_convs = count_scanf_conversions(fmt);
 
 	va_start(va, fmt);
 	ret = vfscanf(f, fmt, va);
 	va_end(va);
-		
+
 	if (ret == EOF) {
 		tst_brkm(TBROK, cleanup_fn,
-		         "The FILE '%s' ended prematurely at %s:%d",
-		         path, file, lineno);
+			 "The FILE '%s' ended prematurely at %s:%d",
+			 path, file, lineno);
 	}
 
 	if (ret != exp_convs) {
 		tst_brkm(TBROK, cleanup_fn,
-		         "Expected %i conversions got %i FILE '%s' at %s:%d",
-		         exp_convs, ret, path, file, lineno);
+			 "Expected %i conversions got %i FILE '%s' at %s:%d",
+			 exp_convs, ret, path, file, lineno);
 	}
 
 }
 
-
 void safe_file_printf(const char *file, const int lineno,
-                      void (*cleanup_fn)(void),
-                      const char *path, const char *fmt, ...)
+		      void (*cleanup_fn) (void),
+		      const char *path, const char *fmt, ...)
 {
 	va_list va;
 	FILE *f;
@@ -114,31 +113,30 @@
 
 	if (f == NULL) {
 		tst_brkm(TBROK | TERRNO, cleanup_fn,
-		         "Failed to open FILE '%s' for writing at %s:%d",
-		         path, file, lineno);
+			 "Failed to open FILE '%s' for writing at %s:%d",
+			 path, file, lineno);
 	}
 
 	va_start(va, fmt);
 
 	if (vfprintf(f, fmt, va) < 0) {
 		tst_brkm(TBROK, cleanup_fn,
-		         "Failed to print to FILE '%s' at %s:%d",
-		         path, file, lineno);
+			 "Failed to print to FILE '%s' at %s:%d",
+			 path, file, lineno);
 	}
 
 	va_end(va);
 
 	if (fclose(f)) {
 		tst_brkm(TBROK | TERRNO, cleanup_fn,
-		         "Failed to close FILE '%s' at %s:%d",
-		         path, file, lineno);
+			 "Failed to close FILE '%s' at %s:%d",
+			 path, file, lineno);
 	}
 }
 
 //TODO: C implementation? better error condition reporting?
 void safe_cp(const char *file, const int lineno,
-             void (*cleanup_fn)(void),
-	     const char *src, const char *dst)
+	     void (*cleanup_fn) (void), const char *src, const char *dst)
 {
 	size_t len = strlen(src) + strlen(dst) + 16;
 	char buf[len];
@@ -150,7 +148,7 @@
 
 	if (ret) {
 		tst_brkm(TBROK, cleanup_fn,
-		         "Failed to copy '%s' to '%s' at %s:%d",
-		         src, dst, file, lineno);
+			 "Failed to copy '%s' to '%s' at %s:%d",
+			 src, dst, file, lineno);
 	}
 }
diff --git a/lib/safe_macros.c b/lib/safe_macros.c
index 9c50f89..0668584 100644
--- a/lib/safe_macros.c
+++ b/lib/safe_macros.c
@@ -13,177 +13,172 @@
 #include "test.h"
 #include "safe_macros.h"
 
-char *
-safe_basename(const char *file, const int lineno, void (*cleanup_fn)(void),
-    char *path)
+char *safe_basename(const char *file, const int lineno,
+		    void (*cleanup_fn) (void), char *path)
 {
 	char *rval;
 
 	rval = basename(path);
 	if (rval == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "basename failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "basename failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_chdir(const char *file, const int lineno, void (*cleanup_fn)(void),
-    const char *path)
+safe_chdir(const char *file, const int lineno, void (*cleanup_fn) (void),
+	   const char *path)
 {
 	int rval;
 
 	rval = chdir(path);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "chdir failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "chdir failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_close(const char *file, const int lineno, void (*cleanup_fn)(void),
-    int fildes)
+safe_close(const char *file, const int lineno, void (*cleanup_fn) (void),
+	   int fildes)
 {
 	int rval;
 
 	rval = close(fildes);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "close failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "close failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_creat(const char *file, const int lineno, void (*cleanup_fn)(void),
-    char *pathname, mode_t mode)
+safe_creat(const char *file, const int lineno, void (*cleanup_fn) (void),
+	   char *pathname, mode_t mode)
 {
 	int rval;
 
 	rval = creat(pathname, mode);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "pipe failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "pipe failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
-char *
-safe_dirname(const char *file, const int lineno, void (*cleanup_fn)(void),
-    char *path)
+char *safe_dirname(const char *file, const int lineno,
+		   void (*cleanup_fn) (void), char *path)
 {
 	char *rval;
 
 	rval = dirname(path);
 	if (rval == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "dirname failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "dirname failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
-char *
-safe_getcwd(const char *file, const int lineno, void (*cleanup_fn)(void),
-    char *buf, size_t size)
+char *safe_getcwd(const char *file, const int lineno, void (*cleanup_fn) (void),
+		  char *buf, size_t size)
 {
 	char *rval;
 
 	rval = getcwd(buf, size);
 	if (rval == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "getcwd failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "getcwd failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
-struct passwd*
-safe_getpwnam(const char *file, const int lineno, void (*cleanup_fn)(void),
-    const char *name)
+struct passwd *safe_getpwnam(const char *file, const int lineno,
+			     void (*cleanup_fn) (void), const char *name)
 {
 	struct passwd *rval;
 
 	rval = getpwnam(name);
 	if (rval == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "getpwnam failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "getpwnam failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_getrusage(const char *file, const int lineno, void (*cleanup_fn)(void),
-	    int who, struct rusage *usage)
+safe_getrusage(const char *file, const int lineno, void (*cleanup_fn) (void),
+	       int who, struct rusage *usage)
 {
 	int rval;
 
 	rval = getrusage(who, usage);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "getrusage failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn,
+			 "getrusage failed at %s:%d", file, lineno);
 
 	return rval;
 }
 
-void*
-safe_malloc(const char *file, const int lineno, void (*cleanup_fn)(void),
-    size_t size)
+void *safe_malloc(const char *file, const int lineno, void (*cleanup_fn) (void),
+		  size_t size)
 {
 	void *rval;
 
 	rval = malloc(size);
 	if (rval == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "malloc failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "malloc failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_mkdir(const char *file, const int lineno, void (*cleanup_fn)(void),
-    const char *pathname, mode_t mode)
+safe_mkdir(const char *file, const int lineno, void (*cleanup_fn) (void),
+	   const char *pathname, mode_t mode)
 {
 	int rval;
 
 	rval = mkdir(pathname, mode);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "mkdir failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "mkdir failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
-void*
-safe_mmap(const char *file, const int lineno, void (*cleanup_fn)(void),
-    void *addr, size_t length, int prot, int flags, int fd, off_t offset)
+void *safe_mmap(const char *file, const int lineno, void (*cleanup_fn) (void),
+		void *addr, size_t length, int prot, int flags, int fd,
+		off_t offset)
 {
 	void *rval;
 
 	rval = mmap(addr, length, prot, flags, fd, offset);
 	if (rval == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "mmap failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "mmap failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_munmap(const char *file, const int lineno, void (*cleanup_fn)(void),
-    void *addr, size_t length)
+safe_munmap(const char *file, const int lineno, void (*cleanup_fn) (void),
+	    void *addr, size_t length)
 {
 	int rval;
 
 	rval = munmap(addr, length);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "munmap failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "munmap failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_open(const char *file, const int lineno, void (*cleanup_fn)(void),
-    const char *pathname, int oflags, ...)
+safe_open(const char *file, const int lineno, void (*cleanup_fn) (void),
+	  const char *pathname, int oflags, ...)
 {
 	va_list ap;
 	int rval;
@@ -195,154 +190,154 @@
 
 	rval = open(pathname, oflags, mode);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "open failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "open failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_pipe(const char *file, const int lineno, void (*cleanup_fn)(void),
-    int fildes[2])
+safe_pipe(const char *file, const int lineno, void (*cleanup_fn) (void),
+	  int fildes[2])
 {
 	int rval;
 
 	rval = pipe(fildes);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "pipe failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "pipe failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 ssize_t
-safe_read(const char *file, const int lineno, void (*cleanup_fn)(void),
-    char len_strict, int fildes, void *buf, size_t nbyte)
+safe_read(const char *file, const int lineno, void (*cleanup_fn) (void),
+	  char len_strict, int fildes, void *buf, size_t nbyte)
 {
 	ssize_t rval;
 
 	rval = read(fildes, buf, nbyte);
 	if (rval == -1 || (len_strict && rval != nbyte))
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "read failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "read failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
-	int
-safe_setegid(const char *file, const int lineno, void (*cleanup_fn)(void),
-    gid_t egid)
+int
+safe_setegid(const char *file, const int lineno, void (*cleanup_fn) (void),
+	     gid_t egid)
 {
 	int rval;
 
 	rval = setegid(egid);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "setegid failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "setegid failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_seteuid(const char *file, const int lineno, void (*cleanup_fn)(void),
-    uid_t euid)
+safe_seteuid(const char *file, const int lineno, void (*cleanup_fn) (void),
+	     uid_t euid)
 {
 	int rval;
 
 	rval = seteuid(euid);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "seteuid failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "seteuid failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_setgid(const char *file, const int lineno, void (*cleanup_fn)(void),
-    gid_t gid)
+safe_setgid(const char *file, const int lineno, void (*cleanup_fn) (void),
+	    gid_t gid)
 {
 	int rval;
 
 	rval = setgid(gid);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "setgid failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "setgid failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_setuid(const char *file, const int lineno, void (*cleanup_fn)(void),
-    uid_t uid)
+safe_setuid(const char *file, const int lineno, void (*cleanup_fn) (void),
+	    uid_t uid)
 {
 	int rval;
 
 	rval = setuid(uid);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "setuid failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "setuid failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int
-safe_unlink(const char *file, const int lineno, void (*cleanup_fn)(void),
-    const char *pathname)
+safe_unlink(const char *file, const int lineno, void (*cleanup_fn) (void),
+	    const char *pathname)
 {
 	int rval;
 
 	rval = unlink(pathname);
 	if (rval == -1)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "unlink failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "unlink failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 ssize_t
-safe_write(const char *file, const int lineno, void (cleanup_fn)(void),
-    char len_strict, int fildes, const void *buf, size_t nbyte)
+safe_write(const char *file, const int lineno, void (cleanup_fn) (void),
+	   char len_strict, int fildes, const void *buf, size_t nbyte)
 {
 	ssize_t rval;
 
 	rval = write(fildes, buf, nbyte);
 	if ((len_strict == 0 && rval == -1) || rval != nbyte)
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "write failed at %s:%d",
-		    file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "write failed at %s:%d",
+			 file, lineno);
 
 	return (rval);
 }
 
 int safe_ftruncate(const char *file, const int lineno,
-	    void (cleanup_fn)(void), int fd, off_t length)
+		   void (cleanup_fn) (void), int fd, off_t length)
 {
 	int rval;
 
 	rval = ftruncate(fd, length);
 	if (rval == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "ftruncate failed at %s:%d",
-		         file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn,
+			 "ftruncate failed at %s:%d", file, lineno);
 	}
 
 	return rval;
 }
 
 int safe_truncate(const char *file, const int lineno,
-	    void (cleanup_fn)(void), const char *path, off_t length)
+		  void (cleanup_fn) (void), const char *path, off_t length)
 {
 	int rval;
 
 	rval = truncate(path, length);
 	if (rval == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "truncate failed at %s:%d",
-		         file, lineno);
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "truncate failed at %s:%d",
+			 file, lineno);
 	}
 
 	return rval;
 }
 
 long safe_strtol(const char *file, const int lineno,
-	    void (cleanup_fn)(void), char *str, long min, long max)
+		 void (cleanup_fn) (void), char *str, long min, long max)
 {
 	long rval;
 	char *endptr;
@@ -350,8 +345,8 @@
 	errno = 0;
 	rval = strtol(str, &endptr, 10);
 	if ((errno == ERANGE && (rval == LONG_MAX || rval == LONG_MIN))
-		    || (errno != 0 && rval == 0))
-		tst_brkm(TBROK|TERRNO, cleanup_fn,
+	    || (errno != 0 && rval == 0))
+		tst_brkm(TBROK | TERRNO, cleanup_fn,
 			 "strtol failed at %s:%d", file, lineno);
 	if (rval > max || rval < min)
 		tst_brkm(TBROK, cleanup_fn,
@@ -364,8 +359,9 @@
 	return rval;
 }
 
-unsigned long safe_strtoul(const char *file, const int lineno, void (cleanup_fn)(void),
-	    char *str, unsigned long min, unsigned long max)
+unsigned long safe_strtoul(const char *file, const int lineno,
+			   void (cleanup_fn) (void), char *str,
+			   unsigned long min, unsigned long max)
 {
 	unsigned long rval;
 	char *endptr;
@@ -373,22 +369,22 @@
 	errno = 0;
 	rval = strtoul(str, &endptr, 10);
 	if ((errno == ERANGE && rval == ULONG_MAX)
-		    || (errno != 0 && rval == 0))
-		tst_brkm(TBROK|TERRNO, cleanup_fn,
-			"strtol failed at %s:%d", file, lineno);
+	    || (errno != 0 && rval == 0))
+		tst_brkm(TBROK | TERRNO, cleanup_fn,
+			 "strtol failed at %s:%d", file, lineno);
 	if (rval > max || rval < min)
 		tst_brkm(TBROK, cleanup_fn,
-			"converted value out of range (%lu - %lu at %s:%d",
-			min, max, file, lineno);
+			 "converted value out of range (%lu - %lu at %s:%d",
+			 min, max, file, lineno);
 	if (endptr == str || (*endptr != '\0' && *endptr != '\n'))
 		tst_brkm(TBROK, cleanup_fn,
-			"Invalid value: '%s' at %s:%d", str, file, lineno);
+			 "Invalid value: '%s' at %s:%d", str, file, lineno);
 
 	return rval;
 }
 
 long safe_sysconf(const char *file, const int lineno,
-		  void (cleanup_fn)(void), int name)
+		  void (cleanup_fn) (void), int name)
 {
 	long rval;
 	errno = 0;
@@ -397,7 +393,7 @@
 
 	if (rval == -1) {
 		if (errno == EINVAL)
-			tst_brkm(TBROK|TERRNO, cleanup_fn,
+			tst_brkm(TBROK | TERRNO, cleanup_fn,
 				 "sysconf failed at %s:%d", file, lineno);
 		else
 			tst_resm(TINFO, "queried option is not available"
diff --git a/lib/search_path.c b/lib/search_path.c
index 28b4ca7..a5ebfad 100644
--- a/lib/search_path.c
+++ b/lib/search_path.c
@@ -32,7 +32,6 @@
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
  */
 
-
 /**********************************************************
  *
  *    UNICOS Feature Test and Evaluation - Cray Research, Inc.
@@ -80,7 +79,6 @@
 #include <sys/param.h>
 #include <sys/stat.h>
 
-
 struct stat stbuf;
 
 #ifndef AS_CMD
@@ -94,33 +92,31 @@
 #ifndef PATH_MAX
 #ifndef MAXPATHLEN
 #define PATH_MAX     1024
-#else  /* MAXPATHLEN */
+#else /* MAXPATHLEN */
 #define PATH_MAX     MAXPATHLEN
-#endif  /* MAXPATHLEN */
-#endif  /* PATH_MAX */
-
+#endif /* MAXPATHLEN */
+#endif /* PATH_MAX */
 
 #if AS_CMD
 main(argc, argv)
 int argc;
 char **argv;
 {
-    char path[PATH_MAX];
-    int ind;
+	char path[PATH_MAX];
+	int ind;
 
-    if (argc <= 1) {
-	printf("missing argument\n");
-	exit(1);
-    }
+	if (argc <= 1) {
+		printf("missing argument\n");
+		exit(1);
+	}
 
-    for (ind=1;ind < argc; ind++) {
-	if (search_path(argv[ind], path, F_OK, 0) < 0) {
-	    printf("ERROR: %s\n", path);
+	for (ind = 1; ind < argc; ind++) {
+		if (search_path(argv[ind], path, F_OK, 0) < 0) {
+			printf("ERROR: %s\n", path);
+		} else {
+			printf("path of %s is %s\n", argv[ind], path);
+		}
 	}
-	else {
-	    printf("path of %s is %s\n", argv[ind], path);
-	}
-    }
 
 }
 
@@ -128,150 +124,150 @@
 
 /*
  */
-int
-search_path(cmd, res_path, access_mode, fullpath)
-char *cmd;	/* The requested filename */
-char *res_path; /* The resulting path or error mesg */
-int access_mode; /* the mode used by access(2) */
-int fullpath;	/* if set, cwd will be prepended to all non-full paths */
+int search_path(cmd, res_path, access_mode, fullpath)
+char *cmd;			/* The requested filename */
+char *res_path;			/* The resulting path or error mesg */
+int access_mode;		/* the mode used by access(2) */
+int fullpath;			/* if set, cwd will be prepended to all non-full paths */
 {
-    char *cp;   /* used to scan PATH for directories */
-    int ret;      /* return value from access */
-    char *pathenv;
-    char tmppath[PATH_MAX];
-    char curpath[PATH_MAX];
-    char *path;
-    int lastpath;
-    int toolong=0;
+	char *cp;		/* used to scan PATH for directories */
+	int ret;		/* return value from access */
+	char *pathenv;
+	char tmppath[PATH_MAX];
+	char curpath[PATH_MAX];
+	char *path;
+	int lastpath;
+	int toolong = 0;
 
 #if DEBUG
-printf("search_path: cmd = %s, access_mode = %d, fullpath = %d\n", cmd, access_mode, fullpath);
+	printf("search_path: cmd = %s, access_mode = %d, fullpath = %d\n", cmd,
+	       access_mode, fullpath);
 #endif
 
-    /*
-     * full or relative path was given
-     */
-    if ((cmd[0] == '/') || ( (cp=strchr(cmd, '/')) != NULL )) {
-	if (access(cmd, access_mode) == 0) {
-
-	    if (cmd[0] != '/') { /* relative path */
-		if (getcwd(curpath, PATH_MAX) == NULL) {
-		    strcpy(res_path, curpath);
-		    return -1;
-		}
-		if ((strlen(curpath) + strlen(cmd) + 1) > (size_t)PATH_MAX) {
-		    sprintf(res_path, "cmd (as relative path) and cwd is longer than %d",
-			PATH_MAX);
-		    return -1;
-		}
-		sprintf(res_path, "%s/%s", curpath, cmd);
-	    }
-	    else
-	        strcpy(res_path, cmd);
-	    return 0;
-        }
-	else {
-	    sprintf(res_path, "file %s not found", cmd);
-	    return -1;
-	}
-    }
-
-    /* get the PATH variable */
-    if ((pathenv=getenv("PATH")) == NULL) {
-        /* no path to scan, return */
-	sprintf(res_path, "Unable to get PATH env. variable");
-        return -1;
-    }
-
-    /*
-     * walk through each path in PATH.
-     * Each path in PATH is placed in tmppath.
-     * pathenv cannot be modified since it will affect PATH.
-     * If a signal came in while we have modified the PATH
-     * memory, we could create a problem for the caller.
-     */
-
-    curpath[0]='\0';
-
-    cp = pathenv;
-    path = pathenv;
-    lastpath = 0;
-    for (;;) {
-
-	if (lastpath)
-	    break;
-
-	if (cp != pathenv)
-	    path = ++cp;	 /* already set on first iteration */
-
-	/* find end of current path */
-
-	for (; ((*cp != ':') && (*cp != '\0')); cp++);
-
 	/*
-	 * copy path to tmppath so it can be NULL terminated
-	 * and so we do not modify path memory.
+	 * full or relative path was given
 	 */
-	strncpy(tmppath, path, (cp-path) );
-	tmppath[cp-path]='\0';
-#if DEBUG
-printf("search_path: tmppath = %s\n", tmppath);
-#endif
+	if ((cmd[0] == '/') || ((cp = strchr(cmd, '/')) != NULL)) {
+		if (access(cmd, access_mode) == 0) {
 
-	if (*cp == '\0')
-	    lastpath=1;		/* this is the last path entry */
-
-	/* Check lengths so not to overflow res_path */
-	if (strlen(tmppath) + strlen(cmd) + 2 > (size_t)PATH_MAX) {
-	    toolong++;
-	    continue;
+			if (cmd[0] != '/') {	/* relative path */
+				if (getcwd(curpath, PATH_MAX) == NULL) {
+					strcpy(res_path, curpath);
+					return -1;
+				}
+				if ((strlen(curpath) + strlen(cmd) + 1) >
+				    (size_t) PATH_MAX) {
+					sprintf(res_path,
+						"cmd (as relative path) and cwd is longer than %d",
+						PATH_MAX);
+					return -1;
+				}
+				sprintf(res_path, "%s/%s", curpath, cmd);
+			} else
+				strcpy(res_path, cmd);
+			return 0;
+		} else {
+			sprintf(res_path, "file %s not found", cmd);
+			return -1;
+		}
 	}
 
-	sprintf(res_path, "%s/%s", tmppath, cmd);
-#if DEBUG
-printf("search_path: res_path = '%s'\n", res_path);
-#endif
-
-
-	    /* if the path is not full at this point, prepend the current
-	     * path to get the full path.
-	     * Note:  this could not be wise to do when under a protected
-	     * directory.
-	     */
-
-	if (fullpath && res_path[0] != '/') {	/* not a full path */
-	    if (curpath[0] == '\0') {
-		if (getcwd(curpath, PATH_MAX) == NULL) {
-                    strcpy(res_path, curpath);
-                    return -1;
-	 	}
-            }
-            if ((strlen(curpath) + strlen(res_path) + 2) > (size_t)PATH_MAX) {
-		toolong++;
-	        continue;
-            }
-            sprintf(tmppath, "%s/%s", curpath, res_path);
-	    strcpy(res_path, tmppath);
-#if DEBUG
-printf("search_path: full res_path= '%s'\n", res_path);
-#endif
-
+	/* get the PATH variable */
+	if ((pathenv = getenv("PATH")) == NULL) {
+		/* no path to scan, return */
+		sprintf(res_path, "Unable to get PATH env. variable");
+		return -1;
 	}
 
+	/*
+	 * walk through each path in PATH.
+	 * Each path in PATH is placed in tmppath.
+	 * pathenv cannot be modified since it will affect PATH.
+	 * If a signal came in while we have modified the PATH
+	 * memory, we could create a problem for the caller.
+	 */
 
-	if ((ret=access(res_path, access_mode)) == 0) {
+	curpath[0] = '\0';
+
+	cp = pathenv;
+	path = pathenv;
+	lastpath = 0;
+	for (;;) {
+
+		if (lastpath)
+			break;
+
+		if (cp != pathenv)
+			path = ++cp;	/* already set on first iteration */
+
+		/* find end of current path */
+
+		for (; ((*cp != ':') && (*cp != '\0')); cp++) ;
+
+		/*
+		 * copy path to tmppath so it can be NULL terminated
+		 * and so we do not modify path memory.
+		 */
+		strncpy(tmppath, path, (cp - path));
+		tmppath[cp - path] = '\0';
 #if DEBUG
-printf("search_path: found res_path = %s\n", res_path);
+		printf("search_path: tmppath = %s\n", tmppath);
 #endif
-	    return 0;
-	}
-    }
 
-    /* return failure */
-    if (toolong)
-        sprintf(res_path,
-	    "Unable to find file, %d path/file strings were too long", toolong);
-    else
-        strcpy(res_path, "Unable to find file");
-    return 1;	/* not found */
+		if (*cp == '\0')
+			lastpath = 1;	/* this is the last path entry */
+
+		/* Check lengths so not to overflow res_path */
+		if (strlen(tmppath) + strlen(cmd) + 2 > (size_t) PATH_MAX) {
+			toolong++;
+			continue;
+		}
+
+		sprintf(res_path, "%s/%s", tmppath, cmd);
+#if DEBUG
+		printf("search_path: res_path = '%s'\n", res_path);
+#endif
+
+		/* if the path is not full at this point, prepend the current
+		 * path to get the full path.
+		 * Note:  this could not be wise to do when under a protected
+		 * directory.
+		 */
+
+		if (fullpath && res_path[0] != '/') {	/* not a full path */
+			if (curpath[0] == '\0') {
+				if (getcwd(curpath, PATH_MAX) == NULL) {
+					strcpy(res_path, curpath);
+					return -1;
+				}
+			}
+			if ((strlen(curpath) + strlen(res_path) + 2) >
+			    (size_t) PATH_MAX) {
+				toolong++;
+				continue;
+			}
+			sprintf(tmppath, "%s/%s", curpath, res_path);
+			strcpy(res_path, tmppath);
+#if DEBUG
+			printf("search_path: full res_path= '%s'\n", res_path);
+#endif
+
+		}
+
+		if ((ret = access(res_path, access_mode)) == 0) {
+#if DEBUG
+			printf("search_path: found res_path = %s\n", res_path);
+#endif
+			return 0;
+		}
+	}
+
+	/* return failure */
+	if (toolong)
+		sprintf(res_path,
+			"Unable to find file, %d path/file strings were too long",
+			toolong);
+	else
+		strcpy(res_path, "Unable to find file");
+	return 1;		/* not found */
 }
diff --git a/lib/self_exec.c b/lib/self_exec.c
index 31ccdaa..06af313 100644
--- a/lib/self_exec.c
+++ b/lib/self_exec.c
@@ -22,7 +22,7 @@
  * 55 Byward Market Square, 2nd Floor North, Ottawa, ON K1N 9C3, Canada
  */
 
-#define _GNU_SOURCE /* for asprintf */
+#define _GNU_SOURCE		/* for asprintf */
 
 #include "config.h"
 
@@ -34,176 +34,187 @@
 #include "test.h"
 
 /* Set from parse_opts.c: */
-char *child_args;	/* Arguments to child when -C is used */
+char *child_args;		/* Arguments to child when -C is used */
 
-static char *start_cwd;	/* Stores the starting directory for self_exec */
+static char *start_cwd;		/* Stores the starting directory for self_exec */
 
 int asprintf(char **app, const char *fmt, ...)
 {
-        va_list ptr;
-        int rv;
-        char *p;
+	va_list ptr;
+	int rv;
+	char *p;
 
-        /*
-         * First iteration - find out size of buffer required and allocate it.
-         */
-        va_start(ptr, fmt);
-        rv = vsnprintf(NULL, 0, fmt, ptr);
-        va_end(ptr);
+	/*
+	 * First iteration - find out size of buffer required and allocate it.
+	 */
+	va_start(ptr, fmt);
+	rv = vsnprintf(NULL, 0, fmt, ptr);
+	va_end(ptr);
 
-        p = malloc(++rv);                       /* allocate the buffer */
-        *app = p;
-        if (!p) {
-                return -1;
-        }
+	p = malloc(++rv);	/* allocate the buffer */
+	*app = p;
+	if (!p) {
+		return -1;
+	}
 
-        /*
-         * Second iteration - actually produce output.
-         */
-        va_start(ptr, fmt);
-        rv = vsnprintf(p, rv, fmt, ptr);
-        va_end(ptr);
+	/*
+	 * Second iteration - actually produce output.
+	 */
+	va_start(ptr, fmt);
+	rv = vsnprintf(p, rv, fmt, ptr);
+	va_end(ptr);
 
-        return rv;
+	return rv;
 }
 
-void
-maybe_run_child(void (*child)(), char *fmt, ...)
+void maybe_run_child(void (*child) (), char *fmt, ...)
 {
-    va_list ap;
-    char *child_dir;
-    char *p, *tok;
-    int *iptr, i, j;
-    char *s;
-    char **sptr;
-    char *endptr;
+	va_list ap;
+	char *child_dir;
+	char *p, *tok;
+	int *iptr, i, j;
+	char *s;
+	char **sptr;
+	char *endptr;
 
-    /* Store the current directory for later use. */
-    start_cwd = getcwd(NULL, 0);
+	/* Store the current directory for later use. */
+	start_cwd = getcwd(NULL, 0);
 
-    if (child_args) {
-	char *args = strdup(child_args);
+	if (child_args) {
+		char *args = strdup(child_args);
 
-	child_dir = strtok(args, ",");
-	if (strlen(child_dir) == 0) {
-	    tst_brkm(TBROK, NULL, "Could not get directory from -C option");
+		child_dir = strtok(args, ",");
+		if (strlen(child_dir) == 0) {
+			tst_brkm(TBROK, NULL,
+				 "Could not get directory from -C option");
+		}
+
+		va_start(ap, fmt);
+
+		for (p = fmt; *p; p++) {
+			tok = strtok(NULL, ",");
+			if (!tok || strlen(tok) == 0) {
+				tst_brkm(TBROK, NULL,
+					 "Invalid argument to -C option");
+			}
+
+			switch (*p) {
+			case 'd':
+				iptr = va_arg(ap, int *);
+				i = strtol(tok, &endptr, 10);
+				if (*endptr != '\0') {
+					tst_brkm(TBROK, NULL,
+						 "Invalid argument to -C option");
+				}
+				*iptr = i;
+				break;
+			case 'n':
+				j = va_arg(ap, int);
+				i = strtol(tok, &endptr, 10);
+				if (*endptr != '\0') {
+					tst_brkm(TBROK, NULL,
+						 "Invalid argument to -C option");
+				}
+				if (j != i) {
+					va_end(ap);
+					return;
+				}
+				break;
+			case 's':
+				s = va_arg(ap, char *);
+				if (!strncpy(s, tok, strlen(tok) + 1)) {
+					tst_brkm(TBROK, NULL,
+						 "Could not strncpy for -C option");
+				}
+				break;
+			case 'S':
+				sptr = va_arg(ap, char **);
+				*sptr = strdup(tok);
+				if (!*sptr) {
+					tst_brkm(TBROK, NULL,
+						 "Could not strdup for -C option");
+				}
+				break;
+			default:
+				tst_brkm(TBROK, NULL,
+					 "Format string option %c not implemented",
+					 *p);
+				break;
+			}
+		}
+
+		va_end(ap);
+
+		if (chdir(child_dir) < 0)
+			tst_brkm(TBROK, NULL,
+				 "Could not change to %s for child", child_dir);
+
+		(*child) ();
+		tst_resm(TWARN, "Child function returned unexpectedly");
+		/* Exit here? or exit silently? */
+	}
+}
+
+int self_exec(char *argv0, char *fmt, ...)
+{
+	va_list ap;
+	char *p;
+	char *tmp_cwd;
+	char *arg;
+	int ival;
+	char *str;
+
+	if ((tmp_cwd = getcwd(NULL, 0)) == NULL) {
+		tst_resm(TBROK, "Could not getcwd()");
+		return -1;
+	}
+
+	arg = strdup(tmp_cwd);
+
+	if ((arg = strdup(tmp_cwd)) == NULL) {
+		tst_resm(TBROK, "Could not produce self_exec string");
+		return -1;
 	}
 
 	va_start(ap, fmt);
 
 	for (p = fmt; *p; p++) {
-	    tok = strtok(NULL, ",");
-	    if (!tok || strlen(tok) == 0) {
-		tst_brkm(TBROK, NULL, "Invalid argument to -C option");
-	    }
-
-	    switch (*p) {
-	    case 'd':
-		iptr = va_arg(ap, int *);
-		i = strtol(tok, &endptr, 10);
-		if (*endptr != '\0') {
-		    tst_brkm(TBROK, NULL, "Invalid argument to -C option");
+		switch (*p) {
+		case 'd':
+		case 'n':
+			ival = va_arg(ap, int);
+			if (asprintf(&arg, "%s,%d", arg, ival) < 0) {
+				tst_resm(TBROK,
+					 "Could not produce self_exec string");
+				return -1;
+			}
+			break;
+		case 's':
+		case 'S':
+			str = va_arg(ap, char *);
+			if (asprintf(&arg, "%s,%s", arg, str) < 0) {
+				tst_resm(TBROK,
+					 "Could not produce self_exec string");
+				return -1;
+			}
+			break;
+		default:
+			tst_resm(TBROK,
+				 "Format string option %c not implemented", *p);
+			return -1;
+			break;
 		}
-		*iptr = i;
-		break;
-	    case 'n':
-		j = va_arg(ap, int);
-		i = strtol(tok, &endptr, 10);
-		if (*endptr != '\0') {
-		    tst_brkm(TBROK, NULL, "Invalid argument to -C option");
-		}
-		if (j != i) {
-		    va_end(ap);
-		    return;
-		}
-		break;
-	    case 's':
-		s = va_arg(ap, char *);
-		if (!strncpy(s, tok, strlen(tok)+1)) {
-		    tst_brkm(TBROK, NULL, "Could not strncpy for -C option");
-		}
-		break;
-	    case 'S':
-		sptr = va_arg(ap, char **);
-		*sptr = strdup(tok);
-		if (!*sptr) {
-		    tst_brkm(TBROK, NULL, "Could not strdup for -C option");
-		}
-		break;
-	    default:
-		tst_brkm(TBROK, NULL, "Format string option %c not implemented", *p);
-		break;
-	    }
 	}
 
 	va_end(ap);
 
-	if (chdir(child_dir) < 0)
-	    tst_brkm(TBROK, NULL, "Could not change to %s for child", child_dir);
-
-	(*child)();
-	tst_resm(TWARN, "Child function returned unexpectedly");
-	/* Exit here? or exit silently? */
-    }
-}
-
-int
-self_exec(char *argv0, char *fmt, ...)
-{
-    va_list ap;
-    char *p;
-    char *tmp_cwd;
-    char *arg;
-    int ival;
-    char *str;
-
-    if ((tmp_cwd = getcwd(NULL, 0)) == NULL) {
-	tst_resm(TBROK, "Could not getcwd()");
-	return -1;
-    }
-
-    arg = strdup( tmp_cwd );
-
-    if (( arg = strdup( tmp_cwd ))  == NULL) {
-	tst_resm(TBROK, "Could not produce self_exec string");
-	return -1;
-    }
-
-    va_start(ap, fmt);
-
-    for (p = fmt; *p; p++) {
-	switch (*p) {
-	case 'd':
-	case 'n':
-	    ival = va_arg(ap, int);
-	    if (asprintf(&arg, "%s,%d", arg, ival) < 0) {
-		tst_resm(TBROK, "Could not produce self_exec string");
+	if (chdir(start_cwd) < 0) {
+		tst_resm(TBROK, "Could not change to %s for self_exec",
+			 start_cwd);
 		return -1;
-	    }
-	    break;
-	case 's':
-	case 'S':
-	    str = va_arg(ap, char *);
-	    if (asprintf(&arg, "%s,%s", arg, str) < 0) {
-		tst_resm(TBROK, "Could not produce self_exec string");
-		return -1;
-	    }
-	    break;
-	default:
-	    tst_resm(TBROK, "Format string option %c not implemented", *p);
-	    return -1;
-	    break;
 	}
-    }
 
-    va_end(ap);
-
-    if (chdir(start_cwd) < 0) {
-	tst_resm(TBROK, "Could not change to %s for self_exec", start_cwd);
-	return -1;
-    }
-
-    return execlp(argv0, argv0, "-C", arg, (char *) NULL);
+	return execlp(argv0, argv0, "-C", arg, (char *)NULL);
 }
 
 #endif /* UCLINUX */
diff --git a/lib/string_to_tokens.c b/lib/string_to_tokens.c
index d1172ba..f313ee6 100644
--- a/lib/string_to_tokens.c
+++ b/lib/string_to_tokens.c
@@ -73,37 +73,38 @@
  *
  *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
 #include <stdio.h>
-#include <string.h>        /* for string functions */
+#include <string.h>		/* for string functions */
 #include "string_to_tokens.h"
 
 int
-string_to_tokens(char *arg_string, char *arg_array[], int array_size, char *separator)
+string_to_tokens(char *arg_string, char *arg_array[], int array_size,
+		 char *separator)
 {
-   int num_toks = 0;  /* number of tokens found */
-   char *strtok();
+	int num_toks = 0;	/* number of tokens found */
+	char *strtok();
 
-   if (arg_array == NULL || array_size <= 1 || separator == NULL)
-	return -1;
+	if (arg_array == NULL || array_size <= 1 || separator == NULL)
+		return -1;
 
-   /*
-    * Use strtok() to parse 'arg_string', placing pointers to the
-    * individual tokens into the elements of 'arg_array'.
-    */
-   if ((arg_array[num_toks] = strtok(arg_string, separator)) == NULL) {
-	return 0;
-   }
+	/*
+	 * Use strtok() to parse 'arg_string', placing pointers to the
+	 * individual tokens into the elements of 'arg_array'.
+	 */
+	if ((arg_array[num_toks] = strtok(arg_string, separator)) == NULL) {
+		return 0;
+	}
 
-   for (num_toks=1;num_toks<array_size; num_toks++) {
-	if ((arg_array[num_toks] = strtok(NULL, separator)) == NULL)
-	    break;
-   }
+	for (num_toks = 1; num_toks < array_size; num_toks++) {
+		if ((arg_array[num_toks] = strtok(NULL, separator)) == NULL)
+			break;
+	}
 
-   if (num_toks == array_size)
-	arg_array[num_toks] = NULL;
+	if (num_toks == array_size)
+		arg_array[num_toks] = NULL;
 
-   /*
-    * Return the number of tokens that were found in 'arg_string'.
-    */
-   return(num_toks);
+	/*
+	 * Return the number of tokens that were found in 'arg_string'.
+	 */
+	return (num_toks);
 
-} /* end of string_to_tokens */
+}				/* end of string_to_tokens */
diff --git a/lib/system_specific_process_info.c b/lib/system_specific_process_info.c
index e960dfe..bc47d49 100644
--- a/lib/system_specific_process_info.c
+++ b/lib/system_specific_process_info.c
@@ -26,7 +26,6 @@
  *			 of pids currently used ('ps -eT') from max_pids
  */
 
-
 #include <fcntl.h>
 #include <limits.h>
 #include <sys/types.h>
@@ -58,7 +57,6 @@
 #endif
 }
 
-
 int get_free_pids(void)
 {
 	FILE *f;
@@ -66,8 +64,7 @@
 
 	f = popen("ps -eT | wc -l", "r");
 	if (!f) {
-		tst_resm(TBROK, "Could not run 'ps' to calculate used "
-				"pids");
+		tst_resm(TBROK, "Could not run 'ps' to calculate used " "pids");
 		return -1;
 	}
 	rc = fscanf(f, "%i", &used_pids);
@@ -75,7 +72,7 @@
 
 	if (rc != 1 || used_pids < 0) {
 		tst_resm(TBROK, "Could not read output of 'ps' to "
-				"calculate used pids");
+			 "calculate used pids");
 		return -1;
 	}
 
diff --git a/lib/tests/bytes_by_prefix_test.c b/lib/tests/bytes_by_prefix_test.c
index d2dc6a7..4e65bbd 100644
--- a/lib/tests/bytes_by_prefix_test.c
+++ b/lib/tests/bytes_by_prefix_test.c
@@ -159,7 +159,6 @@
 	{"552558G", 4746437078286336LL}
 };
 
-
 static int test_values(void)
 {
 	/*
@@ -168,12 +167,12 @@
 	 * 3rd position of the array denotes the valid long long operations
 	 */
 	int valid_count[3];
-	int tests_number[3]; /* int / long / long long */
+	int tests_number[3];	/* int / long / long long */
 	int i;
 	int error_count = 0;
-	int elements;	/* Number of elements inside the test array. */
+	int elements;		/* Number of elements inside the test array. */
 
-	elements = sizeof(test)/sizeof(struct test_vals);
+	elements = sizeof(test) / sizeof(struct test_vals);
 	/*
 	 * Initializing counters.
 	 */
@@ -205,12 +204,12 @@
 			valid_count[2]++;
 		} else {
 			printf("Test value:%s failed on long long.\n",
-				test[i].val);
+			       test[i].val);
 			error_count++;
 		}
 	}
 
-	elements = sizeof(test_i)/sizeof(struct test_vals);
+	elements = sizeof(test_i) / sizeof(struct test_vals);
 	tests_number[0] += elements;
 
 	/*
@@ -220,13 +219,12 @@
 		if (bytes_by_prefix(test_i[i].val) == test_i[i].res) {
 			valid_count[0]++;
 		} else {
-			printf("Test value:%s failed on int.\n",
-				test_i[i].val);
+			printf("Test value:%s failed on int.\n", test_i[i].val);
 			error_count++;
 		}
 	}
 
-	elements = sizeof(test_l)/sizeof(struct test_vals);
+	elements = sizeof(test_l) / sizeof(struct test_vals);
 	tests_number[1] += elements;
 
 	/*
@@ -237,12 +235,12 @@
 			valid_count[1]++;
 		} else {
 			printf("Test value:%s failed on long.\n",
-				test_l[i].val);
+			       test_l[i].val);
 			error_count++;
 		}
 	}
 
-	elements = sizeof(test_ll)/sizeof(struct test_vals);
+	elements = sizeof(test_ll) / sizeof(struct test_vals);
 	tests_number[2] += elements;
 
 	/*
@@ -253,7 +251,7 @@
 			valid_count[2]++;
 		} else {
 			printf("Test value:%s failed on long long.\n",
-				test_ll[i].val);
+			       test_ll[i].val);
 			error_count++;
 		}
 	}
diff --git a/lib/tests/tst_tmpdir_test.c b/lib/tests/tst_tmpdir_test.c
index f4e6751..8b0065d 100644
--- a/lib/tests/tst_tmpdir_test.c
+++ b/lib/tests/tst_tmpdir_test.c
@@ -59,7 +59,7 @@
 	changed_dir = getcwd(NULL, PATH_MAX);
 
 	if (strcmp(tmp_dir, changed_dir) == 0 &&
-			strcmp(tmp_dir, start_dir) != 0) {
+	    strcmp(tmp_dir, start_dir) != 0) {
 		printf("Temp directory successfully created and switched to\n");
 	} else {
 		printf("Temp directory is wrong!\n");
diff --git a/lib/tlibio.c b/lib/tlibio.c
index 6a62bb7..9104a72 100644
--- a/lib/tlibio.c
+++ b/lib/tlibio.c
@@ -104,15 +104,15 @@
 #include <sys/listio.h>
 #else
 /* for linux or sgi */
-#include <sys/uio.h> /* readv(2)/writev(2) */
-#include <string.h>  /* bzero */
+#include <sys/uio.h>		/* readv(2)/writev(2) */
+#include <string.h>		/* bzero */
 #endif
 #if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX)
 #if !defined(UCLINUX) && !defined(__UCLIBC__)
 #include <aio.h>
 #endif
 #endif
-#include <stdlib.h> /* atoi, abs */
+#include <stdlib.h>		/* atoi, abs */
 
 #include "tlibio.h"		/* defines LIO* marcos */
 #include "random_range.h"
@@ -121,15 +121,14 @@
 #define PATH_MAX	MAXPATHLEN
 #endif
 
-#if 0 /* disabled until it's needed -- roehrich 6/11/97 */
-#define BUG1_workaround	1 /* Work around a condition where aio_return gives
-			   * a value of zero but there is no errno followup
-			   * and the read/write operation actually did its
-			   * job.   spr/pv 705244
-			   */
+#if 0				/* disabled until it's needed -- roehrich 6/11/97 */
+#define BUG1_workaround	1	/* Work around a condition where aio_return gives
+				 * a value of zero but there is no errno followup
+				 * and the read/write operation actually did its
+				 * job.   spr/pv 705244
+				 */
 #endif
 
-
 static void lio_async_signal_handler();
 #ifdef sgi
 static void lio_async_callback_handler();
@@ -138,49 +137,58 @@
 /*
  * Define the structure as used in lio_parse_arg1 and lio_help1
  */
-struct lio_info_type  Lio_info1[] = {
-    { "s", LIO_IO_SYNC, "sync i/o" },
-    { "p", LIO_IO_ASYNC|LIO_WAIT_SIGACTIVE, "async i/o using a loop to wait for a signal" },
-    { "b", LIO_IO_ASYNC|LIO_WAIT_SIGPAUSE, "async i/o using pause" },
-    { "a", LIO_IO_ASYNC|LIO_WAIT_RECALL, "async i/o using recall/aio_suspend" },
+struct lio_info_type Lio_info1[] = {
+	{"s", LIO_IO_SYNC, "sync i/o"},
+	{"p", LIO_IO_ASYNC | LIO_WAIT_SIGACTIVE,
+	 "async i/o using a loop to wait for a signal"},
+	{"b", LIO_IO_ASYNC | LIO_WAIT_SIGPAUSE, "async i/o using pause"},
+	{"a", LIO_IO_ASYNC | LIO_WAIT_RECALL,
+	 "async i/o using recall/aio_suspend"},
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    { "r",
-	LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random sync i/o types and wait methods" },
-    { "R",
-	LIO_RANDOM|LIO_IO_ATYPES|LIO_WAIT_ATYPES, "random i/o types and wait methods" },
+	{"r",
+	 LIO_RANDOM | LIO_IO_TYPES | LIO_WAIT_TYPES,
+	 "random sync i/o types and wait methods"},
+	{"R",
+	 LIO_RANDOM | LIO_IO_ATYPES | LIO_WAIT_ATYPES,
+	 "random i/o types and wait methods"},
 #else
-    { "r",
-	LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random i/o types and wait methods" },
-    { "R",
-	LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random i/o types and wait methods" },
+	{"r",
+	 LIO_RANDOM | LIO_IO_TYPES | LIO_WAIT_TYPES,
+	 "random i/o types and wait methods"},
+	{"R",
+	 LIO_RANDOM | LIO_IO_TYPES | LIO_WAIT_TYPES,
+	 "random i/o types and wait methods"},
 #endif
-    { "l", LIO_IO_SLISTIO|LIO_WAIT_RECALL, "single stride sync listio" },
-    { "L", LIO_IO_ALISTIO|LIO_WAIT_RECALL, "single stride async listio using recall" },
-    { "X", LIO_IO_ALISTIO|LIO_WAIT_SIGPAUSE, "single stride async listio using pause" },
-    { "v", LIO_IO_SYNCV, "single buffer sync readv/writev" },
-    { "P", LIO_IO_SYNCP, "sync pread/pwrite" },
+	{"l", LIO_IO_SLISTIO | LIO_WAIT_RECALL, "single stride sync listio"},
+	{"L", LIO_IO_ALISTIO | LIO_WAIT_RECALL,
+	 "single stride async listio using recall"},
+	{"X", LIO_IO_ALISTIO | LIO_WAIT_SIGPAUSE,
+	 "single stride async listio using pause"},
+	{"v", LIO_IO_SYNCV, "single buffer sync readv/writev"},
+	{"P", LIO_IO_SYNCP, "sync pread/pwrite"},
 };
 
 /*
  * Define the structure used by lio_parse_arg2 and lio_help2
  */
-struct lio_info_type  Lio_info2[] = {
-    { "sync",      LIO_IO_SYNC,		"sync i/o (read/write)"},
-    { "async",     LIO_IO_ASYNC,	"async i/o (reada/writea/aio_read/aio_write)" },
-    { "slistio",   LIO_IO_SLISTIO,	"single stride sync listio" },
-    { "alistio",   LIO_IO_ALISTIO,	"single stride async listio" },
-    { "syncv",     LIO_IO_SYNCV,	"single buffer sync readv/writev"},
-    { "syncp",     LIO_IO_SYNCP,	"pread/pwrite"},
-    { "active",    LIO_WAIT_ACTIVE,	"spin on status/control values" },
-    { "recall",    LIO_WAIT_RECALL,	"use recall(2)/aio_suspend(3) to wait for i/o to complete" },
-    { "sigactive", LIO_WAIT_SIGACTIVE,  "spin waiting for signal" },
-    { "sigpause",  LIO_WAIT_SIGPAUSE,	"call pause(2) to wait for signal" },
+struct lio_info_type Lio_info2[] = {
+	{"sync", LIO_IO_SYNC, "sync i/o (read/write)"},
+	{"async", LIO_IO_ASYNC, "async i/o (reada/writea/aio_read/aio_write)"},
+	{"slistio", LIO_IO_SLISTIO, "single stride sync listio"},
+	{"alistio", LIO_IO_ALISTIO, "single stride async listio"},
+	{"syncv", LIO_IO_SYNCV, "single buffer sync readv/writev"},
+	{"syncp", LIO_IO_SYNCP, "pread/pwrite"},
+	{"active", LIO_WAIT_ACTIVE, "spin on status/control values"},
+	{"recall", LIO_WAIT_RECALL,
+	 "use recall(2)/aio_suspend(3) to wait for i/o to complete"},
+	{"sigactive", LIO_WAIT_SIGACTIVE, "spin waiting for signal"},
+	{"sigpause", LIO_WAIT_SIGPAUSE, "call pause(2) to wait for signal"},
 /* nowait is a touchy thing, it's an accident that this implementation worked at all.  6/27/97 roehrich */
 /*    { "nowait",    LIO_WAIT_NONE,	"do not wait for async io to complete" },*/
-    { "random",    LIO_RANDOM,		"set random bit" },
-    { "randomall",
-	LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES,
-	"all random i/o types and wait methods (except nowait)" },
+	{"random", LIO_RANDOM, "set random bit"},
+	{"randomall",
+	 LIO_RANDOM | LIO_IO_TYPES | LIO_WAIT_TYPES,
+	 "all random i/o types and wait methods (except nowait)"},
 };
 
 char Lio_SysCall[PATH_MAX];	/* string containing last i/o system call */
@@ -194,8 +202,6 @@
 static char Errormsg[500];
 static int Debug_level = 0;
 
-
-
 /***********************************************************************
  * stride_bounds()
  *
@@ -210,16 +216,15 @@
  * (maule, 11/16/95)
  ***********************************************************************/
 
-int
-stride_bounds(offset, stride, nstrides, bytes_per_stride, min, max)
-int	offset;
-int	stride;
-int	nstrides;
-int	bytes_per_stride;
-int	*min;
-int	*max;
+int stride_bounds(offset, stride, nstrides, bytes_per_stride, min, max)
+int offset;
+int stride;
+int nstrides;
+int bytes_per_stride;
+int *min;
+int *max;
 {
-	int	nbytes, min_byte, max_byte;
+	int nbytes, min_byte, max_byte;
 
 	/*
 	 * sanity checks ...
@@ -239,8 +244,7 @@
 	 * bytes referenced.
 	 */
 
-
-	nbytes = abs(stride) * (nstrides-1) + bytes_per_stride;
+	nbytes = abs(stride) * (nstrides - 1) + bytes_per_stride;
 
 	if (stride < 0) {
 		max_byte = offset + bytes_per_stride - 1;
@@ -264,14 +268,13 @@
 /***********************************************************************
  * This function will allow someone to set the debug level.
  ***********************************************************************/
-int
-lio_set_debug(level)
+int lio_set_debug(level)
 {
-    int old;
+	int old;
 
-    old = Debug_level;
-    Debug_level = level;
-    return old;
+	old = Debug_level;
+	Debug_level = level;
+	return old;
 }
 
 /***********************************************************************
@@ -283,29 +286,29 @@
  *
  *  (rrl 04/96)
  ***********************************************************************/
-int
-lio_parse_io_arg1(char *string)
+int lio_parse_io_arg1(char *string)
 {
-    unsigned int ind;
-    int found=0;
-    int mask=0;
+	unsigned int ind;
+	int found = 0;
+	int mask = 0;
 
-    /*
-     * Determine if token is a valid string.
-     */
-    for (ind=0; ind<sizeof(Lio_info1)/sizeof(struct lio_info_type); ind++) {
-        if (strcmp(string, Lio_info1[ind].token) == 0) {
-            mask |= Lio_info1[ind].bits;
-            found = 1;
-            break;
-        }
-    }
+	/*
+	 * Determine if token is a valid string.
+	 */
+	for (ind = 0; ind < sizeof(Lio_info1) / sizeof(struct lio_info_type);
+	     ind++) {
+		if (strcmp(string, Lio_info1[ind].token) == 0) {
+			mask |= Lio_info1[ind].bits;
+			found = 1;
+			break;
+		}
+	}
 
-    if (found == 0) {
-	return -1;
-    }
+	if (found == 0) {
+		return -1;
+	}
 
-    return mask;
+	return mask;
 
 }
 
@@ -315,17 +318,17 @@
  * They will be printed one per line.
  *  (rrl 04/96)
  ***********************************************************************/
-void
-lio_help1(char *prefix)
+void lio_help1(char *prefix)
 {
-    unsigned int ind;
+	unsigned int ind;
 
-    for (ind=0; ind<sizeof(Lio_info1)/sizeof(struct lio_info_type); ind++) {
-        printf("%s %s : %s\n", prefix,
-            Lio_info1[ind].token, Lio_info1[ind].desc);
-    }
+	for (ind = 0; ind < sizeof(Lio_info1) / sizeof(struct lio_info_type);
+	     ind++) {
+		printf("%s %s : %s\n", prefix, Lio_info1[ind].token,
+		       Lio_info1[ind].desc);
+	}
 
-    return;
+	return;
 }
 
 /***********************************************************************
@@ -337,67 +340,68 @@
  *
  *  (rrl 04/96)
  ***********************************************************************/
-int
-lio_parse_io_arg2(char *string, char **badtoken)
+int lio_parse_io_arg2(char *string, char **badtoken)
 {
-   char *token = string;
-   char *cc = token;
-   char savecc;
-   int found;
-   int mask=0;
+	char *token = string;
+	char *cc = token;
+	char savecc;
+	int found;
+	int mask = 0;
 
-   int tmp;
-   unsigned int ind;
-   char chr;
+	int tmp;
+	unsigned int ind;
+	char chr;
 
-   if (token == NULL)
-        return -1;
+	if (token == NULL)
+		return -1;
 
-   for (;;) {
-        for (; ((*cc != ',') && (*cc != '\0')); cc++);
-        savecc = *cc;
-        *cc = '\0';
+	for (;;) {
+		for (; ((*cc != ',') && (*cc != '\0')); cc++) ;
+		savecc = *cc;
+		*cc = '\0';
 
-        found = 0;
+		found = 0;
 
-        /*
-	 * Determine if token is a valid string or number and if
-	 * so, add the bits to the mask.
-          */
-        for (ind=0; ind<sizeof(Lio_info2)/sizeof(struct lio_info_type); ind++) {
-	    if (strcmp(token, Lio_info2[ind].token) == 0) {
-	        mask |= Lio_info2[ind].bits;
-	        found = 1;
-	        break;
-	    }
-        }
+		/*
+		 * Determine if token is a valid string or number and if
+		 * so, add the bits to the mask.
+		 */
+		for (ind = 0;
+		     ind < sizeof(Lio_info2) / sizeof(struct lio_info_type);
+		     ind++) {
+			if (strcmp(token, Lio_info2[ind].token) == 0) {
+				mask |= Lio_info2[ind].bits;
+				found = 1;
+				break;
+			}
+		}
 
-	/*
-	 * If token does not match one of the defined tokens, determine
-         * if it is a number, if so, add the bits.
-	 */
-	if (!found) {
-	    if (sscanf(token, "%i%c", &tmp, &chr) == 1) {
-                mask |= tmp;
-	        found=1;
-	    }
-        }
+		/*
+		 * If token does not match one of the defined tokens, determine
+		 * if it is a number, if so, add the bits.
+		 */
+		if (!found) {
+			if (sscanf(token, "%i%c", &tmp, &chr) == 1) {
+				mask |= tmp;
+				found = 1;
+			}
+		}
 
-        *cc = savecc;
+		*cc = savecc;
 
-        if (!found) {  /* token is not valid */
-            if (badtoken != NULL)
-                *badtoken = token;
-            return(-1);
-        }
+		if (!found) {	/* token is not valid */
+			if (badtoken != NULL)
+				*badtoken = token;
+			return (-1);
+		}
 
-        if (savecc == '\0')
-            break;
+		if (savecc == '\0')
+			break;
 
-        token = ++cc;
-    }
+		token = ++cc;
+	}
 
-    return mask;
+	return mask;
 }
 
 /***********************************************************************
@@ -407,16 +411,16 @@
  *
  * (rrl 04/96)
  ***********************************************************************/
-void
-lio_help2(char *prefix)
+void lio_help2(char *prefix)
 {
-    unsigned int ind;
+	unsigned int ind;
 
-    for (ind=0; ind<sizeof(Lio_info2)/sizeof(struct lio_info_type); ind++) {
-	printf("%s %s : %s\n", prefix,
-	    Lio_info2[ind].token, Lio_info2[ind].desc);
-    }
-    return;
+	for (ind = 0; ind < sizeof(Lio_info2) / sizeof(struct lio_info_type);
+	     ind++) {
+		printf("%s %s : %s\n", prefix, Lio_info2[ind].token,
+		       Lio_info2[ind].desc);
+	}
+	return;
 }
 
 /***********************************************************************
@@ -424,12 +428,12 @@
  * If the handler is called, it will increment the Received_signal
  * global variable.
  ***********************************************************************/
-static void
-lio_async_signal_handler(int sig)
+static void lio_async_signal_handler(int sig)
 {
 	if (Debug_level)
-	    printf("DEBUG %s/%d: received signal %d, a signal caught %d times\n",
-		__FILE__, __LINE__, sig, Received_signal+1);
+		printf
+		    ("DEBUG %s/%d: received signal %d, a signal caught %d times\n",
+		     __FILE__, __LINE__, sig, Received_signal + 1);
 
 	Received_signal++;
 
@@ -442,12 +446,13 @@
  * If the handler is called, it will increment the Received_callback
  * global variable.
  ***********************************************************************/
-static void
-lio_async_callback_handler(sigval_t sigval)
+static void lio_async_callback_handler(sigval_t sigval)
 {
 	if (Debug_level)
-	    printf("DEBUG %s/%d: received callback, nbytes=%ld, a callback called %d times\n",
-		__FILE__, __LINE__, (long)sigval.sival_int, Received_callback+1);
+		printf
+		    ("DEBUG %s/%d: received callback, nbytes=%ld, a callback called %d times\n",
+		     __FILE__, __LINE__, (long)sigval.sival_int,
+		     Received_callback + 1);
 
 	Received_callback++;
 
@@ -469,30 +474,29 @@
  *
  * (rrl 04/96)
  ***********************************************************************/
-int
-lio_random_methods(long curr_mask)
+int lio_random_methods(long curr_mask)
 {
-    int mask=0;
+	int mask = 0;
 
-    /* remove random select, io type, and wait method bits from curr_mask */
-    mask = curr_mask & (~(LIO_IO_TYPES | LIO_WAIT_TYPES | LIO_RANDOM));
+	/* remove random select, io type, and wait method bits from curr_mask */
+	mask = curr_mask & (~(LIO_IO_TYPES | LIO_WAIT_TYPES | LIO_RANDOM));
 
-    /* randomly select io type from specified io types */
-    mask = mask | random_bit(curr_mask & LIO_IO_TYPES);
+	/* randomly select io type from specified io types */
+	mask = mask | random_bit(curr_mask & LIO_IO_TYPES);
 
-    /* randomly select wait methods  from specified wait methods */
-    mask = mask | random_bit(curr_mask & LIO_WAIT_TYPES);
+	/* randomly select wait methods  from specified wait methods */
+	mask = mask | random_bit(curr_mask & LIO_WAIT_TYPES);
 
-    return mask;
+	return mask;
 }
 
 static void wait4sync_io(int fd, int read)
 {
-  fd_set s;
-  FD_ZERO(&s);
-  FD_SET(fd, &s);
+	fd_set s;
+	FD_ZERO(&s);
+	FD_SET(fd, &s);
 
-  select(fd+1, read ? &s : NULL, read ? NULL : &s, NULL, NULL);
+	select(fd + 1, read ? &s : NULL, read ? NULL : &s, NULL, NULL);
 }
 
 /***********************************************************************
@@ -535,166 +539,168 @@
  *
  * (rrl 04/96)
  ***********************************************************************/
-int
-lio_write_buffer(fd, method, buffer, size, sig, errmsg, wrd)
-int fd;		/* open file descriptor */
-int method;	/* contains io type and wait method bitmask */
-char *buffer;	/* pointer to buffer */
-int size;	/* the size of the io */
-int sig;	/* signal to use if async io */
-char **errmsg;	/* char pointer that will be updated to point to err message */
-long wrd;	/* to allow future features, use zero for now */
+int lio_write_buffer(fd, method, buffer, size, sig, errmsg, wrd)
+int fd;				/* open file descriptor */
+int method;			/* contains io type and wait method bitmask */
+char *buffer;			/* pointer to buffer */
+int size;			/* the size of the io */
+int sig;			/* signal to use if async io */
+char **errmsg;			/* char pointer that will be updated to point to err message */
+long wrd;			/* to allow future features, use zero for now */
 {
-    int ret = 0;	/* syscall return or used to get random method */
-    char *io_type;		/* Holds string of type of io */
-    int omethod = method;
-    int listio_cmd;		/* Holds the listio/lio_listio cmd */
+	int ret = 0;		/* syscall return or used to get random method */
+	char *io_type;		/* Holds string of type of io */
+	int omethod = method;
+	int listio_cmd;		/* Holds the listio/lio_listio cmd */
 #ifdef  CRAY
-    struct listreq request;	/* Used when a listio is wanted */
-    struct iosw status, *statptr[1];
+	struct listreq request;	/* Used when a listio is wanted */
+	struct iosw status, *statptr[1];
 #else
-    /* for linux or sgi */
-    struct iovec iov;	/* iovec for writev(2) */
+	/* for linux or sgi */
+	struct iovec iov;	/* iovec for writev(2) */
 #endif
 #if defined (sgi)
-    aiocb_t aiocbp;	/* POSIX aio control block */
-    aiocb_t *aiolist[1]; /* list of aio control blocks for lio_listio */
-    off64_t poffset;	/* pwrite(2) offset */
+	aiocb_t aiocbp;		/* POSIX aio control block */
+	aiocb_t *aiolist[1];	/* list of aio control blocks for lio_listio */
+	off64_t poffset;	/* pwrite(2) offset */
 #endif
 #if defined(__linux__) && !defined(__UCLIBC__)
 	struct aiocb aiocbp;	/* POSIX aio control block */
-	struct aiocb *aiolist[1]; /* list of aio control blocks for lio_listio */
+	struct aiocb *aiolist[1];	/* list of aio control blocks for lio_listio */
 	off64_t poffset;	/* pwrite(2) offset */
 #endif
-    /*
-     * If LIO_RANDOM bit specified, get new method randomly.
-     */
-    if (method & LIO_RANDOM) {
-	if (Debug_level > 3)
-		printf("DEBUG %s/%d: method mask to choose from: %#o\n", __FILE__, __LINE__, method );
-	method = lio_random_methods(method);
-	if (Debug_level > 2)
-	    printf("DEBUG %s/%d: random chosen method %#o\n", __FILE__, __LINE__, method);
-    }
+	/*
+	 * If LIO_RANDOM bit specified, get new method randomly.
+	 */
+	if (method & LIO_RANDOM) {
+		if (Debug_level > 3)
+			printf("DEBUG %s/%d: method mask to choose from: %#o\n",
+			       __FILE__, __LINE__, method);
+		method = lio_random_methods(method);
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: random chosen method %#o\n",
+			       __FILE__, __LINE__, method);
+	}
 
-    if (errmsg != NULL)
-	*errmsg = Errormsg;
+	if (errmsg != NULL)
+		*errmsg = Errormsg;
 
-    Rec_signal=Received_signal;	/* get the current number of signals received */
+	Rec_signal = Received_signal;	/* get the current number of signals received */
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    Rec_callback=Received_callback;	/* get the current number of callbacks received */
+	Rec_callback = Received_callback;	/* get the current number of callbacks received */
 #endif
 
 #ifdef  CRAY
-    memset(&status, 0x00, sizeof(struct iosw));
-    memset(&request, 0x00, sizeof(struct listreq));
-    statptr[0] = &status;
+	memset(&status, 0x00, sizeof(struct iosw));
+	memset(&request, 0x00, sizeof(struct listreq));
+	statptr[0] = &status;
 #else
-    /* for linux or sgi */
-    memset(&iov, 0x00, sizeof(struct iovec));
-    iov.iov_base = buffer;
-    iov.iov_len = size;
+	/* for linux or sgi */
+	memset(&iov, 0x00, sizeof(struct iovec));
+	iov.iov_base = buffer;
+	iov.iov_len = size;
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
 #if defined(sgi)
-    memset(&aiocbp, 0x00, sizeof(aiocb_t));
+	memset(&aiocbp, 0x00, sizeof(aiocb_t));
 #else
 	memset(&aiocbp, 0x00, sizeof(struct aiocb));
 #endif
-    aiocbp.aio_fildes = fd;
-    aiocbp.aio_nbytes = size;
-    aiocbp.aio_buf = buffer;
+	aiocbp.aio_fildes = fd;
+	aiocbp.aio_nbytes = size;
+	aiocbp.aio_buf = buffer;
 /*    aiocbp.aio_offset = lseek( fd, 0, SEEK_CUR ); -- set below */
-    aiocbp.aio_sigevent.sigev_notify = SIGEV_NONE;
-    aiocbp.aio_sigevent.sigev_signo = 0;
+	aiocbp.aio_sigevent.sigev_notify = SIGEV_NONE;
+	aiocbp.aio_sigevent.sigev_signo = 0;
 #ifdef sgi
-    aiocbp.aio_sigevent.sigev_func = NULL;
-    aiocbp.aio_sigevent.sigev_value.sival_int = 0;
+	aiocbp.aio_sigevent.sigev_func = NULL;
+	aiocbp.aio_sigevent.sigev_value.sival_int = 0;
 #elif defined(__linux__) && !defined(__UCLIBC__)
 	aiocbp.aio_sigevent.sigev_notify_function = NULL;
 	aiocbp.aio_sigevent.sigev_notify_attributes = 0;
 #endif
-    aiolist[0] = &aiocbp;
+	aiolist[0] = &aiocbp;
 
-    if ((ret = lseek( fd, 0, SEEK_CUR )) == -1) {
-	ret = 0;
-	/* If there is an error and it is not ESPIPE then kick out the error.
-	 * If the fd is a fifo then we have to make sure that
-	 * lio_random_methods() didn't select pwrite/pread; if it did then
-	 * switch to write/read.
-	 */
-	if (errno == ESPIPE) {
-		if (method & LIO_IO_SYNCP) {
-			if (omethod & LIO_RANDOM) {
-				method &= ~LIO_IO_SYNCP;
-				method |= LIO_IO_SYNC;
-				if (Debug_level > 2)
-					printf("DEBUG %s/%d: random chosen method switched to %#o for fifo\n", __FILE__, __LINE__, method );
+	if ((ret = lseek(fd, 0, SEEK_CUR)) == -1) {
+		ret = 0;
+		/* If there is an error and it is not ESPIPE then kick out the error.
+		 * If the fd is a fifo then we have to make sure that
+		 * lio_random_methods() didn't select pwrite/pread; if it did then
+		 * switch to write/read.
+		 */
+		if (errno == ESPIPE) {
+			if (method & LIO_IO_SYNCP) {
+				if (omethod & LIO_RANDOM) {
+					method &= ~LIO_IO_SYNCP;
+					method |= LIO_IO_SYNC;
+					if (Debug_level > 2)
+						printf
+						    ("DEBUG %s/%d: random chosen method switched to %#o for fifo\n",
+						     __FILE__, __LINE__,
+						     method);
+				} else if (Debug_level) {
+					printf
+					    ("DEBUG %s/%d: pwrite will fail when it writes to a fifo\n",
+					     __FILE__, __LINE__);
+				}
 			}
-			else if (Debug_level) {
-				printf("DEBUG %s/%d: pwrite will fail when it writes to a fifo\n",
-				       __FILE__, __LINE__ );
-			}
+			/* else: let it ride */
+		} else {
+			sprintf(Errormsg,
+				"%s/%d lseek(fd=%d,0,SEEK_CUR) failed, errno=%d  %s",
+				__FILE__, __LINE__, fd, errno, strerror(errno));
+			return -errno;
 		}
-		/* else: let it ride */
 	}
-	else{
-		sprintf(Errormsg, "%s/%d lseek(fd=%d,0,SEEK_CUR) failed, errno=%d  %s",
-			__FILE__, __LINE__, fd, errno, strerror(errno));
-		return -errno;
-	}
-    }
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    poffset = (off64_t)ret;
+	poffset = (off64_t) ret;
 #endif
-    aiocbp.aio_offset = ret;
+	aiocbp.aio_offset = ret;
 
 #endif
 
-    /*
-     * If the LIO_USE_SIGNAL bit is not set, only use the signal
-     * if the LIO_WAIT_SIGPAUSE or the LIO_WAIT_SIGACTIVE bits are bit.
-     * Otherwise there is not necessary a signal handler to trap
-     * the signal.
-     */
-    if (sig && !(method & LIO_USE_SIGNAL) &&
-	! (method & LIO_WAIT_SIGTYPES) ) {
-
-	sig=0;	/* ignore signal parameter */
-    }
-
-#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    if (sig && (method & LIO_WAIT_CBTYPES))
-	sig=0; /* ignore signal parameter */
-#endif
-
-    /*
-     * only setup signal hander if sig was specified and
-     * a sig wait method was specified.
-     * Doing this will change the handler for this signal.  The
-     * old signal handler will not be restored.
-     *** restoring the signal handler could be added ***
-     */
-
-    if (sig &&  (method & LIO_WAIT_SIGTYPES)) {
-#ifdef CRAY
-        sigctl(SCTL_REG, sig, lio_async_signal_handler);
-#endif
-#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-        aiocbp.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-	aiocbp.aio_sigevent.sigev_signo = sig;
-        sigset(sig, lio_async_signal_handler);
-#endif /* sgi */
-    }
-#if defined(sgi)
-    else if (method & LIO_WAIT_CBTYPES) {
-	/* sival_int just has to be something that I can use
-	 * to identify the callback, and "size" happens to be handy...
+	/*
+	 * If the LIO_USE_SIGNAL bit is not set, only use the signal
+	 * if the LIO_WAIT_SIGPAUSE or the LIO_WAIT_SIGACTIVE bits are bit.
+	 * Otherwise there is not necessary a signal handler to trap
+	 * the signal.
 	 */
-	aiocbp.aio_sigevent.sigev_notify = SIGEV_CALLBACK;
-	aiocbp.aio_sigevent.sigev_func = lio_async_callback_handler;
-	aiocbp.aio_sigevent.sigev_value.sival_int = size;
-    }
+	if (sig && !(method & LIO_USE_SIGNAL) && !(method & LIO_WAIT_SIGTYPES)) {
+
+		sig = 0;	/* ignore signal parameter */
+	}
+#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
+	if (sig && (method & LIO_WAIT_CBTYPES))
+		sig = 0;	/* ignore signal parameter */
+#endif
+
+	/*
+	 * only setup signal hander if sig was specified and
+	 * a sig wait method was specified.
+	 * Doing this will change the handler for this signal.  The
+	 * old signal handler will not be restored.
+	 *** restoring the signal handler could be added ***
+	 */
+
+	if (sig && (method & LIO_WAIT_SIGTYPES)) {
+#ifdef CRAY
+		sigctl(SCTL_REG, sig, lio_async_signal_handler);
+#endif
+#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
+		aiocbp.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
+		aiocbp.aio_sigevent.sigev_signo = sig;
+		sigset(sig, lio_async_signal_handler);
+#endif /* sgi */
+	}
+#if defined(sgi)
+	else if (method & LIO_WAIT_CBTYPES) {
+		/* sival_int just has to be something that I can use
+		 * to identify the callback, and "size" happens to be handy...
+		 */
+		aiocbp.aio_sigevent.sigev_notify = SIGEV_CALLBACK;
+		aiocbp.aio_sigevent.sigev_func = lio_async_callback_handler;
+		aiocbp.aio_sigevent.sigev_value.sival_int = size;
+	}
 #endif
 #if defined(__linux__) && !defined(__UCLIBC__)
 	else if (method & LIO_WAIT_CBTYPES) {
@@ -702,347 +708,367 @@
 		 * to identify the callback, and "size" happens to be handy...
 		 */
 		aiocbp.aio_sigevent.sigev_notify = SIGEV_THREAD;
-		aiocbp.aio_sigevent.sigev_notify_function = lio_async_callback_handler;
-		aiocbp.aio_sigevent.sigev_notify_attributes = (void*)(uintptr_t)size;
+		aiocbp.aio_sigevent.sigev_notify_function =
+		    lio_async_callback_handler;
+		aiocbp.aio_sigevent.sigev_notify_attributes =
+		    (void *)(uintptr_t) size;
 	}
 #endif
-    /*
-     * Determine the system call that will be called and produce
-     * the string of the system call and place it in Lio_SysCall.
-     * Also update the io_type char pointer to give brief description
-     * of system call.  Execute the system call and check for
-     * system call failure.  If sync i/o, return the number of
-     * bytes written/read.
-     */
-
-	if ((method & LIO_IO_SYNC) || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0) {
 	/*
-	 * write(2) is used if LIO_IO_SYNC bit is set or not none
-         * of the LIO_IO_TYPES bits are set (default).
-         */
+	 * Determine the system call that will be called and produce
+	 * the string of the system call and place it in Lio_SysCall.
+	 * Also update the io_type char pointer to give brief description
+	 * of system call.  Execute the system call and check for
+	 * system call failure.  If sync i/o, return the number of
+	 * bytes written/read.
+	 */
 
-	sprintf(Lio_SysCall,
-	    "write(%d, buf, %d)", fd, size);
-	io_type="write";
+	if ((method & LIO_IO_SYNC)
+	    || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0) {
+		/*
+		 * write(2) is used if LIO_IO_SYNC bit is set or not none
+		 * of the LIO_IO_TYPES bits are set (default).
+		 */
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-        while (1) {
-          if (((ret = write(fd, buffer, size)) == -1) && errno!=EAGAIN && errno!=EINTR) {
-            sprintf(Errormsg, "%s/%d write(%d, buf, %d) ret:-1, errno=%d %s",
-                    __FILE__, __LINE__,
-                    fd, size, errno, strerror(errno));
-            return -errno;
-          }
+		sprintf(Lio_SysCall, "write(%d, buf, %d)", fd, size);
+		io_type = "write";
 
-          if (ret!=-1) {
-            if (ret != size) {
-              sprintf(Errormsg,
-                      "%s/%d write(%d, buf, %d) returned=%d",
-                      __FILE__, __LINE__,
-                      fd, size, ret);
-              size-=ret;
-              buffer+=ret;
-            }
-            else {
-              if (Debug_level > 1)
-                printf("DEBUG %s/%d: write completed without error (ret %d)\n",
-                       __FILE__, __LINE__, ret);
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+		while (1) {
+			if (((ret = write(fd, buffer, size)) == -1)
+			    && errno != EAGAIN && errno != EINTR) {
+				sprintf(Errormsg,
+					"%s/%d write(%d, buf, %d) ret:-1, errno=%d %s",
+					__FILE__, __LINE__, fd, size, errno,
+					strerror(errno));
+				return -errno;
+			}
 
-              return ret;
-            }
-          }
-          wait4sync_io(fd, 0);
-        }
+			if (ret != -1) {
+				if (ret != size) {
+					sprintf(Errormsg,
+						"%s/%d write(%d, buf, %d) returned=%d",
+						__FILE__, __LINE__,
+						fd, size, ret);
+					size -= ret;
+					buffer += ret;
+				} else {
+					if (Debug_level > 1)
+						printf
+						    ("DEBUG %s/%d: write completed without error (ret %d)\n",
+						     __FILE__, __LINE__, ret);
 
-    }
+					return ret;
+				}
+			}
+			wait4sync_io(fd, 0);
+		}
 
-    else if (method & LIO_IO_ASYNC) {
-#ifdef CRAY
-	sprintf(Lio_SysCall,
-	    "writea(%d, buf, %d, &status, %d)", fd, size, sig);
-	io_type="writea";
-
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-
-	sigoff();
-	if ((ret = writea(fd, buffer, size, &status, sig)) == -1) {
-	    sprintf(Errormsg,
-		"%s/%d writea(%d, buf, %d, &stat, %d) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, sig, errno, strerror(errno));
-	    sigon();
-	    return -errno;
 	}
+
+	else if (method & LIO_IO_ASYNC) {
+#ifdef CRAY
+		sprintf(Lio_SysCall,
+			"writea(%d, buf, %d, &status, %d)", fd, size, sig);
+		io_type = "writea";
+
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+
+		sigoff();
+		if ((ret = writea(fd, buffer, size, &status, sig)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d writea(%d, buf, %d, &stat, %d) ret:-1, errno=%d %s",
+				__FILE__, __LINE__,
+				fd, size, sig, errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	sprintf(Lio_SysCall,
-	    "aio_write(fildes=%d, buf, nbytes=%d, signo=%d)", fd, size, sig);
-	io_type="aio_write";
+		sprintf(Lio_SysCall,
+			"aio_write(fildes=%d, buf, nbytes=%d, signo=%d)", fd,
+			size, sig);
+		io_type = "aio_write";
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-		sighold( sig );
-	if ((ret = aio_write(&aiocbp)) == -1) {
-	    sprintf(Errormsg,
-		"%s/%d aio_write(fildes=%d, buf, nbytes=%d, signo=%d) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, sig, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-	    return -errno;
-	}
+		if (sig)
+			sighold(sig);
+		if ((ret = aio_write(&aiocbp)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d aio_write(fildes=%d, buf, nbytes=%d, signo=%d) ret:-1, errno=%d %s",
+				__FILE__, __LINE__,
+				fd, size, sig, errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
 #endif
-    } /* LIO_IO_ASYNC */
-
-    else if (method & LIO_IO_SLISTIO) {
+	}
+	/* LIO_IO_ASYNC */
+	else if (method & LIO_IO_SLISTIO) {
 #ifdef CRAY
-	request.li_opcode = LO_WRITE;
-	request.li_fildes = fd;
-        request.li_buf = buffer;
-        request.li_nbyte = size;
-        request.li_status = &status;
-        request.li_signo = sig;
-        request.li_nstride = 0;
-        request.li_filstride = 0;
-        request.li_memstride = 0;
+		request.li_opcode = LO_WRITE;
+		request.li_fildes = fd;
+		request.li_buf = buffer;
+		request.li_nbyte = size;
+		request.li_status = &status;
+		request.li_signo = sig;
+		request.li_nstride = 0;
+		request.li_filstride = 0;
+		request.li_memstride = 0;
 
-	listio_cmd=LC_WAIT;
-	io_type="listio(2) sync write";
+		listio_cmd = LC_WAIT;
+		io_type = "listio(2) sync write";
 
-	sprintf(Lio_SysCall,
-		"listio(LC_WAIT, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"listio(LC_WAIT, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	sigoff();
-	if (listio(listio_cmd, &request, 1) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    sigon();
-            return -errno;
-        }
+		sigoff();
+		if (listio(listio_cmd, &request, 1) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 
-	if (Debug_level > 1)
-            printf("DEBUG %s/%d: %s did not return -1\n",
-		__FILE__, __LINE__, Lio_SysCall);
+		if (Debug_level > 1)
+			printf("DEBUG %s/%d: %s did not return -1\n",
+			       __FILE__, __LINE__, Lio_SysCall);
 
-	ret=lio_check_asyncio(io_type, size,  &status);
-	return ret;
+		ret = lio_check_asyncio(io_type, size, &status);
+		return ret;
 
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
 
-	aiocbp.aio_lio_opcode = LIO_WRITE;
-	listio_cmd=LIO_WAIT;
-	io_type="lio_listio(3) sync write";
+		aiocbp.aio_lio_opcode = LIO_WRITE;
+		listio_cmd = LIO_WAIT;
+		io_type = "lio_listio(3) sync write";
 
-	sprintf(Lio_SysCall,
-		"lio_listio(LIO_WAIT, aiolist, 1, NULL) LIO_WRITE, fd:%d, nbyte:%d, sig:%d",
-                fd, size, sig );
+		sprintf(Lio_SysCall,
+			"lio_listio(LIO_WAIT, aiolist, 1, NULL) LIO_WRITE, fd:%d, nbyte:%d, sig:%d",
+			fd, size, sig);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-	    sighold( sig );
-	if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-            return -errno;
-        }
+		if (sig)
+			sighold(sig);
+		if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
 
-	if (Debug_level > 1)
-            printf("DEBUG %s/%d: %s did not return -1\n",
-		__FILE__, __LINE__, Lio_SysCall);
+		if (Debug_level > 1)
+			printf("DEBUG %s/%d: %s did not return -1\n",
+			       __FILE__, __LINE__, Lio_SysCall);
 
-	ret=lio_check_asyncio(io_type, size,  &aiocbp, method);
-	return ret;
+		ret = lio_check_asyncio(io_type, size, &aiocbp, method);
+		return ret;
 #endif
-    } /* LIO_IO_SLISTIO */
-
-    else if (method & LIO_IO_ALISTIO) {
+	}
+	/* LIO_IO_SLISTIO */
+	else if (method & LIO_IO_ALISTIO) {
 #ifdef CRAY
-	request.li_opcode = LO_WRITE;
-	request.li_fildes = fd;
-        request.li_buf = buffer;
-        request.li_nbyte = size;
-        request.li_status = &status;
-        request.li_signo = sig;
-        request.li_nstride = 0;
-        request.li_filstride = 0;
-        request.li_memstride = 0;
+		request.li_opcode = LO_WRITE;
+		request.li_fildes = fd;
+		request.li_buf = buffer;
+		request.li_nbyte = size;
+		request.li_status = &status;
+		request.li_signo = sig;
+		request.li_nstride = 0;
+		request.li_filstride = 0;
+		request.li_memstride = 0;
 
-	listio_cmd=LC_START;
-	io_type="listio(2) async write";
+		listio_cmd = LC_START;
+		io_type = "listio(2) async write";
 
-	sprintf(Lio_SysCall,
-		"listio(LC_START, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"listio(LC_START, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	sigoff();
-	if (listio(listio_cmd, &request, 1) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    sigon();
-            return -errno;
-        }
+		sigoff();
+		if (listio(listio_cmd, &request, 1) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 #endif
 #if defined (sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	aiocbp.aio_lio_opcode = LIO_WRITE;
-	listio_cmd=LIO_NOWAIT;
-	io_type="lio_listio(3) async write";
+		aiocbp.aio_lio_opcode = LIO_WRITE;
+		listio_cmd = LIO_NOWAIT;
+		io_type = "lio_listio(3) async write";
 
-	sprintf(Lio_SysCall,
-		"lio_listio(LIO_NOWAIT, aiolist, 1, NULL) LIO_WRITE, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"lio_listio(LIO_NOWAIT, aiolist, 1, NULL) LIO_WRITE, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-		sighold( sig );
-	if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-            return -errno;
-        }
+		if (sig)
+			sighold(sig);
+		if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
 #endif
-    }/* LIO_IO_ALISTIO */
-
+	}
+	/* LIO_IO_ALISTIO */
 #ifndef CRAY
-    else if (method & LIO_IO_SYNCV) {
-	io_type="writev(2)";
+	else if (method & LIO_IO_SYNCV) {
+		io_type = "writev(2)";
 
-	sprintf(Lio_SysCall,
-		"writev(%d, &iov, 1) nbyte:%d", fd, size);
+		sprintf(Lio_SysCall, "writev(%d, &iov, 1) nbyte:%d", fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-	if ((ret = writev(fd, &iov, 1)) == -1) {
-	    sprintf(Errormsg, "%s/%d writev(%d, iov, 1) nbyte:%d ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, errno, strerror(errno));
-	    return -errno;
-	}
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+		if ((ret = writev(fd, &iov, 1)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d writev(%d, iov, 1) nbyte:%d ret:-1, errno=%d %s",
+				__FILE__, __LINE__, fd, size, errno,
+				strerror(errno));
+			return -errno;
+		}
 
-	if (ret != size) {
-            sprintf(Errormsg,
-		"%s/%d writev(%d, iov, 1) nbyte:%d returned=%d",
-		    __FILE__, __LINE__,
-		    fd, size, ret);
-        }
-        else if (Debug_level > 1)
-            printf("DEBUG %s/%d: writev completed without error (ret %d)\n",
-                __FILE__, __LINE__, ret);
+		if (ret != size) {
+			sprintf(Errormsg,
+				"%s/%d writev(%d, iov, 1) nbyte:%d returned=%d",
+				__FILE__, __LINE__, fd, size, ret);
+		} else if (Debug_level > 1)
+			printf
+			    ("DEBUG %s/%d: writev completed without error (ret %d)\n",
+			     __FILE__, __LINE__, ret);
 
-        return ret;
-    } /* LIO_IO_SYNCV */
+		return ret;
+	}			/* LIO_IO_SYNCV */
 #endif
 
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    else if (method & LIO_IO_SYNCP) {
-	io_type="pwrite(2)";
+	else if (method & LIO_IO_SYNCP) {
+		io_type = "pwrite(2)";
 
-	sprintf(Lio_SysCall,
-						"pwrite(%d, buf, %d, %lld)", fd, size, (long long)poffset);
+		sprintf(Lio_SysCall,
+			"pwrite(%d, buf, %d, %lld)", fd, size,
+			(long long)poffset);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-	if ((ret = pwrite(fd, buffer, size, poffset)) == -1) {
-	    sprintf(Errormsg, "%s/%d pwrite(%d, buf, %d, %lld) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-							fd, size, (long long)poffset, errno, strerror(errno));
-	    return -errno;
-	}
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+		if ((ret = pwrite(fd, buffer, size, poffset)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d pwrite(%d, buf, %d, %lld) ret:-1, errno=%d %s",
+				__FILE__, __LINE__, fd, size,
+				(long long)poffset, errno, strerror(errno));
+			return -errno;
+		}
 
-	if (ret != size) {
-            sprintf(Errormsg,
-		"%s/%d pwrite(%d, buf, %d, %lld) returned=%d",
-		    __FILE__, __LINE__,
-							fd, size, (long long)poffset, ret);
-        }
-        else if (Debug_level > 1)
-            printf("DEBUG %s/%d: pwrite completed without error (ret %d)\n",
-                __FILE__, __LINE__, ret);
+		if (ret != size) {
+			sprintf(Errormsg,
+				"%s/%d pwrite(%d, buf, %d, %lld) returned=%d",
+				__FILE__, __LINE__,
+				fd, size, (long long)poffset, ret);
+		} else if (Debug_level > 1)
+			printf
+			    ("DEBUG %s/%d: pwrite completed without error (ret %d)\n",
+			     __FILE__, __LINE__, ret);
 
-        return ret;
-    } /* LIO_IO_SYNCP */
+		return ret;
+	}			/* LIO_IO_SYNCP */
 #endif
 
-    else {
-	printf("DEBUG %s/%d: No I/O method chosen\n", __FILE__, __LINE__ );
-	return -1;
-    }
+	else {
+		printf("DEBUG %s/%d: No I/O method chosen\n", __FILE__,
+		       __LINE__);
+		return -1;
+	}
 
-    /*
-     * wait for async io to complete.
-     */
+	/*
+	 * wait for async io to complete.
+	 */
 #ifdef CRAY
-    ret=lio_wait4asyncio(method, fd, statptr);
+	ret = lio_wait4asyncio(method, fd, statptr);
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    ret=lio_wait4asyncio(method, fd, &aiocbp);
+	ret = lio_wait4asyncio(method, fd, &aiocbp);
 #endif
 
-    /*
-     * If there was an error waiting for async i/o to complete,
-     * return the error value (errno) to the caller.
-     * Note: Errormsg should already have been updated.
-     */
-    if (ret < 0) {
+	/*
+	 * If there was an error waiting for async i/o to complete,
+	 * return the error value (errno) to the caller.
+	 * Note: Errormsg should already have been updated.
+	 */
+	if (ret < 0) {
+		return ret;
+	}
+
+	/*
+	 * If i/o was not waited for (may not have been completed at this time),
+	 * return the size that was requested.
+	 */
+	if (ret == 1)
+		return size;
+
+	/*
+	 * check that async io was successful.
+	 * Note:  if the there was an system call failure, -errno
+	 * was returned and Errormsg should already have been updated.
+	 * If amount i/o was different than size, Errormsg should already
+	 * have been updated but the actual i/o size if returned.
+	 */
+
+#ifdef CRAY
+	ret = lio_check_asyncio(io_type, size, &status);
+#endif
+#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
+	ret = lio_check_asyncio(io_type, size, &aiocbp, method);
+#endif
+
 	return ret;
-    }
-
-    /*
-     * If i/o was not waited for (may not have been completed at this time),
-     * return the size that was requested.
-     */
-    if (ret == 1)
-	return size;
-
-    /*
-     * check that async io was successful.
-     * Note:  if the there was an system call failure, -errno
-     * was returned and Errormsg should already have been updated.
-     * If amount i/o was different than size, Errormsg should already
-     * have been updated but the actual i/o size if returned.
-     */
-
-#ifdef CRAY
-    ret=lio_check_asyncio(io_type, size, &status);
-#endif
-#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    ret=lio_check_asyncio(io_type, size, &aiocbp, method);
-#endif
-
-    return ret;
-}	/* end of lio_write_buffer */
+}				/* end of lio_write_buffer */
 
 /***********************************************************************
  * Generic read function
@@ -1084,518 +1110,540 @@
  *
  * (rrl 04/96)
  ***********************************************************************/
-int
-lio_read_buffer(fd, method, buffer, size, sig, errmsg, wrd)
-int fd;		/* open file descriptor */
-int method;	/* contains io type and wait method bitmask */
-char *buffer;	/* pointer to buffer */
-int size;	/* the size of the io */
-int sig;	/* signal to use if async io */
-char **errmsg;	/* char pointer that will be updated to point to err message */
-long wrd;	/* to allow future features, use zero for now */
+int lio_read_buffer(fd, method, buffer, size, sig, errmsg, wrd)
+int fd;				/* open file descriptor */
+int method;			/* contains io type and wait method bitmask */
+char *buffer;			/* pointer to buffer */
+int size;			/* the size of the io */
+int sig;			/* signal to use if async io */
+char **errmsg;			/* char pointer that will be updated to point to err message */
+long wrd;			/* to allow future features, use zero for now */
 {
-    int ret = 0;	/* syscall return or used to get random method */
-    char *io_type;		/* Holds string of type of io */
-    int listio_cmd;		/* Holds the listio/lio_listio cmd */
-    int omethod = method;
+	int ret = 0;		/* syscall return or used to get random method */
+	char *io_type;		/* Holds string of type of io */
+	int listio_cmd;		/* Holds the listio/lio_listio cmd */
+	int omethod = method;
 #ifdef  CRAY
-    struct listreq request;	/* Used when a listio is wanted */
-    struct iosw status, *statptr[1];
+	struct listreq request;	/* Used when a listio is wanted */
+	struct iosw status, *statptr[1];
 #else
-    /* for linux or sgi */
-    struct iovec iov; /* iovec for readv(2) */
+	/* for linux or sgi */
+	struct iovec iov;	/* iovec for readv(2) */
 #endif
 #ifdef sgi
-    aiocb_t aiocbp;	/* POSIX aio control block */
-    aiocb_t *aiolist[1]; /* list of aio control blocks for lio_listio */
-    off64_t poffset;	/* pread(2) offset */
+	aiocb_t aiocbp;		/* POSIX aio control block */
+	aiocb_t *aiolist[1];	/* list of aio control blocks for lio_listio */
+	off64_t poffset;	/* pread(2) offset */
 #endif
 #if defined (__linux__) && !defined(__UCLIBC__)
 	struct aiocb aiocbp;	/* POSIX aio control block */
-	struct aiocb *aiolist[1]; /* list of aio control blocks for lio_listio */
+	struct aiocb *aiolist[1];	/* list of aio control blocks for lio_listio */
 	off64_t poffset;	/* pread(2) offset */
 #endif
 
-    /*
-     * If LIO_RANDOM bit specified, get new method randomly.
-     */
-    if (method & LIO_RANDOM) {
-	if (Debug_level > 3)
-		printf("DEBUG %s/%d: method mask to choose from: %#o\n", __FILE__, __LINE__, method );
-	method = lio_random_methods(method);
-	if (Debug_level > 2)
-	    printf("DEBUG %s/%d: random chosen method %#o\n", __FILE__, __LINE__, method);
-    }
+	/*
+	 * If LIO_RANDOM bit specified, get new method randomly.
+	 */
+	if (method & LIO_RANDOM) {
+		if (Debug_level > 3)
+			printf("DEBUG %s/%d: method mask to choose from: %#o\n",
+			       __FILE__, __LINE__, method);
+		method = lio_random_methods(method);
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: random chosen method %#o\n",
+			       __FILE__, __LINE__, method);
+	}
 
-    if (errmsg != NULL)
-	*errmsg = Errormsg;
+	if (errmsg != NULL)
+		*errmsg = Errormsg;
 
-    Rec_signal=Received_signal;	/* get the current number of signals received */
+	Rec_signal = Received_signal;	/* get the current number of signals received */
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    Rec_callback=Received_callback;	/* get the current number of callbacks received */
+	Rec_callback = Received_callback;	/* get the current number of callbacks received */
 #endif
 
 #ifdef  CRAY
-    memset(&status, 0x00, sizeof(struct iosw));
-    memset(&request, 0x00, sizeof(struct listreq));
-    statptr[0] = &status;
+	memset(&status, 0x00, sizeof(struct iosw));
+	memset(&request, 0x00, sizeof(struct listreq));
+	statptr[0] = &status;
 #else
-    /* for linux or sgi */
-    memset(&iov, 0x00, sizeof(struct iovec));
-    iov.iov_base = buffer;
-    iov.iov_len = size;
+	/* for linux or sgi */
+	memset(&iov, 0x00, sizeof(struct iovec));
+	iov.iov_base = buffer;
+	iov.iov_len = size;
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
 #if defined(sgi)
-    memset(&aiocbp, 0x00, sizeof(aiocb_t));
+	memset(&aiocbp, 0x00, sizeof(aiocb_t));
 #else
 	memset(&aiocbp, 0x00, sizeof(struct aiocb));
 #endif
-    aiocbp.aio_fildes = fd;
-    aiocbp.aio_nbytes = size;
-    aiocbp.aio_buf = buffer;
+	aiocbp.aio_fildes = fd;
+	aiocbp.aio_nbytes = size;
+	aiocbp.aio_buf = buffer;
 /*    aiocbp.aio_offset = lseek( fd, 0, SEEK_CUR ); -- set below */
-    aiocbp.aio_sigevent.sigev_notify = SIGEV_NONE;
-    aiocbp.aio_sigevent.sigev_signo = 0;
+	aiocbp.aio_sigevent.sigev_notify = SIGEV_NONE;
+	aiocbp.aio_sigevent.sigev_signo = 0;
 #ifdef sgi
-    aiocbp.aio_sigevent.sigev_func = NULL;
-    aiocbp.aio_sigevent.sigev_value.sival_int = 0;
+	aiocbp.aio_sigevent.sigev_func = NULL;
+	aiocbp.aio_sigevent.sigev_value.sival_int = 0;
 #elif defined(__linux__) && !defined(__UCLIBC__)
 	aiocbp.aio_sigevent.sigev_notify_function = NULL;
 	aiocbp.aio_sigevent.sigev_notify_attributes = 0;
 #endif
-    aiolist[0] = &aiocbp;
+	aiolist[0] = &aiocbp;
 
-    if ((ret = lseek( fd, 0, SEEK_CUR )) == -1) {
-	ret = 0;
-	/* If there is an error and it is not ESPIPE then kick out the error.
-	 * If the fd is a fifo then we have to make sure that
-	 * lio_random_methods() didn't select pwrite/pread; if it did then
-	 * switch to write/read.
-	 */
-	if (errno == ESPIPE) {
-		if (method & LIO_IO_SYNCP) {
-			if (omethod & LIO_RANDOM) {
-				method &= ~LIO_IO_SYNCP;
-				method |= LIO_IO_SYNC;
-				if (Debug_level > 2)
-					printf("DEBUG %s/%d: random chosen method switched to %#o for fifo\n", __FILE__, __LINE__, method );
+	if ((ret = lseek(fd, 0, SEEK_CUR)) == -1) {
+		ret = 0;
+		/* If there is an error and it is not ESPIPE then kick out the error.
+		 * If the fd is a fifo then we have to make sure that
+		 * lio_random_methods() didn't select pwrite/pread; if it did then
+		 * switch to write/read.
+		 */
+		if (errno == ESPIPE) {
+			if (method & LIO_IO_SYNCP) {
+				if (omethod & LIO_RANDOM) {
+					method &= ~LIO_IO_SYNCP;
+					method |= LIO_IO_SYNC;
+					if (Debug_level > 2)
+						printf
+						    ("DEBUG %s/%d: random chosen method switched to %#o for fifo\n",
+						     __FILE__, __LINE__,
+						     method);
+				} else if (Debug_level) {
+					printf
+					    ("DEBUG %s/%d: pread will fail when it reads from a fifo\n",
+					     __FILE__, __LINE__);
+				}
 			}
-			else if (Debug_level) {
-				printf("DEBUG %s/%d: pread will fail when it reads from a fifo\n",
-				       __FILE__, __LINE__ );
-			}
+			/* else: let it ride */
+		} else {
+			sprintf(Errormsg,
+				"%s/%d lseek(fd=%d,0,SEEK_CUR) failed, errno=%d  %s",
+				__FILE__, __LINE__, fd, errno, strerror(errno));
+			return -errno;
 		}
-		/* else: let it ride */
 	}
-	else{
-		sprintf(Errormsg, "%s/%d lseek(fd=%d,0,SEEK_CUR) failed, errno=%d  %s",
-			__FILE__, __LINE__, fd, errno, strerror(errno));
-		return -errno;
-	}
-    }
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    poffset = (off64_t)ret;
+	poffset = (off64_t) ret;
 #endif
-    aiocbp.aio_offset = ret;
+	aiocbp.aio_offset = ret;
 
 #endif
 
-    /*
-     * If the LIO_USE_SIGNAL bit is not set, only use the signal
-     * if the LIO_WAIT_SIGPAUSE or the LIO_WAIT_SIGACTIVE bits are set.
-     * Otherwise there is not necessarily a signal handler to trap
-     * the signal.
-     */
-    if (sig && !(method & LIO_USE_SIGNAL) &&
-        ! (method & LIO_WAIT_SIGTYPES) ) {
+	/*
+	 * If the LIO_USE_SIGNAL bit is not set, only use the signal
+	 * if the LIO_WAIT_SIGPAUSE or the LIO_WAIT_SIGACTIVE bits are set.
+	 * Otherwise there is not necessarily a signal handler to trap
+	 * the signal.
+	 */
+	if (sig && !(method & LIO_USE_SIGNAL) && !(method & LIO_WAIT_SIGTYPES)) {
 
-        sig=0;  /* ignore signal parameter */
-    }
-
+		sig = 0;	/* ignore signal parameter */
+	}
 #if defined(sgi) || (defined(__linux__)&& !defined(__UCLIBC__))
-    if (sig && (method & LIO_WAIT_CBTYPES))
-	sig=0; /* ignore signal parameter */
+	if (sig && (method & LIO_WAIT_CBTYPES))
+		sig = 0;	/* ignore signal parameter */
 #endif
 
-    /*
-     * only setup signal hander if sig was specified and
-     * a sig wait method was specified.
-     * Doing this will change the handler for this signal.  The
-     * old signal handler will not be restored.
-     *** restoring the signal handler could be added ***
-     */
+	/*
+	 * only setup signal hander if sig was specified and
+	 * a sig wait method was specified.
+	 * Doing this will change the handler for this signal.  The
+	 * old signal handler will not be restored.
+	 *** restoring the signal handler could be added ***
+	 */
 
-    if (sig &&  (method & LIO_WAIT_SIGTYPES)) {
+	if (sig && (method & LIO_WAIT_SIGTYPES)) {
 #ifdef CRAY
-	    sigctl(SCTL_REG, sig, lio_async_signal_handler);
+		sigctl(SCTL_REG, sig, lio_async_signal_handler);
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	    aiocbp.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-	    aiocbp.aio_sigevent.sigev_signo = sig;
-	    sigset(sig, lio_async_signal_handler);
+		aiocbp.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
+		aiocbp.aio_sigevent.sigev_signo = sig;
+		sigset(sig, lio_async_signal_handler);
 #endif /* CRAY */
-    }
+	}
 #if defined(sgi)
-    else if (method & LIO_WAIT_CBTYPES) {
-	    aiocbp.aio_sigevent.sigev_notify = SIGEV_CALLBACK;
-	    aiocbp.aio_sigevent.sigev_func = lio_async_callback_handler;
-	    /* sival_int just has to be something that I can use
-	     * to identify the callback, and "size" happens to be handy...
-	     */
-	    aiocbp.aio_sigevent.sigev_value.sival_int = size;
-    }
+	else if (method & LIO_WAIT_CBTYPES) {
+		aiocbp.aio_sigevent.sigev_notify = SIGEV_CALLBACK;
+		aiocbp.aio_sigevent.sigev_func = lio_async_callback_handler;
+		/* sival_int just has to be something that I can use
+		 * to identify the callback, and "size" happens to be handy...
+		 */
+		aiocbp.aio_sigevent.sigev_value.sival_int = size;
+	}
 #endif
 #if defined(__linux__) && !defined(__UCLIBC__)
 	else if (method & LIO_WAIT_CBTYPES) {
 		aiocbp.aio_sigevent.sigev_notify = SIGEV_THREAD;
-		aiocbp.aio_sigevent.sigev_notify_function = lio_async_callback_handler;
+		aiocbp.aio_sigevent.sigev_notify_function =
+		    lio_async_callback_handler;
 		/* sival_int just has to be something that I can use
 		 * to identify the callback, and "size" happens to be handy...
 		 */
-		aiocbp.aio_sigevent.sigev_notify_attributes = (void*)(uintptr_t)size;
+		aiocbp.aio_sigevent.sigev_notify_attributes =
+		    (void *)(uintptr_t) size;
 	}
 #endif
 
-    /*
-     * Determine the system call that will be called and produce
-     * the string of the system call and place it in Lio_SysCall.
-     * Also update the io_type char pointer to give brief description
-     * of system call.  Execute the system call and check for
-     * system call failure.  If sync i/o, return the number of
-     * bytes written/read.
-     */
-
-	if ((method & LIO_IO_SYNC) || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0) {
 	/*
-	 * read(2) is used if LIO_IO_SYNC bit is set or not none
-         * of the LIO_IO_TYPES bits are set (default).
-         */
+	 * Determine the system call that will be called and produce
+	 * the string of the system call and place it in Lio_SysCall.
+	 * Also update the io_type char pointer to give brief description
+	 * of system call.  Execute the system call and check for
+	 * system call failure.  If sync i/o, return the number of
+	 * bytes written/read.
+	 */
 
-	sprintf(Lio_SysCall,
-	    "read(%d, buf, %d)", fd, size);
-	io_type="read";
+	if ((method & LIO_IO_SYNC)
+	    || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0) {
+		/*
+		 * read(2) is used if LIO_IO_SYNC bit is set or not none
+		 * of the LIO_IO_TYPES bits are set (default).
+		 */
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		sprintf(Lio_SysCall, "read(%d, buf, %d)", fd, size);
+		io_type = "read";
 
-        while (1) {
-          if (((ret = read(fd, buffer, size)) == -1) && errno!=EINTR && errno!=EAGAIN) {
-            sprintf(Errormsg, "%s/%d read(%d, buf, %d) ret:-1, errno=%d %s",
-                    __FILE__, __LINE__,
-                    fd, size, errno, strerror(errno));
-            return -errno;
-          }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-          if (ret==0) return 0;
-          if (ret!=-1) {
-            if (ret != size) {
-              sprintf(Errormsg,
-                      "%s/%d read(%d, buf, %d) returned=%d",
-                      __FILE__, __LINE__,
-                      fd, size, ret);
-              size-=ret;
-              buffer+=ret;
-            }
-            else {
-              if (Debug_level > 1)
-                printf("DEBUG %s/%d: read completed without error (ret %d)\n",
-                       __FILE__, __LINE__, ret);
+		while (1) {
+			if (((ret = read(fd, buffer, size)) == -1)
+			    && errno != EINTR && errno != EAGAIN) {
+				sprintf(Errormsg,
+					"%s/%d read(%d, buf, %d) ret:-1, errno=%d %s",
+					__FILE__, __LINE__, fd, size, errno,
+					strerror(errno));
+				return -errno;
+			}
 
-              return ret;
-            }
-          }
-          wait4sync_io(fd, 1);
-        }
+			if (ret == 0)
+				return 0;
+			if (ret != -1) {
+				if (ret != size) {
+					sprintf(Errormsg,
+						"%s/%d read(%d, buf, %d) returned=%d",
+						__FILE__, __LINE__,
+						fd, size, ret);
+					size -= ret;
+					buffer += ret;
+				} else {
+					if (Debug_level > 1)
+						printf
+						    ("DEBUG %s/%d: read completed without error (ret %d)\n",
+						     __FILE__, __LINE__, ret);
 
-    }
+					return ret;
+				}
+			}
+			wait4sync_io(fd, 1);
+		}
 
-    else if (method & LIO_IO_ASYNC) {
-#ifdef CRAY
-	sprintf(Lio_SysCall,
-	    "reada(%d, buf, %d, &status, %d)", fd, size, sig);
-	io_type="reada";
-
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-
-	sigoff();
-	if ((ret = reada(fd, buffer, size, &status, sig)) == -1) {
-	    sprintf(Errormsg,
-		"%s/%d reada(%d, buf, %d, &stat, %d) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, sig, errno, strerror(errno));
-	    sigon();
-	    return -errno;
 	}
+
+	else if (method & LIO_IO_ASYNC) {
+#ifdef CRAY
+		sprintf(Lio_SysCall,
+			"reada(%d, buf, %d, &status, %d)", fd, size, sig);
+		io_type = "reada";
+
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+
+		sigoff();
+		if ((ret = reada(fd, buffer, size, &status, sig)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d reada(%d, buf, %d, &stat, %d) ret:-1, errno=%d %s",
+				__FILE__, __LINE__,
+				fd, size, sig, errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	sprintf(Lio_SysCall,
-	    "aio_read(fildes=%d, buf, nbytes=%d, signo=%d)", fd, size, sig);
-	io_type="aio_read";
+		sprintf(Lio_SysCall,
+			"aio_read(fildes=%d, buf, nbytes=%d, signo=%d)", fd,
+			size, sig);
+		io_type = "aio_read";
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-		sighold( sig );
-	if ((ret = aio_read(&aiocbp)) == -1) {
-	    sprintf(Errormsg,
-		"%s/%d aio_read(fildes=%d, buf, nbytes=%d, signo=%d) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, sig, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-	    return -errno;
+		if (sig)
+			sighold(sig);
+		if ((ret = aio_read(&aiocbp)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d aio_read(fildes=%d, buf, nbytes=%d, signo=%d) ret:-1, errno=%d %s",
+				__FILE__, __LINE__,
+				fd, size, sig, errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
+#endif
 	}
-#endif
-    } /* LIO_IO_ASYNC */
-
-    else if (method & LIO_IO_SLISTIO) {
+	/* LIO_IO_ASYNC */
+	else if (method & LIO_IO_SLISTIO) {
 #ifdef CRAY
-	request.li_opcode = LO_READ;
-	request.li_fildes = fd;
-        request.li_buf = buffer;
-        request.li_nbyte = size;
-        request.li_status = &status;
-        request.li_signo = sig;
-        request.li_nstride = 0;
-        request.li_filstride = 0;
-        request.li_memstride = 0;
+		request.li_opcode = LO_READ;
+		request.li_fildes = fd;
+		request.li_buf = buffer;
+		request.li_nbyte = size;
+		request.li_status = &status;
+		request.li_signo = sig;
+		request.li_nstride = 0;
+		request.li_filstride = 0;
+		request.li_memstride = 0;
 
-	listio_cmd=LC_WAIT;
-	io_type="listio(2) sync read";
+		listio_cmd = LC_WAIT;
+		io_type = "listio(2) sync read";
 
-	sprintf(Lio_SysCall,
-		"listio(LC_WAIT, &req, 1) LO_READ, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"listio(LC_WAIT, &req, 1) LO_READ, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	sigoff();
-	if (listio(listio_cmd, &request, 1) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    sigon();
-            return -errno;
-        }
+		sigoff();
+		if (listio(listio_cmd, &request, 1) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 
-	if (Debug_level > 1)
-            printf("DEBUG %s/%d: %s did not return -1\n",
-		__FILE__, __LINE__, Lio_SysCall);
+		if (Debug_level > 1)
+			printf("DEBUG %s/%d: %s did not return -1\n",
+			       __FILE__, __LINE__, Lio_SysCall);
 
-	ret=lio_check_asyncio(io_type, size,  &status);
-	return ret;
+		ret = lio_check_asyncio(io_type, size, &status);
+		return ret;
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	aiocbp.aio_lio_opcode = LIO_READ;
-	listio_cmd=LIO_WAIT;
-	io_type="lio_listio(3) sync read";
+		aiocbp.aio_lio_opcode = LIO_READ;
+		listio_cmd = LIO_WAIT;
+		io_type = "lio_listio(3) sync read";
 
-	sprintf(Lio_SysCall,
-		"lio_listio(LIO_WAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"lio_listio(LIO_WAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-		sighold( sig );
-	if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-            return -errno;
-        }
+		if (sig)
+			sighold(sig);
+		if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
 
-	if (Debug_level > 1)
-            printf("DEBUG %s/%d: %s did not return -1\n",
-		__FILE__, __LINE__, Lio_SysCall);
+		if (Debug_level > 1)
+			printf("DEBUG %s/%d: %s did not return -1\n",
+			       __FILE__, __LINE__, Lio_SysCall);
 
-	ret=lio_check_asyncio(io_type, size,  &aiocbp, method);
-	return ret;
+		ret = lio_check_asyncio(io_type, size, &aiocbp, method);
+		return ret;
 #endif
-    }/* LIO_IO_SLISTIO */
-
-    else if (method & LIO_IO_ALISTIO) {
+	}
+	/* LIO_IO_SLISTIO */
+	else if (method & LIO_IO_ALISTIO) {
 #ifdef CRAY
-	request.li_opcode = LO_READ;
-	request.li_fildes = fd;
-        request.li_buf = buffer;
-        request.li_nbyte = size;
-        request.li_status = &status;
-        request.li_signo = sig;
-        request.li_nstride = 0;
-        request.li_filstride = 0;
-        request.li_memstride = 0;
+		request.li_opcode = LO_READ;
+		request.li_fildes = fd;
+		request.li_buf = buffer;
+		request.li_nbyte = size;
+		request.li_status = &status;
+		request.li_signo = sig;
+		request.li_nstride = 0;
+		request.li_filstride = 0;
+		request.li_memstride = 0;
 
-	listio_cmd=LC_START;
-	io_type="listio(2) async read";
+		listio_cmd = LC_START;
+		io_type = "listio(2) async read";
 
-	sprintf(Lio_SysCall,
-		"listio(LC_START, &req, 1) LO_READ, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"listio(LC_START, &req, 1) LO_READ, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	sigoff();
-	if (listio(listio_cmd, &request, 1) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    sigon();
-            return -errno;
-        }
+		sigoff();
+		if (listio(listio_cmd, &request, 1) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			sigon();
+			return -errno;
+		}
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-	aiocbp.aio_lio_opcode = LIO_READ;
-	listio_cmd=LIO_NOWAIT;
-	io_type="lio_listio(3) async read";
+		aiocbp.aio_lio_opcode = LIO_READ;
+		listio_cmd = LIO_NOWAIT;
+		io_type = "lio_listio(3) async read";
 
-	sprintf(Lio_SysCall,
-		"lio_listio(LIO_NOWAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
-                fd, size);
+		sprintf(Lio_SysCall,
+			"lio_listio(LIO_NOWAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
+			fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
 
-	if (sig)
-		sighold( sig );
-	if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
-            sprintf(Errormsg, "%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
-		    __FILE__, __LINE__,
-		Lio_SysCall, fd, size, errno, strerror(errno));
-	    if (sig)
-		sigrelse( sig );
-            return -errno;
-        }
+		if (sig)
+			sighold(sig);
+		if (lio_listio(listio_cmd, aiolist, 1, NULL) == -1) {
+			sprintf(Errormsg,
+				"%s/%d %s failed, fd:%d, nbyte:%d errno=%d %s",
+				__FILE__, __LINE__, Lio_SysCall, fd, size,
+				errno, strerror(errno));
+			if (sig)
+				sigrelse(sig);
+			return -errno;
+		}
 #endif
-    } /* LIO_IO_ALISTIO */
-
+	}
+	/* LIO_IO_ALISTIO */
 #ifndef CRAY
-    else if (method & LIO_IO_SYNCV) {
-	io_type="readv(2)";
+	else if (method & LIO_IO_SYNCV) {
+		io_type = "readv(2)";
 
-	sprintf(Lio_SysCall,
-		"readv(%d, &iov, 1) nbyte:%d", fd, size);
+		sprintf(Lio_SysCall, "readv(%d, &iov, 1) nbyte:%d", fd, size);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-	if ((ret = readv(fd, &iov, 1)) == -1) {
-	    sprintf(Errormsg, "%s/%d readv(%d, iov, 1) nbyte:%d ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-		fd, size, errno, strerror(errno));
-	    return -errno;
-	}
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+		if ((ret = readv(fd, &iov, 1)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d readv(%d, iov, 1) nbyte:%d ret:-1, errno=%d %s",
+				__FILE__, __LINE__, fd, size, errno,
+				strerror(errno));
+			return -errno;
+		}
 
-	if (ret != size) {
-            sprintf(Errormsg,
-		"%s/%d readv(%d, iov, 1) nbyte:%d returned=%d",
-		    __FILE__, __LINE__,
-		    fd, size, ret);
-        }
-        else if (Debug_level > 1)
-            printf("DEBUG %s/%d: readv completed without error (ret %d)\n",
-                __FILE__, __LINE__, ret);
+		if (ret != size) {
+			sprintf(Errormsg,
+				"%s/%d readv(%d, iov, 1) nbyte:%d returned=%d",
+				__FILE__, __LINE__, fd, size, ret);
+		} else if (Debug_level > 1)
+			printf
+			    ("DEBUG %s/%d: readv completed without error (ret %d)\n",
+			     __FILE__, __LINE__, ret);
 
-        return ret;
-    } /* LIO_IO_SYNCV */
+		return ret;
+	}			/* LIO_IO_SYNCV */
 #endif
 
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    else if (method & LIO_IO_SYNCP) {
-	io_type="pread(2)";
+	else if (method & LIO_IO_SYNCP) {
+		io_type = "pread(2)";
 
-	sprintf(Lio_SysCall,
-						"pread(%d, buf, %d, %lld)", fd, size, (long long)poffset);
+		sprintf(Lio_SysCall,
+			"pread(%d, buf, %d, %lld)", fd, size,
+			(long long)poffset);
 
-        if (Debug_level) {
-	    printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
-        }
-	if ((ret = pread(fd, buffer, size, poffset)) == -1) {
-	    sprintf(Errormsg, "%s/%d pread(%d, buf, %d, %lld) ret:-1, errno=%d %s",
-		    __FILE__, __LINE__,
-							fd, size, (long long)poffset, errno, strerror(errno));
-	    return -errno;
-	}
+		if (Debug_level) {
+			printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__,
+			       Lio_SysCall);
+		}
+		if ((ret = pread(fd, buffer, size, poffset)) == -1) {
+			sprintf(Errormsg,
+				"%s/%d pread(%d, buf, %d, %lld) ret:-1, errno=%d %s",
+				__FILE__, __LINE__, fd, size,
+				(long long)poffset, errno, strerror(errno));
+			return -errno;
+		}
 
-	if (ret != size) {
-            sprintf(Errormsg,
-		"%s/%d pread(%d, buf, %d, %lld) returned=%d",
-		    __FILE__, __LINE__,
-							fd, size, (long long)poffset, ret);
-        }
-        else if (Debug_level > 1)
-            printf("DEBUG %s/%d: pread completed without error (ret %d)\n",
-                __FILE__, __LINE__, ret);
+		if (ret != size) {
+			sprintf(Errormsg,
+				"%s/%d pread(%d, buf, %d, %lld) returned=%d",
+				__FILE__, __LINE__,
+				fd, size, (long long)poffset, ret);
+		} else if (Debug_level > 1)
+			printf
+			    ("DEBUG %s/%d: pread completed without error (ret %d)\n",
+			     __FILE__, __LINE__, ret);
 
-        return ret;
-    } /* LIO_IO_SYNCP */
+		return ret;
+	}			/* LIO_IO_SYNCP */
 #endif
 
-    else {
-	printf("DEBUG %s/%d: No I/O method chosen\n", __FILE__, __LINE__ );
-	return -1;
-    }
+	else {
+		printf("DEBUG %s/%d: No I/O method chosen\n", __FILE__,
+		       __LINE__);
+		return -1;
+	}
 
-    /*
-     * wait for async io to complete.
-     * Note: Sync io should have returned prior to getting here.
-     */
+	/*
+	 * wait for async io to complete.
+	 * Note: Sync io should have returned prior to getting here.
+	 */
 #ifdef CRAY
-    ret=lio_wait4asyncio(method, fd, statptr);
+	ret = lio_wait4asyncio(method, fd, statptr);
 #endif
 #if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    ret=lio_wait4asyncio(method, fd, &aiocbp);
+	ret = lio_wait4asyncio(method, fd, &aiocbp);
 #endif
 
-    /*
-     * If there was an error waiting for async i/o to complete,
-     * return the error value (errno) to the caller.
-     * Note: Errormsg should already have been updated.
-     */
-    if (ret < 0) {
+	/*
+	 * If there was an error waiting for async i/o to complete,
+	 * return the error value (errno) to the caller.
+	 * Note: Errormsg should already have been updated.
+	 */
+	if (ret < 0) {
+		return ret;
+	}
+
+	/*
+	 * If i/o was not waited for (may not have been completed at this time),
+	 * return the size that was requested.
+	 */
+	if (ret == 1)
+		return size;
+
+	/*
+	 * check that async io was successful.
+	 * Note:  if the there was an system call failure, -errno
+	 * was returned and Errormsg should already have been updated.
+	 * If amount i/o was different than size, Errormsg should already
+	 * have been updated but the actual i/o size if returned.
+	 */
+
+#ifdef CRAY
+	ret = lio_check_asyncio(io_type, size, &status);
+#endif
+#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
+	ret = lio_check_asyncio(io_type, size, &aiocbp, method);
+#endif
+
 	return ret;
-    }
-
-    /*
-     * If i/o was not waited for (may not have been completed at this time),
-     * return the size that was requested.
-     */
-    if (ret == 1)
-	return size;
-
-    /*
-     * check that async io was successful.
-     * Note:  if the there was an system call failure, -errno
-     * was returned and Errormsg should already have been updated.
-     * If amount i/o was different than size, Errormsg should already
-     * have been updated but the actual i/o size if returned.
-     */
-
-#ifdef CRAY
-    ret=lio_check_asyncio(io_type, size, &status);
-#endif
-#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
-    ret=lio_check_asyncio(io_type, size, &aiocbp, method);
-#endif
-
-    return ret;
-}	/* end of lio_read_buffer */
-
+}				/* end of lio_read_buffer */
 
 #if !defined(__sun) && !defined(__hpux) && !defined(_AIX)
 /***********************************************************************
@@ -1612,100 +1660,100 @@
 #ifdef CRAY
 int lio_check_asyncio(char *io_type, int size, struct iosw *status)
 #elif defined(sgi)
-	int lio_check_asyncio(char *io_type, int size, aiocb_t *aiocbp, int method)
+int lio_check_asyncio(char *io_type, int size, aiocb_t * aiocbp, int method)
 #elif defined(__linux__) && !defined(__UCLIBC__)
-	int lio_check_asyncio(char *io_type, int size, struct aiocb *aiocbp, int method)
+int lio_check_asyncio(char *io_type, int size, struct aiocb *aiocbp, int method)
 {
-    int ret;
+	int ret;
 
 #ifdef CRAY
-    if (status->sw_error) {
-        sprintf(Errormsg,
-            "%s/%d %s, sw_error set = %d %s, sw_count = %d",
-		__FILE__, __LINE__, io_type,
-            status->sw_error, strerror(status->sw_error), status->sw_count);
-        return -status->sw_error;
-    }
-    else if (status->sw_count != size) {
-        sprintf(Errormsg,
-            "%s/%d %s, sw_count not as expected(%d), but actual:%d",
-		__FILE__, __LINE__, io_type,
-            size, status->sw_count);
-    }
-    else if (Debug_level > 1) {
-        printf("DEBUG %s/%d: %s completed without error (sw_error == 0, sw_count == %d)\n",
-            __FILE__, __LINE__, io_type, status->sw_count);
-    }
+	if (status->sw_error) {
+		sprintf(Errormsg,
+			"%s/%d %s, sw_error set = %d %s, sw_count = %d",
+			__FILE__, __LINE__, io_type,
+			status->sw_error, strerror(status->sw_error),
+			status->sw_count);
+		return -status->sw_error;
+	} else if (status->sw_count != size) {
+		sprintf(Errormsg,
+			"%s/%d %s, sw_count not as expected(%d), but actual:%d",
+			__FILE__, __LINE__, io_type, size, status->sw_count);
+	} else if (Debug_level > 1) {
+		printf
+		    ("DEBUG %s/%d: %s completed without error (sw_error == 0, sw_count == %d)\n",
+		     __FILE__, __LINE__, io_type, status->sw_count);
+	}
 
-    return status->sw_count;
+	return status->sw_count;
 
 #else
 
-    int cnt = 1;
+	int cnt = 1;
 
-    /* The I/O may have been synchronous with signal completion.  It doesn't
-     * make sense, but the combination could be generated.  Release the
-     * completion signal here otherwise it'll hang around and bite us
-     * later.
-     */
-    if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
-	sigrelse( aiocbp->aio_sigevent.sigev_signo );
+	/* The I/O may have been synchronous with signal completion.  It doesn't
+	 * make sense, but the combination could be generated.  Release the
+	 * completion signal here otherwise it'll hang around and bite us
+	 * later.
+	 */
+	if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
+		sigrelse(aiocbp->aio_sigevent.sigev_signo);
 
-    ret = aio_error( aiocbp );
+	ret = aio_error(aiocbp);
 
-    while (ret == EINPROGRESS) {
-	ret = aio_error( aiocbp );
-	++cnt;
-    }
-    if (cnt > 1) {
-	sprintf(Errormsg,
-		"%s/%d %s, aio_error had to loop on EINPROGRESS, cnt=%d; random method %#o; sigev_notify=%s",
-		__FILE__, __LINE__, io_type, cnt, method,
-		(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
+	while (ret == EINPROGRESS) {
+		ret = aio_error(aiocbp);
+		++cnt;
+	}
+	if (cnt > 1) {
+		sprintf(Errormsg,
+			"%s/%d %s, aio_error had to loop on EINPROGRESS, cnt=%d; random method %#o; sigev_notify=%s",
+			__FILE__, __LINE__, io_type, cnt, method,
+			(aiocbp->aio_sigevent.sigev_notify ==
+			 SIGEV_SIGNAL ? "signal" : aiocbp->aio_sigevent.
+			 sigev_notify == SIGEV_NONE ? "none" :
 #ifdef SIGEV_CALLBACK
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
+			 aiocbp->aio_sigevent.sigev_notify ==
+			 SIGEV_CALLBACK ? "callback" :
 #endif
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
-		 "unknown") );
-	return -ret;
-    }
+			 aiocbp->aio_sigevent.sigev_notify ==
+			 SIGEV_THREAD ? "thread" : "unknown"));
+		return -ret;
+	}
 
-    if (ret != 0) {
-	sprintf(Errormsg,
-		"%s/%d %s, aio_error = %d %s; random method %#o",
-		__FILE__, __LINE__, io_type,
-		ret, strerror(ret),
-		method );
-	return -ret;
-    }
-    ret = aio_return( aiocbp );
-    if (ret != size) {
-	sprintf(Errormsg,
-		"%s/%d %s, aio_return not as expected(%d), but actual:%d",
-		__FILE__, __LINE__, io_type,
-		size, ret);
+	if (ret != 0) {
+		sprintf(Errormsg,
+			"%s/%d %s, aio_error = %d %s; random method %#o",
+			__FILE__, __LINE__, io_type,
+			ret, strerror(ret), method);
+		return -ret;
+	}
+	ret = aio_return(aiocbp);
+	if (ret != size) {
+		sprintf(Errormsg,
+			"%s/%d %s, aio_return not as expected(%d), but actual:%d",
+			__FILE__, __LINE__, io_type, size, ret);
 
 #ifdef BUG1_workaround
-	if (ret == 0) {
-		ret = size;
-		if (Debug_level > 1) {
-			printf("WARN %s/%d: %s completed with bug1_workaround (aio_error == 0, aio_return now == %d)\n",
-			       __FILE__, __LINE__, io_type, ret);
+		if (ret == 0) {
+			ret = size;
+			if (Debug_level > 1) {
+				printf
+				    ("WARN %s/%d: %s completed with bug1_workaround (aio_error == 0, aio_return now == %d)\n",
+				     __FILE__, __LINE__, io_type, ret);
+			}
 		}
-	}
 #endif /* BUG1_workaround */
 
-    }
-    else if (Debug_level > 1) {
-        printf("DEBUG %s/%d: %s completed without error (aio_error == 0, aio_return == %d)\n",
-            __FILE__, __LINE__, io_type, ret);
-    }
+	} else if (Debug_level > 1) {
+		printf
+		    ("DEBUG %s/%d: %s completed without error (aio_error == 0, aio_return == %d)\n",
+		     __FILE__, __LINE__, io_type, ret);
+	}
 
-    return ret;
+	return ret;
 
 #endif
-} /* end of lio_check_asyncio */
+}				/* end of lio_check_asyncio */
 #endif
 
 /***********************************************************************
@@ -1729,175 +1777,189 @@
 #ifdef CRAY
 int lio_wait4asyncio(int method, int fd, struct iosw **statptr)
 #elif defined(sgi)
-	int lio_wait4asyncio(int method, int fd, aiocb_t *aiocbp)
+int lio_wait4asyncio(int method, int fd, aiocb_t * aiocbp)
 #elif defined(__linux__) && !defined(__UCLIBC__)
-	int lio_wait4asyncio(int method, int fd, struct aiocb *aiocbp)
+int lio_wait4asyncio(int method, int fd, struct aiocb *aiocbp)
 {
-    int cnt;
+	int cnt;
 #ifdef sgi
-    int ret;
-    const aiocb_t *aioary[1];
+	int ret;
+	const aiocb_t *aioary[1];
 #endif
 #if defined(__linux__)&& !defined(__UCLIBC__)
 	int ret;
 	const struct aiocb *aioary[1];
 #endif
 
-    if ((method & LIO_WAIT_RECALL)
+	if ((method & LIO_WAIT_RECALL)
 #if defined(sgi) || (defined(__linux__)&& !defined(__UCLIBC__))
-	|| (method & LIO_WAIT_CBSUSPEND)
-	|| (method & LIO_WAIT_SIGSUSPEND)
+	    || (method & LIO_WAIT_CBSUSPEND)
+	    || (method & LIO_WAIT_SIGSUSPEND)
 #endif
-	|| ((method & LIO_WAIT_TYPES) == 0) ) {
-	/*
-	 * If method has LIO_WAIT_RECALL bit set or method does
-	 * not have any wait method bits set (default), use recall/aio_suspend.
-         */
+	    || ((method & LIO_WAIT_TYPES) == 0)) {
+		/*
+		 * If method has LIO_WAIT_RECALL bit set or method does
+		 * not have any wait method bits set (default), use recall/aio_suspend.
+		 */
 #ifdef CRAY
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : recall\n", __FILE__, __LINE__);
-        sigon();
-        if (recall(fd, 1, statptr)) {
-	    sprintf(Errormsg, "%s/%d recall(%d, 1, stat) failed, errno:%d %s",
-		    __FILE__, __LINE__,
-		fd, errno, strerror(errno));
-	    return -errno;
-	}
-#else
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : aio_suspend, sigev_notify=%s\n", __FILE__, __LINE__,
-    		(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
-#ifdef SIGEV_CALLBACK
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
-#endif
-		 aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
-		 "unknown") );
-
-	aioary[0] = aiocbp;
-	ret = aio_suspend( aioary, 1, NULL );
-	if ((ret == -1) && (errno == EINTR)) {
-		if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL) {
-			if (Debug_level > 2) {
-				printf("DEBUG %s/%d: aio_suspend received EINTR, sigev_notify=SIGEV_SIGNAL -- ok\n",
-				       __FILE__, __LINE__ );
-			}
-		}
-		else {
-			sprintf(Errormsg, "%s/%d aio_suspend received EINTR, sigev_notify=%s, not ok\n",
-				__FILE__, __LINE__,
-				(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
-				 aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
-#ifdef SIGEV_CALLBACK
-                                 aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
-#endif
-                                 aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
-				 "unknown") );
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: wait method : recall\n", __FILE__,
+			       __LINE__);
+		sigon();
+		if (recall(fd, 1, statptr)) {
+			sprintf(Errormsg,
+				"%s/%d recall(%d, 1, stat) failed, errno:%d %s",
+				__FILE__, __LINE__, fd, errno, strerror(errno));
 			return -errno;
 		}
-	}
-	else if (ret) {
-	    sprintf(Errormsg, "%s/%d aio_suspend(fildes=%d, aioary, 1, NULL) failed, errno:%d %s",
-		    __FILE__, __LINE__,
-		fd, errno, strerror(errno));
-	    return -errno;
-	}
-#endif
-
-    } else if (method & LIO_WAIT_ACTIVE) {
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : active\n", __FILE__, __LINE__);
-#ifdef CRAY
-        sigon();
-	/*
-         * loop until sw_flag, sw_count or sw_error field elements
-	 * change to non-zero.
- 	 */
-        cnt=0;
-        while ((*statptr)->sw_flag == 0 &&
-		(*statptr)->sw_count == 0 &&
-		(*statptr)->sw_error == 0 ) {
-	   cnt++;
-	}
 #else
-	/* loop while aio_error() returns EINPROGRESS */
-	cnt=0;
-	while (1) {
-		ret = aio_error( aiocbp );
-		if ((ret == 0) || (ret != EINPROGRESS)) {
-			break;
+		if (Debug_level > 2)
+			printf
+			    ("DEBUG %s/%d: wait method : aio_suspend, sigev_notify=%s\n",
+			     __FILE__, __LINE__,
+			     (aiocbp->aio_sigevent.sigev_notify ==
+			      SIGEV_SIGNAL ? "signal" : aiocbp->aio_sigevent.
+			      sigev_notify == SIGEV_NONE ? "none" :
+#ifdef SIGEV_CALLBACK
+			      aiocbp->aio_sigevent.sigev_notify ==
+			      SIGEV_CALLBACK ? "callback" :
+#endif
+			      aiocbp->aio_sigevent.sigev_notify ==
+			      SIGEV_THREAD ? "thread" : "unknown"));
+
+		aioary[0] = aiocbp;
+		ret = aio_suspend(aioary, 1, NULL);
+		if ((ret == -1) && (errno == EINTR)) {
+			if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL) {
+				if (Debug_level > 2) {
+					printf
+					    ("DEBUG %s/%d: aio_suspend received EINTR, sigev_notify=SIGEV_SIGNAL -- ok\n",
+					     __FILE__, __LINE__);
+				}
+			} else {
+				sprintf(Errormsg,
+					"%s/%d aio_suspend received EINTR, sigev_notify=%s, not ok\n",
+					__FILE__, __LINE__,
+					(aiocbp->aio_sigevent.sigev_notify ==
+					 SIGEV_SIGNAL ? "signal" : aiocbp->
+					 aio_sigevent.sigev_notify ==
+					 SIGEV_NONE ? "none" :
+#ifdef SIGEV_CALLBACK
+					 aiocbp->aio_sigevent.sigev_notify ==
+					 SIGEV_CALLBACK ? "callback" :
+#endif
+					 aiocbp->aio_sigevent.sigev_notify ==
+					 SIGEV_THREAD ? "thread" : "unknown"));
+				return -errno;
+			}
+		} else if (ret) {
+			sprintf(Errormsg,
+				"%s/%d aio_suspend(fildes=%d, aioary, 1, NULL) failed, errno:%d %s",
+				__FILE__, __LINE__, fd, errno, strerror(errno));
+			return -errno;
 		}
-		++cnt;
-	}
+#endif
+
+	} else if (method & LIO_WAIT_ACTIVE) {
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: wait method : active\n", __FILE__,
+			       __LINE__);
+#ifdef CRAY
+		sigon();
+		/*
+		 * loop until sw_flag, sw_count or sw_error field elements
+		 * change to non-zero.
+		 */
+		cnt = 0;
+		while ((*statptr)->sw_flag == 0 &&
+		       (*statptr)->sw_count == 0 && (*statptr)->sw_error == 0) {
+			cnt++;
+		}
+#else
+		/* loop while aio_error() returns EINPROGRESS */
+		cnt = 0;
+		while (1) {
+			ret = aio_error(aiocbp);
+			if ((ret == 0) || (ret != EINPROGRESS)) {
+				break;
+			}
+			++cnt;
+		}
 
 #endif
-	if (Debug_level > 5 && cnt && (cnt % 50) == 0)
-		printf("DEBUG %s/%d: wait active cnt = %d\n",
-		    __FILE__, __LINE__, cnt);
+		if (Debug_level > 5 && cnt && (cnt % 50) == 0)
+			printf("DEBUG %s/%d: wait active cnt = %d\n",
+			       __FILE__, __LINE__, cnt);
 
-    } else if (method & LIO_WAIT_SIGPAUSE) {
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : sigpause\n", __FILE__, __LINE__);
+	} else if (method & LIO_WAIT_SIGPAUSE) {
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: wait method : sigpause\n",
+			       __FILE__, __LINE__);
 #ifdef sgi
-	/* note: don't do the sigon() for CRAY in this case.  why? -- roehrich 6/11/97 */
-	if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
-		sigrelse( aiocbp->aio_sigevent.sigev_signo );
-	else {
-		printf("DEBUG %s/%d: sigev_notify != SIGEV_SIGNAL\n", __FILE__, __LINE__ );
-		return -1;
-	}
+		/* note: don't do the sigon() for CRAY in this case.  why? -- roehrich 6/11/97 */
+		if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
+			sigrelse(aiocbp->aio_sigevent.sigev_signo);
+		else {
+			printf("DEBUG %s/%d: sigev_notify != SIGEV_SIGNAL\n",
+			       __FILE__, __LINE__);
+			return -1;
+		}
 #endif
-        pause();
+		pause();
 
-    } else if (method & LIO_WAIT_SIGACTIVE) {
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : sigactive\n", __FILE__, __LINE__);
+	} else if (method & LIO_WAIT_SIGACTIVE) {
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: wait method : sigactive\n",
+			       __FILE__, __LINE__);
 #ifdef CRAY
-        sigon();
+		sigon();
 #else
-	if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
-		sigrelse( aiocbp->aio_sigevent.sigev_signo );
-	else {
-		printf("DEBUG %s/%d: sigev_notify != SIGEV_SIGNAL\n", __FILE__, __LINE__ );
-		return -1;
-	}
+		if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL)
+			sigrelse(aiocbp->aio_sigevent.sigev_signo);
+		else {
+			printf("DEBUG %s/%d: sigev_notify != SIGEV_SIGNAL\n",
+			       __FILE__, __LINE__);
+			return -1;
+		}
 #endif
-	/* loop waiting for signal */
-        while (Received_signal == Rec_signal) {
+		/* loop waiting for signal */
+		while (Received_signal == Rec_signal) {
 #ifdef CRAY
-                sigon();
+			sigon();
 #else
-		sigrelse( aiocbp->aio_sigevent.sigev_signo );
+			sigrelse(aiocbp->aio_sigevent.sigev_signo);
 #endif
-	}
+		}
 
-    } else if (method & LIO_WAIT_NONE) {
-        if (Debug_level > 2)
-            printf("DEBUG %s/%d: wait method : none\n", __FILE__, __LINE__);
-	/* It's broken because the aiocb/iosw is an automatic variable in
-	 * lio_{read,write}_buffer, so when the function returns and the
-	 * I/O completes there will be nowhere to write the I/O status.
-	 * It doesn't cause a problem on unicos--probably because of some
-	 * compiler quirk, or an accident.  It causes POSIX async I/O
-	 * to core dump some threads.   spr/pv 705909.  6/27/97 roehrich
-	 */
-	sprintf(Errormsg, "%s/%d LIO_WAIT_NONE was selected (this is broken)\n",
-		__FILE__, __LINE__ );
+	} else if (method & LIO_WAIT_NONE) {
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: wait method : none\n", __FILE__,
+			       __LINE__);
+		/* It's broken because the aiocb/iosw is an automatic variable in
+		 * lio_{read,write}_buffer, so when the function returns and the
+		 * I/O completes there will be nowhere to write the I/O status.
+		 * It doesn't cause a problem on unicos--probably because of some
+		 * compiler quirk, or an accident.  It causes POSIX async I/O
+		 * to core dump some threads.   spr/pv 705909.  6/27/97 roehrich
+		 */
+		sprintf(Errormsg,
+			"%s/%d LIO_WAIT_NONE was selected (this is broken)\n",
+			__FILE__, __LINE__);
 #ifdef CRAY
-        sigon();
+		sigon();
 #endif
 /*        return 1;*/
-        return -1;
-    }
-    else {
-	if (Debug_level > 2)
-	    printf("DEBUG %s/%d: no wait method was chosen\n", __FILE__, __LINE__ );
-	return -1;
-    }
+		return -1;
+	} else {
+		if (Debug_level > 2)
+			printf("DEBUG %s/%d: no wait method was chosen\n",
+			       __FILE__, __LINE__);
+		return -1;
+	}
 
-    return 0;
+	return 0;
 
-} /* end of lio_wait4asyncio */
+}				/* end of lio_wait4asyncio */
 
 #endif /* ifndef linux */
 #endif
@@ -1910,175 +1972,201 @@
  * (rrl 04/96)
  ***********************************************************************/
 struct unit_info_t {
-    int method;
-    int sig;
-    char *str;
-}  Unit_info[] = {
-    { LIO_IO_SYNC, 0, "sync io" },
-    { LIO_IO_SYNCV, 0, "sync readv/writev" },
-    { LIO_IO_SYNCP, 0, "sync pread/pwrite" },
-    { LIO_IO_ASYNC, 0, "async io, def wait" },
-    { LIO_IO_SLISTIO,     0, "sync listio" },
-    { LIO_IO_ALISTIO,     0, "async listio, def wait" },
-    { LIO_IO_ASYNC|LIO_WAIT_ACTIVE, 	0, "async active" },
-    { LIO_IO_ASYNC|LIO_WAIT_RECALL, 	0, "async recall/suspend" },
-    { LIO_IO_ASYNC|LIO_WAIT_SIGPAUSE, 	SIGUSR1, "async sigpause" },
-    { LIO_IO_ASYNC|LIO_WAIT_SIGACTIVE, 	SIGUSR1, "async sigactive" },
-    { LIO_IO_ALISTIO|LIO_WAIT_ACTIVE,     0, "async listio active" },
-    { LIO_IO_ALISTIO|LIO_WAIT_RECALL,     0, "async listio recall" },
-    { LIO_IO_ALISTIO|LIO_WAIT_SIGACTIVE,  SIGUSR1, "async listio sigactive" },
-    { LIO_IO_ALISTIO|LIO_WAIT_SIGPAUSE,  SIGUSR1, "async listio sigpause" },
-    { LIO_IO_ASYNC, 	SIGUSR2, "async io, def wait, sigusr2" },
-    { LIO_IO_ALISTIO,   SIGUSR2, "async listio, def wait, sigusr2" },
-};
+	int method;
+	int sig;
+	char *str;
+} Unit_info[] = {
+	{
+	LIO_IO_SYNC, 0, "sync io"}, {
+	LIO_IO_SYNCV, 0, "sync readv/writev"}, {
+	LIO_IO_SYNCP, 0, "sync pread/pwrite"}, {
+	LIO_IO_ASYNC, 0, "async io, def wait"}, {
+	LIO_IO_SLISTIO, 0, "sync listio"}, {
+	LIO_IO_ALISTIO, 0, "async listio, def wait"}, {
+	LIO_IO_ASYNC | LIO_WAIT_ACTIVE, 0, "async active"}, {
+	LIO_IO_ASYNC | LIO_WAIT_RECALL, 0, "async recall/suspend"}, {
+	LIO_IO_ASYNC | LIO_WAIT_SIGPAUSE, SIGUSR1, "async sigpause"}, {
+	LIO_IO_ASYNC | LIO_WAIT_SIGACTIVE, SIGUSR1, "async sigactive"}, {
+	LIO_IO_ALISTIO | LIO_WAIT_ACTIVE, 0, "async listio active"}, {
+	LIO_IO_ALISTIO | LIO_WAIT_RECALL, 0, "async listio recall"}, {
+	LIO_IO_ALISTIO | LIO_WAIT_SIGACTIVE, SIGUSR1, "async listio sigactive"},
+	{
+	LIO_IO_ALISTIO | LIO_WAIT_SIGPAUSE, SIGUSR1, "async listio sigpause"},
+	{
+	LIO_IO_ASYNC, SIGUSR2, "async io, def wait, sigusr2"}, {
+LIO_IO_ALISTIO, SIGUSR2, "async listio, def wait, sigusr2"},};
 
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
-    extern char *optarg;
-    extern int optind;
+	extern char *optarg;
+	extern int optind;
 
-    int fd;
-    char *err;
-    char buffer[4096];
-    int size=4096;
-    int ret;
-    int ind;
-    int iter=3;
-    int method;
-    int exit_status = 0;
-    int c;
-    int i;
-    char *symbols = NULL;
-    int die_on_err = 0;
+	int fd;
+	char *err;
+	char buffer[4096];
+	int size = 4096;
+	int ret;
+	int ind;
+	int iter = 3;
+	int method;
+	int exit_status = 0;
+	int c;
+	int i;
+	char *symbols = NULL;
+	int die_on_err = 0;
 
-    while ((c = getopt(argc,argv,"s:di:")) != -1) {
-	switch(c) {
-	case 's': symbols = optarg; break;
-	case 'd': ++die_on_err; break;
-	case 'i': iter = atoi(optarg); break;
-	}
-    }
-
-    if ((fd=open("unit_test_file", O_CREAT|O_RDWR|O_TRUNC, 0777)) == -1) {
-	perror("open(unit_test_file, O_CREAT|O_RDWR|O_TRUNC, 0777) failed");
-	exit(1);
-    }
-
-    Debug_level=9;
-
-    if (symbols != NULL) {
-        if ((method=lio_parse_io_arg2(symbols,  &err)) == -1) {
-	    printf("lio_parse_io_arg2(%s, &err) failed, bad token starting at %s\n",
-	    symbols, err);
-	    if (die_on_err)
-		exit(1);
-	}
-	else
-	    printf("lio_parse_io_arg2(%s, &err) returned %#o\n", symbols, method);
-
-	exit_status = 0;
-        for (ind=0; ind < iter; ind++) {
-	  memset( buffer, 'A', 4096 );
-	  if (lseek(fd, 0, 0) == -1) {
-		printf("lseek(fd,0,0), %d, failed, errno %d\n",
-		       __LINE__, errno );
-		++exit_status;
-	  }
-          if ((ret=lio_write_buffer(fd, method, buffer,
-                        size, SIGUSR1, &err, 0)) != size ) {
-            printf("lio_write_buffer returned -1, err = %s\n", err);
-          } else
-            printf("lio_write_buffer returned %d\n", ret);
-
-	  memset( buffer, 'B', 4096 );
-          if (lseek(fd, 0, 0) == -1) {
-		printf("lseek(fd,0,0), %d, failed, errno %d\n",
-		       __LINE__, errno );
-		++exit_status;
-	  }
-          if ((ret=lio_read_buffer(fd, method, buffer,
-                        size, SIGUSR2, &err, 0)) != size ) {
-            printf("lio_read_buffer returned -1, err = %s\n", err);
-          } else
-            printf("lio_read_buffer returned %d\n", ret);
-
-	  for (i = 0; i < 4096; ++i) {
-		if (buffer[i] != 'A') {
-			printf("  buffer[%d] = %d\n", i, buffer[i] );
-			++exit_status;
+	while ((c = getopt(argc, argv, "s:di:")) != -1) {
+		switch (c) {
+		case 's':
+			symbols = optarg;
+			break;
+		case 'd':
+			++die_on_err;
+			break;
+		case 'i':
+			iter = atoi(optarg);
 			break;
 		}
-	  }
-
-	  if (exit_status)
-		exit(exit_status);
-
 	}
 
-        unlink("unit_test_file");
-	exit(0);
-    }
-
-    for (ind=0; ind < sizeof(Unit_info)/sizeof(struct unit_info_t); ind++) {
-
-	printf("\n********* write %s ***************\n", Unit_info[ind].str);
-	if (lseek(fd, 0, 0) == -1) {
-		printf("lseek(fd,0,0), %d, failed, errno %d\n",
-		       __LINE__, errno );
-		++exit_status;
+	if ((fd =
+	     open("unit_test_file", O_CREAT | O_RDWR | O_TRUNC, 0777)) == -1) {
+		perror
+		    ("open(unit_test_file, O_CREAT|O_RDWR|O_TRUNC, 0777) failed");
+		exit(1);
 	}
 
-	memset( buffer, 'A', 4096 );
-        if ((ret=lio_write_buffer(fd, Unit_info[ind].method, buffer,
-			size, Unit_info[ind].sig, &err, 0)) != size ) {
-	    printf(">>>>> lio_write_buffer(fd,0%x,buffer,%d,%d,err,0) returned -1,\n   err = %s\n",
-		   Unit_info[ind].method, size, Unit_info[ind].sig, err);
-	    ++exit_status;
-	    if (die_on_err)
-		exit(exit_status);
-        } else{
-	    printf("lio_write_buffer returned %d\n", ret);
+	Debug_level = 9;
+
+	if (symbols != NULL) {
+		if ((method = lio_parse_io_arg2(symbols, &err)) == -1) {
+			printf
+			    ("lio_parse_io_arg2(%s, &err) failed, bad token starting at %s\n",
+			     symbols, err);
+			if (die_on_err)
+				exit(1);
+		} else
+			printf("lio_parse_io_arg2(%s, &err) returned %#o\n",
+			       symbols, method);
+
+		exit_status = 0;
+		for (ind = 0; ind < iter; ind++) {
+			memset(buffer, 'A', 4096);
+			if (lseek(fd, 0, 0) == -1) {
+				printf("lseek(fd,0,0), %d, failed, errno %d\n",
+				       __LINE__, errno);
+				++exit_status;
+			}
+			if ((ret = lio_write_buffer(fd, method, buffer,
+						    size, SIGUSR1, &err,
+						    0)) != size) {
+				printf
+				    ("lio_write_buffer returned -1, err = %s\n",
+				     err);
+			} else
+				printf("lio_write_buffer returned %d\n", ret);
+
+			memset(buffer, 'B', 4096);
+			if (lseek(fd, 0, 0) == -1) {
+				printf("lseek(fd,0,0), %d, failed, errno %d\n",
+				       __LINE__, errno);
+				++exit_status;
+			}
+			if ((ret = lio_read_buffer(fd, method, buffer,
+						   size, SIGUSR2, &err,
+						   0)) != size) {
+				printf
+				    ("lio_read_buffer returned -1, err = %s\n",
+				     err);
+			} else
+				printf("lio_read_buffer returned %d\n", ret);
+
+			for (i = 0; i < 4096; ++i) {
+				if (buffer[i] != 'A') {
+					printf("  buffer[%d] = %d\n", i,
+					       buffer[i]);
+					++exit_status;
+					break;
+				}
+			}
+
+			if (exit_status)
+				exit(exit_status);
+
+		}
+
+		unlink("unit_test_file");
+		exit(0);
 	}
 
-	printf("\n********* read %s ***************\n", Unit_info[ind].str);
-	if (lseek(fd, 0, 0) == -1) {
-		printf("lseek(fd,0,0), %d, failed, errno %d\n",
-		       __LINE__, errno );
-		++exit_status;
-	}
-	memset( buffer, 'B', 4096 );
-        if ((ret=lio_read_buffer(fd, Unit_info[ind].method, buffer,
-			size, Unit_info[ind].sig, &err, 0)) != size ) {
-	    printf(">>>>> lio_read_buffer(fd,0%x,buffer,%d,%d,err,0) returned -1,\n   err = %s\n",
-		   Unit_info[ind].method, size, Unit_info[ind].sig, err);
-	    ++exit_status;
-	    if (die_on_err)
-		exit(exit_status);
-        } else {
-	    printf("lio_read_buffer returned %d\n", ret);
-	}
+	for (ind = 0; ind < sizeof(Unit_info) / sizeof(struct unit_info_t);
+	     ind++) {
 
-	  for (i = 0; i < 4096; ++i) {
-		if (buffer[i] != 'A') {
-			printf("  buffer[%d] = %d\n", i, buffer[i] );
+		printf("\n********* write %s ***************\n",
+		       Unit_info[ind].str);
+		if (lseek(fd, 0, 0) == -1) {
+			printf("lseek(fd,0,0), %d, failed, errno %d\n",
+			       __LINE__, errno);
+			++exit_status;
+		}
+
+		memset(buffer, 'A', 4096);
+		if ((ret = lio_write_buffer(fd, Unit_info[ind].method, buffer,
+					    size, Unit_info[ind].sig, &err,
+					    0)) != size) {
+			printf
+			    (">>>>> lio_write_buffer(fd,0%x,buffer,%d,%d,err,0) returned -1,\n   err = %s\n",
+			     Unit_info[ind].method, size, Unit_info[ind].sig,
+			     err);
 			++exit_status;
 			if (die_on_err)
 				exit(exit_status);
-			break;
+		} else {
+			printf("lio_write_buffer returned %d\n", ret);
 		}
-	  }
 
-	fflush(stdout);
-	fflush(stderr);
-	sleep(1);
+		printf("\n********* read %s ***************\n",
+		       Unit_info[ind].str);
+		if (lseek(fd, 0, 0) == -1) {
+			printf("lseek(fd,0,0), %d, failed, errno %d\n",
+			       __LINE__, errno);
+			++exit_status;
+		}
+		memset(buffer, 'B', 4096);
+		if ((ret = lio_read_buffer(fd, Unit_info[ind].method, buffer,
+					   size, Unit_info[ind].sig, &err,
+					   0)) != size) {
+			printf
+			    (">>>>> lio_read_buffer(fd,0%x,buffer,%d,%d,err,0) returned -1,\n   err = %s\n",
+			     Unit_info[ind].method, size, Unit_info[ind].sig,
+			     err);
+			++exit_status;
+			if (die_on_err)
+				exit(exit_status);
+		} else {
+			printf("lio_read_buffer returned %d\n", ret);
+		}
 
-    }
+		for (i = 0; i < 4096; ++i) {
+			if (buffer[i] != 'A') {
+				printf("  buffer[%d] = %d\n", i, buffer[i]);
+				++exit_status;
+				if (die_on_err)
+					exit(exit_status);
+				break;
+			}
+		}
 
-    unlink("unit_test_file");
+		fflush(stdout);
+		fflush(stderr);
+		sleep(1);
 
-    exit(exit_status);
+	}
+
+	unlink("unit_test_file");
+
+	exit(exit_status);
 }
 #endif
diff --git a/lib/tst_cwd_has_free.c b/lib/tst_cwd_has_free.c
index 18209aa..e44c31f 100644
--- a/lib/tst_cwd_has_free.c
+++ b/lib/tst_cwd_has_free.c
@@ -11,12 +11,12 @@
  */
 #include <sys/vfs.h>
 
-int
-tst_cwd_has_free(int required_kib)
+int tst_cwd_has_free(int required_kib)
 {
 	struct statfs sf;
 	statfs(".", &sf);
 
 	/* check that we have enough blocks to create swap file */
-	return ((float)sf.f_bfree)/(1024/sf.f_bsize) >= required_kib?1:0;
+	return ((float)sf.f_bfree) / (1024 / sf.f_bsize) >=
+	    required_kib ? 1 : 0;
 }
diff --git a/lib/tst_is_cwd.c b/lib/tst_is_cwd.c
index 636aaca..1021660 100644
--- a/lib/tst_is_cwd.c
+++ b/lib/tst_is_cwd.c
@@ -11,7 +11,7 @@
 
 #include <sys/vfs.h>
 
-#define TMPFS_MAGIC 0x01021994 /* man 2 statfs */
+#define TMPFS_MAGIC 0x01021994	/* man 2 statfs */
 int tst_is_cwd_tmpfs(void)
 {
 	struct statfs sf;
@@ -21,7 +21,7 @@
 	return (sf.f_type == TMPFS_MAGIC);
 }
 
-#define NFS_MAGIC 0x6969 /* man 2 statfs */
+#define NFS_MAGIC 0x6969	/* man 2 statfs */
 int tst_is_cwd_nfs(void)
 {
 	struct statfs sf;
@@ -31,14 +31,14 @@
 	return (sf.f_type == NFS_MAGIC);
 }
 
-#define V9FS_MAGIC 0x01021997 /* kernel-source/include/linux/magic.h */
+#define V9FS_MAGIC 0x01021997	/* kernel-source/include/linux/magic.h */
 int tst_is_cwd_v9fs(void)
 {
-        struct statfs sf;
-        statfs(".", &sf);
+	struct statfs sf;
+	statfs(".", &sf);
 
-        /*  Verify that the file is not on a nfs filesystem */
-        return (sf.f_type == V9FS_MAGIC);
+	/*  Verify that the file is not on a nfs filesystem */
+	return (sf.f_type == V9FS_MAGIC);
 }
 
 #define RAMFS_MAGIC 0x858458f6
diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index e824295..cb4fd67 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -30,7 +30,6 @@
  *
  */
 
-
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -42,7 +41,7 @@
 	char *kver;
 	char *r1, *r2, *r3;
 #if !defined(linux)
-	extern char *strsep();          /* shut up some compilers */
+	extern char *strsep();	/* shut up some compilers */
 #endif
 
 	uname(&uval);
@@ -56,7 +55,8 @@
 	*k3 = atoi(r3);
 }
 
-int tst_kvercmp(int r1, int r2, int r3) {
+int tst_kvercmp(int r1, int r2, int r3)
+{
 	int a1, a2, a3;
 	int testver, currver;
 
diff --git a/lib/tst_res.c b/lib/tst_res.c
index fc231c4..bbed538 100644
--- a/lib/tst_res.c
+++ b/lib/tst_res.c
@@ -31,7 +31,6 @@
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
  */
 
-
 /* $Id: tst_res.c,v 1.14 2009/12/01 08:57:20 yaberauneya Exp $ */
 
 /**********************************************************
@@ -105,15 +104,15 @@
 
 /* Break bad habits. */
 #ifdef GARRETT_IS_A_PEDANTIC_BASTARD
-pid_t		spawned_program_pid;
+pid_t spawned_program_pid;
 #endif
 
-#define VERBOSE      1     /* flag values for the T_mode variable */
+#define VERBOSE      1		/* flag values for the T_mode variable */
 #define NOPASS       3
 #define DISCARD      4
 
-#define MAXMESG      80    /* max length of internal messages */
-#define USERMESG     2048  /* max length of user message */
+#define MAXMESG      80		/* max length of internal messages */
+#define USERMESG     2048	/* max length of user message */
 #define TRUE         1
 #define FALSE        0
 
@@ -144,37 +143,36 @@
 /*
  * Define some static/global variables.
  */
-static FILE *T_out = NULL;    /* tst_res() output file descriptor */
-static char *File;            /* file whose contents is part of result */
-static int  T_exitval = 0;    /* exit value used by tst_exit() */
-static int  T_mode = VERBOSE; /* flag indicating print mode: VERBOSE, */
-                              /* NOPASS, DISCARD */
+static FILE *T_out = NULL;	/* tst_res() output file descriptor */
+static char *File;		/* file whose contents is part of result */
+static int T_exitval = 0;	/* exit value used by tst_exit() */
+static int T_mode = VERBOSE;	/* flag indicating print mode: VERBOSE, */
+			      /* NOPASS, DISCARD */
 
-static char Warn_mesg[MAXMESG];  /* holds warning messages */
+static char Warn_mesg[MAXMESG];	/* holds warning messages */
 
 /*
  * These are used for condensing output when NOT in verbose mode.
  */
-static int  Buffered = FALSE; /* TRUE if condensed output is currently */
-                              /* buffered (i.e. not yet printed) */
-static char *Last_tcid;       /* previous test case id */
-static int  Last_num;         /* previous test case number */
-static int  Last_type;        /* previous test result type */
-static char *Last_mesg;       /* previous test result message */
-
+static int Buffered = FALSE;	/* TRUE if condensed output is currently */
+			      /* buffered (i.e. not yet printed) */
+static char *Last_tcid;		/* previous test case id */
+static int Last_num;		/* previous test case number */
+static int Last_type;		/* previous test result type */
+static char *Last_mesg;		/* previous test result message */
 
 /*
  * These globals may be externed by the test.
  */
-int Tst_count = 0;      /* current count of test cases executed; NOTE: */
-                        /* Tst_count may be externed by other programs */
+int Tst_count = 0;		/* current count of test cases executed; NOTE: */
+			/* Tst_count may be externed by other programs */
 
 /*
  * These globals must be defined in the test.
  */
-extern char *TCID;      /* Test case identifier from the test source */
-extern int  TST_TOTAL;  /* Total number of test cases from the test */
-                        /* source */
+extern char *TCID;		/* Test case identifier from the test source */
+extern int TST_TOTAL;		/* Total number of test cases from the test */
+			/* source */
 
 struct pair {
 	const char *name;
@@ -187,6 +185,7 @@
 		return "???";
 	return pair[idx].name;
 }
+
 #define pair_lookup(pair, idx) pair_lookup(pair, ARRAY_SIZE(pair), idx)
 
 /*
@@ -196,12 +195,12 @@
 {
 	struct pair ttype_pairs[] = {
 		PAIR(TPASS)
-		PAIR(TFAIL)
-		PAIR(TBROK)
-		PAIR(TRETR)
-		PAIR(TCONF)
-		PAIR(TWARN)
-		PAIR(TINFO)
+		    PAIR(TFAIL)
+		    PAIR(TBROK)
+		    PAIR(TRETR)
+		    PAIR(TCONF)
+		    PAIR(TWARN)
+		    PAIR(TINFO)
 	};
 	return pair_lookup(ttype_pairs, TTYPE_RESULT(ttype));
 }
@@ -213,40 +212,40 @@
 {
 	struct pair errno_pairs[] = {
 		PAIR(EPERM)
-		PAIR(ENOENT)
-		PAIR(ESRCH)
-		PAIR(EINTR)
-		PAIR(EIO)
-		PAIR(ENXIO)
-		PAIR(E2BIG)
-		PAIR(ENOEXEC)
-		PAIR(EBADF)
-		PAIR(ECHILD)
-		PAIR(EAGAIN)
-		PAIR(ENOMEM)
-		PAIR(EACCES)
-		PAIR(EFAULT)
-		PAIR(ENOTBLK)
-		PAIR(EBUSY)
-		PAIR(EEXIST)
-		PAIR(EXDEV)
-		PAIR(ENODEV)
-		PAIR(ENOTDIR)
-		PAIR(EISDIR)
-		PAIR(EINVAL)
-		PAIR(ENFILE)
-		PAIR(EMFILE)
-		PAIR(ENOTTY)
-		PAIR(ETXTBSY)
-		PAIR(EFBIG)
-		PAIR(ENOSPC)
-		PAIR(ESPIPE)
-		PAIR(EROFS)
-		PAIR(EMLINK)
-		PAIR(EPIPE)
-		PAIR(EDOM)
-		PAIR(ERANGE)
-		PAIR(ENAMETOOLONG)
+		    PAIR(ENOENT)
+		    PAIR(ESRCH)
+		    PAIR(EINTR)
+		    PAIR(EIO)
+		    PAIR(ENXIO)
+		    PAIR(E2BIG)
+		    PAIR(ENOEXEC)
+		    PAIR(EBADF)
+		    PAIR(ECHILD)
+		    PAIR(EAGAIN)
+		    PAIR(ENOMEM)
+		    PAIR(EACCES)
+		    PAIR(EFAULT)
+		    PAIR(ENOTBLK)
+		    PAIR(EBUSY)
+		    PAIR(EEXIST)
+		    PAIR(EXDEV)
+		    PAIR(ENODEV)
+		    PAIR(ENOTDIR)
+		    PAIR(EISDIR)
+		    PAIR(EINVAL)
+		    PAIR(ENFILE)
+		    PAIR(EMFILE)
+		    PAIR(ENOTTY)
+		    PAIR(ETXTBSY)
+		    PAIR(EFBIG)
+		    PAIR(ENOSPC)
+		    PAIR(ESPIPE)
+		    PAIR(EROFS)
+		    PAIR(EMLINK)
+		    PAIR(EPIPE)
+		    PAIR(EDOM)
+		    PAIR(ERANGE)
+		    PAIR(ENAMETOOLONG)
 	};
 	return pair_lookup(errno_pairs, err);
 }
@@ -301,7 +300,7 @@
 	} else {
 		if (Tst_count < 0)
 			tst_print(TCID, 0, TWARN,
-			    "tst_res(): Tst_count < 0 is not valid");
+				  "tst_res(): Tst_count < 0 is not valid");
 
 		/*
 		 * Process each display type.
@@ -309,11 +308,11 @@
 		switch (T_mode) {
 		case DISCARD:
 			break;
-		case NOPASS: /* filtered by tst_print() */
-			tst_condense(Tst_count+1, ttype, tmesg);
+		case NOPASS:	/* filtered by tst_print() */
+			tst_condense(Tst_count + 1, ttype, tmesg);
 			break;
-		default:      /* VERBOSE */
-			tst_print(TCID, Tst_count+1, ttype, tmesg);
+		default:	/* VERBOSE */
+			tst_print(TCID, Tst_count + 1, ttype, tmesg);
 			break;
 		}
 
@@ -322,7 +321,6 @@
 
 }
 
-
 /*
  * tst_condense() - Handle test cases in NOPASS mode (i.e.
  *                  buffer the current result and print the last result
@@ -336,9 +334,8 @@
 	int ttype_result = TTYPE_RESULT(ttype);
 
 #if DEBUG
-	printf( "IN tst_condense: tcid = %s, tnum = %d, ttype = %d, "
-		"tmesg = %s\n",
-		TCID, tnum, ttype, tmesg);
+	printf("IN tst_condense: tcid = %s, tnum = %d, ttype = %d, "
+	       "tmesg = %s\n", TCID, tnum, ttype, tmesg);
 	fflush(stdout);
 #endif
 
@@ -381,7 +378,6 @@
 	}
 }
 
-
 /*
  * tst_flush() - Print any messages pending because due to tst_condense,
  *               and flush T_out.
@@ -404,7 +400,6 @@
 	fflush(T_out);
 }
 
-
 /*
  * tst_print() - Print a line to the output stream.
  */
@@ -443,7 +438,7 @@
 
 #if DEBUG
 	printf("IN tst_print: tnum = %d, ttype = %d, tmesg = %s\n",
-	    tnum, ttype, tmesg);
+	       tnum, ttype, tmesg);
 	fflush(stdout);
 #endif
 
@@ -463,7 +458,8 @@
 	 * through tst_res() (e.g. internal TWARN messages).
 	 */
 	if (T_mode == DISCARD || (T_mode == NOPASS && ttype_result != TFAIL &&
-	    ttype_result != TBROK && ttype_result != TWARN))
+				  ttype_result != TBROK
+				  && ttype_result != TWARN))
 		return;
 
 	/*
@@ -472,12 +468,11 @@
 	type = strttype(ttype);
 	if (T_mode == VERBOSE) {
 		size = snprintf(message, sizeof(message),
-		                "%-8s %4d  %s  :  %s",
-				tcid, tnum, type, tmesg);
+				"%-8s %4d  %s  :  %s", tcid, tnum, type, tmesg);
 	} else {
 		size = snprintf(message, sizeof(message),
-		                "%-8s %4d       %s  :  %s",
-			        tcid, tnum, type, tmesg);
+				"%-8s %4d       %s  :  %s",
+				tcid, tnum, type, tmesg);
 	}
 
 	if (size >= sizeof(message)) {
@@ -487,8 +482,8 @@
 
 	if (ttype & TERRNO) {
 		size += snprintf(message + size, sizeof(message) - size,
-		                 ": errno=%s(%i): %s", strerrnodef(err),
-		                 err, strerror(err));
+				 ": errno=%s(%i): %s", strerrnodef(err),
+				 err, strerror(err));
 	}
 
 	if (size >= sizeof(message)) {
@@ -498,9 +493,9 @@
 
 	if (ttype & TTERRNO) {
 		size += snprintf(message + size, sizeof(message) - size,
-		                 ": TEST_ERRNO=%s(%i): %s",
-		                 strerrnodef(TEST_ERRNO), (int)TEST_ERRNO,
-		                 strerror(TEST_ERRNO));
+				 ": TEST_ERRNO=%s(%i): %s",
+				 strerrnodef(TEST_ERRNO), (int)TEST_ERRNO,
+				 strerror(TEST_ERRNO));
 	}
 
 	if (size + 1 >= sizeof(message)) {
@@ -508,8 +503,8 @@
 		abort();
 	}
 
-	message[size]   = '\n';
-	message[size+1] = '\0';
+	message[size] = '\n';
+	message[size + 1] = '\0';
 
 	fputs(message, T_out);
 
@@ -523,7 +518,6 @@
 	File = NULL;
 }
 
-
 /*
  * check_env() - Check the value of the environment variable TOUTPUT and
  *               set the global variable T_mode.  The TOUTPUT environment
@@ -534,7 +528,7 @@
 static void check_env(void)
 {
 	static int first_time = 1;
-	char      *value;
+	char *value;
 
 #if DEBUG
 	printf("IN check_env\n");
@@ -547,7 +541,7 @@
 	first_time = 0;
 
 	/* BTOUTPUT not defined, use default */
-  	if ((value = getenv(TOUTPUT)) == NULL) {
+	if ((value = getenv(TOUTPUT)) == NULL) {
 		T_mode = VERBOSE;
 		return;
 	}
@@ -567,7 +561,6 @@
 	return;
 }
 
-
 /*
  * tst_exit() - Call exit() with the value T_exitval, set up by
  *              tst_res().  T_exitval has a bit set for most of the
@@ -578,7 +571,8 @@
 void tst_exit(void)
 {
 #if DEBUG
-	printf("IN tst_exit\n"); fflush(stdout);
+	printf("IN tst_exit\n");
+	fflush(stdout);
 	fflush(stdout);
 #endif
 
@@ -589,7 +583,6 @@
 	exit(T_exitval & ~(TRETR | TINFO | TCONF));
 }
 
-
 /*
  * tst_environ() - Preserve the tst_res() output location, despite any
  *                 changes to stdout.
@@ -602,7 +595,6 @@
 		return 0;
 }
 
-
 /*
  * Make tst_brk reentrant so that one can call the SAFE_* macros from within
  * user-defined cleanup functions.
@@ -613,13 +605,14 @@
  * tst_brk() - Fail or break current test case, and break the remaining
  *             tests cases.
  */
-void tst_brk(int ttype, char *fname, void (*func)(void), char *arg_fmt, ...)
+void tst_brk(int ttype, char *fname, void (*func) (void), char *arg_fmt, ...)
 {
 	char tmesg[USERMESG];
 	int ttype_result = TTYPE_RESULT(ttype);
 
 #if DEBUG
-	printf("IN tst_brk\n"); fflush(stdout);
+	printf("IN tst_brk\n");
+	fflush(stdout);
 	fflush(stdout);
 #endif
 
@@ -641,8 +634,8 @@
 	if (tst_brk_entered == 0) {
 		if (ttype_result == TCONF)
 			tst_res(ttype, NULL,
-			    "Remaining cases not appropriate for "
-			    "configuration");
+				"Remaining cases not appropriate for "
+				"configuration");
 		else if (ttype_result == TRETR)
 			tst_res(ttype, NULL, "Remaining cases retired");
 		else if (ttype_result == TBROK)
@@ -655,7 +648,7 @@
 	 */
 	if (func != NULL) {
 		tst_brk_entered++;
-		(*func)();
+		(*func) ();
 		tst_brk_entered--;
 	}
 	if (tst_brk_entered == 0)
@@ -671,7 +664,8 @@
 	char tmesg[USERMESG];
 
 #if DEBUG
-	printf("IN tst_resm\n"); fflush(stdout);
+	printf("IN tst_resm\n");
+	fflush(stdout);
 	fflush(stdout);
 #endif
 
@@ -680,16 +674,16 @@
 	tst_res(ttype, NULL, "%s", tmesg);
 }
 
-
 /*
  * tst_brkm() - Interface to tst_brk(), with no filename.
  */
-void tst_brkm(int ttype, void (*func)(void), char *arg_fmt, ...)
+void tst_brkm(int ttype, void (*func) (void), char *arg_fmt, ...)
 {
 	char tmesg[USERMESG];
 
 #if DEBUG
-	printf("IN tst_brkm\n"); fflush(stdout);
+	printf("IN tst_brkm\n");
+	fflush(stdout);
 	fflush(stdout);
 #endif
 
@@ -698,35 +692,34 @@
 	tst_brk(ttype, NULL, func, "%s", tmesg);
 }
 
-
 /*
  * tst_require_root() - Test for root permissions and abort if not.
  */
-void tst_require_root(void (*func)(void))
+void tst_require_root(void (*func) (void))
 {
 	if (geteuid() != 0)
 		tst_brkm(TCONF, func, "Test needs to be run as root");
 }
 
-
 /*
  * cat_file() - Print the contents of a file to standard out.
  */
 static void cat_file(char *filename)
 {
 	FILE *fp;
-	int  b_read, b_written;
+	int b_read, b_written;
 	char buffer[BUFSIZ];
 
 #if DEBUG
-	printf("IN cat_file\n"); fflush(stdout);
+	printf("IN cat_file\n");
+	fflush(stdout);
 #endif
 
 	if ((fp = fopen(filename, "r")) == NULL) {
 		sprintf(Warn_mesg,
 			"tst_res(): fopen(%s, \"r\") failed; errno = %d: %s",
 			filename, errno, strerror(errno));
-			tst_print(TCID, 0, TWARN, Warn_mesg);
+		tst_print(TCID, 0, TWARN, Warn_mesg);
 		return;
 	}
 
@@ -760,14 +753,13 @@
 	}
 }
 
-
 #ifdef UNIT_TEST
 /****************************************************************************
  * Unit test code: Takes input from stdin and can make the following
  *                 calls: tst_res(), tst_resm(), tst_brk(), tst_brkm(),
  *                 tst_flush_buf(), tst_exit().
  ****************************************************************************/
-int  TST_TOTAL = 10;
+int TST_TOTAL = 10;
 char *TCID = "TESTTCID";
 
 #define RES  "tst_res.c UNIT TEST message; ttype = %d; contents of \"%s\":"
@@ -775,7 +767,7 @@
 
 int main(void)
 {
-	int  ttype;
+	int ttype;
 	char chr;
 	char fname[MAXMESG];
 
@@ -790,12 +782,11 @@
 	       %2i : call tst_res(TWARN, ...)\n\
 	       %2i : call tst_res(TRETR, ...)\n\
 	       %2i : call tst_res(TINFO, ...)\n\
-	       %2i : call tst_res(TCONF, ...)\n\n",
-		TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
+	       %2i : call tst_res(TCONF, ...)\n\n", TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
 
 	while (1) {
 		printf("Enter ttype (-5,-4,-3,-2,-1,%i,%i,%i,%i,%i,%i,%i): ",
-			TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
+		       TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
 		scanf("%d%c", &ttype, &chr);
 
 		switch (ttype) {
@@ -808,20 +799,23 @@
 			break;
 
 		case -3:
-			printf("Enter the current type (%i=FAIL, %i=BROK, %i=RETR, %i=CONF): ",
-				TFAIL, TBROK, TRETR, TCONF);
+			printf
+			    ("Enter the current type (%i=FAIL, %i=BROK, %i=RETR, %i=CONF): ",
+			     TFAIL, TBROK, TRETR, TCONF);
 			scanf("%d%c", &ttype, &chr);
 			printf("Enter file name (<cr> for none): ");
 			gets(fname);
 			if (strcmp(fname, "") == 0)
 				tst_brkm(ttype, tst_exit, RESM, ttype);
 			else
-				tst_brk(ttype, fname, tst_exit, RES, ttype, fname);
-		break;
+				tst_brk(ttype, fname, tst_exit, RES, ttype,
+					fname);
+			break;
 
 		case -4:
-			printf("Enter the current type (%i,%i,%i,%i,%i,%i,%i): ",
-				TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
+			printf
+			    ("Enter the current type (%i,%i,%i,%i,%i,%i,%i): ",
+			     TPASS, TFAIL, TBROK, TWARN, TRETR, TINFO, TCONF);
 			scanf("%d%c", &ttype, &chr);
 		default:
 			printf("Enter file name (<cr> for none): ");
diff --git a/lib/tst_sig.c b/lib/tst_sig.c
index 5bc6c0c..2ffe610 100644
--- a/lib/tst_sig.c
+++ b/lib/tst_sig.c
@@ -179,11 +179,11 @@
 #ifdef CRAY
 		case SIGINFO:
 		case SIGRECOVERY:	/* allow chkpnt/restart */
-#endif				/* CRAY */
+#endif /* CRAY */
 
 #ifdef SIGSWAP
 		case SIGSWAP:
-#endif				/* SIGSWAP */
+#endif /* SIGSWAP */
 
 #ifdef SIGCKPT
 		case SIGCKPT:
@@ -198,10 +198,10 @@
 			 */
 #ifdef SIGPTINTR
 		case SIGPTINTR:
-#endif				/* SIGPTINTR */
+#endif /* SIGPTINTR */
 #ifdef SIGPTRESCHED
 		case SIGPTRESCHED:
-#endif				/* SIGPTRESCHED */
+#endif /* SIGPTRESCHED */
 #ifdef _SIGRESERVE
 		case _SIGRESERVE:
 #endif
@@ -222,15 +222,15 @@
 
 		default:
 			if (tst_setup_signal(sig, handler) == SIG_ERR)
-				tst_resm(TWARN|TERRNO,
-				    "signal failed for signal %d", sig);
+				tst_resm(TWARN | TERRNO,
+					 "signal failed for signal %d", sig);
 			break;
 		}
 #ifdef __sgi
 		/* On irix  (07/96), signal() fails when signo is 33 or higher */
 		if (sig + 1 >= 33)
 			break;
-#endif				/*  __sgi */
+#endif /*  __sgi */
 
 	}			/* endfor */
 }
@@ -246,15 +246,14 @@
 	 * Break remaining test cases, do any cleanup, then exit
 	 */
 	tst_brkm(TBROK, T_cleanup,
-	    "unexpected signal %d received (pid = %d).", sig, getpid());
+		 "unexpected signal %d received (pid = %d).", sig, getpid());
 }
 
 /*
  * tst_setup_signal - A function like signal(), but we have
  *                    control over its personality.
  */
-static void (*tst_setup_signal(int sig, void (*handler) (int))) (int)
-{
+static void (*tst_setup_signal(int sig, void (*handler) (int))) (int) {
 	struct sigaction my_act, old_act;
 	int ret;
 
diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
index 90c8945..0a17fcc 100644
--- a/lib/tst_tmpdir.c
+++ b/lib/tst_tmpdir.c
@@ -119,26 +119,24 @@
 	 * use our default TEMPDIR.
 	 */
 	if ((env_tmpdir = getenv("TMPDIR")))
-		snprintf(template, PATH_MAX, "%s/%.3sXXXXXX",
-			env_tmpdir, TCID);
+		snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", env_tmpdir, TCID);
 	else
-		snprintf(template, PATH_MAX, "%s/%.3sXXXXXX",
-			TEMPDIR, TCID);
+		snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", TEMPDIR, TCID);
 
 	/* Make the temporary directory in one shot using mkdtemp. */
 	if (mkdtemp(template) == NULL)
-		tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
-			"%s: mkdtemp(%s) failed", __func__, template);
+		tst_brkm(TBROK | TERRNO, tmpdir_cleanup,
+			 "%s: mkdtemp(%s) failed", __func__, template);
 	if ((TESTDIR = strdup(template)) == NULL)
-		tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
-			"%s: strdup(%s) failed", __func__, template);
+		tst_brkm(TBROK | TERRNO, tmpdir_cleanup,
+			 "%s: strdup(%s) failed", __func__, template);
 
 	if (chown(TESTDIR, -1, getgid()) == -1)
-		tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
-			"chown(%s, -1, %d) failed", TESTDIR, getgid());
+		tst_brkm(TBROK | TERRNO, tmpdir_cleanup,
+			 "chown(%s, -1, %d) failed", TESTDIR, getgid());
 	if (chmod(TESTDIR, DIR_MODE) == -1)
-		tst_brkm(TBROK|TERRNO, tmpdir_cleanup,
-			"chmod(%s, %#o) failed", TESTDIR, DIR_MODE);
+		tst_brkm(TBROK | TERRNO, tmpdir_cleanup,
+			 "chmod(%s, %#o) failed", TESTDIR, DIR_MODE);
 
 	/*
 	 * Change to the temporary directory.  If the chdir() fails, issue
@@ -147,13 +145,13 @@
 	 * fails, also issue a TWARN message.
 	 */
 	if (chdir(TESTDIR) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "%s: chdir(%s) failed",
-			__func__, TESTDIR);
+		tst_brkm(TBROK | TERRNO, NULL, "%s: chdir(%s) failed",
+			 __func__, TESTDIR);
 
 		/* Try to remove the directory */
 		if (rmobj(TESTDIR, &errmsg) == -1)
 			tst_resm(TWARN, "%s: rmobj(%s) failed: %s",
-			__func__, TESTDIR, errmsg);
+				 __func__, TESTDIR, errmsg);
 
 		tmpdir_cleanup();
 	}
@@ -171,14 +169,15 @@
 	 */
 	if (TESTDIR == NULL) {
 		tst_resm(TWARN,
-			"%s: TESTDIR was NULL; no removal attempted", __func__);
+			 "%s: TESTDIR was NULL; no removal attempted",
+			 __func__);
 		return;
 	}
 
 	if ((parent_dir = malloc(PATH_MAX)) == NULL) {
 		/* Make sure that we exit quickly and noisily. */
-		tst_brkm(TBROK|TERRNO, NULL,
-			"%s: malloc(%d) failed", __func__, PATH_MAX);
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "%s: malloc(%d) failed", __func__, PATH_MAX);
 	}
 
 	/*
@@ -195,7 +194,7 @@
 	}
 
 	if ((parent_dir = dirname(parent_dir)) == NULL) {
-		tst_resm(TWARN|TERRNO, "%s: dirname failed", __func__);
+		tst_resm(TWARN | TERRNO, "%s: dirname failed", __func__);
 		return;
 	}
 
@@ -203,9 +202,9 @@
 	 * Change directory to parent_dir (The dir above TESTDIR).
 	 */
 	if (chdir(parent_dir) != 0) {
-		tst_resm(TWARN|TERRNO,
-			"%s: chdir(%s) failed\nAttempting to remove temp dir "
-				"anyway", __func__, parent_dir);
+		tst_resm(TWARN | TERRNO,
+			 "%s: chdir(%s) failed\nAttempting to remove temp dir "
+			 "anyway", __func__, parent_dir);
 	}
 
 	/*
@@ -213,10 +212,9 @@
 	 */
 	if (rmobj(TESTDIR, &errmsg) == -1)
 		tst_resm(TWARN, "%s: rmobj(%s) failed: %s",
-			__func__, TESTDIR, errmsg);
+			 __func__, TESTDIR, errmsg);
 }
 
-
 /*
  * tmpdir_cleanup(void) - This function is used when tst_tmpdir()
  *			  encounters an error, and must cleanup and exit.
@@ -226,6 +224,6 @@
 static void tmpdir_cleanup(void)
 {
 	tst_brkm(TWARN, NULL,
-	    "%s: no user cleanup function called before exiting", __func__);
+		 "%s: no user cleanup function called before exiting",
+		 __func__);
 }
-
diff --git a/lib/write_log.c b/lib/write_log.c
index 989455b..1731dc3 100644
--- a/lib/write_log.c
+++ b/lib/write_log.c
@@ -86,14 +86,14 @@
 /*#define PATH_MAX pathconf("/", _PC_PATH_MAX)*/
 #endif
 
-char	Wlog_Error_String[256];
+char Wlog_Error_String[256];
 
 #if __STDC__
-static int	wlog_rec_pack(struct wlog_rec *wrec, char *buf, int flag);
-static int	wlog_rec_unpack(struct wlog_rec *wrec, char *buf);
+static int wlog_rec_pack(struct wlog_rec *wrec, char *buf, int flag);
+static int wlog_rec_unpack(struct wlog_rec *wrec, char *buf);
 #else
-static int	wlog_rec_pack();
-static int	wlog_rec_unpack();
+static int wlog_rec_pack();
+static int wlog_rec_unpack();
 #endif
 
 /*
@@ -110,13 +110,12 @@
  * umask.
  */
 
-int
-wlog_open(wfile, trunc, mode)
-struct wlog_file	*wfile;
-int			trunc;
-int			mode;
+int wlog_open(wfile, trunc, mode)
+struct wlog_file *wfile;
+int trunc;
+int mode;
 {
-	int	omask, oflags;
+	int omask, oflags;
 
 	if (trunc)
 		trunc = O_TRUNC;
@@ -128,8 +127,7 @@
 	 */
 
 	oflags = O_WRONLY | O_APPEND | O_CREAT | trunc;
-	wfile->w_afd =
-		open(wfile->w_file, oflags, mode);
+	wfile->w_afd = open(wfile->w_file, oflags, mode);
 	umask(omask);
 
 	if (wfile->w_afd == -1) {
@@ -161,9 +159,8 @@
  * with the wlog_open() call.
  */
 
-int
-wlog_close(wfile)
-struct wlog_file	*wfile;
+int wlog_close(wfile)
+struct wlog_file *wfile;
 {
 	close(wfile->w_afd);
 	close(wfile->w_rfd);
@@ -196,67 +193,67 @@
  * place before the record is written.
  */
 
-int
-wlog_record_write(wfile, wrec, offset)
-struct wlog_file	*wfile;
-struct wlog_rec		*wrec;
-long			offset;
+int wlog_record_write(wfile, wrec, offset)
+struct wlog_file *wfile;
+struct wlog_rec *wrec;
+long offset;
 {
-    int		reclen;
-    char	wbuf[WLOG_REC_MAX_SIZE + 2];
+	int reclen;
+	char wbuf[WLOG_REC_MAX_SIZE + 2];
 
-    /*
-     * If offset is -1, we append the record at the end of file
-     *
-     * Otherwise, we overlay wrec at the file offset indicated and assume
-     * that the caller passed us the correct offset.  We do not record the
-     * fname in this case.
-     */
-
-    reclen = wlog_rec_pack(wrec, wbuf, (offset < 0));
-
-    if (offset < 0) {
 	/*
-	 * Since we're writing a complete new record, we must also tack
-	 * its length onto the end so that wlog_scan_backward() will work.
-	 * Length is asumed to fit into 2 bytes.
+	 * If offset is -1, we append the record at the end of file
+	 *
+	 * Otherwise, we overlay wrec at the file offset indicated and assume
+	 * that the caller passed us the correct offset.  We do not record the
+	 * fname in this case.
 	 */
 
-	    wbuf[reclen] = reclen / 256;
-	    wbuf[reclen+1] = reclen % 256;
-	    reclen += 2;
+	reclen = wlog_rec_pack(wrec, wbuf, (offset < 0));
 
-            if (write(wfile->w_afd, wbuf, reclen) == -1) {
-                  sprintf(Wlog_Error_String,
-                          "Could not write log - write(%s, %s, %d) failed:  %s\n",
-                           wfile->w_file, wbuf, reclen, strerror(errno));
-                  return -1;
-            } else {
-                 offset = lseek(wfile->w_afd, 0, SEEK_CUR) - reclen;
-                 if (offset == -1) {
-                       sprintf(Wlog_Error_String,
-                               "Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed:  %s\n",
-                                wfile->w_file, strerror(errno));
-                       return -1;
-                 }
-            }
-    } else {
-            if ((lseek(wfile->w_rfd, offset, SEEK_SET)) == -1) {
-                  sprintf(Wlog_Error_String,
-                          "Could not reposition file pointer - lseek(%s, %ld, SEEK_SET) failed:  %s\n",
-                           wfile->w_file, offset, strerror(errno));
-                  return -1;
-            } else {
-                  if ((write(wfile->w_rfd, wbuf, reclen)) == -1) {
-                        sprintf(Wlog_Error_String,
-                                "Could not write log - write(%s, %s, %d) failed:  %s\n",
-                                 wfile->w_file, wbuf, reclen, strerror(errno));
-                        return -1;
-                  }
-            }
-    }
+	if (offset < 0) {
+		/*
+		 * Since we're writing a complete new record, we must also tack
+		 * its length onto the end so that wlog_scan_backward() will work.
+		 * Length is asumed to fit into 2 bytes.
+		 */
 
-    return offset;
+		wbuf[reclen] = reclen / 256;
+		wbuf[reclen + 1] = reclen % 256;
+		reclen += 2;
+
+		if (write(wfile->w_afd, wbuf, reclen) == -1) {
+			sprintf(Wlog_Error_String,
+				"Could not write log - write(%s, %s, %d) failed:  %s\n",
+				wfile->w_file, wbuf, reclen, strerror(errno));
+			return -1;
+		} else {
+			offset = lseek(wfile->w_afd, 0, SEEK_CUR) - reclen;
+			if (offset == -1) {
+				sprintf(Wlog_Error_String,
+					"Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed:  %s\n",
+					wfile->w_file, strerror(errno));
+				return -1;
+			}
+		}
+	} else {
+		if ((lseek(wfile->w_rfd, offset, SEEK_SET)) == -1) {
+			sprintf(Wlog_Error_String,
+				"Could not reposition file pointer - lseek(%s, %ld, SEEK_SET) failed:  %s\n",
+				wfile->w_file, offset, strerror(errno));
+			return -1;
+		} else {
+			if ((write(wfile->w_rfd, wbuf, reclen)) == -1) {
+				sprintf(Wlog_Error_String,
+					"Could not write log - write(%s, %s, %d) failed:  %s\n",
+					wfile->w_file, wbuf, reclen,
+					strerror(errno));
+				return -1;
+			}
+		}
+	}
+
+	return offset;
 }
 
 /*
@@ -267,17 +264,16 @@
  * will be passed a single parameter - a wlog_rec structure .
  */
 
-int
-wlog_scan_backward(wfile, nrecs, func, data)
-struct wlog_file	*wfile;
-int 			nrecs;
-int 			(*func)();
-long			data;
+int wlog_scan_backward(wfile, nrecs, func, data)
+struct wlog_file *wfile;
+int nrecs;
+int (*func) ();
+long data;
 {
-	int		fd, leftover, nbytes, offset, recnum, reclen, rval;
-	char   		buf[BSIZE*32], *bufend, *cp, *bufstart;
-	char		albuf[WLOG_REC_MAX_SIZE];
-	struct wlog_rec	wrec;
+	int fd, leftover, nbytes, offset, recnum, reclen, rval;
+	char buf[BSIZE * 32], *bufend, *cp, *bufstart;
+	char albuf[WLOG_REC_MAX_SIZE];
+	struct wlog_rec wrec;
 
 	fd = wfile->w_rfd;
 
@@ -285,19 +281,19 @@
 	 * Move to EOF.  offset will always hold the current file offset
 	 */
 
-        if ((lseek(fd, 0, SEEK_END)) == -1) {
-              sprintf(Wlog_Error_String,
-                      "Could not reposition file pointer - lseek(%s, 0, SEEK_END) failed:  %s\n",
-                       wfile->w_file, strerror(errno));
-              return -1;
-        }
+	if ((lseek(fd, 0, SEEK_END)) == -1) {
+		sprintf(Wlog_Error_String,
+			"Could not reposition file pointer - lseek(%s, 0, SEEK_END) failed:  %s\n",
+			wfile->w_file, strerror(errno));
+		return -1;
+	}
 	offset = lseek(fd, 0, SEEK_CUR);
-        if ((offset == -1)) {
-              sprintf(Wlog_Error_String,
-                      "Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed:  %s\n",
-                       wfile->w_file, strerror(errno));
-              return -1;
-        }
+	if ((offset == -1)) {
+		sprintf(Wlog_Error_String,
+			"Could not reposition file pointer - lseek(%s, 0, SEEK_CUR) failed:  %s\n",
+			wfile->w_file, strerror(errno));
+		return -1;
+	}
 
 	bufend = buf + sizeof(buf);
 	bufstart = buf;
@@ -320,12 +316,12 @@
 		/*
 		 * Move to the proper file offset, and read into buf
 		 */
-                if ((lseek(fd, offset, SEEK_SET)) ==-1) {
-                      sprintf(Wlog_Error_String,
-                              "Could not reposition file pointer - lseek(%s, %d, SEEK_SET) failed:  %s\n",
-                               wfile->w_file, offset, strerror(errno));
-                       return -1;
-                }
+		if ((lseek(fd, offset, SEEK_SET)) == -1) {
+			sprintf(Wlog_Error_String,
+				"Could not reposition file pointer - lseek(%s, %d, SEEK_SET) failed:  %s\n",
+				wfile->w_file, offset, strerror(errno));
+			return -1;
+		}
 
 		nbytes = read(fd, bufstart, bufend - bufstart - leftover);
 
@@ -333,7 +329,8 @@
 			sprintf(Wlog_Error_String,
 				"Could not read history file at offset %d - read(%d, %p, %d) failed:  %s\n",
 				offset, fd, bufstart,
-				(int)(bufend - bufstart - leftover), strerror(errno));
+				(int)(bufend - bufstart - leftover),
+				strerror(errno));
 			return -1;
 		}
 
@@ -360,7 +357,7 @@
 			 * not be word aligned.
 			 */
 
-			reclen = (*(cp-2) * 256) + *(cp -1);
+			reclen = (*(cp - 2) * 256) + *(cp - 1);
 
 			/*
 			 * If cp-bufstart isn't large enough to hold a
@@ -392,7 +389,7 @@
 			 * stop if instructed to.
 			 */
 
-			if ((rval = (*func)(&wrec, data)) == WLOG_STOP_SCAN) {
+			if ((rval = (*func) (&wrec, data)) == WLOG_STOP_SCAN) {
 				break;
 			}
 
@@ -413,27 +410,27 @@
  * these routines must be reflected in the other.
  */
 
-static int
-wlog_rec_pack(wrec, buf, flag)
-struct wlog_rec	*wrec;
-char		*buf;
-int             flag;
+static int wlog_rec_pack(wrec, buf, flag)
+struct wlog_rec *wrec;
+char *buf;
+int flag;
 {
-	char			*file, *host, *pattern;
-	struct wlog_rec_disk	*wrecd;
+	char *file, *host, *pattern;
+	struct wlog_rec_disk *wrecd;
 
 	wrecd = (struct wlog_rec_disk *)buf;
 
-	wrecd->w_pid = (uint)wrec->w_pid;
-	wrecd->w_offset = (uint)wrec->w_offset;
-	wrecd->w_nbytes = (uint)wrec->w_nbytes;
-	wrecd->w_oflags = (uint)wrec->w_oflags;
-	wrecd->w_done = (uint)wrec->w_done;
-	wrecd->w_async = (uint)wrec->w_async;
+	wrecd->w_pid = (uint) wrec->w_pid;
+	wrecd->w_offset = (uint) wrec->w_offset;
+	wrecd->w_nbytes = (uint) wrec->w_nbytes;
+	wrecd->w_oflags = (uint) wrec->w_oflags;
+	wrecd->w_done = (uint) wrec->w_done;
+	wrecd->w_async = (uint) wrec->w_async;
 
-	wrecd->w_pathlen = (wrec->w_pathlen > 0) ? (uint)wrec->w_pathlen : 0;
-	wrecd->w_hostlen = (wrec->w_hostlen > 0) ? (uint)wrec->w_hostlen : 0;
-	wrecd->w_patternlen = (wrec->w_patternlen > 0) ? (uint)wrec->w_patternlen : 0;
+	wrecd->w_pathlen = (wrec->w_pathlen > 0) ? (uint) wrec->w_pathlen : 0;
+	wrecd->w_hostlen = (wrec->w_hostlen > 0) ? (uint) wrec->w_hostlen : 0;
+	wrecd->w_patternlen =
+	    (wrec->w_patternlen > 0) ? (uint) wrec->w_patternlen : 0;
 
 	/*
 	 * If flag is true, we should also pack the variable length parts
@@ -456,19 +453,19 @@
 			memcpy(pattern, wrec->w_pattern, wrecd->w_patternlen);
 
 		return (sizeof(struct wlog_rec_disk) +
-			wrecd->w_pathlen + wrecd->w_hostlen + wrecd->w_patternlen);
+			wrecd->w_pathlen + wrecd->w_hostlen +
+			wrecd->w_patternlen);
 	} else {
 		return sizeof(struct wlog_rec_disk);
 	}
 }
 
-static int
-wlog_rec_unpack(wrec, buf)
-struct wlog_rec	*wrec;
-char		*buf;
+static int wlog_rec_unpack(wrec, buf)
+struct wlog_rec *wrec;
+char *buf;
 {
-	char			*file, *host, *pattern;
-	struct wlog_rec_disk	*wrecd;
+	char *file, *host, *pattern;
+	struct wlog_rec_disk *wrecd;
 
 	memset((char *)wrec, 0x00, sizeof(struct wlog_rec));
 	wrecd = (struct wlog_rec_disk *)buf;
@@ -495,7 +492,7 @@
 
 	if (wrec->w_patternlen > 0) {
 		pattern = buf + sizeof(struct wlog_rec_disk) +
-			wrec->w_pathlen + wrec->w_hostlen;
+		    wrec->w_pathlen + wrec->w_hostlen;
 		memcpy(wrec->w_pattern, pattern, wrec->w_patternlen);
 	}
 
diff --git a/pan/debug.c b/pan/debug.c
index 75f7d47..9027f9b 100644
--- a/pan/debug.c
+++ b/pan/debug.c
@@ -35,7 +35,6 @@
 #include <string.h>
 #include "reporter.h"
 
-
 #ifdef DEBUGGING
 int Debug[MAXDEBUG];		/* Debug level in their areas */
 #endif
@@ -45,42 +44,41 @@
  *
  * Syntax:   area[,area]:level[,area[,area]:level]...
  */
-int
-set_debug(char *optarg)
+int set_debug(char *optarg)
 {
 #ifdef DEBUGGING
-    /* pointers to the debug area and level in the option's arguments */
-    char *d_area, *d_level;
-    /* debug area and level after converted to integers */
-    int db_area, db_level;
+	/* pointers to the debug area and level in the option's arguments */
+	char *d_area, *d_level;
+	/* debug area and level after converted to integers */
+	int db_area, db_level;
 
-    d_area = optarg;
+	d_area = optarg;
 
-    while (*d_area) {
-	d_level= strchr(d_area,':');
-	*d_level++ = '\0';
-	db_level= atoi(d_level);
-	db_area=atoi(d_area);
+	while (*d_area) {
+		d_level = strchr(d_area, ':');
+		*d_level++ = '\0';
+		db_level = atoi(d_level);
+		db_area = atoi(d_area);
 
-	if (db_area > MAXDEBUG) {
-	    printf("Error - Debug area %s > maximum of %d\n", d_area,
-		   MAXDEBUG);
-	    exit(-1);
+		if (db_area > MAXDEBUG) {
+			printf("Error - Debug area %s > maximum of %d\n",
+			       d_area, MAXDEBUG);
+			exit(-1);
+		}
+
+		while (d_area != NULL) {
+			db_area = atoi(d_area);
+			printf("Debug area %d set to %d\n", db_area, db_level);
+			Debug[db_area] = db_level;
+			if ((d_area = strchr(d_area, ',')) != NULL)
+				d_area++;
+		}
+		if ((d_area = strchr(d_level, ',')) == NULL)
+			break;
 	}
-
-	while (d_area != NULL) {
-	    db_area = atoi(d_area);
-	    printf("Debug area %d set to %d\n", db_area, db_level);
-	    Debug[db_area] = db_level;
-	    if ((d_area = strchr(d_area, ',')) != NULL)
-		d_area++;
-	}
-	if ((d_area = strchr(d_level, ',')) == NULL)
-	    break;
-    }
 #else
-    printf("Debugging is not enabled.  -D has been ignored\n");
+	printf("Debugging is not enabled.  -D has been ignored\n");
 #endif
 
-    return 0;
+	return 0;
 }
diff --git a/pan/ltp-bump.c b/pan/ltp-bump.c
index 26fd92f..5966c2e 100644
--- a/pan/ltp-bump.c
+++ b/pan/ltp-bump.c
@@ -40,7 +40,7 @@
 
 #include "zoolib.h"
 
-pid_t read_active(FILE *fp, char *name);
+pid_t read_active(FILE * fp, char *name);
 
 int main(int argc, char **argv)
 {
@@ -51,27 +51,28 @@
 	int sig = SIGINT;
 
 	while ((c = getopt(argc, argv, "a:s:12")) != -1) {
-		switch(c) {
-			case 'a':
-				active = (char*)malloc(strlen(optarg)+1);
-				strcpy( active, optarg );
-				break;
-			case 's':
-				sig = atoi( optarg );
-				break;
-			case '1':
-				sig = SIGUSR1;
-				break;
-			case '2':
-				sig = SIGUSR2;
-				break;
+		switch (c) {
+		case 'a':
+			active = (char *)malloc(strlen(optarg) + 1);
+			strcpy(active, optarg);
+			break;
+		case 's':
+			sig = atoi(optarg);
+			break;
+		case '1':
+			sig = SIGUSR1;
+			break;
+		case '2':
+			sig = SIGUSR2;
+			break;
 		}
 	}
 
 	if (active == NULL) {
 		active = zoo_getname();
 		if (active == NULL) {
-			fprintf(stderr, "ltp-bump: Must supply -a or set ZOO env variable\n");
+			fprintf(stderr,
+				"ltp-bump: Must supply -a or set ZOO env variable\n");
 			exit(1);
 		}
 	}
@@ -88,18 +89,21 @@
 	}
 
 	while (optind < argc) {
-		/*printf("argv[%d] = (%s)\n", optind, argv[optind] );*/
+		/*printf("argv[%d] = (%s)\n", optind, argv[optind] ); */
 		nanny = zoo_getpid(zoo, argv[optind]);
 		if (nanny == -1) {
 			fprintf(stderr, "ltp-bump: Did not find tag '%s'\n",
 				argv[optind]);
 		} else {
-			if (kill( nanny, sig ) == -1) {
+			if (kill(nanny, sig) == -1) {
 				if (errno == ESRCH) {
-					fprintf(stderr,"ltp-bump: Tag %s (pid %d) seems to be dead already.\n",
+					fprintf(stderr,
+						"ltp-bump: Tag %s (pid %d) seems to be dead already.\n",
 						argv[optind], nanny);
 					if (zoo_clear(zoo, nanny))
-						fprintf(stderr,"ltp-bump: %s\n", zoo_error);
+						fprintf(stderr,
+							"ltp-bump: %s\n",
+							zoo_error);
 				}
 			}
 		}
diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index 73c4641..6a1a797 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -69,33 +69,29 @@
 #include "zoolib.h"
 
 /* One entry in the command line collection.  */
-struct coll_entry
-{
-    char *name;		/* tag name */
-    char *cmdline;	/* command line */
-    char *pcnt_f;	/* location of %f in the command line args, flag */
-    struct coll_entry *next;
+struct coll_entry {
+	char *name;		/* tag name */
+	char *cmdline;		/* command line */
+	char *pcnt_f;		/* location of %f in the command line args, flag */
+	struct coll_entry *next;
 };
 
-struct collection
-{
-    int cnt;
-    struct coll_entry **ary;
+struct collection {
+	int cnt;
+	struct coll_entry **ary;
 };
 
-struct tag_pgrp
-{
-    int pgrp;
-    int stopping;
-    time_t mystime;
-    struct coll_entry *cmd;
-    char output[PATH_MAX];
+struct tag_pgrp {
+	int pgrp;
+	int stopping;
+	time_t mystime;
+	struct coll_entry *cmd;
+	char output[PATH_MAX];
 };
 
-struct orphan_pgrp
-{
-    int pgrp;
-    struct orphan_pgrp *next;
+struct orphan_pgrp {
+	int pgrp;
+	struct orphan_pgrp *next;
 };
 
 static pid_t run_child(struct coll_entry *colle, struct tag_pgrp *active,
@@ -132,8 +128,8 @@
 static char *reporttype = NULL;
 
 /* zoolib */
-int rec_signal; 	/* received signal */
-int send_signal;	/* signal to send */
+int rec_signal;			/* received signal */
+int send_signal;		/* signal to send */
 
 /* Debug Bits */
 int Debug = 0;
@@ -146,741 +142,794 @@
 #define	Dstart		0x000002	/* started command */
 #define Dwait		0x000001	/* wait interrupted */
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-    extern char *optarg;
-    extern int optind;
-    char *zooname = NULL;	/* name of the zoo file to use */
-    char *filename = "/dev/null";	/* filename to read test tags from */
-    char *logfilename = NULL;
-    char *failcmdfilename = NULL;
-    char *outputfilename = NULL;
-    struct collection *coll = NULL;
-    struct tag_pgrp *running;
-    struct orphan_pgrp *orphans, *orph;
+	extern char *optarg;
+	extern int optind;
+	char *zooname = NULL;	/* name of the zoo file to use */
+	char *filename = "/dev/null";	/* filename to read test tags from */
+	char *logfilename = NULL;
+	char *failcmdfilename = NULL;
+	char *outputfilename = NULL;
+	struct collection *coll = NULL;
+	struct tag_pgrp *running;
+	struct orphan_pgrp *orphans, *orph;
 	struct utsname unamebuf;
-    FILE *logfile = NULL;
-    FILE *failcmdfile = NULL;
-    int keep_active = 1;
-    int num_active = 0;
-	int failcnt = 0;           /* count of total testcases that failed. */
-    int err, i;
-    int starts = -1;
-    int timed = 0;
-    int run_time = -1; char modifier = 'm'; int ret = 0;
-    int stop;
-    int go_idle;
-    int has_brakes = 0;		/* stop everything if a test case fails */
-    int sequential = 0;		/* run tests sequentially */
-    int fork_in_road = 0;
-    int exit_stat;
-    int track_exit_stats = 0;	/* exit non-zero if any test exits non-zero */
-	int fmt_print = 0;          /* enables formatted printing of logfiles. */
-	int quiet_mode = 0;			/* supresses test start and test end tags. */
-    int c;
-    pid_t cpid;
-    struct sigaction sa;
+	FILE *logfile = NULL;
+	FILE *failcmdfile = NULL;
+	int keep_active = 1;
+	int num_active = 0;
+	int failcnt = 0;	/* count of total testcases that failed. */
+	int err, i;
+	int starts = -1;
+	int timed = 0;
+	int run_time = -1;
+	char modifier = 'm';
+	int ret = 0;
+	int stop;
+	int go_idle;
+	int has_brakes = 0;	/* stop everything if a test case fails */
+	int sequential = 0;	/* run tests sequentially */
+	int fork_in_road = 0;
+	int exit_stat;
+	int track_exit_stats = 0;	/* exit non-zero if any test exits non-zero */
+	int fmt_print = 0;	/* enables formatted printing of logfiles. */
+	int quiet_mode = 0;	/* supresses test start and test end tags. */
+	int c;
+	pid_t cpid;
+	struct sigaction sa;
 
-    while ((c = getopt(argc, argv, "AO:Sa:C:d:ef:hl:n:o:pqr:s:t:x:y")) != -1) {
-	switch (c) {
-	case 'A':	/* all-stop flag */
-	    has_brakes = 1;
-	    track_exit_stats = 1;
-	    break;
-	case 'O':	/* output buffering directory */
-	    test_out_dir = strdup(optarg);
-	    break;
-	case 'S':	/* run tests sequentially */
-	    sequential = 1;
-	    break;
-	case 'a':	/* name of the zoo file to use */
-	    zooname = strdup(optarg);
-	    break;
-	case 'C':	/* name of the file where all failed commands will be */
-	    failcmdfilename = strdup(optarg);
-	    break;
-	case 'd':	/* debug options */
-	    sscanf(optarg, "%i", &Debug);
-	    break;
-	case 'e':	/* exit non-zero if any test exists non-zero */
-	    track_exit_stats = 1;
-	    break;
-	case 'f':	/* filename to read test tags from */
-	    filename = strdup(optarg);
-	    break;
-	case 'h':	/* help */
-	    fprintf(stdout, "Usage: pan -n name [ -SyAehpq ] [ -s starts ]"
-				 " [-t time[s|m|h|d] [ -x nactive ] [ -l logfile ]\n\t"
-				 "[ -a active-file ] [ -f command-file ] "
-				 "[ -C fail-command-file ] "
-				 "[ -d debug-level ]\n\t[-o output-file] "
-				 "[-O output-buffer-directory] [cmd]\n");
-	    exit(0);
-	case 'l':	/* log file */
-	    logfilename = strdup(optarg);
-	    break;
-	case 'n':	/* tag given to pan */
-	    panname = strdup(optarg);
-	    break;
-	case 'o':	/* send test output here */
-	    outputfilename = strdup(optarg);
-	    break;
-	case 'p':	/* formatted printing. */
-		fmt_print = 1;
-		break;
-	case 'q':	/* supress test start and test end messages */
-		quiet_mode = 1;
-		break;
-	case 'r':	/* reporting type: none, rts */
-	    reporttype = strdup(optarg);
-	    break;
-	case 's':	/* number of tags to run */
-	    starts = atoi(optarg);
-	    break;
-	case 't':	/* run_time to run */
-	    ret = sscanf(optarg, "%d%c", &run_time, &modifier);
-            if (ret == 0) { fprintf(stderr, "Need proper time input: ####x where"
-                                    "x is one of s,m,h,d\n"); break; }
-            else if (ret == 1) { fprintf(stderr, "Only got a time value of %d "
-                                 "modifiers need to come immediately after #"
-                                 " assuming %c\n", run_time, modifier); }
-            else
-            {
-               switch (modifier)
-               {
-                  case 's': run_time = run_time; break;
-                  case 'm': run_time = run_time * 60; break;
-                  case 'h': run_time = run_time * 60 * 60; break;
-                  case 'd': run_time = run_time * 60 * 60 * 24; break;
-                  default:
-                     fprintf(stderr, "Invalid time modifier, try: s|h|m|d\n"); exit(-1);
-               }
-	       if (!quiet_mode)
-                  printf("PAN will run for %d seconds\n", run_time);
-            }
-            timed = 1; //-t implies run as many starts as possible, by default
-	    break;
-	case 'x':	/* number of tags to keep running */
-	    keep_active = atoi(optarg);
-	    break;
-	case 'y':	/* restart on failure or signal */
-	    fork_in_road = 1;
-	    break;
+	while ((c =
+		getopt(argc, argv, "AO:Sa:C:d:ef:hl:n:o:pqr:s:t:x:y")) != -1) {
+		switch (c) {
+		case 'A':	/* all-stop flag */
+			has_brakes = 1;
+			track_exit_stats = 1;
+			break;
+		case 'O':	/* output buffering directory */
+			test_out_dir = strdup(optarg);
+			break;
+		case 'S':	/* run tests sequentially */
+			sequential = 1;
+			break;
+		case 'a':	/* name of the zoo file to use */
+			zooname = strdup(optarg);
+			break;
+		case 'C':	/* name of the file where all failed commands will be */
+			failcmdfilename = strdup(optarg);
+			break;
+		case 'd':	/* debug options */
+			sscanf(optarg, "%i", &Debug);
+			break;
+		case 'e':	/* exit non-zero if any test exists non-zero */
+			track_exit_stats = 1;
+			break;
+		case 'f':	/* filename to read test tags from */
+			filename = strdup(optarg);
+			break;
+		case 'h':	/* help */
+			fprintf(stdout,
+				"Usage: pan -n name [ -SyAehpq ] [ -s starts ]"
+				" [-t time[s|m|h|d] [ -x nactive ] [ -l logfile ]\n\t"
+				"[ -a active-file ] [ -f command-file ] "
+				"[ -C fail-command-file ] "
+				"[ -d debug-level ]\n\t[-o output-file] "
+				"[-O output-buffer-directory] [cmd]\n");
+			exit(0);
+		case 'l':	/* log file */
+			logfilename = strdup(optarg);
+			break;
+		case 'n':	/* tag given to pan */
+			panname = strdup(optarg);
+			break;
+		case 'o':	/* send test output here */
+			outputfilename = strdup(optarg);
+			break;
+		case 'p':	/* formatted printing. */
+			fmt_print = 1;
+			break;
+		case 'q':	/* supress test start and test end messages */
+			quiet_mode = 1;
+			break;
+		case 'r':	/* reporting type: none, rts */
+			reporttype = strdup(optarg);
+			break;
+		case 's':	/* number of tags to run */
+			starts = atoi(optarg);
+			break;
+		case 't':	/* run_time to run */
+			ret = sscanf(optarg, "%d%c", &run_time, &modifier);
+			if (ret == 0) {
+				fprintf(stderr,
+					"Need proper time input: ####x where"
+					"x is one of s,m,h,d\n");
+				break;
+			} else if (ret == 1) {
+				fprintf(stderr, "Only got a time value of %d "
+					"modifiers need to come immediately after #"
+					" assuming %c\n", run_time, modifier);
+			} else {
+				switch (modifier) {
+				case 's':
+					run_time = run_time;
+					break;
+				case 'm':
+					run_time = run_time * 60;
+					break;
+				case 'h':
+					run_time = run_time * 60 * 60;
+					break;
+				case 'd':
+					run_time = run_time * 60 * 60 * 24;
+					break;
+				default:
+					fprintf(stderr,
+						"Invalid time modifier, try: s|h|m|d\n");
+					exit(-1);
+				}
+				if (!quiet_mode)
+					printf("PAN will run for %d seconds\n",
+					       run_time);
+			}
+			timed = 1;	//-t implies run as many starts as possible, by default
+			break;
+		case 'x':	/* number of tags to keep running */
+			keep_active = atoi(optarg);
+			break;
+		case 'y':	/* restart on failure or signal */
+			fork_in_road = 1;
+			break;
+		}
 	}
-    }
 
-    if (panname == NULL) {
-	fprintf(stderr, "pan: Must supply -n\n");
-	exit(1);
-    }
-    if (zooname == NULL) {
-	zooname = zoo_getname();
+	if (panname == NULL) {
+		fprintf(stderr, "pan: Must supply -n\n");
+		exit(1);
+	}
 	if (zooname == NULL) {
-	    fprintf(stderr,
-		    "pan(%s): Must supply -a or set ZOO env variable\n",
-		    panname);
-	    exit(1);
+		zooname = zoo_getname();
+		if (zooname == NULL) {
+			fprintf(stderr,
+				"pan(%s): Must supply -a or set ZOO env variable\n",
+				panname);
+			exit(1);
+		}
 	}
-    }
-    if (reporttype) {
-	/* make sure we understand the report type */
-	if (strcasecmp(reporttype, "rts")
-			&& strcasecmp(reporttype, "none")
-			/* && strcasecmp(reporttype, "xml")*/)
-	    reporttype = "rts";
-    } else {
-	/* set the default */
-	reporttype = "rts";
-    }
-
-    if (logfilename != NULL) {
-	time_t startup;
-	char *s;
-
-	if (!strcmp(logfilename, "-")) {
-	    logfile = stdout;
+	if (reporttype) {
+		/* make sure we understand the report type */
+		if (strcasecmp(reporttype, "rts")
+		    && strcasecmp(reporttype, "none")
+		    /* && strcasecmp(reporttype, "xml") */
+		    )
+			reporttype = "rts";
 	} else {
-	    if ((logfile = fopen(logfilename, "a+")) == NULL) {
-		fprintf(stderr,
-			"pan(%s): Error %s (%d) opening log file '%s'\n",
-			panname, strerror(errno), errno, logfilename);
-		exit(1);
-	    }
+		/* set the default */
+		reporttype = "rts";
 	}
 
-	time(&startup);
-	s = ctime(&startup);
-	*(s + strlen(s) - 1) = '\0';
-	if (!fmt_print)
-		fprintf(logfile, "startup='%s'\n", s);
-	else
-	{
-		fprintf(logfile, "Test Start Time: %s\n", s);
-		fprintf(logfile, "-----------------------------------------\n");
-		fprintf(logfile, "%-30.20s %-10.10s %-10.10s\n",
+	if (logfilename != NULL) {
+		time_t startup;
+		char *s;
+
+		if (!strcmp(logfilename, "-")) {
+			logfile = stdout;
+		} else {
+			if ((logfile = fopen(logfilename, "a+")) == NULL) {
+				fprintf(stderr,
+					"pan(%s): Error %s (%d) opening log file '%s'\n",
+					panname, strerror(errno), errno,
+					logfilename);
+				exit(1);
+			}
+		}
+
+		time(&startup);
+		s = ctime(&startup);
+		*(s + strlen(s) - 1) = '\0';
+		if (!fmt_print)
+			fprintf(logfile, "startup='%s'\n", s);
+		else {
+			fprintf(logfile, "Test Start Time: %s\n", s);
+			fprintf(logfile,
+				"-----------------------------------------\n");
+			fprintf(logfile, "%-30.20s %-10.10s %-10.10s\n",
 				"Testcase", "Result", "Exit Value");
-		fprintf(logfile, "%-30.20s %-10.10s %-10.10s\n",
-			   	"--------", "------", "------------");
+			fprintf(logfile, "%-30.20s %-10.10s %-10.10s\n",
+				"--------", "------", "------------");
+		}
+		fflush(logfile);
 	}
-	fflush(logfile);
-    }
 
-    coll = get_collection(filename, optind, argc, argv);
-    if (!coll)
-        exit(1);
-    if (coll->cnt == 0) {
-	fprintf(stderr,
-		"pan(%s): Must supply a file collection or a command\n",
-		panname);
-	exit(1);
-    }
-
-    if (Debug & Dsetup)
-	dump_coll(coll);
-
-    /* a place to store the pgrps we're watching */
-    running = (struct tag_pgrp *)malloc((keep_active + 1) * sizeof(struct tag_pgrp));
-    if (running == NULL) {
-        fprintf(stderr, "pan(%s): Failed to allocate memory: %s\n", panname,
-                strerror(errno));
-	exit(2);
-    }
-    memset(running, 0, keep_active * sizeof(struct tag_pgrp));
-    running[keep_active].pgrp = -1;	/* end sentinel */
-
-    /* a head to the orphaned pgrp list */
-    orphans = (struct orphan_pgrp *) malloc(sizeof(struct orphan_pgrp));
-    memset(orphans, 0, sizeof(struct orphan_pgrp));
-
-    srand48(time(NULL) ^ (getpid() + (getpid() << 15)));
-
-    /* Supply a default for starts.  If we are in sequential mode, use
-     * the number of commands available; otherwise 1.
-     */
-    if (timed == 1 && starts == -1) {	/* timed, infinite by default */
-	starts = -1;
-    } else if (starts == -1) {
-	if (sequential) {
-	    starts = coll->cnt;
-	} else {
-	    starts = 1;
+	coll = get_collection(filename, optind, argc, argv);
+	if (!coll)
+		exit(1);
+	if (coll->cnt == 0) {
+		fprintf(stderr,
+			"pan(%s): Must supply a file collection or a command\n",
+			panname);
+		exit(1);
 	}
-    } else if (starts == 0) {	/* if the user specified infinite, set it */
-	starts = -1;
-    } else {			/* else, make sure we are starting at least keep_active processes */
-	if (starts < keep_active)
-	    starts = keep_active;
-    }
 
-    /* if we're buffering output, but we're only running on process at a time,
-     * then essentially "turn off buffering"
-     */
-    if (test_out_dir && (keep_active == 1)) {
-	free(test_out_dir);
-	test_out_dir = NULL;
-    }
+	if (Debug & Dsetup)
+		dump_coll(coll);
 
-    if (test_out_dir) {
-	struct stat sbuf;
-
-	if (stat(test_out_dir, &sbuf) < 0) {
-	    fprintf(stderr,
-		    "pan(%s): stat of -O arg '%s' failed.  errno: %d  %s\n",
-		    panname, test_out_dir, errno, strerror(errno));
-	    exit(1);
+	/* a place to store the pgrps we're watching */
+	running =
+	    (struct tag_pgrp *)malloc((keep_active + 1) *
+				      sizeof(struct tag_pgrp));
+	if (running == NULL) {
+		fprintf(stderr, "pan(%s): Failed to allocate memory: %s\n",
+			panname, strerror(errno));
+		exit(2);
 	}
-	if (!S_ISDIR(sbuf.st_mode)) {
-	    fprintf(stderr, "pan(%s): -O arg '%s' must be a directory.\n",
-		    panname, test_out_dir);
-	    exit(1);
+	memset(running, 0, keep_active * sizeof(struct tag_pgrp));
+	running[keep_active].pgrp = -1;	/* end sentinel */
+
+	/* a head to the orphaned pgrp list */
+	orphans = (struct orphan_pgrp *)malloc(sizeof(struct orphan_pgrp));
+	memset(orphans, 0, sizeof(struct orphan_pgrp));
+
+	srand48(time(NULL) ^ (getpid() + (getpid() << 15)));
+
+	/* Supply a default for starts.  If we are in sequential mode, use
+	 * the number of commands available; otherwise 1.
+	 */
+	if (timed == 1 && starts == -1) {	/* timed, infinite by default */
+		starts = -1;
+	} else if (starts == -1) {
+		if (sequential) {
+			starts = coll->cnt;
+		} else {
+			starts = 1;
+		}
+	} else if (starts == 0) {	/* if the user specified infinite, set it */
+		starts = -1;
+	} else {		/* else, make sure we are starting at least keep_active processes */
+		if (starts < keep_active)
+			starts = keep_active;
 	}
-	if (access(test_out_dir, W_OK | R_OK | X_OK) < 0) {
-	    fprintf(stderr,
-		    "pan(%s): permission denied on -O arg '%s'.  errno: %d  %s\n",
-		    panname, test_out_dir, errno, strerror(errno));
-	    exit(1);
+
+	/* if we're buffering output, but we're only running on process at a time,
+	 * then essentially "turn off buffering"
+	 */
+	if (test_out_dir && (keep_active == 1)) {
+		free(test_out_dir);
+		test_out_dir = NULL;
 	}
-    }
 
-    if (outputfilename) {
-	if (!freopen(outputfilename, "a+", stdout)) {
-	    fprintf(stderr,
-		    "pan(%s): Error %s (%d) opening output file '%s'\n",
-		    panname, strerror(errno), errno, outputfilename);
-	    exit(1);
+	if (test_out_dir) {
+		struct stat sbuf;
+
+		if (stat(test_out_dir, &sbuf) < 0) {
+			fprintf(stderr,
+				"pan(%s): stat of -O arg '%s' failed.  errno: %d  %s\n",
+				panname, test_out_dir, errno, strerror(errno));
+			exit(1);
+		}
+		if (!S_ISDIR(sbuf.st_mode)) {
+			fprintf(stderr,
+				"pan(%s): -O arg '%s' must be a directory.\n",
+				panname, test_out_dir);
+			exit(1);
+		}
+		if (access(test_out_dir, W_OK | R_OK | X_OK) < 0) {
+			fprintf(stderr,
+				"pan(%s): permission denied on -O arg '%s'.  errno: %d  %s\n",
+				panname, test_out_dir, errno, strerror(errno));
+			exit(1);
+		}
 	}
-    }
 
-    if (failcmdfilename) {
-    	if (!(failcmdfile = fopen(failcmdfilename, "a+"))) {
-	    fprintf(stderr,
-		    "pan(%s): Error %s (%d) opening fail cmd file '%s'\n",
-		    panname, strerror(errno), errno, failcmdfilename);
-	    exit(1);
-    	}
-    }
+	if (outputfilename) {
+		if (!freopen(outputfilename, "a+", stdout)) {
+			fprintf(stderr,
+				"pan(%s): Error %s (%d) opening output file '%s'\n",
+				panname, strerror(errno), errno,
+				outputfilename);
+			exit(1);
+		}
+	}
 
-    if ((zoofile = zoo_open(zooname)) == NULL) {
-	fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-	exit(1);
-    }
-    if (zoo_mark_args(zoofile, getpid(), panname, argc, argv)) {
-	fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-	exit(1);
-    }
+	if (failcmdfilename) {
+		if (!(failcmdfile = fopen(failcmdfilename, "a+"))) {
+			fprintf(stderr,
+				"pan(%s): Error %s (%d) opening fail cmd file '%s'\n",
+				panname, strerror(errno), errno,
+				failcmdfilename);
+			exit(1);
+		}
+	}
 
-    /* Allocate N spaces for max-arg commands.
-     * this is an "active file cleanliness" thing
-     */
-    {
-	char *av[2], bigarg[82];
-
-	memset(bigarg, '.', 81);
-	bigarg[81] = '\0';
-	av[0] = bigarg;
-	av[1] = NULL;
-
-	for (c = 0; c < keep_active; c++) {
-	    if (zoo_mark_cmdline(zoofile, c, panname, "")) {
+	if ((zoofile = zoo_open(zooname)) == NULL) {
 		fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
 		exit(1);
-	    }
 	}
-	for (c = 0; c < keep_active; c++) {
-	    if (zoo_clear(zoofile, c)) {
+	if (zoo_mark_args(zoofile, getpid(), panname, argc, argv)) {
 		fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
 		exit(1);
-	    }
 	}
-    }
 
-    rec_signal = send_signal = 0;
-    if (run_time != -1) { alarm(run_time); }
-
-    sigemptyset(&sa.sa_mask);
-    sa.sa_flags = 0;
-    sa.sa_handler = wait_handler;
-
-    sigaction(SIGALRM, &sa, NULL);
-    sigaction(SIGINT, &sa, NULL);
-    sigaction(SIGTERM, &sa, NULL);
-    sigaction(SIGHUP, &sa, NULL);
-    sigaction(SIGUSR1, &sa, NULL);	/* ignore fork_in_road */
-    sigaction(SIGUSR2, &sa, NULL);	/* stop the scheduler */
-
-    c = 0;			/* in this loop, c is the command index */
-    stop = 0;
-    exit_stat = 0;
-    go_idle = 0;
-    while (1) {
-
-	while ((num_active < keep_active) && (starts != 0)) {
-	    if (stop || rec_signal || go_idle)
-		break;
-
-	    if (!sequential)
-		c = lrand48() % coll->cnt;
-
-	    /* find a slot for the child */
-	    for (i = 0; i < keep_active; ++i) {
-		if (running[i].pgrp == 0)
-		    break;
-	    }
-	    if (i == keep_active) {
-		fprintf(stderr, "pan(%s): Aborting: i == keep_active = %d\n",
-			panname, i);
-		wait_handler(SIGINT);
-		exit_stat++;
-		break;
-	    }
-
-	    cpid = run_child(coll->ary[c], running + i, quiet_mode, &failcnt,
-			     fmt_print, logfile);
-	    if (cpid != -1)
-		++num_active;
-	    if ((cpid != -1 || sequential) && starts > 0)
-		--starts;
-
-	    if (sequential)
-		if (++c >= coll->cnt)
-		    c = 0;
-
-	} /* while ((num_active < keep_active) && (starts != 0)) */
-
-	if (starts == 0)
+	/* Allocate N spaces for max-arg commands.
+	 * this is an "active file cleanliness" thing
+	 */
 	{
-		if (!quiet_mode)
-			printf("incrementing stop\n");
-		++stop;
-	}
-	else if (starts == -1) //wjh
-	{
-	   FILE *f = (FILE*)-1;
-	   if ((f = fopen(PAN_STOP_FILE, "r")) != 0)
-	   {  printf("Got %s Stopping!\n", PAN_STOP_FILE);
-		  fclose(f); unlink(PAN_STOP_FILE); stop++;
-	   }
+		char *av[2], bigarg[82];
+
+		memset(bigarg, '.', 81);
+		bigarg[81] = '\0';
+		av[0] = bigarg;
+		av[1] = NULL;
+
+		for (c = 0; c < keep_active; c++) {
+			if (zoo_mark_cmdline(zoofile, c, panname, "")) {
+				fprintf(stderr, "pan(%s): %s\n", panname,
+					zoo_error);
+				exit(1);
+			}
+		}
+		for (c = 0; c < keep_active; c++) {
+			if (zoo_clear(zoofile, c)) {
+				fprintf(stderr, "pan(%s): %s\n", panname,
+					zoo_error);
+				exit(1);
+			}
+		}
 	}
 
-	if (rec_signal) {
-	    /* propagate everything except sigusr2 */
-
-	    if (rec_signal == SIGUSR2) {
-		if (fork_in_road)
-		    ++go_idle;
-		else
-		    ++stop;
-		rec_signal = send_signal = 0;
-	    } else {
-		if (rec_signal == SIGUSR1)
-		    fork_in_road = 0;
-		propagate_signal(running, keep_active, orphans);
-		if (fork_in_road)
-		    ++go_idle;
-		else
-		    ++stop;
-	    }
+	rec_signal = send_signal = 0;
+	if (run_time != -1) {
+		alarm(run_time);
 	}
 
-	err = check_pids(running, &num_active, keep_active, logfile,
-			 failcmdfile, orphans, fmt_print, &failcnt, quiet_mode);
-	if (Debug & Drunning) {
-	    pids_running(running, keep_active);
-	    orphans_running(orphans);
-	}
-	if (err) {
-	    if (fork_in_road)
-		++go_idle;
-	    if (track_exit_stats)
-		exit_stat++;
-	    if (has_brakes) {
-		fprintf(stderr, "pan(%s): All stop!%s\n", panname,
-			go_idle ? " (idling)" : "");
-		wait_handler(SIGINT);
-	    }
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sa.sa_handler = wait_handler;
+
+	sigaction(SIGALRM, &sa, NULL);
+	sigaction(SIGINT, &sa, NULL);
+	sigaction(SIGTERM, &sa, NULL);
+	sigaction(SIGHUP, &sa, NULL);
+	sigaction(SIGUSR1, &sa, NULL);	/* ignore fork_in_road */
+	sigaction(SIGUSR2, &sa, NULL);	/* stop the scheduler */
+
+	c = 0;			/* in this loop, c is the command index */
+	stop = 0;
+	exit_stat = 0;
+	go_idle = 0;
+	while (1) {
+
+		while ((num_active < keep_active) && (starts != 0)) {
+			if (stop || rec_signal || go_idle)
+				break;
+
+			if (!sequential)
+				c = lrand48() % coll->cnt;
+
+			/* find a slot for the child */
+			for (i = 0; i < keep_active; ++i) {
+				if (running[i].pgrp == 0)
+					break;
+			}
+			if (i == keep_active) {
+				fprintf(stderr,
+					"pan(%s): Aborting: i == keep_active = %d\n",
+					panname, i);
+				wait_handler(SIGINT);
+				exit_stat++;
+				break;
+			}
+
+			cpid =
+			    run_child(coll->ary[c], running + i, quiet_mode,
+				      &failcnt, fmt_print, logfile);
+			if (cpid != -1)
+				++num_active;
+			if ((cpid != -1 || sequential) && starts > 0)
+				--starts;
+
+			if (sequential)
+				if (++c >= coll->cnt)
+					c = 0;
+
+		}		/* while ((num_active < keep_active) && (starts != 0)) */
+
+		if (starts == 0) {
+			if (!quiet_mode)
+				printf("incrementing stop\n");
+			++stop;
+		} else if (starts == -1)	//wjh
+		{
+			FILE *f = (FILE *) - 1;
+			if ((f = fopen(PAN_STOP_FILE, "r")) != 0) {
+				printf("Got %s Stopping!\n", PAN_STOP_FILE);
+				fclose(f);
+				unlink(PAN_STOP_FILE);
+				stop++;
+			}
+		}
+
+		if (rec_signal) {
+			/* propagate everything except sigusr2 */
+
+			if (rec_signal == SIGUSR2) {
+				if (fork_in_road)
+					++go_idle;
+				else
+					++stop;
+				rec_signal = send_signal = 0;
+			} else {
+				if (rec_signal == SIGUSR1)
+					fork_in_road = 0;
+				propagate_signal(running, keep_active, orphans);
+				if (fork_in_road)
+					++go_idle;
+				else
+					++stop;
+			}
+		}
+
+		err = check_pids(running, &num_active, keep_active, logfile,
+				 failcmdfile, orphans, fmt_print, &failcnt,
+				 quiet_mode);
+		if (Debug & Drunning) {
+			pids_running(running, keep_active);
+			orphans_running(orphans);
+		}
+		if (err) {
+			if (fork_in_road)
+				++go_idle;
+			if (track_exit_stats)
+				exit_stat++;
+			if (has_brakes) {
+				fprintf(stderr, "pan(%s): All stop!%s\n",
+					panname, go_idle ? " (idling)" : "");
+				wait_handler(SIGINT);
+			}
+		}
+
+		if (stop && (num_active == 0))
+			break;
+
+		if (go_idle && (num_active == 0)) {
+			go_idle = 0;	/* It is idle, now resume scheduling. */
+			wait_handler(0);	/* Reset the signal ratchet. */
+		}
 	}
 
-	if (stop && (num_active == 0))
-	    break;
-
-	if (go_idle && (num_active == 0)) {
-	    go_idle = 0;	/* It is idle, now resume scheduling. */
-	    wait_handler(0);	/* Reset the signal ratchet. */
+	/* Wait for orphaned pgrps */
+	while (1) {
+		for (orph = orphans; orph != NULL; orph = orph->next) {
+			if (orph->pgrp == 0)
+				continue;
+			/* Yes, we have orphaned pgrps */
+			sleep(5);
+			if (!rec_signal) {
+				/* force an artificial signal, move us
+				 * through the signal ratchet.
+				 */
+				wait_handler(SIGINT);
+			}
+			propagate_signal(running, keep_active, orphans);
+			if (Debug & Drunning)
+				orphans_running(orphans);
+			break;
+		}
+		if (orph == NULL)
+			break;
 	}
-    }
 
-    /* Wait for orphaned pgrps */
-    while (1) {
-	for (orph = orphans; orph != NULL; orph = orph->next) {
-	    if (orph->pgrp == 0)
-		continue;
-	    /* Yes, we have orphaned pgrps */
-	    sleep(5);
-	    if (!rec_signal) {
-		/* force an artificial signal, move us
-		 * through the signal ratchet.
-		 */
-		wait_handler(SIGINT);
-	    }
-	    propagate_signal(running, keep_active, orphans);
-	    if (Debug & Drunning)
-		orphans_running(orphans);
-	    break;
+	if (zoo_clear(zoofile, getpid())) {
+		fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
+		++exit_stat;
 	}
-	if (orph == NULL)
-	    break;
-    }
-
-    if (zoo_clear(zoofile, getpid())) {
-	fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-	++exit_stat;
-    }
-    fclose(zoofile);
-	if (logfile && fmt_print)
-	{
+	fclose(zoofile);
+	if (logfile && fmt_print) {
 		if (uname(&unamebuf) == -1)
-			fprintf(stderr, "ERROR: uname(): %s\n", strerror(errno));
-		fprintf(logfile, "\n-----------------------------------------------\n");
+			fprintf(stderr, "ERROR: uname(): %s\n",
+				strerror(errno));
+		fprintf(logfile,
+			"\n-----------------------------------------------\n");
 		fprintf(logfile, "Total Tests: %d\n", coll->cnt);
 		fprintf(logfile, "Total Failures: %d\n", failcnt);
 		fprintf(logfile, "Kernel Version: %s\n", unamebuf.release);
-		fprintf(logfile, "Machine Architecture: %s\n", unamebuf.machine);
+		fprintf(logfile, "Machine Architecture: %s\n",
+			unamebuf.machine);
 		fprintf(logfile, "Hostname: %s\n\n", unamebuf.nodename);
 	}
-    if (logfile && (logfile != stdout))
-	fclose(logfile);
+	if (logfile && (logfile != stdout))
+		fclose(logfile);
 
-    exit(exit_stat);
+	exit(exit_stat);
 }
 
-
-
 static void
 propagate_signal(struct tag_pgrp *running, int keep_active,
 		 struct orphan_pgrp *orphans)
 {
-    int i;
-
-    if (Debug & Dshutdown)
-	fprintf(stderr, "pan was signaled with sig %d...\n", rec_signal);
-
-    if (rec_signal == SIGALRM)
-    {
-       printf("PAN stop Alarm was received\n");
-       rec_signal = SIGTERM;
-    }
-
-    for (i = 0; i < keep_active; ++i) {
-	if (running[i].pgrp == 0)
-	    continue;
+	int i;
 
 	if (Debug & Dshutdown)
-	    fprintf(stderr, "  propagating sig %d to %d\n",
-		    send_signal, -running[i].pgrp);
-	if (kill(-running[i].pgrp, send_signal) != 0) {
-	    fprintf(stderr,
-		    "pan(%s): kill(%d,%d) failed on tag (%s).  errno:%d  %s\n",
-		    panname, -running[i].pgrp, send_signal,
-		    running[i].cmd->name, errno, strerror(errno));
+		fprintf(stderr, "pan was signaled with sig %d...\n",
+			rec_signal);
+
+	if (rec_signal == SIGALRM) {
+		printf("PAN stop Alarm was received\n");
+		rec_signal = SIGTERM;
 	}
-	running[i].stopping = 1;
-    }
 
-    check_orphans(orphans, send_signal);
+	for (i = 0; i < keep_active; ++i) {
+		if (running[i].pgrp == 0)
+			continue;
 
-    rec_signal = send_signal = 0;
+		if (Debug & Dshutdown)
+			fprintf(stderr, "  propagating sig %d to %d\n",
+				send_signal, -running[i].pgrp);
+		if (kill(-running[i].pgrp, send_signal) != 0) {
+			fprintf(stderr,
+				"pan(%s): kill(%d,%d) failed on tag (%s).  errno:%d  %s\n",
+				panname, -running[i].pgrp, send_signal,
+				running[i].cmd->name, errno, strerror(errno));
+		}
+		running[i].stopping = 1;
+	}
+
+	check_orphans(orphans, send_signal);
+
+	rec_signal = send_signal = 0;
 }
 
-
 static int
 check_pids(struct tag_pgrp *running, int *num_active, int keep_active,
 	   FILE * logfile, FILE * failcmdfile, struct orphan_pgrp *orphans,
 	   int fmt_print, int *failcnt, int quiet_mode)
 {
-    int w;
-    pid_t cpid;
-    int stat_loc;
-    int ret = 0;
-    int i;
-    time_t t;
-    char *status;
-    int signaled = 0;
-    struct tms tms1, tms2;
-    clock_t tck;
+	int w;
+	pid_t cpid;
+	int stat_loc;
+	int ret = 0;
+	int i;
+	time_t t;
+	char *status;
+	int signaled = 0;
+	struct tms tms1, tms2;
+	clock_t tck;
 
-    check_orphans(orphans, 0);
+	check_orphans(orphans, 0);
 
-    tck = times(&tms1);
-    if (tck == -1) {
-	fprintf(stderr, "pan(%s): times(&tms1) failed.  errno:%d  %s\n",
-		panname, errno, strerror(errno));
-    }
-    cpid = wait(&stat_loc);
-    tck = times(&tms2);
-    if (tck == -1) {
-	fprintf(stderr, "pan(%s): times(&tms2) failed.  errno:%d  %s\n",
-		panname, errno, strerror(errno));
-    }
-
-    if (cpid < 0) {
-	if (errno == EINTR) {
-	    if (Debug)
-		fprintf(stderr, "pan(%s): wait() interrupted\n", panname);
-	} else if (errno != ECHILD) {
-	    fprintf(stderr, "pan(%s): wait() failed.  errno:%d  %s\n",
-		    panname, errno, strerror(errno));
+	tck = times(&tms1);
+	if (tck == -1) {
+		fprintf(stderr, "pan(%s): times(&tms1) failed.  errno:%d  %s\n",
+			panname, errno, strerror(errno));
 	}
-    } else if (cpid > 0) {
-
-	if (WIFSIGNALED(stat_loc)) {
-	    w = WTERMSIG(stat_loc);
-	    status = "signaled";
-	    if (Debug & Dexit)
-		fprintf(stderr, "child %d terminated with signal %d\n", cpid,
-			w);
-	    --*num_active;
-	    signaled = 1;
-	} else if (WIFEXITED(stat_loc)) {
-	    w = WEXITSTATUS(stat_loc);
-	    status = "exited";
-	    if (Debug & Dexit)
-		fprintf(stderr, "child %d exited with status %d\n", cpid, w);
-	    --*num_active;
-	    if (w != 0)
-		ret++;
-	} else if (WIFSTOPPED(stat_loc)) {	/* should never happen */
-	    w = WSTOPSIG(stat_loc);
-	    status = "stopped";
-	    ret++;
-	} else {		/* should never happen */
-	    w = 0;
-	    status = "unknown";
-	    ret++;
+	cpid = wait(&stat_loc);
+	tck = times(&tms2);
+	if (tck == -1) {
+		fprintf(stderr, "pan(%s): times(&tms2) failed.  errno:%d  %s\n",
+			panname, errno, strerror(errno));
 	}
 
-	for (i = 0; i < keep_active; ++i) {
-	    if (running[i].pgrp == cpid) {
-		if ((w == 130) && running[i].stopping &&
-		    (strcmp(status, "exited") == 0)) {
-		    /* The child received sigint, but
-		     * did not trap for it?  Compensate
-		     * for it here.
-		     */
-		    w = 0;
-		    ret--;	/* undo */
-		    if (Debug & Drunning)
+	if (cpid < 0) {
+		if (errno == EINTR) {
+			if (Debug)
+				fprintf(stderr, "pan(%s): wait() interrupted\n",
+					panname);
+		} else if (errno != ECHILD) {
 			fprintf(stderr,
-				"pan(%s): tag=%s exited 130, known to be signaled; will give it an exit 0.\n",
-				panname, running[i].cmd->name);
+				"pan(%s): wait() failed.  errno:%d  %s\n",
+				panname, errno, strerror(errno));
 		}
-		time(&t);
-		if (logfile != NULL) {
-			if (!fmt_print)
-				fprintf(logfile,
-				 "tag=%s stime=%d dur=%d exit=%s stat=%d core=%s cu=%d cs=%d\n",
-					running[i].cmd->name, (int) (running[i].mystime),
-					(int) (t - running[i].mystime), status, w,
-					(stat_loc & 0200) ? "yes" : "no",
-					(int) (tms2.tms_cutime - tms1.tms_cutime),
-					(int) (tms2.tms_cstime - tms1.tms_cstime));
-			else
-			{
-					if (w != 0)
-						++*failcnt;
-					fprintf(logfile, "%-30.30s %-10.10s %-5d\n",
-							running[i].cmd->name, ((w != 0) ? "FAIL" : "PASS"),
+	} else if (cpid > 0) {
+
+		if (WIFSIGNALED(stat_loc)) {
+			w = WTERMSIG(stat_loc);
+			status = "signaled";
+			if (Debug & Dexit)
+				fprintf(stderr,
+					"child %d terminated with signal %d\n",
+					cpid, w);
+			--*num_active;
+			signaled = 1;
+		} else if (WIFEXITED(stat_loc)) {
+			w = WEXITSTATUS(stat_loc);
+			status = "exited";
+			if (Debug & Dexit)
+				fprintf(stderr,
+					"child %d exited with status %d\n",
+					cpid, w);
+			--*num_active;
+			if (w != 0)
+				ret++;
+		} else if (WIFSTOPPED(stat_loc)) {	/* should never happen */
+			w = WSTOPSIG(stat_loc);
+			status = "stopped";
+			ret++;
+		} else {	/* should never happen */
+			w = 0;
+			status = "unknown";
+			ret++;
+		}
+
+		for (i = 0; i < keep_active; ++i) {
+			if (running[i].pgrp == cpid) {
+				if ((w == 130) && running[i].stopping &&
+				    (strcmp(status, "exited") == 0)) {
+					/* The child received sigint, but
+					 * did not trap for it?  Compensate
+					 * for it here.
+					 */
+					w = 0;
+					ret--;	/* undo */
+					if (Debug & Drunning)
+						fprintf(stderr,
+							"pan(%s): tag=%s exited 130, known to be signaled; will give it an exit 0.\n",
+							panname,
+							running[i].cmd->name);
+				}
+				time(&t);
+				if (logfile != NULL) {
+					if (!fmt_print)
+						fprintf(logfile,
+							"tag=%s stime=%d dur=%d exit=%s stat=%d core=%s cu=%d cs=%d\n",
+							running[i].cmd->name,
+							(int)(running[i].
+							      mystime),
+							(int)(t -
+							      running[i].
+							      mystime), status,
+							w,
+							(stat_loc & 0200) ?
+							"yes" : "no",
+							(int)(tms2.tms_cutime -
+							      tms1.tms_cutime),
+							(int)(tms2.tms_cstime -
+							      tms1.tms_cstime));
+					else {
+						if (w != 0)
+							++ * failcnt;
+						fprintf(logfile,
+							"%-30.30s %-10.10s %-5d\n",
+							running[i].cmd->name,
+							((w !=
+							  0) ? "FAIL" : "PASS"),
 							w);
+					}
+
+					fflush(logfile);
+				}
+
+				if ((failcmdfile != NULL) && (w != 0)) {
+					fprintf(failcmdfile, "%s %s\n",
+						running[i].cmd->name,
+						running[i].cmd->cmdline);
+				}
+
+				if (running[i].stopping)
+					status = "driver_interrupt";
+
+				if (test_out_dir) {
+					if (!quiet_mode)
+						write_test_start(running + i);
+					copy_buffered_output(running + i);
+					unlink(running[i].output);
+				}
+				if (!quiet_mode)
+					write_test_end(running + i, "ok", t,
+						       status, stat_loc, w,
+						       &tms1, &tms2);
+
+				/* If signaled and we weren't expecting
+				 * this to be stopped then the proc
+				 * had a problem.
+				 */
+				if (signaled && !running[i].stopping)
+					ret++;
+
+				running[i].pgrp = 0;
+				if (zoo_clear(zoofile, cpid)) {
+					fprintf(stderr, "pan(%s): %s\n",
+						panname, zoo_error);
+					exit(1);
+				}
+
+				/* Check for orphaned pgrps */
+				if ((kill(-cpid, 0) == 0) || (errno == EPERM)) {
+					if (zoo_mark_cmdline
+					    (zoofile, cpid, "panorphan",
+					     running[i].cmd->cmdline)) {
+						fprintf(stderr, "pan(%s): %s\n",
+							panname, zoo_error);
+						exit(1);
+					}
+					mark_orphan(orphans, cpid);
+					/* status of kill doesn't matter */
+					kill(-cpid, SIGTERM);
+				}
+
+				break;
 			}
-
-			fflush(logfile);
 		}
-
-		if ((failcmdfile != NULL) && (w !=0)) {
-			fprintf(failcmdfile, "%s %s\n", running[i].cmd->name, running[i].cmd->cmdline);
-		}
-
-		if (running[i].stopping)
-		    status = "driver_interrupt";
-
-		if (test_out_dir) {
-			if (!quiet_mode)
-				write_test_start(running+i);
-			copy_buffered_output(running + i);
-			unlink(running[i].output);
-		}
-		if (!quiet_mode)
-			write_test_end(running+i, "ok", t, status,
-			   stat_loc, w, &tms1, &tms2);
-
-		/* If signaled and we weren't expecting
-		 * this to be stopped then the proc
-		 * had a problem.
-		 */
-		if (signaled && !running[i].stopping)
-		    ret++;
-
-		running[i].pgrp = 0;
-		if (zoo_clear(zoofile, cpid)) {
-		    fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-		    exit(1);
-		}
-
-		/* Check for orphaned pgrps */
-		if ((kill(-cpid, 0) == 0) || (errno == EPERM)) {
-		    if (zoo_mark_cmdline(zoofile, cpid, "panorphan",
-					  running[i].cmd->cmdline)) {
-			fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-			exit(1);
-		    }
-		    mark_orphan(orphans, cpid);
-		    /* status of kill doesn't matter */
-		    kill(-cpid, SIGTERM);
-		}
-
-		break;
-	    }
 	}
-    }
-    return ret;
+	return ret;
 }
 
-
 static pid_t
 run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode,
 	  int *failcnt, int fmt_print, FILE * logfile)
 {
-    ssize_t errlen;
-    int cpid;
-    int c_stdout = -1;		/* child's stdout, stderr */
-    int capturing = 0;		/* output is going to a file instead of stdout */
-    char *c_cmdline;
-    static long cmdno = 0;
-    int errpipe[2];		/* way to communicate to parent that the tag  */
-    char errbuf[1024];		/* didn't actually start */
+	ssize_t errlen;
+	int cpid;
+	int c_stdout = -1;	/* child's stdout, stderr */
+	int capturing = 0;	/* output is going to a file instead of stdout */
+	char *c_cmdline;
+	static long cmdno = 0;
+	int errpipe[2];		/* way to communicate to parent that the tag  */
+	char errbuf[1024];	/* didn't actually start */
 
-    /* Try to open the file that will be stdout for the test */
-    if (test_out_dir) {
-	capturing = 1;
-	do {
-	    sprintf(active->output, "%s/%s.%ld",
-		    test_out_dir, colle->name, cmdno++);
-	    c_stdout = open(active->output, O_CREAT | O_RDWR | O_EXCL | O_SYNC, 0666);
-	} while (c_stdout < 0 && errno == EEXIST);
-	if (c_stdout < 0) {
-	    fprintf(stderr,
-		    "pan(%s): open of stdout file failed (tag %s).  errno: %d  %s\n  file: %s\n",
-		    panname, colle->name, errno, strerror(errno),
-		    active->output);
-	    return -1;
+	/* Try to open the file that will be stdout for the test */
+	if (test_out_dir) {
+		capturing = 1;
+		do {
+			sprintf(active->output, "%s/%s.%ld",
+				test_out_dir, colle->name, cmdno++);
+			c_stdout =
+			    open(active->output,
+				 O_CREAT | O_RDWR | O_EXCL | O_SYNC, 0666);
+		} while (c_stdout < 0 && errno == EEXIST);
+		if (c_stdout < 0) {
+			fprintf(stderr,
+				"pan(%s): open of stdout file failed (tag %s).  errno: %d  %s\n  file: %s\n",
+				panname, colle->name, errno, strerror(errno),
+				active->output);
+			return -1;
+		}
 	}
-    }
 
-    /* get the tag's command line arguments ready.  subst_pcnt_f() uses a
-     * static counter, that's why we do it here instead of after we fork.
-     */
-    if (colle->pcnt_f) {
-	c_cmdline = subst_pcnt_f(colle);
-    } else {
-	c_cmdline = colle->cmdline;
-    }
+	/* get the tag's command line arguments ready.  subst_pcnt_f() uses a
+	 * static counter, that's why we do it here instead of after we fork.
+	 */
+	if (colle->pcnt_f) {
+		c_cmdline = subst_pcnt_f(colle);
+	} else {
+		c_cmdline = colle->cmdline;
+	}
 
-    if (pipe(errpipe) < 0) {
-	fprintf(stderr, "pan(%s): pipe() failed. errno:%d %s\n",
+	if (pipe(errpipe) < 0) {
+		fprintf(stderr, "pan(%s): pipe() failed. errno:%d %s\n",
 			panname, errno, strerror(errno));
-	if (capturing) {
-	    close(c_stdout);
-            unlink(active->output);
-        }
-	return -1;
-    }
+		if (capturing) {
+			close(c_stdout);
+			unlink(active->output);
+		}
+		return -1;
+	}
 
-    time(&active->mystime);
-    active->cmd = colle;
+	time(&active->mystime);
+	active->cmd = colle;
 
-    if (!test_out_dir)
-	if (!quiet_mode)
-		write_test_start(active);
+	if (!test_out_dir)
+		if (!quiet_mode)
+			write_test_start(active);
 
-    if ((cpid = fork()) == -1) {
-	fprintf(stderr, "pan(%s): fork failed (tag %s).  errno:%d  %s\n",
-		panname, colle->name, errno, strerror(errno));
-	if (capturing) {
-            unlink(active->output);
-	    close(c_stdout);
-        }
-	close(errpipe[0]);
-	close(errpipe[1]);
-	return -1;
-    } else if (cpid == 0) {
-	/* child */
+	if ((cpid = fork()) == -1) {
+		fprintf(stderr,
+			"pan(%s): fork failed (tag %s).  errno:%d  %s\n",
+			panname, colle->name, errno, strerror(errno));
+		if (capturing) {
+			unlink(active->output);
+			close(c_stdout);
+		}
+		close(errpipe[0]);
+		close(errpipe[1]);
+		return -1;
+	} else if (cpid == 0) {
+		/* child */
 
-	fclose(zoofile);
-	close(errpipe[0]);
-	fcntl(errpipe[1], F_SETFD, 1);  /* close the pipe if we succeed */
-	setpgrp();
+		fclose(zoofile);
+		close(errpipe[0]);
+		fcntl(errpipe[1], F_SETFD, 1);	/* close the pipe if we succeed */
+		setpgrp();
 
-	umask(0);
+		umask(0);
 
 #define WRITE_OR_DIE(fd, buf, buflen) do {				\
 	if (write((fd), (buf), (buflen)) != (buflen)) {			\
@@ -889,462 +938,467 @@
 	}								\
 } while(0)
 
-	/* if we're putting output into a buffer file, we need to do the
-	 * redirection now.  If we fail
-	 */
-	if (capturing) {
-	    if (dup2(c_stdout, fileno(stdout)) == -1) {
-		errlen = sprintf(errbuf, "pan(%s): couldn't redirect stdout for tag %s.  errno:%d  %s",
-				panname, colle->name, errno, strerror(errno));
-		WRITE_OR_DIE(errpipe[1], &errlen, sizeof(errlen));
-		WRITE_OR_DIE(errpipe[1], errbuf, errlen);
-		exit(2);
-	    }
-	    if (dup2(c_stdout, fileno(stderr)) == -1) {
-		errlen = sprintf(errbuf, "pan(%s): couldn't redirect stderr for tag %s.  errno:%d  %s",
-				panname, colle->name, errno, strerror(errno));
-		WRITE_OR_DIE(errpipe[1], &errlen, sizeof(errlen));
-		WRITE_OR_DIE(errpipe[1], errbuf, errlen);
-		exit(2);
-	    }
-	} else { /* stderr still needs to be redirected */
-	    if (dup2(fileno(stdout), fileno(stderr)) == -1) {
-		errlen = sprintf(errbuf, "pan(%s): couldn't redirect stderr for tag %s.  errno:%d  %s",
-				panname, colle->name, errno, strerror(errno));
-		WRITE_OR_DIE(errpipe[1], &errlen, sizeof(errlen));
-		WRITE_OR_DIE(errpipe[1], errbuf, errlen);
-		exit(2);
-	    }
-	}
-	/* If there are any shell-type characters in the cmdline
-	 * such as '>', '<', '$', '|', etc, then we exec a shell and
-	 * run the cmd under a shell.
-	 *
-	 * Otherwise, break the cmdline at white space and exec the
-	 * cmd directly.
-	 */
-	if (strpbrk(c_cmdline, "\"';|<>$\\")) {
-	    execlp("sh", "sh", "-c", c_cmdline, (char*)0);
-	    errlen = sprintf(errbuf,
-		    "pan(%s): execlp of '%s' (tag %s) failed.  errno:%d %s",
-		    panname, c_cmdline, colle->name, errno, strerror(errno));
-	} else {
-	    char **arg_v;
-
-	    arg_v = (char **)splitstr(c_cmdline, NULL, NULL);
-
-	    execvp(arg_v[0], arg_v);
-    	    errlen = sprintf(errbuf,
-		    "pan(%s): execvp of '%s' (tag %s) failed.  errno:%d  %s",
-		    panname, arg_v[0], colle->name, errno, strerror(errno));
-	}
-	WRITE_OR_DIE(errpipe[1], &errlen, sizeof(errlen));
-	WRITE_OR_DIE(errpipe[1], errbuf, errlen);
-	exit(errno);
-    }
-
-    /* parent */
-
-    /* subst_pcnt_f() allocates the command line dynamically
-     * free the malloc to prevent a memory leak
-     */
-    if (colle->pcnt_f)
-	free(c_cmdline);
-
-    close(errpipe[1]);
-
-    /* if the child couldn't go through with the exec,
-     * clean up the mess, note it, and move on
-     */
-    if (read(errpipe[0], &errlen, sizeof(errlen))) {
-	int status;
-	time_t end_time;
-	int termid;
-	char *termtype;
-	struct tms notime = {0, 0, 0, 0};
-
-	read(errpipe[0], errbuf, errlen);
-	close(errpipe[0]);
-	errbuf[errlen] = '\0';
-	/* fprintf(stderr, "%s", errbuf); */
-	waitpid(cpid, &status, 0);
-	if (WIFSIGNALED(status)) {
-	    termid = WTERMSIG(status);
-	    termtype = "signaled";
-	} else if (WIFEXITED(status)) {
-	    termid = WEXITSTATUS(status);
-	    termtype = "exited";
-	} else if (WIFSTOPPED(status)) {
-	    termid = WSTOPSIG(status);
-	    termtype = "stopped";
-	} else {
-	    termid = 0;
-	    termtype = "unknown";
-	}
-	time(&end_time);
-	if (logfile != NULL) {
-		if (!fmt_print) {
-			fprintf(logfile,
-				"tag=%s stime=%d dur=%d exit=%s "
-				"stat=%d core=%s cu=%d cs=%d\n",
-				colle->name, (int)(active->mystime),
-				(int) (end_time - active->mystime), termtype,
-				termid, (status & 0200) ? "yes" : "no",
-				0, 0);
+		/* if we're putting output into a buffer file, we need to do the
+		 * redirection now.  If we fail
+		 */
+		if (capturing) {
+			if (dup2(c_stdout, fileno(stdout)) == -1) {
+				errlen =
+				    sprintf(errbuf,
+					    "pan(%s): couldn't redirect stdout for tag %s.  errno:%d  %s",
+					    panname, colle->name, errno,
+					    strerror(errno));
+				WRITE_OR_DIE(errpipe[1], &errlen,
+					     sizeof(errlen));
+				WRITE_OR_DIE(errpipe[1], errbuf, errlen);
+				exit(2);
+			}
+			if (dup2(c_stdout, fileno(stderr)) == -1) {
+				errlen =
+				    sprintf(errbuf,
+					    "pan(%s): couldn't redirect stderr for tag %s.  errno:%d  %s",
+					    panname, colle->name, errno,
+					    strerror(errno));
+				WRITE_OR_DIE(errpipe[1], &errlen,
+					     sizeof(errlen));
+				WRITE_OR_DIE(errpipe[1], errbuf, errlen);
+				exit(2);
+			}
+		} else {	/* stderr still needs to be redirected */
+			if (dup2(fileno(stdout), fileno(stderr)) == -1) {
+				errlen =
+				    sprintf(errbuf,
+					    "pan(%s): couldn't redirect stderr for tag %s.  errno:%d  %s",
+					    panname, colle->name, errno,
+					    strerror(errno));
+				WRITE_OR_DIE(errpipe[1], &errlen,
+					     sizeof(errlen));
+				WRITE_OR_DIE(errpipe[1], errbuf, errlen);
+				exit(2);
+			}
+		}
+		/* If there are any shell-type characters in the cmdline
+		 * such as '>', '<', '$', '|', etc, then we exec a shell and
+		 * run the cmd under a shell.
+		 *
+		 * Otherwise, break the cmdline at white space and exec the
+		 * cmd directly.
+		 */
+		if (strpbrk(c_cmdline, "\"';|<>$\\")) {
+			execlp("sh", "sh", "-c", c_cmdline, (char *)0);
+			errlen = sprintf(errbuf,
+					 "pan(%s): execlp of '%s' (tag %s) failed.  errno:%d %s",
+					 panname, c_cmdline, colle->name, errno,
+					 strerror(errno));
 		} else {
-			if (termid != 0)
-				++*failcnt;
+			char **arg_v;
 
-			fprintf(logfile, "%-30.30s %-10.10s %-5d\n",
-				colle->name, ((termid != 0) ? "FAIL" : "PASS"),
-				termid);
+			arg_v = (char **)splitstr(c_cmdline, NULL, NULL);
+
+			execvp(arg_v[0], arg_v);
+			errlen = sprintf(errbuf,
+					 "pan(%s): execvp of '%s' (tag %s) failed.  errno:%d  %s",
+					 panname, arg_v[0], colle->name, errno,
+					 strerror(errno));
 		}
-		fflush(logfile);
+		WRITE_OR_DIE(errpipe[1], &errlen, sizeof(errlen));
+		WRITE_OR_DIE(errpipe[1], errbuf, errlen);
+		exit(errno);
 	}
 
-	if (!quiet_mode)
-	{
-		//write_test_start(active, errbuf);
-		write_test_end(active, errbuf, end_time, termtype, status,
-			termid, &notime, &notime);
+	/* parent */
+
+	/* subst_pcnt_f() allocates the command line dynamically
+	 * free the malloc to prevent a memory leak
+	 */
+	if (colle->pcnt_f)
+		free(c_cmdline);
+
+	close(errpipe[1]);
+
+	/* if the child couldn't go through with the exec,
+	 * clean up the mess, note it, and move on
+	 */
+	if (read(errpipe[0], &errlen, sizeof(errlen))) {
+		int status;
+		time_t end_time;
+		int termid;
+		char *termtype;
+		struct tms notime = { 0, 0, 0, 0 };
+
+		read(errpipe[0], errbuf, errlen);
+		close(errpipe[0]);
+		errbuf[errlen] = '\0';
+		/* fprintf(stderr, "%s", errbuf); */
+		waitpid(cpid, &status, 0);
+		if (WIFSIGNALED(status)) {
+			termid = WTERMSIG(status);
+			termtype = "signaled";
+		} else if (WIFEXITED(status)) {
+			termid = WEXITSTATUS(status);
+			termtype = "exited";
+		} else if (WIFSTOPPED(status)) {
+			termid = WSTOPSIG(status);
+			termtype = "stopped";
+		} else {
+			termid = 0;
+			termtype = "unknown";
+		}
+		time(&end_time);
+		if (logfile != NULL) {
+			if (!fmt_print) {
+				fprintf(logfile,
+					"tag=%s stime=%d dur=%d exit=%s "
+					"stat=%d core=%s cu=%d cs=%d\n",
+					colle->name, (int)(active->mystime),
+					(int)(end_time - active->mystime),
+					termtype, termid,
+					(status & 0200) ? "yes" : "no", 0, 0);
+			} else {
+				if (termid != 0)
+					++ * failcnt;
+
+				fprintf(logfile, "%-30.30s %-10.10s %-5d\n",
+					colle->name,
+					((termid != 0) ? "FAIL" : "PASS"),
+					termid);
+			}
+			fflush(logfile);
+		}
+
+		if (!quiet_mode) {
+			//write_test_start(active, errbuf);
+			write_test_end(active, errbuf, end_time, termtype,
+				       status, termid, &notime, &notime);
+		}
+		if (capturing) {
+			close(c_stdout);
+			unlink(active->output);
+		}
+		return -1;
 	}
-        if (capturing) {
-            close(c_stdout);
-            unlink(active->output);
-        }
-	return -1;
-    }
 
-    close(errpipe[0]);
-    if (capturing) close(c_stdout);
-
-    active->pgrp = cpid;
-    active->stopping = 0;
-
-    if (zoo_mark_cmdline(zoofile, cpid, colle->name, colle->cmdline)) {
-	fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
-	exit(1);
-    }
-
-    if (Debug & Dstartup)
-	fprintf(stderr, "started %s cpid=%d at %s",
-		colle->name, cpid, ctime(&active->mystime));
-
-    if (Debug & Dstart) {
-	fprintf(stderr, "Executing test = %s as %s", colle->name, colle->cmdline);
+	close(errpipe[0]);
 	if (capturing)
-	    fprintf(stderr, "with output file = %s\n", active->output);
-	else
-    	    fprintf(stderr, "\n");
-    }
+		close(c_stdout);
 
-    return cpid;
+	active->pgrp = cpid;
+	active->stopping = 0;
+
+	if (zoo_mark_cmdline(zoofile, cpid, colle->name, colle->cmdline)) {
+		fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
+		exit(1);
+	}
+
+	if (Debug & Dstartup)
+		fprintf(stderr, "started %s cpid=%d at %s",
+			colle->name, cpid, ctime(&active->mystime));
+
+	if (Debug & Dstart) {
+		fprintf(stderr, "Executing test = %s as %s", colle->name,
+			colle->cmdline);
+		if (capturing)
+			fprintf(stderr, "with output file = %s\n",
+				active->output);
+		else
+			fprintf(stderr, "\n");
+	}
+
+	return cpid;
 }
 
-
-static char *
-subst_pcnt_f(struct coll_entry *colle)
+static char *subst_pcnt_f(struct coll_entry *colle)
 {
-    static int counter = 1;
-    char pid_and_counter[20];
-    char new_cmdline[1024];
+	static int counter = 1;
+	char pid_and_counter[20];
+	char new_cmdline[1024];
 
-    /* if we get called falsely, do the right thing anyway */
-    if (!colle->pcnt_f)
-	return colle->cmdline;
+	/* if we get called falsely, do the right thing anyway */
+	if (!colle->pcnt_f)
+		return colle->cmdline;
 
-    snprintf(pid_and_counter, 20, "%d_%d", getpid(), counter++);
-    snprintf(new_cmdline, 1024, colle->cmdline, pid_and_counter);
-    return strdup(new_cmdline);
+	snprintf(pid_and_counter, 20, "%d_%d", getpid(), counter++);
+	snprintf(new_cmdline, 1024, colle->cmdline, pid_and_counter);
+	return strdup(new_cmdline);
 }
 
-static struct collection *
-get_collection(char *file, int optind, int argc, char **argv)
+static struct collection *get_collection(char *file, int optind, int argc,
+					 char **argv)
 {
-    char *buf, *a, *b;
-    struct coll_entry *head, *p, *n;
-    struct collection *coll;
-    int i;
+	char *buf, *a, *b;
+	struct coll_entry *head, *p, *n;
+	struct collection *coll;
+	int i;
 
-    buf = slurp(file);
-    if (!buf)
-        return NULL;
+	buf = slurp(file);
+	if (!buf)
+		return NULL;
 
-    coll = (struct collection *) malloc(sizeof(struct collection));
-    coll->cnt = 0;
+	coll = (struct collection *)malloc(sizeof(struct collection));
+	coll->cnt = 0;
 
-    head = p = n = NULL;
-    a = b = buf;
-    while (a) {
-	/* set b to the start of the next line and add a NULL character
-	 * to separate the two lines */
-	if ((b = strchr(a, '\n')) != NULL)
-            *b++ = '\0';
+	head = p = n = NULL;
+	a = b = buf;
+	while (a) {
+		/* set b to the start of the next line and add a NULL character
+		 * to separate the two lines */
+		if ((b = strchr(a, '\n')) != NULL)
+			*b++ = '\0';
 
-	/* If this is line isn't a comment */
-	if ((*a != '#') && (*a != '\0') && (*a != ' ')) {
-	    n = (struct coll_entry *) malloc(sizeof(struct coll_entry));
-	    if ((n->pcnt_f = strstr(a, "%f"))) {
-		n->pcnt_f[1] = 's';
-	    }
-	    n->name = strdup(strsep(&a, " \t"));
-	    n->cmdline = strdup(a);
-	    n->next = NULL;
+		/* If this is line isn't a comment */
+		if ((*a != '#') && (*a != '\0') && (*a != ' ')) {
+			n = (struct coll_entry *)
+			    malloc(sizeof(struct coll_entry));
+			if ((n->pcnt_f = strstr(a, "%f"))) {
+				n->pcnt_f[1] = 's';
+			}
+			n->name = strdup(strsep(&a, " \t"));
+			n->cmdline = strdup(a);
+			n->next = NULL;
 
-	    if (p) {
-		p->next = n;
-	    }
-	    if (head == NULL) {
-		head = n;
-	    }
-	    p = n;
-	    coll->cnt++;
-	}
-        a = b;
-    }
-    free(buf);
-
-    /* is there something on the commandline to be counted? */
-    if (optind < argc) {
-	char workstr[1024] = "";
-	int workstr_left = 1023;
-
-	/* fill arg list */
-	for (i = 0; optind < argc; ++optind, ++i) {
-	    strncat(workstr, argv[optind], workstr_left);
-	    workstr_left = workstr_left - strlen(argv[optind]);
-	    strncat(workstr, " ", workstr_left);
-	    workstr_left--;
-	}
-
-    	n = (struct coll_entry *) malloc(sizeof(struct coll_entry));
-    	if ((n->pcnt_f = strstr(workstr, "%f"))) {
-	    n->pcnt_f[1] = 's';
-	}
-	n->cmdline = strdup(workstr);
-	n->name = "cmdln";
-	n->next = NULL;
-	if (p) {
-	    p->next = n;
-	}
-	if (head == NULL) {
-	    head = n;
-	}
-	coll->cnt++;
-    }
-
-    /* get an array */
-    coll->ary = (struct coll_entry **) malloc(coll->cnt *
-					      sizeof(struct coll_entry *));
-
-    /* fill the array */
-    i = 0;
-    n = head;
-    while (n != NULL) {
-	coll->ary[i] = n;
-	n = n->next;
-	++i;
-    }
-    if (i != coll->cnt)
-	fprintf(stderr, "pan(%s): i doesn't match cnt\n", panname);
-
-    return coll;
-}
-
-
-static char *
-slurp(char *file)
-{
-    char *buf;
-    int fd;
-    struct stat sbuf;
-
-    if ((fd = open(file, O_RDONLY)) < 0) {
-	fprintf(stderr, "pan(%s): open(%s,O_RDONLY) failed.  errno:%d  %s\n",
-		panname, file, errno, strerror(errno));
-	return NULL;
-    }
-
-    if (fstat(fd, &sbuf) < 0) {
-	fprintf(stderr, "pan(%s): fstat(%s) failed.  errno:%d  %s\n",
-		panname, file, errno, strerror(errno));
-	return NULL;
-    }
-
-    buf = (char *) malloc(sbuf.st_size + 1);
-    if (read(fd, buf, sbuf.st_size) != sbuf.st_size) {
-	fprintf(stderr, "pan(%s): slurp failed.  errno:%d  %s\n",
-		panname, errno, strerror(errno));
-	return NULL;
-    }
-    buf[sbuf.st_size] = '\0';
-
-    close(fd);
-    return buf;
-}
-
-static void
-check_orphans(struct orphan_pgrp *orphans, int sig)
-{
-    struct orphan_pgrp *orph;
-
-    for (orph = orphans; orph != NULL; orph = orph->next) {
-	if (orph->pgrp == 0)
-	    continue;
-
-	if (Debug & Dshutdown)
-	    fprintf(stderr, "  propagating sig %d to orphaned pgrp %d\n",
-		    sig, -(orph->pgrp));
-	if (kill(-(orph->pgrp), sig) != 0) {
-	    if (errno == ESRCH) {
-		/* This pgrp is now empty */
-		if (zoo_clear(zoofile, orph->pgrp)) {
-		    fprintf(stderr, "pan(%s): %s\n", panname, zoo_error);
+			if (p) {
+				p->next = n;
+			}
+			if (head == NULL) {
+				head = n;
+			}
+			p = n;
+			coll->cnt++;
 		}
-		orph->pgrp = 0;
-	    } else {
-		fprintf(stderr,
-			"pan(%s): kill(%d,%d) on orphaned pgrp failed.  errno:%d  %s\n",
-			panname, -(orph->pgrp), sig, errno, strerror(errno));
-	    }
+		a = b;
 	}
-    }
+	free(buf);
+
+	/* is there something on the commandline to be counted? */
+	if (optind < argc) {
+		char workstr[1024] = "";
+		int workstr_left = 1023;
+
+		/* fill arg list */
+		for (i = 0; optind < argc; ++optind, ++i) {
+			strncat(workstr, argv[optind], workstr_left);
+			workstr_left = workstr_left - strlen(argv[optind]);
+			strncat(workstr, " ", workstr_left);
+			workstr_left--;
+		}
+
+		n = (struct coll_entry *)malloc(sizeof(struct coll_entry));
+		if ((n->pcnt_f = strstr(workstr, "%f"))) {
+			n->pcnt_f[1] = 's';
+		}
+		n->cmdline = strdup(workstr);
+		n->name = "cmdln";
+		n->next = NULL;
+		if (p) {
+			p->next = n;
+		}
+		if (head == NULL) {
+			head = n;
+		}
+		coll->cnt++;
+	}
+
+	/* get an array */
+	coll->ary = (struct coll_entry **)malloc(coll->cnt *
+						 sizeof(struct coll_entry *));
+
+	/* fill the array */
+	i = 0;
+	n = head;
+	while (n != NULL) {
+		coll->ary[i] = n;
+		n = n->next;
+		++i;
+	}
+	if (i != coll->cnt)
+		fprintf(stderr, "pan(%s): i doesn't match cnt\n", panname);
+
+	return coll;
 }
 
-
-static void
-mark_orphan(struct orphan_pgrp *orphans, pid_t cpid)
+static char *slurp(char *file)
 {
-    struct orphan_pgrp *orph;
+	char *buf;
+	int fd;
+	struct stat sbuf;
 
-    for (orph = orphans; orph != NULL; orph = orph->next) {
-	if (orph->pgrp == 0)
-	    break;
-    }
-    if (orph == NULL) {
-	/* make a new struct */
-	orph = (struct orphan_pgrp *) malloc(sizeof(struct orphan_pgrp));
+	if ((fd = open(file, O_RDONLY)) < 0) {
+		fprintf(stderr,
+			"pan(%s): open(%s,O_RDONLY) failed.  errno:%d  %s\n",
+			panname, file, errno, strerror(errno));
+		return NULL;
+	}
 
-	/* plug in the new struct just after the head */
-	orph->next = orphans->next;
-	orphans->next = orph;
-    }
-    orph->pgrp = cpid;
+	if (fstat(fd, &sbuf) < 0) {
+		fprintf(stderr, "pan(%s): fstat(%s) failed.  errno:%d  %s\n",
+			panname, file, errno, strerror(errno));
+		return NULL;
+	}
+
+	buf = (char *)malloc(sbuf.st_size + 1);
+	if (read(fd, buf, sbuf.st_size) != sbuf.st_size) {
+		fprintf(stderr, "pan(%s): slurp failed.  errno:%d  %s\n",
+			panname, errno, strerror(errno));
+		return NULL;
+	}
+	buf[sbuf.st_size] = '\0';
+
+	close(fd);
+	return buf;
 }
 
-
-
-static void
-copy_buffered_output(struct tag_pgrp *running)
+static void check_orphans(struct orphan_pgrp *orphans, int sig)
 {
-    char *tag_output;
+	struct orphan_pgrp *orph;
 
-    tag_output = slurp(running->output);
-    if (tag_output) {
-	printf("%s", tag_output);
-	/* make sure the output ends with a newline */
-	if (tag_output[strlen(tag_output) - 1] != '\n')
-	    printf("\n");
+	for (orph = orphans; orph != NULL; orph = orph->next) {
+		if (orph->pgrp == 0)
+			continue;
+
+		if (Debug & Dshutdown)
+			fprintf(stderr,
+				"  propagating sig %d to orphaned pgrp %d\n",
+				sig, -(orph->pgrp));
+		if (kill(-(orph->pgrp), sig) != 0) {
+			if (errno == ESRCH) {
+				/* This pgrp is now empty */
+				if (zoo_clear(zoofile, orph->pgrp)) {
+					fprintf(stderr, "pan(%s): %s\n",
+						panname, zoo_error);
+				}
+				orph->pgrp = 0;
+			} else {
+				fprintf(stderr,
+					"pan(%s): kill(%d,%d) on orphaned pgrp failed.  errno:%d  %s\n",
+					panname, -(orph->pgrp), sig, errno,
+					strerror(errno));
+			}
+		}
+	}
+}
+
+static void mark_orphan(struct orphan_pgrp *orphans, pid_t cpid)
+{
+	struct orphan_pgrp *orph;
+
+	for (orph = orphans; orph != NULL; orph = orph->next) {
+		if (orph->pgrp == 0)
+			break;
+	}
+	if (orph == NULL) {
+		/* make a new struct */
+		orph = (struct orphan_pgrp *)malloc(sizeof(struct orphan_pgrp));
+
+		/* plug in the new struct just after the head */
+		orph->next = orphans->next;
+		orphans->next = orph;
+	}
+	orph->pgrp = cpid;
+}
+
+static void copy_buffered_output(struct tag_pgrp *running)
+{
+	char *tag_output;
+
+	tag_output = slurp(running->output);
+	if (tag_output) {
+		printf("%s", tag_output);
+		/* make sure the output ends with a newline */
+		if (tag_output[strlen(tag_output) - 1] != '\n')
+			printf("\n");
+		fflush(stdout);
+		free(tag_output);
+	}
+}
+
+static void write_test_start(struct tag_pgrp *running)
+{
+	if (!strcmp(reporttype, "rts")) {
+
+		printf
+		    ("%s\ntag=%s stime=%ld\ncmdline=\"%s\"\ncontacts=\"%s\"\nanalysis=%s\n%s\n",
+		     "<<<test_start>>>", running->cmd->name, running->mystime,
+		     running->cmd->cmdline, "", "exit", "<<<test_output>>>");
+	}
 	fflush(stdout);
-	free(tag_output);
-    }
 }
 
-
-static void
-write_test_start(struct tag_pgrp *running)
-{
-    if (!strcmp(reporttype, "rts")) {
-
-	printf("%s\ntag=%s stime=%ld\ncmdline=\"%s\"\ncontacts=\"%s\"\nanalysis=%s\n%s\n",
-			"<<<test_start>>>",
-			running->cmd->name, running->mystime, running->cmd->cmdline, "",
-			"exit",
-			"<<<test_output>>>");
-    }
-    fflush(stdout);
-}
-
-
 static void
 write_test_end(struct tag_pgrp *running, const char *init_status,
-		time_t exit_time, char *term_type, int stat_loc,
-		int term_id, struct tms *tms1, struct tms *tms2)
+	       time_t exit_time, char *term_type, int stat_loc,
+	       int term_id, struct tms *tms1, struct tms *tms2)
 {
-    if (!strcmp(reporttype, "rts")) {
-	printf("%s\ninitiation_status=\"%s\"\nduration=%ld termination_type=%s "
-		"termination_id=%d corefile=%s\ncutime=%d cstime=%d\n%s\n",
-		  	"<<<execution_status>>>", init_status,
-			(long) (exit_time - running->mystime),
-			term_type, term_id, (stat_loc & 0200) ? "yes" : "no",
-			(int) (tms2->tms_cutime - tms1->tms_cutime),
-			(int) (tms2->tms_cstime - tms1->tms_cstime),
-			"<<<test_end>>>");
-    }
-    fflush(stdout);
+	if (!strcmp(reporttype, "rts")) {
+		printf
+		    ("%s\ninitiation_status=\"%s\"\nduration=%ld termination_type=%s "
+		     "termination_id=%d corefile=%s\ncutime=%d cstime=%d\n%s\n",
+		     "<<<execution_status>>>", init_status,
+		     (long)(exit_time - running->mystime), term_type, term_id,
+		     (stat_loc & 0200) ? "yes" : "no",
+		     (int)(tms2->tms_cutime - tms1->tms_cutime),
+		     (int)(tms2->tms_cstime - tms1->tms_cstime),
+		     "<<<test_end>>>");
+	}
+	fflush(stdout);
 }
 
 /* The functions below are all debugging related */
 
-static void
-pids_running(struct tag_pgrp *running, int keep_active)
+static void pids_running(struct tag_pgrp *running, int keep_active)
 {
-    int i;
+	int i;
 
-    fprintf(stderr, "pids still running: ");
-    for (i = 0; i < keep_active; ++i) {
-	if (running[i].pgrp != 0)
-	    fprintf(stderr, "%d ", running[i].pgrp);
-    }
-    fprintf(stderr, "\n");
+	fprintf(stderr, "pids still running: ");
+	for (i = 0; i < keep_active; ++i) {
+		if (running[i].pgrp != 0)
+			fprintf(stderr, "%d ", running[i].pgrp);
+	}
+	fprintf(stderr, "\n");
 }
 
-static void
-orphans_running(struct orphan_pgrp *orphans)
+static void orphans_running(struct orphan_pgrp *orphans)
 {
-    struct orphan_pgrp *orph;
+	struct orphan_pgrp *orph;
 
-    fprintf(stderr, "orphans still running: ");
-    for (orph = orphans; orph != NULL; orph = orph->next) {
-	if (orph->pgrp != 0)
-	    fprintf(stderr, "%d ", -(orph->pgrp));
-    }
-    fprintf(stderr, "\n");
+	fprintf(stderr, "orphans still running: ");
+	for (orph = orphans; orph != NULL; orph = orph->next) {
+		if (orph->pgrp != 0)
+			fprintf(stderr, "%d ", -(orph->pgrp));
+	}
+	fprintf(stderr, "\n");
 }
 
-static void
-dump_coll(struct collection *coll)
+static void dump_coll(struct collection *coll)
 {
-    int i;
+	int i;
 
-    for (i = 0; i < coll->cnt; ++i) {
-	fprintf(stderr, "coll %d\n", i);
-	fprintf(stderr, "  name=%s cmdline=%s\n", coll->ary[i]->name,
-		coll->ary[i]->cmdline);
-    }
+	for (i = 0; i < coll->cnt; ++i) {
+		fprintf(stderr, "coll %d\n", i);
+		fprintf(stderr, "  name=%s cmdline=%s\n", coll->ary[i]->name,
+			coll->ary[i]->cmdline);
+	}
 }
 
-void
-wait_handler( int sig )
+void wait_handler(int sig)
 {
-    static int lastsent = 0;
+	static int lastsent = 0;
 
-    if (sig == 0) {
-	lastsent = 0;
-    } else {
-	rec_signal = sig;
-	if (sig == SIGUSR2)
-	    return;
-	if (lastsent == 0)
-	    send_signal = sig;
-	else if (lastsent == SIGUSR1)
-	    send_signal = SIGINT;
-	else if (lastsent == sig)
-	    send_signal = SIGTERM;
-	else if (lastsent == SIGTERM)
-	    send_signal = SIGHUP;
-	else if (lastsent == SIGHUP)
-	    send_signal = SIGKILL;
-	lastsent = send_signal;
-    }
+	if (sig == 0) {
+		lastsent = 0;
+	} else {
+		rec_signal = sig;
+		if (sig == SIGUSR2)
+			return;
+		if (lastsent == 0)
+			send_signal = sig;
+		else if (lastsent == SIGUSR1)
+			send_signal = SIGINT;
+		else if (lastsent == sig)
+			send_signal = SIGTERM;
+		else if (lastsent == SIGTERM)
+			send_signal = SIGHUP;
+		else if (lastsent == SIGHUP)
+			send_signal = SIGKILL;
+		lastsent = send_signal;
+	}
 }
diff --git a/pan/ltp-scanner.c b/pan/ltp-scanner.c
index ce3c1fb..afdd757 100644
--- a/pan/ltp-scanner.c
+++ b/pan/ltp-scanner.c
@@ -131,32 +131,33 @@
 #include "reporter.h"
 #include "symbol.h"
 
-char *cnf;              /* current filename */
-int extended=0;		/* -e option        */
+char *cnf;			/* current filename */
+int extended = 0;		/* -e option        */
 
 int main(int argc, char *argv[])
 {
-	SYM tags;			/* tag data */
+	SYM tags;		/* tag data */
 	int c;
 
 	while ((c = getopt(argc, argv, "D:ehi")) != -1) {
-		switch(c) {
-			case 'i':
-			    set_iscanner();
-			    break;
-			case 'D':
-			    set_debug(optarg);
-			    break;
-			case 'e':
-			    extended++;
-			    break;
-			case 'h':
-			    fprintf(stderr, "%s [-e] [-i] [ -D area, level ] input-filenames\n",
-				    argv[0]);
-			    exit(0);
-			default:
-			    fprintf(stderr, "invalid argument, %c\n", c);
-			    exit(1);
+		switch (c) {
+		case 'i':
+			set_iscanner();
+			break;
+		case 'D':
+			set_debug(optarg);
+			break;
+		case 'e':
+			extended++;
+			break;
+		case 'h':
+			fprintf(stderr,
+				"%s [-e] [-i] [ -D area, level ] input-filenames\n",
+				argv[0]);
+			exit(0);
+		default:
+			fprintf(stderr, "invalid argument, %c\n", c);
+			exit(1);
 		}
 	}
 
@@ -166,7 +167,7 @@
 	scanner(tags);
 #ifdef DEBUGGING
 	DEBUG(D_INIT, 1)
-	sym_dump_s(tags, 0);
+	    sym_dump_s(tags, 0);
 #endif
 	reporter(tags);
 
diff --git a/pan/reporter.c b/pan/reporter.c
index ee9dad0..d1dee3a 100644
--- a/pan/reporter.c
+++ b/pan/reporter.c
@@ -49,13 +49,13 @@
  *                      Report Generation                               *
  ************************************************************************/
 
-static int scanner_reporter( SYM );
-static int iscanner_reporter( SYM );
-static int scanner_test_end( SYM, SYM, SYM );
-static int iscanner_test_end( SYM, SYM, SYM );
+static int scanner_reporter(SYM);
+static int iscanner_reporter(SYM);
+static int scanner_test_end(SYM, SYM, SYM);
+static int iscanner_test_end(SYM, SYM, SYM);
 
-static int (*reporter_func)( SYM ) = scanner_reporter;
-static int (*test_end_func)( SYM, SYM, SYM ) = scanner_test_end;
+static int (*reporter_func) (SYM) = scanner_reporter;
+static int (*test_end_func) (SYM, SYM, SYM) = scanner_test_end;
 
 /*
  * Do the report generation.
@@ -79,94 +79,93 @@
  *  (4) go thru all tags and report each as described at the beginning of
  *      this file
  */
-static int
-scanner_reporter(tags)
-    SYM tags;
+static int scanner_reporter(tags)
+SYM tags;
 {
-    DBT Key, Data;
-    SYM Tag, Keys;
+	DBT Key, Data;
+	SYM Tag, Keys;
 
-    time_t clock;
-    struct tm *tm;
+	time_t clock;
+	struct tm *tm;
 
-    /* a list of tags, a count of the number of tags allocated to the list,
-       and a pointer to go thru the list */
-    char **taglist, **tl;
-    int ntags;
-    int tagcount;               /* how many tags used */
+	/* a list of tags, a count of the number of tags allocated to the list,
+	   and a pointer to go thru the list */
+	char **taglist, **tl;
+	int ntags;
+	int tagcount;		/* how many tags used */
 
-    char key_get[KEYSIZE];
-    char *info;
+	char key_get[KEYSIZE];
+	char *info;
 
+	/*
+	 * extract tag names from data
+	 */
+	ntags = NTAGS_START;
+	taglist = (char **)malloc(sizeof(char *) * ntags);
+	tagcount = 0;
 
-    /*
-     * extract tag names from data
-     */
-    ntags=NTAGS_START;
-    taglist= (char **)malloc(sizeof(char *) * ntags);
-    tagcount=0;
+	tl = taglist;
+	sym_seq(tags, &Key, &Data, R_FIRST);
+	do {
+		if (tagcount == ntags) {
+			/* exceeded tag array size -- realloc */
+			ntags += NTAGS_START;
+			taglist =
+			    (char **)realloc(taglist, sizeof(char *) * ntags);
+			tl = taglist + tagcount;
+		}
 
-    tl = taglist;
-    sym_seq(tags, &Key, &Data, R_FIRST);
-    do {
-        if (tagcount == ntags) {
-            /* exceeded tag array size -- realloc */
-            ntags += NTAGS_START;
-            taglist= (char **)realloc(taglist, sizeof(char *) * ntags);
-            tl = taglist+tagcount;
-        }
+		*tl++ = Key.data;
+		tagcount++;
+	} while (sym_seq(tags, &Key, &Data, R_NEXT) == 0);
 
-        *tl++ = Key.data;
-        tagcount++;
-    } while (sym_seq(tags, &Key, &Data, R_NEXT)==0);
+	if (tagcount == ntags) {
+		/* exceeded tag array size -- realloc */
+		ntags += NTAGS_START;
+		taglist = (char **)realloc(taglist, sizeof(char *) * ntags);
+		tl = taglist + tagcount;
+	}
 
-    if (tagcount == ntags) {
-        /* exceeded tag array size -- realloc */
-        ntags += NTAGS_START;
-        taglist= (char **)realloc(taglist, sizeof(char *) * ntags);
-        tl = taglist+tagcount;
-    }
+	*tl++ = NULL;
+	ntags = tagcount;
+	/* Retrieve one "stime" to get the date. */
+	for (tl = taglist; *tl != NULL; tl++) {
+		strcpy(key_get, *tl);
+		strcat(key_get, ",_keys,stime");
+		if ((info = (char *)sym_get(tags, key_get)) != NULL) {
+			clock = atoi(info);
+			tm = gmtime(&clock);
+			strftime(key_get, KEYSIZE, "%x", tm);
+			sym_put(tags, strdup("_RTS,date"), strdup(key_get), 0);
+			break;
+		}
+	}
 
-    *tl++ = NULL;
-    ntags = tagcount;
-    /* Retrieve one "stime" to get the date. */
-    for (tl=taglist; *tl != NULL; tl++) {
-        strcpy(key_get, *tl);
-        strcat(key_get, ",_keys,stime");
-        if ((info = (char *)sym_get(tags, key_get)) != NULL) {
-            clock = atoi(info);
-            tm = gmtime(&clock);
-            strftime(key_get, KEYSIZE, "%x", tm);
-            sym_put(tags, strdup("_RTS,date"), strdup(key_get), 0);
-            break;
-        }
-    }
+	print_header(tags);
 
-    print_header(tags);
+	/*
+	 * The way that I am using 'Keys' and 'Tag' makes assumptions about the
+	 * internals of the sym_* data structure.
+	 */
+	/* dump 'em all */
+	for (tl = taglist; *tl != NULL; tl++) {
+		if (!strcmp(*tl, "_RTS"))
+			continue;
 
-    /*
-     * The way that I am using 'Keys' and 'Tag' makes assumptions about the
-     * internals of the sym_* data structure.
-     */
-    /* dump 'em all */
-    for (tl=taglist; *tl != NULL; tl++) {
-        if (!strcmp(*tl, "_RTS"))
-            continue;
+		strcpy(key_get, *tl);
+		strcat(key_get, ",_keys");
+		if ((Keys = sym_get(tags, key_get)) == NULL) {
+			return 0;
+		}
 
-        strcpy(key_get, *tl);
-        strcat(key_get, ",_keys");
-        if ((Keys = sym_get(tags, key_get)) == NULL) {
-            return 0;
-        }
+		strcpy(key_get, *tl);
+		if ((Tag = sym_get(tags, key_get)) != NULL) {
+			tag_report(NULL, Tag, Keys);
+		}
+	}
+	free(taglist);
 
-        strcpy(key_get, *tl);
-        if ((Tag = sym_get(tags, key_get)) != NULL) {
-            tag_report(NULL, Tag, Keys);
-        }
-    }
-    free(taglist);
-
-    return 0;
+	return 0;
 }
 
 /*
@@ -180,100 +179,96 @@
  * under another key tree with almost zero brainwork because a SYM
  * is what the DATA area points to.
  */
-static int
-scanner_test_end(alltags, ctag, keys)
-    SYM alltags, ctag, keys;
+static int scanner_test_end(alltags, ctag, keys)
+SYM alltags, ctag, keys;
 {
-    static int notag=0;         /* counter for records with no tag (error) */
-    char tagname[KEYSIZE];      /* used when creating name (see above) */
-    char *tag;                  /* tag name to look things up in */
-    char *status;               /* initiation status of old tag */
-    SYM rm;                     /* pointer to old tag -- to remove it */
+	static int notag = 0;	/* counter for records with no tag (error) */
+	char tagname[KEYSIZE];	/* used when creating name (see above) */
+	char *tag;		/* tag name to look things up in */
+	char *status;		/* initiation status of old tag */
+	SYM rm;			/* pointer to old tag -- to remove it */
 
+	if (alltags == NULL || keys == NULL || ctag == NULL)
+		return -1;	/* for really messed up test output */
 
-    if (alltags == NULL || keys == NULL || ctag == NULL)
-        return -1;                       /* for really messed up test output */
+	/* insert keys into tag */
+	sym_put(ctag, "_keys", (void *)keys, 0);
 
-    /* insert keys into tag */
-    sym_put(ctag, "_keys", (void *)keys, 0);
+	/* get the tag, or build a new one */
+	if ((tag = (char *)sym_get(keys, "tag")) == NULL) {
+		/* this is an "impossible" situation: test_output checks for this
+		 * and creates a dummy tag. */
+		sprintf(tagname, "no_tag_%d", notag++);
+		fprintf(stderr, "No TAG key!  Using %s\n", tagname);
+		sym_put(keys, "tag", strdup(tagname), 0);
+		tag = strdup(tagname);
+	}
 
-    /* get the tag, or build a new one */
-    if ((tag=(char *)sym_get(keys, "tag")) == NULL) {
-        /* this is an "impossible" situation: test_output checks for this
-         * and creates a dummy tag. */
-        sprintf(tagname, "no_tag_%d", notag++);
-        fprintf(stderr, "No TAG key!  Using %s\n", tagname);
-        sym_put(keys, "tag", strdup(tagname), 0);
-        tag=strdup(tagname);
-    }
+	/*
+	 * Special case: duplicate tag that has an initiation_status failure
+	 * is thrown away.
+	 */
+	if ((rm = (SYM) sym_get(alltags, tag)) != NULL) {
+		if ((status =
+		     (char *)sym_get(keys, "initiation_status")) != NULL) {
+			if (strcmp(status, "ok")) {
+				/* do not take new data.  remove new data */
+				sym_rm(ctag, RM_KEY | RM_DATA);
+				return 1;
+			} else {
+				/* remove old data in alltags */
+				sym_rm(rm, RM_KEY | RM_DATA);
+			}
+		} else {
+			/* new data does not have an initiation_status -- throw it away */
+			sym_rm(ctag, RM_KEY | RM_DATA);
+			return 1;
+		}
+	}
 
-    /*
-     * Special case: duplicate tag that has an initiation_status failure
-     * is thrown away.
-     */
-    if ((rm=(SYM)sym_get(alltags, tag)) != NULL) {
-        if ((status=(char *)sym_get(keys, "initiation_status")) != NULL) {
-            if (strcmp(status, "ok")) {
-                /* do not take new data.  remove new data */
-                sym_rm(ctag, RM_KEY | RM_DATA);
-                return 1;
-            } else {
-                /* remove old data in alltags */
-                sym_rm(rm, RM_KEY | RM_DATA);
-            }
-        } else {
-            /* new data does not have an initiation_status -- throw it away */
-            sym_rm(ctag, RM_KEY | RM_DATA);
-            return 1;
-        }
-    }
+	/* put new data.. replaces existing "tag" key if it exists
+	 * (it's data should have been removed above) */
+	sym_put(alltags, tag, ctag, PUT_REPLACE);
 
-    /* put new data.. replaces existing "tag" key if it exists
-     * (it's data should have been removed above) */
-    sym_put(alltags, tag, ctag, PUT_REPLACE);
-
-    return 0;
+	return 0;
 }
 
-static int
-iscanner_reporter(tags)
-    SYM tags;
+static int iscanner_reporter(tags)
+SYM tags;
 {
-  return 0;
+	return 0;
 }
 
-static int
-iscanner_test_end(alltags, ctag, keys)
-    SYM alltags, ctag, keys;
+static int iscanner_test_end(alltags, ctag, keys)
+SYM alltags, ctag, keys;
 {
-    if (alltags == NULL || keys == NULL || ctag == NULL)
-        return -1;                       /* for really messed up test output */
+	if (alltags == NULL || keys == NULL || ctag == NULL)
+		return -1;	/* for really messed up test output */
 
-    /* insert keys into tag */
-    sym_put(ctag, "_keys", (void *)keys, 0);
+	/* insert keys into tag */
+	sym_put(ctag, "_keys", (void *)keys, 0);
 
-
-    return tag_report(alltags, ctag, keys);
+	return tag_report(alltags, ctag, keys);
 }
 
-int reporter( SYM s )
+int reporter(SYM s)
 {
-  return reporter_func( s );
+	return reporter_func(s);
 }
 
-int test_end( SYM a, SYM b, SYM c )
+int test_end(SYM a, SYM b, SYM c)
 {
-  return test_end_func( a, b, c );
+	return test_end_func(a, b, c);
 }
 
 void set_scanner(void)
 {
-  reporter_func = scanner_reporter;
-  test_end_func = scanner_test_end;
+	reporter_func = scanner_reporter;
+	test_end_func = scanner_test_end;
 }
 
 void set_iscanner(void)
 {
-  reporter_func = iscanner_reporter;
-  test_end_func = iscanner_test_end;
+	reporter_func = iscanner_reporter;
+	test_end_func = iscanner_test_end;
 }
diff --git a/pan/splitstr.c b/pan/splitstr.c
index 864a262..4706323 100644
--- a/pan/splitstr.c
+++ b/pan/splitstr.c
@@ -52,96 +52,88 @@
  */
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>        /* for string functions */
+#include <string.h>		/* for string functions */
 #ifdef UNIT_TEST
 #include <assert.h>
 #endif /* UNIT_TEST */
 #include "splitstr.h"
 
-const char **
-splitstr(const char *str, const char *separator, int *argcount)
+const char **splitstr(const char *str, const char *separator, int *argcount)
 {
-    char *arg_string =NULL,
-         **arg_array =NULL,
-         *cur_tok    =NULL;
+	char *arg_string = NULL, **arg_array = NULL, *cur_tok = NULL;
 
-    int  num_toks    =0,
-         max_toks    =20,
-         i;
+	int num_toks = 0, max_toks = 20, i;
 
-    /*
-     * In most recoverable errors, if argcount is not NULL,
-     * set argcount to 0. Then return NULL.
-     */
-    if (str == NULL)
-    {
-      if (argcount != NULL)
-        *argcount = 0;
-      return(NULL);
-    }
+	/*
+	 * In most recoverable errors, if argcount is not NULL,
+	 * set argcount to 0. Then return NULL.
+	 */
+	if (str == NULL) {
+		if (argcount != NULL)
+			*argcount = 0;
+		return (NULL);
+	}
 
-    /*
-     * set aside temporary space to work on the string.
-     */
-    arg_string = strdup( str );
+	/*
+	 * set aside temporary space to work on the string.
+	 */
+	arg_string = strdup(str);
 
-    if (arg_string == NULL)
-    {
-      if (argcount != NULL)
-        *argcount = 0;
-      return(NULL);
-    }
+	if (arg_string == NULL) {
+		if (argcount != NULL)
+			*argcount = 0;
+		return (NULL);
+	}
 
-    /*
-     * set aside an initial char ** array for string array.
-     */
-    arg_array = (char **)malloc( sizeof(char *) * max_toks );
+	/*
+	 * set aside an initial char ** array for string array.
+	 */
+	arg_array = (char **)malloc(sizeof(char *) * max_toks);
 
-    if (arg_array == NULL)
-    {
-      if (argcount != NULL)
-        *argcount = 0;
-      return(NULL);
-    }
+	if (arg_array == NULL) {
+		if (argcount != NULL)
+			*argcount = 0;
+		return (NULL);
+	}
 
-    if (separator==NULL)
-      separator = " \t";
+	if (separator == NULL)
+		separator = " \t";
 
-    /*
-     * Use strtok() to parse 'arg_string', placing pointers to the
-     * individual tokens into the elements of 'arg_array'.  Expand
-     * 'arg_array' if necessary.
-     */
-    cur_tok = strtok(arg_string, separator);
-    while (cur_tok != NULL)
-    {
-      arg_array[num_toks++] = cur_tok;
-      cur_tok = strtok(NULL, separator);
-      if (num_toks == max_toks)
-      {
-        max_toks += 20;
-        arg_array = (char **)realloc((void *)arg_array, sizeof(char *)*max_toks );
-      }
-    }
-    arg_array[num_toks] = NULL;
+	/*
+	 * Use strtok() to parse 'arg_string', placing pointers to the
+	 * individual tokens into the elements of 'arg_array'.  Expand
+	 * 'arg_array' if necessary.
+	 */
+	cur_tok = strtok(arg_string, separator);
+	while (cur_tok != NULL) {
+		arg_array[num_toks++] = cur_tok;
+		cur_tok = strtok(NULL, separator);
+		if (num_toks == max_toks) {
+			max_toks += 20;
+			arg_array =
+			    (char **)realloc((void *)arg_array,
+					     sizeof(char *) * max_toks);
+		}
+	}
+	arg_array[num_toks] = NULL;
 
-    /*
-     * If there are any spaces left in our array, make them NULL
-     */
-    for (i=num_toks+1;i<max_toks;i++)
-      arg_array[i] = NULL;
+	/*
+	 * If there are any spaces left in our array, make them NULL
+	 */
+	for (i = num_toks + 1; i < max_toks; i++)
+		arg_array[i] = NULL;
 
-    /* This seems nice, but since memory is allocated on a page basis, this
-     * isn't really helpful:
-     * arg_array = (char **)realloc((void *)arg_array, sizeof(char *)*num_toks+1 );*/
+	/* This seems nice, but since memory is allocated on a page basis, this
+	 * isn't really helpful:
+	 * arg_array = (char **)realloc((void *)arg_array, sizeof(char *)*num_toks+1 );*/
 
-    if (argcount != NULL)
-      *argcount = num_toks;
+	if (argcount != NULL)
+		*argcount = num_toks;
 
-    /*
-     * Return the argument array.
-     */
-    return((const char **)arg_array);
+	/*
+	 * Return the argument array.
+	 */
+	return ((const char **)arg_array);
 }
 
 /*
@@ -152,46 +144,43 @@
  * requires that ret and *ret returned from splitster() have not
  * been modified.
  */
-void splitstr_free( const char **p_return )
+void splitstr_free(const char **p_return)
 {
-  if (*p_return != NULL)
-    free( (char *)*p_return );
-  if (p_return != NULL)
-    free( (char **)p_return );
+	if (*p_return != NULL)
+		free((char *)*p_return);
+	if (p_return != NULL)
+		free((char **)p_return);
 }
 
 #ifdef UNIT_TEST
 
 int main()
 {
-  int i,y,test_size=1000,size_ret;
-  char test_str[32768];
-  char buf[16];
-  char *test_str_array[test_size];
-  const char **ret;
+	int i, y, test_size = 1000, size_ret;
+	char test_str[32768];
+	char buf[16];
+	char *test_str_array[test_size];
+	const char **ret;
 
-  for (i=0;i<test_size;i++)
-  {
-    snprintf(buf,16,"arg%d",i);
-    test_str_array[i] = strdup(buf);
-  }
+	for (i = 0; i < test_size; i++) {
+		snprintf(buf, 16, "arg%d", i);
+		test_str_array[i] = strdup(buf);
+	}
 
-  for (i=0;i<test_size;i++)
-  {
-    test_str[0]='\0';
-    for (y=0;y<i;y++)
-    {
-      snprintf(buf,16,"arg%d ",y);
-      strncat(test_str,buf,16);
-    }
-    ret = splitstr(test_str,NULL,&size_ret);
-    assert(size_ret == i);
-    for (y=0;y<i;y++)
-      assert( strcmp(ret[y],test_str_array[y])==0 );
+	for (i = 0; i < test_size; i++) {
+		test_str[0] = '\0';
+		for (y = 0; y < i; y++) {
+			snprintf(buf, 16, "arg%d ", y);
+			strncat(test_str, buf, 16);
+		}
+		ret = splitstr(test_str, NULL, &size_ret);
+		assert(size_ret == i);
+		for (y = 0; y < i; y++)
+			assert(strcmp(ret[y], test_str_array[y]) == 0);
 
-    splitstr_free(ret);
-  }
-  return 0;
+		splitstr_free(ret);
+	}
+	return 0;
 }
 
 #endif
diff --git a/pan/symbol.c b/pan/symbol.c
index 82872e54..ab056bc 100644
--- a/pan/symbol.c
+++ b/pan/symbol.c
@@ -73,7 +73,7 @@
  * string.
  */
 
-static char *sym_error=NULL;
+static char *sym_error = NULL;
 
 /*
  *	Memory Allocators
@@ -84,79 +84,73 @@
 
 SYM newsym()
 {
-    SYM h;
+	SYM h;
 
-    if ((h=(SYM)malloc(sizeof(struct symh))) == NULL) {
-        sym_error="sym header malloc failed!";
-        return(NULL);
-    }
+	if ((h = (SYM) malloc(sizeof(struct symh))) == NULL) {
+		sym_error = "sym header malloc failed!";
+		return (NULL);
+	}
 
-    h->magic = SYM_MAGIC;
-    h->sym = NULL;
-    h->cursor = NULL;
-    return(h);
+	h->magic = SYM_MAGIC;
+	h->sym = NULL;
+	h->cursor = NULL;
+	return (h);
 }
 
-static struct sym *
-mknode(struct sym *next, char *key, void *data)
+static struct sym *mknode(struct sym *next, char *key, void *data)
 {
-    struct sym *n;
+	struct sym *n;
 
-    if ((n=(struct sym *)malloc(sizeof(struct sym))) == NULL) {
-      sym_error="sym node malloc failed!";
-      return(NULL);
-    }
+	if ((n = (struct sym *)malloc(sizeof(struct sym))) == NULL) {
+		sym_error = "sym node malloc failed!";
+		return (NULL);
+	}
 
-    n->next = next;
-    n->key  = strdup(key);
-    n->data = data;
+	n->next = next;
+	n->key = strdup(key);
+	n->data = data;
 
-    if (n->key == NULL) {
-      sym_error="sym node strdup(key) failed!";
-      return(NULL);
-    }
-    return(n);
+	if (n->key == NULL) {
+		sym_error = "sym node strdup(key) failed!";
+		return (NULL);
+	}
+	return (n);
 }
 
 /*
  * Search for a key in a single-level symbol table hierarchy.
  */
-static struct sym *
-find_key1(struct sym *sym, char *key)
+static struct sym *find_key1(struct sym *sym, char *key)
 {
-    while (sym != NULL)
-      if (strcmp(sym->key, key) == 0)
-        return(sym);
-    else
-      sym=sym->next;
-    return(NULL);
+	while (sym != NULL)
+		if (strcmp(sym->key, key) == 0)
+			return (sym);
+		else
+			sym = sym->next;
+	return (NULL);
 }
 
 /*
  * Create a new key node, add it to the *end* of this list
  */
-static int
-add_key(SYM sym, char *key, void *data)
+static int add_key(SYM sym, char *key, void *data)
 {
-    register struct sym *sn;
+	register struct sym *sn;
 
-    if (sym->sym == NULL)
-    {
-      sym->sym = mknode(NULL, key, data);
-      if (sym->sym == NULL)
-      {
-        return(-1);
-      }
-    }
-    else
-    {
-      for (sn=sym->sym; sn!=NULL && sn->next != NULL; sn=sn->next);
-      sn->next = mknode(NULL, key, data);
-      assert(sn->next != NULL);
-      if (sn->next == NULL)
-        return(-1);
-    }
-    return(0);
+	if (sym->sym == NULL) {
+		sym->sym = mknode(NULL, key, data);
+		if (sym->sym == NULL) {
+			return (-1);
+		}
+	} else {
+		for (sn = sym->sym; sn != NULL && sn->next != NULL;
+		     sn = sn->next) ;
+		sn->next = mknode(NULL, key, data);
+		assert(sn->next != NULL);
+		if (sn->next == NULL)
+			return (-1);
+	}
+	return (0);
 }
 
 /*
@@ -164,10 +158,9 @@
  */
 SYM sym_open(int flags, int mode, int openinfo)
 {
-    return(newsym());
+	return (newsym());
 }
 
-
 /*
  *	Add (key, data) to an existing symbol table
  *
@@ -197,68 +190,67 @@
  * last node gets 'data'.
  *
  */
-int
-sym_put(SYM sym, char *key, void *data, int flags)
+int sym_put(SYM sym, char *key, void *data, int flags)
 {
-    const char **keys;		/* key split into a 2d string array */
-    char **kk;
-    char *nkey;			/* copy of 'key' -- before split */
-    SYM csym, ncsym;		/* search: current symbol table */
-    struct sym *nsym = NULL;	/* search: found symbol entry */
+	const char **keys;	/* key split into a 2d string array */
+	char **kk;
+	char *nkey;		/* copy of 'key' -- before split */
+	SYM csym, ncsym;	/* search: current symbol table */
+	struct sym *nsym = NULL;	/* search: found symbol entry */
 
-    if (sym == NULL)
-      return(EINVAL);
+	if (sym == NULL)
+		return (EINVAL);
 
-    nkey = strdup(key);
-    keys = splitstr(key, ",",NULL);
+	nkey = strdup(key);
+	keys = splitstr(key, ",", NULL);
 
-    if (keys == NULL)
-      return(EINVAL);
+	if (keys == NULL)
+		return (EINVAL);
 
-    for (kk=(char **)keys, csym = sym;
-      *kk != NULL && (nsym=find_key1(csym->sym, *kk)) != NULL;
-      csym=nsym->data) {
+	for (kk = (char **)keys, csym = sym;
+	     *kk != NULL && (nsym = find_key1(csym->sym, *kk)) != NULL;
+	     csym = nsym->data) {
 
-      if (*++kk == NULL)
-        break;
+		if (*++kk == NULL)
+			break;
 
-	if (nsym->data == NULL) { /* fatal error */
-	    free(nkey);
-	    splitstr_free(keys);
-	    return(ENOTDIR);
+		if (nsym->data == NULL) {	/* fatal error */
+			free(nkey);
+			splitstr_free(keys);
+			return (ENOTDIR);
+		}
+		if (((SYM) (nsym->data))->magic != SYM_MAGIC) {
+			free(nkey);
+			splitstr_free(keys);
+			return (ENOTDIR);
+		}
 	}
-	if (((SYM) (nsym->data))->magic != SYM_MAGIC) {
-	    free(nkey);
-	    splitstr_free(keys);
-	    return(ENOTDIR);
-	}
-    }
 
-    if (*kk == NULL) {		/* found a complete match */
+	if (*kk == NULL) {	/* found a complete match */
+		free(nkey);
+		splitstr_free(keys);
+
+		if (flags == PUT_REPLACE) {
+			nsym->data = data;
+			return (0);
+		} else {
+			return (EEXIST);
+		}
+	}
+
+	/* csym is a ptr to a list */
+	for (; *kk != NULL; kk++) {
+		if (*(kk + 1) != NULL) {
+			add_key(csym, *kk, (void *)(ncsym = newsym()));
+			csym = ncsym;
+		} else {
+			add_key(csym, *kk, data);	/* last key */
+		}
+	}
+
 	free(nkey);
 	splitstr_free(keys);
-
-	if (flags == PUT_REPLACE) {
-	    nsym->data = data;
-	    return(0);
-	} else {
-	    return(EEXIST);
-	}
-    }
-
-    /* csym is a ptr to a list */
-    for (;*kk != NULL; kk++) {
-	if (*(kk+1) != NULL) {
-	    add_key(csym, *kk, (void *)(ncsym=newsym()));
-	    csym = ncsym;
-	} else {
-	    add_key(csym, *kk, data);	/* last key */
-	}
-    }
-
-    free(nkey);
-    splitstr_free(keys);
-    return(0);
+	return (0);
 }
 
 /*
@@ -267,50 +259,50 @@
  *  "key" is not modified.
  *  If the key cannot be found, NULL is returned
  */
-void * sym_get(SYM sym, char *key)
+void *sym_get(SYM sym, char *key)
 {
-    char *nkey;
-    const char **keys;		/* key split into a 2d string array */
-    char **kk;
-    SYM csym;			/* search: current symbol table */
-    struct sym *nsym = NULL;	/* search: found symbol entry */
+	char *nkey;
+	const char **keys;	/* key split into a 2d string array */
+	char **kk;
+	SYM csym;		/* search: current symbol table */
+	struct sym *nsym = NULL;	/* search: found symbol entry */
 
-    if (sym == NULL)
-	return(NULL);
+	if (sym == NULL)
+		return (NULL);
 
-    nkey=strdup(key);
-    keys = splitstr(nkey, ",", NULL);
-    if (keys == NULL)
-	return(NULL);
+	nkey = strdup(key);
+	keys = splitstr(nkey, ",", NULL);
+	if (keys == NULL)
+		return (NULL);
 
-    for (kk=(char **)keys, csym = sym;
-	*kk != NULL && (nsym=find_key1(csym->sym, *kk)) != NULL;
-	csym=nsym->data) {
+	for (kk = (char **)keys, csym = sym;
+	     *kk != NULL && (nsym = find_key1(csym->sym, *kk)) != NULL;
+	     csym = nsym->data) {
 
-	if (*++kk == NULL)
-	    break;
+		if (*++kk == NULL)
+			break;
 
-	if (nsym->data == NULL) { /* fatal error */
-	    free(nkey);
-	    splitstr_free(keys);
-	    return(NULL);
+		if (nsym->data == NULL) {	/* fatal error */
+			free(nkey);
+			splitstr_free(keys);
+			return (NULL);
+		}
+		if (((SYM) (nsym->data))->magic != SYM_MAGIC) {
+			free(nkey);
+			splitstr_free(keys);
+			return (NULL);
+		}
 	}
-	if (((SYM)(nsym->data))->magic != SYM_MAGIC) {
-	    free(nkey);
-	    splitstr_free(keys);
-	    return(NULL);
-	}
-    }
 
-    if (*kk == NULL) {		/* found a complete match */
-	splitstr_free(keys);
-	free(nkey);
-	return(nsym->data);
-    } else {
-	splitstr_free(keys);
-	free(nkey);
-	return(NULL);
-    }
+	if (*kk == NULL) {	/* found a complete match */
+		splitstr_free(keys);
+		free(nkey);
+		return (nsym->data);
+	} else {
+		splitstr_free(keys);
+		free(nkey);
+		return (NULL);
+	}
 }
 
 /*
@@ -319,63 +311,62 @@
  *  The cursor must be set by R_CURSOR, R_FIRST before using R_NEXT.
  *  NULL is returned when no more items are available.
  */
-int
-    sym_seq(SYM sym, DBT *key, DBT *data, int flags)
+int sym_seq(SYM sym, DBT * key, DBT * data, int flags)
 {
-    SYM csym;
+	SYM csym;
 
-    switch(flags) {
-	/*
-	 * A number of ways to do this:
-	 * specificly: sym_seq( .., "key,key") sets to Nth element of the 2nd
-	 *  level symbol table
-	 * sym_seq(.., "key,key,") sets to the first element of the 3rd
-	 *  level symbol table
-	 *
-	 * sym_seq(.., "key,key") where both must be complete keys, sets
-	 *  cursor to the first element of the 3rd level symbol table;
-	 *  if there is no 3rd level, return an error.
-	 */
-    case R_CURSOR:
-	csym = (SYM) sym_get(sym, (char *)key->data);
-	if (csym == NULL || csym->magic != SYM_MAGIC) {
-	    return(2);
+	switch (flags) {
+		/*
+		 * A number of ways to do this:
+		 * specificly: sym_seq( .., "key,key") sets to Nth element of the 2nd
+		 *  level symbol table
+		 * sym_seq(.., "key,key,") sets to the first element of the 3rd
+		 *  level symbol table
+		 *
+		 * sym_seq(.., "key,key") where both must be complete keys, sets
+		 *  cursor to the first element of the 3rd level symbol table;
+		 *  if there is no 3rd level, return an error.
+		 */
+	case R_CURSOR:
+		csym = (SYM) sym_get(sym, (char *)key->data);
+		if (csym == NULL || csym->magic != SYM_MAGIC) {
+			return (2);
+		}
+		sym->cursor = csym->sym;
+		if (sym->cursor == NULL)
+			return (1);
+		key->data = sym->cursor->key;
+		data->data = sym->cursor->data;
+
+		return (0);
+
+	case R_FIRST:
+		sym->cursor = sym->sym;
+		if (sym->cursor == NULL)
+			return (1);
+		key->data = sym->cursor->key;
+		data->data = sym->cursor->data;
+
+		return (0);
+
+	case R_NEXT:
+		if (sym->cursor == NULL)
+			return (1);
+		sym->cursor = sym->cursor->next;
+
+		if (sym->cursor == NULL)
+			return (1);
+
+		key->data = sym->cursor->key;
+		data->data = sym->cursor->data;
+
+		return (0);
+
+	case R_LAST:
+	case R_PREV:
+	default:
+		return (-1);
 	}
-	sym->cursor = csym->sym;
-	if (sym->cursor == NULL)
-	    return(1);
-	key->data = sym->cursor->key;
-	data->data = sym->cursor->data;
-
-	return(0);
-
-    case R_FIRST:
-	sym->cursor = sym->sym;
-	if (sym->cursor == NULL)
-	    return(1);
-	key->data = sym->cursor->key;
-	data->data = sym->cursor->data;
-
-	return(0);
-
-    case R_NEXT:
-	if (sym->cursor == NULL)
-	    return(1);
-	sym->cursor = sym->cursor->next;
-
-	if (sym->cursor == NULL)
-	    return(1);
-
-	key->data = sym->cursor->key;
-	data->data = sym->cursor->data;
-
-	return(0);
-
-    case R_LAST:
-    case R_PREV:
-    default:
-	return(-1);
-    }
 }
 
 /*
@@ -383,90 +374,91 @@
  *	Handles hierarchies, using a double quote to indicate depth, one
  *	double quote for each level.
  */
-int
-sym_dump(SYM sym, int depth)
+int sym_dump(SYM sym, int depth)
 {
 
-    register struct sym *se;	/* symbol entry */
-    register int d;
+	register struct sym *se;	/* symbol entry */
+	register int d;
 
-    if (sym == NULL || sym->magic != SYM_MAGIC)
-	return -1;
+	if (sym == NULL || sym->magic != SYM_MAGIC)
+		return -1;
 
-    for (se=sym->sym;se != NULL;se=se->next) {
-	for (d=0;d < depth; d++) {
-	    putchar('"');	putchar(' ');
+	for (se = sym->sym; se != NULL; se = se->next) {
+		for (d = 0; d < depth; d++) {
+			putchar('"');
+			putchar(' ');
+		}
+		printf("%s\n", se->key);
+		sym_dump((SYM) se->data, depth + 1);
 	}
-	printf("%s\n", se->key);
-	sym_dump((SYM)se->data, depth+1);
-    }
-    return 0;
+	return 0;
 }
 
 /*
  * sym dump, but data is _always_ a string (print it)
  */
-int
-sym_dump_s(SYM sym, int depth)
+int sym_dump_s(SYM sym, int depth)
 {
 
-    register struct sym *se;	/* symbol entry */
-    register int d;
+	register struct sym *se;	/* symbol entry */
+	register int d;
 
-    if (sym == NULL)
+	if (sym == NULL)
+		return 0;
+
+	if (sym->magic != SYM_MAGIC) {
+		for (d = 0; d < depth; d++) {
+			putchar('"');
+			putchar(' ');
+		}
+		printf(" = %s\n", (char *)sym);
+		return 0;
+	}
+
+	for (se = sym->sym; se != NULL; se = se->next) {
+		for (d = 0; d < depth; d++) {
+			putchar('"');
+			putchar(' ');
+		}
+		printf("%s", se->key);
+		if (((SYM) se->data)->magic == SYM_MAGIC) {
+			putchar('\n');
+			sym_dump_s((SYM) se->data, depth + 1);
+		} else {
+			printf("(%p) = %s (%p)\n", se->key, (char *)se->data,
+			       se->data);
+		}
+	}
 	return 0;
-
-    if (sym->magic != SYM_MAGIC) {
-	for (d=0;d < depth; d++) {
-	    putchar('"');	putchar(' ');
-	}
-	printf(" = %s\n", (char *)sym);
-	return 0;
-    }
-
-    for (se=sym->sym;se != NULL;se=se->next) {
-	for (d=0;d < depth; d++) {
-	    putchar('"');	putchar(' ');
-	}
-	printf("%s", se->key);
-	if (((SYM)se->data)->magic == SYM_MAGIC) {
-	    putchar('\n');
-	    sym_dump_s((SYM)se->data, depth+1);
-	} else {
-	    printf("(%p) = %s (%p)\n", se->key, (char *)se->data, se->data);
-	}
-    }
-    return 0;
 }
 
 /*
  *	Remove an entire symbol table (done bottom up)
  */
-int
-sym_rm(SYM sym, int flags)
+int sym_rm(SYM sym, int flags)
 {
-    register struct sym *se, *nse;	/* symbol entry */
+	register struct sym *se, *nse;	/* symbol entry */
 
-    if (sym == NULL)
+	if (sym == NULL)
+		return 0;
+
+	if (sym->magic != SYM_MAGIC) {
+		if (!(flags & RM_DATA))
+			free(sym);
+		return 0;
+	}
+
+	for (se = sym->sym; se != NULL;) {
+		sym_rm((SYM) se->data, flags);
+		nse = se->next;
+		if (flags & RM_KEY)
+			free(se->key);
+		if (flags & RM_DATA)
+			free(se->data);
+		free(se);
+		se = nse;
+	}
+	if (!(flags & RM_DATA))
+		free(sym);
 	return 0;
-
-    if (sym->magic != SYM_MAGIC) {
-	if (!(flags&RM_DATA))
-	    free(sym);
-	return 0;
-    }
-
-    for (se=sym->sym;se != NULL;) {
-	sym_rm((SYM)se->data, flags);
-	nse=se->next;
-	if (flags & RM_KEY)
-	    free(se->key);
-	if (flags & RM_DATA)
-	    free(se->data);
-	free(se);
-	se=nse;
-    }
-    if (!(flags&RM_DATA))
-	free(sym);
-    return 0;
 }
diff --git a/pan/tag_report.c b/pan/tag_report.c
index c4517b7..473bed1 100644
--- a/pan/tag_report.c
+++ b/pan/tag_report.c
@@ -36,7 +36,7 @@
 #include "reporter.h"
 #include "splitstr.h"
 
-static char * worst_case(char *, char *);
+static char *worst_case(char *, char *);
 
 /************************************************************************
  *			Report Generation				*
@@ -52,52 +52,50 @@
  *  This is the central results reporting function.  All standard report
  *  format results are printed thru test_result.
  */
-int
-test_result(tag, tcid, tc, result, tags)
-    char *tag, *tcid, *tc;
-    char *result;
-    SYM tags;
+int test_result(tag, tcid, tc, result, tags)
+char *tag, *tcid, *tc;
+char *result;
+SYM tags;
 {
-    char *expert, expkey[KEYSIZE];
-    register char *c;
-    char **cont;
-    const char **cont_save;
+	char *expert, expkey[KEYSIZE];
+	register char *c;
+	char **cont;
+	const char **cont_save;
 
-    if (tcid == NULL)
-	tcid = "-";
-    if (tc == NULL)
-	tc = "-";
-    if (tag == NULL)
-	tag = "test_result: no tag";
-    if (result == NULL)
-	result = "(RESULT IS NULL)";
+	if (tcid == NULL)
+		tcid = "-";
+	if (tc == NULL)
+		tc = "-";
+	if (tag == NULL)
+		tag = "test_result: no tag";
+	if (result == NULL)
+		result = "(RESULT IS NULL)";
 
-    strcpy(expkey, "contacts");
-    /* note: the sym_get here does _not_ change the "cursor" */
-    if ((expert = (char *)sym_get(tags, expkey)) == NULL) {
-	expert = "UNKNOWN";
-    }
-
-    /* ' tr " " "_" ' */
-    for (c = result; *c; c++) {
-	if (*c == ' ') {
-	    *c = '_';
+	strcpy(expkey, "contacts");
+	/* note: the sym_get here does _not_ change the "cursor" */
+	if ((expert = (char *)sym_get(tags, expkey)) == NULL) {
+		expert = "UNKNOWN";
 	}
-    }
-    if (*result == '\0')
-	result = "?";
 
-    /* split contacts on "," and print out a line for each */
-    cont_save = splitstr(expert, ",", NULL);
-    for (cont=(char **)cont_save;*cont != NULL; cont++) {
-	    printf(FORMAT, tag, tcid, tc, result, *cont);
-    }
-    splitstr_free(cont_save);
+	/* ' tr " " "_" ' */
+	for (c = result; *c; c++) {
+		if (*c == ' ') {
+			*c = '_';
+		}
+	}
+	if (*result == '\0')
+		result = "?";
 
-    return 0;
+	/* split contacts on "," and print out a line for each */
+	cont_save = splitstr(expert, ",", NULL);
+	for (cont = (char **)cont_save; *cont != NULL; cont++) {
+		printf(FORMAT, tag, tcid, tc, result, *cont);
+	}
+	splitstr_free(cont_save);
+
+	return 0;
 }
 
-
 /*
  * CUTS test reporting.
  *
@@ -111,98 +109,100 @@
  *	report an error if they don't match.
  */
 
-int
-cuts_report(tags, keys, at, tag )
-    SYM tags, keys; char *at, *tag;
+int cuts_report(tags, keys, at, tag)
+SYM tags, keys;
+char *at, *tag;
 {
-    DBT Key, Data;
+	DBT Key, Data;
 
-    /* analysis type: count of CUTS test cases */
-    const char **ant;
-    char *dat;		/* strdup(at) */
-    int tccount;	/* expected count of testcases */
-    int tcnum;		/* seen count of testcases */
+	/* analysis type: count of CUTS test cases */
+	const char **ant;
+	char *dat;		/* strdup(at) */
+	int tccount;		/* expected count of testcases */
+	int tcnum;		/* seen count of testcases */
 
-    /* a list of tcids */
-    char **taglist, **tl;
-    int ntags, tagcount;
+	/* a list of tcids */
+	char **taglist, **tl;
+	int ntags, tagcount;
 
-    char key_get[255];
+	char key_get[255];
 
-    char *result = "", *worst_case();		/* overall result */
+	char *result = "", *worst_case();	/* overall result */
 
-    /* parse analysis type: cuts:tc-count */
-    ant = splitstr((dat=strdup(at)), ":",NULL);
-    if (ant[1] != NULL)
-	tccount=atoi(ant[1]);
-    else
-	tccount=0;
-    free(dat);
-    splitstr_free(ant);
+	/* parse analysis type: cuts:tc-count */
+	ant = splitstr((dat = strdup(at)), ":", NULL);
+	if (ant[1] != NULL)
+		tccount = atoi(ant[1]);
+	else
+		tccount = 0;
+	free(dat);
+	splitstr_free(ant);
 
-    /* extract tcids */
-    ntags=NTCID_START;
-    taglist= (char **)malloc(sizeof(char *) * ntags);
-    tagcount=0;
+	/* extract tcids */
+	ntags = NTCID_START;
+	taglist = (char **)malloc(sizeof(char *) * ntags);
+	tagcount = 0;
 
-    tl = taglist;
-    sym_seq(tags, &Key, &Data, R_FIRST);
-    do {
+	tl = taglist;
+	sym_seq(tags, &Key, &Data, R_FIRST);
+	do {
+		if (tagcount == ntags) {
+			/* exceeded tag array size -- realloc */
+			ntags += NTCID_START;
+			taglist =
+			    (char **)realloc(taglist, sizeof(char *) * ntags);
+			tl = taglist + tagcount;
+		}
+
+		if (strcmp((char *)Key.data, "_keys") == 0)
+			continue;
+		DEBUG(D_REPORT, 10)
+		    printf("cuts_report: tcid %s\n", (char *)Key.data);
+		*tl++ = Key.data;
+		tagcount++;
+	} while (sym_seq(tags, &Key, &Data, R_NEXT) == 0);
+
 	if (tagcount == ntags) {
-	    /* exceeded tag array size -- realloc */
-	    ntags += NTCID_START;
-	    taglist= (char **)realloc(taglist, sizeof(char *) * ntags);
-	    tl = taglist+tagcount;
+		/* exceeded tag array size -- realloc */
+		ntags++;	/* need just one more */
+		taglist = (char **)realloc(taglist, sizeof(char *) * ntags);
+		tl = taglist + tagcount;
 	}
 
-	if (strcmp((char *)Key.data, "_keys")==0)
-	    continue;
-	DEBUG(D_REPORT, 10)
-	    printf("cuts_report: tcid %s\n", (char *)Key.data);
-	*tl++ = Key.data;
-	tagcount++;
-    } while (sym_seq(tags, &Key, &Data, R_NEXT)==0);
+	*tl++ = NULL;
 
-    if (tagcount == ntags) {
-	/* exceeded tag array size -- realloc */
-	ntags++;	/* need just one more */
-	taglist= (char **)realloc(taglist, sizeof(char *) * ntags);
-	tl = taglist+tagcount;
-    }
+	ntags = tagcount;
 
-    *tl++ = NULL;
+	/* dump all found records */
+	tcnum = 0;
+	for (tl = taglist; *tl != NULL; tl++) {
 
-    ntags = tagcount;
+		strcpy(key_get, *tl);
+		Key.data = (void *)key_get;
 
-    /* dump all found records */
-    tcnum=0;
-    for (tl=taglist; *tl != NULL; tl++) {
+		/*sym_dump_s(sym_get(tags, key_get), 0); */
 
-	strcpy(key_get, *tl);
-	Key.data = (void *) key_get;
+		sym_seq(tags, &Key, &Data, R_CURSOR);
+		do {
+			DEBUG(D_REPORT, 10)
+			    printf("cuts_report: tc %s = %s\n",
+				   (char *)Key.data, (char *)Data.data);
+			result = worst_case(result, (char *)Data.data);
+			test_result(tag, *tl, (char *)Key.data,
+				    (char *)Data.data, keys);
+			if (atoi((char *)Key.data))
+				tcnum++;
+		} while (sym_seq(tags, &Key, &Data, R_NEXT) == 0);
+	}
 
-	/*sym_dump_s(sym_get(tags, key_get), 0);*/
+	test_result(tag, "*", "*", result, keys);
 
-	sym_seq(tags, &Key, &Data, R_CURSOR);
-	do {
-	    DEBUG(D_REPORT, 10)
-		printf("cuts_report: tc %s = %s\n", (char *)Key.data,
-                        (char *)Data.data);
-	    result = worst_case(result, (char *)Data.data);
-	    test_result(tag, *tl, (char *)Key.data, (char *)Data.data, keys);
-	    if (atoi((char *)Key.data))
-		tcnum++;
-	} while (sym_seq(tags, &Key, &Data, R_NEXT)==0);
-    }
+	if (tccount != 0 && tccount != tcnum)
+		test_result(tag, "-", "-", "TC count wrong", keys);
 
-    test_result(tag, "*", "*", result, keys);
+	free(taglist);
 
-    if (tccount != 0 && tccount != tcnum)
-	test_result(tag, "-", "-", "TC count wrong", keys);
-
-    free(taglist);
-
-    return 0;
+	return 0;
 }
 
 /*
@@ -227,189 +227,193 @@
  *  (4) go thru all tags and report each as described at the beginning of
  *      this file
  */
-int
-tag_report(alltags, ctag, keys)
-    SYM alltags, ctag, keys;
+int tag_report(alltags, ctag, keys)
+SYM alltags, ctag, keys;
 {
 
-    extern int extended;
+	extern int extended;
 
-    char key_get[KEYSIZE];
-    char *info;
+	char key_get[KEYSIZE];
+	char *info;
 
-    /* retrieved _keys values: initation status, start time, duration,
-     * termination type, termination id, start line, end line.		*/
-    char *tag, *contact, *is, *mystime, *duration, *tt, *ti, *sl, *el;
+	/* retrieved _keys values: initation status, start time, duration,
+	 * termination type, termination id, start line, end line.          */
+	char *tag, *contact, *is, *mystime, *duration, *tt, *ti, *sl, *el;
 
-    /* Check all driver-level status first */
-    strcpy(key_get, "tag");
-    if ((tag = (char *)sym_get(keys, key_get)) == NULL) {
-	return -1;
-    }
-
-    /* Check all driver-level status first */
-    strcpy(key_get, "initiation_status");
-    if ((is = (char *)sym_get(keys, key_get)) == NULL) {
-	test_result(tag, NULL, NULL, "no init status", keys);
-	return -1;
-    }
-
-    if (strcmp(is, "ok")) {
-	test_result(tag, NULL, NULL, is, keys);
-    } else {
-
-	strcpy(key_get, "corefile");
-	if ((info = (char *)sym_get(keys, key_get)) != NULL)
-	    if (strcmp(info, "no") != 0) {
-		test_result(tag, NULL, NULL, "coredump", keys);
-	    }
-
-	strcpy(key_get, "termination_type");
-	if ((tt = (char *)sym_get(keys, key_get))==NULL) {
-	    test_result(tag, NULL, NULL, "no Term Type", keys);
-	    return -1;
+	/* Check all driver-level status first */
+	strcpy(key_get, "tag");
+	if ((tag = (char *)sym_get(keys, key_get)) == NULL) {
+		return -1;
 	}
 
-	if (strcmp(tt, "exited")) {
-	    test_result(tag, NULL, NULL, tt, keys);
+	/* Check all driver-level status first */
+	strcpy(key_get, "initiation_status");
+	if ((is = (char *)sym_get(keys, key_get)) == NULL) {
+		test_result(tag, NULL, NULL, "no init status", keys);
+		return -1;
 	}
 
-	strcpy(key_get, "analysis");
-	if ((info = (char *)sym_get(keys, key_get)) == NULL) {
-	    test_result(tag, NULL, NULL, "no Analysis Type", keys);
-	    return -1;
+	if (strcmp(is, "ok")) {
+		test_result(tag, NULL, NULL, is, keys);
+	} else {
+
+		strcpy(key_get, "corefile");
+		if ((info = (char *)sym_get(keys, key_get)) != NULL)
+			if (strcmp(info, "no") != 0) {
+				test_result(tag, NULL, NULL, "coredump", keys);
+			}
+
+		strcpy(key_get, "termination_type");
+		if ((tt = (char *)sym_get(keys, key_get)) == NULL) {
+			test_result(tag, NULL, NULL, "no Term Type", keys);
+			return -1;
+		}
+
+		if (strcmp(tt, "exited")) {
+			test_result(tag, NULL, NULL, tt, keys);
+		}
+
+		strcpy(key_get, "analysis");
+		if ((info = (char *)sym_get(keys, key_get)) == NULL) {
+			test_result(tag, NULL, NULL, "no Analysis Type", keys);
+			return -1;
+		}
+
+		/* Getting here indicates that there were no fatal driver-level
+		 * errors.  Do the kind of reporting requested by the test.
+		 */
+
+		if (strncmp(info, "none", 4) == 0) {
+			/*
+			 * If analysis is 'none', alway report the test as
+			 * a pass regardless of output or exit status.
+			 */
+			test_result(tag, NULL, NULL, "pass", keys);
+
+		} else if (strncmp(info, "cuts", 4)) {
+
+			/*
+			 * If analysis is not cuts, assume it is 'exit', thus
+			 * the termination_id is used to determine pass/fail result.
+			 */
+			if (strcmp(tt, "timeout")) {
+				strcpy(key_get, "termination_id");
+				if ((info =
+				     (char *)sym_get(keys, key_get)) == NULL) {
+					test_result(tag, NULL, NULL,
+						    "no_Term_Id", keys);
+				} else {
+					if (strcmp(info, "0")) {
+						test_result(tag, NULL, NULL,
+							    "fail", keys);
+					} else {
+						test_result(tag, NULL, NULL,
+							    "pass", keys);
+					}
+				}
+			}
+		} else {
+			cuts_report(ctag, keys, info, tag);
+		}
 	}
 
-	/* Getting here indicates that there were no fatal driver-level
-	 * errors.  Do the kind of reporting requested by the test.
+	/*
+	 * Extended Format:
+	 *  - tcid+tc = "!"
+	 *  - tab separated fields
+	 *  - no field widths
+	 *  - fields 6 - ~ are:
+	 *  start-time (time_t)
+	 *  duration
+	 *  termination_id
+	 *  termination_type
+	 *  Start Line (of test results in output file)
+	 *  End Line
 	 */
 
-	if (strncmp(info, "none", 4) == 0) {
-            /*
-             * If analysis is 'none', alway report the test as
-             * a pass regardless of output or exit status.
-             */
-	    test_result(tag, NULL, NULL, "pass", keys);
+	if (extended) {
 
-	} else if (strncmp(info, "cuts", 4)) {
-
-            /*
-             * If analysis is not cuts, assume it is 'exit', thus
-             * the termination_id is used to determine pass/fail result.
-             */
-	    if (strcmp(tt, "timeout")) {
-	        strcpy(key_get, "termination_id");
-	        if ((info = (char *)sym_get(keys, key_get)) == NULL) {
-		    test_result(tag, NULL, NULL, "no_Term_Id", keys);
-	        } else {
-		    if (strcmp(info, "0")) {
-		        test_result(tag, NULL, NULL, "fail", keys);
-		    } else {
-		        test_result(tag, NULL, NULL, "pass", keys);
-		    }
+		strcpy(key_get, "termination_id");
+		if ((ti = (char *)sym_get(keys, key_get)) == NULL) {
+			ti = "No_Termination_ID";
 		}
-	    }
-	} else {
-	    cuts_report(ctag, keys, info, tag);
-	}
-    }
 
-    /*
-     * Extended Format:
-     *  - tcid+tc = "!"
-     *  - tab separated fields
-     *  - no field widths
-     *  - fields 6 - ~ are:
-     *	start-time (time_t)
-     *	duration
-     *	termination_id
-     *	termination_type
-     *	Start Line (of test results in output file)
-     *	End Line
-     */
+		strcpy(key_get, "termination_type");
+		if ((tt = (char *)sym_get(keys, key_get)) == NULL) {
+			tt = "No_Termination_Type";
+		}
 
-    if (extended) {
+		strcpy(key_get, "duration");
+		if ((duration = (char *)sym_get(keys, key_get)) == NULL) {
+			duration = "No_Duration";
+		}
 
-	strcpy(key_get, "termination_id");
-	if ((ti = (char *)sym_get(keys, key_get)) == NULL) {
-	    ti = "No_Termination_ID";
+		strcpy(key_get, "_Start_line");
+		if ((sl = (char *)sym_get(keys, key_get)) == NULL) {
+			sl = "No_Start_line";
+		}
+
+		strcpy(key_get, "_End_line");
+		if ((el = (char *)sym_get(keys, key_get)) == NULL) {
+			el = "No_End_line";
+		}
+
+		strcpy(key_get, "contacts");
+		if ((contact = (char *)sym_get(keys, key_get)) == NULL) {
+			contact = "No_Contacts";
+		}
+
+		strcpy(key_get, "stime");
+		if ((mystime = (char *)sym_get(keys, key_get)) == NULL) {
+			mystime = "No_stime";
+		}
+
+		printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n",
+		       tag, "!", "!", is, contact, mystime, duration,
+		       ti, tt, sl, el);
 	}
 
-	strcpy(key_get, "termination_type");
-	if ((tt = (char *)sym_get(keys, key_get)) == NULL) {
-	    tt = "No_Termination_Type";
-	}
-
-	strcpy(key_get, "duration");
-	if ((duration = (char *)sym_get(keys, key_get)) == NULL) {
-	    duration = "No_Duration";
-	}
-
-	strcpy(key_get, "_Start_line");
-	if ((sl = (char *)sym_get(keys, key_get)) == NULL) {
-	    sl = "No_Start_line";
-	}
-
-	strcpy(key_get, "_End_line");
-	if ((el = (char *)sym_get(keys, key_get)) == NULL) {
-	    el = "No_End_line";
-	}
-
-	strcpy(key_get, "contacts");
-	if ((contact = (char *)sym_get(keys, key_get)) == NULL) {
-	    contact = "No_Contacts";
-	}
-
-	strcpy(key_get, "stime");
-	if ((mystime = (char *)sym_get(keys, key_get)) == NULL) {
-	    mystime = "No_stime";
-	}
-
-	printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n",
-	       tag, "!", "!", is, contact, mystime, duration,
-	       ti, tt, sl, el);
-    }
-
-    return 0;
+	return 0;
 }
 
 /*
  *  Print a header made up of the RTS keywords
  *  In "extended" mode, print the header to stderr.
  */
-int
-print_header(tags)
-    SYM tags;
+int print_header(tags)
+SYM tags;
 {
-    DBT Key, Data;
-    char key_get[255];
+	DBT Key, Data;
+	char key_get[255];
 
-    FILE *out;
+	FILE *out;
 
-    extern int extended;
+	extern int extended;
 
-    if (extended)
-	out = stderr;
-    else
-	out = stdout;
+	if (extended)
+		out = stderr;
+	else
+		out = stdout;
 
-    fprintf(out, "System Configuration:\n");
-    /* build header out of RTS keywords */
-    sprintf(key_get, "_RTS");
-    Key.data = (void *) key_get;
-    if (sym_seq(tags, &Key, &Data, R_CURSOR) == 0) {
-	do {
-	    if (strcmp((char *)Key.data, "PATH")==0)
-		continue;
-	    fprintf(out, "%-20.20s %s\n", (char *)Key.data, (char *)Data.data);
-	} while (sym_seq(tags, &Key, &Data, R_NEXT)==0);
-    }
+	fprintf(out, "System Configuration:\n");
+	/* build header out of RTS keywords */
+	sprintf(key_get, "_RTS");
+	Key.data = (void *)key_get;
+	if (sym_seq(tags, &Key, &Data, R_CURSOR) == 0) {
+		do {
+			if (strcmp((char *)Key.data, "PATH") == 0)
+				continue;
+			fprintf(out, "%-20.20s %s\n", (char *)Key.data,
+				(char *)Data.data);
+		} while (sym_seq(tags, &Key, &Data, R_NEXT) == 0);
+	}
 
-    fprintf(out, "\n");
-    fprintf(out, FORMAT, "tag", "tcid", "testcase", "status", "contact");
-    fprintf(out, "-------------------------------------------------------------------------------\n");
+	fprintf(out, "\n");
+	fprintf(out, FORMAT, "tag", "tcid", "testcase", "status", "contact");
+	fprintf(out,
+		"-------------------------------------------------------------------------------\n");
 
-    return 0;
+	return 0;
 }
 
 /*
@@ -418,71 +422,66 @@
  * This is passed s SYM for the current tag and the initiation keys.
  * The text seen by lex is in yytext (global).
  */
-int
-cuts_testcase(tag, keys)
-    SYM tag, keys;
+int cuts_testcase(tag, keys)
+SYM tag, keys;
 {
-    char *cuts_info[5];
-    char key[KEYSIZE];
-    char *oldresult, *newresult, *worst_case();
-    int tok_num=0;
-    extern char yytext[];
+	char *cuts_info[5];
+	char key[KEYSIZE];
+	char *oldresult, *newresult, *worst_case();
+	int tok_num = 0;
+	extern char yytext[];
 
-    cuts_info[tok_num] = strtok(yytext, "\t ");
-    while (tok_num < 5 &&
-	  (cuts_info[++tok_num] = strtok(NULL, "\t ")) != NULL )
-	;
+	cuts_info[tok_num] = strtok(yytext, "\t ");
+	while (tok_num < 5 &&
+	       (cuts_info[++tok_num] = strtok(NULL, "\t ")) != NULL) ;
 
-    strcpy(key, cuts_info[0]);
-    strcat(key, ",");
-    strcat(key, cuts_info[1]);
+	strcpy(key, cuts_info[0]);
+	strcat(key, ",");
+	strcat(key, cuts_info[1]);
 
 #ifdef DEBUGGING
-    DEBUG(D_SCAN_CUTS, 1) {
-	printf("cuts_testcase: TCID=%s TC=%s Result=%s\n", cuts_info[0],
-	       cuts_info[1], cuts_info[2]);
-	printf("cuts_testcase: %d %s\n", tok_num, key);
-  }
+	DEBUG(D_SCAN_CUTS, 1) {
+		printf("cuts_testcase: TCID=%s TC=%s Result=%s\n", cuts_info[0],
+		       cuts_info[1], cuts_info[2]);
+		printf("cuts_testcase: %d %s\n", tok_num, key);
+	}
 #endif
 
-    if ((oldresult=(char *)sym_get(tag, key)) != NULL) {
-	/* Duplicate -- assume mulitple runs */
-	/* keep "worst case" */
-	newresult = worst_case(oldresult, cuts_info[2]);
-	sym_put(tag, key, strdup(newresult), PUT_REPLACE);
-	free(oldresult);	/* remove the "data" portion of the key */
-    } else {
-	sym_put(tag, key, strdup(cuts_info[2]), 0);
-    }
-    return 0;
+	if ((oldresult = (char *)sym_get(tag, key)) != NULL) {
+		/* Duplicate -- assume mulitple runs */
+		/* keep "worst case" */
+		newresult = worst_case(oldresult, cuts_info[2]);
+		sym_put(tag, key, strdup(newresult), PUT_REPLACE);
+		free(oldresult);	/* remove the "data" portion of the key */
+	} else {
+		sym_put(tag, key, strdup(cuts_info[2]), 0);
+	}
+	return 0;
 }
 
 /*
  * Determine a "worst case" status from two given statuses.
  */
-static char *
-worst_case(t1, t2)
-    char *t1, *t2;
+static char *worst_case(t1, t2)
+char *t1, *t2;
 {
-    /* NULL-terminated table, ordered from worst-case to best-case */
-    static char *worst[] = {
-	"FAIL",		"BROK",		"PASS",		"CONF",
-	"WARN",		"INFO",		NULL,
-    };
+	/* NULL-terminated table, ordered from worst-case to best-case */
+	static char *worst[] = {
+		"FAIL", "BROK", "PASS", "CONF",
+		"WARN", "INFO", NULL,
+	};
 
-    char **w1, **w2;
+	char **w1, **w2;
 
-    /* Search the table for each status, then use the index to determine
-       which has a lower precedence */
-    for (w1=worst; *w1 != NULL && strcmp(t1,*w1); w1++)
-	;
+	/* Search the table for each status, then use the index to determine
+	   which has a lower precedence */
+	for (w1 = worst; *w1 != NULL && strcmp(t1, *w1); w1++) ;
 
-    for (w2=worst; *w2 != NULL && strcmp(t2,*w2); w2++)
-	;
+	for (w2 = worst; *w2 != NULL && strcmp(t2, *w2); w2++) ;
 
-    if (w1 < w2)
-	return(t1);
-    else
-	return(t2);
+	if (w1 < w2)
+		return (t1);
+	else
+		return (t2);
 
 }
diff --git a/pan/zoolib.c b/pan/zoolib.c
index f7343e4..568ffff 100644
--- a/pan/zoolib.c
+++ b/pan/zoolib.c
@@ -50,7 +50,7 @@
  */
 
 #include <signal.h>
-#include <stdlib.h> /* for getenv */
+#include <stdlib.h>		/* for getenv */
 #include <string.h>
 #include "zoolib.h"
 
@@ -58,8 +58,8 @@
 
 #ifdef __linux__
 /* glibc2.2 definition needs -D_XOPEN_SOURCE, which breaks other things. */
-extern int sighold (int __sig);
-extern int sigrelse (int __sig);
+extern int sighold(int __sig);
+extern int sigrelse(int __sig);
 #endif
 
 /* zoo_mark(): private function to make an entry to the zoo
@@ -70,406 +70,378 @@
 /* cat_args(): helper function to make cmdline from argc, argv */
 char *cat_args(int argc, char **argv);
 
-
 /* zoo_getname(): create a filename to use for the zoo */
-char *
-zoo_getname()
+char *zoo_getname()
 {
-    char buf[1024];
-    char *zoo;
+	char buf[1024];
+	char *zoo;
 
-    zoo = getenv( "ZOO" );
-    if (zoo) {
-	snprintf(buf, 1024, "%s/%s", zoo, "active");
-	return strdup(buf);
-    } else {
-	/* if there is no environment variable, we don't know where to put it */
-	return NULL;
-    }
+	zoo = getenv("ZOO");
+	if (zoo) {
+		snprintf(buf, 1024, "%s/%s", zoo, "active");
+		return strdup(buf);
+	} else {
+		/* if there is no environment variable, we don't know where to put it */
+		return NULL;
+	}
 }
 
-
 /* zoo_open(): open a zoo for use */
-zoo_t
-zoo_open(char *zooname)
+zoo_t zoo_open(char *zooname)
 {
-    zoo_t new_zoo;
+	zoo_t new_zoo;
 
-    new_zoo = (zoo_t)fopen(zooname, "r+");
-    if (!new_zoo) {
-	if (errno == ENOENT) {
-	    /* file doesn't exist, try fopen(xxx, "a+") */
-	    new_zoo = (zoo_t)fopen(zooname, "a+");
-	    if (!new_zoo) {
-		/* total failure */
-		snprintf(zoo_error, ZELEN,
-				"Could not open zoo as \"%s\", errno:%d %s",
-				zooname, errno, strerror(errno));
-		return 0;
-	    }
-	    fclose(new_zoo);
-	    new_zoo = fopen(zooname, "r+");
-	} else {
-	    snprintf(zoo_error, ZELEN,
-			    "Could not open zoo as \"%s\", errno:%d %s",
-			    zooname, errno, strerror(errno));
+	new_zoo = (zoo_t) fopen(zooname, "r+");
+	if (!new_zoo) {
+		if (errno == ENOENT) {
+			/* file doesn't exist, try fopen(xxx, "a+") */
+			new_zoo = (zoo_t) fopen(zooname, "a+");
+			if (!new_zoo) {
+				/* total failure */
+				snprintf(zoo_error, ZELEN,
+					 "Could not open zoo as \"%s\", errno:%d %s",
+					 zooname, errno, strerror(errno));
+				return 0;
+			}
+			fclose(new_zoo);
+			new_zoo = fopen(zooname, "r+");
+		} else {
+			snprintf(zoo_error, ZELEN,
+				 "Could not open zoo as \"%s\", errno:%d %s",
+				 zooname, errno, strerror(errno));
+		}
 	}
-    }
-    return new_zoo;
+	return new_zoo;
 }
 
-int
-zoo_close(zoo_t z)
+int zoo_close(zoo_t z)
 {
-    int ret;
+	int ret;
 
-    ret = fclose(z);
-    if (ret) {
-	snprintf(zoo_error, ZELEN,
-			"closing zoo caused error, errno:%d %s",
-			errno, strerror(errno));
-    }
-    return ret;
-}
-
-
-static int
-zoo_mark(zoo_t z, char *entry)
-{
-    FILE *fp = (FILE *)z;
-    int found = 0;
-    long pos;
-    char buf[BUFLEN];
-
-    if (fp == NULL)
-	return -1;
-
-    if (zoo_lock(z))
-	return -1;
-
-    /* first fit */
-    rewind(fp);
-
-    do {
-	pos = ftell(fp);
-
-	if (fgets(buf, BUFLEN, fp) == NULL)
-	    break;
-
-	if (buf[0] == '#') {
-	    rewind(fp);
-	    if (fseek(fp, pos, SEEK_SET)) {
-		/* error */
+	ret = fclose(z);
+	if (ret) {
 		snprintf(zoo_error, ZELEN,
-			"seek error while writing to zoo file, errno:%d %s",
-			errno, strerror(errno));
+			 "closing zoo caused error, errno:%d %s",
+			 errno, strerror(errno));
+	}
+	return ret;
+}
+
+static int zoo_mark(zoo_t z, char *entry)
+{
+	FILE *fp = (FILE *) z;
+	int found = 0;
+	long pos;
+	char buf[BUFLEN];
+
+	if (fp == NULL)
 		return -1;
-	    }
-	    /* write the entry, left justified, and padded/truncated to the
-	     * same size as the previous entry */
-	    fprintf(fp, "%-*.*s\n", (int)strlen(buf)-1, (int)strlen(buf)-1, entry);
-	    found = 1;
-	    break;
-	}
-    } while (1);
 
-    if (!found) {
-	if (fseek(fp, 0, SEEK_END)) {
-	    snprintf(zoo_error, ZELEN,
-			    "error seeking to end of zoo file, errno:%d %s",
-			    errno, strerror(errno));
-	    return -1;
-	}
-	fprintf(fp, "%-*.*s\n", 79, 79, entry);
-    }
-    fflush(fp);
-
-    if (zoo_unlock(z))
-	return -1;
-    return 0;
-}
-
-int
-zoo_mark_cmdline(zoo_t z, pid_t p, char *tag, char *cmdline)
-{
-    char new_entry[BUFLEN];
-
-    snprintf(new_entry, 80, "%d,%s,%s", p, tag, cmdline);
-    return zoo_mark(z, new_entry);
-}
-
-int
-zoo_mark_args(zoo_t z, pid_t p, char *tag, int ac, char **av)
-{
-    char *cmdline;
-    int ret;
-
-    cmdline = cat_args(ac, av);
-    ret = zoo_mark_cmdline(z, p, tag, cmdline);
-
-    free(cmdline);
-    return ret;
-}
-
-int
-zoo_clear(zoo_t z, pid_t p)
-{
-    FILE *fp = (FILE *)z;
-    long pos;
-    char buf[BUFLEN];
-    pid_t that_pid;
-    int found = 0;
-
-
-    if (fp == NULL)
-	return -1;
-
-    if (zoo_lock(z))
-	return -1;
-    rewind(fp);
-
-    do {
-	pos = ftell(fp);
-
-	if (fgets(buf, BUFLEN, fp) == NULL)
-	    break;
-
-	if (buf[0] == '#')
-	    continue;
-
-	that_pid = atoi(buf);
-	if (that_pid == p) {
-	    if (fseek(fp, pos, SEEK_SET)) {
-		/* error */
-		snprintf(zoo_error, ZELEN,
-			"seek error while writing to zoo file, errno:%d %s",
-			errno, strerror(errno));
+	if (zoo_lock(z))
 		return -1;
-	    }
-	    if (ftell(fp) != pos) {
-		printf("fseek failed\n");
-	    }
-	    fputs("#", fp);
-	    found = 1;
-	    break;
+
+	/* first fit */
+	rewind(fp);
+
+	do {
+		pos = ftell(fp);
+
+		if (fgets(buf, BUFLEN, fp) == NULL)
+			break;
+
+		if (buf[0] == '#') {
+			rewind(fp);
+			if (fseek(fp, pos, SEEK_SET)) {
+				/* error */
+				snprintf(zoo_error, ZELEN,
+					 "seek error while writing to zoo file, errno:%d %s",
+					 errno, strerror(errno));
+				return -1;
+			}
+			/* write the entry, left justified, and padded/truncated to the
+			 * same size as the previous entry */
+			fprintf(fp, "%-*.*s\n", (int)strlen(buf) - 1,
+				(int)strlen(buf) - 1, entry);
+			found = 1;
+			break;
+		}
+	} while (1);
+
+	if (!found) {
+		if (fseek(fp, 0, SEEK_END)) {
+			snprintf(zoo_error, ZELEN,
+				 "error seeking to end of zoo file, errno:%d %s",
+				 errno, strerror(errno));
+			return -1;
+		}
+		fprintf(fp, "%-*.*s\n", 79, 79, entry);
 	}
-    } while (1);
+	fflush(fp);
 
-    fflush( fp );
+	if (zoo_unlock(z))
+		return -1;
+	return 0;
+}
 
-    /* FIXME: unlock zoo file */
-    if (zoo_unlock(z))
-	return -1;
+int zoo_mark_cmdline(zoo_t z, pid_t p, char *tag, char *cmdline)
+{
+	char new_entry[BUFLEN];
 
-    if (!found) {
-	snprintf(zoo_error, ZELEN,
-			"zoo_clear() did not find pid(%d)",
-			p);
-	return 1;
-    }
-    return 0;
+	snprintf(new_entry, 80, "%d,%s,%s", p, tag, cmdline);
+	return zoo_mark(z, new_entry);
+}
+
+int zoo_mark_args(zoo_t z, pid_t p, char *tag, int ac, char **av)
+{
+	char *cmdline;
+	int ret;
+
+	cmdline = cat_args(ac, av);
+	ret = zoo_mark_cmdline(z, p, tag, cmdline);
+
+	free(cmdline);
+	return ret;
+}
+
+int zoo_clear(zoo_t z, pid_t p)
+{
+	FILE *fp = (FILE *) z;
+	long pos;
+	char buf[BUFLEN];
+	pid_t that_pid;
+	int found = 0;
+
+	if (fp == NULL)
+		return -1;
+
+	if (zoo_lock(z))
+		return -1;
+	rewind(fp);
+
+	do {
+		pos = ftell(fp);
+
+		if (fgets(buf, BUFLEN, fp) == NULL)
+			break;
+
+		if (buf[0] == '#')
+			continue;
+
+		that_pid = atoi(buf);
+		if (that_pid == p) {
+			if (fseek(fp, pos, SEEK_SET)) {
+				/* error */
+				snprintf(zoo_error, ZELEN,
+					 "seek error while writing to zoo file, errno:%d %s",
+					 errno, strerror(errno));
+				return -1;
+			}
+			if (ftell(fp) != pos) {
+				printf("fseek failed\n");
+			}
+			fputs("#", fp);
+			found = 1;
+			break;
+		}
+	} while (1);
+
+	fflush(fp);
+
+	/* FIXME: unlock zoo file */
+	if (zoo_unlock(z))
+		return -1;
+
+	if (!found) {
+		snprintf(zoo_error, ZELEN,
+			 "zoo_clear() did not find pid(%d)", p);
+		return 1;
+	}
+	return 0;
 
 }
 
-pid_t
-zoo_getpid(zoo_t z, char *tag)
+pid_t zoo_getpid(zoo_t z, char *tag)
 {
-    FILE *fp = (FILE *)z;
-    char buf[BUFLEN], *s;
-    pid_t this_pid = -1;
+	FILE *fp = (FILE *) z;
+	char buf[BUFLEN], *s;
+	pid_t this_pid = -1;
 
+	if (fp == NULL)
+		return -1;
 
-    if (fp == NULL)
-	return -1;
+	if (zoo_lock(z))
+		return -1;
 
-    if (zoo_lock(z))
-	return -1;
+	rewind(fp);
+	do {
+		if (fgets(buf, BUFLEN, fp) == NULL)
+			break;
 
-    rewind(fp);
-    do {
-	if (fgets(buf, BUFLEN, fp) == NULL)
-	    break;
+		if (buf[0] == '#')
+			continue;	/* recycled line */
 
-	if (buf[0] == '#')
-	    continue; /* recycled line */
+		if ((s = strchr(buf, ',')) == NULL)
+			continue;	/* line was not expected format */
 
-	if ((s = strchr(buf, ',')) == NULL)
-	    continue; /* line was not expected format */
+		if (strncmp(s + 1, tag, strlen(tag)))
+			continue;	/* tag does not match */
 
-	if (strncmp(s+1, tag, strlen(tag)))
-	    continue; /* tag does not match */
+		this_pid = atoi(buf);
+		break;
+	} while (1);
 
-	this_pid = atoi(buf);
-	break;
-    } while (1);
-
-    if (zoo_unlock(z))
-	return -1;
-    return this_pid;
+	if (zoo_unlock(z))
+		return -1;
+	return this_pid;
 }
 
-int
-zoo_lock(zoo_t z)
+int zoo_lock(zoo_t z)
 {
-    FILE *fp = (FILE *)z;
-    struct flock zlock;
-    sigset_t block_these;
-    int ret;
+	FILE *fp = (FILE *) z;
+	struct flock zlock;
+	sigset_t block_these;
+	int ret;
 
-    if (fp == NULL)
-	return -1;
+	if (fp == NULL)
+		return -1;
 
-    zlock.l_whence = zlock.l_start = zlock.l_len = 0;
-    zlock.l_type = F_WRLCK;
+	zlock.l_whence = zlock.l_start = zlock.l_len = 0;
+	zlock.l_type = F_WRLCK;
 
-    sigemptyset(&block_these);
-    sigaddset(&block_these, SIGINT);
-    sigaddset(&block_these, SIGTERM);
-    sigaddset(&block_these, SIGHUP);
-    sigaddset(&block_these, SIGUSR1);
-    sigaddset(&block_these, SIGUSR2);
-    sigprocmask(SIG_BLOCK, &block_these, NULL);
+	sigemptyset(&block_these);
+	sigaddset(&block_these, SIGINT);
+	sigaddset(&block_these, SIGTERM);
+	sigaddset(&block_these, SIGHUP);
+	sigaddset(&block_these, SIGUSR1);
+	sigaddset(&block_these, SIGUSR2);
+	sigprocmask(SIG_BLOCK, &block_these, NULL);
 
-    do {
-	ret = fcntl(fileno(fp), F_SETLKW, &zlock);
-    } while (ret == -1 && errno == EINTR);
+	do {
+		ret = fcntl(fileno(fp), F_SETLKW, &zlock);
+	} while (ret == -1 && errno == EINTR);
 
-    sigprocmask(SIG_UNBLOCK, &block_these, NULL);
-    if (ret == -1) {
-	snprintf(zoo_error, ZELEN,
-			"failed to unlock zoo file, errno:%d %s",
-			errno, strerror(errno));
-	return -1;
-    }
-    return 0;
+	sigprocmask(SIG_UNBLOCK, &block_these, NULL);
+	if (ret == -1) {
+		snprintf(zoo_error, ZELEN,
+			 "failed to unlock zoo file, errno:%d %s",
+			 errno, strerror(errno));
+		return -1;
+	}
+	return 0;
 
 }
 
-int
-zoo_unlock(zoo_t z)
+int zoo_unlock(zoo_t z)
 {
-    FILE *fp = (FILE *)z;
-    struct flock zlock;
-    sigset_t block_these;
-    int ret;
+	FILE *fp = (FILE *) z;
+	struct flock zlock;
+	sigset_t block_these;
+	int ret;
 
-    if (fp == NULL)
-	return -1;
+	if (fp == NULL)
+		return -1;
 
-    zlock.l_whence = zlock.l_start = zlock.l_len = 0;
-    zlock.l_type = F_UNLCK;
+	zlock.l_whence = zlock.l_start = zlock.l_len = 0;
+	zlock.l_type = F_UNLCK;
 
-    sigemptyset(&block_these);
-    sigaddset(&block_these, SIGINT);
-    sigaddset(&block_these, SIGTERM);
-    sigaddset(&block_these, SIGHUP);
-    sigaddset(&block_these, SIGUSR1);
-    sigaddset(&block_these, SIGUSR2);
-    sigprocmask(SIG_BLOCK, &block_these, NULL);
+	sigemptyset(&block_these);
+	sigaddset(&block_these, SIGINT);
+	sigaddset(&block_these, SIGTERM);
+	sigaddset(&block_these, SIGHUP);
+	sigaddset(&block_these, SIGUSR1);
+	sigaddset(&block_these, SIGUSR2);
+	sigprocmask(SIG_BLOCK, &block_these, NULL);
 
-    do {
-	ret = fcntl(fileno(fp), F_SETLKW, &zlock);
-    } while (ret == -1 && errno == EINTR);
+	do {
+		ret = fcntl(fileno(fp), F_SETLKW, &zlock);
+	} while (ret == -1 && errno == EINTR);
 
-    sigprocmask(SIG_UNBLOCK, &block_these, NULL);
+	sigprocmask(SIG_UNBLOCK, &block_these, NULL);
 
-    if (ret == -1) {
-	snprintf(zoo_error, ZELEN,
-			"failed to lock zoo file, errno:%d %s",
-			errno, strerror(errno));
-	return -1;
-    }
-    return 0;
+	if (ret == -1) {
+		snprintf(zoo_error, ZELEN,
+			 "failed to lock zoo file, errno:%d %s",
+			 errno, strerror(errno));
+		return -1;
+	}
+	return 0;
 }
 
-char *
-cat_args(int argc, char **argv)
+char *cat_args(int argc, char **argv)
 {
-    int a, size;
-    char *cmd;
+	int a, size;
+	char *cmd;
 
-    for (size = a = 0; a < argc; a++) {
-	size += strlen(argv[a]);
-	size++;
-    }
+	for (size = a = 0; a < argc; a++) {
+		size += strlen(argv[a]);
+		size++;
+	}
 
-    if ((cmd = (char *)malloc(size)) == NULL) {
-	snprintf(zoo_error, ZELEN,
-			"Malloc Error, %s/%d",
-			__FILE__, __LINE__);
-	return NULL;
-    }
+	if ((cmd = (char *)malloc(size)) == NULL) {
+		snprintf(zoo_error, ZELEN,
+			 "Malloc Error, %s/%d", __FILE__, __LINE__);
+		return NULL;
+	}
 
-    *cmd='\0';
-    for (a = 0; a < argc ; a++) {
-	if (a != 0)
-	    strcat(cmd, " ");
-	strcat(cmd, argv[a]);
-    }
+	*cmd = '\0';
+	for (a = 0; a < argc; a++) {
+		if (a != 0)
+			strcat(cmd, " ");
+		strcat(cmd, argv[a]);
+	}
 
-    return cmd;
+	return cmd;
 }
 
 #if defined(UNIT_TEST)
 
-
-void
-zt_add(zoo_t z, int n)
+void zt_add(zoo_t z, int n)
 {
-    char cmdline[200];
-    char tag[10];
+	char cmdline[200];
+	char tag[10];
 
-    snprintf(tag, 10, "%s%d", "test", n);
-    snprintf(cmdline, 200, "%s%d %s %s %s", "runtest", n, "one", "two", "three");
+	snprintf(tag, 10, "%s%d", "test", n);
+	snprintf(cmdline, 200, "%s%d %s %s %s", "runtest", n, "one", "two",
+		 "three");
 
-    zoo_mark_cmdline(z, n, tag, cmdline);
+	zoo_mark_cmdline(z, n, tag, cmdline);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 
-    char *zooname;
-    zoo_t test_zoo;
-    char *test_tag = "unittest";
-    int i,j;
+	char *zooname;
+	zoo_t test_zoo;
+	char *test_tag = "unittest";
+	int i, j;
 
+	zooname = zoo_getname();
 
-    zooname = zoo_getname();
+	if (!zooname) {
+		zooname = strdup("test_zoo");
+	}
+	printf("Test zoo filename is %s\n", zooname);
 
-    if (!zooname) {
-	zooname = strdup("test_zoo");
-    }
-    printf("Test zoo filename is %s\n", zooname);
-
-    if ((test_zoo = zoo_open(zooname)) == NULL) {
-	printf("Error opennning zoo\n");
-	exit(-1);
-    }
-
-
-    zoo_mark_args(test_zoo, getpid(), test_tag, argc, argv);
-
-
-    for (j = 0; j < 5; j++) {
-	for (i = 0; i < 20; i++) {
-	    zt_add(test_zoo, i);
+	if ((test_zoo = zoo_open(zooname)) == NULL) {
+		printf("Error opennning zoo\n");
+		exit(-1);
 	}
 
-	for (; i >=0; i--) {
-	    zoo_clear(test_zoo, i);
+	zoo_mark_args(test_zoo, getpid(), test_tag, argc, argv);
+
+	for (j = 0; j < 5; j++) {
+		for (i = 0; i < 20; i++) {
+			zt_add(test_zoo, i);
+		}
+
+		for (; i >= 0; i--) {
+			zoo_clear(test_zoo, i);
+		}
 	}
-    }
 
-    zoo_clear(test_zoo, getpid());
+	zoo_clear(test_zoo, getpid());
 
-
-    return 0;
+	return 0;
 }
 
-
-
-
-
-
 #endif
diff --git a/testcases/commands/ade/ld/f1.c b/testcases/commands/ade/ld/f1.c
index 4b0965f..610fb65 100644
--- a/testcases/commands/ade/ld/f1.c
+++ b/testcases/commands/ade/ld/f1.c
@@ -1,7 +1,7 @@
 
 void f1()
 {
-	int i=69;
-	i=i;
+	int i = 69;
+	i = i;
 	return;
 }
diff --git a/testcases/commands/ade/ld/ldmain.c b/testcases/commands/ade/ld/ldmain.c
index 95bde59..cac106e 100644
--- a/testcases/commands/ade/ld/ldmain.c
+++ b/testcases/commands/ade/ld/ldmain.c
@@ -6,5 +6,5 @@
 int main()
 {
 	use_s1();
-	return(0);
+	return (0);
 }
diff --git a/testcases/commands/ade/ld/rd1.c b/testcases/commands/ade/ld/rd1.c
index 7475e1c..969132f 100644
--- a/testcases/commands/ade/ld/rd1.c
+++ b/testcases/commands/ade/ld/rd1.c
@@ -4,5 +4,5 @@
 
 void use_s1()
 {
-	d1=d1+d1;
+	d1 = d1 + d1;
 }
diff --git a/testcases/commands/ade/ld/rf1.c b/testcases/commands/ade/ld/rf1.c
index f97ea08..35cb94a 100644
--- a/testcases/commands/ade/ld/rf1.c
+++ b/testcases/commands/ade/ld/rf1.c
@@ -3,9 +3,8 @@
 
 extern void f1();
 
-void
-use_s1()
+void use_s1()
 {
-//	printf("calling function f1");
+//      printf("calling function f1");
 	f1();
 }
diff --git a/testcases/commands/ade/ldd/lddfile1.c b/testcases/commands/ade/ldd/lddfile1.c
index 02b0a8f..377f7a3 100644
--- a/testcases/commands/ade/ldd/lddfile1.c
+++ b/testcases/commands/ade/ldd/lddfile1.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
-void file1() {
+void file1()
+{
 	printf("Control in function %s\n", __func__);
 }
diff --git a/testcases/commands/ade/ldd/lddfile2.c b/testcases/commands/ade/ldd/lddfile2.c
index 336033c..5fd2b4b 100644
--- a/testcases/commands/ade/ldd/lddfile2.c
+++ b/testcases/commands/ade/ldd/lddfile2.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
-void file2() {
+void file2()
+{
 	printf("Control in function %s\n", __func__);
 }
diff --git a/testcases/commands/ade/ldd/lddfile3.c b/testcases/commands/ade/ldd/lddfile3.c
index 7732b0f..d6b4cc9 100644
--- a/testcases/commands/ade/ldd/lddfile3.c
+++ b/testcases/commands/ade/ldd/lddfile3.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
-void file3() {
+void file3()
+{
 	printf("Control in function %s\n", __func__);
 }
diff --git a/testcases/commands/ade/ldd/lddfile4.c b/testcases/commands/ade/ldd/lddfile4.c
index 28dd5ba..1db89bb 100644
--- a/testcases/commands/ade/ldd/lddfile4.c
+++ b/testcases/commands/ade/ldd/lddfile4.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
-void file4() {
+void file4()
+{
 	printf("Control in function %s\n", __func__);
 }
diff --git a/testcases/commands/ade/ldd/lddfile5.c b/testcases/commands/ade/ldd/lddfile5.c
index f0ad7d9..2f46cdb 100644
--- a/testcases/commands/ade/ldd/lddfile5.c
+++ b/testcases/commands/ade/ldd/lddfile5.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
-void file5() {
+void file5()
+{
 	printf("Control in function %s\n", __func__);
 }
diff --git a/testcases/commands/ade/ldd/main.c b/testcases/commands/ade/ldd/main.c
index 2c6c0dc..0f23b8b 100644
--- a/testcases/commands/ade/ldd/main.c
+++ b/testcases/commands/ade/ldd/main.c
@@ -14,5 +14,5 @@
 	file4();
 	file5();
 	printf("All Functions Executed\n");
-        return 0;
+	return 0;
 }
diff --git a/testcases/commands/ade/nm/nmfile.c b/testcases/commands/ade/nm/nmfile.c
index 6ee51b5..43884a9 100644
--- a/testcases/commands/ade/nm/nmfile.c
+++ b/testcases/commands/ade/nm/nmfile.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 int main()
-{       printf("Hello World\n");
-	return(0);
+{
+	printf("Hello World\n");
+	return (0);
 }
diff --git a/testcases/commands/ade/nm/nmfile1.c b/testcases/commands/ade/nm/nmfile1.c
index f003dd9..2da269d 100644
--- a/testcases/commands/ade/nm/nmfile1.c
+++ b/testcases/commands/ade/nm/nmfile1.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 
 int main()
-{       printf("Hello World\n");
-	return(0);
+{
+	printf("Hello World\n");
+	return (0);
 }
diff --git a/testcases/commands/ade/nm/nmfile2.c b/testcases/commands/ade/nm/nmfile2.c
index f003dd9..2da269d 100644
--- a/testcases/commands/ade/nm/nmfile2.c
+++ b/testcases/commands/ade/nm/nmfile2.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 
 int main()
-{       printf("Hello World\n");
-	return(0);
+{
+	printf("Hello World\n");
+	return (0);
 }
diff --git a/testcases/commands/ade/nm/nmfile3.c b/testcases/commands/ade/nm/nmfile3.c
index f003dd9..2da269d 100644
--- a/testcases/commands/ade/nm/nmfile3.c
+++ b/testcases/commands/ade/nm/nmfile3.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 
 int main()
-{       printf("Hello World\n");
-	return(0);
+{
+	printf("Hello World\n");
+	return (0);
 }
diff --git a/testcases/commands/ade/size/test.c b/testcases/commands/ade/size/test.c
index 757afc6..9c3c39d 100644
--- a/testcases/commands/ade/size/test.c
+++ b/testcases/commands/ade/size/test.c
@@ -4,8 +4,7 @@
 {
 	int i;
 
-	for (i = 0; i < 10; i++)
-	{
+	for (i = 0; i < 10; i++) {
 		if ((i % 2) == 0)
 			printf("World \n");
 		else
diff --git a/testcases/commands/cron/cron_dirs_check.c b/testcases/commands/cron/cron_dirs_check.c
index 18973f2..e038a0d 100644
--- a/testcases/commands/cron/cron_dirs_check.c
+++ b/testcases/commands/cron/cron_dirs_check.c
@@ -6,34 +6,37 @@
 #include <unistd.h>
 
 /* Check directory Access */
-int check_directory_access(char * directory) {
+int check_directory_access(char *directory)
+{
 
 	struct stat statbuf;
 
 	printf("Checking %s\n", directory);
 
 	if (stat(directory, &statbuf) == -1) {
-		printf("FAIL: %s. Could not obtain directory status\n", directory);
+		printf("FAIL: %s. Could not obtain directory status\n",
+		       directory);
 		return 1;
 	}
 
 	if (statbuf.st_uid != 0) {
-		printf ("FAIL: %s. Invalid owner\n", directory);
+		printf("FAIL: %s. Invalid owner\n", directory);
 		return 1;
 	}
 
 	if ((statbuf.st_mode & S_IWGRP) || (statbuf.st_mode & S_IWOTH)) {
-		printf ("FAIL: %s. Invalid write access\n",directory);
+		printf("FAIL: %s. Invalid write access\n", directory);
 		return 1;
 	}
 
-	printf ("PASS: %s\n", directory);
+	printf("PASS: %s\n", directory);
 	return 0;
 }
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 
-	if (argc !=2) {
+	if (argc != 2) {
 		printf("Please enter target directory");
 		return 1;
 	}
diff --git a/testcases/commands/eject/check_tray.c b/testcases/commands/eject/check_tray.c
index c13f0a3..20a0163 100644
--- a/testcases/commands/eject/check_tray.c
+++ b/testcases/commands/eject/check_tray.c
@@ -57,13 +57,12 @@
 /*                                                                            */
 /******************************************************************************/
 
-int
-main()
+int main()
 {
-    int fdcdrom = -1;
+	int fdcdrom = -1;
 
-	if ((fdcdrom = open("/dev/cdrom", O_RDONLY|O_NONBLOCK)) == -1)
+	if ((fdcdrom = open("/dev/cdrom", O_RDONLY | O_NONBLOCK)) == -1)
 		exit(-2);
 
-	exit (ioctl(fdcdrom, CDROM_DRIVE_STATUS));
+	exit(ioctl(fdcdrom, CDROM_DRIVE_STATUS));
 }
diff --git a/testcases/kdump/lib/crasher/crasher.c b/testcases/kdump/lib/crasher/crasher.c
index 4b9ea68..bc192dc 100644
--- a/testcases/kdump/lib/crasher/crasher.c
+++ b/testcases/kdump/lib/crasher/crasher.c
@@ -34,50 +34,49 @@
 module_init(crasher_init);
 module_exit(crasher_exit);
 
-#define CRASH "crasher"     /* name of /proc entry file */
+#define CRASH "crasher"		/* name of /proc entry file */
 
 static int crasher_read(char *buf, char **start, off_t offset, int len,
 			int *eof, void *data)
 {
-	return (sprintf (buf, "\n") );
+	return (sprintf(buf, "\n"));
 }
 
 static int crasher_write(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
+			 unsigned long count, void *data)
 {
 	char value, *a;
 	spinlock_t mylock = SPIN_LOCK_UNLOCKED;
 
 	/* grab the first byte the user gave us, ignore the rest */
-	if (copy_from_user(&value,buffer, 1))
+	if (copy_from_user(&value, buffer, 1))
 		return -EFAULT;
 
-	switch ( value )
-	{
-		case '0': /* panic the system */
-			panic("KDUMP test panic\n");
-			break;
+	switch (value) {
+	case '0':		/* panic the system */
+		panic("KDUMP test panic\n");
+		break;
 
-                case '1': /* BUG() test */
-                        BUG();
-			break;
+	case '1':		/* BUG() test */
+		BUG();
+		break;
 
-		case '2': /* panic_on_oops test */
-			a=0;
-			a[1]='A';
-			break;
+	case '2':		/* panic_on_oops test */
+		a = 0;
+		a[1] = 'A';
+		break;
 
-		case '3': /* hang w/double spinlock */
-			spin_lock_irq(&mylock);
-			spin_lock_irq(&mylock);
-			break;
+	case '3':		/* hang w/double spinlock */
+		spin_lock_irq(&mylock);
+		spin_lock_irq(&mylock);
+		break;
 
-		default:
-			printk("crasher: Bad command\n");
+	default:
+		printk("crasher: Bad command\n");
 	}
 
-	return count; /* tell the user we read all his data,
-			 somtimes white lies are ok */
+	return count;		/* tell the user we read all his data,
+				   somtimes white lies are ok */
 }
 
 /* create a directory in /proc and a debug file in the new directory */
@@ -89,7 +88,7 @@
 	printk("loaded crasher module\n");
 
 	/* build a crasher file that can be set */
-	if ((crasher_proc = create_proc_entry(CRASH,0,NULL)) == NULL) {
+	if ((crasher_proc = create_proc_entry(CRASH, 0, NULL)) == NULL) {
 		return -ENOMEM;
 	}
 
@@ -101,6 +100,6 @@
 
 void crasher_exit(void)
 {
-		remove_proc_entry(CRASH, NULL);
-		printk("removed crasher module\n");
+	remove_proc_entry(CRASH, NULL);
+	printk("removed crasher module\n");
 }
diff --git a/testcases/kdump/lib/kprobes/kprobes.c b/testcases/kdump/lib/kprobes/kprobes.c
index ed16fda..6f5c50e 100644
--- a/testcases/kdump/lib/kprobes/kprobes.c
+++ b/testcases/kdump/lib/kprobes/kprobes.c
@@ -12,11 +12,11 @@
 
 /* Proxy routine having the same arguments as actual do_fork() routine */
 long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
-    struct pt_regs *regs, unsigned long stack_size,
-    int __user * parent_tidptr, int __user * child_tidptr)
+	      struct pt_regs *regs, unsigned long stack_size,
+	      int __user * parent_tidptr, int __user * child_tidptr)
 {
 	printk("jprobe: clone_flags=0x%lx, stack_size=0x%lx, regs=%p\n",
-	    clone_flags, stack_size, regs);
+	       clone_flags, stack_size, regs);
 	/* Always end with a call to jprobe_return(). */
 	jprobe_return();
 
@@ -32,13 +32,13 @@
 	int ret;
 	my_jprobe.kp.symbol_name = "do_fork";
 
-	if ((ret = register_jprobe(&my_jprobe)) <0) {
+	if ((ret = register_jprobe(&my_jprobe)) < 0) {
 		printk("register_jprobe failed, returned %d\n", ret);
 		/* XXX: Exit code is wrong. */
 		return -1;
 	}
 	printk("Planted jprobe at %p, handler addr %p\n",
-	    my_jprobe.kp.addr, my_jprobe.entry);
+	       my_jprobe.kp.addr, my_jprobe.entry);
 	return 0;
 }
 
@@ -49,5 +49,5 @@
 }
 
 module_init(jprobe_init)
-module_exit(jprobe_exit)
-MODULE_LICENSE("GPL");
+    module_exit(jprobe_exit)
+    MODULE_LICENSE("GPL");
diff --git a/testcases/kdump/lib/lkdtm/lkdtm.c b/testcases/kdump/lib/lkdtm/lkdtm.c
index 5c93360..7ea8de6 100644
--- a/testcases/kdump/lib/lkdtm/lkdtm.c
+++ b/testcases/kdump/lib/lkdtm/lkdtm.c
@@ -88,7 +88,7 @@
 	OVERFLOW
 };
 
-static char* cp_name[] = {
+static char *cp_name[] = {
 	"INT_HARDWARE_ENTRY",
 	"INT_HW_IRQ_EN",
 	"INT_TASKLET_ENTRY",
@@ -99,7 +99,7 @@
 	"IDE_CORE_CP"
 };
 
-static char* cp_type[] = {
+static char *cp_type[] = {
 	"PANIC",
 	"BUG",
 	"EXCEPTION",
@@ -112,8 +112,8 @@
 static int lkdtm_parse_commandline(void);
 static void lkdtm_handler(void);
 
-static char* cpoint_name = INVALID;
-static char* cpoint_type = NONE;
+static char *cpoint_name = INVALID;
+static char *cpoint_type = NONE;
 static int cpoint_count = DEFAULT_COUNT;
 static int recur_count = REC_NUM_DEFAULT;
 
@@ -122,16 +122,16 @@
 static int count = DEFAULT_COUNT;
 
 module_param(recur_count, int, 0644);
-MODULE_PARM_DESC(recur_count, " Recursion level for the stack overflow test, "\
-				 "default is 10");
+MODULE_PARM_DESC(recur_count, " Recursion level for the stack overflow test, "
+		 "default is 10");
 module_param(cpoint_name, charp, 0644);
 MODULE_PARM_DESC(cpoint_name, " Crash Point, where kernel is to be crashed");
 module_param(cpoint_type, charp, 0644);
-MODULE_PARM_DESC(cpoint_type, " Crash Point Type, action to be taken on "\
-				"hitting the crash point");
+MODULE_PARM_DESC(cpoint_type, " Crash Point Type, action to be taken on "
+		 "hitting the crash point");
 module_param(cpoint_count, int, 0644);
-MODULE_PARM_DESC(cpoint_count, " Crash Point Count, number of times the "\
-				"crash point is to be hit to trigger action");
+MODULE_PARM_DESC(cpoint_count, " Crash Point Count, number of times the "
+		 "crash point is to be hit to trigger action");
 
 unsigned int jp_do_irq(unsigned int irq)
 {
@@ -140,7 +140,7 @@
 	return 0;
 }
 
-irqreturn_t jp_handle_irq_event(unsigned int irq, struct irqaction *action)
+irqreturn_t jp_handle_irq_event(unsigned int irq, struct irqaction * action)
 {
 	lkdtm_handler();
 	jprobe_return();
@@ -162,7 +162,7 @@
 struct scan_control;
 
 unsigned long jp_shrink_page_list(struct list_head *page_list,
-                                        struct scan_control *sc)
+				  struct scan_control *sc)
 {
 	lkdtm_handler();
 	jprobe_return();
@@ -170,7 +170,7 @@
 }
 
 int jp_hrtimer_start(struct hrtimer *timer, ktime_t tim,
-				const enum hrtimer_mode mode)
+		     const enum hrtimer_mode mode)
 {
 	lkdtm_handler();
 	jprobe_return();
@@ -185,9 +185,9 @@
 }
 
 #ifdef CONFIG_IDE
-int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
-			struct block_device *bdev, unsigned int cmd,
-			unsigned long arg)
+int jp_generic_ide_ioctl(ide_drive_t * drive, struct file *file,
+			 struct block_device *bdev, unsigned int cmd,
+			 unsigned long arg)
 {
 	lkdtm_handler();
 	jprobe_return();
@@ -200,7 +200,7 @@
 	int i;
 
 	if (cpoint_name == INVALID || cpoint_type == NONE ||
-					cpoint_count < 1 || recur_count < 1)
+	    cpoint_count < 1 || recur_count < 1)
 		return -EINVAL;
 
 	for (i = 0; i < NUM_CPOINTS; ++i) {
@@ -218,7 +218,7 @@
 	}
 
 	if (cpoint == INVALID || cptype == NONE)
-                return -EINVAL;
+		return -EINVAL;
 
 	count = cpoint_count;
 
@@ -229,22 +229,22 @@
 {
 	char buf[1024];
 
-	memset(buf,0xFF,1024);
+	memset(buf, 0xFF, 1024);
 	recur_count--;
 	if (!recur_count)
 		return 0;
 	else
-        	return recursive_loop(a);
+		return recursive_loop(a);
 }
 
 void lkdtm_handler(void)
 {
-  /* Escape endless loop. */
-  if (count < 0)
-    return;
+	/* Escape endless loop. */
+	if (count < 0)
+		return;
 
 	printk(KERN_INFO "lkdtm : Crash point %s of type %s hit\n",
-					 cpoint_name, cpoint_type);
+	       cpoint_name, cpoint_type);
 	--count;
 
 	if (count == 0) {
@@ -261,15 +261,15 @@
 			break;
 		case EXCEPTION:
 			printk(KERN_INFO "lkdtm : EXCEPTION\n");
-			*((int *) 0) = 0;
+			*((int *)0) = 0;
 			break;
 		case LOOP:
 			printk(KERN_INFO "lkdtm : LOOP\n");
-			for (;;);
+			for (;;) ;
 			break;
 		case OVERFLOW:
 			printk(KERN_INFO "lkdtm : OVERFLOW\n");
-			(void) recursive_loop(0);
+			(void)recursive_loop(0);
 			break;
 		default:
 			break;
@@ -279,23 +279,23 @@
 }
 
 #ifdef USE_SYMBOL_NAME
-void lkdtm_symbol_name(char *name, void (*entry)(void))
+void lkdtm_symbol_name(char *name, void (*entry) (void))
 {
-  lkdtm.kp.symbol_name = name;
-  lkdtm.entry = (kprobe_opcode_t*) entry;
+	lkdtm.kp.symbol_name = name;
+	lkdtm.entry = (kprobe_opcode_t *) entry;
 }
 
 #else
-void lkdtm_lookup_name(char *name, void (*entry)(void))
+void lkdtm_lookup_name(char *name, void (*entry) (void))
 {
-  unsigned long addr;
+	unsigned long addr;
 
-  addr = kallsyms_lookup_name(name);
-  if (addr) {
-    *(lkdtm.kp.addr) = addr;
-    lkdtm.entry = JPROBE_ENTRY(entry);
-  } else
-    printk(KERN_INFO "lkdtm : Crash point not available\n");
+	addr = kallsyms_lookup_name(name);
+	if (addr) {
+		*(lkdtm.kp.addr) = addr;
+		lkdtm.entry = JPROBE_ENTRY(entry);
+	} else
+		printk(KERN_INFO "lkdtm : Crash point not available\n");
 }
 #endif
 
@@ -314,13 +314,13 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".__do_IRQ", (void (*)(void)) jp_do_irq);
+		lkdtm_symbol_name(".__do_IRQ", (void (*)(void))jp_do_irq);
 #else
-          lkdtm_symbol_name("__do_IRQ", (void (*)(void)) jp_do_irq);
+		lkdtm_symbol_name("__do_IRQ", (void (*)(void))jp_do_irq);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("__do_IRQ", (void (*)(void)) jp_do_irq);
+		lkdtm_lookup_name("__do_IRQ", (void (*)(void))jp_do_irq);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -330,13 +330,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".handle_IRQ_event", (void (*)(void)) jp_handle_irq_event);
+		lkdtm_symbol_name(".handle_IRQ_event",
+				  (void (*)(void))jp_handle_irq_event);
 #else
-          lkdtm_symbol_name("handle_IRQ_event", (void (*)(void)) jp_handle_irq_event);
+		lkdtm_symbol_name("handle_IRQ_event",
+				  (void (*)(void))jp_handle_irq_event);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("handle_IRQ_event", (void (*)(void)) jp_handle_irq_event);
+		lkdtm_lookup_name("handle_IRQ_event",
+				  (void (*)(void))jp_handle_irq_event);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -346,13 +349,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".tasklet_action", (void (*)(void)) jp_tasklet_action);
+		lkdtm_symbol_name(".tasklet_action",
+				  (void (*)(void))jp_tasklet_action);
 #else
-          lkdtm_symbol_name("tasklet_action", (void (*)(void)) jp_tasklet_action);
+		lkdtm_symbol_name("tasklet_action",
+				  (void (*)(void))jp_tasklet_action);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("tasklet_action", (void (*)(void)) jp_tasklet_action);
+		lkdtm_lookup_name("tasklet_action",
+				  (void (*)(void))jp_tasklet_action);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -362,13 +368,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".ll_rw_block", (void (*)(void)) jp_ll_rw_block);
+		lkdtm_symbol_name(".ll_rw_block",
+				  (void (*)(void))jp_ll_rw_block);
 #else
-          lkdtm_symbol_name("ll_rw_block", (void (*)(void)) jp_ll_rw_block);
+		lkdtm_symbol_name("ll_rw_block",
+				  (void (*)(void))jp_ll_rw_block);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("ll_rw_block", (void (*)(void)) jp_ll_rw_block);
+		lkdtm_lookup_name("ll_rw_block",
+				  (void (*)(void))jp_ll_rw_block);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -378,13 +387,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".shrink_inactive_list", (void (*)(void)) jp_shrink_page_list);
+		lkdtm_symbol_name(".shrink_inactive_list",
+				  (void (*)(void))jp_shrink_page_list);
 #else
-          lkdtm_symbol_name("shrink_inactive_list", (void (*)(void)) jp_shrink_page_list);
+		lkdtm_symbol_name("shrink_inactive_list",
+				  (void (*)(void))jp_shrink_page_list);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("shrink_inactive_list", (void (*)(void)) jp_shrink_page_list);
+		lkdtm_lookup_name("shrink_inactive_list",
+				  (void (*)(void))jp_shrink_page_list);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -394,13 +406,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".hrtimer_start", (void (*)(void)) jp_hrtimer_start);
+		lkdtm_symbol_name(".hrtimer_start",
+				  (void (*)(void))jp_hrtimer_start);
 #else
-          lkdtm_symbol_name("hrtimer_start", (void (*)(void)) jp_hrtimer_start);
+		lkdtm_symbol_name("hrtimer_start",
+				  (void (*)(void))jp_hrtimer_start);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("hrtimer_start", (void (*)(void)) jp_hrtimer_start);
+		lkdtm_lookup_name("hrtimer_start",
+				  (void (*)(void))jp_hrtimer_start);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -410,13 +425,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_symbol_name(".scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 #else
-          lkdtm_symbol_name("scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_symbol_name("scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_lookup_name("scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 
 #endif /* USE_SYMBOL_NAME */
 		break;
@@ -427,13 +445,16 @@
 #ifdef USE_SYMBOL_NAME
 
 #ifdef __powerpc__
-          lkdtm_symbol_name(".scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_symbol_name(".scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 #else
-          lkdtm_symbol_name("scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_symbol_name("scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 #endif /*__powerpc__*/
 
 #else /* USE_SYMBOL_NAME */
-          lkdtm_lookup_name("scsi_dispatch_cmd", (void (*)(void)) jp_scsi_dispatch_cmd);
+		lkdtm_lookup_name("scsi_dispatch_cmd",
+				  (void (*)(void))jp_scsi_dispatch_cmd);
 
 #endif /* USE_SYMBOL_NAME */
 #endif /* CONFIG_IDE */
@@ -445,19 +466,19 @@
 	}
 
 	if ((ret = register_jprobe(&lkdtm)) < 0) {
-                printk(KERN_INFO "lkdtm : Couldn't register jprobe\n");
-                return ret;
+		printk(KERN_INFO "lkdtm : Couldn't register jprobe\n");
+		return ret;
 	}
 
 	printk(KERN_INFO "lkdtm : Crash point %s of type %s registered\n",
-						cpoint_name, cpoint_type);
+	       cpoint_name, cpoint_type);
 	return 0;
 }
 
 void lkdtm_module_exit(void)
 {
-        unregister_jprobe(&lkdtm);
-        printk(KERN_INFO "lkdtm : Crash point unregistered\n");
+	unregister_jprobe(&lkdtm);
+	printk(KERN_INFO "lkdtm : Crash point unregistered\n");
 }
 
 module_init(lkdtm_module_init);
diff --git a/testcases/kernel/connectors/pec/event_generator.c b/testcases/kernel/connectors/pec/event_generator.c
index 0558754..cfa6b0d 100644
--- a/testcases/kernel/connectors/pec/event_generator.c
+++ b/testcases/kernel/connectors/pec/event_generator.c
@@ -40,7 +40,7 @@
 
 char **exec_argv;
 
-void (*gen_event)(void);
+void (*gen_event) (void);
 
 /*
  * Show the usage
@@ -51,7 +51,8 @@
 {
 	FILE *stream = (status ? stderr : stdout);
 
-	fprintf(stream, "Usage: event_generator -e fork|exit|exec|uid|gid [-n nr_event]\n");
+	fprintf(stream,
+		"Usage: event_generator -e fork|exit|exec|uid|gid [-n nr_event]\n");
 
 	exit(status);
 }
@@ -106,7 +107,7 @@
 	} else if (pid < 0) {
 		fprintf(stderr, "fork() failed\n");
 		exit(1);
-	} else {  /* Parent should wait for the child */
+	} else {		/* Parent should wait for the child */
 		wait(&status);
 	}
 }
@@ -154,12 +155,12 @@
  */
 static void process_options(int argc, char **argv)
 {
-	int  c;
+	int c;
 	char *end;
 
 	while ((c = getopt(argc, argv, "e:n:h")) != -1) {
 		switch (c) {
-		/* which event to generate */
+			/* which event to generate */
 		case 'e':
 			if (!strcmp(optarg, "exec"))
 				gen_event = gen_exec;
@@ -176,7 +177,7 @@
 				exit(1);
 			}
 			break;
-		/* number of event to generate */
+			/* number of event to generate */
 		case 'n':
 			nr_event = strtoul(optarg, &end, 10);
 			if (*end != '\0' || nr_event == 0) {
@@ -184,7 +185,7 @@
 				exit(1);
 			}
 			break;
-		/* help */
+			/* help */
 		case 'h':
 			usage(0);
 		default:
diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
index 279fb67..a1beb13 100644
--- a/testcases/kernel/connectors/pec/pec_listener.c
+++ b/testcases/kernel/connectors/pec/pec_listener.c
@@ -72,7 +72,7 @@
  *
  * @signo: the signal number, not used
  */
-static void sigint_handler(int __attribute__((unused)) signo)
+static void sigint_handler(int __attribute__ ((unused)) signo)
 {
 	exit_flag = 1;
 }
@@ -198,20 +198,17 @@
 		       pe->event_data.fork.child_pid);
 		break;
 	case PROC_EVENT_EXEC:
-		printf("exec pid: %d\n",
-		       pe->event_data.exec.process_pid);
+		printf("exec pid: %d\n", pe->event_data.exec.process_pid);
 		break;
 	case PROC_EVENT_UID:
 		printf("uid pid: %d euid: %d ruid: %d\n",
 		       pe->event_data.id.process_pid,
-		       pe->event_data.id.e.euid,
-		       pe->event_data.id.r.ruid);
+		       pe->event_data.id.e.euid, pe->event_data.id.r.ruid);
 		break;
 	case PROC_EVENT_GID:
 		printf("gid pid: %d egid: %d rgid: %d\n",
 		       pe->event_data.id.process_pid,
-		       pe->event_data.id.e.egid,
-		       pe->event_data.id.r.rgid);
+		       pe->event_data.id.e.egid, pe->event_data.id.r.rgid);
 		break;
 	case PROC_EVENT_EXIT:
 		printf("exit pid: %d exit_code: %d exit_signal: %d\n",
@@ -259,8 +256,7 @@
 	l_local.nl_pid = getpid();
 	l_local.nl_groups = CN_IDX_PROC;
 
-	ret = bind(sd, (struct sockaddr *)&l_local,
-		   sizeof(struct sockaddr_nl));
+	ret = bind(sd, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl));
 	if (ret == -1) {
 		fprintf(stderr, "failed to bind socket\n");
 		exit(1);
diff --git a/testcases/kernel/containers/check_for_unshare.c b/testcases/kernel/containers/check_for_unshare.c
index 705937a..d15c2a2 100644
--- a/testcases/kernel/containers/check_for_unshare.c
+++ b/testcases/kernel/containers/check_for_unshare.c
@@ -43,9 +43,9 @@
 		exit(1);
 	}
 
-	dlerror();    /* Clear any existing error */
+	dlerror();		/* Clear any existing error */
 	ret = dlsym(handle, "unshare");
-	if ((error = dlerror()) != NULL)  {
+	if ((error = dlerror()) != NULL) {
 		fprintf(stderr, "Error: %s\n", error);
 		exit(1);
 	}
diff --git a/testcases/kernel/containers/libclone/libclone.c b/testcases/kernel/containers/libclone/libclone.c
index 3cde873..902f464 100644
--- a/testcases/kernel/containers/libclone/libclone.c
+++ b/testcases/kernel/containers/libclone/libclone.c
@@ -17,8 +17,8 @@
 #include "libclone.h"
 
 int do_clone_tests(unsigned long clone_flags,
-			int(*fn1)(void *arg), void *arg1,
-			int(*fn2)(void *arg), void *arg2)
+		   int (*fn1) (void *arg), void *arg1,
+		   int (*fn2) (void *arg), void *arg2)
 {
 	int ret;
 
@@ -36,8 +36,8 @@
 }
 
 int do_unshare_tests(unsigned long clone_flags,
-			int (*fn1)(void *arg), void *arg1,
-			int (*fn2)(void *arg), void *arg2)
+		     int (*fn1) (void *arg), void *arg1,
+		     int (*fn2) (void *arg), void *arg2)
 {
 	int pid, ret = 0;
 	int retpipe[2];
@@ -86,8 +86,8 @@
 	return ret;
 }
 
-int do_plain_tests(int (*fn1)(void *arg), void *arg1,
-			int (*fn2)(void *arg), void *arg2)
+int do_plain_tests(int (*fn1) (void *arg), void *arg1,
+		   int (*fn2) (void *arg), void *arg2)
 {
 	int ret = 0, pid;
 
@@ -104,7 +104,7 @@
 }
 
 int do_clone_unshare_test(int use_clone, unsigned long clone_flags,
-			int (*fn1)(void *arg), void *arg1)
+			  int (*fn1) (void *arg), void *arg1)
 {
 	switch (use_clone) {
 	case T_NONE:
@@ -115,7 +115,7 @@
 		return do_unshare_tests(clone_flags, fn1, arg1, NULL, NULL);
 	default:
 		printf("%s: bad use_clone option: %d\n", __FUNCTION__,
-							use_clone);
+		       use_clone);
 		return -1;
 	}
 }
@@ -124,8 +124,8 @@
  * Run fn1 in a unshared environmnent, and fn2 in the original context
  */
 int do_clone_unshare_tests(int use_clone, unsigned long clone_flags,
-			int (*fn1)(void *arg), void *arg1,
-			int (*fn2)(void *arg), void *arg2)
+			   int (*fn1) (void *arg), void *arg1,
+			   int (*fn2) (void *arg), void *arg2)
 {
 	switch (use_clone) {
 	case T_NONE:
@@ -136,7 +136,7 @@
 		return do_unshare_tests(clone_flags, fn1, arg1, fn2, arg2);
 	default:
 		printf("%s: bad use_clone option: %d\n", __FUNCTION__,
-							use_clone);
+		       use_clone);
 		return -1;
 	}
 }
diff --git a/testcases/kernel/containers/mqns/check_mqns_enabled.c b/testcases/kernel/containers/mqns/check_mqns_enabled.c
index 9e91f99..9c790a4 100644
--- a/testcases/kernel/containers/mqns/check_mqns_enabled.c
+++ b/testcases/kernel/containers/mqns/check_mqns_enabled.c
@@ -38,7 +38,8 @@
 		return 1;
 
 	mq_unlink("/checkmqnsenabled");
-	mqd = mq_open("/checkmqnsenabled", O_RDWR|O_CREAT|O_EXCL, 0777, NULL);
+	mqd =
+	    mq_open("/checkmqnsenabled", O_RDWR | O_CREAT | O_EXCL, 0777, NULL);
 	if (mqd == -1) {
 		perror("mq_open");
 		return 3;
diff --git a/testcases/kernel/containers/mqns/mqns_01.c b/testcases/kernel/containers/mqns/mqns_01.c
index 832c9be..cd7c05f 100644
--- a/testcases/kernel/containers/mqns/mqns_01.c
+++ b/testcases/kernel/containers/mqns/mqns_01.c
@@ -39,7 +39,7 @@
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_01";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int p1[2];
 int p2[2];
@@ -75,8 +75,7 @@
 	exit(0);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int r;
 	mqd_t mqd;
@@ -84,17 +83,20 @@
 	int use_clone = T_UNSHARE;
 
 	if (argc == 2 && strcmp(argv[1], "-clone") == 0) {
-		tst_resm(TINFO, "Testing posix mq namespaces through clone(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through clone(2).\n");
 		use_clone = T_CLONE;
 	} else
-		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through unshare(2).\n");
 
 	if (pipe(p1) == -1 || pipe(p2) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "pipe failed");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe failed");
 	}
 
-	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0777,
-			NULL);
+	mqd =
+	    syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR | O_CREAT | O_EXCL, 0777,
+		    NULL);
 	if (mqd == -1) {
 		perror("mq_open");
 		tst_resm(TFAIL, "mq_open failed\n");
@@ -129,7 +131,7 @@
 
 	/* destroy the mqueue */
 	if (mq_close(mqd) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "mq_close failed");
+		tst_brkm(TBROK | TERRNO, NULL, "mq_close failed");
 	}
 	syscall(__NR_mq_unlink, NOSLASH_MQ1);
 
diff --git a/testcases/kernel/containers/mqns/mqns_02.c b/testcases/kernel/containers/mqns/mqns_02.c
index d6e13ca..932ce3c 100644
--- a/testcases/kernel/containers/mqns/mqns_02.c
+++ b/testcases/kernel/containers/mqns/mqns_02.c
@@ -42,7 +42,7 @@
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_02";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int p1[2];
 int p2[2];
@@ -60,8 +60,9 @@
 		exit(1);
 	} else {
 
-		mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL,
-				0777, NULL);
+		mqd =
+		    syscall(__NR_mq_open, NOSLASH_MQ1,
+			    O_RDWR | O_CREAT | O_EXCL, 0777, NULL);
 		if (mqd == -1) {
 			if (write(p2[1], "mqfail", strlen("mqfail") + 1) < 0) {
 				perror("write(p2[1], \"mqfail\", ..) failed");
@@ -84,15 +85,15 @@
 						perror("mq_close(mqd) failed");
 						exit(1);
 					} else if (syscall(__NR_mq_unlink,
-							NOSLASH_MQ1) < 0) {
+							   NOSLASH_MQ1) < 0) {
 						perror("mq_unlink(" NOSLASH_MQ1
-						    ") failed");
+						       ") failed");
 						exit(1);
 					} else if (write(p2[1], "done",
-							strlen("done") + 1)
-							< 0) {
+							 strlen("done") + 1)
+						   < 0) {
 						perror("write(p2[1], "
-						    "\"done\", ..) failed");
+						       "\"done\", ..) failed");
 						exit(1);
 					}
 
@@ -115,13 +116,15 @@
 	int use_clone = T_UNSHARE;
 
 	if (argc == 2 && strcmp(argv[1], "-clone") == 0) {
-		tst_resm(TINFO, "Testing posix mq namespaces through clone(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through clone(2).\n");
 		use_clone = T_CLONE;
 	} else
-		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through unshare(2).\n");
 
 	if (pipe(p1) == -1 || pipe(p2) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "pipe");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe");
 	}
 
 	/* fire off the test */
@@ -139,7 +142,7 @@
 	}
 
 	if (read(p2[0], buf, 7) < 0) {
-		tst_resm(TBROK|TERRNO, "read(p2[0], ..) failed");
+		tst_resm(TBROK | TERRNO, "read(p2[0], ..) failed");
 	} else if (!strcmp(buf, "mqfail")) {
 		tst_resm(TFAIL, "child process could not create mqueue\n");
 		umount(DEV_MQUEUE);
@@ -149,13 +152,15 @@
 	} else {
 		mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDONLY);
 		if (mqd == -1) {
-			tst_resm(TPASS, "Parent process can't see the mqueue\n");
+			tst_resm(TPASS,
+				 "Parent process can't see the mqueue\n");
 		} else {
-			tst_resm(TFAIL|TERRNO, "Parent process found mqueue\n");
+			tst_resm(TFAIL | TERRNO,
+				 "Parent process found mqueue\n");
 			mq_close(mqd);
 		}
 		if (write(p1[1], "cont", 5) < 0) {
-			tst_resm(TBROK|TERRNO, "write(p1[1], ..) failed");
+			tst_resm(TBROK | TERRNO, "write(p1[1], ..) failed");
 		}
 		read(p2[0], buf, 7);
 	}
diff --git a/testcases/kernel/containers/mqns/mqns_03.c b/testcases/kernel/containers/mqns/mqns_03.c
index 90aeee4..6650db4 100644
--- a/testcases/kernel/containers/mqns/mqns_03.c
+++ b/testcases/kernel/containers/mqns/mqns_03.c
@@ -45,7 +45,7 @@
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_03";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int p1[2];
 int p2[2];
@@ -63,13 +63,14 @@
 	close(p1[1]);
 	close(p2[0]);
 
-	if (read(p1[0], buf, 3) != 3) { /* go */
+	if (read(p1[0], buf, 3) != 3) {	/* go */
 		perror("read failed");
 		exit(1);
 	}
 
-	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755,
-			NULL);
+	mqd =
+	    syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR | O_CREAT | O_EXCL, 0755,
+		    NULL);
 	if (mqd == -1) {
 		write(p2[1], "mqfail", 7);
 		exit(1);
@@ -136,15 +137,16 @@
 		tst_resm(TINFO, "Testing posix mq namespaces through clone(2)");
 		use_clone = T_CLONE;
 	} else
-		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2)");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through unshare(2)");
 
 	if (pipe(p1) == -1 || pipe(p2) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "pipe failed");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe failed");
 
 	/* fire off the test */
 	r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_mqueue, NULL);
 	if (r < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "failed clone/unshare");
+		tst_brkm(TBROK | TERRNO, NULL, "failed clone/unshare");
 	}
 
 	tst_resm(TINFO, "Checking correct umount+remount of mqueuefs");
@@ -176,10 +178,12 @@
 		tst_resm(TFAIL, "child couldn't remount mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "stat2")) {
-		tst_resm(TFAIL, "mq_open()d file gone after remount of mqueuefs");
+		tst_resm(TFAIL,
+			 "mq_open()d file gone after remount of mqueuefs");
 		goto fail;
 	} else if (!strcmp(buf, "stat3")) {
-		tst_resm(TFAIL, "creat(2)'d file gone after remount of mqueuefs");
+		tst_resm(TFAIL,
+			 "creat(2)'d file gone after remount of mqueuefs");
 		goto fail;
 	}
 
diff --git a/testcases/kernel/containers/mqns/mqns_04.c b/testcases/kernel/containers/mqns/mqns_04.c
index 47f7ec6..c883544 100644
--- a/testcases/kernel/containers/mqns/mqns_04.c
+++ b/testcases/kernel/containers/mqns/mqns_04.c
@@ -42,7 +42,7 @@
 #include "mqns.h"
 
 char *TCID = "posixmq_namespace_04";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int p1[2];
 int p2[2];
@@ -59,10 +59,11 @@
 	close(p1[1]);
 	close(p2[0]);
 
-	read(p1[0], buf, 3); /* go */
+	read(p1[0], buf, 3);	/* go */
 
-	mqd = syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR|O_CREAT|O_EXCL, 0755,
-			NULL);
+	mqd =
+	    syscall(__NR_mq_open, NOSLASH_MQ1, O_RDWR | O_CREAT | O_EXCL, 0755,
+		    NULL);
 	if (mqd == -1) {
 		write(p2[1], "mqfail", 7);
 		tst_exit();
@@ -92,13 +93,21 @@
 	int use_clone = T_UNSHARE;
 
 	if (argc == 2 && strcmp(argv[1], "-clone") == 0) {
-		tst_resm(TINFO, "Testing posix mq namespaces through clone(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through clone(2).\n");
 		use_clone = T_CLONE;
 	} else
-		tst_resm(TINFO, "Testing posix mq namespaces through unshare(2).\n");
+		tst_resm(TINFO,
+			 "Testing posix mq namespaces through unshare(2).\n");
 
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	if (pipe(p2) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
 
 	mkdir(DEV_MQUEUE2, 0755);
 
@@ -140,18 +149,21 @@
 		goto fail;
 	}
 	if (!WIFEXITED(status)) {
-		tst_resm(TFAIL, "Child did not exit normally (status %d)\n", status);
+		tst_resm(TFAIL, "Child did not exit normally (status %d)\n",
+			 status);
 		goto fail;
 	}
 	rc = stat(FNAM1, &statbuf);
 	if (rc == -1) {
-		tst_resm(TFAIL, "parent's view of child's mq died with child\n");
+		tst_resm(TFAIL,
+			 "parent's view of child's mq died with child\n");
 		goto fail;
 	}
 
 	rc = creat(FNAM2, 0755);
 	if (rc != -1) {
-		tst_resm(TFAIL, "parent was able to create a file in dead child's mqfs\n");
+		tst_resm(TFAIL,
+			 "parent was able to create a file in dead child's mqfs\n");
 		goto fail;
 	}
 
diff --git a/testcases/kernel/containers/netns/check_netns_enabled.c b/testcases/kernel/containers/netns/check_netns_enabled.c
index 720164e..b60de19 100644
--- a/testcases/kernel/containers/netns/check_netns_enabled.c
+++ b/testcases/kernel/containers/netns/check_netns_enabled.c
@@ -38,16 +38,15 @@
 #define CLONE_NEWNS -1
 #endif
 
-int
-main(void)
+int main(void)
 {
 	/* Checking if the kernel supports unshare with netns capabilities. */
 	if (CLONE_NEWNET == -1 || CLONE_NEWNS == -1)
-		tst_resm(TBROK|TERRNO,
-		    "CLONE_NEWNET (%d) or CLONE_NEWNS (%d) not supported",
-		    CLONE_NEWNET, CLONE_NEWNS);
-	else if (syscall(__NR_unshare, CLONE_NEWNET|CLONE_NEWNS) == -1)
-		tst_resm(TFAIL|TERRNO, "unshare syscall smoke test failed");
+		tst_resm(TBROK | TERRNO,
+			 "CLONE_NEWNET (%d) or CLONE_NEWNS (%d) not supported",
+			 CLONE_NEWNET, CLONE_NEWNS);
+	else if (syscall(__NR_unshare, CLONE_NEWNET | CLONE_NEWNS) == -1)
+		tst_resm(TFAIL | TERRNO, "unshare syscall smoke test failed");
 	else
 		tst_resm(TPASS, "unshare syscall smoke test passed");
 	tst_exit();
diff --git a/testcases/kernel/containers/netns/common.c b/testcases/kernel/containers/netns/common.c
index 5dfed1c..291aeb7 100644
--- a/testcases/kernel/containers/netns/common.c
+++ b/testcases/kernel/containers/netns/common.c
@@ -46,7 +46,7 @@
 
 static int child_fn(void *c1);
 
-int crtchild(char *s1 , char *s2)
+int crtchild(char *s1, char *s2)
 {
 	char *cmd[] = { "--", s1, s2, (char *)0 };
 	execve("/bin/sh", cmd, __environ);
@@ -69,7 +69,7 @@
 	clone_flags |= CLONE_NEWPID;
 #endif
 
-	pid = ltp_clone_quick(clone_flags, child_fn, (void *) c1);
+	pid = ltp_clone_quick(clone_flags, child_fn, (void *)c1);
 
 	if (pid == -1) {
 		perror("Failed to do clone...");
@@ -93,7 +93,8 @@
 	}
 
 	/* We need to pass the child pid to the parentns.sh script */
-	sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32 , ltproot, p1, pid);
+	sprintf(par, "%s/testcases/bin/parentns.sh %s %" PRId32, ltproot, p1,
+		pid);
 
 	ret = system(par);
 	status = WEXITSTATUS(ret);
@@ -106,7 +107,7 @@
 
 	ret = waitpid(pid, &status, __WALL);
 	status = WEXITSTATUS(status);
-	if (ret  == -1 || status != 0) {
+	if (ret == -1 || status != 0) {
 		printf("Error: waitpid() returns %d, status %d\n", ret, status);
 	}
 
diff --git a/testcases/kernel/containers/netns/create_container.c b/testcases/kernel/containers/netns/create_container.c
index d2a70df..39f06f2 100644
--- a/testcases/kernel/containers/netns/create_container.c
+++ b/testcases/kernel/containers/netns/create_container.c
@@ -37,8 +37,8 @@
 	 * child network namespace container respectively
 	 */
 	status = create_net_namespace("runallnetworktests_parent.sh",
-						"runallnetworktests_child.sh");
+				      "runallnetworktests_child.sh");
 	printf("Execution of all the network testcases under network"
-			" namespace done. return value is %d\n", status);
+	       " namespace done. return value is %d\n", status);
 	return status;
 }
diff --git a/testcases/kernel/containers/netns/crtchild.c b/testcases/kernel/containers/netns/crtchild.c
index 2a53495..1f5a762 100644
--- a/testcases/kernel/containers/netns/crtchild.c
+++ b/testcases/kernel/containers/netns/crtchild.c
@@ -30,7 +30,7 @@
 
 int main()
 {
-    int status;
-    status = create_net_namespace("parent.sh", "child.sh");
-    return status;
+	int status;
+	status = create_net_namespace("parent.sh", "child.sh");
+	return status;
 }
diff --git a/testcases/kernel/containers/netns/crtchild_delchild.c b/testcases/kernel/containers/netns/crtchild_delchild.c
index cf6fac0..e7dd8a7 100644
--- a/testcases/kernel/containers/netns/crtchild_delchild.c
+++ b/testcases/kernel/containers/netns/crtchild_delchild.c
@@ -33,7 +33,7 @@
 
 int main()
 {
-    int status;
-    status = create_net_namespace("delchild.sh", "rename_net.sh");
-    return status;
+	int status;
+	status = create_net_namespace("delchild.sh", "rename_net.sh");
+	return status;
 }
diff --git a/testcases/kernel/containers/netns/par_chld_ftp.c b/testcases/kernel/containers/netns/par_chld_ftp.c
index 26f71f4..df4eacf 100644
--- a/testcases/kernel/containers/netns/par_chld_ftp.c
+++ b/testcases/kernel/containers/netns/par_chld_ftp.c
@@ -30,7 +30,7 @@
 
 int main()
 {
-    int status;
-    status = create_net_namespace("par_ftp.sh", "ch_ftp.sh");
-    return status;
+	int status;
+	status = create_net_namespace("par_ftp.sh", "ch_ftp.sh");
+	return status;
 }
diff --git a/testcases/kernel/containers/netns/par_chld_ipv6.c b/testcases/kernel/containers/netns/par_chld_ipv6.c
index 67e03cb..c4b54ae 100644
--- a/testcases/kernel/containers/netns/par_chld_ipv6.c
+++ b/testcases/kernel/containers/netns/par_chld_ipv6.c
@@ -52,68 +52,71 @@
 
 int main()
 {
-    int pid, status=0, ret ;
-    long int flags = 0;
-    char *ltproot, *par, *child;
+	int pid, status = 0, ret;
+	long int flags = 0;
+	char *ltproot, *par, *child;
 
-    flags |= CLONE_NEWNS;
-    flags |= CLONE_NEWNET;
+	flags |= CLONE_NEWNS;
+	flags |= CLONE_NEWNET;
 
-    if (tst_kvercmp(2,6,19) < 0)
-	return 1;
+	if (tst_kvercmp(2, 6, 19) < 0)
+		return 1;
 
-    ltproot = getenv("LTPROOT");
+	ltproot = getenv("LTPROOT");
 
-    if (! ltproot) {
-        tst_resm(TINFO,"LTPROOT env variable is not set\n");
-        tst_resm(TINFO,"Please set LTPROOT and re-run the test.. Thankyou\n");
-        return -1;
-    }
+	if (!ltproot) {
+		tst_resm(TINFO, "LTPROOT env variable is not set\n");
+		tst_resm(TINFO,
+			 "Please set LTPROOT and re-run the test.. Thankyou\n");
+		return -1;
+	}
 
-    par = malloc (FILENAME_MAX);
-    child = malloc (FILENAME_MAX);
+	par = malloc(FILENAME_MAX);
+	child = malloc(FILENAME_MAX);
 
-    if (par == NULL || child == NULL) {
-        tst_resm(TFAIL, "error while allocating mem");
-        exit(1);
-    }
-    sprintf(par, "%s/testcases/bin/paripv6.sh", ltproot);
-    sprintf(child, "%s/testcases/bin/childipv6.sh", ltproot);
+	if (par == NULL || child == NULL) {
+		tst_resm(TFAIL, "error while allocating mem");
+		exit(1);
+	}
+	sprintf(par, "%s/testcases/bin/paripv6.sh", ltproot);
+	sprintf(child, "%s/testcases/bin/childipv6.sh", ltproot);
 
-    if ((pid = fork()) == 0) {
+	if ((pid = fork()) == 0) {
 
-        // Child.
+		// Child.
 #if HAVE_UNSHARE
-        ret = unshare(flags);
-        if (ret < 0) {
-            perror("unshare");
-	    tst_resm(TFAIL, "Error:Unshare syscall failed for network namespace\n");
-            return 1;
-        }
+		ret = unshare(flags);
+		if (ret < 0) {
+			perror("unshare");
+			tst_resm(TFAIL,
+				 "Error:Unshare syscall failed for network namespace\n");
+			return 1;
+		}
 #else
-	tst_resm(TCONF, "System doesn't have unshare support");
+		tst_resm(TCONF, "System doesn't have unshare support");
 #endif
-    return crtchild(child);
-    }
-    else{
+		return crtchild(child);
+	} else {
 
-        //parent
-        ret = system(par);
-        status = WEXITSTATUS(ret);
-        if (ret == -1 || status != 0) {
-            tst_resm(TFAIL, "Error: While running the IPv6 tests between \
+		//parent
+		ret = system(par);
+		status = WEXITSTATUS(ret);
+		if (ret == -1 || status != 0) {
+			tst_resm(TFAIL,
+				 "Error: While running the IPv6 tests between \
 parent & child NS\n");
-            fflush(stdout);
-            exit(1);
-        }
-    fflush(stdout);
+			fflush(stdout);
+			exit(1);
+		}
+		fflush(stdout);
 
-    ret = waitpid(pid, &status, __WALL);
-    status = WEXITSTATUS(status);
-    if (status != 0 || ret == -1) {
-        tst_resm(TFAIL, "waitpid() returns %d, errno %d\n", ret, errno);
-        status =  errno;
-    }
-    return status;
-    }
+		ret = waitpid(pid, &status, __WALL);
+		status = WEXITSTATUS(status);
+		if (status != 0 || ret == -1) {
+			tst_resm(TFAIL, "waitpid() returns %d, errno %d\n", ret,
+				 errno);
+			status = errno;
+		}
+		return status;
+	}
 }
diff --git a/testcases/kernel/containers/netns/sysfsview.c b/testcases/kernel/containers/netns/sysfsview.c
index 060c556..a3f1870 100644
--- a/testcases/kernel/containers/netns/sysfsview.c
+++ b/testcases/kernel/containers/netns/sysfsview.c
@@ -40,33 +40,33 @@
 
 int main()
 {
-    int ret, status = 0;
-    char *script, *ltproot;
+	int ret, status = 0;
+	char *script, *ltproot;
 
-    ltproot = getenv("LTPROOT");
-    if (! ltproot) {
-        printf("LTPROOT env variable is not set\n");
-        printf("Please set LTPROOT and re-run the test.. Thankyou\n");
-        return -1;
-    }
+	ltproot = getenv("LTPROOT");
+	if (!ltproot) {
+		printf("LTPROOT env variable is not set\n");
+		printf("Please set LTPROOT and re-run the test.. Thankyou\n");
+		return -1;
+	}
 
-    script = malloc (FILENAME_MAX);
-    if (script == NULL) {
-        printf("FAIL: error while allocating mem");
-        exit(1);
-    }
+	script = malloc(FILENAME_MAX);
+	if (script == NULL) {
+		printf("FAIL: error while allocating mem");
+		exit(1);
+	}
 
-    sprintf(script, "%s/testcases/bin/parent_share.sh" , ltproot);
+	sprintf(script, "%s/testcases/bin/parent_share.sh", ltproot);
 
-    /* Parent should be able to view child sysfs and vice versa */
-    ret = system(script);
-    status = WEXITSTATUS(ret);
-    if (ret == -1 || status != 0) {
-        printf("Error while executing the script %s\n", script);
-        fflush(stdout);
-        exit(1);
-    }
+	/* Parent should be able to view child sysfs and vice versa */
+	ret = system(script);
+	status = WEXITSTATUS(ret);
+	if (ret == -1 || status != 0) {
+		printf("Error while executing the script %s\n", script);
+		fflush(stdout);
+		exit(1);
+	}
 
-    status = create_net_namespace("parent_view.sh","child_propagate.sh");
-    return status;
+	status = create_net_namespace("parent_view.sh", "child_propagate.sh");
+	return status;
 }
diff --git a/testcases/kernel/containers/netns/two_children_ns.c b/testcases/kernel/containers/netns/two_children_ns.c
index 68f0937..2e8834d 100644
--- a/testcases/kernel/containers/netns/two_children_ns.c
+++ b/testcases/kernel/containers/netns/two_children_ns.c
@@ -54,83 +54,85 @@
 
 int main()
 {
-    int ret, pid[2], status, i;
-    long long flags = 0;
-    char *child[2] , *par[2];
-    char *ltproot;
+	int ret, pid[2], status, i;
+	long long flags = 0;
+	char *child[2], *par[2];
+	char *ltproot;
 
-    flags |= CLONE_NEWNS;
-    flags |= CLONE_NEWNET;
+	flags |= CLONE_NEWNS;
+	flags |= CLONE_NEWNET;
 
 #if ! HAVE_UNSHARE
-    tst_resm(TCONF, "System doesn't support unshare.");
-    tst_exit();
+	tst_resm(TCONF, "System doesn't support unshare.");
+	tst_exit();
 #endif
 
-    /* Checking for Kernel Version */
-    if (tst_kvercmp(2,6,19) < 0)
-	return 1;
+	/* Checking for Kernel Version */
+	if (tst_kvercmp(2, 6, 19) < 0)
+		return 1;
 
-    ltproot = getenv("LTPROOT");
-    if (! ltproot) {
-        tst_resm(TINFO, "LTPROOT env variable is not set\n");
-        tst_resm(TINFO, "Please set LTPROOT and re-run the test.. Thankyou\n");
-        return -1;
-    }
+	ltproot = getenv("LTPROOT");
+	if (!ltproot) {
+		tst_resm(TINFO, "LTPROOT env variable is not set\n");
+		tst_resm(TINFO,
+			 "Please set LTPROOT and re-run the test.. Thankyou\n");
+		return -1;
+	}
 
-    child[0] = malloc (FILENAME_MAX);
-    child[1] = malloc (FILENAME_MAX);
-    par[0] = malloc (FILENAME_MAX);
-    par[1] = malloc (FILENAME_MAX);
-    if (child[0] == NULL || child[1] == NULL || \
-	par[0] == NULL || par[1] == NULL)
-    {
-        	tst_resm(TFAIL, "error while allocating mem");
-        	exit(1);
-    }
+	child[0] = malloc(FILENAME_MAX);
+	child[1] = malloc(FILENAME_MAX);
+	par[0] = malloc(FILENAME_MAX);
+	par[1] = malloc(FILENAME_MAX);
+	if (child[0] == NULL || child[1] == NULL ||
+	    par[0] == NULL || par[1] == NULL) {
+		tst_resm(TFAIL, "error while allocating mem");
+		exit(1);
+	}
 
-    sprintf(child[0], "%s/testcases/bin/child_1.sh" , ltproot);
-    sprintf(child[1], "%s/testcases/bin/child_2.sh" , ltproot);
-    sprintf(par[0], "%s/testcases/bin/parent_1.sh" , ltproot);
-    sprintf(par[1], "%s/testcases/bin/parent_2.sh" , ltproot);
+	sprintf(child[0], "%s/testcases/bin/child_1.sh", ltproot);
+	sprintf(child[1], "%s/testcases/bin/child_2.sh", ltproot);
+	sprintf(par[0], "%s/testcases/bin/parent_1.sh", ltproot);
+	sprintf(par[1], "%s/testcases/bin/parent_2.sh", ltproot);
 
-    /* Loop for creating two child Network Namespaces */
-    for (i=0;i<2;i++) {
+	/* Loop for creating two child Network Namespaces */
+	for (i = 0; i < 2; i++) {
 
-        if ((pid[i] = fork()) == 0) {
-		/* Child1 and Child2 based on the iteration. */
+		if ((pid[i] = fork()) == 0) {
+			/* Child1 and Child2 based on the iteration. */
 
 #if HAVE_UNSHARE
-		ret = unshare(flags);
-		if (ret < 0) {
-			perror("Unshare");
-			tst_resm(TFAIL, "Error:Unshare syscall failed for network namespace\n");
-			return ret;
-		}
+			ret = unshare(flags);
+			if (ret < 0) {
+				perror("Unshare");
+				tst_resm(TFAIL,
+					 "Error:Unshare syscall failed for network namespace\n");
+				return ret;
+			}
 #endif
-	    return crtchild(child[i]);
-        }
-        else{
-            //Parent
+			return crtchild(child[i]);
+		} else {
+			//Parent
 
-            ret = system(par[i]);
-            status = WEXITSTATUS(ret);
-            if (ret == -1 || status != 0) {
-                tst_resm(TFAIL, "Error while running the scripts\n");
-                exit(status);
-            }
-        }
-    } //End of FOR Loop
+			ret = system(par[i]);
+			status = WEXITSTATUS(ret);
+			if (ret == -1 || status != 0) {
+				tst_resm(TFAIL,
+					 "Error while running the scripts\n");
+				exit(status);
+			}
+		}
+	}			//End of FOR Loop
 
-    /* Parent waiting for two children to quit */
-    for (i=0;i<2;i++) {
-        ret = waitpid(pid[i], &status,__WALL);
-        status = WEXITSTATUS(status);
-        if (status != 0 || ret == -1) {
-            tst_resm(TFAIL,"waitpid() returns %d, errno %d\n", ret, status);
-            fflush(stdout);
-            exit(status);
-        }
-    }
-    exit(0);
+	/* Parent waiting for two children to quit */
+	for (i = 0; i < 2; i++) {
+		ret = waitpid(pid[i], &status, __WALL);
+		status = WEXITSTATUS(status);
+		if (status != 0 || ret == -1) {
+			tst_resm(TFAIL, "waitpid() returns %d, errno %d\n", ret,
+				 status);
+			fflush(stdout);
+			exit(status);
+		}
+	}
+	exit(0);
 }
diff --git a/testcases/kernel/containers/pidns/pidns01.c b/testcases/kernel/containers/pidns/pidns01.c
index 25a6f8d..97322fb 100644
--- a/testcases/kernel/containers/pidns/pidns01.c
+++ b/testcases/kernel/containers/pidns/pidns01.c
@@ -81,7 +81,7 @@
 		exit_val = 0;
 	} else {
 		printf("Got unexpected result of cpid=%d ppid=%d\n",
-		    cpid, ppid);
+		       cpid, ppid);
 		exit_val = 1;
 	}
 
@@ -95,16 +95,16 @@
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, child_fn1, NULL));
 
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, cleanup, "clone failed");
+		tst_brkm(TFAIL | TTERRNO, cleanup, "clone failed");
 	} else if ((wait(&status)) == -1) {
-		tst_brkm(TWARN|TERRNO, cleanup, "wait failed");
+		tst_brkm(TWARN | TERRNO, cleanup, "wait failed");
 	}
 
 	if (WIFEXITED(status) && WEXITSTATUS(status) != 0)
 		tst_resm(TFAIL, "child exited abnormally");
 	else if (WIFSIGNALED(status)) {
 		tst_resm(TFAIL, "child was killed with signal = %d",
-		    WTERMSIG(status));
+			 WTERMSIG(status));
 	}
 
 	cleanup();
diff --git a/testcases/kernel/containers/pidns/pidns02.c b/testcases/kernel/containers/pidns/pidns02.c
index 2ace298..d0ff9c8 100644
--- a/testcases/kernel/containers/pidns/pidns02.c
+++ b/testcases/kernel/containers/pidns/pidns02.c
@@ -74,15 +74,13 @@
 	sid = getsid(0);
 
 	printf("Checking session id & group id inside container\n");
-	if (pgid == PGID && sid == SID)
-	{
+	if (pgid == PGID && sid == SID) {
 		printf("Success: Got Group ID = %d & Session ID = %d\n",
-		    pgid, sid);
+		       pgid, sid);
 		exit(0);
-	}
-	else {
+	} else {
 		printf("Got unexpected result of Group ID = %d & Session ID = "
-		    "%d\n", pgid, sid);
+		       "%d\n", pgid, sid);
 		exit(1);
 	}
 }
@@ -93,15 +91,15 @@
 
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, child_fn1, NULL));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, CLEANUP, "clone failed");
+		tst_brkm(TFAIL | TTERRNO, CLEANUP, "clone failed");
 	} else if ((wait(&status)) == -1) {
-		tst_brkm(TFAIL|TERRNO, CLEANUP, "wait failed");
+		tst_brkm(TFAIL | TERRNO, CLEANUP, "wait failed");
 	}
 
 	if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
-		tst_resm(TFAIL|TERRNO, "child exited abnormally");
+		tst_resm(TFAIL | TERRNO, "child exited abnormally");
 	} else if (WIFSIGNALED(status)) {
-		tst_resm(TFAIL|TERRNO, "child exited with signal %d",
+		tst_resm(TFAIL | TERRNO, "child exited with signal %d",
 			 WTERMSIG(status));
 	}
 
@@ -114,9 +112,8 @@
  * CLEANUP() -	performs all ONE TIME CLEANUP for this test at
  *		completion or premature exit.
  */
-void
-cleanup()
+void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/containers/pidns/pidns04.c b/testcases/kernel/containers/pidns/pidns04.c
index 3224ee3..8a4e696 100644
--- a/testcases/kernel/containers/pidns/pidns04.c
+++ b/testcases/kernel/containers/pidns/pidns04.c
@@ -79,7 +79,7 @@
 	cpid = getpid();
 	ppid = getppid();
 	char mesg[] = "I was not killed !";
-       	/* Child process closes up read side of pipe */
+	/* Child process closes up read side of pipe */
 	close(fd[0]);
 
 	/* Comparing the values to make sure pidns is created correctly */
@@ -87,15 +87,14 @@
 		printf("PIDNS test is running inside container\n");
 		kill(INIT_PID, SIGKILL);
 		/* Verifying whether the container init is not killed, "
-		 If so writing into the pipe created in the parent NS" */
+		   If so writing into the pipe created in the parent NS" */
 
 		/* Send "mesg" through the write side of pipe */
-		write(fd[1], mesg, (strlen(mesg)+1));
+		write(fd[1], mesg, (strlen(mesg) + 1));
 		exit_val = 0;
-	}
-	else {
+	} else {
 		printf("got unexpected result of cpid=%d ppid=%d\n",
-		    cpid, ppid);
+		       cpid, ppid);
 		exit_val = 1;
 	}
 	exit(exit_val);
@@ -109,9 +108,9 @@
 	pipe(fd);
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, child_fn1, NULL));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, CLEANUP, "clone failed");
+		tst_brkm(TFAIL | TTERRNO, CLEANUP, "clone failed");
 	} else if (wait(&status) == -1) {
-		tst_brkm(TFAIL|TERRNO, CLEANUP, "wait failed");
+		tst_brkm(TFAIL | TERRNO, CLEANUP, "wait failed");
 	}
 
 	/* Parent process closes up write side of pipe */
@@ -123,14 +122,14 @@
 		tst_resm(TPASS, "Container init : %s", readbuffer);
 	} else {
 		tst_brkm(TFAIL, CLEANUP,
-		    "Container init is killed by SIGKILL !!!");
+			 "Container init is killed by SIGKILL !!!");
 	}
 
 	if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
 		tst_resm(TFAIL, "Container init pid exited abnormally");
 	} else if (WIFSIGNALED(status)) {
 		tst_resm(TFAIL, "Container init pid got killed by signal %d",
-		    WTERMSIG(status));
+			 WTERMSIG(status));
 	}
 	CLEANUP();
 
@@ -138,8 +137,7 @@
 
 }
 
-static void
-cleanup(void)
+static void cleanup(void)
 {
 	TEST_CLEANUP;
 	close(fd[0]);
diff --git a/testcases/kernel/containers/pidns/pidns05.c b/testcases/kernel/containers/pidns/pidns05.c
index 69233ea..a2181a1 100644
--- a/testcases/kernel/containers/pidns/pidns05.c
+++ b/testcases/kernel/containers/pidns/pidns05.c
@@ -60,8 +60,7 @@
 int TST_TOTAL = 1;
 int fd[2];
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
@@ -71,7 +70,7 @@
 	FILE *fp;
 	int ret;
 
-	fp = fopen("/proc/sys/kernel/pid_max", "r") ;
+	fp = fopen("/proc/sys/kernel/pid_max", "r");
 	if (fp != NULL) {
 		fscanf(fp, "%d", &ret);
 		fclose(fp);
@@ -86,9 +85,9 @@
  * Input parameter - Accepts pointer to pid_t : To copy the pid's matching.
  * Returns - the number of pids matched.
 */
-int find_cinit_pids(pid_t *pids)
+int find_cinit_pids(pid_t * pids)
 {
-	int next = 0, pid_max, i ;
+	int next = 0, pid_max, i;
 	pid_t parentpid, pgid, pgid2;
 
 	pid_max = max_pid();
@@ -130,22 +129,23 @@
 	/* Comparing the values to make sure pidns is created correctly */
 	if (cpid != CINIT_PID || ppid != PARENT_PID) {
 		printf("Got unexpected cpid and/or ppid (cpid=%d ppid=%d)\n",
-		    cpid, ppid);
+		       cpid, ppid);
 		exit_val = 1;
 	}
 	if (count > 1) {
 		count--;
 		ret = do_clone_unshare_test(T_CLONE, CLONE_NEWPID,
-				create_nested_container, (void *) &count);
+					    create_nested_container,
+					    (void *)&count);
 		if (ret == -1) {
-			printf("clone failed; errno = %d : %s\n" ,
-			    ret, strerror(ret));
+			printf("clone failed; errno = %d : %s\n",
+			       ret, strerror(ret));
 			exit_val = 1;
 		} else
 			exit_val = 0;
 	} else {
 		/* Sending mesg, 'Nested containers created' through the pipe */
-		write(fd[1], mesg, (strlen(mesg)+1));
+		write(fd[1], mesg, (strlen(mesg) + 1));
 		exit_val = 0;
 	}
 
@@ -162,13 +162,13 @@
 	pid_t pids_new[MAX_DEPTH];
 
 	orig_count = find_cinit_pids(pids);
-	kill(pids[MAX_DEPTH - 3], SIGKILL) ;
+	kill(pids[MAX_DEPTH - 3], SIGKILL);
 	sleep(1);
 
 	/* After killing child container, getting the New PID list */
 	new_count = find_cinit_pids(pids_new);
 
-	/* Verifying that the child containers were destroyed when parent is killed*/
+	/* Verifying that the child containers were destroyed when parent is killed */
 	if (orig_count - 2 != new_count)
 		status = -1;
 
@@ -178,11 +178,11 @@
 	}
 
 	if (status == 0)
-		tst_resm(TPASS, "The number of containers killed are %d\n" ,
-				orig_count - new_count);
+		tst_resm(TPASS, "The number of containers killed are %d\n",
+			 orig_count - new_count);
 	else
 		tst_resm(TFAIL, "Failed to kill the sub-containers of "
-				"the container %d\n", pids[MAX_DEPTH - 3]);
+			 "the container %d\n", pids[MAX_DEPTH - 3]);
 
 	/* Loops through the containers created to exit from sleep() */
 	for (i = 0; i < MAX_DEPTH; i++) {
@@ -205,7 +205,7 @@
 	 */
 	pid = fork();
 	if (pid == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+		tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 	} else if (pid != 0) {
 		/*
 		 * NOTE: use waitpid so that we know we're waiting for the
@@ -230,12 +230,12 @@
 	pgid = getpgid(pid);
 	ret = pipe(fd);
 	if (ret == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe failed");
 
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID,
-	    create_nested_container, (void *)&count));
+				   create_nested_container, (void *)&count));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, cleanup, "clone failed");
+		tst_brkm(TFAIL | TTERRNO, cleanup, "clone failed");
 	}
 
 	close(fd[1]);
@@ -246,7 +246,7 @@
 		tst_resm(TINFO, " %d %s", MAX_DEPTH, readbuffer);
 	else
 		tst_brkm(TFAIL, cleanup, "unable to create %d containers",
-		    MAX_DEPTH);
+			 MAX_DEPTH);
 
 	/* Kill the container created */
 	kill_nested_containers();
diff --git a/testcases/kernel/containers/pidns/pidns06.c b/testcases/kernel/containers/pidns/pidns06.c
index 71e6037..695b9b8 100644
--- a/testcases/kernel/containers/pidns/pidns06.c
+++ b/testcases/kernel/containers/pidns/pidns06.c
@@ -55,7 +55,7 @@
 
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 }
 
@@ -75,7 +75,7 @@
 	/* Checking the values to make sure pidns is created correctly */
 	if (cpid != CINIT_PID || ppid != PARENT_PID) {
 		printf("Unexpected result for Container: init "
-		    "pid=%d ppid=%d\n", cpid, ppid);
+		       "pid=%d ppid=%d\n", cpid, ppid);
 		exit(1);
 	}
 
@@ -86,12 +86,12 @@
 	ret = kill(*par_pid, SIGKILL);
 	if (ret == -1 && errno == ESRCH) {
 		printf("Container: killing parent pid=%d failed as expected "
-		    "with ESRCH\n", *par_pid);
+		       "with ESRCH\n", *par_pid);
 	} else {
 		printf("Container: killing parent pid=%d, didn't fail as "
-		    "expected with ESRCH (%d) and a return value of -1. Got "
-		    "%d (\"%s\") and a return value of %d instead.\n",
-		    *par_pid, ESRCH, errno, strerror(errno), ret);
+		       "expected with ESRCH (%d) and a return value of -1. Got "
+		       "%d (\"%s\") and a return value of %d instead.\n",
+		       *par_pid, ESRCH, errno, strerror(errno), ret);
 		exit(1);
 	}
 	/*
@@ -101,12 +101,12 @@
 	ret = kill(FAKE_PID, SIGKILL);
 	if (ret == -1 && errno == ESRCH) {
 		printf("Container: killing non-existent pid failed as expected "
-		    "with ESRCH\n");
+		       "with ESRCH\n");
 	} else {
 		printf("Container: killing non-existent pid, didn't fail as "
-		    "expected with ESRCH (%d) and a return value of -1. Got "
-		    "%d (\"%s\") and a return value of %d instead.\n",
-		    ESRCH, errno, strerror(errno), ret);
+		       "expected with ESRCH (%d) and a return value of -1. Got "
+		       "%d (\"%s\") and a return value of %d instead.\n",
+		       ESRCH, errno, strerror(errno), ret);
 		exit(1);
 	}
 
@@ -120,11 +120,11 @@
 
 	tst_resm(TINFO, "Parent: Passing the pid of the process %d", pid);
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, kill_pid_in_childfun,
-	    (void *) &pid));
+				   (void *)&pid));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "clone failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "clone failed");
 	} else if (wait(&status) == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "wait failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "wait failed");
 	}
 
 	cleanup();
diff --git a/testcases/kernel/containers/pidns/pidns10.c b/testcases/kernel/containers/pidns/pidns10.c
index 7aca3d0..533c3c8 100644
--- a/testcases/kernel/containers/pidns/pidns10.c
+++ b/testcases/kernel/containers/pidns/pidns10.c
@@ -73,11 +73,11 @@
 
 	if ((ret = kill(-1, SIGUSR1)) == -1 && errno == ESRCH) {
 		printf("cinit: kill(-1, sig) failed with -1 / ESRCH as "
-		    "expected\n");
+		       "expected\n");
 		exit_val = 0;
 	} else {
 		printf("cinit: kill(-1, sig) didn't fail with -1 / ESRCH "
-		    "(%d); failed with %d / %d instead", ESRCH, ret, errno);
+		       "(%d); failed with %d / %d instead", ESRCH, ret, errno);
 		exit_val = 1;
 	}
 	exit(exit_val);
@@ -93,7 +93,7 @@
 	/* Container creation on PID namespace */
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, child_fn, NULL));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TBROK|TTERRNO, CLEANUP, "clone failed");
+		tst_brkm(TBROK | TTERRNO, CLEANUP, "clone failed");
 	}
 
 	sleep(1);
@@ -113,7 +113,7 @@
  */
 static void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 
 }
diff --git a/testcases/kernel/containers/pidns/pidns12.c b/testcases/kernel/containers/pidns/pidns12.c
index d5c2f4d..bd5ab06 100644
--- a/testcases/kernel/containers/pidns/pidns12.c
+++ b/testcases/kernel/containers/pidns/pidns12.c
@@ -60,7 +60,7 @@
  */
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 
 }
@@ -68,15 +68,15 @@
 /*
  * child_signal_handler() - dummy function for sigaction()
  */
-static void child_signal_handler(int sig, siginfo_t *si, void *unused)
+static void child_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	/* Recieved SIGUSR1. Check sender pid */
 	if (si->si_pid == 0)
-		tst_resm(TPASS, "cinit: signalling PID (from other namespace)"\
-				" is 0 as expected");
+		tst_resm(TPASS, "cinit: signalling PID (from other namespace)"
+			 " is 0 as expected");
 	else
-		tst_resm(TFAIL, "cinit: signalling PID (from other namespace)"\
-				" is not 0, but %d.", si->si_pid);
+		tst_resm(TFAIL, "cinit: signalling PID (from other namespace)"
+			 " is not 0, but %d.", si->si_pid);
 }
 
 /*
@@ -103,8 +103,8 @@
 	sigfillset(&sa.sa_mask);
 	sa.sa_sigaction = child_signal_handler;
 	if (sigaction(SIGUSR1, &sa, NULL) == -1) {
-		tst_resm(TBROK, "cinit: sigaction() failed(%s).",\
-				strerror(errno));
+		tst_resm(TBROK, "cinit: sigaction() failed(%s).",
+			 strerror(errno));
 		cleanup();
 	}
 
@@ -143,10 +143,9 @@
 		cleanup();
 	}
 
-	cpid = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, NULL);
+	cpid = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, NULL);
 	if (cpid < 0) {
-		tst_resm(TBROK, "parent: clone() failed(%s).",\
-				strerror(errno));
+		tst_resm(TBROK, "parent: clone() failed(%s).", strerror(errno));
 		cleanup();
 	}
 
@@ -167,12 +166,12 @@
 	}
 
 	if (waitpid(cpid, &status, 0) < 0)
-		tst_resm(TWARN, "parent: waitpid() failed(%s).",\
-				strerror(errno));
+		tst_resm(TWARN, "parent: waitpid() failed(%s).",
+			 strerror(errno));
 
 	if (WIFSIGNALED(status) && WTERMSIG(status))
-		tst_resm(TBROK, "child is terminated by signal(%s)",\
-				strsignal(WTERMSIG(status)));
+		tst_resm(TBROK, "child is terminated by signal(%s)",
+			 strsignal(WTERMSIG(status)));
 
 	/* Cleanup and exit */
 	close(pipefd[0]);
diff --git a/testcases/kernel/containers/pidns/pidns13.c b/testcases/kernel/containers/pidns/pidns13.c
index 522d072..ef31fc6 100644
--- a/testcases/kernel/containers/pidns/pidns13.c
+++ b/testcases/kernel/containers/pidns/pidns13.c
@@ -62,7 +62,7 @@
  */
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 
 }
@@ -70,11 +70,11 @@
 /*
  * child_signal_handler() - dummy function for sigaction()
  */
-static void child_signal_handler(int sig, siginfo_t *si, void *unused)
+static void child_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	/* sigtimedwait() traps siginfo details, so this wont be called */
-	tst_resm(TWARN, "cinit(pid %d): control should have not reached here!",\
-			getpid());
+	tst_resm(TWARN, "cinit(pid %d): control should have not reached here!",
+		 getpid());
 }
 
 /*
@@ -93,8 +93,7 @@
 	pid = getpid();
 	ppid = getppid();
 	if (pid != CHILD_PID || ppid != PARENT_PID) {
-		tst_resm(TBROK, "cinit%d: pidns is not created.",\
-				cinit_no);
+		tst_resm(TBROK, "cinit%d: pidns is not created.", cinit_no);
 		cleanup();
 	}
 
@@ -117,8 +116,8 @@
 			cleanup();
 		}
 
-		if (fcntl(pipe_fd[0], F_SETFL,\
-				fcntl(pipe_fd[0], F_GETFL)|O_ASYNC) == -1) {
+		if (fcntl(pipe_fd[0], F_SETFL,
+			  fcntl(pipe_fd[0], F_GETFL) | O_ASYNC) == -1) {
 			tst_resm(TBROK, "cinit1: fcntl(F_SETFL) failed");
 			cleanup();
 		}
@@ -150,11 +149,11 @@
 
 		/* Recieved SIGUSR1. Check details. */
 		if (info.si_fd == pipe_fd[0] && info.si_code == POLL_IN)
-			tst_resm(TPASS, "cinit1: si_fd is %d, si_code is %d",\
-					info.si_fd, info.si_code);
+			tst_resm(TPASS, "cinit1: si_fd is %d, si_code is %d",
+				 info.si_fd, info.si_code);
 		else
-			tst_resm(TFAIL, "cinit1: si_fd is %d, si_code is %d",\
-					info.si_fd, info.si_code);
+			tst_resm(TFAIL, "cinit1: si_fd is %d, si_code is %d",
+				 info.si_fd, info.si_code);
 
 		/* all done, close the descriptors opened */
 		close(pipe_fd[0]);
@@ -210,11 +209,11 @@
 
 	/* Create container 1 */
 	*cinit_no = 1;
-	cpid1 = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, cinit_no);
+	cpid1 = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, cinit_no);
 
 	/* Create container 2 */
 	*cinit_no = 2;
-	cpid2 = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, cinit_no);
+	cpid2 = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, cinit_no);
 	if (cpid1 < 0 || cpid2 < 0) {
 		tst_resm(TBROK, "parent: clone() failed.");
 		cleanup();
@@ -229,15 +228,15 @@
 		tst_resm(TWARN, "parent: waitpid(cpid2) failed.");
 
 	if (WIFSIGNALED(status) && WTERMSIG(status))
-		tst_resm(TWARN, "parent: cinit2 is terminated by signal(%s)",\
-				strsignal(WTERMSIG(status)));
+		tst_resm(TWARN, "parent: cinit2 is terminated by signal(%s)",
+			 strsignal(WTERMSIG(status)));
 
 	if (waitpid(cpid1, &status, 0) < 0)
 		tst_resm(TWARN, "parent: waitpid(cpid1) failed.");
 
 	if (WIFSIGNALED(status) && WTERMSIG(status))
-		tst_resm(TWARN, "parent: cinit1 is terminated by signal(%s)",\
-				strsignal(WTERMSIG(status)));
+		tst_resm(TWARN, "parent: cinit1 is terminated by signal(%s)",
+			 strsignal(WTERMSIG(status)));
 
 	/* Cleanup and exit */
 	cleanup();
diff --git a/testcases/kernel/containers/pidns/pidns16.c b/testcases/kernel/containers/pidns/pidns16.c
index 3532351..8a232c6 100644
--- a/testcases/kernel/containers/pidns/pidns16.c
+++ b/testcases/kernel/containers/pidns/pidns16.c
@@ -62,25 +62,25 @@
  */
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 
 }
 
-void child_signal_handler(int sig, siginfo_t *si, void *unused)
+void child_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	static int c = 1;
 	/* Verifying from which process the signal handler is signalled */
 
 	if ((c == 1) && (si->si_pid == globalpid))
-		tst_resm(TINFO, "sig_handler is signalled from pid  %d" ,
-				globalpid);
+		tst_resm(TINFO, "sig_handler is signalled from pid  %d",
+			 globalpid);
 	else if ((c == 2) && (si->si_pid == CHILD_PID))
-		tst_resm(TINFO, "sig_handler is signalled from pid  %d" ,
-				CHILD_PID);
+		tst_resm(TINFO, "sig_handler is signalled from pid  %d",
+			 CHILD_PID);
 	else
 		tst_resm(TBROK, "Unexpected value for Sending-ProcessID"
-				" when signal handler called %d\n", si->si_pid);
+			 " when signal handler called %d\n", si->si_pid);
 	c++;
 }
 
@@ -108,13 +108,13 @@
 
 	pause();
 	tst_resm(TINFO, "Container: Resumed after receiving SIGUSR1 "
-			"from parentNS ");
+		 "from parentNS ");
 	if (kill(pid, SIGUSR1) != 0) {
 		tst_resm(TFAIL, "kill(SIGUSR1) fails.");
 		cleanup();
 	}
 	tst_resm(TINFO, "Container: Resumed after sending SIGUSR1 "
-			"from container itself");
+		 "from container itself");
 	_exit(10);
 }
 
@@ -146,10 +146,10 @@
 
 	if ((WIFEXITED(status)) && (WEXITSTATUS(status) == 10))
 		tst_resm(TPASS, "container init continued successfuly, "
-			"after handling signal -USR1\n");
-	 else
+			 "after handling signal -USR1\n");
+	else
 		tst_resm(TFAIL, "c-init failed to continue after "
-				"passing kill -USR1");
+			 "passing kill -USR1");
 	cleanup();
 	tst_exit();
 }
diff --git a/testcases/kernel/containers/pidns/pidns17.c b/testcases/kernel/containers/pidns/pidns17.c
index 8e23060..b27392a 100644
--- a/testcases/kernel/containers/pidns/pidns17.c
+++ b/testcases/kernel/containers/pidns/pidns17.c
@@ -116,9 +116,9 @@
 			 * WTERMSIG.
 			 */
 			printf("cinit: found a child alive still "
-			    "%d exit: %d, %d, signal %d, %d", i,
-			    WIFEXITED(status), WEXITSTATUS(status),
-			    WIFSIGNALED(status), WTERMSIG(status));
+			       "%d exit: %d, %d, signal %d, %d", i,
+			       WIFEXITED(status), WEXITSTATUS(status),
+			       WIFSIGNALED(status), WTERMSIG(status));
 			exit_val = 1;
 		}
 	}
@@ -138,7 +138,7 @@
 	/* Container creation on PID namespace */
 	TEST(do_clone_unshare_test(T_CLONE, CLONE_NEWPID, child_fn, NULL));
 	if (TEST_RETURN == -1) {
-		tst_brkm(TBROK|TERRNO, CLEANUP, "clone failed");
+		tst_brkm(TBROK | TERRNO, CLEANUP, "clone failed");
 	}
 
 	sleep(1);
@@ -149,8 +149,8 @@
 		tst_resm(TFAIL, "container exited abnormally");
 	else if (WIFSIGNALED(status))
 		tst_resm(TFAIL,
-		    "container was signaled with signal = %d",
-		    WTERMSIG(status));
+			 "container was signaled with signal = %d",
+			 WTERMSIG(status));
 
 	CLEANUP();
 	tst_exit();
@@ -163,6 +163,6 @@
  */
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/containers/pidns/pidns20.c b/testcases/kernel/containers/pidns/pidns20.c
index 753624b..e129659 100644
--- a/testcases/kernel/containers/pidns/pidns20.c
+++ b/testcases/kernel/containers/pidns/pidns20.c
@@ -56,25 +56,25 @@
 int errno;
 int parent_cinit[2];
 int cinit_parent[2];
-int broken = 1; /* broken should be 0 when test completes properly */
+int broken = 1;			/* broken should be 0 when test completes properly */
 
 #define CHILD_PID       1
 #define PARENT_PID      0
 
 void cleanup()
 {
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 }
 
 /*
  * child_signal_handler() - to handle SIGUSR1
  */
-static void child_signal_handler(int sig, siginfo_t *si, void *unused)
+static void child_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	if (si->si_signo != SIGUSR1)
-		tst_resm(TBROK, "cinit: recieved %s unexpectedly!",\
-				strsignal(si->si_signo));
+		tst_resm(TBROK, "cinit: recieved %s unexpectedly!",
+			 strsignal(si->si_signo));
 	else
 		tst_resm(TPASS, "cinit: user function is called as expected");
 
@@ -160,12 +160,12 @@
 
 	/* Create pipes for intercommunication */
 	if (pipe(parent_cinit) == -1 || pipe(cinit_parent) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe failed");
 	}
 
-	cpid = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, NULL);
+	cpid = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, NULL);
 	if (cpid == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "clone failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "clone failed");
 	}
 
 	/* Setup pipe read and write ends */
@@ -180,26 +180,27 @@
 
 	/* Enqueue SIGUSR1 in pending signal queue of container */
 	if (kill(cpid, SIGUSR1) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "kill() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "kill() failed");
 	}
 
 	tst_resm(TINFO, "parent: signalled SIGUSR1 to container");
 	if (write(parent_cinit[1], "p:go", 5) != 5) {
-		tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 	}
 
 	/* collect exit status of child */
 	if (wait(&status) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "wait failed");
 	}
 
 	if (WIFSIGNALED(status)) {
 		if (WTERMSIG(status) == SIGUSR1)
 			tst_resm(TFAIL,
-			    "user function was not called inside cinit");
+				 "user function was not called inside cinit");
 		else
 			tst_resm(TBROK,
-			    "cinit was terminated by %d", WTERMSIG(status));
+				 "cinit was terminated by %d",
+				 WTERMSIG(status));
 	}
 
 	/* Cleanup and exit */
diff --git a/testcases/kernel/containers/pidns/pidns30.c b/testcases/kernel/containers/pidns/pidns30.c
index 8378b6d..71e87c1 100644
--- a/testcases/kernel/containers/pidns/pidns30.c
+++ b/testcases/kernel/containers/pidns/pidns30.c
@@ -124,7 +124,7 @@
  * XXX (garrcoop): add calls to cleanup_child() -- or should this be handled
  * from the libltp signal handler?
  */
-static void child_signal_handler(int sig, siginfo_t *si, void *unused)
+static void child_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	char buf[256];
 	struct mq_attr attr;
@@ -136,13 +136,13 @@
 
 	if (si->si_code != SI_MESGQ) {
 		printf("expected signal code SI_MESGQ; got %d instead\n",
-		    si->si_code);
+		       si->si_code);
 		return;
 	}
 
 	if (si->si_pid) {
 		printf("expected signal originator PID = 0; got %d instead\n",
-		    si->si_pid);
+		       si->si_pid);
 		return;
 	} else {
 		printf("signal originator PID = 0\n");
@@ -241,24 +241,26 @@
 	pid_t cpid;
 
 	if (pipe(child_to_father) == -1 || pipe(father_to_child) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe failed");
 	}
 
 	syscall(__NR_mq_unlink, mqname);
 
 	/* container creation on PID namespace */
-	cpid = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, NULL);
+	cpid = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, NULL);
 	if (cpid == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "clone failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "clone failed");
 
-	mqd = syscall(__NR_mq_open, mqname, O_RDWR|O_CREAT|O_EXCL, 0777, NULL);
+	mqd =
+	    syscall(__NR_mq_open, mqname, O_RDWR | O_CREAT | O_EXCL, 0777,
+		    NULL);
 	if (mqd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mq_open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mq_open failed");
 	else
 		tst_resm(TINFO, "successfully created posix mqueue");
 
 	if (write(father_to_child[1], buf, 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 
 	/* Close the appropriate end of each pipe */
 	close(child_to_father[1]);
@@ -267,21 +269,22 @@
 	/* Is container ready */
 	read(child_to_father[0], buf, 5);
 	if (strcmp(buf, "c:ok") != 0)
-		tst_brkm(TBROK, cleanup, "container did not respond as expected!");
+		tst_brkm(TBROK, cleanup,
+			 "container did not respond as expected!");
 
 	rc = mq_send(mqd, MSG, strlen(MSG), MSG_PRIO);
 	if (rc == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mq_send failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mq_send failed");
 	else
 		tst_resm(TINFO, "mq_send succeeded");
 
 	/* Tell the child the message has been sent */
 	if (write(father_to_child[1], "f:ok", 5) != 5)
-		tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 
 	/* Wait for child to finish */
 	if (wait(&status) == -1)
-		tst_resm(TBROK|TERRNO, "wait failed");
+		tst_resm(TBROK | TERRNO, "wait failed");
 
 	cleanup();
 
diff --git a/testcases/kernel/containers/pidns/pidns31.c b/testcases/kernel/containers/pidns/pidns31.c
index a5ac272..2a07489 100644
--- a/testcases/kernel/containers/pidns/pidns31.c
+++ b/testcases/kernel/containers/pidns/pidns31.c
@@ -142,7 +142,7 @@
 	if (step != NO_STEP)
 		cleanup_resources(step, mqd);
 
-	/* Clean the test testcase as LTP wants*/
+	/* Clean the test testcase as LTP wants */
 	TEST_CLEANUP;
 
 	tst_exit();
@@ -178,17 +178,16 @@
 	tst_resm(TINFO, "cinit: my father is ready to receive a message");
 
 	mqd = syscall(__NR_mq_open, mqname, O_WRONLY);
-	if (mqd == (mqd_t)-1) {
+	if (mqd == (mqd_t) - 1) {
 		tst_resm(TBROK, "cinit: mq_open() failed (%s)",
-			strerror(errno));
+			 strerror(errno));
 		cleanup_mqueue(TBROK, NO_STEP, 0);
 	}
 	tst_resm(TINFO, "cinit: mq_open succeeded");
 
-	if (mq_send(mqd, MSG, strlen(MSG), MSG_PRIO) ==
-		(mqd_t)-1) {
+	if (mq_send(mqd, MSG, strlen(MSG), MSG_PRIO) == (mqd_t) - 1) {
 		tst_resm(TBROK, "cinit: mq_send() failed (%s)",
-			strerror(errno));
+			 strerror(errno));
 		cleanup_mqueue(TBROK, C_STEP_0, mqd);
 	}
 	tst_resm(TINFO, "cinit: mq_send() succeeded");
@@ -201,7 +200,7 @@
 /*
  * father_signal_handler()
  */
-static void father_signal_handler(int sig, siginfo_t *si, void *unused)
+static void father_signal_handler(int sig, siginfo_t * si, void *unused)
 {
 	char buf[256];
 	struct mq_attr attr;
@@ -209,13 +208,13 @@
 
 	if (si->si_signo != SIGUSR1) {
 		tst_resm(TBROK, "father: received %s unexpectedly",
-			strsignal(si->si_signo));
+			 strsignal(si->si_signo));
 		return;
 	}
 
 	if (si->si_code != SI_MESGQ) {
 		tst_resm(TBROK, "father: expected signal code SI_MESGQ - "
-			"Got %d", si->si_code);
+			 "Got %d", si->si_code);
 		return;
 	}
 
@@ -228,8 +227,8 @@
 
 	if (si->si_pid != info->pid) {
 		tst_resm(TFAIL,
-			"father: expected signal originator PID = %d - Got %d",
-			info->pid, si->si_pid);
+			 "father: expected signal originator PID = %d - Got %d",
+			 info->pid, si->si_pid);
 		return;
 	}
 
@@ -263,16 +262,18 @@
 	}
 
 	syscall(__NR_mq_unlink, mqname);
-	mqd = syscall(__NR_mq_open, mqname, O_RDWR|O_CREAT|O_EXCL, 0777, NULL);
-	if (mqd == (mqd_t)-1) {
+	mqd =
+	    syscall(__NR_mq_open, mqname, O_RDWR | O_CREAT | O_EXCL, 0777,
+		    NULL);
+	if (mqd == (mqd_t) - 1) {
 		tst_resm(TBROK, "parent: mq_open() failed (%s)",
-			strerror(errno));
+			 strerror(errno));
 		cleanup_mqueue(TBROK, F_STEP_0, 0);
 	}
 	tst_resm(TINFO, "parent: successfully created posix mqueue");
 
 	/* container creation on PID namespace */
-	cpid = ltp_clone_quick(CLONE_NEWPID|SIGCHLD, child_fn, NULL);
+	cpid = ltp_clone_quick(CLONE_NEWPID | SIGCHLD, child_fn, NULL);
 	if (cpid < 0) {
 		tst_resm(TBROK, "parent: clone() failed(%s)", strerror(errno));
 		cleanup_mqueue(TBROK, F_STEP_1, mqd);
@@ -285,9 +286,9 @@
 	info.mqd = mqd;
 	info.pid = cpid;
 	notif.sigev_value.sival_ptr = &info;
-	if (syscall(__NR_mq_notify, mqd, &notif) == (mqd_t)-1) {
+	if (syscall(__NR_mq_notify, mqd, &notif) == (mqd_t) - 1) {
 		tst_resm(TBROK, "parent: mq_notify() failed (%s)",
-			strerror(errno));
+			 strerror(errno));
 		cleanup_mqueue(TBROK, F_STEP_1, mqd);
 	}
 	tst_resm(TINFO, "parent: successfully registered for notification");
@@ -298,7 +299,7 @@
 	sa.sa_sigaction = father_signal_handler;
 	if (sigaction(SIGUSR1, &sa, NULL) == -1) {
 		tst_resm(TBROK, "parent: sigaction() failed(%s)",
-			strerror(errno));
+			 strerror(errno));
 		cleanup_mqueue(TBROK, F_STEP_2, mqd);
 	}
 	tst_resm(TINFO, "parent: successfully registered handler for SIGUSR1");
diff --git a/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c b/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c
index ebf0491..d5ef4d7 100644
--- a/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c
+++ b/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c
@@ -22,18 +22,19 @@
 
 int dummy(void *v)
 {
-      return 0;
+	return 0;
 }
+
 int main()
 {
-        int pid;
+	int pid;
 
-        if (tst_kvercmp(2,6,19) < 0)
-                return 1;
+	if (tst_kvercmp(2, 6, 19) < 0)
+		return 1;
 
 	pid = ltp_clone_quick(CLONE_NEWIPC, dummy, NULL);
 
-        if (pid == -1)
-                return 3;
-      return 0;
+	if (pid == -1)
+		return 3;
+	return 0;
 }
diff --git a/testcases/kernel/containers/sysvipc/mesgq_nstest.c b/testcases/kernel/containers/sysvipc/mesgq_nstest.c
index bc5e357..c318a65 100644
--- a/testcases/kernel/containers/sysvipc/mesgq_nstest.c
+++ b/testcases/kernel/containers/sysvipc/mesgq_nstest.c
@@ -43,22 +43,22 @@
 int p1[2];
 int p2[2];
 struct msg_buf {
-		long int mtype;	 /* type of received/sent message */
-		char mtext[80];	 /* text of the message */
-	} msg;
+	long int mtype;		/* type of received/sent message */
+	char mtext[80];		/* text of the message */
+} msg;
 
 void mesgq_read(id)
 {
 	int READMAX = 80;
 	int n;
-	/* read msg type 5 on the Q; msgtype, flags are last 2 params..*/
+	/* read msg type 5 on the Q; msgtype, flags are last 2 params.. */
 
 	n = msgrcv(id, &msg, READMAX, 5, 0);
 	if (n == -1)
 		perror("msgrcv"), tst_exit();
 
 	tst_resm(TINFO, "Mesg read of %d bytes; Type %ld: Msg: %.*s\n",
-					n, msg.mtype, n, msg.mtext);
+		 n, msg.mtype, n, msg.mtext);
 }
 
 int check_mesgq(void *vtest)
@@ -91,13 +91,19 @@
 	if (argc != 2) {
 		tst_resm(TFAIL, "Usage: %s <clone|unshare|none>\n", argv[0]);
 		tst_resm(TFAIL, " where clone, unshare, or fork specifies"
-				" unshare method.");
+			 " unshare method.");
 		tst_exit();
 	}
 
 	/* Using PIPE's to sync between container and Parent */
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	if (pipe(p2) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
 
 	tsttype = NONESTR;
 
@@ -114,12 +120,13 @@
 		perror("msgget");
 		/* Retry without attempting to create the MQ */
 		id = msgget(KEY_VAL, 0);
-		if (id == -1) perror("msgget failure"), exit(1);
+		if (id == -1)
+			perror("msgget failure"), exit(1);
 	}
 
 	msg.mtype = 5;
 	strcpy(msg.mtext, "Message of type 5!");
-	n = msgsnd(id, &msg, strlen( msg.mtext), 0);
+	n = msgsnd(id, &msg, strlen(msg.mtext), 0);
 	if (n == -1)
 		perror("msgsnd"), tst_exit();
 
@@ -139,15 +146,18 @@
 	if (strcmp(buf, "exists") == 0) {
 		if (use_clone == T_NONE)
 			tst_resm(TPASS, "Plain cloned process found mesgq "
-				  "inside container\n");
+				 "inside container\n");
 		else
-			tst_resm(TFAIL, "%s: Container init process found mesgq\n",
-				tsttype);
+			tst_resm(TFAIL,
+				 "%s: Container init process found mesgq\n",
+				 tsttype);
 	} else {
 		if (use_clone == T_NONE)
-			tst_resm(TFAIL, "Plain cloned process didn't find mesgq\n");
+			tst_resm(TFAIL,
+				 "Plain cloned process didn't find mesgq\n");
 		else
-			tst_resm(TPASS, "%s: Container didn't find mesgq", tsttype);
+			tst_resm(TPASS, "%s: Container didn't find mesgq",
+				 tsttype);
 	}
 
 	/* Delete the mesgQ */
diff --git a/testcases/kernel/containers/sysvipc/sem_nstest.c b/testcases/kernel/containers/sysvipc/sem_nstest.c
index 76ab8e7..305ca55 100644
--- a/testcases/kernel/containers/sysvipc/sem_nstest.c
+++ b/testcases/kernel/containers/sysvipc/sem_nstest.c
@@ -58,7 +58,7 @@
 	else {
 		write(p2[1], "exists", 7);
 		tst_resm(TINFO, "PID %d: Fetched existing semaphore..id = %d\n",
-						getpid(), id );
+			 getpid(), id);
 	}
 	tst_exit();
 
@@ -74,13 +74,19 @@
 	if (argc != 2) {
 		tst_resm(TFAIL, "Usage: %s <clone| unshare| none>\n", argv[0]);
 		tst_resm(TFAIL, " where clone, unshare, or fork specifies"
-				" unshare method.");
+			 " unshare method.");
 		tst_exit();
 	}
 
 	/* Using PIPE's to sync between container and Parent */
-	if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	if (pipe(p2) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
 
 	if (strcmp(argv[1], "clone") == 0) {
 		use_clone = T_CLONE;
@@ -93,7 +99,7 @@
 	/* 1. Create (or fetch if existing) the binary semaphore */
 	id = semget(MY_KEY, 1, IPC_CREAT | IPC_EXCL | 0666);
 	if (id == -1) {
-		perror( "Semaphore create" );
+		perror("Semaphore create");
 		if (errno != EEXIST) {
 			perror("semget failure");
 			tst_resm(TBROK, "Semaphore creation failed\n");
@@ -101,7 +107,7 @@
 		}
 		id = semget(MY_KEY, 1, 0);
 		if (id == -1) {
-			perror( "Semaphore create" );
+			perror("Semaphore create");
 			tst_resm(TBROK, "Semaphore operation failed\n");
 			tst_exit();
 		}
@@ -109,7 +115,9 @@
 
 	tst_resm(TINFO, "Semaphore namespaces Isolation test : %s\n", tsttype);
 	/* fire off the test */
-	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_semaphore, NULL);
+	ret =
+	    do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_semaphore,
+				  NULL);
 	if (ret < 0) {
 		tst_resm(TFAIL, "%s failed\n", tsttype);
 		tst_exit();
@@ -123,15 +131,18 @@
 	if (strcmp(buf, "exists") == 0) {
 		if (use_clone == T_NONE)
 			tst_resm(TPASS, "Plain cloned process found semaphore "
-						    "inside container\n");
+				 "inside container\n");
 		else
-			tst_resm(TFAIL, "%s: Container init process found semaphore\n",
-							tsttype);
+			tst_resm(TFAIL,
+				 "%s: Container init process found semaphore\n",
+				 tsttype);
 	} else {
 		if (use_clone == T_NONE)
-			tst_resm(TFAIL, "Plain cloned process didn't find semaphore\n");
+			tst_resm(TFAIL,
+				 "Plain cloned process didn't find semaphore\n");
 		else
-			tst_resm(TPASS, "%s: Container didn't find semaphore", tsttype);
+			tst_resm(TPASS, "%s: Container didn't find semaphore",
+				 tsttype);
 	}
 
 	/* Delete the semaphore */
diff --git a/testcases/kernel/containers/sysvipc/semtest_2ns.c b/testcases/kernel/containers/sysvipc/semtest_2ns.c
index 1f59acd..f80f6dc 100644
--- a/testcases/kernel/containers/sysvipc/semtest_2ns.c
+++ b/testcases/kernel/containers/sysvipc/semtest_2ns.c
@@ -58,12 +58,12 @@
 static struct sembuf semop_lock[2] = {
 	/* sem_num, sem_op, flag */
 	{0, 0, 0},		/* wait for sem#0 to become 0 */
-	{0, 1, SEM_UNDO}  /* then increment sem#0 by 1 */
+	{0, 1, SEM_UNDO}	/* then increment sem#0 by 1 */
 };
 
 static struct sembuf semop_unlock[1] = {
 	/* sem_num, sem_op, flag */
-	{0, -1, (IPC_NOWAIT | SEM_UNDO)}   /* decrement sem#0 by 1 (sets it to 0) */
+	{0, -1, (IPC_NOWAIT | SEM_UNDO)}	/* decrement sem#0 by 1 (sets it to 0) */
 };
 
 /*
@@ -97,7 +97,7 @@
 	/* 1. Create (or fetch if existing) the binary semaphore */
 	id1 = semget(MY_KEY, 1, IPC_CREAT | IPC_EXCL | 0666);
 	if (id1 == -1) {
-		perror( "Semaphore create" );
+		perror("Semaphore create");
 		if (errno != EEXIST) {
 			perror("semget failure");
 			tst_resm(TBROK, "semget failure\n");
@@ -105,7 +105,7 @@
 		}
 		id1 = semget(MY_KEY, 1, 0);
 		if (id1 == -1) {
-			perror( "Semaphore create" );
+			perror("Semaphore create");
 			tst_resm(TBROK, "semget failure\n");
 			tst_exit();
 		}
@@ -135,18 +135,19 @@
 		sem_lock(id2);
 		write(p2[1], "exists", 7);
 	} else {
-			/* Trying to create a new semaphore, if semaphore is not existing */
-			id2 = semget(MY_KEY, 1, IPC_CREAT | IPC_EXCL | 0666);
-			if (id2 == -1) {
-				perror( "Semaphore create" );
-				if (errno != EEXIST) {
-					perror("semget failure");
-					tst_resm(TBROK, "semget failure\n");
-				}
-			} else
-				tst_resm(TINFO, "Cont2: Able to create semaphore with sameKey");
-			/* Passing the pipe Not-found mesg */
-			write(p2[1], "notfnd", 7);
+		/* Trying to create a new semaphore, if semaphore is not existing */
+		id2 = semget(MY_KEY, 1, IPC_CREAT | IPC_EXCL | 0666);
+		if (id2 == -1) {
+			perror("Semaphore create");
+			if (errno != EEXIST) {
+				perror("semget failure");
+				tst_resm(TBROK, "semget failure\n");
+			}
+		} else
+			tst_resm(TINFO,
+				 "Cont2: Able to create semaphore with sameKey");
+		/* Passing the pipe Not-found mesg */
+		write(p2[1], "notfnd", 7);
 	}
 
 	tst_exit();
@@ -155,20 +156,26 @@
 
 int main(int argc, char *argv[])
 {
-	int ret, id,  use_clone = T_NONE;
+	int ret, id, use_clone = T_NONE;
 	char *tsttype = NONESTR;
 	char buf[7];
 
 	if (argc != 2) {
 		tst_resm(TINFO, "Usage: %s <clone| unshare| none>", argv[0]);
 		tst_resm(TINFO, " where clone, unshare, or fork specifies"
-				" unshare method.\n");
+			 " unshare method.\n");
 		tst_exit();
 	}
 
 	/* Using PIPE's to sync between container and Parent */
-	if (pipe(p1) == -1) { perror("pipe1"); tst_exit(); }
-	if (pipe(p2) == -1) { perror("pipe2"); tst_exit(); }
+	if (pipe(p1) == -1) {
+		perror("pipe1");
+		tst_exit();
+	}
+	if (pipe(p2) == -1) {
+		perror("pipe2");
+		tst_exit();
+	}
 
 	if (strcmp(argv[1], "clone") == 0) {
 		use_clone = T_CLONE;
@@ -197,17 +204,19 @@
 
 	if (strcmp(buf, "exists") == 0)
 		if (use_clone == T_NONE)
-			tst_resm(TPASS, "Plain cloned process able to access the semaphore "
-							"created\n");
+			tst_resm(TPASS,
+				 "Plain cloned process able to access the semaphore "
+				 "created\n");
 		else
-			tst_resm(TFAIL, "%s : In namespace2 found the semaphore "
-							"created in Namespace1\n", tsttype);
+			tst_resm(TFAIL,
+				 "%s : In namespace2 found the semaphore "
+				 "created in Namespace1\n", tsttype);
+	else if (use_clone == T_NONE)
+		tst_resm(TFAIL, "Plain cloned process didn't find semaphore\n");
 	else
-		if (use_clone == T_NONE)
-			tst_resm(TFAIL, "Plain cloned process didn't find semaphore\n");
-		else
-			tst_resm(TPASS, "%s : In namespace2 unable to access the semaphore "
-							"created in Namespace1\n", tsttype);
+		tst_resm(TPASS,
+			 "%s : In namespace2 unable to access the semaphore "
+			 "created in Namespace1\n", tsttype);
 
 	/* Delete the semaphore */
 	id = semget(MY_KEY, 1, 0);
diff --git a/testcases/kernel/containers/sysvipc/shmem_2nstest.c b/testcases/kernel/containers/sysvipc/shmem_2nstest.c
index be268bf..3833261 100644
--- a/testcases/kernel/containers/sysvipc/shmem_2nstest.c
+++ b/testcases/kernel/containers/sysvipc/shmem_2nstest.c
@@ -67,7 +67,7 @@
 	/* first create the key */
 	id1 = shmget(TESTKEY, 100, IPC_CREAT);
 	if (id1 == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "shmget failed");
+		tst_brkm(TFAIL | TERRNO, NULL, "shmget failed");
 
 	tst_resm(TINFO, "Cont1: Able to create shared mem segment");
 	write(p1[1], "done", 5);
@@ -90,10 +90,11 @@
 	if (id2 == -1) {
 		id2 = shmget(TESTKEY, 100, IPC_CREAT);
 		if (id2 == -1)
-			tst_resm(TFAIL|TERRNO, "shmget failed");
+			tst_resm(TFAIL | TERRNO, "shmget failed");
 		else
-			tst_resm(TINFO, "Cont2: Able to allocate shmem seg with "
-					"the same key");
+			tst_resm(TINFO,
+				 "Cont2: Able to allocate shmem seg with "
+				 "the same key");
 		write(p2[1], "notfnd", 7);
 	} else
 		write(p2[1], "exists", 7);
@@ -111,15 +112,15 @@
 	if (argc != 2) {
 		tst_resm(TINFO, "Usage: %s <clone| unshare| none>", argv[0]);
 		tst_resm(TINFO, " where clone, unshare, or fork specifies"
-				" unshare method.");
+			 " unshare method.");
 		tst_exit();
 	}
 
 	/* Using PIPE's to sync between containers and Parent */
 	if (pipe(p1) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "pipe1 error");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe1 error");
 	if (pipe(p2) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "pipe2 error");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe2 error");
 
 	if (strcmp(argv[1], "clone") == 0) {
 		use_clone = T_CLONE;
@@ -132,11 +133,13 @@
 	tst_resm(TINFO, "Shared Memory namespace test : %s", tsttype);
 
 	/* Create 2 containers */
-	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmem1, NULL);
+	ret =
+	    do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmem1, NULL);
 	if (ret < 0)
 		tst_brkm(TFAIL, NULL, "clone/unshare failed");
 
-	ret = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmem2, NULL);
+	ret =
+	    do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmem2, NULL);
 	if (ret < 0)
 		tst_brkm(TFAIL, NULL, "clone/unshare failed");
 
@@ -145,17 +148,21 @@
 
 	if (strcmp(buf, "exists") == 0) {
 		if (use_clone == T_NONE)
-			tst_resm(TPASS, "Plain cloned process able to access shmem "
-					"segment created");
+			tst_resm(TPASS,
+				 "Plain cloned process able to access shmem "
+				 "segment created");
 		else
-			tst_resm(TFAIL, "%s : In namespace2 found the shmem segment "
-					"created in Namespace1", tsttype);
+			tst_resm(TFAIL,
+				 "%s : In namespace2 found the shmem segment "
+				 "created in Namespace1", tsttype);
 	} else {
 		if (use_clone == T_NONE)
-			tst_resm(TFAIL, "Plain cloned process didn't find shmem seg");
+			tst_resm(TFAIL,
+				 "Plain cloned process didn't find shmem seg");
 		else
-			tst_resm(TPASS, "%s : In namespace2 unable to access the shmem seg "
-					"created in Namespace1", tsttype);
+			tst_resm(TPASS,
+				 "%s : In namespace2 unable to access the shmem seg "
+				 "created in Namespace1", tsttype);
 	}
 	/* destroy the key */
 
diff --git a/testcases/kernel/containers/sysvipc/shmnstest.c b/testcases/kernel/containers/sysvipc/shmnstest.c
index cf292e9..3ceaefa 100644
--- a/testcases/kernel/containers/sysvipc/shmnstest.c
+++ b/testcases/kernel/containers/sysvipc/shmnstest.c
@@ -35,7 +35,7 @@
 #include <libclone.h>
 
 char *TCID = "sysvipc_namespace";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 #define TESTKEY 0xEAEAEA
 
 int p1[2];
@@ -43,22 +43,22 @@
 
 int check_shmid(void *vtest)
 {
-      char buf[3];
-      int id;
+	char buf[3];
+	int id;
 
-      close(p1[1]);
-      close(p2[0]);
+	close(p1[1]);
+	close(p2[0]);
 
-      read(p1[0], buf, 3);
-      id = shmget(TESTKEY, 100, 0);
-      if (id == -1) {
-              write(p2[1], "notfnd", 7);
-      } else {
-              write(p2[1], "exists", 7);
-              shmctl(id, IPC_RMID, NULL);
-      }
+	read(p1[0], buf, 3);
+	id = shmget(TESTKEY, 100, 0);
+	if (id == -1) {
+		write(p2[1], "notfnd", 7);
+	} else {
+		write(p2[1], "exists", 7);
+		shmctl(id, IPC_RMID, NULL);
+	}
 
-      tst_exit();
+	tst_exit();
 }
 
 #define UNSHARESTR "unshare"
@@ -66,63 +66,71 @@
 #define NONESTR "none"
 int main(int argc, char *argv[])
 {
-      int r, use_clone = T_NONE;
-      int id;
-      char *tsttype = NONESTR;
-      char buf[7];
+	int r, use_clone = T_NONE;
+	int id;
+	char *tsttype = NONESTR;
+	char buf[7];
 
-      if (argc != 2) {
-              tst_resm(TFAIL, "Usage: %s <clone|unshare|none>\n", argv[0]);
-              tst_resm(TFAIL, " where clone, unshare, or fork specifies unshare method.");
-              tst_exit();
-      }
-      if (pipe(p1) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-      if (pipe(p2) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-      tsttype = NONESTR;
-      if (strcmp(argv[1], "clone") == 0) {
-              use_clone = T_CLONE;
-              tsttype = CLONESTR;
-      } else if (strcmp(argv[1], "unshare") == 0) {
-              use_clone = T_UNSHARE;
-              tsttype = UNSHARESTR;
-      }
+	if (argc != 2) {
+		tst_resm(TFAIL, "Usage: %s <clone|unshare|none>\n", argv[0]);
+		tst_resm(TFAIL,
+			 " where clone, unshare, or fork specifies unshare method.");
+		tst_exit();
+	}
+	if (pipe(p1) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	if (pipe(p2) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	tsttype = NONESTR;
+	if (strcmp(argv[1], "clone") == 0) {
+		use_clone = T_CLONE;
+		tsttype = CLONESTR;
+	} else if (strcmp(argv[1], "unshare") == 0) {
+		use_clone = T_UNSHARE;
+		tsttype = UNSHARESTR;
+	}
 
-      /* first create the key */
-      id = shmget(TESTKEY, 100, IPC_CREAT);
-      if (id == -1) {
-              perror("shmget");
-              tst_resm(TFAIL, "shmget failed\n");
-              tst_exit();
-      }
+	/* first create the key */
+	id = shmget(TESTKEY, 100, IPC_CREAT);
+	if (id == -1) {
+		perror("shmget");
+		tst_resm(TFAIL, "shmget failed\n");
+		tst_exit();
+	}
 
-      tst_resm(TINFO, "shmid namespaces test : %s\n",tsttype);
-      /* fire off the test */
-      r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmid, NULL);
-      if (r < 0) {
-              tst_resm(TFAIL, "%s failed\n", tsttype);
-              tst_exit();
-      }
+	tst_resm(TINFO, "shmid namespaces test : %s\n", tsttype);
+	/* fire off the test */
+	r = do_clone_unshare_test(use_clone, CLONE_NEWIPC, check_shmid, NULL);
+	if (r < 0) {
+		tst_resm(TFAIL, "%s failed\n", tsttype);
+		tst_exit();
+	}
 
-      close(p1[0]);
-      close(p2[1]);
-      write(p1[1], "go", 3);
-      read(p2[0], buf, 7);
-      if (strcmp(buf, "exists") == 0) {
-              if (use_clone == T_NONE)
-                      tst_resm(TPASS, "plain cloned process found shmid\n");
-              else
-                      tst_resm(TFAIL, "%s: child process found shmid\n",
-                              tsttype);
-      } else {
-              if (use_clone == T_NONE)
-                      tst_resm(TFAIL, "plain cloned process didn't find shmid\n");
-              else
-                      tst_resm(TPASS, "%s: child process didn't find shmid\n",
-                              tsttype);
-      }
+	close(p1[0]);
+	close(p2[1]);
+	write(p1[1], "go", 3);
+	read(p2[0], buf, 7);
+	if (strcmp(buf, "exists") == 0) {
+		if (use_clone == T_NONE)
+			tst_resm(TPASS, "plain cloned process found shmid\n");
+		else
+			tst_resm(TFAIL, "%s: child process found shmid\n",
+				 tsttype);
+	} else {
+		if (use_clone == T_NONE)
+			tst_resm(TFAIL,
+				 "plain cloned process didn't find shmid\n");
+		else
+			tst_resm(TPASS, "%s: child process didn't find shmid\n",
+				 tsttype);
+	}
 
-      /* destroy the key */
-      shmctl(id, IPC_RMID, NULL);
+	/* destroy the key */
+	shmctl(id, IPC_RMID, NULL);
 
-      tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/containers/utsname/check_utsns_enabled.c b/testcases/kernel/containers/utsname/check_utsns_enabled.c
index 06b7e94..393eb92 100644
--- a/testcases/kernel/containers/utsname/check_utsns_enabled.c
+++ b/testcases/kernel/containers/utsname/check_utsns_enabled.c
@@ -26,8 +26,6 @@
 #include "../libclone/libclone.h"
 #include "test.h"
 
-
-
 int dummy(void *v)
 {
 	return 0;
diff --git a/testcases/kernel/containers/utsname/utstest.c b/testcases/kernel/containers/utsname/utstest.c
index 1784c12..727488c 100644
--- a/testcases/kernel/containers/utsname/utstest.c
+++ b/testcases/kernel/containers/utsname/utstest.c
@@ -56,7 +56,7 @@
 #include <libclone.h>
 
 char *TCID = "uts_namespace";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int drop_root()
 {
@@ -103,7 +103,7 @@
 	close(p1fd[1]);
 	close(p2fd[0]);
 
-	switch(testnum) {
+	switch (testnum) {
 	case 1:
 		gethostname(hostname, HLEN);
 		zeroize(rhostname);
@@ -113,7 +113,7 @@
 			tst_exit();
 		}
 		tst_resm(TFAIL, "test 1 (%s): hostname 1 %s, hostname 2 %s\n",
-			tsttype, hostname, rhostname);
+			 tsttype, hostname, rhostname);
 		tst_exit();
 	case 2:
 		gethostname(hostname, HLEN);
@@ -122,18 +122,17 @@
 		write(p2fd[1], "1", 1);
 		if (err == -1) {
 			tst_resm(TFAIL, "test 2 (%s): failed to sethostname",
-					tsttype);
+				 tsttype);
 			tst_exit();
 		}
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
 		if (strcmp(newhostname, rhostname) == 0) {
-			tst_resm(TPASS, "test 2 (%s): success\n",
-					tsttype);
+			tst_resm(TPASS, "test 2 (%s): success\n", tsttype);
 			tst_exit();
 		}
 		tst_resm(TFAIL, "test 2 (%s) hostname 1 %s, hostname 2 %s\n",
-				tsttype, newhostname, rhostname);
+			 tsttype, newhostname, rhostname);
 		tst_exit();
 	case 3:
 		gethostname(hostname, HLEN);
@@ -142,51 +141,56 @@
 		write(p2fd[1], "1", 1);
 		if (err == -1) {
 			tst_resm(TFAIL, "test 3 (%s): failed to sethostname",
-						tsttype);
+				 tsttype);
 			tst_exit();
 		}
 
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
 		if (strcmp(newhostname, rhostname) == 0) {
-			tst_resm(TFAIL, "test 3 (%s): hostname 1 %s, hostname 2 %s, these should have been different\n",
-					tsttype, newhostname, rhostname);
+			tst_resm(TFAIL,
+				 "test 3 (%s): hostname 1 %s, hostname 2 %s, these should have been different\n",
+				 tsttype, newhostname, rhostname);
 			tst_exit();
 		}
 		if (strcmp(hostname, rhostname) == 0) {
 			tst_resm(TPASS, "test 3 (%s): success\n", tsttype);
 			tst_exit();
 		}
-		tst_resm(TFAIL, "test 3 (%s): hostname 1 %s, hostname 2 %s, should have been same\n",
-			tsttype, hostname, rhostname);
+		tst_resm(TFAIL,
+			 "test 3 (%s): hostname 1 %s, hostname 2 %s, should have been same\n",
+			 tsttype, hostname, rhostname);
 		tst_exit();
 
 	case 4:
 		gethostname(hostname, HLEN);
-		write(p2fd[1], "1", 1); /* tell p2 to go ahead and sethostname */
+		write(p2fd[1], "1", 1);	/* tell p2 to go ahead and sethostname */
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
 		gethostname(newhostname, HLEN);
 		if (strcmp(hostname, newhostname) != 0) {
-			tst_resm(TFAIL, "test 4 (%s): hostname 1 %s, hostname 2 %s, should be same\n",
-				tsttype, hostname, newhostname);
+			tst_resm(TFAIL,
+				 "test 4 (%s): hostname 1 %s, hostname 2 %s, should be same\n",
+				 tsttype, hostname, newhostname);
 			tst_exit();
 		}
 		if (strcmp(hostname, rhostname) == 0) {
-			tst_resm(TFAIL, "test 4 (%s): hostname 1 %s, hostname 2 %s, should be different",
-				tsttype, hostname, rhostname);
+			tst_resm(TFAIL,
+				 "test 4 (%s): hostname 1 %s, hostname 2 %s, should be different",
+				 tsttype, hostname, rhostname);
 			tst_exit();
 		}
 		tst_resm(TPASS, "test 4 (%s): successful\n", tsttype);
 		tst_exit();
 	case 5:
-		write(p2fd[1], "1", 1); /* tell p2 to go ahead and sethostname */
+		write(p2fd[1], "1", 1);	/* tell p2 to go ahead and sethostname */
 		zeroize(rhostname);
 		len = read(p1fd[0], rhostname, HLEN);
 		gethostname(newhostname, HLEN);
 		if (strcmp(rhostname, newhostname) != 0) {
-			tst_resm(TFAIL, "test 5 (%s): hostnames %s and %s should be same\n",
-				tsttype, rhostname, newhostname);
+			tst_resm(TFAIL,
+				 "test 5 (%s): hostnames %s and %s should be same\n",
+				 tsttype, rhostname, newhostname);
 			tst_exit();
 		}
 		tst_resm(TPASS, "test 5 (%s): successful", tsttype);
@@ -208,7 +212,7 @@
 	close(p1fd[0]);
 	close(p2fd[1]);
 
-	switch(testnum) {
+	switch (testnum) {
 	case 1:
 		gethostname(hostname, HLEN);
 		write(p1fd[1], hostname, strlen(hostname));
@@ -255,13 +259,21 @@
 	void *vtest;
 
 	if (argc != 3) {
-		tst_resm(TFAIL, "Usage: %s <clone|unshare> <testnum>\n", argv[0]);
-		tst_resm(TFAIL, " where clone or unshare specifies unshare method,");
+		tst_resm(TFAIL, "Usage: %s <clone|unshare> <testnum>\n",
+			 argv[0]);
+		tst_resm(TFAIL,
+			 " where clone or unshare specifies unshare method,");
 		tst_resm(TFAIL, " and testnum is between 1 and 5 inclusive\n");
 		exit(2);
 	}
-	if (pipe(p1fd) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
-	if (pipe(p2fd) == -1) { perror("pipe"); exit(EXIT_FAILURE); }
+	if (pipe(p1fd) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
+	if (pipe(p2fd) == -1) {
+		perror("pipe");
+		exit(EXIT_FAILURE);
+	}
 
 	tsttype = UNSHARESTR;
 	if (strcmp(argv[1], "clone") == 0) {
@@ -272,15 +284,15 @@
 	testnum = atoi(argv[2]);
 
 	vtest = (void *)argv[2];
-	switch(testnum) {
+	switch (testnum) {
 	case 1:
-	case 2: r = do_clone_unshare_tests(T_NONE, 0,
-					P1, vtest, P2, vtest);
+	case 2:
+		r = do_clone_unshare_tests(T_NONE, 0, P1, vtest, P2, vtest);
 		break;
 	case 3:
 	case 4:
 		r = do_clone_unshare_tests(use_clone, CLONE_NEWUTS,
-					P1, vtest, P2, vtest);
+					   P1, vtest, P2, vtest);
 		break;
 	case 5:
 		pid = fork();
@@ -295,15 +307,16 @@
 				exit(1);
 			}
 			r = do_clone_unshare_test(use_clone, CLONE_NEWUTS,
-					P1, vtest);
-			write(p2fd[1], "0", 1); /* don't let p2 hang */
+						  P1, vtest);
+			write(p2fd[1], "0", 1);	/* don't let p2 hang */
 			exit(0);
 		} else {
 			P2(vtest);
 		}
 		break;
 	default:
-		tst_resm(TFAIL, "testnum should be between 1 and 5 inclusive.\n");
+		tst_resm(TFAIL,
+			 "testnum should be between 1 and 5 inclusive.\n");
 		break;
 	}
 
diff --git a/testcases/kernel/controllers/cgroup/getdelays.c b/testcases/kernel/controllers/cgroup/getdelays.c
index 5c79423..4e87a13 100644
--- a/testcases/kernel/controllers/cgroup/getdelays.c
+++ b/testcases/kernel/controllers/cgroup/getdelays.c
@@ -72,12 +72,12 @@
 /* Maximum number of cpus expected to be specified in a cpumask */
 #define MAX_CPUS	32
 
-char cpumask[100+6*MAX_CPUS];
+char cpumask[100 + 6 * MAX_CPUS];
 
 static void usage(void)
 {
 	fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] "
-			"[-m cpumask] [-t tgid] [-p pid]\n");
+		"[-m cpumask] [-t tgid] [-p pid]\n");
 	fprintf(stderr, "  -d: print delayacct stats\n");
 	fprintf(stderr, "  -i: print IO accounting (works only with -p)\n");
 	fprintf(stderr, "  -l: listen forever\n");
@@ -105,17 +105,16 @@
 
 	if (rcvbufsz)
 		if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
-				&rcvbufsz, sizeof(rcvbufsz)) < 0) {
+			       &rcvbufsz, sizeof(rcvbufsz)) < 0) {
 			fprintf(stderr, "Unable to set socket rcv buf size "
-					"to %d\n",
-				rcvbufsz);
+				"to %d\n", rcvbufsz);
 			return -1;
 		}
 
 	memset(&local, 0, sizeof(local));
 	local.nl_family = AF_NETLINK;
 
-	if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0)
+	if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0)
 		goto error;
 
 	return fd;
@@ -125,8 +124,7 @@
 }
 
 int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
-	     __u8 genl_cmd, __u16 nla_type,
-	     void *nla_data, int nla_len)
+	     __u8 genl_cmd, __u16 nla_type, void *nla_data, int nla_len)
 {
 	struct nlattr *na;
 	struct sockaddr_nl nladdr;
@@ -142,17 +140,17 @@
 	msg.n.nlmsg_pid = nlmsg_pid;
 	msg.g.cmd = genl_cmd;
 	msg.g.version = 0x1;
-	na = (struct nlattr *) GENLMSG_DATA(&msg);
+	na = (struct nlattr *)GENLMSG_DATA(&msg);
 	na->nla_type = nla_type;
 	na->nla_len = nla_len + 1 + NLA_HDRLEN;
 	memcpy(NLA_DATA(na), nla_data, nla_len);
 	msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
 
-	buf = (char *) &msg;
-	buflen = msg.n.nlmsg_len ;
+	buf = (char *)&msg;
+	buflen = msg.n.nlmsg_len;
 	memset(&nladdr, 0, sizeof(nladdr));
 	nladdr.nl_family = AF_NETLINK;
-	while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr,
+	while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *)&nladdr,
 			   sizeof(nladdr))) < buflen) {
 		if (r > 0) {
 			buf += r;
@@ -181,16 +179,16 @@
 
 	strcpy(name, TASKSTATS_GENL_NAME);
 	rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
-			CTRL_ATTR_FAMILY_NAME, (void *)name,
-			strlen(TASKSTATS_GENL_NAME)+1);
+		      CTRL_ATTR_FAMILY_NAME, (void *)name,
+		      strlen(TASKSTATS_GENL_NAME) + 1);
 
 	rep_len = recv(sd, &ans, sizeof(ans), 0);
 	if (ans.n.nlmsg_type == NLMSG_ERROR ||
 	    (rep_len < 0) || !NLMSG_OK((&ans.n), rep_len))
 		return 0;
 
-	na = (struct nlattr *) GENLMSG_DATA(&ans);
-	na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len));
+	na = (struct nlattr *)GENLMSG_DATA(&ans);
+	na = (struct nlattr *)((char *)na + NLA_ALIGN(na->nla_len));
 	if (na->nla_type == CTRL_ATTR_FAMILY_ID) {
 		id = *(__u16 *) NLA_DATA(na);
 	}
@@ -200,41 +198,38 @@
 void print_delayacct(struct taskstats *t)
 {
 	printf("\n\nCPU   %15s%15s%15s%15s\n"
-		"      %15llu%15llu%15llu%15llu\n"
-		"IO    %15s%15s\n"
-		"      %15llu%15llu\n"
-		"SWAP  %15s%15s\n"
-		"      %15llu%15llu\n"
-		"RECLAIM  %12s%15s\n"
+	       "      %15llu%15llu%15llu%15llu\n"
+	       "IO    %15s%15s\n"
+	       "      %15llu%15llu\n"
+	       "SWAP  %15s%15s\n" "      %15llu%15llu\n" "RECLAIM  %12s%15s\n"
 #ifdef HAVE_STRUCT_TASKSTATS_FREEPAGES_COUNT
-		 "      %15llu%15llu\n"
+	       "      %15llu%15llu\n"
 #endif
-		, "count", "real total", "virtual total", "delay total",
-		(unsigned long long)t->cpu_count,
-		(unsigned long long)t->cpu_run_real_total,
-		(unsigned long long)t->cpu_run_virtual_total,
-		(unsigned long long)t->cpu_delay_total,
-		"count", "delay total",
-		(unsigned long long)t->blkio_count,
-		(unsigned long long)t->blkio_delay_total,
-		"count", "delay total",
-		(unsigned long long)t->swapin_count,
-		(unsigned long long)t->swapin_delay_total,
-		"count", "delay total"
+	       , "count", "real total", "virtual total", "delay total",
+	       (unsigned long long)t->cpu_count,
+	       (unsigned long long)t->cpu_run_real_total,
+	       (unsigned long long)t->cpu_run_virtual_total,
+	       (unsigned long long)t->cpu_delay_total,
+	       "count", "delay total",
+	       (unsigned long long)t->blkio_count,
+	       (unsigned long long)t->blkio_delay_total,
+	       "count", "delay total",
+	       (unsigned long long)t->swapin_count,
+	       (unsigned long long)t->swapin_delay_total, "count", "delay total"
 #ifdef HAVE_STRUCT_TASKSTATS_FREEPAGES_COUNT
-		, (unsigned long long)t->freepages_count,
-		(unsigned long long)t->freepages_delay_total
+	       , (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total
 #endif
-		);
+	    );
 }
 
 void task_context_switch_counts(struct taskstats *t)
 {
 #ifdef HAVE_STRUCT_TASKSTATS_NVCSW
 	printf("\n\nTask   %15s%15s\n"
-		"	%15llu%15llu\n",
-		"voluntary", "nonvoluntary",
-		(unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
+	       "	%15llu%15llu\n",
+	       "voluntary", "nonvoluntary",
+	       (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
 #endif
 }
 
@@ -242,11 +237,11 @@
 void print_cgroupstats(struct cgroupstats *c)
 {
 	printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
-		"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
-		(unsigned long long)c->nr_io_wait,
-		(unsigned long long)c->nr_running,
-		(unsigned long long)c->nr_stopped,
-		(unsigned long long)c->nr_uninterruptible);
+	       "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
+	       (unsigned long long)c->nr_io_wait,
+	       (unsigned long long)c->nr_running,
+	       (unsigned long long)c->nr_stopped,
+	       (unsigned long long)c->nr_uninterruptible);
 }
 #endif
 
@@ -254,10 +249,10 @@
 {
 #ifdef HAVE_STRUCT_TASKSTATS_READ_BYTES
 	printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
-		t->ac_comm,
-		(unsigned long long)t->read_bytes,
-		(unsigned long long)t->write_bytes,
-		(unsigned long long)t->cancelled_write_bytes);
+	       t->ac_comm,
+	       (unsigned long long)t->read_bytes,
+	       (unsigned long long)t->write_bytes,
+	       (unsigned long long)t->cancelled_write_bytes);
 #endif
 }
 
@@ -438,11 +433,11 @@
 		}
 
 		PRINTF("nlmsghdr size=%zu, nlmsg_len=%d, rep_len=%d\n",
-			sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
+		       sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
 
 		rep_len = GENLMSG_PAYLOAD(&msg.n);
 
-		na = (struct nlattr *) GENLMSG_DATA(&msg);
+		na = (struct nlattr *)GENLMSG_DATA(&msg);
 		len = 0;
 		i = 0;
 		while (len < rep_len) {
@@ -454,31 +449,46 @@
 				aggr_len = NLA_PAYLOAD(na->nla_len);
 				len2 = 0;
 				/* For nested attributes, na follows */
-				na = (struct nlattr *) NLA_DATA(na);
+				na = (struct nlattr *)NLA_DATA(na);
 				done = 0;
 				while (len2 < aggr_len) {
 					switch (na->nla_type) {
 					case TASKSTATS_TYPE_PID:
-						rtid = *(int *) NLA_DATA(na);
+						rtid = *(int *)NLA_DATA(na);
 						if (print_delays)
-							printf("PID\t%d\n", rtid);
+							printf("PID\t%d\n",
+							       rtid);
 						break;
 					case TASKSTATS_TYPE_TGID:
-						rtid = *(int *) NLA_DATA(na);
+						rtid = *(int *)NLA_DATA(na);
 						if (print_delays)
-							printf("TGID\t%d\n", rtid);
+							printf("TGID\t%d\n",
+							       rtid);
 						break;
 					case TASKSTATS_TYPE_STATS:
 						count++;
 						if (print_delays)
-							print_delayacct((struct taskstats *) NLA_DATA(na));
+							print_delayacct((struct
+									 taskstats
+									 *)
+									NLA_DATA
+									(na));
 						if (print_io_accounting)
-							print_ioacct((struct taskstats *) NLA_DATA(na));
+							print_ioacct((struct
+								      taskstats
+								      *)
+								     NLA_DATA
+								     (na));
 						if (print_task_context_switch_counts)
-							task_context_switch_counts((struct taskstats *) NLA_DATA(na));
+							task_context_switch_counts
+							    ((struct taskstats
+							      *)NLA_DATA(na));
 						if (fd) {
-							if (write(fd, NLA_DATA(na), na->nla_len) < 0) {
-								err(1,"write error\n");
+							if (write
+							    (fd, NLA_DATA(na),
+							     na->nla_len) < 0) {
+								err(1,
+								    "write error\n");
 							}
 						}
 						if (!loop)
@@ -491,7 +501,8 @@
 						break;
 					}
 					len2 += NLA_ALIGN(na->nla_len);
-					na = (struct nlattr *) ((char *) na + len2);
+					na = (struct nlattr *)((char *)na +
+							       len2);
 				}
 				break;
 #if HAVE_LINUX_CGROUPSTATS_H
@@ -504,7 +515,7 @@
 					na->nla_type);
 				exit(1);
 			}
-			na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
+			na = (struct nlattr *)(GENLMSG_DATA(&msg) + len);
 		}
 	} while (loop);
 done:
@@ -525,7 +536,8 @@
 	return 0;
 }
 #else
-int main (void) {
+int main(void)
+{
 	printf("System doesn't have needed netlink / taskstats support.\n");
 	return 1;
 }
diff --git a/testcases/kernel/controllers/cgroup/test_6_2.c b/testcases/kernel/controllers/cgroup/test_6_2.c
index 3a7b0cd..df85b1f 100644
--- a/testcases/kernel/controllers/cgroup/test_6_2.c
+++ b/testcases/kernel/controllers/cgroup/test_6_2.c
@@ -29,7 +29,7 @@
 
 #define DEFAULT_USEC	30000
 
-int foo(void __attribute__((unused)) *arg)
+int foo(void __attribute__ ((unused)) * arg)
 {
 	return 0;
 }
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c
index f31549f..6019b64 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c
@@ -58,7 +58,7 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
 #ifdef DEBUG
 #define dbg(x...)	printf(x);
@@ -66,10 +66,10 @@
 #define dbg(x...)	do {}	while (0)
 #endif
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	3       /* How many iterations of TIME_INTERVAL */
-#define NUM_SETS	4	/* How many share values (with same ratio)*/
-#define MULTIPLIER   	10      /* Rate at which share value gets multiplied*/
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	3	/* How many iterations of TIME_INTERVAL */
+#define NUM_SETS	4	/* How many share values (with same ratio) */
+#define MULTIPLIER   	10	/* Rate at which share value gets multiplied */
 
 char *TCID = "cpu_controller_tests";
 int TST_TOTAL = 1;
@@ -78,26 +78,27 @@
 
 extern void cleanup()
 {
-	kill(scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-		/* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	/* Report exit status */
 }
+
 volatile int timer_expired = 0;
 
 int main(int argc, char *argv[])
 {
 
-	int num_cpus, test_num, len;	/* Total time = TIME_INTERVAL*num_cpus*/
+	int num_cpus, test_num, len;	/* Total time = TIME_INTERVAL*num_cpus */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
 	pid_t pid;
-	int my_group_num;	        /* A number attached with a group*/
-	int fd;          	        /* To open a fifo for synchronization*/
-	int first_counter = 0;  	/* To take n number of readings*/
-	int second_counter = 0;    	/* no of times shares have changed*/
-	double total_cpu_time;  	/* Accumulated cpu time*/
-	double delta_cpu_time;  	/* Time the task could run on cpu(s)*/
+	int my_group_num;	/* A number attached with a group */
+	int fd;			/* To open a fifo for synchronization */
+	int first_counter = 0;	/* To take n number of readings */
+	int second_counter = 0;	/* no of times shares have changed */
+	double total_cpu_time;	/* Accumulated cpu time */
+	double delta_cpu_time;	/* Time the task could run on cpu(s) */
 	double prev_cpu_time = 0;
-	double exp_cpu_time;		/* Exp time in % by shares calculation*/
+	double exp_cpu_time;	/* Exp time in % by shares calculation */
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
 	unsigned long int myshares = 2, baseshares = 1000;
@@ -108,17 +109,17 @@
 	test_num = 0;
 	my_group_num = -1;
 
-	/* Signal handling for alarm*/
+	/* Signal handling for alarm */
 	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
 	newaction.sa_flags = 0;
 	sigaction(SIGALRM, &newaction, &oldaction);
 
-	/* Check if all parameters passed are correct*/
-	if ((argc < 5) || ((my_group_num = atoi(argv[1])) <= 0) || \
-				((scriptpid = atoi(argv[3])) <= 0) || \
-					((num_cpus = atoi(argv[4])) <= 0) || \
-						(test_num = atoi(argv[5])) <= 0)
+	/* Check if all parameters passed are correct */
+	if ((argc < 5) || ((my_group_num = atoi(argv[1])) <= 0) ||
+	    ((scriptpid = atoi(argv[3])) <= 0) ||
+	    ((num_cpus = atoi(argv[4])) <= 0) ||
+	    (test_num = atoi(argv[5])) <= 0)
 		tst_brkm(TBROK, cleanup, "Invalid input parameters\n");
 
 	if (test_num == 1)
@@ -134,7 +135,7 @@
 	strcat(mytaskfile, "/tasks");
 	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file(mytaskfile, "a", pid);    /* Assign task to it's group*/
+	write_to_file(mytaskfile, "a", pid);	/* Assign task to it's group */
 	write_to_file(mysharesfile, "w", myshares);
 	dbg("Default task's initial shares = %u", myshares);
 
@@ -142,7 +143,7 @@
 	if (fd == -1)
 		tst_brkm(TBROK, cleanup, "Could not open fifo to synchronizae");
 
-	read(fd, &ch, 1);	/* To fire all the tasks up at the same time*/
+	read(fd, &ch, 1);	/* To fire all the tasks up at the same time */
 
 	/*
 	 * We need not calculate the expected % cpu time of this task, as
@@ -159,7 +160,7 @@
 
 	if (scan_shares_files(shares_pointer) != 0)
 		tst_brkm(TBROK, cleanup,
-		 "From function scan_shares_files in %s ", fullpath);
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
@@ -172,14 +173,14 @@
 
 	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time(NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
 	while (1) {
 		/*
 		 * Need to run some cpu intensive task, which also
 		 * frequently checks the timer value
 		 */
-		double f = 274.345, mytime;	/*just a float number for sqrt*/
+		double f = 274.345, mytime;	/*just a float number for sqrt */
 		alarm(TIME_INTERVAL);
 		timer_expired = 0;
 		/*
@@ -191,15 +192,15 @@
 			f = sqrt(f * f);
 
 		current_time = time(NULL);
-		/* Duration in case its not exact TIME_INTERVAL*/
+		/* Duration in case its not exact TIME_INTERVAL */
 		delta_time = current_time - prev_time;
 
 		getrusage(0, &cpu_usage);
 		/* total_cpu_time = total user time + total sys time */
 		total_cpu_time = (cpu_usage.ru_utime.tv_sec +
-				cpu_usage.ru_utime.tv_usec * 1e-6 +
-				cpu_usage.ru_stime.tv_sec +
-				cpu_usage.ru_stime.tv_usec * 1e-6) ;
+				  cpu_usage.ru_utime.tv_usec * 1e-6 +
+				  cpu_usage.ru_stime.tv_sec +
+				  cpu_usage.ru_stime.tv_usec * 1e-6);
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -208,10 +209,10 @@
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
 			mytime = (delta_cpu_time * 100) /
-					 (delta_time * num_cpus);
+			    (delta_time * num_cpus);
 		else
 			mytime = (delta_cpu_time * 100) /
-					 (TIME_INTERVAL * num_cpus);
+			    (TIME_INTERVAL * num_cpus);
 
 		/*
 		 * Lets print the results. The exp cpu time calculated may not
@@ -219,24 +220,24 @@
 		 */
 		fprintf(stdout, "DEF TASK:CPU TIME{calc:-%6.2f(s)"
 			" i.e. %6.2f(%%) exp:-%6.2f(%%)} with %lu(shares)"
-			" in %lu (s) INTERVAL\n", delta_cpu_time,  mytime,
-					 exp_cpu_time, myshares, delta_time);
+			" in %lu (s) INTERVAL\n", delta_cpu_time, mytime,
+			exp_cpu_time, myshares, delta_time);
 		first_counter++;
 
-		/* Take n sets of readings for each shares value*/
+		/* Take n sets of readings for each shares value */
 		if (first_counter >= NUM_INTERVALS) {
 			first_counter = 0;
 			second_counter++;
 			if (second_counter >= NUM_SETS)
 				exit(0);	/* This task is done */
 
-			/* Keep same ratio but change values*/
+			/* Keep same ratio but change values */
 			if (test_num == 1) {
 				myshares = MULTIPLIER * myshares;
 				write_to_file(mysharesfile, "w", myshares);
 			}
 			/* No need to change shares for def task for test 3 */
 
-		}/* end if*/
-	}/* end while*/
-}/* end main*/
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c
index f48e178..a37e249 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c
@@ -61,21 +61,20 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	3       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	3	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test04";
 int TST_TOTAL = 1;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
 
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill(scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-		/* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	/* Report exit status */
 }
 
 volatile int timer_expired = 0;
@@ -87,20 +86,20 @@
 	int task_num;
 	int len;
 	int num_cpus;
-	int migrate = 0;		/* For task migration*/
+	int migrate = 0;	/* For task migration */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
+	/* Following variables are to capture parameters from script */
 	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p;
 	char *test_num_p, *task_num_p;
 	pid_t pid;
-	gid_t mygroup_num;	        /* A number attached with a group*/
-	int fd;          	        /* to open a fifo to synchronize*/
-	int counter = 0; 	 	/* To take n number of readings*/
-	double total_cpu_time;  	/* Accumulated cpu time*/
-	double delta_cpu_time;  	/* Time the task could run on cpu(s)*/
+	gid_t mygroup_num;	/* A number attached with a group */
+	int fd;			/* to open a fifo to synchronize */
+	int counter = 0;	/* To take n number of readings */
+	double total_cpu_time;	/* Accumulated cpu time */
+	double delta_cpu_time;	/* Time the task could run on cpu(s) */
 	double prev_cpu_time = 0;
-	double exp_cpu_time;            /* Exp time in % by shares calculation*/
+	double exp_cpu_time;	/* Exp time in % by shares calculation */
 
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
@@ -112,33 +111,33 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
+	/* Signal handling for alarm */
 	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
 	newaction.sa_flags = 0;
 	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) == 4) || \
-					((test_num = atoi(test_num_p)) == 5))) {
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && \
-				 (task_num_p != NULL)) {
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi(num_cpus_p);
-			task_num	 = atoi(task_num_p);
+	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) == 4) ||
+				     ((test_num = atoi(test_num_p)) == 5))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL) &&
+		    (script_pid_p != NULL) && (num_cpus_p != NULL) &&
+		    (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
 			sprintf(mygroup, "%s", mygroup_p);
 		} else {
 			tst_brkm(TBROK, cleanup,
-					 "Invalid other input parameters\n");
+				 "Invalid other input parameters\n");
 		}
 	} else {
 		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
@@ -149,12 +148,12 @@
 	strcat(mytaskfile, "/tasks");
 	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file(mytaskfile, "a", pid);    /* Assign task to it's group*/
+	write_to_file(mytaskfile, "a", pid);	/* Assign task to it's group */
 
 	fd = open("./myfifo", 0);
 	if (fd == -1)
 		tst_brkm(TBROK, cleanup,
-				 "Could not open fifo for synchronization");
+			 "Could not open fifo for synchronization");
 
 	read(fd, &ch, 1);	/* Block task here to synchronize */
 
@@ -169,7 +168,7 @@
 	len = strlen(path);
 	if (!strncpy(fullpath, path, len))
 		tst_brkm(TBROK, cleanup,
-				 "Could not copy directory path %s ", path);
+			 "Could not copy directory path %s ", path);
 
 	if (scan_shares_files(shares_pointer) != 0)
 		tst_brkm(TBROK, cleanup,
@@ -178,22 +177,22 @@
 	/* return val -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
 		tst_brkm(TBROK, cleanup,
-				 "in reading shares files  %s ", mysharesfile);
+			 "in reading shares files  %s ", mysharesfile);
 
 	if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
 		tst_brkm(TBROK, cleanup,
-				 "in reading tasks files  %s ", mytaskfile);
+			 "in reading tasks files  %s ", mytaskfile);
 
 	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time(NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
 	while (1) {
 		/*
 		 * Need to run some cpu intensive task, which also
 		 * frequently checks the timer value
 		 */
-		double f = 274.345, mytime;	/*just a float number for sqrt*/
+		double f = 274.345, mytime;	/*just a float number for sqrt */
 		alarm(TIME_INTERVAL);
 		timer_expired = 0;
 		/*
@@ -205,15 +204,15 @@
 			f = sqrt(f * f);
 
 		current_time = time(NULL);
-		/* Duration in case its not exact TIME_INTERVAL*/
+		/* Duration in case its not exact TIME_INTERVAL */
 		delta_time = current_time - prev_time;
 
 		getrusage(0, &cpu_usage);
 		/* total_cpu_time = total user time + total sys time */
 		total_cpu_time = (cpu_usage.ru_utime.tv_sec +
-				cpu_usage.ru_utime.tv_usec * 1e-6 +
-				cpu_usage.ru_stime.tv_sec +
-				cpu_usage.ru_stime.tv_usec * 1e-6) ;
+				  cpu_usage.ru_utime.tv_usec * 1e-6 +
+				  cpu_usage.ru_stime.tv_sec +
+				  cpu_usage.ru_stime.tv_usec * 1e-6);
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -222,10 +221,10 @@
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
 			mytime = (delta_cpu_time * 100) /
-					 (delta_time * num_cpus);
+			    (delta_time * num_cpus);
 		else
 			mytime = (delta_cpu_time * 100) /
-					 (TIME_INTERVAL * num_cpus);
+			    (TIME_INTERVAL * num_cpus);
 
 		fprintf(stdout, "Grp:-%3dDEF task-%3d: CPU TIME{calc:-%6.2f(s)"
 			"i.e. %6.2f(%%)exp:-%6.2f(%%)} with %u(shares) in %lu"
@@ -236,10 +235,10 @@
 
 		if (counter >= NUM_INTERVALS) {
 			switch (test_num) {
-			case 4:			/* Test04 */
-				exit(0);	/* This task is done its job*/
+			case 4:	/* Test04 */
+				exit(0);	/* This task is done its job */
 				break;
-			case 5:			/* Test 05 */
+			case 5:	/* Test 05 */
 				if (migrate == 0) {
 					counter = 0;
 					migrate = 1;
@@ -252,7 +251,7 @@
 					 "Invalid test number passed\n");
 				break;
 
-			}	/* end switch*/
+			}	/* end switch */
 		}
-	}	/* end while*/
-}	/* end main*/
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c
index b146f56..76d17f1 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c
@@ -62,20 +62,19 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	2       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	2	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test06";
 int TST_TOTAL = 3;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill(scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-		  /* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	/* Report exit status */
 }
 
 volatile int timer_expired = 0;
@@ -86,17 +85,17 @@
 	int test_num, task_num, len, num_cpus;
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
+	/* Following variables are to capture parameters from script */
 	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p;
 	char *test_num_p, *task_num_p;
 	pid_t pid;
-	gid_t mygroup_num;	        /* A number attached with a group*/
-	int fd;          	        /* to open a fifo to synchronize*/
-	int counter = 0; 	 	/* To take n number of readings*/
-	double total_cpu_time,  	/* Accumulated cpu time*/
-		delta_cpu_time,  	/* Time the task could run on cpu(s)*/
-		prev_cpu_time = 0;
-	double exp_cpu_time;            /* Exp time in % by shares calculation*/
+	gid_t mygroup_num;	/* A number attached with a group */
+	int fd;			/* to open a fifo to synchronize */
+	int counter = 0;	/* To take n number of readings */
+	double total_cpu_time,	/* Accumulated cpu time */
+	 delta_cpu_time,	/* Time the task could run on cpu(s) */
+	 prev_cpu_time = 0;
+	double exp_cpu_time;	/* Exp time in % by shares calculation */
 
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
@@ -108,33 +107,33 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
+	/* Signal handling for alarm */
 	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
 	newaction.sa_flags = 0;
 	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) <= 8) && \
-					((test_num = atoi(test_num_p)) >= 6))) {
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && \
-				 (task_num_p != NULL)) {
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi(num_cpus_p);
-			task_num	 = atoi(task_num_p);
+	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) <= 8) &&
+				     ((test_num = atoi(test_num_p)) >= 6))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL) &&
+		    (script_pid_p != NULL) && (num_cpus_p != NULL) &&
+		    (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
 			sprintf(mygroup, "%s", mygroup_p);
 		} else {
 			tst_brkm(TBROK, cleanup,
-					 "Invalid other input parameters\n");
+				 "Invalid other input parameters\n");
 		}
 	} else {
 		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
@@ -145,7 +144,7 @@
 	strcat(mytaskfile, "/tasks");
 	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file(mytaskfile, "a", pid);    /* Assign task to it's group*/
+	write_to_file(mytaskfile, "a", pid);	/* Assign task to it's group */
 
 	fd = open("./myfifo", 0);
 	if (fd == -1)
@@ -168,7 +167,7 @@
 
 	if (scan_shares_files(shares_pointer) != 0)
 		tst_brkm(TBROK, cleanup,
-		 "From function scan_shares_files in %s ", fullpath);
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
@@ -181,14 +180,14 @@
 
 	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time(NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
 	while (1) {
 		/*
 		 * Need to run some cpu intensive task, which also
 		 * frequently checks the timer value
 		 */
-		double f = 274.345, mytime;	/*just a float number for sqrt*/
+		double f = 274.345, mytime;	/*just a float number for sqrt */
 		alarm(TIME_INTERVAL);
 		timer_expired = 0;
 		/*
@@ -200,15 +199,15 @@
 			f = sqrt(f * f);
 
 		current_time = time(NULL);
-		/* Duration in case its not exact TIME_INTERVAL*/
+		/* Duration in case its not exact TIME_INTERVAL */
 		delta_time = current_time - prev_time;
 
 		getrusage(0, &cpu_usage);
 		/* total_cpu_time = total user time + total sys time */
 		total_cpu_time = (cpu_usage.ru_utime.tv_sec +
-				cpu_usage.ru_utime.tv_usec * 1e-6 +
-				cpu_usage.ru_stime.tv_sec +
-				cpu_usage.ru_stime.tv_usec * 1e-6) ;
+				  cpu_usage.ru_utime.tv_usec * 1e-6 +
+				  cpu_usage.ru_stime.tv_sec +
+				  cpu_usage.ru_stime.tv_usec * 1e-6);
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -217,10 +216,10 @@
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
 			mytime = (delta_cpu_time * 100) /
-					 (delta_time * num_cpus);
+			    (delta_time * num_cpus);
 		else
 			mytime = (delta_cpu_time * 100) /
-					 (TIME_INTERVAL * num_cpus);
+			    (TIME_INTERVAL * num_cpus);
 
 		/* No neeed to print the results */
 		fprintf(stdout, "Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)"
@@ -232,17 +231,17 @@
 
 		if (counter >= NUM_INTERVALS) {
 			switch (test_num) {
-			case 6:			/* Test 06 */
-			case 7:			/* Test 07 */
-			case 8:			/* Test 08 */
+			case 6:	/* Test 06 */
+			case 7:	/* Test 07 */
+			case 8:	/* Test 08 */
 				exit(0);	/* This task is done */
 				break;
 			default:
 				tst_brkm(TBROK, cleanup,
-						 "Invalid test num passed\n");
+					 "Invalid test num passed\n");
 				break;
 
-			}	/* end switch*/
-		}	/* end if*/
-	}	/* end while*/
-}	/* end main*/
+			}	/* end switch */
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c
index 2d38f4d..1bbaced 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c
@@ -61,20 +61,19 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	100	/* Time interval in seconds*/
-#define NUM_INTERVALS	2       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	100	/* Time interval in seconds */
+#define NUM_INTERVALS	2	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test06";
 int TST_TOTAL = 2;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill(scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-		  /* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	/* Report exit status */
 }
 
 volatile int timer_expired = 0;
@@ -88,16 +87,16 @@
 	int num_cpus;
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
+	/* Following variables are to capture parameters from script */
 	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p;
 	char *test_num_p, *task_num_p;
-	gid_t mygroup_num;	        /* A number attached with a group*/
-	int fd;          	        /* to open a fifo to synchronize*/
-	int counter = 0; 	 	/* To take n number of readings*/
-	double total_cpu_time;  	/* Accumulated cpu time*/
-	double delta_cpu_time;  	/* Time the task could run on cpu(s)*/
+	gid_t mygroup_num;	/* A number attached with a group */
+	int fd;			/* to open a fifo to synchronize */
+	int counter = 0;	/* To take n number of readings */
+	double total_cpu_time;	/* Accumulated cpu time */
+	double delta_cpu_time;	/* Time the task could run on cpu(s) */
 	double prev_cpu_time = 0;
-	double exp_cpu_time;            /* Exp time in % by shares calculation*/
+	double exp_cpu_time;	/* Exp time in % by shares calculation */
 
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
@@ -110,33 +109,33 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
+	/* Signal handling for alarm */
 	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
 	newaction.sa_flags = 0;
 	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) <= 10) && \
-					((test_num = atoi(test_num_p)) >= 9))) {
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && \
-				 (task_num_p != NULL)) {
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi(num_cpus_p);
-			task_num	 = atoi(task_num_p);
+	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) <= 10) &&
+				     ((test_num = atoi(test_num_p)) >= 9))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL) &&
+		    (script_pid_p != NULL) && (num_cpus_p != NULL) &&
+		    (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
 			sprintf(mygroup, "%s", mygroup_p);
 		} else {
 			tst_brkm(TBROK, cleanup,
-					 "Invalid other input parameters\n");
+				 "Invalid other input parameters\n");
 		}
 	} else {
 		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
@@ -177,7 +176,7 @@
 
 	if (scan_shares_files(shares_pointer) != 0)
 		tst_brkm(TBROK, cleanup,
-		 "From function scan_shares_files in %s ", fullpath);
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
@@ -190,14 +189,14 @@
 
 	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time(NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
 	while (1) {
 		/*
 		 * Need to run some cpu intensive task, which also
 		 * frequently checks the timer value
 		 */
-		double f = 274.345, mytime;	/*just a float number for sqrt*/
+		double f = 274.345, mytime;	/*just a float number for sqrt */
 		alarm(TIME_INTERVAL);
 		timer_expired = 0;
 		/*
@@ -209,15 +208,15 @@
 			f = sqrt(f * f);
 
 		current_time = time(NULL);
-		/* Duration in case its not exact TIME_INTERVAL*/
+		/* Duration in case its not exact TIME_INTERVAL */
 		delta_time = current_time - prev_time;
 
 		getrusage(0, &cpu_usage);
 		/* total_cpu_time = total user time + total sys time */
 		total_cpu_time = (cpu_usage.ru_utime.tv_sec +
-				cpu_usage.ru_utime.tv_usec * 1e-6 +
-				cpu_usage.ru_stime.tv_sec +
-				cpu_usage.ru_stime.tv_usec * 1e-6) ;
+				  cpu_usage.ru_utime.tv_usec * 1e-6 +
+				  cpu_usage.ru_stime.tv_sec +
+				  cpu_usage.ru_stime.tv_usec * 1e-6);
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -226,24 +225,24 @@
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
 			mytime = (delta_cpu_time * 100) /
-					 (delta_time * num_cpus);
+			    (delta_time * num_cpus);
 		else
 			mytime = (delta_cpu_time * 100) /
-					 (TIME_INTERVAL * num_cpus);
+			    (TIME_INTERVAL * num_cpus);
 
 		/* No neeed to print the results */
 		fprintf(stdout, "Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s) i.e."
 			"  %6.2f(%%) exp:-%6.2f(%%)} with %3u shares in %lu (s)"
 			" INTERVAL\n", mygroup_num, task_num, delta_cpu_time,
-			 mytime, exp_cpu_time, fmyshares, delta_time);
+			mytime, exp_cpu_time, fmyshares, delta_time);
 
 		counter++;
 
 		if (counter >= NUM_INTERVALS) {
 			switch (test_num) {
 
-			case 9:			/* Test 09 */
-			case 10:		/* Test 10 */
+			case 9:	/* Test 09 */
+			case 10:	/* Test 10 */
 				exit(0);	/* This task is done */
 				break;
 			default:
@@ -251,7 +250,7 @@
 					 "Invalid test number passed\n");
 				break;
 
-			}	/* end switch*/
-		}	/* end if*/
-	}	/* end while*/
-}	/* end main*/
+			}	/* end switch */
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_latency_check_task.c b/testcases/kernel/controllers/cpuctl/cpuctl_latency_check_task.c
index 39dee2f..47a2be8 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_latency_check_task.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_latency_check_task.c
@@ -58,9 +58,9 @@
 #define verbose(x...) do {} while (0);
 #endif
 
-#define NUM_TIMES 200 /* How many intervals you want to check*/
-#define INTERVALS 1  /* How many milliseconds interval in iterations*/
-#define USECONDS  1000  /* microseconds to sleep*/
+#define NUM_TIMES 200		/* How many intervals you want to check */
+#define INTERVALS 1		/* How many milliseconds interval in iterations */
+#define USECONDS  1000		/* microseconds to sleep */
 #define info	printf("The results FAIL is just intuitive and not exact" \
 		" failure. Please look at cpuctl_testplan.txt in the test directory.\n");
 
@@ -96,7 +96,7 @@
 	if (test_num == 2) {
 		strncpy(mytaskfile, argv[4], FILENAME_MAX);
 		strncat(mytaskfile, "/tasks",
-					 FILENAME_MAX - strlen(mytaskfile) - 1);
+			FILENAME_MAX - strlen(mytaskfile) - 1);
 		write_to_file(mytaskfile, "a", getpid());
 
 		/* Give a chance to other tasks too to go to their class */
@@ -106,7 +106,7 @@
 	printf("TINFO \tThe latency check task started\n");
 
 	/* Let us start capturing the time now */
-	for (count = NUM_TIMES; count >= 0 ; count -= INTERVALS) {
+	for (count = NUM_TIMES; count >= 0; count -= INTERVALS) {
 		if (gettimeofday(&prev_time, NULL) == -1)
 			perror("In Iteration no 1 \n");
 		/* sleep for specified time */
@@ -132,18 +132,18 @@
 			fail = 1;
 
 		verbose("Iteration %d: Exp(us) =%u, Actual =%u delta = %u\n",
-						 i++, sleeptime, actual, delta);
+			i++, sleeptime, actual, delta);
 	}
 
 	if (fail) {
 		printf("FAIL \tThe Latency test %d failed\n", test_num);
 		printf("Max latency observed = %u in Iteration %d\n",
-							 delta_max, iteration);
+		       delta_max, iteration);
 		info;
 	} else {
 		printf("PASS \tThe Latency test %d passed\n", test_num);
 		printf("Max latency observed = %u microsec in Iteration %d\n",
-							 delta_max, iteration);
+		       delta_max, iteration);
 	}
 	return fail;
 }
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c b/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c
index 3faaaa5..3b53f4d 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c
@@ -74,21 +74,21 @@
 
 	if (argc < 2 || argc > 3) {
 		errx(EINVAL, "TBROK\t Invalid #args received from script"
-			" The test will run without any cpu load");
+		     " The test will run without any cpu load");
 	}
 
 	/* Migrate the task to its group if applicable */
 	test_num = atoi(argv[1]);
 	if (test_num < 0) {
 		errx(EINVAL,
-		    "Invalid test number received from script. "
-		    "Skipping load creation");
+		     "Invalid test number received from script. "
+		     "Skipping load creation");
 	}
 
 	if (test_num == 2) {
 		strncpy(mytaskfile, argv[2], FILENAME_MAX);
 		strncat(mytaskfile, "/tasks",
-					 FILENAME_MAX - strlen(mytaskfile) - 1);
+			FILENAME_MAX - strlen(mytaskfile) - 1);
 		write_to_file(mytaskfile, "a", getpid());
 	}
 
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
index a2b5b61..6e6cd11 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
@@ -62,90 +62,92 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	3       /* How many iterations of TIME_INTERVAL */
-#define NUM_SETS	4	/* How many share values (with same ratio)*/
-#define MULTIPLIER   	10      /* decides the rate at which share value gets multiplied*/
-#define GRANULARITY    5       /* % value by which shares of a group changes */
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	3	/* How many iterations of TIME_INTERVAL */
+#define NUM_SETS	4	/* How many share values (with same ratio) */
+#define MULTIPLIER   	10	/* decides the rate at which share value gets multiplied */
+#define GRANULARITY    5	/* % value by which shares of a group changes */
 char *TCID = "cpu_controller_test01";
 int TST_TOTAL = 1;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill (scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-	tst_exit ();		/* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	tst_exit();		/* Report exit status */
 }
+
 volatile int timer_expired = 0;
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 
 	int num_cpus;
 	int test_num;
-	int len;	/* Total time = TIME_INTERVAL *num_cpus in the machine */
+	int len;		/* Total time = TIME_INTERVAL *num_cpus in the machine */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
 	pid_t pid;
-	gid_t my_group_num;	        /* A number attached with a group*/
-	int fd;          	        /* A descriptor to open a fifo for synchronized start*/
-	int first_counter =0;  	/* To take n number of readings*/
-	int second_counter=0;      	/* To track number of times the base value of shares has been changed*/
-	double total_cpu_time,  	/* Accumulated cpu time*/
-		delta_cpu_time,  	/* Time the task could run on cpu(s) (in an interval)*/
-		prev_cpu_time=0;
-	double exp_cpu_time;		/* Expected time in % as obtained by shares calculation */
+	gid_t my_group_num;	/* A number attached with a group */
+	int fd;			/* A descriptor to open a fifo for synchronized start */
+	int first_counter = 0;	/* To take n number of readings */
+	int second_counter = 0;	/* To track number of times the base value of shares has been changed */
+	double total_cpu_time,	/* Accumulated cpu time */
+	 delta_cpu_time,	/* Time the task could run on cpu(s) (in an interval) */
+	 prev_cpu_time = 0;
+	double exp_cpu_time;	/* Expected time in % as obtained by shares calculation */
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
-	unsigned long int myshares = 2, baseshares = 1000;	/* Simply the base value to start with*/
-	unsigned int fmyshares, num_tasks;/* f-> from file. num_tasks is tasks in this group*/
+	unsigned long int myshares = 2, baseshares = 1000;	/* Simply the base value to start with */
+	unsigned int fmyshares, num_tasks;	/* f-> from file. num_tasks is tasks in this group */
 	struct sigaction newaction, oldaction;
 
 	my_group_num = -1;
 	num_cpus = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
-	sigemptyset (&newaction.sa_mask);
+	/* Signal handling for alarm */
+	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
-	newaction.sa_flags=0;
-	sigaction (SIGALRM, &newaction, &oldaction);
+	newaction.sa_flags = 0;
+	sigaction(SIGALRM, &newaction, &oldaction);
 
-	/* Check if all parameters passed are correct*/
-	if ((argc < 5) || ((my_group_num = atoi(argv[1])) <= 0) || ((scriptpid = atoi(argv[3])) <= 0) || ((num_cpus = atoi(argv[4])) <= 0) || (test_num = atoi(argv[5])) <= 0)
-	{
-		tst_brkm (TBROK, cleanup, "Invalid input parameters\n");
+	/* Check if all parameters passed are correct */
+	if ((argc < 5) || ((my_group_num = atoi(argv[1])) <= 0)
+	    || ((scriptpid = atoi(argv[3])) <= 0)
+	    || ((num_cpus = atoi(argv[4])) <= 0)
+	    || (test_num = atoi(argv[5])) <= 0) {
+		tst_brkm(TBROK, cleanup, "Invalid input parameters\n");
 	}
 
 	if (test_num == 1)	/* Test 01 & Test 02 */
 		myshares *= my_group_num;
-	else if (test_num == 3) /* Test 03 */
+	else if (test_num == 3)	/* Test 03 */
 		myshares = baseshares;
-	else
-	{
-		tst_brkm (TBROK, cleanup, "Wrong Test number passed. Exiting Test...\n");
+	else {
+		tst_brkm(TBROK, cleanup,
+			 "Wrong Test number passed. Exiting Test...\n");
 	}
 
-	sprintf(mygroup,"%s", argv[2]);
+	sprintf(mygroup, "%s", argv[2]);
 	sprintf(mytaskfile, "%s", mygroup);
 	sprintf(mysharesfile, "%s", mygroup);
-	strcat (mytaskfile,"/tasks");
-	strcat (mysharesfile,"/cpu.shares");
+	strcat(mytaskfile, "/tasks");
+	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file (mytaskfile, "a", pid);    /* Assign the task to it's group*/
-	write_to_file (mysharesfile, "w", myshares);
+	write_to_file(mytaskfile, "a", pid);	/* Assign the task to it's group */
+	write_to_file(mysharesfile, "w", myshares);
 
-	fd = open ("./myfifo", 0);
-	if (fd == -1)
-	{
-		tst_brkm (TBROK, cleanup, "Could not open fifo for synchronization");
+	fd = open("./myfifo", 0);
+	if (fd == -1) {
+		tst_brkm(TBROK, cleanup,
+			 "Could not open fifo for synchronization");
 	}
 
-	fprintf(stdout,"\ntask-%d SHARES=%lu\n",my_group_num, myshares);
-	read (fd, &ch, 1);	         /* To block all tasks here and fire them up at the same time*/
+	fprintf(stdout, "\ntask-%d SHARES=%lu\n", my_group_num, myshares);
+	read(fd, &ch, 1);	/* To block all tasks here and fire them up at the same time */
 
 	/*
 	 * We now calculate the expected % cpu time of this task by getting
@@ -155,91 +157,99 @@
 	FLAG = 0;
 	total_shares = 0;
 	shares_pointer = &total_shares;
-	len = strlen (path);
-	if (!strncpy (fullpath, path, len))
-		tst_brkm (TBROK, cleanup, "Could not copy directory path %s ", path);
+	len = strlen(path);
+	if (!strncpy(fullpath, path, len))
+		tst_brkm(TBROK, cleanup, "Could not copy directory path %s ",
+			 path);
 
 	if (scan_shares_files(shares_pointer) != 0)
-		tst_brkm (TBROK, cleanup, "From function scan_shares_files in %s ", fullpath);
+		tst_brkm(TBROK, cleanup,
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val: -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
-		tst_brkm (TBROK, cleanup, "in reading shares files  %s ", mysharesfile);
+		tst_brkm(TBROK, cleanup, "in reading shares files  %s ",
+			 mysharesfile);
 
-	if ((read_file (mytaskfile, GET_TASKS, &num_tasks)) < 0)
-		tst_brkm (TBROK, cleanup, "in reading tasks files  %s ", mytaskfile);
+	if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
+		tst_brkm(TBROK, cleanup, "in reading tasks files  %s ",
+			 mytaskfile);
 
-	exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
+	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time (NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
-	while (1)
-	{
-		/* Need to run some cpu intensive task, which also frequently checks the timer value*/
-		double f = 274.345, mytime;	/*just a float number to take sqrt*/
-		alarm (TIME_INTERVAL);
+	while (1) {
+		/* Need to run some cpu intensive task, which also frequently checks the timer value */
+		double f = 274.345, mytime;	/*just a float number to take sqrt */
+		alarm(TIME_INTERVAL);
 		timer_expired = 0;
-		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL*/
-			f = sqrt (f*f); /* Time of this operation should not be high otherwise we can
-					 * exceed the TIME_INTERVAL to measure cpu usage
-					 */
-			current_time = time (NULL);
-			delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL*/
+		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL */
+			f = sqrt(f * f);	/* Time of this operation should not be high otherwise we can
+						 * exceed the TIME_INTERVAL to measure cpu usage
+						 */
+		current_time = time(NULL);
+		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL */
 
-			getrusage (0, &cpu_usage);
-			total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 + /*user*/
-					cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6) ;  /*sys*/
-					delta_cpu_time = total_cpu_time - prev_cpu_time;
+		getrusage(0, &cpu_usage);
+		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 +	/*user */
+				  cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6);	/*sys */
+		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
-			prev_cpu_time = total_cpu_time;
-			prev_time = current_time;
+		prev_cpu_time = total_cpu_time;
+		prev_time = current_time;
 
-			/* calculate % cpu time each task gets */
-			if (delta_time > TIME_INTERVAL)
-				mytime =  (delta_cpu_time * 100) / (delta_time * num_cpus);
-			else
-				mytime =  (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
+		/* calculate % cpu time each task gets */
+		if (delta_time > TIME_INTERVAL)
+			mytime =
+			    (delta_cpu_time * 100) / (delta_time * num_cpus);
+		else
+			mytime =
+			    (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
 
-			fprintf (stdout,"task-%d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
-with %lu(shares) in %lu (s) INTERVAL\n",my_group_num, delta_cpu_time, mytime,\
-exp_cpu_time, myshares, delta_time);
-			first_counter++;
+		fprintf(stdout, "task-%d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
+with %lu(shares) in %lu (s) INTERVAL\n", my_group_num, delta_cpu_time, mytime,
+			exp_cpu_time, myshares, delta_time);
+		first_counter++;
 
-			if (first_counter >= NUM_INTERVALS)	/* Take n sets of readings for each shares value*/
-			{
-				first_counter = 0;
-				second_counter++;
-				if (second_counter >= NUM_SETS)
-					exit (0);		/* This task is done with its job*/
+		if (first_counter >= NUM_INTERVALS) {	/* Take n sets of readings for each shares value */
+			first_counter = 0;
+			second_counter++;
+			if (second_counter >= NUM_SETS)
+				exit(0);	/* This task is done with its job */
 
-                                /* Change share values depending on the test_num */
-                                if (test_num ==1)
-                                {
-                                        /* Keep same ratio but change values*/
-                                        myshares = MULTIPLIER * myshares;
-                                }
-                                else
-                                {
-                                        /* Increase for odd task and decrease for even task*/
-                                        if (my_group_num % 2)
-                                                myshares += baseshares * GRANULARITY / 100;
-                                        else
-                                                myshares -= baseshares * GRANULARITY / 100;
-                                }
-				write_to_file (mysharesfile, "w", myshares);
-				if (test_num == 3)
-				{
+			/* Change share values depending on the test_num */
+			if (test_num == 1) {
+				/* Keep same ratio but change values */
+				myshares = MULTIPLIER * myshares;
+			} else {
+				/* Increase for odd task and decrease for even task */
+				if (my_group_num % 2)
+					myshares +=
+					    baseshares * GRANULARITY / 100;
+				else
+					myshares -=
+					    baseshares * GRANULARITY / 100;
+			}
+			write_to_file(mysharesfile, "w", myshares);
+			if (test_num == 3) {
 				/*
 				 * Read the shares file and again calculate the cpu fraction
 				 * No need to read tasks file as we do not migrate tasks
 				 * No need to scan all shares file as total shares are const
 				 */
-				if ((fmyshares = read_shares_file(mysharesfile)) < 2)
-					tst_brkm (TBROK, cleanup, "in reading shares files  %s ", mysharesfile);
-				exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
-				}
+				if ((fmyshares =
+				     read_shares_file(mysharesfile)) < 2)
+					tst_brkm(TBROK, cleanup,
+						 "in reading shares files  %s ",
+						 mysharesfile);
+				exp_cpu_time =
+				    (double)(fmyshares * 100) / (total_shares *
+								 num_tasks);
+			}
 
-				fprintf(stdout,"\ntask-%d SHARES=%lu\n",my_group_num, myshares);
-			}/* end if*/
-        }/* end while*/
-}/* end main*/
+			fprintf(stdout, "\ntask-%d SHARES=%lu\n", my_group_num,
+				myshares);
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
index 92e452e..6794833 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c
@@ -61,50 +61,50 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	3       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	3	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test04";
 int TST_TOTAL = 1;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
 
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill (scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-	tst_exit ();		/* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	tst_exit();		/* Report exit status */
 }
 
-int migrate_task ();
+int migrate_task();
 volatile int timer_expired = 0;
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 
 	int test_num;
 	int task_num;
 	int len;
-	int num_cpus;	/* Total time = TIME_INTERVAL *num_cpus in the machine */
-	int migrate=0;			/* For task migration*/
+	int num_cpus;		/* Total time = TIME_INTERVAL *num_cpus in the machine */
+	int migrate = 0;	/* For task migration */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
-	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p, *task_num_p;
+	/* Following variables are to capture parameters from script */
+	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
+	    *task_num_p;
 	pid_t pid;
-	gid_t mygroup_num;	        /* A number attached with a group*/
-	int fd;          	        /* A descriptor to open a fifo for synchronized start*/
-	int counter =0; 	 	/* To take n number of readings*/
-	double total_cpu_time,  	/* Accumulated cpu time*/
-		delta_cpu_time,  	/* Time the task could run on cpu(s) (in an interval)*/
-		prev_cpu_time=0;
-        double exp_cpu_time;            /* Expected time in % as obtained by shares calculation */
+	gid_t mygroup_num;	/* A number attached with a group */
+	int fd;			/* A descriptor to open a fifo for synchronized start */
+	int counter = 0;	/* To take n number of readings */
+	double total_cpu_time,	/* Accumulated cpu time */
+	 delta_cpu_time,	/* Time the task could run on cpu(s) (in an interval) */
+	 prev_cpu_time = 0;
+	double exp_cpu_time;	/* Expected time in % as obtained by shares calculation */
 
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
-        unsigned int fmyshares, num_tasks;/* f-> from file. num_tasks is tasks in this group*/
+	unsigned int fmyshares, num_tasks;	/* f-> from file. num_tasks is tasks in this group */
 	struct sigaction newaction, oldaction;
 
 	mygroup_num = -1;
@@ -112,55 +112,53 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
-	sigemptyset (&newaction.sa_mask);
+	/* Signal handling for alarm */
+	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
-	newaction.sa_flags=0;
-	sigaction (SIGALRM, &newaction, &oldaction);
+	newaction.sa_flags = 0;
+	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) == 4) || ((test_num =atoi(test_num_p)) == 5)))
-	{
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && (task_num_p != NULL))
-		{
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi (num_cpus_p);
-			task_num	 = atoi (task_num_p);
-			sprintf(mygroup,"%s", mygroup_p);
+	if ((test_num_p != NULL)
+	    && (((test_num = atoi(test_num_p)) == 4)
+		|| ((test_num = atoi(test_num_p)) == 5))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL)
+		    && (script_pid_p != NULL) && (num_cpus_p != NULL)
+		    && (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
+			sprintf(mygroup, "%s", mygroup_p);
+		} else {
+			tst_brkm(TBROK, cleanup,
+				 "Invalid other input parameters\n");
 		}
-		else
-		{
-			tst_brkm (TBROK, cleanup, "Invalid other input parameters\n");
-		}
-	}
-	else
-	{
-		tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+	} else {
+		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
 	}
 
 	sprintf(mytaskfile, "%s", mygroup);
 	sprintf(mysharesfile, "%s", mygroup);
-	strcat (mytaskfile,"/tasks");
-	strcat (mysharesfile,"/cpu.shares");
+	strcat(mytaskfile, "/tasks");
+	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file (mytaskfile, "a", pid);    /* Assign the task to it's group*/
+	write_to_file(mytaskfile, "a", pid);	/* Assign the task to it's group */
 
-	fd = open ("./myfifo", 0);
-	if (fd == -1)
-	{
-		tst_brkm (TBROK, cleanup, "Could not open fifo for synchronization");
+	fd = open("./myfifo", 0);
+	if (fd == -1) {
+		tst_brkm(TBROK, cleanup,
+			 "Could not open fifo for synchronization");
 	}
 
-	read (fd, &ch, 1);	         /* To block all tasks here and fire them up at the same time*/
+	read(fd, &ch, 1);	/* To block all tasks here and fire them up at the same time */
 
 	/*
 	 * We now calculate the expected % cpu time of this task by getting
@@ -170,40 +168,43 @@
 	FLAG = 0;
 	total_shares = 0;
 	shares_pointer = &total_shares;
-	len = strlen (path);
-	if (!strncpy (fullpath, path, len))
-		tst_brkm (TBROK, cleanup, "Could not copy directory path %s ", path);
+	len = strlen(path);
+	if (!strncpy(fullpath, path, len))
+		tst_brkm(TBROK, cleanup, "Could not copy directory path %s ",
+			 path);
 
 	if (scan_shares_files(shares_pointer) != 0)
-		tst_brkm (TBROK, cleanup, "From function scan_shares_files in %s ", fullpath);
+		tst_brkm(TBROK, cleanup,
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val: -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
-		tst_brkm (TBROK, cleanup, "in reading shares files  %s ", mysharesfile);
+		tst_brkm(TBROK, cleanup, "in reading shares files  %s ",
+			 mysharesfile);
 
-	if ((read_file (mytaskfile, GET_TASKS, &num_tasks)) < 0)
-		tst_brkm (TBROK, cleanup, "in reading tasks files  %s ", mytaskfile);
+	if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
+		tst_brkm(TBROK, cleanup, "in reading tasks files  %s ",
+			 mytaskfile);
 
-	exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
+	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time (NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
-	while (1)
-	{
-		/* Need to run some cpu intensive task, which also frequently checks the timer value*/
-		double f = 274.345, mytime;	/*just a float number to take sqrt*/
-		alarm (TIME_INTERVAL);
+	while (1) {
+		/* Need to run some cpu intensive task, which also frequently checks the timer value */
+		double f = 274.345, mytime;	/*just a float number to take sqrt */
+		alarm(TIME_INTERVAL);
 		timer_expired = 0;
-		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL*/
-			f = sqrt (f*f); /* Time of this operation should not be high otherwise we can
-					 * exceed the TIME_INTERVAL to measure cpu usage
-					 */
-		current_time = time (NULL);
-		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL*/
+		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL */
+			f = sqrt(f * f);	/* Time of this operation should not be high otherwise we can
+						 * exceed the TIME_INTERVAL to measure cpu usage
+						 */
+		current_time = time(NULL);
+		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL */
 
-		getrusage (0, &cpu_usage);
-		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 + /* user time*/
-				cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6) ;  /* system time*/
+		getrusage(0, &cpu_usage);
+		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 +	/* user time */
+				  cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6);	/* system time */
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -211,67 +212,73 @@
 
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
-			mytime =  (delta_cpu_time * 100) / (delta_time * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (delta_time * num_cpus);
 		else
-			mytime =  (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
 
-                fprintf (stdout,"Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%)exp:-%6.2f(%%)}\
-with %u(shares) in %lu (s) INTERVAL\n",mygroup_num, task_num, delta_cpu_time, mytime,\
-exp_cpu_time, fmyshares, delta_time);
+		fprintf(stdout, "Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%)exp:-%6.2f(%%)}\
+with %u(shares) in %lu (s) INTERVAL\n", mygroup_num, task_num, delta_cpu_time,
+			mytime, exp_cpu_time, fmyshares, delta_time);
 
 		counter++;
 
-		if (counter >= NUM_INTERVALS)	 /* Take n sets of readings for each shares value*/
-		{
-		switch (test_num)
-			{
-			case 4:			/* Test04 */
-				exit (0);	/* This task is done with its job*/
+		if (counter >= NUM_INTERVALS) {	/* Take n sets of readings for each shares value */
+			switch (test_num) {
+			case 4:	/* Test04 */
+				exit(0);	/* This task is done with its job */
 				break;
-			case 5:			/* Test 05 */
-				if (migrate == 0)
-				{
+			case 5:	/* Test 05 */
+				if (migrate == 0) {
 					counter = 0;
-					fprintf (stdout, "FIRST RUN COMPLETED FOR TASK %d\n", task_num);
+					fprintf(stdout,
+						"FIRST RUN COMPLETED FOR TASK %d\n",
+						task_num);
 					migrate = 1;
-				}
-				else
-				{
-					fprintf (stdout, "SECOND RUN COMPLETED FOR TASK %d\n", task_num);
-					exit (0);
+				} else {
+					fprintf(stdout,
+						"SECOND RUN COMPLETED FOR TASK %d\n",
+						task_num);
+					exit(0);
 				}
 				break;
 			default:
-				tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+				tst_brkm(TBROK, cleanup,
+					 "Invalid test number passed\n");
 				break;
 
-			}	/* end switch*/
+			}	/* end switch */
 		}
-		if ((migrate == 1) && (counter == 0))
-		{
-			if (task_num == 1)
-			{
+		if ((migrate == 1) && (counter == 0)) {
+			if (task_num == 1) {
 				if (migrate_task() != 0)
-					tst_brkm (TFAIL, cleanup, "Could not migrate task 1 ");
+					tst_brkm(TFAIL, cleanup,
+						 "Could not migrate task 1 ");
 				else
-					fprintf (stdout, "TASK 1 MIGRATED FROM GROUP 1 TO GROUP 2\n");
-				strcpy (mytaskfile, "/dev/cpuctl/group_2/tasks");
+					fprintf(stdout,
+						"TASK 1 MIGRATED FROM GROUP 1 TO GROUP 2\n");
+				strcpy(mytaskfile, "/dev/cpuctl/group_2/tasks");
 			}
 			/*
 			 * Read the shares files and again calculate the cpu fraction
 			 * In test 2(case 4) we need to read tasks file as we migrate task
 			 * Q?? How to ensure other tasks do not read before task 1 migration
 			 */
-			if ((read_file (mytaskfile, GET_TASKS, &num_tasks)) < 0)
-				tst_brkm (TBROK, cleanup, "in reading tasks files  %s ", mytaskfile);
-			exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
+			if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
+				tst_brkm(TBROK, cleanup,
+					 "in reading tasks files  %s ",
+					 mytaskfile);
+			exp_cpu_time =
+			    (double)(fmyshares * 100) / (total_shares *
+							 num_tasks);
 		}
-        }	/* end while*/
-}	/* end main*/
+	}			/* end while */
+}				/* end main */
 
-int migrate_task ()
+int migrate_task()
 {
-	char target[32] = "/dev/cpuctl/group_2/tasks";/* Hard coding..Will try dynamic*/
+	char target[32] = "/dev/cpuctl/group_2/tasks";	/* Hard coding..Will try dynamic */
 	pid_t pid = getpid();
-	return (write_to_file (target, "a", pid));
+	return (write_to_file(target, "a", pid));
 }
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
index 21071f9..0b1d559 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c
@@ -62,46 +62,46 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	30	/* Time interval in seconds*/
-#define NUM_INTERVALS	2       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	30	/* Time interval in seconds */
+#define NUM_INTERVALS	2	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test06";
 int TST_TOTAL = 3;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill (scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-	tst_exit ();		  /* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	tst_exit();		/* Report exit status */
 }
 
 volatile int timer_expired = 0;
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 
 	int test_num;
 	int task_num;
 	int len;
-	int num_cpus;	/* Total time = TIME_INTERVAL *num_cpus in the machine */
+	int num_cpus;		/* Total time = TIME_INTERVAL *num_cpus in the machine */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
-	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p, *task_num_p;
+	/* Following variables are to capture parameters from script */
+	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
+	    *task_num_p;
 	pid_t pid;
-	int mygroup_num,	        /* A number attached with a group*/
-		fd,          	        /* A descriptor to open a fifo for synchronized start*/
-		counter =0; 	 	/* To take n number of readings*/
-	double total_cpu_time,  	/* Accumulated cpu time*/
-		delta_cpu_time,  	/* Time the task could run on cpu(s) (in an interval)*/
-		prev_cpu_time=0;
-	double exp_cpu_time;            /* Expected time in % as obtained by shares calculation */
+	int mygroup_num,	/* A number attached with a group */
+	 fd,			/* A descriptor to open a fifo for synchronized start */
+	 counter = 0;		/* To take n number of readings */
+	double total_cpu_time,	/* Accumulated cpu time */
+	 delta_cpu_time,	/* Time the task could run on cpu(s) (in an interval) */
+	 prev_cpu_time = 0;
+	double exp_cpu_time;	/* Expected time in % as obtained by shares calculation */
 	struct rusage cpu_usage;
 	time_t current_time, prev_time, delta_time;
-	unsigned int fmyshares, num_tasks;/* f-> from file. num_tasks is tasks in this group*/
+	unsigned int fmyshares, num_tasks;	/* f-> from file. num_tasks is tasks in this group */
 	struct sigaction newaction, oldaction;
 
 	mygroup_num = -1;
@@ -109,55 +109,53 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
-	sigemptyset (&newaction.sa_mask);
+	/* Signal handling for alarm */
+	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
-	newaction.sa_flags=0;
-	sigaction (SIGALRM, &newaction, &oldaction);
+	newaction.sa_flags = 0;
+	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num = atoi(test_num_p)) <= 8) && ((test_num =atoi(test_num_p)) >= 6)))
-	{
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && (task_num_p != NULL))
-		{
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi (num_cpus_p);
-			task_num	 = atoi (task_num_p);
-			sprintf(mygroup,"%s", mygroup_p);
+	if ((test_num_p != NULL)
+	    && (((test_num = atoi(test_num_p)) <= 8)
+		&& ((test_num = atoi(test_num_p)) >= 6))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL)
+		    && (script_pid_p != NULL) && (num_cpus_p != NULL)
+		    && (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
+			sprintf(mygroup, "%s", mygroup_p);
+		} else {
+			tst_brkm(TBROK, cleanup,
+				 "Invalid other input parameters\n");
 		}
-		else
-		{
-			tst_brkm (TBROK, cleanup, "Invalid other input parameters\n");
-		}
-	}
-	else
-	{
-		tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+	} else {
+		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
 	}
 
 	sprintf(mytaskfile, "%s", mygroup);
 	sprintf(mysharesfile, "%s", mygroup);
-	strcat (mytaskfile,"/tasks");
-	strcat (mysharesfile,"/cpu.shares");
+	strcat(mytaskfile, "/tasks");
+	strcat(mysharesfile, "/cpu.shares");
 	pid = getpid();
-	write_to_file (mytaskfile, "a", pid);    /* Assign the task to it's group*/
+	write_to_file(mytaskfile, "a", pid);	/* Assign the task to it's group */
 
-	fd = open ("./myfifo", 0);
-	if (fd == -1)
-	{
-		tst_brkm (TBROK, cleanup, "Could not open fifo for synchronization");
+	fd = open("./myfifo", 0);
+	if (fd == -1) {
+		tst_brkm(TBROK, cleanup,
+			 "Could not open fifo for synchronization");
 	}
 
-	read (fd, &ch, 1);	         /* To block all tasks here and fire them up at the same time*/
+	read(fd, &ch, 1);	/* To block all tasks here and fire them up at the same time */
 
 	/*
 	 * We now calculate the expected % cpu time of this task by getting
@@ -167,40 +165,43 @@
 	FLAG = 0;
 	total_shares = 0;
 	shares_pointer = &total_shares;
-	len = strlen (path);
-	if (!strncpy (fullpath, path, len))
-		tst_brkm (TBROK, cleanup, "Could not copy directory path %s ", path);
+	len = strlen(path);
+	if (!strncpy(fullpath, path, len))
+		tst_brkm(TBROK, cleanup, "Could not copy directory path %s ",
+			 path);
 
 	if (scan_shares_files(shares_pointer) != 0)
-		tst_brkm (TBROK, cleanup, "From function scan_shares_files in %s ", fullpath);
+		tst_brkm(TBROK, cleanup,
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val: -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
-		tst_brkm (TBROK, cleanup, "in reading shares files  %s ", mysharesfile);
+		tst_brkm(TBROK, cleanup, "in reading shares files  %s ",
+			 mysharesfile);
 
-	if ((read_file (mytaskfile, GET_TASKS, &num_tasks)) < 0)
-		tst_brkm (TBROK, cleanup, "in reading tasks files  %s ", mytaskfile);
+	if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
+		tst_brkm(TBROK, cleanup, "in reading tasks files  %s ",
+			 mytaskfile);
 
-	exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
+	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time (NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
-	while (1)
-	{
-		/* Need to run some cpu intensive task, which also frequently checks the timer value*/
-		double f = 274.345, mytime;	/*just a float number to take sqrt*/
-		alarm (TIME_INTERVAL);
+	while (1) {
+		/* Need to run some cpu intensive task, which also frequently checks the timer value */
+		double f = 274.345, mytime;	/*just a float number to take sqrt */
+		alarm(TIME_INTERVAL);
 		timer_expired = 0;
-		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL*/
-			f = sqrt (f*f); /* Time of this operation should not be high otherwise we can
-					 * exceed the TIME_INTERVAL to measure cpu usage
-					 */
-		current_time = time (NULL);
-		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL*/
+		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL */
+			f = sqrt(f * f);	/* Time of this operation should not be high otherwise we can
+						 * exceed the TIME_INTERVAL to measure cpu usage
+						 */
+		current_time = time(NULL);
+		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL */
 
-		getrusage (0, &cpu_usage);
-		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 + /* user time*/
-				cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6) ;  /* system time*/
+		getrusage(0, &cpu_usage);
+		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 +	/* user time */
+				  cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6);	/* system time */
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -208,30 +209,31 @@
 
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
-			mytime =  (delta_cpu_time * 100) / (delta_time * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (delta_time * num_cpus);
 		else
-			mytime =  (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
 
-                fprintf (stdout,"Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
- in %lu (s) INTERVAL\n",mygroup_num, task_num, delta_cpu_time, mytime,\
-exp_cpu_time, delta_time);
+		fprintf(stdout, "Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
+ in %lu (s) INTERVAL\n", mygroup_num, task_num, delta_cpu_time, mytime,
+			exp_cpu_time, delta_time);
 
 		counter++;
 
-		if (counter >= NUM_INTERVALS)	 /* Take n sets of readings for each shares value*/
-		{
-		switch (test_num)
-			{
-			case 6:			/* Test 06 */
-			case 7:			/* Test 07 */
-			case 8:			/* Test 08 */
-				exit (0);		/* This task is done with its job*/
+		if (counter >= NUM_INTERVALS) {	/* Take n sets of readings for each shares value */
+			switch (test_num) {
+			case 6:	/* Test 06 */
+			case 7:	/* Test 07 */
+			case 8:	/* Test 08 */
+				exit(0);	/* This task is done with its job */
 				break;
 			default:
-				tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+				tst_brkm(TBROK, cleanup,
+					 "Invalid test number passed\n");
 				break;
 
-			}	/* end switch*/
-		}	/* end if*/
-        }	/* end while*/
-}	/* end main*/
+			}	/* end switch */
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
index 9d97833..c2182b7 100644
--- a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
+++ b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c
@@ -61,47 +61,47 @@
 #include <unistd.h>
 
 #include "../libcontrollers/libcontrollers.h"
-#include "test.h"		/* LTP harness APIs*/
+#include "test.h"		/* LTP harness APIs */
 
-#define TIME_INTERVAL	100	/* Time interval in seconds*/
-#define NUM_INTERVALS	2       /* How many iterations of TIME_INTERVAL */
+#define TIME_INTERVAL	100	/* Time interval in seconds */
+#define NUM_INTERVALS	2	/* How many iterations of TIME_INTERVAL */
 
 char *TCID = "cpu_controller_test06";
 int TST_TOTAL = 2;
 pid_t scriptpid;
 char path[] = "/dev/cpuctl";
 
-extern void
-cleanup()
+extern void cleanup()
 {
-	kill (scriptpid, SIGUSR1);/* Inform the shell to do cleanup*/
-	tst_exit ();		  /* Report exit status*/
+	kill(scriptpid, SIGUSR1);	/* Inform the shell to do cleanup */
+	tst_exit();		/* Report exit status */
 }
 
 volatile int timer_expired = 0;
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 
 	int test_num;
 	int task_num;
 	int len;
-	int num_cpus;	/* Total time = TIME_INTERVAL *num_cpus in the machine */
+	int num_cpus;		/* Total time = TIME_INTERVAL *num_cpus in the machine */
 	char mygroup[FILENAME_MAX], mytaskfile[FILENAME_MAX];
 	char mysharesfile[FILENAME_MAX], ch;
-	/* Following variables are to capture parameters from script*/
-	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p, *task_num_p;
-	gid_t mygroup_num;	        /* A number attached with a group*/
-	int fd;          	        /* A descriptor to open a fifo for synchronized start*/
-	int counter =0; 	 	/* To take n number of readings*/
-	double total_cpu_time,  	/* Accumulated cpu time*/
-		delta_cpu_time,  	/* Time the task could run on cpu(s) (in an interval)*/
-		prev_cpu_time=0;
-	double exp_cpu_time;            /* Expected time in % as obtained by shares calculation */
+	/* Following variables are to capture parameters from script */
+	char *group_num_p, *mygroup_p, *script_pid_p, *num_cpus_p, *test_num_p,
+	    *task_num_p;
+	gid_t mygroup_num;	/* A number attached with a group */
+	int fd;			/* A descriptor to open a fifo for synchronized start */
+	int counter = 0;	/* To take n number of readings */
+	double total_cpu_time,	/* Accumulated cpu time */
+	 delta_cpu_time,	/* Time the task could run on cpu(s) (in an interval) */
+	 prev_cpu_time = 0;
+	double exp_cpu_time;	/* Expected time in % as obtained by shares calculation */
 	struct rusage cpu_usage;
 	unsigned long int mygroup_shares;
 	time_t current_time, prev_time, delta_time;
-	unsigned int fmyshares, num_tasks;/* f-> from file. num_tasks is tasks in this group*/
+	unsigned int fmyshares, num_tasks;	/* f-> from file. num_tasks is tasks in this group */
 	struct sigaction newaction, oldaction;
 
 	mygroup_num = -1;
@@ -109,39 +109,37 @@
 	task_num = 0;
 	test_num = 0;
 
-	/* Signal handling for alarm*/
-	sigemptyset (&newaction.sa_mask);
+	/* Signal handling for alarm */
+	sigemptyset(&newaction.sa_mask);
 	newaction.sa_handler = signal_handler_alarm;
-	newaction.sa_flags=0;
-	sigaction (SIGALRM, &newaction, &oldaction);
+	newaction.sa_flags = 0;
+	sigaction(SIGALRM, &newaction, &oldaction);
 
 	/* Collect the parameters passed by the script */
-	group_num_p	= getenv("GROUP_NUM");
-	mygroup_p	= getenv("MYGROUP");
-	script_pid_p 	= getenv("SCRIPT_PID");
-	num_cpus_p 	= getenv("NUM_CPUS");
-	test_num_p 	= getenv("TEST_NUM");
-	task_num_p 	= getenv("TASK_NUM");
+	group_num_p = getenv("GROUP_NUM");
+	mygroup_p = getenv("MYGROUP");
+	script_pid_p = getenv("SCRIPT_PID");
+	num_cpus_p = getenv("NUM_CPUS");
+	test_num_p = getenv("TEST_NUM");
+	task_num_p = getenv("TASK_NUM");
 	/* Check if all of them are valid */
-	if ((test_num_p != NULL) && (((test_num =atoi(test_num_p)) <= 10) && ((test_num =atoi(test_num_p)) >= 9)))
-	{
-		if ((group_num_p != NULL) && (mygroup_p != NULL) && \
-			(script_pid_p != NULL) && (num_cpus_p != NULL) && (task_num_p != NULL))
-		{
-			mygroup_num	 = atoi(group_num_p);
-			scriptpid	 = atoi(script_pid_p);
-			num_cpus	 = atoi (num_cpus_p);
-			task_num	 = atoi (task_num_p);
-			sprintf(mygroup,"%s", mygroup_p);
+	if ((test_num_p != NULL)
+	    && (((test_num = atoi(test_num_p)) <= 10)
+		&& ((test_num = atoi(test_num_p)) >= 9))) {
+		if ((group_num_p != NULL) && (mygroup_p != NULL)
+		    && (script_pid_p != NULL) && (num_cpus_p != NULL)
+		    && (task_num_p != NULL)) {
+			mygroup_num = atoi(group_num_p);
+			scriptpid = atoi(script_pid_p);
+			num_cpus = atoi(num_cpus_p);
+			task_num = atoi(task_num_p);
+			sprintf(mygroup, "%s", mygroup_p);
+		} else {
+			tst_brkm(TBROK, cleanup,
+				 "Invalid other input parameters\n");
 		}
-		else
-		{
-			tst_brkm (TBROK, cleanup, "Invalid other input parameters\n");
-		}
-	}
-	else
-	{
-		tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+	} else {
+		tst_brkm(TBROK, cleanup, "Invalid test number passed\n");
 	}
 
 	/*
@@ -152,22 +150,22 @@
 	mygroup_shares = mygroup_num * 100;
 
 	sprintf(mytaskfile, "%s", mygroup);
-	strcat (mytaskfile,"/tasks");
+	strcat(mytaskfile, "/tasks");
 	sprintf(mysharesfile, "%s", mygroup);
-	strcat (mysharesfile,"/cpu.shares");
+	strcat(mysharesfile, "/cpu.shares");
 	/* Need some technique so as only 1 task per grp writes to shares file */
 	if (test_num == 9)
-		write_to_file (mysharesfile, "w", mygroup_shares);    /* Write the shares of the group*/
+		write_to_file(mysharesfile, "w", mygroup_shares);	/* Write the shares of the group */
 
-	write_to_file (mytaskfile, "a", getpid());    /* Assign the task to it's group*/
+	write_to_file(mytaskfile, "a", getpid());	/* Assign the task to it's group */
 
-	fd = open ("./myfifo", 0);
-	if (fd == -1)
-	{
-		tst_brkm (TBROK, cleanup, "Could not open fifo for synchronization");
+	fd = open("./myfifo", 0);
+	if (fd == -1) {
+		tst_brkm(TBROK, cleanup,
+			 "Could not open fifo for synchronization");
 	}
 
-	read (fd, &ch, 1);	         /* To block all tasks here and fire them up at the same time*/
+	read(fd, &ch, 1);	/* To block all tasks here and fire them up at the same time */
 
 	/*
 	 * We now calculate the expected % cpu time of this task by getting
@@ -177,40 +175,43 @@
 	FLAG = 0;
 	total_shares = 0;
 	shares_pointer = &total_shares;
-	len = strlen (path);
-	if (!strncpy (fullpath, path, len))
-		tst_brkm (TBROK, cleanup, "Could not copy directory path %s ", path);
+	len = strlen(path);
+	if (!strncpy(fullpath, path, len))
+		tst_brkm(TBROK, cleanup, "Could not copy directory path %s ",
+			 path);
 
 	if (scan_shares_files(shares_pointer) != 0)
-		tst_brkm (TBROK, cleanup, "From function scan_shares_files in %s ", fullpath);
+		tst_brkm(TBROK, cleanup,
+			 "From function scan_shares_files in %s ", fullpath);
 
 	/* return val: -1 in case of function error, else 2 is min share value */
 	if ((fmyshares = read_shares_file(mysharesfile)) < 2)
-		tst_brkm (TBROK, cleanup, "in reading shares files  %s ", mysharesfile);
+		tst_brkm(TBROK, cleanup, "in reading shares files  %s ",
+			 mysharesfile);
 
-	if ((read_file (mytaskfile, GET_TASKS, &num_tasks)) < 0)
-		tst_brkm (TBROK, cleanup, "in reading tasks files  %s ", mytaskfile);
+	if ((read_file(mytaskfile, GET_TASKS, &num_tasks)) < 0)
+		tst_brkm(TBROK, cleanup, "in reading tasks files  %s ",
+			 mytaskfile);
 
-	exp_cpu_time = (double)(fmyshares * 100) /(total_shares * num_tasks);
+	exp_cpu_time = (double)(fmyshares * 100) / (total_shares * num_tasks);
 
-	prev_time = time (NULL);	 /* Note down the time*/
+	prev_time = time(NULL);	/* Note down the time */
 
-	while (1)
-	{
-		/* Need to run some cpu intensive task, which also frequently checks the timer value*/
-		double f = 274.345, mytime;	/*just a float number to take sqrt*/
-		alarm (TIME_INTERVAL);
+	while (1) {
+		/* Need to run some cpu intensive task, which also frequently checks the timer value */
+		double f = 274.345, mytime;	/*just a float number to take sqrt */
+		alarm(TIME_INTERVAL);
 		timer_expired = 0;
-		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL*/
-			f = sqrt (f*f); /* Time of this operation should not be high otherwise we can
-					 * exceed the TIME_INTERVAL to measure cpu usage
-					 */
-		current_time = time (NULL);
-		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL*/
+		while (!timer_expired)	/* Let the task run on cpu for TIME_INTERVAL */
+			f = sqrt(f * f);	/* Time of this operation should not be high otherwise we can
+						 * exceed the TIME_INTERVAL to measure cpu usage
+						 */
+		current_time = time(NULL);
+		delta_time = current_time - prev_time;	/* Duration in case its not exact TIME_INTERVAL */
 
-		getrusage (0, &cpu_usage);
-		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 + /* user time*/
-				cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6) ;  /* system time*/
+		getrusage(0, &cpu_usage);
+		total_cpu_time = (cpu_usage.ru_utime.tv_sec + cpu_usage.ru_utime.tv_usec * 1e-6 +	/* user time */
+				  cpu_usage.ru_stime.tv_sec + cpu_usage.ru_stime.tv_usec * 1e-6);	/* system time */
 		delta_cpu_time = total_cpu_time - prev_cpu_time;
 
 		prev_cpu_time = total_cpu_time;
@@ -218,31 +219,32 @@
 
 		/* calculate % cpu time each task gets */
 		if (delta_time > TIME_INTERVAL)
-			mytime =  (delta_cpu_time * 100) / (delta_time * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (delta_time * num_cpus);
 		else
-			mytime =  (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
+			mytime =
+			    (delta_cpu_time * 100) / (TIME_INTERVAL * num_cpus);
 
-                fprintf (stdout,"Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
-with %3u shares in %lu (s) INTERVAL\n",mygroup_num, task_num, delta_cpu_time, mytime,\
-exp_cpu_time, fmyshares, delta_time);
+		fprintf(stdout, "Grp:-%3d task-%3d:CPU TIME{calc:-%6.2f(s)i.e. %6.2f(%%) exp:-%6.2f(%%)}\
+with %3u shares in %lu (s) INTERVAL\n", mygroup_num, task_num, delta_cpu_time,
+			mytime, exp_cpu_time, fmyshares, delta_time);
 
 		counter++;
 
-		if (counter >= NUM_INTERVALS)	 /* Take n sets of readings for each shares value*/
-		{
-		switch (test_num)
-			{
-			case 9:			/* Test 09 */
-				exit (0);	/* This task is done with its job*/
+		if (counter >= NUM_INTERVALS) {	/* Take n sets of readings for each shares value */
+			switch (test_num) {
+			case 9:	/* Test 09 */
+				exit(0);	/* This task is done with its job */
 				break;
-			case 10:			/* Test 10 */
-				exit (0);		/* This task is done with its job*/
+			case 10:	/* Test 10 */
+				exit(0);	/* This task is done with its job */
 				break;
 			default:
-				tst_brkm (TBROK, cleanup, "Invalid test number passed\n");
+				tst_brkm(TBROK, cleanup,
+					 "Invalid test number passed\n");
 				break;
 
-			}	/* end switch*/
-		}	/* end if*/
-        }	/* end while*/
-}	/* end main*/
+			}	/* end switch */
+		}		/* end if */
+	}			/* end while */
+}				/* end main */
diff --git a/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_simple_echo.c b/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_simple_echo.c
index 572278f..47eb445 100644
--- a/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_simple_echo.c
+++ b/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_simple_echo.c
@@ -49,12 +49,12 @@
 
 	if (argc != 2 && argc != 3) {
 		fprintf(stderr, "usage: %s STRING [ostream]\n",
-		    basename(argv[0]));
+			basename(argv[0]));
 		exit(1);
 	}
 
 	if (argc == 3)
-		if ((fd = open(argv[2], O_RDWR|O_SYNC)) == -1)
+		if ((fd = open(argv[2], O_RDWR | O_SYNC)) == -1)
 			err(errno, "%s", argv[2]);
 
 	if (write(fd, argv[1], strlen(argv[1])) == -1)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
index ac4675e..1b55f4b 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
@@ -38,7 +38,7 @@
 			add_or_subtract = 0;
 			optc++;
 			break;
-		case 'h':   /* help */
+		case 'h':	/* help */
 			usage(argv[0], 0);
 			break;
 		case 's':
@@ -55,8 +55,7 @@
 		OPT_COLLIDING(argv[0], 'a', 's');
 
 	if (argc == optc + 1) {
-		fprintf(stderr, "%s: missing the argument list1.\n",
-			argv[0]);
+		fprintf(stderr, "%s: missing the argument list1.\n", argv[0]);
 		usage(argv[0], 1);
 	} else if (argc == optc + 2)
 		convert = 1;
diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/cpuinfo.c b/testcases/kernel/controllers/cpuset/cpuset_lib/cpuinfo.c
index d747627..65c5072 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_lib/cpuinfo.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/cpuinfo.c
@@ -46,7 +46,7 @@
 	}
 
 	/* allocate the memory space for cpus */
-	cpus = (struct cpuinfo*)malloc(sizeof(*cpus) * ncpus);
+	cpus = (struct cpuinfo *)malloc(sizeof(*cpus) * ncpus);
 	if (cpus == NULL)
 		return -1;
 	memset(cpus, 0, sizeof(*cpus) * ncpus);
@@ -140,14 +140,14 @@
 	 */
 	if ((fp = fopen(LIST_PRESENT_CPU_FILE, "r")) == NULL) {
 		while_each_childdir(SYS_CPU_DIR, "/", c_relpath,
-					sizeof(c_relpath)) {
+				    sizeof(c_relpath)) {
 			if (!strncmp(c_relpath + 1, "cpu", 3)
 			    && sscanf(c_relpath + 4, "%d", &cpu) > 0) {
 				if (cpu >= 0)
-			    		bitmask_setbit(cpumask, cpu);
+					bitmask_setbit(cpumask, cpu);
 			}
-		} end_while_each_childdir
-	} else {
+		}
+	end_while_each_childdir} else {
 		if (fgets(buf, sizeof(buf), fp) == NULL) {
 			fclose(fp);
 			return -1;
@@ -228,8 +228,8 @@
 			}
 		} else if (!strncmp(str1, "domain", 6)) {
 			if (!cpus[ci].sched_domain) {
-				cpus[ci].sched_domain = bitmask_alloc(
-								cpus_nbits);
+				cpus[ci].sched_domain =
+				    bitmask_alloc(cpus_nbits);
 				if (!cpus[ci].sched_domain)
 					return -1;
 			}
@@ -257,7 +257,7 @@
 	if (cpus == NULL) {
 		if (get_cpu_baseinfo() != 0) {
 			warn("get base infomation of cpus from /proc/cpuinfo "
-				"failed.");
+			     "failed.");
 			return -1;
 		}
 	}
@@ -296,7 +296,7 @@
 	while (fgets(buf, sizeof(buf), fp) != NULL) {
 		if (!strncmp(buf, "cpuset", 6)) {
 			sscanf(buf, "%s\t%d\t%d\t%d\n", subsys_name,
-				&hierarchy, &num_cgroups, &enabled);
+			       &hierarchy, &num_cgroups, &enabled);
 		}
 	}
 
@@ -334,17 +334,18 @@
 		return 0;
 
 	if (cpuset_cpus_weight(cp) > 0
-			&& cpuset_get_iopt(cp, "sched_load_balance") == 1) {
+	    && cpuset_get_iopt(cp, "sched_load_balance") == 1) {
 		cpusets[ncpusets] = cp;
 		ncpusets++;
 		return 0;
 	}
 
 	while_each_childdir(cpuset_mountpoint(), relpath, c_relpath,
-				sizeof(c_relpath)) {
+			    sizeof(c_relpath)) {
 		if ((ret = find_domain_cpusets(c_relpath)))
-				break;
-	} end_while_each_childdir;
+			break;
+	}
+	end_while_each_childdir;
 
 	return ret;
 }
diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/libbitmask.c b/testcases/kernel/controllers/cpuset/cpuset_lib/libbitmask.c
index a6629f5..57faf78 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_lib/libbitmask.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/libbitmask.c
@@ -58,7 +58,7 @@
 static unsigned int _getbit(const struct bitmask *bmp, unsigned int n)
 {
 	if (n < bmp->size)
-		return (bmp->maskp[n/bitsperlong] >> (n % bitsperlong)) & 1;
+		return (bmp->maskp[n / bitsperlong] >> (n % bitsperlong)) & 1;
 	else
 		return 0;
 }
@@ -68,9 +68,10 @@
 {
 	if (n < bmp->size) {
 		if (v)
-			bmp->maskp[n/bitsperlong] |= 1UL << (n % bitsperlong);
+			bmp->maskp[n / bitsperlong] |= 1UL << (n % bitsperlong);
 		else
-			bmp->maskp[n/bitsperlong] &= ~(1UL << (n % bitsperlong));
+			bmp->maskp[n / bitsperlong] &=
+			    ~(1UL << (n % bitsperlong));
 	}
 }
 
@@ -101,7 +102,7 @@
 	if (bmp == 0)
 		return;
 	free(bmp->maskp);
-	bmp->maskp = (unsigned long *)0xdeadcdef;  /* double free tripwire */
+	bmp->maskp = (unsigned long *)0xdeadcdef;	/* double free tripwire */
 	free(bmp);
 }
 
@@ -109,8 +110,8 @@
  * Display and parse ascii string representations.
  */
 
-#define HEXCHUNKSZ 32	/* hex binary format shows 32 bits per chunk */
-#define HEXCHARSZ 8	/* hex ascii format has up to 8 chars per chunk */
+#define HEXCHUNKSZ 32		/* hex binary format shows 32 bits per chunk */
+#define HEXCHARSZ 8		/* hex ascii format has up to 8 chars per chunk */
 #define max(a,b) ((a) > (b) ? (a) : (b))
 
 /*
@@ -139,7 +140,7 @@
 		for (bit = HEXCHUNKSZ - 1; bit >= 0; bit--)
 			val = val << 1 | _getbit(bmp, chunk * HEXCHUNKSZ + bit);
 		cnt += snprintf(buf + cnt, max(buflen - cnt, 0), "%s%0*x",
-			sep, HEXCHARSZ, val);
+				sep, HEXCHARSZ, val);
 		sep = ",";
 	}
 	return cnt;
@@ -161,7 +162,9 @@
 	if (rbot == rtop)
 		len += snprintf(buf + len, max(buflen - len, 0), "%d", rbot);
 	else
-		len += snprintf(buf + len, max(buflen - len, 0), "%d-%d", rbot, rtop);
+		len +=
+		    snprintf(buf + len, max(buflen - len, 0), "%d-%d", rbot,
+			     rtop);
 	return len;
 }
 
@@ -190,7 +193,7 @@
 	rbot = cur = bitmask_first(bmp);
 	while (cur < bmp->size) {
 		rtop = cur;
-		cur = bitmask_next(bmp, cur+1);
+		cur = bitmask_next(bmp, cur + 1);
 		if (cur >= bmp->size || cur > rtop + 1) {
 			len = emit(buf, buflen, rbot, rtop, len);
 			rbot = cur;
@@ -199,7 +202,7 @@
 	return len;
 }
 
-static const char *nexttoken(const char *q,  int sep)
+static const char *nexttoken(const char *q, int sep)
 {
 	if (q)
 		q = strchr(q, sep);
@@ -280,8 +283,7 @@
  */
 static int scan_was_ok(int sret, char nextc, const char *ok_next_chars)
 {
-	return sret == 1 ||
-		(sret == 2 && strchr(ok_next_chars, nextc) != NULL);
+	return sret == 1 || (sret == 2 && strchr(ok_next_chars, nextc) != NULL);
 }
 
 /*
@@ -302,12 +304,12 @@
 
 	q = buf;
 	while (p = q, q = nexttoken(q, ','), p) {
-		unsigned int a;		/* begin of range */
-		unsigned int b;		/* end of range */
-		unsigned int s;		/* stride */
+		unsigned int a;	/* begin of range */
+		unsigned int b;	/* end of range */
+		unsigned int s;	/* stride */
 		const char *c1, *c2;	/* next tokens after '-' or ',' */
-		char nextc;		/* char after sscanf %u match */
-		int sret;		/* sscanf return (number of matches) */
+		char nextc;	/* char after sscanf %u match */
+		int sret;	/* sscanf return (number of matches) */
 
 		sret = sscanf(p, "%u%c", &a, &nextc);
 		if (!scan_was_ok(sret, nextc, ",-"))
@@ -423,7 +425,7 @@
 /* True if specified bit i is clear */
 int bitmask_isbitclear(const struct bitmask *bmp, unsigned int i)
 {
-	return ! _getbit(bmp, i);
+	return !_getbit(bmp, i);
 }
 
 /* True if all bits are set */
@@ -431,7 +433,7 @@
 {
 	unsigned int i;
 	for (i = 0; i < bmp->size; i++)
-		if (! _getbit(bmp, i))
+		if (!_getbit(bmp, i))
 			return 0;
 	return 1;
 }
@@ -514,7 +516,7 @@
 
 /* Set bits of bitmask in specified range [i, j) */
 struct bitmask *bitmask_setrange(struct bitmask *bmp,
-				unsigned int i, unsigned int j)
+				 unsigned int i, unsigned int j)
 {
 	unsigned int n;
 	for (n = i; n < j; n++)
@@ -524,7 +526,7 @@
 
 /* Clear bits of bitmask in specified range */
 struct bitmask *bitmask_clearrange(struct bitmask *bmp,
-				unsigned int i, unsigned int j)
+				   unsigned int i, unsigned int j)
 {
 	unsigned int n;
 	for (n = i; n < j; n++)
@@ -534,7 +536,7 @@
 
 /* Clear all but specified range */
 struct bitmask *bitmask_keeprange(struct bitmask *bmp,
-				unsigned int i, unsigned int j)
+				  unsigned int i, unsigned int j)
 {
 	bitmask_clearrange(bmp, 0, i);
 	bitmask_clearrange(bmp, j, bmp->size);
@@ -547,31 +549,31 @@
 
 /* Complement: bmp1 = ~bmp2 */
 struct bitmask *bitmask_complement(struct bitmask *bmp1,
-				const struct bitmask *bmp2)
+				   const struct bitmask *bmp2)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
-		_setbit(bmp1, i, ! _getbit(bmp2, i));
+		_setbit(bmp1, i, !_getbit(bmp2, i));
 	return bmp1;
 }
 
 /* Right shift: bmp1 = bmp2 >> n */
 struct bitmask *bitmask_shiftright(struct bitmask *bmp1,
-				const struct bitmask *bmp2, unsigned int n)
+				   const struct bitmask *bmp2, unsigned int n)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
-		_setbit(bmp1, i, _getbit(bmp2, i+n));
+		_setbit(bmp1, i, _getbit(bmp2, i + n));
 	return bmp1;
 }
 
 /* Left shift: bmp1 = bmp2 << n */
 struct bitmask *bitmask_shiftleft(struct bitmask *bmp1,
-				const struct bitmask *bmp2, unsigned int n)
+				  const struct bitmask *bmp2, unsigned int n)
 {
 	int i;
 	for (i = bmp1->size - 1; i >= 0; i--)
-		_setbit(bmp1, i, _getbit(bmp2, i-n));
+		_setbit(bmp1, i, _getbit(bmp2, i - n));
 	return bmp1;
 }
 
@@ -581,7 +583,7 @@
 
 /* Logical `and` of two bitmasks: bmp1 = bmp2 & bmp3 */
 struct bitmask *bitmask_and(struct bitmask *bmp1, const struct bitmask *bmp2,
-				const struct bitmask *bmp3)
+			    const struct bitmask *bmp3)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
@@ -591,7 +593,7 @@
 
 /* Logical `andnot` of two bitmasks: bmp1 = bmp2 & ~bmp3 */
 struct bitmask *bitmask_andnot(struct bitmask *bmp1, const struct bitmask *bmp2,
-				const struct bitmask *bmp3)
+			       const struct bitmask *bmp3)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
@@ -601,7 +603,7 @@
 
 /* Logical `or` of two bitmasks: bmp1 = bmp2 | bmp3 */
 struct bitmask *bitmask_or(struct bitmask *bmp1, const struct bitmask *bmp2,
-				const struct bitmask *bmp3)
+			   const struct bitmask *bmp3)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
@@ -611,7 +613,7 @@
 
 /* Logical `eor` of two bitmasks: bmp1 = bmp2 ^ bmp3 */
 struct bitmask *bitmask_eor(struct bitmask *bmp1, const struct bitmask *bmp2,
-				const struct bitmask *bmp3)
+			    const struct bitmask *bmp3)
 {
 	unsigned int i;
 	for (i = 0; i < bmp1->size; i++)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c b/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
index dc2dd6b..b9cf67c 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c
@@ -42,7 +42,7 @@
 #include <sys/types.h>
 #include <time.h>
 #include <utime.h>
-#include <sys/utsname.h> /* for cpuset_would_crash_kernel() */
+#include <sys/utsname.h>	/* for cpuset_would_crash_kernel() */
 
 #include "bitmask.h"
 #include "cpuset.h"
@@ -281,7 +281,7 @@
  * assuming that stat(2) on that file has a useful size.
  * Has side affect of leaving the file rewound to the beginnning.
  */
-static int filesize(FILE *fp)
+static int filesize(FILE * fp)
 {
 	int sz = 0;
 	rewind(fp);
@@ -452,26 +452,26 @@
 /* In place path compression.  Remove extra dots and slashes. */
 static char *pathcomp(char *p)
 {
-	char *a=p;
-	char *b=p;
+	char *a = p;
+	char *b = p;
 
 	if (!p || !*p)
 		return p;
-	if (slash (p))
+	if (slash(p))
 		*b++ = *a++;
 	for (;;) {
-		if (slash (a))
-			while (slash (++a))
+		if (slash(a))
+			while (slash(++a))
 				continue;
 		if (!*a) {
-			if (b==p)
+			if (b == p)
 				*b++ = '.';
 			*b = '\0';
 			return (p);
-		} else if (dot1 (a)) {
+		} else if (dot1(a)) {
 			a++;
 		} else {
-			if ((b!=p) && !slash(b-1))
+			if ((b != p) && !slash(b - 1))
 				*b++ = '/';
 			while (!eocomp(a))
 				*b++ = *a++;
@@ -490,9 +490,9 @@
  */
 
 static char *pathcat2(char *buf, int buflen, const char *name1,
-					const char *name2)
+		      const char *name2)
 {
-	(void) snprintf(buf, buflen, "%s/%s", name1, name2);
+	(void)snprintf(buf, buflen, "%s/%s", name1, name2);
 	return pathcomp(buf);
 }
 
@@ -503,9 +503,9 @@
  */
 
 static char *pathcat3(char *buf, int buflen, const char *name1,
-					const char *name2, const char *name3)
+		      const char *name2, const char *name3)
 {
-	(void) snprintf(buf, buflen, "%s/%s/%s", name1, name2, name3);
+	(void)snprintf(buf, buflen, "%s/%s/%s", name1, name2, name3);
 	return pathcomp(buf);
 }
 
@@ -552,7 +552,7 @@
  */
 
 static int fullpath2(char *buf, int buflen, const char *name1,
-							const char *name2)
+		     const char *name2)
 {
 	if (fullpath(buf, buflen, name1) < 0)
 		return -1;
@@ -699,39 +699,39 @@
 int cpuset_set_iopt(struct cpuset *cp, const char *optionname, int value)
 {
 	if (streq(optionname, "cpu_exclusive")) {
-		cp->cpu_exclusive = !!value;
+		cp->cpu_exclusive = ! !value;
 		cp->cpu_exclusive_valid = 1;
 		cp->cpu_exclusive_dirty = 1;
 	} else if (streq(optionname, "mem_exclusive")) {
-		cp->mem_exclusive = !!value;
+		cp->mem_exclusive = ! !value;
 		cp->mem_exclusive_valid = 1;
 		cp->mem_exclusive_dirty = 1;
 	} else if (streq(optionname, "mem_hardwall")) {
-		cp->mem_hardwall = !!value;
+		cp->mem_hardwall = ! !value;
 		cp->mem_hardwall_valid = 1;
 		cp->mem_hardwall_dirty = 1;
 	} else if (streq(optionname, "notify_on_release")) {
-		cp->notify_on_release = !!value;
+		cp->notify_on_release = ! !value;
 		cp->notify_on_release_valid = 1;
 		cp->notify_on_release_dirty = 1;
 	} else if (streq(optionname, "memory_pressure_enabled")) {
-		cp->memory_pressure_enabled = !!value;
+		cp->memory_pressure_enabled = ! !value;
 		cp->memory_pressure_enabled_valid = 1;
 		cp->memory_pressure_enabled_dirty = 1;
 	} else if (streq(optionname, "memory_migrate")) {
-		cp->memory_migrate = !!value;
+		cp->memory_migrate = ! !value;
 		cp->memory_migrate_valid = 1;
 		cp->memory_migrate_dirty = 1;
 	} else if (streq(optionname, "memory_spread_page")) {
-		cp->memory_spread_page = !!value;
+		cp->memory_spread_page = ! !value;
 		cp->memory_spread_page_valid = 1;
 		cp->memory_spread_page_dirty = 1;
 	} else if (streq(optionname, "memory_spread_slab")) {
-		cp->memory_spread_slab = !!value;
+		cp->memory_spread_slab = ! !value;
 		cp->memory_spread_slab_valid = 1;
 		cp->memory_spread_slab_dirty = 1;
 	} else if (streq(optionname, "sched_load_balance")) {
-		cp->sched_load_balance = !!value;
+		cp->sched_load_balance = ! !value;
 		cp->sched_load_balance_valid = 1;
 		cp->sched_load_balance_dirty = 1;
 	} else if (streq(optionname, "sched_relax_domain_level")) {
@@ -745,9 +745,9 @@
 
 /* [optional] Set string value optname */
 int cpuset_set_sopt(UNUSED struct cpuset *cp, UNUSED const char *optionname,
-						UNUSED const char *value)
+		    UNUSED const char *value)
 {
-	return -2;	/* For now, all string options unrecognized */
+	return -2;		/* For now, all string options unrecognized */
 }
 
 /* Return handle for reading memory_pressure. */
@@ -786,7 +786,7 @@
  * resolving the current tasks cpuset.
  */
 static const struct cpuset *resolve_cp(const struct cpuset *cp,
-			struct cpuset **cp_tofree)
+				       struct cpuset **cp_tofree)
 {
 	const struct cpuset *rcp;
 
@@ -917,14 +917,14 @@
 
 /* [optional] Return string value of optname */
 const char *cpuset_get_sopt(UNUSED const struct cpuset *cp,
-				UNUSED const char *optionname)
+			    UNUSED const char *optionname)
 {
-	return NULL;	/* For now, all string options unrecognized */
+	return NULL;		/* For now, all string options unrecognized */
 }
 
 static int read_flag(const char *filepath, char *flagp)
 {
-	char buf[SMALL_BUFSZ];		/* buffer a "0" or "1" flag line */
+	char buf[SMALL_BUFSZ];	/* buffer a "0" or "1" flag line */
 	int fd = -1;
 
 	if ((fd = open(filepath, O_RDONLY)) < 0)
@@ -1015,7 +1015,7 @@
 }
 
 static int load_mask(const char *path, struct bitmask **bmpp,
-						int nbits, const char *mask)
+		     int nbits, const char *mask)
 {
 	char buf[PATH_MAX];
 
@@ -1028,7 +1028,7 @@
 {
 	int fd = -1;
 
-	if ((fd = open(filepath, O_WRONLY|O_CREAT, 0644)) < 0)
+	if ((fd = open(filepath, O_WRONLY | O_CREAT, 0644)) < 0)
 		goto err;
 	if (write(fd, str, strlen(str)) < 0)
 		goto err;
@@ -1087,7 +1087,7 @@
 }
 
 static int store_mask(const char *path, const char *mask,
-						const struct bitmask *bmp)
+		      const struct bitmask *bmp)
 {
 	char maskpath[PATH_MAX];
 	char *bp = NULL;
@@ -1114,8 +1114,8 @@
 	char online;
 	char cpupath[PATH_MAX];
 
-	(void) snprintf(cpupath, sizeof(cpupath),
-		"/sys/devices/system/cpu/cpu%d/online", cpu);
+	(void)snprintf(cpupath, sizeof(cpupath),
+		       "/sys/devices/system/cpu/cpu%d/online", cpu);
 	if (read_flag(cpupath, &online) < 0)
 		return 0;	/* oops - guess that cpu's not there */
 	return online;
@@ -1184,8 +1184,8 @@
  */
 
 static struct cpunodemap {
-	int *map;	/* map[cpumask_sz]: maps cpu to its node */
-	time_t mtime;	/* modtime of mapfile when last read */
+	int *map;		/* map[cpumask_sz]: maps cpu to its node */
+	time_t mtime;		/* modtime of mapfile when last read */
 } cpunodemap;
 
 /*
@@ -1223,7 +1223,7 @@
 			if (sscanf(dent2->d_name, "cpu%u", &cpu) < 1)
 				continue;
 			if (cpu >= (unsigned int)ncpus
-				|| mem >= (unsigned int)nmems)
+			    || mem >= (unsigned int)nmems)
 				continue;
 			cpunodemap.map[cpu] = mem;
 		}
@@ -1245,13 +1245,13 @@
 
 static void load_map()
 {
-	char buf[SMALL_BUFSZ];		/* buffer 1 line of mapfile */
-	FILE *mapfp;			/* File stream on mapfile */
+	char buf[SMALL_BUFSZ];	/* buffer 1 line of mapfile */
+	FILE *mapfp;		/* File stream on mapfile */
 	int ncpus = cpuset_cpus_nbits();
 	int nmems = cpuset_mems_nbits();
 	unsigned int cpu, mem;
 
-	if ((cpunodemap.map = calloc(ncpus, sizeof (int))) == NULL)
+	if ((cpunodemap.map = calloc(ncpus, sizeof(int))) == NULL)
 		return;
 	cpunodemap.mtime = get_mtime(mapfile);
 	if ((mapfp = fopen(mapfile, "r")) == NULL)
@@ -1302,7 +1302,7 @@
 	if (rename(buf, mapfile) < 0)
 		goto err;
 	/* mkstemp() creates mode 0600 - change to world readable */
-	(void) chmod(mapfile, 0444);
+	(void)chmod(mapfile, 0444);
 	return;
 err:
 	if (mapfp != NULL) {
@@ -1311,7 +1311,7 @@
 	}
 	if (fd >= 0)
 		close(fd);
-	(void) unlink(buf);
+	(void)unlink(buf);
 }
 
 /*
@@ -1417,9 +1417,9 @@
 
 typedef unsigned char distmap_entry_t;	/* type of distmap[] entries */
 
-static distmap_entry_t *distmap;  	/* maps <cpu, mem> to distance */
+static distmap_entry_t *distmap;	/* maps <cpu, mem> to distance */
 
-#define DISTMAP_MAX UCHAR_MAX		/* maximum value in distmap[] */
+#define DISTMAP_MAX UCHAR_MAX	/* maximum value in distmap[] */
 
 #define I(i,j) ((i) * nmems + (j))	/* 2-D array index simulation */
 
@@ -1463,7 +1463,7 @@
 		if (p == q)
 			break;
 		if (d < DISTMAP_MAX)
-			dists[n] = (distmap_entry_t)d;
+			dists[n] = (distmap_entry_t) d;
 	}
 
 	if ((mems = bitmask_alloc(nmems)) == NULL)
@@ -1475,7 +1475,7 @@
 	cpuset_localcpus(mems, cpus);
 
 	for (c = bitmask_first(cpus); c < (unsigned int)ncpus;
-		c = bitmask_next(cpus, c + 1))
+	     c = bitmask_next(cpus, c + 1))
 		for (n = 0; n < (unsigned int)nmems; n++)
 			distmap[I(c, n)] = dists[n];
 	ret = 0;
@@ -1546,7 +1546,7 @@
 		if (sscanf(dent->d_name, "node%u", &node) < 1)
 			continue;
 		pathcat3(buf, sizeof(buf), distance_directory, dent->d_name,
-								"distance");
+			 "distance");
 		if (parse_distance_file(node, buf) < 0)
 			goto err;
 	}
@@ -1609,7 +1609,7 @@
 		if (p == q)
 			break;
 		if (d < DISTMAP_MAX)
-			dists[n] = (distmap_entry_t)d;
+			dists[n] = (distmap_entry_t) d;
 	}
 
 	if ((mems = bitmask_alloc(nmems)) == NULL)
@@ -1621,7 +1621,7 @@
 	cpuset_localcpus(mems, cpus);
 
 	for (c = bitmask_first(cpus); c < (unsigned int)ncpus;
-			c = bitmask_next(cpus, c + 1))
+	     c = bitmask_next(cpus, c + 1))
 		for (n = 0; n < (unsigned int)nmems; n++)
 			distmap[I(c, n)] = dists[n];
 	/* fall into ... */
@@ -1753,13 +1753,13 @@
 	}
 
 	if (cp->notify_on_release_valid && cp->notify_on_release_dirty) {
-		if (store_flag(path, "notify_on_release", cp->notify_on_release) < 0)
+		if (store_flag(path, "notify_on_release", cp->notify_on_release)
+		    < 0)
 			goto err;
 	}
 
 	if (cp->memory_migrate_valid &&
-	    cp->memory_migrate_dirty &&
-	    exists_flag(path, "memory_migrate")) {
+	    cp->memory_migrate_dirty && exists_flag(path, "memory_migrate")) {
 		if (store_flag(path, "memory_migrate", cp->memory_migrate) < 0)
 			goto err;
 	}
@@ -1767,35 +1767,42 @@
 	if (cp->memory_pressure_enabled_valid &&
 	    cp->memory_pressure_enabled_dirty &&
 	    exists_flag(path, "memory_pressure_enabled")) {
-		if (store_flag(path, "memory_pressure_enabled", cp->memory_pressure_enabled) < 0)
+		if (store_flag
+		    (path, "memory_pressure_enabled",
+		     cp->memory_pressure_enabled) < 0)
 			goto err;
 	}
 
 	if (cp->memory_spread_page_valid &&
 	    cp->memory_spread_page_dirty &&
 	    exists_flag(path, "memory_spread_page")) {
-		if (store_flag(path, "memory_spread_page", cp->memory_spread_page) < 0)
+		if (store_flag
+		    (path, "memory_spread_page", cp->memory_spread_page) < 0)
 			goto err;
 	}
 
 	if (cp->memory_spread_slab_valid &&
 	    cp->memory_spread_slab_dirty &&
 	    exists_flag(path, "memory_spread_slab")) {
-		if (store_flag(path, "memory_spread_slab", cp->memory_spread_slab) < 0)
+		if (store_flag
+		    (path, "memory_spread_slab", cp->memory_spread_slab) < 0)
 			goto err;
 	}
 
 	if (cp->sched_load_balance_valid &&
 	    cp->sched_load_balance_dirty &&
 	    exists_flag(path, "sched_load_balance")) {
-		if (store_flag(path, "sched_load_balance", cp->sched_load_balance) < 0)
+		if (store_flag
+		    (path, "sched_load_balance", cp->sched_load_balance) < 0)
 			goto err;
 	}
 
 	if (cp->sched_relax_domain_level_valid &&
 	    cp->sched_relax_domain_level_dirty &&
 	    exists_flag(path, "sched_relax_domain_level")) {
-		if (store_number(path, "sched_relax_domain_level", cp->sched_relax_domain_level) < 0)
+		if (store_number
+		    (path, "sched_relax_domain_level",
+		     cp->sched_relax_domain_level) < 0)
 			goto err;
 	}
 
@@ -1970,8 +1977,7 @@
 	    cp1->mem_exclusive != cp2->mem_exclusive)
 		cp1->mem_exclusive_dirty = 1;
 
-	if (cp1->mem_hardwall_valid &&
-	    cp1->mem_hardwall != cp2->mem_hardwall)
+	if (cp1->mem_hardwall_valid && cp1->mem_hardwall != cp2->mem_hardwall)
 		cp1->mem_hardwall_dirty = 1;
 
 	if (cp1->notify_on_release_valid &&
@@ -2050,11 +2056,11 @@
 err:
 	sav_errno = errno;
 	if (do_restore_cp_sav_on_err)
-		(void) apply_cpuset_settings(buf, cp_sav);
+		(void)apply_cpuset_settings(buf, cp_sav);
 	if (cp_sav)
 		cpuset_free(cp_sav);
 	if (do_rmdir_on_err)
-		(void) rmdir(buf);
+		(void)rmdir(buf);
 	errno = sav_errno;
 	return -1;
 }
@@ -2117,31 +2123,38 @@
 	}
 
 	if (exists_flag(buf, "memory_pressure_enabled")) {
-		if (load_flag(buf, &cp->memory_pressure_enabled, "memory_pressure_enabled") < 0)
+		if (load_flag
+		    (buf, &cp->memory_pressure_enabled,
+		     "memory_pressure_enabled") < 0)
 			goto err;
 		cp->memory_pressure_enabled_valid = 1;
 	}
 
 	if (exists_flag(buf, "memory_spread_page")) {
-		if (load_flag(buf, &cp->memory_spread_page, "memory_spread_page") < 0)
+		if (load_flag
+		    (buf, &cp->memory_spread_page, "memory_spread_page") < 0)
 			goto err;
 		cp->memory_spread_page_valid = 1;
 	}
 
 	if (exists_flag(buf, "memory_spread_slab")) {
-		if (load_flag(buf, &cp->memory_spread_slab, "memory_spread_slab") < 0)
+		if (load_flag
+		    (buf, &cp->memory_spread_slab, "memory_spread_slab") < 0)
 			goto err;
 		cp->memory_spread_slab_valid = 1;
 	}
 
 	if (exists_flag(buf, "sched_load_balance")) {
-		if (load_flag(buf, &cp->sched_load_balance, "sched_load_balance") < 0)
+		if (load_flag
+		    (buf, &cp->sched_load_balance, "sched_load_balance") < 0)
 			goto err;
 		cp->sched_load_balance_valid = 1;
 	}
 
 	if (exists_flag(buf, "sched_relax_domain_level")) {
-		if (load_number(buf, &cp->sched_relax_domain_level, "sched_relax_domain_level") < 0)
+		if (load_number
+		    (buf, &cp->sched_relax_domain_level,
+		     "sched_relax_domain_level") < 0)
 			goto err;
 		cp->sched_relax_domain_level_valid = 1;
 	}
@@ -2168,8 +2181,8 @@
 /* Get cpuset path of pid into buf */
 char *cpuset_getcpusetpath(pid_t pid, char *buf, size_t size)
 {
-	int fd;		     /* dual use: cpuset file for pid and self */
-	int rc;		     /* dual use: snprintf and read return codes */
+	int fd;			/* dual use: cpuset file for pid and self */
+	int rc;			/* dual use: snprintf and read return codes */
 
 	if (check() < 0)
 		return NULL;
@@ -2425,8 +2438,8 @@
 int cpuset_nuke(const char *relpath, unsigned int seconds)
 {
 	unsigned int secs_left = seconds;	/* total sleep seconds left */
-	unsigned int secs_loop = 1;		/* how much sleep next loop */
-	unsigned int secs_slept;		/* seconds slept in sleep() */
+	unsigned int secs_loop = 1;	/* how much sleep next loop */
+	unsigned int secs_slept;	/* seconds slept in sleep() */
 	struct cpuset_pidlist *pl = NULL;	/* pids in cpuset subtree */
 	struct cpuset_fts_tree *cs_tree;
 	const struct cpuset_fts_entry *cs_entry;
@@ -2633,15 +2646,15 @@
 /* numeric comparison routine for qsort */
 static int numericsort(const void *m1, const void *m2)
 {
-	pid_t p1 = * (pid_t *) m1;
-	pid_t p2 = * (pid_t *) m2;
+	pid_t p1 = *(pid_t *) m1;
+	pid_t p2 = *(pid_t *) m2;
 
 	return p1 - p2;
 }
 
 /* Return list pids in cpuset 'path' */
 struct cpuset_pidlist *cpuset_init_pidlist(const char *relpath,
-							int recursiveflag)
+					   int recursiveflag)
 {
 	struct pidblock *pb = NULL;
 	struct cpuset_pidlist *pl = NULL;
@@ -2696,12 +2709,12 @@
 }
 
 /* Return i'th element of pidlist */
-pid_t cpuset_get_pidlist(const struct cpuset_pidlist *pl, int i)
+pid_t cpuset_get_pidlist(const struct cpuset_pidlist * pl, int i)
 {
 	if (pl && i >= 0 && i < pl->npids)
 		return pl->pids[i];
 	else
-		return (pid_t)-1;
+		return (pid_t) - 1;
 }
 
 /* Free pidlist */
@@ -2913,7 +2926,7 @@
 	if (store_flag(buf2, "memory_migrate", 1) < 0)
 		return -1;
 
- 	fullpath2(buf, sizeof(buf), relpath, "tasks");
+	fullpath2(buf, sizeof(buf), relpath, "tasks");
 
 	ret = 0;
 	for (i = 0; i < pl->npids; i++)
@@ -3082,7 +3095,7 @@
 
 #if HAVE_DECL_MPOL_F_ADDR && HAVE_DECL_MPOL_F_NODE
 static int get_mempolicy(int *policy, unsigned long *nmask,
-			unsigned long maxnode, void *addr, int flags)
+			 unsigned long maxnode, void *addr, int flags)
 {
 	return syscall(__NR_get_mempolicy, policy, nmask, maxnode, addr, flags);
 }
@@ -3141,11 +3154,11 @@
 
 /* Compare two placement structs - use to detect changes in placement */
 int cpuset_equal_placement(const struct cpuset_placement *plc1,
-					const struct cpuset_placement *plc2)
+			   const struct cpuset_placement *plc2)
 {
-	return	bitmask_equal(plc1->cpus, plc2->cpus) &&
-		bitmask_equal(plc1->mems, plc2->mems) &&
-		streq(plc1->path, plc2->path);
+	return bitmask_equal(plc1->cpus, plc2->cpus) &&
+	    bitmask_equal(plc1->mems, plc2->mems) &&
+	    streq(plc1->path, plc2->path);
 }
 
 /* Free a placement struct */
@@ -3193,13 +3206,13 @@
 /* Open a handle on a cpuset hierarchy.  All the real work is done here. */
 struct cpuset_fts_tree *cpuset_fts_open(const char *cpusetpath)
 {
-	FTS* fts = NULL;
+	FTS *fts = NULL;
 	FTSENT *ftsent;
 	char *path_argv[2];
 	char buf[PATH_MAX];
 	struct cpuset_fts_tree *cs_tree = NULL;
-	struct cpuset_fts_entry *ep;	  /* the latest new list entry */
-	struct cpuset_fts_entry **pnlep;  /* ptr to next list entry ptr */
+	struct cpuset_fts_entry *ep;	/* the latest new list entry */
+	struct cpuset_fts_entry **pnlep;	/* ptr to next list entry ptr */
 	char *relpath;
 	int fts_flags;
 
@@ -3263,7 +3276,7 @@
 		ep->info = CPUSET_FTS_CPUSET;
 	}
 
-	(void) fts_close(fts);
+	(void)fts_close(fts);
 	cpuset_fts_rewind(cs_tree);
 	return cs_tree;
 
@@ -3271,7 +3284,7 @@
 	if (cs_tree)
 		cpuset_fts_close(cs_tree);
 	if (fts)
-		(void) fts_close(fts);
+		(void)fts_close(fts);
 	return NULL;
 }
 
@@ -3279,7 +3292,7 @@
 const struct cpuset_fts_entry *cpuset_fts_read(struct cpuset_fts_tree *cs_tree)
 {
 	const struct cpuset_fts_entry *cs_entry = cs_tree->next;
-	if (cs_tree->next != NULL)		/* seek to next entry */
+	if (cs_tree->next != NULL)	/* seek to next entry */
 		cs_tree->next = cs_tree->next->next;
 	return cs_entry;
 }
@@ -3325,7 +3338,8 @@
 }
 
 /* Return pointer to cpuset structure of a cpuset entry */
-const struct cpuset *cpuset_fts_get_cpuset(const struct cpuset_fts_entry *cs_entry)
+const struct cpuset *cpuset_fts_get_cpuset(const struct cpuset_fts_entry
+					   *cs_entry)
 {
 	return cs_entry->cpuset;
 }
@@ -3414,11 +3428,8 @@
 
 	bp = strrchr(buf, ')');
 	if (bp)
-	     sscanf(bp + 1, "%*s %*u %*u %*u %*u %*u %*u %*u "
-		    "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u "
-		    "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u "
-		    "%*u %*u %*u %*u %*u %*u %*u %*u %u", /* 37th field past ')' */
-		    &cpu);
+		sscanf(bp + 1, "%*s %*u %*u %*u %*u %*u %*u %*u " "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u " "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u " "%*u %*u %*u %*u %*u %*u %*u %*u %u",	/* 37th field past ')' */
+		       &cpu);
 	if (cpu < 0)
 		errno = EINVAL;
 	return cpu;
@@ -3438,8 +3449,7 @@
 		return -1;
 	bitmask_setbit(bmp, mem);
 #if HAVE_DECL_MPOL_BIND
-	r = set_mempolicy(MPOL_BIND, bitmask_mask(bmp),
-		bitmask_nbits(bmp) + 1);
+	r = set_mempolicy(MPOL_BIND, bitmask_mask(bmp), bitmask_nbits(bmp) + 1);
 #else
 	r = -1;
 	errno = ENOSYS;
@@ -3454,7 +3464,7 @@
 	int node = -1;
 
 #if HAVE_DECL_MPOL_F_ADDR && HAVE_DECL_MPOL_F_NODE
-	if (get_mempolicy(&node, NULL, 0, addr, MPOL_F_NODE|MPOL_F_ADDR)) {
+	if (get_mempolicy(&node, NULL, 0, addr, MPOL_F_NODE | MPOL_F_ADDR)) {
 		/* I realize this seems redundant, but I _want_ to make sure
 		 * that this value is -1. */
 		node = -1;
@@ -3484,23 +3494,22 @@
 
 	if (cp->notify_on_release)
 		n += snprintf(buf + n, max(buflen - n, 0),
-							"notify_on_release\n");
+			      "notify_on_release\n");
 
 	if (cp->memory_pressure_enabled)
 		n += snprintf(buf + n, max(buflen - n, 0),
-							"memory_pressure_enabled\n");
+			      "memory_pressure_enabled\n");
 
 	if (cp->memory_migrate)
-		n += snprintf(buf + n, max(buflen - n, 0),
-							"memory_migrate\n");
+		n += snprintf(buf + n, max(buflen - n, 0), "memory_migrate\n");
 
 	if (cp->memory_spread_page)
 		n += snprintf(buf + n, max(buflen - n, 0),
-							"memory_spread_page\n");
+			      "memory_spread_page\n");
 
 	if (cp->memory_spread_slab)
 		n += snprintf(buf + n, max(buflen - n, 0),
-							"memory_spread_slab\n");
+			      "memory_spread_slab\n");
 
 	if ((tmp = sprint_mask_buf(cp->cpus)) == NULL)
 		return -1;
@@ -3518,7 +3527,7 @@
 }
 
 static int import_list(UNUSED const char *tok, const char *arg,
-				struct bitmask *bmp, char *emsg, int elen)
+		       struct bitmask *bmp, char *emsg, int elen)
 {
 	if (bitmask_parselist(arg, bmp) < 0) {
 		if (emsg)
@@ -3539,7 +3548,7 @@
 
 /* Import cpuset settings from a regular file */
 int cpuset_import(struct cpuset *cp, const char *buf, int *elinenum,
-							char *emsg, int elen)
+		  char *emsg, int elen)
 {
 	char *linebuf = NULL;
 	int linebuflen;
@@ -3555,7 +3564,7 @@
 
 	while (slgets(linebuf, linebuflen, buf, &offset)) {
 		char *tok, *arg;
-		char *ptr; 		/* for strtok_r */
+		char *ptr;	/* for strtok_r */
 
 		linenum++;
 		if ((tok = strchr(linebuf, '#')) != NULL)
@@ -3611,7 +3620,7 @@
 		if ((tok = strtok_r(0, " \t", &ptr)) != NULL) {
 			if (emsg)
 				snprintf(emsg, elen, "Surplus token: '%s'",
-							tok);
+					 tok);
 			goto err;
 		}
 		continue;
@@ -3677,7 +3686,7 @@
 	cpuset_free_placement(plc1);
 	cpuset_free_placement(plc2);
 	return r;
- }
+}
 
 /* Return number CPUs in current tasks cpuset */
 int cpuset_size()
@@ -3752,7 +3761,7 @@
 		goto err;
 #if HAVE_DECL_MPOL_DEFAULT
 	if (set_mempolicy(MPOL_DEFAULT, bitmask_mask(mems),
-						bitmask_nbits(mems) + 1) < 0)
+			  bitmask_nbits(mems) + 1) < 0)
 		goto err;
 	r = 0;
 #endif
@@ -3768,96 +3777,111 @@
 	const char *fname;
 	void *func;
 } flist[] = {
-	{ "cpuset_version", cpuset_version },
-	{ "cpuset_alloc", cpuset_alloc },
-	{ "cpuset_free", cpuset_free },
-	{ "cpuset_cpus_nbits", cpuset_cpus_nbits },
-	{ "cpuset_mems_nbits", cpuset_mems_nbits },
-	{ "cpuset_setcpus", cpuset_setcpus },
-	{ "cpuset_setmems", cpuset_setmems },
-	{ "cpuset_set_iopt", cpuset_set_iopt },
-	{ "cpuset_set_sopt", cpuset_set_sopt },
-	{ "cpuset_getcpus", cpuset_getcpus },
-	{ "cpuset_getmems", cpuset_getmems },
-	{ "cpuset_cpus_weight", cpuset_cpus_weight },
-	{ "cpuset_mems_weight", cpuset_mems_weight },
-	{ "cpuset_get_iopt", cpuset_get_iopt },
-	{ "cpuset_get_sopt", cpuset_get_sopt },
-	{ "cpuset_localcpus", cpuset_localcpus },
-	{ "cpuset_localmems", cpuset_localmems },
-	{ "cpuset_cpumemdist", cpuset_cpumemdist },
-	{ "cpuset_cpu2node", cpuset_cpu2node },
-	{ "cpuset_addr2node", cpuset_addr2node },
-	{ "cpuset_create", cpuset_create },
-	{ "cpuset_delete", cpuset_delete },
-	{ "cpuset_query", cpuset_query },
-	{ "cpuset_modify", cpuset_modify },
-	{ "cpuset_getcpusetpath", cpuset_getcpusetpath },
-	{ "cpuset_cpusetofpid", cpuset_cpusetofpid },
-	{ "cpuset_mountpoint", cpuset_mountpoint },
-	{ "cpuset_collides_exclusive", cpuset_collides_exclusive },
-	{ "cpuset_nuke", cpuset_nuke },
-	{ "cpuset_init_pidlist", cpuset_init_pidlist },
-	{ "cpuset_pidlist_length", cpuset_pidlist_length },
-	{ "cpuset_get_pidlist", cpuset_get_pidlist },
-	{ "cpuset_freepidlist", cpuset_freepidlist },
-	{ "cpuset_move", cpuset_move },
-	{ "cpuset_move_all", cpuset_move_all },
-	{ "cpuset_move_cpuset_tasks", cpuset_move_cpuset_tasks },
-	{ "cpuset_migrate", cpuset_migrate },
-	{ "cpuset_migrate_all", cpuset_migrate_all },
-	{ "cpuset_reattach", cpuset_reattach },
-	{ "cpuset_open_memory_pressure", cpuset_open_memory_pressure },
-	{ "cpuset_read_memory_pressure", cpuset_read_memory_pressure },
-	{ "cpuset_close_memory_pressure", cpuset_close_memory_pressure },
-	{ "cpuset_c_rel_to_sys_cpu", cpuset_c_rel_to_sys_cpu },
-	{ "cpuset_c_sys_to_rel_cpu", cpuset_c_sys_to_rel_cpu },
-	{ "cpuset_c_rel_to_sys_mem", cpuset_c_rel_to_sys_mem },
-	{ "cpuset_c_sys_to_rel_mem", cpuset_c_sys_to_rel_mem },
-	{ "cpuset_p_rel_to_sys_cpu", cpuset_p_rel_to_sys_cpu },
-	{ "cpuset_p_sys_to_rel_cpu", cpuset_p_sys_to_rel_cpu },
-	{ "cpuset_p_rel_to_sys_mem", cpuset_p_rel_to_sys_mem },
-	{ "cpuset_p_sys_to_rel_mem", cpuset_p_sys_to_rel_mem },
-	{ "cpuset_get_placement", cpuset_get_placement },
-	{ "cpuset_equal_placement", cpuset_equal_placement },
-	{ "cpuset_free_placement", cpuset_free_placement },
-	{ "cpuset_fts_open", cpuset_fts_open },
-	{ "cpuset_fts_read", cpuset_fts_read },
-	{ "cpuset_fts_reverse", cpuset_fts_reverse },
-	{ "cpuset_fts_rewind", cpuset_fts_rewind },
-	{ "cpuset_fts_get_path", cpuset_fts_get_path },
-	{ "cpuset_fts_get_stat", cpuset_fts_get_stat },
-	{ "cpuset_fts_get_cpuset", cpuset_fts_get_cpuset },
-	{ "cpuset_fts_get_errno", cpuset_fts_get_errno },
-	{ "cpuset_fts_get_info", cpuset_fts_get_info },
-	{ "cpuset_fts_close", cpuset_fts_close },
-	{ "cpuset_cpubind", cpuset_cpubind },
-	{ "cpuset_latestcpu", cpuset_latestcpu },
-	{ "cpuset_membind", cpuset_membind },
-	{ "cpuset_export", cpuset_export },
-	{ "cpuset_import", cpuset_import },
-	{ "cpuset_function", cpuset_function },
-	{ "cpuset_pin", cpuset_pin },
-	{ "cpuset_size", cpuset_size },
-	{ "cpuset_where", cpuset_where },
-	{ "cpuset_unpin", cpuset_unpin },
-};
+	{
+	"cpuset_version", cpuset_version}, {
+	"cpuset_alloc", cpuset_alloc}, {
+	"cpuset_free", cpuset_free}, {
+	"cpuset_cpus_nbits", cpuset_cpus_nbits}, {
+	"cpuset_mems_nbits", cpuset_mems_nbits}, {
+	"cpuset_setcpus", cpuset_setcpus}, {
+	"cpuset_setmems", cpuset_setmems}, {
+	"cpuset_set_iopt", cpuset_set_iopt}, {
+	"cpuset_set_sopt", cpuset_set_sopt}, {
+	"cpuset_getcpus", cpuset_getcpus}, {
+	"cpuset_getmems", cpuset_getmems}, {
+	"cpuset_cpus_weight", cpuset_cpus_weight}, {
+	"cpuset_mems_weight", cpuset_mems_weight}, {
+	"cpuset_get_iopt", cpuset_get_iopt}, {
+	"cpuset_get_sopt", cpuset_get_sopt}, {
+	"cpuset_localcpus", cpuset_localcpus}, {
+	"cpuset_localmems", cpuset_localmems}, {
+	"cpuset_cpumemdist", cpuset_cpumemdist}, {
+	"cpuset_cpu2node", cpuset_cpu2node}, {
+	"cpuset_addr2node", cpuset_addr2node}, {
+	"cpuset_create", cpuset_create}, {
+	"cpuset_delete", cpuset_delete}, {
+	"cpuset_query", cpuset_query}, {
+	"cpuset_modify", cpuset_modify}, {
+	"cpuset_getcpusetpath", cpuset_getcpusetpath}, {
+	"cpuset_cpusetofpid", cpuset_cpusetofpid}, {
+	"cpuset_mountpoint", cpuset_mountpoint}, {
+	"cpuset_collides_exclusive", cpuset_collides_exclusive}, {
+	"cpuset_nuke", cpuset_nuke}, {
+	"cpuset_init_pidlist", cpuset_init_pidlist}, {
+	"cpuset_pidlist_length", cpuset_pidlist_length}, {
+	"cpuset_get_pidlist", cpuset_get_pidlist}, {
+	"cpuset_freepidlist", cpuset_freepidlist}, {
+	"cpuset_move", cpuset_move}, {
+	"cpuset_move_all", cpuset_move_all}, {
+	"cpuset_move_cpuset_tasks", cpuset_move_cpuset_tasks}, {
+	"cpuset_migrate", cpuset_migrate}, {
+	"cpuset_migrate_all", cpuset_migrate_all}, {
+	"cpuset_reattach", cpuset_reattach}, {
+	"cpuset_open_memory_pressure", cpuset_open_memory_pressure}, {
+	"cpuset_read_memory_pressure", cpuset_read_memory_pressure}, {
+	"cpuset_close_memory_pressure", cpuset_close_memory_pressure}, {
+	"cpuset_c_rel_to_sys_cpu", cpuset_c_rel_to_sys_cpu}, {
+	"cpuset_c_sys_to_rel_cpu", cpuset_c_sys_to_rel_cpu}, {
+	"cpuset_c_rel_to_sys_mem", cpuset_c_rel_to_sys_mem}, {
+	"cpuset_c_sys_to_rel_mem", cpuset_c_sys_to_rel_mem}, {
+	"cpuset_p_rel_to_sys_cpu", cpuset_p_rel_to_sys_cpu}, {
+	"cpuset_p_sys_to_rel_cpu", cpuset_p_sys_to_rel_cpu}, {
+	"cpuset_p_rel_to_sys_mem", cpuset_p_rel_to_sys_mem}, {
+	"cpuset_p_sys_to_rel_mem", cpuset_p_sys_to_rel_mem}, {
+	"cpuset_get_placement", cpuset_get_placement}, {
+	"cpuset_equal_placement", cpuset_equal_placement}, {
+	"cpuset_free_placement", cpuset_free_placement}, {
+	"cpuset_fts_open", cpuset_fts_open}, {
+	"cpuset_fts_read", cpuset_fts_read}, {
+	"cpuset_fts_reverse", cpuset_fts_reverse}, {
+	"cpuset_fts_rewind", cpuset_fts_rewind}, {
+	"cpuset_fts_get_path", cpuset_fts_get_path}, {
+	"cpuset_fts_get_stat", cpuset_fts_get_stat}, {
+	"cpuset_fts_get_cpuset", cpuset_fts_get_cpuset}, {
+	"cpuset_fts_get_errno", cpuset_fts_get_errno}, {
+	"cpuset_fts_get_info", cpuset_fts_get_info}, {
+	"cpuset_fts_close", cpuset_fts_close}, {
+	"cpuset_cpubind", cpuset_cpubind}, {
+	"cpuset_latestcpu", cpuset_latestcpu}, {
+	"cpuset_membind", cpuset_membind}, {
+	"cpuset_export", cpuset_export}, {
+	"cpuset_import", cpuset_import}, {
+	"cpuset_function", cpuset_function}, {
+	"cpuset_pin", cpuset_pin}, {
+	"cpuset_size", cpuset_size}, {
+	"cpuset_where", cpuset_where}, {
+"cpuset_unpin", cpuset_unpin},};
 
 /* Return pointer to a libcpuset.so function, or NULL */
-void *cpuset_function(const char * function_name)
+void *cpuset_function(const char *function_name)
 {
 	unsigned int i;
 
-	for (i = 0; i < sizeof(flist)/sizeof(flist[0]); i++)
+	for (i = 0; i < sizeof(flist) / sizeof(flist[0]); i++)
 		if (streq(function_name, flist[i].fname))
 			return flist[i].func;
 	return NULL;
 }
 
 /* Fortran interface to basic cpuset routines */
-int cpuset_pin_(int *ptr_relcpu) {return cpuset_pin(*ptr_relcpu);}
-int cpuset_size_(void) { return cpuset_size(); }
-int cpuset_where_(void) { return cpuset_where(); }
-int cpuset_unpin_(void) { return cpuset_unpin(); }
+int cpuset_pin_(int *ptr_relcpu)
+{
+	return cpuset_pin(*ptr_relcpu);
+}
+
+int cpuset_size_(void)
+{
+	return cpuset_size();
+}
+
+int cpuset_where_(void)
+{
+	return cpuset_where();
+}
+
+int cpuset_unpin_(void)
+{
+	return cpuset_unpin();
+}
 
 #endif /* HAVE_LINUX_MEMPOLICY_H */
diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
index 61addbf..4b4e965 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
@@ -136,7 +136,7 @@
 				nprocs = atoi(optarg);
 			}
 			break;
-		case 'h':   /* usage message */
+		case 'h':	/* usage message */
 			usage(argv[0], 0);
 			break;
 		default:
@@ -208,7 +208,7 @@
 			char str[50];
 			bitmask_displaylist(str, 50, cpumask);
 			warn("the task(%d) is running on the cpu(%d) excluded"
-				" by cpuset(cpus: %s)\n", getpid(), cpu, str);
+			     " by cpuset(cpus: %s)\n", getpid(), cpu, str);
 			ret = 1;
 			goto err2;
 		}
@@ -253,7 +253,7 @@
 	int status = 0;
 	int ret = 0;
 
-	checkopt(argc,argv);
+	checkopt(argc, argv);
 	if (initialize()) {
 		warn("initialize failed");
 		report_result("2\n");
@@ -266,7 +266,7 @@
 		exit(EXIT_FAILURE);
 	}
 
-	childpids = (pid_t *)malloc((nprocs) * sizeof(pid_t));
+	childpids = (pid_t *) malloc((nprocs) * sizeof(pid_t));
 	if (childpids == NULL) {
 		warn("alloc for child pids failed");
 		report_result("2\n");
@@ -320,7 +320,8 @@
 }
 
 #else /* ! HAVE_LINUX_MEMPOLICY_H */
-int main(void) {
+int main(void)
+{
 	printf("System doesn't have required mempolicy support\n");
 	return 1;
 }
diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
index 49e73e3..9fe4f01 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c
@@ -87,27 +87,28 @@
 		     cpu = bitmask_next(domains[i], cpu + 1)) {
 			if (bitmask_weight(domains[i]) == 1) {
 				if (cpus[cpu].sched_domain != NULL) {
-				    	bitmask_displaylist(buf1, sizeof(buf1),
-							domains[i]);
+					bitmask_displaylist(buf1, sizeof(buf1),
+							    domains[i]);
 					bitmask_displaylist(buf2, sizeof(buf2),
-							cpus[cpu].sched_domain);
-					tst_resm(TFAIL, "cpu%d's sched domain is not "
-							"NULL(Domain: %s, "
-							"CPU's Sched Domain: %s).",
-						cpu, buf1, buf2);
+							    cpus[cpu].
+							    sched_domain);
+					tst_resm(TFAIL,
+						 "cpu%d's sched domain is not "
+						 "NULL(Domain: %s, "
+						 "CPU's Sched Domain: %s).",
+						 cpu, buf1, buf2);
 					goto err;
 				}
 				break;
 			}
-			if (!bitmask_equal(domains[i],
-			    cpus[cpu].sched_domain)) {
-			    	bitmask_displaylist(buf1, sizeof(buf1),
-						domains[i]);
+			if (!bitmask_equal(domains[i], cpus[cpu].sched_domain)) {
+				bitmask_displaylist(buf1, sizeof(buf1),
+						    domains[i]);
 				bitmask_displaylist(buf2, sizeof(buf2),
-				    cpus[cpu].sched_domain);
+						    cpus[cpu].sched_domain);
 				tst_resm(TFAIL, "cpu%d's sched domain is wrong"
-					"(Domain: %s, CPU's Sched Domain: %s).",
-					cpu, buf1, buf2);
+					 "(Domain: %s, CPU's Sched Domain: %s).",
+					 cpu, buf1, buf2);
 				goto err;
 			}
 		}
diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure.c b/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
index aef6419..b590133 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure.c
@@ -33,8 +33,7 @@
 
 //argv[1] memory use(M) (>0)
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	long int use;
 	if (argc != 2) {
@@ -43,7 +42,7 @@
 	}
 	if ((use = strtol(argv[1], NULL, 10)) < 0) {
 		errx(EINVAL, "Invalid mmap size specified (must be a long "
-			     "int greater than 1)");
+		     "int greater than 1)");
 	}
 
 	long int pagesize = getpagesize();
@@ -52,7 +51,8 @@
 
 	while (pagesize * mmap_block > 2 * unit) {
 		unsigned long *addr = mmap(NULL, pagesize * mmap_block,
-			PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+					   PROT_READ | PROT_WRITE,
+					   MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 		if (addr == MAP_FAILED) {
 			mmap_block = mmap_block / 2;
 			continue;
diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
index d94840d..6ca6663 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
@@ -61,7 +61,7 @@
 		return -1;
 	}
 
-	while ((ret = read(fd, buff, sizeof(buff))) > 0);
+	while ((ret = read(fd, buff, sizeof(buff))) > 0) ;
 	if (ret == -1)
 		warn("read %s failed", path);
 
@@ -84,7 +84,7 @@
 
 		fd = open("./myfifo", O_WRONLY);
 		if (fd == -1)
-			err(1,"open fifo failed");
+			err(1, "open fifo failed");
 
 		if (ret) {
 			if (write(fd, "0", 1) == -1)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c
index 793e8b5..ddf5935 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c
@@ -52,10 +52,10 @@
 int opt_mmap_lock2;
 int opt_shm;
 int opt_hugepage;
-int opt_check; /* check node when munmap memory (only for mmap_anon()) */
+int opt_check;			/* check node when munmap memory (only for mmap_anon()) */
 int opt_thread;
 
-int key_id; /* used with opt_shm */
+int key_id;			/* used with opt_shm */
 unsigned long memsize;
 
 #define FILE_HUGEPAGE	"/hugetlb/hugepagefile"
@@ -70,17 +70,17 @@
 #define THREAD		(SCHAR_MAX + 8)
 
 const struct option long_opts[] = {
-	{ "mmap-anon",	0, NULL, MMAP_ANON	},
-	{ "mmap-file",	0, NULL, MMAP_FILE	},
-	{ "mmap-lock1",	0, NULL, MMAP_LOCK1	},
-	{ "mmap-lock2",	0, NULL, MMAP_LOCK2	},
-	{ "shm",	0, NULL, SHM		},
-	{ "hugepage",	0, NULL, HUGEPAGE	},
-	{ "check",	0, NULL, CHECK		},
-	{ "thread",	0, NULL, THREAD		},
-	{ "size",	1, NULL, 's'		},
-	{ "key",	1, NULL, 'k'		},
-	{ NULL,		0, NULL, 0		},
+	{"mmap-anon", 0, NULL, MMAP_ANON},
+	{"mmap-file", 0, NULL, MMAP_FILE},
+	{"mmap-lock1", 0, NULL, MMAP_LOCK1},
+	{"mmap-lock2", 0, NULL, MMAP_LOCK2},
+	{"shm", 0, NULL, SHM},
+	{"hugepage", 0, NULL, HUGEPAGE},
+	{"check", 0, NULL, CHECK},
+	{"thread", 0, NULL, THREAD},
+	{"size", 1, NULL, 's'},
+	{"key", 1, NULL, 'k'},
+	{NULL, 0, NULL, 0},
 };
 
 /*
@@ -284,7 +284,7 @@
 /*
  * sigint_handler: handle SIGINT by set the exit flag.
  */
-void sigint_handler(int __attribute__((unused)) signo)
+void sigint_handler(int __attribute__ ((unused)) signo)
 {
 	flag_exit = 1;
 }
@@ -298,7 +298,7 @@
  * When we recive SIGUSR again, we will free all the allocated
  * memory.
  */
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	static int flag_allocated = 0;
 
@@ -320,14 +320,14 @@
 	flag_allocated = !flag_allocated;
 }
 
-void sigusr2(int __attribute__((unused)) signo)
+void sigusr2(int __attribute__ ((unused)) signo)
 {
 	static int flag_allocated = 0;
 	mmap_anon(flag_allocated);
 	flag_allocated = !flag_allocated;
 }
 
-void *thread2_routine(void __attribute__((unused)) *arg)
+void *thread2_routine(void __attribute__ ((unused)) * arg)
 {
 	sigset_t set;
 	struct sigaction sigusr2_action;
@@ -392,7 +392,8 @@
 }
 
 #else
-int main (void) {
+int main(void)
+{
 	printf("System doesn't have required mempolicy support\n");
 	return 1;
 }
diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
index 3621842..5469e9f 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
@@ -60,20 +60,22 @@
 
 #if HAVE_DECL_MPOL_F_MEMS_ALLOWED
 static int get_mempolicy(int *policy, unsigned long *nmask,
-			unsigned long maxnode, void *addr, int flags)
+			 unsigned long maxnode, void *addr, int flags)
 {
 	return syscall(__NR_get_mempolicy, policy, nmask, maxnode, addr, flags);
 }
 #endif
 
 #if HAVE_DECL_MPOL_BIND
-static int mbind(void *start, unsigned long len, int policy, unsigned long *nodemask,
-		unsigned long maxnode, unsigned flags)
+static int mbind(void *start, unsigned long len, int policy,
+		 unsigned long *nodemask, unsigned long maxnode, unsigned flags)
 {
-	return syscall(__NR_mbind, start, len, policy, nodemask, maxnode, flags);
+	return syscall(__NR_mbind, start, len, policy, nodemask, maxnode,
+		       flags);
 }
 
-static int set_mempolicy(int policy, unsigned long *nodemask, unsigned long maxnode)
+static int set_mempolicy(int policy, unsigned long *nodemask,
+			 unsigned long maxnode)
 {
 	return syscall(__NR_set_mempolicy, policy, nodemask, maxnode);
 }
@@ -86,12 +88,12 @@
 #define OPT_get_mempolicy	(SCHAR_MAX + 5)
 
 const struct option long_opts[] = {
-	{ "setaffinity",	1, NULL, OPT_setaffinity	},
-	{ "getaffinity",	0, NULL, OPT_getaffinity	},
-	{ "mbind",		1, NULL, OPT_mbind		},
-	{ "set_mempolicy",	1, NULL, OPT_set_mempolicy	},
-	{ "get_mempolicy",	0, NULL, OPT_get_mempolicy	},
-	{ NULL,			0, NULL, 0			},
+	{"setaffinity", 1, NULL, OPT_setaffinity},
+	{"getaffinity", 0, NULL, OPT_getaffinity},
+	{"mbind", 1, NULL, OPT_mbind},
+	{"set_mempolicy", 1, NULL, OPT_set_mempolicy},
+	{"get_mempolicy", 0, NULL, OPT_get_mempolicy},
+	{NULL, 0, NULL, 0},
 };
 
 void process_options(int argc, char *argv[])
@@ -136,7 +138,7 @@
 	}
 }
 
-void sigint_handler(int __attribute__((unused)) signo)
+void sigint_handler(int __attribute__ ((unused)) signo)
 {
 	flag_exit = 1;
 }
@@ -212,7 +214,7 @@
 	}
 #if HAVE_DECL_MPOL_F_MEMS_ALLOWED
 	ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0,
-				MPOL_F_MEMS_ALLOWED);
+			    MPOL_F_MEMS_ALLOWED);
 #else
 	ret = -1;
 #endif
@@ -221,14 +223,24 @@
 	puts(str);
 }
 
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	switch (test) {
-	case 0: test_setaffinity(); break;
-	case 1: test_getaffinity(); break;
-	case 2: test_mbind(); break;
-	case 3: test_set_mempolicy(); break;
-	case 4: test_get_mempolicy(); break;
+	case 0:
+		test_setaffinity();
+		break;
+	case 1:
+		test_getaffinity();
+		break;
+	case 2:
+		test_mbind();
+		break;
+	case 3:
+		test_set_mempolicy();
+		break;
+	case 4:
+		test_get_mempolicy();
+		break;
 	default:;
 	}
 	test = -1;
@@ -255,7 +267,8 @@
 	return ret;
 }
 #else
-int main (void) {
+int main(void)
+{
 	printf("System doesn't have required mempolicy support\n");
 	tst_exit();
 }
diff --git a/testcases/kernel/controllers/freezer/fork_exec_loop.c b/testcases/kernel/controllers/freezer/fork_exec_loop.c
index f63241d..6b62185 100644
--- a/testcases/kernel/controllers/freezer/fork_exec_loop.c
+++ b/testcases/kernel/controllers/freezer/fork_exec_loop.c
@@ -22,18 +22,18 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-int main(int argc, char** argv)
+int main(int argc, char **argv)
 {
-    int count = argc > 1 ? atoi(argv[1]) : 20;
+	int count = argc > 1 ? atoi(argv[1]) : 20;
 
-    while (1) {
-        int i, s;
+	while (1) {
+		int i, s;
 
-        for (i = 0; i < count; i++)
-            if (fork() == 0)
-		execlp("/bin/true", "true", NULL);
+		for (i = 0; i < count; i++)
+			if (fork() == 0)
+				execlp("/bin/true", "true", NULL);
 
-        for (i = 0; i < count; i++)
-            wait(&s);
-    }
+		for (i = 0; i < count; i++)
+			wait(&s);
+	}
 }
diff --git a/testcases/kernel/controllers/freezer/timed_forkbomb.c b/testcases/kernel/controllers/freezer/timed_forkbomb.c
index f28fbd4..bc1150e 100644
--- a/testcases/kernel/controllers/freezer/timed_forkbomb.c
+++ b/testcases/kernel/controllers/freezer/timed_forkbomb.c
@@ -26,7 +26,7 @@
 #include <unistd.h>
 #include <signal.h>
 
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	struct timeval start, now;
 	pid_t child_root;
@@ -55,7 +55,8 @@
 	 */
 	{
 		char *word;
-		while (scanf("%as", &word) < 1) {}
+		while (scanf("%as", &word) < 1) {
+		}
 		free(word);
 	}
 	if (gettimeofday(&start, NULL))
diff --git a/testcases/kernel/controllers/freezer/vfork.c b/testcases/kernel/controllers/freezer/vfork.c
index 779878c..371220f 100644
--- a/testcases/kernel/controllers/freezer/vfork.c
+++ b/testcases/kernel/controllers/freezer/vfork.c
@@ -54,8 +54,8 @@
 int psync[2];
 pid_t child = -1;
 
-int   TST_TOTAL = 1;
-char* TCID = "vfork";
+int TST_TOTAL = 1;
+char *TCID = "vfork";
 
 /* for signal handlers */
 void parent_cleanup(void)
@@ -65,13 +65,14 @@
 		fflush(fp);
 		if (filename) {
 			fclose(fp);
-			(void) unlink(filename);
+			(void)unlink(filename);
 		}
 	}
 	tst_exit();
 }
 
-void kill_child(void) {
+void kill_child(void)
+{
 
 	/* Avoid killing all processes at the current user's level, and the
 	 * test app as well =].
@@ -80,9 +81,9 @@
 		/* Shouldn't happen, but I've seen it before... */
 		if (ptrace(PTRACE_KILL, child, NULL, NULL) < 0) {
 			tst_resm(TBROK | TERRNO,
-				"ptrace(PTRACE_KILL, %d, ..) failed", child);
+				 "ptrace(PTRACE_KILL, %d, ..) failed", child);
 		}
-		(void) waitpid(child, NULL, WNOHANG); /* Zombie children are bad. */
+		(void)waitpid(child, NULL, WNOHANG);	/* Zombie children are bad. */
 	}
 
 }
@@ -132,13 +133,13 @@
 void usage()
 {
 	tst_resm(TBROK, "usage: %s [-f [FILE]] [-s [NUM]] [-p] [NUM]\n\n"
-		"\t-f FILE\t\tFile to output trace data to.\n"
-		"\t-s NUM\t\tSleep for NUM seconds. [Default: 1 second]\n"
-		"\t\t\t\tSuffixes ms, us, s, m, and h correspond to\n"
-		"\t\t\t\tmilliseconds, microseconds, seconds [Default],\n"
-		"\t\t\t\tminutes, and hours respectively.\n\n"
-		"\t-p\t\tPause.\n\n"
-		"\tNUM\t\tExecute vfork NUM times.\n", TCID);
+		 "\t-f FILE\t\tFile to output trace data to.\n"
+		 "\t-s NUM\t\tSleep for NUM seconds. [Default: 1 second]\n"
+		 "\t\t\t\tSuffixes ms, us, s, m, and h correspond to\n"
+		 "\t\t\t\tmilliseconds, microseconds, seconds [Default],\n"
+		 "\t\t\t\tminutes, and hours respectively.\n\n"
+		 "\t-p\t\tPause.\n\n"
+		 "\tNUM\t\tExecute vfork NUM times.\n", TCID);
 }
 
 void _parse_opts(int argc, char **argv)
@@ -151,7 +152,7 @@
 	sleep_duration.tv_nsec = 0U;
 
 	while ((opt = getopt(argc, argv, "f:ps::")) != -1) {
-		switch(opt) {
+		switch (opt) {
 		case 'f':
 			if ((fp = fopen(optarg, "w")) != NULL) {
 				filename = optarg;
@@ -166,8 +167,7 @@
 				do_sleep = 1;
 				break;
 			}
-			opt = sscanf(optarg, "%Ld%as",
-				     &duration, &units);
+			opt = sscanf(optarg, "%Ld%as", &duration, &units);
 			if (opt < 1)
 				break;
 
@@ -183,7 +183,7 @@
 				sleep_duration.tv_sec = duration * 3600U;
 			else {
 				tst_resm(TBROK, "Unrecognized time units: %s",
-						units);
+					 units);
 				usage();
 			}
 			do_sleep = 1;
@@ -209,7 +209,7 @@
 		debug("ptrace(): ");
 		return 0;
 	}
-	/*dump_siginfo(gchild, &info);*/
+	/*dump_siginfo(gchild, &info); */
 	if ((info.si_code != 0) || (info.si_signo != SIGSTOP))
 		return 0;
 
@@ -222,7 +222,7 @@
 		sleepy_time();
 	if (ptrace(PTRACE_DETACH, gchild, NULL, NULL) == -1)
 		debug("ptrace(): ");
-	return -1; /* don't wait for gchild */
+	return -1;		/* don't wait for gchild */
 #else
 	return 0;
 #endif
@@ -237,11 +237,11 @@
 	while (num_children > 0) {
 		int died = 0;
 
-		/*printf("waiting for %d processes to exit\n", num_children);*/
+		/*printf("waiting for %d processes to exit\n", num_children); */
 		process = waitpid(-1, &status, WUNTRACED);
 		if (process < 1)
 			continue;
-		/*dump_status(process, status);*/
+		/*dump_status(process, status); */
 		died = (WIFEXITED(status) || WIFSIGNALED(status));
 		if (died)
 			num_children--;
@@ -298,8 +298,7 @@
 	} while (1);
 }
 
-int
-main(int argc, char** argv)
+int main(int argc, char **argv)
 {
 
 #if HAVE_DECL_PTRACE_SETOPTIONS && HAVE_DECL_PTRACE_O_TRACEVFORKDONE
@@ -347,19 +346,20 @@
 			}
 			if (waitpid(child, NULL, 0) != child) {
 				tst_resm(TBROK | TERRNO, "waitpid(%d) failed",
-							 child);
+					 child);
 				kill_child();
 			} else {
 
 				if (ptrace(PTRACE_SETOPTIONS, child, NULL,
 					   PTRACE_O_TRACEVFORK) == -1) {
 					tst_resm(TINFO | TERRNO,
-						"ptrace(PTRACE_SETOPTIONS) "
-						"failed.");
+						 "ptrace(PTRACE_SETOPTIONS) "
+						 "failed.");
 				}
-				if (ptrace(PTRACE_CONT, child, NULL, NULL) == -1) {
+				if (ptrace(PTRACE_CONT, child, NULL, NULL) ==
+				    -1) {
 					tst_resm(TINFO | TERRNO,
-						"ptrace(PTRACE_CONT) failed.");
+						 "ptrace(PTRACE_CONT) failed.");
 				}
 
 				send_mutex(psync[1]);
@@ -373,8 +373,9 @@
 				exit_status = do_trace(child, ++num_vforks);
 
 				tst_resm(exit_status == 0 ? TPASS : TFAIL,
-					"do_trace %s",
-					(exit_status == 0 ? "succeeded" : "failed"));
+					 "do_trace %s",
+					 (exit_status ==
+					  0 ? "succeeded" : "failed"));
 
 				parent_cleanup();
 
@@ -386,7 +387,7 @@
 
 #else
 	tst_resm(TCONF, "System doesn't support have required ptrace "
-		        "capabilities.");
+		 "capabilities.");
 #endif
 	tst_resm(TINFO, "Exiting...");
 	tst_exit();
diff --git a/testcases/kernel/controllers/io-throttle/iobw.c b/testcases/kernel/controllers/io-throttle/iobw.c
index 8b19c87..e4d9c9b 100644
--- a/testcases/kernel/controllers/io-throttle/iobw.c
+++ b/testcases/kernel/controllers/io-throttle/iobw.c
@@ -44,10 +44,9 @@
 #define kb(x)			((x) >> 10)
 
 const char usage[] = "Usage: iobw [-direct] threads chunk_size data_size\n";
-const char child_fmt[] =
-		"(%s) task %3d: time %4lu.%03lu bw %7lu KiB/s (%s)\n";
+const char child_fmt[] = "(%s) task %3d: time %4lu.%03lu bw %7lu KiB/s (%s)\n";
 const char parent_fmt[] =
-		"(%s) parent %d: time %4lu.%03lu bw %7lu KiB/s (%s)\n";
+    "(%s) parent %d: time %4lu.%03lu bw %7lu KiB/s (%s)\n";
 
 static int directio = 0;
 static size_t data_size = 0;
@@ -121,8 +120,8 @@
 		}
 		n += i;
 	}
-        gettimeofday(&stop, NULL);
-        timersub(&stop, &start, &diff);
+	gettimeofday(&stop, NULL);
+	timersub(&stop, &start, &diff);
 	print_results(id + 1, OP_WRITE, data_size, &diff);
 
 	/* Read */
@@ -139,8 +138,8 @@
 		}
 		n += i;
 	}
-        gettimeofday(&stop, NULL);
-        timersub(&stop, &start, &diff);
+	gettimeofday(&stop, NULL);
+	timersub(&stop, &start, &diff);
 	print_results(id + 1, OP_READ, data_size, &diff);
 out:
 	close(fd);
@@ -178,7 +177,7 @@
 		struct stat mystat;
 
 		snprintf(filename, sizeof(filename), "%s-%d-iobw.tmp",
-				mygroup,i);
+			 mygroup, i);
 		if (stat(filename, &mystat) < 0)
 			continue;
 		unlink(filename);
@@ -262,21 +261,21 @@
 		kb(chunk_size), kb(data_size));
 	fflush(stdout);
 
-        gettimeofday(&start, NULL);
-        for (i = 0; i < threads ; i++)
-                spawn(i);
-        for (i = 0; i < threads; i++) {
-                int status;
-                wait(&status);
-                if (!WIFEXITED(status))
-                        exit(1);
-        }
-        gettimeofday(&stop, NULL);
+	gettimeofday(&start, NULL);
+	for (i = 0; i < threads; i++)
+		spawn(i);
+	for (i = 0; i < threads; i++) {
+		int status;
+		wait(&status);
+		if (!WIFEXITED(status))
+			exit(1);
+	}
+	gettimeofday(&stop, NULL);
 
-        timersub(&stop, &start, &diff);
+	timersub(&stop, &start, &diff);
 	print_results(0, NUM_IOPS, data_size * threads * NUM_IOPS, &diff);
 	fflush(stdout);
 	free(children);
 
-        exit(0);
+	exit(0);
 }
diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
index d5e2db6..b01e1b8 100644
--- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c
+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
@@ -43,26 +43,25 @@
  */
 int scan_shares_files(unsigned int *shares_pointer)
 {
-	struct stat 	statbuffer;
-	DIR		*dp;
-	char		*path_pointer;
+	struct stat statbuffer;
+	DIR *dp;
+	char *path_pointer;
 
 	/*
 	 * Check if we can get stat of the file
 	 */
-	if (lstat (fullpath, &statbuffer) < 0)
+	if (lstat(fullpath, &statbuffer) < 0)
 		error_function("Can not read stat for file ", fullpath);
 
-	if (S_ISDIR (statbuffer.st_mode) == 0) /* not a directory */
-	{
-	/*
-	 * We run all user tasks in the created groups and not default groups. So
-	 * exclude the shares of default group. FLAG to ensure dir_pointer is non NULL
-	 */
-		if ((FLAG == 1) && (strcmp(fullpath, "/dev/cpuctl/cpu.shares") != 0) &&\
-			 (strcmp (dir_pointer->d_name, "cpu.shares") == 0))
-		{
-			*shares_pointer += read_shares_file (fullpath);
+	if (S_ISDIR(statbuffer.st_mode) == 0) {	/* not a directory */
+		/*
+		 * We run all user tasks in the created groups and not default groups. So
+		 * exclude the shares of default group. FLAG to ensure dir_pointer is non NULL
+		 */
+		if ((FLAG == 1)
+		    && (strcmp(fullpath, "/dev/cpuctl/cpu.shares") != 0)
+		    && (strcmp(dir_pointer->d_name, "cpu.shares") == 0)) {
+			*shares_pointer += read_shares_file(fullpath);
 		}
 		return 0;
 	}
@@ -74,21 +73,21 @@
 
 	path_pointer = fullpath + strlen(fullpath);
 	*path_pointer++ = '/';
-	*path_pointer	= 0;
+	*path_pointer = 0;
 
-	if ((dp = opendir(fullpath)) == NULL) /* Error in opening directory */
+	if ((dp = opendir(fullpath)) == NULL)	/* Error in opening directory */
 		error_function("Can't open ", fullpath);
 	/*
 	 * search all groups recursively and get total shares
 	 */
 
-	while ((dir_pointer = readdir(dp)) != NULL) /* Error in reading directory */
-	{
-		if ((strcmp(dir_pointer->d_name, ".") == 0) || (strcmp(dir_pointer->d_name, "..") == 0))
+	while ((dir_pointer = readdir(dp)) != NULL) {	/* Error in reading directory */
+		if ((strcmp(dir_pointer->d_name, ".") == 0)
+		    || (strcmp(dir_pointer->d_name, "..") == 0))
 			continue;	/* ignore current and parent directory */
 
 		FLAG = 1;
-		strcpy (path_pointer, dir_pointer->d_name ); /* append name to fullpath */
+		strcpy(path_pointer, dir_pointer->d_name);	/* append name to fullpath */
 
 		if ((retval = scan_shares_files(shares_pointer)) != 0)
 			break;
@@ -100,7 +99,7 @@
 
 	path_pointer[-1] = 0;
 
-	if (closedir (dp) < 0)
+	if (closedir(dp) < 0)
 		error_function("Could not close dir ", fullpath);
 	return 0;
 }
@@ -116,28 +115,28 @@
 {
 	int num_line = 0;
 	FILE *fp;
-	switch (action)
-	{
-		case GET_SHARES:
-			*value = read_shares_file(filepath);
-			if (*value == -1)
-				return -1;
-			break;
+	switch (action) {
+	case GET_SHARES:
+		*value = read_shares_file(filepath);
+		if (*value == -1)
+			return -1;
+		break;
 
-		case GET_TASKS:
-			fp = fopen (filepath, "r");
-			if (fp == NULL)
-				error_function("Could not open file", filepath);
-			while (fgets(target, LINE_MAX, fp) != NULL)
-				num_line++;
-			*value = (unsigned int)num_line;
-			if (fclose (fp))
-				error_function ("Could not close file", filepath);
-			break;
+	case GET_TASKS:
+		fp = fopen(filepath, "r");
+		if (fp == NULL)
+			error_function("Could not open file", filepath);
+		while (fgets(target, LINE_MAX, fp) != NULL)
+			num_line++;
+		*value = (unsigned int)num_line;
+		if (fclose(fp))
+			error_function("Could not close file", filepath);
+		break;
 
-		default:
-			error_function("Wrong action type passed to fun read_file for ", filepath);
-			break;
+	default:
+		error_function("Wrong action type passed to fun read_file for ",
+			       filepath);
+		break;
 	}
 	return 0;
 }
@@ -149,8 +148,8 @@
 
 inline int error_function(char *msg1, char *msg2)
 {
-	fprintf (stdout,"ERROR: %s ", msg1);
-	fprintf (stdout,"%s\n", msg2);
+	fprintf(stdout, "ERROR: %s ", msg1);
+	fprintf(stdout, "%s\n", msg2);
 	return -1;
 
 }
@@ -161,16 +160,16 @@
  */
 
 unsigned
-int read_shares_file (char *filepath)
+int read_shares_file(char *filepath)
 {
 	FILE *fp;
 	unsigned int shares;
-	fp = fopen (filepath, "r");
+	fp = fopen(filepath, "r");
 	if (fp == NULL)
 		error_function("Could not open file", filepath);
-	fscanf (fp, "%u", &shares);
-	if (fclose (fp))
-		error_function ("Could not close file", filepath);
+	fscanf(fp, "%u", &shares);
+	if (fclose(fp))
+		error_function("Could not close file", filepath);
 	return shares;
 }
 
@@ -178,21 +177,22 @@
  * writes value to shares file or pid to tasks file
  */
 
-int write_to_file (char *file, const char *mode, unsigned int value)
+int write_to_file(char *file, const char *mode, unsigned int value)
 {
 	FILE *fp;
-	fp = fopen (file, mode);
+	fp = fopen(file, mode);
 	if (fp == NULL)
-		error_function ("in opening file for writing:", file);
-	fprintf (fp, "%u\n", value);
-	fclose (fp);
+		error_function("in opening file for writing:", file);
+	fprintf(fp, "%u\n", value);
+	fclose(fp);
 	return 0;
 }
+
 /* Function: signal_handler_alarm()
  * signal handler for the new action
  */
 
-void signal_handler_alarm (int signal)
+void signal_handler_alarm(int signal)
 {
 	timer_expired = 1;
 }
diff --git a/testcases/kernel/controllers/memcg/control/mem_process.c b/testcases/kernel/controllers/memcg/control/mem_process.c
index 9f6ac17..48cdea8 100644
--- a/testcases/kernel/controllers/memcg/control/mem_process.c
+++ b/testcases/kernel/controllers/memcg/control/mem_process.c
@@ -54,7 +54,7 @@
 
 	opterr = 0;
 	while ((c = getopt(argc, argv, "pm:")) != -1) {
-		switch(c) {
+		switch (c) {
 		case 'm':
 			memsize = strtoul(optarg, &end, 10);
 			if (*end != '\0')
@@ -65,8 +65,8 @@
 			exit(0);
 		default:
 			errx(2, "invalid option specifed");
-        	}
-    	}
+		}
+	}
 
 	if (memsize <= 0)
 		errx(3, "invalid usage");
@@ -92,8 +92,8 @@
 		if (munmap(p, memsize) == -1)
 			err(5, "munmap failed");
 	} else {
-		p = mmap(NULL, memsize, PROT_READ|PROT_WRITE,
-		    MAP_SHARED|MAP_ANONYMOUS, 0, 0);
+		p = mmap(NULL, memsize, PROT_READ | PROT_WRITE,
+			 MAP_SHARED | MAP_ANONYMOUS, 0, 0);
 		if (p == MAP_FAILED)
 			err(4, "mmap failed");
 		touch_memory(p);
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_process.c b/testcases/kernel/controllers/memcg/functional/memcg_process.c
index 26e4ce5..cee19c5 100644
--- a/testcases/kernel/controllers/memcg/functional/memcg_process.c
+++ b/testcases/kernel/controllers/memcg/functional/memcg_process.c
@@ -47,7 +47,7 @@
 int opt_shm;
 int opt_hugepage;
 
-int key_id;		/* used with opt_shm */
+int key_id;			/* used with opt_shm */
 unsigned long memsize;
 
 #define FILE_HUGEPAGE	"/hugetlb/hugepagefile"
@@ -60,15 +60,15 @@
 #define HUGEPAGE	(SCHAR_MAX + 6)
 
 const struct option long_opts[] = {
-	{ "mmap-anon",	0, NULL, MMAP_ANON	},
-	{ "mmap-file",	0, NULL, MMAP_FILE	},
-	{ "mmap-lock1",	0, NULL, MMAP_LOCK1	},
-	{ "mmap-lock2",	0, NULL, MMAP_LOCK2	},
-	{ "shm",	0, NULL, SHM		},
-	{ "hugepage",	0, NULL, HUGEPAGE	},
-	{ "size",	1, NULL, 's'		},
-	{ "key",	1, NULL, 'k'		},
-	{ NULL,		0, NULL, 0		},
+	{"mmap-anon", 0, NULL, MMAP_ANON},
+	{"mmap-file", 0, NULL, MMAP_FILE},
+	{"mmap-lock1", 0, NULL, MMAP_LOCK1},
+	{"mmap-lock2", 0, NULL, MMAP_LOCK2},
+	{"shm", 0, NULL, SHM},
+	{"hugepage", 0, NULL, HUGEPAGE},
+	{"size", 1, NULL, 's'},
+	{"key", 1, NULL, 'k'},
+	{NULL, 0, NULL, 0},
 };
 
 /*
@@ -132,7 +132,7 @@
 
 	if (!flag_allocated) {
 		p = mmap(NULL, memsize, PROT_WRITE | PROT_READ,
-			 MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+			 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 		if (p == MAP_FAILED)
 			err(1, "mmap(anonymous) failed");
 		touch_memory(p, memsize);
@@ -253,7 +253,7 @@
 /*
  * sigint_handler: handle SIGINT by set the exit flag.
  */
-void sigint_handler(int __attribute__((unused)) signo)
+void sigint_handler(int __attribute__ ((unused)) signo)
 {
 	flag_exit = 1;
 }
@@ -267,7 +267,7 @@
  * When we receive SIGUSR again, we will free all the allocated
  * memory.
  */
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	if (opt_mmap_anon)
 		mmap_anon();
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_test_1.c b/testcases/kernel/controllers/memcg/regression/memcg_test_1.c
index fd3b8a7..c7fb948 100644
--- a/testcases/kernel/controllers/memcg/regression/memcg_test_1.c
+++ b/testcases/kernel/controllers/memcg/regression/memcg_test_1.c
@@ -55,7 +55,7 @@
 				write(fd, buf, 10);
 				fsync(fd);
 
-				p = mmap(NULL, size, PROT_READ|PROT_WRITE,
+				p = mmap(NULL, size, PROT_READ | PROT_WRITE,
 					 MAP_FLAGS, 0, 0);
 
 				if (p == MAP_FAILED) {
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_test_2.c b/testcases/kernel/controllers/memcg/regression/memcg_test_2.c
index f26ef9d..843b078 100644
--- a/testcases/kernel/controllers/memcg/regression/memcg_test_2.c
+++ b/testcases/kernel/controllers/memcg/regression/memcg_test_2.c
@@ -26,13 +26,13 @@
 #include <string.h>
 #include <unistd.h>
 
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	char *p;
 	int size = getpagesize() * 2;
 
-	p = mmap(NULL, size, PROT_READ|PROT_WRITE,
-		 MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0);
+	p = mmap(NULL, size, PROT_READ | PROT_WRITE,
+		 MAP_PRIVATE | MAP_ANONYMOUS | MAP_LOCKED, 0, 0);
 	if (p == MAP_FAILED)
 		exit(1);
 }
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_test_4.c b/testcases/kernel/controllers/memcg/regression/memcg_test_4.c
index 3bf5043..d714561 100644
--- a/testcases/kernel/controllers/memcg/regression/memcg_test_4.c
+++ b/testcases/kernel/controllers/memcg/regression/memcg_test_4.c
@@ -31,12 +31,12 @@
 
 #define MEM_SIZE	(1024 * 1024 * 100)
 
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	char *p;
 
-	p = mmap(NULL, MEM_SIZE, PROT_READ|PROT_WRITE,
-	    MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+	p = mmap(NULL, MEM_SIZE, PROT_READ | PROT_WRITE,
+		 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 	if (p == MAP_FAILED) {
 		err(1, "failed to allocate memory!");
 	}
diff --git a/testcases/kernel/controllers/memcg/stress/memcg_process_stress.c b/testcases/kernel/controllers/memcg/stress/memcg_process_stress.c
index c3c850a..92627fe 100644
--- a/testcases/kernel/controllers/memcg/stress/memcg_process_stress.c
+++ b/testcases/kernel/controllers/memcg/stress/memcg_process_stress.c
@@ -45,7 +45,7 @@
 		pages[i][0] = 0xef;
 }
 
-void sigusr_handler(int __attribute__((unused)) signo)
+void sigusr_handler(int __attribute__ ((unused)) signo)
 {
 	int i;
 	int pagesize;
@@ -68,7 +68,7 @@
 	flag_ready = 1;
 }
 
-void sigint_handler(int __attribute__((unused)) signo)
+void sigint_handler(int __attribute__ ((unused)) signo)
 {
 	flag_exit = 1;
 }
diff --git a/testcases/kernel/controllers/memctl/memctl_test01.c b/testcases/kernel/controllers/memctl/memctl_test01.c
index 0d9ef8c..fd3c5e2 100644
--- a/testcases/kernel/controllers/memctl/memctl_test01.c
+++ b/testcases/kernel/controllers/memctl/memctl_test01.c
@@ -60,8 +60,8 @@
 int num_of_chunks, chunk_size, test_num, limit;
 
 void cleanup();
-void signal_handler_sigusr1 (int signal);
-void signal_handler_sigusr2 (int signal);
+void signal_handler_sigusr1(int signal);
+void signal_handler_sigusr2(int signal);
 int allocate_memory(void);
 
 int main(int argc, char *argv[])
@@ -77,18 +77,18 @@
 	mygroup_p = getenv("MYGROUP");
 	script_pid_p = getenv("SCRIPT_PID");
 	chunk_size_p = getenv("CHUNK_SIZE");
-	num_chunks_p	= getenv("NUM_CHUNKS");
+	num_chunks_p = getenv("NUM_CHUNKS");
 
 	if (test_num_p != NULL && mygroup_p != NULL && script_pid_p != NULL &&
 	    chunk_size_p != NULL && num_chunks_p != NULL) {
-		scriptpid       = atoi(script_pid_p);
-		test_num        = atoi(test_num_p);
-		chunk_size	= atoi(chunk_size_p);
-		num_of_chunks	= atoi(num_chunks_p);
-		sprintf(mygroup,"%s", mygroup_p);
+		scriptpid = atoi(script_pid_p);
+		test_num = atoi(test_num_p);
+		chunk_size = atoi(chunk_size_p);
+		num_of_chunks = atoi(num_chunks_p);
+		sprintf(mygroup, "%s", mygroup_p);
 	} else {
 		tst_brkm(TBROK, cleanup,
-		    "invalid parameters recieved from script\n");
+			 "invalid parameters recieved from script\n");
 	}
 
 	/* XXX (garrcoop): this section really needs error handling. */
@@ -96,7 +96,7 @@
 	/* Signal handling for SIGUSR1 recieved from script */
 	sigemptyset(&newaction1.sa_mask);
 	newaction1.sa_handler = signal_handler_sigusr1;
-	newaction1.sa_flags=0;
+	newaction1.sa_flags = 0;
 	sigaction(SIGUSR1, &newaction1, &oldaction1);
 
 	/* Signal handling for SIGUSR2 recieved from script */
@@ -105,13 +105,12 @@
 	newaction2.sa_flags = 0;
 	sigaction(SIGUSR2, &newaction2, &oldaction2);
 
-
 	sprintf(mytaskfile, "%s", mygroup);
-	strcat (mytaskfile,"/tasks");
+	strcat(mytaskfile, "/tasks");
 	/* Assign the task to it's group */
-	write_to_file (mytaskfile, "a", getpid());    /* Assign the task to it's group*/
+	write_to_file(mytaskfile, "a", getpid());	/* Assign the task to it's group */
 
-	ret = allocate_memory();	/*should i check ret?*/
+	ret = allocate_memory();	/*should i check ret? */
 
 	cleanup();
 
@@ -125,7 +124,7 @@
 void cleanup()
 {
 	if (kill(scriptpid, SIGUSR1) == -1)
-		tst_resm(TWARN|TERRNO, "kill failed");
+		tst_resm(TWARN | TERRNO, "kill failed");
 }
 
 /*
@@ -133,13 +132,13 @@
  * signal handler for the new action
  */
 
-void signal_handler_sigusr1 (int signal)
+void signal_handler_sigusr1(int signal)
 {
 	int i;
-	for (i=0; i< num_of_chunks; ++i)
+	for (i = 0; i < num_of_chunks; ++i)
 		free(array_of_chunks[i]);
 	free(array_of_chunks);
-	exit (0);
+	exit(0);
 }
 
 /*
@@ -147,10 +146,10 @@
  * signal handler for the new action
  */
 
-void signal_handler_sigusr2 (int signal)
+void signal_handler_sigusr2(int signal)
 {
 	int i;
-	for (i=0; i< num_of_chunks; ++i)
+	for (i = 0; i < num_of_chunks; ++i)
 		free(array_of_chunks[i]);
 	free(array_of_chunks);
 	if (test_num == 4) {
@@ -169,16 +168,17 @@
 	 */
 	array_of_chunks = malloc(sizeof(record_t *) * num_of_chunks);
 	if (array_of_chunks == NULL)
-		tst_brkm (TBROK, cleanup, "Memory allocation failed for array_of_chunks");
+		tst_brkm(TBROK, cleanup,
+			 "Memory allocation failed for array_of_chunks");
 	/*
 	 * Allocate chunks of memory
 	 */
 
-	for (i=0; i< num_of_chunks; ++i)
-	{
+	for (i = 0; i < num_of_chunks; ++i) {
 		array_of_chunks[i] = (record_t *) malloc(chunk_size);
 		if (array_of_chunks[i] == NULL)
-			tst_brkm (TBROK, cleanup, "Memory allocation failed for chunks. Try smaller chunk size");
+			tst_brkm(TBROK, cleanup,
+				 "Memory allocation failed for chunks. Try smaller chunk size");
 	}
 
 	/*
@@ -186,17 +186,16 @@
 	 */
 	limit = chunk_size / sizeof(record_t);
 
-	for (i=0; i< num_of_chunks; ++i)
-		for (j=0; j< limit; ++j)
+	for (i = 0; i < num_of_chunks; ++i)
+		for (j = 0; j < limit; ++j)
 			array_of_chunks[i][j] = 0xaa;
 
 	/*
 	 * Just keep on accessing the allocated pages and do nothing relevant
 	 */
-	while (1)
-	{
-		for (i=0; i< num_of_chunks; ++i)
-			for (j=0; j< limit; ++j)
+	while (1) {
+		for (i = 0; i < num_of_chunks; ++i)
+			for (j = 0; j < limit; ++j)
 				tmp = array_of_chunks[i][j];
 	}
 	return 0;
diff --git a/testcases/kernel/device-drivers/acpi/LtpAcpiCmds.c b/testcases/kernel/device-drivers/acpi/LtpAcpiCmds.c
index a90559e..26fcc15 100644
--- a/testcases/kernel/device-drivers/acpi/LtpAcpiCmds.c
+++ b/testcases/kernel/device-drivers/acpi/LtpAcpiCmds.c
@@ -49,49 +49,52 @@
 
 static int ltpdev_open(struct block_device *bdev, fmode_t mode);
 static int ltpdev_release(struct gendisk *disk, fmode_t mode);
-static int ltpdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg);
+static int ltpdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
+			unsigned long arg);
 
 static u32 ltp_test_sleep_button_ev_handler(void *context);
 static u32 ltp_test_power_button_ev_handler(void *context);
 static u32 acpi_ec_gpe_handler(void *context);
 
-static void acpi_bus_notify (acpi_handle             handle, u32 type, void *data);
-static acpi_status ltp_get_dev_callback (acpi_handle obj, u32 depth, void *context, void **ret);
-static acpi_status acpi_ec_io_ports (struct acpi_resource	*resource,   void			*context);
+static void acpi_bus_notify(acpi_handle handle, u32 type, void *data);
+static acpi_status ltp_get_dev_callback(acpi_handle obj, u32 depth,
+					void *context, void **ret);
+static acpi_status acpi_ec_io_ports(struct acpi_resource *resource,
+				    void *context);
 #if 0
-static acpi_status acpi_ec_space_setup (acpi_handle		region_handle,
-	                                    u32			    function,
-	                                    void			*handler_context,
-	                                    void			**return_context);
-static acpi_status acpi_ec_space_handler (u32			function,
-                                          acpi_physical_address	address,
-	                                      u32			bit_width,
-	                                      acpi_integer		*value,
-	                                      void			*handler_context,
-	                                      void			*region_context);
+static acpi_status acpi_ec_space_setup(acpi_handle region_handle,
+				       u32 function,
+				       void *handler_context,
+				       void **return_context);
+static acpi_status acpi_ec_space_handler(u32 function,
+					 acpi_physical_address address,
+					 u32 bit_width,
+					 acpi_integer * value,
+					 void *handler_context,
+					 void *region_context);
 #endif
 
 static struct block_device_operations blkops = {
-open:       ltpdev_open,
-release:    ltpdev_release,
-ioctl:      ltpdev_ioctl,
+open:	ltpdev_open,
+release:ltpdev_release,
+ioctl:	ltpdev_ioctl,
 };
 
 int ltp_acpi_major = LTPMAJOR;
 int test_iteration = 0;
 
 static char genhd_flags = 0;
-static struct gendisk * gd_ptr;
+static struct gendisk *gd_ptr;
 
 struct acpi_ec {
-	acpi_handle			handle;
-	unsigned long			uid;
-	unsigned long long		gpe_bit;
-	struct acpi_generic_address	status_addr;
-	struct acpi_generic_address	command_addr;
-	struct acpi_generic_address	data_addr;
-	unsigned long			global_lock;
-	spinlock_t			lock;
+	acpi_handle handle;
+	unsigned long uid;
+	unsigned long long gpe_bit;
+	struct acpi_generic_address status_addr;
+	struct acpi_generic_address command_addr;
+	struct acpi_generic_address data_addr;
+	unsigned long global_lock;
+	spinlock_t lock;
 };
 
 MODULE_AUTHOR("Martin Ridgeway <mridge@us.ibm.com>");
@@ -102,19 +105,19 @@
  * Device operations for the virtual ACPI devices
  */
 
-extern struct acpi_device		*acpi_root;
+extern struct acpi_device *acpi_root;
 
 static int ltpdev_open(struct block_device *dev, fmode_t mode)
 {
-    printk(KERN_ALERT "ltpdev_open \n");
-  return 0;
+	printk(KERN_ALERT "ltpdev_open \n");
+	return 0;
 }
 
 static int ltpdev_release(struct gendisk *disk, fmode_t mode)
 {
 
-    printk(KERN_ALERT "ltpdev_release \n");
-  return 0;
+	printk(KERN_ALERT "ltpdev_release \n");
+	return 0;
 }
 
 static u32 ltp_test_power_button_ev_handler(void *context)
@@ -129,71 +132,75 @@
 	return 1;
 }
 
-static int ltpdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg)
+static int ltpdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
+			unsigned long arg)
 {
-    acpi_status        status;
-//	acpi_handle        sys_bus_handle;
-    acpi_handle        start_handle = 0;
-    acpi_handle        parent_handle;
-    acpi_handle        child_handle;
-    acpi_handle        next_child_handle;
-    acpi_status        level;
-	struct acpi_ec		*ec;
-	struct acpi_device  *device;
-	struct acpi_buffer	buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+	acpi_status status;
+//      acpi_handle        sys_bus_handle;
+	acpi_handle start_handle = 0;
+	acpi_handle parent_handle;
+	acpi_handle child_handle;
+	acpi_handle next_child_handle;
+	acpi_status level;
+	struct acpi_ec *ec;
+	struct acpi_device *device;
+	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
 #if 0
-	acpi_handle        tmp_handle;
-	struct acpi_table_ecdt 	*ecdt_ptr;
-	struct acpi_buffer	dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
-	struct acpi_buffer	batt_buffer = {ACPI_ALLOCATE_BUFFER, NULL};
-	struct acpi_buffer	format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
-						ACPI_BATTERY_FORMAT_BIF};
-	struct acpi_buffer	data = {0, NULL};
-	union acpi_object	*package = NULL;
-	u32                 start_ticks, stop_ticks, total_ticks;
+	acpi_handle tmp_handle;
+	struct acpi_table_ecdt *ecdt_ptr;
+	struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct acpi_buffer batt_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct acpi_buffer format = { sizeof(ACPI_BATTERY_FORMAT_BIF),
+		ACPI_BATTERY_FORMAT_BIF
+	};
+	struct acpi_buffer data = { 0, NULL };
+	union acpi_object *package = NULL;
+	u32 start_ticks, stop_ticks, total_ticks;
 #endif
 
-    u32                 i, bm_status;
-    u8                  type_a, type_b;
-    u32			global_lock = 0;
-    int 		state = 0;
+	u32 i, bm_status;
+	u8 type_a, type_b;
+	u32 global_lock = 0;
+	int state = 0;
 
     /*****************************************************************************/
 
-    printk(KERN_ALERT "ltpdev_ioctl \n");
-    switch (cmd) {
-    case LTPDEV_CMD:
+	printk(KERN_ALERT "ltpdev_ioctl \n");
+	switch (cmd) {
+	case LTPDEV_CMD:
 
-        parent_handle = start_handle;
-        child_handle = 0;
-        level        = 1;
-        test_iteration++;
+		parent_handle = start_handle;
+		child_handle = 0;
+		level = 1;
+		test_iteration++;
 
-        printk(KERN_ALERT "-- IOCTL called to start ACPI tests -- Iteration:%d\n",test_iteration);
+		printk(KERN_ALERT
+		       "-- IOCTL called to start ACPI tests -- Iteration:%d\n",
+		       test_iteration);
 
-        printk(KERN_ALERT "TEST -- acpi_get_handle \n");
+		printk(KERN_ALERT "TEST -- acpi_get_handle \n");
 
-        status = acpi_get_handle (0, ACPI_NS_SYSTEM_BUS, &parent_handle);
+		status = acpi_get_handle(0, ACPI_NS_SYSTEM_BUS, &parent_handle);
 
-	printk(KERN_ALERT "TEST -- acpi_get_object_info \n");
+		printk(KERN_ALERT "TEST -- acpi_get_object_info \n");
 
-	status = acpi_get_object_info (parent_handle, &buffer);
+		status = acpi_get_object_info(parent_handle, &buffer);
 
-        printk(KERN_ALERT "TEST -- acpi_get_next_object \n");
+		printk(KERN_ALERT "TEST -- acpi_get_next_object \n");
 
-        status = acpi_get_next_object (ACPI_TYPE_ANY, parent_handle,
-                  child_handle, &next_child_handle);
+		status = acpi_get_next_object(ACPI_TYPE_ANY, parent_handle,
+					      child_handle, &next_child_handle);
 
-        printk(KERN_ALERT "TEST -- acpi_get_parent \n");
+		printk(KERN_ALERT "TEST -- acpi_get_parent \n");
 
-        status = acpi_get_parent(parent_handle, &parent_handle);
+		status = acpi_get_parent(parent_handle, &parent_handle);
 
-        printk(KERN_ALERT "TEST -- acpi_evaluate_object \n");
+		printk(KERN_ALERT "TEST -- acpi_evaluate_object \n");
 
-        status = acpi_evaluate_object(parent_handle, "_ON", NULL, NULL);
+		status = acpi_evaluate_object(parent_handle, "_ON", NULL, NULL);
 
-        printk(KERN_ALERT "TEST -- acpi_get_table \n");
+		printk(KERN_ALERT "TEST -- acpi_get_table \n");
 
 //        status = acpi_get_table(ACPI_TABLE_RSDP, 1, &dsdt);
 //        status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt);
@@ -204,72 +211,99 @@
 //        status = acpi_get_table(ACPI_TABLE_XSDT, 1, &dsdt);
 
 #if 0
-        printk(KERN_ALERT "TEST -- acpi_get_firmware_table \n");
+		printk(KERN_ALERT "TEST -- acpi_get_firmware_table \n");
 
-        status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
-            (struct acpi_table_header **) &dsdt);
+		status =
+		    acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
+					    (struct acpi_table_header **)&dsdt);
 #endif
 
-        printk(KERN_ALERT "TEST -- acpi_install_notify_handler \n");
+		printk(KERN_ALERT "TEST -- acpi_install_notify_handler \n");
 
-        status = acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY, &acpi_bus_notify, NULL);
+		status =
+		    acpi_install_notify_handler(ACPI_ROOT_OBJECT,
+						ACPI_SYSTEM_NOTIFY,
+						&acpi_bus_notify, NULL);
 
-        printk(KERN_ALERT "TEST -- acpi_remove_notify_handler \n");
+		printk(KERN_ALERT "TEST -- acpi_remove_notify_handler \n");
 
-        status = acpi_remove_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY, &acpi_bus_notify);
+		status =
+		    acpi_remove_notify_handler(ACPI_ROOT_OBJECT,
+					       ACPI_SYSTEM_NOTIFY,
+					       &acpi_bus_notify);
 
-	printk(KERN_ALERT "TEST -- acpi_install_fixed_event_handler \n");
-	status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, ltp_test_power_button_ev_handler, NULL);
-	if (status)
-		printk(KERN_ALERT "Failed installing fixed event handler \n");
+		printk(KERN_ALERT
+		       "TEST -- acpi_install_fixed_event_handler \n");
+		status =
+		    acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
+						     ltp_test_power_button_ev_handler,
+						     NULL);
+		if (status)
+			printk(KERN_ALERT
+			       "Failed installing fixed event handler \n");
 
-	printk(KERN_ALERT "TEST -- acpi_remove_fixed_event_handler \n");
-	status = acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, ltp_test_power_button_ev_handler);
-	if (status)
-		printk(KERN_ALERT "Failed removing fixed event handler \n");
+		printk(KERN_ALERT "TEST -- acpi_remove_fixed_event_handler \n");
+		status =
+		    acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
+						    ltp_test_power_button_ev_handler);
+		if (status)
+			printk(KERN_ALERT
+			       "Failed removing fixed event handler \n");
 
-	printk(KERN_ALERT "TEST -- acpi_install_fixed_event_handler \n");
-	status = acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, ltp_test_sleep_button_ev_handler, NULL);
-	if (status)
-		printk(KERN_ALERT "Failed installing fixed event handler \n");
+		printk(KERN_ALERT
+		       "TEST -- acpi_install_fixed_event_handler \n");
+		status =
+		    acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
+						     ltp_test_sleep_button_ev_handler,
+						     NULL);
+		if (status)
+			printk(KERN_ALERT
+			       "Failed installing fixed event handler \n");
 
-	printk(KERN_ALERT "TEST -- acpi_remove_fixed_event_handler \n");
-	status = acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, ltp_test_sleep_button_ev_handler);
-	if (status)
-		printk(KERN_ALERT "Failed removing fixed event handler \n");
+		printk(KERN_ALERT "TEST -- acpi_remove_fixed_event_handler \n");
+		status =
+		    acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
+						    ltp_test_sleep_button_ev_handler);
+		if (status)
+			printk(KERN_ALERT
+			       "Failed removing fixed event handler \n");
 
-	printk(KERN_ALERT "TEST -- acpi_acquire_global_lock \n");
-	status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &global_lock);
+		printk(KERN_ALERT "TEST -- acpi_acquire_global_lock \n");
+		status =
+		    acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &global_lock);
 
-	printk(KERN_ALERT "TEST -- acpi_release_global_lock \n");
-	status = acpi_release_global_lock(global_lock);
+		printk(KERN_ALERT "TEST -- acpi_release_global_lock \n");
+		status = acpi_release_global_lock(global_lock);
 
-        printk(KERN_ALERT "TEST -- acpi_bus_get_device \n");
+		printk(KERN_ALERT "TEST -- acpi_bus_get_device \n");
 
-        status = acpi_bus_get_device(next_child_handle, &device);
+		status = acpi_bus_get_device(next_child_handle, &device);
 
 #if 0
-	printk(KERN_ALERT "TEST -- acpi_bus_find_driver \n");
-	status = acpi_bus_find_driver(device);
+		printk(KERN_ALERT "TEST -- acpi_bus_find_driver \n");
+		status = acpi_bus_find_driver(device);
 #endif
 
-	printk(KERN_ALERT "TEST -- acpi_bus_get_power \n");
-	status = acpi_bus_get_power(next_child_handle, &state);
-	if (status)
-	printk(KERN_ALERT "Error reading power state \n");
+		printk(KERN_ALERT "TEST -- acpi_bus_get_power \n");
+		status = acpi_bus_get_power(next_child_handle, &state);
+		if (status)
+			printk(KERN_ALERT "Error reading power state \n");
 
-        printk(KERN_ALERT "TEST -- acpi_driver_data \n");
+		printk(KERN_ALERT "TEST -- acpi_driver_data \n");
 
-        ec = acpi_driver_data(device);
+		ec = acpi_driver_data(device);
 
-        if (!ec) {
-            printk(KERN_ALERT "Failure getting device data \n");
-        }
-        else {
+		if (!ec) {
+			printk(KERN_ALERT "Failure getting device data \n");
+		} else {
 
-            printk(KERN_ALERT "TEST -- acpi_install_gpe_handler \n");
-            ec->status_addr = ec->command_addr;
-            status = acpi_install_gpe_handler(device, ec->gpe_bit, ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec);
+			printk(KERN_ALERT
+			       "TEST -- acpi_install_gpe_handler \n");
+			ec->status_addr = ec->command_addr;
+			status =
+			    acpi_install_gpe_handler(device, ec->gpe_bit,
+						     ACPI_GPE_EDGE_TRIGGERED,
+						     &acpi_ec_gpe_handler, ec);
 /*
             status = acpi_install_address_space_handler (ACPI_ROOT_OBJECT,
                     ACPI_ADR_SPACE_EC, &acpi_ec_space_handler,
@@ -282,175 +316,201 @@
             acpi_remove_address_space_handler(ACPI_ROOT_OBJECT,
                 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler);
 */
-            printk(KERN_ALERT "TEST -- acpi_remove_gpe_handler \n");
-            acpi_remove_gpe_handler(device, ec->gpe_bit, &acpi_ec_gpe_handler);
-        }
+			printk(KERN_ALERT "TEST -- acpi_remove_gpe_handler \n");
+			acpi_remove_gpe_handler(device, ec->gpe_bit,
+						&acpi_ec_gpe_handler);
+		}
 
-        printk(KERN_ALERT "TEST -- acpi_get_current_resources \n");
-        status = acpi_get_current_resources (next_child_handle, &buffer);
+		printk(KERN_ALERT "TEST -- acpi_get_current_resources \n");
+		status = acpi_get_current_resources(next_child_handle, &buffer);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_current_resources %d\n",status);
-        }
-
+		if (status) {
+			printk(KERN_ALERT "Failed get_current_resources %d\n",
+			       status);
+		}
 #ifdef ACPI_FUTURE_USAGE
-        printk(KERN_ALERT "TEST -- acpi_get_possible_resources \n");
-        status = acpi_get_possible_resources (next_child_handle, &buffer);
+		printk(KERN_ALERT "TEST -- acpi_get_possible_resources \n");
+		status =
+		    acpi_get_possible_resources(next_child_handle, &buffer);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_possible_resources %d\n",status);
-        }
+		if (status) {
+			printk(KERN_ALERT "Failed get_possible_resources %d\n",
+			       status);
+		}
 #endif
 
-        printk(KERN_ALERT "TEST -- acpi_walk_resources \n");
-        status = acpi_walk_resources(ec->handle, METHOD_NAME__CRS,
-            acpi_ec_io_ports, ec);
+		printk(KERN_ALERT "TEST -- acpi_walk_resources \n");
+		status = acpi_walk_resources(ec->handle, METHOD_NAME__CRS,
+					     acpi_ec_io_ports, ec);
 
-        if (status) {
-            printk(KERN_ALERT "Failed walk_resources %d\n",status);
-        }
+		if (status) {
+			printk(KERN_ALERT "Failed walk_resources %d\n", status);
+		}
 
-	printk(KERN_ALERT "TEST -- acpi_evaluate_integer \n");
-	status = acpi_evaluate_integer(ec->handle, "_GPE", NULL, &ec->gpe_bit);
-	if (status)
-	printk(KERN_ALERT "Error obtaining GPE bit assignment\n");
+		printk(KERN_ALERT "TEST -- acpi_evaluate_integer \n");
+		status =
+		    acpi_evaluate_integer(ec->handle, "_GPE", NULL,
+					  &ec->gpe_bit);
+		if (status)
+			printk(KERN_ALERT
+			       "Error obtaining GPE bit assignment\n");
 
 #if 0
-        printk(KERN_ALERT "TEST -- acpi_get_timer \n");
-        status = acpi_get_timer(&total_ticks);
+		printk(KERN_ALERT "TEST -- acpi_get_timer \n");
+		status = acpi_get_timer(&total_ticks);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_timer %d\n",status);
-        }
-        else {
-            printk(KERN_ALERT "get_timer -- total_ticks %d\n",total_ticks);
-        }
+		if (status) {
+			printk(KERN_ALERT "Failed get_timer %d\n", status);
+		} else {
+			printk(KERN_ALERT "get_timer -- total_ticks %d\n",
+			       total_ticks);
+		}
 
-        start_ticks = 20;
-        stop_ticks  = 30;
+		start_ticks = 20;
+		stop_ticks = 30;
 
-        printk(KERN_ALERT "TEST -- acpi_get_timer_duration \n");
-        status = acpi_get_timer_duration(start_ticks, stop_ticks, &total_ticks);
+		printk(KERN_ALERT "TEST -- acpi_get_timer_duration \n");
+		status =
+		    acpi_get_timer_duration(start_ticks, stop_ticks,
+					    &total_ticks);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_timer_duration %d\n",status);
-        }
-        else {
-            printk(KERN_ALERT "get_timer_duration total_ticks %d\n",total_ticks);
-        }
+		if (status) {
+			printk(KERN_ALERT "Failed get_timer_duration %d\n",
+			       status);
+		} else {
+			printk(KERN_ALERT "get_timer_duration total_ticks %d\n",
+			       total_ticks);
+		}
 #endif
 
-        for (i = 0; i < ACPI_S_STATE_COUNT; i++) {
-            printk(KERN_ALERT "TEST -- acpi_get_sleep_type_data \n");
-		    status = acpi_get_sleep_type_data(i, &type_a, &type_b);
+		for (i = 0; i < ACPI_S_STATE_COUNT; i++) {
+			printk(KERN_ALERT
+			       "TEST -- acpi_get_sleep_type_data \n");
+			status = acpi_get_sleep_type_data(i, &type_a, &type_b);
 
-            if (status) {
-                printk(KERN_ALERT "Failed get_sleep_type_data %d\n",status);
-            }
-            else {
-                printk(KERN_ALERT "get_sleep_type_data [%d] type_a:%d type_b:%d\n",i, type_a,type_b);
-            }
-        }
+			if (status) {
+				printk(KERN_ALERT
+				       "Failed get_sleep_type_data %d\n",
+				       status);
+			} else {
+				printk(KERN_ALERT
+				       "get_sleep_type_data [%d] type_a:%d type_b:%d\n",
+				       i, type_a, type_b);
+			}
+		}
 
-        printk(KERN_ALERT "TEST -- acpi_get_register \n");
+		printk(KERN_ALERT "TEST -- acpi_get_register \n");
 
 /*
  * ACPICA: Remove obsolete Flags parameter.
  * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d8c71b6d3b21cf21ad775e1cf6da95bf87bd5ad4
  *
  */
-	acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
+		acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
 
-        if (!bm_status) {
-            printk(KERN_ALERT "Failed get_register [%d]\n",bm_status);
-        }
-        else {
-            printk(KERN_ALERT "get_register [%d] \n",bm_status);
-        }
+		if (!bm_status) {
+			printk(KERN_ALERT "Failed get_register [%d]\n",
+			       bm_status);
+		} else {
+			printk(KERN_ALERT "get_register [%d] \n", bm_status);
+		}
 
 //        Puts system to sleep, permenately !!!
 //        status = acpi_enter_sleep_state(ACPI_STATE_S1);
 
 #if 0
-        printk(KERN_ALERT "TEST -- acpi_get_system_info \n");
-        status = acpi_get_system_info(&buffer);
+		printk(KERN_ALERT "TEST -- acpi_get_system_info \n");
+		status = acpi_get_system_info(&buffer);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_system_info %d\n",status);
-        }
-        else {
-            printk(KERN_ALERT "get_system_info buffer.length:%d buffer.pointer:%p\n",buffer.length, buffer.pointer);
+		if (status) {
+			printk(KERN_ALERT "Failed get_system_info %d\n",
+			       status);
+		} else {
+			printk(KERN_ALERT
+			       "get_system_info buffer.length:%d buffer.pointer:%p\n",
+			       buffer.length, buffer.pointer);
 
-            acpi_os_printf("os_printf OK %d\n",status);
+			acpi_os_printf("os_printf OK %d\n", status);
 
-            if (buffer.pointer) {
-                acpi_os_free(buffer.pointer);
-            }
-        }
+			if (buffer.pointer) {
+				acpi_os_free(buffer.pointer);
+			}
+		}
 #endif
 
-        printk(KERN_ALERT "TEST -- acpi_get_devices \n");
-        status = acpi_get_devices(NULL, ltp_get_dev_callback, "LTP0001", NULL);
+		printk(KERN_ALERT "TEST -- acpi_get_devices \n");
+		status =
+		    acpi_get_devices(NULL, ltp_get_dev_callback, "LTP0001",
+				     NULL);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_devices %d\n",status);
-        }
-
+		if (status) {
+			printk(KERN_ALERT "Failed get_devices %d\n", status);
+		}
 //        status = acpi_os_create_semaphore(1, 1, &tmp_handle);
 
-        if (status) {
-            printk(KERN_ALERT "Failed os_create_semaphore %d\n",status);
-        }
-        else {
-            printk(KERN_ALERT "os_create_semaphore OK, no deleteing %d\n",status);
+		if (status) {
+			printk(KERN_ALERT "Failed os_create_semaphore %d\n",
+			       status);
+		} else {
+			printk(KERN_ALERT
+			       "os_create_semaphore OK, no deleteing %d\n",
+			       status);
 //            acpi_os_delete_semaphore(tmp_handle);
 
-        }
+		}
 
 #if 0
-        printk(KERN_ALERT "TEST -- acpi_get_system_info \n");
-        status = acpi_get_system_info(&batt_buffer);
+		printk(KERN_ALERT "TEST -- acpi_get_system_info \n");
+		status = acpi_get_system_info(&batt_buffer);
 
-        if (status) {
-            printk(KERN_ALERT "Failed get_system_info %d\n",status);
-        }
-        else {
-            printk(KERN_ALERT "get_system_info buffer.length:%d buffer.pointer:%p\n",buffer.length, buffer.pointer);
+		if (status) {
+			printk(KERN_ALERT "Failed get_system_info %d\n",
+			       status);
+		} else {
+			printk(KERN_ALERT
+			       "get_system_info buffer.length:%d buffer.pointer:%p\n",
+			       buffer.length, buffer.pointer);
 
-            package = (union acpi_object *) batt_buffer.pointer;
+			package = (union acpi_object *)batt_buffer.pointer;
 
-            /* Extract Package Data */
+			/* Extract Package Data */
 
-            printk(KERN_ALERT "TEST -- acpi_extract_package \n");
-            status = acpi_extract_package(package, &format, &data);
+			printk(KERN_ALERT "TEST -- acpi_extract_package \n");
+			status = acpi_extract_package(package, &format, &data);
 
-            data.pointer = kmalloc(data.length, GFP_KERNEL);
+			data.pointer = kmalloc(data.length, GFP_KERNEL);
 
-            if (!data.pointer) {
-                printk(KERN_ALERT "Failed getting memory kalloc \n");
-            }
-            else {
-                memset(data.pointer, 0, data.length);
+			if (!data.pointer) {
+				printk(KERN_ALERT
+				       "Failed getting memory kalloc \n");
+			} else {
+				memset(data.pointer, 0, data.length);
 
-                printk(KERN_ALERT "TEST -- acpi_extract_package \n");
-                status = acpi_extract_package(package, &format, &data);
+				printk(KERN_ALERT
+				       "TEST -- acpi_extract_package \n");
+				status =
+				    acpi_extract_package(package, &format,
+							 &data);
 
-                kfree(data.pointer);
-            }
+				kfree(data.pointer);
+			}
 
 //            acpi_os_free(buffer.pointer);
-        }
+		}
 #endif
 
-        printk(KERN_ALERT "-- IOCTL ACPI tests Complete -- Iteration:%d\n",test_iteration);
+		printk(KERN_ALERT
+		       "-- IOCTL ACPI tests Complete -- Iteration:%d\n",
+		       test_iteration);
 
-        break;
-    }
+		break;
+	}
 
-  return 0;
+	return 0;
 }
 
-static acpi_status ltp_get_dev_callback (acpi_handle obj, u32 depth, void *context, void **ret)
+static acpi_status ltp_get_dev_callback(acpi_handle obj, u32 depth,
+					void *context, void **ret)
 {
 	char *name = context;
 	char fullname[20];
@@ -461,9 +521,9 @@
 	 * separately in PCI space.
 	 */
 	sprintf(fullname, "%s SBA", name);
-    printk(KERN_ALERT "get_dev_callback SBA name %s \n", fullname);
+	printk(KERN_ALERT "get_dev_callback SBA name %s \n", fullname);
 	sprintf(fullname, "%s IOC", name);
-    printk(KERN_ALERT "get_dev_callback IOC name %s \n", fullname);
+	printk(KERN_ALERT "get_dev_callback IOC name %s \n", fullname);
 
 	return 0;
 }
@@ -473,12 +533,10 @@
  * ---------------
  * Callback for all 'system-level' device notifications (values 0x00-0x7F).
  */
-static void acpi_bus_notify (acpi_handle             handle,
-	                         u32                     type,
-                             void                    *data)
+static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
 {
 
-    printk(KERN_ALERT "Register ACPI Bus Notify callback function \n");
+	printk(KERN_ALERT "Register ACPI Bus Notify callback function \n");
 
 }
 
@@ -488,29 +546,30 @@
 	return 1;
 }
 
-static acpi_status acpi_ec_io_ports (struct acpi_resource	*resource,   void			*context)
+static acpi_status acpi_ec_io_ports(struct acpi_resource *resource,
+				    void *context)
 {
-        return 0;
+	return 0;
 }
 
 #if 0
-static acpi_status acpi_ec_space_handler (u32			function,
-	acpi_physical_address	address,
-	u32			bit_width,
-	acpi_integer		*value,
-	void			*handler_context,
-	void			*region_context)
+static acpi_status acpi_ec_space_handler(u32 function,
+					 acpi_physical_address address,
+					 u32 bit_width,
+					 acpi_integer * value,
+					 void *handler_context,
+					 void *region_context)
 {
-	int			result = 0;
-	struct acpi_ec		*ec = NULL;
-	u32			temp = 0;
+	int result = 0;
+	struct acpi_ec *ec = NULL;
+	u32 temp = 0;
 
 	ACPI_FUNCTION_TRACE("acpi_ec_space_handler");
 
 	if ((address > 0xFF) || (bit_width != 8) || !value || !handler_context)
 		return_VALUE(AE_BAD_PARAMETER);
 
-	ec = (struct acpi_ec *) handler_context;
+	ec = (struct acpi_ec *)handler_context;
 
 	switch (function) {
 	case ACPI_READ:
@@ -541,11 +600,10 @@
 
 }
 
-static acpi_status acpi_ec_space_setup (
-	acpi_handle		region_handle,
-	u32			function,
-	void			*handler_context,
-	void			**return_context)
+static acpi_status acpi_ec_space_setup(acpi_handle region_handle,
+				       u32 function,
+				       void *handler_context,
+				       void **return_context)
 {
 	/*
 	 * The EC object is in the handler context and is needed
@@ -559,56 +617,58 @@
 
 int init_module(void)
 {
-    int                result;
+	int result;
 
-    printk(KERN_ALERT "ltpdev_init_module \n");
+	printk(KERN_ALERT "ltpdev_init_module \n");
 
-    result = register_blkdev(ltp_acpi_major, LTP_ACPI_DEV_NAME);
+	result = register_blkdev(ltp_acpi_major, LTP_ACPI_DEV_NAME);
 
-    printk(KERN_ALERT "LTP ACPI: register_blkdev result=%d major %d\n",result, ltp_acpi_major);
+	printk(KERN_ALERT "LTP ACPI: register_blkdev result=%d major %d\n",
+	       result, ltp_acpi_major);
 
-    if (result < 0) {
-        printk(KERN_ALERT "LTP ACPI: can't get major %d\n",ltp_acpi_major);
-        return result;
-    }
+	if (result < 0) {
+		printk(KERN_ALERT "LTP ACPI: can't get major %d\n",
+		       ltp_acpi_major);
+		return result;
+	}
 //    if (ltp_acpi_major == 0)
 //      ltp_acpi_major = result; /* dynamic */
 
 	gd_ptr = kmalloc(sizeof(struct gendisk *), GFP_KERNEL);
 
-    if (!gd_ptr) {
-        printk(KERN_ALERT "ERROR getting memory !!!\n");
-      return 0;
-    }
+	if (!gd_ptr) {
+		printk(KERN_ALERT "ERROR getting memory !!!\n");
+		return 0;
+	}
 
-    gd_ptr = alloc_disk(1);
+	gd_ptr = alloc_disk(1);
 
-    printk(KERN_ALERT "gd_ptr after alloc = %p \n",gd_ptr);
+	printk(KERN_ALERT "gd_ptr after alloc = %p \n", gd_ptr);
 
-    gd_ptr->major = ltp_acpi_major;
-    gd_ptr->first_minor = 0;
-    gd_ptr->fops = &blkops;
+	gd_ptr->major = ltp_acpi_major;
+	gd_ptr->first_minor = 0;
+	gd_ptr->fops = &blkops;
 //    gd_ptr->minor_shift = MINOR_SHIFT_BITS;
-    gd_ptr->driverfs_dev = NULL;
+	gd_ptr->driverfs_dev = NULL;
 //    gd_ptr->disk_de = NULL;
-    gd_ptr->flags = genhd_flags;
+	gd_ptr->flags = genhd_flags;
 
-    sprintf(gd_ptr->disk_name, LTP_ACPI_DEV_NAME);
+	sprintf(gd_ptr->disk_name, LTP_ACPI_DEV_NAME);
 
-    add_disk(gd_ptr);
+	add_disk(gd_ptr);
 
-  return 0;
+	return 0;
 }
 
 void cleanup_module(void)
 {
 
-    printk(KERN_ALERT "Exiting module and cleaning up \n");
+	printk(KERN_ALERT "Exiting module and cleaning up \n");
 
-    put_disk(gd_ptr);
+	put_disk(gd_ptr);
 
-    del_gendisk(gd_ptr);
+	del_gendisk(gd_ptr);
 
-    unregister_blkdev(ltp_acpi_major, LTP_ACPI_DEV_NAME);
+	unregister_blkdev(ltp_acpi_major, LTP_ACPI_DEV_NAME);
 
 }
diff --git a/testcases/kernel/device-drivers/acpi/LtpAcpiMain.c b/testcases/kernel/device-drivers/acpi/LtpAcpiMain.c
index 6f9c765..c3e9c91 100644
--- a/testcases/kernel/device-drivers/acpi/LtpAcpiMain.c
+++ b/testcases/kernel/device-drivers/acpi/LtpAcpiMain.c
@@ -44,106 +44,116 @@
 
 int LTP_acpi_open_block_device(void);
 
-int ltp_block_dev_handle = 0;      /* handle to LTP Test block device */
+int ltp_block_dev_handle = 0;	/* handle to LTP Test block device */
 
 int main(int argc, char **argv)
 {
 
-    ltpdev_cmd_t  cmd = {0,0};
-    int rc;
+	ltpdev_cmd_t cmd = { 0, 0 };
+	int rc;
 
-    printf("[%s] - Running test program\n", argv[0]);
+	printf("[%s] - Running test program\n", argv[0]);
 
-    rc = LTP_acpi_open_block_device();
+	rc = LTP_acpi_open_block_device();
 
-    if (!rc) {
+	if (!rc) {
 
-        ltp_block_dev_handle = open(LTP_ACPI_DEVICE_NAME, O_RDWR);
+		ltp_block_dev_handle = open(LTP_ACPI_DEVICE_NAME, O_RDWR);
 
-        if (ltp_block_dev_handle < 0) {
-            printf("ERROR: Open of device %s failed %d errno = %d\n", LTP_ACPI_DEVICE_NAME,ltp_block_dev_handle, errno);
-        }
-        else {
-            rc = ioctl (ltp_block_dev_handle, LTPDEV_CMD, &cmd);
+		if (ltp_block_dev_handle < 0) {
+			printf
+			    ("ERROR: Open of device %s failed %d errno = %d\n",
+			     LTP_ACPI_DEVICE_NAME, ltp_block_dev_handle, errno);
+		} else {
+			rc = ioctl(ltp_block_dev_handle, LTPDEV_CMD, &cmd);
 
-            printf("return from ioctl %d \n", rc);
-        }
+			printf("return from ioctl %d \n", rc);
+		}
 
-    } else {
-        printf("ERROR: Create/open block device failed\n");
-    }
+	} else {
+		printf("ERROR: Create/open block device failed\n");
+	}
 
-  return 0;
+	return 0;
 }
 
 int LTP_acpi_open_block_device()
 {
-    dev_t devt;
-    struct stat statbuf;
-    int rc;
+	dev_t devt;
+	struct stat statbuf;
+	int rc;
 
-    if (ltp_block_dev_handle == 0) {
+	if (ltp_block_dev_handle == 0) {
 
-        /* check for the /dev/LTPACPITest subdir, and create if it does not exist.
-         *
-         * If devfs is running and mounted on /dev, these checks will all pass,
-         * so a new node will not be created.
-         */
-        devt = makedev(LTPMAJOR, 0);
+		/* check for the /dev/LTPACPITest subdir, and create if it does not exist.
+		 *
+		 * If devfs is running and mounted on /dev, these checks will all pass,
+		 * so a new node will not be created.
+		 */
+		devt = makedev(LTPMAJOR, 0);
 
-        rc = stat(LTP_ACPI_DEV_NODE_PATH, &statbuf);
+		rc = stat(LTP_ACPI_DEV_NODE_PATH, &statbuf);
 
-        if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist. */
-                rc = mkdir(LTP_ACPI_DEV_NODE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-            } else {
-                printf("ERROR: Problem with LTP ACPI dev directory.  Error code from stat() is %d\n\n", errno);
-            }
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist. */
+				rc = mkdir(LTP_ACPI_DEV_NODE_PATH,
+					   (S_IFDIR | S_IRWXU | S_IRGRP |
+					    S_IXGRP | S_IROTH | S_IXOTH));
+			} else {
+				printf
+				    ("ERROR: Problem with LTP ACPI dev directory.  Error code from stat() is %d\n\n",
+				     errno);
+			}
 
-        } else {
-            if (!(statbuf.st_mode & S_IFDIR)) {
-                rc = unlink(LTP_ACPI_DEV_NODE_PATH);
-                if (!rc) {
-                    rc = mkdir(LTP_ACPI_DEV_NODE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-                }
-            }
-        }
+		} else {
+			if (!(statbuf.st_mode & S_IFDIR)) {
+				rc = unlink(LTP_ACPI_DEV_NODE_PATH);
+				if (!rc) {
+					rc = mkdir(LTP_ACPI_DEV_NODE_PATH,
+						   (S_IFDIR | S_IRWXU | S_IRGRP
+						    | S_IXGRP | S_IROTH |
+						    S_IXOTH));
+				}
+			}
+		}
 
-        /*
-         * Check for the /dev/ltp-acpi/block_device node, and create if it does not
-         * exist.
-         */
-        rc = stat(LTP_ACPI_DEVICE_NAME, &statbuf);
-        if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist */
-                rc = mknod(LTP_ACPI_DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            } else {
-                printf("ERROR:Problem with LTP ACPI block device node directory.  Error code form stat() is %d\n\n", errno);
-            }
+		/*
+		 * Check for the /dev/ltp-acpi/block_device node, and create if it does not
+		 * exist.
+		 */
+		rc = stat(LTP_ACPI_DEVICE_NAME, &statbuf);
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist */
+				rc = mknod(LTP_ACPI_DEVICE_NAME,
+					   (S_IFBLK | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			} else {
+				printf
+				    ("ERROR:Problem with LTP ACPI block device node directory.  Error code form stat() is %d\n\n",
+				     errno);
+			}
 
-        } else {
-            /*
-             * /dev/ltp-acpi/block_device exists.  Check to make sure it is for a
-             * block device and that it has the right major and minor.
-             */
-            if ((!(statbuf.st_mode & S_IFBLK)) ||
-                 (statbuf.st_rdev != devt)) {
+		} else {
+			/*
+			 * /dev/ltp-acpi/block_device exists.  Check to make sure it is for a
+			 * block device and that it has the right major and minor.
+			 */
+			if ((!(statbuf.st_mode & S_IFBLK)) ||
+			    (statbuf.st_rdev != devt)) {
 
-                /* Recreate the dev node. */
-                rc = unlink(LTP_ACPI_DEVICE_NAME);
-                if (!rc) {
-                    rc = mknod(LTP_ACPI_DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-                }
-            }
-        }
+				/* Recreate the dev node. */
+				rc = unlink(LTP_ACPI_DEVICE_NAME);
+				if (!rc) {
+					rc = mknod(LTP_ACPI_DEVICE_NAME,
+						   (S_IFBLK | S_IRUSR | S_IWUSR
+						    | S_IRGRP | S_IWGRP), devt);
+				}
+			}
+		}
 
-    }
+	}
 
-    return rc;
+	return rc;
 }
diff --git a/testcases/kernel/device-drivers/agp/kernel_space/tagp.c b/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
index 3a16612..99e76f1 100644
--- a/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
+++ b/testcases/kernel/device-drivers/agp/kernel_space/tagp.c
@@ -53,7 +53,7 @@
 MODULE_LICENSE("GPL");
 
 static int tagp_ioctl(struct inode *, struct file *, unsigned int,
-		       unsigned long);
+		      unsigned long);
 static int tagp_open(struct inode *, struct file *);
 static int tagp_close(struct inode *, struct file *);
 
@@ -87,9 +87,9 @@
  * correct file descriptor
  */
 static struct file_operations tagp_fops = {
-        open : tagp_open,
-        release: tagp_close,
-        ioctl: tagp_ioctl,
+open:	tagp_open,
+release:tagp_close,
+ioctl:	tagp_ioctl,
 };
 
 /*
@@ -97,12 +97,14 @@
  * your test modules, need them for the file
  * operations structure
  */
-static int tagp_open(struct inode *ino, struct file *f) {
-      return 0;
+static int tagp_open(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
-static int tagp_close(struct inode *ino, struct file *f) {
-      return 0;
+static int tagp_close(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
 /*
@@ -119,11 +121,12 @@
  *
  */
 static int tagp_ioctl(struct inode *ino, struct file *f,
-                        unsigned int cmd, unsigned long l) {
-	int 			rc;
-	tagp_interface_t	tif;
-	caddr_t			*inparms;
-	caddr_t			*outparms;
+		      unsigned int cmd, unsigned long l)
+{
+	int rc;
+	tagp_interface_t tif;
+	caddr_t *inparms;
+	caddr_t *outparms;
 
 	printk("Enter tagp_ioctl\n");
 
@@ -140,32 +143,32 @@
 	 *
 	 */
 	if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
-                /* Bad address */
-                return(-EFAULT);
-        }
+		/* Bad address */
+		return (-EFAULT);
+	}
 
 	/*
-         * Setup inparms and outparms as needed
-         */
-        if (tif.in_len > 0) {
-                inparms = (caddr_t *)kmalloc(tif.in_len, GFP_KERNEL);
+	 * Setup inparms and outparms as needed
+	 */
+	if (tif.in_len > 0) {
+		inparms = (caddr_t *) kmalloc(tif.in_len, GFP_KERNEL);
 		if (!inparms) {
-                        return(-ENOMEM);
-                }
+			return (-ENOMEM);
+		}
 
-                rc = copy_from_user(inparms, tif.in_data, tif.in_len);
-                if (rc) {
-                        kfree(inparms);
-                        return(-EFAULT);
-                }
-        }
-        if (tif.out_len > 0) {
-                outparms = (caddr_t *)kmalloc(tif.out_len, GFP_KERNEL);
-                if (!outparms) {
-                        kfree(inparms);
-                        return(-ENOMEM);
-                }
-        }
+		rc = copy_from_user(inparms, tif.in_data, tif.in_len);
+		if (rc) {
+			kfree(inparms);
+			return (-EFAULT);
+		}
+	}
+	if (tif.out_len > 0) {
+		outparms = (caddr_t *) kmalloc(tif.out_len, GFP_KERNEL);
+		if (!outparms) {
+			kfree(inparms);
+			return (-ENOMEM);
+		}
+	}
 
 	/*
 	 * Use a switch statement to determine which function
@@ -174,32 +177,68 @@
 	 * needed
 	 *
 	 */
- 	switch(cmd) {
-		case TEST_PCI_FIND_DEV: 		rc = test_pci_find_device();break;
-		case TEST_BACKEND_ACQUIRE:		rc = test_agp_backend_acquire();break;
-		case TEST_BACKEND_RELEASE:		rc = test_agp_backend_release();break;
-		case TEST_ALLOC_BRIDGE :		rc = test_agp_alloc_bridge();break;
-		case TEST_PUT_BRIDGE:			rc = test_agp_put_bridge();break;
-		case TEST_CREATE_AND_FREE_MEMORY:	rc = test_agp_create_and_free_memory();break;
-//		case TEST_FREE_MEMORY:			rc = test_agp_free_memory();break;
-		case TEST_NUM_ENTRIES:			rc = test_agp_num_entries();break;
-		case TEST_COPY_INFO:			rc = test_agp_copy_info();break;
-//		case TEST_ALLOC_MEMORY_AND_BAND_UNBAND:	rc = test_agp_allocate_memory();break;
-		case TEST_GET_VERSION:			rc = test_get_agp_version();break;
-		case TEST_GENERIC_ENABLE:		rc = test_agp_generic_enable();break;
-		case TEST_GENERIC_CREATE_GATT_TABLE:	rc = test_agp_generic_create_gatt_table();break;
-		case TEST_GENERIC_FREE_GATT_TABLE:	rc = test_agp_generic_free_gatt_table();break;
-		case TEST_GENERIC_INSERT_MEMROY:	rc = test_agp_generic_insert_memory();break;
-		case TEST_GENERIC_ALLOC_BY_TYPE:	rc = test_agp_generic_alloc_by_type();break;
-		case TEST_GENERIC_ALLOC_PAGE:		rc = test_agp_generic_alloc_page();break;
-		case TEST_ENABLE:			rc = test_agp_enable();break;
-		case TEST_GLOBAL_CACHE_FLUSH:		rc = test_global_cache_flush();break;
-		case TEST_GENERIC_MASK_MEMORY:		rc = test_agp_generic_mask_memory();break;
+	switch (cmd) {
+	case TEST_PCI_FIND_DEV:
+		rc = test_pci_find_device();
+		break;
+	case TEST_BACKEND_ACQUIRE:
+		rc = test_agp_backend_acquire();
+		break;
+	case TEST_BACKEND_RELEASE:
+		rc = test_agp_backend_release();
+		break;
+	case TEST_ALLOC_BRIDGE:
+		rc = test_agp_alloc_bridge();
+		break;
+	case TEST_PUT_BRIDGE:
+		rc = test_agp_put_bridge();
+		break;
+	case TEST_CREATE_AND_FREE_MEMORY:
+		rc = test_agp_create_and_free_memory();
+		break;
+//              case TEST_FREE_MEMORY:                  rc = test_agp_free_memory();break;
+	case TEST_NUM_ENTRIES:
+		rc = test_agp_num_entries();
+		break;
+	case TEST_COPY_INFO:
+		rc = test_agp_copy_info();
+		break;
+//              case TEST_ALLOC_MEMORY_AND_BAND_UNBAND: rc = test_agp_allocate_memory();break;
+	case TEST_GET_VERSION:
+		rc = test_get_agp_version();
+		break;
+	case TEST_GENERIC_ENABLE:
+		rc = test_agp_generic_enable();
+		break;
+	case TEST_GENERIC_CREATE_GATT_TABLE:
+		rc = test_agp_generic_create_gatt_table();
+		break;
+	case TEST_GENERIC_FREE_GATT_TABLE:
+		rc = test_agp_generic_free_gatt_table();
+		break;
+	case TEST_GENERIC_INSERT_MEMROY:
+		rc = test_agp_generic_insert_memory();
+		break;
+	case TEST_GENERIC_ALLOC_BY_TYPE:
+		rc = test_agp_generic_alloc_by_type();
+		break;
+	case TEST_GENERIC_ALLOC_PAGE:
+		rc = test_agp_generic_alloc_page();
+		break;
+	case TEST_ENABLE:
+		rc = test_agp_enable();
+		break;
+	case TEST_GLOBAL_CACHE_FLUSH:
+		rc = test_global_cache_flush();
+		break;
+	case TEST_GENERIC_MASK_MEMORY:
+		rc = test_agp_generic_mask_memory();
+		break;
 
-		default:
-			printk("Mismatching ioctl command\n");
-                        break;
-        }
+	default:
+		printk("Mismatching ioctl command\n");
+		break;
+	}
 
 	/*
 	 * copy in the test return code, the reason we
@@ -216,28 +255,28 @@
 	 */
 
 	/* if outparms then copy outparms into tif.out_data */
-        if (outparms) {
-                if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
-                        printk("tpci: Unsuccessful copy_to_user of outparms\n");
-                        rc = -EFAULT;
-                }
-        }
+	if (outparms) {
+		if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
+			printk("tpci: Unsuccessful copy_to_user of outparms\n");
+			rc = -EFAULT;
+		}
+	}
 
-        /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
-                printk("tpci: Unsuccessful copy_to_user of tif\n");
-                rc = -EFAULT;
-        }
+	/* copy tif structure into l so that can be used by user program */
+	if (copy_to_user((void *)l, &tif, sizeof(tif))) {
+		printk("tpci: Unsuccessful copy_to_user of tif\n");
+		rc = -EFAULT;
+	}
 
-        /*
-         * free inparms and outparms
-         */
-        if (inparms) {
-                kfree(inparms);
-        }
-        if (outparms) {
-                kfree(outparms);
-        }
+	/*
+	 * free inparms and outparms
+	 */
+	if (inparms) {
+		kfree(inparms);
+	}
+	if (outparms) {
+		kfree(outparms);
+	}
 
 	return rc;
 }
@@ -246,9 +285,8 @@
  *  Function and structure needed by agp_bridge.
  */
 
-static struct aper_size_info_fixed test_core_agp_sizes[] =
-{
-	{ 0, 0, 0 },
+static struct aper_size_info_fixed test_core_agp_sizes[] = {
+	{0, 0, 0},
 };
 
 static int test_fetch_size(void)
@@ -274,32 +312,33 @@
 static void test_tlbflush(struct agp_memory *temp)
 {
 	printk("<1> tagp : Enter test tlbflush\n");
-	return ;
+	return;
 }
+
 /*
  *  structure used by agp_bridge
  */
 struct agp_bridge_driver test_driver = {
-	.owner			= THIS_MODULE,
-	.aperture_sizes		= test_core_agp_sizes,
-	.size_type		= U8_APER_SIZE,
-	.num_aperture_sizes	= 7,
-	.configure		= test_configure,
-	.fetch_size		= test_fetch_size,
-	.cleanup		= test_cleanup,
-	.tlb_flush		= test_tlbflush,
-	.mask_memory		= agp_generic_mask_memory,
-	.masks			= NULL,
-	.agp_enable		= agp_generic_enable,
-	.cache_flush		= global_cache_flush,
-	.create_gatt_table	= agp_generic_create_gatt_table,
-	.free_gatt_table	= agp_generic_free_gatt_table,
-	.insert_memory		= agp_generic_insert_memory,
-	.remove_memory		= agp_generic_remove_memory,
-	.alloc_by_type		= agp_generic_alloc_by_type,
-	.free_by_type		= agp_generic_free_by_type,
-	.agp_alloc_page		= agp_generic_alloc_page,
-	.agp_destroy_page	= agp_generic_destroy_page,
+	.owner = THIS_MODULE,
+	.aperture_sizes = test_core_agp_sizes,
+	.size_type = U8_APER_SIZE,
+	.num_aperture_sizes = 7,
+	.configure = test_configure,
+	.fetch_size = test_fetch_size,
+	.cleanup = test_cleanup,
+	.tlb_flush = test_tlbflush,
+	.mask_memory = agp_generic_mask_memory,
+	.masks = NULL,
+	.agp_enable = agp_generic_enable,
+	.cache_flush = global_cache_flush,
+	.create_gatt_table = agp_generic_create_gatt_table,
+	.free_gatt_table = agp_generic_free_gatt_table,
+	.insert_memory = agp_generic_insert_memory,
+	.remove_memory = agp_generic_remove_memory,
+	.alloc_by_type = agp_generic_alloc_by_type,
+	.free_by_type = agp_generic_free_by_type,
+	.agp_alloc_page = agp_generic_alloc_page,
+	.agp_destroy_page = agp_generic_destroy_page,
 };
 
 /*
@@ -333,15 +372,16 @@
 
 static int test_agp_alloc_bridge(void)
 {
-//	struct agp_bridge_data *tmp_bridge;
+//      struct agp_bridge_data *tmp_bridge;
 	tmp_bridge = agp_alloc_bridge();
-//	agp_put_bridge (tmp_bridge);
-//	tmp_bridge = NULL;
+//      agp_put_bridge (tmp_bridge);
+//      tmp_bridge = NULL;
 	return 0;
 }
+
 static int test_agp_put_bridge(void)
 {
-	agp_put_bridge (tmp_bridge);
+	agp_put_bridge(tmp_bridge);
 	tmp_bridge = NULL;
 	return 0;
 }
@@ -350,23 +390,22 @@
 {
 	struct agp_memory *tmp_agp_memory = NULL;
 	/* int scratch_pages */
-	if (agp_bridge->scratch_page > 0)
-	{
-		printk("<1> tagp : agp_bridge->scratch_page : %ld\n",agp_bridge->scratch_page);
+	if (agp_bridge->scratch_page > 0) {
+		printk("<1> tagp : agp_bridge->scratch_page : %ld\n",
+		       agp_bridge->scratch_page);
 		tmp_agp_memory = agp_create_memory(agp_bridge->scratch_page);
-	}
-	else
-	{
-		printk("<1> tagp : agp_bridge->scratch_page : %ld\n",agp_bridge->scratch_page);
+	} else {
+		printk("<1> tagp : agp_bridge->scratch_page : %ld\n",
+		       agp_bridge->scratch_page);
 		tmp_agp_memory = agp_create_memory(64);
 	}
-	if (tmp_agp_memory != NULL)
-	{
+	if (tmp_agp_memory != NULL) {
 		agp_free_memory(tmp_agp_memory);
 		return 0;
 	}
 	return 1;
 }
+
 /*
 static int test_agp_free_memory(void)
 {
@@ -381,24 +420,25 @@
 static int test_agp_num_entries(void)
 {
 	int ret = agp_num_entries();
-	printk("<1> tagp : agp_num_entries return %d\n",ret);
+	printk("<1> tagp : agp_num_entries return %d\n", ret);
 	return 0;
 }
+
 ////////////////////////////////////////////////////////////////////////////
 static int test_agp_copy_info(void)
 {
 	struct agp_kern_info *info;
-	int ret ;
+	int ret;
 
-	info  = (struct agp_kern_info *) kmalloc(sizeof(struct agp_kern_info),GFP_KERNEL);
-	if (!info)
-	{
+	info =
+	    (struct agp_kern_info *)kmalloc(sizeof(struct agp_kern_info),
+					    GFP_KERNEL);
+	if (!info) {
 		printk("<1> tagp : can not alloc spece\n");
 		return 1;
 	}
 	ret = agp_copy_info(info);
-	if (ret)
-	{
+	if (ret) {
 		printk("<1> tagp : agp_copy_info failed\n");
 		return 1;
 	}
@@ -406,6 +446,7 @@
 
 	return 0;
 }
+
 /*
 static int test_agp_allocate_memory(void)
 {
@@ -480,17 +521,14 @@
 		tmp_agp_memory = agp_create_memory(agp_bridge->scratch_page);
 	else
 		tmp_agp_memory = agp_create_memory(64);
-	if (tmp_agp_memory != NULL)
-	{
-		if (agp_generic_insert_memory(tmp_agp_memory,16,0))
-		{
+	if (tmp_agp_memory != NULL) {
+		if (agp_generic_insert_memory(tmp_agp_memory, 16, 0)) {
 			printk("<1> tagp : agp_generic_insert_memory failed\n");
 			agp_free_memory(tmp_agp_memory);
 			return 1;
-		}
-		else
-		{
-			printk("<1> tagp : agp_generic_insert_memory success\n");
+		} else {
+			printk
+			    ("<1> tagp : agp_generic_insert_memory success\n");
 			agp_generic_remove_memory(tmp_agp_memory, 16, 0);
 			agp_free_memory(tmp_agp_memory);
 		}
@@ -501,14 +539,14 @@
 static int test_agp_generic_alloc_by_type(void)
 {
 	/* size_t page_count, int type */
-	agp_generic_alloc_by_type(0,0);
+	agp_generic_alloc_by_type(0, 0);
 	return 0;
 }
 
 static int test_agp_generic_alloc_page(void)
 {
 	printk("<1> tagp : Enter test_agp_generic_alloc_page\n");
-	void * ppage = agp_generic_alloc_page();
+	void *ppage = agp_generic_alloc_page();
 	if (ppage != NULL)
 		agp_generic_destroy_page(ppage);
 	return 0;
@@ -532,34 +570,31 @@
 {
 	printk("<1> tagp : Enter test_agp_generic_mask_memory\n");
 	unsigned long temp;
-	temp = agp_generic_mask_memory(1000,agp_bridge->type);
+	temp = agp_generic_mask_memory(1000, agp_bridge->type);
 	return 0;
 }
 
 static int test_pci_find_device()
 {
-	struct pci_dev *pdev;// = (struct pci_dev *)kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
+	struct pci_dev *pdev;	// = (struct pci_dev *)kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
 	struct agp_bridge_data *bridge = NULL;
 
-	pdev = pci_find_device (PCI_VENDOR_ID_ATI, PCI_ANY_ID, NULL);
+	pdev = pci_find_device(PCI_VENDOR_ID_ATI, PCI_ANY_ID, NULL);
 
-	if (pdev)
-	{
+	if (pdev) {
 		printk("<1> tagp : pci find device success\n");
 
 		u8 cap_ptr;
 
 		cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
-		if (!cap_ptr)
-		{
+		if (!cap_ptr) {
 			printk("<1> tagp : pci find capability Failed\n");
 			return -ENODEV;
 		}
 
 		printk("<1> tagp : pci find capability success \n");
 		bridge = agp_alloc_bridge();
-		if (!bridge)
-		{
+		if (!bridge) {
 			printk("<1> tagp : agp alloc bridge Failed\n");
 			return -ENOMEM;
 		}
@@ -570,8 +605,8 @@
 
 		/* Fill in the mode register */
 		pci_read_config_dword(pdev,
-				bridge->capndx+PCI_AGP_STATUS,
-				&bridge->mode);
+				      bridge->capndx + PCI_AGP_STATUS,
+				      &bridge->mode);
 		printk("<1> tagp : agp read config dword  success\n");
 		pci_set_drvdata(pdev, bridge);
 		printk("<1> tagp : agp set drvdata  success\n");
@@ -582,7 +617,7 @@
 }
 
 static int __init agp_test_probe(struct pci_dev *pdev,
-				  const struct pci_device_id *ent)
+				 const struct pci_device_id *ent)
 {
 
 	printk("<1> tagp :Enter agp test probe\n");
@@ -601,23 +636,23 @@
 
 static struct pci_device_id agp_test_pci_table[] __initdata = {
 	{
-	.class		= (PCI_CLASS_BRIDGE_HOST << 8),
-	.class_mask	= ~0,
-	.vendor		= PCI_ANY_ID,//VENDOR_ID_ATI,
-	.device		= PCI_ANY_ID,
-	.subvendor	= PCI_ANY_ID,
-	.subdevice	= PCI_ANY_ID,
-	},
-	{ }
+	 .class = (PCI_CLASS_BRIDGE_HOST << 8),
+	 .class_mask = ~0,
+	 .vendor = PCI_ANY_ID,	//VENDOR_ID_ATI,
+	 .device = PCI_ANY_ID,
+	 .subvendor = PCI_ANY_ID,
+	 .subdevice = PCI_ANY_ID,
+	 },
+	{}
 };
 
 MODULE_DEVICE_TABLE(pci, agp_test_pci_table);
 
 static struct pci_driver agp_test_pci_driver = {
-	.name		= "agp_test",
-	.id_table	= agp_test_pci_table,
-	.probe		= agp_test_probe,
-	.remove		= agp_test_remove,
+	.name = "agp_test",
+	.id_table = agp_test_pci_table,
+	.probe = agp_test_probe,
+	.remove = agp_test_remove,
 };
 
 /*
@@ -626,20 +661,21 @@
  *      as a char device, and perform any necessary
  *      initialization for pci devices
  */
-static int __init tagp_init_module(void) {
+static int __init tagp_init_module(void)
+{
 	int rc;
 
-//	SET_MODULE_OWNER(&tagp_fops);
+//      SET_MODULE_OWNER(&tagp_fops);
 	tagp_fops.owner = THIS_MODULE;
 
 	rc = register_chrdev(Major, DEVICE_NAME, &tagp_fops);
-        if (rc < 0) {
-                printk("tagp: Failed to register device.\n");
-                return rc;
-        }
+	if (rc < 0) {
+		printk("tagp: Failed to register device.\n");
+		return rc;
+	}
 
-        if (Major == 0)
-                Major = rc;
+	if (Major == 0)
+		Major = rc;
 
 	rc = pci_module_init(&agp_test_pci_driver);
 
@@ -651,7 +687,7 @@
 	printk("tagp: PCI module init success.\n");
 	printk("tagp: Registration success.\n");
 
-      return 0;
+	return 0;
 }
 
 /*
@@ -659,15 +695,16 @@
  *      unregister the device and any necessary
  *      operations to close devices
  */
-static void __exit tagp_exit_module(void) {
-        int rc;
+static void __exit tagp_exit_module(void)
+{
+	int rc;
 
-	/* free any pointers still allocated, using kfree*/
+	/* free any pointers still allocated, using kfree */
 	rc = unregister_chrdev(Major, DEVICE_NAME);
-        if (rc < 0)
-                printk("tagp: unregister failed\n");
-        else
-                printk("tagp: unregister success\n");
+	if (rc < 0)
+		printk("tagp: unregister failed\n");
+	else
+		printk("tagp: unregister success\n");
 
 	pci_unregister_driver(&agp_test_pci_driver);
 }
@@ -676,4 +713,4 @@
 loaded and that exit is run when it is removed */
 
 module_init(tagp_init_module)
-module_exit(tagp_exit_module)
+    module_exit(tagp_exit_module)
diff --git a/testcases/kernel/device-drivers/agp/user_space/tagp_ki.c b/testcases/kernel/device-drivers/agp/user_space/tagp_ki.c
index a666675..c355377 100644
--- a/testcases/kernel/device-drivers/agp/user_space/tagp_ki.c
+++ b/testcases/kernel/device-drivers/agp/user_space/tagp_ki.c
@@ -42,39 +42,38 @@
 #include <sys/ioctl.h>
 #include "../kernel_space/tagp.h"
 
-int ki_generic(int fd, int flag) {
-        int                     rc;
-        tagp_interface_t        tif;
+int ki_generic(int fd, int flag)
+{
+	int rc;
+	tagp_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data = 0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for flag
-         */
-        rc = ioctl(fd, flag, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc) {
-                printf("Specific errorr: ");
-                return tif.out_rc;
-        }
+	/*
+	 * ioctl call for flag
+	 */
+	rc = ioctl(fd, flag, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc) {
+		printf("Specific errorr: ");
+		return tif.out_rc;
+	}
 
-        return rc;
+	return rc;
 }
 
 #if 0
-An example of using in_data to pass in a structure:
-
-ki_write_t      wif;
+An example of using in_data to pass in a structure:ki_write_t wif;
 tagp_interface_t tif;
 
 //fill out wif structure
@@ -82,29 +81,27 @@
 /*
  * build interface structure
  */
-tif.in_len = sizeof (ki_write_t);
-tif.in_data = (caddr_t) &wif;
+tif.in_len = sizeof(ki_write_t);
+tif.in_data = (caddr_t) & wif;
 tif.out_len = 0;
 tif.out_data = 0;
 tif.out_rc = 0;
 
 //make ioctl call
 
-An example of using out_data to get back a structure:
-
-ki_read_t       rif;
+An example of using out_data to get back a structure:ki_read_t rif;
 tagp_interface_t tif;
 
 //fill out rif structure
 rif.len = p_test->data[0];
 rif.handle = open_handle;
-rif.data = (caddr_t)p_test->data[1];
+rif.data = (caddr_t) p_test->data[1];
 
 /*
  * build interface structure
  */
-tif.in_len = sizeof (ki_read_t);
-tif.in_data = (caddr_t) &rif;
+tif.in_len = sizeof(ki_read_t);
+tif.in_data = (caddr_t) & rif;
 tif.out_len = 0;
 tif.out_data = 0;
 tif.out_rc = 0;
diff --git a/testcases/kernel/device-drivers/agp/user_space/user_tagp.c b/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
index f0396a1..8d432b7 100644
--- a/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
+++ b/testcases/kernel/device-drivers/agp/user_space/user_tagp.c
@@ -42,84 +42,92 @@
 #include "user_tagp.h"
 #include "../kernel_space/tagp.h"
 
-static int tagp_fd = -1;		/* file descriptor */
+static int tagp_fd = -1;	/* file descriptor */
 
-int tagpopen() {
+int tagpopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TAGP_MAJOR, 0);
+	devt = makedev(TAGP_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tagp_fd = open(DEVICE_NAME, O_RDWR);
+	tagp_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tagp_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tagp_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tagp_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tagp_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tagpclose() {
+int tagpclose()
+{
 
 	if (tagp_fd != -1) {
-		close (tagp_fd);
+		close(tagp_fd);
 		tagp_fd = -1;
 	}
 
@@ -132,16 +140,17 @@
 	char read_buf[BUFFER_LEN];
 
 	if ((tagp_fd = open("/dev/agpgart", O_RDWR)) < 0) {
-                printf("Open /dev/agpgart failed \n");
+		printf("Open /dev/agpgart failed \n");
 		return -1;
-        }
+	}
 
 	close(tagp_fd);
 
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int rc;
 
 	if (agpgart_io_test())
@@ -156,7 +165,7 @@
 		exit(1);
 	}
 
-	/* make test calls for pci_find_device*/
+	/* make test calls for pci_find_device */
 	if (ki_generic(tagp_fd, TEST_PCI_FIND_DEV))
 		printf("Success: Expected failure for pci_find_dev test\n");
 	else
@@ -195,8 +204,8 @@
 	if (ki_generic(tagp_fd, TEST_FREE_MEMORY))
 		printf("Fail on agp_free_memory\n");
 	else
-		printf("Success on agp_free_memory\n");
-*/	///////////////////////////////////////////////////////////////////////
+			printf("Success on agp_free_memory\n");
+*////////////////////////////////////////////////////////////////////////
 	/* make test calls for agp_num_entries */
 	if (ki_generic(tagp_fd, TEST_NUM_ENTRIES))
 		printf("Fail on agp_num_entries\n");
@@ -210,10 +219,10 @@
 		printf("Success on agp_copy_info\n");
 
 	/* make test calls for agp_alloc_memory */
-//	if (ki_generic(tagp_fd, TEST_ALLOC_MEMORY_AND_BAND_UNBAND))
-//		printf("Fail on agp_alloc_memory_and_band_unband\n");
-//	else
-//		printf("Success on agp_alloc_memory_and_band_unband\n");
+//      if (ki_generic(tagp_fd, TEST_ALLOC_MEMORY_AND_BAND_UNBAND))
+//              printf("Fail on agp_alloc_memory_and_band_unband\n");
+//      else
+//              printf("Success on agp_alloc_memory_and_band_unband\n");
 
 	/* make test calls for agp_get_version */
 	if (ki_generic(tagp_fd, TEST_GET_VERSION))
@@ -284,9 +293,9 @@
 	/* close the module */
 	rc = tagpclose();
 	if (rc) {
-                printf("Test AGP Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test AGP Driver may not be closed\n");
+		exit(1);
+	}
 
-      return 0;
+	return 0;
 }
diff --git a/testcases/kernel/device-drivers/base/tbase/tbase.c b/testcases/kernel/device-drivers/base/tbase/tbase.c
index 3514cde..ba12067 100644
--- a/testcases/kernel/device-drivers/base/tbase/tbase.c
+++ b/testcases/kernel/device-drivers/base/tbase/tbase.c
@@ -78,33 +78,35 @@
  * correct file descriptor
  */
 static struct file_operations tbase_fops = {
-        open : tbase_open,
-        release: tbase_close,
-        ioctl: tbase_ioctl,
+open:	tbase_open,
+release:tbase_close,
+ioctl:	tbase_ioctl,
 };
 
-static int tbase_open(struct inode *ino, struct file *f) {
-      return 0;
+static int tbase_open(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
-static int tbase_close(struct inode *ino, struct file *f) {
-      return 0;
+static int tbase_close(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
 /* my bus stuff */
 struct device_driver test_driver;
 struct device test_device;
 
-static int test_device_match (struct device *dev, struct device_driver *drv) {
+static int test_device_match(struct device *dev, struct device_driver *drv)
+{
 
 	printk("tbase: driver is %s\n", drv->name);
-//	printk("tbase: device is %s\n", dev->name);
+//      printk("tbase: device is %s\n", dev->name);
 
 	if (drv == &test_driver && dev == &test_device) {
 		printk("tbase: match\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tbase: no match\n");
 		return 0;
 	}
@@ -117,12 +119,14 @@
 };
 
 /* my driver stuff */
-int test_dev_probe(struct device *dev) {
+int test_dev_probe(struct device *dev)
+{
 	printk("tbase: Entered test_dev_probe\n");
 	return 0;
 }
 
-int test_dev_remove(struct device *dev) {
+int test_dev_remove(struct device *dev)
+{
 	printk("tbase: Entered test_dev_remove\n");
 	return 0;
 }
@@ -136,18 +140,20 @@
 
 /* my device stuff */
 struct device test_device = {
-//	.name = "TestDevice",
+//      .name = "TestDevice",
 	.bus = &test_bus_type,
 	.bus_id = "test_bus",
 };
 
 /* my class stuff */
-static void test_class_release(struct class_device *class_dev) {
+static void test_class_release(struct class_device *class_dev)
+{
 	printk("tbase: Entered test_class_release\n");
 }
 
 int test_class_hotplug(struct class_device *dev, char **envp,
-                           int num_envp, char *buffer, int buffer_size) {
+		       int num_envp, char *buffer, int buffer_size)
+{
 	printk("tbase: Entered test_class_hotplug\n");
 	return 0;
 }
@@ -166,12 +172,14 @@
 };
 
 /* my class interface stuff */
-int test_intf_add(struct class_device *class_dev) {
+int test_intf_add(struct class_device *class_dev)
+{
 	printk("tbase: Entered test_intf_add for the test class_interface\n");
 	return 0;
 }
 
-void test_intf_rem(struct class_device *class_dev) {
+void test_intf_rem(struct class_device *class_dev)
+{
 	printk("tbase: Entered test_intf_rem for the test class interface\n");
 }
 
@@ -182,7 +190,8 @@
 };
 
 /* my sys_device stuff */
-int test_resume(struct sys_device *dev) {
+int test_resume(struct sys_device *dev)
+{
 	printk("tbase: Entered test resume for sys device\n");
 	return 0;
 }
@@ -199,7 +208,8 @@
 
 /* my attribute stuff */
 static inline ssize_t
-store_new_id(struct device_driver * driver, const char * buf, size_t count) {
+store_new_id(struct device_driver *driver, const char *buf, size_t count)
+{
 	printk("tbase: Entered store new id\n");
 	return count;
 }
@@ -226,11 +236,12 @@
  *      descriptor has been attained
  */
 static int tbase_ioctl(struct inode *ino, struct file *f,
-                        unsigned int cmd, unsigned long l) {
-	int 			rc;
-	tmod_interface_t	tif;
-	caddr_t			*inparms;
-	caddr_t			*outparms;
+		       unsigned int cmd, unsigned long l)
+{
+	int rc;
+	tmod_interface_t tif;
+	caddr_t *inparms;
+	caddr_t *outparms;
 
 	printk("Enter tbase_ioctl\n");
 
@@ -247,31 +258,32 @@
 	 *
 	 */
 	if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
-                /* Bad address */
-                return(-EFAULT);
-        }
+		/* Bad address */
+		return (-EFAULT);
+	}
 
 	/*
-         * Setup inparms and outparms as needed
-         */
-        if (tif.in_len > 0) {
-                inparms = (caddr_t *)kmalloc(tif.in_len, GFP_KERNEL);                if (!inparms) {
-                        return(-ENOMEM);
-                }
+	 * Setup inparms and outparms as needed
+	 */
+	if (tif.in_len > 0) {
+		inparms = (caddr_t *) kmalloc(tif.in_len, GFP_KERNEL);
+		if (!inparms) {
+			return (-ENOMEM);
+		}
 
-                rc = copy_from_user(inparms, tif.in_data, tif.in_len);
-                if (rc) {
-                        kfree(inparms);
-                        return(-EFAULT);
-                }
-        }
-        if (tif.out_len > 0) {
-                outparms = (caddr_t *)kmalloc(tif.out_len, GFP_KERNEL);
-                if (!outparms) {
-                        kfree(inparms);
-                        return(-ENOMEM);
-                }
-        }
+		rc = copy_from_user(inparms, tif.in_data, tif.in_len);
+		if (rc) {
+			kfree(inparms);
+			return (-EFAULT);
+		}
+	}
+	if (tif.out_len > 0) {
+		outparms = (caddr_t *) kmalloc(tif.out_len, GFP_KERNEL);
+		if (!outparms) {
+			kfree(inparms);
+			return (-ENOMEM);
+		}
+	}
 
 	/*
 	 * Use a switch statement to determine which function
@@ -280,32 +292,74 @@
 	 * needed
 	 *
 	 */
- 	switch(cmd) {
-		case REG_DEVICE:	rc = test_device_register(); break;
-		case UNREG_DEVICE:	rc = test_device_unregister(); break;
-		case BUS_ADD:		rc = test_bus_add(); break;
-		case GET_DRV:		rc = test_get_drv(); break;
-		case PUT_DRV:		rc = test_put_drv(); break;
-		case REG_FIRM:		rc = test_reg_firm(); break;
-		case CREATE_FILE:	rc = test_create_file(); break;
-		case DEV_SUSPEND:	rc = test_dev_suspend(); break;
-		case DEV_FILE:		rc = test_dev_file(); break;
-		case BUS_RESCAN:	rc = test_bus_rescan(); break;
-		case BUS_FILE:		rc = test_bus_file(); break;
-		case CLASS_REG:		rc = test_class_reg(); break;
-		case CLASS_UNREG:	class_unregister(&test_class); break;
-		case CLASS_GET:		rc = test_class_get(); break;
-		case CLASS_FILE:	rc = test_class_file(); break;
-		case CLASSDEV_REG:	rc = test_classdev_reg(); break;
-		case CLASSINT_REG:	rc = test_classint_reg(); break;
-		case SYSDEV_CLS_REG:  	rc = test_sysdev_cls_reg(); break;
-		case SYSDEV_CLS_UNREG:	sysdev_class_unregister(&test_sysclass); break;
-		case SYSDEV_REG:	rc = test_sysdev_reg(); break;
-		case SYSDEV_UNREG:	sys_device_unregister(&test_sys_device); break;
-		default:
-			printk("tbase: Mismatching ioctl command\n");
-                        break;
-        }
+	switch (cmd) {
+	case REG_DEVICE:
+		rc = test_device_register();
+		break;
+	case UNREG_DEVICE:
+		rc = test_device_unregister();
+		break;
+	case BUS_ADD:
+		rc = test_bus_add();
+		break;
+	case GET_DRV:
+		rc = test_get_drv();
+		break;
+	case PUT_DRV:
+		rc = test_put_drv();
+		break;
+	case REG_FIRM:
+		rc = test_reg_firm();
+		break;
+	case CREATE_FILE:
+		rc = test_create_file();
+		break;
+	case DEV_SUSPEND:
+		rc = test_dev_suspend();
+		break;
+	case DEV_FILE:
+		rc = test_dev_file();
+		break;
+	case BUS_RESCAN:
+		rc = test_bus_rescan();
+		break;
+	case BUS_FILE:
+		rc = test_bus_file();
+		break;
+	case CLASS_REG:
+		rc = test_class_reg();
+		break;
+	case CLASS_UNREG:
+		class_unregister(&test_class);
+		break;
+	case CLASS_GET:
+		rc = test_class_get();
+		break;
+	case CLASS_FILE:
+		rc = test_class_file();
+		break;
+	case CLASSDEV_REG:
+		rc = test_classdev_reg();
+		break;
+	case CLASSINT_REG:
+		rc = test_classint_reg();
+		break;
+	case SYSDEV_CLS_REG:
+		rc = test_sysdev_cls_reg();
+		break;
+	case SYSDEV_CLS_UNREG:
+		sysdev_class_unregister(&test_sysclass);
+		break;
+	case SYSDEV_REG:
+		rc = test_sysdev_reg();
+		break;
+	case SYSDEV_UNREG:
+		sys_device_unregister(&test_sys_device);
+		break;
+	default:
+		printk("tbase: Mismatching ioctl command\n");
+		break;
+	}
 
 	/*
 	 * copy in the test return code, the reason we
@@ -322,28 +376,29 @@
 	 */
 
 	/* if outparms then copy outparms into tif.out_data */
-        if (outparms) {
-                if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
-                        printk("tbase: Unsuccessful copy_to_user of outparms\n");
-                        rc = -EFAULT;
-                }
-        }
+	if (outparms) {
+		if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
+			printk
+			    ("tbase: Unsuccessful copy_to_user of outparms\n");
+			rc = -EFAULT;
+		}
+	}
 
-        /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
-                printk("tbase: Unsuccessful copy_to_user of tif\n");
-                rc = -EFAULT;
-        }
+	/* copy tif structure into l so that can be used by user program */
+	if (copy_to_user((void *)l, &tif, sizeof(tif))) {
+		printk("tbase: Unsuccessful copy_to_user of tif\n");
+		rc = -EFAULT;
+	}
 
-        /*
-         * free inparms and outparms
-         */
-        if (inparms) {
-                kfree(inparms);
-        }
-        if (outparms) {
-                kfree(outparms);
-        }
+	/*
+	 * free inparms and outparms
+	 */
+	if (inparms) {
+		kfree(inparms);
+	}
+	if (outparms) {
+		kfree(outparms);
+	}
 
 	return rc;
 }
@@ -354,7 +409,8 @@
  *	the device pointer that we found in a previos
  *	function, returns an error code
  */
-static int test_device_register() {
+static int test_device_register()
+{
 	struct device *dev = ltp_mod.dev;
 	struct device_driver *drv = dev->driver;
 
@@ -362,19 +418,17 @@
 	if (device_register(dev)) {
 		printk("tbase: Device not registered\n");
 		return 1;
-	}
-	else
+	} else
 		printk("tbase: Device registered\n");
 
 	driver_unregister(drv);
 
 	/* check if driver_register returns an error */
 	if (driver_register(drv)) {
-                printk("tbase: Driver not registered\n");
-                return 1;
-        }
-        else
-                printk("tbase: Driver registered\n");
+		printk("tbase: Driver not registered\n");
+		return 1;
+	} else
+		printk("tbase: Driver registered\n");
 
 	return 0;
 
@@ -386,7 +440,8 @@
  * 	will in turn make calls that will decrememnt
  * 	the reference count and clean up as required
  */
-static int test_device_unregister() {
+static int test_device_unregister()
+{
 	struct device *dev = ltp_mod.dev;
 
 	/* increment reference count */
@@ -408,16 +463,16 @@
  *	in turn add the device that is passed in
  *	to the bus
  */
-static int test_bus_add() {
-        /* check if device register returns an error */
-        if (bus_add_device(&test_device)) {
-                printk("tbase: Device not added to bus\n");
-                return 1;
-        }
-        else {
-                printk("tbase: Device added to bus\n");
-              return 0;
-        }
+static int test_bus_add()
+{
+	/* check if device register returns an error */
+	if (bus_add_device(&test_device)) {
+		printk("tbase: Device not added to bus\n");
+		return 1;
+	} else {
+		printk("tbase: Device added to bus\n");
+		return 0;
+	}
 }
 
 /*
@@ -427,10 +482,10 @@
  *	and increase the reference count to that
  *	kobject
  */
-static int test_get_drv() {
+static int test_get_drv()
+{
 	int a, rc;
-	struct device_driver    *drv = &test_driver,
-				*tmp = NULL;
+	struct device_driver *drv = &test_driver, *tmp = NULL;
 
 	/* get reference count before test call */
 	a = atomic_read(&drv->kobj.refcount);
@@ -439,18 +494,16 @@
 	if ((tmp = get_driver(drv))) {
 		rc = 0;
 		printk("tbase: get driver returned driver\n");
-	}
-	else {
+	} else {
 		rc = 1;
 		printk("tbase: get driver failed to return driver\n");
 	}
 
 	/* check reference count */
-	if ((a == (atomic_read(&drv->kobj.refcount) - 1) )) {
+	if ((a == (atomic_read(&drv->kobj.refcount) - 1))) {
 		rc = 0;
 		printk("tbase: correctly set ref count get driver\n");
-	}
-	else {
+	} else {
 		rc = 1;
 		printk("tbase: incorrect ref count get driver\n");
 	}
@@ -464,7 +517,8 @@
  *	a pointer to the class passed in and increase
  *	the reference count to that kobject
  */
-static int test_class_get() {
+static int test_class_get()
+{
 	int rc;
 	struct class *tmp = NULL;
 
@@ -473,14 +527,13 @@
 	if (tmp == &test_class) {
 		printk("tbase: Success get class\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("tbase: Failure get class\n");
 		rc = 1;
 	}
 
 	class_put(&test_class);
- 	return rc;
+	return rc;
 }
 
 /*
@@ -489,27 +542,27 @@
  *      decrease the reference count to the kobject
  *      pointer in the driver structure
  */
-static int test_put_drv() {
-        int a, rc;
-        struct device_driver *drv = &test_driver;
+static int test_put_drv()
+{
+	int a, rc;
+	struct device_driver *drv = &test_driver;
 
-        /* get reference count before test call */
-        a = atomic_read(&drv->kobj.refcount);
+	/* get reference count before test call */
+	a = atomic_read(&drv->kobj.refcount);
 
 	/* make test call */
 	put_driver(drv);
 
-        /* check reference count */
-        if ((a == (atomic_read(&drv->kobj.refcount) + 1) )) {
-                rc = 0;
-                printk("tbase: correctly set ref count put driver\n");
-        }
-        else {
-                rc = 1;
-                printk("tbase: incorrect ref count put driver\n");
-        }
+	/* check reference count */
+	if ((a == (atomic_read(&drv->kobj.refcount) + 1))) {
+		rc = 0;
+		printk("tbase: correctly set ref count put driver\n");
+	} else {
+		rc = 1;
+		printk("tbase: incorrect ref count put driver\n");
+	}
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -521,7 +574,8 @@
  *	to pass in a subsystem pointer, returns an
  *	error code
  */
-static int test_reg_firm() {
+static int test_reg_firm()
+{
 	struct subsystem *subsys = NULL;
 
 	/* check pointer exists */
@@ -537,8 +591,7 @@
 	if (firmware_register(subsys)) {
 		printk("tbase: failed register firmware\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tbase: regsitered firmware\n");
 		return 0;
 	}
@@ -551,14 +604,14 @@
  *	driver and if that call is successful then
  *	make a call to remove the file
  */
-static int test_create_file() {
+static int test_create_file()
+{
 	struct device_driver *drv = &test_driver;
 
 	if (driver_create_file(drv, &driver_attr_new_id)) {
 		printk("tbase: failed create sysfs file\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tbase: created sysfs file\n");
 		driver_remove_file(drv, &driver_attr_new_id);
 		return 0;
@@ -572,7 +625,8 @@
  *	if that call is successful then make
  *	a call to device_resume
  */
-static int test_dev_suspend() {
+static int test_dev_suspend()
+{
 	int error = 0;
 
 	error = device_suspend(SUSPEND_SAVE_STATE);
@@ -584,12 +638,12 @@
 	}
 
 	error = device_suspend(SUSPEND_DISABLE);
-        if (error)
-                printk("tbase: Failed on device suspend call\n");
-        else {
-                printk("tbase: Successful on device suspend call\n");
-                device_resume();
-        }
+	if (error)
+		printk("tbase: Failed on device suspend call\n");
+	else {
+		printk("tbase: Successful on device suspend call\n");
+		device_resume();
+	}
 
 	return error;
 
@@ -601,18 +655,18 @@
  *	and if that call is successful make
  *	another call to device_remove_file
  */
-static int test_dev_file() {
-        struct device *dev = &test_device;
+static int test_dev_file()
+{
+	struct device *dev = &test_device;
 
-        if (device_create_file(dev, &dev_attr_test_id)) {
-                printk("tbase: failed to create dev sysfs file\n");
-                return 1;
-        }
-        else {
-                printk("tbase: created dev sysfs file\n");
-                device_remove_file(dev, &dev_attr_test_id);
-              return 0;
-        }
+	if (device_create_file(dev, &dev_attr_test_id)) {
+		printk("tbase: failed to create dev sysfs file\n");
+		return 1;
+	} else {
+		printk("tbase: created dev sysfs file\n");
+		device_remove_file(dev, &dev_attr_test_id);
+		return 0;
+	}
 
 }
 
@@ -624,7 +678,8 @@
  *	the number of matches made, check that the
  *	value returned is not negative
  */
-static int test_bus_rescan() {
+static int test_bus_rescan()
+{
 	int count = 0;
 
 	count = bus_rescan_devices(&test_bus_type);
@@ -646,18 +701,18 @@
  *      and if that call is successful make
  *      another call to bus_remove_file
  */
-static int test_bus_file() {
-        struct bus_type *bus = &test_bus_type;
+static int test_bus_file()
+{
+	struct bus_type *bus = &test_bus_type;
 
-        if (bus_create_file(bus, &bus_attr_test_id)) {
-                printk("tbase: failed to create bus sysfs file\n");
-                return 1;
-        }
-        else {
-                printk("tbase: created bus sysfs file\n");
-                bus_remove_file(bus, &bus_attr_test_id);
-              return 0;
-        }
+	if (bus_create_file(bus, &bus_attr_test_id)) {
+		printk("tbase: failed to create bus sysfs file\n");
+		return 1;
+	} else {
+		printk("tbase: created bus sysfs file\n");
+		bus_remove_file(bus, &bus_attr_test_id);
+		return 0;
+	}
 
 }
 
@@ -667,18 +722,18 @@
  *      and if that call is successful make
  *      another call to class_remove_file
  */
-static int test_class_file() {
-        struct class * cls = &test_class;
+static int test_class_file()
+{
+	struct class *cls = &test_class;
 
-        if (class_create_file(cls, &class_attr_test_id)) {
-                printk("tbase: failed to create class sysfs file\n");
-                return 1;
-        }
-        else {
-                printk("tbase: created class sysfs file\n");
-                class_remove_file(cls, &class_attr_test_id);
-              return 0;
-        }
+	if (class_create_file(cls, &class_attr_test_id)) {
+		printk("tbase: failed to create class sysfs file\n");
+		return 1;
+	} else {
+		printk("tbase: created class sysfs file\n");
+		class_remove_file(cls, &class_attr_test_id);
+		return 0;
+	}
 
 }
 
@@ -689,7 +744,8 @@
  *	in this module, if that call is
  *	successful then call unregister
  */
-static int test_class_reg() {
+static int test_class_reg()
+{
 	int error;
 
 	error = class_register(&test_class);
@@ -707,24 +763,26 @@
  *	and if that returns successful then
  *	make call to class_device_unregister
  */
-static int test_classdev_reg() {
+static int test_classdev_reg()
+{
 	int rc = 0;
 
 	if (class_device_register(&test_class_dev)) {
 		printk("tbase: Failed to register class device\n");
 		rc = 1;
-	}
-	else {
+	} else {
 		printk("tbase: Registered class device\n");
 
 		/* make class device sysfs file */
-		if (class_device_create_file(&test_class_dev, &class_device_attr_test_id)) {
+		if (class_device_create_file
+		    (&test_class_dev, &class_device_attr_test_id)) {
 			rc = 1;
-			printk("tbase: Failed to create class device sysfs file\n");
-		}
-		else {
+			printk
+			    ("tbase: Failed to create class device sysfs file\n");
+		} else {
 			printk("tbase: Created class device sysfs file\n");
-			class_device_remove_file(&test_class_dev, &class_device_attr_test_id);
+			class_device_remove_file(&test_class_dev,
+						 &class_device_attr_test_id);
 		}
 
 		class_device_unregister(&test_class_dev);
@@ -739,13 +797,13 @@
  *	and if that returns successfule then
  *	make call to class_interface_unregister
  */
-static int test_classint_reg() {
+static int test_classint_reg()
+{
 
 	if (class_interface_register(&test_interface)) {
 		printk("tbase: Failed to register class interface\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tbase: Registered class interface\n");
 		class_interface_unregister(&test_interface);
 		return 0;
@@ -760,13 +818,13 @@
  *	as a sysdev_class with the system, check
  *	the return code
  */
-static int test_sysdev_cls_reg() {
+static int test_sysdev_cls_reg()
+{
 
 	if (sysdev_class_register(&test_sysclass)) {
 		printk("tbase: Failed to register sysdev class\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tbase: Registered sysdev class\n");
 		return 0;
 	}
@@ -780,16 +838,16 @@
  *      as a sys_device with the system, check
  *      the return code
  */
-static int test_sysdev_reg() {
+static int test_sysdev_reg()
+{
 
-        if (sys_device_register(&test_sys_device)) {
-                printk("tbase: Failed to register sysdev \n");
-                return 1;
-        }
-        else {
-                printk("tbase: Registered sysdev \n");
-              return 0;
-        }
+	if (sys_device_register(&test_sys_device)) {
+		printk("tbase: Failed to register sysdev \n");
+		return 1;
+	} else {
+		printk("tbase: Registered sysdev \n");
+		return 0;
+	}
 
 }
 
@@ -799,7 +857,8 @@
  *      as a char device, and perform any necessary
  *      initialization
  */
-static int tbase_init_module(void) {
+static int tbase_init_module(void)
+{
 	int rc;
 
 	bus_register(&test_bus_type);
@@ -808,21 +867,21 @@
 
 	tbase_fops.owner = THIS_MODULE;
 
-    printk("tbase: *** Register device %s **\n", DEVICE_NAME);
+	printk("tbase: *** Register device %s **\n", DEVICE_NAME);
 
 	rc = register_chrdev(Major, DEVICE_NAME, &tbase_fops);
-        if (rc < 0) {
-                printk("tbase: Failed to register device.\n");
-                return rc;
-        }
+	if (rc < 0) {
+		printk("tbase: Failed to register device.\n");
+		return rc;
+	}
 
-        if (Major == 0)
-                Major = rc;
+	if (Major == 0)
+		Major = rc;
 
 	/* call any other init functions you might use here */
 
 	printk("tbase: Registration success.\n");
-      return 0;
+	return 0;
 }
 
 /*
@@ -830,20 +889,21 @@
  *      unregister the device and any necessary
  *      operations to close devices
  */
-static void tbase_exit_module(void) {
-        int rc;
+static void tbase_exit_module(void)
+{
+	int rc;
 
 	device_unregister(&test_device);
 	driver_unregister(&test_driver);
 	bus_unregister(&test_bus_type);
 
-	/* free any pointers still allocated, using kfree*/
+	/* free any pointers still allocated, using kfree */
 
 	rc = unregister_chrdev(Major, DEVICE_NAME);
-        if (rc < 0)
-                printk("tbase: unregister failed\n");
-        else
-                printk("tbase: unregister success\n");
+	if (rc < 0)
+		printk("tbase: unregister failed\n");
+	else
+		printk("tbase: unregister success\n");
 
 }
 
@@ -851,4 +911,4 @@
 loaded and that exit is run when it is removed */
 
 module_init(tbase_init_module)
-module_exit(tbase_exit_module)
+    module_exit(tbase_exit_module)
diff --git a/testcases/kernel/device-drivers/base/tbase/tbase.mod.c b/testcases/kernel/device-drivers/base/tbase/tbase.mod.c
index 6f247a1..b590026 100644
--- a/testcases/kernel/device-drivers/base/tbase/tbase.mod.c
+++ b/testcases/kernel/device-drivers/base/tbase/tbase.mod.c
@@ -24,6 +24,4 @@
 MODULE_INFO(vermagic, VERMAGIC_STRING);
 
 static const char __module_depends[]
-__attribute_used__
-__attribute__((section(".modinfo"))) =
-"depends=";
+ __attribute_used__ __attribute__ ((section(".modinfo"))) = "depends=";
diff --git a/testcases/kernel/device-drivers/base/user_base/tbase_ki.c b/testcases/kernel/device-drivers/base/user_base/tbase_ki.c
index 898e4d8..f9912b5 100644
--- a/testcases/kernel/device-drivers/base/user_base/tbase_ki.c
+++ b/testcases/kernel/device-drivers/base/user_base/tbase_ki.c
@@ -42,29 +42,30 @@
 #include <sys/ioctl.h>
 #include "../tbase/tbase.h"
 
-int ki_generic(int fd, int flag) {
-        int                     rc;
-        tmod_interface_t        tif;
+int ki_generic(int fd, int flag)
+{
+	int rc;
+	tmod_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data = 0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for flag
-         */
-        rc = ioctl(fd, flag, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc)
-                return tif.out_rc;
+	/*
+	 * ioctl call for flag
+	 */
+	rc = ioctl(fd, flag, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc)
+		return tif.out_rc;
 
-        return rc;
+	return rc;
 }
diff --git a/testcases/kernel/device-drivers/base/user_base/user_tbase.c b/testcases/kernel/device-drivers/base/user_base/user_tbase.c
index 9adf9d4..d05cdd1 100644
--- a/testcases/kernel/device-drivers/base/user_base/user_tbase.c
+++ b/testcases/kernel/device-drivers/base/user_base/user_tbase.c
@@ -42,215 +42,226 @@
 #include "user_tbase.h"
 #include "../tbase/tbase.h"
 
-static int tbase_fd = -1;		/* file descriptor */
+static int tbase_fd = -1;	/* file descriptor */
 
-int
-tbaseopen() {
+int tbaseopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TBASEMAJOR, 0);
+	devt = makedev(TBASEMAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir("/dev/tbase", (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir("/dev/tbase", (S_IFDIR | S_IRWXU |
+						  S_IRGRP | S_IXGRP |
+						  S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink("/dev/tbase");
-            if (!rc) {
-                rc = mkdir("/dev/tbase", (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink("/dev/tbase");
+			if (!rc) {
+				rc = mkdir("/dev/tbase", (S_IFDIR | S_IRWXU |
+							  S_IRGRP | S_IXGRP |
+							  S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat("/dev/tbase", &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod("/dev/tbase", (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat("/dev/tbase", &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod("/dev/tbase",
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink("/dev/tbase");
-            if (!rc) {
-                rc = mknod("/dev/tbase", (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink("/dev/tbase");
+			if (!rc) {
+				rc = mknod("/dev/tbase",
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tbase_fd = open("/dev/tbase", O_RDWR);
+	tbase_fd = open("/dev/tbase", O_RDWR);
 
-    if (tbase_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", "/dev/tbase",tbase_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tbase_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       "/dev/tbase", tbase_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tbaseclose() {
+int tbaseclose()
+{
 
 	if (tbase_fd != -1) {
-		close (tbase_fd);
+		close(tbase_fd);
 		tbase_fd = -1;
 	}
 
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int rc;
 
 	/* open the module */
 	rc = tbaseopen();
-        if (rc) {
-                printf("Test MOD Driver may not be loaded\n");
-                exit(1);
-        }
+	if (rc) {
+		printf("Test MOD Driver may not be loaded\n");
+		exit(1);
+	}
 
 	/* test bus rescan */
 	if (ki_generic(tbase_fd, BUS_RESCAN))
-                printf("Failed on bus rescan\n");
-        else
-                printf("Success on bus rescan\n");
+		printf("Failed on bus rescan\n");
+	else
+		printf("Success on bus rescan\n");
 
 	/* test get driver */
 	if (ki_generic(tbase_fd, GET_DRV))
-                printf("Failed on get driver\n");
-        else
-                printf("Success on get driver\n");
+		printf("Failed on get driver\n");
+	else
+		printf("Success on get driver\n");
 
 	/* test put driver */
 	if (ki_generic(tbase_fd, PUT_DRV))
-                printf("Failed on put driver\n");
-        else
-                printf("Success on put driver\n");
+		printf("Failed on put driver\n");
+	else
+		printf("Success on put driver\n");
 
 	/* test register firmware, should return not 0 */
 	if (ki_generic(tbase_fd, REG_FIRM))
-                printf("Failed on register firmware\n\tPossibly because parent nodes already set\n");
-        else
-                printf("Success on register firmware\n");
+		printf
+		    ("Failed on register firmware\n\tPossibly because parent nodes already set\n");
+	else
+		printf("Success on register firmware\n");
 
 	/* test create driver file sysfs */
-        if (ki_generic(tbase_fd, CREATE_FILE))
-                printf("Failed on creating driver file\n");
-        else
-                printf("Success on creating driver file\n");
+	if (ki_generic(tbase_fd, CREATE_FILE))
+		printf("Failed on creating driver file\n");
+	else
+		printf("Success on creating driver file\n");
 
 	/* test device suspend and resume */
 	if (ki_generic(tbase_fd, DEV_SUSPEND))
-                printf("Failed on suspending device\n");
-        else
-                printf("Success on suspending device\n");
+		printf("Failed on suspending device\n");
+	else
+		printf("Success on suspending device\n");
 
 	/* test device create file sysfs */
 	if (ki_generic(tbase_fd, DEV_FILE))
-                printf("Failed on creating device file\n");
-        else
-                printf("Success on creating device file\n");
+		printf("Failed on creating device file\n");
+	else
+		printf("Success on creating device file\n");
 
 	/* test bus create file sysfs */
-        if (ki_generic(tbase_fd, BUS_FILE))
-                printf("Failed on creating bus file\n");
-        else
-                printf("Success on creating bus file\n");
+	if (ki_generic(tbase_fd, BUS_FILE))
+		printf("Failed on creating bus file\n");
+	else
+		printf("Success on creating bus file\n");
 
 	/* test register class */
-        if (ki_generic(tbase_fd, CLASS_REG))
-                printf("Failed on registering class\n");
-        else
-                printf("Success on registering class\n");
+	if (ki_generic(tbase_fd, CLASS_REG))
+		printf("Failed on registering class\n");
+	else
+		printf("Success on registering class\n");
 
 	/* test get class */
 	if (ki_generic(tbase_fd, CLASS_GET))
-                printf("Failed on get class\n");
-        else
-                printf("Success on get class\n");
+		printf("Failed on get class\n");
+	else
+		printf("Success on get class\n");
 
 	/* test class create file sysfs */
 	if (ki_generic(tbase_fd, CLASS_FILE))
-                printf("Failed on creating class file\n");
-        else
-                printf("Success on creating class file\n");
+		printf("Failed on creating class file\n");
+	else
+		printf("Success on creating class file\n");
 
 	/* test unregistering class */
-        if (ki_generic(tbase_fd, CLASS_UNREG))
-                printf("Failed on unregistering class\n");
-        else
-                printf("Success on unregistering class\n");
+	if (ki_generic(tbase_fd, CLASS_UNREG))
+		printf("Failed on unregistering class\n");
+	else
+		printf("Success on unregistering class\n");
 
 	/* test register class device */
 	if (ki_generic(tbase_fd, CLASSDEV_REG))
-                printf("Failed on registering class device and creating sysfs file\n");
-        else
-                printf("Success on registering class device and creating sysfs file\n");
+		printf
+		    ("Failed on registering class device and creating sysfs file\n");
+	else
+		printf
+		    ("Success on registering class device and creating sysfs file\n");
 
 	/* test register class interface */
-        if (ki_generic(tbase_fd, CLASSINT_REG))
-                printf("Failed on registering class interface\n");
-        else
-                printf("Success on registering class interface\n");
+	if (ki_generic(tbase_fd, CLASSINT_REG))
+		printf("Failed on registering class interface\n");
+	else
+		printf("Success on registering class interface\n");
 
 	/* test register sysdev_class */
-        if (ki_generic(tbase_fd, SYSDEV_CLS_REG))
-                printf("Failed on registering sysdev_class\n");
-        else
-                printf("Success on registering sysdev_class\n");
+	if (ki_generic(tbase_fd, SYSDEV_CLS_REG))
+		printf("Failed on registering sysdev_class\n");
+	else
+		printf("Success on registering sysdev_class\n");
 
 	/* test register sysdev */
-        if (ki_generic(tbase_fd, SYSDEV_REG))
-                printf("Failed on registering sysdev\n");
-        else
-                printf("Success on registering sysdev\n");
+	if (ki_generic(tbase_fd, SYSDEV_REG))
+		printf("Failed on registering sysdev\n");
+	else
+		printf("Success on registering sysdev\n");
 
-        /* test unregister sysdev */
-        if (ki_generic(tbase_fd, SYSDEV_UNREG))
-                printf("Failed on unregistering sysdev\n");
-        else
-                printf("Success on unregistering sysdev\n");
+	/* test unregister sysdev */
+	if (ki_generic(tbase_fd, SYSDEV_UNREG))
+		printf("Failed on unregistering sysdev\n");
+	else
+		printf("Success on unregistering sysdev\n");
 
 	/* test unregister sysdev_class */
-        if (ki_generic(tbase_fd, SYSDEV_CLS_UNREG))
-                printf("Failed on unregistering sysdev_class\n");
-        else
-                printf("Success on unregistering sysdev_class\n");
+	if (ki_generic(tbase_fd, SYSDEV_CLS_UNREG))
+		printf("Failed on unregistering sysdev_class\n");
+	else
+		printf("Success on unregistering sysdev_class\n");
 
 	/* close the module */
 	rc = tbaseclose();
 	if (rc) {
-                printf("Test MOD Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test MOD Driver may not be closed\n");
+		exit(1);
+	}
 
-      return 0;
+	return 0;
 }
diff --git a/testcases/kernel/device-drivers/block/kernel_space/test_block.c b/testcases/kernel/device-drivers/block/kernel_space/test_block.c
index 0b031ea..3048e09 100644
--- a/testcases/kernel/device-drivers/block/kernel_space/test_block.c
+++ b/testcases/kernel/device-drivers/block/kernel_space/test_block.c
@@ -21,7 +21,8 @@
 
 static unsigned int __initdata tc;
 module_param_named(tc, tc, int, 0);
-MODULE_PARM_DESC(tc, "Test Case to run. Default is 0 which means that run all tests.");
+MODULE_PARM_DESC(tc,
+		 "Test Case to run. Default is 0 which means that run all tests.");
 
 MODULE_AUTHOR("Márton Németh <nm127@freemail.hu>");
 MODULE_DESCRIPTION("Test block drivers");
@@ -60,7 +61,8 @@
 	int major1;
 	int major2;
 
-	printk(KERN_INFO "Test Case 1: register_blkdev() with auto allocating major numbers (major=0)\n");
+	printk(KERN_INFO
+	       "Test Case 1: register_blkdev() with auto allocating major numbers (major=0)\n");
 
 	major1 = register_blkdev(0, BLK_DEV_NAME);
 	printk(KERN_DEBUG "major1 = %i\n", major1);
@@ -71,13 +73,17 @@
 	if (0 < major1) {
 		unregister_blkdev(major1, BLK_DEV_NAME);
 	} else {
-		printk(KERN_DEBUG "first call to register_blkdev() failed with error %i\n", major1);
+		printk(KERN_DEBUG
+		       "first call to register_blkdev() failed with error %i\n",
+		       major1);
 	}
 
 	if (0 < major2) {
 		unregister_blkdev(major2, BLK_DEV_NAME);
 	} else {
-		printk(KERN_DEBUG "second call to register_blkdev() failed with error %i\n", major2);
+		printk(KERN_DEBUG
+		       "second call to register_blkdev() failed with error %i\n",
+		       major2);
 	}
 
 	printk(KERN_INFO "Test Case 1: UNRESLOVED\n");
@@ -85,29 +91,34 @@
 
 static void tc02(void)
 {
-	int major[MAX_MAJOR+1];
+	int major[MAX_MAJOR + 1];
 	int i;
 
 	/* Try to allocate block devices until all major number are used. After this
 	 * register_blkdev() should return -EBUSY
 	 */
 
-	printk(KERN_INFO "Test Case 2: stress test of register_blkdev() with auto allocating major numbers (major=0)\n");
+	printk(KERN_INFO
+	       "Test Case 2: stress test of register_blkdev() with auto allocating major numbers (major=0)\n");
 
 	memset(major, 0, sizeof(major));
 
-	for (i=0; i<sizeof(major)/sizeof(*major); i++) {
+	for (i = 0; i < sizeof(major) / sizeof(*major); i++) {
 		major[i] = register_blkdev(0, BLK_DEV_NAME);
 		printk(KERN_DEBUG "major[%i] = %i\n", i, major[i]);
 		if (major[i] <= 0 && major[i] != -EBUSY) {
-			printk(KERN_INFO "unexpected return value from register_blkdev(): %i\n", major[i]);
+			printk(KERN_INFO
+			       "unexpected return value from register_blkdev(): %i\n",
+			       major[i]);
 		}
 		if (major[i] < 0) {
-			printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major[i]);
+			printk(KERN_DEBUG
+			       "register_blkdev() failed with error %i\n",
+			       major[i]);
 		}
 	}
 
-	for (i=0; i<sizeof(major)/sizeof(*major); i++) {
+	for (i = 0; i < sizeof(major) / sizeof(*major); i++) {
 		if (0 < major[i]) {
 			unregister_blkdev(major[i], BLK_DEV_NAME);
 			major[i] = 0;
@@ -129,7 +140,8 @@
 	if (0 < major) {
 		unregister_blkdev(major, BLK_DEV_NAME);
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 3: UNRESLOVED\n");
@@ -139,7 +151,8 @@
 {
 	int major;
 
-	printk(KERN_INFO "Test Case 4: register_blkdev() with major=%u\n", UINT_MAX);
+	printk(KERN_INFO "Test Case 4: register_blkdev() with major=%u\n",
+	       UINT_MAX);
 
 	major = register_blkdev(UINT_MAX, BLK_DEV_NAME);
 	printk(KERN_DEBUG "major = %i\n", major);
@@ -147,7 +160,8 @@
 	if (0 < major) {
 		unregister_blkdev(major, BLK_DEV_NAME);
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 4: UNRESLOVED\n");
@@ -174,19 +188,22 @@
 		if (0 < major2) {
 			unregister_blkdev(major2, BLK_DEV_NAME);
 		} else {
-			printk(KERN_DEBUG "first call to register_blkdev() with major=%i failed with error %i\n",
-				major, major2);
+			printk(KERN_DEBUG
+			       "first call to register_blkdev() with major=%i failed with error %i\n",
+			       major, major2);
 		}
 
 		if (0 < major3) {
 			unregister_blkdev(major3, BLK_DEV_NAME);
 		} else {
-			printk(KERN_DEBUG "second call to register_blkdev() with major=%i failed with error %i\n",
-				major, major3);
+			printk(KERN_DEBUG
+			       "second call to register_blkdev() with major=%i failed with error %i\n",
+			       major, major3);
 		}
 
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 5: UNRESLOVED\n");
@@ -204,7 +221,8 @@
 	if (0 < major) {
 		unregister_blkdev(major, "");
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 6: UNRESLOVED\n");
@@ -222,13 +240,15 @@
 	if (0 < major) {
 		unregister_blkdev(major, NULL);
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 7: UNRESLOVED\n");
 }
 
-static void tc10(void) {
+static void tc10(void)
+{
 	int major;
 
 	printk(KERN_INFO "Test Case 10: unregister_blkdev() with major=0\n");
@@ -239,10 +259,12 @@
 	if (0 < major) {
 		printk(KERN_DEBUG "calling unregister_blkdev() with major=0\n");
 		unregister_blkdev(0, BLK_DEV_NAME);
-		printk(KERN_DEBUG "calling unregister_blkdev() with major=%i\n", major);
+		printk(KERN_DEBUG "calling unregister_blkdev() with major=%i\n",
+		       major);
 		unregister_blkdev(major, BLK_DEV_NAME);
 	} else {
-		printk(KERN_DEBUG "register_blkdev() failed with error %i\n", major);
+		printk(KERN_DEBUG "register_blkdev() failed with error %i\n",
+		       major);
 	}
 
 	printk(KERN_INFO "Test Case 10: UNRESLOVED\n");
diff --git a/testcases/kernel/device-drivers/block/kernel_space/test_genhd.c b/testcases/kernel/device-drivers/block/kernel_space/test_genhd.c
index b069217..d34a236 100644
--- a/testcases/kernel/device-drivers/block/kernel_space/test_genhd.c
+++ b/testcases/kernel/device-drivers/block/kernel_space/test_genhd.c
@@ -22,7 +22,8 @@
 #define BLK_DEV_NAME		"test_block"
 #define MAX_MAJOR		255
 
-static void tc20(void) {
+static void tc20(void)
+{
 	struct gendisk *gd_ptr;
 
 	gd_ptr = alloc_disk(1);
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
index 10e4507..cadec4a 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c
@@ -44,7 +44,7 @@
 MODULE_LICENSE("GPL");
 
 static int tmod_ioctl(struct inode *, struct file *, unsigned int,
-		       unsigned long);
+		      unsigned long);
 static int tmod_open(struct inode *, struct file *);
 static int tmod_close(struct inode *, struct file *);
 
@@ -58,9 +58,9 @@
  * correct file descriptor
  */
 static struct file_operations tmod_fops = {
-        open : tmod_open,
-        release: tmod_close,
-        ioctl: tmod_ioctl,
+open:	tmod_open,
+release:tmod_close,
+ioctl:	tmod_ioctl,
 };
 
 /*
@@ -68,12 +68,14 @@
  * your test modules, need them for the file
  * operations structure
  */
-static int tmod_open(struct inode *ino, struct file *f) {
-      return 0;
+static int tmod_open(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
-static int tmod_close(struct inode *ino, struct file *f) {
-      return 0;
+static int tmod_close(struct inode *ino, struct file *f)
+{
+	return 0;
 }
 
 /*
@@ -90,11 +92,12 @@
  *
  */
 static int tmod_ioctl(struct inode *ino, struct file *f,
-                        unsigned int cmd, unsigned long l) {
-	int 			rc;
-	tmod_interface_t	tif;
-	caddr_t			*inparms;
-	caddr_t			*outparms;
+		      unsigned int cmd, unsigned long l)
+{
+	int rc;
+	tmod_interface_t tif;
+	caddr_t *inparms;
+	caddr_t *outparms;
 
 	printk("Enter tmod_ioctl\n");
 
@@ -111,31 +114,32 @@
 	 *
 	 */
 	if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
-                /* Bad address */
-                return(-EFAULT);
-        }
+		/* Bad address */
+		return (-EFAULT);
+	}
 
 	/*
-         * Setup inparms and outparms as needed
-         */
-        if (tif.in_len > 0) {
-                inparms = (caddr_t *)kmalloc(tif.in_len, GFP_KERNEL);                if (!inparms) {
-                        return(-ENOMEM);
-                }
+	 * Setup inparms and outparms as needed
+	 */
+	if (tif.in_len > 0) {
+		inparms = (caddr_t *) kmalloc(tif.in_len, GFP_KERNEL);
+		if (!inparms) {
+			return (-ENOMEM);
+		}
 
-                rc = copy_from_user(inparms, tif.in_data, tif.in_len);
-                if (rc) {
-                        kfree(inparms);
-                        return(-EFAULT);
-                }
-        }
-        if (tif.out_len > 0) {
-                outparms = (caddr_t *)kmalloc(tif.out_len, GFP_KERNEL);
-                if (!outparms) {
-                        kfree(inparms);
-                        return(-ENOMEM);
-                }
-        }
+		rc = copy_from_user(inparms, tif.in_data, tif.in_len);
+		if (rc) {
+			kfree(inparms);
+			return (-EFAULT);
+		}
+	}
+	if (tif.out_len > 0) {
+		outparms = (caddr_t *) kmalloc(tif.out_len, GFP_KERNEL);
+		if (!outparms) {
+			kfree(inparms);
+			return (-ENOMEM);
+		}
+	}
 
 	/*
 	 * Use a switch statement to determine which function
@@ -144,12 +148,14 @@
 	 * needed
 	 *
 	 */
- 	switch(cmd) {
-		case LTP_OPTION1:	rc = test_option(); break;
-		default:
-			printk("Mismatching ioctl command\n");
-                        break;
-        }
+	switch (cmd) {
+	case LTP_OPTION1:
+		rc = test_option();
+		break;
+	default:
+		printk("Mismatching ioctl command\n");
+		break;
+	}
 
 	/*
 	 * copy in the test return code, the reason we
@@ -166,28 +172,28 @@
 	 */
 
 	/* if outparms then copy outparms into tif.out_data */
-        if (outparms) {
-                if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
-                        printk("tpci: Unsuccessful copy_to_user of outparms\n");
-                        rc = -EFAULT;
-                }
-        }
+	if (outparms) {
+		if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
+			printk("tpci: Unsuccessful copy_to_user of outparms\n");
+			rc = -EFAULT;
+		}
+	}
 
-        /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
-                printk("tpci: Unsuccessful copy_to_user of tif\n");
-                rc = -EFAULT;
-        }
+	/* copy tif structure into l so that can be used by user program */
+	if (copy_to_user((void *)l, &tif, sizeof(tif))) {
+		printk("tpci: Unsuccessful copy_to_user of tif\n");
+		rc = -EFAULT;
+	}
 
-        /*
-         * free inparms and outparms
-         */
-        if (inparms) {
-                kfree(inparms);
-        }
-        if (outparms) {
-                kfree(outparms);
-        }
+	/*
+	 * free inparms and outparms
+	 */
+	if (inparms) {
+		kfree(inparms);
+	}
+	if (outparms) {
+		kfree(outparms);
+	}
 
 	return rc;
 }
@@ -207,14 +213,15 @@
  *
  */
 
-static int test_option() {
+static int test_option()
+{
 
 	/* setup test parameters and make the call here */
 
 	printk("tmod: this is option1 example\n");
 
 	/* remember that printk does not show up on the console,
-	check /var/log/messages to see your what is printed */
+	   check /var/log/messages to see your what is printed */
 
 	return 0;
 }
@@ -225,24 +232,25 @@
  *      as a char device, and perform any necessary
  *      initialization for pci devices
  */
-static int tmod_init_module(void) {
+static int tmod_init_module(void)
+{
 	int rc;
 
 	SET_MODULE_OWNER(&tmod_fops);
 
 	rc = register_chrdev(Major, DEVICE_NAME, &tmod_fops);
-        if (rc < 0) {
-                printk("tmod: Failed to register device.\n");
-                return rc;
-        }
+	if (rc < 0) {
+		printk("tmod: Failed to register device.\n");
+		return rc;
+	}
 
-        if (Major == 0)
-                Major = rc;
+	if (Major == 0)
+		Major = rc;
 
 	/* call any other init functions you might use here */
 
 	printk("tmod: Registration success.\n");
-      return 0;
+	return 0;
 }
 
 /*
@@ -250,16 +258,17 @@
  *      unregister the device and any necessary
  *      operations to close devices
  */
-static void tmod_exit_module(void) {
-        int rc;
+static void tmod_exit_module(void)
+{
+	int rc;
 
-	/* free any pointers still allocated, using kfree*/
+	/* free any pointers still allocated, using kfree */
 
 	rc = unregister_chrdev(Major, DEVICE_NAME);
-        if (rc < 0)
-                printk("tmod: unregister failed\n");
-        else
-                printk("tmod: unregister success\n");
+	if (rc < 0)
+		printk("tmod: unregister failed\n");
+	else
+		printk("tmod: unregister success\n");
 
 }
 
@@ -267,4 +276,4 @@
 loaded and that exit is run when it is removed */
 
 module_init(tmod_init_module)
-module_exit(tmod_exit_module)
+    module_exit(tmod_exit_module)
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.mod.c b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.mod.c
index ca8c84f..c3689f8 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.mod.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.mod.c
@@ -22,10 +22,7 @@
 #include <linux/compiler.h>
 
 const char vermagic[]
-__attribute__((section("__vermagic"))) =
-VERMAGIC_STRING;
+    __attribute__ ((section("__vermagic"))) = VERMAGIC_STRING;
 
 static const char __module_depends[]
-__attribute_used__
-__attribute__((section(".modinfo"))) =
-"depends=";
+ __attribute_used__ __attribute__ ((section(".modinfo"))) = "depends=";
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/user_space/tmod_ki.c b/testcases/kernel/device-drivers/dev_sim_framework/user_space/tmod_ki.c
index c6cbd97..5203edf 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/user_space/tmod_ki.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/user_space/tmod_ki.c
@@ -42,39 +42,38 @@
 #include <sys/ioctl.h>
 #include "../kernel_space/tmod.h"
 
-int ki_generic(int fd, int flag) {
-        int                     rc;
-        tmod_interface_t        tif;
+int ki_generic(int fd, int flag)
+{
+	int rc;
+	tmod_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data = 0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for flag
-         */
-        rc = ioctl(fd, flag, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc) {
-                printf("Specific errorr: ");
-                return tif.out_rc;
-        }
+	/*
+	 * ioctl call for flag
+	 */
+	rc = ioctl(fd, flag, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc) {
+		printf("Specific errorr: ");
+		return tif.out_rc;
+	}
 
-        return rc;
+	return rc;
 }
 
 #if 0
-An example of using in_data to pass in a structure:
-
-ki_write_t      wif;
+An example of using in_data to pass in a structure:ki_write_t wif;
 tmod_interface_t tif;
 
 //fill out wif structure
@@ -82,29 +81,27 @@
 /*
  * build interface structure
  */
-tif.in_len = sizeof (ki_write_t);
-tif.in_data = (caddr_t) &wif;
+tif.in_len = sizeof(ki_write_t);
+tif.in_data = (caddr_t) & wif;
 tif.out_len = 0;
 tif.out_data = 0;
 tif.out_rc = 0;
 
 //make ioctl call
 
-An example of using out_data to get back a structure:
-
-ki_read_t       rif;
+An example of using out_data to get back a structure:ki_read_t rif;
 tmod_interface_t tif;
 
 //fill out rif structure
 rif.len = p_test->data[0];
 rif.handle = open_handle;
-rif.data = (caddr_t)p_test->data[1];
+rif.data = (caddr_t) p_test->data[1];
 
 /*
  * build interface structure
  */
-tif.in_len = sizeof (ki_read_t);
-tif.in_data = (caddr_t) &rif;
+tif.in_len = sizeof(ki_read_t);
+tif.in_data = (caddr_t) & rif;
 tif.out_len = 0;
 tif.out_data = 0;
 tif.out_rc = 0;
diff --git a/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c b/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
index b80dd06..b99bfed 100644
--- a/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
+++ b/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c
@@ -46,100 +46,108 @@
 #include "user_tmod.h"
 #include "../kernel_space/tmod.h"
 
-static int tmod_fd = -1;		/* file descriptor */
+static int tmod_fd = -1;	/* file descriptor */
 
-int
-tmodopen() {
+int tmodopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TMOD_MAJOR, 0);
+	devt = makedev(TMOD_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tmod node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tmod node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tmod_fd = open(DEVICE_NAME, O_RDWR);
+	tmod_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tmod_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tmod_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tmod_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tmod_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tmodclose() {
+int tmodclose()
+{
 
 	if (tmod_fd != -1) {
-		close (tmod_fd);
+		close(tmod_fd);
 		tmod_fd = -1;
 	}
 
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int rc;
 
 	/* open the module */
 	rc = tmodopen();
-        if (rc) {
-                printf("Test MOD Driver may not be loaded\n");
-                exit(1);
-        }
+	if (rc) {
+		printf("Test MOD Driver may not be loaded\n");
+		exit(1);
+	}
 
 	/* make test calls */
 	if (ki_generic(tmod_fd, LTP_OPTION1))
@@ -150,9 +158,9 @@
 	/* close the module */
 	rc = tmodclose();
 	if (rc) {
-                printf("Test MOD Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test MOD Driver may not be closed\n");
+		exit(1);
+	}
 
-      return 0;
+	return 0;
 }
diff --git a/testcases/kernel/device-drivers/drm/kernel_space/tdrm.c b/testcases/kernel/device-drivers/drm/kernel_space/tdrm.c
index f3c9184..61a48fd 100644
--- a/testcases/kernel/device-drivers/drm/kernel_space/tdrm.c
+++ b/testcases/kernel/device-drivers/drm/kernel_space/tdrm.c
@@ -46,9 +46,11 @@
 #define DRIVER_DESC		"drm test mode"
 #define DRIVER_DATE		"20030903"
 
-static drm_pci_list_t DRM(idlist)[] = {
-	{ PCI_ANY_ID, PCI_ANY_ID },
-	{ 0, 0 }
+static drm_pci_list_t DRM(idlist)[] =
+{
+	{
+	PCI_ANY_ID, PCI_ANY_ID}, {
+	0, 0}
 };
 
 #define DRIVER_CARD_LIST DRM(idlist)
@@ -76,85 +78,85 @@
 static int minor = 0;
 static unsigned long alloc_pages_address = 0;
 
-int tdrm_test_stub_register(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_stub_register(struct inode *inode, struct file *filp,
+			    unsigned int cmd, unsigned long arg)
 {
 	drm_file_t *priv = filp->private_data;
 	drm_device_t *dev = priv->dev;
-	minor = DRM(stub_register)(DEVICE_NAME,&DRM(fops),dev);
-	printk("tdrm stub register : minor = %d\n",minor);
+	minor = DRM(stub_register) (DEVICE_NAME, &DRM(fops), dev);
+	printk("tdrm stub register : minor = %d\n", minor);
 	return 0;
 
 }
 
-int tdrm_test_stub_unregister(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_stub_unregister(struct inode *inode, struct file *filp,
+			      unsigned int cmd, unsigned long arg)
 {
-	DRM(stub_unregister)(minor);
+	DRM(stub_unregister) (minor);
 	return 0;
 }
 
-int tdrm_test_uninit_agp(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_uninit_agp(struct inode *inode, struct file *filp,
+			 unsigned int cmd, unsigned long arg)
 {
-	DRM(agp_uninit)();
+	DRM(agp_uninit) ();
 	return 0;
 }
 
-int tdrm_test_init_agp(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_init_agp(struct inode *inode, struct file *filp,
+		       unsigned int cmd, unsigned long arg)
 {
-	DRM(agp_init)();
+	DRM(agp_init) ();
 	return 0;
 }
 
-int tdrm_test_add_magic(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_add_magic(struct inode *inode, struct file *filp,
+			unsigned int cmd, unsigned long arg)
 {
 	drm_file_t *priv = filp->private_data;
 	drm_device_t *dev = priv->dev;
 	int magic = 5;
-	return (DRM(add_magic)(dev,priv,magic));
+	return (DRM(add_magic) (dev, priv, magic));
 }
 
-int tdrm_test_remove_magic(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_remove_magic(struct inode *inode, struct file *filp,
+			   unsigned int cmd, unsigned long arg)
 {
 	drm_file_t *priv = filp->private_data;
 	drm_device_t *dev = priv->dev;
 	int magic = 5;
-	return (DRM(remove_magic)(dev,magic));
+	return (DRM(remove_magic) (dev, magic));
 }
 
-int tdrm_test_ctxbitmap_init(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_ctxbitmap_init(struct inode *inode, struct file *filp,
+			     unsigned int cmd, unsigned long arg)
 {
 	drm_file_t *priv = filp->private_data;
 	drm_device_t *dev = priv->dev;
-	return (DRM(ctxbitmap_init)(dev));
+	return (DRM(ctxbitmap_init) (dev));
 }
 
-int tdrm_test_ctxbitmap_cleanup(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_ctxbitmap_cleanup(struct inode *inode, struct file *filp,
+				unsigned int cmd, unsigned long arg)
 {
 	drm_file_t *priv = filp->private_data;
 	drm_device_t *dev = priv->dev;
-	DRM(ctxbitmap_cleanup)(dev);
+	DRM(ctxbitmap_cleanup) (dev);
 	return 0;
 }
 
-int tdrm_test_alloc_pages(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_alloc_pages(struct inode *inode, struct file *filp,
+			  unsigned int cmd, unsigned long arg)
 {
-	alloc_pages_address =  DRM(alloc_pages)(1, 0);
-//	printk("address = %ld\n",alloc_pages_address);
+	alloc_pages_address = DRM(alloc_pages) (1, 0);
+//      printk("address = %ld\n",alloc_pages_address);
 	return 0;
 }
 
-int tdrm_test_free_pages(struct inode *inode,struct file *filp,
-		unsigned int cmd , unsigned long arg)
+int tdrm_test_free_pages(struct inode *inode, struct file *filp,
+			 unsigned int cmd, unsigned long arg)
 {
-	DRM(free_pages)(alloc_pages_address,1,0);
+	DRM(free_pages) (alloc_pages_address, 1, 0);
 	return 0;
 }
 
@@ -166,7 +168,7 @@
  */
 static int __init tdrm_options(char *str)
 {
-	DRM(parse_options)(str);
+	DRM(parse_options) (str);
 	return 1;
 }
 
diff --git a/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c b/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
index 821459f..52c01c1 100644
--- a/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
+++ b/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c
@@ -40,110 +40,118 @@
 #include "../kernel_space/tdrm.h"
 #include "drm.h"
 
-static int tdrm_fd = -1;		/* file descriptor */
+static int tdrm_fd = -1;	/* file descriptor */
 
-int
-tdrmopen() {
+int tdrmopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TDRM_MAJOR, 0);
+	devt = makedev(TDRM_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tdrm_fd = open(DEVICE_NAME, O_RDWR);
+	tdrm_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tdrm_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tdrm_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tdrm_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tdrm_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tdrmclose() {
+int tdrmclose()
+{
 
 	if (tdrm_fd != -1) {
-		close (tdrm_fd);
+		close(tdrm_fd);
 		tdrm_fd = -1;
 	}
 }
 
-int main() {
+int main()
+{
 	int rc;
 
 	/* open the module */
 	rc = tdrmopen();
-        if (rc) {
-                printf("Test DRM Driver may not be loaded\n");
-                exit(1);
-        }
+	if (rc) {
+		printf("Test DRM Driver may not be loaded\n");
+		exit(1);
+	}
 
 	printf("\tBegin drm read system ioctl\n");
 	//
 	drm_auth_t auth;
-	if (ioctl(tdrm_fd ,DRM_IOCTL_GET_MAGIC , &auth ))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_MAGIC, &auth))
 		printf("Failed on drm ioctl DRM(get_magic) test\n");
 	else
 		printf("Success on drm ioctl DRM(get_magic) test\n");
 
 	//
 	drm_stats_t stats;
-	if (ioctl(tdrm_fd , DRM_IOCTL_GET_STATS , &stats ))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_STATS, &stats))
 		printf("Failed on drm ioctl DRM(get_status) test\n");
 	else
 		printf("Success on drm ioctl DRM(get_status) test\n");
@@ -153,39 +161,39 @@
 	 */
 
 	printf("\tBegin read write ioctl test\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_IRQ_BUSID))
+	if (ioctl(tdrm_fd, DRM_IOCTL_IRQ_BUSID))
 		printf("Failed on drm ioctl DRM(irq_busid)\n");
 	else
 		printf("Success on drm ioctl DRM(irq_busid)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_GET_CLIENT))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CLIENT))
 		printf("Failed on drm ioctl DRM(get_client)\n");
 	else
 		printf("Success on drm ioctl DRM(get_client)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_BLOCK))
+	if (ioctl(tdrm_fd, DRM_IOCTL_BLOCK))
 		printf("Failed on drm ioctl DRM(block)\n");
 	else
 		printf("Success on drm ioctl DRM(block)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_UNBLOCK))
+	if (ioctl(tdrm_fd, DRM_IOCTL_UNBLOCK))
 		printf("Failed on drm ioctl DRM(unblock)\n");
 	else
 		printf("Success on drm ioctl DRM(unblock)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_ADD_CTX))
+	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_CTX))
 		printf("Failed on drm ioctl DRM(addctx)\n");
 	else
 		printf("Success on drm ioctl DRM(addctx)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_RM_CTX))
+	if (ioctl(tdrm_fd, DRM_IOCTL_RM_CTX))
 		printf("Failed on drm ioctl DRM(rmctx)\n");
 	else
 		printf("Success on drm ioctl DRM(rmctx)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_GET_CTX))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CTX))
 		printf("Failed on drm ioctl DRM(getctx)\n");
 	else
 		printf("Success on drm ioctl DRM(getctx)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_ADD_DRAW))
+	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_DRAW))
 		printf("Failed on drm ioctl DRM(adddraw)\n");
 	else
 		printf("Success on drm ioctl DRM(adddraw)\n");
-	if (ioctl(tdrm_fd , DRM_IOCTL_RM_DRAW))
+	if (ioctl(tdrm_fd, DRM_IOCTL_RM_DRAW))
 		printf("Failed on drm ioctl DRM(rmdraw)\n");
 	else
 		printf("Success on drm ioctl DRM(rmdraw)\n");
@@ -218,7 +226,7 @@
 	else
 		printf("Success on drm stub_unregister test\n");
 	// test drm add magic
-		if (ioctl(tdrm_fd, TDRM_ADD_MAGIC))
+	if (ioctl(tdrm_fd, TDRM_ADD_MAGIC))
 		printf("Failed on drm DRM(add_magic) test\n");
 	else
 		printf("Success on drm DRM(add_magic) test\n");
@@ -252,29 +260,29 @@
 		printf("Success on drm DRM(ctxbitmap_init) test\n");
 
 	static drm_version_t version;
-	if (ioctl(tdrm_fd, DRM_IOCTL_VERSION,&version))
+	if (ioctl(tdrm_fd, DRM_IOCTL_VERSION, &version))
 		printf("Failed on drm DRM(version) test\n");
 	else
 		printf("Success on drm DRM(version) test\n");
 
 	static drm_auth_t myauth;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_MAGIC,&myauth))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_MAGIC, &myauth))
 		printf("Failed on drm DRM(get_magic) test\n");
 	else
 		printf("Success on drm DRM(get_magic) test\n");
 
-	if (ioctl(tdrm_fd, DRM_IOCTL_AUTH_MAGIC,&auth))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AUTH_MAGIC, &auth))
 		printf("Failed on drm authmagic test\n");
 	else
 		printf("Success on drm authmagic test\n");
 
 	//  test for drm_agpsupport.h
 	/*
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_RELEASE))
-		printf("Failed on drm DRM(agp_release) test\n");
-	else
-		printf("Success on drm DRM(agp_release) test\n");
-	*/
+	   if (ioctl(tdrm_fd, DRM_IOCTL_AGP_RELEASE))
+	   printf("Failed on drm DRM(agp_release) test\n");
+	   else
+	   printf("Success on drm DRM(agp_release) test\n");
+	 */
 	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_ACQUIRE))
 		printf("Failed on drm DRM(agp_acquire) test\n");
 	else
@@ -291,14 +299,14 @@
 		printf("Success on drm DRM(agp_acquire) test\n");
 
 	static drm_agp_info_t agp_info;
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_INFO,&agp_info))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_INFO, &agp_info))
 		printf("Failed on drm DRM(agp_info) test\n");
 	else
 		printf("Success on drm DRM(agp_info) test\n");
 
 	static drm_agp_buffer_t agp_buffer;
 	agp_buffer.size = 64;
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_ALLOC,&agp_buffer))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_ALLOC, &agp_buffer))
 		printf("Failed on drm DRM(agp_alloc) test\n");
 	else
 		printf("Success on drm DRM(agp_alloc) test\n");
@@ -307,96 +315,96 @@
 	bind_buffer.handle = agp_buffer.handle;
 	bind_buffer.offset = 64;
 
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_BIND,&bind_buffer))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_BIND, &bind_buffer))
 		printf("Failed on drm DRM(agp_bind) test\n");
 	else
 		printf("Success on drm DRM(agp_bind) test\n");
 
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_UNBIND,&bind_buffer))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_UNBIND, &bind_buffer))
 		printf("Failed on drm DRM(agp_unbind) test\n");
 	else
 		printf("Success on drm DRM(agp_unbind) test\n");
-	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_FREE,&agp_buffer))
+	if (ioctl(tdrm_fd, DRM_IOCTL_AGP_FREE, &agp_buffer))
 		printf("Failed on drm DRM(agp_free) test\n");
 	else
 		printf("Success on drm DRM(agp_free) test\n");
 
 	// test drm_ctxbitmap.h
 	static drm_ctx_t getctx;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CTX,&getctx))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CTX, &getctx))
 		printf("Failed on drm DRM(getctx) test\n");
 	else
 		printf("Success on drm DRM(getctx) test\n");
 
 	static drm_ctx_t ctx;
-	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_CTX,&ctx))
+	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_CTX, &ctx))
 		printf("Failed on drm DRM(addctx) test\n");
 	else
 		printf("Success on drm DRM(addctx) test\n");
 
-	if (ioctl(tdrm_fd, DRM_IOCTL_RM_CTX,&ctx))
+	if (ioctl(tdrm_fd, DRM_IOCTL_RM_CTX, &ctx))
 		printf("Failed on drm DRM(rmctx) test\n");
 	else
 		printf("Success on drm DRM(rmctx) test\n");
 
 	/*
-	static drm_ctx_priv_map_t map;
-	memset(&map,0,sizeof(drm_ctx_priv_map_t));
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_SAREA_CTX,&map))
-		printf("Failed on drm DRM(getsareactx) test\n");
-	else
-		printf("Success on drm DRM(getsareactx) test\n");
-	*/
+	   static drm_ctx_priv_map_t map;
+	   memset(&map,0,sizeof(drm_ctx_priv_map_t));
+	   if (ioctl(tdrm_fd, DRM_IOCTL_GET_SAREA_CTX,&map))
+	   printf("Failed on drm DRM(getsareactx) test\n");
+	   else
+	   printf("Success on drm DRM(getsareactx) test\n");
+	 */
 	// for drm_drawtable.h
 	static drm_draw_t draw;
-	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_DRAW,&draw))
+	if (ioctl(tdrm_fd, DRM_IOCTL_ADD_DRAW, &draw))
 		printf("Failed on drm DRM(adddraw) test\n");
 	else
 		printf("Success on drm DRM(adddraw) test\n");
 
-	if (ioctl(tdrm_fd, DRM_IOCTL_RM_DRAW,&draw))
+	if (ioctl(tdrm_fd, DRM_IOCTL_RM_DRAW, &draw))
 		printf("Failed on drm DRM(rmdraw) test\n");
 	else
 		printf("Success on drm DRM(rmdraw) test\n");
 
 	//for drm_ioctl.h//
 	static drm_stats_t status;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_STATS,&status))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_STATS, &status))
 		printf("Failed on drm DRM(getstatus) test\n");
 	else
 		printf("Success on drm DRM(getstatus) test\n");
 
 	static drm_client_t client;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CLIENT,&client))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_CLIENT, &client))
 		printf("Failed on drm DRM(getclient) test\n");
 	else
 		printf("Success on drm DRM(getclient) test\n");
 	/*
-	static drm_map_t getmap;
-	getmap.offset = 0;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_MAP,&getmap))
-		printf("Failed on drm DRM(getmap) test\n");
-	else
-		printf("Success on drm DRM(getmap) test\n");
-	*/
+	   static drm_map_t getmap;
+	   getmap.offset = 0;
+	   if (ioctl(tdrm_fd, DRM_IOCTL_GET_MAP,&getmap))
+	   printf("Failed on drm DRM(getmap) test\n");
+	   else
+	   printf("Success on drm DRM(getmap) test\n");
+	 */
 	static drm_unique_t unique;
 	unique.unique_len = 0;
-	if (ioctl(tdrm_fd, DRM_IOCTL_GET_UNIQUE,&unique))
+	if (ioctl(tdrm_fd, DRM_IOCTL_GET_UNIQUE, &unique))
 		printf("Failed on drm DRM(getunique) test\n");
 	else
 		printf("Success on drm DRM(getunique) test\n");
 	/*
-	if (ioctl(tdrm_fd, DRM_IOCTL_SET_UNIQUE,&unique))
-		printf("Failed on drm DRM(setunique) test\n");
+	   if (ioctl(tdrm_fd, DRM_IOCTL_SET_UNIQUE,&unique))
+	   printf("Failed on drm DRM(setunique) test\n");
 
-	else
-		printf("Success on drm DRM(setunique) test\n");
+	   else
+	   printf("Success on drm DRM(setunique) test\n");
 
-	*/
+	 */
 	rc = tdrmclose();
 	if (rc) {
-                printf("Test MOD Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test MOD Driver may not be closed\n");
+		exit(1);
+	}
 
 }
diff --git a/testcases/kernel/device-drivers/include/includeTest.c b/testcases/kernel/device-drivers/include/includeTest.c
index c1c2646..d5b6fe2 100644
--- a/testcases/kernel/device-drivers/include/includeTest.c
+++ b/testcases/kernel/device-drivers/include/includeTest.c
@@ -59,9 +59,10 @@
 MODULE_DESCRIPTION(TEST_DRIVER_NAME);
 MODULE_LICENSE("GPL");
 
-static int test_ioctl (struct inode *, struct file *, unsigned int, unsigned long);
-static int test_open (struct inode *, struct file *);
-static int test_close (struct inode *, struct file *);
+static int test_ioctl(struct inode *, struct file *, unsigned int,
+		      unsigned long);
+static int test_open(struct inode *, struct file *);
+static int test_close(struct inode *, struct file *);
 static void test_acpi(void);
 static void test_vga(void);
 static void test_sunrpc_auth(void);
@@ -74,59 +75,67 @@
 static int Major = 0;
 
 static struct block_device_operations bdops = {
-        open: test_open,
-        release: test_close,
-        ioctl: test_ioctl,
+open:	test_open,
+release:test_close,
+ioctl:	test_ioctl,
 };
 
 static char genhd_flags = 0;
-static struct gendisk * gd_ptr;
+static struct gendisk *gd_ptr;
 static struct pm_dev *ltp_pm_dev = NULL;
 
-static int test_open(struct inode *ino, struct file *f) {
+static int test_open(struct inode *ino, struct file *f)
+{
 	printk("device open\n");
-      return 0;
+	return 0;
 }
 
-static int test_close(struct inode *ino, struct file *f) {
+static int test_close(struct inode *ino, struct file *f)
+{
 	printk("device closed\n");
-      return 0;
+	return 0;
 }
 
-static int test_ioctl(struct inode *ino, struct file *f, unsigned int cmd, unsigned long l) {
+static int test_ioctl(struct inode *ino, struct file *f, unsigned int cmd,
+		      unsigned long l)
+{
 
-	int rc = 0;             //return code
-        int arg;
+	int rc = 0;		//return code
+	int arg;
 
-        printk("Entered the ioctl call.\n");
+	printk("Entered the ioctl call.\n");
 
-        if (copy_from_user(&arg, (void *)l, sizeof(int))) {
-                //bad address
-                return(-EFAULT);
-        }
+	if (copy_from_user(&arg, (void *)l, sizeof(int))) {
+		//bad address
+		return (-EFAULT);
+	}
 
-        switch(cmd) {
+	switch (cmd) {
 
-                case OPTION1: option1(); break;
-                default:
-                        printk("Mismatching ioctl command\n");
-                        break;
-        }
+	case OPTION1:
+		option1();
+		break;
+	default:
+		printk("Mismatching ioctl command\n");
+		break;
+	}
 
-        //0 by default
-        return rc;
+	//0 by default
+	return rc;
 }
 
-static void option1(void) {
-        printk("Module option 1 chosen\n");
+static void option1(void)
+{
+	printk("Module option 1 chosen\n");
 }
 
 static int ltp_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
-  return 0;
+	return 0;
 }
 
-static int test_init_module(void) {
+static int test_init_module(void)
+{
 
 	int rc;
 
@@ -135,35 +144,35 @@
 	ltp_pm_dev = pm_register(PM_UNKNOWN_DEV, 0, ltp_pm_callback);
 	rc = register_blkdev(INCLUDEMAJOR, DEVICE_NAME);
 
-	printk("BLK INC - result =%d major %d\n",rc,INCLUDEMAJOR);
+	printk("BLK INC - result =%d major %d\n", rc, INCLUDEMAJOR);
 
-        if (rc < 0) {
-                printk("Failed to register device.\n");
-                return rc;
-        }
-
-	gd_ptr = kmalloc(sizeof(struct gendisk *),GFP_KERNEL);
-	if (!gd_ptr) {
-		 printk(KERN_ALERT "ERROR getting memory !!!\n");
-		 return 0;
+	if (rc < 0) {
+		printk("Failed to register device.\n");
+		return rc;
 	}
 
-        printk("major = %d\n",Major);
+	gd_ptr = kmalloc(sizeof(struct gendisk *), GFP_KERNEL);
+	if (!gd_ptr) {
+		printk(KERN_ALERT "ERROR getting memory !!!\n");
+		return 0;
+	}
+
+	printk("major = %d\n", Major);
 	gd_ptr = alloc_disk(1);
-	printk(KERN_ALERT "gd_ptr after alloc = %p \n",gd_ptr);
+	printk(KERN_ALERT "gd_ptr after alloc = %p \n", gd_ptr);
 	gd_ptr->major = INCLUDEMAJOR;
 	gd_ptr->first_minor = 0;
 	gd_ptr->fops = &bdops;
-//	gd_ptr->minor_shift= MINOR_SHIFT_BITS;
+//      gd_ptr->minor_shift= MINOR_SHIFT_BITS;
 	gd_ptr->driverfs_dev = NULL;
 	gd_ptr->capacity = MAX_NUM_DISKS;
-//	gd_ptr->disk_de = NULL;
+//      gd_ptr->disk_de = NULL;
 	gd_ptr->flags = genhd_flags;
 
 	sprintf(gd_ptr->disk_name, DEVICE_NAME);
 	add_disk(gd_ptr);
 
-	printk("major = %d\n",Major);
+	printk("major = %d\n", Major);
 
 	test_acpi();
 	test_vga();
@@ -178,81 +187,87 @@
 	return 0;
 }
 
-static void test_exit_module(void) {
+static void test_exit_module(void)
+{
 
 	int rc;
 
-        pm_unregister(ltp_pm_dev);
-        put_disk(gd_ptr);
-        del_gendisk(gd_ptr);
+	pm_unregister(ltp_pm_dev);
+	put_disk(gd_ptr);
+	del_gendisk(gd_ptr);
 
 	rc = unregister_blkdev(INCLUDEMAJOR, DEVICE_NAME);
 
-        if (rc < 0) {
-                printk("unregister failed %d\n",rc);
-        }
-        else {
-                printk("unregister success\n");
-        }
+	if (rc < 0) {
+		printk("unregister failed %d\n", rc);
+	} else {
+		printk("unregister success\n");
+	}
 }
 
-static void test_acpi(void) {
+static void test_acpi(void)
+{
 	u32 flag;
 
-	for (flag=0; flag<=4; flag++)
+	for (flag = 0; flag <= 4; flag++)
 		acpi_set_debug(flag);
 
 	printk("finished acpi test\n");
 }
 
-static void test_sunrpc_auth(void) {
+static void test_sunrpc_auth(void)
+{
 	struct rpc_cred cred;
 
-	atomic_set(&(cred.cr_count),0);
+	atomic_set(&(cred.cr_count), 0);
 	get_rpccred(&cred);
 	printk("finished auth test\n");
 }
 
-static void test_vga(void) {
+static void test_vga(void)
+{
 
 	unsigned short vgaS = 0;
-	int i=0;
-        vga_r((caddr_t)i, vgaS);
-        printk("finished vga test\n");
+	int i = 0;
+	vga_r((caddr_t) i, vgaS);
+	printk("finished vga test\n");
 }
 
-static void test_nfsfh(void) {
-	dev_t dev=0;
-	u32 unfs=0, u32ptr[2];
-	ino_t ino=0;
+static void test_nfsfh(void)
+{
+	dev_t dev = 0;
+	u32 unfs = 0, u32ptr[2];
+	ino_t ino = 0;
 	struct svc_fh A1;
-	int i=20;
+	int i = 20;
 
-	u32_to_dev_t((__u32)unfs);
+	u32_to_dev_t((__u32) unfs);
 	ino_t_to_u32(ino);
-	u32_to_ino_t((__u32)unfs);
+	u32_to_ino_t((__u32) unfs);
 	mk_fsid_v0(u32ptr, dev, ino);
 	mk_fsid_v1(u32ptr, unfs);
 	SVCFH_fmt(&A1);
-	fh_init(&A1,i);
+	fh_init(&A1, i);
 	fh_lock(&A1);
 	fh_unlock(&A1);
 	printk("finished nfsfh test\n");
 }
 
-static void test_lockd(void) {
+static void test_lockd(void)
+{
 
 	struct nlm_file file;
 	struct sockaddr_in sin1, sin2;
 	struct file_lock fl1, fl2;
 
 	nlm_compare_locks(&fl1, &fl2);
-	nlm_cmp_addr(&sin1,&sin2);
+	nlm_cmp_addr(&sin1, &sin2);
 	nlmsvc_file_inode(&file);
 	printk("finished lockd test\n");
 }
 
-static void test_sunrpc_cache(void) {
+static void test_sunrpc_cache(void)
+{
 	struct cache_head head;
 	struct cache_detail detail;
 
@@ -261,19 +276,20 @@
 	printk("finished cache test\n");
 }
 
-static void test_sunrpc_svc(void) {
+static void test_sunrpc_svc(void)
+{
 	u32 val;
 	struct svc_rqst rqstp;
-        char name[50];
-        struct iovec iov;
-	int bits=0, bits2=0;
-	rqstp.rq_resused=1;
+	char name[50];
+	struct iovec iov;
+	int bits = 0, bits2 = 0;
+	rqstp.rq_resused = 1;
 
 	svc_getu32(&iov);
-//	svc_putu32(&iov, val);
+//      svc_putu32(&iov, val);
 
-	xdr_argsize_check(&rqstp,&val);
-	xdr_ressize_check(&rqstp,&val);
+	xdr_argsize_check(&rqstp, &val);
+	xdr_ressize_check(&rqstp, &val);
 	svc_take_page(&rqstp);
 	svc_pushback_allpages(&rqstp);
 	svc_pushback_unused_pages(&rqstp);
@@ -284,7 +300,8 @@
 
 }
 
-static void test_sunrpc_timer() {
+static void test_sunrpc_timer()
+{
 	struct rpc_rtt rt;
 
 	rpc_inc_timeo(&rt);
@@ -294,4 +311,4 @@
 }
 
 module_init(test_init_module)
-module_exit(test_exit_module)
+    module_exit(test_exit_module)
diff --git a/testcases/kernel/device-drivers/include/userBlockInclude.c b/testcases/kernel/device-drivers/include/userBlockInclude.c
index 12ea0ab..66393c2 100644
--- a/testcases/kernel/device-drivers/include/userBlockInclude.c
+++ b/testcases/kernel/device-drivers/include/userBlockInclude.c
@@ -34,109 +34,116 @@
 
 int open_block_device(void);
 
-int block_dev_handle = 0;      /* handle to INC test block device */
+int block_dev_handle = 0;	/* handle to INC test block device */
 
 int main(int argc, char **argv)
 {
 
-    incdev_cmd_t  cmd = {0,0};
-    int rc;
+	incdev_cmd_t cmd = { 0, 0 };
+	int rc;
 
-    rc = open_block_device();
+	rc = open_block_device();
 
-    if (!rc) {
+	if (!rc) {
 
-        block_dev_handle = open(DEVICE_NAME, O_RDWR);
+		block_dev_handle = open(DEVICE_NAME, O_RDWR);
 
-        if (block_dev_handle < 0) {
-            printf("ERROR: Open of device %s failed %d errno = %d\n",
-		DEVICE_NAME,block_dev_handle, errno);
-        }
-        else {
-            rc = ioctl (block_dev_handle, INCDEV_CMD, &cmd);
+		if (block_dev_handle < 0) {
+			printf
+			    ("ERROR: Open of device %s failed %d errno = %d\n",
+			     DEVICE_NAME, block_dev_handle, errno);
+		} else {
+			rc = ioctl(block_dev_handle, INCDEV_CMD, &cmd);
 
-            printf("return from ioctl %d \n", rc);
-        }
+			printf("return from ioctl %d \n", rc);
+		}
 
-    } else {
-        printf("ERROR: Create/open block device failed\n");
-    }
+	} else {
+		printf("ERROR: Create/open block device failed\n");
+	}
 
-  return 0;
+	return 0;
 
-    printf("Block Include Test complete.\n");
+	printf("Block Include Test complete.\n");
 }
 
 int open_block_device()
 {
-    dev_t devt;
-    struct stat statbuf;
-    int rc;
+	dev_t devt;
+	struct stat statbuf;
+	int rc;
 
-    if (block_dev_handle == 0) {
+	if (block_dev_handle == 0) {
 
-        /* check for the /dev/ subdir, and create if it does not exist.
-         *
-         * If devfs is running and mounted on /dev, these checks will all pass,
-         * so a new node will not be created.
-         */
+		/* check for the /dev/ subdir, and create if it does not exist.
+		 *
+		 * If devfs is running and mounted on /dev, these checks will all pass,
+		 * so a new node will not be created.
+		 */
 
-        devt = makedev(INCLUDEMAJOR, 0);
+		devt = makedev(INCLUDEMAJOR, 0);
 
-        rc = stat(INCLUDE_DEVICE_PATH, &statbuf);
+		rc = stat(INCLUDE_DEVICE_PATH, &statbuf);
 
-	if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist. */
-                rc = mkdir(INCLUDE_DEVICE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist. */
+				rc = mkdir(INCLUDE_DEVICE_PATH,
+					   (S_IFDIR | S_IRWXU | S_IRGRP |
+					    S_IXGRP | S_IROTH | S_IXOTH));
 
-            } else {
-                printf("ERROR: Problem with INC dev directory.  Error code from stat(
+			} else {
+				printf("ERROR: Problem with INC dev directory.  Error code from stat(
 			) is %d\n\n", errno);
-            }
-        } else {
-	    if (!(statbuf.st_mode & S_IFDIR)) {
-                rc = unlink(INCLUDE_DEVICE_PATH);
-	        if (!rc) {
-	             rc = mkdir(INCLUDE_DEVICE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-                }
-            }
-        }
+			}
+		} else {
+			if (!(statbuf.st_mode & S_IFDIR)) {
+				rc = unlink(INCLUDE_DEVICE_PATH);
+				if (!rc) {
+					rc = mkdir(INCLUDE_DEVICE_PATH,
+						   (S_IFDIR | S_IRWXU | S_IRGRP
+						    | S_IXGRP | S_IROTH |
+						    S_IXOTH));
+				}
+			}
+		}
 
-	/*
-         * Check for the block_device node, and create if it does not
-         * exist.
-         */
+		/*
+		 * Check for the block_device node, and create if it does not
+		 * exist.
+		 */
 
-        rc = stat(DEVICE_NAME, &statbuf);
-        if (rc) {
-	    if (errno == ENOENT) {
-                /* dev node does not exist */
-                rc = mknod(DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            } else {
-                printf("ERROR:Problem with block device node directory.  Error code form stat() is %d\n\n", errno);
-            }
+		rc = stat(DEVICE_NAME, &statbuf);
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist */
+				rc = mknod(DEVICE_NAME,
+					   (S_IFBLK | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			} else {
+				printf
+				    ("ERROR:Problem with block device node directory.  Error code form stat() is %d\n\n",
+				     errno);
+			}
 
-         } else {
-	    /*
-             * Device exists. Check to make sure it is for a
-             * block device and that it has the right major and minor.
-             */
+		} else {
+			/*
+			 * Device exists. Check to make sure it is for a
+			 * block device and that it has the right major and minor.
+			 */
 
-            if ((!(statbuf.st_mode & S_IFBLK)) ||
-                 (statbuf.st_rdev != devt)) {
-                /* Recreate the dev node. */
-                rc = unlink(DEVICE_NAME);
-                if (!rc) {
-                    rc = mknod(DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-                }
-            }
-        }
+			if ((!(statbuf.st_mode & S_IFBLK)) ||
+			    (statbuf.st_rdev != devt)) {
+				/* Recreate the dev node. */
+				rc = unlink(DEVICE_NAME);
+				if (!rc) {
+					rc = mknod(DEVICE_NAME,
+						   (S_IFBLK | S_IRUSR | S_IWUSR
+						    | S_IRGRP | S_IWGRP), devt);
+				}
+			}
+		}
 
-    }
-    return rc;
+	}
+	return rc;
 }
diff --git a/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/test_per_cpu_allocator_module.c b/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/test_per_cpu_allocator_module.c
index ece1cf8..e3dffeb 100644
--- a/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/test_per_cpu_allocator_module.c
+++ b/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/test_per_cpu_allocator_module.c
@@ -22,7 +22,9 @@
 #include <linux/sysfs.h>
 #include <linux/percpu.h>
 
-static inline void pcpu_dump_chunk_slots(void) {}
+static inline void pcpu_dump_chunk_slots(void)
+{
+}
 
 struct alloc_cmd {
 	size_t size;
@@ -30,53 +32,53 @@
 };
 
 static const struct alloc_cmd cmds[] = {
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },
-	{  256, 0 }, {  256, 1 }, {  256, 0 }, {  256, 1 },	/* 8k */
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},
+	{256, 0}, {256, 1}, {256, 0}, {256, 1},	/* 8k */
 
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },
-	{ 1024, 2 }, { 1024, 2 }, { 1024, 2 }, { 1024, 2 },	/* 32k */
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},
+	{1024, 2}, {1024, 2}, {1024, 2}, {1024, 2},	/* 32k */
 
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },
-	{ 8192, 3 }, { 8192, 3 }, { 8192, 3 }, { 8192, 3 },	/* 128k */
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},
+	{8192, 3}, {8192, 3}, {8192, 3}, {8192, 3},	/* 128k */
 
-	{ 0, 0 },	/* free 0s */
+	{0, 0},			/* free 0s */
 
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },
-	{  128, 4 }, {  128, 4 }, {  128, 4 }, {  128, 4 },	/* 4.5k */
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},
+	{128, 4}, {128, 4}, {128, 4}, {128, 4},	/* 4.5k */
 
-	{ 0, 1 },	/* free 1s */
+	{0, 1},			/* free 1s */
 
-	{ 1024, 5 }, { 1024, 5 }, { 1024, 5 }, { 1024, 5 },	/* 4k */
+	{1024, 5}, {1024, 5}, {1024, 5}, {1024, 5},	/* 4k */
 
-	{ 0, 5 },	/* free 5s */
-	{ 0, 4 },
-	{ 0, 3 },
-	{ 0, 2 },
+	{0, 5},			/* free 5s */
+	{0, 4},
+	{0, 3},
+	{0, 2},
 };
 
 #define NR_CMDS		ARRAY_SIZE(cmds)
@@ -86,7 +88,7 @@
 static unsigned long seed_val(unsigned int cmdno, unsigned int cpu)
 {
 	return 0xdeadbeefbeefdeadULL
-		+ cmdno + (cmdno << 16) + (cpu << 8) + (cpu << 24);
+	    + cmdno + (cmdno << 16) + (cpu << 8) + (cpu << 24);
 }
 
 static void fill_area(void *p, size_t size, unsigned int cmdno)
@@ -117,12 +119,14 @@
 
 		while (left >= sizeof(unsigned long)) {
 			if (*up != v && warns-- > 0) {
-				printk("MISMATCH: cmdno=%u size=%zu cpu=%u off=%zu p=%p\n",
-				       cmdno, size, cpu, size - left, p);
-				printk("          [%p]=%lx should be %lx\n",
-				       up, *up, v);
+				printk
+				    ("MISMATCH: cmdno=%u size=%zu cpu=%u off=%zu p=%p\n",
+				     cmdno, size, cpu, size - left, p);
+				printk("          [%p]=%lx should be %lx\n", up,
+				       *up, v);
 			}
-			up++; v++;
+			up++;
+			v++;
 			left -= sizeof(unsigned long);
 		}
 	}
@@ -149,7 +153,8 @@
 			printk("ALLOC: %zu bytes marker=%d\n",
 			       cmd->size, cmd->marker);
 			ptrs[i] = __alloc_percpu(cmd->size,
-					__alignof__(unsigned long long));
+						 __alignof__(unsigned long
+							     long));
 			if (ptrs[i])
 				fill_area(ptrs[i], cmd->size, i);
 			else
@@ -191,7 +196,7 @@
 
 	printk("XXX test_pcpu:");
 	for_each_possible_cpu(cpu)
-		printk(" %p", &per_cpu(blah_blah, cpu));
+	    printk(" %p", &per_cpu(blah_blah, cpu));
 	printk("\n");
 	pcpu_dump_chunk_slots();
 
diff --git a/testcases/kernel/device-drivers/misc_modules/per_cpu_atomic_operations_vs_interrupt_disabling_module/test-cmpxchg-nolock.c b/testcases/kernel/device-drivers/misc_modules/per_cpu_atomic_operations_vs_interrupt_disabling_module/test-cmpxchg-nolock.c
index 18c48ef..f13896f 100644
--- a/testcases/kernel/device-drivers/misc_modules/per_cpu_atomic_operations_vs_interrupt_disabling_module/test-cmpxchg-nolock.c
+++ b/testcases/kernel/device-drivers/misc_modules/per_cpu_atomic_operations_vs_interrupt_disabling_module/test-cmpxchg-nolock.c
@@ -43,141 +43,142 @@
 
 static void do_testbaseline(void)
 {
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       asm volatile ("");
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		asm volatile ("");
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for baseline\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> baseline takes %llu cycles\n", time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for baseline\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> baseline takes %llu cycles\n", time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static void do_test_sync_cmpxchg(void)
 {
-       int ret;
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	int ret;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
 #ifdef CONFIG_X86_32
-       ret = sync_cmpxchg(&test_val, 0, 0);
+		ret = sync_cmpxchg(&test_val, 0, 0);
 #else
-       ret = cmpxchg(&test_val, 0, 0);
+		ret = cmpxchg(&test_val, 0, 0);
 #endif
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for locked cmpxchg\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> locked cmpxchg takes %llu cycles\n", time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for locked cmpxchg\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> locked cmpxchg takes %llu cycles\n", time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static void do_test_cmpxchg(void)
 {
-       int ret;
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	int ret;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       ret = cmpxchg_local(&test_val, 0, 0);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		ret = cmpxchg_local(&test_val, 0, 0);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for non locked cmpxchg\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> non locked cmpxchg takes %llu cycles\n", time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for non locked cmpxchg\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> non locked cmpxchg takes %llu cycles\n", time);
+	printk(KERN_ALERT "test end\n");
 }
+
 static void do_test_sync_inc(void)
 {
-       int ret;
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
-       atomic_t val;
+	int ret;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
+	atomic_t val;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       ret = atomic_add_return(10, &val);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		ret = atomic_add_return(10, &val);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for locked add return\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> locked add return takes %llu cycles\n", time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for locked add return\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> locked add return takes %llu cycles\n", time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static void do_test_inc(void)
 {
-       int ret;
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
-       local_t loc_val;
+	int ret;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
+	local_t loc_val;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       ret = local_add_return(10, &loc_val);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		ret = local_add_return(10, &loc_val);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for non locked add return\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> non locked add return takes %llu cycles\n", time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for non locked add return\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> non locked add return takes %llu cycles\n", time);
+	printk(KERN_ALERT "test end\n");
 }
 
 /*
@@ -185,109 +186,112 @@
  */
 static void do_test_enable_int(void)
 {
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       local_irq_restore(flags);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		local_irq_restore(flags);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for enabling interrupts (STI)\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> enabling interrupts (STI) takes %llu cycles\n",
-       time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT "test results: time for enabling interrupts (STI)\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> enabling interrupts (STI) takes %llu cycles\n",
+	       time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static void do_test_disable_int(void)
 {
-       unsigned long flags, flags2;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	unsigned long flags, flags2;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       local_irq_save(flags2);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		local_irq_save(flags2);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for disabling interrupts (CLI)\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> disabling interrupts (CLI) takes %llu cycles\n",
-       time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT
+	       "test results: time for disabling interrupts (CLI)\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT "-> disabling interrupts (CLI) takes %llu cycles\n",
+	       time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static void do_test_int(void)
 {
-       unsigned long flags;
-       unsigned int i;
-       cycles_t time1, time2, time;
-       u32 rem;
+	unsigned long flags;
+	unsigned int i;
+	cycles_t time1, time2, time;
+	u32 rem;
 
-       local_irq_save(flags);
-       preempt_disable();
-       time1 = get_cycles();
-       for (i = 0; i < NR_LOOPS; i++) {
-       local_irq_restore(flags);
-       local_irq_save(flags);
-       }
-       time2 = get_cycles();
-       local_irq_restore(flags);
-       preempt_enable();
-       time = time2 - time1;
+	local_irq_save(flags);
+	preempt_disable();
+	time1 = get_cycles();
+	for (i = 0; i < NR_LOOPS; i++) {
+		local_irq_restore(flags);
+		local_irq_save(flags);
+	}
+	time2 = get_cycles();
+	local_irq_restore(flags);
+	preempt_enable();
+	time = time2 - time1;
 
-       printk(KERN_ALERT "test results: time for disabling/enabling interrupts (STI/CLI)\n");
-       printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
-       printk(KERN_ALERT "total time: %llu\n", time);
-       time = div_u64_rem(time, NR_LOOPS, &rem);
-       printk(KERN_ALERT "-> enabling/disabling interrupts (STI/CLI) takes %llu cycles\n",
-       time);
-       printk(KERN_ALERT "test end\n");
+	printk(KERN_ALERT
+	       "test results: time for disabling/enabling interrupts (STI/CLI)\n");
+	printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS);
+	printk(KERN_ALERT "total time: %llu\n", time);
+	time = div_u64_rem(time, NR_LOOPS, &rem);
+	printk(KERN_ALERT
+	       "-> enabling/disabling interrupts (STI/CLI) takes %llu cycles\n",
+	       time);
+	printk(KERN_ALERT "test end\n");
 }
 
 static int ltt_test_init(void)
 {
-       printk(KERN_ALERT "test init\n");
+	printk(KERN_ALERT "test init\n");
 
-       do_testbaseline();
-       do_test_sync_cmpxchg();
-       do_test_cmpxchg();
-       do_test_sync_inc();
-       do_test_inc();
-       do_test_enable_int();
-       do_test_disable_int();
-       do_test_int();
-       return -EAGAIN; /* Fail will directly unload the module */
+	do_testbaseline();
+	do_test_sync_cmpxchg();
+	do_test_cmpxchg();
+	do_test_sync_inc();
+	do_test_inc();
+	do_test_enable_int();
+	do_test_disable_int();
+	do_test_int();
+	return -EAGAIN;		/* Fail will directly unload the module */
 }
 
 static void ltt_test_exit(void)
 {
-       printk(KERN_ALERT "test exit\n");
+	printk(KERN_ALERT "test exit\n");
 }
 
 module_init(ltt_test_init)
-module_exit(ltt_test_exit)
+    module_exit(ltt_test_exit)
 
-MODULE_LICENSE("GPL");
+    MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Mathieu Desnoyers");
 MODULE_DESCRIPTION("Cmpxchg vs int Test");
diff --git a/testcases/kernel/device-drivers/nls/nlsTest.c b/testcases/kernel/device-drivers/nls/nlsTest.c
index a4abb99..f0c39ab 100644
--- a/testcases/kernel/device-drivers/nls/nlsTest.c
+++ b/testcases/kernel/device-drivers/nls/nlsTest.c
@@ -111,7 +111,7 @@
 		      unsigned int cmd, unsigned long l)
 #endif
 {
-	int rc = 0;             /* return code */
+	int rc = 0;		/* return code */
 	int arg;
 
 	printk(KERN_DEBUG "Entered the ioctl call.\n");
diff --git a/testcases/kernel/device-drivers/nls/userBlockNLS.c b/testcases/kernel/device-drivers/nls/userBlockNLS.c
index b7de473..9596360 100644
--- a/testcases/kernel/device-drivers/nls/userBlockNLS.c
+++ b/testcases/kernel/device-drivers/nls/userBlockNLS.c
@@ -34,107 +34,116 @@
 
 int open_block_device(void);
 
-int block_dev_handle = 0;      /* handle to nls test block device */
+int block_dev_handle = 0;	/* handle to nls test block device */
 
 int main(int argc, char **argv)
 {
 
-    nlsdev_cmd_t  cmd = {0,0};
-    int rc;
+	nlsdev_cmd_t cmd = { 0, 0 };
+	int rc;
 
-    rc = open_block_device();
+	rc = open_block_device();
 
-    if (!rc) {
+	if (!rc) {
 
-        block_dev_handle = open(DEVICE_NAME, O_RDWR);
+		block_dev_handle = open(DEVICE_NAME, O_RDWR);
 
-        if (block_dev_handle < 0) {
-            printf("ERROR: Open of device %s failed %d errno = %d\n",
-		DEVICE_NAME,block_dev_handle, errno);
-        }
-        else {
-            rc = ioctl (block_dev_handle, NLSDEV_CMD, &cmd);
+		if (block_dev_handle < 0) {
+			printf
+			    ("ERROR: Open of device %s failed %d errno = %d\n",
+			     DEVICE_NAME, block_dev_handle, errno);
+		} else {
+			rc = ioctl(block_dev_handle, NLSDEV_CMD, &cmd);
 
-            printf("return from ioctl %d \n", rc);
-        }
+			printf("return from ioctl %d \n", rc);
+		}
 
-    } else {
-        printf("ERROR: Create/open block device failed\n");
-    }
+	} else {
+		printf("ERROR: Create/open block device failed\n");
+	}
 
-  return 0;
+	return 0;
 }
 
 int open_block_device()
 {
-    dev_t devt;
-    struct stat statbuf;
-    int rc;
+	dev_t devt;
+	struct stat statbuf;
+	int rc;
 
-    if (block_dev_handle == 0) {
+	if (block_dev_handle == 0) {
 
-        /* check for the /dev/ subdir, and create if it does not exist.
-         *
-         * If devfs is running and mounted on /dev, these checks will all pass,
-         * so a new node will not be created.
-         */
+		/* check for the /dev/ subdir, and create if it does not exist.
+		 *
+		 * If devfs is running and mounted on /dev, these checks will all pass,
+		 * so a new node will not be created.
+		 */
 
-        devt = makedev(NLSMAJOR, 0);
+		devt = makedev(NLSMAJOR, 0);
 
-        rc = stat(NLS_DEVICE_PATH, &statbuf);
+		rc = stat(NLS_DEVICE_PATH, &statbuf);
 
-	if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist. */
-                rc = mkdir(NLS_DEVICE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist. */
+				rc = mkdir(NLS_DEVICE_PATH, (S_IFDIR | S_IRWXU |
+							     S_IRGRP | S_IXGRP |
+							     S_IROTH |
+							     S_IXOTH));
 
-            } else {
-                printf("ERROR: Problem with INC dev directory.  Error code from stat() "
-			"is %d\n\n", errno);
-            }
-        } else {
-	    if (!(statbuf.st_mode & S_IFDIR)) {
-                rc = unlink(NLS_DEVICE_PATH);
-	        if (!rc) {
-	             rc = mkdir(NLS_DEVICE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-                }
-            }
-        }
+			} else {
+				printf
+				    ("ERROR: Problem with INC dev directory.  Error code from stat() "
+				     "is %d\n\n", errno);
+			}
+		} else {
+			if (!(statbuf.st_mode & S_IFDIR)) {
+				rc = unlink(NLS_DEVICE_PATH);
+				if (!rc) {
+					rc = mkdir(NLS_DEVICE_PATH,
+						   (S_IFDIR | S_IRWXU | S_IRGRP
+						    | S_IXGRP | S_IROTH |
+						    S_IXOTH));
+				}
+			}
+		}
 
-	/*
-         * Check for the block_device node, and create if it does not
-         * exist.
-         */
+		/*
+		 * Check for the block_device node, and create if it does not
+		 * exist.
+		 */
 
-        rc = stat(DEVICE_NAME, &statbuf);
-        if (rc) {
-	    if (errno == ENOENT) {
-                /* dev node does not exist */
-                rc = mknod(DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            } else {
-                printf("ERROR:Problem with block device node directory.  Error code form stat() is %d\n\n", errno);
-            }
+		rc = stat(DEVICE_NAME, &statbuf);
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist */
+				rc = mknod(DEVICE_NAME,
+					   (S_IFBLK | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			} else {
+				printf
+				    ("ERROR:Problem with block device node directory.  Error code form stat() is %d\n\n",
+				     errno);
+			}
 
-         } else {
-	    /*
-             * Device exists. Check to make sure it is for a
-             * block device and that it has the right major and minor.
-             */
+		} else {
+			/*
+			 * Device exists. Check to make sure it is for a
+			 * block device and that it has the right major and minor.
+			 */
 
-            if ((!(statbuf.st_mode & S_IFBLK)) ||
-                 (statbuf.st_rdev != devt)) {
-                /* Recreate the dev node. */
-                rc = unlink(DEVICE_NAME);
-                if (!rc) {
-                    rc = mknod(DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-                }
-            }
-        }
+			if ((!(statbuf.st_mode & S_IFBLK)) ||
+			    (statbuf.st_rdev != devt)) {
+				/* Recreate the dev node. */
+				rc = unlink(DEVICE_NAME);
+				if (!rc) {
+					rc = mknod(DEVICE_NAME,
+						   (S_IFBLK | S_IRUSR | S_IWUSR
+						    | S_IRGRP | S_IWGRP), devt);
+				}
+			}
+		}
 
-    }
-    return rc;
+	}
+	return rc;
 }
diff --git a/testcases/kernel/device-drivers/pci/tpci/tpci.c b/testcases/kernel/device-drivers/pci/tpci/tpci.c
index 7d4457d..c994c55 100644
--- a/testcases/kernel/device-drivers/pci/tpci/tpci.c
+++ b/testcases/kernel/device-drivers/pci/tpci/tpci.c
@@ -47,13 +47,15 @@
 #include "tpci.h"
 #include "st_tpci.h"
 
-MODULE_AUTHOR("Sean Ruyle <srruyle@us.ibm.com>, Amit Khanna <amit.khanna@intel.com>");
+MODULE_AUTHOR
+    ("Sean Ruyle <srruyle@us.ibm.com>, Amit Khanna <amit.khanna@intel.com>");
 MODULE_DESCRIPTION(TPCI_TEST_DRIVER_NAME);
 MODULE_LICENSE("GPL");
 
-static int tpci_ioctl (struct inode *, struct file *, unsigned int, unsigned long);
-static int tpci_open (struct inode *, struct file *);
-static int tpci_close (struct inode *, struct file *);
+static int tpci_ioctl(struct inode *, struct file *, unsigned int,
+		      unsigned long);
+static int tpci_open(struct inode *, struct file *);
+static int tpci_close(struct inode *, struct file *);
 
 static int probe_pci_dev(void);
 static int pci_enable(void);
@@ -85,19 +87,21 @@
  * correct file descriptor
  */
 static struct file_operations tpci_fops = {
-	open : tpci_open,
-	release: tpci_close,
-	ioctl: tpci_ioctl,
+open:	tpci_open,
+release:tpci_close,
+ioctl:	tpci_ioctl,
 };
 
 /*
  * open and close operations
  */
-static int tpci_open(struct inode *ino, struct file *f) {
+static int tpci_open(struct inode *ino, struct file *f)
+{
 	return 0;
 }
 
-static int tpci_close(struct inode *ino, struct file *f) {
+static int tpci_close(struct inode *ino, struct file *f)
+{
 	return 0;
 }
 
@@ -111,74 +115,117 @@
  *
  */
 static int tpci_ioctl(struct inode *ino, struct file *f,
-			unsigned int cmd, unsigned long l) {
-	int 			rc;
-	struct tpci_interface	tif;
-	caddr_t			*inparms;
-	caddr_t			*outparms;
+		      unsigned int cmd, unsigned long l)
+{
+	int rc;
+	struct tpci_interface tif;
+	caddr_t *inparms;
+	caddr_t *outparms;
 
 	printk("Enter tpci_ioctl\n");
 
-	inparms	= NULL;
+	inparms = NULL;
 	outparms = NULL;
 	rc = 0;
 
 	if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
 		/* Bad address */
-		return(-EFAULT);
+		return (-EFAULT);
 	}
 
 	/*
 	 * Setup inparms and outparms as needed
 	 */
 	if (tif.in_len > 0) {
-		inparms = (caddr_t *)kmalloc(tif.in_len, GFP_KERNEL);
+		inparms = (caddr_t *) kmalloc(tif.in_len, GFP_KERNEL);
 		if (!inparms) {
-			return(-ENOMEM);
+			return (-ENOMEM);
 		}
 
 		rc = copy_from_user(inparms, tif.in_data, tif.in_len);
 		if (rc) {
 			kfree(inparms);
-			return(-EFAULT);
+			return (-EFAULT);
 		}
 	}
 	if (tif.out_len > 0) {
-		outparms = (caddr_t *)kmalloc(tif.out_len, GFP_KERNEL);
+		outparms = (caddr_t *) kmalloc(tif.out_len, GFP_KERNEL);
 		if (!outparms) {
 			kfree(inparms);
-			return(-ENOMEM);
+			return (-ENOMEM);
 		}
 	}
 
 	/*
 	 * determine which call to make on the cmd value
 	 */
-	switch(cmd) {
-		case PCI_PROBE: 	rc = probe_pci_dev(); break;
-		case PCI_ENABLE: 	rc = pci_enable(); break;
-		case PCI_DISABLE:	rc = pci_disable(); break;
-		case FIND_BUS:		rc = test_find_bus(); break;
-		case FIND_CLASS:	rc = test_find_class(); break;
-		case FIND_DEVICE:	rc = test_find_device(); break;
-		case FIND_SUBSYS:	rc = test_find_subsys(); break;
-		case BUS_SCAN:		rc = test_scan_bus(); break;
-		case SLOT_SCAN:		rc = test_slot_scan(); break;
-		case BUS_ADD_DEVICES:	rc = test_bus_add_devices(); break;
-		case ENABLE_BRIDGES:	rc = test_enable_bridges(); break;
-		case MATCH_DEVICE:	rc = test_match_device(); break;
-		case REG_DRIVER:	rc = test_reg_driver(); break;
-		case UNREG_DRIVER:	rc = test_unreg_driver(); break;
-		case PCI_RESOURCES:	rc = test_assign_resources(); break;
-		case SAVE_STATE:	rc = test_save_state(); break;
-		case RESTORE_STATE:	rc = test_restore_state(); break;
-		case TEST_MAX_BUS:	rc = test_max_bus(); break;
-		case FIND_CAP:		rc = test_find_cap(); break;
-		case FIND_PCI_EXP_CAP:  rc = test_find_pci_exp_cap(); break;
-		case READ_PCI_EXP_CONFIG:  rc = test_read_pci_exp_config(); break;
-		default:
-			printk("Mismatching ioctl command\n");
-			break;
+	switch (cmd) {
+	case PCI_PROBE:
+		rc = probe_pci_dev();
+		break;
+	case PCI_ENABLE:
+		rc = pci_enable();
+		break;
+	case PCI_DISABLE:
+		rc = pci_disable();
+		break;
+	case FIND_BUS:
+		rc = test_find_bus();
+		break;
+	case FIND_CLASS:
+		rc = test_find_class();
+		break;
+	case FIND_DEVICE:
+		rc = test_find_device();
+		break;
+	case FIND_SUBSYS:
+		rc = test_find_subsys();
+		break;
+	case BUS_SCAN:
+		rc = test_scan_bus();
+		break;
+	case SLOT_SCAN:
+		rc = test_slot_scan();
+		break;
+	case BUS_ADD_DEVICES:
+		rc = test_bus_add_devices();
+		break;
+	case ENABLE_BRIDGES:
+		rc = test_enable_bridges();
+		break;
+	case MATCH_DEVICE:
+		rc = test_match_device();
+		break;
+	case REG_DRIVER:
+		rc = test_reg_driver();
+		break;
+	case UNREG_DRIVER:
+		rc = test_unreg_driver();
+		break;
+	case PCI_RESOURCES:
+		rc = test_assign_resources();
+		break;
+	case SAVE_STATE:
+		rc = test_save_state();
+		break;
+	case RESTORE_STATE:
+		rc = test_restore_state();
+		break;
+	case TEST_MAX_BUS:
+		rc = test_max_bus();
+		break;
+	case FIND_CAP:
+		rc = test_find_cap();
+		break;
+	case FIND_PCI_EXP_CAP:
+		rc = test_find_pci_exp_cap();
+		break;
+	case READ_PCI_EXP_CONFIG:
+		rc = test_read_pci_exp_config();
+		break;
+	default:
+		printk("Mismatching ioctl command\n");
+		break;
 	}
 
 	if (!(ltp_pci.dev))
@@ -199,7 +246,7 @@
 	}
 
 	/* copy tif structure into l so that can be used by user program */
-	if (copy_to_user((void*)l, &tif, sizeof(tif))) {
+	if (copy_to_user((void *)l, &tif, sizeof(tif))) {
 		printk("tpci: Unsuccessful copy_to_user of tif\n");
 		rc = -EFAULT;
 	}
@@ -223,10 +270,13 @@
  * 	calls in this kernel module, select first device
  * 	that finds for use, do not need a specific device
  */
-static int probe_pci_dev() {
+static int probe_pci_dev()
+{
 	unsigned int i, j;
-	struct pci_dev *dev = (struct pci_dev *)kmalloc(sizeof(struct pci_dev),GFP_KERNEL);
-	struct pci_bus *bus = (struct pci_bus *)kmalloc(sizeof(struct pci_bus),GFP_KERNEL);
+	struct pci_dev *dev =
+	    (struct pci_dev *)kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
+	struct pci_bus *bus =
+	    (struct pci_bus *)kmalloc(sizeof(struct pci_bus), GFP_KERNEL);
 
 	/* Zero out the ltp_pci */
 	memset(&ltp_pci, 0, sizeof(tpci_user_t));
@@ -239,15 +289,19 @@
 		for (j = MAX_DEVFN; j > 1; j--) {
 			dev = pci_find_slot(i, j);
 			if (dev && dev->driver) {
-				printk("tpci: found pci_dev, bus %d, devfn %d\n", i, j);
-				printk("Slot number: %d\n", dev->devfn );
+				printk
+				    ("tpci: found pci_dev, bus %d, devfn %d\n",
+				     i, j);
+				printk("Slot number: %d\n", dev->devfn);
 
 				bus = dev->bus;
-				printk("Bus number: %d\n", bus->number );
+				printk("Bus number: %d\n", bus->number);
 
 				/* copy data into ltp_pci struct */
-				memcpy(ltp_pci.dev, dev, sizeof(struct pci_dev));
-				memcpy(ltp_pci.bus, bus, sizeof(struct pci_bus));
+				memcpy(ltp_pci.dev, dev,
+				       sizeof(struct pci_dev));
+				memcpy(ltp_pci.bus, bus,
+				       sizeof(struct pci_bus));
 
 				return 0;
 			}
@@ -264,7 +318,8 @@
  * 	enable a pci device so that it may be used in
  * 	later testing in the user test program
  */
-static int pci_enable() {
+static int pci_enable()
+{
 	int rc = 0;
 
 	struct pci_dev *dev = ltp_pci.dev;
@@ -278,8 +333,7 @@
 	if (pci_enable_device(dev)) {
 		printk("tpci: failed to enable pci device\n");
 		rc = 1;
-	}
-	else {
+	} else {
 		printk("tpci: enabled pci device\n");
 		rc = 0;
 	}
@@ -291,7 +345,8 @@
  * pci_disable
  *	call to pci_disable_device
  */
-static int pci_disable() {
+static int pci_disable()
+{
 	int rc = 0;
 
 	struct pci_dev *dev = ltp_pci.dev;
@@ -307,8 +362,7 @@
 	if (dev->current_state == 4 || dev->current_state == 3) {
 		printk("tpci: disabled pci device\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("tpci: failed to disable pci device\n");
 		rc = 1;
 	}
@@ -322,7 +376,8 @@
  *	pointer in ltp_pci, make sure that returns
  * 	bus with same values
  */
-static int test_find_bus() {
+static int test_find_bus()
+{
 	int rc;
 	int num = ltp_pci.bus->number;
 	struct pci_bus *temp = NULL;
@@ -332,12 +387,10 @@
 	if (!temp) {
 		printk("tpci: pci_find_bus failed to return bus pointer\n");
 		rc = 1;
-	}
-	else if (temp->number != num) {
+	} else if (temp->number != num) {
 		printk("tpci: returned bus pointer w/ wrong bus number\n");
 		rc = 1;
-	}
-	else {
+	} else {
 		printk("tpci: success returned bus pointer \n");
 		rc = 0;
 	}
@@ -350,7 +403,8 @@
  *	call to pci_find_class, using values from the
  *	pci_dev pointer in ltp_pci structure
  */
-static int test_find_class() {
+static int test_find_class()
+{
 	int rc;
 	unsigned int num = ltp_pci.dev->class;
 	struct pci_dev *temp = NULL;
@@ -360,8 +414,7 @@
 	if (!temp) {
 		printk("tpci: failed to find pci device from class number\n");
 		rc = 1;
-	}
-	else {
+	} else {
 		printk("tpci: found pci device from class number\n");
 		rc = 0;
 	}
@@ -375,24 +428,23 @@
  *	parameters from pci_dev pointer in the
  *	ltp_pci structure
  */
-static int test_find_device() {
+static int test_find_device()
+{
 	int rc;
 	struct pci_dev *temp = NULL;
-	unsigned short ven = ltp_pci.dev->vendor,
-		       dev = ltp_pci.dev->device;
+	unsigned short ven = ltp_pci.dev->vendor, dev = ltp_pci.dev->device;
 
 	temp = pci_find_device(ven, dev, NULL);
 
-        if (!temp) {
-                printk("tpci: failed to find pci device from device info\n");
-                rc = 1;
-        }
-        else {
-                printk("tpci: found pci device from device info\n");
-                rc = 0;
-        }
+	if (!temp) {
+		printk("tpci: failed to find pci device from device info\n");
+		rc = 1;
+	} else {
+		printk("tpci: found pci device from device info\n");
+		rc = 0;
+	}
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -401,26 +453,26 @@
  *	pci_dev pointer in ltp_pci structure to
  *	find pci_dev from subsys info
  */
-static int test_find_subsys() {
+static int test_find_subsys()
+{
 	int rc;
 	struct pci_dev *temp = NULL;
-	unsigned short  ven = ltp_pci.dev->vendor,
-			dev = ltp_pci.dev->device,
-			ss_ven = ltp_pci.dev->subsystem_vendor,
-			ss_dev = ltp_pci.dev->subsystem_device;
+	unsigned short ven = ltp_pci.dev->vendor,
+	    dev = ltp_pci.dev->device,
+	    ss_ven = ltp_pci.dev->subsystem_vendor,
+	    ss_dev = ltp_pci.dev->subsystem_device;
 
 	temp = pci_find_subsys(ven, dev, ss_ven, ss_dev, NULL);
 
 	if (!temp) {
-                printk("tpci: failed to find pci device from subsys info\n");
-                rc = 1;
-        }
-        else {
-                printk("tpci: found pci device from subsys info\n");
-                rc = 0;
-        }
+		printk("tpci: failed to find pci device from subsys info\n");
+		rc = 1;
+	} else {
+		printk("tpci: found pci device from subsys info\n");
+		rc = 0;
+	}
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -430,7 +482,8 @@
  * 	return a an integer for how far the
  *	function got in scanning bus
  */
-static int test_scan_bus() {
+static int test_scan_bus()
+{
 	int rc, num;
 	struct pci_bus *bus = ltp_pci.bus;
 
@@ -440,11 +493,10 @@
 	 * check if returned number is greater than
 	 * max number of bus or less than 0
 	 */
-	if (num > MAX_BUS ||  num < 0) {
+	if (num > MAX_BUS || num < 0) {
 		printk("tpci: Failed scan bus\n");
 		rc = 1;
-	}
-	else {
+	} else {
 		printk("tpci: Success scan bus\n");
 		rc = 0;
 	}
@@ -458,7 +510,8 @@
  *	find the device pointer and setup the
  *	device info
  */
-static int test_slot_scan() {
+static int test_slot_scan()
+{
 	int rc, ret;
 	int num = ltp_pci.dev->devfn;
 	struct pci_bus *bus = ltp_pci.bus;
@@ -468,8 +521,7 @@
 	if (ret > 0) {
 		printk("tpci: Found device from scan slot\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("tpci: Failed find device from scan slot\n");
 		rc = 1;
 	}
@@ -484,7 +536,8 @@
  *	that is passed in for more devices
  *	that it can add
  */
-static int test_bus_add_devices() {
+static int test_bus_add_devices()
+{
 	int rc;
 	struct pci_bus *bus = ltp_pci.bus;
 
@@ -493,8 +546,7 @@
 	if (bus) {
 		printk("tpci: Called bus_add_device\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("tpci: bus_add_device failed\n");
 		rc = 1;
 	}
@@ -508,22 +560,22 @@
  *	use bus pointer from the ltp_pci
  *	structure
  */
-static int test_enable_bridges() {
+static int test_enable_bridges()
+{
 	int rc;
 	struct pci_bus *bus = ltp_pci.bus;
 
 	pci_enable_bridges(bus);
 
 	if (bus) {
-                printk("tpci: Called enable bridges\n");
-                rc = 0;
-        }
-        else {
-                printk("tpci: enable_bridges failed\n");
-                rc = 1;
-        }
+		printk("tpci: Called enable bridges\n");
+		rc = 0;
+	} else {
+		printk("tpci: enable_bridges failed\n");
+		rc = 1;
+	}
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -531,7 +583,8 @@
  *	make call to pci_match_device, returns a
  *	pci_device_id pointer
  */
-static int test_match_device() {
+static int test_match_device()
+{
 	int rc;
 	struct pci_dev *dev = ltp_pci.dev;
 	struct pci_driver *drv;
@@ -549,8 +602,7 @@
 	if (id) {
 		printk("tpci: Match device success\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("tpci: Failed return pci_device_id \n");
 		rc = 1;
 	}
@@ -564,9 +616,11 @@
  *	register the driver for a device with the
  *	system
  */
-static int test_reg_driver() {
+static int test_reg_driver()
+{
 	int rc, ret;
-	struct pci_driver *drv = (struct pci_driver *)kmalloc(sizeof(struct pci_driver), GFP_KERNEL);
+	struct pci_driver *drv =
+	    (struct pci_driver *)kmalloc(sizeof(struct pci_driver), GFP_KERNEL);
 	struct pci_driver *tmp = ltp_pci.dev->driver;
 
 	/* zero out drv structure */
@@ -590,8 +644,7 @@
 	if (ret) {
 		printk("tpci: Success driver register\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		rc = 1;
 		printk("tpci: unsuccessful registering pci driver\n");
 	}
@@ -604,26 +657,26 @@
  *	make call to pci_unregister_driver, which will
  *	unregister the driver for a device from the system
  */
-static int test_unreg_driver() {
+static int test_unreg_driver()
+{
 	int rc;
-        struct pci_driver *drv = ltp_pci.drv;
+	struct pci_driver *drv = ltp_pci.drv;
 
-        if (!drv) {
-                printk("tpci: Device does not have a driver pointer\n");
-                return 1;
-        }
-
-        pci_unregister_driver(drv);
-        if (!drv) {
-                printk("tpci: Unsuccesful driver unregister\n");
-		rc = 1;
+	if (!drv) {
+		printk("tpci: Device does not have a driver pointer\n");
+		return 1;
 	}
-        else {
-                printk("tpci: unregistering pci driver\n");
+
+	pci_unregister_driver(drv);
+	if (!drv) {
+		printk("tpci: Unsuccesful driver unregister\n");
+		rc = 1;
+	} else {
+		printk("tpci: unregistering pci driver\n");
 		rc = 0;
 	}
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -631,13 +684,14 @@
  *	make calls to pci_assign_resource, will need
  *	to setup a dev pointer and resource pointer,
  */
-static int test_assign_resources() {
+static int test_assign_resources()
+{
 	int rc;
 	struct pci_dev *dev = ltp_pci.dev;
 	int resno;
 
 	for (resno = 0; resno < 7; resno++) {
-		struct resource *r = dev->resource +resno;
+		struct resource *r = dev->resource + resno;
 		if (r->flags)
 			pci_assign_resource(dev, resno);
 	}
@@ -645,7 +699,7 @@
 	/*
 	 * enable device after call to assign resource
 	 * because might error if (!r->start && r->end)
-	*/
+	 */
 	rc = pci_enable_device(dev);
 
 	return rc;
@@ -656,7 +710,8 @@
  *	make call to pci_save_state, takes in a u32*
  * 	buffer
  */
-static int test_save_state() {
+static int test_save_state()
+{
 	int rc;
 	u32 *buffer = ltp_pci.state;
 	struct pci_dev *dev = ltp_pci.dev;
@@ -675,18 +730,19 @@
  *	make call to pci_restore_state, get the state buffer
  *	should have been previously filled out by save state
  */
-static int test_restore_state() {
+static int test_restore_state()
+{
 	int rc;
 	u32 *buffer = ltp_pci.state;
 	struct pci_dev *dev = ltp_pci.dev;
 
 	rc = pci_restore_state(dev, buffer);
-        if (rc)
-                printk("tpci: Failed restore state\n");
-        else
-                printk("tpci: Restored state of device\n");
+	if (rc)
+		printk("tpci: Failed restore state\n");
+	else
+		printk("tpci: Restored state of device\n");
 
-        return rc;
+	return rc;
 }
 
 /*
@@ -694,15 +750,15 @@
  *	make call to pci_max_busnr, which will determine
  *	the max number of bus on the system
  */
-static int test_max_bus() {
+static int test_max_bus()
+{
 	int rc, ret;
 
 	ret = pci_max_busnr();
 	if (ret) {
 		printk("Found max busnr\n");
 		rc = 0;
-	}
-	else {
+	} else {
 		printk("Did not return max busnr\n");
 		rc = 1;
 	}
@@ -717,7 +773,8 @@
  *	capability, use second parameter to specify
  *	which capability you are looking for
  */
-static int test_find_cap() {
+static int test_find_cap()
+{
 	int rc;
 	struct pci_dev *dev = ltp_pci.dev;
 
@@ -737,15 +794,16 @@
  *  use second parameter to specify which capability
  *  you are looking for
  */
-static int test_find_pci_exp_cap() {
+static int test_find_pci_exp_cap()
+{
 	int rc;
 	struct pci_dev *dev = ltp_pci.dev;
 
 	rc = pci_find_capability(dev, PCI_CAP_ID_EXP);
 	if (rc)
-	 	printk("tpci: Device has PCI-EXP capability\n");
+		printk("tpci: Device has PCI-EXP capability\n");
 	else
-		printk ("tpci: Device doesn't have PCI-EXP capability\n");
+		printk("tpci: Device doesn't have PCI-EXP capability\n");
 	return rc;
 }
 
@@ -755,26 +813,32 @@
  *  the PCI-Express enhanced config space of this
  *  device can be read successfully.
  */
-static int test_read_pci_exp_config() {
+static int test_read_pci_exp_config()
+{
 	int rc;
-	int reg= 100, len= 4; /*PCI-Exp enhanced config register 0x100, 4 implies dword access*/
+	int reg = 100, len = 4;	/*PCI-Exp enhanced config register 0x100, 4 implies dword access */
 	struct pci_dev *dev = ltp_pci.dev;
 
 	u32 data, *value;
 
-	printk("tpci: Device(%d) on bus(%d) & slot(%d) \n",dev,dev->bus->number,dev->devfn);
+	printk("tpci: Device(%d) on bus(%d) & slot(%d) \n", dev,
+	       dev->bus->number, dev->devfn);
 	printk("tpci: Reading the PCI Express configuration registers---\n");
 
-	printk("tpci: Reading PCI-Express AER CAP-ID REGISTER at Enh-Cfg AddrSpace 0x100\n");
+	printk
+	    ("tpci: Reading PCI-Express AER CAP-ID REGISTER at Enh-Cfg AddrSpace 0x100\n");
 
-	rc = pci_config_read(0, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), reg        , len, &data);
+	rc = pci_config_read(0, dev->bus->number, PCI_SLOT(dev->devfn),
+			     PCI_FUNC(dev->devfn), reg, len, &data);
 
-	*value = (u32)data;
+	*value = (u32) data;
 
-	if (*value==AER_CAP_ID_VALUE) /*comparing the value read with AER_CAP_ID_VALUE macro */
-	printk("tpci: \nCorrect value read using PCI-Express driver installed\n\n");
+	if (*value == AER_CAP_ID_VALUE)	/*comparing the value read with AER_CAP_ID_VALUE macro */
+		printk
+		    ("tpci: \nCorrect value read using PCI-Express driver installed\n\n");
 	else
-	printk("tpci: \nIncorrect value read. PCI-Express driver/device not installed\n\n");
+		printk
+		    ("tpci: \nIncorrect value read. PCI-Express driver/device not installed\n\n");
 
 	return rc;
 }
@@ -785,7 +849,8 @@
  * 	as a char device, and perform any necessary
  * 	initialization for pci devices
  */
-static int tpci_init_module(void) {
+static int tpci_init_module(void)
+{
 	int rc;
 
 	SET_MODULE_OWNER(&tpci_fops);
@@ -808,7 +873,8 @@
  * 	unregister the device and any necessary
  * 	operations to close for pci devices
  */
-static void tpci_exit_module(void) {
+static void tpci_exit_module(void)
+{
 	int rc;
 
 	kfree(ltp_pci.dev);
@@ -824,4 +890,4 @@
 }
 
 module_init(tpci_init_module)
-module_exit(tpci_exit_module)
+    module_exit(tpci_exit_module)
diff --git a/testcases/kernel/device-drivers/pci/tpci/tpci.mod.c b/testcases/kernel/device-drivers/pci/tpci/tpci.mod.c
index 73433c4..0301727 100644
--- a/testcases/kernel/device-drivers/pci/tpci/tpci.mod.c
+++ b/testcases/kernel/device-drivers/pci/tpci/tpci.mod.c
@@ -23,10 +23,7 @@
 #include <linux/compiler.h>
 
 const char vermagic[]
-__attribute__((section("__vermagic"))) =
-VERMAGIC_STRING;
+    __attribute__ ((section("__vermagic"))) = VERMAGIC_STRING;
 
 static const char __module_depends[]
-__attribute_used__
-__attribute__((section(".modinfo"))) =
-"depends=";
+ __attribute_used__ __attribute__ ((section(".modinfo"))) = "depends=";
diff --git a/testcases/kernel/device-drivers/pci/user_tpci/tpci_ki.c b/testcases/kernel/device-drivers/pci/user_tpci/tpci_ki.c
index a27ab38..91e1471 100644
--- a/testcases/kernel/device-drivers/pci/user_tpci/tpci_ki.c
+++ b/testcases/kernel/device-drivers/pci/user_tpci/tpci_ki.c
@@ -40,40 +40,42 @@
 #include <sys/ioctl.h>
 #include "../tpci/tpci.h"
 
-int ki_generic(int fd, int flag) {
-        int                     rc;
-        tpci_interface_t        tif;
+int ki_generic(int fd, int flag)
+{
+	int rc;
+	tpci_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data = 0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for flag
-         */
-        rc = ioctl(fd, flag, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
+	/*
+	 * ioctl call for flag
+	 */
+	rc = ioctl(fd, flag, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
 	if (tif.out_rc) {
 		printf("Specific errorr: ");
 		return tif.out_rc;
 	}
 
-        return rc;
+	return rc;
 }
 
 #if 0
-int ki_probe_pci_dev(int fd) {
+int ki_probe_pci_dev(int fd)
+{
 
-	int 			rc;
-	tpci_interface_t	tif;
+	int rc;
+	tpci_interface_t tif;
 
 	/*
 	 * build interface structure
@@ -100,49 +102,51 @@
 	return rc;
 }
 
-int ki_enable_pci(int fd) {
+int ki_enable_pci(int fd)
+{
 
-	int 			rc;
-	tpci_interface_t	tif;
+	int rc;
+	tpci_interface_t tif;
 
 	/*
 	 * build interface structure
 	 */
 	tif.in_len = 0;
-        tif.in_data =0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
 	/*
 	 * ioctl call for PCI_ENABLE
 	 */
 	rc = ioctl(fd, PCI_ENABLE, &tif);
 	if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc) {
-                printf("Specific error in ioctl call\n");
-                return tif.out_rc;
-        }
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc) {
+		printf("Specific error in ioctl call\n");
+		return tif.out_rc;
+	}
 
-        return rc;
+	return rc;
 }
 
-int ki_disable_pci(int fd) {
+int ki_disable_pci(int fd)
+{
 
-	int 			rc;
-	tpci_interface_t	tif;
+	int rc;
+	tpci_interface_t tif;
 
 	/*
 	 * build interface structure
 	 */
 	tif.in_len = 0;
-        tif.in_data =0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
 	/*
 	 * ioctl call for PCI_DISABLE
@@ -160,34 +164,35 @@
 	return rc;
 }
 
-int ki_find_bus(int fd) {
+int ki_find_bus(int fd)
+{
 
-        int                     rc;
-        tpci_interface_t        tif;
+	int rc;
+	tpci_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data =0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for PCI_DISABLE
-         */
-        rc = ioctl(fd, FIND_BUS, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc) {
-                printf("Specific error in ioctl call\n");
-                return tif.out_rc;
-        }
+	/*
+	 * ioctl call for PCI_DISABLE
+	 */
+	rc = ioctl(fd, FIND_BUS, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc) {
+		printf("Specific error in ioctl call\n");
+		return tif.out_rc;
+	}
 
-        return rc;
+	return rc;
 }
 
 #endif
diff --git a/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c b/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
index f08be18..3d4cc45 100644
--- a/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
+++ b/testcases/kernel/device-drivers/pci/user_tpci/user_tpci.c
@@ -31,90 +31,98 @@
 
 static int tpci_fd = -1;	/* file descriptor */
 
-int
-tpciopen() {
+int tpciopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TPCI_MAJOR, 0);
+	devt = makedev(TPCI_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tpci_fd = open(DEVICE_NAME, O_RDWR);
+	tpci_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tpci_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tpci_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tpci_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tpci_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tpciclose() {
+int tpciclose()
+{
 
 	if (tpci_fd != -1) {
-		close (tpci_fd);
+		close(tpci_fd);
 		tpci_fd = -1;
 	}
 
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int rc;
 
 	rc = tpciopen();
@@ -127,13 +135,13 @@
 	if (ki_generic(tpci_fd, PCI_PROBE)) {
 		printf("Failed to find a pci device\n");
 		exit(1);
-	}
-	else
+	} else
 		printf("Success probing for pci device\n");
 
 	/* test disable device */
 	if (ki_generic(tpci_fd, PCI_DISABLE))
-		printf("Failed to disable device \nMay still be in use by system\n");
+		printf
+		    ("Failed to disable device \nMay still be in use by system\n");
 	else
 		printf("Disabled device\n");
 
@@ -145,51 +153,51 @@
 
 	/* test find from bus */
 	if (ki_generic(tpci_fd, FIND_BUS))
-                printf("Failed to find from bus pointer\n");
-        else
-                printf("Found device from bus pointer\n");
+		printf("Failed to find from bus pointer\n");
+	else
+		printf("Found device from bus pointer\n");
 
 	/* test find from device */
 	if (ki_generic(tpci_fd, FIND_DEVICE))
-                printf("Failed to find device from device info\n");
-        else
-                printf("Found device from device info\n");
+		printf("Failed to find device from device info\n");
+	else
+		printf("Found device from device info\n");
 
 	/* test find from class */
 	if (ki_generic(tpci_fd, FIND_CLASS))
-                printf("Failed to find device from class\n");
-        else
-                printf("Found device from class \n");
+		printf("Failed to find device from class\n");
+	else
+		printf("Found device from class \n");
 
 	/* test find subsys */
 	if (ki_generic(tpci_fd, FIND_SUBSYS))
-                printf("Failed to find device from subsys info\n");
-        else
-                printf("Found device from subsys info\n");
+		printf("Failed to find device from subsys info\n");
+	else
+		printf("Found device from subsys info\n");
 
 	/* test scan bus */
 	if (ki_generic(tpci_fd, BUS_SCAN))
-                printf("Failed on bus scan call\n");
-        else
-                printf("Success scanning bus\n");
+		printf("Failed on bus scan call\n");
+	else
+		printf("Success scanning bus\n");
 
 	/* test scan slot */
 	if (ki_generic(tpci_fd, SLOT_SCAN))
-                printf("Failed on scan slot \n");
-        else
-                printf("Success scan slot\n");
+		printf("Failed on scan slot \n");
+	else
+		printf("Success scan slot\n");
 
 	/* test enable bridges */
 	if (ki_generic(tpci_fd, ENABLE_BRIDGES))
-                printf("Failed to enable bridges\n");
-        else
-                printf("Enabled bridges\n");
+		printf("Failed to enable bridges\n");
+	else
+		printf("Enabled bridges\n");
 
 	/* test bus add devices */
 	if (ki_generic(tpci_fd, BUS_ADD_DEVICES))
-                printf("Failed on bus add devices call\n");
-        else
-                printf("Success bus add devices\n");
+		printf("Failed on bus add devices call\n");
+	else
+		printf("Success bus add devices\n");
 
 	/* test match device */
 	if (ki_generic(tpci_fd, MATCH_DEVICE))
@@ -200,22 +208,22 @@
 #if 0
 	/* test unregister driver */
 	if (ki_generic(tpci_fd, UNREG_DRIVER))
-                printf("Failed to unregister driver\n");
-        else
-                printf("Unregistered driver\n");
+		printf("Failed to unregister driver\n");
+	else
+		printf("Unregistered driver\n");
 #endif
 
 	/* test register driver */
 	if (ki_generic(tpci_fd, REG_DRIVER))
-                printf("Failed to register driver\n");
-        else
-                printf("Registerd driver\n");
+		printf("Failed to register driver\n");
+	else
+		printf("Registerd driver\n");
 
 	/* test pci resources */
 	if (ki_generic(tpci_fd, PCI_RESOURCES))
-                printf("Failed on pci_resources call\n");
-        else
-                printf("Success pci resources\n");
+		printf("Failed on pci_resources call\n");
+	else
+		printf("Success pci resources\n");
 
 	/* test save state */
 	if (ki_generic(tpci_fd, SAVE_STATE))
@@ -230,10 +238,10 @@
 		printf("Restored state\n");
 
 	/* test max bus */
-        if (ki_generic(tpci_fd, TEST_MAX_BUS))
-                printf("Failed on max bus call\n");
-        else
-                printf("Success max bus \n");
+	if (ki_generic(tpci_fd, TEST_MAX_BUS))
+		printf("Failed on max bus call\n");
+	else
+		printf("Success max bus \n");
 
 	if (ki_generic(tpci_fd, FIND_CAP))
 		printf("Does not have tested capability\n");
@@ -242,9 +250,9 @@
 
 	rc = tpciclose();
 	if (rc) {
-                printf("Test PCI Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test PCI Driver may not be closed\n");
+		exit(1);
+	}
 
 	return 0;
 }
diff --git a/testcases/kernel/device-drivers/rtc/rtc-test.c b/testcases/kernel/device-drivers/rtc/rtc-test.c
index 8f4eebe..28c1113 100644
--- a/testcases/kernel/device-drivers/rtc/rtc-test.c
+++ b/testcases/kernel/device-drivers/rtc/rtc-test.c
@@ -42,98 +42,98 @@
 
 void read_alarm_test(void)
 {
-       struct rtc_time rtc_tm;
-       int ret;
-       unsigned long data;
-       fd_set rfds;
-       struct timeval tv;
+	struct rtc_time rtc_tm;
+	int ret;
+	unsigned long data;
+	fd_set rfds;
+	struct timeval tv;
 
-       tst_resm(TINFO, "RTC READ TEST:");
+	tst_resm(TINFO, "RTC READ TEST:");
 
-        /*Read RTC Time*/
-       ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_RD_TIME ioctl failed");
-               return;
-       }
+	/*Read RTC Time */
+	ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_RD_TIME ioctl failed");
+		return;
+	}
 
-       tst_resm(TPASS, "RTC READ TEST Passed");
+	tst_resm(TPASS, "RTC READ TEST Passed");
 
-       tst_resm(TINFO, "Current RTC date/time is %d-%d-%d, %02d:%02d:%02d.",
-                rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900,
-                rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
+	tst_resm(TINFO, "Current RTC date/time is %d-%d-%d, %02d:%02d:%02d.",
+		 rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900,
+		 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
 
-       tst_resm(TINFO, "RTC ALARM TEST :");
+	tst_resm(TINFO, "RTC ALARM TEST :");
 
-       /*set Alarm to 5 Seconds*/
-       rtc_tm.tm_sec += 5;
-       if (rtc_tm.tm_sec >= 60) {
-               rtc_tm.tm_sec %= 60;
-               rtc_tm.tm_min++;
-       }
+	/*set Alarm to 5 Seconds */
+	rtc_tm.tm_sec += 5;
+	if (rtc_tm.tm_sec >= 60) {
+		rtc_tm.tm_sec %= 60;
+		rtc_tm.tm_min++;
+	}
 
-       if (rtc_tm.tm_min == 60) {
-               rtc_tm.tm_min = 0;
-               rtc_tm.tm_hour++;
-       }
+	if (rtc_tm.tm_min == 60) {
+		rtc_tm.tm_min = 0;
+		rtc_tm.tm_hour++;
+	}
 
-       if (rtc_tm.tm_hour == 24)
-       rtc_tm.tm_hour = 0;
+	if (rtc_tm.tm_hour == 24)
+		rtc_tm.tm_hour = 0;
 
-       ret = ioctl(rtc_fd, RTC_ALM_SET, &rtc_tm);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_ALM_SET ioctl failed");
-               return;
-       }
+	ret = ioctl(rtc_fd, RTC_ALM_SET, &rtc_tm);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_ALM_SET ioctl failed");
+		return;
+	}
 
-       /*Read current alarm time*/
-       ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_ALM_READ ioctl failed");
-               return;
-       }
+	/*Read current alarm time */
+	ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_ALM_READ ioctl failed");
+		return;
+	}
 
-       tst_resm(TINFO, "Alarm time set to %02d:%02d:%02d.",
-               rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
-       /* Enable alarm interrupts */
-       ret = ioctl(rtc_fd, RTC_AIE_ON, 0);
-       if (ret == -1) {
-               tst_resm(TINFO, "RTC_AIE_ON ioctl failed");
-               return;
-       }
+	tst_resm(TINFO, "Alarm time set to %02d:%02d:%02d.",
+		 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
+	/* Enable alarm interrupts */
+	ret = ioctl(rtc_fd, RTC_AIE_ON, 0);
+	if (ret == -1) {
+		tst_resm(TINFO, "RTC_AIE_ON ioctl failed");
+		return;
+	}
 
-       tst_resm(TINFO, "Waiting 5 seconds for the alarm...");
+	tst_resm(TINFO, "Waiting 5 seconds for the alarm...");
 
-       tv.tv_sec = 6;/*set 6 seconds as the time out*/
-       tv.tv_usec = 0;
+	tv.tv_sec = 6;		/*set 6 seconds as the time out */
+	tv.tv_usec = 0;
 
-       FD_ZERO(&rfds);
-       FD_SET(rtc_fd, &rfds);
+	FD_ZERO(&rfds);
+	FD_SET(rtc_fd, &rfds);
 
-       ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);/*wait for alarm*/
+	ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);	/*wait for alarm */
 
-       if (ret == -1) {
-               tst_resm(TFAIL, "select failed");
-               return;
-       } else if (ret) {
-               ret = read(rtc_fd, &data, sizeof(unsigned long));
-               if (ret == -1) {
-                       tst_resm(TFAIL, "read failed");
-                       return;
-               }
-               tst_resm(TINFO, "Alarm rang.");
-       } else {
-               tst_resm(TFAIL, "Timed out waiting for the alarm");
-               return;
-       }
+	if (ret == -1) {
+		tst_resm(TFAIL, "select failed");
+		return;
+	} else if (ret) {
+		ret = read(rtc_fd, &data, sizeof(unsigned long));
+		if (ret == -1) {
+			tst_resm(TFAIL, "read failed");
+			return;
+		}
+		tst_resm(TINFO, "Alarm rang.");
+	} else {
+		tst_resm(TFAIL, "Timed out waiting for the alarm");
+		return;
+	}
 
-       /* Disable alarm interrupts */
-       ret = ioctl(rtc_fd, RTC_AIE_OFF, 0);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_AIE_OFF ioctl failed");
-               return;
-       }
-       tst_resm(TPASS, "RTC ALARM TEST Passed");
+	/* Disable alarm interrupts */
+	ret = ioctl(rtc_fd, RTC_AIE_OFF, 0);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_AIE_OFF ioctl failed");
+		return;
+	}
+	tst_resm(TPASS, "RTC ALARM TEST Passed");
 }
 
 /* Update_interrupts_test :Once the Update interrupts is enabled,
@@ -143,75 +143,75 @@
 
 void update_interrupts_test(void)
 {
-       int ret, i;
-       unsigned long data;
-       fd_set rfds;
-       struct timeval tv;
+	int ret, i;
+	unsigned long data;
+	fd_set rfds;
+	struct timeval tv;
 
-       tst_resm(TINFO, "RTC UPDATE INTERRUPTS TEST :");
-       /*Turn on update interrupts*/
-       ret = ioctl(rtc_fd, RTC_UIE_ON, 0);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_UIE_ON ioctl failed");
-               return;
-        }
+	tst_resm(TINFO, "RTC UPDATE INTERRUPTS TEST :");
+	/*Turn on update interrupts */
+	ret = ioctl(rtc_fd, RTC_UIE_ON, 0);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_UIE_ON ioctl failed");
+		return;
+	}
 
-       tst_resm(TINFO, "Waiting for  5 update interrupts...");
-       for (i = 1; i < 6; i++) {
+	tst_resm(TINFO, "Waiting for  5 update interrupts...");
+	for (i = 1; i < 6; i++) {
 
-               tv.tv_sec = 2; /*2 sec time out for each interrupt*/
-               tv.tv_usec = 0;
+		tv.tv_sec = 2;	/*2 sec time out for each interrupt */
+		tv.tv_usec = 0;
 
-               FD_ZERO(&rfds);
-               FD_SET(rtc_fd, &rfds);
+		FD_ZERO(&rfds);
+		FD_SET(rtc_fd, &rfds);
 
-               ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);
-               if (ret == -1) {
-                       tst_resm(TFAIL, "select failed");
-                       return;
-               } else if (ret) {
-                       ret = read(rtc_fd, &data, sizeof(unsigned long));
-                       if (ret == -1) {
-                               tst_resm(TFAIL, "read failed");
-                               return;
-                       }
-                       tst_resm(TINFO, "Update interrupt %d", i);
-               } else {
-                       tst_resm(TFAIL,
-                               "Timed out waiting for the update interrupt");
-                       return;
-               }
-       }
+		ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);
+		if (ret == -1) {
+			tst_resm(TFAIL, "select failed");
+			return;
+		} else if (ret) {
+			ret = read(rtc_fd, &data, sizeof(unsigned long));
+			if (ret == -1) {
+				tst_resm(TFAIL, "read failed");
+				return;
+			}
+			tst_resm(TINFO, "Update interrupt %d", i);
+		} else {
+			tst_resm(TFAIL,
+				 "Timed out waiting for the update interrupt");
+			return;
+		}
+	}
 
-       /* Turn off update interrupts */
-       ret = ioctl(rtc_fd, RTC_UIE_OFF, 0);
-       if (ret == -1) {
-               tst_resm(TFAIL, "RTC_UIE_OFF ioctl failed");
-               return;
-       }
-       tst_resm(TPASS, "RTC UPDATE INTERRUPTS TEST Passed");
+	/* Turn off update interrupts */
+	ret = ioctl(rtc_fd, RTC_UIE_OFF, 0);
+	if (ret == -1) {
+		tst_resm(TFAIL, "RTC_UIE_OFF ioctl failed");
+		return;
+	}
+	tst_resm(TPASS, "RTC UPDATE INTERRUPTS TEST Passed");
 }
 
 int main(int argc, char **argv)
 {
-       char *rtc_dev = "/dev/rtc";
+	char *rtc_dev = "/dev/rtc";
 
-       if (argc == 2)
-               rtc_dev = argv[1];
+	if (argc == 2)
+		rtc_dev = argv[1];
 
-       rtc_fd = open(rtc_dev, O_RDONLY);
+	rtc_fd = open(rtc_dev, O_RDONLY);
 
-       if (rtc_fd < 0)
-               tst_brkm(TBROK | TERRNO, NULL, "couldn't open %s", rtc_dev);
+	if (rtc_fd < 0)
+		tst_brkm(TBROK | TERRNO, NULL, "couldn't open %s", rtc_dev);
 
-       /*Read and alarm tests*/
-       read_alarm_test();
+	/*Read and alarm tests */
+	read_alarm_test();
 
-       /*Update interrupts test*/
-       update_interrupts_test();
+	/*Update interrupts test */
+	update_interrupts_test();
 
-       close(rtc_fd);
+	close(rtc_fd);
 
-       tst_resm(TINFO, "RTC Tests Done!");
-     tst_exit();
+	tst_resm(TINFO, "RTC Tests Done!");
+	tst_exit();
 }
diff --git a/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c b/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
index b15331c..447d223 100644
--- a/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
+++ b/testcases/kernel/device-drivers/tbio/kernel_space/tbio.c
@@ -79,23 +79,24 @@
 static int nsectors = 1024;
 //module_param(nsectors , int , 0);
 
-static struct bio *tbiop = NULL , *tbiop_dup = NULL;
+static struct bio *tbiop = NULL, *tbiop_dup = NULL;
 //static struct bio_pair *bio_pairp = NULL;
 static struct request_queue Queue;
 
 static struct tbio_device {
-	unsigned long size ;
+	unsigned long size;
 	spinlock_t lock;
 	u8 *data;
 	struct gendisk *gd;
 	struct block_device *bdev;
 } Device;
 
-static int send_request(request_queue_t *q, struct bio *bio ,struct block_device *bdev,
-			 struct tbio_interface  *inter , int writing)
+static int send_request(request_queue_t * q, struct bio *bio,
+			struct block_device *bdev, struct tbio_interface *inter,
+			int writing)
 {
 	struct request *rq;
-	void * buffer = NULL;
+	void *buffer = NULL;
 	unsigned long start_time;
 	int err;
 
@@ -106,11 +107,12 @@
 		goto out_request;
 	//printk("tbio: rq->cmd : %s\n",rq->cmd);
 	if (sizeof(rq->cmd) != inter->cmd_len)
-		memset(rq->cmd + inter->cmd_len, 0, sizeof(rq->cmd) - inter->cmd_len);
+		memset(rq->cmd + inter->cmd_len, 0,
+		       sizeof(rq->cmd) - inter->cmd_len);
 
 	rq->bio = rq->biotail = NULL;
 
-	blk_rq_bio_prep(q , rq , bio);
+	blk_rq_bio_prep(q, rq, bio);
 
 	rq->data = buffer;
 	rq->data_len = inter->data_len;
@@ -147,18 +149,17 @@
 
 }
 
-static int tbio_io(struct block_device *bdev,
-		 struct tbio_interface  *uptr)
+static int tbio_io(struct block_device *bdev, struct tbio_interface *uptr)
 {
 	tbio_interface_t inter;
 	struct bio *bio = NULL;
-	int reading = 0 , writing = 0 ;
-	void * buffer = NULL;
+	int reading = 0, writing = 0;
+	void *buffer = NULL;
 	//struct request *rq;
 	request_queue_t *q;
 	q = bdev_get_queue(Device.bdev);
 
-	if (copy_from_user(&inter , uptr , sizeof(tbio_interface_t))) {
+	if (copy_from_user(&inter, uptr, sizeof(tbio_interface_t))) {
 		printk("tbio: copy_from_user\n");
 		return -EFAULT;
 	}
@@ -171,33 +172,34 @@
 	if (inter.data_len) {
 
 		switch (inter.direction) {
-			default:
-				return -EINVAL;
-			case TBIO_TO_DEV:
-				writing = 1;
-				break;
-			case TBIO_FROM_DEV:
-				reading = 1;
-				break;
+		default:
+			return -EINVAL;
+		case TBIO_TO_DEV:
+			writing = 1;
+			break;
+		case TBIO_FROM_DEV:
+			reading = 1;
+			break;
 		}
 
-		bio = bio_map_user(bdev , (unsigned long )inter.data ,
-					inter.data_len , reading);
+		bio = bio_map_user(bdev, (unsigned long)inter.data,
+				   inter.data_len, reading);
 
 		if (!bio) {
 			printk("tbio : bio_map_user failed\n");
-			buffer = kmalloc (inter.data_len , q->bounce_gfp | GFP_USER);
+			buffer =
+			    kmalloc(inter.data_len, q->bounce_gfp | GFP_USER);
 			if (!buffer) {
 				printk("tbio: buffer no memory\n");
 				return -1;
 			}
-			copy_from_user(buffer , inter.data , inter.data_len);
-			printk("tbio: buffer %s\n",(char *)buffer);
+			copy_from_user(buffer, inter.data, inter.data_len);
+			printk("tbio: buffer %s\n", (char *)buffer);
 		}
 
 	}
 
-	send_request(q, bio ,bdev,&inter , writing);
+	send_request(q, bio, bdev, &inter, writing);
 
 	if (bio)
 		bio_unmap_user(bio, reading);
@@ -215,7 +217,7 @@
 
 static int test_bio_clone(void)
 {
-	tbiop_dup = bio_clone(tbiop,GFP_NOIO);
+	tbiop_dup = bio_clone(tbiop, GFP_NOIO);
 	if (tbiop_dup == NULL) {
 		printk("tbio: bio_clone failed\n");
 		return -1;
@@ -228,39 +230,40 @@
 
 static int test_bio_add_page(void)
 {
-	int res = 0 ,  i = 0 , offset = 0;
+	int res = 0, i = 0, offset = 0;
 	unsigned long addr = 0;
 	struct page *ppage = NULL;
 
-	for (i = 0 ; i < 128 ; i ++) {
+	for (i = 0; i < 128; i++) {
 
 		addr = get_zeroed_page(GFP_KERNEL);
 
 		if (addr == 0) {
-			printk("tbio: get free page failed %ld\n" , addr);
+			printk("tbio: get free page failed %ld\n", addr);
 			return -1;
 		}
 
 		ppage = virt_to_page(addr);
-		if (ppage ==  NULL) {
-			printk ("tbio: covert virture page to page struct failed\n");
+		if (ppage == NULL) {
+			printk
+			    ("tbio: covert virture page to page struct failed\n");
 			return -1;
 		}
 
-		res = bio_add_page(tbiop , ppage , PAGE_SIZE , offset );
-		if (res <0) {
-			printk("bio_add_page :res %d\n",res);
+		res = bio_add_page(tbiop, ppage, PAGE_SIZE, offset);
+		if (res < 0) {
+			printk("bio_add_page :res %d\n", res);
 			return -1;
 		}
 		offset += res;
-	//	printk ("tbio: bio_add_page : %d\n", res);
+		//      printk ("tbio: bio_add_page : %d\n", res);
 	}
 	return 0;
 }
 
 static int test_do_bio_alloc(int num)
 {
-	tbiop = bio_alloc(GFP_KERNEL , num);
+	tbiop = bio_alloc(GFP_KERNEL, num);
 	if (tbiop == NULL) {
 		printk("tbio: bio_alloc failed\n");
 		return -1;
@@ -275,32 +278,32 @@
 	int res = 0;
 	res = test_do_bio_alloc(2);
 	if (res < 0) {
-		printk("can not alloc bio for %d\n",2);
+		printk("can not alloc bio for %d\n", 2);
 		return -1;
 	}
 
 	res = test_do_bio_alloc(8);
 	if (res < 0) {
-		printk("can not alloc bio for %d\n",8);
+		printk("can not alloc bio for %d\n", 8);
 		return -1;
 	}
 	res = test_do_bio_alloc(32);
 	if (res < 0) {
-		printk("can not alloc bio for %d\n",32);
+		printk("can not alloc bio for %d\n", 32);
 		return -1;
 	}
 	res = test_do_bio_alloc(96);
 	if (res < 0) {
-		printk("can not alloc bio for %d\n",96);
+		printk("can not alloc bio for %d\n", 96);
 		return -1;
 	}
 	res = test_do_bio_alloc(BIO_MAX_PAGES);
 	if (res < 0) {
-		printk("can not alloc bio for %d\n",BIO_MAX_PAGES);
+		printk("can not alloc bio for %d\n", BIO_MAX_PAGES);
 		return -1;
 	}
 
-	tbiop = bio_alloc(GFP_KERNEL , BIO_MAX_PAGES);
+	tbiop = bio_alloc(GFP_KERNEL, BIO_MAX_PAGES);
 	if (tbiop == NULL) {
 		printk("tbio: bio_alloc failed\n");
 		return -1;
@@ -310,17 +313,17 @@
 }
 
 static int test_bio_split(struct block_device *bdev,
-		 struct tbio_interface  *uptr)
+			  struct tbio_interface *uptr)
 {
 	tbio_interface_t inter;
 	struct bio *bio = NULL;
 	struct bio_pair *bio_pairp = NULL;
-	int reading = 0 , writing = 0 ;
-	void * buffer = NULL;
+	int reading = 0, writing = 0;
+	void *buffer = NULL;
 	request_queue_t *q;
 	q = bdev_get_queue(Device.bdev);
 
-	if (copy_from_user(&inter , uptr , sizeof(tbio_interface_t))) {
+	if (copy_from_user(&inter, uptr, sizeof(tbio_interface_t))) {
 		printk("tbio: copy_from_user\n");
 		return -EFAULT;
 	}
@@ -333,46 +336,46 @@
 	if (inter.data_len) {
 
 		switch (inter.direction) {
-			default:
-				return -EINVAL;
-			case TBIO_TO_DEV:
-				writing = 1;
-				break;
-			case TBIO_FROM_DEV:
-				reading = 1;
-				break;
+		default:
+			return -EINVAL;
+		case TBIO_TO_DEV:
+			writing = 1;
+			break;
+		case TBIO_FROM_DEV:
+			reading = 1;
+			break;
 		}
 
-		bio = bio_map_user(bdev , (unsigned long )inter.data ,
-					inter.data_len , reading);
+		bio = bio_map_user(bdev, (unsigned long)inter.data,
+				   inter.data_len, reading);
 
 		if (!bio) {
 			printk("tbio : bio_map_user failed\n");
-			buffer = kmalloc (inter.data_len , q->bounce_gfp | GFP_USER);
+			buffer =
+			    kmalloc(inter.data_len, q->bounce_gfp | GFP_USER);
 			if (!buffer) {
 				printk("tbio: buffer no memory\n");
 				return -1;
 			}
-			copy_from_user(buffer , inter.data , inter.data_len);
-			printk("tbio: buffer %s\n",(char *)buffer);
-		}
-		else {
-	//		printk("tbio: bio sectors %d\n", bio_sectors(bio));
-	//		printk("tbio: split now\n");
-			bio_pairp = bio_split(bio , bio_split_pool, 2);
+			copy_from_user(buffer, inter.data, inter.data_len);
+			printk("tbio: buffer %s\n", (char *)buffer);
+		} else {
+			//              printk("tbio: bio sectors %d\n", bio_sectors(bio));
+			//              printk("tbio: split now\n");
+			bio_pairp = bio_split(bio, bio_split_pool, 2);
 
 			if (bio_pairp == NULL) {
 				printk("tbio: bio_split failed\n");
-				bio_unmap_user(bio,reading);
+				bio_unmap_user(bio, reading);
 				return -1;
 			}
 		}
 
 	}
 
-	send_request(q, &(bio_pairp->bio1) ,bdev,&inter , writing);
+	send_request(q, &(bio_pairp->bio1), bdev, &inter, writing);
 	q = bdev_get_queue(Device.bdev);
-	send_request(q, &(bio_pairp->bio2) ,bdev,&inter , writing);
+	send_request(q, &(bio_pairp->bio2), bdev, &inter, writing);
 
 	if (bio_pairp) {
 		bio_pair_release(bio_pairp);
@@ -397,7 +400,7 @@
 
 	number = bio_get_nr_vecs(tbiop->bi_bdev);
 
-	if (number <0) {
+	if (number < 0) {
 		printk("tbio: bio_get_nr_vec failed\n");
 		return -1;
 	}
@@ -406,82 +409,94 @@
 }
 
 static int tbio_ioctl(struct inode *ino, struct file *file,
-                        unsigned int cmd, unsigned long arg)
+		      unsigned int cmd, unsigned long arg)
 {
 	int err;
-//	request_queue_t *q;
+//      request_queue_t *q;
 
 	//q = bdev_get_queue(Device.bdev);
 
-	printk("ttbio: ioctl 0x%x 0x%lx\n" , cmd , arg);
+	printk("ttbio: ioctl 0x%x 0x%lx\n", cmd, arg);
 
-	switch ( cmd ) {
-	  case LTP_TBIO_DO_IO:
-	    {
-		err = bd_claim(Device.bdev, current);
-		if (err) {
-			printk("tbio:bd_claim\n");
-			break;
+	switch (cmd) {
+	case LTP_TBIO_DO_IO:
+		{
+			err = bd_claim(Device.bdev, current);
+			if (err) {
+				printk("tbio:bd_claim\n");
+				break;
+			}
+
+			err =
+			    tbio_io(Device.bdev, (struct tbio_interface *)arg);
+			bd_release(Device.bdev);
 		}
+		break;
 
-		err = tbio_io( Device.bdev, (struct tbio_interface *) arg);
-		bd_release(Device.bdev);
-	    }
-	    break;
+	case LTP_TBIO_CLONE:
+		err = test_bio_clone();
+		break;
+	case LTP_TBIO_ADD_PAGE:
+		err = test_bio_add_page();
+		break;
+	case LTP_TBIO_ALLOC:
+		err = test_bio_alloc();
+		break;
+	case LTP_TBIO_GET_NR_VECS:
+		err = test_bio_get_nr_vecs();
+		break;
+	case LTP_TBIO_PUT:
+		err = test_bio_put(tbiop);
+		break;
+	case LTP_TBIO_SPLIT:
+		{
+			err = bd_claim(Device.bdev, current);
+			if (err) {
+				printk("tbio:bd_claim\n");
+				break;
+			}
 
-	  case LTP_TBIO_CLONE:            err = test_bio_clone(); break;
-	  case LTP_TBIO_ADD_PAGE:         err = test_bio_add_page(); break;
-	  case LTP_TBIO_ALLOC:            err = test_bio_alloc(); break;
-	  case LTP_TBIO_GET_NR_VECS:      err = test_bio_get_nr_vecs();break;
-	  case LTP_TBIO_PUT:              err = test_bio_put(tbiop);break;
-	  case LTP_TBIO_SPLIT:
-	    {
-	    	err = bd_claim(Device.bdev, current);
-		if (err) {
-			printk("tbio:bd_claim\n");
-			break;
+			err =
+			    test_bio_split(Device.bdev,
+					   (struct tbio_interface *)arg);
+			bd_release(Device.bdev);
+
 		}
-
-		err = test_bio_split( Device.bdev, (struct tbio_interface *) arg);
-		bd_release(Device.bdev);
-
-	    }
-	    break;
-	  //case LTP_TBIO_PAIR_RELEASE:     err = test_bio_pair_release();break;
+		break;
+		//case LTP_TBIO_PAIR_RELEASE:     err = test_bio_pair_release();break;
 
 	}
 	return 0;
 }
 
-static void tbio_transfer(struct request *req , struct tbio_device *dev )
+static void tbio_transfer(struct request *req, struct tbio_device *dev)
 {
 
 	struct bio *bio = req->bio;
 
 	//printk("tbio: bio_data(bio) %s\n" , (char *)bio_data(bio));
 	if (bio_data_dir(bio)) {
-		printk("tbio: write \"%s\" to dev\n" , (char *)bio_data(bio));
-		memcpy(dev->data , bio_data(bio) , bio->bi_size);
-	}
-	else {
-		memcpy(bio_data(bio) , dev->data , bio->bi_size);
-		printk("tbio: read \"%s\" from dev\n" , (char *)bio_data(bio));
+		printk("tbio: write \"%s\" to dev\n", (char *)bio_data(bio));
+		memcpy(dev->data, bio_data(bio), bio->bi_size);
+	} else {
+		memcpy(bio_data(bio), dev->data, bio->bi_size);
+		printk("tbio: read \"%s\" from dev\n", (char *)bio_data(bio));
 	}
 
 }
 
-static void tbio_request(request_queue_t *q)
+static void tbio_request(request_queue_t * q)
 {
 	struct request *req;
 
-	while (( req = elv_next_request(q)) != NULL) {
+	while ((req = elv_next_request(q)) != NULL) {
 
-		tbio_transfer(req , &Device);
-		end_request(req , 1);
+		tbio_transfer(req, &Device);
+		end_request(req, 1);
 	}
 }
 
-static int tbio_open(struct inode *inode , struct file *filep)
+static int tbio_open(struct inode *inode, struct file *filep)
 {
 	if (!Device.bdev) {
 		Device.bdev = inode->i_bdev;
@@ -491,7 +506,7 @@
 	return 0;
 }
 
-static int tbio_release(struct inode *inode , struct file *filep)
+static int tbio_release(struct inode *inode, struct file *filep)
 {
 	return 0;
 }
@@ -507,27 +522,28 @@
 }
 
 static struct block_device_operations tbio_ops = {
-	.owner		=THIS_MODULE,
-	.open		=tbio_open,
-	.ioctl		=tbio_ioctl,
-	.release	=tbio_release,
-	.media_changed	=tbio_media_changed,
-	.revalidate_disk	=tbio_revalidate
+	.owner = THIS_MODULE,
+	.open = tbio_open,
+	.ioctl = tbio_ioctl,
+	.release = tbio_release,
+	.media_changed = tbio_media_changed,
+	.revalidate_disk = tbio_revalidate
 };
 
 static int __init tbio_init(void)
 {
-	Device.size = nsectors*hardsect_size ;
-    int result;
+	Device.size = nsectors * hardsect_size;
+	int result;
 	spin_lock_init(&Device.lock);
 	Device.data = vmalloc(Device.size);
 	if (Device.data == NULL)
 		return -ENOMEM;
 	Device.bdev = NULL;
 
-	result = register_blkdev(TBIO_MAJOR , DEVICE_NAME);//, &tbio_ops);
+	result = register_blkdev(TBIO_MAJOR, DEVICE_NAME);	//, &tbio_ops);
 
-    printk(KERN_ALERT "LTP BIO: register_blkdev result=%d major %d\n",result, TBIO_MAJOR);
+	printk(KERN_ALERT "LTP BIO: register_blkdev result=%d major %d\n",
+	       result, TBIO_MAJOR);
 
 	if (result <= 0) {
 		printk(KERN_WARNING "tbio:unable to get major number\n");
@@ -535,37 +551,37 @@
 	}
 
 	Device.gd = alloc_disk(1);
-	if (! Device.gd)
+	if (!Device.gd)
 		goto out_unregister;
 	Device.gd->major = TBIO_MAJOR;
 	Device.gd->first_minor = 0;
 	Device.gd->fops = &tbio_ops;
 	Device.gd->private_data = &Device;
-	strcpy(Device.gd->disk_name , "tbio0");
-	set_capacity(Device.gd , nsectors);
-	blk_init_queue(tbio_request , &Device.lock);
+	strcpy(Device.gd->disk_name, "tbio0");
+	set_capacity(Device.gd, nsectors);
+	blk_init_queue(tbio_request, &Device.lock);
 	Device.gd->queue = &Queue;
 	add_disk(Device.gd);
 
 	return 0;
 
-	out_unregister:
-		unregister_chrdev(TBIO_MAJOR , "tbio");
-	out:
-		vfree(Device.data);
-		return -ENOMEM;
+out_unregister:
+	unregister_chrdev(TBIO_MAJOR, "tbio");
+out:
+	vfree(Device.data);
+	return -ENOMEM;
 }
 
 static void tbio_exit(void)
 {
 	if (Device.bdev) {
-		invalidate_bdev(Device.bdev,1);
+		invalidate_bdev(Device.bdev, 1);
 		bdput(Device.bdev);
 	}
 
 	del_gendisk(Device.gd);
 	put_disk(Device.gd);
-	unregister_blkdev(TBIO_MAJOR , "tbio");
+	unregister_blkdev(TBIO_MAJOR, "tbio");
 	vfree(Device.data);
 }
 
diff --git a/testcases/kernel/device-drivers/tbio/user_space/tbio_ki.c b/testcases/kernel/device-drivers/tbio/user_space/tbio_ki.c
index 3f3b670..b5d6d46 100644
--- a/testcases/kernel/device-drivers/tbio/user_space/tbio_ki.c
+++ b/testcases/kernel/device-drivers/tbio/user_space/tbio_ki.c
@@ -69,8 +69,8 @@
 
 int ki_generic(int fd, int flag)
 {
-	int                     rc;
-	tbio_interface_t        bif;
+	int rc;
+	tbio_interface_t bif;
 
 	rc = ioctl(fd, flag, &bif);
 	if (rc) {
diff --git a/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c b/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
index 9d1a552..d3e88d1 100644
--- a/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
+++ b/testcases/kernel/device-drivers/tbio/user_space/user_tbio.c
@@ -69,113 +69,120 @@
 #include "user_tbio.h"
 #include "../kernel_space/tbio.h"
 
-static int tbio_fd = -1;		/* file descriptor */
+static int tbio_fd = -1;	/* file descriptor */
 
-int
-tbioopen() {
+int tbioopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TBIO_MAJOR, 0);
+	devt = makedev(TBIO_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbio CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbio CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tbio_fd = open(DEVICE_NAME, O_RDWR);
+	tbio_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tbio_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tbio_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tbio_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tbio_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tbioclose() {
+int tbioclose()
+{
 
 	if (tbio_fd != -1) {
-		close (tbio_fd);
+		close(tbio_fd);
 		tbio_fd = -1;
 	}
 
 	return 0;
 }
 
-int tbio_to_dev(int fd  , int flag)
+int tbio_to_dev(int fd, int flag)
 {
 	int rc;
 	tbio_interface_t bif;
 
-	memset(&bif , 0 , sizeof(tbio_interface_t));
-	rc = posix_memalign(&bif.data , 512 , 1024);
+	memset(&bif, 0, sizeof(tbio_interface_t));
+	rc = posix_memalign(&bif.data, 512, 1024);
 	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
 
-	strcpy(bif.data , "User space data");
+	strcpy(bif.data, "User space data");
 	bif.data_len = 1024;
 	bif.direction = TBIO_TO_DEV;
-	bif.cmd = (char *) malloc (6);
+	bif.cmd = (char *)malloc(6);
 	if (bif.cmd == NULL) {
 		printf("malloc cmd space failed\n");
-		free (bif.data);
+		free(bif.data);
 		return -1;
 	}
-	strcpy(bif.cmd , "WRITE");
+	strcpy(bif.cmd, "WRITE");
 	bif.cmd_len = 6;
 
 	rc = ioctl(fd, flag, &bif);
@@ -193,29 +200,29 @@
 
 }
 
-int tbio_from_dev(int fd  , int flag)
+int tbio_from_dev(int fd, int flag)
 {
 	int rc;
 	tbio_interface_t bif;
 
-	memset(&bif , 0 , sizeof(tbio_interface_t));
-	rc = posix_memalign(&bif.data , 512 , 1024);
+	memset(&bif, 0, sizeof(tbio_interface_t));
+	rc = posix_memalign(&bif.data, 512, 1024);
 	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
 
-	memset(bif.data , 0 , 1024);
+	memset(bif.data, 0, 1024);
 
 	bif.data_len = 1024;
 	bif.direction = TBIO_FROM_DEV;
-	bif.cmd = (char *) malloc (6);
+	bif.cmd = (char *)malloc(6);
 	if (bif.cmd == NULL) {
 		printf("malloc cmd space failed\n");
-		free (bif.data);
+		free(bif.data);
 		return -1;
 	}
-	strcpy(bif.cmd , "READ");
+	strcpy(bif.cmd, "READ");
 	bif.cmd_len = 6;
 
 	rc = ioctl(fd, flag, &bif);
@@ -226,7 +233,7 @@
 		return rc;
 	}
 	//printf("read from dev %s\n",bif.data);
-	if (strcmp(bif.data , "User space data")) {
+	if (strcmp(bif.data, "User space data")) {
 		printf("TBIO_FROM_DEV failed\n");
 		free(bif.data);
 		free(bif.cmd);
@@ -240,28 +247,28 @@
 
 }
 
-int tbio_split_to_dev(int fd  , int flag)
+int tbio_split_to_dev(int fd, int flag)
 {
 	int rc;
 	tbio_interface_t bif;
 
-	memset(&bif , 0 , sizeof(tbio_interface_t));
-	rc = posix_memalign(&bif.data , 512 , 2048);
+	memset(&bif, 0, sizeof(tbio_interface_t));
+	rc = posix_memalign(&bif.data, 512, 2048);
 	if (rc) {
 		printf("posix_memalign failed\n");
 		return -1;
 	}
 
-	strcpy(bif.data , "User space data");
+	strcpy(bif.data, "User space data");
 	bif.data_len = 2048;
 	bif.direction = TBIO_TO_DEV;
-	bif.cmd = (char *) malloc (6);
+	bif.cmd = (char *)malloc(6);
 	if (bif.cmd == NULL) {
 		printf("malloc cmd space failed\n");
-		free (bif.data);
+		free(bif.data);
 		return -1;
 	}
-	strcpy(bif.cmd , "WRITE");
+	strcpy(bif.cmd, "WRITE");
 	bif.cmd_len = 6;
 
 	rc = ioctl(fd, flag, &bif);
@@ -290,42 +297,42 @@
 		exit(1);
 	}
 
-	if (ki_generic(tbio_fd , LTP_TBIO_ALLOC))
+	if (ki_generic(tbio_fd, LTP_TBIO_ALLOC))
 		printf("Failed on LTP_TBIO_ALLOC test\n");
 	else
 		printf("Success on LTP_TBIO_ALLOC test\n");
 
-	if (ki_generic(tbio_fd , LTP_TBIO_CLONE))
+	if (ki_generic(tbio_fd, LTP_TBIO_CLONE))
 		printf("Failed on LTP_TBIO_CLONE test\n");
 	else
 		printf("Success on LTP_TBIO_CLONE test\n");
 
-	if (ki_generic(tbio_fd , LTP_TBIO_GET_NR_VECS))
+	if (ki_generic(tbio_fd, LTP_TBIO_GET_NR_VECS))
 		printf("Failed on LTP_TBIO_GET_NR_VECS test\n");
 	else
 		printf("Success on LTP_TBIO_GET_NR_VECS test\n");
 
-	if (ki_generic(tbio_fd , LTP_TBIO_ADD_PAGE))
+	if (ki_generic(tbio_fd, LTP_TBIO_ADD_PAGE))
 		printf("Failed on LTP_TBIO_ADD_PAGE test\n");
 	else
 		printf("Success on LTP_TBIO_ADD_PAGE test\n");
 
-	if (tbio_split_to_dev(tbio_fd , LTP_TBIO_SPLIT))
+	if (tbio_split_to_dev(tbio_fd, LTP_TBIO_SPLIT))
 		printf("Failed on LTP_TBIO_SPLIT:write to dev\n");
 	else
 		printf("Success on LTP_TBIO_SPLIT:write to dev\n");
 
-	if (tbio_to_dev(tbio_fd , LTP_TBIO_DO_IO))
+	if (tbio_to_dev(tbio_fd, LTP_TBIO_DO_IO))
 		printf("Failed on LTP_TBIO_DO_IO:write to dev\n");
 	else
 		printf("Success on LTP_TBIO_DO_IO:write to dev\n");
 
-	if (tbio_from_dev(tbio_fd , LTP_TBIO_DO_IO))
+	if (tbio_from_dev(tbio_fd, LTP_TBIO_DO_IO))
 		printf("Failed on LTP_TBIO_DO_IO:read from dev\n");
 	else
 		printf("Success on LTP_TBIO_DO_IO:read from dev\n");
 
-	if (ki_generic(tbio_fd , LTP_TBIO_PUT))
+	if (ki_generic(tbio_fd, LTP_TBIO_PUT))
 		printf("Failed on LTP_TBIO_PUT test\n");
 	else
 		printf("Success on LTP_TBIO_PUT test\n");
@@ -333,9 +340,9 @@
 	/* close the bioule */
 	rc = tbioclose();
 	if (rc) {
-                printf("Test bio Driver may not be closed\n");
-                exit(1);
-        }
+		printf("Test bio Driver may not be closed\n");
+		exit(1);
+	}
 
-      return 0;
+	return 0;
 }
diff --git a/testcases/kernel/device-drivers/usb/tusb/tusb.c b/testcases/kernel/device-drivers/usb/tusb/tusb.c
index 86a7139..774600a 100644
--- a/testcases/kernel/device-drivers/usb/tusb/tusb.c
+++ b/testcases/kernel/device-drivers/usb/tusb/tusb.c
@@ -60,9 +60,10 @@
 MODULE_DESCRIPTION(TEST_USB_DRIVER_NAME);
 MODULE_LICENSE("GPL");
 
-static int tusb_ioctl (struct inode *, struct file *, unsigned int, unsigned long);
-static int tusb_open (struct inode *, struct file *);
-static int tusb_close (struct inode *, struct file *);
+static int tusb_ioctl(struct inode *, struct file *, unsigned int,
+		      unsigned long);
+static int tusb_open(struct inode *, struct file *);
+static int tusb_close(struct inode *, struct file *);
 
 static int test_find_usbdev(void);
 static int test_find_hcd(void);
@@ -77,16 +78,18 @@
 static tusb_user_t ltp_usb;
 
 static struct file_operations tusb_fops = {
-	open:		tusb_open,
-	release:	tusb_close,
-	ioctl:		tusb_ioctl,
+open:	tusb_open,
+release:tusb_close,
+ioctl:	tusb_ioctl,
 };
 
-static int tusb_open(struct inode *ino, struct file *f) {
+static int tusb_open(struct inode *ino, struct file *f)
+{
 	return 0;
 }
 
-static int tusb_close(struct inode *ino, struct file *f) {
+static int tusb_close(struct inode *ino, struct file *f)
+{
 	return 0;
 }
 
@@ -95,90 +98,97 @@
  */
 struct tusb_device {
 	char name[128];
-        char phys[64];
-        struct usb_device *usbdev;
+	char phys[64];
+	struct usb_device *usbdev;
 	struct input_dev dev;
-        struct urb *irq;
-        int open;
+	struct urb *irq;
+	int open;
 
-        signed char *data;
-        dma_addr_t data_dma;
+	signed char *data;
+	dma_addr_t data_dma;
 };
 
-static void tusb_disconnect(struct usb_interface *intf) {
+static void tusb_disconnect(struct usb_interface *intf)
+{
 	printk("tusb: Entered disconnect function\n");
 }
 
-static int tusb_probe(struct usb_interface *intf,  const struct usb_device_id *id) {
-        printk("tusb: Entered probe function\n");
-      return 0;
+static int tusb_probe(struct usb_interface *intf,
+		      const struct usb_device_id *id)
+{
+	printk("tusb: Entered probe function\n");
+	return 0;
 
 }
 
-static struct usb_device_id tusb_id_table [] = {
+static struct usb_device_id tusb_id_table[] = {
 	{
-		USB_INTERFACE_INFO(3, 1, 1),
-		driver_info: (unsigned long)"keyboard"
-	},
+	 USB_INTERFACE_INFO(3, 1, 1),
+driver_info:(unsigned long)"keyboard"},
 	{
-		USB_INTERFACE_INFO(3, 1, 2),
-		driver_info: (unsigned long)"mouse"
-	},
+	 USB_INTERFACE_INFO(3, 1, 2),
+driver_info:(unsigned long)"mouse"},
 	{
-		0,
-	}
+	 0,
+	 }
 };
 
-MODULE_DEVICE_TABLE (usb, tusb_id_table);
+MODULE_DEVICE_TABLE(usb, tusb_id_table);
 
 static struct usb_driver test_usb_driver = {
-	name:		"tusb_two",
-	probe:		tusb_probe,
-	disconnect:	tusb_disconnect,
-	id_table:	tusb_id_table,
+name:	"tusb_two",
+probe:	tusb_probe,
+disconnect:tusb_disconnect,
+id_table:tusb_id_table,
 };
 
 #if 0
-static int test_alloc_dev(struct usb_device *dev) {
+static int test_alloc_dev(struct usb_device *dev)
+{
 	printk("Entered test_alloc_dev\n");
 	return 0;
 }
 
-static int test_dealloc_dev(struct usb_device *dev) {
-        printk("Entered test_dealloc_dev\n");
-      return 0;
+static int test_dealloc_dev(struct usb_device *dev)
+{
+	printk("Entered test_dealloc_dev\n");
+	return 0;
 }
 
-static int test_get_current_frame_number(struct usb_device *dev) {
-        printk("Entered test_get_current_frame_number\n");
-      return 0;
+static int test_get_current_frame_number(struct usb_device *dev)
+{
+	printk("Entered test_get_current_frame_number\n");
+	return 0;
 }
 
-static int test_submit_urb(struct urb *purb) {
-        printk("Entered test_submit_urb\n");
-      return 0;
+static int test_submit_urb(struct urb *purb)
+{
+	printk("Entered test_submit_urb\n");
+	return 0;
 }
 
-static int test_unlink_urb(struct urb *purb) {
-        printk("Entered test_unlink_urb\n");
-      return 0;
+static int test_unlink_urb(struct urb *purb)
+{
+	printk("Entered test_unlink_urb\n");
+	return 0;
 }
 
 static struct usb_operations test_device_operations = {
-	.allocate = 			test_alloc_dev,
-	.deallocate =			test_dealloc_dev,
- 	.get_frame_number = 		test_get_current_frame_number,
-	.submit_urb = 			test_submit_urb,
-	.unlink_urb = 			test_unlink_urb,
+	.allocate = test_alloc_dev,
+	.deallocate = test_dealloc_dev,
+	.get_frame_number = test_get_current_frame_number,
+	.submit_urb = test_submit_urb,
+	.unlink_urb = test_unlink_urb,
 };
 #endif
 
 static int tusb_ioctl(struct inode *ino, struct file *f,
-			unsigned int cmd, unsigned long l) {
-	int 			rc;
-	tusb_interface_t	tif;
-	caddr_t			*inparms;
-	caddr_t			*outparms;
+		      unsigned int cmd, unsigned long l)
+{
+	int rc;
+	tusb_interface_t tif;
+	caddr_t *inparms;
+	caddr_t *outparms;
 
 	printk("tusb: Entered the ioctl call\n");
 
@@ -186,79 +196,91 @@
 	inparms = NULL;
 	outparms = NULL;
 
-	        if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
-                /* Bad address */
-                return(-EFAULT);
-        }
+	if (copy_from_user(&tif, (void *)l, sizeof(tif))) {
+		/* Bad address */
+		return (-EFAULT);
+	}
 
-        /*
-         * Setup inparms and outparms as needed
-         */
-        if (tif.in_len > 0) {
-                inparms = (caddr_t *)kmalloc(tif.in_len, GFP_KERNEL);
-                if (!inparms) {
-                        return(-ENOMEM);
-                }
+	/*
+	 * Setup inparms and outparms as needed
+	 */
+	if (tif.in_len > 0) {
+		inparms = (caddr_t *) kmalloc(tif.in_len, GFP_KERNEL);
+		if (!inparms) {
+			return (-ENOMEM);
+		}
 
-                rc = copy_from_user(inparms, tif.in_data, tif.in_len);
-                if (rc) {
-                        kfree(inparms);
-                        return(-EFAULT);
-                }
-        }
-        if (tif.out_len > 0) {
-                outparms = (caddr_t *)kmalloc(tif.out_len, GFP_KERNEL);
-                if (!outparms) {
-                        kfree(inparms);
-                        return(-ENOMEM);
-                }
-        }
+		rc = copy_from_user(inparms, tif.in_data, tif.in_len);
+		if (rc) {
+			kfree(inparms);
+			return (-EFAULT);
+		}
+	}
+	if (tif.out_len > 0) {
+		outparms = (caddr_t *) kmalloc(tif.out_len, GFP_KERNEL);
+		if (!outparms) {
+			kfree(inparms);
+			return (-ENOMEM);
+		}
+	}
 
-	switch(cmd) {
-		case FIND_DEV:		rc = test_find_usbdev(); break;
-		case TEST_FIND_HCD:	rc = test_find_hcd(); break;
-		case TEST_HCD_PROBE:	rc = test_hcd_probe(); break;
-		case TEST_HCD_REMOVE:	rc = test_hcd_remove(); break;
-		case TEST_HCD_SUSPEND: 	rc = test_hcd_suspend(); break;
-		case TEST_HCD_RESUME:	rc = test_hcd_resume(); break;
-		default:
-			printk("Mismatching ioctl command\n");
-			rc = 1;
-			break;
+	switch (cmd) {
+	case FIND_DEV:
+		rc = test_find_usbdev();
+		break;
+	case TEST_FIND_HCD:
+		rc = test_find_hcd();
+		break;
+	case TEST_HCD_PROBE:
+		rc = test_hcd_probe();
+		break;
+	case TEST_HCD_REMOVE:
+		rc = test_hcd_remove();
+		break;
+	case TEST_HCD_SUSPEND:
+		rc = test_hcd_suspend();
+		break;
+	case TEST_HCD_RESUME:
+		rc = test_hcd_resume();
+		break;
+	default:
+		printk("Mismatching ioctl command\n");
+		rc = 1;
+		break;
 	}
 
 	if (!ltp_usb.dev)
 		printk("tusb: After ioctl call dev DNE\n");
 
 	/*
-         * copy in the return data, and test return code
-         */
-        tif.out_rc = rc;
-        rc = 0;
+	 * copy in the return data, and test return code
+	 */
+	tif.out_rc = rc;
+	rc = 0;
 
-        /* if outparms then copy outparms into tif.out_data */
-        if (outparms) {
-                if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
-                        printk("tpci: Unsuccessful copy_to_user of outparms\n");
-                        rc = -EFAULT;
-                }
-        }
+	/* if outparms then copy outparms into tif.out_data */
+	if (outparms) {
+		if (copy_to_user(tif.out_data, outparms, tif.out_len)) {
+			printk("tpci: Unsuccessful copy_to_user of outparms\n");
+			rc = -EFAULT;
+		}
+	}
 
-        /* copy tif structure into l so that can be used by user program */
-        if (copy_to_user((void*)l, &tif, sizeof(tif))) {
-                printk("tpci: Unsuccessful copy_to_user of tif\n");
-                rc = -EFAULT;
-        }
+	/* copy tif structure into l so that can be used by user program */
+	if (copy_to_user((void *)l, &tif, sizeof(tif))) {
+		printk("tpci: Unsuccessful copy_to_user of tif\n");
+		rc = -EFAULT;
+	}
 
-        /*
-         * free inparms and outparms
-         */
-        if (inparms) {
-                kfree(inparms);
-        }
-        if (outparms) {
-                kfree(outparms);
-        }
+	/*
+	 * free inparms and outparms
+	 */
+	if (inparms) {
+		kfree(inparms);
+	}
+	if (outparms) {
+		kfree(outparms);
+	}
 
 	return rc;
 }
@@ -271,9 +293,12 @@
  *	structure to the device pointer so that
  *	it can be used future test calls
  */
-static int test_find_usbdev() {
-	struct usb_device *udev = (struct usb_device *)kmalloc(sizeof(struct usb_device), GFP_KERNEL);
-	struct usb_bus *bus =  (struct usb_bus *)kmalloc(sizeof(struct usb_bus), GFP_KERNEL);
+static int test_find_usbdev()
+{
+	struct usb_device *udev =
+	    (struct usb_device *)kmalloc(sizeof(struct usb_device), GFP_KERNEL);
+	struct usb_bus *bus =
+	    (struct usb_bus *)kmalloc(sizeof(struct usb_bus), GFP_KERNEL);
 
 	/* Zero out the ltp_usb */
 	memset(&ltp_usb, 0, sizeof(tusb_user_t));
@@ -287,8 +312,7 @@
 	if (!bus) {
 		printk("tusb: Did not allocate a bus\n");
 		return 1;
-	}
-	else {
+	} else {
 		printk("tusb: Allocated a bus pointer\n");
 		memcpy(ltp_usb.bus, bus, sizeof(struct usb_bus));
 		printk("test1\n");
@@ -299,8 +323,7 @@
 	if (udev) {
 		printk("tusb: Found a usb device pointer\n");
 		memcpy(ltp_usb.dev, udev, sizeof(struct usb_device));
-	}
-	else {
+	} else {
 		printk("tusb: Failed find usb device pointer\n");
 		return 1;
 	}
@@ -321,8 +344,10 @@
  * 	have either uchi or ohci usb options enabled
  *	or will not find a device
  */
-static int test_find_hcd() {
-	struct pci_dev *pdev = (struct pci_dev *)kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
+static int test_find_hcd()
+{
+	struct pci_dev *pdev =
+	    (struct pci_dev *)kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
 
 	ltp_usb.pdev = pdev;
 
@@ -339,8 +364,7 @@
 			printk("tusb: id_table exists\n");
 
 		return 0;
-	}
-	else {
+	} else {
 		printk("tusb: Failed to find host controller\n");
 		printk("tusb: Check kernel options enabled\n");
 		return 1;
@@ -357,11 +381,13 @@
  *	enable the usb hostcontroller, pass in a pci_dev
  * 	and a pci_device_id
  */
-static int test_hcd_probe() {
+static int test_hcd_probe()
+{
 	int rc;
 	struct usb_hcd *hcd = NULL;
 	struct pci_dev *pdev = ltp_usb.pdev;
-	struct pci_device_id *id = (struct pci_device_id *)pdev->driver->id_table;
+	struct pci_device_id *id =
+	    (struct pci_device_id *)pdev->driver->id_table;
 
 	if (!pdev) {
 		printk("tusb: pdev pointer not set\n");
@@ -379,10 +405,9 @@
 	if (!hcd) {
 		printk("tusb: hcd pointer not found\n");
 		return 1;
-	}
-	else
-		release_region(pci_resource_start (pdev, hcd->region),
-				pci_resource_len (pdev, hcd->region));
+	} else
+		release_region(pci_resource_start(pdev, hcd->region),
+			       pci_resource_len(pdev, hcd->region));
 
 	/* make test call */
 	rc = usb_hcd_pci_probe(pdev, id);
@@ -403,7 +428,8 @@
  * 	before probe test call so that regions
  *	will be available to the probe test call
  */
-static int test_hcd_remove() {
+static int test_hcd_remove()
+{
 	struct pci_dev *pdev = NULL;
 	struct usb_hcd *hcd = NULL;
 	struct hc_driver *hdrv = NULL;
@@ -412,8 +438,7 @@
 	if (!ltp_usb.pdev) {
 		printk("tusb: pdev pointer not found\n");
 		return 1;
-	}
-	else {
+	} else {
 		pdev = ltp_usb.pdev;
 		hcd = pci_get_drvdata(pdev);
 	}
@@ -421,8 +446,7 @@
 	if (!hdrv->stop) {
 		printk("tusb: stop function not found\n");
 		return 1;
-	}
-	else
+	} else
 		hcd->driver->stop(hcd);
 
 	return 0;
@@ -434,7 +458,8 @@
  *	a u32 state variable that is the state to
  *	move into
  */
-static int test_hcd_suspend() {
+static int test_hcd_suspend()
+{
 	int rc;
 	struct pci_dev *pdev = NULL;
 
@@ -460,27 +485,29 @@
  *	so that device will be active and able to use
  *	again
  */
-static int test_hcd_resume() {
+static int test_hcd_resume()
+{
 	int rc;
 	struct pci_dev *pdev = NULL;
 
 	/* check that pdev is set */
-        if (!(pdev = ltp_usb.pdev)) {
-                printk("tusb: Cant find host controller pci_dev pointer\n");
-                return 1;
-        }
+	if (!(pdev = ltp_usb.pdev)) {
+		printk("tusb: Cant find host controller pci_dev pointer\n");
+		return 1;
+	}
 
-        /* make call and check return value */
-        rc = usb_hcd_pci_resume(pdev);
-        if (rc)
-                printk("tusb: Resume got retval, failure\n");
-        else
-                printk("tusb: Resume success\n");
+	/* make call and check return value */
+	rc = usb_hcd_pci_resume(pdev);
+	if (rc)
+		printk("tusb: Resume got retval, failure\n");
+	else
+		printk("tusb: Resume success\n");
 
-        return rc;
+	return rc;
 }
 
-static int tusb_init_module(void) {
+static int tusb_init_module(void)
+{
 	int rc;
 
 	SET_MODULE_OWNER(&tusb_fops);
@@ -498,7 +525,8 @@
 	return usb_register(&test_usb_driver);
 }
 
-static void tusb_exit_module(void) {
+static void tusb_exit_module(void)
+{
 
 	kfree(ltp_usb.dev);
 
@@ -512,4 +540,4 @@
 }
 
 module_init(tusb_init_module)
-module_exit(tusb_exit_module)
+    module_exit(tusb_exit_module)
diff --git a/testcases/kernel/device-drivers/usb/user_usb/tusb_ki.c b/testcases/kernel/device-drivers/usb/user_usb/tusb_ki.c
index e71fafa..2837ab0 100644
--- a/testcases/kernel/device-drivers/usb/user_usb/tusb_ki.c
+++ b/testcases/kernel/device-drivers/usb/user_usb/tusb_ki.c
@@ -51,31 +51,32 @@
  * along with the corresponding length
  * in a more specific function
  */
-int ki_generic(int fd, int flag) {
-        int                     rc;
-        tusb_interface_t        tif;
+int ki_generic(int fd, int flag)
+{
+	int rc;
+	tusb_interface_t tif;
 
-        /*
-         * build interface structure
-         */
-        tif.in_len = 0;
-        tif.in_data = 0;
-        tif.out_len = 0;
-        tif.out_data = 0;
-        tif.out_rc = 0;
+	/*
+	 * build interface structure
+	 */
+	tif.in_len = 0;
+	tif.in_data = 0;
+	tif.out_len = 0;
+	tif.out_data = 0;
+	tif.out_rc = 0;
 
-        /*
-         * ioctl call for flag
-         */
-        rc = ioctl(fd, flag, &tif);
-        if (rc) {
-                printf("Ioctl error\n");
-                return rc;
-        }
-        if (tif.out_rc) {
-                printf("Specific errorr: ");
-                return tif.out_rc;
-        }
+	/*
+	 * ioctl call for flag
+	 */
+	rc = ioctl(fd, flag, &tif);
+	if (rc) {
+		printf("Ioctl error\n");
+		return rc;
+	}
+	if (tif.out_rc) {
+		printf("Specific errorr: ");
+		return tif.out_rc;
+	}
 
-        return rc;
+	return rc;
 }
diff --git a/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c b/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
index 940bc98..14c0df1 100644
--- a/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
+++ b/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c
@@ -27,95 +27,103 @@
 #include <linux/errno.h>
 #include "../tusb/tusb.h"
 
-static int tusb_fd = -1;		//file descriptor
+static int tusb_fd = -1;	//file descriptor
 
-int
-tusbopen() {
+int tusbopen()
+{
 
-    dev_t devt;
-	struct stat     st;
-    int    rc = 0;
+	dev_t devt;
+	struct stat st;
+	int rc = 0;
 
-    devt = makedev(TUSB_MAJOR, 0);
+	devt = makedev(TUSB_MAJOR, 0);
 
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist. */
-            rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-        } else {
-            printf("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n", errno);
-        }
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist. */
+			rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+						 S_IRGRP | S_IXGRP |
+						 S_IROTH | S_IXOTH));
+		} else {
+			printf
+			    ("ERROR: Problem with Base dev directory.  Error code from stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        if (!(st.st_mode & S_IFDIR)) {
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
-                                                S_IRGRP | S_IXGRP |
-                                                S_IROTH | S_IXOTH));
-            }
-        }
-    }
+	} else {
+		if (!(st.st_mode & S_IFDIR)) {
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mkdir(DEVICE_NAME, (S_IFDIR | S_IRWXU |
+							 S_IRGRP | S_IXGRP |
+							 S_IROTH | S_IXOTH));
+			}
+		}
+	}
 
-    /*
-     * Check for the /dev/tbase node, and create if it does not
-     * exist.
-     */
-    rc = stat(DEVICE_NAME, &st);
-    if (rc) {
-        if (errno == ENOENT) {
-            /* dev node does not exist */
-            rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-        } else {
-            printf("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n", errno);
-        }
+	/*
+	 * Check for the /dev/tbase node, and create if it does not
+	 * exist.
+	 */
+	rc = stat(DEVICE_NAME, &st);
+	if (rc) {
+		if (errno == ENOENT) {
+			/* dev node does not exist */
+			rc = mknod(DEVICE_NAME,
+				   (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
+				    S_IWGRP), devt);
+		} else {
+			printf
+			    ("ERROR:Problem with tbase device node directory.  Error code form stat() is %d\n\n",
+			     errno);
+		}
 
-    } else {
-        /*
-         * /dev/tbase CHR device exists.  Check to make sure it is for a
-         * block device and that it has the right major and minor.
-         */
-        if ((!(st.st_mode & S_IFCHR)) ||
-             (st.st_rdev != devt)) {
+	} else {
+		/*
+		 * /dev/tbase CHR device exists.  Check to make sure it is for a
+		 * block device and that it has the right major and minor.
+		 */
+		if ((!(st.st_mode & S_IFCHR)) || (st.st_rdev != devt)) {
 
-            /* Recreate the dev node. */
-            rc = unlink(DEVICE_NAME);
-            if (!rc) {
-                rc = mknod(DEVICE_NAME, (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            }
-        }
-    }
+			/* Recreate the dev node. */
+			rc = unlink(DEVICE_NAME);
+			if (!rc) {
+				rc = mknod(DEVICE_NAME,
+					   (S_IFCHR | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			}
+		}
+	}
 
-    tusb_fd = open(DEVICE_NAME, O_RDWR);
+	tusb_fd = open(DEVICE_NAME, O_RDWR);
 
-    if (tusb_fd < 0) {
-        printf("ERROR: Open of device %s failed %d errno = %d\n", DEVICE_NAME,tusb_fd, errno);
-        return errno;
-    }
-    else {
-        printf("Device opened successfully \n");
-      return 0;
-    }
+	if (tusb_fd < 0) {
+		printf("ERROR: Open of device %s failed %d errno = %d\n",
+		       DEVICE_NAME, tusb_fd, errno);
+		return errno;
+	} else {
+		printf("Device opened successfully \n");
+		return 0;
+	}
 
 }
 
-int
-tusbclose() {
+int tusbclose()
+{
 	/*
 	 * Close the tusb driver
 	 */
 	if (tusb_fd != -1) {
-		close (tusb_fd);
+		close(tusb_fd);
 		tusb_fd = -1;
 	}
 
 	return 0;
 }
 
-int main() {
-	int 	rc = 0;
+int main()
+{
+	int rc = 0;
 
 	rc = tusbopen();
 	if (rc) {
@@ -131,27 +139,27 @@
 
 	/* test find usb hostcontroller */
 	if (ki_generic(tusb_fd, TEST_FIND_HCD))
-                printf("Failed to find usb hcd pointer\n");
-        else
-                printf("Found usb hcd pointer\n");
+		printf("Failed to find usb hcd pointer\n");
+	else
+		printf("Found usb hcd pointer\n");
 
 	/* test hcd probe */
 	if (ki_generic(tusb_fd, TEST_HCD_PROBE))
-                printf("Failed on hcd probe call\n");
-        else
-                printf("Success hcd probe\n");
+		printf("Failed on hcd probe call\n");
+	else
+		printf("Success hcd probe\n");
 
-        /* test hcd suspend */
-        if (ki_generic(tusb_fd, TEST_HCD_SUSPEND))
-                printf("Failed on hcd suspend call\n");
-        else
-                printf("Success hcd suspend\n");
+	/* test hcd suspend */
+	if (ki_generic(tusb_fd, TEST_HCD_SUSPEND))
+		printf("Failed on hcd suspend call\n");
+	else
+		printf("Success hcd suspend\n");
 
-        /* test hcd resume */
-        if (ki_generic(tusb_fd, TEST_HCD_RESUME))
-                printf("Failed on hcd resume call\n");
-        else
-                printf("Success hcd resume\n");
+	/* test hcd resume */
+	if (ki_generic(tusb_fd, TEST_HCD_RESUME))
+		printf("Failed on hcd resume call\n");
+	else
+		printf("Success hcd resume\n");
 
 #if 0
 	/* test hcd remove */
diff --git a/testcases/kernel/device-drivers/v4l/kernel_space/video_dummy.c b/testcases/kernel/device-drivers/v4l/kernel_space/video_dummy.c
index 6ee380d..f1b3a57 100644
--- a/testcases/kernel/device-drivers/v4l/kernel_space/video_dummy.c
+++ b/testcases/kernel/device-drivers/v4l/kernel_space/video_dummy.c
@@ -7,7 +7,7 @@
 #include <media/v4l2-dev.h>
 
 struct dummy_dev {
-	struct video_device        *vfd;
+	struct video_device *vfd;
 };
 
 static int dummy_open(struct inode *inode, struct file *file)
@@ -28,8 +28,8 @@
 	return 0;
 }
 
-static int vidioc_querycap(struct file *file, void  *priv,
-					struct v4l2_capability *cap)
+static int vidioc_querycap(struct file *file, void *priv,
+			   struct v4l2_capability *cap)
 {
 	strcpy(cap->driver, "dummy");
 	strcpy(cap->card, "dummy");
@@ -39,10 +39,10 @@
 }
 
 static struct file_operations dummy_fops = {
-	.owner		= THIS_MODULE,
-	.open           = dummy_open,
-	.release        = dummy_close,
-	.ioctl          = video_ioctl2, /* V4L2 ioctl handler */
+	.owner = THIS_MODULE,
+	.open = dummy_open,
+	.release = dummy_close,
+	.ioctl = video_ioctl2,	/* V4L2 ioctl handler */
 
 #ifdef CONFIG_COMPAT
 /*
@@ -50,26 +50,26 @@
  * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9bb7cde793f0637cfbdd21c04050ffcef33a5624
  */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
-	.compat_ioctl   = v4l_compat_ioctl32,
+	.compat_ioctl = v4l_compat_ioctl32,
 #else
-	.compat_ioctl   = v4l2_compat_ioctl32,
+	.compat_ioctl = v4l2_compat_ioctl32,
 #endif
 #endif
 };
 
 static const struct v4l2_ioctl_ops dummy_ioctl_ops = {
-	.vidioc_querycap      = vidioc_querycap,
+	.vidioc_querycap = vidioc_querycap,
 };
 
 static const struct video_device dummy_template = {
-	.name		= "dummy",
-	.fops           = &dummy_fops,
-	.ioctl_ops 	= &dummy_ioctl_ops,
-	.minor		= -1,
-	.release	= video_device_release,
+	.name = "dummy",
+	.fops = &dummy_fops,
+	.ioctl_ops = &dummy_ioctl_ops,
+	.minor = -1,
+	.release = video_device_release,
 
-	.tvnorms              = V4L2_STD_525_60,
-	.current_norm         = V4L2_STD_NTSC_M,
+	.tvnorms = V4L2_STD_525_60,
+	.current_norm = V4L2_STD_NTSC_M,
 };
 
 static struct video_device *dummy_vfd = NULL;
@@ -91,8 +91,9 @@
 		return ret;
 	}
 
-	printk(KERN_INFO "video_dummy: V4L2 device registered as /dev/video%d\n",
-		dummy_vfd->num);
+	printk(KERN_INFO
+	       "video_dummy: V4L2 device registered as /dev/video%d\n",
+	       dummy_vfd->num);
 
 	return 0;
 }
@@ -100,7 +101,8 @@
 static void __exit video_dummy_exit(void)
 {
 
-	printk(KERN_INFO "video_dummy: removing /dev/video%d\n", dummy_vfd->num);
+	printk(KERN_INFO "video_dummy: removing /dev/video%d\n",
+	       dummy_vfd->num);
 	video_unregister_device(dummy_vfd);
 	dummy_vfd = NULL;
 
diff --git a/testcases/kernel/device-drivers/v4l/user_space/dev_video.c b/testcases/kernel/device-drivers/v4l/user_space/dev_video.c
index 19f948f..0434b9a 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/dev_video.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/dev_video.c
@@ -28,7 +28,8 @@
 static int f;
 static int dev_video_state;
 
-static int try_ASUS_camera(char *path, char* value) {
+static int try_ASUS_camera(char *path, char *value)
+{
 	int ASUS_camera;
 	size_t s;
 	int ret;
@@ -60,7 +61,8 @@
 	return f;
 }
 
-int open_video() {
+int open_video()
+{
 	int error = 0;
 
 	fflush(stdout);
@@ -71,7 +73,8 @@
 		fprintf(stderr, "Retrying with ASUS camera...\n");
 		f = try_ASUS_camera("/proc/acpi/asus/camera", "1");
 		if (f < 0) {
-			f = try_ASUS_camera("/sys/devices/platform/eeepc/camera", "1");
+			f = try_ASUS_camera
+			    ("/sys/devices/platform/eeepc/camera", "1");
 			if (f < 0) {
 				error = 1;
 			} else {
@@ -86,7 +89,8 @@
 	return error;
 }
 
-int close_video() {
+int close_video()
+{
 	int ret;
 
 	fflush(stdout);
@@ -98,19 +102,20 @@
 		return 1;
 	}
 	switch (dev_video_state) {
-		case DEV_VIDEO_STATE_NORMAL:
-			break;
-		case DEV_VIDEO_STATE_ASUS:
-			try_ASUS_camera("/proc/acpi/asus/camera", "0");
-			break;
-		case DEV_VIDEO_STATE_EEEPC:
-			try_ASUS_camera("/sys/devices/platform/eeepc/camera", "0");
-			break;
+	case DEV_VIDEO_STATE_NORMAL:
+		break;
+	case DEV_VIDEO_STATE_ASUS:
+		try_ASUS_camera("/proc/acpi/asus/camera", "0");
+		break;
+	case DEV_VIDEO_STATE_EEEPC:
+		try_ASUS_camera("/sys/devices/platform/eeepc/camera", "0");
+		break;
 	}
 
 	return 0;
 }
 
-int get_video_fd() {
+int get_video_fd()
+{
 	return f;
 }
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDIO.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDIO.c
index d6bc9c6..5b6dca0 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDIO.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDIO.c
@@ -35,12 +35,12 @@
 
 #include "test_VIDIOC_ENUMAUDIO.h"
 
-int valid_audio_capability(__u32 capability) {
+int valid_audio_capability(__u32 capability)
+{
 	int valid = 0;
 
-	if ( (capability & ~(V4L2_AUDCAP_STEREO |
-			     V4L2_AUDCAP_AVL))
-		== 0) {
+	if ((capability & ~(V4L2_AUDCAP_STEREO | V4L2_AUDCAP_AVL))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -48,11 +48,12 @@
 	return valid;
 }
 
-int valid_audio_mode(__u32 mode) {
+int valid_audio_mode(__u32 mode)
+{
 	int valid = 0;
 
 	if ((mode & ~(V4L2_AUDMODE_AVL))
-		== 0) {
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -60,7 +61,8 @@
 	return valid;
 }
 
-void test_VIDIOC_G_AUDIO() {
+void test_VIDIOC_G_AUDIO()
+{
 	int ret_get, errno_get;
 	struct v4l2_audio audio;
 	struct v4l2_audio audio2;
@@ -77,8 +79,8 @@
 
 		//CU_ASSERT_EQUAL(audio.index, ?);
 
-		CU_ASSERT(0 < strlen( (char*)audio.name ));
-		CU_ASSERT(valid_string((char*)audio.name, sizeof(audio.name)));
+		CU_ASSERT(0 < strlen((char *)audio.name));
+		CU_ASSERT(valid_string((char *)audio.name, sizeof(audio.name)));
 
 		CU_ASSERT(valid_audio_capability(audio.capability));
 		CU_ASSERT(valid_audio_mode(audio.mode));
@@ -93,7 +95,8 @@
 		 */
 		memset(&audio2, 0, sizeof(audio2));
 		audio2.index = audio.index;
-		strncpy((char*)audio2.name, (char*)audio.name, sizeof(audio2.name));
+		strncpy((char *)audio2.name, (char *)audio.name,
+			sizeof(audio2.name));
 		audio2.capability = audio.capability;
 		audio2.mode = audio.mode;
 		CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
@@ -104,10 +107,8 @@
 			audio.index,
 			audio.name,
 			audio.capability,
-			audio.mode,
-			audio.reserved[0],
-			audio.reserved[1]
-			);
+			audio.mode, audio.reserved[0], audio.reserved[1]
+		    );
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -121,7 +122,8 @@
 
 }
 
-void test_VIDIOC_G_AUDIO_ignore_index() {
+void test_VIDIOC_G_AUDIO_ignore_index()
+{
 	int ret_get, errno_get;
 	int ret2, errno2;
 	struct v4l2_audio audio;
@@ -130,8 +132,7 @@
 	/* check whether the "index" field is ignored by VIDIOC_G_AUDIO */
 
 	memset(&audio, 0, sizeof(audio));
-	dprintf("\t%s:%u: audio.index=%u\n",
-		__FILE__, __LINE__, audio.index);
+	dprintf("\t%s:%u: audio.index=%u\n", __FILE__, __LINE__, audio.index);
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_AUDIO, &audio);
 	errno_get = errno;
 
@@ -158,7 +159,8 @@
 
 }
 
-void test_VIDIOC_G_AUDIO_NULL() {
+void test_VIDIOC_G_AUDIO_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_audio audio;
@@ -192,7 +194,8 @@
 
 }
 
-void test_VIDIOC_S_AUDIO() {
+void test_VIDIOC_S_AUDIO()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_enum, errno_enum;
@@ -236,7 +239,8 @@
 		if (ret_enum == 0) {
 			memset(&audio_set, 0xff, sizeof(audio_set));
 			audio_set.index = index;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDIO, &audio_set);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_AUDIO, &audio_set);
 			errno_set = errno;
 
 			/* It shall be always possible to set the audio input to the
@@ -252,7 +256,7 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	/* try to set audio input to beyond the enumerated values */
-	for (i=0; i<=32; i++) {
+	for (i = 0; i <= 32; i++) {
 		memset(&audio_set, 0xff, sizeof(audio_set));
 		audio_set.index = index;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDIO, &audio_set);
@@ -285,7 +289,8 @@
 
 }
 
-void test_VIDIOC_S_AUDIO_S32_MAX() {
+void test_VIDIOC_S_AUDIO_S32_MAX()
+{
 	int ret_set, errno_set;
 	int ret_orig, errno_orig;
 	struct v4l2_audio audio;
@@ -303,7 +308,7 @@
 
 	/* test invalid index */
 	memset(&audio, 0xff, sizeof(audio));
-	audio.index = (__u32)S32_MAX;
+	audio.index = (__u32) S32_MAX;
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDIO, &audio);
 	errno_set = errno;
 
@@ -315,7 +320,7 @@
 
 	/* Check whether the original audio struct is untouched */
 	memset(&audio2, 0xff, sizeof(audio2));
-	audio2.index = (__u32)S32_MAX;
+	audio2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
 
 	/* restore the original audio input settings */
@@ -341,7 +346,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDIO_S32_MAX_1() {
+void test_VIDIOC_S_AUDIO_S32_MAX_1()
+{
 	int ret_set, errno_set;
 	int ret_orig, errno_orig;
 	struct v4l2_audio audio;
@@ -359,7 +365,7 @@
 
 	/* test invalid index */
 	memset(&audio, 0xff, sizeof(audio));
-	audio.index = ((__u32)S32_MAX)+1;
+	audio.index = ((__u32) S32_MAX) + 1;
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDIO, &audio);
 	errno_set = errno;
 
@@ -371,7 +377,7 @@
 
 	/* Check whether the original audio struct is untouched */
 	memset(&audio2, 0xff, sizeof(audio2));
-	audio2.index = ((__u32)S32_MAX)+1;
+	audio2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
 
 	/* restore the original audio input settings */
@@ -397,7 +403,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDIO_U32_MAX() {
+void test_VIDIOC_S_AUDIO_U32_MAX()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	struct v4l2_audio audio;
@@ -452,7 +459,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDIO_NULL() {
+void test_VIDIOC_S_AUDIO_NULL()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDOUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDOUT.c
index ce4bc77..801798b 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDOUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_AUDOUT.c
@@ -35,11 +35,12 @@
 
 #include "test_VIDIOC_AUDOUT.h"
 
-int valid_audioout_mode(__u32 mode) {
+int valid_audioout_mode(__u32 mode)
+{
 	int valid = 0;
 
 	if ((mode & ~(V4L2_AUDMODE_AVL))
-		== 0) {
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -47,7 +48,8 @@
 	return valid;
 }
 
-void test_VIDIOC_G_AUDOUT() {
+void test_VIDIOC_G_AUDOUT()
+{
 	int ret_get, errno_get;
 	struct v4l2_audioout audioout;
 	struct v4l2_audioout audioout2;
@@ -56,15 +58,17 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_AUDIOOUT, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_AUDIOOUT, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
 
 		//CU_ASSERT_EQUAL(audioout.index, ?);
 
-		CU_ASSERT(0 < strlen( (char*)audioout.name ));
-		CU_ASSERT(valid_string((char*)audioout.name, sizeof(audioout.name)));
+		CU_ASSERT(0 < strlen((char *)audioout.name));
+		CU_ASSERT(valid_string
+			  ((char *)audioout.name, sizeof(audioout.name)));
 
 		CU_ASSERT_EQUAL(audioout.capability, 0);
 		CU_ASSERT_EQUAL(audioout.mode, 0);
@@ -78,10 +82,12 @@
 		 */
 		memset(&audioout2, 0, sizeof(audioout2));
 		audioout2.index = audioout.index;
-		strncpy((char*)audioout2.name, (char*)audioout.name, sizeof(audioout2.name));
+		strncpy((char *)audioout2.name, (char *)audioout.name,
+			sizeof(audioout2.name));
 		audioout2.capability = audioout.capability;
 		audioout2.mode = audioout.mode;
-		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
+		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)),
+				0);
 
 		dprintf("\taudioout = {.index=%u, .name=\"%s\", "
 			".capability=0x%X, .mode=0x%X, "
@@ -90,9 +96,8 @@
 			audioout.name,
 			audioout.capability,
 			audioout.mode,
-			audioout.reserved[0],
-			audioout.reserved[1]
-			);
+			audioout.reserved[0], audioout.reserved[1]
+		    );
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -100,13 +105,15 @@
 
 		/* check if the audioout structure is untouched */
 		memset(&audioout2, 0xff, sizeof(audioout2));
-		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
+		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)),
+				0);
 
 	}
 
 }
 
-void test_VIDIOC_G_AUDOUT_ignore_index() {
+void test_VIDIOC_G_AUDOUT_ignore_index()
+{
 	int reg_get1, errno1;
 	int reg_get2, errno2;
 	struct v4l2_audioout audioout;
@@ -118,18 +125,21 @@
 	reg_get1 = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout);
 	errno1 = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, reg_get1=%i, errno1=%i\n", reg_get1, errno1);
+	dprintf("\tVIDIOC_G_AUDOUT, reg_get1=%i, errno1=%i\n", reg_get1,
+		errno1);
 
 	memset(&audioout2, 0, sizeof(audioout2));
 	audioout2.index = U32_MAX;
 	reg_get2 = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout2);
 	errno2 = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, reg_get2=%i, errno2=%i\n", reg_get2, errno2);
+	dprintf("\tVIDIOC_G_AUDOUT, reg_get2=%i, errno2=%i\n", reg_get2,
+		errno2);
 
 	if (reg_get1 == 0) {
 		CU_ASSERT_EQUAL(reg_get2, 0);
-		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
+		CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)),
+				0);
 	} else {
 		CU_ASSERT_EQUAL(reg_get1, -1);
 		CU_ASSERT_EQUAL(errno1, EINVAL);
@@ -139,7 +149,8 @@
 
 }
 
-void test_VIDIOC_G_AUDOUT_NULL() {
+void test_VIDIOC_G_AUDOUT_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_audioout audioout;
@@ -174,7 +185,8 @@
  *       - try with STREAM_ON
  */
 
-void test_VIDIOC_S_AUDOUT() {
+void test_VIDIOC_S_AUDOUT()
+{
 	int ret_orig, errno_orig;
 	int ret_enum, errno_enum;
 	int ret_set, errno_set;
@@ -196,7 +208,8 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout_orig);
 	errno_orig = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig, errno_orig);
+	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig,
+		errno_orig);
 
 	if (ret_orig == 0) {
 		CU_ASSERT_EQUAL(ret_orig, 0);
@@ -211,13 +224,16 @@
 	do {
 		memset(&audioout_enum, 0, sizeof(audioout_enum));
 		audioout_enum.index = index;
-		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDOUT, &audioout_enum);
+		ret_enum =
+		    ioctl(get_video_fd(), VIDIOC_ENUMAUDOUT, &audioout_enum);
 		errno_enum = errno;
 
 		if (ret_enum == 0) {
 			memset(&audioout_set, 0xff, sizeof(audioout_set));
 			audioout_set.index = index;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout_set);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_AUDOUT,
+				  &audioout_set);
 			errno_set = errno;
 
 			/* It shall be always possible to set the audio output to the
@@ -233,7 +249,7 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	/* try to set audio output to beyond the enumerated values */
-	for (i=0; i<=32; i++) {
+	for (i = 0; i <= 32; i++) {
 		memset(&audioout_set, 0xff, sizeof(audioout_set));
 		audioout_set.index = index;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout_set);
@@ -266,7 +282,8 @@
 
 }
 
-void test_VIDIOC_S_AUDOUT_S32_MAX() {
+void test_VIDIOC_S_AUDOUT_S32_MAX()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	struct v4l2_audioout audioout;
@@ -279,11 +296,12 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout_orig);
 	errno_orig = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig, errno_orig);
+	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig,
+		errno_orig);
 
 	/* test invalid index */
 	memset(&audioout, 0xff, sizeof(audioout));
-	audioout.index = (__u32)S32_MAX;
+	audioout.index = (__u32) S32_MAX;
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout);
 	errno_set = errno;
 
@@ -292,7 +310,7 @@
 
 	/* Check whether the original audioout struct is untouched */
 	memset(&audioout2, 0xff, sizeof(audioout2));
-	audioout2.index = (__u32)S32_MAX;
+	audioout2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
 
 	/* restore the original audio output settings */
@@ -301,7 +319,8 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout_set);
 	errno_set = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set, errno_set);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set,
+		errno_set);
 
 	if (ret_orig == 0) {
 		/* If it was possible at the beginning to get the audio output then
@@ -317,7 +336,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDOUT_S32_MAX_1() {
+void test_VIDIOC_S_AUDOUT_S32_MAX_1()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	struct v4l2_audioout audioout;
@@ -330,11 +350,12 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout_orig);
 	errno_orig = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig, errno_orig);
+	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig,
+		errno_orig);
 
 	/* test invalid index */
 	memset(&audioout, 0xff, sizeof(audioout));
-	audioout.index = ((__u32)S32_MAX)+1;
+	audioout.index = ((__u32) S32_MAX) + 1;
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout);
 	errno_set = errno;
 
@@ -343,7 +364,7 @@
 
 	/* Check whether the original audioout struct is untouched */
 	memset(&audioout2, 0xff, sizeof(audioout2));
-	audioout2.index = ((__u32)S32_MAX)+1;
+	audioout2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
 
 	/* restore the original audio output settings */
@@ -352,7 +373,8 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout_set);
 	errno_set = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set, errno_set);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set,
+		errno_set);
 
 	if (ret_orig == 0) {
 		/* If it was possible at the beginning to get the audio output then
@@ -368,7 +390,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDOUT_U32_MAX() {
+void test_VIDIOC_S_AUDOUT_U32_MAX()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	struct v4l2_audioout audioout;
@@ -381,7 +404,8 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audioout_orig);
 	errno_orig = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig, errno_orig);
+	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig,
+		errno_orig);
 	/* test invalid index */
 	memset(&audioout, 0xff, sizeof(audioout));
 	audioout.index = U32_MAX;
@@ -402,7 +426,8 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audioout_set);
 	errno_set = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set, errno_set);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set,
+		errno_set);
 
 	if (ret_orig == 0) {
 		/* If it was possible at the beginning to get the audio output then
@@ -418,7 +443,8 @@
 	}
 }
 
-void test_VIDIOC_S_AUDOUT_NULL() {
+void test_VIDIOC_S_AUDOUT_NULL()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_get, errno_get;
@@ -430,18 +456,21 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_AUDOUT, &audio_orig);
 	errno_orig = errno;
 
-	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig, errno_orig);
+	dprintf("\tVIDIOC_G_AUDOUT, ret_orig=%i, errno_orig=%i\n", ret_orig,
+		errno_orig);
 
 	memset(&audio_set, 0, sizeof(audio_set));
 	ret_get = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audio_set);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, NULL);
 	errno_set = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set, errno_set);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set,
+		errno_set);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -460,7 +489,8 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_AUDOUT, &audio_set);
 	errno_set = errno;
 
-	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set, errno_set);
+	dprintf("\tVIDIOC_S_AUDOUT, ret_set=%i, errno_set=%i\n", ret_set,
+		errno_set);
 
 	if (ret_orig == 0) {
 		/* If it was possible at the beginning to get the audio input then
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROP.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROP.c
index fc6e288..273fda4 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROP.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROP.c
@@ -25,7 +25,8 @@
 
 #include "test_VIDIOC_CROP.h"
 
-void do_get_crop(enum v4l2_buf_type type) {
+void do_get_crop(enum v4l2_buf_type type)
+{
 	int ret1, errno1;
 	struct v4l2_crop crop;
 
@@ -47,13 +48,15 @@
 
 }
 
-void test_VIDIOC_G_CROP() {
+void test_VIDIOC_G_CROP()
+{
 	do_get_crop(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_get_crop(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_get_crop(V4L2_BUF_TYPE_VIDEO_OVERLAY);
 }
 
-void do_get_crop_invalid(enum v4l2_buf_type type) {
+void do_get_crop_invalid(enum v4l2_buf_type type)
+{
 	int ret1, errno1;
 	struct v4l2_crop crop;
 
@@ -69,7 +72,8 @@
 	CU_ASSERT_EQUAL(errno1, EINVAL);
 }
 
-void test_VIDIOC_G_CROP_invalid() {
+void test_VIDIOC_G_CROP_invalid()
+{
 	do_get_crop_invalid(0);
 	do_get_crop_invalid(V4L2_BUF_TYPE_VBI_CAPTURE);
 	do_get_crop_invalid(V4L2_BUF_TYPE_VBI_OUTPUT);
@@ -78,11 +82,12 @@
 	do_get_crop_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
 	do_get_crop_invalid(V4L2_BUF_TYPE_PRIVATE);
 	do_get_crop_invalid(S32_MAX);
-	do_get_crop_invalid( ((__u32)S32_MAX)+1 );
+	do_get_crop_invalid(((__u32) S32_MAX) + 1);
 	do_get_crop_invalid(U32_MAX);
 }
 
-void test_VIDIOC_G_CROP_NULL() {
+void test_VIDIOC_G_CROP_NULL()
+{
 	int ret_get1, errno_get1;
 	int ret_get2, errno_get2;
 	int ret_get3, errno_get3;
@@ -140,7 +145,8 @@
 
 }
 
-void do_set_crop(enum v4l2_buf_type type) {
+void do_set_crop(enum v4l2_buf_type type)
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_new, errno_new;
@@ -161,38 +167,23 @@
 		ret_orig, errno_orig,
 		crop_orig.type,
 		crop_orig.c.left,
-		crop_orig.c.top,
-		crop_orig.c.width,
-		crop_orig.c.height
-		);
+		crop_orig.c.top, crop_orig.c.width, crop_orig.c.height);
 
 	memset(&cropcap, 0, sizeof(cropcap));
 	cropcap.type = type;
 	ret_cap = ioctl(get_video_fd(), VIDIOC_CROPCAP, &cropcap);
 	errno_cap = errno;
 
-	dprintf("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
-		".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".pixelaspect = { .numerator = %u, .denominator = %u } "
-		"}\n",
-		__FILE__, __LINE__,
-		ret_cap, errno_cap,
-		cropcap.type,
-
-		cropcap.bounds.left,
-		cropcap.bounds.top,
-		cropcap.bounds.width,
-		cropcap.bounds.height,
-
-		cropcap.defrect.left,
-		cropcap.defrect.top,
-		cropcap.defrect.width,
-		cropcap.defrect.height,
-
-		cropcap.pixelaspect.numerator,
-		cropcap.pixelaspect.denominator
-		);
+	dprintf
+	    ("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
+	     ".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".pixelaspect = { .numerator = %u, .denominator = %u } " "}\n",
+	     __FILE__, __LINE__, ret_cap, errno_cap, cropcap.type,
+	     cropcap.bounds.left, cropcap.bounds.top, cropcap.bounds.width,
+	     cropcap.bounds.height, cropcap.defrect.left, cropcap.defrect.top,
+	     cropcap.defrect.width, cropcap.defrect.height,
+	     cropcap.pixelaspect.numerator, cropcap.pixelaspect.denominator);
 
 	memset(&crop, 0xff, sizeof(crop));
 	crop.type = type;
@@ -204,11 +195,7 @@
 		__FILE__, __LINE__,
 		ret_set, errno_set,
 		crop.type,
-		crop.c.left,
-		crop.c.top,
-		crop.c.width,
-		crop.c.height
-		);
+		crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 	memset(&crop_new, 0, sizeof(crop_new));
 	crop_new.type = type;
@@ -220,10 +207,7 @@
 		ret_new, errno_new,
 		crop_new.type,
 		crop_new.c.left,
-		crop_new.c.top,
-		crop_new.c.width,
-		crop_new.c.height
-		);
+		crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 	if (ret_cap == 0) {
 		CU_ASSERT_EQUAL(ret_cap, 0);
@@ -232,29 +216,31 @@
 
 		if (ret_cap == 0 && ret_new == 0) {
 
-	/*     |   left                                   x   */
-	/* ----+----+-------------------------------------->  */
-	/*     |    :                                         */
-	/* top +    +------ cropcap.bounds -------+  ^        */
-	/*     |    |                             |  |        */
-	/*     |    | +------- crop_new --------+ |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  | height */
-	/*     |    | +-------------------------+ |  |        */
-	/*     |    |                             |  |        */
-	/*     |    |                             |  |        */
-	/*     |    +-----------------------------+  v        */
-	/*     |    :                             :           */
-	/*     |    <---------- width ------------>           */
-	/*     |                                              */
-	/*     v y                                            */
+			/*     |   left                                   x   */
+			/* ----+----+-------------------------------------->  */
+			/*     |    :                                         */
+			/* top +    +------ cropcap.bounds -------+  ^        */
+			/*     |    |                             |  |        */
+			/*     |    | +------- crop_new --------+ |  |        */
+			/*     |    | |                         | |  |        */
+			/*     |    | |                         | |  |        */
+			/*     |    | |                         | |  | height */
+			/*     |    | +-------------------------+ |  |        */
+			/*     |    |                             |  |        */
+			/*     |    |                             |  |        */
+			/*     |    +-----------------------------+  v        */
+			/*     |    :                             :           */
+			/*     |    <---------- width ------------>           */
+			/*     |                                              */
+			/*     v y                                            */
 
 			CU_ASSERT(cropcap.bounds.left <= crop_new.c.left);
 			CU_ASSERT(cropcap.bounds.top <= crop_new.c.top);
 
-			CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.bounds.left+cropcap.bounds.width);
-			CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.bounds.top+cropcap.bounds.height);
+			CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+				  cropcap.bounds.left + cropcap.bounds.width);
+			CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+				  cropcap.bounds.top + cropcap.bounds.height);
 		}
 
 	} else {
@@ -277,11 +263,7 @@
 		__FILE__, __LINE__,
 		ret_set, errno_set,
 		crop.type,
-		crop.c.left,
-		crop.c.top,
-		crop.c.width,
-		crop.c.height
-		);
+		crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 	memset(&crop_new, 0, sizeof(crop_new));
 	crop_new.type = type;
@@ -293,10 +275,7 @@
 		ret_new, errno_new,
 		crop_new.type,
 		crop_new.c.left,
-		crop_new.c.top,
-		crop_new.c.width,
-		crop_new.c.height
-		);
+		crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 	if (ret_cap == 0) {
 		CU_ASSERT_EQUAL(ret_cap, 0);
@@ -305,29 +284,31 @@
 
 		if (ret_cap == 0 && ret_new == 0) {
 
-	/*     |   left                                   x   */
-	/* ----+----+-------------------------------------->  */
-	/*     |    :                                         */
-	/* top +    +------ cropcap.defrect ------+  ^        */
-	/*     |    |                             |  |        */
-	/*     |    | +------- crop_new --------+ |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  | height */
-	/*     |    | +-------------------------+ |  |        */
-	/*     |    |                             |  |        */
-	/*     |    |                             |  |        */
-	/*     |    +-----------------------------+  v        */
-	/*     |    :                             :           */
-	/*     |    <---------- width ------------>           */
-	/*     |                                              */
-	/*     v y                                            */
+			/*     |   left                                   x   */
+			/* ----+----+-------------------------------------->  */
+			/*     |    :                                         */
+			/* top +    +------ cropcap.defrect ------+  ^        */
+			/*     |    |                             |  |        */
+			/*     |    | +------- crop_new --------+ |  |        */
+			/*     |    | |                         | |  |        */
+			/*     |    | |                         | |  |        */
+			/*     |    | |                         | |  | height */
+			/*     |    | +-------------------------+ |  |        */
+			/*     |    |                             |  |        */
+			/*     |    |                             |  |        */
+			/*     |    +-----------------------------+  v        */
+			/*     |    :                             :           */
+			/*     |    <---------- width ------------>           */
+			/*     |                                              */
+			/*     v y                                            */
 
 			CU_ASSERT(cropcap.defrect.left <= crop_new.c.left);
 			CU_ASSERT(cropcap.defrect.top <= crop_new.c.top);
 
-			CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.defrect.left+cropcap.defrect.width);
-			CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.defrect.top+cropcap.defrect.height);
+			CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+				  cropcap.defrect.left + cropcap.defrect.width);
+			CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+				  cropcap.defrect.top + cropcap.defrect.height);
 		}
 
 	} else {
@@ -357,12 +338,12 @@
 	/*     |    <---------- width ------------>           */
 	/*     |                                              */
 	/*     v y                                            */
-	for (i=0; i<cropcap.bounds.width; i++) {
+	for (i = 0; i < cropcap.bounds.width; i++) {
 		memset(&crop, 0xff, sizeof(crop));
 		crop.type = type;
 		crop.c.left = cropcap.bounds.left;
 		crop.c.top = cropcap.bounds.top;
-		crop.c.width = cropcap.bounds.width-i;
+		crop.c.width = cropcap.bounds.width - i;
 		crop.c.height = cropcap.bounds.height;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CROP, &crop);
 		errno_set = errno;
@@ -371,11 +352,7 @@
 			__FILE__, __LINE__,
 			ret_set, errno_set,
 			crop.type,
-			crop.c.left,
-			crop.c.top,
-			crop.c.width,
-			crop.c.height
-			);
+			crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 		memset(&crop_new, 0, sizeof(crop_new));
 		crop_new.type = type;
@@ -387,10 +364,7 @@
 			ret_new, errno_new,
 			crop_new.type,
 			crop_new.c.left,
-			crop_new.c.top,
-			crop_new.c.width,
-			crop_new.c.height
-			);
+			crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 		if (ret_cap == 0) {
 			CU_ASSERT_EQUAL(ret_cap, 0);
@@ -399,11 +373,17 @@
 
 			if (ret_cap == 0 && ret_new == 0) {
 
-				CU_ASSERT(cropcap.defrect.left <= crop_new.c.left);
-				CU_ASSERT(cropcap.defrect.top <= crop_new.c.top);
+				CU_ASSERT(cropcap.defrect.left <=
+					  crop_new.c.left);
+				CU_ASSERT(cropcap.defrect.top <=
+					  crop_new.c.top);
 
-				CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.defrect.left+cropcap.defrect.width);
-				CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.defrect.top+cropcap.defrect.height);
+				CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+					  cropcap.defrect.left +
+					  cropcap.defrect.width);
+				CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+					  cropcap.defrect.top +
+					  cropcap.defrect.height);
 			}
 
 		} else {
@@ -433,13 +413,13 @@
 	/*     |    <---------- width ------------>           */
 	/*     |                                              */
 	/*     v y                                            */
-	for (i=0; i<cropcap.bounds.height; i++) {
+	for (i = 0; i < cropcap.bounds.height; i++) {
 		memset(&crop, 0xff, sizeof(crop));
 		crop.type = type;
 		crop.c.left = cropcap.bounds.left;
 		crop.c.top = cropcap.bounds.top;
 		crop.c.width = cropcap.bounds.width;
-		crop.c.height = cropcap.bounds.height-i;
+		crop.c.height = cropcap.bounds.height - i;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CROP, &crop);
 		errno_set = errno;
 		dprintf("\t%s:%u: VIDIOC_S_CROP, ret_set=%i, errno_set=%i, "
@@ -447,11 +427,7 @@
 			__FILE__, __LINE__,
 			ret_set, errno_set,
 			crop.type,
-			crop.c.left,
-			crop.c.top,
-			crop.c.width,
-			crop.c.height
-			);
+			crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 		memset(&crop_new, 0, sizeof(crop_new));
 		crop_new.type = type;
@@ -463,10 +439,7 @@
 			ret_new, errno_new,
 			crop_new.type,
 			crop_new.c.left,
-			crop_new.c.top,
-			crop_new.c.width,
-			crop_new.c.height
-			);
+			crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 		if (ret_cap == 0) {
 			CU_ASSERT_EQUAL(ret_cap, 0);
@@ -475,11 +448,17 @@
 
 			if (ret_cap == 0 && ret_new == 0) {
 
-				CU_ASSERT(cropcap.defrect.left <= crop_new.c.left);
-				CU_ASSERT(cropcap.defrect.top <= crop_new.c.top);
+				CU_ASSERT(cropcap.defrect.left <=
+					  crop_new.c.left);
+				CU_ASSERT(cropcap.defrect.top <=
+					  crop_new.c.top);
 
-				CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.defrect.left+cropcap.defrect.width);
-				CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.defrect.top+cropcap.defrect.height);
+				CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+					  cropcap.defrect.left +
+					  cropcap.defrect.width);
+				CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+					  cropcap.defrect.top +
+					  cropcap.defrect.height);
 			}
 
 		} else {
@@ -509,12 +488,12 @@
 	/*     |    <---------- width ------------>           */
 	/*     |                                              */
 	/*     v y                                            */
-	for (i=0; i<cropcap.bounds.width; i++) {
+	for (i = 0; i < cropcap.bounds.width; i++) {
 		memset(&crop, 0xff, sizeof(crop));
 		crop.type = type;
-		crop.c.left = cropcap.bounds.left+i;
+		crop.c.left = cropcap.bounds.left + i;
 		crop.c.top = cropcap.bounds.top;
-		crop.c.width = cropcap.bounds.width-i;
+		crop.c.width = cropcap.bounds.width - i;
 		crop.c.height = cropcap.bounds.height;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CROP, &crop);
 		errno_set = errno;
@@ -523,11 +502,7 @@
 			__FILE__, __LINE__,
 			ret_set, errno_set,
 			crop.type,
-			crop.c.left,
-			crop.c.top,
-			crop.c.width,
-			crop.c.height
-			);
+			crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 		memset(&crop_new, 0, sizeof(crop_new));
 		crop_new.type = type;
@@ -539,10 +514,7 @@
 			ret_new, errno_new,
 			crop_new.type,
 			crop_new.c.left,
-			crop_new.c.top,
-			crop_new.c.width,
-			crop_new.c.height
-			);
+			crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 		if (ret_cap == 0) {
 			CU_ASSERT_EQUAL(ret_cap, 0);
@@ -551,11 +523,17 @@
 
 			if (ret_cap == 0 && ret_new == 0) {
 
-				CU_ASSERT(cropcap.defrect.left <= crop_new.c.left);
-				CU_ASSERT(cropcap.defrect.top <= crop_new.c.top);
+				CU_ASSERT(cropcap.defrect.left <=
+					  crop_new.c.left);
+				CU_ASSERT(cropcap.defrect.top <=
+					  crop_new.c.top);
 
-				CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.defrect.left+cropcap.defrect.width);
-				CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.defrect.top+cropcap.defrect.height);
+				CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+					  cropcap.defrect.left +
+					  cropcap.defrect.width);
+				CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+					  cropcap.defrect.top +
+					  cropcap.defrect.height);
 			}
 
 		} else {
@@ -585,13 +563,13 @@
 	/*     |    <---------- width ------------>           */
 	/*     |                                              */
 	/*     v y                                            */
-	for (i=0; i<cropcap.bounds.height; i++) {
+	for (i = 0; i < cropcap.bounds.height; i++) {
 		memset(&crop, 0xff, sizeof(crop));
 		crop.type = type;
 		crop.c.left = cropcap.bounds.left;
-		crop.c.top = cropcap.bounds.top+i;
+		crop.c.top = cropcap.bounds.top + i;
 		crop.c.width = cropcap.bounds.width;
-		crop.c.height = cropcap.bounds.height-i;
+		crop.c.height = cropcap.bounds.height - i;
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CROP, &crop);
 		errno_set = errno;
 		dprintf("\t%s:%u: VIDIOC_S_CROP, ret_set=%i, errno_set=%i, "
@@ -599,11 +577,7 @@
 			__FILE__, __LINE__,
 			ret_set, errno_set,
 			crop.type,
-			crop.c.left,
-			crop.c.top,
-			crop.c.width,
-			crop.c.height
-			);
+			crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 		memset(&crop_new, 0, sizeof(crop_new));
 		crop_new.type = type;
@@ -615,10 +589,7 @@
 			ret_new, errno_new,
 			crop_new.type,
 			crop_new.c.left,
-			crop_new.c.top,
-			crop_new.c.width,
-			crop_new.c.height
-			);
+			crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 		if (ret_cap == 0) {
 			CU_ASSERT_EQUAL(ret_cap, 0);
@@ -627,11 +598,17 @@
 
 			if (ret_cap == 0 && ret_new == 0) {
 
-				CU_ASSERT(cropcap.defrect.left <= crop_new.c.left);
-				CU_ASSERT(cropcap.defrect.top <= crop_new.c.top);
+				CU_ASSERT(cropcap.defrect.left <=
+					  crop_new.c.left);
+				CU_ASSERT(cropcap.defrect.top <=
+					  crop_new.c.top);
 
-				CU_ASSERT(crop_new.c.left+crop_new.c.width <= cropcap.defrect.left+cropcap.defrect.width);
-				CU_ASSERT(crop_new.c.top+crop_new.c.height <= cropcap.defrect.top+cropcap.defrect.height);
+				CU_ASSERT(crop_new.c.left + crop_new.c.width <=
+					  cropcap.defrect.left +
+					  cropcap.defrect.width);
+				CU_ASSERT(crop_new.c.top + crop_new.c.height <=
+					  cropcap.defrect.top +
+					  cropcap.defrect.height);
 			}
 
 		} else {
@@ -654,7 +631,8 @@
 	}
 }
 
-void test_VIDIOC_S_CROP() {
+void test_VIDIOC_S_CROP()
+{
 
 	do_set_crop(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_set_crop(V4L2_BUF_TYPE_VIDEO_OUTPUT);
@@ -663,7 +641,8 @@
 
 }
 
-void do_set_crop_invalid(enum v4l2_buf_type type) {
+void do_set_crop_invalid(enum v4l2_buf_type type)
+{
 	int ret_set, errno_set;
 	int ret_new, errno_new;
 	int ret_cap, errno_cap;
@@ -676,28 +655,16 @@
 	ret_cap = ioctl(get_video_fd(), VIDIOC_CROPCAP, &cropcap);
 	errno_cap = errno;
 
-	dprintf("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
-		".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".pixelaspect = { .numerator = %u, .denominator = %u } "
-		"}\n",
-		__FILE__, __LINE__,
-		ret_cap, errno_cap,
-		cropcap.type,
-
-		cropcap.bounds.left,
-		cropcap.bounds.top,
-		cropcap.bounds.width,
-		cropcap.bounds.height,
-
-		cropcap.defrect.left,
-		cropcap.defrect.top,
-		cropcap.defrect.width,
-		cropcap.defrect.height,
-
-		cropcap.pixelaspect.numerator,
-		cropcap.pixelaspect.denominator
-		);
+	dprintf
+	    ("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
+	     ".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".pixelaspect = { .numerator = %u, .denominator = %u } " "}\n",
+	     __FILE__, __LINE__, ret_cap, errno_cap, cropcap.type,
+	     cropcap.bounds.left, cropcap.bounds.top, cropcap.bounds.width,
+	     cropcap.bounds.height, cropcap.defrect.left, cropcap.defrect.top,
+	     cropcap.defrect.width, cropcap.defrect.height,
+	     cropcap.pixelaspect.numerator, cropcap.pixelaspect.denominator);
 
 	memset(&crop, 0xff, sizeof(crop));
 	crop.type = type;
@@ -709,11 +676,7 @@
 		__FILE__, __LINE__,
 		ret_set, errno_set,
 		crop.type,
-		crop.c.left,
-		crop.c.top,
-		crop.c.width,
-		crop.c.height
-		);
+		crop.c.left, crop.c.top, crop.c.width, crop.c.height);
 
 	memset(&crop_new, 0, sizeof(crop_new));
 	crop_new.type = type;
@@ -725,10 +688,7 @@
 		ret_new, errno_new,
 		crop_new.type,
 		crop_new.c.left,
-		crop_new.c.top,
-		crop_new.c.width,
-		crop_new.c.height
-		);
+		crop_new.c.top, crop_new.c.width, crop_new.c.height);
 
 	CU_ASSERT_EQUAL(ret_cap, -1);
 	CU_ASSERT_EQUAL(errno_cap, EINVAL);
@@ -739,7 +699,8 @@
 
 }
 
-void test_VIDIOC_S_CROP_invalid() {
+void test_VIDIOC_S_CROP_invalid()
+{
 	do_set_crop_invalid(0);
 	do_set_crop_invalid(V4L2_BUF_TYPE_VBI_CAPTURE);
 	do_set_crop_invalid(V4L2_BUF_TYPE_VBI_OUTPUT);
@@ -748,11 +709,12 @@
 	do_set_crop_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
 	do_set_crop_invalid(V4L2_BUF_TYPE_PRIVATE);
 	do_set_crop_invalid(S32_MAX);
-	do_set_crop_invalid( ((__u32)S32_MAX)+1 );
+	do_set_crop_invalid(((__u32) S32_MAX) + 1);
 	do_set_crop_invalid(U32_MAX);
 }
 
-void do_set_crop_null(enum v4l2_buf_type type) {
+void do_set_crop_null(enum v4l2_buf_type type)
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_cap, errno_cap;
@@ -771,38 +733,23 @@
 		ret_orig, errno_orig,
 		crop_orig.type,
 		crop_orig.c.left,
-		crop_orig.c.top,
-		crop_orig.c.width,
-		crop_orig.c.height
-		);
+		crop_orig.c.top, crop_orig.c.width, crop_orig.c.height);
 
 	memset(&cropcap, 0, sizeof(cropcap));
 	cropcap.type = type;
 	ret_cap = ioctl(get_video_fd(), VIDIOC_CROPCAP, &cropcap);
 	errno_cap = errno;
 
-	dprintf("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
-		".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
-		".pixelaspect = { .numerator = %u, .denominator = %u } "
-		"}\n",
-		__FILE__, __LINE__,
-		ret_cap, errno_cap,
-		cropcap.type,
-
-		cropcap.bounds.left,
-		cropcap.bounds.top,
-		cropcap.bounds.width,
-		cropcap.bounds.height,
-
-		cropcap.defrect.left,
-		cropcap.defrect.top,
-		cropcap.defrect.width,
-		cropcap.defrect.height,
-
-		cropcap.pixelaspect.numerator,
-		cropcap.pixelaspect.denominator
-		);
+	dprintf
+	    ("\t%s:%u: VIDIOC_CROPCAP, ret_cap=%i, errno_cap=%i, cropcap = { .type = %i, "
+	     ".bounds = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".defrect = { .left = %i, .top = %i, .width = %i, .height = %i }, "
+	     ".pixelaspect = { .numerator = %u, .denominator = %u } " "}\n",
+	     __FILE__, __LINE__, ret_cap, errno_cap, cropcap.type,
+	     cropcap.bounds.left, cropcap.bounds.top, cropcap.bounds.width,
+	     cropcap.bounds.height, cropcap.defrect.left, cropcap.defrect.top,
+	     cropcap.defrect.width, cropcap.defrect.height,
+	     cropcap.pixelaspect.numerator, cropcap.pixelaspect.denominator);
 
 	memset(&crop, 0, sizeof(crop));
 	crop.type = type;
@@ -841,7 +788,8 @@
 
 }
 
-void test_VIDIOC_S_CROP_NULL() {
+void test_VIDIOC_S_CROP_NULL()
+{
 
 	do_set_crop_null(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_set_crop_null(V4L2_BUF_TYPE_VIDEO_OUTPUT);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROPCAP.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROPCAP.c
index 30c9a72..a793c6b 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROPCAP.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CROPCAP.c
@@ -33,7 +33,9 @@
 
 #include "test_VIDIOC_CROPCAP.h"
 
-static void do_ioctl_VIDIOC_CROPCAP(enum v4l2_buf_type buf_type, int expected_ret) {
+static void do_ioctl_VIDIOC_CROPCAP(enum v4l2_buf_type buf_type,
+				    int expected_ret)
+{
 	int ret_cap, errno_cap;
 	struct v4l2_cropcap cropcap;
 	struct v4l2_cropcap cropcap2;
@@ -53,23 +55,23 @@
 		CU_ASSERT_EQUAL(ret_cap, 0);
 		CU_ASSERT_EQUAL(cropcap.type, buf_type);
 
-	/*     |   left                                   x   */
-	/* ----+----+-------------------------------------->  */
-	/*     |    :                                         */
-	/* top +    +-------- cropcap ------------+  ^        */
-	/*     |    |                             |  |        */
-	/*     |    | +------- defrect ---------+ |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  |        */
-	/*     |    | |                         | |  | height */
-	/*     |    | +-------------------------+ |  |        */
-	/*     |    |                             |  |        */
-	/*     |    |                             |  |        */
-	/*     |    +-----------------------------+  v        */
-	/*     |    :                             :           */
-	/*     |    <---------- width ------------>           */
-	/*     |                                              */
-	/*     v y                                            */
+		/*     |   left                                   x   */
+		/* ----+----+-------------------------------------->  */
+		/*     |    :                                         */
+		/* top +    +-------- cropcap ------------+  ^        */
+		/*     |    |                             |  |        */
+		/*     |    | +------- defrect ---------+ |  |        */
+		/*     |    | |                         | |  |        */
+		/*     |    | |                         | |  |        */
+		/*     |    | |                         | |  | height */
+		/*     |    | +-------------------------+ |  |        */
+		/*     |    |                             |  |        */
+		/*     |    |                             |  |        */
+		/*     |    +-----------------------------+  v        */
+		/*     |    :                             :           */
+		/*     |    <---------- width ------------>           */
+		/*     |                                              */
+		/*     v y                                            */
 
 		/* top left corner */
 		CU_ASSERT(cropcap.bounds.left <= cropcap.defrect.left);
@@ -97,20 +99,16 @@
 			".pixelaspect = { .numerator = %u, .denominator = %u } "
 			"}\n",
 			cropcap.type,
-
 			cropcap.bounds.left,
 			cropcap.bounds.top,
 			cropcap.bounds.width,
 			cropcap.bounds.height,
-
 			cropcap.defrect.left,
 			cropcap.defrect.top,
 			cropcap.defrect.width,
 			cropcap.defrect.height,
-
 			cropcap.pixelaspect.numerator,
-			cropcap.pixelaspect.denominator
-			);
+			cropcap.pixelaspect.denominator);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_cap, -1);
@@ -118,13 +116,15 @@
 
 		memset(&cropcap2, 0xff, sizeof(cropcap2));
 		cropcap2.type = buf_type;
-		CU_ASSERT_EQUAL(memcmp(&cropcap, &cropcap2, sizeof(cropcap)), 0);
+		CU_ASSERT_EQUAL(memcmp(&cropcap, &cropcap2, sizeof(cropcap)),
+				0);
 
 	}
 
 }
 
-void test_VIDIOC_CROPCAP() {
+void test_VIDIOC_CROPCAP()
+{
 
 	do_ioctl_VIDIOC_CROPCAP(0, -1);
 	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_VIDEO_CAPTURE, 0);
@@ -135,17 +135,18 @@
 	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, -1);
 	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, -1);
 	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, -1);
-	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_PRIVATE-1, -1);
+	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_PRIVATE - 1, -1);
 	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_PRIVATE, 0);
-	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_PRIVATE+1, 0);
+	do_ioctl_VIDIOC_CROPCAP(V4L2_BUF_TYPE_PRIVATE + 1, 0);
 	do_ioctl_VIDIOC_CROPCAP(S32_MAX, -1);
-	do_ioctl_VIDIOC_CROPCAP(((__u32)S32_MAX)+1, -1);
-	do_ioctl_VIDIOC_CROPCAP(U32_MAX-1, -1);
+	do_ioctl_VIDIOC_CROPCAP(((__u32) S32_MAX) + 1, -1);
+	do_ioctl_VIDIOC_CROPCAP(U32_MAX - 1, -1);
 	do_ioctl_VIDIOC_CROPCAP(U32_MAX, -1);
 
 }
 
-void test_VIDIOC_CROPCAP_enum_INPUT() {
+void test_VIDIOC_CROPCAP_enum_INPUT()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	int enum_ret;
@@ -168,19 +169,23 @@
 			input.index = i;
 			enum_ret = ioctl(f, VIDIOC_ENUMINPUT, &input);
 
-			dprintf("\t%s:%u: ENUMINPUT: i=%u, enum_ret=%i, errno=%i\n",
-				__FILE__, __LINE__, i, enum_ret, errno);
+			dprintf
+			    ("\t%s:%u: ENUMINPUT: i=%u, enum_ret=%i, errno=%i\n",
+			     __FILE__, __LINE__, i, enum_ret, errno);
 
 			if (enum_ret == 0) {
-				ret_set = ioctl(f, VIDIOC_S_INPUT, &input.index);
+				ret_set =
+				    ioctl(f, VIDIOC_S_INPUT, &input.index);
 				errno_set = errno;
 
-				dprintf("\t%s:%u: input.index=0x%X, ret_set=%i, errno_set=%i\n",
-					__FILE__, __LINE__, input.index, ret_set, errno_set);
+				dprintf
+				    ("\t%s:%u: input.index=0x%X, ret_set=%i, errno_set=%i\n",
+				     __FILE__, __LINE__, input.index, ret_set,
+				     errno_set);
 
 				CU_ASSERT_EQUAL(ret_set, 0);
 				if (ret_set == 0) {
-				    test_VIDIOC_CROPCAP();
+					test_VIDIOC_CROPCAP();
 				}
 
 			}
@@ -198,7 +203,8 @@
 	}
 }
 
-void test_VIDIOC_CROPCAP_NULL() {
+void test_VIDIOC_CROPCAP_NULL()
+{
 	int ret_capture, errno_capture;
 	int ret_output, errno_output;
 	int ret_overlay, errno_overlay;
@@ -240,12 +246,13 @@
 		__FILE__, __LINE__, ret_private, errno_private);
 
 	memset(&cropcap, 0xff, sizeof(cropcap));
-	cropcap.type = V4L2_BUF_TYPE_PRIVATE+1;
+	cropcap.type = V4L2_BUF_TYPE_PRIVATE + 1;
 	ret_private_1 = ioctl(get_video_fd(), VIDIOC_CROPCAP, &cropcap);
 	errno_private_1 = errno;
 
-	dprintf("\t%s:%u: VIDIOC_CROPCAP, ret_private_1=%i, errno_private_1=%i\n",
-		__FILE__, __LINE__, ret_private_1, errno_private_1);
+	dprintf
+	    ("\t%s:%u: VIDIOC_CROPCAP, ret_private_1=%i, errno_private_1=%i\n",
+	     __FILE__, __LINE__, ret_private_1, errno_private_1);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_CROPCAP, NULL);
 	errno_null = errno;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CTRL.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CTRL.c
index 0d6414d..3ade93d 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CTRL.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_CTRL.c
@@ -31,7 +31,8 @@
 
 #include "test_VIDIOC_CTRL.h"
 
-static int do_get_control(__u32 id) {
+static int do_get_control(__u32 id)
+{
 	int ret_query, errno_query;
 	int ret_get, errno_get;
 	struct v4l2_queryctrl queryctrl;
@@ -46,26 +47,27 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_query,
+	     errno_query);
 	if (ret_query == 0) {
 		dprintf("\t%s:%u: queryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-		".minimum=%i, .maximum=%i, .step=%i, "
-		".default_value=%i, "
-		".flags=0x%X, "
-		".reserved[]={ 0x%X, 0x%X } }\n",
-		__FILE__, __LINE__,
-		queryctrl.id,
-		queryctrl.type,
-		queryctrl.name,
-		queryctrl.minimum,
-		queryctrl.maximum,
-		queryctrl.step,
-		queryctrl.default_value,
-		queryctrl.flags,
-		queryctrl.reserved[0],
-		queryctrl.reserved[1]
-		);
+			".minimum=%i, .maximum=%i, .step=%i, "
+			".default_value=%i, "
+			".flags=0x%X, "
+			".reserved[]={ 0x%X, 0x%X } }\n",
+			__FILE__, __LINE__,
+			queryctrl.id,
+			queryctrl.type,
+			queryctrl.name,
+			queryctrl.minimum,
+			queryctrl.maximum,
+			queryctrl.step,
+			queryctrl.default_value,
+			queryctrl.flags,
+			queryctrl.reserved[0], queryctrl.reserved[1]
+		    );
 	}
 
 	memset(&control, 0xff, sizeof(control));
@@ -73,9 +75,9 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
-		__FILE__, __LINE__,
-		id, id-V4L2_CID_BASE, ret_get, errno_get);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get, errno_get);
 
 	if (ret_query == 0) {
 		CU_ASSERT_EQUAL(ret_query, 0);
@@ -99,7 +101,7 @@
 			CU_ASSERT_EQUAL(errno_get, EINVAL);
 			break;
 
-		case V4L2_CTRL_TYPE_INTEGER64: /* TODO: what about this case? */
+		case V4L2_CTRL_TYPE_INTEGER64:	/* TODO: what about this case? */
 		case V4L2_CTRL_TYPE_CTRL_CLASS:
 		default:
 			CU_ASSERT_EQUAL(ret_get, -1);
@@ -117,7 +119,8 @@
 	return ret_query;
 }
 
-void test_VIDIOC_G_CTRL() {
+void test_VIDIOC_G_CTRL()
+{
 	int ret1;
 	__u32 i;
 
@@ -125,9 +128,9 @@
 		ret1 = do_get_control(i);
 	}
 
-	ret1 = do_get_control(V4L2_CID_BASE-1);
+	ret1 = do_get_control(V4L2_CID_BASE - 1);
 	ret1 = do_get_control(V4L2_CID_LASTP1);
-	ret1 = do_get_control(V4L2_CID_PRIVATE_BASE-1);
+	ret1 = do_get_control(V4L2_CID_PRIVATE_BASE - 1);
 
 	i = V4L2_CID_PRIVATE_BASE;
 	do {
@@ -138,7 +141,8 @@
 	ret1 = do_get_control(i);
 }
 
-void test_VIDIOC_G_CTRL_NULL() {
+void test_VIDIOC_G_CTRL_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_control control;
@@ -151,9 +155,10 @@
 		control.id = id;
 		ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control);
 		errno_get = errno;
-		dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
-			__FILE__, __LINE__,
-			id, id-V4L2_CID_BASE, ret_get, errno_get);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get,
+		     errno_get);
 	}
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_G_CTRL, NULL);
@@ -175,7 +180,8 @@
 
 }
 
-int do_set_control(__u32 id) {
+int do_set_control(__u32 id)
+{
 	int ret_query, errno_query;
 	int ret_set, errno_set;
 	int ret_get, errno_get;
@@ -196,26 +202,27 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_query,
+	     errno_query);
 	if (ret_query == 0) {
 		dprintf("\t%s:%u: queryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-		".minimum=%i, .maximum=%i, .step=%i, "
-		".default_value=%i, "
-		".flags=0x%X, "
-		".reserved[]={ 0x%X, 0x%X } }\n",
-		__FILE__, __LINE__,
-		queryctrl.id,
-		queryctrl.type,
-		queryctrl.name,
-		queryctrl.minimum,
-		queryctrl.maximum,
-		queryctrl.step,
-		queryctrl.default_value,
-		queryctrl.flags,
-		queryctrl.reserved[0],
-		queryctrl.reserved[1]
-		);
+			".minimum=%i, .maximum=%i, .step=%i, "
+			".default_value=%i, "
+			".flags=0x%X, "
+			".reserved[]={ 0x%X, 0x%X } }\n",
+			__FILE__, __LINE__,
+			queryctrl.id,
+			queryctrl.type,
+			queryctrl.name,
+			queryctrl.minimum,
+			queryctrl.maximum,
+			queryctrl.step,
+			queryctrl.default_value,
+			queryctrl.flags,
+			queryctrl.reserved[0], queryctrl.reserved[1]
+		    );
 	}
 
 	memset(&control_orig, 0, sizeof(control_orig));
@@ -223,8 +230,10 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_orig);
 	errno_orig = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_orig=%i, errno_orig=%i, control_orig.value=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_orig, errno_orig, control_orig.value);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_orig=%i, errno_orig=%i, control_orig.value=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_orig, errno_orig,
+	     control_orig.value);
 
 	if (ret_query == 0) {
 		CU_ASSERT_EQUAL(ret_query, 0);
@@ -235,21 +244,28 @@
 		case V4L2_CTRL_TYPE_MENU:
 
 			/* TODO: this is an infinite loop if queryctrl.maximum == S32_MAX */
-			for (value = queryctrl.minimum; value <= queryctrl.maximum; value++) {
+			for (value = queryctrl.minimum;
+			     value <= queryctrl.maximum; value++) {
 				memset(&control, 0xff, sizeof(control));
 				control.id = id;
 				control.value = value;
-				ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+				ret_set =
+				    ioctl(get_video_fd(), VIDIOC_S_CTRL,
+					  &control);
 				errno_set = errno;
 
-				dprintf("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
-					__FILE__, __LINE__, id, id-V4L2_CID_BASE, value, ret_set, errno_set);
+				dprintf
+				    ("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
+				     __FILE__, __LINE__, id, id - V4L2_CID_BASE,
+				     value, ret_set, errno_set);
 
 				if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
-				    queryctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) {
+				    queryctrl.
+				    flags & V4L2_CTRL_FLAG_READ_ONLY) {
 					CU_ASSERT_EQUAL(ret_set, -1);
 					CU_ASSERT_EQUAL(errno_set, EINVAL);
-				} else if (queryctrl.flags & V4L2_CTRL_FLAG_GRABBED) {
+				} else if (queryctrl.
+					   flags & V4L2_CTRL_FLAG_GRABBED) {
 					CU_ASSERT_EQUAL(ret_set, -1);
 					CU_ASSERT_EQUAL(errno_set, EBUSY);
 				} else {
@@ -258,16 +274,22 @@
 
 				memset(&control_new, 0, sizeof(control_new));
 				control_new.id = id;
-				ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_new);
+				ret_get =
+				    ioctl(get_video_fd(), VIDIOC_G_CTRL,
+					  &control_new);
 				errno_get = errno;
 
-				dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
-					__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_get, errno_get, control_new.value);
+				dprintf
+				    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
+				     __FILE__, __LINE__, id, id - V4L2_CID_BASE,
+				     ret_get, errno_get, control_new.value);
 
 				CU_ASSERT_EQUAL(ret_get, 0);
 				if (ret_get == 0) {
-					CU_ASSERT(queryctrl.minimum <= control_new.value);
-					CU_ASSERT(control_new.value <= queryctrl.maximum);
+					CU_ASSERT(queryctrl.minimum <=
+						  control_new.value);
+					CU_ASSERT(control_new.value <=
+						  queryctrl.maximum);
 
 					if (ret_set == 0) {
 						/* TODO: the following checks works correctly only if
@@ -313,8 +335,12 @@
  *
  *
  */
-						CU_ASSERT(value-queryctrl.step < control_new.value);
-						CU_ASSERT(control_new.value < value+queryctrl.step);
+						CU_ASSERT(value -
+							  queryctrl.step <
+							  control_new.value);
+						CU_ASSERT(control_new.value <
+							  value +
+							  queryctrl.step);
 					}
 				}
 
@@ -334,7 +360,8 @@
 			memset(&control, 0xff, sizeof(control));
 			control.id = id;
 			control.value = S32_MIN;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 			errno_set = errno;
 
 			if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
@@ -351,7 +378,8 @@
 			memset(&control, 0xff, sizeof(control));
 			control.id = id;
 			control.value = -1;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 			errno_set = errno;
 
 			if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
@@ -368,7 +396,8 @@
 			memset(&control, 0xff, sizeof(control));
 			control.id = id;
 			control.value = 0;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 			errno_set = errno;
 
 			if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
@@ -385,7 +414,8 @@
 			memset(&control, 0xff, sizeof(control));
 			control.id = id;
 			control.value = 1;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 			errno_set = errno;
 
 			if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
@@ -402,7 +432,8 @@
 			memset(&control, 0xff, sizeof(control));
 			control.id = id;
 			control.value = S32_MAX;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 			errno_set = errno;
 
 			if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED ||
@@ -418,7 +449,7 @@
 
 			break;
 
-		case V4L2_CTRL_TYPE_INTEGER64: /* TODO: what about this case? */
+		case V4L2_CTRL_TYPE_INTEGER64:	/* TODO: what about this case? */
 		case V4L2_CTRL_TYPE_CTRL_CLASS:
 		default:
 			CU_ASSERT_EQUAL(ret_orig, -1);
@@ -444,8 +475,10 @@
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, value, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, value, ret_set,
+		     errno_set);
 
 		/* it shall be possible to set to the original value if the control
 		 * is not disabled, read only or grabbed by other application
@@ -466,8 +499,10 @@
 		ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_new);
 		errno_get = errno;
 
-		dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_get, errno_get, control_new.value);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get,
+		     errno_get, control_new.value);
 
 		CU_ASSERT_EQUAL(ret_get, 0);
 		if (ret_get == 0) {
@@ -481,8 +516,11 @@
 	return ret_query;
 }
 
-static void do_set_control_value(__u32 id, __s32 value, struct v4l2_queryctrl *queryctrl);
-static void do_set_control_value(__u32 id, __s32 value, struct v4l2_queryctrl *queryctrl) {
+static void do_set_control_value(__u32 id, __s32 value,
+				 struct v4l2_queryctrl *queryctrl);
+static void do_set_control_value(__u32 id, __s32 value,
+				 struct v4l2_queryctrl *queryctrl)
+{
 	int ret_set, errno_set;
 	int ret_get, errno_get;
 	struct v4l2_control control;
@@ -494,8 +532,10 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 	errno_set = errno;
 
-	dprintf("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, value, ret_set, errno_set);
+	dprintf
+	    ("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, value, ret_set,
+	     errno_set);
 
 	/* The driver can decide if it returns ERANGE or
 	 * accepts the value and converts it to
@@ -516,8 +556,10 @@
 		ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_new);
 		errno_get = errno;
 
-		dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_get, errno_get, control_new.value);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get,
+		     errno_get, control_new.value);
 
 		CU_ASSERT_EQUAL(ret_get, 0);
 		if (ret_get == 0) {
@@ -534,8 +576,10 @@
 		ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_new);
 		errno_get = errno;
 
-		dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_get, errno_get, control_new.value);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get,
+		     errno_get, control_new.value);
 
 		CU_ASSERT_EQUAL(ret_get, 0);
 		if (ret_get == 0) {
@@ -546,7 +590,8 @@
 	}
 }
 
-int do_set_control_invalid(__u32 id) {
+int do_set_control_invalid(__u32 id)
+{
 	int ret_query, errno_query;
 	int ret_set, errno_set;
 	int ret_get, errno_get;
@@ -567,26 +612,27 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_query,
+	     errno_query);
 	if (ret_query == 0) {
 		dprintf("\t%s:%u: queryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-		".minimum=%i, .maximum=%i, .step=%i, "
-		".default_value=%i, "
-		".flags=0x%X, "
-		".reserved[]={ 0x%X, 0x%X } }\n",
-		__FILE__, __LINE__,
-		queryctrl.id,
-		queryctrl.type,
-		queryctrl.name,
-		queryctrl.minimum,
-		queryctrl.maximum,
-		queryctrl.step,
-		queryctrl.default_value,
-		queryctrl.flags,
-		queryctrl.reserved[0],
-		queryctrl.reserved[1]
-		);
+			".minimum=%i, .maximum=%i, .step=%i, "
+			".default_value=%i, "
+			".flags=0x%X, "
+			".reserved[]={ 0x%X, 0x%X } }\n",
+			__FILE__, __LINE__,
+			queryctrl.id,
+			queryctrl.type,
+			queryctrl.name,
+			queryctrl.minimum,
+			queryctrl.maximum,
+			queryctrl.step,
+			queryctrl.default_value,
+			queryctrl.flags,
+			queryctrl.reserved[0], queryctrl.reserved[1]
+		    );
 	}
 
 	memset(&control_orig, 0, sizeof(control_orig));
@@ -594,8 +640,10 @@
 	ret_orig = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_orig);
 	errno_orig = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_orig=%i, errno_orig=%i, control_orig.value=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_orig, errno_orig, control_orig.value);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_orig=%i, errno_orig=%i, control_orig.value=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_orig, errno_orig,
+	     control_orig.value);
 
 	if (ret_query == 0) {
 		CU_ASSERT_EQUAL(ret_query, 0);
@@ -609,7 +657,8 @@
 			}
 
 			if (S32_MIN < queryctrl.minimum) {
-				do_set_control_value(id, queryctrl.minimum-1, &queryctrl);
+				do_set_control_value(id, queryctrl.minimum - 1,
+						     &queryctrl);
 			}
 
 			if (S16_MIN < queryctrl.minimum) {
@@ -624,12 +673,14 @@
 				do_set_control_value(id, S16_MAX, &queryctrl);
 			}
 
-			if (queryctrl.maximum < (__s32)U16_MAX) {
-				do_set_control_value(id, (__s32)U16_MAX, &queryctrl);
+			if (queryctrl.maximum < (__s32) U16_MAX) {
+				do_set_control_value(id, (__s32) U16_MAX,
+						     &queryctrl);
 			}
 
 			if (queryctrl.maximum < S32_MAX) {
-				do_set_control_value(id, queryctrl.maximum+1, &queryctrl);
+				do_set_control_value(id, queryctrl.maximum + 1,
+						     &queryctrl);
 			}
 
 			if (queryctrl.maximum < S32_MAX) {
@@ -649,7 +700,7 @@
 
 			break;
 
-		case V4L2_CTRL_TYPE_INTEGER64: /* TODO: what about this case? */
+		case V4L2_CTRL_TYPE_INTEGER64:	/* TODO: what about this case? */
 		case V4L2_CTRL_TYPE_CTRL_CLASS:
 		default:
 			CU_ASSERT_EQUAL(ret_orig, -1);
@@ -720,8 +771,10 @@
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_CTRL, &control);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, value, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_CTRL, id=%u (V4L2_CID_BASE+%i), value=%i, ret_set=%i, errno_set=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, value, ret_set,
+		     errno_set);
 
 		/* it shall be possible to set to the original value if the control
 		 * is not disabled, read only or grabbed by other application
@@ -742,8 +795,10 @@
 		ret_get = ioctl(get_video_fd(), VIDIOC_G_CTRL, &control_new);
 		errno_get = errno;
 
-		dprintf("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_get, errno_get, control_new.value);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_CTRL, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i, control_new.value=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get,
+		     errno_get, control_new.value);
 
 		CU_ASSERT_EQUAL(ret_get, 0);
 		if (ret_get == 0) {
@@ -757,7 +812,8 @@
 	return ret_query;
 }
 
-void test_VIDIOC_S_CTRL() {
+void test_VIDIOC_S_CTRL()
+{
 	int ret1;
 	__u32 i;
 
@@ -766,14 +822,13 @@
 		    i != V4L2_CID_DO_WHITE_BALANCE &&
 		    i != V4L2_CID_RED_BALANCE &&
 		    i != V4L2_CID_BLUE_BALANCE &&
-		    i != V4L2_CID_AUTOGAIN &&
-		    i != V4L2_CID_GAIN)
+		    i != V4L2_CID_AUTOGAIN && i != V4L2_CID_GAIN)
 			ret1 = do_set_control(i);
 	}
 
-	ret1 = do_set_control(V4L2_CID_BASE-1);
+	ret1 = do_set_control(V4L2_CID_BASE - 1);
 	ret1 = do_set_control(V4L2_CID_LASTP1);
-	ret1 = do_set_control(V4L2_CID_PRIVATE_BASE-1);
+	ret1 = do_set_control(V4L2_CID_PRIVATE_BASE - 1);
 
 	i = V4L2_CID_PRIVATE_BASE;
 	do {
@@ -784,7 +839,8 @@
 	ret1 = do_set_control(i);
 }
 
-void test_VIDIOC_S_CTRL_invalid() {
+void test_VIDIOC_S_CTRL_invalid()
+{
 	int ret1;
 	__u32 i;
 
@@ -793,14 +849,13 @@
 		    i != V4L2_CID_DO_WHITE_BALANCE &&
 		    i != V4L2_CID_RED_BALANCE &&
 		    i != V4L2_CID_BLUE_BALANCE &&
-		    i != V4L2_CID_AUTOGAIN &&
-		    i != V4L2_CID_GAIN)
+		    i != V4L2_CID_AUTOGAIN && i != V4L2_CID_GAIN)
 			ret1 = do_set_control_invalid(i);
 	}
 
-	ret1 = do_set_control_invalid(V4L2_CID_BASE-1);
+	ret1 = do_set_control_invalid(V4L2_CID_BASE - 1);
 	ret1 = do_set_control_invalid(V4L2_CID_LASTP1);
-	ret1 = do_set_control_invalid(V4L2_CID_PRIVATE_BASE-1);
+	ret1 = do_set_control_invalid(V4L2_CID_PRIVATE_BASE - 1);
 
 	i = V4L2_CID_PRIVATE_BASE;
 	do {
@@ -811,7 +866,8 @@
 	ret1 = do_set_control_invalid(i);
 }
 
-void test_VIDIOC_S_CTRL_white_balance() {
+void test_VIDIOC_S_CTRL_white_balance()
+{
 	int ret1;
 
 	/* TODO: handle V4L2_CID_AUTO_WHITE_BALANCE activated and deactivated separately */
@@ -821,7 +877,8 @@
 	ret1 = do_set_control(V4L2_CID_BLUE_BALANCE);
 }
 
-void test_VIDIOC_S_CTRL_white_balance_invalid() {
+void test_VIDIOC_S_CTRL_white_balance_invalid()
+{
 	int ret1;
 
 	/* TODO: handle V4L2_CID_AUTO_WHITE_BALANCE activated and deactivated separately */
@@ -831,7 +888,8 @@
 	ret1 = do_set_control_invalid(V4L2_CID_BLUE_BALANCE);
 }
 
-void test_VIDIOC_S_CTRL_gain() {
+void test_VIDIOC_S_CTRL_gain()
+{
 	int ret1;
 
 	/* TODO: handle V4L2_CID_AUTOGAIN activated and deactivated separately */
@@ -839,7 +897,8 @@
 	ret1 = do_set_control(V4L2_CID_GAIN);
 }
 
-void test_VIDIOC_S_CTRL_gain_invalid() {
+void test_VIDIOC_S_CTRL_gain_invalid()
+{
 	int ret1;
 
 	/* TODO: handle V4L2_CID_AUTOGAIN activated and deactivated separately */
@@ -847,7 +906,8 @@
 	ret1 = do_set_control_invalid(V4L2_CID_GAIN);
 }
 
-void test_VIDIOC_S_CTRL_NULL() {
+void test_VIDIOC_S_CTRL_NULL()
+{
 	int ret_null, errno_null;
 
 	/* TODO: check whether VIDIOC_S_CTRL is supported or not */
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDIO.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDIO.c
index 7d3b105..9a08548 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDIO.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDIO.c
@@ -35,7 +35,8 @@
 
 #include "test_VIDIOC_ENUMAUDIO.h"
 
-void test_VIDIOC_ENUMAUDIO() {
+void test_VIDIOC_ENUMAUDIO()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audio audio;
 	struct v4l2_audio audio2;
@@ -48,15 +49,17 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDIO, &audio);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUMAUDIO, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUMAUDIO, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, ret_enum, errno_enum);
 
 		if (ret_enum == 0) {
 			CU_ASSERT_EQUAL(ret_enum, 0);
 			CU_ASSERT_EQUAL(audio.index, i);
 
-			CU_ASSERT(0 < strlen( (char*)audio.name ));
-			CU_ASSERT(valid_string((char*)audio.name, sizeof(audio.name)));
+			CU_ASSERT(0 < strlen((char *)audio.name));
+			CU_ASSERT(valid_string
+				  ((char *)audio.name, sizeof(audio.name)));
 
 			//CU_ASSERT_EQUAL(audio.capability, ?);
 			//CU_ASSERT_EQUAL(audio.mode, ?);
@@ -70,10 +73,12 @@
 			 */
 			memset(&audio2, 0, sizeof(audio2));
 			audio2.index = audio.index;
-			strncpy((char*)audio2.name, (char*)audio.name, sizeof(audio2.name));
+			strncpy((char *)audio2.name, (char *)audio.name,
+				sizeof(audio2.name));
 			audio2.capability = audio.capability;
 			audio2.mode = audio.mode;
-			CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
+			CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)),
+					0);
 
 			dprintf("\taudio = {.index=%u, .name=\"%s\", "
 				".capability=0x%X, .mode=0x%X, "
@@ -81,10 +86,8 @@
 				audio.index,
 				audio.name,
 				audio.capability,
-				audio.mode,
-				audio.reserved[0],
-				audio.reserved[1]
-				);
+				audio.mode, audio.reserved[0], audio.reserved[1]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_enum, -1);
@@ -92,7 +95,8 @@
 
 			memset(&audio2, 0xff, sizeof(audio2));
 			audio2.index = i;
-			CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
+			CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)),
+					0);
 
 		}
 		i++;
@@ -100,13 +104,14 @@
 
 }
 
-void test_VIDIOC_ENUMAUDIO_S32_MAX() {
+void test_VIDIOC_ENUMAUDIO_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audio audio;
 	struct v4l2_audio audio2;
 
 	memset(&audio, 0xff, sizeof(audio));
-	audio.index = (__u32)S32_MAX;
+	audio.index = (__u32) S32_MAX;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDIO, &audio);
 	errno_enum = errno;
 
@@ -115,17 +120,18 @@
 
 	/* Check whether the original audio struct is untouched */
 	memset(&audio2, 0xff, sizeof(audio2));
-	audio2.index = (__u32)S32_MAX;
+	audio2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
 }
 
-void test_VIDIOC_ENUMAUDIO_S32_MAX_1() {
+void test_VIDIOC_ENUMAUDIO_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audio audio;
 	struct v4l2_audio audio2;
 
 	memset(&audio, 0xff, sizeof(audio));
-	audio.index = ((__u32)S32_MAX)+1;
+	audio.index = ((__u32) S32_MAX) + 1;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDIO, &audio);
 	errno_enum = errno;
 
@@ -134,11 +140,12 @@
 
 	/* Check whether the original audio struct is untouched */
 	memset(&audio2, 0xff, sizeof(audio2));
-	audio2.index = ((__u32)S32_MAX)+1;
+	audio2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
 }
 
-void test_VIDIOC_ENUMAUDIO_U32_MAX() {
+void test_VIDIOC_ENUMAUDIO_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audio audio;
 	struct v4l2_audio audio2;
@@ -157,7 +164,8 @@
 	CU_ASSERT_EQUAL(memcmp(&audio, &audio2, sizeof(audio)), 0);
 }
 
-void test_VIDIOC_ENUMAUDIO_NULL() {
+void test_VIDIOC_ENUMAUDIO_NULL()
+{
 	int ret_enum, errno_enum;
 	int ret_null, errno_null;
 	struct v4l2_audio audio;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDOUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDOUT.c
index 08c6f7b..e959d3e 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDOUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMAUDOUT.c
@@ -40,7 +40,8 @@
 
 #include "test_VIDIOC_ENUMAUDOUT.h"
 
-void test_VIDIOC_ENUMAUDOUT() {
+void test_VIDIOC_ENUMAUDOUT()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audioout audioout;
 	struct v4l2_audioout audioout2;
@@ -53,14 +54,17 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDOUT, &audioout);
 		errno_enum = errno;
 
-		dprintf("\tVIDIOC_ENUMAUDOUT, ret_enum=%i, errno_enum=%i\n", ret_enum, errno_enum);
+		dprintf("\tVIDIOC_ENUMAUDOUT, ret_enum=%i, errno_enum=%i\n",
+			ret_enum, errno_enum);
 
 		if (ret_enum == 0) {
 			CU_ASSERT_EQUAL(ret_enum, 0);
 			CU_ASSERT_EQUAL(audioout.index, i);
 
-			CU_ASSERT(0 < strlen( (char*)audioout.name ));
-			CU_ASSERT(valid_string((char*)audioout.name, sizeof(audioout.name)));
+			CU_ASSERT(0 < strlen((char *)audioout.name));
+			CU_ASSERT(valid_string
+				  ((char *)audioout.name,
+				   sizeof(audioout.name)));
 
 			//CU_ASSERT_EQUAL(audioout.capability, ?);
 			//CU_ASSERT_EQUAL(audioout.mode, ?);
@@ -74,10 +78,13 @@
 			 */
 			memset(&audioout2, 0, sizeof(audioout2));
 			audioout2.index = audioout.index;
-			strncpy((char*)audioout2.name, (char*)audioout.name, sizeof(audioout2.name));
+			strncpy((char *)audioout2.name, (char *)audioout.name,
+				sizeof(audioout2.name));
 			audioout2.capability = audioout.capability;
 			audioout2.mode = audioout.mode;
-			CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&audioout, &audioout2,
+					 sizeof(audioout)), 0);
 
 			dprintf("\taudioout = {.index=%u, .name=\"%s\", "
 				".capability=0x%X, .mode=0x%X, "
@@ -86,9 +93,8 @@
 				audioout.name,
 				audioout.capability,
 				audioout.mode,
-				audioout.reserved[0],
-				audioout.reserved[1]
-				);
+				audioout.reserved[0], audioout.reserved[1]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_enum, -1);
@@ -97,7 +103,9 @@
 			/* check whether the structure is untouched */
 			memset(&audioout2, 0xff, sizeof(audioout2));
 			audioout2.index = i;
-			CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&audioout, &audioout2,
+					 sizeof(audioout)), 0);
 
 		}
 		i++;
@@ -105,13 +113,14 @@
 
 }
 
-void test_VIDIOC_ENUMAUDOUT_S32_MAX() {
+void test_VIDIOC_ENUMAUDOUT_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audioout audioout;
 	struct v4l2_audioout audioout2;
 
 	memset(&audioout, 0xff, sizeof(audioout));
-	audioout.index = (__u32)S32_MAX;
+	audioout.index = (__u32) S32_MAX;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDOUT, &audioout);
 	errno_enum = errno;
 
@@ -120,17 +129,18 @@
 
 	/* Check whether the original audioout struct is untouched */
 	memset(&audioout2, 0xff, sizeof(audioout2));
-	audioout2.index = (__u32)S32_MAX;
+	audioout2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
 }
 
-void test_VIDIOC_ENUMAUDOUT_S32_MAX_1() {
+void test_VIDIOC_ENUMAUDOUT_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audioout audioout;
 	struct v4l2_audioout audioout2;
 
 	memset(&audioout, 0xff, sizeof(audioout));
-	audioout.index = ((__u32)S32_MAX)+1;
+	audioout.index = ((__u32) S32_MAX) + 1;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMAUDOUT, &audioout);
 	errno_enum = errno;
 
@@ -139,11 +149,12 @@
 
 	/* Check whether the original audioout struct is untouched */
 	memset(&audioout2, 0xff, sizeof(audioout2));
-	audioout2.index = ((__u32)S32_MAX)+1;
+	audioout2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
 }
 
-void test_VIDIOC_ENUMAUDOUT_U32_MAX() {
+void test_VIDIOC_ENUMAUDOUT_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audioout audioout;
 	struct v4l2_audioout audioout2;
@@ -162,7 +173,8 @@
 	CU_ASSERT_EQUAL(memcmp(&audioout, &audioout2, sizeof(audioout)), 0);
 }
 
-void test_VIDIOC_ENUMAUDOUT_NULL() {
+void test_VIDIOC_ENUMAUDOUT_NULL()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_audioout audioout;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMINPUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMINPUT.c
index 65288e6..3b52a72 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMINPUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMINPUT.c
@@ -40,7 +40,8 @@
 
 #include "test_VIDIOC_ENUMINPUT.h"
 
-void test_VIDIOC_ENUMINPUT() {
+void test_VIDIOC_ENUMINPUT()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_input input;
 	struct v4l2_input input2;
@@ -53,15 +54,17 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMINPUT, &input);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUMINPUT, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUMINPUT, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, ret_enum, errno_enum);
 
 		if (ret_enum == 0) {
 			CU_ASSERT_EQUAL(ret_enum, 0);
 			CU_ASSERT_EQUAL(input.index, i);
 
-			CU_ASSERT(0 < strlen( (char*)input.name ));
-			CU_ASSERT(valid_string((char*)input.name, sizeof(input.name)));
+			CU_ASSERT(0 < strlen((char *)input.name));
+			CU_ASSERT(valid_string
+				  ((char *)input.name, sizeof(input.name)));
 
 			//CU_ASSERT_EQUAL(input.type, ?);
 			//CU_ASSERT_EQUAL(input.audioset, ?);
@@ -80,13 +83,15 @@
 			 */
 			memset(&input2, 0, sizeof(input2));
 			input2.index = input.index;
-			strncpy((char*)input2.name, (char*)input.name, sizeof(input2.name));
+			strncpy((char *)input2.name, (char *)input.name,
+				sizeof(input2.name));
 			input2.type = input.type;
 			input2.audioset = input.audioset;
 			input2.tuner = input.tuner;
 			input2.std = input.std;
 			input2.status = input.status;
-			CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)), 0);
+			CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)),
+					0);
 
 			show_v4l2_input(&input);
 
@@ -96,7 +101,8 @@
 
 			memset(&input2, 0xff, sizeof(input2));
 			input2.index = i;
-			CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)), 0);
+			CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)),
+					0);
 
 		}
 		i++;
@@ -104,13 +110,14 @@
 
 }
 
-void test_VIDIOC_ENUMINPUT_S32_MAX() {
+void test_VIDIOC_ENUMINPUT_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_input input;
 	struct v4l2_input input2;
 
 	memset(&input, 0xff, sizeof(input));
-	input.index = (__u32)S32_MAX;
+	input.index = (__u32) S32_MAX;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMINPUT, &input);
 	errno_enum = errno;
 
@@ -121,17 +128,18 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&input2, 0xff, sizeof(input2));
-	input2.index = (__u32)S32_MAX;
+	input2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)), 0);
 }
 
-void test_VIDIOC_ENUMINPUT_S32_MAX_1() {
+void test_VIDIOC_ENUMINPUT_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_input input;
 	struct v4l2_input input2;
 
 	memset(&input, 0xff, sizeof(input));
-	input.index = ((__u32)S32_MAX)+1;
+	input.index = ((__u32) S32_MAX) + 1;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMINPUT, &input);
 	errno_enum = errno;
 
@@ -142,11 +150,12 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&input2, 0xff, sizeof(input2));
-	input2.index = ((__u32)S32_MAX)+1;
+	input2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)), 0);
 }
 
-void test_VIDIOC_ENUMINPUT_U32_MAX() {
+void test_VIDIOC_ENUMINPUT_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_input input;
 	struct v4l2_input input2;
@@ -167,7 +176,8 @@
 	CU_ASSERT_EQUAL(memcmp(&input, &input2, sizeof(input)), 0);
 }
 
-void test_VIDIOC_ENUMINPUT_NULL() {
+void test_VIDIOC_ENUMINPUT_NULL()
+{
 	int ret_enum, errno_enum;
 	int ret_null, errno_null;
 	struct v4l2_input input;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMOUTPUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMOUTPUT.c
index fb130ad..b95d60e 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMOUTPUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMOUTPUT.c
@@ -34,7 +34,8 @@
 
 #include "test_VIDIOC_ENUMOUTPUT.h"
 
-void test_VIDIOC_ENUMOUTPUT() {
+void test_VIDIOC_ENUMOUTPUT()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_output output;
 	struct v4l2_output output2;
@@ -47,15 +48,17 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMOUTPUT, &output);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUMOUTPUT, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUMOUTPUT, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, ret_enum, errno_enum);
 
 		if (ret_enum == 0) {
 			CU_ASSERT_EQUAL(ret_enum, 0);
 			CU_ASSERT_EQUAL(output.index, i);
 
-			CU_ASSERT(0 < strlen( (char*)output.name ));
-			CU_ASSERT(valid_string((char*)output.name, sizeof(output.name)));
+			CU_ASSERT(0 < strlen((char *)output.name));
+			CU_ASSERT(valid_string
+				  ((char *)output.name, sizeof(output.name)));
 
 			//CU_ASSERT_EQUAL(output.type, ?);
 			//CU_ASSERT_EQUAL(output.audioset, ?);
@@ -73,12 +76,14 @@
 			 */
 			memset(&output2, 0, sizeof(output2));
 			output2.index = output.index;
-			strncpy((char*)output2.name, (char*)output.name, sizeof(output2.name));
+			strncpy((char *)output2.name, (char *)output.name,
+				sizeof(output2.name));
 			output2.type = output.type;
 			output2.audioset = output.audioset;
 			output2.modulator = output.modulator;
 			output2.std = output.std;
-			CU_ASSERT_EQUAL(memcmp(&output, &output2, sizeof(output)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&output, &output2, sizeof(output)), 0);
 
 			dprintf("\toutput = {.index=%u, .name=\"%s\", "
 				".type=0x%X, .audioset=0x%X, .modulator=0x%X, "
@@ -92,9 +97,8 @@
 				output.std,
 				output.reserved[0],
 				output.reserved[1],
-				output.reserved[2],
-				output.reserved[3]
-				);
+				output.reserved[2], output.reserved[3]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_enum, -1);
@@ -102,7 +106,8 @@
 
 			memset(&output2, 0xff, sizeof(output2));
 			output2.index = i;
-			CU_ASSERT_EQUAL(memcmp(&output, &output2, sizeof(output)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&output, &output2, sizeof(output)), 0);
 
 			dprintf("\terrno=%i\n", errno);
 
@@ -112,13 +117,14 @@
 
 }
 
-void test_VIDIOC_ENUMOUTPUT_S32_MAX() {
+void test_VIDIOC_ENUMOUTPUT_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_output output;
 	struct v4l2_output output2;
 
 	memset(&output, 0xff, sizeof(output));
-	output.index = (__u32)S32_MAX;
+	output.index = (__u32) S32_MAX;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMOUTPUT, &output);
 	errno_enum = errno;
 
@@ -126,17 +132,18 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&output2, 0xff, sizeof(output2));
-	output2.index = (__u32)S32_MAX;
+	output2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&output, &output2, sizeof(output)), 0);
 }
 
-void test_VIDIOC_ENUMOUTPUT_S32_MAX_1() {
+void test_VIDIOC_ENUMOUTPUT_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_output output;
 	struct v4l2_output output2;
 
 	memset(&output, 0xff, sizeof(output));
-	output.index = ((__u32)S32_MAX)+1;
+	output.index = ((__u32) S32_MAX) + 1;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMOUTPUT, &output);
 	errno_enum = errno;
 
@@ -144,11 +151,12 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&output2, 0xff, sizeof(output2));
-	output2.index = ((__u32)S32_MAX)+1;
+	output2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&output, &output2, sizeof(output)), 0);
 }
 
-void test_VIDIOC_ENUMOUTPUT_U32_MAX() {
+void test_VIDIOC_ENUMOUTPUT_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_output output;
 	struct v4l2_output output2;
@@ -166,7 +174,8 @@
 	CU_ASSERT_EQUAL(memcmp(&output, &output2, sizeof(output)), 0);
 }
 
-void test_VIDIOC_ENUMOUTPUT_NULL() {
+void test_VIDIOC_ENUMOUTPUT_NULL()
+{
 	int ret_enum, errno_enum;
 	int ret_null, errno_null;
 	struct v4l2_output output;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMSTD.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMSTD.c
index c556f86..2e44516 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMSTD.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUMSTD.c
@@ -43,7 +43,8 @@
 
 #include "test_VIDIOC_ENUMSTD.h"
 
-void test_VIDIOC_ENUMSTD() {
+void test_VIDIOC_ENUMSTD()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_standard std;
 	struct v4l2_standard std2;
@@ -64,8 +65,9 @@
 			CU_ASSERT_EQUAL(std.index, i);
 			CU_ASSERT(valid_v4l2_std_id(std.id));
 
-			CU_ASSERT(0 < strlen( (char*)std.name ));
-			CU_ASSERT(valid_string((char*)std.name, sizeof(std.name)));
+			CU_ASSERT(0 < strlen((char *)std.name));
+			CU_ASSERT(valid_string
+				  ((char *)std.name, sizeof(std.name)));
 
 			//CU_ASSERT_EQUAL(std.frameperiod.numerator, ?);
 			//CU_ASSERT_EQUAL(std.frameperiod.denominator, ?);
@@ -82,9 +84,11 @@
 			memset(&std2, 0, sizeof(std2));
 			std2.index = std.index;
 			std2.id = std.id;
-			strncpy((char*)std2.name, (char*)std.name, sizeof(std2.name));
+			strncpy((char *)std2.name, (char *)std.name,
+				sizeof(std2.name));
 			std2.frameperiod.numerator = std.frameperiod.numerator;
-			std2.frameperiod.denominator = std.frameperiod.denominator;
+			std2.frameperiod.denominator =
+			    std.frameperiod.denominator;
 			std2.framelines = std.framelines;
 			CU_ASSERT_EQUAL(memcmp(&std, &std2, sizeof(std)), 0);
 
@@ -100,9 +104,8 @@
 				std.framelines,
 				std.reserved[0],
 				std.reserved[1],
-				std.reserved[2],
-				std.reserved[3]
-			);
+				std.reserved[2], std.reserved[3]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_enum, -1);
@@ -117,13 +120,14 @@
 	} while (ret_enum == 0);
 }
 
-void test_VIDIOC_ENUMSTD_S32_MAX() {
+void test_VIDIOC_ENUMSTD_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_standard std;
 	struct v4l2_standard std2;
 
 	memset(&std, 0xff, sizeof(std));
-	std.index = (__u32)S32_MAX;
+	std.index = (__u32) S32_MAX;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMSTD, &std);
 	errno_enum = errno;
 
@@ -131,17 +135,18 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&std2, 0xff, sizeof(std2));
-	std2.index = (__u32)S32_MAX;
+	std2.index = (__u32) S32_MAX;
 	CU_ASSERT_EQUAL(memcmp(&std, &std2, sizeof(std)), 0);
 }
 
-void test_VIDIOC_ENUMSTD_S32_MAX_1() {
+void test_VIDIOC_ENUMSTD_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_standard std;
 	struct v4l2_standard std2;
 
 	memset(&std, 0xff, sizeof(std));
-	std.index = ((__u32)S32_MAX)+1;
+	std.index = ((__u32) S32_MAX) + 1;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUMSTD, &std);
 	errno_enum = errno;
 
@@ -149,11 +154,12 @@
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	memset(&std2, 0xff, sizeof(std2));
-	std2.index = ((__u32)S32_MAX)+1;
+	std2.index = ((__u32) S32_MAX) + 1;
 	CU_ASSERT_EQUAL(memcmp(&std, &std2, sizeof(std)), 0);
 }
 
-void test_VIDIOC_ENUMSTD_U32_MAX() {
+void test_VIDIOC_ENUMSTD_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_standard std;
 	struct v4l2_standard std2;
@@ -174,7 +180,8 @@
 	CU_ASSERT_EQUAL(memcmp(&std, &std2, sizeof(std)), 0);
 }
 
-void test_VIDIOC_ENUMSTD_NULL() {
+void test_VIDIOC_ENUMSTD_NULL()
+{
 	int ret_enum, errno_enum;
 	int ret_null, errno_null;
 	struct v4l2_standard std;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FMT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FMT.c
index ade1412..b51a2b3 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FMT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FMT.c
@@ -39,7 +39,8 @@
 
 #include "test_VIDIOC_ENUM_FMT.h"
 
-static void do_enumerate_formats(enum v4l2_buf_type type) {
+static void do_enumerate_formats(enum v4l2_buf_type type)
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	struct v4l2_fmtdesc format2;
@@ -54,16 +55,19 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, i, type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, i, type, ret_enum, errno_enum);
 		if (ret_enum == 0) {
 			CU_ASSERT_EQUAL(ret_enum, 0);
 			CU_ASSERT_EQUAL(format.index, i);
 			//CU_ASSERT_EQUAL(format.type, ?);
 			//CU_ASSERT_EQUAL(format.flags, ?);
 
-			CU_ASSERT(0 < strlen( (char*)format.description ));
-			CU_ASSERT(valid_string((char*)format.description, sizeof(format.description)));
+			CU_ASSERT(0 < strlen((char *)format.description));
+			CU_ASSERT(valid_string
+				  ((char *)format.description,
+				   sizeof(format.description)));
 
 			//CU_ASSERT_EQUAL(format.pixelformat, ?);
 			CU_ASSERT_EQUAL(format.reserved[0], 0);
@@ -79,23 +83,22 @@
 			format2.index = format.index;
 			format2.type = format.type;
 			format2.flags = format.flags;
-			strncpy((char*)format2.description, (char*)format.description, sizeof(format2.description));
+			strncpy((char *)format2.description,
+				(char *)format.description,
+				sizeof(format2.description));
 			format2.pixelformat = format.pixelformat;
-			CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&format, &format2, sizeof(format)), 0);
 
-			dprintf("\tformat = {.index=%u, .type=0x%X, .flags=0x%X, "
-				".description=\"%s\", .pixelformat=0x%X, "
-				".reserved[]={ 0x%X, 0x%X, 0x%X, 0x%X } }\n",
-				format.index,
-				format.type,
-				format.flags,
-				format.description,
-				format.pixelformat,
-				format.reserved[0],
-				format.reserved[1],
-				format.reserved[2],
-				format.reserved[3]
-			);
+			dprintf
+			    ("\tformat = {.index=%u, .type=0x%X, .flags=0x%X, "
+			     ".description=\"%s\", .pixelformat=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X, 0x%X, 0x%X } }\n",
+			     format.index, format.type, format.flags,
+			     format.description, format.pixelformat,
+			     format.reserved[0], format.reserved[1],
+			     format.reserved[2], format.reserved[3]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_enum, -1);
@@ -104,7 +107,8 @@
 			memset(&format2, 0xff, sizeof(format2));
 			format2.index = i;
 			format2.type = type;
-			CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&format, &format2, sizeof(format)), 0);
 
 		}
 		i++;
@@ -112,7 +116,8 @@
 
 }
 
-void test_VIDIOC_ENUM_FMT() {
+void test_VIDIOC_ENUM_FMT()
+{
 	do_enumerate_formats(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_enumerate_formats(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_enumerate_formats(V4L2_BUF_TYPE_VIDEO_OVERLAY);
@@ -124,57 +129,64 @@
 	do_enumerate_formats(V4L2_BUF_TYPE_PRIVATE);
 }
 
-void test_VIDIOC_ENUM_FMT_S32_MAX() {
+void test_VIDIOC_ENUM_FMT_S32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	struct v4l2_fmtdesc format2;
 
 	/* test invalid index */
 	memset(&format, 0xff, sizeof(format));
-	format.index = (__u32)S32_MAX;
+	format.index = (__u32) S32_MAX;
 	format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	/* Check whether the original format struct is untouched */
 	memset(&format2, 0xff, sizeof(format2));
-	format2.index = (__u32)S32_MAX;
+	format2.index = (__u32) S32_MAX;
 	format2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 }
 
-void test_VIDIOC_ENUM_FMT_S32_MAX_1() {
+void test_VIDIOC_ENUM_FMT_S32_MAX_1()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	struct v4l2_fmtdesc format2;
 
 	/* test invalid index */
 	memset(&format, 0xff, sizeof(format));
-	format.index = ((__u32)S32_MAX)+1;
+	format.index = ((__u32) S32_MAX) + 1;
 	format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
 
 	/* Check whether the original format struct is untouched */
 	memset(&format2, 0xff, sizeof(format2));
-	format2.index = ((__u32)S32_MAX)+1;
+	format2.index = ((__u32) S32_MAX) + 1;
 	format2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 }
 
-void test_VIDIOC_ENUM_FMT_U32_MAX() {
+void test_VIDIOC_ENUM_FMT_U32_MAX()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	struct v4l2_fmtdesc format2;
@@ -186,8 +198,10 @@
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -199,7 +213,8 @@
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 }
 
-void test_VIDIOC_ENUM_FMT_invalid_type() {
+void test_VIDIOC_ENUM_FMT_invalid_type()
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	struct v4l2_fmtdesc format2;
@@ -216,8 +231,10 @@
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -235,8 +252,10 @@
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -254,8 +273,10 @@
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -267,15 +288,18 @@
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 
 	/* test invalid .type= 8..0x7F */
-	for (i = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY+1; i < V4L2_BUF_TYPE_PRIVATE; i++) {
+	for (i = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + 1;
+	     i < V4L2_BUF_TYPE_PRIVATE; i++) {
 		memset(&format, 0xff, sizeof(format));
 		format.index = 0;
 		format.type = i;
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, format.index, format.type, ret_enum,
+		     errno_enum);
 
 		CU_ASSERT_EQUAL(ret_enum, -1);
 		CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -299,8 +323,10 @@
 	ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_enum = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-		__FILE__, __LINE__, format.index, format.type, ret_enum, errno_enum);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+	     __FILE__, __LINE__, format.index, format.type, ret_enum,
+	     errno_enum);
 
 	CU_ASSERT_EQUAL(ret_enum, -1);
 	CU_ASSERT_EQUAL(errno_enum, EINVAL);
@@ -312,7 +338,8 @@
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 }
 
-void test_VIDIOC_ENUM_FMT_NULL() {
+void test_VIDIOC_ENUM_FMT_NULL()
+{
 	int ret_capture, errno_capture;
 	int ret_output, errno_output;
 	int ret_video_overlay, errno_video_overlay;
@@ -349,8 +376,9 @@
 	ret_video_overlay = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_video_overlay = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_video_overlay=%i, errno_video_overlay=%i\n",
-		__FILE__, __LINE__, ret_video_overlay, errno_video_overlay);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_video_overlay=%i, errno_video_overlay=%i\n",
+	     __FILE__, __LINE__, ret_video_overlay, errno_video_overlay);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
@@ -358,8 +386,9 @@
 	ret_vbi_capture = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_vbi_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_vbi_capture=%i, errno_vbi_capture=%i\n",
-		__FILE__, __LINE__, ret_vbi_capture, errno_vbi_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_vbi_capture=%i, errno_vbi_capture=%i\n",
+	     __FILE__, __LINE__, ret_vbi_capture, errno_vbi_capture);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
@@ -367,17 +396,21 @@
 	ret_vbi_output = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_vbi_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_vbi_output=%i, errno_vbi_output=%i\n",
-		__FILE__, __LINE__, ret_vbi_output, errno_vbi_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_vbi_output=%i, errno_vbi_output=%i\n",
+	     __FILE__, __LINE__, ret_vbi_output, errno_vbi_output);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
 	format.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
-	ret_sliced_vbi_capture = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
+	ret_sliced_vbi_capture =
+	    ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_sliced_vbi_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_sliced_vbi_capture=%i, errno_sliced_vbi_capture=%i\n",
-		__FILE__, __LINE__, ret_sliced_vbi_capture, errno_sliced_vbi_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_sliced_vbi_capture=%i, errno_sliced_vbi_capture=%i\n",
+	     __FILE__, __LINE__, ret_sliced_vbi_capture,
+	     errno_sliced_vbi_capture);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
@@ -385,17 +418,22 @@
 	ret_sliced_vbi_output = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_sliced_vbi_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_sliced_vbi_output=%i, errno_sliced_vbi_output=%i\n",
-		__FILE__, __LINE__, ret_sliced_vbi_output, errno_sliced_vbi_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_sliced_vbi_output=%i, errno_sliced_vbi_output=%i\n",
+	     __FILE__, __LINE__, ret_sliced_vbi_output,
+	     errno_sliced_vbi_output);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
 	format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY;
-	ret_video_output_overlay = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
+	ret_video_output_overlay =
+	    ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 	errno_video_output_overlay = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, ret_video_output_overlay=%i, errno_video_output_overlay=%i\n",
-		__FILE__, __LINE__, ret_video_output_overlay, errno_video_output_overlay);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, ret_video_output_overlay=%i, errno_video_output_overlay=%i\n",
+	     __FILE__, __LINE__, ret_video_output_overlay,
+	     errno_video_output_overlay);
 
 	memset(&format, 0xff, sizeof(format));
 	format.index = 0;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FRAMESIZES.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FRAMESIZES.c
index f071445..a7043b0 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FRAMESIZES.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_ENUM_FRAMESIZES.c
@@ -30,12 +30,13 @@
 
 #include "test_VIDIOC_ENUM_FRAMESIZES.h"
 
-static int valid_framesize_type(__u32 type) {
+static int valid_framesize_type(__u32 type)
+{
 	int valid = 0;
 
 	if ((type == V4L2_FRMSIZE_TYPE_DISCRETE) ||
-	     (type == V4L2_FRMSIZE_TYPE_CONTINUOUS) ||
-	     (type == V4L2_FRMSIZE_TYPE_STEPWISE) ) {
+	    (type == V4L2_FRMSIZE_TYPE_CONTINUOUS) ||
+	    (type == V4L2_FRMSIZE_TYPE_STEPWISE)) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -43,7 +44,8 @@
 	return valid;
 }
 
-static void do_test_VIDIOC_ENUM_FRAMESIZES(__u32 fmt) {
+static void do_test_VIDIOC_ENUM_FRAMESIZES(__u32 fmt)
+{
 	struct v4l2_frmsizeenum framesize;
 	int ret_frame, errno_frame;
 	__u32 i;
@@ -55,13 +57,13 @@
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		if (i != 0 && first_type != V4L2_FRMSIZE_TYPE_DISCRETE) {
 			CU_ASSERT_EQUAL(ret_frame, -1);
@@ -81,49 +83,65 @@
 			}
 
 			switch (framesize.type) {
-				case V4L2_FRMSIZE_TYPE_DISCRETE:
-					CU_ASSERT(0 < framesize.discrete.width);
-					CU_ASSERT(0 < framesize.discrete.height);
-					break;
+			case V4L2_FRMSIZE_TYPE_DISCRETE:
+				CU_ASSERT(0 < framesize.discrete.width);
+				CU_ASSERT(0 < framesize.discrete.height);
+				break;
 
-				case V4L2_FRMSIZE_TYPE_CONTINUOUS:
-					CU_ASSERT(0 < framesize.stepwise.min_width);
-					CU_ASSERT(0 < framesize.stepwise.max_width);
-					CU_ASSERT_EQUAL(framesize.stepwise.step_width, 1);
+			case V4L2_FRMSIZE_TYPE_CONTINUOUS:
+				CU_ASSERT(0 < framesize.stepwise.min_width);
+				CU_ASSERT(0 < framesize.stepwise.max_width);
+				CU_ASSERT_EQUAL(framesize.stepwise.step_width,
+						1);
 
-					CU_ASSERT(framesize.stepwise.min_width < framesize.stepwise.max_width);
+				CU_ASSERT(framesize.stepwise.min_width <
+					  framesize.stepwise.max_width);
 
-					CU_ASSERT(0 < framesize.stepwise.min_height);
-					CU_ASSERT(0 < framesize.stepwise.max_height);
-					CU_ASSERT_EQUAL(framesize.stepwise.step_height, 1);
+				CU_ASSERT(0 < framesize.stepwise.min_height);
+				CU_ASSERT(0 < framesize.stepwise.max_height);
+				CU_ASSERT_EQUAL(framesize.stepwise.step_height,
+						1);
 
-					CU_ASSERT(framesize.stepwise.min_height < framesize.stepwise.max_height);
-					break;
+				CU_ASSERT(framesize.stepwise.min_height <
+					  framesize.stepwise.max_height);
+				break;
 
-				case V4L2_FRMSIZE_TYPE_STEPWISE:
-					CU_ASSERT(0 < framesize.stepwise.min_width);
-					CU_ASSERT(0 < framesize.stepwise.max_width);
-					CU_ASSERT(0 < framesize.stepwise.step_width);
+			case V4L2_FRMSIZE_TYPE_STEPWISE:
+				CU_ASSERT(0 < framesize.stepwise.min_width);
+				CU_ASSERT(0 < framesize.stepwise.max_width);
+				CU_ASSERT(0 < framesize.stepwise.step_width);
 
-					CU_ASSERT(framesize.stepwise.min_width < framesize.stepwise.max_width);
+				CU_ASSERT(framesize.stepwise.min_width <
+					  framesize.stepwise.max_width);
 
-					/* check if the given step is unambigous: min + n * step = max */
-					if (framesize.stepwise.step_width != 0) {
-						CU_ASSERT_EQUAL( (framesize.stepwise.max_width-framesize.stepwise.min_width) % framesize.stepwise.step_width, 0);
-					}
+				/* check if the given step is unambigous: min + n * step = max */
+				if (framesize.stepwise.step_width != 0) {
+					CU_ASSERT_EQUAL((framesize.stepwise.
+							 max_width -
+							 framesize.stepwise.
+							 min_width) %
+							framesize.stepwise.
+							step_width, 0);
+				}
 
-					CU_ASSERT(0 < framesize.stepwise.min_height);
-					CU_ASSERT(0 < framesize.stepwise.max_height);
-					CU_ASSERT(0 < framesize.stepwise.step_height);
+				CU_ASSERT(0 < framesize.stepwise.min_height);
+				CU_ASSERT(0 < framesize.stepwise.max_height);
+				CU_ASSERT(0 < framesize.stepwise.step_height);
 
-					CU_ASSERT(framesize.stepwise.min_height < framesize.stepwise.max_height);
+				CU_ASSERT(framesize.stepwise.min_height <
+					  framesize.stepwise.max_height);
 
-					/* check if the given step is unambigous: min + n * step = max */
-					if (framesize.stepwise.step_height != 0) {
-						CU_ASSERT_EQUAL( (framesize.stepwise.max_height-framesize.stepwise.min_height) % framesize.stepwise.step_height, 0);
-					}
+				/* check if the given step is unambigous: min + n * step = max */
+				if (framesize.stepwise.step_height != 0) {
+					CU_ASSERT_EQUAL((framesize.stepwise.
+							 max_height -
+							 framesize.stepwise.
+							 min_height) %
+							framesize.stepwise.
+							step_height, 0);
+				}
 
-					break;
+				break;
 			}
 
 			CU_ASSERT_EQUAL(framesize.reserved[0], 0);
@@ -140,7 +158,8 @@
 
 }
 
-static void do_test_VIDIOC_ENUM_FRAMESIZES_type(enum v4l2_buf_type type) {
+static void do_test_VIDIOC_ENUM_FRAMESIZES_type(enum v4l2_buf_type type)
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	__u32 i;
@@ -154,8 +173,9 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
 
 		/* Ensure that VIDIOC_ENUM_FRAMESIZES is called at least once
 		 * even if VIDIOC_ENUM_FMT returns error
@@ -167,14 +187,16 @@
 
 }
 
-void test_VIDIOC_ENUM_FRAMESIZES() {
+void test_VIDIOC_ENUM_FRAMESIZES()
+{
 	do_test_VIDIOC_ENUM_FRAMESIZES_type(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_test_VIDIOC_ENUM_FRAMESIZES_type(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_test_VIDIOC_ENUM_FRAMESIZES_type(V4L2_BUF_TYPE_VIDEO_OVERLAY);
 	do_test_VIDIOC_ENUM_FRAMESIZES_type(V4L2_BUF_TYPE_PRIVATE);
 }
 
-static void do_test_VIDIOC_ENUM_FRAMESIZES_invalid_index(__u32 fmt) {
+static void do_test_VIDIOC_ENUM_FRAMESIZES_invalid_index(__u32 fmt)
+{
 	struct v4l2_frmsizeenum framesize;
 	int ret_frame, errno_frame;
 	__u32 i;
@@ -185,80 +207,79 @@
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		i++;
 	} while (ret_frame == 0 && i != 0);
 
-	max_index = i-1;
+	max_index = i - 1;
 
-	i = max_index+1;
+	i = max_index + 1;
 	memset(&framesize, 0xff, sizeof(framesize));
 	framesize.index = i;
 	framesize.pixel_format = fmt;
 	ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 	errno_frame = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-		__FILE__, __LINE__,
-		i, fmt,
-		ret_frame, errno_frame);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+	     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 	CU_ASSERT_EQUAL(ret_frame, -1);
 	CU_ASSERT_EQUAL(errno_frame, EINVAL);
 
-	i = (__u32)S32_MIN;
+	i = (__u32) S32_MIN;
 	if (max_index < i) {
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		CU_ASSERT_EQUAL(ret_frame, -1);
 		CU_ASSERT_EQUAL(errno_frame, EINVAL);
 	}
 
-	i = (__u32)S32_MAX;
+	i = (__u32) S32_MAX;
 	if (max_index < i) {
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		CU_ASSERT_EQUAL(ret_frame, -1);
 		CU_ASSERT_EQUAL(errno_frame, EINVAL);
 	}
 
-	i = (__u32)U32_MAX;
+	i = (__u32) U32_MAX;
 	if (max_index < i) {
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=0x%x, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		CU_ASSERT_EQUAL(ret_frame, -1);
 		CU_ASSERT_EQUAL(errno_frame, EINVAL);
@@ -266,7 +287,9 @@
 
 }
 
-static void do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(enum v4l2_buf_type type) {
+static void do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(enum v4l2_buf_type
+							      type)
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	__u32 i;
@@ -280,27 +303,36 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
 
 		/* Ensure that VIDIOC_ENUM_FRAMESIZES is called at least once
 		 * even if VIDIOC_ENUM_FMT returns error
 		 */
-		do_test_VIDIOC_ENUM_FRAMESIZES_invalid_index(format.pixelformat);
+		do_test_VIDIOC_ENUM_FRAMESIZES_invalid_index(format.
+							     pixelformat);
 
 		i++;
 	} while (ret_enum == 0 && i != 0);
 
 }
 
-void test_VIDIOC_ENUM_FRAMESIZES_invalid_index() {
-	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(V4L2_BUF_TYPE_VIDEO_CAPTURE);
-	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(V4L2_BUF_TYPE_VIDEO_OUTPUT);
-	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(V4L2_BUF_TYPE_VIDEO_OVERLAY);
-	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index(V4L2_BUF_TYPE_PRIVATE);
+void test_VIDIOC_ENUM_FRAMESIZES_invalid_index()
+{
+	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index
+	    (V4L2_BUF_TYPE_VIDEO_CAPTURE);
+	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index
+	    (V4L2_BUF_TYPE_VIDEO_OUTPUT);
+	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index
+	    (V4L2_BUF_TYPE_VIDEO_OVERLAY);
+	do_test_VIDIOC_ENUM_FRAMESIZES_type_invalid_index
+	    (V4L2_BUF_TYPE_PRIVATE);
 }
 
-static int supported_pixel_format_type(enum v4l2_buf_type type, __u32 pixel_format) {
+static int supported_pixel_format_type(enum v4l2_buf_type type,
+				       __u32 pixel_format)
+{
 	int ret_enum, errno_enum;
 	struct v4l2_fmtdesc format;
 	__u32 i;
@@ -315,8 +347,9 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, i, format.type, ret_enum, errno_enum);
 
 		i++;
 	} while (ret_enum == 0 && i != 0 && format.pixelformat != pixel_format);
@@ -328,16 +361,25 @@
 	return supported;
 }
 
-static int supported_pixel_format(__u32 pixel_format) {
+static int supported_pixel_format(__u32 pixel_format)
+{
 	int supported = 0;
 
-	supported = supported_pixel_format_type(V4L2_BUF_TYPE_VIDEO_CAPTURE, pixel_format);
+	supported =
+	    supported_pixel_format_type(V4L2_BUF_TYPE_VIDEO_CAPTURE,
+					pixel_format);
 	if (!supported) {
-		supported = supported_pixel_format_type(V4L2_BUF_TYPE_VIDEO_OUTPUT, pixel_format);
+		supported =
+		    supported_pixel_format_type(V4L2_BUF_TYPE_VIDEO_OUTPUT,
+						pixel_format);
 		if (!supported) {
-			supported = supported_pixel_format_type(V4L2_BUF_TYPE_VIDEO_OVERLAY, pixel_format);
+			supported =
+			    supported_pixel_format_type
+			    (V4L2_BUF_TYPE_VIDEO_OVERLAY, pixel_format);
 			if (!supported) {
-				supported = supported_pixel_format_type(V4L2_BUF_TYPE_PRIVATE, pixel_format);
+				supported =
+				    supported_pixel_format_type
+				    (V4L2_BUF_TYPE_PRIVATE, pixel_format);
 			}
 		}
 	}
@@ -345,7 +387,8 @@
 	return supported;
 }
 
-static void do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(__u32 fmt) {
+static void do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(__u32 fmt)
+{
 	struct v4l2_frmsizeenum framesize;
 	int ret_frame, errno_frame;
 	__u32 i;
@@ -355,13 +398,13 @@
 		memset(&framesize, 0xff, sizeof(framesize));
 		framesize.index = i;
 		framesize.pixel_format = fmt;
-		ret_frame = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
+		ret_frame =
+		    ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 		errno_frame = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
-			__FILE__, __LINE__,
-			i, fmt,
-			ret_frame, errno_frame);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_frame=%i, errno_frame=%i\n",
+		     __FILE__, __LINE__, i, fmt, ret_frame, errno_frame);
 
 		CU_ASSERT_EQUAL(ret_frame, -1);
 		CU_ASSERT_EQUAL(errno_frame, EINVAL);
@@ -369,19 +412,26 @@
 
 }
 
-void test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format() {
+void test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format()
+{
 
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(U32_MIN);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format((__u32)S32_MIN);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format((__u32)S32_MAX);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format((__u32) S32_MIN);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format((__u32) S32_MAX);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(U32_MAX);
 
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB332);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB444);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB555);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB565);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB555X);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB565X);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB332);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB444);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB555);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB565);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB555X);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_RGB565X);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_BGR24);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_RGB24);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_BGR32);
@@ -389,35 +439,48 @@
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_GREY);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_Y16);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_PAL8);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YVU410);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YVU420);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YVU410);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YVU420);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUYV);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_UYVY);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV422P);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV411P);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV422P);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV411P);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_Y41P);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV444);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV555);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV565);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV444);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV555);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV565);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV32);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_NV12);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_NV21);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV410);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YUV420);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV410);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_YUV420);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_YYUV);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_HI240);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_HM12);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SBGGR8);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SBGGR16);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SBGGR8);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SBGGR16);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_MJPEG);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_JPEG);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_DV);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_MPEG);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_WNVA);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SN9C10X);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SN9C10X);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_PWC1);
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_PWC2);
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_ET61X251);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_ET61X251);
 
 #ifdef V4L2_PIX_FMT_VYUY
 	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_VYUY);
@@ -432,47 +495,58 @@
 #endif
 
 #ifdef V4L2_PIX_FMT_SGBRG8
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SGBRG8);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SGBRG8);
 #endif
 
 #ifdef V4L2_PIX_FMT_SGRBG8
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SGRBG8);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SGRBG8);
 #endif
 
 #ifdef V4L2_PIX_FMT_SGRBG10
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SGRBG10);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SGRBG10);
 #endif
 
 #ifdef V4L2_PIX_FMT_SGRBG10DPCM8
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SGRBG10DPCM8);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SGRBG10DPCM8);
 #endif
 
 #ifdef V4L2_PIX_FMT_SPCA501
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SPCA501);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SPCA501);
 #endif
 
 #ifdef V4L2_PIX_FMT_SPCA505
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SPCA505);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SPCA505);
 #endif
 
 #ifdef V4L2_PIX_FMT_SPCA508
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SPCA508);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SPCA508);
 #endif
 
 #ifdef V4L2_PIX_FMT_SPCA561
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SPCA561);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SPCA561);
 #endif
 
 #ifdef V4L2_PIX_FMT_PAC207
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_PAC207);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_PAC207);
 #endif
 
 #ifdef V4L2_PIX_FMT_MR97310A
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_MR97310A);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_MR97310A);
 #endif
 
 #ifdef V4L2_PIX_FMT_SQ905C
-	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format(V4L2_PIX_FMT_SQ905C);
+	do_test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format
+	    (V4L2_PIX_FMT_SQ905C);
 #endif
 
 #ifdef V4L2_PIX_FMT_PJPG
@@ -493,7 +567,8 @@
 
 }
 
-void test_VIDIOC_ENUM_FRAMESIZES_NULL() {
+void test_VIDIOC_ENUM_FRAMESIZES_NULL()
+{
 	struct v4l2_fmtdesc format_capture;
 	struct v4l2_fmtdesc format_output;
 	struct v4l2_fmtdesc format_overlay;
@@ -511,11 +586,14 @@
 	format_capture.index = 0;
 	format_capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
-	ret_fmt_capture = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_capture);
+	ret_fmt_capture =
+	    ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_capture);
 	errno_fmt_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_capture=%i, errno_fmt_capture=%i\n",
-		__FILE__, __LINE__, format_capture.index, format_capture.type, ret_fmt_capture, errno_fmt_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_capture=%i, errno_fmt_capture=%i\n",
+	     __FILE__, __LINE__, format_capture.index, format_capture.type,
+	     ret_fmt_capture, errno_fmt_capture);
 
 	memset(&format_output, 0xff, sizeof(format_output));
 	format_output.index = 0;
@@ -524,28 +602,36 @@
 	ret_fmt_output = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_output);
 	errno_fmt_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_output=%i, errno_fmt_output=%i\n",
-		__FILE__, __LINE__, format_output.index, format_output.type, ret_fmt_output, errno_fmt_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_output=%i, errno_fmt_output=%i\n",
+	     __FILE__, __LINE__, format_output.index, format_output.type,
+	     ret_fmt_output, errno_fmt_output);
 
 	memset(&format_overlay, 0xff, sizeof(format_overlay));
 	format_overlay.index = 0;
 	format_overlay.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
 
-	ret_fmt_overlay = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_overlay);
+	ret_fmt_overlay =
+	    ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_overlay);
 	errno_fmt_overlay = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_overlay=%i, errno_fmt_overlay=%i\n",
-		__FILE__, __LINE__, format_overlay.index, format_overlay.type, ret_fmt_overlay, errno_fmt_overlay);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_overlay=%i, errno_fmt_overlay=%i\n",
+	     __FILE__, __LINE__, format_overlay.index, format_overlay.type,
+	     ret_fmt_overlay, errno_fmt_overlay);
 
 	memset(&format_private, 0xff, sizeof(format_private));
 	format_private.index = 0;
 	format_private.type = V4L2_BUF_TYPE_PRIVATE;
 
-	ret_fmt_private = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_private);
+	ret_fmt_private =
+	    ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &format_private);
 	errno_fmt_private = errno;
 
-	dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_private=%i, errno_fmt_private=%i\n",
-		__FILE__, __LINE__, format_private.index, format_private.type, ret_fmt_private, errno_fmt_private);
+	dprintf
+	    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_fmt_private=%i, errno_fmt_private=%i\n",
+	     __FILE__, __LINE__, format_private.index, format_private.type,
+	     ret_fmt_private, errno_fmt_private);
 
 	if (ret_fmt_capture == 0) {
 		fmt = format_capture.pixelformat;
@@ -565,13 +651,15 @@
 	ret_size = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, &framesize);
 	errno_size = errno;
 
-	dprintf("\tVIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_size=%i, errno_size=%i\n",
-				framesize.index, framesize.pixel_format, ret_size, errno_size);
+	dprintf
+	    ("\tVIDIOC_ENUM_FRAMESIZES, index=%u, pixel_format=0x%x, ret_size=%i, errno_size=%i\n",
+	     framesize.index, framesize.pixel_format, ret_size, errno_size);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_ENUM_FRAMESIZES, NULL);
 	errno_null = errno;
 
-	dprintf("\tVIDIOC_ENUM_FRAMESIZES, ret_null=%i, errno_null=%i\n", ret_null, errno_null);
+	dprintf("\tVIDIOC_ENUM_FRAMESIZES, ret_null=%i, errno_null=%i\n",
+		ret_null, errno_null);
 
 	if (ret_size == 0) {
 		CU_ASSERT_EQUAL(ret_size, 0);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_EXT_CTRLS.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_EXT_CTRLS.c
index 3ec7aff..13c2838 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_EXT_CTRLS.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_EXT_CTRLS.c
@@ -26,7 +26,8 @@
 
 #include "test_VIDIOC_EXT_CTRLS.h"
 
-void test_VIDIOC_G_EXT_CTRLS_zero() {
+void test_VIDIOC_G_EXT_CTRLS_zero()
+{
 	struct v4l2_ext_controls controls;
 	int ret_get, errno_get;
 
@@ -57,7 +58,8 @@
 	}
 }
 
-void test_VIDIOC_G_EXT_CTRLS_zero_invalid_count() {
+void test_VIDIOC_G_EXT_CTRLS_zero_invalid_count()
+{
 	struct v4l2_ext_controls controls;
 	int ret_get, errno_get;
 	int ret_get_invalid, errno_get_invalid;
@@ -72,8 +74,9 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0%x, ret_get=%i, errno_get=%i\n",
-		__FILE__, __LINE__, count, ret_get, errno_get);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0%x, ret_get=%i, errno_get=%i\n",
+	     __FILE__, __LINE__, count, ret_get, errno_get);
 
 	count = 1;
 	/* Note: this loop also covers ((__u32)S32_MAX)+1 = 0x80000000 */
@@ -83,11 +86,14 @@
 		controls.count = count;
 		controls.controls = NULL;
 
-		ret_get_invalid = ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
+		ret_get_invalid =
+		    ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
 		errno_get_invalid = errno;
 
-		dprintf("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
-			__FILE__, __LINE__, count, ret_get_invalid, errno_get_invalid);
+		dprintf
+		    ("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
+		     __FILE__, __LINE__, count, ret_get_invalid,
+		     errno_get_invalid);
 
 		if (ret_get == 0) {
 			CU_ASSERT_EQUAL(ret_get, 0);
@@ -98,7 +104,8 @@
 			 * controls.count value
 			 */
 			CU_ASSERT_EQUAL(ret_get_invalid, -1);
-			CU_ASSERT(errno_get_invalid == EFAULT || errno_get_invalid == ENOMEM);
+			CU_ASSERT(errno_get_invalid == EFAULT
+				  || errno_get_invalid == ENOMEM);
 
 		} else {
 			CU_ASSERT_EQUAL(ret_get, -1);
@@ -110,7 +117,7 @@
 		count <<= 1;
 	} while (count != 0);
 
-	count = (__u32)S32_MAX;
+	count = (__u32) S32_MAX;
 	memset(&controls, 0xff, sizeof(controls));
 	controls.ctrl_class = V4L2_CTRL_CLASS_USER;
 	controls.count = count;
@@ -119,14 +126,16 @@
 	ret_get_invalid = ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
 	errno_get_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_get_invalid, errno_get_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_get_invalid, errno_get_invalid);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
 
 		CU_ASSERT_EQUAL(ret_get_invalid, -1);
-		CU_ASSERT(errno_get_invalid == EFAULT || errno_get_invalid == ENOMEM);
+		CU_ASSERT(errno_get_invalid == EFAULT
+			  || errno_get_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -145,14 +154,16 @@
 	ret_get_invalid = ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
 	errno_get_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_get_invalid, errno_get_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_EXT_CTRLS, count=0x%x, ret_get_invalid=%i, errno_get_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_get_invalid, errno_get_invalid);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
 
 		CU_ASSERT_EQUAL(ret_get_invalid, -1);
-		CU_ASSERT(errno_get_invalid == EFAULT || errno_get_invalid == ENOMEM);
+		CU_ASSERT(errno_get_invalid == EFAULT
+			  || errno_get_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -164,7 +175,8 @@
 
 }
 
-static int do_get_ext_control_one(__u32 ctrl_class, __u32 id) {
+static int do_get_ext_control_one(__u32 ctrl_class, __u32 id)
+{
 	int ret_query, errno_query;
 	int ret_get, errno_get;
 	struct v4l2_queryctrl queryctrl;
@@ -180,26 +192,27 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, id, id-V4L2_CID_BASE, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_query,
+	     errno_query);
 	if (ret_query == 0) {
 		dprintf("\t%s:%u: queryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-		".minimum=%i, .maximum=%i, .step=%i, "
-		".default_value=%i, "
-		".flags=0x%X, "
-		".reserved[]={ 0x%X, 0x%X } }\n",
-		__FILE__, __LINE__,
-		queryctrl.id,
-		queryctrl.type,
-		queryctrl.name,
-		queryctrl.minimum,
-		queryctrl.maximum,
-		queryctrl.step,
-		queryctrl.default_value,
-		queryctrl.flags,
-		queryctrl.reserved[0],
-		queryctrl.reserved[1]
-		);
+			".minimum=%i, .maximum=%i, .step=%i, "
+			".default_value=%i, "
+			".flags=0x%X, "
+			".reserved[]={ 0x%X, 0x%X } }\n",
+			__FILE__, __LINE__,
+			queryctrl.id,
+			queryctrl.type,
+			queryctrl.name,
+			queryctrl.minimum,
+			queryctrl.maximum,
+			queryctrl.step,
+			queryctrl.default_value,
+			queryctrl.flags,
+			queryctrl.reserved[0], queryctrl.reserved[1]
+		    );
 	}
 
 	memset(&control, 0xff, sizeof(control));
@@ -213,9 +226,9 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_EXT_CTRLS, &controls);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_EXT_CTRLS, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
-		__FILE__, __LINE__,
-		id, id-V4L2_CID_BASE, ret_get, errno_get);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_EXT_CTRLS, id=%u (V4L2_CID_BASE+%i), ret_get=%i, errno_get=%i\n",
+	     __FILE__, __LINE__, id, id - V4L2_CID_BASE, ret_get, errno_get);
 
 	if (ret_query == 0) {
 		CU_ASSERT_EQUAL(ret_query, 0);
@@ -246,7 +259,7 @@
 			CU_ASSERT_EQUAL(errno_get, EINVAL);
 			break;
 
-		case V4L2_CTRL_TYPE_INTEGER64: /* TODO: what about this case? */
+		case V4L2_CTRL_TYPE_INTEGER64:	/* TODO: what about this case? */
 		case V4L2_CTRL_TYPE_CTRL_CLASS:
 		default:
 			CU_ASSERT_EQUAL(ret_get, -1);
@@ -264,7 +277,8 @@
 	return ret_query;
 }
 
-void test_VIDIOC_G_EXT_CTRLS_one() {
+void test_VIDIOC_G_EXT_CTRLS_one()
+{
 	int ret1;
 	__u32 i;
 
@@ -272,9 +286,11 @@
 		ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, i);
 	}
 
-	ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, V4L2_CID_BASE-1);
+	ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, V4L2_CID_BASE - 1);
 	ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, V4L2_CID_LASTP1);
-	ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, V4L2_CID_PRIVATE_BASE-1);
+	ret1 =
+	    do_get_ext_control_one(V4L2_CTRL_CLASS_USER,
+				   V4L2_CID_PRIVATE_BASE - 1);
 
 	i = V4L2_CID_PRIVATE_BASE;
 	do {
@@ -285,7 +301,8 @@
 	ret1 = do_get_ext_control_one(V4L2_CTRL_CLASS_USER, i);
 }
 
-void test_VIDIOC_G_EXT_CTRLS_NULL() {
+void test_VIDIOC_G_EXT_CTRLS_NULL()
+{
 	struct v4l2_ext_controls controls;
 	int ret_get, errno_get;
 	int ret_null, errno_null;
@@ -322,7 +339,8 @@
 	}
 }
 
-void test_VIDIOC_S_EXT_CTRLS_zero() {
+void test_VIDIOC_S_EXT_CTRLS_zero()
+{
 	struct v4l2_ext_controls controls;
 	int ret_set, errno_set;
 
@@ -353,7 +371,8 @@
 	}
 }
 
-void test_VIDIOC_S_EXT_CTRLS_zero_invalid_count() {
+void test_VIDIOC_S_EXT_CTRLS_zero_invalid_count()
+{
 	struct v4l2_ext_controls controls;
 	int ret_set, errno_set;
 	int ret_set_invalid, errno_set_invalid;
@@ -368,8 +387,9 @@
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_EXT_CTRLS, &controls);
 	errno_set = errno;
 
-	dprintf("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0%x, ret_set=%i, errno_set=%i\n",
-		__FILE__, __LINE__, count, ret_set, errno_set);
+	dprintf
+	    ("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0%x, ret_set=%i, errno_set=%i\n",
+	     __FILE__, __LINE__, count, ret_set, errno_set);
 
 	count = 1;
 	/* Note: this loop also covers ((__u32)S32_MAX)+1 = 0x80000000 */
@@ -379,11 +399,14 @@
 		controls.count = count;
 		controls.controls = NULL;
 
-		ret_set_invalid = ioctl(get_video_fd(), VIDIOC_S_EXT_CTRLS, &controls);
+		ret_set_invalid =
+		    ioctl(get_video_fd(), VIDIOC_S_EXT_CTRLS, &controls);
 		errno_set_invalid = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
-			__FILE__, __LINE__, count, ret_set_invalid, errno_set_invalid);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
+		     __FILE__, __LINE__, count, ret_set_invalid,
+		     errno_set_invalid);
 
 		if (ret_set == 0) {
 			CU_ASSERT_EQUAL(ret_set, 0);
@@ -394,7 +417,8 @@
 			 * controls.count value
 			 */
 			CU_ASSERT_EQUAL(ret_set_invalid, -1);
-			CU_ASSERT(errno_set_invalid == EFAULT || errno_set_invalid == ENOMEM);
+			CU_ASSERT(errno_set_invalid == EFAULT
+				  || errno_set_invalid == ENOMEM);
 
 		} else {
 			CU_ASSERT_EQUAL(ret_set, -1);
@@ -406,7 +430,7 @@
 		count <<= 1;
 	} while (count != 0);
 
-	count = (__u32)S32_MAX;
+	count = (__u32) S32_MAX;
 	memset(&controls, 0xff, sizeof(controls));
 	controls.ctrl_class = V4L2_CTRL_CLASS_USER;
 	controls.count = count;
@@ -415,14 +439,16 @@
 	ret_set_invalid = ioctl(get_video_fd(), VIDIOC_S_EXT_CTRLS, &controls);
 	errno_set_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_set_invalid, errno_set_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_set_invalid, errno_set_invalid);
 
 	if (ret_set == 0) {
 		CU_ASSERT_EQUAL(ret_set, 0);
 
 		CU_ASSERT_EQUAL(ret_set_invalid, -1);
-		CU_ASSERT(errno_set_invalid == EFAULT || errno_set_invalid == ENOMEM);
+		CU_ASSERT(errno_set_invalid == EFAULT
+			  || errno_set_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_set, -1);
@@ -441,14 +467,16 @@
 	ret_set_invalid = ioctl(get_video_fd(), VIDIOC_S_EXT_CTRLS, &controls);
 	errno_set_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_set_invalid, errno_set_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_S_EXT_CTRLS, count=0x%x, ret_set_invalid=%i, errno_set_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_set_invalid, errno_set_invalid);
 
 	if (ret_set == 0) {
 		CU_ASSERT_EQUAL(ret_set, 0);
 
 		CU_ASSERT_EQUAL(ret_set_invalid, -1);
-		CU_ASSERT(errno_set_invalid == EFAULT || errno_set_invalid == ENOMEM);
+		CU_ASSERT(errno_set_invalid == EFAULT
+			  || errno_set_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_set, -1);
@@ -460,7 +488,8 @@
 
 }
 
-void test_VIDIOC_S_EXT_CTRLS_NULL() {
+void test_VIDIOC_S_EXT_CTRLS_NULL()
+{
 	struct v4l2_ext_controls controls;
 	int ret_set, errno_set;
 	int ret_null, errno_null;
@@ -497,7 +526,8 @@
 	}
 }
 
-void test_VIDIOC_TRY_EXT_CTRLS_zero() {
+void test_VIDIOC_TRY_EXT_CTRLS_zero()
+{
 	struct v4l2_ext_controls controls;
 	int ret_try, errno_try;
 
@@ -528,7 +558,8 @@
 	}
 }
 
-void test_VIDIOC_TRY_EXT_CTRLS_zero_invalid_count() {
+void test_VIDIOC_TRY_EXT_CTRLS_zero_invalid_count()
+{
 	struct v4l2_ext_controls controls;
 	int ret_try, errno_try;
 	int ret_try_invalid, errno_try_invalid;
@@ -543,8 +574,9 @@
 	ret_try = ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
 	errno_try = errno;
 
-	dprintf("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try=%i, errno_try=%i\n",
-		__FILE__, __LINE__, count, ret_try, errno_try);
+	dprintf
+	    ("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try=%i, errno_try=%i\n",
+	     __FILE__, __LINE__, count, ret_try, errno_try);
 
 	count = 1;
 	/* Note: this loop also covers ((__u32)S32_MAX)+1 = 0x80000000 */
@@ -554,11 +586,14 @@
 		controls.count = count;
 		controls.controls = NULL;
 
-		ret_try_invalid = ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
+		ret_try_invalid =
+		    ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
 		errno_try_invalid = errno;
 
-		dprintf("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
-			__FILE__, __LINE__, count, ret_try_invalid, errno_try_invalid);
+		dprintf
+		    ("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
+		     __FILE__, __LINE__, count, ret_try_invalid,
+		     errno_try_invalid);
 
 		if (ret_try == 0) {
 			CU_ASSERT_EQUAL(ret_try, 0);
@@ -569,7 +604,8 @@
 			 * controls.count value
 			 */
 			CU_ASSERT_EQUAL(ret_try_invalid, -1);
-			CU_ASSERT(errno_try_invalid == EFAULT || errno_try_invalid == ENOMEM);
+			CU_ASSERT(errno_try_invalid == EFAULT
+				  || errno_try_invalid == ENOMEM);
 
 		} else {
 			CU_ASSERT_EQUAL(ret_try, -1);
@@ -581,23 +617,26 @@
 		count <<= 1;
 	} while (count != 0);
 
-	count = (__u32)S32_MAX;
+	count = (__u32) S32_MAX;
 	memset(&controls, 0xff, sizeof(controls));
 	controls.ctrl_class = V4L2_CTRL_CLASS_USER;
 	controls.count = count;
 	controls.controls = NULL;
 
-	ret_try_invalid = ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
+	ret_try_invalid =
+	    ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
 	errno_try_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_try_invalid, errno_try_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_try_invalid, errno_try_invalid);
 
 	if (ret_try == 0) {
 		CU_ASSERT_EQUAL(ret_try, 0);
 
 		CU_ASSERT_EQUAL(ret_try_invalid, -1);
-		CU_ASSERT(errno_try_invalid == EFAULT || errno_try_invalid == ENOMEM);
+		CU_ASSERT(errno_try_invalid == EFAULT
+			  || errno_try_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_try, -1);
@@ -613,17 +652,20 @@
 	controls.count = count;
 	controls.controls = NULL;
 
-	ret_try_invalid = ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
+	ret_try_invalid =
+	    ioctl(get_video_fd(), VIDIOC_TRY_EXT_CTRLS, &controls);
 	errno_try_invalid = errno;
 
-	dprintf("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
-		__FILE__, __LINE__, count, ret_try_invalid, errno_try_invalid);
+	dprintf
+	    ("\t%s:%u: VIDIOC_TRY_EXT_CTRLS, count=0x%x, ret_try_invalid=%i, errno_try_invalid=%i\n",
+	     __FILE__, __LINE__, count, ret_try_invalid, errno_try_invalid);
 
 	if (ret_try == 0) {
 		CU_ASSERT_EQUAL(ret_try, 0);
 
 		CU_ASSERT_EQUAL(ret_try_invalid, -1);
-		CU_ASSERT(errno_try_invalid == EFAULT || errno_try_invalid == ENOMEM);
+		CU_ASSERT(errno_try_invalid == EFAULT
+			  || errno_try_invalid == ENOMEM);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_try, -1);
@@ -635,7 +677,8 @@
 
 }
 
-void test_VIDIOC_TRY_EXT_CTRLS_NULL() {
+void test_VIDIOC_TRY_EXT_CTRLS_NULL()
+{
 	struct v4l2_ext_controls controls;
 	int ret_try, errno_try;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FMT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FMT.c
index 596ff71..3beff07 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FMT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FMT.c
@@ -31,7 +31,8 @@
 
 #include "test_VIDIOC_FMT.h"
 
-int valid_pixelformat(__u32 pixelformat) {
+int valid_pixelformat(__u32 pixelformat)
+{
 	int valid = 0;
 
 	switch (pixelformat) {
@@ -78,7 +79,7 @@
 	case V4L2_PIX_FMT_PWC2:
 	case V4L2_PIX_FMT_ET61X251:
 
-	/* formats from Linux kernel 2.6.31-rc2 */
+		/* formats from Linux kernel 2.6.31-rc2 */
 
 #ifdef V4L2_PIX_FMT_VYUY
 	case V4L2_PIX_FMT_VYUY:
@@ -161,7 +162,8 @@
 	return valid;
 }
 
-int valid_colorspace(enum v4l2_colorspace colorspace) {
+int valid_colorspace(enum v4l2_colorspace colorspace)
+{
 	int valid = 0;
 
 	switch (colorspace) {
@@ -182,7 +184,8 @@
 	return valid;
 }
 
-static void do_get_formats(enum v4l2_buf_type type) {
+static void do_get_formats(enum v4l2_buf_type type)
+{
 	int ret_get, errno_get;
 	struct v4l2_format format;
 	struct v4l2_format format2;
@@ -201,261 +204,278 @@
 		CU_ASSERT_EQUAL(format.type, type);
 
 		switch (format.type) {
-			case V4L2_BUF_TYPE_VIDEO_CAPTURE:
-			case V4L2_BUF_TYPE_VIDEO_OUTPUT:
-				dprintf("\tformat = {.type=0x%X, .fmt.pix = { "
-					".width=%u, "
-					".height=%u, "
-					".pixelformat=0x%X, "
-					".field=%i, "
-					".bytesperline=%i, "
-					".sizeimage=%u, "
-					".colorspace=%i, "
-					".priv=0x%X "
-					" } }\n",
-					format.type,
-					format.fmt.pix.width,
-					format.fmt.pix.height,
-					format.fmt.pix.pixelformat,
-					format.fmt.pix.field,
-					format.fmt.pix.bytesperline,
-					format.fmt.pix.sizeimage,
-					format.fmt.pix.colorspace,
-					format.fmt.pix.priv
-				);
-				if (sizeof(format.fmt.pix) < sizeof(format.fmt.raw_data)) {
-					dprintf1("\tformat = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format.fmt.pix); j < sizeof(format.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format.fmt.raw_data[j]);
-					}
-					dprintf1(" }}\n");
+		case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+		case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+			dprintf("\tformat = {.type=0x%X, .fmt.pix = { "
+				".width=%u, "
+				".height=%u, "
+				".pixelformat=0x%X, "
+				".field=%i, "
+				".bytesperline=%i, "
+				".sizeimage=%u, "
+				".colorspace=%i, "
+				".priv=0x%X "
+				" } }\n",
+				format.type,
+				format.fmt.pix.width,
+				format.fmt.pix.height,
+				format.fmt.pix.pixelformat,
+				format.fmt.pix.field,
+				format.fmt.pix.bytesperline,
+				format.fmt.pix.sizeimage,
+				format.fmt.pix.colorspace, format.fmt.pix.priv);
+			if (sizeof(format.fmt.pix) <
+			    sizeof(format.fmt.raw_data)) {
+				dprintf1
+				    ("\tformat = { ..., .fmt.raw_data[] = { ...");
+				for (j = sizeof(format.fmt.pix);
+				     j < sizeof(format.fmt.raw_data); j++) {
+					dprintf(", 0x%x",
+						format.fmt.raw_data[j]);
 				}
+				dprintf1(" }}\n");
+			}
 
-				/* TODO: check different fields */
-				//CU_ASSERT_EQUAL(format.fmt.pix.width, ???);
-				//CU_ASSERT_EQUAL(format.fmt.pix.height, ???);
-				//CU_ASSERT_EQUAL(format.fmt.pix.pixelformat, ???);
-				CU_ASSERT(valid_pixelformat(format.fmt.pix.pixelformat));
+			/* TODO: check different fields */
+			//CU_ASSERT_EQUAL(format.fmt.pix.width, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.height, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.pixelformat, ???);
+			CU_ASSERT(valid_pixelformat
+				  (format.fmt.pix.pixelformat));
 
-				//CU_ASSERT_EQUAL(format.fmt.pix.field, ???);
-				//CU_ASSERT_EQUAL(format.fmt.pix.bytesperline, ???);
-				//CU_ASSERT_EQUAL(format.fmt.pix.sizeimage, ???);
-				//CU_ASSERT_EQUAL(format.fmt.pix.colorspace, ???);
-				CU_ASSERT(valid_colorspace(format.fmt.pix.colorspace));
-				//CU_ASSERT_EQUAL(format.fmt.pix.priv, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.field, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.bytesperline, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.sizeimage, ???);
+			//CU_ASSERT_EQUAL(format.fmt.pix.colorspace, ???);
+			CU_ASSERT(valid_colorspace(format.fmt.pix.colorspace));
+			//CU_ASSERT_EQUAL(format.fmt.pix.priv, ???);
 
-				/* Check whether the remaining bytes of rawdata is set to zero */
-				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format.fmt.raw_data+sizeof(format.fmt.pix),
-					       format2.fmt.raw_data+sizeof(format2.fmt.pix),
-					       sizeof(format.fmt.raw_data)-sizeof(format.fmt.pix)),
-					       0
-					);
-				break;
+			/* Check whether the remaining bytes of rawdata is set to zero */
+			memset(&format2, 0, sizeof(format2));
+			CU_ASSERT_EQUAL(memcmp
+					(format.fmt.raw_data +
+					 sizeof(format.fmt.pix),
+					 format2.fmt.raw_data +
+					 sizeof(format2.fmt.pix),
+					 sizeof(format.fmt.raw_data) -
+					 sizeof(format.fmt.pix)), 0);
+			break;
 
-			case V4L2_BUF_TYPE_VIDEO_OVERLAY:
-			case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
-				dprintf("\tformat = {.type=0x%X, .fmt.win={ "
-					".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
-					".field = %i, "
-					".chromakey = 0x%X, "
-					".clips = %p, "
-					".clipcount = %u, "
-					".bitmap = %p, "
-					".global_alpha = %u "
-					"} }\n",
-					format.type,
-					format.fmt.win.w.left,
-					format.fmt.win.w.top,
-					format.fmt.win.w.width,
-					format.fmt.win.w.height,
-					format.fmt.win.field,
-					format.fmt.win.chromakey,
-					format.fmt.win.clips,
-					format.fmt.win.clipcount,
-					format.fmt.win.bitmap,
-					format.fmt.win.global_alpha
-				);
-				if (sizeof(format.fmt.win) < sizeof(format.fmt.raw_data)) {
-					dprintf1("\tformat = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format.fmt.win); j < sizeof(format.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format.fmt.raw_data[j]);
-					}
-					dprintf1(" }}\n");
+		case V4L2_BUF_TYPE_VIDEO_OVERLAY:
+		case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+			dprintf("\tformat = {.type=0x%X, .fmt.win={ "
+				".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
+				".field = %i, "
+				".chromakey = 0x%X, "
+				".clips = %p, "
+				".clipcount = %u, "
+				".bitmap = %p, "
+				".global_alpha = %u "
+				"} }\n",
+				format.type,
+				format.fmt.win.w.left,
+				format.fmt.win.w.top,
+				format.fmt.win.w.width,
+				format.fmt.win.w.height,
+				format.fmt.win.field,
+				format.fmt.win.chromakey,
+				format.fmt.win.clips,
+				format.fmt.win.clipcount,
+				format.fmt.win.bitmap,
+				format.fmt.win.global_alpha);
+			if (sizeof(format.fmt.win) <
+			    sizeof(format.fmt.raw_data)) {
+				dprintf1
+				    ("\tformat = { ..., .fmt.raw_data[] = { ...");
+				for (j = sizeof(format.fmt.win);
+				     j < sizeof(format.fmt.raw_data); j++) {
+					dprintf(", 0x%x",
+						format.fmt.raw_data[j]);
 				}
+				dprintf1(" }}\n");
+			}
 
-				/* TODO: check different fields */
-				//CU_ASSERT_EQUAL(format.fmt.win.w.left, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.w.top, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.w.width, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.w.height, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.field, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.chromakey, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.clips, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.clipcount, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.bitmap, ???);
-				//CU_ASSERT_EQUAL(format.fmt.win.global_alpha ???);
+			/* TODO: check different fields */
+			//CU_ASSERT_EQUAL(format.fmt.win.w.left, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.w.top, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.w.width, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.w.height, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.field, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.chromakey, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.clips, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.clipcount, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.bitmap, ???);
+			//CU_ASSERT_EQUAL(format.fmt.win.global_alpha ???);
 
-				/* Check whether the remaining bytes of raw_data is set to zero */
-				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format.fmt.raw_data+sizeof(format.fmt.win),
-					       format2.fmt.raw_data+sizeof(format2.fmt.win),
-					       sizeof(format.fmt.raw_data)-sizeof(format.fmt.win)),
-					       0
-					);
-				break;
+			/* Check whether the remaining bytes of raw_data is set to zero */
+			memset(&format2, 0, sizeof(format2));
+			CU_ASSERT_EQUAL(memcmp
+					(format.fmt.raw_data +
+					 sizeof(format.fmt.win),
+					 format2.fmt.raw_data +
+					 sizeof(format2.fmt.win),
+					 sizeof(format.fmt.raw_data) -
+					 sizeof(format.fmt.win)), 0);
+			break;
 
-			case V4L2_BUF_TYPE_VBI_CAPTURE:
-			case V4L2_BUF_TYPE_VBI_OUTPUT:
-				dprintf("\tformat = {.type=0x%X, .fmt.vbi={ "
-					".sampling_rate=%u, "
-					".offset=%u, "
-					".samples_per_line=%u "
-					".sample_format=0x%X "
-					".start = { %u, %u }, "
-					".count = { %u, %u }, "
-					".flags = 0x%X, "
-					".reserved = { 0x%X, 0x%X } "
-					"} }\n",
-					format.type,
-					format.fmt.vbi.sampling_rate,
-					format.fmt.vbi.offset,
-					format.fmt.vbi.samples_per_line,
-					format.fmt.vbi.sample_format,
-					format.fmt.vbi.start[0],
-					format.fmt.vbi.start[1],
-					format.fmt.vbi.count[0],
-					format.fmt.vbi.count[1],
-					format.fmt.vbi.flags,
-					format.fmt.vbi.reserved[0],
-					format.fmt.vbi.reserved[1]
-				);
-				if (sizeof(format.fmt.vbi) < sizeof(format.fmt.raw_data)) {
-					dprintf1("\tformat = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format.fmt.vbi); j < sizeof(format.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format.fmt.raw_data[j]);
-					}
-					dprintf1(" }}\n");
+		case V4L2_BUF_TYPE_VBI_CAPTURE:
+		case V4L2_BUF_TYPE_VBI_OUTPUT:
+			dprintf("\tformat = {.type=0x%X, .fmt.vbi={ "
+				".sampling_rate=%u, "
+				".offset=%u, "
+				".samples_per_line=%u "
+				".sample_format=0x%X "
+				".start = { %u, %u }, "
+				".count = { %u, %u }, "
+				".flags = 0x%X, "
+				".reserved = { 0x%X, 0x%X } "
+				"} }\n",
+				format.type,
+				format.fmt.vbi.sampling_rate,
+				format.fmt.vbi.offset,
+				format.fmt.vbi.samples_per_line,
+				format.fmt.vbi.sample_format,
+				format.fmt.vbi.start[0],
+				format.fmt.vbi.start[1],
+				format.fmt.vbi.count[0],
+				format.fmt.vbi.count[1],
+				format.fmt.vbi.flags,
+				format.fmt.vbi.reserved[0],
+				format.fmt.vbi.reserved[1]
+			    );
+			if (sizeof(format.fmt.vbi) <
+			    sizeof(format.fmt.raw_data)) {
+				dprintf1
+				    ("\tformat = { ..., .fmt.raw_data[] = { ...");
+				for (j = sizeof(format.fmt.vbi);
+				     j < sizeof(format.fmt.raw_data); j++) {
+					dprintf(", 0x%x",
+						format.fmt.raw_data[j]);
 				}
+				dprintf1(" }}\n");
+			}
 
-				/* TODO: check different fields */
-				//CU_ASSERT_EQUAL(format.fmt.vbi.sampling_rate, ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.offset, ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.samples_per_line, ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.sample_format, ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.start[0], ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.start[1], ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.count[0], ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.count[1], ???);
-				//CU_ASSERT_EQUAL(format.fmt.vbi.flags, ???);
-				CU_ASSERT_EQUAL(format.fmt.vbi.reserved[0], 0);
-				CU_ASSERT_EQUAL(format.fmt.vbi.reserved[1], 0);
+			/* TODO: check different fields */
+			//CU_ASSERT_EQUAL(format.fmt.vbi.sampling_rate, ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.offset, ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.samples_per_line, ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.sample_format, ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.start[0], ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.start[1], ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.count[0], ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.count[1], ???);
+			//CU_ASSERT_EQUAL(format.fmt.vbi.flags, ???);
+			CU_ASSERT_EQUAL(format.fmt.vbi.reserved[0], 0);
+			CU_ASSERT_EQUAL(format.fmt.vbi.reserved[1], 0);
 
-				/* Check whether the remaining bytes of raw_data is set to zero */
-				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format.fmt.raw_data+sizeof(format.fmt.vbi),
-					       format2.fmt.raw_data+sizeof(format2.fmt.vbi),
-					       sizeof(format.fmt.raw_data)-sizeof(format.fmt.vbi)),
-					       0
-					);
-				break;
+			/* Check whether the remaining bytes of raw_data is set to zero */
+			memset(&format2, 0, sizeof(format2));
+			CU_ASSERT_EQUAL(memcmp
+					(format.fmt.raw_data +
+					 sizeof(format.fmt.vbi),
+					 format2.fmt.raw_data +
+					 sizeof(format2.fmt.vbi),
+					 sizeof(format.fmt.raw_data) -
+					 sizeof(format.fmt.vbi)), 0);
+			break;
 
-			case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
-			case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
-				dprintf("\tformat = {.type=0x%X, "
-					".fmt.sliced = { .service_set = 0x%X, "
-					".service_lines = { ... }, "
-					".io_size = %u, "
-					".reserved[0] = 0x%X, "
-					".reserved[1] = 0x%X "
-					"} }\n",
-					format.type,
-					format.fmt.sliced.service_set,
-					//format.fmt.sliced.service_lines[][],
-					format.fmt.sliced.io_size,
-					format.fmt.sliced.reserved[0],
-					format.fmt.sliced.reserved[1]
-				);
-				if (sizeof(format.fmt.sliced) < sizeof(format.fmt.raw_data)) {
-					dprintf1("\tformat = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format.fmt.sliced); j < sizeof(format.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format.fmt.raw_data[j]);
-					}
-					dprintf1(" }}\n");
+		case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
+		case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
+			dprintf("\tformat = {.type=0x%X, "
+				".fmt.sliced = { .service_set = 0x%X, "
+				".service_lines = { ... }, "
+				".io_size = %u, "
+				".reserved[0] = 0x%X, "
+				".reserved[1] = 0x%X "
+				"} }\n",
+				format.type, format.fmt.sliced.service_set,
+				//format.fmt.sliced.service_lines[][],
+				format.fmt.sliced.io_size,
+				format.fmt.sliced.reserved[0],
+				format.fmt.sliced.reserved[1]
+			    );
+			if (sizeof(format.fmt.sliced) <
+			    sizeof(format.fmt.raw_data)) {
+				dprintf1
+				    ("\tformat = { ..., .fmt.raw_data[] = { ...");
+				for (j = sizeof(format.fmt.sliced);
+				     j < sizeof(format.fmt.raw_data); j++) {
+					dprintf(", 0x%x",
+						format.fmt.raw_data[j]);
 				}
+				dprintf1(" }}\n");
+			}
 
-				/* TODO: check different fields */
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_set, ???);
-				CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][0], 0);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][1], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][2], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][3], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][4], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][5], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][6], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][7], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][8], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][9], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][10], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][11], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][12], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][13], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][14], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][15], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][16], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][17], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][18], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][19], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][20], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][21], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][22], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][23], ???);
-				CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][0], 0);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][1], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][2], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][3], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][4], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][5], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][6], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][7], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][8], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][9], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][10], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][11], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][12], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][13], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][14], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][15], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][16], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][17], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][18], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][19], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][20], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][21], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][22], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][23], ???);
-				//CU_ASSERT_EQUAL(format.fmt.sliced.io_size, ???);
-				CU_ASSERT_EQUAL(format.fmt.sliced.reserved[0], 0);
-				CU_ASSERT_EQUAL(format.fmt.sliced.reserved[1], 0);
+			/* TODO: check different fields */
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_set, ???);
+			CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][0],
+					0);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][1], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][2], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][3], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][4], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][5], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][6], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][7], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][8], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][9], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][10], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][11], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][12], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][13], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][14], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][15], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][16], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][17], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][18], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][19], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][20], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][21], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][22], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[0][23], ???);
+			CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][0],
+					0);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][1], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][2], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][3], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][4], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][5], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][6], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][7], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][8], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][9], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][10], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][11], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][12], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][13], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][14], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][15], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][16], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][17], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][18], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][19], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][20], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][21], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][22], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.service_lines[1][23], ???);
+			//CU_ASSERT_EQUAL(format.fmt.sliced.io_size, ???);
+			CU_ASSERT_EQUAL(format.fmt.sliced.reserved[0], 0);
+			CU_ASSERT_EQUAL(format.fmt.sliced.reserved[1], 0);
 
-				/* Check whether the remaining bytes of raw_data is set to zero */
-				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format.fmt.raw_data+sizeof(format.fmt.sliced),
-					       format2.fmt.raw_data+sizeof(format2.fmt.sliced),
-					       sizeof(format.fmt.raw_data)-sizeof(format.fmt.sliced)),
-					       0
-					);
-				break;
+			/* Check whether the remaining bytes of raw_data is set to zero */
+			memset(&format2, 0, sizeof(format2));
+			CU_ASSERT_EQUAL(memcmp
+					(format.fmt.raw_data +
+					 sizeof(format.fmt.sliced),
+					 format2.fmt.raw_data +
+					 sizeof(format2.fmt.sliced),
+					 sizeof(format.fmt.raw_data) -
+					 sizeof(format.fmt.sliced)), 0);
+			break;
 
-			case V4L2_BUF_TYPE_PRIVATE:
-				dprintf("\tformat = {.type=0x%X, ... }\n",
-					format.type
-				);
-				/* TODO: check different fields */
+		case V4L2_BUF_TYPE_PRIVATE:
+			dprintf("\tformat = {.type=0x%X, ... }\n", format.type);
+			/* TODO: check different fields */
 		}
 
 	} else {
@@ -470,7 +490,8 @@
 
 }
 
-void test_VIDIOC_G_FMT() {
+void test_VIDIOC_G_FMT()
+{
 	do_get_formats(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_get_formats(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_get_formats(V4L2_BUF_TYPE_VIDEO_OVERLAY);
@@ -482,7 +503,8 @@
 	do_get_formats(V4L2_BUF_TYPE_PRIVATE);
 }
 
-static void do_get_format_invalid(enum v4l2_buf_type type) {
+static void do_get_format_invalid(enum v4l2_buf_type type)
+{
 	int ret_get, errno_get;
 	struct v4l2_format format;
 	struct v4l2_format format2;
@@ -504,7 +526,8 @@
 	CU_ASSERT_EQUAL(memcmp(&format, &format2, sizeof(format)), 0);
 }
 
-void test_VIDIOC_G_FMT_invalid_type() {
+void test_VIDIOC_G_FMT_invalid_type()
+{
 	int i;
 
 	/* In this test case the .index is valid (0) and only the .type
@@ -521,7 +544,8 @@
 	do_get_format_invalid(-1);
 
 	/* test invalid .type= 8..0x7F */
-	for (i = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY+1; i < V4L2_BUF_TYPE_PRIVATE; i++) {
+	for (i = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + 1;
+	     i < V4L2_BUF_TYPE_PRIVATE; i++) {
 		do_get_format_invalid(i);
 	}
 
@@ -535,7 +559,8 @@
 
 }
 
-void test_VIDIOC_G_FMT_NULL() {
+void test_VIDIOC_G_FMT_NULL()
+{
 	int ret_capture, errno_capture;
 	int ret_output, errno_output;
 	int ret_video_overlay, errno_video_overlay;
@@ -555,8 +580,9 @@
 	ret_capture = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_capture=%i, errno_capture=%i\n",
-		__FILE__, __LINE__, type, ret_capture, errno_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_capture=%i, errno_capture=%i\n",
+	     __FILE__, __LINE__, type, ret_capture, errno_capture);
 
 	type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
 	memset(&format, 0xff, sizeof(format));
@@ -564,8 +590,9 @@
 	ret_output = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_output=%i, errno_output=%i\n",
-		__FILE__, __LINE__, type, ret_output, errno_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_output=%i, errno_output=%i\n",
+	     __FILE__, __LINE__, type, ret_output, errno_output);
 
 	type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
 	memset(&format, 0xff, sizeof(format));
@@ -573,8 +600,9 @@
 	ret_video_overlay = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_video_overlay = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_video_overlay=%i, errno_video_overlay=%i\n",
-		__FILE__, __LINE__, type, ret_video_overlay, errno_video_overlay);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_video_overlay=%i, errno_video_overlay=%i\n",
+	     __FILE__, __LINE__, type, ret_video_overlay, errno_video_overlay);
 
 	type = V4L2_BUF_TYPE_VBI_CAPTURE;
 	memset(&format, 0xff, sizeof(format));
@@ -582,8 +610,9 @@
 	ret_vbi_capture = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_vbi_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_vbi_capture=%i, errno_vbi_capture=%i\n",
-		__FILE__, __LINE__, type, ret_vbi_capture, errno_vbi_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_vbi_capture=%i, errno_vbi_capture=%i\n",
+	     __FILE__, __LINE__, type, ret_vbi_capture, errno_vbi_capture);
 
 	type = V4L2_BUF_TYPE_VBI_OUTPUT;
 	memset(&format, 0xff, sizeof(format));
@@ -591,8 +620,9 @@
 	ret_vbi_output = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_vbi_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_vbi_output=%i, errno_vbi_output=%i\n",
-		__FILE__, __LINE__, type, ret_vbi_output, errno_vbi_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_vbi_output=%i, errno_vbi_output=%i\n",
+	     __FILE__, __LINE__, type, ret_vbi_output, errno_vbi_output);
 
 	type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
 	memset(&format, 0xff, sizeof(format));
@@ -600,8 +630,10 @@
 	ret_sliced_vbi_capture = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_sliced_vbi_capture = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_sliced_vbi_capture=%i, errno_sliced_vbi_capture=%i\n",
-		__FILE__, __LINE__, type, ret_sliced_vbi_capture, errno_sliced_vbi_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_sliced_vbi_capture=%i, errno_sliced_vbi_capture=%i\n",
+	     __FILE__, __LINE__, type, ret_sliced_vbi_capture,
+	     errno_sliced_vbi_capture);
 
 	type = V4L2_BUF_TYPE_SLICED_VBI_OUTPUT;
 	memset(&format, 0xff, sizeof(format));
@@ -609,8 +641,10 @@
 	ret_sliced_vbi_output = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_sliced_vbi_output = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_sliced_vbi_output=%i, errno_sliced_vbi_output=%i\n",
-		__FILE__, __LINE__, type, ret_sliced_vbi_output, errno_sliced_vbi_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_sliced_vbi_output=%i, errno_sliced_vbi_output=%i\n",
+	     __FILE__, __LINE__, type, ret_sliced_vbi_output,
+	     errno_sliced_vbi_output);
 
 	type = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY;
 	memset(&format, 0xff, sizeof(format));
@@ -618,8 +652,10 @@
 	ret_video_output_overlay = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_video_output_overlay = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_video_output_overlay=%i, errno_video_output_overlay=%i\n",
-		__FILE__, __LINE__, type, ret_video_output_overlay, errno_video_output_overlay);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_video_output_overlay=%i, errno_video_output_overlay=%i\n",
+	     __FILE__, __LINE__, type, ret_video_output_overlay,
+	     errno_video_output_overlay);
 
 	type = V4L2_BUF_TYPE_PRIVATE;
 	memset(&format, 0xff, sizeof(format));
@@ -627,8 +663,9 @@
 	ret_private = ioctl(get_video_fd(), VIDIOC_G_FMT, &format);
 	errno_private = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_private=%i, errno_private=%i\n",
-		__FILE__, __LINE__, type, ret_private, errno_private);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FMT, type=%i, ret_private=%i, errno_private=%i\n",
+	     __FILE__, __LINE__, type, ret_private, errno_private);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_G_FMT, NULL);
 	errno_null = errno;
@@ -668,7 +705,8 @@
 
 }
 
-static void do_set_formats_enum(enum v4l2_buf_type type) {
+static void do_set_formats_enum(enum v4l2_buf_type type)
+{
 	int ret_get, errno_get;
 	int ret_enum, errno_enum;
 	int ret_max, errno_max;
@@ -701,8 +739,9 @@
 		ret_enum = ioctl(get_video_fd(), VIDIOC_ENUM_FMT, &fmtdesc);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
-			__FILE__, __LINE__, i, type, ret_enum, errno_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUM_FMT, index=%u, type=%i, ret_enum=%i, errno_enum=%i\n",
+		     __FILE__, __LINE__, i, type, ret_enum, errno_enum);
 
 		switch (type) {
 		case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -712,62 +751,72 @@
 			format_max.fmt.pix.pixelformat = fmtdesc.pixelformat;
 			format_max.fmt.pix.field = V4L2_FIELD_ANY;
 
-			ret_max = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
+			ret_max =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
 			errno_max = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
-				__FILE__, __LINE__, type, ret_max, errno_max);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
+			     __FILE__, __LINE__, type, ret_max, errno_max);
 
 			if (ret_max == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
 
-				dprintf("\tformat_max = {.type=0x%X, .fmt.pix = { "
-					".width=%u, "
-					".height=%u, "
-					".pixelformat=0x%X, "
-					".field=%i, "
-					".bytesperline=%i, "
-					".sizeimage=%u, "
-					".colorspace=%i, "
-					".priv=0x%X "
-					"} }\n",
-					format_max.type,
-					format_max.fmt.pix.width,
-					format_max.fmt.pix.height,
-					format_max.fmt.pix.pixelformat,
-					format_max.fmt.pix.field,
-					format_max.fmt.pix.bytesperline,
-					format_max.fmt.pix.sizeimage,
-					format_max.fmt.pix.colorspace,
-					format_max.fmt.pix.priv
-				);
-				if (sizeof(format_max.fmt.pix) < sizeof(format_max.fmt.raw_data)) {
-					dprintf1("\tformat_max = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_max.fmt.pix); j < sizeof(format_max.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_max.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_max = {.type=0x%X, .fmt.pix = { "
+				     ".width=%u, " ".height=%u, "
+				     ".pixelformat=0x%X, " ".field=%i, "
+				     ".bytesperline=%i, " ".sizeimage=%u, "
+				     ".colorspace=%i, " ".priv=0x%X " "} }\n",
+				     format_max.type, format_max.fmt.pix.width,
+				     format_max.fmt.pix.height,
+				     format_max.fmt.pix.pixelformat,
+				     format_max.fmt.pix.field,
+				     format_max.fmt.pix.bytesperline,
+				     format_max.fmt.pix.sizeimage,
+				     format_max.fmt.pix.colorspace,
+				     format_max.fmt.pix.priv);
+				if (sizeof(format_max.fmt.pix) <
+				    sizeof(format_max.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_max = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_max.fmt.pix);
+					     j <
+					     sizeof(format_max.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_max.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
 
 				CU_ASSERT_EQUAL(ret_max, 0);
-				CU_ASSERT(valid_pixelformat(format_max.fmt.pix.pixelformat));
-				CU_ASSERT_EQUAL(format_max.fmt.pix.pixelformat, fmtdesc.pixelformat);
+				CU_ASSERT(valid_pixelformat
+					  (format_max.fmt.pix.pixelformat));
+				CU_ASSERT_EQUAL(format_max.fmt.pix.pixelformat,
+						fmtdesc.pixelformat);
 				CU_ASSERT(0 < format_max.fmt.pix.width);
 				CU_ASSERT(0 < format_max.fmt.pix.height);
-				CU_ASSERT_NOT_EQUAL(format_max.fmt.pix.field, V4L2_FIELD_ANY);
+				CU_ASSERT_NOT_EQUAL(format_max.fmt.pix.field,
+						    V4L2_FIELD_ANY);
 				CU_ASSERT(0 < format_max.fmt.pix.bytesperline);
 				CU_ASSERT(0 < format_max.fmt.pix.sizeimage);
-				CU_ASSERT(valid_colorspace(format_max.fmt.pix.colorspace));
+				CU_ASSERT(valid_colorspace
+					  (format_max.fmt.pix.colorspace));
 				//CU_ASSERT_EQUAL(format_max.fmt.pix.priv, ???);
 
 				/* Check whether the remaining bytes of rawdata is set to zero */
 				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format_max.fmt.raw_data+sizeof(format_max.fmt.pix),
-					       format2.fmt.raw_data+sizeof(format2.fmt.pix),
-					       sizeof(format_max.fmt.raw_data)-sizeof(format_max.fmt.pix)),
-					       0
-					);
+				CU_ASSERT_EQUAL(memcmp
+						(format_max.fmt.raw_data +
+						 sizeof(format_max.fmt.pix),
+						 format2.fmt.raw_data +
+						 sizeof(format2.fmt.pix),
+						 sizeof(format_max.fmt.
+							raw_data) -
+						 sizeof(format_max.fmt.pix)),
+						0);
 
 			} else {
 				CU_ASSERT_EQUAL(ret_max, -1);
@@ -779,79 +828,94 @@
 			format_min.fmt.pix.pixelformat = fmtdesc.pixelformat;
 			format_min.fmt.pix.field = V4L2_FIELD_ANY;
 
-			ret_min = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
+			ret_min =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
 			errno_min = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
-				__FILE__, __LINE__, type, ret_min, errno_min);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
+			     __FILE__, __LINE__, type, ret_min, errno_min);
 
 			if (ret_min == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
 
-				dprintf("\tformat_min = {.type=0x%X, .fmt.pix = { "
-					".width=%u, "
-					".height=%u, "
-					".pixelformat=0x%X, "
-					".field=%i, "
-					".bytesperline=%i, "
-					".sizeimage=%u, "
-					".colorspace=%i, "
-					".priv=0x%X "
-					"} }\n",
-					format_min.type,
-					format_min.fmt.pix.width,
-					format_min.fmt.pix.height,
-					format_min.fmt.pix.pixelformat,
-					format_min.fmt.pix.field,
-					format_min.fmt.pix.bytesperline,
-					format_min.fmt.pix.sizeimage,
-					format_min.fmt.pix.colorspace,
-					format_min.fmt.pix.priv
-				);
-				if (sizeof(format_min.fmt.pix) < sizeof(format_min.fmt.raw_data)) {
-					dprintf1("\tformat_min = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_min.fmt.pix); j < sizeof(format_min.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_min.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_min = {.type=0x%X, .fmt.pix = { "
+				     ".width=%u, " ".height=%u, "
+				     ".pixelformat=0x%X, " ".field=%i, "
+				     ".bytesperline=%i, " ".sizeimage=%u, "
+				     ".colorspace=%i, " ".priv=0x%X " "} }\n",
+				     format_min.type, format_min.fmt.pix.width,
+				     format_min.fmt.pix.height,
+				     format_min.fmt.pix.pixelformat,
+				     format_min.fmt.pix.field,
+				     format_min.fmt.pix.bytesperline,
+				     format_min.fmt.pix.sizeimage,
+				     format_min.fmt.pix.colorspace,
+				     format_min.fmt.pix.priv);
+				if (sizeof(format_min.fmt.pix) <
+				    sizeof(format_min.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_min = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_min.fmt.pix);
+					     j <
+					     sizeof(format_min.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_min.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
 
 				CU_ASSERT_EQUAL(ret_min, 0);
-				CU_ASSERT(valid_pixelformat(format_min.fmt.pix.pixelformat));
-				CU_ASSERT_EQUAL(format_min.fmt.pix.pixelformat, fmtdesc.pixelformat);
+				CU_ASSERT(valid_pixelformat
+					  (format_min.fmt.pix.pixelformat));
+				CU_ASSERT_EQUAL(format_min.fmt.pix.pixelformat,
+						fmtdesc.pixelformat);
 				CU_ASSERT(0 < format_min.fmt.pix.width);
 				CU_ASSERT(0 < format_min.fmt.pix.height);
-				CU_ASSERT_NOT_EQUAL(format_min.fmt.pix.field, V4L2_FIELD_ANY);
+				CU_ASSERT_NOT_EQUAL(format_min.fmt.pix.field,
+						    V4L2_FIELD_ANY);
 				CU_ASSERT(0 < format_min.fmt.pix.bytesperline);
 				CU_ASSERT(0 < format_min.fmt.pix.sizeimage);
-				CU_ASSERT(valid_colorspace(format_min.fmt.pix.colorspace));
+				CU_ASSERT(valid_colorspace
+					  (format_min.fmt.pix.colorspace));
 				//CU_ASSERT_EQUAL(format_min.fmt.pix.priv, ???);
 
 				/* Check whether the remaining bytes of rawdata is set to zero */
 				memset(&format2, 0, sizeof(format2));
-				CU_ASSERT_EQUAL(
-					memcmp(format_min.fmt.raw_data+sizeof(format_min.fmt.pix),
-					       format2.fmt.raw_data+sizeof(format2.fmt.pix),
-					       sizeof(format_min.fmt.raw_data)-sizeof(format_min.fmt.pix)),
-					       0
-					);
+				CU_ASSERT_EQUAL(memcmp
+						(format_min.fmt.raw_data +
+						 sizeof(format_min.fmt.pix),
+						 format2.fmt.raw_data +
+						 sizeof(format2.fmt.pix),
+						 sizeof(format_min.fmt.
+							raw_data) -
+						 sizeof(format_min.fmt.pix)),
+						0);
 			} else {
 				CU_ASSERT_EQUAL(ret_min, -1);
 				CU_ASSERT_EQUAL(errno_min, EINVAL);
 			}
 
 			if (ret_max == 0 && ret_min == 0) {
-				CU_ASSERT(format_min.fmt.pix.width <= format_max.fmt.pix.width);
-				CU_ASSERT(format_min.fmt.pix.height <= format_max.fmt.pix.height);
-				CU_ASSERT_EQUAL(format_min.fmt.pix.colorspace, format_max.fmt.pix.colorspace);
+				CU_ASSERT(format_min.fmt.pix.width <=
+					  format_max.fmt.pix.width);
+				CU_ASSERT(format_min.fmt.pix.height <=
+					  format_max.fmt.pix.height);
+				CU_ASSERT_EQUAL(format_min.fmt.pix.colorspace,
+						format_max.fmt.pix.colorspace);
 
 				/* If priv equals zero then this field is not used and shall
 				 * be set to zero each case. Otherwise it can have any driver
 				 * specific value which cannot be checked here.
 				 */
 				if (format_min.fmt.pix.priv == 0) {
-					CU_ASSERT_EQUAL(format_min.fmt.pix.priv, 0);
-					CU_ASSERT_EQUAL(format_max.fmt.pix.priv, 0);
+					CU_ASSERT_EQUAL(format_min.fmt.pix.priv,
+							0);
+					CU_ASSERT_EQUAL(format_max.fmt.pix.priv,
+							0);
 				}
 			}
 
@@ -867,40 +931,45 @@
 			memset(&format_max, 0xff, sizeof(format_max));
 			format_max.type = type;
 
-			ret_max = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
+			ret_max =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
 			errno_max = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
-				__FILE__, __LINE__, type, ret_max, errno_max);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
+			     __FILE__, __LINE__, type, ret_max, errno_max);
 
 			if (ret_max == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
 
-				dprintf("\tformat_max = {.type=0x%X, .fmt.win={ "
-					".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
-					".field = %i, "
-					".chromakey = 0x%X, "
-					".clips = %p, "
-					".clipcount = %u, "
-					".bitmap = %p, "
-					".global_alpha = %u "
-					"} }\n",
-					format_max.type,
-					format_max.fmt.win.w.left,
-					format_max.fmt.win.w.top,
-					format_max.fmt.win.w.width,
-					format_max.fmt.win.w.height,
-					format_max.fmt.win.field,
-					format_max.fmt.win.chromakey,
-					format_max.fmt.win.clips,
-					format_max.fmt.win.clipcount,
-					format_max.fmt.win.bitmap,
-					format_max.fmt.win.global_alpha
-				);
-				if (sizeof(format_max.fmt.win) < sizeof(format_max.fmt.raw_data)) {
-					dprintf1("\tformat_max = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_max.fmt.win); j < sizeof(format_max.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_max.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_max = {.type=0x%X, .fmt.win={ "
+				     ".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
+				     ".field = %i, " ".chromakey = 0x%X, "
+				     ".clips = %p, " ".clipcount = %u, "
+				     ".bitmap = %p, " ".global_alpha = %u "
+				     "} }\n", format_max.type,
+				     format_max.fmt.win.w.left,
+				     format_max.fmt.win.w.top,
+				     format_max.fmt.win.w.width,
+				     format_max.fmt.win.w.height,
+				     format_max.fmt.win.field,
+				     format_max.fmt.win.chromakey,
+				     format_max.fmt.win.clips,
+				     format_max.fmt.win.clipcount,
+				     format_max.fmt.win.bitmap,
+				     format_max.fmt.win.global_alpha);
+				if (sizeof(format_max.fmt.win) <
+				    sizeof(format_max.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_max = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_max.fmt.win);
+					     j <
+					     sizeof(format_max.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_max.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
@@ -925,39 +994,44 @@
 			format_min.type = type;
 			format_min.fmt.pix.pixelformat = fmtdesc.pixelformat;
 
-			ret_min = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
+			ret_min =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
 			errno_min = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
-				__FILE__, __LINE__, type, ret_min, errno_min);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
+			     __FILE__, __LINE__, type, ret_min, errno_min);
 
 			if (ret_min == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
-				dprintf("\tformat_min = {.type=0x%X, .fmt.win={ "
-					".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
-					".field = %i, "
-					".chromakey = 0x%X, "
-					".clips = %p, "
-					".clipcount = %u, "
-					".bitmap = %p, "
-					".global_alpha = %u "
-					"} }\n",
-					format_min.type,
-					format_min.fmt.win.w.left,
-					format_min.fmt.win.w.top,
-					format_min.fmt.win.w.width,
-					format_min.fmt.win.w.height,
-					format_min.fmt.win.field,
-					format_min.fmt.win.chromakey,
-					format_min.fmt.win.clips,
-					format_min.fmt.win.clipcount,
-					format_min.fmt.win.bitmap,
-					format_min.fmt.win.global_alpha
-				);
-				if (sizeof(format_min.fmt.win) < sizeof(format_min.fmt.raw_data)) {
-					dprintf1("\tformat_min = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_min.fmt.win); j < sizeof(format_min.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_min.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_min = {.type=0x%X, .fmt.win={ "
+				     ".w = { .left=%i, .top=%i, .width=%i, .height=%i, }, "
+				     ".field = %i, " ".chromakey = 0x%X, "
+				     ".clips = %p, " ".clipcount = %u, "
+				     ".bitmap = %p, " ".global_alpha = %u "
+				     "} }\n", format_min.type,
+				     format_min.fmt.win.w.left,
+				     format_min.fmt.win.w.top,
+				     format_min.fmt.win.w.width,
+				     format_min.fmt.win.w.height,
+				     format_min.fmt.win.field,
+				     format_min.fmt.win.chromakey,
+				     format_min.fmt.win.clips,
+				     format_min.fmt.win.clipcount,
+				     format_min.fmt.win.bitmap,
+				     format_min.fmt.win.global_alpha);
+				if (sizeof(format_min.fmt.win) <
+				    sizeof(format_min.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_min = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_min.fmt.win);
+					     j <
+					     sizeof(format_min.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_min.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
@@ -990,41 +1064,48 @@
 			memset(&format_max, 0xff, sizeof(format_max));
 			format_max.type = type;
 
-			ret_max = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
+			ret_max =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
 			errno_max = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
-				__FILE__, __LINE__, type, ret_max, errno_max);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
+			     __FILE__, __LINE__, type, ret_max, errno_max);
 
 			if (ret_max == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
-				dprintf("\tformat_max = {.type=0x%X, .fmt.vbi={ "
-					".sampling_rate=%u, "
-					".offset=%u, "
-					".samples_per_line=%u "
-					".sample_format=0x%X "
-					".start = { %u, %u }, "
-					".count = { %u, %u }, "
-					".flags = 0x%X, "
-					".reserved = { 0x%X, 0x%X } "
-					"} }\n",
-					format_max.type,
-					format_max.fmt.vbi.sampling_rate,
-					format_max.fmt.vbi.offset,
-					format_max.fmt.vbi.samples_per_line,
-					format_max.fmt.vbi.sample_format,
-					format_max.fmt.vbi.start[0],
-					format_max.fmt.vbi.start[1],
-					format_max.fmt.vbi.count[0],
-					format_max.fmt.vbi.count[1],
-					format_max.fmt.vbi.flags,
-					format_max.fmt.vbi.reserved[0],
-					format_max.fmt.vbi.reserved[1]
-				);
-				if (sizeof(format_max.fmt.vbi) < sizeof(format_max.fmt.raw_data)) {
-					dprintf1("\tformat_max = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_max.fmt.vbi); j < sizeof(format_max.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_max.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_max = {.type=0x%X, .fmt.vbi={ "
+				     ".sampling_rate=%u, " ".offset=%u, "
+				     ".samples_per_line=%u "
+				     ".sample_format=0x%X "
+				     ".start = { %u, %u }, "
+				     ".count = { %u, %u }, " ".flags = 0x%X, "
+				     ".reserved = { 0x%X, 0x%X } " "} }\n",
+				     format_max.type,
+				     format_max.fmt.vbi.sampling_rate,
+				     format_max.fmt.vbi.offset,
+				     format_max.fmt.vbi.samples_per_line,
+				     format_max.fmt.vbi.sample_format,
+				     format_max.fmt.vbi.start[0],
+				     format_max.fmt.vbi.start[1],
+				     format_max.fmt.vbi.count[0],
+				     format_max.fmt.vbi.count[1],
+				     format_max.fmt.vbi.flags,
+				     format_max.fmt.vbi.reserved[0],
+				     format_max.fmt.vbi.reserved[1]
+				    );
+				if (sizeof(format_max.fmt.vbi) <
+				    sizeof(format_max.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_max = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_max.fmt.vbi);
+					     j <
+					     sizeof(format_max.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_max.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
@@ -1039,8 +1120,10 @@
 				//CU_ASSERT_EQUAL(format_max.fmt.vbi.count[0], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.vbi.count[1], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.vbi.flags, ???);
-				CU_ASSERT_EQUAL(format_max.fmt.vbi.reserved[0], 0);
-				CU_ASSERT_EQUAL(format_max.fmt.vbi.reserved[1], 0);
+				CU_ASSERT_EQUAL(format_max.fmt.vbi.reserved[0],
+						0);
+				CU_ASSERT_EQUAL(format_max.fmt.vbi.reserved[1],
+						0);
 
 			} else {
 				CU_ASSERT_EQUAL(ret_max, -1);
@@ -1051,41 +1134,48 @@
 			format_min.type = type;
 			format_min.fmt.pix.pixelformat = fmtdesc.pixelformat;
 
-			ret_min = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
+			ret_min =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
 			errno_min = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
-				__FILE__, __LINE__, type, ret_min, errno_min);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
+			     __FILE__, __LINE__, type, ret_min, errno_min);
 
 			if (ret_min == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
-				dprintf("\tformat_min = {.type=0x%X, .fmt.vbi={ "
-					".sampling_rate=%u, "
-					".offset=%u, "
-					".samples_per_line=%u "
-					".sample_format=0x%X "
-					".start = { %u, %u }, "
-					".count = { %u, %u }, "
-					".flags = 0x%X, "
-					".reserved = { 0x%X, 0x%X } "
-					"} }\n",
-					format_min.type,
-					format_min.fmt.vbi.sampling_rate,
-					format_min.fmt.vbi.offset,
-					format_min.fmt.vbi.samples_per_line,
-					format_min.fmt.vbi.sample_format,
-					format_min.fmt.vbi.start[0],
-					format_min.fmt.vbi.start[1],
-					format_min.fmt.vbi.count[0],
-					format_min.fmt.vbi.count[1],
-					format_min.fmt.vbi.flags,
-					format_min.fmt.vbi.reserved[0],
-					format_min.fmt.vbi.reserved[1]
-				);
-				if (sizeof(format_min.fmt.vbi) < sizeof(format_min.fmt.raw_data)) {
-					dprintf1("\tformat_min = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_min.fmt.vbi); j < sizeof(format_min.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_min.fmt.raw_data[j]);
+				dprintf
+				    ("\tformat_min = {.type=0x%X, .fmt.vbi={ "
+				     ".sampling_rate=%u, " ".offset=%u, "
+				     ".samples_per_line=%u "
+				     ".sample_format=0x%X "
+				     ".start = { %u, %u }, "
+				     ".count = { %u, %u }, " ".flags = 0x%X, "
+				     ".reserved = { 0x%X, 0x%X } " "} }\n",
+				     format_min.type,
+				     format_min.fmt.vbi.sampling_rate,
+				     format_min.fmt.vbi.offset,
+				     format_min.fmt.vbi.samples_per_line,
+				     format_min.fmt.vbi.sample_format,
+				     format_min.fmt.vbi.start[0],
+				     format_min.fmt.vbi.start[1],
+				     format_min.fmt.vbi.count[0],
+				     format_min.fmt.vbi.count[1],
+				     format_min.fmt.vbi.flags,
+				     format_min.fmt.vbi.reserved[0],
+				     format_min.fmt.vbi.reserved[1]
+				    );
+				if (sizeof(format_min.fmt.vbi) <
+				    sizeof(format_min.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_min = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_min.fmt.vbi);
+					     j <
+					     sizeof(format_min.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_min.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
@@ -1100,8 +1190,10 @@
 				//CU_ASSERT_EQUAL(format_min.fmt.vbi.count[0], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.vbi.count[1], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.vbi.flags, ???);
-				CU_ASSERT_EQUAL(format_min.fmt.vbi.reserved[0], 0);
-				CU_ASSERT_EQUAL(format_min.fmt.vbi.reserved[1], 0);
+				CU_ASSERT_EQUAL(format_min.fmt.vbi.reserved[0],
+						0);
+				CU_ASSERT_EQUAL(format_min.fmt.vbi.reserved[1],
+						0);
 			} else {
 				CU_ASSERT_EQUAL(ret_min, -1);
 				CU_ASSERT_EQUAL(errno_min, EINVAL);
@@ -1118,11 +1210,13 @@
 			memset(&format_max, 0xff, sizeof(format_max));
 			format_max.type = type;
 
-			ret_max = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
+			ret_max =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
 			errno_max = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
-				__FILE__, __LINE__, type, ret_max, errno_max);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
+			     __FILE__, __LINE__, type, ret_max, errno_max);
 
 			if (ret_max == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
@@ -1139,18 +1233,26 @@
 					format_max.fmt.sliced.io_size,
 					format_max.fmt.sliced.reserved[0],
 					format_max.fmt.sliced.reserved[1]
-				);
-				if (sizeof(format_max.fmt.sliced) < sizeof(format_max.fmt.raw_data)) {
-					dprintf1("\tformat_max = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_max.fmt.sliced); j < sizeof(format_max.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_max.fmt.raw_data[j]);
+				    );
+				if (sizeof(format_max.fmt.sliced) <
+				    sizeof(format_max.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_max = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_max.fmt.sliced);
+					     j <
+					     sizeof(format_max.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_max.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
 
 				/* TODO: check the different fields */
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_set, ???);
-				CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][0], 0);
+				CU_ASSERT_EQUAL(format_max.fmt.sliced.
+						service_lines[0][0], 0);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][1], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][2], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][3], ???);
@@ -1174,7 +1276,8 @@
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][21], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][22], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[0][23], ???);
-				CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][0], 0);
+				CU_ASSERT_EQUAL(format_max.fmt.sliced.
+						service_lines[1][0], 0);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][1], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][2], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][3], ???);
@@ -1199,8 +1302,10 @@
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][22], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.service_lines[1][23], ???);
 				//CU_ASSERT_EQUAL(format_max.fmt.sliced.io_size, ???);
-				CU_ASSERT_EQUAL(format_max.fmt.sliced.reserved[0], 0);
-				CU_ASSERT_EQUAL(format_max.fmt.sliced.reserved[1], 0);
+				CU_ASSERT_EQUAL(format_max.fmt.sliced.
+						reserved[0], 0);
+				CU_ASSERT_EQUAL(format_max.fmt.sliced.
+						reserved[1], 0);
 
 			} else {
 				CU_ASSERT_EQUAL(ret_max, -1);
@@ -1211,11 +1316,13 @@
 			format_min.type = type;
 			format_min.fmt.pix.pixelformat = fmtdesc.pixelformat;
 
-			ret_min = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
+			ret_min =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
 			errno_min = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
-				__FILE__, __LINE__, type, ret_min, errno_min);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
+			     __FILE__, __LINE__, type, ret_min, errno_min);
 
 			if (ret_min == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
@@ -1232,18 +1339,26 @@
 					format_min.fmt.sliced.io_size,
 					format_min.fmt.sliced.reserved[0],
 					format_min.fmt.sliced.reserved[1]
-				);
-				if (sizeof(format_min.fmt.sliced) < sizeof(format_min.fmt.raw_data)) {
-					dprintf1("\tformat_min = { ..., .fmt.raw_data[] = { ...");
-					for (j = sizeof(format_min.fmt.sliced); j < sizeof(format_min.fmt.raw_data); j++) {
-						dprintf(", 0x%x", format_min.fmt.raw_data[j]);
+				    );
+				if (sizeof(format_min.fmt.sliced) <
+				    sizeof(format_min.fmt.raw_data)) {
+					dprintf1
+					    ("\tformat_min = { ..., .fmt.raw_data[] = { ...");
+					for (j = sizeof(format_min.fmt.sliced);
+					     j <
+					     sizeof(format_min.fmt.raw_data);
+					     j++) {
+						dprintf(", 0x%x",
+							format_min.fmt.
+							raw_data[j]);
 					}
 					dprintf1(" }}\n");
 				}
 
 				/* TODO: check the different fields */
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_set, ???);
-				CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][0], 0);
+				CU_ASSERT_EQUAL(format_min.fmt.sliced.
+						service_lines[0][0], 0);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][1], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][2], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][3], ???);
@@ -1267,7 +1382,8 @@
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][21], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][22], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[0][23], ???);
-				CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][0], 0);
+				CU_ASSERT_EQUAL(format_min.fmt.sliced.
+						service_lines[1][0], 0);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][1], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][2], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][3], ???);
@@ -1292,8 +1408,10 @@
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][22], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.service_lines[1][23], ???);
 				//CU_ASSERT_EQUAL(format_min.fmt.sliced.io_size, ???);
-				CU_ASSERT_EQUAL(format_min.fmt.sliced.reserved[0], 0);
-				CU_ASSERT_EQUAL(format_min.fmt.sliced.reserved[1], 0);
+				CU_ASSERT_EQUAL(format_min.fmt.sliced.
+						reserved[0], 0);
+				CU_ASSERT_EQUAL(format_min.fmt.sliced.
+						reserved[1], 0);
 
 			} else {
 				CU_ASSERT_EQUAL(ret_min, -1);
@@ -1310,17 +1428,22 @@
 			memset(&format_max, 0xff, sizeof(format_max));
 			format_max.type = type;
 
-			ret_max = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
+			ret_max =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_max);
 			errno_max = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
-				__FILE__, __LINE__, type, ret_max, errno_max);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_max=%i, errno_max=%i\n",
+			     __FILE__, __LINE__, type, ret_max, errno_max);
 
 			if (ret_max == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
-				dprintf1("\tformat_max = { ..., .fmt.raw_data[] = { ");
-				for (j = 0; j < sizeof(format_max.fmt.raw_data); j++) {
-					dprintf("0x%x", format_max.fmt.raw_data[j]);
+				dprintf1
+				    ("\tformat_max = { ..., .fmt.raw_data[] = { ");
+				for (j = 0; j < sizeof(format_max.fmt.raw_data);
+				     j++) {
+					dprintf("0x%x",
+						format_max.fmt.raw_data[j]);
 					if (j < sizeof(format_max.fmt.raw_data)) {
 						dprintf1(", ");
 					}
@@ -1338,17 +1461,22 @@
 			format_min.type = type;
 			format_min.fmt.pix.pixelformat = fmtdesc.pixelformat;
 
-			ret_min = ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
+			ret_min =
+			    ioctl(get_video_fd(), VIDIOC_S_FMT, &format_min);
 			errno_min = errno;
 
-			dprintf("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
-				__FILE__, __LINE__, type, ret_min, errno_min);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FMT, type=%i, ret_min=%i, errno_min=%i\n",
+			     __FILE__, __LINE__, type, ret_min, errno_min);
 
 			if (ret_min == 0) {
 				CU_ASSERT_EQUAL(ret_enum, 0);
-				dprintf1("\tformat_min = { ..., .fmt.raw_data[] = { ");
-				for (j = 0; j < sizeof(format_min.fmt.raw_data); j++) {
-					dprintf("0x%x", format_min.fmt.raw_data[j]);
+				dprintf1
+				    ("\tformat_min = { ..., .fmt.raw_data[] = { ");
+				for (j = 0; j < sizeof(format_min.fmt.raw_data);
+				     j++) {
+					dprintf("0x%x",
+						format_min.fmt.raw_data[j]);
 					if (j < sizeof(format_min.fmt.raw_data)) {
 						dprintf1(", ");
 					}
@@ -1403,7 +1531,8 @@
 
 }
 
-void test_VIDIOC_S_FMT_enum() {
+void test_VIDIOC_S_FMT_enum()
+{
 	do_set_formats_enum(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_set_formats_enum(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_set_formats_enum(V4L2_BUF_TYPE_VIDEO_OVERLAY);
@@ -1415,7 +1544,8 @@
 	do_set_formats_enum(V4L2_BUF_TYPE_PRIVATE);
 }
 
-static void do_set_formats_type(enum v4l2_buf_type type) {
+static void do_set_formats_type(enum v4l2_buf_type type)
+{
 	int ret_set, errno_set;
 	struct v4l2_format format;
 	struct v4l2_format format2;
@@ -1439,10 +1569,11 @@
 
 }
 
-void test_VIDIOC_S_FMT_type() {
+void test_VIDIOC_S_FMT_type()
+{
 	do_set_formats_type(0);
 	do_set_formats_type(9);
-	do_set_formats_type(V4L2_BUF_TYPE_PRIVATE-1);
+	do_set_formats_type(V4L2_BUF_TYPE_PRIVATE - 1);
 	do_set_formats_type(S16_MIN);
 	do_set_formats_type(S16_MAX);
 	do_set_formats_type(S32_MAX);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FREQUENCY.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FREQUENCY.c
index 8c3cb71..687bc60 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FREQUENCY.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_FREQUENCY.c
@@ -30,7 +30,8 @@
 
 #include "test_VIDIOC_FREQUENCY.h"
 
-void test_VIDIOC_G_FREQUENCY() {
+void test_VIDIOC_G_FREQUENCY()
+{
 	int ret_get, errno_get;
 	__u32 tuner;
 	struct v4l2_frequency freq;
@@ -75,10 +76,8 @@
 			freq.reserved[2],
 			freq.reserved[3],
 			freq.reserved[4],
-			freq.reserved[5],
-			freq.reserved[6],
-			freq.reserved[7]
-		);
+			freq.reserved[5], freq.reserved[6], freq.reserved[7]
+		    );
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
 		CU_ASSERT_EQUAL(errno_get, EINVAL);
@@ -86,12 +85,13 @@
 
 }
 
-void test_VIDIOC_G_FREQUENCY_S32_MAX() {
+void test_VIDIOC_G_FREQUENCY_S32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 tuner;
 	struct v4l2_frequency freq;
 
-	tuner = (__u32)S32_MAX;
+	tuner = (__u32) S32_MAX;
 
 	memset(&tuner, 0xff, sizeof(tuner));
 	freq.tuner = tuner;
@@ -105,12 +105,13 @@
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_FREQUENCY_S32_MAX_1() {
+void test_VIDIOC_G_FREQUENCY_S32_MAX_1()
+{
 	int ret_get, errno_get;
 	__u32 tuner;
 	struct v4l2_frequency freq;
 
-	tuner = (__u32)S32_MAX+1;
+	tuner = (__u32) S32_MAX + 1;
 
 	memset(&tuner, 0xff, sizeof(tuner));
 	freq.tuner = tuner;
@@ -124,7 +125,8 @@
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_FREQUENCY_U32_MAX() {
+void test_VIDIOC_G_FREQUENCY_U32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 tuner;
 	struct v4l2_frequency freq;
@@ -143,7 +145,8 @@
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_FREQUENCY_NULL() {
+void test_VIDIOC_G_FREQUENCY_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_frequency freq;
@@ -178,7 +181,8 @@
 	}
 }
 
-void test_VIDIOC_S_FREQUENCY() {
+void test_VIDIOC_S_FREQUENCY()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	__u32 tuner;
@@ -208,8 +212,9 @@
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &orig_freq);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
-			__FILE__, __LINE__, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
+		     __FILE__, __LINE__, ret_set, errno_set);
 
 		CU_ASSERT_EQUAL(ret_set, 0);
 		if (ret_set == 0) {
@@ -217,18 +222,23 @@
 			/* check wheteher the frequency has not been changed */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = tuner;
-			ret_get = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret_get =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 			errno_get = errno;
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i\n",
-				__FILE__, __LINE__, ret_get, errno_get);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i\n",
+			     __FILE__, __LINE__, ret_get, errno_get);
 
 			CU_ASSERT_EQUAL(ret_get, 0);
 			if (ret_get == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, orig_freq.frequency);
-				CU_ASSERT_EQUAL(new_freq.frequency, orig_freq.frequency);
+				dprintf
+				    ("\t%s:%u: current frequency=%u (expected %u)\n",
+				     __FILE__, __LINE__, new_freq.frequency,
+				     orig_freq.frequency);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						orig_freq.frequency);
 			}
 
 		}
@@ -246,8 +256,9 @@
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
-			__FILE__, __LINE__, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
+		     __FILE__, __LINE__, ret_set, errno_set);
 
 		CU_ASSERT_EQUAL(ret_set, -1);
 		CU_ASSERT_EQUAL(errno_set, EINVAL);
@@ -256,7 +267,8 @@
 
 }
 
-void test_VIDIOC_S_FREQUENCY_boundaries() {
+void test_VIDIOC_S_FREQUENCY_boundaries()
+{
 	int ret_g_tuner = 0;
 	int ret_g_freq = 0;
 	int errno_g_tuner = 0;
@@ -278,9 +290,9 @@
 	ret_g_tuner = ioctl(get_video_fd(), VIDIOC_G_TUNER, &tuner);
 	errno_g_tuner = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_TUNER, ret=%i, tuner.rangelow=%u, tuner.rangehigh=%u\n",
-		__FILE__, __LINE__,
-		ret_g_tuner, tuner.rangelow, tuner.rangehigh);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_TUNER, ret=%i, tuner.rangelow=%u, tuner.rangehigh=%u\n",
+	     __FILE__, __LINE__, ret_g_tuner, tuner.rangelow, tuner.rangehigh);
 	CU_ASSERT_EQUAL(tuner.index, index);
 
 	/* fetch the current frequency setting */
@@ -289,9 +301,9 @@
 	ret_g_freq = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &orig_freq);
 	errno_g_freq = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret_g_freq=%i, orig_freq.frequency=%u\n",
-		__FILE__, __LINE__,
-		ret_g_freq, orig_freq.frequency);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret_g_freq=%i, orig_freq.frequency=%u\n",
+	     __FILE__, __LINE__, ret_g_freq, orig_freq.frequency);
 	CU_ASSERT_EQUAL(orig_freq.tuner, index);
 
 	if (ret_g_tuner == 0 && ret_g_freq == 0) {
@@ -304,8 +316,7 @@
 		freq.frequency = 0;
 		ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 		dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-			__FILE__, __LINE__,
-			0, ret);
+			__FILE__, __LINE__, 0, ret);
 
 		CU_ASSERT_EQUAL(ret, 0);
 		if (ret == 0) {
@@ -315,15 +326,18 @@
 			 */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret, new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
-				CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangelow);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						tuner.rangelow);
 			}
 		}
 
@@ -332,12 +346,12 @@
 			memset(&freq, 0xff, sizeof(freq));
 			freq.tuner = index;
 			freq.type = orig_freq.type;
-			freq.frequency = tuner.rangelow-1;
+			freq.frequency = tuner.rangelow - 1;
 			ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
-			dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-				__FILE__, __LINE__,
-				tuner.rangelow-1, ret);
+			dprintf
+			    ("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
+			     __FILE__, __LINE__, tuner.rangelow - 1, ret);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
@@ -347,17 +361,23 @@
 				 */
 				memset(&new_freq, 0xff, sizeof(new_freq));
 				new_freq.tuner = index;
-				ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+				ret =
+				    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+					  &new_freq);
 
-				dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-					__FILE__, __LINE__,
-					ret, new_freq.frequency);
+				dprintf
+				    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+				     __FILE__, __LINE__, ret,
+				     new_freq.frequency);
 				CU_ASSERT_EQUAL(ret, 0);
 				if (ret == 0) {
-					dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-						__FILE__, __LINE__,
-						new_freq.frequency, tuner.rangelow);
-					CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangelow);
+					dprintf
+					    ("\t%s:%u: current frequency=%u (expected %u)\n",
+					     __FILE__, __LINE__,
+					     new_freq.frequency,
+					     tuner.rangelow);
+					CU_ASSERT_EQUAL(new_freq.frequency,
+							tuner.rangelow);
 				}
 			}
 		}
@@ -370,8 +390,7 @@
 		ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
 		dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-			__FILE__, __LINE__,
-			tuner.rangelow, ret);
+			__FILE__, __LINE__, tuner.rangelow, ret);
 
 		CU_ASSERT_EQUAL(ret, 0);
 		if (ret == 0) {
@@ -381,18 +400,22 @@
 			 */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret, new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, tuner.rangelow);
-				CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangelow);
+				dprintf
+				    ("\t%s:%u: current frequency=%u (expected %u)\n",
+				     __FILE__, __LINE__, new_freq.frequency,
+				     tuner.rangelow);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						tuner.rangelow);
 			}
 		}
 
@@ -404,8 +427,7 @@
 		ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
 		dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-			__FILE__, __LINE__,
-			tuner.rangehigh, ret);
+			__FILE__, __LINE__, tuner.rangehigh, ret);
 
 		CU_ASSERT_EQUAL(ret, 0);
 		if (ret == 0) {
@@ -415,18 +437,22 @@
 			 */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret, new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, tuner.rangehigh);
-				CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangehigh);
+				dprintf
+				    ("\t%s:%u: current frequency=%u (expected %u)\n",
+				     __FILE__, __LINE__, new_freq.frequency,
+				     tuner.rangehigh);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						tuner.rangehigh);
 			}
 		}
 
@@ -435,12 +461,12 @@
 			memset(&freq, 0xff, sizeof(freq));
 			freq.tuner = index;
 			freq.type = orig_freq.type;
-			freq.frequency = tuner.rangehigh+1;
+			freq.frequency = tuner.rangehigh + 1;
 			ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
-			dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-				__FILE__, __LINE__,
-				tuner.rangehigh+1, ret);
+			dprintf
+			    ("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
+			     __FILE__, __LINE__, tuner.rangehigh + 1, ret);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
@@ -450,18 +476,24 @@
 				 */
 				memset(&new_freq, 0xff, sizeof(new_freq));
 				new_freq.tuner = index;
-				ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+				ret =
+				    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+					  &new_freq);
 
-				dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-					__FILE__, __LINE__,
-					ret, new_freq.frequency);
+				dprintf
+				    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+				     __FILE__, __LINE__, ret,
+				     new_freq.frequency);
 
 				CU_ASSERT_EQUAL(ret, 0);
 				if (ret == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, tuner.rangehigh);
-					CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangehigh);
+					dprintf
+					    ("\t%s:%u: current frequency=%u (expected %u)\n",
+					     __FILE__, __LINE__,
+					     new_freq.frequency,
+					     tuner.rangehigh);
+					CU_ASSERT_EQUAL(new_freq.frequency,
+							tuner.rangehigh);
 				}
 			}
 		}
@@ -474,8 +506,7 @@
 		ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
 		dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-			__FILE__, __LINE__,
-			U32_MAX, ret);
+			__FILE__, __LINE__, U32_MAX, ret);
 		CU_ASSERT_EQUAL(ret, 0);
 		if (ret == 0) {
 
@@ -484,18 +515,22 @@
 			 */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret, new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, tuner.rangehigh);
-				CU_ASSERT_EQUAL(new_freq.frequency, tuner.rangehigh);
+				dprintf
+				    ("\t%s:%u: current frequency=%u (expected %u)\n",
+				     __FILE__, __LINE__, new_freq.frequency,
+				     tuner.rangehigh);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						tuner.rangehigh);
 			}
 		}
 
@@ -507,8 +542,7 @@
 		ret = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 
 		dprintf("\t%s:%u: set to %u: VIDIOC_S_FREQUENCY, ret=%i\n",
-			__FILE__, __LINE__,
-			orig_freq.frequency, ret);
+			__FILE__, __LINE__, orig_freq.frequency, ret);
 
 		CU_ASSERT_EQUAL(ret, 0);
 		if (ret == 0) {
@@ -516,39 +550,48 @@
 			/* check wheteher the frequency has been restored */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret, new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret, 0);
 			if (ret == 0) {
-				dprintf("\t%s:%u: current frequency=%u (expected %u)\n",
-					__FILE__, __LINE__,
-					new_freq.frequency, orig_freq.frequency);
-				CU_ASSERT_EQUAL(new_freq.frequency, orig_freq.frequency);
+				dprintf
+				    ("\t%s:%u: current frequency=%u (expected %u)\n",
+				     __FILE__, __LINE__, new_freq.frequency,
+				     orig_freq.frequency);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						orig_freq.frequency);
 			}
 		}
 	}
 
 	if (ret_g_freq != 0) {
-		dprintf("\t%s:%u: ret_g_freq=%d (expected %d)\n", __FILE__, __LINE__, ret_g_freq, -1);
-		dprintf("\t%s:%u: errno_g_freq=%d (expected %d)\n", __FILE__, __LINE__, errno_g_freq, EINVAL);
+		dprintf("\t%s:%u: ret_g_freq=%d (expected %d)\n", __FILE__,
+			__LINE__, ret_g_freq, -1);
+		dprintf("\t%s:%u: errno_g_freq=%d (expected %d)\n", __FILE__,
+			__LINE__, errno_g_freq, EINVAL);
 		CU_ASSERT_EQUAL(ret_g_freq, -1);
 		CU_ASSERT_EQUAL(errno, EINVAL);
 	}
 
 	if (ret_g_tuner != 0) {
-		dprintf("\t%s:%u: ret_g_tuner=%d (expected %d)\n", __FILE__, __LINE__, ret_g_tuner, -1);
-		dprintf("\t%s:%u: errno_g_tuner=%d (expected %d)\n", __FILE__, __LINE__, errno_g_tuner, EINVAL);
+		dprintf("\t%s:%u: ret_g_tuner=%d (expected %d)\n", __FILE__,
+			__LINE__, ret_g_tuner, -1);
+		dprintf("\t%s:%u: errno_g_tuner=%d (expected %d)\n", __FILE__,
+			__LINE__, errno_g_tuner, EINVAL);
 		CU_ASSERT_EQUAL(ret_g_tuner, -1);
 		CU_ASSERT_EQUAL(errno, EINVAL);
 	}
 
 }
 
-void test_VIDIOC_S_FREQUENCY_scan() {
+void test_VIDIOC_S_FREQUENCY_scan()
+{
 	int ret_g_tuner, errno_g_tuner;
 	int ret_g_freq, errno_g_freq;
 	int ret_get, errno_get;
@@ -581,16 +624,16 @@
 	ret_g_freq = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &orig_freq);
 	errno_g_freq = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret_g_freq=%i, errno_g_freq=%i, orig_freq.frequency=%u\n",
-		__FILE__, __LINE__, ret_g_freq, errno_g_freq, orig_freq.frequency);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret_g_freq=%i, errno_g_freq=%i, orig_freq.frequency=%u\n",
+	     __FILE__, __LINE__, ret_g_freq, errno_g_freq, orig_freq.frequency);
 	CU_ASSERT_EQUAL(orig_freq.tuner, index);
 
 	if (ret_g_freq == 0) {
 		CU_ASSERT_EQUAL(orig_freq.tuner, index);
 
 		dprintf("\t%s:%u: tuner.rangelow=%u, tuner.rangehigh=%u\n",
-			__FILE__, __LINE__,
-			tuner.rangelow, tuner.rangehigh);
+			__FILE__, __LINE__, tuner.rangelow, tuner.rangehigh);
 
 		i = tuner.rangelow;
 		prev_freq.frequency = 0;
@@ -601,33 +644,41 @@
 			freq.type = orig_freq.type;
 
 			freq.frequency = i;
-			ret_set = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
+			ret_set =
+			    ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 			errno_set = errno;
-			dprintf("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i, freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret_set, errno_set, i);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i, freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret_set, errno_set, i);
 
 			CU_ASSERT_EQUAL(ret_set, 0);
 			if (ret_set == 0) {
 
 				memset(&new_freq, 0xff, sizeof(new_freq));
 				new_freq.tuner = index;
-				ret_get = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+				ret_get =
+				    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+					  &new_freq);
 				errno_get = errno;
 
-				dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i, new_freq.frequency=%u\n",
-					__FILE__, __LINE__,
-					ret_get, errno_get, new_freq.frequency);
+				dprintf
+				    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i, new_freq.frequency=%u\n",
+				     __FILE__, __LINE__, ret_get, errno_get,
+				     new_freq.frequency);
 
 				CU_ASSERT_EQUAL(ret_get, 0);
 				if (ret_get == 0) {
-					CU_ASSERT(prev_freq.frequency <= new_freq.frequency);
-					CU_ASSERT(tuner.rangelow <= new_freq.frequency);
-					CU_ASSERT(new_freq.frequency <= tuner.rangehigh);
+					CU_ASSERT(prev_freq.frequency <=
+						  new_freq.frequency);
+					CU_ASSERT(tuner.rangelow <=
+						  new_freq.frequency);
+					CU_ASSERT(new_freq.frequency <=
+						  tuner.rangehigh);
 					prev_freq = new_freq;
 				}
 			} else {
-				printf("\tError %i while setting to %u\n", errno_set, i);
+				printf("\tError %i while setting to %u\n",
+				       errno_set, i);
 			}
 			i++;
 		} while (i <= tuner.rangehigh);
@@ -640,8 +691,9 @@
 		ret_set = ioctl(get_video_fd(), VIDIOC_S_FREQUENCY, &freq);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
-			__FILE__, __LINE__, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_FREQUENCY, ret_set=%i, errno_set=%i\n",
+		     __FILE__, __LINE__, ret_set, errno_set);
 
 		CU_ASSERT_EQUAL(ret_set, 0);
 		if (ret_set == 0) {
@@ -649,16 +701,20 @@
 			/* check wheteher the frequency has been restored */
 			memset(&new_freq, 0xff, sizeof(new_freq));
 			new_freq.tuner = index;
-			ret_get = ioctl(get_video_fd(), VIDIOC_G_FREQUENCY, &new_freq);
+			ret_get =
+			    ioctl(get_video_fd(), VIDIOC_G_FREQUENCY,
+				  &new_freq);
 			errno_get = errno;
 
-			dprintf("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i, new_freq.frequency=%u\n",
-				__FILE__, __LINE__,
-				ret_get, errno_get, new_freq.frequency);
+			dprintf
+			    ("\t%s:%u: VIDIOC_G_FREQUENCY, ret_get=%i, errno_get=%i, new_freq.frequency=%u\n",
+			     __FILE__, __LINE__, ret_get, errno_get,
+			     new_freq.frequency);
 
 			CU_ASSERT_EQUAL(ret_get, 0);
 			if (ret_get == 0) {
-				CU_ASSERT_EQUAL(new_freq.frequency, orig_freq.frequency);
+				CU_ASSERT_EQUAL(new_freq.frequency,
+						orig_freq.frequency);
 			}
 		}
 	}
@@ -675,7 +731,8 @@
 
 }
 
-void test_VIDIOC_S_FREQUENCY_NULL() {
+void test_VIDIOC_S_FREQUENCY_NULL()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_G_SLICED_VBI_CAP.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_G_SLICED_VBI_CAP.c
index 807a312..40564a0 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_G_SLICED_VBI_CAP.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_G_SLICED_VBI_CAP.c
@@ -22,17 +22,20 @@
 
 #include "test_VIDIOC_G_SLICED_VBI_CAP.h"
 
-void do_get_sliced_vbi_cap(enum v4l2_buf_type type) {
+void do_get_sliced_vbi_cap(enum v4l2_buf_type type)
+{
 	int ret_cap, errno_cap;
 	struct v4l2_sliced_vbi_cap sliced_vbi_cap;
 
 	memset(&sliced_vbi_cap, 0xff, sizeof(sliced_vbi_cap));
 	sliced_vbi_cap.type = type;
-	ret_cap = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
+	ret_cap =
+	    ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
 	errno_cap = errno;
 
-	dprintf("\tVIDIOC_G_SLICED_VBI_CAP: type=%i, ret_cap=%i, errno_cap=%i\n",
-		type, ret_cap, errno_cap);
+	dprintf
+	    ("\tVIDIOC_G_SLICED_VBI_CAP: type=%i, ret_cap=%i, errno_cap=%i\n",
+	     type, ret_cap, errno_cap);
 
 	if (ret_cap == 0) {
 		CU_ASSERT_EQUAL(ret_cap, 0);
@@ -44,28 +47,33 @@
 
 }
 
-void test_VIDIOC_G_SLICED_VBI_CAP() {
+void test_VIDIOC_G_SLICED_VBI_CAP()
+{
 	do_get_sliced_vbi_cap(V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
 	do_get_sliced_vbi_cap(V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
 }
 
-void do_get_sliced_vbi_cap_invalid(enum v4l2_buf_type type) {
+void do_get_sliced_vbi_cap_invalid(enum v4l2_buf_type type)
+{
 	int ret_cap, errno_cap;
 	struct v4l2_sliced_vbi_cap sliced_vbi_cap;
 
 	memset(&sliced_vbi_cap, 0xff, sizeof(sliced_vbi_cap));
 	sliced_vbi_cap.type = type;
-	ret_cap = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
+	ret_cap =
+	    ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
 	errno_cap = errno;
 
-	dprintf("\tVIDIOC_G_SLICED_VBI_CAP: type=%i, ret_cap=%i, errno_cap=%i\n",
-		type, ret_cap, errno_cap);
+	dprintf
+	    ("\tVIDIOC_G_SLICED_VBI_CAP: type=%i, ret_cap=%i, errno_cap=%i\n",
+	     type, ret_cap, errno_cap);
 
 	CU_ASSERT_EQUAL(ret_cap, -1);
 	CU_ASSERT_EQUAL(errno_cap, EINVAL);
 }
 
-void test_VIDIOC_G_SLICED_VBI_CAP_invalid() {
+void test_VIDIOC_G_SLICED_VBI_CAP_invalid()
+{
 	do_get_sliced_vbi_cap_invalid(0);
 	do_get_sliced_vbi_cap_invalid(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_get_sliced_vbi_cap_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT);
@@ -75,11 +83,12 @@
 	do_get_sliced_vbi_cap_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
 	do_get_sliced_vbi_cap_invalid(V4L2_BUF_TYPE_PRIVATE);
 	do_get_sliced_vbi_cap_invalid(S32_MAX);
-	do_get_sliced_vbi_cap_invalid( ((__u32)S32_MAX)+1 );
+	do_get_sliced_vbi_cap_invalid(((__u32) S32_MAX) + 1);
 	do_get_sliced_vbi_cap_invalid(U32_MAX);
 }
 
-void test_VIDIOC_G_SLICED_VBI_CAP_NULL() {
+void test_VIDIOC_G_SLICED_VBI_CAP_NULL()
+{
 	int ret_get, errno_get;
 	int ret_set_capture, errno_set_capture;
 	int ret_set_output, errno_set_output;
@@ -89,28 +98,34 @@
 	memset(&sliced_vbi_cap, 0, sizeof(sliced_vbi_cap));
 	sliced_vbi_cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
-	ret_get = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
+	ret_get =
+	    ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_G_SLICED_VBI_CAP ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_G_SLICED_VBI_CAP ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	memset(&sliced_vbi_cap, 0, sizeof(sliced_vbi_cap));
 	sliced_vbi_cap.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
 
-	ret_set_capture = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
+	ret_set_capture =
+	    ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
 	errno_set_capture = errno;
 
-	dprintf("\tVIDIOC_G_SLICED_VBI_CAP ret_set_capture=%i, errno_set_capture=%i\n",
-		ret_set_capture, errno_set_capture);
+	dprintf
+	    ("\tVIDIOC_G_SLICED_VBI_CAP ret_set_capture=%i, errno_set_capture=%i\n",
+	     ret_set_capture, errno_set_capture);
 
 	memset(&sliced_vbi_cap, 0, sizeof(sliced_vbi_cap));
 	sliced_vbi_cap.type = V4L2_BUF_TYPE_SLICED_VBI_OUTPUT;
 
-	ret_set_output = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
+	ret_set_output =
+	    ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, &sliced_vbi_cap);
 	errno_set_output = errno;
 
-	dprintf("\tVIDIOC_G_SLICED_VBI_CAP ret_set_output=%i, errno_set_output=%i\n",
-		ret_set_output, errno_set_output);
+	dprintf
+	    ("\tVIDIOC_G_SLICED_VBI_CAP ret_set_output=%i, errno_set_output=%i\n",
+	     ret_set_output, errno_set_output);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_G_SLICED_VBI_CAP, NULL);
 	errno_null = errno;
@@ -118,7 +133,7 @@
 	dprintf("\tVIDIOC_G_SLICED_VBI_CAP ret_null=%i, errno_null=%i\n",
 		ret_null, errno_null);
 
-	if (ret_get == 0 || ret_set_capture == 0 || ret_set_output== 0) {
+	if (ret_get == 0 || ret_set_capture == 0 || ret_set_output == 0) {
 		CU_ASSERT_EQUAL(ret_null, -1);
 		CU_ASSERT_EQUAL(errno_null, EFAULT);
 
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_INPUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_INPUT.c
index cbba303..ed58ce6 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_INPUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_INPUT.c
@@ -31,7 +31,8 @@
 
 #include "test_VIDIOC_INPUT.h"
 
-int valid_input_index(int f, __u32 index) {
+int valid_input_index(int f, __u32 index)
+{
 	__u32 i;
 	struct v4l2_input input;
 	int ret_enum, errno_enum;
@@ -57,7 +58,8 @@
 	return valid;
 }
 
-void test_VIDIOC_G_INPUT() {
+void test_VIDIOC_G_INPUT()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	int f;
@@ -68,7 +70,8 @@
 	ret_get = ioctl(f, VIDIOC_G_INPUT, &index);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_G_INPUT, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_G_INPUT, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -83,7 +86,8 @@
 
 }
 
-void test_VIDIOC_S_INPUT_from_enum() {
+void test_VIDIOC_S_INPUT_from_enum()
+{
 	int ret_get, errno_get;
 	int ret_enum, errno_enum;
 	int ret_set, errno_set;
@@ -107,14 +111,18 @@
 			ret_enum = ioctl(f, VIDIOC_ENUMINPUT, &input);
 			errno_enum = errno;
 
-			dprintf("\tENUMINPUT: i=%u, ret_enum=%i, errno=%i\n", i, ret_enum, errno);
+			dprintf("\tENUMINPUT: i=%u, ret_enum=%i, errno=%i\n", i,
+				ret_enum, errno);
 
 			if (ret_enum == 0) {
-				ret_set = ioctl(f, VIDIOC_S_INPUT, &input.index);
+				ret_set =
+				    ioctl(f, VIDIOC_S_INPUT, &input.index);
 				errno_set = errno;
 				CU_ASSERT_EQUAL(ret_set, 0);
 
-				dprintf("\tinput.index=0x%X, ret_set=%i, errno_set=%i\n", input.index, ret_set, errno_set);
+				dprintf
+				    ("\tinput.index=0x%X, ret_set=%i, errno_set=%i\n",
+				     input.index, ret_set, errno_set);
 
 			}
 			i++;
@@ -129,13 +137,15 @@
 	}
 }
 
-static void do_set_input(int f, __u32 first_wrong_input, __u32 index) {
+static void do_set_input(int f, __u32 first_wrong_input, __u32 index)
+{
 	struct v4l2_input input;
 	int ret_set, errno_set;
 
 	if (first_wrong_input <= index) {
 
-		dprintf("\tdo_set_input(f, 0x%X, 0x%X)\n", first_wrong_input, index);
+		dprintf("\tdo_set_input(f, 0x%X, 0x%X)\n", first_wrong_input,
+			index);
 
 		memset(&input, 0xff, sizeof(input));
 		input.index = index;
@@ -152,7 +162,8 @@
 
 }
 
-void test_VIDIOC_S_INPUT_invalid_inputs() {
+void test_VIDIOC_S_INPUT_invalid_inputs()
+{
 	int ret_get, errno_get;
 	int ret_enum, errno_enum;
 	int ret_set, errno_set;
@@ -176,8 +187,9 @@
 			ret_enum = ioctl(f, VIDIOC_ENUMINPUT, &input);
 			errno_enum = errno;
 
-			dprintf("\t%s:%u: ENUMINPUT: i=%u, ret_enum=%i, errno_enum=%i\n",
-				__FILE__, __LINE__, i, ret_enum, errno_enum);
+			dprintf
+			    ("\t%s:%u: ENUMINPUT: i=%u, ret_enum=%i, errno_enum=%i\n",
+			     __FILE__, __LINE__, i, ret_enum, errno_enum);
 
 			i++;
 		} while (ret_enum == 0 && i != 0);
@@ -188,14 +200,15 @@
 			/* The input index range 0..(i-1) are valid inputs. */
 			/* Try index values from range i..U32_MAX */
 			do_set_input(f, first_wrong_input, i);
-			do_set_input(f, first_wrong_input, i+1);
+			do_set_input(f, first_wrong_input, i + 1);
 
 			/* Check for signed/unsigned mismatch near S32_MAX */
-			for (i = 0; i <= first_wrong_input+1; i++) {
-				do_set_input(f, first_wrong_input, ((__u32)S32_MAX) + i);
+			for (i = 0; i <= first_wrong_input + 1; i++) {
+				do_set_input(f, first_wrong_input,
+					     ((__u32) S32_MAX) + i);
 			}
 
-			i = (U32_MAX-1)-first_wrong_input;
+			i = (U32_MAX - 1) - first_wrong_input;
 			do {
 				do_set_input(f, first_wrong_input, i);
 				i++;
@@ -213,7 +226,8 @@
 	}
 }
 
-void test_VIDIOC_G_INPUT_NULL() {
+void test_VIDIOC_G_INPUT_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	__u32 index;
@@ -244,7 +258,8 @@
 
 }
 
-void test_VIDIOC_S_INPUT_NULL() {
+void test_VIDIOC_S_INPUT_NULL()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_JPEGCOMP.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_JPEGCOMP.c
index 6881045..6137f2e 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_JPEGCOMP.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_JPEGCOMP.c
@@ -29,15 +29,15 @@
 
 #include "test_VIDIOC_JPEGCOMP.h"
 
-static int valid_jpeg_markers(__u32 jpeg_markers) {
+static int valid_jpeg_markers(__u32 jpeg_markers)
+{
 	int valid = 0;
 
-	if ( (jpeg_markers & ~(V4L2_JPEG_MARKER_DHT |
-			       V4L2_JPEG_MARKER_DQT |
-			       V4L2_JPEG_MARKER_DRI |
-			       V4L2_JPEG_MARKER_COM |
-			       V4L2_JPEG_MARKER_APP))
-		== 0) {
+	if ((jpeg_markers & ~(V4L2_JPEG_MARKER_DHT |
+			      V4L2_JPEG_MARKER_DQT |
+			      V4L2_JPEG_MARKER_DRI |
+			      V4L2_JPEG_MARKER_COM | V4L2_JPEG_MARKER_APP))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -45,7 +45,8 @@
 	return valid;
 }
 
-void test_VIDIOC_G_JPEGCOMP() {
+void test_VIDIOC_G_JPEGCOMP()
+{
 	struct v4l2_jpegcompression jpegcomp;
 	int ret_get, errno_get;
 
@@ -53,7 +54,8 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_JPEGCOMP, &jpegcomp);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_G_JPEGCOMP, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_G_JPEGCOMP, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -75,14 +77,11 @@
 			".COM_len=%i, "
 			".COM_data=..., "
 			".jpeg_markers=0x%x ",
-			jpegcomp.quality,
-			jpegcomp.APPn,
-			jpegcomp.APP_len,
+			jpegcomp.quality, jpegcomp.APPn, jpegcomp.APP_len,
 			//jpegcomp.APP_data,
 			jpegcomp.COM_len,
 			//jpegcomp.COM_data,
-			jpegcomp.jpeg_markers
-		);
+			jpegcomp.jpeg_markers);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -91,7 +90,8 @@
 
 }
 
-void test_VIDIOC_G_JPEGCOMP_NULL() {
+void test_VIDIOC_G_JPEGCOMP_NULL()
+{
 	struct v4l2_jpegcompression jpegcomp;
 	int ret_get, errno_get;
 	int ret_null, errno_null;
@@ -100,12 +100,14 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_JPEGCOMP, &jpegcomp);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_G_JPEGCOMP, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_G_JPEGCOMP, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_G_JPEGCOMP, NULL);
 	errno_null = errno;
 
-	dprintf("\tVIDIOC_G_JPEGCOMP, ret_null=%i, errno_null=%i\n", ret_null, errno_null);
+	dprintf("\tVIDIOC_G_JPEGCOMP, ret_null=%i, errno_null=%i\n", ret_null,
+		errno_null);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_LOG_STATUS.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_LOG_STATUS.c
index 2b0693f..f98e8bd 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_LOG_STATUS.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_LOG_STATUS.c
@@ -28,7 +28,8 @@
 
 #include "test_VIDIOC_LOG_STATUS.h"
 
-void test_VIDIOC_LOG_STATUS() {
+void test_VIDIOC_LOG_STATUS()
+{
 	int ret_log, errno_log;
 
 	ret_log = ioctl(get_video_fd(), VIDIOC_LOG_STATUS);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_MODULATOR.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_MODULATOR.c
index 80d02db..d657134 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_MODULATOR.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_MODULATOR.c
@@ -31,17 +31,17 @@
 
 #include "test_VIDIOC_MODULATOR.h"
 
-int valid_modulator_sub(__u32 tuner_sub) {
+int valid_modulator_sub(__u32 tuner_sub)
+{
 	int valid = 0;
 
 	CU_ASSERT_EQUAL(V4L2_TUNER_SUB_SAP, V4L2_TUNER_SUB_LANG2);
 
-	if ( (tuner_sub & ~(V4L2_TUNER_SUB_MONO |
-			    V4L2_TUNER_SUB_STEREO |
-			    V4L2_TUNER_SUB_LANG1 |
-			    V4L2_TUNER_SUB_LANG2 |
-			    V4L2_TUNER_SUB_SAP))
-		== 0) {
+	if ((tuner_sub & ~(V4L2_TUNER_SUB_MONO |
+			   V4L2_TUNER_SUB_STEREO |
+			   V4L2_TUNER_SUB_LANG1 |
+			   V4L2_TUNER_SUB_LANG2 | V4L2_TUNER_SUB_SAP))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -49,7 +49,8 @@
 	return valid;
 }
 
-static int do_get_modulator(int f, __u32 index) {
+static int do_get_modulator(int f, __u32 index)
+{
 	int ret_get, errno_get;
 	struct v4l2_modulator modulator;
 	struct v4l2_modulator modulator2;
@@ -67,8 +68,9 @@
 
 		CU_ASSERT_EQUAL(modulator.index, index);
 
-		CU_ASSERT(0 < strlen( (char*)modulator.name ));
-		CU_ASSERT(valid_string((char*)modulator.name, sizeof(modulator.name)));
+		CU_ASSERT(0 < strlen((char *)modulator.name));
+		CU_ASSERT(valid_string
+			  ((char *)modulator.name, sizeof(modulator.name)));
 
 		CU_ASSERT(valid_modulator_capability(modulator.capability));
 
@@ -88,12 +90,15 @@
 		 */
 		memset(&modulator2, 0, sizeof(modulator2));
 		modulator2.index = modulator.index;
-		strncpy((char*)modulator2.name, (char*)modulator.name, sizeof(modulator2.name));
+		strncpy((char *)modulator2.name, (char *)modulator.name,
+			sizeof(modulator2.name));
 		modulator2.capability = modulator.capability;
 		modulator2.rangelow = modulator.rangelow;
 		modulator2.rangehigh = modulator.rangehigh;
 		modulator2.txsubchans = modulator.txsubchans;
-		CU_ASSERT_EQUAL(memcmp(&modulator, &modulator2, sizeof(modulator)), 0);
+		CU_ASSERT_EQUAL(memcmp
+				(&modulator, &modulator2, sizeof(modulator)),
+				0);
 
 		dprintf("\tmodulator = { "
 			".index = %u, "
@@ -111,13 +116,14 @@
 			modulator.txsubchans,
 			modulator.reserved[0],
 			modulator.reserved[1],
-			modulator.reserved[2],
-			modulator.reserved[3]
-		);
+			modulator.reserved[2], modulator.reserved[3]
+		    );
 
 	} else {
-		dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-		dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+		dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__,
+			__LINE__, ret_get, -1);
+		dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__,
+			__LINE__, errno_get, EINVAL);
 		CU_ASSERT_EQUAL(ret_get, -1);
 		CU_ASSERT_EQUAL(errno_get, EINVAL);
 	}
@@ -125,7 +131,8 @@
 	return ret_get;
 }
 
-void test_VIDIOC_G_MODULATOR() {
+void test_VIDIOC_G_MODULATOR()
+{
 	int ret;
 	__u32 index;
 	int f;
@@ -140,12 +147,13 @@
 
 }
 
-void test_VIDIOC_G_MODULATOR_S32_MAX() {
+void test_VIDIOC_G_MODULATOR_S32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_modulator modulator;
 
-	index = (__u32)S32_MAX;
+	index = (__u32) S32_MAX;
 
 	memset(&modulator, 0xff, sizeof(modulator));
 	modulator.index = index;
@@ -155,18 +163,21 @@
 	dprintf("\t%s:%u: VIDIOC_G_MODULATOR, ret_get=%i, errno_get=%i\n",
 		__FILE__, __LINE__, ret_get, errno_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_MODULATOR_S32_MAX_1() {
+void test_VIDIOC_G_MODULATOR_S32_MAX_1()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_modulator modulator;
 
-	index = (__u32)S32_MAX+1;
+	index = (__u32) S32_MAX + 1;
 
 	memset(&modulator, 0xff, sizeof(modulator));
 	modulator.index = index;
@@ -175,13 +186,16 @@
 
 	dprintf("VIDIOC_G_MODULATOR, ret_get=%i\n", ret_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_MODULATOR_U32_MAX() {
+void test_VIDIOC_G_MODULATOR_U32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_modulator modulator;
@@ -196,13 +210,16 @@
 	dprintf("\t%s:%u: VIDIOC_G_MODULATOR, ret_get=%i, errno_get=%i\n",
 		__FILE__, __LINE__, ret_get, errno_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_MODULATOR_NULL() {
+void test_VIDIOC_G_MODULATOR_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_modulator modulator;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_OUTPUT.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_OUTPUT.c
index 68130d5..e56cb84 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_OUTPUT.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_OUTPUT.c
@@ -29,7 +29,8 @@
 
 #include "test_VIDIOC_OUTPUT.h"
 
-int valid_output_index(int f, __u32 index) {
+int valid_output_index(int f, __u32 index)
+{
 	__u32 i;
 	struct v4l2_output output;
 	int ret_enum, errno_enum;
@@ -55,7 +56,8 @@
 	return valid;
 }
 
-void test_VIDIOC_G_OUTPUT() {
+void test_VIDIOC_G_OUTPUT()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	int f;
@@ -66,7 +68,8 @@
 	ret_get = ioctl(f, VIDIOC_G_OUTPUT, &index);
 	errno_get = errno;
 
-	dprintf("\tVIDIOC_G_OUTPUT, ret_get=%i, errno_get=%i\n", ret_get, errno_get);
+	dprintf("\tVIDIOC_G_OUTPUT, ret_get=%i, errno_get=%i\n", ret_get,
+		errno_get);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -81,7 +84,8 @@
 
 }
 
-void test_VIDIOC_S_OUTPUT_from_enum() {
+void test_VIDIOC_S_OUTPUT_from_enum()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	int ret_enum, errno_enum;
@@ -105,14 +109,19 @@
 			ret_enum = ioctl(f, VIDIOC_ENUMOUTPUT, &output);
 			errno_enum = errno;
 
-			dprintf("\tENUMOUTPUT: i=%u, ret_enum=%i, errno_enum=%i\n", i, ret_enum, errno_enum);
+			dprintf
+			    ("\tENUMOUTPUT: i=%u, ret_enum=%i, errno_enum=%i\n",
+			     i, ret_enum, errno_enum);
 
 			if (ret_enum == 0) {
-				ret_set = ioctl(f, VIDIOC_S_OUTPUT, &output.index);
+				ret_set =
+				    ioctl(f, VIDIOC_S_OUTPUT, &output.index);
 				errno_set = errno;
 				CU_ASSERT_EQUAL(ret_set, 0);
 
-				dprintf("\toutput.index=0x%X, ret_set=%i, errno_set=%i\n", output.index, ret_set, errno_set);
+				dprintf
+				    ("\toutput.index=0x%X, ret_set=%i, errno_set=%i\n",
+				     output.index, ret_set, errno_set);
 
 			}
 			i++;
@@ -128,13 +137,15 @@
 	}
 }
 
-static void do_set_output(int f, __u32 first_wrong_output, __u32 index) {
+static void do_set_output(int f, __u32 first_wrong_output, __u32 index)
+{
 	struct v4l2_output output;
 	int ret_set, errno_set;
 
 	if (first_wrong_output <= index) {
 
-		dprintf("\tdo_set_output(f, 0x%X, 0x%X)\n", first_wrong_output, index);
+		dprintf("\tdo_set_output(f, 0x%X, 0x%X)\n", first_wrong_output,
+			index);
 
 		memset(&output, 0xff, sizeof(output));
 		output.index = index;
@@ -144,13 +155,15 @@
 		CU_ASSERT_EQUAL(ret_set, -1);
 		CU_ASSERT_EQUAL(errno_set, EINVAL);
 
-		dprintf("\toutput.index=0x%X, ret_set=%i, errno_set=%i\n", output.index, ret_set, errno_set);
+		dprintf("\toutput.index=0x%X, ret_set=%i, errno_set=%i\n",
+			output.index, ret_set, errno_set);
 
 	}
 
 }
 
-void test_VIDIOC_S_OUTPUT_invalid_outputs() {
+void test_VIDIOC_S_OUTPUT_invalid_outputs()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	int ret_enum, errno_enum;
@@ -173,7 +186,9 @@
 			ret_enum = ioctl(f, VIDIOC_ENUMOUTPUT, &output);
 			errno_enum = errno;
 
-			dprintf("\tENUMOUTPUT: i=%u, ret_enum=%i, errno_enum=%i\n", i, ret_enum, errno_enum);
+			dprintf
+			    ("\tENUMOUTPUT: i=%u, ret_enum=%i, errno_enum=%i\n",
+			     i, ret_enum, errno_enum);
 
 			i++;
 		} while (ret_enum == 0 && i != 0);
@@ -184,14 +199,15 @@
 			/* The output index range 0..(i-1) are valid outputs. */
 			/* Try index values from range i..U32_MAX */
 			do_set_output(f, first_wrong_output, i);
-			do_set_output(f, first_wrong_output, i+1);
+			do_set_output(f, first_wrong_output, i + 1);
 
 			/* Check for signed/unsigned mismatch near S32_MAX */
-			for (i = 0; i <= first_wrong_output+1; i++) {
-				do_set_output(f, first_wrong_output, ((__u32)S32_MAX) + i);
+			for (i = 0; i <= first_wrong_output + 1; i++) {
+				do_set_output(f, first_wrong_output,
+					      ((__u32) S32_MAX) + i);
 			}
 
-			i = (U32_MAX-1)-first_wrong_output;
+			i = (U32_MAX - 1) - first_wrong_output;
 			do {
 				do_set_output(f, first_wrong_output, i);
 				i++;
@@ -208,7 +224,8 @@
 	}
 }
 
-void test_VIDIOC_G_OUTPUT_NULL() {
+void test_VIDIOC_G_OUTPUT_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	__u32 index;
@@ -239,7 +256,8 @@
 
 }
 
-void test_VIDIOC_S_OUTPUT_NULL() {
+void test_VIDIOC_S_OUTPUT_NULL()
+{
 	int ret_orig, errno_orig;
 	int ret_set, errno_set;
 	int ret_null, errno_null;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PARM.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PARM.c
index c319a75..fbf3a67 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PARM.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PARM.c
@@ -28,7 +28,8 @@
 
 #include "test_VIDIOC_PARM.h"
 
-int valid_v4l2_captureparm_capability(__u32 capability) {
+int valid_v4l2_captureparm_capability(__u32 capability)
+{
 	int valid = 0;
 
 	if ((capability & ~(V4L2_CAP_TIMEPERFRAME)) == 0) {
@@ -39,7 +40,8 @@
 	return valid;
 }
 
-int valid_v4l2_outputparm_capability(__u32 capability) {
+int valid_v4l2_outputparm_capability(__u32 capability)
+{
 	int valid = 0;
 
 	if ((capability & ~(V4L2_CAP_TIMEPERFRAME)) == 0) {
@@ -50,7 +52,8 @@
 	return valid;
 }
 
-int valid_v4l2_captureparm_capturemode(__u32 capturemode) {
+int valid_v4l2_captureparm_capturemode(__u32 capturemode)
+{
 	int valid = 0;
 
 	if ((capturemode & ~(V4L2_MODE_HIGHQUALITY)) == 0) {
@@ -61,7 +64,8 @@
 	return valid;
 }
 
-int valid_v4l2_outputparm_outputpmode(__u32 outputmode) {
+int valid_v4l2_outputparm_outputpmode(__u32 outputmode)
+{
 	int valid = 0;
 
 	if ((outputmode & ~(V4L2_MODE_HIGHQUALITY)) == 0) {
@@ -72,7 +76,8 @@
 	return valid;
 }
 
-static void do_get_param(enum v4l2_buf_type type) {
+static void do_get_param(enum v4l2_buf_type type)
+{
 	int ret_get, errno_get;
 	struct v4l2_streamparm parm;
 	struct v4l2_streamparm parm2;
@@ -90,96 +95,105 @@
 		CU_ASSERT_EQUAL(parm.type, type);
 
 		switch (parm.type) {
-			case V4L2_BUF_TYPE_VIDEO_CAPTURE:
-				dprintf("\t%s:%u: { .type=%i, parm.capture = { "
-					".capability = 0x%X, "
-					".capturemode = 0x%X, "
-					".timeperframe = { .numerator = %u, .denominator = %u }, "
-					".extendedmode = %u, "
-					".readbuffers = %u, "
-					"reserved[] = { 0x%X, 0x%X, 0x%X, 0x%X }}}\n",
-					__FILE__, __LINE__,
-					parm.type,
-					parm.parm.capture.capability,
-					parm.parm.capture.capturemode,
-					parm.parm.capture.timeperframe.numerator,
-					parm.parm.capture.timeperframe.denominator,
-					parm.parm.capture.extendedmode,
-					parm.parm.capture.readbuffers,
-					parm.parm.capture.reserved[0],
-					parm.parm.capture.reserved[1],
-					parm.parm.capture.reserved[2],
-					parm.parm.capture.reserved[3]
-					);
+		case V4L2_BUF_TYPE_VIDEO_CAPTURE:
+			dprintf("\t%s:%u: { .type=%i, parm.capture = { "
+				".capability = 0x%X, "
+				".capturemode = 0x%X, "
+				".timeperframe = { .numerator = %u, .denominator = %u }, "
+				".extendedmode = %u, "
+				".readbuffers = %u, "
+				"reserved[] = { 0x%X, 0x%X, 0x%X, 0x%X }}}\n",
+				__FILE__, __LINE__,
+				parm.type,
+				parm.parm.capture.capability,
+				parm.parm.capture.capturemode,
+				parm.parm.capture.timeperframe.numerator,
+				parm.parm.capture.timeperframe.denominator,
+				parm.parm.capture.extendedmode,
+				parm.parm.capture.readbuffers,
+				parm.parm.capture.reserved[0],
+				parm.parm.capture.reserved[1],
+				parm.parm.capture.reserved[2],
+				parm.parm.capture.reserved[3]
+			    );
 
-				CU_ASSERT(valid_v4l2_captureparm_capability(parm.parm.capture.capability));
-				CU_ASSERT(valid_v4l2_captureparm_capturemode(parm.parm.capture.capturemode));
+			CU_ASSERT(valid_v4l2_captureparm_capability
+				  (parm.parm.capture.capability));
+			CU_ASSERT(valid_v4l2_captureparm_capturemode
+				  (parm.parm.capture.capturemode));
 
-				if (parm.parm.capture.capability & V4L2_CAP_TIMEPERFRAME) {
-					//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.numerator, ???);
-					//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.denominator, ???);
-					CU_ASSERT(parm.parm.capture.timeperframe.denominator != 0);
-					// TODO: timerperframe: check struct v4l2_standard frameperiod field
-				} else {
-					//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.numerator, 0);
-					//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.denominator, 0);
-					CU_ASSERT(parm.parm.output.timeperframe.denominator != 0);
-				}
+			if (parm.parm.capture.
+			    capability & V4L2_CAP_TIMEPERFRAME) {
+				//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.numerator, ???);
+				//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.denominator, ???);
+				CU_ASSERT(parm.parm.capture.timeperframe.
+					  denominator != 0);
+				// TODO: timerperframe: check struct v4l2_standard frameperiod field
+			} else {
+				//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.numerator, 0);
+				//CU_ASSERT_EQUAL(parm.parm.capture.timeperframe.denominator, 0);
+				CU_ASSERT(parm.parm.output.timeperframe.
+					  denominator != 0);
+			}
 
-				//CU_ASSERT_EQUAL(parm.parm.capture.extendedmode, ???);
-				//CU_ASSERT_EQUAL(parm.parm.capture.readbuffers, ???);
+			//CU_ASSERT_EQUAL(parm.parm.capture.extendedmode, ???);
+			//CU_ASSERT_EQUAL(parm.parm.capture.readbuffers, ???);
 
-				CU_ASSERT_EQUAL(parm.parm.capture.reserved[0], 0);
-				CU_ASSERT_EQUAL(parm.parm.capture.reserved[1], 0);
-				CU_ASSERT_EQUAL(parm.parm.capture.reserved[2], 0);
-				CU_ASSERT_EQUAL(parm.parm.capture.reserved[3], 0);
-				break;
-			case V4L2_BUF_TYPE_VIDEO_OUTPUT:
-				dprintf("\t%s:%u: { .type=%i, parm.output = { "
-					".capability = 0x%X, "
-					".outputmode = 0x%X, "
-					".timeperframe = { .numerator = %u, .denominator = %u }, "
-					".extendedmode = %u, "
-					".writebuffers = %u, "
-					"reserved[] = { 0x%X, 0x%X, 0x%X, 0x%X }}}\n",
-					__FILE__, __LINE__,
-					parm.type,
-					parm.parm.output.capability,
-					parm.parm.output.outputmode,
-					parm.parm.output.timeperframe.numerator,
-					parm.parm.output.timeperframe.denominator,
-					parm.parm.output.extendedmode,
-					parm.parm.output.writebuffers,
-					parm.parm.output.reserved[0],
-					parm.parm.output.reserved[1],
-					parm.parm.output.reserved[2],
-					parm.parm.output.reserved[3]
-					);
+			CU_ASSERT_EQUAL(parm.parm.capture.reserved[0], 0);
+			CU_ASSERT_EQUAL(parm.parm.capture.reserved[1], 0);
+			CU_ASSERT_EQUAL(parm.parm.capture.reserved[2], 0);
+			CU_ASSERT_EQUAL(parm.parm.capture.reserved[3], 0);
+			break;
+		case V4L2_BUF_TYPE_VIDEO_OUTPUT:
+			dprintf("\t%s:%u: { .type=%i, parm.output = { "
+				".capability = 0x%X, "
+				".outputmode = 0x%X, "
+				".timeperframe = { .numerator = %u, .denominator = %u }, "
+				".extendedmode = %u, "
+				".writebuffers = %u, "
+				"reserved[] = { 0x%X, 0x%X, 0x%X, 0x%X }}}\n",
+				__FILE__, __LINE__,
+				parm.type,
+				parm.parm.output.capability,
+				parm.parm.output.outputmode,
+				parm.parm.output.timeperframe.numerator,
+				parm.parm.output.timeperframe.denominator,
+				parm.parm.output.extendedmode,
+				parm.parm.output.writebuffers,
+				parm.parm.output.reserved[0],
+				parm.parm.output.reserved[1],
+				parm.parm.output.reserved[2],
+				parm.parm.output.reserved[3]
+			    );
 
-				CU_ASSERT(valid_v4l2_outputparm_capability(parm.parm.output.capability));
-				CU_ASSERT(valid_v4l2_outputparm_outputpmode(parm.parm.output.outputmode));
+			CU_ASSERT(valid_v4l2_outputparm_capability
+				  (parm.parm.output.capability));
+			CU_ASSERT(valid_v4l2_outputparm_outputpmode
+				  (parm.parm.output.outputmode));
 
-				if (parm.parm.output.capability & V4L2_CAP_TIMEPERFRAME) {
-					//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.numerator, ???);
-					//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.denominator, ???);
-					CU_ASSERT(parm.parm.output.timeperframe.denominator != 0);
-					// TODO: timerperframe: check struct v4l2_standard frameperiod field
-				} else {
-					//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.numerator, 0);
-					//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.denominator, 0);
-					CU_ASSERT(parm.parm.output.timeperframe.denominator != 0);
-				}
+			if (parm.parm.output.capability & V4L2_CAP_TIMEPERFRAME) {
+				//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.numerator, ???);
+				//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.denominator, ???);
+				CU_ASSERT(parm.parm.output.timeperframe.
+					  denominator != 0);
+				// TODO: timerperframe: check struct v4l2_standard frameperiod field
+			} else {
+				//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.numerator, 0);
+				//CU_ASSERT_EQUAL(parm.parm.output.timeperframe.denominator, 0);
+				CU_ASSERT(parm.parm.output.timeperframe.
+					  denominator != 0);
+			}
 
-				//CU_ASSERT_EQUAL(parm.parm.output.extendedmode, ???);
-				//CU_ASSERT_EQUAL(parm.parm.output.writebuffers, ???);
+			//CU_ASSERT_EQUAL(parm.parm.output.extendedmode, ???);
+			//CU_ASSERT_EQUAL(parm.parm.output.writebuffers, ???);
 
-				CU_ASSERT_EQUAL(parm.parm.output.reserved[0], 0);
-				CU_ASSERT_EQUAL(parm.parm.output.reserved[1], 0);
-				CU_ASSERT_EQUAL(parm.parm.output.reserved[2], 0);
-				CU_ASSERT_EQUAL(parm.parm.output.reserved[3], 0);
-				break;
-			default:
-				;
+			CU_ASSERT_EQUAL(parm.parm.output.reserved[0], 0);
+			CU_ASSERT_EQUAL(parm.parm.output.reserved[1], 0);
+			CU_ASSERT_EQUAL(parm.parm.output.reserved[2], 0);
+			CU_ASSERT_EQUAL(parm.parm.output.reserved[3], 0);
+			break;
+		default:
+			;
 		}
 
 	} else {
@@ -196,13 +210,15 @@
 
 }
 
-void test_VIDIOC_G_PARM() {
+void test_VIDIOC_G_PARM()
+{
 	do_get_param(V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	do_get_param(V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	do_get_param(V4L2_BUF_TYPE_PRIVATE);
 }
 
-static void do_get_param_invalid(enum v4l2_buf_type type) {
+static void do_get_param_invalid(enum v4l2_buf_type type)
+{
 	int ret_get, errno_get;
 	struct v4l2_streamparm parm;
 	struct v4l2_streamparm parm2;
@@ -225,14 +241,15 @@
 	CU_ASSERT_EQUAL(memcmp(&parm, &parm2, sizeof(parm)), 0);
 }
 
-void test_VIDIOC_G_PARM_invalid() {
+void test_VIDIOC_G_PARM_invalid()
+{
 	do_get_param_invalid(S32_MIN);
 
-	 /* check if 0x80000001 is not treated as 1 (V4L2_BUF_TYPE_VIDEO_CAPTURE) */
-	do_get_param_invalid(S32_MIN+1);
+	/* check if 0x80000001 is not treated as 1 (V4L2_BUF_TYPE_VIDEO_CAPTURE) */
+	do_get_param_invalid(S32_MIN + 1);
 
-	 /* check if 0x80000002 is not treated as 2 (V4L2_BUF_TYPE_VIDEO_OUTPUT) */
-	do_get_param_invalid(S32_MIN+2);
+	/* check if 0x80000002 is not treated as 2 (V4L2_BUF_TYPE_VIDEO_OUTPUT) */
+	do_get_param_invalid(S32_MIN + 2);
 
 	do_get_param_invalid(S16_MIN);
 	do_get_param_invalid(0);
@@ -242,13 +259,14 @@
 	do_get_param_invalid(V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
 	do_get_param_invalid(V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
 	do_get_param_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
-	do_get_param_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY+1);
-	do_get_param_invalid(V4L2_BUF_TYPE_PRIVATE-1);
+	do_get_param_invalid(V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + 1);
+	do_get_param_invalid(V4L2_BUF_TYPE_PRIVATE - 1);
 	do_get_param_invalid(S16_MAX);
 	do_get_param_invalid(S32_MAX);
 }
 
-void test_VIDIOC_G_PARM_NULL() {
+void test_VIDIOC_G_PARM_NULL()
+{
 	int ret_capture, errno_capture;
 	int ret_output, errno_output;
 	int ret_private, errno_private;
@@ -261,33 +279,34 @@
 	parm.type = type;
 	ret_capture = ioctl(get_video_fd(), VIDIOC_G_PARM, &parm);
 	errno_capture = errno;
-	dprintf("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_capture=%i, errno_capture=%i\n",
-		__FILE__, __LINE__, type, ret_capture, errno_capture);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_capture=%i, errno_capture=%i\n",
+	     __FILE__, __LINE__, type, ret_capture, errno_capture);
 
 	type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
 	memset(&parm, 0, sizeof(parm));
 	parm.type = type;
 	ret_output = ioctl(get_video_fd(), VIDIOC_G_PARM, &parm);
 	errno_output = errno;
-	dprintf("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_output=%i, errno_output=%i\n",
-		__FILE__, __LINE__, type, ret_output, errno_output);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_output=%i, errno_output=%i\n",
+	     __FILE__, __LINE__, type, ret_output, errno_output);
 
 	type = V4L2_BUF_TYPE_PRIVATE;
 	memset(&parm, 0, sizeof(parm));
 	parm.type = type;
 	ret_private = ioctl(get_video_fd(), VIDIOC_G_PARM, &parm);
 	errno_private = errno;
-	dprintf("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_private=%i, errno_private=%i\n",
-		__FILE__, __LINE__, type, ret_private, errno_private);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_PARM, type=%i, ret_private=%i, errno_private=%i\n",
+	     __FILE__, __LINE__, type, ret_private, errno_private);
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_G_PARM, NULL);
 	errno_null = errno;
 	dprintf("\t%s:%u: VIDIOC_G_PARM, ret_null=%i, errno_null=%i\n",
 		__FILE__, __LINE__, ret_null, errno_null);
 
-	if (ret_capture == 0 ||
-	    ret_output == 0 ||
-	    ret_private == 0) {
+	if (ret_capture == 0 || ret_output == 0 || ret_private == 0) {
 		/* if at least one type is supported, then the
 		 * parameter shall be tested and the result shall be EFAULT
 		 */
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PRIORITY.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PRIORITY.c
index b11cac2..47947ac 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PRIORITY.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_PRIORITY.c
@@ -30,20 +30,21 @@
 
 #include "test_VIDIOC_PRIORITY.h"
 
-int valid_priority(enum v4l2_priority priority) {
+int valid_priority(enum v4l2_priority priority)
+{
 	int valid = 0;
 
 	CU_ASSERT_EQUAL(V4L2_PRIORITY_DEFAULT, V4L2_PRIORITY_INTERACTIVE);
 
 	switch (priority) {
-		case V4L2_PRIORITY_UNSET:
-		case V4L2_PRIORITY_BACKGROUND:
-		case V4L2_PRIORITY_INTERACTIVE:
-		case V4L2_PRIORITY_RECORD:
-			valid = 1;
-			break;
-		default:
-			valid = 0;
+	case V4L2_PRIORITY_UNSET:
+	case V4L2_PRIORITY_BACKGROUND:
+	case V4L2_PRIORITY_INTERACTIVE:
+	case V4L2_PRIORITY_RECORD:
+		valid = 1;
+		break;
+	default:
+		valid = 0;
 	}
 	return valid;
 }
@@ -64,7 +65,8 @@
 	CU_ASSERT_EQUAL(ret_set, 0);
 	if (ret_set == 0) {
 		memset(&new_priority, 0xff, sizeof(new_priority));
-		ret_get = ioctl(get_video_fd(), VIDIOC_G_PRIORITY, &new_priority);
+		ret_get =
+		    ioctl(get_video_fd(), VIDIOC_G_PRIORITY, &new_priority);
 		errno_get = errno;
 
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -81,7 +83,8 @@
 	int ret_get, errno_get;
 	enum v4l2_priority new_priority;
 
-	dprintf("\t%s:%u: try to set priority to %i\n", __FILE__, __LINE__, priority);
+	dprintf("\t%s:%u: try to set priority to %i\n", __FILE__, __LINE__,
+		priority);
 	ret_set = ioctl(get_video_fd(), VIDIOC_S_PRIORITY, &priority);
 	errno_set = errno;
 
@@ -92,7 +95,8 @@
 	CU_ASSERT_EQUAL(errno_set, EINVAL);
 	if (ret_set == -1 && errno_set == EINVAL) {
 		memset(&new_priority, 0xff, sizeof(new_priority));
-		ret_get = ioctl(get_video_fd(), VIDIOC_G_PRIORITY, &new_priority);
+		ret_get =
+		    ioctl(get_video_fd(), VIDIOC_G_PRIORITY, &new_priority);
 		errno_get = errno;
 
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -111,8 +115,9 @@
 	ret_get = ioctl(get_video_fd(), VIDIOC_G_PRIORITY, &orig_priority);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_PRIORITY, ret_get=%i, errno_get=%i, orig_priority=%i\n",
-		__FILE__, __LINE__, ret_get, errno_get, orig_priority);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_PRIORITY, ret_get=%i, errno_get=%i, orig_priority=%i\n",
+	     __FILE__, __LINE__, ret_get, errno_get, orig_priority);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
@@ -181,7 +186,8 @@
 		do_set_priority(V4L2_PRIORITY_INTERACTIVE);
 		do_set_priority(V4L2_PRIORITY_RECORD);
 
-		CU_ASSERT_EQUAL(V4L2_PRIORITY_DEFAULT, V4L2_PRIORITY_INTERACTIVE);
+		CU_ASSERT_EQUAL(V4L2_PRIORITY_DEFAULT,
+				V4L2_PRIORITY_INTERACTIVE);
 
 		do_set_priority(orig_priority);
 
@@ -212,7 +218,7 @@
 
 		do_set_invalid_priority(orig_priority, 4);
 		do_set_invalid_priority(orig_priority, S32_MAX);
-		do_set_invalid_priority(orig_priority, ((__u32)S32_MAX)+1);
+		do_set_invalid_priority(orig_priority, ((__u32) S32_MAX) + 1);
 		do_set_invalid_priority(orig_priority, U32_MAX);
 
 		do_set_priority(orig_priority);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYBUF.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYBUF.c
index 4074533..313f4b7 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYBUF.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYBUF.c
@@ -29,7 +29,9 @@
 #include "test_VIDIOC_REQBUFS.h"
 
 static void do_VIDIOC_QUERYBUF(enum v4l2_memory memory,
-		enum v4l2_buf_type type, __u32 count, int expected_ret_req) {
+			       enum v4l2_buf_type type, __u32 count,
+			       int expected_ret_req)
+{
 	int ret_req, errno_req;
 	int ret_query, errno_query;
 	struct v4l2_requestbuffers reqbuf;
@@ -46,12 +48,12 @@
 		V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,
 		V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,
 		V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY,
-		V4L2_BUF_TYPE_PRIVATE-1,
+		V4L2_BUF_TYPE_PRIVATE - 1,
 		V4L2_BUF_TYPE_PRIVATE,
-		V4L2_BUF_TYPE_PRIVATE+1,
+		V4L2_BUF_TYPE_PRIVATE + 1,
 		S32_MAX,
-		(__s32)((__u32)S32_MAX+1),
-		U32_MAX-1,
+		(__s32) ((__u32) S32_MAX + 1),
+		U32_MAX - 1,
 		U32_MAX
 	};
 
@@ -70,8 +72,9 @@
 		CU_ASSERT_EQUAL(errno_req, EINVAL);
 	}
 
-	dprintf("\t%s:%u: VIDIOC_REQBUF, count=%u, type=%i, memory=%i, ret_req=%i, errno_req=%i\n",
-		__FILE__, __LINE__, count, type, memory, ret_req, errno_req);
+	dprintf
+	    ("\t%s:%u: VIDIOC_REQBUF, count=%u, type=%i, memory=%i, ret_req=%i, errno_req=%i\n",
+	     __FILE__, __LINE__, count, type, memory, ret_req, errno_req);
 
 	if (ret_req == 0) {
 		show_v4l2_requestbuffers(&reqbuf);
@@ -92,7 +95,10 @@
 		CU_ASSERT_EQUAL(buf.index, i);
 		CU_ASSERT_EQUAL(buf.type, type);
 		//CU_ASSERT_EQUAL(buf.bytesused, ???);
-		CU_ASSERT_EQUAL(buf.flags & ~(V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE), 0);
+		CU_ASSERT_EQUAL(buf.
+				flags & ~(V4L2_BUF_FLAG_MAPPED |
+					  V4L2_BUF_FLAG_QUEUED |
+					  V4L2_BUF_FLAG_DONE), 0);
 		//CU_ASSERT_EQUAL(buf.field, ???);
 		//CU_ASSERT_EQUAL(buf.timestamp.tv_sec, ???);
 		//CU_ASSERT_EQUAL(buf.timestamp.tv_usec, ???);
@@ -114,8 +120,10 @@
 		//CU_ASSERT_EQUAL(buf.input, ???);
 		CU_ASSERT_EQUAL(buf.reserved, 0);
 
-		dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, buf.type, buf.index, ret_query,
+		     errno_query);
 		if (ret_query == 0)
 			show_v4l2_buffer(&buf);
 
@@ -125,20 +133,25 @@
 	 * buffer type
 	 */
 	for (i = 0; i < reqbuf.count; i++) {
-		for (j = 0; j < sizeof(buffer_types)/sizeof(*buffer_types); j++) {
+		for (j = 0; j < sizeof(buffer_types) / sizeof(*buffer_types);
+		     j++) {
 			if (buffer_types[j] != type) {
 				memset(&buf, 0xff, sizeof(buf));
 				buf.type = buffer_types[j];
 				buf.index = i;
 
-				ret_query = ioctl(get_video_fd(), VIDIOC_QUERYBUF, &buf);
+				ret_query =
+				    ioctl(get_video_fd(), VIDIOC_QUERYBUF,
+					  &buf);
 				errno_query = errno;
 
 				CU_ASSERT_EQUAL(ret_query, -1);
 				CU_ASSERT_EQUAL(errno_query, EINVAL);
 
-				dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-					__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+				dprintf
+				    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+				     __FILE__, __LINE__, buf.type, buf.index,
+				     ret_query, errno_query);
 				if (ret_query == 0)
 					show_v4l2_buffer(&buf);
 			}
@@ -152,37 +165,42 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYBUF, &buf);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
 
-	if (reqbuf.count < (__u32)S16_MIN) {
+	if (reqbuf.count < (__u32) S16_MIN) {
 		memset(&buf, 0xff, sizeof(buf));
 		buf.type = type;
-		buf.index = (__u32)S16_MIN;
+		buf.index = (__u32) S16_MIN;
 
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYBUF, &buf);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, buf.type, buf.index, ret_query,
+		     errno_query);
 
 		CU_ASSERT_EQUAL(ret_query, -1);
 		CU_ASSERT_EQUAL(errno_query, EINVAL);
 	}
 
-	if (reqbuf.count < (__u32)S16_MAX) {
+	if (reqbuf.count < (__u32) S16_MAX) {
 		memset(&buf, 0xff, sizeof(buf));
 		buf.type = type;
-		buf.index = (__u32)S16_MAX;
+		buf.index = (__u32) S16_MAX;
 
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYBUF, &buf);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, buf.type, buf.index, ret_query,
+		     errno_query);
 
 		CU_ASSERT_EQUAL(ret_query, -1);
 		CU_ASSERT_EQUAL(errno_query, EINVAL);
@@ -196,8 +214,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYBUF, &buf);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, buf.type, buf.index, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYBUF, type=%i, index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, buf.type, buf.index, ret_query,
+		     errno_query);
 
 		CU_ASSERT_EQUAL(ret_query, -1);
 		CU_ASSERT_EQUAL(errno_query, EINVAL);
@@ -225,7 +245,8 @@
 	}
 }
 
-void test_VIDIOC_QUERYBUF_capture_mmap() {
+void test_VIDIOC_QUERYBUF_capture_mmap()
+{
 	int ret_cap, errno_cap;
 	struct v4l2_capability cap;
 	int expected_ret_req;
@@ -243,17 +264,26 @@
 		expected_ret_req = -1;
 	}
 
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 1, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 3, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 4, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, (__u32)S16_MIN, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, (__u32)S16_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, U32_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 1,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 3,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE, 4,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   (__u32) S16_MIN, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   (__u32) S16_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   U32_MAX, expected_ret_req);
 }
 
-void test_VIDIOC_QUERYBUF_capture_userptr() {
+void test_VIDIOC_QUERYBUF_capture_userptr()
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -278,25 +308,34 @@
 
 	if (ret_cap == 0 &&
 	    (cap.capabilities & V4L2_CAP_STREAMING) &&
-	    (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) &&
-	    ret_req == 0) {
+	    (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) && ret_req == 0) {
 		expected_ret_req = 0;
 	} else {
 		expected_ret_req = -1;
 	}
 
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 1, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 3, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 4, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, (__u32)S16_MIN, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, (__u32)S16_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, U32_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 1,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 3,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 4,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   (__u32) S16_MIN, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   (__u32) S16_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   U32_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0,
+			   expected_ret_req);
 }
 
-void test_VIDIOC_QUERYBUF_output_mmap() {
+void test_VIDIOC_QUERYBUF_output_mmap()
+{
 	int ret_cap, errno_cap;
 	struct v4l2_capability cap;
 	int expected_ret_req;
@@ -314,18 +353,28 @@
 		expected_ret_req = -1;
 	}
 
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 1, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 3, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 4, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, (__u32)S16_MIN, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, (__u32)S16_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, U32_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 1,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 3,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 4,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   (__u32) S16_MIN, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   (__u32) S16_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   U32_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0,
+			   expected_ret_req);
 }
 
-void test_VIDIOC_QUERYBUF_output_userptr() {
+void test_VIDIOC_QUERYBUF_output_userptr()
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -350,76 +399,108 @@
 
 	if (ret_cap == 0 &&
 	    (cap.capabilities & V4L2_CAP_STREAMING) &&
-	    (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) &&
-	    ret_req == 0) {
+	    (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) && ret_req == 0) {
 		expected_ret_req = 0;
 	} else {
 		expected_ret_req = -1;
 	}
 
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 1, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 3, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 4, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, (__u32)S16_MIN, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, (__u32)S16_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, U32_MAX, expected_ret_req);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 1,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 3,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 4,
+			   expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   (__u32) S16_MIN, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   (__u32) S16_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   U32_MAX, expected_ret_req);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0,
+			   expected_ret_req);
 }
 
-void test_VIDIOC_QUERYBUF_overlay_capture() {
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, -1);
+void test_VIDIOC_QUERYBUF_overlay_capture()
+{
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2,
+			   -1);
 }
 
-void test_VIDIOC_QUERYBUF_overlay_output() {
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, -1);
+void test_VIDIOC_QUERYBUF_overlay_output()
+{
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2,
+			   -1);
 }
 
-void test_VIDIOC_QUERYBUF_invalid_memory_capture() {
+void test_VIDIOC_QUERYBUF_invalid_memory_capture()
+{
 	do_VIDIOC_QUERYBUF(SINT_MIN, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, -1);
 	do_VIDIOC_QUERYBUF(0, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY+1, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY + 1, V4L2_BUF_TYPE_VIDEO_CAPTURE,
+			   2, -1);
 	do_VIDIOC_QUERYBUF(SINT_MAX, V4L2_BUF_TYPE_VIDEO_CAPTURE, 2, -1);
 }
 
-void test_VIDIOC_QUERYBUF_invalid_memory_output() {
+void test_VIDIOC_QUERYBUF_invalid_memory_output()
+{
 	do_VIDIOC_QUERYBUF(SINT_MIN, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, -1);
 	do_VIDIOC_QUERYBUF(0, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY+1, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_OVERLAY + 1, V4L2_BUF_TYPE_VIDEO_OUTPUT,
+			   2, -1);
 	do_VIDIOC_QUERYBUF(SINT_MAX, V4L2_BUF_TYPE_VIDEO_OUTPUT, 2, -1);
 }
 
-void test_VIDIOC_QUERYBUF_invalid_type_mmap() {
+void test_VIDIOC_QUERYBUF_invalid_type_mmap()
+{
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, 0, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OVERLAY, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OVERLAY, 2,
+			   -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VBI_CAPTURE, 2, -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VBI_OUTPUT, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE-1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,
+			   2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, 2,
+			   -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY,
+			   2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE - 1, 2, -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE+1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE + 1, 2, -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, S32_MAX, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, (__s32)((__u32)S32_MAX+1), 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, U32_MAX-1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, (__s32) ((__u32) S32_MAX + 1), 2,
+			   -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, U32_MAX - 1, 2, -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_MMAP, U32_MAX, 2, -1);
 }
 
-void test_VIDIOC_QUERYBUF_invalid_type_userptr() {
+void test_VIDIOC_QUERYBUF_invalid_type_userptr()
+{
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, 0, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OVERLAY, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_CAPTURE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_OUTPUT, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE-1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OVERLAY, 2,
+			   -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_CAPTURE, 2,
+			   -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_OUTPUT, 2,
+			   -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR,
+			   V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,
+			   2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR,
+			   V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE - 1, 2,
+			   -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE+1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE + 1, 2,
+			   -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, S32_MAX, 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, (__s32)((__u32)S32_MAX+1), 2, -1);
-	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, U32_MAX-1, 2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, (__s32) ((__u32) S32_MAX + 1),
+			   2, -1);
+	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, U32_MAX - 1, 2, -1);
 	do_VIDIOC_QUERYBUF(V4L2_MEMORY_USERPTR, U32_MAX, 2, -1);
 }
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCAP.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCAP.c
index a896beb..58cac0c 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCAP.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCAP.c
@@ -33,31 +33,32 @@
 
 #include "test_VIDIOC_QUERYCAP.h"
 
-int valid_capabilities(__u32 capabilities) {
+int valid_capabilities(__u32 capabilities)
+{
 	int valid = 1;
 
 	if ((capabilities & ~(V4L2_CAP_VIDEO_CAPTURE |
-			     V4L2_CAP_VIDEO_OUTPUT |
-			     V4L2_CAP_VIDEO_OVERLAY |
-			     V4L2_CAP_VBI_CAPTURE |
-			     V4L2_CAP_VBI_OUTPUT |
-			     V4L2_CAP_SLICED_VBI_CAPTURE |
-			     V4L2_CAP_SLICED_VBI_OUTPUT |
-			     V4L2_CAP_RDS_CAPTURE |
-			     V4L2_CAP_VIDEO_OUTPUT_OVERLAY |
-			     V4L2_CAP_TUNER |
-			     V4L2_CAP_AUDIO |
-			     V4L2_CAP_RADIO |
-			     V4L2_CAP_READWRITE |
-			     V4L2_CAP_ASYNCIO |
-			     V4L2_CAP_STREAMING)) != 0) {
+			      V4L2_CAP_VIDEO_OUTPUT |
+			      V4L2_CAP_VIDEO_OVERLAY |
+			      V4L2_CAP_VBI_CAPTURE |
+			      V4L2_CAP_VBI_OUTPUT |
+			      V4L2_CAP_SLICED_VBI_CAPTURE |
+			      V4L2_CAP_SLICED_VBI_OUTPUT |
+			      V4L2_CAP_RDS_CAPTURE |
+			      V4L2_CAP_VIDEO_OUTPUT_OVERLAY |
+			      V4L2_CAP_TUNER |
+			      V4L2_CAP_AUDIO |
+			      V4L2_CAP_RADIO |
+			      V4L2_CAP_READWRITE |
+			      V4L2_CAP_ASYNCIO | V4L2_CAP_STREAMING)) != 0) {
 		valid = 0;
 	}
 
 	return valid;
 }
 
-void test_VIDIOC_QUERYCAP() {
+void test_VIDIOC_QUERYCAP()
+{
 	int ret;
 	struct v4l2_capability cap;
 	struct v4l2_capability cap2;
@@ -80,24 +81,23 @@
 		cap.version & 0xFF,
 		cap.capabilities,
 		cap.reserved[0],
-		cap.reserved[1],
-		cap.reserved[2],
-		cap.reserved[3]
-	);
+		cap.reserved[1], cap.reserved[2], cap.reserved[3]
+	    );
 
 	/* This ioctl must be implemented by ALL drivers */
 	CU_ASSERT_EQUAL(ret, 0);
 	if (ret == 0) {
-		CU_ASSERT(0 < strlen( (char*)cap.driver) );
-		CU_ASSERT(valid_string((char*)cap.driver, sizeof(cap.driver)));
+		CU_ASSERT(0 < strlen((char *)cap.driver));
+		CU_ASSERT(valid_string((char *)cap.driver, sizeof(cap.driver)));
 
-		CU_ASSERT(0 < strlen( (char*)cap.card) );
-		CU_ASSERT(valid_string((char*)cap.card, sizeof(cap.card)));
+		CU_ASSERT(0 < strlen((char *)cap.card));
+		CU_ASSERT(valid_string((char *)cap.card, sizeof(cap.card)));
 
 		/* cap.bus_info is allowed to be an empty string ("") if no
 		 * is info available
 		 */
-		CU_ASSERT(valid_string((char*)cap.bus_info, sizeof(cap.bus_info)));
+		CU_ASSERT(valid_string
+			  ((char *)cap.bus_info, sizeof(cap.bus_info)));
 
 		//CU_ASSERT_EQUAL(cap.version, ?);
 		CU_ASSERT(valid_capabilities(cap.capabilities));
@@ -113,9 +113,11 @@
 		 * byte is also filled with zeros.
 		 */
 		memset(&cap2, 0, sizeof(cap2));
-		strncpy((char*)cap2.driver, (char*)cap.driver, sizeof(cap2.driver));
-		strncpy((char*)cap2.card, (char*)cap.card, sizeof(cap2.card));
-		strncpy((char*)cap2.bus_info, (char*)cap.bus_info, sizeof(cap2.bus_info));
+		strncpy((char *)cap2.driver, (char *)cap.driver,
+			sizeof(cap2.driver));
+		strncpy((char *)cap2.card, (char *)cap.card, sizeof(cap2.card));
+		strncpy((char *)cap2.bus_info, (char *)cap.bus_info,
+			sizeof(cap2.bus_info));
 		cap2.version = cap.version;
 		cap2.capabilities = cap.capabilities;
 		CU_ASSERT_EQUAL(memcmp(&cap, &cap2, sizeof(cap)), 0);
@@ -124,7 +126,8 @@
 
 }
 
-void test_VIDIOC_QUERYCAP_NULL() {
+void test_VIDIOC_QUERYCAP_NULL()
+{
 	int ret_null, errno_null;
 
 	ret_null = ioctl(get_video_fd(), VIDIOC_QUERYCAP, NULL);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCTRL.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCTRL.c
index c6f2597..8ee703e 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCTRL.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYCTRL.c
@@ -30,16 +30,16 @@
 
 #include "test_VIDIOC_QUERYCTRL.h"
 
-static int valid_control_flag(__u32 flags) {
+static int valid_control_flag(__u32 flags)
+{
 	int valid = 0;
 
-	if ( (flags & ~(V4L2_CTRL_FLAG_DISABLED |
-			V4L2_CTRL_FLAG_GRABBED |
-			V4L2_CTRL_FLAG_READ_ONLY |
-			V4L2_CTRL_FLAG_UPDATE |
-			V4L2_CTRL_FLAG_INACTIVE |
-			V4L2_CTRL_FLAG_SLIDER))
-		== 0) {
+	if ((flags & ~(V4L2_CTRL_FLAG_DISABLED |
+		       V4L2_CTRL_FLAG_GRABBED |
+		       V4L2_CTRL_FLAG_READ_ONLY |
+		       V4L2_CTRL_FLAG_UPDATE |
+		       V4L2_CTRL_FLAG_INACTIVE | V4L2_CTRL_FLAG_SLIDER))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -47,7 +47,8 @@
 	return valid;
 }
 
-static int valid_control_type(__u32 type) {
+static int valid_control_type(__u32 type)
+{
 	int valid = 0;
 
 	switch (type) {
@@ -65,7 +66,8 @@
 	return valid;
 }
 
-void test_VIDIOC_QUERYCTRL() {
+void test_VIDIOC_QUERYCTRL()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
@@ -92,42 +94,53 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
 			CU_ASSERT_EQUAL(queryctrl.id, i);
 
-			CU_ASSERT(0 < strlen( (char*)queryctrl.name ));
-			CU_ASSERT(valid_string((char*)queryctrl.name, sizeof(queryctrl.name)));
+			CU_ASSERT(0 < strlen((char *)queryctrl.name));
+			CU_ASSERT(valid_string
+				  ((char *)queryctrl.name,
+				   sizeof(queryctrl.name)));
 
 			CU_ASSERT(valid_control_type(queryctrl.type));
 
 			switch (queryctrl.type) {
 			case V4L2_CTRL_TYPE_INTEGER:
 				/* min < max, because otherwise this control makes no sense */
-				CU_ASSERT(queryctrl.minimum < queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <
+					  queryctrl.maximum);
 
 				CU_ASSERT(0 < queryctrl.step);
 
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
-				CU_ASSERT(queryctrl.default_value <= queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
+				CU_ASSERT(queryctrl.default_value <=
+					  queryctrl.maximum);
 				break;
 
 			case V4L2_CTRL_TYPE_BOOLEAN:
 				CU_ASSERT_EQUAL(queryctrl.minimum, 0);
 				CU_ASSERT_EQUAL(queryctrl.maximum, 1);
 				CU_ASSERT_EQUAL(queryctrl.step, 1);
-				CU_ASSERT((queryctrl.default_value == 0) || (queryctrl.default_value == 1));
+				CU_ASSERT((queryctrl.default_value == 0)
+					  || (queryctrl.default_value == 1));
 				break;
 
 			case V4L2_CTRL_TYPE_MENU:
 				CU_ASSERT_EQUAL(queryctrl.minimum, 0);
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
 				CU_ASSERT_EQUAL(queryctrl.step, 1);
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
-				CU_ASSERT(queryctrl.default_value <= queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
+				CU_ASSERT(queryctrl.default_value <=
+					  queryctrl.maximum);
 				break;
 
 			case V4L2_CTRL_TYPE_BUTTON:
@@ -137,7 +150,7 @@
 				CU_ASSERT_EQUAL(queryctrl.default_value, 0);
 				break;
 
-			case V4L2_CTRL_TYPE_INTEGER64: /* fallthrough */
+			case V4L2_CTRL_TYPE_INTEGER64:	/* fallthrough */
 			case V4L2_CTRL_TYPE_CTRL_CLASS:
 				/* These parameters are defined as n/a by V4L2, so
 				 * they should be filled with zeros, the same like
@@ -169,30 +182,27 @@
 			memset(&queryctrl2, 0, sizeof(queryctrl2));
 			queryctrl2.id = queryctrl.id;
 			queryctrl2.type = queryctrl.type;
-			strncpy((char*)queryctrl2.name, (char*)queryctrl.name, sizeof(queryctrl2.name));
+			strncpy((char *)queryctrl2.name, (char *)queryctrl.name,
+				sizeof(queryctrl2.name));
 			queryctrl2.minimum = queryctrl.minimum;
 			queryctrl2.maximum = queryctrl.maximum;
 			queryctrl2.step = queryctrl.step;
 			queryctrl2.default_value = queryctrl.default_value;
 			queryctrl2.flags = queryctrl.flags;
-			CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&queryctrl, &queryctrl2,
+					 sizeof(queryctrl)), 0);
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_query, -1);
@@ -200,36 +210,41 @@
 
 			memset(&queryctrl2, 0xff, sizeof(queryctrl2));
 			queryctrl2.id = i;
-			CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&queryctrl, &queryctrl2,
+					 sizeof(queryctrl)), 0);
 
 		}
 	}
 
 }
 
-void test_VIDIOC_QUERYCTRL_BASE_1() {
+void test_VIDIOC_QUERYCTRL_BASE_1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
 
 	memset(&queryctrl, 0xff, sizeof(queryctrl));
-	queryctrl.id = V4L2_CID_BASE-1;
+	queryctrl.id = V4L2_CID_BASE - 1;
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE-1), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, V4L2_CID_BASE-1, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE-1), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, V4L2_CID_BASE - 1, ret_query, errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
 
 	memset(&queryctrl2, 0xff, sizeof(queryctrl2));
-	queryctrl2.id = V4L2_CID_BASE-1;
+	queryctrl2.id = V4L2_CID_BASE - 1;
 	CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
 
 }
 
-void test_VIDIOC_QUERYCTRL_LASTP1() {
+void test_VIDIOC_QUERYCTRL_LASTP1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
@@ -239,8 +254,9 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_LASTP1), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, V4L2_CID_LASTP1, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_LASTP1), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, V4L2_CID_LASTP1, ret_query, errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
@@ -251,33 +267,36 @@
 
 }
 
-void test_VIDIOC_QUERYCTRL_LASTP1_1() {
+void test_VIDIOC_QUERYCTRL_LASTP1_1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
 
 	memset(&queryctrl, 0xff, sizeof(queryctrl));
-	queryctrl.id = V4L2_CID_LASTP1+1;
+	queryctrl.id = V4L2_CID_LASTP1 + 1;
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_LASTP1+1), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, V4L2_CID_LASTP1+1, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_LASTP1+1), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, V4L2_CID_LASTP1 + 1, ret_query, errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
 
 	memset(&queryctrl2, 0xff, sizeof(queryctrl2));
-	queryctrl2.id = V4L2_CID_LASTP1+1;
+	queryctrl2.id = V4L2_CID_LASTP1 + 1;
 	CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
 
 }
 
-void test_VIDIOC_QUERYCTRL_flag_NEXT_CTRL() {
+void test_VIDIOC_QUERYCTRL_flag_NEXT_CTRL()
+{
 	int ret_query, errno_query;
-	char count_controls1[V4L2_CID_LASTP1-V4L2_CID_BASE];
-	char count_controls2[V4L2_CID_LASTP1-V4L2_CID_BASE];
-	struct v4l2_queryctrl controls[V4L2_CID_LASTP1-V4L2_CID_BASE];
+	char count_controls1[V4L2_CID_LASTP1 - V4L2_CID_BASE];
+	char count_controls2[V4L2_CID_LASTP1 - V4L2_CID_BASE];
+	struct v4l2_queryctrl controls[V4L2_CID_LASTP1 - V4L2_CID_BASE];
 	struct v4l2_queryctrl queryctrl;
 	__u32 i;
 
@@ -295,25 +314,19 @@
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
 			CU_ASSERT_EQUAL(queryctrl.id, i);
-			count_controls1[i-V4L2_CID_BASE]++;
-			controls[i-V4L2_CID_BASE] = queryctrl;
+			count_controls1[i - V4L2_CID_BASE]++;
+			controls[i - V4L2_CID_BASE] = queryctrl;
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_query, -1);
@@ -329,7 +342,9 @@
 	i = 0;
 	memset(&queryctrl, 0xff, sizeof(queryctrl));
 	queryctrl.id = i | V4L2_CTRL_FLAG_NEXT_CTRL;
-	dprintf("\tasking for id=%i=V4L2_CID_BASE+%i | V4L2_CTRL_FLAG_NEXT_CTRL\n", i, i-V4L2_CID_BASE);
+	dprintf
+	    ("\tasking for id=%i=V4L2_CID_BASE+%i | V4L2_CTRL_FLAG_NEXT_CTRL\n",
+	     i, i - V4L2_CID_BASE);
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
@@ -338,9 +353,14 @@
 	if (ret_query == 0) {
 		do {
 			/* protect the count_controls2[] from overindexing */
-			if ((V4L2_CID_BASE <= queryctrl.id) && (queryctrl.id < V4L2_CID_LASTP1)) {
-				count_controls2[queryctrl.id-V4L2_CID_BASE]++;
-				CU_ASSERT_EQUAL(memcmp(&queryctrl, &controls[queryctrl.id-V4L2_CID_BASE], sizeof(queryctrl)), 0);
+			if ((V4L2_CID_BASE <= queryctrl.id)
+			    && (queryctrl.id < V4L2_CID_LASTP1)) {
+				count_controls2[queryctrl.id - V4L2_CID_BASE]++;
+				CU_ASSERT_EQUAL(memcmp
+						(&queryctrl,
+						 &controls[queryctrl.id -
+							   V4L2_CID_BASE],
+						 sizeof(queryctrl)), 0);
 			}
 
 			/* "The VIDIOC_QUERYCTRL ioctl will return the first
@@ -351,33 +371,32 @@
 			CU_ASSERT(V4L2_CID_BASE <= queryctrl.id);
 			CU_ASSERT(queryctrl.id < V4L2_CID_LASTP1);
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 			i = queryctrl.id;
 			memset(&queryctrl, 0xff, sizeof(queryctrl));
 			queryctrl.id = i | V4L2_CTRL_FLAG_NEXT_CTRL;
-			dprintf("\tasking for id=%i=V4L2_CID_BASE+%i | V4L2_CTRL_FLAG_NEXT_CTRL\n", i, i-V4L2_CID_BASE);
-			ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
+			dprintf
+			    ("\tasking for id=%i=V4L2_CID_BASE+%i | V4L2_CTRL_FLAG_NEXT_CTRL\n",
+			     i, i - V4L2_CID_BASE);
+			ret_query =
+			    ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 			errno_query = errno;
 
 			dprintf("\tret_query=%i\n", ret_query);
 
-		} while (ret_query == 0 && V4L2_CTRL_ID2CLASS(queryctrl.id) == V4L2_CTRL_CLASS_USER);
+		} while (ret_query == 0
+			 && V4L2_CTRL_ID2CLASS(queryctrl.id) ==
+			 V4L2_CTRL_CLASS_USER);
 
 		if (ret_query == 0) {
 			/* some other controls also exists, stop for now. */
@@ -390,22 +409,29 @@
 		 * V4L2_CTRL_FLAG_NEXT_CTRL and without using it.
 		 * This also checks if one control is not reported twice.
 		 */
-		CU_ASSERT_EQUAL(memcmp(count_controls1, count_controls2, sizeof(count_controls1)), 0);
+		CU_ASSERT_EQUAL(memcmp
+				(count_controls1, count_controls2,
+				 sizeof(count_controls1)), 0);
 
 		dprintf1("count_controls1 = { ");
-		for (i=0; i<sizeof(count_controls1)/sizeof(*count_controls1); i++) {
-		    dprintf("%i ", count_controls1[i]);
+		for (i = 0;
+		     i < sizeof(count_controls1) / sizeof(*count_controls1);
+		     i++) {
+			dprintf("%i ", count_controls1[i]);
 		}
 		dprintf1("}\n");
 
 		dprintf1("count_controls2 = { ");
-		for (i=0; i<sizeof(count_controls2)/sizeof(*count_controls2); i++) {
-		    dprintf("%i ", count_controls2[i]);
+		for (i = 0;
+		     i < sizeof(count_controls2) / sizeof(*count_controls2);
+		     i++) {
+			dprintf("%i ", count_controls2[i]);
 		}
 		dprintf1("}\n");
 
 	} else {
-		dprintf1("V4L2_CTRL_FLAG_NEXT_CTRL is not supported or no control is available\n");
+		dprintf1
+		    ("V4L2_CTRL_FLAG_NEXT_CTRL is not supported or no control is available\n");
 		/* The flag V4L2_CTRL_FLAG_NEXT_CTRL is not supported
 		 * or no control is avaliable at all. Do not continue the
 		 * enumeration.
@@ -416,7 +442,8 @@
 
 }
 
-void test_VIDIOC_QUERYCTRL_private() {
+void test_VIDIOC_QUERYCTRL_private()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
@@ -429,42 +456,53 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
 			CU_ASSERT_EQUAL(queryctrl.id, i);
 
-			CU_ASSERT(0 < strlen( (char*)queryctrl.name ));
-			CU_ASSERT(valid_string((char*)queryctrl.name, sizeof(queryctrl.name)));
+			CU_ASSERT(0 < strlen((char *)queryctrl.name));
+			CU_ASSERT(valid_string
+				  ((char *)queryctrl.name,
+				   sizeof(queryctrl.name)));
 
 			CU_ASSERT(valid_control_type(queryctrl.type));
 
 			switch (queryctrl.type) {
 			case V4L2_CTRL_TYPE_INTEGER:
 				/* min < max, because otherwise this control makes no sense */
-				CU_ASSERT(queryctrl.minimum < queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <
+					  queryctrl.maximum);
 
 				CU_ASSERT(0 < queryctrl.step);
 
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
-				CU_ASSERT(queryctrl.default_value <= queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
+				CU_ASSERT(queryctrl.default_value <=
+					  queryctrl.maximum);
 				break;
 
 			case V4L2_CTRL_TYPE_BOOLEAN:
 				CU_ASSERT_EQUAL(queryctrl.minimum, 0);
 				CU_ASSERT_EQUAL(queryctrl.maximum, 1);
 				CU_ASSERT_EQUAL(queryctrl.step, 1);
-				CU_ASSERT((queryctrl.default_value == 0) || (queryctrl.default_value == 1));
+				CU_ASSERT((queryctrl.default_value == 0)
+					  || (queryctrl.default_value == 1));
 				break;
 
 			case V4L2_CTRL_TYPE_MENU:
 				CU_ASSERT_EQUAL(queryctrl.minimum, 0);
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
 				CU_ASSERT_EQUAL(queryctrl.step, 1);
-				CU_ASSERT(queryctrl.minimum <= queryctrl.default_value);
-				CU_ASSERT(queryctrl.default_value <= queryctrl.maximum);
+				CU_ASSERT(queryctrl.minimum <=
+					  queryctrl.default_value);
+				CU_ASSERT(queryctrl.default_value <=
+					  queryctrl.maximum);
 				break;
 
 			case V4L2_CTRL_TYPE_BUTTON:
@@ -474,7 +512,7 @@
 				CU_ASSERT_EQUAL(queryctrl.default_value, 0);
 				break;
 
-			case V4L2_CTRL_TYPE_INTEGER64: /* fallthrough */
+			case V4L2_CTRL_TYPE_INTEGER64:	/* fallthrough */
 			case V4L2_CTRL_TYPE_CTRL_CLASS:
 				/* These parameters are defined as n/a by V4L2, so
 				 * they should be filled with zeros, the same like
@@ -506,30 +544,27 @@
 			memset(&queryctrl2, 0, sizeof(queryctrl2));
 			queryctrl2.id = queryctrl.id;
 			queryctrl2.type = queryctrl.type;
-			strncpy((char*)queryctrl2.name, (char*)queryctrl.name, sizeof(queryctrl2.name));
+			strncpy((char *)queryctrl2.name, (char *)queryctrl.name,
+				sizeof(queryctrl2.name));
 			queryctrl2.minimum = queryctrl.minimum;
 			queryctrl2.maximum = queryctrl.maximum;
 			queryctrl2.step = queryctrl.step;
 			queryctrl2.default_value = queryctrl.default_value;
 			queryctrl2.flags = queryctrl.flags;
-			CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&queryctrl, &queryctrl2,
+					 sizeof(queryctrl)), 0);
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 		} else {
 			CU_ASSERT_EQUAL(ret_query, -1);
@@ -537,36 +572,42 @@
 
 			memset(&queryctrl2, 0xff, sizeof(queryctrl2));
 			queryctrl2.id = i;
-			CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
+			CU_ASSERT_EQUAL(memcmp
+					(&queryctrl, &queryctrl2,
+					 sizeof(queryctrl)), 0);
 
 		}
 	} while (ret_query == 0);
 
 }
 
-void test_VIDIOC_QUERYCTRL_private_base_1() {
+void test_VIDIOC_QUERYCTRL_private_base_1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
 
 	memset(&queryctrl, 0xff, sizeof(queryctrl));
-	queryctrl.id = V4L2_CID_PRIVATE_BASE-1;
+	queryctrl.id = V4L2_CID_PRIVATE_BASE - 1;
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE-1), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, V4L2_CID_PRIVATE_BASE-1, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE-1), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, V4L2_CID_PRIVATE_BASE - 1, ret_query,
+	     errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
 
 	memset(&queryctrl2, 0xff, sizeof(queryctrl2));
-	queryctrl2.id = V4L2_CID_PRIVATE_BASE-1;
+	queryctrl2.id = V4L2_CID_PRIVATE_BASE - 1;
 	CU_ASSERT_EQUAL(memcmp(&queryctrl, &queryctrl2, sizeof(queryctrl)), 0);
 
 }
 
-void test_VIDIOC_QUERYCTRL_private_last_1() {
+void test_VIDIOC_QUERYCTRL_private_last_1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	struct v4l2_queryctrl queryctrl2;
@@ -586,8 +627,10 @@
 	queryctrl.id = i;
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 
-	dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%u), ret_query=%i, errno_query=%i\n",
-		__FILE__, __LINE__, i, i-V4L2_CID_PRIVATE_BASE, ret_query, errno_query);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%u), ret_query=%i, errno_query=%i\n",
+	     __FILE__, __LINE__, i, i - V4L2_CID_PRIVATE_BASE, ret_query,
+	     errno_query);
 
 	CU_ASSERT_EQUAL(ret_query, -1);
 	CU_ASSERT_EQUAL(errno_query, EINVAL);
@@ -598,7 +641,8 @@
 
 }
 
-void test_VIDIOC_QUERYCTRL_NULL() {
+void test_VIDIOC_QUERYCTRL_NULL()
+{
 	int ret_query, errno_query;
 	int ret_null, errno_null;
 	struct v4l2_queryctrl queryctrl;
@@ -614,8 +658,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
@@ -633,8 +679,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_PRIVATE_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_PRIVATE_BASE,
+		     ret_query, errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYMENU.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYMENU.c
index f252fec..e7d35e9 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYMENU.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYMENU.c
@@ -40,17 +40,13 @@
 
 		dprintf("\tmenu = {.id=%u, .index=%i, .name=\"%s\", "
 			".reserved=0x%X }\n",
-			menu->id,
-			menu->index,
-			menu->name,
-			menu->reserved
-			);
+			menu->id, menu->index, menu->name, menu->reserved);
 
 		CU_ASSERT_EQUAL(menu->id, id);
 		CU_ASSERT_EQUAL(menu->index, index);
 
-		CU_ASSERT(0 < strlen((char*)menu->name));
-		CU_ASSERT(valid_string((char*)menu->name, sizeof(menu->name)));
+		CU_ASSERT(0 < strlen((char *)menu->name));
+		CU_ASSERT(valid_string((char *)menu->name, sizeof(menu->name)));
 
 		CU_ASSERT_EQUAL(menu->reserved, 0);
 
@@ -62,7 +58,8 @@
 		memset(&menu2, 0, sizeof(menu2));
 		menu2.id = id;
 		menu2.index = index;
-		strncpy((char*)menu2.name, (char*)menu->name, sizeof(menu2.name));
+		strncpy((char *)menu2.name, (char *)menu->name,
+			sizeof(menu2.name));
 		CU_ASSERT_EQUAL(memcmp(menu, &menu2, sizeof(*menu)), 0);
 
 	} else {
@@ -76,7 +73,8 @@
 	}
 }
 
-static void do_query_menu(__u32 id) {
+static void do_query_menu(__u32 id)
+{
 	int ret_query, errno_query;
 	__u32 i;
 	struct v4l2_querymenu menu;
@@ -90,8 +88,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYMENU, &menu);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, i, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, i, ret_query,
+		     errno_query);
 
 		do_check_menu(id, i, ret_query, errno_query, &menu);
 
@@ -100,20 +100,21 @@
 
 }
 
-static void do_query_menu_invalid(__u32 id) {
+static void do_query_menu_invalid(__u32 id)
+{
 	int ret_query, errno_query;
 	unsigned int i;
 	struct v4l2_querymenu menu;
 	const __u32 test_index[] = {
 		U32_MIN,
-		U32_MIN+1,
-		(__u32)S32_MIN,
-		(__u32)S32_MAX,
-		U32_MAX-1,
+		U32_MIN + 1,
+		(__u32) S32_MIN,
+		(__u32) S32_MAX,
+		U32_MAX - 1,
 		U32_MAX
 	};
 
-	for (i = 0; i < sizeof(test_index)/sizeof(*test_index); i++) {
+	for (i = 0; i < sizeof(test_index) / sizeof(*test_index); i++) {
 		memset(&menu, 0xff, sizeof(menu));
 		menu.id = id;
 		menu.index = test_index[i];
@@ -121,8 +122,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYMENU, &menu);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, id, id-V4L2_CID_BASE, test_index[i], ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, id, id - V4L2_CID_BASE, test_index[i],
+		     ret_query, errno_query);
 
 		CU_ASSERT_EQUAL(ret_query, -1);
 		CU_ASSERT_EQUAL(errno_query, EINVAL);
@@ -133,7 +136,8 @@
 
 }
 
-void test_VIDIOC_QUERYMENU() {
+void test_VIDIOC_QUERYMENU()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	__u32 i;
@@ -145,29 +149,25 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
 			CU_ASSERT_EQUAL(queryctrl.id, i);
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 			switch (queryctrl.type) {
 			case V4L2_CTRL_TYPE_MENU:
@@ -194,15 +194,17 @@
 
 }
 
-void test_VIDIOC_QUERYMENU_invalid() {
+void test_VIDIOC_QUERYMENU_invalid()
+{
 	do_query_menu_invalid(0);
-	do_query_menu_invalid(V4L2_CID_BASE-1);
+	do_query_menu_invalid(V4L2_CID_BASE - 1);
 	do_query_menu_invalid(V4L2_CID_LASTP1);
-	do_query_menu_invalid(V4L2_CID_LASTP1+1);
-	do_query_menu_invalid(V4L2_CID_PRIVATE_BASE-1);
+	do_query_menu_invalid(V4L2_CID_LASTP1 + 1);
+	do_query_menu_invalid(V4L2_CID_PRIVATE_BASE - 1);
 }
 
-void test_VIDIOC_QUERYMENU_private() {
+void test_VIDIOC_QUERYMENU_private()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	__u32 i;
@@ -214,29 +216,25 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
 			CU_ASSERT_EQUAL(queryctrl.id, i);
 
-			dprintf("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
-				".minimum=%i, .maximum=%i, .step=%i, "
-				".default_value=%i, "
-				".flags=0x%X, "
-				".reserved[]={ 0x%X, 0x%X } }\n",
-				queryctrl.id,
-				queryctrl.type,
-				queryctrl.name,
-				queryctrl.minimum,
-				queryctrl.maximum,
-				queryctrl.step,
-				queryctrl.default_value,
-				queryctrl.flags,
-				queryctrl.reserved[0],
-				queryctrl.reserved[1]
-				);
+			dprintf
+			    ("\tqueryctrl = {.id=%u, .type=%i, .name=\"%s\", "
+			     ".minimum=%i, .maximum=%i, .step=%i, "
+			     ".default_value=%i, " ".flags=0x%X, "
+			     ".reserved[]={ 0x%X, 0x%X } }\n", queryctrl.id,
+			     queryctrl.type, queryctrl.name, queryctrl.minimum,
+			     queryctrl.maximum, queryctrl.step,
+			     queryctrl.default_value, queryctrl.flags,
+			     queryctrl.reserved[0], queryctrl.reserved[1]
+			    );
 
 			switch (queryctrl.type) {
 			case V4L2_CTRL_TYPE_MENU:
@@ -246,7 +244,7 @@
 			case V4L2_CTRL_TYPE_INTEGER:
 			case V4L2_CTRL_TYPE_BOOLEAN:
 			case V4L2_CTRL_TYPE_BUTTON:
-			case V4L2_CTRL_TYPE_INTEGER64: /* fallthrough */
+			case V4L2_CTRL_TYPE_INTEGER64:	/* fallthrough */
 			case V4L2_CTRL_TYPE_CTRL_CLASS:
 			default:
 				do_query_menu_invalid(i);
@@ -264,7 +262,8 @@
 
 }
 
-void test_VIDIOC_QUERYMENU_private_last_1() {
+void test_VIDIOC_QUERYMENU_private_last_1()
+{
 	int ret_query, errno_query;
 	struct v4l2_queryctrl queryctrl;
 	__u32 i;
@@ -282,7 +281,8 @@
 	do_query_menu_invalid(i);
 }
 
-void test_VIDIOC_QUERYMENU_NULL() {
+void test_VIDIOC_QUERYMENU_NULL()
+{
 	int ret_query, errno_query;
 	int ret_menu, errno_menu;
 	int ret_null, errno_null;
@@ -300,8 +300,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_BASE, ret_query,
+		     errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
@@ -311,11 +313,15 @@
 				menu.id = i;
 				menu.index = 0;
 
-				ret_menu = ioctl(get_video_fd(), VIDIOC_QUERYMENU, &menu);
+				ret_menu =
+				    ioctl(get_video_fd(), VIDIOC_QUERYMENU,
+					  &menu);
 				errno_menu = errno;
 
-				dprintf("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
-					__FILE__, __LINE__, i, i-V4L2_CID_BASE, 0, ret_query, errno_query);
+				dprintf
+				    ("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
+				     __FILE__, __LINE__, i, i - V4L2_CID_BASE,
+				     0, ret_query, errno_query);
 
 				if (ret_menu == 0) {
 					CU_ASSERT_EQUAL(ret_menu, 0);
@@ -338,8 +344,10 @@
 		ret_query = ioctl(get_video_fd(), VIDIOC_QUERYCTRL, &queryctrl);
 		errno_query = errno;
 
-		dprintf("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%i), ret_query=%i, errno_query=%i\n",
-			__FILE__, __LINE__, i, i-V4L2_CID_PRIVATE_BASE, ret_query, errno_query);
+		dprintf
+		    ("\t%s:%u: VIDIOC_QUERYCTRL, id=%u (V4L2_CID_PRIVATE_BASE+%i), ret_query=%i, errno_query=%i\n",
+		     __FILE__, __LINE__, i, i - V4L2_CID_PRIVATE_BASE,
+		     ret_query, errno_query);
 
 		if (ret_query == 0) {
 			CU_ASSERT_EQUAL(ret_query, 0);
@@ -349,11 +357,15 @@
 				menu.id = i;
 				menu.index = 0;
 
-				ret_menu = ioctl(get_video_fd(), VIDIOC_QUERYMENU, &menu);
+				ret_menu =
+				    ioctl(get_video_fd(), VIDIOC_QUERYMENU,
+					  &menu);
 				errno_menu = errno;
 
-				dprintf("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
-					__FILE__, __LINE__, i, i-V4L2_CID_BASE, 0, ret_query, errno_query);
+				dprintf
+				    ("\t%s:%u: VIDIOC_QUERYMENU, id=%u, (V4L2_CID_BASE+%i), index=%u, ret_query=%i, errno_query=%i\n",
+				     __FILE__, __LINE__, i, i - V4L2_CID_BASE,
+				     0, ret_query, errno_query);
 
 				if (ret_menu == 0) {
 					CU_ASSERT_EQUAL(ret_menu, 0);
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYSTD.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYSTD.c
index 0b34d1d..7c8d4fa 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYSTD.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_QUERYSTD.c
@@ -30,7 +30,8 @@
 
 #include "test_VIDIOC_QUERYSTD.h"
 
-void test_VIDIOC_QUERYSTD() {
+void test_VIDIOC_QUERYSTD()
+{
 	int ret_query, errno_query;
 	v4l2_std_id id;
 
@@ -39,8 +40,9 @@
 	ret_query = ioctl(get_video_fd(), VIDIOC_QUERYSTD, &id);
 	errno_query = errno;
 
-	dprintf("\t%s:%u: VIDIOC_QUERYSTD, ret_query=%i, errno_query=%i, id=0x%llx\n",
-		__FILE__, __LINE__, ret_query, errno_query, id);
+	dprintf
+	    ("\t%s:%u: VIDIOC_QUERYSTD, ret_query=%i, errno_query=%i, id=0x%llx\n",
+	     __FILE__, __LINE__, ret_query, errno_query, id);
 
 	if (ret_query == 0) {
 		CU_ASSERT_EQUAL(ret_query, 0);
@@ -55,7 +57,8 @@
 
 }
 
-void test_VIDIOC_QUERYSTD_NULL() {
+void test_VIDIOC_QUERYSTD_NULL()
+{
 	int ret_query, errno_query;
 	int ret_null, errno_null;
 	v4l2_std_id id;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_REQBUFS.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_REQBUFS.c
index 4d15738..40b8a21 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_REQBUFS.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_REQBUFS.c
@@ -29,7 +29,8 @@
 
 #include "test_VIDIOC_REQBUFS.h"
 
-static void do_VIDIOC_REQBUFS_capture_mmap(__u32 count) {
+static void do_VIDIOC_REQBUFS_capture_mmap(__u32 count)
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -84,19 +85,21 @@
 
 }
 
-void test_VIDIOC_REQBUFS_capture_mmap() {
+void test_VIDIOC_REQBUFS_capture_mmap()
+{
 	do_VIDIOC_REQBUFS_capture_mmap(0);
 	do_VIDIOC_REQBUFS_capture_mmap(1);
 	do_VIDIOC_REQBUFS_capture_mmap(2);
 	do_VIDIOC_REQBUFS_capture_mmap(3);
 	do_VIDIOC_REQBUFS_capture_mmap(4);
-	do_VIDIOC_REQBUFS_capture_mmap((__u32)S16_MIN);
-	do_VIDIOC_REQBUFS_capture_mmap((__u32)S16_MAX);
+	do_VIDIOC_REQBUFS_capture_mmap((__u32) S16_MIN);
+	do_VIDIOC_REQBUFS_capture_mmap((__u32) S16_MAX);
 	do_VIDIOC_REQBUFS_capture_mmap(U32_MAX);
 	do_VIDIOC_REQBUFS_capture_mmap(0);
 }
 
-static void do_VIDIOC_REQBUFS_capture_userptr(__u32 count) {
+static void do_VIDIOC_REQBUFS_capture_userptr(__u32 count)
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -121,9 +124,7 @@
 
 	if (ret_cap == 0 &&
 	    (cap.capabilities & V4L2_CAP_STREAMING) &&
-	    (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) &&
-	    ret_req == 0
-	    ) {
+	    (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) && ret_req == 0) {
 		CU_ASSERT_EQUAL(ret_cap, 0);
 		CU_ASSERT(cap.capabilities & V4L2_CAP_STREAMING);
 
@@ -152,16 +153,18 @@
 
 }
 
-void test_VIDIOC_REQBUFS_capture_userptr() {
+void test_VIDIOC_REQBUFS_capture_userptr()
+{
 	do_VIDIOC_REQBUFS_capture_userptr(0);
 	do_VIDIOC_REQBUFS_capture_userptr(1);
-	do_VIDIOC_REQBUFS_capture_userptr((__u32)S16_MIN);
-	do_VIDIOC_REQBUFS_capture_userptr((__u32)S16_MAX);
+	do_VIDIOC_REQBUFS_capture_userptr((__u32) S16_MIN);
+	do_VIDIOC_REQBUFS_capture_userptr((__u32) S16_MAX);
 	do_VIDIOC_REQBUFS_capture_userptr(U32_MAX);
 	do_VIDIOC_REQBUFS_capture_userptr(0);
 }
 
-static void do_VIDIOC_REQBUFS_output_mmap(__u32 count) {
+static void do_VIDIOC_REQBUFS_output_mmap(__u32 count)
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -216,19 +219,21 @@
 
 }
 
-void test_VIDIOC_REQBUFS_output_mmap() {
+void test_VIDIOC_REQBUFS_output_mmap()
+{
 	do_VIDIOC_REQBUFS_output_mmap(0);
 	do_VIDIOC_REQBUFS_output_mmap(1);
 	do_VIDIOC_REQBUFS_output_mmap(2);
 	do_VIDIOC_REQBUFS_output_mmap(3);
 	do_VIDIOC_REQBUFS_output_mmap(4);
-	do_VIDIOC_REQBUFS_output_mmap((__u32)S16_MIN);
-	do_VIDIOC_REQBUFS_output_mmap((__u32)S16_MAX);
+	do_VIDIOC_REQBUFS_output_mmap((__u32) S16_MIN);
+	do_VIDIOC_REQBUFS_output_mmap((__u32) S16_MAX);
 	do_VIDIOC_REQBUFS_output_mmap(U32_MAX);
 	do_VIDIOC_REQBUFS_output_mmap(0);
 }
 
-static void do_VIDIOC_REQBUFS_output_userptr(__u32 count) {
+static void do_VIDIOC_REQBUFS_output_userptr(__u32 count)
+{
 	int ret_cap, errno_cap;
 	int ret_req, errno_req;
 	struct v4l2_capability cap;
@@ -253,9 +258,7 @@
 
 	if (ret_cap == 0 &&
 	    (cap.capabilities & V4L2_CAP_STREAMING) &&
-	    (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) &&
-	    ret_req == 0
-	    ) {
+	    (cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) && ret_req == 0) {
 		CU_ASSERT_EQUAL(ret_cap, 0);
 		CU_ASSERT(cap.capabilities & V4L2_CAP_STREAMING);
 
@@ -284,16 +287,19 @@
 
 }
 
-void test_VIDIOC_REQBUFS_output_userptr() {
+void test_VIDIOC_REQBUFS_output_userptr()
+{
 	do_VIDIOC_REQBUFS_output_userptr(0);
 	do_VIDIOC_REQBUFS_output_userptr(1);
-	do_VIDIOC_REQBUFS_output_userptr((__u32)S16_MIN);
-	do_VIDIOC_REQBUFS_output_userptr((__u32)S16_MAX);
+	do_VIDIOC_REQBUFS_output_userptr((__u32) S16_MIN);
+	do_VIDIOC_REQBUFS_output_userptr((__u32) S16_MAX);
 	do_VIDIOC_REQBUFS_output_userptr(U32_MAX);
 	do_VIDIOC_REQBUFS_output_userptr(0);
 }
 
-static void do_VIDIOC_REQBUFS_invalid_memory(enum v4l2_buf_type type, enum v4l2_memory memory) {
+static void do_VIDIOC_REQBUFS_invalid_memory(enum v4l2_buf_type type,
+					     enum v4l2_memory memory)
+{
 	int ret_req, errno_req;
 	struct v4l2_requestbuffers reqbuf;
 	struct v4l2_requestbuffers reqbuf2;
@@ -325,23 +331,31 @@
 
 }
 
-void test_VIDIOC_REQBUFS_invalid_memory_capture() {
+void test_VIDIOC_REQBUFS_invalid_memory_capture()
+{
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE, SINT_MIN);
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE, 0);
-	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_MEMORY_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_MEMORY_OVERLAY+1);
+	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE,
+					 V4L2_MEMORY_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE,
+					 V4L2_MEMORY_OVERLAY + 1);
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_CAPTURE, SINT_MAX);
 }
 
-void test_VIDIOC_REQBUFS_invalid_memory_output() {
+void test_VIDIOC_REQBUFS_invalid_memory_output()
+{
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT, SINT_MIN);
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT, 0);
-	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT, V4L2_MEMORY_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT, V4L2_MEMORY_OVERLAY+1);
+	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT,
+					 V4L2_MEMORY_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT,
+					 V4L2_MEMORY_OVERLAY + 1);
 	do_VIDIOC_REQBUFS_invalid_memory(V4L2_BUF_TYPE_VIDEO_OUTPUT, SINT_MAX);
 }
 
-static void do_VIDIOC_REQBUFS_invalid_type(enum v4l2_memory memory, enum v4l2_buf_type type) {
+static void do_VIDIOC_REQBUFS_invalid_type(enum v4l2_memory memory,
+					   enum v4l2_buf_type type)
+{
 	int ret_req, errno_req;
 	struct v4l2_requestbuffers reqbuf;
 	struct v4l2_requestbuffers reqbuf2;
@@ -357,8 +371,9 @@
 	ret_req = ioctl(get_video_fd(), VIDIOC_REQBUFS, &reqbuf);
 	errno_req = errno;
 
-	dprintf("\t%s:%u: VIDIOC_REQBUF, type=0x%x, memory=%i, ret_req=%i, errno_req=%i\n",
-		__FILE__, __LINE__, type, memory, ret_req, errno_req);
+	dprintf
+	    ("\t%s:%u: VIDIOC_REQBUF, type=0x%x, memory=%i, ret_req=%i, errno_req=%i\n",
+	     __FILE__, __LINE__, type, memory, ret_req, errno_req);
 
 	CU_ASSERT_EQUAL(ret_req, -1);
 	CU_ASSERT_EQUAL(errno_req, EINVAL);
@@ -375,38 +390,59 @@
 	}
 }
 
-void test_VIDIOC_REQUBUFS_invalid_type_mmap() {
+void test_VIDIOC_REQUBUFS_invalid_type_mmap()
+{
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, 0);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VBI_CAPTURE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VBI_OUTPUT);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE-1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_VIDEO_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_VBI_CAPTURE);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_VBI_OUTPUT);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_PRIVATE - 1);
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, V4L2_BUF_TYPE_PRIVATE+1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       V4L2_BUF_TYPE_PRIVATE + 1);
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, S32_MAX);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, (__s32)((__u32)S32_MAX+1));
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, U32_MAX-1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP,
+				       (__s32) ((__u32) S32_MAX + 1));
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, U32_MAX - 1);
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_MMAP, U32_MAX);
 
 }
 
-void test_VIDIOC_REQUBUFS_invalid_type_userptr() {
+void test_VIDIOC_REQUBUFS_invalid_type_userptr()
+{
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, 0);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_CAPTURE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VBI_OUTPUT);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE-1);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, V4L2_BUF_TYPE_PRIVATE+1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_VIDEO_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_VBI_CAPTURE);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_VBI_OUTPUT);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_SLICED_VBI_CAPTURE);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_SLICED_VBI_OUTPUT);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_PRIVATE - 1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_PRIVATE);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       V4L2_BUF_TYPE_PRIVATE + 1);
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, S32_MAX);
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, (__s32)((__u32)S32_MAX+1));
-	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, U32_MAX-1);
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR,
+				       (__s32) ((__u32) S32_MAX + 1));
+	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, U32_MAX - 1);
 	do_VIDIOC_REQBUFS_invalid_type(V4L2_MEMORY_USERPTR, U32_MAX);
 
 }
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_STD.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_STD.c
index 0ff2654..e0800d7 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_STD.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_STD.c
@@ -39,7 +39,9 @@
 
 #include "test_VIDIOC_STD.h"
 
-static void do_test_VIDIOC_G_STD(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_G_STD(int ret_input_enum, int errno_input_enum,
+				 struct v4l2_input *input)
+{
 	v4l2_std_id std_id;
 	int ret_std_get, errno_std_get;
 	int f;
@@ -70,8 +72,9 @@
 	ret_std_get = ioctl(f, VIDIOC_G_STD, &std_id);
 	errno_std_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_STD, ret_std_get=%i, errno_std_get=%i, std_id=0x%llX\n",
-		__FILE__, __LINE__, ret_std_get, errno_std_get, std_id);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_STD, ret_std_get=%i, errno_std_get=%i, std_id=0x%llX\n",
+	     __FILE__, __LINE__, ret_std_get, errno_std_get, std_id);
 
 	if (ret_input_enum == 0) {
 		CU_ASSERT_EQUAL(ret_input_enum, 0);
@@ -100,7 +103,8 @@
 	}
 }
 
-void test_VIDIOC_G_STD() {
+void test_VIDIOC_G_STD()
+{
 
 	/* Iterate trough all inputs with VIDIOC_ENUMINPUT.
 	 * Also ensure tahat VIDIC_G_STD is called at least
@@ -127,7 +131,9 @@
 }
 
 static int do_set_video_standard(int f, v4l2_std_id id,
-		int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+				 int ret_input_enum, int errno_input_enum,
+				 struct v4l2_input *input)
+{
 	int ret_std_set, errno_std_set;
 	int ret_std_get, errno_std_get;
 	v4l2_std_id std_id;
@@ -136,15 +142,17 @@
 	ret_std_set = ioctl(f, VIDIOC_S_STD, &std_id);
 	errno_std_set = errno;
 
-	dprintf("\t%s:%u: VIDIOC_S_STD: ret_std_set=%i, errno_std_set=%i, std_id=0x%llX, id=0x%llX\n",
-		__FILE__, __LINE__, ret_std_set, errno_std_set, std_id, id);
+	dprintf
+	    ("\t%s:%u: VIDIOC_S_STD: ret_std_set=%i, errno_std_set=%i, std_id=0x%llX, id=0x%llX\n",
+	     __FILE__, __LINE__, ret_std_set, errno_std_set, std_id, id);
 
 	memset(&std_id, 0xff, sizeof(std_id));
 	ret_std_get = ioctl(f, VIDIOC_G_STD, &std_id);
 	errno_std_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_STD: ret_std_get=%i, errno_std_get=%i, std_id=0x%llX\n",
-		__FILE__, __LINE__, ret_std_get, errno_std_get, std_id);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_STD: ret_std_get=%i, errno_std_get=%i, std_id=0x%llX\n",
+	     __FILE__, __LINE__, ret_std_get, errno_std_get, std_id);
 
 	if (ret_input_enum == 0) {
 		CU_ASSERT_EQUAL(ret_input_enum, 0);
@@ -166,20 +174,22 @@
 	} else {
 		CU_ASSERT_EQUAL(ret_input_enum, -1);
 		CU_ASSERT_EQUAL(errno_input_enum, EINVAL);
-			if (ret_std_set == 0) {
-				CU_ASSERT_EQUAL(ret_std_set, 0);
-				CU_ASSERT_EQUAL(ret_std_get, 0);
-				CU_ASSERT(valid_v4l2_std_id(std_id));
-			} else {
-				CU_ASSERT_EQUAL(ret_std_set, -1);
-				CU_ASSERT_EQUAL(errno_std_set, EINVAL);
-			}
+		if (ret_std_set == 0) {
+			CU_ASSERT_EQUAL(ret_std_set, 0);
+			CU_ASSERT_EQUAL(ret_std_get, 0);
+			CU_ASSERT(valid_v4l2_std_id(std_id));
+		} else {
+			CU_ASSERT_EQUAL(ret_std_set, -1);
+			CU_ASSERT_EQUAL(errno_std_set, EINVAL);
+		}
 	}
 
 	return ret_std_set;
 }
 
-static void do_test_VIDIOC_S_STD(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_S_STD(int ret_input_enum, int errno_input_enum,
+				 struct v4l2_input *input)
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	v4l2_std_id std_id_orig;
@@ -191,40 +201,95 @@
 	ret_get = ioctl(f, VIDIOC_G_STD, &std_id_orig);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
-		__FILE__, __LINE__, ret_get, errno_get, std_id_orig);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
+	     __FILE__, __LINE__, ret_get, errno_get, std_id_orig);
 
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_B, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_B1, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_G, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_H, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_I, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_D, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_D1, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_K, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_M, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_N, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_Nc, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_PAL_60, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_NTSC_M, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_NTSC_M_JP, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_NTSC_443, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_NTSC_M_KR, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_B, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_D, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_G, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_H, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_K, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_K1, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_L, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_SECAM_LC, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_ATSC_8_VSB, ret_input_enum, errno_input_enum, input);
-	ret_set = do_set_video_standard(f, V4L2_STD_ATSC_16_VSB, ret_input_enum, errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_B, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_B1, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_G, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_H, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_I, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_D, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_D1, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_K, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_M, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_N, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_Nc, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_PAL_60, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_NTSC_M, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_NTSC_M_JP, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_NTSC_443, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_NTSC_M_KR, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_B, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_D, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_G, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_H, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_K, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_K1, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_L, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_SECAM_LC, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_ATSC_8_VSB, ret_input_enum,
+				  errno_input_enum, input);
+	ret_set =
+	    do_set_video_standard(f, V4L2_STD_ATSC_16_VSB, ret_input_enum,
+				  errno_input_enum, input);
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
 		/* Setting the original std_id should not fail */
-		ret_set = do_set_video_standard(f, std_id_orig, ret_input_enum, errno_input_enum, input);
+		ret_set =
+		    do_set_video_standard(f, std_id_orig, ret_input_enum,
+					  errno_input_enum, input);
 		errno_set = errno;
 
 		CU_ASSERT_EQUAL(ret_set, 0);
@@ -235,11 +300,15 @@
 
 }
 
-void test_VIDIOC_S_STD() {
+void test_VIDIOC_S_STD()
+{
 	foreach_input(do_test_VIDIOC_S_STD);
 }
 
-static void do_test_VIDIOC_S_STD_from_enum(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_S_STD_from_enum(int ret_input_enum,
+					   int errno_input_enum,
+					   struct v4l2_input *input)
+{
 	int ret_get, errno_get;
 	int ret_enum, errno_enum;
 	int ret_set, errno_set;
@@ -254,8 +323,9 @@
 	ret_get = ioctl(f, VIDIOC_G_STD, &std_id_orig);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
-		__FILE__, __LINE__, ret_get, errno_get, std_id_orig);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
+	     __FILE__, __LINE__, ret_get, errno_get, std_id_orig);
 
 	/* Try to continue even if VIDIOC_G_STD returned error */
 	i = 0;
@@ -265,11 +335,14 @@
 		ret_enum = ioctl(f, VIDIOC_ENUMSTD, &std);
 		errno_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUMSTD: i=%u, ret_enum=%i, errno_enum=%i, std.id=0x%llX\n",
-			__FILE__, __LINE__, i, ret_enum, errno_enum, std.id);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUMSTD: i=%u, ret_enum=%i, errno_enum=%i, std.id=0x%llX\n",
+		     __FILE__, __LINE__, i, ret_enum, errno_enum, std.id);
 
 		if (ret_enum == 0) {
-			ret_set = do_set_video_standard(f, std.id, ret_input_enum, errno_input_enum, input);
+			ret_set =
+			    do_set_video_standard(f, std.id, ret_input_enum,
+						  errno_input_enum, input);
 			CU_ASSERT_EQUAL(ret_set, 0);
 		}
 		i++;
@@ -279,10 +352,13 @@
 		CU_ASSERT_EQUAL(ret_get, 0);
 
 		/* Setting the original std_id should not fail */
-		ret_set = do_set_video_standard(f, std_id_orig, ret_input_enum, errno_input_enum, input);
+		ret_set =
+		    do_set_video_standard(f, std_id_orig, ret_input_enum,
+					  errno_input_enum, input);
 		errno_set = errno;
-		dprintf("\t%s:%u: VIDIOC_S_STD: ret_set=%i (expected %i), errno=%i\n",
-			__FILE__, __LINE__, ret_set, 0, errno);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_STD: ret_set=%i (expected %i), errno=%i\n",
+		     __FILE__, __LINE__, ret_set, 0, errno);
 		CU_ASSERT_EQUAL(ret_set, 0);
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -291,11 +367,15 @@
 
 }
 
-void test_VIDIOC_S_STD_from_enum() {
+void test_VIDIOC_S_STD_from_enum()
+{
 	foreach_input(do_test_VIDIOC_S_STD_from_enum);
 }
 
-static void do_test_VIDIOC_S_STD_invalid_standard(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_S_STD_invalid_standard(int ret_input_enum,
+						  int errno_input_enum,
+						  struct v4l2_input *input)
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	v4l2_std_id std_id_orig;
@@ -308,33 +388,40 @@
 	ret_get = ioctl(f, VIDIOC_G_STD, &std_id_orig);
 	errno_get = errno;
 
-	dprintf("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
-		__FILE__, __LINE__, ret_get, errno_get, std_id_orig);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_STD: ret_get=%i, errno_get=%i, std_id_orig=0x%llX\n",
+	     __FILE__, __LINE__, ret_get, errno_get, std_id_orig);
 
 	/* Try to continue even if VIDIOC_G_STD retunred with error */
 	std_id = 1;
 	while (std_id != 0) {
 		if (!valid_v4l2_std_id(std_id)) {
-			ret_set = do_set_video_standard(f, std_id, ret_input_enum, errno_input_enum, input);
+			ret_set =
+			    do_set_video_standard(f, std_id, ret_input_enum,
+						  errno_input_enum, input);
 			errno_set = errno;
 
 			CU_ASSERT_EQUAL(ret_set, -1);
 			CU_ASSERT_EQUAL(errno_set, EINVAL);
-			dprintf("\t%s:%u: VIDIOC_S_STD: ret_set=%i, errno_set=%i\n",
-				__FILE__, __LINE__, ret_set, errno_set);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_STD: ret_set=%i, errno_set=%i\n",
+			     __FILE__, __LINE__, ret_set, errno_set);
 		}
-		std_id = std_id<<1;
+		std_id = std_id << 1;
 	}
 
 	if (ret_get == 0) {
 		CU_ASSERT_EQUAL(ret_get, 0);
 
 		/* Setting the original std_id should not fail */
-		ret_set = do_set_video_standard(f, std_id_orig, ret_input_enum, errno_input_enum, input);
+		ret_set =
+		    do_set_video_standard(f, std_id_orig, ret_input_enum,
+					  errno_input_enum, input);
 		errno_set = errno;
 
-		dprintf("\t%s:%u: VIDIOC_S_STD: ret_set=%i (expected 0), errno=%i\n",
-			__FILE__, __LINE__, ret_set, errno_set);
+		dprintf
+		    ("\t%s:%u: VIDIOC_S_STD: ret_set=%i (expected 0), errno=%i\n",
+		     __FILE__, __LINE__, ret_set, errno_set);
 		CU_ASSERT_EQUAL(ret_set, 0);
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -342,11 +429,14 @@
 	}
 }
 
-void test_VIDIOC_S_STD_invalid_standard() {
+void test_VIDIOC_S_STD_invalid_standard()
+{
 	foreach_input(do_test_VIDIOC_S_STD_invalid_standard);
 }
 
-static void do_test_VIDIOC_G_STD_NULL(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_G_STD_NULL(int ret_input_enum, int errno_input_enum,
+				      struct v4l2_input *input)
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	v4l2_std_id std_id;
@@ -400,11 +490,14 @@
 
 }
 
-void test_VIDIOC_G_STD_NULL() {
+void test_VIDIOC_G_STD_NULL()
+{
 	foreach_input(do_test_VIDIOC_G_STD_NULL);
 }
 
-static void do_test_VIDIOC_S_STD_NULL(int ret_input_enum, int errno_input_enum, struct v4l2_input* input) {
+static void do_test_VIDIOC_S_STD_NULL(int ret_input_enum, int errno_input_enum,
+				      struct v4l2_input *input)
+{
 	int ret_null, errno_null;
 
 	/* TODO: check whether VIDIOC_S_STD is supported at all or not */
@@ -430,8 +523,9 @@
 	}
 }
 
-void test_VIDIOC_S_STD_NULL() {
-    foreach_input(do_test_VIDIOC_S_STD_NULL);
+void test_VIDIOC_S_STD_NULL()
+{
+	foreach_input(do_test_VIDIOC_S_STD_NULL);
 }
 
 /* TODO: VIDIOC_S_STD while STREAM_ON */
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_TUNER.c b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_TUNER.c
index 0b12e8d..29b3dc1 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_TUNER.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_VIDIOC_TUNER.c
@@ -34,32 +34,33 @@
 
 #include "test_VIDIOC_TUNER.h"
 
-int valid_tuner_type(enum v4l2_tuner_type type) {
+int valid_tuner_type(enum v4l2_tuner_type type)
+{
 	int valid = 0;
 
 	switch (type) {
-		case V4L2_TUNER_RADIO:
-		case V4L2_TUNER_ANALOG_TV:
-			valid = 1;
-			break;
-		default:
-			valid = 0;
+	case V4L2_TUNER_RADIO:
+	case V4L2_TUNER_ANALOG_TV:
+		valid = 1;
+		break;
+	default:
+		valid = 0;
 	}
 
 	return valid;
 }
 
-int valid_tuner_sub(__u32 tuner_sub) {
+int valid_tuner_sub(__u32 tuner_sub)
+{
 	int valid = 0;
 
 	CU_ASSERT_EQUAL(V4L2_TUNER_SUB_SAP, V4L2_TUNER_SUB_LANG2);
 
-	if ( (tuner_sub & ~(V4L2_TUNER_SUB_MONO |
-			    V4L2_TUNER_SUB_STEREO |
-			    V4L2_TUNER_SUB_LANG1 |
-			    V4L2_TUNER_SUB_LANG2 |
-			    V4L2_TUNER_SUB_SAP))
-		== 0) {
+	if ((tuner_sub & ~(V4L2_TUNER_SUB_MONO |
+			   V4L2_TUNER_SUB_STEREO |
+			   V4L2_TUNER_SUB_LANG1 |
+			   V4L2_TUNER_SUB_LANG2 | V4L2_TUNER_SUB_SAP))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -67,27 +68,29 @@
 	return valid;
 }
 
-int valid_tuner_audmode(__u32 audmode) {
+int valid_tuner_audmode(__u32 audmode)
+{
 	int valid = 0;
 
 	CU_ASSERT_EQUAL(V4L2_TUNER_MODE_SAP, V4L2_TUNER_MODE_LANG2);
 
 	switch (audmode) {
-		case V4L2_TUNER_MODE_MONO:
-		case V4L2_TUNER_MODE_STEREO:
-		case V4L2_TUNER_MODE_LANG1:
-		case V4L2_TUNER_MODE_LANG2:
-		case V4L2_TUNER_MODE_LANG1_LANG2:
-			valid = 1;
-			break;
-		default:
-			valid = 0;
+	case V4L2_TUNER_MODE_MONO:
+	case V4L2_TUNER_MODE_STEREO:
+	case V4L2_TUNER_MODE_LANG1:
+	case V4L2_TUNER_MODE_LANG2:
+	case V4L2_TUNER_MODE_LANG1_LANG2:
+		valid = 1;
+		break;
+	default:
+		valid = 0;
 	}
 
 	return valid;
 }
 
-static int do_get_tuner(int f, __u32 index) {
+static int do_get_tuner(int f, __u32 index)
+{
 	int ret_get, errno_get;
 	struct v4l2_tuner tuner;
 	struct v4l2_tuner tuner2;
@@ -105,8 +108,8 @@
 
 		CU_ASSERT_EQUAL(tuner.index, index);
 
-		CU_ASSERT(0 < strlen( (char*)tuner.name ));
-		CU_ASSERT(valid_string((char*)tuner.name, sizeof(tuner.name)));
+		CU_ASSERT(0 < strlen((char *)tuner.name));
+		CU_ASSERT(valid_string((char *)tuner.name, sizeof(tuner.name)));
 
 		CU_ASSERT(valid_tuner_type(tuner.type));
 		CU_ASSERT(valid_tuner_capability(tuner.capability));
@@ -133,7 +136,8 @@
 		 */
 		memset(&tuner2, 0, sizeof(tuner2));
 		tuner2.index = tuner.index;
-		strncpy((char*)tuner2.name, (char*)tuner.name, sizeof(tuner2.name));
+		strncpy((char *)tuner2.name, (char *)tuner.name,
+			sizeof(tuner2.name));
 		tuner2.type = tuner.type;
 		tuner2.capability = tuner.capability;
 		tuner2.rangelow = tuner.rangelow;
@@ -167,14 +171,14 @@
 			tuner.signal,
 			tuner.afc,
 			tuner.reserved[0],
-			tuner.reserved[1],
-			tuner.reserved[2],
-			tuner.reserved[3]
-		);
+			tuner.reserved[1], tuner.reserved[2], tuner.reserved[3]
+		    );
 
 	} else {
-		dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-		dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+		dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__,
+			__LINE__, ret_get, -1);
+		dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__,
+			__LINE__, errno_get, EINVAL);
 		CU_ASSERT_EQUAL(ret_get, -1);
 		CU_ASSERT_EQUAL(errno_get, EINVAL);
 	}
@@ -182,7 +186,8 @@
 	return ret_get;
 }
 
-void test_VIDIOC_G_TUNER() {
+void test_VIDIOC_G_TUNER()
+{
 	int ret;
 	__u32 index;
 	int f;
@@ -197,12 +202,13 @@
 
 }
 
-void test_VIDIOC_G_TUNER_S32_MAX() {
+void test_VIDIOC_G_TUNER_S32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_tuner tuner;
 
-	index = (__u32)S32_MAX;
+	index = (__u32) S32_MAX;
 
 	memset(&tuner, 0xff, sizeof(tuner));
 	tuner.index = index;
@@ -212,18 +218,21 @@
 	dprintf("\t%s:%u: VIDIOC_G_TUNER, ret_get=%i, errno_get=%i\n",
 		__FILE__, __LINE__, ret_get, errno_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_TUNER_S32_MAX_1() {
+void test_VIDIOC_G_TUNER_S32_MAX_1()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_tuner tuner;
 
-	index = (__u32)S32_MAX+1;
+	index = (__u32) S32_MAX + 1;
 
 	memset(&tuner, 0xff, sizeof(tuner));
 	tuner.index = index;
@@ -233,13 +242,16 @@
 	dprintf("\t%s:%u: VIDIOC_G_TUNER, ret_get=%i\n",
 		__FILE__, __LINE__, ret_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_TUNER_U32_MAX() {
+void test_VIDIOC_G_TUNER_U32_MAX()
+{
 	int ret_get, errno_get;
 	__u32 index;
 	struct v4l2_tuner tuner;
@@ -254,13 +266,16 @@
 	dprintf("\t%s:%u: VIDIOC_G_TUNER, ret_get=%i, errno_get=%i\n",
 		__FILE__, __LINE__, ret_get, errno_get);
 
-	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__, ret_get, -1);
-	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__, errno_get, EINVAL);
+	dprintf("\t%s:%u: ret_get=%d (expected %d)\n", __FILE__, __LINE__,
+		ret_get, -1);
+	dprintf("\t%s:%u: errno_get=%d (expected %d)\n", __FILE__, __LINE__,
+		errno_get, EINVAL);
 	CU_ASSERT_EQUAL(ret_get, -1);
 	CU_ASSERT_EQUAL(errno_get, EINVAL);
 }
 
-void test_VIDIOC_G_TUNER_NULL() {
+void test_VIDIOC_G_TUNER_NULL()
+{
 	int ret_get, errno_get;
 	int ret_null, errno_null;
 	struct v4l2_tuner tuner;
@@ -294,7 +309,8 @@
 
 }
 
-void do_set_tuner_audmode(__u32 index, __u32 audmode) {
+void do_set_tuner_audmode(__u32 index, __u32 audmode)
+{
 	int ret_set, errno_set;
 	struct v4l2_tuner tuner;
 
@@ -306,14 +322,14 @@
 
 	dprintf("\t%s:%u: VIDIOC_S_TUNER: index=%u, audmode=%u, "
 		"ret_set=%i (expected %i), errno_set=%i\n",
-		__FILE__, __LINE__,
-		index, audmode, ret_set, 0, errno_set);
+		__FILE__, __LINE__, index, audmode, ret_set, 0, errno_set);
 
 	CU_ASSERT_EQUAL(ret_set, 0);
 
 }
 
-void do_set_tuner_audmode_invalid(__u32 index, __u32 audmode) {
+void do_set_tuner_audmode_invalid(__u32 index, __u32 audmode)
+{
 	int ret_set, errno_set;
 	struct v4l2_tuner tuner;
 
@@ -332,7 +348,8 @@
 	CU_ASSERT_EQUAL(errno_set, EINVAL);
 }
 
-void test_VIDIOC_S_TUNER() {
+void test_VIDIOC_S_TUNER()
+{
 	int ret_get, errno_get;
 	int ret_set, errno_set;
 	struct v4l2_tuner tuner_orig;
@@ -354,7 +371,8 @@
 		do_set_tuner_audmode(tuner_orig.index, V4L2_TUNER_MODE_LANG1);
 		do_set_tuner_audmode(tuner_orig.index, V4L2_TUNER_MODE_LANG2);
 		do_set_tuner_audmode(tuner_orig.index, V4L2_TUNER_MODE_SAP);
-		do_set_tuner_audmode(tuner_orig.index, V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode(tuner_orig.index,
+				     V4L2_TUNER_MODE_LANG1_LANG2);
 
 	} else {
 		CU_ASSERT_EQUAL(ret_get, -1);
@@ -363,12 +381,18 @@
 		/* if VIDIOC_G_TUNER is not supported then VIDIOC_S_TUNER shall also
 		 * not supported.
 		 */
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_MONO);
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_STEREO);
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_LANG1);
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_LANG2);
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_SAP);
-		do_set_tuner_audmode_invalid(tuner_orig.index, V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_MONO);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_STEREO);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_LANG1);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_SAP);
+		do_set_tuner_audmode_invalid(tuner_orig.index,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
 
 	}
 
@@ -389,7 +413,8 @@
 
 }
 
-void test_VIDIOC_S_TUNER_invalid() {
+void test_VIDIOC_S_TUNER_invalid()
+{
 	int ret1, errno1;
 	int ret_set, errno_set;
 	struct v4l2_tuner tuner_orig;
@@ -407,41 +432,66 @@
 		CU_ASSERT_EQUAL(ret1, 0);
 
 		/* try with invalid index */
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_MONO);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_MONO);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_MONO);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_MONO);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_MONO);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_MONO);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_MONO);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_MONO);
 		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_MONO);
 
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_STEREO);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_STEREO);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_STEREO);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_STEREO);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_STEREO);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_STEREO);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_STEREO);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_STEREO);
 		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_STEREO);
 
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_LANG1);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_LANG1);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_LANG1);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_LANG1);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_LANG1);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_LANG1);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_LANG1);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_LANG1);
 		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_LANG1);
 
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_LANG2);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_LANG2);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_LANG2);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_LANG2);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_LANG2);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_LANG2);
 		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_LANG2);
 
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_SAP);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_SAP);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_SAP);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_SAP);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_SAP);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_SAP);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_SAP);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_SAP);
 		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_SAP);
 
-		do_set_tuner_audmode_invalid(tuner_orig.index+1, V4L2_TUNER_MODE_LANG1_LANG2);
-		do_set_tuner_audmode_invalid(tuner_orig.index-1, V4L2_TUNER_MODE_LANG1_LANG2);
-		do_set_tuner_audmode_invalid((__u32)S32_MAX, V4L2_TUNER_MODE_LANG1_LANG2);
-		do_set_tuner_audmode_invalid(((__u32)S32_MAX)+1, V4L2_TUNER_MODE_LANG1_LANG2);
-		do_set_tuner_audmode_invalid(U32_MAX, V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index + 1,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid(tuner_orig.index - 1,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid((__u32) S32_MAX,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid(((__u32) S32_MAX) + 1,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
+		do_set_tuner_audmode_invalid(U32_MAX,
+					     V4L2_TUNER_MODE_LANG1_LANG2);
 
 	} else {
 		CU_ASSERT_EQUAL(ret1, -1);
@@ -451,8 +501,8 @@
 
 	/* try with invalid audmode */
 	do_set_tuner_audmode_invalid(tuner_orig.index, 5);
-	do_set_tuner_audmode_invalid(tuner_orig.index, (__u32)S32_MAX);
-	do_set_tuner_audmode_invalid(tuner_orig.index, ((__u32)S32_MAX)+1);
+	do_set_tuner_audmode_invalid(tuner_orig.index, (__u32) S32_MAX);
+	do_set_tuner_audmode_invalid(tuner_orig.index, ((__u32) S32_MAX) + 1);
 	do_set_tuner_audmode_invalid(tuner_orig.index, U32_MAX);
 
 	if (ret1 == 0) {
@@ -472,7 +522,8 @@
 
 }
 
-void test_VIDIOC_S_TUNER_NULL() {
+void test_VIDIOC_S_TUNER_NULL()
+{
 	int ret_orig, errno_orig;
 	int ret_null, errno_null;
 	int ret_set, errno_set;
diff --git a/testcases/kernel/device-drivers/v4l/user_space/test_invalid_ioctl.c b/testcases/kernel/device-drivers/v4l/user_space/test_invalid_ioctl.c
index a83a727..0ea9486 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/test_invalid_ioctl.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/test_invalid_ioctl.c
@@ -31,7 +31,8 @@
 
 /* invalid ioctls */
 
-static void do_invalid_ioctl(int f, int request) {
+static void do_invalid_ioctl(int f, int request)
+{
 	int ret_invalid, errno_invalid;
 
 	ret_invalid = ioctl(f, request, NULL);
@@ -41,18 +42,22 @@
 	CU_ASSERT_EQUAL(errno_invalid, EINVAL);
 }
 
-void test_invalid_ioctl_1() {
+void test_invalid_ioctl_1()
+{
 	do_invalid_ioctl(get_video_fd(), _IO(0, 0));
 }
 
-void test_invalid_ioctl_2() {
+void test_invalid_ioctl_2()
+{
 	do_invalid_ioctl(get_video_fd(), _IO(0xFF, 0xFF));
 }
 
-void test_invalid_ioctl_3() {
+void test_invalid_ioctl_3()
+{
 	do_invalid_ioctl(get_video_fd(), _IO('v', 0xFF));
 }
 
-void test_invalid_ioctl_4() {
+void test_invalid_ioctl_4()
+{
 	do_invalid_ioctl(get_video_fd(), _IO('V', 0xFF));
 }
diff --git a/testcases/kernel/device-drivers/v4l/user_space/v4l2_foreach.c b/testcases/kernel/device-drivers/v4l/user_space/v4l2_foreach.c
index 5907df2..ce6f416 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/v4l2_foreach.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/v4l2_foreach.c
@@ -26,7 +26,8 @@
 #include "v4l2_show.h"
 #include "v4l2_foreach.h"
 
-void foreach_input(V4L2InputTestFunc pFunc) {
+void foreach_input(V4L2InputTestFunc pFunc)
+{
 	__u32 input_index_orig;
 	struct v4l2_input input;
 	int ret_input_get, errno_input_get;
@@ -41,8 +42,10 @@
 	memset(&input_index_orig, 0xff, sizeof(input_index_orig));
 	ret_input_get = ioctl(f, VIDIOC_G_INPUT, &input_index_orig);
 	errno_input_get = errno;
-	dprintf("\t%s:%u: VIDIOC_G_INPUT, ret_input_get=%i, errno_input_get=%i, input_index_orig=0x%X\n",
-		__FILE__, __LINE__, ret_input_get, errno_input_get, input_index_orig);
+	dprintf
+	    ("\t%s:%u: VIDIOC_G_INPUT, ret_input_get=%i, errno_input_get=%i, input_index_orig=0x%X\n",
+	     __FILE__, __LINE__, ret_input_get, errno_input_get,
+	     input_index_orig);
 
 	i = 0;
 	do {
@@ -51,15 +54,18 @@
 		ret_input_enum = ioctl(f, VIDIOC_ENUMINPUT, &input);
 		errno_input_enum = errno;
 
-		dprintf("\t%s:%u: VIDIOC_ENUMINPUT: i=%u, ret_input_enum=%i, errno_input_enum=%i\n",
-			__FILE__, __LINE__, i, ret_input_enum, errno_input_enum);
+		dprintf
+		    ("\t%s:%u: VIDIOC_ENUMINPUT: i=%u, ret_input_enum=%i, errno_input_enum=%i\n",
+		     __FILE__, __LINE__, i, ret_input_enum, errno_input_enum);
 
 		if (ret_input_enum == 0) {
 			show_v4l2_input(&input);
 			ret_input_set = ioctl(f, VIDIOC_S_INPUT, &input.index);
 			errno_input_set = errno;
-			dprintf("\t%s:%u: VIDIOC_S_INPUT: input.index=0x%X, ret_input_set=%i, errno_input_set=%i\n",
-				__FILE__, __LINE__, input.index, ret_input_set, errno_input_set);
+			dprintf
+			    ("\t%s:%u: VIDIOC_S_INPUT: input.index=0x%X, ret_input_set=%i, errno_input_set=%i\n",
+			     __FILE__, __LINE__, input.index, ret_input_set,
+			     errno_input_set);
 			CU_ASSERT_EQUAL(ret_input_set, 0);
 		}
 
diff --git a/testcases/kernel/device-drivers/v4l/user_space/v4l2_show.c b/testcases/kernel/device-drivers/v4l/user_space/v4l2_show.c
index 466f76e..663dfcc 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/v4l2_show.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/v4l2_show.c
@@ -29,7 +29,8 @@
 
 #include "test_VIDIOC_REQBUFS.h"
 
-void show_v4l2_requestbuffers(struct v4l2_requestbuffers *reqbuf) {
+void show_v4l2_requestbuffers(struct v4l2_requestbuffers *reqbuf)
+{
 	dprintf("\treqbuf = { "
 		".count=%u, "
 		".type=%i, "
@@ -38,13 +39,12 @@
 		"}\n",
 		reqbuf->count,
 		reqbuf->type,
-		reqbuf->memory,
-		reqbuf->reserved[0],
-		reqbuf->reserved[1]
-	);
+		reqbuf->memory, reqbuf->reserved[0], reqbuf->reserved[1]
+	    );
 }
 
-void show_v4l2_buffer(struct v4l2_buffer *buf) {
+void show_v4l2_buffer(struct v4l2_buffer *buf)
+{
 	unsigned int i;
 
 	dprintf("\tbuf = { "
@@ -81,43 +81,35 @@
 		buf->timecode.userbits[0],
 		buf->timecode.userbits[1],
 		buf->timecode.userbits[2],
-		buf->timecode.userbits[3],
-		buf->sequence,
-		buf->memory
-	);
+		buf->timecode.userbits[3], buf->sequence, buf->memory);
 
 	switch (buf->memory) {
-		case V4L2_MEMORY_USERPTR:
-			dprintf(".m.userptr=0x%lx, ",
-				buf->m.userptr);
-			for (i = sizeof(buf->m.userptr); i < sizeof(buf->m); i++) {
-				dprintf("((__u8*)&.m)[%u]=0x%x, ",
-					i, ((__u8*)&buf->m)[i]);
-			}
-			break;
-		case V4L2_MEMORY_MMAP:
-		case V4L2_MEMORY_OVERLAY:
-		default:
-			dprintf(".m.offset=%u, ",
-				buf->m.offset);
-			for (i = sizeof(buf->m.offset); i < sizeof(buf->m); i++) {
-				dprintf("((__u8*)&.m)[%u]=0x%x, ",
-					i, ((__u8*)&buf->m)[i]);
-			}
+	case V4L2_MEMORY_USERPTR:
+		dprintf(".m.userptr=0x%lx, ", buf->m.userptr);
+		for (i = sizeof(buf->m.userptr); i < sizeof(buf->m); i++) {
+			dprintf("((__u8*)&.m)[%u]=0x%x, ",
+				i, ((__u8 *) & buf->m)[i]);
+		}
+		break;
+	case V4L2_MEMORY_MMAP:
+	case V4L2_MEMORY_OVERLAY:
+	default:
+		dprintf(".m.offset=%u, ", buf->m.offset);
+		for (i = sizeof(buf->m.offset); i < sizeof(buf->m); i++) {
+			dprintf("((__u8*)&.m)[%u]=0x%x, ",
+				i, ((__u8 *) & buf->m)[i]);
+		}
 	}
 
 	dprintf(".length=%u, "
 		".input=%u, "
 		".reserved=0x%x "
-		"}\n",
-		buf->length,
-		buf->input,
-		buf->reserved
-	);
+		"}\n", buf->length, buf->input, buf->reserved);
 
 }
 
-void show_v4l2_input(struct v4l2_input *input) {
+void show_v4l2_input(struct v4l2_input *input)
+{
 	dprintf("\tinput = {.index=%u, .name=\"%s\", "
 		".type=0x%X, .audioset=0x%X, .tuner=0x%X, "
 		".std=%llX, "
@@ -131,50 +123,43 @@
 		input->std,
 		input->status,
 		input->reserved[0],
-		input->reserved[1],
-		input->reserved[2],
-		input->reserved[3]
-		);
+		input->reserved[1], input->reserved[2], input->reserved[3]
+	    );
 }
 
-void show_v4l2_frmsizeenum(struct v4l2_frmsizeenum* framesize) {
+void show_v4l2_frmsizeenum(struct v4l2_frmsizeenum *framesize)
+{
 	dprintf("\tframesize = { .index=%u, "
 		".pixel_format=0x%x, "
 		".type=%u, ",
-		framesize->index,
-		framesize->pixel_format,
-		framesize->type
-	);
+		framesize->index, framesize->pixel_format, framesize->type);
 
 	switch (framesize->type) {
-		case V4L2_FRMSIZE_TYPE_DISCRETE:
-			dprintf(".discrete = { .width=%u, heigth=%u }, ",
-				framesize->discrete.width,
-				framesize->discrete.height);
-			break;
-		case V4L2_FRMSIZE_TYPE_CONTINUOUS:
-		case V4L2_FRMSIZE_TYPE_STEPWISE:
-			dprintf(".stepwise = { .min_width=%u, "
-				".max_width=%u, "
-				".step_width=%u, "
-				".min_height=%u, "
-				".max_height=%u, "
-				".step_height=%u }, ",
-				framesize->stepwise.min_width,
-				framesize->stepwise.max_width,
-				framesize->stepwise.step_width,
-				framesize->stepwise.min_height,
-				framesize->stepwise.max_height,
-				framesize->stepwise.step_height
-				);
-			break;
-		default:
-			;
+	case V4L2_FRMSIZE_TYPE_DISCRETE:
+		dprintf(".discrete = { .width=%u, heigth=%u }, ",
+			framesize->discrete.width, framesize->discrete.height);
+		break;
+	case V4L2_FRMSIZE_TYPE_CONTINUOUS:
+	case V4L2_FRMSIZE_TYPE_STEPWISE:
+		dprintf(".stepwise = { .min_width=%u, "
+			".max_width=%u, "
+			".step_width=%u, "
+			".min_height=%u, "
+			".max_height=%u, "
+			".step_height=%u }, ",
+			framesize->stepwise.min_width,
+			framesize->stepwise.max_width,
+			framesize->stepwise.step_width,
+			framesize->stepwise.min_height,
+			framesize->stepwise.max_height,
+			framesize->stepwise.step_height);
+		break;
+	default:
+		;
 	}
 
 	dprintf(".reserved = { 0x%x, 0x%x } }\n",
-		framesize->reserved[0],
-		framesize->reserved[1]
-	);
+		framesize->reserved[0], framesize->reserved[1]
+	    );
 
 }
diff --git a/testcases/kernel/device-drivers/v4l/user_space/v4l2_test.c b/testcases/kernel/device-drivers/v4l/user_space/v4l2_test.c
index 3e8ed45..1e4b4ba 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/v4l2_test.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/v4l2_test.c
@@ -95,304 +95,369 @@
 #include "test_invalid_ioctl.h"
 
 static CU_TestInfo suite_querycap[] = {
-  { "VIDIOC_QUERYCAP", test_VIDIOC_QUERYCAP },
+	{"VIDIOC_QUERYCAP", test_VIDIOC_QUERYCAP},
 
-  { "VIDIOC_CROPCAP", test_VIDIOC_CROPCAP },
-  { "VIDIOC_CROPCAP with different inputs", test_VIDIOC_CROPCAP_enum_INPUT },
+	{"VIDIOC_CROPCAP", test_VIDIOC_CROPCAP},
+	{"VIDIOC_CROPCAP with different inputs",
+	 test_VIDIOC_CROPCAP_enum_INPUT},
 
-  { "VIDIOC_G_SLICED_VBI_CAP", test_VIDIOC_G_SLICED_VBI_CAP },
-  { "VIDIOC_G_SLICED_VBI_CAP with invalid types", test_VIDIOC_G_SLICED_VBI_CAP_invalid },
+	{"VIDIOC_G_SLICED_VBI_CAP", test_VIDIOC_G_SLICED_VBI_CAP},
+	{"VIDIOC_G_SLICED_VBI_CAP with invalid types",
+	 test_VIDIOC_G_SLICED_VBI_CAP_invalid},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_enums[] = {
-  { "VIDIOC_ENUMAUDIO", test_VIDIOC_ENUMAUDIO },
-  { "VIDIOC_ENUMAUDIO, index=S32_MAX", test_VIDIOC_ENUMAUDIO_S32_MAX },
-  { "VIDIOC_ENUMAUDIO, index=S32_MAX+1", test_VIDIOC_ENUMAUDIO_S32_MAX_1 },
-  { "VIDIOC_ENUMAUDIO, index=U32_MAX", test_VIDIOC_ENUMAUDIO_U32_MAX },
+	{"VIDIOC_ENUMAUDIO", test_VIDIOC_ENUMAUDIO},
+	{"VIDIOC_ENUMAUDIO, index=S32_MAX", test_VIDIOC_ENUMAUDIO_S32_MAX},
+	{"VIDIOC_ENUMAUDIO, index=S32_MAX+1", test_VIDIOC_ENUMAUDIO_S32_MAX_1},
+	{"VIDIOC_ENUMAUDIO, index=U32_MAX", test_VIDIOC_ENUMAUDIO_U32_MAX},
 
-  { "VIDIOC_ENUMAUDOUT", test_VIDIOC_ENUMAUDOUT },
-  { "VIDIOC_ENUMAUDOUT, index=S32_MAX", test_VIDIOC_ENUMAUDOUT_S32_MAX },
-  { "VIDIOC_ENUMAUDOUT, index=S32_MAX+1", test_VIDIOC_ENUMAUDOUT_S32_MAX_1 },
-  { "VIDIOC_ENUMAUDOUT, index=U32_MAX", test_VIDIOC_ENUMAUDOUT_U32_MAX },
+	{"VIDIOC_ENUMAUDOUT", test_VIDIOC_ENUMAUDOUT},
+	{"VIDIOC_ENUMAUDOUT, index=S32_MAX", test_VIDIOC_ENUMAUDOUT_S32_MAX},
+	{"VIDIOC_ENUMAUDOUT, index=S32_MAX+1",
+	 test_VIDIOC_ENUMAUDOUT_S32_MAX_1},
+	{"VIDIOC_ENUMAUDOUT, index=U32_MAX", test_VIDIOC_ENUMAUDOUT_U32_MAX},
 
-  { "VIDIOC_ENUM_FMT", test_VIDIOC_ENUM_FMT },
-  { "VIDIOC_ENUM_FMT, index=S32_MAX", test_VIDIOC_ENUM_FMT_S32_MAX },
-  { "VIDIOC_ENUM_FMT, index=S32_MAX+1", test_VIDIOC_ENUM_FMT_S32_MAX_1 },
-  { "VIDIOC_ENUM_FMT, index=U32_MAX", test_VIDIOC_ENUM_FMT_U32_MAX },
-  { "VIDIOC_ENUM_FMT, invalid type", test_VIDIOC_ENUM_FMT_invalid_type },
+	{"VIDIOC_ENUM_FMT", test_VIDIOC_ENUM_FMT},
+	{"VIDIOC_ENUM_FMT, index=S32_MAX", test_VIDIOC_ENUM_FMT_S32_MAX},
+	{"VIDIOC_ENUM_FMT, index=S32_MAX+1", test_VIDIOC_ENUM_FMT_S32_MAX_1},
+	{"VIDIOC_ENUM_FMT, index=U32_MAX", test_VIDIOC_ENUM_FMT_U32_MAX},
+	{"VIDIOC_ENUM_FMT, invalid type", test_VIDIOC_ENUM_FMT_invalid_type},
 
-  { "VIDIOC_ENUMINPUT", test_VIDIOC_ENUMINPUT },
-  { "VIDIOC_ENUMINPUT, index=S32_MAX", test_VIDIOC_ENUMINPUT_S32_MAX },
-  { "VIDIOC_ENUMINPUT, index=S32_MAX+1", test_VIDIOC_ENUMINPUT_S32_MAX_1 },
-  { "VIDIOC_ENUMINPUT, index=U32_MAX", test_VIDIOC_ENUMINPUT_U32_MAX },
+	{"VIDIOC_ENUMINPUT", test_VIDIOC_ENUMINPUT},
+	{"VIDIOC_ENUMINPUT, index=S32_MAX", test_VIDIOC_ENUMINPUT_S32_MAX},
+	{"VIDIOC_ENUMINPUT, index=S32_MAX+1", test_VIDIOC_ENUMINPUT_S32_MAX_1},
+	{"VIDIOC_ENUMINPUT, index=U32_MAX", test_VIDIOC_ENUMINPUT_U32_MAX},
 
-  { "VIDIOC_ENUMOUTPUT", test_VIDIOC_ENUMOUTPUT },
-  { "VIDIOC_ENUMOUTPUT, index=S32_MAX", test_VIDIOC_ENUMOUTPUT_S32_MAX },
-  { "VIDIOC_ENUMOUTPUT, index=S32_MAX+1", test_VIDIOC_ENUMOUTPUT_S32_MAX_1 },
-  { "VIDIOC_ENUMOUTPUT, index=U32_MAX", test_VIDIOC_ENUMOUTPUT_U32_MAX },
+	{"VIDIOC_ENUMOUTPUT", test_VIDIOC_ENUMOUTPUT},
+	{"VIDIOC_ENUMOUTPUT, index=S32_MAX", test_VIDIOC_ENUMOUTPUT_S32_MAX},
+	{"VIDIOC_ENUMOUTPUT, index=S32_MAX+1",
+	 test_VIDIOC_ENUMOUTPUT_S32_MAX_1},
+	{"VIDIOC_ENUMOUTPUT, index=U32_MAX", test_VIDIOC_ENUMOUTPUT_U32_MAX},
 
-  { "VIDIOC_ENUMSTD", test_VIDIOC_ENUMSTD },
-  { "VIDIOC_ENUMSTD, index=S32_MAX", test_VIDIOC_ENUMSTD_S32_MAX },
-  { "VIDIOC_ENUMSTD, index=S32_MAX+1", test_VIDIOC_ENUMSTD_S32_MAX_1 },
-  { "VIDIOC_ENUMSTD, index=U32_MAX", test_VIDIOC_ENUMSTD_U32_MAX },
+	{"VIDIOC_ENUMSTD", test_VIDIOC_ENUMSTD},
+	{"VIDIOC_ENUMSTD, index=S32_MAX", test_VIDIOC_ENUMSTD_S32_MAX},
+	{"VIDIOC_ENUMSTD, index=S32_MAX+1", test_VIDIOC_ENUMSTD_S32_MAX_1},
+	{"VIDIOC_ENUMSTD, index=U32_MAX", test_VIDIOC_ENUMSTD_U32_MAX},
 
-  { "VIDIOC_QUERYCTRL", test_VIDIOC_QUERYCTRL },
-  { "VIDIOC_QUERYCTRL, id=V4L2_CID_BASE-1", test_VIDIOC_QUERYCTRL_BASE_1 },
-  { "VIDIOC_QUERYCTRL, id=V4L2_CID_LASTP1", test_VIDIOC_QUERYCTRL_LASTP1 },
-  { "VIDIOC_QUERYCTRL, id=V4L2_CID_LASTP1+1", test_VIDIOC_QUERYCTRL_LASTP1_1 },
-  { "VIDIOC_QUERYCTRL with V4L2_CTRL_FLAG_NEXT_CTRL", test_VIDIOC_QUERYCTRL_flag_NEXT_CTRL },
-  { "VIDIOC_QUERYCTRL, enumerate private controls", test_VIDIOC_QUERYCTRL_private },
-  { "VIDIOC_QUERYCTRL, V4L2_CID_PRIVATE_BASE-1", test_VIDIOC_QUERYCTRL_private_base_1 },
-  { "VIDIOC_QUERYCTRL, last private control+1", test_VIDIOC_QUERYCTRL_private_last_1 },
+	{"VIDIOC_QUERYCTRL", test_VIDIOC_QUERYCTRL},
+	{"VIDIOC_QUERYCTRL, id=V4L2_CID_BASE-1", test_VIDIOC_QUERYCTRL_BASE_1},
+	{"VIDIOC_QUERYCTRL, id=V4L2_CID_LASTP1", test_VIDIOC_QUERYCTRL_LASTP1},
+	{"VIDIOC_QUERYCTRL, id=V4L2_CID_LASTP1+1",
+	 test_VIDIOC_QUERYCTRL_LASTP1_1},
+	{"VIDIOC_QUERYCTRL with V4L2_CTRL_FLAG_NEXT_CTRL",
+	 test_VIDIOC_QUERYCTRL_flag_NEXT_CTRL},
+	{"VIDIOC_QUERYCTRL, enumerate private controls",
+	 test_VIDIOC_QUERYCTRL_private},
+	{"VIDIOC_QUERYCTRL, V4L2_CID_PRIVATE_BASE-1",
+	 test_VIDIOC_QUERYCTRL_private_base_1},
+	{"VIDIOC_QUERYCTRL, last private control+1",
+	 test_VIDIOC_QUERYCTRL_private_last_1},
 
-  { "VIDIOC_QUERYMENU", test_VIDIOC_QUERYMENU },
-  { "VIDIOC_QUERYMENU with invalid id", test_VIDIOC_QUERYMENU_invalid },
-  { "VIDIOC_QUERYMENU with private controls", test_VIDIOC_QUERYMENU_private },
-  { "VIDIOC_QUERYMENU, last private control+1", test_VIDIOC_QUERYMENU_private_last_1 },
+	{"VIDIOC_QUERYMENU", test_VIDIOC_QUERYMENU},
+	{"VIDIOC_QUERYMENU with invalid id", test_VIDIOC_QUERYMENU_invalid},
+	{"VIDIOC_QUERYMENU with private controls",
+	 test_VIDIOC_QUERYMENU_private},
+	{"VIDIOC_QUERYMENU, last private control+1",
+	 test_VIDIOC_QUERYMENU_private_last_1},
 
-  { "VIDIOC_ENUM_FRAMESIZES", test_VIDIOC_ENUM_FRAMESIZES },
-  { "VIDIOC_ENUM_FRAMESIZES with invalid index", test_VIDIOC_ENUM_FRAMESIZES_invalid_index },
-  { "VIDIOC_ENUM_FRAMESIZES with invalid pixel_format", test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format },
+	{"VIDIOC_ENUM_FRAMESIZES", test_VIDIOC_ENUM_FRAMESIZES},
+	{"VIDIOC_ENUM_FRAMESIZES with invalid index",
+	 test_VIDIOC_ENUM_FRAMESIZES_invalid_index},
+	{"VIDIOC_ENUM_FRAMESIZES with invalid pixel_format",
+	 test_VIDIOC_ENUM_FRAMESIZES_invalid_pixel_format},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_get_set_try[] = {
-  { "VIDIOC_G_STD", test_VIDIOC_G_STD },
-  { "VIDIOC_S_STD with the enumerated values", test_VIDIOC_S_STD_from_enum },
-  { "VIDIOC_S_STD", test_VIDIOC_S_STD },
-  { "VIDIOC_S_STD with invalid standard", test_VIDIOC_S_STD_invalid_standard },
+	{"VIDIOC_G_STD", test_VIDIOC_G_STD},
+	{"VIDIOC_S_STD with the enumerated values",
+	 test_VIDIOC_S_STD_from_enum},
+	{"VIDIOC_S_STD", test_VIDIOC_S_STD},
+	{"VIDIOC_S_STD with invalid standard",
+	 test_VIDIOC_S_STD_invalid_standard},
 
-  { "VIDIOC_G_INPUT", test_VIDIOC_G_INPUT },
-  { "VIDIOC_S_INPUT from enum", test_VIDIOC_S_INPUT_from_enum },
-  { "VIDIOC_S_INPUT with invalid inputs", test_VIDIOC_S_INPUT_invalid_inputs },
+	{"VIDIOC_G_INPUT", test_VIDIOC_G_INPUT},
+	{"VIDIOC_S_INPUT from enum", test_VIDIOC_S_INPUT_from_enum},
+	{"VIDIOC_S_INPUT with invalid inputs",
+	 test_VIDIOC_S_INPUT_invalid_inputs},
 
-  { "VIDIOC_G_OUTPUT", test_VIDIOC_G_OUTPUT },
-  { "VIDIOC_S_OUTPUT from enum", test_VIDIOC_S_OUTPUT_from_enum },
-  { "VIDIOC_S_OUTPUT with invalid outputs", test_VIDIOC_S_OUTPUT_invalid_outputs },
+	{"VIDIOC_G_OUTPUT", test_VIDIOC_G_OUTPUT},
+	{"VIDIOC_S_OUTPUT from enum", test_VIDIOC_S_OUTPUT_from_enum},
+	{"VIDIOC_S_OUTPUT with invalid outputs",
+	 test_VIDIOC_S_OUTPUT_invalid_outputs},
 
-  { "VIDIOC_G_TUNER", test_VIDIOC_G_TUNER },
-  { "VIDIOC_G_TUNER, index=S32_MAX", test_VIDIOC_G_TUNER_S32_MAX },
-  { "VIDIOC_G_TUNER, index=S32_MAX+1", test_VIDIOC_G_TUNER_S32_MAX_1 },
-  { "VIDIOC_G_TUNER, index=U32_MAX", test_VIDIOC_G_TUNER_U32_MAX },
+	{"VIDIOC_G_TUNER", test_VIDIOC_G_TUNER},
+	{"VIDIOC_G_TUNER, index=S32_MAX", test_VIDIOC_G_TUNER_S32_MAX},
+	{"VIDIOC_G_TUNER, index=S32_MAX+1", test_VIDIOC_G_TUNER_S32_MAX_1},
+	{"VIDIOC_G_TUNER, index=U32_MAX", test_VIDIOC_G_TUNER_U32_MAX},
 
-  { "VIDIOC_S_TUNER", test_VIDIOC_S_TUNER },
-  { "VIDIOC_S_TUNER with invalid index and audmode parameters", test_VIDIOC_S_TUNER_invalid },
+	{"VIDIOC_S_TUNER", test_VIDIOC_S_TUNER},
+	{"VIDIOC_S_TUNER with invalid index and audmode parameters",
+	 test_VIDIOC_S_TUNER_invalid},
 
-  { "VIDIOC_G_MODULATOR", test_VIDIOC_G_MODULATOR },
-  { "VIDIOC_G_MODULATOR, index=S32_MAX", test_VIDIOC_G_MODULATOR_S32_MAX },
-  { "VIDIOC_G_MODULATOR, index=S32_MAX+1", test_VIDIOC_G_MODULATOR_S32_MAX_1 },
-  { "VIDIOC_G_MODULATOR, index=U32_MAX", test_VIDIOC_G_MODULATOR_U32_MAX },
+	{"VIDIOC_G_MODULATOR", test_VIDIOC_G_MODULATOR},
+	{"VIDIOC_G_MODULATOR, index=S32_MAX", test_VIDIOC_G_MODULATOR_S32_MAX},
+	{"VIDIOC_G_MODULATOR, index=S32_MAX+1",
+	 test_VIDIOC_G_MODULATOR_S32_MAX_1},
+	{"VIDIOC_G_MODULATOR, index=U32_MAX", test_VIDIOC_G_MODULATOR_U32_MAX},
 
-  { "VIDIOC_G_FREQUENCY", test_VIDIOC_G_FREQUENCY },
-  { "VIDIOC_G_FREQUENCY, tuner=S32_MAX", test_VIDIOC_G_FREQUENCY_S32_MAX },
-  { "VIDIOC_G_FREQUENCY, tuner=S32_MAX+1", test_VIDIOC_G_FREQUENCY_S32_MAX_1 },
-  { "VIDIOC_G_FREQUENCY, tuner=U32_MAX", test_VIDIOC_G_FREQUENCY_U32_MAX },
+	{"VIDIOC_G_FREQUENCY", test_VIDIOC_G_FREQUENCY},
+	{"VIDIOC_G_FREQUENCY, tuner=S32_MAX", test_VIDIOC_G_FREQUENCY_S32_MAX},
+	{"VIDIOC_G_FREQUENCY, tuner=S32_MAX+1",
+	 test_VIDIOC_G_FREQUENCY_S32_MAX_1},
+	{"VIDIOC_G_FREQUENCY, tuner=U32_MAX", test_VIDIOC_G_FREQUENCY_U32_MAX},
 
-  { "VIDIOC_S_FREQUENCY", test_VIDIOC_S_FREQUENCY },
-  { "VIDIOC_S_FREQUENCY with boundary values", test_VIDIOC_S_FREQUENCY_boundaries },
-  { "VIDIOC_S_FREQUENCY scan all possbile values", test_VIDIOC_S_FREQUENCY_scan },
+	{"VIDIOC_S_FREQUENCY", test_VIDIOC_S_FREQUENCY},
+	{"VIDIOC_S_FREQUENCY with boundary values",
+	 test_VIDIOC_S_FREQUENCY_boundaries},
+	{"VIDIOC_S_FREQUENCY scan all possbile values",
+	 test_VIDIOC_S_FREQUENCY_scan},
 
-  { "VIDIOC_G_PRIORITY", test_VIDIOC_G_PRIORITY },
-  { "VIDIOC_S_PRIORITY", test_VIDIOC_S_PRIORITY },
-  { "VIDIOC_S_PRIORITY with invalid values", test_VIDIOC_S_PRIORITY_invalid },
+	{"VIDIOC_G_PRIORITY", test_VIDIOC_G_PRIORITY},
+	{"VIDIOC_S_PRIORITY", test_VIDIOC_S_PRIORITY},
+	{"VIDIOC_S_PRIORITY with invalid values",
+	 test_VIDIOC_S_PRIORITY_invalid},
 
-  { "VIDIOC_G_AUDIO", test_VIDIOC_G_AUDIO },
-  { "VIDIOC_G_AUDIO, ignore index value", test_VIDIOC_G_AUDIO_ignore_index },
+	{"VIDIOC_G_AUDIO", test_VIDIOC_G_AUDIO},
+	{"VIDIOC_G_AUDIO, ignore index value",
+	 test_VIDIOC_G_AUDIO_ignore_index},
 
-  { "VIDIOC_S_AUDIO", test_VIDIOC_S_AUDIO },
-  { "VIDIOC_S_AUDIO, index=S32_MAX", test_VIDIOC_S_AUDIO_S32_MAX },
-  { "VIDIOC_S_AUDIO, index=S32_MAX+1", test_VIDIOC_S_AUDIO_S32_MAX_1 },
-  { "VIDIOC_S_AUDIO, index=U32_MAX", test_VIDIOC_S_AUDIO_U32_MAX },
+	{"VIDIOC_S_AUDIO", test_VIDIOC_S_AUDIO},
+	{"VIDIOC_S_AUDIO, index=S32_MAX", test_VIDIOC_S_AUDIO_S32_MAX},
+	{"VIDIOC_S_AUDIO, index=S32_MAX+1", test_VIDIOC_S_AUDIO_S32_MAX_1},
+	{"VIDIOC_S_AUDIO, index=U32_MAX", test_VIDIOC_S_AUDIO_U32_MAX},
 
-  { "VIDIOC_G_AUDOUT", test_VIDIOC_G_AUDOUT },
-  { "VIDIOC_G_AUDOUT, ignore index value", test_VIDIOC_G_AUDOUT_ignore_index },
+	{"VIDIOC_G_AUDOUT", test_VIDIOC_G_AUDOUT},
+	{"VIDIOC_G_AUDOUT, ignore index value",
+	 test_VIDIOC_G_AUDOUT_ignore_index},
 
-  { "VIDIOC_S_AUDOUT", test_VIDIOC_S_AUDOUT },
-  { "VIDIOC_S_AUDOUT, index=S32_MAX", test_VIDIOC_S_AUDOUT_S32_MAX },
-  { "VIDIOC_S_AUDOUT, index=S32_MAX+1", test_VIDIOC_S_AUDOUT_S32_MAX_1 },
-  { "VIDIOC_S_AUDOUT, index=U32_MAX", test_VIDIOC_S_AUDOUT_U32_MAX },
+	{"VIDIOC_S_AUDOUT", test_VIDIOC_S_AUDOUT},
+	{"VIDIOC_S_AUDOUT, index=S32_MAX", test_VIDIOC_S_AUDOUT_S32_MAX},
+	{"VIDIOC_S_AUDOUT, index=S32_MAX+1", test_VIDIOC_S_AUDOUT_S32_MAX_1},
+	{"VIDIOC_S_AUDOUT, index=U32_MAX", test_VIDIOC_S_AUDOUT_U32_MAX},
 
-  { "VIDIOC_G_CROP", test_VIDIOC_G_CROP },
-  { "VIDIOC_G_CROP with invalid type", test_VIDIOC_G_CROP_invalid },
-  { "VIDIOC_S_CROP", test_VIDIOC_S_CROP },
-  { "VIDIOC_S_CROP with invalid type", test_VIDIOC_S_CROP_invalid},
+	{"VIDIOC_G_CROP", test_VIDIOC_G_CROP},
+	{"VIDIOC_G_CROP with invalid type", test_VIDIOC_G_CROP_invalid},
+	{"VIDIOC_S_CROP", test_VIDIOC_S_CROP},
+	{"VIDIOC_S_CROP with invalid type", test_VIDIOC_S_CROP_invalid},
 
-  { "VIDIOC_G_CTRL", test_VIDIOC_G_CTRL },
+	{"VIDIOC_G_CTRL", test_VIDIOC_G_CTRL},
 
-  { "VIDIOC_S_CTRL", test_VIDIOC_S_CTRL },
-  { "VIDIOC_S_CTRL with invalid value parameter", test_VIDIOC_S_CTRL_invalid },
-  { "VIDIOC_S_CTRL, withe balance", test_VIDIOC_S_CTRL_white_balance },
-  { "VIDIOC_S_CTRL, white balance with invalid value parameter", test_VIDIOC_S_CTRL_white_balance_invalid },
-  { "VIDIOC_S_CTRL, gain control", test_VIDIOC_S_CTRL_gain },
-  { "VIDIOC_S_CTRL, gain control with invalid value parameter", test_VIDIOC_S_CTRL_gain_invalid },
+	{"VIDIOC_S_CTRL", test_VIDIOC_S_CTRL},
+	{"VIDIOC_S_CTRL with invalid value parameter",
+	 test_VIDIOC_S_CTRL_invalid},
+	{"VIDIOC_S_CTRL, withe balance", test_VIDIOC_S_CTRL_white_balance},
+	{"VIDIOC_S_CTRL, white balance with invalid value parameter",
+	 test_VIDIOC_S_CTRL_white_balance_invalid},
+	{"VIDIOC_S_CTRL, gain control", test_VIDIOC_S_CTRL_gain},
+	{"VIDIOC_S_CTRL, gain control with invalid value parameter",
+	 test_VIDIOC_S_CTRL_gain_invalid},
 
-  { "VIDIOC_G_EXT_CTRLS with zero items to get", test_VIDIOC_G_EXT_CTRLS_zero },
-  { "VIDIOC_G_EXT_CTRLS with zero items to get, but with invalid count values",
-	test_VIDIOC_G_EXT_CTRLS_zero_invalid_count },
-  { "VIDIOC_G_EXT_CTRLS with only one item to get", test_VIDIOC_G_EXT_CTRLS_one },
+	{"VIDIOC_G_EXT_CTRLS with zero items to get",
+	 test_VIDIOC_G_EXT_CTRLS_zero},
+	{"VIDIOC_G_EXT_CTRLS with zero items to get, but with invalid count values",
+	 test_VIDIOC_G_EXT_CTRLS_zero_invalid_count},
+	{"VIDIOC_G_EXT_CTRLS with only one item to get",
+	 test_VIDIOC_G_EXT_CTRLS_one},
 
-  { "VIDIOC_S_EXT_CTRLS with zero items to set", test_VIDIOC_S_EXT_CTRLS_zero },
-  { "VIDIOC_S_EXT_CTRLS with zero items to set, but with invalid count values",
-	test_VIDIOC_S_EXT_CTRLS_zero_invalid_count },
+	{"VIDIOC_S_EXT_CTRLS with zero items to set",
+	 test_VIDIOC_S_EXT_CTRLS_zero},
+	{"VIDIOC_S_EXT_CTRLS with zero items to set, but with invalid count values",
+	 test_VIDIOC_S_EXT_CTRLS_zero_invalid_count},
 
-  { "VIDIOC_TRY_EXT_CTRLS with zero items to try", test_VIDIOC_TRY_EXT_CTRLS_zero },
-  { "VIDIOC_TRY_EXT_CTRLS with zero items to try, but with invalid count values",
-	test_VIDIOC_TRY_EXT_CTRLS_zero_invalid_count },
+	{"VIDIOC_TRY_EXT_CTRLS with zero items to try",
+	 test_VIDIOC_TRY_EXT_CTRLS_zero},
+	{"VIDIOC_TRY_EXT_CTRLS with zero items to try, but with invalid count values",
+	 test_VIDIOC_TRY_EXT_CTRLS_zero_invalid_count},
 
-  { "VIDIOC_G_PARM", test_VIDIOC_G_PARM },
-  { "VIDIOC_G_PARM with invalid type parameter", test_VIDIOC_G_PARM_invalid },
+	{"VIDIOC_G_PARM", test_VIDIOC_G_PARM},
+	{"VIDIOC_G_PARM with invalid type parameter",
+	 test_VIDIOC_G_PARM_invalid},
 
-  { "VIDIOC_G_FMT", test_VIDIOC_G_FMT },
-  { "VIDIOC_G_FMT with invalid type parameter", test_VIDIOC_G_FMT_invalid_type },
+	{"VIDIOC_G_FMT", test_VIDIOC_G_FMT},
+	{"VIDIOC_G_FMT with invalid type parameter",
+	 test_VIDIOC_G_FMT_invalid_type},
 
-  { "VIDIOC_S_FMT with enumerated values", test_VIDIOC_S_FMT_enum },
-  { "VIDIOC_S_FMT with invalid type parameter", test_VIDIOC_S_FMT_type },
+	{"VIDIOC_S_FMT with enumerated values", test_VIDIOC_S_FMT_enum},
+	{"VIDIOC_S_FMT with invalid type parameter", test_VIDIOC_S_FMT_type},
 
-  { "VIDIOC_G_JPEGCOMP", test_VIDIOC_G_JPEGCOMP },
+	{"VIDIOC_G_JPEGCOMP", test_VIDIOC_G_JPEGCOMP},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_querystd[] = {
-  { "VIDIOC_QUERYSTD", test_VIDIOC_QUERYSTD },
+	{"VIDIOC_QUERYSTD", test_VIDIOC_QUERYSTD},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_buffs[] = {
-  { "VIDIOC_REQBUFS with memory map capture streaming i/o", test_VIDIOC_REQBUFS_capture_mmap },
-  { "VIDIOC_REQBUFS with user pointer capture streaming i/o", test_VIDIOC_REQBUFS_capture_userptr },
-  { "VIDIOC_REQBUFS with memory map output streaming i/o", test_VIDIOC_REQBUFS_output_mmap },
-  { "VIDIOC_REQBUFS with user pointer output streaming i/o", test_VIDIOC_REQBUFS_output_userptr },
-  { "VIDIOC_REQBUFS with invalid memory parameter, capture", test_VIDIOC_REQBUFS_invalid_memory_capture },
-  { "VIDIOC_REQBUFS with invalid memory parameter, output", test_VIDIOC_REQBUFS_invalid_memory_output },
-  { "VIDIOC_REQBUFS with invalid type parameter, memory mapped i/o", test_VIDIOC_REQUBUFS_invalid_type_mmap },
-  { "VIDIOC_REQBUFS with invalid type parameter, user pointer i/o", test_VIDIOC_REQUBUFS_invalid_type_userptr },
+	{"VIDIOC_REQBUFS with memory map capture streaming i/o",
+	 test_VIDIOC_REQBUFS_capture_mmap},
+	{"VIDIOC_REQBUFS with user pointer capture streaming i/o",
+	 test_VIDIOC_REQBUFS_capture_userptr},
+	{"VIDIOC_REQBUFS with memory map output streaming i/o",
+	 test_VIDIOC_REQBUFS_output_mmap},
+	{"VIDIOC_REQBUFS with user pointer output streaming i/o",
+	 test_VIDIOC_REQBUFS_output_userptr},
+	{"VIDIOC_REQBUFS with invalid memory parameter, capture",
+	 test_VIDIOC_REQBUFS_invalid_memory_capture},
+	{"VIDIOC_REQBUFS with invalid memory parameter, output",
+	 test_VIDIOC_REQBUFS_invalid_memory_output},
+	{"VIDIOC_REQBUFS with invalid type parameter, memory mapped i/o",
+	 test_VIDIOC_REQUBUFS_invalid_type_mmap},
+	{"VIDIOC_REQBUFS with invalid type parameter, user pointer i/o",
+	 test_VIDIOC_REQUBUFS_invalid_type_userptr},
 
-  { "VIDIOC_QUERYBUF with memory map capture streaming i/o", test_VIDIOC_QUERYBUF_capture_mmap },
-  { "VIDIOC_QUERYBUF with user pointer capture streaming i/o", test_VIDIOC_QUERYBUF_capture_userptr },
-  { "VIDIOC_QUERYBUF with memory map output streaming i/o", test_VIDIOC_QUERYBUF_output_mmap },
-  { "VIDIOC_QUERYBUF with user pointer output streaming i/o", test_VIDIOC_QUERYBUF_output_userptr },
-  { "VIDIOC_QUERYBUF with overlay capture (invalid)", test_VIDIOC_QUERYBUF_overlay_capture },
-  { "VIDIOC_QUERYBUF with overlay output (invalid)", test_VIDIOC_QUERYBUF_overlay_output },
-  { "VIDIOC_QUERYBUF with invalid memory parameter, capture", test_VIDIOC_QUERYBUF_invalid_memory_capture },
-  { "VIDIOC_QUERYBUF with invalid memory parameter, output", test_VIDIOC_QUERYBUF_invalid_memory_output },
-  { "VIDIOC_QUERYBUF with invalid type parameter, memory mapped i/o", test_VIDIOC_QUERYBUF_invalid_type_mmap },
-  { "VIDIOC_QUERYBUF with invalid type parameter, user pointer i/o", test_VIDIOC_QUERYBUF_invalid_type_userptr },
+	{"VIDIOC_QUERYBUF with memory map capture streaming i/o",
+	 test_VIDIOC_QUERYBUF_capture_mmap},
+	{"VIDIOC_QUERYBUF with user pointer capture streaming i/o",
+	 test_VIDIOC_QUERYBUF_capture_userptr},
+	{"VIDIOC_QUERYBUF with memory map output streaming i/o",
+	 test_VIDIOC_QUERYBUF_output_mmap},
+	{"VIDIOC_QUERYBUF with user pointer output streaming i/o",
+	 test_VIDIOC_QUERYBUF_output_userptr},
+	{"VIDIOC_QUERYBUF with overlay capture (invalid)",
+	 test_VIDIOC_QUERYBUF_overlay_capture},
+	{"VIDIOC_QUERYBUF with overlay output (invalid)",
+	 test_VIDIOC_QUERYBUF_overlay_output},
+	{"VIDIOC_QUERYBUF with invalid memory parameter, capture",
+	 test_VIDIOC_QUERYBUF_invalid_memory_capture},
+	{"VIDIOC_QUERYBUF with invalid memory parameter, output",
+	 test_VIDIOC_QUERYBUF_invalid_memory_output},
+	{"VIDIOC_QUERYBUF with invalid type parameter, memory mapped i/o",
+	 test_VIDIOC_QUERYBUF_invalid_type_mmap},
+	{"VIDIOC_QUERYBUF with invalid type parameter, user pointer i/o",
+	 test_VIDIOC_QUERYBUF_invalid_type_userptr},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_null_readonly[] = {
-  { "VIDIOC_QUERYCAP with NULL parameter", test_VIDIOC_QUERYCAP_NULL },
-  /* { "VIDIOC_G_FBUF with NULL parameter", }, */
-  { "VIDIOC_G_STD with NULL parameter", test_VIDIOC_G_STD_NULL },
-  { "VIDIOC_G_AUDIO with NULL parameter", test_VIDIOC_G_AUDIO_NULL },
-  { "VIDIOC_G_INPUT with NULL parameter", test_VIDIOC_G_INPUT_NULL },
-  { "VIDIOC_G_OUTPUT with NULL parameter", test_VIDIOC_G_OUTPUT_NULL },
-  { "VIDIOC_G_AUDOUT with NULL parameter", test_VIDIOC_G_AUDOUT_NULL },
-  { "VIDIOC_G_JPEGCOMP with NULL parameter", test_VIDIOC_G_JPEGCOMP_NULL },
-  { "VIDIOC_QUERYSTD with NULL parameter", test_VIDIOC_QUERYSTD_NULL },
-  { "VIDIOC_G_PRIORITY with NULL parameter", test_VIDIOC_G_PRIORITY_NULL },
-  /* { "VIDIOC_G_ENC_INDEX with NULL parameter", }, */
+	{"VIDIOC_QUERYCAP with NULL parameter", test_VIDIOC_QUERYCAP_NULL},
+	/* { "VIDIOC_G_FBUF with NULL parameter", }, */
+	{"VIDIOC_G_STD with NULL parameter", test_VIDIOC_G_STD_NULL},
+	{"VIDIOC_G_AUDIO with NULL parameter", test_VIDIOC_G_AUDIO_NULL},
+	{"VIDIOC_G_INPUT with NULL parameter", test_VIDIOC_G_INPUT_NULL},
+	{"VIDIOC_G_OUTPUT with NULL parameter", test_VIDIOC_G_OUTPUT_NULL},
+	{"VIDIOC_G_AUDOUT with NULL parameter", test_VIDIOC_G_AUDOUT_NULL},
+	{"VIDIOC_G_JPEGCOMP with NULL parameter", test_VIDIOC_G_JPEGCOMP_NULL},
+	{"VIDIOC_QUERYSTD with NULL parameter", test_VIDIOC_QUERYSTD_NULL},
+	{"VIDIOC_G_PRIORITY with NULL parameter", test_VIDIOC_G_PRIORITY_NULL},
+	/* { "VIDIOC_G_ENC_INDEX with NULL parameter", }, */
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_null_writeonly[] = {
-  /* { "VIDIOC_S_FBUF with NULL parameter", }, */
-  /* { "VIDIOC_OVERLAY with NULL parameter", }, */
-  /* { "VIDIOC_STREAMON with NULL parameter", }, */
-  /* { "VIDIOC_STREAMOFF with NULL parameter", }, */
-  { "VIDIOC_S_STD with NULL parameter", test_VIDIOC_S_STD_NULL },
-  { "VIDIOC_S_TUNER with NULL parameter", test_VIDIOC_S_TUNER_NULL },
-  { "VIDIOC_S_AUDIO with NULL parameter", test_VIDIOC_S_AUDIO_NULL },
-  { "VIDIOC_S_AUDOUT with NULL parameter", test_VIDIOC_S_AUDOUT_NULL },
-  /* { "VIDIOC_S_MODULATOR with NULL parameter", }, */
-  { "VIDIOC_S_FREQUENCY with NULL parameter", test_VIDIOC_S_FREQUENCY_NULL },
-  { "VIDIOC_S_CROP with NULL parameter", test_VIDIOC_S_CROP_NULL },
-  /* { "VIDIOC_S_JPEGCOMP with NULL parameter", }, */
-  { "VIDIOC_S_PRIORITY with NULL parameter", test_VIDIOC_S_PRIORITY_NULL },
-  /* { "VIDIOC_DBG_S_REGISTER with NULL parameter", }, */
-  /* { "VIDIOC_S_HW_FREQ_SEEK with NULL parameter", }, */
+	/* { "VIDIOC_S_FBUF with NULL parameter", }, */
+	/* { "VIDIOC_OVERLAY with NULL parameter", }, */
+	/* { "VIDIOC_STREAMON with NULL parameter", }, */
+	/* { "VIDIOC_STREAMOFF with NULL parameter", }, */
+	{"VIDIOC_S_STD with NULL parameter", test_VIDIOC_S_STD_NULL},
+	{"VIDIOC_S_TUNER with NULL parameter", test_VIDIOC_S_TUNER_NULL},
+	{"VIDIOC_S_AUDIO with NULL parameter", test_VIDIOC_S_AUDIO_NULL},
+	{"VIDIOC_S_AUDOUT with NULL parameter", test_VIDIOC_S_AUDOUT_NULL},
+	/* { "VIDIOC_S_MODULATOR with NULL parameter", }, */
+	{"VIDIOC_S_FREQUENCY with NULL parameter",
+	 test_VIDIOC_S_FREQUENCY_NULL},
+	{"VIDIOC_S_CROP with NULL parameter", test_VIDIOC_S_CROP_NULL},
+	/* { "VIDIOC_S_JPEGCOMP with NULL parameter", }, */
+	{"VIDIOC_S_PRIORITY with NULL parameter", test_VIDIOC_S_PRIORITY_NULL},
+	/* { "VIDIOC_DBG_S_REGISTER with NULL parameter", }, */
+	/* { "VIDIOC_S_HW_FREQ_SEEK with NULL parameter", }, */
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_null_writeread[] = {
-  { "VIDIOC_ENUM_FMT with NULL parameter", test_VIDIOC_ENUM_FMT_NULL },
-  { "VIDIOC_G_FMT with NULL parameter", test_VIDIOC_G_FMT_NULL },
-  /* { "VIDIOC_S_FMT with NULL parameter", }, */
-  /* { "VIDIOC_REQBUFS with NULL parameter", } */
-  /* { "VIDIOC_QUERYBUF with NULL parameter", } */
-  /* { "VIDIOC_QBUF with NULL parameter", }, */
-  /* { "VIDIOC_DQBUF with NULL parameter", }, */
-  { "VIDIOC_G_PARM with NULL parameter", test_VIDIOC_G_PARM_NULL },
-  /* { "VIDIOC_S_PARM with NULL parameter", }, */
-  { "VIDIOC_ENUMSTD with NULL parameter", test_VIDIOC_ENUMSTD_NULL },
-  { "VIDIOC_ENUMINPUT with NULL parameter", test_VIDIOC_ENUMINPUT_NULL },
-  { "VIDIOC_G_CTRL with NULL parameter", test_VIDIOC_G_CTRL_NULL },
-  { "VIDIOC_S_CTRL with NULL parameter", test_VIDIOC_S_CTRL_NULL },
-  { "VIDIOC_G_TUNER with NULL parameter", test_VIDIOC_G_TUNER_NULL },
-  { "VIDIOC_QUERYCTRL with NULL parameter", test_VIDIOC_QUERYCTRL_NULL },
-  { "VIDIOC_QUERYMENU with NULL parameter", test_VIDIOC_QUERYMENU_NULL },
-  { "VIDIOC_S_INPUT with NULL parameter", test_VIDIOC_S_INPUT_NULL },
-  { "VIDIOC_S_OUTPUT with NULL parameter", test_VIDIOC_S_OUTPUT_NULL },
-  { "VIDIOC_ENUMOUTPUT with NULL parameter", test_VIDIOC_ENUMOUTPUT_NULL },
-  { "VIDIOC_G_MODULATOR with NULL parameter", test_VIDIOC_G_MODULATOR_NULL },
-  { "VIDIOC_G_FREQUENCY with NULL parameter", test_VIDIOC_G_FREQUENCY_NULL },
-  { "VIDIOC_CROPCAP with NULL parameter", test_VIDIOC_CROPCAP_NULL },
-  { "VIDIOC_G_CROP with NULL parameter", test_VIDIOC_G_CROP_NULL },
-  /* { "VIDIOC_TRY_FMT with NULL parameter", }, */
-  { "VIDIOC_ENUMAUDIO with NULL parameter", test_VIDIOC_ENUMAUDIO_NULL },
-  { "VIDIOC_ENUMAUDOUT with NULL parameter", test_VIDIOC_ENUMAUDOUT_NULL },
-  { "VIDIOC_G_SLICED_VBI_CAP with NULL parameter", test_VIDIOC_G_SLICED_VBI_CAP_NULL },
-  { "VIDIOC_G_EXT_CTRLS with NULL parameter", test_VIDIOC_G_EXT_CTRLS_NULL },
-  { "VIDIOC_S_EXT_CTRLS with NULL parameter", test_VIDIOC_S_EXT_CTRLS_NULL },
-  { "VIDIOC_TRY_EXT_CTRLS with NULL parameter", test_VIDIOC_TRY_EXT_CTRLS_NULL },
-  { "VIDIOC_ENUM_FRAMESIZES with NULL parameter", test_VIDIOC_ENUM_FRAMESIZES_NULL },
-  /* { "VIDIOC_ENUM_FRAMEINTERVALS with NULL parameter", }, */
-  /* { "VIDIOC_ENCODER_CMD with NULL parameter", }, */
-  /* { "VIDIOC_TRY_ENCODER_CMD with NULL parameter", }, */
-  /* { "VIDIOC_DBG_G_REGISTER with NULL parameter", }, */
-  /* { "VIDIOC_DBG_G_CHIP_IDENT with NULL parameter", }, */
+	{"VIDIOC_ENUM_FMT with NULL parameter", test_VIDIOC_ENUM_FMT_NULL},
+	{"VIDIOC_G_FMT with NULL parameter", test_VIDIOC_G_FMT_NULL},
+	/* { "VIDIOC_S_FMT with NULL parameter", }, */
+	/* { "VIDIOC_REQBUFS with NULL parameter", } */
+	/* { "VIDIOC_QUERYBUF with NULL parameter", } */
+	/* { "VIDIOC_QBUF with NULL parameter", }, */
+	/* { "VIDIOC_DQBUF with NULL parameter", }, */
+	{"VIDIOC_G_PARM with NULL parameter", test_VIDIOC_G_PARM_NULL},
+	/* { "VIDIOC_S_PARM with NULL parameter", }, */
+	{"VIDIOC_ENUMSTD with NULL parameter", test_VIDIOC_ENUMSTD_NULL},
+	{"VIDIOC_ENUMINPUT with NULL parameter", test_VIDIOC_ENUMINPUT_NULL},
+	{"VIDIOC_G_CTRL with NULL parameter", test_VIDIOC_G_CTRL_NULL},
+	{"VIDIOC_S_CTRL with NULL parameter", test_VIDIOC_S_CTRL_NULL},
+	{"VIDIOC_G_TUNER with NULL parameter", test_VIDIOC_G_TUNER_NULL},
+	{"VIDIOC_QUERYCTRL with NULL parameter", test_VIDIOC_QUERYCTRL_NULL},
+	{"VIDIOC_QUERYMENU with NULL parameter", test_VIDIOC_QUERYMENU_NULL},
+	{"VIDIOC_S_INPUT with NULL parameter", test_VIDIOC_S_INPUT_NULL},
+	{"VIDIOC_S_OUTPUT with NULL parameter", test_VIDIOC_S_OUTPUT_NULL},
+	{"VIDIOC_ENUMOUTPUT with NULL parameter", test_VIDIOC_ENUMOUTPUT_NULL},
+	{"VIDIOC_G_MODULATOR with NULL parameter",
+	 test_VIDIOC_G_MODULATOR_NULL},
+	{"VIDIOC_G_FREQUENCY with NULL parameter",
+	 test_VIDIOC_G_FREQUENCY_NULL},
+	{"VIDIOC_CROPCAP with NULL parameter", test_VIDIOC_CROPCAP_NULL},
+	{"VIDIOC_G_CROP with NULL parameter", test_VIDIOC_G_CROP_NULL},
+	/* { "VIDIOC_TRY_FMT with NULL parameter", }, */
+	{"VIDIOC_ENUMAUDIO with NULL parameter", test_VIDIOC_ENUMAUDIO_NULL},
+	{"VIDIOC_ENUMAUDOUT with NULL parameter", test_VIDIOC_ENUMAUDOUT_NULL},
+	{"VIDIOC_G_SLICED_VBI_CAP with NULL parameter",
+	 test_VIDIOC_G_SLICED_VBI_CAP_NULL},
+	{"VIDIOC_G_EXT_CTRLS with NULL parameter",
+	 test_VIDIOC_G_EXT_CTRLS_NULL},
+	{"VIDIOC_S_EXT_CTRLS with NULL parameter",
+	 test_VIDIOC_S_EXT_CTRLS_NULL},
+	{"VIDIOC_TRY_EXT_CTRLS with NULL parameter",
+	 test_VIDIOC_TRY_EXT_CTRLS_NULL},
+	{"VIDIOC_ENUM_FRAMESIZES with NULL parameter",
+	 test_VIDIOC_ENUM_FRAMESIZES_NULL},
+	/* { "VIDIOC_ENUM_FRAMEINTERVALS with NULL parameter", }, */
+	/* { "VIDIOC_ENCODER_CMD with NULL parameter", }, */
+	/* { "VIDIOC_TRY_ENCODER_CMD with NULL parameter", }, */
+	/* { "VIDIOC_DBG_G_REGISTER with NULL parameter", }, */
+	/* { "VIDIOC_DBG_G_CHIP_IDENT with NULL parameter", }, */
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_invalid_ioctl[] = {
-  { "invalid ioctl _IO(0, 0)", test_invalid_ioctl_1 },
-  { "invalid ioctl _IO(0xFF, 0xFF)", test_invalid_ioctl_2 },
-  { "invalid v4l1 ioctl _IO('v', 0xFF)", test_invalid_ioctl_3 },
-  { "invalid v4l2 ioctl _IO('V', 0xFF)", test_invalid_ioctl_4 },
+	{"invalid ioctl _IO(0, 0)", test_invalid_ioctl_1},
+	{"invalid ioctl _IO(0xFF, 0xFF)", test_invalid_ioctl_2},
+	{"invalid v4l1 ioctl _IO('v', 0xFF)", test_invalid_ioctl_3},
+	{"invalid v4l2 ioctl _IO('V', 0xFF)", test_invalid_ioctl_4},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_TestInfo suite_debug_ioctl[] = {
-  { "test_VIDIOC_LOG_STATUS", test_VIDIOC_LOG_STATUS },
+	{"test_VIDIOC_LOG_STATUS", test_VIDIOC_LOG_STATUS},
 
-  CU_TEST_INFO_NULL,
+	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo suites[] = {
-  { "VIDIOC_QUERYCAP", open_video, close_video, suite_querycap },
-  { "VIDIOC_ENUM* ioctl calls", open_video, close_video, suite_enums },
-  { "VIDIOC_G_*, VIDIOC_S_* and VIDIOC_TRY_* ioctl calls", open_video, close_video, suite_get_set_try },
-  { "VIDIOC_QUERYSTD", open_video, close_video, suite_querystd },
-  { "buffer i/o", open_video, close_video, suite_buffs },
-  { "read only IOCTLs with NULL parameter", open_video, close_video, suite_null_readonly },
-  { "write only IOCTLs with NULL parameter", open_video, close_video, suite_null_writeonly },
-  { "write and read IOCTLs with NULL parameter", open_video, close_video, suite_null_writeread },
-  { "debug ioctl calls", open_video, close_video, suite_debug_ioctl },
-  { "invalid ioctl calls", open_video, close_video, suite_invalid_ioctl },
-  CU_SUITE_INFO_NULL,
+	{"VIDIOC_QUERYCAP", open_video, close_video, suite_querycap},
+	{"VIDIOC_ENUM* ioctl calls", open_video, close_video, suite_enums},
+	{"VIDIOC_G_*, VIDIOC_S_* and VIDIOC_TRY_* ioctl calls", open_video,
+	 close_video, suite_get_set_try},
+	{"VIDIOC_QUERYSTD", open_video, close_video, suite_querystd},
+	{"buffer i/o", open_video, close_video, suite_buffs},
+	{"read only IOCTLs with NULL parameter", open_video, close_video,
+	 suite_null_readonly},
+	{"write only IOCTLs with NULL parameter", open_video, close_video,
+	 suite_null_writeonly},
+	{"write and read IOCTLs with NULL parameter", open_video, close_video,
+	 suite_null_writeread},
+	{"debug ioctl calls", open_video, close_video, suite_debug_ioctl},
+	{"invalid ioctl calls", open_video, close_video, suite_invalid_ioctl},
+	CU_SUITE_INFO_NULL,
 };
 
-int main() {
+int main()
+{
 	CU_ErrorCode err;
 
 	err = CU_initialize_registry();
diff --git a/testcases/kernel/device-drivers/v4l/user_space/v4l2_validator.c b/testcases/kernel/device-drivers/v4l/user_space/v4l2_validator.c
index b917a65..b519012 100644
--- a/testcases/kernel/device-drivers/v4l/user_space/v4l2_validator.c
+++ b/testcases/kernel/device-drivers/v4l/user_space/v4l2_validator.c
@@ -24,36 +24,36 @@
 #include "video_limits.h"
 #include "v4l2_validator.h"
 
-int valid_v4l2_std_id(v4l2_std_id std_id) {
+int valid_v4l2_std_id(v4l2_std_id std_id)
+{
 	int valid = 0;
 
-	if ( (std_id & ~(V4L2_STD_PAL_B |
-			 V4L2_STD_PAL_B1 |
-			 V4L2_STD_PAL_G |
-			 V4L2_STD_PAL_H |
-			 V4L2_STD_PAL_I |
-			 V4L2_STD_PAL_D |
-			 V4L2_STD_PAL_D1 |
-			 V4L2_STD_PAL_K |
-			 V4L2_STD_PAL_M |
-			 V4L2_STD_PAL_N |
-			 V4L2_STD_PAL_Nc |
-			 V4L2_STD_PAL_60 |
-			 V4L2_STD_NTSC_M |
-			 V4L2_STD_NTSC_M_JP |
-			 V4L2_STD_NTSC_443 |
-			 V4L2_STD_NTSC_M_KR |
-			 V4L2_STD_SECAM_B |
-			 V4L2_STD_SECAM_D |
-			 V4L2_STD_SECAM_G |
-			 V4L2_STD_SECAM_H |
-			 V4L2_STD_SECAM_K |
-			 V4L2_STD_SECAM_K1 |
-			 V4L2_STD_SECAM_L |
-			 V4L2_STD_SECAM_LC |
-			 V4L2_STD_ATSC_8_VSB |
-			 V4L2_STD_ATSC_16_VSB))
-		== 0) {
+	if ((std_id & ~(V4L2_STD_PAL_B |
+			V4L2_STD_PAL_B1 |
+			V4L2_STD_PAL_G |
+			V4L2_STD_PAL_H |
+			V4L2_STD_PAL_I |
+			V4L2_STD_PAL_D |
+			V4L2_STD_PAL_D1 |
+			V4L2_STD_PAL_K |
+			V4L2_STD_PAL_M |
+			V4L2_STD_PAL_N |
+			V4L2_STD_PAL_Nc |
+			V4L2_STD_PAL_60 |
+			V4L2_STD_NTSC_M |
+			V4L2_STD_NTSC_M_JP |
+			V4L2_STD_NTSC_443 |
+			V4L2_STD_NTSC_M_KR |
+			V4L2_STD_SECAM_B |
+			V4L2_STD_SECAM_D |
+			V4L2_STD_SECAM_G |
+			V4L2_STD_SECAM_H |
+			V4L2_STD_SECAM_K |
+			V4L2_STD_SECAM_K1 |
+			V4L2_STD_SECAM_L |
+			V4L2_STD_SECAM_LC |
+			V4L2_STD_ATSC_8_VSB | V4L2_STD_ATSC_16_VSB))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -61,16 +61,16 @@
 	return valid;
 }
 
-int valid_tuner_capability(__u32 capability) {
+int valid_tuner_capability(__u32 capability)
+{
 	int valid = 0;
 
-	if ( (capability & ~(V4L2_TUNER_CAP_LOW |
-			     V4L2_TUNER_CAP_NORM |
-			     V4L2_TUNER_CAP_STEREO |
-			     V4L2_TUNER_CAP_LANG1 |
-			     V4L2_TUNER_CAP_LANG2 |
-			     V4L2_TUNER_CAP_SAP))
-		== 0) {
+	if ((capability & ~(V4L2_TUNER_CAP_LOW |
+			    V4L2_TUNER_CAP_NORM |
+			    V4L2_TUNER_CAP_STEREO |
+			    V4L2_TUNER_CAP_LANG1 |
+			    V4L2_TUNER_CAP_LANG2 | V4L2_TUNER_CAP_SAP))
+	    == 0) {
 		valid = 1;
 	} else {
 		valid = 0;
@@ -78,11 +78,13 @@
 	return valid;
 }
 
-int valid_modulator_capability(__u32 capability) {
+int valid_modulator_capability(__u32 capability)
+{
 	return valid_tuner_capability(capability);
 }
 
-int valid_string(char* str, unsigned int max_length) {
+int valid_string(char *str, unsigned int max_length)
+{
 	int valid = 1;
 	unsigned int i;
 
diff --git a/testcases/kernel/fs/acls/acl_file_test.c b/testcases/kernel/fs/acls/acl_file_test.c
index b516c38..eb30d28 100644
--- a/testcases/kernel/fs/acls/acl_file_test.c
+++ b/testcases/kernel/fs/acls/acl_file_test.c
@@ -7,17 +7,18 @@
 #include <sys/xattr.h>
 #include <string.h>
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	ssize_t s;
-	char * tok;
+	char *tok;
 	char value[1024];
 	char list[1024];
 	int rc = 0;
-	char * file;
+	char *file;
 	int fd;
 
 	if (argc < 2) {
-		printf ("Please enter a file name as argument.\n");
+		printf("Please enter a file name as argument.\n");
 		return -1;
 	}
 
@@ -25,7 +26,7 @@
 
 	fd = open(file, O_RDONLY);
 	if (fd < 0) {
-		printf ("Unable to open file %s !", file);
+		printf("Unable to open file %s !", file);
 		return -1;
 	}
 
@@ -34,36 +35,39 @@
 		return 1;
 	}
 	if (s == 0) {
-		printf("No xattrs defined for %s, further testcase useless\n",file);
+		printf("No xattrs defined for %s, further testcase useless\n",
+		       file);
 		return 1;
 	}
 	tok = strtok(list, "\0");
-	s = fgetxattr(fd, tok, (void*)value, 1024);
+	s = fgetxattr(fd, tok, (void *)value, 1024);
 	if (s == -1) {
 		perror("fgetxattr");
 		return 1;
 	}
-	s = fsetxattr(fd, tok, (void*)value, s, 0);
+	s = fsetxattr(fd, tok, (void *)value, s, 0);
 
 	if (s == -1) {
-		printf ("User unable to change extended attributes on file %s !\n", argv[1]);
+		printf
+		    ("User unable to change extended attributes on file %s !\n",
+		     argv[1]);
 		printf("errno = %i\n", errno);
 		rc = 1;
 	}
-
 	//s = syscall(237, fd,tok); //fremovexattr
 #ifdef __NR_fremovexattr
-	s = syscall(__NR_fremovexattr, fd,tok); //fremovexattr
+	s = syscall(__NR_fremovexattr, fd, tok);	//fremovexattr
 #else
 	s = -1;
 	errno = ENOSYS;
 #endif
 	if (s == -1) {
-		printf ("User unable to remove extended attributes file %s !\n", argv[1]);
+		printf("User unable to remove extended attributes file %s !\n",
+		       argv[1]);
 		printf("errno = %i\n", errno);
 		rc = 1;
 	}
 
-	close (fd);
-	return  rc;
+	close(fd);
+	return rc;
 }
diff --git a/testcases/kernel/fs/acls/acl_link_test.c b/testcases/kernel/fs/acls/acl_link_test.c
index 550b73e..312f686 100644
--- a/testcases/kernel/fs/acls/acl_link_test.c
+++ b/testcases/kernel/fs/acls/acl_link_test.c
@@ -6,15 +6,16 @@
 #include <string.h>
 #include <sys/xattr.h>
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	ssize_t s;
-	char * tok;
+	char *tok;
 	char value[1024];
 	char list[1024];
 	int rc = 0;
 
 	if (argc < 2) {
-		printf ("Please enter a file name as argument.\n");
+		printf("Please enter a file name as argument.\n");
 		return -1;
 	}
 
@@ -23,30 +24,33 @@
 		return 1;
 	}
 	if (s == 0) {
-		printf("No xattrs defined for %s, further testcase useless\n",argv[1]);
+		printf("No xattrs defined for %s, further testcase useless\n",
+		       argv[1]);
 		return 1;
 	}
 	tok = strtok(list, "\0");
-	s = getxattr(argv[1], tok, (void*)value, 1024);
+	s = getxattr(argv[1], tok, (void *)value, 1024);
 	if (-1 == s) {
 		perror("getxattr");
 		return -1;
 	}
 
-	s = lsetxattr(argv[1], tok, (void*)value, s, 0);
+	s = lsetxattr(argv[1], tok, (void *)value, s, 0);
 
 	if (s == -1) {
-		printf ("User unable to change extended attributes %s !\n", argv[1]);
+		printf("User unable to change extended attributes %s !\n",
+		       argv[1]);
 		printf("errno = %i\n", errno);
 		rc = 1;
 	}
 
-	s = lremovexattr(argv[1],tok);
+	s = lremovexattr(argv[1], tok);
 	if (s == -1) {
-		printf ("User unable to remove extended attributes %s !\n", argv[1]);
+		printf("User unable to remove extended attributes %s !\n",
+		       argv[1]);
 		printf("errno = %i\n", errno);
 		rc = 1;
 	}
 
-	return  rc;
+	return rc;
 }
diff --git a/testcases/kernel/fs/dmapi/attr.c b/testcases/kernel/fs/dmapi/attr.c
index b3d5ca9..1bea383 100644
--- a/testcases/kernel/fs/dmapi/attr.c
+++ b/testcases/kernel/fs/dmapi/attr.c
@@ -70,7 +70,7 @@
 dm_size_t maxAttrSize;
 dm_size_t persInheritAttr;
 
-void LogDmStat(dm_stat_t *statdm)
+void LogDmStat(dm_stat_t * statdm)
 {
 
 	DMLOG_PRINT(DMLVL_DEBUG, "    dt_dev %d\n", statdm->dt_dev);
@@ -89,14 +89,18 @@
 
 }
 
-void LogDmAttrs(dm_attrlist_t *attrlist)
+void LogDmAttrs(dm_attrlist_t * attrlist)
 {
 
 	int i = 0;
 	dm_attrlist_t *attr = attrlist;
 
 	while (attr != NULL) {
-		DMLOG_PRINT(DMLVL_DEBUG, "  dmattr %d: name %.*s, value %.*s\n", i++, DM_ATTR_NAME_SIZE, attr->al_name.an_chars, DM_GET_LEN(attr, al_data), DM_GET_VALUE(attr, al_data, char *));
+		DMLOG_PRINT(DMLVL_DEBUG, "  dmattr %d: name %.*s, value %.*s\n",
+			    i++, DM_ATTR_NAME_SIZE, attr->al_name.an_chars,
+			    DM_GET_LEN(attr, al_data), DM_GET_VALUE(attr,
+								    al_data,
+								    char *));
 		attr = DM_STEP_TO_NEXT(attr, dm_attrlist_t *);
 	}
 }
@@ -104,25 +108,32 @@
 void LogDirAttrs(void *attrlist, u_int mask)
 {
 	int i = 0;
-	dm_stat_t *stat = (dm_stat_t *)attrlist;
+	dm_stat_t *stat = (dm_stat_t *) attrlist;
 
 	while (stat != NULL) {
 		DMLOG_PRINT(DMLVL_DEBUG, "  dirattr %d:\n", i++);
-		DMLOG_PRINT(DMLVL_DEBUG, "    dt_compname: %s\n", DM_GET_VALUE(stat, dt_compname, char *));
+		DMLOG_PRINT(DMLVL_DEBUG, "    dt_compname: %s\n",
+			    DM_GET_VALUE(stat, dt_compname, char *));
 		if (mask & DM_AT_HANDLE)
-	       		dm_LogHandle(DM_GET_VALUE(stat, dt_handle, void *), DM_GET_LEN(stat, dt_handle));
+			dm_LogHandle(DM_GET_VALUE(stat, dt_handle, void *),
+				     DM_GET_LEN(stat, dt_handle));
 		if (mask & DM_AT_EMASK)
-			DMLOG_PRINT(DMLVL_DEBUG, "    dt_emask: %x\n", stat->dt_emask);
+			DMLOG_PRINT(DMLVL_DEBUG, "    dt_emask: %x\n",
+				    stat->dt_emask);
 		if (mask & DM_AT_PMANR)
-			DMLOG_PRINT(DMLVL_DEBUG, "    dt_pmanreg: %s\n", stat->dt_pmanreg ? "DM_TRUE" : "DM_FALSE");
+			DMLOG_PRINT(DMLVL_DEBUG, "    dt_pmanreg: %s\n",
+				    stat->dt_pmanreg ? "DM_TRUE" : "DM_FALSE");
 		if (mask & DM_AT_PATTR)
-			DMLOG_PRINT(DMLVL_DEBUG, "    dt_pers: %s\n", stat->dt_pers ? "DM_TRUE" : "DM_FALSE");
+			DMLOG_PRINT(DMLVL_DEBUG, "    dt_pers: %s\n",
+				    stat->dt_pers ? "DM_TRUE" : "DM_FALSE");
 		if (mask & DM_AT_DTIME)
-			DMLOG_PRINT(DMLVL_DEBUG, "    dt_dtime: %d\n", stat->dt_dtime);
+			DMLOG_PRINT(DMLVL_DEBUG, "    dt_dtime: %d\n",
+				    stat->dt_dtime);
 		if (mask & DM_AT_CFLAG)
-			DMLOG_PRINT(DMLVL_DEBUG, "    dt_change: %d\n", stat->dt_change);
+			DMLOG_PRINT(DMLVL_DEBUG, "    dt_change: %d\n",
+				    stat->dt_change);
 		if (mask & DM_AT_STAT)
-	       		LogDmStat(stat);
+			LogDmStat(stat);
 
 		stat = DM_STEP_TO_NEXT(stat, dm_stat_t *);
 	}
@@ -131,10 +142,11 @@
 dm_stat_t *GetDirEntry(void *attrlist, char *compname)
 {
 
-	dm_stat_t *stat = (dm_stat_t *)attrlist;
+	dm_stat_t *stat = (dm_stat_t *) attrlist;
 
 	while (stat != NULL) {
-		if (strcmp(DM_GET_VALUE(stat, dt_compname, char *), compname) == 0)
+		if (strcmp(DM_GET_VALUE(stat, dt_compname, char *), compname) ==
+		    0)
 			return stat;
 		stat = DM_STEP_TO_NEXT(stat, dm_stat_t *);
 	}
@@ -145,7 +157,7 @@
 dm_stat_t *GetLastDirEntry(void *attrlist)
 {
 
-	dm_stat_t *stat = (dm_stat_t *)attrlist;
+	dm_stat_t *stat = (dm_stat_t *) attrlist;
 	dm_stat_t *laststat = NULL;
 
 	while (stat != NULL) {
@@ -159,7 +171,7 @@
 int GetNumDirEntry(void *attrlist)
 {
 
-	dm_stat_t *stat = (dm_stat_t *)attrlist;
+	dm_stat_t *stat = (dm_stat_t *) attrlist;
 	int i = 0;
 
 	while (stat != NULL) {
@@ -175,8 +187,8 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 
 	DMOPT_PARSE(argc, argv);
@@ -184,20 +196,27 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   != 0) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
 	} else {
 		int fd;
 		void *fshanp;
 		size_t fshlen;
 
-		fd = open(DUMMY_TMP, O_RDWR | O_CREAT | O_TRUNC, DUMMY_FILE_RW_MODE);
+		fd = open(DUMMY_TMP, O_RDWR | O_CREAT | O_TRUNC,
+			  DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < (TMP_FILELEN/DUMMY_STRLEN); i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < (TMP_FILELEN / DUMMY_STRLEN); i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -209,29 +228,40 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 
 		rc = dm_path_to_fshandle(DUMMY_TMP, &fshanp, &fshlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_path_to_fshandle! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_path_to_fshandle! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 
-		rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_ATTRIBUTE_SIZE, &maxAttrSize);
+		rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_ATTRIBUTE_SIZE,
+				   &maxAttrSize);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_config failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_config failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_handle_free(fshanp, fshlen);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 
-		rc = dm_get_config(fshanp, fshlen, DM_CONFIG_PERS_INHERIT_ATTRIBS, &persInheritAttr);
+		rc = dm_get_config(fshanp, fshlen,
+				   DM_CONFIG_PERS_INHERIT_ATTRIBS,
+				   &persInheritAttr);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_config failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_config failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_handle_free(fshanp, fshlen);
 			dm_destroy_session(sid);
 			DM_EXIT();
@@ -251,7 +281,7 @@
 		rmdir(DUMMY_SUBDIR);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI attribute tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI attribute tests\n");
 
 	szFuncName = "dm_set_dmattr";
 
@@ -280,19 +310,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_dmattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, &attrname, 0,
+					   sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -323,19 +360,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_dmattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, &attrname, 0,
+					   sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -366,19 +410,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -409,19 +459,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, INVALID_ADDR, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, INVALID_ADDR,
+					   &attrname, 0, sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -455,19 +511,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, (dm_attrname_t *)INVALID_ADDR, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   (dm_attrname_t *) INVALID_ADDR, 0,
+					   sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -498,19 +561,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, INVALID_ADDR, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, INVALID_ADDR, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -541,19 +610,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), (void *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf),
+					   (void *)INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -583,19 +659,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(empty attrname)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(empty attrname)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -626,22 +708,34 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero buflen)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero buflen)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, 0, NULL);
 			if (rc == 0) {
-				if ((rc = getxattr(DUMMY_FILE, fullAttrName, value, sizeof(value))) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((rc =
+				     getxattr(DUMMY_FILE, fullAttrName, value,
+					      sizeof(value))) == 0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n", szFuncName, 0, 0, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n",
+						    szFuncName, 0, 0, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -649,7 +743,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -690,27 +786,44 @@
 			free(buf);
 		}
 		if (fd == -1 || rc == -1 || buf == NULL || value == NULL) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(max buflen)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, maxAttrSize, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(max buflen)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, maxAttrSize, buf);
 			if (rc == 0) {
-				if ((rc = getxattr(DUMMY_FILE, fullAttrName, value, maxAttrSize)) == maxAttrSize) {
-					if (memcmp(buf, value, maxAttrSize) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((rc =
+				     getxattr(DUMMY_FILE, fullAttrName, value,
+					      maxAttrSize)) == maxAttrSize) {
+					if (memcmp(buf, value, maxAttrSize) ==
+					    0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected attribute value (%s vs %s)\n", szFuncName, 0, buf, value);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected attribute value (%s vs %s)\n",
+							    szFuncName, 0, buf,
+							    value);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n", szFuncName, 0, maxAttrSize, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n",
+						    szFuncName, 0, maxAttrSize,
+						    rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -718,7 +831,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			free(buf);
 			free(value);
@@ -741,9 +856,9 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
-		if ((buf = malloc(maxAttrSize+1)) == NULL) {
+		if ((buf = malloc(maxAttrSize + 1)) == NULL) {
 			/* No clean up */
-		} else if ((memset(buf, '2', maxAttrSize+1) == NULL) ||
+		} else if ((memset(buf, '2', maxAttrSize + 1) == NULL) ||
 			   ((rc = system(command)) == -1)) {
 			free(buf);
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
@@ -755,19 +870,25 @@
 			free(buf);
 		}
 		if (fd == -1 || rc == -1 || buf == NULL) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too big)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, maxAttrSize+1, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too big)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, maxAttrSize + 1, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			free(buf);
 			dm_handle_free(hanp, hlen);
@@ -801,25 +922,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one file attr, setdtime zero)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one file attr, setdtime zero)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime unmodified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime == statfs2.st_ctime)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and dtime unmodified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime modified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -827,7 +962,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -860,25 +997,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one file attr, setdtime non-zero)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 1, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one file attr, setdtime non-zero)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 1, sizeof(buf), buf);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and dtime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -886,7 +1037,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -918,16 +1071,23 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(two file attr)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(two file attr)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			if (rc == 0) {
 				memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
-				memcpy(attrname.an_chars, ATTR_NAME2, DM_ATTR_NAME_SIZE);
-				rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf2), (void *)&buf2);
+				memcpy(attrname.an_chars, ATTR_NAME2,
+				       DM_ATTR_NAME_SIZE);
+				rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+						   &attrname, 0, sizeof(buf2),
+						   (void *)&buf2);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -935,7 +1095,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -964,18 +1126,28 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(multiple file attr)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(multiple file attr)\n",
+				    szFuncName);
 			for (i = 1; (i <= NUM_ATTRS) && (rc == 0); i++) {
 				memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
-				memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
-				attrname.an_chars[DM_ATTR_NAME_SIZE-2] = '0' + (i/10);
-				attrname.an_chars[DM_ATTR_NAME_SIZE-1] = '0' + (i%10);
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(%.*s)\n", szFuncName, DM_ATTR_NAME_SIZE, attrname.an_chars);
-				rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+				memcpy(attrname.an_chars, ATTR_NAME,
+				       DM_ATTR_NAME_SIZE);
+				attrname.an_chars[DM_ATTR_NAME_SIZE - 2] =
+				    '0' + (i / 10);
+				attrname.an_chars[DM_ATTR_NAME_SIZE - 1] =
+				    '0' + (i % 10);
+				DMLOG_PRINT(DMLVL_DEBUG, "%s(%.*s)\n",
+					    szFuncName, DM_ATTR_NAME_SIZE,
+					    attrname.an_chars);
+				rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+						   &attrname, 0, sizeof(buf),
+						   buf);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -983,7 +1155,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1012,35 +1186,63 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(attrname), &attrname)) == -1) ||
-			   ((rc = (getxattr(DUMMY_FILE, fullAttrName, value, sizeof(value)) == sizeof(attrname)) ? 0 : -1) == -1) ||
-			   ((rc = (memcmp(&attrname, value, sizeof(attrname)) == 0) ? 0 : -1) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(attrname), &attrname)) == -1)
+			||
+			((rc =
+			  (getxattr
+			   (DUMMY_FILE, fullAttrName, value,
+			    sizeof(value)) == sizeof(attrname)) ? 0 : -1) == -1)
+			||
+			((rc =
+			  (memcmp(&attrname, value, sizeof(attrname)) ==
+			   0) ? 0 : -1) == -1)) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(replace file attr)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(replace file attr)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			if (rc == 0) {
-				if ((rc = getxattr(DUMMY_FILE, fullAttrName, value, sizeof(value))) == ATTR_VALUELEN) {
-					if (memcmp(buf, value, sizeof(buf)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((rc =
+				     getxattr(DUMMY_FILE, fullAttrName, value,
+					      sizeof(value))) ==
+				    ATTR_VALUELEN) {
+					if (memcmp(buf, value, sizeof(buf)) ==
+					    0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected attribute value (%s vs %s)\n", szFuncName, 0, buf, value);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected attribute value (%s vs %s)\n",
+							    szFuncName, 0, buf,
+							    value);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n", szFuncName, 0, ATTR_VALUELEN, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected attribute length (%d vs %d)\n",
+						    szFuncName, 0,
+						    ATTR_VALUELEN, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1048,7 +1250,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1072,37 +1276,54 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			rmdir(DUMMY_SUBDIR);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one dir attr, setdtime zero)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one dir attr, setdtime zero)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime unmodified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime == statfs2.st_ctime)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and dtime unmodified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime modified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1126,37 +1347,54 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			rmdir(DUMMY_SUBDIR);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one dir attr, setdtime non-zero)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 1, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one dir attr, setdtime non-zero)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 1, sizeof(buf), buf);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and dtime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1179,22 +1417,28 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1225,19 +1469,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_dmattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, &attrname, 0,
+					   sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1258,7 +1509,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_set_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+		rc = dm_set_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -1294,12 +1546,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -1333,25 +1589,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_dmattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, &attrname, sizeof(buf),
+					   buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1381,25 +1647,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_dmattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, &attrname, sizeof(buf),
+					   buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1429,25 +1705,34 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1477,25 +1762,34 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, INVALID_ADDR, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, INVALID_ADDR,
+					   &attrname, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1525,25 +1819,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, (dm_attrname_t *)INVALID_ADDR, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   (dm_attrname_t *) INVALID_ADDR,
+					   sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1573,18 +1877,25 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 1, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 1, buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 			DMLOG_PRINT(DMLVL_DEBUG, "rlen %d\n");
 
@@ -1592,7 +1903,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1624,26 +1937,36 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), (void *)INVALID_ADDR, &rlen);
-		DMLOG_PRINT(DMLVL_DEBUG, "rc = %d, %s", rc, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf),
+					   (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "rc = %d, %s", rc, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1672,25 +1995,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf,
+					   (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1718,18 +2051,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, 0, NULL)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, 0, NULL)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero buflen, zero attr len)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, NULL, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(zero buflen, zero attr len)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, NULL, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 			}
@@ -1739,7 +2080,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1769,34 +2112,54 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero buflen, non-zero attr len)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, NULL, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(zero buflen, non-zero attr len)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, NULL, &rlen);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n",
+						    rlen);
 					if (rlen == ATTR_VALUELEN) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, -1, E2BIG);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, -1,
+							    E2BIG);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n", szFuncName, -1, E2BIG, rlen, ATTR_VALUELEN);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n",
+							    szFuncName, -1,
+							    E2BIG, rlen,
+							    ATTR_VALUELEN);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, -1, E2BIG);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, -1, E2BIG);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, -1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, -1);
 				DMVAR_FAIL();
 			}
 
@@ -1804,7 +2167,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1835,19 +2200,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr not exist)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr not exist)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1877,18 +2248,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too small)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf)-1, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too small)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf) - 1, buf,
+					   &rlen);
 			if (rc == -1 && errno == E2BIG) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 			}
@@ -1898,7 +2277,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1928,34 +2309,52 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 				if (rlen == ATTR_VALUELEN) {
-					if (memcmp(buf, ATTR_VALUE, ATTR_VALUELEN) == 0) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (buf, ATTR_VALUE,
+					     ATTR_VALUELEN) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and rlen = %d but unexpected buf %s", szFuncName, 0, rlen, buf);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and rlen = %d but unexpected buf %s",
+							    szFuncName, 0, rlen,
+							    buf);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen = %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen = %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1963,7 +2362,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1997,30 +2398,44 @@
 			free(buf);
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, maxAttrSize, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, maxAttrSize, buf)) == -1) {
 			free(buf);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || buf == NULL) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(max buflen)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, maxAttrSize, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(max buflen)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, maxAttrSize, buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 				if (rlen == maxAttrSize) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n", szFuncName, 0, rlen, maxAttrSize);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n",
+						    szFuncName, 0, rlen,
+						    maxAttrSize);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2028,7 +2443,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			free(buf);
 			dm_handle_free(hanp, hlen);
@@ -2052,42 +2469,63 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 				if (rlen == ATTR_VALUELEN) {
-					if (memcmp(buf, ATTR_VALUE, ATTR_VALUELEN) == 0) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (buf, ATTR_VALUE,
+					     ATTR_VALUELEN) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and rlen = %d but unexpected buf %s", szFuncName, 0, rlen, buf);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and rlen = %d but unexpected buf %s",
+							    szFuncName, 0, rlen,
+							    buf);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen = %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen = %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2111,22 +2549,28 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2156,25 +2600,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_dmattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, &attrname, sizeof(buf),
+					   buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2196,7 +2650,9 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+		rc = dm_get_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_NO_TOKEN, &attrname, sizeof(buf), buf,
+				   &rlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -2226,7 +2682,10 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
@@ -2237,12 +2696,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -2275,19 +2738,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_remove_dmattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, 0, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2316,19 +2785,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, (void *)INVALID_ADDR, hlen,
+					      DM_NO_TOKEN, 0, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2357,19 +2832,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, 0, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2398,19 +2879,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, INVALID_ADDR, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, INVALID_ADDR, 0,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2439,19 +2926,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, (dm_attrname_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      (dm_attrname_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2480,19 +2973,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr not exist)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr not exist)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2524,36 +3023,61 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file attr, setdtime zero)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file attr, setdtime zero)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      &attrname);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if (((rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen)) == -1) && (errno == ENOENT)) {
-					if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime)) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime unmodified\n", szFuncName, 0);
+				if (((rc =
+				      dm_get_dmattr(sid, hanp, hlen,
+						    DM_NO_TOKEN, &attrname,
+						    sizeof(buf), buf,
+						    &rlen)) == -1)
+				    && (errno == ENOENT)) {
+					if ((rc2 == 0)
+					    && (statfs1.st_ctime ==
+						statfs2.st_ctime)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and dtime unmodified\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime modified (%d vs %d)\n",
+							    szFuncName, 0,
+							    statfs1.st_ctime,
+							    statfs2.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but attr still exist (errno = %d)\n", szFuncName, 0, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but attr still exist (errno = %d)\n",
+						    szFuncName, 0, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2561,7 +3085,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2593,36 +3119,61 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file attr, setdtime non-zero)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file attr, setdtime non-zero)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					      &attrname);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if (((rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen)) == -1) && (errno == ENOENT)) {
-					if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime)) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime modified\n", szFuncName, 0);
+				if (((rc =
+				      dm_get_dmattr(sid, hanp, hlen,
+						    DM_NO_TOKEN, &attrname,
+						    sizeof(buf), buf,
+						    &rlen)) == -1)
+				    && (errno == ENOENT)) {
+					if ((rc2 == 0)
+					    && (statfs1.st_ctime !=
+						statfs2.st_ctime)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and dtime modified\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n",
+							    szFuncName, 0,
+							    statfs1.st_ctime,
+							    statfs2.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but attr still exist (errno = %d)\n", szFuncName, 0, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but attr still exist (errno = %d)\n",
+						    szFuncName, 0, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2630,7 +3181,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2655,44 +3208,72 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir attr, setdtime zero)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir attr, setdtime zero)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      &attrname);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if (((rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen)) == -1) && (errno == ENOENT)) {
-					if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime)) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime unmodified\n", szFuncName, 0);
+				if (((rc =
+				      dm_get_dmattr(sid, hanp, hlen,
+						    DM_NO_TOKEN, &attrname,
+						    sizeof(buf), buf,
+						    &rlen)) == -1)
+				    && (errno == ENOENT)) {
+					if ((rc2 == 0)
+					    && (statfs1.st_ctime ==
+						statfs2.st_ctime)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and dtime unmodified\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime modified (%d vs %d)\n",
+							    szFuncName, 0,
+							    statfs1.st_ctime,
+							    statfs2.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but attr still exist (errno = %d)\n", szFuncName, 0, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but attr still exist (errno = %d)\n",
+						    szFuncName, 0, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2717,44 +3298,72 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
 			TIMESTAMP_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir attr, setdtime non-zero)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir attr, setdtime non-zero)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					      &attrname);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if (((rc = dm_get_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, sizeof(buf), buf, &rlen)) == -1) && (errno == ENOENT)) {
-					if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime)) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dtime modified\n", szFuncName, 0);
+				if (((rc =
+				      dm_get_dmattr(sid, hanp, hlen,
+						    DM_NO_TOKEN, &attrname,
+						    sizeof(buf), buf,
+						    &rlen)) == -1)
+				    && (errno == ENOENT)) {
+					if ((rc2 == 0)
+					    && (statfs1.st_ctime !=
+						statfs2.st_ctime)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and dtime modified\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime unmodified (%d vs %d)\n",
+							    szFuncName, 0,
+							    statfs1.st_ctime,
+							    statfs2.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but attr still exist (errno = %d)\n", szFuncName, 0, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but attr still exist (errno = %d)\n",
+						    szFuncName, 0, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2775,22 +3384,28 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2819,19 +3434,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_remove_dmattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, 0, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2852,7 +3473,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_remove_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, 0, &attrname);
+		rc = dm_remove_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      DM_NO_TOKEN, 0, &attrname);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -2881,7 +3503,10 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
@@ -2892,12 +3517,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n", szFuncName);
-			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n",
+				    szFuncName);
+			rc = dm_remove_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -2931,25 +3560,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_getall_dmattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2979,25 +3618,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, (void *)INVALID_ADDR, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3027,25 +3676,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3075,25 +3734,34 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, INVALID_ADDR, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, INVALID_ADDR,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3123,18 +3791,25 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too small)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen too small)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					      buf, &rlen);
 			if (rc == -1 && errno == E2BIG) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 			}
@@ -3144,7 +3819,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3174,25 +3851,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), (void *)INVALID_ADDR,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3221,25 +3908,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf,
+					      (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3270,23 +3967,33 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(no file attr)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(no file attr)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 				if (rlen == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -3294,7 +4001,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3324,30 +4033,45 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, ATTR_VALUELEN, buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one file attr)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one file attr)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				LogDmAttrs((dm_attrlist_t *)buf);
-				if (rlen == DWALIGN(sizeof(dm_attrlist_t) + ATTR_VALUELEN)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				LogDmAttrs((dm_attrlist_t *) buf);
+				if (rlen ==
+				    DWALIGN(sizeof(dm_attrlist_t) +
+					    ATTR_VALUELEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d) %d\n", szFuncName, rc, errno, rlen);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d) %d\n",
+					    szFuncName, rc, errno, rlen);
 				DMVAR_FAIL();
 			}
 
@@ -3355,7 +4079,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3385,33 +4111,55 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) ||
-			   (memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE) == NULL) ||
-			   (memcpy(attrname.an_chars, ATTR_NAME2, DM_ATTR_NAME_SIZE) == NULL) ||
-			   ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, ATTR_VALUELEN, buf)) == -1)
+			|| (memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE) ==
+			    NULL)
+			||
+			(memcpy
+			 (attrname.an_chars, ATTR_NAME2,
+			  DM_ATTR_NAME_SIZE) == NULL)
+			||
+			((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, ATTR_VALUELEN, buf)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(two file attr)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(two file attr)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				LogDmAttrs((dm_attrlist_t *)buf);
-				if (rlen == 2 * DWALIGN(sizeof(dm_attrlist_t) + ATTR_VALUELEN)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				LogDmAttrs((dm_attrlist_t *) buf);
+				if (rlen ==
+				    2 * DWALIGN(sizeof(dm_attrlist_t) +
+						ATTR_VALUELEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d) %d\n", szFuncName, rc, errno, rlen);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d) %d\n",
+					    szFuncName, rc, errno, rlen);
 				DMVAR_FAIL();
 			}
 
@@ -3419,7 +4167,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3457,12 +4207,15 @@
 		for (i = 0, len = 0, totlen = 0; i < NUM_ATTRS && rc == 0; i++) {
 			memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 			memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
-			attrname.an_chars[DM_ATTR_NAME_SIZE-2] = '0' + (i/10);
-			attrname.an_chars[DM_ATTR_NAME_SIZE-1] = '0' + (i%10);
-			memcpy(buf+len, DUMMY_STRING, DUMMY_STRLEN);
+			attrname.an_chars[DM_ATTR_NAME_SIZE - 2] =
+			    '0' + (i / 10);
+			attrname.an_chars[DM_ATTR_NAME_SIZE - 1] =
+			    '0' + (i % 10);
+			memcpy(buf + len, DUMMY_STRING, DUMMY_STRLEN);
 			len += DUMMY_STRLEN;
 			totlen += DWALIGN(len + sizeof(dm_attrlist_t));
-			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, len, buf);
+			rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, len, buf);
 		}
 		if (rc != -1) {
 			if ((totbuf = malloc(totlen)) == NULL) {
@@ -3471,24 +4224,34 @@
 			}
 		}
 		if (fd == -1 || rc == -1 || totbuf == NULL) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(%d file attr)\n", szFuncName, NUM_ATTRS);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, totlen, totbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(%d file attr)\n",
+				    szFuncName, NUM_ATTRS);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      totlen, totbuf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				LogDmAttrs((dm_attrlist_t *)totbuf);
+				LogDmAttrs((dm_attrlist_t *) totbuf);
 				if (rlen == totlen) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d) %d\n", szFuncName, rc, errno, rlen);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d) %d\n",
+					    szFuncName, rc, errno, rlen);
 				DMVAR_FAIL();
 			}
 
@@ -3496,7 +4259,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			free(totbuf);
 			dm_handle_free(hanp, hlen);
@@ -3527,31 +4292,51 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) ||
-			   ((rc = setxattr(DUMMY_FILE, NON_DM_ATTR_NAME, NON_DM_ATTR_VALUE, sizeof(NON_DM_ATTR_VALUE), 0)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, ATTR_VALUELEN, buf)) == -1)
+			||
+			((rc =
+			  setxattr(DUMMY_FILE, NON_DM_ATTR_NAME,
+				   NON_DM_ATTR_VALUE, sizeof(NON_DM_ATTR_VALUE),
+				   0)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one file attr with non-DM attr)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one file attr with non-DM attr)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				LogDmAttrs((dm_attrlist_t *)buf);
-				if (rlen == DWALIGN(sizeof(dm_attrlist_t) + ATTR_VALUELEN)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				LogDmAttrs((dm_attrlist_t *) buf);
+				if (rlen ==
+				    DWALIGN(sizeof(dm_attrlist_t) +
+					    ATTR_VALUELEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d) %d\n", szFuncName, rc, errno, rlen);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d) %d\n",
+					    szFuncName, rc, errno, rlen);
 				DMVAR_FAIL();
 			}
 
@@ -3559,7 +4344,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3582,38 +4369,56 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No claen up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, ATTR_VALUELEN, buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one dir attr)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one dir attr)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				LogDmAttrs((dm_attrlist_t *)buf);
-				if (rlen == DWALIGN(sizeof(dm_attrlist_t) + ATTR_VALUELEN)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				LogDmAttrs((dm_attrlist_t *) buf);
+				if (rlen ==
+				    DWALIGN(sizeof(dm_attrlist_t) +
+					    ATTR_VALUELEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen %d\n", szFuncName, 0, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, 0, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d) %d\n", szFuncName, rc, errno, rlen);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d) %d\n",
+					    szFuncName, rc, errno, rlen);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3637,22 +4442,28 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3682,25 +4493,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_getall_dmattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3722,7 +4543,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_getall_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+		rc = dm_getall_dmattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      DM_NO_TOKEN, sizeof(buf), buf, &rlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -3752,7 +4574,10 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, ATTR_VALUELEN, buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
@@ -3763,12 +4588,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n", szFuncName);
-			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n",
+				    szFuncName);
+			rc = dm_getall_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -3800,19 +4629,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_fileattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(INVALID_ADDR, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3840,19 +4675,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_fileattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, (void *)INVALID_ADDR, hlen,
+					     DM_NO_TOKEN, DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3880,19 +4721,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, INVALID_ADDR,
+					     DM_NO_TOKEN, DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3920,19 +4767,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, INVALID_ADDR, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, INVALID_ADDR,
+					     DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3963,19 +4816,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_HANDLE, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_HANDLE, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4003,19 +4862,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrp)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, (dm_fileattr_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrp)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_UID,
+					     (dm_fileattr_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4045,24 +4911,38 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_ATIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_ATIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_ATIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_ATIME, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_atime != statfs2.st_atime) && (statfs2.st_atime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and atime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_atime != statfs2.st_atime)
+				    && (statfs2.st_atime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and atime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but atime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_atime, statfs2.st_atime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but atime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_atime,
+						    statfs2.st_atime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4070,7 +4950,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4100,24 +4982,38 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_MTIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_MTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_MTIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_MTIME, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_mtime != statfs2.st_mtime) && (statfs2.st_mtime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and mtime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_mtime != statfs2.st_mtime)
+				    && (statfs2.st_mtime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and mtime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_mtime, statfs2.st_mtime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but mtime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_mtime,
+						    statfs2.st_mtime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4125,7 +5021,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4155,24 +5053,38 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_CTIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_CTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_CTIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_CTIME, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime) && (statfs2.st_ctime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)
+				    && (statfs2.st_ctime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4180,7 +5092,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4213,30 +5127,48 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, ATTR_VALUELEN, buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_DTIME with attr)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_DTIME with attr)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime) && (statfs2.st_ctime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)
+				    && (statfs2.st_ctime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4244,7 +5176,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4277,24 +5211,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_DTIME without attr)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_DTIME without attr)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime) && (statfs2.st_ctime != DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime unmodified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime == statfs2.st_ctime)
+				    && (statfs2.st_ctime != DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime unmodified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime modified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -4302,7 +5251,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4332,24 +5283,38 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_UID)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_UID)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_UID, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_uid != statfs2.st_uid) && (statfs2.st_uid == DUMMY_UID)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and uid modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_uid != statfs2.st_uid)
+				    && (statfs2.st_uid == DUMMY_UID)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and uid modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but uid unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_uid, statfs2.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but uid unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_uid,
+						    statfs2.st_uid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4357,7 +5322,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4387,24 +5354,38 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_GID)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_GID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_GID)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_GID, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_gid != statfs2.st_gid) && (statfs2.st_gid == DUMMY_GID)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and gid modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_gid != statfs2.st_gid)
+				    && (statfs2.st_gid == DUMMY_GID)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and gid modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but gid unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_gid, statfs2.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but gid unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_gid,
+						    statfs2.st_gid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4412,7 +5393,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4442,24 +5425,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_MODE)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_MODE, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_MODE)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_MODE, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_mode != statfs2.st_mode) && ((statfs2.st_mode & MODE_MASK) == DUMMY_MODE)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and mode modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_mode != statfs2.st_mode)
+				    && ((statfs2.st_mode & MODE_MASK) ==
+					DUMMY_MODE)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and mode modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mode unmodified (%x vs %x)\n", szFuncName, 0, statfs1.st_mode, statfs2.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but mode unmodified (%x vs %x)\n",
+						    szFuncName, 0,
+						    statfs1.st_mode,
+						    statfs2.st_mode);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4467,7 +5465,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4486,7 +5486,7 @@
 		int rc2;
 
 		/* Variation set up */
-		fileattr.fa_size = TMP_FILELEN/2;
+		fileattr.fa_size = TMP_FILELEN / 2;
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
@@ -4497,24 +5497,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_SIZE, shrink)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_SIZE, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_SIZE, shrink)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_SIZE, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_size != statfs2.st_size) && (statfs2.st_size == TMP_FILELEN/2)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and size modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_size != statfs2.st_size)
+				    && (statfs2.st_size == TMP_FILELEN / 2)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and size modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but size unmodified (%x vs %x)\n", szFuncName, 0, statfs1.st_size, statfs2.st_size);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but size unmodified (%x vs %x)\n",
+						    szFuncName, 0,
+						    statfs1.st_size,
+						    statfs2.st_size);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4522,7 +5537,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4541,7 +5558,7 @@
 		int rc2;
 
 		/* Variation set up */
-		fileattr.fa_size = TMP_FILELEN*2;
+		fileattr.fa_size = TMP_FILELEN * 2;
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
@@ -4552,24 +5569,39 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_SIZE, expand)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_SIZE, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_SIZE, expand)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_SIZE, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_size != statfs2.st_size) && (statfs2.st_size == TMP_FILELEN*2)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and size modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_size != statfs2.st_size)
+				    && (statfs2.st_size == TMP_FILELEN * 2)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and size modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but size unmodified (%x vs %x)\n", szFuncName, 0, statfs1.st_size, statfs2.st_size);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but size unmodified (%x vs %x)\n",
+						    szFuncName, 0,
+						    statfs1.st_size,
+						    statfs2.st_size);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4577,7 +5609,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4602,18 +5636,22 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_FILE, &statfs1);
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_UID, &fileattr);
 			rc2 |= stat(DUMMY_FILE, &statfs2);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -4621,7 +5659,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4642,35 +5682,52 @@
 		fileattr.fa_atime = DUMMY_TIME;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_ATIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_ATIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_ATIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_ATIME, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_atime != statfs2.st_atime) && (statfs2.st_atime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and atime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_atime != statfs2.st_atime)
+				    && (statfs2.st_atime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and atime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but atime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_atime, statfs2.st_atime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but atime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_atime,
+						    statfs2.st_atime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4691,35 +5748,52 @@
 		fileattr.fa_mtime = DUMMY_TIME;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_MTIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_MTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_MTIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_MTIME, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_mtime != statfs2.st_mtime) && (statfs2.st_mtime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and mtime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_mtime != statfs2.st_mtime)
+				    && (statfs2.st_mtime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and mtime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mtime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_mtime, statfs2.st_mtime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but mtime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_mtime,
+						    statfs2.st_mtime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4740,35 +5814,52 @@
 		fileattr.fa_ctime = DUMMY_TIME;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_CTIME)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_CTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_CTIME)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_CTIME, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime) && (statfs2.st_ctime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)
+				    && (statfs2.st_ctime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4794,38 +5885,59 @@
 		fileattr.fa_dtime = DUMMY_TIME;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, ATTR_VALUELEN, buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, ATTR_VALUELEN, buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_DTIME with attr)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_DTIME with attr)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime != statfs2.st_ctime) && (statfs2.st_ctime == DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime != statfs2.st_ctime)
+				    && (statfs2.st_ctime == DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4846,35 +5958,53 @@
 		fileattr.fa_dtime = DUMMY_TIME;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_DTIME without attr)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_DTIME without attr)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_ctime == statfs2.st_ctime) && (statfs2.st_ctime != DUMMY_TIME)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and ctime unmodified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_ctime == statfs2.st_ctime)
+				    && (statfs2.st_ctime != DUMMY_TIME)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and ctime unmodified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but ctime modified (%d vs %d)\n", szFuncName, 0, statfs1.st_ctime, statfs2.st_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but ctime modified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_ctime,
+						    statfs2.st_ctime);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4895,35 +6025,52 @@
 		fileattr.fa_uid = DUMMY_UID;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_UID)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_UID)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_UID, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_uid != statfs2.st_uid) && (statfs2.st_uid == DUMMY_UID)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and uid modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_uid != statfs2.st_uid)
+				    && (statfs2.st_uid == DUMMY_UID)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and uid modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but uid unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_uid, statfs2.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but uid unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_uid,
+						    statfs2.st_uid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4944,35 +6091,52 @@
 		fileattr.fa_gid = DUMMY_GID;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_GID)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_GID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_GID)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_GID, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_gid != statfs2.st_gid) && (statfs2.st_gid == DUMMY_GID)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and gid modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_gid != statfs2.st_gid)
+				    && (statfs2.st_gid == DUMMY_GID)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and gid modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but gid unmodified (%d vs %d)\n", szFuncName, 0, statfs1.st_gid, statfs2.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but gid unmodified (%d vs %d)\n",
+						    szFuncName, 0,
+						    statfs1.st_gid,
+						    statfs2.st_gid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -4993,35 +6157,53 @@
 		fileattr.fa_mode = DUMMY_MODE;
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			rc2 = stat(DUMMY_SUBDIR, &statfs1);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_MODE)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_MODE, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_MODE)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_MODE, &fileattr);
 			rc2 |= stat(DUMMY_SUBDIR, &statfs2);
 			if (rc == 0) {
-				if ((rc2 == 0) && (statfs1.st_mode != statfs2.st_mode) && ((statfs2.st_mode & MODE_MASK) == DUMMY_MODE)) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and mode modified\n", szFuncName, 0);
+				if ((rc2 == 0)
+				    && (statfs1.st_mode != statfs2.st_mode)
+				    && ((statfs2.st_mode & MODE_MASK) ==
+					DUMMY_MODE)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and mode modified\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mode unmodified (%x vs %x)\n", szFuncName, 0, statfs1.st_mode, statfs2.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but mode unmodified (%x vs %x)\n",
+						    szFuncName, 0,
+						    statfs1.st_mode,
+						    statfs2.st_mode);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5049,19 +6231,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_fileattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(DM_NO_SESSION, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5079,7 +6267,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_set_fileattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+		rc = dm_set_fileattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				     DM_NO_TOKEN, DM_AT_UID, &fileattr);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -5112,12 +6301,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_UID, &fileattr);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_set_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_UID, &fileattr);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -5148,19 +6341,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_fileattr(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(INVALID_ADDR, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5187,19 +6386,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_fileattr(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, (void *)INVALID_ADDR, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5226,19 +6431,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, INVALID_ADDR,
+					     DM_NO_TOKEN, DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5265,19 +6476,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, INVALID_ADDR, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, INVALID_ADDR,
+					     DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5307,19 +6524,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_HANDLE, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_HANDLE, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5345,19 +6568,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid statp)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, (dm_stat_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid statp)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK,
+					     (dm_stat_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5387,38 +6617,58 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &eventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_EMASK)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_EMASK)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &stat);
 			if (rc == 0) {
-				if (memcmp(&eventset, &stat.dt_emask, sizeof(dm_eventset_t)) == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (memcmp
+				    (&eventset, &stat.dt_emask,
+				     sizeof(dm_eventset_t)) == 0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected emask (%llx vs %llx)\n", szFuncName, 0, eventset, stat.dt_emask);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected emask (%llx vs %llx)\n",
+						    szFuncName, 0, eventset,
+						    stat.dt_emask);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(eventset);
-			rc |= dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			rc |=
+			    dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					     &eventset, DM_EVENT_MAX);
 			rc |= close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5433,7 +6683,7 @@
 		void *hanp;
 		size_t hlen;
 		dm_stat_t stat;
-		dm_region_t region = {0, 0, DM_REGION_READ};
+		dm_region_t region = { 0, 0, DM_REGION_READ };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
@@ -5445,7 +6695,10 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, 1, &region,
+				       &exactflag)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
@@ -5453,22 +6706,34 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_PMANR with region)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PMANR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_PMANR with region)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PMANR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pmanreg == DM_TRUE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n", szFuncName, 0, DM_TRUE, stat.dt_pmanreg);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n",
+						    szFuncName, 0, DM_TRUE,
+						    stat.dt_pmanreg);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5476,7 +6741,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5503,22 +6770,34 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_PMANR without region)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PMANR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_PMANR without region)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PMANR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pmanreg == DM_FALSE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n", szFuncName, 0, DM_FALSE, stat.dt_pmanreg);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n",
+						    szFuncName, 0, DM_FALSE,
+						    stat.dt_pmanreg);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5526,7 +6805,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5556,28 +6837,43 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_PATTR with attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PATTR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_PATTR with attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pers == DM_TRUE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n", szFuncName, 0, DM_TRUE, stat.dt_pers);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n",
+						    szFuncName, 0, DM_TRUE,
+						    stat.dt_pers);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5585,7 +6881,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5612,22 +6910,34 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_PATTR without attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PATTR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_PATTR without attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pers == DM_FALSE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n", szFuncName, 0, DM_FALSE, stat.dt_pers);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n",
+						    szFuncName, 0, DM_FALSE,
+						    stat.dt_pers);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5635,7 +6945,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5665,29 +6977,43 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			stat.dt_dtime = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_DTIME with attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_DTIME with attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &stat);
 			if (rc == 0) {
 				if (stat.dt_dtime != 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime not set\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime not set\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5695,7 +7021,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5725,23 +7053,34 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			stat.dt_dtime = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_DTIME without attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file DM_AT_DTIME without attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &stat);
 			if (rc == 0) {
 				if (stat.dt_dtime == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime set\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime set\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5749,7 +7088,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5782,69 +7123,118 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_STAT)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_STAT, &statdm);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file DM_AT_STAT)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &statdm);
 			if (rc == 0) {
 				varStatus = DMSTAT_PASS;
-				DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s returned expected rc = %d\n",
+					    szFuncName, rc);
 				if (statfs.st_dev != statdm.dt_dev) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching dev (%lld vs %lld)\n", szFuncName, statfs.st_dev, statdm.dt_dev);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching dev (%lld vs %lld)\n",
+						    szFuncName, statfs.st_dev,
+						    statdm.dt_dev);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_ino != statdm.dt_ino) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ino (%lld vs %lld)\n", szFuncName, statfs.st_ino, statdm.dt_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching ino (%lld vs %lld)\n",
+						    szFuncName, statfs.st_ino,
+						    statdm.dt_ino);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_mode != statdm.dt_mode) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mode (%d vs %d)\n", szFuncName, statfs.st_mode, statdm.dt_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching mode (%d vs %d)\n",
+						    szFuncName, statfs.st_mode,
+						    statdm.dt_mode);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_nlink != statdm.dt_nlink) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching nlink (%d vs %d)\n", szFuncName, statfs.st_nlink, statdm.dt_nlink);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching nlink (%d vs %d)\n",
+						    szFuncName, statfs.st_nlink,
+						    statdm.dt_nlink);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_uid != statdm.dt_uid) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching uid (%d vs %d)\n", szFuncName, statfs.st_uid, statdm.dt_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching uid (%d vs %d)\n",
+						    szFuncName, statfs.st_uid,
+						    statdm.dt_uid);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_gid != statdm.dt_gid) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching gid (%d vs %d)\n", szFuncName, statfs.st_gid, statdm.dt_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching gid (%d vs %d)\n",
+						    szFuncName, statfs.st_gid,
+						    statdm.dt_gid);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_rdev != statdm.dt_rdev) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching rdev (%lld vs %lld)\n", szFuncName, statfs.st_rdev, statdm.dt_rdev);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching rdev (%lld vs %lld)\n",
+						    szFuncName, statfs.st_rdev,
+						    statdm.dt_rdev);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_size != statdm.dt_size) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching size (%lld vs %lld)\n", szFuncName, statfs.st_size, statdm.dt_size);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching size (%lld vs %lld)\n",
+						    szFuncName, statfs.st_size,
+						    statdm.dt_size);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_atime != statdm.dt_atime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching atime (%d vs %d)\n", szFuncName, statfs.st_atime, statdm.dt_atime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching atime (%d vs %d)\n",
+						    szFuncName, statfs.st_atime,
+						    statdm.dt_atime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_mtime != statdm.dt_mtime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mtime (%d vs %d)\n", szFuncName, statfs.st_mtime, statdm.dt_mtime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching mtime (%d vs %d)\n",
+						    szFuncName, statfs.st_mtime,
+						    statdm.dt_mtime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_ctime != statdm.dt_ctime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ctime (%d vs %d)\n", szFuncName, statfs.st_ctime, statdm.dt_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching ctime (%d vs %d)\n",
+						    szFuncName, statfs.st_ctime,
+						    statdm.dt_ctime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_blksize != statdm.dt_blksize) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blksize (%d vs %d)\n", szFuncName, statfs.st_blksize, statdm.dt_blksize);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching blksize (%d vs %d)\n",
+						    szFuncName,
+						    statfs.st_blksize,
+						    statdm.dt_blksize);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_blocks != statdm.dt_blocks) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blocks (%lld vs %lld)\n", szFuncName, statfs.st_blocks, statdm.dt_blocks);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching blocks (%lld vs %lld)\n",
+						    szFuncName,
+						    statfs.st_blocks,
+						    statdm.dt_blocks);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -5853,7 +7243,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5876,38 +7268,59 @@
 		DMEV_SET(DM_EVENT_DESTROY, eventset);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &eventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_EMASK)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_EMASK)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &stat);
 			if (rc == 0) {
-				if (memcmp(&eventset, &stat.dt_emask, sizeof(dm_eventset_t)) == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (memcmp
+				    (&eventset, &stat.dt_emask,
+				     sizeof(dm_eventset_t)) == 0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected emask (%llx vs %llx)\n", szFuncName, 0, eventset, stat.dt_emask);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected emask (%llx vs %llx)\n",
+						    szFuncName, 0, eventset,
+						    stat.dt_emask);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(eventset);
-			rc |= dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			rc |=
+			    dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					     &eventset, DM_EVENT_MAX);
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5925,33 +7338,47 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_PMANR)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PMANR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_PMANR)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PMANR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pmanreg == DM_FALSE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n", szFuncName, 0, DM_FALSE, stat.dt_pmanreg);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pmanreg (%d vs %d)\n",
+						    szFuncName, 0, DM_FALSE,
+						    stat.dt_pmanreg);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5974,36 +7401,54 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_PATTR with attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PATTR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_PATTR with attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pers == DM_TRUE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n", szFuncName, 0, DM_TRUE, stat.dt_pers);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n",
+						    szFuncName, 0, DM_TRUE,
+						    stat.dt_pers);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6021,33 +7466,48 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_PATTR without attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_PATTR, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_PATTR without attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &stat);
 			if (rc == 0) {
 				if (stat.dt_pers == DM_FALSE) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n", szFuncName, 0, DM_FALSE, stat.dt_pers);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected pers (%d vs %d)\n",
+						    szFuncName, 0, DM_FALSE,
+						    stat.dt_pers);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6070,37 +7530,54 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			stat.dt_dtime = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_DTIME with attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_DTIME with attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &stat);
 			if (rc == 0) {
 				if (stat.dt_dtime != 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime not set\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime not set\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6118,34 +7595,48 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			stat.dt_dtime = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_DTIME without attr)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_DTIME, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(dir DM_AT_DTIME without attr)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &stat);
 			if (rc == 0) {
 				if (stat.dt_dtime == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime set\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but dtime set\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6165,76 +7656,126 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = stat(DUMMY_SUBDIR, &statfs)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_STAT)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_STAT, &statdm);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir DM_AT_STAT)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &statdm);
 			if (rc == 0) {
 				varStatus = DMSTAT_PASS;
-				DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s returned expected rc = %d\n",
+					    szFuncName, rc);
 				if (statfs.st_dev != statdm.dt_dev) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching dev (%lld vs %lld)\n", szFuncName, statfs.st_dev, statdm.dt_dev);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching dev (%lld vs %lld)\n",
+						    szFuncName, statfs.st_dev,
+						    statdm.dt_dev);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_ino != statdm.dt_ino) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ino (%lld vs %lld)\n", szFuncName, statfs.st_ino, statdm.dt_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching ino (%lld vs %lld)\n",
+						    szFuncName, statfs.st_ino,
+						    statdm.dt_ino);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_mode != statdm.dt_mode) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mode (%d vs %d)\n", szFuncName, statfs.st_mode, statdm.dt_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching mode (%d vs %d)\n",
+						    szFuncName, statfs.st_mode,
+						    statdm.dt_mode);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_nlink != statdm.dt_nlink) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching nlink (%d vs %d)\n", szFuncName, statfs.st_nlink, statdm.dt_nlink);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching nlink (%d vs %d)\n",
+						    szFuncName, statfs.st_nlink,
+						    statdm.dt_nlink);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_uid != statdm.dt_uid) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching uid (%d vs %d)\n", szFuncName, statfs.st_uid, statdm.dt_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching uid (%d vs %d)\n",
+						    szFuncName, statfs.st_uid,
+						    statdm.dt_uid);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_gid != statdm.dt_gid) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching gid (%d vs %d)\n", szFuncName, statfs.st_gid, statdm.dt_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching gid (%d vs %d)\n",
+						    szFuncName, statfs.st_gid,
+						    statdm.dt_gid);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_rdev != statdm.dt_rdev) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching rdev (%lld vs %lld)\n", szFuncName, statfs.st_rdev, statdm.dt_rdev);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching rdev (%lld vs %lld)\n",
+						    szFuncName, statfs.st_rdev,
+						    statdm.dt_rdev);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_size != statdm.dt_size) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching size (%lld vs %lld)\n", szFuncName, statfs.st_size, statdm.dt_size);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching size (%lld vs %lld)\n",
+						    szFuncName, statfs.st_size,
+						    statdm.dt_size);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_atime != statdm.dt_atime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching atime (%d vs %d)\n", szFuncName, statfs.st_atime, statdm.dt_atime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching atime (%d vs %d)\n",
+						    szFuncName, statfs.st_atime,
+						    statdm.dt_atime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_mtime != statdm.dt_mtime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mtime (%d vs %d)\n", szFuncName, statfs.st_mtime, statdm.dt_mtime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching mtime (%d vs %d)\n",
+						    szFuncName, statfs.st_mtime,
+						    statdm.dt_mtime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_ctime != statdm.dt_ctime) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ctime (%d vs %d)\n", szFuncName, statfs.st_ctime, statdm.dt_ctime);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching ctime (%d vs %d)\n",
+						    szFuncName, statfs.st_ctime,
+						    statdm.dt_ctime);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_blksize != statdm.dt_blksize) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blksize (%d vs %d)\n", szFuncName, statfs.st_blksize, statdm.dt_blksize);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching blksize (%d vs %d)\n",
+						    szFuncName,
+						    statfs.st_blksize,
+						    statdm.dt_blksize);
 					varStatus = DMSTAT_FAIL;
 				}
 				if (statfs.st_blocks != statdm.dt_blocks) {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blocks (%lld vs %lld)\n", szFuncName, statfs.st_blocks, statdm.dt_blocks);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with nonmatching blocks (%lld vs %lld)\n",
+						    szFuncName,
+						    statfs.st_blocks,
+						    statdm.dt_blocks);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -6242,7 +7783,9 @@
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6261,22 +7804,28 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6303,19 +7852,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_fileattr(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(DM_NO_SESSION, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6332,7 +7887,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_fileattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+		rc = dm_get_fileattr(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				     DM_NO_TOKEN, DM_AT_EMASK, &stat);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -6364,12 +7920,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &stat);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_get_fileattr(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &stat);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -6392,26 +7952,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_init_attrloc(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(INVALID_ADDR, hanp, hlen,
+					     DM_NO_TOKEN, &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6430,26 +7997,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_init_attrloc(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, (void *)INVALID_ADDR, hlen,
+					     DM_NO_TOKEN, &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6468,26 +8042,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, INVALID_ADDR,
+					     DM_NO_TOKEN, &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6506,26 +8087,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, INVALID_ADDR, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, hlen, INVALID_ADDR,
+					     &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6543,26 +8131,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid locp)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, (dm_attrloc_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid locp)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					     (dm_attrloc_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6581,22 +8176,29 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					     &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6615,19 +8217,24 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					     &loc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "loc = %lld\n", loc);
 			}
@@ -6637,7 +8244,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6656,19 +8265,23 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc);
+			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					     &loc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "loc = %lld\n", loc);
 			}
@@ -6678,7 +8291,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6697,26 +8312,33 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_init_attrloc(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(DM_NO_SESSION, hanp, hlen,
+					     DM_NO_TOKEN, &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6733,7 +8355,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_init_attrloc(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &loc);
+		rc = dm_init_attrloc(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				     DM_NO_TOKEN, &loc);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -6751,18 +8374,23 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rmdir(DUMMY_SUBDIR)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					     &loc);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -6787,27 +8415,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_dirattrs(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(INVALID_ADDR, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &loc,
+					     sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6828,27 +8467,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, (void *)INVALID_ADDR, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &loc,
+					     sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6869,27 +8519,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, INVALID_ADDR,
+					     DM_NO_TOKEN, DM_AT_EMASK, &loc,
+					     sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6910,27 +8571,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, INVALID_ADDR, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, INVALID_ADDR,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6954,27 +8626,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_SIZE, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid mask)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_SIZE, &loc, sizeof(buf), buf,
+					     &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -6994,26 +8677,35 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid locp)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, (dm_attrloc_t *)INVALID_ADDR, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid locp)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK,
+					     (dm_attrloc_t *) INVALID_ADDR,
+					     sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7034,28 +8726,39 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			loc = INVALID_ADDR;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid loc)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid loc)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7079,28 +8782,40 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, 0, buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, 0, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			DMVAR_ENDPASSEXP(szFuncName, 1, rc);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7121,27 +8836,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     (void *)INVALID_ADDR, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7161,27 +8887,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7202,22 +8939,30 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -7239,46 +8984,75 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_HANDLE)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_HANDLE, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_HANDLE)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_HANDLE, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_HANDLE);
 				if (entry != NULL) {
-					if (dm_handle_cmp(fhanp, fhlen, DM_GET_VALUE(entry, dt_handle, void *), DM_GET_LEN(entry, dt_handle)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (dm_handle_cmp
+					    (fhanp, fhlen,
+					     DM_GET_VALUE(entry, dt_handle,
+							  void *),
+					     DM_GET_LEN(entry,
+							dt_handle)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but handles NOT same\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but handles NOT same\n",
+							    szFuncName, 0);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7286,7 +9060,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -7313,47 +9089,76 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_set_eventlist(sid, fhanp, fhlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fhanp, fhlen, DM_NO_TOKEN,
+					   &eventset, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_EMASK)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_EMASK)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_EMASK);
 				if (entry != NULL) {
 					if (eventset == entry->dt_emask) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but emasks NOT same (%llx vs %llx)\n", szFuncName, 0, eventset, entry->dt_emask);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but emasks NOT same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    eventset,
+							    entry->dt_emask);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7361,7 +9166,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -7378,7 +9185,7 @@
 		dm_attrloc_t loc;
 		char buf[ATTR_LISTLEN];
 		size_t rlen;
-		dm_region_t region = {0, 0, DM_REGION_READ};
+		dm_region_t region = { 0, 0, DM_REGION_READ };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
@@ -7386,47 +9193,77 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_set_region(sid, fhanp, fhlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, fhanp, fhlen, DM_NO_TOKEN, 1,
+					&region, &exactflag)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_PMANR with region)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_PMANR, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_PMANR with region)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_PMANR, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_PMANR);
 				if (entry != NULL) {
 					if (entry->dt_pmanreg == DM_TRUE) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but pmanreg NOT same (%d vs %d)\n", szFuncName, 0, entry->dt_pmanreg, DM_TRUE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but pmanreg NOT same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_pmanreg,
+							    DM_TRUE);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7434,7 +9271,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -7458,41 +9297,65 @@
 		rc |= dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_PMANR without region)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_PMANR, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_PMANR without region)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_PMANR, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_PMANR);
 				if (entry != NULL) {
 					if (entry->dt_pmanreg == DM_FALSE) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but pmanreg NOT same (%d vs %d)\n", szFuncName, 0, entry->dt_pmanreg, DM_FALSE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but pmanreg NOT same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_pmanreg,
+							    DM_FALSE);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7500,7 +9363,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -7527,47 +9392,78 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN, &attrname, 0, sizeof(attrbuf), attrbuf)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN,
+					&attrname, 0, sizeof(attrbuf),
+					attrbuf)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_PATTR with DM attr)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_PATTR, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_PATTR with DM attr)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_PATTR);
 				if (entry != NULL) {
 					if (entry->dt_pers == DM_TRUE) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but pers NOT same (%d vs %d)\n", szFuncName, 0, entry->dt_pers, DM_TRUE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but pers NOT same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_pers,
+							    DM_TRUE);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7575,7 +9471,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -7598,41 +9496,65 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_PATTR without DM attr)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_PATTR, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_PATTR without DM attr)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_PATTR, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_PATTR);
 				if (entry != NULL) {
 					if (entry->dt_pers == DM_FALSE) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but pers NOT same (%d vs %d)\n", szFuncName, 0, entry->dt_pers, DM_FALSE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but pers NOT same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_pers,
+							    DM_FALSE);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7640,7 +9562,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -7668,48 +9592,78 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		} else if (((rc = stat(DUMMY_SUBDIR_FILE, &statfs)) == -1) ||
-			   ((rc = dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN, &attrname, 0, sizeof(attrbuf), attrbuf)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			   ((rc =
+			     dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN,
+					   &attrname, 0, sizeof(attrbuf),
+					   attrbuf)) == -1)
+			   ||
+			   ((rc =
+			     dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     &loc)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_DTIME with DM attr)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_DTIME, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_DTIME with DM attr)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_DTIME);
 				if (entry != NULL) {
 					if (entry->dt_dtime == statfs.st_ctime) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime NOT same (%d vs %d)\n", szFuncName, 0, entry->dt_dtime, statfs.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime NOT same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_dtime,
+							    statfs.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7717,7 +9671,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -7744,42 +9700,65 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		} else if (((rc = stat(DUMMY_SUBDIR_FILE, &statfs)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			   ((rc =
+			     dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     &loc)) == -1)) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_DTIME without DM attr)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_DTIME, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_DTIME without DM attr)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_DTIME, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_DTIME);
 				if (entry != NULL) {
 					if (entry->dt_dtime != statfs.st_ctime) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but dtime same (%d vs %d)\n", szFuncName, 0, entry->dt_dtime, statfs.st_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but dtime same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry->dt_dtime,
+							    statfs.st_ctime);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7787,7 +9766,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -7810,44 +9791,78 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf1), buf1, &rlen)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  DM_AT_CFLAG, &loc, sizeof(buf1), buf1,
+					  &rlen)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_CFLAG with no change)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf2), buf2, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_CFLAG with no change)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_CFLAG, &loc, sizeof(buf2),
+					     buf2, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf1, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf2, DUMMY_FILE);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf1, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf2, DUMMY_FILE);
 				LogDirAttrs(buf2, DM_AT_CFLAG);
 				if ((entry1 != NULL) && (entry2 != NULL)) {
-					if (entry1->dt_change == entry2->dt_change) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (entry1->dt_change ==
+					    entry2->dt_change) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but change not same (%d vs %d)\n", szFuncName, 0, entry1->dt_change, entry2->dt_change);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but change not same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry1->dt_change,
+							    entry2->dt_change);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7855,7 +9870,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -7879,7 +9896,10 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
@@ -7889,41 +9909,75 @@
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf1), buf1, &rlen)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN ? -1 : 0) == 1))) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  DM_AT_CFLAG, &loc, sizeof(buf1), buf1,
+					  &rlen)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN ? -1 : 0) == 1))) {
 			close(fd);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_CFLAG with data change)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf2), buf2, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_CFLAG with data change)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_CFLAG, &loc, sizeof(buf2),
+					     buf2, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf1, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf2, DUMMY_FILE);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf1, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf2, DUMMY_FILE);
 				LogDirAttrs(buf2, DM_AT_CFLAG);
 				if ((entry1 != NULL) && (entry2 != NULL)) {
-					if (entry1->dt_change != entry2->dt_change) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (entry1->dt_change !=
+					    entry2->dt_change) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but change same (%d vs %d)\n", szFuncName, 0, entry1->dt_change, entry2->dt_change);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but change same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry1->dt_change,
+							    entry2->dt_change);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -7931,7 +9985,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -7954,45 +10010,82 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf1), buf1, &rlen)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = chown(DUMMY_SUBDIR_FILE, DUMMY_UID, DUMMY_GID)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  DM_AT_CFLAG, &loc, sizeof(buf1), buf1,
+					  &rlen)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  chown(DUMMY_SUBDIR_FILE, DUMMY_UID,
+				DUMMY_GID)) == -1)) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_CFLAG with metadata change)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf2), buf2, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_CFLAG with metadata change)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_CFLAG, &loc, sizeof(buf2),
+					     buf2, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf1, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf2, DUMMY_FILE);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf1, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf2, DUMMY_FILE);
 				LogDirAttrs(buf2, DM_AT_CFLAG);
 				if ((entry1 != NULL) && (entry2 != NULL)) {
-					if (entry1->dt_change != entry2->dt_change) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (entry1->dt_change !=
+					    entry2->dt_change) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but change same (%d vs %d)\n", szFuncName, 0, entry1->dt_change, entry2->dt_change);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but change same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry1->dt_change,
+							    entry2->dt_change);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -8000,7 +10093,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8026,50 +10121,90 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf1), buf1, &rlen)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN, &attrname, 0, 0, NULL)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  DM_AT_CFLAG, &loc, sizeof(buf1), buf1,
+					  &rlen)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_set_dmattr(sid, fhanp, fhlen, DM_NO_TOKEN,
+					&attrname, 0, 0, NULL)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_CFLAG with DM attr change)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf2), buf2, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_CFLAG with DM attr change)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_CFLAG, &loc, sizeof(buf2),
+					     buf2, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf1, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf2, DUMMY_FILE);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf1, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf2, DUMMY_FILE);
 				LogDirAttrs(buf2, DM_AT_CFLAG);
 				if ((entry1 != NULL) && (entry2 != NULL)) {
-					if (entry1->dt_change != entry2->dt_change) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (entry1->dt_change !=
+					    entry2->dt_change) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but change same (%d vs %d)\n", szFuncName, 0, entry1->dt_change, entry2->dt_change);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but change same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry1->dt_change,
+							    entry2->dt_change);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -8077,7 +10212,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -8104,50 +10241,91 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp, &fhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp,
+					   &fhlen)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf1), buf1, &rlen)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = setxattr(DUMMY_SUBDIR_FILE, NON_DM_ATTR_NAME, NON_DM_ATTR_VALUE, sizeof(NON_DM_ATTR_VALUE), 0)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  DM_AT_CFLAG, &loc, sizeof(buf1), buf1,
+					  &rlen)) == -1)
+			||
+			((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			||
+			((rc =
+			  setxattr(DUMMY_SUBDIR_FILE, NON_DM_ATTR_NAME,
+				   NON_DM_ATTR_VALUE, sizeof(NON_DM_ATTR_VALUE),
+				   0)) == -1)) {
 			dm_handle_free(fhanp, fhlen);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_CFLAG with non-DM attr change)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_CFLAG, &loc, sizeof(buf2), buf2, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_CFLAG with non-DM attr change)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_CFLAG, &loc, sizeof(buf2),
+					     buf2, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf1, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf2, DUMMY_FILE);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf1, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf2, DUMMY_FILE);
 				LogDirAttrs(buf2, DM_AT_CFLAG);
 				if ((entry1 != NULL) && (entry2 != NULL)) {
-					if (entry1->dt_change != entry2->dt_change) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (entry1->dt_change !=
+					    entry2->dt_change) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but change same (%d vs %d)\n", szFuncName, 0, entry1->dt_change, entry2->dt_change);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but change same (%d vs %d)\n",
+							    szFuncName, 0,
+							    entry1->dt_change,
+							    entry2->dt_change);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -8155,7 +10333,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp, fhlen);
@@ -8180,89 +10360,162 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = stat(DUMMY_SUBDIR_FILE, &statfs)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = stat(DUMMY_SUBDIR_FILE, &statfs)) == -1)) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_STAT);
 				if (entry != NULL) {
 					varStatus = DMSTAT_PASS;
-					DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s returned expected rc = %d\n",
+						    szFuncName, rc);
 					if (statfs.st_dev != entry->dt_dev) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching dev (%lld vs %lld)\n", szFuncName, statfs.st_dev, entry->dt_dev);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching dev (%lld vs %lld)\n",
+							    szFuncName,
+							    statfs.st_dev,
+							    entry->dt_dev);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_ino != entry->dt_ino) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ino (%lld vs %lld)\n", szFuncName, statfs.st_ino, entry->dt_ino);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching ino (%lld vs %lld)\n",
+							    szFuncName,
+							    statfs.st_ino,
+							    entry->dt_ino);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_mode != entry->dt_mode) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mode (%d vs %d)\n", szFuncName, statfs.st_mode, entry->dt_mode);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching mode (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_mode,
+							    entry->dt_mode);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_nlink != entry->dt_nlink) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching nlink (%d vs %d)\n", szFuncName, statfs.st_nlink, entry->dt_nlink);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching nlink (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_nlink,
+							    entry->dt_nlink);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_uid != entry->dt_uid) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching uid (%d vs %d)\n", szFuncName, statfs.st_uid, entry->dt_uid);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching uid (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_uid,
+							    entry->dt_uid);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_gid != entry->dt_gid) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching gid (%d vs %d)\n", szFuncName, statfs.st_gid, entry->dt_gid);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching gid (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_gid,
+							    entry->dt_gid);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_rdev != entry->dt_rdev) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching rdev (%lld vs %lld)\n", szFuncName, statfs.st_rdev, entry->dt_rdev);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching rdev (%lld vs %lld)\n",
+							    szFuncName,
+							    statfs.st_rdev,
+							    entry->dt_rdev);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_size != entry->dt_size) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching size (%lld vs %lld)\n", szFuncName, statfs.st_size, entry->dt_size);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching size (%lld vs %lld)\n",
+							    szFuncName,
+							    statfs.st_size,
+							    entry->dt_size);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_atime != entry->dt_atime) {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching atime (%d vs %d)\n", szFuncName, statfs.st_atime, entry->dt_atime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching atime (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_atime,
+							    entry->dt_atime);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_mtime != entry->dt_mtime) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching mtime (%d vs %d)\n", szFuncName, statfs.st_mtime, entry->dt_mtime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching mtime (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_mtime,
+							    entry->dt_mtime);
 						varStatus = DMSTAT_FAIL;
 					}
 					if (statfs.st_ctime != entry->dt_ctime) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching ctime (%d vs %d)\n", szFuncName, statfs.st_ctime, entry->dt_ctime);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching ctime (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_ctime,
+							    entry->dt_ctime);
 						varStatus = DMSTAT_FAIL;
 					}
-					if (statfs.st_blksize != entry->dt_blksize) {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blksize (%d vs %d)\n", szFuncName, statfs.st_blksize, entry->dt_blksize);
+					if (statfs.st_blksize !=
+					    entry->dt_blksize) {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching blksize (%d vs %d)\n",
+							    szFuncName,
+							    statfs.st_blksize,
+							    entry->dt_blksize);
 						varStatus = DMSTAT_FAIL;
 					}
-					if (statfs.st_blocks != entry->dt_blocks) {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with nonmatching blocks (%lld vs %lld)\n", szFuncName, statfs.st_blocks, entry->dt_blocks);
+					if (statfs.st_blocks !=
+					    entry->dt_blocks) {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with nonmatching blocks (%lld vs %lld)\n",
+							    szFuncName,
+							    statfs.st_blocks,
+							    entry->dt_blocks);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8271,7 +10524,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8285,8 +10540,8 @@
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf1[2*ATTR_SMALLLEN];
-		char buf2[ATTR_SMALLLEN+1];
+		char buf1[2 * ATTR_SMALLLEN];
+		char buf2[ATTR_SMALLLEN + 1];
 		size_t rlen1, rlen2;
 		dm_stat_t *entry;
 		int rc1, rc2;
@@ -8299,61 +10554,118 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT over two calls)\n", szFuncName);
-			rc1 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf1), buf1, &rlen1);
-			DMLOG_PRINT(DMLVL_DEBUG, "1st call: rc %d, rlen %d, loc %llx\n", rc1, rlen1, loc);
-			rc2 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf2), buf2, &rlen2);
-			DMLOG_PRINT(DMLVL_DEBUG, "2nd call: rc %d, rlen %d, loc %llx\n", rc2, rlen2, loc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT over two calls)\n",
+				    szFuncName);
+			rc1 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf1),
+					    buf1, &rlen1);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "1st call: rc %d, rlen %d, loc %llx\n", rc1,
+				    rlen1, loc);
+			rc2 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf2),
+					    buf2, &rlen2);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "2nd call: rc %d, rlen %d, loc %llx\n", rc2,
+				    rlen2, loc);
 			varStatus = DMSTAT_PASS;
 			if (rc1 == 1) {
-				if (((num = GetNumDirEntry(buf1)) == 2) && (rlen1 >= 2 * MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "1st call attrs:\n");
+				if (((num = GetNumDirEntry(buf1)) == 2)
+				    && (rlen1 >= 2 * MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "1st call attrs:\n");
 					LogDirAttrs(buf1, DM_AT_STAT);
-					if (((entry = GetDirEntry(buf1, CURRENT_DIR)) != NULL) && ((entry = GetDirEntry(buf1, PARENT_DIR)) != NULL)) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 1st call returned expected rc = %d and %d entries %s and %s in buffer\n", szFuncName, rc1, num, CURRENT_DIR, PARENT_DIR);
+					if (((entry =
+					      GetDirEntry(buf1,
+							  CURRENT_DIR)) != NULL)
+					    &&
+					    ((entry =
+					      GetDirEntry(buf1,
+							  PARENT_DIR)) !=
+					     NULL)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 1st call returned expected rc = %d and %d entries %s and %s in buffer\n",
+							    szFuncName, rc1,
+							    num, CURRENT_DIR,
+							    PARENT_DIR);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but entries %s and/or %s not in buffer\n", szFuncName, rc1, CURRENT_DIR, PARENT_DIR);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 1st call returned expected rc = %d but entries %s and/or %s not in buffer\n",
+							    szFuncName, rc1,
+							    CURRENT_DIR,
+							    PARENT_DIR);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc1, rlen1, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 1st call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc1, rlen1,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned unexpected rc = %d\n", szFuncName, rc1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 1st call returned unexpected rc = %d\n",
+					    szFuncName, rc1);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (rc2 == 0) {
-				if (((num = GetNumDirEntry(buf2)) == 1) && (rlen2 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "2nd call attrs:\n");
+				if (((num = GetNumDirEntry(buf2)) == 1)
+				    && (rlen2 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "2nd call attrs:\n");
 					LogDirAttrs(buf2, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf2, DUMMY_FILE)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc2, num, DUMMY_FILE);
+					if ((entry =
+					     GetDirEntry(buf2,
+							 DUMMY_FILE)) != NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc2,
+							    num, DUMMY_FILE);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc2, DUMMY_FILE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 2nd call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc2,
+							    DUMMY_FILE);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc2, rlen2, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc2, rlen2,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned unexpected rc = %d\n", szFuncName, rc2);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 2nd call returned unexpected rc = %d\n",
+					    szFuncName, rc2);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8362,7 +10674,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8370,7 +10684,7 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT returned over three calls,
-	 * 		third buffer too small
+	 *              third buffer too small
 	 * EXPECTED: rc = 1, 1, 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 26)) {
@@ -8379,7 +10693,7 @@
 		dm_attrloc_t loc;
 		char buf1[ATTR_SMALLLEN];
 		char buf2[ATTR_SMALLLEN];
-		char buf3[ATTR_SMALLLEN/2];
+		char buf3[ATTR_SMALLLEN / 2];
 		size_t rlen1, rlen2, rlen3;
 		dm_stat_t *entry;
 		int rc1, rc2, rc3;
@@ -8393,74 +10707,136 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT over three calls, third buf too small)\n", szFuncName);
-			rc1 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf1), buf1, &rlen1);
-			DMLOG_PRINT(DMLVL_DEBUG, "1st call: rc %d, rlen %d, loc %llx\n", rc1, rlen1, loc);
-			rc2 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf2), buf2, &rlen2);
-			DMLOG_PRINT(DMLVL_DEBUG, "2nd call: rc %d, rlen %d, loc %llx\n", rc2, rlen2, loc);
-			rc3 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf3), buf3, &rlen3);
-			DMLOG_PRINT(DMLVL_DEBUG, "3rd call: rc %d, rlen %d, loc %llx\n", rc3, rlen3, loc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT over three calls, third buf too small)\n",
+				    szFuncName);
+			rc1 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf1),
+					    buf1, &rlen1);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "1st call: rc %d, rlen %d, loc %llx\n", rc1,
+				    rlen1, loc);
+			rc2 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf2),
+					    buf2, &rlen2);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "2nd call: rc %d, rlen %d, loc %llx\n", rc2,
+				    rlen2, loc);
+			rc3 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf3),
+					    buf3, &rlen3);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "3rd call: rc %d, rlen %d, loc %llx\n", rc3,
+				    rlen3, loc);
 			varStatus = DMSTAT_PASS;
 			if (rc1 == 1) {
-				if (((num = GetNumDirEntry(buf1)) == 1) && (rlen1 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "1st call attrs:\n");
+				if (((num = GetNumDirEntry(buf1)) == 1)
+				    && (rlen1 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "1st call attrs:\n");
 					LogDirAttrs(buf1, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf1, CURRENT_DIR)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 1st call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc1, num, CURRENT_DIR);
+					if ((entry =
+					     GetDirEntry(buf1,
+							 CURRENT_DIR)) !=
+					    NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 1st call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc1,
+							    num, CURRENT_DIR);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc1, CURRENT_DIR);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 1st call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc1,
+							    CURRENT_DIR);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc1, rlen1, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 1st call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc1, rlen1,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned unexpected rc = %d\n", szFuncName, rc1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 1st call returned unexpected rc = %d\n",
+					    szFuncName, rc1);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (rc2 == 1) {
-				if (((num = GetNumDirEntry(buf2)) == 1) && (rlen2 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "2nd call attrs:\n");
+				if (((num = GetNumDirEntry(buf2)) == 1)
+				    && (rlen2 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "2nd call attrs:\n");
 					LogDirAttrs(buf2, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf2, PARENT_DIR)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc2, num, PARENT_DIR);
+					if ((entry =
+					     GetDirEntry(buf2,
+							 PARENT_DIR)) != NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc2,
+							    num, PARENT_DIR);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc2, PARENT_DIR);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 2nd call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc2,
+							    PARENT_DIR);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc2, rlen2, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc2, rlen2,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned unexpected rc = %d\n", szFuncName, rc2);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 2nd call returned unexpected rc = %d\n",
+					    szFuncName, rc2);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (rc3 == 1) {
 				if (rlen3 == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s 3rd call returned expected rc = %d and empty buffer\n", szFuncName, rc3);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s 3rd call returned expected rc = %d and empty buffer\n",
+						    szFuncName, rc3);
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 3rd call returned expected rc = %d but unexpected rlen = %d\n", szFuncName, rc3, rlen3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 3rd call returned expected rc = %d but unexpected rlen = %d\n",
+						    szFuncName, rc3, rlen3);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 3rd call returned unexpected rc = %d\n", szFuncName, rc3);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 3rd call returned unexpected rc = %d\n",
+					    szFuncName, rc3);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8469,7 +10845,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8499,81 +10877,152 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT over three calls)\n", szFuncName);
-			rc1 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf1), buf1, &rlen1);
-			DMLOG_PRINT(DMLVL_DEBUG, "1st call: rc %d, rlen %d, loc %llx\n", rc1, rlen1, loc);
-			rc2 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf2), buf2, &rlen2);
-			DMLOG_PRINT(DMLVL_DEBUG, "2nd call: rc %d, rlen %d, loc %llx\n", rc2, rlen2, loc);
-			rc3 = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf3), buf3, &rlen3);
-			DMLOG_PRINT(DMLVL_DEBUG, "3rd call: rc %d, rlen %d, loc %llx\n", rc3, rlen3, loc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT over three calls)\n",
+				    szFuncName);
+			rc1 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf1),
+					    buf1, &rlen1);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "1st call: rc %d, rlen %d, loc %llx\n", rc1,
+				    rlen1, loc);
+			rc2 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf2),
+					    buf2, &rlen2);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "2nd call: rc %d, rlen %d, loc %llx\n", rc2,
+				    rlen2, loc);
+			rc3 =
+			    dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					    DM_AT_STAT, &loc, sizeof(buf3),
+					    buf3, &rlen3);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "3rd call: rc %d, rlen %d, loc %llx\n", rc3,
+				    rlen3, loc);
 			varStatus = DMSTAT_PASS;
 			if (rc1 == 1) {
-				if (((num = GetNumDirEntry(buf1)) == 1) && (rlen1 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "1st call attrs:\n");
+				if (((num = GetNumDirEntry(buf1)) == 1)
+				    && (rlen1 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "1st call attrs:\n");
 					LogDirAttrs(buf1, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf1, CURRENT_DIR)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 1st call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc1, num, CURRENT_DIR);
+					if ((entry =
+					     GetDirEntry(buf1,
+							 CURRENT_DIR)) !=
+					    NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 1st call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc1,
+							    num, CURRENT_DIR);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc1, CURRENT_DIR);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 1st call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc1,
+							    CURRENT_DIR);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned expected rc = %d but unexpected rlen = %d\n and/or number of entries in buffer %d", szFuncName, rc1, rlen1, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 1st call returned expected rc = %d but unexpected rlen = %d\n and/or number of entries in buffer %d",
+						    szFuncName, rc1, rlen1,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 1st call returned unexpected rc = %d\n", szFuncName, rc1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 1st call returned unexpected rc = %d\n",
+					    szFuncName, rc1);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (rc2 == 1) {
-				if (((num = GetNumDirEntry(buf2)) == 1) && (rlen2 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "2nd call attrs:\n");
+				if (((num = GetNumDirEntry(buf2)) == 1)
+				    && (rlen2 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "2nd call attrs:\n");
 					LogDirAttrs(buf2, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf2, PARENT_DIR)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc2, num, PARENT_DIR);
+					if ((entry =
+					     GetDirEntry(buf2,
+							 PARENT_DIR)) != NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 2nd call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc2,
+							    num, PARENT_DIR);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc2, PARENT_DIR);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 2nd call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc2,
+							    PARENT_DIR);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc2, rlen2, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 2nd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc2, rlen2,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 2nd call returned unexpected rc = %d\n", szFuncName, rc2);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 2nd call returned unexpected rc = %d\n",
+					    szFuncName, rc2);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (rc3 == 0) {
-				if (((num = GetNumDirEntry(buf3)) == 1) && (rlen3 >= MIN_ENTRYLEN)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "3rd call attrs:\n");
+				if (((num = GetNumDirEntry(buf3)) == 1)
+				    && (rlen3 >= MIN_ENTRYLEN)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "3rd call attrs:\n");
 					LogDirAttrs(buf3, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf3, DUMMY_FILE)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s 3rd call returned expected rc = %d and %d entry %s in buffer\n", szFuncName, rc3, num, DUMMY_FILE);
+					if ((entry =
+					     GetDirEntry(buf3,
+							 DUMMY_FILE)) != NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s 3rd call returned expected rc = %d and %d entry %s in buffer\n",
+							    szFuncName, rc3,
+							    num, DUMMY_FILE);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s 3rd call returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc3, DUMMY_FILE);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s 3rd call returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc3,
+							    DUMMY_FILE);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s 3rd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc3, rlen3, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s 3rd call returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc3, rlen3,
+						    num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s 3rd call returned unexpected rc = %d\n", szFuncName, rc3);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 3rd call returned unexpected rc = %d\n",
+					    szFuncName, rc3);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8582,7 +11031,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8590,14 +11041,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 28)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*(DIRENTS_FILES-1)];
+		char buf[ATTR_SMALLLEN * (DIRENTS_FILES - 1)];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -8609,50 +11060,88 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, DIRENTS_FILES - 1);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, DIRENTS_FILES - 1);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == DIRENTS_FILES - 1) && (rlen >= (DIRENTS_FILES - 1 ) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) == DIRENTS_FILES - 1)
+				    && (rlen >=
+					(DIRENTS_FILES - 1) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8661,7 +11150,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8669,14 +11160,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 29)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*DIRENTS_FILES];
+		char buf[ATTR_SMALLLEN * DIRENTS_FILES];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -8688,50 +11179,87 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, DIRENTS_FILES);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, DIRENTS_FILES);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == DIRENTS_FILES) && (rlen >= DIRENTS_FILES * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) == DIRENTS_FILES)
+				    && (rlen >= DIRENTS_FILES * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8740,7 +11268,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8748,14 +11278,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 30)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*(DIRENTS_FILES+1)];
+		char buf[ATTR_SMALLLEN * (DIRENTS_FILES + 1)];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -8767,50 +11297,88 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, DIRENTS_FILES + 1);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, DIRENTS_FILES + 1);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == DIRENTS_FILES + 1) && (rlen >= (DIRENTS_FILES + 1 ) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) == DIRENTS_FILES + 1)
+				    && (rlen >=
+					(DIRENTS_FILES + 1) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8819,7 +11387,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8827,14 +11397,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 31)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*((2*DIRENTS_FILES)-1)];
+		char buf[ATTR_SMALLLEN * ((2 * DIRENTS_FILES) - 1)];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -8846,50 +11416,90 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, (2 * DIRENTS_FILES) - 1);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, (2 * DIRENTS_FILES) - 1);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == (2 * DIRENTS_FILES) - 1) && (rlen >= ((2 * DIRENTS_FILES) - 1 ) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) ==
+				     (2 * DIRENTS_FILES) - 1)
+				    && (rlen >=
+					((2 * DIRENTS_FILES) -
+					 1) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8898,7 +11508,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8906,14 +11518,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 32)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*(2*DIRENTS_FILES)];
+		char buf[ATTR_SMALLLEN * (2 * DIRENTS_FILES)];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -8925,50 +11537,88 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, 2 * DIRENTS_FILES);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, 2 * DIRENTS_FILES);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == 2 * DIRENTS_FILES) && (rlen >= (2 * DIRENTS_FILES) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) == 2 * DIRENTS_FILES)
+				    && (rlen >=
+					(2 * DIRENTS_FILES) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -8977,7 +11627,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -8985,14 +11637,14 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir > files fit in buffer)
+	 *              returned from jfs_readdir > files fit in buffer)
 	 * EXPECTED: rc = 1
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 33)) {
 		void *dhanp;
 		size_t dhlen;
 		dm_attrloc_t loc;
-		char buf[ATTR_SMALLLEN*((2*DIRENTS_FILES)+1)];
+		char buf[ATTR_SMALLLEN * ((2 * DIRENTS_FILES) + 1)];
 		size_t rlen;
 		dm_stat_t *entry;
 		int varStatus;
@@ -9004,50 +11656,90 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, (2 * DIRENTS_FILES) + 1);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, (2 * DIRENTS_FILES) + 1);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 1) {
-				if (((num = GetNumDirEntry(buf)) == (2 * DIRENTS_FILES) + 1) && (rlen >= ((2 * DIRENTS_FILES) + 1 ) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) ==
+				     (2 * DIRENTS_FILES) + 1)
+				    && (rlen >=
+					((2 * DIRENTS_FILES) +
+					 1) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) == NULL) {
-						if (((entry = GetLastDirEntry(buf)) != NULL) && (entry->dt_compname.vd_length > 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) == NULL) {
+						if (((entry =
+						      GetLastDirEntry(buf)) !=
+						     NULL)
+						    && (entry->dt_compname.
+							vd_length > 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s returned expected rc = %d, expected number of entries in buffer %d, and neither entry %s nor empty entry in buffer\n",
+								    szFuncName,
+								    rc, num,
+								    filename);
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but empty entry in buffer\n", szFuncName, rc, filename);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s returned expected rc = %d but empty entry in buffer\n",
+								    szFuncName,
+								    rc,
+								    filename);
 							varStatus = DMSTAT_FAIL;
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -9056,7 +11748,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -9064,7 +11758,7 @@
 
 	/*
 	 * TEST    : dm_get_dirattrs - DM_AT_STAT with one buffer (files
-	 * 		returned from jfs_readdir < files fit in buffer)
+	 *              returned from jfs_readdir < files fit in buffer)
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(GET_DIRATTRS_BASE + 34)) {
@@ -9083,45 +11777,74 @@
 		memset(buf, 0, sizeof(buf));
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else {
 			for (i = 0; i < NUM_FILES && rc == 0; i++) {
-				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP, DUMMY_SUBDIR_FILE, i);
+				sprintf(command, "cp %s %s.%3.3d", DUMMY_TMP,
+					DUMMY_SUBDIR_FILE, i);
 				rc = system(command);
 			}
 			if ((rc == -1) ||
-			    ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			    ((rc =
+			      dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					      &loc)) == -1)) {
 				sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 				rc = system(command);
 			}
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_STAT with %d files)\n", szFuncName, NUM_FILES + 2);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_STAT, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_AT_STAT with %d files)\n",
+				    szFuncName, NUM_FILES + 2);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_STAT, &loc, sizeof(buf), buf,
+					     &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			varStatus = DMSTAT_PASS;
 			if (rc == 0) {
-				if (((num = GetNumDirEntry(buf)) == NUM_FILES + 2) && (rlen >= (NUM_FILES + 2) * MIN_ENTRYLEN)) {
+				if (((num =
+				      GetNumDirEntry(buf)) == NUM_FILES + 2)
+				    && (rlen >=
+					(NUM_FILES + 2) * MIN_ENTRYLEN)) {
 					filename = strchr(command, '/') + 1;
 					DMLOG_PRINT(DMLVL_DEBUG, "attrs:\n");
 					LogDirAttrs(buf, DM_AT_STAT);
-					if ((entry = GetDirEntry(buf, filename)) != NULL) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d, expected number of entries in buffer %d, and entry %s in buffer\n", szFuncName, rc, num, filename);
+					if ((entry =
+					     GetDirEntry(buf,
+							 filename)) != NULL) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s returned expected rc = %d, expected number of entries in buffer %d, and entry %s in buffer\n",
+							    szFuncName, rc, num,
+							    filename);
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but entry %s not in buffer\n", szFuncName, rc, filename);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s returned expected rc = %d but entry %s not in buffer\n",
+							    szFuncName, rc,
+							    filename);
 						varStatus = DMSTAT_FAIL;
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n", szFuncName, rc, rlen, num);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s returned expected rc = %d but unexpected rlen = %d and/or number of entries in buffer %d\n",
+						    szFuncName, rc, rlen, num);
 					varStatus = DMSTAT_FAIL;
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d\n",
+					    szFuncName, rc);
 				varStatus = DMSTAT_FAIL;
 			}
 			DMVAR_END(varStatus);
@@ -9130,7 +11853,9 @@
 			sprintf(command, "rm -rf %s", DUMMY_SUBDIR);
 			rc = system(command);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -9152,27 +11877,40 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = system(command)) == -1) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp1, &fhlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_FILE, &fhanp1,
+					   &fhlen1)) == -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) == -1) {
+		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) ==
+			   -1) {
 			dm_handle_free(fhanp1, fhlen1);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_LINK, &fhanp2, &fhlen2)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_LINK, &fhanp2,
+					   &fhlen2)) == -1) {
 			unlink(DUMMY_SUBDIR_LINK);
 			dm_handle_free(fhanp1, fhlen1);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			dm_handle_free(fhanp2, fhlen2);
 			unlink(DUMMY_SUBDIR_LINK);
 			dm_handle_free(fhanp1, fhlen1);
@@ -9181,41 +11919,80 @@
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_HANDLE with link)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_HANDLE, &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_AT_HANDLE with link)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_HANDLE, &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
-				dm_stat_t *entry1 = GetDirEntry(buf, DUMMY_FILE);
-				dm_stat_t *entry2 = GetDirEntry(buf, DUMMY_LINK);
+				dm_stat_t *entry1 =
+				    GetDirEntry(buf, DUMMY_FILE);
+				dm_stat_t *entry2 =
+				    GetDirEntry(buf, DUMMY_LINK);
 				LogDirAttrs(buf, DM_AT_HANDLE);
 				if (entry1 != NULL) {
-					if (dm_handle_cmp(fhanp1, fhlen1, DM_GET_VALUE(entry1, dt_handle, void *), DM_GET_LEN(entry1, dt_handle)) == 0) {
+					if (dm_handle_cmp
+					    (fhanp1, fhlen1,
+					     DM_GET_VALUE(entry1, dt_handle,
+							  void *),
+					     DM_GET_LEN(entry1,
+							dt_handle)) == 0) {
 						if (entry2 != NULL) {
-							if (dm_handle_cmp(fhanp2, fhlen2, DM_GET_VALUE(entry2, dt_handle, void *), DM_GET_LEN(entry2, dt_handle)) == 0) {
-							  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+							if (dm_handle_cmp
+							    (fhanp2, fhlen2,
+							     DM_GET_VALUE
+							     (entry2, dt_handle,
+							      void *),
+							     DM_GET_LEN(entry2,
+									dt_handle))
+							    == 0) {
+								DMLOG_PRINT
+								    (DMLVL_DEBUG,
+								     "%s passed with expected rc = %d\n",
+								     szFuncName,
+								     0);
 								DMVAR_PASS();
 							} else {
-					  			DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but link handles NOT same\n", szFuncName, 0);
+								DMLOG_PRINT
+								    (DMLVL_ERR,
+								     "%s failed with expected rc = %d but link handles NOT same\n",
+								     szFuncName,
+								     0);
 								DMVAR_FAIL();
 							}
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_LINK);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s failed with expected rc = %d but unable to find entry %s",
+								    szFuncName,
+								    0,
+								    DUMMY_LINK);
 							DMVAR_FAIL();
 						}
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but file handles NOT same\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but file handles NOT same\n",
+							    szFuncName, 0);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -9224,7 +12001,9 @@
 			rc |= remove(DUMMY_SUBDIR_LINK);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 			dm_handle_free(fhanp1, fhlen1);
@@ -9251,38 +12030,65 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if (((rc = system(command)) == -1) ||
-			   ((rc = dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN, &loc)) == -1)) {
+			   ((rc =
+			     dm_init_attrloc(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     &loc)) == -1)) {
 			dm_handle_free(dhanp, dhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(~DM_AT_HANDLE)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN, DM_AT_ALL_DIRATTRS & (~DM_AT_HANDLE), &loc, sizeof(buf), buf, &rlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "call: rc %d, loc %lld, rlen %d\n", rc, loc, rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(~DM_AT_HANDLE)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, dhanp, dhlen, DM_NO_TOKEN,
+					     DM_AT_ALL_DIRATTRS &
+					     (~DM_AT_HANDLE), &loc, sizeof(buf),
+					     buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "call: rc %d, loc %lld, rlen %d\n", rc, loc,
+				    rlen);
 			if (rc == 0) {
 				dm_stat_t *entry = GetDirEntry(buf, DUMMY_FILE);
 				LogDirAttrs(buf, DM_AT_ALL_DIRATTRS);
 				if (entry != NULL) {
-					if ((entry->dt_handle.vd_offset == 0 ) && (entry->dt_handle.vd_length == 0)) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if ((entry->dt_handle.vd_offset == 0)
+					    && (entry->dt_handle.vd_length ==
+						0)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but handle non-zero (offset %d, length %d)\n", szFuncName, 0, entry->dt_handle.vd_offset, entry->dt_handle.vd_length);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but handle non-zero (offset %d, length %d)\n",
+							    szFuncName, 0,
+							    entry->dt_handle.
+							    vd_offset,
+							    entry->dt_handle.
+							    vd_length);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unable to find entry %s", szFuncName, 0, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unable to find entry %s",
+						    szFuncName, 0, DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -9290,7 +12096,9 @@
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -9311,22 +12119,29 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			remove(DUMMY_FILE);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9347,27 +12162,38 @@
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_SUBDIR_FILE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) ||
-			   ((rc = system(command)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					  &loc)) == -1)
+			|| ((rc = system(command)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_dirattrs(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(DM_NO_SESSION, hanp, hlen,
+					     DM_NO_TOKEN, DM_AT_EMASK, &loc,
+					     sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9387,25 +12213,37 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, DM_GLOBAL_HANP,
+					     DM_GLOBAL_HLEN, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9425,21 +12263,30 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN, &loc)) == -1) {
+		} else
+		    if ((rc =
+			 dm_init_attrloc(sid, hanp, hlen, DM_NO_TOKEN,
+					 &loc)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = rmdir(DUMMY_SUBDIR)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN, DM_AT_EMASK, &loc, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_get_dirattrs(sid, hanp, hlen, DM_NO_TOKEN,
+					     DM_AT_EMASK, &loc, sizeof(buf),
+					     buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -9467,24 +12314,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_inherit(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_inherit(INVALID_ADDR, hanp, hlen,
+					    DM_NO_TOKEN, &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9508,24 +12362,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_inherit(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, (void *)INVALID_ADDR, hlen,
+					    DM_NO_TOKEN, &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9549,24 +12410,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_inherit(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, hanp, INVALID_ADDR,
+					    DM_NO_TOKEN, &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9590,24 +12458,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_inherit(sid, hanp, hlen, INVALID_ADDR, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, hanp, hlen, INVALID_ADDR,
+					    &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9631,24 +12506,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN, (dm_attrname_t *)INVALID_ADDR, 0);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, persInheritAttr ? EFAULT : ENOSYS);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					    (dm_attrname_t *) INVALID_ADDR, 0);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+					 persInheritAttr ? EFAULT : ENOSYS);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9672,24 +12555,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_inherit(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_inherit(DM_NO_SESSION, hanp, hlen,
+					    DM_NO_TOKEN, &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9708,7 +12598,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_set_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &attrname, 0);
+		rc = dm_set_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				    DM_NO_TOKEN, &attrname, 0);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -9732,24 +12623,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					    &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9769,22 +12667,29 @@
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_set_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					    &attrname, 0);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9810,24 +12715,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_clear_inherit(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9851,24 +12763,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_clear_inherit(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, (void *)INVALID_ADDR, hlen,
+					      DM_NO_TOKEN, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9892,24 +12811,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_clear_inherit(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9933,24 +12859,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_clear_inherit(sid, hanp, hlen, INVALID_ADDR, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, hanp, hlen, INVALID_ADDR,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -9974,24 +12907,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN, (dm_attrname_t *)INVALID_ADDR);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, persInheritAttr ? EFAULT : ENOSYS);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					      (dm_attrname_t *) INVALID_ADDR);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+					 persInheritAttr ? EFAULT : ENOSYS);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10015,24 +12956,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_clear_inherit(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10051,7 +12999,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_clear_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &attrname);
+		rc = dm_clear_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      DM_NO_TOKEN, &attrname);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -10075,24 +13024,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10112,22 +13068,29 @@
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN, &attrname);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_clear_inherit(sid, hanp, hlen, DM_NO_TOKEN,
+					      &attrname);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10152,24 +13115,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_getall_inherit(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(INVALID_ADDR, hanp, hlen,
+					       DM_NO_TOKEN, 1, &inheritbuf,
+					       &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10192,24 +13163,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_getall_inherit(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, (void *)INVALID_ADDR, hlen,
+					       DM_NO_TOKEN, 1, &inheritbuf,
+					       &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10232,24 +13211,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_getall_inherit(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, hanp, INVALID_ADDR,
+					       DM_NO_TOKEN, 1, &inheritbuf,
+					       &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10272,24 +13259,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_getall_inherit(sid, hanp, hlen, INVALID_ADDR, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, hanp, hlen, INVALID_ADDR, 1,
+					       &inheritbuf, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10311,24 +13305,33 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid inheritbufp)\n", szFuncName);
-			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1, (dm_inherit_t *)INVALID_ADDR, &nelem);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, persInheritAttr ? EFAULT : ENOSYS);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid inheritbufp)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					       (dm_inherit_t *) INVALID_ADDR,
+					       &nelem);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+					 persInheritAttr ? EFAULT : ENOSYS);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10351,24 +13354,32 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_getall_inherit(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(DM_NO_SESSION, hanp, hlen,
+					       DM_NO_TOKEN, 1, &inheritbuf,
+					       &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10386,7 +13397,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_getall_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+		rc = dm_getall_inherit(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				       DM_NO_TOKEN, 1, &inheritbuf, &nelem);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -10409,24 +13421,31 @@
 			/* No clean up */
 		} else if ((fd = open(DUMMY_FILE, O_RDWR)) == -1) {
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					       &inheritbuf, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10445,22 +13464,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1, &inheritbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_getall_inherit(sid, hanp, hlen, DM_NO_TOKEN, 1,
+					       &inheritbuf, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -10468,7 +13494,9 @@
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	remove(DUMMY_TMP);
diff --git a/testcases/kernel/fs/dmapi/config.c b/testcases/kernel/fs/dmapi/config.c
index d89d79c..657484f 100644
--- a/testcases/kernel/fs/dmapi/config.c
+++ b/testcases/kernel/fs/dmapi/config.c
@@ -36,19 +36,21 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   rc;
-	int   i;
+	int rc;
+	int i;
 
 	DMOPT_PARSE(argc, argv);
 	DMLOG_START();
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION AND NO PREEXISTING FILES!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI configuration tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI configuration tests\n");
 
 	szFuncName = "dm_get_config";
 
@@ -63,26 +65,34 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_config((void *)INVALID_ADDR, hlen, DM_CONFIG_BULKALL, &retval);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_config((void *)INVALID_ADDR, hlen,
+					   DM_CONFIG_BULKALL, &retval);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -99,26 +109,34 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_config(hanp, INVALID_ADDR, DM_CONFIG_BULKALL, &retval);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_config(hanp, INVALID_ADDR,
+					   DM_CONFIG_BULKALL, &retval);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -135,18 +153,23 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid flagname)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid flagname)\n",
+				    szFuncName);
 			rc = dm_get_config(hanp, hlen, INVALID_ADDR, &retval);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -154,7 +177,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -170,26 +195,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid retvalp)\n", szFuncName);
-			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL, (dm_size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid retvalp)\n",
+				    szFuncName);
+			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL,
+					   (dm_size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -206,7 +239,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_config(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_CONFIG_BULKALL, &retval);
+		rc = dm_get_config(DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_CONFIG_BULKALL, &retval);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -223,26 +257,34 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL, &retval);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL,
+					   &retval);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -261,22 +303,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL, &retval);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL,
+					   &retval);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -293,26 +342,34 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL, &retval);
+			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL,
+					   &retval);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -329,7 +386,9 @@
 		dm_size_t retval;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
@@ -341,12 +400,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n", szFuncName);
-			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL, &retval);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n",
+				    szFuncName);
+			rc = dm_get_config(hanp, hlen, DM_CONFIG_BULKALL,
+					   &retval);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -366,29 +429,45 @@
 			dm_size_t retval;
 
 			/* Variation set up */
-			if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+			if ((fd =
+			     open(DUMMY_FILE, O_RDWR | O_CREAT,
+				  DUMMY_FILE_RW_MODE)) == -1) {
 				/* No clean up */
-			} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
+			} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) ==
+				   -1) {
 				close(fd);
 				remove(DUMMY_FILE);
 			}
 			if (fd == -1 || rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 				DMVAR_SKIP();
 			} else {
 				/* Variation */
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName, dmimpl_expectedResults[i].name);
+				DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName,
+					    dmimpl_expectedResults[i].name);
 				rc = dm_get_config(hanp, hlen, i, &retval);
 				if (rc == 0) {
-					if (retval == dmimpl_expectedResults[i].result) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (retval ==
+					    dmimpl_expectedResults[i].result) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected retval (%lld vs %lld)\n", szFuncName, 0, retval, dmimpl_expectedResults[i].result);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected retval (%lld vs %lld)\n",
+							    szFuncName, 0,
+							    retval,
+							    dmimpl_expectedResults
+							    [i].result);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with unexpected rc = %d (errno = %d)\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 
@@ -396,7 +475,9 @@
 				rc = close(fd);
 				rc |= remove(DUMMY_FILE);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Unable to clean up variation! (errno = %d)\n",
+						    errno);
 				}
 				dm_handle_free(hanp, hlen);
 			}
diff --git a/testcases/kernel/fs/dmapi/disp.c b/testcases/kernel/fs/dmapi/disp.c
index 39bb4a0..7b4123f 100644
--- a/testcases/kernel/fs/dmapi/disp.c
+++ b/testcases/kernel/fs/dmapi/disp.c
@@ -57,8 +57,8 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events, maxEvents, minEvents;
 	void *fshanp;
@@ -73,21 +73,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -104,8 +118,9 @@
 		EVENT_DELIVERY_DELAY;
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < TMP_FILELEN/DUMMY_STRLEN; i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < TMP_FILELEN / DUMMY_STRLEN; i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -120,14 +135,18 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy dir failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy dir failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
@@ -155,7 +174,8 @@
 		DMEV_SET(DM_EVENT_UNMOUNT, minEvents);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI disposition/eventlist tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI disposition/eventlist tests\n");
 
 	szFuncName = "dm_get_config_events";
 
@@ -172,12 +192,17 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_config_events((void *)INVALID_ADDR, hlen, DM_EVENT_MAX, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_config_events((void *)INVALID_ADDR, hlen,
+						  DM_EVENT_MAX, &eventset,
+						  &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
@@ -198,12 +223,17 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_config_events(hanp, INVALID_ADDR, DM_EVENT_MAX, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, INVALID_ADDR,
+						  DM_EVENT_MAX, &eventset,
+						  &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -226,27 +256,42 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, 0, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, 0, &eventset,
+						  &nelem);
 			if (rc == -1) {
 				if (errno == E2BIG) {
 					if (nelem == DM_EVENT_MAX) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n", szFuncName, rc, errno, nelem);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n",
+							    szFuncName, rc,
+							    errno, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, rc, nelem, DM_EVENT_MAX);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+							    szFuncName, rc,
+							    nelem,
+							    DM_EVENT_MAX);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -267,12 +312,17 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, (dm_eventset_t *)INVALID_ADDR, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  (dm_eventset_t *)
+						  INVALID_ADDR, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
@@ -292,12 +342,17 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, &eventset, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  &eventset,
+						  (u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
@@ -320,28 +375,44 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, &eventset, &nelem);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  &eventset, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == DM_EVENT_MAX) {
-					if (memcmp(&eventset, &dmimpl_eventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&eventset, &dmimpl_eventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, eventset, dmimpl_eventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    eventset,
+							    dmimpl_eventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -363,28 +434,45 @@
 		/* Variation set up */
 		rc = dm_path_to_handle(DummyFile, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  &eventset, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == DM_EVENT_MAX) {
-					if (memcmp(&eventset, &dmimpl_eventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&eventset, &dmimpl_eventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, eventset, dmimpl_eventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    eventset,
+							    dmimpl_eventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -406,28 +494,45 @@
 		/* Variation set up */
 		rc = dm_path_to_handle(DummySubdir, &hanp, &hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  &eventset, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == DM_EVENT_MAX) {
-					if (memcmp(&eventset, &dmimpl_eventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&eventset, &dmimpl_eventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, eventset, dmimpl_eventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    eventset,
+							    dmimpl_eventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -448,7 +553,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_config_events(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_EVENT_MAX, &eventset, &nelem);
+		rc = dm_get_config_events(DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					  DM_EVENT_MAX, &eventset, &nelem);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -468,18 +574,23 @@
 		sprintf(command, "cp %s %s", DummyFile, DummyFile2);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile2, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile2, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile2);
 		} else if ((rc = remove(DummyFile2)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n", szFuncName);
-			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX, &eventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated handle)\n",
+				    szFuncName);
+			rc = dm_get_config_events(hanp, hlen, DM_EVENT_MAX,
+						  &eventset, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -500,24 +611,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_disp(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_disp(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -534,24 +654,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_disp(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_disp(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -568,24 +697,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_disp(newsid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, (void *)INVALID_ADDR, hlen,
+					 DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -602,24 +740,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, INVALID_ADDR, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, INVALID_ADDR,
+					 DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -636,24 +783,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, INVALID_ADDR, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, INVALID_ADDR,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -669,24 +825,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, (dm_eventset_t *)INVALID_ADDR, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 (dm_eventset_t *) INVALID_ADDR,
+					 DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -703,24 +869,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid maxevent)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX+1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid maxevent)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX + 1);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -737,24 +912,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -771,24 +955,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -807,18 +1000,25 @@
 		DMEV_SET(DM_EVENT_POSTCREATE, eventset);
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid global handle event)\n", szFuncName);
-			rc = dm_set_disp(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(invalid global handle event)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					 DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -836,24 +1036,34 @@
 		/* Variation set up */
 		DMEV_ZERO(eventset);
 		DMEV_SET(DM_EVENT_MOUNT, eventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fs handle event)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(invalid fs handle event)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -872,18 +1082,25 @@
 		DMEV_SET(DM_EVENT_MOUNT, eventset);
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid global handle event)\n", szFuncName);
-			rc = dm_set_disp(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(valid global handle event)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					 DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -901,24 +1118,33 @@
 		/* Variation set up */
 		DMEV_ZERO(eventset);
 		DMEV_SET(DM_EVENT_POSTCREATE, eventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid fs handle event)\n", szFuncName);
-			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid fs handle event)\n",
+				    szFuncName);
+			rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+					 &eventset, DM_EVENT_MAX);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -974,22 +1200,31 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		} else if ((rc = dm_destroy_session(newsid)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n",
+				    szFuncName);
 			rc = dm_getall_disp(newsid, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -1010,16 +1245,24 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1030,7 +1273,9 @@
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1048,27 +1293,39 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_getall_disp(newsid, sizeof(buf), (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_getall_disp(newsid, sizeof(buf),
+					    (void *)INVALID_ADDR, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1085,27 +1342,38 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL rlenp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL rlenp)\n",
+				    szFuncName);
 			rc = dm_getall_disp(newsid, sizeof(buf), buf, NULL);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1122,27 +1390,39 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_getall_disp(newsid, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_getall_disp(newsid, sizeof(buf), buf,
+					    (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1160,20 +1440,29 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen zero)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen zero)\n",
+				    szFuncName);
 			rc = dm_getall_disp(newsid, 0, buf, &rlen);
 			if (rc == -1 && errno == E2BIG) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
@@ -1183,7 +1472,9 @@
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1201,16 +1492,24 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN, &maxEvents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_disp(newsid, hanp, hlen, DM_NO_TOKEN,
+				     &maxEvents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1218,33 +1517,64 @@
 			rc = dm_getall_disp(newsid, sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				dm_dispinfo_t *di = (dm_dispinfo_t *)buf;
+				dm_dispinfo_t *di = (dm_dispinfo_t *) buf;
 				if (rlen == sizeof(dm_dispinfo_t) + hlen) {
-					if (dm_handle_cmp(hanp, hlen, DM_GET_VALUE(di, di_fshandle, void *), DM_GET_LEN(di, di_fshandle)) == 0) {
-						if (di->di_eventset == maxEvents) {
-						  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (dm_handle_cmp
+					    (hanp, hlen,
+					     DM_GET_VALUE(di, di_fshandle,
+							  void *),
+					     DM_GET_LEN(di,
+							di_fshandle)) == 0) {
+						if (di->di_eventset ==
+						    maxEvents) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s passed with expected rc = %d\n",
+								    szFuncName,
+								    0);
 							DMVAR_PASS();
 						} else {
-						  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected eventset (%llx vs %llx)\n", szFuncName, 0, di->di_eventset, maxEvents);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s failed with expected rc = %d but unexpected eventset (%llx vs %llx)\n",
+								    szFuncName,
+								    0,
+								    di->
+								    di_eventset,
+								    maxEvents);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected fs handle (%llx vs %llx)\n", szFuncName, 0, *(__u64 *)hanp, *(__u64 *)DM_GET_VALUE(di, di_fshandle, void *));
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected fs handle (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    *(__u64 *) hanp,
+							    *(__u64 *)
+							    DM_GET_VALUE(di,
+									 di_fshandle,
+									 void
+									 *));
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n", szFuncName, 0, rlen, sizeof(dm_dispinfo_t) + hlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n",
+						    szFuncName, 0, rlen,
+						    sizeof(dm_dispinfo_t) +
+						    hlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1263,24 +1593,34 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_eventlist(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, &eventset,
+					      DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1297,24 +1637,34 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_eventlist(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, &eventset,
+					      DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1331,24 +1681,34 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, (void *)INVALID_ADDR,
+					      hlen, DM_NO_TOKEN, &eventset,
+					      DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1365,24 +1725,34 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, INVALID_ADDR, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, &eventset,
+					      DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1399,24 +1769,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, hlen, INVALID_ADDR, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, hlen, INVALID_ADDR,
+					      &eventset, DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1432,24 +1811,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, (dm_eventset_t *)INVALID_ADDR, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      (dm_eventset_t *) INVALID_ADDR,
+					      DM_EVENT_MAX);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1466,24 +1855,33 @@
 		dm_eventset_t eventset = minEvents;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid maxevent)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX+1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid maxevent)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &eventset, DM_EVENT_MAX + 1);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1503,39 +1901,64 @@
 		/* Variation set up */
 		DMEV_ZERO(eventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, eventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &eventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventset = minEvents;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(maxevent < high set event)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_ATTRIBUTE);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(maxevent < high set event)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &eventset, DM_EVENT_ATTRIBUTE);
 			if (rc == 0) {
-				if ((dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &eventset, &nelem) == 0) && (nelem == DM_EVENT_ATTRIBUTE+1) && (DMEV_ISSET(DM_EVENT_ATTRIBUTE, eventset))) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((dm_get_eventlist
+				     (newsid, hanp, hlen, DM_NO_TOKEN,
+				      DM_EVENT_MAX, &eventset, &nelem) == 0)
+				    && (nelem == DM_EVENT_ATTRIBUTE + 1)
+				    &&
+				    (DMEV_ISSET(DM_EVENT_ATTRIBUTE, eventset)))
+				{
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but high set event cleared\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but high set event cleared\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1555,39 +1978,64 @@
 		/* Variation set up */
 		DMEV_ZERO(eventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, eventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &eventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventset = minEvents;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(maxevent > high set event)\n", szFuncName);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(maxevent > high set event)\n",
+				    szFuncName);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &eventset, DM_EVENT_MAX);
 			if (rc == 0) {
-				if ((dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &eventset, &nelem) == 0) && (nelem == DM_EVENT_UNMOUNT+1) && (!DMEV_ISSET(DM_EVENT_ATTRIBUTE, eventset))) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((dm_get_eventlist
+				     (newsid, hanp, hlen, DM_NO_TOKEN,
+				      DM_EVENT_MAX, &eventset, &nelem) == 0)
+				    && (nelem == DM_EVENT_UNMOUNT + 1)
+				    &&
+				    (!DMEV_ISSET(DM_EVENT_ATTRIBUTE, eventset)))
+				{
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but high set event still set\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but high set event still set\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1599,7 +2047,8 @@
 	 * This variation uncovered XFS BUG #15 (EBADF errno returned instead
 	 * of EINVAL)
 	 */
-	for (i = 0, varNum = SET_EVENTLIST_BASE + 10; i < DM_EVENT_MAX; i++, varNum++) {
+	for (i = 0, varNum = SET_EVENTLIST_BASE + 10; i < DM_EVENT_MAX;
+	     i++, varNum++) {
 		if (DMVAR_EXEC(varNum)) {
 			dm_sessid_t newsid;
 			dm_eventset_t eventset;
@@ -1607,20 +2056,31 @@
 			/* Variation set up */
 			DMEV_ZERO(eventset);
 			DMEV_SET(i, eventset);
-			rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
+			rc = dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 				DMVAR_SKIP();
 			} else {
 				/* Variation */
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle, %s)\n", szFuncName, dmimpl_validEvents[i].name);
-				rc = dm_set_eventlist(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s(global handle, %s)\n",
+					    szFuncName,
+					    dmimpl_validEvents[i].name);
+				rc = dm_set_eventlist(newsid, DM_GLOBAL_HANP,
+						      DM_GLOBAL_HLEN,
+						      DM_NO_TOKEN, &eventset,
+						      DM_EVENT_MAX);
 				DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 				/* Variation clean up */
 				rc = dm_destroy_session(newsid);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Unable to clean up variation! (errno = %d)\n",
+						    errno);
 				}
 			}
 		}
@@ -1639,27 +2099,41 @@
 			/* Variation set up */
 			DMEV_ZERO(eventset);
 			DMEV_SET(i, eventset);
-			if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+			if ((rc =
+			     dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &newsid)) == -1) {
 				/* No clean up */
-			} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+			} else
+			    if ((rc =
+				 dm_path_to_fshandle(DummyFile, &hanp,
+						     &hlen)) == -1) {
 				dm_destroy_session(newsid);
 			}
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 				DMVAR_SKIP();
 			} else {
 				/* Variation */
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle, %s)\n", szFuncName, dmimpl_validEvents[i].name);
-				rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+				DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle, %s)\n",
+					    szFuncName,
+					    dmimpl_validEvents[i].name);
+				rc = dm_set_eventlist(newsid, hanp, hlen,
+						      DM_NO_TOKEN, &eventset,
+						      DM_EVENT_MAX);
 				if (dmimpl_validEvents[i].bFSHandle)
 					DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 				else
-					DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
+					DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+							 EINVAL);
 
 				/* Variation clean up */
 				rc = dm_destroy_session(newsid);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Unable to clean up variation! (errno = %d)\n",
+						    errno);
 				}
 				dm_handle_free(hanp, hlen);
 			}
@@ -1679,27 +2153,41 @@
 			/* Variation set up */
 			DMEV_ZERO(eventset);
 			DMEV_SET(i, eventset);
-			if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+			if ((rc =
+			     dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &newsid)) == -1) {
 				/* No clean up */
-			} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+			} else
+			    if ((rc =
+				 dm_path_to_handle(DummySubdir, &hanp,
+						   &hlen)) == -1) {
 				dm_destroy_session(newsid);
 			}
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 				DMVAR_SKIP();
 			} else {
 				/* Variation */
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle, %s)\n", szFuncName, dmimpl_validEvents[i].name);
-				rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+				DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle, %s)\n",
+					    szFuncName,
+					    dmimpl_validEvents[i].name);
+				rc = dm_set_eventlist(newsid, hanp, hlen,
+						      DM_NO_TOKEN, &eventset,
+						      DM_EVENT_MAX);
 				if (dmimpl_validEvents[i].bDirHandle)
 					DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 				else
-					DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
+					DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+							 EINVAL);
 
 				/* Variation clean up */
 				rc = dm_destroy_session(newsid);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Unable to clean up variation! (errno = %d)\n",
+						    errno);
 				}
 				dm_handle_free(hanp, hlen);
 			}
@@ -1719,27 +2207,41 @@
 			/* Variation set up */
 			DMEV_ZERO(eventset);
 			DMEV_SET(i, eventset);
-			if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+			if ((rc =
+			     dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &newsid)) == -1) {
 				/* No clean up */
-			} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+			} else
+			    if ((rc =
+				 dm_path_to_handle(DummyFile, &hanp,
+						   &hlen)) == -1) {
 				dm_destroy_session(newsid);
 			}
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 				DMVAR_SKIP();
 			} else {
 				/* Variation */
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle, %s)\n", szFuncName, dmimpl_validEvents[i].name);
-				rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &eventset, DM_EVENT_MAX);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s(file handle, %s)\n", szFuncName,
+					    dmimpl_validEvents[i].name);
+				rc = dm_set_eventlist(newsid, hanp, hlen,
+						      DM_NO_TOKEN, &eventset,
+						      DM_EVENT_MAX);
 				if (dmimpl_validEvents[i].bFileHandle)
 					DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 				else
-					DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
+					DMVAR_ENDFAILEXP(szFuncName, -1, rc,
+							 EINVAL);
 
 				/* Variation clean up */
 				rc = dm_destroy_session(newsid);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Unable to clean up variation! (errno = %d)\n",
+						    errno);
 				}
 				dm_handle_free(hanp, hlen);
 			}
@@ -1763,29 +2265,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_eventlist(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, DM_EVENT_MAX,
+					      &outeventset, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1806,29 +2322,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_eventlist(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, DM_EVENT_MAX,
+					      &outeventset, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1849,29 +2379,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, (void *)INVALID_ADDR,
+					      hlen, DM_NO_TOKEN, DM_EVENT_MAX,
+					      &outeventset, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1892,29 +2436,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, INVALID_ADDR, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, DM_EVENT_MAX,
+					      &outeventset, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1935,29 +2493,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, INVALID_ADDR, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, INVALID_ADDR,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1981,29 +2553,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2027,45 +2613,71 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem, fs handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, 0, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(invalid nelem, fs handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      0, &outeventset, &nelem);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					if (nelem == DM_EVENT_ATTRIBUTE+1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n", szFuncName, rc, errno, nelem);
+					if (nelem == DM_EVENT_ATTRIBUTE + 1) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n",
+							    szFuncName, rc,
+							    errno, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, rc, nelem, DM_EVENT_ATTRIBUTE+1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+							    szFuncName, rc,
+							    nelem,
+							    DM_EVENT_ATTRIBUTE +
+							    1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2086,45 +2698,71 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem, file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, 0, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(invalid nelem, file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      0, &outeventset, &nelem);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					if (nelem == DM_EVENT_ATTRIBUTE+1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n", szFuncName, rc, errno, nelem);
+					if (nelem == DM_EVENT_ATTRIBUTE + 1) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d (nelem = %d)\n",
+							    szFuncName, rc,
+							    errno, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, rc, nelem, DM_EVENT_ATTRIBUTE+1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+							    szFuncName, rc,
+							    nelem,
+							    DM_EVENT_ATTRIBUTE +
+							    1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2145,29 +2783,44 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, (dm_eventset_t *)INVALID_ADDR, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid eventsetp)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX,
+					      (dm_eventset_t *) INVALID_ADDR,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2187,29 +2840,43 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      (u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2229,41 +2896,63 @@
 		/* Variation set up */
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero event, fs handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero event, fs handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 0) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2283,41 +2972,64 @@
 		/* Variation set up */
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero event, file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(zero event, file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 0) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2338,46 +3050,73 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event, fs handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event, fs handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_ATTRIBUTE+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_ATTRIBUTE + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_ATTRIBUTE+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_ATTRIBUTE + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2398,46 +3137,73 @@
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event, file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event, file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_ATTRIBUTE+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_ATTRIBUTE + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_ATTRIBUTE+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_ATTRIBUTE + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2460,46 +3226,73 @@
 		DMEV_SET(DM_EVENT_CLOSE, ineventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
 		DMEV_SET(DM_EVENT_DESTROY, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(multi event, fs handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(multi event, fs handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_DESTROY+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_DESTROY + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2522,46 +3315,74 @@
 		DMEV_SET(DM_EVENT_CLOSE, ineventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
 		DMEV_SET(DM_EVENT_DESTROY, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					  &ineventset, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(multi event, file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(multi event, file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_DESTROY+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_DESTROY + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2577,53 +3398,80 @@
 		size_t hlen;
 		dm_eventset_t ineventset, outeventset;
 		u_int nelem;
-		dm_region_t region = {0, 0, DM_REGION_READ};
+		dm_region_t region = { 0, 0, DM_REGION_READ };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_READ, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1,
+				       &region, &exactflag)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(read event)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(read event)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_READ+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_READ + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_READ+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_READ + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2639,53 +3487,80 @@
 		size_t hlen;
 		dm_eventset_t ineventset, outeventset;
 		u_int nelem;
-		dm_region_t region = {0, 10, DM_REGION_WRITE};
+		dm_region_t region = { 0, 10, DM_REGION_WRITE };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_WRITE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1,
+				       &region, &exactflag)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(write event)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(write event)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_WRITE+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_WRITE + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_WRITE+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_WRITE + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2701,53 +3576,81 @@
 		size_t hlen;
 		dm_eventset_t ineventset, outeventset;
 		u_int nelem;
-		dm_region_t region = {TMP_FILELEN-10, 0, DM_REGION_TRUNCATE};
+		dm_region_t region =
+		    { TMP_FILELEN - 10, 0, DM_REGION_TRUNCATE };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
 		DMEV_ZERO(ineventset);
 		DMEV_ZERO(outeventset);
 		DMEV_SET(DM_EVENT_TRUNCATE, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if ((rc = dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1,
+				       &region, &exactflag)) == -1) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate event)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate event)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_TRUNCATE+1) {
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if (nelem == DM_EVENT_TRUNCATE + 1) {
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_TRUNCATE+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_TRUNCATE + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2763,7 +3666,8 @@
 		size_t hlen;
 		dm_eventset_t ineventset, outeventset;
 		u_int nelem;
-		dm_region_t region = {TMP_FILELEN-10, 0, DM_REGION_TRUNCATE};
+		dm_region_t region =
+		    { TMP_FILELEN - 10, 0, DM_REGION_TRUNCATE };
 		dm_boolean_t exactflag;
 
 		/* Variation set up */
@@ -2772,48 +3676,79 @@
 		DMEV_SET(DM_EVENT_CLOSE, ineventset);
 		DMEV_SET(DM_EVENT_ATTRIBUTE, ineventset);
 		DMEV_SET(DM_EVENT_DESTROY, ineventset);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
-		} else if (((rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1, &region, &exactflag)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					   &ineventset, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(newsid, hanp, hlen, DM_NO_TOKEN, 1,
+					&region, &exactflag)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(event union, file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(event union, file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
-				if (nelem == DM_EVENT_DESTROY+1) {
+				if (nelem == DM_EVENT_DESTROY + 1) {
 					DMEV_SET(DM_EVENT_TRUNCATE, ineventset);
-					if (memcmp(&ineventset, &outeventset, sizeof(dm_eventset_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&ineventset, &outeventset,
+					     sizeof(dm_eventset_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n", szFuncName, 0, ineventset, outeventset);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but eventsets not same (%llx vs %llx)\n",
+							    szFuncName, 0,
+							    ineventset,
+							    outeventset);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, DM_EVENT_DESTROY+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    DM_EVENT_DESTROY + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			DMEV_ZERO(ineventset);
-			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, &ineventset, DM_EVENT_MAX);
+			rc = dm_set_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      &ineventset, DM_EVENT_MAX);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2831,19 +3766,27 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, DM_GLOBAL_HANP,
+					      DM_GLOBAL_HLEN, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2866,9 +3809,13 @@
 		sprintf(command, "cp %s %s", DummyFile, DummyFile2);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_session(DM_NO_SESSION, szSessionInfo,
+					   &newsid)) == -1) {
 			remove(DummyFile2);
-		} else if ((rc = dm_path_to_handle(DummyFile2, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile2, &hanp, &hlen)) ==
+			   -1) {
 			dm_destroy_session(newsid);
 			remove(DummyFile2);
 		} else if ((rc = remove(DummyFile2)) == -1) {
@@ -2876,18 +3823,26 @@
 			dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated file handle)\n", szFuncName);
-			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN, DM_EVENT_MAX, &outeventset, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(invalidated file handle)\n",
+				    szFuncName);
+			rc = dm_get_eventlist(newsid, hanp, hlen, DM_NO_TOKEN,
+					      DM_EVENT_MAX, &outeventset,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2899,21 +3854,29 @@
 	DMEV_SET(DM_EVENT_UNMOUNT, events);
 	rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_fshandle failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_fshandle failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
 
-	rc = dm_set_disp(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_disp(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			 DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
 
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -2924,14 +3887,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -2956,16 +3922,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -2974,26 +3945,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -3001,23 +3985,29 @@
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -3048,17 +4038,23 @@
 				break;
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/dm_test.c b/testcases/kernel/fs/dmapi/dm_test.c
index 0882828..dc0dbda 100644
--- a/testcases/kernel/fs/dmapi/dm_test.c
+++ b/testcases/kernel/fs/dmapi/dm_test.c
@@ -56,9 +56,10 @@
 int dm_FileNewlineNeeded;
 int dm_TerminalNewlineNeeded;
 
-void dm_ParseCommandLineOptions(int argc, char **argv) {
+void dm_ParseCommandLineOptions(int argc, char **argv)
+{
 
-   	int i;
+	int i;
 	char *p;
 
 	if ((p = strrchr(argv[0], '/')) != NULL)
@@ -67,48 +68,61 @@
 	for (i = 1; i < argc; i++) {
 		if (argv[i][0] == '-') {
 			if (strcmp(&argv[i][1], "runfrom") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-')
+				if (i < argc - 1 && argv[i + 1][0] != '-')
 					dm_StartingVariation = atoi(argv[++i]);
 				else
-					dm_Error("invalid/missing runfrom argument\n");
+					dm_Error
+					    ("invalid/missing runfrom argument\n");
 			} else if (strcmp(&argv[i][1], "runto") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-')
+				if (i < argc - 1 && argv[i + 1][0] != '-')
 					dm_StoppingVariation = atoi(argv[++i]);
 				else
-					dm_Error("invalid/missing runto argument\n");
+					dm_Error
+					    ("invalid/missing runto argument\n");
 			} else if (strcmp(&argv[i][1], "runonly") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-') {
+				if (i < argc - 1 && argv[i + 1][0] != '-') {
 					dm_StartingVariation = atoi(argv[++i]);
-					dm_StoppingVariation = dm_StartingVariation;
+					dm_StoppingVariation =
+					    dm_StartingVariation;
 				} else
-					dm_Error("invalid/missing runonly argument\n");
+					dm_Error
+					    ("invalid/missing runonly argument\n");
 			} else if (strcmp(&argv[i][1], "loglevel") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-')
+				if (i < argc - 1 && argv[i + 1][0] != '-')
 					dm_FileLoggingLevel = atoi(argv[++i]);
 				else
-					dm_Error("invalid/missing loglevel argument\n");
+					dm_Error
+					    ("invalid/missing loglevel argument\n");
 			} else if (strcmp(&argv[i][1], "termlevel") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-')
-					dm_TerminalLoggingLevel = atoi(argv[++i]);
+				if (i < argc - 1 && argv[i + 1][0] != '-')
+					dm_TerminalLoggingLevel =
+					    atoi(argv[++i]);
 				else
-					dm_Error("invalid/missing termlevel argument\n");
+					dm_Error
+					    ("invalid/missing termlevel argument\n");
 			} else if (strcmp(&argv[i][1], "logname") == 0) {
-				if (i < argc - 1 && argv[i+1][0] != '-')
+				if (i < argc - 1 && argv[i + 1][0] != '-')
 					dm_LogFileName = argv[++i];
 				else
-					dm_Error("invalid/missing filename argument\n");
-			} else if (strcmp(&argv[i][1], "?") == 0 ||
-				   strcmp(&argv[i][1], "help") == 0 ||
-				   strcmp(&argv[i][1], "-help") == 0) {
+					dm_Error
+					    ("invalid/missing filename argument\n");
+			} else if (strcmp(&argv[i][1], "?") == 0
+				   || strcmp(&argv[i][1], "help") == 0
+				   || strcmp(&argv[i][1], "-help") == 0) {
 				printf("%s usage:\n", argv[0]);
-				printf("\t-runfrom n: set starting variation to n\n");
-				printf("\t-runto n: set stopping variation to n\n");
+				printf
+				    ("\t-runfrom n: set starting variation to n\n");
+				printf
+				    ("\t-runto n: set stopping variation to n\n");
 				printf("\t-runonly n: run only variation n\n");
-				printf("\t-loglevel n: set file logging level to n\n");
-				printf("\t-termlevel n: set terminal logging level to n\n");
-				printf("\t-logname s: set file log name to s\n");
+				printf
+				    ("\t-loglevel n: set file logging level to n\n");
+				printf
+				    ("\t-termlevel n: set terminal logging level to n\n");
+				printf
+				    ("\t-logname s: set file log name to s\n");
 				exit(0);
-			} else if (i < argc - 1 && argv[i+1][0] != '-')
+			} else if (i < argc - 1 && argv[i + 1][0] != '-')
 				i++;
 		}
 	}
@@ -118,27 +132,30 @@
 
 }
 
-char *dm_GetCommandLineOption(char *option) {
+char *dm_GetCommandLineOption(char *option)
+{
 
-   	int i;
+	int i;
 
 	if (!dm_argc)
-		dm_Error("Cannot get command line option without calling DMOPT_PARSE");
+		dm_Error
+		    ("Cannot get command line option without calling DMOPT_PARSE");
 
 	for (i = 1; i < dm_argc; i++)
 		if (dm_argv[i][0] == '-' &&
 		    strcmp(&dm_argv[i][1], option) == 0 &&
-		    i < dm_argc - 1 && dm_argv[i+1][0] != '-')
-			return dm_argv[i+1];
+		    i < dm_argc - 1 && dm_argv[i + 1][0] != '-')
+			return dm_argv[i + 1];
 	return NULL;
 
 }
 
-void dm_StartLogging(void) {
+void dm_StartLogging(void)
+{
 
 	struct utsname buf;
 	char version[256];
-   	struct timeval tv;
+	struct timeval tv;
 	struct tm *pDT = NULL;
 	struct tm sDT;
 	int i;
@@ -146,8 +163,9 @@
 	if (dm_fpLogFile)
 		dm_Error("Cannot start logging when log file already open");
 
-	dm_fdLogFile = open(dm_LogFileName, O_CREAT|O_APPEND|O_SYNC|O_WRONLY,
-			S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+	dm_fdLogFile =
+	    open(dm_LogFileName, O_CREAT | O_APPEND | O_SYNC | O_WRONLY,
+		 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
 
 	if (dm_fdLogFile == -1)
 		dm_Error("Unable to open log file %s", dm_LogFileName);
@@ -171,9 +189,14 @@
 		for (i = 1; i < dm_argc; i++)
 			fprintf(dm_fpLogFile, "%s ", dm_argv[i]);
 		if (pDT)
-			fprintf(dm_fpLogFile, "\n%s starting at %02u:%02u:%02u on %02u/%02u/%04u\n", dm_TestCaseName, pDT->tm_hour, pDT->tm_min, pDT->tm_sec, pDT->tm_mon+1, pDT->tm_mday, pDT->tm_year+1900);
+			fprintf(dm_fpLogFile,
+				"\n%s starting at %02u:%02u:%02u on %02u/%02u/%04u\n",
+				dm_TestCaseName, pDT->tm_hour, pDT->tm_min,
+				pDT->tm_sec, pDT->tm_mon + 1, pDT->tm_mday,
+				pDT->tm_year + 1900);
 		else
-			fprintf(dm_fpLogFile, "\n%s starting\n", dm_TestCaseName);
+			fprintf(dm_fpLogFile, "\n%s starting\n",
+				dm_TestCaseName);
 
 	}
 
@@ -183,16 +206,21 @@
 		for (i = 1; i < dm_argc; i++)
 			printf("%s ", dm_argv[i]);
 		if (pDT)
-			printf("\n%s starting at %02u:%02u:%02u on %02u/%02u/%04u\n", dm_TestCaseName, pDT->tm_hour, pDT->tm_min, pDT->tm_sec, pDT->tm_mon+1, pDT->tm_mday, pDT->tm_year+1900);
+			printf
+			    ("\n%s starting at %02u:%02u:%02u on %02u/%02u/%04u\n",
+			     dm_TestCaseName, pDT->tm_hour, pDT->tm_min,
+			     pDT->tm_sec, pDT->tm_mon + 1, pDT->tm_mday,
+			     pDT->tm_year + 1900);
 		else
 			printf("\n%s starting\n", dm_TestCaseName);
 	}
 
 }
 
-void dm_StopLogging(void) {
+void dm_StopLogging(void)
+{
 
-   	struct timeval tv;
+	struct timeval tv;
 	struct tm *pDT = NULL;
 	struct tm sDT;
 	int ranVariations = 0;
@@ -204,27 +232,42 @@
 	ranVariations = dm_PassedVariations + dm_FailedVariations;
 
 	if (dm_PassedVariations)
-		percentSuccess = (dm_PassedVariations * 100)/ranVariations;
+		percentSuccess = (dm_PassedVariations * 100) / ranVariations;
 
 	if (gettimeofday(&tv, NULL) != -1)
 		pDT = (struct tm *)localtime_r(&tv.tv_sec, &sDT);
 
 	if (dm_FileLoggingLevel) {
 		if (pDT)
-			fprintf(dm_fpLogFile, "%s stopping at %02u:%02u:%02u on %02u/%02u/%04u\n", dm_TestCaseName, pDT->tm_hour, pDT->tm_min, pDT->tm_sec, pDT->tm_mon+1, pDT->tm_mday, pDT->tm_year+1900);
+			fprintf(dm_fpLogFile,
+				"%s stopping at %02u:%02u:%02u on %02u/%02u/%04u\n",
+				dm_TestCaseName, pDT->tm_hour, pDT->tm_min,
+				pDT->tm_sec, pDT->tm_mon + 1, pDT->tm_mday,
+				pDT->tm_year + 1900);
 		else
 			fprintf(dm_fpLogFile, "%s stopping\n", dm_TestCaseName);
 
-		fprintf(dm_fpLogFile, "%s status: %u executed, %u passed, %u failed, %u skipped (%u%%)\n", dm_TestCaseName, ranVariations, dm_PassedVariations, dm_FailedVariations, dm_SkippedVariations, percentSuccess);
+		fprintf(dm_fpLogFile,
+			"%s status: %u executed, %u passed, %u failed, %u skipped (%u%%)\n",
+			dm_TestCaseName, ranVariations, dm_PassedVariations,
+			dm_FailedVariations, dm_SkippedVariations,
+			percentSuccess);
 	}
 
 	if (dm_TerminalLoggingLevel) {
 		if (pDT)
-			printf("%s stopping at %02u:%02u:%02u on %02u/%02u/%04u\n", dm_TestCaseName, pDT->tm_hour, pDT->tm_min, pDT->tm_sec, pDT->tm_mon+1, pDT->tm_mday, pDT->tm_year+1900);
+			printf
+			    ("%s stopping at %02u:%02u:%02u on %02u/%02u/%04u\n",
+			     dm_TestCaseName, pDT->tm_hour, pDT->tm_min,
+			     pDT->tm_sec, pDT->tm_mon + 1, pDT->tm_mday,
+			     pDT->tm_year + 1900);
 		else
 			printf("%s stopping\n", dm_TestCaseName);
 
-		printf("%s status: %u executed, %u passed, %u failed, %u skipped (%u%%)\n", dm_TestCaseName, ranVariations, dm_PassedVariations, dm_FailedVariations, dm_SkippedVariations, percentSuccess);
+		printf
+		    ("%s status: %u executed, %u passed, %u failed, %u skipped (%u%%)\n",
+		     dm_TestCaseName, ranVariations, dm_PassedVariations,
+		     dm_FailedVariations, dm_SkippedVariations, percentSuccess);
 	}
 
 	fclose(dm_fpLogFile);
@@ -232,31 +275,34 @@
 
 }
 
-void dm_Error(char *format, ...) {
-   va_list args;
-   char    fmtmsg[256];
+void dm_Error(char *format, ...)
+{
+	va_list args;
+	char fmtmsg[256];
 
-   /*
-    * Format error message including message inserts
-    */
-   va_start(args, format);
-   vsprintf(fmtmsg, format, args);
-   va_end(args);
+	/*
+	 * Format error message including message inserts
+	 */
+	va_start(args, format);
+	vsprintf(fmtmsg, format, args);
+	va_end(args);
 
-   /*
-    * Display error message if not detached or Presentation Manager process
-    */
-   printf("\n%s fatal error: %s\n", TEST_NAME, fmtmsg);
+	/*
+	 * Display error message if not detached or Presentation Manager process
+	 */
+	printf("\n%s fatal error: %s\n", TEST_NAME, fmtmsg);
 
 }
 
-void dm_LogPrintf(u_int level, char *format, ...) {
+void dm_LogPrintf(u_int level, char *format, ...)
+{
 
 	va_list args;
 
 	va_start(args, format);
 	if (level <= dm_FileLoggingLevel) {
-		fprintf(dm_fpLogFile, "[%s %d %d] ", dm_TestCaseName, getpid(), level);
+		fprintf(dm_fpLogFile, "[%s %d %d] ", dm_TestCaseName, getpid(),
+			level);
 		vfprintf(dm_fpLogFile, format, args);
 		dm_FileNewlineNeeded = 1;
 	}
@@ -271,7 +317,8 @@
 
 }
 
-int dm_ExecuteVariation(int var) {
+int dm_ExecuteVariation(int var)
+{
 
 	if (dm_CurrentVariation)
 		dm_Error("Cannot execute variation while variation active\n");
@@ -291,12 +338,14 @@
 
 }
 
-void dm_PassVariation(void) {
+void dm_PassVariation(void)
+{
 
 	if (!dm_CurrentVariation)
 		dm_Error("Cannot pass variation while variation not active\n");
 
-	dm_LogPrintf(DMLVL_DEBUG, "Variation %d passed\n\n", dm_CurrentVariation);
+	dm_LogPrintf(DMLVL_DEBUG, "Variation %d passed\n\n",
+		     dm_CurrentVariation);
 	dm_FileNewlineNeeded = dm_TerminalNewlineNeeded = 0;
 
 	dm_PassedVariations++;
@@ -305,12 +354,14 @@
 
 }
 
-void dm_FailVariation(void) {
+void dm_FailVariation(void)
+{
 
 	if (!dm_CurrentVariation)
 		dm_Error("Cannot fail variation while variation not active\n");
 
-	dm_LogPrintf(DMLVL_DEBUG, "Variation %d failed\n\n", dm_CurrentVariation);
+	dm_LogPrintf(DMLVL_DEBUG, "Variation %d failed\n\n",
+		     dm_CurrentVariation);
 	dm_FileNewlineNeeded = dm_TerminalNewlineNeeded = 0;
 
 	dm_FailedVariations++;
@@ -319,12 +370,14 @@
 
 }
 
-void dm_SkipVariation(void) {
+void dm_SkipVariation(void)
+{
 
 	if (!dm_CurrentVariation)
 		dm_Error("Cannot skip variation while variation not active\n");
 
-	dm_LogPrintf(DMLVL_DEBUG, "Variation %d skipped\n\n", dm_CurrentVariation);
+	dm_LogPrintf(DMLVL_DEBUG, "Variation %d skipped\n\n",
+		     dm_CurrentVariation);
 	dm_FileNewlineNeeded = dm_TerminalNewlineNeeded = 0;
 
 	dm_SkippedVariations++;
@@ -333,82 +386,113 @@
 
 }
 
-void dm_EndVariation_SuccessExpected(char *funcname, int expectedRC, int actualRC)
+void dm_EndVariation_SuccessExpected(char *funcname, int expectedRC,
+				     int actualRC)
 {
 
 	if (actualRC == expectedRC) {
-	  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", funcname, expectedRC);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n",
+			    funcname, expectedRC);
 		DMVAR_PASS();
 	} else {
-		DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", funcname, actualRC, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "%s failed with unexpected rc = %d (errno = %d)\n",
+			    funcname, actualRC, errno);
 		DMVAR_FAIL();
 	}
 
 }
 
-void dm_EndVariation_FailureExpected(char *funcname, int expectedRC, int actualRC, int expectedErrno)
+void dm_EndVariation_FailureExpected(char *funcname, int expectedRC,
+				     int actualRC, int expectedErrno)
 {
 
 	if (actualRC == expectedRC) {
 		if (errno == expectedErrno) {
-			DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", funcname, expectedRC, expectedErrno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s passed with expected rc = %d and expected errno = %d\n",
+				    funcname, expectedRC, expectedErrno);
 			DMVAR_PASS();
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d (expected %d)\n", funcname, expectedRC, errno, expectedErrno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with expected rc = %d but unexpected errno = %d (expected %d)\n",
+				    funcname, expectedRC, errno, expectedErrno);
 			DMVAR_FAIL();
 		}
 	} else {
-	  	DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", funcname, actualRC);
+		DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n",
+			    funcname, actualRC);
 		DMVAR_FAIL();
 	}
 
 }
 
-int dm_CheckVariation_SuccessExpected(int expectedRC, int actualRC, dm_eventtype_t expectedEvent, dm_eventtype_t actualEvent)
+int dm_CheckVariation_SuccessExpected(int expectedRC, int actualRC,
+				      dm_eventtype_t expectedEvent,
+				      dm_eventtype_t actualEvent)
 {
 
 	if (expectedEvent == actualEvent) {
 		if (actualRC == expectedRC) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Passed, received expected event %d\n", expectedEvent);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Passed, received expected event %d\n",
+				    expectedEvent);
 			return DMSTAT_PASS;
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "Failed, received expected event %d but unexpected rc = %d (expected %d)\n", expectedEvent, actualRC, expectedRC);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Failed, received expected event %d but unexpected rc = %d (expected %d)\n",
+				    expectedEvent, actualRC, expectedRC);
 			return DMSTAT_FAIL;
 		}
 	} else {
-		DMLOG_PRINT(DMLVL_ERR, "Failed, received unexpected event %d (expected %d)\n", actualEvent, expectedEvent);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "Failed, received unexpected event %d (expected %d)\n",
+			    actualEvent, expectedEvent);
 		return DMSTAT_FAIL;
 	}
 
 }
 
-int dm_CheckVariation_FailureExpected(int expectedRC, int actualRC, int expectedErrno, dm_eventtype_t expectedEvent, dm_eventtype_t actualEvent)
+int dm_CheckVariation_FailureExpected(int expectedRC, int actualRC,
+				      int expectedErrno,
+				      dm_eventtype_t expectedEvent,
+				      dm_eventtype_t actualEvent)
 {
 
 	if (expectedEvent == actualEvent) {
 		if (actualRC == expectedRC) {
 			if (errno == expectedErrno) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Passed, received expected event %d\n", expectedEvent);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Passed, received expected event %d\n",
+					    expectedEvent);
 				return DMSTAT_PASS;
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Failed, received expected event %d but unexpected errno = %d (expected %d)\n", expectedEvent, errno, expectedErrno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Failed, received expected event %d but unexpected errno = %d (expected %d)\n",
+					    expectedEvent, errno,
+					    expectedErrno);
 				return DMSTAT_FAIL;
 			}
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "Failed, received expected event %d but unexpected rc = %d (expected %d)\n", expectedEvent, actualRC, expectedRC);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Failed, received expected event %d but unexpected rc = %d (expected %d)\n",
+				    expectedEvent, actualRC, expectedRC);
 			return DMSTAT_FAIL;
 		}
 	} else {
-		DMLOG_PRINT(DMLVL_ERR, "Failed, received unexpected event %d (expected %d)\n", actualEvent, expectedEvent);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "Failed, received unexpected event %d (expected %d)\n",
+			    actualEvent, expectedEvent);
 		return DMSTAT_FAIL;
 	}
 
 }
 
-void dm_LogHandle(char *hdl, int len) {
+void dm_LogHandle(char *hdl, int len)
+{
 
-	int	i;
-	char	outbuf[256], *pch;
+	int i;
+	char outbuf[256], *pch;
 
 	memset(outbuf, 0, sizeof(outbuf));
 
@@ -422,12 +506,16 @@
 /* This static array is for the persistent managed region test */
 dm_region_t dm_PMR_regbuf[PMR_NUM_REGIONS] = {
 #ifdef MULTIPLE_REGIONS
-	{    0, 1000, DM_REGION_WRITE },
-	{ 2000, 1000, DM_REGION_TRUNCATE },
-	{ 3005,  995, DM_REGION_READ },
-	{ 5432, 2345, DM_REGION_NOEVENT },
+	{0, 1000, DM_REGION_WRITE}
+	,
+	{2000, 1000, DM_REGION_TRUNCATE}
+	,
+	{3005, 995, DM_REGION_READ}
+	,
+	{5432, 2345, DM_REGION_NOEVENT}
+	,
 #endif
-	{ 8000,    0, DM_REGION_READ|DM_REGION_WRITE|DM_REGION_TRUNCATE }
+	{8000, 0, DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE}
 };
 
 /* Include implementation-dependent functions and variables */
diff --git a/testcases/kernel/fs/dmapi/event.c b/testcases/kernel/fs/dmapi/event.c
index aa816ca..adc4681 100644
--- a/testcases/kernel/fs/dmapi/event.c
+++ b/testcases/kernel/fs/dmapi/event.c
@@ -58,14 +58,17 @@
 void LogEventMsgs(void *bufp)
 {
 	int i = 0;
-	dm_eventmsg_t *em = (dm_eventmsg_t *)bufp;
+	dm_eventmsg_t *em = (dm_eventmsg_t *) bufp;
 
 	while (em != NULL) {
 		DMLOG_PRINT(DMLVL_DEBUG, "  eventmsg %d:\n", i++);
 		DMLOG_PRINT(DMLVL_DEBUG, "    ev_type: %d\n", em->ev_type);
 		DMLOG_PRINT(DMLVL_DEBUG, "    ev_token: %d\n", em->ev_token);
-		DMLOG_PRINT(DMLVL_DEBUG, "    ev_sequence: %d\n", em->ev_sequence);
-		DMLOG_PRINT(DMLVL_DEBUG, "    ev_data: length %d, value %s\n", DM_GET_LEN(em, ev_data), DM_GET_VALUE(em, ev_data, dm_eventtype_t));
+		DMLOG_PRINT(DMLVL_DEBUG, "    ev_sequence: %d\n",
+			    em->ev_sequence);
+		DMLOG_PRINT(DMLVL_DEBUG, "    ev_data: length %d, value %s\n",
+			    DM_GET_LEN(em, ev_data), DM_GET_VALUE(em, ev_data,
+								  dm_eventtype_t));
 
 		em = DM_STEP_TO_NEXT(em, dm_eventmsg_t *);
 	}
@@ -73,10 +76,11 @@
 
 dm_eventmsg_t *GetSyncEventMsg(void *bufp)
 {
-	dm_eventmsg_t *em = (dm_eventmsg_t *)bufp;
+	dm_eventmsg_t *em = (dm_eventmsg_t *) bufp;
 
 	while (em != NULL) {
-		if ((em->ev_type == DM_EVENT_USER) && (em->ev_token != DM_INVALID_TOKEN)) {
+		if ((em->ev_type == DM_EVENT_USER)
+		    && (em->ev_token != DM_INVALID_TOKEN)) {
 			return em;
 		}
 		em = DM_STEP_TO_NEXT(em, dm_eventmsg_t *);
@@ -87,7 +91,7 @@
 
 int GetNumEventMsg(void *bufp)
 {
-	dm_eventmsg_t *em = (dm_eventmsg_t *)bufp;
+	dm_eventmsg_t *em = (dm_eventmsg_t *) bufp;
 	int i = 0;
 
 	while (em != NULL) {
@@ -101,7 +105,7 @@
 {
 
 	char *varstr;
-	int   rc;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -113,14 +117,19 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI move event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI move event tests\n");
 
 	szFuncName = "dm_get_events";
 
@@ -151,9 +160,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+2));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 2));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -171,9 +183,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+3));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 3));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -191,9 +206,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+4));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 4));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -209,9 +227,12 @@
 	if (DMVAR_EXEC(GET_EVENTS_BASE + 5)) {
 
 		/* Variation set up */
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+5));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 5));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			pthread_join(tid, NULL);
@@ -229,9 +250,12 @@
 		expectedNumMsg = 1;
 		eventsFlags = 0;
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+6));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 6));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -251,9 +275,12 @@
 		expectedNumMsg = 1;
 		eventsFlags = DM_EV_WAIT;
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+7));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(GET_EVENTS_BASE + 7));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -275,10 +302,13 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_send_msg(sid, DM_MSGTYPE_ASYNC, MSG_DATALEN, buf);
 		if (rc != -1) {
-			rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+8));
+			rc = pthread_create(&tid, NULL, Thread,
+					    (void *)(GET_EVENTS_BASE + 8));
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -300,10 +330,13 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_send_msg(sid, DM_MSGTYPE_ASYNC, MSG_DATALEN, buf);
 		if (rc != -1) {
-			rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+9));
+			rc = pthread_create(&tid, NULL, Thread,
+					    (void *)(GET_EVENTS_BASE + 9));
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -323,20 +356,23 @@
 		/* Variation set up */
 		expectedNumMsg = MAX_EVENT;
 		eventsFlags = 0;
-		for (i = 0, rc = 0; i < MAX_EVENT+1 && rc == 0; i++) {
+		for (i = 0, rc = 0; i < MAX_EVENT + 1 && rc == 0; i++) {
 			j = sprintf(buf, "Multi event message %d", i);
-			rc = dm_send_msg(sid, DM_MSGTYPE_ASYNC, j+1, buf);
+			rc = dm_send_msg(sid, DM_MSGTYPE_ASYNC, j + 1, buf);
 		}
 		if (rc != -1) {
-			rc = pthread_create(&tid, NULL, Thread, (void *)(GET_EVENTS_BASE+10));
+			rc = pthread_create(&tid, NULL, Thread,
+					    (void *)(GET_EVENTS_BASE + 10));
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
 			j = sprintf(buf, "Multi event message %d", i);
-			dm_send_msg(sid, DM_MSGTYPE_SYNC, j+1, buf);
+			dm_send_msg(sid, DM_MSGTYPE_SYNC, j + 1, buf);
 			pthread_join(tid, NULL);
 		}
 	}
@@ -355,18 +391,26 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_respond_event(INVALID_ADDR, token, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_respond_event(INVALID_ADDR, token,
+					      DM_RESP_CONTINUE, 0, sizeof(buf),
+					      buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -383,18 +427,26 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_respond_event(DM_NO_SESSION, token, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_respond_event(DM_NO_SESSION, token,
+					      DM_RESP_CONTINUE, 0, sizeof(buf),
+					      buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -411,7 +463,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-		rc = dm_respond_event(sid, INVALID_ADDR, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+		rc = dm_respond_event(sid, INVALID_ADDR, DM_RESP_CONTINUE, 0,
+				      sizeof(buf), buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -429,7 +482,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_TOKEN token)\n", szFuncName);
-		rc = dm_respond_event(sid, DM_NO_TOKEN, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+		rc = dm_respond_event(sid, DM_NO_TOKEN, DM_RESP_CONTINUE, 0,
+				      sizeof(buf), buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -446,8 +500,10 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_INVALID_TOKEN token)\n", szFuncName);
-		rc = dm_respond_event(sid, DM_INVALID_TOKEN, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_INVALID_TOKEN token)\n",
+			    szFuncName);
+		rc = dm_respond_event(sid, DM_INVALID_TOKEN, DM_RESP_CONTINUE,
+				      0, sizeof(buf), buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -465,18 +521,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid response)\n", szFuncName);
-			rc = dm_respond_event(sid, token, INVALID_ADDR, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid response)\n",
+				    szFuncName);
+			rc = dm_respond_event(sid, token, INVALID_ADDR, 0,
+					      sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -496,18 +559,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid response)\n", szFuncName);
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, INVALID_ADDR, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid response)\n",
+				    szFuncName);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      INVALID_ADDR, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -524,15 +594,20 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc != -1) {
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      sizeof(buf), buf);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated token)\n", szFuncName);
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated token)\n",
+				    szFuncName);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      sizeof(buf), buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ESRCH);
 
 			/* Variation clean up */
@@ -548,9 +623,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+9));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 9));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -568,23 +646,35 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+10));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 10));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread continues variation */
-			rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
+			rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN,
+					 buf);
 			if (rcRespond == 0) {
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected dm_send_msg rc = %d\n", szFuncName, rcRespond, rc);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and expected dm_send_msg rc = %d\n",
+						    szFuncName, rcRespond, rc);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected dm_send_msg rc = %d and errno %d\n", szFuncName, rcRespond, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected dm_send_msg rc = %d and errno %d\n",
+						    szFuncName, rcRespond, rc,
+						    errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rcRespond, errnoRespond);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rcRespond,
+					    errnoRespond);
 				DMVAR_FAIL();
 			}
 			pthread_join(tid, NULL);
@@ -600,9 +690,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+11));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 11));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -620,9 +713,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+12));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 12));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -640,28 +736,45 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+13));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 13));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread continues variation */
-			rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
+			rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN,
+					 buf);
 			if (rcRespond == 0) {
 				if (rc == -1) {
 					if (errno == ABORT_ERRNO) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and dm_send_msg rc = %d\n", szFuncName, rcRespond, rc);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and dm_send_msg rc = %d\n",
+							    szFuncName,
+							    rcRespond, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and dm_send_msg rc = %d but unexpected errno (%d vs %d)\n", szFuncName, rcRespond, rc, errno, ABORT_ERRNO);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and dm_send_msg rc = %d but unexpected errno (%d vs %d)\n",
+							    szFuncName,
+							    rcRespond, rc,
+							    errno, ABORT_ERRNO);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected dm_send_msg rc (%d vs %d)\n", szFuncName, rcRespond, rc, -1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected dm_send_msg rc (%d vs %d)\n",
+						    szFuncName, rcRespond, rc,
+						    -1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rcRespond, errnoRespond);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rcRespond,
+					    errnoRespond);
 				DMVAR_FAIL();
 			}
 			pthread_join(tid, NULL);
@@ -677,9 +790,12 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		rc = pthread_create(&tid, NULL, Thread, (void *)(RESPOND_EVENT_BASE+14));
+		rc = pthread_create(&tid, NULL, Thread,
+				    (void *)(RESPOND_EVENT_BASE + 14));
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Message thread finishes off variation */
@@ -701,25 +817,37 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid srcsid)\n", szFuncName);
-			rc = dm_move_event(INVALID_ADDR, token, targsid, &rtoken);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid srcsid)\n",
+				    szFuncName);
+			rc = dm_move_event(INVALID_ADDR, token, targsid,
+					   &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -735,25 +863,37 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION srcsid)\n", szFuncName);
-			rc = dm_move_event(DM_NO_SESSION, token, targsid, &rtoken);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION srcsid)\n",
+				    szFuncName);
+			rc = dm_move_event(DM_NO_SESSION, token, targsid,
+					   &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -769,25 +909,36 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
 			rc = dm_move_event(sid, INVALID_ADDR, targsid, &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -803,25 +954,36 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targetsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targetsid)\n",
+				    szFuncName);
 			rc = dm_move_event(sid, token, INVALID_ADDR, &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -837,25 +999,37 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION targetsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_NO_SESSION targetsid)\n",
+				    szFuncName);
 			rc = dm_move_event(sid, token, DM_NO_SESSION, &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -874,25 +1048,37 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rtokenp)\n", szFuncName);
-			rc = dm_move_event(sid, token, targsid, (dm_token_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rtokenp)\n",
+				    szFuncName);
+			rc = dm_move_event(sid, token, targsid,
+					   (dm_token_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -911,25 +1097,36 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(token not in session)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(token not in session)\n",
+				    szFuncName);
 			rc = dm_move_event(targsid, token, sid, &rtoken);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -946,38 +1143,58 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(srcsid == targetsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(srcsid == targetsid)\n",
+				    szFuncName);
 			rc = dm_move_event(sid, token, sid, &rtoken);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rtoken = %d\n", rtoken);
-				rc = dm_find_eventmsg(sid, rtoken, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+				DMLOG_PRINT(DMLVL_DEBUG, "rtoken = %d\n",
+					    rtoken);
+				rc = dm_find_eventmsg(sid, rtoken,
+						      sizeof(dmMsgBuf),
+						      dmMsgBuf, &rlen);
 				if (rc == 0 && rlen > 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-			  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token %d NOT in src/target session %d\n", szFuncName, 0, token, sid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but token %d NOT in src/target session %d\n",
+						    szFuncName, 0, token, sid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, rtoken, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, rtoken, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -997,44 +1214,69 @@
 
 		/* Variation set up */
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &targsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &targsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, buf,
+					     &token)) == -1) {
 			dm_destroy_session(targsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(srcsid != targetsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(srcsid != targetsid)\n",
+				    szFuncName);
 			rc = dm_move_event(sid, token, targsid, &rtoken);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rtoken = %d\n", rtoken);
-				rc = dm_find_eventmsg(sid, token, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+				DMLOG_PRINT(DMLVL_DEBUG, "rtoken = %d\n",
+					    rtoken);
+				rc = dm_find_eventmsg(sid, token,
+						      sizeof(dmMsgBuf),
+						      dmMsgBuf, &rlen);
 				if (rc == -1 && errno == EINVAL) {
-					rc = dm_find_eventmsg(targsid, rtoken, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+					rc = dm_find_eventmsg(targsid, rtoken,
+							      sizeof(dmMsgBuf),
+							      dmMsgBuf, &rlen);
 					if (rc == 0 && rlen > 0) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token %d NOT in target session %d\n", szFuncName, 0, token, targsid);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but token %d NOT in target session %d\n",
+							    szFuncName, 0,
+							    token, targsid);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token %d still in source session %d\n", szFuncName, 0, token, sid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but token %d still in source session %d\n",
+						    szFuncName, 0, token, sid);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(targsid, rtoken, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(targsid, rtoken, DM_RESP_CONTINUE,
+					      0, 0, NULL);
 			rc |= dm_destroy_session(targsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1054,18 +1296,24 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
 			rc = dm_pending(INVALID_ADDR, token, &delay);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1083,18 +1331,24 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
 			rc = dm_pending(DM_NO_SESSION, token, &delay);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1143,7 +1397,8 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_INVALID_TOKEN token)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_INVALID_TOKEN token)\n",
+			    szFuncName);
 		rc = dm_pending(sid, DM_INVALID_TOKEN, &delay);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -1162,18 +1417,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_pending(sid, token, (dm_timestruct_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_pending(sid, token,
+					(dm_timestruct_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1191,14 +1453,18 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc != -1) {
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, sizeof(buf), buf);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      sizeof(buf), buf);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated token)\n",
+				    szFuncName);
 			rc = dm_pending(sid, token, &delay);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ESRCH);
 
@@ -1219,7 +1485,9 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1228,16 +1496,21 @@
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -1256,261 +1529,377 @@
 	EVENT_DELIVERY_DELAY;
 
 	switch ((long)parm) {
-		case GET_EVENTS_BASE + 2:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, 0, dmMsgBuf, &rlen);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
+	case GET_EVENTS_BASE + 2:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, 0, dmMsgBuf, &rlen);
+		DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
-			/* Variation clean up */
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+		/* Variation clean up */
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0) {
+			token = ((dm_eventmsg_t *) dmMsgBuf)->ev_token;
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
+		}
+		if (rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno	= %d)\n",
+				    errno);
+		}
+		break;
+
+	case GET_EVENTS_BASE + 3:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   (void *)INVALID_ADDR, &rlen);
+		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
+
+		/* Variation clean up */
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0) {
+			token = ((dm_eventmsg_t *) dmMsgBuf)->ev_token;
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
+		}
+		if (rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno	= %d)\n",
+				    errno);
+		}
+		break;
+
+	case GET_EVENTS_BASE + 4:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, (size_t *) INVALID_ADDR);
+		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
+
+		/* Variation clean up */
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0) {
+			token = ((dm_eventmsg_t *) dmMsgBuf)->ev_token;
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
+		}
+		if (rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno	= %d)\n",
+				    errno);
+		}
+		break;
+
+	case GET_EVENTS_BASE + 5:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(!DM_EV_WAIT with no messages)\n",
+			    szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EAGAIN);
+
+		/* Variation clean up */
+
+		break;
+
+	case GET_EVENTS_BASE + 6:
+	case GET_EVENTS_BASE + 7:
+	case GET_EVENTS_BASE + 8:
+	case GET_EVENTS_BASE + 9:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(%s with %d message(s))\n",
+			    szFuncName,
+			    (eventsFlags & DM_EV_WAIT) ? "DM_EV_WAIT" :
+			    "!DM_EV_WAIT", expectedNumMsg);
+		do {
+			rlen = 0;
+			rc = dm_get_events(sid, MAX_EVENT, eventsFlags,
+					   sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+		} while ((eventsFlags & DM_EV_WAIT) && (rc == -1)
+			 && (errno == EINTR) && (rlen == 0));
+		if (rc == 0) {
+			LogEventMsgs(dmMsgBuf);
+			numMsg = GetNumEventMsg(dmMsgBuf);
+			dmMsg = GetSyncEventMsg(dmMsgBuf);
+			DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+
+			if (numMsg == expectedNumMsg) {
+				if (dmMsg != NULL) {
+					if (dmMsg->ev_type == DM_EVENT_USER) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
+						DMVAR_PASS();
+					} else {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected event (%d vs %d)\n",
+							    szFuncName, 0,
+							    dmMsg->ev_type,
+							    DM_EVENT_USER);
+						DMVAR_FAIL();
+					}
+				} else {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but no synchronous event\n",
+						    szFuncName, 0);
+					DMVAR_FAIL();
+				}
+			} else {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with expected rc = %d but unexpected number of events (%d vs %d)\n",
+					    szFuncName, 0, numMsg,
+					    expectedNumMsg);
+				DMVAR_FAIL();
+			}
+		} else {
+			dmMsg = NULL;
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
+			DMVAR_FAIL();
+		}
+
+		/* Variation clean up */
+		rc = dm_respond_event(sid,
+				      dmMsg ? dmMsg->
+				      ev_token : DM_INVALID_TOKEN,
+				      DM_RESP_CONTINUE, 0, 0, NULL);
+		if (rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno	= %d)\n",
+				    errno);
+		}
+
+		break;
+
+	case GET_EVENTS_BASE + 10:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(%s with %d messages)\n",
+			    szFuncName,
+			    (eventsFlags & DM_EV_WAIT) ? "DM_EV_WAIT" :
+			    "!DM_EV_WAIT", expectedNumMsg);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0) {
+			DMLOG_PRINT(DMLVL_DEBUG, "1st call:\n");
+			LogEventMsgs(dmMsgBuf);
+			numMsg = GetNumEventMsg(dmMsgBuf);
+			DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+					   dmMsgBuf, &rlen);
 			if (rc == 0) {
-				token = ((dm_eventmsg_t *)dmMsgBuf)->ev_token;
-				rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
-			}
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-			}
-			break;
-
-		case GET_EVENTS_BASE + 3:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), (void *)INVALID_ADDR, &rlen);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
-
-			/* Variation clean up */
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0) {
-				token = ((dm_eventmsg_t *)dmMsgBuf)->ev_token;
-				rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
-			}
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-			}
-			break;
-
-		case GET_EVENTS_BASE + 4:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, (size_t *)INVALID_ADDR);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
-
-			/* Variation clean up */
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0) {
-				token = ((dm_eventmsg_t *)dmMsgBuf)->ev_token;
-				rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
-			}
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-			}
-			break;
-
-		case GET_EVENTS_BASE + 5:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(!DM_EV_WAIT with no messages)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EAGAIN);
-
-			/* Variation clean up */
-
-			break;
-
-		case GET_EVENTS_BASE + 6:
-		case GET_EVENTS_BASE + 7:
-		case GET_EVENTS_BASE + 8:
-		case GET_EVENTS_BASE + 9:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(%s with %d message(s))\n", szFuncName, (eventsFlags & DM_EV_WAIT) ? "DM_EV_WAIT" : "!DM_EV_WAIT", expectedNumMsg);
-			do {
-				rlen = 0;
-				rc = dm_get_events(sid, MAX_EVENT, eventsFlags, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			} while ((eventsFlags & DM_EV_WAIT) && (rc == -1) && (errno == EINTR) && (rlen == 0));
-			if (rc == 0) {
-				LogEventMsgs(dmMsgBuf);
-				numMsg = GetNumEventMsg(dmMsgBuf);
-				dmMsg = GetSyncEventMsg(dmMsgBuf);
+				DMLOG_PRINT(DMLVL_DEBUG, "2nd call:\n");
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+				LogEventMsgs(dmMsgBuf);
+				dmMsg = GetSyncEventMsg(dmMsgBuf);
 
 				if (numMsg == expectedNumMsg) {
 					if (dmMsg != NULL) {
-						if (dmMsg->ev_type == DM_EVENT_USER) {
-					  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						if (dmMsg->ev_type ==
+						    DM_EVENT_USER) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s passed with expected rc = %d\n",
+								    szFuncName,
+								    0);
 							DMVAR_PASS();
 						} else {
-			  				DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected event (%d vs %d)\n", szFuncName, 0, dmMsg->ev_type, DM_EVENT_USER);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s failed with expected rc = %d but unexpected event (%d vs %d)\n",
+								    szFuncName,
+								    0,
+								    dmMsg->
+								    ev_type,
+								    DM_EVENT_USER);
 							DMVAR_FAIL();
 						}
 					} else {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but no synchronous event\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but no synchronous event\n",
+							    szFuncName, 0);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected number of events (%d vs %d)\n", szFuncName, 0, numMsg, expectedNumMsg);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected number of events (%d vs %d)\n",
+						    szFuncName, 0, numMsg,
+						    expectedNumMsg);
 					DMVAR_FAIL();
 				}
 			} else {
 				dmMsg = NULL;
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s 2nd call failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
+		} else {
+			dmMsg = NULL;
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s 1st call failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
+			DMVAR_FAIL();
+		}
+
+		/* Variation clean up */
+		rc = dm_respond_event(sid,
+				      dmMsg ? dmMsg->
+				      ev_token : DM_INVALID_TOKEN,
+				      DM_RESP_CONTINUE, 0, 0, NULL);
+		if (rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno	= %d)\n",
+				    errno);
+		}
+
+		break;
+
+	case RESPOND_EVENT_BASE + 9:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_INVALID)\n", szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_INVALID, 0, 0, NULL);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, dmMsg ? dmMsg->ev_token : DM_INVALID_TOKEN, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_CONTINUE, 0, 0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
 
-			break;
+	case RESPOND_EVENT_BASE + 10:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "%s(DM_RESP_CONTINUE with zero reterror)\n",
+			    szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rcRespond =
+			    dm_respond_event(sid, dmMsg->ev_token,
+					     DM_RESP_CONTINUE, 0, 0, NULL);
+			errnoRespond = rcRespond == -1 ? errno : 0;
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
 
-		case GET_EVENTS_BASE + 10:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(%s with %d messages)\n", szFuncName, (eventsFlags & DM_EV_WAIT) ? "DM_EV_WAIT" : "!DM_EV_WAIT", expectedNumMsg);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "1st call:\n");
-				LogEventMsgs(dmMsgBuf);
-				numMsg = GetNumEventMsg(dmMsgBuf);
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "2nd call:\n");
-					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-					LogEventMsgs(dmMsgBuf);
-					dmMsg = GetSyncEventMsg(dmMsgBuf);
-
-					if (numMsg == expectedNumMsg) {
-						if (dmMsg != NULL) {
-							if (dmMsg->ev_type == DM_EVENT_USER) {
-						  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
-								DMVAR_PASS();
-							} else {
-				  				DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected event (%d vs %d)\n", szFuncName, 0, dmMsg->ev_type, DM_EVENT_USER);
-								DMVAR_FAIL();
-							}
-						} else {
-					  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but no synchronous event\n", szFuncName, 0);
-							DMVAR_FAIL();
-						}
-					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected number of events (%d vs %d)\n", szFuncName, 0, numMsg, expectedNumMsg);
-						DMVAR_FAIL();
-					}
-				} else {
-					dmMsg = NULL;
-					DMLOG_PRINT(DMLVL_ERR, "%s 2nd call failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
-					DMVAR_FAIL();
-				}
-			} else {
-				dmMsg = NULL;
-				DMLOG_PRINT(DMLVL_ERR, "%s 1st call failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
-				DMVAR_FAIL();
-			}
+	case RESPOND_EVENT_BASE + 11:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "%s(DM_RESP_CONTINUE with non-zero reterror)\n",
+			    szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_CONTINUE, ABORT_ERRNO, 0,
+					      NULL);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, dmMsg ? dmMsg->ev_token : DM_INVALID_TOKEN, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_CONTINUE, 0, 0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
 
-			break;
+	case RESPOND_EVENT_BASE + 12:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "%s(DM_RESP_ABORT with zero reterror)\n",
+			    szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_ABORT, 0, 0, NULL);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
-		case RESPOND_EVENT_BASE + 9:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_INVALID)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_INVALID, 0, 0, NULL);
-				DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
-
-				/* Variation clean up */
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, 0, 0, NULL);
-				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-				}
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
+			/* Variation clean up */
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_CONTINUE, 0, 0, NULL);
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
-			break;
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
 
-		case RESPOND_EVENT_BASE + 10:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_CONTINUE with zero reterror)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rcRespond = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, 0, 0, NULL);
-				errnoRespond = rcRespond == -1 ? errno : 0;
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
+	case RESPOND_EVENT_BASE + 13:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "%s(DM_RESP_ABORT with non-zero reterror)\n",
+			    szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rcRespond =
+			    dm_respond_event(sid, dmMsg->ev_token,
+					     DM_RESP_ABORT, ABORT_ERRNO, 0,
+					     NULL);
+			errnoRespond = rcRespond == -1 ? errno : 0;
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
+
+	case RESPOND_EVENT_BASE + 14:
+		/* Variation */
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_DONTCARE)\n", szFuncName);
+		rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf),
+				   dmMsgBuf, &rlen);
+		if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_ABORT, 0, 0, NULL);
+			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
+
+			/* Variation clean up */
+			rc = dm_respond_event(sid, dmMsg->ev_token,
+					      DM_RESP_CONTINUE, 0, 0, NULL);
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno	= %d)\n",
+					    errno);
 			}
-			break;
-
-		case RESPOND_EVENT_BASE + 11:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_CONTINUE with non-zero reterror)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, ABORT_ERRNO, 0, NULL);
-				DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
-
-				/* Variation clean up */
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, 0, 0, NULL);
-				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-				}
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
-			}
-			break;
-
-		case RESPOND_EVENT_BASE + 12:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_ABORT with zero reterror)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_ABORT, 0, 0, NULL);
-				DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
-
-				/* Variation clean up */
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, 0, 0, NULL);
-				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-				}
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
-			}
-			break;
-
-		case RESPOND_EVENT_BASE + 13:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_ABORT with non-zero reterror)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rcRespond = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_ABORT, ABORT_ERRNO, 0, NULL);
-				errnoRespond = rcRespond == -1 ? errno : 0;
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
-			}
-			break;
-
-		case RESPOND_EVENT_BASE + 14:
-			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RESP_DONTCARE)\n", szFuncName);
-			rc = dm_get_events(sid, MAX_EVENT, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
-			if (rc == 0 && ((dmMsg = GetSyncEventMsg(dmMsgBuf)) != NULL)) {
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_ABORT, 0, 0, NULL);
-				DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
-
-				/* Variation clean up */
-				rc = dm_respond_event(sid, dmMsg->ev_token, DM_RESP_CONTINUE, 0, 0, NULL);
-				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno	= %d)\n", errno);
-				}
-			} else {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain synchronous event! (rc = %d, errno = %d)\n", rc, errno);
-			}
-			break;
+		} else {
+			DMLOG_PRINT(DMLVL_ERR,
+				    "Unable to obtain synchronous event! (rc = %d, errno = %d)\n",
+				    rc, errno);
+		}
+		break;
 
 	}
 
diff --git a/testcases/kernel/fs/dmapi/event_am.c b/testcases/kernel/fs/dmapi/event_am.c
index f3e9ee8..6713225 100644
--- a/testcases/kernel/fs/dmapi/event_am.c
+++ b/testcases/kernel/fs/dmapi/event_am.c
@@ -60,8 +60,8 @@
 {
 
 	char *varstr;
-	int   rc;
-	int   varStatus;
+	int rc;
+	int varStatus;
 	char *szSessionInfo = "dm_test session info";
 	char *szFuncName;
 	dm_eventset_t events;
@@ -78,21 +78,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -103,7 +117,8 @@
 		rmdir(DummySubdir);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI asynchronous metadata event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI asynchronous metadata event tests\n");
 
 	/*
 	 *  First batch of tests will be with events enabled on file system,
@@ -111,7 +126,9 @@
 	 */
 	rc = dm_path_to_fshandle(mountPt, &fshanp, &fshlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -122,9 +139,12 @@
 	DMEV_SET(DM_EVENT_POSTCREATE, events);
 	DMEV_SET(DM_EVENT_ATTRIBUTE, events);
 	DMEV_SET(DM_EVENT_CLOSE, events);
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -142,34 +162,49 @@
 		eventResponse = DM_RESP_CONTINUE;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummySubdir);
 			rc = chmod(DummySubdir, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummySubdir, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (!(statfs.st_mode & O_RDWR)) {
-					DMLOG_PRINT(DMLVL_ERR, "Object mode NOT correct! (%x vs %x)\n", O_RDWR, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object mode NOT correct! (%x vs %x)\n",
+						    O_RDWR, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -179,7 +214,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -197,37 +234,54 @@
 		eventResponse = DM_RESP_CONTINUE;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummySubdir);
 			rc = chown(DummySubdir, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummySubdir, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_uid != DUMMY_UID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object uid NOT correct! (%x vs %x)\n", DUMMY_UID, statfs.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object uid NOT correct! (%x vs %x)\n",
+						    DUMMY_UID, statfs.st_uid);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_gid != DUMMY_GID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object gid NOT correct! (%x vs %x)\n", DUMMY_GID, statfs.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object gid NOT correct! (%x vs %x)\n",
+						    DUMMY_GID, statfs.st_gid);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -237,7 +291,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -262,7 +318,9 @@
 			rmdir(DummySubdir);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -271,16 +329,23 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_CLOSE;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -288,7 +353,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -305,40 +372,57 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummyFile);
 			rc = chmod(DummyFile, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummyFile, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (!(statfs.st_mode & O_RDWR)) {
-					DMLOG_PRINT(DMLVL_ERR, "Object mode NOT correct! (%x vs %x)\n", O_RDWR, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object mode NOT correct! (%x vs %x)\n",
+						    O_RDWR, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -348,7 +432,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -365,43 +451,62 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummyFile);
 			rc = chown(DummyFile, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummyFile, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_uid != DUMMY_UID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object uid NOT correct! (%x vs %x)\n", DUMMY_UID, statfs.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object uid NOT correct! (%x vs %x)\n",
+						    DUMMY_UID, statfs.st_uid);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_gid != DUMMY_GID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object gid NOT correct! (%x vs %x)\n", DUMMY_GID, statfs.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object gid NOT correct! (%x vs %x)\n",
+						    DUMMY_GID, statfs.st_gid);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -411,7 +516,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -427,14 +534,18 @@
 		eventExpected = DM_EVENT_CLOSE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd1 = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd1 =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((fd2 = open(DummyFile, O_RDONLY)) == -1) {
 			close(fd1);
 			remove(DummyFile);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -443,16 +554,23 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_CLOSE;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -460,7 +578,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -474,7 +594,9 @@
 	 */
 	rc = dm_path_to_fshandle(mountPt, &fshanp, &fshlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -483,9 +605,12 @@
 	DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 	DMEV_SET(DM_EVENT_UNMOUNT, events);
 	DMEV_SET(DM_EVENT_POSTCREATE, events);
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -509,41 +634,60 @@
 		eventResponse = DM_RESP_CONTINUE;
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &AMevents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummySubdir);
 			rc = chmod(DummySubdir, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummySubdir, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (!(statfs.st_mode & O_RDWR)) {
-					DMLOG_PRINT(DMLVL_ERR, "Object mode NOT correct! (%x vs %x)\n", O_RDWR, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object mode NOT correct! (%x vs %x)\n",
+						    O_RDWR, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -553,7 +697,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -574,44 +720,65 @@
 		eventResponse = DM_RESP_CONTINUE;
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &AMevents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummySubdir);
 			rc = chown(DummySubdir, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummySubdir, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_uid != DUMMY_UID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object uid NOT correct! (%x vs %x)\n", DUMMY_UID, statfs.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object uid NOT correct! (%x vs %x)\n",
+						    DUMMY_UID, statfs.st_uid);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_gid != DUMMY_GID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object gid NOT correct! (%x vs %x)\n", DUMMY_GID, statfs.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object gid NOT correct! (%x vs %x)\n",
+						    DUMMY_GID, statfs.st_gid);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -621,7 +788,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -651,14 +820,19 @@
 			close(fd2);
 			close(fd1);
 			rmdir(DummySubdir);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &AMevents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd2);
 			close(fd1);
 			rmdir(DummySubdir);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -667,16 +841,23 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_CLOSE;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -684,7 +865,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -704,45 +887,65 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		} else if (((rc = close(fd)) == -1) ||
-			   ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1)) {
+			   ((rc =
+			     dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					      &AMevents,
+					      DM_EVENT_MAX)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummyFile);
 			rc = chmod(DummyFile, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummyFile, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (!(statfs.st_mode & O_RDWR)) {
-					DMLOG_PRINT(DMLVL_ERR, "Object mode NOT correct! (%x vs %x)\n", O_RDWR, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object mode NOT correct! (%x vs %x)\n",
+						    O_RDWR, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -752,7 +955,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -771,48 +976,70 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		} else if (((rc = close(fd)) == -1) ||
-			   ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1)) {
+			   ((rc =
+			     dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					      &AMevents,
+					      DM_EVENT_MAX)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummyFile);
 			rc = chown(DummyFile, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
 				rc |= stat(DummyFile, &statfs);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Object/entry handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object/entry handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Object handle NOT correct! (%lld vs %d)\n", ino, statfs.st_ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object handle NOT correct! (%lld vs %d)\n",
+						    ino, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_uid != DUMMY_UID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object uid NOT correct! (%x vs %x)\n", DUMMY_UID, statfs.st_uid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object uid NOT correct! (%x vs %x)\n",
+						    DUMMY_UID, statfs.st_uid);
 					varStatus = DMSTAT_FAIL;
 				} else if (statfs.st_gid != DUMMY_GID) {
-					DMLOG_PRINT(DMLVL_ERR, "Object gid NOT correct! (%x vs %x)\n", DUMMY_GID, statfs.st_gid);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Object gid NOT correct! (%x vs %x)\n",
+						    DUMMY_GID, statfs.st_gid);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -822,7 +1049,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -840,7 +1069,9 @@
 		eventExpected = DM_EVENT_CLOSE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd1 = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd1 =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((fd2 = open(DummyFile, O_RDONLY)) == -1) {
 			close(fd1);
@@ -849,14 +1080,19 @@
 			close(fd2);
 			close(fd1);
 			remove(DummyFile);
-		} else if ((rc = dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN, &AMevents, DM_EVENT_MAX)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_eventlist(sid, hanp, hlen, DM_NO_TOKEN,
+					  &AMevents, DM_EVENT_MAX)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd2);
 			close(fd1);
 			remove(DummyFile);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -865,16 +1101,23 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_CLOSE;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -882,7 +1125,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -907,7 +1152,9 @@
 		eventResponse = DM_RESP_CONTINUE;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -916,15 +1163,19 @@
 			eventReceived = DM_EVENT_INVALID;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummySubdir);
 			rc = chmod(DummySubdir, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -941,7 +1192,9 @@
 		eventResponse = DM_RESP_CONTINUE;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RO_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -950,15 +1203,19 @@
 			eventReceived = DM_EVENT_INVALID;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummySubdir);
 			rc = chown(DummySubdir, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -983,7 +1240,9 @@
 			rmdir(DummySubdir);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -992,17 +1251,24 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_INVALID;
 				eventReceived = DM_EVENT_INVALID;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -1010,7 +1276,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1026,13 +1294,17 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1041,15 +1313,19 @@
 			eventReceived = DM_EVENT_INVALID;
 			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s)\n", DummyFile);
 			rc = chmod(DummyFile, O_RDWR);
-			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chmod(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1065,13 +1341,17 @@
 		eventExpected = DM_EVENT_ATTRIBUTE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1080,15 +1360,19 @@
 			eventReceived = DM_EVENT_INVALID;
 			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s)\n", DummyFile);
 			rc = chown(DummyFile, DUMMY_UID, DUMMY_GID);
-			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "chown(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1104,14 +1388,18 @@
 		eventExpected = DM_EVENT_CLOSE;
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
-		if ((fd1 = open(DummyFile, O_RDONLY | O_CREAT, DUMMY_FILE_RO_MODE)) == -1) {
+		if ((fd1 =
+		     open(DummyFile, O_RDONLY | O_CREAT,
+			  DUMMY_FILE_RO_MODE)) == -1) {
 			/* No clean up */
 		} else if ((fd2 = open(DummyFile, O_RDONLY)) == -1) {
 			close(fd1);
 			remove(DummyFile);
 		}
 		if (fd1 == -1 || fd2 == -1 || fd1 == fd2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1120,17 +1408,24 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1\n", fd1);
 			rc = close(fd1);
-			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n", fd1, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #1 returned %d\n",
+				    fd1, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				eventExpected = DM_EVENT_INVALID;
 				eventReceived = DM_EVENT_INVALID;
 				EVENT_DELIVERY_DELAY;
 				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2\n", fd2);
 				rc = close(fd2);
-				DMLOG_PRINT(DMLVL_DEBUG, "close(%d) #2 returned %d\n", fd2, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "close(%d) #2 returned %d\n", fd2,
+					    rc);
 				EVENT_DELIVERY_DELAY;
-				varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived);
+				varStatus =
+				    DMVAR_CHKPASSEXP(0, rc, eventExpected,
+						     eventReceived);
 			}
 			DMVAR_END(varStatus);
 
@@ -1138,7 +1433,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1148,20 +1445,27 @@
 	DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 	DMEV_SET(DM_EVENT_UNMOUNT, events);
 	DMEV_SET(DM_EVENT_DESTROY, events);
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
 
-	rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_ATTR_ON_DESTROY, &maxAttrSize);
+	rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_ATTR_ON_DESTROY,
+			   &maxAttrSize);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_get_config failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_get_config failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
-		DMLOG_PRINT(DMLVL_DEBUG, "DM_CONFIG_MAX_ATTR_ON_DESTROY %d\n", maxAttrSize);
+		DMLOG_PRINT(DMLVL_DEBUG, "DM_CONFIG_MAX_ATTR_ON_DESTROY %d\n",
+			    maxAttrSize);
 	}
 
 	szFuncName = "dm_set_return_on_destroy";
@@ -1181,32 +1485,47 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_return_on_destroy(INVALID_ADDR, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(INVALID_ADDR, fshanp,
+						      fshlen, DM_NO_TOKEN,
+						      &attrname, DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1228,32 +1547,47 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, (void *)INVALID_ADDR, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, (void *)INVALID_ADDR,
+						      fshlen, DM_NO_TOKEN,
+						      &attrname, DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1275,32 +1609,47 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, INVALID_ADDR, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, fshanp, INVALID_ADDR,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1322,32 +1671,47 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, fshlen, INVALID_ADDR, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, fshanp, fshlen,
+						      INVALID_ADDR, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1372,32 +1736,48 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, fshlen, DM_NO_TOKEN, (dm_attrname_t *)INVALID_ADDR, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid attrnamep)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, fshanp, fshlen,
+						      DM_NO_TOKEN,
+						      (dm_attrname_t *)
+						      INVALID_ADDR, DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1419,32 +1799,47 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_return_on_destroy(DM_NO_SESSION, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(DM_NO_SESSION, fshanp,
+						      fshlen, DM_NO_TOKEN,
+						      &attrname, DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1467,30 +1862,46 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
-		} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_session(DM_NO_SESSION, szSessionInfo,
+					   &newsid)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(different sid)\n", szFuncName);
-			rc = dm_set_return_on_destroy(newsid, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_FALSE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(different sid)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(newsid, fshanp, fshlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_FALSE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
@@ -1498,7 +1909,9 @@
 			rc |= remove(DummyFile);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1520,31 +1933,43 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, hanp, hlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, hanp, hlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1566,26 +1991,37 @@
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
-		} else if ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+				       0, sizeof(buf), buf)) == -1) {
 			rmdir(DummySubdir);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, hanp, hlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, hanp, hlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1605,7 +2041,9 @@
 		/* Variation */
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_set_return_on_destroy(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &attrname, DM_TRUE);
+		rc = dm_set_return_on_destroy(sid, DM_GLOBAL_HANP,
+					      DM_GLOBAL_HLEN, DM_NO_TOKEN,
+					      &attrname, DM_TRUE);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -1626,32 +2064,46 @@
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
 		memcpy(buf, ATTR_VALUE, ATTR_VALUELEN);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, sizeof(buf), buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, sizeof(buf), buf)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			rc = dm_set_return_on_destroy(sid, fshanp, fshlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1671,32 +2123,47 @@
 		/* Variation set up */
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, 0, NULL)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname,
+					0, 0, NULL)) == -1)
+			||
+			((rc =
+			  dm_path_to_fshandle(DummyFile, &fshanp,
+					      &fshlen)) == -1)) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero len attr)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero len attr)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, fshanp, fshlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1717,38 +2184,53 @@
 		/* Variation set up */
 		memset(attrname.an_chars, 0, DM_ATTR_NAME_SIZE);
 		memcpy(attrname.an_chars, ATTR_NAME, DM_ATTR_NAME_SIZE);
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((buf = malloc(maxAttrSize+1)) == NULL) {
+		} else if ((buf = malloc(maxAttrSize + 1)) == NULL) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if ((memset(buf, '4', maxAttrSize+1) == NULL) ||
-			   ((rc = dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN, &attrname, 0, maxAttrSize+1, buf)) == -1) ||
-			   ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1 )) {
+		} else if ((memset(buf, '4', maxAttrSize + 1) == NULL) ||
+			   ((rc =
+			     dm_set_dmattr(sid, hanp, hlen, DM_NO_TOKEN,
+					   &attrname, 0, maxAttrSize + 1,
+					   buf)) == -1)
+			   ||
+			   ((rc =
+			     dm_path_to_fshandle(DummyFile, &fshanp,
+						 &fshlen)) == -1)) {
 			free(buf);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1 || buf == NULL) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr too big)\n", szFuncName);
-			rc = dm_set_return_on_destroy(sid, fshanp, fshlen, DM_NO_TOKEN, &attrname, DM_TRUE);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(attr too big)\n",
+				    szFuncName);
+			rc = dm_set_return_on_destroy(sid, fshanp, fshlen,
+						      DM_NO_TOKEN, &attrname,
+						      DM_TRUE);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			free(buf);
 			dm_handle_free(hanp, hlen);
@@ -1763,14 +2245,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -1795,16 +2280,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1813,29 +2303,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			/*rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
-				dm_destroy_session(sid);
-				DM_EXIT();
-			}*/
+			/*rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			   if (rc == -1) {
+			   DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+			   dm_destroy_session(sid);
+			   DM_EXIT();
+			   } */
 
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
@@ -1844,42 +2344,62 @@
 			DMEV_SET(DM_EVENT_ATTRIBUTE, events);
 			DMEV_SET(DM_EVENT_CLOSE, events);
 			DMEV_SET(DM_EVENT_DESTROY, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, DM_NO_TOKEN,
+					 &events, DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			/*rc = dm_release_right(sid, lhanp, lhlen, token);
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
-				dm_destroy_session(sid);
-				DM_EXIT();
-			}*/
+			/*rc = dm_release_right(sid, lhanp, lhlen, token);
+			   if (rc == -1) {
+			   DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+			   dm_destroy_session(sid);
+			   DM_EXIT();
+			   } */
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -1887,19 +2407,25 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_POSTCREATE) {
 			/* SPECIAL CASE: need to save entry info */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
 			hlen2 = DM_GET_LEN(nse, ne_handle2);
 			strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTCREATE\n");
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_POSTCREATE\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle: %p\n", hanp2);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n", hlen2);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n",
+				    hlen2);
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 
 			/* No response needed */
 			response = DM_RESP_INVALID;
@@ -1907,71 +2433,114 @@
 			eventReceived = type;
 			response = eventResponse;
 
-			switch (type)
-		       	{
+			switch (type) {
 			case DM_EVENT_ATTRIBUTE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_ATTRIBUTE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle length: %d\n", ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_ATTRIBUTE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle length: %d\n",
+						    ahlen1);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
-
-			case DM_EVENT_CLOSE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_CLOSE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle length: %d\n", ahlen1);
-
-				response = DM_RESP_INVALID;
-				break;
-			}
-
-			case DM_EVENT_DESTROY:
-			{
-				dm_destroy_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_destroy_event_t *);
-				ahanp1 = DM_GET_VALUE(de, ds_handle, void *);
-				ahlen1 = DM_GET_LEN(de, ds_handle);
-
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_DESTROY\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Object handle length: %d\n", ahlen1);
-				if (de->ds_attrname.an_chars[0]) {
-					int attrlen = DM_GET_LEN(de, ds_attrcopy);
-
-					DMLOG_PRINT(DMLVL_DEBUG, "  Attribute name: %.*s\n", 8, de->ds_attrname.an_chars);
-					DMLOG_PRINT(DMLVL_DEBUG, "  Attribute value length: %d\n", attrlen);
-					if (attrlen) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  Attribute value: %s\n", DM_GET_VALUE(de, ds_attrcopy, char *));
-					}
+					response = DM_RESP_INVALID;
+					break;
 				}
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+			case DM_EVENT_CLOSE:
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_CLOSE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle length: %d\n",
+						    ahlen1);
+
+					response = DM_RESP_INVALID;
+					break;
+				}
+
+			case DM_EVENT_DESTROY:
+				{
+					dm_destroy_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_destroy_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(de, ds_handle, void *);
+					ahlen1 = DM_GET_LEN(de, ds_handle);
+
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_DESTROY\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Object handle length: %d\n",
+						    ahlen1);
+					if (de->ds_attrname.an_chars[0]) {
+						int attrlen =
+						    DM_GET_LEN(de, ds_attrcopy);
+
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  Attribute name: %.*s\n",
+							    8,
+							    de->ds_attrname.
+							    an_chars);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  Attribute value length: %d\n",
+							    attrlen);
+						if (attrlen) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "  Attribute value: %s\n",
+								    DM_GET_VALUE
+								    (de,
+								     ds_attrcopy,
+								     char *));
+						}
+					}
+
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/event_an.c b/testcases/kernel/fs/dmapi/event_an.c
index 6cb1001..7d95104 100644
--- a/testcases/kernel/fs/dmapi/event_an.c
+++ b/testcases/kernel/fs/dmapi/event_an.c
@@ -58,7 +58,8 @@
 dm_response_t eventResponse;
 void *hanp1, *hanp2, *ahanp1, *ahanp2;
 size_t hlen1, hlen2, ahlen1, ahlen2;
-char name1[FILENAME_MAX], name2[FILENAME_MAX], aname1[FILENAME_MAX], aname2[FILENAME_MAX];
+char name1[FILENAME_MAX], name2[FILENAME_MAX], aname1[FILENAME_MAX],
+    aname2[FILENAME_MAX];
 dm_mode_t mode, amode;
 int aretcode;
 
@@ -68,8 +69,8 @@
 {
 
 	char *varstr;
-	int   rc;
-	int   varStatus;
+	int rc;
+	int varStatus;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 	void *fshanp, *dhanp;
@@ -83,21 +84,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -107,7 +122,8 @@
 		sprintf(DummySubdir2, "%s/%s", mountPt, DUMMY_SUBDIR2);
 		sprintf(DummyLink, "%s/%s", mountPt, DUMMY_LINK);
 		sprintf(DummySubdir2File, "%s/%s", mountPt, DUMMY_SUBDIR2_FILE);
-		sprintf(DummySubdir2Subdir, "%s/%s", mountPt, DUMMY_SUBDIR2_SUBDIR);
+		sprintf(DummySubdir2Subdir, "%s/%s", mountPt,
+			DUMMY_SUBDIR2_SUBDIR);
 
 		remove(DummySubdir2File);
 		rmdir(DummySubdir2Subdir);
@@ -118,7 +134,8 @@
 		rmdir(DummySubdir2);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI asynchronous namespace event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI asynchronous namespace event tests\n");
 
 	/*
 	 *  First batch of tests will be with events enabled on file system,
@@ -126,7 +143,9 @@
 	 */
 	rc = dm_path_to_fshandle(mountPt, &fshanp, &fshlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -144,9 +163,12 @@
 	DMEV_SET(DM_EVENT_POSTSYMLINK, events);
 	DMEV_SET(DM_EVENT_LINK, events);
 	DMEV_SET(DM_EVENT_POSTLINK, events);
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -167,37 +189,55 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s)\n", DummySubdir);
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir,
+			    rc);
 		EVENT_DELIVERY_DELAY;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			struct stat statfs;
 
 			rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 			rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 			rc |= stat(DummySubdir, &statfs);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino1 != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino1, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (ino2 != statfs.st_ino) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry handle NOT correct! (%lld vs %d)\n",
+					    ino2, statfs.st_ino);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    aname1, DUMMY_SUBDIR);
 				varStatus = DMSTAT_FAIL;
-			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1)
+				   != 0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handles NOT same!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, aname1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry names NOT same! (%s vs %s)\n",
+					    name1, aname1);
 				varStatus = DMSTAT_FAIL;
 			} else if (amode != statfs.st_mode) {
-				DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Modes NOT same! (%d vs %d)\n",
+					    amode, statfs.st_mode);
 				varStatus = DMSTAT_FAIL;
 			} else if (aretcode != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Return codes NOT same! (%d vs %d)\n",
+					    mode, amode);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -208,7 +248,9 @@
 		rc = rmdir(DummySubdir);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -231,37 +273,56 @@
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s)\n", DummySubdir);
 			rc = rmdir(DummySubdir);
-			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-  				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				} else if (strcmp(name1, aname1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (amode != statfs.st_mode) {
-					DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Modes NOT same! (%d vs %d)\n",
+						    amode, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -286,50 +347,81 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -340,7 +432,9 @@
 			rc = rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -359,47 +453,72 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = symlink(DummySubdir, DummySubdir2);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 				rc |= lstat(DummySubdir2, &statfs);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-			 	} else if (ino2 != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				} else if (ino2 != statfs.st_ino) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry handle NOT correct! (%lld vs %d)\n",
+						    ino2, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DummySubdir) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", aname2, DummySubdir);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    aname2, DummySubdir);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry names NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -411,7 +530,9 @@
 			rc |= rmdir(DummySubdir);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -433,30 +554,43 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir,
+				    DummyLink);
 			rc = link(DummySubdir, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummySubdir, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummySubdir, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%d vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%d vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%d vs %d)\n", ino2, ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%d vs %d)\n",
+						    ino2, ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -467,12 +601,15 @@
 			rc = rmdir(DummySubdir);
 			rc |= unlink(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with DIRECTORY_LINKS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with DIRECTORY_LINKS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -494,38 +631,56 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "open(%s)\n", DummyFile);
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile,
+			    rc);
 		rc = (fd == -1) ? -1 : 0;
 		EVENT_DELIVERY_DELAY;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			struct stat statfs;
 
 			rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 			rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 			rc |= stat(DummyFile, &statfs);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino1 != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino1, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (ino2 != statfs.st_ino) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry handle NOT correct! (%lld vs %d)\n",
+					    ino2, statfs.st_ino);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_FILE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    aname1, DUMMY_FILE);
 				varStatus = DMSTAT_FAIL;
-			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1)
+				   != 0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handles NOT same!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, aname1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry names NOT same! (%s vs %s)\n",
+					    name1, aname1);
 				varStatus = DMSTAT_FAIL;
 			} else if (amode != statfs.st_mode) {
-				DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Modes NOT same! (%d vs %d)\n",
+					    amode, statfs.st_mode);
 				varStatus = DMSTAT_FAIL;
 			} else if (aretcode != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Return codes NOT same! (%d vs %d)\n",
+					    mode, amode);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -537,7 +692,9 @@
 		rc |= remove(DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -555,44 +712,65 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if (((rc = close(fd)) == -1) ||
 			   ((rc = stat(DummyFile, &statfs)) == -1)) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s)\n", DummyFile);
 			rc = remove(DummyFile);
-			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-  				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				} else if (strcmp(name1, aname1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (amode != statfs.st_mode) {
-					DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Modes NOT same! (%d vs %d)\n",
+						    amode, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -616,56 +794,89 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummyFile2);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummyFile2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummyFile2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummyFile2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummyFile2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_FILE2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -676,7 +887,9 @@
 			rc = remove(DummyFile2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -694,53 +907,80 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = symlink(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n", DummyFile,
+				    DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 				rc |= lstat(DummyLink, &statfs);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-			 	} else if (ino2 != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				} else if (ino2 != statfs.st_ino) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry handle NOT correct! (%lld vs %d)\n",
+						    ino2, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DummyFile) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", aname2, DummyFile);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    aname2, DummyFile);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry names NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -752,7 +992,9 @@
 			rc |= remove(DummyFile);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -772,37 +1014,52 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = link(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummyFile, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%d vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%d vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%d vs %d)\n", ino2, ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%d vs %d)\n",
+						    ino2, ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -814,7 +1071,9 @@
 			rc |= remove(DummyFile);
 			rc |= remove(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -829,7 +1088,9 @@
 	 */
 	rc = dm_path_to_fshandle(mountPt, &fshanp, &fshlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -837,16 +1098,21 @@
 	DMEV_ZERO(events);
 	DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 	DMEV_SET(DM_EVENT_UNMOUNT, events);
-	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(fs) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
 
 	rc = dm_path_to_handle(mountPt, &dhanp, &dhlen);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -862,9 +1128,12 @@
 	DMEV_SET(DM_EVENT_POSTSYMLINK, events);
 	DMEV_SET(DM_EVENT_LINK, events);
 	DMEV_SET(DM_EVENT_POSTLINK, events);
-	rc = dm_set_eventlist(sid, dhanp, dhlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, dhanp, dhlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(dir) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(dir) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -885,37 +1154,55 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s)\n", DummySubdir);
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir,
+			    rc);
 		EVENT_DELIVERY_DELAY;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			struct stat statfs;
 
 			rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 			rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 			rc |= stat(DummySubdir, &statfs);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino1 != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino1, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (ino2 != statfs.st_ino) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry handle NOT correct! (%lld vs %d)\n",
+					    ino2, statfs.st_ino);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    aname1, DUMMY_SUBDIR);
 				varStatus = DMSTAT_FAIL;
-			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1)
+				   != 0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handles NOT same!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, aname1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry names NOT same! (%s vs %s)\n",
+					    name1, aname1);
 				varStatus = DMSTAT_FAIL;
 			} else if (amode != statfs.st_mode) {
-				DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Modes NOT same! (%d vs %d)\n",
+					    amode, statfs.st_mode);
 				varStatus = DMSTAT_FAIL;
 			} else if (aretcode != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Return codes NOT same! (%d vs %d)\n",
+					    mode, amode);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -926,7 +1213,9 @@
 		rc = rmdir(DummySubdir);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -949,37 +1238,56 @@
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s)\n", DummySubdir);
 			rc = rmdir(DummySubdir);
-			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-  				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				} else if (strcmp(name1, aname1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (amode != statfs.st_mode) {
-					DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Modes NOT same! (%d vs %d)\n",
+						    amode, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1004,50 +1312,81 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1058,7 +1397,9 @@
 			rc = rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1082,7 +1423,10 @@
 			/* No clean up */
 		} else if ((rc = mkdir(DummySubdir2, DUMMY_DIR_RW_MODE)) == -1) {
 			rmdir(DummySubdir);
-		} else if ((rc = dm_path_to_handle(DummySubdir2, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DummySubdir2, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DummySubdir2);
 			rmdir(DummySubdir);
 		} else if ((rc = dm_handle_to_ino(dhanp, dhlen, &dino)) == -1) {
@@ -1091,47 +1435,75 @@
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2Subdir);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2Subdir);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2Subdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2Subdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != dino) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT correct! (%lld vs %d)\n", ino2, dino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT correct! (%lld vs %d)\n",
+						    ino2, dino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1143,7 +1515,9 @@
 			rc |= rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -1166,9 +1540,13 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = mkdir(DummySubdir2, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = mkdir(DummySubdir2Subdir, DUMMY_DIR_RW_MODE)) == -1) {
+		} else if ((rc = mkdir(DummySubdir2Subdir, DUMMY_DIR_RW_MODE))
+			   == -1) {
 			rmdir(DummySubdir2);
-		} else if ((rc = dm_path_to_handle(DummySubdir2, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DummySubdir2, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DummySubdir2Subdir);
 			rmdir(DummySubdir2);
 		} else if ((rc = dm_handle_to_ino(dhanp, dhlen, &dino)) == -1) {
@@ -1177,47 +1555,75 @@
 			rmdir(DummySubdir2);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir2Subdir, DummySubdir);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir2Subdir, DummySubdir);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir2Subdir, DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir2Subdir, DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != dino) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT correct! (%lld vs %d)\n", ino1, dino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT correct! (%lld vs %d)\n",
+						    ino1, dino);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1229,7 +1635,9 @@
 			rc |= rmdir(DummySubdir);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dhanp, dhlen);
 		}
@@ -1249,47 +1657,72 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = symlink(DummySubdir, DummySubdir2);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 				rc |= lstat(DummySubdir2, &statfs);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-			 	} else if (ino2 != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				} else if (ino2 != statfs.st_ino) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry handle NOT correct! (%lld vs %d)\n",
+						    ino2, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DummySubdir) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", aname2, DummySubdir);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    aname2, DummySubdir);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry names NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1301,7 +1734,9 @@
 			rc |= rmdir(DummySubdir);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1323,30 +1758,43 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir,
+				    DummyLink);
 			rc = link(DummySubdir, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummySubdir, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummySubdir, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%d vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%d vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%d vs %d)\n", ino2, ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%d vs %d)\n",
+						    ino2, ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1357,12 +1805,15 @@
 			rc = rmdir(DummySubdir);
 			rc |= unlink(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with DIRECTORY_LINKS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with DIRECTORY_LINKS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1384,38 +1835,56 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "open(%s)\n", DummyFile);
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile,
+			    rc);
 		rc = (fd == -1) ? -1 : 0;
 		EVENT_DELIVERY_DELAY;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			struct stat statfs;
 
 			rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 			rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 			rc |= stat(DummyFile, &statfs);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino1 != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino1, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (ino2 != statfs.st_ino) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry handle NOT correct! (%lld vs %d)\n",
+					    ino2, statfs.st_ino);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_FILE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    aname1, DUMMY_FILE);
 				varStatus = DMSTAT_FAIL;
-			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+			} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1)
+				   != 0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handles NOT same!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, aname1) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry names NOT same! (%s vs %s)\n",
+					    name1, aname1);
 				varStatus = DMSTAT_FAIL;
 			} else if (amode != statfs.st_mode) {
-				DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Modes NOT same! (%d vs %d)\n",
+					    amode, statfs.st_mode);
 				varStatus = DMSTAT_FAIL;
 			} else if (aretcode != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Return codes NOT same! (%d vs %d)\n",
+					    mode, amode);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -1427,7 +1896,9 @@
 		rc |= remove(DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -1445,44 +1916,65 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if (((rc = close(fd)) == -1) ||
 			   ((rc = stat(DummyFile, &statfs)) == -1)) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s)\n", DummyFile);
 			rc = remove(DummyFile);
-			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino);
-		        	if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-  				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry names NOT same! (%s vs %s)\n", name1, aname1);
+				} else if (strcmp(name1, aname1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (amode != statfs.st_mode) {
-					DMLOG_PRINT(DMLVL_ERR, "Modes NOT same! (%d vs %d)\n", amode, statfs.st_mode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Modes NOT same! (%d vs %d)\n",
+						    amode, statfs.st_mode);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1506,56 +1998,89 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummyFile2);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummyFile2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummyFile2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummyFile2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummyFile2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(ahanp1, ahlen1, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_FILE2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1566,7 +2091,9 @@
 			rc = remove(DummyFile2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1587,12 +2114,18 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummySubdir2File);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if (((rc = close(fd)) == -1) ||
-			   ((rc = mkdir(DummySubdir2, DUMMY_DIR_RW_MODE)) == -1)) {
+			   ((rc =
+			     mkdir(DummySubdir2, DUMMY_DIR_RW_MODE)) == -1)) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummySubdir2, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DummySubdir2, &dhanp,
+					   &dhlen)) == -1) {
 			rmdir(DummySubdir2);
 			remove(DummyFile);
 		} else if ((rc = dm_handle_to_ino(dhanp, dhlen, &dino)) == -1) {
@@ -1601,47 +2134,75 @@
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummySubdir2File);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummySubdir2File);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummySubdir2File, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummySubdir2File, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != dino) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT correct! (%lld vs %d)\n", ino2, dino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT correct! (%lld vs %d)\n",
+						    ino2, dino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1653,7 +2214,9 @@
 			rc |= rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1676,12 +2239,18 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = mkdir(DummySubdir2, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummySubdir2File, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummySubdir2File, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DummySubdir2);
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummySubdir2File);
 			rmdir(DummySubdir2);
-		} else if ((rc = dm_path_to_handle(DummySubdir2, &dhanp, &dhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DummySubdir2, &dhanp,
+					   &dhlen)) == -1) {
 			remove(DummySubdir2File);
 			rmdir(DummySubdir2);
 		} else if ((rc = dm_handle_to_ino(dhanp, dhlen, &dino)) == -1) {
@@ -1690,47 +2259,75 @@
 			rmdir(DummySubdir2);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir2File, DummyFile);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir2File, DummyFile);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir2File, DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir2File, DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != dino) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT correct! (%lld vs %d)\n", ino1, dino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT correct! (%lld vs %d)\n",
+						    ino1, dino);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp2, hlen2, ahanp2, ahlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp2, hlen2, ahanp2, ahlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1742,7 +2339,9 @@
 			rc |= rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1760,53 +2359,80 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = symlink(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n", DummyFile,
+				    DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				struct stat statfs;
 
 				rc = dm_handle_to_ino(ahanp1, ahlen1, &ino1);
 				rc |= dm_handle_to_ino(ahanp2, ahlen2, &ino2);
 				rc |= lstat(DummyLink, &statfs);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-			 	} else if (ino2 != statfs.st_ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry handle NOT correct! (%lld vs %d)\n", ino2, statfs.st_ino);
+				} else if (ino2 != statfs.st_ino) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry handle NOT correct! (%lld vs %d)\n",
+						    ino2, statfs.st_ino);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, ahanp1, ahlen1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handles NOT same!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, ahanp1, ahlen1) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", aname1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    aname1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(aname2, DummyFile) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", aname2, DummyFile);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    aname2, DummyFile);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, aname1) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry names NOT same! (%s vs %s)\n", name1, aname1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry names NOT same! (%s vs %s)\n",
+						    name1, aname1);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, aname2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT same! (%s vs %s)\n", name2, aname2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT same! (%s vs %s)\n",
+						    name2, aname2);
 					varStatus = DMSTAT_FAIL;
 				} else if (aretcode != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Return codes NOT same! (%d vs %d)\n", mode, amode);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Return codes NOT same! (%d vs %d)\n",
+						    mode, amode);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1818,7 +2444,9 @@
 			rc |= remove(DummyFile);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1838,37 +2466,52 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = link(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummyFile, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%d vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%d vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%d vs %d)\n", ino2, ino);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%d vs %d)\n",
+						    ino2, ino);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1880,7 +2523,9 @@
 			rc |= remove(DummyFile);
 			rc |= remove(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1894,9 +2539,12 @@
 	 *  on dir
 	 */
 	DMEV_ZERO(events);
-	rc = dm_set_eventlist(sid, dhanp, dhlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+	rc = dm_set_eventlist(sid, dhanp, dhlen, DM_NO_TOKEN, &events,
+			      DM_EVENT_MAX);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist(dir) failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_eventlist(dir) failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	}
@@ -1916,16 +2564,20 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s)\n", DummySubdir);
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir,
+			    rc);
 		EVENT_DELIVERY_DELAY;
-		DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+		DMVAR_END(DMVAR_CHKPASSEXP
+			  (0, rc, eventExpected, eventReceived));
 
 		/* Variation clean up */
 		EVENT_DELIVERY_DELAY;
 		rc = rmdir(DummySubdir);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -1942,16 +2594,20 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s)\n", DummySubdir);
 			rc = rmdir(DummySubdir);
-			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n", DummySubdir, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n",
+				    DummySubdir, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 		}
@@ -1971,23 +2627,31 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2005,16 +2669,22 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = symlink(DummySubdir, DummySubdir2);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
@@ -2022,7 +2692,9 @@
 			rc |= rmdir(DummySubdir);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2043,28 +2715,36 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir,
+				    DummyLink);
 			rc = link(DummySubdir, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummySubdir, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummySubdir, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			rc |= unlink(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with DIRECTORY_LINKS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with DIRECTORY_LINKS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2085,10 +2765,12 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "open(%s)\n", DummyFile);
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile, rc);
+		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile,
+			    rc);
 		rc = (fd == -1) ? -1 : 0;
 		EVENT_DELIVERY_DELAY;
-		DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+		DMVAR_END(DMVAR_CHKPASSEXP
+			  (0, rc, eventExpected, eventReceived));
 
 		/* Variation clean up */
 		EVENT_DELIVERY_DELAY;
@@ -2096,7 +2778,9 @@
 		rc |= remove(DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -2112,22 +2796,28 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s)\n", DummyFile);
 			rc = remove(DummyFile);
-			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n",
+				    DummyFile, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 		}
@@ -2146,29 +2836,39 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummyFile2);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummyFile2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummyFile2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummyFile2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummyFile2, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile2);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2185,22 +2885,30 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = close(fd)) == -1) {
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = symlink(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n", DummyFile,
+				    DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
@@ -2208,7 +2916,9 @@
 			rc |= remove(DummyFile);
 			EVENT_DELIVERY_DELAY;
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2227,23 +2937,30 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = link(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummyFile, DummyLink, rc);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			EVENT_DELIVERY_DELAY;
@@ -2251,7 +2968,9 @@
 			rc |= remove(DummyFile);
 			rc |= remove(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2259,14 +2978,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -2291,16 +3013,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -2309,26 +3036,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -2346,16 +3086,21 @@
 			DMEV_SET(DM_EVENT_POSTSYMLINK, events);
 			DMEV_SET(DM_EVENT_LINK, events);
 			DMEV_SET(DM_EVENT_POSTLINK, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -2363,25 +3108,42 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -2393,222 +3155,424 @@
 
 			switch (type) {
 			case DM_EVENT_CREATE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				mode = nse->ne_mode;
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					mode = nse->ne_mode;
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_CREATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", mode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_CREATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    mode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_POSTCREATE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				amode = nse->ne_mode;
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-				ahanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				ahlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(aname1, DM_GET_VALUE(nse, ne_name1, char *));
-				aretcode = nse->ne_retcode;
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					amode = nse->ne_mode;
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+					ahanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					ahlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(aname1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					aretcode = nse->ne_retcode;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTCREATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", amode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", ahlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle: %p\n", ahanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n", ahlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", aname1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", aretcode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_POSTCREATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    amode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry handle: %p\n",
+						    ahanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry handle length: %d\n",
+						    ahlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    aname1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Return code: %x\n",
+						    aretcode);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			case DM_EVENT_REMOVE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				mode = nse->ne_mode;
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					mode = nse->ne_mode;
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_REMOVE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", mode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_REMOVE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    mode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_POSTREMOVE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				amode = nse->ne_mode;
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(aname1, DM_GET_VALUE(nse, ne_name1, char *));
-				aretcode = nse->ne_retcode;
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					amode = nse->ne_mode;
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(aname1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					aretcode = nse->ne_retcode;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTREMOVE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", amode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", ahlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", aname1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", aretcode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_POSTREMOVE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    amode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    aname1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Return code: %x\n",
+						    aretcode);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			case DM_EVENT_RENAME:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				hlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(name2, DM_GET_VALUE(nse, ne_name2, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					hanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					hlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(name2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_RENAME\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle: %p\n", hanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle length: %d\n", hlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old entry name: %s\n", name1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New entry name: %s\n", name2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_RENAME\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle: %p\n",
+						    hanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle length: %d\n",
+						    hlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old entry name: %s\n",
+						    name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New entry name: %s\n",
+						    name2);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_POSTRENAME:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-				ahanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				ahlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(aname1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(aname2, DM_GET_VALUE(nse, ne_name2, char *));
-				aretcode = nse->ne_retcode;
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+					ahanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					ahlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(aname1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(aname2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
+					aretcode = nse->ne_retcode;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTRENAME\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle length: %d\n", ahlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle: %p\n", ahanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle length: %d\n", ahlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old entry name: %s\n", aname1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New entry name: %s\n", aname2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", aretcode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_POSTRENAME\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle length: %d\n",
+						    ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle: %p\n",
+						    ahanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle length: %d\n",
+						    ahlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old entry name: %s\n",
+						    aname1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New entry name: %s\n",
+						    aname2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Return code: %x\n",
+						    aretcode);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			case DM_EVENT_SYMLINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(name2, DM_GET_VALUE(nse, ne_name2, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(name2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_SYMLINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink entry name: %s\n", name1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink contents: %s\n", name2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_SYMLINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink entry name: %s\n",
+						    name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink contents: %s\n",
+						    name2);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_POSTSYMLINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-				ahanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				ahlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(aname1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(aname2, DM_GET_VALUE(nse, ne_name2, char *));
-				aretcode = nse->ne_retcode;
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+					ahanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					ahlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(aname1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(aname2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
+					aretcode = nse->ne_retcode;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTSYMLINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", ahlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle: %p\n", ahanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n", ahlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink entry name: %s\n", aname1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink contents: %s\n", aname2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", aretcode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_POSTSYMLINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry handle: %p\n",
+						    ahanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry handle length: %d\n",
+						    ahlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink entry name: %s\n",
+						    aname1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink contents: %s\n",
+						    aname2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Return code: %x\n",
+						    aretcode);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			case DM_EVENT_LINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				hlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					hanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					hlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_LINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle: %p\n", hanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle length: %d\n", hlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Target entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_LINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle: %p\n",
+						    hanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle length: %d\n",
+						    hlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Target entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_POSTLINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				ahanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				ahlen1 = DM_GET_LEN(nse, ne_handle1);
-				ahanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				ahlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(aname1, DM_GET_VALUE(nse, ne_name1, char *));
-				aretcode = nse->ne_retcode;
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					ahanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					ahlen1 = DM_GET_LEN(nse, ne_handle1);
+					ahanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					ahlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(aname1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					aretcode = nse->ne_retcode;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTLINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", ahanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", ahlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle: %p\n", ahanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle length: %d\n", ahlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Target entry name: %s\n", aname1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", aretcode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_POSTLINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    ahanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    ahlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle: %p\n",
+						    ahanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle length: %d\n",
+						    ahlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Target entry name: %s\n",
+						    aname1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Return code: %x\n",
+						    aretcode);
 
-				response = DM_RESP_INVALID;
-				break;
-			}
+					response = DM_RESP_INVALID;
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/event_sd.c b/testcases/kernel/fs/dmapi/event_sd.c
index cc767d4..e59629d 100644
--- a/testcases/kernel/fs/dmapi/event_sd.c
+++ b/testcases/kernel/fs/dmapi/event_sd.c
@@ -71,9 +71,9 @@
 {
 
 	char *varstr;
-	int   i;
-	int   rc;
-	int   varStatus;
+	int i;
+	int rc;
+	int varStatus;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -85,21 +85,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -112,8 +126,9 @@
 		EVENT_DELIVERY_DELAY;
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < TMP_FILELEN/DUMMY_STRLEN; i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < TMP_FILELEN / DUMMY_STRLEN; i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -125,13 +140,16 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI synchronous data event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI synchronous data event tests\n");
 
 	/*
 	 * TEST    : read - no regions
@@ -148,11 +166,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -163,10 +186,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -177,7 +206,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -200,11 +231,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -215,20 +251,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -239,7 +286,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -262,11 +311,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -277,21 +331,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -302,7 +367,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -325,11 +392,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -340,10 +412,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -354,7 +432,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -377,11 +457,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -392,10 +477,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -406,7 +497,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -433,14 +526,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -451,20 +549,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -475,7 +584,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -502,14 +613,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -520,21 +636,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -545,7 +672,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -571,11 +700,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -586,10 +720,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -600,7 +740,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -627,14 +769,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -645,10 +792,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -659,7 +812,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -689,14 +844,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 4444, SEEK_SET)) != 4444) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 4444) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -707,20 +867,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -731,7 +902,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -761,14 +934,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 4444, SEEK_SET)) != 4444) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 4444) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -779,21 +957,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -804,7 +993,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -834,14 +1025,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 3333, SEEK_SET)) != 3333) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 3333) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -852,10 +1048,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -866,7 +1068,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -896,14 +1100,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2997, SEEK_SET)) != 2997) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2997) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -914,20 +1123,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -938,7 +1158,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -968,14 +1190,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2997, SEEK_SET)) != 2997) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2997) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -986,21 +1213,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1011,7 +1249,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1035,14 +1275,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1053,10 +1298,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1067,7 +1318,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1091,14 +1344,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1109,20 +1367,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1133,7 +1402,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1157,14 +1428,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1175,20 +1451,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1199,7 +1486,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1215,7 +1504,7 @@
 
 		/* Variation set up */
 		numRegions = 1;
-		Regions[0].rg_offset = DUMMY_STRLEN+1;
+		Regions[0].rg_offset = DUMMY_STRLEN + 1;
 		Regions[0].rg_size = 1;
 		Regions[0].rg_flags = DM_REGION_READ;
 
@@ -1223,14 +1512,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1241,10 +1535,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1255,7 +1555,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1278,11 +1580,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1293,10 +1600,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1307,7 +1620,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1331,14 +1646,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1349,20 +1669,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1373,7 +1704,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1397,14 +1730,20 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, DUMMY_STRLEN, SEEK_SET)) != DUMMY_STRLEN) {
+		} else if ((off = lseek(fd, DUMMY_STRLEN, SEEK_SET)) !=
+			   DUMMY_STRLEN) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1415,20 +1754,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1439,7 +1789,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1463,14 +1815,20 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, DUMMY_STRLEN+1, SEEK_SET)) != DUMMY_STRLEN+1) {
+		} else if ((off = lseek(fd, DUMMY_STRLEN + 1, SEEK_SET)) !=
+			   DUMMY_STRLEN + 1) {
 			close(fd);
 			remove(DummyFile);
 		}
-		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN+1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN + 1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1481,10 +1839,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1495,7 +1859,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1518,11 +1884,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1533,10 +1904,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1547,7 +1924,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1571,14 +1950,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1589,20 +1973,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1613,7 +2008,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1637,14 +2034,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2, SEEK_SET)) != 2) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1655,10 +2057,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, 1, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, 1, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1669,7 +2077,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1685,18 +2095,24 @@
 		/* Variation set up */
 		numRegions = 1;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
-		Regions[0].rg_flags = DM_REGION_READ|DM_REGION_WRITE|DM_REGION_TRUNCATE;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
+		Regions[0].rg_flags =
+		    DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1707,20 +2123,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1731,7 +2158,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1747,24 +2176,29 @@
 		/* Variation set up */
 		numRegions = 3;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
 		Regions[0].rg_flags = DM_REGION_WRITE;
 		Regions[1].rg_offset = 0;
-		Regions[1].rg_size = DUMMY_STRLEN/2;
+		Regions[1].rg_size = DUMMY_STRLEN / 2;
 		Regions[1].rg_flags = DM_REGION_TRUNCATE;
 		Regions[2].rg_offset = 0;
-		Regions[2].rg_size = DUMMY_STRLEN/2;
+		Regions[2].rg_size = DUMMY_STRLEN / 2;
 		Regions[2].rg_flags = DM_REGION_READ;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1775,20 +2209,31 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1799,7 +2244,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1815,18 +2262,23 @@
 		/* Variation set up */
 		numRegions = 1;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
 		Regions[0].rg_flags = DM_REGION_NOEVENT;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1837,10 +2289,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			rc = read(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1851,7 +2309,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1874,11 +2334,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd1 = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd1 =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd1 == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1890,20 +2355,31 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "read(%s)\n", DummyFile);
 			fd2 = open(DummyFile, O_RDWR);
 			rc = fd2 == -1 ? -1 : read(fd2, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1915,7 +2391,9 @@
 			rc |= close(fd2);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1938,11 +2416,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1955,20 +2438,31 @@
 			eventPending = 1;
 			rc = read(fd, buf, DUMMY_STRLEN);
 			eventPending = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "read(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1979,7 +2473,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2005,11 +2501,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT | O_NONBLOCK, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT | O_NONBLOCK,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2022,20 +2523,30 @@
 			eventPending = 1;
 			rc = read(fd, buf, DUMMY_STRLEN);
 			eventPending = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, EAGAIN, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "read(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, EAGAIN, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2046,7 +2557,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2066,11 +2579,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2082,10 +2600,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2096,7 +2619,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2119,11 +2644,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2135,20 +2665,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2159,7 +2699,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2182,11 +2724,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2198,21 +2745,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2223,7 +2781,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2246,11 +2806,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2262,10 +2827,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2276,7 +2846,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2299,11 +2871,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2315,10 +2892,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2329,7 +2911,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2356,14 +2940,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2375,20 +2964,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2399,7 +2998,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2426,14 +3027,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2445,21 +3051,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2470,7 +3087,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2496,11 +3115,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2512,10 +3136,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2526,7 +3155,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2553,14 +3184,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2222, SEEK_SET)) != 2222) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2222) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2572,10 +3208,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "write(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2586,7 +3228,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2616,14 +3260,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 4444, SEEK_SET)) != 4444) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 4444) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2635,20 +3284,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2659,7 +3318,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2689,14 +3350,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 4444, SEEK_SET)) != 4444) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 4444) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2708,21 +3374,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2733,7 +3410,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2763,14 +3442,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 3333, SEEK_SET)) != 3333) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 3333) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2782,10 +3466,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2796,7 +3485,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2826,14 +3517,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2997, SEEK_SET)) != 2997) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2997) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2845,20 +3541,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2869,7 +3575,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2899,14 +3607,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2997, SEEK_SET)) != 2997) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2997) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2918,21 +3631,32 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -2943,7 +3667,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2967,14 +3693,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -2986,10 +3717,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3000,7 +3736,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3024,14 +3762,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3043,20 +3786,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3067,7 +3820,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3091,14 +3846,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3110,20 +3870,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3134,7 +3904,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3150,7 +3922,7 @@
 
 		/* Variation set up */
 		numRegions = 1;
-		Regions[0].rg_offset = DUMMY_STRLEN+1;
+		Regions[0].rg_offset = DUMMY_STRLEN + 1;
 		Regions[0].rg_size = 1;
 		Regions[0].rg_flags = DM_REGION_WRITE;
 
@@ -3158,14 +3930,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3177,10 +3954,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3191,7 +3973,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3214,11 +3998,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3230,10 +4019,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3244,7 +4038,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3268,14 +4064,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3287,20 +4088,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3311,7 +4122,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3335,14 +4148,20 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, DUMMY_STRLEN, SEEK_SET)) != DUMMY_STRLEN) {
+		} else if ((off = lseek(fd, DUMMY_STRLEN, SEEK_SET)) !=
+			   DUMMY_STRLEN) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3354,20 +4173,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3378,7 +4207,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3402,14 +4233,20 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, DUMMY_STRLEN+1, SEEK_SET)) != DUMMY_STRLEN+1) {
+		} else if ((off = lseek(fd, DUMMY_STRLEN + 1, SEEK_SET)) !=
+			   DUMMY_STRLEN + 1) {
 			close(fd);
 			remove(DummyFile);
 		}
-		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN+1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (rc == -1 || fd == -1 || off != DUMMY_STRLEN + 1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3421,10 +4258,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3435,7 +4277,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3458,11 +4302,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3474,10 +4323,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3488,7 +4342,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3512,14 +4368,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 1, SEEK_SET)) != 1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3531,20 +4392,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3555,7 +4426,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3579,14 +4452,19 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((off = lseek(fd, 2, SEEK_SET)) != 2) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1 || off != 2) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3598,10 +4476,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(1, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(1, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3612,7 +4495,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3628,18 +4513,24 @@
 		/* Variation set up */
 		numRegions = 1;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
-		Regions[0].rg_flags = DM_REGION_READ|DM_REGION_WRITE|DM_REGION_TRUNCATE;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
+		Regions[0].rg_flags =
+		    DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3651,20 +4542,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3675,7 +4576,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3691,24 +4594,29 @@
 		/* Variation set up */
 		numRegions = 3;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
 		Regions[0].rg_flags = DM_REGION_READ;
 		Regions[1].rg_offset = 0;
-		Regions[1].rg_size = DUMMY_STRLEN/2;
+		Regions[1].rg_size = DUMMY_STRLEN / 2;
 		Regions[1].rg_flags = DM_REGION_TRUNCATE;
 		Regions[2].rg_offset = 0;
-		Regions[2].rg_size = DUMMY_STRLEN/2;
+		Regions[2].rg_size = DUMMY_STRLEN / 2;
 		Regions[2].rg_flags = DM_REGION_WRITE;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3720,20 +4628,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3744,7 +4662,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3760,18 +4680,23 @@
 		/* Variation set up */
 		numRegions = 1;
 		Regions[0].rg_offset = 0;
-		Regions[0].rg_size = DUMMY_STRLEN/2;
+		Regions[0].rg_size = DUMMY_STRLEN / 2;
 		Regions[0].rg_flags = DM_REGION_NOEVENT;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3783,10 +4708,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3797,7 +4727,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3821,14 +4753,22 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, TMP_FILELEN+DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN+DUMMY_STRLEN) {
+		} else
+		    if ((off =
+			 lseek(fd, TMP_FILELEN + DUMMY_STRLEN,
+			       SEEK_SET)) != TMP_FILELEN + DUMMY_STRLEN) {
 			close(fd);
 			remove(DummyFile);
 		}
-		if (rc == -1 || fd == -1 || off != TMP_FILELEN+DUMMY_STRLEN) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (rc == -1 || fd == -1 || off != TMP_FILELEN + DUMMY_STRLEN) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3840,20 +4780,30 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
-				} else if (offset != TMP_FILELEN+DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+				} else if (offset != TMP_FILELEN + DUMMY_STRLEN) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3864,7 +4814,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3888,14 +4840,22 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((off = lseek(fd, TMP_FILELEN+DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN+DUMMY_STRLEN) {
+		} else
+		    if ((off =
+			 lseek(fd, TMP_FILELEN + DUMMY_STRLEN,
+			       SEEK_SET)) != TMP_FILELEN + DUMMY_STRLEN) {
 			close(fd);
 			remove(DummyFile);
 		}
-		if (rc == -1 || fd == -1 || off != TMP_FILELEN+DUMMY_STRLEN) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (rc == -1 || fd == -1 || off != TMP_FILELEN + DUMMY_STRLEN) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3907,10 +4867,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			rc = write(fd, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3921,7 +4886,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -3944,11 +4911,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd1 = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd1 =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd1 == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3961,20 +4933,30 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "write(%s)\n", DummyFile);
 			fd2 = open(DummyFile, O_RDWR);
 			rc = fd2 == -1 ? -1 : write(fd2, buf, DUMMY_STRLEN);
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -3986,7 +4968,9 @@
 			rc |= close(fd2);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4009,11 +4993,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4027,20 +5016,30 @@
 			eventPending = 1;
 			rc = write(fd, buf, DUMMY_STRLEN);
 			eventPending = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(DUMMY_STRLEN, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4051,7 +5050,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4074,11 +5075,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT | O_NONBLOCK, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT | O_NONBLOCK,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4092,20 +5098,30 @@
 			eventPending = 1;
 			rc = write(fd, buf, DUMMY_STRLEN);
 			eventPending = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, EAGAIN, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "write(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, EAGAIN, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				} else if (length != DUMMY_STRLEN) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", length, DUMMY_STRLEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    length, DUMMY_STRLEN);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4116,7 +5132,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4136,11 +5154,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4152,10 +5175,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 5000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4166,7 +5194,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4189,11 +5219,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4205,17 +5240,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 5000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 5000) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 5000);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 5000);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4226,7 +5269,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4249,11 +5294,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4265,18 +5315,27 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 5000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 5000) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 5000);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 5000);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4287,7 +5346,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4310,11 +5371,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4326,10 +5392,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 5000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4340,7 +5411,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4363,11 +5436,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4379,10 +5457,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 5000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4393,7 +5476,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4419,11 +5504,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4435,17 +5525,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2222);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4456,7 +5554,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4482,11 +5582,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4498,18 +5603,27 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2222);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2222) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2222);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2222);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4520,7 +5634,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4546,11 +5662,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4562,10 +5683,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 0);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4576,7 +5702,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4602,11 +5730,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4618,10 +5751,16 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2222);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d, buffer contents [%.*s]\n", DummyFile, rc, DUMMY_STRLEN, buf);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "ftruncate(%s) returned %d, buffer contents [%.*s]\n",
+				    DummyFile, rc, DUMMY_STRLEN, buf);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4632,7 +5771,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4661,11 +5802,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4677,17 +5823,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 4444);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4698,7 +5852,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4727,11 +5883,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4743,18 +5904,27 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 4444);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 4444) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 4444);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 4444);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4765,7 +5935,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4794,11 +5966,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4810,10 +5987,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 6000);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4824,7 +6006,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4853,11 +6037,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4869,17 +6058,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2997);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4890,7 +6087,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4918,11 +6117,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4933,18 +6137,27 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2997);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 2997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -4955,7 +6168,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -4983,11 +6198,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -4998,17 +6218,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 1997);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5019,7 +6247,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5047,11 +6277,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5062,18 +6297,27 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 1997);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
 			eventResponse = DM_RESP_CONTINUE;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1997) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5084,7 +6328,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5106,11 +6352,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5121,17 +6372,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 0);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 2997);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 2997);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5142,7 +6401,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5164,11 +6425,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5179,17 +6445,25 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 1);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 1) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5200,7 +6474,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5222,11 +6498,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5237,10 +6518,15 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
 			rc = ftruncate(fd, 2);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5251,7 +6537,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5267,17 +6555,23 @@
 		numRegions = 1;
 		Regions[0].rg_offset = 0;
 		Regions[0].rg_size = DUMMY_STRLEN;
-		Regions[0].rg_flags = DM_REGION_READ|DM_REGION_WRITE|DM_REGION_TRUNCATE;
+		Regions[0].rg_flags =
+		    DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE;
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5287,18 +6581,26 @@
 			eventResponse = DM_RESP_CONTINUE;
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
-			rc = ftruncate(fd, DUMMY_STRLEN/2);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			rc = ftruncate(fd, DUMMY_STRLEN / 2);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
-				} else if (offset != DUMMY_STRLEN/2) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+				} else if (offset != DUMMY_STRLEN / 2) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5309,7 +6611,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5337,11 +6641,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5351,18 +6660,26 @@
 			eventResponse = DM_RESP_CONTINUE;
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
-			rc = ftruncate(fd, DUMMY_STRLEN/2);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			rc = ftruncate(fd, DUMMY_STRLEN / 2);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
-				} else if (offset != DUMMY_STRLEN/2) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 0);
+				} else if (offset != DUMMY_STRLEN / 2) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 0);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5373,7 +6690,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5395,11 +6714,16 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5409,11 +6733,16 @@
 			eventResponse = DM_RESP_CONTINUE;
 
 			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s)\n", DummyFile);
-			rc = ftruncate(fd, DUMMY_STRLEN/2);
-			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			rc = ftruncate(fd, DUMMY_STRLEN / 2);
+			DMLOG_PRINT(DMLVL_DEBUG, "ftruncate(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5424,7 +6753,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5446,7 +6777,9 @@
 		EVENT_DELIVERY_DELAY;
 		rc = system(command);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5455,20 +6788,31 @@
 			eventReceived = DM_EVENT_INVALID;
 			eventResponse = DM_RESP_CONTINUE;
 
-			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC)\n", DummyFile);
-			fd = open(DummyFile, O_RDWR | O_CREAT | O_TRUNC, DUMMY_FILE_RW_MODE);
-			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC) returned %d\n", DummyFile, fd);
+			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC)\n",
+				    DummyFile);
+			fd = open(DummyFile, O_RDWR | O_CREAT | O_TRUNC,
+				  DUMMY_FILE_RW_MODE);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "open(%s, O_TRUNC) returned %d\n",
+				    DummyFile, fd);
 			rc = fd == -1 ? -1 : 0;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 5000);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 5000);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5479,7 +6823,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5501,7 +6847,9 @@
 		EVENT_DELIVERY_DELAY;
 		rc = system(command);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5510,20 +6858,31 @@
 			eventReceived = DM_EVENT_INVALID;
 			eventResponse = DM_RESP_CONTINUE;
 
-			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC)\n", DummyFile);
-			fd = open(DummyFile, O_RDWR | O_CREAT | O_TRUNC, DUMMY_FILE_RW_MODE);
-			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC) returned %d\n", DummyFile, fd);
+			DMLOG_PRINT(DMLVL_DEBUG, "open(%s, O_TRUNC)\n",
+				    DummyFile);
+			fd = open(DummyFile, O_RDWR | O_CREAT | O_TRUNC,
+				  DUMMY_FILE_RW_MODE);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "open(%s, O_TRUNC) returned %d\n",
+				    DummyFile, fd);
 			rc = fd == -1 ? -1 : 0;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 5000);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 5000);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5534,7 +6893,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -5556,7 +6917,9 @@
 		EVENT_DELIVERY_DELAY;
 		rc = system(command);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5567,18 +6930,26 @@
 
 			DMLOG_PRINT(DMLVL_DEBUG, "creat(%s)\n", DummyFile);
 			fd = creat(DummyFile, S_IRWXU);
-			DMLOG_PRINT(DMLVL_DEBUG, "creat(%s) returned %d\n", DummyFile, fd);
+			DMLOG_PRINT(DMLVL_DEBUG, "creat(%s) returned %d\n",
+				    DummyFile, fd);
 			rc = fd == -1 ? -1 : 0;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
-			        if (rc != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Handles NOT same!\n");
+				if (rc != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Handles NOT same!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (offset != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", offset, 5000);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    offset, 5000);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -5589,21 +6960,26 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	remove(DUMMY_FILE);
@@ -5630,16 +7006,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -5648,26 +7029,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -5679,9 +7073,12 @@
 			DMEV_SET(DM_EVENT_READ, events);
 			DMEV_SET(DM_EVENT_WRITE, events);
 			DMEV_SET(DM_EVENT_TRUNCATE, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -5689,16 +7086,21 @@
 			DMEV_CLR(DM_EVENT_READ, events);
 			DMEV_CLR(DM_EVENT_WRITE, events);
 			DMEV_CLR(DM_EVENT_TRUNCATE, events);
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -5706,25 +7108,42 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -5733,27 +7152,39 @@
 		} else if (type == DM_EVENT_POSTCREATE) {
 			/* SPECIAL CASE: need to set regions (if any) and response */
 			dm_boolean_t exactflag;
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			int retcode = nse->ne_retcode;
 			hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
 			hlen2 = DM_GET_LEN(nse, ne_handle2);
 			strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTCREATE\n");
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_POSTCREATE\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle: %p\n", hanp2);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n", hlen2);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n",
+				    hlen2);
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", retcode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    retcode);
 
 			if ((retcode == 0) && (numRegions > 0)) {
-				rc = dm_set_region(sid, hanp2, hlen2, DM_NO_TOKEN, numRegions, Regions, &exactflag);
+				rc = dm_set_region(sid, hanp2, hlen2,
+						   DM_NO_TOKEN, numRegions,
+						   Regions, &exactflag);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "dm_set_region failed! (rc = %d, errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_set_region failed! (rc = %d, errno = %d)\n",
+						    rc, errno);
 				} else {
-					DMLOG_PRINT(DMLVL_DEBUG, "dm_set_regions succesfully set %d region(s)\n", numRegions);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "dm_set_regions succesfully set %d region(s)\n",
+						    numRegions);
 				}
 			}
 
@@ -5765,96 +7196,137 @@
 
 			switch (type) {
 			case DM_EVENT_READ:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				dm_timestruct_t delay;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					dm_timestruct_t delay;
 
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_READ\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_READ\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				if (eventPending) {
-					rc = dm_pending(sid, token, &delay);
-					DMLOG_PRINT(DMLVL_DEBUG, "pending returned %d\n", rc);
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
+					if (eventPending) {
+						rc = dm_pending(sid, token,
+								&delay);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "pending returned %d\n",
+							    rc);
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+					}
+
+					break;
 				}
 
-				break;
-			}
-
 			case DM_EVENT_WRITE:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				dm_timestruct_t delay;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					dm_timestruct_t delay;
 
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_WRITE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_WRITE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				if (eventPending) {
-					rc = dm_pending(sid, token, &delay);
-					DMLOG_PRINT(DMLVL_DEBUG, "pending returned %d\n", rc);
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
+					if (eventPending) {
+						rc = dm_pending(sid, token,
+								&delay);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "pending returned %d\n",
+							    rc);
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+					}
+
+					break;
 				}
 
-				break;
-			}
-
 			case DM_EVENT_TRUNCATE:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				dm_timestruct_t delay;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					dm_timestruct_t delay;
 
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_TRUNCATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_TRUNCATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
 
-				if (eventPending) {
-					rc = dm_pending(sid, token, &delay);
-					DMLOG_PRINT(DMLVL_DEBUG, "pending returned %d\n", rc);
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
-					EVENT_DELIVERY_DELAY;
+					if (eventPending) {
+						rc = dm_pending(sid, token,
+								&delay);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "pending returned %d\n",
+							    rc);
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+						EVENT_DELIVERY_DELAY;
+					}
+
+					break;
 				}
 
-				break;
-			}
-
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/event_sn.c b/testcases/kernel/fs/dmapi/event_sn.c
index 0580534..34031b5 100644
--- a/testcases/kernel/fs/dmapi/event_sn.c
+++ b/testcases/kernel/fs/dmapi/event_sn.c
@@ -65,8 +65,8 @@
 {
 
 	char *varstr;
-	int   rc;
-	int   varStatus;
+	int rc;
+	int varStatus;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -78,21 +78,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -109,7 +123,8 @@
 		rmdir(DummySubdir2);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI synchronous namespace event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI synchronous namespace event tests\n");
 
 	/*
 	 * TEST    : mkdir - DM_RESP_CONTINUE
@@ -127,17 +142,25 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s)\n", DummySubdir);
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir, rc);
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir,
+			    rc);
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    name1, DUMMY_SUBDIR);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -147,7 +170,9 @@
 		EVENT_DELIVERY_DELAY;
 		rc = rmdir(DummySubdir);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -167,17 +192,25 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s)\n", DummySubdir);
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir, rc);
-		if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		DMLOG_PRINT(DMLVL_DEBUG, "mkdir(%s) returned %d\n", DummySubdir,
+			    rc);
+		if ((varStatus =
+		     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			rc = dm_handle_to_ino(hanp1, hlen1, &ino);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    name1, DUMMY_SUBDIR);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -200,24 +233,34 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s)\n", DummySubdir);
 			rc = rmdir(DummySubdir);
-			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n", DummySubdir, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n",
+				    DummySubdir, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -241,7 +284,9 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -249,17 +294,26 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s)\n", DummySubdir);
 			rc = rmdir(DummySubdir);
-			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n", DummySubdir, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "rmdir(%s) returned %d\n",
+				    DummySubdir, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -270,7 +324,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -290,34 +346,53 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, hanp2, hlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -327,7 +402,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -347,35 +424,54 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummySubdir, DummySubdir2, rc);
-			if ((varStatus = (rc == 0 ? DMSTAT_FAIL : DMSTAT_PASS)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
+			if ((varStatus =
+			     (rc == 0 ? DMSTAT_FAIL : DMSTAT_PASS)) ==
+			    DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, hanp2, hlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -386,7 +482,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -405,27 +503,41 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = symlink(DummySubdir, DummySubdir2);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummySubdir, DummySubdir2, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DummySubdir) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", name2, DummySubdir);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    name2, DummySubdir);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -436,7 +548,9 @@
 			rc = unlink(DummySubdir2);
 			rc |= rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -455,29 +569,44 @@
 		EVENT_DELIVERY_DELAY;
 		rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummySubdir, DummySubdir2);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n",
+				    DummySubdir, DummySubdir2);
 			rc = symlink(DummySubdir, DummySubdir2);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummySubdir, DummySubdir2, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n",
+				    DummySubdir, DummySubdir2, rc);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_SUBDIR2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", name1, DUMMY_SUBDIR2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_SUBDIR2);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DummySubdir) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", name2, DummySubdir);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    name2, DummySubdir);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -488,7 +617,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -510,33 +641,47 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir,
+				    DummyLink);
 			rc = link(DummySubdir, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummySubdir, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummySubdir, DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino3);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino3) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%lld vs %lld)\n", ino2, ino3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%lld vs %lld)\n",
+						    ino2, ino3);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -547,12 +692,15 @@
 			rc = rmdir(DummySubdir);
 			rc |= unlink(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with DIRECTORY_LINKS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with DIRECTORY_LINKS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -574,34 +722,49 @@
 		EVENT_DELIVERY_DELAY;
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummySubdir,
+				    DummyLink);
 			rc = link(DummySubdir, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummySubdir, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummySubdir, DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino3);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino3) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%lld vs %lld)\n", ino2, ino3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%lld vs %lld)\n",
+						    ino2, ino3);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -612,12 +775,15 @@
 			EVENT_DELIVERY_DELAY;
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with DIRECTORY_LINKS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with DIRECTORY_LINKS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -639,18 +805,26 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "open(%s)\n", DummyFile);
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile, fd);
+		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile,
+			    fd);
 		rc = (fd == -1) ? -1 : 0;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			rc = dm_handle_to_ino(hanp1, hlen1, &ino);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, DUMMY_FILE) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s %s)\n", name1, DUMMY_SUBDIR);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s %s)\n",
+					    name1, DUMMY_SUBDIR);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -661,7 +835,9 @@
 		rc = close(fd);
 		rc |= remove(DummyFile);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -682,17 +858,25 @@
 		EVENT_DELIVERY_DELAY;
 		DMLOG_PRINT(DMLVL_DEBUG, "open(%s)\n", DummyFile);
 		fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile, fd);
-		if ((varStatus = DMVAR_CHKFAILEXP(-1, fd, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		DMLOG_PRINT(DMLVL_DEBUG, "open(%s) returned %d\n", DummyFile,
+			    fd);
+		if ((varStatus =
+		     DMVAR_CHKFAILEXP(-1, fd, ABORT_ERRNO, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-		        if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+			if (rc == -1) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Unable to obtain inode!\n");
 				varStatus = DMSTAT_FAIL;
 			} else if (ino != ROOT_INODE) {
-				DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Parent handle NOT root! (%lld vs %d)\n",
+					    ino, ROOT_INODE);
 				varStatus = DMSTAT_FAIL;
 			} else if (strcmp(name1, DUMMY_FILE) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Entry name NOT correct! (%s vs %s)\n",
+					    name1, DUMMY_FILE);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -714,28 +898,40 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s)\n", DummyFile);
 			rc = remove(DummyFile);
-			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -758,11 +954,15 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -770,17 +970,26 @@
 			EVENT_DELIVERY_DELAY;
 			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s)\n", DummyFile);
 			rc = remove(DummyFile);
-			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n", DummyFile, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "remove(%s) returned %d\n",
+				    DummyFile, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -791,7 +1000,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -810,38 +1021,59 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummyFile2);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummyFile2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummyFile2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummyFile2, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummyFile2, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, hanp2, hlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DUMMY_FILE2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE2);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -851,7 +1083,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -870,39 +1104,60 @@
 		eventResponse = DM_RESP_CONTINUE;
 		sprintf(command, "mv %s %s", DummyFile, DummyFile2);
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n", DummyFile, DummyFile2);
+			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s)\n",
+				    DummyFile, DummyFile2);
 			rc = system(command);
-			DMLOG_PRINT(DMLVL_DEBUG, "system(mv %s %s) returned %d\n", DummyFile, DummyFile2, rc);
-			if ((varStatus = (rc == 0 ? DMSTAT_FAIL : DMSTAT_PASS)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "system(mv %s %s) returned %d\n", DummyFile,
+				    DummyFile2, rc);
+			if ((varStatus =
+			     (rc == 0 ? DMSTAT_FAIL : DMSTAT_PASS)) ==
+			    DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "New parent handle NOT root! (%lld vs %d)\n", ino2, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New parent handle NOT root! (%lld vs %d)\n",
+						    ino2, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
-				} else if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old parent handle NOT equal to new parent handle!\n");
+				} else
+				    if (dm_handle_cmp
+					(hanp1, hlen1, hanp2, hlen2) != 0) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old parent handle NOT equal to new parent handle!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_FILE) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Old entry name NOT correct! (%s vs %s)\n", name1, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Old entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_FILE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DUMMY_FILE2) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "New entry name NOT correct! (%s vs %s)\n", name2, DUMMY_FILE2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "New entry name NOT correct! (%s vs %s)\n",
+						    name2, DUMMY_FILE2);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -913,7 +1168,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -931,31 +1188,47 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = symlink(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n", DummyFile,
+				    DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DummyFile) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", name2, DummyFile);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    name2, DummyFile);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -966,7 +1239,9 @@
 			rc = unlink(DummyLink);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -984,32 +1259,49 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = symlink(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "symlink(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "symlink(%s, %s) returned %d\n", DummyFile,
+				    DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino);
 				if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name2, DummyFile) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Symlink contents NOT correct! (%s vs %s)\n", name2, DummyFile);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Symlink contents NOT correct! (%s vs %s)\n",
+						    name2, DummyFile);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1020,7 +1312,9 @@
 			EVENT_DELIVERY_DELAY;
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1040,35 +1334,50 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = link(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummyFile, DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino3);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino3) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%lld vs %lld)\n", ino2, ino3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%lld vs %lld)\n",
+						    ino2, ino3);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1080,7 +1389,9 @@
 			rc |= remove(DummyFile);
 			rc |= remove(DummyLink);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1101,36 +1412,52 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		EVENT_DELIVERY_DELAY;
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			eventResponse = DM_RESP_ABORT;
 			EVENT_DELIVERY_DELAY;
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile, DummyLink);
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s)\n", DummyFile,
+				    DummyLink);
 			rc = link(DummyFile, DummyLink);
-			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n", DummyFile, DummyLink, rc);
-			if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			DMLOG_PRINT(DMLVL_DEBUG, "link(%s, %s) returned %d\n",
+				    DummyFile, DummyLink, rc);
+			if ((varStatus =
+			     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO,
+					      eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				rc = dm_handle_to_ino(hanp1, hlen1, &ino1);
 				rc |= dm_handle_to_ino(hanp2, hlen2, &ino2);
 				rc |= dm_handle_to_ino(hanp, hlen, &ino3);
-			        if (rc == -1) {
-					DMLOG_PRINT(DMLVL_ERR, "Unable to obtain inode!\n");
+				if (rc == -1) {
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Unable to obtain inode!\n");
 					varStatus = DMSTAT_FAIL;
 				} else if (ino1 != ROOT_INODE) {
-					DMLOG_PRINT(DMLVL_ERR, "Parent handle NOT root! (%lld vs %d)\n", ino1, ROOT_INODE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Parent handle NOT root! (%lld vs %d)\n",
+						    ino1, ROOT_INODE);
 					varStatus = DMSTAT_FAIL;
 				} else if (ino2 != ino3) {
-					DMLOG_PRINT(DMLVL_ERR, "Source link handle NOT correct! (%lld vs %lld)\n", ino2, ino3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Source link handle NOT correct! (%lld vs %lld)\n",
+						    ino2, ino3);
 					varStatus = DMSTAT_FAIL;
 				} else if (strcmp(name1, DUMMY_LINK) != 0) {
-					DMLOG_PRINT(DMLVL_ERR, "Target entry name NOT correct! (%s vs %s)\n", name1, DUMMY_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Target entry name NOT correct! (%s vs %s)\n",
+						    name1, DUMMY_LINK);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1142,7 +1469,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1150,14 +1479,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -1182,15 +1514,20 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1199,26 +1536,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1232,23 +1582,31 @@
 			DMEV_SET(DM_EVENT_RENAME, events);
 			DMEV_SET(DM_EVENT_SYMLINK, events);
 			DMEV_SET(DM_EVENT_LINK, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1256,25 +1614,42 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -1286,108 +1661,201 @@
 
 			switch (type) {
 			case DM_EVENT_CREATE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				mode = nse->ne_mode;
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					mode = nse->ne_mode;
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_CREATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", mode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_CREATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    mode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_REMOVE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				mode = nse->ne_mode;
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					mode = nse->ne_mode;
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_REMOVE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", mode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_REMOVE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    mode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_RENAME:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				hlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(name2, DM_GET_VALUE(nse, ne_name2, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					hanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					hlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(name2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_RENAME\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle: %p\n", hanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New parent handle length: %d\n", hlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Old entry name: %s\n", name1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  New entry name: %s\n", name2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_RENAME\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle: %p\n",
+						    hanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New parent handle length: %d\n",
+						    hlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Old entry name: %s\n",
+						    name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  New entry name: %s\n",
+						    name2);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_SYMLINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1 = DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
-				strcpy(name2, DM_GET_VALUE(nse, ne_name2, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
+					strcpy(name2,
+					       DM_GET_VALUE(nse, ne_name2,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_SYMLINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink entry name: %s\n", name1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Symlink contents: %s\n", name2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_SYMLINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink entry name: %s\n",
+						    name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Symlink contents: %s\n",
+						    name2);
 
-				break;
-			}
+					break;
+				}
 
 			case DM_EVENT_LINK:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
-				hanp1= DM_GET_VALUE(nse, ne_handle1, void *);
-				hlen1 = DM_GET_LEN(nse, ne_handle1);
-				hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
-				hlen2 = DM_GET_LEN(nse, ne_handle2);
-				strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(nse, ne_handle1,
+							 void *);
+					hlen1 = DM_GET_LEN(nse, ne_handle1);
+					hanp2 =
+					    DM_GET_VALUE(nse, ne_handle2,
+							 void *);
+					hlen2 = DM_GET_LEN(nse, ne_handle2);
+					strcpy(name1,
+					       DM_GET_VALUE(nse, ne_name1,
+							    char *));
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_LINK\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle: %p\n", hanp2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Source link handle length: %d\n", hlen2);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Target entry name: %s\n", name1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_LINK\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle: %p\n",
+						    hanp2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Source link handle length: %d\n",
+						    hlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Target entry name: %s\n",
+						    name1);
 
-				break;
-			}
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/event_us.c b/testcases/kernel/fs/dmapi/event_us.c
index 02672a0..46925fe 100644
--- a/testcases/kernel/fs/dmapi/event_us.c
+++ b/testcases/kernel/fs/dmapi/event_us.c
@@ -63,8 +63,8 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   rc;
-	int   varStatus;
+	int rc;
+	int varStatus;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -76,34 +76,51 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
-		rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_MESSAGE_DATA, &maxMsgDat);
+		rc = dm_get_config(fshanp, fshlen, DM_CONFIG_MAX_MESSAGE_DATA,
+				   &maxMsgDat);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_config failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_config failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			umount(mountPt);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI user event tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI user event tests\n");
 
 	szFuncName = "dm_create_userevent";
 
@@ -119,7 +136,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-		rc = dm_create_userevent(INVALID_ADDR, MSG_DATALEN, buf, &token);
+		rc = dm_create_userevent(INVALID_ADDR, MSG_DATALEN, buf,
+					 &token);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -137,7 +155,7 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid msglen)\n", szFuncName);
-		rc = dm_create_userevent(sid, maxMsgDat+1, buf, &token);
+		rc = dm_create_userevent(sid, maxMsgDat + 1, buf, &token);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 		/* Variation clean up */
@@ -154,7 +172,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid msgdatap)\n", szFuncName);
-		rc = dm_create_userevent(sid, MSG_DATALEN, (void *)INVALID_ADDR, &token);
+		rc = dm_create_userevent(sid, MSG_DATALEN, (void *)INVALID_ADDR,
+					 &token);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -173,7 +192,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid tokenp)\n", szFuncName);
-		rc = dm_create_userevent(sid, MSG_DATALEN, buf, (dm_token_t *)INVALID_ADDR);
+		rc = dm_create_userevent(sid, MSG_DATALEN, buf,
+					 (dm_token_t *) INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -198,7 +218,9 @@
 		/* Variation clean up */
 		rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -214,7 +236,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-		rc = dm_create_userevent(DM_NO_SESSION, MSG_DATALEN, buf, &token);
+		rc = dm_create_userevent(DM_NO_SESSION, MSG_DATALEN, buf,
+					 &token);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -233,7 +256,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targetsid)\n", szFuncName);
-		rc = dm_send_msg(INVALID_ADDR, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
+		rc = dm_send_msg(INVALID_ADDR, DM_MSGTYPE_SYNC, MSG_DATALEN,
+				 buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -267,7 +291,7 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, maxMsgDat+1, buf);
+		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, maxMsgDat + 1, buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 		/* Variation clean up */
@@ -282,7 +306,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, (void *)INVALID_ADDR);
+		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN,
+				 (void *)INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -304,16 +329,25 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(continue response)\n", szFuncName);
 		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			if (tokenReceived == 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Token NOT correct! (%d vs non-zero)\n", tokenReceived);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Token NOT correct! (%d vs non-zero)\n",
+					    tokenReceived);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (msgDataLenReceived != MSG_DATALEN) {
-				DMLOG_PRINT(DMLVL_ERR, "Message lengths NOT same! (%d vs %d)\n", msgDataLenReceived, MSG_DATALEN);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message lengths NOT same! (%d vs %d)\n",
+					    msgDataLenReceived, MSG_DATALEN);
 				varStatus = DMSTAT_FAIL;
-			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Message data NOT same! (%s vs %s)\n", msgDataReceived, buf);
+			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) !=
+				   0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message data NOT same! (%s vs %s)\n",
+					    msgDataReceived, buf);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -341,16 +375,25 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(abort response)\n", szFuncName);
 		rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
-		if ((varStatus = DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKFAILEXP(-1, rc, ABORT_ERRNO, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			if (tokenReceived == 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Token NOT correct! (%d vs non-zero)\n", tokenReceived);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Token NOT correct! (%d vs non-zero)\n",
+					    tokenReceived);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (msgDataLenReceived != MSG_DATALEN) {
-				DMLOG_PRINT(DMLVL_ERR, "Message lengths NOT same! (%d vs %d)\n", msgDataLenReceived, MSG_DATALEN);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message lengths NOT same! (%d vs %d)\n",
+					    msgDataLenReceived, MSG_DATALEN);
 				varStatus = DMSTAT_FAIL;
-			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Message data NOT same! (%s vs %s)\n", msgDataReceived, buf);
+			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) !=
+				   0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message data NOT same! (%s vs %s)\n",
+					    msgDataReceived, buf);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -376,16 +419,25 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_MSGTYPE_ASYNC)\n", szFuncName);
 		rc = dm_send_msg(sid, DM_MSGTYPE_ASYNC, MSG_DATALEN, buf);
 		EVENT_DELIVERY_DELAY;
-		if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+		if ((varStatus =
+		     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+				      eventReceived)) == DMSTAT_PASS) {
 			if (tokenReceived != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Token NOT correct! (%d vs %d)\n", tokenReceived, 0);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Token NOT correct! (%d vs %d)\n",
+					    tokenReceived, 0);
 				varStatus = DMSTAT_FAIL;
 			}
 			if (msgDataLenReceived != MSG_DATALEN) {
-				DMLOG_PRINT(DMLVL_ERR, "Message lengths NOT same! (%d vs %d)\n", msgDataLenReceived, MSG_DATALEN);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message lengths NOT same! (%d vs %d)\n",
+					    msgDataLenReceived, MSG_DATALEN);
 				varStatus = DMSTAT_FAIL;
-			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "Message data NOT same! (%s vs %s)\n", msgDataReceived, buf);
+			} else if (memcmp(msgDataReceived, buf, MSG_DATALEN) !=
+				   0) {
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Message data NOT same! (%s vs %s)\n",
+					    msgDataReceived, buf);
 				varStatus = DMSTAT_FAIL;
 			}
 		}
@@ -404,8 +456,10 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION targetsid)\n", szFuncName);
-		rc = dm_send_msg(DM_NO_SESSION, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION targetsid)\n",
+			    szFuncName);
+		rc = dm_send_msg(DM_NO_SESSION, DM_MSGTYPE_SYNC, MSG_DATALEN,
+				 buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -426,18 +480,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_find_eventmsg(INVALID_ADDR, token, MSG_DATALEN, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(INVALID_ADDR, token, MSG_DATALEN,
+					      buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -455,18 +516,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_find_eventmsg(sid, INVALID_ADDR, MSG_DATALEN, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(sid, INVALID_ADDR, MSG_DATALEN,
+					      buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -484,35 +552,56 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_find_eventmsg(sid, token, MSG_DATALEN-1, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(sid, token, MSG_DATALEN - 1, buf,
+					      &rlen);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-					if (rlen == MSG_DATALEN+sizeof(dm_eventmsg_t)) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d, expected errno = %d, and expected rlen = %d\n", szFuncName, rc, errno, rlen);
+					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n",
+						    rlen);
+					if (rlen ==
+					    MSG_DATALEN +
+					    sizeof(dm_eventmsg_t)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d, expected errno = %d, and expected rlen = %d\n",
+							    szFuncName, rc,
+							    errno, rlen);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n", szFuncName, rc, errno, rlen, MSG_DATALEN);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n",
+							    szFuncName, rc,
+							    errno, rlen,
+							    MSG_DATALEN);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -530,18 +619,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_find_eventmsg(sid, token, MSG_DATALEN, (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(sid, token, MSG_DATALEN,
+					      (void *)INVALID_ADDR, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -558,18 +654,25 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_find_eventmsg(sid, token, MSG_DATALEN, buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(sid, token, MSG_DATALEN, buf,
+					      (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -580,42 +683,65 @@
 	 */
 	if (DMVAR_EXEC(FIND_EVENTMSG_BASE + 6)) {
 		dm_token_t token;
-		char bufin[MSG_DATALEN], bufout[MSG_DATALEN+sizeof(dm_eventmsg_t)];
+		char bufin[MSG_DATALEN],
+		    bufout[MSG_DATALEN + sizeof(dm_eventmsg_t)];
 		size_t rlen;
 
 		/* Variation set up */
 		memcpy(bufin, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, bufin, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName);
-			rc = dm_find_eventmsg(sid, token, sizeof(bufout), bufout, &rlen);
+			rc = dm_find_eventmsg(sid, token, sizeof(bufout),
+					      bufout, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
-				if (rlen == MSG_DATALEN+sizeof(dm_eventmsg_t)) {
-					if (memcmp(bufin, bufout+sizeof(dm_eventmsg_t), MSG_DATALEN) == 0) {
-				  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d, expected rlen %d, and expected buffer %s\n", szFuncName, rc, rlen, bufout+sizeof(dm_eventmsg_t));
+				if (rlen == MSG_DATALEN + sizeof(dm_eventmsg_t)) {
+					if (memcmp
+					    (bufin,
+					     bufout + sizeof(dm_eventmsg_t),
+					     MSG_DATALEN) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d, expected rlen %d, and expected buffer %s\n",
+							    szFuncName, rc,
+							    rlen,
+							    bufout +
+							    sizeof
+							    (dm_eventmsg_t));
 						DMVAR_PASS();
 					} else {
-				  		DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected rlen %d but expected buffer %s\n", szFuncName, rc, rlen, bufout);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected rlen %d but expected buffer %s\n",
+							    szFuncName, rc,
+							    rlen, bufout);
 						DMVAR_FAIL();
 					}
 				} else {
-			  		DMLOG_PRINT(DMLVL_ERR, "%s passed with expected rc = %d but unexpected rlen %d\n", szFuncName, rc, rlen);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s passed with expected rc = %d but unexpected rlen %d\n",
+						    szFuncName, rc, rlen);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -633,25 +759,33 @@
 		memcpy(buf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, buf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to initialize variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to initialize variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_find_eventmsg(DM_NO_SESSION, token, MSG_DATALEN, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_find_eventmsg(DM_NO_SESSION, token, MSG_DATALEN,
+					      buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	EVENT_DELIVERY_DELAY;
@@ -659,7 +793,9 @@
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -684,16 +820,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -702,29 +843,40 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			fshanp = DM_GET_VALUE(me, me_handle1, void *);
 			fshlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", fshanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", fshlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    fshanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(fshanp, fshlen);
+			bMounted = dm_handle_is_valid(fshanp, fshlen);
 
-    			/*rc = dm_request_right(sid, fshanp, fshlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
-				dm_destroy_session(sid);
-				DM_EXIT();
-			}*/
+			/*rc = dm_request_right(sid, fshanp, fshlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			   if (rc == -1) {
+			   DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+			   dm_destroy_session(sid);
+			   DM_EXIT();
+			   } */
 
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
@@ -733,49 +885,72 @@
 			DMEV_SET(DM_EVENT_ATTRIBUTE, events);
 			DMEV_SET(DM_EVENT_CLOSE, events);
 			DMEV_SET(DM_EVENT_DESTROY, events);
-			rc = dm_set_disp(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &events, DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					      &events, DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			/*rc = dm_release_right(sid, fshanp, fshlen, token);
-			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
-				dm_destroy_session(sid);
-				DM_EXIT();
-			}*/
+			/*rc = dm_release_right(sid, fshanp, fshlen, token);
+			   if (rc == -1) {
+			   DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+			   dm_destroy_session(sid);
+			   DM_EXIT();
+			   } */
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -783,19 +958,25 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_POSTCREATE) {
 			/* SPECIAL CASE: need to save entry info */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			hanp2 = DM_GET_VALUE(nse, ne_handle2, void *);
 			hlen2 = DM_GET_LEN(nse, ne_handle2);
 			strcpy(name1, DM_GET_VALUE(nse, ne_name1, char *));
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_POSTCREATE\n");
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_POSTCREATE\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle: %p\n", hanp2);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n", hlen2);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Entry handle length: %d\n",
+				    hlen2);
 			DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", name1);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 
 			/* No response needed */
 			response = DM_RESP_INVALID;
@@ -803,34 +984,49 @@
 			eventReceived = type;
 			response = eventResponse;
 
-			switch (type)
-		       	{
+			switch (type) {
 			case DM_EVENT_USER:
-			{
-				memcpy(&tokenReceived, &token, sizeof(dm_token_t));
-				msgDataLenReceived = DM_GET_LEN(dmMsg, ev_data);
-				memcpy(msgDataReceived, DM_GET_VALUE(dmMsg, ev_data, char *), msgDataLenReceived);
+				{
+					memcpy(&tokenReceived, &token,
+					       sizeof(dm_token_t));
+					msgDataLenReceived =
+					    DM_GET_LEN(dmMsg, ev_data);
+					memcpy(msgDataReceived,
+					       DM_GET_VALUE(dmMsg, ev_data,
+							    char *),
+					       msgDataLenReceived);
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_USER\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Message length: %d\n", msgDataLenReceived);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Message data: %s\n", msgDataReceived);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_USER\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Message length: %d\n",
+						    msgDataLenReceived);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Message data: %s\n",
+						    msgDataReceived);
 
-				response = eventResponse;
-				break;
-			}
+					response = eventResponse;
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/handle.c b/testcases/kernel/fs/dmapi/handle.c
index c7a1111..3a57c2e 100644
--- a/testcases/kernel/fs/dmapi/handle.c
+++ b/testcases/kernel/fs/dmapi/handle.c
@@ -66,7 +66,7 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   rc;
+	int rc;
 	dm_boolean_t bRC;
 	char *szSessionInfo = "dm_test session info";
 	void *mtpthanp, *curdirhanp;
@@ -76,7 +76,8 @@
 	DMLOG_START();
 
 	if ((mountPt = DMOPT_GET("mtpt")) == NULL) {
-		DMLOG_PRINT(DMLVL_ERR, "Missing mount point, use -mtpt (for example, -mtpt /dmapidir)\n");
+		DMLOG_PRINT(DMLVL_ERR,
+			    "Missing mount point, use -mtpt (for example, -mtpt /dmapidir)\n");
 		DM_EXIT();
 	} else {
 		DMLOG_PRINT(DMLVL_DEBUG, "Mount point is %s\n", mountPt);
@@ -84,17 +85,31 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   != 0) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if (((rc = dm_path_to_handle(mountPt, &mtpthanp, &mtpthlen)) != 0) ||
-	           ((rc = dm_path_to_handle(CURRENT_DIR, &curdirhanp, &curdirhlen)) != 0)) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_path_to_handle failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if (((rc = dm_path_to_handle(mountPt, &mtpthanp, &mtpthlen)) != 0)
+		||
+		((rc =
+		  dm_path_to_handle(CURRENT_DIR, &curdirhanp,
+				    &curdirhlen)) != 0)) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_path_to_handle failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if (dm_handle_cmp(mtpthanp, mtpthlen, curdirhanp, curdirhlen) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "This test case must be run from the root directory of the DMAPI FS (%s)\n", mountPt);
+	} else if (dm_handle_cmp(mtpthanp, mtpthlen, curdirhanp, curdirhlen) !=
+		   0) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "This test case must be run from the root directory of the DMAPI FS (%s)\n",
+			    mountPt);
 		DM_EXIT();
 	} else {
 		sprintf(DummySubdirFile, "%s/%s", mountPt, DUMMY_SUBDIR_FILE);
@@ -113,7 +128,7 @@
 		rmdir(DIR_LEVEL1);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI handle tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI handle tests\n");
 
 	szFuncName = "dm_path_to_handle";
 
@@ -125,8 +140,8 @@
 	 * ignored, which indicated fault)
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 1)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -143,13 +158,14 @@
 	 * EXPECTED: rc = -1, errno = ENOENT
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 2)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in curdir)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in curdir)\n",
+			    szFuncName);
 		rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
@@ -161,21 +177,26 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -184,7 +205,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -195,26 +218,33 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* no clean up */
 		} else if ((rc = link(DUMMY_FILE, DUMMY_LINK)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(DUMMY_LINK, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -224,7 +254,9 @@
 			rc |= remove(DUMMY_FILE);
 			rc |= unlink(DUMMY_LINK);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -235,19 +267,25 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 5)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n", szFuncName);			rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n",
+				    szFuncName);
+			rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -255,7 +293,9 @@
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -266,24 +306,30 @@
 	 * EXPECTED: rc = -1, errno = ENOENT
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 6)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(nonexistent path in subdir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &hanp, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -293,25 +339,33 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 7)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -321,7 +375,9 @@
 			rc |= remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -332,29 +388,38 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 8)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) == -1) {
+		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_SUBDIR_FILE);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(DUMMY_SUBDIR_LINK, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -365,7 +430,9 @@
 			rc |= unlink(DUMMY_SUBDIR_LINK);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -376,24 +443,31 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 9)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
+		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n", szFuncName);
-			rc = dm_path_to_handle(DUMMY_SUBDIR_SUBDIR, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n",
+				    szFuncName);
+			rc = dm_path_to_handle(DUMMY_SUBDIR_SUBDIR, &hanp,
+					       &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -402,7 +476,9 @@
 			rc = rmdir(DUMMY_SUBDIR_SUBDIR);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -413,8 +489,8 @@
 	 * EXPECTED: rc = -1, errno = ENAMETOOLONG
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 10)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		char *szTooLong = PATH_TOOLONG;
 
 		/* Variation set up */
@@ -432,18 +508,21 @@
 	 * EXPECTED: rc = -1, errno = ENOTDIR
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 11)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(path not dir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(path not dir)\n",
+				    szFuncName);
 			rc = dm_path_to_handle(PATH_NOTDIR, &hanp, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOTDIR);
 
@@ -451,7 +530,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -464,8 +545,8 @@
 	 * of ENXIO)
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 12)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -483,29 +564,36 @@
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 13)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		size_t	hlen;
+		int fd;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n", szFuncName);
-			rc = dm_path_to_handle(DUMMY_FILE, (void **)INVALID_ADDR, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n",
+				    szFuncName);
+			rc = dm_path_to_handle(DUMMY_FILE,
+					       (void **)INVALID_ADDR, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -515,25 +603,31 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 14)) {
-		int	fd;
-		void	*hanp;
+		int fd;
+		void *hanp;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n", szFuncName);
-			rc = dm_path_to_handle(DUMMY_FILE, &hanp, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n",
+				    szFuncName);
+			rc = dm_path_to_handle(DUMMY_FILE, &hanp,
+					       (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -543,44 +637,64 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 15)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName, DUMMY_SUBDIR_FILE);
-			rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &hanp1, &hlen1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName,
+				    DUMMY_SUBDIR_FILE);
+			rc = dm_path_to_handle(DUMMY_SUBDIR_FILE, &hanp1,
+					       &hlen1);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp1 = %p, hlen1 = %d\n", hanp1, hlen1);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp1 = %p, hlen1 = %d\n", hanp1,
+					    hlen1);
 				dm_LogHandle(hanp1, hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName, DummySubdirFile);
-				rc = dm_path_to_handle(DummySubdirFile, &hanp2, &hlen2);
+				DMLOG_PRINT(DMLVL_DEBUG, "%s(%s)\n", szFuncName,
+					    DummySubdirFile);
+				rc = dm_path_to_handle(DummySubdirFile, &hanp2,
+						       &hlen2);
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "hanp2 = %p, hlen2 = %d\n", hanp2, hlen2);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "hanp2 = %p, hlen2 = %d\n",
+						    hanp2, hlen2);
 					dm_LogHandle(hanp2, hlen2);
 				}
 			}
 
 			if (rc == 0) {
-				if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and handles same\n", szFuncName, rc);
+				if (dm_handle_cmp(hanp1, hlen1, hanp2, hlen2) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and handles same\n",
+						    szFuncName, rc);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but handles NOT same\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but handles NOT same\n",
+						    szFuncName, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -589,7 +703,9 @@
 			rc |= remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -601,8 +717,8 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 16)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -610,18 +726,25 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(empty path)\n", szFuncName);
 		rc = dm_path_to_handle("", &hanp, &hlen);
 		if (rc == 0) {
-			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp,
+				    hlen);
 			dm_LogHandle(hanp, hlen);
 
 			if (dm_handle_cmp(mtpthanp, mtpthlen, hanp, hlen) == 0) {
-			  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			} else {
-			  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected handle\n", szFuncName, 0);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with expected rc = %d but unexpected handle\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			}
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
 			DMVAR_FAIL();
 		}
 
@@ -634,8 +757,8 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_HANDLE_BASE + 17)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -643,18 +766,25 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(curdir path)\n", szFuncName);
 		rc = dm_path_to_handle(CURRENT_DIR, &hanp, &hlen);
 		if (rc == 0) {
-			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp,
+				    hlen);
 			dm_LogHandle(hanp, hlen);
 
 			if (dm_handle_cmp(mtpthanp, mtpthlen, hanp, hlen) == 0) {
-			  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			} else {
-			  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected handle\n", szFuncName, 0);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with expected rc = %d but unexpected handle\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			}
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
 			DMVAR_FAIL();
 		}
 
@@ -669,8 +799,8 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 1)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -687,21 +817,26 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 2)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -710,7 +845,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -721,12 +858,14 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 3)) {
-		int	fd_f, fd_l;
-		void	*hanp;
-		size_t	hlen;
+		int fd_f, fd_l;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd_f = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd_f =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = link(DUMMY_FILE, DUMMY_LINK)) == -1) {
 			close(fd_f);
@@ -737,14 +876,19 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd_f == -1 || rc == -1 || fd_l == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd_l, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -755,7 +899,9 @@
 			rc |= remove(DUMMY_FILE);
 			rc |= remove(DUMMY_LINK);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -766,9 +912,9 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
@@ -777,14 +923,19 @@
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -793,7 +944,9 @@
 			rc = close(fd);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -804,25 +957,33 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 5)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -832,7 +993,9 @@
 			rc |= remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -843,16 +1006,20 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 6)) {
-		int	fd_f, fd_l;
-		void	*hanp;
-		size_t	hlen;
+		int fd_f, fd_l;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd_f = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd_f =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) == -1) {
+		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) ==
+			   -1) {
 			remove(DUMMY_SUBDIR_FILE);
 			close(fd_f);
 			rmdir(DUMMY_SUBDIR);
@@ -863,14 +1030,19 @@
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd_f == -1 || fd_l == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd_l, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -882,7 +1054,9 @@
 			rc |= unlink(DUMMY_SUBDIR_LINK);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -893,28 +1067,34 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 7)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
+		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((fd = open(DUMMY_SUBDIR_SUBDIR, O_DIRECTORY)) == -1) {
 			rmdir(DUMMY_SUBDIR_SUBDIR);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -924,7 +1104,9 @@
 			rc |= rmdir(DUMMY_SUBDIR_SUBDIR);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -938,25 +1120,30 @@
 	 * of ENXIO)
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 8)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(FILE_NOTDMAPI, O_RDONLY);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fd not DMAPI)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fd not DMAPI)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENXIO);
 
 			/* Variation clean up */
 			rc = close(fd);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -967,17 +1154,20 @@
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 9)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		size_t	hlen;
+		int fd;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, (void **)INVALID_ADDR, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
@@ -985,11 +1175,14 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -999,25 +1192,31 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 10)) {
-		int	fd;
-		void	*hanp;
+		int fd;
+		void *hanp;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n", szFuncName);
-			rc = dm_fd_to_handle(fd, &hanp, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n",
+				    szFuncName);
+			rc = dm_fd_to_handle(fd, &hanp,
+					     (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1027,8 +1226,8 @@
 	 * EXPECTED: rc = -1, errno = ENXIO
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 11)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1045,8 +1244,8 @@
 	 * EXPECTED: rc = -1, errno = ENXIO
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 12)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1063,8 +1262,8 @@
 	 * EXPECTED: rc = -1, errno = ENXIO
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 13)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1081,27 +1280,34 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(FD_TO_HANDLE_BASE + 14)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) != -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) != -1) {
 			rc = close(fd);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated fd)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated fd)\n",
+				    szFuncName);
 			rc = dm_fd_to_handle(fd, &hanp, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1116,8 +1322,8 @@
 	 * ignored, which indicated fault)
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 1)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1134,13 +1340,14 @@
 	 * EXPECTED: rc = -1, errno = ENOENT
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 2)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in curdir)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in curdir)\n",
+			    szFuncName);
 		rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
@@ -1152,21 +1359,26 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in curdir)\n",
+				    szFuncName);
 			rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1175,7 +1387,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1186,26 +1400,33 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = link(DUMMY_FILE, DUMMY_LINK)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in curdir)\n",
+				    szFuncName);
 			rc = dm_path_to_fshandle(DUMMY_LINK, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1215,7 +1436,9 @@
 			rc |= remove(DUMMY_FILE);
 			rc |= unlink(DUMMY_LINK);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1226,20 +1449,25 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 5)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in curdir)\n",
+				    szFuncName);
 			rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1247,7 +1475,9 @@
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1258,24 +1488,31 @@
 	 * EXPECTED: rc = -1, errno = ENOENT
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 6)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(nonexistent path in subdir)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_SUBDIR_FILE, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(nonexistent path in subdir)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_SUBDIR_FILE, &hanp,
+						 &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOENT);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to set up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1285,25 +1522,34 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 7)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_SUBDIR_FILE, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_SUBDIR_FILE, &hanp,
+						 &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1313,7 +1559,9 @@
 			rc |= remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1324,29 +1572,39 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 8)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) == -1) {
+		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_SUBDIR_FILE);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_SUBDIR_LINK, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_SUBDIR_LINK, &hanp,
+						 &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1357,7 +1615,9 @@
 			rc |= unlink(DUMMY_SUBDIR_LINK);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1368,24 +1628,31 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 9)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
+		} else if ((rc = mkdir(DUMMY_SUBDIR_SUBDIR, DUMMY_DIR_RW_MODE))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_SUBDIR_SUBDIR, &hanp, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir in subdir)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_SUBDIR_SUBDIR, &hanp,
+						 &hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp,
+					    hlen);
 				dm_LogHandle(hanp, hlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1394,7 +1661,9 @@
 			rc = rmdir(DUMMY_SUBDIR_SUBDIR);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1405,8 +1674,8 @@
 	 * EXPECTED: rc = -1, errno = ENAMETOOLONG
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 10)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		char *szTooLong = PATH_TOOLONG;
 
 		/* Variation set up */
@@ -1424,18 +1693,21 @@
 	 * EXPECTED: rc = -1, errno = ENOTDIR
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 11)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(path not dir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(path not dir)\n",
+				    szFuncName);
 			rc = dm_path_to_fshandle(PATH_NOTDIR, &hanp, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, ENOTDIR);
 
@@ -1443,7 +1715,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1456,8 +1730,8 @@
 	 * of ENXIO)
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 12)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1475,29 +1749,36 @@
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 13)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		size_t	hlen;
+		int fd;
+		size_t hlen;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_FILE, (void **)INVALID_ADDR, &hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_FILE,
+						 (void **)INVALID_ADDR, &hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1507,25 +1788,31 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 14)) {
-		int	fd;
-		void	*hanp;
+		int fd;
+		void *hanp;
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n", szFuncName);
-			rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n",
+				    szFuncName);
+			rc = dm_path_to_fshandle(DUMMY_FILE, &hanp,
+						 (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1535,8 +1822,8 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 15)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1544,7 +1831,8 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(empty path)\n", szFuncName);
 		rc = dm_path_to_fshandle("", &hanp, &hlen);
 		if (rc == 0) {
-			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp,
+				    hlen);
 			dm_LogHandle(hanp, hlen);
 		}
 		DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1558,8 +1846,8 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(PATH_TO_FSHANDLE_BASE + 16)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
@@ -1567,7 +1855,8 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(curdir path)\n", szFuncName);
 		rc = dm_path_to_fshandle(CURRENT_DIR, &hanp, &hlen);
 		if (rc == 0) {
-			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp,
+				    hlen);
 			dm_LogHandle(hanp, hlen);
 		}
 		DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1584,36 +1873,45 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 1)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_handle_to_fshandle((void *)INVALID_ADDR, hlen, &fshanp, &fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle((void *)INVALID_ADDR, hlen,
+						   &fshanp, &fshlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1623,31 +1921,39 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 2)) {
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, INVALID_ADDR, &fshanp, &fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle(hanp, INVALID_ADDR, &fshanp,
+						   &fshlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1658,26 +1964,34 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 3)) {
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp,
+						   &fshlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "fshanp = %p, fshlen = %d\n", fshanp, fshlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "fshanp = %p, fshlen = %d\n",
+					    fshanp, fshlen);
 				dm_LogHandle(fshanp, fshlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1686,7 +2000,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1698,24 +2014,31 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 4)) {
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp,
+						   &fshlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "fshanp = %p, fshlen = %d\n", fshanp, fshlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "fshanp = %p, fshlen = %d\n",
+					    fshanp, fshlen);
 				dm_LogHandle(fshanp, fshlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1723,7 +2046,9 @@
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1735,26 +2060,34 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 5)) {
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen);
+			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp,
+						   &fshlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "fshanp = %p, fshlen = %d\n", fshanp, fshlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "fshanp = %p, fshlen = %d\n",
+					    fshanp, fshlen);
 				dm_LogHandle(fshanp, fshlen);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
@@ -1763,7 +2096,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -1776,36 +2111,46 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 6)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp;
+		size_t hlen, fshlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fshanpp)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, hlen, (void **)INVALID_ADDR, &fshlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fshanpp)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle(hanp, hlen,
+						   (void **)INVALID_ADDR,
+						   &fshlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1816,36 +2161,45 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 7)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fshlenp)\n", szFuncName);
-			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, (void *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fshlenp)\n",
+				    szFuncName);
+			rc = dm_handle_to_fshandle(hanp, hlen, &fshanp,
+						   (void *)INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1855,14 +2209,15 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSHANDLE_BASE + 8)) {
-		void	*fshanp;
-		size_t	fshlen;
+		void *fshanp;
+		size_t fshlen;
 
 		/* Variation set up */
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_handle_to_fshandle(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, &fshanp, &fshlen);
+		rc = dm_handle_to_fshandle(DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					   &fshanp, &fshlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -1876,29 +2231,40 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 1)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp1)\n", szFuncName);
-			rc = dm_handle_cmp((char *)INVALID_ADDR, hlen, hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp1)\n",
+				    szFuncName);
+			rc = dm_handle_cmp((char *)INVALID_ADDR, hlen, hanp,
+					   hlen);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -1906,12 +2272,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1921,29 +2290,39 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 2)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen1)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen1)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp, INVALID_ADDR, hanp, hlen);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -1951,7 +2330,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1963,29 +2344,40 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 3)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp2)\n", szFuncName);
-			rc = dm_handle_cmp(hanp, hlen, (char *)INVALID_ADDR, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp2)\n",
+				    szFuncName);
+			rc = dm_handle_cmp(hanp, hlen, (char *)INVALID_ADDR,
+					   hlen);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -1993,12 +2385,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2008,29 +2403,39 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen2)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen2)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp, hlen, hanp, INVALID_ADDR);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2038,7 +2443,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2049,29 +2456,39 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 5)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hlen1 < hlen2)\n", szFuncName);
-			rc = dm_handle_cmp(hanp, hlen, hanp, hlen+1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(hlen1 < hlen2)\n",
+				    szFuncName);
+			rc = dm_handle_cmp(hanp, hlen, hanp, hlen + 1);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2079,7 +2496,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2090,29 +2509,40 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 6)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, same file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, same file handle)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp, hlen, hanp, hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2120,7 +2550,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2131,29 +2563,40 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 7)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, same fs handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, same fs handle)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp, hlen, hanp, hlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2161,7 +2604,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2172,29 +2617,39 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 8)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hlen1 > hlen2)\n", szFuncName);
-			rc = dm_handle_cmp(hanp, hlen, hanp, hlen-1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(hlen1 > hlen2)\n",
+				    szFuncName);
+			rc = dm_handle_cmp(hanp, hlen, hanp, hlen - 1);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2202,7 +2657,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2213,33 +2670,45 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 9)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp2, &hlen2)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp2, &hlen2))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, diff file handles from same path)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, diff file handles from same path)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2247,7 +2716,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2259,33 +2730,49 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 10)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &hanp1,
+					     &hlen1)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp2, &hlen2)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &hanp2,
+					     &hlen2)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, diff fs handles from same path)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, diff fs handles from same path)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2293,7 +2780,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2305,14 +2794,17 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 11)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp2, &hlen2)) == -1) {
@@ -2321,17 +2813,25 @@
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, diff file handles from path, fd)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, diff file handles from path, fd)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2339,7 +2839,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2351,12 +2853,14 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 12)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp1, &hlen1)) == -1) {
 			close(fd);
@@ -2367,17 +2871,25 @@
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, diff file handles from same fd)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 == hanp2, diff file handles from same fd)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2385,7 +2897,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2397,21 +2911,28 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 13)) {
-		int	fd1, fd2;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd1, fd2;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd1 = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd1 =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1))
+			   == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
-		} else if ((fd2 = open(DUMMY_FILE2, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd2 =
+			 open(DUMMY_FILE2, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE2, &hanp2, &hlen2)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE2, &hanp2, &hlen2))
+			   == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
@@ -2419,17 +2940,25 @@
 			remove(DUMMY_FILE2);
 		}
 		if (fd1 == -1 || rc == -1 || fd2 == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 != hanp2, different paths)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 != hanp2, different paths)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2439,7 +2968,9 @@
 			rc |= close(fd2);
 			rc |= remove(DUMMY_FILE2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2451,17 +2982,22 @@
 	 * EXPECTED: rc != 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 14)) {
-		int	fd1, fd2;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd1, fd2;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd1 = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd1 =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd1, &hanp1, &hlen1)) == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
-		} else if ((fd2 = open(DUMMY_FILE2, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd2 =
+			 open(DUMMY_FILE2, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
@@ -2473,17 +3009,25 @@
 			remove(DUMMY_FILE2);
 		}
 		if (fd1 == -1 || rc == -1 || fd2 == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 != hanp2, different fd's)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 != hanp2, different fd's)\n",
+				    szFuncName);
 			rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2493,7 +3037,9 @@
 			rc |= close(fd2);
 			rc |= remove(DUMMY_FILE2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2511,13 +3057,19 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, global handle)\n", szFuncName);
-		rc = dm_handle_cmp(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 == hanp2, global handle)\n",
+			    szFuncName);
+		rc = dm_handle_cmp(DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
 		if (rc == 0) {
-			DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s passed with expected rc = %d\n",
+				    szFuncName, rc);
 			DMVAR_PASS();
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d\n",
+				    szFuncName, rc);
 			DMVAR_FAIL();
 		}
 
@@ -2529,29 +3081,41 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_CMP_BASE + 16)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hanp1 != hanp2, file and global handle)\n", szFuncName);
-			rc = dm_handle_cmp(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, hanp, hlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(hanp1 != hanp2, file and global handle)\n",
+				    szFuncName);
+			rc = dm_handle_cmp(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, hanp,
+					   hlen);
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -2559,7 +3123,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2578,12 +3144,13 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
 		dm_handle_free((char *)INVALID_ADDR, FILE_HANDLELEN);
-	  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 		DMVAR_PASS();
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2593,32 +3160,40 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 2)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from path)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from path)\n",
+				    szFuncName);
 			dm_handle_free(hanp, hlen);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2628,32 +3203,39 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from fd)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from fd)\n",
+				    szFuncName);
 			dm_handle_free(hanp, hlen);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2663,32 +3245,40 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from path)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from path)\n",
+				    szFuncName);
 			dm_handle_free(hanp, hlen);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -2698,36 +3288,46 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 5)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp1, &hlen1)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_handle_to_fshandle(hanp1, hlen1, &hanp2, &hlen2)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp1, hlen1, &hanp2,
+					       &hlen2)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from handle)\n",
+				    szFuncName);
 			dm_handle_free(hanp2, hlen2);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 		}
@@ -2738,42 +3338,55 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 6)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 		dm_ino_t ino;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) ||
-			   ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) == -1) ||
-			   ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) == -1) ||
-			   ((rc = dm_make_handle(&fsid, &ino, &igen, &hanp2, &hlen2)) == -1 )) {
+		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1)
+			   || ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) ==
+			       -1)
+			   || ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) ==
+			       -1)
+			   ||
+			   ((rc =
+			     dm_make_handle(&fsid, &ino, &igen, &hanp2,
+					    &hlen2)) == -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from make)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle from make)\n",
+				    szFuncName);
 			dm_handle_free(hanp2, hlen2);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -2785,38 +3398,49 @@
 	 * EXPECTED: return
 	 */
 	if (DMVAR_EXEC(HANDLE_FREE_BASE + 7)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &hanp1,
+					     &hlen1)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) ||
-			   ((rc = dm_make_fshandle(&fsid, &hanp2, &hlen2)) == -1)) {
+		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1)
+			   || ((rc = dm_make_fshandle(&fsid, &hanp2, &hlen2)) ==
+			       -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp1, hlen1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from make)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from make)\n",
+				    szFuncName);
 			dm_handle_free(hanp2, hlen2);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 		}
@@ -2833,12 +3457,13 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
 		dm_handle_free(DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
-	  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s passed\n", szFuncName);
 		DMVAR_PASS();
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2860,7 +3485,8 @@
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2870,23 +3496,29 @@
 	 * EXPECTED: rc = DM_TRUE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 2)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			bRC = dm_handle_is_valid(hanp, hlen);
 			DMVAR_ENDPASSEXP(szFuncName, DM_TRUE, bRC);
 
@@ -2894,7 +3526,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2905,31 +3539,39 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file hlen too small)\n", szFuncName);
-			bRC = dm_handle_is_valid(hanp, hlen-1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file hlen too small)\n",
+				    szFuncName);
+			bRC = dm_handle_is_valid(hanp, hlen - 1);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2940,31 +3582,39 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 4)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file hlen too big)\n", szFuncName);
-			bRC = dm_handle_is_valid(hanp, hlen+1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file hlen too big)\n",
+				    szFuncName);
+			bRC = dm_handle_is_valid(hanp, hlen + 1);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2975,24 +3625,30 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 5)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			memset(hanp, 0, hlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(modified file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(modified file handle)\n",
+				    szFuncName);
 			bRC = dm_handle_is_valid(hanp, hlen);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
@@ -3000,7 +3656,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3011,19 +3669,24 @@
 	 * EXPECTED: rc = DM_TRUE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 6)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -3035,7 +3698,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3046,31 +3711,39 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 7)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs hlen too small)\n", szFuncName);
-			bRC = dm_handle_is_valid(hanp, hlen-1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs hlen too small)\n",
+				    szFuncName);
+			bRC = dm_handle_is_valid(hanp, hlen - 1);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3081,31 +3754,39 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 8)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs hlen too big)\n", szFuncName);
-			bRC = dm_handle_is_valid(hanp, hlen+1);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs hlen too big)\n",
+				    szFuncName);
+			bRC = dm_handle_is_valid(hanp, hlen + 1);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3116,24 +3797,30 @@
 	 * EXPECTED: rc = DM_FALSE
 	 */
 	if (DMVAR_EXEC(HANDLE_IS_VALID_BASE + 9)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			memset(hanp, 0, hlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(modified fs handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(modified fs handle)\n",
+				    szFuncName);
 			bRC = dm_handle_is_valid(hanp, hlen);
 			DMVAR_ENDPASSEXP(szFuncName, DM_FALSE, bRC);
 
@@ -3141,7 +3828,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3190,12 +3879,14 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
 		rc = dm_handle_hash((char *)INVALID_ADDR, FILE_HANDLELEN);
-	  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n",
+			    szFuncName);
 		DMVAR_PASS();
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3205,32 +3896,41 @@
 	 * EXPECTED: rc = ?
 	 */
 	if (DMVAR_EXEC(HANDLE_HASH_BASE + 2)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_handle_hash(hanp, hlen);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n",
+				    szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3241,32 +3941,40 @@
 	 * EXPECTED: rc = ?
 	 */
 	if (DMVAR_EXEC(HANDLE_HASH_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
 			rc = dm_handle_hash(hanp, hlen);
-	  		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n",
+				    szFuncName);
 			DMVAR_PASS();
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3283,12 +3991,14 @@
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
 		rc = dm_handle_hash(DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
-	  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s passed with rc = %u\n",
+			    szFuncName);
 		DMVAR_PASS();
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3307,12 +4017,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-		rc = dm_handle_to_fsid((char *)INVALID_ADDR, FILE_HANDLELEN, &fsidp);
+		rc = dm_handle_to_fsid((char *)INVALID_ADDR, FILE_HANDLELEN,
+				       &fsidp);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3323,36 +4035,46 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSID_BASE + 2)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fsidp)\n", szFuncName);
-			rc = dm_handle_to_fsid(hanp, hlen, (dm_fsid_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fsidp)\n",
+				    szFuncName);
+			rc = dm_handle_to_fsid(hanp, hlen,
+					       (dm_fsid_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3362,39 +4084,56 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSID_BASE + 3)) {
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 		dm_fsid_t fsidp;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &fshanp,
+					     &fshlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_handle_to_fsid(hanp, hlen, &fsidp);
 			if (rc == 0) {
-				if (memcmp(hanp, &fsidp, sizeof(dm_fsid_t)) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				if (memcmp(hanp, &fsidp, sizeof(dm_fsid_t)) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected fsid (0x%16llX vs 0x%16llX)\n", szFuncName, rc, fsidp, *(dm_fsid_t *)hanp);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected fsid (0x%16llX vs 0x%16llX)\n",
+						    szFuncName, rc, fsidp,
+						    *(dm_fsid_t *) hanp);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -3402,7 +4141,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -3414,39 +4155,55 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_FSID_BASE + 4)) {
-		int	fd;
-		void	*hanp, *fshanp;
-		size_t	hlen, fshlen;
+		int fd;
+		void *hanp, *fshanp;
+		size_t hlen, fshlen;
 		dm_fsid_t fsidp;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &fshanp,
+					     &fshlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
 			rc = dm_handle_to_fsid(hanp, hlen, &fsidp);
 			if (rc == 0) {
-				if (memcmp(hanp, &fsidp, sizeof(dm_fsid_t)) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				if (memcmp(hanp, &fsidp, sizeof(dm_fsid_t)) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected fsid (0x%16llX vs 0x%16llX)\n", szFuncName, rc, fsidp, *(dm_fsid_t *)hanp);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected fsid (0x%16llX vs 0x%16llX)\n",
+						    szFuncName, rc, fsidp,
+						    *(dm_fsid_t *) hanp);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -3454,7 +4211,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 			dm_handle_free(fshanp, fshlen);
@@ -3492,12 +4251,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-		rc = dm_handle_to_igen((char *)INVALID_ADDR, FILE_HANDLELEN, &igen);
+		rc = dm_handle_to_igen((char *)INVALID_ADDR, FILE_HANDLELEN,
+				       &igen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3508,36 +4269,46 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_IGEN_BASE + 2)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid igenp)\n", szFuncName);
-			rc = dm_handle_to_igen(hanp, hlen, (dm_igen_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid igenp)\n",
+				    szFuncName);
+			rc = dm_handle_to_igen(hanp, hlen,
+					       (dm_igen_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3547,24 +4318,30 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_IGEN_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 		dm_igen_t igen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_handle_to_igen(hanp, hlen, &igen);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -3572,7 +4349,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3583,29 +4362,35 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_IGEN_BASE + 4)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_igen_t igen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
 			rc = dm_handle_to_igen(hanp, hlen, &igen);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3616,24 +4401,30 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_IGEN_BASE + 5)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 		dm_igen_t igen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from file)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from file)\n",
+				    szFuncName);
 			rc = dm_handle_to_igen(hanp, hlen, &igen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
@@ -3641,7 +4432,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3652,29 +4445,37 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_IGEN_BASE + 6)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_igen_t igen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp,
+					     &hlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from dir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from dir)\n",
+				    szFuncName);
 			rc = dm_handle_to_igen(hanp, hlen, &igen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3711,12 +4512,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-		rc = dm_handle_to_ino((char *)INVALID_ADDR, FILE_HANDLELEN, &ino);
+		rc = dm_handle_to_ino((char *)INVALID_ADDR, FILE_HANDLELEN,
+				      &ino);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3727,36 +4530,46 @@
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_INO_BASE + 2)) {
 #ifdef USER_SPACE_FAULTS
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid inop)\n", szFuncName);
-			rc = dm_handle_to_ino(hanp, hlen, (dm_ino_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid inop)\n",
+				    szFuncName);
+			rc = dm_handle_to_ino(hanp, hlen,
+					      (dm_ino_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3766,44 +4579,60 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_INO_BASE + 3)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 		dm_ino_t ino;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_handle_to_ino(hanp, hlen, &ino);
 			if (rc == 0) {
 				struct stat statfs;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				rc = stat(DUMMY_FILE, &statfs);
 				if (rc == 0) {
 					if (ino == statfs.st_ino) {
-						DMLOG_PRINT(DMLVL_DEBUG, "ino %d from stat() matches returned value\n", statfs.st_ino);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "ino %d from stat() matches returned value\n",
+							    statfs.st_ino);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "BUT... ino %d from stat() does not match returned value %lld\n", statfs.st_ino, ino);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "BUT... ino %d from stat() does not match returned value %lld\n",
+							    statfs.st_ino, ino);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "BUT... stat() failed with rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "BUT... stat() failed with rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -3811,7 +4640,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3822,49 +4653,65 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_INO_BASE + 4)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_ino_t ino;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
 			rc = dm_handle_to_ino(hanp, hlen, &ino);
 			if (rc == 0) {
 				struct stat statfs;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, rc);
 				rc = stat(DUMMY_SUBDIR, &statfs);
 				if (rc == 0) {
 					if (ino == statfs.st_ino) {
-						DMLOG_PRINT(DMLVL_DEBUG, "ino %d from stat() matches returned value\n", statfs.st_ino);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "ino %d from stat() matches returned value\n",
+							    statfs.st_ino);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "BUT... ino %d from stat() does not match returned value %lld\n", statfs.st_ino, ino);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "BUT... ino %d from stat() does not match returned value %lld\n",
+							    statfs.st_ino, ino);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "BUT... stat() failed with rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "BUT... stat() failed with rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3875,24 +4722,30 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_INO_BASE + 5)) {
-		int	fd;
-		void	*hanp;
-		size_t	hlen;
+		int fd;
+		void *hanp;
+		size_t hlen;
 		dm_ino_t ino;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from file)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from file)\n",
+				    szFuncName);
 			rc = dm_handle_to_ino(hanp, hlen, &ino);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
@@ -3900,7 +4753,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3911,29 +4766,37 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_INO_BASE + 6)) {
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_ino_t ino;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp,
+					     &hlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from dir)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle from dir)\n",
+				    szFuncName);
 			rc = dm_handle_to_ino(hanp, hlen, &ino);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3963,8 +4826,8 @@
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 1)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_ino_t ino;
 		dm_igen_t igen;
 
@@ -3972,12 +4835,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fsidp)\n", szFuncName);
-		rc = dm_make_handle((dm_fsid_t *)INVALID_ADDR, &ino, &igen, &hanp, &hlen);
+		rc = dm_make_handle((dm_fsid_t *) INVALID_ADDR, &ino, &igen,
+				    &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -3988,8 +4853,8 @@
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 2)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 
@@ -3997,12 +4862,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid inop)\n", szFuncName);
-		rc = dm_make_handle(&fsid, (dm_ino_t *)INVALID_ADDR, &igen, &hanp, &hlen);
+		rc = dm_make_handle(&fsid, (dm_ino_t *) INVALID_ADDR, &igen,
+				    &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4013,8 +4880,8 @@
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 3)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 		dm_fsid_t fsid;
 		dm_ino_t ino;
 
@@ -4022,12 +4889,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid igenp)\n", szFuncName);
-		rc = dm_make_handle(&fsid, &ino, (dm_igen_t *)INVALID_ADDR, &hanp, &hlen);
+		rc = dm_make_handle(&fsid, &ino, (dm_igen_t *) INVALID_ADDR,
+				    &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4038,7 +4907,7 @@
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 4)) {
 #ifdef USER_SPACE_FAULTS
-		size_t	hlen;
+		size_t hlen;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 		dm_ino_t ino;
@@ -4047,12 +4916,14 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanpp)\n", szFuncName);
-		rc = dm_make_handle(&fsid, &ino, &igen, (void **)INVALID_ADDR, &hlen);
+		rc = dm_make_handle(&fsid, &ino, &igen, (void **)INVALID_ADDR,
+				    &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4063,7 +4934,7 @@
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 5)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
+		void *hanp;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 		dm_ino_t ino;
@@ -4072,62 +4943,79 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n", szFuncName);
-		rc = dm_make_handle(&fsid, &ino, &igen, &hanp, (size_t *)INVALID_ADDR);
+		rc = dm_make_handle(&fsid, &ino, &igen, &hanp,
+				    (size_t *) INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
 
 	/*
-	 * TEST	   : dm_make_handle - file
+	 * TEST    : dm_make_handle - file
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 6)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 		dm_ino_t ino;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_FILE, &hanp1, &hlen1))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) ||
-			   ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) == -1) ||
-			   ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) == -1)) {
+		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1)
+			   || ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) ==
+			       -1)
+			   || ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) ==
+			       -1)) {
 			dm_handle_free(hanp1, hlen1);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(file)\n", szFuncName);
 			rc = dm_make_handle(&fsid, &ino, &igen, &hanp2, &hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp2, hlen2);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp2,
+					    hlen2);
 				dm_LogHandle(hanp2, hlen2);
 
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4135,7 +5023,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -4147,8 +5037,8 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(MAKE_HANDLE_BASE + 7)) {
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 		dm_igen_t igen;
 		dm_ino_t ino;
@@ -4156,42 +5046,59 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp1, &hlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &hanp1,
+					   &hlen1)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) ||
-			   ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) == -1) ||
-			   ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) == -1)) {
+		} else if (((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1)
+			   || ((rc = dm_handle_to_igen(hanp1, hlen1, &igen)) ==
+			       -1)
+			   || ((rc = dm_handle_to_ino(hanp1, hlen1, &ino)) ==
+			       -1)) {
 			dm_handle_free(hanp1, hlen1);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir)\n", szFuncName);
 			rc = dm_make_handle(&fsid, &ino, &igen, &hanp2, &hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp2, hlen2);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp2,
+					    hlen2);
 				dm_LogHandle(hanp2, hlen2);
 
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -4206,19 +5113,20 @@
 	 */
 	if (DMVAR_EXEC(MAKE_FSHANDLE_BASE + 1)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
-		size_t	hlen;
+		void *hanp;
+		size_t hlen;
 
 		/* Variation set up */
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid fsidp)\n", szFuncName);
-		rc = dm_make_fshandle((dm_fsid_t *)INVALID_ADDR, &hanp, &hlen);
+		rc = dm_make_fshandle((dm_fsid_t *) INVALID_ADDR, &hanp, &hlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4229,7 +5137,7 @@
 	 */
 	if (DMVAR_EXEC(MAKE_FSHANDLE_BASE + 2)) {
 #ifdef USER_SPACE_FAULTS
-		size_t	hlen;
+		size_t hlen;
 		dm_fsid_t fsid;
 
 		/* Variation set up */
@@ -4241,7 +5149,8 @@
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4252,19 +5161,20 @@
 	 */
 	if (DMVAR_EXEC(MAKE_FSHANDLE_BASE + 3)) {
 #ifdef USER_SPACE_FAULTS
-		void	*hanp;
+		void *hanp;
 		dm_fsid_t fsid;
 
 		/* Variation set up */
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlenp)\n", szFuncName);
-		rc = dm_make_fshandle(&fsid, &hanp, (size_t *)INVALID_ADDR);
+		rc = dm_make_fshandle(&fsid, &hanp, (size_t *) INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with USER_SPACE_FAULTS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with USER_SPACE_FAULTS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -4274,15 +5184,20 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(MAKE_FSHANDLE_BASE + 4)) {
-		int	fd;
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		int fd;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp1, &hlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &hanp1,
+					     &hlen1)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		} else if ((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) {
@@ -4291,26 +5206,37 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_make_fshandle(&fsid, &hanp2, &hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp2, hlen2);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp2,
+					    hlen2);
 				dm_LogHandle(hanp2, hlen2);
 
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4318,7 +5244,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -4330,47 +5258,63 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(MAKE_FSHANDLE_BASE + 5)) {
-		void	*hanp1, *hanp2;
-		size_t	hlen1, hlen2;
+		void *hanp1, *hanp2;
+		size_t hlen1, hlen2;
 		dm_fsid_t fsid;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp1, &hlen1)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp1,
+					     &hlen1)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		} else if ((rc = dm_handle_to_fsid(hanp1, hlen1, &fsid)) == -1) {
 			dm_handle_free(hanp1, hlen1);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
 			rc = dm_make_fshandle(&fsid, &hanp2, &hlen2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "hanp = %p, hlen = %d\n", hanp2, hlen2);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "hanp = %p, hlen = %d\n", hanp2,
+					    hlen2);
 				dm_LogHandle(hanp2, hlen2);
 
 				rc = dm_handle_cmp(hanp1, hlen1, hanp2, hlen2);
 				if (rc == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n", szFuncName, rc);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = 0 but unexpected dm_handle_cmp rc = %d\n",
+						    szFuncName, rc);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp1, hlen1);
 			dm_handle_free(hanp2, hlen2);
@@ -4384,36 +5328,47 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 1)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path((void *)INVALID_ADDR, dirhlen, targhanp, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path((void *)INVALID_ADDR, dirhlen,
+					       targhanp, targhlen, PATHBUF_LEN,
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4425,36 +5380,47 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 2)) {
-		int	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid dirhlen)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, INVALID_ADDR, targhanp, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid dirhlen)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, INVALID_ADDR, targhanp,
+					       targhlen, PATHBUF_LEN, pathbuf,
+					       &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4466,36 +5432,47 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 3)) {
-		int	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, (void *)INVALID_ADDR, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen,
+					       (void *)INVALID_ADDR, targhlen,
+					       PATHBUF_LEN, pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4507,36 +5484,47 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 4)) {
-		int	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targhlen)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, INVALID_ADDR, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid targhlen)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       INVALID_ADDR, PATHBUF_LEN,
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4548,36 +5536,46 @@
 	 * EXPECTED: rc = -1, errno = E2BIG
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 5)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, 1, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, 1, pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4589,35 +5587,46 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 6)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid pathbufp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, PATHBUF_LEN, (char *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid pathbufp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, PATHBUF_LEN,
+					       (char *)INVALID_ADDR, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4629,35 +5638,46 @@
 	 * EXPECTED: rc = -1, errno = EFAULT
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 7)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, PATHBUF_LEN, pathbuf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, PATHBUF_LEN, pathbuf,
+					       (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4669,23 +5689,30 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 8)) {
-		int 	fd1, fd2;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd1, fd2;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
-		if ((fd1 = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd1 =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_fd_to_handle(fd1, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd1, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
-		} else if ((fd2 = open(DUMMY_FILE2, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd2 =
+			 open(DUMMY_FILE2, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			close(fd1);
 			remove(DUMMY_FILE);
 			dm_handle_free(targhanp, targhlen);
-		} else if ((rc = dm_fd_to_handle(fd2, &dirhanp, &dirhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd2, &dirhanp, &dirhlen)) ==
+			   -1) {
 			close(fd2);
 			remove(DUMMY_FILE2);
 			close(fd1);
@@ -4693,12 +5720,17 @@
 			dm_handle_free(targhanp, targhlen);
 		}
 		if (fd1 == -1 || fd2 == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -4707,7 +5739,9 @@
 			rc |= remove(DUMMY_FILE);
 			rc |= remove(DUMMY_FILE2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4719,34 +5753,44 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 9)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
 		} else if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &targhanp, &targhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &targhanp,
+					   &targhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir targhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir targhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4761,42 +5805,61 @@
 	 * current directory)
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 10)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(absolute root dir)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(absolute root dir)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d, pathbuf = \"%s\"\n", rlen, pathbuf);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "rlen = %d, pathbuf = \"%s\"\n",
+					    rlen, pathbuf);
 
 				if (strncmp(pathbuf, DUMMY_FILE, rlen) == 0) {
-					*(pathbuf+rlen) = 0;
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and path = %s (length %d)\n", szFuncName, rc, pathbuf, rlen);
+					*(pathbuf + rlen) = 0;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and path = %s (length %d)\n",
+						    szFuncName, rc, pathbuf,
+						    rlen);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected path (%s vs %s)\n", szFuncName, rc, pathbuf, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected path (%s vs %s)\n",
+						    szFuncName, rc, pathbuf,
+						    DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4804,7 +5867,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4816,42 +5881,61 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 11)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle("", &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(relative root dir)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(relative root dir)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d, pathbuf = \"%s\"\n", rlen, pathbuf);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "rlen = %d, pathbuf = \"%s\"\n",
+					    rlen, pathbuf);
 
 				if (strncmp(pathbuf, DUMMY_FILE, rlen) == 0) {
-					*(pathbuf+rlen) = 0;
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and path = %s (length %d)\n", szFuncName, rc, pathbuf, rlen);
+					*(pathbuf + rlen) = 0;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and path = %s (length %d)\n",
+						    szFuncName, rc, pathbuf,
+						    rlen);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected path (%s vs %s)\n", szFuncName, rc, pathbuf, DUMMY_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected path (%s vs %s)\n",
+						    szFuncName, rc, pathbuf,
+						    DUMMY_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4859,7 +5943,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4871,46 +5957,69 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 12)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in subdir)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d, pathbuf = \"%s\"\n", rlen, pathbuf);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "rlen = %d, pathbuf = \"%s\"\n",
+					    rlen, pathbuf);
 
-				if (strncmp(pathbuf, DUMMY_SUBDIR_FILE, rlen) == 0) {
-					*(pathbuf+rlen) = 0;
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and path = %s (length %d)\n", szFuncName, rc, pathbuf, rlen);
+				if (strncmp(pathbuf, DUMMY_SUBDIR_FILE, rlen) ==
+				    0) {
+					*(pathbuf + rlen) = 0;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and path = %s (length %d)\n",
+						    szFuncName, rc, pathbuf,
+						    rlen);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected path (%s vs %s)\n", szFuncName, rc, pathbuf, DUMMY_SUBDIR_FILE);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected path (%s vs %s)\n",
+						    szFuncName, rc, pathbuf,
+						    DUMMY_SUBDIR_FILE);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4919,7 +6028,9 @@
 			rc |= remove(DUMMY_SUBDIR_FILE);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4931,26 +6042,36 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 13)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) == -1) {
+		} else if ((rc = link(DUMMY_SUBDIR_FILE, DUMMY_SUBDIR_LINK)) ==
+			   -1) {
 			close(fd);
 			rmdir(DUMMY_SUBDIR);
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR_LINK, &targhanp, &targhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR_LINK, &targhanp,
+					   &targhlen)) == -1) {
 			unlink(DUMMY_SUBDIR_LINK);
 			close(fd);
 			rmdir(DUMMY_SUBDIR);
@@ -4958,25 +6079,41 @@
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(link in subdir)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d, pathbuf = \"%s\"\n", rlen, pathbuf);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "rlen = %d, pathbuf = \"%s\"\n",
+					    rlen, pathbuf);
 
-				if (strncmp(pathbuf, DUMMY_SUBDIR_LINK, rlen) == 0) {
-					*(pathbuf+rlen) = 0;
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and path = %s (length %d)\n", szFuncName, rc, pathbuf, rlen);
+				if (strncmp(pathbuf, DUMMY_SUBDIR_LINK, rlen) ==
+				    0) {
+					*(pathbuf + rlen) = 0;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and path = %s (length %d)\n",
+						    szFuncName, rc, pathbuf,
+						    rlen);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected path (%s vs %s)\n", szFuncName, rc, pathbuf, DUMMY_SUBDIR_LINK);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected path (%s vs %s)\n",
+						    szFuncName, rc, pathbuf,
+						    DUMMY_SUBDIR_LINK);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -4986,7 +6123,9 @@
 			rc |= unlink(DUMMY_SUBDIR_LINK);
 			rc |= rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -4998,11 +6137,11 @@
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 14)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DIR_LEVEL1, DUMMY_DIR_RW_MODE)) == -1) {
@@ -5016,18 +6155,27 @@
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((rc = dm_path_to_handle(DIR_LEVEL4, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DIR_LEVEL4, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DIR_LEVEL4);
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((fd = open(FILE_LEVEL4, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(FILE_LEVEL4, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DIR_LEVEL4);
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((rc = dm_path_to_handle(FILE_LEVEL4, &targhanp, &targhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(FILE_LEVEL4, &targhanp,
+					   &targhlen)) == -1) {
 			close(fd);
 			remove(FILE_LEVEL4);
 			dm_handle_free(dirhanp, dirhlen);
@@ -5037,25 +6185,41 @@
 			rmdir(DIR_LEVEL1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file in multiple subdir)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(file in multiple subdir)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d, pathbuf = \"%s\"\n", rlen, pathbuf);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "rlen = %d, pathbuf = \"%s\"\n",
+					    rlen, pathbuf);
 
 				if (strncmp(pathbuf, FILE_LEVEL4, rlen) == 0) {
-					*(pathbuf+rlen) = 0;
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and path = %s (length %d)\n", szFuncName, rc, pathbuf, rlen);
+					*(pathbuf + rlen) = 0;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d and path = %s (length %d)\n",
+						    szFuncName, rc, pathbuf,
+						    rlen);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected path (%s vs %s)\n", szFuncName, rc, pathbuf, FILE_LEVEL4);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected path (%s vs %s)\n",
+						    szFuncName, rc, pathbuf,
+						    FILE_LEVEL4);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -5067,7 +6231,9 @@
 			rc |= rmdir(DIR_LEVEL2);
 			rc |= rmdir(DIR_LEVEL1);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5079,11 +6245,11 @@
 	 * EXPECTED: rc = -1, errno = EINVAL
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 15)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DIR_LEVEL1, DUMMY_DIR_RW_MODE)) == -1) {
@@ -5093,7 +6259,10 @@
 		} else if ((rc = mkdir(DIR_LEVEL3, DUMMY_DIR_RW_MODE)) == -1) {
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((rc = dm_path_to_handle(DIR_LEVEL3, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DIR_LEVEL3, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
@@ -5102,13 +6271,19 @@
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((fd = open(FILE_LEVEL4, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(FILE_LEVEL4, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			rmdir(DIR_LEVEL4);
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DIR_LEVEL3);
 			rmdir(DIR_LEVEL2);
 			rmdir(DIR_LEVEL1);
-		} else if ((rc = dm_path_to_handle(FILE_LEVEL4, &targhanp, &targhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(FILE_LEVEL4, &targhanp,
+					   &targhlen)) == -1) {
 			close(fd);
 			remove(FILE_LEVEL4);
 			rmdir(DIR_LEVEL4);
@@ -5118,12 +6293,18 @@
 			rmdir(DIR_LEVEL1);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(targhanp not in dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(targhanp not in dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
@@ -5134,7 +6315,9 @@
 			rc |= rmdir(DIR_LEVEL2);
 			rc |= rmdir(DIR_LEVEL1);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5146,36 +6329,48 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 16)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
-		if ((rc = dm_path_to_fshandle(mountPt, &dirhanp, &dirhlen)) == -1) {
+		if ((rc =
+		     dm_path_to_fshandle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, PATHBUF_LEN, pathbuf,
+					       &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5187,36 +6382,49 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 17)) {
-		int	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &targhanp, &targhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_FILE, &targhanp,
+					     &targhlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs targhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs targhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, PATHBUF_LEN, pathbuf,
+					       &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5228,33 +6436,43 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 18)) {
-		int 	fd;
-		void	*targhanp;
-		size_t	targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *targhanp;
+		size_t targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path(DM_GLOBAL_HANP, DM_GLOBAL_HLEN, targhanp, targhlen, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					       targhanp, targhlen, PATHBUF_LEN,
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(targhanp, targhlen);
 		}
@@ -5265,20 +6483,25 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 19)) {
-		void	*dirhanp;
-		size_t	dirhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		void *dirhanp;
+		size_t dirhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		rc = dm_path_to_handle(mountPt, &dirhanp, &dirhlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global targhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, PATHBUF_LEN, pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global targhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, DM_GLOBAL_HANP,
+					       DM_GLOBAL_HLEN, PATHBUF_LEN,
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -5291,21 +6514,28 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 20)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(dirhanp, dirhlen);
@@ -5317,19 +6547,26 @@
 			dm_handle_free(dirhanp, dirhlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated dirhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated dirhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5341,21 +6578,28 @@
 	 * EXPECTED: rc = -1, errno = EBADF
 	 */
 	if (DMVAR_EXEC(HANDLE_TO_PATH_BASE + 21)) {
-		int 	fd;
-		void	*dirhanp, *targhanp;
-		size_t	dirhlen, targhlen;
-		char 	pathbuf[PATHBUF_LEN];
-		size_t 	rlen;
+		int fd;
+		void *dirhanp, *targhanp;
+		size_t dirhlen, targhlen;
+		char pathbuf[PATHBUF_LEN];
+		size_t rlen;
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &dirhanp, &dirhlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_handle(DUMMY_SUBDIR, &dirhanp,
+					   &dirhlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
-		} else if ((fd = open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DUMMY_SUBDIR_FILE, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			dm_handle_free(dirhanp, dirhlen);
 			rmdir(DUMMY_SUBDIR);
-		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) == -1) {
+		} else if ((rc = dm_fd_to_handle(fd, &targhanp, &targhlen)) ==
+			   -1) {
 			close(fd);
 			remove(DUMMY_SUBDIR_FILE);
 			dm_handle_free(dirhanp, dirhlen);
@@ -5371,18 +6615,25 @@
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated targhanp)\n", szFuncName);
-			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp, targhlen, sizeof(pathbuf), pathbuf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated targhanp)\n",
+				    szFuncName);
+			rc = dm_handle_to_path(dirhanp, dirhlen, targhanp,
+					       targhlen, sizeof(pathbuf),
+					       pathbuf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(dirhanp, dirhlen);
 			dm_handle_free(targhanp, targhlen);
@@ -5401,26 +6652,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_sync_by_handle(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_sync_by_handle(INVALID_ADDR, hanp, hlen,
+					       DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5436,26 +6695,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_sync_by_handle(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_sync_by_handle(DM_NO_SESSION, hanp, hlen,
+					       DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5471,26 +6738,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_sync_by_handle(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_sync_by_handle(sid, (void *)INVALID_ADDR, hlen,
+					       DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5506,26 +6781,34 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_sync_by_handle(sid, hanp, INVALID_ADDR, DM_NO_TOKEN);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_sync_by_handle(sid, hanp, INVALID_ADDR,
+					       DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5541,18 +6824,23 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
 			rc = dm_sync_by_handle(sid, hanp, hlen, INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -5560,7 +6848,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5576,22 +6866,30 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) == DUMMY_STRLEN) ? 0 : -1) == -1) {
+		} else
+		    if ((rc =
+			 (write(fd, DUMMY_STRING, DUMMY_STRLEN) ==
+			  DUMMY_STRLEN) ? 0 : -1) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_sync_by_handle(sid, hanp, hlen, DM_NO_TOKEN);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -5599,7 +6897,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5616,22 +6916,28 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
 			rc = dm_sync_by_handle(sid, hanp, hlen, DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5647,14 +6953,19 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DUMMY_FILE, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -5666,7 +6977,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -5681,7 +6994,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_sync_by_handle(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN);
+		rc = dm_sync_by_handle(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				       DM_NO_TOKEN);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -5697,7 +7011,9 @@
 		size_t hlen;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
@@ -5709,11 +7025,14 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
 			rc = dm_sync_by_handle(sid, hanp, hlen, DM_NO_TOKEN);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
diff --git a/testcases/kernel/fs/dmapi/hole.c b/testcases/kernel/fs/dmapi/hole.c
index 4927d56..daddc9a 100644
--- a/testcases/kernel/fs/dmapi/hole.c
+++ b/testcases/kernel/fs/dmapi/hole.c
@@ -43,14 +43,17 @@
 dm_extent_t Extents[NUM_EXTENTS];
 dm_extent_t bigExtents[20];
 
-void LogExtents(dm_extent_t *pext, u_int nelem)
+void LogExtents(dm_extent_t * pext, u_int nelem)
 {
 
 	int i;
 
 	DMLOG_PRINT(DMLVL_DEBUG, "Extents:\n");
 	for (i = 0; i < nelem; i++, pext++) {
-		DMLOG_PRINT(DMLVL_DEBUG, "  extent %d: type %d, offset %lld, length %lld\n", i + 1, pext->ex_type, pext->ex_offset, pext->ex_length);
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "  extent %d: type %d, offset %lld, length %lld\n",
+			    i + 1, pext->ex_type, pext->ex_offset,
+			    pext->ex_length);
 	}
 
 }
@@ -60,8 +63,8 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 
 	DMOPT_PARSE(argc, argv);
@@ -69,18 +72,25 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   != 0) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
 	} else {
 		int fd;
 
-		fd = open(DUMMY_TMP, O_RDWR | O_CREAT | O_TRUNC, DUMMY_FILE_RW_MODE);
+		fd = open(DUMMY_TMP, O_RDWR | O_CREAT | O_TRUNC,
+			  DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < (TMP_FILELEN/DUMMY_STRLEN); i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < (TMP_FILELEN / DUMMY_STRLEN); i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -92,13 +102,15 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI file hole tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI file hole tests\n");
 
 	szFuncName = "dm_get_allocinfo";
 
@@ -124,19 +136,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_allocinfo(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, &off, NUM_EXTENTS,
+					      Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -164,19 +183,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, (void *)INVALID_ADDR, hlen,
+					      DM_NO_TOKEN, &off, NUM_EXTENTS,
+					      Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -198,22 +224,30 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -241,19 +275,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, &off, NUM_EXTENTS,
+					      Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -281,19 +322,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, INVALID_ADDR, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, INVALID_ADDR,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -320,19 +368,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid offp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, (dm_off_t *)INVALID_ADDR, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid offp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      (dm_off_t *) INVALID_ADDR,
+					      NUM_EXTENTS, Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -360,19 +415,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned offp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned offp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -386,7 +448,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = TMP_FILELEN+1;
+		dm_off_t off = TMP_FILELEN + 1;
 		u_int nelem;
 
 		/* Variation set up */
@@ -400,19 +462,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(off past EOF)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(off past EOF)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -440,19 +509,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem zero)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, 0, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem zero)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, 0, Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -480,19 +555,27 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid extentp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, (dm_extent_t *)INVALID_ADDR, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid extentp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS,
+					      (dm_extent_t *) INVALID_ADDR,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -519,19 +602,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      (u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -549,31 +639,44 @@
 		u_int nelem;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero-length file)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero-length file)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "dm_get_allocinfo returned %d\n", rc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 				if (nelem == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -581,7 +684,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -609,31 +714,50 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file all resident)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file all resident)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "dm_get_allocinfo returned %d\n", rc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 				if (nelem == 1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((Extents[0].ex_length == TMP_FILELEN) && (Extents[0].ex_offset == 0) && (Extents[0].ex_type == DM_EXTENT_RES)) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((Extents[0].ex_length ==
+					     TMP_FILELEN)
+					    && (Extents[0].ex_offset == 0)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_RES)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct!\n", szFuncName);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct!\n",
+							    szFuncName);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -641,7 +765,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -659,42 +785,74 @@
 		u_int nelem;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if (((off = lseek(fd, TMP_FILELEN-DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN-DUMMY_STRLEN) ||
-			   ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((rc = ftruncate(fd, ((TMP_FILELEN/2)&(~(BLK_SIZE-1))))) == -1) ||
-			   ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
+		} else
+		    if (((off =
+			  lseek(fd, TMP_FILELEN - DUMMY_STRLEN,
+				SEEK_SET)) != TMP_FILELEN - DUMMY_STRLEN)
+			||
+			((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			||
+			((rc =
+			  ftruncate(fd,
+				    ((TMP_FILELEN / 2) & (~(BLK_SIZE - 1))))) ==
+			 -1)
+			|| ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
-		if (fd == -1 || off != (TMP_FILELEN-DUMMY_STRLEN) || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (fd == -1 || off != (TMP_FILELEN - DUMMY_STRLEN) || rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			off = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file all hole)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file all hole)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "dm_get_allocinfo returned %d\n", rc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 				if (nelem == 1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((Extents[0].ex_length == ((TMP_FILELEN/2)&(~(BLK_SIZE-1)))) && (Extents[0].ex_offset == 0) && (Extents[0].ex_type == DM_EXTENT_HOLE)) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((Extents[0].ex_length ==
+					     ((TMP_FILELEN /
+					       2) & (~(BLK_SIZE - 1))))
+					    && (Extents[0].ex_offset == 0)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_HOLE)) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct!\n", szFuncName);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct!\n",
+							    szFuncName);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -702,7 +860,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -720,48 +880,78 @@
 		u_int nelem;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if (((off = lseek(fd, TMP_FILELEN-DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN-DUMMY_STRLEN) ||
-			   ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
+		} else
+		    if (((off =
+			  lseek(fd, TMP_FILELEN - DUMMY_STRLEN,
+				SEEK_SET)) != TMP_FILELEN - DUMMY_STRLEN)
+			||
+			((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			|| ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
-		if (fd == -1 || off != (TMP_FILELEN-DUMMY_STRLEN) || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (fd == -1 || off != (TMP_FILELEN - DUMMY_STRLEN) || rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			off = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(hole, resident)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(hole, resident)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 				if (nelem == 2) {
 					int i;
 
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((i=1) && (Extents[0].ex_length + Extents[1].ex_length == TMP_FILELEN) &&
-					    (i=2) && (Extents[0].ex_offset == 0) &&
-					    (i=3) && (Extents[0].ex_length == Extents[1].ex_offset) &&
-					    (i=4) && (Extents[0].ex_type == DM_EXTENT_HOLE) &&
-					    (i=5) && (Extents[1].ex_type == DM_EXTENT_RES)
-					   ) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((i = 1)
+					    && (Extents[0].ex_length +
+						Extents[1].ex_length ==
+						TMP_FILELEN) && (i = 2)
+					    && (Extents[0].ex_offset == 0)
+					    && (i = 3)
+					    && (Extents[0].ex_length ==
+						Extents[1].ex_offset) && (i = 4)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_HOLE) && (i = 5)
+					    && (Extents[1].ex_type ==
+						DM_EXTENT_RES)
+					    ) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct! (test %d failed)\n", szFuncName, i);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct! (test %d failed)\n",
+							    szFuncName, i);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 2);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -769,7 +959,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -787,50 +979,89 @@
 		u_int nelem;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if (((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((off = lseek(fd, TMP_FILELEN-DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN-DUMMY_STRLEN) ||
-			   ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((rc = ftruncate(fd, ((TMP_FILELEN/2)&(~(BLK_SIZE-1))))) == -1) ||
-			   ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
+		} else
+		    if (((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			||
+			((off =
+			  lseek(fd, TMP_FILELEN - DUMMY_STRLEN,
+				SEEK_SET)) != TMP_FILELEN - DUMMY_STRLEN)
+			||
+			((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			||
+			((rc =
+			  ftruncate(fd,
+				    ((TMP_FILELEN / 2) & (~(BLK_SIZE - 1))))) ==
+			 -1)
+			|| ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
-		if (fd == -1 || off != (TMP_FILELEN-DUMMY_STRLEN) || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (fd == -1 || off != (TMP_FILELEN - DUMMY_STRLEN) || rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			off = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(resident, hole)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(resident, hole)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 				if (nelem == 2) {
 					int i;
 
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((i=1) && (Extents[0].ex_length + Extents[1].ex_length == ((TMP_FILELEN/2)&(~(BLK_SIZE-1)))) &&
-					    (i=2) && (Extents[0].ex_offset == 0) &&
-					    (i=3) && (Extents[0].ex_length == Extents[1].ex_offset) &&
-					    (i=4) && (Extents[0].ex_type == DM_EXTENT_RES) &&
-					    (i=5) && (Extents[1].ex_type == DM_EXTENT_HOLE)
-					   ) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((i = 1)
+					    && (Extents[0].ex_length +
+						Extents[1].ex_length ==
+						((TMP_FILELEN /
+						  2) & (~(BLK_SIZE - 1))))
+					    && (i = 2)
+					    && (Extents[0].ex_offset == 0)
+					    && (i = 3)
+					    && (Extents[0].ex_length ==
+						Extents[1].ex_offset) && (i = 4)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_RES) && (i = 5)
+					    && (Extents[1].ex_type ==
+						DM_EXTENT_HOLE)
+					    ) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct! (test %d failed)\n", szFuncName, i);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct! (test %d failed)\n",
+							    szFuncName, i);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 2);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -838,7 +1069,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -856,51 +1089,89 @@
 		u_int nelem;
 
 		/* Variation set up */
-		if ((fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DUMMY_FILE, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if (((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((off = lseek(fd, TMP_FILELEN-DUMMY_STRLEN, SEEK_SET)) != TMP_FILELEN-DUMMY_STRLEN) ||
-			   ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-			   ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
+		} else
+		    if (((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			||
+			((off =
+			  lseek(fd, TMP_FILELEN - DUMMY_STRLEN,
+				SEEK_SET)) != TMP_FILELEN - DUMMY_STRLEN)
+			||
+			((rc =
+			  (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			   DUMMY_STRLEN) ? -1 : 0) == -1)
+			|| ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1)) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
-		if (fd == -1 || off != (TMP_FILELEN-DUMMY_STRLEN) || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (fd == -1 || off != (TMP_FILELEN - DUMMY_STRLEN) || rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			off = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(resident, hole, resident)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(resident, hole, resident)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				int i;
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 
 				if (nelem == 3) {
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((i=1) && (Extents[0].ex_length + Extents[1].ex_length + Extents[2].ex_length == TMP_FILELEN) &&
-					    (i=2) && (Extents[0].ex_offset == 0) &&
-					    (i=3) && (Extents[0].ex_length == Extents[1].ex_offset) &&
-					    (i=4) && (Extents[1].ex_length + Extents[1].ex_offset == Extents[2].ex_offset) &&
-					    (i=5) && (Extents[0].ex_type == DM_EXTENT_RES) &&
-					    (i=6) && (Extents[1].ex_type == DM_EXTENT_HOLE) &&
-					    (i=7) && (Extents[2].ex_type == DM_EXTENT_RES)
-					   ) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((i = 1)
+					    && (Extents[0].ex_length +
+						Extents[1].ex_length +
+						Extents[2].ex_length ==
+						TMP_FILELEN) && (i = 2)
+					    && (Extents[0].ex_offset == 0)
+					    && (i = 3)
+					    && (Extents[0].ex_length ==
+						Extents[1].ex_offset) && (i = 4)
+					    && (Extents[1].ex_length +
+						Extents[1].ex_offset ==
+						Extents[2].ex_offset) && (i = 5)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_RES) && (i = 6)
+					    && (Extents[1].ex_type ==
+						DM_EXTENT_HOLE) && (i = 7)
+					    && (Extents[2].ex_type ==
+						DM_EXTENT_RES)
+					    ) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct! (test %d failed)\n", szFuncName, i);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct! (test %d failed)\n",
+							    szFuncName, i);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 3);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -908,7 +1179,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -928,82 +1201,160 @@
 
 		/* Variation set up */
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
-		for (i = 0, rc = 0; rc == 0 && i < TMP_FILELEN; i += TMP_FILELEN/(NUM_EXTENTS+2)) {
-			if ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) != -1) {
+		for (i = 0, rc = 0; rc == 0 && i < TMP_FILELEN;
+		     i += TMP_FILELEN / (NUM_EXTENTS + 2)) {
+			if ((rc =
+			     (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+			      DUMMY_STRLEN) ? -1 : 0) != -1) {
 				if ((off = lseek(fd, i, SEEK_SET)) != off) {
 					rc = -1;
 				}
 			}
 		}
 		if ((rc == -1) ||
-		    ((off = lseek(fd, TMP_FILELEN-DUMMY_STRLEN, SEEK_SET)) != off) ||
-		    ((rc = (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) ? -1 : 0) == -1) ||
-		    ((rc = dm_fd_to_handle(fd, &hanp, &hlen)))) {
+		    ((off =
+		      lseek(fd, TMP_FILELEN - DUMMY_STRLEN, SEEK_SET)) != off)
+		    ||
+		    ((rc =
+		      (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+		       DUMMY_STRLEN) ? -1 : 0) == -1)
+		    || ((rc = dm_fd_to_handle(fd, &hanp, &hlen)))) {
 			close(fd);
 			remove(DUMMY_FILE);
 		}
-		if (fd == -1 || off != TMP_FILELEN-DUMMY_STRLEN || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+		if (fd == -1 || off != TMP_FILELEN - DUMMY_STRLEN || rc == -1) {
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			off = 0;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(resident, hole, resident, hole, etc.)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(resident, hole, resident, hole, etc.)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 1) {
 				int i;
 				DMLOG_PRINT(DMLVL_DEBUG, "  off = %lld\n", off);
 
 				if (nelem == NUM_EXTENTS) {
-					DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  nelem = %d\n", nelem);
 					LogExtents(Extents, nelem);
-					if ((i=1) && (Extents[0].ex_offset == 0) &&
-					    (i=2) && (Extents[0].ex_length == Extents[1].ex_offset) &&
-					    (i=3) && (Extents[1].ex_length + Extents[1].ex_offset == Extents[2].ex_offset) &&
-					    (i=4) && (Extents[2].ex_length + Extents[2].ex_offset == Extents[3].ex_offset) &&
-					    (i=5) && (Extents[3].ex_length + Extents[3].ex_offset == Extents[4].ex_offset) &&
-					    (i=6) && (Extents[4].ex_length + Extents[4].ex_offset == Extents[5].ex_offset) &&
-					    (i=7) && (Extents[5].ex_length + Extents[5].ex_offset == Extents[6].ex_offset) &&
-					    (i=8) && (Extents[6].ex_length + Extents[6].ex_offset == Extents[7].ex_offset) &&
-					    (i=9) && (Extents[7].ex_length + Extents[7].ex_offset == off) &&
-					    (i=10) && (Extents[0].ex_type == DM_EXTENT_RES) &&
-					    (i=11) && (Extents[1].ex_type == DM_EXTENT_HOLE) &&
-					    (i=12) && (Extents[2].ex_type == DM_EXTENT_RES) &&
-					    (i=13) && (Extents[3].ex_type == DM_EXTENT_HOLE) &&
-					    (i=14) && (Extents[4].ex_type == DM_EXTENT_RES) &&
-					    (i=15) && (Extents[5].ex_type == DM_EXTENT_HOLE) &&
-					    (i=16) && (Extents[6].ex_type == DM_EXTENT_RES) &&
-					    (i=17) && (Extents[7].ex_type == DM_EXTENT_HOLE)
-					   ) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s extent information correct\n", szFuncName);
+					if ((i = 1)
+					    && (Extents[0].ex_offset == 0)
+					    && (i = 2)
+					    && (Extents[0].ex_length ==
+						Extents[1].ex_offset) && (i = 3)
+					    && (Extents[1].ex_length +
+						Extents[1].ex_offset ==
+						Extents[2].ex_offset) && (i = 4)
+					    && (Extents[2].ex_length +
+						Extents[2].ex_offset ==
+						Extents[3].ex_offset) && (i = 5)
+					    && (Extents[3].ex_length +
+						Extents[3].ex_offset ==
+						Extents[4].ex_offset) && (i = 6)
+					    && (Extents[4].ex_length +
+						Extents[4].ex_offset ==
+						Extents[5].ex_offset) && (i = 7)
+					    && (Extents[5].ex_length +
+						Extents[5].ex_offset ==
+						Extents[6].ex_offset) && (i = 8)
+					    && (Extents[6].ex_length +
+						Extents[6].ex_offset ==
+						Extents[7].ex_offset) && (i = 9)
+					    && (Extents[7].ex_length +
+						Extents[7].ex_offset == off)
+					    && (i = 10)
+					    && (Extents[0].ex_type ==
+						DM_EXTENT_RES) && (i = 11)
+					    && (Extents[1].ex_type ==
+						DM_EXTENT_HOLE) && (i = 12)
+					    && (Extents[2].ex_type ==
+						DM_EXTENT_RES) && (i = 13)
+					    && (Extents[3].ex_type ==
+						DM_EXTENT_HOLE) && (i = 14)
+					    && (Extents[4].ex_type ==
+						DM_EXTENT_RES) && (i = 15)
+					    && (Extents[5].ex_type ==
+						DM_EXTENT_HOLE) && (i = 16)
+					    && (Extents[6].ex_type ==
+						DM_EXTENT_RES) && (i = 17)
+					    && (Extents[7].ex_type ==
+						DM_EXTENT_HOLE)
+					    ) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s extent information correct\n",
+							    szFuncName);
 
-					    	rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, sizeof(bigExtents)/sizeof(dm_extent_t), bigExtents, &nelem);
-						DMLOG_PRINT(DMLVL_DEBUG, "second %s returned %d\n", szFuncName, rc);
+						rc = dm_get_allocinfo(sid, hanp,
+								      hlen,
+								      DM_NO_TOKEN,
+								      &off,
+								      sizeof
+								      (bigExtents)
+								      /
+								      sizeof
+								      (dm_extent_t),
+								      bigExtents,
+								      &nelem);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "second %s returned %d\n",
+							    szFuncName, rc);
 						if (rc == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
-							LogExtents(bigExtents, nelem);
-							if (bigExtents[nelem-1].ex_offset + bigExtents[nelem-1].ex_length == TMP_FILELEN) {
-								DMLOG_PRINT(DMLVL_DEBUG, "second %s extent information correct\n", szFuncName);
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "  nelem = %d\n",
+								    nelem);
+							LogExtents(bigExtents,
+								   nelem);
+							if (bigExtents
+							    [nelem -
+							     1].ex_offset +
+							    bigExtents[nelem -
+								       1].
+							    ex_length ==
+							    TMP_FILELEN) {
+								DMLOG_PRINT
+								    (DMLVL_DEBUG,
+								     "second %s extent information correct\n",
+								     szFuncName);
 								DMVAR_PASS();
 							} else {
-								DMLOG_PRINT(DMLVL_ERR, "second %s extent information NOT correct!\n", szFuncName);
+								DMLOG_PRINT
+								    (DMLVL_ERR,
+								     "second %s extent information NOT correct!\n",
+								     szFuncName);
 								DMVAR_FAIL();
 							}
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "second %s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "second %s failed with unexpected rc = %d (errno = %d)\n",
+								    szFuncName,
+								    rc, errno);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s extent information NOT correct! (test %d failed)\n", szFuncName, i);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s extent information NOT correct! (test %d failed)\n",
+							    szFuncName, i);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 3);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s nelem NOT correct! (%d vs %d)\n",
+						    szFuncName, nelem, 3);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1011,7 +1362,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1039,19 +1392,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_allocinfo(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, &off, NUM_EXTENTS,
+					      Extents, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1070,22 +1430,31 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp,
+					     &hlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1103,7 +1472,9 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_allocinfo(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+		rc = dm_get_allocinfo(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      DM_NO_TOKEN, &off, NUM_EXTENTS, Extents,
+				      &nelem);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -1136,12 +1507,17 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      &off, NUM_EXTENTS, Extents,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -1173,19 +1549,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_probe_hole(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_probe_hole(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, inoff, inlen, &outoff,
+					   &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1213,19 +1596,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_probe_hole(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, inoff, inlen, &outoff,
+					   &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1243,23 +1633,30 @@
 
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
-			/* No clean up*/
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+			/* No clean up */
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1287,19 +1684,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   inoff, inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1327,19 +1730,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, INVALID_ADDR, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, INVALID_ADDR, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1353,7 +1762,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t inoff = TMP_FILELEN+1, outoff;
+		dm_off_t inoff = TMP_FILELEN + 1, outoff;
 		dm_size_t inlen = 0, outlen;
 
 		/* Variation set up */
@@ -1367,19 +1776,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1397,7 +1812,7 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t inoff = 0, outoff;
-		dm_size_t inlen = TMP_FILELEN+1, outlen;
+		dm_size_t inlen = TMP_FILELEN + 1, outlen;
 
 		/* Variation set up */
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
@@ -1410,19 +1825,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid len)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid len)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1450,19 +1871,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid roffp)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, (dm_off_t *)INVALID_ADDR, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid roffp)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, (dm_off_t *) INVALID_ADDR,
+					   &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1490,19 +1918,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, (dm_size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff,
+					   (dm_size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1530,29 +1965,47 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(entire file)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(entire file)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
 				if (outoff == inoff) {
 					if (outlen == inlen) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n", szFuncName, rc, outlen, inlen);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n",
+							    szFuncName, rc,
+							    outlen, inlen);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n", szFuncName, rc, outoff, inoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n",
+						    szFuncName, rc, outoff,
+						    inoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1560,7 +2013,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1588,29 +2043,48 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(end of file without rounding)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(end of file without rounding)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
 				if (outoff == inoff) {
 					if (outlen == inlen) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n", szFuncName, rc, outlen, inlen);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n",
+							    szFuncName, rc,
+							    outlen, inlen);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n", szFuncName, rc, outoff, inoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n",
+						    szFuncName, rc, outoff,
+						    inoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1618,7 +2092,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1646,29 +2122,48 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(end of file with rounding)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(end of file with rounding)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
-				if ((outoff >= inoff) && (!(outoff & (BLK_SIZE-1)))) {
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
+				if ((outoff >= inoff)
+				    && (!(outoff & (BLK_SIZE - 1)))) {
 					if (outlen == 0) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n", szFuncName, rc, outlen, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n",
+							    szFuncName, rc,
+							    outlen, 0);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff %d\n", szFuncName, rc, outoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff %d\n",
+						    szFuncName, rc, outoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1676,7 +2171,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1692,7 +2189,9 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t inoff = BLKALIGN(UNALIGNED_BLK_OFF), outoff;
-		dm_size_t inlen = BLKALIGN(TMP_FILELEN - BLK_SIZE - UNALIGNED_BLK_OFF), outlen;
+		dm_size_t inlen =
+		    BLKALIGN(TMP_FILELEN - BLK_SIZE - UNALIGNED_BLK_OFF),
+		    outlen;
 
 		/* Variation set up */
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
@@ -1705,29 +2204,48 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(middle of file without rounding)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(middle of file without rounding)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
-				if (outoff == inoff)  {
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
+				if (outoff == inoff) {
 					if (outlen == inlen) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n", szFuncName, rc, outlen, inlen);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen (%d vs %d)\n",
+							    szFuncName, rc,
+							    outlen, inlen);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n", szFuncName, rc, outoff, inoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff (%d vs %d)\n",
+						    szFuncName, rc, outoff,
+						    inoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1735,12 +2253,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1755,7 +2276,8 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t inoff = UNALIGNED_BLK_OFF, outoff;
-		dm_size_t inlen = TMP_FILELEN - BLK_SIZE - UNALIGNED_BLK_OFF, outlen;
+		dm_size_t inlen =
+		    TMP_FILELEN - BLK_SIZE - UNALIGNED_BLK_OFF, outlen;
 
 		/* Variation set up */
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
@@ -1768,29 +2290,49 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(middle of file with rounding, large)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(middle of file with rounding, large)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
-				if ((outoff >= inoff) && (!(outoff & (BLK_SIZE-1)))) {
-					if ((outlen <= inlen) && (!(outlen & (BLK_SIZE-1)))) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
+				if ((outoff >= inoff)
+				    && (!(outoff & (BLK_SIZE - 1)))) {
+					if ((outlen <= inlen)
+					    && (!(outlen & (BLK_SIZE - 1)))) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen %d\n", szFuncName, rc, outlen);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen %d\n",
+							    szFuncName, rc,
+							    outlen);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff %d\n", szFuncName, rc, outoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff %d\n",
+						    szFuncName, rc, outoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1798,12 +2340,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1817,8 +2362,8 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t inoff = TMP_FILELEN/2 - BLK_SIZE, outoff;
-		dm_size_t inlen = 5*BLK_SIZE, outlen;
+		dm_off_t inoff = TMP_FILELEN / 2 - BLK_SIZE, outoff;
+		dm_size_t inlen = 5 * BLK_SIZE, outlen;
 
 		/* Variation set up */
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
@@ -1831,29 +2376,49 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(middle of file with rounding, small)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(middle of file with rounding, small)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "In -> offset %lld, length %lld\n", inoff, inlen);
-				DMLOG_PRINT(DMLVL_DEBUG, "Out <- offset %lld, length %lld\n", outoff, outlen);
-				if ((outoff >= inoff) && (!(outoff & (BLK_SIZE-1)))) {
-					if ((outlen <= inlen) && (!(outlen & (BLK_SIZE-1)))) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "In -> offset %lld, length %lld\n",
+					    inoff, inlen);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Out <- offset %lld, length %lld\n",
+					    outoff, outlen);
+				if ((outoff >= inoff)
+				    && (!(outoff & (BLK_SIZE - 1)))) {
+					if ((outlen <= inlen)
+					    && (!(outlen & (BLK_SIZE - 1)))) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc %d\n",
+							    szFuncName, rc);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outlen %d\n", szFuncName, rc, outlen);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc %d but unexpected outlen %d\n",
+							    szFuncName, rc,
+							    outlen);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc %d but unexpected outoff %d\n", szFuncName, rc, outoff);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc %d but unexpected outoff %d\n",
+						    szFuncName, rc, outoff);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -1861,12 +2426,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1880,7 +2448,8 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t inoff = ((TMP_FILELEN/2) & ~(BLK_SIZE-1)) + 1, outoff;
+		dm_off_t inoff =
+		    ((TMP_FILELEN / 2) & ~(BLK_SIZE - 1)) + 1, outoff;
 		dm_size_t inlen = BLK_SIZE, outlen;
 
 		/* Variation set up */
@@ -1894,24 +2463,32 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(middle of file with rounding, no hole)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(middle of file with rounding, no hole)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -1938,19 +2515,26 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_probe_hole(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_probe_hole(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, inoff, inlen, &outoff,
+					   &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1969,22 +2553,30 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp,
+					     &hlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2002,7 +2594,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_probe_hole(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+		rc = dm_probe_hole(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -2035,12 +2628,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, &outoff, &outlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_probe_hole(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, &outoff, &outlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -2072,19 +2669,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_punch_hole(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_punch_hole(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, off, len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2112,19 +2715,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_punch_hole(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, off, len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2143,22 +2752,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DUMMY_SUBDIR, &hanp, &hlen))
+			   == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2186,19 +2802,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   off, len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2226,19 +2848,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, INVALID_ADDR, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, INVALID_ADDR, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2252,7 +2880,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = TMP_FILELEN+1;
+		dm_off_t off = TMP_FILELEN + 1;
 		dm_size_t len = 0;
 
 		/* Variation set up */
@@ -2266,19 +2894,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2293,7 +2927,7 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t off = 0;
-		dm_size_t len = TMP_FILELEN+1;
+		dm_size_t len = TMP_FILELEN + 1;
 
 		/* Variation set up */
 		sprintf(command, "cp %s %s", DUMMY_TMP, DUMMY_FILE);
@@ -2306,19 +2940,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid len)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid len)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2346,19 +2986,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned off)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned off)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EAGAIN);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2386,19 +3032,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned len)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned len)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EAGAIN);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2426,19 +3078,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned off and len)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(unaligned off and len)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EAGAIN);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2467,31 +3125,50 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate entire file)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate entire file)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				off = 0;
-				rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-				DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+				rc = dm_get_allocinfo(sid, hanp, hlen,
+						      DM_NO_TOKEN, &off,
+						      NUM_EXTENTS, Extents,
+						      &nelem);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "dm_get_allocinfo returned %d\n",
+					    rc);
 				if (rc == 0) {
-				       	if (nelem == 0) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					if (nelem == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  nelem = %d\n",
+							    nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s nelem NOT correct! (%d vs %d)\n",
+							    szFuncName, nelem,
+							    0);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2499,7 +3176,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2528,32 +3207,52 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate part of file, len 0)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(truncate part of file, len 0)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				off = 0;
-				rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-				DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+				rc = dm_get_allocinfo(sid, hanp, hlen,
+						      DM_NO_TOKEN, &off,
+						      NUM_EXTENTS, Extents,
+						      &nelem);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "dm_get_allocinfo returned %d\n",
+					    rc);
 				if (rc == 0) {
-				       	if (nelem == 1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					if (nelem == 1) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  nelem = %d\n",
+							    nelem);
 						LogExtents(Extents, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s nelem NOT correct! (%d vs %d)\n",
+							    szFuncName, nelem,
+							    1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2561,7 +3260,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2576,7 +3277,7 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t off = BLK_SIZE;
-		dm_size_t len = TMP_FILELEN-BLK_SIZE;
+		dm_size_t len = TMP_FILELEN - BLK_SIZE;
 		u_int nelem;
 
 		/* Variation set up */
@@ -2590,32 +3291,52 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(truncate part of file, len non-0)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(truncate part of file, len non-0)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				off = 0;
-				rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-				DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+				rc = dm_get_allocinfo(sid, hanp, hlen,
+						      DM_NO_TOKEN, &off,
+						      NUM_EXTENTS, Extents,
+						      &nelem);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "dm_get_allocinfo returned %d\n",
+					    rc);
 				if (rc == 0) {
-				       	if (nelem == 1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					if (nelem == 1) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  nelem = %d\n",
+							    nelem);
 						LogExtents(Extents, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s nelem NOT correct! (%d vs %d)\n",
+							    szFuncName, nelem,
+							    1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2623,7 +3344,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2638,8 +3361,8 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = (TMP_FILELEN/2) & (~(BLK_SIZE-1));
-		dm_size_t len = 2*BLK_SIZE;
+		dm_off_t off = (TMP_FILELEN / 2) & (~(BLK_SIZE - 1));
+		dm_size_t len = 2 * BLK_SIZE;
 		u_int nelem;
 		char buf[DUMMY_STRLEN];
 
@@ -2654,38 +3377,73 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(small hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(small hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				off = 0;
-				rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-				DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+				rc = dm_get_allocinfo(sid, hanp, hlen,
+						      DM_NO_TOKEN, &off,
+						      NUM_EXTENTS, Extents,
+						      &nelem);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "dm_get_allocinfo returned %d\n",
+					    rc);
 				if (rc == 0) {
-				       	if (nelem == 3) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					if (nelem == 3) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  nelem = %d\n",
+							    nelem);
 						LogExtents(Extents, nelem);
-						if ((lseek(fd, TMP_FILELEN/2, SEEK_SET) == (TMP_FILELEN/2)) && (read(fd, buf, DUMMY_STRLEN) == DUMMY_STRLEN)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "buffer from hole: [%s]\n", buf);
+						if ((lseek
+						     (fd, TMP_FILELEN / 2,
+						      SEEK_SET) ==
+						     (TMP_FILELEN / 2))
+						    &&
+						    (read(fd, buf, DUMMY_STRLEN)
+						     == DUMMY_STRLEN)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "buffer from hole: [%s]\n",
+								    buf);
 						}
-						if ((lseek(fd, TMP_FILELEN-10, SEEK_SET) == (TMP_FILELEN-10)) && (read(fd, buf, DUMMY_STRLEN) == DUMMY_STRLEN)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "buffer from resident extent: [%s]\n", buf);
+						if ((lseek
+						     (fd, TMP_FILELEN - 10,
+						      SEEK_SET) ==
+						     (TMP_FILELEN - 10))
+						    &&
+						    (read(fd, buf, DUMMY_STRLEN)
+						     == DUMMY_STRLEN)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "buffer from resident extent: [%s]\n",
+								    buf);
 						}
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 3);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s nelem NOT correct! (%d vs %d)\n",
+							    szFuncName, nelem,
+							    3);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2693,12 +3451,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2713,7 +3474,8 @@
 		void *hanp;
 		size_t hlen;
 		dm_off_t off = BLK_SIZE;
-		dm_size_t len = (TMP_FILELEN-(2*BLK_SIZE)) & (~(BLK_SIZE-1));
+		dm_size_t len =
+		    (TMP_FILELEN - (2 * BLK_SIZE)) & (~(BLK_SIZE - 1));
 		u_int nelem;
 
 		/* Variation set up */
@@ -2727,32 +3489,51 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(large hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
-			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName, rc);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(large hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s returned %d\n", szFuncName,
+				    rc);
 			if (rc == 0) {
 				off = 0;
-				rc = dm_get_allocinfo(sid, hanp, hlen, DM_NO_TOKEN, &off, NUM_EXTENTS, Extents, &nelem);
-				DMLOG_PRINT(DMLVL_DEBUG, "dm_get_allocinfo returned %d\n", rc);
+				rc = dm_get_allocinfo(sid, hanp, hlen,
+						      DM_NO_TOKEN, &off,
+						      NUM_EXTENTS, Extents,
+						      &nelem);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "dm_get_allocinfo returned %d\n",
+					    rc);
 				if (rc == 0) {
-				       	if (nelem == 3) {
-						DMLOG_PRINT(DMLVL_DEBUG, "  nelem = %d\n", nelem);
+					if (nelem == 3) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "  nelem = %d\n",
+							    nelem);
 						LogExtents(Extents, nelem);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s nelem NOT correct! (%d vs %d)\n", szFuncName, nelem, 3);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s nelem NOT correct! (%d vs %d)\n",
+							    szFuncName, nelem,
+							    3);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n", rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_get_allocinfo failed with unexpected rc = %d (errno = %d)\n",
+						    rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -2760,12 +3541,15 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with INTERIOR_HOLES defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with INTERIOR_HOLES defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -2792,19 +3576,25 @@
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_punch_hole(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_punch_hole(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, off, len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2823,22 +3613,30 @@
 		/* Variation set up */
 		if ((rc = mkdir(DUMMY_SUBDIR, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DUMMY_SUBDIR, &hanp, &hlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_path_to_fshandle(DUMMY_SUBDIR, &hanp,
+					     &hlen)) == -1) {
 			rmdir(DUMMY_SUBDIR);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DUMMY_SUBDIR);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2856,7 +3654,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_punch_hole(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, off, len);
+		rc = dm_punch_hole(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_NO_TOKEN, off, len);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -2889,12 +3688,16 @@
 			dm_handle_free(hanp, hlen);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -2923,18 +3726,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private read mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private read mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -2942,7 +3753,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -2969,18 +3782,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private write mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private write mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -2988,7 +3809,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3015,18 +3838,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private exec mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private exec mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3034,7 +3865,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3061,18 +3894,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private r/w mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private r/w mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3080,7 +3921,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3107,18 +3950,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared read mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared read mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3126,7 +3977,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3153,18 +4006,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared write mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared write mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3172,7 +4033,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3199,18 +4062,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared exec mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared exec mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3218,7 +4089,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3245,18 +4118,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_SHARED, fd, 0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared r/w mmap overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared r/w mmap overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3264,7 +4145,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3278,7 +4161,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3291,18 +4174,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private read mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private read mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3310,7 +4201,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3324,7 +4217,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3337,18 +4230,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private write mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private write mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3356,7 +4257,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3370,7 +4273,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3383,18 +4286,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private exec mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private exec mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3402,7 +4313,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3416,7 +4329,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3429,18 +4342,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private r/w mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private r/w mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3448,7 +4369,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3462,7 +4385,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3475,18 +4398,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared read mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared read mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3494,7 +4425,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3508,7 +4441,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3521,18 +4454,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared write mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared write mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3540,7 +4481,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3554,7 +4497,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3567,18 +4510,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared exec mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared exec mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -3586,7 +4537,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3600,7 +4553,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		dm_off_t off = BLKALIGN(TMP_FILELEN/2);
+		dm_off_t off = BLKALIGN(TMP_FILELEN / 2);
 		dm_size_t len = 0;
 		void *memmap;
 
@@ -3613,18 +4566,26 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DUMMY_FILE);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_SHARED, fd, 0)) == MAP_FAILED) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DUMMY_FILE);
 		}
 		if (fd == -1 || rc == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared r/w mmap not overlap hole)\n", szFuncName);
-			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off, len);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared r/w mmap not overlap hole)\n",
+				    szFuncName);
+			rc = dm_punch_hole(sid, hanp, hlen, DM_NO_TOKEN, off,
+					   len);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -3632,7 +4593,9 @@
 			rc = close(fd);
 			rc |= remove(DUMMY_FILE);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -3640,7 +4603,9 @@
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	remove(DUMMY_TMP);
diff --git a/testcases/kernel/fs/dmapi/invis.c b/testcases/kernel/fs/dmapi/invis.c
index 2909b17..75be0f4 100644
--- a/testcases/kernel/fs/dmapi/invis.c
+++ b/testcases/kernel/fs/dmapi/invis.c
@@ -110,8 +110,8 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events, maxFileEvents, minFileEvents;
 
@@ -123,21 +123,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -155,8 +169,9 @@
 		EVENT_DELIVERY_DELAY;
 		fd = open(DummyTmp, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < TMP_FILELEN/DUMMY_STRLEN; i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < TMP_FILELEN / DUMMY_STRLEN; i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -171,7 +186,9 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
@@ -180,7 +197,8 @@
 	numRegions = 1;
 	maxRegions[0].rg_offset = 0;
 	maxRegions[0].rg_size = 0;
-	maxRegions[0].rg_flags = DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE;
+	maxRegions[0].rg_flags =
+	    DM_REGION_READ | DM_REGION_WRITE | DM_REGION_TRUNCATE;
 	minRegions[0].rg_offset = 0;
 	minRegions[0].rg_size = 0;
 	minRegions[0].rg_flags = DM_REGION_NOEVENT;
@@ -205,7 +223,7 @@
 	DMEV_SET(DM_EVENT_PREUNMOUNT, minFileEvents);
 	DMEV_SET(DM_EVENT_UNMOUNT, minFileEvents);
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI invisible read/write tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI invisible read/write tests\n");
 
 	szFuncName = "dm_read_invis";
 
@@ -224,22 +242,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_read_invis(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_read_invis(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, inoff, inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -260,22 +285,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_read_invis(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, inoff, inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -296,22 +328,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   inoff, inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -332,22 +371,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, INVALID_ADDR, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, INVALID_ADDR, inoff,
+					   inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -363,7 +409,7 @@
 	if (DMVAR_EXEC(READ_INVIS_BASE + 5)) {
 		void *hanp;
 		size_t hlen;
-		dm_off_t inoff = TMP_FILELEN+1;
+		dm_off_t inoff = TMP_FILELEN + 1;
 		dm_size_t inlen = DUMMY_STRLEN;
 		char buf[DUMMY_STRLEN];
 
@@ -371,22 +417,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -406,22 +459,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, (void *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, (void *)INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -446,66 +506,102 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == inlen) {
 				DMLOG_PRINT(DMLVL_DEBUG, "read %d bytes\n", rc);
-				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if ((rc2 == 0) && (StatCmp(&statfs1, &statfs2) == 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if ((rc2 == 0)
+						    &&
+						    (StatCmp(&statfs1, &statfs2)
+						     == 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -519,7 +615,7 @@
 	if (DMVAR_EXEC(READ_INVIS_BASE + 8)) {
 		void *hanp, *fshanp;
 		size_t hlen, fshlen;
-		dm_off_t inoff = (TMP_FILELEN/2) - ((TMP_FILELEN/2) % 10);
+		dm_off_t inoff = (TMP_FILELEN / 2) - ((TMP_FILELEN / 2) % 10);
 		dm_size_t inlen = DUMMY_STRLEN;
 		char buf[DUMMY_STRLEN];
 		struct stat statfs1, statfs2;
@@ -531,66 +627,102 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == inlen) {
 				DMLOG_PRINT(DMLVL_DEBUG, "read %d bytes\n", rc);
-				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if ((rc2 == 0) && (StatCmp(&statfs1, &statfs2) == 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if ((rc2 == 0)
+						    &&
+						    (StatCmp(&statfs1, &statfs2)
+						     == 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -616,66 +748,101 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(file end)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == inlen) {
 				DMLOG_PRINT(DMLVL_DEBUG, "read %d bytes\n", rc);
-				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				if (memcmp(buf, DUMMY_STRING, DUMMY_STRLEN) ==
+				    0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if ((rc2 == 0) && (StatCmp(&statfs1, &statfs2) == 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if ((rc2 == 0)
+						    &&
+						    (StatCmp(&statfs1, &statfs2)
+						     == 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -689,7 +856,7 @@
 	if (DMVAR_EXEC(READ_INVIS_BASE + 10)) {
 		void *hanp, *fshanp;
 		size_t hlen, fshlen;
-		dm_off_t inoff = TMP_FILELEN - (DUMMY_STRLEN/2);
+		dm_off_t inoff = TMP_FILELEN - (DUMMY_STRLEN / 2);
 		dm_size_t inlen = DUMMY_STRLEN;
 		char buf[DUMMY_STRLEN];
 		struct stat statfs1, statfs2;
@@ -701,66 +868,103 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(overlaps file end)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(overlaps file end)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
-			if (rc == DUMMY_STRLEN/2) {
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
+			if (rc == DUMMY_STRLEN / 2) {
 				DMLOG_PRINT(DMLVL_DEBUG, "read %d bytes\n", rc);
-				if (memcmp(buf, DummyString+(DUMMY_STRLEN/2), DUMMY_STRLEN/2) == 0) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				if (memcmp
+				    (buf, DummyString + (DUMMY_STRLEN / 2),
+				     DUMMY_STRLEN / 2) == 0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if ((rc2 == 0) && (StatCmp(&statfs1, &statfs2) == 0)) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if ((rc2 == 0)
+						    &&
+						    (StatCmp(&statfs1, &statfs2)
+						     == 0)) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -782,22 +986,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_read_invis(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_read_invis(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, inoff, inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -817,22 +1028,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(directory handle)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(directory handle)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -852,22 +1070,28 @@
 		/* Variation set up */
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -886,7 +1110,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_read_invis(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, inoff, inlen, buf);
+		rc = dm_read_invis(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				   DM_NO_TOKEN, inoff, inlen, buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -907,18 +1132,23 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		} else if ((rc = remove(DummyFile)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_read_invis(sid, hanp, hlen, DM_NO_TOKEN, inoff,
+					   inlen, buf);
 			DMLOG_PRINT(DMLVL_DEBUG, "GOT %d, %s\n", rc, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
@@ -944,22 +1174,30 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_write_invis(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_write_invis(INVALID_ADDR, hanp, hlen,
+					    DM_NO_TOKEN, 0, outoff, outlen,
+					    buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -980,22 +1218,30 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_write_invis(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, (void *)INVALID_ADDR, hlen,
+					    DM_NO_TOKEN, 0, outoff, outlen,
+					    buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1016,22 +1262,30 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, INVALID_ADDR,
+					    DM_NO_TOKEN, 0, outoff, outlen,
+					    buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1052,22 +1306,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, INVALID_ADDR, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, INVALID_ADDR, 0,
+					    outoff, outlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1088,22 +1349,29 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off+len)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid off+len)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFBIG);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1123,22 +1391,30 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, (void *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen,
+					    (void *)INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1166,62 +1442,98 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start, async)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start, async)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1229,7 +1541,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1244,7 +1558,7 @@
 		int fd;
 		void *hanp, *fshanp;
 		size_t hlen, fshlen;
-		dm_off_t outoff = (TMP_FILELEN/2) - ((TMP_FILELEN/2) % 10);
+		dm_off_t outoff = (TMP_FILELEN / 2) - ((TMP_FILELEN / 2) % 10);
 		dm_size_t outlen = DUMMY_STRLEN;
 		char buf[DUMMY_STRLEN];
 		struct stat statfs1, statfs2;
@@ -1258,62 +1572,98 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle, async)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle, async)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1321,7 +1671,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1350,62 +1702,98 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file end, async)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file end, async)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1413,7 +1801,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1442,62 +1832,99 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start, sync)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, DM_WRITE_SYNC, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file start, sync)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN,
+					    DM_WRITE_SYNC, outoff, outlen,
+					    DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1505,7 +1932,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1520,7 +1949,7 @@
 		int fd;
 		void *hanp, *fshanp;
 		size_t hlen, fshlen;
-		dm_off_t outoff = (TMP_FILELEN/2) - ((TMP_FILELEN/2) % 10);
+		dm_off_t outoff = (TMP_FILELEN / 2) - ((TMP_FILELEN / 2) % 10);
 		dm_size_t outlen = DUMMY_STRLEN;
 		char buf[DUMMY_STRLEN];
 		struct stat statfs1, statfs2;
@@ -1534,62 +1963,99 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle, sync)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, DM_WRITE_SYNC, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file middle, sync)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN,
+					    DM_WRITE_SYNC, outoff, outlen,
+					    DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1597,7 +2063,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1626,62 +2094,99 @@
 			/* No clean up */
 		} else if ((fd = open(DummyFile, O_RDWR)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_handle_to_fshandle(hanp, hlen, &fshanp, &fshlen)) == -1) {
+		} else
+		    if ((rc =
+			 dm_handle_to_fshandle(hanp, hlen, &fshanp,
+					       &fshlen)) == -1) {
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &maxFileEvents, DM_EVENT_MAX)) == -1) ||
-			   ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, maxRegions, &exactflag)) == -1) ||
-			   ((rc = stat(DummyFile, &statfs1)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					   &maxFileEvents, DM_EVENT_MAX)) == -1)
+			||
+			((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, maxRegions,
+					&exactflag)) == -1)
+			|| ((rc = stat(DummyFile, &statfs1)) == -1)) {
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! %d\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! %d\n", errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			TIMESTAMP_DELAY;
 			eventReceived = DM_EVENT_INVALID;
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file end, sync)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, DM_WRITE_SYNC, outoff, outlen, DUMMY_STRING2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file end, sync)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN,
+					    DM_WRITE_SYNC, outoff, outlen,
+					    DUMMY_STRING2);
 			errnoSaved = errno;
 			EVENT_DELIVERY_DELAY;
 			rc2 = stat(DummyFile, &statfs2);
-			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, minRegions, &exactflag);
-			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN, &minFileEvents, DM_EVENT_MAX);
+			dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions,
+				      minRegions, &exactflag);
+			dm_set_eventlist(sid, fshanp, fshlen, DM_NO_TOKEN,
+					 &minFileEvents, DM_EVENT_MAX);
 			if (rc == outlen) {
-				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n", rc);
-				if ((rc2 == 0) && (lseek(fd, outoff, SEEK_SET) == outoff) && (read(fd, buf, DUMMY_STRLEN) == outlen) && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN) == 0)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buffer contents [%.*s]\n", rc, buf);
+				DMLOG_PRINT(DMLVL_DEBUG, "wrote %d bytes\n",
+					    rc);
+				if ((rc2 == 0)
+				    && (lseek(fd, outoff, SEEK_SET) == outoff)
+				    && (read(fd, buf, DUMMY_STRLEN) == outlen)
+				    && (memcmp(buf, DUMMY_STRING2, DUMMY_STRLEN)
+					== 0)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buffer contents [%.*s]\n",
+						    rc, buf);
 					if (eventReceived == DM_EVENT_INVALID) {
-						DMLOG_PRINT(DMLVL_DEBUG, "no event received\n");
-						if (StatCmp(&statfs1, &statfs2) == 0) {
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info same\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "no event received\n");
+						if (StatCmp(&statfs1, &statfs2)
+						    == 0) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info same\n");
 							DMVAR_PASS();
 						} else {
-							DMLOG_PRINT(DMLVL_ERR, "stat info NOT same!\n");
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info before:\n");
+							DMLOG_PRINT(DMLVL_ERR,
+								    "stat info NOT same!\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info before:\n");
 							LogStat(&statfs1);
-							DMLOG_PRINT(DMLVL_DEBUG, "stat info after:\n");
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "stat info after:\n");
 							LogStat(&statfs2);
 							DMVAR_FAIL();
 						}
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "event %d received!\n", eventReceived);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "event %d received!\n",
+							    eventReceived);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "buffer contents NOT correct! (%.*s vs %.*s)\n", DUMMY_STRLEN, DUMMY_STRING2, rc, buf);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "buffer contents NOT correct! (%.*s vs %.*s)\n",
+						    DUMMY_STRLEN, DUMMY_STRING2,
+						    rc, buf);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errnoSaved);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errnoSaved);
 				DMVAR_FAIL();
 			}
 
@@ -1689,7 +2194,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 			dm_handle_free(hanp, hlen);
@@ -1711,22 +2218,30 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_write_invis(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_write_invis(DM_NO_SESSION, hanp, hlen,
+					    DM_NO_TOKEN, 0, outoff, outlen,
+					    buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1746,22 +2261,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(directory handle)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(directory handle)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1781,22 +2303,28 @@
 		/* Variation set up */
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, outoff, outlen, buf);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    outoff, outlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1815,7 +2343,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_write_invis(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, 0, inoff, inlen, buf);
+		rc = dm_write_invis(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				    DM_NO_TOKEN, 0, inoff, inlen, buf);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -1836,18 +2365,23 @@
 		sprintf(command, "cp %s %s", DummyTmp, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			remove(DummyFile);
 		} else if ((rc = remove(DummyFile)) == -1) {
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n", szFuncName);
-			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0, inoff, inlen, buf);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated hanp)\n",
+				    szFuncName);
+			rc = dm_write_invis(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					    inoff, inlen, buf);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
@@ -1859,14 +2393,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -1891,16 +2428,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1909,26 +2451,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1951,9 +2506,12 @@
 			DMEV_SET(DM_EVENT_WRITE, events);
 			DMEV_SET(DM_EVENT_TRUNCATE, events);
 			DMEV_SET(DM_EVENT_ATTRIBUTE, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1961,16 +2519,21 @@
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1978,25 +2541,42 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_PREUNMOUNT) {
 			/* SPECIAL CASE: need to set response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_PREUNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle: %p\n", DM_GET_VALUE(nse, ne_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root directory handle length: %d\n", DM_GET_LEN(nse, ne_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_PREUNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Root directory handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle2));
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
-			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_UNMOUNT\n");
-			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n", nse->ne_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n", nse->ne_retcode);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Message is DM_EVENT_UNMOUNT\n");
+			DMLOG_PRINT(DMLVL_DEBUG, "  Unmount mode: %x\n",
+				    nse->ne_mode);
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    DM_GET_VALUE(nse, ne_handle1, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n",
+				    DM_GET_LEN(nse, ne_handle1));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Return code: %x\n",
+				    nse->ne_retcode);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -2007,56 +2587,82 @@
 
 			switch (type) {
 			case DM_EVENT_READ:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_READ\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_READ\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				response = DM_RESP_CONTINUE;
-				break;
-			}
+					response = DM_RESP_CONTINUE;
+					break;
+				}
 
 			case DM_EVENT_WRITE:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_WRITE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_WRITE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				response = DM_RESP_CONTINUE;
-				break;
-			}
+					response = DM_RESP_CONTINUE;
+					break;
+				}
 
 			case DM_EVENT_TRUNCATE:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_TRUNCATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_TRUNCATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
 
-				response = DM_RESP_CONTINUE;
-				break;
-			}
+					response = DM_RESP_CONTINUE;
+					break;
+				}
 
 			case DM_EVENT_CREATE:
 			case DM_EVENT_REMOVE:
@@ -2077,17 +2683,23 @@
 				break;
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/mmap.c b/testcases/kernel/fs/dmapi/mmap.c
index 986e3a9..639cf56 100644
--- a/testcases/kernel/fs/dmapi/mmap.c
+++ b/testcases/kernel/fs/dmapi/mmap.c
@@ -62,8 +62,8 @@
 {
 
 	char *varstr;
-	int   rc;
-	int   i;
+	int rc;
+	int i;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -75,21 +75,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -103,8 +117,9 @@
 		EVENT_DELIVERY_DELAY;
 		fd = open(DummyTmp, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < TMP_FILELEN/DUMMY_STRLEN; i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < TMP_FILELEN / DUMMY_STRLEN; i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -119,13 +134,16 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI memory mapped file synchronous event data tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI memory mapped file synchronous event data tests\n");
 
 	/*
 	 * TEST    : mmap - no regions
@@ -156,20 +174,26 @@
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -206,26 +230,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -262,26 +295,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -322,26 +364,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -350,7 +404,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -388,26 +444,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 0);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 0);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -416,7 +484,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -441,7 +511,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/2;
+		Regions[0].rg_offset = TMP_FILELEN / 2;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_READ;
 
@@ -453,26 +523,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -486,7 +565,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int numRegions;
@@ -497,7 +576,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/2;
+		Regions[0].rg_offset = TMP_FILELEN / 2;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_READ;
 
@@ -509,26 +588,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -542,7 +630,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int varStatus;
@@ -554,7 +642,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/4;
+		Regions[0].rg_offset = TMP_FILELEN / 4;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_READ;
 
@@ -566,26 +654,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -594,7 +694,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -608,7 +710,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int numRegions;
@@ -631,26 +733,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDONLY, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDONLY, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -685,20 +796,26 @@
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -735,26 +852,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -791,26 +917,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -848,26 +983,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -876,7 +1023,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -914,26 +1063,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 0);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 0);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -942,7 +1103,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -967,7 +1130,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/2;
+		Regions[0].rg_offset = TMP_FILELEN / 2;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_WRITE;
 
@@ -979,26 +1142,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1012,7 +1184,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int numRegions;
@@ -1023,7 +1195,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/2;
+		Regions[0].rg_offset = TMP_FILELEN / 2;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_WRITE;
 
@@ -1035,26 +1207,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1068,7 +1249,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int varStatus;
@@ -1080,7 +1261,7 @@
 		eventReceived = DM_EVENT_INVALID;
 		eventResponse = DM_RESP_CONTINUE;
 		numRegions = 1;
-		Regions[0].rg_offset = TMP_FILELEN/4;
+		Regions[0].rg_offset = TMP_FILELEN / 4;
 		Regions[0].rg_size = 0;
 		Regions[0].rg_flags = DM_REGION_WRITE;
 
@@ -1092,26 +1273,38 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			if ((varStatus = DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived)) == DMSTAT_PASS) {
+			if ((varStatus =
+			     DMVAR_CHKPASSEXP(0, rc, eventExpected,
+					      eventReceived)) == DMSTAT_PASS) {
 				if (inoff != offset) {
-					DMLOG_PRINT(DMLVL_ERR, "Offset NOT correct! (%d vs %d)\n", inoff, offset);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Offset NOT correct! (%d vs %d)\n",
+						    inoff, offset);
 					varStatus = DMSTAT_FAIL;
 				} else if (inlen != length) {
-					DMLOG_PRINT(DMLVL_ERR, "Length NOT correct! (%d vs %d)\n", inlen, length);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Length NOT correct! (%d vs %d)\n",
+						    inlen, length);
 					varStatus = DMSTAT_FAIL;
 				}
 			}
@@ -1120,7 +1313,9 @@
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1134,7 +1329,7 @@
 		int fd;
 		void *hanp;
 		size_t hlen;
-		off_t inoff = PAGEALIGN(TMP_FILELEN/4);
+		off_t inoff = PAGEALIGN(TMP_FILELEN / 4);
 		size_t inlen = PAGEALIGN(DUMMY_STRLEN);
 		dm_boolean_t exactflag;
 		int numRegions;
@@ -1157,26 +1352,35 @@
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, numRegions, Regions, &exactflag)) == -1) ||
-			   ((rc = close(fd)) == -1)) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					numRegions, Regions, &exactflag)) == -1)
+			|| ((rc = close(fd)) == -1)) {
 			dm_handle_free(hanp, hlen);
 			remove(DummyFile);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE, DummyFile, O_RDWR, inoff, (long)inlen, 1);
+			sprintf(command, "./%s %s %d %ld %ld %d", MMAPFILE_EXE,
+				DummyFile, O_RDWR, inoff, (long)inlen, 1);
 			DMLOG_PRINT(DMLVL_DEBUG, "invoking %s\n", command);
 			rc = system(command);
 			EVENT_DELIVERY_DELAY;
-			DMVAR_END(DMVAR_CHKPASSEXP(0, rc, eventExpected, eventReceived));
+			DMVAR_END(DMVAR_CHKPASSEXP
+				  (0, rc, eventExpected, eventReceived));
 
 			/* Variation clean up */
 			rc = remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1187,14 +1391,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -1219,16 +1426,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1237,26 +1449,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1266,9 +1491,12 @@
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
 			DMEV_SET(DM_EVENT_READ, events);
 			DMEV_SET(DM_EVENT_WRITE, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1276,23 +1504,29 @@
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -1307,53 +1541,77 @@
 				break;
 
 			case DM_EVENT_READ:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_READ\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_READ\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				response = eventResponse;
-				break;
-			}
+					response = eventResponse;
+					break;
+				}
 
 			case DM_EVENT_WRITE:
-			{
-				dm_data_event_t *de = DM_GET_VALUE(dmMsg, ev_data, dm_data_event_t *);
-				hanp1 = DM_GET_VALUE(de, de_handle, void *);
-				hlen1 = DM_GET_LEN(de, de_handle);
-				offset = de->de_offset;
-				length = de->de_length;
+				{
+					dm_data_event_t *de =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_data_event_t *);
+					hanp1 =
+					    DM_GET_VALUE(de, de_handle, void *);
+					hlen1 = DM_GET_LEN(de, de_handle);
+					offset = de->de_offset;
+					length = de->de_length;
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_WRITE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle: %p\n", hanp1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Handle length: %d\n", hlen1);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Offset: %d\n", offset);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Length: %d\n", length);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_WRITE\n");
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle: %p\n", hanp1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Handle length: %d\n",
+						    hlen1);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Offset: %d\n", offset);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Length: %d\n", length);
 
-				response = eventResponse;
-				break;
-			}
+					response = eventResponse;
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/mmapfile.c b/testcases/kernel/fs/dmapi/mmapfile.c
index c11a4a5..9f10376 100644
--- a/testcases/kernel/fs/dmapi/mmapfile.c
+++ b/testcases/kernel/fs/dmapi/mmapfile.c
@@ -62,7 +62,8 @@
 	void *memmap;
 
 	if (--argc != 5) {
-		printf("usage: %s filename openflags offset length passflag\n", argv[0]);
+		printf("usage: %s filename openflags offset length passflag\n",
+		       argv[0]);
 		exit(-1);
 	}
 
@@ -83,7 +84,7 @@
 		printf("%s error: invalid offset %s\n", argv[0], argv[3]);
 		exit(-1);
 	}
-	if (offset & (PAGE_SIZE-1)) {
+	if (offset & (PAGE_SIZE - 1)) {
 		printf("%s error: unaligned offset %d\n", argv[0], offset);
 		exit(-1);
 	}
@@ -94,7 +95,7 @@
 	} else if (openflags == O_WRONLY) {
 		flags = PROT_WRITE;
 	} else if (openflags == O_RDWR) {
-		flags = PROT_READ|PROT_WRITE;
+		flags = PROT_READ | PROT_WRITE;
 	} else {
 		printf("%s error: invalid openflags %s\n", argv[0], argv[2]);
 		exit(-1);
@@ -103,14 +104,17 @@
 	printf("invoking open(%s, %d)\n", argv[1], openflags);
 	fd = open(argv[1], openflags);
 	if (fd == -1) {
-		printf("%s error: open failed with rc = %d (errno = %d)\n", argv[0], rc, errno);
+		printf("%s error: open failed with rc = %d (errno = %d)\n",
+		       argv[0], rc, errno);
 		exit(-1);
 	}
 
-	printf("invoking memmap(%d, %d, %s, %d)\n", length, flags, argv[1], offset);
+	printf("invoking memmap(%d, %d, %s, %d)\n", length, flags, argv[1],
+	       offset);
 	memmap = mmap(NULL, length, flags, MAP_SHARED, fd, offset);
 	if (memmap == MAP_FAILED) {
-		printf("%s error: mmap failed with errno = %d\n", argv[0], errno);
+		printf("%s error: mmap failed with errno = %d\n", argv[0],
+		       errno);
 		if (passflag) {
 			close(fd);
 			exit(-1);
diff --git a/testcases/kernel/fs/dmapi/mount.c b/testcases/kernel/fs/dmapi/mount.c
index 59eb380..8bfd429 100644
--- a/testcases/kernel/fs/dmapi/mount.c
+++ b/testcases/kernel/fs/dmapi/mount.c
@@ -53,7 +53,7 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   rc;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -65,21 +65,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -90,7 +104,7 @@
 		rmdir(DummySubdir);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI mount tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI mount tests\n");
 
 	szFuncName = "dm_set_dmattr";
 
@@ -106,26 +120,36 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_mountinfo(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(INVALID_ADDR, hanp, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -143,26 +167,36 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, (void *)INVALID_ADDR, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -180,26 +214,36 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, INVALID_ADDR,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -217,26 +261,35 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, INVALID_ADDR, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, INVALID_ADDR,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -254,35 +307,54 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, 0, buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid buflen)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					      buf, &rlen);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n",
+						    rlen);
 					if (rlen == me_len) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, -1, E2BIG);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, -1,
+							    E2BIG);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n", szFuncName, -1, E2BIG, rlen, me_len);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n",
+							    szFuncName, -1,
+							    E2BIG, rlen,
+							    me_len);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -290,7 +362,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -308,26 +382,36 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), (void *)INVALID_ADDR,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -344,26 +428,36 @@
 		char buf[MOUNTEVENT_LEN];
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf,
+					      (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -381,35 +475,50 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 				if (rlen == me_len) {
 					if (memcmp(buf, me_ptr, rlen) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mount info not same\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but mount info not same\n",
+							    szFuncName, 0);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but mount info len not same (%d vs %d)\n", szFuncName, 0, rlen, me_len);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but mount info len not same (%d vs %d)\n",
+						    szFuncName, 0, rlen,
+						    me_len);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -417,7 +526,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -434,26 +545,36 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_mountinfo(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(DM_NO_SESSION, hanp, hlen,
+					      DM_NO_TOKEN, sizeof(buf), buf,
+					      &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -471,7 +592,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_get_mountinfo(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+		rc = dm_get_mountinfo(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      DM_NO_TOKEN, sizeof(buf), buf, &rlen);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -489,26 +611,35 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		if ((fd =
+		     open(DummyFile, O_RDWR | O_CREAT,
+			  DUMMY_FILE_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummyFile, &hanp, &hlen)) ==
+			   -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -527,22 +658,29 @@
 		/* Variation set up */
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN, sizeof(buf), buf, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_mountinfo(sid, hanp, hlen, DM_NO_TOKEN,
+					      sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -554,14 +692,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -586,16 +727,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -604,26 +750,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *hanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t hlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", hanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", hlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    hanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(hanp, hlen);
+			bMounted = dm_handle_is_valid(hanp, hlen);
 
-    			rc = dm_request_right(sid, hanp, hlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, hanp, hlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -631,30 +790,42 @@
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_disp(sid, hanp, hlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, hanp, hlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, hanp, hlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, hanp, hlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, hanp, hlen, token);
+			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			me_len = me->me_roothandle.vd_offset + me->me_roothandle.vd_length;
+			me_len =
+			    me->me_roothandle.vd_offset +
+			    me->me_roothandle.vd_length;
 			if ((me_ptr = malloc(me_len)) == NULL) {
-				DMLOG_PRINT(DMLVL_ERR, "malloc failed! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "malloc failed! (errno = %d)\n",
+					    errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -662,7 +833,8 @@
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -675,17 +847,23 @@
 				break;
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/objref.c b/testcases/kernel/fs/dmapi/objref.c
index 4fa0574..889d626 100644
--- a/testcases/kernel/fs/dmapi/objref.c
+++ b/testcases/kernel/fs/dmapi/objref.c
@@ -50,7 +50,7 @@
 {
 
 	char *varstr;
-	int   rc;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -62,21 +62,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -90,24 +104,29 @@
 	rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 	runTestOnCreate = 0;
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "mkdir failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "mkdir failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = rmdir(DummySubdir);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "rmdir failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "rmdir failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -119,9 +138,9 @@
 {
 
 	char *szFuncName;
-	int   rc;
+	int rc;
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI object reference tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI object reference tests\n");
 
 	szFuncName = "dm_obj_ref_hold";
 
@@ -198,18 +217,23 @@
 		/* Variation set up */
 		rc = dm_obj_ref_hold(sid, token, hanp, hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(multiple holds)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(multiple holds)\n",
+				    szFuncName);
 			rc = dm_obj_ref_hold(sid, token, hanp, hlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
 			rc = dm_obj_ref_rele(sid, token, hanp, hlen);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -227,15 +251,22 @@
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName);
 		rc = dm_obj_ref_hold(sid, token, hanp, hlen);
 		if (rc == 0) {
-			if ((rc2 = dm_obj_ref_query(sid, token, hanp, hlen)) == 1) {
-			  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+			if ((rc2 =
+			     dm_obj_ref_query(sid, token, hanp, hlen)) == 1) {
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			} else {
-			  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected dm_obj_ref_query rc = %d\n", szFuncName, 0, rc2);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with expected rc = %d but unexpected dm_obj_ref_query rc = %d\n",
+					    szFuncName, 0, rc2);
 				DMVAR_FAIL();
 			}
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
 			DMVAR_FAIL();
 		}
 
@@ -269,7 +300,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_obj_ref_hold(sid, token, DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
+		rc = dm_obj_ref_hold(sid, token, DM_GLOBAL_HANP,
+				     DM_GLOBAL_HLEN);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -367,22 +399,32 @@
 		/* Variation set up */
 		rc = dm_obj_ref_hold(sid, token, hanp, hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName);
 			rc = dm_obj_ref_rele(sid, token, hanp, hlen);
 			if (rc == 0) {
-				if ((rc2 = dm_obj_ref_query(sid, token, hanp, hlen)) == 0) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				if ((rc2 =
+				     dm_obj_ref_query(sid, token, hanp,
+						      hlen)) == 0) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected dm_obj_ref_query rc = %d\n", szFuncName, 0, rc2);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected dm_obj_ref_query rc = %d\n",
+						    szFuncName, 0, rc2);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 		}
@@ -414,7 +456,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_obj_ref_rele(sid, token, DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
+		rc = dm_obj_ref_rele(sid, token, DM_GLOBAL_HANP,
+				     DM_GLOBAL_HLEN);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -511,7 +554,9 @@
 		/* Variation set up */
 		rc = dm_obj_ref_hold(sid, token, hanp, hlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -549,7 +594,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_obj_ref_query(sid, token, DM_GLOBAL_HANP, DM_GLOBAL_HLEN);
+		rc = dm_obj_ref_query(sid, token, DM_GLOBAL_HANP,
+				      DM_GLOBAL_HLEN);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -574,16 +620,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -592,26 +643,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -620,37 +684,47 @@
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
 			DMEV_SET(DM_EVENT_CREATE, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_CREATE) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			void *hanp = DM_GET_VALUE(nse, ne_handle1, void *);
 			size_t hlen = DM_GET_LEN(nse, ne_handle1);
 
@@ -666,17 +740,23 @@
 				break;
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/pmr_post.c b/testcases/kernel/fs/dmapi/pmr_post.c
index c1a78d9..bfd89f5 100644
--- a/testcases/kernel/fs/dmapi/pmr_post.c
+++ b/testcases/kernel/fs/dmapi/pmr_post.c
@@ -51,13 +51,16 @@
 
 void *Thread(void *);
 
-void LogRegions(dm_region_t *rgns, u_int nelem)
+void LogRegions(dm_region_t * rgns, u_int nelem)
 {
 	int i;
 
 	DMLOG_PRINT(DMLVL_DEBUG, "Regions:\n");
 	for (i = 0; i < nelem; i++) {
-		DMLOG_PRINT(DMLVL_DEBUG, "  region %d: offset %lld, size %lld, flags %d\n", i, rgns[i].rg_offset, rgns[i].rg_size, rgns[i].rg_flags);
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "  region %d: offset %lld, size %lld, flags %d\n",
+			    i, rgns[i].rg_offset, rgns[i].rg_size,
+			    rgns[i].rg_flags);
 	}
 }
 
@@ -65,8 +68,8 @@
 {
 
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 	char buf[MSG_DATALEN];
@@ -79,21 +82,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -107,8 +124,9 @@
 
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < (TMP_FILELEN/DUMMY_STRLEN); i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < (TMP_FILELEN / DUMMY_STRLEN); i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -120,7 +138,9 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
@@ -130,19 +150,24 @@
 	memcpy(buf, MSG_DATA, MSG_DATALEN);
 	rc = dm_send_msg(sid, DM_MSGTYPE_SYNC, MSG_DATALEN, buf);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_send_msg failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_send_msg failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	remove(DUMMY_FILE);
@@ -155,10 +180,11 @@
 void DoTest()
 {
 
-	int   rc;
+	int rc;
 	char *szFuncName;
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI persistent managed regions test\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI persistent managed regions test\n");
 
 	szFuncName = "dm_get_region";
 
@@ -183,38 +209,68 @@
 			remove(DummyFile);
 		}
 		if (fd == -1 || rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(persistent, Part II)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, sizeof(regbuf)/sizeof(dm_region_t), regbuf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(persistent, Part II)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   sizeof(regbuf) / sizeof(dm_region_t),
+					   regbuf, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 			}
 			varStatus = DMSTAT_PASS;
 			if (rc != 0) {
-				DMLOG_PRINT(DMLVL_ERR, "%s returned unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s returned unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				varStatus = DMSTAT_FAIL;
 			} else if (nelem != PMR_NUM_REGIONS) {
-				DMLOG_PRINT(DMLVL_ERR, "Number of regions NOT correct! (%d vs %d)\n", nelem, PMR_NUM_REGIONS);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "Number of regions NOT correct! (%d vs %d)\n",
+					    nelem, PMR_NUM_REGIONS);
 				varStatus = DMSTAT_FAIL;
 			} else {
-				DMLOG_PRINT(DMLVL_DEBUG, "%s returned expected rc = %d\n", szFuncName, rc, errno);
-				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", rc, errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s returned expected rc = %d\n",
+					    szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", rc,
+					    errno);
 				LogRegions(regbuf, nelem);
 
 				for (i = 0; i < PMR_NUM_REGIONS; i++) {
-					if (regbuf[i].rg_offset != dm_PMR_regbuf[i].rg_offset) {
-						DMLOG_PRINT(DMLVL_ERR, "region %d offset NOT correct! (%lld vs %d)\n", i, regbuf[i].rg_offset, dm_PMR_regbuf[i].rg_offset);
+					if (regbuf[i].rg_offset !=
+					    dm_PMR_regbuf[i].rg_offset) {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "region %d offset NOT correct! (%lld vs %d)\n",
+							    i,
+							    regbuf[i].rg_offset,
+							    dm_PMR_regbuf[i].
+							    rg_offset);
 						varStatus = DMSTAT_FAIL;
 					}
-					if (regbuf[i].rg_size != dm_PMR_regbuf[i].rg_size) {
-						DMLOG_PRINT(DMLVL_ERR, "region %d size NOT correct! (%lld vs %d)\n", i, regbuf[i].rg_size, dm_PMR_regbuf[i].rg_size);
+					if (regbuf[i].rg_size !=
+					    dm_PMR_regbuf[i].rg_size) {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "region %d size NOT correct! (%lld vs %d)\n",
+							    i,
+							    regbuf[i].rg_size,
+							    dm_PMR_regbuf[i].
+							    rg_size);
 						varStatus = DMSTAT_FAIL;
 					}
-					if (regbuf[i].rg_flags != dm_PMR_regbuf[i].rg_flags) {
-						DMLOG_PRINT(DMLVL_ERR, "region %d flags NOT correct! (%lld vs %d)\n", i, regbuf[i].rg_flags, dm_PMR_regbuf[i].rg_flags);
+					if (regbuf[i].rg_flags !=
+					    dm_PMR_regbuf[i].rg_flags) {
+						DMLOG_PRINT(DMLVL_ERR,
+							    "region %d flags NOT correct! (%lld vs %d)\n",
+							    i,
+							    regbuf[i].rg_flags,
+							    dm_PMR_regbuf[i].
+							    rg_flags);
 						varStatus = DMSTAT_FAIL;
 					}
 				}
@@ -226,7 +282,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -251,30 +309,43 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_get_region(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_get_region(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, nelemin, &regbuf,
+					   &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -299,30 +370,43 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_get_region(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, nelemin, &regbuf,
+					   &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -347,30 +431,42 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   nelemin, &regbuf, &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -395,30 +491,42 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, INVALID_ADDR, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, INVALID_ADDR,
+					   nelemin, &regbuf, &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -443,30 +551,44 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid regbufp)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, (dm_region_t *)INVALID_ADDR, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid regbufp)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin,
+					   (dm_region_t *) INVALID_ADDR,
+					   &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -491,30 +613,43 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, &regbuf,
+					   (u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -539,30 +674,43 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_get_region(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_get_region(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, nelemin, &regbuf,
+					   &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -587,25 +735,37 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbuf, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-			rc = dm_get_region(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					   DM_NO_TOKEN, nelemin, &regbuf,
+					   &nelemout);
 			if (rc == -1 && errno == EBADF) {
-				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelemout);
+				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+					    nelemout);
 			}
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
@@ -613,7 +773,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -635,22 +797,29 @@
 
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, &regbuf, &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -672,22 +841,28 @@
 
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, &regbuf, &nelemout);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -710,30 +885,44 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 0)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbuf, &nelemout);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, &regbuf, &nelemout);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelemout);
+				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+					    nelemout);
 				if (nelemin == nelemout) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n", szFuncName, 0, nelemin, nelemout);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n",
+						    szFuncName, 0, nelemin,
+						    nelemout);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -741,7 +930,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -766,43 +957,67 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbufin, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       &regbufin, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 1)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, &regbufout, &nelemout);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, &regbufout, &nelemout);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelemout);
+				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+					    nelemout);
 				if (nelemin == nelemout) {
-					if (memcmp(&regbufin, &regbufout, sizeof(dm_region_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&regbufin, &regbufout,
+					     sizeof(dm_region_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected regions\n", szFuncName, 0);
-						DMLOG_PRINT(DMLVL_DEBUG, "Region in:\n");
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected regions\n",
+							    szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "Region in:\n");
 						LogRegions(&regbufin, nelemin);
-						DMLOG_PRINT(DMLVL_DEBUG, "Region out:\n");
-						LogRegions(&regbufout, nelemout);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "Region out:\n");
+						LogRegions(&regbufout,
+							   nelemout);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n", szFuncName, 0, nelemin, nelemout);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n",
+						    szFuncName, 0, nelemin,
+						    nelemout);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -810,7 +1025,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -841,43 +1058,66 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, regbufin, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       regbufin, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 2)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, regbufout, &nelemout);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin, regbufout, &nelemout);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelemout);
+				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+					    nelemout);
 				if (nelemin == nelemout) {
-					if (memcmp(&regbufin, &regbufout, sizeof(dm_region_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (&regbufin, &regbufout,
+					     sizeof(dm_region_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected regions\n", szFuncName, 0);
-						DMLOG_PRINT(DMLVL_DEBUG, "Region in:\n");
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected regions\n",
+							    szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "Region in:\n");
 						LogRegions(regbufin, nelemin);
-						DMLOG_PRINT(DMLVL_DEBUG, "Region out:\n");
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "Region out:\n");
 						LogRegions(regbufout, nelemout);
 						DMVAR_FAIL();
 					}
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n", szFuncName, 0, nelemin, nelemout);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelemp (%d vs %d)\n",
+						    szFuncName, 0, nelemin,
+						    nelemout);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -885,12 +1125,15 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with MULTIPLE_REGIONS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with MULTIPLE_REGIONS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -926,39 +1169,61 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin, regbufin, &exactflag)) == -1) {
+		} else
+		    if ((rc =
+			 dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin,
+				       regbufin, &exactflag)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(regbuf too small)\n", szFuncName);
-			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN, nelemin-1, regbufout, &nelemout);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(regbuf too small)\n",
+				    szFuncName);
+			rc = dm_get_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   nelemin - 1, regbufout, &nelemout);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelemout);
+					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+						    nelemout);
 					if (nelemout == nelemin) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, rc, errno);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, rc,
+							    errno);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected nelemp (%d vs %d)\n", szFuncName, rc, errno, nelemout, nelemin);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected nelemp (%d vs %d)\n",
+							    szFuncName, rc,
+							    errno, nelemout,
+							    nelemin);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, rc, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, rc, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
@@ -966,7 +1231,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -991,16 +1258,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1009,38 +1281,50 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set bMounted and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1048,7 +1332,8 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set response and bMounted */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
@@ -1067,8 +1352,13 @@
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/pmr_pre.c b/testcases/kernel/fs/dmapi/pmr_pre.c
index f512244..1b6ab48 100644
--- a/testcases/kernel/fs/dmapi/pmr_pre.c
+++ b/testcases/kernel/fs/dmapi/pmr_pre.c
@@ -59,8 +59,8 @@
 {
 
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	char *szFuncName;
 	dm_eventset_t events;
@@ -73,21 +73,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -102,8 +116,9 @@
 		EVENT_DELIVERY_DELAY;
 		fd = open(DUMMY_FILE, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 		if (fd != -1) {
-			for (i = 0; i < (TMP_FILELEN/DUMMY_STRLEN); i++) {
-				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) != DUMMY_STRLEN) {
+			for (i = 0; i < (TMP_FILELEN / DUMMY_STRLEN); i++) {
+				if (write(fd, DUMMY_STRING, DUMMY_STRLEN) !=
+				    DUMMY_STRLEN) {
 					rc = -1;
 					break;
 				}
@@ -115,13 +130,16 @@
 			rc = close(fd);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_ERR, "creating dummy file failed! (rc = %d, errno = %d)\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "creating dummy file failed! (rc = %d, errno = %d)\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI persistent managed regions test initialization\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG,
+		    "Starting DMAPI persistent managed regions test initialization\n");
 
 	szFuncName = "dm_set_region";
 
@@ -141,26 +159,36 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_set_region(INVALID_ADDR, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_set_region(INVALID_ADDR, hanp, hlen,
+					   DM_NO_TOKEN, nelem, &regbuf,
+					   &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -182,26 +210,36 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp\n", szFuncName);
-			rc = dm_set_region(sid, (void *)INVALID_ADDR, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp\n",
+				    szFuncName);
+			rc = dm_set_region(sid, (void *)INVALID_ADDR, hlen,
+					   DM_NO_TOKEN, nelem, &regbuf,
+					   &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -223,26 +261,35 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen\n", szFuncName);
-			rc = dm_set_region(sid, hanp, INVALID_ADDR, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, INVALID_ADDR, DM_NO_TOKEN,
+					   nelem, &regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -264,26 +311,35 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, INVALID_ADDR, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, INVALID_ADDR, nelem,
+					   &regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -305,30 +361,43 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((rc = dm_get_config(hanp, hlen, DM_CONFIG_MAX_MANAGED_REGIONS, &retval)) == -1) {
+		} else
+		    if ((rc =
+			 dm_get_config(hanp, hlen,
+				       DM_CONFIG_MAX_MANAGED_REGIONS,
+				       &retval)) == -1) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, retval+1, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN,
+					   retval + 1, &regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, E2BIG);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -350,26 +419,36 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid regbufp)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, (dm_region_t *)INVALID_ADDR, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid regbufp)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   (dm_region_t *) INVALID_ADDR,
+					   &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -393,26 +472,36 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid exactflagp)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, (dm_boolean_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid exactflagp)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   &regbuf,
+					   (dm_boolean_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -435,22 +524,30 @@
 
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_set_region(DM_NO_SESSION, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_set_region(DM_NO_SESSION, hanp, hlen,
+					   DM_NO_TOKEN, nelem, &regbuf,
+					   &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -473,22 +570,30 @@
 
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-			rc = dm_set_region(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+					   DM_NO_TOKEN, nelem, &regbuf,
+					   &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -511,22 +616,29 @@
 
 		if ((rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_handle(DummySubdir, &hanp, &hlen))
+			   == -1) {
 			rmdir(DummySubdir);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(dir handle)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   &regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = rmdir(DummySubdir);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -551,26 +663,35 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
-		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen)) == -1) {
+		} else if ((rc = dm_path_to_fshandle(DummyFile, &hanp, &hlen))
+			   == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   &regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -594,30 +715,47 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 0)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, NULL, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   NULL, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
-				if (((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) == -1) && (errno == ENODATA)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
+				if (((rc =
+				      getxattr(DummyFile, PMR_AttrName, value,
+					       sizeof(value))) == -1)
+				    && (errno == ENODATA)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -625,7 +763,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -651,30 +791,48 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 1)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, &regbuf, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   &regbuf, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
-				if ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) >= sizeof(dm_region_t)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
+				if ((rc =
+				     getxattr(DummyFile, PMR_AttrName, value,
+					      sizeof(value))) >=
+				    sizeof(dm_region_t)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, sizeof(dm_region_t), errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc, sizeof(dm_region_t),
+						    errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -682,7 +840,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -714,30 +874,48 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(nelem 2)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
-				if ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) >= (2 * sizeof(dm_region_t))) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
+				if ((rc =
+				     getxattr(DummyFile, PMR_AttrName, value,
+					      sizeof(value))) >=
+				    (2 * sizeof(dm_region_t))) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, 2 * sizeof(dm_region_t), errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc, 2 * sizeof(dm_region_t),
+						    errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -745,12 +923,15 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
 #else
-		DMLOG_PRINT(DMLVL_WARN, "Test case not built with MULTIPLE_REGIONS defined\n");
+		DMLOG_PRINT(DMLVL_WARN,
+			    "Test case not built with MULTIPLE_REGIONS defined\n");
 		DMVAR_SKIP();
 #endif
 	}
@@ -787,36 +968,60 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag)) == -1) ||
-			   ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) < (nelem * sizeof(dm_region_t)))) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					regbuf, &exactflag)) == -1)
+			||
+			((rc =
+			  getxattr(DummyFile, PMR_AttrName, value,
+				   sizeof(value))) <
+			 (nelem * sizeof(dm_region_t)))) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 			rc = -1;	/* rc could be >= 0 from getxattr */
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(clear)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, 0, NULL, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, 0,
+					   NULL, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
-				if (((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) == -1) && (errno == ENODATA)) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
+				if (((rc =
+				      getxattr(DummyFile, PMR_AttrName, value,
+					       sizeof(value))) == -1)
+				    && (errno == ENODATA)) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -824,7 +1029,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -863,20 +1070,32 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if (((rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag)) == -1) ||
-			   ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) < (nelem * sizeof(dm_region_t)))) {
+		} else
+		    if (((rc =
+			  dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					regbuf, &exactflag)) == -1)
+			||
+			((rc =
+			  getxattr(DummyFile, PMR_AttrName, value,
+				   sizeof(value))) <
+			 (nelem * sizeof(dm_region_t)))) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 			rc = -1;	/* rc could be >= 0 from getxattr */
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -888,22 +1107,35 @@
 			regbuf[0].rg_flags = DM_REGION_READ;
 
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(replace)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
 #ifdef MULTIPLE_REGIONS
-				if ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) < xattrlen) {
+				if ((rc =
+				     getxattr(DummyFile, PMR_AttrName, value,
+					      sizeof(value))) < xattrlen) {
 #else
-				if ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) == xattrlen) {
+				if ((rc =
+				     getxattr(DummyFile, PMR_AttrName, value,
+					      sizeof(value))) == xattrlen) {
 #endif
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, xattrlen, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc, xattrlen, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -911,7 +1143,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -934,38 +1168,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private read mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private read mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -973,7 +1218,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -996,38 +1243,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private write mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private write mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1035,7 +1293,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1058,38 +1318,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private exec mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private exec mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1097,7 +1368,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1120,38 +1393,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private r/w mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private r/w mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1159,7 +1443,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1182,38 +1468,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared read mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared read mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1221,7 +1518,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1244,38 +1543,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared write mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared write mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1283,7 +1593,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1306,38 +1618,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared exec mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared exec mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1345,7 +1668,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1368,38 +1693,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_SHARED, fd, 0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared r/w mmap overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared r/w mmap overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1407,7 +1743,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1430,38 +1768,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private read mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private read mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1469,7 +1818,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1492,38 +1843,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private write mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private write mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1531,7 +1893,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1554,38 +1918,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_PRIVATE, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private exec mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private exec mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1593,7 +1968,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1616,38 +1993,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 2*PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_PRIVATE, fd, 2 * PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(private r/w mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(private r/w mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1655,7 +2043,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1678,38 +2068,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = PAGE_SIZE;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_WRITE;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd,
+			      PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared read mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared read mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1717,7 +2118,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1740,38 +2143,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_WRITE, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared write mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared write mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1779,7 +2193,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1802,38 +2218,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd, 0)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_SHARED, fd,
+			      0)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared exec mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared exec mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
@@ -1841,7 +2268,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1864,38 +2293,49 @@
 #ifdef MULTIPLE_REGIONS
 		nelem = 2;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 		regbuf[1].rg_offset = PAGE_SIZE;
-		regbuf[1].rg_size = PAGE_SIZE/2;
+		regbuf[1].rg_size = PAGE_SIZE / 2;
 		regbuf[1].rg_flags = DM_REGION_WRITE;
 #else
 		nelem = 1;
 		regbuf[0].rg_offset = 0;
-		regbuf[0].rg_size = PAGE_SIZE/2;
+		regbuf[0].rg_size = PAGE_SIZE / 2;
 		regbuf[0].rg_flags = DM_REGION_READ;
 #endif
 
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
-		} else if ((memmap = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 2*PAGE_SIZE)) == MAP_FAILED) {
+		} else
+		    if ((memmap =
+			 mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE,
+			      MAP_SHARED, fd, 2 * PAGE_SIZE)) == MAP_FAILED) {
 			close(fd);
 			remove(DummyFile);
 			dm_handle_free(hanp, hlen);
 		}
 		if (rc == -1 || fd == -1 || memmap == MAP_FAILED) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(shared r/w mmap not overlap region)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(shared r/w mmap not overlap region)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
@@ -1903,7 +2343,9 @@
 			rc = close(fd);
 			rc |= remove(DummyFile);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1928,44 +2370,69 @@
 		sprintf(command, "cp %s %s", DUMMY_FILE, DummyFile);
 		if ((rc = system(command)) == -1) {
 			/* No clean up */
-		} else if ((fd = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE)) == -1) {
+		} else
+		    if ((fd =
+			 open(DummyFile, O_RDWR | O_CREAT,
+			      DUMMY_FILE_RW_MODE)) == -1) {
 			remove(DummyFile);
 		} else if ((rc = dm_fd_to_handle(fd, &hanp, &hlen)) == -1) {
 			close(fd);
 			remove(DummyFile);
 		}
 		if (rc == -1 || fd == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(persistent, Part I)\n", szFuncName);
-			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem, regbuf, &exactflag);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(persistent, Part I)\n",
+				    szFuncName);
+			rc = dm_set_region(sid, hanp, hlen, DM_NO_TOKEN, nelem,
+					   regbuf, &exactflag);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n", exactflag);
-				if ((rc = getxattr(DummyFile, PMR_AttrName, value, sizeof(value))) >= (PMR_NUM_REGIONS * sizeof(dm_region_t))) {
-					DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = 0\n", szFuncName);
+				DMLOG_PRINT(DMLVL_DEBUG, "exactflag = %d\n",
+					    exactflag);
+				if ((rc =
+				     getxattr(DummyFile, PMR_AttrName, value,
+					      sizeof(value))) >=
+				    (PMR_NUM_REGIONS * sizeof(dm_region_t))) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = 0\n",
+						    szFuncName);
 					DMVAR_PASS();
 
-					printf("********************************************************\n");
-					printf("* PLEASE REBOOT AND RUN pmr_post TO COMPLETE VARIATION *\n");
-					printf("********************************************************\n");
+					printf
+					    ("********************************************************\n");
+					printf
+					    ("* PLEASE REBOOT AND RUN pmr_post TO COMPLETE VARIATION *\n");
+					printf
+					    ("********************************************************\n");
 
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n", szFuncName, 0, PMR_AttrName, rc, PMR_NUM_REGIONS * sizeof(dm_region_t), errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected getxattr(%s) rc (%d vs %d), errno %d\n",
+						    szFuncName, 0, PMR_AttrName,
+						    rc,
+						    PMR_NUM_REGIONS *
+						    sizeof(dm_region_t), errno);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = close(fd);
 			/* DO NOT REMOVE DummyFile, IT IS NEEDED BY pmr_post */
-			/*rc |= remove(DummyFile);*/
+			/*rc |= remove(DummyFile); */
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(hanp, hlen);
 		}
@@ -1973,14 +2440,17 @@
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	remove(DUMMY_FILE);
@@ -2007,16 +2477,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -2025,38 +2500,50 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set bMounted and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			DMEV_ZERO(events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -2064,7 +2551,8 @@
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
 			/* SPECIAL CASE: need to set bMounted and response */
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
@@ -2077,8 +2565,13 @@
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/right.c b/testcases/kernel/fs/dmapi/right.c
index 14b8821..1604f01 100644
--- a/testcases/kernel/fs/dmapi/right.c
+++ b/testcases/kernel/fs/dmapi/right.c
@@ -54,7 +54,7 @@
 {
 
 	char *varstr;
-	int   rc;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -66,21 +66,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -93,7 +107,8 @@
 
 	fd_f = open(DummyFile, O_RDWR | O_CREAT, DUMMY_FILE_RW_MODE);
 	if (fd_f == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "open failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "open failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	/* This is what kicks off the test case, variations done in thread */
@@ -101,34 +116,41 @@
 	rc = mkdir(DummySubdir, DUMMY_DIR_RW_MODE);
 	runTestOnCreate = 0;
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "mkdir failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "mkdir failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = rmdir(DummySubdir);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "rmdir failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "rmdir failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = close(fd_f);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "close failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "close failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = remove(DummyFile);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "remove failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "remove failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -140,9 +162,9 @@
 {
 
 	char *szFuncName;
-	int   rc;
+	int rc;
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI rights tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI rights tests\n");
 
 	szFuncName = "dm_request_right";
 
@@ -156,7 +178,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-		rc = dm_request_right(INVALID_ADDR, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(INVALID_ADDR, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -172,7 +195,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-		rc = dm_request_right(sid, (void *)INVALID_ADDR, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, (void *)INVALID_ADDR, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -188,7 +212,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
-		rc = dm_request_right(sid, hanp, INVALID_ADDR, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, INVALID_ADDR, token, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -204,7 +229,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
-		rc = dm_request_right(sid, hanp, hlen, INVALID_ADDR, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, INVALID_ADDR, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -239,7 +265,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_TOKEN)\n", szFuncName);
-		rc = dm_request_right(sid, hanp, hlen, DM_NO_TOKEN, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, DM_NO_TOKEN, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -254,14 +281,19 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_NULL -> DM_RIGHT_SHARED)\n", szFuncName);
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		DMLOG_PRINT(DMLVL_DEBUG,
+			    "%s(DM_RIGHT_NULL -> DM_RIGHT_SHARED)\n",
+			    szFuncName);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 		/* Variation clean up */
 		rc = dm_release_right(sid, hanp, hlen, token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -274,14 +306,17 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_NULL -> DM_RIGHT_EXCL)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_NULL -> DM_RIGHT_EXCL)\n",
+			    szFuncName);
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 		/* Variation clean up */
 		rc = dm_release_right(sid, hanp, hlen, token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -292,53 +327,69 @@
 	if (DMVAR_EXEC(REQUEST_RIGHT_BASE + 9)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED -> DM_RIGHT_SHARED)\n", szFuncName);
-			rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_RIGHT_SHARED -> DM_RIGHT_SHARED)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, hanp, hlen, token, 0,
+					      DM_RIGHT_SHARED);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	/*
 	 * TEST    : dm_request_right - DM_RIGHT_EXCL from DM_RIGHT_SHARED,
-	 * 		DM_RR_WAIT clear
+	 *              DM_RR_WAIT clear
 	 * EXPECTED: rc = 0
 	 */
 	if (DMVAR_EXEC(REQUEST_RIGHT_BASE + 10)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED -> DM_RIGHT_EXCL, DM_RR_WAIT clear)\n", szFuncName);
-			rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_RIGHT_SHARED -> DM_RIGHT_EXCL, DM_RR_WAIT clear)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, hanp, hlen, token, 0,
+					      DM_RIGHT_EXCL);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	/*
 	 * TEST    : dm_request_right - DM_RIGHT_EXCL from DM_RIGHT_SHARED,
-	 * 		DM_RR_WAIT set
+	 *              DM_RR_WAIT set
 	 * EXPECTED: rc = -1, errno = EACCES
 	 *
 	 * This variation uncovered XFS BUG #30 (0 returned instead of -1 and
@@ -347,20 +398,28 @@
 	if (DMVAR_EXEC(REQUEST_RIGHT_BASE + 11)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED -> DM_RIGHT_EXCL, DM_RR_WAIT set)\n", szFuncName);
-			rc = dm_request_right(sid, hanp, hlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_RIGHT_SHARED -> DM_RIGHT_EXCL, DM_RR_WAIT set)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, hanp, hlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EACCES);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -374,18 +433,25 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL -> DM_RIGHT_EXCL)\n", szFuncName);
-			rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_RIGHT_EXCL -> DM_RIGHT_EXCL)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, hanp, hlen, token, 0,
+					      DM_RIGHT_SHARED);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -399,18 +465,25 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL -> DM_RIGHT_SHARED)\n", szFuncName);
-			rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(DM_RIGHT_EXCL -> DM_RIGHT_SHARED)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, hanp, hlen, token, 0,
+					      DM_RIGHT_SHARED);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -425,7 +498,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-		rc = dm_request_right(DM_NO_SESSION, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(DM_NO_SESSION, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 		/* Variation clean up */
@@ -441,7 +515,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_request_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      token, 0, DM_RIGHT_SHARED);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -458,18 +533,24 @@
 		/* Variation set up */
 		rc = dm_fd_to_handle(fd_f, &fhanp, &fhlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
-			rc = dm_request_right(sid, fhanp, fhlen, token, 0, DM_RIGHT_SHARED);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
+			rc = dm_request_right(sid, fhanp, fhlen, token, 0,
+					      DM_RIGHT_SHARED);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fhanp, fhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fhanp, fhlen);
 		}
@@ -486,18 +567,23 @@
 		/* Variation set up */
 		rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
 			DMLOG_PRINT(DMLVL_DEBUG, "%s(fs handle)\n", szFuncName);
-			rc = dm_request_right(sid, fshanp, fshlen, token, 0, DM_RIGHT_SHARED);
+			rc = dm_request_right(sid, fshanp, fshlen, token, 0,
+					      DM_RIGHT_SHARED);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fshanp, fshlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 		}
@@ -608,13 +694,17 @@
 	if (DMVAR_EXEC(RELEASE_RIGHT_BASE + 7)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n",
+				    szFuncName);
 			rc = dm_release_right(sid, hanp, hlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -631,11 +721,14 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n",
+				    szFuncName);
 			rc = dm_release_right(sid, hanp, hlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -669,7 +762,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_release_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token);
+		rc = dm_release_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN,
+				      token);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -686,15 +780,21 @@
 		/* Variation set up */
 		if ((rc == dm_fd_to_handle(fd_f, &fhanp, &fhlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fhanp, fhlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fhanp, fhlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fhanp, fhlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_release_right(sid, fhanp, fhlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
@@ -712,13 +812,19 @@
 		size_t fshlen;
 
 		/* Variation set up */
-		if ((rc == dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
+		if ((rc == dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) ==
+		    -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fshanp, fshlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fshanp, fshlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fshanp, fshlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -761,7 +867,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-		rc = dm_query_right(sid, (void *)INVALID_ADDR, hlen, token, &right);
+		rc = dm_query_right(sid, (void *)INVALID_ADDR, hlen, token,
+				    &right);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -811,7 +918,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rightp)\n", szFuncName);
-		rc = dm_query_right(sid, hanp, hlen, token, (dm_right_t *)INVALID_ADDR);
+		rc = dm_query_right(sid, hanp, hlen, token,
+				    (dm_right_t *) INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -842,31 +950,44 @@
 		dm_right_t right;
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n",
+				    szFuncName);
 			rc = dm_query_right(sid, hanp, hlen, token, &right);
 			if (rc == 0) {
 				if (right == DM_RIGHT_SHARED) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected right (%d vs %d)\n", szFuncName, 0, right, DM_RIGHT_SHARED);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected right (%d vs %d)\n",
+						    szFuncName, 0, right,
+						    DM_RIGHT_SHARED);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -881,29 +1002,41 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n",
+				    szFuncName);
 			rc = dm_query_right(sid, hanp, hlen, token, &right);
 			if (rc == 0) {
 				if (right == DM_RIGHT_EXCL) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected right (%d vs %d)\n", szFuncName, 0, right, DM_RIGHT_EXCL);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected right (%d vs %d)\n",
+						    szFuncName, 0, right,
+						    DM_RIGHT_EXCL);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -936,7 +1069,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-		rc = dm_query_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token, &right);
+		rc = dm_query_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token,
+				    &right);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 		/* Variation clean up */
@@ -954,33 +1088,48 @@
 		/* Variation set up */
 		if ((rc = dm_fd_to_handle(fd_f, &fhanp, &fhlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fhanp, fhlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fhanp, fhlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fhanp, fhlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_query_right(sid, fhanp, fhlen, token, &right);
 			if (rc == 0) {
 				if (right == DM_RIGHT_SHARED) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected right (%d vs %d)\n", szFuncName, 0, right, DM_RIGHT_SHARED);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected right (%d vs %d)\n",
+						    szFuncName, 0, right,
+						    DM_RIGHT_SHARED);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fhanp, fhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fhanp, fhlen);
 		}
@@ -996,13 +1145,19 @@
 		dm_right_t right;
 
 		/* Variation set up */
-		if ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
+		if ((rc =
+		     dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fshanp, fshlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fshanp, fshlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fshanp, fshlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1010,21 +1165,30 @@
 			rc = dm_query_right(sid, fshanp, fshlen, token, &right);
 			if (rc == 0) {
 				if (right == DM_RIGHT_SHARED) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-				  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected right (%d vs %d)\n", szFuncName, 0, right, DM_RIGHT_SHARED);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected right (%d vs %d)\n",
+						    szFuncName, 0, right,
+						    DM_RIGHT_SHARED);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fshanp, fshlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 		}
@@ -1039,20 +1203,26 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 1)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(INVALID_ADDR, hanp, hlen, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1064,20 +1234,27 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 2)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_upgrade_right(sid, (void *)INVALID_ADDR, hlen, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_upgrade_right(sid, (void *)INVALID_ADDR, hlen,
+					      token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1089,20 +1266,26 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 3)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(sid, hanp, INVALID_ADDR, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1114,20 +1297,26 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 4)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(sid, hanp, hlen, INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1158,20 +1347,26 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 6)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(sid, hanp, hlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1185,18 +1380,23 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(sid, hanp, hlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1208,20 +1408,26 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 8)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(DM_NO_SESSION, hanp, hlen, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1233,20 +1439,27 @@
 	if (DMVAR_EXEC(UPGRADE_RIGHT_BASE + 9)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n", szFuncName);
-			rc = dm_upgrade_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(global handle)\n",
+				    szFuncName);
+			rc = dm_upgrade_right(sid, DM_GLOBAL_HANP,
+					      DM_GLOBAL_HLEN, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1262,22 +1475,30 @@
 		/* Variation set up */
 		if ((rc = dm_fd_to_handle(fd_f, &fhanp, &fhlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fhanp, fhlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fhanp, fhlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fhanp, fhlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_upgrade_right(sid, fhanp, fhlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fhanp, fhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fhanp, fhlen);
 		}
@@ -1292,13 +1513,19 @@
 		size_t fshlen;
 
 		/* Variation set up */
-		if ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
+		if ((rc =
+		     dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fshanp, fshlen, token, 0, DM_RIGHT_SHARED)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fshanp, fshlen, token, 0,
+					  DM_RIGHT_SHARED)) == -1) {
 			dm_handle_free(fshanp, fshlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1309,7 +1536,9 @@
 			/* Variation clean up */
 			rc = dm_release_right(sid, fshanp, fshlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 		}
@@ -1324,20 +1553,27 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 1)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_downgrade_right(INVALID_ADDR, hanp, hlen, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_downgrade_right(INVALID_ADDR, hanp, hlen,
+						token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1349,20 +1585,27 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 2)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n", szFuncName);
-			rc = dm_downgrade_right(sid, (void *)INVALID_ADDR, hlen, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hanp)\n",
+				    szFuncName);
+			rc = dm_downgrade_right(sid, (void *)INVALID_ADDR, hlen,
+						token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1374,20 +1617,26 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 3)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid hlen)\n",
+				    szFuncName);
 			rc = dm_downgrade_right(sid, hanp, INVALID_ADDR, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1399,20 +1648,26 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 4)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid token)\n",
+				    szFuncName);
 			rc = dm_downgrade_right(sid, hanp, hlen, INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1443,20 +1698,26 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 6)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_SHARED)\n",
+				    szFuncName);
 			rc = dm_downgrade_right(sid, hanp, hlen, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EPERM);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1470,18 +1731,23 @@
 		/* Variation set up */
 		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_EXCL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_RIGHT_EXCL)\n",
+				    szFuncName);
 			rc = dm_downgrade_right(sid, hanp, hlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1493,20 +1759,27 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 8)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_downgrade_right(DM_NO_SESSION, hanp, hlen, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_downgrade_right(DM_NO_SESSION, hanp, hlen,
+						token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1518,20 +1791,27 @@
 	if (DMVAR_EXEC(DOWNGRADE_RIGHT_BASE + 9)) {
 
 		/* Variation set up */
-		rc = dm_request_right(sid, hanp, hlen, token, 0, DM_RIGHT_SHARED);
+		rc = dm_request_right(sid, hanp, hlen, token, 0,
+				      DM_RIGHT_SHARED);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n", szFuncName);
-			rc = dm_downgrade_right(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, token);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION sid)\n",
+				    szFuncName);
+			rc = dm_downgrade_right(sid, DM_GLOBAL_HANP,
+						DM_GLOBAL_HLEN, token);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBADF);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1547,22 +1827,30 @@
 		/* Variation set up */
 		if ((rc = dm_fd_to_handle(fd_f, &fhanp, &fhlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fhanp, fhlen, token, 0, DM_RIGHT_EXCL)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fhanp, fhlen, token, 0,
+					  DM_RIGHT_EXCL)) == -1) {
 			dm_handle_free(fhanp, fhlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(file handle)\n",
+				    szFuncName);
 			rc = dm_downgrade_right(sid, fhanp, fhlen, token);
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_release_right(sid, fhanp, fhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fhanp, fhlen);
 		}
@@ -1577,13 +1865,19 @@
 		size_t fshlen;
 
 		/* Variation set up */
-		if ((rc = dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
+		if ((rc =
+		     dm_path_to_fshandle(DummyFile, &fshanp, &fshlen)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_request_right(sid, fshanp, fshlen, token, 0, DM_RIGHT_EXCL)) == -1) {
+		} else
+		    if ((rc =
+			 dm_request_right(sid, fshanp, fshlen, token, 0,
+					  DM_RIGHT_EXCL)) == -1) {
 			dm_handle_free(fshanp, fshlen);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -1594,7 +1888,9 @@
 			/* Variation clean up */
 			rc = dm_release_right(sid, fshanp, fshlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			dm_handle_free(fshanp, fshlen);
 		}
@@ -1619,16 +1915,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -1637,26 +1938,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *lhanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t lhlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", lhanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", lhlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    lhanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", lhlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(lhanp, lhlen);
+			bMounted = dm_handle_is_valid(lhanp, lhlen);
 
-    			rc = dm_request_right(sid, lhanp, lhlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, lhanp, lhlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -1665,37 +1979,47 @@
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
 			DMEV_SET(DM_EVENT_CREATE, events);
-			rc = dm_set_disp(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, lhanp, lhlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, lhanp, lhlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, lhanp, lhlen, token);
+			rc = dm_release_right(sid, lhanp, lhlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_CREATE) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			void *hanp = DM_GET_VALUE(nse, ne_handle1, void *);
 			size_t hlen = DM_GET_LEN(nse, ne_handle1);
 
@@ -1711,17 +2035,23 @@
 				break;
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/dmapi/session.c b/testcases/kernel/fs/dmapi/session.c
index 1783ba0..b0e78ca 100644
--- a/testcases/kernel/fs/dmapi/session.c
+++ b/testcases/kernel/fs/dmapi/session.c
@@ -36,7 +36,7 @@
 
 char dmMsgBuf[4096];
 
-void LogSessions(dm_sessid_t *sid, u_int nelem)
+void LogSessions(dm_sessid_t * sid, u_int nelem)
 {
 	int i;
 
@@ -52,15 +52,17 @@
 	char *szSessionInfo = "dm_test session info";
 	char *szFuncName;
 	char *varstr;
-	int   i;
-	int   rc;
+	int i;
+	int rc;
 
 	DMOPT_PARSE(argc, argv);
 	DMLOG_START();
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
 	} else {
 		int nexist;
@@ -69,33 +71,43 @@
 		if (rc == -1 && errno == E2BIG) {
 			dm_sessid_t *psid;
 
-			DMLOG_PRINT(DMLVL_DEBUG, "%d sessions already exist\n", nexist);
+			DMLOG_PRINT(DMLVL_DEBUG, "%d sessions already exist\n",
+				    nexist);
 
-			if ((psid = malloc(nexist * sizeof(dm_sessid_t))) != NULL) {
-				if ((rc = dm_getall_sessions(nexist, psid, &nexist)) == 0) {
+			if ((psid =
+			     malloc(nexist * sizeof(dm_sessid_t))) != NULL) {
+				if ((rc =
+				     dm_getall_sessions(nexist, psid,
+							&nexist)) == 0) {
 					for (rc = 0, i = 0; i < nexist; i++) {
-						DMLOG_PRINT(DMLVL_DEBUG, "destroying session %d\n", psid[i]);
-						rc |= dm_destroy_session(psid[i]);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "destroying session %d\n",
+							    psid[i]);
+						rc |=
+						    dm_destroy_session(psid[i]);
 					}
 
 					if (rc == -1) {
-						DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed, unable to destroy existing sessions\n");
+						DMLOG_PRINT(DMLVL_ERR,
+							    "dm_destroy_session failed, unable to destroy existing sessions\n");
 						DM_EXIT();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "dm_getall_sessions failed, unable to destroy existing sessions\n");
+					DMLOG_PRINT(DMLVL_ERR,
+						    "dm_getall_sessions failed, unable to destroy existing sessions\n");
 					DM_EXIT();
 				}
 
 				free(psid);
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "malloc failed, unable to destroy existing sessions\n");
+				DMLOG_PRINT(DMLVL_ERR,
+					    "malloc failed, unable to destroy existing sessions\n");
 				DM_EXIT();
 			}
 		}
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI session tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI session tests\n");
 
 	szFuncName = "dm_create_session";
 
@@ -147,7 +159,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sessinfop)\n", szFuncName);
-		rc = dm_create_session(DM_NO_SESSION, (char *)INVALID_ADDR, &newsid);
+		rc = dm_create_session(DM_NO_SESSION, (char *)INVALID_ADDR,
+				       &newsid);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -177,7 +190,8 @@
 
 		/* Variation */
 		DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid newsidp)\n", szFuncName);
-		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, (dm_sessid_t *)INVALID_ADDR);
+		rc = dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       (dm_sessid_t *) INVALID_ADDR);
 		DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 		/* Variation clean up */
@@ -193,7 +207,8 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION oldsid)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION oldsid)\n",
+			    szFuncName);
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == 0) {
 			DMLOG_PRINT(DMLVL_DEBUG, "newsid = %d\n", newsid);
@@ -203,7 +218,9 @@
 		/* Variation clean up */
 		rc = dm_destroy_session(newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -217,23 +234,29 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			oldsid = newsid;
 
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid oldsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid oldsid)\n",
+				    szFuncName);
 			rc = dm_create_session(oldsid, szSessionInfo, &newsid);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "newsid = %d\n", newsid);
+				DMLOG_PRINT(DMLVL_DEBUG, "newsid = %d\n",
+					    newsid);
 			}
 			DMVAR_ENDPASSEXP(szFuncName, 0, rc);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -246,26 +269,37 @@
 		dm_sessid_t newsid, oldsid, delsid;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) == -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_session(oldsid = newsid, szSessionInfo, &newsid)) == -1) {
+		} else
+		    if ((rc =
+			 dm_create_session(oldsid =
+					   newsid, szSessionInfo,
+					   &newsid)) == -1) {
 			dm_destroy_session(oldsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			delsid = newsid;
 
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated oldsid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated oldsid)\n",
+				    szFuncName);
 			rc = dm_create_session(oldsid, szSessionInfo, &newsid);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(delsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -276,7 +310,8 @@
 	 */
 	if (DMVAR_EXEC(CREATE_SESSION_BASE + 9)) {
 		dm_sessid_t newsid;
-		char *szBig = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345";
+		char *szBig =
+		    "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345";
 
 		/* Variation set up */
 
@@ -291,7 +326,9 @@
 		/* Variation clean up */
 		rc = dm_destroy_session(newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 		}
 	}
 
@@ -304,7 +341,8 @@
 	 */
 	if (DMVAR_EXEC(CREATE_SESSION_BASE + 10)) {
 		dm_sessid_t newsid;
-		char *szTooBig = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
+		char *szTooBig =
+		    "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
 
 		/* Variation set up */
 
@@ -326,23 +364,35 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid1);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(same sessinfo)\n", szFuncName);
-			rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid2);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(same sessinfo)\n",
+				    szFuncName);
+			rc = dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &newsid2);
 			if (rc == 0) {
-				DMLOG_PRINT(DMLVL_DEBUG, "1st newsid = %d, 2nd newsid = %d\n", newsid1, newsid2);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "1st newsid = %d, 2nd newsid = %d\n",
+					    newsid1, newsid2);
 				if (newsid1 != newsid2) {
-				  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "%s passed with expected rc = %d\n",
+						    szFuncName, 0);
 					DMVAR_PASS();
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but session IDs same\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but session IDs same\n",
+						    szFuncName, 0);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -350,7 +400,9 @@
 			rc = dm_destroy_session(newsid1);
 			rc |= dm_destroy_session(newsid2);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -395,15 +447,20 @@
 		dm_sessid_t newsid;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) != -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) != -1) {
 			rc = dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n",
+				    szFuncName);
 			rc = dm_destroy_session(newsid);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -421,7 +478,9 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -447,7 +506,9 @@
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		rc |= dm_send_msg(newsid, DM_MSGTYPE_ASYNC, MSG_DATALEN, buf);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -456,10 +517,13 @@
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EBUSY);
 
 			/* Variation clean up */
-			rc = dm_get_events(newsid, 1, 0, sizeof(dmMsgBuf), dmMsgBuf, &rlen);
+			rc = dm_get_events(newsid, 1, 0, sizeof(dmMsgBuf),
+					   dmMsgBuf, &rlen);
 			rc |= dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -477,18 +541,23 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL sidbufp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL sidbufp)\n",
+				    szFuncName);
 			rc = dm_getall_sessions(1, NULL, &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -504,18 +573,24 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sidbufp)\n", szFuncName);
-			rc = dm_getall_sessions(1, (dm_sessid_t *)INVALID_ADDR, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sidbufp)\n",
+				    szFuncName);
+			rc = dm_getall_sessions(1, (dm_sessid_t *) INVALID_ADDR,
+						&nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -530,18 +605,23 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL nelemp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL nelemp)\n",
+				    szFuncName);
 			rc = dm_getall_sessions(1, sidArray, NULL);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -556,18 +636,24 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_getall_sessions(1, sidArray, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_getall_sessions(1, sidArray,
+						(u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -583,19 +669,26 @@
 		/* Variation set up */
 
 		/* Variation */
-		DMLOG_PRINT(DMLVL_DEBUG, "%s(zero nelem, zero sessions)\n", szFuncName);
+		DMLOG_PRINT(DMLVL_DEBUG, "%s(zero nelem, zero sessions)\n",
+			    szFuncName);
 		rc = dm_getall_sessions(0, sidArray, &nelem);
 		if (rc == 0) {
 			DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 			if (nelem == 0) {
-			  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "%s passed with expected rc = %d\n",
+					    szFuncName, 0);
 				DMVAR_PASS();
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 0);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+					    szFuncName, 0, nelem, 0);
 				DMVAR_FAIL();
 			}
 		} else {
-			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "%s failed with unexpected rc = %d (errno = %d)\n",
+				    szFuncName, rc, errno);
 			DMVAR_FAIL();
 		}
 
@@ -613,36 +706,53 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(zero nelem, one session)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(zero nelem, one session)\n",
+				    szFuncName);
 			rc = dm_getall_sessions(0, sidArray, &nelem);
 
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+						    nelem);
 					if (nelem == 1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, -1, E2BIG);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, -1,
+							    E2BIG);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected nelem (%d vs %d)\n", szFuncName, -1, E2BIG, nelem, 1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected nelem (%d vs %d)\n",
+							    szFuncName, -1,
+							    E2BIG, nelem, 1);
 						DMVAR_PASS();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -658,11 +768,14 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one nelem, one session)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one nelem, one session)\n",
+				    szFuncName);
 			rc = dm_getall_sessions(1, sidArray, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
@@ -671,25 +784,37 @@
 					LogSessions(sidArray, nelem);
 
 					if (newsid == sidArray[0]) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and nelem = %d but unexpected session ID (%d vs %d)\n", szFuncName, 0, nelem, newsid, sidArray[0]);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and nelem = %d but unexpected session ID (%d vs %d)\n",
+							    szFuncName, 0,
+							    nelem, newsid,
+							    sidArray[0]);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -705,11 +830,14 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(two nelem, one session)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(two nelem, one session)\n",
+				    szFuncName);
 			rc = dm_getall_sessions(2, sidArray, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
@@ -718,25 +846,37 @@
 					LogSessions(sidArray, nelem);
 
 					if (newsid == sidArray[0]) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and nelem = %d but unexpected session ID (%d vs %d)\n", szFuncName, 0, nelem, newsid, sidArray[0]);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and nelem = %d but unexpected session ID (%d vs %d)\n",
+							    szFuncName, 0,
+							    nelem, newsid,
+							    sidArray[0]);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -751,37 +891,58 @@
 
 		/* Variation set up */
 		for (i = 0, rc = 0; i < NUM_SESSIONS && rc == 0; i++) {
-			rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sidExpected[i]);
+			rc = dm_create_session(DM_NO_SESSION, szSessionInfo,
+					       &sidExpected[i]);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			for (i--; i >= 0; i--) {
 				dm_destroy_session(sidExpected[i]);
 			}
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(%d nelem, %d sessions)\n", szFuncName, sizeof(sidArray)/sizeof(dm_sessid_t), NUM_SESSIONS);
-			rc = dm_getall_sessions(sizeof(sidArray)/sizeof(dm_sessid_t), sidArray, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(%d nelem, %d sessions)\n",
+				    szFuncName,
+				    sizeof(sidArray) / sizeof(dm_sessid_t),
+				    NUM_SESSIONS);
+			rc = dm_getall_sessions(sizeof(sidArray) /
+						sizeof(dm_sessid_t), sidArray,
+						&nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 
 				if (nelem == NUM_SESSIONS) {
 					LogSessions(sidArray, nelem);
 
-					if (memcmp(sidArray, sidExpected, NUM_SESSIONS * sizeof(dm_sessid_t)) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (memcmp
+					    (sidArray, sidExpected,
+					     NUM_SESSIONS *
+					     sizeof(dm_sessid_t)) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and nelem = %d but unexpected session ID(s)\n", szFuncName, 0, nelem);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and nelem = %d but unexpected session ID(s)\n",
+							    szFuncName, 0,
+							    nelem);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, NUM_SESSIONS);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem,
+						    NUM_SESSIONS);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -790,7 +951,9 @@
 				rc |= dm_destroy_session(sidExpected[i]);
 			}
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -843,15 +1006,20 @@
 		size_t rlen;
 
 		/* Variation set up */
-		if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid)) != -1) {
+		if ((rc =
+		     dm_create_session(DM_NO_SESSION, szSessionInfo,
+				       &newsid)) != -1) {
 			rc = dm_destroy_session(newsid);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalidated sid)\n",
+				    szFuncName);
 			rc = dm_query_session(newsid, sizeof(buf), buf, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
@@ -871,7 +1039,9 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -882,7 +1052,9 @@
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -899,18 +1071,24 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n", szFuncName);
-			rc = dm_query_session(newsid, sizeof(buf), (void *)INVALID_ADDR, &rlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid bufp)\n",
+				    szFuncName);
+			rc = dm_query_session(newsid, sizeof(buf),
+					      (void *)INVALID_ADDR, &rlen);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -926,18 +1104,23 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL rlenp)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(NULL rlenp)\n",
+				    szFuncName);
 			rc = dm_query_session(newsid, sizeof(buf), buf, NULL);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -953,18 +1136,24 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n", szFuncName);
-			rc = dm_query_session(newsid, sizeof(buf), buf, (size_t *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid rlenp)\n",
+				    szFuncName);
+			rc = dm_query_session(newsid, sizeof(buf), buf,
+					      (size_t *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -981,36 +1170,55 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen zero)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(buflen zero)\n",
+				    szFuncName);
 			rc = dm_query_session(newsid, 0, buf, &rlen);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
+					DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n",
+						    rlen);
 
-					if (rlen == strlen(szSessionInfo)+1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, -1, E2BIG);
+					if (rlen == strlen(szSessionInfo) + 1) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, -1,
+							    E2BIG);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n", szFuncName, -1, E2BIG, rlen, strlen(szSessionInfo)+1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected rlen (%d vs %d)\n",
+							    szFuncName, -1,
+							    E2BIG, rlen,
+							    strlen
+							    (szSessionInfo) +
+							    1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1027,38 +1235,54 @@
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName, sizeof(buf));
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(valid)\n", szFuncName,
+				    sizeof(buf));
 			rc = dm_query_session(newsid, sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 
-				if (rlen == strlen(szSessionInfo)+1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buf = \"%s\"\n", buf);
+				if (rlen == strlen(szSessionInfo) + 1) {
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buf = \"%s\"\n", buf);
 
 					if (strcmp(buf, szSessionInfo) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and rlen = %d but unexpected session info (\"%s\" vs \"%s\")\n", szFuncName, 0, rlen, buf, szSessionInfo);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and rlen = %d but unexpected session info (\"%s\" vs \"%s\")\n",
+							    szFuncName, 0, rlen,
+							    buf, szSessionInfo);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n", szFuncName, 0, rlen, strlen(szSessionInfo)+1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n",
+						    szFuncName, 0, rlen,
+						    strlen(szSessionInfo) + 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -1072,43 +1296,62 @@
 		dm_sessid_t newsid;
 		char buf[512];
 		size_t rlen;
-		char *szBig = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345";
+		char *szBig =
+		    "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345";
 
 		/* Variation set up */
 		rc = dm_create_session(DM_NO_SESSION, szBig, &newsid);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(max sessinfo)\n", szFuncName, sizeof(buf));
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(max sessinfo)\n",
+				    szFuncName, sizeof(buf));
 			rc = dm_query_session(newsid, sizeof(buf), buf, &rlen);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "rlen = %d\n", rlen);
 
 				if (rlen == DM_SESSION_INFO_LEN) {
-					DMLOG_PRINT(DMLVL_DEBUG, "buf = \"%s\"\n", buf);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "buf = \"%s\"\n", buf);
 
-					if (strncmp(buf, szBig, DM_SESSION_INFO_LEN-1) == 0) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					if (strncmp
+					    (buf, szBig,
+					     DM_SESSION_INFO_LEN - 1) == 0) {
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and rlen = %d but unexpected session info (\"%s\" vs \"%s\")\n", szFuncName, 0, rlen, buf, szSessionInfo);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and rlen = %d but unexpected session info (\"%s\" vs \"%s\")\n",
+							    szFuncName, 0, rlen,
+							    buf, szSessionInfo);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n", szFuncName, 0, rlen, DM_SESSION_INFO_LEN);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected rlen (%d vs %d)\n",
+						    szFuncName, 0, rlen,
+						    DM_SESSION_INFO_LEN);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
 			rc = dm_destroy_session(newsid);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
diff --git a/testcases/kernel/fs/dmapi/token.c b/testcases/kernel/fs/dmapi/token.c
index 152a1c0..dd877cb 100644
--- a/testcases/kernel/fs/dmapi/token.c
+++ b/testcases/kernel/fs/dmapi/token.c
@@ -53,7 +53,7 @@
 
 	char *szFuncName;
 	char *varstr;
-	int   rc;
+	int rc;
 	char *szSessionInfo = "dm_test session info";
 	dm_eventset_t events;
 
@@ -65,21 +65,35 @@
 
 	/* CANNOT DO ANYTHING WITHOUT SUCCESSFUL INITIALIZATION!!! */
 	if ((rc = dm_init_service(&varstr)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_init_service failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_init_service failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_create_session failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else if ((rc = dm_create_session(DM_NO_SESSION, szSessionInfo, &sid))
+		   == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_create_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		DM_EXIT();
-	} else if ((rc = dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN, &events, DM_EVENT_MAX)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+	} else
+	    if ((rc =
+		 dm_set_disp(sid, DM_GLOBAL_HANP, DM_GLOBAL_HLEN, DM_NO_TOKEN,
+			     &events, DM_EVENT_MAX)) == -1) {
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_set_disp failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = pthread_create(&tid, NULL, Thread, NULL)) != 0) {
-		DMLOG_PRINT(DMLVL_ERR, "pthread_create failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "pthread_create failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else if ((rc = dmimpl_mount(&mountPt, &deviceNm)) == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dmimpl_mount failed! (rc = %d, errno = %d)\n", rc,
+			    errno);
 		dm_destroy_session(sid);
 		DM_EXIT();
 	} else {
@@ -88,7 +102,7 @@
 		rmdir(DummySubdir);
 	}
 
-	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI tokens tests\n") ;
+	DMLOG_PRINT(DMLVL_DEBUG, "Starting DMAPI tokens tests\n");
 
 	szFuncName = "dm_getall_tokens";
 
@@ -106,18 +120,25 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n", szFuncName);
-			rc = dm_getall_tokens(INVALID_ADDR, TOKBUF_NUM, buf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid sid)\n",
+				    szFuncName);
+			rc = dm_getall_tokens(INVALID_ADDR, TOKBUF_NUM, buf,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -136,35 +157,52 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelem)\n",
+				    szFuncName);
 			rc = dm_getall_tokens(sid, 0, buf, &nelem);
 			if (rc == -1) {
 				if (errno == E2BIG) {
-					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
+					DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n",
+						    nelem);
 					if (nelem == 1) {
-						DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d and expected errno = %d\n", szFuncName, -1, E2BIG);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d and expected errno = %d\n",
+							    szFuncName, -1,
+							    E2BIG);
 						DMVAR_PASS();
 					} else {
-						DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d and expected errno = %d but unexpected nelem (%d vs %d)\n", szFuncName, -1, E2BIG, nelem, 1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d and expected errno = %d but unexpected nelem (%d vs %d)\n",
+							    szFuncName, -1,
+							    E2BIG, nelem, 1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected errno = %d\n", szFuncName, -1, errno);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected errno = %d\n",
+						    szFuncName, -1, errno);
 					DMVAR_FAIL();
 				}
 			} else {
-	  			DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d\n", szFuncName, rc);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d\n",
+					    szFuncName, rc);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -182,18 +220,26 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid tokenbufp)\n", szFuncName);
-			rc = dm_getall_tokens(sid, TOKBUF_NUM, (dm_token_t *)INVALID_ADDR, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid tokenbufp)\n",
+				    szFuncName);
+			rc = dm_getall_tokens(sid, TOKBUF_NUM,
+					      (dm_token_t *) INVALID_ADDR,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -211,18 +257,25 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n", szFuncName);
-			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf, (u_int *)INVALID_ADDR);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(invalid nelemp)\n",
+				    szFuncName);
+			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf,
+					      (u_int *) INVALID_ADDR);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EFAULT);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -241,36 +294,52 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one userevent token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one userevent token)\n",
+				    szFuncName);
 			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "token 0: %d\n", buf[0]);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 0: %d\n", buf[0]);
 					if (token == buf[0]) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected token (%d vs %d)\n", szFuncName, 0, token, buf[0]);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected token (%d vs %d)\n",
+							    szFuncName, 0,
+							    token, buf[0]);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -287,49 +356,80 @@
 
 		/* Variation set up */
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
-		if ((rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token1)) == -1) {
+		if ((rc =
+		     dm_create_userevent(sid, MSG_DATALEN, msgbuf,
+					 &token1)) == -1) {
 			/* No clean up */
-		} else if ((rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token2)) == -1) {
-			dm_respond_event(sid, token1, DM_RESP_CONTINUE, 0, 0, NULL);
+		} else
+		    if ((rc =
+			 dm_create_userevent(sid, MSG_DATALEN, msgbuf,
+					     &token2)) == -1) {
+			dm_respond_event(sid, token1, DM_RESP_CONTINUE, 0, 0,
+					 NULL);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(two userevent tokens)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(two userevent tokens)\n",
+				    szFuncName);
 			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 2) {
-					DMLOG_PRINT(DMLVL_DEBUG, "token 0: %d\n", buf[0]);
-					DMLOG_PRINT(DMLVL_DEBUG, "token 1: %d\n", buf[1]);
-					if (token1 == buf[0] || token1 == buf[1]) {
-						if (token2 == buf[0] || token2 == buf[1]) {
-						  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 0: %d\n", buf[0]);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 1: %d\n", buf[1]);
+					if (token1 == buf[0]
+					    || token1 == buf[1]) {
+						if (token2 == buf[0]
+						    || token2 == buf[1]) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s passed with expected rc = %d\n",
+								    szFuncName,
+								    0);
 							DMVAR_PASS();
 						} else {
-						  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token = %d not in buf\n", szFuncName, 0, token2);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s failed with expected rc = %d but token = %d not in buf\n",
+								    szFuncName,
+								    0, token2);
 							DMVAR_FAIL();
 						}
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token = %d not in buf\n", szFuncName, 0, token1);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but token = %d not in buf\n",
+							    szFuncName, 0,
+							    token1);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token2, DM_RESP_CONTINUE, 0, 0, NULL);
-			rc |= dm_respond_event(sid, token1, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token2, DM_RESP_CONTINUE, 0,
+					      0, NULL);
+			rc |=
+			    dm_respond_event(sid, token1, DM_RESP_CONTINUE, 0,
+					     0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
@@ -347,7 +447,9 @@
 		createToken = 0;
 		rc = pthread_create(&tidToken, NULL, TokenThread, NULL);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to set up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to set up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -355,25 +457,37 @@
 			while (createToken == 0) {
 				EVENT_DELIVERY_DELAY;
 			}
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event token)\n",
+				    szFuncName);
 			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 1) {
-					DMLOG_PRINT(DMLVL_DEBUG, "token 0: %d\n", buf[0]);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 0: %d\n", buf[0]);
 					if (buf[0] == createToken) {
-					  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						DMLOG_PRINT(DMLVL_DEBUG,
+							    "%s passed with expected rc = %d\n",
+							    szFuncName, 0);
 						DMVAR_PASS();
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected token (%d vs %d)\n", szFuncName, 0, buf[0], createToken);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but unexpected token (%d vs %d)\n",
+							    szFuncName, 0,
+							    buf[0],
+							    createToken);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
@@ -396,13 +510,21 @@
 		/* Variation set up */
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		createToken = 0;
-		if ((rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token)) == -1) {
+		if ((rc =
+		     dm_create_userevent(sid, MSG_DATALEN, msgbuf,
+					 &token)) == -1) {
 			/* No clean up */
-		} else if ((rc = pthread_create(&tidToken, NULL, TokenThread, NULL)) == -1) {
-			dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+		} else
+		    if ((rc =
+			 pthread_create(&tidToken, NULL, TokenThread,
+					NULL)) == -1) {
+			dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0,
+					 NULL);
 		}
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
@@ -410,38 +532,60 @@
 			while (createToken == 0) {
 				EVENT_DELIVERY_DELAY;
 			}
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(one event token, one userevent token)\n", szFuncName);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "%s(one event token, one userevent token)\n",
+				    szFuncName);
 			rc = dm_getall_tokens(sid, TOKBUF_NUM, buf, &nelem);
 			if (rc == 0) {
 				DMLOG_PRINT(DMLVL_DEBUG, "nelem = %d\n", nelem);
 				if (nelem == 2) {
-					DMLOG_PRINT(DMLVL_DEBUG, "token 0: %d\n", buf[0]);
-					DMLOG_PRINT(DMLVL_DEBUG, "token 1: %d\n", buf[1]);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 0: %d\n", buf[0]);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "token 1: %d\n", buf[1]);
 					if (token == buf[0] || token == buf[1]) {
-						if (createToken == buf[0] || createToken == buf[1]) {
-						  	DMLOG_PRINT(DMLVL_DEBUG, "%s passed with expected rc = %d\n", szFuncName, 0);
+						if (createToken == buf[0]
+						    || createToken == buf[1]) {
+							DMLOG_PRINT(DMLVL_DEBUG,
+								    "%s passed with expected rc = %d\n",
+								    szFuncName,
+								    0);
 							DMVAR_PASS();
 						} else {
-						  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token = %d not in buf\n", szFuncName, 0, createToken);
+							DMLOG_PRINT(DMLVL_ERR,
+								    "%s failed with expected rc = %d but token = %d not in buf\n",
+								    szFuncName,
+								    0,
+								    createToken);
 							DMVAR_FAIL();
 						}
 					} else {
-					  	DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but token = %d not in buf\n", szFuncName, 0, token);
+						DMLOG_PRINT(DMLVL_ERR,
+							    "%s failed with expected rc = %d but token = %d not in buf\n",
+							    szFuncName, 0,
+							    token);
 						DMVAR_FAIL();
 					}
 				} else {
-					DMLOG_PRINT(DMLVL_ERR, "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n", szFuncName, 0, nelem, 1);
+					DMLOG_PRINT(DMLVL_ERR,
+						    "%s failed with expected rc = %d but unexpected nelem (%d vs %d)\n",
+						    szFuncName, 0, nelem, 1);
 					DMVAR_FAIL();
 				}
 			} else {
-				DMLOG_PRINT(DMLVL_ERR, "%s failed with unexpected rc = %d (errno = %d)\n", szFuncName, rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "%s failed with unexpected rc = %d (errno = %d)\n",
+					    szFuncName, rc, errno);
 				DMVAR_FAIL();
 			}
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 			pthread_join(tidToken, NULL);
 		}
@@ -461,32 +605,42 @@
 		memcpy(msgbuf, MSG_DATA, MSG_DATALEN);
 		rc = dm_create_userevent(sid, MSG_DATALEN, msgbuf, &token);
 		if (rc == -1) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Unable to clean up variation! (errno = %d)\n",
+				    errno);
 			DMVAR_SKIP();
 		} else {
 			/* Variation */
-			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION, sid)\n", szFuncName);
-			rc = dm_getall_tokens(DM_NO_SESSION, TOKBUF_NUM, buf, &nelem);
+			DMLOG_PRINT(DMLVL_DEBUG, "%s(DM_NO_SESSION, sid)\n",
+				    szFuncName);
+			rc = dm_getall_tokens(DM_NO_SESSION, TOKBUF_NUM, buf,
+					      &nelem);
 			DMVAR_ENDFAILEXP(szFuncName, -1, rc, EINVAL);
 
 			/* Variation clean up */
-			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0, 0, NULL);
+			rc = dm_respond_event(sid, token, DM_RESP_CONTINUE, 0,
+					      0, NULL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_DEBUG, "Unable to clean up variation! (errno = %d)\n", errno);
+				DMLOG_PRINT(DMLVL_DEBUG,
+					    "Unable to clean up variation! (errno = %d)\n",
+					    errno);
 			}
 		}
 	}
 
 	rc = umount(mountPt);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR, "umount failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	pthread_join(tid, NULL);
 
 	rc = dm_destroy_session(sid);
 	if (rc == -1) {
-		DMLOG_PRINT(DMLVL_ERR, "dm_destroy_session failed! (rc = %d, errno = %d)\n", rc, errno);
+		DMLOG_PRINT(DMLVL_ERR,
+			    "dm_destroy_session failed! (rc = %d, errno = %d)\n",
+			    rc, errno);
 	}
 
 	DMLOG_STOP();
@@ -511,16 +665,21 @@
 			DMLOG_PRINT(DMLVL_DEBUG, "Waiting for event...\n");
 			dmMsgBufLen = 0;
 
-			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf), dmMsgBuf, &dmMsgBufLen);
-			DMLOG_PRINT(DMLVL_DEBUG, "... dm_get_events returned %d (errno %d)\n", rc, errno);
+			rc = dm_get_events(sid, 1, DM_EV_WAIT, sizeof(dmMsgBuf),
+					   dmMsgBuf, &dmMsgBufLen);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "... dm_get_events returned %d (errno %d)\n",
+				    rc, errno);
 		} while ((rc == -1) && (errno == EINTR) && (dmMsgBufLen == 0));
 
 		if (rc) {
-			DMLOG_PRINT(DMLVL_ERR, "dm_get_events failed with rc = %d, errno = %d\n", rc, errno);
+			DMLOG_PRINT(DMLVL_ERR,
+				    "dm_get_events failed with rc = %d, errno = %d\n",
+				    rc, errno);
 			dm_destroy_session(sid);
 			DM_EXIT();
 		} else {
-			dmMsg = (dm_eventmsg_t *)dmMsgBuf;
+			dmMsg = (dm_eventmsg_t *) dmMsgBuf;
 			token = dmMsg->ev_token;
 			type = dmMsg->ev_type;
 
@@ -529,26 +688,39 @@
 
 		if (type == DM_EVENT_MOUNT) {
 			/* SPECIAL CASE: need to set disposition, events and response */
-			dm_mount_event_t *me = DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
+			dm_mount_event_t *me =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_mount_event_t *);
 			void *hanp = DM_GET_VALUE(me, me_handle1, void *);
 			size_t hlen = DM_GET_LEN(me, me_handle1);
 
 			DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_MOUNT\n");
 			DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", me->me_mode);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n", hanp);
-			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle length: %d\n", hlen);
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n", DM_GET_VALUE(me, me_handle2, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle length: %d\n", DM_GET_LEN(me, me_handle2));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n", DM_GET_VALUE(me, me_name1, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n", DM_GET_VALUE(me, me_name2, char *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n", DM_GET_VALUE(me, me_roothandle, void *));
-			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n", DM_GET_LEN(me, me_roothandle));
+			DMLOG_PRINT(DMLVL_DEBUG, "  File system handle: %p\n",
+				    hanp);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  File system handle length: %d\n", hlen);
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint handle: %p\n",
+				    DM_GET_VALUE(me, me_handle2, void *));
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "  Mountpoint handle length: %d\n",
+				    DM_GET_LEN(me, me_handle2));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Mountpoint path: %s\n",
+				    DM_GET_VALUE(me, me_name1, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Media designator: %s\n",
+				    DM_GET_VALUE(me, me_name2, char *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle: %p\n",
+				    DM_GET_VALUE(me, me_roothandle, void *));
+			DMLOG_PRINT(DMLVL_DEBUG, "  Root handle length: %d\n",
+				    DM_GET_LEN(me, me_roothandle));
 
-    			bMounted = dm_handle_is_valid(hanp, hlen);
+			bMounted = dm_handle_is_valid(hanp, hlen);
 
-    			rc = dm_request_right(sid, hanp, hlen, token, DM_RR_WAIT, DM_RIGHT_EXCL);
+			rc = dm_request_right(sid, hanp, hlen, token,
+					      DM_RR_WAIT, DM_RIGHT_EXCL);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
@@ -557,30 +729,39 @@
 			DMEV_SET(DM_EVENT_PREUNMOUNT, events);
 			DMEV_SET(DM_EVENT_UNMOUNT, events);
 			DMEV_SET(DM_EVENT_CREATE, events);
-			rc = dm_set_disp(sid, hanp, hlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_disp(sid, hanp, hlen, token, &events,
+					 DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_disp failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_disp failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-			rc = dm_set_eventlist(sid, hanp, hlen, token, &events, DM_EVENT_MAX);
+			rc = dm_set_eventlist(sid, hanp, hlen, token, &events,
+					      DM_EVENT_MAX);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_set_eventlist failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_set_eventlist failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
-    			rc = dm_release_right(sid, hanp, hlen, token);
+			rc = dm_release_right(sid, hanp, hlen, token);
 			if (rc == -1) {
-				DMLOG_PRINT(DMLVL_ERR, "dm_request_right failed! (rc = %d, errno = %d)\n", rc, errno);
+				DMLOG_PRINT(DMLVL_ERR,
+					    "dm_request_right failed! (rc = %d, errno = %d)\n",
+					    rc, errno);
 				dm_destroy_session(sid);
 				DM_EXIT();
 			}
 
 			response = DM_RESP_CONTINUE;
 		} else if (type == DM_EVENT_UNMOUNT) {
-			dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+			dm_namesp_event_t *nse =
+			    DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
 			if (nse->ne_retcode == 0) {
 				bMounted = DM_FALSE;
 			}
@@ -593,37 +774,59 @@
 				break;
 
 			case DM_EVENT_CREATE:
-			{
-				dm_namesp_event_t *nse = DM_GET_VALUE(dmMsg, ev_data, dm_namesp_event_t *);
+				{
+					dm_namesp_event_t *nse =
+					    DM_GET_VALUE(dmMsg, ev_data,
+							 dm_namesp_event_t *);
 
-				DMLOG_PRINT(DMLVL_DEBUG, "Message is DM_EVENT_CREATE\n");
-				DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n", nse->ne_mode);
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle: %p\n", DM_GET_VALUE(nse, ne_handle1, void *));
-				DMLOG_PRINT(DMLVL_DEBUG, "  Parent handle length: %d\n", DM_GET_LEN(nse, ne_handle1));
-				DMLOG_PRINT(DMLVL_DEBUG, "  Entry name: %s\n", DM_GET_VALUE(nse, ne_name1, char *));
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "Message is DM_EVENT_CREATE\n");
+					DMLOG_PRINT(DMLVL_DEBUG, "  Mode: %x\n",
+						    nse->ne_mode);
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle: %p\n",
+						    DM_GET_VALUE(nse,
+								 ne_handle1,
+								 void *));
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Parent handle length: %d\n",
+						    DM_GET_LEN(nse,
+							       ne_handle1));
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Entry name: %s\n",
+						    DM_GET_VALUE(nse, ne_name1,
+								 char *));
 
-				createToken = token;
-				DMLOG_PRINT(DMLVL_DEBUG, "  Token: %d\n", createToken);
+					createToken = token;
+					DMLOG_PRINT(DMLVL_DEBUG,
+						    "  Token: %d\n",
+						    createToken);
 
-				/* Wait for main thread to call dm_getall_tokens */
-				sleep(3);
+					/* Wait for main thread to call dm_getall_tokens */
+					sleep(3);
 
-				response = DM_RESP_CONTINUE;
-				break;
-			}
+					response = DM_RESP_CONTINUE;
+					break;
+				}
 
 			default:
-			{
-				DMLOG_PRINT(DMLVL_ERR, "Message is unexpected!\n");
-				response = DM_RESP_ABORT;
-				break;
-			}
+				{
+					DMLOG_PRINT(DMLVL_ERR,
+						    "Message is unexpected!\n");
+					response = DM_RESP_ABORT;
+					break;
+				}
 			}
 		}
 
 		if (response != DM_RESP_INVALID) {
-			DMLOG_PRINT(DMLVL_DEBUG, "Responding to message %d with %d\n", type, response);
-			rc = dm_respond_event(sid, token, response, response == DM_RESP_ABORT ? ABORT_ERRNO : 0, 0, NULL);
+			DMLOG_PRINT(DMLVL_DEBUG,
+				    "Responding to message %d with %d\n", type,
+				    response);
+			rc = dm_respond_event(sid, token, response,
+					      response ==
+					      DM_RESP_ABORT ? ABORT_ERRNO : 0,
+					      0, NULL);
 		}
 	} while (bMounted);
 
diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
index 697754b..656642b 100644
--- a/testcases/kernel/fs/doio/doio.c
+++ b/testcases/kernel/fs/doio/doio.c
@@ -65,22 +65,22 @@
 #include <sys/iosw.h>
 #endif
 #ifdef sgi
-#include <aio.h>	/* for aio_read,write */
-#include <inttypes.h>	/* for uint64_t type */
-#include <siginfo.h>	/* signal handlers & SA_SIGINFO */
+#include <aio.h>		/* for aio_read,write */
+#include <inttypes.h>		/* for uint64_t type */
+#include <siginfo.h>		/* signal handlers & SA_SIGINFO */
 #endif
 #ifndef CRAY
-#include <sys/uio.h>	/* for struct iovec (readv)*/
-#include <sys/mman.h>	/* for mmap(2) */
-#include <sys/ipc.h>	/* for i/o buffer in shared memory */
-#include <sys/shm.h>	/* for i/o buffer in shared memory */
+#include <sys/uio.h>		/* for struct iovec (readv) */
+#include <sys/mman.h>		/* for mmap(2) */
+#include <sys/ipc.h>		/* for i/o buffer in shared memory */
+#include <sys/shm.h>		/* for i/o buffer in shared memory */
 #endif
 #include <sys/wait.h>
 #ifdef CRAY
 #include <sys/listio.h>
 #include <sys/panic.h>
 #endif
-#include <sys/time.h>	/* for delays */
+#include <sys/time.h>		/* for delays */
 
 #include "doio.h"
 #include "write_log.h"
@@ -89,10 +89,10 @@
 #include "pattern.h"
 
 #define	NMEMALLOC	32
-#define	MEM_DATA	1	/* data space 				*/
-#define	MEM_SHMEM	2	/* System V shared memory 		*/
-#define	MEM_T3ESHMEM	3	/* T3E Shared Memory 			*/
-#define	MEM_MMAP	4	/* mmap(2) 				*/
+#define	MEM_DATA	1	/* data space                           */
+#define	MEM_SHMEM	2	/* System V shared memory               */
+#define	MEM_T3ESHMEM	3	/* T3E Shared Memory                    */
+#define	MEM_MMAP	4	/* mmap(2)                              */
 
 #define	MEMF_PRIVATE	0001
 #define	MEMF_AUTORESRV	0002
@@ -102,18 +102,18 @@
 #define	MEMF_FIXADDR	0100
 #define	MEMF_ADDR	0200
 #define	MEMF_AUTOGROW	0400
-#define	MEMF_FILE	01000	/* regular file -- unlink on close	*/
+#define	MEMF_FILE	01000	/* regular file -- unlink on close      */
 #define	MEMF_MPIN	010000	/* use mpin(2) to lock pages in memory */
 
 struct memalloc {
-	int	memtype;
-	int	flags;
-	int	nblks;
-	char	*name;
-	void	*space;		/* memory address of allocated space */
-	int	fd;		/* FD open for mmaping */
-	int	size;
-}	Memalloc[NMEMALLOC];
+	int memtype;
+	int flags;
+	int nblks;
+	char *name;
+	void *space;		/* memory address of allocated space */
+	int fd;			/* FD open for mmaping */
+	int size;
+} Memalloc[NMEMALLOC];
 
 /*
  * Structure for maintaining open file test descriptors.  Used by
@@ -121,18 +121,18 @@
  */
 
 struct fd_cache {
-	char    c_file[MAX_FNAME_LENGTH+1];
-	int	c_oflags;
-	int	c_fd;
-	long    c_rtc;
+	char c_file[MAX_FNAME_LENGTH + 1];
+	int c_oflags;
+	int c_fd;
+	long c_rtc;
 #ifdef sgi
-	int	c_memalign;	/* from F_DIOINFO */
-	int	c_miniosz;
-	int	c_maxiosz;
+	int c_memalign;		/* from F_DIOINFO */
+	int c_miniosz;
+	int c_maxiosz;
 #endif
 #ifndef CRAY
-	void	*c_memaddr;	/* mmapped address */
-	int	c_memlen;	/* length of above region */
+	void *c_memaddr;	/* mmapped address */
+	int c_memlen;		/* length of above region */
 #endif
 };
 
@@ -141,27 +141,27 @@
  * Used to map cmdline arguments to values
  */
 struct smap {
-	char    *string;
-	int	value;
+	char *string;
+	int value;
 };
 
 struct aio_info {
-	int			busy;
-	int			id;
-	int			fd;
-	int			strategy;
-	volatile int		done;
+	int busy;
+	int id;
+	int fd;
+	int strategy;
+	volatile int done;
 #ifdef CRAY
-	struct iosw		iosw;
+	struct iosw iosw;
 #endif
 #ifdef sgi
-	aiocb_t			aiocb;
-	int			aio_ret;	/* from aio_return */
-	int			aio_errno;	/* from aio_error */
+	aiocb_t aiocb;
+	int aio_ret;		/* from aio_return */
+	int aio_errno;		/* from aio_error */
 #endif
-	int			sig;
-	int			signalled;
-	struct sigaction	osa;
+	int sig;
+	int signalled;
+	struct sigaction osa;
 };
 
 /* ---------------------------------------------------------------------------
@@ -176,20 +176,20 @@
  *	FILE_LOCK, WRITE_LOG, VERIFY_DATA,
  */
 
-struct	status {
-	int	rval;		/* syscall return */
-	int	err;		/* errno */
-	int	*aioid;		/* list of async I/O structures */
+struct status {
+	int rval;		/* syscall return */
+	int err;		/* errno */
+	int *aioid;		/* list of async I/O structures */
 };
 
 struct syscall_info {
-	char		*sy_name;
-	int		sy_type;
-	struct status	*(*sy_syscall)();
-	int		(*sy_buffer)();
-	char		*(*sy_format)();
-	int		sy_flags;
-	int		sy_bits;
+	char *sy_name;
+	int sy_type;
+	struct status *(*sy_syscall) ();
+	int (*sy_buffer) ();
+	char *(*sy_format) ();
+	int sy_flags;
+	int sy_bits;
 };
 
 #define	SY_WRITE		00001
@@ -198,7 +198,7 @@
 #define	SY_SDS			00100
 
 #ifndef O_SSD
-#define O_SSD 0	    	/* so code compiles on a CRAY2 */
+#define O_SSD 0			/* so code compiles on a CRAY2 */
 #endif
 
 #ifdef sgi
@@ -208,13 +208,13 @@
 #endif
 
 #ifndef O_PARALLEL
-#define O_PARALLEL 0	/* so O_PARALLEL may be used in expressions */
+#define O_PARALLEL 0		/* so O_PARALLEL may be used in expressions */
 #endif
 
-#define PPID_CHECK_INTERVAL 5		/* check ppid every <-- iterations */
-#define	MAX_AIO		256		/* maximum number of async I/O ops */
+#define PPID_CHECK_INTERVAL 5	/* check ppid every <-- iterations */
+#define	MAX_AIO		256	/* maximum number of async I/O ops */
 #ifdef _CRAYMPP
-#define	MPP_BUMP	16		/* page un-alignment for MPP */
+#define	MPP_BUMP	16	/* page un-alignment for MPP */
 #else
 #define	MPP_BUMP	0
 #endif
@@ -234,52 +234,52 @@
  * on the cmdline.
  */
 
-int 	a_opt = 0;  	    /* abort on data compare errors 	*/
-int	e_opt = 0;	    /* exec() after fork()'ing	        */
-int	C_opt = 0;	    /* Data Check Type			*/
-int	d_opt = 0;	    /* delay between operations		*/
-int 	k_opt = 0;  	    /* lock file regions during writes	*/
-int	m_opt = 0;	    /* generate periodic messages	*/
-int 	n_opt = 0;  	    /* nprocs	    	    	    	*/
-int 	r_opt = 0;  	    /* resource release interval    	*/
-int 	w_opt = 0;  	    /* file write log file  	    	*/
-int 	v_opt = 0;  	    /* verify writes if set 	    	*/
-int 	U_opt = 0;  	    /* upanic() on varios conditions	*/
-int	V_opt = 0;	    /* over-ride default validation fd type */
-int	M_opt = 0;	    /* data buffer allocation types     */
-char	TagName[40];	    /* name of this doio (see Monster)  */
+int a_opt = 0;			/* abort on data compare errors     */
+int e_opt = 0;			/* exec() after fork()'ing          */
+int C_opt = 0;			/* Data Check Type                  */
+int d_opt = 0;			/* delay between operations         */
+int k_opt = 0;			/* lock file regions during writes  */
+int m_opt = 0;			/* generate periodic messages       */
+int n_opt = 0;			/* nprocs                           */
+int r_opt = 0;			/* resource release interval        */
+int w_opt = 0;			/* file write log file              */
+int v_opt = 0;			/* verify writes if set             */
+int U_opt = 0;			/* upanic() on varios conditions    */
+int V_opt = 0;			/* over-ride default validation fd type */
+int M_opt = 0;			/* data buffer allocation types     */
+char TagName[40];		/* name of this doio (see Monster)  */
 
 /*
  * Misc globals initialized in parse_cmdline()
  */
 
-char	*Prog = NULL;	    /* set up in parse_cmdline()		*/
-int 	Upanic_Conditions;  /* set by args to -U    	    		*/
-int 	Release_Interval;   /* arg to -r    	    	    		*/
-int 	Nprocs;	    	    /* arg to -n    	    	    		*/
-char	*Write_Log; 	    /* arg to -w    	    	    		*/
-char	*Infile;    	    /* input file (defaults to stdin)		*/
-int	*Children;	    /* pids of child procs			*/
-int	Nchildren = 0;
-int	Nsiblings = 0;	    /* tfork'ed siblings			*/
-int	Execd = 0;
-int	Message_Interval = 0;
-int	Npes = 0;	    /* non-zero if built as an mpp multi-pe app */
-int	Vpe = -1;	    /* Virtual pe number if Npes >= 0           */
-int	Reqno = 1;	    /* request # - used in some error messages  */
-int	Reqskipcnt = 0;	    /* count of I/O requests that are skipped   */
-int	Validation_Flags;
-char	*(*Data_Check)();   /* function to call for data checking       */
-int	(*Data_Fill)();     /* function to call for data filling        */
-int	Nmemalloc = 0;	    /* number of memory allocation strategies   */
-int	delayop = 0;	    /* delay between operations - type of delay */
-int	delaytime = 0;	    /* delay between operations - how long      */
+char *Prog = NULL;		/* set up in parse_cmdline()                */
+int Upanic_Conditions;		/* set by args to -U                        */
+int Release_Interval;		/* arg to -r                                */
+int Nprocs;			/* arg to -n                                */
+char *Write_Log;		/* arg to -w                                */
+char *Infile;			/* input file (defaults to stdin)           */
+int *Children;			/* pids of child procs                      */
+int Nchildren = 0;
+int Nsiblings = 0;		/* tfork'ed siblings                        */
+int Execd = 0;
+int Message_Interval = 0;
+int Npes = 0;			/* non-zero if built as an mpp multi-pe app */
+int Vpe = -1;			/* Virtual pe number if Npes >= 0           */
+int Reqno = 1;			/* request # - used in some error messages  */
+int Reqskipcnt = 0;		/* count of I/O requests that are skipped   */
+int Validation_Flags;
+char *(*Data_Check) ();		/* function to call for data checking       */
+int (*Data_Fill) ();		/* function to call for data filling        */
+int Nmemalloc = 0;		/* number of memory allocation strategies   */
+int delayop = 0;		/* delay between operations - type of delay */
+int delaytime = 0;		/* delay between operations - how long      */
 
-struct wlog_file	Wlog;
+struct wlog_file Wlog;
 
-int	active_mmap_rw = 0; /* Indicates that mmapped I/O is occurring. */
+int active_mmap_rw = 0;		/* Indicates that mmapped I/O is occurring. */
 			    /* Used by sigbus_action() in the child doio. */
-int	havesigint = 0;
+int havesigint = 0;
 
 #define SKIP_REQ	-2	/* skip I/O request */
 
@@ -287,209 +287,205 @@
  * Global file descriptors
  */
 
-int 	Wfd_Append; 	    /* for appending to the write-log	    */
-int 	Wfd_Random; 	    /* for overlaying write-log entries	    */
+int Wfd_Append;			/* for appending to the write-log       */
+int Wfd_Random;			/* for overlaying write-log entries     */
 
-#define FD_ALLOC_INCR	32      /* allocate this many fd_map structs	*/
+#define FD_ALLOC_INCR	32	/* allocate this many fd_map structs    */
 				/* at a time */
 
 /*
  * Globals for tracking Sds and Core usage
  */
 
-char	*Memptr;		/* ptr to core buffer space	    	*/
-int 	Memsize;		/* # bytes pointed to by Memptr 	*/
-				/* maintained by alloc_mem()    	*/
+char *Memptr;			/* ptr to core buffer space             */
+int Memsize;			/* # bytes pointed to by Memptr         */
+				/* maintained by alloc_mem()            */
 
-int 	Sdsptr;			/* sds offset (always 0)	    	*/
-int 	Sdssize;		/* # bytes of allocated sds space	*/
-				/* Maintained by alloc_sds()    	*/
-char	Host[16];
-char	Pattern[128];
-int	Pattern_Length;
+int Sdsptr;			/* sds offset (always 0)                */
+int Sdssize;			/* # bytes of allocated sds space       */
+				/* Maintained by alloc_sds()            */
+char Host[16];
+char Pattern[128];
+int Pattern_Length;
 
 /*
  * Signal handlers, and related globals
  */
 
-char		*syserrno(int err);
-void		doio(void);
-void		doio_delay(void);
-char		*format_oflags(int oflags);
-char		*format_strat(int strategy);
-char		*format_rw(struct io_req *ioreq, int fd, void *buffer,
-			int signo, char *pattern, void *iosw);
+char *syserrno(int err);
+void doio(void);
+void doio_delay(void);
+char *format_oflags(int oflags);
+char *format_strat(int strategy);
+char *format_rw(struct io_req *ioreq, int fd, void *buffer,
+		int signo, char *pattern, void *iosw);
 #ifdef CRAY
-char		*format_sds(struct io_req *ioreq, void *buffer, int sds
-			char *pattern);
+char *format_sds(struct io_req *ioreq, void *buffer, int sds char *pattern);
 #endif /* CRAY */
 
-int		do_read(struct io_req *req);
-int		do_write(struct io_req *req);
-int		lock_file_region(char *fname, int fd, int type, int start,
-			int nbytes);
+int do_read(struct io_req *req);
+int do_write(struct io_req *req);
+int lock_file_region(char *fname, int fd, int type, int start, int nbytes);
 
 #ifdef CRAY
-char		*format_listio(struct io_req *ioreq, int lcmd,
-			struct listreq *list, int nent, int fd, char *pattern);
+char *format_listio(struct io_req *ioreq, int lcmd,
+		    struct listreq *list, int nent, int fd, char *pattern);
 #endif /* CRAY */
 
-int		do_listio(struct io_req *req);
+int do_listio(struct io_req *req);
 
 #if defined(_CRAY1) || defined(CRAY)
-int		do_ssdio(struct io_req *req);
+int do_ssdio(struct io_req *req);
 #endif /* defined(_CRAY1) || defined(CRAY) */
 
-char		*fmt_ioreq(struct io_req *ioreq, struct syscall_info *sy,
-			int fd);
+char *fmt_ioreq(struct io_req *ioreq, struct syscall_info *sy, int fd);
 
 #ifdef CRAY
-struct status	*sy_listio(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-int		listio_mem(struct io_req *req, int offset, int fmstride,
-			int *min, int *max);
-char		*fmt_listio(struct io_req *req, struct syscall_info *sy,
-			int fd, char *addr);
+struct status *sy_listio(struct io_req *req, struct syscall_info *sysc,
+			 int fd, char *addr);
+int listio_mem(struct io_req *req, int offset, int fmstride,
+	       int *min, int *max);
+char *fmt_listio(struct io_req *req, struct syscall_info *sy,
+		 int fd, char *addr);
 #endif /* CRAY */
 
 #ifdef sgi
-struct status	*sy_pread(struct io_req *req, struct syscall_info *sysc,
+struct status *sy_pread(struct io_req *req, struct syscall_info *sysc,
 			int fd, char *addr);
-struct status	*sy_pwrite(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-char		*fmt_pread(struct io_req *req, struct syscall_info *sy,
-			int fd, char *addr);
-#endif	/* sgi */
-
-#ifndef CRAY
-struct status	*sy_readv(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-struct status	*sy_writev(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-struct status	*sy_rwv(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr, int rw);
-char		*fmt_readv(struct io_req *req, struct syscall_info *sy,
-			int fd, char *addr);
-#endif /* !CRAY */
-
-#ifdef sgi
-struct status	*sy_aread(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-struct status	*sy_awrite(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr)
-struct status	*sy_arw(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr, int rw);
-char		*fmt_aread(struct io_req *req, struct syscall_info *sy,
-			int fd, char *addr);
+struct status *sy_pwrite(struct io_req *req, struct syscall_info *sysc,
+			 int fd, char *addr);
+char *fmt_pread(struct io_req *req, struct syscall_info *sy,
+		int fd, char *addr);
 #endif /* sgi */
 
 #ifndef CRAY
-struct status	*sy_mmread(struct io_req *req, struct syscall_info *sysc,
+struct status *sy_readv(struct io_req *req, struct syscall_info *sysc,
 			int fd, char *addr);
-struct status	*sy_mmwrite(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr);
-struct status	*sy_mmrw(struct io_req *req, struct syscall_info *sysc,
-			int fd, char *addr, int rw);
-char		*fmt_mmrw(struct io_req *req, struct syscall_info *sy, int fd,
-			char *addr);
+struct status *sy_writev(struct io_req *req, struct syscall_info *sysc,
+			 int fd, char *addr);
+struct status *sy_rwv(struct io_req *req, struct syscall_info *sysc,
+		      int fd, char *addr, int rw);
+char *fmt_readv(struct io_req *req, struct syscall_info *sy,
+		int fd, char *addr);
 #endif /* !CRAY */
 
-int		do_rw(struct io_req *req);
-
 #ifdef sgi
-int		do_fcntl(struct io_req *req);
+struct status *sy_aread(struct io_req *req, struct syscall_info *sysc,
+			int fd, char *addr);
+struct status *sy_awrite(struct io_req *req, struct syscall_info *sysc,
+			 int fd, char *addr)
+struct status *sy_arw(struct io_req *req, struct syscall_info *sysc,
+		      int fd, char *addr, int rw);
+char *fmt_aread(struct io_req *req, struct syscall_info *sy,
+		int fd, char *addr);
 #endif /* sgi */
 
 #ifndef CRAY
-int		do_sync(struct io_req *req);
+struct status *sy_mmread(struct io_req *req, struct syscall_info *sysc,
+			 int fd, char *addr);
+struct status *sy_mmwrite(struct io_req *req, struct syscall_info *sysc,
+			  int fd, char *addr);
+struct status *sy_mmrw(struct io_req *req, struct syscall_info *sysc,
+		       int fd, char *addr, int rw);
+char *fmt_mmrw(struct io_req *req, struct syscall_info *sy, int fd, char *addr);
 #endif /* !CRAY */
 
-int		doio_pat_fill(char *addr, int mem_needed, char *Pattern,
-			int Pattern_Length, int shift);
-char		*doio_pat_check(char *buf, int offset, int length,
-			char *pattern, int pattern_length, int patshift);
-char		*check_file(char *file, int offset, int length, char *pattern,
-			int pattern_length, int patshift, int fsa);
-int		doio_fprintf(FILE *stream, char *format, ...);
-int		alloc_mem(int nbytes);
+int do_rw(struct io_req *req);
+
+#ifdef sgi
+int do_fcntl(struct io_req *req);
+#endif /* sgi */
+
+#ifndef CRAY
+int do_sync(struct io_req *req);
+#endif /* !CRAY */
+
+int doio_pat_fill(char *addr, int mem_needed, char *Pattern,
+		  int Pattern_Length, int shift);
+char *doio_pat_check(char *buf, int offset, int length,
+		     char *pattern, int pattern_length, int patshift);
+char *check_file(char *file, int offset, int length, char *pattern,
+		 int pattern_length, int patshift, int fsa);
+int doio_fprintf(FILE * stream, char *format, ...);
+int alloc_mem(int nbytes);
 
 #if defined(_CRAY1) || defined(CRAY)
-int		alloc_sds(int nbytes);
+int alloc_sds(int nbytes);
 #endif /* defined(_CRAY1) || defined(CRAY) */
 
-int		alloc_fd(char *file, int oflags);
-struct fd_cache	*alloc_fdcache(char *file, int oflags);
+int alloc_fd(char *file, int oflags);
+struct fd_cache *alloc_fdcache(char *file, int oflags);
 
 #ifdef sgi
-void		signal_info(int sig, siginfo_t *info, void *v);
-void		cleanup_handler(int sig, siginfo_t *info, void *v);
-void		die_handler(int sig, siginfo_t *info, void *v);
-void		sigbus_handler(int sig, siginfo_t *info, void *v);
-#else	/* !sgi */
-void		cleanup_handler(int sig);
-void		die_handler(int sig);
+void signal_info(int sig, siginfo_t * info, void *v);
+void cleanup_handler(int sig, siginfo_t * info, void *v);
+void die_handler(int sig, siginfo_t * info, void *v);
+void sigbus_handler(int sig, siginfo_t * info, void *v);
+#else /* !sgi */
+void cleanup_handler(int sig);
+void die_handler(int sig);
 
 #ifndef CRAY
-void		sigbus_handler(int sig);
+void sigbus_handler(int sig);
 #endif /* !CRAY */
 #endif /* sgi */
 
-void		noop_handler(int sig);
-void		sigint_handler(int sig);
-void		aio_handler(int sig);
-void		dump_aio(void);
+void noop_handler(int sig);
+void sigint_handler(int sig);
+void aio_handler(int sig);
+void dump_aio(void);
 
 #ifdef sgi
-void		cb_handler(sigval_t val);
+void cb_handler(sigval_t val);
 #endif /* sgi */
 
-struct aio_info	*aio_slot(int aio_id);
-int		aio_register(int fd, int strategy, int sig);
-int		aio_unregister(int aio_id);
+struct aio_info *aio_slot(int aio_id);
+int aio_register(int fd, int strategy, int sig);
+int aio_unregister(int aio_id);
 
 #ifndef __linux__
-int		aio_wait(int aio_id);
+int aio_wait(int aio_id);
 #endif /* !__linux__ */
 
-char		*hms(time_t t);
-int		aio_done(struct aio_info *ainfo);
-void		doio_upanic(int mask);
-int		parse_cmdline(int argc, char **argv, char *opts);
+char *hms(time_t t);
+int aio_done(struct aio_info *ainfo);
+void doio_upanic(int mask);
+int parse_cmdline(int argc, char **argv, char *opts);
 
 #ifndef CRAY
-void		parse_memalloc(char *arg);
-void		dump_memalloc(void);
+void parse_memalloc(char *arg);
+void dump_memalloc(void);
 #endif /* !CRAY */
 
-void		parse_delay(char *arg);
-int		usage(FILE *stream);
-void		help(FILE *stream);
+void parse_delay(char *arg);
+int usage(FILE * stream);
+void help(FILE * stream);
 
 /*
  * Upanic conditions, and a map from symbolics to values
  */
 
-#define U_CORRUPTION	0001	    /* upanic on data corruption    */
-#define U_IOSW	    	0002	    /* upanic on bad iosw   	    */
-#define U_RVAL	    	0004	    /* upanic on bad rval   	    */
+#define U_CORRUPTION	0001	/* upanic on data corruption    */
+#define U_IOSW	    	0002	/* upanic on bad iosw           */
+#define U_RVAL	    	0004	/* upanic on bad rval           */
 
 #define U_ALL	    	(U_CORRUPTION | U_IOSW | U_RVAL)
 
 struct smap Upanic_Args[] = {
-	{ "corruption",	U_CORRUPTION	},
-	{ "iosw",	U_IOSW		},
-	{ "rval",	U_RVAL  	},
-	{ "all",	U_ALL   	},
-	{ NULL,         0               }
+	{"corruption", U_CORRUPTION},
+	{"iosw", U_IOSW},
+	{"rval", U_RVAL},
+	{"all", U_ALL},
+	{NULL, 0}
 };
 
-struct aio_info	Aio_Info[MAX_AIO];
+struct aio_info Aio_Info[MAX_AIO];
 
 /* -C data-fill/check type */
 #define	C_DEFAULT	1
 struct smap checkmap[] = {
-	{ "default",	C_DEFAULT },
-	{ NULL,		0 },
+	{"default", C_DEFAULT},
+	{NULL, 0},
 };
 
 /* -d option delay types */
@@ -497,16 +493,16 @@
 #define	DELAY_SLEEP	2
 #define	DELAY_SGINAP	3
 #define	DELAY_ALARM	4
-#define	DELAY_ITIMER	5	/* POSIX timer				*/
+#define	DELAY_ITIMER	5	/* POSIX timer                          */
 
 struct smap delaymap[] = {
-	{ "select",	DELAY_SELECT },
-	{ "sleep",	DELAY_SLEEP },
+	{"select", DELAY_SELECT},
+	{"sleep", DELAY_SLEEP},
 #ifdef sgi
-	{ "sginap",	DELAY_SGINAP },
+	{"sginap", DELAY_SGINAP},
 #endif
-	{ "alarm",	DELAY_ALARM },
-	{ NULL,	0 },
+	{"alarm", DELAY_ALARM},
+	{NULL, 0},
 };
 
 /******
@@ -523,18 +519,17 @@
 
 ******/
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	    	    	i, pid, stat, ex_stat;
+	int i, pid, stat, ex_stat;
 #ifdef CRAY
-	sigset_t	    	omask;
+	sigset_t omask;
 #elif defined(linux)
-	sigset_t		omask, block_mask;
+	sigset_t omask, block_mask;
 #else
-	int		    	omask;
+	int omask;
 #endif
-	struct sigaction	sa;
+	struct sigaction sa;
 
 	umask(0);		/* force new file modes to known values */
 #if _CRAYMPP
@@ -545,7 +540,7 @@
 	TagName[0] = '\0';
 	parse_cmdline(argc, argv, OPTS);
 
-	random_range_seed(getpid());       /* initialize random number generator */
+	random_range_seed(getpid());	/* initialize random number generator */
 
 	/*
 	 * If this is a re-exec of doio, jump directly into the doio function.
@@ -562,9 +557,9 @@
 	sigemptyset(&sa.sa_mask);
 	sa.sa_handler = sigint_handler;
 	sa.sa_flags = SA_RESETHAND;	/* sigint is ignored after the */
-					/* first time */
+	/* first time */
 	for (i = 1; i <= NSIG; i++) {
-		switch(i) {
+		switch (i) {
 #ifdef SIGRECOVERY
 		case SIGRECOVERY:
 			break;
@@ -643,7 +638,7 @@
 			if ((pid = fork()) == -1) {
 				doio_fprintf(stderr,
 					     "(parent) Could not fork %d children:  %s (%d)\n",
-					     i+1, SYSERR, errno);
+					     i + 1, SYSERR, errno);
 				exit(E_SETUP);
 			}
 
@@ -655,7 +650,9 @@
 					char *exec_path;
 
 					exec_path = argv[0];
-					argv[0] = (char *)malloc(strlen(exec_path + 1));
+					argv[0] =
+					    (char *)
+					    malloc(strlen(exec_path + 1));
 					sprintf(argv[0], "-%s", exec_path);
 
 					execvp(exec_path, argv);
@@ -735,7 +732,8 @@
 					ex_stat |= E_INTERNAL;
 					break;
 				}
-			} else if (WIFSIGNALED(stat) && WTERMSIG(stat) != SIGINT) {
+			} else if (WIFSIGNALED(stat)
+				   && WTERMSIG(stat) != SIGINT) {
 				doio_fprintf(stderr,
 					     "(parent) pid %d terminated by signal %d\n",
 					     pid, WTERMSIG(stat));
@@ -749,21 +747,20 @@
 
 	exit(ex_stat);
 
-}  /* main */
+}				/* main */
 
 /*
  * main doio function.  Each doio child starts here, and never returns.
  */
 
-void
-doio(void)
+void doio(void)
 {
-	int	    	    	rval, i, infd, nbytes;
-	char			*cp;
-	struct io_req   	ioreq;
-	struct sigaction	sa, def_action, ignore_action, exit_action;
+	int rval, i, infd, nbytes;
+	char *cp;
+	struct io_req ioreq;
+	struct sigaction sa, def_action, ignore_action, exit_action;
 #ifndef CRAY
-	struct sigaction	sigbus_action;
+	struct sigaction sigbus_action;
 #endif
 
 	Memsize = Sdssize = 0;
@@ -867,7 +864,7 @@
 #endif
 
 	for (i = 1; i <= NSIG; i++) {
-		switch(i) {
+		switch (i) {
 			/* Signals to terminate program on */
 		case SIGINT:
 			sigaction(i, &exit_action, NULL);
@@ -880,7 +877,7 @@
 			break;
 #endif
 
-		    /* Signals to Ignore... */
+			/* Signals to Ignore... */
 		case SIGSTOP:
 		case SIGCONT:
 #ifdef SIGRECOVERY
@@ -889,15 +886,15 @@
 			sigaction(i, &ignore_action, NULL);
 			break;
 
-		    /* Signals to trap & report & die */
-		/*case SIGTRAP:*/
-		/*case SIGABRT:*/
-#ifdef SIGERR	/* cray only signals */
+			/* Signals to trap & report & die */
+			/*case SIGTRAP: */
+			/*case SIGABRT: */
+#ifdef SIGERR			/* cray only signals */
 		case SIGERR:
 		case SIGBUFIO:
 		case SIGINFO:
 #endif
-		/*case SIGFPE:*/
+			/*case SIGFPE: */
 		case SIGURG:
 		case SIGHUP:
 		case SIGTERM:
@@ -908,7 +905,7 @@
 			sigaction(i, &sa, NULL);
 			break;
 
-		    /* Default Action for all other signals */
+			/* Default Action for all other signals */
 		default:
 			sigaction(i, &def_action, NULL);
 			break;
@@ -966,7 +963,7 @@
 		 * core space, and close all fd's in Fd_Map[].
 		 */
 
-		if (Reqno && Release_Interval && ! (Reqno%Release_Interval)) {
+		if (Reqno && Release_Interval && !(Reqno % Release_Interval)) {
 			if (Memsize) {
 #ifdef NOTDEF
 				sbrk(-1 * Memsize);
@@ -974,7 +971,6 @@
 				alloc_mem(-1);
 #endif
 			}
-
 #ifdef _CRAY1
 			if (Sdssize) {
 				ssbreak(-1 * btoc(Sdssize));
@@ -1057,8 +1053,7 @@
 
 		if (rval == SKIP_REQ) {
 			Reqskipcnt++;
-		}
-		else if (rval != 0) {
+		} else if (rval != 0) {
 			alloc_mem(-1);
 			doio_fprintf(stderr,
 				     "doio(): operation %d returned != 0\n",
@@ -1067,7 +1062,9 @@
 		}
 
 		if (Message_Interval && Reqno % Message_Interval == 0) {
-			doio_fprintf(stderr, "Info:  %d requests done (%d skipped) by this process\n", Reqno, Reqskipcnt);
+			doio_fprintf(stderr,
+				     "Info:  %d requests done (%d skipped) by this process\n",
+				     Reqno, Reqskipcnt);
 		}
 
 		Reqno++;
@@ -1082,21 +1079,20 @@
 	alloc_mem(-1);
 	exit(E_NORMAL);
 
-}  /* doio */
+}				/* doio */
 
-void
-doio_delay(void)
+void doio_delay(void)
 {
 	struct timeval tv_delay;
 	struct sigaction sa_al, sa_old;
 	sigset_t al_mask;
 
-	switch(delayop) {
+	switch (delayop) {
 	case DELAY_SELECT:
 		tv_delay.tv_sec = delaytime / 1000000;
 		tv_delay.tv_usec = delaytime % 1000000;
 		/*doio_fprintf(stdout, "delay_select: %d %d\n",
-			    tv_delay.tv_sec, tv_delay.tv_usec);*/
+		   tv_delay.tv_sec, tv_delay.tv_usec); */
 		select(0, NULL, NULL, NULL, &tv_delay);
 		break;
 
@@ -1135,143 +1131,164 @@
  */
 
 struct smap sysnames[] = {
-	{ "READ",	READ		},
-	{ "WRITE",	WRITE		},
-	{ "READA",	READA		},
-	{ "WRITEA",	WRITEA		},
-	{ "SSREAD",	SSREAD		},
-	{ "SSWRITE",	SSWRITE		},
-	{ "LISTIO",  	LISTIO		},
-	{ "LREAD",	LREAD		},
-	{ "LREADA",	LREADA		},
-	{ "LWRITE",	LWRITE		},
-	{ "LWRITEA",	LWRITEA		},
-	{ "LSREAD",	LSREAD		},
-	{ "LSREADA",	LSREADA		},
-	{ "LSWRITE",	LSWRITE		},
-	{ "LSWRITEA",	LSWRITEA	},
+	{"READ", READ},
+	{"WRITE", WRITE},
+	{"READA", READA},
+	{"WRITEA", WRITEA},
+	{"SSREAD", SSREAD},
+	{"SSWRITE", SSWRITE},
+	{"LISTIO", LISTIO},
+	{"LREAD", LREAD},
+	{"LREADA", LREADA},
+	{"LWRITE", LWRITE},
+	{"LWRITEA", LWRITEA},
+	{"LSREAD", LSREAD},
+	{"LSREADA", LSREADA},
+	{"LSWRITE", LSWRITE},
+	{"LSWRITEA", LSWRITEA},
 
 	/* Irix System Calls */
-	{ "PREAD",	PREAD		},
-	{ "PWRITE",	PWRITE		},
-	{ "AREAD",	AREAD		},
-	{ "AWRITE",	AWRITE		},
-	{ "LLREAD",	LLREAD		},
-	{ "LLAREAD",	LLAREAD		},
-	{ "LLWRITE",	LLWRITE		},
-	{ "LLAWRITE",	LLAWRITE	},
-	{ "RESVSP",	RESVSP		},
-	{ "UNRESVSP",	UNRESVSP	},
-	{ "DFFSYNC",	DFFSYNC		},
+	{"PREAD", PREAD},
+	{"PWRITE", PWRITE},
+	{"AREAD", AREAD},
+	{"AWRITE", AWRITE},
+	{"LLREAD", LLREAD},
+	{"LLAREAD", LLAREAD},
+	{"LLWRITE", LLWRITE},
+	{"LLAWRITE", LLAWRITE},
+	{"RESVSP", RESVSP},
+	{"UNRESVSP", UNRESVSP},
+	{"DFFSYNC", DFFSYNC},
 
 	/* Irix and Linux System Calls */
-	{ "READV",	READV		},
-	{ "WRITEV",	WRITEV		},
-	{ "MMAPR",	MMAPR		},
-	{ "MMAPW",	MMAPW		},
-	{ "FSYNC2",	FSYNC2		},
-	{ "FDATASYNC",	FDATASYNC	},
+	{"READV", READV},
+	{"WRITEV", WRITEV},
+	{"MMAPR", MMAPR},
+	{"MMAPW", MMAPW},
+	{"FSYNC2", FSYNC2},
+	{"FDATASYNC", FDATASYNC},
 
-	{ "unknown",	-1		},
+	{"unknown", -1},
 };
 
 struct smap aionames[] = {
-	{ "poll",	A_POLL		},
-	{ "signal",	A_SIGNAL	},
-	{ "recall",	A_RECALL	},
-	{ "recalla",	A_RECALLA	},
-	{ "recalls",	A_RECALLS	},
-	{ "suspend",	A_SUSPEND	},
-	{ "callback",	A_CALLBACK	},
-	{ "synch",	0		},
-	{ "unknown",	-1		},
+	{"poll", A_POLL},
+	{"signal", A_SIGNAL},
+	{"recall", A_RECALL},
+	{"recalla", A_RECALLA},
+	{"recalls", A_RECALLS},
+	{"suspend", A_SUSPEND},
+	{"callback", A_CALLBACK},
+	{"synch", 0},
+	{"unknown", -1},
 };
 
-char *
-format_oflags(int oflags)
+char *format_oflags(int oflags)
 {
 	char flags[255];
 
-	flags[0]='\0';
-	switch(oflags & 03) {
-	case O_RDONLY:		strcat(flags,"O_RDONLY,");	break;
-	case O_WRONLY:		strcat(flags,"O_WRONLY,");	break;
-	case O_RDWR:		strcat(flags,"O_RDWR,");	break;
-	default:		strcat(flags,"O_weird");	break;
+	flags[0] = '\0';
+	switch (oflags & 03) {
+	case O_RDONLY:
+		strcat(flags, "O_RDONLY,");
+		break;
+	case O_WRONLY:
+		strcat(flags, "O_WRONLY,");
+		break;
+	case O_RDWR:
+		strcat(flags, "O_RDWR,");
+		break;
+	default:
+		strcat(flags, "O_weird");
+		break;
 	}
 
 	if (oflags & O_EXCL)
-		strcat(flags,"O_EXCL,");
+		strcat(flags, "O_EXCL,");
 
 	if (oflags & O_SYNC)
-		strcat(flags,"O_SYNC,");
+		strcat(flags, "O_SYNC,");
 #ifdef CRAY
 	if (oflags & O_RAW)
-		strcat(flags,"O_RAW,");
+		strcat(flags, "O_RAW,");
 	if (oflags & O_WELLFORMED)
-		strcat(flags,"O_WELLFORMED,");
+		strcat(flags, "O_WELLFORMED,");
 #ifdef O_SSD
 	if (oflags & O_SSD)
-		strcat(flags,"O_SSD,");
+		strcat(flags, "O_SSD,");
 #endif
 	if (oflags & O_LDRAW)
-		strcat(flags,"O_LDRAW,");
+		strcat(flags, "O_LDRAW,");
 	if (oflags & O_PARALLEL)
-		strcat(flags,"O_PARALLEL,");
+		strcat(flags, "O_PARALLEL,");
 	if (oflags & O_BIG)
-		strcat(flags,"O_BIG,");
+		strcat(flags, "O_BIG,");
 	if (oflags & O_PLACE)
-		strcat(flags,"O_PLACE,");
+		strcat(flags, "O_PLACE,");
 	if (oflags & O_ASYNC)
-		strcat(flags,"O_ASYNC,");
+		strcat(flags, "O_ASYNC,");
 #endif
 
 #ifdef sgi
 	if (oflags & O_DIRECT)
-		strcat(flags,"O_DIRECT,");
+		strcat(flags, "O_DIRECT,");
 	if (oflags & O_DSYNC)
-		strcat(flags,"O_DSYNC,");
+		strcat(flags, "O_DSYNC,");
 	if (oflags & O_RSYNC)
-		strcat(flags,"O_RSYNC,");
+		strcat(flags, "O_RSYNC,");
 #endif
 
-	return(strdup(flags));
+	return (strdup(flags));
 }
 
-char *
-format_strat(int strategy)
+char *format_strat(int strategy)
 {
 	char msg[64];
 	char *aio_strat;
 
 	switch (strategy) {
-	case A_POLL:		aio_strat = "POLL";	break;
-	case A_SIGNAL:		aio_strat = "SIGNAL";	break;
-	case A_RECALL:		aio_strat = "RECALL";	break;
-	case A_RECALLA:		aio_strat = "RECALLA";	break;
-	case A_RECALLS:		aio_strat = "RECALLS";	break;
-	case A_SUSPEND:		aio_strat = "SUSPEND";	break;
-	case A_CALLBACK:	aio_strat = "CALLBACK";	break;
-	case 0:			aio_strat = "<zero>";	break;
+	case A_POLL:
+		aio_strat = "POLL";
+		break;
+	case A_SIGNAL:
+		aio_strat = "SIGNAL";
+		break;
+	case A_RECALL:
+		aio_strat = "RECALL";
+		break;
+	case A_RECALLA:
+		aio_strat = "RECALLA";
+		break;
+	case A_RECALLS:
+		aio_strat = "RECALLS";
+		break;
+	case A_SUSPEND:
+		aio_strat = "SUSPEND";
+		break;
+	case A_CALLBACK:
+		aio_strat = "CALLBACK";
+		break;
+	case 0:
+		aio_strat = "<zero>";
+		break;
 	default:
 		sprintf(msg, "<error:%#o>", strategy);
 		aio_strat = strdup(msg);
 		break;
 	}
 
-	return(aio_strat);
+	return (aio_strat);
 }
 
-char *
-format_rw(struct io_req *ioreq, int fd, void *buffer, int signo, char *pattern,
-	void *iosw)
+char *format_rw(struct io_req *ioreq, int fd, void *buffer, int signo,
+		char *pattern, void *iosw)
 {
-	static char		*errbuf=NULL;
-	char			*aio_strat, *cp;
-	struct read_req		*readp = &ioreq->r_data.read;
-	struct write_req	*writep = &ioreq->r_data.write;
-	struct read_req		*readap = &ioreq->r_data.read;
-	struct write_req	*writeap = &ioreq->r_data.write;
+	static char *errbuf = NULL;
+	char *aio_strat, *cp;
+	struct read_req *readp = &ioreq->r_data.read;
+	struct write_req *writep = &ioreq->r_data.write;
+	struct read_req *readap = &ioreq->r_data.read;
+	struct write_req *writeap = &ioreq->r_data.write;
 
 	if (errbuf == NULL)
 		errbuf = (char *)malloc(32768);
@@ -1282,48 +1299,66 @@
 	switch (ioreq->r_type) {
 	case READ:
 		cp += sprintf(cp, "syscall:  read(%d, %#lo, %d)\n",
-			      fd, (unsigned long) buffer, readp->r_nbytes);
-		cp += sprintf(cp, "          fd %d is file %s - open flags are %#o\n",
-			      fd, readp->r_file, readp->r_oflags);
-		cp += sprintf(cp, "          read done at file offset %d\n",
-			      readp->r_offset);
+			      fd, (unsigned long)buffer, readp->r_nbytes);
+		cp +=
+		    sprintf(cp,
+			    "          fd %d is file %s - open flags are %#o\n",
+			    fd, readp->r_file, readp->r_oflags);
+		cp +=
+		    sprintf(cp, "          read done at file offset %d\n",
+			    readp->r_offset);
 		break;
 
 	case WRITE:
 		cp += sprintf(cp, "syscall:  write(%d, %#lo, %d)\n",
-			      fd, (unsigned long) buffer, writep->r_nbytes);
-		cp += sprintf(cp, "          fd %d is file %s - open flags are %#o\n",
-			      fd, writep->r_file, writep->r_oflags);
-		cp += sprintf(cp, "          write done at file offset %d - pattern is %s\n",
-			      writep->r_offset, pattern);
+			      fd, (unsigned long)buffer, writep->r_nbytes);
+		cp +=
+		    sprintf(cp,
+			    "          fd %d is file %s - open flags are %#o\n",
+			    fd, writep->r_file, writep->r_oflags);
+		cp +=
+		    sprintf(cp,
+			    "          write done at file offset %d - pattern is %s\n",
+			    writep->r_offset, pattern);
 		break;
 
 	case READA:
 		aio_strat = format_strat(readap->r_aio_strat);
 
 		cp += sprintf(cp, "syscall:  reada(%d, %#lo, %d, %#lo, %d)\n",
-			      fd, (unsigned long) buffer, readap->r_nbytes,
-			      (unsigned long) iosw, signo);
-		cp += sprintf(cp, "          fd %d is file %s - open flags are %#o\n",
-			      fd, readap->r_file, readp->r_oflags);
-		cp += sprintf(cp, "          reada done at file offset %d\n",
-			      readap->r_offset);
-		cp += sprintf(cp, "          async io completion strategy is %s\n",
-			      aio_strat);
+			      fd, (unsigned long)buffer, readap->r_nbytes,
+			      (unsigned long)iosw, signo);
+		cp +=
+		    sprintf(cp,
+			    "          fd %d is file %s - open flags are %#o\n",
+			    fd, readap->r_file, readp->r_oflags);
+		cp +=
+		    sprintf(cp, "          reada done at file offset %d\n",
+			    readap->r_offset);
+		cp +=
+		    sprintf(cp,
+			    "          async io completion strategy is %s\n",
+			    aio_strat);
 		break;
 
 	case WRITEA:
 		aio_strat = format_strat(writeap->r_aio_strat);
 
 		cp += sprintf(cp, "syscall:  writea(%d, %#lo, %d, %#lo, %d)\n",
-			      fd, (unsigned long) buffer, writeap->r_nbytes,
-			      (unsigned long) iosw, signo);
-		cp += sprintf(cp, "          fd %d is file %s - open flags are %#o\n",
-			      fd, writeap->r_file, writeap->r_oflags);
-		cp += sprintf(cp, "          writea done at file offset %d - pattern is %s\n",
-			      writeap->r_offset, pattern);
-		cp += sprintf(cp, "          async io completion strategy is %s\n",
-			      aio_strat);
+			      fd, (unsigned long)buffer, writeap->r_nbytes,
+			      (unsigned long)iosw, signo);
+		cp +=
+		    sprintf(cp,
+			    "          fd %d is file %s - open flags are %#o\n",
+			    fd, writeap->r_file, writeap->r_oflags);
+		cp +=
+		    sprintf(cp,
+			    "          writea done at file offset %d - pattern is %s\n",
+			    writeap->r_offset, pattern);
+		cp +=
+		    sprintf(cp,
+			    "          async io completion strategy is %s\n",
+			    aio_strat);
 		break;
 
 	}
@@ -1332,15 +1367,14 @@
 }
 
 #ifdef CRAY
-char *
-format_sds(struct io_req *ioreq, void *buffer, int sds, char *pattern)
+char *format_sds(struct io_req *ioreq, void *buffer, int sds, char *pattern)
 {
-	int			i;
-	static char		*errbuf=NULL;
-	char			*cp;
+	int i;
+	static char *errbuf = NULL;
+	char *cp;
 
-	struct ssread_req	*ssreadp = &ioreq->r_data.ssread;
-	struct sswrite_req	*sswritep = &ioreq->r_data.sswrite;
+	struct ssread_req *ssreadp = &ioreq->r_data.ssread;
+	struct sswrite_req *sswritep = &ioreq->r_data.sswrite;
 
 	if (errbuf == NULL)
 		errbuf = (char *)malloc(32768);
@@ -1355,8 +1389,10 @@
 		break;
 
 	case SSWRITE:
-		cp += sprintf(cp, "syscall:  sswrite(%#o, %#o, %d) - pattern was %s\n",
-			      buffer, sds, sswritep->r_nbytes, pattern);
+		cp +=
+		    sprintf(cp,
+			    "syscall:  sswrite(%#o, %#o, %d) - pattern was %s\n",
+			    buffer, sds, sswritep->r_nbytes, pattern);
 		break;
 	}
 	return errbuf;
@@ -1367,17 +1403,16 @@
  * Perform the various sorts of disk reads
  */
 
-int
-do_read(struct io_req *req)
+int do_read(struct io_req *req)
 {
-	int	    	    	fd, offset, nbytes, oflags, rval;
-	char    	    	*addr, *file;
+	int fd, offset, nbytes, oflags, rval;
+	char *addr, *file;
 #ifdef CRAY
-	struct aio_info		*aiop;
-	int			aio_id, aio_strat, signo;
+	struct aio_info *aiop;
+	int aio_id, aio_strat, signo;
 #endif
 #ifdef sgi
-	struct fd_cache		*fdc;
+	struct fd_cache *fdc;
 #endif
 
 	/*
@@ -1391,12 +1426,12 @@
 	offset = req->r_data.read.r_offset;
 	nbytes = req->r_data.read.r_nbytes;
 
-	/*printf("read: %s, %#o, %d %d\n", file, oflags, offset, nbytes);*/
+	/*printf("read: %s, %#o, %d %d\n", file, oflags, offset, nbytes); */
 
 	/*
 	 * Grab an open file descriptor
 	 * Note: must be done before memory allocation so that the direct i/o
-	 *	information is available in mem. allocate
+	 *      information is available in mem. allocate
 	 */
 
 	if ((fd = alloc_fd(file, oflags)) == -1)
@@ -1417,7 +1452,9 @@
 
 		addr = (char *)Sdsptr;
 	} else {
-		if ((rval = alloc_mem(nbytes + wtob(1) * 2 + MPP_BUMP * sizeof(UINT64_T))) < 0) {
+		if ((rval =
+		     alloc_mem(nbytes + wtob(1) * 2 +
+			       MPP_BUMP * sizeof(UINT64_T))) < 0) {
 			return rval;
 		}
 
@@ -1427,7 +1464,7 @@
 		 * if io is not raw, bump the offset by a random amount
 		 * to generate non-word-aligned io.
 		 */
-		if (! (req->r_data.read.r_uflags & F_WORD_ALIGNED)) {
+		if (!(req->r_data.read.r_uflags & F_WORD_ALIGNED)) {
 			addr += random_range(0, wtob(1) - 1, 1, NULL);
 		}
 	}
@@ -1447,7 +1484,8 @@
 		 * Force memory alignment for Direct I/O
 		 */
 		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
-			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
+			addr +=
+			    fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 	} else {
 		addr += random_range(0, wtob(1) - 1, 1, NULL);
@@ -1459,12 +1497,12 @@
 	}
 
 	addr = Memptr;
-#endif	/* !CRAY && sgi */
-#endif	/* CRAY */
+#endif /* !CRAY && sgi */
+#endif /* CRAY */
 
 	switch (req->r_type) {
 	case READ:
-	        /* move to the desired file position. */
+		/* move to the desired file position. */
 		if (lseek(fd, offset, SEEK_SET) == -1) {
 			doio_fprintf(stderr,
 				     "lseek(%d, %d, SEEK_SET) failed:  %s (%d)\n",
@@ -1495,7 +1533,7 @@
 		 * Async read
 		 */
 
-	        /* move to the desired file position. */
+		/* move to the desired file position. */
 		if (lseek(fd, offset, SEEK_SET) == -1) {
 			doio_fprintf(stderr,
 				     "lseek(%d, %d, SEEK_SET) failed:  %s (%d)\n",
@@ -1512,7 +1550,8 @@
 		if (reada(fd, addr, nbytes, &aiop->iosw, signo) == -1) {
 			doio_fprintf(stderr, "reada() failed: %s (%d)\n%s\n",
 				     SYSERR, errno,
-				     format_rw(req, fd, addr, signo, NULL, &aiop->iosw));
+				     format_rw(req, fd, addr, signo, NULL,
+					       &aiop->iosw));
 			aio_unregister(aio_id);
 			doio_upanic(U_RVAL);
 			rval = -1;
@@ -1534,7 +1573,8 @@
 					     aiop->iosw.sw_flag,
 					     aiop->iosw.sw_error,
 					     aiop->iosw.sw_count,
-				     format_rw(req, fd, addr, signo, NULL, &aiop->iosw));
+					     format_rw(req, fd, addr, signo,
+						       NULL, &aiop->iosw));
 				aio_unregister(aio_id);
 				doio_upanic(U_IOSW);
 				rval = -1;
@@ -1547,7 +1587,7 @@
 		if (rval == -1)
 			return rval;
 		break;
-#endif	/* CRAY */
+#endif /* CRAY */
 	}
 
 	return 0;		/* if we get here, everything went ok */
@@ -1557,21 +1597,20 @@
  * Perform the verious types of disk writes.
  */
 
-int
-do_write(struct io_req *req)
+int do_write(struct io_req *req)
 {
-	static int		pid = -1;
-	int	    	    	fd, nbytes, oflags, signo;
-	int	    	    	logged_write, rval, got_lock;
-	off_t    	    	offset, woffset;
-	char    	    	*addr, pattern, *file, *msg;
-	struct wlog_rec		wrec;
+	static int pid = -1;
+	int fd, nbytes, oflags, signo;
+	int logged_write, rval, got_lock;
+	off_t offset, woffset;
+	char *addr, pattern, *file, *msg;
+	struct wlog_rec wrec;
 #ifdef CRAY
-	int			aio_strat, aio_id;
-	struct aio_info		*aiop;
+	int aio_strat, aio_id;
+	struct aio_info *aiop;
 #endif
 #ifdef sgi
-	struct fd_cache		*fdc;
+	struct fd_cache *fdc;
 #endif
 
 	woffset = 0;
@@ -1580,14 +1619,14 @@
 	 * Misc variable setup
 	 */
 
-	signo   = 0;
-	nbytes	= req->r_data.write.r_nbytes;
-	offset	= req->r_data.write.r_offset;
-	pattern	= req->r_data.write.r_pattern;
-	file	= req->r_data.write.r_file;
-	oflags	= req->r_data.write.r_oflags;
+	signo = 0;
+	nbytes = req->r_data.write.r_nbytes;
+	offset = req->r_data.write.r_offset;
+	pattern = req->r_data.write.r_pattern;
+	file = req->r_data.write.r_file;
+	oflags = req->r_data.write.r_oflags;
 
-	/*printf("pwrite: %s, %#o, %d %d\n", file, oflags, offset, nbytes);*/
+	/*printf("pwrite: %s, %#o, %d %d\n", file, oflags, offset, nbytes); */
 
 	/*
 	 * Allocate core memory and possibly sds space.  Initialize the data
@@ -1604,7 +1643,7 @@
 		return -1;
 
 	/*printf("write: %d, %s, %#o, %d %d\n",
-	       fd, file, oflags, offset, nbytes);*/
+	   fd, file, oflags, offset, nbytes); */
 
 	/*
 	 * Allocate SDS space for backdoor write if desired
@@ -1617,23 +1656,25 @@
 			return rval;
 		}
 
-		(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
-		/*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0);*/
+		(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length, 0);
+		/*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0); */
 
 		if (alloc_sds(nbytes) == -1)
 			return -1;
 
 		if (sswrite((long)Memptr, Sdsptr, btoc(nbytes)) == -1) {
-			doio_fprintf(stderr, "sswrite(%d, %d, %d) failed:  %s (%d)\n",
-				     (long)Memptr, Sdsptr, btoc(nbytes),
-				     SYSERR, errno);
+			doio_fprintf(stderr,
+				     "sswrite(%d, %d, %d) failed:  %s (%d)\n",
+				     (long)Memptr, Sdsptr, btoc(nbytes), SYSERR,
+				     errno);
 			fflush(stderr);
 			return -1;
 		}
 
 		addr = (char *)Sdsptr;
 #else
-		doio_fprintf(stderr, "Invalid O_SSD flag was generated for MPP system\n");
+		doio_fprintf(stderr,
+			     "Invalid O_SSD flag was generated for MPP system\n");
 		fflush(stderr);
 		return -1;
 #endif /* !CRAYMPP */
@@ -1649,13 +1690,13 @@
 		 * to generate non-word-aligned io.
 		 */
 
-		if (! (req->r_data.write.r_uflags & F_WORD_ALIGNED)) {
+		if (!(req->r_data.write.r_uflags & F_WORD_ALIGNED)) {
 			addr += random_range(0, wtob(1) - 1, 1, NULL);
 		}
 
-		(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
+		(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length, 0);
 		if (addr != Memptr)
-			memmove( addr, Memptr, nbytes);
+			memmove(addr, Memptr, nbytes);
 	}
 #else /* CRAY */
 #ifdef sgi
@@ -1673,15 +1714,16 @@
 		 * Force memory alignment for Direct I/O
 		 */
 		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
-			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
+			addr +=
+			    fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 	} else {
 		addr += random_range(0, wtob(1) - 1, 1, NULL);
 	}
 
-	(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
+	(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length, 0);
 	if (addr != Memptr)
-		memmove( addr, Memptr, nbytes);
+		memmove(addr, Memptr, nbytes);
 
 #else /* sgi */
 	if ((rval = alloc_mem(nbytes + wtob(1) * 2)) < 0) {
@@ -1690,9 +1732,9 @@
 
 	addr = Memptr;
 
-	(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
+	(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length, 0);
 	if (addr != Memptr)
-		memmove( addr, Memptr, nbytes);
+		memmove(addr, Memptr, nbytes);
 #endif /* sgi */
 #endif /* CRAY */
 
@@ -1745,7 +1787,7 @@
 		}
 	}
 
-	switch (req->r_type ) {
+	switch (req->r_type) {
 	case WRITE:
 		/*
 		 * sync write
@@ -1764,28 +1806,31 @@
 			doio_fprintf(stderr,
 				     "write() failed:  %s (%d)\n%s\n",
 				     SYSERR, errno,
-				     format_rw(req, fd, addr, -1, Pattern, NULL));
+				     format_rw(req, fd, addr, -1, Pattern,
+					       NULL));
 #ifdef sgi
 			doio_fprintf(stderr,
 				     "write() failed:  %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%miniou(%d)=%d, oflags=%#o memalign=%d, addr%%memalign=%d\n",
 				     strerror(errno),
 				     fd, addr, nbytes,
 				     offset,
-				     fdc->c_miniosz, nbytes%fdc->c_miniosz,
-				     oflags, fdc->c_memalign, (long)addr%fdc->c_memalign);
+				     fdc->c_miniosz, nbytes % fdc->c_miniosz,
+				     oflags, fdc->c_memalign,
+				     (long)addr % fdc->c_memalign);
 #else
 			doio_fprintf(stderr,
 				     "write() failed:  %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%1B=%d, oflags=%#o\n",
 				     strerror(errno),
 				     fd, addr, nbytes,
-				     offset, nbytes%4096, oflags);
+				     offset, nbytes % 4096, oflags);
 #endif
 			doio_upanic(U_RVAL);
 		} else if (rval != nbytes) {
 			doio_fprintf(stderr,
 				     "write() returned wrong # bytes - expected %d, got %d\n%s\n",
 				     nbytes, rval,
-				     format_rw(req, fd, addr, -1, Pattern, NULL));
+				     format_rw(req, fd, addr, -1, Pattern,
+					       NULL));
 			doio_upanic(U_RVAL);
 			rval = -1;
 		}
@@ -1818,7 +1863,8 @@
 			doio_fprintf(stderr,
 				     "writea() failed: %s (%d)\n%s\n",
 				     SYSERR, errno,
-				     format_rw(req, fd, addr, -1, Pattern, NULL));
+				     format_rw(req, fd, addr, -1, Pattern,
+					       NULL));
 			doio_upanic(U_RVAL);
 			aio_unregister(aio_id);
 			rval = -1;
@@ -1841,7 +1887,8 @@
 					     aiop->iosw.sw_flag,
 					     aiop->iosw.sw_error,
 					     aiop->iosw.sw_count,
-					     format_rw(req, fd, addr, -1, Pattern, &aiop->iosw));
+					     format_rw(req, fd, addr, -1,
+						       Pattern, &aiop->iosw));
 				aio_unregister(aio_id);
 				doio_upanic(U_IOSW);
 				rval = -1;
@@ -1865,14 +1912,14 @@
 		msg = check_file(file, offset, nbytes, Pattern, Pattern_Length,
 				 0, oflags & O_PARALLEL);
 		if (msg != NULL) {
-		  	doio_fprintf(stderr, "%s%s\n",
-				     msg,
+			doio_fprintf(stderr, "%s%s\n", msg,
 #ifdef CRAY
-				     format_rw(req, fd, addr, -1, Pattern, &aiop->iosw)
+				     format_rw(req, fd, addr, -1, Pattern,
+					       &aiop->iosw)
 #else
 				     format_rw(req, fd, addr, -1, Pattern, NULL)
 #endif
-				);
+			    );
 			doio_upanic(U_CORRUPTION);
 			exit(E_COMPARE);
 
@@ -1904,17 +1951,16 @@
 		}
 	}
 
-	return( (rval == -1) ? -1 : 0);
+	return ((rval == -1) ? -1 : 0);
 }
 
 /*
  * Simple routine to lock/unlock a file using fcntl()
  */
 
-int
-lock_file_region(char *fname, int fd, int type, int start, int nbytes)
+int lock_file_region(char *fname, int fd, int type, int start, int nbytes)
 {
-	struct flock	flk;
+	struct flock flk;
 
 	flk.l_type = type;
 	flk.l_whence = 0;
@@ -1938,20 +1984,25 @@
  */
 
 #ifdef CRAY
-char *
-format_listio(struct io_req *ioreq, int lcmd, struct listreq *list,
-	int nent, int fd, char *pattern)
+char *format_listio(struct io_req *ioreq, int lcmd, struct listreq *list,
+		    int nent, int fd, char *pattern)
 {
-	static	char		*errbuf=NULL;
-	struct	listio_req	*liop = &ioreq->r_data.listio;
-	struct	listreq		*listreq;
-	char			*cp, *cmd, *opcode, *aio_strat;
-	int			i;
+	static char *errbuf = NULL;
+	struct listio_req *liop = &ioreq->r_data.listio;
+	struct listreq *listreq;
+	char *cp, *cmd, *opcode, *aio_strat;
+	int i;
 
 	switch (lcmd) {
-	case LC_START:	cmd = "LC_START";	break;
-	case LC_WAIT:	cmd = "LC_WAIT";	break;
-	default:	cmd = "???";		break;
+	case LC_START:
+		cmd = "LC_START";
+		break;
+	case LC_WAIT:
+		cmd = "LC_WAIT";
+		break;
+	default:
+		cmd = "???";
+		break;
 	}
 
 	if (errbuf == NULL)
@@ -1960,8 +2011,7 @@
 	cp = errbuf;
 	cp += sprintf(cp, "Request number %d\n", Reqno);
 
-	cp += sprintf(cp, "syscall:  listio(%s, %#o, %d)\n\n",
-		      cmd, list, nent);
+	cp += sprintf(cp, "syscall:  listio(%s, %#o, %d)\n\n", cmd, list, nent);
 
 	aio_strat = format_strat(liop->r_aio_strat);
 
@@ -1972,47 +2022,78 @@
 		listreq = list + i;
 
 		switch (listreq->li_opcode) {
-		case LO_READ:	opcode = "LO_READ";	break;
-		case LO_WRITE:	opcode = "LO_WRITE";	break;
-		default:	opcode = "???";		break;
+		case LO_READ:
+			opcode = "LO_READ";
+			break;
+		case LO_WRITE:
+			opcode = "LO_WRITE";
+			break;
+		default:
+			opcode = "???";
+			break;
 		}
 
 		cp += sprintf(cp, "          li_opcode =    %s\n", opcode);
-		cp += sprintf(cp, "          li_drvr =      %#o\n", listreq->li_drvr);
-		cp += sprintf(cp, "          li_flags =     %#o\n", listreq->li_flags);
-		cp += sprintf(cp, "          li_offset =    %d\n", listreq->li_offset);
-		cp += sprintf(cp, "          li_fildes =    %d\n", listreq->li_fildes);
-		cp += sprintf(cp, "          li_buf =       %#o\n", listreq->li_buf);
-		cp += sprintf(cp, "          li_nbyte =     %d\n", listreq->li_nbyte);
-		cp += sprintf(cp, "          li_status =    %#o (%d, %d, %d)\n", listreq->li_status, listreq->li_status->sw_flag, listreq->li_status->sw_error, listreq->li_status->sw_count);
-		cp += sprintf(cp, "          li_signo =     %d\n", listreq->li_signo);
-		cp += sprintf(cp, "          li_nstride =   %d\n", listreq->li_nstride);
-		cp += sprintf(cp, "          li_filstride = %d\n", listreq->li_filstride);
-		cp += sprintf(cp, "          li_memstride = %d\n", listreq->li_memstride);
-		cp += sprintf(cp, "          io completion strategy is %s\n", aio_strat);
+		cp +=
+		    sprintf(cp, "          li_drvr =      %#o\n",
+			    listreq->li_drvr);
+		cp +=
+		    sprintf(cp, "          li_flags =     %#o\n",
+			    listreq->li_flags);
+		cp +=
+		    sprintf(cp, "          li_offset =    %d\n",
+			    listreq->li_offset);
+		cp +=
+		    sprintf(cp, "          li_fildes =    %d\n",
+			    listreq->li_fildes);
+		cp +=
+		    sprintf(cp, "          li_buf =       %#o\n",
+			    listreq->li_buf);
+		cp +=
+		    sprintf(cp, "          li_nbyte =     %d\n",
+			    listreq->li_nbyte);
+		cp +=
+		    sprintf(cp, "          li_status =    %#o (%d, %d, %d)\n",
+			    listreq->li_status, listreq->li_status->sw_flag,
+			    listreq->li_status->sw_error,
+			    listreq->li_status->sw_count);
+		cp +=
+		    sprintf(cp, "          li_signo =     %d\n",
+			    listreq->li_signo);
+		cp +=
+		    sprintf(cp, "          li_nstride =   %d\n",
+			    listreq->li_nstride);
+		cp +=
+		    sprintf(cp, "          li_filstride = %d\n",
+			    listreq->li_filstride);
+		cp +=
+		    sprintf(cp, "          li_memstride = %d\n",
+			    listreq->li_memstride);
+		cp +=
+		    sprintf(cp, "          io completion strategy is %s\n",
+			    aio_strat);
 	}
 	return errbuf;
 }
 #endif /* CRAY */
 
-int
-do_listio(struct io_req *req)
+int do_listio(struct io_req *req)
 {
 #ifdef CRAY
-	struct listio_req	*lio;
-	int	    	    	fd, oflags, signo, nb, i;
-	int	    	    	logged_write, rval, got_lock;
-	int			aio_strat, aio_id;
-	int			min_byte, max_byte;
-	int			mem_needed;
-	int		       	foffset, fstride, mstride, nstrides;
-	char			*moffset;
-	long    	    	offset, woffset;
-	char    	    	*addr, *msg;
-	sigset_t		block_mask, omask;
-	struct wlog_rec		wrec;
-	struct aio_info		*aiop;
-	struct listreq		lio_req;
+	struct listio_req *lio;
+	int fd, oflags, signo, nb, i;
+	int logged_write, rval, got_lock;
+	int aio_strat, aio_id;
+	int min_byte, max_byte;
+	int mem_needed;
+	int foffset, fstride, mstride, nstrides;
+	char *moffset;
+	long offset, woffset;
+	char *addr, *msg;
+	sigset_t block_mask, omask;
+	struct wlog_rec wrec;
+	struct aio_info *aiop;
+	struct listreq lio_req;
 
 	lio = &req->r_data.listio;
 
@@ -2023,7 +2104,8 @@
 	 */
 
 	if (lio->r_filestride && abs(lio->r_filestride) < lio->r_nbytes) {
-		doio_fprintf(stderr, "do_listio():  Bogus listio request - abs(filestride) [%d] < nbytes [%d]\n",
+		doio_fprintf(stderr,
+			     "do_listio():  Bogus listio request - abs(filestride) [%d] < nbytes [%d]\n",
 			     abs(lio->r_filestride), lio->r_nbytes);
 		return -1;
 	}
@@ -2034,8 +2116,8 @@
 	 */
 
 	mem_needed =
-		stride_bounds(0, lio->r_memstride, lio->r_nstrides,
-			      lio->r_nbytes, NULL, NULL);
+	    stride_bounds(0, lio->r_memstride, lio->r_nstrides,
+			  lio->r_nbytes, NULL, NULL);
 
 	if ((rval = alloc_mem(mem_needed + wtob(1))) < 0) {
 		return rval;
@@ -2049,15 +2131,15 @@
 
 	addr = Memptr;
 
-	if (! (lio->r_uflags & F_WORD_ALIGNED)) {
+	if (!(lio->r_uflags & F_WORD_ALIGNED)) {
 		addr += random_range(0, wtob(1) - 1, 1, NULL);
 	}
 
 	if (lio->r_opcode == LO_WRITE) {
 		Pattern[0] = lio->r_pattern;
-		(*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0);
+		(*Data_Fill) (Memptr, mem_needed, Pattern, Pattern_Length, 0);
 		if (addr != Memptr)
-			memmove( addr, Memptr, mem_needed);
+			memmove(addr, Memptr, mem_needed);
 	}
 
 	/*
@@ -2086,8 +2168,9 @@
 			      lio->r_nbytes, &min_byte, &max_byte);
 
 		if (lock_file_region(lio->r_file, fd, F_WRLCK,
-				     min_byte, (max_byte-min_byte+1)) < 0) {
-			doio_fprintf(stderr, "stride_bounds(%d, %d, %d, %d, ..., ...) set min_byte to %d, max_byte to %d\n",
+				     min_byte, (max_byte - min_byte + 1)) < 0) {
+			doio_fprintf(stderr,
+				     "stride_bounds(%d, %d, %d, %d, ..., ...) set min_byte to %d, max_byte to %d\n",
 				     lio->r_offset, lio->r_filestride,
 				     lio->r_nstrides, lio->r_nbytes, min_byte,
 				     max_byte);
@@ -2145,7 +2228,8 @@
 		doio_fprintf(stderr,
 			     "listio() failed: %s (%d)\n%s\n",
 			     SYSERR, errno,
-			     format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern));
+			     format_listio(req, lio->r_cmd, &lio_req, 1, fd,
+					   Pattern));
 		aio_unregister(aio_id);
 		doio_upanic(U_RVAL);
 		goto lio_done;
@@ -2168,7 +2252,8 @@
 			     1, 0, lio->r_nbytes * lio->r_nstrides,
 			     aiop->iosw.sw_flag,
 			     aiop->iosw.sw_error, aiop->iosw.sw_count,
-			     format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern));
+			     format_listio(req, lio->r_cmd, &lio_req, 1, fd,
+					   Pattern));
 		aio_unregister(aio_id);
 		doio_upanic(U_IOSW);
 		goto lio_done;
@@ -2190,7 +2275,7 @@
 		mstride = lio->r_memstride ? lio->r_memstride : lio->r_nbytes;
 		foffset = lio->r_offset;
 
-		if (mstride> 0 || lio->r_nstrides <= 1) {
+		if (mstride > 0 || lio->r_nstrides <= 1) {
 			moffset = addr;
 		} else {
 			moffset = addr + mem_needed - lio->r_nbytes;
@@ -2206,9 +2291,11 @@
 			if (msg != NULL) {
 				doio_fprintf(stderr, "%s\n%s\n",
 					     msg,
-			     format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern));
+					     format_listio(req, lio->r_cmd,
+							   &lio_req, 1, fd,
+							   Pattern));
 				doio_upanic(U_CORRUPTION);
-	    			exit(E_COMPARE);
+				exit(E_COMPARE);
 			}
 
 			moffset += mstride;
@@ -2219,7 +2306,7 @@
 
 	rval = 0;
 
- lio_done:
+lio_done:
 
 	/*
 	 * General cleanup ...
@@ -2232,7 +2319,7 @@
 
 	if (got_lock) {
 		if (lock_file_region(lio->r_file, fd, F_UNLCK,
-				     min_byte, (max_byte-min_byte+1)) < 0) {
+				     min_byte, (max_byte - min_byte + 1)) < 0) {
 			return -1;
 		}
 	}
@@ -2249,11 +2336,10 @@
 
 #ifdef _CRAY1
 
-int
-do_ssdio(struct io_req *req)
+int do_ssdio(struct io_req *req)
 {
-	int	    nbytes, nb;
-	char    errbuf[BSIZE];
+	int nbytes, nb;
+	char errbuf[BSIZE];
 
 	nbytes = req->r_data.ssread.r_nbytes;
 
@@ -2274,8 +2360,8 @@
 		 */
 
 		Pattern[0] = req->r_data.sswrite.r_pattern;
-		/*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0);*/
-		(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
+		/*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0); */
+		(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length, 0);
 
 		if (sswrite((long)Memptr, (long)Sdsptr, btoc(nbytes)) == -1) {
 			doio_fprintf(stderr, "sswrite() failed:  %s (%d)\n%s\n",
@@ -2306,7 +2392,8 @@
 	if (v_opt && req->r_type == SSWRITE) {
 		ssread((long)Memptr, (long)Sdsptr, btoc(nbytes));
 
-		if (pattern_check(Memptr, nbytes, Pattern, Pattern_Length, 0) == -1) {
+		if (pattern_check(Memptr, nbytes, Pattern, Pattern_Length, 0) ==
+		    -1) {
 			doio_fprintf(stderr,
 				     "sds DATA COMPARE ERROR - ABORTING\n%s\n",
 				     format_sds(req, Memptr, Sdsptr, Pattern));
@@ -2321,8 +2408,7 @@
 
 #ifdef CRAY
 
-int
-do_ssdio(struct io_req *req)
+int do_ssdio(struct io_req *req)
 {
 	doio_fprintf(stderr,
 		     "Internal Error - do_ssdio() called on a non-cray1 system\n");
@@ -2334,18 +2420,17 @@
 
 #endif /* _CRAY1 */
 
-char *
-fmt_ioreq(struct io_req *ioreq, struct syscall_info *sy, int fd)
+char *fmt_ioreq(struct io_req *ioreq, struct syscall_info *sy, int fd)
 {
-	static char		*errbuf=NULL;
-	char			*cp;
-	struct rw_req		*io;
-	struct smap		*aname;
+	static char *errbuf = NULL;
+	char *cp;
+	struct rw_req *io;
+	struct smap *aname;
 #ifdef CRAY
-	struct stat		sbuf;
+	struct stat sbuf;
 #endif
 #ifdef sgi
-	struct dioattr		finfo;
+	struct dioattr finfo;
 #endif
 
 	if (errbuf == NULL)
@@ -2356,99 +2441,113 @@
 	/*
 	 * Look up async I/O completion strategy
 	 */
-	for (aname=aionames;
-	    aname->value != -1 && aname->value != io->r_aio_strat;
-	    aname++)
-		;
+	for (aname = aionames;
+	     aname->value != -1 && aname->value != io->r_aio_strat; aname++) ;
 
 	cp = errbuf;
 	cp += sprintf(cp, "Request number %d\n", Reqno);
 
-	cp += sprintf(cp, "          fd %d is file %s - open flags are %#o %s\n",
-		      fd, io->r_file, io->r_oflags, format_oflags(io->r_oflags));
+	cp +=
+	    sprintf(cp, "          fd %d is file %s - open flags are %#o %s\n",
+		    fd, io->r_file, io->r_oflags, format_oflags(io->r_oflags));
 
 	if (sy->sy_flags & SY_WRITE) {
-		cp += sprintf(cp, "          write done at file offset %d - pattern is %c (%#o)\n",
-			      io->r_offset,
-			      (io->r_pattern == '\0') ? '?' : io->r_pattern,
-			      io->r_pattern);
+		cp +=
+		    sprintf(cp,
+			    "          write done at file offset %d - pattern is %c (%#o)\n",
+			    io->r_offset,
+			    (io->r_pattern == '\0') ? '?' : io->r_pattern,
+			    io->r_pattern);
 	} else {
 		cp += sprintf(cp, "          read done at file offset %d\n",
-		      io->r_offset);
+			      io->r_offset);
 	}
 
 	if (sy->sy_flags & SY_ASYNC) {
-		cp += sprintf(cp, "          async io completion strategy is %s\n",
-			      aname->string);
+		cp +=
+		    sprintf(cp,
+			    "          async io completion strategy is %s\n",
+			    aname->string);
 	}
 
-	cp += sprintf(cp, "          number of requests is %d, strides per request is %d\n",
-		      io->r_nent, io->r_nstrides);
+	cp +=
+	    sprintf(cp,
+		    "          number of requests is %d, strides per request is %d\n",
+		    io->r_nent, io->r_nstrides);
 
-	cp += sprintf(cp, "          i/o byte count = %d\n",
-		      io->r_nbytes);
+	cp += sprintf(cp, "          i/o byte count = %d\n", io->r_nbytes);
 
 	cp += sprintf(cp, "          memory alignment is %s\n",
-		      (io->r_uflags & F_WORD_ALIGNED) ? "aligned" : "unaligned");
+		      (io->
+		       r_uflags & F_WORD_ALIGNED) ? "aligned" : "unaligned");
 
 #ifdef CRAY
 	if (io->r_oflags & O_RAW) {
-		cp += sprintf(cp, "          RAW I/O: offset %% 4096 = %d length %% 4096 = %d\n",
-			      io->r_offset % 4096, io->r_nbytes % 4096);
+		cp +=
+		    sprintf(cp,
+			    "          RAW I/O: offset %% 4096 = %d length %% 4096 = %d\n",
+			    io->r_offset % 4096, io->r_nbytes % 4096);
 		fstat(fd, &sbuf);
-		cp += sprintf(cp, "          optimal file xfer size: small: %d large: %d\n",
-			      sbuf.st_blksize, sbuf.st_oblksize);
-		cp += sprintf(cp, "          cblks %d cbits %#o\n",
-			      sbuf.st_cblks, sbuf.st_cbits);
+		cp +=
+		    sprintf(cp,
+			    "          optimal file xfer size: small: %d large: %d\n",
+			    sbuf.st_blksize, sbuf.st_oblksize);
+		cp +=
+		    sprintf(cp, "          cblks %d cbits %#o\n", sbuf.st_cblks,
+			    sbuf.st_cbits);
 	}
 #endif
 #ifdef sgi
 	if (io->r_oflags & O_DIRECT) {
 
 		if (fcntl(fd, F_DIOINFO, &finfo) == -1) {
-			cp += sprintf(cp, "          Error %s (%d) getting direct I/O info\n",
-				      strerror(errno), errno);
+			cp +=
+			    sprintf(cp,
+				    "          Error %s (%d) getting direct I/O info\n",
+				    strerror(errno), errno);
 			finfo.d_mem = 1;
 			finfo.d_miniosz = 1;
 			finfo.d_maxiosz = 1;
 		}
 
-		cp += sprintf(cp, "          DIRECT I/O: offset %% %d = %d length %% %d = %d\n",
-			      finfo.d_miniosz,
-			      io->r_offset % finfo.d_miniosz,
-			      io->r_nbytes,
-			      io->r_nbytes % finfo.d_miniosz);
-		cp += sprintf(cp, "          mem alignment 0x%x xfer size: small: %d large: %d\n",
-			      finfo.d_mem, finfo.d_miniosz, finfo.d_maxiosz);
+		cp +=
+		    sprintf(cp,
+			    "          DIRECT I/O: offset %% %d = %d length %% %d = %d\n",
+			    finfo.d_miniosz, io->r_offset % finfo.d_miniosz,
+			    io->r_nbytes, io->r_nbytes % finfo.d_miniosz);
+		cp +=
+		    sprintf(cp,
+			    "          mem alignment 0x%x xfer size: small: %d large: %d\n",
+			    finfo.d_mem, finfo.d_miniosz, finfo.d_maxiosz);
 	}
 #endif
 
-	return(errbuf);
+	return (errbuf);
 }
 
 /*
  * Issue listio requests
  */
 #ifdef CRAY
-struct status *
-sy_listio(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_listio(struct io_req *req, struct syscall_info *sysc, int fd,
+			 char *addr)
 {
-	int		offset, nbytes, nstrides, nents, aio_strat;
-	int		aio_id, signo, o, i, lc;
-	char    	*a;
-	struct listreq	*lio_req, *l;
-	struct aio_info	*aiop;
-	struct status	*status;
+	int offset, nbytes, nstrides, nents, aio_strat;
+	int aio_id, signo, o, i, lc;
+	char *a;
+	struct listreq *lio_req, *l;
+	struct aio_info *aiop;
+	struct status *status;
 
 	/*
 	 * Initialize common fields - assumes r_oflags, r_file, r_offset, and
 	 * r_nbytes are at the same offset in the read_req and reada_req
 	 * structures.
 	 */
-	offset	  = req->r_data.io.r_offset;
-	nbytes	  = req->r_data.io.r_nbytes;
-	nstrides  = req->r_data.io.r_nstrides;
-	nents     = req->r_data.io.r_nent;
+	offset = req->r_data.io.r_offset;
+	nbytes = req->r_data.io.r_nbytes;
+	nstrides = req->r_data.io.r_nstrides;
+	nents = req->r_data.io.r_nent;
 	aio_strat = req->r_data.io.r_aio_strat;
 
 	lc = (sysc->sy_flags & SY_ASYNC) ? LC_START : LC_WAIT;
@@ -2456,13 +2555,13 @@
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
-	status->aioid = (int *)malloc( (nents+1) * sizeof(int) );
+	status->aioid = (int *)malloc((nents + 1) * sizeof(int));
 	if (status->aioid == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 
@@ -2471,39 +2570,38 @@
 	lio_req = (struct listreq *)malloc(nents * sizeof(struct listreq));
 	if (lio_req == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
-	for (l=lio_req,a=addr,o=offset,i=0;
-	    i < nents;
-	    l++, a+=nbytes, o+=nbytes, i++) {
+	for (l = lio_req, a = addr, o = offset, i = 0;
+	     i < nents; l++, a += nbytes, o += nbytes, i++) {
 
 		aio_id = aio_register(fd, aio_strat, signo);
 		aiop = aio_slot(aio_id);
 		status->aioid[i] = aio_id;
 
-		l->li_opcode	= (sysc->sy_flags & SY_WRITE) ? LO_WRITE : LO_READ;
-		l->li_offset	= o;
-		l->li_fildes	= fd;
-		l->li_buf	= a;
-		l->li_nbyte	= nbytes;
-		l->li_status	= &aiop->iosw;
-		l->li_signo	= signo;
-		l->li_nstride	= nstrides;
-		l->li_filstride	= 0;
-		l->li_memstride	= 0;
-		l->li_drvr	= 0;
-		l->li_flags	= LF_LSEEK;
+		l->li_opcode = (sysc->sy_flags & SY_WRITE) ? LO_WRITE : LO_READ;
+		l->li_offset = o;
+		l->li_fildes = fd;
+		l->li_buf = a;
+		l->li_nbyte = nbytes;
+		l->li_status = &aiop->iosw;
+		l->li_signo = signo;
+		l->li_nstride = nstrides;
+		l->li_filstride = 0;
+		l->li_memstride = 0;
+		l->li_drvr = 0;
+		l->li_flags = LF_LSEEK;
 	}
 
-	status->aioid[nents] = -1;		/* end sentinel */
+	status->aioid[nents] = -1;	/* end sentinel */
 
 	if ((status->rval = listio(lc, lio_req, nents)) == -1) {
 		status->err = errno;
 	}
 
 	free(lio_req);
-	return(status);
+	return (status);
 }
 
 /*
@@ -2511,31 +2609,30 @@
  *
  * This assumes filestride & memstride = 0.
  */
-int
-listio_mem(struct io_req *req, int offset, int fmstride, int *min, int *max)
+int listio_mem(struct io_req *req, int offset, int fmstride, int *min, int *max)
 {
-	int	i, size;
+	int i, size;
 
 	size = stride_bounds(offset, fmstride,
-			     req->r_data.io.r_nstrides*req->r_data.io.r_nent,
+			     req->r_data.io.r_nstrides * req->r_data.io.r_nent,
 			     req->r_data.io.r_nbytes, min, max);
-	return(size);
+	return (size);
 }
 
-char *
-fmt_listio(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
+char *fmt_listio(struct io_req *req, struct syscall_info *sy, int fd,
+		 char *addr)
 {
-	static char	*errbuf = NULL;
-	char		*cp;
-	char		*c, *opcode;
-	int		i;
+	static char *errbuf = NULL;
+	char *cp;
+	char *c, *opcode;
+	int i;
 
 	if (errbuf == NULL) {
 		errbuf = (char *)malloc(32768);
 		if (errbuf == NULL) {
 			doio_fprintf(stderr, "malloc failed, %s/%d\n",
-				__FILE__, __LINE__);
-				return NULL;
+				     __FILE__, __LINE__);
+			return NULL;
 		}
 	}
 
@@ -2547,66 +2644,63 @@
 
 	cp += sprintf(cp, "          data buffer at %#o\n", addr);
 
-	return(errbuf);
+	return (errbuf);
 }
 #endif /* CRAY */
 
 #ifdef sgi
-struct status *
-sy_pread(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_pread(struct io_req *req, struct syscall_info *sysc, int fd,
+			char *addr)
 {
 	int rc;
-	struct status	*status;
+	struct status *status;
 
-	rc = pread(fd, addr, req->r_data.io.r_nbytes,
-		   req->r_data.io.r_offset);
+	rc = pread(fd, addr, req->r_data.io.r_nbytes, req->r_data.io.r_offset);
 
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid = NULL;
 	status->rval = rc;
 	status->err = errno;
 
-	return(status);
+	return (status);
 }
 
-struct status *
-sy_pwrite(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_pwrite(struct io_req *req, struct syscall_info *sysc, int fd,
+			 char *addr)
 {
 	int rc;
-	struct status	*status;
+	struct status *status;
 
-	rc = pwrite(fd, addr, req->r_data.io.r_nbytes,
-		    req->r_data.io.r_offset);
+	rc = pwrite(fd, addr, req->r_data.io.r_nbytes, req->r_data.io.r_offset);
 
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid = NULL;
 	status->rval = rc;
 	status->err = errno;
 
-	return(status);
+	return (status);
 }
 
-char *
-fmt_pread(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
+char *fmt_pread(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
 {
-	static char	*errbuf = NULL;
-	char		*cp;
+	static char *errbuf = NULL;
+	char *cp;
 
 	if (errbuf == NULL) {
 		errbuf = (char *)malloc(32768);
 		if (errbuf == NULL) {
 			doio_fprintf(stderr, "malloc failed, %s/%d\n",
-				__FILE__, __LINE__);
+				     __FILE__, __LINE__);
 			return NULL;
 		}
 	}
@@ -2614,46 +2708,45 @@
 	cp = errbuf;
 	cp += sprintf(cp, "syscall:  %s(%d, 0x%lx, %d)\n",
 		      sy->sy_name, fd, addr, req->r_data.io.r_nbytes);
-	return(errbuf);
+	return (errbuf);
 }
-#endif	/* sgi */
+#endif /* sgi */
 
 #ifndef CRAY
-struct status *
-sy_readv(struct io_req	*req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_readv(struct io_req *req, struct syscall_info *sysc, int fd,
+			char *addr)
 {
 	struct status *sy_rwv();
 	return sy_rwv(req, sysc, fd, addr, 0);
 }
 
-struct status *
-sy_writev(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_writev(struct io_req *req, struct syscall_info *sysc, int fd,
+			 char *addr)
 {
 	struct status *sy_rwv();
 	return sy_rwv(req, sysc, fd, addr, 1);
 }
 
-struct status *
-sy_rwv(struct io_req *req, struct syscall_info *sysc, int fd, char *addr,
-	int rw)
+struct status *sy_rwv(struct io_req *req, struct syscall_info *sysc, int fd,
+		      char *addr, int rw)
 {
 	int rc;
-	struct status	*status;
-	struct iovec	iov[2];
+	struct status *status;
+	struct iovec iov[2];
 
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid = NULL;
 
 	/* move to the desired file position. */
-	if ((rc=lseek(fd, req->r_data.io.r_offset, SEEK_SET)) == -1) {
+	if ((rc = lseek(fd, req->r_data.io.r_offset, SEEK_SET)) == -1) {
 		status->rval = rc;
 		status->err = errno;
-		return(status);
+		return (status);
 	}
 
 	iov[0].iov_base = addr;
@@ -2666,32 +2759,31 @@
 	status->aioid = NULL;
 	status->rval = rc;
 	status->err = errno;
-	return(status);
+	return (status);
 }
 
-char *
-fmt_readv(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
+char *fmt_readv(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
 {
-	static char	errbuf[32768];
-	char		*cp;
+	static char errbuf[32768];
+	char *cp;
 
 	cp = errbuf;
 	cp += sprintf(cp, "syscall:  %s(%d, (iov on stack), 1)\n",
 		      sy->sy_name, fd);
-	return(errbuf);
+	return (errbuf);
 }
 #endif /* !CRAY */
 
 #ifdef sgi
-struct status *
-sy_aread(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_aread(struct io_req *req, struct syscall_info *sysc, int fd,
+			char *addr)
 {
 	struct status *sy_arw();
 	return sy_arw(req, sysc, fd, addr, 0);
 }
 
-struct status *
-sy_awrite(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_awrite(struct io_req *req, struct syscall_info *sysc, int fd,
+			 char *addr)
 {
 	struct status *sy_arw();
 	return sy_arw(req, sysc, fd, addr, 1);
@@ -2702,20 +2794,19 @@
   #define sy_awrite(A, B, C, D)	sy_arw(A, B, C, D, 1)
  */
 
-struct status *
-sy_arw(struct io_req *req, struct syscall_info *sysc, int fd, char *addr,
-	int rw)
+struct status *sy_arw(struct io_req *req, struct syscall_info *sysc, int fd,
+		      char *addr, int rw)
 {
 	/* POSIX 1003.1b-1993 Async read */
-	struct status		*status;
-	int	    	    	rc;
-	int			aio_id, aio_strat, signo;
-	struct aio_info		*aiop;
+	struct status *status;
+	int rc;
+	int aio_id, aio_strat, signo;
+	struct aio_info *aiop;
 
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	aio_strat = req->r_data.io.r_aio_strat;
@@ -2724,7 +2815,7 @@
 	aio_id = aio_register(fd, aio_strat, signo);
 	aiop = aio_slot(aio_id);
 
-	memset( (void *)&aiop->aiocb, 0, sizeof(aiocb_t));
+	memset((void *)&aiop->aiocb, 0, sizeof(aiocb_t));
 
 	aiop->aiocb.aio_fildes = fd;
 	aiop->aiocb.aio_nbytes = req->r_data.io.r_nbytes;
@@ -2751,67 +2842,64 @@
 	else
 		rc = aio_read(&aiop->aiocb);
 
-	status->aioid = (int *)malloc( 2 * sizeof(int) );
+	status->aioid = (int *)malloc(2 * sizeof(int));
 	if (status->aioid == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid[0] = aio_id;
 	status->aioid[1] = -1;
 	status->rval = rc;
 	status->err = errno;
-	return(status);
+	return (status);
 }
 
-char *
-fmt_aread(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
+char *fmt_aread(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
 {
-	static char	errbuf[32768];
-	char		*cp;
+	static char errbuf[32768];
+	char *cp;
 
 	cp = errbuf;
-	cp += sprintf(cp, "syscall:  %s(&aiop->aiocb)\n",
-		      sy->sy_name);
-	return(errbuf);
+	cp += sprintf(cp, "syscall:  %s(&aiop->aiocb)\n", sy->sy_name);
+	return (errbuf);
 }
 #endif /* sgi */
 
 #ifndef CRAY
 
-struct status *
-sy_mmread(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_mmread(struct io_req *req, struct syscall_info *sysc, int fd,
+			 char *addr)
 {
 	struct status *sy_mmrw();
 	return sy_mmrw(req, sysc, fd, addr, 0);
 }
 
-struct status *
-sy_mmwrite(struct io_req *req, struct syscall_info *sysc, int fd, char *addr)
+struct status *sy_mmwrite(struct io_req *req, struct syscall_info *sysc, int fd,
+			  char *addr)
 {
 	struct status *sy_mmrw();
 	return sy_mmrw(req, sysc, fd, addr, 1);
 }
 
-struct status *
-sy_mmrw(struct io_req *req, struct syscall_info *sysc, int fd, char *addr,
-	int rw)
+struct status *sy_mmrw(struct io_req *req, struct syscall_info *sysc, int fd,
+		       char *addr, int rw)
 {
 	/*
 	 * mmap read/write
 	 * This version is oriented towards mmaping the file to memory
 	 * ONCE and keeping it mapped.
 	 */
-	struct status		*status;
-	void			*mrc=NULL, *memaddr=NULL;
-	struct fd_cache		*fdc;
-	struct stat		sbuf;
-    int rc;
+	struct status *status;
+	void *mrc = NULL, *memaddr = NULL;
+	struct fd_cache *fdc;
+	struct stat sbuf;
+	int rc;
 
 	status = (struct status *)malloc(sizeof(struct status));
 	if (status == NULL) {
 		doio_fprintf(stderr, "malloc failed, %s/%d\n",
-			__FILE__, __LINE__);
+			     __FILE__, __LINE__);
 		return NULL;
 	}
 	status->aioid = NULL;
@@ -2821,22 +2909,21 @@
 
 	if (v_opt || fdc->c_memaddr == NULL) {
 		if (fstat(fd, &sbuf) < 0) {
-			doio_fprintf(stderr, "fstat failed, errno=%d\n",
-				     errno);
+			doio_fprintf(stderr, "fstat failed, errno=%d\n", errno);
 			status->err = errno;
-			return(status);
+			return (status);
 		}
 
 		fdc->c_memlen = (int)sbuf.st_size;
 		mrc = mmap(NULL, (int)sbuf.st_size,
-		     rw ? PROT_WRITE|PROT_READ : PROT_READ,
-		     MAP_SHARED, fd, 0);
+			   rw ? PROT_WRITE | PROT_READ : PROT_READ,
+			   MAP_SHARED, fd, 0);
 
 		if (mrc == MAP_FAILED) {
 			doio_fprintf(stderr, "mmap() failed - 0x%lx %d\n",
-				mrc, errno);
+				     mrc, errno);
 			status->err = errno;
-			return(status);
+			return (status);
 		}
 
 		fdc->c_memaddr = mrc;
@@ -2849,27 +2936,26 @@
 		memcpy(memaddr, addr, req->r_data.io.r_nbytes);
 	else
 		memcpy(addr, memaddr, req->r_data.io.r_nbytes);
-       if (v_opt)
-               msync(fdc->c_memaddr, (int)sbuf.st_size, MS_SYNC);
+	if (v_opt)
+		msync(fdc->c_memaddr, (int)sbuf.st_size, MS_SYNC);
 	active_mmap_rw = 0;
 
 	status->rval = req->r_data.io.r_nbytes;
 	status->err = 0;
 
-    if (v_opt) {
-      rc = munmap(mrc, (int)sbuf.st_size);
-    }
+	if (v_opt) {
+		rc = munmap(mrc, (int)sbuf.st_size);
+	}
 
-	return(status);
+	return (status);
 }
 
-char *
-fmt_mmrw(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
+char *fmt_mmrw(struct io_req *req, struct syscall_info *sy, int fd, char *addr)
 {
-	static char	errbuf[32768];
-	char		*cp;
-	struct fd_cache	*fdc;
-	void		*memaddr;
+	static char errbuf[32768];
+	char *cp;
+	struct fd_cache *fdc;
+	void *memaddr;
 
 	fdc = alloc_fdcache(req->r_data.io.r_file, req->r_data.io.r_oflags);
 
@@ -2881,133 +2967,111 @@
 		      fd);
 
 	cp += sprintf(cp, "\tfile is mmaped to: 0x%lx\n",
-		      (unsigned long) fdc->c_memaddr);
+		      (unsigned long)fdc->c_memaddr);
 
 	memaddr = (void *)((char *)fdc->c_memaddr + req->r_data.io.r_offset);
 
 	cp += sprintf(cp, "\tfile-mem=0x%lx, length=%d, buffer=0x%lx\n",
-		      (unsigned long) memaddr, req->r_data.io.r_nbytes,
-		      (unsigned long) addr);
+		      (unsigned long)memaddr, req->r_data.io.r_nbytes,
+		      (unsigned long)addr);
 
-	return(errbuf);
+	return (errbuf);
 }
 #endif /* !CRAY */
 
 struct syscall_info syscalls[] = {
 #ifdef CRAY
-	{ "listio-read-sync",		LREAD,
-	  sy_listio,	NULL,		fmt_listio,
-	  SY_IOSW
-	},
-	{ "listio-read-strides-sync",	LSREAD,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW
-	},
-	{ "listio-read-reqs-sync",	LEREAD,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW
-	},
-	{ "listio-read-async",		LREADA,
-	  sy_listio,	NULL,		fmt_listio,
-	  SY_IOSW | SY_ASYNC
-	},
-	{ "listio-read-strides-async",	LSREADA,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_ASYNC
-	},
-	{ "listio-read-reqs-async",	LEREADA,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_ASYNC
-	},
-	{ "listio-write-sync",		LWRITE,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE
-	},
-	{ "listio-write-strides-sync",	LSWRITE,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE
-	},
-	{ "listio-write-reqs-sync",	LEWRITE,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE
-	},
-	{ "listio-write-async",		LWRITEA,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE | SY_ASYNC
-	},
-	{ "listio-write-strides-async",	LSWRITEA,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE | SY_ASYNC
-	},
-	{ "listio-write-reqs-async",	LEWRITEA,
-	  sy_listio,	listio_mem,	fmt_listio,
-	  SY_IOSW | SY_WRITE | SY_ASYNC
-	},
+	{"listio-read-sync", LREAD,
+	 sy_listio, NULL, fmt_listio,
+	 SY_IOSW},
+	{"listio-read-strides-sync", LSREAD,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW},
+	{"listio-read-reqs-sync", LEREAD,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW},
+	{"listio-read-async", LREADA,
+	 sy_listio, NULL, fmt_listio,
+	 SY_IOSW | SY_ASYNC},
+	{"listio-read-strides-async", LSREADA,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_ASYNC},
+	{"listio-read-reqs-async", LEREADA,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_ASYNC},
+	{"listio-write-sync", LWRITE,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE},
+	{"listio-write-strides-sync", LSWRITE,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE},
+	{"listio-write-reqs-sync", LEWRITE,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE},
+	{"listio-write-async", LWRITEA,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE | SY_ASYNC},
+	{"listio-write-strides-async", LSWRITEA,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE | SY_ASYNC},
+	{"listio-write-reqs-async", LEWRITEA,
+	 sy_listio, listio_mem, fmt_listio,
+	 SY_IOSW | SY_WRITE | SY_ASYNC},
 #endif
 
 #ifdef sgi
-	{ "aread",			AREAD,
-	  sy_aread,	NULL,		fmt_aread,
-	  SY_IOSW | SY_ASYNC
-	},
-	{ "awrite",			AWRITE,
-	  sy_awrite,	NULL,		fmt_aread,
-	  SY_IOSW | SY_WRITE | SY_ASYNC
-	},
-	{ "pread",			PREAD,
-	  sy_pread,	NULL,		fmt_pread,
-	  0
-	},
-	{ "pwrite",			PWRITE,
-	  sy_pwrite,	NULL,		fmt_pread,
-	  SY_WRITE
-	},
+	{"aread", AREAD,
+	 sy_aread, NULL, fmt_aread,
+	 SY_IOSW | SY_ASYNC},
+	{"awrite", AWRITE,
+	 sy_awrite, NULL, fmt_aread,
+	 SY_IOSW | SY_WRITE | SY_ASYNC},
+	{"pread", PREAD,
+	 sy_pread, NULL, fmt_pread,
+	 0},
+	{"pwrite", PWRITE,
+	 sy_pwrite, NULL, fmt_pread,
+	 SY_WRITE},
 #endif
 
 #ifndef CRAY
-	{ "readv",			READV,
-	  sy_readv,	NULL,		fmt_readv,
-	  0
-	},
-	{ "writev",			WRITEV,
-	  sy_writev,	NULL,		fmt_readv,
-	  SY_WRITE
-	},
-	{ "mmap-read",			MMAPR,
-	  sy_mmread,	NULL,		fmt_mmrw,
-	  0
-	},
-	{ "mmap-write",			MMAPW,
-	  sy_mmwrite,	NULL,		fmt_mmrw,
-	  SY_WRITE
-	},
+	{"readv", READV,
+	 sy_readv, NULL, fmt_readv,
+	 0},
+	{"writev", WRITEV,
+	 sy_writev, NULL, fmt_readv,
+	 SY_WRITE},
+	{"mmap-read", MMAPR,
+	 sy_mmread, NULL, fmt_mmrw,
+	 0},
+	{"mmap-write", MMAPW,
+	 sy_mmwrite, NULL, fmt_mmrw,
+	 SY_WRITE},
 #endif
 
-	{ NULL,				0,
-	  0,		0,		0,
-	  0
-	},
+	{NULL, 0,
+	 0, 0, 0,
+	 0},
 };
 
-int
-do_rw(struct io_req *req)
+int do_rw(struct io_req *req)
 {
-	static int		pid = -1;
-	int	    		fd, offset, nbytes, nstrides, nents, oflags;
-	int			rval, mem_needed, i;
-	int	    		logged_write, got_lock, pattern;
-	off_t			woffset;
-	int			min_byte, max_byte;
-	char    		*addr, *file, *msg;
-	struct status		*s;
-	struct wlog_rec		wrec;
-	struct syscall_info	*sy;
+	static int pid = -1;
+	int fd, offset, nbytes, nstrides, nents, oflags;
+	int rval, mem_needed, i;
+	int logged_write, got_lock, pattern;
+	off_t woffset;
+	int min_byte, max_byte;
+	char *addr, *file, *msg;
+	struct status *s;
+	struct wlog_rec wrec;
+	struct syscall_info *sy;
 #if defined(CRAY) || defined(sgi)
-	struct aio_info		*aiop;
-	struct iosw		*iosw;
+	struct aio_info *aiop;
+	struct iosw *iosw;
 #endif
 #ifdef sgi
-	struct fd_cache		*fdc;
+	struct fd_cache *fdc;
 #endif
 
 	woffset = 0;
@@ -3017,36 +3081,37 @@
 	 * r_nbytes are at the same offset in the read_req and reada_req
 	 * structures.
 	 */
-	file	= req->r_data.io.r_file;
-	oflags	= req->r_data.io.r_oflags;
-	offset	= req->r_data.io.r_offset;
-	nbytes	= req->r_data.io.r_nbytes;
-	nstrides= req->r_data.io.r_nstrides;
-	nents   = req->r_data.io.r_nent;
-	pattern	= req->r_data.io.r_pattern;
+	file = req->r_data.io.r_file;
+	oflags = req->r_data.io.r_oflags;
+	offset = req->r_data.io.r_offset;
+	nbytes = req->r_data.io.r_nbytes;
+	nstrides = req->r_data.io.r_nstrides;
+	nents = req->r_data.io.r_nent;
+	pattern = req->r_data.io.r_pattern;
 
 	if (nents >= MAX_AIO) {
-		doio_fprintf(stderr, "do_rw: too many list requests, %d.  Maximum is %d\n",
+		doio_fprintf(stderr,
+			     "do_rw: too many list requests, %d.  Maximum is %d\n",
 			     nents, MAX_AIO);
-		return(-1);
+		return (-1);
 	}
 
 	/*
 	 * look up system call info
 	 */
-	for (sy=syscalls; sy->sy_name != NULL && sy->sy_type != req->r_type; sy++)
-		;
+	for (sy = syscalls; sy->sy_name != NULL && sy->sy_type != req->r_type;
+	     sy++) ;
 
 	if (sy->sy_name == NULL) {
 		doio_fprintf(stderr, "do_rw: unknown r_type %d.\n",
 			     req->r_type);
-		return(-1);
+		return (-1);
 	}
 
 	/*
 	 * Get an open file descriptor
 	 * Note: must be done before memory allocation so that the direct i/o
-	 *	information is available in mem. allocate
+	 *      information is available in mem. allocate
 	 */
 
 	if ((fd = alloc_fd(file, oflags)) == -1)
@@ -3058,19 +3123,21 @@
 	 * memstride.
 	 *
 	 * need:
-	 *	1 extra word for possible partial-word address "bump"
-	 *	1 extra word for dynamic pattern overrun
-	 *	MPP_BUMP extra words for T3E non-hw-aligned memory address.
+	 *      1 extra word for possible partial-word address "bump"
+	 *      1 extra word for dynamic pattern overrun
+	 *      MPP_BUMP extra words for T3E non-hw-aligned memory address.
 	 */
 
 	if (sy->sy_buffer != NULL) {
-		mem_needed = (*sy->sy_buffer)(req, 0, 0, NULL, NULL);
+		mem_needed = (*sy->sy_buffer) (req, 0, 0, NULL, NULL);
 	} else {
 		mem_needed = nbytes;
 	}
 
 #ifdef CRAY
-	if ((rval = alloc_mem(mem_needed + wtob(1) * 2 + MPP_BUMP * sizeof(UINT64_T))) < 0) {
+	if ((rval =
+	     alloc_mem(mem_needed + wtob(1) * 2 +
+		       MPP_BUMP * sizeof(UINT64_T))) < 0) {
 		return rval;
 	}
 #else
@@ -3102,11 +3169,14 @@
 			return -1;
 
 		if (sy->sy_flags & SY_WRITE) {
-			/*pattern_fill(Memptr, mem_needed, Pattern, Pattern_Length, 0);*/
-			(*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0);
+			/*pattern_fill(Memptr, mem_needed, Pattern, Pattern_Length, 0); */
+			(*Data_Fill) (Memptr, nbytes, Pattern, Pattern_Length,
+				      0);
 
-			if (sswrite((long)Memptr, Sdsptr, btoc(mem_needed)) == -1) {
-				doio_fprintf(stderr, "sswrite(%d, %d, %d) failed:  %s (%d)\n",
+			if (sswrite((long)Memptr, Sdsptr, btoc(mem_needed)) ==
+			    -1) {
+				doio_fprintf(stderr,
+					     "sswrite(%d, %d, %d) failed:  %s (%d)\n",
 					     (long)Memptr, Sdsptr,
 					     btoc(mem_needed), SYSERR, errno);
 				fflush(stderr);
@@ -3116,15 +3186,17 @@
 
 		addr = (char *)Sdsptr;
 #else
-		doio_fprintf(stderr, "Invalid O_SSD flag was generated for MPP system\n");
+		doio_fprintf(stderr,
+			     "Invalid O_SSD flag was generated for MPP system\n");
 		fflush(stderr);
 		return -1;
 #endif /* _CRAYMPP */
-#else	/* CRAY */
-		doio_fprintf(stderr, "Invalid O_SSD flag was generated for non-Cray system\n");
+#else /* CRAY */
+		doio_fprintf(stderr,
+			     "Invalid O_SSD flag was generated for non-Cray system\n");
 		fflush(stderr);
 		return -1;
-#endif	/* CRAY */
+#endif /* CRAY */
 	} else {
 		addr = Memptr;
 
@@ -3136,19 +3208,20 @@
 		 * For non-aligned I/O, bump the address from 1 to 8 words.
 		 */
 
-		if (! (req->r_data.io.r_uflags & F_WORD_ALIGNED)) {
+		if (!(req->r_data.io.r_uflags & F_WORD_ALIGNED)) {
 #ifdef _CRAYMPP
-			addr += random_range(0, MPP_BUMP, 1, NULL) * sizeof(int);
+			addr +=
+			    random_range(0, MPP_BUMP, 1, NULL) * sizeof(int);
 #endif
 			addr += random_range(0, wtob(1) - 1, 1, NULL);
 		}
-
 #ifdef sgi
 		/*
 		 * Force memory alignment for Direct I/O
 		 */
 		if ((oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0)) {
-			addr += fdc->c_memalign - ((long)addr % fdc->c_memalign);
+			addr +=
+			    fdc->c_memalign - ((long)addr % fdc->c_memalign);
 		}
 #endif
 
@@ -3158,9 +3231,10 @@
 		 * then memmove it to the right place.
 		 */
 		if (sy->sy_flags & SY_WRITE) {
-			(*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0);
+			(*Data_Fill) (Memptr, mem_needed, Pattern,
+				      Pattern_Length, 0);
 			if (addr != Memptr)
-			    memmove( addr, Memptr, mem_needed);
+				memmove(addr, Memptr, mem_needed);
 		}
 	}
 
@@ -3173,22 +3247,22 @@
 	 */
 	if (sy->sy_flags & SY_WRITE && k_opt) {
 		if (sy->sy_buffer != NULL) {
-			(*sy->sy_buffer)(req, offset, 0, &min_byte, &max_byte);
+			(*sy->sy_buffer) (req, offset, 0, &min_byte, &max_byte);
 		} else {
 			min_byte = offset;
 			max_byte = offset + (nbytes * nstrides * nents);
 		}
 
 		if (lock_file_region(file, fd, F_WRLCK,
-				     min_byte, (max_byte-min_byte+1)) < 0) {
-		    doio_fprintf(stderr,
-				"file lock failed:\n%s\n",
-				fmt_ioreq(req, sy, fd));
-		    doio_fprintf(stderr,
-				"          buffer(req, %d, 0, 0x%x, 0x%x)\n",
-				offset, min_byte, max_byte);
-		    alloc_mem(-1);
-		    exit(E_INTERNAL);
+				     min_byte, (max_byte - min_byte + 1)) < 0) {
+			doio_fprintf(stderr,
+				     "file lock failed:\n%s\n",
+				     fmt_ioreq(req, sy, fd));
+			doio_fprintf(stderr,
+				     "          buffer(req, %d, 0, 0x%x, 0x%x)\n",
+				     offset, min_byte, max_byte);
+			alloc_mem(-1);
+			exit(E_INTERNAL);
 		}
 
 		got_lock = 1;
@@ -3231,18 +3305,18 @@
 		}
 	}
 
-	s = (*sy->sy_syscall)(req, sy, fd, addr);
+	s = (*sy->sy_syscall) (req, sy, fd, addr);
 
 	if (s->rval == -1) {
 		doio_fprintf(stderr,
 			     "%s() request failed:  %s (%d)\n%s\n%s\n",
 			     sy->sy_name, SYSERR, errno,
 			     fmt_ioreq(req, sy, fd),
-			     (*sy->sy_format)(req, sy, fd, addr));
+			     (*sy->sy_format) (req, sy, fd, addr));
 
 		doio_upanic(U_RVAL);
 
-		for (i=0; i < nents; i++) {
+		for (i = 0; i < nents; i++) {
 			if (s->aioid == NULL)
 				break;
 			aio_unregister(s->aioid[i]);
@@ -3254,7 +3328,7 @@
 		 */
 #ifndef __linux__
 		if (sy->sy_flags & SY_ASYNC) {
-			for (i=0; i < nents; i++) {
+			for (i = 0; i < nents; i++) {
 				aio_wait(s->aioid[i]);
 			}
 		}
@@ -3268,9 +3342,9 @@
 
 		if (sy->sy_flags & SY_IOSW) {
 #ifdef CRAY
-			for (i=0; i < nents; i++) {
+			for (i = 0; i < nents; i++) {
 				if (s->aioid == NULL)
-					break; /* >>> error condition? */
+					break;	/* >>> error condition? */
 				aiop = aio_slot(s->aioid[i]);
 				iosw = &aiop->iosw;
 				if (iosw->sw_error != 0) {
@@ -3279,19 +3353,23 @@
 						     sy->sy_name,
 						     strerror(iosw->sw_error),
 						     fmt_ioreq(req, sy, fd),
-						     (*sy->sy_format)(req, sy, fd, addr));
+						     (*sy->sy_format) (req, sy,
+								       fd,
+								       addr));
 					doio_upanic(U_IOSW);
 					rval = -1;
-				} else if (iosw->sw_count != nbytes*nstrides) {
+				} else if (iosw->sw_count != nbytes * nstrides) {
 					doio_fprintf(stderr,
 						     "Bad iosw from %s() #%d\nExpected (%d,%d,%d), got (%d,%d,%d)\n%s\n%s\n",
 						     sy->sy_name, i,
-						     1, 0, nbytes*nstrides,
+						     1, 0, nbytes * nstrides,
 						     iosw->sw_flag,
 						     iosw->sw_error,
 						     iosw->sw_count,
 						     fmt_ioreq(req, sy, fd),
-						     (*sy->sy_format)(req, sy, fd, addr));
+						     (*sy->sy_format) (req, sy,
+								       fd,
+								       addr));
 					doio_upanic(U_IOSW);
 					rval = -1;
 				}
@@ -3318,7 +3396,9 @@
 						     strerror(aiop->aio_errno),
 						     aiop->aio_errno,
 						     fmt_ioreq(req, sy, fd),
-						     (*sy->sy_format)(req, sy, fd, addr));
+						     (*sy->sy_format) (req, sy,
+								       fd,
+								       addr));
 					doio_upanic(U_IOSW);
 					rval = -1;
 				} else if (aiop->aio_ret != nbytes) {
@@ -3329,7 +3409,9 @@
 						     aiop->aio_errno,
 						     aiop->aio_ret,
 						     fmt_ioreq(req, sy, fd),
-						     (*sy->sy_format)(req, sy, fd, addr));
+						     (*sy->sy_format) (req, sy,
+								       fd,
+								       addr));
 					aio_unregister(s->aioid[i]);
 					doio_upanic(U_IOSW);
 					return -1;
@@ -3346,7 +3428,8 @@
 					     "%s() request returned wrong # of bytes - expected %d, got %d\n%s\n%s\n",
 					     sy->sy_name, nbytes, s->rval,
 					     fmt_ioreq(req, sy, fd),
-					     (*sy->sy_format)(req, sy, fd, addr));
+					     (*sy->sy_format) (req, sy, fd,
+							       addr));
 				rval = -1;
 				doio_upanic(U_RVAL);
 			}
@@ -3360,14 +3443,14 @@
 	 */
 
 	if (rval == 0 && sy->sy_flags & SY_WRITE && v_opt) {
-		msg = check_file(file, offset, nbytes*nstrides*nents,
+		msg = check_file(file, offset, nbytes * nstrides * nents,
 				 Pattern, Pattern_Length, 0,
 				 oflags & O_PARALLEL);
 		if (msg != NULL) {
 			doio_fprintf(stderr, "%s\n%s\n%s\n",
 				     msg,
 				     fmt_ioreq(req, sy, fd),
-				     (*sy->sy_format)(req, sy, fd, addr));
+				     (*sy->sy_format) (req, sy, fd, addr));
 			doio_upanic(U_CORRUPTION);
 			exit(E_COMPARE);
 		}
@@ -3393,7 +3476,7 @@
 
 	if (got_lock) {
 		if (lock_file_region(file, fd, F_UNLCK,
-				     min_byte, (max_byte-min_byte+1)) < 0) {
+				     min_byte, (max_byte - min_byte + 1)) < 0) {
 			alloc_mem(-1);
 			exit(E_INTERNAL);
 		}
@@ -3412,30 +3495,29 @@
  *   - F_FSYNC
  */
 #ifdef sgi
-int
-do_fcntl(struct io_req *req)
+int do_fcntl(struct io_req *req)
 {
-	int	    		fd, oflags, offset, nbytes;
-	int			rval, op;
-	int	    		got_lock;
-	int			min_byte, max_byte;
-	char    		*file, *msg;
-	struct flock    	flk;
+	int fd, oflags, offset, nbytes;
+	int rval, op;
+	int got_lock;
+	int min_byte, max_byte;
+	char *file, *msg;
+	struct flock flk;
 
 	/*
 	 * Initialize common fields - assumes r_oflags, r_file, r_offset, and
 	 * r_nbytes are at the same offset in the read_req and reada_req
 	 * structures.
 	 */
-	file	= req->r_data.io.r_file;
-	oflags	= req->r_data.io.r_oflags;
-	offset	= req->r_data.io.r_offset;
-	nbytes	= req->r_data.io.r_nbytes;
+	file = req->r_data.io.r_file;
+	oflags = req->r_data.io.r_oflags;
+	offset = req->r_data.io.r_offset;
+	nbytes = req->r_data.io.r_nbytes;
 
-	flk.l_type=0;
-	flk.l_whence=SEEK_SET;
-	flk.l_start=offset;
-	flk.l_len=nbytes;
+	flk.l_type = 0;
+	flk.l_whence = SEEK_SET;
+	flk.l_start = offset;
+	flk.l_len = nbytes;
 
 	/*
 	 * Get an open file descriptor
@@ -3455,24 +3537,32 @@
 		max_byte = offset + nbytes;
 
 		if (lock_file_region(file, fd, F_WRLCK,
-				     min_byte, (nbytes+1)) < 0) {
-		    doio_fprintf(stderr,
-				"file lock failed:\n");
-		    doio_fprintf(stderr,
-				"          buffer(req, %d, 0, 0x%x, 0x%x)\n",
-				offset, min_byte, max_byte);
-		    alloc_mem(-1);
-		    exit(E_INTERNAL);
+				     min_byte, (nbytes + 1)) < 0) {
+			doio_fprintf(stderr, "file lock failed:\n");
+			doio_fprintf(stderr,
+				     "          buffer(req, %d, 0, 0x%x, 0x%x)\n",
+				     offset, min_byte, max_byte);
+			alloc_mem(-1);
+			exit(E_INTERNAL);
 		}
 
 		got_lock = 1;
 	}
 
 	switch (req->r_type) {
-	case RESVSP:	op=F_RESVSP;	msg="f_resvsp";		break;
-	case UNRESVSP:	op=F_UNRESVSP;	msg="f_unresvsp";	break;
+	case RESVSP:
+		op = F_RESVSP;
+		msg = "f_resvsp";
+		break;
+	case UNRESVSP:
+		op = F_UNRESVSP;
+		msg = "f_unresvsp";
+		break;
 #ifdef F_FSYNC
-	case DFFSYNC:	op=F_FSYNC;	msg="f_fsync";		break;
+	case DFFSYNC:
+		op = F_FSYNC;
+		msg = "f_fsync";
+		break;
 #endif
 	}
 
@@ -3483,8 +3573,7 @@
 			     "fcntl %s request failed: %s (%d)\n\tfcntl(%d, %s %d, {%d %lld ==> %lld}\n",
 			     msg, SYSERR, errno,
 			     fd, msg, op, flk.l_whence,
-			     (long long)flk.l_start,
-			     (long long)flk.l_len);
+			     (long long)flk.l_start, (long long)flk.l_len);
 
 		doio_upanic(U_RVAL);
 		rval = -1;
@@ -3496,7 +3585,7 @@
 
 	if (got_lock) {
 		if (lock_file_region(file, fd, F_UNLCK,
-				     min_byte, (max_byte-min_byte+1)) < 0) {
+				     min_byte, (max_byte - min_byte + 1)) < 0) {
 			alloc_mem(-1);
 			exit(E_INTERNAL);
 		}
@@ -3510,20 +3599,19 @@
  *  fsync(2) and fdatasync(2)
  */
 #ifndef CRAY
-int
-do_sync(struct io_req *req)
+int do_sync(struct io_req *req)
 {
-	int	    		fd, oflags;
-	int			rval;
-	char    		*file;
+	int fd, oflags;
+	int rval;
+	char *file;
 
 	/*
 	 * Initialize common fields - assumes r_oflags, r_file, r_offset, and
 	 * r_nbytes are at the same offset in the read_req and reada_req
 	 * structures.
 	 */
-	file	= req->r_data.io.r_file;
-	oflags	= req->r_data.io.r_oflags;
+	file = req->r_data.io.r_file;
+	oflags = req->r_data.io.r_oflags;
 
 	/*
 	 * Get an open file descriptor
@@ -3533,7 +3621,7 @@
 		return -1;
 
 	rval = 0;
-	switch(req->r_type) {
+	switch (req->r_type) {
 	case FSYNC2:
 		rval = fsync(fd);
 		break;
@@ -3549,24 +3637,27 @@
 
 int
 doio_pat_fill(char *addr, int mem_needed, char *Pattern, int Pattern_Length,
-	int shift)
+	      int shift)
 {
 	return pattern_fill(addr, mem_needed, Pattern, Pattern_Length, 0);
 }
 
-char *
-doio_pat_check(char *buf, int offset, int length, char *pattern,
-	int pattern_length, int patshift)
+char *doio_pat_check(char *buf, int offset, int length, char *pattern,
+		     int pattern_length, int patshift)
 {
-	static char	errbuf[4096];
-	int		nb, i, pattern_index;
-	char    	*cp, *bufend, *ep;
-	char    	actual[33], expected[33];
+	static char errbuf[4096];
+	int nb, i, pattern_index;
+	char *cp, *bufend, *ep;
+	char actual[33], expected[33];
 
 	if (pattern_check(buf, length, pattern, pattern_length, patshift) != 0) {
 		ep = errbuf;
-		ep += sprintf(ep, "Corrupt regions follow - unprintable chars are represented as '.'\n");
-		ep += sprintf(ep, "-----------------------------------------------------------------\n");
+		ep +=
+		    sprintf(ep,
+			    "Corrupt regions follow - unprintable chars are represented as '.'\n");
+		ep +=
+		    sprintf(ep,
+			    "-----------------------------------------------------------------\n");
 
 		pattern_index = patshift % pattern_length;;
 		cp = buf;
@@ -3575,11 +3666,14 @@
 		while (cp < bufend) {
 			if (*cp != pattern[pattern_index]) {
 				nb = bufend - cp;
-				if ((unsigned int)nb > sizeof(expected)-1) {
-					nb = sizeof(expected)-1;
+				if ((unsigned int)nb > sizeof(expected) - 1) {
+					nb = sizeof(expected) - 1;
 				}
 
-				ep += sprintf(ep, "corrupt bytes starting at file offset %d\n", offset + (int)(cp-buf));
+				ep +=
+				    sprintf(ep,
+					    "corrupt bytes starting at file offset %d\n",
+					    offset + (int)(cp - buf));
 
 				/*
 				 * Fill in the expected and actual patterns
@@ -3588,19 +3682,27 @@
 				memset(actual, 0x00, sizeof(actual));
 
 				for (i = 0; i < nb; i++) {
-					expected[i] = pattern[(pattern_index + i) % pattern_length];
-					if (! isprint(expected[i])) {
+					expected[i] =
+					    pattern[(pattern_index +
+						     i) % pattern_length];
+					if (!isprint(expected[i])) {
 						expected[i] = '.';
 					}
 
 					actual[i] = cp[i];
-					if (! isprint(actual[i])) {
+					if (!isprint(actual[i])) {
 						actual[i] = '.';
 					}
 				}
 
-				ep += sprintf(ep, "    1st %2d expected bytes:  %s\n", nb, expected);
-				ep += sprintf(ep, "    1st %2d actual bytes:    %s\n", nb, actual);
+				ep +=
+				    sprintf(ep,
+					    "    1st %2d expected bytes:  %s\n",
+					    nb, expected);
+				ep +=
+				    sprintf(ep,
+					    "    1st %2d actual bytes:    %s\n",
+					    nb, actual);
 				fflush(stderr);
 				return errbuf;
 			} else {
@@ -3633,13 +3735,12 @@
  * previously opened for O_PARALLEL io.
  */
 
-char *
-check_file(char *file, int offset, int length, char *pattern,
-	int pattern_length, int patshift, int fsa)
+char *check_file(char *file, int offset, int length, char *pattern,
+		 int pattern_length, int patshift, int fsa)
 {
-	static char	errbuf[4096];
-	int	    	fd, nb, flags;
-	char		*buf, *em, *ep;
+	static char errbuf[4096];
+	int fd, nb, flags;
+	char *buf, *em, *ep;
 #ifdef sgi
 	struct fd_cache *fdc;
 #endif
@@ -3660,8 +3761,7 @@
 	if ((fd = alloc_fd(file, flags)) == -1) {
 		sprintf(errbuf,
 			"Could not open file %s with flags %#o (%s) for data comparison:  %s (%d)\n",
-			file, flags, format_oflags(flags),
-			SYSERR, errno);
+			file, flags, format_oflags(flags), SYSERR, errno);
 		return errbuf;
 	}
 
@@ -3671,7 +3771,6 @@
 			offset, file, SYSERR, errno);
 		return errbuf;
 	}
-
 #ifdef sgi
 	/* Irix: Guarantee a properly aligned address on Direct I/O */
 	fdc = alloc_fdcache(file, flags);
@@ -3703,15 +3802,20 @@
 		return errbuf;
 	}
 
-	if ((em = (*Data_Check)(buf, offset, length, pattern, pattern_length, patshift)) != NULL) {
+	if ((em =
+	     (*Data_Check) (buf, offset, length, pattern, pattern_length,
+			    patshift)) != NULL) {
 		ep = errbuf;
 		ep += sprintf(ep, "*** DATA COMPARISON ERROR ***\n");
-		ep += sprintf(ep, "check_file(%s, %d, %d, %s, %d, %d) failed\n\n",
-			      file, offset, length, pattern, pattern_length, patshift);
-		ep += sprintf(ep, "Comparison fd is %d, with open flags %#o\n",
-			      fd, flags);
+		ep +=
+		    sprintf(ep, "check_file(%s, %d, %d, %s, %d, %d) failed\n\n",
+			    file, offset, length, pattern, pattern_length,
+			    patshift);
+		ep +=
+		    sprintf(ep, "Comparison fd is %d, with open flags %#o\n",
+			    fd, flags);
 		strcpy(ep, em);
-		return(errbuf);
+		return (errbuf);
 	}
 	return NULL;
 }
@@ -3720,16 +3824,15 @@
  * Function to single-thread stdio output.
  */
 
-int
-doio_fprintf(FILE *stream, char *format, ...)
+int doio_fprintf(FILE * stream, char *format, ...)
 {
-	static int	pid = -1;
-	char		*date;
-	int		rval;
-	struct flock	flk;
-	va_list		arglist;
+	static int pid = -1;
+	char *date;
+	int rval;
+	struct flock flk;
+	va_list arglist;
 	struct timeval ts;
-	gettimeofday(&ts,NULL);
+	gettimeofday(&ts, NULL);
 	date = hms(ts.tv_sec);
 
 	if (pid == -1) {
@@ -3759,31 +3862,30 @@
  * keep track of the current amount allocated.
  */
 #ifndef CRAY
-int
-alloc_mem(int nbytes)
+int alloc_mem(int nbytes)
 {
-	char    	*cp;
-	void		*addr;
-	int		me=0, flags, key, shmid;
-	static int	mturn = 0;	/* which memory type to use */
-	struct memalloc	*M;
-	char		filename[255];
+	char *cp;
+	void *addr;
+	int me = 0, flags, key, shmid;
+	static int mturn = 0;	/* which memory type to use */
+	struct memalloc *M;
+	char filename[255];
 #ifdef __linux__
 	struct shmid_ds shm_ds;
 #endif
 
 #ifdef __linux__
-	memset( &shm_ds, 0x00, sizeof(struct shmid_ds) );
+	memset(&shm_ds, 0x00, sizeof(struct shmid_ds));
 #endif
 
 	/* nbytes = -1 means "free all allocated memory" */
 	if (nbytes == -1) {
 
-		for (me=0; me < Nmemalloc; me++) {
+		for (me = 0; me < Nmemalloc; me++) {
 			if (Memalloc[me].space == NULL)
 				continue;
 
-			switch(Memalloc[me].memtype) {
+			switch (Memalloc[me].memtype) {
 			case MEM_DATA:
 #ifdef sgi
 				if (Memalloc[me].flags & MEMF_MPIN)
@@ -3815,8 +3917,7 @@
 					munpin(Memalloc[me].space,
 					       Memalloc[me].size);
 #endif
-				munmap(Memalloc[me].space,
-				       Memalloc[me].size);
+				munmap(Memalloc[me].space, Memalloc[me].size);
 				close(Memalloc[me].fd);
 				if (Memalloc[me].flags & MEMF_FILE) {
 					unlink(Memalloc[me].name);
@@ -3824,7 +3925,8 @@
 				Memalloc[me].space = NULL;
 				break;
 			default:
-				doio_fprintf(stderr, "alloc_mem: HELP! Unknown memory space type %d index %d\n",
+				doio_fprintf(stderr,
+					     "alloc_mem: HELP! Unknown memory space type %d index %d\n",
 					     Memalloc[me].memtype, me);
 				break;
 			}
@@ -3837,17 +3939,17 @@
 	 */
 
 	if (mturn >= Nmemalloc)
-		mturn=0;
+		mturn = 0;
 
 	M = &Memalloc[mturn];
 
-	switch(M->memtype) {
+	switch (M->memtype) {
 	case MEM_DATA:
 		if (nbytes > M->size) {
 			if (M->space != NULL) {
 #ifdef sgi
 				if (M->flags & MEMF_MPIN)
-					munpin( M->space, M->size );
+					munpin(M->space, M->size);
 #endif
 				free(M->space);
 			}
@@ -3856,16 +3958,18 @@
 		}
 
 		if (M->space == NULL) {
-			if ((cp = malloc( nbytes )) == NULL) {
-				doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
+			if ((cp = malloc(nbytes)) == NULL) {
+				doio_fprintf(stderr,
+					     "malloc(%d) failed:  %s (%d)\n",
 					     nbytes, SYSERR, errno);
 				return -1;
 			}
 #ifdef sgi
 			if (M->flags & MEMF_MPIN) {
 				if (mpin(cp, nbytes) == -1) {
-					doio_fprintf(stderr, "mpin(0x%lx, %d) failed:  %s (%d)\n",
-					     cp, nbytes, SYSERR, errno);
+					doio_fprintf(stderr,
+						     "mpin(0x%lx, %d) failed:  %s (%d)\n",
+						     cp, nbytes, SYSERR, errno);
 				}
 			}
 #endif
@@ -3884,7 +3988,7 @@
 				munmap(M->space, M->size);
 				close(M->fd);
 				if (M->flags & MEMF_FILE)
-					unlink( M->name );
+					unlink(M->name);
 			}
 			M->space = NULL;
 			M->size = 0;
@@ -3896,11 +4000,12 @@
 				M->name = strdup(filename);
 			}
 
-			if ((M->fd = open(M->name, O_CREAT|O_RDWR, 0666)) == -1) {
-				doio_fprintf(stderr, "alloc_mmap: error %d (%s) opening '%s'\n",
-					     errno, SYSERR,
-					     M->name);
-				return(-1);
+			if ((M->fd =
+			     open(M->name, O_CREAT | O_RDWR, 0666)) == -1) {
+				doio_fprintf(stderr,
+					     "alloc_mmap: error %d (%s) opening '%s'\n",
+					     errno, SYSERR, M->name);
+				return (-1);
 			}
 
 			addr = NULL;
@@ -3925,25 +4030,29 @@
 				flags |= MAP_SHARED;
 
 /*printf("alloc_mem, about to mmap, fd=%d, name=(%s)\n", M->fd, M->name);*/
-			if ( (M->space = mmap(addr, M->size,
-					     PROT_READ|PROT_WRITE,
+			if ((M->space = mmap(addr, M->size,
+					     PROT_READ | PROT_WRITE,
 					     flags, M->fd, 0))
 			    == MAP_FAILED) {
-				doio_fprintf(stderr, "alloc_mem: mmap error. errno %d (%s)\n\tmmap(addr 0x%x, size %d, read|write 0x%x, mmap flags 0x%x [%#o], fd %d, 0)\n\tfile %s\n",
-					     errno, SYSERR,
-					     addr, M->size,
-					     PROT_READ|PROT_WRITE,
-					     flags, M->flags, M->fd,
-					     M->name);
+				doio_fprintf(stderr,
+					     "alloc_mem: mmap error. errno %d (%s)\n\tmmap(addr 0x%x, size %d, read|write 0x%x, mmap flags 0x%x [%#o], fd %d, 0)\n\tfile %s\n",
+					     errno, SYSERR, addr, M->size,
+					     PROT_READ | PROT_WRITE, flags,
+					     M->flags, M->fd, M->name);
 				doio_fprintf(stderr, "\t%s%s%s%s%s",
-					     (flags & MAP_PRIVATE) ? "private " : "",
+					     (flags & MAP_PRIVATE) ? "private "
+					     : "",
 #ifdef sgi
-					     (flags & MAP_LOCAL) ? "local " : "",
-					     (flags & MAP_AUTORESRV) ? "autoresrv " : "",
-					     (flags & MAP_AUTOGROW) ? "autogrow " : "",
+					     (flags & MAP_LOCAL) ? "local " :
+					     "",
+					     (flags & MAP_AUTORESRV) ?
+					     "autoresrv " : "",
+					     (flags & MAP_AUTOGROW) ?
+					     "autogrow " : "",
 #endif
-					     (flags & MAP_SHARED) ? "shared" : "");
-				return(-1);
+					     (flags & MAP_SHARED) ? "shared" :
+					     "");
+				return (-1);
 			}
 		}
 		break;
@@ -3955,11 +4064,11 @@
 				if (M->flags & MEMF_MPIN)
 					munpin(M->space, M->size);
 #endif
-				shmdt( M->space );
+				shmdt(M->space);
 #ifdef sgi
-				shmctl( M->fd, IPC_RMID );
+				shmctl(M->fd, IPC_RMID);
 #else
-				shmctl( M->fd, IPC_RMID, &shm_ds );
+				shmctl(M->fd, IPC_RMID, &shm_ds);
 #endif
 			}
 			M->space = NULL;
@@ -3977,38 +4086,44 @@
 
 			if (nbytes > M->size) {
 #ifdef DEBUG
-				doio_fprintf(stderr, "MEM_SHMEM: nblks(%d) too small:  nbytes=%d  Msize=%d, skipping this req.\n",
-					     M->nblks, nbytes, M->size );
+				doio_fprintf(stderr,
+					     "MEM_SHMEM: nblks(%d) too small:  nbytes=%d  Msize=%d, skipping this req.\n",
+					     M->nblks, nbytes, M->size);
 #endif
 				return SKIP_REQ;
 			}
 
-			shmid = shmget(key, M->size, IPC_CREAT|0666);
+			shmid = shmget(key, M->size, IPC_CREAT | 0666);
 			if (shmid == -1) {
-				doio_fprintf(stderr, "shmget(0x%x, %d, CREAT) failed: %s (%d)\n",
+				doio_fprintf(stderr,
+					     "shmget(0x%x, %d, CREAT) failed: %s (%d)\n",
 					     key, M->size, SYSERR, errno);
-				return(-1);
+				return (-1);
 			}
 			M->fd = shmid;
 			M->space = shmat(shmid, NULL, SHM_RND);
 			if (M->space == (void *)-1) {
-				doio_fprintf(stderr, "shmat(0x%x, NULL, SHM_RND) failed: %s (%d)\n",
+				doio_fprintf(stderr,
+					     "shmat(0x%x, NULL, SHM_RND) failed: %s (%d)\n",
 					     shmid, SYSERR, errno);
-				return(-1);
+				return (-1);
 			}
 #ifdef sgi
 			if (M->flags & MEMF_MPIN) {
 				if (mpin(M->space, M->size) == -1) {
-					doio_fprintf(stderr, "mpin(0x%lx, %d) failed:  %s (%d)\n",
-						     M->space, M->size, SYSERR, errno);
-			    }
+					doio_fprintf(stderr,
+						     "mpin(0x%lx, %d) failed:  %s (%d)\n",
+						     M->space, M->size, SYSERR,
+						     errno);
+				}
 			}
 #endif
 		}
 		break;
 
 	default:
-		doio_fprintf(stderr, "alloc_mem: HELP! Unknown memory space type %d index %d\n",
+		doio_fprintf(stderr,
+			     "alloc_mem: HELP! Unknown memory space type %d index %d\n",
 			     Memalloc[me].memtype, mturn);
 		break;
 	}
@@ -4020,12 +4135,11 @@
 	return 0;
 }
 #else /* CRAY */
-int
-alloc_mem(int nbytes)
+int alloc_mem(int nbytes)
 {
-	char    *cp;
-	int	ip;
-	static	char	*malloc_space;
+	char *cp;
+	int ip;
+	static char *malloc_space;
 
 	/*
 	 * The "unicos" version of this did some stuff with sbrk;
@@ -4048,41 +4162,42 @@
 
 	/* nbytes = -1 means "free all allocated memory" */
 	if (nbytes == -1) {
-		free( malloc_space );
+		free(malloc_space);
 		Memptr = NULL;
 		Memsize = 0;
 		return 0;
 	}
 
 	if (nbytes > Memsize) {
-	    if (Memsize != 0)
-		free( malloc_space );
+		if (Memsize != 0)
+			free(malloc_space);
 
-	    if ((cp = malloc_space = malloc( nbytes )) == NULL) {
-		doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
-			     nbytes, SYSERR, errno);
-		return -1;
-	    }
-
-#ifdef _CRAYT3E
-	    /* T3E requires memory to be aligned on 0x40 word boundaries */
-	    ip = (int)cp;
-	    if (ip & 0x3F != 0) {
-		doio_fprintf(stderr, "malloc(%d) = 0x%x(0x%x) not aligned by 0x%x\n",
-			     nbytes, cp, ip, ip & 0x3f);
-
-		free(cp);
-		if ((cp = malloc_space = malloc(nbytes + 0x40)) == NULL) {
-		    doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
-				 nbytes, SYSERR, errno);
-		    return -1;
+		if ((cp = malloc_space = malloc(nbytes)) == NULL) {
+			doio_fprintf(stderr, "malloc(%d) failed:  %s (%d)\n",
+				     nbytes, SYSERR, errno);
+			return -1;
 		}
+#ifdef _CRAYT3E
+		/* T3E requires memory to be aligned on 0x40 word boundaries */
 		ip = (int)cp;
-		cp += (0x40 - (ip & 0x3F));
-	    }
+		if (ip & 0x3F != 0) {
+			doio_fprintf(stderr,
+				     "malloc(%d) = 0x%x(0x%x) not aligned by 0x%x\n",
+				     nbytes, cp, ip, ip & 0x3f);
+
+			free(cp);
+			if ((cp = malloc_space = malloc(nbytes + 0x40)) == NULL) {
+				doio_fprintf(stderr,
+					     "malloc(%d) failed:  %s (%d)\n",
+					     nbytes, SYSERR, errno);
+				return -1;
+			}
+			ip = (int)cp;
+			cp += (0x40 - (ip & 0x3F));
+		}
 #endif /* _CRAYT3E */
-	    Memptr = cp;
-	    Memsize = nbytes;
+		Memptr = cp;
+		Memsize = nbytes;
 	}
 #endif /* NOTDEF */
 	return 0;
@@ -4096,8 +4211,7 @@
 
 #ifdef _CRAY1
 
-int
-alloc_sds(int nbytes)
+int alloc_sds(int nbytes)
 {
 	int nblks;
 
@@ -4119,8 +4233,7 @@
 
 #ifdef CRAY
 
-int
-alloc_sds(int nbytes)
+int alloc_sds(int nbytes)
 {
 	doio_fprintf(stderr,
 		     "Internal Error - alloc_sds() called on a CRAY2 system\n");
@@ -4144,28 +4257,26 @@
  * in the cache, and free the memory in the cache.
  */
 
-int
-alloc_fd(char *file, int oflags)
+int alloc_fd(char *file, int oflags)
 {
 	struct fd_cache *fdc;
 	struct fd_cache *alloc_fdcache(char *file, int oflags);
 
 	fdc = alloc_fdcache(file, oflags);
 	if (fdc != NULL)
-		return(fdc->c_fd);
+		return (fdc->c_fd);
 	else
-		return(-1);
+		return (-1);
 }
 
-struct fd_cache *
-alloc_fdcache(char *file, int oflags)
+struct fd_cache *alloc_fdcache(char *file, int oflags)
 {
-	int			fd;
-	struct fd_cache		*free_slot, *oldest_slot, *cp;
-	static int		cache_size = 0;
-	static struct fd_cache	*cache = NULL;
+	int fd;
+	struct fd_cache *free_slot, *oldest_slot, *cp;
+	static int cache_size = 0;
+	static struct fd_cache *cache = NULL;
 #ifdef sgi
-	struct dioattr		finfo;
+	struct dioattr finfo;
 #endif
 
 	/*
@@ -4187,7 +4298,7 @@
 		free(cache);
 		cache = NULL;
 		cache_size = 0;
-              return 0;
+		return 0;
 	}
 
 	free_slot = NULL;
@@ -4202,8 +4313,7 @@
 
 	for (cp = cache; cp != NULL && cp < &cache[cache_size]; cp++) {
 		if (cp->c_fd != -1 &&
-		    cp->c_oflags == oflags &&
-		    strcmp(cp->c_file, file) == 0) {
+		    cp->c_oflags == oflags && strcmp(cp->c_file, file) == 0) {
 #ifdef CRAY
 			cp->c_rtc = _rtc();
 #else
@@ -4268,16 +4378,20 @@
 	 */
 
 	if (free_slot == NULL) {
-		cache = (struct fd_cache *)realloc(cache, sizeof(struct fd_cache) * (FD_ALLOC_INCR + cache_size));
+		cache =
+		    (struct fd_cache *)realloc(cache,
+					       sizeof(struct fd_cache) *
+					       (FD_ALLOC_INCR + cache_size));
 		if (cache == NULL) {
-			doio_fprintf(stderr, "Could not malloc() space for fd chace");
+			doio_fprintf(stderr,
+				     "Could not malloc() space for fd chace");
 			alloc_mem(-1);
 			exit(E_SETUP);
 		}
 
 		cache_size += FD_ALLOC_INCR;
 
-		for (cp = &cache[cache_size-FD_ALLOC_INCR];
+		for (cp = &cache[cache_size - FD_ALLOC_INCR];
 		     cp < &cache[cache_size]; cp++) {
 			cp->c_fd = -1;
 		}
@@ -4334,13 +4448,12 @@
 /*
  * "caller-id" for signals
  */
-void
-signal_info(int sig, siginfo_t *info, void *v)
+void signal_info(int sig, siginfo_t * info, void *v)
 {
 	int haveit = 0;
 
 	if (info != NULL) {
-		switch(info->si_code) {
+		switch (info->si_code) {
 		case SI_USER:
 			doio_fprintf(stderr,
 				     "signal_info: si_signo %d si_errno %d si_code SI_USER pid %d uid %d\n",
@@ -4350,7 +4463,8 @@
 			break;
 
 		case SI_QUEUE:
-			doio_fprintf(stderr, "signal_info  si_signo %d si_code = SI_QUEUE\n",
+			doio_fprintf(stderr,
+				     "signal_info  si_signo %d si_code = SI_QUEUE\n",
 				     info->si_signo);
 			haveit = 1;
 			break;
@@ -4358,18 +4472,19 @@
 
 		if (!haveit) {
 			if ((info->si_signo == SIGSEGV) ||
-			   (info->si_signo == SIGBUS) ) {
-				doio_fprintf(stderr, "signal_info  si_signo %d si_errno %d si_code = %d  si_addr=%p  active_mmap_rw=%d havesigint=%d\n",
+			    (info->si_signo == SIGBUS)) {
+				doio_fprintf(stderr,
+					     "signal_info  si_signo %d si_errno %d si_code = %d  si_addr=%p  active_mmap_rw=%d havesigint=%d\n",
 					     info->si_signo, info->si_errno,
 					     info->si_code, info->si_addr,
-					     active_mmap_rw,
-					     havesigint);
+					     active_mmap_rw, havesigint);
 				haveit = 1;
-			   }
+			}
 		}
 
 		if (!haveit) {
-			doio_fprintf(stderr, "signal_info: si_signo %d si_errno %d unknown code %d\n",
+			doio_fprintf(stderr,
+				     "signal_info: si_signo %d si_errno %d unknown code %d\n",
 				     info->si_signo, info->si_errno,
 				     info->si_code);
 		}
@@ -4378,17 +4493,15 @@
 	}
 }
 
-void
-cleanup_handler(int sig, siginfo_t *info, void *v)
+void cleanup_handler(int sig, siginfo_t * info, void *v)
 {
-	havesigint=1; /* in case there's a followup signal */
-	/*signal_info(sig, info, v);*/	/* be quiet on "normal" kill */
+	havesigint = 1;		/* in case there's a followup signal */
+	/*signal_info(sig, info, v); *//* be quiet on "normal" kill */
 	alloc_mem(-1);
 	exit(0);
 }
 
-void
-die_handler(int sig, siginfo_t *info, void *v)
+void die_handler(int sig, siginfo_t * info, void *v)
 {
 	doio_fprintf(stderr, "terminating on signal %d\n", sig);
 	signal_info(sig, info, v);
@@ -4396,8 +4509,7 @@
 	exit(1);
 }
 
-void
-sigbus_handler(int sig, siginfo_t *info, void *v)
+void sigbus_handler(int sig, siginfo_t * info, void *v)
 {
 	/* While we are doing a memcpy to/from an mmapped region we can
 	   get a SIGBUS for a variety of reasons--and not all of them
@@ -4416,24 +4528,21 @@
 	 */
 
 	if (active_mmap_rw && havesigint && (info->si_errno == EINTR)) {
-		cleanup_handler( sig, info, v );
-	}
-	else{
-		die_handler( sig, info, v );
+		cleanup_handler(sig, info, v);
+	} else {
+		die_handler(sig, info, v);
 	}
 }
 #else
 
-void
-cleanup_handler(int sig)
+void cleanup_handler(int sig)
 {
-	havesigint=1; /* in case there's a followup signal */
+	havesigint = 1;		/* in case there's a followup signal */
 	alloc_mem(-1);
 	exit(0);
 }
 
-void
-die_handler(int sig)
+void die_handler(int sig)
 {
 	doio_fprintf(stderr, "terminating on signal %d\n", sig);
 	alloc_mem(-1);
@@ -4441,13 +4550,12 @@
 }
 
 #ifndef CRAY
-void
-sigbus_handler(int sig)
+void sigbus_handler(int sig)
 {
 	/* See sigbus_handler() in the 'ifdef sgi' case for details.  Here,
 	   we don't have the siginfo stuff so the guess is weaker but we'll
 	   do it anyway.
-	*/
+	 */
 
 	if (active_mmap_rw && havesigint)
 		cleanup_handler(sig);
@@ -4457,8 +4565,7 @@
 #endif /* !CRAY */
 #endif /* sgi */
 
-void
-noop_handler(int sig)
+void noop_handler(int sig)
 {
 	return;
 }
@@ -4469,10 +4576,9 @@
  * pgrp, this can be done with a single kill().
  */
 
-void
-sigint_handler(int sig)
+void sigint_handler(int sig)
 {
-	int	i;
+	int i;
 
 	for (i = 0; i < Nchildren; i++) {
 		if (Children[i] != -1) {
@@ -4487,11 +4593,10 @@
  * re-registered.
  */
 
-void
-aio_handler(int sig)
+void aio_handler(int sig)
 {
-	unsigned int	i;
-	struct aio_info	*aiop;
+	unsigned int i;
+	struct aio_info *aiop;
 
 	for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) {
 		aiop = &Aio_Info[i];
@@ -4509,12 +4614,11 @@
 /*
  * dump info on all open aio slots
  */
-void
-dump_aio(void)
+void dump_aio(void)
 {
-	unsigned int	i, count;
+	unsigned int i, count;
 
-	count=0;
+	count = 0;
 	for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) {
 		if (Aio_Info[i].busy) {
 			count++;
@@ -4522,8 +4626,7 @@
 				"Aio_Info[%03d] id=%d fd=%d signal=%d signaled=%d\n",
 				i, Aio_Info[i].id,
 				Aio_Info[i].fd,
-				Aio_Info[i].sig,
-				Aio_Info[i].signalled);
+				Aio_Info[i].sig, Aio_Info[i].signalled);
 			fprintf(stderr, "\tstrategy=%s\n",
 				format_strat(Aio_Info[i].strategy));
 		}
@@ -4537,13 +4640,12 @@
  * 'val' is the value from sigev_value and is assumed to be the
  * Aio_Info[] index.
  */
-void
-cb_handler(sigval_t val)
+void cb_handler(sigval_t val)
 {
-	struct aio_info	*aiop;
+	struct aio_info *aiop;
 
 /*printf("cb_handler requesting slot %d\n", val.sival_int);*/
-	aiop = aio_slot( val.sival_int );
+	aiop = aio_slot(val.sival_int);
 /*printf("cb_handler, aiop=%p\n", aiop);*/
 
 /*printf("%d in cb_handler\n", getpid() );*/
@@ -4557,18 +4659,17 @@
 }
 #endif
 
-struct aio_info *
-aio_slot(int aio_id)
+struct aio_info *aio_slot(int aio_id)
 {
-	unsigned int	i;
-	static int	id = 1;
-	struct aio_info	*aiop;
+	unsigned int i;
+	static int id = 1;
+	struct aio_info *aiop;
 
 	aiop = NULL;
 
 	for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) {
 		if (aio_id == -1) {
-			if (! Aio_Info[i].busy) {
+			if (!Aio_Info[i].busy) {
 				aiop = &Aio_Info[i];
 				aiop->busy = 1;
 				aiop->id = id++;
@@ -4583,7 +4684,7 @@
 	}
 
 	if (aiop == NULL) {
-		doio_fprintf(stderr,"aio_slot(%d) not found.  Request %d\n",
+		doio_fprintf(stderr, "aio_slot(%d) not found.  Request %d\n",
 			     aio_id, Reqno);
 		dump_aio();
 		alloc_mem(-1);
@@ -4593,11 +4694,10 @@
 	return aiop;
 }
 
-int
-aio_register(int fd, int strategy, int sig)
+int aio_register(int fd, int strategy, int sig)
 {
-	struct aio_info		*aiop;
-	struct sigaction	sa;
+	struct aio_info *aiop;
+	struct sigaction sa;
 
 	aiop = aio_slot(-1);
 
@@ -4625,10 +4725,9 @@
 	return aiop->id;
 }
 
-int
-aio_unregister(int aio_id)
+int aio_unregister(int aio_id)
 {
-	struct aio_info	*aiop;
+	struct aio_info *aiop;
 
 	aiop = aio_slot(aio_id);
 
@@ -4641,19 +4740,18 @@
 }
 
 #ifndef __linux__
-int
-aio_wait(int aio_id)
+int aio_wait(int aio_id)
 {
 #ifdef RECALL_SIZEOF
-	long		mask[RECALL_SIZEOF];
+	long mask[RECALL_SIZEOF];
 #endif
-	sigset_t	sigset;
-	struct aio_info	*aiop;
+	sigset_t sigset;
+	struct aio_info *aiop;
 #ifdef CRAY
-	struct iosw	*ioswlist[1];
+	struct iosw *ioswlist[1];
 #endif
 #ifdef sgi
-	const aiocb_t	*aioary[1];
+	const aiocb_t *aioary[1];
 #endif
 	int r, cnt;
 
@@ -4662,17 +4760,16 @@
 
 	switch (aiop->strategy) {
 	case A_POLL:
-		while (! aio_done(aiop))
-			;
+		while (!aio_done(aiop)) ;
 		break;
 
 	case A_SIGNAL:
 		sigemptyset(&sigset);
-		sighold( aiop->sig );
+		sighold(aiop->sig);
 
 		while (!aiop->signalled || !aiop->done) {
 			sigsuspend(&sigset);
-			sighold( aiop->sig );
+			sighold(aiop->sig);
 		}
 		break;
 
@@ -4705,21 +4802,22 @@
 		ioswlist[0] = &aiop->iosw;
 		if (recalls(1, ioswlist) < 0) {
 			doio_fprintf(stderr, "recalls failed:  %s (%d)\n",
-				SYSERR, errno);
+				     SYSERR, errno);
 			exit(E_SETUP);
 		}
 		break;
-#endif	/* CRAY */
+#endif /* CRAY */
 
 #ifdef sgi
 	case A_CALLBACK:
 		aioary[0] = &aiop->aiocb;
-		cnt=0;
+		cnt = 0;
 		do {
 			r = aio_suspend(aioary, 1, NULL);
 			if (r == -1) {
-				doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n",
-					     SYSERR, errno );
+				doio_fprintf(stderr,
+					     "aio_suspend failed: %s (%d)\n",
+					     SYSERR, errno);
 				exit(E_SETUP);
 			}
 			cnt++;
@@ -4731,7 +4829,9 @@
 		 * it's too noisy
 		 */
 		if (cnt > 1)
-			doio_fprintf(stderr, "aio_wait: callback wait took %d tries\n", cnt);
+			doio_fprintf(stderr,
+				     "aio_wait: callback wait took %d tries\n",
+				     cnt);
 #endif
 
 		/*
@@ -4744,7 +4844,7 @@
 		r = aio_suspend(aioary, 1, NULL);
 		if (r == -1) {
 			doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n",
-				     SYSERR, errno );
+				     SYSERR, errno);
 			exit(E_SETUP);
 		}
 
@@ -4764,11 +4864,10 @@
  * in seconds (as returned from time(2)).
  */
 
-char *
-hms(time_t t)
+char *hms(time_t t)
 {
-	static char	ascii_time[9];
-	struct tm	*ltime;
+	static char ascii_time[9];
+	struct tm *ltime;
 
 	ltime = localtime(&t);
 	strftime(ascii_time, sizeof(ascii_time), "%H:%M:%S", ltime);
@@ -4780,8 +4879,7 @@
  * Simple routine to check if an async io request has completed.
  */
 
-int
-aio_done(struct aio_info *ainfo)
+int aio_done(struct aio_info *ainfo)
 {
 #ifdef CRAY
 	return ainfo->iosw.sw_flag;
@@ -4790,21 +4888,22 @@
 #ifdef sgi
 	if ((ainfo->aio_errno = aio_error(&ainfo->aiocb)) == -1) {
 		doio_fprintf(stderr, "aio_done: aio_error failed: %s (%d)\n",
-			     SYSERR, errno );
+			     SYSERR, errno);
 		exit(E_SETUP);
 	}
-	/*printf("%d aio_done aio_errno=%d\n", getpid(), ainfo->aio_errno);*/
+	/*printf("%d aio_done aio_errno=%d\n", getpid(), ainfo->aio_errno); */
 	if (ainfo->aio_errno != EINPROGRESS) {
 		if ((ainfo->aio_ret = aio_return(&ainfo->aiocb)) == -1) {
-			doio_fprintf(stderr, "aio_done: aio_return failed: %s (%d)\n",
-				     SYSERR, errno );
+			doio_fprintf(stderr,
+				     "aio_done: aio_return failed: %s (%d)\n",
+				     SYSERR, errno);
 			exit(E_SETUP);
 		}
 	}
 
 	return (ainfo->aio_errno != EINPROGRESS);
 #else
-        return -1;   /* invalid */
+	return -1;		/* invalid */
 #endif
 }
 
@@ -4818,23 +4917,22 @@
  * mask is set in the Upanic_Conditions bitmask.
  */
 
-void
-doio_upanic(int mask)
+void doio_upanic(int mask)
 {
 	if (U_opt == 0 || (mask & Upanic_Conditions) == 0) {
 		return;
 	}
-
 #ifdef CRAY
 	if (upanic(PA_SET) < 0) {
-		doio_fprintf(stderr, "WARNING - Could not set the panic flag - upanic(PA_SET) failed:  %s (%d)\n",
+		doio_fprintf(stderr,
+			     "WARNING - Could not set the panic flag - upanic(PA_SET) failed:  %s (%d)\n",
 			     SYSERR, errno);
 	}
 
 	upanic(PA_PANIC);
 #endif
 #ifdef sgi
-	syssgi(1005);	/* syssgi test panic - DEBUG kernels only */
+	syssgi(1005);		/* syssgi test panic - DEBUG kernels only */
 #endif
 	doio_fprintf(stderr, "WARNING - upanic() failed\n");
 }
@@ -4845,17 +4943,16 @@
  * of 1.
  */
 
-int
-parse_cmdline(int argc, char **argv, char *opts)
+int parse_cmdline(int argc, char **argv, char *opts)
 {
-	int	    	c;
-	char    	cc, *cp=NULL, *tok=NULL;
-	extern int	opterr;
-	extern int	optind;
-	extern char	*optarg;
-	struct smap	*s;
-	char		*memargs[NMEMALLOC];
-	int		nmemargs, ma;
+	int c;
+	char cc, *cp = NULL, *tok = NULL;
+	extern int opterr;
+	extern int optind;
+	extern char *optarg;
+	struct smap *s;
+	char *memargs[NMEMALLOC];
+	int nmemargs, ma;
 
 	if (*argv[0] == '-') {
 		argv[0]++;
@@ -4877,10 +4974,10 @@
 
 		case 'C':
 			C_opt++;
-			for (s=checkmap; s->string != NULL; s++)
+			for (s = checkmap; s->string != NULL; s++)
 				if (!strcmp(s->string, optarg))
 					break;
-			if (s->string == NULL && tok != NULL)  {
+			if (s->string == NULL && tok != NULL) {
 				fprintf(stderr,
 					"%s%s:  Illegal -C arg (%s).  Must be one of: ",
 					Prog, TagName, tok);
@@ -4891,7 +4988,7 @@
 				exit(1);
 			}
 
-			switch(s->value) {
+			switch (s->value) {
 			case C_DEFAULT:
 				Data_Fill = doio_pat_fill;
 				Data_Check = doio_pat_check;
@@ -4910,7 +5007,9 @@
 
 		case 'e':
 			if (Npes > 1 && Nprocs > 1) {
-				fprintf(stderr, "%s%s:  Warning - Program is a multi-pe application - exec option is ignored.\n", Prog, TagName);
+				fprintf(stderr,
+					"%s%s:  Warning - Program is a multi-pe application - exec option is ignored.\n",
+					Prog, TagName);
 			}
 			e_opt++;
 			break;
@@ -4927,7 +5026,9 @@
 		case 'm':
 			Message_Interval = strtol(optarg, &cp, 10);
 			if (*cp != '\0' || Message_Interval < 0) {
-				fprintf(stderr, "%s%s:  Illegal -m arg (%s):  Must be an integer >= 0\n", Prog, TagName, optarg);
+				fprintf(stderr,
+					"%s%s:  Illegal -m arg (%s):  Must be an integer >= 0\n",
+					Prog, TagName, optarg);
 				exit(1);
 			}
 			m_opt++;
@@ -4936,19 +5037,21 @@
 		case 'M':	/* memory allocation types */
 #ifndef CRAY
 			nmemargs = string_to_tokens(optarg, memargs, 32, ",");
-			for (ma=0; ma < nmemargs; ma++) {
+			for (ma = 0; ma < nmemargs; ma++) {
 				parse_memalloc(memargs[ma]);
 			}
-			/*dump_memalloc();*/
+			/*dump_memalloc(); */
 #else
-			fprintf(stderr, "%s%s: Error: -M isn't supported on this platform\n", Prog, TagName);
+			fprintf(stderr,
+				"%s%s: Error: -M isn't supported on this platform\n",
+				Prog, TagName);
 			exit(1);
 #endif
 			M_opt++;
 			break;
 
 		case 'N':
-			sprintf( TagName, "(%.39s)", optarg );
+			sprintf(TagName, "(%.39s)", optarg);
 			break;
 
 		case 'n':
@@ -4961,7 +5064,9 @@
 			}
 
 			if (Npes > 1 && Nprocs > 1) {
-				fprintf(stderr, "%s%s:  Program has been built as a multi-pe app.  -n1 is the only nprocs value allowed\n", Prog, TagName);
+				fprintf(stderr,
+					"%s%s:  Program has been built as a multi-pe app.  -n1 is the only nprocs value allowed\n",
+					Prog, TagName);
 				exit(E_SETUP);
 			}
 			n_opt++;
@@ -5006,10 +5111,16 @@
 				Validation_Flags = O_DIRECT;
 #endif
 			} else {
-				if (sscanf(optarg, "%i%c", &Validation_Flags, &cc) != 1) {
-					fprintf(stderr, "%s:  Invalid -V argument (%s) - must be a decimal, hex, or octal\n", Prog, optarg);
-					fprintf(stderr, "    number, or one of the following strings:  'sync',\n");
-					fprintf(stderr, "    'buffered', 'parallel', 'ldraw', or 'raw'\n");
+				if (sscanf
+				    (optarg, "%i%c", &Validation_Flags,
+				     &cc) != 1) {
+					fprintf(stderr,
+						"%s:  Invalid -V argument (%s) - must be a decimal, hex, or octal\n",
+						Prog, optarg);
+					fprintf(stderr,
+						"    number, or one of the following strings:  'sync',\n");
+					fprintf(stderr,
+						"    'buffered', 'parallel', 'ldraw', or 'raw'\n");
 					exit(E_USAGE);
 				}
 			}
@@ -5027,8 +5138,10 @@
 						"%s%s:  Illegal -U arg (%s).  Must be one of: ",
 						Prog, TagName, tok);
 
-					for (s = Upanic_Args; s->string != NULL; s++)
-						fprintf(stderr, "%s ", s->string);
+					for (s = Upanic_Args; s->string != NULL;
+					     s++)
+						fprintf(stderr, "%s ",
+							s->string);
 
 					fprintf(stderr, "\n");
 
@@ -5053,21 +5166,21 @@
 	 * Supply defaults
 	 */
 
-	if (! C_opt) {
+	if (!C_opt) {
 		Data_Fill = doio_pat_fill;
 		Data_Check = doio_pat_check;
 	}
 
-	if (! U_opt)
+	if (!U_opt)
 		Upanic_Conditions = 0;
 
-	if (! n_opt)
+	if (!n_opt)
 		Nprocs = 1;
 
-	if (! r_opt)
+	if (!r_opt)
 		Release_Interval = DEF_RELEASE_INTERVAL;
 
-	if (! M_opt) {
+	if (!M_opt) {
 		Memalloc[Nmemalloc].memtype = MEM_DATA;
 		Memalloc[Nmemalloc].flags = 0;
 		Memalloc[Nmemalloc].name = NULL;
@@ -5127,16 +5240,15 @@
  *	nblks worth of directories - 1 int pids
  */
 #ifndef CRAY
-void
-parse_memalloc(char *arg)
+void parse_memalloc(char *arg)
 {
-	char		*allocargs[NMEMALLOC];
-	int		nalloc;
-	struct memalloc	*M;
+	char *allocargs[NMEMALLOC];
+	int nalloc;
+	struct memalloc *M;
 
 	if (Nmemalloc >= NMEMALLOC) {
 		doio_fprintf(stderr, "Error - too many memory types (%d).\n",
-			Nmemalloc);
+			     Nmemalloc);
 		return;
 	}
 
@@ -5185,15 +5297,14 @@
 			if (!strcmp(allocargs[2], "devzero")) {
 				M->name = "/dev/zero";
 				if (M->flags &
-				   ((MEMF_PRIVATE|MEMF_LOCAL) == 0))
+				    ((MEMF_PRIVATE | MEMF_LOCAL) == 0))
 					M->flags |= MEMF_PRIVATE;
 			} else {
 				M->name = allocargs[2];
 			}
 		} else {
 			M->name = "/dev/zero";
-			if (M->flags &
-			   ((MEMF_PRIVATE|MEMF_LOCAL) == 0))
+			if (M->flags & ((MEMF_PRIVATE | MEMF_LOCAL) == 0))
 				M->flags |= MEMF_PRIVATE;
 		}
 		Nmemalloc++;
@@ -5221,34 +5332,40 @@
 		Nmemalloc++;
 	} else {
 		doio_fprintf(stderr, "Error - unknown memory type '%s'.\n",
-			allocargs[0]);
+			     allocargs[0]);
 		exit(1);
 	}
 }
 
-void
-dump_memalloc(void)
+void dump_memalloc(void)
 {
-	int	ma;
-	char	*mt;
+	int ma;
+	char *mt;
 
 	if (Nmemalloc == 0) {
 		printf("No memory allocation strategies devined\n");
 		return;
 	}
 
-	for (ma=0; ma < Nmemalloc; ma++) {
-		switch(Memalloc[ma].memtype) {
-		case MEM_DATA:	mt = "data";	break;
-		case MEM_SHMEM:	mt = "shmem";	break;
-		case MEM_MMAP:	mt = "mmap";	break;
-		default:	mt = "unknown";	break;
+	for (ma = 0; ma < Nmemalloc; ma++) {
+		switch (Memalloc[ma].memtype) {
+		case MEM_DATA:
+			mt = "data";
+			break;
+		case MEM_SHMEM:
+			mt = "shmem";
+			break;
+		case MEM_MMAP:
+			mt = "mmap";
+			break;
+		default:
+			mt = "unknown";
+			break;
 		}
 		printf("mstrat[%d] = %d %s\n", ma, Memalloc[ma].memtype, mt);
 		printf("\tflags=%#o name='%s' nblks=%d\n",
 		       Memalloc[ma].flags,
-		       Memalloc[ma].name,
-		       Memalloc[ma].nblks);
+		       Memalloc[ma].name, Memalloc[ma].nblks);
 	}
 }
 
@@ -5259,20 +5376,20 @@
  *	currently this permits ONE type of delay between operations.
  */
 
-void
-parse_delay(char *arg)
+void parse_delay(char *arg)
 {
-	char		*delayargs[NMEMALLOC];
-	int		ndelay;
-	struct smap	*s;
+	char *delayargs[NMEMALLOC];
+	int ndelay;
+	struct smap *s;
 
 	ndelay = string_to_tokens(arg, delayargs, 32, ":");
 	if (ndelay < 2) {
 		doio_fprintf(stderr,
-			"Illegal delay arg (%s). Must be operation:time\n", arg);
+			     "Illegal delay arg (%s). Must be operation:time\n",
+			     arg);
 		exit(1);
 	}
-	for (s=delaymap; s->string != NULL; s++)
+	for (s = delaymap; s->string != NULL; s++)
 		if (!strcmp(s->string, delayargs[0]))
 			break;
 	if (s->string == NULL) {
@@ -5290,8 +5407,7 @@
 	sscanf(delayargs[1], "%i", &delaytime);
 
 	if (ndelay > 2) {
-		fprintf(stderr,
-			"Warning: extra delay arguments ignored.\n");
+		fprintf(stderr, "Warning: extra delay arguments ignored.\n");
 	}
 }
 
@@ -5299,8 +5415,7 @@
  * Usage clause - obvious
  */
 
-int
-usage(FILE *stream)
+int usage(FILE * stream)
 {
 	/*
 	 * Only do this if we are on vpe 0, to avoid seeing it from every
@@ -5311,12 +5426,13 @@
 		return 0;
 	}
 
-	fprintf(stream, "usage%s:  %s [-aekv] [-m message_interval] [-n nprocs] [-r release_interval] [-w write_log] [-V validation_ftype] [-U upanic_cond] [infile]\n", TagName, Prog);
+	fprintf(stream,
+		"usage%s:  %s [-aekv] [-m message_interval] [-n nprocs] [-r release_interval] [-w write_log] [-V validation_ftype] [-U upanic_cond] [infile]\n",
+		TagName, Prog);
 	return 0;
 }
 
-void
-help(FILE *stream)
+void help(FILE * stream)
 {
 	/*
 	 * Only the app running on vpe 0 gets to issue help - this prevents
@@ -5329,28 +5445,41 @@
 
 	usage(stream);
 	fprintf(stream, "\n");
-	fprintf(stream, "\t-a                   abort - kill all doio processes on data compare\n");
-	fprintf(stream, "\t                     errors.  Normally only the erroring process exits\n");
+	fprintf(stream,
+		"\t-a                   abort - kill all doio processes on data compare\n");
+	fprintf(stream,
+		"\t                     errors.  Normally only the erroring process exits\n");
 	fprintf(stream, "\t-C data-pattern-type \n");
-	fprintf(stream, "\t                     Available data patterns are:\n");
+	fprintf(stream,
+		"\t                     Available data patterns are:\n");
 	fprintf(stream, "\t                     default - repeating pattern\n");
 	fprintf(stream, "\t-d Operation:Time    Inter-operation delay.\n");
 	fprintf(stream, "\t                     Operations are:\n");
-	fprintf(stream, "\t                         select:time (1 second=1000000)\n");
+	fprintf(stream,
+		"\t                         select:time (1 second=1000000)\n");
 	fprintf(stream, "\t                         sleep:time (1 second=1)\n");
 #ifdef sgi
-	fprintf(stream, "\t                         sginap:time (1 second=CLK_TCK=100)\n");
+	fprintf(stream,
+		"\t                         sginap:time (1 second=CLK_TCK=100)\n");
 #endif
 	fprintf(stream, "\t                         alarm:time (1 second=1)\n");
-	fprintf(stream, "\t-e                   Re-exec children before entering the main\n");
-	fprintf(stream, "\t                     loop.  This is useful for spreading\n");
-	fprintf(stream, "\t                     procs around on multi-pe systems.\n");
-	fprintf(stream, "\t-k                   Lock file regions during writes using fcntl()\n");
-	fprintf(stream, "\t-v                   Verify writes - this is done by doing a buffered\n");
-	fprintf(stream, "\t                     read() of the data if file io was done, or\n");
-	fprintf(stream, "\t                     an ssread()of the data if sds io was done\n");
+	fprintf(stream,
+		"\t-e                   Re-exec children before entering the main\n");
+	fprintf(stream,
+		"\t                     loop.  This is useful for spreading\n");
+	fprintf(stream,
+		"\t                     procs around on multi-pe systems.\n");
+	fprintf(stream,
+		"\t-k                   Lock file regions during writes using fcntl()\n");
+	fprintf(stream,
+		"\t-v                   Verify writes - this is done by doing a buffered\n");
+	fprintf(stream,
+		"\t                     read() of the data if file io was done, or\n");
+	fprintf(stream,
+		"\t                     an ssread()of the data if sds io was done\n");
 #ifndef CRAY
-	fprintf(stream, "\t-M                   Data buffer allocation method\n");
+	fprintf(stream,
+		"\t-M                   Data buffer allocation method\n");
 	fprintf(stream, "\t                     alloc-type[,type]\n");
 #ifdef sgi
 	fprintf(stream, "\t			    data:flags\n");
@@ -5369,54 +5498,92 @@
 	fprintf(stream, "\t			        a - autoresrv\n");
 	fprintf(stream, "\t			        G - autogrow\n");
 #else
-	fprintf(stream, "\t			        s - shared (shared file must exist\n"),
-	fprintf(stream, "\t			            and have needed length)\n");
+	fprintf(stream,
+		"\t			        s - shared (shared file must exist\n"),
+	    fprintf(stream,
+		    "\t			            and have needed length)\n");
 #endif
-	fprintf(stream, "\t			        f - fixed address (not used)\n");
-	fprintf(stream, "\t			        a - specify address (not used)\n");
-	fprintf(stream, "\t			        U - Unlink file when done\n");
-	fprintf(stream, "\t			        The default flag is private\n");
+	fprintf(stream,
+		"\t			        f - fixed address (not used)\n");
+	fprintf(stream,
+		"\t			        a - specify address (not used)\n");
+	fprintf(stream,
+		"\t			        U - Unlink file when done\n");
+	fprintf(stream,
+		"\t			        The default flag is private\n");
 	fprintf(stream, "\n");
 #endif /* !CRAY */
-	fprintf(stream, "\t-m message_interval  Generate a message every 'message_interval'\n");
-	fprintf(stream, "\t                     requests.  An interval of 0 suppresses\n");
-	fprintf(stream, "\t                     messages.  The default is 0.\n");
+	fprintf(stream,
+		"\t-m message_interval  Generate a message every 'message_interval'\n");
+	fprintf(stream,
+		"\t                     requests.  An interval of 0 suppresses\n");
+	fprintf(stream,
+		"\t                     messages.  The default is 0.\n");
 	fprintf(stream, "\t-N tagname           Tag name, for Monster.\n");
 	fprintf(stream, "\t-n nprocs            # of processes to start up\n");
-	fprintf(stream, "\t-r release_interval  Release all memory and close\n");
-	fprintf(stream, "\t                     files every release_interval operations.\n");
-	fprintf(stream, "\t                     By default procs never release memory\n");
-	fprintf(stream, "\t                     or close fds unless they have to.\n");
-	fprintf(stream, "\t-V validation_ftype  The type of file descriptor to use for doing data\n");
-	fprintf(stream, "\t                     validation.  validation_ftype may be an octal,\n");
-	fprintf(stream, "\t                     hex, or decimal number representing the open()\n");
-	fprintf(stream, "\t                     flags, or may be one of the following strings:\n");
-	fprintf(stream, "\t                     'buffered' - validate using bufferd read\n");
-	fprintf(stream, "\t                     'sync'     - validate using O_SYNC read\n");
+	fprintf(stream,
+		"\t-r release_interval  Release all memory and close\n");
+	fprintf(stream,
+		"\t                     files every release_interval operations.\n");
+	fprintf(stream,
+		"\t                     By default procs never release memory\n");
+	fprintf(stream,
+		"\t                     or close fds unless they have to.\n");
+	fprintf(stream,
+		"\t-V validation_ftype  The type of file descriptor to use for doing data\n");
+	fprintf(stream,
+		"\t                     validation.  validation_ftype may be an octal,\n");
+	fprintf(stream,
+		"\t                     hex, or decimal number representing the open()\n");
+	fprintf(stream,
+		"\t                     flags, or may be one of the following strings:\n");
+	fprintf(stream,
+		"\t                     'buffered' - validate using bufferd read\n");
+	fprintf(stream,
+		"\t                     'sync'     - validate using O_SYNC read\n");
 #ifdef sgi
-	fprintf(stream, "\t                     'direct    - validate using O_DIRECT read'\n");
+	fprintf(stream,
+		"\t                     'direct    - validate using O_DIRECT read'\n");
 #endif
 #ifdef CRAY
-	fprintf(stream, "\t                     'ldraw'    - validate using O_LDRAW read\n");
-	fprintf(stream, "\t                     'parallel' - validate using O_PARALLEL read\n");
-	fprintf(stream, "\t                     'raw'      - validate using O_RAW read\n");
+	fprintf(stream,
+		"\t                     'ldraw'    - validate using O_LDRAW read\n");
+	fprintf(stream,
+		"\t                     'parallel' - validate using O_PARALLEL read\n");
+	fprintf(stream,
+		"\t                     'raw'      - validate using O_RAW read\n");
 #endif
 	fprintf(stream, "\t                     By default, 'parallel'\n");
-	fprintf(stream, "\t                     is used if the write was done with O_PARALLEL\n");
-	fprintf(stream, "\t                     or 'buffered' for all other writes.\n");
-	fprintf(stream, "\t-w write_log         File to log file writes to.  The doio_check\n");
-	fprintf(stream, "\t                     program can reconstruct datafiles using the\n");
-	fprintf(stream, "\t                     write_log, and detect if a file is corrupt\n");
-	fprintf(stream, "\t                     after all procs have exited.\n");
-	fprintf(stream, "\t-U upanic_cond       Comma separated list of conditions that will\n");
-	fprintf(stream, "\t                     cause a call to upanic(PA_PANIC).\n");
-	fprintf(stream, "\t                     'corruption' -> upanic on bad data comparisons\n");
-	fprintf(stream, "\t                     'iosw'     ---> upanic on unexpected async iosw\n");
-	fprintf(stream, "\t                     'rval'     ---> upanic on unexpected syscall rvals\n");
-	fprintf(stream, "\t                     'all'      ---> all of the above\n");
+	fprintf(stream,
+		"\t                     is used if the write was done with O_PARALLEL\n");
+	fprintf(stream,
+		"\t                     or 'buffered' for all other writes.\n");
+	fprintf(stream,
+		"\t-w write_log         File to log file writes to.  The doio_check\n");
+	fprintf(stream,
+		"\t                     program can reconstruct datafiles using the\n");
+	fprintf(stream,
+		"\t                     write_log, and detect if a file is corrupt\n");
+	fprintf(stream,
+		"\t                     after all procs have exited.\n");
+	fprintf(stream,
+		"\t-U upanic_cond       Comma separated list of conditions that will\n");
+	fprintf(stream,
+		"\t                     cause a call to upanic(PA_PANIC).\n");
+	fprintf(stream,
+		"\t                     'corruption' -> upanic on bad data comparisons\n");
+	fprintf(stream,
+		"\t                     'iosw'     ---> upanic on unexpected async iosw\n");
+	fprintf(stream,
+		"\t                     'rval'     ---> upanic on unexpected syscall rvals\n");
+	fprintf(stream,
+		"\t                     'all'      ---> all of the above\n");
 	fprintf(stream, "\n");
-	fprintf(stream, "\tinfile               Input stream - default is stdin - must be a list\n");
-	fprintf(stream, "\t                     of io_req structures (see doio.h).  Currently\n");
-	fprintf(stream, "\t                     only the iogen program generates the proper\n");
+	fprintf(stream,
+		"\tinfile               Input stream - default is stdin - must be a list\n");
+	fprintf(stream,
+		"\t                     of io_req structures (see doio.h).  Currently\n");
+	fprintf(stream,
+		"\t                     only the iogen program generates the proper\n");
 	fprintf(stream, "\t                     format\n");
 }
diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
index cf96142..8d82ff8 100644
--- a/testcases/kernel/fs/doio/growfiles.c
+++ b/testcases/kernel/fs/doio/growfiles.c
@@ -96,51 +96,49 @@
 
 #include "test.h"
 
-int		set_sig(void);
-void		sig_handler(int sig);
-static void	notify_others(void);
-int		handle_error(void);
-int		cleanup(void);
-void		usage(void);
-void		help(void);
-void		prt_examples(FILE *stream);
-int		growfile(int fd, char *file, int grow_incr, char *buf,
-			unsigned long *curr_size_ptr);
-int		shrinkfile(int fd, char *filename, int trunc_incr,
-			int trunc_inter, int just_trunc);
-int		check_write(int fd, int cf_inter, char *filename, int mode);
-int		check_file(int fd, int cf_inter, char *filename,
-			int no_file_check);
-int		file_size(int fd);
-int		lkfile(int fd, int operation, int lklevel);
+int set_sig(void);
+void sig_handler(int sig);
+static void notify_others(void);
+int handle_error(void);
+int cleanup(void);
+void usage(void);
+void help(void);
+void prt_examples(FILE * stream);
+int growfile(int fd, char *file, int grow_incr, char *buf,
+	     unsigned long *curr_size_ptr);
+int shrinkfile(int fd, char *filename, int trunc_incr,
+	       int trunc_inter, int just_trunc);
+int check_write(int fd, int cf_inter, char *filename, int mode);
+int check_file(int fd, int cf_inter, char *filename, int no_file_check);
+int file_size(int fd);
+int lkfile(int fd, int operation, int lklevel);
 
 #ifndef linux
-int		pre_alloc(int fd, long size);
+int pre_alloc(int fd, long size);
 #endif /* !linux */
 
-extern int	datapidgen(int, char *, int, int);
-extern int	datapidchk(int, char *, int, int, char **);
+extern int datapidgen(int, char *, int, int);
+extern int datapidchk(int, char *, int, int, char **);
 
 /* LTP status reporting */
-char *TCID="growfiles";		/* Default test program identifier.    */
-int TST_TOTAL=1;    		/* Total number of test cases. */
+char *TCID = "growfiles";	/* Default test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 
 /* To avoid extensive modifications to the code, use this bodge */
 #define exit(x) myexit(x)
-void
-myexit (int x)
+void myexit(int x)
 {
-  if (x)
-    tst_resm (TFAIL, "Test failed");
-  else
-    tst_resm (TPASS, "Test passed");
-  tst_exit();
+	if (x)
+		tst_resm(TFAIL, "Test failed");
+	else
+		tst_resm(TPASS, "Test passed");
+	tst_exit();
 }
 
-#define NEWIO	1	/* Use the tlibio.c functions */
+#define NEWIO	1		/* Use the tlibio.c functions */
 
 #ifndef NEWIO
-#define NEWIO	0	/* specifies to use original iowrite.c */
+#define NEWIO	0		/* specifies to use original iowrite.c */
 			/* functions instead of tlibio.c functions */
 			/* Once it is proven tlibio.c functions work properly, */
 			/* only tlibio.c functions will be used */
@@ -156,20 +154,20 @@
 #define DEF_FILE	"gf"
 
 char *Progname;
-int Debug  = 0;
+int Debug = 0;
 
-int Pid=0;
+int Pid = 0;
 
-int io_type = 0;			/* I/O type -sync */
+int io_type = 0;		/* I/O type -sync */
 
 #ifdef O_LARGEFILE
-int open_flags = O_RDWR|O_CREAT|O_LARGEFILE;   /* open flags */
+int open_flags = O_RDWR | O_CREAT | O_LARGEFILE;	/* open flags */
 #else
 #warning O_LARGEFILE is not defined!
-int open_flags = O_RDWR|O_CREAT;	/* open flags */
+int open_flags = O_RDWR | O_CREAT;	/* open flags */
 #endif
 
-#define MAX_FC_READ	196608		/* 4096 * 48 - 48 blocks */
+#define MAX_FC_READ	196608	/* 4096 * 48 - 48 blocks */
 
 #define PATTERN_ASCII	1	/* repeating alphabet letter pattern */
 				/* allows multiple writers and to be checked */
@@ -204,53 +202,53 @@
 char *filenames;		/* pointer to space containing filenames */
 int remove_files = 0;		/* if set, cleanup default is not to cleanup */
 int bytes_consumed = 0;		/* total bytes consumed, all files */
-int bytes_to_consume = 0;   	/* non-zero if -B was specified, total bytes */
+int bytes_to_consume = 0;	/* non-zero if -B was specified, total bytes */
 int Maxerrs = 100;		/* Max number errors before forced exit */
 int Errors = 0;			/* number of encountered errors */
 int Upanic_on_error = 0;	/* call upanic if error and this variable set */
 
 /* The *_size variables are only used when random iosize option (-r) is used */
-int max_size=5000;
-int min_size=1;			/* also set in option parsing */
-int mult_size=1;		/* when random iosz, iosz must be mult of mult_size */
+int max_size = 5000;
+int min_size = 1;		/* also set in option parsing */
+int mult_size = 1;		/* when random iosz, iosz must be mult of mult_size */
 /* the *_lseek variables are only used when radon lseek option (-R) is used */
-int min_lseek=0;		/* also set in option parsing */
-int max_lseek=-1;		/* -1 means size of file */
+int min_lseek = 0;		/* also set in option parsing */
+int max_lseek = -1;		/* -1 means size of file */
 #ifdef CRAY
-int Pattern=PATTERN_OFFSET;	/* This pattern is 64 bit word based */
+int Pattern = PATTERN_OFFSET;	/* This pattern is 64 bit word based */
 #else
-int Pattern=PATTERN_ASCII;
+int Pattern = PATTERN_ASCII;
 #endif
-int Seed=-1;			/* random number seed, < 0 == uninitialized  */
-int Nseeds=0;			/* Number of seed specified by the user */
+int Seed = -1;			/* random number seed, < 0 == uninitialized  */
+int Nseeds = 0;			/* Number of seed specified by the user */
 int *Seeds;			/* malloc'ed arrary of ints holding user spec seeds */
 
-int using_random=0;		/* flag indicating randomization is being used */
-float delaysecs=0.0;		/* delay between iterations (in seconds) */
+int using_random = 0;		/* flag indicating randomization is being used */
+float delaysecs = 0.0;		/* delay between iterations (in seconds) */
 int delaytime;			/* delay between iterations in clocks/uses */
-int lockfile=0;			/* if set, do file locking */
+int lockfile = 0;		/* if set, do file locking */
 				/* 1 = do file locking around write, trunc */
 				/* and reads. */
 				/* 2 = write lock around all file operations */
 
-off_t Woffset=0;		/* offset before last write */
-int Grow_incr=4096;		/* sz of last write */
-int Mode=0;			/* bitmask of write/trunc mode */
+off_t Woffset = 0;		/* offset before last write */
+int Grow_incr = 4096;		/* sz of last write */
+int Mode = 0;			/* bitmask of write/trunc mode */
 				/* also knows if dealing with fifo */
 char *Buffer = NULL;		/* buffer used by write and write check */
-int Alignment=0;		/* if non word multiple, io will not be word aligned */
-int Opid=0;			/* original pid */
+int Alignment = 0;		/* if non word multiple, io will not be word aligned */
+int Opid = 0;			/* original pid */
 
 int Sync_with_others = 0;	/* Flag indicating to stop other if we stop before DONE */
 int Iter_cnt = 0;		/* contains current iteration count value */
-char	TagName[40];		/* name of this growfiles (see Monster)	    */
+char TagName[40];		/* name of this growfiles (see Monster)     */
 
 struct fileinfo_t {
-    char *filename;
-    int fd;
-    int openflags;
-    int mode;
-}  Fileinfo;
+	char *filename;
+	int fd;
+	int openflags;
+	int mode;
+} Fileinfo;
 
 /*
  * Define open flags that will be used when '-o random' option is used.
@@ -278,37 +276,37 @@
  */
 int Open_flags[] = {
 #ifdef CRAY
-	O_RDWR|O_CREAT,
-	O_RDWR|O_CREAT|O_RAW,
-	O_RDWR|O_CREAT|O_BIG,
-	O_RDWR|O_CREAT|O_APPEND,
-	O_RDWR|O_CREAT|O_NDELAY,
-	O_RDWR|O_CREAT|O_PLACE,
-	O_RDWR|O_CREAT|O_SYNC,
-	O_RDWR|O_CREAT|O_RAW|O_SYNC,
-	O_RDWR|O_CREAT|O_NDELAY|O_SYNC,
-	O_RDWR|O_CREAT|O_NDELAY|O_SYNC|O_BIG,
-	O_RDWR|O_CREAT|O_RAW,
-	O_RDWR|O_CREAT|O_RAW|O_APPEND,
-	O_RDWR|O_CREAT|O_RAW|O_BIG,
-	O_RDWR|O_CREAT|O_RAW|O_APPEND|O_BIG,
+	O_RDWR | O_CREAT,
+	O_RDWR | O_CREAT | O_RAW,
+	O_RDWR | O_CREAT | O_BIG,
+	O_RDWR | O_CREAT | O_APPEND,
+	O_RDWR | O_CREAT | O_NDELAY,
+	O_RDWR | O_CREAT | O_PLACE,
+	O_RDWR | O_CREAT | O_SYNC,
+	O_RDWR | O_CREAT | O_RAW | O_SYNC,
+	O_RDWR | O_CREAT | O_NDELAY | O_SYNC,
+	O_RDWR | O_CREAT | O_NDELAY | O_SYNC | O_BIG,
+	O_RDWR | O_CREAT | O_RAW,
+	O_RDWR | O_CREAT | O_RAW | O_APPEND,
+	O_RDWR | O_CREAT | O_RAW | O_BIG,
+	O_RDWR | O_CREAT | O_RAW | O_APPEND | O_BIG,
 /***
  * O_WELLFORMED makes -o random require well formed i/o
  ***/
 #if ALLOW_O_WELLFORMED
 #if O_PARALLEL
-	O_RDWR|O_CREAT|O_PARALLEL|O_WELLFORMED|O_RAW,
-	O_RDWR|O_CREAT|O_PARALLEL|O_WELLFORMED|O_RAW|O_TRUNC,
+	O_RDWR | O_CREAT | O_PARALLEL | O_WELLFORMED | O_RAW,
+	O_RDWR | O_CREAT | O_PARALLEL | O_WELLFORMED | O_RAW | O_TRUNC,
 #endif /* O_PARALLEL */
 #endif
 
 #else /* CRAY */
-	O_RDWR|O_CREAT,
-	O_RDWR|O_CREAT|O_APPEND,
-	O_RDWR|O_CREAT|O_NDELAY,
-	O_RDWR|O_CREAT|O_SYNC,
-	O_RDWR|O_CREAT|O_SYNC|O_NDELAY,
-	O_RDWR|O_CREAT|O_APPEND|O_NDELAY,
+	O_RDWR | O_CREAT,
+	O_RDWR | O_CREAT | O_APPEND,
+	O_RDWR | O_CREAT | O_NDELAY,
+	O_RDWR | O_CREAT | O_SYNC,
+	O_RDWR | O_CREAT | O_SYNC | O_NDELAY,
+	O_RDWR | O_CREAT | O_APPEND | O_NDELAY,
 
 #endif /* CRAY */
 };
@@ -322,10 +320,10 @@
 #define BSIZE	1024
 #else
 #define BSIZE	512
-#endif  /* CRAY */
-#endif  /* BSIZE */
+#endif /* CRAY */
+#endif /* BSIZE */
 
-#define USECS_PER_SEC	1000000  /* microseconds per second */
+#define USECS_PER_SEC	1000000	/* microseconds per second */
 
 /*
  * Define marcos used when dealing with file locks.
@@ -343,102 +341,102 @@
 /***********************************************************************
  * MAIN
  ***********************************************************************/
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-extern char *optarg;            /* used by getopt */
-extern int optind;
+	extern char *optarg;	/* used by getopt */
+	extern int optind;
 
-int ind;
-int first_file_ind = 0;
-int num_auto_files = 0;		/* files created by tool */
-int seq_auto_files = 0;		/* auto files created by tool created by tool */
-char *auto_dir = DEF_DIR;
-char *auto_file = DEF_FILE;
-int grow_incr = 4096;
-int trunc_incr = 4096;
-int trunc_inter = 0;		/* 0 means none, */
-int unlink_inter = 0;		/* 0 means none, 1 means always unlink */
-int unlink_inter_ran = -1;	/* -1 -use unlink_inter, otherwise randomly choose */
-				/* between unlink_inter and unlink_inter_ran */
-int file_check_inter = 0;	/* 0 means never, 1 means always */
-int write_check_inter = 1;	/* 0 means never, 1 means always */
-int iterations = 1;		/* number of increments to be added */
-int no_file_check = 0;		/* if set, no whole file checking will be done */
-int num;
-int fd;				/* file descriptor */
-int stop = 0;			/* loop stopper if set */
+	int ind;
+	int first_file_ind = 0;
+	int num_auto_files = 0;	/* files created by tool */
+	int seq_auto_files = 0;	/* auto files created by tool created by tool */
+	char *auto_dir = DEF_DIR;
+	char *auto_file = DEF_FILE;
+	int grow_incr = 4096;
+	int trunc_incr = 4096;
+	int trunc_inter = 0;	/* 0 means none, */
+	int unlink_inter = 0;	/* 0 means none, 1 means always unlink */
+	int unlink_inter_ran = -1;	/* -1 -use unlink_inter, otherwise randomly choose */
+	/* between unlink_inter and unlink_inter_ran */
+	int file_check_inter = 0;	/* 0 means never, 1 means always */
+	int write_check_inter = 1;	/* 0 means never, 1 means always */
+	int iterations = 1;	/* number of increments to be added */
+	int no_file_check = 0;	/* if set, no whole file checking will be done */
+	int num;
+	int fd;			/* file descriptor */
+	int stop = 0;		/* loop stopper if set */
 
-unsigned long curr_size = 0;			/* BUG:14136 (keep track of file size) */
-const unsigned long ext2_limit = 2147483647;	/* BUG:14136 (2GB ext2 filesize limit) */
+	unsigned long curr_size = 0;	/* BUG:14136 (keep track of file size) */
+	const unsigned long ext2_limit = 2147483647;	/* BUG:14136 (2GB ext2 filesize limit) */
 
-int tmp;
-char chr;
-int ret;
-int pre_alloc_space = 0;
+	int tmp;
+	char chr;
+	int ret;
+	int pre_alloc_space = 0;
 #ifndef linux
-long total_grow_value;		/* used in pre-allocations */
+	long total_grow_value;	/* used in pre-allocations */
 #endif
-int backgrnd = 1;		/* return control to user */
-struct stat statbuf;
-int time_iterval = -1;
-time_t start_time = 0;
-char reason[128];		/* reason for loop termination */
-int num_procs=1;
-int forker_mode=0;
-int reexec=REXEC_INIT;		/* reexec info */
-char *exec_path=NULL;
+	int backgrnd = 1;	/* return control to user */
+	struct stat statbuf;
+	int time_iterval = -1;
+	time_t start_time = 0;
+	char reason[128];	/* reason for loop termination */
+	int num_procs = 1;
+	int forker_mode = 0;
+	int reexec = REXEC_INIT;	/* reexec info */
+	char *exec_path = NULL;
 
 /*char *strrchr();*/
 
-char *filename;                 /* name of file specified by user */
-char *cptr;			/* temp char pointer */
-extern int Forker_npids;	/* num of forked pid, defined in forker.c */
-struct timeval tv1;
+	char *filename;		/* name of file specified by user */
+	char *cptr;		/* temp char pointer */
+	extern int Forker_npids;	/* num of forked pid, defined in forker.c */
+	struct timeval tv1;
 
 	if (argv[0][0] == '-')
-	   reexec=REXEC_DONE;
+		reexec = REXEC_DONE;
 	/*
 	 * Determine name of file used to invoke this program
 	 */
-	if ((Progname=strrchr(argv[0], '/')) != NULL)
+	if ((Progname = strrchr(argv[0], '/')) != NULL)
 		Progname++;
 	else
-		Progname=argv[0];
+		Progname = argv[0];
 
 	TagName[0] = '\0';
 
 	/*
 	 * Process options
 	 */
-	while ((ind=getopt(argc, argv,
-	    "hB:C:c:bd:D:e:Ef:g:H:I:i:lL:n:N:O:o:pP:q:wt:r:R:s:S:T:uU:W:xy")) != EOF) {
-		switch(ind) {
+	while ((ind = getopt(argc, argv,
+			     "hB:C:c:bd:D:e:Ef:g:H:I:i:lL:n:N:O:o:pP:q:wt:r:R:s:S:T:uU:W:xy"))
+	       != EOF) {
+		switch (ind) {
 
-		case 'h' :
+		case 'h':
 			help();
-                        tst_exit();
+			tst_exit();
 
 		case 'B':
-			switch (sscanf(optarg, "%i%c",
-				   &bytes_to_consume, &chr)) {
-			case 1: /* noop */
-			        break;
+			switch (sscanf(optarg, "%i%c", &bytes_to_consume, &chr)) {
+			case 1:	/* noop */
+				break;
 
 			case 2:
 				if (chr == 'b') {
-				    bytes_to_consume *= BSIZE;
+					bytes_to_consume *= BSIZE;
 				} else {
-				    fprintf(stderr,
-					"%s%s:  --B option arg invalid\n",
-					Progname, TagName);
-				    usage();
-				    exit(1);
+					fprintf(stderr,
+						"%s%s:  --B option arg invalid\n",
+						Progname, TagName);
+					usage();
+					exit(1);
 				}
 				break;
 
 			default:
-				fprintf(stderr, "%s%s: --B option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --B option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -447,26 +445,28 @@
 
 			break;
 
-		case 'E' :
+		case 'E':
 			prt_examples(stdout);
 			exit(0);
 
-		case 'b' :	/* batch */
-			backgrnd=0;
+		case 'b':	/* batch */
+			backgrnd = 0;
 			break;
 
 		case 'C':
 			if (sscanf(optarg, "%i", &write_check_inter) != 1) {
-				fprintf(stderr, "%s%s: --c option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --c option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
 			}
-		       break;
+			break;
 
 		case 'c':
 			if (sscanf(optarg, "%i", &file_check_inter) != 1) {
-				fprintf(stderr, "%s%s: --c option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --c option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -474,33 +474,34 @@
 			break;
 
 		case 'd':
-			auto_dir=optarg;
+			auto_dir = optarg;
 #ifdef CRAY
 			unsetenv("TMPDIR");	/* force the use of auto_dir */
 #endif
 			if (stat(auto_dir, &statbuf) == -1) {
-			    if (mkdir(auto_dir, 0777) == -1) {
-				if (errno != EEXIST) {
-				    fprintf(stderr,
-				        "%s%s: Unable to make dir %s\n",
-				        Progname, TagName, auto_dir);
-				    exit(1);
-			        }
-			    }
-			}
-			else {
-			    if (! (statbuf.st_mode & S_IFDIR))  {
-				fprintf(stderr,
-				    "%s%s: %s already exists and is not a directory\n",
-				    Progname, TagName, auto_dir);
-				exit(1);
-			    }
+				if (mkdir(auto_dir, 0777) == -1) {
+					if (errno != EEXIST) {
+						fprintf(stderr,
+							"%s%s: Unable to make dir %s\n",
+							Progname, TagName,
+							auto_dir);
+						exit(1);
+					}
+				}
+			} else {
+				if (!(statbuf.st_mode & S_IFDIR)) {
+					fprintf(stderr,
+						"%s%s: %s already exists and is not a directory\n",
+						Progname, TagName, auto_dir);
+					exit(1);
+				}
 			}
 			break;
 
 		case 'D':
 			if (sscanf(optarg, "%i", &Debug) != 1) {
-				fprintf(stderr, "%s%s: --D option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --D option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -509,7 +510,8 @@
 
 		case 'e':
 			if (sscanf(optarg, "%i", &Maxerrs) != 1) {
-				fprintf(stderr, "%s%s: --e option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --e option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -517,14 +519,15 @@
 			break;
 
 		case 'f':
-			auto_file=optarg;
+			auto_file = optarg;
 			break;
 
 		case 'g':
-			if ((ret=sscanf(optarg, "%i%c", &grow_incr, &chr)) < 1 ||
-				grow_incr < 0 ) {
+			if ((ret = sscanf(optarg, "%i%c", &grow_incr, &chr)) < 1
+			    || grow_incr < 0) {
 
-				fprintf(stderr, "%s%s: --g option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --g option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -543,9 +546,11 @@
 			break;
 
 		case 'H':
-			if (sscanf(optarg, "%f", &delaysecs) != 1 || delaysecs < 0) {
+			if (sscanf(optarg, "%f", &delaysecs) != 1
+			    || delaysecs < 0) {
 
-				fprintf(stderr, "%s%s: --H option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --H option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -554,9 +559,10 @@
 
 		case 'i':
 			if (sscanf(optarg, "%i", &iterations) != 1 ||
-				iterations < 0 ) {
+			    iterations < 0) {
 
-				fprintf(stderr, "%s%s: --i option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --i option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -565,22 +571,22 @@
 
 		case 'I':
 #if NEWIO
-			if ((io_type=lio_parse_io_arg1(optarg)) == -1) {
-			    fprintf(stderr,
-				"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
-				Progname, TagName);
-			    exit(1);
+			if ((io_type = lio_parse_io_arg1(optarg)) == -1) {
+				fprintf(stderr,
+					"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
+					Progname, TagName);
+				exit(1);
 			}
 			if (io_type & LIO_RANDOM)
 				using_random++;
 #else
-			if ((io_type=parse_io_arg(optarg)) == -1) {
-			    fprintf(stderr,
-				"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
-				Progname, TagName);
-			    exit(1);
+			if ((io_type = parse_io_arg(optarg)) == -1) {
+				fprintf(stderr,
+					"%s%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
+					Progname, TagName);
+				exit(1);
 			}
-			if (io_type == 99) /* hold-over until tlibio.h */
+			if (io_type == 99)	/* hold-over until tlibio.h */
 				using_random++;
 #endif
 			break;
@@ -588,13 +594,14 @@
 		case 'l':
 			lockfile++;
 			if (lockfile > 2)
-			   lockfile=2;	/* lockfile can only be 1 or 2 */
+				lockfile = 2;	/* lockfile can only be 1 or 2 */
 			break;
 
 		case 'L':
 			if (sscanf(optarg, "%i", &time_iterval) != 1 ||
-				time_iterval < 0 ) {
-				fprintf(stderr, "%s%s: --L option arg invalid\n",
+			    time_iterval < 0) {
+				fprintf(stderr,
+					"%s%s: --L option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -602,22 +609,24 @@
 			break;
 
 		case 'n':
-			if (sscanf(optarg, "%i:%i", &num_procs, &forker_mode) < 1 ||
-                                num_procs < 0 ) {
+			if (sscanf(optarg, "%i:%i", &num_procs, &forker_mode) <
+			    1 || num_procs < 0) {
 
-                                fprintf(stderr, "%s%s: --n option arg invalid\n",
-                                        Progname, TagName);
-                                usage();
-                                exit(1);
-                        }
+				fprintf(stderr,
+					"%s%s: --n option arg invalid\n",
+					Progname, TagName);
+				usage();
+				exit(1);
+			}
 
 			break;
 
 		case 'N':
 			if (sscanf(optarg, "%i", &num_auto_files) != 1 ||
-				num_auto_files < 0 ) {
+			    num_auto_files < 0) {
 
-				fprintf(stderr, "%s%s: --N option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --N option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -626,9 +635,10 @@
 
 		case 'O':
 			if (sscanf(optarg, "%i", &Alignment) != 1 ||
-				num_auto_files < 0 ) {
+			    num_auto_files < 0) {
 
-				fprintf(stderr, "%s%s: --O option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --O option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -636,21 +646,23 @@
 			break;
 
 		case 'o':
-		        if (strcmp(optarg, "random") == 0) {
-			    open_flags=RANDOM_OPEN;
-			    using_random++;
+			if (strcmp(optarg, "random") == 0) {
+				open_flags = RANDOM_OPEN;
+				using_random++;
 
-		        } else if ((open_flags=parse_open_flags(optarg, NULL)) == -1) {
-		            fprintf(stderr, "%s%s: --o arg contains invalid flag\n",
-				Progname, TagName);
-		            exit(1);
-		        }
-		        break;
+			} else if ((open_flags = parse_open_flags(optarg, NULL))
+				   == -1) {
+				fprintf(stderr,
+					"%s%s: --o arg contains invalid flag\n",
+					Progname, TagName);
+				exit(1);
+			}
+			break;
 
-		case 'p' :	/* pre allocate space */
+		case 'p':	/* pre allocate space */
 #ifdef linux
 			printf("%s%s: --p is illegal option on linux system\n",
-				Progname, TagName);
+			       Progname, TagName);
 			exit(1);
 #else
 			pre_alloc_space++;
@@ -660,117 +672,128 @@
 		case 'P':
 #ifdef CRAY
 			if (strcmp(optarg, "PANIC") != 0) {
-				fprintf(stderr, "%s%s: --P arg must be PANIC\n", Progname, TagName);
+				fprintf(stderr, "%s%s: --P arg must be PANIC\n",
+					Progname, TagName);
 				exit(1);
 			}
 			Upanic_on_error++;
 			printf("%s: Will call upanic after writes\n");
 #else
-			printf("%s%s: --P is illegal option on non-cray system\n",
-				Progname, TagName);
+			printf
+			    ("%s%s: --P is illegal option on non-cray system\n",
+			     Progname, TagName);
 			exit(1);
 #endif
 			break;
 
 		case 'q':	/* file content or pattern */
-			switch(optarg[0]) {
+			switch (optarg[0]) {
 			case 'A':
-			    Pattern = PATTERN_ALT;
-			    break;
+				Pattern = PATTERN_ALT;
+				break;
 			case 'a':
-			    Pattern = PATTERN_ASCII;
-			    break;
+				Pattern = PATTERN_ASCII;
+				break;
 			case 'p':
-			    Pattern = PATTERN_PID;
-			    break;
+				Pattern = PATTERN_PID;
+				break;
 			case 'o':
-			    Pattern = PATTERN_OFFSET;
-			    break;
+				Pattern = PATTERN_OFFSET;
+				break;
 			case 'c':
-			    Pattern = PATTERN_CHKER;
-			    break;
+				Pattern = PATTERN_CHKER;
+				break;
 			case 'C':
-			    Pattern = PATTERN_CNTING;
-			    break;
+				Pattern = PATTERN_CNTING;
+				break;
 			case 'r':
-			    Pattern = PATTERN_RANDOM;
-			    using_random++;
-			    break;
+				Pattern = PATTERN_RANDOM;
+				using_random++;
+				break;
 			case 'z':
-			    Pattern = PATTERN_ZEROS;
-			    break;
+				Pattern = PATTERN_ZEROS;
+				break;
 			case 'O':
-			    Pattern = PATTERN_ONES;
-			    break;
+				Pattern = PATTERN_ONES;
+				break;
 			default:
-			    fprintf(stderr,
-				"%s%s: --C option arg invalid, A, a, p, o, c, C, r, z, or 0\n",
-				Progname, TagName);
-			    usage();
-			    exit(1);
+				fprintf(stderr,
+					"%s%s: --C option arg invalid, A, a, p, o, c, C, r, z, or 0\n",
+					Progname, TagName);
+				usage();
+				exit(1);
 			}
 			break;
 
-		case 'R':	/* random lseek before write arg: [min-]max*/
-			if (sscanf(optarg, "%i-%i", &min_lseek, &max_lseek) != 2) {
-			    min_lseek=1;    /* same as default in define */
-			    if (sscanf(optarg, "%i%c", &max_lseek, &chr) != 1) {
-				fprintf(stderr, "%s%s: --R option arg invalid: [min-]max\n",
-				    Progname, TagName);
-				exit(1);
-			    }
+		case 'R':	/* random lseek before write arg: [min-]max */
+			if (sscanf(optarg, "%i-%i", &min_lseek, &max_lseek) !=
+			    2) {
+				min_lseek = 1;	/* same as default in define */
+				if (sscanf(optarg, "%i%c", &max_lseek, &chr) !=
+				    1) {
+					fprintf(stderr,
+						"%s%s: --R option arg invalid: [min-]max\n",
+						Progname, TagName);
+					exit(1);
+				}
 			}
 			if (max_lseek < LSK_EOFMINUSGROW) {
-			    fprintf(stderr, "%s%s: --R option, max_lseek is invalid\n",
-				Progname, TagName);
-                            exit(1);
+				fprintf(stderr,
+					"%s%s: --R option, max_lseek is invalid\n",
+					Progname, TagName);
+				exit(1);
 			}
 			Mode |= MODE_RAND_LSEEK;
 			using_random++;
-		        break;
+			break;
 
 		case 'r':	/* random io size arg: [min-]max[:mult] */
 
 			/* min-max:mult format */
 			if (sscanf(optarg, "%i-%i:%i%c", &min_size, &max_size,
-							&mult_size, &chr) != 3 ) {
-			  min_size=1;
-			  /* max:mult format */
-		  	  if (sscanf(optarg, "%i:%i%c", &max_size,
-							&mult_size, &chr) != 2 ) {
-			    /* min-max format */
-		    	    if (sscanf(optarg, "%i-%i%c", &min_size,
-							&max_size, &chr) != 2 ) {
-			      min_size=1;
-		      	      if (sscanf(optarg, "%i%c", &max_size, &chr) != 1) {
-				fprintf(stderr,
-				     "%s%s: --r option arg invalid: [min-]max[:mult]\n",
-			    	Progname, TagName);
-				exit(1);
-		      	      }
-		    	    }
-		  	  }
+				   &mult_size, &chr) != 3) {
+				min_size = 1;
+				/* max:mult format */
+				if (sscanf(optarg, "%i:%i%c", &max_size,
+					   &mult_size, &chr) != 2) {
+					/* min-max format */
+					if (sscanf(optarg, "%i-%i%c", &min_size,
+						   &max_size, &chr) != 2) {
+						min_size = 1;
+						if (sscanf
+						    (optarg, "%i%c", &max_size,
+						     &chr) != 1) {
+							fprintf(stderr,
+								"%s%s: --r option arg invalid: [min-]max[:mult]\n",
+								Progname,
+								TagName);
+							exit(1);
+						}
+					}
+				}
 			}
 
 			if (max_size < 0) {
-			    fprintf(stderr, "%s%s: --r option, max_size is invalid\n",
-				Progname, TagName);
-                            exit(1);
+				fprintf(stderr,
+					"%s%s: --r option, max_size is invalid\n",
+					Progname, TagName);
+				exit(1);
 			}
 			/*
 			 * If min and max are the same, no randomness
 			 */
 			if (min_size != max_size) {
-			    Mode |= MODE_RAND_SIZE;
-			    using_random++;
- 			}
-		        break;
+				Mode |= MODE_RAND_SIZE;
+				using_random++;
+			}
+			break;
 
 		case 'S':
 			if (sscanf(optarg, "%i", &seq_auto_files) != 1 ||
-				seq_auto_files < 0 ) {
+			    seq_auto_files < 0) {
 
-				fprintf(stderr, "%s%s: --S option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --S option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -780,50 +803,56 @@
 		case 's':	/* format: seed[,seed...] */
 
 			/* count the number of seeds */
-			cptr=optarg;
-			for (Nseeds=1; *cptr ; Nseeds++) {
-			    if ((filename=strchr(cptr, ',')) == NULL)
-				break;
-			    cptr=filename;
-			    cptr++;
+			cptr = optarg;
+			for (Nseeds = 1; *cptr; Nseeds++) {
+				if ((filename = strchr(cptr, ',')) == NULL)
+					break;
+				cptr = filename;
+				cptr++;
 			}
-			Seeds=(int *)malloc(Nseeds*sizeof(int));
+			Seeds = (int *)malloc(Nseeds * sizeof(int));
 
 			/*
 			 * check that each seed is valid and put them in
 			 * the newly malloc'ed Seeds arrary.
 			 */
-			filename=cptr=optarg;
-			for (Nseeds=0; *cptr; Nseeds++) {
-			    if ((filename=strchr(cptr, ',')) == NULL) {
-				if (sscanf(cptr, "%i", &Seeds[Nseeds]) < 1) {
-                                    fprintf(stderr, "%s%s: --s option arg %s invalid\n",
-                                        Progname, TagName, cptr);
-                                    usage();
-                                    exit(1);
+			filename = cptr = optarg;
+			for (Nseeds = 0; *cptr; Nseeds++) {
+				if ((filename = strchr(cptr, ',')) == NULL) {
+					if (sscanf(cptr, "%i", &Seeds[Nseeds]) <
+					    1) {
+						fprintf(stderr,
+							"%s%s: --s option arg %s invalid\n",
+							Progname, TagName,
+							cptr);
+						usage();
+						exit(1);
+					}
+					Nseeds++;
+					break;
 				}
-				Nseeds++;
-                                break;
-			    }
 
-			    *filename='\0';
-			    if (sscanf(cptr, "%i", &Seeds[Nseeds]) < 1) {
-                               fprintf(stderr, "%s%s: --s option arg %s invalid\n",
-                                        Progname, TagName, cptr);
-                                usage();
-                                exit(1);
-			    }
-			    *filename=',';   /* restore string */
-                            cptr=filename;
-			    cptr++;
+				*filename = '\0';
+				if (sscanf(cptr, "%i", &Seeds[Nseeds]) < 1) {
+					fprintf(stderr,
+						"%s%s: --s option arg %s invalid\n",
+						Progname, TagName, cptr);
+					usage();
+					exit(1);
+				}
+				*filename = ',';	/* restore string */
+				cptr = filename;
+				cptr++;
 			}
 			break;
 
 		case 't':
-			if ((ret=sscanf(optarg, "%i%c", &trunc_incr, &chr)) < 1 ||
-				trunc_incr < 0 ) {
+			if ((ret =
+			     sscanf(optarg, "%i%c", &trunc_incr, &chr)) < 1
+			    || trunc_incr < 0) {
 
-				fprintf(stderr, "%s%s: --t option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --t option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -843,9 +872,10 @@
 
 		case 'T':	/* truncate interval */
 			if (sscanf(optarg, "%i%c", &trunc_inter, &chr) != 1 ||
-				trunc_inter < 0 ) {
+			    trunc_inter < 0) {
 
-				fprintf(stderr, "%s%s: --T option arg invalid\n",
+				fprintf(stderr,
+					"%s%s: --T option arg invalid\n",
 					Progname, TagName);
 				usage();
 				exit(1);
@@ -856,42 +886,44 @@
 			remove_files++;
 			break;
 
-		case 'U':   /* how often to unlink file */
-		       /*
-			* formats:
-			*      A-B  - randomly pick interval between A and B
-			*      X    - unlink file every X iteration
-			*/
-                       if (sscanf(optarg, "%i-%i", &unlink_inter,
-						&unlink_inter_ran) == 2 ) {
+		case 'U':	/* how often to unlink file */
+			/*
+			 * formats:
+			 *      A-B  - randomly pick interval between A and B
+			 *      X    - unlink file every X iteration
+			 */
+			if (sscanf(optarg, "%i-%i", &unlink_inter,
+				   &unlink_inter_ran) == 2) {
 
-			   if (unlink_inter < 0 || unlink_inter_ran < 0) {
-                                fprintf(stderr, "%s%s: --U option arg invalid\n",
-                                        Progname, TagName);
-                                usage();
-                                exit(1);
-			   }
-			   /* ensure unlink_inter contains smaller value */
-			   if (unlink_inter > unlink_inter_ran) {
-				tmp=unlink_inter_ran;
-				unlink_inter_ran=unlink_inter;
-				unlink_inter=tmp;
-			   }
-			   using_random++;
+				if (unlink_inter < 0 || unlink_inter_ran < 0) {
+					fprintf(stderr,
+						"%s%s: --U option arg invalid\n",
+						Progname, TagName);
+					usage();
+					exit(1);
+				}
+				/* ensure unlink_inter contains smaller value */
+				if (unlink_inter > unlink_inter_ran) {
+					tmp = unlink_inter_ran;
+					unlink_inter_ran = unlink_inter;
+					unlink_inter = tmp;
+				}
+				using_random++;
 
-                       } else if (sscanf(optarg, "%i%c", &unlink_inter, &chr) != 1 ||
-                                unlink_inter < 0 ) {
+			} else if (sscanf(optarg, "%i%c", &unlink_inter, &chr)
+				   != 1 || unlink_inter < 0) {
 
-                            fprintf(stderr, "%s%s: --U option arg invalid\n",
-                                 Progname, TagName);
-                            usage();
-                            exit(1);
-                        }
+				fprintf(stderr,
+					"%s%s: --U option arg invalid\n",
+					Progname, TagName);
+				usage();
+				exit(1);
+			}
 			break;
 
-	        case 'x':
+		case 'x':
 			if (reexec != REXEC_DONE)
-			    reexec=REXEC_DOIT;
+				reexec = REXEC_DOIT;
 			break;
 
 		case 'w':
@@ -900,11 +932,11 @@
 
 		case 'W':
 			TCID = optarg;
-			sprintf( TagName, "(%.39s)", optarg );
+			sprintf(TagName, "(%.39s)", optarg);
 			break;
 
 		case 'y':
-			Sync_with_others=1;
+			Sync_with_others = 1;
 			break;
 
 		case '?':
@@ -916,51 +948,52 @@
 
 	if (Debug == 1) {
 		cptr = getenv("TOUTPUT");
-		if ((cptr != NULL) && (strcmp( cptr, "NOPASS" ) == 0)) {
+		if ((cptr != NULL) && (strcmp(cptr, "NOPASS") == 0)) {
 			Debug = 0;
 		}
 	}
 
 	if (Pattern == PATTERN_RANDOM) {
-	    no_file_check=1;
-	    if (write_check_inter || file_check_inter)
-                printf("%s%s: %d Using random pattern - no data checking will be performed!\n",
-		    Progname, TagName, getpid());
-	}
-	else if (max_lseek == LSK_EOFPLUSGROW || Mode & MODE_GROW_BY_LSEEK) {
-	    no_file_check=1;
+		no_file_check = 1;
+		if (write_check_inter || file_check_inter)
+			printf
+			    ("%s%s: %d Using random pattern - no data checking will be performed!\n",
+			     Progname, TagName, getpid());
+	} else if (max_lseek == LSK_EOFPLUSGROW || Mode & MODE_GROW_BY_LSEEK) {
+		no_file_check = 1;
 
-	    if (file_check_inter)
-	        printf("%s%s: %d Using random lseek beyond EOF or lseek grow,\n\
-no whole file checking will be performed!\n", Progname, TagName, getpid());
+		if (file_check_inter)
+			printf("%s%s: %d Using random lseek beyond EOF or lseek grow,\n\
+no whole file checking will be performed!\n", Progname, TagName,
+			       getpid());
 
 	}
 
 	if (Mode & MODE_RAND_SIZE)
-	    grow_incr=max_size;
+		grow_incr = max_size;
 
 	set_sig();
 
-	Opid=getpid();
-	Pid=Opid;
+	Opid = getpid();
+	Pid = Opid;
 
 	if (backgrnd) {
-	    if (Debug > 1)
-		printf("%s: %d DEBUG2 forking, returning control to the user\n",
-		    Progname, Opid);
-	    background(Progname);	/* give user their prompt back */
+		if (Debug > 1)
+			printf
+			    ("%s: %d DEBUG2 forking, returning control to the user\n",
+			     Progname, Opid);
+		background(Progname);	/* give user their prompt back */
 	}
-
 #if CRAY
 	if (Sync_with_others)
-	   setpgrp();
+		setpgrp();
 #endif
 
 	if (Debug > 3) {
 #if NEWIO
-	    lio_set_debug(Debug-3);
+		lio_set_debug(Debug - 3);
 #else
-	    set_iowrite_debug(Debug-3);
+		set_iowrite_debug(Debug - 3);
 #endif
 	}
 
@@ -969,183 +1002,206 @@
 	 * level 3 or higher.
 	 */
 
-        if (Debug > 2) {
+	if (Debug > 2) {
 
-	    if (Mode & MODE_GROW_BY_LSEEK)
-		printf("%s: %d DEBUG lseeking past end of file, writting a \"w\"\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_OFFSET)
-		printf("%s: %d DEBUG3 %d<byteoffset>%d per word pattern multi-writers.\n",
-		    Progname, Pid, STATIC_NUM, STATIC_NUM);
-	    else if (Pattern == PATTERN_PID)
-		printf("%s: %d DEBUG3 <pid><byteoffset><pid> per word pattern - 1 writer\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_ASCII)
-		printf("%s: %d DEBUG3 ascii pattern (vi'able)- allows multiple writers\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_ALT)
-		printf("%s: %d DEBUG3 alt bit pattern - allows multiple writers\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_CHKER)
-		printf("%s: %d DEBUG3 checkerboard pattern - allows multiple writers\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_CNTING)
-		printf("%s: %d DEBUG3 counting pattern - allows multiple writers\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_RANDOM)
-		printf("%s: %d DEBUG3 random integer pattern - no write/file checking\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_ONES)
-		printf("%s: %d DEBUG3 all ones pattern - allows multiple writers\n",
-		    Progname, Pid);
-	    else if (Pattern == PATTERN_ZEROS)
-		printf("%s: %d DEBUG3 all zeros pattern - allows multiple writers\n",
-		    Progname, Pid);
+		if (Mode & MODE_GROW_BY_LSEEK)
+			printf
+			    ("%s: %d DEBUG lseeking past end of file, writting a \"w\"\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_OFFSET)
+			printf
+			    ("%s: %d DEBUG3 %d<byteoffset>%d per word pattern multi-writers.\n",
+			     Progname, Pid, STATIC_NUM, STATIC_NUM);
+		else if (Pattern == PATTERN_PID)
+			printf
+			    ("%s: %d DEBUG3 <pid><byteoffset><pid> per word pattern - 1 writer\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_ASCII)
+			printf
+			    ("%s: %d DEBUG3 ascii pattern (vi'able)- allows multiple writers\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_ALT)
+			printf
+			    ("%s: %d DEBUG3 alt bit pattern - allows multiple writers\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_CHKER)
+			printf
+			    ("%s: %d DEBUG3 checkerboard pattern - allows multiple writers\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_CNTING)
+			printf
+			    ("%s: %d DEBUG3 counting pattern - allows multiple writers\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_RANDOM)
+			printf
+			    ("%s: %d DEBUG3 random integer pattern - no write/file checking\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_ONES)
+			printf
+			    ("%s: %d DEBUG3 all ones pattern - allows multiple writers\n",
+			     Progname, Pid);
+		else if (Pattern == PATTERN_ZEROS)
+			printf
+			    ("%s: %d DEBUG3 all zeros pattern - allows multiple writers\n",
+			     Progname, Pid);
 
-	    else
-		printf("%s: %d DEBUG3 unknown pattern\n",
-		    Progname, Pid);
-	    if (bytes_to_consume)
-	        printf("%s: %d DEBUG3 bytes_to_consume = %d\n",
-		    Progname, Pid, bytes_to_consume);
-	    printf("%s: %d DEBUG3 Maxerrs = %d, pre_alloc_space = %d, filelocking = %d\n",
-		Progname, Pid, Maxerrs, pre_alloc_space, lockfile);
-
-	    printf("%s: %d DEBUG3 Debug = %d, remove files in cleanup : %d\n",
-		Progname, Pid, Debug, remove_files);
-
-	    printf("%s: %d DEBUG3 Mode = %#o\n", Progname, Pid, Mode);
-
-	    if (open_flags == RANDOM_OPEN)
-	       printf("%s: %d DEBUG3 open_flags = (random), io_type = %#o\n", Progname,
-		 Pid, io_type);
-	    else
-	       printf("%s: %d DEBUG3 open_flags = %#o, io_type = %#o\n", Progname,
-		 Pid, open_flags, io_type);
-
-	    if (Mode & MODE_RAND_SIZE) {
-	        printf("%s: %d DEBUG3 random write/trunc:  min=%d, max=%d, mult = %d\n",
-		    Progname, Pid, min_size, max_size, mult_size);
-	    }
-	    else {
-		printf("%s: %d DEBUG3 grow_incr = %d\n",
-		    Progname, Pid, grow_incr);
-	    }
-	    if (Mode & MODE_RAND_LSEEK) {
-		if (max_lseek == LSK_EOF)
-	          printf("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile>\n",
-		    Progname, Pid, min_lseek);
-		else if (max_lseek == LSK_EOFPLUSGROW)
-	          printf("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile+iosize>\n",
-		    Progname, Pid, min_lseek);
-		else if (max_lseek == LSK_EOFMINUSGROW)
-	          printf("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile-iosize>\n",
-		    Progname, Pid, min_lseek);
 		else
-	          printf("%s: %d DEBUG3 random lseek:  min=%d, max=%d\n",
-		    Progname, Pid, min_lseek, max_lseek);
-	    }
+			printf("%s: %d DEBUG3 unknown pattern\n",
+			       Progname, Pid);
+		if (bytes_to_consume)
+			printf("%s: %d DEBUG3 bytes_to_consume = %d\n",
+			       Progname, Pid, bytes_to_consume);
+		printf
+		    ("%s: %d DEBUG3 Maxerrs = %d, pre_alloc_space = %d, filelocking = %d\n",
+		     Progname, Pid, Maxerrs, pre_alloc_space, lockfile);
 
-	    printf("%s: %d DEBUG3 check write interval = %d, check file interval = %d\n",
-		Progname, Pid, write_check_inter, file_check_inter);
+		printf
+		    ("%s: %d DEBUG3 Debug = %d, remove files in cleanup : %d\n",
+		     Progname, Pid, Debug, remove_files);
 
-	    printf("%s: %d DEBUG3 trunc interval = %d, trunc_incr = %d\n",
-		Progname, Pid, trunc_inter, trunc_incr);
+		printf("%s: %d DEBUG3 Mode = %#o\n", Progname, Pid, Mode);
 
-	    if (no_file_check)
-		printf("%s: %d DEBUG3 no whole file checking will be done\n",
-		    Progname, Pid);
+		if (open_flags == RANDOM_OPEN)
+			printf
+			    ("%s: %d DEBUG3 open_flags = (random), io_type = %#o\n",
+			     Progname, Pid, io_type);
+		else
+			printf
+			    ("%s: %d DEBUG3 open_flags = %#o, io_type = %#o\n",
+			     Progname, Pid, open_flags, io_type);
 
-	    if (unlink_inter_ran == -1) {
-		printf("%s: %d DEBUG3 unlink_inter = %d\n",
-		        Progname, Pid, unlink_inter);
-	    } else {
-		printf("%s: %d DEBUG3 unlink_inter = %d, unlink_inter_ran = %d\n",
-                        Progname, Pid, unlink_inter, unlink_inter_ran);
-	    }
+		if (Mode & MODE_RAND_SIZE) {
+			printf
+			    ("%s: %d DEBUG3 random write/trunc:  min=%d, max=%d, mult = %d\n",
+			     Progname, Pid, min_size, max_size, mult_size);
+		} else {
+			printf("%s: %d DEBUG3 grow_incr = %d\n",
+			       Progname, Pid, grow_incr);
+		}
+		if (Mode & MODE_RAND_LSEEK) {
+			if (max_lseek == LSK_EOF)
+				printf
+				    ("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile>\n",
+				     Progname, Pid, min_lseek);
+			else if (max_lseek == LSK_EOFPLUSGROW)
+				printf
+				    ("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile+iosize>\n",
+				     Progname, Pid, min_lseek);
+			else if (max_lseek == LSK_EOFMINUSGROW)
+				printf
+				    ("%s: %d DEBUG3 random lseek:  min=%d, max=<endoffile-iosize>\n",
+				     Progname, Pid, min_lseek);
+			else
+				printf
+				    ("%s: %d DEBUG3 random lseek:  min=%d, max=%d\n",
+				     Progname, Pid, min_lseek, max_lseek);
+		}
 
-	    if (Debug > 8) {
-	       num=sizeof(Open_flags)/sizeof(int);
-	       printf("%s: %d DEBUG9 random open flags values:\n", Progname, Pid);
-	       for (ind=0; ind<num; ind++) {
-		    printf("\t%#o\n", Open_flags[ind]);
-	       }
-	    }
-	}  /* end of DEBUG > 2 */
+		printf
+		    ("%s: %d DEBUG3 check write interval = %d, check file interval = %d\n",
+		     Progname, Pid, write_check_inter, file_check_inter);
 
+		printf("%s: %d DEBUG3 trunc interval = %d, trunc_incr = %d\n",
+		       Progname, Pid, trunc_inter, trunc_incr);
+
+		if (no_file_check)
+			printf
+			    ("%s: %d DEBUG3 no whole file checking will be done\n",
+			     Progname, Pid);
+
+		if (unlink_inter_ran == -1) {
+			printf("%s: %d DEBUG3 unlink_inter = %d\n",
+			       Progname, Pid, unlink_inter);
+		} else {
+			printf
+			    ("%s: %d DEBUG3 unlink_inter = %d, unlink_inter_ran = %d\n",
+			     Progname, Pid, unlink_inter, unlink_inter_ran);
+		}
+
+		if (Debug > 8) {
+			num = sizeof(Open_flags) / sizeof(int);
+			printf("%s: %d DEBUG9 random open flags values:\n",
+			       Progname, Pid);
+			for (ind = 0; ind < num; ind++) {
+				printf("\t%#o\n", Open_flags[ind]);
+			}
+		}
+	}
+	/* end of DEBUG > 2 */
 	if (Debug > 1 && num_procs > 1) {
-	    printf("%s: %d DEBUG2 about to fork %d more copies\n", Progname,
-		Opid, num_procs-1);
+		printf("%s: %d DEBUG2 about to fork %d more copies\n", Progname,
+		       Opid, num_procs - 1);
 	}
 
-	fflush(stdout);	/* ensure pending i/o is flushed before forking */
+	fflush(stdout);		/* ensure pending i/o is flushed before forking */
 	fflush(stderr);
 
 	forker(num_procs, forker_mode, Progname);
 
-	Pid=getpid();	/* reset after the forks */
+	Pid = getpid();		/* reset after the forks */
 	/*
 	 * If user specified random seed(s), get that random seed value.
 	 * get random seed if it was not specified by the user.
 	 * This is done after the forks, because pid is used to get the seed.
-         */
+	 */
 	if (Nseeds == 1) {
-	    /*
-	     * If only one seed specified, all processes will get that seed.
-	     */
-	    Seed=Seeds[0];
-	} else if (Nseeds > 1) {
-	    /*
-	     * More than one seed was specified.
-	     * The original process gets the first seed.  Each
-	     * process will be get the next seed in the specified list.
-	     */
-	    if (Opid == Pid) {
-		Seed=Seeds[0];
-	    } else {
 		/*
-		 * If user didn't specify enough seeds, use default method.
+		 * If only one seed specified, all processes will get that seed.
 		 */
-		if (Forker_npids >= Nseeds)
-		{
-	    	struct timeval ts;
-			gettimeofday(&ts,NULL);
-			Seed=ts.tv_sec + Pid;  /* default random seed */
+		Seed = Seeds[0];
+	} else if (Nseeds > 1) {
+		/*
+		 * More than one seed was specified.
+		 * The original process gets the first seed.  Each
+		 * process will be get the next seed in the specified list.
+		 */
+		if (Opid == Pid) {
+			Seed = Seeds[0];
+		} else {
+			/*
+			 * If user didn't specify enough seeds, use default method.
+			 */
+			if (Forker_npids >= Nseeds) {
+				struct timeval ts;
+				gettimeofday(&ts, NULL);
+				Seed = ts.tv_sec + Pid;	/* default random seed */
+			} else {
+				Seed = Seeds[Forker_npids];
+			}
 		}
-		else {
-		    Seed=Seeds[Forker_npids];
-		}
-	    }
 	} else {
-	    /*
-	     * Generate a random seed based on time and pid.
-	     * It has a good chance of being unique for each pid.
-	     */
+		/*
+		 * Generate a random seed based on time and pid.
+		 * It has a good chance of being unique for each pid.
+		 */
 		struct timeval ts;
-		gettimeofday(&ts,NULL);
-	    Seed=ts.tv_sec + Pid;  /* default random seed */
-	    //Seed=time(0) + Pid;  /* default random seed */
+		gettimeofday(&ts, NULL);
+		Seed = ts.tv_sec + Pid;	/* default random seed */
+		//Seed=time(0) + Pid;  /* default random seed */
 
 	}
 
 	random_range_seed(Seed);
 
-        if (using_random && Debug > 0)
-	    printf("%s%s: %d DEBUG1 Using random seed of %d\n",
-		Progname, TagName, Pid, Seed);
+	if (using_random && Debug > 0)
+		printf("%s%s: %d DEBUG1 Using random seed of %d\n",
+		       Progname, TagName, Pid, Seed);
 
 	if (unlink_inter_ran > 0) {
-	    /*
-	     * Find unlinking file interval.  This must be done after
-	     * the seed was set.   This allows multiple copies to
-	     * get different intervals.
-	     */
-	    tmp=unlink_inter;
-	    unlink_inter = (int)random_range(tmp, unlink_inter_ran, 1, NULL);
+		/*
+		 * Find unlinking file interval.  This must be done after
+		 * the seed was set.   This allows multiple copies to
+		 * get different intervals.
+		 */
+		tmp = unlink_inter;
+		unlink_inter =
+		    (int)random_range(tmp, unlink_inter_ran, 1, NULL);
 
-	    if (Debug > 2)
-		printf("%s: %d DEBUG3 Unlink interval is %d (random %d - %d)\n",
-		    Progname, Pid, unlink_inter, tmp, unlink_inter_ran);
+		if (Debug > 2)
+			printf
+			    ("%s: %d DEBUG3 Unlink interval is %d (random %d - %d)\n",
+			     Progname, Pid, unlink_inter, tmp,
+			     unlink_inter_ran);
 	}
 
 	/*
@@ -1154,19 +1210,19 @@
 	 * child process on another PE.
 	 */
 	if (reexec == REXEC_DOIT && Opid != Pid) {
-	    if (exec_path == NULL) {
-		exec_path = argv[0];
-		/* Get space for cmd (2 extra, 1 for - and 1 fro NULL */
-		argv[0] = (char *)malloc(strlen(exec_path) + 2);
-		sprintf(argv[0], "-%s", exec_path);
-	    }
+		if (exec_path == NULL) {
+			exec_path = argv[0];
+			/* Get space for cmd (2 extra, 1 for - and 1 fro NULL */
+			argv[0] = (char *)malloc(strlen(exec_path) + 2);
+			sprintf(argv[0], "-%s", exec_path);
+		}
 
-	    if (Debug > 2)
-	        printf("%s: %d DEBUG3 %s/%d: execvp(%s, argv)\n",
-		    Progname, Pid, __FILE__, __LINE__, argv[0]);
+		if (Debug > 2)
+			printf("%s: %d DEBUG3 %s/%d: execvp(%s, argv)\n",
+			       Progname, Pid, __FILE__, __LINE__, argv[0]);
 
-	    execvp(argv[0], argv);
-        }
+		execvp(argv[0], argv);
+	}
 
 	/*** begin filename stuff here *****/
 	/*
@@ -1177,12 +1233,11 @@
 		 * no cmd line files, therfore, set
 		 * the default number of auto created files
 		 */
-		if (! num_auto_files && ! seq_auto_files)
-			num_auto_files=1;
-	}
-	else {
-		first_file_ind=optind;
-		num_files += argc-optind;
+		if (!num_auto_files && !seq_auto_files)
+			num_auto_files = 1;
+	} else {
+		first_file_ind = optind;
+		num_files += argc - optind;
 	}
 
 	if (num_auto_files) {
@@ -1196,10 +1251,10 @@
 	/*
 	 * get space for file names
 	 */
-	if ((filenames=(char *)malloc(num_files*PATH_MAX)) == NULL) {
+	if ((filenames = (char *)malloc(num_files * PATH_MAX)) == NULL) {
 		fprintf(stderr, "%s%s: %d %s/%d: malloc(%d) failed: %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, num_files*PATH_MAX,
-			strerror(errno));
+			Progname, TagName, Pid, __FILE__, __LINE__,
+			num_files * PATH_MAX, strerror(errno));
 		exit(1);
 	}
 
@@ -1207,10 +1262,10 @@
 	 * fill in filename cmd files then auto files.
 	 */
 
-	num=0;
+	num = 0;
 	if (first_file_ind) {
-		for (ind=first_file_ind; ind<argc; ind++, num++) {
-			strcpy((char *)filenames+(num*PATH_MAX), argv[ind]);
+		for (ind = first_file_ind; ind < argc; ind++, num++) {
+			strcpy((char *)filenames + (num * PATH_MAX), argv[ind]);
 		}
 	}
 
@@ -1218,27 +1273,27 @@
 	 * construct auto filename and insert them into filenames space
 	 */
 
-	for (ind=0;ind<num_auto_files; ind++, num++) {
-		gettimeofday(&tv1,NULL);
-		sprintf((char *)filenames+(num*PATH_MAX), "%s/%s%ld%ld%d.%d",
-			auto_dir, auto_file, (long)tv1.tv_sec, (long)tv1.tv_usec, rand(), ind );
+	for (ind = 0; ind < num_auto_files; ind++, num++) {
+		gettimeofday(&tv1, NULL);
+		sprintf((char *)filenames + (num * PATH_MAX),
+			"%s/%s%ld%ld%d.%d", auto_dir, auto_file,
+			(long)tv1.tv_sec, (long)tv1.tv_usec, rand(), ind);
 	}
 
 	/*
 	 * construct auto seq filenames
 	 */
-	for (ind=1; ind<=seq_auto_files; ind++, num++) {
-		sprintf((char *)filenames+(num*PATH_MAX), "%s/%s%d",
+	for (ind = 1; ind <= seq_auto_files; ind++, num++) {
+		sprintf((char *)filenames + (num * PATH_MAX), "%s/%s%d",
 			auto_dir, auto_file, ind);
 	}
 
 /**** end filename stuff ****/
 
-	if (time_iterval > 0)
-	{
+	if (time_iterval > 0) {
 		struct timeval ts;
-		gettimeofday(&ts,NULL);
-		start_time=ts.tv_sec;
+		gettimeofday(&ts, NULL);
+		start_time = ts.tv_sec;
 		//start_time=time(0);
 	}
 
@@ -1246,42 +1301,44 @@
 	 * get space for I/O buffer
 	 */
 	if (grow_incr) {
-		if ((Buffer=(char *)malloc(grow_incr+Alignment)) == NULL) {
-			fprintf(stderr, "%s%s: %d %s/%d: malloc(%d) failed: %s\n",
-				Progname, TagName, Pid, __FILE__, __LINE__, grow_incr, strerror(errno));
+		if ((Buffer = (char *)malloc(grow_incr + Alignment)) == NULL) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: malloc(%d) failed: %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				grow_incr, strerror(errno));
 			exit(1);
 		}
 		if (Alignment)
-		Buffer = Buffer + Alignment;
+			Buffer = Buffer + Alignment;
 
 	}
 
 	if (Debug > 2) {
 		printf("%s: %d DEBUG3 num_files = %d\n",
-			Progname, Pid, num_files);
+		       Progname, Pid, num_files);
 	}
-
 #ifndef linux
 	if (pre_alloc_space) {
 		if (iterations == 0) {
-		    fprintf(stderr, "%s%s: %d %s/%d: can NOT pre-alloc and grow forever\n",
-			Progname, TagName, Pid, __FILE__, __LINE__);
-		    exit(1);
+			fprintf(stderr,
+				"%s%s: %d %s/%d: can NOT pre-alloc and grow forever\n",
+				Progname, TagName, Pid, __FILE__, __LINE__);
+			exit(1);
 		}
 		if (Mode & MODE_RAND_SIZE) {
-		    fprintf(stderr,
-			"%s%s: %d %s/%d: can NOT pre-alloc and do random io size\n",
-			Progname, TagName, Pid, __FILE__, __LINE__);
-		    exit(1);
+			fprintf(stderr,
+				"%s%s: %d %s/%d: can NOT pre-alloc and do random io size\n",
+				Progname, TagName, Pid, __FILE__, __LINE__);
+			exit(1);
 		}
 
-		total_grow_value=grow_incr * iterations;
+		total_grow_value = grow_incr * iterations;
 
 		/*
 		 * attempt to limit
 		 */
 		if (bytes_to_consume && bytes_to_consume < total_grow_value) {
-			total_grow_value=bytes_to_consume;
+			total_grow_value = bytes_to_consume;
 		}
 	}
 #endif
@@ -1291,17 +1348,17 @@
 	 * delaysecs in clocks or usecs.
 	 * If on the CRAY, delaytime is in clocks since
 	 * _rtc() will be used, which does not have the overhead
-         * of gettimeofday(2).
+	 * of gettimeofday(2).
 	 */
 	if (delaysecs) {
 #if CRAY
-	   int hz;
-	   hz=sysconf(_SC_CLK_TCK);
-	   delaytime=(int)((float)hz * delaysecs);
+		int hz;
+		hz = sysconf(_SC_CLK_TCK);
+		delaytime = (int)((float)hz * delaysecs);
 #else
-	   delaytime=(int)((float)USECS_PER_SEC * delaysecs);
+		delaytime = (int)((float)USECS_PER_SEC * delaysecs);
 #endif
-        }
+	}
 
 	/*
 	 * This is the main iteration loop.
@@ -1309,202 +1366,228 @@
 	 * read to check the write, check the whole file,
 	 * truncated, and closed.
 	 */
-	for (Iter_cnt=1; ! stop ; Iter_cnt++) {
+	for (Iter_cnt = 1; !stop; Iter_cnt++) {
 		struct timeval ts;
-	    if (iterations && (Iter_cnt >= iterations+1)) {
-		strcpy(reason, "Hit iteration value");
-		stop=1;
-		continue;
-	    }
-		gettimeofday(&ts,NULL);
-	    if ((time_iterval > 0) && (start_time + time_iterval < ts.tv_sec)) {
-
-		sprintf(reason, "Hit time value of %d", time_iterval);
-		stop=1;
-		continue;
-	    }
-
-	    if (bytes_to_consume && bytes_consumed >= bytes_to_consume) {
-		sprintf(reason, "Hit bytes consumed value of %d", bytes_to_consume);
-		stop=1;
-                continue;
-            }
-
-	    /*
-	     * This loop will loop through all files.
-	     * Each iteration, a single file can  be opened, written to,
-	     * read to check the write, check the whole file,
-	     * truncated, and closed.
-	     */
-	    for (ind=0; ind<num_files; ind++) {
-
-		fflush(stdout);
-		fflush(stderr);
-
-		filename=(char *)filenames+(ind*PATH_MAX);
-		Fileinfo.filename=(char *)filenames+(ind*PATH_MAX);
-
-		if (open_flags ==  RANDOM_OPEN) {
-		   ret=Open_flags[random_range(0, sizeof(Open_flags)/sizeof(int)-1, 1, NULL)];
+		if (iterations && (Iter_cnt >= iterations + 1)) {
+			strcpy(reason, "Hit iteration value");
+			stop = 1;
+			continue;
 		}
+		gettimeofday(&ts, NULL);
+		if ((time_iterval > 0)
+		    && (start_time + time_iterval < ts.tv_sec)) {
 
-		else
-		   ret=open_flags;
-
-		Fileinfo.openflags=ret;
-
-		if (Debug > 3) {
-		    printf("%s: %d DEBUG3 %s/%d: %d Open filename = %s, open flags = %#o %s\n",
-			Progname, Pid, __FILE__, __LINE__, Iter_cnt, filename, ret,
-		        openflags2symbols(ret, ",", 0));
-		} else if (Debug > 2) {
-		    printf("%s: %d DEBUG3 %s/%d: %d filename = %s, open flags = %#o\n",
-			Progname, Pid, __FILE__, __LINE__, Iter_cnt, filename, ret);
-		}
-
-		/*
-		 * open file with desired flags.
-		 */
-		if ((fd=open(filename, ret, 0777)) == -1) {
-		    fprintf(stderr,
-                        "%s%s: %d %s/%d: open(%s, %#o, 0777) returned -1, errno:%d %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, filename, ret, errno, strerror(errno));
-			handle_error();
+			sprintf(reason, "Hit time value of %d", time_iterval);
+			stop = 1;
 			continue;
 		}
 
-		Fileinfo.fd=fd;
+		if (bytes_to_consume && bytes_consumed >= bytes_to_consume) {
+			sprintf(reason, "Hit bytes consumed value of %d",
+				bytes_to_consume);
+			stop = 1;
+			continue;
+		}
 
-		lkfile(fd, LOCK_EX, LKLVL1);   /* lock if lockfile is LKLVL1 */
+		/*
+		 * This loop will loop through all files.
+		 * Each iteration, a single file can  be opened, written to,
+		 * read to check the write, check the whole file,
+		 * truncated, and closed.
+		 */
+		for (ind = 0; ind < num_files; ind++) {
+
+			fflush(stdout);
+			fflush(stderr);
+
+			filename = (char *)filenames + (ind * PATH_MAX);
+			Fileinfo.filename =
+			    (char *)filenames + (ind * PATH_MAX);
+
+			if (open_flags == RANDOM_OPEN) {
+				ret =
+				    Open_flags[random_range
+					       (0,
+						sizeof(Open_flags) /
+						sizeof(int) - 1, 1, NULL)];
+			}
+
+			else
+				ret = open_flags;
+
+			Fileinfo.openflags = ret;
+
+			if (Debug > 3) {
+				printf
+				    ("%s: %d DEBUG3 %s/%d: %d Open filename = %s, open flags = %#o %s\n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     Iter_cnt, filename, ret,
+				     openflags2symbols(ret, ",", 0));
+			} else if (Debug > 2) {
+				printf
+				    ("%s: %d DEBUG3 %s/%d: %d filename = %s, open flags = %#o\n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     Iter_cnt, filename, ret);
+			}
+
+			/*
+			 * open file with desired flags.
+			 */
+			if ((fd = open(filename, ret, 0777)) == -1) {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: open(%s, %#o, 0777) returned -1, errno:%d %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, filename, ret, errno,
+					strerror(errno));
+				handle_error();
+				continue;
+			}
+
+			Fileinfo.fd = fd;
+
+			lkfile(fd, LOCK_EX, LKLVL1);	/* lock if lockfile is LKLVL1 */
 
 #ifndef linux
-		/*
-		 * preallocation is only done once, if specified.
-		 */
-		if (pre_alloc_space) {
-			if (pre_alloc(fd, total_grow_value) != 0) {
-				cleanup();
-				exit(2);
+			/*
+			 * preallocation is only done once, if specified.
+			 */
+			if (pre_alloc_space) {
+				if (pre_alloc(fd, total_grow_value) != 0) {
+					cleanup();
+					exit(2);
+				}
+				if (Debug > 1) {
+					printf
+					    ("%s: %d DEBUG2 %s/%d: pre_allocated %ld for file %s\n",
+					     Progname, Pid, __FILE__, __LINE__,
+					     total_grow_value, filename);
+				}
+				lkfile(fd, LOCK_UN, LKLVL1);	/* release lock */
+				close(fd);
+				Iter_cnt = 0;	/* reset outside loop to restart from one */
+				continue;
 			}
-			if (Debug > 1) {
-				printf("%s: %d DEBUG2 %s/%d: pre_allocated %ld for file %s\n",
-				    Progname, Pid, __FILE__, __LINE__, total_grow_value, filename);
-			}
-			lkfile(fd, LOCK_UN, LKLVL1);   /* release lock */
-			close(fd);
-			Iter_cnt=0;	/* reset outside loop to restart from one */
-			continue;
-		}
 #endif
 
-		/*
-		 * grow file by desired amount.
-		 * growfile() will set the Grow_incr variable and
-                 * possiblly update the Mode variable indicating
-		 * if we are dealing with a FIFO file.
-		 */
+			/*
+			 * grow file by desired amount.
+			 * growfile() will set the Grow_incr variable and
+			 * possiblly update the Mode variable indicating
+			 * if we are dealing with a FIFO file.
+			 */
 
-		/* BUG:14136 (don't go past ext2's filesize limit) */
-                curr_size = file_size(fd);
-		if (curr_size+grow_incr>=ext2_limit) {
-			lkfile(fd, LOCK_UN, LKLVL1);   /* release lock */
+			/* BUG:14136 (don't go past ext2's filesize limit) */
+			curr_size = file_size(fd);
+			if (curr_size + grow_incr >= ext2_limit) {
+				lkfile(fd, LOCK_UN, LKLVL1);	/* release lock */
+				close(fd);
+				sprintf(reason,
+					"Reached %ld filesize which is almost %ld limit.",
+					curr_size, ext2_limit);
+				stop = 1;
+				continue;
+			}
+
+			if (growfile(fd, filename, grow_incr, Buffer, &curr_size) != 0) {	/* BUG:14136 */
+				handle_error();
+				lkfile(fd, LOCK_UN, LKLVL1);	/* release lock */
+				close(fd);
+				continue;
+			}
+
+			/*
+			 * check if last write is not corrupted
+			 */
+			if (check_write(fd, write_check_inter, filename,
+					Mode) != 0) {
+				handle_error();
+			}
+
+			/*
+			 * Check that whole file is not corrupted.
+			 */
+			if (check_file(fd, file_check_inter, filename,
+				       no_file_check) != 0) {
+				handle_error();
+			}
+
+			/*
+			 * shrink file by desired amount if it is time
+			 */
+
+			if (shrinkfile
+			    (fd, filename, trunc_incr, trunc_inter,
+			     Mode) != 0) {
+				handle_error();
+			}
+
+			lkfile(fd, LOCK_UN, LKLVL1);	/* release lock */
+
+			if (Debug > 4)
+				printf
+				    ("%s: %d DEBUG5 %s/%d: %d Closing file %s fd:%d \n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     Iter_cnt, filename, fd);
 			close(fd);
-			sprintf(reason, "Reached %ld filesize which is almost %ld limit.",curr_size, ext2_limit);
-			stop=1;
-			continue;
-		}
 
-		if (growfile(fd, filename, grow_incr, Buffer, &curr_size) != 0) { /* BUG:14136 */
-			handle_error();
-			lkfile(fd, LOCK_UN, LKLVL1);   /* release lock */
-			close(fd);
-			continue;
-		}
+			/*
+			 * Unlink the file if that is desired
+			 */
+			if (unlink_inter && (Iter_cnt % unlink_inter == 0)) {
 
-		/*
-		 * check if last write is not corrupted
-		 */
-		if ( check_write(fd, write_check_inter, filename,
-							Mode) != 0 ) {
-		    handle_error();
-                }
+				if (Debug > 4)
+					printf
+					    ("%s: %d DEBUG5 %s/%d: %d Unlinking file %s\n",
+					     Progname, Pid, __FILE__, __LINE__,
+					     Iter_cnt, filename);
 
-		/*
-		 * Check that whole file is not corrupted.
-		 */
-		if ( check_file(fd, file_check_inter, filename,
-						no_file_check) != 0 ) {
-		    handle_error();
-		}
+				unlink(filename);
+			}
 
-		/*
-		 * shrink file by desired amount if it is time
-		 */
+			/*
+			 * delay while staying active for "delaysecs" seconds.
+			 */
+			if (delaytime) {
 
-		if (shrinkfile(fd, filename, trunc_incr, trunc_inter, Mode) != 0) {
-		    handle_error();
-		}
-
-		lkfile(fd, LOCK_UN, LKLVL1);   /* release lock */
-
-		if (Debug > 4)
-		    printf("%s: %d DEBUG5 %s/%d: %d Closing file %s fd:%d \n",
-			Progname, Pid, __FILE__, __LINE__, Iter_cnt, filename, fd);
-		close(fd);
-
-		/*
-		 * Unlink the file if that is desired
-		 */
-		if (unlink_inter && (Iter_cnt % unlink_inter == 0)) {
-
-		    if (Debug > 4)
-			printf("%s: %d DEBUG5 %s/%d: %d Unlinking file %s\n",
-			    Progname, Pid, __FILE__, __LINE__, Iter_cnt, filename);
-
-		    unlink(filename);
-		}
-
-	        /*
-	         * delay while staying active for "delaysecs" seconds.
-	         */
-	        if (delaytime) {
-
-		    int ct, end;
+				int ct, end;
 #ifdef CRAY
-		    ct=_rtc();
-		    end=ct+delaytime;
-        	    while (ct < end) {
-		        ct = _rtc();
-		    }
+				ct = _rtc();
+				end = ct + delaytime;
+				while (ct < end) {
+					ct = _rtc();
+				}
 #else
-		    struct timeval curtime;
-		    gettimeofday(&curtime, NULL);
-		    ct=curtime.tv_sec*USECS_PER_SEC + curtime.tv_usec;
-		    end=ct+delaytime;
-                    while (ct < end) {
+				struct timeval curtime;
+				gettimeofday(&curtime, NULL);
+				ct = curtime.tv_sec * USECS_PER_SEC +
+				    curtime.tv_usec;
+				end = ct + delaytime;
+				while (ct < end) {
 
-		        gettimeofday(&curtime, NULL);
-		        ct=curtime.tv_sec*USECS_PER_SEC + curtime.tv_usec;
-		    }
+					gettimeofday(&curtime, NULL);
+					ct = curtime.tv_sec * USECS_PER_SEC +
+					    curtime.tv_usec;
+				}
 #endif
-	        }
-	    }
+			}
+		}
 #ifndef linux
-	    /*
-	     * if Iter_cnt == 0, then we pre allocated space to all files
-	     * and we are starting outside loop over.  Set pre_alloc_space
-	     * to zero otherwise we get in infinite loop
-	     */
-	    if (Iter_cnt == 0) {
-		pre_alloc_space=0;
-	    }
+		/*
+		 * if Iter_cnt == 0, then we pre allocated space to all files
+		 * and we are starting outside loop over.  Set pre_alloc_space
+		 * to zero otherwise we get in infinite loop
+		 */
+		if (Iter_cnt == 0) {
+			pre_alloc_space = 0;
+		}
 #endif
 
-	}   /* end iteration for loop */
+	}			/* end iteration for loop */
 
-        if (Debug) {
-	    printf("%s%s: %d %s/%d: DONE %d iterations to %d files. %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, num_files, reason);
+	if (Debug) {
+		printf("%s%s: %d %s/%d: DONE %d iterations to %d files. %s\n",
+		       Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt,
+		       num_files, reason);
 	}
 	fflush(stdout);
 	fflush(stderr);
@@ -1513,98 +1596,104 @@
 
 	if (Errors) {
 		if (Debug > 2) {
-		    printf("%s%s: %d DEBUG3 %d error(s) encountered\n",
-			Progname, TagName, Pid, Errors);
-		    printf("%s%s: %d DEBUG3 %s/%d: exiting with value of 1\n", Progname, TagName, Pid, __FILE__, __LINE__);
+			printf("%s%s: %d DEBUG3 %d error(s) encountered\n",
+			       Progname, TagName, Pid, Errors);
+			printf
+			    ("%s%s: %d DEBUG3 %s/%d: exiting with value of 1\n",
+			     Progname, TagName, Pid, __FILE__, __LINE__);
 		}
 		exit(1);
 	}
 	if (Debug > 2) {
-	    printf("%s%s: %d DEBUG3 %s/%d: no errors, exiting with value of 0\n", Progname, TagName, Pid, __FILE__, __LINE__);
-    }
+		printf
+		    ("%s%s: %d DEBUG3 %s/%d: no errors, exiting with value of 0\n",
+		     Progname, TagName, Pid, __FILE__, __LINE__);
+	}
 
 	exit(0);
-	tst_exit();	/* to keep compiler happy */
+	tst_exit();		/* to keep compiler happy */
 }
 
 /***********************************************************************
  *
  ***********************************************************************/
-int
-set_sig(void)
+int set_sig(void)
 {
 	int sig;
 
-        /*
-         * now loop through all signals and set the handlers
-         */
+	/*
+	 * now loop through all signals and set the handlers
+	 */
 
-        for (sig = 1; sig < NSIG; sig++) {
-            switch (sig) {
-                case SIGKILL:
-                case SIGSTOP:
-                case SIGCONT:
+	for (sig = 1; sig < NSIG; sig++) {
+		switch (sig) {
+		case SIGKILL:
+		case SIGSTOP:
+		case SIGCONT:
 #ifdef CRAY
-                case SIGINFO:
-                case SIGRECOVERY:
+		case SIGINFO:
+		case SIGRECOVERY:
 #endif /* CRAY */
 #ifdef SIGCKPT
-	        case SIGCKPT:
+		case SIGCKPT:
 #endif /* SIGCKPT */
 #ifdef SIGRESTART
-	        case SIGRESTART:
+		case SIGRESTART:
 #endif /* SIGRESTART */
-                case SIGCLD:
-                    break;
+		case SIGCLD:
+			break;
 
-                default:
+		default:
 #ifdef sgi
-		    sigset( sig, sig_handler );
+			sigset(sig, sig_handler);
 #else
 /* linux and cray */
-                    signal(sig, sig_handler);
+			signal(sig, sig_handler);
 #endif
-                break;
-            }
-        } /* endfor */
+			break;
+		}
+	}			/* endfor */
 
-      return 0;
+	return 0;
 }
 
 /***********************************************************************
  *
  ***********************************************************************/
-void
-sig_handler(int sig)
+void sig_handler(int sig)
 {
-    int exit_stat = 2;
+	int exit_stat = 2;
 
-    if (sig == SIGUSR2) {
-	fprintf(stdout, "%s%s: %d %s/%d: received SIGUSR2 (%d) - stopping.\n",
-	    Progname, TagName, Pid, __FILE__, __LINE__, sig);
+	if (sig == SIGUSR2) {
+		fprintf(stdout,
+			"%s%s: %d %s/%d: received SIGUSR2 (%d) - stopping.\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, sig);
 #ifndef sgi
-        signal(sig, sig_handler);	/* allow us to get this signal more than once */
+		signal(sig, sig_handler);	/* allow us to get this signal more than once */
 #endif
 
-    } else if (sig == SIGINT) {
-	/* The user has told us to cleanup, don't pretend it's an error. */
-	exit_stat=0;
-	if (Debug != 0) {
-		fprintf(stderr, "%s%s: %d %s/%d: received unexpected signal: %d\n", Progname, TagName,
-		    Pid, __FILE__, __LINE__, sig);
+	} else if (sig == SIGINT) {
+		/* The user has told us to cleanup, don't pretend it's an error. */
+		exit_stat = 0;
+		if (Debug != 0) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: received unexpected signal: %d\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				sig);
+		}
+	} else {
+		fprintf(stderr,
+			"%s%s: %d %s/%d: received unexpected signal: %d\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, sig);
 	}
-    } else {
-	fprintf(stderr, "%s%s: %d %s/%d: received unexpected signal: %d\n", Progname, TagName,
-	    Pid, __FILE__, __LINE__, sig);
-    }
 
-    notify_others();
-    cleanup();
-    if (Debug > 2) {
-	printf("%s%s: %d DEBUG3 %s/%d: Exiting with a value of %d\n",
-	       Progname, TagName, Pid, __FILE__, __LINE__, exit_stat);
-    }
-    exit(exit_stat);
+	notify_others();
+	cleanup();
+	if (Debug > 2) {
+		printf("%s%s: %d DEBUG3 %s/%d: Exiting with a value of %d\n",
+		       Progname, TagName, Pid, __FILE__, __LINE__, exit_stat);
+	}
+	exit(exit_stat);
 }
 
 /***********************************************************************
@@ -1612,32 +1701,34 @@
  * telling them to stop.
  *
  ***********************************************************************/
-static void
-notify_others(void)
+static void notify_others(void)
 {
-    static int send_signals = 0;
-    int ind;
+	static int send_signals = 0;
+	int ind;
 
-    if (Sync_with_others && send_signals == 0) {
+	if (Sync_with_others && send_signals == 0) {
 
 #if CRAY
-	send_signals=1; /* only send signals once */
-	if (Debug > 1)
-	    printf("%s%s: %d DEBUG2 %s/%d: Sending SIGUSR2 to pgrp\n",
-		  Progname, TagName, Pid, __FILE__, __LINE__);
-	killm(C_PGRP, getpgrp(), SIGUSR2);
+		send_signals = 1;	/* only send signals once */
+		if (Debug > 1)
+			printf
+			    ("%s%s: %d DEBUG2 %s/%d: Sending SIGUSR2 to pgrp\n",
+			     Progname, TagName, Pid, __FILE__, __LINE__);
+		killm(C_PGRP, getpgrp(), SIGUSR2);
 #else
-	send_signals=1; /* only send signals once */
+		send_signals = 1;	/* only send signals once */
 
-        for (ind=0; ind< Forker_npids; ind++) {
-	    if (Forker_pids[ind] != Pid)
-	        if (Debug > 1)
-		    printf("%s%s: %d DEBUG2 %s/%d: Sending SIGUSR2 to pid %d\n",
-		        Progname, TagName, Pid, __FILE__, __LINE__, Forker_pids[ind]);
-	        kill(Forker_pids[ind], SIGUSR2);
-        }
+		for (ind = 0; ind < Forker_npids; ind++) {
+			if (Forker_pids[ind] != Pid)
+				if (Debug > 1)
+					printf
+					    ("%s%s: %d DEBUG2 %s/%d: Sending SIGUSR2 to pid %d\n",
+					     Progname, TagName, Pid, __FILE__,
+					     __LINE__, Forker_pids[ind]);
+			kill(Forker_pids[ind], SIGUSR2);
+		}
 #endif
-    }
+	}
 
 }
 
@@ -1646,86 +1737,85 @@
  * This function will call upanic if wanted or cleanup and
  * and exit is Maxerrs were encountered.
  ***********************************************************************/
-int
-handle_error(void)
+int handle_error(void)
 {
-    Errors++;
+	Errors++;
 
 #ifdef CRAY
-    if (Errors & Upanic_on_error) {
-        upanic(PA_PANIC);
-    }
+	if (Errors & Upanic_on_error) {
+		upanic(PA_PANIC);
+	}
 #endif
 
-    if (Maxerrs && Errors >= Maxerrs) {
-	printf("%s%s: %d %s/%d: %d Hit max errors value of %d\n",
-	    Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, Maxerrs);
-	notify_others();
-	cleanup();
+	if (Maxerrs && Errors >= Maxerrs) {
+		printf("%s%s: %d %s/%d: %d Hit max errors value of %d\n",
+		       Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt,
+		       Maxerrs);
+		notify_others();
+		cleanup();
 
-        if (Debug > 2) {
-            printf("%s%s: %d DEBUG3 %d error(s) encountered\n",
-                        Progname, TagName, Pid, Errors);
-            printf("%s%s: %d DEBUG3 %s/%d: exiting with value of 1\n", Progname, TagName, Pid, __FILE__, __LINE__);
-        }
+		if (Debug > 2) {
+			printf("%s%s: %d DEBUG3 %d error(s) encountered\n",
+			       Progname, TagName, Pid, Errors);
+			printf
+			    ("%s%s: %d DEBUG3 %s/%d: exiting with value of 1\n",
+			     Progname, TagName, Pid, __FILE__, __LINE__);
+		}
 
-	exit(1);
-    }
-
-  return 0;
-}
-
-/***********************************************************************
- *
- ***********************************************************************/
-int
-cleanup(void)
-{
-	int ind;
-
-	if (remove_files) {
-	    if (Debug > 2)
-		printf("%s: %d DEBUG3 Removing all %d files\n",
-		    Progname, Pid, num_files);
-	    for (ind=0; ind<=num_files; ind++) {
-		unlink(filenames+(ind*PATH_MAX));
-	    }
+		exit(1);
 	}
-	if (using_random && Debug > 1)
-	    printf("%s%s: %d DEBUG2 Used random seed: %d\n",
-		Progname, TagName, Pid, Seed);
+
 	return 0;
 }
 
 /***********************************************************************
  *
  ***********************************************************************/
-void
-usage(void)
+int cleanup(void)
 {
-	fprintf(stderr,
-	"Usage: %s%s [-bhEluy][[-g grow_incr][-i num][-t trunc_incr][-T trunc_inter]\n",
-	Progname, TagName );
-	fprintf(stderr,
-	"[-d auto_dir][-e maxerrs][-f auto_file][-N num_files][-w][-c chk_inter][-D debug]\n");
-	fprintf(stderr,
-	"[-s seed][-S seq_auto_files][-p][-P PANIC][-I io_type][-o open_flags][-B maxbytes]\n");
-	fprintf(stderr,
-	"[-r iosizes][-R lseeks][-U unlk_inter][-W tagname] [files]\n");
+	int ind;
 
-	return;
-
-}	/* end of usage */
+	if (remove_files) {
+		if (Debug > 2)
+			printf("%s: %d DEBUG3 Removing all %d files\n",
+			       Progname, Pid, num_files);
+		for (ind = 0; ind <= num_files; ind++) {
+			unlink(filenames + (ind * PATH_MAX));
+		}
+	}
+	if (using_random && Debug > 1)
+		printf("%s%s: %d DEBUG2 Used random seed: %d\n",
+		       Progname, TagName, Pid, Seed);
+	return 0;
+}
 
 /***********************************************************************
  *
  ***********************************************************************/
-void
-help(void)
+void usage(void)
+{
+	fprintf(stderr,
+		"Usage: %s%s [-bhEluy][[-g grow_incr][-i num][-t trunc_incr][-T trunc_inter]\n",
+		Progname, TagName);
+	fprintf(stderr,
+		"[-d auto_dir][-e maxerrs][-f auto_file][-N num_files][-w][-c chk_inter][-D debug]\n");
+	fprintf(stderr,
+		"[-s seed][-S seq_auto_files][-p][-P PANIC][-I io_type][-o open_flags][-B maxbytes]\n");
+	fprintf(stderr,
+		"[-r iosizes][-R lseeks][-U unlk_inter][-W tagname] [files]\n");
+
+	return;
+
+}				/* end of usage */
+
+/***********************************************************************
+ *
+ ***********************************************************************/
+void help(void)
 {
 	usage();
 
-fprintf(stdout, "\
+	fprintf(stdout, "\
   -h             Specfied to print this help and exit.\n\
   -b             Specfied to execute in sync mode.(def async mode)\n\
   -B maxbytes    Max bytes to consume by all files.  growfiles exits when more\n\
@@ -1783,54 +1873,55 @@
 /***********************************************************************
  *
  ***********************************************************************/
-void
-prt_examples(FILE *stream)
+void prt_examples(FILE * stream)
 {
 	/* This example creates 200 files in directory dir1.  It writes */
 	/* 4090 bytes 100 times then truncates 408990 bytes off the file */
 	/* The file contents are checked every 1000 grow. */
-    fprintf(stream,
-	 "# run forever: writes of 4090 bytes then on every 100 iterval\n\
+	fprintf(stream,
+		"# run forever: writes of 4090 bytes then on every 100 iterval\n\
 # truncate file by 408990 bytes.  Done to 200 files in dir1.\n\
-%s -i 0 -g 4090 -T 100 -t 408990 -l -C 10 -c 1000 -d dir1 -S 200\n\n", Progname);
+%s -i 0 -g 4090 -T 100 -t 408990 -l -C 10 -c 1000 -d dir1 -S 200\n\n",
+		Progname);
 
 	/* same as above with 5000 byte grow and a 499990 byte tuncate */
-    fprintf(stream,
-	 "# same as above with writes of 5000 bytes and truncs of 499990\n\
-%s -i 0 -g 5000 -T 100 -t 499990 -l -C 10 -c 1000 -d dir2 -S 200\n\n", Progname);
+	fprintf(stream,
+		"# same as above with writes of 5000 bytes and truncs of 499990\n\
+%s -i 0 -g 5000 -T 100 -t 499990 -l -C 10 -c 1000 -d dir2 -S 200\n\n",
+		Progname);
 
 	/* This example beats on opens and closes */
-    fprintf(stream,
-	 "# runs forever: beats on opens and closes of file ocfile - no io\n\
-%s -i 0 -g 0 -c 0 -C 0 ocfile\n\n", Progname);
+	fprintf(stream,
+		"# runs forever: beats on opens and closes of file ocfile - no io\n\
+%s -i 0 -g 0 -c 0 -C 0 ocfile\n\n",
+		Progname);
 
-    fprintf(stream,
-	 "# writes 4096 to files until 50 blocks are written\n\
+	fprintf(stream, "# writes 4096 to files until 50 blocks are written\n\
 %s -i 0 -g 4096 -B 50b file1 file2\n\n", Progname);
 
-    fprintf(stream,
-	 "# write one byte to 750 files in gdir then unlinks them\n\
+	fprintf(stream,
+		"# write one byte to 750 files in gdir then unlinks them\n\
 %s -g 1 -C 0 -d gdir -u -S 750\n\n", Progname);
 
-    fprintf(stream,
-	"# run 30 secs: random iosize, random lseek up to eof\n\
+	fprintf(stream, "# run 30 secs: random iosize, random lseek up to eof\n\
 %s -r 1-5000 -R 0--1 -i 0 -L 30 -C 1 g_rand1 g_rand2\n\n", Progname);
 
-    fprintf(stream,
-	"# run 30 secs: grow by lseek then write single byte, trunc every 10 itervals\n\
-%s -g 5000 -wlu -i 0 -L 30 -C 1 -T 10  g_sleek1 g_lseek2\n\n", Progname);
+	fprintf(stream,
+		"# run 30 secs: grow by lseek then write single byte, trunc every 10 itervals\n\
+%s -g 5000 -wlu -i 0 -L 30 -C 1 -T 10  g_sleek1 g_lseek2\n\n",
+		Progname);
 
-    fprintf(stream,
-	"# run forever: 5 copies of random iosize, random lseek to beyond eof,\n\
+	fprintf(stream,
+		"# run forever: 5 copies of random iosize, random lseek to beyond eof,\n\
 # rand io types doing a trunc every 5 iterations, with unlinks.\n\
 %s -i0 -r 1-50000 -R 0--2 -I r -C1 -l -n5 -u -U 100-200 gf_rana gf_ranb\n\n",
-	    Progname);
+		Progname);
 
-    fprintf(stream,
-	"# run forever: 5 copies of random iosize, random lseek to beyond eof,\n\
+	fprintf(stream,
+		"# run forever: 5 copies of random iosize, random lseek to beyond eof,\n\
 # random open flags, rand io types doing a trunc every 10 iterations.\n\
 %s -i0 -r 1-50000 -R 0--2 -o random -I r -C0 -l -T 20 -uU100-200 -n 5 gf_rand1 gf_rand2\n",
-	    Progname);
+		Progname);
 
 	return;
 }
@@ -1842,96 +1933,109 @@
  * Woffset will be set to the offset before the write.
  * Grow_incr will be set to the size of the write or lseek write.
  ***********************************************************************/
-int	/* BUG:14136 */
-growfile(int fd, char *file, int grow_incr, char *buf,
-	unsigned long *curr_size_ptr)
+int /* BUG:14136 */ growfile(int fd, char *file, int grow_incr, char *buf,
+			     unsigned long *curr_size_ptr)
 {
-   off_t noffset;
-   int ret;
-   int cur_offset;
-   char *errmsg;
-   off_t fsize;		/* current size of file */
-   int size_grew;	/* size the file grew */
-   struct stat stbuf;
-   off_t off_tmp = 0;
+	off_t noffset;
+	int ret;
+	int cur_offset;
+	char *errmsg;
+	off_t fsize;		/* current size of file */
+	int size_grew;		/* size the file grew */
+	struct stat stbuf;
+	off_t off_tmp = 0;
 
-        /*
-         * Do a stat on the open file.
-         * If the file is a fifo, set the bit in Mode variable.
-         * This fifo check must be done prior to growfile() returning.
+	/*
+	 * Do a stat on the open file.
+	 * If the file is a fifo, set the bit in Mode variable.
+	 * This fifo check must be done prior to growfile() returning.
 	 * Also get the current size of the file.
-         */
-        if (fstat(fd, &stbuf) != -1) {
-            if (S_ISFIFO(stbuf.st_mode)) {
-		Fileinfo.mode |= MODE_FIFO;
-                Mode |= MODE_FIFO;
-                if (Debug > 3)
-                    printf("%s: %d DEBUG4 %s/%d: file is a fifo - no lseek or truncs,\n",
-                        Progname, Pid, __FILE__, __LINE__);
-            }
-	    fsize = stbuf.st_size;
+	 */
+	if (fstat(fd, &stbuf) != -1) {
+		if (S_ISFIFO(stbuf.st_mode)) {
+			Fileinfo.mode |= MODE_FIFO;
+			Mode |= MODE_FIFO;
+			if (Debug > 3)
+				printf
+				    ("%s: %d DEBUG4 %s/%d: file is a fifo - no lseek or truncs,\n",
+				     Progname, Pid, __FILE__, __LINE__);
+		}
+		fsize = stbuf.st_size;
 
-        } else {
-	    fprintf(stderr, "%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, fd, errno, strerror(errno));
+	} else {
+		fprintf(stderr,
+			"%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, fd, errno,
+			strerror(errno));
 
-	    return -1;
+		return -1;
 	}
 
-        if (grow_incr <= 0) {   /* don't attempt i/o if grow_incr <= 0 */
+	if (grow_incr <= 0) {	/* don't attempt i/o if grow_incr <= 0 */
 
-	    Grow_incr=grow_incr;
-	    if (Debug > 2)
-		printf("%s: %d DEBUG3 %s/%d: Not attempting to grow, growsize == %d\n",
-		    Progname, Pid, __FILE__, __LINE__, grow_incr);
-	    return grow_incr;
+		Grow_incr = grow_incr;
+		if (Debug > 2)
+			printf
+			    ("%s: %d DEBUG3 %s/%d: Not attempting to grow, growsize == %d\n",
+			     Progname, Pid, __FILE__, __LINE__, grow_incr);
+		return grow_incr;
 	}
 
 	if (Mode & MODE_RAND_SIZE) {
-	    grow_incr=random_range(min_size, max_size, mult_size, &errmsg);
-	    if (errmsg != NULL) {
-		fprintf(stderr, "%s%s: %d %s/%d: random_range() failed - %s\n", Progname, TagName, Pid, __FILE__, __LINE__, errmsg);
-		return -1;
-	    }
-	    Grow_incr=grow_incr;
-	}
-	else
-	    Grow_incr=grow_incr;
+		grow_incr =
+		    random_range(min_size, max_size, mult_size, &errmsg);
+		if (errmsg != NULL) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: random_range() failed - %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				errmsg);
+			return -1;
+		}
+		Grow_incr = grow_incr;
+	} else
+		Grow_incr = grow_incr;
 
-	if (! (Mode & MODE_FIFO)) {
-	    if ((cur_offset=lseek(fd,0,SEEK_CUR)) == -1) {
-	        fprintf(stderr, "%s%s: %d %s/%d: tell failed: %s\n",
-		    Progname, TagName, Pid, __FILE__, __LINE__, strerror(errno));
-	        return -1;
-	    }
-        }
+	if (!(Mode & MODE_FIFO)) {
+		if ((cur_offset = lseek(fd, 0, SEEK_CUR)) == -1) {
+			fprintf(stderr, "%s%s: %d %s/%d: tell failed: %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				strerror(errno));
+			return -1;
+		}
+	}
 
 	if (Mode & MODE_GROW_BY_LSEEK) {
-                Woffset=fsize;
+		Woffset = fsize;
 		if (Debug > 2) {
-		    printf("%s: %d DEBUG3 %s/%d: Current size of file is %ld\n",
-			    Progname, Pid, __FILE__, __LINE__, (long)Woffset);
-		    printf("%s: %d DEBUG3 %s/%d: lseeking to %d byte with SEEK_END\n", Progname,
-			Pid, __FILE__, __LINE__, grow_incr-1);
+			printf
+			    ("%s: %d DEBUG3 %s/%d: Current size of file is %ld\n",
+			     Progname, Pid, __FILE__, __LINE__, (long)Woffset);
+			printf
+			    ("%s: %d DEBUG3 %s/%d: lseeking to %d byte with SEEK_END\n",
+			     Progname, Pid, __FILE__, __LINE__, grow_incr - 1);
 		}
 
-		if ((noffset=lseek(fd, grow_incr-1, SEEK_END)) == -1) {
-			fprintf(stderr, "%s%s: %s/%d: lseek(fd, %d, SEEK_END) failed: %s\n",
-				Progname, TagName, __FILE__, __LINE__, grow_incr-1, strerror(errno));
+		if ((noffset = lseek(fd, grow_incr - 1, SEEK_END)) == -1) {
+			fprintf(stderr,
+				"%s%s: %s/%d: lseek(fd, %d, SEEK_END) failed: %s\n",
+				Progname, TagName, __FILE__, __LINE__,
+				grow_incr - 1, strerror(errno));
 			return -1;
 		}
 
-		lkfile(fd, LOCK_EX, LKLVL0);	 /* get exclusive lock */
+		lkfile(fd, LOCK_EX, LKLVL0);	/* get exclusive lock */
 
 #if NEWIO
-		ret=lio_write_buffer(fd, io_type, "w", 1, SIGUSR1, &errmsg,0);
+		ret =
+		    lio_write_buffer(fd, io_type, "w", 1, SIGUSR1, &errmsg, 0);
 #else
-		ret=write_buffer(fd, io_type, "w", 1, 0, &errmsg);
+		ret = write_buffer(fd, io_type, "w", 1, 0, &errmsg);
 #endif
 
 		if (ret != 1) {
 			fprintf(stderr, "%s%s: %d %s/%d: %d %s\n",
-			    Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				Iter_cnt, errmsg);
 			if (ret == -ENOSPC) {
 				cleanup();
 				exit(2);
@@ -1943,124 +2047,136 @@
 
 		lkfile(fd, LOCK_UN, LKLVL0);
 
-                if (Debug > 2)
-                    printf("%s: %d DEBUG3 %s/%d: %d wrote 1 byte to file\n",
-                            Progname, Pid, __FILE__, __LINE__, Iter_cnt);
+		if (Debug > 2)
+			printf("%s: %d DEBUG3 %s/%d: %d wrote 1 byte to file\n",
+			       Progname, Pid, __FILE__, __LINE__, Iter_cnt);
 
-	} else {  /* end of grow by lseek */
+	} else {		/* end of grow by lseek */
 
 		if (Fileinfo.openflags & O_APPEND) {
-		   /*
-		    * Deal with special case of the open flag containing O_APPEND.
-		    * If it does, the current offset does not matter since the write
-		    * will be done end of the file.
-		    */
-		    if (Debug > 4)
-			printf("%s: %d DEBUG5 %s/%d: dealing with O_APPEND condition\n",
-			    Progname, Pid, __FILE__, __LINE__ );
-		    lkfile(fd, LOCK_EX, LKLVL0);	 /* get exclusive lock */
+			/*
+			 * Deal with special case of the open flag containing O_APPEND.
+			 * If it does, the current offset does not matter since the write
+			 * will be done end of the file.
+			 */
+			if (Debug > 4)
+				printf
+				    ("%s: %d DEBUG5 %s/%d: dealing with O_APPEND condition\n",
+				     Progname, Pid, __FILE__, __LINE__);
+			lkfile(fd, LOCK_EX, LKLVL0);	/* get exclusive lock */
 
-		    /*
-		     * do fstat again to get size of the file.
-		     * This is done inside a file lock (if locks are being used).
-		     */
-        	    if (fstat(fd, &stbuf) != -1) {
-            		Woffset = stbuf.st_size;
-        	    } else {
-            		fprintf(stderr, "%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
-                	Progname, TagName, Pid, __FILE__, __LINE__, fd, errno, strerror(errno));
+			/*
+			 * do fstat again to get size of the file.
+			 * This is done inside a file lock (if locks are being used).
+			 */
+			if (fstat(fd, &stbuf) != -1) {
+				Woffset = stbuf.st_size;
+			} else {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, fd, errno, strerror(errno));
 
-			lkfile(fd, LOCK_UN, LKLVL0);     /* release lock */
-            		return -1;
-        	    }
-		    if (Debug > 2)
-			printf("%s: %d DEBUG3 %s/%d: dealing with O_APPEND condition (offset:fsz:%d)\n",
-			    Progname, Pid, __FILE__, __LINE__, (int)stbuf.st_size);
+				lkfile(fd, LOCK_UN, LKLVL0);	/* release lock */
+				return -1;
+			}
+			if (Debug > 2)
+				printf
+				    ("%s: %d DEBUG3 %s/%d: dealing with O_APPEND condition (offset:fsz:%d)\n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     (int)stbuf.st_size);
 
 		} else if (Mode & MODE_RAND_LSEEK) {
-                   if (max_lseek == LSK_EOF) {	/* within file size */
-                        noffset=random_range(min_lseek, fsize, 1, NULL);
-                   }
-		   else if (max_lseek == LSK_EOFPLUSGROW) {
-		        /* max to beyond file size */
-			noffset=random_range(min_lseek, fsize+grow_incr, 1, NULL);
-		   }
-		   else if (max_lseek == LSK_EOFMINUSGROW) {
-		        /*
-			 * Attempt to not grow the file.
-			 * If the i/o will fit from min_lseek to EOF,
-			 * pick offset to allow it to fit.
-			 * Otherwise, pick the min_lseek offset and grow
-			 * file by smallest amount.
-			 * If min_lseek is != 0, there will be a problem
-			 * with whole file checking if file is ever smaller
-			 * than min_lseek.
-			 */
-			if (fsize <= min_lseek + grow_incr)
-			    noffset=min_lseek;  /* file will still grow */
-			else
-			    noffset=random_range(min_lseek, fsize-grow_incr, 1, NULL);
-		   }
-                   else {
-                        noffset=random_range(min_lseek, max_lseek, 1, NULL);
-                   }
+			if (max_lseek == LSK_EOF) {	/* within file size */
+				noffset =
+				    random_range(min_lseek, fsize, 1, NULL);
+			} else if (max_lseek == LSK_EOFPLUSGROW) {
+				/* max to beyond file size */
+				noffset =
+				    random_range(min_lseek, fsize + grow_incr,
+						 1, NULL);
+			} else if (max_lseek == LSK_EOFMINUSGROW) {
+				/*
+				 * Attempt to not grow the file.
+				 * If the i/o will fit from min_lseek to EOF,
+				 * pick offset to allow it to fit.
+				 * Otherwise, pick the min_lseek offset and grow
+				 * file by smallest amount.
+				 * If min_lseek is != 0, there will be a problem
+				 * with whole file checking if file is ever smaller
+				 * than min_lseek.
+				 */
+				if (fsize <= min_lseek + grow_incr)
+					noffset = min_lseek;	/* file will still grow */
+				else
+					noffset =
+					    random_range(min_lseek,
+							 fsize - grow_incr, 1,
+							 NULL);
+			} else {
+				noffset =
+				    random_range(min_lseek, max_lseek, 1, NULL);
+			}
 
-		   if ((Woffset=lseek(fd, noffset, SEEK_SET)) == -1) {
-                        fprintf(stderr, "%s%s: %d %s/%d: lseek(%d, %ld, "
-				"SEEK_SET) l2 failed: %s\n",
-                                Progname, TagName, Pid, __FILE__, __LINE__,
-				fd, (long)noffset, strerror(errno));
-                        return -1;
-		   }
-                   else if (Debug > 2)
-                        printf("%s: %d DEBUG3 %s/%d: lseeked to "
-				"random offset %ld (fsz:%d)\n",
-                            Progname, Pid, __FILE__, __LINE__,
-			    (long)Woffset, (int)stbuf.st_size);
+			if ((Woffset = lseek(fd, noffset, SEEK_SET)) == -1) {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: lseek(%d, %ld, "
+					"SEEK_SET) l2 failed: %s\n", Progname,
+					TagName, Pid, __FILE__, __LINE__, fd,
+					(long)noffset, strerror(errno));
+				return -1;
+			} else if (Debug > 2)
+				printf("%s: %d DEBUG3 %s/%d: lseeked to "
+				       "random offset %ld (fsz:%d)\n",
+				       Progname, Pid, __FILE__, __LINE__,
+				       (long)Woffset, (int)stbuf.st_size);
 
-                }
+		}
 
 		/*
 		 * lseek to end of file only if not fifo
 		 */
-		else if (! (Mode & MODE_FIFO)) {
-		    if ((Woffset=lseek(fd, 0, SEEK_END)) == -1) {
-			fprintf(stderr, "%s%s: %d %s/%d: lseek(fd, 0, SEEK_END) failed: %s\n",
-				Progname, TagName, Pid, __FILE__, __LINE__, strerror(errno));
-			return -1;
-		    }
-                    else if (Debug > 2)
-                        printf("%s: %d DEBUG3 %s/%d: lseeked to "
-				"end of file, offset %ld\n",
-                            Progname, Pid, __FILE__, __LINE__, (long)Woffset);
+		else if (!(Mode & MODE_FIFO)) {
+			if ((Woffset = lseek(fd, 0, SEEK_END)) == -1) {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: lseek(fd, 0, SEEK_END) failed: %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, strerror(errno));
+				return -1;
+			} else if (Debug > 2)
+				printf("%s: %d DEBUG3 %s/%d: lseeked to "
+				       "end of file, offset %ld\n",
+				       Progname, Pid, __FILE__, __LINE__,
+				       (long)Woffset);
 		}
 
 		if (Pattern == PATTERN_OFFSET)
-		    datapidgen(STATIC_NUM, buf, grow_incr, Woffset);
+			datapidgen(STATIC_NUM, buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_PID)
-		    datapidgen(Pid, buf, grow_incr, Woffset);
+			datapidgen(Pid, buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_ASCII)
-		    dataasciigen(NULL, buf, grow_incr, Woffset);
+			dataasciigen(NULL, buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_RANDOM)
-		    databingen('r', buf, grow_incr, Woffset);
+			databingen('r', buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_ALT)
-		    databingen('a', buf, grow_incr, Woffset);
+			databingen('a', buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_CHKER)
-		    databingen('c', buf, grow_incr, Woffset);
+			databingen('c', buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_CNTING)
-		    databingen('C', buf, grow_incr, Woffset);
+			databingen('C', buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_ZEROS)
-		    databingen('z', buf, grow_incr, Woffset);
+			databingen('z', buf, grow_incr, Woffset);
 		else if (Pattern == PATTERN_ONES)
-		    databingen('o', buf, grow_incr, Woffset);
+			databingen('o', buf, grow_incr, Woffset);
 		else
-		    dataasciigen(NULL, buf, grow_incr, Woffset);
+			dataasciigen(NULL, buf, grow_incr, Woffset);
 
 		if (Debug > 2)
-		    printf("%s: %d DEBUG3 %s/%d: attempting to write %d bytes\n",
-			Progname, Pid, __FILE__, __LINE__, grow_incr);
+			printf
+			    ("%s: %d DEBUG3 %s/%d: attempting to write %d bytes\n",
+			     Progname, Pid, __FILE__, __LINE__, grow_incr);
 
-		lkfile(fd, LOCK_EX, LKLVL0);	 /* get exclusive lock */
+		lkfile(fd, LOCK_EX, LKLVL0);	/* get exclusive lock */
 
 /*****
 		ret=write(fd, buf, grow_incr);
@@ -2077,10 +2193,10 @@
 *****/
 
 #if NEWIO
-		ret=lio_write_buffer(fd, io_type, buf, grow_incr,
-			 SIGUSR1, &errmsg,0);
+		ret = lio_write_buffer(fd, io_type, buf, grow_incr,
+				       SIGUSR1, &errmsg, 0);
 #else
-		ret=write_buffer(fd, io_type, buf, grow_incr, 0, &errmsg);
+		ret = write_buffer(fd, io_type, buf, grow_incr, 0, &errmsg);
 #endif
 
 		if (Mode & MODE_FIFO) {
@@ -2088,11 +2204,12 @@
 			 * offset is where we think it should be.
 			 */
 			off_tmp = Woffset + grow_incr;
-		}
-		else{
-			if ((off_tmp = lseek(fd,0,SEEK_CUR)) < 0) { /* get offset after the write */
-				fprintf(stderr, "%s%s: %s/%d: tell(2) failed: %d  %s\n",
-					Progname, TagName, __FILE__, __LINE__, errno, strerror(errno) );
+		} else {
+			if ((off_tmp = lseek(fd, 0, SEEK_CUR)) < 0) {	/* get offset after the write */
+				fprintf(stderr,
+					"%s%s: %s/%d: tell(2) failed: %d  %s\n",
+					Progname, TagName, __FILE__, __LINE__,
+					errno, strerror(errno));
 				return -1;
 			}
 #if NEWIO
@@ -2103,11 +2220,19 @@
 			 * unspecified--which means we cannot trust what
 			 * tell() told us.  Fudge it here.
 			 */
-			if ((io_type & LIO_IO_ASYNC_TYPES) || (io_type & LIO_RANDOM)) {
+			if ((io_type & LIO_IO_ASYNC_TYPES)
+			    || (io_type & LIO_RANDOM)) {
 				if (off_tmp != Woffset + grow_incr) {
 					if (Debug > 5) {
-						printf("%s: %d DEBUG6 %s/%d: posix fudge, forcing tmp (%"PRId64") to match Woffset+grow_incr (%"PRId64")\n",
-						       Progname, Pid, __FILE__, __LINE__, (int64_t)off_tmp, (int64_t)Woffset+grow_incr);
+						printf
+						    ("%s: %d DEBUG6 %s/%d: posix fudge, forcing tmp (%"
+						     PRId64
+						     ") to match Woffset+grow_incr (%"
+						     PRId64 ")\n", Progname,
+						     Pid, __FILE__, __LINE__,
+						     (int64_t) off_tmp,
+						     (int64_t) Woffset +
+						     grow_incr);
 					}
 					off_tmp = Woffset + grow_incr;
 				}
@@ -2121,7 +2246,8 @@
 
 		if (ret != grow_incr) {
 			fprintf(stderr, "%s%s: %d %s/%d: %d %s\n",
-			    Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				Iter_cnt, errmsg);
 			if (ret == -ENOSPC) {
 				cleanup();
 				exit(2);
@@ -2134,68 +2260,73 @@
 		 * the write.
 		 */
 		if (off_tmp != Woffset + grow_incr) {
-		    /*
-		     * The offset after the write was not as expected.
-		     * This could be caused by the following:
-		     *  - file truncated after the lseek and before the write.
-		     *  - the file was written to after fstat and before the write
-		     *    and the file was opened with O_APPEND.
-		     *
-		     * The pattern written to the file will be considered corrupted.
-		     */
-		    if (Debug > 0 && lockfile) {
-		        printf("%s%s: %d DEBUG1 %s/%d: offset after "
-				"write(%ld) not as exp(%ld+%d=%ld)\n",
-			    Progname, TagName, Pid, __FILE__, __LINE__,
-			    (long)off_tmp, (long)Woffset, grow_incr,
-			    (long)(Woffset + grow_incr));
-			printf("%s%s: %d DEBUG1 %s/%d: %d Assuming file "
-				"changed by another process, resetting "
-				"offset:%ld (expect pattern mismatch)\n",
-				Progname, TagName, Pid, __FILE__, __LINE__,
-				Iter_cnt, (long)(off_tmp - grow_incr));
-		    }
-		    if (Debug > 4) {
-			printf("%s: %d DEBUG5 %s/%d: about to chop Woffset.  "
-				"tmp=%ld, grow_incr=%d, Woffset was %ld\n",
-			       Progname, Pid, __FILE__, __LINE__,
-			       (long)off_tmp, grow_incr, (long)Woffset);
-		    }
-		    Woffset = off_tmp - grow_incr;
-		    if (Woffset < 0)
-			Woffset = 0;
+			/*
+			 * The offset after the write was not as expected.
+			 * This could be caused by the following:
+			 *  - file truncated after the lseek and before the write.
+			 *  - the file was written to after fstat and before the write
+			 *    and the file was opened with O_APPEND.
+			 *
+			 * The pattern written to the file will be considered corrupted.
+			 */
+			if (Debug > 0 && lockfile) {
+				printf("%s%s: %d DEBUG1 %s/%d: offset after "
+				       "write(%ld) not as exp(%ld+%d=%ld)\n",
+				       Progname, TagName, Pid, __FILE__,
+				       __LINE__, (long)off_tmp, (long)Woffset,
+				       grow_incr, (long)(Woffset + grow_incr));
+				printf
+				    ("%s%s: %d DEBUG1 %s/%d: %d Assuming file "
+				     "changed by another process, resetting "
+				     "offset:%ld (expect pattern mismatch)\n",
+				     Progname, TagName, Pid, __FILE__, __LINE__,
+				     Iter_cnt, (long)(off_tmp - grow_incr));
+			}
+			if (Debug > 4) {
+				printf
+				    ("%s: %d DEBUG5 %s/%d: about to chop Woffset.  "
+				     "tmp=%ld, grow_incr=%d, Woffset was %ld\n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     (long)off_tmp, grow_incr, (long)Woffset);
+			}
+			Woffset = off_tmp - grow_incr;
+			if (Woffset < 0)
+				Woffset = 0;
 		}
 
-	}  /* end of grow by write */
+	}			/* end of grow by write */
 
 	/*
 	 * Woffset - holds start of grow (start of write expect in grow by lseek)
 	 * Grow_incr - holds size of grow (write).
 	 * fsize - holds size of file before write
 	 */
-	size_grew=(Woffset + Grow_incr) - fsize;
+	size_grew = (Woffset + Grow_incr) - fsize;
 	if (Debug > 1) {
-	     if (Mode & MODE_FIFO) {
-		printf("%s: %d DEBUG2 %s/%d: file is fifo, %d wrote %d bytes\n",
-		    Progname, Pid, __FILE__, __LINE__, Grow_incr, Iter_cnt);
-	     }
+		if (Mode & MODE_FIFO) {
+			printf
+			    ("%s: %d DEBUG2 %s/%d: file is fifo, %d wrote %d bytes\n",
+			     Progname, Pid, __FILE__, __LINE__, Grow_incr,
+			     Iter_cnt);
+		}
 
-	     else if (size_grew > 0)
-		printf("%s: %d DEBUG2 %s/%d: %d wrote %d bytes(off:%ld), "
-			"grew file by %d bytes\n",
-                        Progname, Pid, __FILE__, __LINE__, Iter_cnt,
-			Grow_incr, (long)Woffset, size_grew);
-	     else
-		printf("%s: %d DEBUG2 %s/%d: %d wrote %d bytes(off:%ld), "
-			"did not grow file\n",
-                        Progname, Pid, __FILE__, __LINE__, Iter_cnt,
-			Grow_incr, (long)Woffset);
+		else if (size_grew > 0)
+			printf
+			    ("%s: %d DEBUG2 %s/%d: %d wrote %d bytes(off:%ld), "
+			     "grew file by %d bytes\n", Progname, Pid, __FILE__,
+			     __LINE__, Iter_cnt, Grow_incr, (long)Woffset,
+			     size_grew);
+		else
+			printf
+			    ("%s: %d DEBUG2 %s/%d: %d wrote %d bytes(off:%ld), "
+			     "did not grow file\n", Progname, Pid, __FILE__,
+			     __LINE__, Iter_cnt, Grow_incr, (long)Woffset);
 	}
 
-    	bytes_consumed += size_grew;
+	bytes_consumed += size_grew;
 	return 0;
 
-}	/* end of growfile */
+}				/* end of growfile */
 
 /***********************************************************************
  * shrinkfile file by trunc_incr.  file can not be made smaller than
@@ -2207,98 +2338,110 @@
  ***********************************************************************/
 int
 shrinkfile(int fd, char *filename, int trunc_incr, int trunc_inter,
-	int just_trunc)
+	   int just_trunc)
 {
-    static int shrink_cnt = 0;
-    int cur_offset;
-    int new_offset;
-    int ret;
+	static int shrink_cnt = 0;
+	int cur_offset;
+	int new_offset;
+	int ret;
 #ifdef CRAY
-    int offset;
+	int offset;
 #endif
 
 	shrink_cnt++;
 
-	if (trunc_inter == 0 || (shrink_cnt % trunc_inter != 0))  {
-	    if (Debug > 3)
-		printf("%s: %d DEBUG4 %s/%d: Not shrinking file - not time, iter=%d, cnt=%d\n",
-		    Progname, Pid, __FILE__, __LINE__, trunc_inter, shrink_cnt);
-	  return 0;	/* not this time */
+	if (trunc_inter == 0 || (shrink_cnt % trunc_inter != 0)) {
+		if (Debug > 3)
+			printf
+			    ("%s: %d DEBUG4 %s/%d: Not shrinking file - not time, iter=%d, cnt=%d\n",
+			     Progname, Pid, __FILE__, __LINE__, trunc_inter,
+			     shrink_cnt);
+		return 0;	/* not this time */
 	}
 
 	if (Mode & MODE_FIFO) {
-	    if (Debug > 5)
-		printf("%s: %d DEBUG5 %s/%d: Not attempting to shrink a FIFO\n",
-		    Progname, Pid, __FILE__, __LINE__);
-	  return 0;	/* can not truncate fifo */
+		if (Debug > 5)
+			printf
+			    ("%s: %d DEBUG5 %s/%d: Not attempting to shrink a FIFO\n",
+			     Progname, Pid, __FILE__, __LINE__);
+		return 0;	/* can not truncate fifo */
 	}
 
 	lkfile(fd, LOCK_EX, LKLVL0);
 
-	if ((cur_offset=lseek(fd,0,SEEK_CUR)) == -1) {
-	    fprintf(stderr, "%s%s: %d %s/%d: tell(%d) failed: %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, fd, strerror(errno));
-	    lkfile(fd, LOCK_UN, LKLVL0);
-	    return -1;
+	if ((cur_offset = lseek(fd, 0, SEEK_CUR)) == -1) {
+		fprintf(stderr, "%s%s: %d %s/%d: tell(%d) failed: %s\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, fd,
+			strerror(errno));
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return -1;
 	}
 
-        if (Mode & MODE_RAND_LSEEK) {
-            if (max_lseek <= -1) {
-                if ((new_offset=file_size(fd)) == -1) {
-	            lkfile(fd, LOCK_UN, LKLVL0);
-		    return -1;
+	if (Mode & MODE_RAND_LSEEK) {
+		if (max_lseek <= -1) {
+			if ((new_offset = file_size(fd)) == -1) {
+				lkfile(fd, LOCK_UN, LKLVL0);
+				return -1;
+			}
+
+			if (new_offset < min_lseek)
+				new_offset = min_lseek;
+			else
+				new_offset =
+				    random_range(min_lseek, new_offset, 1,
+						 NULL);
+		} else {
+			new_offset =
+			    random_range(min_lseek, max_lseek, 1, NULL);
 		}
 
-		if (new_offset < min_lseek)
-		    new_offset=min_lseek;
-		else
-                    new_offset=random_range(min_lseek, new_offset, 1, NULL);
-            }
-            else {
-                new_offset=random_range(min_lseek, max_lseek, 1, NULL);
-            }
-
 #ifdef CRAY
-            if ((offset=lseek(fd, new_offset, SEEK_SET)) == -1) {
-                fprintf(stderr, "%s%s: %d %s/%d: lseek(%d, %d, SEEK_SET) l3 failed: %s\n",
-                    Progname, TagName, Pid, __FILE__, __LINE__, fd, new_offset, strerror(errno));
-	        lkfile(fd, LOCK_UN, LKLVL0);
-                return -1;
-            }
-            else if (Debug > 3)
-                printf("%s: %d DEBUG4 %s/%d: lseeked to random offset %d\n",
-                    Progname, Pid, __FILE__, __LINE__, offset);
+		if ((offset = lseek(fd, new_offset, SEEK_SET)) == -1) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: lseek(%d, %d, SEEK_SET) l3 failed: %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__, fd,
+				new_offset, strerror(errno));
+			lkfile(fd, LOCK_UN, LKLVL0);
+			return -1;
+		} else if (Debug > 3)
+			printf
+			    ("%s: %d DEBUG4 %s/%d: lseeked to random offset %d\n",
+			     Progname, Pid, __FILE__, __LINE__, offset);
 
 #endif
-        }
+	}
 
-	else {	/* remove trunc_incr from file */
+	else {			/* remove trunc_incr from file */
 
-	    new_offset = cur_offset-trunc_incr;
+		new_offset = cur_offset - trunc_incr;
 
-	    if (new_offset < 0)
-		new_offset=0;
+		if (new_offset < 0)
+			new_offset = 0;
 
 #ifdef CRAY
-	    if (lseek(fd, new_offset, SEEK_SET) == -1) {
-		fprintf(stderr, "%s%s: %d %s/%d: lseek(fd, %d, SEEK_SET) l4 failed: %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, new_offset, strerror(errno));
-	        lkfile(fd, LOCK_UN, LKLVL0);
-		return -1;
-	    }
-            else if (Debug > 3)
-                printf("%s: %d DEBUG4 %s/%d: lseeked to offset %d, %d bytes from end\n",
-                    Progname, Pid, __FILE__, __LINE__, new_offset, trunc_incr);
+		if (lseek(fd, new_offset, SEEK_SET) == -1) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: lseek(fd, %d, SEEK_SET) l4 failed: %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				new_offset, strerror(errno));
+			lkfile(fd, LOCK_UN, LKLVL0);
+			return -1;
+		} else if (Debug > 3)
+			printf
+			    ("%s: %d DEBUG4 %s/%d: lseeked to offset %d, %d bytes from end\n",
+			     Progname, Pid, __FILE__, __LINE__, new_offset,
+			     trunc_incr);
 #endif
 	}
 
 #ifdef CRAY
-	ret=trunc(fd);
+	ret = trunc(fd);
 #else
-	ret=ftruncate(fd, new_offset );
+	ret = ftruncate(fd, new_offset);
 	if (ret == 0 && Debug > 3) {
-                printf("%s: %d DEBUG4 %s/%d: ftruncated to offset %d, %d bytes from end\n",
-                    Progname, Pid, __FILE__, __LINE__, new_offset, trunc_incr);
+		printf
+		    ("%s: %d DEBUG4 %s/%d: ftruncated to offset %d, %d bytes from end\n",
+		     Progname, Pid, __FILE__, __LINE__, new_offset, trunc_incr);
 	}
 #endif
 
@@ -2307,247 +2450,264 @@
 	if (ret == -1) {
 #ifdef CRAY
 		fprintf(stderr, "%s%s: %d %s/%d: trunc failed: %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, strerror(errno));
+			Progname, TagName, Pid, __FILE__, __LINE__,
+			strerror(errno));
 #else
 		fprintf(stderr, "%s%s: %d %s/%d: ftruncate failed: %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, strerror(errno));
+			Progname, TagName, Pid, __FILE__, __LINE__,
+			strerror(errno));
 #endif
 		return -1;
 	}
 
 	if (Debug > 2) {
-	    printf("%s: %d DEBUG2 %s/%d: trunc file by %d bytes, to size of = %d bytes\n",
-		Progname, Pid, __FILE__, __LINE__, cur_offset-new_offset, new_offset);
+		printf
+		    ("%s: %d DEBUG2 %s/%d: trunc file by %d bytes, to size of = %d bytes\n",
+		     Progname, Pid, __FILE__, __LINE__, cur_offset - new_offset,
+		     new_offset);
 	}
 
-        bytes_consumed -= (cur_offset - new_offset);
+	bytes_consumed -= (cur_offset - new_offset);
 	return 0;
 
-}	/* end of shrinkfile */
+}				/* end of shrinkfile */
 
 /***********************************************************************
  *
  ***********************************************************************/
-int
-check_write(int fd, int cf_inter, char *filename, int mode)
+int check_write(int fd, int cf_inter, char *filename, int mode)
 {
-    int fsize;
-    static int cf_count = 0;
-    int ret = 0;
-    int tmp;
-    char *errmsg;
-    char *ptr;
-
-    cf_count++;
-
-    if (cf_inter == 0 || (cf_count % cf_inter != 0)) {
-	if (Debug > 4)
-	    printf("%s: %d DEBUG5 %s/%d: no write check, not time iter=%d, cnt=%d\n",
-		Progname, Pid, __FILE__, __LINE__, cf_inter, cf_count);
-	return 0;	 /* no check done */
-    }
-
-    if (Grow_incr <= 0) {
-        if (Debug > 3)
-	    printf("%s: %d DEBUG4 %s/%d: No write validation,  "
-		    "Grow_incr = %d, offset = %ld\n",
-	        Progname, Pid, __FILE__, __LINE__, Grow_incr, (long)Woffset);
-      return 0;	/* no check */
-    }
-
-    /*
-     * Get the shared file lock.  We need to hold the lock from before
-     * we do the stat until after the read.
-     */
-    lkfile(fd, LOCK_SH, LKLVL0);
-
-    if ((fsize=file_size(fd)) == -1)  {
-        lkfile(fd, LOCK_UN, LKLVL0);
-        return -1;
-
-    } else if (fsize <= Woffset) {
-	/*
-	 * The file was truncated between write and now.
-	 * The contents of our last write is totally gone, no check.
-	 */
-	if (Debug > 1)
-	    printf("%s%s: %d DEBUG2 %s/%d: %d File size (%d) smaller than "
-		    "where last wrote (%ld)- no write validation\n",
-		Progname, TagName, Pid, __FILE__, __LINE__,
-		Iter_cnt, fsize, (long)Woffset);
-        lkfile(fd, LOCK_UN, LKLVL0);
-      return 0;	/* no validation, but not an error */
-
-    } else if (fsize < (Woffset + Grow_incr)) {
-	/*
-	 * The file was truncated between write and now.
-	 * Part of our last write has been truncated, adjust our Grow_incr
-	 * to reflect this.
-	 */
-
-	tmp=Grow_incr;
-	Grow_incr=fsize-Woffset;
-
-	if (Debug > 1)  {
-
-	    printf("%s%s: %d DEBUG2 %s/%d: %d fsz:%d, lost(%d)of "
-		    "wrt(off:%ld, sz:%d), adj=%d\n", Progname,
-		    TagName, Pid, __FILE__, __LINE__, Iter_cnt, fsize,
-		    tmp - Grow_incr, (long)Woffset, tmp, Grow_incr);
-	}
-
-    }
-
-    if (Debug > 2)
-        printf("%s: %d DEBUG3 %s/%d: about to do write validation, "
-		"offset = %ld, size = %d\n",
-	    Progname, Pid, __FILE__, __LINE__, (long)Woffset, Grow_incr);
-
-    if (! (mode & MODE_FIFO)) {
-
-        if (lseek(fd, Woffset, 0) == -1) {
-            fprintf(stderr, "%s%s: %d %s/%d: lseek(fd, %ld, 0) failed: %s\n",
-	        Progname, TagName, Pid, __FILE__, __LINE__,
-		(long)Woffset, strerror(errno));
-        }
-        if (Debug > 3)
-	    printf("%s: %d DEBUG4 %s/%d: lseeked to offset:%ld\n",
-	        Progname, Pid, __FILE__, __LINE__, (long)Woffset);
-    }
-
-    /*
-     * Read last writes data
-     */
-#if NEWIO
-    ret=lio_read_buffer(fd, io_type, Buffer, Grow_incr, SIGUSR1, &errmsg,0);
-#else
-    ret=read_buffer(fd, io_type, Buffer, Grow_incr, 0, &errmsg);
-#endif
-
-    /*
-     * report the error and debug information before releasing
-     * the file lock
-     */
-    if (ret != Grow_incr) {
-        fprintf(stderr, "%s%s: %d %s/%d: %d CW %s\n", Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
-        {
-	    struct stat stbuf;
-	    fstat(fd, &stbuf);
-	    if (Debug > 2)
-	        printf("%s%s: %d DEBUG3 %s/%d: fd:%d, offset:%d, fsize:%d, openflags:%#o\n",
-	            Progname, TagName, Pid, __FILE__, __LINE__, fd,
-		    (int)lseek(fd,SEEK_CUR,0),	/* FIXME: 64bit/LFS ? */
-		    (int)stbuf.st_size,
-		    Fileinfo.openflags);
-        }
-
-	lkfile(fd, LOCK_UN, LKLVL0);
-	return 1;
-    }
-
-    lkfile(fd, LOCK_UN, LKLVL0);
-
-    if (Mode & MODE_GROW_BY_LSEEK) {
-	/* check that all zeros upto last character */
-	for (ptr=Buffer; ptr < (Buffer+Grow_incr-1); ptr++) {
-	    if (*ptr != '\0') {
-	        fprintf(stderr,
-		    "%s%s: %d %s/%d: data mismatch at offset %d, exp:%#o(zerofilled), act:%#o in file %s\n",
-		    Progname, TagName, Pid, __FILE__, __LINE__,
-		    (int)(Woffset+(Grow_incr-(Buffer-ptr))),
-		    0, *ptr, filename);
-	        fflush(stderr);
-		return 1;
-	    }
-	}
-	/* check that the last char is a 'w' */
-	if (*ptr != 'w') {
-	    fprintf(stderr,
-	  "%s%s: %d %s/%d: data mismatch at offset %d, exp:%#o(zerofilled), act:%#o in file %s\n",
-	        Progname, TagName, Pid, __FILE__, __LINE__,
-		(int)(Woffset+(Grow_incr-(Buffer-ptr))), 'w',
-		*ptr, filename);
-	    fflush(stderr);
-	    return 1;
-	}
-	return 0;   /* all is well */
-
-    }
-    else if (Pattern == PATTERN_OFFSET)
-	ret=datapidchk(STATIC_NUM, Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_PID)
-	ret=datapidchk(Pid, Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_ASCII)
-        ret=dataasciichk(NULL, Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_RANDOM)
-	;	/* no check for random */
-    else if (Pattern == PATTERN_ALT)
-        ret=databinchk('a', Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_CHKER)
-        ret=databinchk('c', Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_CNTING)
-  	ret=databinchk('C', Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_ZEROS)
-    	ret=databinchk('z', Buffer, Grow_incr, Woffset, &errmsg);
-    else if (Pattern == PATTERN_ONES)
-    	ret=databinchk('o', Buffer, Grow_incr, Woffset, &errmsg);
-    else
-	ret=dataasciichk(NULL, Buffer, Grow_incr, Woffset, &errmsg);
-
-    if (ret >= 0) {
-	fprintf(stderr, "%s%s: %d %s/%d: %d CW %s in file %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg, filename);
-
-	if (Debug > 0)
-	    printf("%s%s: %d DEBUG1 %s/%d: **fd:%d, lk:%d, "
-		    "offset:%ld, sz:%d open flags:%#o %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, fd, lockfile,
-		(long)Woffset, Grow_incr, Fileinfo.openflags,
-		openflags2symbols(Fileinfo.openflags, ",", 0));
-
-	fflush(stderr);
-	return 1;
-    }
-
-    if (Debug > 6)
-        printf("%s: %d DEBUG7 %s/%d: No corruption detected on "
-		"write validation , offset = %ld, size = %d\n",
-            Progname, Pid, __FILE__, __LINE__, (long)Woffset, Grow_incr);
-
-  return 0;	/* all is well */
-}
-
-/***********************************************************************
- *
- ***********************************************************************/
-int
-check_file(int fd, int cf_inter, char *filename, int no_file_check)
-{
-    int fsize;
-    static int cf_count = 0;
-    char *buf;
-    int ret;
-    int ret_val = 0;
-    int rd_cnt;
-    int rd_size;
-    char *errmsg;
+	int fsize;
+	static int cf_count = 0;
+	int ret = 0;
+	int tmp;
+	char *errmsg;
+	char *ptr;
 
 	cf_count++;
 
 	if (cf_inter == 0 || (cf_count % cf_inter != 0)) {
 		if (Debug > 4)
-		    printf("%s: %d DEBUG5 %s/%d: No file check - not time, iter=%d, cnt=%d\n",
-			Progname, Pid, __FILE__, __LINE__, cf_inter, cf_count);
-		return 0;	 /* no check done */
+			printf
+			    ("%s: %d DEBUG5 %s/%d: no write check, not time iter=%d, cnt=%d\n",
+			     Progname, Pid, __FILE__, __LINE__, cf_inter,
+			     cf_count);
+		return 0;	/* no check done */
+	}
+
+	if (Grow_incr <= 0) {
+		if (Debug > 3)
+			printf("%s: %d DEBUG4 %s/%d: No write validation,  "
+			       "Grow_incr = %d, offset = %ld\n",
+			       Progname, Pid, __FILE__, __LINE__, Grow_incr,
+			       (long)Woffset);
+		return 0;	/* no check */
+	}
+
+	/*
+	 * Get the shared file lock.  We need to hold the lock from before
+	 * we do the stat until after the read.
+	 */
+	lkfile(fd, LOCK_SH, LKLVL0);
+
+	if ((fsize = file_size(fd)) == -1) {
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return -1;
+
+	} else if (fsize <= Woffset) {
+		/*
+		 * The file was truncated between write and now.
+		 * The contents of our last write is totally gone, no check.
+		 */
+		if (Debug > 1)
+			printf
+			    ("%s%s: %d DEBUG2 %s/%d: %d File size (%d) smaller than "
+			     "where last wrote (%ld)- no write validation\n",
+			     Progname, TagName, Pid, __FILE__, __LINE__,
+			     Iter_cnt, fsize, (long)Woffset);
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return 0;	/* no validation, but not an error */
+
+	} else if (fsize < (Woffset + Grow_incr)) {
+		/*
+		 * The file was truncated between write and now.
+		 * Part of our last write has been truncated, adjust our Grow_incr
+		 * to reflect this.
+		 */
+
+		tmp = Grow_incr;
+		Grow_incr = fsize - Woffset;
+
+		if (Debug > 1) {
+
+			printf("%s%s: %d DEBUG2 %s/%d: %d fsz:%d, lost(%d)of "
+			       "wrt(off:%ld, sz:%d), adj=%d\n", Progname,
+			       TagName, Pid, __FILE__, __LINE__, Iter_cnt,
+			       fsize, tmp - Grow_incr, (long)Woffset, tmp,
+			       Grow_incr);
+		}
+
+	}
+
+	if (Debug > 2)
+		printf("%s: %d DEBUG3 %s/%d: about to do write validation, "
+		       "offset = %ld, size = %d\n",
+		       Progname, Pid, __FILE__, __LINE__, (long)Woffset,
+		       Grow_incr);
+
+	if (!(mode & MODE_FIFO)) {
+
+		if (lseek(fd, Woffset, 0) == -1) {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: lseek(fd, %ld, 0) failed: %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				(long)Woffset, strerror(errno));
+		}
+		if (Debug > 3)
+			printf("%s: %d DEBUG4 %s/%d: lseeked to offset:%ld\n",
+			       Progname, Pid, __FILE__, __LINE__,
+			       (long)Woffset);
+	}
+
+	/*
+	 * Read last writes data
+	 */
+#if NEWIO
+	ret =
+	    lio_read_buffer(fd, io_type, Buffer, Grow_incr, SIGUSR1, &errmsg,
+			    0);
+#else
+	ret = read_buffer(fd, io_type, Buffer, Grow_incr, 0, &errmsg);
+#endif
+
+	/*
+	 * report the error and debug information before releasing
+	 * the file lock
+	 */
+	if (ret != Grow_incr) {
+		fprintf(stderr, "%s%s: %d %s/%d: %d CW %s\n", Progname, TagName,
+			Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
+		{
+			struct stat stbuf;
+			fstat(fd, &stbuf);
+			if (Debug > 2)
+				printf("%s%s: %d DEBUG3 %s/%d: fd:%d, offset:%d, fsize:%d, openflags:%#o\n", Progname, TagName, Pid, __FILE__, __LINE__, fd, (int)lseek(fd, SEEK_CUR, 0),	/* FIXME: 64bit/LFS ? */
+				       (int)stbuf.st_size, Fileinfo.openflags);
+		}
+
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return 1;
+	}
+
+	lkfile(fd, LOCK_UN, LKLVL0);
+
+	if (Mode & MODE_GROW_BY_LSEEK) {
+		/* check that all zeros upto last character */
+		for (ptr = Buffer; ptr < (Buffer + Grow_incr - 1); ptr++) {
+			if (*ptr != '\0') {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: data mismatch at offset %d, exp:%#o(zerofilled), act:%#o in file %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__,
+					(int)(Woffset +
+					      (Grow_incr - (Buffer - ptr))), 0,
+					*ptr, filename);
+				fflush(stderr);
+				return 1;
+			}
+		}
+		/* check that the last char is a 'w' */
+		if (*ptr != 'w') {
+			fprintf(stderr,
+				"%s%s: %d %s/%d: data mismatch at offset %d, exp:%#o(zerofilled), act:%#o in file %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				(int)(Woffset + (Grow_incr - (Buffer - ptr))),
+				'w', *ptr, filename);
+			fflush(stderr);
+			return 1;
+		}
+		return 0;	/* all is well */
+
+	} else if (Pattern == PATTERN_OFFSET)
+		ret =
+		    datapidchk(STATIC_NUM, Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_PID)
+		ret = datapidchk(Pid, Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_ASCII)
+		ret = dataasciichk(NULL, Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_RANDOM) ;	/* no check for random */
+	else if (Pattern == PATTERN_ALT)
+		ret = databinchk('a', Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_CHKER)
+		ret = databinchk('c', Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_CNTING)
+		ret = databinchk('C', Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_ZEROS)
+		ret = databinchk('z', Buffer, Grow_incr, Woffset, &errmsg);
+	else if (Pattern == PATTERN_ONES)
+		ret = databinchk('o', Buffer, Grow_incr, Woffset, &errmsg);
+	else
+		ret = dataasciichk(NULL, Buffer, Grow_incr, Woffset, &errmsg);
+
+	if (ret >= 0) {
+		fprintf(stderr, "%s%s: %d %s/%d: %d CW %s in file %s\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt,
+			errmsg, filename);
+
+		if (Debug > 0)
+			printf("%s%s: %d DEBUG1 %s/%d: **fd:%d, lk:%d, "
+			       "offset:%ld, sz:%d open flags:%#o %s\n",
+			       Progname, TagName, Pid, __FILE__, __LINE__, fd,
+			       lockfile, (long)Woffset, Grow_incr,
+			       Fileinfo.openflags,
+			       openflags2symbols(Fileinfo.openflags, ",", 0));
+
+		fflush(stderr);
+		return 1;
+	}
+
+	if (Debug > 6)
+		printf("%s: %d DEBUG7 %s/%d: No corruption detected on "
+		       "write validation , offset = %ld, size = %d\n",
+		       Progname, Pid, __FILE__, __LINE__, (long)Woffset,
+		       Grow_incr);
+
+	return 0;		/* all is well */
+}
+
+/***********************************************************************
+ *
+ ***********************************************************************/
+int check_file(int fd, int cf_inter, char *filename, int no_file_check)
+{
+	int fsize;
+	static int cf_count = 0;
+	char *buf;
+	int ret;
+	int ret_val = 0;
+	int rd_cnt;
+	int rd_size;
+	char *errmsg;
+
+	cf_count++;
+
+	if (cf_inter == 0 || (cf_count % cf_inter != 0)) {
+		if (Debug > 4)
+			printf
+			    ("%s: %d DEBUG5 %s/%d: No file check - not time, iter=%d, cnt=%d\n",
+			     Progname, Pid, __FILE__, __LINE__, cf_inter,
+			     cf_count);
+		return 0;	/* no check done */
 	}
 
 	/*
 	 * if we can't determine file content, don't bother checking
 	 */
-        if (no_file_check) {
+	if (no_file_check) {
 		if (Debug > 4)
-		    printf("%s: %d DEBUG5 %s/%d: No file check, lseek grow or random lseeks\n",
-			Progname, Pid, __FILE__, __LINE__);
+			printf
+			    ("%s: %d DEBUG5 %s/%d: No file check, lseek grow or random lseeks\n",
+			     Progname, Pid, __FILE__, __LINE__);
 		return 0;
 	}
 
@@ -2558,292 +2718,331 @@
 	 */
 	lkfile(fd, LOCK_SH, LKLVL0);
 
-	if ((fsize=file_size(fd)) == -1)  {
-	    lkfile(fd, LOCK_UN, LKLVL0);
-	    return -1;
+	if ((fsize = file_size(fd)) == -1) {
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return -1;
 	}
 
-        if (fsize == 0) {
-	    if (Debug > 2)
-            printf("%s: %d DEBUG3 %s/%d: No file validation, file size == 0\n",
-                Progname, Pid, __FILE__, __LINE__);
+	if (fsize == 0) {
+		if (Debug > 2)
+			printf
+			    ("%s: %d DEBUG3 %s/%d: No file validation, file size == 0\n",
+			     Progname, Pid, __FILE__, __LINE__);
 
-	    lkfile(fd, LOCK_UN, LKLVL0);
-	  return 0;
+		lkfile(fd, LOCK_UN, LKLVL0);
+		return 0;
 	}
 
 	if (Debug > 2)
-            printf("%s: %d DEBUG3 %s/%d: about to do file validation\n",
-	        Progname, Pid, __FILE__, __LINE__);
+		printf("%s: %d DEBUG3 %s/%d: about to do file validation\n",
+		       Progname, Pid, __FILE__, __LINE__);
 
-        if (fsize > MAX_FC_READ) {
-	    /*
-	     * read the file in MAX_FC_READ chuncks.
-	     */
+	if (fsize > MAX_FC_READ) {
+		/*
+		 * read the file in MAX_FC_READ chuncks.
+		 */
 
-	    if ((buf=(char *)malloc(MAX_FC_READ)) == NULL) {
-	        fprintf(stderr, "%s%s: %s/%d: malloc(%d) failed: %s\n", Progname, TagName,
-		    __FILE__, __LINE__, MAX_FC_READ, strerror(errno));
-	       lkfile(fd, LOCK_UN, LKLVL0);
-	       return -1;
-	    }
+		if ((buf = (char *)malloc(MAX_FC_READ)) == NULL) {
+			fprintf(stderr, "%s%s: %s/%d: malloc(%d) failed: %s\n",
+				Progname, TagName, __FILE__, __LINE__,
+				MAX_FC_READ, strerror(errno));
+			lkfile(fd, LOCK_UN, LKLVL0);
+			return -1;
+		}
 
-	    lseek(fd, 0, SEEK_SET);
+		lseek(fd, 0, SEEK_SET);
 
-	    lkfile(fd, LOCK_SH, LKLVL0);  /* get lock on file before getting file size */
+		lkfile(fd, LOCK_SH, LKLVL0);	/* get lock on file before getting file size */
 
-	    rd_cnt=0;
-	    while (rd_cnt < fsize) {
-	        if (fsize - rd_cnt > MAX_FC_READ)
-		    rd_size=MAX_FC_READ;
-	        else
-		    rd_size=fsize - rd_cnt;
+		rd_cnt = 0;
+		while (rd_cnt < fsize) {
+			if (fsize - rd_cnt > MAX_FC_READ)
+				rd_size = MAX_FC_READ;
+			else
+				rd_size = fsize - rd_cnt;
 
 #if NEWIO
-	        ret=lio_read_buffer(fd, io_type, buf, rd_size,
-		    SIGUSR1, &errmsg,0);
+			ret = lio_read_buffer(fd, io_type, buf, rd_size,
+					      SIGUSR1, &errmsg, 0);
 #else
-	        ret=read_buffer(fd, io_type, buf, rd_size, 0, &errmsg);
+			ret =
+			    read_buffer(fd, io_type, buf, rd_size, 0, &errmsg);
 #endif
 
-	        if (ret != rd_size) {
-		    fprintf(stderr, "%s%s: %d %s/%d: %d CFa %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
-		    free(buf);
-		    lkfile(fd, LOCK_UN, LKLVL0);
-		    return -1;
-	        }
+			if (ret != rd_size) {
+				fprintf(stderr, "%s%s: %d %s/%d: %d CFa %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, Iter_cnt, errmsg);
+				free(buf);
+				lkfile(fd, LOCK_UN, LKLVL0);
+				return -1;
+			}
 /**
 	        read(fd, buf, rd_size);
 ***/
 
-	        if (Pattern == PATTERN_OFFSET)
-	            ret=datapidchk(STATIC_NUM, buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_PID)
-	            ret=datapidchk(Pid, buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_ASCII)
-	            ret=dataasciichk(NULL, buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_RANDOM)
-	   	  	;  /* no checks for random */
-	        else if (Pattern == PATTERN_ALT)
-	            ret=databinchk('a', buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_CHKER)
-	            ret=databinchk('c', buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_CNTING)
-	            ret=databinchk('C', buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_ZEROS)
-	            ret=databinchk('z', buf, rd_size, rd_cnt, &errmsg);
-	        else if (Pattern == PATTERN_ONES)
-	            ret=databinchk('o', buf, rd_size, rd_cnt, &errmsg);
-	        else
-	            ret=dataasciichk(NULL, buf, rd_size, rd_cnt, &errmsg);
+			if (Pattern == PATTERN_OFFSET)
+				ret =
+				    datapidchk(STATIC_NUM, buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_PID)
+				ret =
+				    datapidchk(Pid, buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_ASCII)
+				ret =
+				    dataasciichk(NULL, buf, rd_size, rd_cnt,
+						 &errmsg);
+			else if (Pattern == PATTERN_RANDOM) ;	/* no checks for random */
+			else if (Pattern == PATTERN_ALT)
+				ret =
+				    databinchk('a', buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_CHKER)
+				ret =
+				    databinchk('c', buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_CNTING)
+				ret =
+				    databinchk('C', buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_ZEROS)
+				ret =
+				    databinchk('z', buf, rd_size, rd_cnt,
+					       &errmsg);
+			else if (Pattern == PATTERN_ONES)
+				ret =
+				    databinchk('o', buf, rd_size, rd_cnt,
+					       &errmsg);
+			else
+				ret =
+				    dataasciichk(NULL, buf, rd_size, rd_cnt,
+						 &errmsg);
 
-	        if (ret >= 0) {
-		    fprintf(stderr,
-		        "%s%s: %d %s/%d: %d CFp %s in file %s\n",
-		        Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg, filename);
-		    fflush(stderr);
-		    ret_val=1;
-		    lkfile(fd, LOCK_UN, LKLVL0);
-		    break;
-	        }
-	        rd_cnt += rd_size;
-	    }
+			if (ret >= 0) {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: %d CFp %s in file %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, Iter_cnt, errmsg, filename);
+				fflush(stderr);
+				ret_val = 1;
+				lkfile(fd, LOCK_UN, LKLVL0);
+				break;
+			}
+			rd_cnt += rd_size;
+		}
 
-	    lkfile(fd, LOCK_UN, LKLVL0);
+		lkfile(fd, LOCK_UN, LKLVL0);
 
-	    free(buf);
+		free(buf);
 
-	}
-	else {
-	    /*
-	     * Read the whole file in a single read
-	     */
-	    if ((buf = (char *)malloc(fsize)) == NULL) {
-			fprintf(stderr, "%s%s: %s/%d: malloc(%d) failed: %s\n", Progname, TagName,
-				__FILE__, __LINE__, fsize, strerror(errno));
+	} else {
+		/*
+		 * Read the whole file in a single read
+		 */
+		if ((buf = (char *)malloc(fsize)) == NULL) {
+			fprintf(stderr, "%s%s: %s/%d: malloc(%d) failed: %s\n",
+				Progname, TagName, __FILE__, __LINE__, fsize,
+				strerror(errno));
 			fflush(stderr);
 			return -1;
-	    }
+		}
 
-	    lseek(fd, 0, SEEK_SET);
+		lseek(fd, 0, SEEK_SET);
 
 /****
 	    read(fd, buf, fsize);
 ****/
 #if NEWIO
-	    ret=lio_read_buffer(fd, io_type, buf, fsize, SIGUSR1, &errmsg,0);
+		ret =
+		    lio_read_buffer(fd, io_type, buf, fsize, SIGUSR1, &errmsg,
+				    0);
 #else
-	    ret=read_buffer(fd, io_type, buf, fsize, 0, &errmsg);
+		ret = read_buffer(fd, io_type, buf, fsize, 0, &errmsg);
 #endif
 
-	    /* unlock the file as soon as we can */
-	    lkfile(fd, LOCK_UN, LKLVL0);
+		/* unlock the file as soon as we can */
+		lkfile(fd, LOCK_UN, LKLVL0);
 
-	    if (ret != fsize) {
-		fprintf(stderr, "%s%s: %d %s/%d: %d CFw %s\n",
-		    Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg);
-		ret_val=1;
-	    }
-	    else  {
-	        if (Pattern == PATTERN_OFFSET)
-		    ret=datapidchk(STATIC_NUM, buf, fsize, 0, &errmsg);
-	        else if (Pattern == PATTERN_PID)
-		    ret=datapidchk(Pid, buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_ASCII)
-		    ret=dataasciichk(NULL, buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_RANDOM)
-		    ;	/* no check for random */
-		else if (Pattern == PATTERN_ALT)
-		    ret=databinchk('a', buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_CHKER)
-		    ret=databinchk('c', buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_CNTING)
-		    ret=databinchk('C', buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_ZEROS)
-		    ret=databinchk('z', buf, fsize, 0, &errmsg);
-		else if (Pattern == PATTERN_ONES)
-		    ret=databinchk('o', buf, fsize, 0, &errmsg);
-		else
-		    ret=dataasciichk(NULL, buf, fsize, 0, &errmsg);
+		if (ret != fsize) {
+			fprintf(stderr, "%s%s: %d %s/%d: %d CFw %s\n",
+				Progname, TagName, Pid, __FILE__, __LINE__,
+				Iter_cnt, errmsg);
+			ret_val = 1;
+		} else {
+			if (Pattern == PATTERN_OFFSET)
+				ret =
+				    datapidchk(STATIC_NUM, buf, fsize, 0,
+					       &errmsg);
+			else if (Pattern == PATTERN_PID)
+				ret = datapidchk(Pid, buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_ASCII)
+				ret =
+				    dataasciichk(NULL, buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_RANDOM) ;	/* no check for random */
+			else if (Pattern == PATTERN_ALT)
+				ret = databinchk('a', buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_CHKER)
+				ret = databinchk('c', buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_CNTING)
+				ret = databinchk('C', buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_ZEROS)
+				ret = databinchk('z', buf, fsize, 0, &errmsg);
+			else if (Pattern == PATTERN_ONES)
+				ret = databinchk('o', buf, fsize, 0, &errmsg);
+			else
+				ret =
+				    dataasciichk(NULL, buf, fsize, 0, &errmsg);
 
-		if (ret >= 0) {
-		    fprintf(stderr, "%s%s: %d %s/%d: %d CFw %s in file %s\n",
-			Progname, TagName, Pid, __FILE__, __LINE__, Iter_cnt, errmsg, filename);
-		    fflush(stderr);
-		    ret_val=1;
+			if (ret >= 0) {
+				fprintf(stderr,
+					"%s%s: %d %s/%d: %d CFw %s in file %s\n",
+					Progname, TagName, Pid, __FILE__,
+					__LINE__, Iter_cnt, errmsg, filename);
+				fflush(stderr);
+				ret_val = 1;
+			}
 		}
-	    }
-	    free(buf);
+		free(buf);
 	}
 
 	return ret_val;
 
-}	/* end of check_file */
+}				/* end of check_file */
 
 /***********************************************************************
  *
  ***********************************************************************/
-int
-file_size(int fd)
+int file_size(int fd)
 {
-    struct stat sb;
+	struct stat sb;
 
-        if (fstat(fd, &sb) < 0) {
-            fprintf(stderr, "%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
-                Progname, TagName, Pid, __FILE__, __LINE__, fd, errno, strerror(errno));
-	    return -1;
+	if (fstat(fd, &sb) < 0) {
+		fprintf(stderr,
+			"%s%s: %d %s/%d: Unable to fstat(%d, &buf), errno:%d %s\n",
+			Progname, TagName, Pid, __FILE__, __LINE__, fd, errno,
+			strerror(errno));
+		return -1;
 
-        }
+	}
 
-        return sb.st_size;
+	return sb.st_size;
 }
 
 /***********************************************************************
  *  do file lock/unlock action.
  ***********************************************************************/
-int
-lkfile(int fd, int operation, int lklevel)
+int lkfile(int fd, int operation, int lklevel)
 {
-    char *errmsg;
+	char *errmsg;
 
-    if (lockfile == lklevel) {
+	if (lockfile == lklevel) {
 
-        if (Debug > 5) {
-	    switch (operation) {
- 	    case LOCK_UN:
-	        printf("%s: %d DEBUG6 %s/%d: Attempting to release lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
+		if (Debug > 5) {
+			switch (operation) {
+			case LOCK_UN:
+				printf
+				    ("%s: %d DEBUG6 %s/%d: Attempting to release lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
 
- 	    case LOCK_SH:
-	        printf("%s: %d DEBUG6 %s/%d: Attempting to get read/shared lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
+			case LOCK_SH:
+				printf
+				    ("%s: %d DEBUG6 %s/%d: Attempting to get read/shared lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
 
- 	    case LOCK_EX:
-	        printf("%s: %d DEBUG6 %s/%d: Attempting to get write/exclusive lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
-	    }
+			case LOCK_EX:
+				printf
+				    ("%s: %d DEBUG6 %s/%d: Attempting to get write/exclusive lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
+			}
+		}
+
+		/*
+		 * Attempt to get/release desired lock.
+		 * file_lock will attempt to do action over and over again until
+		 * either an unretryable error or the action is completed.
+		 */
+
+		if (file_lock(fd, operation, &errmsg) != 0) {
+			printf
+			    ("%s%s: %d %s/%d: Unable to perform lock operation. %s\n",
+			     Progname, TagName, Pid, __FILE__, __LINE__,
+			     errmsg);
+
+			/* do we count this as an error? handle_error();  */
+			return -1;
+		}
+
+		if (Debug > 2) {
+			switch (operation) {
+			case LOCK_UN:
+				printf
+				    ("%s: %d DEBUG3 %s/%d: Released lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
+
+			case LOCK_SH:
+				printf
+				    ("%s: %d DEBUG3 %s/%d: Got read/shared lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
+
+			case LOCK_EX:
+				printf
+				    ("%s: %d DEBUG3 %s/%d: Got write/exclusive lock on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__, fd);
+				break;
+
+			default:
+				printf
+				    ("%s: %d DEBUG3 %s/%d: Completed action %d on fd %d\n",
+				     Progname, Pid, __FILE__, __LINE__,
+				     operation, fd);
+				break;
+			}
+		}
 	}
 
-	/*
-	 * Attempt to get/release desired lock.
-	 * file_lock will attempt to do action over and over again until
-	 * either an unretryable error or the action is completed.
-	 */
-
-        if (file_lock(fd, operation, &errmsg) != 0) {
-	    printf("%s%s: %d %s/%d: Unable to perform lock operation. %s\n",
-		Progname, TagName, Pid, __FILE__, __LINE__, errmsg);
-
-	    /* do we count this as an error? handle_error();  */
-	    return -1;
-        }
-
-        if (Debug > 2) {
-	    switch (operation) {
- 	    case LOCK_UN:
-	        printf("%s: %d DEBUG3 %s/%d: Released lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
-
- 	    case LOCK_SH:
-	        printf("%s: %d DEBUG3 %s/%d: Got read/shared lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
-
- 	    case LOCK_EX:
-	        printf("%s: %d DEBUG3 %s/%d: Got write/exclusive lock on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, fd);
-		break;
-
-	    default:
-	        printf("%s: %d DEBUG3 %s/%d: Completed action %d on fd %d\n",
-		    Progname, Pid, __FILE__, __LINE__, operation, fd);
-		break;
-	    }
-	}
-   }
-
- return 0;
+	return 0;
 }
 
 #ifndef linux
 /***********************************************************************
  *
  ***********************************************************************/
-int
-pre_alloc(int fd, long size)
+int pre_alloc(int fd, long size)
 {
 
 #ifdef CRAY
-    long avl;
+	long avl;
 
-        if (ialloc(fd, size, IA_CONT, &avl) == -1) {
-                fprintf(stderr, "%s%s %s/%d: Unable to pre-alloc space: ialloc failed: %d  %s\n",
-			Progname, TagName,
-                        __FILE__, __LINE__, errno, strerror(errno));
-                return -1;
-        }
+	if (ialloc(fd, size, IA_CONT, &avl) == -1) {
+		fprintf(stderr,
+			"%s%s %s/%d: Unable to pre-alloc space: ialloc failed: %d  %s\n",
+			Progname, TagName, __FILE__, __LINE__, errno,
+			strerror(errno));
+		return -1;
+	}
 #endif
 
 #ifdef sgi
-    struct flock f;
+	struct flock f;
 
 	f.l_whence = 0;
 	f.l_start = 0;
 	f.l_len = size;
 
 	/* non-zeroing reservation */
-	if (fcntl( fd, F_RESVSP, &f ) == -1) {
-                fprintf(stderr, "%s%s %s/%d: Unable to pre-alloc space: fcntl(F_RESVSP) failed: %d  %s\n",
-			Progname, TagName,
-                        __FILE__, __LINE__, errno, strerror(errno));
+	if (fcntl(fd, F_RESVSP, &f) == -1) {
+		fprintf(stderr,
+			"%s%s %s/%d: Unable to pre-alloc space: fcntl(F_RESVSP) failed: %d  %s\n",
+			Progname, TagName, __FILE__, __LINE__, errno,
+			strerror(errno));
 		return -1;
 	}
-
 #endif
 
 	return 0;
diff --git a/testcases/kernel/fs/doio/iogen.c b/testcases/kernel/fs/doio/iogen.c
index 314f05c..94cb205 100644
--- a/testcases/kernel/fs/doio/iogen.c
+++ b/testcases/kernel/fs/doio/iogen.c
@@ -67,7 +67,7 @@
 #include "random_range.h"
 
 #ifndef PATH_MAX
-#define	PATH_MAX 512	/* ??? */
+#define	PATH_MAX 512		/* ??? */
 #endif
 
 #ifndef BSIZE
@@ -81,7 +81,7 @@
 #define RAW_IO(_flags_)	((_flags_) & (O_RAW | O_SSD))
 
 #ifndef __linux__
-extern char 	*sys_errlist[];
+extern char *sys_errlist[];
 #endif
 #define SYSERR	strerror(errno)
 
@@ -90,15 +90,15 @@
  */
 
 struct file_info {
-	char	f_path[MAX_FNAME_LENGTH+1]; /* file name (full path)	*/
-	int	f_length;	/* length in bytes	    	    	*/
-	int	f_iou;		/* file iounit  	    	    	*/
-	int	f_riou;		/* file raw iounit (for O_RAW/O_SSD)    */
-	int	f_dalign;	/* direct I/O alignment                 */
-	int	f_nextoff;	/* offset of end of last io operation   */
-	int	f_type; 	/* file type S_IFREG, etc...		*/
-	int	f_lastoffset;   /* offset of last io operation  	*/
-	int	f_lastlength;   /* length of last io operation   	*/
+	char f_path[MAX_FNAME_LENGTH + 1];	/* file name (full path)    */
+	int f_length;		/* length in bytes                      */
+	int f_iou;		/* file iounit                          */
+	int f_riou;		/* file raw iounit (for O_RAW/O_SSD)    */
+	int f_dalign;		/* direct I/O alignment                 */
+	int f_nextoff;		/* offset of end of last io operation   */
+	int f_type;		/* file type S_IFREG, etc...            */
+	int f_lastoffset;	/* offset of last io operation          */
+	int f_lastlength;	/* length of last io operation          */
 };
 
 /*
@@ -108,22 +108,22 @@
  */
 
 struct strmap {
-	char	*m_string;
-	int	m_value;
-	int	m_flags;
+	char *m_string;
+	int m_value;
+	int m_flags;
 };
 
-void		startup_info(FILE *stream, int seed);
-int		init_output(void);
-int		form_iorequest(struct io_req *req);
-int		get_file_info(struct file_info *rec);
-int		create_file(char *path, int nbytes);
-int		str_to_value(struct strmap *map, char *str);
-struct strmap	*str_lookup(struct strmap *map, char *str);
-char		*value_to_string(struct strmap *map, int val);
-int		parse_cmdline(int argc, char **argv, char *opts);
-int		help(FILE *stream);
-int		usage(FILE *stream);
+void startup_info(FILE * stream, int seed);
+int init_output(void);
+int form_iorequest(struct io_req *req);
+int get_file_info(struct file_info *rec);
+int create_file(char *path, int nbytes);
+int str_to_value(struct strmap *map, char *str);
+struct strmap *str_lookup(struct strmap *map, char *str);
+char *value_to_string(struct strmap *map, int val);
+int parse_cmdline(int argc, char **argv, char *opts);
+int help(FILE * stream);
+int usage(FILE * stream);
 
 /*
  * Declare cmdline option flags/variables initialized in parse_cmdline()
@@ -131,80 +131,80 @@
 
 #define OPTS	"a:dhf:i:L:m:op:qr:s:t:T:O:N:"
 
-int	a_opt = 0;		/* async io comp. types supplied	    */
-int 	o_opt = 0;		/* form overlapping requests	    	    */
-int 	f_opt = 0;		/* test flags   	    	    	    */
-int 	i_opt = 0;		/* iterations - 0 implies infinite	    */
-int	L_opt = 0;		/* listio min-max nstrides & nents	    */
-int 	m_opt = 0;		/* offset mode	    	    	    	    */
-int	O_opt = 0;		/* file creation Open flags		    */
-int 	p_opt = 0;		/* output pipe - default is stdout	    */
-int 	r_opt = 0;		/* specify raw io multiple instead of	    */
+int a_opt = 0;			/* async io comp. types supplied            */
+int o_opt = 0;			/* form overlapping requests                */
+int f_opt = 0;			/* test flags                               */
+int i_opt = 0;			/* iterations - 0 implies infinite          */
+int L_opt = 0;			/* listio min-max nstrides & nents          */
+int m_opt = 0;			/* offset mode                              */
+int O_opt = 0;			/* file creation Open flags                 */
+int p_opt = 0;			/* output pipe - default is stdout          */
+int r_opt = 0;			/* specify raw io multiple instead of       */
 				/* getting it from the mounted on device.   */
-				/* Only applies to regular files.   	    */
-int 	s_opt = 0;		/* syscalls	    	    	    	    */
-int 	t_opt = 0;		/* min transfer size (bytes)    	    */
-int 	T_opt = 0;		/* max transfer size (bytes)    	    */
-int 	q_opt = 0;		/* quiet operation on startup   	    */
-char	TagName[40];		/* name of this iogen (see Monster)	    */
-struct	strmap *Offset_Mode;	/* M_SEQUENTIAL, M_RANDOM, etc. 	    */
-int 	Iterations;		/* # requests to generate (0 --> infinite)  */
-int 	Time_Mode = 0;		/* non-zero if Iterations is in seconds	    */
+				/* Only applies to regular files.           */
+int s_opt = 0;			/* syscalls                                 */
+int t_opt = 0;			/* min transfer size (bytes)                */
+int T_opt = 0;			/* max transfer size (bytes)                */
+int q_opt = 0;			/* quiet operation on startup               */
+char TagName[40];		/* name of this iogen (see Monster)         */
+struct strmap *Offset_Mode;	/* M_SEQUENTIAL, M_RANDOM, etc.             */
+int Iterations;			/* # requests to generate (0 --> infinite)  */
+int Time_Mode = 0;		/* non-zero if Iterations is in seconds     */
 				/* (ie. -i arg was suffixed with 's')       */
-char	*Outpipe;		/* Pipe to write output to if p_opt 	    */
-int 	Mintrans;		/* min io transfer size	    	    	    */
-int 	Maxtrans;		/* max io transfer size	    	    	    */
-int 	Rawmult;		/* raw/ssd io multiple (from -r)    	    */
-int	Minstrides;		/* min # of listio strides per request	    */
-int	Maxstrides;		/* max # of listio strides per request	    */
-int	Oflags;			/* open(2) flags for creating files	    */
-int	Ocbits;			/* open(2) cbits for creating files	    */
-int	Ocblks;			/* open(2) cblks for creating files	    */
-int	Orealtime=0;		/* flag set for -O REALTIME		    */
-int	Oextsize=0;		/* real-time extent size		    */
-int	Oreserve=1;		/* flag for -O [no]reserve		    */
-int	Oallocate=0;		/* flag for -O allocate			    */
-int	Owrite=1;		/* flag for -O nowrite			    */
+char *Outpipe;			/* Pipe to write output to if p_opt         */
+int Mintrans;			/* min io transfer size                     */
+int Maxtrans;			/* max io transfer size                     */
+int Rawmult;			/* raw/ssd io multiple (from -r)            */
+int Minstrides;			/* min # of listio strides per request      */
+int Maxstrides;			/* max # of listio strides per request      */
+int Oflags;			/* open(2) flags for creating files         */
+int Ocbits;			/* open(2) cbits for creating files         */
+int Ocblks;			/* open(2) cblks for creating files         */
+int Orealtime = 0;		/* flag set for -O REALTIME                 */
+int Oextsize = 0;		/* real-time extent size                    */
+int Oreserve = 1;		/* flag for -O [no]reserve                  */
+int Oallocate = 0;		/* flag for -O allocate                     */
+int Owrite = 1;			/* flag for -O nowrite                      */
 
-int	Nfiles = 0;		/* # files on cmdline			    */
-struct	file_info *File_List;	/* info about each file	    		    */
-int	Nflags = 0;		/* # flags on cmdline			    */
-struct	strmap *Flag_List[128];	/* flags selected from cmdline		    */
-int	Nsyscalls = 0;		/* # syscalls on cmdline		    */
-struct	strmap *Syscall_List[128]; /* syscalls selected on cmdline	    */
-int	Fileio = 0;		/* flag indicating that a file		    */
-				/* io syscall has been chosen.	 	    */
-int	Naio_Strat_Types = 0;	/* # async io completion types		    */
-struct	strmap *Aio_Strat_List[128]; /* Async io completion types	    */
+int Nfiles = 0;			/* # files on cmdline                       */
+struct file_info *File_List;	/* info about each file                     */
+int Nflags = 0;			/* # flags on cmdline                       */
+struct strmap *Flag_List[128];	/* flags selected from cmdline              */
+int Nsyscalls = 0;		/* # syscalls on cmdline                    */
+struct strmap *Syscall_List[128];	/* syscalls selected on cmdline          */
+int Fileio = 0;			/* flag indicating that a file              */
+				/* io syscall has been chosen.              */
+int Naio_Strat_Types = 0;	/* # async io completion types              */
+struct strmap *Aio_Strat_List[128];	/* Async io completion types           */
 
 /*
  * Map async io completion modes (-a args) names to values.  Macros are
  * defined in doio.h.
  */
 
-struct strmap	Aio_Strat_Map[] = {
+struct strmap Aio_Strat_Map[] = {
 #ifndef linux
-	{ "poll",	A_POLL		},
-	{ "signal",	A_SIGNAL	},
+	{"poll", A_POLL},
+	{"signal", A_SIGNAL},
 #else
-	{ "none",	0	},
+	{"none", 0},
 #endif /* !linux */
 #ifdef CRAY
 #if _UMK || RELEASE_LEVEL >= 8000
-	{ "recall",	A_RECALL	},
+	{"recall", A_RECALL},
 #endif
 
 #ifdef RECALL_SIZEOF
-	{ "recalla",    A_RECALLA	},
+	{"recalla", A_RECALLA},
 #endif
-	{ "recalls",    A_RECALLS	},
+	{"recalls", A_RECALLS},
 #endif /* CRAY */
 
 #ifdef sgi
-	{ "suspend",	A_SUSPEND	},
-	{ "callback",	A_CALLBACK	},
+	{"suspend", A_SUSPEND},
+	{"callback", A_CALLBACK},
 #endif
-	{ NULL,		-1		}
+	{NULL, -1}
 };
 
 /*
@@ -219,11 +219,11 @@
  * Map offset mode (-m args) names to values
  */
 
-struct strmap	Omode_Map[] = {
-	{ "random",		M_RANDOM	},
-	{ "sequential",		M_SEQUENTIAL    },
-	{ "reverse",		M_REVERSE   	},
-	{ NULL,			-1	    	}
+struct strmap Omode_Map[] = {
+	{"random", M_RANDOM},
+	{"sequential", M_SEQUENTIAL},
+	{"reverse", M_REVERSE},
+	{NULL, -1}
 };
 
 /*
@@ -235,82 +235,82 @@
 #define	SY_LISTIO	00020
 #define	SY_NENT		00100	/* multi entry vs multi stride >>> */
 
-struct strmap	Syscall_Map[] = {
-	{ "read",		READ,		0			},
-	{ "write",		WRITE,		SY_WRITE		},
+struct strmap Syscall_Map[] = {
+	{"read", READ, 0},
+	{"write", WRITE, SY_WRITE},
 #ifdef CRAY
-	{ "reada",		READA,		SY_ASYNC		},
-	{ "writea",		WRITEA,		SY_WRITE|SY_ASYNC	},
+	{"reada", READA, SY_ASYNC},
+	{"writea", WRITEA, SY_WRITE | SY_ASYNC},
 #ifndef _CRAYMPP
-	{ "ssread",		SSREAD,		SY_SDS			},
-	{ "sswrite",		SSWRITE,	SY_WRITE|SY_SDS		},
+	{"ssread", SSREAD, SY_SDS},
+	{"sswrite", SSWRITE, SY_WRITE | SY_SDS},
 #endif
-	{ "listio",		LISTIO,		SY_ASYNC		},
+	{"listio", LISTIO, SY_ASYNC},
 
 	/* listio as 4 system calls */
-	{ "lread",		LREAD,		0			},
-	{ "lreada",		LREADA,		SY_ASYNC		},
-	{ "lwrite",		LWRITE,		SY_WRITE		},
-	{ "lwritea",		LWRITEA,	SY_WRITE|SY_ASYNC	},
+	{"lread", LREAD, 0},
+	{"lreada", LREADA, SY_ASYNC},
+	{"lwrite", LWRITE, SY_WRITE},
+	{"lwritea", LWRITEA, SY_WRITE | SY_ASYNC},
 
 	/* listio with nstrides > 1 */
-	{ "lsread",		LSREAD,		0			},
-	{ "lsreada",		LSREADA,	SY_ASYNC		},
-	{ "lswrite",		LSWRITE,	SY_WRITE		},
-	{ "lswritea",		LSWRITEA,	SY_WRITE|SY_ASYNC	},
+	{"lsread", LSREAD, 0},
+	{"lsreada", LSREADA, SY_ASYNC},
+	{"lswrite", LSWRITE, SY_WRITE},
+	{"lswritea", LSWRITEA, SY_WRITE | SY_ASYNC},
 
 	/* listio with nents > 1 */
-	{ "leread",		LEREAD,		0|SY_NENT		},
-	{ "lereada",		LEREADA,	SY_ASYNC|SY_NENT	},
-	{ "lewrite",		LEWRITE,	SY_WRITE|SY_NENT	},
-	{ "lewritea",		LEWRITEA,	SY_WRITE|SY_ASYNC|SY_NENT },
+	{"leread", LEREAD, 0 | SY_NENT},
+	{"lereada", LEREADA, SY_ASYNC | SY_NENT},
+	{"lewrite", LEWRITE, SY_WRITE | SY_NENT},
+	{"lewritea", LEWRITEA, SY_WRITE | SY_ASYNC | SY_NENT},
 
 	/* listio with nents > 1 & nstrides > 1 */
 
 	/* all listio system calls under one name */
-	{ "listio+",		LREAD,		0			},
-	{ "listio+",		LREADA,		SY_ASYNC		},
-	{ "listio+",		LWRITE,		SY_WRITE		},
-	{ "listio+",		LWRITEA,	SY_WRITE|SY_ASYNC	},
-	{ "listio+",		LSREAD,		0			},
-	{ "listio+",		LSREADA,	SY_ASYNC		},
-	{ "listio+",		LSWRITE,	SY_WRITE		},
-	{ "listio+",		LSWRITEA,	SY_WRITE|SY_ASYNC	},
-	{ "listio+",		LEREAD,		0|SY_NENT		},
-	{ "listio+",		LEREADA,	SY_ASYNC|SY_NENT	},
-	{ "listio+",		LEWRITE,	SY_WRITE|SY_NENT	},
-	{ "listio+",		LEWRITEA,	SY_WRITE|SY_ASYNC|SY_NENT },
+	{"listio+", LREAD, 0},
+	{"listio+", LREADA, SY_ASYNC},
+	{"listio+", LWRITE, SY_WRITE},
+	{"listio+", LWRITEA, SY_WRITE | SY_ASYNC},
+	{"listio+", LSREAD, 0},
+	{"listio+", LSREADA, SY_ASYNC},
+	{"listio+", LSWRITE, SY_WRITE},
+	{"listio+", LSWRITEA, SY_WRITE | SY_ASYNC},
+	{"listio+", LEREAD, 0 | SY_NENT},
+	{"listio+", LEREADA, SY_ASYNC | SY_NENT},
+	{"listio+", LEWRITE, SY_WRITE | SY_NENT},
+	{"listio+", LEWRITEA, SY_WRITE | SY_ASYNC | SY_NENT},
 #endif
 
 #ifdef sgi
-	{ "pread",		PREAD   				},
-	{ "pwrite",		PWRITE,		SY_WRITE		},
-	{ "aread",		AREAD,		SY_ASYNC		},
-	{ "awrite",		AWRITE,		SY_WRITE|SY_ASYNC	},
+	{"pread", PREAD},
+	{"pwrite", PWRITE, SY_WRITE},
+	{"aread", AREAD, SY_ASYNC},
+	{"awrite", AWRITE, SY_WRITE | SY_ASYNC},
 #if 0
 	/* not written yet */
-	{ "llread",		LLREAD,		0			},
-	{ "llaread",		LLAREAD,	SY_ASYNC		},
-	{ "llwrite",		LLWRITE,	0			},
-	{ "llawrite",		LLAWRITE,	SY_ASYNC		},
+	{"llread", LLREAD, 0},
+	{"llaread", LLAREAD, SY_ASYNC},
+	{"llwrite", LLWRITE, 0},
+	{"llawrite", LLAWRITE, SY_ASYNC},
 #endif
-	{ "resvsp",		RESVSP, 	SY_WRITE		},
-	{ "unresvsp",		UNRESVSP, 	SY_WRITE		},
-	{ "reserve",		RESVSP, 	SY_WRITE		},
-	{ "unreserve",		UNRESVSP, 	SY_WRITE		},
-	{ "ffsync",		DFFSYNC, 	SY_WRITE		},
+	{"resvsp", RESVSP, SY_WRITE},
+	{"unresvsp", UNRESVSP, SY_WRITE},
+	{"reserve", RESVSP, SY_WRITE},
+	{"unreserve", UNRESVSP, SY_WRITE},
+	{"ffsync", DFFSYNC, SY_WRITE},
 #endif /* SGI */
 
 #ifndef CRAY
-	{ "readv",		READV					},
-	{ "writev",		WRITEV,		SY_WRITE		},
-	{ "mmread",		MMAPR					},
-	{ "mmwrite",		MMAPW,		SY_WRITE		},
-	{ "fsync2",		FSYNC2, 	SY_WRITE		},
-	{ "fdatasync",		FDATASYNC, 	SY_WRITE		},
+	{"readv", READV},
+	{"writev", WRITEV, SY_WRITE},
+	{"mmread", MMAPR},
+	{"mmwrite", MMAPW, SY_WRITE},
+	{"fsync2", FSYNC2, SY_WRITE},
+	{"fdatasync", FDATASYNC, SY_WRITE},
 #endif
 
-	{ NULL,			-1      }
+	{NULL, -1}
 };
 
 /*
@@ -318,215 +318,209 @@
  */
 #define	FLG_RAW		00001
 
-struct strmap	Flag_Map[] = {
-	{ "buffered",		0,			0	},
-	{ "sync",		O_SYNC,			0	},
+struct strmap Flag_Map[] = {
+	{"buffered", 0, 0},
+	{"sync", O_SYNC, 0},
 #ifdef CRAY
-	{ "raw",		O_RAW,			FLG_RAW	},
-	{ "raw+wf",		O_RAW | O_WELLFORMED,	FLG_RAW	},
-	{ "raw+wf+ldraw",	O_RAW | O_WELLFORMED | O_LDRAW,	FLG_RAW	},
-	{ "raw+wf+ldraw+sync",	O_RAW | O_WELLFORMED | O_LDRAW | O_SYNC, FLG_RAW },
+	{"raw", O_RAW, FLG_RAW},
+	{"raw+wf", O_RAW | O_WELLFORMED, FLG_RAW},
+	{"raw+wf+ldraw", O_RAW | O_WELLFORMED | O_LDRAW, FLG_RAW},
+	{"raw+wf+ldraw+sync", O_RAW | O_WELLFORMED | O_LDRAW | O_SYNC, FLG_RAW},
 #ifdef O_SSD
-	{ "ssd",		O_SSD,			FLG_RAW	},
+	{"ssd", O_SSD, FLG_RAW},
 #endif
 #ifdef O_LDRAW
-	{ "ldraw",		O_LDRAW,		0	},
+	{"ldraw", O_LDRAW, 0},
 #endif
 #ifdef O_PARALLEL
-	{ "parallel",		O_PARALLEL | O_RAW | O_WELLFORMED,
-		  FLG_RAW },
-	{ "parallel+sync",	O_PARALLEL | O_RAW | O_WELLFORMED | O_SYNC,
-		  FLG_RAW },
-	{ "parallel+ldraw",	O_PARALLEL | O_RAW | O_WELLFORMED | O_LDRAW,
-		  FLG_RAW },
-	{ "parallel+ldraw+sync",
-		  O_PARALLEL | O_RAW | O_WELLFORMED | O_LDRAW | O_SYNC,
-		  FLG_RAW },
+	{"parallel", O_PARALLEL | O_RAW | O_WELLFORMED,
+	 FLG_RAW},
+	{"parallel+sync", O_PARALLEL | O_RAW | O_WELLFORMED | O_SYNC,
+	 FLG_RAW},
+	{"parallel+ldraw", O_PARALLEL | O_RAW | O_WELLFORMED | O_LDRAW,
+	 FLG_RAW},
+	{"parallel+ldraw+sync",
+	 O_PARALLEL | O_RAW | O_WELLFORMED | O_LDRAW | O_SYNC,
+	 FLG_RAW},
 #endif
 #endif /* CRAY */
 
 #ifdef sgi
-	{ "direct",		O_DIRECT,		FLG_RAW },
-	{ "dsync",		O_DSYNC		},	/* affects writes */
-	{ "rsync",		O_RSYNC		},	/* affects reads */
-	{ "rsync+dsync",	O_RSYNC|O_DSYNC	},
+	{"direct", O_DIRECT, FLG_RAW},
+	{"dsync", O_DSYNC},	/* affects writes */
+	{"rsync", O_RSYNC},	/* affects reads */
+	{"rsync+dsync", O_RSYNC | O_DSYNC},
 #endif
-	{ NULL, 	    -1	    	}
+	{NULL, -1}
 };
 
 /*
  * Map file types to strings
  */
 
-struct strmap	Ftype_Map[] = {
-	{ "regular",	S_IFREG },
-	{ "blk-spec",	S_IFBLK },
-	{ "chr-spec",	S_IFCHR },
-	{ NULL,		0 }
+struct strmap Ftype_Map[] = {
+	{"regular", S_IFREG},
+	{"blk-spec", S_IFBLK},
+	{"chr-spec", S_IFCHR},
+	{NULL, 0}
 };
 
 /*
  * Misc declarations
  */
 
-int		Sds_Avail;
+int Sds_Avail;
 
-char	Byte_Patterns[26] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
-			      'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
-			      'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
-			      'Y', 'Z' };
+char Byte_Patterns[26] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+	'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+	'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+	'Y', 'Z'
+};
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-    int	    	    rseed, outfd, infinite;
-    time_t  	    start_time;
-    struct io_req   req;
+	int rseed, outfd, infinite;
+	time_t start_time;
+	struct io_req req;
 
-    umask(0);
+	umask(0);
 
 #ifdef CRAY
-    Sds_Avail = sysconf(_SC_CRAY_SDS);
+	Sds_Avail = sysconf(_SC_CRAY_SDS);
 #else
-    Sds_Avail = 0;
+	Sds_Avail = 0;
 #endif
 
-    TagName[0] = '\0';
-    parse_cmdline(argc, argv, OPTS);
+	TagName[0] = '\0';
+	parse_cmdline(argc, argv, OPTS);
 
-    /*
-     * Initialize output descriptor.
-     */
-    if (! p_opt) {
-	outfd = 1;
-    } else {
-	outfd = init_output();
-    }
+	/*
+	 * Initialize output descriptor.
+	 */
+	if (!p_opt) {
+		outfd = 1;
+	} else {
+		outfd = init_output();
+	}
 
-    rseed = getpid();
-    random_range_seed(rseed);       /* initialize random number generator */
+	rseed = getpid();
+	random_range_seed(rseed);	/* initialize random number generator */
 
-    /*
-     * Print out startup information, unless we're running in quiet mode
-     */
-    if (!q_opt)
-	startup_info(stderr, rseed);
+	/*
+	 * Print out startup information, unless we're running in quiet mode
+	 */
+	if (!q_opt)
+		startup_info(stderr, rseed);
 	{
-    	struct timeval ts;
-		gettimeofday(&ts,NULL);
+		struct timeval ts;
+		gettimeofday(&ts, NULL);
 		start_time = ts.tv_sec;
 	}
-    /*
-     * While iterations (or forever if Iterations == 0) - compute an
-     * io request, and write the structure to the output descriptor
-     */
+	/*
+	 * While iterations (or forever if Iterations == 0) - compute an
+	 * io request, and write the structure to the output descriptor
+	 */
 
-    infinite = !Iterations;
+	infinite = !Iterations;
 	struct timeval ts;
-	gettimeofday(&ts,NULL);
-    while (infinite ||
-	   (! Time_Mode && Iterations--) ||
-	   (Time_Mode && (ts.tv_sec - start_time <= Iterations))) {
-	gettimeofday(&ts,NULL);
-	memset(&req, 0, sizeof(struct io_req));
-	if (form_iorequest(&req) == -1) {
-	    fprintf(stderr, "iogen%s:  form_iorequest() failed\n", TagName);
-	    continue;
+	gettimeofday(&ts, NULL);
+	while (infinite ||
+	       (!Time_Mode && Iterations--) ||
+	       (Time_Mode && (ts.tv_sec - start_time <= Iterations))) {
+		gettimeofday(&ts, NULL);
+		memset(&req, 0, sizeof(struct io_req));
+		if (form_iorequest(&req) == -1) {
+			fprintf(stderr, "iogen%s:  form_iorequest() failed\n",
+				TagName);
+			continue;
+		}
+
+		req.r_magic = DOIO_MAGIC;
+		if (write(outfd, (char *)&req, sizeof(req)) == -1)
+			perror("Warning: Could not write");
 	}
 
-	req.r_magic = DOIO_MAGIC;
-	if (write(outfd, (char *)&req, sizeof(req)) == -1)
-		perror("Warning: Could not write");
-    }
+	exit(0);
 
-    exit(0);
+}				/* main */
 
-}   /* main */
-
-void
-startup_info(FILE *stream, int seed)
+void startup_info(FILE * stream, int seed)
 {
-    char	*value_to_string(), *type;
-    int		i;
-
-    fprintf(stream, "\n");
-    fprintf(stream, "iogen%s starting up with the following:\n", TagName);
-    fprintf(stream, "\n");
-
-    fprintf(stream, "Out-pipe:              %s\n",
-	    p_opt ? Outpipe : "stdout");
-
-    if (Iterations) {
-	fprintf(stream, "Iterations:            %d", Iterations);
-	if (Time_Mode)
-	    fprintf(stream, " seconds");
+	char *value_to_string(), *type;
+	int i;
 
 	fprintf(stream, "\n");
-    } else {
-	fprintf(stream, "Iterations:            Infinite\n");
-    }
-
-    fprintf(stream,
-	    "Seed:                  %d\n", seed);
-
-    fprintf(stream,
-	    "Offset-Mode:           %s\n", Offset_Mode->m_string);
-
-    fprintf(stream, "Overlap Flag:          %s\n",
-	    o_opt ? "on" : "off");
-
-    fprintf(stream,
-	    "Mintrans:              %-11d (%d blocks)\n",
-	    Mintrans, (Mintrans+BSIZE-1)/BSIZE);
-
-    fprintf(stream,
-	    "Maxtrans:              %-11d (%d blocks)\n",
-	    Maxtrans, (Maxtrans+BSIZE-1)/BSIZE);
-
-    if (! r_opt)
-	fprintf(stream,
-		"O_RAW/O_SSD Multiple:  (Determined by device)\n");
-    else
-	fprintf(stream,
-		"O_RAW/O_SSD Multiple:  %-11d (%d blocks)\n",
-		Rawmult, (Rawmult+BSIZE-1)/BSIZE);
-
-    fprintf(stream, "Syscalls:              ");
-    for (i = 0; i < Nsyscalls; i++)
-	fprintf(stream,
-		"%s ", Syscall_List[i]->m_string);
-    fprintf(stream, "\n");
-
-    fprintf(stream, "Aio completion types:  ");
-    for (i = 0; i < Naio_Strat_Types; i++)
-	fprintf(stream,
-		"%s ", Aio_Strat_List[i]->m_string);
-    fprintf(stream, "\n");
-
-    if (Fileio) {
-	fprintf(stream, "Flags:                 ");
-	for (i = 0; i < Nflags; i++)
-	    fprintf(stream,
-		    "%s ", Flag_List[i]->m_string);
-
+	fprintf(stream, "iogen%s starting up with the following:\n", TagName);
 	fprintf(stream, "\n");
-	fprintf(stream, "\n");
-	fprintf(stream, "Test Files:  \n");
-	fprintf(stream, "\n");
-	fprintf(stream,
-		"Path                                          Length    iou   raw iou file\n");
-	fprintf(stream,
-		"                                              (bytes) (bytes) (bytes) type\n");
-	fprintf(stream,
-		"-----------------------------------------------------------------------------\n");
 
-	for (i = 0; i < Nfiles; i++) {
-	    type = value_to_string(Ftype_Map, File_List[i].f_type);
-	    fprintf(stream, "%-40s %12d %7d %7d %s\n",
-		    File_List[i].f_path, File_List[i].f_length,
-		    File_List[i].f_iou, File_List[i].f_riou, type);
+	fprintf(stream, "Out-pipe:              %s\n",
+		p_opt ? Outpipe : "stdout");
+
+	if (Iterations) {
+		fprintf(stream, "Iterations:            %d", Iterations);
+		if (Time_Mode)
+			fprintf(stream, " seconds");
+
+		fprintf(stream, "\n");
+	} else {
+		fprintf(stream, "Iterations:            Infinite\n");
 	}
-    }
+
+	fprintf(stream, "Seed:                  %d\n", seed);
+
+	fprintf(stream, "Offset-Mode:           %s\n", Offset_Mode->m_string);
+
+	fprintf(stream, "Overlap Flag:          %s\n", o_opt ? "on" : "off");
+
+	fprintf(stream,
+		"Mintrans:              %-11d (%d blocks)\n",
+		Mintrans, (Mintrans + BSIZE - 1) / BSIZE);
+
+	fprintf(stream,
+		"Maxtrans:              %-11d (%d blocks)\n",
+		Maxtrans, (Maxtrans + BSIZE - 1) / BSIZE);
+
+	if (!r_opt)
+		fprintf(stream,
+			"O_RAW/O_SSD Multiple:  (Determined by device)\n");
+	else
+		fprintf(stream,
+			"O_RAW/O_SSD Multiple:  %-11d (%d blocks)\n",
+			Rawmult, (Rawmult + BSIZE - 1) / BSIZE);
+
+	fprintf(stream, "Syscalls:              ");
+	for (i = 0; i < Nsyscalls; i++)
+		fprintf(stream, "%s ", Syscall_List[i]->m_string);
+	fprintf(stream, "\n");
+
+	fprintf(stream, "Aio completion types:  ");
+	for (i = 0; i < Naio_Strat_Types; i++)
+		fprintf(stream, "%s ", Aio_Strat_List[i]->m_string);
+	fprintf(stream, "\n");
+
+	if (Fileio) {
+		fprintf(stream, "Flags:                 ");
+		for (i = 0; i < Nflags; i++)
+			fprintf(stream, "%s ", Flag_List[i]->m_string);
+
+		fprintf(stream, "\n");
+		fprintf(stream, "\n");
+		fprintf(stream, "Test Files:  \n");
+		fprintf(stream, "\n");
+		fprintf(stream,
+			"Path                                          Length    iou   raw iou file\n");
+		fprintf(stream,
+			"                                              (bytes) (bytes) (bytes) type\n");
+		fprintf(stream,
+			"-----------------------------------------------------------------------------\n");
+
+		for (i = 0; i < Nfiles; i++) {
+			type = value_to_string(Ftype_Map, File_List[i].f_type);
+			fprintf(stream, "%-40s %12d %7d %7d %s\n",
+				File_List[i].f_path, File_List[i].f_length,
+				File_List[i].f_iou, File_List[i].f_riou, type);
+		}
+	}
 }
 
 /*
@@ -534,41 +528,42 @@
  * otherwise, attempt to create a FIFO on path Outpipe.  Exit with an
  * error code if this cannot be done.
  */
-int
-init_output(void)
+int init_output(void)
 {
-    int	 outfd;
-    struct stat	    sbuf;
+	int outfd;
+	struct stat sbuf;
 
-    if (stat(Outpipe, &sbuf) == -1) {
-	if (errno == ENOENT) {
-	    if (mkfifo(Outpipe, 0666) == -1) {
-		fprintf(stderr, "iogen%s:  Could not mkfifo %s:  %s\n",
+	if (stat(Outpipe, &sbuf) == -1) {
+		if (errno == ENOENT) {
+			if (mkfifo(Outpipe, 0666) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Could not mkfifo %s:  %s\n",
+					TagName, Outpipe, SYSERR);
+				exit(2);
+			}
+		} else {
+			fprintf(stderr,
+				"iogen%s:  Could not stat outpipe %s:  %s\n",
+				TagName, Outpipe, SYSERR);
+			exit(2);
+		}
+	} else {
+		if (!S_ISFIFO(sbuf.st_mode)) {
+			fprintf(stderr,
+				"iogen%s:  Output file %s exists, but is not a FIFO\n",
+				TagName, Outpipe);
+			exit(2);
+		}
+	}
+
+	if ((outfd = open(Outpipe, O_RDWR)) == -1) {
+		fprintf(stderr,
+			"iogen%s:  Couldn't open outpipe %s with flags O_RDWR: %s\n",
 			TagName, Outpipe, SYSERR);
 		exit(2);
-	    }
-	} else {
-	    fprintf(stderr, "iogen%s:  Could not stat outpipe %s:  %s\n",
-		    TagName, Outpipe, SYSERR);
-	    exit(2);
 	}
-    } else {
-	if (! S_ISFIFO(sbuf.st_mode)) {
-	    fprintf(stderr,
-		    "iogen%s:  Output file %s exists, but is not a FIFO\n",
-		    TagName, Outpipe);
-	    exit(2);
-	}
-    }
 
-    if ((outfd = open(Outpipe, O_RDWR)) == -1) {
-	fprintf(stderr,
-		"iogen%s:  Couldn't open outpipe %s with flags O_RDWR: %s\n",
-		TagName, Outpipe, SYSERR);
-	exit(2);
-    }
-
-    return(outfd);
+	return (outfd);
 }
 
 /*
@@ -580,339 +575,363 @@
  * returns -1.
  */
 
-int
-form_iorequest(struct io_req *req)
+int form_iorequest(struct io_req *req)
 {
-    int	    	    	mult, offset=0, length=0, slength;
-    int	    	    	minlength, maxlength, laststart, lastend;
-    int	    	    	minoffset, maxoffset;
-    int			maxstride, nstrides;
-    char    	    	pattern, *errp;
-    struct strmap	*flags, *sc, *aio_strat;
-    struct file_info	*fptr;
+	int mult, offset = 0, length = 0, slength;
+	int minlength, maxlength, laststart, lastend;
+	int minoffset, maxoffset;
+	int maxstride, nstrides;
+	char pattern, *errp;
+	struct strmap *flags, *sc, *aio_strat;
+	struct file_info *fptr;
 #ifdef CRAY
-    int                 opcode, cmd;
+	int opcode, cmd;
 #endif
 
-    /*
-     * Choose system call, flags, and file
-     */
+	/*
+	 * Choose system call, flags, and file
+	 */
 
-    sc = Syscall_List[random_range(0, Nsyscalls-1, 1, NULL)];
-    req->r_type = sc->m_value;
+	sc = Syscall_List[random_range(0, Nsyscalls - 1, 1, NULL)];
+	req->r_type = sc->m_value;
 
 #ifdef CRAY
-    if (sc->m_value == LISTIO) {
-	    opcode = random_range(0, 1, 1, NULL) ? LO_READ : LO_WRITE;
-	    cmd = random_range(0, 1, 1, NULL) ? LC_START : LC_WAIT;
-    }
+	if (sc->m_value == LISTIO) {
+		opcode = random_range(0, 1, 1, NULL) ? LO_READ : LO_WRITE;
+		cmd = random_range(0, 1, 1, NULL) ? LC_START : LC_WAIT;
+	}
 #endif
 
-    if (sc->m_flags & SY_WRITE)
-	    pattern = Byte_Patterns[random_range(0, sizeof(Byte_Patterns) - 1, 1, NULL)];
-    else
-	    pattern = 0;
+	if (sc->m_flags & SY_WRITE)
+		pattern =
+		    Byte_Patterns[random_range
+				  (0, sizeof(Byte_Patterns) - 1, 1, NULL)];
+	else
+		pattern = 0;
 
 #if CRAY
-    /*
-     * If sds io, simply choose a length (possibly pattern) and return
-     */
-
-    if (sc->m_flags & SY_SDS) {
-	    req->r_data.ssread.r_nbytes = random_range(Mintrans, Maxtrans, BSIZE, NULL);
-	    if (sc->m_flags & SY_WRITE)
-		    req->r_data.sswrite.r_pattern = pattern;
-
-	  return 0;
-    }
-#endif
-
-    /*
-     * otherwise, we're doing file io.  Choose starting offset, length,
-     * open flags, and possibly a pattern (for write/writea).
-     */
-
-    fptr = &File_List[random_range(0, Nfiles-1, 1, NULL)];
-    flags = Flag_List[random_range(0, Nflags-1, 1, NULL)];
-
-    /*
-     * Choose offset/length multiple.  IO going to a device, or regular
-     * IO that is O_RAW or O_SSD must be aligned on the file r_iou.  Otherwise
-     * it must be aligned on the regular iou (normally 1).
-     */
-
-    if (fptr->f_type == S_IFREG && (flags->m_flags & FLG_RAW))
-	    mult = fptr->f_riou;
-    else
-	    mult = fptr->f_iou;
-
-    /*
-     * Choose offset and length.  Both must be a multiple of mult
-     */
-
-    /*
-     * Choose length first - it must be a multiple of mult
-     */
-
-    laststart = fptr->f_lastoffset;
-    lastend = fptr->f_lastoffset + fptr->f_lastlength - 1;
-
-    minlength = (Mintrans > mult) ? Mintrans : mult;
-
-    switch (Offset_Mode->m_value) {
-    case M_SEQUENTIAL:
-	if (o_opt && lastend > laststart)
-	    offset = random_range(laststart, lastend, 1, NULL);
-	else
-	    offset = lastend + 1;
- 	if (offset && (offset%mult))
-	    offset += mult - (offset % mult);
-
-	if (minlength > fptr->f_length - offset)
-	    offset = 0;
-
-	maxlength = fptr->f_length - offset;
-	if (maxlength > Maxtrans)
-	    maxlength = Maxtrans;
-
-	length = random_range(minlength, maxlength, mult, &errp);
-	if (errp != NULL) {
-	    fprintf(stderr, "iogen%s:  random_range(%d, %d, %d) failed\n",
-		    TagName, minlength, maxlength, mult);
-	    return -1;
-	}
-
-	break;
-
-    case M_REVERSE:
-	maxlength = laststart;
-
-	if (maxlength > Maxtrans)
-	    maxlength = Maxtrans;
-
-	if (minlength > maxlength) {
-	    laststart = fptr->f_length;
-	    lastend = fptr->f_length;
-	    maxlength = Maxtrans;
-	}
-
-	length = random_range(minlength, maxlength, mult, &errp);
-	if (errp != NULL) {
-	    fprintf(stderr, "iogen%s:  random_range(%d, %d, %d) failed\n",
-		    TagName, minlength, maxlength, mult);
-	    return -1;
-	}
-
-	offset = laststart - length;
-
-	if (o_opt && lastend > laststart)
-	    offset += random_range(1, lastend - laststart, 1, NULL);
-
-	if (offset &&  (offset%mult))
-	    offset -= offset % mult;
-
-	break;
-
-    case M_RANDOM:
-	length = random_range(Mintrans, Maxtrans, mult, NULL);
-
-	if (o_opt && lastend > laststart) {
-		minoffset = laststart - length + 1;
-		if (minoffset < 0) {
-			minoffset = 0;
-		}
-
-		if (lastend + length > fptr->f_length) {
-			maxoffset = fptr->f_length - length;
-		} else {
-			maxoffset = lastend;
-		}
-	} else {
-	    minoffset = 0;
-	    maxoffset = fptr->f_length - length;
-	}
-
-	if (minoffset < 0)
-	    minoffset = 0;
-
-	offset = random_range(minoffset, maxoffset, mult, &errp);
-	if (errp != NULL) {
-	    fprintf(stderr, "iogen%s:  random_range(%d, %d, %d) failed\n",
-		    TagName, minoffset, maxoffset, mult);
-	    return -1;
-	}
-    }
-
-    fptr->f_lastoffset = offset;
-    fptr->f_lastlength = length;
-
-    /*
-     * Choose an async io completion strategy if necessary
-     */
-    if (sc->m_flags & SY_ASYNC)
-	    aio_strat = Aio_Strat_List[random_range(0, Naio_Strat_Types - 1,
-						    1, NULL)];
-    else
-	    aio_strat = NULL;
-
-    /*
-     * fill in specific syscall record data
-     */
-    switch (sc->m_value) {
-    case READ:
-    case READA:
-	strcpy(req->r_data.read.r_file, fptr->f_path);
-	req->r_data.read.r_oflags = O_RDONLY | flags->m_value;
-	req->r_data.read.r_offset = offset;
-	req->r_data.read.r_nbytes = length;
-	req->r_data.read.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-	req->r_data.read.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.read.r_nstrides = 1;
-	req->r_data.read.r_nent = 1;
-	break;
-
-    case WRITE:
-    case WRITEA:
-	strcpy(req->r_data.write.r_file, fptr->f_path);
-	req->r_data.write.r_oflags = O_WRONLY | flags->m_value;
-	req->r_data.write.r_offset = offset;
-	req->r_data.write.r_nbytes = length;
-	req->r_data.write.r_pattern = pattern;
-	req->r_data.write.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-	req->r_data.write.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.write.r_nstrides = 1;
-	req->r_data.write.r_nent = 1;
-	break;
-
-    case READV:
-    case AREAD:
-    case PREAD:
-    case WRITEV:
-    case AWRITE:
-    case PWRITE:
-
-    case LREAD:
-    case LREADA:
-    case LWRITE:
-    case LWRITEA:
-
-    case RESVSP:
-    case UNRESVSP:
-    case DFFSYNC:
-    case FSYNC2:
-    case FDATASYNC:
-
-	strcpy(req->r_data.io.r_file, fptr->f_path);
-	req->r_data.io.r_oflags = ((sc->m_flags & SY_WRITE) ? O_WRONLY : O_RDONLY) | flags->m_value;
-	req->r_data.io.r_offset = offset;
-	req->r_data.io.r_nbytes = length;
-	req->r_data.io.r_pattern = pattern;
-	req->r_data.io.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-	req->r_data.io.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.io.r_nstrides = 1;
-	req->r_data.io.r_nent = 1;
-	break;
-
-    case MMAPR:
-    case MMAPW:
-	strcpy(req->r_data.io.r_file, fptr->f_path);
-	/* a subtle "feature" of mmap: a write-map requires
-           the file open read/write */
-	req->r_data.io.r_oflags = ((sc->m_flags & SY_WRITE) ? O_RDWR : O_RDONLY) | flags->m_value;
-	req->r_data.io.r_offset = offset;
-	req->r_data.io.r_nbytes = length;
-	req->r_data.io.r_pattern = pattern;
-	req->r_data.io.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-	req->r_data.io.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.io.r_nstrides = 1;
-	req->r_data.io.r_nent = 1;
-	break;
-
-    case LSREAD:
-    case LSREADA:
-    case LEREAD:
-    case LEREADA:
-    case LSWRITE:
-    case LSWRITEA:
-    case LEWRITE:
-    case LEWRITEA:
-	/* multi-strided */
-	strcpy(req->r_data.io.r_file, fptr->f_path);
-	req->r_data.io.r_oflags = ((sc->m_flags & SY_WRITE) ? O_WRONLY : O_RDONLY) | flags->m_value;
-	req->r_data.io.r_offset = offset;
-	req->r_data.io.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-	req->r_data.io.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.io.r_pattern = pattern;
-
-	/* multi-strided request...
-	 *  random number of strides (1...MaxStrides)
-	 *  length of stride must be > minlength
-	 *  length of stride must be % mult
-	 *
-	 * maxstrides = min(length / mult, overall.max#strides)
-	 * nstrides = random #
-	 * while (length / nstrides < minlength)
-	 *	nstrides = new random #
+	/*
+	 * If sds io, simply choose a length (possibly pattern) and return
 	 */
-	maxstride = length / mult;
-	if (maxstride > Maxstrides)
-	    maxstride = Maxstrides;
 
-	if (!Minstrides)
-		Minstrides=1;
-	nstrides = random_range(Minstrides, maxstride, 1, &errp);
-	if (errp != NULL) {
-	    fprintf(stderr, "iogen%s:  random_range(%d, %d, %d) failed\n",
-		    TagName, Minstrides, maxstride, 1);
-	    return -1;
-	}
+	if (sc->m_flags & SY_SDS) {
+		req->r_data.ssread.r_nbytes =
+		    random_range(Mintrans, Maxtrans, BSIZE, NULL);
+		if (sc->m_flags & SY_WRITE)
+			req->r_data.sswrite.r_pattern = pattern;
 
-	slength = length / nstrides;
-	if (slength % mult != 0) {
-	    if (mult > slength) {
-		slength = mult;
-	    } else {
-		slength -= slength % mult;
-	    }
-	    nstrides = length / slength;
-	    if (nstrides > Maxstrides)
-		    nstrides = Maxstrides;
-	}
-
-	req->r_data.io.r_nbytes = slength;
-	if (sc->m_flags & SY_NENT) {
-		req->r_data.io.r_nstrides = 1;
-		req->r_data.io.r_nent = nstrides;
-	} else {
-		req->r_data.io.r_nstrides = nstrides;
-		req->r_data.io.r_nent = 1;
-	}
-	break;
-
-    case LISTIO:
-#ifdef CRAY
-	strcpy(req->r_data.listio.r_file, fptr->f_path);
-	req->r_data.listio.r_offset = offset;
-	req->r_data.listio.r_cmd = cmd;
-	req->r_data.listio.r_aio_strat = (aio_strat==NULL) ? 0 : aio_strat->m_value;
-	req->r_data.listio.r_filestride = 0;
-	req->r_data.listio.r_memstride = 0;
-	req->r_data.listio.r_opcode = opcode;
-	req->r_data.listio.r_nstrides = 1;
-	req->r_data.listio.r_nbytes = length;
-	req->r_data.listio.r_uflags = (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
-
-	if (opcode == LO_WRITE) {
-		req->r_data.listio.r_pattern = pattern;
-		req->r_data.listio.r_oflags = O_WRONLY | flags->m_value;
-	} else {
-		req->r_data.listio.r_oflags = O_RDONLY | flags->m_value;
+		return 0;
 	}
 #endif
-	break;
-    }
 
-  return 0;
+	/*
+	 * otherwise, we're doing file io.  Choose starting offset, length,
+	 * open flags, and possibly a pattern (for write/writea).
+	 */
+
+	fptr = &File_List[random_range(0, Nfiles - 1, 1, NULL)];
+	flags = Flag_List[random_range(0, Nflags - 1, 1, NULL)];
+
+	/*
+	 * Choose offset/length multiple.  IO going to a device, or regular
+	 * IO that is O_RAW or O_SSD must be aligned on the file r_iou.  Otherwise
+	 * it must be aligned on the regular iou (normally 1).
+	 */
+
+	if (fptr->f_type == S_IFREG && (flags->m_flags & FLG_RAW))
+		mult = fptr->f_riou;
+	else
+		mult = fptr->f_iou;
+
+	/*
+	 * Choose offset and length.  Both must be a multiple of mult
+	 */
+
+	/*
+	 * Choose length first - it must be a multiple of mult
+	 */
+
+	laststart = fptr->f_lastoffset;
+	lastend = fptr->f_lastoffset + fptr->f_lastlength - 1;
+
+	minlength = (Mintrans > mult) ? Mintrans : mult;
+
+	switch (Offset_Mode->m_value) {
+	case M_SEQUENTIAL:
+		if (o_opt && lastend > laststart)
+			offset = random_range(laststart, lastend, 1, NULL);
+		else
+			offset = lastend + 1;
+		if (offset && (offset % mult))
+			offset += mult - (offset % mult);
+
+		if (minlength > fptr->f_length - offset)
+			offset = 0;
+
+		maxlength = fptr->f_length - offset;
+		if (maxlength > Maxtrans)
+			maxlength = Maxtrans;
+
+		length = random_range(minlength, maxlength, mult, &errp);
+		if (errp != NULL) {
+			fprintf(stderr,
+				"iogen%s:  random_range(%d, %d, %d) failed\n",
+				TagName, minlength, maxlength, mult);
+			return -1;
+		}
+
+		break;
+
+	case M_REVERSE:
+		maxlength = laststart;
+
+		if (maxlength > Maxtrans)
+			maxlength = Maxtrans;
+
+		if (minlength > maxlength) {
+			laststart = fptr->f_length;
+			lastend = fptr->f_length;
+			maxlength = Maxtrans;
+		}
+
+		length = random_range(minlength, maxlength, mult, &errp);
+		if (errp != NULL) {
+			fprintf(stderr,
+				"iogen%s:  random_range(%d, %d, %d) failed\n",
+				TagName, minlength, maxlength, mult);
+			return -1;
+		}
+
+		offset = laststart - length;
+
+		if (o_opt && lastend > laststart)
+			offset += random_range(1, lastend - laststart, 1, NULL);
+
+		if (offset && (offset % mult))
+			offset -= offset % mult;
+
+		break;
+
+	case M_RANDOM:
+		length = random_range(Mintrans, Maxtrans, mult, NULL);
+
+		if (o_opt && lastend > laststart) {
+			minoffset = laststart - length + 1;
+			if (minoffset < 0) {
+				minoffset = 0;
+			}
+
+			if (lastend + length > fptr->f_length) {
+				maxoffset = fptr->f_length - length;
+			} else {
+				maxoffset = lastend;
+			}
+		} else {
+			minoffset = 0;
+			maxoffset = fptr->f_length - length;
+		}
+
+		if (minoffset < 0)
+			minoffset = 0;
+
+		offset = random_range(minoffset, maxoffset, mult, &errp);
+		if (errp != NULL) {
+			fprintf(stderr,
+				"iogen%s:  random_range(%d, %d, %d) failed\n",
+				TagName, minoffset, maxoffset, mult);
+			return -1;
+		}
+	}
+
+	fptr->f_lastoffset = offset;
+	fptr->f_lastlength = length;
+
+	/*
+	 * Choose an async io completion strategy if necessary
+	 */
+	if (sc->m_flags & SY_ASYNC)
+		aio_strat = Aio_Strat_List[random_range(0, Naio_Strat_Types - 1,
+							1, NULL)];
+	else
+		aio_strat = NULL;
+
+	/*
+	 * fill in specific syscall record data
+	 */
+	switch (sc->m_value) {
+	case READ:
+	case READA:
+		strcpy(req->r_data.read.r_file, fptr->f_path);
+		req->r_data.read.r_oflags = O_RDONLY | flags->m_value;
+		req->r_data.read.r_offset = offset;
+		req->r_data.read.r_nbytes = length;
+		req->r_data.read.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+		req->r_data.read.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.read.r_nstrides = 1;
+		req->r_data.read.r_nent = 1;
+		break;
+
+	case WRITE:
+	case WRITEA:
+		strcpy(req->r_data.write.r_file, fptr->f_path);
+		req->r_data.write.r_oflags = O_WRONLY | flags->m_value;
+		req->r_data.write.r_offset = offset;
+		req->r_data.write.r_nbytes = length;
+		req->r_data.write.r_pattern = pattern;
+		req->r_data.write.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+		req->r_data.write.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.write.r_nstrides = 1;
+		req->r_data.write.r_nent = 1;
+		break;
+
+	case READV:
+	case AREAD:
+	case PREAD:
+	case WRITEV:
+	case AWRITE:
+	case PWRITE:
+
+	case LREAD:
+	case LREADA:
+	case LWRITE:
+	case LWRITEA:
+
+	case RESVSP:
+	case UNRESVSP:
+	case DFFSYNC:
+	case FSYNC2:
+	case FDATASYNC:
+
+		strcpy(req->r_data.io.r_file, fptr->f_path);
+		req->r_data.io.r_oflags =
+		    ((sc->m_flags & SY_WRITE) ? O_WRONLY : O_RDONLY) | flags->
+		    m_value;
+		req->r_data.io.r_offset = offset;
+		req->r_data.io.r_nbytes = length;
+		req->r_data.io.r_pattern = pattern;
+		req->r_data.io.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+		req->r_data.io.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.io.r_nstrides = 1;
+		req->r_data.io.r_nent = 1;
+		break;
+
+	case MMAPR:
+	case MMAPW:
+		strcpy(req->r_data.io.r_file, fptr->f_path);
+		/* a subtle "feature" of mmap: a write-map requires
+		   the file open read/write */
+		req->r_data.io.r_oflags =
+		    ((sc->m_flags & SY_WRITE) ? O_RDWR : O_RDONLY) | flags->
+		    m_value;
+		req->r_data.io.r_offset = offset;
+		req->r_data.io.r_nbytes = length;
+		req->r_data.io.r_pattern = pattern;
+		req->r_data.io.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+		req->r_data.io.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.io.r_nstrides = 1;
+		req->r_data.io.r_nent = 1;
+		break;
+
+	case LSREAD:
+	case LSREADA:
+	case LEREAD:
+	case LEREADA:
+	case LSWRITE:
+	case LSWRITEA:
+	case LEWRITE:
+	case LEWRITEA:
+		/* multi-strided */
+		strcpy(req->r_data.io.r_file, fptr->f_path);
+		req->r_data.io.r_oflags =
+		    ((sc->m_flags & SY_WRITE) ? O_WRONLY : O_RDONLY) | flags->
+		    m_value;
+		req->r_data.io.r_offset = offset;
+		req->r_data.io.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+		req->r_data.io.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.io.r_pattern = pattern;
+
+		/* multi-strided request...
+		 *  random number of strides (1...MaxStrides)
+		 *  length of stride must be > minlength
+		 *  length of stride must be % mult
+		 *
+		 * maxstrides = min(length / mult, overall.max#strides)
+		 * nstrides = random #
+		 * while (length / nstrides < minlength)
+		 *      nstrides = new random #
+		 */
+		maxstride = length / mult;
+		if (maxstride > Maxstrides)
+			maxstride = Maxstrides;
+
+		if (!Minstrides)
+			Minstrides = 1;
+		nstrides = random_range(Minstrides, maxstride, 1, &errp);
+		if (errp != NULL) {
+			fprintf(stderr,
+				"iogen%s:  random_range(%d, %d, %d) failed\n",
+				TagName, Minstrides, maxstride, 1);
+			return -1;
+		}
+
+		slength = length / nstrides;
+		if (slength % mult != 0) {
+			if (mult > slength) {
+				slength = mult;
+			} else {
+				slength -= slength % mult;
+			}
+			nstrides = length / slength;
+			if (nstrides > Maxstrides)
+				nstrides = Maxstrides;
+		}
+
+		req->r_data.io.r_nbytes = slength;
+		if (sc->m_flags & SY_NENT) {
+			req->r_data.io.r_nstrides = 1;
+			req->r_data.io.r_nent = nstrides;
+		} else {
+			req->r_data.io.r_nstrides = nstrides;
+			req->r_data.io.r_nent = 1;
+		}
+		break;
+
+	case LISTIO:
+#ifdef CRAY
+		strcpy(req->r_data.listio.r_file, fptr->f_path);
+		req->r_data.listio.r_offset = offset;
+		req->r_data.listio.r_cmd = cmd;
+		req->r_data.listio.r_aio_strat =
+		    (aio_strat == NULL) ? 0 : aio_strat->m_value;
+		req->r_data.listio.r_filestride = 0;
+		req->r_data.listio.r_memstride = 0;
+		req->r_data.listio.r_opcode = opcode;
+		req->r_data.listio.r_nstrides = 1;
+		req->r_data.listio.r_nbytes = length;
+		req->r_data.listio.r_uflags =
+		    (flags->m_flags & FLG_RAW) ? F_WORD_ALIGNED : 0;
+
+		if (opcode == LO_WRITE) {
+			req->r_data.listio.r_pattern = pattern;
+			req->r_data.listio.r_oflags = O_WRONLY | flags->m_value;
+		} else {
+			req->r_data.listio.r_oflags = O_RDONLY | flags->m_value;
+		}
+#endif
+		break;
+	}
+
+	return 0;
 }
 
 /*
@@ -926,118 +945,121 @@
  *		raw and ossd io must be raw iounit aligned
  */
 
-int
-get_file_info(struct file_info *rec)
+int get_file_info(struct file_info *rec)
 {
-    struct stat			sbuf;
+	struct stat sbuf;
 #ifdef CRAY
-    struct lk_device_info	dinfo;
+	struct lk_device_info dinfo;
 #endif
 #ifdef sgi
-    int				fd;
-    struct dioattr		finfo;
+	int fd;
+	struct dioattr finfo;
 #endif
 
-    /*
-     * Figure out if the files is regular, block or character special.  Any
-     * other type is an error.
-     */
-
-    if (stat(rec->f_path, &sbuf) == -1) {
-	fprintf(stderr, "iogen%s: get_file_info():  Could not stat() %s:  %s\n",
-		TagName, rec->f_path, SYSERR);
-	return -1;
-    }
-
-#if _CRAY2
-    if ((! S_ISREG(sbuf.st_mode)) || strncmp(rec->f_path, "/dev/", 5) == 0) {
-	fprintf(stderr, "iogen%s:  device level io not supported on cray2\n", TagName);
-	return -1;
-    }
-#endif
-
-    rec->f_type = sbuf.st_mode & S_IFMT;
-
-    /*
-     * If regular, iou is 1, and we must figure out the device on
-     * which the file resides.  riou is the iou (logical sector size) of
-     * this device.
-     */
-
-    if (S_ISREG(sbuf.st_mode)) {
-	rec->f_iou = 1;
-	rec->f_length = sbuf.st_size;
-
 	/*
-	 * If -r used, take Rawmult as the raw/ssd io multiple.  Otherwise
-	 * attempt to determine it by looking at the device the file
-	 * resides on.
+	 * Figure out if the files is regular, block or character special.  Any
+	 * other type is an error.
 	 */
 
-	if (r_opt) {
-	    rec->f_riou = Rawmult;
-	  return 0;
+	if (stat(rec->f_path, &sbuf) == -1) {
+		fprintf(stderr,
+			"iogen%s: get_file_info():  Could not stat() %s:  %s\n",
+			TagName, rec->f_path, SYSERR);
+		return -1;
 	}
+#if _CRAY2
+	if ((!S_ISREG(sbuf.st_mode)) || strncmp(rec->f_path, "/dev/", 5) == 0) {
+		fprintf(stderr,
+			"iogen%s:  device level io not supported on cray2\n",
+			TagName);
+		return -1;
+	}
+#endif
 
+	rec->f_type = sbuf.st_mode & S_IFMT;
+
+	/*
+	 * If regular, iou is 1, and we must figure out the device on
+	 * which the file resides.  riou is the iou (logical sector size) of
+	 * this device.
+	 */
+
+	if (S_ISREG(sbuf.st_mode)) {
+		rec->f_iou = 1;
+		rec->f_length = sbuf.st_size;
+
+		/*
+		 * If -r used, take Rawmult as the raw/ssd io multiple.  Otherwise
+		 * attempt to determine it by looking at the device the file
+		 * resides on.
+		 */
+
+		if (r_opt) {
+			rec->f_riou = Rawmult;
+			return 0;
+		}
 #ifdef CRAY
-	if (lk_rawdev(rec->f_path, dinfo.path, sizeof(dinfo.path), 0) == -1)
-	    return -1;
+		if (lk_rawdev(rec->f_path, dinfo.path, sizeof(dinfo.path), 0) ==
+		    -1)
+			return -1;
 
-	if (lk_devinfo(&dinfo, 0) == -1) {
-	    /* can't get raw I/O unit -- use stat to fudge it */
-	    rec->f_riou = sbuf.st_blksize;
-	} else {
-	    rec->f_riou = ctob(dinfo.iou);
-	}
+		if (lk_devinfo(&dinfo, 0) == -1) {
+			/* can't get raw I/O unit -- use stat to fudge it */
+			rec->f_riou = sbuf.st_blksize;
+		} else {
+			rec->f_riou = ctob(dinfo.iou);
+		}
 #endif
 #ifdef linux
-	rec->f_riou = BSIZE;
+		rec->f_riou = BSIZE;
 #endif
 #ifdef sgi
-	if ((fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1) {
-	    if (fcntl(fd, F_DIOINFO, &finfo) != -1) {
-		rec->f_riou = finfo.d_miniosz;
-	    } else {
-		fprintf(stderr,
-			"iogen%s: Error %s (%d) getting direct I/O info of file %s\n",
-			TagName, strerror(errno), errno, rec->f_path);
-	    }
-	    close(fd);
-	} else {
-	    rec->f_riou = BBSIZE;
-	}
-#endif	/* SGI */
+		if ((fd = open(rec->f_path, O_RDWR | O_DIRECT, 0)) != -1) {
+			if (fcntl(fd, F_DIOINFO, &finfo) != -1) {
+				rec->f_riou = finfo.d_miniosz;
+			} else {
+				fprintf(stderr,
+					"iogen%s: Error %s (%d) getting direct I/O info of file %s\n",
+					TagName, strerror(errno), errno,
+					rec->f_path);
+			}
+			close(fd);
+		} else {
+			rec->f_riou = BBSIZE;
+		}
+#endif /* SGI */
 
-    } else {
+	} else {
 
 #ifdef CRAY
-	/*
-	 * Otherwise, file is a device.  Use lk_devinfo() to get its logical
-	 * sector size.  This is the iou and riou
-	 */
+		/*
+		 * Otherwise, file is a device.  Use lk_devinfo() to get its logical
+		 * sector size.  This is the iou and riou
+		 */
 
-	strcpy(dinfo.path, rec->f_path);
+		strcpy(dinfo.path, rec->f_path);
 
-	if (lk_devinfo(&dinfo, 0) == -1) {
-	    fprintf(stderr, "iogen%s: %s:  %s\n", TagName, Lk_err_func, Lk_err_mesg);
-	    return -1;
-	}
+		if (lk_devinfo(&dinfo, 0) == -1) {
+			fprintf(stderr, "iogen%s: %s:  %s\n", TagName,
+				Lk_err_func, Lk_err_mesg);
+			return -1;
+		}
 
-	rec->f_iou = ctob(dinfo.iou);
-	rec->f_riou = ctob(dinfo.iou);
-	rec->f_length = ctob(dinfo.length);
+		rec->f_iou = ctob(dinfo.iou);
+		rec->f_riou = ctob(dinfo.iou);
+		rec->f_length = ctob(dinfo.length);
 #else
 #ifdef sgi
-	rec->f_riou = BBSIZE;
-	rec->f_length = BBSIZE;
+		rec->f_riou = BBSIZE;
+		rec->f_length = BBSIZE;
 #else
-	rec->f_riou = BSIZE;
-	rec->f_length = BSIZE;
+		rec->f_riou = BSIZE;
+		rec->f_length = BSIZE;
 #endif /* sgi */
 #endif /* CRAY */
-    }
+	}
 
-  return 0;
+	return 0;
 }
 
 /*
@@ -1046,247 +1068,253 @@
  * or -1 if there was a failure.
  */
 
-int
-create_file(char *path, int nbytes)
+int create_file(char *path, int nbytes)
 {
-    int	    	fd, rval;
-    char    	c;
-    struct stat	sbuf;
+	int fd, rval;
+	char c;
+	struct stat sbuf;
 #ifdef sgi
-    int		nb;
-    struct flock f;
-    struct fsxattr xattr;
-    struct dioattr finfo;
-    char	*b, *buf;
+	int nb;
+	struct flock f;
+	struct fsxattr xattr;
+	struct dioattr finfo;
+	char *b, *buf;
 #endif
 
-    errno = 0;
-    rval = stat(path, &sbuf);
+	errno = 0;
+	rval = stat(path, &sbuf);
 
-    if (rval == -1) {
-	if (errno == ENOENT) {
-	    sbuf.st_size = 0;
-	} else {
-	    fprintf(stderr, "iogen%s:  Could not stat file %s:  %s (%d)\n",
-		    TagName, path, SYSERR, errno);
-	    return -1;
-	}
-    } else {
-	if (! S_ISREG(sbuf.st_mode)) {
-	    fprintf(stderr,
-		    "iogen%s:  file %s exists, but is not a regular file - cannot modify length\n",
-		    TagName, path);
-	    return -1;
-	}
-    }
-
-    if (sbuf.st_size == nbytes)
-	return nbytes;
-
-    Oflags |= O_CREAT | O_WRONLY;
-
-    if ((fd = open(path, Oflags, 0666)) == -1) {
-	fprintf(stderr, "iogen%s:  Could not create/open file %s: %s (%d)\n",
-		TagName, path, SYSERR, errno);
-	return -1;
-    }
-
-    /*
-     * Truncate file if it is longer than nbytes, otherwise attempt to
-     * pre-allocate file blocks.
-     */
-
-    if (sbuf.st_size > nbytes) {
-	if (ftruncate(fd, nbytes) == -1) {
-	    fprintf(stderr,
-		    "iogen%s:  Could not ftruncate() %s to %d bytes:  %s (%d)\n",
-		    TagName, path, nbytes, SYSERR, errno);
-	    close(fd);
-	    return -1;
-	}
-    } else {
-
-#ifdef sgi
-	/*
-	 *  The file must be designated as Real-Time before any data
-	 *  is allocated to it.
-	 *
-	 */
-	if (Orealtime != 0) {
-	    memset(&xattr, 0x00, sizeof(xattr));
-	    xattr.fsx_xflags = XFS_XFLAG_REALTIME;
-	    /*fprintf(stderr, "set: fsx_xflags = 0x%x\n", xattr.fsx_xflags);*/
-	    if (fcntl(fd, F_FSSETXATTR, &xattr) == -1) {
-		fprintf(stderr, "iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
-			TagName, SYSERR, errno, path);
-		close(fd);
-		return -1;
-	    }
-
-#ifdef DEBUG
-	    if (fcntl(fd, F_FSGETXATTR, &xattr) == -1) {
-		fprintf(stderr, "iogen%s: Error getting realtime flag %s (%d)\n",
-			TagName, SYSERR, errno);
-		close(fd);
-		return -1;
-	    } else {
-		fprintf(stderr, "get: fsx_xflags = 0x%x\n",
-			xattr.fsx_xflags);
-	    }
-#endif
-	}
-
-	/*
-	 * Reserve space with F_RESVSP
-	 *
-	 * Failure is ignored since F_RESVSP only works on XFS and the
-	 * filesystem could be on EFS or NFS
-	 */
-	if (Oreserve) {
-	    f.l_whence = SEEK_SET;
-	    f.l_start = 0;
-	    f.l_len = nbytes;
-
-	    /*fprintf(stderr,
-		    "create_file: fcntl(%d, F_RESVSP, { %d, %lld, %lld })\n",
-		   fd, f.l_whence, (long long)f.l_start, (long long)f.l_len);*/
-
-	    /* non-zeroing reservation */
-	    if (fcntl(fd, F_RESVSP, &f) == -1) {
-		fprintf(stderr,
-			"iogen%s:  Could not fcntl(F_RESVSP) %d bytes in file %s: %s (%d)\n",
-			TagName, nbytes, path, SYSERR, errno);
-		close(fd);
-		return -1;
-	    }
-	}
-
-	if (Oallocate) {
-	    /* F_ALLOCSP allocates from the start of the file to l_start */
-	    f.l_whence = SEEK_SET;
-	    f.l_start = nbytes;
-	    f.l_len = 0;
-	    /*fprintf(stderr,
-		    "create_file: fcntl(%d, F_ALLOCSP, { %d, %lld, %lld })\n",
-		    fd, f.l_whence, (long long)f.l_start,
-		    (long long)f.l_len);*/
-
-	    /* zeroing reservation */
-	    if (fcntl( fd, F_ALLOCSP, &f ) == -1) {
-		fprintf(stderr,
-			"iogen%s:  Could not fcntl(F_ALLOCSP) %d bytes in file %s: %s (%d)\n",
-			TagName, nbytes, path, SYSERR, errno);
-		close(fd);
-		return -1;
-	    }
-	}
-#endif /* sgi */
-
-	/*
-	 * Write a byte at the end of file so that stat() sets the right
-	 * file size.
-	 */
-
-#ifdef sgi
-	if (Owrite == 2) {
-	    close(fd);
-	    if ((fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1) {
-		if (fcntl(fd, F_DIOINFO, &finfo) == -1) {
-		    fprintf(stderr,
-			    "iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
-			    TagName, SYSERR, errno, path);
-		    return -1;
+	if (rval == -1) {
+		if (errno == ENOENT) {
+			sbuf.st_size = 0;
 		} else {
-		    /*fprintf(stderr, "%s: miniosz=%d\n",
-			    path, finfo.d_miniosz);*/
+			fprintf(stderr,
+				"iogen%s:  Could not stat file %s:  %s (%d)\n",
+				TagName, path, SYSERR, errno);
+			return -1;
 		}
-	    } else {
-		fprintf(stderr, "iogen%s: Error %s (%d) opening file %s with flags O_CREAT|O_RDWR|O_DIRECT\n",
-			TagName, SYSERR, errno, path);
-		return -1;
-	    }
-
-	    /*
-	     * nb is nbytes adjusted down by an even d_miniosz block
-	     *
-	     * Note: the first adjustment can cause iogen to print a warning
-	     * 	about not being able to create a file of <nbytes> length,
-	     *	since the file will be shorter.
-	     */
-	    nb = nbytes-finfo.d_miniosz;
-	    nb = nb-nb%finfo.d_miniosz;
-
-	    /*fprintf(stderr,
-		    "create_file_ow2: lseek(%d, %d {%d %d}, SEEK_SET)\n",
-		    fd, nb, nbytes, finfo.d_miniosz);*/
-
-	    if (lseek(fd, nb, SEEK_SET) == -1) {
-		fprintf(stderr,
-			"iogen%s:  Could not lseek() to EOF of file %s: %s (%d)\n\tactual offset %d file size goal %d miniosz %lld\n",
-			TagName, path, SYSERR, errno,
-			nb, nbytes, (long long)finfo.d_miniosz);
-		close(fd);
-		return -1;
-	    }
-
-	    b = buf = (char *)malloc(finfo.d_miniosz+finfo.d_mem);
-
-	    if (((long)buf % finfo.d_mem != 0)) {
-		buf += finfo.d_mem - ((long)buf % finfo.d_mem);
-	    }
-
-	    memset(buf, 0, finfo.d_miniosz);
-
-	    if ((rval=write(fd, buf, finfo.d_miniosz)) != finfo.d_miniosz) {
-		fprintf(stderr,
-			"iogen%s:  Could not write %d byte length file %s: %s (%d)\n",
-			TagName, nb, path, SYSERR, errno);
-		fprintf(stderr,
-			"\twrite(%d, 0x%lx, %d) = %d\n",
-			fd, (long)buf, finfo.d_miniosz, rval);
-		fprintf(stderr,
-			"\toffset %d file size goal %d, miniosz=%d\n",
-			nb, nbytes, finfo.d_miniosz);
-		close(fd);
-		return -1;
-	    }
-	    free(b);
-	} else
-#endif /* sgi */
-	    if (Owrite) {
-	    /*fprintf(stderr,
-		    "create_file_Owrite: lseek(%d, %d {%d}, SEEK_SET)\n",
-		    fd, nbytes-1, nbytes);*/
-
-	    if (lseek(fd, nbytes-1, SEEK_SET) == -1) {
-		fprintf(stderr,
-			"iogen%s:  Could not lseek() to EOF in file %s:  %s (%d)\n\toffset goal %d\n",
-			TagName, path, SYSERR, errno,
-			nbytes-1);
-		close(fd);
-		return -1;
-	    }
-
-	    if ((rval=write(fd, &c, 1)) != 1) {
-		fprintf(stderr,
-			"iogen%s:  Could not create a %d byte length file %s: %s (%d)\n",
-			TagName, nbytes, path, SYSERR, errno);
-		fprintf(stderr,
-			"\twrite(%d, 0x%lx, %d) = %d\n",
-			fd, (long)&c, 1, rval);
-		fprintf(stderr,
-			"\toffset %d file size goal %d\n",
-			nbytes-1, nbytes);
-		close(fd);
-		return -1;
-	    }
+	} else {
+		if (!S_ISREG(sbuf.st_mode)) {
+			fprintf(stderr,
+				"iogen%s:  file %s exists, but is not a regular file - cannot modify length\n",
+				TagName, path);
+			return -1;
+		}
 	}
-    }
 
-    fstat(fd, &sbuf);
-    close(fd);
+	if (sbuf.st_size == nbytes)
+		return nbytes;
 
-    return sbuf.st_size;
+	Oflags |= O_CREAT | O_WRONLY;
+
+	if ((fd = open(path, Oflags, 0666)) == -1) {
+		fprintf(stderr,
+			"iogen%s:  Could not create/open file %s: %s (%d)\n",
+			TagName, path, SYSERR, errno);
+		return -1;
+	}
+
+	/*
+	 * Truncate file if it is longer than nbytes, otherwise attempt to
+	 * pre-allocate file blocks.
+	 */
+
+	if (sbuf.st_size > nbytes) {
+		if (ftruncate(fd, nbytes) == -1) {
+			fprintf(stderr,
+				"iogen%s:  Could not ftruncate() %s to %d bytes:  %s (%d)\n",
+				TagName, path, nbytes, SYSERR, errno);
+			close(fd);
+			return -1;
+		}
+	} else {
+
+#ifdef sgi
+		/*
+		 *  The file must be designated as Real-Time before any data
+		 *  is allocated to it.
+		 *
+		 */
+		if (Orealtime != 0) {
+			memset(&xattr, 0x00, sizeof(xattr));
+			xattr.fsx_xflags = XFS_XFLAG_REALTIME;
+			/*fprintf(stderr, "set: fsx_xflags = 0x%x\n", xattr.fsx_xflags); */
+			if (fcntl(fd, F_FSSETXATTR, &xattr) == -1) {
+				fprintf(stderr,
+					"iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
+					TagName, SYSERR, errno, path);
+				close(fd);
+				return -1;
+			}
+#ifdef DEBUG
+			if (fcntl(fd, F_FSGETXATTR, &xattr) == -1) {
+				fprintf(stderr,
+					"iogen%s: Error getting realtime flag %s (%d)\n",
+					TagName, SYSERR, errno);
+				close(fd);
+				return -1;
+			} else {
+				fprintf(stderr, "get: fsx_xflags = 0x%x\n",
+					xattr.fsx_xflags);
+			}
+#endif
+		}
+
+		/*
+		 * Reserve space with F_RESVSP
+		 *
+		 * Failure is ignored since F_RESVSP only works on XFS and the
+		 * filesystem could be on EFS or NFS
+		 */
+		if (Oreserve) {
+			f.l_whence = SEEK_SET;
+			f.l_start = 0;
+			f.l_len = nbytes;
+
+			/*fprintf(stderr,
+			   "create_file: fcntl(%d, F_RESVSP, { %d, %lld, %lld })\n",
+			   fd, f.l_whence, (long long)f.l_start, (long long)f.l_len); */
+
+			/* non-zeroing reservation */
+			if (fcntl(fd, F_RESVSP, &f) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Could not fcntl(F_RESVSP) %d bytes in file %s: %s (%d)\n",
+					TagName, nbytes, path, SYSERR, errno);
+				close(fd);
+				return -1;
+			}
+		}
+
+		if (Oallocate) {
+			/* F_ALLOCSP allocates from the start of the file to l_start */
+			f.l_whence = SEEK_SET;
+			f.l_start = nbytes;
+			f.l_len = 0;
+			/*fprintf(stderr,
+			   "create_file: fcntl(%d, F_ALLOCSP, { %d, %lld, %lld })\n",
+			   fd, f.l_whence, (long long)f.l_start,
+			   (long long)f.l_len); */
+
+			/* zeroing reservation */
+			if (fcntl(fd, F_ALLOCSP, &f) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Could not fcntl(F_ALLOCSP) %d bytes in file %s: %s (%d)\n",
+					TagName, nbytes, path, SYSERR, errno);
+				close(fd);
+				return -1;
+			}
+		}
+#endif /* sgi */
+
+		/*
+		 * Write a byte at the end of file so that stat() sets the right
+		 * file size.
+		 */
+
+#ifdef sgi
+		if (Owrite == 2) {
+			close(fd);
+			if ((fd =
+			     open(path, O_CREAT | O_RDWR | O_DIRECT,
+				  0)) != -1) {
+				if (fcntl(fd, F_DIOINFO, &finfo) == -1) {
+					fprintf(stderr,
+						"iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
+						TagName, SYSERR, errno, path);
+					return -1;
+				} else {
+					/*fprintf(stderr, "%s: miniosz=%d\n",
+					   path, finfo.d_miniosz); */
+				}
+			} else {
+				fprintf(stderr,
+					"iogen%s: Error %s (%d) opening file %s with flags O_CREAT|O_RDWR|O_DIRECT\n",
+					TagName, SYSERR, errno, path);
+				return -1;
+			}
+
+			/*
+			 * nb is nbytes adjusted down by an even d_miniosz block
+			 *
+			 * Note: the first adjustment can cause iogen to print a warning
+			 *  about not being able to create a file of <nbytes> length,
+			 *  since the file will be shorter.
+			 */
+			nb = nbytes - finfo.d_miniosz;
+			nb = nb - nb % finfo.d_miniosz;
+
+			/*fprintf(stderr,
+			   "create_file_ow2: lseek(%d, %d {%d %d}, SEEK_SET)\n",
+			   fd, nb, nbytes, finfo.d_miniosz); */
+
+			if (lseek(fd, nb, SEEK_SET) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Could not lseek() to EOF of file %s: %s (%d)\n\tactual offset %d file size goal %d miniosz %lld\n",
+					TagName, path, SYSERR, errno,
+					nb, nbytes, (long long)finfo.d_miniosz);
+				close(fd);
+				return -1;
+			}
+
+			b = buf = (char *)malloc(finfo.d_miniosz + finfo.d_mem);
+
+			if (((long)buf % finfo.d_mem != 0)) {
+				buf += finfo.d_mem - ((long)buf % finfo.d_mem);
+			}
+
+			memset(buf, 0, finfo.d_miniosz);
+
+			if ((rval =
+			     write(fd, buf,
+				   finfo.d_miniosz)) != finfo.d_miniosz) {
+				fprintf(stderr,
+					"iogen%s:  Could not write %d byte length file %s: %s (%d)\n",
+					TagName, nb, path, SYSERR, errno);
+				fprintf(stderr, "\twrite(%d, 0x%lx, %d) = %d\n",
+					fd, (long)buf, finfo.d_miniosz, rval);
+				fprintf(stderr,
+					"\toffset %d file size goal %d, miniosz=%d\n",
+					nb, nbytes, finfo.d_miniosz);
+				close(fd);
+				return -1;
+			}
+			free(b);
+		} else
+#endif /* sgi */
+		if (Owrite) {
+			/*fprintf(stderr,
+			   "create_file_Owrite: lseek(%d, %d {%d}, SEEK_SET)\n",
+			   fd, nbytes-1, nbytes); */
+
+			if (lseek(fd, nbytes - 1, SEEK_SET) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Could not lseek() to EOF in file %s:  %s (%d)\n\toffset goal %d\n",
+					TagName, path, SYSERR, errno,
+					nbytes - 1);
+				close(fd);
+				return -1;
+			}
+
+			if ((rval = write(fd, &c, 1)) != 1) {
+				fprintf(stderr,
+					"iogen%s:  Could not create a %d byte length file %s: %s (%d)\n",
+					TagName, nbytes, path, SYSERR, errno);
+				fprintf(stderr,
+					"\twrite(%d, 0x%lx, %d) = %d\n",
+					fd, (long)&c, 1, rval);
+				fprintf(stderr,
+					"\toffset %d file size goal %d\n",
+					nbytes - 1, nbytes);
+				close(fd);
+				return -1;
+			}
+		}
+	}
+
+	fstat(fd, &sbuf);
+	close(fd);
+
+	return sbuf.st_size;
 }
 
 /*
@@ -1295,16 +1323,15 @@
  * NULL string (the last element in the array) is returned.
  */
 
-int
-str_to_value(struct strmap *map, char *str)
+int str_to_value(struct strmap *map, char *str)
 {
-    struct strmap   *mp;
+	struct strmap *mp;
 
-    for (mp = map; mp->m_string != NULL; mp++)
-	if (strcmp(mp->m_string, str) == 0)
-	    break;
+	for (mp = map; mp->m_string != NULL; mp++)
+		if (strcmp(mp->m_string, str) == 0)
+			break;
 
-    return mp->m_value;
+	return mp->m_value;
 }
 
 /*
@@ -1312,16 +1339,15 @@
  * If the string is not found in the array, a NULL is returned.
  */
 
-struct strmap *
-str_lookup(struct strmap *map, char *str)
+struct strmap *str_lookup(struct strmap *map, char *str)
 {
-    struct strmap   *mp;
+	struct strmap *mp;
 
-    for (mp = map; mp->m_string != NULL; mp++)
-	if (strcmp(mp->m_string, str) == 0)
-	    break;
+	for (mp = map; mp->m_string != NULL; mp++)
+		if (strcmp(mp->m_string, str) == 0)
+			break;
 
-    return((mp->m_string == NULL) ? NULL : mp);
+	return ((mp->m_string == NULL) ? NULL : mp);
 }
 
 /*
@@ -1329,16 +1355,15 @@
  * If the value is not found in the array, NULL is returned.
  */
 
-char *
-value_to_string(struct strmap *map, int val)
+char *value_to_string(struct strmap *map, int val)
 {
-    struct strmap  *mp;
+	struct strmap *mp;
 
-    for (mp = map; mp->m_string != NULL; mp++)
-	if (mp->m_value == val)
-	    break;
+	for (mp = map; mp->m_string != NULL; mp++)
+		if (mp->m_value == val)
+			break;
 
-    return mp->m_string;
+	return mp->m_string;
 }
 
 /*
@@ -1346,631 +1371,730 @@
  * cmdline isn't kosher.
  */
 
-int
-parse_cmdline(int argc, char **argv, char *opts)
+int parse_cmdline(int argc, char **argv, char *opts)
 {
-    int	    	    	o, len, nb, format_error;
-    struct strmap	*flgs, *sc;
-    char    	    	*file, *cp, ch;
-    extern int	    	opterr;
-    extern int	    	optind;
-    extern char     	*optarg;
-    struct strmap   	*mp;
-    struct file_info	*fptr;
-    int			nopenargs;
-    char		*openargs[5];	/* Flags, cbits, cblks */
-    char		*errmsg;
-    int			str_to_int();
-    opterr = 0;
+	int o, len, nb, format_error;
+	struct strmap *flgs, *sc;
+	char *file, *cp, ch;
+	extern int opterr;
+	extern int optind;
+	extern char *optarg;
+	struct strmap *mp;
+	struct file_info *fptr;
+	int nopenargs;
+	char *openargs[5];	/* Flags, cbits, cblks */
+	char *errmsg;
+	int str_to_int();
+	opterr = 0;
 #ifndef linux
-    char		*ranges;
-    struct strmap	*type;
+	char *ranges;
+	struct strmap *type;
 #endif
 
-    while ((o = getopt(argc, argv, opts)) != EOF) {
-        switch ((char)o) {
+	while ((o = getopt(argc, argv, opts)) != EOF) {
+		switch ((char)o) {
 
- 	case 'a':
+		case 'a':
 #ifdef linux
-	    fprintf(stderr, "iogen%s:  Unrecognized option -a on this platform\n", TagName);
-	    exit(2);
+			fprintf(stderr,
+				"iogen%s:  Unrecognized option -a on this platform\n",
+				TagName);
+			exit(2);
 #else
-	    cp = strtok(optarg, ",");
-	    while (cp != NULL) {
-		if ((type = str_lookup(Aio_Strat_Map, cp)) == NULL) {
-		    fprintf(stderr, "iogen%s:  Unrecognized aio completion strategy:  %s\n", TagName, cp);
-		    exit(2);
-		}
+			cp = strtok(optarg, ",");
+			while (cp != NULL) {
+				if ((type =
+				     str_lookup(Aio_Strat_Map, cp)) == NULL) {
+					fprintf(stderr,
+						"iogen%s:  Unrecognized aio completion strategy:  %s\n",
+						TagName, cp);
+					exit(2);
+				}
 
-		Aio_Strat_List[Naio_Strat_Types++] = type;
-		cp = strtok(NULL, ",");
-	    }
-	    a_opt++;
+				Aio_Strat_List[Naio_Strat_Types++] = type;
+				cp = strtok(NULL, ",");
+			}
+			a_opt++;
 #endif
-	    break;
+			break;
 
- 	case 'f':
-	    cp = strtok(optarg, ",");
-	    while (cp != NULL) {
-		if ((flgs = str_lookup(Flag_Map, cp)) == NULL) {
-		    fprintf(stderr, "iogen%s:  Unrecognized flags:  %s\n", TagName, cp);
-		    exit(2);
-		}
+		case 'f':
+			cp = strtok(optarg, ",");
+			while (cp != NULL) {
+				if ((flgs = str_lookup(Flag_Map, cp)) == NULL) {
+					fprintf(stderr,
+						"iogen%s:  Unrecognized flags:  %s\n",
+						TagName, cp);
+					exit(2);
+				}
 
-		cp = strtok(NULL, ",");
+				cp = strtok(NULL, ",");
 
 #ifdef O_SSD
-		if (flgs->m_value & O_SSD && ! Sds_Avail) {
-		    fprintf(stderr, "iogen%s:  Warning - no sds available, ignoring ssd flag\n", TagName);
-		    continue;
-		}
+				if (flgs->m_value & O_SSD && !Sds_Avail) {
+					fprintf(stderr,
+						"iogen%s:  Warning - no sds available, ignoring ssd flag\n",
+						TagName);
+					continue;
+				}
 #endif
 
-		Flag_List[Nflags++] = flgs;
-	    }
-	    f_opt++;
-	    break;
+				Flag_List[Nflags++] = flgs;
+			}
+			f_opt++;
+			break;
 
-	case 'h':
-	    help(stdout);
-	    exit(0);
-	    break;
+		case 'h':
+			help(stdout);
+			exit(0);
+			break;
 
-	case 'i':
-	    format_error = 0;
+		case 'i':
+			format_error = 0;
 
-	    switch (sscanf(optarg, "%i%c", &Iterations, &ch)) {
-	    case 1:
-		Time_Mode = 0;
-		break;
+			switch (sscanf(optarg, "%i%c", &Iterations, &ch)) {
+			case 1:
+				Time_Mode = 0;
+				break;
 
-	    case 2:
-		if (ch == 's')
-		    Time_Mode = 1;
-		else
-		    format_error = 1;
-		break;
+			case 2:
+				if (ch == 's')
+					Time_Mode = 1;
+				else
+					format_error = 1;
+				break;
 
-	    default:
-		format_error = 1;
-	    }
+			default:
+				format_error = 1;
+			}
 
-	    if (Iterations < 0)
-		format_error = 1;
+			if (Iterations < 0)
+				format_error = 1;
 
-	    if (format_error) {
-		fprintf(stderr, "iogen%s:  Illegal -i arg (%s):  Must be of the format:  number[s]\n", TagName, optarg);
-		fprintf(stderr, "        where 'number' is >= 0\n");
-		exit(1);
-	    }
+			if (format_error) {
+				fprintf(stderr,
+					"iogen%s:  Illegal -i arg (%s):  Must be of the format:  number[s]\n",
+					TagName, optarg);
+				fprintf(stderr,
+					"        where 'number' is >= 0\n");
+				exit(1);
+			}
 
-	    i_opt++;
-	    break;
+			i_opt++;
+			break;
 
-	case 'L':
+		case 'L':
 #ifdef linux
-	    fprintf(stderr, "iogen%s:  Unrecognized option -L on this platform\n", TagName);
-	    exit(2);
+			fprintf(stderr,
+				"iogen%s:  Unrecognized option -L on this platform\n",
+				TagName);
+			exit(2);
 #else
-	    if ( parse_ranges(optarg, 1, 255, 1, NULL, &ranges,
-			     &errmsg ) == -1 ) {
-		    fprintf(stderr, "iogen%s: error parsing listio range '%s': %s\n",
-			    TagName, optarg, errmsg);
-		    exit(1);
-	    }
+			if (parse_ranges(optarg, 1, 255, 1, NULL, &ranges,
+					 &errmsg) == -1) {
+				fprintf(stderr,
+					"iogen%s: error parsing listio range '%s': %s\n",
+					TagName, optarg, errmsg);
+				exit(1);
+			}
 
-	    Minstrides = range_min(ranges, 0);
-	    Maxstrides = range_max(ranges, 0);
+			Minstrides = range_min(ranges, 0);
+			Maxstrides = range_max(ranges, 0);
 
-	    free(ranges);
-	    L_opt++;
+			free(ranges);
+			L_opt++;
 #endif
-	    break;
+			break;
 
-	case 'm':
-	    if ((Offset_Mode = str_lookup(Omode_Map, optarg)) == NULL) {
-		fprintf(stderr, "iogen%s:  Illegal -m arg (%s)\n", TagName, optarg);
-		exit(1);
-	    }
+		case 'm':
+			if ((Offset_Mode =
+			     str_lookup(Omode_Map, optarg)) == NULL) {
+				fprintf(stderr,
+					"iogen%s:  Illegal -m arg (%s)\n",
+					TagName, optarg);
+				exit(1);
+			}
 
-	    m_opt++;
-	    break;
+			m_opt++;
+			break;
 
-	case 'N':
-	    sprintf( TagName, "(%.39s)", optarg );
-	    break;
+		case 'N':
+			sprintf(TagName, "(%.39s)", optarg);
+			break;
 
-	case 'o':
-	    o_opt++;
-	    break;
+		case 'o':
+			o_opt++;
+			break;
 
-	case 'O':
+		case 'O':
 
-	    nopenargs = string_to_tokens(optarg, openargs, 4, ":/");
+			nopenargs = string_to_tokens(optarg, openargs, 4, ":/");
 
 #ifdef CRAY
-	    if (nopenargs)
-		sscanf(openargs[1],"%i", &Ocbits);
-	    if (nopenargs > 1)
-		sscanf(openargs[2],"%i", &Ocblks);
+			if (nopenargs)
+				sscanf(openargs[1], "%i", &Ocbits);
+			if (nopenargs > 1)
+				sscanf(openargs[2], "%i", &Ocblks);
 
-	    Oflags = parse_open_flags(openargs[0], &errmsg);
-	    if (Oflags == -1) {
-		fprintf(stderr, "iogen%s: -O %s error: %s\n", TagName, optarg, errmsg);
-		exit(1);
-	    }
+			Oflags = parse_open_flags(openargs[0], &errmsg);
+			if (Oflags == -1) {
+				fprintf(stderr, "iogen%s: -O %s error: %s\n",
+					TagName, optarg, errmsg);
+				exit(1);
+			}
 #endif
 #ifdef linux
-	    Oflags = parse_open_flags(openargs[0], &errmsg);
-	    if (Oflags == -1) {
-		fprintf(stderr, "iogen%s: -O %s error: %s\n", TagName, optarg, errmsg);
-		exit(1);
-	    }
+			Oflags = parse_open_flags(openargs[0], &errmsg);
+			if (Oflags == -1) {
+				fprintf(stderr, "iogen%s: -O %s error: %s\n",
+					TagName, optarg, errmsg);
+				exit(1);
+			}
 #endif
 #ifdef sgi
-	    if (!strcmp(openargs[0], "realtime")) {
-		/*
-		 * -O realtime:extsize
-		 */
-		Orealtime = 1;
-		if (nopenargs > 1)
-		    sscanf(openargs[1],"%i", &Oextsize);
-		else
-		    Oextsize=0;
-	    } else if (!strcmp(openargs[0], "allocate") ||
-		       !strcmp(openargs[0], "allocsp")) {
-		/*
-		 * -O allocate
-		 */
-		Oreserve=0;
-		Oallocate=1;
-	    } else if (!strcmp(openargs[0], "reserve")) {
-		/*
-		 * -O [no]reserve
-		 */
-		Oallocate=0;
-		Oreserve=1;
-	    } else if (!strcmp(openargs[0], "noreserve")) {
-		/* Oreserve=1 by default; this clears that default */
-		Oreserve=0;
-	    } else if (!strcmp(openargs[0], "nowrite")) {
-		/* Owrite=1 by default; this clears that default */
-		Owrite=0;
-	    } else if (!strcmp(openargs[0], "direct")) {
-		/* this means "use direct i/o to preallocate file" */
-		Owrite=2;
-	    } else {
-		fprintf(stderr, "iogen%s: Error: -O %s error: unrecognized option\n",
-			TagName, openargs[0]);
-		exit(1);
-	    }
+			if (!strcmp(openargs[0], "realtime")) {
+				/*
+				 * -O realtime:extsize
+				 */
+				Orealtime = 1;
+				if (nopenargs > 1)
+					sscanf(openargs[1], "%i", &Oextsize);
+				else
+					Oextsize = 0;
+			} else if (!strcmp(openargs[0], "allocate") ||
+				   !strcmp(openargs[0], "allocsp")) {
+				/*
+				 * -O allocate
+				 */
+				Oreserve = 0;
+				Oallocate = 1;
+			} else if (!strcmp(openargs[0], "reserve")) {
+				/*
+				 * -O [no]reserve
+				 */
+				Oallocate = 0;
+				Oreserve = 1;
+			} else if (!strcmp(openargs[0], "noreserve")) {
+				/* Oreserve=1 by default; this clears that default */
+				Oreserve = 0;
+			} else if (!strcmp(openargs[0], "nowrite")) {
+				/* Owrite=1 by default; this clears that default */
+				Owrite = 0;
+			} else if (!strcmp(openargs[0], "direct")) {
+				/* this means "use direct i/o to preallocate file" */
+				Owrite = 2;
+			} else {
+				fprintf(stderr,
+					"iogen%s: Error: -O %s error: unrecognized option\n",
+					TagName, openargs[0]);
+				exit(1);
+			}
 #endif
 
-	    O_opt++;
-	    break;
+			O_opt++;
+			break;
 
-	case 'p':
-	    Outpipe = optarg;
-	    p_opt++;
-	    break;
+		case 'p':
+			Outpipe = optarg;
+			p_opt++;
+			break;
 
-	case 'r':
-	    if ((Rawmult = bytes_by_prefix(optarg)) == -1 ||
-		          Rawmult < 11 || Rawmult % BSIZE) {
-		fprintf(stderr, "iogen%s:  Illegal -r arg (%s).  Must be > 0 and multipe of BSIZE (%d)\n",
-			TagName, optarg, BSIZE);
-		exit(1);
-	    }
+		case 'r':
+			if ((Rawmult = bytes_by_prefix(optarg)) == -1 ||
+			    Rawmult < 11 || Rawmult % BSIZE) {
+				fprintf(stderr,
+					"iogen%s:  Illegal -r arg (%s).  Must be > 0 and multipe of BSIZE (%d)\n",
+					TagName, optarg, BSIZE);
+				exit(1);
+			}
 
-	    r_opt++;
-	    break;
+			r_opt++;
+			break;
 
- 	case 's':
-	    cp = strtok(optarg, ",");
-	    while (cp != NULL) {
-		if ((sc = str_lookup(Syscall_Map, cp)) == NULL) {
-		    fprintf(stderr, "iogen%s:  Unrecognized syscall:  %s\n", TagName, cp);
-		    exit(2);
+		case 's':
+			cp = strtok(optarg, ",");
+			while (cp != NULL) {
+				if ((sc = str_lookup(Syscall_Map, cp)) == NULL) {
+					fprintf(stderr,
+						"iogen%s:  Unrecognized syscall:  %s\n",
+						TagName, cp);
+					exit(2);
+				}
+
+				do {
+					/* >>> sc->m_flags & FLG_SDS */
+					if (sc->m_value != SSREAD
+					    && sc->m_value != SSWRITE)
+						Fileio++;
+
+					Syscall_List[Nsyscalls++] = sc;
+				} while ((sc = str_lookup(++sc, cp)) != NULL);
+
+				cp = strtok(NULL, ",");
+			}
+			s_opt++;
+			break;
+
+		case 't':
+			if ((Mintrans = bytes_by_prefix(optarg)) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Illegal -t arg (%s):  Must have the form num[bkm]\n",
+					TagName, optarg);
+				exit(1);
+			}
+			t_opt++;
+			break;
+
+		case 'T':
+			if ((Maxtrans = bytes_by_prefix(optarg)) == -1) {
+				fprintf(stderr,
+					"iogen%s:  Illegal -T arg (%s):  Must have the form num[bkm]\n",
+					TagName, optarg);
+				exit(1);
+			}
+			T_opt++;
+			break;
+
+		case 'q':
+			q_opt++;
+			break;
+
+		case '?':
+			usage(stderr);
+			exit(1);
 		}
-
-		do {
-		    /* >>> sc->m_flags & FLG_SDS */
-		    if (sc->m_value != SSREAD && sc->m_value != SSWRITE)
-			Fileio++;
-
-		    Syscall_List[Nsyscalls++] = sc;
-		} while ((sc = str_lookup(++sc, cp)) != NULL);
-
-		cp = strtok(NULL, ",");
-	    }
-	    s_opt++;
-	    break;
-
-	case 't':
-	    if ((Mintrans = bytes_by_prefix(optarg)) == -1) {
-		fprintf(stderr, "iogen%s:  Illegal -t arg (%s):  Must have the form num[bkm]\n", TagName, optarg);
-		exit(1);
-	    }
-	    t_opt++;
-	    break;
-
-	case 'T':
-	    if ((Maxtrans = bytes_by_prefix(optarg)) == -1) {
-		fprintf(stderr, "iogen%s:  Illegal -T arg (%s):  Must have the form num[bkm]\n", TagName, optarg);
-		exit(1);
-	    }
-	    T_opt++;
-	    break;
-
-	case 'q':
-	    q_opt++;
-	    break;
-
-	case '?':
-	    usage(stderr);
-	    exit(1);
-	}
-    }
-
-    /*
-     * Supply defaults
-     */
-
-    if (!L_opt) {
-	    Minstrides = 1;
-	    Maxstrides = 255;
-    }
-
-    if (!m_opt)
-	Offset_Mode = str_lookup(Omode_Map, "sequential");
-
-    if (!i_opt)
-	Iterations = 0;
-
-    if (!t_opt)
-	Mintrans = 1;
-
-    if (!T_opt)
-	Maxtrans = 256 * BSIZE;
-
-    if (!O_opt)
-	Oflags = Ocbits = Ocblks = 0;
-
-    /*
-     * Supply default async io completion strategy types.
-     */
-
-    if (!a_opt) {
-	    for (mp = Aio_Strat_Map; mp->m_string != NULL; mp++) {
-		    Aio_Strat_List[Naio_Strat_Types++] = mp;
-	    }
-    }
-
-    /*
-     * Supply default syscalls.  Default is read,write,reada,writea,listio.
-     */
-
-    if (!s_opt) {
-	Nsyscalls = 0;
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "read");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "write");
-#ifdef CRAY
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "reada");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "writea");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lread");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lreada");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lwrite");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lwritea");
-#endif
-
-#ifdef sgi
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "pread");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "pwrite");
-	/*Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "aread");*/
-	/*Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "awrite");*/
-#endif
-
-#ifndef CRAY
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "readv");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "writev");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "mmread");
-	Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "mmwrite");
-#endif
-
-        Fileio = 1;
-    }
-
-    if (Fileio && (argc - optind < 1)) {
-	fprintf(stderr, "iogen%s:  No files specified on the cmdline\n", TagName);
-	exit(1);
-    }
-
-    /*
-     * Supply default file io flags - defaut is 'buffered,raw,sync,ldraw'.
-     */
-
-    if (!f_opt && Fileio) {
-	    Nflags = 0;
-	    Flag_List[Nflags++] = str_lookup(Flag_Map, "buffered");
-	    Flag_List[Nflags++] = str_lookup(Flag_Map, "sync");
-#ifdef CRAY
-	    Flag_List[Nflags++] = str_lookup(Flag_Map, "raw+wf");
-    	    Flag_List[Nflags++] = str_lookup(Flag_Map, "ldraw");
-#endif
-
-#ifdef sgi
-	    /* Warning: cannot mix direct i/o with others! */
-	    Flag_List[Nflags++] = str_lookup(Flag_Map, "dsync");
-	    Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync");
-	    /* Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync+sync");*/
-	    /* Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync+dsync");*/
-#endif
-    }
-
-    if (Fileio) {
-	if (optind >= argc) {
-	    fprintf(stderr, "iogen%s:  No files listed on the cmdline\n", TagName);
-	    exit(1);
 	}
 
 	/*
-	 * Initialize File_List[] - only necessary if doing file io.  First
-	 * space for the File_List array, then fill it in.
+	 * Supply defaults
 	 */
 
-	File_List = (struct file_info *)
-	    malloc((argc-optind) * sizeof(struct file_info));
-
-	if (File_List == NULL) {
-	    fprintf(stderr, "iogen%s:  Could not malloc space for %d file_info structures\n", TagName, argc-optind);
-	    exit(2);
+	if (!L_opt) {
+		Minstrides = 1;
+		Maxstrides = 255;
 	}
 
-	memset(File_List, 0, (argc-optind) * sizeof(struct file_info));
+	if (!m_opt)
+		Offset_Mode = str_lookup(Omode_Map, "sequential");
 
-        Nfiles = 0;
-        while (optind < argc) {
-   	    len = -1;
+	if (!i_opt)
+		Iterations = 0;
 
-	    /*
-	     * Pick off leading len: if it's there and create/extend/trunc
-	     * the file to the desired length.  Otherwise, just make sure
-	     * the file is accessable.
-	     */
+	if (!t_opt)
+		Mintrans = 1;
 
-	    if ((cp = strchr(argv[optind], ':')) != NULL) {
-	        *cp = '\0';
-	        if ((len = bytes_by_prefix(argv[optind])) == -1) {
-		    fprintf(stderr,
-			    "iogen%s:  illegal file length (%s) for file %s\n",
-			    TagName, argv[optind], cp+1);
-		    exit(2);
-	        }
-	        *cp = ':';
-	        file = cp+1;
+	if (!T_opt)
+		Maxtrans = 256 * BSIZE;
 
-		if (strlen(file) > MAX_FNAME_LENGTH) {
-		    fprintf(stderr, "iogen%s:  Max fname length is %d chars - ignoring file %s\n",
-			    TagName, MAX_FNAME_LENGTH, file);
-		    optind++;
-		    continue;
+	if (!O_opt)
+		Oflags = Ocbits = Ocblks = 0;
+
+	/*
+	 * Supply default async io completion strategy types.
+	 */
+
+	if (!a_opt) {
+		for (mp = Aio_Strat_Map; mp->m_string != NULL; mp++) {
+			Aio_Strat_List[Naio_Strat_Types++] = mp;
 		}
+	}
 
-		nb = create_file(file, len);
+	/*
+	 * Supply default syscalls.  Default is read,write,reada,writea,listio.
+	 */
 
-		if (nb < len) {
-		    fprintf(stderr,
-			    "iogen%s warning:  Couldn't create file %s of %d bytes\n",
-			    TagName, file, len);
+	if (!s_opt) {
+		Nsyscalls = 0;
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "read");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "write");
+#ifdef CRAY
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "reada");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "writea");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lread");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lreada");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lwrite");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "lwritea");
+#endif
 
-		    if (nb <= 0) {
-			optind++;
-			continue;
-		    }
+#ifdef sgi
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "pread");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "pwrite");
+		/*Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "aread"); */
+		/*Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "awrite"); */
+#endif
+
+#ifndef CRAY
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "readv");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "writev");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "mmread");
+		Syscall_List[Nsyscalls++] = str_lookup(Syscall_Map, "mmwrite");
+#endif
+
+		Fileio = 1;
+	}
+
+	if (Fileio && (argc - optind < 1)) {
+		fprintf(stderr, "iogen%s:  No files specified on the cmdline\n",
+			TagName);
+		exit(1);
+	}
+
+	/*
+	 * Supply default file io flags - defaut is 'buffered,raw,sync,ldraw'.
+	 */
+
+	if (!f_opt && Fileio) {
+		Nflags = 0;
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "buffered");
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "sync");
+#ifdef CRAY
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "raw+wf");
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "ldraw");
+#endif
+
+#ifdef sgi
+		/* Warning: cannot mix direct i/o with others! */
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "dsync");
+		Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync");
+		/* Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync+sync"); */
+		/* Flag_List[Nflags++] = str_lookup(Flag_Map, "rsync+dsync"); */
+#endif
+	}
+
+	if (Fileio) {
+		if (optind >= argc) {
+			fprintf(stderr,
+				"iogen%s:  No files listed on the cmdline\n",
+				TagName);
+			exit(1);
 		}
-	    } else {
-	        file = argv[optind];
-	        if (access(file, R_OK | W_OK) == -1) {
-	   	    fprintf(stderr, "iogen%s:  file %s cannot be accessed for reading and/or writing:  %s (%d)\n",
-			    TagName, file, SYSERR, errno);
-		    exit(2);
-	        }
-	    }
-
-	    /*
-	     * get per-file information
-	     */
-
-	    fptr = &File_List[Nfiles];
-
-	    if (file[0] == '/') {
-	        strcpy(fptr->f_path, file);
-	    } else {
-	        if (getcwd(fptr->f_path, sizeof(fptr->f_path)-1) == NULL)
-			perror("Could not get current working directory");
-	        strcat(fptr->f_path, "/");
-	        strcat(fptr->f_path, file);
-	    }
-
-	    if (get_file_info(fptr) == -1) {
-	        fprintf(stderr, "iogen%s warning:  Error getting file info for %s\n", TagName, file);
-	    } else {
 
 		/*
-		 * If the file length is smaller than our min transfer size,
-		 * ignore it.
+		 * Initialize File_List[] - only necessary if doing file io.  First
+		 * space for the File_List array, then fill it in.
 		 */
 
-		if (fptr->f_length < Mintrans) {
-		    fprintf(stderr, "iogen%s warning:  Ignoring file %s\n",
-			    TagName, fptr->f_path);
-		    fprintf(stderr, "                length (%d) is < min transfer size (%d)\n",
-			    fptr->f_length, Mintrans);
-		    optind++;
-		    continue;
+		File_List = (struct file_info *)
+		    malloc((argc - optind) * sizeof(struct file_info));
+
+		if (File_List == NULL) {
+			fprintf(stderr,
+				"iogen%s:  Could not malloc space for %d file_info structures\n",
+				TagName, argc - optind);
+			exit(2);
 		}
 
-                /*
-                 * If the file length is smaller than our max transfer size,
-                 * ignore it.
-                 */
+		memset(File_List, 0,
+		       (argc - optind) * sizeof(struct file_info));
 
-                if (fptr->f_length < Maxtrans) {
-                    fprintf(stderr, "iogen%s warning:  Ignoring file %s\n",
-                            TagName, fptr->f_path);
-                    fprintf(stderr, "                length (%d) is < max transfer size (%d)\n",
-                            fptr->f_length, Maxtrans);
-                    optind++;
-                    continue;
-                }
+		Nfiles = 0;
+		while (optind < argc) {
+			len = -1;
 
-		if (fptr->f_length > 0) {
-		    switch (Offset_Mode->m_value) {
-		    case M_SEQUENTIAL:
-			fptr->f_lastoffset = 0;
-			fptr->f_lastlength = 0;
-			break;
+			/*
+			 * Pick off leading len: if it's there and create/extend/trunc
+			 * the file to the desired length.  Otherwise, just make sure
+			 * the file is accessable.
+			 */
 
-		    case M_REVERSE:
-			fptr->f_lastoffset = fptr->f_length;
-			fptr->f_lastlength = 0;
-			break;
+			if ((cp = strchr(argv[optind], ':')) != NULL) {
+				*cp = '\0';
+				if ((len = bytes_by_prefix(argv[optind])) == -1) {
+					fprintf(stderr,
+						"iogen%s:  illegal file length (%s) for file %s\n",
+						TagName, argv[optind], cp + 1);
+					exit(2);
+				}
+				*cp = ':';
+				file = cp + 1;
 
-		    case M_RANDOM:
-			fptr->f_lastoffset = fptr->f_length / 2;
-			fptr->f_lastlength = 0;
-			break;
-		    }
+				if (strlen(file) > MAX_FNAME_LENGTH) {
+					fprintf(stderr,
+						"iogen%s:  Max fname length is %d chars - ignoring file %s\n",
+						TagName, MAX_FNAME_LENGTH,
+						file);
+					optind++;
+					continue;
+				}
 
-		    Nfiles++;
+				nb = create_file(file, len);
+
+				if (nb < len) {
+					fprintf(stderr,
+						"iogen%s warning:  Couldn't create file %s of %d bytes\n",
+						TagName, file, len);
+
+					if (nb <= 0) {
+						optind++;
+						continue;
+					}
+				}
+			} else {
+				file = argv[optind];
+				if (access(file, R_OK | W_OK) == -1) {
+					fprintf(stderr,
+						"iogen%s:  file %s cannot be accessed for reading and/or writing:  %s (%d)\n",
+						TagName, file, SYSERR, errno);
+					exit(2);
+				}
+			}
+
+			/*
+			 * get per-file information
+			 */
+
+			fptr = &File_List[Nfiles];
+
+			if (file[0] == '/') {
+				strcpy(fptr->f_path, file);
+			} else {
+				if (getcwd
+				    (fptr->f_path,
+				     sizeof(fptr->f_path) - 1) == NULL)
+					perror
+					    ("Could not get current working directory");
+				strcat(fptr->f_path, "/");
+				strcat(fptr->f_path, file);
+			}
+
+			if (get_file_info(fptr) == -1) {
+				fprintf(stderr,
+					"iogen%s warning:  Error getting file info for %s\n",
+					TagName, file);
+			} else {
+
+				/*
+				 * If the file length is smaller than our min transfer size,
+				 * ignore it.
+				 */
+
+				if (fptr->f_length < Mintrans) {
+					fprintf(stderr,
+						"iogen%s warning:  Ignoring file %s\n",
+						TagName, fptr->f_path);
+					fprintf(stderr,
+						"                length (%d) is < min transfer size (%d)\n",
+						fptr->f_length, Mintrans);
+					optind++;
+					continue;
+				}
+
+				/*
+				 * If the file length is smaller than our max transfer size,
+				 * ignore it.
+				 */
+
+				if (fptr->f_length < Maxtrans) {
+					fprintf(stderr,
+						"iogen%s warning:  Ignoring file %s\n",
+						TagName, fptr->f_path);
+					fprintf(stderr,
+						"                length (%d) is < max transfer size (%d)\n",
+						fptr->f_length, Maxtrans);
+					optind++;
+					continue;
+				}
+
+				if (fptr->f_length > 0) {
+					switch (Offset_Mode->m_value) {
+					case M_SEQUENTIAL:
+						fptr->f_lastoffset = 0;
+						fptr->f_lastlength = 0;
+						break;
+
+					case M_REVERSE:
+						fptr->f_lastoffset =
+						    fptr->f_length;
+						fptr->f_lastlength = 0;
+						break;
+
+					case M_RANDOM:
+						fptr->f_lastoffset =
+						    fptr->f_length / 2;
+						fptr->f_lastlength = 0;
+						break;
+					}
+
+					Nfiles++;
+				}
+			}
+
+			optind++;
 		}
-	    }
 
- 	    optind++;
+		if (Nfiles == 0) {
+			fprintf(stderr,
+				"iogen%s:  Could not create, or gather info for any test files\n",
+				TagName);
+			exit(2);
+		}
 	}
 
-        if (Nfiles == 0) {
-	    fprintf(stderr, "iogen%s:  Could not create, or gather info for any test files\n", TagName);
-	    exit(2);
-        }
-    }
-
-  return 0;
+	return 0;
 }
 
-int
-help(FILE *stream)
+int help(FILE * stream)
 {
-    usage(stream);
-    fprintf(stream, "\n");
+	usage(stream);
+	fprintf(stream, "\n");
 #ifndef linux
-    fprintf(stream, "\t-a aio_type,...  Async io completion types to choose.  Supported types\n");
+	fprintf(stream,
+		"\t-a aio_type,...  Async io completion types to choose.  Supported types\n");
 #ifdef CRAY
 #if _UMK || RELEASE_LEVEL >= 8000
-    fprintf(stream, "\t                 are:  poll, signal, recall, recalla, and recalls.\n");
+	fprintf(stream,
+		"\t                 are:  poll, signal, recall, recalla, and recalls.\n");
 #else
-    fprintf(stream, "\t                 are:  poll, signal, recalla, and recalls.\n");
+	fprintf(stream,
+		"\t                 are:  poll, signal, recalla, and recalls.\n");
 #endif
 #else
-    fprintf(stream, "\t                 are:  poll, signal, suspend, and callback.\n");
+	fprintf(stream,
+		"\t                 are:  poll, signal, suspend, and callback.\n");
 #endif
-    fprintf(stream, "\t                 Default is all of the above.\n");
+	fprintf(stream, "\t                 Default is all of the above.\n");
 #else /* !linux */
-    fprintf(stream, "\t-a               (Not used on Linux).\n");
+	fprintf(stream, "\t-a               (Not used on Linux).\n");
 #endif /* !linux */
-    fprintf(stream, "\t-f flag,...      Flags to use for file IO.  Supported flags are\n");
+	fprintf(stream,
+		"\t-f flag,...      Flags to use for file IO.  Supported flags are\n");
 #ifdef CRAY
-    fprintf(stream, "\t                 raw, ssd, buffered, ldraw, sync,\n");
-    fprintf(stream, "\t                 raw+wf, raw+wf+ldraw, raw+wf+ldraw+sync,\n");
-    fprintf(stream, "\t                 and parallel (unicos/mk on MPP only).\n");
-    fprintf(stream, "\t                 Default is 'raw,ldraw,sync,buffered'.\n");
+	fprintf(stream,
+		"\t                 raw, ssd, buffered, ldraw, sync,\n");
+	fprintf(stream,
+		"\t                 raw+wf, raw+wf+ldraw, raw+wf+ldraw+sync,\n");
+	fprintf(stream,
+		"\t                 and parallel (unicos/mk on MPP only).\n");
+	fprintf(stream,
+		"\t                 Default is 'raw,ldraw,sync,buffered'.\n");
 #else
 #ifdef sgi
-    fprintf(stream, "\t                 buffered, direct, sync, dsync, rsync,\n");
-    fprintf(stream, "\t                 rsync+dsync.\n");
-    fprintf(stream, "\t                 Default is 'buffered,sync,dsync,rsync'.\n");
+	fprintf(stream,
+		"\t                 buffered, direct, sync, dsync, rsync,\n");
+	fprintf(stream, "\t                 rsync+dsync.\n");
+	fprintf(stream,
+		"\t                 Default is 'buffered,sync,dsync,rsync'.\n");
 #else
-    fprintf(stream, "\t                 buffered, sync.\n");
-    fprintf(stream, "\t                 Default is 'buffered,sync'.\n");
+	fprintf(stream, "\t                 buffered, sync.\n");
+	fprintf(stream, "\t                 Default is 'buffered,sync'.\n");
 #endif /* sgi */
 #endif /* CRAY */
-    fprintf(stream, "\t-h               This help.\n");
-    fprintf(stream, "\t-i iterations[s] # of requests to generate.  0 means causes iogen\n");
-    fprintf(stream, "\t                 to run until it's killed.  If iterations is suffixed\n");
-    fprintf(stream, "\t                 with 's', then iterations is the number of seconds\n");
-    fprintf(stream, "\t                 that iogen should run for.  Default is '0'.\n");
+	fprintf(stream, "\t-h               This help.\n");
+	fprintf(stream,
+		"\t-i iterations[s] # of requests to generate.  0 means causes iogen\n");
+	fprintf(stream,
+		"\t                 to run until it's killed.  If iterations is suffixed\n");
+	fprintf(stream,
+		"\t                 with 's', then iterations is the number of seconds\n");
+	fprintf(stream,
+		"\t                 that iogen should run for.  Default is '0'.\n");
 #ifndef linux
-    fprintf(stream, "\t-L min:max       listio nstrides / nrequests range\n");
+	fprintf(stream,
+		"\t-L min:max       listio nstrides / nrequests range\n");
 #else
-    fprintf(stream, "\t-L               (Not used on Linux).\n");
+	fprintf(stream, "\t-L               (Not used on Linux).\n");
 #endif /* !linux */
-    fprintf(stream, "\t-m offset-mode   The mode by which iogen chooses the offset for\n");
-    fprintf(stream, "\t                 consectutive transfers within a given file.\n");
-    fprintf(stream, "\t                 Allowed values are 'random', 'sequential',\n");
-    fprintf(stream, "\t                 and 'reverse'.\n");
-    fprintf(stream, "\t                 sequential is the default.\n");
-    fprintf(stream, "\t-N tagname       Tag name, for Monster.\n");
-    fprintf(stream, "\t-o               Form overlapping consecutive requests.\n");
-    fprintf(stream, "\t-O               Open flags for creating files\n");
+	fprintf(stream,
+		"\t-m offset-mode   The mode by which iogen chooses the offset for\n");
+	fprintf(stream,
+		"\t                 consectutive transfers within a given file.\n");
+	fprintf(stream,
+		"\t                 Allowed values are 'random', 'sequential',\n");
+	fprintf(stream, "\t                 and 'reverse'.\n");
+	fprintf(stream, "\t                 sequential is the default.\n");
+	fprintf(stream, "\t-N tagname       Tag name, for Monster.\n");
+	fprintf(stream,
+		"\t-o               Form overlapping consecutive requests.\n");
+	fprintf(stream, "\t-O               Open flags for creating files\n");
 #ifdef CRAY
-    fprintf(stream, "\t                 {O_PLACE,O_BIG,etc}[:CBITS[:CBLKS]]\n");
+	fprintf(stream,
+		"\t                 {O_PLACE,O_BIG,etc}[:CBITS[:CBLKS]]\n");
 #endif
 #ifdef sgi
-    fprintf(stream, "\t                 realtime:extsize - put file on real-time volume\n");
-    fprintf(stream, "\t                 allocate - allocate space with F_ALLOCSP\n");
-    fprintf(stream, "\t                 reserve - reserve space with F_RESVSP (default)\n");
-    fprintf(stream, "\t                 noreserve - do not reserve with F_RESVSP\n");
-    fprintf(stream, "\t                 direct - use O_DIRECT I/O to write to the file\n");
+	fprintf(stream,
+		"\t                 realtime:extsize - put file on real-time volume\n");
+	fprintf(stream,
+		"\t                 allocate - allocate space with F_ALLOCSP\n");
+	fprintf(stream,
+		"\t                 reserve - reserve space with F_RESVSP (default)\n");
+	fprintf(stream,
+		"\t                 noreserve - do not reserve with F_RESVSP\n");
+	fprintf(stream,
+		"\t                 direct - use O_DIRECT I/O to write to the file\n");
 #endif
 #ifdef linux
-    fprintf(stream, "\t                 {O_SYNC,etc}\n");
+	fprintf(stream, "\t                 {O_SYNC,etc}\n");
 #endif
-    fprintf(stream, "\t-p               Output pipe.  Default is stdout.\n");
-    fprintf(stream, "\t-q               Quiet mode.  Normally iogen spits out info\n");
-    fprintf(stream, "\t                 about test files, options, etc. before starting.\n");
-    fprintf(stream, "\t-s syscall,...   Syscalls to do.  Supported syscalls are\n");
+	fprintf(stream,
+		"\t-p               Output pipe.  Default is stdout.\n");
+	fprintf(stream,
+		"\t-q               Quiet mode.  Normally iogen spits out info\n");
+	fprintf(stream,
+		"\t                 about test files, options, etc. before starting.\n");
+	fprintf(stream,
+		"\t-s syscall,...   Syscalls to do.  Supported syscalls are\n");
 #ifdef sgi
-    fprintf(stream, "\t                 read, write, pread, pwrite, readv, writev\n");
-    fprintf(stream, "\t                 aread, awrite, resvsp, unresvsp, ffsync,\n");
-    fprintf(stream, "\t                 mmread, mmwrite, fsync2, fdatasync,\n");
-    fprintf(stream, "\t                 Default is 'read,write,pread,pwrite,readv,writev,mmread,mmwrite'.\n");
+	fprintf(stream,
+		"\t                 read, write, pread, pwrite, readv, writev\n");
+	fprintf(stream,
+		"\t                 aread, awrite, resvsp, unresvsp, ffsync,\n");
+	fprintf(stream,
+		"\t                 mmread, mmwrite, fsync2, fdatasync,\n");
+	fprintf(stream,
+		"\t                 Default is 'read,write,pread,pwrite,readv,writev,mmread,mmwrite'.\n");
 #endif
 #ifdef CRAY
-    fprintf(stream, "\t                 read, write, reada, writea, listio,\n");
-    fprintf(stream, "\t                 ssread (PVP only), and sswrite (PVP only).\n");
-    fprintf(stream, "\t                 Default is 'read,write,reada,writea,listio'.\n");
+	fprintf(stream,
+		"\t                 read, write, reada, writea, listio,\n");
+	fprintf(stream,
+		"\t                 ssread (PVP only), and sswrite (PVP only).\n");
+	fprintf(stream,
+		"\t                 Default is 'read,write,reada,writea,listio'.\n");
 #endif
 #ifdef linux
-    fprintf(stream, "\t                 read, write, readv, writev,\n");
-    fprintf(stream, "\t                 mmread, mmwrite, fsync2, fdatasync,\n");
-    fprintf(stream, "\t                 Default is 'read,write,readv,writev,mmread,mmwrite'.\n");
+	fprintf(stream, "\t                 read, write, readv, writev,\n");
+	fprintf(stream,
+		"\t                 mmread, mmwrite, fsync2, fdatasync,\n");
+	fprintf(stream,
+		"\t                 Default is 'read,write,readv,writev,mmread,mmwrite'.\n");
 #endif
-    fprintf(stream, "\t-t mintrans      Min transfer length\n");
-    fprintf(stream, "\t-T maxtrans      Max transfer length\n");
-    fprintf(stream, "\n");
-    fprintf(stream, "\t[len:]file,...   Test files to do IO against (note ssread/sswrite\n");
-    fprintf(stream, "\t                 don't need a test file).  The len: syntax\n");
-    fprintf(stream, "\t                 informs iogen to first create/expand/truncate the\n");
-    fprintf(stream, "\t                 to the desired length.\n");
-    fprintf(stream, "\n");
-    fprintf(stream, "\tNote:  The ssd flag causes sds transfers to also be done.\n");
-    fprintf(stream, "\t       To totally eliminate sds transfers, you must eleminate sds\n");
-    fprintf(stream, "\t       from the flags (-f) and ssread,ssrite from the syscalls (-s)\n");
-    fprintf(stream, "\tThe mintrans, maxtrans, and len: parameters are numbers of the\n");
-    fprintf(stream, "\tform [0-9]+[bkm].  The optional trailing b, k, or m multiplies\n");
-    fprintf(stream, "\tthe number by blocks, kilobytes, or megabytes.  If no trailing\n");
-    fprintf(stream, "\tmultiplier is present, the number is interpreted as bytes\n");
+	fprintf(stream, "\t-t mintrans      Min transfer length\n");
+	fprintf(stream, "\t-T maxtrans      Max transfer length\n");
+	fprintf(stream, "\n");
+	fprintf(stream,
+		"\t[len:]file,...   Test files to do IO against (note ssread/sswrite\n");
+	fprintf(stream,
+		"\t                 don't need a test file).  The len: syntax\n");
+	fprintf(stream,
+		"\t                 informs iogen to first create/expand/truncate the\n");
+	fprintf(stream, "\t                 to the desired length.\n");
+	fprintf(stream, "\n");
+	fprintf(stream,
+		"\tNote:  The ssd flag causes sds transfers to also be done.\n");
+	fprintf(stream,
+		"\t       To totally eliminate sds transfers, you must eleminate sds\n");
+	fprintf(stream,
+		"\t       from the flags (-f) and ssread,ssrite from the syscalls (-s)\n");
+	fprintf(stream,
+		"\tThe mintrans, maxtrans, and len: parameters are numbers of the\n");
+	fprintf(stream,
+		"\tform [0-9]+[bkm].  The optional trailing b, k, or m multiplies\n");
+	fprintf(stream,
+		"\tthe number by blocks, kilobytes, or megabytes.  If no trailing\n");
+	fprintf(stream,
+		"\tmultiplier is present, the number is interpreted as bytes\n");
 
-  return 0;
+	return 0;
 }
 
 /*
  * Obvious - usage clause
  */
 
-int
-usage(FILE *stream)
+int usage(FILE * stream)
 {
-    fprintf(stream, "usage%s:  iogen [-hoq] [-a aio_type,...] [-f flag[,flag...]] [-i iterations] [-p outpipe] [-m offset-mode] [-s syscall[,syscall...]] [-t mintrans] [-T maxtrans] [ -O file-create-flags ] [[len:]file ...]\n", TagName);
-  return 0;
+	fprintf(stream,
+		"usage%s:  iogen [-hoq] [-a aio_type,...] [-f flag[,flag...]] [-i iterations] [-p outpipe] [-m offset-mode] [-s syscall[,syscall...]] [-t mintrans] [-T maxtrans] [ -O file-create-flags ] [[len:]file ...]\n",
+		TagName);
+	return 0;
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ext4-inode-version/ext4_test_inode_version.c b/testcases/kernel/fs/ext4-new-features/ext4-inode-version/ext4_test_inode_version.c
index c6018b3..168f5ce 100644
--- a/testcases/kernel/fs/ext4-new-features/ext4-inode-version/ext4_test_inode_version.c
+++ b/testcases/kernel/fs/ext4-new-features/ext4-inode-version/ext4_test_inode_version.c
@@ -145,8 +145,7 @@
 
 	old_inode_version = get_inode_version();
 
-	p = mmap(NULL, 1, PROT_WRITE,
-		 MAP_PRIVATE | MAP_FILE, fd, 0);
+	p = mmap(NULL, 1, PROT_WRITE, MAP_PRIVATE | MAP_FILE, fd, 0);
 	if (p == (void *)-1) {
 		perror("mmap");
 		exit(1);
diff --git a/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_long_dirs.c b/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_long_dirs.c
index 7bedad3..e709ae9 100644
--- a/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_long_dirs.c
+++ b/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_long_dirs.c
@@ -39,7 +39,7 @@
 
 /* valid characters for the directory name */
 char chars[NCHARS + 1] =
-	"0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
+    "0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
 
 /* to store the generated directory name */
 char name[NAME_LEN + 1];
diff --git a/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_short_dirs.c b/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_short_dirs.c
index 324e3b6..fd8d819 100644
--- a/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_short_dirs.c
+++ b/testcases/kernel/fs/ext4-new-features/ext4-subdir-limit/create_short_dirs.c
@@ -65,7 +65,7 @@
 		name[0] = chars[i];
 		create_dir();
 		if (--n == 0)
-			return ;
+			return;
 	}
 }
 
@@ -84,7 +84,7 @@
 			name[1] = chars[j];
 			create_dir();
 			if (--n == 0)
-				return ;
+				return;
 		}
 	}
 }
@@ -106,7 +106,7 @@
 				name[2] = chars[k];
 				create_dir();
 				if (--n == 0)
-					return ;
+					return;
 			}
 		}
 	}
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/cirlist.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/cirlist.c
index 2a00ad6..1a96dc4 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/cirlist.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/cirlist.c
@@ -24,7 +24,7 @@
 void init_cirlist(struct cirlist *cl)
 {
 	cl->count = 0;
-	cl->head  = NULL;
+	cl->head = NULL;
 }
 
 int cl_empty(struct cirlist *cl)
@@ -32,7 +32,7 @@
 	return !(cl->count);
 }
 
-void cl_insert_tail(struct cirlist *cl , cldatatype object)
+void cl_insert_tail(struct cirlist *cl, cldatatype object)
 {
 	struct cnode *new = ffsb_malloc(sizeof(struct cnode));
 	new->obj = object;
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fc.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fc.c
index d26678b..60b6313 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fc.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fc.c
@@ -32,7 +32,7 @@
 #include "util.h"
 #include "parser.h"
 
-void init_ffsb_config(ffsb_config_t *fc, unsigned num_fs, unsigned num_tg)
+void init_ffsb_config(ffsb_config_t * fc, unsigned num_fs, unsigned num_tg)
 {
 	memset(fc, 0, sizeof(ffsb_config_t));
 
@@ -44,7 +44,7 @@
 	fc->filesystems = ffsb_malloc(sizeof(ffsb_fs_t) * num_fs);
 }
 
-void init_ffsb_config_1fs(ffsb_config_t *fc, ffsb_fs_t *fs, ffsb_tg_t *tg)
+void init_ffsb_config_1fs(ffsb_config_t * fc, ffsb_fs_t * fs, ffsb_tg_t * tg)
 {
 	memset(fc, 0, sizeof(*fc));
 
@@ -56,7 +56,7 @@
 	fc->filesystems = fs;
 }
 
-void destroy_ffsb_config(ffsb_config_t *fc)
+void destroy_ffsb_config(ffsb_config_t * fc)
 {
 	int i;
 	for (i = 0; i < fc->num_filesys; i++)
@@ -69,42 +69,42 @@
 	free(fc->filesystems);
 }
 
-void fc_set_time(ffsb_config_t *fc, unsigned time)
+void fc_set_time(ffsb_config_t * fc, unsigned time)
 {
 	fc->time = time;
 }
 
-unsigned fc_get_num_filesys(ffsb_config_t *fc)
+unsigned fc_get_num_filesys(ffsb_config_t * fc)
 {
 	return fc->num_filesys;
 }
 
-struct ffsb_tg *fc_get_tg(ffsb_config_t *fc, unsigned num)
+struct ffsb_tg *fc_get_tg(ffsb_config_t * fc, unsigned num)
 {
 	assert(num < fc->num_threadgroups);
 	return &fc->groups[num];
 }
 
-struct ffsb_fs *fc_get_fs(ffsb_config_t *fc, unsigned num)
+struct ffsb_fs *fc_get_fs(ffsb_config_t * fc, unsigned num)
 {
 	assert(num < fc->num_filesys);
 	return &fc->filesystems[num];
 }
 
-void fc_set_num_totalthreads(ffsb_config_t *fc, int num)
+void fc_set_num_totalthreads(ffsb_config_t * fc, int num)
 {
 	assert(num > 0);
 	fc->num_totalthreads = num;
 }
 
-void fc_set_callout(ffsb_config_t *fc, char *callout)
+void fc_set_callout(ffsb_config_t * fc, char *callout)
 {
 	if (fc->callout)
 		free(fc->callout);
 	fc->callout = ffsb_strdup(callout);
 }
 
-char *fc_get_callout(ffsb_config_t *fc)
+char *fc_get_callout(ffsb_config_t * fc)
 {
 	return fc->callout;
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fs.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fs.c
index 8678fb5..eb5a759 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fs.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_fs.c
@@ -27,7 +27,7 @@
 #include "fh.h"
 
 /* First zero out struct, set num_dirs, and strdups basedir */
-void init_ffsb_fs(ffsb_fs_t *fs, char *basedir, uint32_t num_data_dirs,
+void init_ffsb_fs(ffsb_fs_t * fs, char *basedir, uint32_t num_data_dirs,
 		  uint32_t numstartfiles, unsigned flags)
 {
 	memset(fs, 0, sizeof(ffsb_fs_t));
@@ -44,7 +44,7 @@
  * Does not remove files/dirs on disk, only frees up data
  * structures
 */
-void destroy_ffsb_fs(ffsb_fs_t *fs)
+void destroy_ffsb_fs(ffsb_fs_t * fs)
 {
 	free(fs->basedir);
 	destroy_filelist(&fs->files);
@@ -52,7 +52,7 @@
 	destroy_filelist(&fs->meta);
 }
 
-void clone_ffsb_fs(ffsb_fs_t *target, ffsb_fs_t *orig)
+void clone_ffsb_fs(ffsb_fs_t * target, ffsb_fs_t * orig)
 {
 	target->basedir = orig->basedir;
 	target->flags = orig->flags;
@@ -80,7 +80,7 @@
 	memcpy(target->op_data, orig->op_data, sizeof(void *) * FFSB_NUMOPS);
 }
 
-static void add_files(ffsb_fs_t *fs, struct benchfiles *bf, int num,
+static void add_files(ffsb_fs_t * fs, struct benchfiles *bf, int num,
 		      uint64_t minsize, uint64_t maxsize, unsigned blocksize)
 {
 	struct ffsb_file *cur;
@@ -103,12 +103,11 @@
 	else if (fs->init_size) {
 		if (getfsutil(fs->basedir) != initial_free ||
 		    fs->init_size > (getfsutil_size(fs->basedir) -
-		    initial_free))
+				     initial_free))
 			condition = 1;
 		else
 			condition = 0;
-	}
-	else if (fs->init_fsutil) {
+	} else if (fs->init_fsutil) {
 		if (fs->init_fsutil > getfsutil(fs->basedir))
 			condition = 1;
 		else
@@ -126,8 +125,7 @@
 				curop++;
 			}
 			size = fs->size_weights[curop].size;
-		}
-		else
+		} else
 			size = minsize + getllrandom(&rd, maxsize - minsize);
 
 		cur = add_file(bf, size, &rd);
@@ -144,8 +142,7 @@
 				condition = 1;
 			else
 				condition = 0;
-		}
-		else if (fs->init_fsutil) {
+		} else if (fs->init_fsutil) {
 			if (fs->init_fsutil > getfsutil(fs->basedir))
 				condition = 1;
 			else
@@ -158,13 +155,13 @@
 		fs_set_directio(fs, 1);
 }
 
-static void age_fs(ffsb_fs_t *fs, double utilization);
-static ffsb_fs_t *construct_new_fileset(ffsb_fs_t *fs);
-static ffsb_fs_t *check_existing_fileset(ffsb_fs_t *fs);
+static void age_fs(ffsb_fs_t * fs, double utilization);
+static ffsb_fs_t *construct_new_fileset(ffsb_fs_t * fs);
+static ffsb_fs_t *check_existing_fileset(ffsb_fs_t * fs);
 
 void *construct_ffsb_fs(void *data)
 {
-	ffsb_fs_t *fs  = (ffsb_fs_t *)data;
+	ffsb_fs_t *fs = (ffsb_fs_t *) data;
 	ffsb_fs_t *ret = NULL;
 
 	if (fs_get_reuse_fs(fs)) {
@@ -187,7 +184,7 @@
 
 static int verify_file(struct benchfiles *bf, char *fname, void *fs_ptr)
 {
-	ffsb_fs_t *fs = (ffsb_fs_t *)fs_ptr;
+	ffsb_fs_t *fs = (ffsb_fs_t *) fs_ptr;
 	uint64_t minsize = fs->minfilesize;
 	uint64_t maxsize = fs->maxfilesize;
 	uint64_t filesize = 0;
@@ -229,7 +226,7 @@
  * the meta filelist is empty.  Set up the filelist for fill (aging)
  * and setup the ops for the benchmark.
 */
-static ffsb_fs_t *check_existing_fileset(ffsb_fs_t *fs)
+static ffsb_fs_t *check_existing_fileset(ffsb_fs_t * fs)
 {
 	char buf[FILENAME_MAX * 3];
 	int retval = 0;
@@ -283,8 +280,7 @@
 		return NULL;
 	}
 
-	if ((get_listsize(&fs->meta) != 0) ||
-	    (get_numsubdirs(&fs->meta) != 0)) {
+	if ((get_listsize(&fs->meta) != 0) || (get_numsubdirs(&fs->meta) != 0)) {
 		printf("check_existing_fileset: meta directory isn't empty\n"
 		       "aborting\n");
 		destroy_filelist(&fs->files);
@@ -295,7 +291,7 @@
 	/* Even though we won't use it, we still need to be consistent
 	 * here.
 	 */
-	init_filelist(&fs->fill,  buf, AGE_BASE, 0, 0);
+	init_filelist(&fs->fill, buf, AGE_BASE, 0, 0);
 
 	/* Have to do this or everything else could break. */
 	ops_setup_bench(fs);
@@ -311,7 +307,7 @@
  *  have ffsb_ops setup their data
  *  create starting files in files
  */
-static ffsb_fs_t *construct_new_fileset(ffsb_fs_t *fs)
+static ffsb_fs_t *construct_new_fileset(ffsb_fs_t * fs)
 {
 	char buf[FILENAME_MAX * 3];
 
@@ -367,12 +363,12 @@
 
 struct poll_data {
 	ffsb_fs_t *fs;
-	double    util;
+	double util;
 };
 
 static int fs_get_util(void *data)
 {
-	struct poll_data *pd = (struct poll_data *) data;
+	struct poll_data *pd = (struct poll_data *)data;
 	double fsutil = getfsutil(pd->fs->basedir);
 
 	if (fsutil >= pd->util)
@@ -381,7 +377,7 @@
 	return 0;
 }
 
-static void age_fs(ffsb_fs_t *fs, double utilization)
+static void age_fs(ffsb_fs_t * fs, double utilization)
 {
 	ffsb_barrier_t barrier;
 	pthread_t thread;
@@ -418,47 +414,47 @@
 	pthread_join(thread, NULL);
 }
 
-void fs_set_create_blocksize(ffsb_fs_t *fs, uint32_t blocksize)
+void fs_set_create_blocksize(ffsb_fs_t * fs, uint32_t blocksize)
 {
 	fs->create_blocksize = blocksize;
 }
 
-void fs_set_age_blocksize(ffsb_fs_t *fs, uint32_t blocksize)
+void fs_set_age_blocksize(ffsb_fs_t * fs, uint32_t blocksize)
 {
 	fs->age_blocksize = blocksize;
 }
 
-uint32_t fs_get_create_blocksize(ffsb_fs_t *fs)
+uint32_t fs_get_create_blocksize(ffsb_fs_t * fs)
 {
 	return fs->create_blocksize;
 }
 
-uint32_t fs_get_age_blocksize(ffsb_fs_t *fs)
+uint32_t fs_get_age_blocksize(ffsb_fs_t * fs)
 {
 	return fs->age_blocksize;
 }
 
-char *fs_get_basedir(ffsb_fs_t *fs)
+char *fs_get_basedir(ffsb_fs_t * fs)
 {
 	return fs->basedir;
 }
 
-uint32_t fs_get_numstartfiles(ffsb_fs_t *fs)
+uint32_t fs_get_numstartfiles(ffsb_fs_t * fs)
 {
 	return fs->num_start_files;
 }
 
-uint32_t fs_get_numdirs(ffsb_fs_t *fs)
+uint32_t fs_get_numdirs(ffsb_fs_t * fs)
 {
 	return fs->num_dirs;
 }
 
-int fs_get_libcio(ffsb_fs_t *fs)
+int fs_get_libcio(ffsb_fs_t * fs)
 {
 	return fs->flags & FFSB_FS_LIBCIO;
 }
 
-void fs_set_libcio(ffsb_fs_t *fs, int lio)
+void fs_set_libcio(ffsb_fs_t * fs, int lio)
 {
 	if (lio)
 		fs->flags |= FFSB_FS_LIBCIO;
@@ -466,12 +462,12 @@
 		fs->flags &= ~0 & ~FFSB_FS_LIBCIO;
 }
 
-int fs_get_directio(ffsb_fs_t *fs)
+int fs_get_directio(ffsb_fs_t * fs)
 {
 	return fs->flags & FFSB_FS_DIRECTIO;
 }
 
-void fs_set_directio(ffsb_fs_t *fs, int dio)
+void fs_set_directio(ffsb_fs_t * fs, int dio)
 {
 	if (dio)
 		fs->flags |= FFSB_FS_DIRECTIO;
@@ -479,12 +475,12 @@
 		fs->flags &= ~0 & ~FFSB_FS_DIRECTIO;
 }
 
-int fs_get_alignio(ffsb_fs_t *fs)
+int fs_get_alignio(ffsb_fs_t * fs)
 {
 	return fs->flags & FFSB_FS_ALIGNIO4K;
 }
 
-void fs_set_alignio(ffsb_fs_t *fs, int aio)
+void fs_set_alignio(ffsb_fs_t * fs, int aio)
 {
 	if (aio)
 		fs->flags |= FFSB_FS_ALIGNIO4K;
@@ -492,12 +488,12 @@
 		fs->flags &= ~0 & ~FFSB_FS_ALIGNIO4K;
 }
 
-int fs_get_reuse_fs(ffsb_fs_t *fs)
+int fs_get_reuse_fs(ffsb_fs_t * fs)
 {
 	return fs->flags & FFSB_FS_REUSE_FS;
 }
 
-void fs_set_reuse_fs(ffsb_fs_t *fs, int rfs)
+void fs_set_reuse_fs(ffsb_fs_t * fs, int rfs)
 {
 	if (rfs)
 		fs->flags |= FFSB_FS_REUSE_FS;
@@ -505,80 +501,80 @@
 		fs->flags &= ~0 & ~FFSB_FS_REUSE_FS;
 }
 
-struct benchfiles *fs_get_datafiles(ffsb_fs_t *fs)
+struct benchfiles *fs_get_datafiles(ffsb_fs_t * fs)
 {
 	return &fs->files;
 }
 
-struct benchfiles *fs_get_metafiles(ffsb_fs_t *fs)
+struct benchfiles *fs_get_metafiles(ffsb_fs_t * fs)
 {
 	return &fs->meta;
 }
 
-struct benchfiles *fs_get_agefiles(ffsb_fs_t *fs)
+struct benchfiles *fs_get_agefiles(ffsb_fs_t * fs)
 {
 	return &fs->fill;
 }
 
-void fs_set_aging_tg(ffsb_fs_t *fs, struct ffsb_tg *tg, double util)
+void fs_set_aging_tg(ffsb_fs_t * fs, struct ffsb_tg *tg, double util)
 {
 	fs->aging_tg = tg;
 	fs->age_fs = 1;
 	fs->desired_fsutil = util;
 }
 
-struct ffsb_tg *fs_get_aging_tg(ffsb_fs_t *fs)
+struct ffsb_tg *fs_get_aging_tg(ffsb_fs_t * fs)
 {
 	return fs->aging_tg;
 }
 
-int fs_get_agefs(ffsb_fs_t *fs)
+int fs_get_agefs(ffsb_fs_t * fs)
 {
 	return fs->age_fs;
 }
 
 /* TODO: Implement this!!!*/
-void fs_set_num_age_dirs(ffsb_fs_t *fs, uint32_t numdirs)
+void fs_set_num_age_dirs(ffsb_fs_t * fs, uint32_t numdirs)
 {
 	fs->num_age_dirs = numdirs;
 }
 
-void fs_set_opdata(ffsb_fs_t *fs, void *data, unsigned opnum)
+void fs_set_opdata(ffsb_fs_t * fs, void *data, unsigned opnum)
 {
 	fs->op_data[opnum] = data;
 }
 
-void *fs_get_opdata(ffsb_fs_t *fs, unsigned opnum)
+void *fs_get_opdata(ffsb_fs_t * fs, unsigned opnum)
 {
 	return fs->op_data[opnum];
 }
 
-void fs_set_min_filesize(ffsb_fs_t *fs, uint64_t size)
+void fs_set_min_filesize(ffsb_fs_t * fs, uint64_t size)
 {
 	fs->minfilesize = size;
 }
 
-void fs_set_max_filesize(ffsb_fs_t *fs, uint64_t size)
+void fs_set_max_filesize(ffsb_fs_t * fs, uint64_t size)
 {
 	fs->maxfilesize = size;
 }
 
-uint64_t fs_get_min_filesize(ffsb_fs_t *fs)
+uint64_t fs_get_min_filesize(ffsb_fs_t * fs)
 {
 	return fs->minfilesize;
 }
 
-uint64_t fs_get_max_filesize(ffsb_fs_t *fs)
+uint64_t fs_get_max_filesize(ffsb_fs_t * fs)
 {
 	return fs->maxfilesize;
 }
 
-double fs_get_desired_fsutil(ffsb_fs_t *fs)
+double fs_get_desired_fsutil(ffsb_fs_t * fs)
 {
 	return fs->desired_fsutil;
 }
 
-void fs_print_config(ffsb_fs_t *fs)
+void fs_print_config(ffsb_fs_t * fs)
 {
 	char buf[256];
 
@@ -593,12 +589,11 @@
 		for (i = 0; i < fs->num_weights; i++)
 			printf("\t\t %12llu (%6s) -> %u (%.2f\%)\n",
 			       fs->size_weights[i].size,
-			       ffsb_printsize(buf, fs->size_weights[i].size, 256),
-			       fs->size_weights[i].weight,
+			       ffsb_printsize(buf, fs->size_weights[i].size,
+					      256), fs->size_weights[i].weight,
 			       ((float)fs->size_weights[i].weight /
 				(float)fs->sum_weights) * 100);
-	}
-	else {
+	} else {
 		printf("\t min file size    = %llu\t(%s)\n", fs->minfilesize,
 		       ffsb_printsize(buf, fs->minfilesize, 256));
 		printf("\t max file size    = %llu\t(%s)\n", fs->maxfilesize,
@@ -612,21 +607,23 @@
 	       "on" : "off");
 	printf("\t\n");
 	printf("\t aging is %s\n", (fs->age_fs) ? "on" : "off");
-	printf("\t current utilization = %.2f\%\n", getfsutil(fs->basedir)*100);
+	printf("\t current utilization = %.2f\%\n",
+	       getfsutil(fs->basedir) * 100);
 	if (fs->age_fs) {
-		printf("\t desired utilization = %.2lf%\n", fs->desired_fsutil * 100);
+		printf("\t desired utilization = %.2lf%\n",
+		       fs->desired_fsutil * 100);
 		printf("\t \n");
 		tg_print_config_aging(fs->aging_tg, fs->basedir);
 	}
 	printf("\t\n");
 }
 
-int fs_needs_stats(ffsb_fs_t *fs, syscall_t sys)
+int fs_needs_stats(ffsb_fs_t * fs, syscall_t sys)
 {
 	return (fs != NULL) ? (int)fs->fsd.config : 0;
 }
 
-void fs_add_stat(ffsb_fs_t *fs, syscall_t sys, uint32_t val)
+void fs_add_stat(ffsb_fs_t * fs, syscall_t sys, uint32_t val)
 {
 	if (fs)
 		ffsb_add_data(&fs->fsd, sys, val);
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_op.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_op.c
index 1461263..ba05fba 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_op.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_op.c
@@ -23,34 +23,48 @@
 #include "fileops.h"
 #include "metaops.h"
 
-ffsb_op_t ffsb_op_list[] =
-{{0, "read", ffsb_readfile, READ, fop_bench, NULL},
- {1, "readall",	ffsb_readall, READ, fop_bench, NULL},
- {2, "write", ffsb_writefile, WRITE, fop_bench, NULL},
- {3, "create", ffsb_createfile, WRITE, fop_bench, fop_age},
- {4, "append", ffsb_appendfile, WRITE, fop_bench, fop_age},
- {5, "delete", ffsb_deletefile, NA, fop_bench, fop_age},
- {6, "metaop", ffsb_metaops, NA, metaops_metadir, NULL},
- {7, "createdir", ffsb_createdir, NA, fop_bench, NULL},
- {8, "stat", ffsb_stat, NA, fop_bench, NULL},
- {9, "writeall", ffsb_writeall, WRITE, fop_bench, NULL},
- {10, "writeall_fsync", ffsb_writeall_fsync, WRITE, fop_bench, NULL},
- {11, "open_close", ffsb_open_close, NA, fop_bench, NULL},
- {12, "write_fsync", ffsb_writefile_fsync, WRITE, fop_bench, NULL},
- {13, "create_fsync", ffsb_createfile_fsync, WRITE, fop_bench, fop_age},
- {14, "append_fsync", ffsb_appendfile_fsync, WRITE, fop_bench, fop_age},
+ffsb_op_t ffsb_op_list[] = { {0, "read", ffsb_readfile, READ, fop_bench, NULL}
+,
+{1, "readall", ffsb_readall, READ, fop_bench, NULL}
+,
+{2, "write", ffsb_writefile, WRITE, fop_bench, NULL}
+,
+{3, "create", ffsb_createfile, WRITE, fop_bench, fop_age}
+,
+{4, "append", ffsb_appendfile, WRITE, fop_bench, fop_age}
+,
+{5, "delete", ffsb_deletefile, NA, fop_bench, fop_age}
+,
+{6, "metaop", ffsb_metaops, NA, metaops_metadir, NULL}
+,
+{7, "createdir", ffsb_createdir, NA, fop_bench, NULL}
+,
+{8, "stat", ffsb_stat, NA, fop_bench, NULL}
+,
+{9, "writeall", ffsb_writeall, WRITE, fop_bench, NULL}
+,
+{10, "writeall_fsync", ffsb_writeall_fsync, WRITE, fop_bench, NULL}
+,
+{11, "open_close", ffsb_open_close, NA, fop_bench, NULL}
+,
+{12, "write_fsync", ffsb_writefile_fsync, WRITE, fop_bench, NULL}
+,
+{13, "create_fsync", ffsb_createfile_fsync, WRITE, fop_bench, fop_age}
+,
+{14, "append_fsync", ffsb_appendfile_fsync, WRITE, fop_bench, fop_age}
+,
 };
 
-void init_ffsb_op_results(ffsb_op_results_t *results)
+void init_ffsb_op_results(ffsb_op_results_t * results)
 {
 	memset(results, 0, sizeof(ffsb_op_results_t));
 }
 
-static int exclusive_op(ffsb_op_results_t *results, unsigned int op_num)
+static int exclusive_op(ffsb_op_results_t * results, unsigned int op_num)
 {
 	int i;
 	int ret = 0;
-	for (i = 0; i < FFSB_NUMOPS ; i++) {
+	for (i = 0; i < FFSB_NUMOPS; i++) {
 		if (i == op_num)
 			continue;
 		ret += results->ops[i];
@@ -65,32 +79,30 @@
 			     double weigth_pcnt, double runtime, char *tput)
 {
 	printf("%20s : %12u\t%10.2lf\t%6.3lf%%\t\t%6.3lf%%\t  %11s\n",
-	       name, num, num/runtime, op_pcnt, weigth_pcnt, tput);
+	       name, num, num / runtime, op_pcnt, weigth_pcnt, tput);
 }
 
-static void print_op_results(unsigned int op_num, ffsb_op_results_t *results,
+static void print_op_results(unsigned int op_num, ffsb_op_results_t * results,
 			     double runtime, unsigned total_ops,
 			     unsigned total_weight)
 {
 	char buf[256];
 
-	double op_pcnt = 100 * (double)results->ops[op_num] /
-		(double)total_ops;
+	double op_pcnt = 100 * (double)results->ops[op_num] / (double)total_ops;
 	double weight_pcnt = 100 * (double)results->op_weight[op_num] /
-		(double)total_weight;
+	    (double)total_weight;
 	if (ffsb_op_list[op_num].throughput) {
-		ffsb_printsize (buf, results->bytes[op_num] / runtime, 256);
+		ffsb_printsize(buf, results->bytes[op_num] / runtime, 256);
 		sprintf(buf, "%s/sec\0", buf);
-	}
-	else
+	} else
 		sprintf(buf, "NA\0");
 	generic_op_print(ffsb_op_list[op_num].op_name, results->ops[op_num],
 			 op_pcnt, weight_pcnt, runtime, buf);
 }
 
 #if 0
-static void print_op_throughput(unsigned int op_num, ffsb_op_results_t *results,
-				double runtime)
+static void print_op_throughput(unsigned int op_num,
+				ffsb_op_results_t * results, double runtime)
 {
 	if (ffsb_op_list[op_num].op_exl_print_fn != NULL)
 		ffsb_op_list[op_num].op_exl_print_fn(results, runtime, op_num);
@@ -104,18 +116,21 @@
 	uint64_t total_weight = 0;
 	char buf[256];
 
-	for (i = 0; i < FFSB_NUMOPS ; i++) {
+	for (i = 0; i < FFSB_NUMOPS; i++) {
 		total_ops += results->ops[i];
 		total_weight += results->op_weight[i];
 	}
 
-	printf("             Op Name   Transactions\t Trans/sec\t% Trans\t    % Op Weight\t   Throughput\n");
-	printf("             =======   ============\t =========\t=======\t    ===========\t   ==========\n");
-	for (i = 0; i < FFSB_NUMOPS ; i++)
+	printf
+	    ("             Op Name   Transactions\t Trans/sec\t% Trans\t    % Op Weight\t   Throughput\n");
+	printf
+	    ("             =======   ============\t =========\t=======\t    ===========\t   ==========\n");
+	for (i = 0; i < FFSB_NUMOPS; i++)
 		if (results->ops[i] != 0)
 			print_op_results(i, results, runtime, total_ops,
 					 total_weight);
-	printf("-\n%.2lf Transactions per Second\n\n", (double)total_ops / runtime);
+	printf("-\n%.2lf Transactions per Second\n\n",
+	       (double)total_ops / runtime);
 
 	if (results->write_bytes || results->read_bytes)
 		printf("Throughput Results\n===================\n");
@@ -134,19 +149,19 @@
 	return ffsb_op_list[opnum].op_name;
 }
 
-void ops_setup_bench(ffsb_fs_t *fs)
+void ops_setup_bench(ffsb_fs_t * fs)
 {
 	int i;
 	for (i = 0; i < FFSB_NUMOPS; i++)
 		ffsb_op_list[i].op_bench(fs, i);
 }
 
-void ops_setup_age(ffsb_fs_t *fs)
+void ops_setup_age(ffsb_fs_t * fs)
 {
 	int i;
 	for (i = 0; i < FFSB_NUMOPS; i++)
 		if (ffsb_op_list[i].op_age)
-		    ffsb_op_list[i].op_age(fs, i);
+			ffsb_op_list[i].op_age(fs, i);
 }
 
 int ops_find_op(char *opname)
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_stats.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_stats.c
index d3e20fd..2b3a3be 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_stats.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_stats.c
@@ -16,7 +16,7 @@
 };
 
 /* yuck, just for the parser anyway.. */
-int ffsb_stats_str2syscall(char *str, syscall_t *sys)
+int ffsb_stats_str2syscall(char *str, syscall_t * sys)
 {
 	int i;
 	int ret;
@@ -27,7 +27,7 @@
 		 * syscall_names[i],i,str,ret);
 		 */
 		if (0 == ret) {
-			*sys = (syscall_t)i; /* ewww */
+			*sys = (syscall_t) i;	/* ewww */
 			/* printf("matched syscall %s\n",syscall_names[i]); */
 			return 1;
 		}
@@ -36,14 +36,14 @@
 	return 0;
 }
 
-void  ffsb_statsc_init(ffsb_statsc_t *fsc)
+void ffsb_statsc_init(ffsb_statsc_t * fsc)
 {
 	fsc->num_buckets = 0;
 	fsc->buckets = NULL;
 	fsc->ignore_stats = 0;
 }
 
-void ffsb_statsc_addbucket(ffsb_statsc_t *fsc, uint32_t min, uint32_t max)
+void ffsb_statsc_addbucket(ffsb_statsc_t * fsc, uint32_t min, uint32_t max)
 {
 	struct stat_bucket *temp;
 	fsc->num_buckets++;
@@ -55,16 +55,16 @@
 	fsc->buckets = temp;
 
 	/* Convert to micro-secs from milli-secs */
-	fsc->buckets[fsc->num_buckets-1].min = min ;
-	fsc->buckets[fsc->num_buckets-1].max = max ;
+	fsc->buckets[fsc->num_buckets - 1].min = min;
+	fsc->buckets[fsc->num_buckets - 1].max = max;
 }
 
-void ffsb_statsc_destroy(ffsb_statsc_t *fsc)
+void ffsb_statsc_destroy(ffsb_statsc_t * fsc)
 {
 	free(fsc->buckets);
 }
 
-void ffsb_statsc_ignore_sys(ffsb_statsc_t *fsc, syscall_t s)
+void ffsb_statsc_ignore_sys(ffsb_statsc_t * fsc, syscall_t s)
 {
 	/* printf("fsis: oring 0x%x with 0x%x\n",
 	 *      fsc->ignore_stats,
@@ -73,12 +73,12 @@
 	fsc->ignore_stats |= (1 << s);
 }
 
-int fsc_ignore_sys(ffsb_statsc_t *fsc, syscall_t s)
+int fsc_ignore_sys(ffsb_statsc_t * fsc, syscall_t s)
 {
 	return fsc->ignore_stats & (1 << s);
 }
 
-void ffsb_statsd_init(ffsb_statsd_t *fsd, ffsb_statsc_t *fsc)
+void ffsb_statsd_init(ffsb_statsd_t * fsd, ffsb_statsc_t * fsc)
 {
 	int i;
 	memset(fsd, 0, sizeof(*fsd));
@@ -91,20 +91,19 @@
 					      fsc->num_buckets);
 		assert(fsd->buckets[i] != NULL);
 
-		memset(fsd->buckets[i], 0, sizeof(uint32_t) *
-		       fsc->num_buckets);
+		memset(fsd->buckets[i], 0, sizeof(uint32_t) * fsc->num_buckets);
 	}
 	fsd->config = fsc;
 }
 
-void ffsb_statsd_destroy(ffsb_statsd_t *fsd)
+void ffsb_statsd_destroy(ffsb_statsd_t * fsd)
 {
-	int i ;
-	for (i = 0 ; i < FFSB_NUM_SYSCALLS; i++)
+	int i;
+	for (i = 0; i < FFSB_NUM_SYSCALLS; i++)
 		free(fsd->buckets[i]);
 }
 
-void ffsb_add_data(ffsb_statsd_t *fsd, syscall_t s, uint32_t value)
+void ffsb_add_data(ffsb_statsd_t * fsd, syscall_t s, uint32_t value)
 {
 	unsigned num_buckets, i;
 	struct stat_bucket *bucket_defs;
@@ -136,12 +135,12 @@
 	}
 }
 
-void ffsb_statsc_copy(ffsb_statsc_t *dest, ffsb_statsc_t *src)
+void ffsb_statsc_copy(ffsb_statsc_t * dest, ffsb_statsc_t * src)
 {
 	memcpy(dest, src, sizeof(*src));
 }
 
-void ffsb_statsd_add(ffsb_statsd_t *dest, ffsb_statsd_t *src)
+void ffsb_statsd_add(ffsb_statsd_t * dest, ffsb_statsd_t * src)
 {
 	int i, j;
 	unsigned num_buckets;
@@ -165,7 +164,7 @@
 	}
 }
 
-static void print_buckets_helper(ffsb_statsc_t *fsc, uint32_t *buckets)
+static void print_buckets_helper(ffsb_statsc_t * fsc, uint32_t * buckets)
 {
 	int i;
 	if (fsc->num_buckets == 0) {
@@ -175,13 +174,13 @@
 	for (i = 0; i < fsc->num_buckets; i++) {
 		struct stat_bucket *sb = &fsc->buckets[i];
 		printf("\t\t msec_range[%d]\t%f - %f : %8u\n",
-		       i, (double)sb->min/1000.0f, (double)sb->max/1000.0f,
+		       i, (double)sb->min / 1000.0f, (double)sb->max / 1000.0f,
 		       buckets[i]);
 	}
 	printf("\n");
 }
 
-void ffsb_statsd_print(ffsb_statsd_t *fsd)
+void ffsb_statsd_print(ffsb_statsd_t * fsd)
 {
 	int i;
 	printf("\nSystem Call Latency statistics in millisecs\n" "=====\n");
@@ -198,7 +197,7 @@
 		}
 }
 
-#if 0 /* Testing */
+#if 0				/* Testing */
 
 void *ffsb_malloc(size_t s)
 {
@@ -211,7 +210,7 @@
 {
 	ffsb_statsc_t fsc;
 	ffsb_statsd_t fsd;
-	int i ;
+	int i;
 
 	printf("init\n");
 
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_tg.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_tg.c
index f073204..881f32d 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_tg.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_tg.c
@@ -23,7 +23,7 @@
 #include "ffsb_tg.h"
 #include "util.h"
 
-void init_ffsb_tg(ffsb_tg_t *tg, unsigned num_threads, unsigned tg_num)
+void init_ffsb_tg(ffsb_tg_t * tg, unsigned num_threads, unsigned tg_num)
 {
 	int i;
 	memset(tg, 0, sizeof(ffsb_tg_t));
@@ -32,14 +32,14 @@
 	tg->tg_num = tg_num;
 	tg->num_threads = num_threads;
 
-	tg->bindfs = -1; /* default is not bound */
+	tg->bindfs = -1;	/* default is not bound */
 
 	tg->thread_bufsize = 0;
-	for (i = 0 ; i < num_threads ; i++)
+	for (i = 0; i < num_threads; i++)
 		init_ffsb_thread(tg->threads + i, tg, 0, tg_num, i);
 }
 
-void destroy_ffsb_tg(ffsb_tg_t *tg)
+void destroy_ffsb_tg(ffsb_tg_t * tg)
 {
 	int i;
 	for (i = 0; i < tg->num_threads; i++)
@@ -51,7 +51,7 @@
 
 void *tg_run(void *data)
 {
-	tg_run_params_t *params = (tg_run_params_t *)data;
+	tg_run_params_t *params = (tg_run_params_t *) data;
 	ffsb_tg_t *tg = params->tg;
 	int i;
 	pthread_attr_t attr;
@@ -95,7 +95,7 @@
 }
 
 /* Needs to set params->opnum and params->fs */
-void tg_get_op(ffsb_tg_t *tg, randdata_t *rd, tg_op_params_t *params)
+void tg_get_op(ffsb_tg_t * tg, randdata_t * rd, tg_op_params_t * params)
 {
 	unsigned curop;
 	int num;
@@ -121,148 +121,148 @@
 	params->fs = fc_get_fs(tg->fc, fsnum);
 }
 
-void tg_set_op_weight(ffsb_tg_t *tg, char *opname, unsigned weight)
+void tg_set_op_weight(ffsb_tg_t * tg, char *opname, unsigned weight)
 {
 	int opnum = ops_find_op(opname);
 	assert(opnum >= 0);
 	tg->op_weights[opnum] = weight;
 }
 
-unsigned tg_get_op_weight(ffsb_tg_t *tg, char *opname)
+unsigned tg_get_op_weight(ffsb_tg_t * tg, char *opname)
 {
 	int opnum = ops_find_op(opname);
 	assert(opnum >= 0);
 	return tg->op_weights[opnum];
 }
 
-void tg_set_bindfs(ffsb_tg_t *tg, int fsnum)
+void tg_set_bindfs(ffsb_tg_t * tg, int fsnum)
 {
 	tg->bindfs = fsnum;
 }
 
-int tg_get_bindfs(ffsb_tg_t *tg)
+int tg_get_bindfs(ffsb_tg_t * tg)
 {
 	return tg->bindfs;
 }
 
-unsigned tg_get_numthreads(ffsb_tg_t *tg)
+unsigned tg_get_numthreads(ffsb_tg_t * tg)
 {
 	return tg->num_threads;
 }
 
-static void update_bufsize(ffsb_tg_t *tg)
+static void update_bufsize(ffsb_tg_t * tg)
 {
 	int i;
 	uint32_t newmax = max(tg->read_blocksize, tg->write_blocksize);
 
 	if (newmax == max(newmax, tg->thread_bufsize))
-		for (i = 0; i < tg->num_threads ; i++)
+		for (i = 0; i < tg->num_threads; i++)
 			ft_alter_bufsize(tg->threads + i, newmax);
 }
 
-void tg_set_read_random(ffsb_tg_t *tg, int rr)
+void tg_set_read_random(ffsb_tg_t * tg, int rr)
 {
 	tg->read_random = rr;
 }
 
-void tg_set_write_random(ffsb_tg_t *tg, int wr)
+void tg_set_write_random(ffsb_tg_t * tg, int wr)
 {
 	tg->write_random = wr;
 }
 
-void tg_set_fsync_file(ffsb_tg_t *tg, int fsync)
+void tg_set_fsync_file(ffsb_tg_t * tg, int fsync)
 {
 	tg->fsync_file = fsync;
 }
 
-void tg_set_read_size(ffsb_tg_t *tg, uint64_t rs)
+void tg_set_read_size(ffsb_tg_t * tg, uint64_t rs)
 {
 	tg->read_size = rs;
 }
 
-void tg_set_read_blocksize(ffsb_tg_t *tg, uint32_t rs)
+void tg_set_read_blocksize(ffsb_tg_t * tg, uint32_t rs)
 {
 	tg->read_blocksize = rs;
 	update_bufsize(tg);
 }
 
-void tg_set_read_skip(ffsb_tg_t *tg, int rs)
+void tg_set_read_skip(ffsb_tg_t * tg, int rs)
 {
 	tg->read_skip = rs;
 }
 
-void tg_set_read_skipsize(ffsb_tg_t *tg, uint32_t rs)
+void tg_set_read_skipsize(ffsb_tg_t * tg, uint32_t rs)
 {
 	tg->read_skipsize = rs;
 }
 
-void tg_set_write_size(ffsb_tg_t *tg, uint64_t ws)
+void tg_set_write_size(ffsb_tg_t * tg, uint64_t ws)
 {
 	tg->write_size = ws;
 }
 
-void tg_set_write_blocksize(ffsb_tg_t *tg, uint32_t ws)
+void tg_set_write_blocksize(ffsb_tg_t * tg, uint32_t ws)
 {
 	tg->write_blocksize = ws;
 	update_bufsize(tg);
 }
 
-int tg_get_read_random(ffsb_tg_t *tg)
+int tg_get_read_random(ffsb_tg_t * tg)
 {
 	return tg->read_random;
 }
 
-int tg_get_write_random(ffsb_tg_t *tg)
+int tg_get_write_random(ffsb_tg_t * tg)
 {
 	return tg->write_random;
 }
 
-int tg_get_fsync_file(ffsb_tg_t *tg)
+int tg_get_fsync_file(ffsb_tg_t * tg)
 {
 	return tg->fsync_file;
 }
 
-uint64_t tg_get_read_size(ffsb_tg_t *tg)
+uint64_t tg_get_read_size(ffsb_tg_t * tg)
 {
 	return tg->read_size;
 }
 
-uint32_t tg_get_read_blocksize(ffsb_tg_t *tg)
+uint32_t tg_get_read_blocksize(ffsb_tg_t * tg)
 {
 	return tg->read_blocksize;
 }
 
-int tg_get_read_skip(ffsb_tg_t *tg)
+int tg_get_read_skip(ffsb_tg_t * tg)
 {
 	return tg->read_skip;
 }
 
-uint32_t tg_get_read_skipsize(ffsb_tg_t *tg)
+uint32_t tg_get_read_skipsize(ffsb_tg_t * tg)
 {
 	return tg->read_skipsize;
 }
 
-uint64_t tg_get_write_size(ffsb_tg_t *tg)
+uint64_t tg_get_write_size(ffsb_tg_t * tg)
 {
 	return tg->write_size;
 }
 
-uint32_t tg_get_write_blocksize(ffsb_tg_t *tg)
+uint32_t tg_get_write_blocksize(ffsb_tg_t * tg)
 {
 	return tg->write_blocksize;
 }
 
-int tg_get_stopval(ffsb_tg_t *tg)
+int tg_get_stopval(ffsb_tg_t * tg)
 {
 	return tg->stopval;
 }
 
-ffsb_barrier_t *tg_get_start_barrier(ffsb_tg_t *tg)
+ffsb_barrier_t *tg_get_start_barrier(ffsb_tg_t * tg)
 {
 	return tg->start_barrier;
 }
 
-static void tg_print_config_helper(ffsb_tg_t *tg)
+static void tg_print_config_helper(ffsb_tg_t * tg)
 {
 	int i;
 	int sumweights = 0;
@@ -303,43 +303,43 @@
 	printf("\t\n");
 }
 
-void tg_print_config(ffsb_tg_t *tg)
+void tg_print_config(ffsb_tg_t * tg)
 {
 	printf("ThreadGroup %d\n", tg->tg_num);
 	printf("================\n");
 	tg_print_config_helper(tg);
 }
 
-void tg_print_config_aging(ffsb_tg_t *tg, char *fsname)
+void tg_print_config_aging(ffsb_tg_t * tg, char *fsname)
 {
 	printf("\t Aging ThreadGroup for fs %s\n", fsname);
 	printf("\t ================\n");
 	tg_print_config_helper(tg);
 }
 
-void tg_collect_results(ffsb_tg_t *tg, ffsb_op_results_t *r)
+void tg_collect_results(ffsb_tg_t * tg, ffsb_op_results_t * r)
 {
 	int i;
 	for (i = 0; i < tg_get_numthreads(tg); i++)
 		add_results(r, ft_get_results(tg->threads + i));
 }
 
-void tg_set_waittime(ffsb_tg_t *tg, unsigned time)
+void tg_set_waittime(ffsb_tg_t * tg, unsigned time)
 {
 	tg->wait_time = time;
 }
 
-unsigned tg_get_waittime(ffsb_tg_t *tg)
+unsigned tg_get_waittime(ffsb_tg_t * tg)
 {
 	return tg->wait_time;
 }
 
-int tg_get_flagval(ffsb_tg_t *tg)
+int tg_get_flagval(ffsb_tg_t * tg)
 {
 	return tg->flagval;
 }
 
-void tg_set_statsc(ffsb_tg_t *tg, ffsb_statsc_t *fsc)
+void tg_set_statsc(ffsb_tg_t * tg, ffsb_statsc_t * fsc)
 {
 	if (fsc) {
 		int i;
@@ -352,7 +352,7 @@
 	}
 }
 
-void tg_collect_stats(ffsb_tg_t *tg, ffsb_statsd_t *fsd)
+void tg_collect_stats(ffsb_tg_t * tg, ffsb_statsd_t * fsd)
 {
 	int i;
 
@@ -360,10 +360,10 @@
 	ffsb_statsd_init(fsd, &tg->fsc);
 
 	for (i = 0; i < tg_get_numthreads(tg); i++)
-		ffsb_statsd_add(fsd, ft_get_stats_data(tg->threads+i));
+		ffsb_statsd_add(fsd, ft_get_stats_data(tg->threads + i));
 }
 
-int tg_needs_stats(ffsb_tg_t *tg)
+int tg_needs_stats(ffsb_tg_t * tg)
 {
 	return tg->need_stats;
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_thread.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_thread.c
index 0ba9e44..95cebcb 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_thread.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/ffsb_thread.c
@@ -20,7 +20,7 @@
 #include "ffsb_op.h"
 #include "util.h"
 
-void init_ffsb_thread(ffsb_thread_t *ft, struct ffsb_tg *tg, unsigned bufsize,
+void init_ffsb_thread(ffsb_thread_t * ft, struct ffsb_tg *tg, unsigned bufsize,
 		      unsigned tg_num, unsigned thread_num)
 {
 	memset(ft, 0, sizeof(ffsb_thread_t));
@@ -35,7 +35,7 @@
 	init_random(&ft->rd, MAX_RANDBUF_SIZE);
 }
 
-void destroy_ffsb_thread(ffsb_thread_t *ft)
+void destroy_ffsb_thread(ffsb_thread_t * ft)
 {
 	free(ft->mallocbuf);
 	destroy_random(&ft->rd);
@@ -43,14 +43,14 @@
 		ffsb_statsd_destroy(&ft->fsd);
 }
 
-void ft_set_statsc(ffsb_thread_t *ft, ffsb_statsc_t *fsc)
+void ft_set_statsc(ffsb_thread_t * ft, ffsb_statsc_t * fsc)
 {
 	ffsb_statsd_init(&ft->fsd, fsc);
 }
 
 void *ft_run(void *data)
 {
-	ffsb_thread_t *ft = (ffsb_thread_t *)data;
+	ffsb_thread_t *ft = (ffsb_thread_t *) data;
 	tg_op_params_t params;
 	unsigned wait_time = tg_get_waittime(ft->tg);
 	int stopval = tg_get_stopval(ft->tg);
@@ -65,7 +65,7 @@
 	return NULL;
 }
 
-void ft_alter_bufsize(ffsb_thread_t *ft, unsigned bufsize)
+void ft_alter_bufsize(ffsb_thread_t * ft, unsigned bufsize)
 {
 	if (ft->mallocbuf != NULL)
 		free(ft->mallocbuf);
@@ -73,84 +73,85 @@
 	ft->alignedbuf = ffsb_align_4k(ft->mallocbuf + (4096 - 1));
 }
 
-char *ft_getbuf(ffsb_thread_t *ft)
+char *ft_getbuf(ffsb_thread_t * ft)
 {
 	return ft->alignedbuf;
 }
 
-int ft_get_read_random(ffsb_thread_t *ft)
+int ft_get_read_random(ffsb_thread_t * ft)
 {
 	return tg_get_read_random(ft->tg);
 }
 
-uint32_t ft_get_read_size(ffsb_thread_t *ft)
+uint32_t ft_get_read_size(ffsb_thread_t * ft)
 {
 	return tg_get_read_size(ft->tg);
 }
 
-uint32_t ft_get_read_blocksize(ffsb_thread_t *ft)
+uint32_t ft_get_read_blocksize(ffsb_thread_t * ft)
 {
 	return tg_get_read_blocksize(ft->tg);
 }
 
-int ft_get_write_random(ffsb_thread_t *ft)
+int ft_get_write_random(ffsb_thread_t * ft)
 {
 	return tg_get_write_random(ft->tg);
 }
 
-uint32_t ft_get_write_size(ffsb_thread_t *ft)
+uint32_t ft_get_write_size(ffsb_thread_t * ft)
 {
 	return tg_get_write_size(ft->tg);
 }
 
-uint32_t ft_get_write_blocksize(ffsb_thread_t *ft)
+uint32_t ft_get_write_blocksize(ffsb_thread_t * ft)
 {
 	return tg_get_write_blocksize(ft->tg);
 }
 
-int ft_get_fsync_file(ffsb_thread_t *ft)
+int ft_get_fsync_file(ffsb_thread_t * ft)
 {
 	return tg_get_fsync_file(ft->tg);
 }
 
-randdata_t *ft_get_randdata(ffsb_thread_t *ft)
+randdata_t *ft_get_randdata(ffsb_thread_t * ft)
 {
 	return &ft->rd;
 }
 
-void ft_incr_op(ffsb_thread_t *ft, unsigned opnum, unsigned increment, uint64_t bytes)
+void ft_incr_op(ffsb_thread_t * ft, unsigned opnum, unsigned increment,
+		uint64_t bytes)
 {
 	ft->results.ops[opnum] += increment;
 	ft->results.op_weight[opnum]++;
 	ft->results.bytes[opnum] += bytes;
 }
 
-void ft_add_readbytes(ffsb_thread_t *ft, uint32_t bytes)
+void ft_add_readbytes(ffsb_thread_t * ft, uint32_t bytes)
 {
 	ft->results.read_bytes += bytes;
 }
 
-void ft_add_writebytes(ffsb_thread_t *ft, uint32_t bytes)
+void ft_add_writebytes(ffsb_thread_t * ft, uint32_t bytes)
 {
 	ft->results.write_bytes += bytes;
 }
 
-ffsb_op_results_t *ft_get_results(ffsb_thread_t *ft)
+ffsb_op_results_t *ft_get_results(ffsb_thread_t * ft)
 {
 	return &ft->results;
 }
 
-int ft_get_read_skip(ffsb_thread_t *ft)
+int ft_get_read_skip(ffsb_thread_t * ft)
 {
 	return tg_get_read_skip(ft->tg);
 }
 
-uint32_t ft_get_read_skipsize(ffsb_thread_t *ft)
+uint32_t ft_get_read_skipsize(ffsb_thread_t * ft)
 {
 	return tg_get_read_skipsize(ft->tg);
 }
 
-int ft_needs_stats(ffsb_thread_t *ft, syscall_t sys)
+int ft_needs_stats(ffsb_thread_t * ft, syscall_t sys)
 {
 	int ret = 0;
 	if (ft && ft->fsd.config && !fsc_ignore_sys(ft->fsd.config, sys))
@@ -158,13 +159,13 @@
 	return ret;
 }
 
-void ft_add_stat(ffsb_thread_t *ft, syscall_t sys, uint32_t val)
+void ft_add_stat(ffsb_thread_t * ft, syscall_t sys, uint32_t val)
 {
 	if (ft)
 		ffsb_add_data(&ft->fsd, sys, val);
 }
 
-ffsb_statsd_t *ft_get_stats_data(ffsb_thread_t *ft)
+ffsb_statsd_t *ft_get_stats_data(ffsb_thread_t * ft)
 {
 	return &ft->fsd;
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fh.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fh.c
index f459120..196e5be 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fh.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fh.c
@@ -48,7 +48,7 @@
  */
 
 static void do_stats(struct timeval *start, struct timeval *end,
-		     ffsb_thread_t *ft, ffsb_fs_t *fs, syscall_t sys)
+		     ffsb_thread_t * ft, ffsb_fs_t * fs, syscall_t sys)
 {
 	struct timeval diff;
 	uint32_t value = 0;
@@ -67,12 +67,12 @@
 }
 
 static int fhopenhelper(char *filename, char *bufflags, int flags,
-			ffsb_thread_t *ft, ffsb_fs_t *fs)
+			ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int fd = 0;
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_OPEN) ||
-		fs_needs_stats(fs, SYS_OPEN);
+	    fs_needs_stats(fs, SYS_OPEN);
 
 	flags |= O_LARGEFILE;
 
@@ -93,7 +93,7 @@
 	return fd;
 }
 
-int fhopenread(char *filename, ffsb_thread_t *ft, ffsb_fs_t *fs)
+int fhopenread(char *filename, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int flags = O_RDONLY;
 	int directio = fs_get_directio(fs);
@@ -103,7 +103,7 @@
 	return fhopenhelper(filename, "r", flags, ft, fs);
 }
 
-int fhopenappend(char *filename, ffsb_thread_t *ft, ffsb_fs_t *fs)
+int fhopenappend(char *filename, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int flags = O_APPEND | O_WRONLY;
 	int directio = fs_get_directio(fs);
@@ -113,7 +113,7 @@
 	return fhopenhelper(filename, "a", flags, ft, fs);
 }
 
-int fhopenwrite(char *filename, ffsb_thread_t *ft, ffsb_fs_t *fs)
+int fhopenwrite(char *filename, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int flags = O_WRONLY;
 	int directio = fs_get_directio(fs);
@@ -123,7 +123,7 @@
 	return fhopenhelper(filename, "w", flags, ft, fs);
 }
 
-int fhopencreate(char *filename, ffsb_thread_t *ft, ffsb_fs_t *fs)
+int fhopencreate(char *filename, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int flags = O_CREAT | O_RDWR | O_TRUNC;
 	int directio = fs_get_directio(fs);
@@ -133,12 +133,13 @@
 	return fhopenhelper(filename, "rw", flags, ft, fs);
 }
 
-void fhread(int fd, void *buf, uint64_t size, ffsb_thread_t *ft, ffsb_fs_t *fs)
+void fhread(int fd, void *buf, uint64_t size, ffsb_thread_t * ft,
+	    ffsb_fs_t * fs)
 {
 	ssize_t realsize;
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_READ) ||
-		fs_needs_stats(fs, SYS_READ);
+	    fs_needs_stats(fs, SYS_READ);
 
 	assert(size <= SIZE_MAX);
 	if (need_stats)
@@ -158,12 +159,13 @@
 	}
 }
 
-void fhwrite(int fd, void *buf, uint32_t size, ffsb_thread_t *ft, ffsb_fs_t *fs)
+void fhwrite(int fd, void *buf, uint32_t size, ffsb_thread_t * ft,
+	     ffsb_fs_t * fs)
 {
 	ssize_t realsize;
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_WRITE) ||
-		fs_needs_stats(fs, SYS_WRITE);
+	    fs_needs_stats(fs, SYS_WRITE);
 
 	assert(size <= SIZE_MAX);
 	if (need_stats)
@@ -178,19 +180,19 @@
 
 	if (realsize != size) {
 		printf("Wrote %d instead of %d bytes.\n"
-			  "Probably out of disk space\n", realsize, size);
+		       "Probably out of disk space\n", realsize, size);
 		perror("write");
 		exit(1);
 	}
 }
 
-void fhseek(int fd, uint64_t offset, int whence, ffsb_thread_t *ft,
-	    ffsb_fs_t *fs)
+void fhseek(int fd, uint64_t offset, int whence, ffsb_thread_t * ft,
+	    ffsb_fs_t * fs)
 {
 	uint64_t res;
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_LSEEK) ||
-		fs_needs_stats(fs, SYS_LSEEK);
+	    fs_needs_stats(fs, SYS_LSEEK);
 
 	if ((whence == SEEK_CUR) && (offset == 0))
 		return;
@@ -219,11 +221,11 @@
 	}
 }
 
-void fhclose(int fd, ffsb_thread_t *ft, ffsb_fs_t *fs)
+void fhclose(int fd, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_CLOSE) ||
-		fs_needs_stats(fs, SYS_CLOSE);
+	    fs_needs_stats(fs, SYS_CLOSE);
 
 	if (need_stats)
 		gettimeofday(&start, NULL);
@@ -236,19 +238,19 @@
 	}
 }
 
-void fhstat(char *name, ffsb_thread_t *ft, ffsb_fs_t *fs)
+void fhstat(char *name, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	struct timeval start, end;
 	struct stat tmp_stat;
 
 	int need_stats = ft_needs_stats(ft, SYS_STAT) ||
-		fs_needs_stats(fs, SYS_CLOSE);
+	    fs_needs_stats(fs, SYS_CLOSE);
 
 	if (need_stats)
 		gettimeofday(&start, NULL);
 
 	if (stat(name, &tmp_stat)) {
-		fprintf (stderr, "stat call failed for file %s\n", name);
+		fprintf(stderr, "stat call failed for file %s\n", name);
 		exit(1);
 	}
 
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/filelist.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/filelist.c
index 706af02..98fdad4 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/filelist.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/filelist.c
@@ -70,8 +70,7 @@
 		}
 	for (i = 0; i < bf->numsubdirs; i++) {
 		snprintf(buf, FILENAME_MAX, "%s/%s%s%d",
-			 bf->basedir, bf->basename,
-			 SUBDIRNAME_BASE, i);
+			 bf->basedir, bf->basename, SUBDIRNAME_BASE, i);
 		if (mkdir(buf, S_IRWXU) == -1)
 			if (errno != EEXIST) {
 				perror(buf);
@@ -119,7 +118,7 @@
 	free(bf->files);
 }
 
-struct ffsb_file *add_file(struct benchfiles *b, uint64_t size, randdata_t *rd)
+struct ffsb_file *add_file(struct benchfiles *b, uint64_t size, randdata_t * rd)
 {
 	struct ffsb_file *newfile, *oldfile = NULL;
 	int filenum = 0;
@@ -156,7 +155,7 @@
 
 	if (oldfile == NULL) {
 		char buf[FILENAME_MAX];
-		int randdir = getrandom(rd, b->numsubdirs+1);
+		int randdir = getrandom(rd, b->numsubdirs + 1);
 		int namesize = 0;
 		if (randdir == 0)
 			namesize = snprintf(buf, FILENAME_MAX, "%s/%s%s%d",
@@ -179,7 +178,7 @@
 	}
 }
 
-struct ffsb_file *add_dir(struct benchfiles *b, uint64_t size, randdata_t *rd)
+struct ffsb_file *add_dir(struct benchfiles *b, uint64_t size, randdata_t * rd)
 {
 	struct ffsb_file *newdir, *olddir = NULL;
 	int dirnum = 0;
@@ -217,7 +216,7 @@
 				    SUBDIRNAME_BASE, dirnum);
 		if (namesize >= FILENAME_MAX)
 			printf("warning: filename \"%s\" too long\n", buf);
-			/* TODO: take action here... */
+		/* TODO: take action here... */
 		newdir->name = ffsb_strdup(buf);
 		return newdir;
 	} else {
@@ -230,7 +229,7 @@
  * fileset.
  */
 static struct ffsb_file *add_file_named(struct benchfiles *b, uint64_t size,
-					 char *name)
+					char *name)
 {
 	struct ffsb_file *newfile = NULL;
 
@@ -258,7 +257,7 @@
 }
 
 #if 0
-static void print_rb_helper(rb_node *cur)
+static void print_rb_helper(rb_node * cur)
 {
 	if (cur != NULL) {
 		print_rb_helper(cur->left);
@@ -267,7 +266,7 @@
 	}
 }
 
-static void print_rb(rb_tree *tree)
+static void print_rb(rb_tree * tree)
 {
 	print_rb_helper(tree->root);
 }
@@ -284,7 +283,7 @@
 	rw_unlock_write(&b->fileslock);
 }
 
-static struct ffsb_file *choose_file(struct benchfiles *b, randdata_t *rd)
+static struct ffsb_file *choose_file(struct benchfiles *b, randdata_t * rd)
 {
 	rb_node *cur = NULL;
 	int chosen = 0;
@@ -293,8 +292,8 @@
 
 	if (b->listsize == 0) {
 		fprintf(stderr, "No more files to operate on,"
-			  " try making more initial files "
-			  "or fewer delete operations\n");
+			" try making more initial files "
+			"or fewer delete operations\n");
 		exit(0);
 	}
 
@@ -306,7 +305,7 @@
 	return cur->object;
 }
 
-struct ffsb_file *choose_file_reader(struct benchfiles *bf, randdata_t *rd)
+struct ffsb_file *choose_file_reader(struct benchfiles *bf, randdata_t * rd)
 {
 	struct ffsb_file *ret;
 
@@ -326,9 +325,9 @@
 	return ret;
 }
 
-struct ffsb_file *choose_file_writer(struct benchfiles *bf, randdata_t *rd)
+struct ffsb_file *choose_file_writer(struct benchfiles *bf, randdata_t * rd)
 {
-	struct ffsb_file *ret ;
+	struct ffsb_file *ret;
 
 	rw_lock_read(&bf->fileslock);
 	assert(bf->holes->count != bf->listsize);
@@ -345,12 +344,12 @@
 
 void unlock_file_reader(struct ffsb_file *file)
 {
-	rw_unlock_read(&file->lock) ;
+	rw_unlock_read(&file->lock);
 }
 
 void unlock_file_writer(struct ffsb_file *file)
 {
-	rw_unlock_write(&file->lock) ;
+	rw_unlock_write(&file->lock);
 }
 
 void rename_file(struct ffsb_file *file)
@@ -365,7 +364,7 @@
 	int retval = -1;
 	char fmt_str[FILENAME_MAX];
 	if (FILENAME_MAX <= snprintf(fmt_str, FILENAME_MAX,
-				 "%s%s%%d", bf->basename, FILENAME_BASE)) {
+				     "%s%s%%d", bf->basename, FILENAME_BASE)) {
 		printf("filename is too long declaring it invalid\n");
 		return -1;
 	}
@@ -393,7 +392,7 @@
  * Note it does not check filesizes !!!, it doesn't know anything
  * about them
  */
-static int add_dir_to_filelist(struct benchfiles *bf, DIR *subdir,
+static int add_dir_to_filelist(struct benchfiles *bf, DIR * subdir,
 			       char *subdir_path, fl_validation_func_t vfunc,
 			       void *vf_data)
 {
@@ -402,7 +401,7 @@
 
 	while ((d_ent = readdir(subdir)) != NULL) {
 		DIR *tmp = NULL;
-		char filename_buf[FILENAME_MAX*2];
+		char filename_buf[FILENAME_MAX * 2];
 
 		if (FILENAME_MAX < snprintf(filename_buf, FILENAME_MAX, "%s/%s",
 					    subdir_path, d_ent->d_name)) {
@@ -426,8 +425,9 @@
 				return -1;
 			}
 			/* Add file to data structure */
-			ffsb_file = add_file_named(bf, ffsb_get_filesize(filename_buf),
-				       filename_buf);
+			ffsb_file =
+			    add_file_named(bf, ffsb_get_filesize(filename_buf),
+					   filename_buf);
 			unlock_file_writer(ffsb_file);
 		} else {
 			/* Check for the usual suspects and skip them */
@@ -463,14 +463,13 @@
 }
 
 int grab_old_fileset(struct benchfiles *bf, char *basename,
-		      fl_validation_func_t vfunc, void *vfunc_data)
+		     fl_validation_func_t vfunc, void *vfunc_data)
 {
 	int retval = 0;
-	char buf[FILENAME_MAX*2];
+	char buf[FILENAME_MAX * 2];
 	DIR *lc_dir = NULL;
 
-	if (FILENAME_MAX < snprintf(buf, FILENAME_MAX, "%s",
-				    bf->basedir)) {
+	if (FILENAME_MAX < snprintf(buf, FILENAME_MAX, "%s", bf->basedir)) {
 		printf("filename \"%s\" is too long aborting\n", buf);
 		return -1;
 	}
@@ -484,17 +483,17 @@
 	retval = add_dir_to_filelist(bf, lc_dir, buf, vfunc, vfunc_data);
 
 	closedir(lc_dir);
-	return retval ;
+	return retval;
 }
 
 /* Get the number of files */
-uint32_t get_listsize(struct benchfiles *bf)
+uint32_t get_listsize(struct benchfiles * bf)
 {
 	return bf->listsize;
 }
 
 /* Get the number of subdirectories */
-uint32_t get_numsubdirs(struct benchfiles *bf)
+uint32_t get_numsubdirs(struct benchfiles * bf)
 {
 	return bf->numsubdirs;
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fileops.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fileops.c
index 4278031..3212c18 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fileops.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/fileops.c
@@ -32,7 +32,7 @@
 #include "ffsb_op.h"
 
 static void do_stats(struct timeval *start, struct timeval *end,
-		     ffsb_thread_t *ft, ffsb_fs_t *fs, syscall_t sys)
+		     ffsb_thread_t * ft, ffsb_fs_t * fs, syscall_t sys)
 {
 	struct timeval diff;
 	uint32_t value = 0;
@@ -50,18 +50,18 @@
 		fs_add_stat(fs, sys, value);
 }
 
-void fop_bench(ffsb_fs_t *fs, unsigned opnum)
+void fop_bench(ffsb_fs_t * fs, unsigned opnum)
 {
 	fs_set_opdata(fs, fs_get_datafiles(fs), opnum);
 }
 
-void fop_age(ffsb_fs_t *fs, unsigned opnum)
+void fop_age(ffsb_fs_t * fs, unsigned opnum)
 {
 	fs_set_opdata(fs, fs_get_agefiles(fs), opnum);
 }
 
 static unsigned readfile_helper(int fd, uint64_t size, uint32_t blocksize,
-				char *buf, ffsb_thread_t *ft, ffsb_fs_t *fs)
+				char *buf, ffsb_thread_t * ft, ffsb_fs_t * fs)
 {
 	int iterations, a;
 	int last;
@@ -76,7 +76,7 @@
 	return iterations;
 }
 
-static uint64_t get_random_offset(randdata_t *rd, uint64_t filesize,
+static uint64_t get_random_offset(randdata_t * rd, uint64_t filesize,
 				  int aligned)
 {
 	if (!aligned)
@@ -86,7 +86,7 @@
 	return getllrandom(rd, filesize) * 4096;
 }
 
-void ffsb_readfile(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_readfile(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile = NULL;
@@ -128,30 +128,29 @@
 			 */
 			if (last)
 				minfilesize = last + iterations *
-					(read_blocksize + read_skipsize);
+				    (read_blocksize + read_skipsize);
 			else
 				minfilesize = read_blocksize + iterations - 1 *
-					(read_blocksize + read_skipsize);
+				    (read_blocksize + read_skipsize);
 
 			if (minfilesize > filesize) {
-				  printf("Error: read size %llu bytes too big "
-					 "w/ skipsize %u and blocksize %u,"
-					 " for file of size %llu bytes\n"
-					 " aborting\n\n", read_size,
-					 read_skipsize, read_blocksize,
-					 filesize);
-				  printf("minimum file size must be at least "
-					 " %llu bytes\n", minfilesize);
-					 exit(1);
+				printf("Error: read size %llu bytes too big "
+				       "w/ skipsize %u and blocksize %u,"
+				       " for file of size %llu bytes\n"
+				       " aborting\n\n", read_size,
+				       read_skipsize, read_blocksize, filesize);
+				printf("minimum file size must be at least "
+				       " %llu bytes\n", minfilesize);
+				exit(1);
 			}
 
 			for (i = 0; i < iterations; i++) {
 				fhread(fd, buf, read_blocksize, ft, fs);
-				fhseek(fd, (uint64_t)read_skipsize, SEEK_CUR,
+				fhseek(fd, (uint64_t) read_skipsize, SEEK_CUR,
 				       ft, fs);
 			}
 			if (last) {
-				fhread(fd, buf, (uint64_t)last, ft, fs);
+				fhread(fd, buf, (uint64_t) last, ft, fs);
 				iterations++;
 			}
 		} else {
@@ -190,7 +189,7 @@
 /* Just like ffsb_readfile but we read the whole file from start to
  * finish regardless of file size.
  */
-void ffsb_readall(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_readall(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile = NULL;
@@ -218,8 +217,8 @@
 
 /* Shared core between ffsb_writefile and ffsb_writefile_fsync.*/
 
-static unsigned ffsb_writefile_core(ffsb_thread_t *ft, ffsb_fs_t *fs,
-				    unsigned opnum, uint64_t *filesize_ret,
+static unsigned ffsb_writefile_core(ffsb_thread_t * ft, ffsb_fs_t * fs,
+				    unsigned opnum, uint64_t * filesize_ret,
 				    int fsync_file)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
@@ -280,7 +279,7 @@
 	return iterations;
 }
 
-void ffsb_writefile(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_writefile(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -290,7 +289,7 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-void ffsb_writefile_fsync(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_writefile_fsync(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -302,8 +301,8 @@
 
 /* Shared core between ffsb_writeall and ffsb_writeall_fsync.*/
 
-static unsigned ffsb_writeall_core(ffsb_thread_t *ft, ffsb_fs_t *fs,
-				   unsigned opnum, uint64_t *filesize_ret,
+static unsigned ffsb_writeall_core(ffsb_thread_t * ft, ffsb_fs_t * fs,
+				   unsigned opnum, uint64_t * filesize_ret,
 				   int fsync_file)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
@@ -339,7 +338,7 @@
 /* Just like ffsb_writefile but we write the whole file from start to
  * finish regardless of file size
  */
-void ffsb_writeall(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_writeall(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -349,7 +348,7 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-void ffsb_writeall_fsync(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_writeall_fsync(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -359,9 +358,9 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-static unsigned ffsb_appendfile_core(ffsb_thread_t *ft, ffsb_fs_t *fs,
-				unsigned opnum, uint64_t *filesize_ret,
-				int fsync_file)
+static unsigned ffsb_appendfile_core(ffsb_thread_t * ft, ffsb_fs_t * fs,
+				     unsigned opnum, uint64_t * filesize_ret,
+				     int fsync_file)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile;
@@ -379,23 +378,23 @@
 
 	unlock_file_reader(curfile);
 
-	curfile->size += (uint64_t)write_size;
+	curfile->size += (uint64_t) write_size;
 
 	iterations = writefile_helper(fd, write_size, write_blocksize, buf,
 				      ft, fs);
 	if (fsync_file)
- 		if (fsync(fd)) {
- 			perror("fsync");
- 			printf("aborting\n");
- 			exit(1);
- 		}
+		if (fsync(fd)) {
+			perror("fsync");
+			printf("aborting\n");
+			exit(1);
+		}
 
 	fhclose(fd, ft, fs);
- 	*filesize_ret = write_size;
+	*filesize_ret = write_size;
 	return iterations;
 }
 
-void ffsb_appendfile(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_appendfile(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -405,7 +404,7 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-void ffsb_appendfile_fsync(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_appendfile_fsync(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -415,8 +414,8 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-static unsigned ffsb_createfile_core(ffsb_thread_t *ft, ffsb_fs_t *fs,
-				     unsigned opnum, uint64_t *filesize_ret,
+static unsigned ffsb_createfile_core(ffsb_thread_t * ft, ffsb_fs_t * fs,
+				     unsigned opnum, uint64_t * filesize_ret,
 				     int fsync_file)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
@@ -439,9 +438,9 @@
 			curop++;
 		}
 		size = fs->size_weights[curop].size;
-	}
-	else {
-		uint64_t range = fs_get_max_filesize(fs) - fs_get_min_filesize(fs);
+	} else {
+		uint64_t range =
+		    fs_get_max_filesize(fs) - fs_get_min_filesize(fs);
 		size = fs_get_min_filesize(fs);
 		if (range != 0)
 			size += getllrandom(rd, range);
@@ -452,19 +451,19 @@
 	iterations = writefile_helper(fd, size, write_blocksize, buf, ft, fs);
 
 	if (fsync_file)
- 		if (fsync(fd)) {
- 			perror("fsync");
- 			printf("aborting\n");
- 			exit(1);
- 		}
+		if (fsync(fd)) {
+			perror("fsync");
+			printf("aborting\n");
+			exit(1);
+		}
 
 	fhclose(fd, ft, fs);
 	unlock_file_writer(newfile);
- 	*filesize_ret = size;
+	*filesize_ret = size;
 	return iterations;
 }
 
-void ffsb_createfile(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_createfile(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -474,7 +473,7 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-void ffsb_createfile_fsync(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_createfile_fsync(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	unsigned iterations;
 	uint64_t filesize;
@@ -484,14 +483,14 @@
 	ft_add_writebytes(ft, filesize);
 }
 
-void ffsb_deletefile(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_deletefile(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile = NULL;
 	randdata_t *rd = ft_get_randdata(ft);
 	struct timeval start, end;
 	int need_stats = ft_needs_stats(ft, SYS_UNLINK) ||
-		fs_needs_stats(fs, SYS_UNLINK);
+	    fs_needs_stats(fs, SYS_UNLINK);
 
 	curfile = choose_file_writer(bf, rd);
 	remove_file(bf, curfile);
@@ -515,7 +514,7 @@
 	ft_incr_op(ft, opnum, 1, 0);
 }
 
-void ffsb_open_close(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_open_close(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile = NULL;
@@ -529,7 +528,7 @@
 	ft_incr_op(ft, opnum, 1, 0);
 }
 
-void ffsb_stat(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_stat(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *curfile = NULL;
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/list.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/list.c
index 9a90284..eeed81f 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/list.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/list.c
@@ -13,8 +13,7 @@
 }
 
 void __list_add(struct list_head *new,
-		struct list_head *prev,
-		struct list_head *next)
+		struct list_head *prev, struct list_head *next)
 {
 	next->prev = new;
 	new->next = next;
@@ -45,8 +44,7 @@
 	entry->prev = NULL;
 }
 
-void list_replace(struct list_head *old,
-		  struct list_head *new)
+void list_replace(struct list_head *old, struct list_head *new)
 {
 	new->next = old->next;
 	new->next->prev = new;
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/main.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/main.c
index 460d7ff..b3c68b4 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/main.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/main.c
@@ -67,7 +67,7 @@
 	ffsb_op_results_t total_results;
 	double totaltime = 0.0f, usertime = 0.0f, systime = 0.0f;
 	struct rusage before_self, before_children, after_self, after_children;
-	pthread_t *fs_pts; /* threads to do filesystem creates in parallel */
+	pthread_t *fs_pts;	/* threads to do filesystem creates in parallel */
 	char *callout = NULL;
 
 	char ctime_start_buf[32];
@@ -81,8 +81,7 @@
 	ffsb_unbuffer_stdout();
 
 	if (argc < 2) {
-		fprintf(stderr, "usage: %s <config file>\n",
-			argv[0]);
+		fprintf(stderr, "usage: %s <config file>\n", argv[0]);
 		exit(1);
 	}
 
@@ -94,7 +93,7 @@
 
 	if (fc.time)
 		printf("benchmark time = %u\n", fc.time);
-	 else
+	else
 		printf("Only creating the fileset, not running benchmark.\n");
 
 	pthread_attr_init(&attr);
@@ -160,7 +159,7 @@
 	ffsb_getrusage(&before_self, &before_children);
 	gettimeofday(&pdata.starttime, NULL);
 
-	ffsb_barrier_wait(&tg_barrier);  /* sync with tg's to start*/
+	ffsb_barrier_wait(&tg_barrier);	/* sync with tg's to start */
 	printf("Starting Actual Benchmark At: %s\n",
 	       ctime_r(&pdata.starttime.tv_sec, ctime_start_buf));
 	fflush(stdout);
@@ -218,32 +217,31 @@
 		printf("===============\n");
 		print_results(&total_results, totaltime);
 	}
-
 #define USEC_PER_SEC ((double)(1000000.0f))
 
 	/* sum up self and children after */
 	usertime = (after_self.ru_utime.tv_sec +
-		    ((after_self.ru_utime.tv_usec)/USEC_PER_SEC)) +
-		((after_children.ru_utime.tv_sec +
-		  ((after_children.ru_utime.tv_usec)/USEC_PER_SEC)));
+		    ((after_self.ru_utime.tv_usec) / USEC_PER_SEC)) +
+	    ((after_children.ru_utime.tv_sec +
+	      ((after_children.ru_utime.tv_usec) / USEC_PER_SEC)));
 
 	/* subtract away the before */
 	usertime -= (before_self.ru_utime.tv_sec +
-		     ((before_self.ru_utime.tv_usec)/USEC_PER_SEC)) +
-		((before_children.ru_utime.tv_sec +
-		  ((before_children.ru_utime.tv_usec)/USEC_PER_SEC)));
+		     ((before_self.ru_utime.tv_usec) / USEC_PER_SEC)) +
+	    ((before_children.ru_utime.tv_sec +
+	      ((before_children.ru_utime.tv_usec) / USEC_PER_SEC)));
 
 	/* sum up self and children after */
 	systime = (after_self.ru_stime.tv_sec +
-		   ((after_self.ru_stime.tv_usec)/USEC_PER_SEC)) +
-		((after_children.ru_stime.tv_sec +
-		  ((after_children.ru_stime.tv_usec)/USEC_PER_SEC)));
+		   ((after_self.ru_stime.tv_usec) / USEC_PER_SEC)) +
+	    ((after_children.ru_stime.tv_sec +
+	      ((after_children.ru_stime.tv_usec) / USEC_PER_SEC)));
 
 	/* subtract away the before */
 	systime -= (before_self.ru_stime.tv_sec +
-		    ((before_self.ru_stime.tv_usec)/USEC_PER_SEC)) +
-		((before_children.ru_stime.tv_sec +
-		  ((before_children.ru_stime.tv_usec)/USEC_PER_SEC)));
+		    ((before_self.ru_stime.tv_usec) / USEC_PER_SEC)) +
+	    ((before_children.ru_stime.tv_sec +
+	      ((before_children.ru_stime.tv_usec) / USEC_PER_SEC)));
 
 	printf("\n\n");
 	printf("%.1lf%% User   Time\n", 100 * usertime / totaltime);
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/metaops.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/metaops.c
index b8861e6..954cddd 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/metaops.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/metaops.c
@@ -34,12 +34,12 @@
  *  renamefile
  */
 
-void metaops_metadir(ffsb_fs_t *fs, unsigned opnum)
+void metaops_metadir(ffsb_fs_t * fs, unsigned opnum)
 {
 	fs_set_opdata(fs, fs_get_metafiles(fs), opnum);
 }
 
-static void createdir(struct benchfiles *dirs, randdata_t *rd)
+static void createdir(struct benchfiles *dirs, randdata_t * rd)
 {
 	struct ffsb_file *newdir;
 
@@ -51,7 +51,7 @@
 	unlock_file_writer(newdir);
 }
 
-static void removedir(struct benchfiles *dirs, randdata_t *rd)
+static void removedir(struct benchfiles *dirs, randdata_t * rd)
 {
 	struct ffsb_file *deldir;
 
@@ -65,7 +65,7 @@
 	unlock_file_writer(deldir);
 }
 
-static void renamedir(struct benchfiles *dirs, randdata_t *rd)
+static void renamedir(struct benchfiles *dirs, randdata_t * rd)
 {
 	struct ffsb_file *dir;
 	char *oldname;
@@ -82,7 +82,7 @@
 	free(oldname);
 }
 
-void ffsb_metaops(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_metaops(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	randdata_t *rd = ft_get_randdata(ft);
@@ -95,7 +95,7 @@
 	ft_incr_op(ft, opnum, 1, 0);
 }
 
-void ffsb_createdir(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum)
+void ffsb_createdir(ffsb_thread_t * ft, ffsb_fs_t * fs, unsigned opnum)
 {
 	struct benchfiles *bf = (struct benchfiles *)fs_get_opdata(fs, opnum);
 	struct ffsb_file *newdir;
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/parser.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/parser.c
index 5481158..64c89e1 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/parser.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/parser.c
@@ -43,7 +43,7 @@
 	exit(1);
 }
 
-static char *get_next_line(FILE *f)
+static char *get_next_line(FILE * f)
 {
 	static char buf[BUFSIZE];
 	char *ret, *tmp;
@@ -98,7 +98,7 @@
 static uint64_t size64_convert(char *buf)
 {
 	size_t buf_size = strlen(buf);
-	char unit[3] = {0};
+	char unit[3] = { 0 };
 	char search_str[256];
 	uint64_t size;
 	uint64_t multiplier = 1;
@@ -181,7 +181,7 @@
 	if (res) {
 		if ((int)*res < 0 || (int)*res > 1) {
 			printf("Error in: %s", buf);
-			printf("%llu not boolean\n", (long long unsigned) *res);
+			printf("%llu not boolean\n", (long long unsigned)*res);
 			exit(1);
 		}
 		ret = malloc(sizeof(uint8_t));
@@ -201,13 +201,13 @@
 	int len;
 
 	len = strnlen(string, BUFSIZE);
-	sprintf(search_str, "%s=%%%ds\\n", string, BUFSIZE - len-1);
+	sprintf(search_str, "%s=%%%ds\\n", string, BUFSIZE - len - 1);
 	if (1 == sscanf(line, search_str, &temp)) {
 		len = strnlen(temp, 4096);
 		ret_buf = malloc(len);
 		strncpy(ret_buf, temp, len);
 		return ret_buf;
-		}
+	}
 	free(line);
 	return NULL;
 }
@@ -262,7 +262,7 @@
 	return NULL;
 }
 
-static uint64_t * get_optsize64(char *buf, char string[])
+static uint64_t *get_optsize64(char *buf, char string[])
 {
 	char search_str[256];
 	char *line = strip_space(buf);
@@ -279,7 +279,7 @@
 	return ret;
 }
 
-static uint32_t * get_optsize32(char *buf, char string [])
+static uint32_t *get_optsize32(char *buf, char string[])
 {
 	uint32_t *ret;
 	uint64_t *res;
@@ -300,7 +300,7 @@
 	int len;
 
 	len = strnlen(string, BUFSIZE);
-	sprintf(search_str, "%s%%%ds\\n", string, BUFSIZE - len-1);
+	sprintf(search_str, "%s%%%ds\\n", string, BUFSIZE - len - 1);
 	if (1 == sscanf(buf, search_str, &temp))
 		printf("WARNING: The \"%s\" option is deprecated!!!\n", string);
 
@@ -317,7 +317,7 @@
 	return container;
 }
 
-static int set_option(char *buf, config_options_t *options)
+static int set_option(char *buf, config_options_t * options)
 {
 	void *value;
 
@@ -403,7 +403,7 @@
 	return 1;
 }
 
-void insert_container(container_t *container, container_t *new_container)
+void insert_container(container_t * container, container_t * new_container)
 {
 	while (container->next)
 		container = container->next;
@@ -412,8 +412,8 @@
 
 container_t *search_group(char *, FILE *);
 
-container_t *handle_container(char *buf, FILE *f, uint32_t type,
-			      config_options_t *options)
+container_t *handle_container(char *buf, FILE * f, uint32_t type,
+			      config_options_t * options)
 {
 	container_desc_t *desc = container_desc;
 	container_t *ret_container;
@@ -444,7 +444,8 @@
 				else {
 					tmp2_container = child;
 					while (tmp2_container->next)
-						tmp2_container = tmp2_container->next;
+						tmp2_container =
+						    tmp2_container->next;
 					tmp2_container->next = tmp_container;
 				}
 
@@ -465,7 +466,7 @@
 	return ret_container;
 }
 
-container_t *search_group(char *buf, FILE *f)
+container_t *search_group(char *buf, FILE * f)
 {
 	char temp[BUFSIZE];
 	char *ptr;
@@ -473,7 +474,7 @@
 	container_desc_t *desc = container_desc;
 	container_t *ret_container;
 
-	if (1 == sscanf(buf, "[%s]\n", (char *) &temp))
+	if (1 == sscanf(buf, "[%s]\n", (char *)&temp))
 		while (desc->name) {
 			ptr = strstr(buf, desc->name);
 			if (ptr)
@@ -513,7 +514,7 @@
 	return NULL;
 }
 
-void *get_value(config_options_t *config, char *name)
+void *get_value(config_options_t * config, char *name)
 {
 	while (config->name) {
 		if (!strcmp(config->name, name)) {
@@ -527,36 +528,36 @@
 	return 0;
 }
 
-char *get_config_str(config_options_t *config, char *name)
+char *get_config_str(config_options_t * config, char *name)
 {
 	return get_value(config, name);
 }
 
-uint32_t get_config_u32(config_options_t *config, char *name)
+uint32_t get_config_u32(config_options_t * config, char *name)
 {
 	void *value = get_value(config, name);
 	if (value)
-		return *(uint32_t *)value;
+		return *(uint32_t *) value;
 	return 0;
 }
 
-uint8_t get_config_bool(config_options_t *config, char *name)
+uint8_t get_config_bool(config_options_t * config, char *name)
 {
 	void *value = get_value(config, name);
 	if (value)
-		return *(uint8_t *)value;
+		return *(uint8_t *) value;
 	return 0;
 }
 
-uint64_t get_config_u64(config_options_t *config, char *name)
+uint64_t get_config_u64(config_options_t * config, char *name)
 {
 	void *value = get_value(config, name);
 	if (value)
-		return *(uint64_t *)value;
+		return *(uint64_t *) value;
 	return 0;
 }
 
-double get_config_double(config_options_t *config, char *name)
+double get_config_double(config_options_t * config, char *name)
 {
 	void *value = get_value(config, name);
 	if (value)
@@ -564,7 +565,7 @@
 	return 0;
 }
 
-static profile_config_t *parse(FILE *f)
+static profile_config_t *parse(FILE * f)
 {
 	char *buf;
 	profile_config_t *profile_conf;
@@ -585,16 +586,20 @@
 			switch (tmp_container->type) {
 			case FILESYSTEM:
 				if (profile_conf->fs_container == NULL)
-					profile_conf->fs_container = tmp_container;
+					profile_conf->fs_container =
+					    tmp_container;
 				else
-					insert_container(profile_conf->fs_container,
+					insert_container(profile_conf->
+							 fs_container,
 							 tmp_container);
 				break;
 			case THREAD_GROUP:
 				if (profile_conf->tg_container == NULL)
-					profile_conf->tg_container = tmp_container;
+					profile_conf->tg_container =
+					    tmp_container;
 				else
-					insert_container(profile_conf->tg_container,
+					insert_container(profile_conf->
+							 tg_container,
 							 tmp_container);
 				break;
 			default:
@@ -609,7 +614,7 @@
 	return profile_conf;
 }
 
-void set_weight(ffsb_tg_t *tg, config_options_t *config)
+void set_weight(ffsb_tg_t * tg, config_options_t * config)
 {
 	char *op;
 	int len;
@@ -620,7 +625,7 @@
 			len = strlen(tmp_config->name);
 			op = malloc(sizeof(char) * len - 6);
 			memset(op, 0, sizeof(char) * len - 6);
-			strncpy (op, tmp_config->name, len - 7);
+			strncpy(op, tmp_config->name, len - 7);
 			tg_set_op_weight(tg, op,
 					 get_config_u32(config,
 							tmp_config->name));
@@ -630,7 +635,7 @@
 	}
 }
 
-int get_weight_total(ffsb_tg_t *tg)
+int get_weight_total(ffsb_tg_t * tg)
 {
 	char *op;
 	int len;
@@ -642,7 +647,7 @@
 			len = strlen(tmp_config->name);
 			op = malloc(sizeof(char) * len - 6);
 			memset(op, 0, sizeof(char) * len - 6);
-			strncpy (op, tmp_config->name, len - 7);
+			strncpy(op, tmp_config->name, len - 7);
 			total += tg_get_op_weight(tg, op);
 			free(op);
 		}
@@ -658,26 +663,26 @@
 /* require tg->write_blocksize: write, create, append, rewritefsync */
 /* */
 
-static int verify_tg(ffsb_tg_t *tg)
+static int verify_tg(ffsb_tg_t * tg)
 {
-	uint32_t read_weight    = tg_get_op_weight(tg, "read");
+	uint32_t read_weight = tg_get_op_weight(tg, "read");
 	uint32_t readall_weight = tg_get_op_weight(tg, "readall");
-	uint32_t write_weight   = tg_get_op_weight(tg, "write");
-	uint32_t create_weight  = tg_get_op_weight(tg, "create");
-	uint32_t append_weight  = tg_get_op_weight(tg, "append");
+	uint32_t write_weight = tg_get_op_weight(tg, "write");
+	uint32_t create_weight = tg_get_op_weight(tg, "create");
+	uint32_t append_weight = tg_get_op_weight(tg, "append");
 	uint32_t createdir_weight = tg_get_op_weight(tg, "createdir");
-	uint32_t delete_weight    = tg_get_op_weight(tg, "delete");
+	uint32_t delete_weight = tg_get_op_weight(tg, "delete");
 	uint32_t writeall_weight = tg_get_op_weight(tg, "writeall");
 	uint32_t writeall_fsync_weight = tg_get_op_weight(tg, "writeall_fsync");
 
 	uint32_t sum_weight = get_weight_total(tg);
 
-	uint32_t read_blocksize  = tg_get_read_blocksize(tg);
+	uint32_t read_blocksize = tg_get_read_blocksize(tg);
 	uint32_t write_blocksize = tg_get_write_blocksize(tg);
 
-	int read_random          = tg_get_read_random(tg);
-	int read_skip            = tg_get_read_skip(tg);
-	uint32_t read_skipsize   = tg_get_read_skipsize(tg);
+	int read_random = tg_get_read_random(tg);
+	int read_skip = tg_get_read_skip(tg);
+	uint32_t read_skipsize = tg_get_read_skipsize(tg);
 
 	if (sum_weight == 0) {
 		printf("Error: A threadgroup must have at least one weighted "
@@ -713,7 +718,7 @@
 	return 0;
 }
 
-static unsigned get_num_containers(container_t *container)
+static unsigned get_num_containers(container_t * container)
 {
 	int numtg = 0;
 	while (container) {
@@ -723,17 +728,17 @@
 	return numtg;
 }
 
-static unsigned get_num_threadgroups(profile_config_t *profile_conf)
+static unsigned get_num_threadgroups(profile_config_t * profile_conf)
 {
 	return get_num_containers(profile_conf->tg_container);
 }
 
-static unsigned get_num_filesystems(profile_config_t *profile_conf)
+static unsigned get_num_filesystems(profile_config_t * profile_conf)
 {
 	return get_num_containers(profile_conf->fs_container);
 }
 
-static int get_num_totalthreads(profile_config_t *profile_conf)
+static int get_num_totalthreads(profile_config_t * profile_conf)
 {
 	int num_threads = 0;
 	container_t *tg = profile_conf->tg_container;
@@ -755,7 +760,7 @@
 	return num_threads;
 }
 
-container_t *get_container(container_t *head_cont, int pos)
+container_t *get_container(container_t * head_cont, int pos)
 {
 	int count = 0;
 	while (head_cont) {
@@ -767,7 +772,7 @@
 	return NULL;
 }
 
-config_options_t *get_fs_config(ffsb_config_t *fc, int pos)
+config_options_t *get_fs_config(ffsb_config_t * fc, int pos)
 {
 	container_t *tmp_cont;
 
@@ -778,13 +783,13 @@
 	return NULL;
 }
 
-container_t *get_fs_container(ffsb_config_t *fc, int pos)
+container_t *get_fs_container(ffsb_config_t * fc, int pos)
 {
 	assert(pos < fc->num_filesys);
 	return get_container(fc->profile_conf->fs_container, pos);
 }
 
-config_options_t *get_tg_config(ffsb_config_t *fc, int pos)
+config_options_t *get_tg_config(ffsb_config_t * fc, int pos)
 {
 	container_t *tmp_cont;
 
@@ -795,14 +800,14 @@
 	return NULL;
 }
 
-container_t *get_tg_container(ffsb_config_t *fc, int pos)
+container_t *get_tg_container(ffsb_config_t * fc, int pos)
 {
 	assert(pos < fc->num_threadgroups);
 	return get_container(fc->profile_conf->tg_container, pos);
 }
 
-static void init_threadgroup(ffsb_config_t *fc, config_options_t *config,
-			    ffsb_tg_t *tg, int tg_num)
+static void init_threadgroup(ffsb_config_t * fc, config_options_t * config,
+			     ffsb_tg_t * tg, int tg_num)
 {
 	int num_threads;
 	memset(tg, 0, sizeof(ffsb_tg_t));
@@ -822,8 +827,8 @@
 		}
 		if (strcmp(get_config_str(config, "bindfs"),
 			   get_config_str(tmp_config, "location"))) {
-			printf ("Bind fs failed:  Base fs \"%s\" not found\n",
-				get_config_str(config, "bindfs"));
+			printf("Bind fs failed:  Base fs \"%s\" not found\n",
+			       get_config_str(config, "bindfs"));
 			exit(1);
 		}
 		printf("%d\n", i);
@@ -852,7 +857,7 @@
 	}
 }
 
-static void init_filesys(ffsb_config_t *fc, int num)
+static void init_filesys(ffsb_config_t * fc, int num)
 {
 	config_options_t *config = get_fs_config(fc, num);
 	profile_config_t *profile_conf = fc->profile_conf;
@@ -874,8 +879,8 @@
 		}
 		if (strcmp(get_config_str(config, "clone"),
 			   get_config_str(tmp_config, "location"))) {
-			printf ("Clone fs failed:  Base fs \"%s\" not found\n",
-				get_config_str(config, "clone"));
+			printf("Clone fs failed:  Base fs \"%s\" not found\n",
+			       get_config_str(config, "clone"));
 			exit(1);
 		}
 		config = tmp_config;
@@ -894,13 +899,13 @@
 		fs->flags |= FFSB_FS_REUSE_FS;
 
 	if (get_config_bool(profile_conf->global, "directio"))
-		fs->flags |= FFSB_FS_DIRECTIO | FFSB_FS_ALIGNIO4K;
+		 fs->flags |= FFSB_FS_DIRECTIO | FFSB_FS_ALIGNIO4K;
 
 	if (get_config_bool(profile_conf->global, "bufferio"))
-		fs->flags |= FFSB_FS_LIBCIO;
+		 fs->flags |= FFSB_FS_LIBCIO;
 
 	if (get_config_bool(profile_conf->global, "alignio"))
-		fs->flags |= FFSB_FS_ALIGNIO4K;
+		 fs->flags |= FFSB_FS_ALIGNIO4K;
 
 	if (get_config_bool(config, "agefs")) {
 		container_t *age_cont = get_fs_container(fc, num);
@@ -918,7 +923,7 @@
 
 	if (get_config_u32(config, "create_blocksize"))
 		fs->create_blocksize = get_config_u32(config,
-							"create_blocksize");
+						      "create_blocksize");
 	else
 		fs->create_blocksize = FFSB_FS_DEFAULT_CREATE_BLOCKSIZE;
 
@@ -932,14 +937,15 @@
 		int count = 0;
 		size_weight_t *sizew;
 		list_for_each_entry(tmp_list, &list_head->list, list)
-			count++;
+		    count++;
 
-		fs->num_weights=count;
-		fs->size_weights = malloc(sizeof(size_weight_t) * fs->num_weights);
+		fs->num_weights = count;
+		fs->size_weights =
+		    malloc(sizeof(size_weight_t) * fs->num_weights);
 
 		count = 0;
 		list_for_each_entry(tmp_list, &list_head->list, list) {
-			sizew = (size_weight_t *)tmp_list->value;
+			sizew = (size_weight_t *) tmp_list->value;
 			fs->size_weights[count].size = sizew->size;
 			fs->size_weights[count].weight = sizew->weight;
 			fs->sum_weights += sizew->weight;
@@ -948,7 +954,7 @@
 	}
 }
 
-static void init_tg_stats(ffsb_config_t *fc, int num)
+static void init_tg_stats(ffsb_config_t * fc, int num)
 {
 	config_options_t *config;
 	container_t *tmp_cont;
@@ -965,23 +971,35 @@
 			config = tmp_cont->config;
 			if (get_config_bool(config, "enable_stats")) {
 
-				list_head = (value_list_t *) get_value(config, "ignore");
+				list_head =
+				    (value_list_t *) get_value(config,
+							       "ignore");
 				if (list_head)
 					list_for_each_entry(tmp_list,
-							    &list_head->list, list) {
-						sys_name = (char *)tmp_list->value;
-						ffsb_stats_str2syscall(sys_name, &sys);
-						ffsb_statsc_ignore_sys(&fsc, sys);
+							    &list_head->list,
+							    list) {
+					sys_name = (char *)tmp_list->value;
+					ffsb_stats_str2syscall(sys_name, &sys);
+					ffsb_statsc_ignore_sys(&fsc, sys);
 					}
 
-				list_head = (value_list_t *) get_value(config, "msec_range");
-				if (list_head && get_config_bool(config, "enable_range"))
+				list_head =
+				    (value_list_t *) get_value(config,
+							       "msec_range");
+				if (list_head
+				    && get_config_bool(config, "enable_range"))
 					list_for_each_entry(tmp_list,
-							    &list_head->list, list) {
-						bucket_range = (range_t *)tmp_list->value;
-						min = (uint32_t)(bucket_range->a * 1000.0f);
-						max = (uint32_t)(bucket_range->b * 1000.0f);
-						ffsb_statsc_addbucket(&fsc, min, max);
+							    &list_head->list,
+							    list) {
+					bucket_range =
+					    (range_t *) tmp_list->value;
+					min =
+					    (uint32_t) (bucket_range->a *
+							1000.0f);
+					max =
+					    (uint32_t) (bucket_range->b *
+							1000.0f);
+					ffsb_statsc_addbucket(&fsc, min, max);
 					}
 
 				tg_set_statsc(&fc->groups[num], &fsc);
@@ -990,7 +1008,7 @@
 	}
 }
 
-static void init_config(ffsb_config_t *fc, profile_config_t *profile_conf)
+static void init_config(ffsb_config_t * fc, profile_config_t * profile_conf)
 {
 	config_options_t *config;
 	container_t *tmp_cont;
@@ -1015,7 +1033,7 @@
 	}
 }
 
-void ffsb_parse_newconfig(ffsb_config_t *fc, char *filename)
+void ffsb_parse_newconfig(ffsb_config_t * fc, char *filename)
 {
 	FILE *f;
 
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rand.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rand.c
index 07f0de9..d2b349b 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rand.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rand.c
@@ -44,27 +44,27 @@
 /* We fill up the array with random bits from RANDSRC here and set index */
 /* to 0 */
 /* pre: state->size must be set and state->mt must be allocated! */
-static void sgenrand(randdata_t *state)
+static void sgenrand(randdata_t * state)
 {
 	int got = 0;
 	got = read(randfd, state->mt, state->size);
 	if (got != state->size) {
-		int i ;
+		int i;
 		/* fall back on lrand48 */
 		/* printf("fallback_rand\n"); */
 
-		for (i = got ; i < state->size ; i += 4) {
-			long int  rand = 0;
+		for (i = got; i < state->size; i += 4) {
+			long int rand = 0;
 #ifdef HAVE_LRAND48
 			lrand48_r(&(state->data), &rand);
 #else
 			rand = random();
 #endif
 			assert(rand != 0);
-			state->mt[i]   = (rand >> 24) & (512 - 1);
-			state->mt[i+1] = (rand >> 16) & (512 - 1);
-			state->mt[i+2] = (rand >>  8) & (512 - 1);
-			state->mt[i+3] = (rand) & (512 - 1);
+			state->mt[i] = (rand >> 24) & (512 - 1);
+			state->mt[i + 1] = (rand >> 16) & (512 - 1);
+			state->mt[i + 2] = (rand >> 8) & (512 - 1);
+			state->mt[i + 3] = (rand) & (512 - 1);
 		}
 
 	}
@@ -72,7 +72,7 @@
 }
 
 /* returns 8 random bits */
-static uint8_t genrand8(randdata_t *state)
+static uint8_t genrand8(randdata_t * state)
 {
 	unsigned long ret = 0;
 	if (state->mti >= state->size) {
@@ -85,7 +85,7 @@
 }
 
 /* returns 32 random bits */
-static uint32_t genrand32(randdata_t *state)
+static uint32_t genrand32(randdata_t * state)
 {
 	uint8_t bytes[4];
 	uint32_t ret = 0;
@@ -95,11 +95,11 @@
 	bytes[2] = genrand8(state);
 	bytes[3] = genrand8(state);
 
-	ret = *((uint32_t *)bytes); /* !!! hack */
+	ret = *((uint32_t *) bytes);	/* !!! hack */
 	return ret;
 }
 
-void init_random(randdata_t *state, uint32_t iter)
+void init_random(randdata_t * state, uint32_t iter)
 {
 	struct timeval time;
 	if (iter == 0)
@@ -123,7 +123,7 @@
 #endif
 }
 
-void destroy_random(randdata_t *rd)
+void destroy_random(randdata_t * rd)
 {
 	free(rd->mt);
 }
@@ -135,51 +135,51 @@
  * we should only get byte-sized chunks of random bits and
  * construct our random number that way with less wasteage - SR
  */
-uint32_t getrandom(randdata_t *state, uint32_t mod)
+uint32_t getrandom(randdata_t * state, uint32_t mod)
 {
 
-    uint8_t bytes[4] = { 0, 0, 0, 0 };
-    uint32_t ret;
-    int num_bytes = 4;
-    int i;
+	uint8_t bytes[4] = { 0, 0, 0, 0 };
+	uint32_t ret;
+	int num_bytes = 4;
+	int i;
 
-    if ((mod == 0) || (mod == 1))
-	  return 0;
+	if ((mod == 0) || (mod == 1))
+		return 0;
 
-    if (!(mod >> 8))
-	    num_bytes = 1;
-    else if (!(mod >> 16))
-	    num_bytes = 2;
-    else if (!(mod >> 24))
-	    num_bytes = 3;
+	if (!(mod >> 8))
+		num_bytes = 1;
+	else if (!(mod >> 16))
+		num_bytes = 2;
+	else if (!(mod >> 24))
+		num_bytes = 3;
 
-    for (i = 0; i < num_bytes; i++)
-	    bytes[i] = genrand8(state);
+	for (i = 0; i < num_bytes; i++)
+		bytes[i] = genrand8(state);
 
-    ret = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0];
+	ret = (bytes[3] << 24) + (bytes[2] << 16) + (bytes[1] << 8) + bytes[0];
 
-    return ret % mod;
+	return ret % mod;
 }
 
-uint64_t getllrandom(randdata_t *state, uint64_t mod)
+uint64_t getllrandom(randdata_t * state, uint64_t mod)
 {
 	uint64_t result = 0;
-	uint64_t high   = 0;
-	uint32_t low    = 0;
+	uint64_t high = 0;
+	uint32_t low = 0;
 
 	if (mod == 0)
 		return 0;
 
 	/* ULONG_MAX comes from limits.h */
 	if (mod < ULONG_MAX)
-		return (uint64_t)getrandom(state, (uint32_t)mod);
+		return (uint64_t) getrandom(state, (uint32_t) mod);
 
 	high = genrand32(state);
 
-	low  = genrand32(state);
+	low = genrand32(state);
 
 	result = high << 32;
-	result |= (uint64_t)low;
+	result |= (uint64_t) low;
 
 	assert(result != 0);
 	assert(result > 0);
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rbt.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rbt.c
index b9cccca..e68e991 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rbt.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rbt.c
@@ -47,7 +47,7 @@
 
 /* Destructor of a red-black tree node */
 
-void rbnode_destruct(rb_node *node, destructor d)
+void rbnode_destruct(rb_node * node, destructor d)
 {
 	if (!node)
 		return;
@@ -60,21 +60,22 @@
 
 /* Determine the depth of the subtree spanned by a given node */
 
-int rbnode_depth(rb_node *node)
+int rbnode_depth(rb_node * node)
 {
 	/* Recursively determine the depth of the left and right
 	 * subtrees
 	 */
-	int  irightdepth = (node->right) ? rbnode_depth(node->right) : 0;
-	int  ileftdepth = (node->left) ? rbnode_depth(node->left) : 0;
+	int irightdepth = (node->right) ? rbnode_depth(node->right) : 0;
+	int ileftdepth = (node->left) ? rbnode_depth(node->left) : 0;
 
 	/* Return the maximal child depth + 1 (the current node) */
-	return ((irightdepth > ileftdepth) ? (irightdepth + 1) : (ileftdepth + 1));
+	return ((irightdepth >
+		 ileftdepth) ? (irightdepth + 1) : (ileftdepth + 1));
 }
 
 /* Return the leftmost leaf in the tree */
 
-rb_node *rbnode_minimum(rb_node *node)
+rb_node *rbnode_minimum(rb_node * node)
 {
 	while (node->left)
 		node = node->left;
@@ -83,7 +84,7 @@
 
 /* Return the rightmost leaf in the tree */
 
-rb_node *rbnode_maximum(rb_node *node)
+rb_node *rbnode_maximum(rb_node * node)
 {
 	while (node->right)
 		node = node->right;
@@ -92,7 +93,7 @@
 
 /* Replace an object */
 
-void rbnode_replace(rb_node *node, datatype object)
+void rbnode_replace(rb_node * node, datatype object)
 {
 	/* Make sure the replacement does not violate the tree order
 	 * Replace the object at the node
@@ -102,7 +103,7 @@
 
 /* Get the next node in the tree (according to the tree order) */
 
-rb_node *rbnode_successor(rb_node *node)
+rb_node *rbnode_successor(rb_node * node)
 {
 	rb_node *succ_node;
 
@@ -135,7 +136,7 @@
 
 /* Get the previous node in the tree (according to the tree order) */
 
-rb_node *rbnode_predecessor(rb_node *node)
+rb_node *rbnode_predecessor(rb_node * node)
 {
 	rb_node *pred_node;
 
@@ -163,12 +164,12 @@
 		}
 	}
 
-  return (pred_node);
+	return (pred_node);
 }
 
 /* Return a pointer to a duplication of the given node */
 
-rb_node *rbnode_duplicate(rb_node *node)
+rb_node *rbnode_duplicate(rb_node * node)
 {
 	/* Create a node of the same color, containing the same
 	 * object
@@ -192,12 +193,12 @@
 		dup_node->left = NULL;
 	}
 
-	return dup_node; /* Return the duplicated node */
+	return dup_node;	/* Return the duplicated node */
 }
 
 /* Traverse a red-black subtree */
 
-void rbnode_traverse(rb_node *node, opr *op)
+void rbnode_traverse(rb_node * node, opr * op)
 {
 	if (!node)
 		return;
@@ -215,7 +216,7 @@
  */
 
 /* Intialize a tree */
-void rbtree_init(rb_tree *tree)
+void rbtree_init(rb_tree * tree)
 {
 /*   tree->comp = comp; */
 	tree->isize = 0;
@@ -237,7 +238,7 @@
 
 /* Remove all objects from a black-red tree */
 
-void rbtree_clean(rb_tree *tree, destructor d)
+void rbtree_clean(rb_tree * tree, destructor d)
 {
 	if (tree->root)
 		rbnode_destruct(tree->root, d);
@@ -247,7 +248,7 @@
 
 /* Destruct a red-black tree */
 
-void rbtree_destruct(rb_tree *tree, destructor d)
+void rbtree_destruct(rb_tree * tree, destructor d)
 {
 	rbtree_clean(tree, d);
 	free(tree);
@@ -255,14 +256,14 @@
 
 /* Returns the size of the tree */
 
-int rbtree_size(rb_tree *tree)
+int rbtree_size(rb_tree * tree)
 {
 	return tree->isize;
 }
 
 /* Returns the depth of the tree */
 
-int rbtree_depth(rb_tree *tree)
+int rbtree_depth(rb_tree * tree)
 {
 	if (!(tree->root))
 		return 0;
@@ -271,14 +272,14 @@
 
 /* Check whether the tree contains a certain object */
 
-int rbtree_contains(rb_tree *tree, datatype object)
+int rbtree_contains(rb_tree * tree, datatype object)
 {
 	return (rbtree_find(tree, object) != NULL);
 }
 
 /* Insert an object into the rb-tree */
 
-rb_node *rbtree_insert(rb_tree *tree, datatype object)
+rb_node *rbtree_insert(rb_tree * tree, datatype object)
 {
 	rb_node *cur_node;
 	rb_node *new_node;
@@ -311,7 +312,8 @@
 		 */
 		comp_result = COMP_NODES(object, cur_node->object);
 		if (comp_result == 0) {
-			printf("Attempted to insert duplicate node, aborting\n");
+			printf
+			    ("Attempted to insert duplicate node, aborting\n");
 			free(new_node);
 			return NULL;
 		}
@@ -322,9 +324,9 @@
 				 */
 				cur_node->left = new_node;
 				new_node->parent = cur_node;
-				cur_node = NULL; /* Terminate the while loop */
+				cur_node = NULL;	/* Terminate the while loop */
 			} else {
-				 /* Go to the left subtree */
+				/* Go to the left subtree */
 				cur_node = cur_node->left;
 			}
 		} else {
@@ -334,7 +336,7 @@
 				 */
 				cur_node->right = new_node;
 				new_node->parent = cur_node;
-				cur_node = NULL; /* Terminate the while loop */
+				cur_node = NULL;	/* Terminate the while loop */
 			} else {
 				/* Go to the right subtree */
 				cur_node = cur_node->right;
@@ -355,7 +357,7 @@
  * node
  */
 
-rb_node *insert_successor_at(rb_tree *tree, rb_node *at_node, datatype object)
+rb_node *insert_successor_at(rb_tree * tree, rb_node * at_node, datatype object)
 {
 	rb_node *parent;
 	rb_node *new_node;
@@ -382,7 +384,7 @@
 	if (!at_node) {
 		/* The new node should become the tree's minimum Place
 		 * is as the left child of the current minimal leaf
-		*/
+		 */
 		parent = rbnode_minimum(tree->root);
 		parent->left = new_node;
 	} else {
@@ -414,7 +416,8 @@
 
 /* Insert a new object to the tree as the a predecessor of a given node */
 
-rb_node *insert_predecessor_at(rb_tree *tree, rb_node *at_node, datatype object)
+rb_node *insert_predecessor_at(rb_tree * tree, rb_node * at_node,
+			       datatype object)
 {
 	rb_node *parent;
 	rb_node *new_node;
@@ -473,15 +476,15 @@
 
 /* Remove an object from the tree */
 
-void rbtree_remove(rb_tree *tree, datatype object, destructor d)
+void rbtree_remove(rb_tree * tree, datatype object, destructor d)
 {
-	rb_node *node = rbtree_find(tree, object); /* Find the node */
-	rbtree_remove_at(tree, node, d);           /* Remove the node */
+	rb_node *node = rbtree_find(tree, object);	/* Find the node */
+	rbtree_remove_at(tree, node, d);	/* Remove the node */
 }
 
 /* Remove the object pointed by the given node. */
 
-void rbtree_remove_at(rb_tree *tree, rb_node *node, destructor d)
+void rbtree_remove_at(rb_tree * tree, rb_node * node, destructor d)
 {
 	rb_node *child = NULL;
 
@@ -597,7 +600,7 @@
 
 /* Get the tree minimum */
 
-rb_node *rbtree_minimum(rb_tree *tree)
+rb_node *rbtree_minimum(rb_tree * tree)
 {
 	if (!(tree->root))
 		return NULL;
@@ -608,7 +611,7 @@
 
 /* Get the tree maximum */
 
-rb_node *rbtree_maximum(rb_tree *tree)
+rb_node *rbtree_maximum(rb_tree * tree)
 {
 	if (!(tree->root))
 		return NULL;
@@ -619,7 +622,7 @@
 
 /* Return a pointer to the node containing the given object */
 
-rb_node *rbtree_find(rb_tree *tree, datatype object)
+rb_node *rbtree_find(rb_tree * tree, datatype object)
 {
 	rb_node *cur_node = tree->root;
 	int comp_result;
@@ -639,7 +642,7 @@
 	return NULL;
 }
 
-void rbtree_rotate_left(rb_tree *tree, rb_node *x_node)
+void rbtree_rotate_left(rb_tree * tree, rb_node * x_node)
 {
 	/* Get the right child of the node */
 	rb_node *y_node = x_node->right;
@@ -657,7 +660,7 @@
 	if (!(x_node->parent)) {
 		/* Make y the new tree root */
 		tree->root = y_node;
-	} else  {
+	} else {
 		/* Assign a pointer to y from x's parent */
 		if (x_node == x_node->parent->left)
 			x_node->parent->left = y_node;
@@ -672,7 +675,7 @@
 
 /* Right-rotate the sub-tree spanned by the given node */
 
-void rbtree_rotate_right(rb_tree *tree, rb_node *y_node)
+void rbtree_rotate_right(rb_tree * tree, rb_node * y_node)
 {
 	/* Get the left child of the node */
 	rb_node *x_node = y_node->left;
@@ -690,7 +693,7 @@
 	if (!(y_node->parent)) {
 		/* Make x the new tree root */
 		tree->root = x_node;
-	} else  {
+	} else {
 		/* Assign a pointer to x from y's parent */
 		if (y_node == y_node->parent->left)
 			y_node->parent->left = x_node;
@@ -705,7 +708,7 @@
 
 /* Fix the tree so it maintains the red-black properties after an insert */
 
-void rbtree_insert_fixup(rb_tree *tree, rb_node *node)
+void rbtree_insert_fixup(rb_tree * tree, rb_node * node)
 {
 	/* Fix the red-black propreties. We may have inserted a red
 	 * leaf as the child of a red parent - so we have to fix the
@@ -727,8 +730,8 @@
 
 		if (curr_node->parent == grandparent->left) {
 			/* If the red parent is a left child, the
-			* uncle is the right child of the grandparent.
-			*/
+			 * uncle is the right child of the grandparent.
+			 */
 			uncle = grandparent->right;
 
 			if (uncle && uncle->color == red) {
@@ -746,11 +749,11 @@
 				curr_node = grandparent;
 			} else {
 				/* Make sure the current node is a
-				* right child. If not, left-rotate the
-				* parent's sub-tree so the parent
-				* becomes the right child of the
-				* current node (see _rotate_left).
-				*/
+				 * right child. If not, left-rotate the
+				 * parent's sub-tree so the parent
+				 * becomes the right child of the
+				 * current node (see _rotate_left).
+				 */
 				if (curr_node == curr_node->parent->right) {
 					curr_node = curr_node->parent;
 					rbtree_rotate_left(tree, curr_node);
@@ -791,7 +794,7 @@
 				 * the parent's sub-tree so the parent
 				 * becomes the left child of the
 				 * current node.
-				*/
+				 */
 				if (curr_node == curr_node->parent->left) {
 					curr_node = curr_node->parent;
 					rbtree_rotate_right(tree, curr_node);
@@ -815,7 +818,7 @@
 	tree->root->color = black;
 }
 
-void rbtree_remove_fixup(rb_tree *tree, rb_node *node)
+void rbtree_remove_fixup(rb_tree * tree, rb_node * node)
 {
 	rb_node *curr_node = node;
 	rb_node *sibling;
@@ -848,8 +851,9 @@
 			}
 
 			if (sibling &&
-			    (!(sibling->left) || sibling->left->color == black) &&
-			    (!(sibling->right) || sibling->right->color == black)) {
+			    (!(sibling->left) || sibling->left->color == black)
+			    && (!(sibling->right)
+				|| sibling->right->color == black)) {
 				/* If the sibling has two black
 				 * children, color it red
 				 */
@@ -865,9 +869,9 @@
 					curr_node = tree->root;
 				} else {
 					/* The black depth of the
-					* entire sub-tree rooted at
-					* the parent is now too small
-					* - fix it up recursively.
+					 * entire sub-tree rooted at
+					 * the parent is now too small
+					 * - fix it up recursively.
 					 */
 					curr_node = curr_node->parent;
 				}
@@ -877,7 +881,8 @@
 					 * case of a NULL sibling
 					 */
 					if (curr_node->parent->color == red) {
-						curr_node->parent->color = black;
+						curr_node->parent->color =
+						    black;
 						/* In order to stop
 						 * the while loop */
 						curr_node = tree->root;
@@ -891,7 +896,8 @@
 					 * obvious that the sibling
 					 * itself is black.
 					 */
-					if (sibling->right && sibling->right->color == red) {
+					if (sibling->right
+					    && sibling->right->color == red) {
 						/* If the right child
 						 * of the sibling is
 						 * red, color it black
@@ -899,7 +905,9 @@
 						 * the current parent.
 						 */
 						sibling->right->color = black;
-						rbtree_rotate_left(tree, curr_node->parent);
+						rbtree_rotate_left(tree,
+								   curr_node->
+								   parent);
 					} else {
 						/* If the left child
 						 * of the sibling is
@@ -908,10 +916,13 @@
 						 * rotate around the
 						 * new sibling of our
 						 * current node.
-						  */
-						rbtree_rotate_right(tree, sibling);
-						sibling = curr_node->parent->right;
-						rbtree_rotate_left(tree, sibling);
+						 */
+						rbtree_rotate_right(tree,
+								    sibling);
+						sibling =
+						    curr_node->parent->right;
+						rbtree_rotate_left(tree,
+								   sibling);
 					}
 
 					/* It is now safe to color the
@@ -919,7 +930,9 @@
 					 * terminate the fix process.
 					 */
 					if (curr_node->parent->parent)
-						curr_node->parent->parent->color = curr_node->parent->color;
+						curr_node->parent->parent->
+						    color =
+						    curr_node->parent->color;
 					curr_node->parent->color = black;
 					/* In order to stop the while loop */
 					curr_node = tree->root;
@@ -949,8 +962,9 @@
 			}
 
 			if (sibling &&
-			    (!(sibling->left) || sibling->left->color == black) &&
-			    (!(sibling->right) || sibling->right->color == black)) {
+			    (!(sibling->left) || sibling->left->color == black)
+			    && (!(sibling->right)
+				|| sibling->right->color == black)) {
 				/* If the sibling has two black children, color it red */
 				sibling->color = red;
 				if (curr_node->parent->color == red) {
@@ -977,7 +991,8 @@
 					/* Take special care of the
 					 * case of a NULL sibling */
 					if (curr_node->parent->color == red) {
-						curr_node->parent->color = black;
+						curr_node->parent->color =
+						    black;
 						/* In order to stop
 						 * the while loop */
 						curr_node = tree->root;
@@ -986,20 +1001,23 @@
 					}
 				} else {
 					/* In this case, at least one
-					* of the sibling's children is
-					* red.  It is therfore obvious
-					* that the sibling itself is
-					* black.
-					*/
-					if (sibling->left && sibling->left->color == red) {
+					 * of the sibling's children is
+					 * red.  It is therfore obvious
+					 * that the sibling itself is
+					 * black.
+					 */
+					if (sibling->left
+					    && sibling->left->color == red) {
 						/* If the left child
-						* of the sibling is
-						* red, color it black
-						* and rotate around
-						* the current parent
-						*/
+						 * of the sibling is
+						 * red, color it black
+						 * and rotate around
+						 * the current parent
+						 */
 						sibling->left->color = black;
-						rbtree_rotate_right(tree, curr_node->parent);
+						rbtree_rotate_right(tree,
+								    curr_node->
+								    parent);
 					} else {
 						/* If the right child
 						 * of the sibling is
@@ -1009,9 +1027,12 @@
 						 * new sibling of our
 						 * current node
 						 */
-						rbtree_rotate_left(tree, sibling);
-						sibling = curr_node->parent->left;
-						rbtree_rotate_right(tree, sibling);
+						rbtree_rotate_left(tree,
+								   sibling);
+						sibling =
+						    curr_node->parent->left;
+						rbtree_rotate_right(tree,
+								    sibling);
 					}
 
 					/* It is now safe to color the
@@ -1019,7 +1040,9 @@
 					 * terminate the fix process.
 					 */
 					if (curr_node->parent->parent)
-						curr_node->parent->parent->color = curr_node->parent->color;
+						curr_node->parent->parent->
+						    color =
+						    curr_node->parent->color;
 					curr_node->parent->color = black;
 					/* In order to stop the while loop */
 					curr_node = tree->root;
@@ -1034,7 +1057,7 @@
 
 /* Traverse a red-black tree */
 
-void rbtree_traverse(rb_tree *tree, opr *op)
+void rbtree_traverse(rb_tree * tree, opr * op)
 {
 	rbnode_traverse(tree->root, op);
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rwlock.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rwlock.c
index 1018596..01806e5 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rwlock.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/rwlock.c
@@ -30,8 +30,8 @@
 	pthread_cond_init(&rw->pcond, NULL);
 #ifdef RWDEBUG
 	rw->n_write_waiting = 0;
-	rw->n_read_waiting  = 0;
-	rw->writer_tid      = -1;
+	rw->n_read_waiting = 0;
+	rw->writer_tid = -1;
 #endif
 }
 
@@ -70,7 +70,7 @@
 void rw_unlock_read(struct rwlock *rw)
 {
 	pthread_mutex_lock(&rw->plock);
-	rw->n_readers -= 1 ;
+	rw->n_readers -= 1;
 	pthread_cond_signal(&rw->pcond);
 	pthread_mutex_unlock(&rw->plock);
 }
@@ -78,7 +78,7 @@
 void rw_unlock_write(struct rwlock *rw)
 {
 	pthread_mutex_lock(&rw->plock);
-	rw->n_readers = 0 ;
+	rw->n_readers = 0;
 	pthread_cond_broadcast(&rw->pcond);
 	pthread_mutex_unlock(&rw->plock);
 }
diff --git a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/util.c b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/util.c
index 058e1ed..77e1b3b 100644
--- a/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/util.c
+++ b/testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/util.c
@@ -37,15 +37,15 @@
 uint64_t ffsb_get_filesize(char *name)
 {
 #ifndef HAVE_STAT64
- #define STAT(a, b) do { stat((a), (b)); } while (0)
+#define STAT(a, b) do { stat((a), (b)); } while (0)
 	struct stat filestat;
 #else
- #define STAT(a, b) do { stat64((a), (b)); } while (0)
+#define STAT(a, b) do { stat64((a), (b)); } while (0)
 	struct stat64 filestat;
 #endif
 
 	STAT(name, &filestat);
-	return (uint64_t)filestat.st_size;
+	return (uint64_t) filestat.st_size;
 #undef STAT
 }
 
@@ -59,7 +59,7 @@
 
 void *ffsb_realloc(void *ptr, size_t size)
 {
-	void *tmp ;
+	void *tmp;
 	/* printf("ffsb_realloc: ptr = %p  size = %ld\n",ptr,size); */
 
 	if (ptr == NULL)
@@ -73,7 +73,7 @@
 
 void *ffsb_align_4k(void *ptr)
 {
-	unsigned long mask = ~(0xfff); /* 12 zeros at the end */
+	unsigned long mask = ~(0xfff);	/* 12 zeros at the end */
 	void *ret = (void *)((unsigned long)ptr & mask);
 	/* printf("align_4k got %p returning %p\n",ptr,ret); */
 	return ret;
@@ -84,7 +84,7 @@
 	int len = strlen(str);
 	char *dup = ffsb_malloc(len + 1);
 	/* !!! am I off by one here ?? */
-	strncpy(dup, str, len+1);
+	strncpy(dup, str, len + 1);
 	return dup;
 }
 
@@ -103,7 +103,7 @@
 /* not perfect, in case we are somehow interrupted it's borked */
 void ffsb_sleep(unsigned secs)
 {
-	struct timeval tv = { 0 , 0 };
+	struct timeval tv = { 0, 0 };
 	tv.tv_sec = secs;
 	select(0, NULL, NULL, NULL, &tv);
 }
@@ -115,7 +115,7 @@
 	else if (size >= 1024 * 1024)
 		snprintf(buf, bufsize, "%.3gMB", size / (1024 * 1024));
 	else if (size >= 1024)
-		snprintf(buf, bufsize, "%.3gKB", size/1024);
+		snprintf(buf, bufsize, "%.3gKB", size / 1024);
 	else
 		snprintf(buf, bufsize, "%.3gB", size);
 
@@ -153,8 +153,8 @@
 
 double tvtodouble(struct timeval *t)
 {
-	return ((double)t->tv_sec*(1000000.0f) + (double)t->tv_usec) /
-		1000000.0f;
+	return ((double)t->tv_sec * (1000000.0f) + (double)t->tv_usec) /
+	    1000000.0f;
 }
 
 double cpu_so_far(void)
@@ -164,10 +164,10 @@
 	getrusage(RUSAGE_SELF, &rusage);
 
 	return
-		((double) rusage.ru_utime.tv_sec) +
-		(((double) rusage.ru_utime.tv_usec) / 1000000.0) +
-		((double) rusage.ru_stime.tv_sec) +
-		(((double) rusage.ru_stime.tv_usec) / 1000000.0);
+	    ((double)rusage.ru_utime.tv_sec) +
+	    (((double)rusage.ru_utime.tv_usec) / 1000000.0) +
+	    ((double)rusage.ru_stime.tv_sec) +
+	    (((double)rusage.ru_stime.tv_usec) / 1000000.0);
 }
 
 double cpu_so_far_children(void)
@@ -177,10 +177,10 @@
 	getrusage(RUSAGE_CHILDREN, &rusage);
 
 	return
-		((double) rusage.ru_utime.tv_sec) +
-		(((double) rusage.ru_utime.tv_usec) / 1000000.0) +
-		((double) rusage.ru_stime.tv_sec) +
-		(((double) rusage.ru_stime.tv_usec) / 1000000.0);
+	    ((double)rusage.ru_utime.tv_sec) +
+	    (((double)rusage.ru_utime.tv_usec) / 1000000.0) +
+	    ((double)rusage.ru_stime.tv_sec) +
+	    (((double)rusage.ru_stime.tv_usec) / 1000000.0);
 }
 
 /* !!!! check portability */
@@ -192,8 +192,8 @@
 
 /* 	return (float)(fsdata.f_blocks-fsdata.f_bfree)/ */
 /* 		(float)(fsdata.f_blocks-fsdata.f_bfree+fsdata.f_bavail); */
-	return (float) (((float)(fsdata.f_blocks - fsdata.f_bfree)) /
-			((float)fsdata.f_blocks));
+	return (float)(((float)(fsdata.f_blocks - fsdata.f_bfree)) /
+		       ((float)fsdata.f_blocks));
 }
 
 uint64_t getfsutil_size(char *dirname)
@@ -206,7 +206,7 @@
 
 int ffsb_system(char *command)
 {
-	int pid=0, status;
+	int pid = 0, status;
 	extern char **environ;
 
 	if (command == NULL)
@@ -227,8 +227,7 @@
 		if (waitpid(pid, &status, 0) == -1) {
 			if (errno != EINTR)
 				return -1;
-		}
-		else
+		} else
 			return status;
 	} while (1);
 }
@@ -263,7 +262,7 @@
 
 void ffsb_milli_sleep(unsigned time)
 {
-	struct timeval tv = { 0 , 0 };
+	struct timeval tv = { 0, 0 };
 	if (!time)
 		return;
 	tv.tv_usec = time * 1000;
@@ -272,14 +271,14 @@
 
 void ffsb_micro_sleep(unsigned time)
 {
-	struct timeval tv = { 0 , 0 };
+	struct timeval tv = { 0, 0 };
 	if (!time)
 		return;
-	tv.tv_usec = time ;
+	tv.tv_usec = time;
 	select(0, NULL, NULL, NULL, &tv);
 }
 
-void ffsb_barrier_init(ffsb_barrier_t *fb, unsigned count)
+void ffsb_barrier_init(ffsb_barrier_t * fb, unsigned count)
 {
 	memset(fb, 0, sizeof(*fb));
 	pthread_mutex_init(&fb->plock, NULL);
@@ -287,7 +286,7 @@
 	fb->required_count = count;
 }
 
-void ffsb_barrier_wait(ffsb_barrier_t *fb)
+void ffsb_barrier_wait(ffsb_barrier_t * fb)
 {
 	pthread_mutex_lock(&fb->plock);
 
diff --git a/testcases/kernel/fs/fs-bench/boxmuler.c b/testcases/kernel/fs/fs-bench/boxmuler.c
index 50cc517..e923a16 100644
--- a/testcases/kernel/fs/fs-bench/boxmuler.c
+++ b/testcases/kernel/fs/fs-bench/boxmuler.c
@@ -5,24 +5,24 @@
 
 int box_muler(int min, int max)
 {
-  double u1,u2,z;
-  int i;
-  int ave;
-  int range;
-  int ZZ;
-  if (min >= max) {
-    return (-1);
-  }
-  range = max - min;
-  ave = range/2;
-  for (i = 0 ; i< 10 ; i++) {
-    u1 =  ((double)(random() % 1000000))/ 1000000;
-    u2 =  ((double)(random() % 1000000))/ 1000000;
-    z = sqrt( -2.0 * log(u1) ) * cos ( M_2PI * u2 );
-    ZZ = min + (ave + (z*(ave/4)));
-    if (ZZ >= min && ZZ < max) {
-        return (ZZ);
-    }
-  }
-  return (-1);
+	double u1, u2, z;
+	int i;
+	int ave;
+	int range;
+	int ZZ;
+	if (min >= max) {
+		return (-1);
+	}
+	range = max - min;
+	ave = range / 2;
+	for (i = 0; i < 10; i++) {
+		u1 = ((double)(random() % 1000000)) / 1000000;
+		u2 = ((double)(random() % 1000000)) / 1000000;
+		z = sqrt(-2.0 * log(u1)) * cos(M_2PI * u2);
+		ZZ = min + (ave + (z * (ave / 4)));
+		if (ZZ >= min && ZZ < max) {
+			return (ZZ);
+		}
+	}
+	return (-1);
 }
diff --git a/testcases/kernel/fs/fs-bench/create-files.c b/testcases/kernel/fs/fs-bench/create-files.c
index 02086e3..c6cba6f 100644
--- a/testcases/kernel/fs/fs-bench/create-files.c
+++ b/testcases/kernel/fs/fs-bench/create-files.c
@@ -13,7 +13,7 @@
 #define MAXFSIZE 1024 * 192
 
 char wbuf[MAXFSIZE];
-static int filecount=0;
+static int filecount = 0;
 
 void makedir(char *dir1);
 void changedir(char *dir);
@@ -21,97 +21,99 @@
 
 extern int box_muler(int, int);
 
-int startc=0;
-int main(int ac,char *av[])
+int startc = 0;
+int main(int ac, char *av[])
 {
-  int i=0;
-  int j=0;
-  int k=0;
-  int l=0;
-  char dir1[MAXN];
-  char dir2[MAXN];
-  char dir3[MAXN];
-  char filename[MAXN];
-  time_t t;
-  int maxfiles=0xFFFFFF;
-  int createfiles=0;
+	int i = 0;
+	int j = 0;
+	int k = 0;
+	int l = 0;
+	char dir1[MAXN];
+	char dir2[MAXN];
+	char dir3[MAXN];
+	char filename[MAXN];
+	time_t t;
+	int maxfiles = 0xFFFFFF;
+	int createfiles = 0;
 
-  if (ac > 1) {
-    sscanf(av[1],"%x",&maxfiles);
-    if (maxfiles==0) {
-      printf("maxfile argument error (0 value)\n");
-      exit(1);
-    }
-  }
-  time(&t);
-  srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
-  printf("Create files\n");
-  for (i = 0 ; i < 0xFF ; i++) {
-    sprintf(dir1,"%2.2x",i);
-    makedir(dir1);
-    changedir(dir1);
-    for (j = 0 ; j < 0xFF ; j++) {
-      sprintf(dir2,"%2.2x",j);
-      makedir(dir2);
-      changedir(dir2);
-      for (k = 0 ; k < 0xFF ; k++) {
-	sprintf(dir3,"%2.2x",k);
-	makedir(dir3);
-	changedir(dir3);
-	for (l = 0 ; l < 0xFF ; l++) {
-	  sprintf(filename,"%s%s%s%2.2x",dir1,dir2,dir3,l);
-	  create_file(filename);
-	  if (maxfiles < createfiles++) {
-	    goto end;
-	  }
+	if (ac > 1) {
+		sscanf(av[1], "%x", &maxfiles);
+		if (maxfiles == 0) {
+			printf("maxfile argument error (0 value)\n");
+			exit(1);
+		}
 	}
-	changedir("../");
-      }
-      changedir("../");
-    }
-    changedir("../");
-  }
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
+	printf("Create files\n");
+	for (i = 0; i < 0xFF; i++) {
+		sprintf(dir1, "%2.2x", i);
+		makedir(dir1);
+		changedir(dir1);
+		for (j = 0; j < 0xFF; j++) {
+			sprintf(dir2, "%2.2x", j);
+			makedir(dir2);
+			changedir(dir2);
+			for (k = 0; k < 0xFF; k++) {
+				sprintf(dir3, "%2.2x", k);
+				makedir(dir3);
+				changedir(dir3);
+				for (l = 0; l < 0xFF; l++) {
+					sprintf(filename, "%s%s%s%2.2x", dir1,
+						dir2, dir3, l);
+					create_file(filename);
+					if (maxfiles < createfiles++) {
+						goto end;
+					}
+				}
+				changedir("../");
+			}
+			changedir("../");
+		}
+		changedir("../");
+	}
 end:
-  fprintf(stderr,"\nTotal create files: %d\n",filecount);
-  printf("Done\n");
-        return 0;
+	fprintf(stderr, "\nTotal create files: %d\n", filecount);
+	printf("Done\n");
+	return 0;
 }
 
-int showchar[]={124,47,45,92,124,47,45,92};
+int showchar[] = { 124, 47, 45, 92, 124, 47, 45, 92 };
 
 void makedir(char *dir1)
 {
-  if (mkdir(dir1, S_IRWXU) < 0) {
-    perror(dir1);
-    exit(1);
-  }
+	if (mkdir(dir1, S_IRWXU) < 0) {
+		perror(dir1);
+		exit(1);
+	}
 }
 
 void changedir(char *dir)
 {
-  if (chdir(dir) < 0) {
-    perror(dir);
-    exit(1);
-  }
+	if (chdir(dir) < 0) {
+		perror(dir);
+		exit(1);
+	}
 }
 
 void create_file(char *filename)
 {
-  int fd;
-  int randomsize;
-  if ((fd=creat(filename, S_IRWXU)) < 0) {
-    fprintf(stderr,"\nTotal create files: %d\n",filecount);
-    perror(filename);
-    exit(1);
-  }
-  if ((randomsize=box_muler(0,MAXFSIZE)) < 0) {
-    randomsize = MAXFSIZE;
-  }
-  if (write(fd,wbuf,randomsize) < 0) {
-    fprintf(stderr,"\nTotal create files: %d\n",filecount);
-    perror(filename);
-    exit(1);
-  }
-  filecount++;
-  close(fd);
+	int fd;
+	int randomsize;
+	if ((fd = creat(filename, S_IRWXU)) < 0) {
+		fprintf(stderr, "\nTotal create files: %d\n", filecount);
+		perror(filename);
+		exit(1);
+	}
+	if ((randomsize = box_muler(0, MAXFSIZE)) < 0) {
+		randomsize = MAXFSIZE;
+	}
+	if (write(fd, wbuf, randomsize) < 0) {
+		fprintf(stderr, "\nTotal create files: %d\n", filecount);
+		perror(filename);
+		exit(1);
+	}
+	filecount++;
+	close(fd);
 }
diff --git a/testcases/kernel/fs/fs-bench/random-access-del-create.c b/testcases/kernel/fs/fs-bench/random-access-del-create.c
index da5ce9d..1f62a76 100644
--- a/testcases/kernel/fs/fs-bench/random-access-del-create.c
+++ b/testcases/kernel/fs/fs-bench/random-access-del-create.c
@@ -11,7 +11,7 @@
 #define FAIL 0
 #define SUCCESS 1
 
-int openlog[2]={0,0};
+int openlog[2] = { 0, 0 };
 
 #define MAXNUM 0x100000
 
@@ -23,97 +23,96 @@
 int delete_file(char *filename);
 int create_file(char *filename);
 
-int cfilecount=0;
-int dfilecount=0;
-int errorcount=0;
+int cfilecount = 0;
+int dfilecount = 0;
+int errorcount = 0;
 
 int main(int ac, char **av)
 {
-  int r;
-  char fname[1024];
-  time_t t;
-  int i;
-  int m;
+	int r;
+	char fname[1024];
+	time_t t;
+	int i;
+	int m;
 
-  if (ac != 2) {
-    printf("%s hex-style-filename \n", av[0]);
-    printf("ex) %s 00022300\n", av[0]);
-    exit(1);
-  }
-  sscanf(av[1],"%x",&m);
-  if (m < 1 || m > MAXNUM) {
-    printf("out of size %d\n",m);
-    exit(1);
-  }
+	if (ac != 2) {
+		printf("%s hex-style-filename \n", av[0]);
+		printf("ex) %s 00022300\n", av[0]);
+		exit(1);
+	}
+	sscanf(av[1], "%x", &m);
+	if (m < 1 || m > MAXNUM) {
+		printf("out of size %d\n", m);
+		exit(1);
+	}
 
-  time(&t);
-  srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-  /* 00/00/00/00 */
-  for (i = 0 ; i < m ; i++) {
-    r = random() % m;
-    sprintf(fname,"00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   (r&0xFF));
-    create_or_delete(fname);
-  }
-  fprintf(stderr,"Total create files: %d\n",cfilecount);
-  fprintf(stderr,"Total delete files: %d\n",dfilecount);
-  fprintf(stderr,"Total error       : %d\n",errorcount);
-  exit(0);
+	/* 00/00/00/00 */
+	for (i = 0; i < m; i++) {
+		r = random() % m;
+		sprintf(fname, "00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
+			((r >> 16) & 0xFF),
+			((r >> 8) & 0xFF),
+			((r >> 16) & 0xFF), ((r >> 8) & 0xFF), (r & 0xFF));
+		create_or_delete(fname);
+	}
+	fprintf(stderr, "Total create files: %d\n", cfilecount);
+	fprintf(stderr, "Total delete files: %d\n", dfilecount);
+	fprintf(stderr, "Total error       : %d\n", errorcount);
+	exit(0);
 }
 
 #define MAXFSIZE (192*1024)
 #define AVEFSIZE (MAXFSIZE/2)
 #define POOLDISKSPACE (AVEFSIZE*128)
 
-static int disk_space_pool=0;
+static int disk_space_pool = 0;
 void create_or_delete(char *fname)
 {
-  int r;
+	int r;
 
-  r = (random() & 1);
-  if (r && disk_space_pool > POOLDISKSPACE) {
-    /* create */
-    create_file(fname) ;
-  }
-  else {
-    delete_file(fname);
-  }
-  if ((errorcount > dfilecount ||  errorcount > cfilecount) && (errorcount > MAXERROR)) {
-    fprintf(stderr,"too much error -- stop\n");
-    fprintf(stderr,"Total create files: %d\n",cfilecount);
-    fprintf(stderr,"Total delete files: %d\n",dfilecount);
-    fprintf(stderr,"Total error       : %d\n",errorcount);
-    exit(1);
-  }
+	r = (random() & 1);
+	if (r && disk_space_pool > POOLDISKSPACE) {
+		/* create */
+		create_file(fname);
+	} else {
+		delete_file(fname);
+	}
+	if ((errorcount > dfilecount || errorcount > cfilecount)
+	    && (errorcount > MAXERROR)) {
+		fprintf(stderr, "too much error -- stop\n");
+		fprintf(stderr, "Total create files: %d\n", cfilecount);
+		fprintf(stderr, "Total delete files: %d\n", dfilecount);
+		fprintf(stderr, "Total error       : %d\n", errorcount);
+		exit(1);
+	}
 }
 
 int create_file(char *filename)
 {
-  int fd;
-  int randomsize;
-  char wbuf[MAXFSIZE];
-  if ((fd=creat(filename, S_IRWXU)) < 0) {
-    errorcount++;
-    return(-1);
-  }
-  if ((randomsize=box_muler(0,MAXFSIZE)) < 0) {
-    randomsize = MAXFSIZE;
-  }
-  if (write(fd,wbuf,randomsize) < 0) {
-    errorcount++;
-    close(fd);
-    return(-1);
-  }
-  cfilecount++;
-  disk_space_pool -= randomsize;
-  close(fd);
+	int fd;
+	int randomsize;
+	char wbuf[MAXFSIZE];
+	if ((fd = creat(filename, S_IRWXU)) < 0) {
+		errorcount++;
+		return (-1);
+	}
+	if ((randomsize = box_muler(0, MAXFSIZE)) < 0) {
+		randomsize = MAXFSIZE;
+	}
+	if (write(fd, wbuf, randomsize) < 0) {
+		errorcount++;
+		close(fd);
+		return (-1);
+	}
+	cfilecount++;
+	disk_space_pool -= randomsize;
+	close(fd);
 
-        return 0;
+	return 0;
 }
 
 #include <sys/stat.h>
@@ -121,19 +120,19 @@
 
 int delete_file(char *filename)
 {
-  struct stat buf;
-  int st;
-  st = stat(filename, &buf);
-  if (st < 0) {
-    errorcount++;
-    return (-1);
-  }
-  disk_space_pool += buf.st_size;
-  if (unlink(filename) < 0) {
-    errorcount++;
-    return(-1);
-  }
-  dfilecount++;
+	struct stat buf;
+	int st;
+	st = stat(filename, &buf);
+	if (st < 0) {
+		errorcount++;
+		return (-1);
+	}
+	disk_space_pool += buf.st_size;
+	if (unlink(filename) < 0) {
+		errorcount++;
+		return (-1);
+	}
+	dfilecount++;
 
-        return 0;
+	return 0;
 }
diff --git a/testcases/kernel/fs/fs-bench/random-access.c b/testcases/kernel/fs/fs-bench/random-access.c
index 77eee99..cf41d6e 100644
--- a/testcases/kernel/fs/fs-bench/random-access.c
+++ b/testcases/kernel/fs/fs-bench/random-access.c
@@ -11,7 +11,7 @@
 #define FAIL 0
 #define SUCCESS 1
 
-int openlog[2]={0,0};
+int openlog[2] = { 0, 0 };
 
 #define MAXNUM 0x100000
 
@@ -21,71 +21,72 @@
 
 int main(int ac, char **av)
 {
-  int r;
-  char fname[1024];
-  time_t t;
-  int i;
-  int m;
+	int r;
+	char fname[1024];
+	time_t t;
+	int i;
+	int m;
 
-  if (ac != 2) {
-    printf("%s hex-style-filename \n", av[0]);
-    printf("ex) %s 00022300\n", av[0]);
-    exit(1);
-  }
-  sscanf(av[1],"%x",&m);
-  if (m < 1 || m > MAXNUM) {
-    printf("out of size %d\n",m);
-    exit(1);
-  }
+	if (ac != 2) {
+		printf("%s hex-style-filename \n", av[0]);
+		printf("ex) %s 00022300\n", av[0]);
+		exit(1);
+	}
+	sscanf(av[1], "%x", &m);
+	if (m < 1 || m > MAXNUM) {
+		printf("out of size %d\n", m);
+		exit(1);
+	}
 
-  time(&t);
-  srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-  if ((nullfd=open("/dev/null",O_WRONLY)) < 0) {
-    perror("/dev/null");
-    exit(1);
-  }
+	if ((nullfd = open("/dev/null", O_WRONLY)) < 0) {
+		perror("/dev/null");
+		exit(1);
+	}
 
-  /* 00/00/00/00 */
-  for (i = 0 ; i < m ; i++) {
-    r = random() % m;
-    sprintf(fname,"00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   (r&0xFF));
-    open_read_close(fname);
-  }
-  close(nullfd);
-  printf("Success:\t%d\nFail:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-  exit(0);
+	/* 00/00/00/00 */
+	for (i = 0; i < m; i++) {
+		r = random() % m;
+		sprintf(fname, "00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
+			((r >> 16) & 0xFF),
+			((r >> 8) & 0xFF),
+			((r >> 16) & 0xFF), ((r >> 8) & 0xFF), (r & 0xFF));
+		open_read_close(fname);
+	}
+	close(nullfd);
+	printf("Success:\t%d\nFail:\t%d\n", openlog[SUCCESS], openlog[FAIL]);
+	exit(0);
 }
 
 #define BUFS 8192
 void open_read_close(char *fname)
 {
-  int fd;
-  char buf[BUFS];
-  int c;
+	int fd;
+	char buf[BUFS];
+	int c;
 
-  if ((fd=open(fname, O_RDONLY)) < 0) {
-      openlog[FAIL]++;
-      close(fd);
-      return;
-  }
-  openlog[SUCCESS]++;
-  while ((c=read(fd, buf, BUFS)) > 0) {
-    if (write(nullfd,buf,c) < 0) {
-      perror("/dev/null");
-      printf("Opened\t %d\nUnopend:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-      exit(1);
-    }
-  }
-  if (c < 0) {
-    perror(fname);
-    printf("Opened\t %d\nUnopend:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-    exit(1);
-  }
-  close(fd);
+	if ((fd = open(fname, O_RDONLY)) < 0) {
+		openlog[FAIL]++;
+		close(fd);
+		return;
+	}
+	openlog[SUCCESS]++;
+	while ((c = read(fd, buf, BUFS)) > 0) {
+		if (write(nullfd, buf, c) < 0) {
+			perror("/dev/null");
+			printf("Opened\t %d\nUnopend:\t%d\n", openlog[SUCCESS],
+			       openlog[FAIL]);
+			exit(1);
+		}
+	}
+	if (c < 0) {
+		perror(fname);
+		printf("Opened\t %d\nUnopend:\t%d\n", openlog[SUCCESS],
+		       openlog[FAIL]);
+		exit(1);
+	}
+	close(fd);
 }
diff --git a/testcases/kernel/fs/fs-bench/random-del-create.c b/testcases/kernel/fs/fs-bench/random-del-create.c
index 393ca53..0a86f97 100644
--- a/testcases/kernel/fs/fs-bench/random-del-create.c
+++ b/testcases/kernel/fs/fs-bench/random-del-create.c
@@ -11,7 +11,7 @@
 #define FAIL 0
 #define SUCCESS 1
 
-int openlog[2]={0,0};
+int openlog[2] = { 0, 0 };
 
 #define MAXNUM 0x100000
 
@@ -20,97 +20,96 @@
 extern int box_muler(int, int);
 extern void create_or_delete(char *);
 
-int cfilecount=0;
-int dfilecount=0;
-int errorcount=0;
+int cfilecount = 0;
+int dfilecount = 0;
+int errorcount = 0;
 
 int main(int ac, char **av)
 {
-  int r;
-  char fname[1024];
-  time_t t;
-  int i;
-  int m;
+	int r;
+	char fname[1024];
+	time_t t;
+	int i;
+	int m;
 
-  if (ac != 2) {
-    printf("%s hex-style-filename \n", av[0]);
-    printf("ex) %s 00022300\n", av[0]);
-    exit(1);
-  }
-  sscanf(av[1],"%x",&m);
-  if (m < 1 || m > MAXNUM) {
-    printf("out of size %d\n",m);
-    exit(1);
-  }
+	if (ac != 2) {
+		printf("%s hex-style-filename \n", av[0]);
+		printf("ex) %s 00022300\n", av[0]);
+		exit(1);
+	}
+	sscanf(av[1], "%x", &m);
+	if (m < 1 || m > MAXNUM) {
+		printf("out of size %d\n", m);
+		exit(1);
+	}
 
-  time(&t);
-  srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-  /* 00/00/00/00 */
-  for (i = 0 ; i < m ; i++) {
-    r = random() % m;
-    sprintf(fname,"00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   (r&0xFF));
-    create_or_delete(fname);
-  }
-  fprintf(stderr,"Total create files: %d\n",cfilecount);
-  fprintf(stderr,"Total delete files: %d\n",dfilecount);
-  fprintf(stderr,"Total error       : %d\n",errorcount);
-  exit(0);
+	/* 00/00/00/00 */
+	for (i = 0; i < m; i++) {
+		r = random() % m;
+		sprintf(fname, "00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
+			((r >> 16) & 0xFF),
+			((r >> 8) & 0xFF),
+			((r >> 16) & 0xFF), ((r >> 8) & 0xFF), (r & 0xFF));
+		create_or_delete(fname);
+	}
+	fprintf(stderr, "Total create files: %d\n", cfilecount);
+	fprintf(stderr, "Total delete files: %d\n", dfilecount);
+	fprintf(stderr, "Total error       : %d\n", errorcount);
+	exit(0);
 }
 
 #define MAXFSIZE (192*1024)
 #define AVEFSIZE (MAXFSIZE/2)
 #define POOLDISKSPACE (AVEFSIZE*128)
 
-static int disk_space_pool=0;
+static int disk_space_pool = 0;
 void create_or_delete(char *fname)
 {
-  int r;
-  int fsize;
+	int r;
+	int fsize;
 
-  r = (random() & 1);
-  if (r && disk_space_pool > POOLDISKSPACE) {
-    /* create */
-    create_file(fname) ;
-  }
-  else {
-    delete_file(fname);
-  }
-  if ((errorcount > dfilecount ||  errorcount > cfilecount) && (errorcount > MAXERROR)) {
-    fprintf(stderr,"too much error -- stop\n");
-    fprintf(stderr,"Total create files: %d\n",cfilecount);
-    fprintf(stderr,"Total delete files: %d\n",dfilecount);
-    fprintf(stderr,"Total error       : %d\n",errorcount);
-    exit(1);
-  }
+	r = (random() & 1);
+	if (r && disk_space_pool > POOLDISKSPACE) {
+		/* create */
+		create_file(fname);
+	} else {
+		delete_file(fname);
+	}
+	if ((errorcount > dfilecount || errorcount > cfilecount)
+	    && (errorcount > MAXERROR)) {
+		fprintf(stderr, "too much error -- stop\n");
+		fprintf(stderr, "Total create files: %d\n", cfilecount);
+		fprintf(stderr, "Total delete files: %d\n", dfilecount);
+		fprintf(stderr, "Total error       : %d\n", errorcount);
+		exit(1);
+	}
 }
 
 int create_file(char *filename)
 {
-  int fd;
-  int randomsize;
-  char wbuf[MAXFSIZE];
-  if ((fd=creat(filename, S_IRWXU)) < 0) {
-    errorcount++;
-    return(-1);
-  }
-  if ((randomsize=box_muler(0,MAXFSIZE)) < 0) {
-    randomsize = MAXFSIZE;
-  }
-  if (write(fd,wbuf,randomsize) < 0) {
-    errorcount++;
-    close(fd);
-    return(-1);
-  }
-  cfilecount++;
-  disk_space_pool -= randomsize;
-  close(fd);
-        return 0;
+	int fd;
+	int randomsize;
+	char wbuf[MAXFSIZE];
+	if ((fd = creat(filename, S_IRWXU)) < 0) {
+		errorcount++;
+		return (-1);
+	}
+	if ((randomsize = box_muler(0, MAXFSIZE)) < 0) {
+		randomsize = MAXFSIZE;
+	}
+	if (write(fd, wbuf, randomsize) < 0) {
+		errorcount++;
+		close(fd);
+		return (-1);
+	}
+	cfilecount++;
+	disk_space_pool -= randomsize;
+	close(fd);
+	return 0;
 }
 
 #include <sys/stat.h>
@@ -118,18 +117,18 @@
 
 int delete_file(char *filename)
 {
-  struct stat buf;
-  int st;
-  st = stat(filename, &buf);
-  if (st < 0) {
-    errorcount++;
-    return (-1);
-  }
-  disk_space_pool += buf.st_size;
-  if (unlink(filename) < 0) {
-    errorcount++;
-    return(-1);
-  }
-  dfilecount++;
-        return 0;
+	struct stat buf;
+	int st;
+	st = stat(filename, &buf);
+	if (st < 0) {
+		errorcount++;
+		return (-1);
+	}
+	disk_space_pool += buf.st_size;
+	if (unlink(filename) < 0) {
+		errorcount++;
+		return (-1);
+	}
+	dfilecount++;
+	return 0;
 }
diff --git a/testcases/kernel/fs/fs_bind/bin/nsclone.c b/testcases/kernel/fs/fs_bind/bin/nsclone.c
index c0f417f..36ae874 100644
--- a/testcases/kernel/fs/fs_bind/bin/nsclone.c
+++ b/testcases/kernel/fs/fs_bind/bin/nsclone.c
@@ -29,21 +29,21 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-int myfunc(void *arg) {
+int myfunc(void *arg)
+{
 	return system(arg);
 }
 
-static void
-usage(char *cmd)
+static void usage(char *cmd)
 {
-	printf("%s  child_script parent_script\n",cmd);
+	printf("%s  child_script parent_script\n", cmd);
 }
 
 int main(int argc, char *argv[])
 {
 	char *child_cmd;
 	char *parent_cmd;
-	int ret=0, childret=0;
+	int ret = 0, childret = 0;
 
 	if (argc < 3) {
 		usage(argv[0]);
@@ -54,8 +54,7 @@
 	parent_cmd = (char *)strdup(argv[1]);
 
 	printf("1\n");
-	ret = ltp_clone_quick(CLONE_NEWNS|SIGCHLD, myfunc,
-				(void *)child_cmd);
+	ret = ltp_clone_quick(CLONE_NEWNS | SIGCHLD, myfunc, (void *)child_cmd);
 	if (ret != -1) {
 		system(parent_cmd);
 		wait(&childret);
diff --git a/testcases/kernel/fs/fs_bind/bin/smount.c b/testcases/kernel/fs/fs_bind/bin/smount.c
index aa843e2..9484687 100644
--- a/testcases/kernel/fs/fs_bind/bin/smount.c
+++ b/testcases/kernel/fs/fs_bind/bin/smount.c
@@ -37,29 +37,29 @@
 	int type;
 	if (argc != 3) {
 		fprintf(stderr, "usage: %s DIR "
-	"[rshared|rslave|rprivate|runclone|shared|slave|private|unclone]\n"
-					, argv[0]);
+			"[rshared|rslave|rprivate|runclone|shared|slave|private|unclone]\n",
+			argv[0]);
 		return 1;
 	}
 
 	fprintf(stdout, "%s %s %s\n", argv[0], argv[1], argv[2]);
 
-	if (strcmp(argv[2],"rshared")==0)
-		type=(MS_SHARED|MS_REC);
-	else if (strcmp(argv[2],"rslave")==0)
-		type=(MS_SLAVE|MS_REC);
-	else if (strcmp(argv[2],"rprivate")==0)
-		type=(MS_PRIVATE|MS_REC);
-	else if (strcmp(argv[2],"runclone")==0)
-		type=(MS_UNCLONE|MS_REC);
-	else if (strcmp(argv[2],"shared")==0)
-		type=MS_SHARED;
-	else if (strcmp(argv[2],"slave")==0)
-		type=MS_SLAVE;
-	else if (strcmp(argv[2],"private")==0)
-		type=MS_PRIVATE;
-	else if (strcmp(argv[2],"unclone")==0)
-		type=MS_UNCLONE;
+	if (strcmp(argv[2], "rshared") == 0)
+		type = (MS_SHARED | MS_REC);
+	else if (strcmp(argv[2], "rslave") == 0)
+		type = (MS_SLAVE | MS_REC);
+	else if (strcmp(argv[2], "rprivate") == 0)
+		type = (MS_PRIVATE | MS_REC);
+	else if (strcmp(argv[2], "runclone") == 0)
+		type = (MS_UNCLONE | MS_REC);
+	else if (strcmp(argv[2], "shared") == 0)
+		type = MS_SHARED;
+	else if (strcmp(argv[2], "slave") == 0)
+		type = MS_SLAVE;
+	else if (strcmp(argv[2], "private") == 0)
+		type = MS_PRIVATE;
+	else if (strcmp(argv[2], "unclone") == 0)
+		type = MS_UNCLONE;
 	else {
 		fprintf(stderr, "invalid operation: %s\n", argv[2]);
 		return 1;
diff --git a/testcases/kernel/fs/fs_di/create_datafile.c b/testcases/kernel/fs/fs_di/create_datafile.c
index a7449bd..72c5de3 100644
--- a/testcases/kernel/fs/fs_di/create_datafile.c
+++ b/testcases/kernel/fs/fs_di/create_datafile.c
@@ -36,41 +36,39 @@
 /* set write buffer size to whatever floats your boat.  I usually use 1M */
 #define BSIZE 1048576L
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-   off_t i;
-   long bufnum;
-   char buf[BSIZE];
-   off_t fd;
+	off_t i;
+	long bufnum;
+	char buf[BSIZE];
+	off_t fd;
 
-   if (argc != 3 || atoi(argv[1]) < 1)
-   {
-      printf("usage:\n\tcreate_file <# of %ld buffers to write> <name of file to create>\n\t ex. # create_file 10 /tmp/testfile\n",BSIZE);
-      exit(3);
-   }
-   bufnum = strtol(argv[1],NULL,0);
-   printf("Started building a %lu megabyte file\n",bufnum);
-   buf[0]='A';
-   for (i=1;i<BSIZE;i++)
-      buf[i]=buf[i-1]+1;
-   buf[BSIZE-1]='Z';
+	if (argc != 3 || atoi(argv[1]) < 1) {
+		printf
+		    ("usage:\n\tcreate_file <# of %ld buffers to write> <name of file to create>\n\t ex. # create_file 10 /tmp/testfile\n",
+		     BSIZE);
+		exit(3);
+	}
+	bufnum = strtol(argv[1], NULL, 0);
+	printf("Started building a %lu megabyte file\n", bufnum);
+	buf[0] = 'A';
+	for (i = 1; i < BSIZE; i++)
+		buf[i] = buf[i - 1] + 1;
+	buf[BSIZE - 1] = 'Z';
 
-   if ((fd = creat(argv[2],0755)) == -1)
-      perror("lftest: ");
+	if ((fd = creat(argv[2], 0755)) == -1)
+		perror("lftest: ");
 
-   for (i=0;i<bufnum;i++)
-   {
-      if (write(fd,buf,BSIZE) == -1)
-	 return -1;
-      else
-      {
-	 printf(".");
-	 fflush(stdout);
-      }
-      fsync(fd);
-   }
-   close(fd);
-   printf("\nFinished building a %lu megabyte file\n",bufnum);
-   return (0);
+	for (i = 0; i < bufnum; i++) {
+		if (write(fd, buf, BSIZE) == -1)
+			return -1;
+		else {
+			printf(".");
+			fflush(stdout);
+		}
+		fsync(fd);
+	}
+	close(fd);
+	printf("\nFinished building a %lu megabyte file\n", bufnum);
+	return (0);
 }
diff --git a/testcases/kernel/fs/fs_di/frag.c b/testcases/kernel/fs/fs_di/frag.c
index bfa3efa..0708168 100644
--- a/testcases/kernel/fs/fs_di/frag.c
+++ b/testcases/kernel/fs/fs_di/frag.c
@@ -39,9 +39,9 @@
 #include<sys/types.h>
 #include<unistd.h>
 
-FILE *fp_data;  /* File pointer for data file */
-FILE *fp_frag1; /* File pointer for fragmented file 1 */
-FILE *fp_frag2; /* File pointer for fragmented file 2 */
+FILE *fp_data;			/* File pointer for data file */
+FILE *fp_frag1;			/* File pointer for fragmented file 1 */
+FILE *fp_frag2;			/* File pointer for fragmented file 2 */
 
 int main(int argc, char *argv[])
 {
diff --git a/testcases/kernel/fs/fs_perms/fs_perms.c b/testcases/kernel/fs/fs_perms/fs_perms.c
index 518ec05..962957a 100644
--- a/testcases/kernel/fs/fs_perms/fs_perms.c
+++ b/testcases/kernel/fs/fs_perms/fs_perms.c
@@ -66,7 +66,7 @@
  * empty.
  */
 static void testsetup(const char *file_name, int flag, mode_t mode,
-                      int user_id, int group_id)
+		      int user_id, int group_id)
 {
 	FILE *file;
 
@@ -74,7 +74,7 @@
 
 	if (file == NULL)
 		tst_brkm(TBROK | TERRNO, cleanup,
-		         "Could not create test file %s.", file_name);
+			 "Could not create test file %s.", file_name);
 
 	/* create file with shebang */
 	if (flag) {
@@ -82,7 +82,7 @@
 
 		if (tst_get_path("sh", buf, PATH_MAX))
 			tst_brkm(TBROK, cleanup,
-			         "Could not find path to sh in $PATH.");
+				 "Could not find path to sh in $PATH.");
 
 		if (fprintf(file, "#!%s\n", buf) < 0)
 			tst_brkm(TBROK, cleanup, "Calling fprintf failed.");
@@ -93,19 +93,18 @@
 
 	if (chmod(file_name, mode))
 		tst_brkm(TBROK | TERRNO, cleanup,
-		         "Could not chmod test file %s.", file_name);
+			 "Could not chmod test file %s.", file_name);
 
 	if (chown(file_name, user_id, group_id))
 		tst_brkm(TBROK | TERRNO, cleanup,
-		         "Could not chown test file %s.", file_name);
+			 "Could not chown test file %s.", file_name);
 }
 
 /*
  * Test permissions.
  */
 static int testfperm(const char *file_name, int flag, int user_id,
-                     int group_id, char *fperm)
-
+		     int group_id, char *fperm)
 {
 	FILE *file;
 	int status;
@@ -114,11 +113,11 @@
 	case 0:
 		if (setgid(group_id))
 			tst_brkm(TBROK | TERRNO, cleanup,
-			         "Could not setgid to %d.", group_id);
+				 "Could not setgid to %d.", group_id);
 
 		if (setuid(user_id))
 			tst_brkm(TBROK | TERRNO, cleanup,
-			         "Could not setuid to %d.", user_id);
+				 "Could not setuid to %d.", user_id);
 
 		switch (tolower(fperm[0])) {
 		case 'x':
@@ -133,21 +132,21 @@
 				execlp(file_name, "test", NULL);
 
 			exit(1);
-		break;
+			break;
 		default:
 			if ((file = fopen(file_name, fperm)) != NULL) {
 				fclose(file);
 				exit(0);
 			}
 			exit(1);
-		break;
+			break;
 		}
-	break;
+		break;
 	case -1:
 		tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
-	break;
+		break;
 	default:
-	break;
+		break;
 	}
 
 	wait(&status);
@@ -158,8 +157,8 @@
 static void print_usage(const char *bname)
 {
 	char *usage = "<file mode> <file UID> <file GID> "
-                      "<tester UID> <tester GID> <permission "
-                      "to test r|w|x> <expected result 0|1>";
+	    "<tester UID> <tester GID> <permission "
+	    "to test r|w|x> <expected result 0|1>";
 
 	printf("Usage: %s %s\n", bname, usage);
 }
@@ -171,7 +170,7 @@
 
 	if (*end != '\0')
 		tst_brkm(TBROK, NULL, "Invalid parameter '%s' passed. (%s)",
-		         name, str);
+			 name, str);
 
 	return i;
 }
@@ -197,13 +196,13 @@
 		tst_exit();
 	}
 
-	fmode     = str_to_l(argv[1], "file mode", 8);
-	fuser_id  = str_to_l(argv[2], "file uid", 10);
+	fmode = str_to_l(argv[1], "file mode", 8);
+	fuser_id = str_to_l(argv[2], "file uid", 10);
 	fgroup_id = str_to_l(argv[3], "file gid", 10);
-	user_id   = str_to_l(argv[4], "tester uid", 10);
-	group_id  = str_to_l(argv[5], "tester gid", 10);
-	fperm     = argv[6];
-	exp_res   = str_to_l(argv[7], "expected result", 10);
+	user_id = str_to_l(argv[4], "tester uid", 10);
+	group_id = str_to_l(argv[5], "tester gid", 10);
+	fperm = argv[6];
+	exp_res = str_to_l(argv[7], "expected result", 10);
 
 	tst_tmpdir();
 	testsetup(TEST_FILE_NAME1, 0, fmode, fuser_id, fgroup_id);
@@ -222,8 +221,8 @@
 	res1 = testfperm(TEST_FILE_NAME1, 0, user_id, group_id, fperm);
 
 	tst_resm((exp_res == res1) && res2 ? TPASS : TFAIL,
-	         "%c a %03o file owned by (%d/%d) as user/group (%d/%d)",
-	         fperm[0], fmode, fuser_id, fgroup_id, user_id, group_id);
+		 "%c a %03o file owned by (%d/%d) as user/group (%d/%d)",
+		 fperm[0], fmode, fuser_id, fgroup_id, user_id, group_id);
 
 	tst_rmdir();
 	tst_exit();
diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c
index 4aa930a..2243280 100644
--- a/testcases/kernel/fs/fsstress/fsstress.c
+++ b/testcases/kernel/fs/fsstress/fsstress.c
@@ -74,32 +74,32 @@
 	OP_LAST
 } opty_t;
 
-typedef void (*opfnc_t)(int, long);
+typedef void (*opfnc_t) (int, long);
 
 typedef struct opdesc {
-	opty_t	op;
-	char	*name;
-	opfnc_t	func;
-	int	freq;
-	int	iswrite;
-	int	isxfs;
+	opty_t op;
+	char *name;
+	opfnc_t func;
+	int freq;
+	int iswrite;
+	int isxfs;
 } opdesc_t;
 
 typedef struct fent {
-	int	id;
-	int	parent;
+	int id;
+	int parent;
 } fent_t;
 
 typedef struct flist {
-	int	nfiles;
-	int	nslots;
-	int	tag;
-	fent_t	*fents;
+	int nfiles;
+	int nslots;
+	int tag;
+	fent_t *fents;
 } flist_t;
 
 typedef struct pathname {
-	int	len;
-	char	*path;
+	int len;
+	char *path;
 } pathname_t;
 
 #define	FT_DIR	0
@@ -123,180 +123,179 @@
 #define	MAXFSIZE	((1ULL << 63) - 1ULL)
 #define	MAXFSIZE32	((1ULL << 40) - 1ULL)
 
-void	allocsp_f(int, long);
-void	attr_remove_f(int, long);
-void	attr_set_f(int, long);
-void	bulkstat_f(int, long);
-void	bulkstat1_f(int, long);
-void	chown_f(int, long);
-void	creat_f(int, long);
-void	dread_f(int, long);
-void	dwrite_f(int, long);
-void	fdatasync_f(int, long);
-void	freesp_f(int, long);
-void	fsync_f(int, long);
-void	getdents_f(int, long);
-void	link_f(int, long);
-void	mkdir_f(int, long);
-void	mknod_f(int, long);
-void	read_f(int, long);
-void	readlink_f(int, long);
-void	rename_f(int, long);
-void	resvsp_f(int, long);
-void	rmdir_f(int, long);
-void	stat_f(int, long);
-void	symlink_f(int, long);
-void	sync_f(int, long);
-void	truncate_f(int, long);
-void	unlink_f(int, long);
-void	unresvsp_f(int, long);
-void	write_f(int, long);
+void allocsp_f(int, long);
+void attr_remove_f(int, long);
+void attr_set_f(int, long);
+void bulkstat_f(int, long);
+void bulkstat1_f(int, long);
+void chown_f(int, long);
+void creat_f(int, long);
+void dread_f(int, long);
+void dwrite_f(int, long);
+void fdatasync_f(int, long);
+void freesp_f(int, long);
+void fsync_f(int, long);
+void getdents_f(int, long);
+void link_f(int, long);
+void mkdir_f(int, long);
+void mknod_f(int, long);
+void read_f(int, long);
+void readlink_f(int, long);
+void rename_f(int, long);
+void resvsp_f(int, long);
+void rmdir_f(int, long);
+void stat_f(int, long);
+void symlink_f(int, long);
+void sync_f(int, long);
+void truncate_f(int, long);
+void unlink_f(int, long);
+void unresvsp_f(int, long);
+void write_f(int, long);
 
-opdesc_t	ops[] = {
+opdesc_t ops[] = {
 #ifndef NO_XFS
-	{ OP_ALLOCSP, "allocsp", allocsp_f, 1, 1, 1 },
-	{ OP_ATTR_REMOVE, "attr_remove", attr_remove_f, /* 1 */ 0, 1, 1 },
-	{ OP_ATTR_SET, "attr_set", attr_set_f, /* 2 */ 0, 1, 1 },
-	{ OP_BULKSTAT, "bulkstat", bulkstat_f, 1, 0, 1 },
-	{ OP_BULKSTAT1, "bulkstat1", bulkstat1_f, 1, 0, 1 },
+	{OP_ALLOCSP, "allocsp", allocsp_f, 1, 1, 1},
+	{OP_ATTR_REMOVE, "attr_remove", attr_remove_f, /* 1 */ 0, 1, 1},
+	{OP_ATTR_SET, "attr_set", attr_set_f, /* 2 */ 0, 1, 1},
+	{OP_BULKSTAT, "bulkstat", bulkstat_f, 1, 0, 1},
+	{OP_BULKSTAT1, "bulkstat1", bulkstat1_f, 1, 0, 1},
 #endif
-	{ OP_CHOWN, "chown", chown_f, 3, 1 },
-	{ OP_CREAT, "creat", creat_f, 4, 1 },
-	{ OP_DREAD, "dread", dread_f, 4, 0 },
-	{ OP_DWRITE, "dwrite", dwrite_f, 4, 1 },
-	{ OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1 },
+	{OP_CHOWN, "chown", chown_f, 3, 1},
+	{OP_CREAT, "creat", creat_f, 4, 1},
+	{OP_DREAD, "dread", dread_f, 4, 0},
+	{OP_DWRITE, "dwrite", dwrite_f, 4, 1},
+	{OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1},
 #ifndef NO_XFS
-	{ OP_FREESP, "freesp", freesp_f, 1, 1, 1 },
+	{OP_FREESP, "freesp", freesp_f, 1, 1, 1},
 #endif
-	{ OP_FSYNC, "fsync", fsync_f, 1, 1 },
-	{ OP_GETDENTS, "getdents", getdents_f, 1, 0 },
-	{ OP_LINK, "link", link_f, 1, 1 },
-	{ OP_MKDIR, "mkdir", mkdir_f, 2, 1 },
-	{ OP_MKNOD, "mknod", mknod_f, 2, 1 },
-	{ OP_READ, "read", read_f, 1, 0 },
-	{ OP_READLINK, "readlink", readlink_f, 1, 0 },
-	{ OP_RENAME, "rename", rename_f, 2, 1 },
+	{OP_FSYNC, "fsync", fsync_f, 1, 1},
+	{OP_GETDENTS, "getdents", getdents_f, 1, 0},
+	{OP_LINK, "link", link_f, 1, 1},
+	{OP_MKDIR, "mkdir", mkdir_f, 2, 1},
+	{OP_MKNOD, "mknod", mknod_f, 2, 1},
+	{OP_READ, "read", read_f, 1, 0},
+	{OP_READLINK, "readlink", readlink_f, 1, 0},
+	{OP_RENAME, "rename", rename_f, 2, 1},
 #ifndef NO_XFS
-	{ OP_RESVSP, "resvsp", resvsp_f, 1, 1, 1 },
+	{OP_RESVSP, "resvsp", resvsp_f, 1, 1, 1},
 #endif
-	{ OP_RMDIR, "rmdir", rmdir_f, 1, 1 },
-	{ OP_STAT, "stat", stat_f, 1, 0 },
-	{ OP_SYMLINK, "symlink", symlink_f, 2, 1 },
-	{ OP_SYNC, "sync", sync_f, 1, 0 },
-	{ OP_TRUNCATE, "truncate", truncate_f, 2, 1 },
-	{ OP_UNLINK, "unlink", unlink_f, 1, 1 },
+	{OP_RMDIR, "rmdir", rmdir_f, 1, 1},
+	{OP_STAT, "stat", stat_f, 1, 0},
+	{OP_SYMLINK, "symlink", symlink_f, 2, 1},
+	{OP_SYNC, "sync", sync_f, 1, 0},
+	{OP_TRUNCATE, "truncate", truncate_f, 2, 1},
+	{OP_UNLINK, "unlink", unlink_f, 1, 1},
 #ifndef NO_XFS
-	{ OP_UNRESVSP, "unresvsp", unresvsp_f, 1, 1, 1 },
+	{OP_UNRESVSP, "unresvsp", unresvsp_f, 1, 1, 1},
 #endif
-	{ OP_WRITE, "write", write_f, 4, 1 },
+	{OP_WRITE, "write", write_f, 4, 1},
 }, *ops_end;
 
-flist_t	flist[FT_nft] = {
-	{ 0, 0, 'd', NULL },
-	{ 0, 0, 'f', NULL },
-	{ 0, 0, 'l', NULL },
-	{ 0, 0, 'c', NULL },
-	{ 0, 0, 'r', NULL },
+flist_t flist[FT_nft] = {
+	{0, 0, 'd', NULL},
+	{0, 0, 'f', NULL},
+	{0, 0, 'l', NULL},
+	{0, 0, 'c', NULL},
+	{0, 0, 'r', NULL},
 };
 
-int		dcache[NDCACHE];
-int		errrange;
-int		errtag;
-opty_t		*freq_table;
-int		freq_table_size;
+int dcache[NDCACHE];
+int errrange;
+int errtag;
+opty_t *freq_table;
+int freq_table_size;
 #ifndef NO_XFS
-xfs_fsop_geom_t	geom;
+xfs_fsop_geom_t geom;
 #endif
-char		*homedir;
-int		*ilist;
-int		ilistlen;
-off64_t		maxfsize;
-char		*myprog;
-int		namerand;
-int		nameseq;
-int		nops;
-int		nproc = 1;
-int		operations = 1;
-int		procid;
-int		rtpct;
-unsigned long	seed = 0;
-ino_t		top_ino;
-int		verbose = 0;
+char *homedir;
+int *ilist;
+int ilistlen;
+off64_t maxfsize;
+char *myprog;
+int namerand;
+int nameseq;
+int nops;
+int nproc = 1;
+int operations = 1;
+int procid;
+int rtpct;
+unsigned long seed = 0;
+ino_t top_ino;
+int verbose = 0;
 #ifndef NO_XFS
 int no_xfs = 0;
 #else
 int no_xfs = 1;
 #endif
 
-void	add_to_flist(int, int, int);
-void	append_pathname(pathname_t *, char *);
+void add_to_flist(int, int, int);
+void append_pathname(pathname_t *, char *);
 #ifndef NO_XFS
-int	attr_list_path(pathname_t *, char *, const int, int,
-		       attrlist_cursor_t *);
-int	attr_remove_path(pathname_t *, const char *, int);
-int	attr_set_path(pathname_t *, const char *, const char *, const int, int);
+int attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *);
+int attr_remove_path(pathname_t *, const char *, int);
+int attr_set_path(pathname_t *, const char *, const char *, const int, int);
 #endif
-void	check_cwd(void);
-int	creat_path(pathname_t *, mode_t);
-void	dcache_enter(int, int);
-void	dcache_init(void);
-fent_t	*dcache_lookup(int);
-void	dcache_purge(int);
-void	del_from_flist(int, int);
-int	dirid_to_name(char *, int);
-void	doproc(void);
-void	fent_to_name(pathname_t *, flist_t *, fent_t *);
-void	fix_parent(int, int);
-void	free_pathname(pathname_t *);
-int	generate_fname(fent_t *, int, pathname_t *, int *, int *);
-int	get_fname(int, long, pathname_t *, flist_t **, fent_t **, int *);
-void	init_pathname(pathname_t *);
-int	lchown_path(pathname_t *, uid_t, gid_t);
-int	link_path(pathname_t *, pathname_t *);
-int	lstat64_path(pathname_t *, struct stat64 *);
-void	make_freq_table(void);
-int	mkdir_path(pathname_t *, mode_t);
-int	mknod_path(pathname_t *, mode_t, dev_t);
-void	namerandpad(int, char *, int);
-int	open_path(pathname_t *, int);
-DIR	*opendir_path(pathname_t *);
-void	process_freq(char *);
-int	readlink_path(pathname_t *, char *, size_t);
-int	rename_path(pathname_t *, pathname_t *);
-int	rmdir_path(pathname_t *);
-void	separate_pathname(pathname_t *, char *, pathname_t *);
-void	show_ops(int, char *);
-int	stat64_path(pathname_t *, struct stat64 *);
-int	symlink_path(const char *, pathname_t *);
-int	truncate64_path(pathname_t *, off64_t);
-int	unlink_path(pathname_t *);
-void	usage(void);
-void	write_freq(void);
-void	zero_freq(void);
+void check_cwd(void);
+int creat_path(pathname_t *, mode_t);
+void dcache_enter(int, int);
+void dcache_init(void);
+fent_t *dcache_lookup(int);
+void dcache_purge(int);
+void del_from_flist(int, int);
+int dirid_to_name(char *, int);
+void doproc(void);
+void fent_to_name(pathname_t *, flist_t *, fent_t *);
+void fix_parent(int, int);
+void free_pathname(pathname_t *);
+int generate_fname(fent_t *, int, pathname_t *, int *, int *);
+int get_fname(int, long, pathname_t *, flist_t **, fent_t **, int *);
+void init_pathname(pathname_t *);
+int lchown_path(pathname_t *, uid_t, gid_t);
+int link_path(pathname_t *, pathname_t *);
+int lstat64_path(pathname_t *, struct stat64 *);
+void make_freq_table(void);
+int mkdir_path(pathname_t *, mode_t);
+int mknod_path(pathname_t *, mode_t, dev_t);
+void namerandpad(int, char *, int);
+int open_path(pathname_t *, int);
+DIR *opendir_path(pathname_t *);
+void process_freq(char *);
+int readlink_path(pathname_t *, char *, size_t);
+int rename_path(pathname_t *, pathname_t *);
+int rmdir_path(pathname_t *);
+void separate_pathname(pathname_t *, char *, pathname_t *);
+void show_ops(int, char *);
+int stat64_path(pathname_t *, struct stat64 *);
+int symlink_path(const char *, pathname_t *);
+int truncate64_path(pathname_t *, off64_t);
+int unlink_path(pathname_t *);
+void usage(void);
+void write_freq(void);
+void zero_freq(void);
 
 int main(int argc, char **argv)
 {
-	char		buf[10];
-	int		c;
-	char		*dirname = NULL;
-	int		fd;
-	int		i;
-	int		cleanup = 0;
-	int		loops = 1;
-	int		loopcntr = 1;
-	char		cmd[256];
+	char buf[10];
+	int c;
+	char *dirname = NULL;
+	int fd;
+	int i;
+	int cleanup = 0;
+	int loops = 1;
+	int loopcntr = 1;
+	char cmd[256];
 #ifndef NO_XFS
-	int		j;
+	int j;
 #endif
-	char		*p;
-	int		stat;
-	struct timeval	t;
+	char *p;
+	int stat;
+	struct timeval t;
 #ifndef NO_XFS
-	ptrdiff_t	srval;
+	ptrdiff_t srval;
 #endif
-	int		nousage=0;
+	int nousage = 0;
 #ifndef NO_XFS
-	xfs_error_injection_t	err_inj;
+	xfs_error_injection_t err_inj;
 #endif
 
 	errrange = errtag = 0;
@@ -307,8 +306,8 @@
 	while ((c = getopt(argc, argv, "cd:e:f:i:l:n:p:rs:vwzHSX")) != -1) {
 		switch (c) {
 		case 'c':
-			/*Don't cleanup*/
-			cleanup=1;
+			/*Don't cleanup */
+			cleanup = 1;
 			break;
 		case 'd':
 			dirname = optarg;
@@ -361,11 +360,10 @@
 		case 'S':
 			show_ops(0, NULL);
 			printf("\n");
-			nousage=1;
+			nousage = 1;
 			break;
 		case '?':
-			fprintf(stderr, "%s - invalid parameters\n",
-				myprog);
+			fprintf(stderr, "%s - invalid parameters\n", myprog);
 			/* fall through */
 		case 'H':
 			usage();
@@ -383,7 +381,7 @@
 
 	if (no_xfs) {
 		int i;
-		for (i = 0; ops+i < ops_end; ++i) {
+		for (i = 0; ops + i < ops_end; ++i) {
 			if (ops[i].isxfs)
 				ops[i].freq = 0;
 		}
@@ -391,11 +389,11 @@
 
 	make_freq_table();
 
-	while ((loopcntr <= loops) || (loops == 0))
-	{
+	while ((loopcntr <= loops) || (loops == 0)) {
 		if (!dirname) {
 			/* no directory specified */
-			if (!nousage) usage();
+			if (!nousage)
+				usage();
 			exit(1);
 		}
 
@@ -406,10 +404,10 @@
 		}
 		sprintf(buf, "fss%x", getpid());
 		fd = creat(buf, 0666);
-		if (lseek64(fd, (off64_t)(MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
-			maxfsize = (off64_t)MAXFSIZE32;
+		if (lseek64(fd, (off64_t) (MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
+			maxfsize = (off64_t) MAXFSIZE32;
 		else
-			maxfsize = (off64_t)MAXFSIZE;
+			maxfsize = (off64_t) MAXFSIZE;
 		dcache_init();
 		setlinebuf(stdout);
 		if (!seed) {
@@ -419,13 +417,14 @@
 		}
 #ifndef NO_XFS
 		if (!no_xfs) {
-		memset(&geom, 0, sizeof(geom));
-		i = ioctl(fd, XFS_IOC_FSGEOMETRY, &geom);
-		if (i >= 0 && geom.rtblocks)
-			rtpct = MIN(MAX(geom.rtblocks * 100 /
-					(geom.rtblocks + geom.datablocks), 1), 99);
-		else
-			rtpct = 0;
+			memset(&geom, 0, sizeof(geom));
+			i = ioctl(fd, XFS_IOC_FSGEOMETRY, &geom);
+			if (i >= 0 && geom.rtblocks)
+				rtpct = MIN(MAX(geom.rtblocks * 100 /
+						(geom.rtblocks +
+						 geom.datablocks), 1), 99);
+			else
+				rtpct = 0;
 		}
 		if (errtag != 0) {
 			if (errrange == 0) {
@@ -434,18 +433,21 @@
 					j = random() % 100;
 
 					for (i = 0; i < j; i++)
-						(void) random();
+						(void)random();
 
-					errtag = (random() % (XFS_ERRTAG_MAX-1)) + 1;
+					errtag =
+					    (random() % (XFS_ERRTAG_MAX - 1)) +
+					    1;
 				}
 			} else {
 				srandom(seed);
 				j = random() % 100;
 
 				for (i = 0; i < j; i++)
-					(void) random();
+					(void)random();
 
-				errtag += (random() % (XFS_ERRTAG_MAX - errtag));
+				errtag +=
+				    (random() % (XFS_ERRTAG_MAX - errtag));
 			}
 			printf("Injecting failure on tag #%d\n", errtag);
 			memset(&err_inj, 0, sizeof(err_inj));
@@ -453,7 +455,8 @@
 			err_inj.fd = fd;
 			srval = ioctl(fd, XFS_IOC_ERROR_INJECTION, &err_inj);
 			if (srval < -1) {
-				perror("fsstress - XFS_SYSSGI error injection call");
+				perror
+				    ("fsstress - XFS_SYSSGI error injection call");
 				close(fd);
 				unlink(buf);
 				exit(1);
@@ -481,18 +484,21 @@
 			memset(&err_inj, 0, sizeof(err_inj));
 			err_inj.errtag = 0;
 			err_inj.fd = fd;
-			if ((srval = ioctl(fd, XFS_IOC_ERROR_CLEARALL, &err_inj)) != 0) {
-				fprintf(stderr, "Bad ej clear on %d (%d).\n", fd, errno);
-				perror("fsstress - XFS_SYSSGI clear error injection call");
+			if ((srval =
+			     ioctl(fd, XFS_IOC_ERROR_CLEARALL,
+				   &err_inj)) != 0) {
+				fprintf(stderr, "Bad ej clear on %d (%d).\n",
+					fd, errno);
+				perror
+				    ("fsstress - XFS_SYSSGI clear error injection call");
 				close(fd);
 				exit(1);
 			}
 			close(fd);
 		}
 #endif
-		if (cleanup == 0)
-		{
-			sprintf(cmd,"rm -rf %s/*",dirname);
+		if (cleanup == 0) {
+			sprintf(cmd, "rm -rf %s/*", dirname);
 			system(cmd);
 			for (i = 0; i < FT_nft; i++) {
 				flist[i].nslots = 0;
@@ -506,11 +512,10 @@
 	return 0;
 }
 
-void
-add_to_flist(int ft, int id, int parent)
+void add_to_flist(int ft, int id, int parent)
 {
-	fent_t	*fep;
-	flist_t	*ftp;
+	fent_t *fep;
+	flist_t *ftp;
 
 	ftp = &flist[ft];
 	if (ftp->nfiles == ftp->nslots) {
@@ -522,10 +527,9 @@
 	fep->parent = parent;
 }
 
-void
-append_pathname(pathname_t *name, char *str)
+void append_pathname(pathname_t * name, char *str)
 {
-	int	len;
+	int len;
 
 	len = strlen(str);
 #ifdef DEBUG
@@ -543,12 +547,12 @@
 
 #ifndef NO_XFS
 int
-attr_list_path(pathname_t *name, char *buffer, const int buffersize, int flags,
-	       attrlist_cursor_t *cursor)
+attr_list_path(pathname_t * name, char *buffer, const int buffersize, int flags,
+	       attrlist_cursor_t * cursor)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_list(name->path, buffer, buffersize, flags, cursor);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -556,19 +560,18 @@
 	separate_pathname(name, buf, &newname);
 	if (chdir(buf) == 0) {
 		rval = attr_list_path(&newname, buffer, buffersize, flags,
-			cursor);
+				      cursor);
 		chdir("..");
 	}
 	free_pathname(&newname);
 	return rval;
 }
 
-int
-attr_remove_path(pathname_t *name, const char *attrname, int flags)
+int attr_remove_path(pathname_t * name, const char *attrname, int flags)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_remove(name->path, attrname, flags);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -583,12 +586,12 @@
 }
 
 int
-attr_set_path(pathname_t *name, const char *attrname, const char *attrvalue,
+attr_set_path(pathname_t * name, const char *attrname, const char *attrvalue,
 	      const int valuelength, int flags)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_set(name->path, attrname, attrvalue, valuelength, flags);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -596,7 +599,7 @@
 	separate_pathname(name, buf, &newname);
 	if (chdir(buf) == 0) {
 		rval = attr_set_path(&newname, attrname, attrvalue, valuelength,
-			flags);
+				     flags);
 		chdir("..");
 	}
 	free_pathname(&newname);
@@ -604,11 +607,10 @@
 }
 #endif
 
-void
-check_cwd(void)
+void check_cwd(void)
 {
 #ifdef DEBUG
-	struct stat64	statbuf;
+	struct stat64 statbuf;
 
 	if (stat64(".", &statbuf) == 0 && statbuf.st_ino == top_ino)
 		return;
@@ -619,12 +621,11 @@
 #endif
 }
 
-int
-creat_path(pathname_t *name, mode_t mode)
+int creat_path(pathname_t * name, mode_t mode)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = creat(name->path, mode);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -638,26 +639,23 @@
 	return rval;
 }
 
-void
-dcache_enter(int dirid, int slot)
+void dcache_enter(int dirid, int slot)
 {
 	dcache[dirid % NDCACHE] = slot;
 }
 
-void
-dcache_init(void)
+void dcache_init(void)
 {
-	int	i;
+	int i;
 
 	for (i = 0; i < NDCACHE; i++)
 		dcache[i] = -1;
 }
 
-fent_t *
-dcache_lookup(int dirid)
+fent_t *dcache_lookup(int dirid)
 {
-	fent_t	*fep;
-	int	i;
+	fent_t *fep;
+	int i;
 
 	i = dcache[dirid % NDCACHE];
 	if (i >= 0 && (fep = &flist[FT_DIR].fents[i])->id == dirid)
@@ -665,20 +663,18 @@
 	return NULL;
 }
 
-void
-dcache_purge(int dirid)
+void dcache_purge(int dirid)
 {
-	int	*dcp;
+	int *dcp;
 
 	dcp = &dcache[dirid % NDCACHE];
 	if (*dcp >= 0 && flist[FT_DIR].fents[*dcp].id == dirid)
 		*dcp = -1;
 }
 
-void
-del_from_flist(int ft, int slot)
+void del_from_flist(int ft, int slot)
 {
-	flist_t	*ftp;
+	flist_t *ftp;
 
 	ftp = &flist[ft];
 	if (ft == FT_DIR)
@@ -691,12 +687,11 @@
 		ftp->nfiles--;
 }
 
-fent_t *
-dirid_to_fent(int dirid)
+fent_t *dirid_to_fent(int dirid)
 {
-	fent_t	*efep;
-	fent_t	*fep;
-	flist_t	*flp;
+	fent_t *efep;
+	fent_t *fep;
+	flist_t *flp;
 
 	if ((fep = dcache_lookup(dirid)))
 		return fep;
@@ -710,14 +705,13 @@
 	return NULL;
 }
 
-void
-doproc(void)
+void doproc(void)
 {
-	struct stat64	statbuf;
-	char		buf[10];
-	int		opno;
-	int		rval;
-	opdesc_t	*p;
+	struct stat64 statbuf;
+	char buf[10];
+	int opno;
+	int rval;
+	opdesc_t *p;
 
 	sprintf(buf, "p%x", procid);
 	(void)mkdir(buf, 0777);
@@ -733,7 +727,8 @@
 		namerand = random();
 	for (opno = 0; opno < operations; opno++) {
 		p = &ops[freq_table[random() % freq_table_size]];
-		if ((unsigned long)p->func < 4096) abort();
+		if ((unsigned long)p->func < 4096)
+			abort();
 
 		p->func(opno, random());
 		/*
@@ -741,9 +736,9 @@
 		 * directory.  If this stat returns EIO, assume
 		 * the forced shutdown happened.
 		 */
-		if (errtag != 0 && opno % 100 == 0)  {
+		if (errtag != 0 && opno % 100 == 0) {
 			rval = stat64(".", &statbuf);
-			if (rval == EIO)  {
+			if (rval == EIO) {
 				fprintf(stderr, "Detected EIO\n");
 				return;
 			}
@@ -751,12 +746,11 @@
 	}
 }
 
-void
-fent_to_name(pathname_t *name, flist_t *flp, fent_t *fep)
+void fent_to_name(pathname_t * name, flist_t * flp, fent_t * fep)
 {
-	char	buf[MAXNAMELEN];
-	int	i;
-	fent_t	*pfep;
+	char buf[MAXNAMELEN];
+	int i;
+	fent_t *pfep;
 
 	if (fep == NULL)
 		return;
@@ -770,13 +764,12 @@
 	append_pathname(name, buf);
 }
 
-void
-fix_parent(int oldid, int newid)
+void fix_parent(int oldid, int newid)
 {
-	fent_t	*fep;
-	flist_t	*flp;
-	int	i;
-	int	j;
+	fent_t *fep;
+	flist_t *flp;
+	int i;
+	int j;
 
 	for (i = 0, flp = flist; i < FT_nft; i++, flp++) {
 		for (j = 0, fep = flp->fents; j < flp->nfiles; j++, fep++) {
@@ -786,8 +779,7 @@
 	}
 }
 
-void
-free_pathname(pathname_t *name)
+void free_pathname(pathname_t * name)
 {
 	if (name->path) {
 		free(name->path);
@@ -796,14 +788,13 @@
 	}
 }
 
-int
-generate_fname(fent_t *fep, int ft, pathname_t *name, int *idp, int *v)
+int generate_fname(fent_t * fep, int ft, pathname_t * name, int *idp, int *v)
 {
-	char	buf[MAXNAMELEN];
-	flist_t	*flp;
-	int	id;
-	int	j;
-	int	len;
+	char buf[MAXNAMELEN];
+	flist_t *flp;
+	int id;
+	int j;
+	int len;
 
 	flp = &flist[ft];
 	len = sprintf(buf, "%c%x", flp->tag, id = nameseq++);
@@ -825,15 +816,15 @@
 }
 
 int
-get_fname(int which, long r, pathname_t *name, flist_t **flpp, fent_t **fepp,
+get_fname(int which, long r, pathname_t * name, flist_t ** flpp, fent_t ** fepp,
 	  int *v)
 {
-	int	c;
-	fent_t	*fep;
-	flist_t	*flp;
-	int	i;
-	int	j;
-	int	x;
+	int c;
+	fent_t *fep;
+	flist_t *flp;
+	int i;
+	int j;
+	int x;
 
 	for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {
 		if (which & (1 << i))
@@ -878,19 +869,17 @@
 
 }
 
-void
-init_pathname(pathname_t *name)
+void init_pathname(pathname_t * name)
 {
 	name->len = 0;
 	name->path = NULL;
 }
 
-int
-lchown_path(pathname_t *name, uid_t owner, gid_t group)
+int lchown_path(pathname_t * name, uid_t owner, gid_t group)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = lchown(name->path, owner, group);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -904,15 +893,14 @@
 	return rval;
 }
 
-int
-link_path(pathname_t *name1, pathname_t *name2)
+int link_path(pathname_t * name1, pathname_t * name2)
 {
-	char		buf1[MAXNAMELEN];
-	char		buf2[MAXNAMELEN];
-	int		down1;
-	pathname_t	newname1;
-	pathname_t	newname2;
-	int		rval;
+	char buf1[MAXNAMELEN];
+	char buf2[MAXNAMELEN];
+	int down1;
+	pathname_t newname1;
+	pathname_t newname2;
+	int rval;
 
 	rval = link(name1->path, name2->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -935,7 +923,7 @@
 			down1 = 1;
 		else
 			down1 = MAX(newname1.len, 3 + name2->len) <=
-				MAX(3 + name1->len, newname2.len);
+			    MAX(3 + name1->len, newname2.len);
 		if (down1) {
 			free_pathname(&newname2);
 			append_pathname(&newname2, "../");
@@ -959,12 +947,11 @@
 	return rval;
 }
 
-int
-lstat64_path(pathname_t *name, struct stat64 *sbuf)
+int lstat64_path(pathname_t * name, struct stat64 *sbuf)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = lstat64(name->path, sbuf);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -978,12 +965,11 @@
 	return rval;
 }
 
-void
-make_freq_table(void)
+void make_freq_table(void)
 {
-	int		f;
-	int		i;
-	opdesc_t	*p;
+	int f;
+	int i;
+	opdesc_t *p;
 
 	for (p = ops, f = 0; p < ops_end; p++)
 		f += p->freq;
@@ -995,12 +981,11 @@
 	}
 }
 
-int
-mkdir_path(pathname_t *name, mode_t mode)
+int mkdir_path(pathname_t * name, mode_t mode)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = mkdir(name->path, mode);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1014,12 +999,11 @@
 	return rval;
 }
 
-int
-mknod_path(pathname_t *name, mode_t mode, dev_t dev)
+int mknod_path(pathname_t * name, mode_t mode, dev_t dev)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = mknod(name->path, mode, dev);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1033,14 +1017,12 @@
 	return rval;
 }
 
-void
-namerandpad(int id, char *buf, int i)
+void namerandpad(int id, char *buf, int i)
 {
-	int		bucket;
-	static int	buckets[] =
-				{ 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 };
-	int		padlen;
-	int		padmod;
+	int bucket;
+	static int buckets[] = { 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 };
+	int padlen;
+	int padmod;
 
 	if (namerand == 0)
 		return;
@@ -1055,12 +1037,11 @@
 	}
 }
 
-int
-open_path(pathname_t *name, int oflag)
+int open_path(pathname_t * name, int oflag)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = open(name->path, oflag);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1074,12 +1055,11 @@
 	return rval;
 }
 
-DIR *
-opendir_path(pathname_t *name)
+DIR *opendir_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	DIR		*rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	DIR *rval;
 
 	rval = opendir(name->path);
 	if (rval || errno != ENAMETOOLONG)
@@ -1093,11 +1073,10 @@
 	return rval;
 }
 
-void
-process_freq(char *arg)
+void process_freq(char *arg)
 {
-	opdesc_t	*p;
-	char		*s;
+	opdesc_t *p;
+	char *s;
 
 	s = strchr(arg, '=');
 	if (s == NULL) {
@@ -1115,12 +1094,11 @@
 	exit(1);
 }
 
-int
-readlink_path(pathname_t *name, char *lbuf, size_t lbufsiz)
+int readlink_path(pathname_t * name, char *lbuf, size_t lbufsiz)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = readlink(name->path, lbuf, lbufsiz);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1134,15 +1112,14 @@
 	return rval;
 }
 
-int
-rename_path(pathname_t *name1, pathname_t *name2)
+int rename_path(pathname_t * name1, pathname_t * name2)
 {
-	char		buf1[MAXNAMELEN];
-	char		buf2[MAXNAMELEN];
-	int		down1;
-	pathname_t	newname1;
-	pathname_t	newname2;
-	int		rval;
+	char buf1[MAXNAMELEN];
+	char buf2[MAXNAMELEN];
+	int down1;
+	pathname_t newname1;
+	pathname_t newname2;
+	int rval;
 
 	rval = rename(name1->path, name2->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1165,7 +1142,7 @@
 			down1 = 1;
 		else
 			down1 = MAX(newname1.len, 3 + name2->len) <=
-				MAX(3 + name1->len, newname2.len);
+			    MAX(3 + name1->len, newname2.len);
 		if (down1) {
 			free_pathname(&newname2);
 			append_pathname(&newname2, "../");
@@ -1189,12 +1166,11 @@
 	return rval;
 }
 
-int
-rmdir_path(pathname_t *name)
+int rmdir_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = rmdir(name->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1208,10 +1184,9 @@
 	return rval;
 }
 
-void
-separate_pathname(pathname_t *name, char *buf, pathname_t *newname)
+void separate_pathname(pathname_t * name, char *buf, pathname_t * newname)
 {
-	char	*slash;
+	char *slash;
 
 	init_pathname(newname);
 	slash = strchr(name->path, '/');
@@ -1227,19 +1202,20 @@
 
 #define WIDTH 80
 
-void
-show_ops(int flag, char *lead_str)
+void show_ops(int flag, char *lead_str)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
-	if (flag<0) {
+	if (flag < 0) {
 		/* print in list form */
 		int x = WIDTH;
 
 		for (p = ops; p < ops_end; p++) {
-			if (lead_str != NULL && x+strlen(p->name)>=WIDTH-5)
-				x=printf("%s%s", (p==ops)?"":"\n", lead_str);
-			x+=printf("%s ", p->name);
+			if (lead_str != NULL
+			    && x + strlen(p->name) >= WIDTH - 5)
+				x = printf("%s%s", (p == ops) ? "" : "\n",
+					   lead_str);
+			x += printf("%s ", p->name);
 		}
 		printf("\n");
 	} else {
@@ -1255,19 +1231,18 @@
 				if (lead_str != NULL)
 					printf("%s", lead_str);
 				printf("%20s %d/%d %s\n",
-				p->name, p->freq, f,
-				(p->iswrite == 0) ? " " : "write op");
+				       p->name, p->freq, f,
+				       (p->iswrite == 0) ? " " : "write op");
 			}
 		}
 	}
 }
 
-int
-stat64_path(pathname_t *name, struct stat64 *sbuf)
+int stat64_path(pathname_t * name, struct stat64 *sbuf)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = stat64(name->path, sbuf);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1281,12 +1256,11 @@
 	return rval;
 }
 
-int
-symlink_path(const char *name1, pathname_t *name)
+int symlink_path(const char *name1, pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	if (!strcmp(name1, name->path)) {
 		printf("yikes! %s %s\n", name1, name->path);
@@ -1305,12 +1279,11 @@
 	return rval;
 }
 
-int
-truncate64_path(pathname_t *name, off64_t length)
+int truncate64_path(pathname_t * name, off64_t length)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = truncate64(name->path, length);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1324,12 +1297,11 @@
 	return rval;
 }
 
-int
-unlink_path(pathname_t *name)
+int unlink_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = unlink(name->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1343,38 +1315,47 @@
 	return rval;
 }
 
-void
-usage(void)
+void usage(void)
 {
 	printf("Usage: %s -H   or\n", myprog);
-	printf("       %s [-c][-d dir][-e errtg][-f op_name=freq][-l loops][-n nops]\n",
-		myprog);
+	printf
+	    ("       %s [-c][-d dir][-e errtg][-f op_name=freq][-l loops][-n nops]\n",
+	     myprog);
 	printf("          [-p nproc][-r len][-s seed][-v][-w][-z][-S]\n");
 	printf("where\n");
-	printf("   -c               specifies not to remove files(cleanup) after execution\n");
-	printf("   -d dir           specifies the base directory for operations\n");
+	printf
+	    ("   -c               specifies not to remove files(cleanup) after execution\n");
+	printf
+	    ("   -d dir           specifies the base directory for operations\n");
 	printf("   -e errtg         specifies error injection stuff\n");
-	printf("   -f op_name=freq  changes the frequency of option name to freq\n");
+	printf
+	    ("   -f op_name=freq  changes the frequency of option name to freq\n");
 	printf("                    the valid operation names are:\n");
 	show_ops(-1, "                        ");
-	printf("   -l loops         specifies the no. of times the testrun should loop.\n");
+	printf
+	    ("   -l loops         specifies the no. of times the testrun should loop.\n");
 	printf("                     *use 0 for infinite (default 1)\n");
-	printf("   -n nops          specifies the no. of operations per process (default 1)\n");
-	printf("   -p nproc         specifies the no. of processes (default 1)\n");
+	printf
+	    ("   -n nops          specifies the no. of operations per process (default 1)\n");
+	printf
+	    ("   -p nproc         specifies the no. of processes (default 1)\n");
 	printf("   -r               specifies random name padding\n");
-	printf("   -s seed          specifies the seed for the random generator (default random)\n");
+	printf
+	    ("   -s seed          specifies the seed for the random generator (default random)\n");
 	printf("   -v               specifies verbose mode\n");
-	printf("   -w               zeros frequencies of non-write operations\n");
+	printf
+	    ("   -w               zeros frequencies of non-write operations\n");
 	printf("   -z               zeros frequencies of all operations\n");
-	printf("   -S               prints the table of operations (omitting zero frequency)\n");
+	printf
+	    ("   -S               prints the table of operations (omitting zero frequency)\n");
 	printf("   -H               prints usage and exits\n");
-	printf("   -X               don't do anything XFS specific (default with -DNO_XFS)\n");
+	printf
+	    ("   -X               don't do anything XFS specific (default with -DNO_XFS)\n");
 }
 
-void
-write_freq(void)
+void write_freq(void)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
 	for (p = ops; p < ops_end; p++) {
 		if (!p->iswrite)
@@ -1382,10 +1363,9 @@
 	}
 }
 
-void
-zero_freq(void)
+void zero_freq(void)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
 	for (p = ops; p < ops_end; p++)
 		p->freq = 0;
@@ -1393,17 +1373,16 @@
 
 #ifndef NO_XFS
 
-void
-allocsp_f(int opno, long r)
+void allocsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
+	int e;
+	pathname_t f;
+	int fd;
 	struct xfs_flock64 fl;
-	__s64		lr;
-	__s64		off;
-	struct stat64	stb;
-	int		v;
+	__s64 lr;
+	__s64 off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1418,19 +1397,19 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: allocsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: allocsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__s64)random() << 32) + random();
+	lr = ((__s64) random() << 32) + random();
 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
 	off %= maxfsize;
 	memset(&fl, 0, sizeof(fl));
@@ -1440,25 +1419,24 @@
 	e = ioctl(fd, XFS_IOC_ALLOCSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_ALLOCSP64) %s %lld 0 %d\n",
-			procid, opno, f.path, (long long)off, e);
+		       procid, opno, f.path, (long long)off, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-attr_remove_f(int opno, long r)
+void attr_remove_f(int opno, long r)
 {
-	attrlist_ent_t		*aep;
-	attrlist_t		*alist;
-	char			*aname;
-	char			buf[4096];
-	attrlist_cursor_t	cursor;
-	int			e;
-	int			ent;
-	pathname_t		f;
-	int			total;
-	int			v;
-	int			which;
+	attrlist_ent_t *aep;
+	attrlist_t *alist;
+	char *aname;
+	char buf[4096];
+	attrlist_cursor_t cursor;
+	int e;
+	int ent;
+	pathname_t f;
+	int total;
+	int v;
+	int which;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
@@ -1467,17 +1445,17 @@
 	memset(&cursor, 0x00, sizeof(cursor));
 	do {
 		e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
-			&cursor);
+				   &cursor);
 		check_cwd();
 		if (e)
 			break;
-		alist = (attrlist_t *)buf;
+		alist = (attrlist_t *) buf;
 		total += alist->al_count;
 	} while (alist->al_more);
 	if (total == 0) {
 		if (v)
 			printf("%d/%d: attr_remove - no attrs for %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -1487,14 +1465,14 @@
 	aname = NULL;
 	do {
 		e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
-			&cursor);
+				   &cursor);
 		check_cwd();
 		if (e)
 			break;
-		alist = (attrlist_t *)buf;
+		alist = (attrlist_t *) buf;
 		if (which < ent + alist->al_count) {
 			aep = (attrlist_ent_t *)
-				&buf[alist->al_offset[which - ent]];
+			    & buf[alist->al_offset[which - ent]];
 			aname = aep->a_name;
 			break;
 		}
@@ -1502,9 +1480,8 @@
 	} while (alist->al_more);
 	if (aname == NULL) {
 		if (v)
-			printf(
-			"%d/%d: attr_remove - name %d not found at %s\n",
-				procid, opno, which, f.path);
+			printf("%d/%d: attr_remove - name %d not found at %s\n",
+			       procid, opno, which, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -1512,21 +1489,20 @@
 	check_cwd();
 	if (v)
 		printf("%d/%d: attr_remove %s %s %d\n",
-			procid, opno, f.path, aname, e);
+		       procid, opno, f.path, aname, e);
 	free_pathname(&f);
 }
 
-void
-attr_set_f(int opno, long r)
+void attr_set_f(int opno, long r)
 {
-	char		aname[10];
-	char		*aval;
-	int		e;
-	pathname_t	f;
-	int		len;
-	static int	lengths[] = { 10, 100, 1000, 10000 };
-	int		li;
-	int		v;
+	char aname[10];
+	char *aval;
+	int e;
+	pathname_t f;
+	int len;
+	static int lengths[] = { 10, 100, 1000, 10000 };
+	int li;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
@@ -1539,24 +1515,23 @@
 	aval = malloc(len);
 	memset(aval, nameseq & 0xff, len);
 	e = attr_set_path(&f, aname, aval, len, ATTR_DONTFOLLOW) < 0 ?
-		errno : 0;
+	    errno : 0;
 	check_cwd();
 	free(aval);
 	if (v)
 		printf("%d/%d: attr_set %s %s %d\n", procid, opno, f.path,
-			aname, e);
+		       aname, e);
 	free_pathname(&f);
 }
 
-void
-bulkstat_f(int opno, long r)
+void bulkstat_f(int opno, long r)
 {
-	__s32		count;
-	int		fd;
-	__u64		last;
-	__s32		nent;
-	xfs_bstat_t	*t;
-	__int64_t	total;
+	__s32 count;
+	int fd;
+	__u64 last;
+	__s32 nent;
+	xfs_bstat_t *t;
+	__int64_t total;
 	xfs_fsop_bulkreq_t bsr;
 
 	last = 0;
@@ -1566,31 +1541,30 @@
 	total = 0;
 
 	memset(&bsr, 0, sizeof(bsr));
-	bsr.lastip=&last;
-	bsr.icount=nent;
-	bsr.ubuffer=t;
-	bsr.ocount=&count;
+	bsr.lastip = &last;
+	bsr.icount = nent;
+	bsr.ubuffer = t;
+	bsr.ocount = &count;
 
 	while (ioctl(fd, XFS_IOC_FSBULKSTAT, &bsr) == 0 && count > 0)
 		total += count;
 	free(t);
 	if (verbose)
 		printf("%d/%d: bulkstat nent %d total %lld\n",
-			procid, opno, (int)nent, (long long)total);
+		       procid, opno, (int)nent, (long long)total);
 	close(fd);
 }
 
-void
-bulkstat1_f(int opno, long r)
+void bulkstat1_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		good;
-	__u64		ino;
-	struct stat64	s;
-	xfs_bstat_t	t;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	int good;
+	__u64 ino;
+	struct stat64 s;
+	xfs_bstat_t t;
+	int v;
 	xfs_fsop_bulkreq_t bsr;
 
 	good = random() & 1;
@@ -1599,7 +1573,7 @@
 		init_pathname(&f);
 		if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
 			append_pathname(&f, ".");
-		ino = stat64_path(&f, &s) < 0 ? (ino64_t)r : s.st_ino;
+		ino = stat64_path(&f, &s) < 0 ? (ino64_t) r : s.st_ino;
 		check_cwd();
 		free_pathname(&f);
 	} else {
@@ -1617,40 +1591,39 @@
 		 * "XFS: device 0x825- bad inode magic/vsn daddr 0x0 #0"
 		 *
 		 */
-		ino = (ino64_t)r;
+		ino = (ino64_t) r;
 		v = verbose;
 	}
 	fd = open(".", O_RDONLY);
 
 	memset(&bsr, 0, sizeof(bsr));
-	bsr.lastip=&ino;
-	bsr.icount=1;
-	bsr.ubuffer=&t;
-	bsr.ocount=NULL;
+	bsr.lastip = &ino;
+	bsr.icount = 1;
+	bsr.ubuffer = &t;
+	bsr.ocount = NULL;
 
 	e = ioctl(fd, XFS_IOC_FSBULKSTAT_SINGLE, &bsr) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: bulkstat1 %s ino %lld %d\n",
-			procid, opno, good ? "real" : "random",
-			(long long)ino, e);
+		       procid, opno, good ? "real" : "random",
+		       (long long)ino, e);
 	close(fd);
 }
 
 #endif
 
-void
-chown_f(int opno, long r)
+void chown_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		nbits;
-	uid_t		u;
-	int		v;
+	int e;
+	pathname_t f;
+	int nbits;
+	uid_t u;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
 		append_pathname(&f, ".");
-	u = (uid_t)random();
+	u = (uid_t) random();
 	nbits = (int)(random() % 32);
 	u &= (1 << nbits) - 1;
 	e = lchown_path(&f, u, -1) < 0 ? errno : 0;
@@ -1660,21 +1633,20 @@
 	free_pathname(&f);
 }
 
-void
-creat_f(int opno, long r)
+void creat_f(int opno, long r)
 {
-	int		e;
-	int		e1;
-	int		extsize;
-	pathname_t	f;
-	int		fd;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		type;
-	int		v;
-	int		v1;
-	int esz=0;
+	int e;
+	int e1;
+	int extsize;
+	pathname_t f;
+	int fd;
+	fent_t *fep;
+	int id;
+	int parid;
+	int type;
+	int v;
+	int v1;
+	int esz = 0;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v1))
 		parid = -1;
@@ -1692,7 +1664,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: creat - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -1704,12 +1676,12 @@
 	esz = 0;
 	if (fd >= 0) {
 #ifndef NO_XFS
-		struct fsxattr	a;
+		struct fsxattr a;
 		memset(&a, 0, sizeof(a));
 		if (extsize && ioctl(fd, XFS_IOC_FSGETXATTR, &a) >= 0) {
 			a.fsx_xflags |= XFS_XFLAG_REALTIME;
 			a.fsx_extsize =
-				geom.rtextsize * geom.blocksize * extsize;
+			    geom.rtextsize * geom.blocksize * extsize;
 			if (ioctl(fd, XFS_IOC_FSSETXATTR, &a) < 0)
 				e1 = errno;
 			esz = a.fsx_extsize;
@@ -1721,12 +1693,11 @@
 	}
 	if (v)
 		printf("%d/%d: creat %s x:%d %d %d\n", procid, opno, f.path,
-			esz, e, e1);
+		       esz, e, e1);
 	free_pathname(&f);
 }
 
-int
-setdirect(int fd)
+int setdirect(int fd)
 {
 	static int no_direct;
 	int flags;
@@ -1738,32 +1709,31 @@
 	if (flags < 0)
 		return 0;
 
-	if (fcntl(fd, F_SETFL, flags|O_DIRECT)  < 0) {
+	if (fcntl(fd, F_SETFL, flags | O_DIRECT) < 0) {
 		if (no_xfs) {
 			no_direct = 1;
 			return 0;
 		}
-		printf("cannot set O_DIRECT: %s\n",strerror(errno));
+		printf("cannot set O_DIRECT: %s\n", strerror(errno));
 		return 0;
 	}
 
 	return 1;
 }
 
-void
-dread_f(int opno, long r)
+void dread_f(int opno, long r)
 {
-	__int64_t	align;
-	char		*buf = NULL;
-	struct dioattr	diob;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	__int64_t align;
+	char *buf = NULL;
+	struct dioattr diob;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1779,7 +1749,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: dread - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -1793,7 +1763,7 @@
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: dread - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -1801,7 +1771,7 @@
 	if (stb.st_size == 0) {
 		if (v)
 			printf("%d/%d: dread - %s zero size\n", procid, opno,
-				f.path);
+			       f.path);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -1810,23 +1780,23 @@
 	memset(&diob, 0, sizeof(diob));
 	if (no_xfs) {
 		diob.d_miniosz = stb.st_blksize;
-		diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
+		diob.d_maxiosz = stb.st_blksize * 256;	/* good number ? */
 		diob.d_mem = stb.st_blksize;
 	}
 #ifndef NO_XFS
 	else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
 		if (v)
-			printf(
-			"%d/%d: dread - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
-				procid, opno, f.path, errno);
+			printf
+			    ("%d/%d: dread - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+			     procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
 #endif
-	align = (__int64_t)diob.d_miniosz;
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % stb.st_size);
+	align = (__int64_t) diob.d_miniosz;
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % stb.st_size);
 	off -= (off % align);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -1847,25 +1817,24 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: dread %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long int)off, (long)len, e);
+		       procid, opno, f.path, (long long int)off, (long)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-dwrite_f(int opno, long r)
+void dwrite_f(int opno, long r)
 {
-	__int64_t	align;
-	char		*buf = NULL;
-	struct dioattr	diob;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	__int64_t align;
+	char *buf = NULL;
+	struct dioattr diob;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1880,7 +1849,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: dwrite - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -1893,7 +1862,7 @@
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: dwrite - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -1901,23 +1870,23 @@
 	memset(&diob, 0, sizeof(diob));
 	if (no_xfs) {
 		diob.d_miniosz = stb.st_blksize;
-		diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
+		diob.d_maxiosz = stb.st_blksize * 256;	/* good number ? */
 		diob.d_mem = stb.st_blksize;
 	}
 #ifndef NO_XFS
 	else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
 		if (v)
-			printf(
-			"%d/%d: dwrite - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
-				procid, opno, f.path, errno);
+			printf
+			    ("%d/%d: dwrite - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+			     procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
 #endif
-	align = (__int64_t)diob.d_miniosz;
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	align = (__int64_t) diob.d_miniosz;
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off -= (off % align);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -1941,24 +1910,23 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: dwrite %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-fdatasync_f(int opno, long r)
+void fdatasync_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
 		if (v)
 			printf("%d/%d: fdatasync - no filename\n",
-				procid, opno);
+			       procid, opno);
 		free_pathname(&f);
 		return;
 	}
@@ -1968,7 +1936,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: fdatasync - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -1980,17 +1948,16 @@
 }
 
 #ifndef NO_XFS
-void
-freesp_f(int opno, long r)
+void freesp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
+	int e;
+	pathname_t f;
+	int fd;
 	struct xfs_flock64 fl;
-	__s64		lr;
-	__s64		off;
-	struct stat64	stb;
-	int		v;
+	__s64 lr;
+	__s64 off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2005,19 +1972,19 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: freesp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: freesp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__s64)random() << 32) + random();
+	lr = ((__s64) random() << 32) + random();
 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
 	off %= maxfsize;
 	memset(&fl, 0, sizeof(fl));
@@ -2027,20 +1994,19 @@
 	e = ioctl(fd, XFS_IOC_FREESP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_FREESP64) %s %lld 0 %d\n",
-			procid, opno, f.path, (long long)off, e);
+		       procid, opno, f.path, (long long)off, e);
 	free_pathname(&f);
 	close(fd);
 }
 
 #endif
 
-void
-fsync_f(int opno, long r)
+void fsync_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2055,7 +2021,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: fsync - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -2066,12 +2032,11 @@
 	close(fd);
 }
 
-void
-getdents_f(int opno, long r)
+void getdents_f(int opno, long r)
 {
-	DIR		*dir;
-	pathname_t	f;
-	int		v;
+	DIR *dir;
+	pathname_t f;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_DIRm, r, &f, NULL, NULL, &v))
@@ -2081,7 +2046,7 @@
 	if (dir == NULL) {
 		if (v)
 			printf("%d/%d: getdents - can't open %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -2093,18 +2058,17 @@
 	closedir(dir);
 }
 
-void
-link_f(int opno, long r)
+void link_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		id;
-	pathname_t	l;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int id;
+	pathname_t l;
+	int parid;
+	int v;
+	int v1;
 
 	init_pathname(&f);
 	if (!get_fname(FT_NOTDIR, r, &f, &flp, NULL, &v1)) {
@@ -2125,7 +2089,7 @@
 		if (v) {
 			fent_to_name(&l, &flist[FT_DIR], fep);
 			printf("%d/%d: link - no filename from %s\n",
-				procid, opno, l.path);
+			       procid, opno, l.path);
 		}
 		free_pathname(&l);
 		free_pathname(&f);
@@ -2137,21 +2101,20 @@
 		add_to_flist(flp - flist, id, parid);
 	if (v)
 		printf("%d/%d: link %s %s %d\n", procid, opno, f.path, l.path,
-			e);
+		       e);
 	free_pathname(&l);
 	free_pathname(&f);
 }
 
-void
-mkdir_f(int opno, long r)
+void mkdir_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int id;
+	int parid;
+	int v;
+	int v1;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2164,7 +2127,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: mkdir - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -2178,16 +2141,15 @@
 	free_pathname(&f);
 }
 
-void
-mknod_f(int opno, long r)
+void mknod_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int id;
+	int parid;
+	int v;
+	int v1;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2200,12 +2162,12 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: mknod - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
 	}
-	e = mknod_path(&f, S_IFCHR|0444, 0) < 0 ? errno : 0;
+	e = mknod_path(&f, S_IFCHR | 0444, 0) < 0 ? errno : 0;
 	check_cwd();
 	if (e == 0)
 		add_to_flist(FT_DEV, id, parid);
@@ -2214,18 +2176,17 @@
 	free_pathname(&f);
 }
 
-void
-read_f(int opno, long r)
+void read_f(int opno, long r)
 {
-	char		*buf;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	char *buf;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2240,14 +2201,14 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: read - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: read - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -2255,13 +2216,13 @@
 	if (stb.st_size == 0) {
 		if (v)
 			printf("%d/%d: read - %s zero size\n", procid, opno,
-				f.path);
+			       f.path);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % stb.st_size);
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % stb.st_size);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
 	buf = malloc(len);
@@ -2269,18 +2230,17 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: read %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-readlink_f(int opno, long r)
+void readlink_f(int opno, long r)
 {
-	char		buf[PATH_MAX];
-	int		e;
-	pathname_t	f;
-	int		v;
+	char buf[PATH_MAX];
+	int e;
+	pathname_t f;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_SYMm, r, &f, NULL, NULL, &v)) {
@@ -2296,20 +2256,19 @@
 	free_pathname(&f);
 }
 
-void
-rename_f(int opno, long r)
+void rename_f(int opno, long r)
 {
-	fent_t		*dfep;
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		id;
-	pathname_t	newf;
-	int		oldid;
-	int		parid;
-	int		v;
-	int		v1;
+	fent_t *dfep;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int id;
+	pathname_t newf;
+	int oldid;
+	int parid;
+	int v;
+	int v1;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, &flp, &fep, &v1)) {
@@ -2330,7 +2289,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], dfep);
 			printf("%d/%d: rename - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&newf);
 		free_pathname(&f);
@@ -2348,23 +2307,22 @@
 	}
 	if (v)
 		printf("%d/%d: rename %s to %s %d\n", procid, opno, f.path,
-			newf.path, e);
+		       newf.path, e);
 	free_pathname(&newf);
 	free_pathname(&f);
 }
 
 #ifndef NO_XFS
-void
-resvsp_f(int opno, long r)
+void resvsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
+	int e;
+	pathname_t f;
+	int fd;
 	struct xfs_flock64 fl;
-	__s64		lr;
-	__s64		off;
-	struct stat64	stb;
-	int		v;
+	__s64 lr;
+	__s64 off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2379,42 +2337,41 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: resvsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: resvsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__s64)random() << 32) + random();
+	lr = ((__s64) random() << 32) + random();
 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
 	off %= maxfsize;
 	memset(&fl, 0, sizeof(fl));
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
-	fl.l_len = (__s64)(random() % (1024 * 1024));
+	fl.l_len = (__s64) (random() % (1024 * 1024));
 	e = ioctl(fd, XFS_IOC_RESVSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %lld %d\n",
-			procid, opno, f.path, (long long)off,
-			(long long)fl.l_len, e);
+		       procid, opno, f.path, (long long)off,
+		       (long long)fl.l_len, e);
 	free_pathname(&f);
 	close(fd);
 }
 #endif
 
-void
-rmdir_f(int opno, long r)
+void rmdir_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		v;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_DIRm, r, &f, NULL, &fep, &v)) {
@@ -2432,13 +2389,12 @@
 	free_pathname(&f);
 }
 
-void
-stat_f(int opno, long r)
+void stat_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v)) {
@@ -2454,19 +2410,18 @@
 	free_pathname(&f);
 }
 
-void
-symlink_f(int opno, long r)
+void symlink_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		i;
-	int		id;
-	int		len;
-	int		parid;
-	int		v;
-	int		v1;
-	char		*val;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int i;
+	int id;
+	int len;
+	int parid;
+	int v;
+	int v1;
+	char *val;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2479,7 +2434,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: symlink - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -2502,23 +2457,21 @@
 }
 
 /* ARGSUSED */
-void
-sync_f(int opno, long r)
+void sync_f(int opno, long r)
 {
 	sync();
 	if (verbose)
 		printf("%d/%d: sync\n", procid, opno);
 }
 
-void
-truncate_f(int opno, long r)
+void truncate_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2532,29 +2485,28 @@
 	if (e > 0) {
 		if (v)
 			printf("%d/%d: truncate - stat64 %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
+	lr = ((__int64_t) random() << 32) + random();
 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
 	off %= maxfsize;
 	e = truncate64_path(&f, off) < 0 ? errno : 0;
 	check_cwd();
 	if (v)
 		printf("%d/%d: truncate %s %lld %d\n", procid, opno, f.path,
-			(long long)off, e);
+		       (long long)off, e);
 	free_pathname(&f);
 }
 
-void
-unlink_f(int opno, long r)
+void unlink_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		v;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_NOTDIR, r, &f, &flp, &fep, &v)) {
@@ -2573,17 +2525,16 @@
 }
 
 #ifndef NO_XFS
-void
-unresvsp_f(int opno, long r)
+void unresvsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
+	int e;
+	pathname_t f;
+	int fd;
 	struct xfs_flock64 fl;
-	__s64		lr;
-	__s64		off;
-	struct stat64	stb;
-	int		v;
+	__s64 lr;
+	__s64 off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2598,47 +2549,46 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: unresvsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: unresvsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__s64)random() << 32) + random();
+	lr = ((__s64) random() << 32) + random();
 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
 	off %= maxfsize;
 	memset(&fl, 0, sizeof(fl));
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
-	fl.l_len = (__s64)(random() % (1 << 20));
+	fl.l_len = (__s64) (random() % (1 << 20));
 	e = ioctl(fd, XFS_IOC_UNRESVSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %lld %d\n",
-			procid, opno, f.path, (long long)off,
-			(long long)fl.l_len, e);
+		       procid, opno, f.path, (long long)off,
+		       (long long)fl.l_len, e);
 	free_pathname(&f);
 	close(fd);
 }
 #endif
 
-void
-write_f(int opno, long r)
+void write_f(int opno, long r)
 {
-	char		*buf;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	char *buf;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGm, r, &f, NULL, NULL, &v)) {
@@ -2653,20 +2603,20 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: write - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: write - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -2676,7 +2626,7 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: write %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
index d60a4d5..0a19e0e 100644
--- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
+++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
@@ -40,16 +40,16 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #if defined(_UWIN) || defined(__linux__)
-# include <sys/param.h>
-# include <limits.h>
-# include <time.h>
-# include <strings.h>
-# include <sys/time.h>
+#include <sys/param.h>
+#include <limits.h>
+#include <time.h>
+#include <strings.h>
+#include <sys/time.h>
 #endif
 #include <fcntl.h>
 #include <sys/mman.h>
 #ifndef MAP_FILE
-# define MAP_FILE 0
+#define MAP_FILE 0
 #endif
 #include <limits.h>
 #include <signal.h>
@@ -65,16 +65,16 @@
  */
 
 struct log_entry {
-	int	operation;
+	int operation;
 	struct timeval tv;
-	int	args[3];
+	int args[3];
 };
 
 #define	LOGSIZE	1000
 
-struct log_entry	oplog[LOGSIZE];	/* the log */
-int			logptr = 0;	/* current position in log */
-int			logcount = 0;	/* total ops */
+struct log_entry oplog[LOGSIZE];	/* the log */
+int logptr = 0;			/* current position in log */
+int logcount = 0;		/* total ops */
 
 /*
  *	Define operations
@@ -91,48 +91,47 @@
 int page_size;
 int page_mask;
 
-char	*original_buf;			/* a pointer to the original data */
-char	*good_buf;			/* a pointer to the correct data */
-char	*temp_buf;			/* a pointer to the current data */
-char	*fname;				/* name of our test file */
-char	logfile[1024];			/* name of our log file */
-char	goodfile[1024];			/* name of our test file */
+char *original_buf;		/* a pointer to the original data */
+char *good_buf;			/* a pointer to the correct data */
+char *temp_buf;			/* a pointer to the current data */
+char *fname;			/* name of our test file */
+char logfile[1024];		/* name of our log file */
+char goodfile[1024];		/* name of our test file */
 
-off_t		file_size = 0;
-off_t		biggest = 0;
-char		state[256];
-unsigned long	testcalls = 0;		/* calls to function "test" */
+off_t file_size = 0;
+off_t biggest = 0;
+char state[256];
+unsigned long testcalls = 0;	/* calls to function "test" */
 
-unsigned long	simulatedopcount = 0;	/* -b flag */
-int	closeprob = 0;			/* -c flag */
-int	debug = 0;			/* -d flag */
-unsigned long	debugstart = 0;		/* -D flag */
-unsigned long	maxfilelen = 256 * 1024;	/* -l flag */
-int	sizechecks = 1;			/* -n flag disables them */
-int	maxoplen = 64 * 1024;		/* -o flag */
-int	quiet = 0;			/* -q flag */
+unsigned long simulatedopcount = 0;	/* -b flag */
+int closeprob = 0;		/* -c flag */
+int debug = 0;			/* -d flag */
+unsigned long debugstart = 0;	/* -D flag */
+unsigned long maxfilelen = 256 * 1024;	/* -l flag */
+int sizechecks = 1;		/* -n flag disables them */
+int maxoplen = 64 * 1024;	/* -o flag */
+int quiet = 0;			/* -q flag */
 unsigned long progressinterval = 0;	/* -p flag */
-int	readbdy = 1;			/* -r flag */
-int	style = 0;			/* -s flag */
-int	truncbdy = 1;			/* -t flag */
-int	writebdy = 1;			/* -w flag */
-long	monitorstart = -1;		/* -m flag */
-long	monitorend = -1;		/* -m flag */
-int	lite = 0;			/* -L flag */
-long	numops = -1;			/* -N flag */
-int	randomoplen = 1;		/* -O flag disables it */
-int	seed = 1;			/* -S flag */
-int     mapped_writes = 1;              /* -W flag disables */
-int 	mapped_reads = 1;		/* -R flag disables it */
-int	fsxgoodfd = 0;
-FILE *	fsxlogf = NULL;
+int readbdy = 1;		/* -r flag */
+int style = 0;			/* -s flag */
+int truncbdy = 1;		/* -t flag */
+int writebdy = 1;		/* -w flag */
+long monitorstart = -1;		/* -m flag */
+long monitorend = -1;		/* -m flag */
+int lite = 0;			/* -L flag */
+long numops = -1;		/* -N flag */
+int randomoplen = 1;		/* -O flag disables it */
+int seed = 1;			/* -S flag */
+int mapped_writes = 1;		/* -W flag disables */
+int mapped_reads = 1;		/* -R flag disables it */
+int fsxgoodfd = 0;
+FILE *fsxlogf = NULL;
 int badoff = -1;
 
-void
-vwarnc(code, fmt, ap)
-	int code;
-	const char *fmt;
-	va_list ap;
+void vwarnc(code, fmt, ap)
+int code;
+const char *fmt;
+va_list ap;
 {
 	fprintf(stderr, "fsx: ");
 	if (fmt != NULL) {
@@ -142,8 +141,7 @@
 	fprintf(stderr, "%s\n", strerror(code));
 }
 
-void
-warn(const char * fmt, ...)
+void warn(const char *fmt, ...)
 {
 	va_list ap;
 	va_start(ap, fmt);
@@ -152,8 +150,8 @@
 }
 
 void
-__attribute__((format(printf, 1, 2)))
-prt(char *fmt, ...)
+    __attribute__ ((format(printf, 1, 2)))
+    prt(char *fmt, ...)
 {
 	va_list args;
 
@@ -168,14 +166,12 @@
 	}
 }
 
-void
-prterr(char *prefix)
+void prterr(char *prefix)
 {
 	prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno));
 }
 
-void
-log4(int operation, int arg0, int arg1, int arg2, struct timeval *tv)
+void log4(int operation, int arg0, int arg1, int arg2, struct timeval *tv)
 {
 	struct log_entry *le;
 
@@ -191,11 +187,10 @@
 		logptr = 0;
 }
 
-void
-logdump(void)
+void logdump(void)
 {
-	int	i, count, down;
-	struct log_entry	*lp;
+	int i, count, down;
+	struct log_entry *lp;
 
 	prt("LOG DUMP (%d total operations):\n", logcount);
 	if (logcount < LOGSIZE) {
@@ -208,10 +203,9 @@
 	for (; count > 0; count--) {
 		int opnum;
 
-		opnum = i+1 + (logcount/LOGSIZE)*LOGSIZE;
+		opnum = i + 1 + (logcount / LOGSIZE) * LOGSIZE;
 		lp = &oplog[i];
-		prt("%d: %lu.%06lu ", opnum,
-		    lp->tv.tv_sec, lp->tv.tv_usec);
+		prt("%d: %lu.%06lu ", opnum, lp->tv.tv_sec, lp->tv.tv_usec);
 
 		switch (lp->operation) {
 		case OP_MAPREAD:
@@ -219,7 +213,7 @@
 			    lp->args[0], lp->args[0] + lp->args[1] - 1,
 			    lp->args[1]);
 			if (badoff >= lp->args[0] && badoff <
-						     lp->args[0] + lp->args[1])
+			    lp->args[0] + lp->args[1])
 				prt("\t***RRRR***");
 			break;
 		case OP_MAPWRITE:
@@ -227,7 +221,7 @@
 			    lp->args[0], lp->args[0] + lp->args[1] - 1,
 			    lp->args[1]);
 			if (badoff >= lp->args[0] && badoff <
-						     lp->args[0] + lp->args[1])
+			    lp->args[0] + lp->args[1])
 				prt("\t******WWWW");
 			break;
 		case OP_READ:
@@ -246,7 +240,7 @@
 				prt(" HOLE");
 			else if (lp->args[0] + lp->args[1] > lp->args[2])
 				prt(" EXTEND");
-			if ((badoff >= lp->args[0] || badoff >=lp->args[2]) &&
+			if ((badoff >= lp->args[0] || badoff >= lp->args[2]) &&
 			    badoff < lp->args[0] + lp->args[1])
 				prt("\t***WWWW");
 			break;
@@ -255,7 +249,7 @@
 			prt("TRUNCATE %s\tfrom 0x%x to 0x%x",
 			    down ? "DOWN" : "UP", lp->args[1], lp->args[0]);
 			if (badoff >= lp->args[!down] &&
-			    badoff < lp->args[!!down])
+			    badoff < lp->args[! !down])
 				prt("\t******WWWW");
 			break;
 		case OP_CLOSEOPEN:
@@ -275,8 +269,7 @@
 	}
 }
 
-void
-save_buffer(char *buffer, off_t bufferlength, int fd)
+void save_buffer(char *buffer, off_t bufferlength, int fd)
 {
 	off_t ret;
 	ssize_t byteswritten;
@@ -289,36 +282,35 @@
 		exit(67);
 	}
 	if (lite) {
-		off_t size_by_seek = lseek(fd, (off_t)0, SEEK_END);
-		if (size_by_seek == (off_t)-1)
+		off_t size_by_seek = lseek(fd, (off_t) 0, SEEK_END);
+		if (size_by_seek == (off_t) - 1)
 			prterr("save_buffer: lseek eof");
 		else if (bufferlength > size_by_seek) {
 			warn("save_buffer: .fsxgood file too short... will"
-				"save 0x%llx bytes instead of 0x%llx\n",
-				(unsigned long long)size_by_seek,
-				(unsigned long long)bufferlength);
+			     "save 0x%llx bytes instead of 0x%llx\n",
+			     (unsigned long long)size_by_seek,
+			     (unsigned long long)bufferlength);
 			bufferlength = size_by_seek;
 		}
 	}
 
-	ret = lseek(fd, (off_t)0, SEEK_SET);
-	if (ret == (off_t)-1)
+	ret = lseek(fd, (off_t) 0, SEEK_SET);
+	if (ret == (off_t) - 1)
 		prterr("save_buffer: lseek 0");
 
-	byteswritten = write(fd, buffer, (size_t)bufferlength);
+	byteswritten = write(fd, buffer, (size_t) bufferlength);
 	if (byteswritten != bufferlength) {
 		if (byteswritten == -1)
 			prterr("save_buffer write");
 		else
 			warn("save_buffer: short write, 0x%x bytes instead"
-				"of 0x%llx\n",
+			     "of 0x%llx\n",
 			     (unsigned)byteswritten,
 			     (unsigned long long)bufferlength);
 	}
 }
 
-void
-report_failure(int status)
+void report_failure(int status)
 {
 	logdump();
 
@@ -337,8 +329,7 @@
 #define short_at(cp) ((unsigned short)((*((unsigned char *)(cp)) << 8) | \
 				        *(((unsigned char *)(cp)) + 1)))
 
-void
-check_buffers(unsigned offset, unsigned size)
+void check_buffers(unsigned offset, unsigned size)
 {
 	unsigned char c, t;
 	unsigned i = 0;
@@ -354,11 +345,11 @@
 			c = good_buf[offset];
 			t = temp_buf[i];
 			if (c != t) {
-			        if (n == 0) {
+				if (n == 0) {
 					bad = short_at(&temp_buf[i]);
-				        prt("%#07x\t%#06x\t%#06x", offset,
-				            short_at(&good_buf[offset]), bad);
-					op = temp_buf[offset & 1 ? i+1 : i];
+					prt("%#07x\t%#06x\t%#06x", offset,
+					    short_at(&good_buf[offset]), bad);
+					op = temp_buf[offset & 1 ? i + 1 : i];
 				}
 				n++;
 				badoff = offset;
@@ -368,15 +359,15 @@
 			size--;
 		}
 		if (n) {
-		        prt("\t%#7x\n", n);
+			prt("\t%#7x\n", n);
 			if (bad)
 				prt("operation# (mod 256) for the bad data"
-					"may be %u\n", ((unsigned)op & 0xff));
+				    "may be %u\n", ((unsigned)op & 0xff));
 			else
 				prt("operation# (mod 256) for the bad data"
-					"unknown, check HOLE and EXTEND ops\n");
+				    "unknown, check HOLE and EXTEND ops\n");
 		} else
-		        prt("????????????????\n");
+			prt("????????????????\n");
 		report_failure(110);
 	}
 }
@@ -395,31 +386,29 @@
 int fd_policy = FD_RANDOM;
 int fd_last = 0;
 
-struct test_file *
-get_tf(void)
+struct test_file *get_tf(void)
 {
 	unsigned index = 0;
 
 	switch (fd_policy) {
-		case FD_ROTATE:
-			index = fd_last++;
-			break;
-		case FD_RANDOM:
-			index = random();
-			break;
-		case FD_SINGLE:
-			index = 0;
-			break;
-		default:
-			prt("unknown policy");
-			exit(1);
-			break;
+	case FD_ROTATE:
+		index = fd_last++;
+		break;
+	case FD_RANDOM:
+		index = random();
+		break;
+	case FD_SINGLE:
+		index = 0;
+		break;
+	default:
+		prt("unknown policy");
+		exit(1);
+		break;
 	}
-	return &test_files[ index % num_test_files ];
+	return &test_files[index % num_test_files];
 }
 
-void
-assign_fd_policy(char *policy)
+void assign_fd_policy(char *policy)
 {
 	if (!strcmp(policy, "random"))
 		fd_policy = FD_RANDOM;
@@ -431,15 +420,13 @@
 	}
 }
 
-int
-get_fd(void)
+int get_fd(void)
 {
 	struct test_file *tf = get_tf();
 	return tf->fd;
 }
 
-void
-open_test_files(char **argv, int argc)
+void open_test_files(char **argv, int argc)
 {
 	struct test_file *tf;
 	int i;
@@ -457,8 +444,8 @@
 	for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
 
 		tf->path = argv[i];
-		tf->fd = open(tf->path, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC),
-				0666);
+		tf->fd = open(tf->path, O_RDWR | (lite ? 0 : O_CREAT | O_TRUNC),
+			      0666);
 		if (tf->fd < 0) {
 			prterr(tf->path);
 			exit(91);
@@ -472,8 +459,7 @@
 		prt("fd %d: %s\n", i, tf->path);
 }
 
-void
-close_test_files(void)
+void close_test_files(void)
 {
 	int i;
 	struct test_file *tf;
@@ -486,18 +472,17 @@
 	}
 }
 
-void
-check_size(void)
+void check_size(void)
 {
-	struct stat	statbuf;
-	off_t	size_by_seek;
+	struct stat statbuf;
+	off_t size_by_seek;
 	int fd = get_fd();
 
 	if (fstat(fd, &statbuf)) {
 		prterr("check_size: fstat");
 		statbuf.st_size = -1;
 	}
-	size_by_seek = lseek(fd, (off_t)0, SEEK_END);
+	size_by_seek = lseek(fd, (off_t) 0, SEEK_END);
 	if (file_size != statbuf.st_size || file_size != size_by_seek) {
 		prt("Size error: expected 0x%llx stat 0x%llx seek 0x%llx\n",
 		    (unsigned long long)file_size,
@@ -507,19 +492,18 @@
 	}
 }
 
-void
-check_trunc_hack(void)
+void check_trunc_hack(void)
 {
 	struct stat statbuf;
 	int fd = get_fd();
 
-	ftruncate(fd, (off_t)0);
-	ftruncate(fd, (off_t)100000);
+	ftruncate(fd, (off_t) 0);
+	ftruncate(fd, (off_t) 100000);
 	if (fstat(fd, &statbuf)) {
 		prterr("trunc_hack: fstat");
 		statbuf.st_size = -1;
 	}
-	if (statbuf.st_size != (off_t)100000) {
+	if (statbuf.st_size != (off_t) 100000) {
 		prt("no extend on truncate! not posix!\n");
 		exit(130);
 	}
@@ -529,8 +513,7 @@
 static char *tf_buf = NULL;
 static int max_tf_len = 0;
 
-void
-alloc_tf_buf(void)
+void alloc_tf_buf(void)
 {
 	char dummy = '\0';
 	int highest = num_test_files - 1;
@@ -554,24 +537,23 @@
 	}
 	if (max_tf_len != len - 1) {
 		warn("snprintf() gave %d instead of %d?\n",
-				max_tf_len, len - 1);
+		     max_tf_len, len - 1);
 		exit(1);
 	}
 }
 
-char *
-fill_tf_buf(struct test_file *tf)
+char *fill_tf_buf(struct test_file *tf)
 {
 	if (tf_buf == NULL)
 		alloc_tf_buf();
 
-	sprintf(tf_buf,"%lu ", (unsigned long)(tf - test_files));
+	sprintf(tf_buf, "%lu ", (unsigned long)(tf - test_files));
 	return tf_buf;
 }
 
 void
 output_line(struct test_file *tf, int op, unsigned offset,
-		unsigned size, struct timeval *tv)
+	    unsigned size, struct timeval *tv)
 {
 	char *tf_num = "";
 
@@ -585,25 +567,24 @@
 
 	/* W. */
 	if (!(!quiet && ((progressinterval &&
-			testcalls % progressinterval == 0) ||
-		       (debug &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend)))))))
+			  testcalls % progressinterval == 0) ||
+			 (debug &&
+			  (monitorstart == -1 ||
+			   (offset + size > monitorstart &&
+			    (monitorend == -1 || offset <= monitorend)))))))
 		return;
 
 	if (fd_policy != FD_SINGLE)
 		tf_num = fill_tf_buf(tf);
 
 	prt("%06lu %lu.%06lu %.*s%-10s %#08x %s %#08x\t(0x%x bytes)\n",
-		testcalls, tv->tv_sec, tv->tv_usec, max_tf_len,
-		tf_num, ops[op],
-		offset, op == OP_TRUNCATE ? " to " : "thru",
-		offset + size - 1, size);
+	    testcalls, tv->tv_sec, tv->tv_usec, max_tf_len,
+	    tf_num, ops[op],
+	    offset, op == OP_TRUNCATE ? " to " : "thru",
+	    offset + size - 1, size);
 }
 
-void
-doread(unsigned offset, unsigned size)
+void doread(unsigned offset, unsigned size)
 {
 	struct timeval t;
 	off_t ret;
@@ -633,16 +614,16 @@
 
 	output_line(tf, OP_READ, offset, size, &t);
 
-	ret = lseek(fd, (off_t)offset, SEEK_SET);
-	if (ret == (off_t)-1) {
+	ret = lseek(fd, (off_t) offset, SEEK_SET);
+	if (ret == (off_t) - 1) {
 		prterr("doread: lseek");
 		report_failure(140);
 	}
 	iret = read(fd, temp_buf, size);
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu read done\n", t.tv_sec, t.tv_usec);
 	}
@@ -657,13 +638,12 @@
 	check_buffers(offset, size);
 }
 
-void
-domapread(unsigned offset, unsigned size)
+void domapread(unsigned offset, unsigned size)
 {
 	struct timeval t;
 	unsigned pg_offset;
 	unsigned map_size;
-	char    *p;
+	char *p;
 	struct test_file *tf = get_tf();
 	int fd = tf->fd;
 
@@ -690,25 +670,25 @@
 	output_line(tf, OP_MAPREAD, offset, size, &t);
 
 	pg_offset = offset & page_mask;
-	map_size  = pg_offset + size;
+	map_size = pg_offset + size;
 
 	if ((p = mmap(0, map_size, PROT_READ, MAP_FILE | MAP_SHARED, fd,
-		      (off_t)(offset - pg_offset))) == MAP_FAILED) {
-	        prterr("domapread: mmap");
+		      (off_t) (offset - pg_offset))) == MAP_FAILED) {
+		prterr("domapread: mmap");
 		report_failure(190);
 	}
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu mmap done\n", t.tv_sec, t.tv_usec);
 	}
 	memcpy(temp_buf, p + pg_offset, size);
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu memcpy done\n", t.tv_sec, t.tv_usec);
 	}
@@ -717,9 +697,9 @@
 		report_failure(191);
 	}
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu munmap done\n", t.tv_sec, t.tv_usec);
 	}
@@ -727,8 +707,7 @@
 	check_buffers(offset, size);
 }
 
-void
-gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size)
+void gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size)
 {
 	while (size--) {
 		good_buf[offset] = testcalls % 256;
@@ -738,8 +717,7 @@
 	}
 }
 
-void
-dowrite(unsigned offset, unsigned size)
+void dowrite(unsigned offset, unsigned size)
 {
 	struct timeval t;
 	off_t ret;
@@ -774,16 +752,16 @@
 
 	output_line(tf, OP_WRITE, offset, size, &t);
 
-	ret = lseek(fd, (off_t)offset, SEEK_SET);
-	if (ret == (off_t)-1) {
+	ret = lseek(fd, (off_t) offset, SEEK_SET);
+	if (ret == (off_t) - 1) {
 		prterr("dowrite: lseek");
 		report_failure(150);
 	}
 	iret = write(fd, good_buf + offset, size);
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu write done\n", t.tv_sec, t.tv_usec);
 	}
@@ -797,14 +775,13 @@
 	}
 }
 
-void
-domapwrite(unsigned offset, unsigned size)
+void domapwrite(unsigned offset, unsigned size)
 {
 	struct timeval t;
 	unsigned pg_offset;
 	unsigned map_size;
-	off_t    cur_filesize;
-	char    *p;
+	off_t cur_filesize;
+	char *p;
 	struct test_file *tf = get_tf();
 	int fd = tf->fd;
 
@@ -837,38 +814,41 @@
 	output_line(tf, OP_MAPWRITE, offset, size, &t);
 
 	if (file_size > cur_filesize) {
-	        if (ftruncate(fd, file_size) == -1) {
-		        prterr("domapwrite: ftruncate");
+		if (ftruncate(fd, file_size) == -1) {
+			prterr("domapwrite: ftruncate");
 			exit(201);
 		}
 		if (!quiet && (debug > 1 &&
 			       (monitorstart == -1 ||
 				(offset + size > monitorstart &&
-				 (monitorend == -1 || offset <= monitorend))))) {
+				 (monitorend == -1
+				  || offset <= monitorend))))) {
 			gettimeofday(&t, NULL);
-			prt("       %lu.%06lu truncate done\n", t.tv_sec, t.tv_usec);
-	}
+			prt("       %lu.%06lu truncate done\n", t.tv_sec,
+			    t.tv_usec);
+		}
 	}
 	pg_offset = offset & page_mask;
-	map_size  = pg_offset + size;
+	map_size = pg_offset + size;
 
-	if ((p = mmap(0, map_size, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED,
-		      fd, (off_t)(offset - pg_offset))) == MAP_FAILED) {
-	        prterr("domapwrite: mmap");
+	if ((p =
+	     mmap(0, map_size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED,
+		  fd, (off_t) (offset - pg_offset))) == MAP_FAILED) {
+		prterr("domapwrite: mmap");
 		report_failure(202);
 	}
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu mmap done\n", t.tv_sec, t.tv_usec);
 	}
 	memcpy(p + pg_offset, good_buf + offset, size);
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu memcpy done\n", t.tv_sec, t.tv_usec);
 	}
@@ -877,9 +857,9 @@
 		report_failure(203);
 	}
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu msync done\n", t.tv_sec, t.tv_usec);
 	}
@@ -888,16 +868,15 @@
 		report_failure(204);
 	}
 	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
+		       (monitorstart == -1 ||
+			(offset + size > monitorstart &&
+			 (monitorend == -1 || offset <= monitorend))))) {
 		gettimeofday(&t, NULL);
 		prt("       %lu.%06lu munmap done\n", t.tv_sec, t.tv_usec);
 	}
 }
 
-void
-dotruncate(unsigned size)
+void dotruncate(unsigned size)
 {
 	struct timeval t;
 	int oldsize = file_size;
@@ -923,8 +902,8 @@
 
 	output_line(tf, OP_TRUNCATE, oldsize, size, &t);
 
-	if (ftruncate(fd, (off_t)size) == -1) {
-	        prt("ftruncate1: %x\n", size);
+	if (ftruncate(fd, (off_t) size) == -1) {
+		prt("ftruncate1: %x\n", size);
 		prterr("dotruncate: ftruncate");
 		report_failure(160);
 	}
@@ -934,35 +913,32 @@
 	}
 }
 
-void
-writefileimage()
+void writefileimage()
 {
 	ssize_t iret;
 	int fd = get_fd();
 
-	if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+	if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) - 1) {
 		prterr("writefileimage: lseek");
 		report_failure(171);
 	}
 	iret = write(fd, good_buf, file_size);
-	if ((off_t)iret != file_size) {
+	if ((off_t) iret != file_size) {
 		if (iret == -1)
 			prterr("writefileimage: write");
 		else
 			prt("short write: 0x%lx bytes instead of 0x%llx\n",
-			    (unsigned long)iret,
-			    (unsigned long long)file_size);
+			    (unsigned long)iret, (unsigned long long)file_size);
 		report_failure(172);
 	}
 	if (lite ? 0 : ftruncate(fd, file_size) == -1) {
-	        prt("ftruncate2: %llx\n", (unsigned long long)file_size);
+		prt("ftruncate2: %llx\n", (unsigned long long)file_size);
 		prterr("writefileimage: ftruncate");
 		report_failure(173);
 	}
 }
 
-void
-docloseopen(void)
+void docloseopen(void)
 {
 	struct timeval t;
 	struct test_file *tf = get_tf();
@@ -995,18 +971,17 @@
 	}
 }
 
-void
-test(void)
+void test(void)
 {
-	unsigned long	offset;
-	unsigned long	size = maxoplen;
-	unsigned long	rv = random();
-	unsigned long	op = rv % (3 + !lite + mapped_writes);
+	unsigned long offset;
+	unsigned long size = maxoplen;
+	unsigned long rv = random();
+	unsigned long op = rv % (3 + !lite + mapped_writes);
 
-        /* turn off the map read if necessary */
+	/* turn off the map read if necessary */
 
-        if (op == 2 && !mapped_reads)
-            op = 0;
+	if (op == 2 && !mapped_reads)
+		op = 0;
 
 	if (simulatedopcount > 0 && testcalls == simulatedopcount)
 		writefileimage();
@@ -1020,17 +995,17 @@
 		prt("%lu...\n", testcalls);
 
 	/*
-	 * READ:	op = 0
-	 * WRITE:	op = 1
+	 * READ:        op = 0
+	 * WRITE:       op = 1
 	 * MAPREAD:     op = 2
-	 * TRUNCATE:	op = 3
+	 * TRUNCATE:    op = 3
 	 * MAPWRITE:    op = 3 or 4
 	 */
-	if (lite ? 0 : op == 3 && (style & 1) == 0) /* vanilla truncate? */
+	if (lite ? 0 : op == 3 && (style & 1) == 0)	/* vanilla truncate? */
 		dotruncate(random() % maxfilelen);
 	else {
 		if (randomoplen)
-			size = random() % (maxoplen+1);
+			size = random() % (maxoplen + 1);
 		if (lite ? 0 : op == 3)
 			dotruncate(size);
 		else {
@@ -1063,9 +1038,8 @@
 		docloseopen();
 }
 
-void
-cleanup(sig)
-	int	sig;
+void cleanup(sig)
+int sig;
 {
 	if (sig)
 		prt("signal %d\n", sig);
@@ -1073,48 +1047,46 @@
 	exit(sig);
 }
 
-void
-usage(void)
+void usage(void)
 {
 	fprintf(stdout, "usage: %s",
 		"fsx [-dnqLOW] [-b opnum] [-c Prob] [-l flen] [-m "
-"start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t "
-"truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] "
-"[ -I random|rotate ] fname [additional paths to fname..]\n"
-"	-b opnum: beginning operation number (default 1)\n"
-"	-c P: 1 in P chance of file close+open at each op (default infinity)\n"
-"	-d: debug output for all operations [-d -d = more debugging]\n"
-"	-l flen: the upper bound on file size (default 262144)\n"
-"	-m start:end: monitor (print debug) specified byte range (default 0:infinity)\n"
-"	-n: no verifications of file size\n"
-"	-o oplen: the upper bound on operation size (default 65536)\n"
-"	-p progressinterval: debug output at specified operation interval\n"
-"	-q: quieter operation\n"
-"	-r readbdy: 4096 would make reads page aligned (default 1)\n"
-"	-s style: 1 gives smaller truncates (default 0)\n"
-"	-t truncbdy: 4096 would make truncates page aligned (default 1)\n"
-"	-w writebdy: 4096 would make writes page aligned (default 1)\n"
-"	-D startingop: debug output starting at specified operation\n"
-"	-L: fsxLite - no file creations & no file size changes\n"
-"	-N numops: total # operations to do (default infinity)\n"
-"	-O: use oplen (see -o flag) for every op (default random)\n"
-"	-P: save .fsxlog and .fsxgood files in dirpath (default ./)\n"
-"	-S seed: for random # generator (default 1) 0 gets timestamp\n"
-"	-W: mapped write operations DISabled\n"
-"	-R: read() system calls only (mapped reads disabled)\n"
-"	-I: When multiple paths to the file are given each operation uses\n"
-"	    a different path.  Iterate through them in order with 'rotate'\n"
-"	    or chose then at 'random'.  (defaults to random)\n"
-"	fname: this filename is REQUIRED (no default)\n");
+		"start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t "
+		"truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] "
+		"[ -I random|rotate ] fname [additional paths to fname..]\n"
+		"	-b opnum: beginning operation number (default 1)\n"
+		"	-c P: 1 in P chance of file close+open at each op (default infinity)\n"
+		"	-d: debug output for all operations [-d -d = more debugging]\n"
+		"	-l flen: the upper bound on file size (default 262144)\n"
+		"	-m start:end: monitor (print debug) specified byte range (default 0:infinity)\n"
+		"	-n: no verifications of file size\n"
+		"	-o oplen: the upper bound on operation size (default 65536)\n"
+		"	-p progressinterval: debug output at specified operation interval\n"
+		"	-q: quieter operation\n"
+		"	-r readbdy: 4096 would make reads page aligned (default 1)\n"
+		"	-s style: 1 gives smaller truncates (default 0)\n"
+		"	-t truncbdy: 4096 would make truncates page aligned (default 1)\n"
+		"	-w writebdy: 4096 would make writes page aligned (default 1)\n"
+		"	-D startingop: debug output starting at specified operation\n"
+		"	-L: fsxLite - no file creations & no file size changes\n"
+		"	-N numops: total # operations to do (default infinity)\n"
+		"	-O: use oplen (see -o flag) for every op (default random)\n"
+		"	-P: save .fsxlog and .fsxgood files in dirpath (default ./)\n"
+		"	-S seed: for random # generator (default 1) 0 gets timestamp\n"
+		"	-W: mapped write operations DISabled\n"
+		"	-R: read() system calls only (mapped reads disabled)\n"
+		"	-I: When multiple paths to the file are given each operation uses\n"
+		"	    a different path.  Iterate through them in order with 'rotate'\n"
+		"	    or chose then at 'random'.  (defaults to random)\n"
+		"	fname: this filename is REQUIRED (no default)\n");
 	exit(90);
 }
 
-int
-getnum(char *s, char **e)
+int getnum(char *s, char **e)
 {
 	int ret = -1;
 
-	*e = (char *) 0;
+	*e = (char *)0;
 	ret = strtol(s, e, 0);
 	if (*e)
 		switch (**e) {
@@ -1130,7 +1102,7 @@
 			break;
 		case 'm':
 		case 'M':
-			ret *= 1024*1024;
+			ret *= 1024 * 1024;
 			*e = *e + 1;
 			break;
 		case 'w':
@@ -1142,12 +1114,11 @@
 	return (ret);
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	i, style, ch;
-	char	*endp;
-	int  dirpath = 0;
+	int i, style, ch;
+	char *endp;
+	int dirpath = 0;
 
 	goodfile[0] = 0;
 	logfile[0] = 0;
@@ -1155,18 +1126,17 @@
 	page_size = getpagesize();
 	page_mask = page_size - 1;
 
-	setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
+	setvbuf(stdout, (char *)0, _IOLBF, 0);	/* line buffered stdout */
 
 	while ((ch = getopt(argc, argv,
-				"b:c:dl:m:no:p:qr:s:t:w:D:I:LN:OP:RS:W"))
+			    "b:c:dl:m:no:p:qr:s:t:w:D:I:LN:OP:RS:W"))
 	       != EOF)
 		switch (ch) {
 		case 'b':
 			simulatedopcount = getnum(optarg, &endp);
 			if (!quiet)
 				fprintf(stdout, "Will begin at operation"
-					"%ld\n",
-					simulatedopcount);
+					"%ld\n", simulatedopcount);
 			if (simulatedopcount == 0)
 				usage();
 			simulatedopcount -= 1;
@@ -1198,7 +1168,7 @@
 			if (monitorend < 0)
 				usage();
 			if (monitorend == 0)
-				monitorend = -1; /* aka infinity */
+				monitorend = -1;	/* aka infinity */
 			debug = 1;
 		case 'n':
 			sizechecks = 0;
@@ -1245,7 +1215,7 @@
 			assign_fd_policy(optarg);
 			break;
 		case 'L':
-		        lite = 1;
+			lite = 1;
 			break;
 		case 'N':
 			numops = getnum(optarg, &endp);
@@ -1262,11 +1232,11 @@
 			strcat(logfile, "/");
 			dirpath = 1;
 			break;
-                case 'R':
-                        mapped_reads = 0;
-                        break;
+		case 'R':
+			mapped_reads = 0;
+			break;
 		case 'S':
-                        seed = getnum(optarg, &endp);
+			seed = getnum(optarg, &endp);
 			if (seed == 0)
 				seed = time(0) % 10000;
 			if (!quiet)
@@ -1275,7 +1245,7 @@
 				usage();
 			break;
 		case 'W':
-		        mapped_writes = 0;
+			mapped_writes = 0;
 			if (!quiet)
 				fprintf(stdout, "mapped writes DISABLED\n");
 			break;
@@ -1290,16 +1260,16 @@
 		usage();
 	fname = argv[0];
 
-	signal(SIGHUP,	cleanup);
-	signal(SIGINT,	cleanup);
-	signal(SIGPIPE,	cleanup);
-	signal(SIGALRM,	cleanup);
-	signal(SIGTERM,	cleanup);
-	signal(SIGXCPU,	cleanup);
-	signal(SIGXFSZ,	cleanup);
-	signal(SIGVTALRM,	cleanup);
-	signal(SIGUSR1,	cleanup);
-	signal(SIGUSR2,	cleanup);
+	signal(SIGHUP, cleanup);
+	signal(SIGINT, cleanup);
+	signal(SIGPIPE, cleanup);
+	signal(SIGALRM, cleanup);
+	signal(SIGTERM, cleanup);
+	signal(SIGXCPU, cleanup);
+	signal(SIGXFSZ, cleanup);
+	signal(SIGVTALRM, cleanup);
+	signal(SIGUSR1, cleanup);
+	signal(SIGUSR2, cleanup);
 
 	initstate(seed, state, 256);
 	setstate(state);
@@ -1307,14 +1277,14 @@
 	open_test_files(argv, argc);
 
 	strncat(goodfile, dirpath ? basename(fname) : fname, 256);
-	strcat (goodfile, ".fsxgood");
-	fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	strcat(goodfile, ".fsxgood");
+	fsxgoodfd = open(goodfile, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	if (fsxgoodfd < 0) {
 		prterr(goodfile);
 		exit(92);
 	}
 	strncat(logfile, dirpath ? basename(fname) : fname, 256);
-	strcat (logfile, ".fsxlog");
+	strcat(logfile, ".fsxlog");
 	fsxlogf = fopen(logfile, "w");
 	if (fsxlogf == NULL) {
 		prterr(logfile);
@@ -1323,47 +1293,47 @@
 	if (lite) {
 		off_t ret;
 		int fd = get_fd();
-		file_size = maxfilelen = lseek(fd, (off_t)0, SEEK_END);
-		if (file_size == (off_t)-1) {
+		file_size = maxfilelen = lseek(fd, (off_t) 0, SEEK_END);
+		if (file_size == (off_t) - 1) {
 			prterr(fname);
 			warn("main: lseek eof");
 			exit(94);
 		}
-		ret = lseek(fd, (off_t)0, SEEK_SET);
-		if (ret == (off_t)-1) {
+		ret = lseek(fd, (off_t) 0, SEEK_SET);
+		if (ret == (off_t) - 1) {
 			prterr(fname);
 			warn("main: lseek 0");
 			exit(95);
 		}
 	}
-	original_buf = (char *) malloc(maxfilelen);
+	original_buf = (char *)malloc(maxfilelen);
 	if (original_buf == NULL)
 		exit(96);
 	for (i = 0; i < maxfilelen; i++)
 		original_buf[i] = random() % 256;
 
-	good_buf = (char *) malloc(maxfilelen);
+	good_buf = (char *)malloc(maxfilelen);
 	if (good_buf == NULL)
 		exit(97);
 	memset(good_buf, '\0', maxfilelen);
 
-	temp_buf = (char *) malloc(maxoplen);
+	temp_buf = (char *)malloc(maxoplen);
 	if (temp_buf == NULL)
 		exit(99);
 	memset(temp_buf, '\0', maxoplen);
 
-	if (lite) {	/* zero entire existing file */
+	if (lite) {		/* zero entire existing file */
 		ssize_t written;
 		int fd = get_fd();
 
-		written = write(fd, good_buf, (size_t)maxfilelen);
+		written = write(fd, good_buf, (size_t) maxfilelen);
 		if (written != maxfilelen) {
 			if (written == -1) {
 				prterr(fname);
 				warn("main: error on write");
 			} else
 				warn("main: short write, 0x%x bytes instead"
-					"of 0x%x\n",
+				     "of 0x%x\n",
 				     (unsigned)written, maxfilelen);
 			exit(98);
 		}
diff --git a/testcases/kernel/fs/ftest/ftest01.c b/testcases/kernel/fs/ftest/ftest01.c
index 6eff453..feeac9e 100644
--- a/testcases/kernel/fs/ftest/ftest01.c
+++ b/testcases/kernel/fs/ftest/ftest01.c
@@ -67,7 +67,7 @@
 static void setup(void);
 static void runtest(void);
 static void dotest(int, int, int);
-static void domisc(int, int, char*);
+static void domisc(int, int, char *);
 static void cleanup(void);
 static void term(int sig);
 
@@ -79,18 +79,18 @@
 #define K_2		2048
 #define K_4		4096
 
-static int csize;             /* chunk size */
-static int iterations;        /* # total iterations */
-static int max_size;          /* max file size */
-static int misc_intvl;        /* for doing misc things; 0 ==> no */
-static int nchild;            /* how many children */
-static int fd;                /* file descriptor used by child */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static int max_size;		/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* how many children */
+static int fd;			/* file descriptor used by child */
 static int parent_pid;
 static int pidlist[MAXCHILD];
 static char test_name[2];
 
-static char fuss[MAXPATHLEN];         /* directory to do this in */
-static char homedir[MAXPATHLEN];     /* where we started */
+static char fuss[MAXPATHLEN];	/* directory to do this in */
+static char homedir[MAXPATHLEN];	/* where we started */
 
 static int local_flag;
 
@@ -132,19 +132,19 @@
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "chdir failed");
+		tst_brkm(TBROK | TERRNO, NULL, "chdir failed");
 
 	/*
 	 * Default values for run conditions.
 	 */
 	iterations = 10;
 	nchild = 5;
-	csize = K_2;            /* should run with 1, 2, and 4 K sizes */
+	csize = K_2;		/* should run with 1, 2, and 4 K sizes */
 	max_size = K_1 * K_1;
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_brkm(TBROK|TERRNO, NULL, "sigset failed");
+		tst_brkm(TBROK | TERRNO, NULL, "sigset failed");
 	}
 
 	local_flag = PASSED;
@@ -161,11 +161,11 @@
 
 		test_name[0] = 'a' + i;
 		test_name[1] = '\0';
-		fd = open(test_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 		if (fd < 0)
-			tst_brkm(TBROK|TERRNO, NULL, "Can't create %s/%s",
-				fuss, test_name);
+			tst_brkm(TBROK | TERRNO, NULL, "Can't create %s/%s",
+				 fuss, test_name);
 
 		if ((child = fork()) == 0) {
 			dotest(nchild, i, fd);
@@ -175,7 +175,7 @@
 		close(fd);
 
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -189,7 +189,9 @@
 	while (1) {
 		if ((child = wait(&status)) >= 0) {
 			if (status) {
-				tst_resm(TFAIL, "Test{%d} failed, expected 0 exit", child);
+				tst_resm(TFAIL,
+					 "Test{%d} failed, expected 0 exit",
+					 child);
 				local_flag = FAILED;
 			}
 			++count;
@@ -203,7 +205,8 @@
 	 * Should have collected all children.
 	 */
 	if (count != nwait) {
-		tst_resm(TFAIL, "Wrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "Wrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -216,7 +219,7 @@
 	pid = fork();
 
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, sync, "fork failed");
+		tst_brkm(TBROK | TERRNO, sync, "fork failed");
 		tst_exit();
 	}
 
@@ -228,7 +231,8 @@
 	wait(&status);
 
 	if (status)
-		tst_resm(TINFO, "CAUTION - ftest1, '%s' may not be removed", fuss);
+		tst_resm(TINFO, "CAUTION - ftest1, '%s' may not be removed",
+			 fuss);
 
 	sync();
 }
@@ -242,15 +246,15 @@
  */
 
 #define	NMISC	4
-enum	m_type { m_fsync, m_trunc, m_sync, m_fstat };
-char	*m_str[] = { "fsync", "trunc", "sync", "fstat" };
+enum m_type { m_fsync, m_trunc, m_sync, m_fstat };
+char *m_str[] = { "fsync", "trunc", "sync", "fstat" };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int	file_max;			/* file-max size */
-int	nchunks;
-int	last_trunc = -1;
-int	tr_flag;
-enum	m_type type = m_fsync;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int file_max;			/* file-max size */
+int nchunks;
+int last_trunc = -1;
+int tr_flag;
+enum m_type type = m_fsync;
 
 #define	CHUNK(i)	((i) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -264,13 +268,15 @@
 
 	nchunks = max_size / csize;
 
-	if ((bits = calloc((nchunks+7)/8, 1)) == 0) {
-		tst_resm(TBROK, "Test broken due to inability of malloc(bits).");
+	if ((bits = calloc((nchunks + 7) / 8, 1)) == 0) {
+		tst_resm(TBROK,
+			 "Test broken due to inability of malloc(bits).");
 		tst_exit();
 	}
 
-	if ((hold_bits = calloc((nchunks+7)/8, 1)) == 0) {
-		tst_resm(TBROK, "Test broken due to inability of malloc(hold_bits).");
+	if ((hold_bits = calloc((nchunks + 7) / 8, 1)) == 0) {
+		tst_resm(TBROK,
+			 "Test broken due to inability of malloc(hold_bits).");
 		tst_exit();
 	}
 
@@ -280,33 +286,35 @@
 	}
 
 	if ((val_buf = (calloc(csize, 1))) == 0) {
-		tst_resm(TBROK, "Test broken due to inability of malloc(val_buf).");
+		tst_resm(TBROK,
+			 "Test broken due to inability of malloc(val_buf).");
 		tst_exit();
 	}
 
 	if ((zero_buf = (calloc(csize, 1))) == 0) {
-		tst_resm(TBROK, "Test broken due to inability of malloc(zero_buf).");
+		tst_resm(TBROK,
+			 "Test broken due to inability of malloc(zero_buf).");
 		tst_exit();
 	}
 
 	/*
 	 * No init sectors; allow file to be sparse.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
 	 */
 	srand(getpid());
 
@@ -318,8 +326,8 @@
 			misc_cnt[i] = 0;
 		ftruncate(fd, 0);
 		file_max = 0;
-		memset(bits, 0, (nchunks+7)/8);
-		memset(hold_bits, 0, (nchunks+7)/8);
+		memset(bits, 0, (nchunks + 7) / 8);
+		memset(hold_bits, 0, (nchunks + 7) / 8);
 		memset(val_buf, val, csize);
 		memset(zero_buf, 0, csize);
 		count = 0;
@@ -330,14 +338,16 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL, "Test[%d]: lseek(0) fail at %x, errno = %d.",
-				         me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "Test[%d]: lseek(0) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 
 				tst_exit();
 			}
 			if ((xfr = read(fd, buf, csize)) < 0) {
-				tst_resm(TFAIL, "Test[%d]: read fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "Test[%d]: read fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			/*
@@ -346,69 +356,84 @@
 			 * Else, have.  Verify values.
 			 */
 			if (CHUNK(chunk) >= file_max) {
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "Test[%d]: xfr=%d != %d, zero read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "Test[%d]: xfr=%d != %d, zero read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				if (memcmp(buf, zero_buf, csize)) {
-					tst_resm(TFAIL, "Test[%d] bad verify @ 0x%x for val %d "
-						"count %d xfr %d file_max 0x%x, should be %d.",
-						me, CHUNK(chunk), val, count, xfr, file_max,
-						zero_buf[0]);
-					tst_resm(TFAIL, "Test[%d]: last_trunc = 0x%x.",
-						me, last_trunc);
+					tst_resm(TFAIL,
+						 "Test[%d] bad verify @ 0x%x for val %d "
+						 "count %d xfr %d file_max 0x%x, should be %d.",
+						 me, CHUNK(chunk), val, count,
+						 xfr, file_max, zero_buf[0]);
+					tst_resm(TFAIL,
+						 "Test[%d]: last_trunc = 0x%x.",
+						 me, last_trunc);
 					sync();
 					ft_dumpbuf(buf, csize);
-					ft_dumpbits(bits, (nchunks+7)/8);
-					ft_orbits(hold_bits, bits, (nchunks+7)/8);
+					ft_dumpbits(bits, (nchunks + 7) / 8);
+					ft_orbits(hold_bits, bits,
+						  (nchunks + 7) / 8);
 					tst_resm(TINFO, "Hold ");
-					ft_dumpbits(hold_bits, (nchunks+7)/8);
+					ft_dumpbits(hold_bits,
+						    (nchunks + 7) / 8);
 					tst_exit();
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				++collide;
 				if (memcmp(buf, val_buf, csize)) {
-					tst_resm(TFAIL, "Test[%d] bad verify @ 0x%x for val %d "
-							"count %d xfr %d file_max 0x%x.",
-						me, CHUNK(chunk), val, count, xfr, file_max);
-					tst_resm(TFAIL, "Test[%d]: last_trunc = 0x%x.",
-						me, last_trunc);
+					tst_resm(TFAIL,
+						 "Test[%d] bad verify @ 0x%x for val %d "
+						 "count %d xfr %d file_max 0x%x.",
+						 me, CHUNK(chunk), val, count,
+						 xfr, file_max);
+					tst_resm(TFAIL,
+						 "Test[%d]: last_trunc = 0x%x.",
+						 me, last_trunc);
 					sync();
 					ft_dumpbuf(buf, csize);
-					ft_dumpbits(bits, (nchunks+7)/8);
-					ft_orbits(hold_bits, bits, (nchunks+7)/8);
+					ft_dumpbits(bits, (nchunks + 7) / 8);
+					ft_orbits(hold_bits, bits,
+						  (nchunks + 7) / 8);
 					tst_resm(TINFO, "Hold ");
-					ft_dumpbits(hold_bits, (nchunks+7)/8);
+					ft_dumpbits(hold_bits,
+						    (nchunks + 7) / 8);
 					tst_exit();
 				}
 			}
 			/*
 			 * Write it.
 			 */
-			if (lseek(fd, -xfr, 1) <  0) {
-				tst_resm(TFAIL, "Test[%d]: lseek(1) fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+			if (lseek(fd, -xfr, 1) < 0) {
+				tst_resm(TFAIL,
+					 "Test[%d]: lseek(1) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			if ((xfr = write(fd, val_buf, csize)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "Test[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "Test[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL, "Test[%d]: write fail at %x xfr %d, errno = %d.",
-					me, CHUNK(chunk), xfr, errno);
+				tst_resm(TFAIL,
+					 "Test[%d]: write fail at %x xfr %d, errno = %d.",
+					 me, CHUNK(chunk), xfr, errno);
 				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
@@ -417,7 +442,7 @@
 			 * If hit "misc" interval, do it.
 			 */
 			if (misc_intvl && --whenmisc <= 0) {
-				ft_orbits(hold_bits, bits, (nchunks+7)/8);
+				ft_orbits(hold_bits, bits, (nchunks + 7) / 8);
 				domisc(me, fd, bits);
 				whenmisc = NEXTMISC;
 			}
@@ -431,9 +456,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "Test{%d} val %d done, count = %d, collide = {%d}",
-		//		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "Test{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "Test{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
 		++val;
 	}
 }
@@ -452,7 +477,8 @@
 	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_brkm(TFAIL|TERRNO, NULL, "Test[%d]: fsync failed.", me);
+			tst_brkm(TFAIL | TERRNO, NULL,
+				 "Test[%d]: fsync failed.", me);
 		}
 		break;
 	case m_trunc:
@@ -461,34 +487,35 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_brkm(TFAIL|TERRNO, NULL, "Test[%d]: ftruncate failed @ 0x%x.",
-						me, file_max);
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "Test[%d]: ftruncate failed @ 0x%x.",
+					 me, file_max);
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_brkm(TFAIL|TERRNO, NULL, "Test[%d]: truncate failed @ 0x%x.",
-						me, file_max);
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "Test[%d]: truncate failed @ 0x%x.",
+					 me, file_max);
 			}
 			tr_flag = 1;
 		}
-		for (; chunk%8 != 0; chunk++)
-			bits[chunk/8] &= ~(1<<(chunk%8));
+		for (; chunk % 8 != 0; chunk++)
+			bits[chunk / 8] &= ~(1 << (chunk % 8));
 		for (; chunk < nchunks; chunk += 8)
-			bits[chunk/8] = 0;
+			bits[chunk / 8] = 0;
 		break;
 	case m_sync:
 		sync();
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0)
-			tst_brkm(TFAIL|TERRNO, NULL,
-			    "\tTest[%d]: fstat failed", me);
+			tst_brkm(TFAIL | TERRNO, NULL,
+				 "\tTest[%d]: fstat failed", me);
 		if (sb.st_size != file_max)
 			tst_brkm(TFAIL, NULL,
-			    "\tTest[%d]: fstat() mismatch; st_size=%lu, "
-			    "file_max=%x.",
-			    me, sb.st_size, file_max);
+				 "\tTest[%d]: fstat() mismatch; st_size=%lu, "
+				 "file_max=%x.", me, sb.st_size, file_max);
 		break;
 	}
 
@@ -521,7 +548,7 @@
 	close(fd);
 
 	if (unlink(test_name) == -1)
-		tst_resm(TBROK|TERRNO, "unlink failed");
+		tst_resm(TBROK | TERRNO, "unlink failed");
 
 	tst_exit();
 }
diff --git a/testcases/kernel/fs/ftest/ftest02.c b/testcases/kernel/fs/ftest/ftest02.c
index 1a66437..35cc0d8 100644
--- a/testcases/kernel/fs/ftest/ftest02.c
+++ b/testcases/kernel/fs/ftest/ftest02.c
@@ -72,7 +72,7 @@
 static void unlfile(int, int);
 static void fussdir(int, int);
 static void dotest(int, int);
-static void dowarn(int, char*, char*);
+static void dowarn(int, char *, char *);
 static void term(int sig);
 static void cleanup(void);
 
@@ -119,7 +119,7 @@
 
 	if (!startdir[0]) {
 		if (getcwd(startdir, MAXPATHLEN) == NULL) {
-			tst_resm(TBROK,"getcwd failed");
+			tst_resm(TBROK, "getcwd failed");
 
 		}
 	}
@@ -134,13 +134,13 @@
 	mkdir(dirname, 0755);
 	mkdir(homedir, 0755);
 	if (chdir(dirname) < 0) {
-		tst_resm(TBROK,"\tCan't chdir(%s), error %d.", dirname, errno);
+		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", dirname, errno);
 		cleanup();
 
 	}
 	dirlen = strlen(dirname);
 	if (chdir(homedir) < 0) {
-		tst_resm(TBROK,"\tCan't chdir(%s), error %d.", homedir, errno);
+		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", homedir, errno);
 		cleanup();
 
 	}
@@ -151,7 +151,7 @@
 			exit(0);
 		}
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 		}
 		pidlist[k] = child;
 	}
@@ -164,7 +164,8 @@
 		//tst_resm(TINFO,"Test{%d} exited status = 0x%x", child, status);
 		//tst_resm(TINFO,"status is %d",status);
 		if (status) {
-			tst_resm(TFAIL,"Test{%d} failed, expected 0 exit.", child);
+			tst_resm(TFAIL, "Test{%d} failed, expected 0 exit.",
+				 child);
 			local_flag = FAILED;
 		}
 		++count;
@@ -174,7 +175,8 @@
 	 * Should have collected all children.
 	 */
 	if (count != nchild) {
-		tst_resm(TFAIL,"Wrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "Wrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -198,7 +200,7 @@
 	pid = fork();
 
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 	}
 
 	if (pid == 0) {
@@ -208,13 +210,14 @@
 		wait(&status);
 
 	if (status)
-		tst_resm(TINFO,"CAUTION - ftest02, '%s' may not have been removed.",
-		  homedir);
+		tst_resm(TINFO,
+			 "CAUTION - ftest02, '%s' may not have been removed.",
+			 homedir);
 
 	pid = fork();
 
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 	}
 
 	if (pid == 0) {
@@ -224,8 +227,9 @@
 		wait(&status);
 
 	if (status) {
-		tst_resm(TINFO,"CAUTION - ftest02, '%s' may not have been removed.",
-		  dirname);
+		tst_resm(TINFO,
+			 "CAUTION - ftest02, '%s' may not have been removed.",
+			 dirname);
 	}
 
 	sync();
@@ -242,7 +246,7 @@
  *	Create a file and write something into it.
  */
 
-char	crmsg[] = "Gee, let's write something in the file!\n";
+char crmsg[] = "Gee, let's write something in the file!\n";
 
 static void crfile(int me, int count)
 {
@@ -251,27 +255,27 @@
 
 	ft_mkname(fname, dirname, me, count);
 
-	fd = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	if (fd < 0 && errno == EISDIR) {
 		val = rmdir(fname);
 		warn(val, "rmdir", fname);
-		fd = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	}
 	warn(fd, "creating", fname);
 
 	val = lseek(fd, (rand() % M), 0);
 	warn(val, "lseek", 0);
 
-	val = write(fd, crmsg, sizeof(crmsg)-1);
+	val = write(fd, crmsg, sizeof(crmsg) - 1);
 	warn(val, "write", 0);
 
-	val = lseek(fd, -(sizeof(crmsg)-1), 1);
+	val = lseek(fd, -(sizeof(crmsg) - 1), 1);
 	warn(val, "lseek", 0);
 
-	val = read(fd, buf, sizeof(crmsg)-1);
+	val = read(fd, buf, sizeof(crmsg) - 1);
 	warn(val, "read", 0);
 
-	if (strncmp(crmsg, buf, sizeof(crmsg)-1))
+	if (strncmp(crmsg, buf, sizeof(crmsg) - 1))
 		dowarn(me, "compare", 0);
 
 	val = close(fd);
@@ -284,9 +288,9 @@
  */
 static void unlfile(int me, int count)
 {
-	int	i;
-	int	val;
-	char	fname[MAXPATHLEN];
+	int i;
+	int val;
+	char fname[MAXPATHLEN];
 
 	i = count - 10;
 
@@ -332,7 +336,7 @@
 	warn(val, "chdir", dir);
 
 	crfile(me, count);
-	crfile(me, count+1);
+	crfile(me, count + 1);
 
 	val = chdir("..");
 	warn(val, "chdir", "..");
@@ -340,7 +344,8 @@
 	val = rmdir(dir);
 
 	if (val >= 0) {
-		tst_resm(TFAIL,"Test[%d]: rmdir of non-empty %s succeeds!", me, dir);
+		tst_resm(TFAIL, "Test[%d]: rmdir of non-empty %s succeeds!", me,
+			 dir);
 		tst_exit();
 	}
 
@@ -351,7 +356,7 @@
 	val = unlink(fname);
 	warn(val, "unlink", fname);
 
-	ft_mkname(fname, dirname, me, count+1);
+	ft_mkname(fname, dirname, me, count + 1);
 	val = unlink(fname);
 	warn(val, "unlink", fname);
 
@@ -374,20 +379,16 @@
  */
 #define	THING(p)	{p, "p"}
 
-struct	ino_thing {
-	void	(*it_proc)();
-	char	*it_name;
-}	ino_thing[] = {
-	THING(crfile),
-	THING(unlfile),
-	THING(fussdir),
-	THING(sync),
-};
+struct ino_thing {
+	void (*it_proc) ();
+	char *it_name;
+} ino_thing[] = {
+THING(crfile), THING(unlfile), THING(fussdir), THING(sync),};
 
 #define	NTHING	(sizeof(ino_thing) / sizeof(ino_thing[0]))
 
-int	thing_cnt[NTHING];
-int	thing_last[NTHING];
+int thing_cnt[NTHING];
+int thing_last[NTHING];
 
 static void dotest(int me, int count)
 {
@@ -399,7 +400,7 @@
 
 	for (i = 0; i < count; i++) {
 		thing = (rand() >> 3) % NTHING;
-		(*ino_thing[thing].it_proc)(me, i, ino_thing[thing].it_name);
+		(*ino_thing[thing].it_proc) (me, i, ino_thing[thing].it_name);
 		++thing_cnt[thing];
 	}
 
@@ -410,8 +411,8 @@
 {
 	int err = errno;
 
-	tst_resm(TBROK,"Test[%d]: error %d on %s %s",
-		me, err, m1, (m2 ? m2 : ""));
+	tst_resm(TBROK, "Test[%d]: error %d on %s %s",
+		 me, err, m1, (m2 ? m2 : ""));
 	tst_exit();
 }
 
@@ -440,7 +441,7 @@
 	if (mnt == 1) {
 
 		if (chdir(startdir) < 0)
-			tst_resm(TBROK,"Could not change to %s ", startdir);
+			tst_resm(TBROK, "Could not change to %s ", startdir);
 
 		if (!strcmp(fstyp, "cfs")) {
 
@@ -448,20 +449,25 @@
 
 			if (system(mount_buffer) != 0) {
 
-				tst_resm(TBROK,"Unable to unmount %s from %s ", partition, mntpoint);
+				tst_resm(TBROK, "Unable to unmount %s from %s ",
+					 partition, mntpoint);
 
 				if (umount(partition))
-					tst_resm(TBROK,"Unable to unmount %s from %s ", partition, mntpoint);
+					tst_resm(TBROK,
+						 "Unable to unmount %s from %s ",
+						 partition, mntpoint);
 				else
-					tst_resm(TINFO, "Forced umount for %s, /etc/mtab now dirty", partition);
+					tst_resm(TINFO,
+						 "Forced umount for %s, /etc/mtab now dirty",
+						 partition);
 			}
 
-		} else
-			if (umount(partition))
-				tst_resm(TBROK,"Unable to unmount %s from %s ", partition, mntpoint);
+		} else if (umount(partition))
+			tst_resm(TBROK, "Unable to unmount %s from %s ",
+				 partition, mntpoint);
 
 		if (rmdir(mntpoint) != 0)
-			tst_resm(TBROK,"Unable to rmdir %s ", mntpoint);
+			tst_resm(TBROK, "Unable to rmdir %s ", mntpoint);
 
 	}
 
diff --git a/testcases/kernel/fs/ftest/ftest03.c b/testcases/kernel/fs/ftest/ftest03.c
index d1c62f3..f2cd73b 100644
--- a/testcases/kernel/fs/ftest/ftest03.c
+++ b/testcases/kernel/fs/ftest/ftest03.c
@@ -76,7 +76,7 @@
 static void setup(void);
 static void runtest(void);
 static void dotest(int, int, int);
-static void domisc(int, int, char*);
+static void domisc(int, int, char *);
 static void term(int sig);
 
 #define MAXCHILD	25
@@ -85,32 +85,32 @@
 #define K_4		4096
 #define	MAXIOVCNT	16
 
-static int csize;             /* chunk size */
-static int iterations;        /* # total iterations */
-static int max_size;          /* max file size */
-static int misc_intvl;        /* for doing misc things; 0 ==> no */
-static int nchild;            /* how many children */
-static int fd;                /* file descriptor used by child */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static int max_size;		/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* how many children */
+static int fd;			/* file descriptor used by child */
 static int parent_pid;
 static int pidlist[MAXCHILD];
-static char test_name[2];     /* childs test directory name */
+static char test_name[2];	/* childs test directory name */
 
-static char fuss[MAXPATHLEN];         /* directory to do this in */
-static char homedir[MAXPATHLEN];     /* where we started */
+static char fuss[MAXPATHLEN];	/* directory to do this in */
+static char homedir[MAXPATHLEN];	/* where we started */
 
 static int local_flag;
 
-int main (int ac, char *av[])
+int main(int ac, char *av[])
 {
-        int lc;
-        char *msg;
+	int lc;
+	char *msg;
 
-        /*
-         * parse standard options
-         */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-        }
+	}
 
 	setup();
 
@@ -118,13 +118,13 @@
 
 		local_flag = PASSED;
 
-	 	runtest();
+		runtest();
 
 		if (local_flag == PASSED) {
-                        tst_resm(TPASS, "Test passed.");
-                } else {
-                        tst_resm(TFAIL, "Test failed.");
-                }
+			tst_resm(TPASS, "Test passed.");
+		} else {
+			tst_resm(TFAIL, "Test failed.");
+		}
 
 		tst_rmdir();
 		/* ??? so we are doing only one loop here ??? */
@@ -145,19 +145,20 @@
 	tst_tmpdir();
 
 	if (getcwd(homedir, sizeof(homedir)) == NULL) {
-		tst_brkm(TBROK|TERRNO, NULL, "getcwd() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getcwd() failed");
 	}
 
 	parent_pid = getpid();
 
 	if (!fuss[0])
-		sprintf(fuss, "%s/ftest03.%d", getcwd(wdbuf, sizeof( wdbuf)), getpid());
+		sprintf(fuss, "%s/ftest03.%d", getcwd(wdbuf, sizeof(wdbuf)),
+			getpid());
 
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0) {
-		tst_resm(TBROK,"\tCan't chdir(%s), error %d.", fuss, errno);
-		tst_exit() ;
+		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", fuss, errno);
+		tst_exit();
 	}
 
 	/*
@@ -171,8 +172,8 @@
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
 		perror("sigset failed");
-		tst_resm(TBROK, " sigset failed: signo = 15") ;
-		tst_exit() ;
+		tst_resm(TBROK, " sigset failed: signo = 15");
+		tst_exit();
 	}
 }
 
@@ -188,10 +189,11 @@
 		test_name[0] = 'a' + i;
 		test_name[1] = '\0';
 
-		fd = open(test_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 		if (fd < 0) {
-			tst_resm(TBROK, "\tError %d creating %s/%s.", errno, fuss, test_name);
+			tst_resm(TBROK, "\tError %d creating %s/%s.", errno,
+				 fuss, test_name);
 			tst_exit();
 		}
 
@@ -203,7 +205,7 @@
 		close(fd);
 
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -219,7 +221,9 @@
 		if ((child = wait(&status)) >= 0) {
 			//tst_resm(TINFO, "\tTest{%d} exited status = 0x%x", child, status);
 			if (status) {
-				tst_resm(TFAIL, "\tTest{%d} failed, expected 0 exit.", child);
+				tst_resm(TFAIL,
+					 "\tTest{%d} failed, expected 0 exit.",
+					 child);
 				local_flag = FAILED;
 			}
 			++count;
@@ -233,7 +237,8 @@
 	 * Should have collected all children.
 	 */
 	if (count != nwait) {
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -242,7 +247,7 @@
 	pid = fork();
 
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, sync, "fork failed");
+		tst_brkm(TBROK | TERRNO, sync, "fork failed");
 		tst_exit();
 	}
 
@@ -253,7 +258,8 @@
 		wait(&status);
 
 	if (status) {
-		tst_resm(TINFO, "CAUTION - ftest03, '%s' may not be removed", fuss);
+		tst_resm(TINFO, "CAUTION - ftest03, '%s' may not be removed",
+			 fuss);
 	}
 
 	sync();
@@ -268,17 +274,17 @@
  */
 
 #define	NMISC	4
-enum	m_type { m_fsync, m_trunc, m_fstat };
-char	*m_str[] = {
-		"fsync",   "trunc", "sync", "fstat"
+enum m_type { m_fsync, m_trunc, m_fstat };
+char *m_str[] = {
+	"fsync", "trunc", "sync", "fstat"
 };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int	file_max;			/* file-max size */
-int	nchunks;
-int	last_trunc = -1;
-int	tr_flag;
-enum	m_type type = m_fsync;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int file_max;			/* file-max size */
+int nchunks;
+int last_trunc = -1;
+int tr_flag;
+enum m_type type = m_fsync;
 
 #define	CHUNK(i)	((i) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -290,28 +296,28 @@
 	int chunk, whenmisc, xfr, count, collide, i;
 
 	/* Stuff for the readv call */
-	struct	iovec	r_iovec[MAXIOVCNT];
-	int	r_ioveclen;
+	struct iovec r_iovec[MAXIOVCNT];
+	int r_ioveclen;
 
 	/* Stuff for the writev call */
-	struct	iovec	val_iovec[MAXIOVCNT];
-	struct	iovec	zero_iovec[MAXIOVCNT];
-	int	w_ioveclen;
+	struct iovec val_iovec[MAXIOVCNT];
+	struct iovec zero_iovec[MAXIOVCNT];
+	int w_ioveclen;
 
 	nchunks = max_size / csize;
 	whenmisc = 0;
 
-	if ((bits = malloc((nchunks+7) / 8)) == 0) {
+	if ((bits = malloc((nchunks + 7) / 8)) == 0) {
 		tst_resm(TBROK, "\tmalloc failed");
 		tst_exit();
 	}
 
-	if ((hold_bits = malloc((nchunks+7) / 8)) == 0) {
+	if ((hold_bits = malloc((nchunks + 7) / 8)) == 0) {
 		tst_resm(TBROK, "\tmalloc failed");
 		tst_exit();
 	}
 
-	/*Allocate memory for the iovec buffers and init the iovec arrays*/
+	/*Allocate memory for the iovec buffers and init the iovec arrays */
 	r_ioveclen = w_ioveclen = csize / MAXIOVCNT;
 
 	/* Please note that the above statement implies that csize
@@ -327,8 +333,8 @@
 		/* Allocate unused memory areas between all the buffers to
 		 * make things more diffult for the OS.
 		 */
-		if (malloc((i+1)*8) == NULL) {
-			tst_brkm(TBROK,NULL, "\tmalloc failed");
+		if (malloc((i + 1) * 8) == NULL) {
+			tst_brkm(TBROK, NULL, "\tmalloc failed");
 		}
 
 		if ((val_iovec[i].iov_base = calloc(w_ioveclen, 1)) == 0) {
@@ -338,7 +344,7 @@
 
 		val_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed");
 			tst_exit();
 		}
@@ -350,7 +356,7 @@
 
 		zero_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed");
 			tst_exit();
 		}
@@ -358,22 +364,22 @@
 	/*
 	 * No init sectors; allow file to be sparse.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify = 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify = val.
-	 *		write "val" on it.
-	 *		repeat unitl count = nchunks.
-	 *	++val.
-         */
+	 *      zap bits array
+	 *      loop
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify = 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify = val.
+	 *              write "val" on it.
+	 *              repeat unitl count = nchunks.
+	 *      ++val.
+	 */
 
 	srand(getpid());
 
@@ -385,16 +391,18 @@
 		for (i = 0; i < NMISC; i++)
 			misc_cnt[i] = 0;
 
-		ftruncate(fd,0);
+		ftruncate(fd, 0);
 		file_max = 0;
-		memset(bits, 0, (nchunks+7) / 8);
-		memset(hold_bits, 0, (nchunks+7) / 8);
+		memset(bits, 0, (nchunks + 7) / 8);
+		memset(hold_bits, 0, (nchunks + 7) / 8);
 
 		/* Have to fill the val and zero iov buffers in a different manner
 		 */
 		for (i = 0; i < MAXIOVCNT; i++) {
-			memset(val_iovec[i].iov_base,val,val_iovec[i].iov_len);
-			memset(zero_iovec[i].iov_base,0,zero_iovec[i].iov_len);
+			memset(val_iovec[i].iov_base, val,
+			       val_iovec[i].iov_len);
+			memset(zero_iovec[i].iov_base, 0,
+			       zero_iovec[i].iov_len);
 
 		}
 
@@ -407,13 +415,15 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: readv fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: readv fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			/*
@@ -422,51 +432,70 @@
 			 * Else, have.  Verify values.
 			 */
 			if (CHUNK(chunk) >= file_max) {
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, zero read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, zero read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
-				for (i=0;i<MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, zero_iovec[i].iov_base, r_iovec[i].iov_len)) {
+				for (i = 0; i < MAXIOVCNT; i++) {
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     zero_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
 						tst_resm(TFAIL,
-					  	"\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d file_max 0x%x, should be 0.",
-							me, CHUNK(chunk), val, count, xfr, file_max);
-						tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-							me, last_trunc);
+							 "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d file_max 0x%x, should be 0.",
+							 me, CHUNK(chunk), val,
+							 count, xfr, file_max);
+						tst_resm(TINFO,
+							 "\tTest[%d]: last_trunc = 0x%x.",
+							 me, last_trunc);
 						sync();
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
-						ft_orbits(hold_bits, bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
+						ft_orbits(hold_bits, bits,
+							  (nchunks + 7) / 8);
 						tst_resm(TINFO, "\tHold ");
-						ft_dumpbits(hold_bits, (nchunks+7)/8);
+						ft_dumpbits(hold_bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				++collide;
-				for (i=0; i<MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d file_max 0x%x.",
-							me, CHUNK(chunk), val, count, xfr, file_max);
-						tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-							me, last_trunc);
+				for (i = 0; i < MAXIOVCNT; i++) {
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d file_max 0x%x.",
+							 me, CHUNK(chunk), val,
+							 count, xfr, file_max);
+						tst_resm(TINFO,
+							 "\tTest[%d]: last_trunc = 0x%x.",
+							 me, last_trunc);
 						sync();
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
-						ft_orbits(hold_bits, bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
+						ft_orbits(hold_bits, bits,
+							  (nchunks + 7) / 8);
 						tst_resm(TINFO, "\tHold ");
-						ft_dumpbits(hold_bits, (nchunks+7)/8);
+						ft_dumpbits(hold_bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
@@ -474,19 +503,24 @@
 			/*
 			 * Writev it.
 			 */
-			if (lseek(fd, -xfr, 1) <  0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+			if (lseek(fd, -xfr, 1) < 0) {
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
-			if ((xfr = writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
+			if ((xfr =
+			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "\tTest[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL, "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
-					me, CHUNK(chunk), xfr, errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
+					 me, CHUNK(chunk), xfr, errno);
 				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
@@ -495,7 +529,7 @@
 			 * If hit "misc" interval, do it.
 			 */
 			if (misc_intvl && --whenmisc <= 0) {
-				ft_orbits(hold_bits, bits, (nchunks+7)/8);
+				ft_orbits(hold_bits, bits, (nchunks + 7) / 8);
 				domisc(me, fd, bits);
 				whenmisc = NEXTMISC;
 			}
@@ -510,9 +544,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "\tTest{%d} val %d done, count = %d, collide = {%d}",
-	        //		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
 		++val;
 	}
 }
@@ -528,10 +562,11 @@
 	if (type > m_fstat)
 		type = m_fsync;
 
-	switch(type) {
+	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me, errno);
+			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+				 errno);
 			tst_exit();
 		}
 		break;
@@ -541,30 +576,37 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: ftruncate error %d @ 0x%x.", me, errno, file_max);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: ftruncate error %d @ 0x%x.",
+					 me, errno, file_max);
 				tst_exit();
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: truncate error %d @ 0x%x.", me, errno, file_max);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: truncate error %d @ 0x%x.",
+					 me, errno, file_max);
 				tst_exit();
 			}
 			tr_flag = 1;
 		}
-		for (; chunk%8 != 0; chunk++)
-			bits[chunk/8] &= ~(1<<(chunk%8));
+		for (; chunk % 8 != 0; chunk++)
+			bits[chunk / 8] &= ~(1 << (chunk % 8));
 		for (; chunk < nchunks; chunk += 8)
-			bits[chunk/8] = 0;
+			bits[chunk / 8] = 0;
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me, errno);
+			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me,
+				 errno);
 			tst_exit();
 		}
 		if (sb.st_size != file_max) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() mismatch; st_size=%"PRIx64",file_max=%x.",
-				me, (int64_t)sb.st_size, file_max);
+			tst_resm(TFAIL,
+				 "\tTest[%d]: fstat() mismatch; st_size=%"
+				 PRIx64 ",file_max=%x.", me,
+				 (int64_t) sb.st_size, file_max);
 			tst_exit();
 		}
 		break;
@@ -600,7 +642,7 @@
 
 	if (unlink(test_name))
 		tst_resm(TBROK, "Unlink of '%s' failed, errno = %d.",
-		  test_name, errno);
+			 test_name, errno);
 	else
 		tst_resm(TBROK, "Unlink of '%s' successful.", test_name);
 
diff --git a/testcases/kernel/fs/ftest/ftest04.c b/testcases/kernel/fs/ftest/ftest04.c
index 8774954..be3f149 100644
--- a/testcases/kernel/fs/ftest/ftest04.c
+++ b/testcases/kernel/fs/ftest/ftest04.c
@@ -69,11 +69,11 @@
 #define K_4		4096
 #define	MAXIOVCNT	16
 
-static int csize;              /* chunk size */
-static int iterations;         /* # total iterations */
-static int max_size;           /* max file size */
-static int misc_intvl;         /* for doing misc things; 0 ==> no */
-static int nchild;             /* number of child processes */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static int max_size;		/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* number of child processes */
 static int parent_pid;
 static int pidlist[MAXCHILD];
 
@@ -84,30 +84,30 @@
 int main(int ac, char *av[])
 {
 	int lc;
-        char *msg;
+	char *msg;
 
-        /*
-         * parse standard options
-         */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-	                tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-			tst_exit();
-        }
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); lc++) {
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
-               	runtest();
+		runtest();
 
-              	if (local_flag == PASSED)
-                        tst_resm(TPASS, "Test passed.");
-              	else
-                        tst_resm(TFAIL, "Test failed.");
+		if (local_flag == PASSED)
+			tst_resm(TPASS, "Test passed.");
+		else
+			tst_resm(TFAIL, "Test failed.");
 
 		/* ??? only one loop ??? */
 		tst_rmdir();
-	       	tst_exit();
+		tst_exit();
 	}
 
 	tst_exit();
@@ -125,9 +125,10 @@
 	 */
 	tst_tmpdir();
 	if (!filename[0])
-		sprintf(filename, "%s/ftest04.%d", getcwd(wdbuf, MAXPATHLEN), getpid());
+		sprintf(filename, "%s/ftest04.%d", getcwd(wdbuf, MAXPATHLEN),
+			getpid());
 
-	fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	if (fd < 0) {
 		tst_resm(TBROK, "Error %d creating file %s", errno, filename);
 		tst_exit();
@@ -144,7 +145,7 @@
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_resm(TFAIL,"first sigset failed");
+		tst_resm(TFAIL, "first sigset failed");
 		tst_exit();
 	}
 
@@ -161,7 +162,9 @@
 		if ((child = fork()) == 0) {
 			fd = open(filename, O_RDWR);
 			if (fd < 0) {
-				tst_resm(TBROK, "\tTest[%d]: error %d openning %s.", i, errno, filename);
+				tst_resm(TBROK,
+					 "\tTest[%d]: error %d openning %s.", i,
+					 errno, filename);
 				tst_exit();
 			}
 			dotest(nchild, i, fd);
@@ -169,7 +172,7 @@
 			tst_exit();
 		}
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -184,7 +187,8 @@
 		if (child > 0) {
 			//tst_resm(TINFO, "\tTest{%d} exited status = 0x%x", child, status);
 			if (status) {
-				tst_resm(TFAIL, "\tExpected 0 exit status - failed.");
+				tst_resm(TFAIL,
+					 "\tExpected 0 exit status - failed.");
 				local_flag = FAILED;
 			}
 			++count;
@@ -195,7 +199,8 @@
 	 * Should have collected all children.
 	 */
 	if (count != nwait) {
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -211,12 +216,12 @@
  * When fill sectors, iterate.
  */
 #define	NMISC	2
-enum	m_type { m_fsync, m_sync };
-char	*m_str[] = {"fsync", "sync"};
+enum m_type { m_fsync, m_sync };
+char *m_str[] = { "fsync", "sync" };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int	misc_flag;
-int	nchunks;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int misc_flag;
+int nchunks;
 
 #define	CHUNK(i)	(((i) * testers + me) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -228,18 +233,18 @@
 	int count, collide, chunk, whenmisc, xfr, i;
 
 	/* Stuff for the readv call */
-	struct	iovec	r_iovec[MAXIOVCNT];
-	int	r_ioveclen;
+	struct iovec r_iovec[MAXIOVCNT];
+	int r_ioveclen;
 
 	/* Stuff for the writev call */
-	struct	iovec	val0_iovec[MAXIOVCNT];
-	struct	iovec	val_iovec[MAXIOVCNT];
-	int	w_ioveclen;
+	struct iovec val0_iovec[MAXIOVCNT];
+	struct iovec val_iovec[MAXIOVCNT];
+	int w_ioveclen;
 
 	nchunks = max_size / (testers * csize);
 	whenmisc = 0;
 
-	if ((bits = malloc((nchunks+7)/8)) == NULL) {
+	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
 		tst_resm(TBROK, "\tmalloc failed(bits)");
 		tst_exit();
 	}
@@ -267,7 +272,7 @@
 		/* Allocate unused memory areas between all the buffers to
 		 * make things more diffult for the OS.
 		 */
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed");
 			tst_exit();
 		}
@@ -279,7 +284,7 @@
 
 		val0_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed");
 			tst_exit();
 		}
@@ -291,7 +296,7 @@
 
 		val_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed");
 			tst_exit();
 		}
@@ -300,22 +305,22 @@
 	/*
 	 * No init sectors; file-sys makes 0 to start.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 	val0 = 0;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
 	 */
 	srand(getpid());
 
@@ -325,11 +330,13 @@
 	while (iterations-- > 0) {
 		for (i = 0; i < NMISC; i++)
 			misc_cnt[i] = 0;
-		memset(bits, 0, (nchunks+7)/8);
+		memset(bits, 0, (nchunks + 7) / 8);
 		/* Have to fill the val0 and val iov buffers in a different manner */
 		for (i = 0; i < MAXIOVCNT; i++) {
-			memset(val0_iovec[i].iov_base,val0,val0_iovec[i].iov_len);
-			memset(val_iovec[i].iov_base,val,val_iovec[i].iov_len);
+			memset(val0_iovec[i].iov_base, val0,
+			       val0_iovec[i].iov_len);
+			memset(val_iovec[i].iov_base, val,
+			       val_iovec[i].iov_len);
 
 		}
 		count = 0;
@@ -340,13 +347,15 @@
 			 * Read it.
 			 */
 			if (lseek(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek(0) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: readv fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: readv fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			/*
@@ -355,37 +364,51 @@
 			 * Else, have.  Verify values.
 			 */
 			if (xfr == 0) {
-				bits[chunk/8] |= (1<<(chunk%8));
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+				bits[chunk / 8] |= (1 << (chunk % 8));
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, zero read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, zero read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val0_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d.",
-							me, CHUNK(chunk), val0, count, xfr);
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val0_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d.",
+							 me, CHUNK(chunk), val0,
+							 count, xfr);
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d.",
-							me, CHUNK(chunk), val, count, xfr);
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%x for val %d count %d xfr %d.",
+							 me, CHUNK(chunk), val,
+							 count, xfr);
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
@@ -393,19 +416,24 @@
 			/*
 			 * Write it.
 			 */
-			if (lseek(fd, -xfr, 1) <  0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
-					me, CHUNK(chunk), errno);
+			if (lseek(fd, -xfr, 1) < 0) {
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek(1) fail at %x, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
-			if ((xfr = writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
+			if ((xfr =
+			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "\tTest[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL, "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
-					me, CHUNK(chunk), xfr, errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: writev fail at %x xfr %d, errno = %d.",
+					 me, CHUNK(chunk), xfr, errno);
 				tst_exit();
 			}
 			/*
@@ -425,17 +453,20 @@
 
 		if (count < nchunks) {
 			//tst_resm(TINFO, "\tTest{%d} val %d stopping @ %d, collide = {%d}.",
-			//		me, val, count, collide);
+			//              me, val, count, collide);
 			for (i = 0; i < nchunks; i++) {
-				if ((bits[i/8] & (1<<(i%8))) == 0) {
+				if ((bits[i / 8] & (1 << (i % 8))) == 0) {
 					if (lseek(fd, CHUNK(i), 0) < 0) {
-						tst_resm(TFAIL, "\tTest[%d]: lseek fail at %x, errno = %d.",
-							me, CHUNK(i), errno);
+						tst_resm(TFAIL,
+							 "\tTest[%d]: lseek fail at %x, errno = %d.",
+							 me, CHUNK(i), errno);
 						tst_exit();
 					}
-					if (writev(fd, &val_iovec[0], MAXIOVCNT) != csize) {
-						tst_resm(TFAIL, "\tTest[%d]: writev fail at %x, errno = %d.",
-							me, CHUNK(i), errno);
+					if (writev(fd, &val_iovec[0], MAXIOVCNT)
+					    != csize) {
+						tst_resm(TFAIL,
+							 "\tTest[%d]: writev fail at %x, errno = %d.",
+							 me, CHUNK(i), errno);
 						tst_exit();
 					}
 				}
@@ -445,9 +476,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "\tTest[%d] val %d done, count = %d, collide = %d.",
-		//		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "\t\tTest[%d]: %d %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "\t\tTest[%d]: %d %s's.", me, misc_cnt[i], m_str[i]);
 		val0 = val++;
 	}
 }
diff --git a/testcases/kernel/fs/ftest/ftest05.c b/testcases/kernel/fs/ftest/ftest05.c
index efd20f6..04348a2 100644
--- a/testcases/kernel/fs/ftest/ftest05.c
+++ b/testcases/kernel/fs/ftest/ftest05.c
@@ -71,7 +71,7 @@
 static void setup(void);
 static void runtest();
 static void dotest(int, int, int);
-static void domisc(int, int, char*);
+static void domisc(int, int, char *);
 static void term(int sig);
 static void cleanup(void);
 
@@ -83,18 +83,18 @@
 #define K_2		2048
 #define K_4		4096
 
-static int csize;             /* chunk size */
-static int iterations;        /* # total iterations */
-static off64_t max_size;      /* max file size */
-static int misc_intvl;        /* for doing misc things; 0 ==> no */
-static int nchild;            /* how many children */
-static int fd;                /* file descriptor used by child */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static off64_t max_size;	/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* how many children */
+static int fd;			/* file descriptor used by child */
 static int parent_pid;
 static int pidlist[MAXCHILD];
-static char test_name[2];     /* childs test directory name */
+static char test_name[2];	/* childs test directory name */
 
-static char fuss[MAXPATHLEN];         /* directory to do this in */
-static char homedir[MAXPATHLEN];     /* where we started */
+static char fuss[MAXPATHLEN];	/* directory to do this in */
+static char homedir[MAXPATHLEN];	/* where we started */
 
 static int local_flag;
 
@@ -134,7 +134,7 @@
 	 * Save starting directory.
 	 */
 	tst_tmpdir();
-	getcwd(homedir, sizeof (homedir));
+	getcwd(homedir, sizeof(homedir));
 	parent_pid = getpid();
 
 	if (!fuss[0])
@@ -143,7 +143,7 @@
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "\tCan't chdir(%s)", fuss);
+		tst_brkm(TBROK | TERRNO, NULL, "\tCan't chdir(%s)", fuss);
 	}
 
 	/*
@@ -156,7 +156,8 @@
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_brkm(TBROK|TERRNO, NULL, "sigset (signo = SIGTERM) failed");
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "sigset (signo = SIGTERM) failed");
 	}
 
 	local_flag = PASSED;
@@ -171,11 +172,11 @@
 	for (i = 0; i < nchild; i++) {
 		test_name[0] = 'a' + i;
 		test_name[1] = '\0';
-		fd = open(test_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 		if (fd < 0) {
-			tst_brkm(TBROK|TERRNO, NULL,
-				"\tError creating %s/%s.", fuss, test_name);
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "\tError creating %s/%s.", fuss, test_name);
 		}
 
 		if ((child = fork()) == 0) {
@@ -186,7 +187,7 @@
 		close(fd);
 
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -200,20 +201,22 @@
 	while (1) {
 		if ((child = wait(&status)) >= 0) {
 			if (status != 0) {
-				tst_resm(TFAIL, "\tTest{%d} failed, expected 0 exit.", child);
+				tst_resm(TFAIL,
+					 "\tTest{%d} failed, expected 0 exit.",
+					 child);
 				local_flag = FAILED;
 			}
 			++count;
-		} else
-			if (errno != EINTR)
-					break;
+		} else if (errno != EINTR)
+			break;
 	}
 
 	/*
 	 * Should have collected all children.
 	 */
 	if (count != nwait) {
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -221,7 +224,7 @@
 	pid = fork();
 
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, sync, "fork failed");
+		tst_brkm(TBROK | TERRNO, sync, "fork failed");
 		tst_exit();
 	}
 
@@ -233,7 +236,8 @@
 	wait(&status);
 
 	if (status) {
-		tst_resm(TINFO,"CAUTION - ftest05, '%s' may not be removed", fuss);
+		tst_resm(TINFO, "CAUTION - ftest05, '%s' may not be removed",
+			 fuss);
 	}
 
 	sync();
@@ -248,15 +252,15 @@
  */
 
 #define	NMISC	4
-enum	m_type { m_fsync, m_trunc, m_sync, m_fstat };
-char	*m_str[] = {"fsync", "trunc", "sync", "fstat"};
+enum m_type { m_fsync, m_trunc, m_sync, m_fstat };
+char *m_str[] = { "fsync", "trunc", "sync", "fstat" };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int	file_max;			/* file-max size */
-int	nchunks;
-int	last_trunc = -1;
-int	tr_flag;
-enum	m_type type = m_fsync;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int file_max;			/* file-max size */
+int nchunks;
+int last_trunc = -1;
+int tr_flag;
+enum m_type type = m_fsync;
 
 #define	CHUNK(i)	(((off64_t)i) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -269,12 +273,12 @@
 
 	nchunks = max_size / csize;
 
-	if ((bits = calloc((nchunks+7)/8, 1)) == NULL) {
+	if ((bits = calloc((nchunks + 7) / 8, 1)) == NULL) {
 		perror("\tmalloc (bits)");
 		exit(1);
 	}
 
-	if ((hold_bits = calloc((nchunks+7)/8, 1)) == NULL) {
+	if ((hold_bits = calloc((nchunks + 7) / 8, 1)) == NULL) {
 		perror("\tmalloc (bold_bits)");
 		exit(1);
 	}
@@ -297,32 +301,33 @@
 	/*
 	 * No init sectors; allow file to be sparse.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
 	 */
 
 	srand(getpid());
-	if (misc_intvl) whenmisc = NEXTMISC;
+	if (misc_intvl)
+		whenmisc = NEXTMISC;
 	while (iterations-- > 0) {
 		for (i = 0; i < NMISC; i++)
 			misc_cnt[i] = 0;
 		ftruncate(fd, 0);
 		file_max = 0;
-		memset(bits, 0, (nchunks+7)/8);
-		memset(hold_bits, 0, (nchunks+7)/8);
+		memset(bits, 0, (nchunks + 7) / 8);
+		memset(hold_bits, 0, (nchunks + 7) / 8);
 		memset(val_buf, val, csize);
 		memset(zero_buf, 0, csize);
 		count = 0;
@@ -332,15 +337,15 @@
 			/*
 			 * Read it.
 			 */
-			if (lseek64(fd, CHUNK(chunk), 0) < (off64_t)0) {
-				tst_brkm(TFAIL|TERRNO, NULL,
-					"\tTest[%d]: lseek64(0) fail at %Lx",
-					me, CHUNK(chunk));
+			if (lseek64(fd, CHUNK(chunk), 0) < (off64_t) 0) {
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "\tTest[%d]: lseek64(0) fail at %Lx",
+					 me, CHUNK(chunk));
 			}
 			if ((xfr = read(fd, buf, csize)) < 0) {
-				tst_brkm(TFAIL|TERRNO, NULL,
-					"\tTest[%d]: read fail at %Lx",
-					me, CHUNK(chunk));
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "\tTest[%d]: read fail at %Lx",
+					 me, CHUNK(chunk));
 			}
 			/*
 			 * If chunk beyond EOF just write on it.
@@ -349,67 +354,78 @@
 			 */
 			//printf("%li %d", CHUNK(chunk), file_max );
 			if (CHUNK(chunk) >= file_max) {
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
 					//tst_resm(TINFO, "\tTest[%d]: xfr=%d != %d, zero read.",
-					//	me, xfr, csize);
+					//      me, xfr, csize);
 					tst_exit();
 				}
 				if (memcmp(buf, zero_buf, csize)) {
 					tst_resm(TFAIL,
-					  "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be %d.",
-						me, CHUNK(chunk), val, count, xfr, file_max, zero_buf[0]);
-					tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-						me, last_trunc);
+						 "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be %d.",
+						 me, CHUNK(chunk), val, count,
+						 xfr, file_max, zero_buf[0]);
+					tst_resm(TINFO,
+						 "\tTest[%d]: last_trunc = 0x%x.",
+						 me, last_trunc);
 					sync();
 					ft_dumpbuf(buf, csize);
-					ft_dumpbits(bits, (nchunks+7)/8);
-					ft_orbits(hold_bits, bits, (nchunks+7)/8);
+					ft_dumpbits(bits, (nchunks + 7) / 8);
+					ft_orbits(hold_bits, bits,
+						  (nchunks + 7) / 8);
 					tst_resm(TINFO, "\tHold ");
-					ft_dumpbits(hold_bits, (nchunks+7)/8);
+					ft_dumpbits(hold_bits,
+						    (nchunks + 7) / 8);
 					tst_exit();
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
 					tst_brkm(TFAIL, NULL,
-						"\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 				}
 				++collide;
 				if (memcmp(buf, val_buf, csize)) {
-					tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x.",
-						me, CHUNK(chunk), val, count, xfr, file_max);
-					tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-						me, last_trunc);
+					tst_resm(TFAIL,
+						 "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x.",
+						 me, CHUNK(chunk), val, count,
+						 xfr, file_max);
+					tst_resm(TINFO,
+						 "\tTest[%d]: last_trunc = 0x%x.",
+						 me, last_trunc);
 					sync();
 					ft_dumpbuf(buf, csize);
-					ft_dumpbits(bits, (nchunks+7)/8);
-					ft_orbits(hold_bits, bits, (nchunks+7)/8);
+					ft_dumpbits(bits, (nchunks + 7) / 8);
+					ft_orbits(hold_bits, bits,
+						  (nchunks + 7) / 8);
 					tst_resm(TINFO, "\tHold ");
-					ft_dumpbits(hold_bits, (nchunks+7)/8);
+					ft_dumpbits(hold_bits,
+						    (nchunks + 7) / 8);
 					tst_exit();
 				}
 			}
 			/*
 			 * Write it.
 			 */
-			if (lseek64(fd, -((off64_t)xfr), 1) < (off64_t)0) {
-				tst_brkm(TFAIL|TERRNO, NULL,
-					"\tTest[%d]: lseek64(1) fail at %Lx",
-					me, CHUNK(chunk));
+			if (lseek64(fd, -((off64_t) xfr), 1) < (off64_t) 0) {
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "\tTest[%d]: lseek64(1) fail at %Lx",
+					 me, CHUNK(chunk));
 			}
 			if ((xfr = write(fd, val_buf, csize)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "\tTest[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 				} else {
-					tst_resm(TFAIL|TERRNO,
-						"\tTest[%d]: write fail at %Lx xfr %d",
-						me, CHUNK(chunk), xfr);
+					tst_resm(TFAIL | TERRNO,
+						 "\tTest[%d]: write fail at %Lx xfr %d",
+						 me, CHUNK(chunk), xfr);
 				}
 				tst_exit();
 			}
@@ -419,7 +435,7 @@
 			 * If hit "misc" interval, do it.
 			 */
 			if (misc_intvl && --whenmisc <= 0) {
-				ft_orbits(hold_bits, bits, (nchunks+7)/8);
+				ft_orbits(hold_bits, bits, (nchunks + 7) / 8);
 				domisc(me, fd, bits);
 				whenmisc = NEXTMISC;
 			}
@@ -434,9 +450,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "\tTest{%d} val %d done, count = %d, collide = {%d}",
-		//		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
 		++val;
 	}
 }
@@ -456,7 +472,7 @@
 	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL|TERRNO, "\tTest[%d]: fsync error", me);
+			tst_resm(TFAIL | TERRNO, "\tTest[%d]: fsync error", me);
 		}
 		break;
 	case m_trunc:
@@ -465,32 +481,37 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_brkm(TFAIL|TERRNO, NULL,
-					"\tTest[%d]: ftruncate error @ 0x%x.", me, file_max);
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "\tTest[%d]: ftruncate error @ 0x%x.",
+					 me, file_max);
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_brkm(TFAIL|TERRNO, NULL,
-					"\tTest[%d]: truncate error @ 0x%x.", me, file_max);
+				tst_brkm(TFAIL | TERRNO, NULL,
+					 "\tTest[%d]: truncate error @ 0x%x.",
+					 me, file_max);
 			}
 			tr_flag = 1;
 		}
-		for (; chunk%8 != 0; chunk++)
-			bits[chunk/8] &= ~(1<<(chunk%8));
+		for (; chunk % 8 != 0; chunk++)
+			bits[chunk / 8] &= ~(1 << (chunk % 8));
 		for (; chunk < nchunks; chunk += 8)
-			bits[chunk/8] = 0;
+			bits[chunk / 8] = 0;
 		break;
 	case m_sync:
 		sync();
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0) {
-			tst_brkm(TFAIL|TERRNO, NULL, "\tTest[%d]: fstat() error.", me);
+			tst_brkm(TFAIL | TERRNO, NULL,
+				 "\tTest[%d]: fstat() error.", me);
 		}
 		if (sb.st_size != file_max) {
-			tst_brkm(TFAIL, NULL, "\tTest[%d]: fstat() mismatch; st_size=%"PRIx64",file_max=%x.",
-				me, (int64_t)sb.st_size, file_max);
+			tst_brkm(TFAIL, NULL,
+				 "\tTest[%d]: fstat() mismatch; st_size=%"
+				 PRIx64 ",file_max=%x.", me,
+				 (int64_t) sb.st_size, file_max);
 		}
 		break;
 	}
@@ -513,8 +534,8 @@
 	 * the child processes.  This makes life easy.
 	 */
 	if (parent_pid == getpid()) {
-		for (i=0; i < nchild; i++)
-			if (pidlist[i])		/* avoid embarassment */
+		for (i = 0; i < nchild; i++)
+			if (pidlist[i])	/* avoid embarassment */
 				kill(pidlist[i], SIGTERM);
 		return;
 	}
@@ -525,7 +546,7 @@
 
 	if (unlink(test_name))
 		tst_resm(TBROK, "Unlink of '%s' failed, errno = %d.",
-		  test_name, errno);
+			 test_name, errno);
 	else
 		tst_resm(TINFO, "Unlink of '%s' successful.", test_name);
 
@@ -534,12 +555,12 @@
 
 static void cleanup(void)
 {
-        /*
-         * print timing stats if that option was specified.
-         * print errno log if that option was specified.
-         */
-        TEST_CLEANUP;
+	/*
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
+	TEST_CLEANUP;
 
-        tst_rmdir();
-        tst_exit();
+	tst_rmdir();
+	tst_exit();
 }
diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c
index 7c1ad04..7b380f5 100644
--- a/testcases/kernel/fs/ftest/ftest06.c
+++ b/testcases/kernel/fs/ftest/ftest06.c
@@ -71,7 +71,7 @@
 static void unlfile(int, int);
 static void fussdir(int, int);
 static void dotest(int, int);
-static void dowarn(int, char*, char*);
+static void dowarn(int, char *, char *);
 static void term(int sig);
 static void cleanup(void);
 
@@ -119,7 +119,7 @@
 	nchild = 5;
 
 	if (signal(SIGTERM, term) == SIG_ERR) {
-		tst_resm(TBROK,"first signal failed");
+		tst_resm(TBROK, "first signal failed");
 
 	}
 
@@ -135,26 +135,28 @@
 
 		if (!startdir[0]) {
 			if (getcwd(startdir, MAXPATHLEN) == NULL) {
-				tst_brkm(TFAIL|TERRNO, NULL, "getcwd failed");
+				tst_brkm(TFAIL | TERRNO, NULL, "getcwd failed");
 			}
 		}
 		cwd = startdir;
 
 		snprintf(dirname, ARRAY_SIZE(dirname),
-		         "%s/ftest06.%d", cwd, getpid());
+			 "%s/ftest06.%d", cwd, getpid());
 		snprintf(homedir, ARRAY_SIZE(homedir),
-		         "%s/ftest06h.%d", cwd, getpid());
+			 "%s/ftest06h.%d", cwd, getpid());
 
 		mkdir(dirname, 0755);
 		mkdir(homedir, 0755);
 
 		if (chdir(dirname) < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup, "\tCan't chdir(%s)", dirname);
+			tst_brkm(TFAIL | TERRNO, cleanup, "\tCan't chdir(%s)",
+				 dirname);
 
 		dirlen = strlen(dirname);
 
 		if (chdir(homedir) < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup, "\tCan't chdir(%s)", homedir);
+			tst_brkm(TFAIL | TERRNO, cleanup, "\tCan't chdir(%s)",
+				 homedir);
 
 		/* enter block */
 		for (k = 0; k < nchild; k++) {
@@ -163,7 +165,8 @@
 				tst_exit();
 			}
 			if (child < 0) {
-				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fork failed");
 			}
 			pidlist[k] = child;
 		}
@@ -176,7 +179,9 @@
 			//tst_resm(TINFO,"Test{%d} exited status = 0x%x", child, status);
 			//fprintf(stdout, "status is %d",status);
 			if (status) {
-				tst_resm(TFAIL,"Test{%d} failed, expected 0 exit.", child);
+				tst_resm(TFAIL,
+					 "Test{%d} failed, expected 0 exit.",
+					 child);
 				local_flag = FAILED;
 			}
 			++count;
@@ -186,7 +191,9 @@
 		 * Should have collected all children.
 		 */
 		if (count != nchild) {
-			tst_resm(TFAIL,"Wrong # children waited on, count = %d", count);
+			tst_resm(TFAIL,
+				 "Wrong # children waited on, count = %d",
+				 count);
 			local_flag = FAILED;
 		}
 
@@ -206,11 +213,12 @@
 			}
 
 		if (chdir(startdir) < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup, "Can't chdir(%s)", startdir);
+			tst_brkm(TFAIL | TERRNO, cleanup, "Can't chdir(%s)",
+				 startdir);
 
 		pid = fork();
 		if (pid < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		}
 
 		if (pid == 0) {
@@ -220,12 +228,13 @@
 			wait(&status);
 
 		if (status)
-			tst_resm(TINFO,"CAUTION - ftest06, '%s' may not have been removed.",
-			  homedir);
+			tst_resm(TINFO,
+				 "CAUTION - ftest06, '%s' may not have been removed.",
+				 homedir);
 
 		pid = fork();
 		if (pid < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		}
 		if (pid == 0) {
 			execl("/bin/rm", "rm", "-rf", dirname, NULL);
@@ -233,8 +242,9 @@
 		} else
 			wait(&status);
 		if (status) {
-			tst_resm(TWARN, "CAUTION - ftest06, '%s' may not have been removed.",
-			  dirname);
+			tst_resm(TWARN,
+				 "CAUTION - ftest06, '%s' may not have been removed.",
+				 dirname);
 		}
 
 		sync();
@@ -260,35 +270,35 @@
 
 static void crfile(int me, int count)
 {
-	int	fd;
+	int fd;
 	off64_t seekval;
-	int	val;
-	char	fname[MAXPATHLEN];
-	char	buf[MAXPATHLEN];
+	int val;
+	char fname[MAXPATHLEN];
+	char buf[MAXPATHLEN];
 
 	ft_mkname(fname, dirname, me, count);
 
-	fd = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	if (fd < 0 && errno == EISDIR) {
 		val = rmdir(fname);
 		warn(val, "rmdir", fname);
-		fd = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
 	}
 	warn(fd, "creating", fname);
 
-	seekval = lseek64(fd, (off64_t)(rand() % M), 0);
+	seekval = lseek64(fd, (off64_t) (rand() % M), 0);
 	warn(seekval, "lseek64", 0);
 
-	val = write(fd, crmsg, sizeof(crmsg)-1);
+	val = write(fd, crmsg, sizeof(crmsg) - 1);
 	warn(val, "write", 0);
 
-	seekval = lseek(fd, -((off64_t)sizeof(crmsg)-1), 1);
+	seekval = lseek(fd, -((off64_t) sizeof(crmsg) - 1), 1);
 	warn(seekval, "lseek64", 0);
 
-	val = read(fd, buf, sizeof(crmsg)-1);
+	val = read(fd, buf, sizeof(crmsg) - 1);
 	warn(val, "read", 0);
 
-	if (strncmp(crmsg, buf, sizeof(crmsg)-1))
+	if (strncmp(crmsg, buf, sizeof(crmsg) - 1))
 		dowarn(me, "compare", 0);
 
 	val = close(fd);
@@ -346,7 +356,7 @@
 	warn(val, "chdir", dir);
 
 	crfile(me, count);
-	crfile(me, count+1);
+	crfile(me, count + 1);
 
 	val = chdir("..");
 	warn(val, "chdir", "..");
@@ -354,7 +364,8 @@
 	val = rmdir(dir);
 
 	if (val >= 0) {
-		tst_resm(TFAIL,"Test[%d]: rmdir of non-empty %s succeeds!", me, dir);
+		tst_resm(TFAIL, "Test[%d]: rmdir of non-empty %s succeeds!", me,
+			 dir);
 		tst_exit();
 	}
 
@@ -365,7 +376,7 @@
 	val = unlink(fname);
 	warn(val, "unlink", fname);
 
-	ft_mkname(fname, dirname, me, count+1);
+	ft_mkname(fname, dirname, me, count + 1);
 	val = unlink(fname);
 	warn(val, "unlink", fname);
 
@@ -388,20 +399,16 @@
  */
 #define	THING(p)	{p, "p"}
 
-struct	ino_thing {
-	void	(*it_proc)();
-	char	*it_name;
-}	ino_thing[] = {
-	THING(crfile),
-	THING(unlfile),
-	THING(fussdir),
-	THING(sync),
-};
+struct ino_thing {
+	void (*it_proc) ();
+	char *it_name;
+} ino_thing[] = {
+THING(crfile), THING(unlfile), THING(fussdir), THING(sync),};
 
 #define	NTHING	(sizeof(ino_thing) / sizeof(ino_thing[0]))
 
-int	thing_cnt[NTHING];
-int	thing_last[NTHING];
+int thing_cnt[NTHING];
+int thing_last[NTHING];
 
 static void dotest(int me, int count)
 {
@@ -413,7 +420,7 @@
 
 	for (i = 0; i < count; i++) {
 		thing = (rand() >> 3) % NTHING;
-		(*ino_thing[thing].it_proc)(me, i, ino_thing[thing].it_name);
+		(*ino_thing[thing].it_proc) (me, i, ino_thing[thing].it_name);
 		++thing_cnt[thing];
 	}
 
@@ -424,8 +431,8 @@
 {
 	int err = errno;
 
-	tst_resm(TFAIL,"Test[%d]: error %d on %s %s",
-		me, err, m1, (m2 ? m2 : ""));
+	tst_resm(TFAIL, "Test[%d]: error %d on %s %s",
+		 me, err, m1, (m2 ? m2 : ""));
 	tst_exit();
 }
 
@@ -452,27 +459,31 @@
 
 	if (mnt == 1) {
 		if (chdir(startdir) < 0) {
-			tst_resm(TINFO,"Could not change to %s ", startdir);
+			tst_resm(TINFO, "Could not change to %s ", startdir);
 		}
 		if (!strcmp(fstyp, "cfs")) {
 			sprintf(mount_buffer, "/bin/umount %s", partition);
 			if (system(mount_buffer) != 0) {
-				tst_resm(TINFO,"Unable to unmount %s from %s ", partition, mntpoint);
+				tst_resm(TINFO, "Unable to unmount %s from %s ",
+					 partition, mntpoint);
 				if (umount(partition)) {
-					tst_resm(TINFO,"Unable to unmount %s from %s ", partition, mntpoint);
-				}
-				else {
-					tst_resm(TINFO, "Forced umount for %s, /etc/mtab now dirty", partition );
+					tst_resm(TINFO,
+						 "Unable to unmount %s from %s ",
+						 partition, mntpoint);
+				} else {
+					tst_resm(TINFO,
+						 "Forced umount for %s, /etc/mtab now dirty",
+						 partition);
 				}
 			}
-		}
-		else {
+		} else {
 			if (umount(partition)) {
-				tst_resm(TINFO,"Unable to unmount %s from %s ", partition, mntpoint);
+				tst_resm(TINFO, "Unable to unmount %s from %s ",
+					 partition, mntpoint);
 			}
 		}
 		if (rmdir(mntpoint) != 0) {
-			tst_resm(TINFO,"Unable to rmdir %s ", mntpoint);
+			tst_resm(TINFO, "Unable to rmdir %s ", mntpoint);
 		}
 	}
 	tst_rmdir();
diff --git a/testcases/kernel/fs/ftest/ftest07.c b/testcases/kernel/fs/ftest/ftest07.c
index 825f8fd..d31cfae 100644
--- a/testcases/kernel/fs/ftest/ftest07.c
+++ b/testcases/kernel/fs/ftest/ftest07.c
@@ -88,21 +88,21 @@
 static void setup(void);
 static void runtest(void);
 static void dotest(int, int, int);
-static void domisc(int, int, char*);
+static void domisc(int, int, char *);
 static void term(int sig);
 
-static int csize;             /* chunk size */
-static int iterations;        /* # total iterations */
-static off64_t max_size;      /* max file size */
-static int misc_intvl;        /* for doing misc things; 0 ==> no */
-static int nchild;            /* how many children */
-static int fd;                /* file descriptor used by child */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static off64_t max_size;	/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* how many children */
+static int fd;			/* file descriptor used by child */
 static int parent_pid;
 static int pidlist[MAXCHILD];
-static char test_name[2];     /* childs test directory name */
+static char test_name[2];	/* childs test directory name */
 
-static char fuss[MAXPATHLEN];         /* directory to do this in */
-static char homedir[MAXPATHLEN];     /* where we started */
+static char fuss[MAXPATHLEN];	/* directory to do this in */
+static char homedir[MAXPATHLEN];	/* where we started */
 
 static int local_flag;
 
@@ -114,14 +114,14 @@
 	/*
 	 * parse standard options
 	 */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
 	}
 
 	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); lc++) {
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		local_flag = PASSED;
 
@@ -132,8 +132,8 @@
 		else
 			tst_resm(TFAIL, "Test failed.");
 
-                tst_rmdir();
-                tst_exit();
+		tst_rmdir();
+		tst_exit();
 
 	}
 
@@ -148,21 +148,22 @@
 	 * Make a directory to do this in; ignore error if already exists.
 	 * Save starting directory.
 	 */
-	if ((cwd = getcwd(homedir, sizeof (homedir))) == NULL) {
-		tst_resm(TBROK,"Failed to get corrent directory") ;
+	if ((cwd = getcwd(homedir, sizeof(homedir))) == NULL) {
+		tst_resm(TBROK, "Failed to get corrent directory");
 		tst_exit();
 	}
 
 	parent_pid = getpid();
 	tst_tmpdir();
 	if (!fuss[0])
-		sprintf(fuss, "%s/ftest07.%d", getcwd(wdbuf, sizeof( wdbuf)), getpid());
+		sprintf(fuss, "%s/ftest07.%d", getcwd(wdbuf, sizeof(wdbuf)),
+			getpid());
 
 	mkdir(fuss, 0755);
 
 	if (chdir(fuss) < 0) {
-		tst_resm(TBROK,"\tCan't chdir(%s), error %d.", fuss, errno);
-		tst_exit() ;
+		tst_resm(TBROK, "\tCan't chdir(%s), error %d.", fuss, errno);
+		tst_exit();
 	}
 
 	/*
@@ -176,7 +177,7 @@
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_brkm(TBROK|TERRNO, NULL, "sigset (signo=SIGTERM) failed");
+		tst_brkm(TBROK | TERRNO, NULL, "sigset (signo=SIGTERM) failed");
 	}
 
 }
@@ -191,9 +192,10 @@
 	for (i = 0; i < nchild; i++) {
 		test_name[0] = 'a' + i;
 		test_name[1] = '\0';
-		fd = open(test_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+		fd = open(test_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
 		if (fd < 0) {
-			tst_resm(TBROK, "\tError %d creating %s/%s.", errno, fuss, test_name);
+			tst_resm(TBROK, "\tError %d creating %s/%s.", errno,
+				 fuss, test_name);
 			tst_exit();
 		}
 
@@ -205,7 +207,7 @@
 		close(fd);
 
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -220,7 +222,9 @@
 		if ((child = wait(&status)) >= 0) {
 			//tst_resm(TINFO, "\tTest{%d} exited status = 0x%x", child, status);
 			if (status) {
-				tst_resm(TFAIL, "\tTest{%d} failed, expected 0 exit.", child);
+				tst_resm(TFAIL,
+					 "\tTest{%d} failed, expected 0 exit.",
+					 child);
 				local_flag = FAILED;
 			}
 			++count;
@@ -235,7 +239,8 @@
 	 */
 
 	if (count != nwait) {
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -243,16 +248,17 @@
 
 	pid = fork();
 	if (pid < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+		tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 	}
 
 	if (pid == 0) {
 		execl("/bin/rm", "rm", "-rf", fuss, NULL);
-			exit(1);
-		} else
-			wait(&status);
+		exit(1);
+	} else
+		wait(&status);
 	if (status) {
-		tst_resm(TINFO, "CAUTION - ftest07, '%s' may not be removed", fuss);
+		tst_resm(TINFO, "CAUTION - ftest07, '%s' may not be removed",
+			 fuss);
 	}
 
 	sync();
@@ -267,15 +273,15 @@
  */
 
 #define	NMISC	4
-enum	m_type { m_fsync, m_trunc, m_sync, m_fstat };
-char	*m_str[] = {"fsync",   "trunc", "sync", "fstat"};
+enum m_type { m_fsync, m_trunc, m_sync, m_fstat };
+char *m_str[] = { "fsync", "trunc", "sync", "fstat" };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int 	file_max;			/* file-max size */
-int	nchunks;
-int	last_trunc = -1;
-int	tr_flag;
-enum	m_type type = m_fsync;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int file_max;			/* file-max size */
+int nchunks;
+int last_trunc = -1;
+int tr_flag;
+enum m_type type = m_fsync;
 
 #define	CHUNK(i)	(((off64_t)i) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -287,23 +293,23 @@
 	int count, collide, chunk, whenmisc, xfr, i;
 
 	/* Stuff for the readv call */
-	struct	iovec	r_iovec[MAXIOVCNT];
-	int	r_ioveclen;
+	struct iovec r_iovec[MAXIOVCNT];
+	int r_ioveclen;
 
 	/* Stuff for the writev call */
-	struct	iovec	val_iovec[MAXIOVCNT];
+	struct iovec val_iovec[MAXIOVCNT];
 
-	struct	iovec	zero_iovec[MAXIOVCNT];
-	int	w_ioveclen;
+	struct iovec zero_iovec[MAXIOVCNT];
+	int w_ioveclen;
 
 	nchunks = max_size / csize;
 	whenmisc = 0;
 
-	if ((bits = malloc((nchunks+7) / 8)) == NULL) {
+	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
 		tst_resm(TBROK, "\tmalloc failed(bits)");
 		tst_exit();
 	}
-	if ((hold_bits = malloc((nchunks+7) / 8)) == NULL) {
+	if ((hold_bits = malloc((nchunks + 7) / 8)) == NULL) {
 		tst_resm(TBROK, "\tmalloc failed(hlod_bits)");
 		tst_exit();
 	}
@@ -312,9 +318,9 @@
 	 */
 	r_ioveclen = w_ioveclen = csize / MAXIOVCNT;
 
-		/* Please note that the above statement implies that csize
-		 * be evenly divisible by MAXIOVCNT.
-		 */
+	/* Please note that the above statement implies that csize
+	 * be evenly divisible by MAXIOVCNT.
+	 */
 
 	for (i = 0; i < MAXIOVCNT; i++) {
 		if ((r_iovec[i].iov_base = calloc(r_ioveclen, 1)) == NULL) {
@@ -327,7 +333,7 @@
 		 * make things more diffult for the OS.
 		 */
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
 			tst_exit();
 		}
@@ -337,7 +343,7 @@
 		}
 		val_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
 			tst_exit();
 		}
@@ -347,7 +353,7 @@
 		}
 		zero_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
 			tst_exit();
 		}
@@ -355,40 +361,42 @@
 	/*
 	 * No init sectors; allow file to be sparse.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify = 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify = val.
-	 *		write "val" on it.
-	 *		repeat unitl count = nchunks.
-	 *	++val.
-         */
+	 *      zap bits array
+	 *      loop
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify = 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify = val.
+	 *              write "val" on it.
+	 *              repeat unitl count = nchunks.
+	 *      ++val.
+	 */
 
-	 srand(getpid());
-	 if (misc_intvl)
-	 	whenmisc = NEXTMISC;
+	srand(getpid());
+	if (misc_intvl)
+		whenmisc = NEXTMISC;
 
-	 while (iterations-- > 0) {
+	while (iterations-- > 0) {
 		for (i = 0; i < NMISC; i++)
 			misc_cnt[i] = 0;
-		ftruncate(fd,0);
+		ftruncate(fd, 0);
 		file_max = 0;
-		memset(bits, 0, (nchunks+7) / 8);
-		memset(hold_bits, 0, (nchunks+7) / 8);
+		memset(bits, 0, (nchunks + 7) / 8);
+		memset(hold_bits, 0, (nchunks + 7) / 8);
 
 		/* Have to fill the val and zero iov buffers in a different manner
 		 */
 		for (i = 0; i < MAXIOVCNT; i++) {
-			memset(val_iovec[i].iov_base,val,val_iovec[i].iov_len);
-			memset(zero_iovec[i].iov_base,0,zero_iovec[i].iov_len);
+			memset(val_iovec[i].iov_base, val,
+			       val_iovec[i].iov_len);
+			memset(zero_iovec[i].iov_base, 0,
+			       zero_iovec[i].iov_len);
 
 		}
 		count = 0;
@@ -399,13 +407,15 @@
 			 * Read it.
 			 */
 			if (lseek64(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek64(0) fail at %Lx, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek64(0) fail at %Lx, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: readv fail at %Lx, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: readv fail at %Lx, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
 			/*
@@ -414,51 +424,70 @@
 			 * Else, have.  Verify values.
 			 */
 			if (CHUNK(chunk) >= file_max) {
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, zero read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, zero read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, zero_iovec[i].iov_base, r_iovec[i].iov_len)) {
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     zero_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
 						tst_resm(TFAIL,
-					  	"\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be 0.",
-							me, CHUNK(chunk), val, count, xfr, file_max);
-						tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-							me, last_trunc);
+							 "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x, should be 0.",
+							 me, CHUNK(chunk), val,
+							 count, xfr, file_max);
+						tst_resm(TINFO,
+							 "\tTest[%d]: last_trunc = 0x%x.",
+							 me, last_trunc);
 						sync();
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
-						ft_orbits(hold_bits, bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
+						ft_orbits(hold_bits, bits,
+							  (nchunks + 7) / 8);
 						tst_resm(TINFO, "\tHold ");
-						ft_dumpbits(hold_bits, (nchunks+7)/8);
+						ft_dumpbits(hold_bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x.",
-							me, CHUNK(chunk), val, count, xfr, file_max);
-						tst_resm(TINFO, "\tTest[%d]: last_trunc = 0x%x.",
-							me, last_trunc);
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%Lx for val %d count %d xfr %d file_max 0x%x.",
+							 me, CHUNK(chunk), val,
+							 count, xfr, file_max);
+						tst_resm(TINFO,
+							 "\tTest[%d]: last_trunc = 0x%x.",
+							 me, last_trunc);
 						sync();
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
-						ft_orbits(hold_bits, bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
+						ft_orbits(hold_bits, bits,
+							  (nchunks + 7) / 8);
 						tst_resm(TINFO, "\tHold ");
-						ft_dumpbits(hold_bits, (nchunks+7)/8);
+						ft_dumpbits(hold_bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
@@ -466,19 +495,24 @@
 			/*
 			 * Writev it.
 			 */
-			if (lseek64(fd, -((off64_t)xfr), 1) <  0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek64(1) fail at %Lx, errno = %d.",
-					me, CHUNK(chunk), errno);
+			if (lseek64(fd, -((off64_t) xfr), 1) < 0) {
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek64(1) fail at %Lx, errno = %d.",
+					 me, CHUNK(chunk), errno);
 				tst_exit();
 			}
-			if ((xfr = writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
+			if ((xfr =
+			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "\tTest[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL, "\tTest[%d]: writev fail at %Lx xfr %d, errno = %d.",
-					me, CHUNK(chunk), xfr, errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: writev fail at %Lx xfr %d, errno = %d.",
+					 me, CHUNK(chunk), xfr, errno);
 				tst_exit();
 			}
 			if (CHUNK(chunk) + csize > file_max)
@@ -487,7 +521,7 @@
 			 * If hit "misc" interval, do it.
 			 */
 			if (misc_intvl && --whenmisc <= 0) {
-				ft_orbits(hold_bits, bits, (nchunks+7)/8);
+				ft_orbits(hold_bits, bits, (nchunks + 7) / 8);
 				domisc(me, fd, bits);
 				whenmisc = NEXTMISC;
 			}
@@ -501,9 +535,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "\tTest{%d} val %d done, count = %d, collide = {%d}",
-		//		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "\t\tTest{%d}: {%d} %s's.", me, misc_cnt[i], m_str[i]);
 		++val;
 	}
 }
@@ -519,10 +553,11 @@
 
 	if (type > m_fstat)
 		type = m_fsync;
-	switch(type) {
+	switch (type) {
 	case m_fsync:
 		if (fsync(fd) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me, errno);
+			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+				 errno);
 			tst_exit();
 		}
 		break;
@@ -532,33 +567,40 @@
 		last_trunc = file_max;
 		if (tr_flag) {
 			if (ftruncate(fd, file_max) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: ftruncate error %d @ 0x%x.", me, errno, file_max);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: ftruncate error %d @ 0x%x.",
+					 me, errno, file_max);
 				tst_exit();
 			}
 			tr_flag = 0;
 		} else {
 			if (truncate(test_name, file_max) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: truncate error %d @ 0x%x.", me, errno, file_max);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: truncate error %d @ 0x%x.",
+					 me, errno, file_max);
 				tst_exit();
 			}
 			tr_flag = 1;
 		}
-		for (; chunk%8 != 0; chunk++)
-			bits[chunk/8] &= ~(1<<(chunk%8));
+		for (; chunk % 8 != 0; chunk++)
+			bits[chunk / 8] &= ~(1 << (chunk % 8));
 		for (; chunk < nchunks; chunk += 8)
-			bits[chunk/8] = 0;
+			bits[chunk / 8] = 0;
 		break;
 	case m_sync:
 		sync();
 		break;
 	case m_fstat:
 		if (fstat(fd, &sb) < 0) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me, errno);
+			tst_resm(TFAIL, "\tTest[%d]: fstat() error %d.", me,
+				 errno);
 			tst_exit();
 		}
 		if (sb.st_size != file_max) {
-			tst_resm(TFAIL, "\tTest[%d]: fstat() mismatch; st_size=%"PRIx64",file_max=%x.",
-				me, (int64_t)sb.st_size, file_max);
+			tst_resm(TFAIL,
+				 "\tTest[%d]: fstat() mismatch; st_size=%"
+				 PRIx64 ",file_max=%x.", me,
+				 (int64_t) sb.st_size, file_max);
 			tst_exit();
 		}
 		break;
@@ -583,7 +625,7 @@
 	 * the child processes.  This makes life easy.
 	 */
 	if (parent_pid == getpid()) {
-		for (i=0; i < nchild; i++)
+		for (i = 0; i < nchild; i++)
 			if (pidlist[i])
 				kill(pidlist[i], SIGTERM);
 		return;
@@ -594,7 +636,7 @@
 	close(fd);
 	if (unlink(test_name))
 		tst_resm(TBROK, "Unlink of '%s' failed, errno = %d.",
-		  test_name, errno);
+			 test_name, errno);
 	else
 		tst_resm(TINFO, "Unlink of '%s' successful.", test_name);
 
diff --git a/testcases/kernel/fs/ftest/ftest08.c b/testcases/kernel/fs/ftest/ftest08.c
index d586f3b..00c292e 100644
--- a/testcases/kernel/fs/ftest/ftest08.c
+++ b/testcases/kernel/fs/ftest/ftest08.c
@@ -77,29 +77,29 @@
 static void term(int sig);
 static void cleanup(void);
 
-static int csize;             /* chunk size */
-static int iterations;        /* # total iterations */
-static off64_t max_size;      /* max file size */
-static int misc_intvl;        /* for doing misc things; 0 ==> no */
-static int nchild;            /* number of child processes */
+static int csize;		/* chunk size */
+static int iterations;		/* # total iterations */
+static off64_t max_size;	/* max file size */
+static int misc_intvl;		/* for doing misc things; 0 ==> no */
+static int nchild;		/* number of child processes */
 static int parent_pid;
 static int pidlist[MAXCHILD];
 
-static char	filename[MAXPATHLEN];
-static int	local_flag;
+static char filename[MAXPATHLEN];
+static int local_flag;
 
 int main(int ac, char *av[])
 {
-        int lc;
-        char *msg;
+	int lc;
+	char *msg;
 
-        /*
-         * parse standard options
-         */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-                tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
-                tst_exit();
-        }
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
@@ -129,9 +129,10 @@
 	 * Make a filename for the test.
 	 */
 	if (!filename[0])
-		sprintf(filename, "%s/ftest08.%d", getcwd(wdbuf, MAXPATHLEN), getpid());
+		sprintf(filename, "%s/ftest08.%d", getcwd(wdbuf, MAXPATHLEN),
+			getpid());
 
-	fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
+	fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
 
 	if (fd < 0) {
 		tst_resm(TBROK, "Error %d creating file %s", errno, filename);
@@ -150,7 +151,7 @@
 	misc_intvl = 10;
 
 	if (sigset(SIGTERM, term) == SIG_ERR) {
-		tst_brkm(TBROK|TERRNO, NULL, "first sigset failed");
+		tst_brkm(TBROK | TERRNO, NULL, "first sigset failed");
 	}
 
 }
@@ -166,7 +167,9 @@
 		if ((child = fork()) == 0) {
 			fd = open(filename, O_RDWR);
 			if (fd < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: error %d openning %s.", i, errno, filename);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: error %d openning %s.", i,
+					 errno, filename);
 				tst_exit();
 			}
 			dotest(nchild, i, fd);
@@ -175,7 +178,7 @@
 		}
 
 		if (child < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		} else {
 			pidlist[i] = child;
 			nwait++;
@@ -190,7 +193,8 @@
 		if (child > 0) {
 			//tst_resm(TINFO, "\tTest{%d} exited status = 0x%x", child, status);
 			if (status) {
-				tst_resm(TFAIL, "\tExpected 0 exit status - failed.");
+				tst_resm(TFAIL,
+					 "\tExpected 0 exit status - failed.");
 				local_flag = FAILED;
 			}
 			++count;
@@ -201,7 +205,8 @@
 	 * Should have collected all children.
 	 */
 	if (count != nwait) {
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d", count);
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -217,12 +222,12 @@
  * When fill sectors, iterate.
  */
 #define	NMISC	2
-enum	m_type { m_fsync, m_sync };
-char	*m_str[] = {"fsync", "sync"};
+enum m_type { m_fsync, m_sync };
+char *m_str[] = { "fsync", "sync" };
 
-int	misc_cnt[NMISC];		/* counts # of each kind of misc */
-int	misc_flag;
-int	nchunks;
+int misc_cnt[NMISC];		/* counts # of each kind of misc */
+int misc_flag;
+int nchunks;
 
 #define	CHUNK(i)	((((off64_t)i) * testers + me) * csize)
 #define	NEXTMISC	((rand() % misc_intvl) + 5)
@@ -234,18 +239,18 @@
 	int count, collide, chunk, whenmisc, xfr, i;
 
 	/* Stuff for the readv call */
-	struct	iovec	r_iovec[MAXIOVCNT];
-	int	r_ioveclen;
+	struct iovec r_iovec[MAXIOVCNT];
+	int r_ioveclen;
 
 	/* Stuff for the writev call */
-	struct	iovec	val0_iovec[MAXIOVCNT];
-	struct	iovec	val_iovec[MAXIOVCNT];
-	int	w_ioveclen;
+	struct iovec val0_iovec[MAXIOVCNT];
+	struct iovec val_iovec[MAXIOVCNT];
+	int w_ioveclen;
 
 	nchunks = max_size / (testers * csize);
 	whenmisc = 0;
 
-	if ((bits = malloc((nchunks+7)/8)) == NULL) {
+	if ((bits = malloc((nchunks + 7) / 8)) == NULL) {
 		tst_resm(TBROK, "\tmalloc failed(bits)");
 		tst_exit();
 	}
@@ -271,7 +276,7 @@
 		/* Allocate unused memory areas between all the buffers to
 		 * make things more diffult for the OS.
 		 */
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
 			tst_exit();
 		}
@@ -283,7 +288,7 @@
 
 		val0_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed((i+1)*8)");
 			tst_exit();
 		}
@@ -294,7 +299,7 @@
 		}
 		val_iovec[i].iov_len = w_ioveclen;
 
-		if (malloc((i+1)*8) == NULL) {
+		if (malloc((i + 1) * 8) == NULL) {
 			tst_resm(TBROK, "\tmalloc failed(((i+1)*8)");
 			tst_exit();
 		}
@@ -303,22 +308,22 @@
 	/*
 	 * No init sectors; file-sys makes 0 to start.
 	 */
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 	val0 = 0;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk, read it.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk, read it.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
 	 */
 	srand(getpid());
 
@@ -328,12 +333,14 @@
 	while (iterations-- > 0) {
 		for (i = 0; i < NMISC; i++)
 			misc_cnt[i] = 0;
-		memset(bits, 0, (nchunks+7)/8);
+		memset(bits, 0, (nchunks + 7) / 8);
 		/* Have to fill the val0 and val iov buffers in a different manner
 		 */
 		for (i = 0; i < MAXIOVCNT; i++) {
-			memset(val0_iovec[i].iov_base,val0,val0_iovec[i].iov_len);
-			memset(val_iovec[i].iov_base,val,val_iovec[i].iov_len);
+			memset(val0_iovec[i].iov_base, val0,
+			       val0_iovec[i].iov_len);
+			memset(val_iovec[i].iov_base, val,
+			       val_iovec[i].iov_len);
 
 		}
 
@@ -346,13 +353,17 @@
 			 * Read it.
 			 */
 			if (lseek64(fd, CHUNK(chunk), 0) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek64(0) fail at %"PRIx64"x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek64(0) fail at %"
+					 PRIx64 "x, errno = %d.", me,
+					 CHUNK(chunk), errno);
 				tst_exit();
 			}
 			if ((xfr = readv(fd, &r_iovec[0], MAXIOVCNT)) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: readv fail at %"PRIx64"x, errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: readv fail at %" PRIx64
+					 "x, errno = %d.", me, CHUNK(chunk),
+					 errno);
 				tst_exit();
 			}
 			/*
@@ -361,37 +372,55 @@
 			 * Else, have.  Verify values.
 			 */
 			if (xfr == 0) {
-				bits[chunk/8] |= (1<<(chunk%8));
-			} else if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+				bits[chunk / 8] |= (1 << (chunk % 8));
+			} else if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, zero read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, zero read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val0_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%"PRIx64" for val %d count %d xfr %d.",
-							me, CHUNK(chunk), val0, count, xfr);
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val0_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%"
+							 PRIx64
+							 " for val %d count %d xfr %d.",
+							 me, CHUNK(chunk), val0,
+							 count, xfr);
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				if (xfr != csize) {
-					tst_resm(TFAIL, "\tTest[%d]: xfr=%d != %d, val read.",
-						me, xfr, csize);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: xfr=%d != %d, val read.",
+						 me, xfr, csize);
 					tst_exit();
 				}
 				++collide;
 				for (i = 0; i < MAXIOVCNT; i++) {
-					if (memcmp(r_iovec[i].iov_base, val_iovec[i].iov_base, r_iovec[i].iov_len)) {
-						tst_resm(TFAIL, "\tTest[%d] bad verify @ 0x%"PRIx64" for val %d count %d xfr %d.",
-							me, CHUNK(chunk), val, count, xfr);
+					if (memcmp
+					    (r_iovec[i].iov_base,
+					     val_iovec[i].iov_base,
+					     r_iovec[i].iov_len)) {
+						tst_resm(TFAIL,
+							 "\tTest[%d] bad verify @ 0x%"
+							 PRIx64
+							 " for val %d count %d xfr %d.",
+							 me, CHUNK(chunk), val,
+							 count, xfr);
 						ft_dumpiov(&r_iovec[i]);
-						ft_dumpbits(bits, (nchunks+7)/8);
+						ft_dumpbits(bits,
+							    (nchunks + 7) / 8);
 						tst_exit();
 					}
 				}
@@ -400,18 +429,25 @@
 			 * Write it.
 			 */
 			if (lseek64(fd, -xfr, 1) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: lseek64(1) fail at %"PRIx64", errno = %d.",
-					me, CHUNK(chunk), errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: lseek64(1) fail at %"
+					 PRIx64 ", errno = %d.", me,
+					 CHUNK(chunk), errno);
 				tst_exit();
 			}
-			if ((xfr = writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
+			if ((xfr =
+			     writev(fd, &val_iovec[0], MAXIOVCNT)) < csize) {
 				if (errno == ENOSPC) {
-					tst_resm(TFAIL, "\tTest[%d]: no space, exiting.", me);
+					tst_resm(TFAIL,
+						 "\tTest[%d]: no space, exiting.",
+						 me);
 					fsync(fd);
 					tst_exit();
 				}
-				tst_resm(TFAIL, "\tTest[%d]: writev fail at %"PRIx64"x xfr %d, errno = %d.",
-					me, CHUNK(chunk), xfr, errno);
+				tst_resm(TFAIL,
+					 "\tTest[%d]: writev fail at %" PRIx64
+					 "x xfr %d, errno = %d.", me,
+					 CHUNK(chunk), xfr, errno);
 				tst_exit();
 			}
 			/*
@@ -431,17 +467,25 @@
 
 		if (count < nchunks) {
 			//tst_resm(TINFO, "\tTest{%d} val %d stopping @ %d, collide = {%d}.",
-			//		me, val, count, collide);
+			//              me, val, count, collide);
 			for (i = 0; i < nchunks; i++) {
-				if ((bits[i/8] & (1<<(i%8))) == 0) {
-					if (lseek64(fd, CHUNK(i), 0) < (off64_t)0) {
-						tst_resm(TFAIL, "\tTest[%d]: lseek64 fail at %"PRIx64"x, errno = %d.",
-							me, CHUNK(i), errno);
+				if ((bits[i / 8] & (1 << (i % 8))) == 0) {
+					if (lseek64(fd, CHUNK(i), 0) <
+					    (off64_t) 0) {
+						tst_resm(TFAIL,
+							 "\tTest[%d]: lseek64 fail at %"
+							 PRIx64
+							 "x, errno = %d.", me,
+							 CHUNK(i), errno);
 						tst_exit();
 					}
-					if (writev(fd, &val_iovec[0], MAXIOVCNT) != csize) {
-						tst_resm(TFAIL, "\tTest[%d]: writev fail at %"PRIx64"x, errno = %d.",
-							me, CHUNK(i), errno);
+					if (writev(fd, &val_iovec[0], MAXIOVCNT)
+					    != csize) {
+						tst_resm(TFAIL,
+							 "\tTest[%d]: writev fail at %"
+							 PRIx64
+							 "x, errno = %d.", me,
+							 CHUNK(i), errno);
 						tst_exit();
 					}
 				}
@@ -451,9 +495,9 @@
 		fsync(fd);
 		++misc_cnt[m_fsync];
 		//tst_resm(TINFO, "\tTest[%d] val %d done, count = %d, collide = %d.",
-		//		me, val, count, collide);
+		//              me, val, count, collide);
 		//for (i = 0; i < NMISC; i++)
-		//	tst_resm(TINFO, "\t\tTest[%d]: %d %s's.", me, misc_cnt[i], m_str[i]);
+		//      tst_resm(TINFO, "\t\tTest[%d]: %d %s's.", me, misc_cnt[i], m_str[i]);
 		val0 = val++;
 	}
 }
@@ -474,15 +518,16 @@
 		misc_flag = 1;
 	}
 
-	switch(type) {
-		case m_fsync:
-			if (fsync(fd) < 0) {
-				tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me, errno);
-				tst_exit();
-			}
+	switch (type) {
+	case m_fsync:
+		if (fsync(fd) < 0) {
+			tst_resm(TFAIL, "\tTest[%d]: fsync error %d.", me,
+				 errno);
+			tst_exit();
+		}
 		break;
-		case m_sync:
-			sync();
+	case m_sync:
+		sync();
 		break;
 	}
 
@@ -496,7 +541,7 @@
 	tst_resm(TINFO, "\tterm -[%d]- got sig term.", getpid());
 
 	if (parent_pid == getpid()) {
-		for (i=0; i < nchild; i++)
+		for (i = 0; i < nchild; i++)
 			if (pidlist[i])
 				kill(pidlist[i], SIGTERM);
 		return;
@@ -507,11 +552,11 @@
 
 void cleanup(void)
 {
-        /*
-         * print timing stats if that option was specified.
-         * print errno log if that option was specified.
-         */
-        TEST_CLEANUP;
+	/*
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
+	TEST_CLEANUP;
 
-        tst_rmdir();
+	tst_rmdir();
 }
diff --git a/testcases/kernel/fs/ftest/libftest.c b/testcases/kernel/fs/ftest/libftest.c
index 75a041a..8ade3a7 100644
--- a/testcases/kernel/fs/ftest/libftest.c
+++ b/testcases/kernel/fs/ftest/libftest.c
@@ -34,17 +34,19 @@
 	tst_resm(TINFO, "\tBuf:");
 
 	nout = 0;
-	idx  = 0;
-	buf  = (char*)iov->iov_base;
-	val  = *((char*) buf);
+	idx = 0;
+	buf = (char *)iov->iov_base;
+	val = *((char *)buf);
 
 	for (i = 0; (unsigned int)i < iov->iov_len; i++) {
 
 		if (buf[i] != val) {
-			if (i == idx+1)
-				tst_resm(TINFO, "\t%"PRIx32"x,", buf[idx] & 0xff);
+			if (i == idx + 1)
+				tst_resm(TINFO, "\t%" PRIx32 "x,",
+					 buf[idx] & 0xff);
 			else
-				tst_resm(TINFO, "\t%d*%"PRIx32"x, ", i-idx, buf[idx] & 0xff);
+				tst_resm(TINFO, "\t%d*%" PRIx32 "x, ", i - idx,
+					 buf[idx] & 0xff);
 			idx = i;
 			++nout;
 		}
@@ -55,10 +57,10 @@
 		}
 	}
 
-	if (i == idx+1)
-		tst_resm(TINFO, "\t%"PRIx32"x", buf[idx] & 0xff);
+	if (i == idx + 1)
+		tst_resm(TINFO, "\t%" PRIx32 "x", buf[idx] & 0xff);
 	else
-		tst_resm(TINFO, "\t%d*%"PRIx32"x", i-idx, buf[idx]);
+		tst_resm(TINFO, "\t%d*%" PRIx32 "x", i - idx, buf[idx]);
 }
 
 /*
@@ -71,12 +73,12 @@
 	tst_resm(TINFO, "\tBits array:");
 
 	for (buf = bits; size > 0; --size, ++buf) {
-		tst_resm(TINFO, "\t%td:\t", 8*(buf-bits));
-		if ((buf-bits) % 16 == 0) {
-			assert (0 < (buf-bits));
-			tst_resm(TINFO, "\t%td:\t", 8*(buf-bits));
+		tst_resm(TINFO, "\t%td:\t", 8 * (buf - bits));
+		if ((buf - bits) % 16 == 0) {
+			assert(0 < (buf - bits));
+			tst_resm(TINFO, "\t%td:\t", 8 * (buf - bits));
 		}
-		tst_resm(TINFO, "\t%02"PRIx32"x ", *((char*) buf) & 0xff);
+		tst_resm(TINFO, "\t%02" PRIx32 "x ", *((char *)buf) & 0xff);
 	}
 
 	tst_resm(TINFO, "\t");
@@ -107,10 +109,11 @@
 
 	for (i = 0; i < csize; i++) {
 		if (buf[i] != val) {
-			if (i == idx+1)
+			if (i == idx + 1)
 				tst_resm(TINFO, "\t%x, ", buf[idx] & 0xff);
 			else
-				tst_resm(TINFO, "\t%d*%x, ", i-idx, buf[idx] & 0xff);
+				tst_resm(TINFO, "\t%d*%x, ", i - idx,
+					 buf[idx] & 0xff);
 			idx = i;
 			++nout;
 		}
@@ -120,10 +123,10 @@
 		}
 	}
 
-	if (i == idx+1)
+	if (i == idx + 1)
 		tst_resm(TINFO, "\t%x", buf[idx] & 0xff);
 	else
-		tst_resm(TINFO, "\t%d*%x", i-idx, buf[idx]);
+		tst_resm(TINFO, "\t%d*%x", i - idx, buf[idx]);
 }
 
 /*
diff --git a/testcases/kernel/fs/inode/inode01.c b/testcases/kernel/fs/inode/inode01.c
index e5e8f85..9643651 100644
--- a/testcases/kernel/fs/inode/inode01.c
+++ b/testcases/kernel/fs/inode/inode01.c
@@ -20,7 +20,7 @@
 /* 10/31/2002	Port to LTP	robbiew@us.ibm.com */
 /* 06/30/2001	Port to Linux	nsharoff@us.ibm.com */
 
-                           /* inode1.c*/
+			   /* inode1.c */
 /*======================================================================
 	=================== TESTPLAN SEGMENT ===================
 CALLS:	mkdir, stat, open
@@ -79,8 +79,8 @@
 int block_number;
 FILE *temp;
 
-char *TCID="inode01";           /* Test program identifier.    */
-int TST_TOTAL=2;                /* Total number of test cases. */
+char *TCID = "inode01";		/* Test program identifier.    */
+int TST_TOTAL = 2;		/* Total number of test cases. */
 /**************/
 
 #ifdef LINUX
@@ -93,17 +93,16 @@
 char write_string[PATH_STRING_LENGTH + 1];
 char rm_string[200];
 
-FILE *list_stream=NULL;
-int  file_id;
-int  list_id;
+FILE *list_stream = NULL;
+int file_id;
+int list_id;
 char slash[2];
 
 int increment_name(), get_next_name(), mode(), escrivez();
 
 int main()
-
 {
-	char root[16]; //as pids can get much longer
+	char root[16];		//as pids can get much longer
 	int gen_ret_val, ch_ret_val, level;
 	int ret_val;
 	int generate(), check();
@@ -125,39 +124,40 @@
 	setup();
 
 	if (signal(SIGTERM, (void (*)())term) == SIG_ERR) {
-		fprintf(temp, "\tSIGTERM signal set failed!, errno=%d\n", errno);
+		fprintf(temp, "\tSIGTERM signal set failed!, errno=%d\n",
+			errno);
 		fail_exit();
 	}
 
 	blenter();
 
 	/********************************/
-	/*				*/
+	/*                              */
 	/*  make the root directory for */
-	/*  the tree			*/
-	/*				*/
+	/*  the tree                    */
+	/*                              */
 	/********************************/
 
 	ret_val = mkdir(path_string, DIRECTORY_MODE);
 
 	if (ret_val == -1) {
 		perror("mkdir error");
-		fprintf(temp,"\tcreating directory '%s'\n", path_string);
-		fprintf(temp,"\t\n%s Impossible to create directory %s\n", root, path_string);
+		fprintf(temp, "\tcreating directory '%s'\n", path_string);
+		fprintf(temp, "\t\n%s Impossible to create directory %s\n",
+			root, path_string);
 		fail_exit();
 	}
-
 #ifdef PRINT
 	printf("\n%s\n", path_string);
 #endif
 
 	/****************************************/
-	/*					*/
-	/*  create the "path_list" file, in	*/
+	/*                                      */
+	/*  create the "path_list" file, in     */
 	/*  which the list of generated paths   */
-	/*  will be stored so that they later	*/
-	/*  may be checked			*/
-	/*					*/
+	/*  will be stored so that they later   */
+	/*  may be checked                      */
+	/*                                      */
 	/****************************************/
 
 	strcpy(path_list_string, path_string);
@@ -165,14 +165,16 @@
 	strcat(path_list_string, "path_list");
 	list_id = creat(path_list_string, FILE_MODE);
 	if (list_id == -1) {
-		fprintf(temp,"\t\n%s The path_list file cannot be created, errno=%d \n", root, errno);
+		fprintf(temp,
+			"\t\n%s The path_list file cannot be created, errno=%d \n",
+			root, errno);
 		fail_exit();
 	}
 
 	/****************************************/
-	/*					*/
-	/*   and store its name in path_list	*/
-	/*					*/
+	/*                                      */
+	/*   and store its name in path_list    */
+	/*                                      */
 	/****************************************/
 
 	strcpy(write_string, path_string);
@@ -182,9 +184,9 @@
 	escrivez(write_string);
 
 	/****************************************/
-	/*					*/
-	/*   generate the directory-file tree	*/
-	/*					*/
+	/*                                      */
+	/*   generate the directory-file tree   */
+	/*                                      */
 	/****************************************/
 
 	level = 0;
@@ -195,9 +197,10 @@
 
 	gen_ret_val = generate(path_string, level);
 
-	if (gen_ret_val)
-	{
-		fprintf(temp,"Failure occured in generate routine, return value %d\n", gen_ret_val);
+	if (gen_ret_val) {
+		fprintf(temp,
+			"Failure occured in generate routine, return value %d\n",
+			gen_ret_val);
 		local_flag = FAILED;
 	}
 
@@ -207,16 +210,18 @@
 	close(list_id);
 	list_id = open(path_list_string, READ);
 	if (list_id == -1) {
-		fprintf(temp,"\t\n%s The path_list file cannot be opened for reading, errno=%d\n", root, errno);
+		fprintf(temp,
+			"\t\n%s The path_list file cannot be opened for reading, errno=%d\n",
+			root, errno);
 		fail_exit();
 	}
 	list_stream = fdopen(list_id, "r");
 
 	/****************************************/
-	/*					*/
-	/*   check the directory-file tree	*/
-	/*      for correctness			*/
-	/*					*/
+	/*                                      */
+	/*   check the directory-file tree      */
+	/*      for correctness                 */
+	/*                                      */
 	/****************************************/
 
 #ifdef PRINT
@@ -225,18 +230,20 @@
 
 	ch_ret_val = check();
 
-	if (ch_ret_val)
-	{
-		fprintf(temp,"Failure occured in check routine, return value %d\n", ch_ret_val);
+	if (ch_ret_val) {
+		fprintf(temp,
+			"Failure occured in check routine, return value %d\n",
+			ch_ret_val);
 		local_flag = FAILED;
 	}
 
-        status = fclose(list_stream);
-        if (status != 0) {
-                fprintf(temp,"Failed to close list_stream: ret=%d errno=%d (%s)\n",
-                        status, errno, strerror(errno));
-                local_flag = FAILED;
-        }
+	status = fclose(list_stream);
+	if (status != 0) {
+		fprintf(temp,
+			"Failed to close list_stream: ret=%d errno=%d (%s)\n",
+			status, errno, strerror(errno));
+		local_flag = FAILED;
+	}
 
 	blexit();
 
@@ -245,7 +252,7 @@
 	 */
 
 #ifdef DEBUG
-	fprintf(temp,"\nClean up:\trm string = %s\n", rm_string);
+	fprintf(temp, "\nClean up:\trm string = %s\n", rm_string);
 #endif
 	fflush(stdout);
 	fflush(temp);
@@ -253,18 +260,18 @@
 	status = system(rm_string);
 
 	if (status) {
-		fprintf(temp,"Caution-``%s'' may have failed\n", rm_string);
+		fprintf(temp, "Caution-``%s'' may have failed\n", rm_string);
 		fprintf(temp, "rm command exit status = %d\n", status);
 	}
 
 	/****************************************/
-	/*					*/
-	/*         .....and exit main		*/
-	/*					*/
+	/*                                      */
+	/*         .....and exit main           */
+	/*                                      */
 	/****************************************/
 
 	anyfail();
-        /***** NOT REACHED ******/
+	/***** NOT REACHED ******/
 	tst_exit();
 }
 
@@ -281,19 +288,18 @@
 /*   reached or an error occurs		*/
 /*					*/
 /****************************************/
-
 		/***************************/
-		/*			   */
-char string[];  /*  the directory path 	   */
+		/*                         */
+char string[];			/*  the directory path     */
 		/*  string below which a   */
 		/*  tree is generated      */
-		/*			   */
+		/*                         */
 		/***************************/
 
 		/***************************/
-		/*			   */
-int level;    	/* the tree depth variable */
-		/*			   */
+		/*                         */
+int level;			/* the tree depth variable */
+		/*                         */
 		/***************************/
 {
 	int switch_flag;
@@ -301,22 +307,21 @@
 	int new_ret_val, len, ret_len;
 	char new_string[PATH_STRING_LENGTH + 1];
 	int new_level;
-	int i, j;	/* iteration counters */
+	int i, j;		/* iteration counters */
 
 	switch_flag = level & TRUE;
 	if (strlen(string) >= MAX_PATH_STRING_LENGTH) {
 
 		/********************************/
-		/*				*/
-		/*   Maximum path name length	*/
-		/*     	    reached 		*/
-		/*				*/
+		/*                              */
+		/*   Maximum path name length   */
+		/*          reached             */
+		/*                              */
 		/********************************/
 
-		fprintf(temp,"\tMaximum path_name length reached.\n");
-		return(-1);
-	}
-	else if (level < MAX_DEPTH) {
+		fprintf(temp, "\tMaximum path_name length reached.\n");
+		return (-1);
+	} else if (level < MAX_DEPTH) {
 		for (i = 0; i <= MAX_BREADTH; i++) {
 			get_next_name();
 			strcpy(new_string, string);
@@ -324,53 +329,56 @@
 			strcat(new_string, name);
 
 			/****************************************/
-			/*					*/
-			/*    switch between creating files	*/
-			/*    and making directories		*/
-			/*					*/
+			/*                                      */
+			/*    switch between creating files     */
+			/*    and making directories            */
+			/*                                      */
 			/****************************************/
 
 			if (switch_flag) {
 				switch_flag = FALSE;
 
 				/****************************************/
-				/*					*/
-				/*	  create a new file		*/
-				/*					*/
+				/*                                      */
+				/*        create a new file             */
+				/*                                      */
 				/****************************************/
 
 				file_id = creat(new_string, FILE_MODE);
 				if (file_id == -1) {
-					fprintf(temp,"\tImpossible to create file %s, errno=%d\n",
+					fprintf(temp,
+						"\tImpossible to create file %s, errno=%d\n",
 						new_string, errno);
-					return(-2);
+					return (-2);
 				}
-
 #ifdef PRINT
 				printf("%d  %s F\n", level, new_string);
 #endif
 
 				/****************************************/
-				/*					*/
-				/*	      write to it		*/
-				/*					*/
+				/*                                      */
+				/*            write to it               */
+				/*                                      */
 				/****************************************/
 
 				len = strlen(new_string);
 				for (j = 1; j <= FILE_LENGTH; j++) {
-					ret_len = write(file_id, new_string, len);
+					ret_len =
+					    write(file_id, new_string, len);
 					if (ret_len != len) {
-						fprintf(temp,"\tUnsuccessful write to file %s, expected return of %d, got %d, errno=%d\n",
-						new_string, len, ret_len, errno);
-						return(-3);
+						fprintf(temp,
+							"\tUnsuccessful write to file %s, expected return of %d, got %d, errno=%d\n",
+							new_string, len,
+							ret_len, errno);
+						return (-3);
 					}
 				}
 				close(file_id);
 
 				/****************************************/
-				/*					*/
-				/*   and store its name in path_list	*/
-				/*					*/
+				/*                                      */
+				/*   and store its name in path_list    */
+				/*                                      */
 				/****************************************/
 
 				strcpy(write_string, new_string);
@@ -378,31 +386,31 @@
 				write_string[len++] = 'F';
 				write_string[len] = '\0';
 				escrivez(write_string);
-			}
-			else {
+			} else {
 				switch_flag = TRUE;
 
 				/****************************************/
-				/*					*/
-				/*	 or make a directory		*/
-				/*					*/
+				/*                                      */
+				/*       or make a directory            */
+				/*                                      */
 				/****************************************/
 
 				ret_val = mkdir(new_string, DIRECTORY_MODE);
 
 				if (ret_val != 0) {
-					fprintf(temp,"\tImpossible to create directory %s, errno=%d\n", new_string, errno);
-					return(-5);
+					fprintf(temp,
+						"\tImpossible to create directory %s, errno=%d\n",
+						new_string, errno);
+					return (-5);
 				}
-
 #ifdef PRINT
 				printf("%d  %s D\n", level, new_string);
 #endif
 
 				/****************************************/
-				/*					*/
-				/*     store its name in path_list	*/
-				/*					*/
+				/*                                      */
+				/*     store its name in path_list      */
+				/*                                      */
 				/****************************************/
 
 				strcpy(write_string, new_string);
@@ -412,9 +420,9 @@
 				escrivez(write_string);
 
 				/****************************************/
-				/*					*/
-				/*	and generate a new level	*/
-				/*					*/
+				/*                                      */
+				/*      and generate a new level        */
+				/*                                      */
 				/****************************************/
 
 				new_level = level + 1;
@@ -425,21 +433,21 @@
 		}
 
 		/********************************/
-		/*				*/
-		/*    Maximum breadth reached 	*/
-		/*				*/
+		/*                              */
+		/*    Maximum breadth reached   */
+		/*                              */
 		/********************************/
 
-		return(ret_val);
-	}
-	else 	/********************************/
-		/*				*/
-		/*    Maximum depth reached 	*/
-		/*				*/
-		/********************************/
-
+		return (ret_val);
+	} else
+		    /********************************/
+		/*                             */
+		/*    Maximum depth reached    */
+		/*                             */
+ /********************************/
 		return 0;
 }
+
 int check()
 
 /****************************************/
@@ -458,9 +466,9 @@
 	for (;;) {
 
 		/****************************************/
-		/*					*/
-		/*  read a path string from path_list 	*/
-		/*					*/
+		/*                                      */
+		/*  read a path string from path_list   */
+		/*                                      */
 		/****************************************/
 
 		if (fscanf(list_stream, "%s", path_string) == EOF) {
@@ -471,7 +479,6 @@
 
 			return 0;
 		}
-
 #ifdef PRINT
 		printf("%s\n", path_string);
 #endif
@@ -480,74 +487,85 @@
 		len--;
 		if (path_string[len] == 'F') {
 
-	     	/********************************/
-		/*				*/
-		/*    this should be a file	*/
-		/*				*/
+		/********************************/
+			/*                              */
+			/*    this should be a file     */
+			/*                              */
 		/********************************/
 
 			path_string[len] = '\0';
 			file_id = open(path_string, READ);
 			if (file_id <= 0) {
-				fprintf(temp,"\tImpossible to open file %s, errno=%d\n",
+				fprintf(temp,
+					"\tImpossible to open file %s, errno=%d\n",
 					path_string, errno);
-				return(-1);
+				return (-1);
 			}
 
 			else {
 				/********************************/
-				/*				*/
-				/*    check its contents	*/
-				/*				*/
+				/*                              */
+				/*    check its contents        */
+				/*                              */
 				/********************************/
 
 				len = strlen(path_string);
 				for (j = 1; j <= FILE_LENGTH; j++) {
-					ret_len = read(file_id, read_string, len);
+					ret_len =
+					    read(file_id, read_string, len);
 					if (len != ret_len) {
-						fprintf(temp,"\tFile read error for file %s, expected return of %d, got %d, errno=%d\n",
-						path_string, len, ret_len, errno);
-						return(-3);
+						fprintf(temp,
+							"\tFile read error for file %s, expected return of %d, got %d, errno=%d\n",
+							path_string, len,
+							ret_len, errno);
+						return (-3);
 					}
 					read_string[len] = '\0';
 					val = strcmp(read_string, path_string);
 					if (val != 0) {
-						fprintf(temp,"\tContents of file %s are different than expected: %s\n", path_string, read_string);
-						return(-4);
+						fprintf(temp,
+							"\tContents of file %s are different than expected: %s\n",
+							path_string,
+							read_string);
+						return (-4);
 					}
 				}
 				close(file_id);
-			}  /* else for */
-					if (ret_len <= 0) {
-						fprintf(temp,"\tImpossible to read file %s\n", path_string);
-						return(-2);
-					}
-		}
-		else {
+			}	/* else for */
+			if (ret_len <= 0) {
+				fprintf(temp, "\tImpossible to read file %s\n",
+					path_string);
+				return (-2);
+			}
+		} else {
 
-	     	/********************************/
-		/*				*/
-		/*  otherwise..........		*/
-		/*  it should be a directory	*/
-		/*				*/
+		/********************************/
+			/*                              */
+			/*  otherwise..........         */
+			/*  it should be a directory    */
+			/*                              */
 		/********************************/
 
 			path_string[len] = '\0';
 			path_mode = mode(path_string);
 			if (path_mode == -1) {
-				fprintf(temp,"\tPreviously created directory path %s was not open\n", path_string);
-				return(-4);
+				fprintf(temp,
+					"\tPreviously created directory path %s was not open\n",
+					path_string);
+				return (-4);
 			}
 			if ((040000 & path_mode) != 040000) {
-				fprintf(temp,"\tPath %s was not recognized to be a directory\n", path_string);
-				fprintf(temp,"\tIts mode is %o\n", path_mode);
-				return(-5);
+				fprintf(temp,
+					"\tPath %s was not recognized to be a directory\n",
+					path_string);
+				fprintf(temp, "\tIts mode is %o\n", path_mode);
+				return (-5);
 			}
 		}
-	}  /* while */
+	}			/* while */
 }
 
-int  get_next_name()
+int get_next_name()
 
 /****************************************/
 /*					*/
@@ -555,19 +573,18 @@
 /*   sense---file or directory name	*/
 /*					*/
 /****************************************/
-
 {
 	static int k;
 	int i;
-	int last_position ;
+	int last_position;
 
 	last_position = NAME_LENGTH - 1;
 	if (k == 0) {
 
 		/************************/
-		/*			*/
-		/*   initialize name	*/
-		/*			*/
+		/*                      */
+		/*   initialize name    */
+		/*                      */
 		/************************/
 
 		for (i = 0; i < NAME_LENGTH; i++)
@@ -576,10 +593,11 @@
 		k++;
 	}
 					    /********************************/
-					    /*				    */
-	else increment_name(last_position); /* i.e., beginning at the last  */
-					    /* position			    */
-					    /*				    */
+	/*                              */
+	else
+		increment_name(last_position);	/* i.e., beginning at the last  */
+	/* position                     */
+	/*                              */
 					    /********************************/
 	return 0;
 }
@@ -593,28 +611,28 @@
 /*  next name				*/
 /*					*/
 /****************************************/
-
-int position;
+ int position;
 {
 	int next_position;
 
 	if (name[position] == 'z')
 		if (position == 0) {
-			fprintf(temp,"\tERROR: There are no more available names\n");
+			fprintf(temp,
+				"\tERROR: There are no more available names\n");
 			fail_exit();
-		}
-		else {
-			name[position] = 'a';          /**********************/
-			next_position = --position;    /*		     */
-			increment_name(next_position); /*  increment the     */
-						       /*  previous letter   */
-						       /*		     */
+		} else {
+			name[position] = 'a';	       /**********************/
+			next_position = --position;	/*                    */
+			increment_name(next_position);	/*  increment the     */
+			/*  previous letter   */
+			/*                    */
 						       /**********************/
 		}
 				  /*********************************/
-				  /*				   */
-	else name[position]++;    /* otherwise, increment this one */
-	return 0;		  /*				   */
+	/*                               */
+	else
+		name[position]++;	/* otherwise, increment this one */
+	return 0;		/*                               */
 				  /*********************************/
 }
 
@@ -626,17 +644,17 @@
 /*   the file named by path_string 	*/
 /*					*/
 /****************************************/
-
-char path_string[];
+ char path_string[];
 {
 	struct stat buf;
 	int ret_val, mod;
 
 	ret_val = stat(path_string, &buf);
-	if (ret_val == -1) return(-1);
+	if (ret_val == -1)
+		return (-1);
 	else {
 		mod = buf.st_mode;
-		return(mod);
+		return (mod);
 	}
 }
 
@@ -650,11 +668,12 @@
 	strcpy(write_string, string);
 	len = strlen(write_string);
 	write_string[len] = '\n';
-	len ++;
+	len++;
 	ret_len = write(list_id, write_string, len);
 	if (len != ret_len) {
-		fprintf(temp,"\tA string of deviant length %d written to path_list, errno=%d\n",
-				ret_len, errno);
+		fprintf(temp,
+			"\tA string of deviant length %d written to path_list, errno=%d\n",
+			ret_len, errno);
 		fail_exit();
 	}
 	return 0;
@@ -689,11 +708,10 @@
  *
  * Do set up - here its a dummy function
  */
-void
-setup()
+void setup()
 {
-    tst_tmpdir();
-    temp = stderr;
+	tst_tmpdir();
+	temp = stderr;
 }
 
 /*
@@ -705,14 +723,12 @@
 fail or
  *              pass.
  */
-void
-blexit()
+void blexit()
 {
-    (local_flag == PASSED) ?
-        tst_resm(TPASS, "Test block %d", block_number)
-     :  tst_resm(TFAIL, "Test block %d", block_number);
-        block_number++;
-        return;
+	(local_flag == PASSED) ? tst_resm(TPASS, "Test block %d", block_number)
+	    : tst_resm(TFAIL, "Test block %d", block_number);
+	block_number++;
+	return;
 }
 
 /*
@@ -720,11 +736,10 @@
  *
  * Description: Print message on entering a new block
  */
-void
-blenter()
+void blenter()
 {
-    local_flag = PASSED;
-        return;
+	local_flag = PASSED;
+	return;
 }
 
 /*
@@ -732,12 +747,11 @@
  *
  * Exit on failure
  */
-void
-fail_exit()
+void fail_exit()
 {
-        tst_resm(TFAIL, "Test failed");
+	tst_resm(TFAIL, "Test failed");
 	tst_rmdir();
-        tst_exit();
+	tst_exit();
 }
 
 /*
@@ -746,13 +760,12 @@
  *
  * Description: Exit a test.
  */
-void
-anyfail()
+void anyfail()
 {
-    (local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
-           : tst_resm(TPASS, "Test passed");
-    tst_rmdir();
-    tst_exit();
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
+	    : tst_resm(TPASS, "Test passed");
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -760,9 +773,8 @@
  *
  * Calling block passed the test
  */
-void
-ok_exit()
+void ok_exit()
 {
-        local_flag = PASSED;
-        return;
+	local_flag = PASSED;
+	return;
 }
diff --git a/testcases/kernel/fs/inode/inode02.c b/testcases/kernel/fs/inode/inode02.c
index 694719f..783edf8 100644
--- a/testcases/kernel/fs/inode/inode02.c
+++ b/testcases/kernel/fs/inode/inode02.c
@@ -20,7 +20,7 @@
 /* 11/01/2002	Port to LTP	robbiew@us.ibm.com */
 /* 06/30/2001	Port to Linux	nsharoff@us.ibm.com */
 
-                           /*inode02.c*/
+			   /*inode02.c */
 /*======================================================================
 	=================== TESTPLAN SEGMENT ===================
 CALLS:	mkdir, stat, open
@@ -67,27 +67,27 @@
 #endif
 
 #define MAXCHILD	25
-int allchild[MAXCHILD+1];
+int allchild[MAXCHILD + 1];
 
 char name[NAME_LENGTH + 1];
 char path_string[PATH_STRING_LENGTH + 1];
 char read_string[PATH_STRING_LENGTH + 1];
 char write_string[PATH_STRING_LENGTH + 1];
 char remove_string[PATH_STRING_LENGTH + 10];
-int  parent_pid;
-int  nchild;
+int parent_pid;
+int nchild;
 
-FILE *list_stream=NULL;
-int  list_id;
-int  file_id;
+FILE *list_stream = NULL;
+int list_id;
+int file_id;
 char slash[1];
 
 int increment_name(), get_next_name(), mode(), escrivez(), massmurder();
 int max_depth, max_breadth, file_length;
-int bd_arg(char*);
+int bd_arg(char *);
 
 #ifdef LINUX
-void (*sigset(int, void(*)(int)))(int);
+void (*sigset(int, void (*)(int))) (int);
 #endif
 
 /** LTP Port **/
@@ -99,7 +99,7 @@
 void anyfail(void);
 void ok_exit(void);
 void forkfail(void);
-void terror(char*);
+void terror(char *);
 int instress(void);
 
 #define FAILED 0
@@ -108,81 +108,79 @@
 int local_flag = PASSED;
 FILE *temp;
 
-char *TCID="inode02";           /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "inode02";		/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
 int main(argc, argv)
-	int argc;
-	char *argv[];
+int argc;
+char *argv[];
 {
 	int pid, tree(), p, status;
 	int count, child;
 	register int i;
-	int	term();
+	int term();
 
 	setup();
 
 	parent_pid = getpid();
 
 	if (sigset(SIGTERM, (void (*)())term) == SIG_ERR) {
-		tst_resm(TBROK, "\tSIGTERM sigset set failed, errno=%d\n", errno);
+		tst_resm(TBROK, "\tSIGTERM sigset set failed, errno=%d\n",
+			 errno);
 		exit(1);
 	}
 
 	/************************************************/
-	/*						*/
-	/*  Input the parameters for the directory---	*/
-	/*  file trees which are to be generated	*/
-	/*						*/
+	/*                                              */
+	/*  Input the parameters for the directory---   */
+	/*  file trees which are to be generated        */
+	/*                                              */
 	/************************************************/
 
 	if (argc < 2) {
 		max_depth = 6;
 		max_breadth = 5;
 		file_length = 8;
-		nchild =5;
+		nchild = 5;
 	} else if (argc < 5) {
 		tst_resm(TCONF, "Bad argument count.\n");
-		printf("\tinode02 max_depth max_breadth file_length #children\n\tdefault: inode02 6 5 8 5\n");
+		printf
+		    ("\tinode02 max_depth max_breadth file_length #children\n\tdefault: inode02 6 5 8 5\n");
 		exit(1);
 	} else {
 		i = 1;
 		if (sscanf(argv[i++], "%d", &max_depth) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &max_breadth) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &file_length) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &nchild) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (nchild > MAXCHILD) {
 			fprintf(temp, "too many children - max is %d\n",
-			  MAXCHILD);
+				MAXCHILD);
 			exit(1);
 		}
 	}
 
 	/************************************************/
-	/*						*/
-	/*  Generate and check nchild trees		*/
-	/*						*/
+	/*                                              */
+	/*  Generate and check nchild trees             */
+	/*                                              */
 	/************************************************/
 
-	for (p = 0; p < nchild; p++)
-	{
+	for (p = 0; p < nchild; p++) {
 		pid = fork();
-		if (pid == 0)
-		{
+		if (pid == 0) {
 			tree();
-		}
-		else
-		{
-		if (pid < 1) {
-				terror("Fork failed (may be OK if under stress)");
+		} else {
+			if (pid < 1) {
+				terror
+				    ("Fork failed (may be OK if under stress)");
 				massmurder();
-				if (instress())
-				{
+				if (instress()) {
 					ok_exit();
 				}
 				forkfail();
@@ -193,25 +191,26 @@
 	count = 0;
 	while ((child = wait(&status)) > 0) {
 #ifdef DEBUG
-		tst_resm(TINFO,"Test %d exited status = %d\n", child, status);
+		tst_resm(TINFO, "Test %d exited status = %d\n", child, status);
 #endif
 		if (status) {
-			fprintf(temp,"Test %d failed - expected 0 exit.\n", child);
+			fprintf(temp, "Test %d failed - expected 0 exit.\n",
+				child);
 			local_flag = FAILED;
 		}
 		count++;
 	}
 
 	if (count != nchild) {
-		tst_resm(TFAIL,"Wrong number of children waited on!\n");
-		tst_resm(TFAIL,"Saw %d, expected %d\n", count, nchild);
+		tst_resm(TFAIL, "Wrong number of children waited on!\n");
+		tst_resm(TFAIL, "Saw %d, expected %d\n", count, nchild);
 		local_flag = FAILED;
 	}
 
 	/************************************************/
-	/*						*/
-	/*  And report the results..........		*/
-	/*						*/
+	/*                                              */
+	/*  And report the results..........            */
+	/*                                              */
 	/************************************************/
 
 	anyfail();
@@ -220,9 +219,11 @@
 }
 
 int bd_arg(str)
-	char *str;
+char *str;
 {
-	fprintf(temp,"Bad argument - %s - could not parse as number.\n\tinode02 [max_depth] [max_breadth] [file_length] [#children]\n\tdefault: inode02 6 5 8 5\n", str);
+	fprintf(temp,
+		"Bad argument - %s - could not parse as number.\n\tinode02 [max_depth] [max_breadth] [file_length] [#children]\n\tdefault: inode02 6 5 8 5\n",
+		str);
 	exit(1);
 }
 
@@ -253,10 +254,10 @@
 	slash[1] = '\0';
 
 	/********************************/
-	/*				*/
+	/*                              */
 	/*  make the root directory for */
-	/*  the tree			*/
-	/*				*/
+	/*  the tree                    */
+	/*                              */
 	/********************************/
 
 	sprintf(path_string, "inode02.%d", getpid());
@@ -264,7 +265,9 @@
 	ret_val = mkdir(path_string, DIRECTORY_MODE);
 
 	if (ret_val == -1) {
-		tst_resm(TBROK,"Reason: Impossible to create directory %s, errno=%d\n", path_string, errno);
+		tst_resm(TBROK,
+			 "Reason: Impossible to create directory %s, errno=%d\n",
+			 path_string, errno);
 		exit(-5);
 	}
 
@@ -272,16 +275,16 @@
 	strcat(remove_string, path_string);
 
 #ifdef DEBUG
-	tst_resm(TINFO,"\n%s\n", path_string);
+	tst_resm(TINFO, "\n%s\n", path_string);
 #endif
 
 	/****************************************/
-	/*					*/
-	/*  create the "path_list" file, in	*/
+	/*                                      */
+	/*  create the "path_list" file, in     */
 	/*  which the list of generated paths   */
-	/*  will be stored so that they later	*/
-	/*  may be checked			*/
-	/*					*/
+	/*  will be stored so that they later   */
+	/*  may be checked                      */
+	/*                                      */
 	/****************************************/
 
 	strcpy(path_list_string, path_string);
@@ -289,15 +292,16 @@
 	strcat(path_list_string, "path_list");
 	list_id = creat(path_list_string, FILE_MODE);
 	if (list_id == -1) {
-		fprintf(temp,"\nThe path_list file '%s' cannot be created, errno=%d\n",
-		  path_list_string, errno);
+		fprintf(temp,
+			"\nThe path_list file '%s' cannot be created, errno=%d\n",
+			path_list_string, errno);
 		exit(-7);
 	}
 
 	/****************************************/
-	/*					*/
-	/*   and store its name in path_list	*/
-	/*					*/
+	/*                                      */
+	/*   and store its name in path_list    */
+	/*                                      */
 	/****************************************/
 
 	strcpy(write_string, path_string);
@@ -307,35 +311,37 @@
 	escrivez(write_string);
 
 	/****************************************/
-	/*					*/
-	/*   generate the directory-file tree	*/
-	/*					*/
+	/*                                      */
+	/*   generate the directory-file tree   */
+	/*                                      */
 	/****************************************/
 
 	level = 0;
 
 #ifdef DEBUG
-	tst_resm(TINFO,"\n\t%s\n\n", "GENERATING:");
+	tst_resm(TINFO, "\n\t%s\n\n", "GENERATING:");
 #endif
 
 	gen_ret_val = generate(path_string, level);
 	close(list_id);
 	list_id = open(path_list_string, READ);
 	if (list_id == -1) {
-		fprintf(temp,"\nThe path_list file cannot be opened for reading, errno=%d\n", errno);
+		fprintf(temp,
+			"\nThe path_list file cannot be opened for reading, errno=%d\n",
+			errno);
 		exit(-8);
 	}
 	list_stream = fdopen(list_id, "r");
 
 	/****************************************/
-	/*					*/
-	/*   check the directory-file tree	*/
-	/*      for correctness			*/
-	/*					*/
+	/*                                      */
+	/*   check the directory-file tree      */
+	/*      for correctness                 */
+	/*                                      */
 	/****************************************/
 
 #ifdef DEBUG
-	tst_resm(TINFO,"\n\t%s\n\n", "CHECKING:");
+	tst_resm(TINFO, "\n\t%s\n\n", "CHECKING:");
 #endif
 
 	ch_ret_val = check();
@@ -345,12 +351,13 @@
 	else
 		exit_val = gen_ret_val;
 
-        status = fclose(list_stream);
-        if (status != 0) {
-                fprintf(temp,"Failed to close list_stream: ret=%d errno=%d (%s)\n",
-                        status, errno, strerror(errno));
-                exit(-8);
-        }
+	status = fclose(list_stream);
+	if (status != 0) {
+		fprintf(temp,
+			"Failed to close list_stream: ret=%d errno=%d (%s)\n",
+			status, errno, strerror(errno));
+		exit(-8);
+	}
 
 	/*
 	 * Remove file.
@@ -358,14 +365,14 @@
 
 	status = system(remove_string);
 	if (status) {
-		fprintf(temp,"Caution - `%s' failed.\n", remove_string);
-		fprintf(temp,"Status returned %d.\n", status);
+		fprintf(temp, "Caution - `%s' failed.\n", remove_string);
+		fprintf(temp, "Status returned %d.\n", status);
 	}
 
 	/****************************************/
-	/*					*/
-	/*         .....and exit main		*/
-	/*					*/
+	/*                                      */
+	/*         .....and exit main           */
+	/*                                      */
 	/****************************************/
 
 	exit(exit_val);
@@ -384,19 +391,18 @@
 /*   reached or an error occurs		*/
 /*					*/
 /****************************************/
-
 		/***************************/
-		/*			   */
-char string[];  /*  the directory path 	   */
+		/*                         */
+char string[];			/*  the directory path     */
 		/*  string below which a   */
 		/*  tree is generated      */
-		/*			   */
+		/*                         */
 		/***************************/
 
 		/***************************/
-		/*			   */
-int level;    	/* the tree depth variable */
-		/*			   */
+		/*                         */
+int level;			/* the tree depth variable */
+		/*                         */
 		/***************************/
 {
 	int switch_flag;
@@ -404,22 +410,21 @@
 	int new_ret_val, len, ret_len;
 	char new_string[PATH_STRING_LENGTH + 1];
 	int new_level;
-	int i, j;	/* iteration counters */
+	int i, j;		/* iteration counters */
 
 	switch_flag = level & TRUE;
 	if (strlen(string) >= MAX_PATH_STRING_LENGTH) {
 
 		/********************************/
-		/*				*/
-		/*   Maximum path name length	*/
-		/*     	    reached 		*/
-		/*				*/
+		/*                              */
+		/*   Maximum path name length   */
+		/*          reached             */
+		/*                              */
 		/********************************/
 
-		fprintf(temp,"\nMaximum path_name length reached\n");
-		return(-1);
-	}
-	else if (level < max_depth) {
+		fprintf(temp, "\nMaximum path_name length reached\n");
+		return (-1);
+	} else if (level < max_depth) {
 		for (i = 0; i <= max_breadth; i++) {
 			get_next_name();
 			strcpy(new_string, string);
@@ -427,53 +432,56 @@
 			strcat(new_string, name);
 
 			/****************************************/
-			/*					*/
-			/*    switch between creating files	*/
-			/*    and making directories		*/
-			/*					*/
+			/*                                      */
+			/*    switch between creating files     */
+			/*    and making directories            */
+			/*                                      */
 			/****************************************/
 
 			if (switch_flag) {
 				switch_flag = FALSE;
 
 				/****************************************/
-				/*					*/
-				/*	  create a new file		*/
-				/*					*/
+				/*                                      */
+				/*        create a new file             */
+				/*                                      */
 				/****************************************/
 
 				file_id = creat(new_string, FILE_MODE);
 				if (file_id == -1) {
-					fprintf(temp,"\nImpossible to create file %s, errno=%d\n",
+					fprintf(temp,
+						"\nImpossible to create file %s, errno=%d\n",
 						new_string, errno);
-					return(-2);
+					return (-2);
 				}
-
 #ifdef DEBUG
-				tst_resm(TINFO,"%d  %s F\n", level, new_string);
+				tst_resm(TINFO, "%d  %s F\n", level,
+					 new_string);
 #endif
 
 				/****************************************/
-				/*					*/
-				/*	      write to it		*/
-				/*					*/
+				/*                                      */
+				/*            write to it               */
+				/*                                      */
 				/****************************************/
 
 				len = strlen(new_string);
 				for (j = 1; j <= file_length; j++) {
-					ret_len = write(file_id, new_string, len);
+					ret_len =
+					    write(file_id, new_string, len);
 					if (ret_len != len) {
-						fprintf(temp,"\nUnsuccessful write to file %s, errno=%d\n",
-						  new_string, errno);
-						return(-3);
+						fprintf(temp,
+							"\nUnsuccessful write to file %s, errno=%d\n",
+							new_string, errno);
+						return (-3);
 					}
 				}
 				close(file_id);
 
 				/****************************************/
-				/*					*/
-				/*   and store its name in path_list	*/
-				/*					*/
+				/*                                      */
+				/*   and store its name in path_list    */
+				/*                                      */
 				/****************************************/
 
 				strcpy(write_string, new_string);
@@ -481,35 +489,35 @@
 				write_string[len++] = 'F';
 				write_string[len] = '\0';
 				escrivez(write_string);
-			}
-			else {
+			} else {
 				switch_flag = TRUE;
 
 				/****************************************/
-				/*					*/
-				/*	 or make a directory		*/
-				/*					*/
-				/*  (mknod can only be called when in	*/
-				/*   super user mode)			*/
-				/*					*/
+				/*                                      */
+				/*       or make a directory            */
+				/*                                      */
+				/*  (mknod can only be called when in   */
+				/*   super user mode)                   */
+				/*                                      */
 				/****************************************/
 
 				ret_val = mkdir(new_string, DIRECTORY_MODE);
 
 				if (ret_val != 0) {
-					fprintf(temp,"\nImpossible to create directory %s, errno=%d\n",
-					 new_string, errno);
-					return(-5);
+					fprintf(temp,
+						"\nImpossible to create directory %s, errno=%d\n",
+						new_string, errno);
+					return (-5);
 				}
-
 #ifdef DEBUG
-				tst_resm(TINFO,"%d  %s D\n", level, new_string);
+				tst_resm(TINFO, "%d  %s D\n", level,
+					 new_string);
 #endif
 
 				/****************************************/
-				/*					*/
-				/*     store its name in path_list	*/
-				/*					*/
+				/*                                      */
+				/*     store its name in path_list      */
+				/*                                      */
 				/****************************************/
 
 				strcpy(write_string, new_string);
@@ -519,9 +527,9 @@
 				escrivez(write_string);
 
 				/****************************************/
-				/*					*/
-				/*	and generate a new level	*/
-				/*					*/
+				/*                                      */
+				/*      and generate a new level        */
+				/*                                      */
 				/****************************************/
 
 				new_level = level + 1;
@@ -532,21 +540,21 @@
 		}
 
 		/********************************/
-		/*				*/
-		/*    Maximum breadth reached 	*/
-		/*				*/
+		/*                              */
+		/*    Maximum breadth reached   */
+		/*                              */
 		/********************************/
 
-		return(ret_val);
-	}
-	else 	/********************************/
-		/*				*/
-		/*    Maximum depth reached 	*/
-		/*				*/
-		/********************************/
-
+		return (ret_val);
+	} else
+		    /********************************/
+		/*                             */
+		/*    Maximum depth reached    */
+		/*                             */
+ /********************************/
 		return 0;
 }
+
 int check()
 
 /****************************************/
@@ -565,97 +573,104 @@
 	for (;;) {
 
 		/****************************************/
-		/*					*/
-		/*  read a path string from path_list 	*/
-		/*					*/
+		/*                                      */
+		/*  read a path string from path_list   */
+		/*                                      */
 		/****************************************/
 
 		if (fscanf(list_stream, "%s", path_string) == EOF) {
 
 #ifdef DEBUG
-			tst_resm(TINFO,"\nEnd of path_list file reached \n");
+			tst_resm(TINFO, "\nEnd of path_list file reached \n");
 #endif
 
 			return 0;
 		}
-
 #ifdef DEBUG
-		tst_resm(TINFO,"%s\n", path_string);
+		tst_resm(TINFO, "%s\n", path_string);
 #endif
 
 		len = strlen(path_string);
 		len--;
 		if (path_string[len] == 'F') {
 
-	     	/********************************/
-		/*				*/
-		/*    this should be a file	*/
-		/*				*/
+		/********************************/
+			/*                              */
+			/*    this should be a file     */
+			/*                              */
 		/********************************/
 
 			path_string[len] = '\0';
 			file_id = open(path_string, READ);
 			if (file_id <= 0) {
-				fprintf(temp,"\nImpossible to open file %s, errno=%d\n",
+				fprintf(temp,
+					"\nImpossible to open file %s, errno=%d\n",
 					path_string, errno);
-				return(-1);
+				return (-1);
 			}
 
 			else {
 				/********************************/
-				/*				*/
-				/*    check its contents	*/
-				/*				*/
+				/*                              */
+				/*    check its contents        */
+				/*                              */
 				/********************************/
 
-				ret_len=0;
+				ret_len = 0;
 				len = strlen(path_string);
 				for (j = 1; j <= file_length; j++) {
-					ret_len = read(file_id, read_string, len);
+					ret_len =
+					    read(file_id, read_string, len);
 					if (len != ret_len) {
-						fprintf(temp,"\nFile read error for file %s, errno=%d\n",
-						path_string, errno);
-						return(-3);
+						fprintf(temp,
+							"\nFile read error for file %s, errno=%d\n",
+							path_string, errno);
+						return (-3);
 					}
 					read_string[len] = '\0';
 					val = strcmp(read_string, path_string);
 					if (val != 0) {
-						fprintf(temp,"\nContents of file %s are different than expected: %s\n", path_string, read_string);
-						return(-4);
+						fprintf(temp,
+							"\nContents of file %s are different than expected: %s\n",
+							path_string,
+							read_string);
+						return (-4);
 					}
 				}
 				close(file_id);
-			}  /* else for */
-					if (ret_len <= 0) {
-						fprintf(temp,"\nImpossible to read file %s, errno=%d\n",
-						path_string, errno);
-						return(-2);
-					}
-		}
-		else {
+			}	/* else for */
+			if (ret_len <= 0) {
+				fprintf(temp,
+					"\nImpossible to read file %s, errno=%d\n",
+					path_string, errno);
+				return (-2);
+			}
+		} else {
 
-	     	/********************************/
-		/*				*/
-		/*  otherwise..........		*/
-		/*  it should be a directory	*/
-		/*				*/
+		/********************************/
+			/*                              */
+			/*  otherwise..........         */
+			/*  it should be a directory    */
+			/*                              */
 		/********************************/
 
 			path_string[len] = '\0';
 			path_mode = mode(path_string);
 			if (path_mode == -1) {
-				fprintf(temp,"\nPreviously created directory path %s was not open\n",
-				path_string);
-				return(-4);
+				fprintf(temp,
+					"\nPreviously created directory path %s was not open\n",
+					path_string);
+				return (-4);
 			}
 			if ((040000 & path_mode) != 040000) {
-				fprintf(temp,"\nPath %s was not recognized to be a directory\n",
-				path_string);
-				fprintf(temp,"Its mode is %o\n", path_mode);
-				return(-5);
+				fprintf(temp,
+					"\nPath %s was not recognized to be a directory\n",
+					path_string);
+				fprintf(temp, "Its mode is %o\n", path_mode);
+				return (-5);
 			}
 		}
-	}  /* while */
+	}			/* while */
 }
 
 int get_next_name()
@@ -666,19 +681,18 @@
 /*   sense---file or directory name	*/
 /*					*/
 /****************************************/
-
 {
 	static int k;
 	int i;
-	int last_position ;
+	int last_position;
 
 	last_position = NAME_LENGTH - 1;
 	if (k == 0) {
 
 		/************************/
-		/*			*/
-		/*   initialize name	*/
-		/*			*/
+		/*                      */
+		/*   initialize name    */
+		/*                      */
 		/************************/
 
 		for (i = 0; i < NAME_LENGTH; i++)
@@ -687,10 +701,11 @@
 		k++;
 	}
 					    /********************************/
-					    /*				    */
-	else increment_name(last_position); /* i.e., beginning at the last  */
-					    /* position			    */
-					    /*				    */
+	/*                              */
+	else
+		increment_name(last_position);	/* i.e., beginning at the last  */
+	/* position                     */
+	/*                              */
 					    /********************************/
 	return 0;
 }
@@ -704,28 +719,28 @@
 /*  next name				*/
 /*					*/
 /****************************************/
-
-int position;
+ int position;
 {
 	int next_position;
 
 	if (name[position] == 'z')
 		if (position == 0) {
-			fprintf(temp,"ERROR: There are no more available names\n");
+			fprintf(temp,
+				"ERROR: There are no more available names\n");
 			exit(-1);
-		}
-		else {
-			name[position] = 'a';          /**********************/
-			next_position = --position;    /*		     */
-			increment_name(next_position); /*  increment the     */
-						       /*  previous letter   */
-						       /*		     */
+		} else {
+			name[position] = 'a';	       /**********************/
+			next_position = --position;	/*                    */
+			increment_name(next_position);	/*  increment the     */
+			/*  previous letter   */
+			/*                    */
 						       /**********************/
 		}
 				  /*********************************/
-				  /*				   */
-	else name[position]++;    /* otherwise, increment this one */
-	return 0;		  /*				   */
+	/*                               */
+	else
+		name[position]++;	/* otherwise, increment this one */
+	return 0;		/*                               */
 				  /*********************************/
 }
 
@@ -737,17 +752,17 @@
 /*   the file named by path_string 	*/
 /*					*/
 /****************************************/
-
-char path_string[];
+ char path_string[];
 {
 	struct stat buf;
 	int ret_val, mod;
 
 	ret_val = stat(path_string, &buf);
-	if (ret_val == -1) return(-1);
+	if (ret_val == -1)
+		return (-1);
 	else {
 		mod = buf.st_mode;
-		return(mod);
+		return (mod);
 	}
 }
 
@@ -761,11 +776,12 @@
 	strcpy(write_string, string);
 	len = strlen(write_string);
 	write_string[len] = '\n';
-	len ++;
+	len++;
 	ret_len = write(list_id, write_string, len);
 	if (len != ret_len) {
-		fprintf(temp,"A string of deviant length %d written to path_list, errno=%d\n",
-				ret_len, errno);
+		fprintf(temp,
+			"A string of deviant length %d written to path_list, errno=%d\n",
+			ret_len, errno);
 		exit(-2);
 	}
 	return 0;
@@ -777,7 +793,7 @@
 
 	fflush(temp);
 	if (parent_pid == getpid()) {
-		massmurder(); /* kill kids */
+		massmurder();	/* kill kids */
 		fprintf(temp, "\term1 - SIGTERM received by parent.\n");
 		fflush(temp);
 	} else {
@@ -788,20 +804,19 @@
 		close(file_id);
 		status = system(remove_string);
 		if (status) {
-			fprintf(temp,"Caution - ``%s'' returned status %d\n",
-			  remove_string, status);
+			fprintf(temp, "Caution - ``%s'' returned status %d\n",
+				remove_string, status);
 		}
 		exit(0);
 	}
 	return 0;
 }
+
 int massmurder()
 {
 	int i;
-	for (i=0 ; i < MAXCHILD ; i++)
-	{
-		if (allchild[i])
-		{
+	for (i = 0; i < MAXCHILD; i++) {
+		if (allchild[i]) {
 			kill(allchild[i], SIGTERM);
 		}
 	}
@@ -814,11 +829,10 @@
  *
  * Do set up - here its a dummy function
  */
-void
-setup()
+void setup()
 {
-    tst_tmpdir();
-    temp = stderr;
+	tst_tmpdir();
+	temp = stderr;
 }
 
 /*
@@ -826,12 +840,11 @@
  *
  * Exit on failure
  */
-void
-fail_exit()
+void fail_exit()
 {
-        tst_resm(TFAIL, "Test failed\n");
-        tst_rmdir();
-        tst_exit();
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -840,13 +853,12 @@
  *
  * Description: Exit a test.
  */
-void
-anyfail()
+void anyfail()
 {
-    (local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
-           : tst_resm(TPASS, "Test passed");
-    tst_rmdir();
-    tst_exit();
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
+	    : tst_resm(TPASS, "Test passed");
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -854,11 +866,10 @@
  *
  * Calling block passed the test
  */
-void
-ok_exit()
+void ok_exit()
 {
-        local_flag = PASSED;
-        return;
+	local_flag = PASSED;
+	return;
 }
 
 /*
@@ -866,12 +877,11 @@
  *
  * exit on failure
  */
-void
-forkfail()
+void forkfail()
 {
-        tst_resm(TBROK, "Reason: %s\n", strerror(errno));
-        tst_rmdir();
-        tst_exit();
+	tst_resm(TBROK, "Reason: %s\n", strerror(errno));
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -881,11 +891,10 @@
  *              test case failed, for example fork() failed. We will log this
  *              failure as TBROK instead of TFAIL.
  */
-void
-terror(char *message)
+void terror(char *message)
 {
-    tst_resm(TBROK, "Reason: %s:%s\n", message, strerror(errno));
-        return;
+	tst_resm(TBROK, "Reason: %s:%s\n", message, strerror(errno));
+	return;
 }
 
 /*
@@ -894,10 +903,9 @@
  * Assume that we are always running under stress, so this function will
  * return > 0 value always.
  */
-int
-instress()
+int instress()
 {
-        tst_resm(TINFO, "System resource may be too low, fork() malloc()"
-                                " etc are likely to fail.\n");
-        return 1;
+	tst_resm(TINFO, "System resource may be too low, fork() malloc()"
+		 " etc are likely to fail.\n");
+	return 1;
 }
diff --git a/testcases/kernel/fs/mongo/map5.c b/testcases/kernel/fs/mongo/map5.c
index c143b22..7cd700e 100644
--- a/testcases/kernel/fs/mongo/map5.c
+++ b/testcases/kernel/fs/mongo/map5.c
@@ -9,70 +9,70 @@
 #include <linux/fs.h>
 #include <errno.h>
 
-int main (int argc, char ** argv)
+int main(int argc, char **argv)
 {
-  int fd;
-  int block;
-  int first_block;
-  int last_block;
-  int totals_block;
-  int fragments;
-  int i;
-  int n;
+	int fd;
+	int block;
+	int first_block;
+	int last_block;
+	int totals_block;
+	int fragments;
+	int i;
+	int n;
 
-  for (n = 1; n < argc; n++) {
-	  if (argc < 2) {
-		  printf ("Used to see file maps \nUsage: %s filename1 [[..[filename2]...filename(N-1)] filenameN]\n", argv[0]);
-		return 0;
-	  }
-	  fd = open (argv[n], O_RDONLY);
-	  if (fd == -1) {
-		  perror ("open failed");
-		  continue;
-	  }
+	for (n = 1; n < argc; n++) {
+		if (argc < 2) {
+			printf
+			    ("Used to see file maps \nUsage: %s filename1 [[..[filename2]...filename(N-1)] filenameN]\n",
+			     argv[0]);
+			return 0;
+		}
+		fd = open(argv[n], O_RDONLY);
+		if (fd == -1) {
+			perror("open failed");
+			continue;
+		}
+		// printf ("file %s occupies blocks: \n", argv[1]);
+		// printf ("START\tEND\tCOUNT\n");
+		i = 0;
+		block = 0;
+		first_block = 0;
+		last_block = 0;
+		fragments = 0;
+		totals_block = 0;
 
-	  // printf ("file %s occupies blocks: \n", argv[1]);
-	  // printf ("START\tEND\tCOUNT\n");
-	  i = 0;
-	  block = 0;
-	  first_block = 0;
-	  last_block = 0;
-	  fragments = 0;
-	  totals_block = 0;
+		while (ioctl(fd, FIBMAP, &block) == 0) {
+			if (first_block == 0) {
+				last_block = block - 1;
+				first_block = block;
+			}
+			if (block != last_block + 1) {
+				// printf ("%d\t%d\t%d\n",first_block,last_block,last_block-first_block+1);
+				totals_block += last_block - first_block + 1;
+				fragments++;
+				first_block = block;
+				last_block = block;
+			} else {
+				last_block++;
+			}
 
-	  while (ioctl (fd, FIBMAP, &block) == 0) {
-		  if (first_block==0) {
-			  last_block = block-1;
-			  first_block = block;
-		  }
-		  if (block != last_block+1) {
-		// printf ("%d\t%d\t%d\n",first_block,last_block,last_block-first_block+1);
-			  totals_block+=last_block-first_block+1;
-			  fragments++;
-			  first_block = block;
-			  last_block = block;
-		  }
-		  else {
-			  last_block++;
-		  }
+			if (!block) {
+				//printf ("Fragments: %d\tBlocks: %d\n",fragments,totals_block);
+				//printf ("%d:%d\t",fragments,totals_block);
+				//if (fragments == 1) printf(".",totals_block);
+				//else printf("%d_",fragments,totals_block);
+				printf("%d\n", fragments);
+				break;
+			}
 
-		  if (!block) {
-			  //printf ("Fragments: %d\tBlocks: %d\n",fragments,totals_block);
-			  //printf ("%d:%d\t",fragments,totals_block);
-			  //if (fragments == 1) printf(".",totals_block);
-			  //else printf("%d_",fragments,totals_block);
-			  printf ("%d\n",fragments);
-			  break;
-		  }
-
-		  i ++;
-		  block = i;
-	  }
-	  if (errno) {
-		  perror ("FIBMAP failed");
-	  }
-	  close (fd);
-	  // printf ("\n");
-  }
-        return 0;
+			i++;
+			block = i;
+		}
+		if (errno) {
+			perror("FIBMAP failed");
+		}
+		close(fd);
+		// printf ("\n");
+	}
+	return 0;
 }
diff --git a/testcases/kernel/fs/mongo/mongo_compare.c b/testcases/kernel/fs/mongo/mongo_compare.c
index 084a40c..6dba953 100644
--- a/testcases/kernel/fs/mongo/mongo_compare.c
+++ b/testcases/kernel/fs/mongo/mongo_compare.c
@@ -19,10 +19,10 @@
 FILE *f3;
 FILE *f4;
 
-void write_html_head(FILE *fp);
-void write_html_end(FILE *fp);
+void write_html_head(FILE * fp);
+void write_html_end(FILE * fp);
 
-char head_str[]="\n \
+char head_str[] = "\n \
 <!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n \
 <html>\n \
 <head>\n \
@@ -39,7 +39,7 @@
 ";
 */
 
-char end_str[]="\n \
+char end_str[] = "\n \
 </table> \n \
 <tt></tt> \n \
 </body> \n \
@@ -48,159 +48,177 @@
 
 main(int argc, char **argv)
 {
-    float  n1, n2, ratio;
-    char   *p, *p1, *p2;
-    char   line0[100];
-    char   line1[100];
-    char   line2[100];
-    char   line3[100];
-    char   out_line[100];
-    char   html_line[500];
-    int	   i, k;
+	float n1, n2, ratio;
+	char *p, *p1, *p2;
+	char line0[100];
+	char line1[100];
+	char line2[100];
+	char line3[100];
+	char out_line[100];
+	char html_line[500];
+	int i, k;
 
-    if (argc < 3) {
-      printf("\nUsage: mongo_compare file1 file2 res_file\n\n");
-      printf("\t<file1> should contain reiserfs or ext2 results of mogo benchmark\n");
-      printf("\t<file2> should contain reiserfs or ext2 results of mogo benchmark\n");
-      printf("\tMongo results   will be compared\n");
-      printf("\t<res_file.txt>  will be contain results in the text form\n");
-      printf("\t<res_file.html> will be contain results in the html form\n");
-      exit(0);
-    }
+	if (argc < 3) {
+		printf("\nUsage: mongo_compare file1 file2 res_file\n\n");
+		printf
+		    ("\t<file1> should contain reiserfs or ext2 results of mogo benchmark\n");
+		printf
+		    ("\t<file2> should contain reiserfs or ext2 results of mogo benchmark\n");
+		printf("\tMongo results   will be compared\n");
+		printf
+		    ("\t<res_file.txt>  will be contain results in the text form\n");
+		printf
+		    ("\t<res_file.html> will be contain results in the html form\n");
+		exit(0);
+	}
 
-    strcpy(out1,argv[3]);
-    strcat(out1,".txt");
+	strcpy(out1, argv[3]);
+	strcat(out1, ".txt");
 
-    strcpy(out2,argv[3]);
-    strcat(out2,".html");
+	strcpy(out2, argv[3]);
+	strcat(out2, ".html");
 
-    if ((f1 = fopen(argv[1], "r")) == NULL) {
-	fprintf(stderr, "%s: can't open %s\n", argv[0], argv[1] );
-    	return 1;
-    }
+	if ((f1 = fopen(argv[1], "r")) == NULL) {
+		fprintf(stderr, "%s: can't open %s\n", argv[0], argv[1]);
+		return 1;
+	}
 
-    if ((f2 = fopen(argv[2], "r")) == NULL) {
-	fprintf(stderr, "%s: can't open %s\n", argv[0], argv[2] );
-    	return 1;
-    }
+	if ((f2 = fopen(argv[2], "r")) == NULL) {
+		fprintf(stderr, "%s: can't open %s\n", argv[0], argv[2]);
+		return 1;
+	}
 
-    if ((f3 = fopen(out1,"wr")) == NULL) {
-	fprintf(stderr, "%s: can't open %s\n", argv[0], out1 );
-    	return 1;
-    }
+	if ((f3 = fopen(out1, "wr")) == NULL) {
+		fprintf(stderr, "%s: can't open %s\n", argv[0], out1);
+		return 1;
+	}
 
-    if ((f4 = fopen(out2,"wr")) == NULL) {
-	fprintf(stderr, "%s: can't open %s\n", argv[0], out2 );
-    	return 1;
-    }
+	if ((f4 = fopen(out2, "wr")) == NULL) {
+		fprintf(stderr, "%s: can't open %s\n", argv[0], out2);
+		return 1;
+	}
 
-    write_html_head(f4);
-    i=0;
-    while (fgets(line1, 100, f1)) {
-	   fgets(line2, 100, f2);
+	write_html_head(f4);
+	i = 0;
+	while (fgets(line1, 100, f1)) {
+		fgets(line2, 100, f2);
 
-	 if (p=strstr(line1,"\n")) *(p+1)=0;
-	 if (p=strstr(line2,"\n")) *(p+1)=0;
+		if (p = strstr(line1, "\n"))
+			*(p + 1) = 0;
+		if (p = strstr(line2, "\n"))
+			*(p + 1) = 0;
 
-	 strcpy(line3,line1);
-	 line3[strlen(line3)-1]=0;
+		strcpy(line3, line1);
+		line3[strlen(line3) - 1] = 0;
 
-	 while (strlen(line3) < 40) {
-	     strcat(line3," ");
-	 }
+		while (strlen(line3) < 40) {
+			strcat(line3, " ");
+		}
 
-	 if (strstr(line3,"MONGO_")) {
-	    fprintf(f4,"</table>\n<table BORDER NOSAVE >\n");
-	    fprintf(f4,"<tr BGCOLOR=\"#CCFFFF\" NOSAVE>");
-	    fprintf(f4,"<td NOSAVE>\n");
-	    i=0;
-	 }
-	 if (i<20) strcpy(tmp_str[i],line2);
+		if (strstr(line3, "MONGO_")) {
+			fprintf(f4, "</table>\n<table BORDER NOSAVE >\n");
+			fprintf(f4, "<tr BGCOLOR=\"#CCFFFF\" NOSAVE>");
+			fprintf(f4, "<td NOSAVE>\n");
+			i = 0;
+		}
+		if (i < 20)
+			strcpy(tmp_str[i], line2);
 
-	 if (strstr(line3,"FSYS=")) {
-	     fprintf(f4, "</td><td>\n");
-	     for (k=0; k<i; k++) {
-	         fprintf(f4, "<tt>%s</tt><br>\n", tmp_str[k]);
-	     }
-	     fprintf (f4, "</td>\n <tr BGCOLOR=\"#CCFFFF\" NOSAVE><td COLSPAN=\"2\"><tt><B> %s %s </B></tt>\n", line3, line2);
-	     i=20;
-	 }
-	 else if (NULL == strstr(line3, " :" )) {
+		if (strstr(line3, "FSYS=")) {
+			fprintf(f4, "</td><td>\n");
+			for (k = 0; k < i; k++) {
+				fprintf(f4, "<tt>%s</tt><br>\n", tmp_str[k]);
+			}
+			fprintf(f4,
+				"</td>\n <tr BGCOLOR=\"#CCFFFF\" NOSAVE><td COLSPAN=\"2\"><tt><B> %s %s </B></tt>\n",
+				line3, line2);
+			i = 20;
+		} else if (NULL == strstr(line3, " :")) {
 
-	     if (strstr(line3, "(time") ) fprintf(f4,"<br><tt><center>%s</center></tt>\n",line3);
-	     else {
-	         k=0; p=line3;
-	         while (*p++ != 0) {
-	             if (*p != ' ' && *p != '\n') k++;
-	         }
-	         if (k > 0) {
-	             fprintf(f4, "<tt>%s</tt><br>\n", line3);
-	             if (i<20) i++;
-	         }
-	    }
-	 }
+			if (strstr(line3, "(time"))
+				fprintf(f4,
+					"<br><tt><center>%s</center></tt>\n",
+					line3);
+			else {
+				k = 0;
+				p = line3;
+				while (*p++ != 0) {
+					if (*p != ' ' && *p != '\n')
+						k++;
+				}
+				if (k > 0) {
+					fprintf(f4, "<tt>%s</tt><br>\n", line3);
+					if (i < 20)
+						i++;
+				}
+			}
+		}
 
-	 else if (strstr(line3,"Create")) fprintf (f4, "</td>\n");
+		else if (strstr(line3, "Create"))
+			fprintf(f4, "</td>\n");
 
-	 line2[strlen(line2)-1]=0;
-	 while (strlen(line2) < 40) {
-	     strcat(line2," ");
-	 }
+		line2[strlen(line2) - 1] = 0;
+		while (strlen(line2) < 40) {
+			strcat(line2, " ");
+		}
 
-	 strcat(line3,line2);
+		strcat(line3, line2);
 
-	 strcpy(out_line, line3);
-	 strcat(out_line, "\n");
-	 name_str1[0]=0;
+		strcpy(out_line, line3);
+		strcat(out_line, "\n");
+		name_str1[0] = 0;
 
-	 if (p1=strstr(line1, " :" )) {
-	      strcpy(time_str1, p1+2);
-	      strncpy(name_str1, line1, p1-line1);
+		if (p1 = strstr(line1, " :")) {
+			strcpy(time_str1, p1 + 2);
+			strncpy(name_str1, line1, p1 - line1);
 
-	      if (p2=strstr(line2, " :" )) {
-	          strcpy(time_str2, p2+2);
+			if (p2 = strstr(line2, " :")) {
+				strcpy(time_str2, p2 + 2);
 
-		  time_str1[strlen(time_str1)-1]=0;
-		  time_str2[strlen(time_str2)-1]=0;
+				time_str1[strlen(time_str1) - 1] = 0;
+				time_str2[strlen(time_str2) - 1] = 0;
 
-		  sscanf(time_str1,"%f", &n1);
-		  sscanf(time_str2,"%f", &n2);
+				sscanf(time_str1, "%f", &n1);
+				sscanf(time_str2, "%f", &n2);
 
-		  ratio = n1/n2;
-		  sprintf(out_line, "%s : %6.2f / %6.2f = %.2f\n",
-		          name_str1, n1, n2, ratio);
+				ratio = n1 / n2;
+				sprintf(out_line, "%s : %6.2f / %6.2f = %.2f\n",
+					name_str1, n1, n2, ratio);
 
-		  fprintf(f4, "<tr><td><tt> %s &nbsp </tt></td> <td><div align=right><tt> %6.2f / %6.2f = %.2f &nbsp </tt></div></td></tr>\n",
-		          name_str1, n1, n2, ratio);
+				fprintf(f4,
+					"<tr><td><tt> %s &nbsp </tt></td> <td><div align=right><tt> %6.2f / %6.2f = %.2f &nbsp </tt></div></td></tr>\n",
+					name_str1, n1, n2, ratio);
 
-	      }
-	 }
+			}
+		}
 
-         fprintf (f3, "%s", out_line);
-	 line1[0] = 0;
-	 line2[0] = 0;
-	 line3[0] = 0;
-	 out_line[0] = 0;
-    }
+		fprintf(f3, "%s", out_line);
+		line1[0] = 0;
+		line2[0] = 0;
+		line3[0] = 0;
+		out_line[0] = 0;
+	}
 
-    write_html_end(f4);
+	write_html_end(f4);
 
-    fclose (f1);
-    fclose (f2);
+	fclose(f1);
+	fclose(f2);
 
-    fclose (f3);
-    fclose (f4);
+	fclose(f3);
+	fclose(f4);
 
-    fflush (f3);
-    fflush (f4);
+	fflush(f3);
+	fflush(f4);
 }
+
 /*******************************************/
 void write_html_head(FILE * fp)
 {
-    fprintf (fp, "%s", head_str);
+	fprintf(fp, "%s", head_str);
 }
+
 /*******************************************/
 void write_html_end(FILE * fp)
 {
-    fprintf (fp, "%s", end_str);
+	fprintf(fp, "%s", end_str);
 }
diff --git a/testcases/kernel/fs/mongo/mongo_read.c b/testcases/kernel/fs/mongo/mongo_read.c
index 1f0b618..96a65c3 100644
--- a/testcases/kernel/fs/mongo/mongo_read.c
+++ b/testcases/kernel/fs/mongo/mongo_read.c
@@ -15,42 +15,43 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-int main (int argc, char ** argv)
+int main(int argc, char **argv)
 {
-  int fd, rd, i;
-  char * buf;
-  int bufsize=4096;
+	int fd, rd, i;
+	char *buf;
+	int bufsize = 4096;
 
-  if (argc < 2) {
-    printf ("\nUsage: %s filename [,filename2 [,...] ] ]\n\n",argv[0]);
-  return 0;
-  }
+	if (argc < 2) {
+		printf("\nUsage: %s filename [,filename2 [,...] ] ]\n\n",
+		       argv[0]);
+		return 0;
+	}
 
-  buf = (char *)malloc (bufsize);
-  if (buf == 0) {
-    printf ("Malloc failed on %d\n", bufsize);
-  return 0;
-  }
+	buf = (char *)malloc(bufsize);
+	if (buf == 0) {
+		printf("Malloc failed on %d\n", bufsize);
+		return 0;
+	}
 
-  /* Read all given files */
-  for (i=1; i<argc; i++) {
+	/* Read all given files */
+	for (i = 1; i < argc; i++) {
 
-    /* open the file */
-    fd = open (argv[i], O_RDONLY);
-    if (fd == -1) {
-      printf ("Open failed (%s)\n", strerror (errno));
-    return 0;
-    }
+		/* open the file */
+		fd = open(argv[i], O_RDONLY);
+		if (fd == -1) {
+			printf("Open failed (%s)\n", strerror(errno));
+			return 0;
+		}
 
-    /* read the file */
-    while ((rd = read (fd, buf, bufsize)) == bufsize);
-    if (rd == -1) {
-      printf ("Read failed (%s)\n", strerror (errno));
-    return 0;
-    }
-    close (fd);
-  }
+		/* read the file */
+		while ((rd = read(fd, buf, bufsize)) == bufsize) ;
+		if (rd == -1) {
+			printf("Read failed (%s)\n", strerror(errno));
+			return 0;
+		}
+		close(fd);
+	}
 
-  free(buf);
-        return 0;
+	free(buf);
+	return 0;
 }
diff --git a/testcases/kernel/fs/mongo/mongo_slinks.c b/testcases/kernel/fs/mongo/mongo_slinks.c
index a12ff36..02fca78 100644
--- a/testcases/kernel/fs/mongo/mongo_slinks.c
+++ b/testcases/kernel/fs/mongo/mongo_slinks.c
@@ -17,84 +17,82 @@
 //  1 - otherwise.
 // mongo_slinks reads arguments from stdin.
 
-int main (int argc, char * argv [])
+int main(int argc, char *argv[])
 {
-  char * old_path;
-  char * new_path;
+	char *old_path;
+	char *new_path;
 
-  struct stat statbuf;
+	struct stat statbuf;
 
-  int num;
-  char * buffer = NULL;
-  char *line_buffer = NULL;
-  size_t line_buffer_size = 0;
-  int size = 1;
+	int num;
+	char *buffer = NULL;
+	char *line_buffer = NULL;
+	size_t line_buffer_size = 0;
+	int size = 1;
 
-  if ((buffer = (char *) malloc (size+1)) == NULL) {
-	  perror ("checklink: malloc failed");
-	  return 1;
-  }
+	if ((buffer = (char *)malloc(size + 1)) == NULL) {
+		perror("checklink: malloc failed");
+		return 1;
+	}
 
-  while (getline(&line_buffer, &line_buffer_size, stdin) != -1) {
+	while (getline(&line_buffer, &line_buffer_size, stdin) != -1) {
 
-	  old_path = strtok(line_buffer, "\t ");
-	  new_path = strtok(NULL, "\t\n ");
+		old_path = strtok(line_buffer, "\t ");
+		new_path = strtok(NULL, "\t\n ");
 
-	  if (!old_path || !new_path) /* empty lines at the end of file */
-		  break;
+		if (!old_path || !new_path)	/* empty lines at the end of file */
+			break;
 
-	  // Create symlink
-	  if (symlink(old_path, new_path) != 0) {
-		  perror ("checklink : symlink failed ");
-		  return 1;
-	  }
+		// Create symlink
+		if (symlink(old_path, new_path) != 0) {
+			perror("checklink : symlink failed ");
+			return 1;
+		}
+		// stat data of symlink itself
+		if (lstat(new_path, &statbuf) == -1) {
+			perror("checklink: lstat failed");
+			return 1;
+		}
 
-	  // stat data of symlink itself
-	  if (lstat(new_path, &statbuf)== -1) {
-		  perror ("checklink: lstat failed");
-		  return 1;
-	  }
+		if (!(S_ISLNK(statbuf.st_mode))) {
+			printf("checklink : file %s is not a symbol link\n",
+			       new_path);
+			return 1;
+		}
+		// Test readlink
+		//
+		// Increase size of buffer to readlink untile whole symlink body will be read.
+		// Check readlink result on every iteration.
 
-	  if (! (S_ISLNK (statbuf.st_mode))) {
-		  printf ("checklink : file %s is not a symbol link\n", new_path);
-		  return 1;
-	  }
+		while (1) {
+			memset(buffer, 0, size + 1);
+			num = readlink(new_path, buffer, size);
+			if (num < 1 || num > size) {
+				perror("checklink: readlink failed");
+				free(buffer);
+				return 1;
+			}
+			// Make sure that readlink did not break things
+			if (buffer[num] != 0) {
+				printf
+				    ("checklink : readlink corrupts memory\n");
+				free(buffer);
+				return 1;
+			}
+			// Whole expected symlink body is read
+			if (num < size)
+				break;
 
-	  // Test readlink
-	  //
-	  // Increase size of buffer to readlink untile whole symlink body will be read.
-	  // Check readlink result on every iteration.
-
-	  while (1) {
-		  memset (buffer, 0, size+1);
-		  num = readlink (new_path, buffer, size);
-		  if (num < 1 || num > size) {
-			  perror ("checklink: readlink failed");
-			  free (buffer);
-			  return 1;
-		  }
-
-		  // Make sure that readlink did not break things
-		  if (buffer [num] != 0) {
-			  printf ("checklink : readlink corrupts memory\n");
-			  free (buffer);
-			  return 1;
-		  }
-
-		  // Whole expected symlink body is read
-		  if (num < size)
-			  break;
-
-		  // Only part of symlink body was read. So we  make a bigger buffer
-		  // and call `readlink' again.
-		  size *= 2;
-		  if ((buffer = realloc(buffer, size+1)) == NULL) {
-			  perror("checklink: realloc failed");
-			  return 1;
-		  }
-	  }
-  }
-  free (buffer);
-  free (line_buffer);
-        return 0;
+			// Only part of symlink body was read. So we  make a bigger buffer
+			// and call `readlink' again.
+			size *= 2;
+			if ((buffer = realloc(buffer, size + 1)) == NULL) {
+				perror("checklink: realloc failed");
+				return 1;
+			}
+		}
+	}
+	free(buffer);
+	free(line_buffer);
+	return 0;
 }
diff --git a/testcases/kernel/fs/mongo/reiser_fract_tree.c b/testcases/kernel/fs/mongo/reiser_fract_tree.c
index a9ede16..a945bfe 100644
--- a/testcases/kernel/fs/mongo/reiser_fract_tree.c
+++ b/testcases/kernel/fs/mongo/reiser_fract_tree.c
@@ -13,10 +13,11 @@
 #include <errno.h>
 char tdir[256];
 char path[256];
-long stats =0;
+long stats = 0;
 
-void print_usage() {
-printf("
+void print_usage()
+{
+	printf("
 This program creates files in a tree of random depth and branching. Files vary
 in size randomly according to a distribution function which seems to model real
 file systems.  This distribution function has a median size of median_file_size
@@ -43,14 +44,15 @@
 
 To avoid having one large file distort the results set max_file_size to
 not more than bytes_to_consume/10.  Using a distribution function for
-the sizes of writes would be a natural next step in developing this program.\n\n"
-);
+the sizes of writes would be a natural next step in developing this program.\n\n");
 
-printf("Usage: reiser_fract_tree bytes_to_consume median_file_size max_file_size median_dir_nr_files max_directory_nr_files median_dir_branching max_dir_branching write_buffer_size /testfs_mount_point print_stats_flag\n\n");
+	printf
+	    ("Usage: reiser_fract_tree bytes_to_consume median_file_size max_file_size median_dir_nr_files max_directory_nr_files median_dir_branching max_dir_branching write_buffer_size /testfs_mount_point print_stats_flag\n\n");
 }
+
 /* #define DEBUG */
 
-char * write_buffer;		/* buffer from which we write */
+char *write_buffer;		/* buffer from which we write */
 int write_buffer_size = 0;	/* gets reset to an argv  */
 static int already_whined = 0;	/* keep out of disk space errors from being
 				   endless by tracking whether we already
@@ -61,406 +63,440 @@
 long byte_total = 0;		/* bytes created so far */
 
 /* statistics on sizes of files we attempted to create */
-int fsz_0_100    =0;
-int fsz_100_1k   =0;
-int fsz_1k_10k   =0;
-int fsz_10k_100k =0;
-int fsz_100k_1m  =0;
-int fsz_1m_10m    =0;
-int fsz_10m_larger    =0;
+int fsz_0_100 = 0;
+int fsz_100_1k = 0;
+int fsz_1k_10k = 0;
+int fsz_10k_100k = 0;
+int fsz_100k_1m = 0;
+int fsz_1m_10m = 0;
+int fsz_10m_larger = 0;
 
 void chngdir(char *name)
 {
-  int i;
+	int i;
 
-  if (name[0] == '.' && name[1] == '.') {
-    for (i=strlen(path); i>0; i--) {
-      if (path[i] == '/') {
-	path[i]=0;
-	break;
-      }
-    }
-  }else {
-    strcat(path,"/");
-    strcat(path,name);
-  }
+	if (name[0] == '.' && name[1] == '.') {
+		for (i = strlen(path); i > 0; i--) {
+			if (path[i] == '/') {
+				path[i] = 0;
+				break;
+			}
+		}
+	} else {
+		strcat(path, "/");
+		strcat(path, name);
+	}
 }
 
 /* this is the core statistical distribution function, and it is used for file
    sizes, directory sizes, etc. */
 int determine_size(double median_size,
-		   double max_size	/* The maximal value of size */ )
+		   double max_size /* The maximal value of size */ )
 {
-  /* when x is half of its random range (max_size/median_size), result is
-     median_size */
-  int nr_random, granularity_reducer;
- double size, double_nr_random;
+	/* when x is half of its random range (max_size/median_size), result is
+	   median_size */
+	int nr_random, granularity_reducer;
+	double size, double_nr_random;
 
- /* it is a feature for us that this repeats identically every time it is run,
-    as otherwise meaningless variances would affect our results and require us
-    to use a higher number of benchmarks to achieve low noise results.  */
-     nr_random = rand();
-     median_size++;		/* avoids divide by zero errors */
+	/* it is a feature for us that this repeats identically every time it is run,
+	   as otherwise meaningless variances would affect our results and require us
+	   to use a higher number of benchmarks to achieve low noise results.  */
+	nr_random = rand();
+	median_size++;		/* avoids divide by zero errors */
 
-     /* this code does poorly when max_size is not a lot more than median size,
-	and that needs fixing */
+	/* this code does poorly when max_size is not a lot more than median size,
+	   and that needs fixing */
 
-     /* THE NEXT 2 LINES ARE THE HEART OF THE PROGRAM */
+	/* THE NEXT 2 LINES ARE THE HEART OF THE PROGRAM */
 
-     /* keep x below the value that when multiplied by median size on the next
-	line will equal max_size */
-     /* the granularity_reducer is to handle the case where max_size is near
-	median_size, since '%' can only take ints, we need this complicated what
-	of handling that for small values of max_size/median_size by making
-	large ints out of small ints temporarily.  */
-     if (max_size/median_size < 1024)
-       granularity_reducer = 1024 * 1024;
-     else
-       granularity_reducer = 1;
-     nr_random = nr_random % ((int) (granularity_reducer * (((double) max_size)/((double) median_size))));
-     double_nr_random = ((double) nr_random)/(granularity_reducer);
-     size = median_size * (1/(1 - (double_nr_random)/(((double)max_size)/((double) median_size))) -1);
-     return ((int) size);
+	/* keep x below the value that when multiplied by median size on the next
+	   line will equal max_size */
+	/* the granularity_reducer is to handle the case where max_size is near
+	   median_size, since '%' can only take ints, we need this complicated what
+	   of handling that for small values of max_size/median_size by making
+	   large ints out of small ints temporarily.  */
+	if (max_size / median_size < 1024)
+		granularity_reducer = 1024 * 1024;
+	else
+		granularity_reducer = 1;
+	nr_random =
+	    nr_random %
+	    ((int)
+	     (granularity_reducer *
+	      (((double)max_size) / ((double)median_size))));
+	double_nr_random = ((double)nr_random) / (granularity_reducer);
+	size =
+	    median_size * (1 /
+			   (1 -
+			    (double_nr_random) / (((double)max_size) /
+						  ((double)median_size))) - 1);
+	return ((int)size);
 }
 
 /* generate a unique filename */
-void get_name_by_number(long this_files_number, char * str)
+void get_name_by_number(long this_files_number, char *str)
 {
-  sprintf (str, "%lu", this_files_number);
+	sprintf(str, "%lu", this_files_number);
 }
 
 /* make a file of a specified size */
 void make_file(int size)
 {
-  char string [128] = {0};
-  char * str = string;
-  char fname[256];
-  int fd = 0;
-  int error;
-  static long this_files_number = 1;
+	char string[128] = { 0 };
+	char *str = string;
+	char fname[256];
+	int fd = 0;
+	int error;
+	static long this_files_number = 1;
 
-  /* collect statistics about the size of files created, or more precisely, the
-     size of files that we will attempt to create. */
-  if (size <= 100)  fsz_0_100++;
-  else if (size <= 1000) fsz_100_1k++;
-  else if (size <= 10*1000) fsz_1k_10k++;
-  else if (size <= 100*1000) fsz_10k_100k++;
-  else if (size <= 1000*1000) fsz_100k_1m++;
-  else if (size <= 10*1000*1000) fsz_1m_10m++;
-  else fsz_10m_larger++;
+	/* collect statistics about the size of files created, or more precisely, the
+	   size of files that we will attempt to create. */
+	if (size <= 100)
+		fsz_0_100++;
+	else if (size <= 1000)
+		fsz_100_1k++;
+	else if (size <= 10 * 1000)
+		fsz_1k_10k++;
+	else if (size <= 100 * 1000)
+		fsz_10k_100k++;
+	else if (size <= 1000 * 1000)
+		fsz_100k_1m++;
+	else if (size <= 10 * 1000 * 1000)
+		fsz_1m_10m++;
+	else
+		fsz_10m_larger++;
 
-  /* construct a name for the file */
-  get_name_by_number(this_files_number++, str);
-  strcpy(fname, path);
-  strcat(fname, "/");
-  strcat(fname, str);
+	/* construct a name for the file */
+	get_name_by_number(this_files_number++, str);
+	strcpy(fname, path);
+	strcat(fname, "/");
+	strcat(fname, str);
 
-  /* open the file, and deal with the various errors that can occur */
+	/* open the file, and deal with the various errors that can occur */
 
-  if ((fd = open(fname, O_CREAT|O_EXCL|O_RDWR, 0777)) == -1) {
-    if (errno == ENOSPC) {
-      if (!already_whined) {
-	printf("reiser-2021A: out of disk (or inodes) space, will keep trying\n");
-	already_whined = 1;	/* we continue other file creation in out of
-				   space conditions */
-      }
-      return;
-    }
-    /*  it is sometimes useful to be able to run this program more than once
-	inside the same directory, and that means skipping over filenames that
-	already exist.  Thus we ignore EEXIST, and pay attention to all
-	else. */
-    if (errno == EEXIST) {	/* just skip existing file */
-      return;
-    }
-    perror ("open");
-    exit (errno);
-  }
-  /* write to the file until it is the right size, handling the various error
-     conditions appropriately */
-
-  while (size > 0) {
-    size -= (error = write(fd, write_buffer, (size < write_buffer_size - 1) ? size : (write_buffer_size - 1)));
-    if (error == -1) {
-      if (errno == ENOSPC) {
-	if (!already_whined) {
-	  printf("reiser-2022: out of disk space, will keep trying\n");
-	  already_whined = 1;
+	if ((fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0777)) == -1) {
+		if (errno == ENOSPC) {
+			if (!already_whined) {
+				printf
+				    ("reiser-2021A: out of disk (or inodes) space, will keep trying\n");
+				already_whined = 1;	/* we continue other file creation in out of
+							   space conditions */
+			}
+			return;
+		}
+		/*  it is sometimes useful to be able to run this program more than once
+		   inside the same directory, and that means skipping over filenames that
+		   already exist.  Thus we ignore EEXIST, and pay attention to all
+		   else. */
+		if (errno == EEXIST) {	/* just skip existing file */
+			return;
+		}
+		perror("open");
+		exit(errno);
 	}
-	close (fd);
-	return;
-      }
-      perror ("write() failed");
-      exit(errno);
-    }
-  }
+	/* write to the file until it is the right size, handling the various error
+	   conditions appropriately */
 
-  /* close the file */
-  if (close(fd)) {
-    perror("close() failed");
-    exit(errno);
-  }
+	while (size > 0) {
+		size -= (error =
+			 write(fd, write_buffer,
+			       (size <
+				write_buffer_size -
+				1) ? size : (write_buffer_size - 1)));
+		if (error == -1) {
+			if (errno == ENOSPC) {
+				if (!already_whined) {
+					printf
+					    ("reiser-2022: out of disk space, will keep trying\n");
+					already_whined = 1;
+				}
+				close(fd);
+				return;
+			}
+			perror("write() failed");
+			exit(errno);
+		}
+	}
+
+	/* close the file */
+	if (close(fd)) {
+		perror("close() failed");
+		exit(errno);
+	}
 }
 
 /* print the statistics on how many files were created of what size */
 
 void print_stats()
 {
-  if (!stats) return;
+	if (!stats)
+		return;
 
-  printf("\n");
-  printf("File stats: Units are decimal (1k = 1000)\n");
-  printf("files 0-100    : %i\n",fsz_0_100);
-  printf("files 100-1K   : %i\n",fsz_100_1k);
-  printf("files 1K-10K   : %i\n",fsz_1k_10k);
-  printf("files 10K-100K : %i\n",fsz_10k_100k);
-  printf("files 100K-1M  : %i\n",fsz_100k_1m);
-  printf("files 1M-10M    : %i\n",fsz_1m_10m);
-  printf("files 10M-larger    : %i\n",fsz_10m_larger);
-  printf("total bytes written    : %lu\n",byte_total);
+	printf("\n");
+	printf("File stats: Units are decimal (1k = 1000)\n");
+	printf("files 0-100    : %i\n", fsz_0_100);
+	printf("files 100-1K   : %i\n", fsz_100_1k);
+	printf("files 1K-10K   : %i\n", fsz_1k_10k);
+	printf("files 10K-100K : %i\n", fsz_10k_100k);
+	printf("files 100K-1M  : %i\n", fsz_100k_1m);
+	printf("files 1M-10M    : %i\n", fsz_1m_10m);
+	printf("files 10M-larger    : %i\n", fsz_10m_larger);
+	printf("total bytes written    : %lu\n", byte_total);
 
 }
+
 /* predict the number of files that will be created before max_bytes total
    length of files is reached */
-long determine_nr_of_files(int median_file_size, double max_file_size, long bytes_to_consume)
+long determine_nr_of_files(int median_file_size, double max_file_size,
+			   long bytes_to_consume)
 {
-  long nr_of_files = 0, byte_total = 0;
+	long nr_of_files = 0, byte_total = 0;
 
-  /* the next line is not necessary as 1 is the default, it is just cautious
-     coding */
-  srand(1);
-  while (byte_total < bytes_to_consume)
-    {
-      byte_total += determine_size(median_file_size, max_file_size);
-      nr_of_files++;
-    }
-  /* reset the random number generator so that when we determine_size() of the
-     files later they will be created with the same "random" sequence used in
-     this calculation */
-  srand(1);
+	/* the next line is not necessary as 1 is the default, it is just cautious
+	   coding */
+	srand(1);
+	while (byte_total < bytes_to_consume) {
+		byte_total += determine_size(median_file_size, max_file_size);
+		nr_of_files++;
+	}
+	/* reset the random number generator so that when we determine_size() of the
+	   files later they will be created with the same "random" sequence used in
+	   this calculation */
+	srand(1);
 #ifdef DEBUG
-  printf("number of files is %d\n",  (int) nr_of_files);
+	printf("number of files is %d\n", (int)nr_of_files);
 #endif /* DEBUG */
-  fflush(NULL);
-  return nr_of_files;
+	fflush(NULL);
+	return nr_of_files;
 }
 
 /* fill the current working directory with nr_files_this_directory number of
    files*/
 
-void fill_this_directory(long nr_files_this_directory, long median_file_size, long maximum_size)
+void fill_this_directory(long nr_files_this_directory, long median_file_size,
+			 long maximum_size)
 {
-  long size;
+	long size;
 
 #ifdef DEBUG
-  printf("filling with %lu files, ", nr_files_this_directory);
+	printf("filling with %lu files, ", nr_files_this_directory);
 #endif
-  while (nr_files_this_directory--)
-    {
+	while (nr_files_this_directory--) {
 		size = determine_size(median_file_size, maximum_size);
 		byte_total += size;
 		make_file(size);
-    }
+	}
 }
 
 /* this will unfortunately handle out of disk space by forever trying */
 /* What we should do in out of space situaltion ? I think we must skip this
    directory and continue files/dirs creation process. Error value (!= 0)
    indicates that we can't go to this directory. -zam */
-int make_directory(char * dirname)
+int make_directory(char *dirname)
 {
-  static long this_directory_number = 0;
+	static long this_directory_number = 0;
 
-  strcpy(tdir, path);
-  strcat(tdir, "/");
-  strcat(tdir, dirname);
+	strcpy(tdir, path);
+	strcat(tdir, "/");
+	strcat(tdir, dirname);
 
-  if (mkdir(tdir, 0755) == -1) {
-    if (errno == ENOSPC) {
-      if (!already_whined) {
-	printf("reiser-2021: out of disk space, ");
-	already_whined = 1;
-      }
-      return errno;
-    }
-    /*  it is sometimes useful to be able to run this program more than once
-	inside the same directory, and that means skipping over filenames that
-	already exist.  Thus we ignore EEXIST, and pay attention to all else. */
-    if (errno != EEXIST) {
-      perror ("mkdir");
-      exit (errno);
-    }
-  }
-  sprintf(dirname, "d%lu", this_directory_number++);
-  strcpy(tdir, path);
-  strcat(tdir, "/");
-  strcat(tdir, dirname);
+	if (mkdir(tdir, 0755) == -1) {
+		if (errno == ENOSPC) {
+			if (!already_whined) {
+				printf("reiser-2021: out of disk space, ");
+				already_whined = 1;
+			}
+			return errno;
+		}
+		/*  it is sometimes useful to be able to run this program more than once
+		   inside the same directory, and that means skipping over filenames that
+		   already exist.  Thus we ignore EEXIST, and pay attention to all else. */
+		if (errno != EEXIST) {
+			perror("mkdir");
+			exit(errno);
+		}
+	}
+	sprintf(dirname, "d%lu", this_directory_number++);
+	strcpy(tdir, path);
+	strcat(tdir, "/");
+	strcat(tdir, dirname);
 
-        return 0;
+	return 0;
 }
 
 /* assumes we are already chdir'd into a directory that the subtree is rooted
    at.  Fills the directory with files and subdirectories, cd's into those
    subdirectories, and recurses upon itself */
 
-void  do_subtree(
-		 /* the start and end of the portion of the directory sizes
-                    array which corresponds to the sizes of the directories
-                    composing this subtree */
-		 /* sizes_end minus sizes_start is equal to the number of
-		    directories in this subtree */
-		 long * sizes_start, long * sizes_end,
-
-		 long median_file_size, long maximum_file_size, long median_dir_branching, long max_dir_branching
-		 )
+void do_subtree(
+		       /* the start and end of the portion of the directory sizes
+		          array which corresponds to the sizes of the directories
+		          composing this subtree */
+		       /* sizes_end minus sizes_start is equal to the number of
+		          directories in this subtree */
+		       long *sizes_start, long *sizes_end,
+		       long median_file_size, long maximum_file_size,
+		       long median_dir_branching, long max_dir_branching)
 {
-  long * p;
-  long * sub_start;
-  long * sub_end;
-  int index_subdirectory_to_add_directory_to;
-  long * dirs_in_subtrees;
-  char * subtree_name;
-  long * sizes_index = sizes_start;
-  char subtree_name_array[128];
-  long this_directory_branching;
-  static long this_directorys_number;
+	long *p;
+	long *sub_start;
+	long *sub_end;
+	int index_subdirectory_to_add_directory_to;
+	long *dirs_in_subtrees;
+	char *subtree_name;
+	long *sizes_index = sizes_start;
+	char subtree_name_array[128];
+	long this_directory_branching;
+	static long this_directorys_number;
 
-  subtree_name = subtree_name_array;
-  /* fill this directory with its number of files */
-  fill_this_directory(*sizes_index, median_file_size, maximum_file_size);
-  sizes_index++;
-  /* ok, now randomly assign directories (and their number of files) among the
-     subdirectories that will be created if at least one directory is assigned
-     to it */
+	subtree_name = subtree_name_array;
+	/* fill this directory with its number of files */
+	fill_this_directory(*sizes_index, median_file_size, maximum_file_size);
+	sizes_index++;
+	/* ok, now randomly assign directories (and their number of files) among the
+	   subdirectories that will be created if at least one directory is assigned
+	   to it */
 
-  /* this will cause the random number sequence to not match the one used in
-     determine_nr_files() I need to accumulate my values in an array
-     beforehand. I'll code that later.  */
-  /* worry about whether 0 or 1 is a problem value */
-  this_directory_branching = determine_size(median_dir_branching, max_dir_branching) + 1;
+	/* this will cause the random number sequence to not match the one used in
+	   determine_nr_files() I need to accumulate my values in an array
+	   beforehand. I'll code that later.  */
+	/* worry about whether 0 or 1 is a problem value */
+	this_directory_branching =
+	    determine_size(median_dir_branching, max_dir_branching) + 1;
 
-  /* create an array holding the number of directories assigned to each
-     potential subdirectory */
-  dirs_in_subtrees = calloc(this_directory_branching, sizeof(long));
-  while (sizes_index <= sizes_end)
-    {
-      index_subdirectory_to_add_directory_to=(rand() % this_directory_branching);
-      (*(dirs_in_subtrees+ index_subdirectory_to_add_directory_to))++;
-      sizes_index++;
-    }
-  /* the +1 is for the fill_directory() we did above */
-  sizes_index = sizes_start + 1;
+	/* create an array holding the number of directories assigned to each
+	   potential subdirectory */
+	dirs_in_subtrees = calloc(this_directory_branching, sizeof(long));
+	while (sizes_index <= sizes_end) {
+		index_subdirectory_to_add_directory_to =
+		    (rand() % this_directory_branching);
+		(*
+		 (dirs_in_subtrees + index_subdirectory_to_add_directory_to))++;
+		sizes_index++;
+	}
+	/* the +1 is for the fill_directory() we did above */
+	sizes_index = sizes_start + 1;
 
-  /* go through each potential subdirectory, and if at least one directory has
-     been assigned to it, create it and recurse */
-  for (p= dirs_in_subtrees; p < (dirs_in_subtrees + this_directory_branching);p++)
-    {
-      if (*p) {
-	int nocd;
-	sprintf(subtree_name, "d%lu", this_directorys_number++);
-	nocd = make_directory(subtree_name);
-	/* if make_dir.. may fails (in out of space situation), we continue
-	   creation process in same dir */
-	if (!nocd)
-	  chngdir (subtree_name);
-	sub_start = sizes_index;
-	/* the minus one is because *p is the number of elements and arrays start at 0 */
-	sub_end = (sizes_index + (*p - 1));
+	/* go through each potential subdirectory, and if at least one directory has
+	   been assigned to it, create it and recurse */
+	for (p = dirs_in_subtrees;
+	     p < (dirs_in_subtrees + this_directory_branching); p++) {
+		if (*p) {
+			int nocd;
+			sprintf(subtree_name, "d%lu", this_directorys_number++);
+			nocd = make_directory(subtree_name);
+			/* if make_dir.. may fails (in out of space situation), we continue
+			   creation process in same dir */
+			if (!nocd)
+				chngdir(subtree_name);
+			sub_start = sizes_index;
+			/* the minus one is because *p is the number of elements and arrays start at 0 */
+			sub_end = (sizes_index + (*p - 1));
 
 #ifdef DEBUG
-	/* comment this back in if the array logic has you going cross-eyed */
-	/*  	printf ("sizes_start is %p, sizes_index is %p, sizes_index+p is %p, sizes_end is %p\n", sizes_start, sub_start, sub_end, sizes_end); */
+			/* comment this back in if the array logic has you going cross-eyed */
+			/*      printf ("sizes_start is %p, sizes_index is %p, sizes_index+p is %p, sizes_end is %p\n", sizes_start, sub_start, sub_end, sizes_end); */
 #endif
-	do_subtree(sub_start, sub_end, median_file_size, maximum_file_size, median_dir_branching, max_dir_branching);
-	if (!nocd)
-	  chngdir("..");
-      }
-      sizes_index += *p;
-    }
+			do_subtree(sub_start, sub_end, median_file_size,
+				   maximum_file_size, median_dir_branching,
+				   max_dir_branching);
+			if (!nocd)
+				chngdir("..");
+		}
+		sizes_index += *p;
+	}
 }
 
 /* We have already determined that nr_files can fit in bytes_to_consume space.
    Fill the sizes array with the number of files to be in each directory, and
    then call do_subtree to fill the tree with files and directories.  */
 
-void make_fractal_tree (long median_file_size, long maximum_file_size, long median_dir_nr_files, long max_dir_nr_files, long median_dir_branching, long max_dir_branching, long nr_files)
+void make_fractal_tree(long median_file_size, long maximum_file_size,
+		       long median_dir_nr_files, long max_dir_nr_files,
+		       long median_dir_branching, long max_dir_branching,
+		       long nr_files)
 {
-  long * sizes_start;
-  long * sizes_end;
-  long * sizes_index;
-  long remaining_files = nr_files;
+	long *sizes_start;
+	long *sizes_end;
+	long *sizes_index;
+	long remaining_files = nr_files;
 
-  /* collect together array of directory sizes for whole filesystem.  This
-     cannot easily be done recursively without distorting the directory sizes
-     and making deeper directories smaller.  Send me the code if you
-     disagree.:-) */
-  /* we almost certainly don't need this much space, but so what.... */
-  sizes_index = sizes_start = malloc(nr_files * sizeof(long));
-  for (;remaining_files > 0;)
-    {
-    *sizes_index = determine_size(median_dir_nr_files, max_dir_nr_files);
-    // we alloc space for nr_files, so we should avoid
-    // number of files in directory = 0 -grev.
-    if (*sizes_index == 0)
-      *sizes_index = 1;
-    *sizes_index = (*sizes_index < remaining_files) ? *sizes_index : remaining_files;
+	/* collect together array of directory sizes for whole filesystem.  This
+	   cannot easily be done recursively without distorting the directory sizes
+	   and making deeper directories smaller.  Send me the code if you
+	   disagree.:-) */
+	/* we almost certainly don't need this much space, but so what.... */
+	sizes_index = sizes_start = malloc(nr_files * sizeof(long));
+	for (; remaining_files > 0;) {
+		*sizes_index =
+		    determine_size(median_dir_nr_files, max_dir_nr_files);
+		// we alloc space for nr_files, so we should avoid
+		// number of files in directory = 0 -grev.
+		if (*sizes_index == 0)
+			*sizes_index = 1;
+		*sizes_index =
+		    (*sizes_index <
+		     remaining_files) ? *sizes_index : remaining_files;
 
 #ifdef DEBUG
-    printf("*sizes_index == %lu, ", *sizes_index);
+		printf("*sizes_index == %lu, ", *sizes_index);
 #endif
-    remaining_files -= *sizes_index;
-    sizes_index++;
-    }
-  /* don't decrement below sizes_start if nr_files is 0 */
-  sizes_end = (sizes_index-- > sizes_start) ? sizes_index: sizes_start;
+		remaining_files -= *sizes_index;
+		sizes_index++;
+	}
+	/* don't decrement below sizes_start if nr_files is 0 */
+	sizes_end = (sizes_index-- > sizes_start) ? sizes_index : sizes_start;
 
-  sizes_index = sizes_start;
-  srand(1);
-  do_subtree(sizes_start, sizes_end, median_file_size, maximum_file_size, median_dir_branching, max_dir_branching);
+	sizes_index = sizes_start;
+	srand(1);
+	do_subtree(sizes_start, sizes_end, median_file_size, maximum_file_size,
+		   median_dir_branching, max_dir_branching);
 
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
-  /* initialized from argv[] */
-  long median_file_size,
-    median_dir_branching,
-    median_dir_nr_files,
-    max_dir_nr_files,
-    max_dir_branching,
-    max_file_size;
-  long nr_of_files = 0;  /* files to be created */
+	/* initialized from argv[] */
+	long median_file_size,
+	    median_dir_branching,
+	    median_dir_nr_files,
+	    max_dir_nr_files, max_dir_branching, max_file_size;
+	long nr_of_files = 0;	/* files to be created */
 
-  if (argc != 11)
-    {
-      print_usage();
-      exit(1);
-    }
+	if (argc != 11) {
+		print_usage();
+		exit(1);
+	}
 
-  write_buffer_size = atoi(argv[8]);
-  write_buffer = (char *) malloc(write_buffer_size);
-  memset (write_buffer, 'a', write_buffer_size);
+	write_buffer_size = atoi(argv[8]);
+	write_buffer = (char *)malloc(write_buffer_size);
+	memset(write_buffer, 'a', write_buffer_size);
 
-  /* the number of bytes that we desire this tree to consume.  It will actually
-     consume more, because the last file will overshoot by a random amount, and
-     because the directories and metadata will consume space.  */
-  bytes_to_consume = atol(argv[1]);
-  max_file_size = atol(argv[3]);
-  median_file_size = atol(argv[2]);
-  /* Figure out how many random files will fit into bytes_to_consume bytes. We
-     depend on resetting rand() to get the same result later. */
-  nr_of_files = determine_nr_of_files(median_file_size, max_file_size, bytes_to_consume);
+	/* the number of bytes that we desire this tree to consume.  It will actually
+	   consume more, because the last file will overshoot by a random amount, and
+	   because the directories and metadata will consume space.  */
+	bytes_to_consume = atol(argv[1]);
+	max_file_size = atol(argv[3]);
+	median_file_size = atol(argv[2]);
+	/* Figure out how many random files will fit into bytes_to_consume bytes. We
+	   depend on resetting rand() to get the same result later. */
+	nr_of_files =
+	    determine_nr_of_files(median_file_size, max_file_size,
+				  bytes_to_consume);
 
-  strcpy(path, argv[9]);
-  mkdir(path, 0755);
-  stats = atol(argv[10]);
-  median_dir_branching = atol(argv[6]);
-  max_dir_branching = atol(argv[7]);
-  median_dir_nr_files = atol(argv[4]);
-  max_dir_nr_files = atol(argv[5]);
-  make_fractal_tree(median_file_size, max_file_size, median_dir_nr_files, max_dir_nr_files, median_dir_branching, max_dir_branching, nr_of_files);
-  print_stats();
-  if (stats) printf("\nreiser_fract_tree finished\n");
+	strcpy(path, argv[9]);
+	mkdir(path, 0755);
+	stats = atol(argv[10]);
+	median_dir_branching = atol(argv[6]);
+	max_dir_branching = atol(argv[7]);
+	median_dir_nr_files = atol(argv[4]);
+	max_dir_nr_files = atol(argv[5]);
+	make_fractal_tree(median_file_size, max_file_size, median_dir_nr_files,
+			  max_dir_nr_files, median_dir_branching,
+			  max_dir_branching, nr_of_files);
+	print_stats();
+	if (stats)
+		printf("\nreiser_fract_tree finished\n");
 
-        return 0;
+	return 0;
 }
diff --git a/testcases/kernel/fs/mongo/summ.c b/testcases/kernel/fs/mongo/summ.c
index ff2e12c..c5712a4 100644
--- a/testcases/kernel/fs/mongo/summ.c
+++ b/testcases/kernel/fs/mongo/summ.c
@@ -6,20 +6,22 @@
 #include <stdlib.h>
 char str[100];
 
-int main(int argc, char **argv) {
-char c, *p;
-int sum=0, n=0;
+int main(int argc, char **argv)
+{
+	char c, *p;
+	int sum = 0, n = 0;
 
-    p = str;
-    while ((c=getchar()) != EOF) {
-	if (c != '\n') {
-	     *p++ = c;
-	}else {
-	    *p = '\0';
-	    n = atol(str);
-	    sum += n;
-	    printf("%i\n", sum);
-	    p = str; *p = '\0';
+	p = str;
+	while ((c = getchar()) != EOF) {
+		if (c != '\n') {
+			*p++ = c;
+		} else {
+			*p = '\0';
+			n = atol(str);
+			sum += n;
+			printf("%i\n", sum);
+			p = str;
+			*p = '\0';
+		}
 	}
-    }
 }
diff --git a/testcases/kernel/fs/openfile/openfile.c b/testcases/kernel/fs/openfile/openfile.c
index a04d47e..f055587 100644
--- a/testcases/kernel/fs/openfile/openfile.c
+++ b/testcases/kernel/fs/openfile/openfile.c
@@ -55,7 +55,7 @@
 /* Global Variables */
 int numthreads = 10, numfiles = 10;
 int debug = 0;
-char * filename = "FILETOOPEN";
+char *filename = "FILETOOPEN";
 
 void setup(void)
 {
@@ -69,7 +69,7 @@
 }
 
 /* Procedures */
-void *threads(void* thread_id);
+void *threads(void *thread_id);
 
 /* **************************************************************************
  *                              MAIN PROCEDURE                            *
@@ -84,7 +84,7 @@
 	extern char *optarg;
 
 	while ((opt = getopt(argc, argv, "df:t:h")) != EOF) {
-		switch ((char) opt) {
+		switch ((char)opt) {
 		case 'd':
 			debug = 1;
 			break;
@@ -150,8 +150,9 @@
 	/* Create threads */
 	for (i = 0; i < numthreads; i++)
 		if (pthread_create(&th_id, (pthread_attr_t *) NULL, threads,
-				(void *) (uintptr_t) i)) {
-			tst_resm(TFAIL, "failed creating a pthread; increase limits");
+				   (void *)(uintptr_t) i)) {
+			tst_resm(TFAIL,
+				 "failed creating a pthread; increase limits");
 			fclose(fd);
 			unlink(filename);
 			cleanup();
@@ -160,7 +161,8 @@
 	/* Sleep until all threads are created */
 	while (c.thr_sleeping != numthreads)
 		if (pthread_cond_wait(&c.init_cv, &c.m)) {
-			tst_resm(TFAIL, "error while waiting for reading threads");
+			tst_resm(TFAIL,
+				 "error while waiting for reading threads");
 			fclose(fd);
 			unlink(filename);
 			cleanup();
@@ -193,7 +195,8 @@
  *				OTHER PROCEDURES			    *
  ************************************************************************** */
 
-void close_files(FILE *fd_list[], int len) {
+void close_files(FILE * fd_list[], int len)
+{
 	int i;
 	for (i = 0; i < len; i++) {
 		fclose(fd_list[i]);
@@ -201,7 +204,8 @@
 }
 
 /* threads: Each thread opens the files specified */
-void * threads(void* thread_id_) {
+void *threads(void *thread_id_)
+{
 	int thread_id = (uintptr_t) thread_id_;
 	char errmsg[80];
 	FILE *fd_list[MAXFILES];
@@ -210,15 +214,16 @@
 	/* Open files */
 	for (i = 0; i < numfiles; i++) {
 		if (debug)
-			printf("Thread  %d : Opening file number %d \n", thread_id, i);
+			printf("Thread  %d : Opening file number %d \n",
+			       thread_id, i);
 		if ((fd_list[i] = fopen(filename, "rw")) == NULL) {
 			sprintf(errmsg, "FAIL - Couldn't open file #%d", i);
 			perror(errmsg);
 			if (i > 0) {
-				close_files(fd_list, i-1);
+				close_files(fd_list, i - 1);
 			}
 			unlink(filename);
-			pthread_exit((void*) 1);
+			pthread_exit((void *)1);
 		}
 	}
 
@@ -227,7 +232,7 @@
 		perror("FAIL - failed to grab mutex lock");
 		close_files(fd_list, numfiles);
 		unlink(filename);
-		pthread_exit((void*) 1);
+		pthread_exit((void *)1);
 	}
 
 	/* Check if you should wake up main thread */
@@ -236,7 +241,7 @@
 			perror("FAIL - failed to signal main thread");
 			close_files(fd_list, numfiles);
 			unlink(filename);
-			pthread_exit((void*) 1);
+			pthread_exit((void *)1);
 		}
 
 	/* Sleep until woken up */
@@ -244,7 +249,7 @@
 		perror("FAIL - failed to wake up correctly");
 		close_files(fd_list, numfiles);
 		unlink(filename);
-		pthread_exit((void*) 1);
+		pthread_exit((void *)1);
 	}
 
 	/* Release mutex lock */
@@ -252,11 +257,11 @@
 		perror("FAIL - failed to release mutex lock");
 		close_files(fd_list, numfiles);
 		unlink(filename);
-		pthread_exit((void*) 1);
+		pthread_exit((void *)1);
 	}
 
 	/* Close file handles and exit */
 	close_files(fd_list, numfiles);
 	unlink(filename);
-	pthread_exit((void*) 0);
+	pthread_exit((void *)0);
 }
diff --git a/testcases/kernel/fs/scsi/ltpfs/LtpfsCmds.c b/testcases/kernel/fs/scsi/ltpfs/LtpfsCmds.c
index 69f8580..0b56170 100644
--- a/testcases/kernel/fs/scsi/ltpfs/LtpfsCmds.c
+++ b/testcases/kernel/fs/scsi/ltpfs/LtpfsCmds.c
@@ -33,22 +33,23 @@
 #define FALSE          0
 #include "Ltpfs.h"
 
-static int     ltpdev_open( struct inode *inode, struct file *pfile);
-static int     ltpdev_release( struct inode *inode, struct file *pfile);
-static int     ltpdev_ioctl ( struct inode *pinode, struct file *pfile, unsigned int cmd, unsigned long arg );
-static int     do_buffer_c_tests(void);
+static int ltpdev_open(struct inode *inode, struct file *pfile);
+static int ltpdev_release(struct inode *inode, struct file *pfile);
+static int ltpdev_ioctl(struct inode *pinode, struct file *pfile,
+			unsigned int cmd, unsigned long arg);
+static int do_buffer_c_tests(void);
 
 static struct block_device_operations blkops = {
-open:       ltpdev_open,
-release:    ltpdev_release,
-ioctl:      ltpdev_ioctl,
+open:	ltpdev_open,
+release:ltpdev_release,
+ioctl:	ltpdev_ioctl,
 };
 
 int ltp_fs_major = LTPMAJOR;
 int test_iteration = 0;
 
 static char genhd_flags = 0;
-static struct gendisk * gd_ptr;
+static struct gendisk *gd_ptr;
 static spinlock_t bdev_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 
 MODULE_AUTHOR("Martin Ridgeway <mridge@us.ibm.com>");
@@ -65,77 +66,78 @@
 //static int __emul_lookup_dentry(const char *name, struct nameidata *nd);
 void path_release(struct nameidata *nd);
 
-static int ltpdev_open (struct inode *pinode, struct file *pfile)
+static int ltpdev_open(struct inode *pinode, struct file *pfile)
 {
-    printk(KERN_ALERT "ltpdev_open \n");
-  return 0;
+	printk(KERN_ALERT "ltpdev_open \n");
+	return 0;
 }
 
-static int ltpdev_release (struct inode *pinode, struct file *pfile)
+static int ltpdev_release(struct inode *pinode, struct file *pfile)
 {
 
-    printk(KERN_ALERT "ltpdev_release \n");
-  return 0;
+	printk(KERN_ALERT "ltpdev_release \n");
+	return 0;
 }
 
-static int ltpdev_ioctl ( struct inode *pinode, struct file *pfile, unsigned int cmd, unsigned long arg )
+static int ltpdev_ioctl(struct inode *pinode, struct file *pfile,
+			unsigned int cmd, unsigned long arg)
 {
 
-    struct bio *my_bio = NULL;
-    struct bio *my_bio_copy = NULL;
+	struct bio *my_bio = NULL;
+	struct bio *my_bio_copy = NULL;
 	request_queue_t *q = NULL;
-    struct block_device *bdev = NULL;
-    unsigned long uaddr;
+	struct block_device *bdev = NULL;
+	unsigned long uaddr;
 
-    unsigned int bytes_done = 100;
+	unsigned int bytes_done = 100;
 
-    int          error = 0;
-    int          rc = 0;
+	int error = 0;
+	int rc = 0;
 
     /*****************************************************************************/
 
-    printk(KERN_ALERT "ltpdev_ioctl fs tests\n");
+	printk(KERN_ALERT "ltpdev_ioctl fs tests\n");
 
-    switch (cmd) {
+	switch (cmd) {
 
-    case LTPAIODEV_CMD:
-        printk(KERN_ALERT "Running AIO FS tests \n");
-        printk(KERN_ALERT "AIO FS tests complete\n");
-        break;
+	case LTPAIODEV_CMD:
+		printk(KERN_ALERT "Running AIO FS tests \n");
+		printk(KERN_ALERT "AIO FS tests complete\n");
+		break;
 
-    case LTPBIODEV_CMD:
+	case LTPBIODEV_CMD:
 
-        printk(KERN_ALERT "Running BIO FS tests \n");
+		printk(KERN_ALERT "Running BIO FS tests \n");
 
-        my_bio = bio_alloc(GFP_KERNEL, 0);
-        if (!my_bio) {
-            printk(KERN_ALERT "Error getting kernel slab memory !!\n");
-        }
-        else {
-            printk(KERN_ALERT "kernel slab memory alloc OK\n");
-        }
+		my_bio = bio_alloc(GFP_KERNEL, 0);
+		if (!my_bio) {
+			printk(KERN_ALERT
+			       "Error getting kernel slab memory !!\n");
+		} else {
+			printk(KERN_ALERT "kernel slab memory alloc OK\n");
+		}
 
-        bio_endio(my_bio, bytes_done, error);
+		bio_endio(my_bio, bytes_done, error);
 
-        printk(KERN_ALERT "Return from bio_endio = %d \n", error);
+		printk(KERN_ALERT "Return from bio_endio = %d \n", error);
 
-        my_bio_copy = bio_clone(my_bio,GFP_ATOMIC);
+		my_bio_copy = bio_clone(my_bio, GFP_ATOMIC);
 
-        if (!my_bio_copy) {
-            printk(KERN_ALERT "Error getting kernel bio clone !!\n");
-        }
-        else {
-            printk(KERN_ALERT "kernel bio clone OK\n");
-        }
+		if (!my_bio_copy) {
+			printk(KERN_ALERT
+			       "Error getting kernel bio clone !!\n");
+		} else {
+			printk(KERN_ALERT "kernel bio clone OK\n");
+		}
 
-        my_bio_copy = bio_clone(my_bio,GFP_NOIO);
+		my_bio_copy = bio_clone(my_bio, GFP_NOIO);
 
-        if (!my_bio_copy) {
-            printk(KERN_ALERT "Error getting kernel bio clone !!\n");
-        }
-        else {
-            printk(KERN_ALERT "kernel bio clone OK\n");
-        }
+		if (!my_bio_copy) {
+			printk(KERN_ALERT
+			       "Error getting kernel bio clone !!\n");
+		} else {
+			printk(KERN_ALERT "kernel bio clone OK\n");
+		}
 
 //        q = bdev_get_queue(my_bio->bi_bdev);
 
@@ -143,104 +145,108 @@
 
 //        rc = bio_hw_segments(q, my_bio);
 
-        bdev = lookup_bdev(LTP_FS_DEVICE_NAME);
+		bdev = lookup_bdev(LTP_FS_DEVICE_NAME);
 
-        printk(KERN_ALERT "return from bdev size %d\n", bdev->bd_block_size);
+		printk(KERN_ALERT "return from bdev size %d\n",
+		       bdev->bd_block_size);
 
-        printk(KERN_ALERT "Return from phys_segments = %d \n", rc);
+		printk(KERN_ALERT "Return from phys_segments = %d \n", rc);
 
 //        Don't use this API, causes system to hang and corrupts FS
 //        bio_put(my_bio);
 
-        (char *)uaddr = kmalloc(TEST_MEM_SIZE, GFP_KERNEL);
+		(char *)uaddr = kmalloc(TEST_MEM_SIZE, GFP_KERNEL);
 
-        my_bio_copy = bio_map_user(bdev, uaddr, TEST_MEM_SIZE, FALSE);
+		my_bio_copy = bio_map_user(bdev, uaddr, TEST_MEM_SIZE, FALSE);
 
-        printk(KERN_ALERT "Return from bio_map_user %p\n", my_bio_copy);
+		printk(KERN_ALERT "Return from bio_map_user %p\n", my_bio_copy);
 
-        do_buffer_c_tests();
+		do_buffer_c_tests();
 
-        printk(KERN_ALERT "BIO FS tests complete\n");
+		printk(KERN_ALERT "BIO FS tests complete\n");
 
-    break;
-    }
+		break;
+	}
 
-  return 0;
+	return 0;
 }
 
 static int ltp_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
-  return 0;
+	return 0;
 }
 
 int init_module(void)
 {
-    int                result;
+	int result;
 
-    printk(KERN_ALERT "ltpdev_init_module \n");
+	printk(KERN_ALERT "ltpdev_init_module \n");
 
 	ltp_pm_dev = pm_register(PM_UNKNOWN_DEV, 0, ltp_pm_callback);
 
-    result = register_blkdev(ltp_fs_major, LTP_FS_DEV_NAME);
+	result = register_blkdev(ltp_fs_major, LTP_FS_DEV_NAME);
 
-    printk(KERN_ALERT "LTP FS: register_blkdev result=%d major %d\n",result, ltp_fs_major);
+	printk(KERN_ALERT "LTP FS: register_blkdev result=%d major %d\n",
+	       result, ltp_fs_major);
 
-    if (result < 0) {
-        printk(KERN_ALERT "LTP FS: can't get major %d\n",ltp_fs_major);
-        return result;
-    }
+	if (result < 0) {
+		printk(KERN_ALERT "LTP FS: can't get major %d\n", ltp_fs_major);
+		return result;
+	}
 
 	gd_ptr = kmalloc(sizeof(struct gendisk *), GFP_KERNEL);
 
-    if (!gd_ptr) {
-        printk(KERN_ALERT "ERROR getting memory !!!\n");
-      return 0;
-    }
+	if (!gd_ptr) {
+		printk(KERN_ALERT "ERROR getting memory !!!\n");
+		return 0;
+	}
 
-    gd_ptr = alloc_disk(1);
+	gd_ptr = alloc_disk(1);
 
-    printk(KERN_ALERT "gd_ptr after alloc = %p \n",gd_ptr);
+	printk(KERN_ALERT "gd_ptr after alloc = %p \n", gd_ptr);
 
-    gd_ptr->major = ltp_fs_major;
-    gd_ptr->first_minor = 0;
-    gd_ptr->fops = &blkops;
-    gd_ptr->driverfs_dev = NULL;
-    gd_ptr->capacity = MAX_NUM_DISKS;
-    gd_ptr->flags = genhd_flags;
+	gd_ptr->major = ltp_fs_major;
+	gd_ptr->first_minor = 0;
+	gd_ptr->fops = &blkops;
+	gd_ptr->driverfs_dev = NULL;
+	gd_ptr->capacity = MAX_NUM_DISKS;
+	gd_ptr->flags = genhd_flags;
 
-    sprintf(gd_ptr->disk_name, LTP_FS_DEV_NAME);
+	sprintf(gd_ptr->disk_name, LTP_FS_DEV_NAME);
 
-    add_disk(gd_ptr);
+	add_disk(gd_ptr);
 
-  return 0;
+	return 0;
 }
 
 void cleanup_module(void)
 {
 
-    printk(KERN_ALERT "Exiting module and cleaning up \n");
+	printk(KERN_ALERT "Exiting module and cleaning up \n");
 
-    pm_unregister(ltp_pm_dev);
+	pm_unregister(ltp_pm_dev);
 
-    put_disk(gd_ptr);
+	put_disk(gd_ptr);
 
-    del_gendisk(gd_ptr);
+	del_gendisk(gd_ptr);
 
-    unregister_blkdev(ltp_fs_major, LTP_FS_DEV_NAME);
+	unregister_blkdev(ltp_fs_major, LTP_FS_DEV_NAME);
 
 }
+
 static int do_buffer_c_tests()
 {
-    int line_no = 0;
+	int line_no = 0;
 
-    printk(KERN_ALERT "Starting buffer.c coverage tests... \n");
+	printk(KERN_ALERT "Starting buffer.c coverage tests... \n");
 
-    __buffer_error("Test file", line_no);
+	__buffer_error("Test file", line_no);
 
-    printk(KERN_ALERT "buffer.c coverage tests complete...\n");
+	printk(KERN_ALERT "buffer.c coverage tests complete...\n");
 
-  return 0;
+	return 0;
 }
+
 /**
  * lookup_bdev  - lookup a struct block_device by name
  *
diff --git a/testcases/kernel/fs/scsi/ltpfs/main.c b/testcases/kernel/fs/scsi/ltpfs/main.c
index 259dadb..dc3e8f3 100644
--- a/testcases/kernel/fs/scsi/ltpfs/main.c
+++ b/testcases/kernel/fs/scsi/ltpfs/main.c
@@ -34,17 +34,19 @@
 // Globals
 
 char wbuf[MAXFSIZE];
-int startc=0;
-int showchar[]={124,47,45,92,124,47,45,92};
+int startc = 0;
+int showchar[] = { 124, 47, 45, 92, 124, 47, 45, 92 };
+
 int nullFileHandle;
-int openlog[2]={0,0};
+int openlog[2] = { 0, 0 };
+
 int cFileCount, dFileCount, errorCount;
 static int disk_space_pool = 0;
 char rootPath[BUFFSIZE];
 
 int LTP_fs_open_block_device(void);
-int do_fs_thump_tests(char * path);
-int do_create_file_test(char * path);
+int do_fs_thump_tests(char *path);
+int do_create_file_test(char *path);
 int makedir(char *dir1);
 int changedir(char *dir);
 int do_random_access_test(int maxNum);
@@ -55,562 +57,591 @@
 int open_read_close(char *fname);
 int create_or_delete(char *fname);
 int do_tree_cleanup(char *path, int flag);
-int cleanup_files(char * file, struct stat * statBuff, int flag);
-int cleanup_dirs(char * file, struct stat * statBuff, int flag);
+int cleanup_files(char *file, struct stat *statBuff, int flag);
+int cleanup_dirs(char *file, struct stat *statBuff, int flag);
 
-int ltp_block_dev_handle = 0;      /* handle to LTP Test block device */
+int ltp_block_dev_handle = 0;	/* handle to LTP Test block device */
 int ltp_fileHandle = 0;
-char * fileBuf;
+char *fileBuf;
 
 int main(int argc, char **argv)
 {
 
-    ltpdev_cmd_t  cmd = {0,0};
-    int rc, i, tmpHandle;
-    struct stat statBuf;
+	ltpdev_cmd_t cmd = { 0, 0 };
+	int rc, i, tmpHandle;
+	struct stat statBuf;
 
-    printf("[%s] - Running test program\n", argv[0]);
+	printf("[%s] - Running test program\n", argv[0]);
 
-    rc = LTP_fs_open_block_device();
+	rc = LTP_fs_open_block_device();
 
-    if (!rc) {
+	if (!rc) {
 
-        ltp_block_dev_handle = open(LTP_FS_DEVICE_NAME, O_RDWR);
+		ltp_block_dev_handle = open(LTP_FS_DEVICE_NAME, O_RDWR);
 
-        if (ltp_block_dev_handle < 0) {
-            printf("ERROR: Open of device %s failed %d errno = %d\n", LTP_FS_DEVICE_NAME,ltp_block_dev_handle, errno);
-        }
-        else {
-            rc = ioctl (ltp_block_dev_handle, LTPAIODEV_CMD, &cmd);
+		if (ltp_block_dev_handle < 0) {
+			printf
+			    ("ERROR: Open of device %s failed %d errno = %d\n",
+			     LTP_FS_DEVICE_NAME, ltp_block_dev_handle, errno);
+		} else {
+			rc = ioctl(ltp_block_dev_handle, LTPAIODEV_CMD, &cmd);
 
-            printf("return from AIO ioctl %d \n", rc);
+			printf("return from AIO ioctl %d \n", rc);
 
-            rc = ioctl (ltp_block_dev_handle, LTPBIODEV_CMD, &cmd);
+			rc = ioctl(ltp_block_dev_handle, LTPBIODEV_CMD, &cmd);
 
-            printf("return from BIO ioctl %d \n", rc);
-        }
+			printf("return from BIO ioctl %d \n", rc);
+		}
 
-    } else {
-        printf("ERROR: Create/open block device failed\n");
-    }
+	} else {
+		printf("ERROR: Create/open block device failed\n");
+	}
 
-    ltp_fileHandle = open("/tmp/testfile", O_CREAT | O_RDWR | O_SYNC | FASYNC,
-			  S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+	ltp_fileHandle =
+	    open("/tmp/testfile", O_CREAT | O_RDWR | O_SYNC | FASYNC,
+		 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-    if (ltp_fileHandle > 0) {
+	if (ltp_fileHandle > 0) {
 
-        tmpHandle = open("/usr/include/ctype.h", O_RDONLY);
+		tmpHandle = open("/usr/include/ctype.h", O_RDONLY);
 
-        if (tmpHandle > 0) {
+		if (tmpHandle > 0) {
 
-            rc = fstat(tmpHandle, &statBuf);
+			rc = fstat(tmpHandle, &statBuf);
 
-            if (!rc) {
-                fileBuf = malloc(statBuf.st_size);
+			if (!rc) {
+				fileBuf = malloc(statBuf.st_size);
 
-                if (fileBuf) {
+				if (fileBuf) {
 
-                    read (tmpHandle, fileBuf, statBuf.st_size);
-                    close(tmpHandle);
-                    write(ltp_fileHandle, fileBuf, statBuf.st_size);
+					read(tmpHandle, fileBuf,
+					     statBuf.st_size);
+					close(tmpHandle);
+					write(ltp_fileHandle, fileBuf,
+					      statBuf.st_size);
 
-                    for (i = 0 ; i < 100; i++) {
-                        read(ltp_fileHandle, fileBuf, statBuf.st_size*i);
-                        write(ltp_fileHandle, fileBuf, statBuf.st_size*i);
-                    }
-                }
+					for (i = 0; i < 100; i++) {
+						read(ltp_fileHandle, fileBuf,
+						     statBuf.st_size * i);
+						write(ltp_fileHandle, fileBuf,
+						      statBuf.st_size * i);
+					}
+				}
 
-            }
+			}
 
-        } else {
-            printf("ERROR: Create/open file failed\n");
-        }
-    }
+		} else {
+			printf("ERROR: Create/open file failed\n");
+		}
+	}
 
-    printf("*** Starting FileSystem thump tests....****\n");
-    printf("*** Please be patient, this may take a little while... ***\n");
+	printf("*** Starting FileSystem thump tests....****\n");
+	printf("*** Please be patient, this may take a little while... ***\n");
 
-    for (i = 1; i < argc; i++) {
-        printf("Running test %d of %d on FileSystem %s \n", i, argc-1, argv[i]);
-        if (strcmp(argv[i], "|") != 0) {
-            strcpy(rootPath, argv[i]);
-            rc = do_fs_thump_tests(argv[i]);
-            if (rc != 0 && rc != ENOSPC) {
-                printf("ERROR: Failed on FileSystem %s with errno %d \n", argv[i], rc);
-            }
-        }
-        else {
-            printf("Test Program complete..\n");
-            break;
-        }
+	for (i = 1; i < argc; i++) {
+		printf("Running test %d of %d on FileSystem %s \n", i, argc - 1,
+		       argv[i]);
+		if (strcmp(argv[i], "|") != 0) {
+			strcpy(rootPath, argv[i]);
+			rc = do_fs_thump_tests(argv[i]);
+			if (rc != 0 && rc != ENOSPC) {
+				printf
+				    ("ERROR: Failed on FileSystem %s with errno %d \n",
+				     argv[i], rc);
+			}
+		} else {
+			printf("Test Program complete..\n");
+			break;
+		}
 
-    }
+	}
 
-    printf("Test Program complete..\n");
+	printf("Test Program complete..\n");
 
-  return 0;
+	return 0;
 }
-int do_fs_thump_tests(char * path)
+
+int do_fs_thump_tests(char *path)
 {
-    int rc = 0;
+	int rc = 0;
 
-    printf("Changing to directory %s \n", path);
+	printf("Changing to directory %s \n", path);
 
-    changedir(path);
+	changedir(path);
 
-    cFileCount = 0;
-    dFileCount = 0;
+	cFileCount = 0;
+	dFileCount = 0;
 
-    rc |= do_create_file_test(path);
-    rc |= do_random_access_test(MAXNUM);
-    rc |= do_tree_cleanup(path, FILES_ONLY);
-    rc |= do_random_create_delete(MAXNUM);
-    rc |= do_tree_cleanup(path, ALL);
+	rc |= do_create_file_test(path);
+	rc |= do_random_access_test(MAXNUM);
+	rc |= do_tree_cleanup(path, FILES_ONLY);
+	rc |= do_random_create_delete(MAXNUM);
+	rc |= do_tree_cleanup(path, ALL);
 
-    return rc;
+	return rc;
 
 }
+
 int do_tree_cleanup(char *path, int flag)
 {
 
-  if (flag == FILES_ONLY) {
-      printf("Cleaning up test files...\n");
-      ftw(path, (void *)cleanup_files, MAXNUM);
-  }
-  else {
-      printf("Cleaning up everything in the test directory...\n");
-      ftw(path, (void *)cleanup_files, MAXNUM);
-      ftw(path, (void *)cleanup_dirs, MAXNUM);
-  }
+	if (flag == FILES_ONLY) {
+		printf("Cleaning up test files...\n");
+		ftw(path, (void *)cleanup_files, MAXNUM);
+	} else {
+		printf("Cleaning up everything in the test directory...\n");
+		ftw(path, (void *)cleanup_files, MAXNUM);
+		ftw(path, (void *)cleanup_dirs, MAXNUM);
+	}
 
-        return 0;
-}
-int cleanup_files(char * file, struct stat * statBuff, int flag)
-{
-    int rc = 0;
-
-    if (flag == FTW_F) {
-        if (unlink(file)) {
-            printf("ERROR:%d removing file %s\n", errno, file);
-        }
-    }
-
-    return rc;
+	return 0;
 }
 
-int cleanup_dirs(char * file, struct stat * statBuff, int flag)
+int cleanup_files(char *file, struct stat *statBuff, int flag)
 {
-    int rc = 0;
+	int rc = 0;
 
-    //printf("%s:Cleaning up directory %s \n", __FUNCTION__, file);
+	if (flag == FTW_F) {
+		if (unlink(file)) {
+			printf("ERROR:%d removing file %s\n", errno, file);
+		}
+	}
 
-    if (strcmp(rootPath, file) == 0) {
-      return 0;
-    }
-
-    if (flag == FTW_F) {
-        if (unlink(file)) {
-            printf("ERROR:%d removing file %s\n", errno, file);
-        }
-    }
-    else if (flag == FTW_D) {
-        changedir(file);
-        ftw(file, (void *)cleanup_dirs, MAXNUM);
-        rmdir(file);
-
-    }
-    else {
-        printf("No idea what we found here\n");
-    }
-
-    return rc;
+	return rc;
 }
 
-int do_create_file_test(char * path)
+int cleanup_dirs(char *file, struct stat *statBuff, int flag)
 {
-    int i = 0;
-    int j = 0;
-    int k = 0;
-    int l = 0;
-    int rc = 0;
+	int rc = 0;
 
-    char dir1[MAXN];
-    char dir2[MAXN];
-    char dir3[MAXN];
-    char filename[MAXN];
+	//printf("%s:Cleaning up directory %s \n", __FUNCTION__, file);
 
-    time_t t;
+	if (strcmp(rootPath, file) == 0) {
+		return 0;
+	}
 
-    int maxfiles=0xFFFFFF;
+	if (flag == FTW_F) {
+		if (unlink(file)) {
+			printf("ERROR:%d removing file %s\n", errno, file);
+		}
+	} else if (flag == FTW_D) {
+		changedir(file);
+		ftw(file, (void *)cleanup_dirs, MAXNUM);
+		rmdir(file);
 
-    time(&t);
+	} else {
+		printf("No idea what we found here\n");
+	}
 
-    srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	return rc;
+}
 
-    printf("Creating files...\n");
+int do_create_file_test(char *path)
+{
+	int i = 0;
+	int j = 0;
+	int k = 0;
+	int l = 0;
+	int rc = 0;
 
-    for (i = 0 ; i < FILE_CREATE_COUNT; i++) {
+	char dir1[MAXN];
+	char dir2[MAXN];
+	char dir3[MAXN];
+	char filename[MAXN];
 
-        sprintf(dir1,"%2.2x",i);
+	time_t t;
 
-        makedir(dir1);
+	int maxfiles = 0xFFFFFF;
 
-        changedir(dir1);
+	time(&t);
 
-        for (j = 0 ; j < FILE_CREATE_COUNT ; j++) {
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-            sprintf(dir2,"%2.2x",j);
+	printf("Creating files...\n");
 
-            makedir(dir2);
+	for (i = 0; i < FILE_CREATE_COUNT; i++) {
 
-            changedir(dir2);
+		sprintf(dir1, "%2.2x", i);
 
-            for (k = 0 ; k < FILE_CREATE_COUNT ; k++) {
+		makedir(dir1);
 
-                sprintf(dir3,"%2.2x",k);
-                makedir(dir3);
-                changedir(dir3);
+		changedir(dir1);
 
-                for (l = 0 ; l < FILE_CREATE_COUNT ; l++) {
-                    sprintf(filename,"%s%s%s%2.2x",dir1,dir2,dir3,l);
-                    rc = create_file(filename);
-                    if (rc != 0 || maxfiles < dFileCount++) {
-                        if (rc != ENOSPC) {
-                            printf("ERROR: failed error:%d creating all the test files ! \n", errno);
-                            printf("ERROR2: rc:%d -- dFileCount:%d \n", rc, dFileCount);
-                        }
-                        goto end;
-                    }
-                }
-                changedir("../");
-            }
-            changedir("../");
-        }
-        changedir("../");
-    }
-    end:
-    fprintf(stderr,"\nTotal create files: %d\n",cFileCount);
-    printf("Done\n");
-    return rc;
+		for (j = 0; j < FILE_CREATE_COUNT; j++) {
+
+			sprintf(dir2, "%2.2x", j);
+
+			makedir(dir2);
+
+			changedir(dir2);
+
+			for (k = 0; k < FILE_CREATE_COUNT; k++) {
+
+				sprintf(dir3, "%2.2x", k);
+				makedir(dir3);
+				changedir(dir3);
+
+				for (l = 0; l < FILE_CREATE_COUNT; l++) {
+					sprintf(filename, "%s%s%s%2.2x", dir1,
+						dir2, dir3, l);
+					rc = create_file(filename);
+					if (rc != 0 || maxfiles < dFileCount++) {
+						if (rc != ENOSPC) {
+							printf
+							    ("ERROR: failed error:%d creating all the test files ! \n",
+							     errno);
+							printf
+							    ("ERROR2: rc:%d -- dFileCount:%d \n",
+							     rc, dFileCount);
+						}
+						goto end;
+					}
+				}
+				changedir("../");
+			}
+			changedir("../");
+		}
+		changedir("../");
+	}
+end:
+	fprintf(stderr, "\nTotal create files: %d\n", cFileCount);
+	printf("Done\n");
+	return rc;
 }
 
 int makedir(char *dir1)
 {
-  if (mkdir(dir1, S_IRWXU) < 0) {
-    perror(dir1);
-    return(errno);
-  }
-        return 0;
+	if (mkdir(dir1, S_IRWXU) < 0) {
+		perror(dir1);
+		return (errno);
+	}
+	return 0;
 }
 
-int changedir(char *dir) {
-  if (chdir(dir) < 0) {
-    perror(dir);
-    return (errno);
-  }
+int changedir(char *dir)
+{
+	if (chdir(dir) < 0) {
+		perror(dir);
+		return (errno);
+	}
 
-        return 0;
+	return 0;
 }
 
 int create_file(char *filename)
 {
-  int fileHandle;
-  int randomsize;
+	int fileHandle;
+	int randomsize;
 
-  if ((fileHandle=creat(filename, S_IRWXU)) < 0) {
+	if ((fileHandle = creat(filename, S_IRWXU)) < 0) {
 
-    fprintf(stderr,"\nERROR line %d: Total create files: %d\n",__LINE__,cFileCount);
-    perror(filename);
-    return (errno);
-  }
+		fprintf(stderr, "\nERROR line %d: Total create files: %d\n",
+			__LINE__, cFileCount);
+		perror(filename);
+		return (errno);
+	}
 
-  if ((randomsize = gen_random_file_size(0,MAXFSIZE)) < 0) {
-    randomsize = MAXFSIZE;
-  }
-  if (write(fileHandle,wbuf,randomsize) < 0) {
+	if ((randomsize = gen_random_file_size(0, MAXFSIZE)) < 0) {
+		randomsize = MAXFSIZE;
+	}
+	if (write(fileHandle, wbuf, randomsize) < 0) {
 
-    fprintf(stderr,"\nERROR:%d line%d: Total create files: %d\n",errno,__LINE__,cFileCount);
-    close(fileHandle);
+		fprintf(stderr, "\nERROR:%d line%d: Total create files: %d\n",
+			errno, __LINE__, cFileCount);
+		close(fileHandle);
 
-    perror(filename);
-    return (errno);
-  }
+		perror(filename);
+		return (errno);
+	}
 
-  cFileCount++;
-  close(fileHandle);
-        return 0;
+	cFileCount++;
+	close(fileHandle);
+	return 0;
 }
 
 int delete_file(char *filename)
 {
-    struct stat buf;
-    int st;
+	struct stat buf;
+	int st;
 
-    st = stat(filename, &buf);
+	st = stat(filename, &buf);
 
-    if (st < 0) {
-        errorCount++;
-        printf("ERROR line %d: Getting file stats %s \n", __LINE__, filename);
-        return(-1);
-    }
+	if (st < 0) {
+		errorCount++;
+		printf("ERROR line %d: Getting file stats %s \n", __LINE__,
+		       filename);
+		return (-1);
+	}
 
-    disk_space_pool += buf.st_size;
+	disk_space_pool += buf.st_size;
 
-    if (unlink(filename) < 0) {
-        errorCount++;
-        printf("ERROR line %d: Removing file %s \n", __LINE__, filename);
-        return(-1);
-    }
+	if (unlink(filename) < 0) {
+		errorCount++;
+		printf("ERROR line %d: Removing file %s \n", __LINE__,
+		       filename);
+		return (-1);
+	}
 
-    dFileCount++;
-  return 0;
+	dFileCount++;
+	return 0;
 }
 
 int LTP_fs_open_block_device()
 {
-    dev_t devt;
-    struct stat statbuf;
-    int rc;
+	dev_t devt;
+	struct stat statbuf;
+	int rc;
 
-    if (ltp_block_dev_handle == 0) {
+	if (ltp_block_dev_handle == 0) {
 
-        /* check for the /dev/LTPFSTest subdir, and create if it does not exist.
-         *
-         * If devfs is running and mounted on /dev, these checks will all pass,
-         * so a new node will not be created.
-         */
-        devt = makedev(LTPMAJOR, 0);
+		/* check for the /dev/LTPFSTest subdir, and create if it does not exist.
+		 *
+		 * If devfs is running and mounted on /dev, these checks will all pass,
+		 * so a new node will not be created.
+		 */
+		devt = makedev(LTPMAJOR, 0);
 
-        rc = stat(LTP_FS_DEV_NODE_PATH, &statbuf);
+		rc = stat(LTP_FS_DEV_NODE_PATH, &statbuf);
 
-        if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist. */
-                rc = mkdir(LTP_FS_DEV_NODE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-            } else {
-                printf("ERROR: Problem with LTP FS dev directory.  Error code from stat() is %d\n\n", errno);
-            }
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist. */
+				rc = mkdir(LTP_FS_DEV_NODE_PATH,
+					   (S_IFDIR | S_IRWXU | S_IRGRP |
+					    S_IXGRP | S_IROTH | S_IXOTH));
+			} else {
+				printf
+				    ("ERROR: Problem with LTP FS dev directory.  Error code from stat() is %d\n\n",
+				     errno);
+			}
 
-        } else {
-            if (!(statbuf.st_mode & S_IFDIR)) {
-                rc = unlink(LTP_FS_DEV_NODE_PATH);
-                if (!rc) {
-                    rc = mkdir(LTP_FS_DEV_NODE_PATH, (S_IFDIR | S_IRWXU |
-                                                    S_IRGRP | S_IXGRP |
-                                                    S_IROTH | S_IXOTH));
-                }
-            }
-        }
+		} else {
+			if (!(statbuf.st_mode & S_IFDIR)) {
+				rc = unlink(LTP_FS_DEV_NODE_PATH);
+				if (!rc) {
+					rc = mkdir(LTP_FS_DEV_NODE_PATH,
+						   (S_IFDIR | S_IRWXU | S_IRGRP
+						    | S_IXGRP | S_IROTH |
+						    S_IXOTH));
+				}
+			}
+		}
 
-        /*
-         * Check for the /dev/ltp-fs/block_device node, and create if it does not
-         * exist.
-         */
-        rc = stat(LTP_FS_DEVICE_NAME, &statbuf);
-        if (rc) {
-            if (errno == ENOENT) {
-                /* dev node does not exist */
-                rc = mknod(LTP_FS_DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-            } else {
-                printf("ERROR:Problem with LTP FS block device node directory.  Error code form stat() is %d\n\n", errno);
-            }
+		/*
+		 * Check for the /dev/ltp-fs/block_device node, and create if it does not
+		 * exist.
+		 */
+		rc = stat(LTP_FS_DEVICE_NAME, &statbuf);
+		if (rc) {
+			if (errno == ENOENT) {
+				/* dev node does not exist */
+				rc = mknod(LTP_FS_DEVICE_NAME,
+					   (S_IFBLK | S_IRUSR | S_IWUSR |
+					    S_IRGRP | S_IWGRP), devt);
+			} else {
+				printf
+				    ("ERROR:Problem with LTP FS block device node directory.  Error code form stat() is %d\n\n",
+				     errno);
+			}
 
-        } else {
-            /*
-             * /dev/ltp-fs/block_device exists.  Check to make sure it is for a
-             * block device and that it has the right major and minor.
-             */
-            if ((!(statbuf.st_mode & S_IFBLK)) ||
-                 (statbuf.st_rdev != devt)) {
+		} else {
+			/*
+			 * /dev/ltp-fs/block_device exists.  Check to make sure it is for a
+			 * block device and that it has the right major and minor.
+			 */
+			if ((!(statbuf.st_mode & S_IFBLK)) ||
+			    (statbuf.st_rdev != devt)) {
 
-                /* Recreate the dev node. */
-                rc = unlink(LTP_FS_DEVICE_NAME);
-                if (!rc) {
-                    rc = mknod(LTP_FS_DEVICE_NAME, (S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), devt);
-                }
-            }
-        }
+				/* Recreate the dev node. */
+				rc = unlink(LTP_FS_DEVICE_NAME);
+				if (!rc) {
+					rc = mknod(LTP_FS_DEVICE_NAME,
+						   (S_IFBLK | S_IRUSR | S_IWUSR
+						    | S_IRGRP | S_IWGRP), devt);
+				}
+			}
+		}
 
-    }
+	}
 
-    return rc;
+	return rc;
 }
 
 int gen_random_file_size(int min, int max)
 {
-  double u1,u2,z;
-  int i;
-  int ave;
-  int range;
-  int ZZ;
-  if (min >= max) {
-    return (-1);
-  }
-  range = max - min;
-  ave = range/2;
-  for (i = 0 ; i< 10 ; i++) {
-    u1 =  ((double)(random() % 1000000))/ 1000000;
-    u2 =  ((double)(random() % 1000000))/ 1000000;
-    z = sqrt( -2.0 * log(u1) ) * cos ( M_2PI * u2 );
-    ZZ = min + (ave + (z*(ave/4)));
-    if (ZZ >= min && ZZ < max) {
-        return (ZZ);
-    }
-  }
-  return (-1);
+	double u1, u2, z;
+	int i;
+	int ave;
+	int range;
+	int ZZ;
+	if (min >= max) {
+		return (-1);
+	}
+	range = max - min;
+	ave = range / 2;
+	for (i = 0; i < 10; i++) {
+		u1 = ((double)(random() % 1000000)) / 1000000;
+		u2 = ((double)(random() % 1000000)) / 1000000;
+		z = sqrt(-2.0 * log(u1)) * cos(M_2PI * u2);
+		ZZ = min + (ave + (z * (ave / 4)));
+		if (ZZ >= min && ZZ < max) {
+			return (ZZ);
+		}
+	}
+	return (-1);
 }
 
 int do_random_access_test(int maxNum)
 {
-    int r;
-    char fname[1024];
-    time_t t;
-    int i;
+	int r;
+	char fname[1024];
+	time_t t;
+	int i;
 
-    printf("Running random access test...\n");
-    changedir(rootPath);
+	printf("Running random access test...\n");
+	changedir(rootPath);
 
-    if (maxNum < 1 || maxNum > MAXNUM) {
-        printf("out of size %d\n",maxNum);
-        return 1;
-    }
+	if (maxNum < 1 || maxNum > MAXNUM) {
+		printf("out of size %d\n", maxNum);
+		return 1;
+	}
 
-    time(&t);
-    srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-    if ((nullFileHandle = open("/dev/null",O_WRONLY)) < 0) {
-        perror("/dev/null");
-        return(errno);
-    }
+	if ((nullFileHandle = open("/dev/null", O_WRONLY)) < 0) {
+		perror("/dev/null");
+		return (errno);
+	}
 
-    /* 00/00/00/00 */
-    for (i = 0 ; i < maxNum ; i++) {
+	/* 00/00/00/00 */
+	for (i = 0; i < maxNum; i++) {
 
-        r = random() % maxNum;
+		r = random() % maxNum;
 
-        sprintf(fname,"00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
-                ((r>>16)&0xFF),
-                ((r>>8)&0xFF),
-                ((r>>16)&0xFF),
-                ((r>>8)&0xFF),
-                (r&0xFF));
+		sprintf(fname, "00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
+			((r >> 16) & 0xFF),
+			((r >> 8) & 0xFF),
+			((r >> 16) & 0xFF), ((r >> 8) & 0xFF), (r & 0xFF));
 
-        open_read_close(fname);
-    }
-    close(nullFileHandle);
-    printf("Success:\t%d\nFail:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-  return 0;
+		open_read_close(fname);
+	}
+	close(nullFileHandle);
+	printf("Success:\t%d\nFail:\t%d\n", openlog[SUCCESS], openlog[FAIL]);
+	return 0;
 }
 
 int open_read_close(char *fname)
 {
-    int fileHandle, fileHandle2;
-    char buffer[BUFFSIZE];
-    int c;
+	int fileHandle, fileHandle2;
+	char buffer[BUFFSIZE];
+	int c;
 
-    if ((fileHandle = open(fname, O_RDONLY | O_SYNC | O_ASYNC)) < 0) {
-        openlog[FAIL]++;
-        printf("ERROR:opening file %s failed %d \n", fname, errno);
-        return (errno);
-    }
+	if ((fileHandle = open(fname, O_RDONLY | O_SYNC | O_ASYNC)) < 0) {
+		openlog[FAIL]++;
+		printf("ERROR:opening file %s failed %d \n", fname, errno);
+		return (errno);
+	}
 
-    if ((fileHandle2 = open(fname, O_RDONLY |  O_SYNC | O_ASYNC)) < 0) {
-        openlog[FAIL]++;
-        printf("ERROR:2nd opening file %s failed %d \n", fname, errno);
-        return (errno);
-    }
+	if ((fileHandle2 = open(fname, O_RDONLY | O_SYNC | O_ASYNC)) < 0) {
+		openlog[FAIL]++;
+		printf("ERROR:2nd opening file %s failed %d \n", fname, errno);
+		return (errno);
+	}
 
-    openlog[SUCCESS]++;
+	openlog[SUCCESS]++;
 
-    while ((c = read(fileHandle, buffer, BUFFSIZE)) > 0) {
-        if (write(nullFileHandle, buffer, c) < 0) {
-            perror("/dev/null");
-            printf("Opened\t %d\nUnopend:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-            close(fileHandle2);
-            close(fileHandle);
-            return(errno);
-        }
-        if ((c = read(fileHandle2, buffer, BUFFSIZE)) > 0) {
-            if (write(nullFileHandle, buffer, c) < 0) {
-                perror("/dev/null");
-                printf("Opened\t %d\nUnopend:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-                close(fileHandle2);
-                close(fileHandle);
-                return(errno);
-            }
-        }
-    }
+	while ((c = read(fileHandle, buffer, BUFFSIZE)) > 0) {
+		if (write(nullFileHandle, buffer, c) < 0) {
+			perror("/dev/null");
+			printf("Opened\t %d\nUnopend:\t%d\n", openlog[SUCCESS],
+			       openlog[FAIL]);
+			close(fileHandle2);
+			close(fileHandle);
+			return (errno);
+		}
+		if ((c = read(fileHandle2, buffer, BUFFSIZE)) > 0) {
+			if (write(nullFileHandle, buffer, c) < 0) {
+				perror("/dev/null");
+				printf("Opened\t %d\nUnopend:\t%d\n",
+				       openlog[SUCCESS], openlog[FAIL]);
+				close(fileHandle2);
+				close(fileHandle);
+				return (errno);
+			}
+		}
+	}
 
-    if (c < 0) {
-        perror(fname);
-        printf("Opened\t %d\nUnopend:\t%d\n",openlog[SUCCESS],openlog[FAIL]);
-        return(errno);
-    }
+	if (c < 0) {
+		perror(fname);
+		printf("Opened\t %d\nUnopend:\t%d\n", openlog[SUCCESS],
+		       openlog[FAIL]);
+		return (errno);
+	}
 
-    close(fileHandle2);
-    close(fileHandle);
-  return 0;
+	close(fileHandle2);
+	close(fileHandle);
+	return 0;
 }
 
 int create_or_delete(char *fname)
 {
-    int r, rc;
+	int r, rc;
 
-    r = (random() & 1);
+	r = (random() & 1);
 
-        /* create */
-    if ((create_file(fname) == 0)) {
-        rc = delete_file(fname);
-    }
-    else{
-        printf("Error: %d creating random file \n", errno);
-    }
+	/* create */
+	if ((create_file(fname) == 0)) {
+		rc = delete_file(fname);
+	} else {
+		printf("Error: %d creating random file \n", errno);
+	}
 
-    if ((errorCount > dFileCount ||  errorCount > cFileCount) && (errorCount > MAXERROR)) {
-        fprintf(stderr,"Too many errors -- Aborting test\n");
-        fprintf(stderr,"Total create files: %d\n",cFileCount);
-        fprintf(stderr,"Total delete files: %d\n",dFileCount);
-        fprintf(stderr,"Total error       : %d\n",errorCount);
-        return(MAXERROR);
-    }
+	if ((errorCount > dFileCount || errorCount > cFileCount)
+	    && (errorCount > MAXERROR)) {
+		fprintf(stderr, "Too many errors -- Aborting test\n");
+		fprintf(stderr, "Total create files: %d\n", cFileCount);
+		fprintf(stderr, "Total delete files: %d\n", dFileCount);
+		fprintf(stderr, "Total error       : %d\n", errorCount);
+		return (MAXERROR);
+	}
 
-  return 0;
+	return 0;
 }
 
 int do_random_create_delete(int maxNum)
 {
-  int r, rc = 0;
-  char fname[1024];
-  time_t t;
-  int i;
+	int r, rc = 0;
+	char fname[1024];
+	time_t t;
+	int i;
 
-  printf("Running random create/delete test...\n");
+	printf("Running random create/delete test...\n");
 
-  if (maxNum < 1 || maxNum > MAXNUM) {
-    printf("MAX out of size %d\n",maxNum);
-    return(maxNum);
-  }
+	if (maxNum < 1 || maxNum > MAXNUM) {
+		printf("MAX out of size %d\n", maxNum);
+		return (maxNum);
+	}
 
-  time(&t);
-  srandom((unsigned int)getpid()^(((unsigned int)t<<16)| (unsigned int)t>>16));
+	time(&t);
+	srandom((unsigned int)getpid() ^
+		(((unsigned int)t << 16) | (unsigned int)t >> 16));
 
-  /* 00/00/00/00 */
-  for (i = 0 ; i < maxNum && rc != MAXERROR; i++) {
-    r = random() % maxNum;
-    sprintf(fname,"00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   ((r>>16)&0xFF),
-	   ((r>>8)&0xFF),
-	   (r&0xFF));
+	/* 00/00/00/00 */
+	for (i = 0; i < maxNum && rc != MAXERROR; i++) {
+		r = random() % maxNum;
+		sprintf(fname, "00/%2.2x/%2.2x/00%2.2x%2.2x%2.2x",
+			((r >> 16) & 0xFF),
+			((r >> 8) & 0xFF),
+			((r >> 16) & 0xFF), ((r >> 8) & 0xFF), (r & 0xFF));
 
-    rc = create_or_delete(fname);
-  }
+		rc = create_or_delete(fname);
+	}
 
-  fprintf(stderr,"Total create files: %d\n",cFileCount);
-  fprintf(stderr,"Total delete files: %d\n",dFileCount);
-  fprintf(stderr,"Total error       : %d\n",errorCount);
-  return(rc);
+	fprintf(stderr, "Total create files: %d\n", cFileCount);
+	fprintf(stderr, "Total delete files: %d\n", dFileCount);
+	fprintf(stderr, "Total error       : %d\n", errorCount);
+	return (rc);
 }
diff --git a/testcases/kernel/fs/scsi/ltpscsi/llseek.c b/testcases/kernel/fs/scsi/ltpscsi/llseek.c
index 3ab6e91..cc00daa 100644
--- a/testcases/kernel/fs/scsi/ltpscsi/llseek.c
+++ b/testcases/kernel/fs/scsi/ltpscsi/llseek.c
@@ -17,12 +17,12 @@
 #include <linux/unistd.h>	/* for __NR_llseek */
 
 #if defined(__GNUC__) || defined(HAS_LONG_LONG)
-typedef long long       llse_loff_t;
+typedef long long llse_loff_t;
 #else
-typedef long            llse_loff_t;
+typedef long llse_loff_t;
 #endif
 
-extern llse_loff_t llse_llseek (unsigned int, llse_loff_t, unsigned int);
+extern llse_loff_t llse_llseek(unsigned int, llse_loff_t, unsigned int);
 
 #ifdef __linux__
 
@@ -45,48 +45,47 @@
 
 #else /* !__alpha__ && !__ia64__ */
 
-static int _llseek (unsigned int, unsigned long,
+static int _llseek(unsigned int, unsigned long,
 		   unsigned long, llse_loff_t *, unsigned int);
 
 #ifndef __NR_llseek
 /* no __NR_llseek on compilation machine - might give it explicitly */
-static int _llseek (unsigned int fd, unsigned long oh,
-		    unsigned long ol, llse_loff_t *result,
-		    unsigned int origin) {
+static int _llseek(unsigned int fd, unsigned long oh,
+		   unsigned long ol, llse_loff_t * result, unsigned int origin)
+{
 	errno = ENOSYS;
 	return -1;
 }
 #else
-static int _llseek (unsigned int fd, unsigned long oh,
-		    unsigned long ol, llse_loff_t *result,
-		    unsigned int origin)
+static int _llseek(unsigned int fd, unsigned long oh,
+		   unsigned long ol, llse_loff_t * result, unsigned int origin)
 {
 	return syscall(__NR_llseek, fd, oh, ol, result, origin);
 }
 #endif
 
-static llse_loff_t my_llseek (unsigned int fd, llse_loff_t offset,
-		unsigned int origin)
+static llse_loff_t my_llseek(unsigned int fd, llse_loff_t offset,
+			     unsigned int origin)
 {
 	llse_loff_t result;
 	int retval;
 
-	retval = _llseek (fd, ((unsigned long long) offset) >> 32,
-			((unsigned long long) offset) & 0xffffffff,
-			&result, origin);
+	retval = _llseek(fd, ((unsigned long long)offset) >> 32,
+			 ((unsigned long long)offset) & 0xffffffff,
+			 &result, origin);
 	return (retval == -1 ? (llse_loff_t) retval : result);
 }
 
 #endif /* __alpha__ */
 
-llse_loff_t llse_llseek (unsigned int fd, llse_loff_t offset,
-			 unsigned int origin)
+llse_loff_t llse_llseek(unsigned int fd, llse_loff_t offset,
+			unsigned int origin)
 {
 	llse_loff_t result;
 	static int do_compat = 0;
 
 	if (!do_compat) {
-		result = my_llseek (fd, offset, origin);
+		result = my_llseek(fd, offset, origin);
 		if (!(result == -1 && errno == ENOSYS))
 			return result;
 
@@ -101,7 +100,7 @@
 	}
 
 	if ((sizeof(off_t) >= sizeof(llse_loff_t)) ||
-	    (offset < ((llse_loff_t) 1 << ((sizeof(off_t)*8) -1))))
+	    (offset < ((llse_loff_t) 1 << ((sizeof(off_t) * 8) - 1))))
 		return lseek(fd, (off_t) offset, origin);
 
 	errno = EINVAL;
@@ -110,15 +109,15 @@
 
 #else /* !linux */
 
-llse_loff_t llse_llseek (unsigned int fd, llse_loff_t offset,
-			 unsigned int origin)
+llse_loff_t llse_llseek(unsigned int fd, llse_loff_t offset,
+			unsigned int origin)
 {
 	if ((sizeof(off_t) < sizeof(llse_loff_t)) &&
-	    (offset >= ((llse_loff_t) 1 << ((sizeof(off_t)*8) -1)))) {
+	    (offset >= ((llse_loff_t) 1 << ((sizeof(off_t) * 8) - 1)))) {
 		errno = EINVAL;
 		return -1;
 	}
-	return lseek (fd, (off_t) offset, origin);
+	return lseek(fd, (off_t) offset, origin);
 }
 
-#endif 	/* linux */
+#endif /* linux */
diff --git a/testcases/kernel/fs/scsi/ltpscsi/scsimain.c b/testcases/kernel/fs/scsi/ltpscsi/scsimain.c
index 1160ab7..c0c29a2 100644
--- a/testcases/kernel/fs/scsi/ltpscsi/scsimain.c
+++ b/testcases/kernel/fs/scsi/ltpscsi/scsimain.c
@@ -57,7 +57,7 @@
 #define O_DIRECT 040000
 #endif
 
-#define NUMERIC_SCAN_DEF 1   /* change to 0 to make alpha scan default */
+#define NUMERIC_SCAN_DEF 1	/* change to 0 to make alpha scan default */
 //static char * version_str = "0.21 20030513";
 
 #define BPI (signed)(sizeof(int))
@@ -73,11 +73,11 @@
 #define MAX_HOLES 4
 
 #define OFF sizeof(struct sg_header)
-#define INQ_REPLY_LEN 96        /* logic assumes >= sizeof(inqCmdBlk) */
+#define INQ_REPLY_LEN 96	/* logic assumes >= sizeof(inqCmdBlk) */
 #define INQUIRY_CMDLEN  6
 #define INQUIRY_CMD     0x12
-#define SENSE_BUFF_LEN 32       /* Arbitrary, could be larger */
-#define DEF_TIMEOUT 60000       /* 60,000 millisecs == 60 seconds */
+#define SENSE_BUFF_LEN 32	/* Arbitrary, could be larger */
+#define DEF_TIMEOUT 60000	/* 60,000 millisecs == 60 seconds */
 #define REASON_SZ 128
 
 #define SENSE_BUFF_SZ 64
@@ -100,7 +100,7 @@
 #define NAME_LEN_MAX 256
 #define LEVELS 4
 
-#define SENSE_BUFF_LEN 32       /* Arbitrary, could be larger */
+#define SENSE_BUFF_LEN 32	/* Arbitrary, could be larger */
 #define INQ_ALLOC_LEN 255
 
 #ifndef SCSI_IOCTL_GET_PCI
@@ -110,7 +110,7 @@
 #define READ_CAP_REPLY_LEN 8
 
 #ifndef RAW_MAJOR
-#define RAW_MAJOR 255	/*unlikey value */
+#define RAW_MAJOR 255		/*unlikey value */
 #endif
 
 #define FT_OTHER 1		/* filetype is probably normal */
@@ -182,7 +182,7 @@
 #define SG_SCSI_RESET_BUS 2
 #define SG_SCSI_RESET_HOST 3
 #endif
-#define LONG_TIMEOUT 2400000    /* 2,400,000 millisecs == 40 minutes */
+#define LONG_TIMEOUT 2400000	/* 2,400,000 millisecs == 40 minutes */
 
 #define SEND_DIAGNOSTIC_CMD     0x1d
 #define SEND_DIAGNOSTIC_CMDLEN  6
@@ -192,7 +192,7 @@
 #define START_STOP		0x1b
 #define SYNCHRONIZE_CACHE	0x35
 
-#define DEF_START_TIMEOUT 120000       /* 120,000 millisecs == 2 minutes */
+#define DEF_START_TIMEOUT 120000	/* 120,000 millisecs == 2 minutes */
 
 #define DEVICE_RESET 0
 #define HOST_RESET   1
@@ -209,136 +209,140 @@
   bdlen = buffer[11];                           \
   pagestart = buffer + 12 + bdlen;
 
-typedef struct request_collection
-{       /* one instance visible to all threads */
-    int infd;
-    int skip;
-    int in_type;
-    int in_scsi_type;
-    int in_blk;                 /* -\ next block address to read */
-    int in_count;               /*  | blocks remaining for next read */
-    int in_done_count;          /*  | count of completed in blocks */
-    int in_partial;             /*  | */
-    int in_stop;                /*  | */
-    pthread_mutex_t in_mutex;   /* -/ */
-    int outfd;
-    int seek;
-    int out_type;
-    int out_scsi_type;
-    int out_blk;                /* -\ next block address to write */
-    int out_count;              /*  | blocks remaining for next write */
-    int out_done_count;         /*  | count of completed out blocks */
-    int out_partial;            /*  | */
-    int out_stop;               /*  | */
-    pthread_mutex_t out_mutex;  /*  | */
-    pthread_cond_t out_sync_cv; /* -/ hold writes until "in order" */
-    int bs;
-    int bpt;
-    int fua_mode;
-    int dio;
-    int dio_incomplete;         /* -\ */
-    int sum_of_resids;          /*  | */
-    pthread_mutex_t aux_mutex;  /* -/ (also serializes some printf()s */
-    int coe;
-    int cdbsz;
-    int debug;
+typedef struct request_collection {	/* one instance visible to all threads */
+	int infd;
+	int skip;
+	int in_type;
+	int in_scsi_type;
+	int in_blk;		/* -\ next block address to read */
+	int in_count;		/*  | blocks remaining for next read */
+	int in_done_count;	/*  | count of completed in blocks */
+	int in_partial;		/*  | */
+	int in_stop;		/*  | */
+	pthread_mutex_t in_mutex;	/* -/ */
+	int outfd;
+	int seek;
+	int out_type;
+	int out_scsi_type;
+	int out_blk;		/* -\ next block address to write */
+	int out_count;		/*  | blocks remaining for next write */
+	int out_done_count;	/*  | count of completed out blocks */
+	int out_partial;	/*  | */
+	int out_stop;		/*  | */
+	pthread_mutex_t out_mutex;	/*  | */
+	pthread_cond_t out_sync_cv;	/* -/ hold writes until "in order" */
+	int bs;
+	int bpt;
+	int fua_mode;
+	int dio;
+	int dio_incomplete;	/* -\ */
+	int sum_of_resids;	/*  | */
+	pthread_mutex_t aux_mutex;	/* -/ (also serializes some printf()s */
+	int coe;
+	int cdbsz;
+	int debug;
 } Rq_coll;
 
-typedef struct request_element
-{       /* one instance per worker thread */
-    int infd;
-    int outfd;
-    int wr;
-    int blk;
-    int num_blks;
-    unsigned char * buffp;
-    unsigned char * alloc_bp;
-    sg_io_hdr_t io_hdr;
-    unsigned char cmd[MAX_SCSI_CDBSZ];
-    unsigned char sb[SENSE_BUFF_LEN];
-    int bs;
-    int fua_mode;
-    int dio;
-    int dio_incomplete;
-    int resid;
-    int in_scsi_type;
-    int out_scsi_type;
-    int cdbsz;
-    int debug;
+typedef struct request_element {	/* one instance per worker thread */
+	int infd;
+	int outfd;
+	int wr;
+	int blk;
+	int num_blks;
+	unsigned char *buffp;
+	unsigned char *alloc_bp;
+	sg_io_hdr_t io_hdr;
+	unsigned char cmd[MAX_SCSI_CDBSZ];
+	unsigned char sb[SENSE_BUFF_LEN];
+	int bs;
+	int fua_mode;
+	int dio;
+	int dio_incomplete;
+	int resid;
+	int in_scsi_type;
+	int out_scsi_type;
+	int cdbsz;
+	int debug;
 } Rq_elem;
 
-typedef struct my_map_info
-{
-    int active;
-    int lin_dev_type;
-    int oth_dev_num;
-    struct sg_scsi_id sg_dat;
-    char vendor[8];
-    char product[16];
-    char revision[4];
+typedef struct my_map_info {
+	int active;
+	int lin_dev_type;
+	int oth_dev_num;
+	struct sg_scsi_id sg_dat;
+	char vendor[8];
+	char product[16];
+	char revision[4];
 } my_map_info_t;
 
 typedef struct sg_map {
-    int bus;
-    int channel;
-    int target_id;
-    int lun;
-    char * dev_name;
+	int bus;
+	int channel;
+	int target_id;
+	int lun;
+	char *dev_name;
 } Sg_map;
 
 typedef struct my_scsi_idlun {
 /* why can't userland see this structure ??? */
-    int dev_id;
-    int host_unique_id;
+	int dev_id;
+	int host_unique_id;
 } My_scsi_idlun;
 
 struct page_code_desc {
 	int page_code;
-	const char * desc;
+	const char *desc;
 };
 
-static const char * pg_control_str_arr[] = {
-    "current",
-    "changeable",
-    "default",
-    "saved"};
+static const char *pg_control_str_arr[] = {
+	"current",
+	"changeable",
+	"default",
+	"saved"
+};
 
 char *devices[] =
-{"/dev/sda", "/dev/sdb", "/dev/sdc", "/dev/sdd", "/dev/sde", "/dev/sdf",
- "/dev/sdg", "/dev/sdh", "/dev/sdi", "/dev/sdj", "/dev/sdk", "/dev/sdl",
- "/dev/sdm", "/dev/sdn", "/dev/sdo", "/dev/sdp", "/dev/sdq", "/dev/sdr",
- "/dev/sds", "/dev/sdt", "/dev/sdu", "/dev/sdv", "/dev/sdw", "/dev/sdx",
- "/dev/sdy", "/dev/sdz", "/dev/sdaa", "/dev/sdab", "/dev/sdac", "/dev/sdad",
- "/dev/scd0", "/dev/scd1", "/dev/scd2", "/dev/scd3", "/dev/scd4", "/dev/scd5",
- "/dev/scd6", "/dev/scd7", "/dev/scd8", "/dev/scd9", "/dev/scd10", "/dev/scd11",
- "/dev/sr0", "/dev/sr1", "/dev/sr2", "/dev/sr3", "/dev/sr4", "/dev/sr5",
- "/dev/sr6", "/dev/sr7", "/dev/sr8", "/dev/sr9", "/dev/sr10", "/dev/sr11",
- "/dev/nst0", "/dev/nst1", "/dev/nst2", "/dev/nst3", "/dev/nst4", "/dev/nst5",
- "/dev/nosst0", "/dev/nosst1", "/dev/nosst2", "/dev/nosst3", "/dev/nosst4"
+    { "/dev/sda", "/dev/sdb", "/dev/sdc", "/dev/sdd", "/dev/sde", "/dev/sdf",
+	"/dev/sdg", "/dev/sdh", "/dev/sdi", "/dev/sdj", "/dev/sdk", "/dev/sdl",
+	"/dev/sdm", "/dev/sdn", "/dev/sdo", "/dev/sdp", "/dev/sdq", "/dev/sdr",
+	"/dev/sds", "/dev/sdt", "/dev/sdu", "/dev/sdv", "/dev/sdw", "/dev/sdx",
+	"/dev/sdy", "/dev/sdz", "/dev/sdaa", "/dev/sdab", "/dev/sdac",
+	    "/dev/sdad",
+	"/dev/scd0", "/dev/scd1", "/dev/scd2", "/dev/scd3", "/dev/scd4",
+	    "/dev/scd5",
+	"/dev/scd6", "/dev/scd7", "/dev/scd8", "/dev/scd9", "/dev/scd10",
+	    "/dev/scd11",
+	"/dev/sr0", "/dev/sr1", "/dev/sr2", "/dev/sr3", "/dev/sr4", "/dev/sr5",
+	"/dev/sr6", "/dev/sr7", "/dev/sr8", "/dev/sr9", "/dev/sr10",
+	    "/dev/sr11",
+	"/dev/nst0", "/dev/nst1", "/dev/nst2", "/dev/nst3", "/dev/nst4",
+	    "/dev/nst5",
+	"/dev/nosst0", "/dev/nosst1", "/dev/nosst2", "/dev/nosst3",
+	    "/dev/nosst4"
 };
 
-static char *page_names[] =
-{
-    NULL,
-    "Read-Write Error Recovery",
-    "Disconnect-Reconnect",
-    "Format Device",
-    "Rigid Disk Geometry",
-        /* "Flexible Disk" */ NULL,
-    NULL,
-    "Verify Error Recovery",
-    "Caching",
-    "Peripheral Device",
-    "Control Mode",
-        /* "Medium Types Supported" */ NULL,
-    "Notch and Partition",
-        /* "CD-ROM" */ NULL,
-        /* "CD-ROM Audio Control" */ NULL,
-    NULL,
-        /* "Medium Partition (1)" */ NULL,
-        /* "Medium Partition (2)" */ NULL,
-        /* "Medium Partition (3)" */ NULL,
-        /* "Medium Partition (4)" */ NULL};
+static char *page_names[] = {
+	NULL,
+	"Read-Write Error Recovery",
+	"Disconnect-Reconnect",
+	"Format Device",
+	"Rigid Disk Geometry",
+	/* "Flexible Disk" */ NULL,
+	NULL,
+	"Verify Error Recovery",
+	"Caching",
+	"Peripheral Device",
+	"Control Mode",
+	/* "Medium Types Supported" */ NULL,
+	"Notch and Partition",
+	/* "CD-ROM" */ NULL,
+	/* "CD-ROM Audio Control" */ NULL,
+	NULL,
+	/* "Medium Partition (1)" */ NULL,
+	/* "Medium Partition (2)" */ NULL,
+	/* "Medium Partition (3)" */ NULL,
+	/* "Medium Partition (4)" */ NULL
+};
 
 #define MAX_PAGENO (sizeof(page_names)/sizeof(char *))
 
@@ -353,11 +357,13 @@
 static Sg_map sg_map_arr[(sizeof(devices) / sizeof(char *)) + 1];
 
 static const unsigned char scsi_command_size[8] = { 6, 10, 10, 12,
-                                                   12, 12, 10, 10 };
-const unsigned char rbCmdBlk [10] = {READ_BUFFER, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-static const char * level_arr[LEVELS] = {"host", "bus", "target", "lun"};
-static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio";
-static const char * devfs_id = "/dev/.devfsd";
+	12, 12, 10, 10
+};
+const unsigned char rbCmdBlk[10] = { READ_BUFFER, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static const char *level_arr[LEVELS] = { "host", "bus", "target", "lun" };
+
+static const char *proc_allow_dio = "/proc/scsi/sg/allow_dio";
+static const char *devfs_id = "/dev/.devfsd";
 static my_map_info_t map_arr[MAX_SG_DEVS];
 static char ebuff[EBUFF_SZ];
 static int glob_fd;
@@ -382,23 +388,23 @@
 int base = READWRITE_BASE_NUM;
 unsigned char *cmpbuf = 0;
 static unsigned char buff_a[SIZEOF_BUFFER + SG_HSZ + 12];
-static unsigned char * buffer = buff_a + OFFSET_HEADER;
+static unsigned char *buffer = buff_a + OFFSET_HEADER;
 
 typedef struct my_sg_scsi_id {
-    int host_no;        /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */
-    int channel;
-    int scsi_id;        /* scsi id of target device */
-    int lun;
-    int scsi_type;      /* TYPE_... defined in scsi/scsi.h */
-    short h_cmd_per_lun;/* host (adapter) maximum commands per lun */
-    short d_queue_depth;/* device (or adapter) maximum queue length */
-    int unused1;        /* probably find a good use, set 0 for now */
-    int unused2;        /* ditto */
+	int host_no;		/* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */
+	int channel;
+	int scsi_id;		/* scsi id of target device */
+	int lun;
+	int scsi_type;		/* TYPE_... defined in scsi/scsi.h */
+	short h_cmd_per_lun;	/* host (adapter) maximum commands per lun */
+	short d_queue_depth;	/* device (or adapter) maximum queue length */
+	int unused1;		/* probably find a good use, set 0 for now */
+	int unused2;		/* ditto */
 } My_sg_scsi_id;
 
 // Prototypes
-int do_scsi_sgp_read_write(char * device);
-int do_scsi_sgm_read_write(char * device);
+int do_scsi_sgp_read_write(char *device);
+int do_scsi_sgm_read_write(char *device);
 void sg_in_operation(Rq_coll * clp, Rq_elem * rep);
 void sg_out_operation(Rq_coll * clp, Rq_elem * rep);
 int normal_in_operation(Rq_coll * clp, Rq_elem * rep, int blocks);
@@ -406,3818 +412,4097 @@
 int sg_start_io(Rq_elem * rep);
 int sg_finish_io(int wr, Rq_elem * rep, pthread_mutex_t * a_mutp);
 int run_sg_scan_tests(void);
-int show_scsi_logs(char * device);
-int validate_device(char * device);
+int show_scsi_logs(char *device);
+int validate_device(char *device);
 int show_devfs_devices(void);
 void usage(void);
-int do_scsi_device_read_write(char * device);
-int do_scsi_inquiry(char * device, int hex_flag);
+int do_scsi_device_read_write(char *device);
+int do_scsi_inquiry(char *device, int hex_flag);
 int show_scsi_maps(void);
-int show_scsi_modes (char * device);
-int do_scsi_read_buffer(char * device);
-int show_scsi_read_capacity(char * device);
-int do_scsi_reset_devices(char * device, int reset_opts);
-int do_scsi_send_diagnostics(char * device);
-int do_scsi_start_stop(char * device, int startstop);
-int do_scsi_read_write_buffer (char * device);
-int do_scsi_test_unit_ready(char * device);
-int show_scsi_info(char * device);
-void print_msg(int msg_num, const char * msg);
-static void scan_dev_type(const char * leadin, int max_dev, int do_numeric,
-                          int lin_dev_type, int last_sg_ind);
+int show_scsi_modes(char *device);
+int do_scsi_read_buffer(char *device);
+int show_scsi_read_capacity(char *device);
+int do_scsi_reset_devices(char *device, int reset_opts);
+int do_scsi_send_diagnostics(char *device);
+int do_scsi_start_stop(char *device, int startstop);
+int do_scsi_read_write_buffer(char *device);
+int do_scsi_test_unit_ready(char *device);
+int show_scsi_info(char *device);
+void print_msg(int msg_num, const char *msg);
+static void scan_dev_type(const char *leadin, int max_dev, int do_numeric,
+			  int lin_dev_type, int last_sg_ind);
 
 #ifdef SG_IO
-int sg3_inq(int sg_fd, unsigned char * inqBuff, int do_extra);
+int sg3_inq(int sg_fd, unsigned char *inqBuff, int do_extra);
 #endif
 
-static unsigned char inqCmdBlk [INQUIRY_CMDLEN] =
-                                {0x12, 0, 0, 0, INQ_REPLY_LEN, 0};
+static unsigned char inqCmdBlk[INQUIRY_CMDLEN] =
+    { 0x12, 0, 0, 0, INQ_REPLY_LEN, 0 };
 
-void print_msg(int msg_num, const char * msg)
+void print_msg(int msg_num, const char *msg)
 {
-    switch(msg_num)
-    {
-    case TEST_START:
-        printf("\n****************** Starting Tests ***************************\n");
-        break;
-    case TEST_STOP:
-        printf("\n****************** Tests Complete ***************************\n");
-        break;
-    case TEST_BREAK:
-        printf("\n------------------ %s Test ------------------\n\n", msg);
-        break;
-    }
+	switch (msg_num) {
+	case TEST_START:
+		printf
+		    ("\n****************** Starting Tests ***************************\n");
+		break;
+	case TEST_STOP:
+		printf
+		    ("\n****************** Tests Complete ***************************\n");
+		break;
+	case TEST_BREAK:
+		printf("\n------------------ %s Test ------------------\n\n",
+		       msg);
+		break;
+	}
 }
 
 int main(int argc, char *argv[])
 {
-    int rc = 0;
+	int rc = 0;
 
-    if (argc < 2) {
-        printf("\n\nERROR:No device passed to test\n\n");
-        usage();
-        return 1;
-    }
+	if (argc < 2) {
+		printf("\n\nERROR:No device passed to test\n\n");
+		usage();
+		return 1;
+	}
 
-    rc = validate_device(argv[1]);
-    if (rc == 0) {
+	rc = validate_device(argv[1]);
+	if (rc == 0) {
 
-        print_msg(TEST_START, NULL);
+		print_msg(TEST_START, NULL);
 
-        rc = run_sg_scan_tests();
-        if (rc != 0) {
-            printf("ERROR: run_sg_scan_tests failed %d\n", rc);
-        }
+		rc = run_sg_scan_tests();
+		if (rc != 0) {
+			printf("ERROR: run_sg_scan_tests failed %d\n", rc);
+		}
 
-        rc = show_scsi_logs(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: show_scsi_logs failed %d\n", rc);
-        }
+		rc = show_scsi_logs(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: show_scsi_logs failed %d\n", rc);
+		}
 
-        rc = show_devfs_devices();
-        if (rc != 0) {
-            printf("ERROR: show_devfs_devices failed %d\n", rc);
-        }
+		rc = show_devfs_devices();
+		if (rc != 0) {
+			printf("ERROR: show_devfs_devices failed %d\n", rc);
+		}
 
-        rc = do_scsi_device_read_write(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_devices_read_write failed %d\n", rc);
-        }
+		rc = do_scsi_device_read_write(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_devices_read_write failed %d\n",
+			       rc);
+		}
 
-        rc = do_scsi_inquiry(argv[1], TRUE);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_inquiry HEX failed %d\n", rc);
-        }
-        else {
-            rc = do_scsi_inquiry(argv[1], FALSE);
-            if (rc != 0) {
-                printf("ERROR: do_scsi_inquiry PCI failed %d\n", rc);
-            }
-        }
+		rc = do_scsi_inquiry(argv[1], TRUE);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_inquiry HEX failed %d\n", rc);
+		} else {
+			rc = do_scsi_inquiry(argv[1], FALSE);
+			if (rc != 0) {
+				printf("ERROR: do_scsi_inquiry PCI failed %d\n",
+				       rc);
+			}
+		}
 
-        rc = show_scsi_maps();
-        if (rc != 0) {
-            printf("ERROR: show_scsi_maps failed %d\n", rc);
-        }
+		rc = show_scsi_maps();
+		if (rc != 0) {
+			printf("ERROR: show_scsi_maps failed %d\n", rc);
+		}
 
-        rc = show_scsi_modes (argv[1]);
-        if (rc != 0) {
-            printf("ERROR: show_scsi_modes failed %d\n", rc);
-        }
+		rc = show_scsi_modes(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: show_scsi_modes failed %d\n", rc);
+		}
 
-        rc = do_scsi_read_buffer(argv[1]);
-        if (rc != 0 && rc != 1) {
-            printf("ERROR: do_scsi_read_buffer failed %d\n", rc);
-        }
+		rc = do_scsi_read_buffer(argv[1]);
+		if (rc != 0 && rc != 1) {
+			printf("ERROR: do_scsi_read_buffer failed %d\n", rc);
+		}
 
-        rc = show_scsi_read_capacity(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: show_scsi_read_capacity failed %d\n", rc);
-        }
+		rc = show_scsi_read_capacity(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: show_scsi_read_capacity failed %d\n",
+			       rc);
+		}
 
-        rc |= do_scsi_reset_devices(argv[1], DEVICE_RESET);
-        rc |= do_scsi_reset_devices(argv[1], BUS_RESET);
-        rc |= do_scsi_reset_devices(argv[1], HOST_RESET);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_reset_devices failed %d\n", rc);
-        }
+		rc |= do_scsi_reset_devices(argv[1], DEVICE_RESET);
+		rc |= do_scsi_reset_devices(argv[1], BUS_RESET);
+		rc |= do_scsi_reset_devices(argv[1], HOST_RESET);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_reset_devices failed %d\n", rc);
+		}
 
-        rc = do_scsi_send_diagnostics(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_send_diagnostics failed %d\n", rc);
-        }
+		rc = do_scsi_send_diagnostics(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_send_diagnostics failed %d\n",
+			       rc);
+		}
 
-        rc |= do_scsi_start_stop(argv[1],FALSE);
-        rc |= do_scsi_start_stop(argv[1],TRUE);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_start_top failed %d\n", rc);
-        }
+		rc |= do_scsi_start_stop(argv[1], FALSE);
+		rc |= do_scsi_start_stop(argv[1], TRUE);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_start_top failed %d\n", rc);
+		}
 
-        rc = do_scsi_read_write_buffer (argv[1]);
-        if (rc != 0 && rc != 1) {
-            printf("ERROR: do_scsi_read_write_buffer failed %d\n", rc);
-        }
+		rc = do_scsi_read_write_buffer(argv[1]);
+		if (rc != 0 && rc != 1) {
+			printf("ERROR: do_scsi_read_write_buffer failed %d\n",
+			       rc);
+		}
 
-        rc =  do_scsi_test_unit_ready(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_test_unit_ready failed %d\n", rc);
-        }
+		rc = do_scsi_test_unit_ready(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_test_unit_ready failed %d\n",
+			       rc);
+		}
 
-        rc = show_scsi_info(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: show_scsi_info failed %d\n", rc);
-        }
+		rc = show_scsi_info(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: show_scsi_info failed %d\n", rc);
+		}
 
-        rc = do_scsi_sgp_read_write(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_sgp_read_write failed %d\n", rc);
-        }
+		rc = do_scsi_sgp_read_write(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_sgp_read_write failed %d\n", rc);
+		}
 
-        rc = do_scsi_sgm_read_write(argv[1]);
-        if (rc != 0) {
-            printf("ERROR: do_scsi_sgm_read_write failed %d\n", rc);
-        }
+		rc = do_scsi_sgm_read_write(argv[1]);
+		if (rc != 0) {
+			printf("ERROR: do_scsi_sgm_read_write failed %d\n", rc);
+		}
 
-        print_msg(TEST_STOP, NULL);
-    }
-    else {
-        printf("\nERROR: Invalid device passed to test\n\n\n");
-        usage();
+		print_msg(TEST_STOP, NULL);
+	} else {
+		printf("\nERROR: Invalid device passed to test\n\n\n");
+		usage();
 
-    }
+	}
 
-  return 0;
+	return 0;
 }
-int validate_device(char * device)
+
+int validate_device(char *device)
 {
-    int rc = 0;
-    int i, found = FALSE;
-    char device_string[25];
+	int rc = 0;
+	int i, found = FALSE;
+	char device_string[25];
 
-    for (i = 0; i < MAX_DEVICES && ! found; i++) {
-        sprintf(device_string, "/dev/sg%d", i);
-        //printf("checking %s \n", device_string);
-        if (strcmp(device, device_string) == 0) {
-            found  = TRUE;
-        }
-    }
+	for (i = 0; i < MAX_DEVICES && !found; i++) {
+		sprintf(device_string, "/dev/sg%d", i);
+		//printf("checking %s \n", device_string);
+		if (strcmp(device, device_string) == 0) {
+			found = TRUE;
+		}
+	}
 
-    return rc;
+	return rc;
 }
 
 void usage()
 {
-    printf("Usage: 'sg_scan [-a] [-n] [-w] [-i] [-x]'\n");
-    printf("    where: -a   do alpha scan (ie sga, sgb, sgc)\n");
-    printf("           -n   do numeric scan (ie sg0, sg1...) [default]\n");
-    printf("           -w   force open with read/write flag\n");
-    printf("           -i   do SCSI INQUIRY, output results\n");
-    printf("           -x   extra information output about queuing\n\n\n");
+	printf("Usage: 'sg_scan [-a] [-n] [-w] [-i] [-x]'\n");
+	printf("    where: -a   do alpha scan (ie sga, sgb, sgc)\n");
+	printf("           -n   do numeric scan (ie sg0, sg1...) [default]\n");
+	printf("           -w   force open with read/write flag\n");
+	printf("           -i   do SCSI INQUIRY, output results\n");
+	printf("           -x   extra information output about queuing\n\n\n");
 }
 
-void make_dev_name(char * fname, const char * leadin, int k,
-                   int do_numeric)
+void make_dev_name(char *fname, const char *leadin, int k, int do_numeric)
 {
-    char buff[64];
-    int  big,little;
+	char buff[64];
+	int big, little;
 
-    strcpy(fname, leadin ? leadin : "/dev/sg");
-    if (do_numeric) {
-        sprintf(buff, "%d", k);
-        strcat(fname, buff);
-    }
-    else {
-        if (k < 26) {
-            buff[0] = 'a' + (char)k;
-            buff[1] = '\0';
-            strcat(fname, buff);
-        }
-        else if (k <= 255) { /* assumes sequence goes x,y,z,aa,ab,ac etc */
-            big    = k/26;
-            little = k - (26 * big);
-            big    = big - 1;
+	strcpy(fname, leadin ? leadin : "/dev/sg");
+	if (do_numeric) {
+		sprintf(buff, "%d", k);
+		strcat(fname, buff);
+	} else {
+		if (k < 26) {
+			buff[0] = 'a' + (char)k;
+			buff[1] = '\0';
+			strcat(fname, buff);
+		} else if (k <= 255) {	/* assumes sequence goes x,y,z,aa,ab,ac etc */
+			big = k / 26;
+			little = k - (26 * big);
+			big = big - 1;
 
-            buff[0] = 'a' + (char)big;
-            buff[1] = 'a' + (char)little;
-            buff[2] = '\0';
-            strcat(fname, buff);
-        }
-        else
-            strcat(fname, "xxxx");
-    }
+			buff[0] = 'a' + (char)big;
+			buff[1] = 'a' + (char)little;
+			buff[2] = '\0';
+			strcat(fname, buff);
+		} else
+			strcat(fname, "xxxx");
+	}
 }
+
 int run_sg_scan_tests()
 {
-    int sg_fd, res, k, f;
-    unsigned char inqBuff[OFF + INQ_REPLY_LEN];
-    int inqInLen = OFF + sizeof(inqCmdBlk);
-    int inqOutLen = OFF + INQ_REPLY_LEN;
-    unsigned char * buffp = inqBuff + OFF;
-    struct sg_header * isghp = (struct sg_header *)inqBuff;
-    int do_numeric = NUMERIC_SCAN_DEF;
-    int do_inquiry = 0;
-    int do_extra = 1;
-    int writeable = 0;
-    int num_errors = 0;
-    int num_silent = 0;
-    int eacces_err = 0;
-    char fname[64];
-    My_scsi_idlun my_idlun;
-    int host_no;
-    int flags;
-    int emul;
+	int sg_fd, res, k, f;
+	unsigned char inqBuff[OFF + INQ_REPLY_LEN];
+	int inqInLen = OFF + sizeof(inqCmdBlk);
+	int inqOutLen = OFF + INQ_REPLY_LEN;
+	unsigned char *buffp = inqBuff + OFF;
+	struct sg_header *isghp = (struct sg_header *)inqBuff;
+	int do_numeric = NUMERIC_SCAN_DEF;
+	int do_inquiry = 0;
+	int do_extra = 1;
+	int writeable = 0;
+	int num_errors = 0;
+	int num_silent = 0;
+	int eacces_err = 0;
+	char fname[64];
+	My_scsi_idlun my_idlun;
+	int host_no;
+	int flags;
+	int emul;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    flags = writeable ? O_RDWR : OPEN_FLAG;
+	flags = writeable ? O_RDWR : OPEN_FLAG;
 
-    do_numeric = 1;
-    writeable = O_RDONLY;
-    do_inquiry = 1;
-    do_extra = 1;
+	do_numeric = 1;
+	writeable = O_RDONLY;
+	do_inquiry = 1;
+	do_extra = 1;
 
-    for (k = 0, res = 0; (k < 1000)  && (num_errors < MAX_ERRORS);
-         ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, ME "Error closing %s ", fname);
-            perror(ME "close error");
-            return 1;
-        }
-        make_dev_name(fname, NULL, k, do_numeric);
+	for (k = 0, res = 0; (k < 1000) && (num_errors < MAX_ERRORS);
+	     ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, ME "Error closing %s ",
+				 fname);
+			perror(ME "close error");
+			return 1;
+		}
+		make_dev_name(fname, NULL, k, do_numeric);
 
-        sg_fd = open(fname, flags | O_NONBLOCK);
-        if (sg_fd < 0) {
-            if (EBUSY == errno) {
-                printf("%s: device busy (O_EXCL lock), skipping\n", fname);
-                continue;
-            }
-            else if ((ENODEV == errno) || (ENOENT == errno) ||
-                     (ENXIO == errno)) {
-                ++num_errors;
-                ++num_silent;
-                continue;
-            }
-            else {
-                if (EACCES == errno)
-                    eacces_err = 1;
-                snprintf(ebuff, EBUFF_SZ, ME "Error opening %s ", fname);
-                perror(ebuff);
-                ++num_errors;
-                continue;
-            }
-        }
-        res = ioctl(sg_fd, SCSI_IOCTL_GET_IDLUN, &my_idlun);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     ME "device %s failed on scsi ioctl, skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
-        res = ioctl(sg_fd, SCSI_IOCTL_GET_BUS_NUMBER, &host_no);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, ME "device %s failed on scsi "
-	    	     "ioctl(2), skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
+		sg_fd = open(fname, flags | O_NONBLOCK);
+		if (sg_fd < 0) {
+			if (EBUSY == errno) {
+				printf
+				    ("%s: device busy (O_EXCL lock), skipping\n",
+				     fname);
+				continue;
+			} else if ((ENODEV == errno) || (ENOENT == errno) ||
+				   (ENXIO == errno)) {
+				++num_errors;
+				++num_silent;
+				continue;
+			} else {
+				if (EACCES == errno)
+					eacces_err = 1;
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "Error opening %s ", fname);
+				perror(ebuff);
+				++num_errors;
+				continue;
+			}
+		}
+		res = ioctl(sg_fd, SCSI_IOCTL_GET_IDLUN, &my_idlun);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 ME "device %s failed on scsi ioctl, skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
+		res = ioctl(sg_fd, SCSI_IOCTL_GET_BUS_NUMBER, &host_no);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, ME "device %s failed on scsi "
+				 "ioctl(2), skip", fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
 #ifdef SG_EMULATED_HOST
-        res = ioctl(sg_fd, SG_EMULATED_HOST, &emul);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     ME "device %s failed on sg ioctl(3), skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
+		res = ioctl(sg_fd, SG_EMULATED_HOST, &emul);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 ME "device %s failed on sg ioctl(3), skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
 #else
-        emul = 0;
+		emul = 0;
 #endif
-        printf("%s: scsi%d channel=%d id=%d lun=%d", fname, host_no,
-               (my_idlun.dev_id >> 16) & 0xff, my_idlun.dev_id & 0xff,
-               (my_idlun.dev_id >> 8) & 0xff);
-        if (emul)
-            printf(" [em]");
+		printf("%s: scsi%d channel=%d id=%d lun=%d", fname, host_no,
+		       (my_idlun.dev_id >> 16) & 0xff, my_idlun.dev_id & 0xff,
+		       (my_idlun.dev_id >> 8) & 0xff);
+		if (emul)
+			printf(" [em]");
 #if 0
-        printf(", huid=%d", my_idlun.host_unique_id);
+		printf(", huid=%d", my_idlun.host_unique_id);
 #endif
 #ifdef SG_GET_RESERVED_SIZE
-        {
-            My_sg_scsi_id m_id; /* compatible with sg_scsi_id_t in sg.h */
+		{
+			My_sg_scsi_id m_id;	/* compatible with sg_scsi_id_t in sg.h */
 
-            res = ioctl(sg_fd, SG_GET_SCSI_ID, &m_id);
-            if (res < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "device %s ioctls(4), skip",
-			 fname);
-                perror(ebuff);
-                ++num_errors;
-                continue;
-            }
-            printf("  type=%d", m_id.scsi_type);
-            if (do_extra)
-                printf(" cmd_per_lun=%hd queue_depth=%hd\n",
-                       m_id.h_cmd_per_lun, m_id.d_queue_depth);
-            else
-                printf("\n");
-        }
+			res = ioctl(sg_fd, SG_GET_SCSI_ID, &m_id);
+			if (res < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "device %s ioctls(4), skip", fname);
+				perror(ebuff);
+				++num_errors;
+				continue;
+			}
+			printf("  type=%d", m_id.scsi_type);
+			if (do_extra)
+				printf(" cmd_per_lun=%hd queue_depth=%hd\n",
+				       m_id.h_cmd_per_lun, m_id.d_queue_depth);
+			else
+				printf("\n");
+		}
 #else
-        printf("\n");
+		printf("\n");
 #endif
-        if (! do_inquiry)
-            continue;
+		if (!do_inquiry)
+			continue;
 
 #ifdef SG_IO
-        if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &f) >= 0) && (f >= 30000)) {
-            res = sg3_inq(sg_fd, inqBuff, do_extra);
-            continue;
-        }
+		if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &f) >= 0) && (f >= 30000)) {
+			res = sg3_inq(sg_fd, inqBuff, do_extra);
+			continue;
+		}
 #endif
-        memset(isghp, 0, sizeof(struct sg_header));
-        isghp->reply_len = inqOutLen;
-        memcpy(inqBuff + OFF, inqCmdBlk, INQUIRY_CMDLEN);
+		memset(isghp, 0, sizeof(struct sg_header));
+		isghp->reply_len = inqOutLen;
+		memcpy(inqBuff + OFF, inqCmdBlk, INQUIRY_CMDLEN);
 
-        if (O_RDWR == (flags & O_ACCMODE)) { /* turn on blocking */
-        f = fcntl(sg_fd, F_GETFL);
-            fcntl(sg_fd, F_SETFL, f & (~ O_NONBLOCK));
-        }
-        else {
-            close(sg_fd);
-            sg_fd = open(fname, O_RDWR);
-        }
+		if (O_RDWR == (flags & O_ACCMODE)) {	/* turn on blocking */
+			f = fcntl(sg_fd, F_GETFL);
+			fcntl(sg_fd, F_SETFL, f & (~O_NONBLOCK));
+		} else {
+			close(sg_fd);
+			sg_fd = open(fname, O_RDWR);
+		}
 
-        res = write(sg_fd, inqBuff, inqInLen);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, ME "device %s writing, skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
-        res = read(sg_fd, inqBuff, inqOutLen);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, ME "device %s reading, skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
+		res = write(sg_fd, inqBuff, inqInLen);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, ME "device %s writing, skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
+		res = read(sg_fd, inqBuff, inqOutLen);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, ME "device %s reading, skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
 #ifdef SG_GET_RESERVED_SIZE
-        if (! sg_chk_n_print("Error from Inquiry", isghp->target_status,
-                             isghp->host_status, isghp->driver_status,
-                             isghp->sense_buffer, SG_MAX_SENSE))
-            continue;
+		if (!sg_chk_n_print("Error from Inquiry", isghp->target_status,
+				    isghp->host_status, isghp->driver_status,
+				    isghp->sense_buffer, SG_MAX_SENSE))
+			continue;
 #else
-        if ((isghp->result != 0) || (0 != isghp->sense_buffer[0])) {
-            printf("Error from Inquiry: result=%d\n", isghp->result);
-            if (0 != isghp->sense_buffer[0])
-                sg_print_sense("Error from Inquiry", isghp->sense_buffer,
-			       SG_MAX_SENSE);
-            continue;
-        }
+		if ((isghp->result != 0) || (0 != isghp->sense_buffer[0])) {
+			printf("Error from Inquiry: result=%d\n",
+			       isghp->result);
+			if (0 != isghp->sense_buffer[0])
+				sg_print_sense("Error from Inquiry",
+					       isghp->sense_buffer,
+					       SG_MAX_SENSE);
+			continue;
+		}
 #endif
-        f = (int)*(buffp + 7);
-        printf("    %.8s  %.16s  %.4s ", buffp + 8, buffp + 16,
-               buffp + 32);
-        printf("[wide=%d sync=%d cmdq=%d sftre=%d pq=0x%x]\n",
-               !!(f & 0x20), !!(f & 0x10), !!(f & 2), !!(f & 1),
-               (*buffp & 0xe0) >> 5);
-    }
-    if ((num_errors >= MAX_ERRORS) && (num_silent < num_errors)) {
-        printf("Stopping because there are too many error\n");
-        if (eacces_err)
-            printf("    root access may be required\n");
-    }
-  return 0;
+		f = (int)*(buffp + 7);
+		printf("    %.8s  %.16s  %.4s ", buffp + 8, buffp + 16,
+		       buffp + 32);
+		printf("[wide=%d sync=%d cmdq=%d sftre=%d pq=0x%x]\n",
+		       ! !(f & 0x20), ! !(f & 0x10), ! !(f & 2), ! !(f & 1),
+		       (*buffp & 0xe0) >> 5);
+	}
+	if ((num_errors >= MAX_ERRORS) && (num_silent < num_errors)) {
+		printf("Stopping because there are too many error\n");
+		if (eacces_err)
+			printf("    root access may be required\n");
+	}
+	return 0;
 }
 
 #ifdef SG_IO
-int sg3_inq(int sg_fd, unsigned char * inqBuff, int do_extra)
+int sg3_inq(int sg_fd, unsigned char *inqBuff, int do_extra)
 {
-    sg_io_hdr_t io_hdr;
-    unsigned char sense_buffer[32];
-    int ok;
+	sg_io_hdr_t io_hdr;
+	unsigned char sense_buffer[32];
+	int ok;
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(inqCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_buffer);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = INQ_REPLY_LEN;
-    io_hdr.dxferp = inqBuff;
-    io_hdr.cmdp = inqCmdBlk;
-    io_hdr.sbp = sense_buffer;
-    io_hdr.timeout = 20000;     /* 20000 millisecs == 20 seconds */
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(inqCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_buffer);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = INQ_REPLY_LEN;
+	io_hdr.dxferp = inqBuff;
+	io_hdr.cmdp = inqCmdBlk;
+	io_hdr.sbp = sense_buffer;
+	io_hdr.timeout = 20000;	/* 20000 millisecs == 20 seconds */
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror(ME "Inquiry SG_IO ioctl error");
-        return 1;
-    }
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror(ME "Inquiry SG_IO ioctl error");
+		return 1;
+	}
 
-    /* now for the error processing */
-    ok = 0;
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-        ok = 1;
-        break;
-    default: /* won't bother decoding other categories */
-        sg_chk_n_print3("INQUIRY command error", &io_hdr);
-        break;
-    }
+	/* now for the error processing */
+	ok = 0;
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		ok = 1;
+		break;
+	default:		/* won't bother decoding other categories */
+		sg_chk_n_print3("INQUIRY command error", &io_hdr);
+		break;
+	}
 
-    if (ok) { /* output result if it is available */
-        char * p = (char *)inqBuff;
-        int f = (int)*(p + 7);
-        printf("    %.8s  %.16s  %.4s ", p + 8, p + 16, p + 32);
-        printf("[wide=%d sync=%d cmdq=%d sftre=%d pq=0x%x] ",
-               !!(f & 0x20), !!(f & 0x10), !!(f & 2), !!(f & 1),
-               (*p & 0xe0) >> 5);
-        if (do_extra)
-            printf("dur=%ums\n", io_hdr.duration);
-        else
-            printf("\n");
-    }
-  return 0;
+	if (ok) {		/* output result if it is available */
+		char *p = (char *)inqBuff;
+		int f = (int)*(p + 7);
+		printf("    %.8s  %.16s  %.4s ", p + 8, p + 16, p + 32);
+		printf("[wide=%d sync=%d cmdq=%d sftre=%d pq=0x%x] ",
+		       ! !(f & 0x20), ! !(f & 0x10), ! !(f & 2), ! !(f & 1),
+		       (*p & 0xe0) >> 5);
+		if (do_extra)
+			printf("dur=%ums\n", io_hdr.duration);
+		else
+			printf("\n");
+	}
+	return 0;
 }
 #endif
 
 static int do_logs(int sg_fd, int ppc, int sp, int pc, int pg_code,
-		   int paramp, void * resp, int mx_resp_len, int noisy)
+		   int paramp, void *resp, int mx_resp_len, int noisy)
 {
-    int res;
-    unsigned char logsCmdBlk[LOG_SENSE_CMDLEN] =
-    	{LOG_SENSE_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char logsCmdBlk[LOG_SENSE_CMDLEN] =
+	    { LOG_SENSE_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    logsCmdBlk[1] = (unsigned char)((ppc ? 2 : 0) | (sp ? 1 : 0));
-    logsCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
-    logsCmdBlk[5] = (unsigned char)((paramp >> 8) & 0xff);
-    logsCmdBlk[6] = (unsigned char)(paramp & 0xff);
-    if (mx_resp_len > 0xffff) {
-    	printf( ME "mx_resp_len too big\n");
-	return -1;
-    }
-    logsCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
-    logsCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
-
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(logsCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = logsCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (log sense) error");
-        return -1;
-    }
-#if 0
-    printf("SG_IO ioctl: status=%d, info=%d, sb_len_wr=%d\n",
-	   io_hdr.status, io_hdr.info, io_hdr.sb_len_wr);
-#endif
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, ME "ppc=%d, sp=%d, "
-	    	     "pc=%d, page_code=%x, paramp=%x\n    ", ppc, sp, pc,
-		     pg_code, paramp);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	logsCmdBlk[1] = (unsigned char)((ppc ? 2 : 0) | (sp ? 1 : 0));
+	logsCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
+	logsCmdBlk[5] = (unsigned char)((paramp >> 8) & 0xff);
+	logsCmdBlk[6] = (unsigned char)(paramp & 0xff);
+	if (mx_resp_len > 0xffff) {
+		printf(ME "mx_resp_len too big\n");
+		return -1;
 	}
-	return -1;
-    }
+	logsCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
+	logsCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
+
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(logsCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = logsCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (log sense) error");
+		return -1;
+	}
+#if 0
+	printf("SG_IO ioctl: status=%d, info=%d, sb_len_wr=%d\n",
+	       io_hdr.status, io_hdr.info, io_hdr.sb_len_wr);
+#endif
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ, ME "ppc=%d, sp=%d, "
+				 "pc=%d, page_code=%x, paramp=%x\n    ", ppc,
+				 sp, pc, pg_code, paramp);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
 
-static void dStrHex(const char* str, int len, int no_ascii)
+static void dStrHex(const char *str, int len, int no_ascii)
 {
-    const char* p = str;
-    unsigned char c;
-    char buff[82];
-    int a = 0;
-    const int bpstart = 5;
-    const int cpstart = 60;
-    int cpos = cpstart;
-    int bpos = bpstart;
-    int i, k;
+	const char *p = str;
+	unsigned char c;
+	char buff[82];
+	int a = 0;
+	const int bpstart = 5;
+	const int cpstart = 60;
+	int cpos = cpstart;
+	int bpos = bpstart;
+	int i, k;
 
-    if (len <= 0) return;
-    memset(buff,' ',80);
-    buff[80]='\0';
-    k = sprintf(buff + 1, "%.2x", a);
-    buff[k + 1] = ' ';
-    if (bpos >= ((bpstart + (9 * 3))))
-    	bpos++;
+	if (len <= 0)
+		return;
+	memset(buff, ' ', 80);
+	buff[80] = '\0';
+	k = sprintf(buff + 1, "%.2x", a);
+	buff[k + 1] = ' ';
+	if (bpos >= ((bpstart + (9 * 3))))
+		bpos++;
 
-    for (i = 0; i < len; i++)
-    {
-	c = *p++;
-	bpos += 3;
-	if (bpos == (bpstart + (9 * 3)))
-	    bpos++;
-	sprintf(&buff[bpos], "%.2x", (int)(unsigned char)c);
-	buff[bpos + 2] = ' ';
-	if (no_ascii)
-	    buff[cpos++] = ' ';
-	else {
-	    if ((c < ' ') || (c >= 0x7f))
-	        c='.';
-	    buff[cpos++] = c;
+	for (i = 0; i < len; i++) {
+		c = *p++;
+		bpos += 3;
+		if (bpos == (bpstart + (9 * 3)))
+			bpos++;
+		sprintf(&buff[bpos], "%.2x", (int)(unsigned char)c);
+		buff[bpos + 2] = ' ';
+		if (no_ascii)
+			buff[cpos++] = ' ';
+		else {
+			if ((c < ' ') || (c >= 0x7f))
+				c = '.';
+			buff[cpos++] = c;
+		}
+		if (cpos > (cpstart + 15)) {
+			printf("%s\n", buff);
+			bpos = bpstart;
+			cpos = cpstart;
+			a += 16;
+			memset(buff, ' ', 80);
+			k = sprintf(buff + 1, "%.2x", a);
+			buff[k + 1] = ' ';
+		}
 	}
-	if (cpos > (cpstart+15))
-	{
-	    printf("%s\n", buff);
-	    bpos = bpstart;
-	    cpos = cpstart;
-	    a += 16;
-	    memset(buff,' ',80);
-	    k = sprintf(buff + 1, "%.2x", a);
-	    buff[k + 1] = ' ';
+	if (cpos > cpstart) {
+		printf("%s\n", buff);
 	}
-    }
-    if (cpos > cpstart)
-    {
-	printf("%s\n", buff);
-    }
 }
 
 static void show_page_name(int page_no)
 {
-    switch (page_no) {
-    case 0x0 : printf("    0x00    Supported log pages\n"); break;
-    case 0x1 : printf("    0x01    Buffer over-run/under-run\n"); break;
-    case 0x2 : printf("    0x02    Error counters (write)\n"); break;
-    case 0x3 : printf("    0x03    Error counters (read)\n"); break;
-    case 0x4 : printf("    0x04    Error counters (read reverse)\n"); break;
-    case 0x5 : printf("    0x05    Error counters (verify)\n"); break;
-    case 0x6 : printf("    0x06    Non-medium errors\n"); break;
-    case 0x7 : printf("    0x07    Last n error events\n"); break;
-    case 0x8 : printf("    0x08    Format status (sbc2)\n"); break;
-    case 0xb : printf("    0x0b    Last n deferred errors of "
-		"asynchronous events\n"); break;
-    case 0xc : printf("    0x0c    Sequential Access (ssc-2)\n"); break;
-    case 0xd : printf("    0x0d    Temperature\n"); break;
-    case 0xe : printf("    0x0e    Start-stop cycle counter\n"); break;
-    case 0xf : printf("    0x0f    Application client\n"); break;
-    case 0x10 : printf("    0x10    Self-test results\n"); break;
-    case 0x18 : printf("    0x18    Protocol specific port\n"); break;
-    case 0x2e : printf("    0x2e    Tape alerts (ssc-2)\n"); break;
-    case 0x2f : printf("    0x2f    Informational exceptions (SMART)\n"); break;
-    default: printf("    0x%.2x\n", page_no); break;
-    }
-}
-
-static void show_buffer_under_overrun_page(unsigned char * resp, int len)
-{
-    int k, j, num, pl, count_basis, cause;
-    unsigned char * ucp;
-    unsigned char * xp;
-    unsigned long long ull;
-
-    printf("Buffer over-run/under-run page\n");
-    num = len - 4;
-    ucp = &resp[0] + 4;
-    while (num > 3) {
-	pl = ucp[3] + 4;
-    	count_basis = (ucp[1] >> 5) & 0x7;
-	printf("  Count basis: ");
-	switch (count_basis) {
-	case 0 : printf("undefined"); break;
-	case 1 : printf("per command"); break;
-	case 2 : printf("per failed reconnect"); break;
-	case 3 : printf("per unit of time"); break;
-	default: printf("reserved [0x%x]", count_basis); break;
-	}
-    	cause = (ucp[1] >> 1) & 0xf;
-	printf(", Cause: ");
-	switch (cause) {
-	case 0 : printf("bus busy"); break;
-	case 1 : printf("transfer rate too slow"); break;
-	default: printf("reserved [0x%x]", cause); break;
-	}
-	printf(", Type: ");
-	if (ucp[1] & 1)
-	    printf("over-run");
-	else
-	    printf("under-run");
-	printf(", count");
-	k = pl - 4;
-	xp = ucp + 4;
-	if (k > sizeof(ull)) {
-	    xp += (k - sizeof(ull));
-	    k = sizeof(ull);
-	}
-	ull = 0;
-	for (j = 0; j < k; ++j) {
-	    if (j > 0)
-	    	ull <<= 8;
-	    ull |= xp[j];
-	}
-	printf(" = %llu\n", ull);
-	num -= pl;
-	ucp += pl;
-    }
-}
-
-static void show_error_counter_page(unsigned char * resp, int len)
-{
-    int k, j, num, pl, pc;
-    unsigned char * ucp;
-    unsigned char * xp;
-    unsigned long long ull;
-
-    switch(resp[0]) {
-    case 2:
-    	printf("Write error counter page\n");
-	break;
-    case 3:
-    	printf("Read error counter page\n");
-	break;
-    case 4:
-    	printf("Read Reverse error counter page\n");
-	break;
-    case 5:
-    	printf("Verify error counter page\n");
-	break;
-    default:
-    	printf("expecting error counter page, got page=0x%x\n", resp[0]);
-	return;
-    }
-    num = len - 4;
-    ucp = &resp[0] + 4;
-    while (num > 3) {
-    	pc = (ucp[0] << 8) | ucp[1];
-	pl = ucp[3] + 4;
-	switch (pc) {
-	case 0: printf("  Errors corrected without substantion delay"); break;
-	case 1: printf("  Errors corrected with possible delays"); break;
-	case 2: printf("  Total operations"); break;
-	case 3: printf("  Total errors corrected"); break;
-	case 4: printf("  Total times correction algorithm processed"); break;
-	case 5: printf("  Total bytes processed"); break;
-	case 6: printf("  Total uncorrected errors"); break;
-	default: printf("  Reserved or vendor specific [0x%x]", pc); break;
-	}
-	k = pl - 4;
-	xp = ucp + 4;
-	if (k > sizeof(ull)) {
-	    xp += (k - sizeof(ull));
-	    k = sizeof(ull);
-	}
-	ull = 0;
-	for (j = 0; j < k; ++j) {
-	    if (j > 0)
-	    	ull <<= 8;
-	    ull |= xp[j];
-	}
-	printf(" = %llu\n", ull);
-	num -= pl;
-	ucp += pl;
-    }
-}
-
-static void show_non_medium_error_page(unsigned char * resp, int len)
-{
-    int k, j, num, pl, pc;
-    unsigned char * ucp;
-    unsigned char * xp;
-    unsigned long long ull;
-
-    printf("Non-medium error page\n");
-    num = len - 4;
-    ucp = &resp[0] + 4;
-    while (num > 3) {
-    	pc = (ucp[0] << 8) | ucp[1];
-	pl = ucp[3] + 4;
-	switch (pc) {
-	case 0:
-	    printf("  Non-medium error count"); break;
+	switch (page_no) {
+	case 0x0:
+		printf("    0x00    Supported log pages\n");
+		break;
+	case 0x1:
+		printf("    0x01    Buffer over-run/under-run\n");
+		break;
+	case 0x2:
+		printf("    0x02    Error counters (write)\n");
+		break;
+	case 0x3:
+		printf("    0x03    Error counters (read)\n");
+		break;
+	case 0x4:
+		printf("    0x04    Error counters (read reverse)\n");
+		break;
+	case 0x5:
+		printf("    0x05    Error counters (verify)\n");
+		break;
+	case 0x6:
+		printf("    0x06    Non-medium errors\n");
+		break;
+	case 0x7:
+		printf("    0x07    Last n error events\n");
+		break;
+	case 0x8:
+		printf("    0x08    Format status (sbc2)\n");
+		break;
+	case 0xb:
+		printf("    0x0b    Last n deferred errors of "
+		       "asynchronous events\n");
+		break;
+	case 0xc:
+		printf("    0x0c    Sequential Access (ssc-2)\n");
+		break;
+	case 0xd:
+		printf("    0x0d    Temperature\n");
+		break;
+	case 0xe:
+		printf("    0x0e    Start-stop cycle counter\n");
+		break;
+	case 0xf:
+		printf("    0x0f    Application client\n");
+		break;
+	case 0x10:
+		printf("    0x10    Self-test results\n");
+		break;
+	case 0x18:
+		printf("    0x18    Protocol specific port\n");
+		break;
+	case 0x2e:
+		printf("    0x2e    Tape alerts (ssc-2)\n");
+		break;
+	case 0x2f:
+		printf("    0x2f    Informational exceptions (SMART)\n");
+		break;
 	default:
-	    if (pc <= 0x7fff)
-		printf("  Reserved [0x%x]", pc);
-	    else
-		printf("  Vendor specific [0x%x]", pc);
-	    break;
+		printf("    0x%.2x\n", page_no);
+		break;
 	}
-	k = pl - 4;
-	xp = ucp + 4;
-	if (k > sizeof(ull)) {
-	    xp += (k - sizeof(ull));
-	    k = sizeof(ull);
-	}
-	ull = 0;
-	for (j = 0; j < k; ++j) {
-	    if (j > 0)
-	    	ull <<= 8;
-	    ull |= xp[j];
-	}
-	printf(" = %llu\n", ull);
-	num -= pl;
-	ucp += pl;
-    }
 }
 
-const char * self_test_code[] = {
-    "default", "background short", "background extended", "reserved",
-    "aborted background", "foreground short", "foreground extended",
-    "reserved"};
-
-const char * self_test_result[] = {
-    "completed without error",
-    "aborted by SEND DIAGNOSTIC",
-    "aborted other than by SEND DIAGNOSTIC",
-    "unknown error, unable to complete",
-    "self test completed with failure in test segment (which one unkown)",
-    "first segment in self test failed",
-    "second segment in self test failed",
-    "another segment in self test failed",
-    "reserved", "reserved", "reserved", "reserved", "reserved", "reserved",
-    "reserved",
-    "self test in progress"};
-
-static void show_self_test_page(unsigned char * resp, int len)
+static void show_buffer_under_overrun_page(unsigned char *resp, int len)
 {
-    int k, num, n, res;
-    unsigned char * ucp;
-    unsigned long long ull;
+	int k, j, num, pl, count_basis, cause;
+	unsigned char *ucp;
+	unsigned char *xp;
+	unsigned long long ull;
 
-    num = len - 4;
-    if (num < 0x190) {
-	printf("badly formed self-test results page\n");
-	return;
-    }
-    printf("Self-test results page\n");
-    for (k = 0, ucp = resp + 4; k < 20; ++k, ucp += 20) {
-	n = (ucp[6] << 8) | ucp[7];
-	if ((0 == n) && (0 == ucp[4]))
-	    break;
-	printf("  Parameter code=%d, accumulated power-on hours=%d\n",
-	       (ucp[0] << 8) | ucp[1], n);
-	printf("    self test code: %s [%d]\n",
-	       self_test_code[(ucp[4] >> 5) & 0x7], (ucp[4] >> 5) & 0x7);
-	res = ucp[4] & 0xf;
-	printf("    self test result: %s [%d]\n",
-	       self_test_result[res], res);
-	if (ucp[5])
-	    printf("    self-test number=%d\n", (int)ucp[5]);
-	ull = ucp[8]; ull <<= 8; ull |= ucp[9]; ull <<= 8; ull |= ucp[10];
-	ull <<= 8; ull |= ucp[11]; ull <<= 8; ull |= ucp[12];
-	ull <<= 8; ull |= ucp[13]; ull <<= 8; ull |= ucp[14];
-	ull <<= 8; ull |= ucp[14]; ull <<= 8; ull |= ucp[15];
-	if ((0xffffffffffffffffULL != ull) && (res > 0) && ( res < 0xf))
-	    printf("    address of first error=0x%llx\n", ull);
-	if (ucp[16] & 0xf)
-	    printf("    sense key=0x%x, asc=0x%x, asq=0x%x\n",
-		   ucp[16] & 0xf, ucp[17], ucp[18]);
-    }
-}
-
-static void show_Temperature_page(unsigned char * resp, int len, int hdr)
-{
-    int k, num, extra, pc;
-    unsigned char * ucp;
-
-    num = len - 4;
-    ucp = &resp[0] + 4;
-    if (num < 4) {
-	printf("badly formed Temperature log page\n");
-	return;
-    }
-    if (hdr)
-        printf("Temperature log page\n");
-    for (k = num; k > 0; k -= extra, ucp += extra) {
-	if (k < 3) {
-	    printf("short Temperature log page\n");
-	    return;
-	}
-	extra = ucp[3] + 4;
-	pc = ((ucp[0] << 8) & 0xff) + ucp[1];
-	if (0 == pc) {
-	    if (extra > 5) {
-		if (ucp[5] < 0xff)
-		    printf("  Current temperature= %d C\n", ucp[5]);
-		else
-		    printf("  Current temperature=<not available>\n");
-	    }
-	} else if (1 == pc) {
-	    if (extra > 5) {
-		if (ucp[5] < 0xff)
-		    printf("  Reference temperature= %d C\n", ucp[5]);
-		else
-		    printf("  Reference temperature=<not available>\n");
-	    }
-
-	}else {
-	    printf("  parameter code=0x%x, contents in hex:\n", pc);
-	    dStrHex((const char *)ucp, extra, 1);
-	}
-    }
-}
-
-static void show_IE_page(unsigned char * resp, int len, int full)
-{
-    int k, num, extra, pc;
-    unsigned char * ucp;
-
-    num = len - 4;
-    ucp = &resp[0] + 4;
-    if (num < 4) {
-	printf("badly formed Informational Exceptions log page\n");
-	return;
-    }
-    if (full)
-        printf("Informational Exceptions log page\n");
-    for (k = num; k > 0; k -= extra, ucp += extra) {
-	if (k < 3) {
-	    printf("short Informational Exceptions log page\n");
-	    return;
-	}
-	extra = ucp[3] + 4;
-	pc = ((ucp[0] << 8) & 0xff) + ucp[1];
-	if (0 == pc) {
-	    if (extra > 5) {
-		if (full)
-	            printf("  IE asc=0x%x, ascq=0x%x", ucp[4], ucp[5]);
-	        if (extra > 6) {
-		    if (full)
-		        printf(",");
-		    if (ucp[6] < 0xff)
-	                printf("  Current temperature=%d C", ucp[6]);
-		    else
-	                printf("  Current temperature=<not available>");
+	printf("Buffer over-run/under-run page\n");
+	num = len - 4;
+	ucp = &resp[0] + 4;
+	while (num > 3) {
+		pl = ucp[3] + 4;
+		count_basis = (ucp[1] >> 5) & 0x7;
+		printf("  Count basis: ");
+		switch (count_basis) {
+		case 0:
+			printf("undefined");
+			break;
+		case 1:
+			printf("per command");
+			break;
+		case 2:
+			printf("per failed reconnect");
+			break;
+		case 3:
+			printf("per unit of time");
+			break;
+		default:
+			printf("reserved [0x%x]", count_basis);
+			break;
 		}
-	        printf("\n");
-	    }
-	} else if (full) {
-	    printf("  parameter code=0x%x, contents in hex:\n", pc);
-	    dStrHex((const char *)ucp, extra, 1);
+		cause = (ucp[1] >> 1) & 0xf;
+		printf(", Cause: ");
+		switch (cause) {
+		case 0:
+			printf("bus busy");
+			break;
+		case 1:
+			printf("transfer rate too slow");
+			break;
+		default:
+			printf("reserved [0x%x]", cause);
+			break;
+		}
+		printf(", Type: ");
+		if (ucp[1] & 1)
+			printf("over-run");
+		else
+			printf("under-run");
+		printf(", count");
+		k = pl - 4;
+		xp = ucp + 4;
+		if (k > sizeof(ull)) {
+			xp += (k - sizeof(ull));
+			k = sizeof(ull);
+		}
+		ull = 0;
+		for (j = 0; j < k; ++j) {
+			if (j > 0)
+				ull <<= 8;
+			ull |= xp[j];
+		}
+		printf(" = %llu\n", ull);
+		num -= pl;
+		ucp += pl;
 	}
-    }
 }
 
-static void show_ascii_page(unsigned char * resp, int len)
+static void show_error_counter_page(unsigned char *resp, int len)
 {
-    int k, n, num;
+	int k, j, num, pl, pc;
+	unsigned char *ucp;
+	unsigned char *xp;
+	unsigned long long ull;
 
-    if (len < 0) {
-    	printf("response has bad length\n");
-    	return;
-    }
-    num = len - 4;
-    switch (resp[0]) {
-    case 0:
-    	printf("Supported pages:\n");
-	for (k = 0; k < num; ++k)
-	    show_page_name((int)resp[4 + k]);
-	break;
-    case 0x1:
-    	show_buffer_under_overrun_page(resp, len);
-	break;
-    case 0x2:
-    case 0x3:
-    case 0x4:
-    case 0x5:
-    	show_error_counter_page(resp, len);
-	break;
-    case 0x6:
-    	show_non_medium_error_page(resp, len);
-	break;
-    case 0xd:
-	show_Temperature_page(resp, len, 1);
-	break;
-    case 0xe:
-    	if (len < 40) {
-	    printf("badly formed start-stop cycle counter page\n");
-	    break;
+	switch (resp[0]) {
+	case 2:
+		printf("Write error counter page\n");
+		break;
+	case 3:
+		printf("Read error counter page\n");
+		break;
+	case 4:
+		printf("Read Reverse error counter page\n");
+		break;
+	case 5:
+		printf("Verify error counter page\n");
+		break;
+	default:
+		printf("expecting error counter page, got page=0x%x\n",
+		       resp[0]);
+		return;
 	}
-	printf("Start-stop cycle counter page\n");
-	printf("  Date of manufacture, year: %.4s, week: %.2s\n",
-	       &resp[8], &resp[12]);
-	printf("  Accounting date, year: %.4s, week: %.2s\n",
-	       &resp[18], &resp[22]);
-	n = (resp[28] << 24) | (resp[29] << 16) | (resp[30] << 8) | resp[31];
-	printf("  Specified cycle count over device lifetime=%d\n", n);
-	n = (resp[36] << 24) | (resp[37] << 16) | (resp[38] << 8) | resp[39];
-	printf("  Accumulated start-stop cycles=%d\n", n);
-	break;
-    case 0x10:
-    	show_self_test_page(resp, len);
-	break;
-    case 0x2f:
-    	show_IE_page(resp, len, 1);
-	break;
-    default:
-    	printf("No ascii information for page=0x%x, here is hex:\n", resp[0]);
-	dStrHex((const char *)resp, len, 1);
-	break;
-    }
+	num = len - 4;
+	ucp = &resp[0] + 4;
+	while (num > 3) {
+		pc = (ucp[0] << 8) | ucp[1];
+		pl = ucp[3] + 4;
+		switch (pc) {
+		case 0:
+			printf("  Errors corrected without substantion delay");
+			break;
+		case 1:
+			printf("  Errors corrected with possible delays");
+			break;
+		case 2:
+			printf("  Total operations");
+			break;
+		case 3:
+			printf("  Total errors corrected");
+			break;
+		case 4:
+			printf("  Total times correction algorithm processed");
+			break;
+		case 5:
+			printf("  Total bytes processed");
+			break;
+		case 6:
+			printf("  Total uncorrected errors");
+			break;
+		default:
+			printf("  Reserved or vendor specific [0x%x]", pc);
+			break;
+		}
+		k = pl - 4;
+		xp = ucp + 4;
+		if (k > sizeof(ull)) {
+			xp += (k - sizeof(ull));
+			k = sizeof(ull);
+		}
+		ull = 0;
+		for (j = 0; j < k; ++j) {
+			if (j > 0)
+				ull <<= 8;
+			ull |= xp[j];
+		}
+		printf(" = %llu\n", ull);
+		num -= pl;
+		ucp += pl;
+	}
 }
 
-static int fetchTemperature(int sg_fd, int do_hex, unsigned char * resp,
+static void show_non_medium_error_page(unsigned char *resp, int len)
+{
+	int k, j, num, pl, pc;
+	unsigned char *ucp;
+	unsigned char *xp;
+	unsigned long long ull;
+
+	printf("Non-medium error page\n");
+	num = len - 4;
+	ucp = &resp[0] + 4;
+	while (num > 3) {
+		pc = (ucp[0] << 8) | ucp[1];
+		pl = ucp[3] + 4;
+		switch (pc) {
+		case 0:
+			printf("  Non-medium error count");
+			break;
+		default:
+			if (pc <= 0x7fff)
+				printf("  Reserved [0x%x]", pc);
+			else
+				printf("  Vendor specific [0x%x]", pc);
+			break;
+		}
+		k = pl - 4;
+		xp = ucp + 4;
+		if (k > sizeof(ull)) {
+			xp += (k - sizeof(ull));
+			k = sizeof(ull);
+		}
+		ull = 0;
+		for (j = 0; j < k; ++j) {
+			if (j > 0)
+				ull <<= 8;
+			ull |= xp[j];
+		}
+		printf(" = %llu\n", ull);
+		num -= pl;
+		ucp += pl;
+	}
+}
+
+const char *self_test_code[] = {
+	"default", "background short", "background extended", "reserved",
+	"aborted background", "foreground short", "foreground extended",
+	"reserved"
+};
+
+const char *self_test_result[] = {
+	"completed without error",
+	"aborted by SEND DIAGNOSTIC",
+	"aborted other than by SEND DIAGNOSTIC",
+	"unknown error, unable to complete",
+	"self test completed with failure in test segment (which one unkown)",
+	"first segment in self test failed",
+	"second segment in self test failed",
+	"another segment in self test failed",
+	"reserved", "reserved", "reserved", "reserved", "reserved", "reserved",
+	"reserved",
+	"self test in progress"
+};
+
+static void show_self_test_page(unsigned char *resp, int len)
+{
+	int k, num, n, res;
+	unsigned char *ucp;
+	unsigned long long ull;
+
+	num = len - 4;
+	if (num < 0x190) {
+		printf("badly formed self-test results page\n");
+		return;
+	}
+	printf("Self-test results page\n");
+	for (k = 0, ucp = resp + 4; k < 20; ++k, ucp += 20) {
+		n = (ucp[6] << 8) | ucp[7];
+		if ((0 == n) && (0 == ucp[4]))
+			break;
+		printf("  Parameter code=%d, accumulated power-on hours=%d\n",
+		       (ucp[0] << 8) | ucp[1], n);
+		printf("    self test code: %s [%d]\n",
+		       self_test_code[(ucp[4] >> 5) & 0x7],
+		       (ucp[4] >> 5) & 0x7);
+		res = ucp[4] & 0xf;
+		printf("    self test result: %s [%d]\n",
+		       self_test_result[res], res);
+		if (ucp[5])
+			printf("    self-test number=%d\n", (int)ucp[5]);
+		ull = ucp[8];
+		ull <<= 8;
+		ull |= ucp[9];
+		ull <<= 8;
+		ull |= ucp[10];
+		ull <<= 8;
+		ull |= ucp[11];
+		ull <<= 8;
+		ull |= ucp[12];
+		ull <<= 8;
+		ull |= ucp[13];
+		ull <<= 8;
+		ull |= ucp[14];
+		ull <<= 8;
+		ull |= ucp[14];
+		ull <<= 8;
+		ull |= ucp[15];
+		if ((0xffffffffffffffffULL != ull) && (res > 0) && (res < 0xf))
+			printf("    address of first error=0x%llx\n", ull);
+		if (ucp[16] & 0xf)
+			printf("    sense key=0x%x, asc=0x%x, asq=0x%x\n",
+			       ucp[16] & 0xf, ucp[17], ucp[18]);
+	}
+}
+
+static void show_Temperature_page(unsigned char *resp, int len, int hdr)
+{
+	int k, num, extra, pc;
+	unsigned char *ucp;
+
+	num = len - 4;
+	ucp = &resp[0] + 4;
+	if (num < 4) {
+		printf("badly formed Temperature log page\n");
+		return;
+	}
+	if (hdr)
+		printf("Temperature log page\n");
+	for (k = num; k > 0; k -= extra, ucp += extra) {
+		if (k < 3) {
+			printf("short Temperature log page\n");
+			return;
+		}
+		extra = ucp[3] + 4;
+		pc = ((ucp[0] << 8) & 0xff) + ucp[1];
+		if (0 == pc) {
+			if (extra > 5) {
+				if (ucp[5] < 0xff)
+					printf("  Current temperature= %d C\n",
+					       ucp[5]);
+				else
+					printf
+					    ("  Current temperature=<not available>\n");
+			}
+		} else if (1 == pc) {
+			if (extra > 5) {
+				if (ucp[5] < 0xff)
+					printf
+					    ("  Reference temperature= %d C\n",
+					     ucp[5]);
+				else
+					printf
+					    ("  Reference temperature=<not available>\n");
+			}
+
+		} else {
+			printf("  parameter code=0x%x, contents in hex:\n", pc);
+			dStrHex((const char *)ucp, extra, 1);
+		}
+	}
+}
+
+static void show_IE_page(unsigned char *resp, int len, int full)
+{
+	int k, num, extra, pc;
+	unsigned char *ucp;
+
+	num = len - 4;
+	ucp = &resp[0] + 4;
+	if (num < 4) {
+		printf("badly formed Informational Exceptions log page\n");
+		return;
+	}
+	if (full)
+		printf("Informational Exceptions log page\n");
+	for (k = num; k > 0; k -= extra, ucp += extra) {
+		if (k < 3) {
+			printf("short Informational Exceptions log page\n");
+			return;
+		}
+		extra = ucp[3] + 4;
+		pc = ((ucp[0] << 8) & 0xff) + ucp[1];
+		if (0 == pc) {
+			if (extra > 5) {
+				if (full)
+					printf("  IE asc=0x%x, ascq=0x%x",
+					       ucp[4], ucp[5]);
+				if (extra > 6) {
+					if (full)
+						printf(",");
+					if (ucp[6] < 0xff)
+						printf
+						    ("  Current temperature=%d C",
+						     ucp[6]);
+					else
+						printf
+						    ("  Current temperature=<not available>");
+				}
+				printf("\n");
+			}
+		} else if (full) {
+			printf("  parameter code=0x%x, contents in hex:\n", pc);
+			dStrHex((const char *)ucp, extra, 1);
+		}
+	}
+}
+
+static void show_ascii_page(unsigned char *resp, int len)
+{
+	int k, n, num;
+
+	if (len < 0) {
+		printf("response has bad length\n");
+		return;
+	}
+	num = len - 4;
+	switch (resp[0]) {
+	case 0:
+		printf("Supported pages:\n");
+		for (k = 0; k < num; ++k)
+			show_page_name((int)resp[4 + k]);
+		break;
+	case 0x1:
+		show_buffer_under_overrun_page(resp, len);
+		break;
+	case 0x2:
+	case 0x3:
+	case 0x4:
+	case 0x5:
+		show_error_counter_page(resp, len);
+		break;
+	case 0x6:
+		show_non_medium_error_page(resp, len);
+		break;
+	case 0xd:
+		show_Temperature_page(resp, len, 1);
+		break;
+	case 0xe:
+		if (len < 40) {
+			printf("badly formed start-stop cycle counter page\n");
+			break;
+		}
+		printf("Start-stop cycle counter page\n");
+		printf("  Date of manufacture, year: %.4s, week: %.2s\n",
+		       &resp[8], &resp[12]);
+		printf("  Accounting date, year: %.4s, week: %.2s\n",
+		       &resp[18], &resp[22]);
+		n = (resp[28] << 24) | (resp[29] << 16) | (resp[30] << 8) |
+		    resp[31];
+		printf("  Specified cycle count over device lifetime=%d\n", n);
+		n = (resp[36] << 24) | (resp[37] << 16) | (resp[38] << 8) |
+		    resp[39];
+		printf("  Accumulated start-stop cycles=%d\n", n);
+		break;
+	case 0x10:
+		show_self_test_page(resp, len);
+		break;
+	case 0x2f:
+		show_IE_page(resp, len, 1);
+		break;
+	default:
+		printf("No ascii information for page=0x%x, here is hex:\n",
+		       resp[0]);
+		dStrHex((const char *)resp, len, 1);
+		break;
+	}
+}
+
+static int fetchTemperature(int sg_fd, int do_hex, unsigned char *resp,
 			    int max_len)
 {
-    int res = 0;
+	int res = 0;
 
-    if (0 == do_logs(sg_fd, 0, 0, 1, 0xd, 0, resp, max_len, 0))
-    	show_Temperature_page(resp, (resp[2] << 8) + resp[3] + 4, 0);
-    else if (0 == do_logs(sg_fd, 0, 0, 1, 0x2f, 0, resp, max_len, 0))
-    	show_IE_page(resp, (resp[2] << 8) + resp[3] + 4, 0);
-    else {
-	printf("Unable to find temperature in either log page (temperature "
-	       "or IE)\n");
-	res = 1;
-    }
-    close(sg_fd);
-    return res;
+	if (0 == do_logs(sg_fd, 0, 0, 1, 0xd, 0, resp, max_len, 0))
+		show_Temperature_page(resp, (resp[2] << 8) + resp[3] + 4, 0);
+	else if (0 == do_logs(sg_fd, 0, 0, 1, 0x2f, 0, resp, max_len, 0))
+		show_IE_page(resp, (resp[2] << 8) + resp[3] + 4, 0);
+	else {
+		printf
+		    ("Unable to find temperature in either log page (temperature "
+		     "or IE)\n");
+		res = 1;
+	}
+	close(sg_fd);
+	return res;
 }
 
-int show_scsi_logs(char * device)
+int show_scsi_logs(char *device)
 {
-    int sg_fd, k, pg_len;
-    char * file_name = 0;
-    unsigned char rsp_buff[MX_ALLOC_LEN];
-    int pg_code = 0;
-    int pc = 1;	/* N.B. some disks only give data for current cumulative */
-    int paramp = 0;
-    int do_list = 0;
-    int do_ppc = 0;
-    int do_sp = 0;
-    int do_hex = 0;
-    int do_all = 1;
-    int do_temp = 0;
-    int oflags = O_RDWR | O_NONBLOCK;
+	int sg_fd, k, pg_len;
+	char *file_name = 0;
+	unsigned char rsp_buff[MX_ALLOC_LEN];
+	int pg_code = 0;
+	int pc = 1;		/* N.B. some disks only give data for current cumulative */
+	int paramp = 0;
+	int do_list = 0;
+	int do_ppc = 0;
+	int do_sp = 0;
+	int do_hex = 0;
+	int do_all = 1;
+	int do_temp = 0;
+	int oflags = O_RDWR | O_NONBLOCK;
 
-    file_name = device;
-    print_msg(TEST_BREAK, __FUNCTION__);
+	file_name = device;
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    if ((sg_fd = open(file_name, oflags)) < 0) {
-        snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s", file_name);
-        perror(ebuff);
-        return 1;
-    }
-    /* Just to be safe, check we have a new sg device by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-        printf(ME "%s doesn't seem to be a version 3 sg device\n",
-               file_name);
-        close(sg_fd);
-        return 1;
-    }
-    if (do_list || do_all)
-    	pg_code = PG_CODE_ALL;
-    pg_len = 0;
-    if (1 == do_temp)
-	return fetchTemperature(sg_fd, do_hex, rsp_buff, MX_ALLOC_LEN);
-
-    if (0 == do_logs(sg_fd, do_ppc, do_sp, pc, pg_code, paramp,
-    		     rsp_buff, MX_ALLOC_LEN, 1))
-    {
-    	pg_len = (rsp_buff[2] << 8) + rsp_buff[3];
-	if ((pg_len + 4) > MX_ALLOC_LEN) {
-	    printf("Only fetched %d bytes of response, truncate output\n",
-		   MX_ALLOC_LEN);
-	    pg_len = MX_ALLOC_LEN - 4;
+	if ((sg_fd = open(file_name, oflags)) < 0) {
+		snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s",
+			 file_name);
+		perror(ebuff);
+		return 1;
 	}
-	if (do_hex) {
-	    printf("Returned log page code=0x%x,  page len=0x%x\n",
-		   rsp_buff[0], pg_len);
-	    dStrHex((const char *)rsp_buff, pg_len + 4, 1);
+	/* Just to be safe, check we have a new sg device by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		printf(ME "%s doesn't seem to be a version 3 sg device\n",
+		       file_name);
+		close(sg_fd);
+		return 1;
 	}
-	else
-	    show_ascii_page(rsp_buff, pg_len + 4);
-    }
-    if (do_all && (pg_len > 1)) {
-    	int my_len = pg_len - 1;
-	unsigned char parr[256];
+	if (do_list || do_all)
+		pg_code = PG_CODE_ALL;
+	pg_len = 0;
+	if (1 == do_temp)
+		return fetchTemperature(sg_fd, do_hex, rsp_buff, MX_ALLOC_LEN);
 
-	memcpy(parr, rsp_buff + 5, my_len);
-	for (k = 0; k < my_len; ++k) {
-	    printf("\n");
-	    pg_code = parr[k];
-	    if (0 == do_logs(sg_fd, do_ppc, do_sp, pc, pg_code, paramp,
-			     rsp_buff, MX_ALLOC_LEN, 1))
-	    {
+	if (0 == do_logs(sg_fd, do_ppc, do_sp, pc, pg_code, paramp,
+			 rsp_buff, MX_ALLOC_LEN, 1)) {
 		pg_len = (rsp_buff[2] << 8) + rsp_buff[3];
 		if ((pg_len + 4) > MX_ALLOC_LEN) {
-		    printf("Only fetched %d bytes of response, truncate "
-		    	   "output\n", MX_ALLOC_LEN);
-		    pg_len = MX_ALLOC_LEN - 4;
+			printf
+			    ("Only fetched %d bytes of response, truncate output\n",
+			     MX_ALLOC_LEN);
+			pg_len = MX_ALLOC_LEN - 4;
 		}
 		if (do_hex) {
-		    printf("Returned log page code=0x%x,  page len=0x%x\n",
-			   rsp_buff[0], pg_len);
-		    dStrHex((const char *)rsp_buff, pg_len + 4, 1);
+			printf("Returned log page code=0x%x,  page len=0x%x\n",
+			       rsp_buff[0], pg_len);
+			dStrHex((const char *)rsp_buff, pg_len + 4, 1);
+		} else
+			show_ascii_page(rsp_buff, pg_len + 4);
+	}
+	if (do_all && (pg_len > 1)) {
+		int my_len = pg_len - 1;
+		unsigned char parr[256];
+
+		memcpy(parr, rsp_buff + 5, my_len);
+		for (k = 0; k < my_len; ++k) {
+			printf("\n");
+			pg_code = parr[k];
+			if (0 ==
+			    do_logs(sg_fd, do_ppc, do_sp, pc, pg_code, paramp,
+				    rsp_buff, MX_ALLOC_LEN, 1)) {
+				pg_len = (rsp_buff[2] << 8) + rsp_buff[3];
+				if ((pg_len + 4) > MX_ALLOC_LEN) {
+					printf
+					    ("Only fetched %d bytes of response, truncate "
+					     "output\n", MX_ALLOC_LEN);
+					pg_len = MX_ALLOC_LEN - 4;
+				}
+				if (do_hex) {
+					printf
+					    ("Returned log page code=0x%x,  page len=0x%x\n",
+					     rsp_buff[0], pg_len);
+					dStrHex((const char *)rsp_buff,
+						pg_len + 4, 1);
+				} else
+					show_ascii_page(rsp_buff, pg_len + 4);
+			}
 		}
-		else
-		    show_ascii_page(rsp_buff, pg_len + 4);
-	    }
 	}
-    }
-    close(sg_fd);
-  return 0;
-}
-
-static int do_inquiry(int sg_fd, void * resp, int mx_resp_len)
-{
-    int res;
-    unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
-
-    inqCmdBlk[4] = (unsigned char)mx_resp_len;
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(inqCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_TO_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = inqCmdBlk;
-    io_hdr.timeout = DEF_TIMEOUT;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (inquiry) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-      return 0;
-    default:
-	sg_chk_n_print3("Failed INQUIRY", &io_hdr);
-        return -1;
-    }
-}
-
-void leaf_dir(const char * lf, unsigned int * larr)
-{
-    char name[NAME_LEN_MAX * 2];
-    int res;
-
-    if (do_quiet) {
-	printf("%u\t%u\t%u\t%u\n", larr[0], larr[1], larr[2], larr[3]);
-	return;
-    }
-    printf("%u\t%u\t%u\t%u\t%s\n", larr[0], larr[1], larr[2], larr[3], lf);
-    if (do_leaf) {
-	struct dirent * de_entry;
-	struct dirent * de_result;
-	DIR * sdir;
-	int outpos;
-
-	if (NULL == (sdir = opendir(lf))) {
-	    fprintf(stderr, "leaf_dir: opendir of %s: failed\n", lf);
-	    return;
-	}
-	de_entry = (struct dirent *)malloc(sizeof(struct dirent) +
-					   NAME_LEN_MAX);
-	if (NULL == de_entry)
-	    return;
-	res = 0;
-	printf("\t");
-	outpos = 8;
-	while (1) {
-	    res = readdir_r(sdir, de_entry, &de_result);
-	    if (0 != res) {
-		fprintf(stderr, "leaf_dir: readdir_r of %s: %s\n",
-			lf, strerror(res));
-		res = -2;
-		break;
-	    }
-	    if (de_result == NULL)
-		break;
-	    strncpy(name, de_entry->d_name, NAME_LEN_MAX * 2);
-	    if ((0 == strcmp("..", name)) ||(0 == strcmp(".", name)))
-		continue;
-	    if (do_extra) {
-		struct stat st;
-		char devname[NAME_LEN_MAX * 2];
-
-		strncpy(devname, lf, NAME_LEN_MAX * 2);
-		strcat(devname, "/");
-		strcat(devname, name);
-		if (stat(devname, &st) < 0)
-		    return;
-		if (S_ISCHR(st.st_mode)) {
-		    strcat(name, "(c ");
-		    sprintf(name + strlen(name), "%d %d)", major(st.st_rdev),
-			    minor(st.st_rdev));
-		}
-		else if (S_ISBLK(st.st_mode)) {
-		    strcat(name, "(b ");
-		    sprintf(name + strlen(name), "%d %d)", major(st.st_rdev),
-			    minor(st.st_rdev));
-		}
-	    }
-	    res = strlen(name);
-	    if ((outpos + res + 2) > 80) {
-		printf("\n\t");
-		outpos = 8;
-	    }
-	    printf("%s  ", name);
-	    outpos += res + 2;
-	}
-	printf("\n");
-    }
-    if (do_inq) {
-	int sg_fd;
-	char buff[64];
-
-	memset(buff, 0, sizeof(buff));
-	strncpy(name, lf, NAME_LEN_MAX * 2);
-	strcat(name, "/generic");
-	if ((sg_fd = open(name, O_RDONLY)) < 0) {
-	    if (! checked_sg) {
-		checked_sg = 1;
-		if ((sg_fd = open("/dev/sg0", O_RDONLY)) >= 0)
-		    close(sg_fd);  /* try and get sg module loaded */
-		sg_fd = open(name, O_RDONLY);
-	    }
-	    if (sg_fd < 0) {
-		printf("Unable to open sg device: %s, %s\n", name,
-		       strerror(errno));
-		return;
-	    }
-	}
-	if (0 != do_inquiry(sg_fd, buff, 64))
-	    return;
 	close(sg_fd);
-	dStrHex(buff, 64, 0);
-    }
+	return 0;
+}
+
+static int do_inquiry(int sg_fd, void *resp, int mx_resp_len)
+{
+	int res;
+	unsigned char inqCmdBlk[INQUIRY_CMDLEN] =
+	    { INQUIRY_CMD, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
+
+	inqCmdBlk[4] = (unsigned char)mx_resp_len;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(inqCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_TO_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = inqCmdBlk;
+	io_hdr.timeout = DEF_TIMEOUT;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (inquiry) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		sg_chk_n_print3("Failed INQUIRY", &io_hdr);
+		return -1;
+	}
+}
+
+void leaf_dir(const char *lf, unsigned int *larr)
+{
+	char name[NAME_LEN_MAX * 2];
+	int res;
+
+	if (do_quiet) {
+		printf("%u\t%u\t%u\t%u\n", larr[0], larr[1], larr[2], larr[3]);
+		return;
+	}
+	printf("%u\t%u\t%u\t%u\t%s\n", larr[0], larr[1], larr[2], larr[3], lf);
+	if (do_leaf) {
+		struct dirent *de_entry;
+		struct dirent *de_result;
+		DIR *sdir;
+		int outpos;
+
+		if (NULL == (sdir = opendir(lf))) {
+			fprintf(stderr, "leaf_dir: opendir of %s: failed\n",
+				lf);
+			return;
+		}
+		de_entry = (struct dirent *)malloc(sizeof(struct dirent) +
+						   NAME_LEN_MAX);
+		if (NULL == de_entry)
+			return;
+		res = 0;
+		printf("\t");
+		outpos = 8;
+		while (1) {
+			res = readdir_r(sdir, de_entry, &de_result);
+			if (0 != res) {
+				fprintf(stderr,
+					"leaf_dir: readdir_r of %s: %s\n", lf,
+					strerror(res));
+				res = -2;
+				break;
+			}
+			if (de_result == NULL)
+				break;
+			strncpy(name, de_entry->d_name, NAME_LEN_MAX * 2);
+			if ((0 == strcmp("..", name))
+			    || (0 == strcmp(".", name)))
+				continue;
+			if (do_extra) {
+				struct stat st;
+				char devname[NAME_LEN_MAX * 2];
+
+				strncpy(devname, lf, NAME_LEN_MAX * 2);
+				strcat(devname, "/");
+				strcat(devname, name);
+				if (stat(devname, &st) < 0)
+					return;
+				if (S_ISCHR(st.st_mode)) {
+					strcat(name, "(c ");
+					sprintf(name + strlen(name), "%d %d)",
+						major(st.st_rdev),
+						minor(st.st_rdev));
+				} else if (S_ISBLK(st.st_mode)) {
+					strcat(name, "(b ");
+					sprintf(name + strlen(name), "%d %d)",
+						major(st.st_rdev),
+						minor(st.st_rdev));
+				}
+			}
+			res = strlen(name);
+			if ((outpos + res + 2) > 80) {
+				printf("\n\t");
+				outpos = 8;
+			}
+			printf("%s  ", name);
+			outpos += res + 2;
+		}
+		printf("\n");
+	}
+	if (do_inq) {
+		int sg_fd;
+		char buff[64];
+
+		memset(buff, 0, sizeof(buff));
+		strncpy(name, lf, NAME_LEN_MAX * 2);
+		strcat(name, "/generic");
+		if ((sg_fd = open(name, O_RDONLY)) < 0) {
+			if (!checked_sg) {
+				checked_sg = 1;
+				if ((sg_fd = open("/dev/sg0", O_RDONLY)) >= 0)
+					close(sg_fd);	/* try and get sg module loaded */
+				sg_fd = open(name, O_RDONLY);
+			}
+			if (sg_fd < 0) {
+				printf("Unable to open sg device: %s, %s\n",
+				       name, strerror(errno));
+				return;
+			}
+		}
+		if (0 != do_inquiry(sg_fd, buff, 64))
+			return;
+		close(sg_fd);
+		dStrHex(buff, 64, 0);
+	}
 }
 
 /* Return 0 -> ok, -1 -> opendir() error, -2 -> readdir_r error,
          -3 -> malloc error */
-int hbtl_scan(const char * path, int level, unsigned int *larr)
+int hbtl_scan(const char *path, int level, unsigned int *larr)
 {
-    struct dirent * de_entry;
-    struct dirent * de_result;
-    char new_path[NAME_LEN_MAX * 2];
-    DIR * sdir;
-    int res;
-    size_t level_slen;
+	struct dirent *de_entry;
+	struct dirent *de_result;
+	char new_path[NAME_LEN_MAX * 2];
+	DIR *sdir;
+	int res;
+	size_t level_slen;
 
-    level_slen = strlen(level_arr[level]);
-    if (NULL == (sdir = opendir(path))) {
-	fprintf(stderr, "hbtl_scan: opendir of %s: failed\n", path);
-	return -1;
-    }
-    de_entry = (struct dirent *)malloc(sizeof(struct dirent) + NAME_LEN_MAX);
-    if (NULL == de_entry)
-    	return -3;
-    res = 0;
-    while (1) {
-	res = readdir_r(sdir, de_entry, &de_result);
-	if (0 != res) {
-	    fprintf(stderr, "hbtl_scan: readdir_r of %s: %s\n",
-	    	    path, strerror(res));
-	    res = -2;
-	    break;
+	level_slen = strlen(level_arr[level]);
+	if (NULL == (sdir = opendir(path))) {
+		fprintf(stderr, "hbtl_scan: opendir of %s: failed\n", path);
+		return -1;
 	}
-	if (de_result == NULL)
-	    break;
-	if (0 == strncmp(level_arr[level], de_entry->d_name, level_slen)) {
-	    if (1 != sscanf(de_entry->d_name + level_slen, "%u", larr + level))
-	    	larr[level] = UINT_MAX;
-	    strncpy(new_path, path, NAME_LEN_MAX * 2);
-	    strcat(new_path, "/");
-	    strcat(new_path, de_entry->d_name);
-	    if ((level + 1) < LEVELS) {
-		res = hbtl_scan(new_path, level + 1, larr);
-		if (res < 0)
-		    break;
-	    }
-	    else
-	    	leaf_dir(new_path, larr);
+	de_entry =
+	    (struct dirent *)malloc(sizeof(struct dirent) + NAME_LEN_MAX);
+	if (NULL == de_entry)
+		return -3;
+	res = 0;
+	while (1) {
+		res = readdir_r(sdir, de_entry, &de_result);
+		if (0 != res) {
+			fprintf(stderr, "hbtl_scan: readdir_r of %s: %s\n",
+				path, strerror(res));
+			res = -2;
+			break;
+		}
+		if (de_result == NULL)
+			break;
+		if (0 ==
+		    strncmp(level_arr[level], de_entry->d_name, level_slen)) {
+			if (1 !=
+			    sscanf(de_entry->d_name + level_slen, "%u",
+				   larr + level))
+				larr[level] = UINT_MAX;
+			strncpy(new_path, path, NAME_LEN_MAX * 2);
+			strcat(new_path, "/");
+			strcat(new_path, de_entry->d_name);
+			if ((level + 1) < LEVELS) {
+				res = hbtl_scan(new_path, level + 1, larr);
+				if (res < 0)
+					break;
+			} else
+				leaf_dir(new_path, larr);
+		}
 	}
-    }
-    free(de_entry);
-    closedir(sdir);
-    return res;
+	free(de_entry);
+	closedir(sdir);
+	return res;
 }
 
 int show_devfs_devices()
 {
-    int  res;
-    char ds_root[D_ROOT_SZ];
-    char di_root[D_ROOT_SZ];
-    unsigned int larr[LEVELS];
-    struct stat st;
+	int res;
+	char ds_root[D_ROOT_SZ];
+	char di_root[D_ROOT_SZ];
+	unsigned int larr[LEVELS];
+	struct stat st;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
-    strncpy(ds_root, "/dev", D_ROOT_SZ);
+	print_msg(TEST_BREAK, __FUNCTION__);
+	strncpy(ds_root, "/dev", D_ROOT_SZ);
 
-    strncpy(di_root, ds_root, D_ROOT_SZ);
+	strncpy(di_root, ds_root, D_ROOT_SZ);
 
-    strcat(di_root, "/.devfsd");
+	strcat(di_root, "/.devfsd");
 
-    if (stat(di_root, &st) < 0) {
-        printf("Didn't find %s so perhaps devfs is not present,"
-               " attempting to continue ...\n", di_root);
-    }
+	if (stat(di_root, &st) < 0) {
+		printf("Didn't find %s so perhaps devfs is not present,"
+		       " attempting to continue ...\n", di_root);
+	}
 
-    strncpy(di_root, ds_root, D_ROOT_SZ);
-    strcat(ds_root, "/scsi");
-    strcat(di_root, "/ide");
+	strncpy(di_root, ds_root, D_ROOT_SZ);
+	strcat(ds_root, "/scsi");
+	strcat(di_root, "/ide");
 
-    if (!do_ide)
-        printf("SCSI scan:\n");
+	if (!do_ide)
+		printf("SCSI scan:\n");
 
-    res = hbtl_scan(ds_root, 0, larr);
+	res = hbtl_scan(ds_root, 0, larr);
 
-    if (res < 0)
-        printf("main: scsi hbtl_scan res=%d\n", res);
+	if (res < 0)
+		printf("main: scsi hbtl_scan res=%d\n", res);
 
-    do_ide = TRUE;
-    do_inq = 0;  /* won't try SCSI INQUIRY on IDE devices */
+	do_ide = TRUE;
+	do_inq = 0;		/* won't try SCSI INQUIRY on IDE devices */
 
-    if (do_ide) {
-        printf("\nIDE scan:\n");
-        res = hbtl_scan(di_root, 0, larr);
+	if (do_ide) {
+		printf("\nIDE scan:\n");
+		res = hbtl_scan(di_root, 0, larr);
 
-        if (res < 0)
-            printf("main: ide hbtl_scan res=%d\n", res);
-    }
-  return 0;
+		if (res < 0)
+			printf("main: ide hbtl_scan res=%d\n", res);
+	}
+	return 0;
 }
 
-static void install_handler (int sig_num, void (*sig_handler) (int sig))
+static void install_handler(int sig_num, void (*sig_handler) (int sig))
 {
-    struct sigaction sigact;
-    sigaction (sig_num, NULL, &sigact);
-    if (sigact.sa_handler != SIG_IGN)
-    {
-        sigact.sa_handler = sig_handler;
-        sigemptyset (&sigact.sa_mask);
-        sigact.sa_flags = 0;
-        sigaction (sig_num, &sigact, NULL);
-    }
+	struct sigaction sigact;
+	sigaction(sig_num, NULL, &sigact);
+	if (sigact.sa_handler != SIG_IGN) {
+		sigact.sa_handler = sig_handler;
+		sigemptyset(&sigact.sa_mask);
+		sigact.sa_flags = 0;
+		sigaction(sig_num, &sigact, NULL);
+	}
 }
 
 void print_stats()
 {
-    if (0 != dd_count)
-        fprintf(stderr, "  remaining block count=%d\n", dd_count);
-    fprintf(stderr, "%d+%d records in\n", in_full - in_partial, in_partial);
-    fprintf(stderr, "%d+%d records out\n", out_full - out_partial,
-    	    out_partial);
+	if (0 != dd_count)
+		fprintf(stderr, "  remaining block count=%d\n", dd_count);
+	fprintf(stderr, "%d+%d records in\n", in_full - in_partial, in_partial);
+	fprintf(stderr, "%d+%d records out\n", out_full - out_partial,
+		out_partial);
 }
 
 static void interrupt_handler(int sig)
 {
-    struct sigaction sigact;
+	struct sigaction sigact;
 
-    sigact.sa_handler = SIG_DFL;
-    sigemptyset (&sigact.sa_mask);
-    sigact.sa_flags = 0;
-    sigaction (sig, &sigact, NULL);
-    fprintf(stderr, "Interrupted by signal,");
-    print_stats ();
-    kill (getpid (), sig);
+	sigact.sa_handler = SIG_DFL;
+	sigemptyset(&sigact.sa_mask);
+	sigact.sa_flags = 0;
+	sigaction(sig, &sigact, NULL);
+	fprintf(stderr, "Interrupted by signal,");
+	print_stats();
+	kill(getpid(), sig);
 }
 
 static void siginfo_handler(int sig)
 {
-    fprintf(stderr, "Progress report, continuing ...\n");
-    print_stats ();
+	fprintf(stderr, "Progress report, continuing ...\n");
+	print_stats();
 }
 
-int dd_filetype(const char * filename)
+int dd_filetype(const char *filename)
 {
-    struct stat st;
-    size_t len = strlen(filename);
+	struct stat st;
+	size_t len = strlen(filename);
 
-    if ((1 == len) && ('.' == filename[0]))
-    	return FT_DEV_NULL;
-    if (stat(filename, &st) < 0)
+	if ((1 == len) && ('.' == filename[0]))
+		return FT_DEV_NULL;
+	if (stat(filename, &st) < 0)
+		return FT_OTHER;
+	if (S_ISCHR(st.st_mode)) {
+		if ((MEM_MAJOR == major(st.st_rdev)) &&
+		    (DEV_NULL_MINOR_NUM == minor(st.st_rdev)))
+			return FT_DEV_NULL;
+		if (RAW_MAJOR == major(st.st_rdev))
+			return FT_RAW;
+		if (SCSI_GENERIC_MAJOR == major(st.st_rdev))
+			return FT_SG;
+		if (SCSI_TAPE_MAJOR == major(st.st_rdev))
+			return FT_ST;
+	} else if (S_ISBLK(st.st_mode))
+		return FT_BLOCK;
 	return FT_OTHER;
-    if (S_ISCHR(st.st_mode)) {
-	if ((MEM_MAJOR == major(st.st_rdev)) &&
-	    (DEV_NULL_MINOR_NUM == minor(st.st_rdev)))
-	    return FT_DEV_NULL;
-	if (RAW_MAJOR == major(st.st_rdev))
-	    return FT_RAW;
-	if (SCSI_GENERIC_MAJOR == major(st.st_rdev))
-	    return FT_SG;
-	if (SCSI_TAPE_MAJOR == major(st.st_rdev))
-	    return FT_ST;
-    }
-    else if (S_ISBLK(st.st_mode))
-	return FT_BLOCK;
-    return FT_OTHER;
 }
 
-int read_capacity(int sg_fd, int * num_sect, int * sect_sz)
+int read_capacity(int sg_fd, int *num_sect, int *sect_sz)
 {
-    int res;
-    unsigned char rcCmdBlk [10] = {READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    unsigned char rcBuff[READ_CAP_REPLY_LEN];
-    unsigned char sense_b[64];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char rcCmdBlk[10] =
+	    { READ_CAPACITY, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	unsigned char rcBuff[READ_CAP_REPLY_LEN];
+	unsigned char sense_b[64];
+	sg_io_hdr_t io_hdr;
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(rcCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = sizeof(rcBuff);
-    io_hdr.dxferp = rcBuff;
-    io_hdr.cmdp = rcCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(rcCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = sizeof(rcBuff);
+	io_hdr.dxferp = rcBuff;
+	io_hdr.cmdp = rcCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("read_capacity (SG_IO) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    if (SG_ERR_CAT_MEDIA_CHANGED == res)
-        return 2; /* probably have another go ... */
-    else if (SG_ERR_CAT_CLEAN != res) {
-        sg_chk_n_print3("read capacity", &io_hdr);
-        return -1;
-    }
-    *num_sect = 1 + ((rcBuff[0] << 24) | (rcBuff[1] << 16) |
-                (rcBuff[2] << 8) | rcBuff[3]);
-    *sect_sz = (rcBuff[4] << 24) | (rcBuff[5] << 16) |
-               (rcBuff[6] << 8) | rcBuff[7];
-  return 0;
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("read_capacity (SG_IO) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	if (SG_ERR_CAT_MEDIA_CHANGED == res)
+		return 2;	/* probably have another go ... */
+	else if (SG_ERR_CAT_CLEAN != res) {
+		sg_chk_n_print3("read capacity", &io_hdr);
+		return -1;
+	}
+	*num_sect = 1 + ((rcBuff[0] << 24) | (rcBuff[1] << 16) |
+			 (rcBuff[2] << 8) | rcBuff[3]);
+	*sect_sz = (rcBuff[4] << 24) | (rcBuff[5] << 16) |
+	    (rcBuff[6] << 8) | rcBuff[7];
+	return 0;
 }
 
 /* Return of 0 -> success, -1 -> failure, 2 -> try again */
 int sync_cache(int sg_fd)
 {
-    int res;
-    unsigned char scCmdBlk [10] = {SYNCHRONIZE_CACHE, 0, 0, 0, 0, 0, 0,
-    				   0, 0, 0};
-    unsigned char sense_b[64];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char scCmdBlk[10] = { SYNCHRONIZE_CACHE, 0, 0, 0, 0, 0, 0,
+		0, 0, 0
+	};
+	unsigned char sense_b[64];
+	sg_io_hdr_t io_hdr;
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(scCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_NONE;
-    io_hdr.dxfer_len = 0;
-    io_hdr.dxferp = NULL;
-    io_hdr.cmdp = scCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(scCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_NONE;
+	io_hdr.dxfer_len = 0;
+	io_hdr.dxferp = NULL;
+	io_hdr.cmdp = scCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("synchronize_cache (SG_IO) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    if (SG_ERR_CAT_MEDIA_CHANGED == res)
-        return 2; /* probably have another go ... */
-    else if (SG_ERR_CAT_CLEAN != res) {
-        sg_chk_n_print3("synchronize cache", &io_hdr);
-        return -1;
-    }
-  return 0;
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("synchronize_cache (SG_IO) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	if (SG_ERR_CAT_MEDIA_CHANGED == res)
+		return 2;	/* probably have another go ... */
+	else if (SG_ERR_CAT_CLEAN != res) {
+		sg_chk_n_print3("synchronize cache", &io_hdr);
+		return -1;
+	}
+	return 0;
 }
 
-int sg_build_scsi_cdb(unsigned char * cdbp, int cdb_sz, unsigned int blocks,
+int sg_build_scsi_cdb(unsigned char *cdbp, int cdb_sz, unsigned int blocks,
 		      unsigned int start_block, int write_true, int fua,
 		      int dpo)
 {
-    int rd_opcode[] = {0x8, 0x28, 0xa8, 0x88};
-    int wr_opcode[] = {0xa, 0x2a, 0xaa, 0x8a};
-    int sz_ind;
+	int rd_opcode[] = { 0x8, 0x28, 0xa8, 0x88 };
+	int wr_opcode[] = { 0xa, 0x2a, 0xaa, 0x8a };
+	int sz_ind;
 
-    memset(cdbp, 0, cdb_sz);
-    if (dpo)
-	cdbp[1] |= 0x10;
-    if (fua)
-	cdbp[1] |= 0x8;
-    switch (cdb_sz) {
-    case 6:
-    	sz_ind = 0;
-	cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
-					       rd_opcode[sz_ind]);
-	cdbp[1] = (unsigned char)((start_block >> 16) & 0x1f);
-	cdbp[2] = (unsigned char)((start_block >> 8) & 0xff);
-	cdbp[3] = (unsigned char)(start_block & 0xff);
-	cdbp[4] = (256 == blocks) ? 0 : (unsigned char)blocks;
-	if (blocks > 256) {
-	    fprintf(stderr, ME "for 6 byte commands, maximum number of "
-	    		    "blocks is 256\n");
-	    return 1;
-	}
-	if ((start_block + blocks - 1) & (~0x1fffff)) {
-	    fprintf(stderr, ME "for 6 byte commands, can't address blocks"
-	    		    " beyond %d\n", 0x1fffff);
-	    return 1;
-	}
-	if (dpo || fua) {
-	    fprintf(stderr, ME "for 6 byte commands, neither dpo nor fua"
-	    		    " bits supported\n");
-	    return 1;
-	}
-    	break;
-    case 10:
-    	sz_ind = 1;
-	cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
-					       rd_opcode[sz_ind]);
-	cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
-	cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
-	cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
-	cdbp[5] = (unsigned char)(start_block & 0xff);
-	cdbp[7] = (unsigned char)((blocks >> 8) & 0xff);
-	cdbp[8] = (unsigned char)(blocks & 0xff);
-	if (blocks & (~0xffff)) {
-	    fprintf(stderr, ME "for 10 byte commands, maximum number of "
-	    		    "blocks is %d\n", 0xffff);
-	    return 1;
-	}
-    	break;
-    case 12:
-    	sz_ind = 2;
-	cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
-					       rd_opcode[sz_ind]);
-	cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
-	cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
-	cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
-	cdbp[5] = (unsigned char)(start_block & 0xff);
-	cdbp[6] = (unsigned char)((blocks >> 24) & 0xff);
-	cdbp[7] = (unsigned char)((blocks >> 16) & 0xff);
-	cdbp[8] = (unsigned char)((blocks >> 8) & 0xff);
-	cdbp[9] = (unsigned char)(blocks & 0xff);
-    	break;
-    case 16:
-    	sz_ind = 3;
-	cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
-					       rd_opcode[sz_ind]);
-	/* can't cope with block number > 32 bits (yet) */
-	cdbp[6] = (unsigned char)((start_block >> 24) & 0xff);
-	cdbp[7] = (unsigned char)((start_block >> 16) & 0xff);
-	cdbp[8] = (unsigned char)((start_block >> 8) & 0xff);
-	cdbp[9] = (unsigned char)(start_block & 0xff);
-	cdbp[10] = (unsigned char)((blocks >> 24) & 0xff);
-	cdbp[11] = (unsigned char)((blocks >> 16) & 0xff);
-	cdbp[12] = (unsigned char)((blocks >> 8) & 0xff);
-	cdbp[13] = (unsigned char)(blocks & 0xff);
-    	break;
-    default:
-    	fprintf(stderr, ME "expected cdb size of 6, 10, 12, or 16 but got"
+	memset(cdbp, 0, cdb_sz);
+	if (dpo)
+		cdbp[1] |= 0x10;
+	if (fua)
+		cdbp[1] |= 0x8;
+	switch (cdb_sz) {
+	case 6:
+		sz_ind = 0;
+		cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
+					  rd_opcode[sz_ind]);
+		cdbp[1] = (unsigned char)((start_block >> 16) & 0x1f);
+		cdbp[2] = (unsigned char)((start_block >> 8) & 0xff);
+		cdbp[3] = (unsigned char)(start_block & 0xff);
+		cdbp[4] = (256 == blocks) ? 0 : (unsigned char)blocks;
+		if (blocks > 256) {
+			fprintf(stderr,
+				ME "for 6 byte commands, maximum number of "
+				"blocks is 256\n");
+			return 1;
+		}
+		if ((start_block + blocks - 1) & (~0x1fffff)) {
+			fprintf(stderr,
+				ME "for 6 byte commands, can't address blocks"
+				" beyond %d\n", 0x1fffff);
+			return 1;
+		}
+		if (dpo || fua) {
+			fprintf(stderr,
+				ME "for 6 byte commands, neither dpo nor fua"
+				" bits supported\n");
+			return 1;
+		}
+		break;
+	case 10:
+		sz_ind = 1;
+		cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
+					  rd_opcode[sz_ind]);
+		cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
+		cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
+		cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
+		cdbp[5] = (unsigned char)(start_block & 0xff);
+		cdbp[7] = (unsigned char)((blocks >> 8) & 0xff);
+		cdbp[8] = (unsigned char)(blocks & 0xff);
+		if (blocks & (~0xffff)) {
+			fprintf(stderr,
+				ME "for 10 byte commands, maximum number of "
+				"blocks is %d\n", 0xffff);
+			return 1;
+		}
+		break;
+	case 12:
+		sz_ind = 2;
+		cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
+					  rd_opcode[sz_ind]);
+		cdbp[2] = (unsigned char)((start_block >> 24) & 0xff);
+		cdbp[3] = (unsigned char)((start_block >> 16) & 0xff);
+		cdbp[4] = (unsigned char)((start_block >> 8) & 0xff);
+		cdbp[5] = (unsigned char)(start_block & 0xff);
+		cdbp[6] = (unsigned char)((blocks >> 24) & 0xff);
+		cdbp[7] = (unsigned char)((blocks >> 16) & 0xff);
+		cdbp[8] = (unsigned char)((blocks >> 8) & 0xff);
+		cdbp[9] = (unsigned char)(blocks & 0xff);
+		break;
+	case 16:
+		sz_ind = 3;
+		cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] :
+					  rd_opcode[sz_ind]);
+		/* can't cope with block number > 32 bits (yet) */
+		cdbp[6] = (unsigned char)((start_block >> 24) & 0xff);
+		cdbp[7] = (unsigned char)((start_block >> 16) & 0xff);
+		cdbp[8] = (unsigned char)((start_block >> 8) & 0xff);
+		cdbp[9] = (unsigned char)(start_block & 0xff);
+		cdbp[10] = (unsigned char)((blocks >> 24) & 0xff);
+		cdbp[11] = (unsigned char)((blocks >> 16) & 0xff);
+		cdbp[12] = (unsigned char)((blocks >> 8) & 0xff);
+		cdbp[13] = (unsigned char)(blocks & 0xff);
+		break;
+	default:
+		fprintf(stderr,
+			ME "expected cdb size of 6, 10, 12, or 16 but got"
 			"=%d\n", cdb_sz);
-    	return 1;
-    }
-  return 0;
+		return 1;
+	}
+	return 0;
 }
 
 /* -1 -> unrecoverable error, 0 -> successful, 1 -> recoverable (ENOMEM),
    2 -> try again */
-int sg_read(int sg_fd, unsigned char * buff, int blocks, int from_block,
-            int bs, int cdbsz, int fua, int * diop)
+int sg_read(int sg_fd, unsigned char *buff, int blocks, int from_block,
+	    int bs, int cdbsz, int fua, int *diop)
 {
-    unsigned char rdCmd[MAX_SCSI_CDBSZ];
-    unsigned char senseBuff[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	unsigned char rdCmd[MAX_SCSI_CDBSZ];
+	unsigned char senseBuff[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    if (sg_build_scsi_cdb(rdCmd, cdbsz, blocks, from_block, 0, fua, 0)) {
-    	fprintf(stderr, ME "bad rd cdb build, from_block=%d, blocks=%d\n",
-		from_block, blocks);
-    	return -1;
-    }
-
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = cdbsz;
-    io_hdr.cmdp = rdCmd;
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = bs * blocks;
-    io_hdr.dxferp = buff;
-    io_hdr.mx_sb_len = SENSE_BUFF_LEN;
-    io_hdr.sbp = senseBuff;
-    io_hdr.timeout = DEF_TIMEOUT;
-    io_hdr.pack_id = from_block;
-    if (diop && *diop)
-        io_hdr.flags |= SG_FLAG_DIRECT_IO;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr)) {
-        if (ENOMEM == errno)
-            return 1;
-        perror("reading (SG_IO) on sg device, error");
-        return -1;
-    }
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-        break;
-    case SG_ERR_CAT_RECOVERED:
-        fprintf(stderr, "Recovered error while reading block=%d, num=%d\n",
-               from_block, blocks);
-        break;
-    case SG_ERR_CAT_MEDIA_CHANGED:
-        return 2;
-    default:
-        sg_chk_n_print3("reading", &io_hdr);
-	if (do_coe) {
-	    memset(buff, 0, bs * blocks);
-	    fprintf(stderr, ">> unable to read at blk=%d for "
-                        "%d bytes, use zeros\n", from_block, bs * blocks);
-	  return 0; /* fudge success */
+	if (sg_build_scsi_cdb(rdCmd, cdbsz, blocks, from_block, 0, fua, 0)) {
+		fprintf(stderr,
+			ME "bad rd cdb build, from_block=%d, blocks=%d\n",
+			from_block, blocks);
+		return -1;
 	}
-	else
-	    return -1;
-    }
-    if (diop && *diop &&
-        ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
-        *diop = 0;      /* flag that dio not done (completely) */
-    sum_of_resids += io_hdr.resid;
+
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = cdbsz;
+	io_hdr.cmdp = rdCmd;
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = bs * blocks;
+	io_hdr.dxferp = buff;
+	io_hdr.mx_sb_len = SENSE_BUFF_LEN;
+	io_hdr.sbp = senseBuff;
+	io_hdr.timeout = DEF_TIMEOUT;
+	io_hdr.pack_id = from_block;
+	if (diop && *diop)
+		io_hdr.flags |= SG_FLAG_DIRECT_IO;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr)) {
+		if (ENOMEM == errno)
+			return 1;
+		perror("reading (SG_IO) on sg device, error");
+		return -1;
+	}
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		fprintf(stderr,
+			"Recovered error while reading block=%d, num=%d\n",
+			from_block, blocks);
+		break;
+	case SG_ERR_CAT_MEDIA_CHANGED:
+		return 2;
+	default:
+		sg_chk_n_print3("reading", &io_hdr);
+		if (do_coe) {
+			memset(buff, 0, bs * blocks);
+			fprintf(stderr, ">> unable to read at blk=%d for "
+				"%d bytes, use zeros\n", from_block,
+				bs * blocks);
+			return 0;	/* fudge success */
+		} else
+			return -1;
+	}
+	if (diop && *diop &&
+	    ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
+		*diop = 0;	/* flag that dio not done (completely) */
+	sum_of_resids += io_hdr.resid;
 #if SG_DEBUG
-    fprintf(stderr, "duration=%u ms\n", io_hdr.duration);
+	fprintf(stderr, "duration=%u ms\n", io_hdr.duration);
 #endif
-  return 0;
+	return 0;
 }
 
 /* -1 -> unrecoverable error, 0 -> successful, 1 -> recoverable (ENOMEM),
    2 -> try again */
-int sg_write(int sg_fd, unsigned char * buff, int blocks, int to_block,
-             int bs, int cdbsz, int fua, int * diop)
+int sg_write(int sg_fd, unsigned char *buff, int blocks, int to_block,
+	     int bs, int cdbsz, int fua, int *diop)
 {
-    unsigned char wrCmd[MAX_SCSI_CDBSZ];
-    unsigned char senseBuff[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	unsigned char wrCmd[MAX_SCSI_CDBSZ];
+	unsigned char senseBuff[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    if (sg_build_scsi_cdb(wrCmd, cdbsz, blocks, to_block, 1, fua, 0)) {
-    	fprintf(stderr, ME "bad wr cdb build, to_block=%d, blocks=%d\n",
-		to_block, blocks);
-    	return -1;
-    }
-
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = cdbsz;
-    io_hdr.cmdp = wrCmd;
-    io_hdr.dxfer_direction = SG_DXFER_TO_DEV;
-    io_hdr.dxfer_len = bs * blocks;
-    io_hdr.dxferp = buff;
-    io_hdr.mx_sb_len = SENSE_BUFF_LEN;
-    io_hdr.sbp = senseBuff;
-    io_hdr.timeout = DEF_TIMEOUT;
-    io_hdr.pack_id = to_block;
-    if (diop && *diop)
-        io_hdr.flags |= SG_FLAG_DIRECT_IO;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr)) {
-        if (ENOMEM == errno)
-            return 1;
-        perror("writing (SG_IO) on sg device, error");
-        return -1;
-    }
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-        break;
-    case SG_ERR_CAT_RECOVERED:
-        fprintf(stderr, "Recovered error while writing block=%d, num=%d\n",
-               to_block, blocks);
-        break;
-    case SG_ERR_CAT_MEDIA_CHANGED:
-        return 2;
-    default:
-        sg_chk_n_print3("writing", &io_hdr);
-	if (do_coe) {
-	    fprintf(stderr, ">> ignored errors for out blk=%d for "
-		    "%d bytes\n", to_block, bs * blocks);
-	  return 0; /* fudge success */
+	if (sg_build_scsi_cdb(wrCmd, cdbsz, blocks, to_block, 1, fua, 0)) {
+		fprintf(stderr, ME "bad wr cdb build, to_block=%d, blocks=%d\n",
+			to_block, blocks);
+		return -1;
 	}
-	else
-	    return -1;
-    }
-    if (diop && *diop &&
-        ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
-        *diop = 0;      /* flag that dio not done (completely) */
-  return 0;
+
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = cdbsz;
+	io_hdr.cmdp = wrCmd;
+	io_hdr.dxfer_direction = SG_DXFER_TO_DEV;
+	io_hdr.dxfer_len = bs * blocks;
+	io_hdr.dxferp = buff;
+	io_hdr.mx_sb_len = SENSE_BUFF_LEN;
+	io_hdr.sbp = senseBuff;
+	io_hdr.timeout = DEF_TIMEOUT;
+	io_hdr.pack_id = to_block;
+	if (diop && *diop)
+		io_hdr.flags |= SG_FLAG_DIRECT_IO;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr)) {
+		if (ENOMEM == errno)
+			return 1;
+		perror("writing (SG_IO) on sg device, error");
+		return -1;
+	}
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		fprintf(stderr,
+			"Recovered error while writing block=%d, num=%d\n",
+			to_block, blocks);
+		break;
+	case SG_ERR_CAT_MEDIA_CHANGED:
+		return 2;
+	default:
+		sg_chk_n_print3("writing", &io_hdr);
+		if (do_coe) {
+			fprintf(stderr, ">> ignored errors for out blk=%d for "
+				"%d bytes\n", to_block, bs * blocks);
+			return 0;	/* fudge success */
+		} else
+			return -1;
+	}
+	if (diop && *diop &&
+	    ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
+		*diop = 0;	/* flag that dio not done (completely) */
+	return 0;
 }
 
-int get_num(char * buf)
+int get_num(char *buf)
 {
-    int res, num;
-    char c;
-
-    res = sscanf(buf, "%d%c", &num, &c);
-    if (0 == res)
-        return -1;
-    else if (1 == res)
-        return num;
-    else {
-    	switch (c) {
-	case 'c':
-	case 'C':
-            return num;
-	case 'b':
-	case 'B':
-            return num * 512;
-	case 'k':
-            return num * 1024;
-	case 'K':
-            return num * 1000;
-	case 'm':
-            return num * 1024 * 1024;
-	case 'M':
-            return num * 1000000;
-	case 'g':
-            return num * 1024 * 1024 * 1024;
-	case 'G':
-            return num * 1000000000;
-        default:
-            fprintf(stderr, "unrecognized multiplier\n");
-            return -1;
-	}
-    }
-}
-
-int do_scsi_device_read_write(char * device)
-{
-    int skip = 0;
-    int seek = 0;
-    int bs = 0;
-    int ibs = 0;
-    int obs = 0;
-    int bpt = DEF_BLOCKS_PER_TRANSFER;
-    char inf[INOUTF_SZ];
-    int in_type = FT_OTHER;
-    char outf[INOUTF_SZ];
-    int out_type = FT_OTHER;
-    int dio = 0;
-    int dio_incomplete = 0;
-    int do_time = 1;
-    int do_odir = 1;
-    int scsi_cdbsz = DEF_SCSI_CDBSZ;
-    int fua_mode = 0;
-    int do_sync = 1;
-    int do_blk_sgio = 1;
-    int do_append = 1;
-    int res, t, buf_sz, dio_tmp;
-    int infd, outfd, blocks;
-    unsigned char * wrkBuff;
-    unsigned char * wrkPos;
-    int in_num_sect = 0;
-    int out_num_sect = 0;
-    int in_sect_sz, out_sect_sz;
-    char ebuff[EBUFF_SZ];
-    int blocks_per;
-    int req_count;
-    struct timeval start_tm, end_tm;
-
-    print_msg(TEST_BREAK, __FUNCTION__);
-    strcpy(inf,"/dev/zero");
-    strcpy(outf,device);
-
-    if (bs <= 0) {
-        bs = DEF_BLOCK_SIZE;
-        fprintf(stderr, "Assume default 'bs' (block size) of %d bytes\n", bs);
-    }
-    if ((ibs && (ibs != bs)) || (obs && (obs != bs))) {
-        fprintf(stderr, "If 'ibs' or 'obs' given must be same as 'bs'\n");
-        usage();
-        return 1;
-    }
-    if ((skip < 0) || (seek < 0)) {
-        fprintf(stderr, "skip and seek cannot be negative\n");
-        return 1;
-    }
-    if ((do_append > 0) && (seek > 0)) {
-        fprintf(stderr, "Can't use both append and seek switches\n");
-        return 1;
-    }
-#ifdef SG_DEBUG
-    fprintf(stderr, ME "if=%s skip=%d of=%s seek=%d count=%d\n",
-           inf, skip, outf, seek, dd_count);
-#endif
-    install_handler (SIGINT, interrupt_handler);
-    install_handler (SIGQUIT, interrupt_handler);
-    install_handler (SIGPIPE, interrupt_handler);
-    install_handler (SIGUSR1, siginfo_handler);
-
-    infd = STDIN_FILENO;
-    outfd = STDOUT_FILENO;
-    if (inf[0] && ('-' != inf[0])) {
-	in_type = dd_filetype(inf);
-
-	if ((FT_BLOCK & in_type) && do_blk_sgio)
-	    in_type |= FT_SG;
-
-	if (FT_ST == in_type) {
-	    fprintf(stderr, ME "unable to use scsi tape device %s\n", inf);
-	    return 1;
-	}
-	else if (FT_SG & in_type) {
-	    if ((infd = open(inf, O_RDWR)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for sg reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-	    t = bs * bpt;
-            res = ioctl(infd, SG_SET_RESERVED_SIZE, &t);
-            if (res < 0)
-                perror(ME "SG_SET_RESERVED_SIZE error");
-            res = ioctl(infd, SG_GET_VERSION_NUM, &t);
-            if ((res < 0) || (t < 30000)) {
-		if (FT_BLOCK & in_type)
-		    fprintf(stderr, ME "SG_IO unsupported on this block"
-				    " device\n");
-		else
-		    fprintf(stderr, ME "sg driver prior to 3.x.y\n");
-                return 1;
-            }
-        }
-        else {
-            if (do_odir && (FT_BLOCK == in_type))
-	        infd = open(inf, O_RDONLY | O_DIRECT);
-	    else
-	        infd = open(inf, O_RDONLY);
-            if (infd < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-            else if (skip > 0) {
-                llse_loff_t offset = skip;
-
-                offset *= bs;       /* could exceed 32 bits here! */
-                if (llse_llseek(infd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-			ME "couldn't skip to required position on %s", inf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-        }
-    }
-
-    if (outf[0] && ('-' != outf[0])) {
-	out_type = dd_filetype(outf);
-
-	if ((FT_BLOCK & out_type) && do_blk_sgio)
-	    out_type |= FT_SG;
-
-	if (FT_ST == out_type) {
-	    fprintf(stderr, ME "unable to use scsi tape device %s\n", outf);
-	    return 1;
-	}
-	else if (FT_SG & out_type) {
-	    if ((outfd = open(outf, O_RDWR)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for sg writing", outf);
-                perror(ebuff);
-                return 1;
-            }
-            t = bs * bpt;
-            res = ioctl(outfd, SG_SET_RESERVED_SIZE, &t);
-            if (res < 0)
-                perror(ME "SG_SET_RESERVED_SIZE error");
-            res = ioctl(outfd, SG_GET_VERSION_NUM, &t);
-            if ((res < 0) || (t < 30000)) {
-                fprintf(stderr, ME "sg driver prior to 3.x.y\n");
-                return 1;
-            }
-        }
-	else if (FT_DEV_NULL & out_type)
-	    outfd = -1;	/* don't bother opening */
-	else {
-	    if (FT_RAW != out_type) {
-		int flags = O_WRONLY | O_CREAT;
-
-	        if (do_odir && (FT_BLOCK == out_type))
-		    flags |= O_DIRECT;
-		else if (do_append)
-		    flags |= O_APPEND;
-		if ((outfd = open(outf, flags, 0666)) < 0) {
-		    snprintf(ebuff, EBUFF_SZ,
-			    ME "could not open %s for writing", outf);
-		    perror(ebuff);
-		    return 1;
-		}
-	    }
-	    else {
-		if ((outfd = open(outf, O_WRONLY)) < 0) {
-		    snprintf(ebuff, EBUFF_SZ,
-			    ME "could not open %s for raw writing", outf);
-		    perror(ebuff);
-		    return 1;
-		}
-	    }
-            if (seek > 0) {
-                llse_loff_t offset = seek;
-
-                offset *= bs;       /* could exceed 32 bits here! */
-                if (llse_llseek(outfd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-			ME "couldn't seek to required position on %s", outf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-        }
-    }
-    if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) {
-        fprintf(stderr,
-		"Can't have both 'if' as stdin _and_ 'of' as stdout\n");
-        return 1;
-    }
-
-    if (dd_count < 0) {
-        if (FT_SG & in_type) {
-            res = read_capacity(infd, &in_num_sect, &in_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(in), continuing\n");
-                res = read_capacity(infd, &in_num_sect, &in_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", inf);
-                in_num_sect = -1;
-            }
-            else {
-                if (in_num_sect > skip)
-                    in_num_sect -= skip;
-            }
-        }
-        if (FT_SG & out_type) {
-            res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(out), continuing\n");
-                res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", outf);
-                out_num_sect = -1;
-            }
-            else {
-                if (out_num_sect > seek)
-                    out_num_sect -= seek;
-            }
-        }
-#ifdef SG_DEBUG
-    fprintf(stderr,
-	    "Start of loop, count=%d, in_num_sect=%d, out_num_sect=%d\n",
-            dd_count, in_num_sect, out_num_sect);
-#endif
-        if (in_num_sect > 0) {
-            if (out_num_sect > 0)
-                dd_count = (in_num_sect > out_num_sect) ? out_num_sect :
-                                                       in_num_sect;
-            else
-                dd_count = in_num_sect;
-        }
-        else
-            dd_count = out_num_sect;
-    }
-    if (dd_count < 0) {
-        fprintf(stderr, "Couldn't calculate count, please give one\n");
-        return 1;
-    }
-
-    if (dio || do_odir || (FT_RAW == in_type) || (FT_RAW == out_type)) {
-	size_t psz = getpagesize();
-	wrkBuff = malloc(bs * bpt + psz);
-	if (0 == wrkBuff) {
-            fprintf(stderr, "Not enough user memory for raw\n");
-            return 1;
-        }
-	wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
-		                   (~(psz - 1)));
-    }
-    else {
-	wrkBuff = malloc(bs * bpt);
-	if (0 == wrkBuff) {
-            fprintf(stderr, "Not enough user memory\n");
-            return 1;
-        }
-        wrkPos = wrkBuff;
-    }
-
-    blocks_per = bpt;
-#ifdef SG_DEBUG
-    fprintf(stderr, "Start of loop, count=%d, blocks_per=%d\n",
-	    dd_count, blocks_per);
-#endif
-    if (do_time) {
-        start_tm.tv_sec = 0;
-        start_tm.tv_usec = 0;
-        gettimeofday(&start_tm, NULL);
-    }
-    req_count = dd_count;
-
-    while (dd_count > 0) {
-        blocks = (dd_count > blocks_per) ? blocks_per : dd_count;
-        if (FT_SG & in_type) {
-	    int fua = fua_mode & 2;
-
-            dio_tmp = dio;
-            res = sg_read(infd, wrkPos, blocks, skip, bs, scsi_cdbsz, fua,
-	    		  &dio_tmp);
-            if (1 == res) {     /* ENOMEM, find what's available+try that */
-                if (ioctl(infd, SG_GET_RESERVED_SIZE, &buf_sz) < 0) {
-                    perror("RESERVED_SIZE ioctls failed");
-                    break;
-                }
-                blocks_per = (buf_sz + bs - 1) / bs;
-                blocks = blocks_per;
-                fprintf(stderr,
-			"Reducing read to %d blocks per loop\n", blocks_per);
-                res = sg_read(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
-			      fua, &dio_tmp);
-            }
-            else if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed, continuing (r)\n");
-                res = sg_read(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
-			      fua, &dio_tmp);
-            }
-            if (0 != res) {
-                fprintf(stderr, "sg_read failed, skip=%d\n", skip);
-                break;
-            }
-            else {
-                in_full += blocks;
-                if (dio && (0 == dio_tmp))
-                    dio_incomplete++;
-            }
-        }
-        else {
-	    while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
-		   (EINTR == errno))
-		;
-            if (res < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "reading, skip=%d ", skip);
-                perror(ebuff);
-                break;
-            }
-            else if (res < blocks * bs) {
-                dd_count = 0;
-                blocks = res / bs;
-                if ((res % bs) > 0) {
-                    blocks++;
-                    in_partial++;
-                }
-            }
-            in_full += blocks;
-        }
-
-        if (FT_SG & out_type) {
-	    int fua = fua_mode & 1;
-
-            dio_tmp = dio;
-            res = sg_write(outfd, wrkPos, blocks, seek, bs, scsi_cdbsz,
-	    		   fua, &dio_tmp);
-            if (1 == res) {     /* ENOMEM, find what's available+try that */
-                if (ioctl(outfd, SG_GET_RESERVED_SIZE, &buf_sz) < 0) {
-                    perror("RESERVED_SIZE ioctls failed");
-                    break;
-                }
-                blocks_per = (buf_sz + bs - 1) / bs;
-                blocks = blocks_per;
-                fprintf(stderr,
-			"Reducing write to %d blocks per loop\n", blocks);
-                res = sg_write(outfd, wrkPos, blocks, seek, bs, scsi_cdbsz,
-			       fua, &dio_tmp);
-            }
-            else if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed, continuing (w)\n");
-                res = sg_write(outfd, wrkPos, blocks, seek, bs, scsi_cdbsz,
-			       fua, &dio_tmp);
-            }
-            else if (0 != res) {
-                fprintf(stderr, "sg_write failed, seek=%d\n", seek);
-                break;
-            }
-            else {
-                out_full += blocks;
-                if (dio && (0 == dio_tmp))
-                    dio_incomplete++;
-            }
-        }
-	else if (FT_DEV_NULL & out_type)
-	    out_full += blocks; /* act as if written out without error */
-        else {
-	    while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
-		   && (EINTR == errno))
-		;
-            if (res < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "writing, seek=%d ", seek);
-                perror(ebuff);
-                break;
-            }
-            else if (res < blocks * bs) {
-                fprintf(stderr, "output file probably full, seek=%d ", seek);
-                blocks = res / bs;
-                out_full += blocks;
-                if ((res % bs) > 0)
-                    out_partial++;
-                break;
-            }
-            else
-                out_full += blocks;
-        }
-        if (dd_count > 0)
-            dd_count -= blocks;
-        skip += blocks;
-        seek += blocks;
-    }
-    if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
-        struct timeval res_tm;
-        double a, b;
-
-        gettimeofday(&end_tm, NULL);
-        res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
-        res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
-        if (res_tm.tv_usec < 0) {
-            --res_tm.tv_sec;
-            res_tm.tv_usec += 1000000;
-        }
-        a = res_tm.tv_sec;
-        a += (0.000001 * res_tm.tv_usec);
-        b = (double)bs * (req_count - dd_count);
-        printf("time to transfer data was %d.%06d secs",
-               (int)res_tm.tv_sec, (int)res_tm.tv_usec);
-        if ((a > 0.00001) && (b > 511))
-            printf(", %.2f MB/sec\n", b / (a * 1000000.0));
-        else
-            printf("\n");
-    }
-    if (do_sync) {
-	if (FT_SG & out_type) {
-	    fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
-            res = sync_cache(outfd);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(in), continuing\n");
-                res = sync_cache(outfd);
-            }
-            if (0 != res)
-                fprintf(stderr, "Unable to synchronize cache\n");
-	}
-    }
-    free(wrkBuff);
-    if (STDIN_FILENO != infd)
-        close(infd);
-    if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type))
-        close(outfd);
-    res = 0;
-    if (0 != dd_count) {
-        fprintf(stderr, "Some error occurred,");
-	res = 2;
-    }
-    print_stats();
-    if (dio_incomplete) {
-    	int fd;
+	int res, num;
 	char c;
 
-        fprintf(stderr, ">> Direct IO requested but incomplete %d times\n",
-                dio_incomplete);
-	if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
-	    if (1 == read(fd, &c, 1)) {
-	    	if ('0' == c)
-		    fprintf(stderr, ">>> %s set to '0' but should be set "
-		    	    "to '1' for direct IO\n", proc_allow_dio);
-	    }
-	    close(fd);
+	res = sscanf(buf, "%d%c", &num, &c);
+	if (0 == res)
+		return -1;
+	else if (1 == res)
+		return num;
+	else {
+		switch (c) {
+		case 'c':
+		case 'C':
+			return num;
+		case 'b':
+		case 'B':
+			return num * 512;
+		case 'k':
+			return num * 1024;
+		case 'K':
+			return num * 1000;
+		case 'm':
+			return num * 1024 * 1024;
+		case 'M':
+			return num * 1000000;
+		case 'g':
+			return num * 1024 * 1024 * 1024;
+		case 'G':
+			return num * 1000000000;
+		default:
+			fprintf(stderr, "unrecognized multiplier\n");
+			return -1;
+		}
 	}
-    }
-    if (sum_of_resids)
-        fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
-		sum_of_resids);
-    return res;
 }
+
+int do_scsi_device_read_write(char *device)
+{
+	int skip = 0;
+	int seek = 0;
+	int bs = 0;
+	int ibs = 0;
+	int obs = 0;
+	int bpt = DEF_BLOCKS_PER_TRANSFER;
+	char inf[INOUTF_SZ];
+	int in_type = FT_OTHER;
+	char outf[INOUTF_SZ];
+	int out_type = FT_OTHER;
+	int dio = 0;
+	int dio_incomplete = 0;
+	int do_time = 1;
+	int do_odir = 1;
+	int scsi_cdbsz = DEF_SCSI_CDBSZ;
+	int fua_mode = 0;
+	int do_sync = 1;
+	int do_blk_sgio = 1;
+	int do_append = 1;
+	int res, t, buf_sz, dio_tmp;
+	int infd, outfd, blocks;
+	unsigned char *wrkBuff;
+	unsigned char *wrkPos;
+	int in_num_sect = 0;
+	int out_num_sect = 0;
+	int in_sect_sz, out_sect_sz;
+	char ebuff[EBUFF_SZ];
+	int blocks_per;
+	int req_count;
+	struct timeval start_tm, end_tm;
+
+	print_msg(TEST_BREAK, __FUNCTION__);
+	strcpy(inf, "/dev/zero");
+	strcpy(outf, device);
+
+	if (bs <= 0) {
+		bs = DEF_BLOCK_SIZE;
+		fprintf(stderr,
+			"Assume default 'bs' (block size) of %d bytes\n", bs);
+	}
+	if ((ibs && (ibs != bs)) || (obs && (obs != bs))) {
+		fprintf(stderr,
+			"If 'ibs' or 'obs' given must be same as 'bs'\n");
+		usage();
+		return 1;
+	}
+	if ((skip < 0) || (seek < 0)) {
+		fprintf(stderr, "skip and seek cannot be negative\n");
+		return 1;
+	}
+	if ((do_append > 0) && (seek > 0)) {
+		fprintf(stderr, "Can't use both append and seek switches\n");
+		return 1;
+	}
+#ifdef SG_DEBUG
+	fprintf(stderr, ME "if=%s skip=%d of=%s seek=%d count=%d\n",
+		inf, skip, outf, seek, dd_count);
+#endif
+	install_handler(SIGINT, interrupt_handler);
+	install_handler(SIGQUIT, interrupt_handler);
+	install_handler(SIGPIPE, interrupt_handler);
+	install_handler(SIGUSR1, siginfo_handler);
+
+	infd = STDIN_FILENO;
+	outfd = STDOUT_FILENO;
+	if (inf[0] && ('-' != inf[0])) {
+		in_type = dd_filetype(inf);
+
+		if ((FT_BLOCK & in_type) && do_blk_sgio)
+			in_type |= FT_SG;
+
+		if (FT_ST == in_type) {
+			fprintf(stderr,
+				ME "unable to use scsi tape device %s\n", inf);
+			return 1;
+		} else if (FT_SG & in_type) {
+			if ((infd = open(inf, O_RDWR)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for sg reading",
+					 inf);
+				perror(ebuff);
+				return 1;
+			}
+			t = bs * bpt;
+			res = ioctl(infd, SG_SET_RESERVED_SIZE, &t);
+			if (res < 0)
+				perror(ME "SG_SET_RESERVED_SIZE error");
+			res = ioctl(infd, SG_GET_VERSION_NUM, &t);
+			if ((res < 0) || (t < 30000)) {
+				if (FT_BLOCK & in_type)
+					fprintf(stderr,
+						ME
+						"SG_IO unsupported on this block"
+						" device\n");
+				else
+					fprintf(stderr,
+						ME
+						"sg driver prior to 3.x.y\n");
+				return 1;
+			}
+		} else {
+			if (do_odir && (FT_BLOCK == in_type))
+				infd = open(inf, O_RDONLY | O_DIRECT);
+			else
+				infd = open(inf, O_RDONLY);
+			if (infd < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for reading",
+					 inf);
+				perror(ebuff);
+				return 1;
+			} else if (skip > 0) {
+				llse_loff_t offset = skip;
+
+				offset *= bs;	/* could exceed 32 bits here! */
+				if (llse_llseek(infd, offset, SEEK_SET) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "couldn't skip to required position on %s",
+						 inf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		}
+	}
+
+	if (outf[0] && ('-' != outf[0])) {
+		out_type = dd_filetype(outf);
+
+		if ((FT_BLOCK & out_type) && do_blk_sgio)
+			out_type |= FT_SG;
+
+		if (FT_ST == out_type) {
+			fprintf(stderr,
+				ME "unable to use scsi tape device %s\n", outf);
+			return 1;
+		} else if (FT_SG & out_type) {
+			if ((outfd = open(outf, O_RDWR)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for sg writing",
+					 outf);
+				perror(ebuff);
+				return 1;
+			}
+			t = bs * bpt;
+			res = ioctl(outfd, SG_SET_RESERVED_SIZE, &t);
+			if (res < 0)
+				perror(ME "SG_SET_RESERVED_SIZE error");
+			res = ioctl(outfd, SG_GET_VERSION_NUM, &t);
+			if ((res < 0) || (t < 30000)) {
+				fprintf(stderr,
+					ME "sg driver prior to 3.x.y\n");
+				return 1;
+			}
+		} else if (FT_DEV_NULL & out_type)
+			outfd = -1;	/* don't bother opening */
+		else {
+			if (FT_RAW != out_type) {
+				int flags = O_WRONLY | O_CREAT;
+
+				if (do_odir && (FT_BLOCK == out_type))
+					flags |= O_DIRECT;
+				else if (do_append)
+					flags |= O_APPEND;
+				if ((outfd = open(outf, flags, 0666)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "could not open %s for writing",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			} else {
+				if ((outfd = open(outf, O_WRONLY)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "could not open %s for raw writing",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+			if (seek > 0) {
+				llse_loff_t offset = seek;
+
+				offset *= bs;	/* could exceed 32 bits here! */
+				if (llse_llseek(outfd, offset, SEEK_SET) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "couldn't seek to required position on %s",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		}
+	}
+	if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) {
+		fprintf(stderr,
+			"Can't have both 'if' as stdin _and_ 'of' as stdout\n");
+		return 1;
+	}
+
+	if (dd_count < 0) {
+		if (FT_SG & in_type) {
+			res = read_capacity(infd, &in_num_sect, &in_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res =
+				    read_capacity(infd, &in_num_sect,
+						  &in_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n", inf);
+				in_num_sect = -1;
+			} else {
+				if (in_num_sect > skip)
+					in_num_sect -= skip;
+			}
+		}
+		if (FT_SG & out_type) {
+			res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(out), continuing\n");
+				res =
+				    read_capacity(outfd, &out_num_sect,
+						  &out_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n",
+					outf);
+				out_num_sect = -1;
+			} else {
+				if (out_num_sect > seek)
+					out_num_sect -= seek;
+			}
+		}
+#ifdef SG_DEBUG
+		fprintf(stderr,
+			"Start of loop, count=%d, in_num_sect=%d, out_num_sect=%d\n",
+			dd_count, in_num_sect, out_num_sect);
+#endif
+		if (in_num_sect > 0) {
+			if (out_num_sect > 0)
+				dd_count =
+				    (in_num_sect >
+				     out_num_sect) ? out_num_sect : in_num_sect;
+			else
+				dd_count = in_num_sect;
+		} else
+			dd_count = out_num_sect;
+	}
+	if (dd_count < 0) {
+		fprintf(stderr, "Couldn't calculate count, please give one\n");
+		return 1;
+	}
+
+	if (dio || do_odir || (FT_RAW == in_type) || (FT_RAW == out_type)) {
+		size_t psz = getpagesize();
+		wrkBuff = malloc(bs * bpt + psz);
+		if (0 == wrkBuff) {
+			fprintf(stderr, "Not enough user memory for raw\n");
+			return 1;
+		}
+		wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
+					   (~(psz - 1)));
+	} else {
+		wrkBuff = malloc(bs * bpt);
+		if (0 == wrkBuff) {
+			fprintf(stderr, "Not enough user memory\n");
+			return 1;
+		}
+		wrkPos = wrkBuff;
+	}
+
+	blocks_per = bpt;
+#ifdef SG_DEBUG
+	fprintf(stderr, "Start of loop, count=%d, blocks_per=%d\n",
+		dd_count, blocks_per);
+#endif
+	if (do_time) {
+		start_tm.tv_sec = 0;
+		start_tm.tv_usec = 0;
+		gettimeofday(&start_tm, NULL);
+	}
+	req_count = dd_count;
+
+	while (dd_count > 0) {
+		blocks = (dd_count > blocks_per) ? blocks_per : dd_count;
+		if (FT_SG & in_type) {
+			int fua = fua_mode & 2;
+
+			dio_tmp = dio;
+			res =
+			    sg_read(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
+				    fua, &dio_tmp);
+			if (1 == res) {	/* ENOMEM, find what's available+try that */
+				if (ioctl(infd, SG_GET_RESERVED_SIZE, &buf_sz) <
+				    0) {
+					perror("RESERVED_SIZE ioctls failed");
+					break;
+				}
+				blocks_per = (buf_sz + bs - 1) / bs;
+				blocks = blocks_per;
+				fprintf(stderr,
+					"Reducing read to %d blocks per loop\n",
+					blocks_per);
+				res =
+				    sg_read(infd, wrkPos, blocks, skip, bs,
+					    scsi_cdbsz, fua, &dio_tmp);
+			} else if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed, continuing (r)\n");
+				res =
+				    sg_read(infd, wrkPos, blocks, skip, bs,
+					    scsi_cdbsz, fua, &dio_tmp);
+			}
+			if (0 != res) {
+				fprintf(stderr, "sg_read failed, skip=%d\n",
+					skip);
+				break;
+			} else {
+				in_full += blocks;
+				if (dio && (0 == dio_tmp))
+					dio_incomplete++;
+			}
+		} else {
+			while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
+			       (EINTR == errno)) ;
+			if (res < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "reading, skip=%d ", skip);
+				perror(ebuff);
+				break;
+			} else if (res < blocks * bs) {
+				dd_count = 0;
+				blocks = res / bs;
+				if ((res % bs) > 0) {
+					blocks++;
+					in_partial++;
+				}
+			}
+			in_full += blocks;
+		}
+
+		if (FT_SG & out_type) {
+			int fua = fua_mode & 1;
+
+			dio_tmp = dio;
+			res =
+			    sg_write(outfd, wrkPos, blocks, seek, bs,
+				     scsi_cdbsz, fua, &dio_tmp);
+			if (1 == res) {	/* ENOMEM, find what's available+try that */
+				if (ioctl(outfd, SG_GET_RESERVED_SIZE, &buf_sz)
+				    < 0) {
+					perror("RESERVED_SIZE ioctls failed");
+					break;
+				}
+				blocks_per = (buf_sz + bs - 1) / bs;
+				blocks = blocks_per;
+				fprintf(stderr,
+					"Reducing write to %d blocks per loop\n",
+					blocks);
+				res =
+				    sg_write(outfd, wrkPos, blocks, seek, bs,
+					     scsi_cdbsz, fua, &dio_tmp);
+			} else if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed, continuing (w)\n");
+				res =
+				    sg_write(outfd, wrkPos, blocks, seek, bs,
+					     scsi_cdbsz, fua, &dio_tmp);
+			} else if (0 != res) {
+				fprintf(stderr, "sg_write failed, seek=%d\n",
+					seek);
+				break;
+			} else {
+				out_full += blocks;
+				if (dio && (0 == dio_tmp))
+					dio_incomplete++;
+			}
+		} else if (FT_DEV_NULL & out_type)
+			out_full += blocks;	/* act as if written out without error */
+		else {
+			while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
+			       && (EINTR == errno)) ;
+			if (res < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "writing, seek=%d ", seek);
+				perror(ebuff);
+				break;
+			} else if (res < blocks * bs) {
+				fprintf(stderr,
+					"output file probably full, seek=%d ",
+					seek);
+				blocks = res / bs;
+				out_full += blocks;
+				if ((res % bs) > 0)
+					out_partial++;
+				break;
+			} else
+				out_full += blocks;
+		}
+		if (dd_count > 0)
+			dd_count -= blocks;
+		skip += blocks;
+		seek += blocks;
+	}
+	if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
+		struct timeval res_tm;
+		double a, b;
+
+		gettimeofday(&end_tm, NULL);
+		res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
+		res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
+		if (res_tm.tv_usec < 0) {
+			--res_tm.tv_sec;
+			res_tm.tv_usec += 1000000;
+		}
+		a = res_tm.tv_sec;
+		a += (0.000001 * res_tm.tv_usec);
+		b = (double)bs *(req_count - dd_count);
+		printf("time to transfer data was %d.%06d secs",
+		       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
+		if ((a > 0.00001) && (b > 511))
+			printf(", %.2f MB/sec\n", b / (a * 1000000.0));
+		else
+			printf("\n");
+	}
+	if (do_sync) {
+		if (FT_SG & out_type) {
+			fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
+			res = sync_cache(outfd);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res = sync_cache(outfd);
+			}
+			if (0 != res)
+				fprintf(stderr,
+					"Unable to synchronize cache\n");
+		}
+	}
+	free(wrkBuff);
+	if (STDIN_FILENO != infd)
+		close(infd);
+	if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type))
+		close(outfd);
+	res = 0;
+	if (0 != dd_count) {
+		fprintf(stderr, "Some error occurred,");
+		res = 2;
+	}
+	print_stats();
+	if (dio_incomplete) {
+		int fd;
+		char c;
+
+		fprintf(stderr,
+			">> Direct IO requested but incomplete %d times\n",
+			dio_incomplete);
+		if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
+			if (1 == read(fd, &c, 1)) {
+				if ('0' == c)
+					fprintf(stderr,
+						">>> %s set to '0' but should be set "
+						"to '1' for direct IO\n",
+						proc_allow_dio);
+			}
+			close(fd);
+		}
+	}
+	if (sum_of_resids)
+		fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
+			sum_of_resids);
+	return res;
+}
+
 /* Returns 0 when successful, else -1 */
 static int do_scsi_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
-		  void * resp, int mx_resp_len, int noisy)
+		       void *resp, int mx_resp_len, int noisy)
 {
-    int res;
-    unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char inqCmdBlk[INQUIRY_CMDLEN] =
+	    { INQUIRY_CMD, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    if (cmddt)
-    	inqCmdBlk[1] |= 2;
-    if (evpd)
-    	inqCmdBlk[1] |= 1;
-    inqCmdBlk[2] = (unsigned char)pg_op;
-    inqCmdBlk[4] = (unsigned char)mx_resp_len;
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(inqCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = inqCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
+	if (cmddt)
+		inqCmdBlk[1] |= 2;
+	if (evpd)
+		inqCmdBlk[1] |= 1;
+	inqCmdBlk[2] = (unsigned char)pg_op;
+	inqCmdBlk[4] = (unsigned char)mx_resp_len;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(inqCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = inqCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (inquiry) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Inquiry error, CmdDt=%d, "
-	    	     "EVPD=%d, page_opcode=%x ", cmddt, evpd, pg_op);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (inquiry) error");
+		return -1;
 	}
-	return -1;
-    }
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ, "Inquiry error, CmdDt=%d, "
+				 "EVPD=%d, page_opcode=%x ", cmddt, evpd,
+				 pg_op);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
-int do_scsi_inquiry(char * device, int hex_flag)
+
+int do_scsi_inquiry(char *device, int hex_flag)
 {
-    int sg_fd, k, j, num, len, act_len;
-    int support_num;
-    char * file_name = 0;
-    char buff[MX_ALLOC_LEN + 1];
-    unsigned char rsp_buff[MX_ALLOC_LEN + 1];
-    unsigned int num_opcode = 0;
-    int do_evpd = 0;
-    int do_cmddt = 0;
-    int do_cmdlst = 0;
-    int do_hex = 0;
-    int do_raw = 0;
-    int do_pci = 0;
-    int do_36 = 0;
-    int oflags = O_RDONLY | O_NONBLOCK;
-    int ansi_version = 0;
-    int ret = 0;
+	int sg_fd, k, j, num, len, act_len;
+	int support_num;
+	char *file_name = 0;
+	char buff[MX_ALLOC_LEN + 1];
+	unsigned char rsp_buff[MX_ALLOC_LEN + 1];
+	unsigned int num_opcode = 0;
+	int do_evpd = 0;
+	int do_cmddt = 0;
+	int do_cmdlst = 0;
+	int do_hex = 0;
+	int do_raw = 0;
+	int do_pci = 0;
+	int do_36 = 0;
+	int oflags = O_RDONLY | O_NONBLOCK;
+	int ansi_version = 0;
+	int ret = 0;
 
-    file_name = device;
+	file_name = device;
 
-    if (hex_flag) {
-        do_hex = TRUE;
-        print_msg(TEST_BREAK, __FUNCTION__);
-    }
-    else {
-        do_pci = TRUE;
-    }
-
-    if (do_pci)
-    	oflags = O_RDWR | O_NONBLOCK;
-    if ((sg_fd = open(file_name, oflags)) < 0) {
-        snprintf(ebuff, EBUFF_SZ, "sg_inq: error opening file: %s", file_name);
-        perror(ebuff);
-        return 1;
-    }
-    /* Just to be safe, check we have a new sg device by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-        fprintf(stderr,
-		"sg_inq: %s doesn't seem to be a version 3 sg device\n",
-		file_name);
-        close(sg_fd);
-        return 1;
-    }
-    memset(rsp_buff, 0, MX_ALLOC_LEN + 1);
-
-    if (! (do_cmddt || do_evpd)) {
-        if (!do_raw)
-	    printf("standard INQUIRY:\n");
-	if (num_opcode > 0)
-	    printf(" <<given opcode or page_code is being ignored>>\n");
-
-        if (0 == do_scsi_inq(sg_fd, 0, 0, 0, rsp_buff, 36, 1)) {
-	    len = rsp_buff[4] + 5;
-	    ansi_version = rsp_buff[2] & 0x7;
-	    if ((len > 36) && (len < 256) && (! do_36)) {
-		if (do_scsi_inq(sg_fd, 0, 0, 0, rsp_buff, len, 1)) {
-	    	    fprintf(stderr, "second INQUIRY (%d byte) failed\n", len);
-	    	    return 1;
-		}
-		if (len != (rsp_buff[4] + 5)) {
-	    	    fprintf(stderr,
-			    "strange, twin INQUIRYs yield different "
-			    "'additional length'\n");
-		    ret = 2;
-		}
-	    }
-	    if (do_36) {
-	    	act_len = len;
-	    	len = 36;
-	    }
-	    else
-	    	act_len = len;
-	    if (do_hex)
-		dStrHex((const char *)rsp_buff, len,0);
-	    else {
-	        printf("  PQual=%d, Device type=%d, RMB=%d, ANSI version=%d, ",
-	               (rsp_buff[0] & 0xe0) >> 5, rsp_buff[0] & 0x1f,
-	               !!(rsp_buff[1] & 0x80), ansi_version);
-	        printf("[full version=0x%02x]\n", (unsigned int)rsp_buff[2]);
-	        printf("  AERC=%d, TrmTsk=%d, NormACA=%d, HiSUP=%d, "
-		       "Resp data format=%d, SCCS=%d\n",
-	               !!(rsp_buff[3] & 0x80), !!(rsp_buff[3] & 0x40),
-	               !!(rsp_buff[3] & 0x20), !!(rsp_buff[3] & 0x10),
-		       rsp_buff[3] & 0x0f, !!(rsp_buff[5] & 0x80));
-	        printf("  BQue=%d, EncServ=%d, MultiP=%d, MChngr=%d, "
-		       "ACKREQQ=%d, ",
-	               !!(rsp_buff[6] & 0x80), !!(rsp_buff[6] & 0x40),
-		       !!(rsp_buff[6] & 0x10), !!(rsp_buff[6] & 0x08),
-		       !!(rsp_buff[6] & 0x04));
-	        printf("Addr16=%d\n  RelAdr=%d, ",
-	               !!(rsp_buff[6] & 0x01),
-	               !!(rsp_buff[7] & 0x80));
-	        printf("WBus16=%d, Sync=%d, Linked=%d, TranDis=%d, ",
-	               !!(rsp_buff[7] & 0x20), !!(rsp_buff[7] & 0x10),
-	               !!(rsp_buff[7] & 0x08), !!(rsp_buff[7] & 0x04));
-	        printf("CmdQue=%d\n", !!(rsp_buff[7] & 0x02));
-		if (len > 56)
-		    printf("  Clocking=0x%x, QAS=%d, IUS=%d\n",
-		           (rsp_buff[56] & 0x0c) >> 2, !!(rsp_buff[56] & 0x2),
-			   !!(rsp_buff[56] & 0x1));
-		if (act_len == len)
-		    printf("    length=%d (0x%x)", len, len);
-		else
-		    printf("    length=%d (0x%x), but only read 36 bytes",
-		    	   len, len);
-		if ((ansi_version >= 2) && (len < 36))
-		    printf("  [for SCSI>=2, len>=36 is expected]\n");
-		else
-		    printf("\n");
-
-		if (len <= 8)
-	            printf(" Inquiry response length=%d\n, no vendor, "
-		    	   "product or revision data\n", len);
-		else {
-		    if (len < 36)
-		    	rsp_buff[len] = '\0';
-	            memcpy(buff, &rsp_buff[8], 8);
-	            buff[8] = '\0';
-	            printf(" Vendor identification: %s\n", buff);
-		    if (len <= 16)
-			printf(" Product identification: <none>\n");
-		    else {
-			memcpy(buff, &rsp_buff[16], 16);
-			buff[16] = '\0';
-			printf(" Product identification: %s\n", buff);
-		    }
-		    if (len <= 32)
-			printf(" Product revision level: <none>\n");
-		    else {
-			memcpy(buff, &rsp_buff[32], 4);
-			buff[4] = '\0';
-			printf(" Product revision level: %s\n", buff);
-		    }
-		}
-            }
-	    if (!do_raw &&
-		(0 == do_scsi_inq(sg_fd, 0, 1, 0x80, rsp_buff, MX_ALLOC_LEN, 0))) {
-	        len = rsp_buff[3];
-		if (len > 0) {
-		    memcpy(buff, rsp_buff + 4, len);
-		    buff[len] = '\0';
-		    printf(" Product serial number: %s\n", buff);
-		}
-	    }
+	if (hex_flag) {
+		do_hex = TRUE;
+		print_msg(TEST_BREAK, __FUNCTION__);
+	} else {
+		do_pci = TRUE;
 	}
-	else {
-	    printf("36 byte INQUIRY failed\n");
-	    return 1;
-	}
-    }
-    else if (do_cmddt) {
-	int reserved_cmddt;
-	char op_name[128];
 
-    	if (do_cmdlst) {
-	    printf("Supported command list:\n");
-	    for (k = 0; k < 256; ++k) {
-		if (0 == do_scsi_inq(sg_fd, 1, 0, k, rsp_buff, MX_ALLOC_LEN, 1)) {
-		    support_num = rsp_buff[1] & 7;
-		    reserved_cmddt = rsp_buff[4];
-		    if ((3 == support_num) || (5 == support_num)) {
-		    	num = rsp_buff[5];
-		    	for (j = 0; j < num; ++j)
-			    printf(" %.2x", (int)rsp_buff[6 + j]);
-			if (5 == support_num)
-			    printf("  [vendor specific manner (5)]");
-			sg_get_command_name((unsigned char)k,
-					    sizeof(op_name) - 1, op_name);
-			op_name[sizeof(op_name) - 1] = '\0';
-			printf("  %s\n", op_name);
-		    }
-		    else if ((4 == support_num) || (6 == support_num))
-		    	printf("  opcode=0x%.2x vendor specific (%d)\n",
-			       k, support_num);
-		    else if ((0 == support_num) && (reserved_cmddt > 0)) {
-		    	printf("  opcode=0x%.2x ignored cmddt bit, "
-			       "given standard INQUIRY response, stop\n", k);
-			break;
-		    }
-		}
-		else {
-		    fprintf(stderr,
-			    "CmdDt INQUIRY on opcode=0x%.2x: failed\n", k);
-		    break;
-		}
-	    }
-	}
-	else {
-	    if (! do_raw) {
-	        printf("CmdDt INQUIRY, opcode=0x%.2x:  [", num_opcode);
-		sg_get_command_name((unsigned char)num_opcode,
-				    sizeof(op_name) - 1, op_name);
-		op_name[sizeof(op_name) - 1] = '\0';
-		printf("%s]\n", op_name);
-	    }
-	    if (0 == do_scsi_inq(sg_fd, 1, 0, num_opcode, rsp_buff,
-	    		    MX_ALLOC_LEN, 1)) {
-		len = rsp_buff[5] + 6;
-		reserved_cmddt = rsp_buff[4];
-		if (do_hex)
-		    dStrHex((const char *)rsp_buff, len,0);
-		else {
-		    const char * desc_p;
-		    int prnt_cmd = 0;
-
-		    support_num = rsp_buff[1] & 7;
-		    num = rsp_buff[5];
-		    switch (support_num) {
-		    case 0:
-			if (0 == reserved_cmddt)
-			    desc_p = "no data available";
-			else
-			    desc_p = "ignored cmddt bit, standard INQUIRY "
-				     "response";
-			break;
-		    case 1: desc_p = "not supported"; break;
-		    case 2: desc_p = "reserved (2)"; break;
-		    case 3: desc_p = "supported as per standard";
-			    prnt_cmd = 1;
-			    break;
-		    case 4: desc_p = "vendor specific (4)"; break;
-		    case 5: desc_p = "supported in vendor specific way";
-			    prnt_cmd = 1;
-		    	    break;
-		    case 6: desc_p = "vendor specific (6)"; break;
-		    case 7: desc_p = "reserved (7)"; break;
-		    default: desc_p = "impossible value > 7"; break;
-		    }
-		    if (prnt_cmd) {
-		        printf("  Support field: %s [", desc_p);
-		        for (j = 0; j < num; ++j)
-			    printf(" %.2x", (int)rsp_buff[6 + j]);
-			printf(" ]\n");
-		    } else
-		        printf("  Support field: %s\n", desc_p);
-		}
-	    }
-	    else {
-		fprintf(stderr,
-			"CmdDt INQUIRY on opcode=0x%.2x: failed\n",
-			num_opcode);
+	if (do_pci)
+		oflags = O_RDWR | O_NONBLOCK;
+	if ((sg_fd = open(file_name, oflags)) < 0) {
+		snprintf(ebuff, EBUFF_SZ, "sg_inq: error opening file: %s",
+			 file_name);
+		perror(ebuff);
 		return 1;
-	    }
-
 	}
-    }
-    else if (do_evpd) {
-	if (!do_raw)
-	    printf("EVPD INQUIRY, page code=0x%.2x:\n", num_opcode);
-        if (0 == do_scsi_inq(sg_fd, 0, 1, num_opcode, rsp_buff, MX_ALLOC_LEN, 1)) {
-	    len = rsp_buff[3] + 4;
-	    if (num_opcode != rsp_buff[1])
-		printf("non evpd respone; probably a STANDARD INQUIRY "
-		       "response\n");
-	    else {
-		if (! do_hex)
-		    printf(" Only hex output supported\n");
-		dStrHex((const char *)rsp_buff, len,0);
-	    }
+	/* Just to be safe, check we have a new sg device by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		fprintf(stderr,
+			"sg_inq: %s doesn't seem to be a version 3 sg device\n",
+			file_name);
+		close(sg_fd);
+		return 1;
 	}
-	else {
-	    fprintf(stderr,
-		    "EVPD INQUIRY, page code=0x%.2x: failed\n", num_opcode);
-	    return 1;
+	memset(rsp_buff, 0, MX_ALLOC_LEN + 1);
+
+	if (!(do_cmddt || do_evpd)) {
+		if (!do_raw)
+			printf("standard INQUIRY:\n");
+		if (num_opcode > 0)
+			printf
+			    (" <<given opcode or page_code is being ignored>>\n");
+
+		if (0 == do_scsi_inq(sg_fd, 0, 0, 0, rsp_buff, 36, 1)) {
+			len = rsp_buff[4] + 5;
+			ansi_version = rsp_buff[2] & 0x7;
+			if ((len > 36) && (len < 256) && (!do_36)) {
+				if (do_scsi_inq
+				    (sg_fd, 0, 0, 0, rsp_buff, len, 1)) {
+					fprintf(stderr,
+						"second INQUIRY (%d byte) failed\n",
+						len);
+					return 1;
+				}
+				if (len != (rsp_buff[4] + 5)) {
+					fprintf(stderr,
+						"strange, twin INQUIRYs yield different "
+						"'additional length'\n");
+					ret = 2;
+				}
+			}
+			if (do_36) {
+				act_len = len;
+				len = 36;
+			} else
+				act_len = len;
+			if (do_hex)
+				dStrHex((const char *)rsp_buff, len, 0);
+			else {
+				printf
+				    ("  PQual=%d, Device type=%d, RMB=%d, ANSI version=%d, ",
+				     (rsp_buff[0] & 0xe0) >> 5,
+				     rsp_buff[0] & 0x1f,
+				     ! !(rsp_buff[1] & 0x80), ansi_version);
+				printf("[full version=0x%02x]\n",
+				       (unsigned int)rsp_buff[2]);
+				printf
+				    ("  AERC=%d, TrmTsk=%d, NormACA=%d, HiSUP=%d, "
+				     "Resp data format=%d, SCCS=%d\n",
+				     ! !(rsp_buff[3] & 0x80),
+				     ! !(rsp_buff[3] & 0x40),
+				     ! !(rsp_buff[3] & 0x20),
+				     ! !(rsp_buff[3] & 0x10),
+				     rsp_buff[3] & 0x0f,
+				     ! !(rsp_buff[5] & 0x80));
+				printf
+				    ("  BQue=%d, EncServ=%d, MultiP=%d, MChngr=%d, "
+				     "ACKREQQ=%d, ", ! !(rsp_buff[6] & 0x80),
+				     ! !(rsp_buff[6] & 0x40),
+				     ! !(rsp_buff[6] & 0x10),
+				     ! !(rsp_buff[6] & 0x08),
+				     ! !(rsp_buff[6] & 0x04));
+				printf("Addr16=%d\n  RelAdr=%d, ",
+				       ! !(rsp_buff[6] & 0x01),
+				       ! !(rsp_buff[7] & 0x80));
+				printf
+				    ("WBus16=%d, Sync=%d, Linked=%d, TranDis=%d, ",
+				     ! !(rsp_buff[7] & 0x20),
+				     ! !(rsp_buff[7] & 0x10),
+				     ! !(rsp_buff[7] & 0x08),
+				     ! !(rsp_buff[7] & 0x04));
+				printf("CmdQue=%d\n", ! !(rsp_buff[7] & 0x02));
+				if (len > 56)
+					printf
+					    ("  Clocking=0x%x, QAS=%d, IUS=%d\n",
+					     (rsp_buff[56] & 0x0c) >> 2,
+					     ! !(rsp_buff[56] & 0x2),
+					     ! !(rsp_buff[56] & 0x1));
+				if (act_len == len)
+					printf("    length=%d (0x%x)", len,
+					       len);
+				else
+					printf
+					    ("    length=%d (0x%x), but only read 36 bytes",
+					     len, len);
+				if ((ansi_version >= 2) && (len < 36))
+					printf
+					    ("  [for SCSI>=2, len>=36 is expected]\n");
+				else
+					printf("\n");
+
+				if (len <= 8)
+					printf
+					    (" Inquiry response length=%d\n, no vendor, "
+					     "product or revision data\n", len);
+				else {
+					if (len < 36)
+						rsp_buff[len] = '\0';
+					memcpy(buff, &rsp_buff[8], 8);
+					buff[8] = '\0';
+					printf(" Vendor identification: %s\n",
+					       buff);
+					if (len <= 16)
+						printf
+						    (" Product identification: <none>\n");
+					else {
+						memcpy(buff, &rsp_buff[16], 16);
+						buff[16] = '\0';
+						printf
+						    (" Product identification: %s\n",
+						     buff);
+					}
+					if (len <= 32)
+						printf
+						    (" Product revision level: <none>\n");
+					else {
+						memcpy(buff, &rsp_buff[32], 4);
+						buff[4] = '\0';
+						printf
+						    (" Product revision level: %s\n",
+						     buff);
+					}
+				}
+			}
+			if (!do_raw &&
+			    (0 ==
+			     do_scsi_inq(sg_fd, 0, 1, 0x80, rsp_buff,
+					 MX_ALLOC_LEN, 0))) {
+				len = rsp_buff[3];
+				if (len > 0) {
+					memcpy(buff, rsp_buff + 4, len);
+					buff[len] = '\0';
+					printf(" Product serial number: %s\n",
+					       buff);
+				}
+			}
+		} else {
+			printf("36 byte INQUIRY failed\n");
+			return 1;
+		}
+	} else if (do_cmddt) {
+		int reserved_cmddt;
+		char op_name[128];
+
+		if (do_cmdlst) {
+			printf("Supported command list:\n");
+			for (k = 0; k < 256; ++k) {
+				if (0 ==
+				    do_scsi_inq(sg_fd, 1, 0, k, rsp_buff,
+						MX_ALLOC_LEN, 1)) {
+					support_num = rsp_buff[1] & 7;
+					reserved_cmddt = rsp_buff[4];
+					if ((3 == support_num)
+					    || (5 == support_num)) {
+						num = rsp_buff[5];
+						for (j = 0; j < num; ++j)
+							printf(" %.2x",
+							       (int)rsp_buff[6 +
+									     j]);
+						if (5 == support_num)
+							printf
+							    ("  [vendor specific manner (5)]");
+						sg_get_command_name((unsigned
+								     char)k,
+								    sizeof
+								    (op_name) -
+								    1, op_name);
+						op_name[sizeof(op_name) - 1] =
+						    '\0';
+						printf("  %s\n", op_name);
+					} else if ((4 == support_num)
+						   || (6 == support_num))
+						printf
+						    ("  opcode=0x%.2x vendor specific (%d)\n",
+						     k, support_num);
+					else if ((0 == support_num)
+						 && (reserved_cmddt > 0)) {
+						printf
+						    ("  opcode=0x%.2x ignored cmddt bit, "
+						     "given standard INQUIRY response, stop\n",
+						     k);
+						break;
+					}
+				} else {
+					fprintf(stderr,
+						"CmdDt INQUIRY on opcode=0x%.2x: failed\n",
+						k);
+					break;
+				}
+			}
+		} else {
+			if (!do_raw) {
+				printf("CmdDt INQUIRY, opcode=0x%.2x:  [",
+				       num_opcode);
+				sg_get_command_name((unsigned char)num_opcode,
+						    sizeof(op_name) - 1,
+						    op_name);
+				op_name[sizeof(op_name) - 1] = '\0';
+				printf("%s]\n", op_name);
+			}
+			if (0 == do_scsi_inq(sg_fd, 1, 0, num_opcode, rsp_buff,
+					     MX_ALLOC_LEN, 1)) {
+				len = rsp_buff[5] + 6;
+				reserved_cmddt = rsp_buff[4];
+				if (do_hex)
+					dStrHex((const char *)rsp_buff, len, 0);
+				else {
+					const char *desc_p;
+					int prnt_cmd = 0;
+
+					support_num = rsp_buff[1] & 7;
+					num = rsp_buff[5];
+					switch (support_num) {
+					case 0:
+						if (0 == reserved_cmddt)
+							desc_p =
+							    "no data available";
+						else
+							desc_p =
+							    "ignored cmddt bit, standard INQUIRY "
+							    "response";
+						break;
+					case 1:
+						desc_p = "not supported";
+						break;
+					case 2:
+						desc_p = "reserved (2)";
+						break;
+					case 3:
+						desc_p =
+						    "supported as per standard";
+						prnt_cmd = 1;
+						break;
+					case 4:
+						desc_p = "vendor specific (4)";
+						break;
+					case 5:
+						desc_p =
+						    "supported in vendor specific way";
+						prnt_cmd = 1;
+						break;
+					case 6:
+						desc_p = "vendor specific (6)";
+						break;
+					case 7:
+						desc_p = "reserved (7)";
+						break;
+					default:
+						desc_p = "impossible value > 7";
+						break;
+					}
+					if (prnt_cmd) {
+						printf("  Support field: %s [",
+						       desc_p);
+						for (j = 0; j < num; ++j)
+							printf(" %.2x",
+							       (int)rsp_buff[6 +
+									     j]);
+						printf(" ]\n");
+					} else
+						printf("  Support field: %s\n",
+						       desc_p);
+				}
+			} else {
+				fprintf(stderr,
+					"CmdDt INQUIRY on opcode=0x%.2x: failed\n",
+					num_opcode);
+				return 1;
+			}
+
+		}
+	} else if (do_evpd) {
+		if (!do_raw)
+			printf("EVPD INQUIRY, page code=0x%.2x:\n", num_opcode);
+		if (0 ==
+		    do_scsi_inq(sg_fd, 0, 1, num_opcode, rsp_buff, MX_ALLOC_LEN,
+				1)) {
+			len = rsp_buff[3] + 4;
+			if (num_opcode != rsp_buff[1])
+				printf
+				    ("non evpd respone; probably a STANDARD INQUIRY "
+				     "response\n");
+			else {
+				if (!do_hex)
+					printf(" Only hex output supported\n");
+				dStrHex((const char *)rsp_buff, len, 0);
+			}
+		} else {
+			fprintf(stderr,
+				"EVPD INQUIRY, page code=0x%.2x: failed\n",
+				num_opcode);
+			return 1;
+		}
 	}
-    }
 
-    if (do_pci) {
-        unsigned char slot_name[16];
+	if (do_pci) {
+		unsigned char slot_name[16];
 
-	printf("\n");
-        memset(slot_name, '\0', sizeof(slot_name));
-        if (ioctl(sg_fd, SCSI_IOCTL_GET_PCI, slot_name) < 0) {
-            if (EINVAL == errno)
-                printf("ioctl(SCSI_IOCTL_GET_PCI) not supported by this "
-                       "kernel\n");
-            else if (ENXIO == errno)
-                printf("associated adapter not a PCI device?\n");
-            else
-                perror("ioctl(SCSI_IOCTL_GET_PCI) failed");
-        }
-        else
-            printf("PCI:slot_name: %s\n", slot_name);
-    }
+		printf("\n");
+		memset(slot_name, '\0', sizeof(slot_name));
+		if (ioctl(sg_fd, SCSI_IOCTL_GET_PCI, slot_name) < 0) {
+			if (EINVAL == errno)
+				printf
+				    ("ioctl(SCSI_IOCTL_GET_PCI) not supported by this "
+				     "kernel\n");
+			else if (ENXIO == errno)
+				printf
+				    ("associated adapter not a PCI device?\n");
+			else
+				perror("ioctl(SCSI_IOCTL_GET_PCI) failed");
+		} else
+			printf("PCI:slot_name: %s\n", slot_name);
+	}
 
-    close(sg_fd);
-    return ret;
+	close(sg_fd);
+	return ret;
 }
+
 int show_scsi_maps()
 {
-    int sg_fd, res, k;
-    int do_numeric = NUMERIC_SCAN_DEF;
-    int do_all_s = 1;
-    int do_sd = 0;
-    int do_st = 0;
-    int do_osst = 0;
-    int do_sr = 0;
-    int do_scd = 0;
-    int do_extra = 1;
-    int do_inquiry = 0;
-    char fname[64];
-    int num_errors = 0;
-    int num_silent = 0;
-    int eacces_err = 0;
-    int last_sg_ind = -1;
-    struct stat stat_buf;
+	int sg_fd, res, k;
+	int do_numeric = NUMERIC_SCAN_DEF;
+	int do_all_s = 1;
+	int do_sd = 0;
+	int do_st = 0;
+	int do_osst = 0;
+	int do_sr = 0;
+	int do_scd = 0;
+	int do_extra = 1;
+	int do_inquiry = 0;
+	char fname[64];
+	int num_errors = 0;
+	int num_silent = 0;
+	int eacces_err = 0;
+	int last_sg_ind = -1;
+	struct stat stat_buf;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    if (stat(devfs_id, &stat_buf) == 0)
-        printf("# Note: the devfs pseudo file system is present\n");
+	if (stat(devfs_id, &stat_buf) == 0)
+		printf("# Note: the devfs pseudo file system is present\n");
 
-    for (k = 0, res = 0; (k < MAX_SG_DEVS)  && (num_errors < MAX_ERRORS);
-         ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, "Error closing %s ", fname);
-            perror("sg_map: close error");
-            return 1;
-        }
-        make_dev_name(fname, "/dev/sg", k, do_numeric);
+	for (k = 0, res = 0; (k < MAX_SG_DEVS) && (num_errors < MAX_ERRORS);
+	     ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, "Error closing %s ", fname);
+			perror("sg_map: close error");
+			return 1;
+		}
+		make_dev_name(fname, "/dev/sg", k, do_numeric);
 
-        sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
-        if (sg_fd < 0) {
-            if (EBUSY == errno) {
-                map_arr[k].active = -2;
-                continue;
-            }
-            else if ((ENODEV == errno) || (ENOENT == errno) ||
-                     (ENXIO == errno)) {
-                ++num_errors;
-                ++num_silent;
-                map_arr[k].active = -1;
-                continue;
-            }
-            else {
-                if (EACCES == errno)
-                    eacces_err = 1;
-                snprintf(ebuff, EBUFF_SZ, "Error opening %s ", fname);
-                perror(ebuff);
-                ++num_errors;
-                continue;
-            }
-        }
-        res = ioctl(sg_fd, SG_GET_SCSI_ID, &map_arr[k].sg_dat);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     "device %s failed on sg ioctl, skip", fname);
-            perror(ebuff);
-            ++num_errors;
-            continue;
-        }
-	if (do_inquiry) {
-	    char buff[36];
+		sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
+		if (sg_fd < 0) {
+			if (EBUSY == errno) {
+				map_arr[k].active = -2;
+				continue;
+			} else if ((ENODEV == errno) || (ENOENT == errno) ||
+				   (ENXIO == errno)) {
+				++num_errors;
+				++num_silent;
+				map_arr[k].active = -1;
+				continue;
+			} else {
+				if (EACCES == errno)
+					eacces_err = 1;
+				snprintf(ebuff, EBUFF_SZ, "Error opening %s ",
+					 fname);
+				perror(ebuff);
+				++num_errors;
+				continue;
+			}
+		}
+		res = ioctl(sg_fd, SG_GET_SCSI_ID, &map_arr[k].sg_dat);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 "device %s failed on sg ioctl, skip", fname);
+			perror(ebuff);
+			++num_errors;
+			continue;
+		}
+		if (do_inquiry) {
+			char buff[36];
 
-	    if (0 == do_scsi_inq(sg_fd, 0, 0, 0, buff, sizeof(buff), 1)) {
-		memcpy(map_arr[k].vendor, &buff[8], 8);
-		memcpy(map_arr[k].product, &buff[16], 16);
-		memcpy(map_arr[k].revision, &buff[32], 4);
-	    }
+			if (0 ==
+			    do_scsi_inq(sg_fd, 0, 0, 0, buff, sizeof(buff),
+					1)) {
+				memcpy(map_arr[k].vendor, &buff[8], 8);
+				memcpy(map_arr[k].product, &buff[16], 16);
+				memcpy(map_arr[k].revision, &buff[32], 4);
+			}
+		}
+		map_arr[k].active = 1;
+		map_arr[k].oth_dev_num = -1;
+		last_sg_ind = k;
 	}
-        map_arr[k].active = 1;
-        map_arr[k].oth_dev_num = -1;
-        last_sg_ind = k;
-    }
-    if ((num_errors >= MAX_ERRORS) && (num_silent < num_errors)) {
-        printf("Stopping because there are too many error\n");
-        if (eacces_err)
-            printf("    root access may be required\n");
-        return 1;
-    }
-    if (last_sg_ind < 0) {
-        printf("Stopping because no sg devices found\n");
-    }
+	if ((num_errors >= MAX_ERRORS) && (num_silent < num_errors)) {
+		printf("Stopping because there are too many error\n");
+		if (eacces_err)
+			printf("    root access may be required\n");
+		return 1;
+	}
+	if (last_sg_ind < 0) {
+		printf("Stopping because no sg devices found\n");
+	}
 
-    if (do_all_s || do_sd)
-        scan_dev_type("/dev/sd", MAX_SD_DEVS, 0, LIN_DEV_TYPE_SD, last_sg_ind);
-    if (do_all_s || do_sr)
-        scan_dev_type("/dev/sr", MAX_SR_DEVS, 1, LIN_DEV_TYPE_SR, last_sg_ind);
-    if (do_all_s || do_scd)
-        scan_dev_type("/dev/scd", MAX_SR_DEVS, 1, LIN_DEV_TYPE_SCD,
-                      last_sg_ind);
-    if (do_all_s || do_st)
-        scan_dev_type("/dev/st", MAX_ST_DEVS, 1, LIN_DEV_TYPE_ST, last_sg_ind);
-    if (do_all_s || do_osst)
-        scan_dev_type("/dev/osst", MAX_OSST_DEVS, 1, LIN_DEV_TYPE_OSST, last_sg_ind);
+	if (do_all_s || do_sd)
+		scan_dev_type("/dev/sd", MAX_SD_DEVS, 0, LIN_DEV_TYPE_SD,
+			      last_sg_ind);
+	if (do_all_s || do_sr)
+		scan_dev_type("/dev/sr", MAX_SR_DEVS, 1, LIN_DEV_TYPE_SR,
+			      last_sg_ind);
+	if (do_all_s || do_scd)
+		scan_dev_type("/dev/scd", MAX_SR_DEVS, 1, LIN_DEV_TYPE_SCD,
+			      last_sg_ind);
+	if (do_all_s || do_st)
+		scan_dev_type("/dev/st", MAX_ST_DEVS, 1, LIN_DEV_TYPE_ST,
+			      last_sg_ind);
+	if (do_all_s || do_osst)
+		scan_dev_type("/dev/osst", MAX_OSST_DEVS, 1, LIN_DEV_TYPE_OSST,
+			      last_sg_ind);
 
-    for (k = 0; k <= last_sg_ind; ++k) {
-        make_dev_name(fname, "/dev/sg",  k, do_numeric);
-        printf("%s", fname);
-        switch (map_arr[k].active)
-        {
-        case -2:
-            printf(do_extra ? "  -2 -2 -2 -2  -2" : "  busy");
-            break;
-        case -1:
-            printf(do_extra ? "  -1 -1 -1 -1  -1" : "  not present");
-            break;
-        case 0:
-            printf(do_extra ? "  -3 -3 -3 -3  -3" : "  some error\n");
-            break;
-        case 1:
-            if (do_extra)
-                printf("  %d %d %d %d  %d", map_arr[k].sg_dat.host_no,
-                       map_arr[k].sg_dat.channel, map_arr[k].sg_dat.scsi_id,
-                       map_arr[k].sg_dat.lun, map_arr[k].sg_dat.scsi_type);
-            switch (map_arr[k].lin_dev_type)
-            {
-            case LIN_DEV_TYPE_SD:
-                make_dev_name(fname, "/dev/sd", map_arr[k].oth_dev_num, 0);
-                printf("  %s", fname);
-                break;
-            case LIN_DEV_TYPE_ST:
-                make_dev_name(fname,  "/dev/st", map_arr[k].oth_dev_num, 1);
-                printf("  %s", fname);
-                break;
-            case LIN_DEV_TYPE_OSST:
-                make_dev_name(fname, "/dev/osst", map_arr[k].oth_dev_num, 1);
-                printf("  %s", fname);
-                break;
-            case LIN_DEV_TYPE_SR:
-                make_dev_name(fname, "/dev/sr",  map_arr[k].oth_dev_num, 1);
-                printf("  %s", fname);
-                break;
-            case LIN_DEV_TYPE_SCD:
-                make_dev_name(fname, "/dev/scd", map_arr[k].oth_dev_num, 1);
-                printf("  %s", fname);
-                break;
-            default:
-                break;
-            }
-            if (do_inquiry)
-	    	printf("  %.8s  %.16s  %.4s", map_arr[k].vendor,
-		       map_arr[k].product, map_arr[k].revision);
-            break;
-        default:
-            printf("  bad logic\n");
-            break;
-        }
-        printf("\n");
-    }
-  return 0;
+	for (k = 0; k <= last_sg_ind; ++k) {
+		make_dev_name(fname, "/dev/sg", k, do_numeric);
+		printf("%s", fname);
+		switch (map_arr[k].active) {
+		case -2:
+			printf(do_extra ? "  -2 -2 -2 -2  -2" : "  busy");
+			break;
+		case -1:
+			printf(do_extra ? "  -1 -1 -1 -1  -1" :
+			       "  not present");
+			break;
+		case 0:
+			printf(do_extra ? "  -3 -3 -3 -3  -3" :
+			       "  some error\n");
+			break;
+		case 1:
+			if (do_extra)
+				printf("  %d %d %d %d  %d",
+				       map_arr[k].sg_dat.host_no,
+				       map_arr[k].sg_dat.channel,
+				       map_arr[k].sg_dat.scsi_id,
+				       map_arr[k].sg_dat.lun,
+				       map_arr[k].sg_dat.scsi_type);
+			switch (map_arr[k].lin_dev_type) {
+			case LIN_DEV_TYPE_SD:
+				make_dev_name(fname, "/dev/sd",
+					      map_arr[k].oth_dev_num, 0);
+				printf("  %s", fname);
+				break;
+			case LIN_DEV_TYPE_ST:
+				make_dev_name(fname, "/dev/st",
+					      map_arr[k].oth_dev_num, 1);
+				printf("  %s", fname);
+				break;
+			case LIN_DEV_TYPE_OSST:
+				make_dev_name(fname, "/dev/osst",
+					      map_arr[k].oth_dev_num, 1);
+				printf("  %s", fname);
+				break;
+			case LIN_DEV_TYPE_SR:
+				make_dev_name(fname, "/dev/sr",
+					      map_arr[k].oth_dev_num, 1);
+				printf("  %s", fname);
+				break;
+			case LIN_DEV_TYPE_SCD:
+				make_dev_name(fname, "/dev/scd",
+					      map_arr[k].oth_dev_num, 1);
+				printf("  %s", fname);
+				break;
+			default:
+				break;
+			}
+			if (do_inquiry)
+				printf("  %.8s  %.16s  %.4s", map_arr[k].vendor,
+				       map_arr[k].product, map_arr[k].revision);
+			break;
+		default:
+			printf("  bad logic\n");
+			break;
+		}
+		printf("\n");
+	}
+	return 0;
 }
 
 static int find_dev_in_sg_arr(My_scsi_idlun * my_idlun, int host_no,
-                              int last_sg_ind)
+			      int last_sg_ind)
 {
-    int k;
-    struct sg_scsi_id * sidp;
+	int k;
+	struct sg_scsi_id *sidp;
 
-    for (k = 0; k <= last_sg_ind; ++k) {
-        sidp = &(map_arr[k].sg_dat);
-        if ((host_no == sidp->host_no) &&
-            ((my_idlun->dev_id & 0xff) == sidp->scsi_id) &&
-            (((my_idlun->dev_id >> 8) & 0xff) == sidp->lun) &&
-            (((my_idlun->dev_id >> 16) & 0xff) == sidp->channel))
-            return k;
-    }
-    return -1;
+	for (k = 0; k <= last_sg_ind; ++k) {
+		sidp = &(map_arr[k].sg_dat);
+		if ((host_no == sidp->host_no) &&
+		    ((my_idlun->dev_id & 0xff) == sidp->scsi_id) &&
+		    (((my_idlun->dev_id >> 8) & 0xff) == sidp->lun) &&
+		    (((my_idlun->dev_id >> 16) & 0xff) == sidp->channel))
+			return k;
+	}
+	return -1;
 }
 
-static void scan_dev_type(const char * leadin, int max_dev, int do_numeric,
-                          int lin_dev_type, int last_sg_ind)
+static void scan_dev_type(const char *leadin, int max_dev, int do_numeric,
+			  int lin_dev_type, int last_sg_ind)
 {
-    int k, res, ind, sg_fd = 0;
-    int num_errors = 0;
-    int num_silent = 0;
-    int host_no = -1;
-    int nonMappedDevicesPresent = FALSE;
-    My_scsi_idlun my_idlun;
-    char fname[64];
+	int k, res, ind, sg_fd = 0;
+	int num_errors = 0;
+	int num_silent = 0;
+	int host_no = -1;
+	int nonMappedDevicesPresent = FALSE;
+	My_scsi_idlun my_idlun;
+	char fname[64];
 
-    for (k = 0, res = 0; (k < max_dev)  && (num_errors < MAX_ERRORS);
-         ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
+	for (k = 0, res = 0; (k < max_dev) && (num_errors < MAX_ERRORS);
+	     ++k, res = (sg_fd >= 0) ? close(sg_fd) : 0) {
 
 /* ignore close() errors */
 #if 0
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ, "Error closing %s ", fname);
-            perror("sg_map: close error");
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ, "Error closing %s ", fname);
+			perror("sg_map: close error");
 #ifndef IGN_CLOSE_ERR
-            return;
+			return;
 #else
-            ++num_errors;
-	    sg_fd = 0;
+			++num_errors;
+			sg_fd = 0;
 #endif
-        }
+		}
 #endif
-        make_dev_name(fname, leadin,  k, do_numeric);
+		make_dev_name(fname, leadin, k, do_numeric);
 #ifdef DEBUG
-        printf ("Trying %s: ", fname);
+		printf("Trying %s: ", fname);
 #endif
 
-        sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
-        if (sg_fd < 0) {
+		sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
+		if (sg_fd < 0) {
 #ifdef DEBUG
-	    printf ("ERROR %i\n", errno);
+			printf("ERROR %i\n", errno);
 #endif
-            if (EBUSY == errno) {
-                printf("Device %s is busy\n", fname);
-                ++num_errors;
-                continue;
-            }
-            else if ((ENODEV == errno) || (ENOENT == errno) ||
-                     (ENXIO == errno)) {
-                ++num_errors;
-                ++num_silent;
-                continue;
-            }
-            else {
-                snprintf(ebuff, EBUFF_SZ, "Error opening %s ", fname);
-                perror(ebuff);
-                ++num_errors;
-                continue;
-            }
-        }
+			if (EBUSY == errno) {
+				printf("Device %s is busy\n", fname);
+				++num_errors;
+				continue;
+			} else if ((ENODEV == errno) || (ENOENT == errno) ||
+				   (ENXIO == errno)) {
+				++num_errors;
+				++num_silent;
+				continue;
+			} else {
+				snprintf(ebuff, EBUFF_SZ, "Error opening %s ",
+					 fname);
+				perror(ebuff);
+				++num_errors;
+				continue;
+			}
+		}
 
-        res = ioctl(sg_fd, SCSI_IOCTL_GET_IDLUN, &my_idlun);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     "device %s failed on scsi ioctl(idlun), skip", fname);
-            perror(ebuff);
-            ++num_errors;
+		res = ioctl(sg_fd, SCSI_IOCTL_GET_IDLUN, &my_idlun);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 "device %s failed on scsi ioctl(idlun), skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
 #ifdef DEBUG
-	    printf ("Couldn't get IDLUN!\n");
+			printf("Couldn't get IDLUN!\n");
 #endif
-            continue;
-        }
-        res = ioctl(sg_fd, SCSI_IOCTL_GET_BUS_NUMBER, &host_no);
-        if (res < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-		 "device %s failed on scsi ioctl(bus_number), skip", fname);
-            perror(ebuff);
-            ++num_errors;
+			continue;
+		}
+		res = ioctl(sg_fd, SCSI_IOCTL_GET_BUS_NUMBER, &host_no);
+		if (res < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 "device %s failed on scsi ioctl(bus_number), skip",
+				 fname);
+			perror(ebuff);
+			++num_errors;
 #ifdef DEBUG
-	    printf ("Couldn't get BUS!\n");
+			printf("Couldn't get BUS!\n");
 #endif
-            continue;
-        }
+			continue;
+		}
 #ifdef DEBUG
-	printf ("%i(%x) %i %i %i %i\n", host_no, my_idlun.host_unique_id,
-		(my_idlun.dev_id>>24)&0xff, (my_idlun.dev_id>>16)&0xff,
-		(my_idlun.dev_id>>8)&0xff, my_idlun.dev_id&0xff);
+		printf("%i(%x) %i %i %i %i\n", host_no, my_idlun.host_unique_id,
+		       (my_idlun.dev_id >> 24) & 0xff,
+		       (my_idlun.dev_id >> 16) & 0xff,
+		       (my_idlun.dev_id >> 8) & 0xff, my_idlun.dev_id & 0xff);
 #endif
-        ind = find_dev_in_sg_arr(&my_idlun, host_no, last_sg_ind);
-        if (ind >= 0) {
-            map_arr[ind].oth_dev_num = k;
-            map_arr[ind].lin_dev_type = lin_dev_type;
-        }
-        else if (ind != -1) {
-            printf("Strange, could not find device %s mapped to sg device error %d??\n",
-                   fname, ind);
-        }
-        else {
-            nonMappedDevicesPresent = TRUE;
-        }
-    }
-    if (nonMappedDevicesPresent) {
-        printf("Unmapped Devices found...\n\n");
-    }
-}
-/* Returns 0 when successful, else -1 */
-static int do_simple_inq(int sg_fd, void * resp, int mx_resp_len, int noisy)
-{
-    int res;
-    unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
-
-    inqCmdBlk[4] = (unsigned char)mx_resp_len;
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(inqCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = inqCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (inquiry) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Inquiry error ");
-            sg_chk_n_print3(ebuff, &io_hdr);
+		ind = find_dev_in_sg_arr(&my_idlun, host_no, last_sg_ind);
+		if (ind >= 0) {
+			map_arr[ind].oth_dev_num = k;
+			map_arr[ind].lin_dev_type = lin_dev_type;
+		} else if (ind != -1) {
+			printf
+			    ("Strange, could not find device %s mapped to sg device error %d??\n",
+			     fname, ind);
+		} else {
+			nonMappedDevicesPresent = TRUE;
+		}
 	}
-	return -1;
-    }
+	if (nonMappedDevicesPresent) {
+		printf("Unmapped Devices found...\n\n");
+	}
+}
+
+/* Returns 0 when successful, else -1 */
+static int do_simple_inq(int sg_fd, void *resp, int mx_resp_len, int noisy)
+{
+	int res;
+	unsigned char inqCmdBlk[INQUIRY_CMDLEN] =
+	    { INQUIRY_CMD, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
+
+	inqCmdBlk[4] = (unsigned char)mx_resp_len;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(inqCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = inqCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (inquiry) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ, "Inquiry error ");
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
 
 static int do_modes(int sg_fd, int dbd, int pc, int pg_code, int sub_pg_code,
-		  void * resp, int mx_resp_len, int noisy, int mode6)
+		    void *resp, int mx_resp_len, int noisy, int mode6)
 {
-    int res;
-    unsigned char modesCmdBlk[MODE_SENSE10_CMDLEN] =
-    	{MODE_SENSE10_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char modesCmdBlk[MODE_SENSE10_CMDLEN] =
+	    { MODE_SENSE10_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    modesCmdBlk[1] = (unsigned char)(dbd ? 0x8 : 0);
-    modesCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
-    modesCmdBlk[3] = (unsigned char)(sub_pg_code & 0xff);
-    if (mx_resp_len > (mode6?0xff:0xffff)) {
-    	printf( ME "mx_resp_len too big\n");
-	return -1;
-    }
-    if (mode6) {
-	modesCmdBlk[0] = MODE_SENSE6_CMD;
-	modesCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
-    } else {
-	modesCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
-	modesCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
-    }
-
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    memset(sense_b, 0, sizeof(sense_b));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = mode6 ? MODE_SENSE6_CMDLEN : MODE_SENSE10_CMDLEN;
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = modesCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (mode sense) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Mode sense error, dbd=%d "
-	    	     "pc=%d page_code=%x sub_page_code=%x\n     ", dbd, pc,
-		     pg_code, sub_pg_code);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	modesCmdBlk[1] = (unsigned char)(dbd ? 0x8 : 0);
+	modesCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
+	modesCmdBlk[3] = (unsigned char)(sub_pg_code & 0xff);
+	if (mx_resp_len > (mode6 ? 0xff : 0xffff)) {
+		printf(ME "mx_resp_len too big\n");
+		return -1;
 	}
-	if ((0x70 == (0x7f & sense_b[0])) && (0x20 == sense_b[12]) &&
-	    (0x0 == sense_b[13])) {
-	    if (mode6)
-	        fprintf(stderr, ">>>>>> drop '-6' switch and try again with "
-			        "a 10 byte MODE SENSE\n");
-	    else
-	        fprintf(stderr, ">>>>>> add '-6' switch and try again with "
-				"a 6 byte MODE SENSE\n");
+	if (mode6) {
+		modesCmdBlk[0] = MODE_SENSE6_CMD;
+		modesCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
+	} else {
+		modesCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
+		modesCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
 	}
-	return -1;
-    }
+
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	memset(sense_b, 0, sizeof(sense_b));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = mode6 ? MODE_SENSE6_CMDLEN : MODE_SENSE10_CMDLEN;
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = modesCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (mode sense) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ, "Mode sense error, dbd=%d "
+				 "pc=%d page_code=%x sub_page_code=%x\n     ",
+				 dbd, pc, pg_code, sub_pg_code);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		if ((0x70 == (0x7f & sense_b[0])) && (0x20 == sense_b[12]) &&
+		    (0x0 == sense_b[13])) {
+			if (mode6)
+				fprintf(stderr,
+					">>>>>> drop '-6' switch and try again with "
+					"a 10 byte MODE SENSE\n");
+			else
+				fprintf(stderr,
+					">>>>>> add '-6' switch and try again with "
+					"a 6 byte MODE SENSE\n");
+		}
+		return -1;
+	}
 }
 
-const char * scsi_ptype_strs[] = {
-    "disk",
-    "tape",
-    "printer",
-    "processor",
-    "write once optical disk",
-    "cd/dvd",
-    "scanner",
-    "optical memory device",
-    "medium changer",
-    "communications",
-    "graphics",
-    "graphics",
-    "storage array controller",
-    "enclosure services device",
-    "simplified direct access device",
-    "optical card reader/writer device",
+const char *scsi_ptype_strs[] = {
+	"disk",
+	"tape",
+	"printer",
+	"processor",
+	"write once optical disk",
+	"cd/dvd",
+	"scanner",
+	"optical memory device",
+	"medium changer",
+	"communications",
+	"graphics",
+	"graphics",
+	"storage array controller",
+	"enclosure services device",
+	"simplified direct access device",
+	"optical card reader/writer device",
 };
 
-const char * get_ptype_str(int scsi_ptype)
+const char *get_ptype_str(int scsi_ptype)
 {
-    int num = sizeof(scsi_ptype_strs) / sizeof(scsi_ptype_strs[0]);
+	int num = sizeof(scsi_ptype_strs) / sizeof(scsi_ptype_strs[0]);
 
-    return (scsi_ptype < num) ? scsi_ptype_strs[scsi_ptype] : "";
+	return (scsi_ptype < num) ? scsi_ptype_strs[scsi_ptype] : "";
 }
 
 static struct page_code_desc pc_desc_all[] = {
-    {0x0, "Unit Attention condition [vendor: page format not required]"},
-    {0x2, "Disconnect-Reconnect"},
-    {0xa, "Control"},
-    {0x15, "Extended"},
-    {0x16, "Extended device-type specific"},
-    {0x18, "Protocol specific LUN"},
-    {0x19, "Protocol specific port"},
-    {0x1a, "Power condition"},
-    {0x1c, "Informational exceptions control"},
-    {0x3f, "[yields all supported pages]"},
+	{0x0, "Unit Attention condition [vendor: page format not required]"},
+	{0x2, "Disconnect-Reconnect"},
+	{0xa, "Control"},
+	{0x15, "Extended"},
+	{0x16, "Extended device-type specific"},
+	{0x18, "Protocol specific LUN"},
+	{0x19, "Protocol specific port"},
+	{0x1a, "Power condition"},
+	{0x1c, "Informational exceptions control"},
+	{0x3f, "[yields all supported pages]"},
 };
 
 static struct page_code_desc pc_desc_disk[] = {
-    {0x1, "Read-Write error recovery"},
-    {0x3, "Format"},
-    {0x4, "Rigid disk geometry"},
-    {0x5, "Flexible geometry"},
-    {0x7, "Verify error recovery"},
-    {0x8, "Caching"},
-    {0x9, "Peripheral device (spc-2 ?)"},
-    {0xb, "Medium types supported"},
-    {0xc, "Notch and partition"},
-    {0xd, "Power condition (obsolete)"},
-    {0x10, "XOR control"},
+	{0x1, "Read-Write error recovery"},
+	{0x3, "Format"},
+	{0x4, "Rigid disk geometry"},
+	{0x5, "Flexible geometry"},
+	{0x7, "Verify error recovery"},
+	{0x8, "Caching"},
+	{0x9, "Peripheral device (spc-2 ?)"},
+	{0xb, "Medium types supported"},
+	{0xc, "Notch and partition"},
+	{0xd, "Power condition (obsolete)"},
+	{0x10, "XOR control"},
 };
 
 static struct page_code_desc pc_desc_tape[] = {
-    {0xf, "Data Compression"},
-    {0x10, "Device config"},
-    {0x11, "Medium Partition [1]"},
-    {0x12, "Medium Partition [2]"},
-    {0x13, "Medium Partition [3]"},
-    {0x14, "Medium Partition [4]"},
-    {0x1c, "Informational exceptions control (tape version)"},
+	{0xf, "Data Compression"},
+	{0x10, "Device config"},
+	{0x11, "Medium Partition [1]"},
+	{0x12, "Medium Partition [2]"},
+	{0x13, "Medium Partition [3]"},
+	{0x14, "Medium Partition [4]"},
+	{0x1c, "Informational exceptions control (tape version)"},
 };
 
 static struct page_code_desc pc_desc_cddvd[] = {
-    {0x1, "Read-Write error recovery"},
-    {0x3, "MRW"},
-    {0x5, "Write parameters"},
-    {0xd, "CD device parameters (obsolete)"},
-    {0xe, "CD audio"},
-    {0x1a, "Power condition"},
-    {0x1c, "Fault/failure reporting control"},
-    {0x1d, "Timeout and protect"},
-    {0x2a, "MM capabilities and mechanical status (obsolete)"},
+	{0x1, "Read-Write error recovery"},
+	{0x3, "MRW"},
+	{0x5, "Write parameters"},
+	{0xd, "CD device parameters (obsolete)"},
+	{0xe, "CD audio"},
+	{0x1a, "Power condition"},
+	{0x1c, "Fault/failure reporting control"},
+	{0x1d, "Timeout and protect"},
+	{0x2a, "MM capabilities and mechanical status (obsolete)"},
 };
 
 static struct page_code_desc pc_desc_smc[] = {
-    {0x1d, "Element address assignment"},
-    {0x1e, "Transport geometry parameters"},
-    {0x1f, "Device capabilities"},
+	{0x1d, "Element address assignment"},
+	{0x1e, "Transport geometry parameters"},
+	{0x1f, "Device capabilities"},
 };
 
 static struct page_code_desc pc_desc_scc[] = {
-    {0x1b, "LUN mapping"},
+	{0x1b, "LUN mapping"},
 };
 
 static struct page_code_desc pc_desc_ses[] = {
-    {0x14, "Enclosure services management"},
+	{0x14, "Enclosure services management"},
 };
 
-struct page_code_desc * find_mode_page_table(int scsi_ptype, int * size)
+struct page_code_desc *find_mode_page_table(int scsi_ptype, int *size)
 {
-    switch (scsi_ptype)
-    {
+	switch (scsi_ptype) {
 	case 0:		/* disk (direct access) type devices */
 	case 4:
 	case 7:
 	case 0xe:
-	    *size = sizeof(pc_desc_disk) / sizeof(pc_desc_disk[0]);
-	    return &pc_desc_disk[0];
+		*size = sizeof(pc_desc_disk) / sizeof(pc_desc_disk[0]);
+		return &pc_desc_disk[0];
 	case 1:		/* tape devices */
 	case 2:
-	    *size = sizeof(pc_desc_tape) / sizeof(pc_desc_tape[0]);
-	    return &pc_desc_tape[0];
+		*size = sizeof(pc_desc_tape) / sizeof(pc_desc_tape[0]);
+		return &pc_desc_tape[0];
 	case 5:		/* cd/dvd devices */
-	    *size = sizeof(pc_desc_cddvd) / sizeof(pc_desc_cddvd[0]);
-	    return &pc_desc_cddvd[0];
+		*size = sizeof(pc_desc_cddvd) / sizeof(pc_desc_cddvd[0]);
+		return &pc_desc_cddvd[0];
 	case 8:		/* medium changer devices */
-	    *size = sizeof(pc_desc_smc) / sizeof(pc_desc_smc[0]);
-	    return &pc_desc_smc[0];
-	case 0xc:	/* storage array devices */
-	    *size = sizeof(pc_desc_scc) / sizeof(pc_desc_scc[0]);
-	    return &pc_desc_scc[0];
-	case 0xd:	/* enclosure services devices */
-	    *size = sizeof(pc_desc_ses) / sizeof(pc_desc_ses[0]);
-	    return &pc_desc_ses[0];
-    }
-    *size = 0;
-    return NULL;
+		*size = sizeof(pc_desc_smc) / sizeof(pc_desc_smc[0]);
+		return &pc_desc_smc[0];
+	case 0xc:		/* storage array devices */
+		*size = sizeof(pc_desc_scc) / sizeof(pc_desc_scc[0]);
+		return &pc_desc_scc[0];
+	case 0xd:		/* enclosure services devices */
+		*size = sizeof(pc_desc_ses) / sizeof(pc_desc_ses[0]);
+		return &pc_desc_ses[0];
+	}
+	*size = 0;
+	return NULL;
 }
 
-const char * find_page_code_desc(int page_num, int scsi_ptype)
+const char *find_page_code_desc(int page_num, int scsi_ptype)
 {
-    int k;
-    int num;
-    const struct page_code_desc * pcdp;
+	int k;
+	int num;
+	const struct page_code_desc *pcdp;
 
-    pcdp = find_mode_page_table(scsi_ptype, &num);
-    if (pcdp) {
-        for (k = 0; k < num; ++k, ++pcdp) {
-	    if (page_num == pcdp->page_code)
-	        return pcdp->desc;
-	    else if (page_num < pcdp->page_code)
-	        break;
+	pcdp = find_mode_page_table(scsi_ptype, &num);
+	if (pcdp) {
+		for (k = 0; k < num; ++k, ++pcdp) {
+			if (page_num == pcdp->page_code)
+				return pcdp->desc;
+			else if (page_num < pcdp->page_code)
+				break;
+		}
 	}
-    }
-    pcdp = &pc_desc_all[0];
-    num = sizeof(pc_desc_all) / sizeof(pc_desc_all[0]);
-    for (k = 0; k < num; ++k, ++pcdp) {
-	if (page_num == pcdp->page_code)
-	    return pcdp->desc;
-	else if (page_num < pcdp->page_code)
-	    break;
-    }
-    return NULL;
+	pcdp = &pc_desc_all[0];
+	num = sizeof(pc_desc_all) / sizeof(pc_desc_all[0]);
+	for (k = 0; k < num; ++k, ++pcdp) {
+		if (page_num == pcdp->page_code)
+			return pcdp->desc;
+		else if (page_num < pcdp->page_code)
+			break;
+	}
+	return NULL;
 }
 
 static void list_page_codes(int scsi_ptype)
 {
-    int k;
-    int num = sizeof(pc_desc_all) / sizeof(pc_desc_all[0]);
-    const struct page_code_desc * pcdp = &pc_desc_all[0];
-    int num_ptype;
-    const struct page_code_desc * pcd_ptypep;
+	int k;
+	int num = sizeof(pc_desc_all) / sizeof(pc_desc_all[0]);
+	const struct page_code_desc *pcdp = &pc_desc_all[0];
+	int num_ptype;
+	const struct page_code_desc *pcd_ptypep;
 
-    pcd_ptypep = find_mode_page_table(scsi_ptype, &num_ptype);
-    printf("Page_Code  Description\n");
-    for (k = 0; k < 0x3f; ++k) {
-	if (pcd_ptypep && (num_ptype > 0)) {
-	    if (k == pcd_ptypep->page_code) {
-	        printf(" 0x%02x      %s\n", pcd_ptypep->page_code,
-		       pcd_ptypep->desc);
-	        ++pcd_ptypep;
-		--num_ptype;
-		continue;
-	    } else if (k > pcd_ptypep->page_code) {
-	        pcd_ptypep++;
-		--num_ptype;
-	    }
+	pcd_ptypep = find_mode_page_table(scsi_ptype, &num_ptype);
+	printf("Page_Code  Description\n");
+	for (k = 0; k < 0x3f; ++k) {
+		if (pcd_ptypep && (num_ptype > 0)) {
+			if (k == pcd_ptypep->page_code) {
+				printf(" 0x%02x      %s\n",
+				       pcd_ptypep->page_code, pcd_ptypep->desc);
+				++pcd_ptypep;
+				--num_ptype;
+				continue;
+			} else if (k > pcd_ptypep->page_code) {
+				pcd_ptypep++;
+				--num_ptype;
+			}
+		}
+		if (pcdp && (num > 0)) {
+			if (k == pcdp->page_code) {
+				printf(" 0x%02x      %s\n", pcdp->page_code,
+				       pcdp->desc);
+				++pcdp;
+				--num;
+				continue;
+			} else if (k > pcdp->page_code) {
+				pcdp++;
+				--num;
+			}
+		}
 	}
-	if (pcdp && (num > 0)) {
-	    if (k == pcdp->page_code) {
-	        printf(" 0x%02x      %s\n", pcdp->page_code, pcdp->desc);
-	        ++pcdp;
-		--num;
-		continue;
-	    } else if (k > pcdp->page_code) {
-	        pcdp++;
-		--num;
-	    }
-	}
-    }
 }
 
-int show_scsi_modes (char * device)
+int show_scsi_modes(char *device)
 {
-    int sg_fd, k, num, len, md_len, bd_len, longlba, page_num;
-    char * file_name = 0;
-    char ebuff[EBUFF_SZ];
-    const char * descp;
-    unsigned char rsp_buff[MODE_ALLOC_LEN];
-    int rsp_buff_size = MODE_ALLOC_LEN;
-    int pg_code = 0;
-    int sub_pg_code = 0;
-    int pc = 0;
-    int do_all = 1;
-    int do_dbd = 0;
-    int do_hex = 0;
-    int do_mode6 = 0;  /* Use MODE SENSE(6) instead of MODE SENSE(10) */
-    int oflags = O_RDONLY | O_NONBLOCK;
-    struct sg_scsi_id a_sid;
-    int scsi_ptype, density_code_off;
-    unsigned char * ucp;
-    unsigned char uc;
+	int sg_fd, k, num, len, md_len, bd_len, longlba, page_num;
+	char *file_name = 0;
+	char ebuff[EBUFF_SZ];
+	const char *descp;
+	unsigned char rsp_buff[MODE_ALLOC_LEN];
+	int rsp_buff_size = MODE_ALLOC_LEN;
+	int pg_code = 0;
+	int sub_pg_code = 0;
+	int pc = 0;
+	int do_all = 1;
+	int do_dbd = 0;
+	int do_hex = 0;
+	int do_mode6 = 0;	/* Use MODE SENSE(6) instead of MODE SENSE(10) */
+	int oflags = O_RDONLY | O_NONBLOCK;
+	struct sg_scsi_id a_sid;
+	int scsi_ptype, density_code_off;
+	unsigned char *ucp;
+	unsigned char uc;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    file_name = device;
+	file_name = device;
 
 	list_page_codes(0);
 
-    /* The 6 bytes command only allows up to 255 bytes of response data */
-    if (do_mode6) rsp_buff_size = 255;
+	/* The 6 bytes command only allows up to 255 bytes of response data */
+	if (do_mode6)
+		rsp_buff_size = 255;
 
-    if ((sg_fd = open(file_name, oflags)) < 0) {
-        snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s", file_name);
-        perror(ebuff);
-        return 1;
-    }
-    /* Just to be safe, check we have a new sg device by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-        printf(ME "%s doesn't seem to be a version 3 sg device\n",
-               file_name);
-        close(sg_fd);
-        return 1;
-    }
-    if (ioctl(sg_fd, SG_GET_SCSI_ID, &a_sid) < 0) {
-	unsigned char inqBuff[36];
-
-	if (do_simple_inq(sg_fd, inqBuff, sizeof(inqBuff), 1)) {
-            printf(ME "%s doesn't respond to a SCSI INQUIRY\n", file_name);
-            close(sg_fd);
-            return 1;
+	if ((sg_fd = open(file_name, oflags)) < 0) {
+		snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s",
+			 file_name);
+		perror(ebuff);
+		return 1;
 	}
-	scsi_ptype = inqBuff[0] & 0x1f; /* fetch peripheral device type */
-    }
-    else
-	scsi_ptype = a_sid.scsi_type;
-    printf("  SCSI peripheral type: %s [0x%x] (from INQUIRY)\n",
-	   get_ptype_str(scsi_ptype), scsi_ptype);
-
-    if (do_all)
-    	pg_code = MODE_CODE_ALL;
-
-    if (0 == do_modes(sg_fd, do_dbd, pc, pg_code, sub_pg_code,
-		      rsp_buff, rsp_buff_size, 1, do_mode6))
-    {
-	int medium_type, specific, headerlen;
-
-    	printf("Mode parameter header from %s byte MODE SENSE:\n",
-	       (do_mode6 ? "6" : "10"));
-	if (do_mode6) {
-	    headerlen = 4;
-	    if (do_hex)
-		dStrHex((const char *)rsp_buff, headerlen, 1);
-	    md_len = rsp_buff[0]+1;
-	    bd_len = rsp_buff[3];
-	    medium_type = rsp_buff[1];
-	    specific = rsp_buff[2];
-	    longlba = 0; /* what is this field? */
-	} else {
-	    headerlen = 8;
-	    md_len = (rsp_buff[0] << 8) + rsp_buff[1] + 2;
-	    bd_len = (rsp_buff[6] << 8) + rsp_buff[7];
-	    medium_type = rsp_buff[2];
-	    specific = rsp_buff[3];
-	    longlba = rsp_buff[4] & 1;
+	/* Just to be safe, check we have a new sg device by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		printf(ME "%s doesn't seem to be a version 3 sg device\n",
+		       file_name);
+		close(sg_fd);
+		return 1;
 	}
-	if (do_hex)
-	    dStrHex((const char *)rsp_buff, headerlen, 1);
-    	printf("  Mode data length=%d, medium type=0x%.2x, specific"
-	       " param=0x%.2x, longlba=%d\n", md_len, medium_type,
-	       specific, longlba);
-        if (md_len > rsp_buff_size) {
-            printf("Only fetched %d bytes of response, truncate output\n",
-                   rsp_buff_size);
-            md_len = rsp_buff_size;
-	    if (bd_len + headerlen > rsp_buff_size)
-		bd_len = rsp_buff_size - headerlen;
-        }
-    	printf("  Block descriptor length=%d\n", bd_len);
-	if (bd_len > 0) {
-	    len = 8;
-	    density_code_off = 0;
-	    num = bd_len;
-	    if (longlba) {
-		printf("> longlba block descriptors:\n");
-		len = 16;
-		density_code_off = 8;
-	    }
-	    else if (0 == scsi_ptype) {
-		printf("> Direct access device block descriptors:\n");
-		density_code_off = 4;
-	    }
-	    else
-		printf("> General mode parameter block descriptors:\n");
+	if (ioctl(sg_fd, SG_GET_SCSI_ID, &a_sid) < 0) {
+		unsigned char inqBuff[36];
 
-	    ucp = rsp_buff + headerlen;
-	    while (num > 0) {
-		printf("   Density code=0x%x\n", *(ucp + density_code_off));
-		dStrHex((const char *)ucp, len, 1);
-		ucp += len;
-		num -= len;
-	    }
-	    printf("\n");
-	}
-	ucp = rsp_buff + bd_len + headerlen;	/* start of mode page(s) */
-	md_len -= bd_len + headerlen;		/* length of mode page(s) */
-	while (md_len > 0) { /* got mode page(s) */
-	    uc = *ucp;
-	    page_num = ucp[0] & 0x3f;
-	    if (do_hex)
-	        descp = NULL;
-	    else {
-	        descp = find_page_code_desc(page_num, scsi_ptype);
-		if (NULL == descp)
-		    snprintf(ebuff, EBUFF_SZ, "vendor[0x%x]", page_num);
-	    }
-	    if (uc & 0x40) {
-		len = (ucp[2] << 8) + ucp[3] + 4;
+		if (do_simple_inq(sg_fd, inqBuff, sizeof(inqBuff), 1)) {
+			printf(ME "%s doesn't respond to a SCSI INQUIRY\n",
+			       file_name);
+			close(sg_fd);
+			return 1;
+		}
+		scsi_ptype = inqBuff[0] & 0x1f;	/* fetch peripheral device type */
+	} else
+		scsi_ptype = a_sid.scsi_type;
+	printf("  SCSI peripheral type: %s [0x%x] (from INQUIRY)\n",
+	       get_ptype_str(scsi_ptype), scsi_ptype);
+
+	if (do_all)
+		pg_code = MODE_CODE_ALL;
+
+	if (0 == do_modes(sg_fd, do_dbd, pc, pg_code, sub_pg_code,
+			  rsp_buff, rsp_buff_size, 1, do_mode6)) {
+		int medium_type, specific, headerlen;
+
+		printf("Mode parameter header from %s byte MODE SENSE:\n",
+		       (do_mode6 ? "6" : "10"));
+		if (do_mode6) {
+			headerlen = 4;
+			if (do_hex)
+				dStrHex((const char *)rsp_buff, headerlen, 1);
+			md_len = rsp_buff[0] + 1;
+			bd_len = rsp_buff[3];
+			medium_type = rsp_buff[1];
+			specific = rsp_buff[2];
+			longlba = 0;	/* what is this field? */
+		} else {
+			headerlen = 8;
+			md_len = (rsp_buff[0] << 8) + rsp_buff[1] + 2;
+			bd_len = (rsp_buff[6] << 8) + rsp_buff[7];
+			medium_type = rsp_buff[2];
+			specific = rsp_buff[3];
+			longlba = rsp_buff[4] & 1;
+		}
 		if (do_hex)
-		    printf(">> page_code=0x%x, subpage_code=0x%x, "
-			   "page_control=%d\n", page_num, ucp[1], pc);
-		else
-		    printf(">> page_code: %s, subpage_code=0x%x, "
-			   "page_control: %s\n",
-			   (descp ? descp: ebuff), ucp[1],
-			   pg_control_str_arr[pc]);
-	    }
-	    else {
-		len = ucp[1] + 2;
-		if (do_hex)
-		    printf(">> page_code=0x%x, page_control=%d\n", page_num,
-			   pc);
-		else
-		    printf(">> page_code: %s, page_control: %s\n",
-		           (descp ? descp: ebuff), pg_control_str_arr[pc]);
-	    }
-	    dStrHex((const char *)ucp, len, 1);
-	    ucp += len;
-	    md_len -= len;
-	}
-    }
+			dStrHex((const char *)rsp_buff, headerlen, 1);
+		printf("  Mode data length=%d, medium type=0x%.2x, specific"
+		       " param=0x%.2x, longlba=%d\n", md_len, medium_type,
+		       specific, longlba);
+		if (md_len > rsp_buff_size) {
+			printf
+			    ("Only fetched %d bytes of response, truncate output\n",
+			     rsp_buff_size);
+			md_len = rsp_buff_size;
+			if (bd_len + headerlen > rsp_buff_size)
+				bd_len = rsp_buff_size - headerlen;
+		}
+		printf("  Block descriptor length=%d\n", bd_len);
+		if (bd_len > 0) {
+			len = 8;
+			density_code_off = 0;
+			num = bd_len;
+			if (longlba) {
+				printf("> longlba block descriptors:\n");
+				len = 16;
+				density_code_off = 8;
+			} else if (0 == scsi_ptype) {
+				printf
+				    ("> Direct access device block descriptors:\n");
+				density_code_off = 4;
+			} else
+				printf
+				    ("> General mode parameter block descriptors:\n");
 
-    close(sg_fd);
-  return 0;
+			ucp = rsp_buff + headerlen;
+			while (num > 0) {
+				printf("   Density code=0x%x\n",
+				       *(ucp + density_code_off));
+				dStrHex((const char *)ucp, len, 1);
+				ucp += len;
+				num -= len;
+			}
+			printf("\n");
+		}
+		ucp = rsp_buff + bd_len + headerlen;	/* start of mode page(s) */
+		md_len -= bd_len + headerlen;	/* length of mode page(s) */
+		while (md_len > 0) {	/* got mode page(s) */
+			uc = *ucp;
+			page_num = ucp[0] & 0x3f;
+			if (do_hex)
+				descp = NULL;
+			else {
+				descp =
+				    find_page_code_desc(page_num, scsi_ptype);
+				if (NULL == descp)
+					snprintf(ebuff, EBUFF_SZ,
+						 "vendor[0x%x]", page_num);
+			}
+			if (uc & 0x40) {
+				len = (ucp[2] << 8) + ucp[3] + 4;
+				if (do_hex)
+					printf
+					    (">> page_code=0x%x, subpage_code=0x%x, "
+					     "page_control=%d\n", page_num,
+					     ucp[1], pc);
+				else
+					printf
+					    (">> page_code: %s, subpage_code=0x%x, "
+					     "page_control: %s\n",
+					     (descp ? descp : ebuff), ucp[1],
+					     pg_control_str_arr[pc]);
+			} else {
+				len = ucp[1] + 2;
+				if (do_hex)
+					printf
+					    (">> page_code=0x%x, page_control=%d\n",
+					     page_num, pc);
+				else
+					printf
+					    (">> page_code: %s, page_control: %s\n",
+					     (descp ? descp : ebuff),
+					     pg_control_str_arr[pc]);
+			}
+			dStrHex((const char *)ucp, len, 1);
+			ucp += len;
+			md_len -= len;
+		}
+	}
+
+	close(sg_fd);
+	return 0;
 }
 
-int do_scsi_read_buffer(char * device)
+int do_scsi_read_buffer(char *device)
 {
-    int sg_fd, res;
-    unsigned int k, num;
-    unsigned char rbCmdBlk [RB_CMD_LEN];
-    unsigned char * rbBuff = NULL;
-    void * rawp = NULL;
-    unsigned char sense_buffer[32];
-    int buf_capacity = 0;
-    int do_quick = 0;
-    int do_dio = 0;
-    int do_mmap = 1;
-    int do_time = 0;
-    int buf_size = 0;
-    unsigned int total_size_mb = RB_MB_TO_READ;
-    char * file_name = 0;
-    size_t psz = getpagesize();
-    int dio_incomplete = 0;
-    sg_io_hdr_t io_hdr;
-    struct timeval start_tm, end_tm;
+	int sg_fd, res;
+	unsigned int k, num;
+	unsigned char rbCmdBlk[RB_CMD_LEN];
+	unsigned char *rbBuff = NULL;
+	void *rawp = NULL;
+	unsigned char sense_buffer[32];
+	int buf_capacity = 0;
+	int do_quick = 0;
+	int do_dio = 0;
+	int do_mmap = 1;
+	int do_time = 0;
+	int buf_size = 0;
+	unsigned int total_size_mb = RB_MB_TO_READ;
+	char *file_name = 0;
+	size_t psz = getpagesize();
+	int dio_incomplete = 0;
+	sg_io_hdr_t io_hdr;
+	struct timeval start_tm, end_tm;
 #ifdef SG_DEBUG
-    int clear = 1;
+	int clear = 1;
 #endif
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    file_name = device;
+	file_name = device;
 
-    sg_fd = open(file_name, O_RDONLY);
-    if (sg_fd < 0) {
-        perror(ME "open error");
-        return 1;
-    }
-    /* Don't worry, being very careful not to write to a none-sg file ... */
-    res = ioctl(sg_fd, SG_GET_VERSION_NUM, &k);
-    if ((res < 0) || (k < 30000)) {
-        printf(ME "not a sg device, or driver prior to 3.x\n");
-        return 1;
-    }
-    if (do_mmap) {
-    	do_dio = 0;
-    	do_quick = 0;
-    }
-    if (NULL == (rawp = malloc(512))) {
-	printf(ME "out of memory (query)\n");
-	return 1;
-    }
-    rbBuff = rawp;
-
-    memset(rbCmdBlk, 0, RB_CMD_LEN);
-    rbCmdBlk[0] = RB_OPCODE;
-    rbCmdBlk[1] = RB_MODE_DESC;
-    rbCmdBlk[8] = RB_DESC_LEN;
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(rbCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_buffer);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = RB_DESC_LEN;
-    io_hdr.dxferp = rbBuff;
-    io_hdr.cmdp = rbCmdBlk;
-    io_hdr.sbp = sense_buffer;
-    io_hdr.timeout = 60000;     /* 60000 millisecs == 60 seconds */
-    /* do normal IO to find RB size (not dio or mmap-ed at this stage) */
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror(ME "SG_IO READ BUFFER descriptor error");
-        if (rawp) free(rawp);
-        return 1;
-    }
-
-    /* now for the error processing */
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-        break;
-    case SG_ERR_CAT_RECOVERED:
-        printf("Recovered error on READ BUFFER descriptor, continuing\n");
-        break;
-    default: /* won't bother decoding other categories */
-        sg_chk_n_print3("READ BUFFER descriptor error", &io_hdr);
-        if (rawp) free(rawp);
-        return 1;
-    }
-
-    buf_capacity = ((rbBuff[1] << 16) | (rbBuff[2] << 8) | rbBuff[3]);
-    printf("READ BUFFER reports: buffer capacity=%d, offset boundary=%d\n",
-           buf_capacity, (int)rbBuff[0]);
-
-    if (0 == buf_size)
-        buf_size = buf_capacity;
-    else if (buf_size > buf_capacity) {
-        printf("Requested buffer size=%d exceeds reported capacity=%d\n",
-               buf_size, buf_capacity);
-        if (rawp) free(rawp);
-        return 1;
-    }
-    if (rawp) {
-	free(rawp);
-	rawp = NULL;
-    }
-
-    if (! do_dio) {
-    	k = buf_size;
-	if (do_mmap && (0 != (k % psz)))
-	    k = ((k / psz) + 1) * psz;  /* round up to page size */
-        res = ioctl(sg_fd, SG_SET_RESERVED_SIZE, &k);
-        if (res < 0)
-            perror(ME "SG_SET_RESERVED_SIZE error");
-    }
-
-    if (do_mmap) {
-	rbBuff = mmap(NULL, buf_size, PROT_READ, MAP_SHARED, sg_fd, 0);
-	if (MAP_FAILED == rbBuff) {
-	    if (ENOMEM == errno)
-	    	printf(ME "mmap() out of memory, try a smaller "
-		       "buffer size than %d KB\n", buf_size / 1024);
-	    else
-		perror(ME "error using mmap()");
-	    return 1;
+	sg_fd = open(file_name, O_RDONLY);
+	if (sg_fd < 0) {
+		perror(ME "open error");
+		return 1;
 	}
-    }
-    else { /* non mmap-ed IO */
-	rawp = malloc(buf_size + (do_dio ? psz : 0));
-	if (NULL == rawp) {
-	    printf(ME "out of memory (data)\n");
-	    return 1;
+	/* Don't worry, being very careful not to write to a none-sg file ... */
+	res = ioctl(sg_fd, SG_GET_VERSION_NUM, &k);
+	if ((res < 0) || (k < 30000)) {
+		printf(ME "not a sg device, or driver prior to 3.x\n");
+		return 1;
 	}
-	if (do_dio)    /* align to page boundary */
-	    rbBuff= (unsigned char *)(((unsigned long)rawp + psz - 1) &
-				      (~(psz - 1)));
+	if (do_mmap) {
+		do_dio = 0;
+		do_quick = 0;
+	}
+	if (NULL == (rawp = malloc(512))) {
+		printf(ME "out of memory (query)\n");
+		return 1;
+	}
+	rbBuff = rawp;
+
+	memset(rbCmdBlk, 0, RB_CMD_LEN);
+	rbCmdBlk[0] = RB_OPCODE;
+	rbCmdBlk[1] = RB_MODE_DESC;
+	rbCmdBlk[8] = RB_DESC_LEN;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(rbCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_buffer);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = RB_DESC_LEN;
+	io_hdr.dxferp = rbBuff;
+	io_hdr.cmdp = rbCmdBlk;
+	io_hdr.sbp = sense_buffer;
+	io_hdr.timeout = 60000;	/* 60000 millisecs == 60 seconds */
+	/* do normal IO to find RB size (not dio or mmap-ed at this stage) */
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror(ME "SG_IO READ BUFFER descriptor error");
+		if (rawp)
+			free(rawp);
+		return 1;
+	}
+
+	/* now for the error processing */
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		printf
+		    ("Recovered error on READ BUFFER descriptor, continuing\n");
+		break;
+	default:		/* won't bother decoding other categories */
+		sg_chk_n_print3("READ BUFFER descriptor error", &io_hdr);
+		if (rawp)
+			free(rawp);
+		return 1;
+	}
+
+	buf_capacity = ((rbBuff[1] << 16) | (rbBuff[2] << 8) | rbBuff[3]);
+	printf("READ BUFFER reports: buffer capacity=%d, offset boundary=%d\n",
+	       buf_capacity, (int)rbBuff[0]);
+
+	if (0 == buf_size)
+		buf_size = buf_capacity;
+	else if (buf_size > buf_capacity) {
+		printf
+		    ("Requested buffer size=%d exceeds reported capacity=%d\n",
+		     buf_size, buf_capacity);
+		if (rawp)
+			free(rawp);
+		return 1;
+	}
+	if (rawp) {
+		free(rawp);
+		rawp = NULL;
+	}
+
+	if (!do_dio) {
+		k = buf_size;
+		if (do_mmap && (0 != (k % psz)))
+			k = ((k / psz) + 1) * psz;	/* round up to page size */
+		res = ioctl(sg_fd, SG_SET_RESERVED_SIZE, &k);
+		if (res < 0)
+			perror(ME "SG_SET_RESERVED_SIZE error");
+	}
+
+	if (do_mmap) {
+		rbBuff = mmap(NULL, buf_size, PROT_READ, MAP_SHARED, sg_fd, 0);
+		if (MAP_FAILED == rbBuff) {
+			if (ENOMEM == errno)
+				printf(ME "mmap() out of memory, try a smaller "
+				       "buffer size than %d KB\n",
+				       buf_size / 1024);
+			else
+				perror(ME "error using mmap()");
+			return 1;
+		}
+	} else {		/* non mmap-ed IO */
+		rawp = malloc(buf_size + (do_dio ? psz : 0));
+		if (NULL == rawp) {
+			printf(ME "out of memory (data)\n");
+			return 1;
+		}
+		if (do_dio)	/* align to page boundary */
+			rbBuff =
+			    (unsigned char *)(((unsigned long)rawp + psz - 1) &
+					      (~(psz - 1)));
+		else
+			rbBuff = rawp;
+	}
+
+	num = (total_size_mb * 1024U * 1024U) / (unsigned int)buf_size;
+	if (do_time) {
+		start_tm.tv_sec = 0;
+		start_tm.tv_usec = 0;
+		gettimeofday(&start_tm, NULL);
+	}
+	/* main data reading loop */
+	for (k = 0; k < num; ++k) {
+		memset(rbCmdBlk, 0, RB_CMD_LEN);
+		rbCmdBlk[0] = RB_OPCODE;
+		rbCmdBlk[1] = RB_MODE_DATA;
+		rbCmdBlk[6] = 0xff & (buf_size >> 16);
+		rbCmdBlk[7] = 0xff & (buf_size >> 8);
+		rbCmdBlk[8] = 0xff & buf_size;
+#ifdef SG_DEBUG
+		memset(rbBuff, 0, buf_size);
+#endif
+
+		memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+		io_hdr.interface_id = 'S';
+		io_hdr.cmd_len = sizeof(rbCmdBlk);
+		io_hdr.mx_sb_len = sizeof(sense_buffer);
+		io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+		io_hdr.dxfer_len = buf_size;
+		if (!do_mmap)
+			io_hdr.dxferp = rbBuff;
+		io_hdr.cmdp = rbCmdBlk;
+		io_hdr.sbp = sense_buffer;
+		io_hdr.timeout = 20000;	/* 20000 millisecs == 20 seconds */
+		io_hdr.pack_id = k;
+		if (do_mmap)
+			io_hdr.flags |= SG_FLAG_MMAP_IO;
+		else if (do_dio)
+			io_hdr.flags |= SG_FLAG_DIRECT_IO;
+		else if (do_quick)
+			io_hdr.flags |= SG_FLAG_NO_DXFER;
+
+		if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+			if (ENOMEM == errno)
+				printf(ME
+				       "SG_IO data; out of memory, try a smaller "
+				       "buffer size than %d KB\n",
+				       buf_size / 1024);
+			else
+				perror(ME "SG_IO READ BUFFER data error");
+			if (rawp)
+				free(rawp);
+			return 1;
+		}
+
+		/* now for the error processing */
+		switch (sg_err_category3(&io_hdr)) {
+		case SG_ERR_CAT_CLEAN:
+			break;
+		case SG_ERR_CAT_RECOVERED:
+			printf
+			    ("Recovered error on READ BUFFER data, continuing\n");
+			break;
+		default:	/* won't bother decoding other categories */
+			sg_chk_n_print3("READ BUFFER data error", &io_hdr);
+			if (rawp)
+				free(rawp);
+			return 1;
+		}
+		if (do_dio &&
+		    ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) !=
+		     SG_INFO_DIRECT_IO))
+			dio_incomplete = 1;	/* flag that dio not done (completely) */
+
+#ifdef SG_DEBUG
+		if (clear) {
+			for (j = 0; j < buf_size; ++j) {
+				if (rbBuff[j] != 0) {
+					clear = 0;
+					break;
+				}
+			}
+		}
+#endif
+	}
+	if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
+		struct timeval res_tm;
+		double a, b;
+
+		gettimeofday(&end_tm, NULL);
+		res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
+		res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
+		if (res_tm.tv_usec < 0) {
+			--res_tm.tv_sec;
+			res_tm.tv_usec += 1000000;
+		}
+		a = res_tm.tv_sec;
+		a += (0.000001 * res_tm.tv_usec);
+		b = (double)buf_size *num;
+		printf("time to read data from buffer was %d.%06d secs",
+		       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
+		if ((a > 0.00001) && (b > 511))
+			printf(", %.2f MB/sec\n", b / (a * 1000000.0));
+		else
+			printf("\n");
+	}
+	if (dio_incomplete)
+		printf(">> direct IO requested but not done\n");
+	printf
+	    ("Read %u MBytes (actual %u MB, %u bytes), buffer size=%d KBytes\n",
+	     total_size_mb, (num * buf_size) / 1048576, num * buf_size,
+	     buf_size / 1024);
+
+	if (rawp)
+		free(rawp);
+	res = close(sg_fd);
+	if (res < 0) {
+		perror(ME "close error");
+		return 0;
+	}
+#ifdef SG_DEBUG
+	if (clear)
+		printf("read buffer always zero\n");
 	else
-	    rbBuff = rawp;
-    }
-
-    num = (total_size_mb * 1024U * 1024U) / (unsigned int)buf_size;
-    if (do_time) {
-	start_tm.tv_sec = 0;
-	start_tm.tv_usec = 0;
-	gettimeofday(&start_tm, NULL);
-    }
-    /* main data reading loop */
-    for (k = 0; k < num; ++k) {
-        memset(rbCmdBlk, 0, RB_CMD_LEN);
-        rbCmdBlk[0] = RB_OPCODE;
-        rbCmdBlk[1] = RB_MODE_DATA;
-        rbCmdBlk[6] = 0xff & (buf_size >> 16);
-        rbCmdBlk[7] = 0xff & (buf_size >> 8);
-        rbCmdBlk[8] = 0xff & buf_size;
-#ifdef SG_DEBUG
-        memset(rbBuff, 0, buf_size);
+		printf("read buffer non-zero\n");
 #endif
-
-        memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-        io_hdr.interface_id = 'S';
-        io_hdr.cmd_len = sizeof(rbCmdBlk);
-        io_hdr.mx_sb_len = sizeof(sense_buffer);
-        io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-        io_hdr.dxfer_len = buf_size;
-	if (! do_mmap)
-	    io_hdr.dxferp = rbBuff;
-        io_hdr.cmdp = rbCmdBlk;
-        io_hdr.sbp = sense_buffer;
-        io_hdr.timeout = 20000;     /* 20000 millisecs == 20 seconds */
-        io_hdr.pack_id = k;
-        if (do_mmap)
-            io_hdr.flags |= SG_FLAG_MMAP_IO;
-        else if (do_dio)
-            io_hdr.flags |= SG_FLAG_DIRECT_IO;
-        else if (do_quick)
-            io_hdr.flags |= SG_FLAG_NO_DXFER;
-
-        if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-	    if (ENOMEM == errno)
-	    	printf(ME "SG_IO data; out of memory, try a smaller "
-		       "buffer size than %d KB\n", buf_size / 1024);
-            else
-	    	perror(ME "SG_IO READ BUFFER data error");
-            if (rawp) free(rawp);
-            return 1;
-        }
-
-        /* now for the error processing */
-        switch (sg_err_category3(&io_hdr)) {
-        case SG_ERR_CAT_CLEAN:
-            break;
-        case SG_ERR_CAT_RECOVERED:
-            printf("Recovered error on READ BUFFER data, continuing\n");
-            break;
-        default: /* won't bother decoding other categories */
-            sg_chk_n_print3("READ BUFFER data error", &io_hdr);
-            if (rawp) free(rawp);
-            return 1;
-        }
-        if (do_dio &&
-            ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
-            dio_incomplete = 1;    /* flag that dio not done (completely) */
-
-#ifdef SG_DEBUG
-        if (clear) {
-            for (j = 0; j < buf_size; ++j) {
-                if (rbBuff[j] != 0) {
-                    clear = 0;
-                    break;
-                }
-            }
-        }
-#endif
-    }
-    if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
-	struct timeval res_tm;
-	double a, b;
-
-        gettimeofday(&end_tm, NULL);
-	res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
-	res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
-	if (res_tm.tv_usec < 0) {
-	    --res_tm.tv_sec;
-	    res_tm.tv_usec += 1000000;
-	}
-	a = res_tm.tv_sec;
-	a += (0.000001 * res_tm.tv_usec);
-	b = (double)buf_size * num;
-	printf("time to read data from buffer was %d.%06d secs",
-	       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
-	if ((a > 0.00001) && (b > 511))
-	    printf(", %.2f MB/sec\n", b / (a * 1000000.0));
-	else
-	    printf("\n");
-    }
-    if (dio_incomplete)
-        printf(">> direct IO requested but not done\n");
-    printf("Read %u MBytes (actual %u MB, %u bytes), buffer size=%d KBytes\n",
-	   total_size_mb, (num * buf_size) / 1048576, num * buf_size,
-	   buf_size / 1024);
-
-    if (rawp) free(rawp);
-    res = close(sg_fd);
-    if (res < 0) {
-        perror(ME "close error");
-      return 0;
-    }
-#ifdef SG_DEBUG
-    if (clear)
-        printf("read buffer always zero\n");
-    else
-        printf("read buffer non-zero\n");
-#endif
-  return 0;
+	return 0;
 }
+
 /* Performs a 10 byte READ CAPACITY command and fetches response. There is
  * evidently a 16 byte READ CAPACITY command coming.
  * Return of 0 -> success, -1 -> failure */
 int do_readcap_10(int sg_fd, int pmi, unsigned int lba,
-		  unsigned int * last_sect, unsigned int * sect_sz)
+		  unsigned int *last_sect, unsigned int *sect_sz)
 {
-    int res;
-    unsigned char rcCmdBlk[10] = {0x25, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    unsigned char rcBuff[RCAP_REPLY_LEN];
-    unsigned char sense_b[SENSE_BUFF_SZ];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char rcCmdBlk[10] = { 0x25, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	unsigned char rcBuff[RCAP_REPLY_LEN];
+	unsigned char sense_b[SENSE_BUFF_SZ];
+	sg_io_hdr_t io_hdr;
 
-    if (pmi) { /* lbs only valid when pmi set */
-	rcCmdBlk[8] |= 1;
-	rcCmdBlk[2] = (lba >> 24) & 0xff;
-	rcCmdBlk[3] = (lba >> 16) & 0xff;
-	rcCmdBlk[4] = (lba >> 8) & 0xff;
-	rcCmdBlk[5] = lba & 0xff;
-    }
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(rcCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = sizeof(rcBuff);
-    io_hdr.dxferp = rcBuff;
-    io_hdr.cmdp = rcCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = 60000;
+	if (pmi) {		/* lbs only valid when pmi set */
+		rcCmdBlk[8] |= 1;
+		rcCmdBlk[2] = (lba >> 24) & 0xff;
+		rcCmdBlk[3] = (lba >> 16) & 0xff;
+		rcCmdBlk[4] = (lba >> 8) & 0xff;
+		rcCmdBlk[5] = lba & 0xff;
+	}
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(rcCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = sizeof(rcBuff);
+	io_hdr.dxferp = rcBuff;
+	io_hdr.cmdp = rcCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = 60000;
 
-    while (1) {
-        if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-            perror("read_capacity (SG_IO) error");
-            return -1;
-        }
-        res = sg_err_category3(&io_hdr);
-        if (SG_ERR_CAT_MEDIA_CHANGED == res)
-            continue;
-        else if (SG_ERR_CAT_CLEAN != res) {
-            sg_chk_n_print3("READ CAPACITY command error", &io_hdr);
-            return -1;
-        }
-        else
-            break;
-    }
-    *last_sect = ((rcBuff[0] << 24) | (rcBuff[1] << 16) |
-                 (rcBuff[2] << 8) | rcBuff[3]);
-    *sect_sz = (rcBuff[4] << 24) | (rcBuff[5] << 16) |
-               (rcBuff[6] << 8) | rcBuff[7];
-  return 0;
+	while (1) {
+		if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+			perror("read_capacity (SG_IO) error");
+			return -1;
+		}
+		res = sg_err_category3(&io_hdr);
+		if (SG_ERR_CAT_MEDIA_CHANGED == res)
+			continue;
+		else if (SG_ERR_CAT_CLEAN != res) {
+			sg_chk_n_print3("READ CAPACITY command error", &io_hdr);
+			return -1;
+		} else
+			break;
+	}
+	*last_sect = ((rcBuff[0] << 24) | (rcBuff[1] << 16) |
+		      (rcBuff[2] << 8) | rcBuff[3]);
+	*sect_sz = (rcBuff[4] << 24) | (rcBuff[5] << 16) |
+	    (rcBuff[6] << 8) | rcBuff[7];
+	return 0;
 }
 
-int show_scsi_read_capacity(char * device)
+int show_scsi_read_capacity(char *device)
 {
-    int sg_fd, k, res;
-    unsigned int lba = 0;
-    int pmi = 1;
-    unsigned int last_blk_addr, block_size;
-    char ebuff[EBUFF_SZ];
-    const char * file_name = 0;
+	int sg_fd, k, res;
+	unsigned int lba = 0;
+	int pmi = 1;
+	unsigned int last_blk_addr, block_size;
+	char ebuff[EBUFF_SZ];
+	const char *file_name = 0;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    file_name = device;
+	file_name = device;
 
-    if ((0 == pmi) && (lba > 0)) {
-	fprintf(stderr, ME "lba can only be non-zero when pmi is set\n");
-	usage();
-	return 1;
-    }
-    if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
-	snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s", file_name);
-	perror(ebuff);
-	return 1;
-    }
-    /* Just to be safe, check we have a new sg device by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-	printf( ME "%s doesn't seem to be a version 3 sg device\n",
-	       file_name);
+	if ((0 == pmi) && (lba > 0)) {
+		fprintf(stderr,
+			ME "lba can only be non-zero when pmi is set\n");
+		usage();
+		return 1;
+	}
+	if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
+		snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s",
+			 file_name);
+		perror(ebuff);
+		return 1;
+	}
+	/* Just to be safe, check we have a new sg device by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		printf(ME "%s doesn't seem to be a version 3 sg device\n",
+		       file_name);
+		close(sg_fd);
+		return 1;
+	}
+	res = do_readcap_10(sg_fd, pmi, lba, &last_blk_addr, &block_size);
+
+	if (0 == res) {
+		printf("Read Capacity results:\n");
+		if (pmi)
+			printf("   PMI mode: given lba=0x%x, last block before "
+			       "delay=0x%x\n", lba, last_blk_addr);
+		else
+			printf
+			    ("   Last block address=%u (0x%x), Number of blocks=%u\n",
+			     last_blk_addr, last_blk_addr, last_blk_addr + 1);
+		printf("   Block size = %u bytes\n", block_size);
+	}
 	close(sg_fd);
-	return 1;
-    }
-    res = do_readcap_10(sg_fd, pmi, lba, &last_blk_addr, &block_size);
-
-   if (0 == res) {
-        printf("Read Capacity results:\n");
-	if (pmi)
-	    printf("   PMI mode: given lba=0x%x, last block before "
-		   "delay=0x%x\n", lba, last_blk_addr);
-	else
-	    printf("   Last block address=%u (0x%x), Number of blocks=%u\n",
-                   last_blk_addr, last_blk_addr, last_blk_addr + 1);
-        printf("   Block size = %u bytes\n", block_size);
-    }
-    close(sg_fd);
-  return 0;
+	return 0;
 }
-int do_scsi_reset_devices(char * device, int reset_opt)
+
+int do_scsi_reset_devices(char *device, int reset_opt)
 {
-    int sg_fd, res, k;
-    int do_device_reset = 0;
-    int do_bus_reset = 0;
-    int do_host_reset = 0;
-    char * file_name = 0;
+	int sg_fd, res, k;
+	int do_device_reset = 0;
+	int do_bus_reset = 0;
+	int do_host_reset = 0;
+	char *file_name = 0;
 
-    switch (reset_opt) {
-    case DEVICE_RESET:
-        print_msg(TEST_BREAK, __FUNCTION__);
-        do_device_reset = 1;
-        break;
-    case HOST_RESET:
-        do_host_reset = 1;
-        break;
-    case BUS_RESET:
-        do_bus_reset = 1;
-        break;
-    }
+	switch (reset_opt) {
+	case DEVICE_RESET:
+		print_msg(TEST_BREAK, __FUNCTION__);
+		do_device_reset = 1;
+		break;
+	case HOST_RESET:
+		do_host_reset = 1;
+		break;
+	case BUS_RESET:
+		do_bus_reset = 1;
+		break;
+	}
 
-    file_name = device;
+	file_name = device;
 
-    sg_fd = open(file_name, O_RDWR | O_NONBLOCK);
-    if (sg_fd < 0) {
-        perror("sg_reset: open error");
-        return 1;
-    }
+	sg_fd = open(file_name, O_RDWR | O_NONBLOCK);
+	if (sg_fd < 0) {
+		perror("sg_reset: open error");
+		return 1;
+	}
 
-    k = SG_SCSI_RESET_NOTHING;
-    if (do_device_reset) {
-	printf("sg_reset: starting device reset\n");
-        k = SG_SCSI_RESET_DEVICE;
-    }
-    else if (do_bus_reset) {
-	printf("sg_reset: starting bus reset\n");
-        k = SG_SCSI_RESET_BUS;
-    }
-    else if (do_host_reset) {
-	printf("sg_reset: starting host reset\n");
-        k = SG_SCSI_RESET_HOST;
-    }
+	k = SG_SCSI_RESET_NOTHING;
+	if (do_device_reset) {
+		printf("sg_reset: starting device reset\n");
+		k = SG_SCSI_RESET_DEVICE;
+	} else if (do_bus_reset) {
+		printf("sg_reset: starting bus reset\n");
+		k = SG_SCSI_RESET_BUS;
+	} else if (do_host_reset) {
+		printf("sg_reset: starting host reset\n");
+		k = SG_SCSI_RESET_HOST;
+	}
 
-    res = ioctl(sg_fd, SG_SCSI_RESET, &k);
-    if (res < 0) {
-        if (EBUSY == errno)
-            printf("sg_reset: BUSY, may be resetting now\n");
-        else if (EIO == errno)
-            printf("sg_reset: requested type of reset may not be available\n");
-        else if (EACCES == errno)
-            printf("sg_reset: reset requires CAP_SYS_ADMIN (root) "
-	    	   "permission\n");
-        else if (EINVAL == errno)
-            printf("sg_reset: SG_SCSI_RESET not supported\n");
-        else if (EIO == errno)
-            printf("sg_reset: scsi_reset_provider() call failed\n");
-        else
-            perror("sg_reset: SG_SCSI_RESET failed");
-        return 1;
-    }
-    if (SG_SCSI_RESET_NOTHING == k)
-        printf("sg_reset: did nothing, device is normal mode\n");
-    else if (SG_SCSI_RESET_DEVICE == k)
-	printf("sg_reset: completed device reset\n");
-    else if (SG_SCSI_RESET_BUS == k)
-	printf("sg_reset: completed bus reset\n");
-    else if (SG_SCSI_RESET_HOST == k)
-	printf("sg_reset: completed host reset\n");
+	res = ioctl(sg_fd, SG_SCSI_RESET, &k);
+	if (res < 0) {
+		if (EBUSY == errno)
+			printf("sg_reset: BUSY, may be resetting now\n");
+		else if (EIO == errno)
+			printf
+			    ("sg_reset: requested type of reset may not be available\n");
+		else if (EACCES == errno)
+			printf("sg_reset: reset requires CAP_SYS_ADMIN (root) "
+			       "permission\n");
+		else if (EINVAL == errno)
+			printf("sg_reset: SG_SCSI_RESET not supported\n");
+		else if (EIO == errno)
+			printf("sg_reset: scsi_reset_provider() call failed\n");
+		else
+			perror("sg_reset: SG_SCSI_RESET failed");
+		return 1;
+	}
+	if (SG_SCSI_RESET_NOTHING == k)
+		printf("sg_reset: did nothing, device is normal mode\n");
+	else if (SG_SCSI_RESET_DEVICE == k)
+		printf("sg_reset: completed device reset\n");
+	else if (SG_SCSI_RESET_BUS == k)
+		printf("sg_reset: completed bus reset\n");
+	else if (SG_SCSI_RESET_HOST == k)
+		printf("sg_reset: completed host reset\n");
 
-    if (close(sg_fd) < 0) {
-        perror("sg_reset: close error");
-        return 1;
-    }
-  return 0;
+	if (close(sg_fd) < 0) {
+		perror("sg_reset: close error");
+		return 1;
+	}
+	return 0;
 }
 
 static int do_senddiag(int sg_fd, int sf_code, int pf_bit, int sf_bit,
-		       int devofl_bit, int unitofl_bit, void * outgoing_pg,
+		       int devofl_bit, int unitofl_bit, void *outgoing_pg,
 		       int outgoing_len, int noisy)
 {
-    int res;
-    unsigned char senddiagCmdBlk[SEND_DIAGNOSTIC_CMDLEN] =
-    	{SEND_DIAGNOSTIC_CMD, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char senddiagCmdBlk[SEND_DIAGNOSTIC_CMDLEN] =
+	    { SEND_DIAGNOSTIC_CMD, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    senddiagCmdBlk[1] = (unsigned char)((sf_code << 5) | (pf_bit << 4) |
-	    		(sf_bit << 2) | (devofl_bit << 1) | unitofl_bit);
-    senddiagCmdBlk[3] = (unsigned char)((outgoing_len >> 8) & 0xff);
-    senddiagCmdBlk[4] = (unsigned char)(outgoing_len & 0xff);
+	senddiagCmdBlk[1] = (unsigned char)((sf_code << 5) | (pf_bit << 4) |
+					    (sf_bit << 2) | (devofl_bit << 1) |
+					    unitofl_bit);
+	senddiagCmdBlk[3] = (unsigned char)((outgoing_len >> 8) & 0xff);
+	senddiagCmdBlk[4] = (unsigned char)(outgoing_len & 0xff);
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = SEND_DIAGNOSTIC_CMDLEN;
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = outgoing_len ? SG_DXFER_TO_DEV : SG_DXFER_NONE;
-    io_hdr.dxfer_len = outgoing_len;
-    io_hdr.dxferp = outgoing_pg;
-    io_hdr.cmdp = senddiagCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = LONG_TIMEOUT;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = SEND_DIAGNOSTIC_CMDLEN;
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = outgoing_len ? SG_DXFER_TO_DEV : SG_DXFER_NONE;
+	io_hdr.dxfer_len = outgoing_len;
+	io_hdr.dxferp = outgoing_pg;
+	io_hdr.cmdp = senddiagCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = LONG_TIMEOUT;
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (send diagnostic) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Send diagnostic error, sf_code=0x%x, "
-	    	     "pf_bit=%d, sf_bit=%d ", sf_code, pf_bit, sf_bit);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (send diagnostic) error");
+		return -1;
 	}
-	return -1;
-    }
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ,
+				 "Send diagnostic error, sf_code=0x%x, "
+				 "pf_bit=%d, sf_bit=%d ", sf_code, pf_bit,
+				 sf_bit);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
 
-static int do_rcvdiag(int sg_fd, int pcv, int pg_code, void * resp,
+static int do_rcvdiag(int sg_fd, int pcv, int pg_code, void *resp,
 		      int mx_resp_len, int noisy)
 {
-    int res;
-    unsigned char rcvdiagCmdBlk[RECEIVE_DIAGNOSTIC_CMDLEN] =
-    	{RECEIVE_DIAGNOSTIC_CMD, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
+	int res;
+	unsigned char rcvdiagCmdBlk[RECEIVE_DIAGNOSTIC_CMDLEN] =
+	    { RECEIVE_DIAGNOSTIC_CMD, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
 
-    rcvdiagCmdBlk[1] = (unsigned char)(pcv ? 0x1 : 0);
-    rcvdiagCmdBlk[2] = (unsigned char)(pg_code);
-    rcvdiagCmdBlk[3] = (unsigned char)((mx_resp_len >> 8) & 0xff);
-    rcvdiagCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
+	rcvdiagCmdBlk[1] = (unsigned char)(pcv ? 0x1 : 0);
+	rcvdiagCmdBlk[2] = (unsigned char)(pg_code);
+	rcvdiagCmdBlk[3] = (unsigned char)((mx_resp_len >> 8) & 0xff);
+	rcvdiagCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = RECEIVE_DIAGNOSTIC_CMDLEN;
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = rcvdiagCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = RECEIVE_DIAGNOSTIC_CMDLEN;
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = rcvdiagCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
 
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (receive diagnostic) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Receive diagnostic error, pcv=%d, "
-	    	     "page_code=%x ", pcv, pg_code);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (receive diagnostic) error");
+		return -1;
 	}
-	return -1;
-    }
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ,
+				 "Receive diagnostic error, pcv=%d, "
+				 "page_code=%x ", pcv, pg_code);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
 
 /* Get last extended self-test time from mode page 0xa (for '-e' option) */
-static int do_modes_0a(int sg_fd, void * resp, int mx_resp_len, int noisy,
-	               int mode6)
+static int do_modes_0a(int sg_fd, void *resp, int mx_resp_len, int noisy,
+		       int mode6)
 {
-    int res;
-    unsigned char modesCmdBlk[MODE_SENSE10_CMDLEN] =
-    	{MODE_SENSE10_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-    unsigned char sense_b[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
-    int dbd = 1;
-    int pc = 0;
-    int pg_code = 0xa;
+	int res;
+	unsigned char modesCmdBlk[MODE_SENSE10_CMDLEN] =
+	    { MODE_SENSE10_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	unsigned char sense_b[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
+	int dbd = 1;
+	int pc = 0;
+	int pg_code = 0xa;
 
-    modesCmdBlk[1] = (unsigned char)(dbd ? 0x8 : 0);
-    modesCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
-    if (mx_resp_len > (mode6 ? 0xff : 0xffff)) {
-    	printf( ME "mx_resp_len too big\n");
-	return -1;
-    }
-    if (mode6) {
-	modesCmdBlk[0] = MODE_SENSE6_CMD;
-	modesCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
-    } else {
-	modesCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
-	modesCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
-    }
-
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = mode6 ? MODE_SENSE6_CMDLEN : MODE_SENSE10_CMDLEN;
-    io_hdr.mx_sb_len = sizeof(sense_b);
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = mx_resp_len;
-    io_hdr.dxferp = resp;
-    io_hdr.cmdp = modesCmdBlk;
-    io_hdr.sbp = sense_b;
-    io_hdr.timeout = DEF_TIMEOUT;
-
-    if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-        perror("SG_IO (mode sense) error");
-        return -1;
-    }
-    res = sg_err_category3(&io_hdr);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-    case SG_ERR_CAT_RECOVERED:
-	return 0;
-    default:
-	if (noisy) {
-	    char ebuff[EBUFF_SZ];
-	    snprintf(ebuff, EBUFF_SZ, "Mode sense error, dbd=%d, "
-	    	     "pc=%d, page_code=%x ", dbd, pc, pg_code);
-            sg_chk_n_print3(ebuff, &io_hdr);
+	modesCmdBlk[1] = (unsigned char)(dbd ? 0x8 : 0);
+	modesCmdBlk[2] = (unsigned char)(((pc << 6) & 0xc0) | (pg_code & 0x3f));
+	if (mx_resp_len > (mode6 ? 0xff : 0xffff)) {
+		printf(ME "mx_resp_len too big\n");
+		return -1;
 	}
-	return -1;
-    }
+	if (mode6) {
+		modesCmdBlk[0] = MODE_SENSE6_CMD;
+		modesCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
+	} else {
+		modesCmdBlk[7] = (unsigned char)((mx_resp_len >> 8) & 0xff);
+		modesCmdBlk[8] = (unsigned char)(mx_resp_len & 0xff);
+	}
+
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = mode6 ? MODE_SENSE6_CMDLEN : MODE_SENSE10_CMDLEN;
+	io_hdr.mx_sb_len = sizeof(sense_b);
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = mx_resp_len;
+	io_hdr.dxferp = resp;
+	io_hdr.cmdp = modesCmdBlk;
+	io_hdr.sbp = sense_b;
+	io_hdr.timeout = DEF_TIMEOUT;
+
+	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+		perror("SG_IO (mode sense) error");
+		return -1;
+	}
+	res = sg_err_category3(&io_hdr);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+	case SG_ERR_CAT_RECOVERED:
+		return 0;
+	default:
+		if (noisy) {
+			char ebuff[EBUFF_SZ];
+			snprintf(ebuff, EBUFF_SZ, "Mode sense error, dbd=%d, "
+				 "pc=%d, page_code=%x ", dbd, pc, pg_code);
+			sg_chk_n_print3(ebuff, &io_hdr);
+		}
+		return -1;
+	}
 }
 
-int do_scsi_send_diagnostics(char * device)
+int do_scsi_send_diagnostics(char *device)
 {
-    int sg_fd, k, num, rsp_len;
-    char * file_name = 0;
-    unsigned char rsp_buff[MODE_ALLOC_LEN];
-    int rsp_buff_size = MODE_ALLOC_LEN;
-    int self_test_code = 6;
-    int do_pf = 0;
-    int do_doff = 0;
-    int do_def_test = 0;
-    int do_uoff = 0;
-    int oflags = O_RDWR;
+	int sg_fd, k, num, rsp_len;
+	char *file_name = 0;
+	unsigned char rsp_buff[MODE_ALLOC_LEN];
+	int rsp_buff_size = MODE_ALLOC_LEN;
+	int self_test_code = 6;
+	int do_pf = 0;
+	int do_doff = 0;
+	int do_def_test = 0;
+	int do_uoff = 0;
+	int oflags = O_RDWR;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    file_name = device;
+	file_name = device;
 
-    if ((sg_fd = open(file_name, oflags)) < 0) {
-        snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s", file_name);
-        perror(ebuff);
-        return 1;
-    }
-    /* Just to be safe, check we have a new sg device by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-        printf( ME "%s doesn't seem to be a version 3 sg device\n",
-                file_name);
-        close(sg_fd);
-        return 1;
-    }
+	if ((sg_fd = open(file_name, oflags)) < 0) {
+		snprintf(ebuff, EBUFF_SZ, ME "error opening file: %s",
+			 file_name);
+		perror(ebuff);
+		return 1;
+	}
+	/* Just to be safe, check we have a new sg device by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		printf(ME "%s doesn't seem to be a version 3 sg device\n",
+		       file_name);
+		close(sg_fd);
+		return 1;
+	}
 
-    if (0 == do_modes_0a(sg_fd, rsp_buff, 32, 1, 0)) {
-        /* Assume mode sense(10) response without block descriptors */
-        num = (rsp_buff[0] << 8) + rsp_buff[1] - 6;
-        if (num >= 0xc) {
-            int secs;
+	if (0 == do_modes_0a(sg_fd, rsp_buff, 32, 1, 0)) {
+		/* Assume mode sense(10) response without block descriptors */
+		num = (rsp_buff[0] << 8) + rsp_buff[1] - 6;
+		if (num >= 0xc) {
+			int secs;
 
-            secs = (rsp_buff[18] << 8) + rsp_buff[19];
-            printf("Previous extended self-test duration=%d seconds "
-                   "(%.2f minutes)\n", secs, secs / 60.0);
-        } else
-            printf("Extended self-test duration not available\n");
-    } else
-        printf("Extended self-test duration (mode page 0xa) failed\n");
+			secs = (rsp_buff[18] << 8) + rsp_buff[19];
+			printf
+			    ("Previous extended self-test duration=%d seconds "
+			     "(%.2f minutes)\n", secs, secs / 60.0);
+		} else
+			printf("Extended self-test duration not available\n");
+	} else
+		printf("Extended self-test duration (mode page 0xa) failed\n");
 
-    memset(rsp_buff, 0, sizeof(rsp_buff));
-    if (0 == do_senddiag(sg_fd, 0, do_pf, 0, 0, 0, rsp_buff, 4, 1)) {
-        if (0 == do_rcvdiag(sg_fd, 0, 0, rsp_buff, rsp_buff_size, 1)) {
-            printf("Supported diagnostic pages response:\n");
-            rsp_len = (rsp_buff[2] << 8) + rsp_buff[3] + 4;
-            for (k = 0; k < (rsp_len - 4); ++k)
-                printf("  %s\n", find_page_code_desc(rsp_buff[k + 4], 0));
-        }
-    }
+	memset(rsp_buff, 0, sizeof(rsp_buff));
+	if (0 == do_senddiag(sg_fd, 0, do_pf, 0, 0, 0, rsp_buff, 4, 1)) {
+		if (0 == do_rcvdiag(sg_fd, 0, 0, rsp_buff, rsp_buff_size, 1)) {
+			printf("Supported diagnostic pages response:\n");
+			rsp_len = (rsp_buff[2] << 8) + rsp_buff[3] + 4;
+			for (k = 0; k < (rsp_len - 4); ++k)
+				printf("  %s\n",
+				       find_page_code_desc(rsp_buff[k + 4], 0));
+		}
+	}
 
-    if (0 == do_senddiag(sg_fd, self_test_code, do_pf, do_def_test,
-                         do_doff, do_uoff, NULL, 0, 1)) {
-        if ((5 == self_test_code) || (6 == self_test_code))
-            printf("Foreground self test returned GOOD status\n");
-        else if (do_def_test && (! do_doff) && (! do_uoff))
-            printf("Default self test returned GOOD status\n");
-    }
-    close(sg_fd);
-  return 0;
+	if (0 == do_senddiag(sg_fd, self_test_code, do_pf, do_def_test,
+			     do_doff, do_uoff, NULL, 0, 1)) {
+		if ((5 == self_test_code) || (6 == self_test_code))
+			printf("Foreground self test returned GOOD status\n");
+		else if (do_def_test && (!do_doff) && (!do_uoff))
+			printf("Default self test returned GOOD status\n");
+	}
+	close(sg_fd);
+	return 0;
 }
 
 static void do_start_stop(int fd, int start, int immed, int loej,
 			  int power_conditions)
 {
-	unsigned char cmdblk [6] = {
+	unsigned char cmdblk[6] = {
 		START_STOP,	/* Command */
 		0,		/* Resvd/Immed */
 		0,		/* Reserved */
 		0,		/* Reserved */
 		0,		/* PowCond/Resvd/LoEj/Start */
-		0 };		/* Reserved/Flag/Link */
+		0
+	};			/* Reserved/Flag/Link */
 	unsigned char sense_b[32];
 	sg_io_hdr_t io_hdr;
 	int k, res, debug = 1;
@@ -4225,7 +4510,7 @@
 	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
 	cmdblk[1] = immed & 1;
 	cmdblk[4] = ((power_conditions & 0xf) << 4) |
-		    ((loej & 1) << 1) | (start & 1);
+	    ((loej & 1) << 1) | (start & 1);
 	io_hdr.interface_id = 'S';
 	io_hdr.cmd_len = sizeof(cmdblk);
 	io_hdr.mx_sb_len = sizeof(sense_b);
@@ -4239,7 +4524,7 @@
 	if (debug) {
 		printf("  Start/Stop command:");
 		for (k = 0; k < 6; ++k)
-			printf (" %02x", cmdblk[k]);
+			printf(" %02x", cmdblk[k]);
 		printf("\n");
 	}
 
@@ -4258,7 +4543,7 @@
 	if (SG_ERR_CAT_CLEAN != res) {
 		sg_chk_n_print3("start_stop", &io_hdr);
 		return;
- 	}
+	}
 	if (debug)
 		fprintf(stderr, "start_stop [%s] successful\n",
 			start ? "start" : "stop");
@@ -4266,13 +4551,14 @@
 
 static void do_sync_cache(int fd)
 {
-	unsigned char cmdblk [ 10 ] = {
+	unsigned char cmdblk[10] = {
 		SYNCHRONIZE_CACHE,	/* Command */
-		0,			/* Immed (2) */
-		0, 0, 0, 0,		/* LBA */
-		0,			/* Reserved */
-		0, 0,			/* No of blocks */
-		0 };			/* Reserved/Flag/Link */
+		0,		/* Immed (2) */
+		0, 0, 0, 0,	/* LBA */
+		0,		/* Reserved */
+		0, 0,		/* No of blocks */
+		0
+	};			/* Reserved/Flag/Link */
 	unsigned char sense_b[32];
 	sg_io_hdr_t io_hdr;
 	int res, debug = 1;
@@ -4303,23 +4589,23 @@
 	if (SG_ERR_CAT_CLEAN != res) {
 		sg_chk_n_print3("sync_cache", &io_hdr);
 		return;
- 	}
+	}
 	if (debug)
 		fprintf(stderr, "synchronize cache successful\n");
 }
 
-int do_scsi_start_stop(char * device, int startstop)
+int do_scsi_start_stop(char *device, int startstop)
 {
 	int synccache = 1;
-	char * file_name = 0;
+	char *file_name = 0;
 	int fd;
 	int immed = 1;
 	int loej = 0;
 	int power_conds = 0;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    file_name  = device;
+	file_name = device;
 
 	fd = open(file_name, O_RDWR | O_NONBLOCK);
 	if (fd < 0) {
@@ -4329,8 +4615,8 @@
 		return 2;
 	}
 	if (ioctl(fd, SG_GET_TIMEOUT, 0) < 0) {
-		fprintf( stderr, "Given file not block or SCSI "
-			"generic device\n" );
+		fprintf(stderr, "Given file not block or SCSI "
+			"generic device\n");
 		close(fd);
 		return 3;
 	}
@@ -4343,566 +4629,598 @@
 	else if (startstop != -1)
 		do_start_stop(fd, startstop, immed, loej, 0);
 
-	close (fd);
+	close(fd);
 	return 0;
 }
 
-int find_out_about_buffer (int sg_fd, int * buf_capacity, char * file_name)
+int find_out_about_buffer(int sg_fd, int *buf_capacity, char *file_name)
 {
-    int res, buf_granul = 255;
-    unsigned char * rbBuff = malloc(OFF + sizeof(rbCmdBlk) + 512);
-    struct sg_header * rsghp = (struct sg_header *)rbBuff;
-    int rbInLen = OFF + RB_DESC_LEN;
-    int rbOutLen = OFF + sizeof(rbCmdBlk);
-    unsigned char * buffp = rbBuff + OFF;
-    rsghp->pack_len = 0;                /* don't care */
-    rsghp->pack_id = 0;
-    rsghp->reply_len = rbInLen;
-    rsghp->twelve_byte = 0;
-    rsghp->result = 0;
+	int res, buf_granul = 255;
+	unsigned char *rbBuff = malloc(OFF + sizeof(rbCmdBlk) + 512);
+	struct sg_header *rsghp = (struct sg_header *)rbBuff;
+	int rbInLen = OFF + RB_DESC_LEN;
+	int rbOutLen = OFF + sizeof(rbCmdBlk);
+	unsigned char *buffp = rbBuff + OFF;
+	rsghp->pack_len = 0;	/* don't care */
+	rsghp->pack_id = 0;
+	rsghp->reply_len = rbInLen;
+	rsghp->twelve_byte = 0;
+	rsghp->result = 0;
 #ifndef SG_GET_RESERVED_SIZE
-    rsghp->sense_buffer[0] = 0;
+	rsghp->sense_buffer[0] = 0;
 #endif
-    memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
-    rbBuff[OFF + 1] = RB_MODE_DESC;
-    rbBuff[OFF + 8] = RB_DESC_LEN;
+	memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
+	rbBuff[OFF + 1] = RB_MODE_DESC;
+	rbBuff[OFF + 8] = RB_DESC_LEN;
 
-    res = write(sg_fd, rbBuff, rbOutLen);
-    if (res < 0) {
-        perror("sg_test_rwbuf: write (desc) error");
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
-    if (res < rbOutLen) {
-        printf("sg_test_rwbuf: wrote less (desc), ask=%d, got=%d\n", rbOutLen, res);
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
+	res = write(sg_fd, rbBuff, rbOutLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: write (desc) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (res < rbOutLen) {
+		printf("sg_test_rwbuf: wrote less (desc), ask=%d, got=%d\n",
+		       rbOutLen, res);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 
-    memset(rbBuff + OFF, 0, RB_DESC_LEN);
-    res = read(sg_fd, rbBuff, rbInLen);
-    if (res < 0) {
-        perror("sg_test_rwbuf: read (desc) error");
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
-    if (res < rbInLen) {
-        printf("sg_test_rwbuf: read less (desc), ask=%d, got=%d\n", rbInLen, res);
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
+	memset(rbBuff + OFF, 0, RB_DESC_LEN);
+	res = read(sg_fd, rbBuff, rbInLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: read (desc) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (res < rbInLen) {
+		printf("sg_test_rwbuf: read less (desc), ask=%d, got=%d\n",
+		       rbInLen, res);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 #ifdef SG_GET_RESERVED_SIZE
-    if (! sg_chk_n_print("sg_test_rwbuf: desc", rsghp->target_status,
-                         rsghp->host_status, rsghp->driver_status,
-                         rsghp->sense_buffer, SG_MAX_SENSE)) {
-        printf("sg_test_rwbuf: perhaps %s doesn't support READ BUFFER\n",
-               file_name);
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
+	if (!sg_chk_n_print("sg_test_rwbuf: desc", rsghp->target_status,
+			    rsghp->host_status, rsghp->driver_status,
+			    rsghp->sense_buffer, SG_MAX_SENSE)) {
+		printf
+		    ("sg_test_rwbuf: perhaps %s doesn't support READ BUFFER\n",
+		     file_name);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 #else
-    if ((rsghp->result != 0) || (0 != rsghp->sense_buffer[0])) {
-        printf("sg_test_rwbuf: read(desc) result=%d\n", rsghp->result);
-        if (0 != rsghp->sense_buffer[0])
-            sg_print_sense("sg_test_rwbuf: desc", rsghp->sense_buffer,
-                           SG_MAX_SENSE);
-        printf("sg_test_rwbuf: perhaps %s doesn't support READ BUFFER\n",
-               file_name);
-        if (rbBuff) free(rbBuff);
-        return 1;
-    }
+	if ((rsghp->result != 0) || (0 != rsghp->sense_buffer[0])) {
+		printf("sg_test_rwbuf: read(desc) result=%d\n", rsghp->result);
+		if (0 != rsghp->sense_buffer[0])
+			sg_print_sense("sg_test_rwbuf: desc",
+				       rsghp->sense_buffer, SG_MAX_SENSE);
+		printf
+		    ("sg_test_rwbuf: perhaps %s doesn't support READ BUFFER\n",
+		     file_name);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 #endif
-    *(buf_capacity) = ((buffp[1] << 16) | (buffp[2] << 8) | buffp[3]);
-    buf_granul = (unsigned char)buffp[0];
+	*(buf_capacity) = ((buffp[1] << 16) | (buffp[2] << 8) | buffp[3]);
+	buf_granul = (unsigned char)buffp[0];
 
-    printf("READ BUFFER reports: %02x %02x %02x %02x %02x %02x %02x %02x\n",
-	   buffp[0], buffp[1], buffp[2], buffp[3],
-	   buffp[4], buffp[5], buffp[6], buffp[7]);
+	printf("READ BUFFER reports: %02x %02x %02x %02x %02x %02x %02x %02x\n",
+	       buffp[0], buffp[1], buffp[2], buffp[3],
+	       buffp[4], buffp[5], buffp[6], buffp[7]);
 
-    printf("READ BUFFER reports: buffer capacity=%d, offset boundary=%d\n",
-           *(buf_capacity), buf_granul);
+	printf("READ BUFFER reports: buffer capacity=%d, offset boundary=%d\n",
+	       *(buf_capacity), buf_granul);
 #ifdef SG_DEF_RESERVED_SIZE
-    res = ioctl(sg_fd, SG_SET_RESERVED_SIZE, buf_capacity);
-    if (res < 0)
-        perror("sg_test_rwbuf: SG_SET_RESERVED_SIZE error");
+	res = ioctl(sg_fd, SG_SET_RESERVED_SIZE, buf_capacity);
+	if (res < 0)
+		perror("sg_test_rwbuf: SG_SET_RESERVED_SIZE error");
 #endif
-  return 0;
+	return 0;
 }
 
-int mymemcmp (unsigned char *bf1, unsigned char *bf2, int len)
+int mymemcmp(unsigned char *bf1, unsigned char *bf2, int len)
 {
 	int df;
 	for (df = 0; df < len; df++)
-		if (bf1[df] != bf2[df]) return df;
+		if (bf1[df] != bf2[df])
+			return df;
 	return 0;
 }
 
-int do_checksum (int *buf, int len, int quiet)
+int do_checksum(int *buf, int len, int quiet)
 {
 	int sum = base;
-	int i; int rln = len;
-	for (i = 0; i < len/BPI; i++)
+	int i;
+	int rln = len;
+	for (i = 0; i < len / BPI; i++)
 		sum += buf[i];
-	while (rln%BPI) sum += ((char*)buf)[--rln];
+	while (rln % BPI)
+		sum += ((char *)buf)[--rln];
 	if (sum != READWRITE_BASE_NUM) {
-		if (!quiet) printf ("sg_test_rwbuf: Checksum error (sz=%i): %08x\n",
-			len, sum);
+		if (!quiet)
+			printf("sg_test_rwbuf: Checksum error (sz=%i): %08x\n",
+			       len, sum);
 		if (cmpbuf && !quiet) {
-			int diff = mymemcmp (cmpbuf, (unsigned char*)buf, len);
-			printf ("Differ at pos %i/%i:\n", diff, len);
-			for (i = 0; i < 24 && i+diff < len; i++)
-				printf (" %02x", cmpbuf[i+diff]);
-			printf ("\n");
-			for (i = 0; i < 24 && i+diff < len; i++)
-				printf (" %02x", ((unsigned char*)buf)[i+diff]);
-			printf ("\n");
+			int diff = mymemcmp(cmpbuf, (unsigned char *)buf, len);
+			printf("Differ at pos %i/%i:\n", diff, len);
+			for (i = 0; i < 24 && i + diff < len; i++)
+				printf(" %02x", cmpbuf[i + diff]);
+			printf("\n");
+			for (i = 0; i < 24 && i + diff < len; i++)
+				printf(" %02x",
+				       ((unsigned char *)buf)[i + diff]);
+			printf("\n");
 		}
 		return 2;
-	}
-	else return 0;
+	} else
+		return 0;
 }
 
-void do_fill_buffer (int *buf, int len)
+void do_fill_buffer(int *buf, int len)
 {
 	int sum;
-	int i; int rln = len;
-	srand (time (0));
-    retry:
+	int i;
+	int rln = len;
+	srand(time(0));
+retry:
 	if (len >= BPI)
-		base = READWRITE_BASE_NUM + rand ();
+		base = READWRITE_BASE_NUM + rand();
 	else
-		base = READWRITE_BASE_NUM + (char) rand ();
+		base = READWRITE_BASE_NUM + (char)rand();
 	sum = base;
-	for (i = 0; i < len/BPI - 1; i++)
-	{
+	for (i = 0; i < len / BPI - 1; i++) {
 		/* we rely on rand() giving full range of int */
-		buf[i] = rand ();
+		buf[i] = rand();
 		sum += buf[i];
 	}
-	while (rln%BPI)
-	{
-		((char*)buf)[--rln] = rand ();
-		sum += ((char*)buf)[rln];
+	while (rln % BPI) {
+		((char *)buf)[--rln] = rand();
+		sum += ((char *)buf)[rln];
 	}
-	if (len >= BPI) buf[len/BPI - 1] = READWRITE_BASE_NUM - sum;
-	else ((char*)buf)[0] = READWRITE_BASE_NUM + ((char*)buf)[0] - sum;
-	if (do_checksum (buf, len, 1)) {
-		if (len < BPI) goto retry;
-		printf ("sg_test_rwbuf: Memory corruption?\n");
-		exit (1);
+	if (len >= BPI)
+		buf[len / BPI - 1] = READWRITE_BASE_NUM - sum;
+	else
+		((char *)buf)[0] = READWRITE_BASE_NUM + ((char *)buf)[0] - sum;
+	if (do_checksum(buf, len, 1)) {
+		if (len < BPI)
+			goto retry;
+		printf("sg_test_rwbuf: Memory corruption?\n");
+		exit(1);
 	}
-	if (cmpbuf) memcpy (cmpbuf, (char*)buf, len);
+	if (cmpbuf)
+		memcpy(cmpbuf, (char *)buf, len);
 }
 
-int read_buffer (int sg_fd, unsigned size)
+int read_buffer(int sg_fd, unsigned size)
 {
 	int res;
-	unsigned char * rbBuff = malloc(OFF + sizeof(rbCmdBlk) + size);
-	struct sg_header * rsghp = (struct sg_header *)rbBuff;
+	unsigned char *rbBuff = malloc(OFF + sizeof(rbCmdBlk) + size);
+	struct sg_header *rsghp = (struct sg_header *)rbBuff;
 
-        int rbInLen = OFF + size;
-	int rbOutLen = OFF + sizeof (rbCmdBlk);
+	int rbInLen = OFF + size;
+	int rbOutLen = OFF + sizeof(rbCmdBlk);
 	memset(rbBuff, 0, OFF + sizeof(rbCmdBlk) + size);
-        rsghp->pack_len = 0;                /* don't care */
-        rsghp->reply_len = rbInLen;
-        rsghp->twelve_byte = 0;
-        rsghp->result = 0;
-        memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
-        rbBuff[OFF + 1] = RB_MODE_DATA;
-        rbBuff[OFF + 6] = 0xff & ((size) >> 16);
-        rbBuff[OFF + 7] = 0xff & ((size) >> 8);
-        rbBuff[OFF + 8] = 0xff & (size);
+	rsghp->pack_len = 0;	/* don't care */
+	rsghp->reply_len = rbInLen;
+	rsghp->twelve_byte = 0;
+	rsghp->result = 0;
+	memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
+	rbBuff[OFF + 1] = RB_MODE_DATA;
+	rbBuff[OFF + 6] = 0xff & ((size) >> 16);
+	rbBuff[OFF + 7] = 0xff & ((size) >> 8);
+	rbBuff[OFF + 8] = 0xff & (size);
 
-        rsghp->pack_id = 2;
-        res = write(sg_fd, rbBuff, rbOutLen);
-        if (res < 0) {
-            perror("sg_test_rwbuf: write (data) error");
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
-        if (res < rbOutLen) {
-            printf("sg_test_rwbuf: wrote less (data), ask=%d, got=%d\n",
-                   rbOutLen, res);
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
+	rsghp->pack_id = 2;
+	res = write(sg_fd, rbBuff, rbOutLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: write (data) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (res < rbOutLen) {
+		printf("sg_test_rwbuf: wrote less (data), ask=%d, got=%d\n",
+		       rbOutLen, res);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 
-        res = read(sg_fd, rbBuff, rbInLen);
-        if (res < 0) {
-            perror("sg_test_rwbuf: read (data) error");
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
-        if (res < rbInLen) {
-            printf("sg_test_rwbuf: read less (data), ask=%d, got=%d\n",
-                   rbInLen, res);
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
-	res = do_checksum ((int*)(rbBuff + OFF), size, 0);
-	if (rbBuff) free(rbBuff);
+	res = read(sg_fd, rbBuff, rbInLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: read (data) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (res < rbInLen) {
+		printf("sg_test_rwbuf: read less (data), ask=%d, got=%d\n",
+		       rbInLen, res);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	res = do_checksum((int *)(rbBuff + OFF), size, 0);
+	if (rbBuff)
+		free(rbBuff);
 	return res;
 }
 
-int write_buffer (int sg_fd, unsigned size)
+int write_buffer(int sg_fd, unsigned size)
 {
 	int res;
-	unsigned char * rbBuff = malloc(OFF + sizeof(rbCmdBlk) + size);
-	struct sg_header * rsghp = (struct sg_header *)rbBuff;
+	unsigned char *rbBuff = malloc(OFF + sizeof(rbCmdBlk) + size);
+	struct sg_header *rsghp = (struct sg_header *)rbBuff;
 	//unsigned char * buffp = rbBuff + OFF;
 
-        int rbInLen = OFF;
-	int rbOutLen = OFF + sizeof (rbCmdBlk) + size;
+	int rbInLen = OFF;
+	int rbOutLen = OFF + sizeof(rbCmdBlk) + size;
 
-	do_fill_buffer ((int*)(rbBuff + OFF + sizeof(rbCmdBlk)), size);
-        rsghp->pack_len = 0;                /* don't care */
-        rsghp->reply_len = rbInLen;
-        rsghp->twelve_byte = 0;
-        rsghp->result = 0;
-        memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
+	do_fill_buffer((int *)(rbBuff + OFF + sizeof(rbCmdBlk)), size);
+	rsghp->pack_len = 0;	/* don't care */
+	rsghp->reply_len = rbInLen;
+	rsghp->twelve_byte = 0;
+	rsghp->result = 0;
+	memcpy(rbBuff + OFF, rbCmdBlk, sizeof(rbCmdBlk));
 	rbBuff[OFF + 0] = WRITE_BUFFER;
-        rbBuff[OFF + 1] = RB_MODE_DATA;
-        rbBuff[OFF + 6] = 0xff & ((size) >> 16);
-        rbBuff[OFF + 7] = 0xff & ((size) >> 8);
-        rbBuff[OFF + 8] = 0xff & (size);
+	rbBuff[OFF + 1] = RB_MODE_DATA;
+	rbBuff[OFF + 6] = 0xff & ((size) >> 16);
+	rbBuff[OFF + 7] = 0xff & ((size) >> 8);
+	rbBuff[OFF + 8] = 0xff & (size);
 
-        rsghp->pack_id = 1;
-        res = write(sg_fd, rbBuff, rbOutLen);
-        if (res < 0) {
-            perror("sg_test_rwbuf: write (data) error");
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
-        if (res < rbOutLen) {
-            printf("sg_test_rwbuf: wrote less (data), ask=%d, got=%d\n",
-                   rbOutLen, res);
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
+	rsghp->pack_id = 1;
+	res = write(sg_fd, rbBuff, rbOutLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: write (data) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (res < rbOutLen) {
+		printf("sg_test_rwbuf: wrote less (data), ask=%d, got=%d\n",
+		       rbOutLen, res);
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
 
-        res = read(sg_fd, rbBuff, rbInLen);
-        if (res < 0) {
-            perror("sg_test_rwbuf: read (status) error");
-            if (rbBuff) free(rbBuff);
-            return 1;
-        }
-	if (rbBuff) free(rbBuff);
+	res = read(sg_fd, rbBuff, rbInLen);
+	if (res < 0) {
+		perror("sg_test_rwbuf: read (status) error");
+		if (rbBuff)
+			free(rbBuff);
+		return 1;
+	}
+	if (rbBuff)
+		free(rbBuff);
 	return 0;
 }
 
-int do_scsi_read_write_buffer (char * device)
+int do_scsi_read_write_buffer(char *device)
 {
-	int sg_fd; int res, buf_capacity;
-    char * file_name = device;
+	int sg_fd;
+	int res, buf_capacity;
+	char *file_name = device;
 	struct stat a_st;
 	int block_dev = 0;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
 	sg_fd = open(file_name, O_RDWR);
 	if (sg_fd < 0) {
 		perror("sg_test_rwbuf: open error");
 		return 1;
 	}
-        if (fstat(sg_fd, &a_st) < 0) {
-                fprintf(stderr, "could do fstat() on fd ??\n");
-                close(sg_fd);
-                return 1;
-        }
-        if (S_ISBLK(a_st.st_mode))
-                block_dev = 1;
+	if (fstat(sg_fd, &a_st) < 0) {
+		fprintf(stderr, "could do fstat() on fd ??\n");
+		close(sg_fd);
+		return 1;
+	}
+	if (S_ISBLK(a_st.st_mode))
+		block_dev = 1;
 	/* Don't worry, being very careful not to write to a none-sg file ... */
-        if (block_dev || (ioctl(sg_fd, SG_GET_TIMEOUT, 0) < 0)) {
+	if (block_dev || (ioctl(sg_fd, SG_GET_TIMEOUT, 0) < 0)) {
 		/* perror("ioctl on generic device, error"); */
 		printf("sg_test_rwbuf: not a sg device, or wrong driver\n");
 		return 1;
 	}
-	if (find_out_about_buffer (sg_fd, &buf_capacity, file_name)) return 1;
+	if (find_out_about_buffer(sg_fd, &buf_capacity, file_name))
+		return 1;
 
-	cmpbuf = malloc (buf_capacity);
-	if (write_buffer (sg_fd, buf_capacity)) return 3;
-	res = read_buffer (sg_fd, buf_capacity);
-	if (res) return (res + 4);
+	cmpbuf = malloc(buf_capacity);
+	if (write_buffer(sg_fd, buf_capacity))
+		return 3;
+	res = read_buffer(sg_fd, buf_capacity);
+	if (res)
+		return (res + 4);
 
 	res = close(sg_fd);
 	if (res < 0) {
 		perror("sg_test_rwbuf: close error");
 		return 6;
 	}
-	printf ("Success\n");
+	printf("Success\n");
 	return 0;
 }
 
-int do_scsi_test_unit_ready(char * device)
+int do_scsi_test_unit_ready(char *device)
 {
-    int sg_fd, k;
-    unsigned char turCmdBlk [TUR_CMD_LEN] =
-                                {0x00, 0, 0, 0, 0, 0};
-    sg_io_hdr_t io_hdr;
-    char * file_name = device;
-    char ebuff[EBUFF_SZ];
-    unsigned char sense_buffer[32];
-    int num_turs = 10240;
-    int num_errs = 0;
-    int do_time = 1;
-    struct timeval start_tm, end_tm;
+	int sg_fd, k;
+	unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
+	sg_io_hdr_t io_hdr;
+	char *file_name = device;
+	char ebuff[EBUFF_SZ];
+	unsigned char sense_buffer[32];
+	int num_turs = 10240;
+	int num_errs = 0;
+	int do_time = 1;
+	struct timeval start_tm, end_tm;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
-        snprintf(ebuff, EBUFF_SZ,
-		 "sg_turs: error opening file: %s", file_name);
-        perror(ebuff);
-        return 1;
-    }
-    /* Just to be safe, check we have a new sg driver by trying an ioctl */
-    if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
-        printf("sg_turs: %s isn't an sg device (or the sg driver is old)\n",
-               file_name);
-        close(sg_fd);
-        return 1;
-    }
-    /* Prepare TEST UNIT READY command */
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = sizeof(turCmdBlk);
-    io_hdr.mx_sb_len = sizeof(sense_buffer);
-    io_hdr.dxfer_direction = SG_DXFER_NONE;
-    io_hdr.cmdp = turCmdBlk;
-    io_hdr.sbp = sense_buffer;
-    io_hdr.timeout = 20000;     /* 20000 millisecs == 20 seconds */
-    if (do_time) {
-	start_tm.tv_sec = 0;
-	start_tm.tv_usec = 0;
-	gettimeofday(&start_tm, NULL);
-    }
-    for (k = 0; k < num_turs; ++k) {
-        io_hdr.pack_id = k;
-        if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
-            perror("sg_turs: Test Unit Ready SG_IO ioctl error");
-            close(sg_fd);
-            return 1;
-        }
-        if (io_hdr.info & SG_INFO_OK_MASK) {
-            ++num_errs;
-	    if (1 == num_turs) {	/* then print out the error message */
-	        if (SG_ERR_CAT_CLEAN != sg_err_category3(&io_hdr))
-		    sg_chk_n_print3("tur", &io_hdr);
-	    }
+	if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
+		snprintf(ebuff, EBUFF_SZ,
+			 "sg_turs: error opening file: %s", file_name);
+		perror(ebuff);
+		return 1;
 	}
-    }
-    if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
-        struct timeval res_tm;
-        double a, b;
+	/* Just to be safe, check we have a new sg driver by trying an ioctl */
+	if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) {
+		printf
+		    ("sg_turs: %s isn't an sg device (or the sg driver is old)\n",
+		     file_name);
+		close(sg_fd);
+		return 1;
+	}
+	/* Prepare TEST UNIT READY command */
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = sizeof(turCmdBlk);
+	io_hdr.mx_sb_len = sizeof(sense_buffer);
+	io_hdr.dxfer_direction = SG_DXFER_NONE;
+	io_hdr.cmdp = turCmdBlk;
+	io_hdr.sbp = sense_buffer;
+	io_hdr.timeout = 20000;	/* 20000 millisecs == 20 seconds */
+	if (do_time) {
+		start_tm.tv_sec = 0;
+		start_tm.tv_usec = 0;
+		gettimeofday(&start_tm, NULL);
+	}
+	for (k = 0; k < num_turs; ++k) {
+		io_hdr.pack_id = k;
+		if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) {
+			perror("sg_turs: Test Unit Ready SG_IO ioctl error");
+			close(sg_fd);
+			return 1;
+		}
+		if (io_hdr.info & SG_INFO_OK_MASK) {
+			++num_errs;
+			if (1 == num_turs) {	/* then print out the error message */
+				if (SG_ERR_CAT_CLEAN !=
+				    sg_err_category3(&io_hdr))
+					sg_chk_n_print3("tur", &io_hdr);
+			}
+		}
+	}
+	if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
+		struct timeval res_tm;
+		double a, b;
 
-        gettimeofday(&end_tm, NULL);
-        res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
-        res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
-        if (res_tm.tv_usec < 0) {
-            --res_tm.tv_sec;
-            res_tm.tv_usec += 1000000;
-        }
-        a = res_tm.tv_sec;
-        a += (0.000001 * res_tm.tv_usec);
-        b = (double)num_turs;
-        printf("time to perform commands was %d.%06d secs",
-               (int)res_tm.tv_sec, (int)res_tm.tv_usec);
-        if (a > 0.00001)
-            printf("; %.2f operations/sec\n", b / a);
-        else
-            printf("\n");
-    }
+		gettimeofday(&end_tm, NULL);
+		res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
+		res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
+		if (res_tm.tv_usec < 0) {
+			--res_tm.tv_sec;
+			res_tm.tv_usec += 1000000;
+		}
+		a = res_tm.tv_sec;
+		a += (0.000001 * res_tm.tv_usec);
+		b = (double)num_turs;
+		printf("time to perform commands was %d.%06d secs",
+		       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
+		if (a > 0.00001)
+			printf("; %.2f operations/sec\n", b / a);
+		else
+			printf("\n");
+	}
 
-    printf("Completed %d Test Unit Ready commands with %d errors\n",
-            num_turs, num_errs);
-    close(sg_fd);
-  return 0;
+	printf("Completed %d Test Unit Ready commands with %d errors\n",
+	       num_turs, num_errs);
+	close(sg_fd);
+	return 0;
 }
+
 /* Returns 0 -> ok, 1 -> err, 2 -> recovered error */
-static int do_sg_io(int sg_fd, unsigned char * buff)
+static int do_sg_io(int sg_fd, unsigned char *buff)
 {
 /* N.B. Assuming buff contains pointer 'buffer' or 'buffer1' */
-    struct sg_header * sghp = (struct sg_header *)(buff - OFF);
-    int res;
+	struct sg_header *sghp = (struct sg_header *)(buff - OFF);
+	int res;
 
-    sghp->pack_len = 0;
-    sghp->reply_len = SG_HSZ + *(((int *)buff) + 1);
-    sghp->pack_id = 0;
-    sghp->twelve_byte = 0;
-    sghp->other_flags = 0;
+	sghp->pack_len = 0;
+	sghp->reply_len = SG_HSZ + *(((int *)buff) + 1);
+	sghp->pack_id = 0;
+	sghp->twelve_byte = 0;
+	sghp->other_flags = 0;
 #ifndef SG_GET_RESERVED_SIZE
-    sghp->sense_buffer[0] = 0;
+	sghp->sense_buffer[0] = 0;
 #endif
 #if 0
-    sg_print_command(buff + 8);
-    printf(" write_len=%d, read_len=%d\n",
-           SG_HSZ + sg_get_command_size(buff[8]) + *((int *)buff),
-           sghp->reply_len);
+	sg_print_command(buff + 8);
+	printf(" write_len=%d, read_len=%d\n",
+	       SG_HSZ + sg_get_command_size(buff[8]) + *((int *)buff),
+	       sghp->reply_len);
 #endif
-    res = write(sg_fd, (const void *)sghp,
-                SG_HSZ + sg_get_command_size(buff[8]) + *((int *)buff));
-    if (res < 0) {
+	res = write(sg_fd, (const void *)sghp,
+		    SG_HSZ + sg_get_command_size(buff[8]) + *((int *)buff));
+	if (res < 0) {
 #ifdef SG_IO_DEBUG
-        perror("write to sg failed");
+		perror("write to sg failed");
 #endif
-        return 1;
-    }
-    res = read(sg_fd, (void *)sghp, sghp->reply_len);
-    if (res < 0) {
+		return 1;
+	}
+	res = read(sg_fd, (void *)sghp, sghp->reply_len);
+	if (res < 0) {
 #ifdef SG_IO_DEBUG
-        perror("read from sg failed");
+		perror("read from sg failed");
 #endif
-        return 1;
-    }
+		return 1;
+	}
 #ifdef SG_GET_RESERVED_SIZE
-    res = sg_err_category(sghp->target_status, sghp->host_status,
-                          sghp->driver_status, sghp->sense_buffer,
-                          SG_MAX_SENSE);
-    switch (res) {
-    case SG_ERR_CAT_CLEAN:
-      return 0;
-    case SG_ERR_CAT_RECOVERED:
-        return 2;
-    default:
+	res = sg_err_category(sghp->target_status, sghp->host_status,
+			      sghp->driver_status, sghp->sense_buffer,
+			      SG_MAX_SENSE);
+	switch (res) {
+	case SG_ERR_CAT_CLEAN:
+		return 0;
+	case SG_ERR_CAT_RECOVERED:
+		return 2;
+	default:
 #ifdef SG_IO_DEBUG
-        sg_chk_n_print("read from sg", sghp->target_status,
-                       sghp->host_status, sghp->driver_status,
-                       sghp->sense_buffer, SG_MAX_SENSE);
+		sg_chk_n_print("read from sg", sghp->target_status,
+			       sghp->host_status, sghp->driver_status,
+			       sghp->sense_buffer, SG_MAX_SENSE);
 #endif
-        return 1;
-    }
+		return 1;
+	}
 #else
-    if (0 != sghp->sense_buffer[0]) {
+	if (0 != sghp->sense_buffer[0]) {
 #ifdef SG_IO_DEBUG
-        int k;
-        printf("read from sg, sense buffer (in hex):\n    ");
-        for (k = 0; k < 16; ++k)
-            printf("%02x ", (int)sghp->sense_buffer[k]);
-        printf("\n");
+		int k;
+		printf("read from sg, sense buffer (in hex):\n    ");
+		for (k = 0; k < 16; ++k)
+			printf("%02x ", (int)sghp->sense_buffer[k]);
+		printf("\n");
 #endif
-        return 1;
-    }
-    else if (0 != sghp->result) {
+		return 1;
+	} else if (0 != sghp->result) {
 #ifdef SG_IO_DEBUG
-        printf("read from sg, bad result=%d\n", sghp->result);
+		printf("read from sg, bad result=%d\n", sghp->result);
 #endif
-        return 1;
-    }
-    else
-      return 0;
+		return 1;
+	} else
+		return 0;
 #endif
 }
 
 static char *get_page_name(int pageno)
 {
-    if ((pageno <= 0) || (pageno >= MAX_PAGENO) || (!page_names[pageno]))
-        return "Mode";
-    return page_names[pageno];
+	if ((pageno <= 0) || (pageno >= MAX_PAGENO) || (!page_names[pageno]))
+		return "Mode";
+	return page_names[pageno];
 }
 
 static int getnbyte(unsigned char *pnt, int nbyte)
 {
-    unsigned int result;
-    int i;
-    result = 0;
-    for (i = 0; i < nbyte; i++)
-        result = (result << 8) | (pnt[i] & 0xff);
-    return result;
+	unsigned int result;
+	int i;
+	result = 0;
+	for (i = 0; i < nbyte; i++)
+		result = (result << 8) | (pnt[i] & 0xff);
+	return result;
 }
 
-static void bitfield(unsigned char *pageaddr, char * text, int mask, int shift)
+static void bitfield(unsigned char *pageaddr, char *text, int mask, int shift)
 {
-        printf("%-35s%d\n", text, (*pageaddr >> shift) & mask);
+	printf("%-35s%d\n", text, (*pageaddr >> shift) & mask);
 }
 
-static void notbitfield(unsigned char *pageaddr, char * text, int mask,
-                        int shift)
+static void notbitfield(unsigned char *pageaddr, char *text, int mask,
+			int shift)
 {
-        printf("%-35s%d\n", text, !((*pageaddr >> shift) & mask));
+	printf("%-35s%d\n", text, !((*pageaddr >> shift) & mask));
 }
 
-static void intfield(unsigned char * pageaddr, int nbytes, char * text)
+static void intfield(unsigned char *pageaddr, int nbytes, char *text)
 {
-        printf("%-35s%d\n", text, getnbyte(pageaddr, nbytes));
+	printf("%-35s%d\n", text, getnbyte(pageaddr, nbytes));
 }
 
-static void hexfield(unsigned char * pageaddr, int nbytes, char * text)
+static void hexfield(unsigned char *pageaddr, int nbytes, char *text)
 {
-        printf("%-35s0x%x\n", text, getnbyte(pageaddr, nbytes));
+	printf("%-35s0x%x\n", text, getnbyte(pageaddr, nbytes));
 }
 
-static void hexdatafield(unsigned char * pageaddr, int nbytes, char * text)
+static void hexdatafield(unsigned char *pageaddr, int nbytes, char *text)
 {
-        printf("%-35s0x", text);
-        while (nbytes-- > 0)
-            printf("%02x", *pageaddr++);
-        putchar('\n');
+	printf("%-35s0x", text);
+	while (nbytes-- > 0)
+		printf("%02x", *pageaddr++);
+	putchar('\n');
 }
 
 static int get_mode_page(int page, int page_code)
 {
-    int status, quiet;
-    unsigned char *cmd;
+	int status, quiet;
+	unsigned char *cmd;
 
-    memset(buffer, 0, SIZEOF_BUFFER);
+	memset(buffer, 0, SIZEOF_BUFFER);
 
-    quiet = page_code & ~3;
-    page_code &= 3;
+	quiet = page_code & ~3;
+	page_code &= 3;
 
-    *((int *) buffer) = 0;      /* length of input data */
-    *(((int *) buffer) + 1) = 0xff; /* length of output data */
+	*((int *)buffer) = 0;	/* length of input data */
+	*(((int *)buffer) + 1) = 0xff;	/* length of output data */
 
-    cmd = (unsigned char *) (((int *) buffer) + 2);
+	cmd = (unsigned char *)(((int *)buffer) + 2);
 
-    cmd[0] = MODE_SENSE;        /* MODE SENSE (6) */
-    cmd[1] = 0x00;              /* lun = 0, inhibitting BD makes this fail
-                                   for me */
-    cmd[2] = (page_code << 6) | page;
-    cmd[3] = 0x00;              /* (reserved) */
-    cmd[4] = (unsigned char)0xff;   /* allocation length */
-    cmd[5] = 0x00;              /* control */
+	cmd[0] = MODE_SENSE;	/* MODE SENSE (6) */
+	cmd[1] = 0x00;		/* lun = 0, inhibitting BD makes this fail
+				   for me */
+	cmd[2] = (page_code << 6) | page;
+	cmd[3] = 0x00;		/* (reserved) */
+	cmd[4] = (unsigned char)0xff;	/* allocation length */
+	cmd[5] = 0x00;		/* control */
 
-    status = do_sg_io(glob_fd, buffer);
-    if (status && (!quiet))
-        fprintf(stdout, ">>> Unable to read %s Page %02xh\n",
-                get_page_name(page), page);
-    //dump (buffer+2, 46);
-    return status;
+	status = do_sg_io(glob_fd, buffer);
+	if (status && (!quiet))
+		fprintf(stdout, ">>> Unable to read %s Page %02xh\n",
+			get_page_name(page), page);
+	//dump (buffer+2, 46);
+	return status;
 }
 
 /* Same as above, but this time with MODE_SENSE_10 */
 static int get_mode_page10(int page, int page_code)
 {
-    int status, quiet;
-    unsigned char *cmd;
+	int status, quiet;
+	unsigned char *cmd;
 
-    memset(buffer, 0, SIZEOF_BUFFER);
+	memset(buffer, 0, SIZEOF_BUFFER);
 
-    quiet = page_code & ~3;
-    page_code &= 3;
+	quiet = page_code & ~3;
+	page_code &= 3;
 
-    *((int *) buffer) = 0;      /* length of input data */
-    *(((int *) buffer) + 1) = 0xffff;   /* length of output buffer */
+	*((int *)buffer) = 0;	/* length of input data */
+	*(((int *)buffer) + 1) = 0xffff;	/* length of output buffer */
 
-    cmd = (unsigned char *) (((int *) buffer) + 2);
+	cmd = (unsigned char *)(((int *)buffer) + 2);
 
-    cmd[0] = MODE_SENSE_10;     /* MODE SENSE (10) */
-    cmd[1] = 0x00;              /* lun = 0, inhibitting BD makes this fail
-                                 for me */
-    cmd[2] = (page_code << 6) | page;
-    cmd[3] = 0x00;              /* (reserved) */
-    cmd[4] = 0x00;              /* (reserved) */
-    cmd[5] = 0x00;              /* (reserved) */
-    cmd[6] = 0x00;              /* (reserved) */
-    cmd[7] = 0xff;              /* allocation length hi */
-    cmd[8] = 0xff;              /* allocation length lo */
-    cmd[9] = 0x00;              /* control */
+	cmd[0] = MODE_SENSE_10;	/* MODE SENSE (10) */
+	cmd[1] = 0x00;		/* lun = 0, inhibitting BD makes this fail
+				   for me */
+	cmd[2] = (page_code << 6) | page;
+	cmd[3] = 0x00;		/* (reserved) */
+	cmd[4] = 0x00;		/* (reserved) */
+	cmd[5] = 0x00;		/* (reserved) */
+	cmd[6] = 0x00;		/* (reserved) */
+	cmd[7] = 0xff;		/* allocation length hi */
+	cmd[8] = 0xff;		/* allocation length lo */
+	cmd[9] = 0x00;		/* control */
 
-    status = do_sg_io(glob_fd, buffer);
-    if (status && (!quiet))
-        fprintf(stdout, ">>> Unable to read %s Page %02xh with MODESENSE(10)\n",
-                get_page_name(page), page);
-    return status;
+	status = do_sg_io(glob_fd, buffer);
+	if (status && (!quiet))
+		fprintf(stdout,
+			">>> Unable to read %s Page %02xh with MODESENSE(10)\n",
+			get_page_name(page), page);
+	return status;
 }
 
 /* Contents should point to the mode parameter header that we obtained
@@ -4911,2295 +5229,2428 @@
 
 static int read_geometry(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(4, 9);
+	SETUP_MODE_PAGE(4, 9);
 
-    printf("Data from Rigid Disk Drive Geometry Page\n");
-    printf("----------------------------------------\n");
-    intfield(pagestart + 2, 3, "Number of cylinders");
-    intfield(pagestart + 5, 1, "Number of heads");
-    intfield(pagestart + 6, 3, "Starting write precomp");
-    intfield(pagestart + 9, 3, "Starting reduced current");
-    intfield(pagestart + 12, 2, "Drive step rate");
-    intfield(pagestart + 14, 3, "Landing Zone Cylinder");
-    bitfield(pagestart + 17, "RPL", 3, 0);
-    intfield(pagestart + 18, 1, "Rotational Offset");
-    intfield(pagestart + 20, 2, "Rotational Rate");
-    printf("\n");
-  return 0;
+	printf("Data from Rigid Disk Drive Geometry Page\n");
+	printf("----------------------------------------\n");
+	intfield(pagestart + 2, 3, "Number of cylinders");
+	intfield(pagestart + 5, 1, "Number of heads");
+	intfield(pagestart + 6, 3, "Starting write precomp");
+	intfield(pagestart + 9, 3, "Starting reduced current");
+	intfield(pagestart + 12, 2, "Drive step rate");
+	intfield(pagestart + 14, 3, "Landing Zone Cylinder");
+	bitfield(pagestart + 17, "RPL", 3, 0);
+	intfield(pagestart + 18, 1, "Rotational Offset");
+	intfield(pagestart + 20, 2, "Rotational Rate");
+	printf("\n");
+	return 0;
 
 }
 
 static int read_disconnect_reconnect_data(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(2, 7);
+	SETUP_MODE_PAGE(2, 7);
 
-        printf("Data from Disconnect-Reconnect Page\n");
-        printf("-----------------------------------\n");
-    intfield(pagestart + 2, 1, "Buffer full ratio");
-    intfield(pagestart + 3, 1, "Buffer empty ratio");
-    intfield(pagestart + 4, 2, "Bus Inactivity Limit");
-    intfield(pagestart + 6, 2, "Disconnect Time Limit");
-    intfield(pagestart + 8, 2, "Connect Time Limit");
-    intfield(pagestart + 10, 2, "Maximum Burst Size");
-    hexfield(pagestart + 12, 1, "DTDC");
-        printf("\n");
-  return 0;
+	printf("Data from Disconnect-Reconnect Page\n");
+	printf("-----------------------------------\n");
+	intfield(pagestart + 2, 1, "Buffer full ratio");
+	intfield(pagestart + 3, 1, "Buffer empty ratio");
+	intfield(pagestart + 4, 2, "Bus Inactivity Limit");
+	intfield(pagestart + 6, 2, "Disconnect Time Limit");
+	intfield(pagestart + 8, 2, "Connect Time Limit");
+	intfield(pagestart + 10, 2, "Maximum Burst Size");
+	hexfield(pagestart + 12, 1, "DTDC");
+	printf("\n");
+	return 0;
 
 }
 
 static int read_control_page(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(10, 9);
+	SETUP_MODE_PAGE(10, 9);
 
-        printf("Data from Control Page\n");
-        printf("----------------------\n");
-    bitfield(pagestart + 2, "RLEC", 1, 0);
-    bitfield(pagestart + 3, "QErr", 1, 1);
-    bitfield(pagestart + 3, "DQue", 1, 0);
-    bitfield(pagestart + 4, "EECA", 1, 7);
-    bitfield(pagestart + 4, "RAENP", 1, 2);
-    bitfield(pagestart + 4, "UUAENP", 1, 1);
-    bitfield(pagestart + 4, "EAENP", 1, 0);
-    bitfield(pagestart + 3, "Queue Algorithm Modifier", 0xf, 4);
-    intfield(pagestart + 6, 2, "Ready AEN Holdoff Period");
-        printf("\n");
-  return 0;
+	printf("Data from Control Page\n");
+	printf("----------------------\n");
+	bitfield(pagestart + 2, "RLEC", 1, 0);
+	bitfield(pagestart + 3, "QErr", 1, 1);
+	bitfield(pagestart + 3, "DQue", 1, 0);
+	bitfield(pagestart + 4, "EECA", 1, 7);
+	bitfield(pagestart + 4, "RAENP", 1, 2);
+	bitfield(pagestart + 4, "UUAENP", 1, 1);
+	bitfield(pagestart + 4, "EAENP", 1, 0);
+	bitfield(pagestart + 3, "Queue Algorithm Modifier", 0xf, 4);
+	intfield(pagestart + 6, 2, "Ready AEN Holdoff Period");
+	printf("\n");
+	return 0;
 
 }
 
 static int error_recovery_page(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(1, 14);
-        printf("Data from Error Recovery Page\n");
-        printf("-----------------------------\n");
-    bitfield(pagestart + 2, "AWRE", 1, 7);
-    bitfield(pagestart + 2, "ARRE", 1, 6);
-    bitfield(pagestart + 2, "TB", 1, 5);
-    bitfield(pagestart + 2, "RC", 1, 4);
-    bitfield(pagestart + 2, "EER", 1, 3);
-    bitfield(pagestart + 2, "PER", 1, 2);
-    bitfield(pagestart + 2, "DTE", 1, 1);
-    bitfield(pagestart + 2, "DCR", 1, 0);
-    intfield(pagestart + 3, 1, "Read Retry Count");
-    intfield(pagestart + 4, 1, "Correction Span");
-    intfield(pagestart + 5, 1, "Head Offset Count");
-    intfield(pagestart + 6, 1, "Data Strobe Offset Count");
-    intfield(pagestart + 8, 1, "Write Retry Count");
-    intfield(pagestart + 10, 2, "Recovery Time Limit");
-        printf("\n");
-  return 0;
+	SETUP_MODE_PAGE(1, 14);
+	printf("Data from Error Recovery Page\n");
+	printf("-----------------------------\n");
+	bitfield(pagestart + 2, "AWRE", 1, 7);
+	bitfield(pagestart + 2, "ARRE", 1, 6);
+	bitfield(pagestart + 2, "TB", 1, 5);
+	bitfield(pagestart + 2, "RC", 1, 4);
+	bitfield(pagestart + 2, "EER", 1, 3);
+	bitfield(pagestart + 2, "PER", 1, 2);
+	bitfield(pagestart + 2, "DTE", 1, 1);
+	bitfield(pagestart + 2, "DCR", 1, 0);
+	intfield(pagestart + 3, 1, "Read Retry Count");
+	intfield(pagestart + 4, 1, "Correction Span");
+	intfield(pagestart + 5, 1, "Head Offset Count");
+	intfield(pagestart + 6, 1, "Data Strobe Offset Count");
+	intfield(pagestart + 8, 1, "Write Retry Count");
+	intfield(pagestart + 10, 2, "Recovery Time Limit");
+	printf("\n");
+	return 0;
 }
 
 static int notch_parameters_page(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(0xc, 7);
+	SETUP_MODE_PAGE(0xc, 7);
 
-        printf("Data from Notch Parameters Page\n");
-        printf("-------------------------------\n");
-    bitfield(pagestart + 2, "Notched Drive", 1, 7);
-    bitfield(pagestart + 2, "Logical or Physical Notch", 1, 6);
-    intfield(pagestart + 4, 2, "Max # of notches");
-    intfield(pagestart + 6, 2, "Active Notch");
-    if (pagestart[2] & 0x40) {
-        intfield(pagestart + 8, 4, "Starting Boundary");
-        intfield(pagestart + 12, 4, "Ending Boundary");
-    } else {           /* Hex is more meaningful for physical notches */
-        hexfield(pagestart + 8, 4, "Starting Boundary");
-        hexfield(pagestart + 12, 4, "Ending Boundary");
-    }
+	printf("Data from Notch Parameters Page\n");
+	printf("-------------------------------\n");
+	bitfield(pagestart + 2, "Notched Drive", 1, 7);
+	bitfield(pagestart + 2, "Logical or Physical Notch", 1, 6);
+	intfield(pagestart + 4, 2, "Max # of notches");
+	intfield(pagestart + 6, 2, "Active Notch");
+	if (pagestart[2] & 0x40) {
+		intfield(pagestart + 8, 4, "Starting Boundary");
+		intfield(pagestart + 12, 4, "Ending Boundary");
+	} else {		/* Hex is more meaningful for physical notches */
+		hexfield(pagestart + 8, 4, "Starting Boundary");
+		hexfield(pagestart + 12, 4, "Ending Boundary");
+	}
 
-            printf("0x%8.8x%8.8x", getnbyte(pagestart + 16, 4),
-                   getnbyte(pagestart + 20, 4));
+	printf("0x%8.8x%8.8x", getnbyte(pagestart + 16, 4),
+	       getnbyte(pagestart + 20, 4));
 
-        printf("\n");
-  return 0;
+	printf("\n");
+	return 0;
 }
 
-static char *formatname(int format) {
-    switch(format) {
-        case 0x0: return "logical blocks";
-        case 0x4: return "bytes from index [Cyl:Head:Off]\n"
-        "Offset -1 marks whole track as bad.\n";
-        case 0x5: return "physical blocks [Cyl:Head:Sect]\n"
-        "Sector -1 marks whole track as bad.\n";
-    }
-    return "Weird, unknown format";
+static char *formatname(int format)
+{
+	switch (format) {
+	case 0x0:
+		return "logical blocks";
+	case 0x4:
+		return "bytes from index [Cyl:Head:Off]\n"
+		    "Offset -1 marks whole track as bad.\n";
+	case 0x5:
+		return "physical blocks [Cyl:Head:Sect]\n"
+		    "Sector -1 marks whole track as bad.\n";
+	}
+	return "Weird, unknown format";
 }
 
 static int read_defect_list(int page_code)
 {
-    int status = 0, i, len, reallen, table, k;
-    unsigned char *cmd, *df = 0; int trunc;
+	int status = 0, i, len, reallen, table, k;
+	unsigned char *cmd, *df = 0;
+	int trunc;
 
-    printf("Data from Defect Lists\n"
-           "----------------------\n");
-    for (table = 0; table < 2; table++) {
-        memset(buffer, 0, SIZEOF_BUFFER);
-	trunc = 0;
+	printf("Data from Defect Lists\n" "----------------------\n");
+	for (table = 0; table < 2; table++) {
+		memset(buffer, 0, SIZEOF_BUFFER);
+		trunc = 0;
 
-        *((int *) buffer) = 0;  /* length of input data */
-        *(((int *) buffer) + 1) = 4;          /* length of output buffer */
+		*((int *)buffer) = 0;	/* length of input data */
+		*(((int *)buffer) + 1) = 4;	/* length of output buffer */
 
-        cmd = (unsigned char *) (((int *) buffer) + 2);
+		cmd = (unsigned char *)(((int *)buffer) + 2);
 
-        cmd[0] = 0x37;          /* READ DEFECT DATA */
-        cmd[1] = 0x00;          /* lun=0 */
-        cmd[2] = (table ? 0x08 : 0x10) | defectformat;  /*  List, Format */
-        cmd[3] = 0x00;          /* (reserved) */
-        cmd[4] = 0x00;          /* (reserved) */
-        cmd[5] = 0x00;          /* (reserved) */
-        cmd[6] = 0x00;          /* (reserved) */
-        cmd[7] = 0x00;          /* Alloc len */
-        cmd[8] = 0x04;          /* Alloc len */
-        cmd[9] = 0x00;          /* control */
+		cmd[0] = 0x37;	/* READ DEFECT DATA */
+		cmd[1] = 0x00;	/* lun=0 */
+		cmd[2] = (table ? 0x08 : 0x10) | defectformat;	/*  List, Format */
+		cmd[3] = 0x00;	/* (reserved) */
+		cmd[4] = 0x00;	/* (reserved) */
+		cmd[5] = 0x00;	/* (reserved) */
+		cmd[6] = 0x00;	/* (reserved) */
+		cmd[7] = 0x00;	/* Alloc len */
+		cmd[8] = 0x04;	/* Alloc len */
+		cmd[9] = 0x00;	/* control */
 
-        i = do_sg_io(glob_fd, buffer);
-        if (2 == i)
-            i = 0; /* Recovered error, probably returned a different
-                      format */
-        if (i) {
-            fprintf(stdout, ">>> Unable to read %s defect data.\n",
-                            (table ? "grown" : "manufacturer"));
-            status |= i;
-            continue;
-        }
-        len = (buffer[10] << 8) | buffer[11];
-	reallen = len;
-        if (len > 0) {
-	    if (len >= 0xfff8) {
-		len = SIZEOF_BUFFER - 8;
-		k = len + 8;            /* length of defect list */
-		*((int *) buffer) = 0;  /* length of input data */
-		*(((int *) buffer) + 1) = k;        /* length of output buffer */
-		((struct sg_header*)buffer)->twelve_byte = 1;
-		cmd[0] = 0xB7;          /* READ DEFECT DATA */
-		cmd[1] = (table ? 0x08 : 0x10) | defectformat;/*  List, Format */
-		cmd[2] = 0x00;          /* (reserved) */
-		cmd[3] = 0x00;          /* (reserved) */
-		cmd[4] = 0x00;          /* (reserved) */
-		cmd[5] = 0x00;          /* (reserved) */
-		cmd[6] = 0x00;          /* Alloc len */
-		cmd[7] = (k >> 16);     /* Alloc len */
-		cmd[8] = (k >> 8);      /* Alloc len */
-		cmd[9] = (k & 0xff);    /* Alloc len */
-		cmd[10] = 0x00;         /* reserved */
-		cmd[11] = 0x00;         /* control */
-		i = do_sg_io(glob_fd, buffer); if (i == 2) i = 0;
-		if (i) goto trytenbyte;
-		reallen = (buffer[12] << 24 | buffer[13] << 16 | buffer[14] << 8 | buffer[15]);
-		len = reallen;
-		if (len > SIZEOF_BUFFER - 8) { len = SIZEOF_BUFFER - 8; trunc = 1; }
-		df = (unsigned char *) (buffer + 16);
-	    }
-	    else {
-trytenbyte:
-		if (len > 0xfff8) { len = 0xfff8; trunc = 1; }
-		k = len + 4;            /* length of defect list */
-		*((int *) buffer) = 0;  /* length of input data */
-		*(((int *) buffer) + 1) = k;        /* length of output buffer */
-		cmd[0] = 0x37;          /* READ DEFECT DATA */
-		cmd[1] = 0x00;          /* lun=0 */
-		cmd[2] = (table ? 0x08 : 0x10) | defectformat;/*  List, Format */
-		cmd[3] = 0x00;          /* (reserved) */
-		cmd[4] = 0x00;          /* (reserved) */
-		cmd[5] = 0x00;          /* (reserved) */
-		cmd[6] = 0x00;          /* (reserved) */
-		cmd[7] = (k >> 8);      /* Alloc len */
-		cmd[8] = (k & 0xff);    /* Alloc len */
-		cmd[9] = 0x00;          /* control */
 		i = do_sg_io(glob_fd, buffer);
-		df = (unsigned char *) (buffer + 12);
-	    }
-        }
-        if (2 == i)
-            i = 0; /* Recovered error, probably returned a different
-                      format */
-        if (i) {
-            fprintf(stdout, ">>> Unable to read %s defect data.\n",
-                            (table ? "grown" : "manufacturer"));
-            status |= i;
-            continue;
-        }
-        else {
-            if (table && !status)
-                printf("\n");
-            printf("%d entries (%d bytes) in %s table.\n"
-                   "Format (%x) is: %s\n", reallen / ((buffer[9] & 7) ? 8 : 4), reallen,
-                   (table ? "grown" : "manufacturer"),
-                   buffer[9] & 7,
-		   formatname(buffer[9] & 7));
-            i = 0;
-            if ((buffer[9] & 7) == 4) {
-                while (len > 0) {
-                    snprintf((char *)buffer, 40, "%6d:%3u:%8d", getnbyte(df, 3),
-                             df[3], getnbyte(df + 4, 4));
-                    printf("%19s", (char *)buffer);
-                    len -= 8;
-                    df += 8;
-                    i++;
-                    if (i >= 4) {
-                        printf("\n");
-                        i = 0;
-                    }
-		    else printf("|");
-                }
-            } else if ((buffer[9] & 7) == 5) {
-                while (len > 0) {
-                    snprintf((char *)buffer, 40, "%6d:%2u:%5d", getnbyte(df, 3),
-                             df[3], getnbyte(df + 4, 4));
-                    printf("%15s", (char *)buffer);
-                    len -= 8;
-                    df += 8;
-                    i++;
-                    if (i >= 5) {
-                        printf("\n");
-                        i = 0;
-                    }
-		    else printf("|");
-                }
-	    }
-	    else {
-                while (len > 0) {
-                    printf("%10d", getnbyte(df, 4));
-                    len -= 4;
-                    df += 4;
-                    i++;
-                    if (i >= 7) {
-                        printf("\n");
-                        i = 0;
-                    }
-		    else
-			printf("|");
-                }
-            }
-            if (i)
-                printf("\n");
-        }
-	if (trunc)
-		printf("[truncated]\n");
-    }
-    printf("\n");
-    return status;
+		if (2 == i)
+			i = 0;	/* Recovered error, probably returned a different
+				   format */
+		if (i) {
+			fprintf(stdout, ">>> Unable to read %s defect data.\n",
+				(table ? "grown" : "manufacturer"));
+			status |= i;
+			continue;
+		}
+		len = (buffer[10] << 8) | buffer[11];
+		reallen = len;
+		if (len > 0) {
+			if (len >= 0xfff8) {
+				len = SIZEOF_BUFFER - 8;
+				k = len + 8;	/* length of defect list */
+				*((int *)buffer) = 0;	/* length of input data */
+				*(((int *)buffer) + 1) = k;	/* length of output buffer */
+				((struct sg_header *)buffer)->twelve_byte = 1;
+				cmd[0] = 0xB7;	/* READ DEFECT DATA */
+				cmd[1] = (table ? 0x08 : 0x10) | defectformat;	/*  List, Format */
+				cmd[2] = 0x00;	/* (reserved) */
+				cmd[3] = 0x00;	/* (reserved) */
+				cmd[4] = 0x00;	/* (reserved) */
+				cmd[5] = 0x00;	/* (reserved) */
+				cmd[6] = 0x00;	/* Alloc len */
+				cmd[7] = (k >> 16);	/* Alloc len */
+				cmd[8] = (k >> 8);	/* Alloc len */
+				cmd[9] = (k & 0xff);	/* Alloc len */
+				cmd[10] = 0x00;	/* reserved */
+				cmd[11] = 0x00;	/* control */
+				i = do_sg_io(glob_fd, buffer);
+				if (i == 2)
+					i = 0;
+				if (i)
+					goto trytenbyte;
+				reallen =
+				    (buffer[12] << 24 | buffer[13] << 16 |
+				     buffer[14] << 8 | buffer[15]);
+				len = reallen;
+				if (len > SIZEOF_BUFFER - 8) {
+					len = SIZEOF_BUFFER - 8;
+					trunc = 1;
+				}
+				df = (unsigned char *)(buffer + 16);
+			} else {
+trytenbyte:
+				if (len > 0xfff8) {
+					len = 0xfff8;
+					trunc = 1;
+				}
+				k = len + 4;	/* length of defect list */
+				*((int *)buffer) = 0;	/* length of input data */
+				*(((int *)buffer) + 1) = k;	/* length of output buffer */
+				cmd[0] = 0x37;	/* READ DEFECT DATA */
+				cmd[1] = 0x00;	/* lun=0 */
+				cmd[2] = (table ? 0x08 : 0x10) | defectformat;	/*  List, Format */
+				cmd[3] = 0x00;	/* (reserved) */
+				cmd[4] = 0x00;	/* (reserved) */
+				cmd[5] = 0x00;	/* (reserved) */
+				cmd[6] = 0x00;	/* (reserved) */
+				cmd[7] = (k >> 8);	/* Alloc len */
+				cmd[8] = (k & 0xff);	/* Alloc len */
+				cmd[9] = 0x00;	/* control */
+				i = do_sg_io(glob_fd, buffer);
+				df = (unsigned char *)(buffer + 12);
+			}
+		}
+		if (2 == i)
+			i = 0;	/* Recovered error, probably returned a different
+				   format */
+		if (i) {
+			fprintf(stdout, ">>> Unable to read %s defect data.\n",
+				(table ? "grown" : "manufacturer"));
+			status |= i;
+			continue;
+		} else {
+			if (table && !status)
+				printf("\n");
+			printf("%d entries (%d bytes) in %s table.\n"
+			       "Format (%x) is: %s\n",
+			       reallen / ((buffer[9] & 7) ? 8 : 4), reallen,
+			       (table ? "grown" : "manufacturer"),
+			       buffer[9] & 7, formatname(buffer[9] & 7));
+			i = 0;
+			if ((buffer[9] & 7) == 4) {
+				while (len > 0) {
+					snprintf((char *)buffer, 40,
+						 "%6d:%3u:%8d", getnbyte(df, 3),
+						 df[3], getnbyte(df + 4, 4));
+					printf("%19s", (char *)buffer);
+					len -= 8;
+					df += 8;
+					i++;
+					if (i >= 4) {
+						printf("\n");
+						i = 0;
+					} else
+						printf("|");
+				}
+			} else if ((buffer[9] & 7) == 5) {
+				while (len > 0) {
+					snprintf((char *)buffer, 40,
+						 "%6d:%2u:%5d", getnbyte(df, 3),
+						 df[3], getnbyte(df + 4, 4));
+					printf("%15s", (char *)buffer);
+					len -= 8;
+					df += 8;
+					i++;
+					if (i >= 5) {
+						printf("\n");
+						i = 0;
+					} else
+						printf("|");
+				}
+			} else {
+				while (len > 0) {
+					printf("%10d", getnbyte(df, 4));
+					len -= 4;
+					df += 4;
+					i++;
+					if (i >= 7) {
+						printf("\n");
+						i = 0;
+					} else
+						printf("|");
+				}
+			}
+			if (i)
+				printf("\n");
+		}
+		if (trunc)
+			printf("[truncated]\n");
+	}
+	printf("\n");
+	return status;
 }
 
 static int read_cache(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(8, 9);
+	SETUP_MODE_PAGE(8, 9);
 
-        printf("Data from Caching Page\n");
-        printf("----------------------\n");
-    bitfield(pagestart + 2, "Write Cache", 1, 2);
-    notbitfield(pagestart + 2, "Read Cache", 1, 0);
-    bitfield(pagestart + 2, "Prefetch units", 1, 1);
-    bitfield(pagestart + 3, "Demand Read Retention Priority", 0xf, 4);
-    bitfield(pagestart + 3, "Demand Write Retention Priority", 0xf, 0);
-    intfield(pagestart + 4, 2, "Disable Pre-fetch Transfer Length");
-    intfield(pagestart + 6, 2, "Minimum Pre-fetch");
-    intfield(pagestart + 8, 2, "Maximum Pre-fetch");
-    intfield(pagestart + 10, 2, "Maximum Pre-fetch Ceiling");
-        printf("\n");
-  return 0;
+	printf("Data from Caching Page\n");
+	printf("----------------------\n");
+	bitfield(pagestart + 2, "Write Cache", 1, 2);
+	notbitfield(pagestart + 2, "Read Cache", 1, 0);
+	bitfield(pagestart + 2, "Prefetch units", 1, 1);
+	bitfield(pagestart + 3, "Demand Read Retention Priority", 0xf, 4);
+	bitfield(pagestart + 3, "Demand Write Retention Priority", 0xf, 0);
+	intfield(pagestart + 4, 2, "Disable Pre-fetch Transfer Length");
+	intfield(pagestart + 6, 2, "Minimum Pre-fetch");
+	intfield(pagestart + 8, 2, "Maximum Pre-fetch");
+	intfield(pagestart + 10, 2, "Maximum Pre-fetch Ceiling");
+	printf("\n");
+	return 0;
 }
 
 static int read_format_info(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(3, 13);
+	SETUP_MODE_PAGE(3, 13);
 
-        printf("Data from Format Device Page\n");
-        printf("----------------------------\n");
-    bitfield(pagestart + 20, "Removable Medium", 1, 5);
-    bitfield(pagestart + 20, "Supports Hard Sectoring", 1, 6);
-    bitfield(pagestart + 20, "Supports Soft Sectoring", 1, 7);
-    bitfield(pagestart + 20, "Addresses assigned by surface", 1, 4);
-    intfield(pagestart + 2, 2, "Tracks per Zone");
-    intfield(pagestart + 4, 2, "Alternate sectors per zone");
-    intfield(pagestart + 6, 2, "Alternate tracks per zone");
-    intfield(pagestart + 8, 2, "Alternate tracks per lun");
-    intfield(pagestart + 10, 2, "Sectors per track");
-    intfield(pagestart + 12, 2, "Bytes per sector");
-    intfield(pagestart + 14, 2, "Interleave");
-    intfield(pagestart + 16, 2, "Track skew factor");
-    intfield(pagestart + 18, 2, "Cylinder skew factor");
-        printf("\n");
-  return 0;
+	printf("Data from Format Device Page\n");
+	printf("----------------------------\n");
+	bitfield(pagestart + 20, "Removable Medium", 1, 5);
+	bitfield(pagestart + 20, "Supports Hard Sectoring", 1, 6);
+	bitfield(pagestart + 20, "Supports Soft Sectoring", 1, 7);
+	bitfield(pagestart + 20, "Addresses assigned by surface", 1, 4);
+	intfield(pagestart + 2, 2, "Tracks per Zone");
+	intfield(pagestart + 4, 2, "Alternate sectors per zone");
+	intfield(pagestart + 6, 2, "Alternate tracks per zone");
+	intfield(pagestart + 8, 2, "Alternate tracks per lun");
+	intfield(pagestart + 10, 2, "Sectors per track");
+	intfield(pagestart + 12, 2, "Bytes per sector");
+	intfield(pagestart + 14, 2, "Interleave");
+	intfield(pagestart + 16, 2, "Track skew factor");
+	intfield(pagestart + 18, 2, "Cylinder skew factor");
+	printf("\n");
+	return 0;
 
 }
 
 static int verify_error_recovery(int page_code)
 {
-    int status;
-    int bdlen;
-    unsigned char *pagestart;
+	int status;
+	int bdlen;
+	unsigned char *pagestart;
 
-    SETUP_MODE_PAGE(7, 7);
+	SETUP_MODE_PAGE(7, 7);
 
-        printf("Data from Verify Error Recovery Page\n");
-        printf("------------------------------------\n");
-    bitfield(pagestart + 2, "EER", 1, 3);
-    bitfield(pagestart + 2, "PER", 1, 2);
-    bitfield(pagestart + 2, "DTE", 1, 1);
-    bitfield(pagestart + 2, "DCR", 1, 0);
-    intfield(pagestart + 3, 1, "Verify Retry Count");
-    intfield(pagestart + 4, 1, "Verify Correction Span (bits)");
-    intfield(pagestart + 10, 2, "Verify Recovery Time Limit (ms)");
+	printf("Data from Verify Error Recovery Page\n");
+	printf("------------------------------------\n");
+	bitfield(pagestart + 2, "EER", 1, 3);
+	bitfield(pagestart + 2, "PER", 1, 2);
+	bitfield(pagestart + 2, "DTE", 1, 1);
+	bitfield(pagestart + 2, "DCR", 1, 0);
+	intfield(pagestart + 3, 1, "Verify Retry Count");
+	intfield(pagestart + 4, 1, "Verify Correction Span (bits)");
+	intfield(pagestart + 10, 2, "Verify Recovery Time Limit (ms)");
 
-        printf("\n");
-  return 0;
+	printf("\n");
+	return 0;
 }
 
 static int peripheral_device_page(int page_code)
 {
-    static char *idents[] =
-    {
-        "X3.131: Small Computer System Interface",
-        "X3.91M-1987: Storage Module Interface",
-        "X3.170: Enhanced Small Device Interface",
-        "X3.130-1986; X3T9.3/87-002: IPI-2",
-        "X3.132-1987; X3.147-1988: IPI-3"
-    };
-    int status;
-    int bdlen;
-    unsigned ident;
-    unsigned char *pagestart;
-    char *name;
+	static char *idents[] = {
+		"X3.131: Small Computer System Interface",
+		"X3.91M-1987: Storage Module Interface",
+		"X3.170: Enhanced Small Device Interface",
+		"X3.130-1986; X3T9.3/87-002: IPI-2",
+		"X3.132-1987; X3.147-1988: IPI-3"
+	};
+	int status;
+	int bdlen;
+	unsigned ident;
+	unsigned char *pagestart;
+	char *name;
 
-    SETUP_MODE_PAGE(9, 2);
+	SETUP_MODE_PAGE(9, 2);
 
-        printf("Data from Peripheral Device Page\n");
-        printf("--------------------------------\n");
+	printf("Data from Peripheral Device Page\n");
+	printf("--------------------------------\n");
 
-    ident = getnbyte(pagestart + 2, 2);
-    if (ident < (sizeof(idents) / sizeof(char *)))
-         name = idents[ident];
-    else if (ident < 0x8000)
-        name = "Reserved";
-    else
-        name = "Vendor Specific";
+	ident = getnbyte(pagestart + 2, 2);
+	if (ident < (sizeof(idents) / sizeof(char *)))
+		name = idents[ident];
+	else if (ident < 0x8000)
+		name = "Reserved";
+	else
+		name = "Vendor Specific";
 
-    bdlen = pagestart[1] - 6;
-    if (bdlen < 0)
-        bdlen = 0;
-    else
-        SETUP_MODE_PAGE(9, 2);
+	bdlen = pagestart[1] - 6;
+	if (bdlen < 0)
+		bdlen = 0;
+	else
+		SETUP_MODE_PAGE(9, 2);
 
-    hexfield(pagestart + 2, 2, "Interface Identifier");
-        for (ident = 0; ident < 35; ident++)
-            putchar(' ');
-        puts(name);
+	hexfield(pagestart + 2, 2, "Interface Identifier");
+	for (ident = 0; ident < 35; ident++)
+		putchar(' ');
+	puts(name);
 
-    hexdatafield(pagestart + 8, bdlen, "Vendor Specific Data");
+	hexdatafield(pagestart + 8, bdlen, "Vendor Specific Data");
 
-        printf("\n");
-  return 0;
+	printf("\n");
+	return 0;
 }
+
 /*  end  */
 
 static int do_user_page(int page_code, int page_no)
 {
-    int status;
-    int bdlen; int i;
-    //unsigned ident;
-    unsigned char *pagestart;
-    char *name;
+	int status;
+	int bdlen;
+	int i;
+	//unsigned ident;
+	unsigned char *pagestart;
+	char *name;
 
-    SETUP_MODE_PAGE(page_no, 0);
-    //printf ("Page 0x%02x len: %i\n", page_code, pagestart[1]);
+	SETUP_MODE_PAGE(page_no, 0);
+	//printf ("Page 0x%02x len: %i\n", page_code, pagestart[1]);
 
-    name = "Vendor specific";
-    for (i = 2; i < pagestart[1]+2; i++)
-    {
-       char nm[8]; snprintf (nm, 8, "%02x", i);
-       hexdatafield (pagestart + i, 1, nm);
-    }
+	name = "Vendor specific";
+	for (i = 2; i < pagestart[1] + 2; i++) {
+		char nm[8];
+		snprintf(nm, 8, "%02x", i);
+		hexdatafield(pagestart + i, 1, nm);
+	}
 
-        printf("\n");
-        puts(name);
-  return 0;
+	printf("\n");
+	puts(name);
+	return 0;
 }
+
 /*  end  */
 
 static int do_scsi_info_inquiry(int page_code)
 {
-    int status, i, x_interface = 0;
-    unsigned char *cmd;
-    unsigned char *pagestart;
-    unsigned char tmp;
+	int status, i, x_interface = 0;
+	unsigned char *cmd;
+	unsigned char *pagestart;
+	unsigned char tmp;
 
-    for (i = 0; i < 1024; i++) {
-        buffer[i] = 0;
-    }
+	for (i = 0; i < 1024; i++) {
+		buffer[i] = 0;
+	}
 
-    *((int *) buffer) = 0;      /* length of input data */
-    *(((int *) buffer) + 1) = 36;     /* length of output buffer */
+	*((int *)buffer) = 0;	/* length of input data */
+	*(((int *)buffer) + 1) = 36;	/* length of output buffer */
 
-    cmd = (unsigned char *) (((int *) buffer) + 2);
+	cmd = (unsigned char *)(((int *)buffer) + 2);
 
-    cmd[0] = 0x12;              /* INQUIRY */
-    cmd[1] = 0x00;              /* lun=0, evpd=0 */
-    cmd[2] = 0x00;              /* page code = 0 */
-    cmd[3] = 0x00;              /* (reserved) */
-    cmd[4] = 0x24;              /* allocation length */
-    cmd[5] = 0x00;              /* control */
+	cmd[0] = 0x12;		/* INQUIRY */
+	cmd[1] = 0x00;		/* lun=0, evpd=0 */
+	cmd[2] = 0x00;		/* page code = 0 */
+	cmd[3] = 0x00;		/* (reserved) */
+	cmd[4] = 0x24;		/* allocation length */
+	cmd[5] = 0x00;		/* control */
 
-    status = do_sg_io(glob_fd, buffer);
-    if (status) {
-        printf("Error doing INQUIRY (1)");
-        return status;
-    }
+	status = do_sg_io(glob_fd, buffer);
+	if (status) {
+		printf("Error doing INQUIRY (1)");
+		return status;
+	}
 
-    pagestart = buffer + 8;
+	pagestart = buffer + 8;
 
-        printf("Inquiry command\n");
-        printf("---------------\n");
-    bitfield(pagestart + 7, "Relative Address", 1, 7);
-    bitfield(pagestart + 7, "Wide bus 32", 1, 6);
-    bitfield(pagestart + 7, "Wide bus 16", 1, 5);
-    bitfield(pagestart + 7, "Synchronous neg.", 1, 4);
-    bitfield(pagestart + 7, "Linked Commands", 1, 3);
-    bitfield(pagestart + 7, "Command Queueing", 1, 1);
-    bitfield(pagestart + 7, "SftRe", 1, 0);
-    bitfield(pagestart + 0, "Device Type", 0x1f, 0);
-    bitfield(pagestart + 0, "Peripheral Qualifier", 0x7, 5);
-    bitfield(pagestart + 1, "Removable?", 1, 7);
-    bitfield(pagestart + 1, "Device Type Modifier", 0x7f, 0);
-    bitfield(pagestart + 2, "ISO Version", 3, 6);
-    bitfield(pagestart + 2, "ECMA Version", 7, 3);
-    bitfield(pagestart + 2, "ANSI Version", 7, 0);
-    bitfield(pagestart + 3, "AENC", 1, 7);
-    bitfield(pagestart + 3, "TrmIOP", 1, 6);
-    bitfield(pagestart + 3, "Response Data Format", 0xf, 0);
-    tmp = pagestart[16];
-    pagestart[16] = 0;
-    printf("%s%s\n", (!x_interface ? "Vendor:                    " : ""),
-           pagestart + 8);
-    pagestart[16] = tmp;
+	printf("Inquiry command\n");
+	printf("---------------\n");
+	bitfield(pagestart + 7, "Relative Address", 1, 7);
+	bitfield(pagestart + 7, "Wide bus 32", 1, 6);
+	bitfield(pagestart + 7, "Wide bus 16", 1, 5);
+	bitfield(pagestart + 7, "Synchronous neg.", 1, 4);
+	bitfield(pagestart + 7, "Linked Commands", 1, 3);
+	bitfield(pagestart + 7, "Command Queueing", 1, 1);
+	bitfield(pagestart + 7, "SftRe", 1, 0);
+	bitfield(pagestart + 0, "Device Type", 0x1f, 0);
+	bitfield(pagestart + 0, "Peripheral Qualifier", 0x7, 5);
+	bitfield(pagestart + 1, "Removable?", 1, 7);
+	bitfield(pagestart + 1, "Device Type Modifier", 0x7f, 0);
+	bitfield(pagestart + 2, "ISO Version", 3, 6);
+	bitfield(pagestart + 2, "ECMA Version", 7, 3);
+	bitfield(pagestart + 2, "ANSI Version", 7, 0);
+	bitfield(pagestart + 3, "AENC", 1, 7);
+	bitfield(pagestart + 3, "TrmIOP", 1, 6);
+	bitfield(pagestart + 3, "Response Data Format", 0xf, 0);
+	tmp = pagestart[16];
+	pagestart[16] = 0;
+	printf("%s%s\n", (!x_interface ? "Vendor:                    " : ""),
+	       pagestart + 8);
+	pagestart[16] = tmp;
 
-    tmp = pagestart[32];
-    pagestart[32] = 0;
-    printf("%s%s\n", (!x_interface ? "Product:                   " : ""),
-           pagestart + 16);
-    pagestart[32] = tmp;
+	tmp = pagestart[32];
+	pagestart[32] = 0;
+	printf("%s%s\n", (!x_interface ? "Product:                   " : ""),
+	       pagestart + 16);
+	pagestart[32] = tmp;
 
-    printf("%s%s\n", (!x_interface ? "Revision level:            " : ""),
-           pagestart + 32);
+	printf("%s%s\n", (!x_interface ? "Revision level:            " : ""),
+	       pagestart + 32);
 
-    printf("\n");
-    return status;
+	printf("\n");
+	return status;
 
 }
 
 static int do_serial_number(int page_code)
 {
-    int status, i, pagelen;
-    unsigned char *cmd;
-    unsigned char *pagestart;
+	int status, i, pagelen;
+	unsigned char *cmd;
+	unsigned char *pagestart;
 
-    for (i = 0; i < 1024; i++) {
-        buffer[i] = 0;
-    }
+	for (i = 0; i < 1024; i++) {
+		buffer[i] = 0;
+	}
 
-    *((int *) buffer) = 0;      /* length of input data */
-    *(((int *) buffer) + 1) = 4;     /* length of output buffer */
+	*((int *)buffer) = 0;	/* length of input data */
+	*(((int *)buffer) + 1) = 4;	/* length of output buffer */
 
-    cmd = (unsigned char *) (((int *) buffer) + 2);
+	cmd = (unsigned char *)(((int *)buffer) + 2);
 
-    cmd[0] = 0x12;              /* INQUIRY */
-    cmd[1] = 0x01;              /* lun=0, evpd=1 */
-    cmd[2] = 0x80;              /* page code = 0x80, serial number */
-    cmd[3] = 0x00;              /* (reserved) */
-    cmd[4] = 0x04;              /* allocation length */
-    cmd[5] = 0x00;              /* control */
+	cmd[0] = 0x12;		/* INQUIRY */
+	cmd[1] = 0x01;		/* lun=0, evpd=1 */
+	cmd[2] = 0x80;		/* page code = 0x80, serial number */
+	cmd[3] = 0x00;		/* (reserved) */
+	cmd[4] = 0x04;		/* allocation length */
+	cmd[5] = 0x00;		/* control */
 
-    status = do_sg_io(glob_fd, buffer);
-    if (status) {
-        printf("Error doing INQUIRY (evpd=1, serial number)\n");
-        return status;
-    }
+	status = do_sg_io(glob_fd, buffer);
+	if (status) {
+		printf("Error doing INQUIRY (evpd=1, serial number)\n");
+		return status;
+	}
 
-    pagestart = buffer + 8;
+	pagestart = buffer + 8;
 
-    pagelen = 4 + pagestart[3];
-    *((int *) buffer) = 0;      /* length of input data */
-    *(((int *) buffer) + 1) = pagelen; /* length of output buffer */
+	pagelen = 4 + pagestart[3];
+	*((int *)buffer) = 0;	/* length of input data */
+	*(((int *)buffer) + 1) = pagelen;	/* length of output buffer */
 
-    cmd[0] = 0x12;              /* INQUIRY */
-    cmd[1] = 0x01;              /* lun=0, evpd=1 */
-    cmd[2] = 0x80;              /* page code = 0x80, serial number */
-    cmd[3] = 0x00;              /* (reserved) */
-    cmd[4] = (unsigned char)pagelen; /* allocation length */
-    cmd[5] = 0x00;              /* control */
+	cmd[0] = 0x12;		/* INQUIRY */
+	cmd[1] = 0x01;		/* lun=0, evpd=1 */
+	cmd[2] = 0x80;		/* page code = 0x80, serial number */
+	cmd[3] = 0x00;		/* (reserved) */
+	cmd[4] = (unsigned char)pagelen;	/* allocation length */
+	cmd[5] = 0x00;		/* control */
 
-    status = do_sg_io(glob_fd, buffer);
-    if (status) {
-        printf("Error doing INQUIRY (evpd=1, serial number, len)\n");
-        return status;
-    }
+	status = do_sg_io(glob_fd, buffer);
+	if (status) {
+		printf("Error doing INQUIRY (evpd=1, serial number, len)\n");
+		return status;
+	}
 
-    printf("Serial Number '");
-    for (i = 0; i < pagestart[3]; i++)
-        printf("%c", pagestart[4 + i]);
-    printf("'\n");
-    printf("\n");
+	printf("Serial Number '");
+	for (i = 0; i < pagestart[3]; i++)
+		printf("%c", pagestart[4 + i]);
+	printf("'\n");
+	printf("\n");
 
-    return status;
+	return status;
 }
 
 /* Print out a list of the known devices on the system */
 static void show_devices()
 {
-    int k, j, fd, err, bus;
-    My_scsi_idlun m_idlun;
-    char name[MDEV_NAME_SZ];
-    char ebuff[EBUFF_SZ];
-    int do_numeric = 1;
-    int max_holes = MAX_HOLES;
+	int k, j, fd, err, bus;
+	My_scsi_idlun m_idlun;
+	char name[MDEV_NAME_SZ];
+	char ebuff[EBUFF_SZ];
+	int do_numeric = 1;
+	int max_holes = MAX_HOLES;
 
-    for (k = 0, j = 0; k < sizeof(devices) / sizeof(char *); k++) {
-        fd = open(devices[k], O_RDONLY | O_NONBLOCK);
-        if (fd < 0)
-            continue;
-        err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &(sg_map_arr[j].bus));
-        if (err < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     "SCSI(1) ioctl on %s failed", devices[k]);
-            perror(ebuff);
-            close(fd);
-            continue;
-        }
-        err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
-        if (err < 0) {
-            snprintf(ebuff, EBUFF_SZ,
-	    	     "SCSI(2) ioctl on %s failed", devices[k]);
-            perror(ebuff);
-            close(fd);
-            continue;
-        }
-        sg_map_arr[j].channel = (m_idlun.dev_id >> 16) & 0xff;
-        sg_map_arr[j].lun = (m_idlun.dev_id >> 8) & 0xff;
-        sg_map_arr[j].target_id = m_idlun.dev_id & 0xff;
-        sg_map_arr[j].dev_name = devices[k];
-
-        printf("[scsi%d ch=%d id=%d lun=%d %s] ", sg_map_arr[j].bus,
-        sg_map_arr[j].channel, sg_map_arr[j].target_id, sg_map_arr[j].lun,
-        sg_map_arr[j].dev_name);
-
-        ++j;
-        printf("%s ", devices[k]);
-        close(fd);
-    };
-    printf("\n");
-    for (k = 0; k < MAX_SG_DEVS; k++) {
-        make_dev_name(name, NULL, k, do_numeric);
-        fd = open(name, O_RDWR | O_NONBLOCK);
-        if (fd < 0) {
-            if ((ENOENT == errno) && (0 == k)) {
-                do_numeric = 0;
-                make_dev_name(name, NULL, k, do_numeric);
-                fd = open(name, O_RDWR | O_NONBLOCK);
-            }
-            if (fd < 0) {
-                if (EBUSY == errno)
-                    continue;   /* step over if O_EXCL already on it */
-                else {
-#if 0
-                    snprintf(ebuff, EBUFF_SZ,
-		    	     "open on %s failed (%d)", name, errno);
-                    perror(ebuff);
-#endif
-		    if (max_holes-- > 0)
+	for (k = 0, j = 0; k < sizeof(devices) / sizeof(char *); k++) {
+		fd = open(devices[k], O_RDONLY | O_NONBLOCK);
+		if (fd < 0)
 			continue;
-		    else
-                        break;
-                }
-            }
-        }
-	max_holes = MAX_HOLES;
-        err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus);
-        if (err < 0) {
-            snprintf(ebuff, EBUFF_SZ, "SCSI(3) ioctl on %s failed", name);
-            perror(ebuff);
-            close(fd);
-            continue;
-        }
-        err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
-        if (err < 0) {
-            snprintf(ebuff, EBUFF_SZ, "SCSI(3) ioctl on %s failed", name);
-            perror(ebuff);
-            close(fd);
-            continue;
-        }
+		err =
+		    ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &(sg_map_arr[j].bus));
+		if (err < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 "SCSI(1) ioctl on %s failed", devices[k]);
+			perror(ebuff);
+			close(fd);
+			continue;
+		}
+		err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
+		if (err < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 "SCSI(2) ioctl on %s failed", devices[k]);
+			perror(ebuff);
+			close(fd);
+			continue;
+		}
+		sg_map_arr[j].channel = (m_idlun.dev_id >> 16) & 0xff;
+		sg_map_arr[j].lun = (m_idlun.dev_id >> 8) & 0xff;
+		sg_map_arr[j].target_id = m_idlun.dev_id & 0xff;
+		sg_map_arr[j].dev_name = devices[k];
 
-        printf("[scsi%d ch=%d id=%d lun=%d %s]", bus,
-               (m_idlun.dev_id >> 16) & 0xff, m_idlun.dev_id & 0xff,
-               (m_idlun.dev_id >> 8) & 0xff, name);
+		printf("[scsi%d ch=%d id=%d lun=%d %s] ", sg_map_arr[j].bus,
+		       sg_map_arr[j].channel, sg_map_arr[j].target_id,
+		       sg_map_arr[j].lun, sg_map_arr[j].dev_name);
 
-        for (j = 0; sg_map_arr[j].dev_name; ++j) {
-            if ((bus == sg_map_arr[j].bus) &&
-                ((m_idlun.dev_id & 0xff) == sg_map_arr[j].target_id) &&
-                (((m_idlun.dev_id >> 16) & 0xff) == sg_map_arr[j].channel) &&
-                (((m_idlun.dev_id >> 8) & 0xff) == sg_map_arr[j].lun)) {
-                printf("%s [=%s  scsi%d ch=%d id=%d lun=%d]\n", name,
-                       sg_map_arr[j].dev_name, bus,
-                       ((m_idlun.dev_id >> 16) & 0xff), m_idlun.dev_id & 0xff,
-                       ((m_idlun.dev_id >> 8) & 0xff));
-                break;
-            }
-        }
-        if (NULL == sg_map_arr[j].dev_name)
-            printf("%s [scsi%d ch=%d id=%d lun=%d]\n", name, bus,
-                   ((m_idlun.dev_id >> 16) & 0xff), m_idlun.dev_id & 0xff,
-                   ((m_idlun.dev_id >> 8) & 0xff));
-        close(fd);
-    }
-    printf("\n");
+		++j;
+		printf("%s ", devices[k]);
+		close(fd);
+	};
+	printf("\n");
+	for (k = 0; k < MAX_SG_DEVS; k++) {
+		make_dev_name(name, NULL, k, do_numeric);
+		fd = open(name, O_RDWR | O_NONBLOCK);
+		if (fd < 0) {
+			if ((ENOENT == errno) && (0 == k)) {
+				do_numeric = 0;
+				make_dev_name(name, NULL, k, do_numeric);
+				fd = open(name, O_RDWR | O_NONBLOCK);
+			}
+			if (fd < 0) {
+				if (EBUSY == errno)
+					continue;	/* step over if O_EXCL already on it */
+				else {
+#if 0
+					snprintf(ebuff, EBUFF_SZ,
+						 "open on %s failed (%d)", name,
+						 errno);
+					perror(ebuff);
+#endif
+					if (max_holes-- > 0)
+						continue;
+					else
+						break;
+				}
+			}
+		}
+		max_holes = MAX_HOLES;
+		err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus);
+		if (err < 0) {
+			snprintf(ebuff, EBUFF_SZ, "SCSI(3) ioctl on %s failed",
+				 name);
+			perror(ebuff);
+			close(fd);
+			continue;
+		}
+		err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
+		if (err < 0) {
+			snprintf(ebuff, EBUFF_SZ, "SCSI(3) ioctl on %s failed",
+				 name);
+			perror(ebuff);
+			close(fd);
+			continue;
+		}
+
+		printf("[scsi%d ch=%d id=%d lun=%d %s]", bus,
+		       (m_idlun.dev_id >> 16) & 0xff, m_idlun.dev_id & 0xff,
+		       (m_idlun.dev_id >> 8) & 0xff, name);
+
+		for (j = 0; sg_map_arr[j].dev_name; ++j) {
+			if ((bus == sg_map_arr[j].bus) &&
+			    ((m_idlun.dev_id & 0xff) == sg_map_arr[j].target_id)
+			    && (((m_idlun.dev_id >> 16) & 0xff) ==
+				sg_map_arr[j].channel)
+			    && (((m_idlun.dev_id >> 8) & 0xff) ==
+				sg_map_arr[j].lun)) {
+				printf("%s [=%s  scsi%d ch=%d id=%d lun=%d]\n",
+				       name, sg_map_arr[j].dev_name, bus,
+				       ((m_idlun.dev_id >> 16) & 0xff),
+				       m_idlun.dev_id & 0xff,
+				       ((m_idlun.dev_id >> 8) & 0xff));
+				break;
+			}
+		}
+		if (NULL == sg_map_arr[j].dev_name)
+			printf("%s [scsi%d ch=%d id=%d lun=%d]\n", name, bus,
+			       ((m_idlun.dev_id >> 16) & 0xff),
+			       m_idlun.dev_id & 0xff,
+			       ((m_idlun.dev_id >> 8) & 0xff));
+		close(fd);
+	}
+	printf("\n");
 }
 
 static int show_pages(int page_code)
 {
-    int offset;
-    int length;
-    int i;
-    unsigned long long pages_sup = 0;
-    unsigned long long pages_mask = 0;
+	int offset;
+	int length;
+	int i;
+	unsigned long long pages_sup = 0;
+	unsigned long long pages_mask = 0;
 
-    if (!get_mode_page10(0x3f, page_code | 0x10)) {
-        length = 9 + getnbyte(buffer + 8, 2);
-        offset = 16 + getnbyte(buffer + 14, 2);
-    } else if (!get_mode_page(0x3f, page_code | 0x10)) {
-        length = 9 + buffer[8];
-        offset = 12 + buffer[11];
-    } else {    /* Assume SCSI-1 and fake settings to report NO pages */
-        offset = 10;
-        length = 0;
-    }
+	if (!get_mode_page10(0x3f, page_code | 0x10)) {
+		length = 9 + getnbyte(buffer + 8, 2);
+		offset = 16 + getnbyte(buffer + 14, 2);
+	} else if (!get_mode_page(0x3f, page_code | 0x10)) {
+		length = 9 + buffer[8];
+		offset = 12 + buffer[11];
+	} else {		/* Assume SCSI-1 and fake settings to report NO pages */
+		offset = 10;
+		length = 0;
+	}
 
-    /* Get mask of pages supported by prog: */
-    for (i = 0; i < MAX_PAGENO; i++)
-        if (page_names[i])
-            pages_mask |= (1LL << i);
+	/* Get mask of pages supported by prog: */
+	for (i = 0; i < MAX_PAGENO; i++)
+		if (page_names[i])
+			pages_mask |= (1LL << i);
 
-        /* Get pages listed in mode_pages */
-    while (offset < length) {
-        pages_sup |= (1LL << (buffer[offset] & 0x3f));
-        offset += 2 + buffer[offset + 1];
-    }
+	/* Get pages listed in mode_pages */
+	while (offset < length) {
+		pages_sup |= (1LL << (buffer[offset] & 0x3f));
+		offset += 2 + buffer[offset + 1];
+	}
 
-    /* Mask out pages unsupported by this binary */
-    pages_sup &= pages_mask;
+	/* Mask out pages unsupported by this binary */
+	pages_sup &= pages_mask;
 
-    /* Notch page supported? */
-    if (pages_sup & (1LL << 12)) {
-        if (get_mode_page(12, 0))
-            return 2;
-        offset = 12 + buffer[11];
-    } else {                    /* Fake empty notch page */
-        memset(buffer, 0, SIZEOF_BUFFER);
-        offset = 0;
-    }
+	/* Notch page supported? */
+	if (pages_sup & (1LL << 12)) {
+		if (get_mode_page(12, 0))
+			return 2;
+		offset = 12 + buffer[11];
+	} else {		/* Fake empty notch page */
+		memset(buffer, 0, SIZEOF_BUFFER);
+		offset = 0;
+	}
 
-    pages_mask = getnbyte(buffer + offset + 16, 4);
-    pages_mask <<= 32;
-    pages_mask += getnbyte(buffer + offset + 20, 4);
+	pages_mask = getnbyte(buffer + offset + 16, 4);
+	pages_mask <<= 32;
+	pages_mask += getnbyte(buffer + offset + 20, 4);
 
-    puts("Mode Pages supported by this binary and target:");
-    puts("-----------------------------------------------");
-    for (i = 0; i < MAX_PAGENO; i++)
-        if (pages_sup & (1LL << i))
-            printf("%02xh: %s Page%s\n", i, get_page_name(i),
-                   (pages_mask & (1LL << i)) ? " (notched)" : "");
-    if (pages_sup & (1LL << 12)) {
-        printf("\nCurrent notch is %d.\n",
-               getnbyte(buffer + offset + 6, 2));
-    }
-    if (!pages_sup)
-        puts("No mode pages supported (SCSI-1?).");
+	puts("Mode Pages supported by this binary and target:");
+	puts("-----------------------------------------------");
+	for (i = 0; i < MAX_PAGENO; i++)
+		if (pages_sup & (1LL << i))
+			printf("%02xh: %s Page%s\n", i, get_page_name(i),
+			       (pages_mask & (1LL << i)) ? " (notched)" : "");
+	if (pages_sup & (1LL << 12)) {
+		printf("\nCurrent notch is %d.\n",
+		       getnbyte(buffer + offset + 6, 2));
+	}
+	if (!pages_sup)
+		puts("No mode pages supported (SCSI-1?).");
 
-  return 0;
+	return 0;
 }
 
-static int open_sg_dev(char * devname)
+static int open_sg_dev(char *devname)
 {
-    int fd, err, bus, bbus, k;
-    My_scsi_idlun m_idlun, mm_idlun;
-    int do_numeric = 1;
-    char name[DEVNAME_SZ];
-    struct stat a_st;
-    int block_dev = 0;
+	int fd, err, bus, bbus, k;
+	My_scsi_idlun m_idlun, mm_idlun;
+	int do_numeric = 1;
+	char name[DEVNAME_SZ];
+	struct stat a_st;
+	int block_dev = 0;
 
-    strncpy(name, devname, DEVNAME_SZ);
-    name[DEVNAME_SZ - 1] = '\0';
-    fd = open(name, O_RDONLY);
-    if (fd < 0)
-        return fd;
-    if (fstat(fd, &a_st) < 0) {
-	fprintf(stderr, "could do fstat() on fd ??\n");
-	close(fd);
-	return -9999;
-    }
-    if (S_ISBLK(a_st.st_mode))
-    	block_dev = 1;
-    if (block_dev || (ioctl(fd, SG_GET_TIMEOUT, 0) < 0)) {
-        err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus);
-        if (err < 0) {
-            perror("A SCSI device name is required\n");
-            close(fd);
-            return -9999;
-        }
-        err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
-        if (err < 0) {
-            perror("A SCSI device name is required\n");
-            close(fd);
-            return -9999;
-        }
-        close(fd);
+	strncpy(name, devname, DEVNAME_SZ);
+	name[DEVNAME_SZ - 1] = '\0';
+	fd = open(name, O_RDONLY);
+	if (fd < 0)
+		return fd;
+	if (fstat(fd, &a_st) < 0) {
+		fprintf(stderr, "could do fstat() on fd ??\n");
+		close(fd);
+		return -9999;
+	}
+	if (S_ISBLK(a_st.st_mode))
+		block_dev = 1;
+	if (block_dev || (ioctl(fd, SG_GET_TIMEOUT, 0) < 0)) {
+		err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus);
+		if (err < 0) {
+			perror("A SCSI device name is required\n");
+			close(fd);
+			return -9999;
+		}
+		err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &m_idlun);
+		if (err < 0) {
+			perror("A SCSI device name is required\n");
+			close(fd);
+			return -9999;
+		}
+		close(fd);
 
-        for (k = 0; k < MAX_SG_DEVS; k++) {
-            make_dev_name(name, NULL,k, do_numeric);
-            fd = open(name, O_RDWR | O_NONBLOCK);
-            if (fd < 0) {
-                if ((ENOENT == errno) && (0 == k)) {
-                    do_numeric = 0;
-                    make_dev_name(name, NULL,k, do_numeric);
-                    fd = open(name, O_RDWR | O_NONBLOCK);
-                }
-                if (fd < 0) {
-                    if (EBUSY == errno)
-                        continue;   /* step over if O_EXCL already on it */
-                    else
-                        break;
-                }
-            }
-            err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bbus);
-            if (err < 0) {
-                perror("sg ioctl failed");
-                close(fd);
-                fd = -9999;
-            }
-            err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &mm_idlun);
-            if (err < 0) {
-                perror("sg ioctl failed");
-                close(fd);
-                fd = -9999;
-            }
-            if ((bus == bbus) &&
-                ((m_idlun.dev_id & 0xff) == (mm_idlun.dev_id & 0xff)) &&
-                (((m_idlun.dev_id >> 8) & 0xff) ==
-                                        ((mm_idlun.dev_id >> 8) & 0xff)) &&
-                (((m_idlun.dev_id >> 16) & 0xff) ==
-                                        ((mm_idlun.dev_id >> 16) & 0xff)))
-                break;
-            else {
-                close(fd);
-                fd = -9999;
-            }
-        }
-    }
-    if (fd >= 0) {
+		for (k = 0; k < MAX_SG_DEVS; k++) {
+			make_dev_name(name, NULL, k, do_numeric);
+			fd = open(name, O_RDWR | O_NONBLOCK);
+			if (fd < 0) {
+				if ((ENOENT == errno) && (0 == k)) {
+					do_numeric = 0;
+					make_dev_name(name, NULL, k,
+						      do_numeric);
+					fd = open(name, O_RDWR | O_NONBLOCK);
+				}
+				if (fd < 0) {
+					if (EBUSY == errno)
+						continue;	/* step over if O_EXCL already on it */
+					else
+						break;
+				}
+			}
+			err = ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bbus);
+			if (err < 0) {
+				perror("sg ioctl failed");
+				close(fd);
+				fd = -9999;
+			}
+			err = ioctl(fd, SCSI_IOCTL_GET_IDLUN, &mm_idlun);
+			if (err < 0) {
+				perror("sg ioctl failed");
+				close(fd);
+				fd = -9999;
+			}
+			if ((bus == bbus) &&
+			    ((m_idlun.dev_id & 0xff) ==
+			     (mm_idlun.dev_id & 0xff))
+			    && (((m_idlun.dev_id >> 8) & 0xff) ==
+				((mm_idlun.dev_id >> 8) & 0xff))
+			    && (((m_idlun.dev_id >> 16) & 0xff) ==
+				((mm_idlun.dev_id >> 16) & 0xff)))
+				break;
+			else {
+				close(fd);
+				fd = -9999;
+			}
+		}
+	}
+	if (fd >= 0) {
 #ifdef SG_GET_RESERVED_SIZE
-        int size;
+		int size;
 
-        if (ioctl(fd, SG_GET_RESERVED_SIZE, &size) < 0) {
-            fprintf(stderr, "Compiled with new driver, running on old!!\n");
-            close(fd);
-            return -9999;
-        }
+		if (ioctl(fd, SG_GET_RESERVED_SIZE, &size) < 0) {
+			fprintf(stderr,
+				"Compiled with new driver, running on old!!\n");
+			close(fd);
+			return -9999;
+		}
 #endif
-        close(fd);
-        return open(name, O_RDWR);
-    }
-    else
-        return fd;
+		close(fd);
+		return open(name, O_RDWR);
+	} else
+		return fd;
 }
 
-int show_scsi_info(char * device)
+int show_scsi_info(char *device)
 {
-    int page_code = 0;
-    int status = 0;
+	int page_code = 0;
+	int status = 0;
 
-    print_msg(TEST_BREAK,__FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    show_devices();
+	show_devices();
 
-    glob_fd = open_sg_dev(device);
-    if (glob_fd < 0) {
-        if (-9999 == glob_fd)
-            fprintf(stderr, "Couldn't find sg device corresponding to %s\n",
-                    device);
-        else {
-            perror("sginfo(open)");
-            fprintf(stderr, "file=%s, or no corresponding sg device found\n", device);
-            fprintf(stderr, "Is sg driver loaded?\n");
-        }
-        return 1;
-    }
+	glob_fd = open_sg_dev(device);
+	if (glob_fd < 0) {
+		if (-9999 == glob_fd)
+			fprintf(stderr,
+				"Couldn't find sg device corresponding to %s\n",
+				device);
+		else {
+			perror("sginfo(open)");
+			fprintf(stderr,
+				"file=%s, or no corresponding sg device found\n",
+				device);
+			fprintf(stderr, "Is sg driver loaded?\n");
+		}
+		return 1;
+	}
 
-    status |= do_scsi_info_inquiry(page_code);
+	status |= do_scsi_info_inquiry(page_code);
 
-    status |= do_serial_number(page_code);
+	status |= do_serial_number(page_code);
 
-    status |= read_geometry(page_code);
+	status |= read_geometry(page_code);
 
-    status |= read_cache(page_code);
+	status |= read_cache(page_code);
 
-    status |= read_format_info(page_code);
+	status |= read_format_info(page_code);
 
-    status |= error_recovery_page(page_code);
+	status |= error_recovery_page(page_code);
 
-    status |= read_control_page(page_code);
+	status |= read_control_page(page_code);
 
-    status |= read_disconnect_reconnect_data(page_code);
+	status |= read_disconnect_reconnect_data(page_code);
 
-    status |= read_defect_list(page_code);
+	status |= read_defect_list(page_code);
 
-    status |= notch_parameters_page(page_code);
+	status |= notch_parameters_page(page_code);
 
-    status |= verify_error_recovery(page_code);
+	status |= verify_error_recovery(page_code);
 
-    status |= peripheral_device_page(page_code);
+	status |= peripheral_device_page(page_code);
 
-    status |= do_user_page(page_code, 0);
+	status |= do_user_page(page_code, 0);
 
-    status |= show_pages(page_code);
+	status |= show_pages(page_code);
 
-    return status;
+	return status;
 }
 
 /* -1 -> unrecoverable error, 0 -> successful, 1 -> recoverable (ENOMEM),
    2 -> try again */
-int sg_read2(int sg_fd, unsigned char * buff, int blocks, int from_block,
-            int bs, int cdbsz, int fua, int do_mmap)
+int sg_read2(int sg_fd, unsigned char *buff, int blocks, int from_block,
+	     int bs, int cdbsz, int fua, int do_mmap)
 {
-    unsigned char rdCmd[MAX_SCSI_CDBSZ];
-    unsigned char senseBuff[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
-    int res;
+	unsigned char rdCmd[MAX_SCSI_CDBSZ];
+	unsigned char senseBuff[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
+	int res;
 
-    if (sg_build_scsi_cdb(rdCmd, cdbsz, blocks, from_block, 0, fua, 0)) {
-        fprintf(stderr, ME "bad rd cdb build, from_block=%d, blocks=%d\n",
-                from_block, blocks);
-        return -1;
-    }
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = cdbsz;
-    io_hdr.cmdp = rdCmd;
-    io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-    io_hdr.dxfer_len = bs * blocks;
-    if (! do_mmap)
-	io_hdr.dxferp = buff;
-    io_hdr.mx_sb_len = SENSE_BUFF_LEN;
-    io_hdr.sbp = senseBuff;
-    io_hdr.timeout = DEF_TIMEOUT;
-    io_hdr.pack_id = from_block;
-    if (do_mmap)
-        io_hdr.flags |= SG_FLAG_MMAP_IO;
+	if (sg_build_scsi_cdb(rdCmd, cdbsz, blocks, from_block, 0, fua, 0)) {
+		fprintf(stderr,
+			ME "bad rd cdb build, from_block=%d, blocks=%d\n",
+			from_block, blocks);
+		return -1;
+	}
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = cdbsz;
+	io_hdr.cmdp = rdCmd;
+	io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+	io_hdr.dxfer_len = bs * blocks;
+	if (!do_mmap)
+		io_hdr.dxferp = buff;
+	io_hdr.mx_sb_len = SENSE_BUFF_LEN;
+	io_hdr.sbp = senseBuff;
+	io_hdr.timeout = DEF_TIMEOUT;
+	io_hdr.pack_id = from_block;
+	if (do_mmap)
+		io_hdr.flags |= SG_FLAG_MMAP_IO;
 
-    while (((res = write(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
-           (EINTR == errno))
-        ;
-    if (res < 0) {
-        if (ENOMEM == errno)
-            return 1;
-        perror("reading (wr) on sg device, error");
-        return -1;
-    }
+	while (((res = write(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
+	       (EINTR == errno)) ;
+	if (res < 0) {
+		if (ENOMEM == errno)
+			return 1;
+		perror("reading (wr) on sg device, error");
+		return -1;
+	}
 
-    while (((res = read(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
-           (EINTR == errno))
-        ;
-    if (res < 0) {
-        perror("reading (rd) on sg device, error");
-        return -1;
-    }
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-        break;
-    case SG_ERR_CAT_RECOVERED:
-        fprintf(stderr, "Recovered error while reading block=%d, num=%d\n",
-               from_block, blocks);
-        break;
-    case SG_ERR_CAT_MEDIA_CHANGED:
-        return 2;
-    default:
-        sg_chk_n_print3("reading", &io_hdr);
-        return -1;
-    }
-    sum_of_resids += io_hdr.resid;
+	while (((res = read(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
+	       (EINTR == errno)) ;
+	if (res < 0) {
+		perror("reading (rd) on sg device, error");
+		return -1;
+	}
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		fprintf(stderr,
+			"Recovered error while reading block=%d, num=%d\n",
+			from_block, blocks);
+		break;
+	case SG_ERR_CAT_MEDIA_CHANGED:
+		return 2;
+	default:
+		sg_chk_n_print3("reading", &io_hdr);
+		return -1;
+	}
+	sum_of_resids += io_hdr.resid;
 #if SG_DEBUG
-    fprintf(stderr, "duration=%u ms\n", io_hdr.duration);
+	fprintf(stderr, "duration=%u ms\n", io_hdr.duration);
 #endif
-  return 0;
+	return 0;
 }
 
 /* -1 -> unrecoverable error, 0 -> successful, 1 -> recoverable (ENOMEM),
    2 -> try again */
-int sg_write2(int sg_fd, unsigned char * buff, int blocks, int to_block,
-             int bs, int cdbsz, int fua, int do_mmap, int * diop)
+int sg_write2(int sg_fd, unsigned char *buff, int blocks, int to_block,
+	      int bs, int cdbsz, int fua, int do_mmap, int *diop)
 {
-    unsigned char wrCmd[MAX_SCSI_CDBSZ];
-    unsigned char senseBuff[SENSE_BUFF_LEN];
-    sg_io_hdr_t io_hdr;
-    int res;
+	unsigned char wrCmd[MAX_SCSI_CDBSZ];
+	unsigned char senseBuff[SENSE_BUFF_LEN];
+	sg_io_hdr_t io_hdr;
+	int res;
 
-    if (sg_build_scsi_cdb(wrCmd, cdbsz, blocks, to_block, 1, fua, 0)) {
-        fprintf(stderr, ME "bad wr cdb build, to_block=%d, blocks=%d\n",
-                to_block, blocks);
-        return -1;
-    }
+	if (sg_build_scsi_cdb(wrCmd, cdbsz, blocks, to_block, 1, fua, 0)) {
+		fprintf(stderr, ME "bad wr cdb build, to_block=%d, blocks=%d\n",
+			to_block, blocks);
+		return -1;
+	}
 
-    memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
-    io_hdr.interface_id = 'S';
-    io_hdr.cmd_len = cdbsz;
-    io_hdr.cmdp = wrCmd;
-    io_hdr.dxfer_direction = SG_DXFER_TO_DEV;
-    io_hdr.dxfer_len = bs * blocks;
-    if (! do_mmap)
-	io_hdr.dxferp = buff;
-    io_hdr.mx_sb_len = SENSE_BUFF_LEN;
-    io_hdr.sbp = senseBuff;
-    io_hdr.timeout = DEF_TIMEOUT;
-    io_hdr.pack_id = to_block;
-    if (do_mmap)
-        io_hdr.flags |= SG_FLAG_MMAP_IO;
-    if (diop && *diop)
-        io_hdr.flags |= SG_FLAG_DIRECT_IO;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	io_hdr.interface_id = 'S';
+	io_hdr.cmd_len = cdbsz;
+	io_hdr.cmdp = wrCmd;
+	io_hdr.dxfer_direction = SG_DXFER_TO_DEV;
+	io_hdr.dxfer_len = bs * blocks;
+	if (!do_mmap)
+		io_hdr.dxferp = buff;
+	io_hdr.mx_sb_len = SENSE_BUFF_LEN;
+	io_hdr.sbp = senseBuff;
+	io_hdr.timeout = DEF_TIMEOUT;
+	io_hdr.pack_id = to_block;
+	if (do_mmap)
+		io_hdr.flags |= SG_FLAG_MMAP_IO;
+	if (diop && *diop)
+		io_hdr.flags |= SG_FLAG_DIRECT_IO;
 
-    while (((res = write(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
-           (EINTR == errno))
-        ;
-    if (res < 0) {
-        if (ENOMEM == errno)
-            return 1;
-        perror("writing (wr) on sg device, error");
-        return -1;
-    }
+	while (((res = write(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
+	       (EINTR == errno)) ;
+	if (res < 0) {
+		if (ENOMEM == errno)
+			return 1;
+		perror("writing (wr) on sg device, error");
+		return -1;
+	}
 
-    while (((res = read(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
-           (EINTR == errno))
-        ;
-    if (res < 0) {
-        perror("writing (rd) on sg device, error");
-        return -1;
-    }
-    switch (sg_err_category3(&io_hdr)) {
-    case SG_ERR_CAT_CLEAN:
-        break;
-    case SG_ERR_CAT_RECOVERED:
-        fprintf(stderr, "Recovered error while writing block=%d, num=%d\n",
-               to_block, blocks);
-        break;
-    case SG_ERR_CAT_MEDIA_CHANGED:
-        return 2;
-    default:
-        sg_chk_n_print3("writing", &io_hdr);
-        return -1;
-    }
-    if (diop && *diop &&
-	((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
-	*diop = 0;      /* flag that dio not done (completely) */
-  return 0;
+	while (((res = read(sg_fd, &io_hdr, sizeof(io_hdr))) < 0) &&
+	       (EINTR == errno)) ;
+	if (res < 0) {
+		perror("writing (rd) on sg device, error");
+		return -1;
+	}
+	switch (sg_err_category3(&io_hdr)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		fprintf(stderr,
+			"Recovered error while writing block=%d, num=%d\n",
+			to_block, blocks);
+		break;
+	case SG_ERR_CAT_MEDIA_CHANGED:
+		return 2;
+	default:
+		sg_chk_n_print3("writing", &io_hdr);
+		return -1;
+	}
+	if (diop && *diop &&
+	    ((io_hdr.info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
+		*diop = 0;	/* flag that dio not done (completely) */
+	return 0;
 }
 
-int do_scsi_sgm_read_write(char * device)
+int do_scsi_sgm_read_write(char *device)
 {
-    int skip = 0;
-    int seek = 0;
-    int bs = 0;
-    int bpt = DEF_BLOCKS_PER_TRANSFER;
-    char inf[INOUTF_SZ];
-    int in_type = FT_OTHER;
-    char outf[INOUTF_SZ];
-    int out_type = FT_OTHER;
-    int res, t;
-    int infd, outfd, blocks;
-    unsigned char * wrkPos;
-    unsigned char * wrkBuff = NULL;
-    unsigned char * wrkMmap = NULL;
-    int in_num_sect = 0;
-    int in_res_sz = 0;
-    int out_num_sect = 0;
-    int out_res_sz = 0;
-    int do_time = 1;
-    int scsi_cdbsz = DEF_SCSI_CDBSZ;
-    int do_sync = 1;
-    int do_dio = 0;
-    int num_dio_not_done = 0;
-    int fua_mode = 0;
-    int in_sect_sz, out_sect_sz;
-    char ebuff[EBUFF_SZ];
-    int blocks_per;
-    int req_count;
-    size_t psz = getpagesize();
-    struct timeval start_tm, end_tm;
+	int skip = 0;
+	int seek = 0;
+	int bs = 0;
+	int bpt = DEF_BLOCKS_PER_TRANSFER;
+	char inf[INOUTF_SZ];
+	int in_type = FT_OTHER;
+	char outf[INOUTF_SZ];
+	int out_type = FT_OTHER;
+	int res, t;
+	int infd, outfd, blocks;
+	unsigned char *wrkPos;
+	unsigned char *wrkBuff = NULL;
+	unsigned char *wrkMmap = NULL;
+	int in_num_sect = 0;
+	int in_res_sz = 0;
+	int out_num_sect = 0;
+	int out_res_sz = 0;
+	int do_time = 1;
+	int scsi_cdbsz = DEF_SCSI_CDBSZ;
+	int do_sync = 1;
+	int do_dio = 0;
+	int num_dio_not_done = 0;
+	int fua_mode = 0;
+	int in_sect_sz, out_sect_sz;
+	char ebuff[EBUFF_SZ];
+	int blocks_per;
+	int req_count;
+	size_t psz = getpagesize();
+	struct timeval start_tm, end_tm;
 
-    print_msg(TEST_BREAK, __FUNCTION__);
+	print_msg(TEST_BREAK, __FUNCTION__);
 
-    strcpy(inf,"/dev/zero");
-    strcpy(outf, device);
+	strcpy(inf, "/dev/zero");
+	strcpy(outf, device);
 
-    install_handler (SIGINT, interrupt_handler);
-    install_handler (SIGQUIT, interrupt_handler);
-    install_handler (SIGPIPE, interrupt_handler);
-    install_handler (SIGUSR1, siginfo_handler);
+	install_handler(SIGINT, interrupt_handler);
+	install_handler(SIGQUIT, interrupt_handler);
+	install_handler(SIGPIPE, interrupt_handler);
+	install_handler(SIGUSR1, siginfo_handler);
 
-    infd = STDIN_FILENO;
-    outfd = STDOUT_FILENO;
+	infd = STDIN_FILENO;
+	outfd = STDOUT_FILENO;
 
 	in_type = dd_filetype(inf);
 
-        if (FT_ST == in_type) {
-            fprintf(stderr, ME "unable to use scsi tape device %s\n", inf);
-            return 1;
-        }
-        else if (FT_SG == in_type) {
-	    if ((infd = open(inf, O_RDWR)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for sg reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-            res = ioctl(infd, SG_GET_VERSION_NUM, &t);
-            if ((res < 0) || (t < 30122)) {
-                fprintf(stderr, ME "sg driver prior to 3.1.22\n");
-                return 1;
-            }
-	    in_res_sz = bs * bpt;
-	    if (0 != (in_res_sz % psz)) /* round up to next page */
-	    	in_res_sz = ((in_res_sz / psz) + 1) * psz;
-            if (ioctl(infd, SG_GET_RESERVED_SIZE, &t) < 0) {
-                perror(ME "SG_GET_RESERVED_SIZE error");
-                return 1;
-	    }
-	    if (in_res_sz > t) {
-		if (ioctl(infd, SG_SET_RESERVED_SIZE, &in_res_sz) < 0) {
-		    perror(ME "SG_SET_RESERVED_SIZE error");
-		    return 1;
-		}
-	    }
-	    wrkMmap = mmap(NULL, in_res_sz, PROT_READ | PROT_WRITE,
-	    		   MAP_SHARED, infd, 0);
-	    if (MAP_FAILED == wrkMmap) {
-		snprintf(ebuff, EBUFF_SZ,
-			 ME "error using mmap() on file: %s", inf);
-		perror(ebuff);
+	if (FT_ST == in_type) {
+		fprintf(stderr, ME "unable to use scsi tape device %s\n", inf);
 		return 1;
-	    }
-        }
-        else {
-            if ((infd = open(inf, O_RDONLY)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-            else if (skip > 0) {
-                llse_loff_t offset = skip;
-
-                offset *= bs;       /* could exceed 32 bits here! */
-                if (llse_llseek(infd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ, ME "couldn't skip to "
-		    	     "required position on %s", inf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-        }
-
-    if (outf[0] && ('-' != outf[0])) {
-	out_type = dd_filetype(outf);
-
-        if (FT_ST == out_type) {
-            fprintf(stderr, ME "unable to use scsi tape device %s\n", outf);
-            return 1;
-        }
-        else if (FT_SG == out_type) {
-	    if ((outfd = open(outf, O_RDWR)) < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "could not open %s for "
-			 "sg writing", outf);
-                perror(ebuff);
-                return 1;
-            }
-            res = ioctl(outfd, SG_GET_VERSION_NUM, &t);
-            if ((res < 0) || (t < 30122)) {
-                fprintf(stderr, ME "sg driver prior to 3.1.22\n");
-                return 1;
-            }
-            if (ioctl(outfd, SG_GET_RESERVED_SIZE, &t) < 0) {
-                perror(ME "SG_GET_RESERVED_SIZE error");
-                return 1;
-	    }
-            out_res_sz = bs * bpt;
-	    if (out_res_sz > t) {
-		if (ioctl(outfd, SG_SET_RESERVED_SIZE, &out_res_sz) < 0) {
-		    perror(ME "SG_SET_RESERVED_SIZE error");
-		    return 1;
+	} else if (FT_SG == in_type) {
+		if ((infd = open(inf, O_RDWR)) < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 ME "could not open %s for sg reading", inf);
+			perror(ebuff);
+			return 1;
 		}
-	    }
-	    if (NULL == wrkMmap) {
-		wrkMmap = mmap(NULL, out_res_sz, PROT_READ | PROT_WRITE,
-			       MAP_SHARED, outfd, 0);
+		res = ioctl(infd, SG_GET_VERSION_NUM, &t);
+		if ((res < 0) || (t < 30122)) {
+			fprintf(stderr, ME "sg driver prior to 3.1.22\n");
+			return 1;
+		}
+		in_res_sz = bs * bpt;
+		if (0 != (in_res_sz % psz))	/* round up to next page */
+			in_res_sz = ((in_res_sz / psz) + 1) * psz;
+		if (ioctl(infd, SG_GET_RESERVED_SIZE, &t) < 0) {
+			perror(ME "SG_GET_RESERVED_SIZE error");
+			return 1;
+		}
+		if (in_res_sz > t) {
+			if (ioctl(infd, SG_SET_RESERVED_SIZE, &in_res_sz) < 0) {
+				perror(ME "SG_SET_RESERVED_SIZE error");
+				return 1;
+			}
+		}
+		wrkMmap = mmap(NULL, in_res_sz, PROT_READ | PROT_WRITE,
+			       MAP_SHARED, infd, 0);
 		if (MAP_FAILED == wrkMmap) {
-		    snprintf(ebuff, EBUFF_SZ,
-		    	     ME "error using mmap() on file: %s", outf);
-		    perror(ebuff);
-		    return 1;
+			snprintf(ebuff, EBUFF_SZ,
+				 ME "error using mmap() on file: %s", inf);
+			perror(ebuff);
+			return 1;
 		}
-	    }
-        }
-        else if (FT_DEV_NULL == out_type)
-            outfd = -1; /* don't bother opening */
-	else {
-	    if (FT_RAW != out_type) {
-		if ((outfd = open(outf, O_WRONLY | O_CREAT, 0666)) < 0) {
-		    snprintf(ebuff, EBUFF_SZ,
-			     ME "could not open %s for writing", outf);
-		    perror(ebuff);
-		    return 1;
+	} else {
+		if ((infd = open(inf, O_RDONLY)) < 0) {
+			snprintf(ebuff, EBUFF_SZ,
+				 ME "could not open %s for reading", inf);
+			perror(ebuff);
+			return 1;
+		} else if (skip > 0) {
+			llse_loff_t offset = skip;
+
+			offset *= bs;	/* could exceed 32 bits here! */
+			if (llse_llseek(infd, offset, SEEK_SET) < 0) {
+				snprintf(ebuff, EBUFF_SZ, ME "couldn't skip to "
+					 "required position on %s", inf);
+				perror(ebuff);
+				return 1;
+			}
 		}
-	    }
-	    else {
-		if ((outfd = open(outf, O_WRONLY)) < 0) {
-		    snprintf(ebuff, EBUFF_SZ, ME "could not open %s "
-		    	     "for raw writing", outf);
-		    perror(ebuff);
-		    return 1;
-		}
-	    }
-            if (seek > 0) {
-                llse_loff_t offset = seek;
-
-                offset *= bs;       /* could exceed 32 bits here! */
-                if (llse_llseek(outfd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ, ME "couldn't seek to "
-		    	     "required position on %s", outf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-        }
-    }
-    if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) {
-        fprintf(stderr,
-		"Can't have both 'if' as stdin _and_ 'of' as stdout\n");
-        return 1;
-    }
-#if 0
-    if ((FT_OTHER == in_type) && (FT_OTHER == out_type)) {
-        fprintf(stderr, "Both 'if' and 'of' can't be ordinary files\n");
-        return 1;
-    }
-#endif
-    if (dd_count < 0) {
-        if (FT_SG == in_type) {
-            res = read_capacity(infd, &in_num_sect, &in_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(in), continuing\n");
-                res = read_capacity(infd, &in_num_sect, &in_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", inf);
-                in_num_sect = -1;
-            }
-            else {
-#if 0
-                if (0 == in_sect_sz)
-                    in_sect_sz = bs;
-                else if (in_sect_sz > bs)
-                    in_num_sect *=  (in_sect_sz / bs);
-                else if (in_sect_sz < bs)
-                    in_num_sect /=  (bs / in_sect_sz);
-#endif
-                if (in_num_sect > skip)
-                    in_num_sect -= skip;
-            }
-        }
-        if (FT_SG == out_type) {
-            res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(out), continuing\n");
-                res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", outf);
-                out_num_sect = -1;
-            }
-            else {
-                if (out_num_sect > seek)
-                    out_num_sect -= seek;
-            }
-        }
-#ifdef SG_DEBUG
-    fprintf(stderr,
-	    "Start of loop, count=%d, in_num_sect=%d, out_num_sect=%d\n",
-            dd_count, in_num_sect, out_num_sect);
-#endif
-        if (in_num_sect > 0) {
-            if (out_num_sect > 0)
-                dd_count = (in_num_sect > out_num_sect) ? out_num_sect :
-                                                       in_num_sect;
-            else
-                dd_count = in_num_sect;
-        }
-        else
-            dd_count = out_num_sect;
-    }
-    if (dd_count < 0) {
-        fprintf(stderr, "Couldn't calculate count, please give one\n");
-        return 1;
-    }
-    if (do_dio && (FT_SG != in_type)) {
-    	do_dio = 0;
-	fprintf(stderr, ">>> dio only performed on 'of' side when 'if' is"
-		" an sg device\n");
-    }
-    if (do_dio) {
-        int fd;
-        char c;
-
-        if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
-            if (1 == read(fd, &c, 1)) {
-                if ('0' == c)
-                    fprintf(stderr, ">>> %s set to '0' but should be set "
-                            "to '1' for direct IO\n", proc_allow_dio);
-            }
-            close(fd);
-        }
-    }
-
-    if (wrkMmap)
-	wrkPos = wrkMmap;
-    else {
-	if ((FT_RAW == in_type) || (FT_RAW == out_type)) {
-	    wrkBuff = malloc(bs * bpt + psz);
-	    if (0 == wrkBuff) {
-		fprintf(stderr, "Not enough user memory for raw\n");
-		return 1;
-	    }
-	    wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
-				       (~(psz - 1)));
 	}
-	else {
-	    wrkBuff = malloc(bs * bpt);
-	    if (0 == wrkBuff) {
-		fprintf(stderr, "Not enough user memory\n");
-		return 1;
-	    }
-	    wrkPos = wrkBuff;
+
+	if (outf[0] && ('-' != outf[0])) {
+		out_type = dd_filetype(outf);
+
+		if (FT_ST == out_type) {
+			fprintf(stderr,
+				ME "unable to use scsi tape device %s\n", outf);
+			return 1;
+		} else if (FT_SG == out_type) {
+			if ((outfd = open(outf, O_RDWR)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for "
+					 "sg writing", outf);
+				perror(ebuff);
+				return 1;
+			}
+			res = ioctl(outfd, SG_GET_VERSION_NUM, &t);
+			if ((res < 0) || (t < 30122)) {
+				fprintf(stderr,
+					ME "sg driver prior to 3.1.22\n");
+				return 1;
+			}
+			if (ioctl(outfd, SG_GET_RESERVED_SIZE, &t) < 0) {
+				perror(ME "SG_GET_RESERVED_SIZE error");
+				return 1;
+			}
+			out_res_sz = bs * bpt;
+			if (out_res_sz > t) {
+				if (ioctl
+				    (outfd, SG_SET_RESERVED_SIZE,
+				     &out_res_sz) < 0) {
+					perror(ME "SG_SET_RESERVED_SIZE error");
+					return 1;
+				}
+			}
+			if (NULL == wrkMmap) {
+				wrkMmap =
+				    mmap(NULL, out_res_sz,
+					 PROT_READ | PROT_WRITE, MAP_SHARED,
+					 outfd, 0);
+				if (MAP_FAILED == wrkMmap) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "error using mmap() on file: %s",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		} else if (FT_DEV_NULL == out_type)
+			outfd = -1;	/* don't bother opening */
+		else {
+			if (FT_RAW != out_type) {
+				if ((outfd =
+				     open(outf, O_WRONLY | O_CREAT,
+					  0666)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "could not open %s for writing",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			} else {
+				if ((outfd = open(outf, O_WRONLY)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME "could not open %s "
+						 "for raw writing", outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+			if (seek > 0) {
+				llse_loff_t offset = seek;
+
+				offset *= bs;	/* could exceed 32 bits here! */
+				if (llse_llseek(outfd, offset, SEEK_SET) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME "couldn't seek to "
+						 "required position on %s",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		}
 	}
-    }
-
-    blocks_per = bpt;
-#ifdef SG_DEBUG
-    fprintf(stderr, "Start of loop, count=%d, blocks_per=%d\n",
-	    dd_count, blocks_per);
+	if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) {
+		fprintf(stderr,
+			"Can't have both 'if' as stdin _and_ 'of' as stdout\n");
+		return 1;
+	}
+#if 0
+	if ((FT_OTHER == in_type) && (FT_OTHER == out_type)) {
+		fprintf(stderr, "Both 'if' and 'of' can't be ordinary files\n");
+		return 1;
+	}
 #endif
-    if (do_time) {
-        start_tm.tv_sec = 0;
-        start_tm.tv_usec = 0;
-        gettimeofday(&start_tm, NULL);
-    }
-    req_count = dd_count;
+	if (dd_count < 0) {
+		if (FT_SG == in_type) {
+			res = read_capacity(infd, &in_num_sect, &in_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res =
+				    read_capacity(infd, &in_num_sect,
+						  &in_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n", inf);
+				in_num_sect = -1;
+			} else {
+#if 0
+				if (0 == in_sect_sz)
+					in_sect_sz = bs;
+				else if (in_sect_sz > bs)
+					in_num_sect *= (in_sect_sz / bs);
+				else if (in_sect_sz < bs)
+					in_num_sect /= (bs / in_sect_sz);
+#endif
+				if (in_num_sect > skip)
+					in_num_sect -= skip;
+			}
+		}
+		if (FT_SG == out_type) {
+			res = read_capacity(outfd, &out_num_sect, &out_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(out), continuing\n");
+				res =
+				    read_capacity(outfd, &out_num_sect,
+						  &out_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n",
+					outf);
+				out_num_sect = -1;
+			} else {
+				if (out_num_sect > seek)
+					out_num_sect -= seek;
+			}
+		}
+#ifdef SG_DEBUG
+		fprintf(stderr,
+			"Start of loop, count=%d, in_num_sect=%d, out_num_sect=%d\n",
+			dd_count, in_num_sect, out_num_sect);
+#endif
+		if (in_num_sect > 0) {
+			if (out_num_sect > 0)
+				dd_count =
+				    (in_num_sect >
+				     out_num_sect) ? out_num_sect : in_num_sect;
+			else
+				dd_count = in_num_sect;
+		} else
+			dd_count = out_num_sect;
+	}
+	if (dd_count < 0) {
+		fprintf(stderr, "Couldn't calculate count, please give one\n");
+		return 1;
+	}
+	if (do_dio && (FT_SG != in_type)) {
+		do_dio = 0;
+		fprintf(stderr,
+			">>> dio only performed on 'of' side when 'if' is"
+			" an sg device\n");
+	}
+	if (do_dio) {
+		int fd;
+		char c;
 
-    while (dd_count > 0) {
-        blocks = (dd_count > blocks_per) ? blocks_per : dd_count;
-        if (FT_SG == in_type) {
-	    int fua = fua_mode & 2;
+		if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
+			if (1 == read(fd, &c, 1)) {
+				if ('0' == c)
+					fprintf(stderr,
+						">>> %s set to '0' but should be set "
+						"to '1' for direct IO\n",
+						proc_allow_dio);
+			}
+			close(fd);
+		}
+	}
 
-            res = sg_read2(infd, wrkPos, blocks, skip, bs, scsi_cdbsz, fua, 1);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed, continuing (r)\n");
-                res = sg_read2(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
-			      fua, 1);
-            }
-            if (0 != res) {
-                fprintf(stderr, "sg_read2 failed, skip=%d\n", skip);
-                break;
-            }
-            else
-                in_full += blocks;
-        }
-        else {
-	    while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
-		   (EINTR == errno))
-		;
-            if (res < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "reading, skip=%d ", skip);
-                perror(ebuff);
-                break;
-            }
-            else if (res < blocks * bs) {
-                dd_count = 0;
-                blocks = res / bs;
-                if ((res % bs) > 0) {
-                    blocks++;
-                    in_partial++;
-                }
-            }
-            in_full += blocks;
-        }
+	if (wrkMmap)
+		wrkPos = wrkMmap;
+	else {
+		if ((FT_RAW == in_type) || (FT_RAW == out_type)) {
+			wrkBuff = malloc(bs * bpt + psz);
+			if (0 == wrkBuff) {
+				fprintf(stderr,
+					"Not enough user memory for raw\n");
+				return 1;
+			}
+			wrkPos =
+			    (unsigned char *)(((unsigned long)wrkBuff + psz - 1)
+					      & (~(psz - 1)));
+		} else {
+			wrkBuff = malloc(bs * bpt);
+			if (0 == wrkBuff) {
+				fprintf(stderr, "Not enough user memory\n");
+				return 1;
+			}
+			wrkPos = wrkBuff;
+		}
+	}
 
-        if (FT_SG == out_type) {
-            int do_mmap = (FT_SG == in_type) ? 0 : 1;
-	    int fua = fua_mode & 1;
-	    int dio_res = do_dio;
+	blocks_per = bpt;
+#ifdef SG_DEBUG
+	fprintf(stderr, "Start of loop, count=%d, blocks_per=%d\n",
+		dd_count, blocks_per);
+#endif
+	if (do_time) {
+		start_tm.tv_sec = 0;
+		start_tm.tv_usec = 0;
+		gettimeofday(&start_tm, NULL);
+	}
+	req_count = dd_count;
 
-            res = sg_write2(outfd, wrkPos, blocks, seek, bs, scsi_cdbsz, fua,
-			   do_mmap, &dio_res);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed, continuing (w)\n");
-                res = sg_write2(outfd, wrkPos, blocks, seek, bs, scsi_cdbsz,
-			       fua, do_mmap, &dio_res);
-            }
-            else if (0 != res) {
-                fprintf(stderr, "sg_write2 failed, seek=%d\n", seek);
-                break;
-            }
-            else {
-                out_full += blocks;
-		if (do_dio && (0 == dio_res))
-		    num_dio_not_done++;
-	    }
-        }
-        else if (FT_DEV_NULL == out_type)
-            out_full += blocks; /* act as if written out without error */
-        else {
-	    while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
-		   && (EINTR == errno))
-		;
-            if (res < 0) {
-                snprintf(ebuff, EBUFF_SZ, ME "writing, seek=%d ", seek);
-                perror(ebuff);
-                break;
-            }
-            else if (res < blocks * bs) {
-                fprintf(stderr, "output file probably full, seek=%d ", seek);
-                blocks = res / bs;
-                out_full += blocks;
-                if ((res % bs) > 0)
-                    out_partial++;
-                break;
-            }
-            else
-                out_full += blocks;
-        }
-        if (dd_count > 0)
-            dd_count -= blocks;
-        skip += blocks;
-        seek += blocks;
-    }
-    if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
-        struct timeval res_tm;
-        double a, b;
+	while (dd_count > 0) {
+		blocks = (dd_count > blocks_per) ? blocks_per : dd_count;
+		if (FT_SG == in_type) {
+			int fua = fua_mode & 2;
 
-        gettimeofday(&end_tm, NULL);
-        res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
-        res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
-        if (res_tm.tv_usec < 0) {
-            --res_tm.tv_sec;
-            res_tm.tv_usec += 1000000;
-        }
-        a = res_tm.tv_sec;
-        a += (0.000001 * res_tm.tv_usec);
-        b = (double)bs * (req_count - dd_count);
-        printf("time to transfer data was %d.%06d secs",
-               (int)res_tm.tv_sec, (int)res_tm.tv_usec);
-        if ((a > 0.00001) && (b > 511))
-            printf(", %.2f MB/sec\n", b / (a * 1000000.0));
-        else
-            printf("\n");
-    }
-    if (do_sync) {
-        if (FT_SG == out_type) {
-            fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
-            res = sync_cache(outfd);
-            if (2 == res) {
-                fprintf(stderr,
-                        "Unit attention, media changed(in), continuing\n");
-                res = sync_cache(outfd);
-            }
-            if (0 != res)
-                fprintf(stderr, "Unable to synchronize cache\n");
-        }
-    }
+			res =
+			    sg_read2(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
+				     fua, 1);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed, continuing (r)\n");
+				res =
+				    sg_read2(infd, wrkPos, blocks, skip, bs,
+					     scsi_cdbsz, fua, 1);
+			}
+			if (0 != res) {
+				fprintf(stderr, "sg_read2 failed, skip=%d\n",
+					skip);
+				break;
+			} else
+				in_full += blocks;
+		} else {
+			while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
+			       (EINTR == errno)) ;
+			if (res < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "reading, skip=%d ", skip);
+				perror(ebuff);
+				break;
+			} else if (res < blocks * bs) {
+				dd_count = 0;
+				blocks = res / bs;
+				if ((res % bs) > 0) {
+					blocks++;
+					in_partial++;
+				}
+			}
+			in_full += blocks;
+		}
 
-    if (wrkBuff) free(wrkBuff);
-    if (STDIN_FILENO != infd)
-        close(infd);
-    if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type))
-        close(outfd);
-    res = 0;
-    if (0 != dd_count) {
-        fprintf(stderr, "Some error occurred,");
-	res = 2;
-    }
-    print_stats();
-    if (sum_of_resids)
-        fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
-		sum_of_resids);
-    if (num_dio_not_done)
-        fprintf(stderr, ">> dio requested but _not done %d times\n",
-		num_dio_not_done);
-    return res;
+		if (FT_SG == out_type) {
+			int do_mmap = (FT_SG == in_type) ? 0 : 1;
+			int fua = fua_mode & 1;
+			int dio_res = do_dio;
+
+			res =
+			    sg_write2(outfd, wrkPos, blocks, seek, bs,
+				      scsi_cdbsz, fua, do_mmap, &dio_res);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed, continuing (w)\n");
+				res =
+				    sg_write2(outfd, wrkPos, blocks, seek, bs,
+					      scsi_cdbsz, fua, do_mmap,
+					      &dio_res);
+			} else if (0 != res) {
+				fprintf(stderr, "sg_write2 failed, seek=%d\n",
+					seek);
+				break;
+			} else {
+				out_full += blocks;
+				if (do_dio && (0 == dio_res))
+					num_dio_not_done++;
+			}
+		} else if (FT_DEV_NULL == out_type)
+			out_full += blocks;	/* act as if written out without error */
+		else {
+			while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
+			       && (EINTR == errno)) ;
+			if (res < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "writing, seek=%d ", seek);
+				perror(ebuff);
+				break;
+			} else if (res < blocks * bs) {
+				fprintf(stderr,
+					"output file probably full, seek=%d ",
+					seek);
+				blocks = res / bs;
+				out_full += blocks;
+				if ((res % bs) > 0)
+					out_partial++;
+				break;
+			} else
+				out_full += blocks;
+		}
+		if (dd_count > 0)
+			dd_count -= blocks;
+		skip += blocks;
+		seek += blocks;
+	}
+	if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
+		struct timeval res_tm;
+		double a, b;
+
+		gettimeofday(&end_tm, NULL);
+		res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
+		res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
+		if (res_tm.tv_usec < 0) {
+			--res_tm.tv_sec;
+			res_tm.tv_usec += 1000000;
+		}
+		a = res_tm.tv_sec;
+		a += (0.000001 * res_tm.tv_usec);
+		b = (double)bs *(req_count - dd_count);
+		printf("time to transfer data was %d.%06d secs",
+		       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
+		if ((a > 0.00001) && (b > 511))
+			printf(", %.2f MB/sec\n", b / (a * 1000000.0));
+		else
+			printf("\n");
+	}
+	if (do_sync) {
+		if (FT_SG == out_type) {
+			fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
+			res = sync_cache(outfd);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res = sync_cache(outfd);
+			}
+			if (0 != res)
+				fprintf(stderr,
+					"Unable to synchronize cache\n");
+		}
+	}
+
+	if (wrkBuff)
+		free(wrkBuff);
+	if (STDIN_FILENO != infd)
+		close(infd);
+	if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type))
+		close(outfd);
+	res = 0;
+	if (0 != dd_count) {
+		fprintf(stderr, "Some error occurred,");
+		res = 2;
+	}
+	print_stats();
+	if (sum_of_resids)
+		fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
+			sum_of_resids);
+	if (num_dio_not_done)
+		fprintf(stderr, ">> dio requested but _not done %d times\n",
+			num_dio_not_done);
+	return res;
 }
 
 static void guarded_stop_in(Rq_coll * clp)
 {
-    pthread_mutex_lock(&clp->in_mutex);
-    clp->in_stop = 1;
-    pthread_mutex_unlock(&clp->in_mutex);
+	pthread_mutex_lock(&clp->in_mutex);
+	clp->in_stop = 1;
+	pthread_mutex_unlock(&clp->in_mutex);
 }
 
 static void guarded_stop_out(Rq_coll * clp)
 {
-    pthread_mutex_lock(&clp->out_mutex);
-    clp->out_stop = 1;
-    pthread_mutex_unlock(&clp->out_mutex);
+	pthread_mutex_lock(&clp->out_mutex);
+	clp->out_stop = 1;
+	pthread_mutex_unlock(&clp->out_mutex);
 }
 
 static void guarded_stop_both(Rq_coll * clp)
 {
-    guarded_stop_in(clp);
-    guarded_stop_out(clp);
+	guarded_stop_in(clp);
+	guarded_stop_out(clp);
 }
 
-void * sig_listen_thread(void * v_clp)
+void *sig_listen_thread(void *v_clp)
 {
-    Rq_coll * clp = (Rq_coll *)v_clp;
-    int sig_number;
+	Rq_coll *clp = (Rq_coll *) v_clp;
+	int sig_number;
 
-    while (1) {
-        sigwait(&signal_set, &sig_number);
-        if (SIGINT == sig_number) {
-            fprintf(stderr, ME "interrupted by SIGINT\n");
-	    guarded_stop_both(clp);
-            pthread_cond_broadcast(&clp->out_sync_cv);
-        }
-    }
-    return NULL;
-}
-
-void cleanup_in(void * v_clp)
-{
-    Rq_coll * clp = (Rq_coll *)v_clp;
-
-    fprintf(stderr, "thread cancelled while in mutex held\n");
-    clp->in_stop = 1;
-    pthread_mutex_unlock(&clp->in_mutex);
-    guarded_stop_out(clp);
-    pthread_cond_broadcast(&clp->out_sync_cv);
-}
-
-void cleanup_out(void * v_clp)
-{
-    Rq_coll * clp = (Rq_coll *)v_clp;
-
-    fprintf(stderr, "thread cancelled while out mutex held\n");
-    clp->out_stop = 1;
-    pthread_mutex_unlock(&clp->out_mutex);
-    guarded_stop_in(clp);
-    pthread_cond_broadcast(&clp->out_sync_cv);
-}
-
-void * read_write_thread(void * v_clp)
-{
-    Rq_coll * clp = (Rq_coll *)v_clp;
-    Rq_elem rel;
-    Rq_elem * rep = &rel;
-    size_t psz = 0;
-    int sz = clp->bpt * clp->bs;
-    int stop_after_write = 0;
-    int seek_skip =  clp->seek - clp->skip;
-    int blocks, status;
-
-    memset(rep, 0, sizeof(Rq_elem));
-    psz = getpagesize();
-    if (NULL == (rep->alloc_bp = malloc(sz + psz)))
-        err_exit(ENOMEM, "out of memory creating user buffers\n");
-    rep->buffp = (unsigned char *)(((unsigned long)rep->alloc_bp + psz - 1) &
-				   (~(psz - 1)));
-    /* Follow clp members are constant during lifetime of thread */
-    rep->bs = clp->bs;
-    rep->fua_mode = clp->fua_mode;
-    rep->dio = clp->dio;
-    rep->infd = clp->infd;
-    rep->outfd = clp->outfd;
-    rep->debug = clp->debug;
-    rep->in_scsi_type = clp->in_scsi_type;
-    rep->out_scsi_type = clp->out_scsi_type;
-    rep->cdbsz = clp->cdbsz;
-
-    while (1) {
-        status = pthread_mutex_lock(&clp->in_mutex);
-        if (0 != status) err_exit(status, "lock in_mutex");
-        if (clp->in_stop || (clp->in_count <= 0)) {
-            /* no more to do, exit loop then thread */
-            status = pthread_mutex_unlock(&clp->in_mutex);
-            if (0 != status) err_exit(status, "unlock in_mutex");
-            break;
-        }
-        blocks = (clp->in_count > clp->bpt) ? clp->bpt : clp->in_count;
-        rep->wr = 0;
-        rep->blk = clp->in_blk;
-        rep->num_blks = blocks;
-        clp->in_blk += blocks;
-        clp->in_count -= blocks;
-
-        pthread_cleanup_push(cleanup_in, (void *)clp);
-        if (FT_SG == clp->in_type)
-            sg_in_operation(clp, rep); /* lets go of in_mutex mid operation */
-        else {
-            stop_after_write = normal_in_operation(clp, rep, blocks);
-	    status = pthread_mutex_unlock(&clp->in_mutex);
-	    if (0 != status) err_exit(status, "unlock in_mutex");
+	while (1) {
+		sigwait(&signal_set, &sig_number);
+		if (SIGINT == sig_number) {
+			fprintf(stderr, ME "interrupted by SIGINT\n");
+			guarded_stop_both(clp);
+			pthread_cond_broadcast(&clp->out_sync_cv);
+		}
 	}
-        pthread_cleanup_pop(0);
+	return NULL;
+}
 
-        status = pthread_mutex_lock(&clp->out_mutex);
-        if (0 != status) err_exit(status, "lock out_mutex");
-	if (FT_DEV_NULL != clp->out_type) {
-	    while ((! clp->out_stop) &&
-		   ((rep->blk + seek_skip) != clp->out_blk)) {
-		/* if write would be out of sequence then wait */
-		pthread_cleanup_push(cleanup_out, (void *)clp);
-		status = pthread_cond_wait(&clp->out_sync_cv, &clp->out_mutex);
-		if (0 != status) err_exit(status, "cond out_sync_cv");
+void cleanup_in(void *v_clp)
+{
+	Rq_coll *clp = (Rq_coll *) v_clp;
+
+	fprintf(stderr, "thread cancelled while in mutex held\n");
+	clp->in_stop = 1;
+	pthread_mutex_unlock(&clp->in_mutex);
+	guarded_stop_out(clp);
+	pthread_cond_broadcast(&clp->out_sync_cv);
+}
+
+void cleanup_out(void *v_clp)
+{
+	Rq_coll *clp = (Rq_coll *) v_clp;
+
+	fprintf(stderr, "thread cancelled while out mutex held\n");
+	clp->out_stop = 1;
+	pthread_mutex_unlock(&clp->out_mutex);
+	guarded_stop_in(clp);
+	pthread_cond_broadcast(&clp->out_sync_cv);
+}
+
+void *read_write_thread(void *v_clp)
+{
+	Rq_coll *clp = (Rq_coll *) v_clp;
+	Rq_elem rel;
+	Rq_elem *rep = &rel;
+	size_t psz = 0;
+	int sz = clp->bpt * clp->bs;
+	int stop_after_write = 0;
+	int seek_skip = clp->seek - clp->skip;
+	int blocks, status;
+
+	memset(rep, 0, sizeof(Rq_elem));
+	psz = getpagesize();
+	if (NULL == (rep->alloc_bp = malloc(sz + psz)))
+		err_exit(ENOMEM, "out of memory creating user buffers\n");
+	rep->buffp =
+	    (unsigned char *)(((unsigned long)rep->alloc_bp + psz - 1) &
+			      (~(psz - 1)));
+	/* Follow clp members are constant during lifetime of thread */
+	rep->bs = clp->bs;
+	rep->fua_mode = clp->fua_mode;
+	rep->dio = clp->dio;
+	rep->infd = clp->infd;
+	rep->outfd = clp->outfd;
+	rep->debug = clp->debug;
+	rep->in_scsi_type = clp->in_scsi_type;
+	rep->out_scsi_type = clp->out_scsi_type;
+	rep->cdbsz = clp->cdbsz;
+
+	while (1) {
+		status = pthread_mutex_lock(&clp->in_mutex);
+		if (0 != status)
+			err_exit(status, "lock in_mutex");
+		if (clp->in_stop || (clp->in_count <= 0)) {
+			/* no more to do, exit loop then thread */
+			status = pthread_mutex_unlock(&clp->in_mutex);
+			if (0 != status)
+				err_exit(status, "unlock in_mutex");
+			break;
+		}
+		blocks = (clp->in_count > clp->bpt) ? clp->bpt : clp->in_count;
+		rep->wr = 0;
+		rep->blk = clp->in_blk;
+		rep->num_blks = blocks;
+		clp->in_blk += blocks;
+		clp->in_count -= blocks;
+
+		pthread_cleanup_push(cleanup_in, (void *)clp);
+		if (FT_SG == clp->in_type)
+			sg_in_operation(clp, rep);	/* lets go of in_mutex mid operation */
+		else {
+			stop_after_write =
+			    normal_in_operation(clp, rep, blocks);
+			status = pthread_mutex_unlock(&clp->in_mutex);
+			if (0 != status)
+				err_exit(status, "unlock in_mutex");
+		}
 		pthread_cleanup_pop(0);
-	    }
-	}
 
-        if (clp->out_stop || (clp->out_count <= 0)) {
-            if (! clp->out_stop)
-                clp->out_stop = 1;
-            status = pthread_mutex_unlock(&clp->out_mutex);
-            if (0 != status) err_exit(status, "unlock out_mutex");
-            break;
-        }
-        if (stop_after_write)
-            clp->out_stop = 1;
-        rep->wr = 1;
-        rep->blk = clp->out_blk;
-        /* rep->num_blks = blocks; */
-        clp->out_blk += blocks;
-        clp->out_count -= blocks;
+		status = pthread_mutex_lock(&clp->out_mutex);
+		if (0 != status)
+			err_exit(status, "lock out_mutex");
+		if (FT_DEV_NULL != clp->out_type) {
+			while ((!clp->out_stop) &&
+			       ((rep->blk + seek_skip) != clp->out_blk)) {
+				/* if write would be out of sequence then wait */
+				pthread_cleanup_push(cleanup_out, (void *)clp);
+				status =
+				    pthread_cond_wait(&clp->out_sync_cv,
+						      &clp->out_mutex);
+				if (0 != status)
+					err_exit(status, "cond out_sync_cv");
+				pthread_cleanup_pop(0);
+			}
+		}
 
-        pthread_cleanup_push(cleanup_out, (void *)clp);
-        if (FT_SG == clp->out_type)
-            sg_out_operation(clp, rep); /* releases out_mutex mid operation */
-	else if (FT_DEV_NULL == clp->out_type) {
-	    /* skip actual write operation */
-	    clp->out_done_count -= blocks;
-	    status = pthread_mutex_unlock(&clp->out_mutex);
-	    if (0 != status) err_exit(status, "unlock out_mutex");
-	}
-        else {
-            normal_out_operation(clp, rep, blocks);
-	    status = pthread_mutex_unlock(&clp->out_mutex);
-	    if (0 != status) err_exit(status, "unlock out_mutex");
-	}
-        pthread_cleanup_pop(0);
+		if (clp->out_stop || (clp->out_count <= 0)) {
+			if (!clp->out_stop)
+				clp->out_stop = 1;
+			status = pthread_mutex_unlock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "unlock out_mutex");
+			break;
+		}
+		if (stop_after_write)
+			clp->out_stop = 1;
+		rep->wr = 1;
+		rep->blk = clp->out_blk;
+		/* rep->num_blks = blocks; */
+		clp->out_blk += blocks;
+		clp->out_count -= blocks;
 
-        if (stop_after_write)
-            break;
-        pthread_cond_broadcast(&clp->out_sync_cv);
-    } /* end of while loop */
-    if (rep->alloc_bp) free(rep->alloc_bp);
-    status = pthread_mutex_lock(&clp->in_mutex);
-    if (0 != status) err_exit(status, "lock in_mutex");
-    if (! clp->in_stop)
-        clp->in_stop = 1;  /* flag other workers to stop */
-    status = pthread_mutex_unlock(&clp->in_mutex);
-    if (0 != status) err_exit(status, "unlock in_mutex");
-    pthread_cond_broadcast(&clp->out_sync_cv);
-    return stop_after_write ? NULL : v_clp;
+		pthread_cleanup_push(cleanup_out, (void *)clp);
+		if (FT_SG == clp->out_type)
+			sg_out_operation(clp, rep);	/* releases out_mutex mid operation */
+		else if (FT_DEV_NULL == clp->out_type) {
+			/* skip actual write operation */
+			clp->out_done_count -= blocks;
+			status = pthread_mutex_unlock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "unlock out_mutex");
+		} else {
+			normal_out_operation(clp, rep, blocks);
+			status = pthread_mutex_unlock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "unlock out_mutex");
+		}
+		pthread_cleanup_pop(0);
+
+		if (stop_after_write)
+			break;
+		pthread_cond_broadcast(&clp->out_sync_cv);
+	}			/* end of while loop */
+	if (rep->alloc_bp)
+		free(rep->alloc_bp);
+	status = pthread_mutex_lock(&clp->in_mutex);
+	if (0 != status)
+		err_exit(status, "lock in_mutex");
+	if (!clp->in_stop)
+		clp->in_stop = 1;	/* flag other workers to stop */
+	status = pthread_mutex_unlock(&clp->in_mutex);
+	if (0 != status)
+		err_exit(status, "unlock in_mutex");
+	pthread_cond_broadcast(&clp->out_sync_cv);
+	return stop_after_write ? NULL : v_clp;
 }
 
 int normal_in_operation(Rq_coll * clp, Rq_elem * rep, int blocks)
 {
-    int res;
-    int stop_after_write = 0;
+	int res;
+	int stop_after_write = 0;
 
-    /* enters holding in_mutex */
-    while (((res = read(clp->infd, rep->buffp,
-                        blocks * clp->bs)) < 0) && (EINTR == errno))
-        ;
-    if (res < 0) {
-	if (clp->coe) {
-	    memset(rep->buffp, 0, rep->num_blks * rep->bs);
-	    fprintf(stderr, ">> substituted zeros for in blk=%d for "
-		    "%d bytes, %s\n", rep->blk,
-		    rep->num_blks * rep->bs, strerror(errno));
-	    res = rep->num_blks * clp->bs;
+	/* enters holding in_mutex */
+	while (((res = read(clp->infd, rep->buffp,
+			    blocks * clp->bs)) < 0) && (EINTR == errno)) ;
+	if (res < 0) {
+		if (clp->coe) {
+			memset(rep->buffp, 0, rep->num_blks * rep->bs);
+			fprintf(stderr,
+				">> substituted zeros for in blk=%d for "
+				"%d bytes, %s\n", rep->blk,
+				rep->num_blks * rep->bs, strerror(errno));
+			res = rep->num_blks * clp->bs;
+		} else {
+			fprintf(stderr, "error in normal read, %s\n",
+				strerror(errno));
+			clp->in_stop = 1;
+			guarded_stop_out(clp);
+			return 1;
+		}
 	}
-	else {
-	    fprintf(stderr, "error in normal read, %s\n", strerror(errno));
-	    clp->in_stop = 1;
-	    guarded_stop_out(clp);
-	    return 1;
+	if (res < blocks * clp->bs) {
+		int o_blocks = blocks;
+		stop_after_write = 1;
+		blocks = res / clp->bs;
+		if ((res % clp->bs) > 0) {
+			blocks++;
+			clp->in_partial++;
+		}
+		/* Reverse out + re-apply blocks on clp */
+		clp->in_blk -= o_blocks;
+		clp->in_count += o_blocks;
+		rep->num_blks = blocks;
+		clp->in_blk += blocks;
+		clp->in_count -= blocks;
 	}
-    }
-    if (res < blocks * clp->bs) {
-        int o_blocks = blocks;
-        stop_after_write = 1;
-        blocks = res / clp->bs;
-        if ((res % clp->bs) > 0) {
-            blocks++;
-            clp->in_partial++;
-        }
-        /* Reverse out + re-apply blocks on clp */
-        clp->in_blk -= o_blocks;
-        clp->in_count += o_blocks;
-        rep->num_blks = blocks;
-        clp->in_blk += blocks;
-        clp->in_count -= blocks;
-    }
-    clp->in_done_count -= blocks;
-    return stop_after_write;
+	clp->in_done_count -= blocks;
+	return stop_after_write;
 }
 
 void normal_out_operation(Rq_coll * clp, Rq_elem * rep, int blocks)
 {
-    int res;
+	int res;
 
-    /* enters holding out_mutex */
-    while (((res = write(clp->outfd, rep->buffp,
-                 rep->num_blks * clp->bs)) < 0) && (EINTR == errno))
-        ;
-    if (res < 0) {
-	if (clp->coe) {
-	    fprintf(stderr, ">> ignored error for out blk=%d for "
-		    "%d bytes, %s\n", rep->blk,
-		    rep->num_blks * rep->bs, strerror(errno));
-	    res = rep->num_blks * clp->bs;
+	/* enters holding out_mutex */
+	while (((res = write(clp->outfd, rep->buffp,
+			     rep->num_blks * clp->bs)) < 0)
+	       && (EINTR == errno)) ;
+	if (res < 0) {
+		if (clp->coe) {
+			fprintf(stderr, ">> ignored error for out blk=%d for "
+				"%d bytes, %s\n", rep->blk,
+				rep->num_blks * rep->bs, strerror(errno));
+			res = rep->num_blks * clp->bs;
+		} else {
+			fprintf(stderr, "error normal write, %s\n",
+				strerror(errno));
+			guarded_stop_in(clp);
+			clp->out_stop = 1;
+			return;
+		}
 	}
-	else {
-	    fprintf(stderr, "error normal write, %s\n", strerror(errno));
-	    guarded_stop_in(clp);
-	    clp->out_stop = 1;
-	    return;
+	if (res < blocks * clp->bs) {
+		blocks = res / clp->bs;
+		if ((res % clp->bs) > 0) {
+			blocks++;
+			clp->out_partial++;
+		}
+		rep->num_blks = blocks;
 	}
-    }
-    if (res < blocks * clp->bs) {
-        blocks = res / clp->bs;
-        if ((res % clp->bs) > 0) {
-            blocks++;
-            clp->out_partial++;
-        }
-        rep->num_blks = blocks;
-    }
-    clp->out_done_count -= blocks;
+	clp->out_done_count -= blocks;
 }
 
 void sg_in_operation(Rq_coll * clp, Rq_elem * rep)
 {
-    int res;
-    int status;
+	int res;
+	int status;
 
-    /* enters holding in_mutex */
-    while (1) {
-        res = sg_start_io(rep);
-        if (1 == res)
-            err_exit(ENOMEM, "sg starting in command");
-        else if (res < 0) {
-            fprintf(stderr, ME "inputting to sg failed, blk=%d\n",
-		    rep->blk);
-	    status = pthread_mutex_unlock(&clp->in_mutex);
-	    if (0 != status) err_exit(status, "unlock in_mutex");
-	    guarded_stop_both(clp);
-	    return;
-        }
-        /* Now release in mutex to let other reads run in parallel */
-        status = pthread_mutex_unlock(&clp->in_mutex);
-        if (0 != status) err_exit(status, "unlock in_mutex");
+	/* enters holding in_mutex */
+	while (1) {
+		res = sg_start_io(rep);
+		if (1 == res)
+			err_exit(ENOMEM, "sg starting in command");
+		else if (res < 0) {
+			fprintf(stderr, ME "inputting to sg failed, blk=%d\n",
+				rep->blk);
+			status = pthread_mutex_unlock(&clp->in_mutex);
+			if (0 != status)
+				err_exit(status, "unlock in_mutex");
+			guarded_stop_both(clp);
+			return;
+		}
+		/* Now release in mutex to let other reads run in parallel */
+		status = pthread_mutex_unlock(&clp->in_mutex);
+		if (0 != status)
+			err_exit(status, "unlock in_mutex");
 
-        res = sg_finish_io(rep->wr, rep, &clp->aux_mutex);
-        if (res < 0) {
-            if (clp->coe) {
-                memset(rep->buffp, 0, rep->num_blks * rep->bs);
-                fprintf(stderr, ">> substituted zeros for in blk=%d for "
-                        "%d bytes\n", rep->blk, rep->num_blks * rep->bs);
-            }
-            else {
-                fprintf(stderr, "error finishing sg in command\n");
-		guarded_stop_both(clp);
-                return;
-            }
-        }
-        if (res <= 0) { /* looks good, going to return */
-            if (rep->dio_incomplete || rep->resid) {
-                status = pthread_mutex_lock(&clp->aux_mutex);
-                if (0 != status) err_exit(status, "lock aux_mutex");
-                clp->dio_incomplete += rep->dio_incomplete;
-                clp->sum_of_resids += rep->resid;
-                status = pthread_mutex_unlock(&clp->aux_mutex);
-                if (0 != status) err_exit(status, "unlock aux_mutex");
-            }
-            status = pthread_mutex_lock(&clp->in_mutex);
-            if (0 != status) err_exit(status, "lock in_mutex");
-            clp->in_done_count -= rep->num_blks;
-            status = pthread_mutex_unlock(&clp->in_mutex);
-            if (0 != status) err_exit(status, "unlock in_mutex");
-            return;
-        }
-        /* else assume 1 == res so try again with same addr, count info */
-        /* now re-acquire read mutex for balance */
-        /* N.B. This re-read could now be out of read sequence */
-        status = pthread_mutex_lock(&clp->in_mutex);
-        if (0 != status) err_exit(status, "lock in_mutex");
-    }
+		res = sg_finish_io(rep->wr, rep, &clp->aux_mutex);
+		if (res < 0) {
+			if (clp->coe) {
+				memset(rep->buffp, 0, rep->num_blks * rep->bs);
+				fprintf(stderr,
+					">> substituted zeros for in blk=%d for "
+					"%d bytes\n", rep->blk,
+					rep->num_blks * rep->bs);
+			} else {
+				fprintf(stderr,
+					"error finishing sg in command\n");
+				guarded_stop_both(clp);
+				return;
+			}
+		}
+		if (res <= 0) {	/* looks good, going to return */
+			if (rep->dio_incomplete || rep->resid) {
+				status = pthread_mutex_lock(&clp->aux_mutex);
+				if (0 != status)
+					err_exit(status, "lock aux_mutex");
+				clp->dio_incomplete += rep->dio_incomplete;
+				clp->sum_of_resids += rep->resid;
+				status = pthread_mutex_unlock(&clp->aux_mutex);
+				if (0 != status)
+					err_exit(status, "unlock aux_mutex");
+			}
+			status = pthread_mutex_lock(&clp->in_mutex);
+			if (0 != status)
+				err_exit(status, "lock in_mutex");
+			clp->in_done_count -= rep->num_blks;
+			status = pthread_mutex_unlock(&clp->in_mutex);
+			if (0 != status)
+				err_exit(status, "unlock in_mutex");
+			return;
+		}
+		/* else assume 1 == res so try again with same addr, count info */
+		/* now re-acquire read mutex for balance */
+		/* N.B. This re-read could now be out of read sequence */
+		status = pthread_mutex_lock(&clp->in_mutex);
+		if (0 != status)
+			err_exit(status, "lock in_mutex");
+	}
 }
 
 void sg_out_operation(Rq_coll * clp, Rq_elem * rep)
 {
-    int res;
-    int status;
+	int res;
+	int status;
 
-    /* enters holding out_mutex */
-    while (1) {
-        res = sg_start_io(rep);
-        if (1 == res)
-            err_exit(ENOMEM, "sg starting out command");
-        else if (res < 0) {
-            fprintf(stderr, ME "outputting from sg failed, blk=%d\n",
-                    rep->blk);
-	    status = pthread_mutex_unlock(&clp->out_mutex);
-	    if (0 != status) err_exit(status, "unlock out_mutex");
-	    guarded_stop_both(clp);
-	    return;
-        }
-        /* Now release in mutex to let other reads run in parallel */
-        status = pthread_mutex_unlock(&clp->out_mutex);
-        if (0 != status) err_exit(status, "unlock out_mutex");
+	/* enters holding out_mutex */
+	while (1) {
+		res = sg_start_io(rep);
+		if (1 == res)
+			err_exit(ENOMEM, "sg starting out command");
+		else if (res < 0) {
+			fprintf(stderr,
+				ME "outputting from sg failed, blk=%d\n",
+				rep->blk);
+			status = pthread_mutex_unlock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "unlock out_mutex");
+			guarded_stop_both(clp);
+			return;
+		}
+		/* Now release in mutex to let other reads run in parallel */
+		status = pthread_mutex_unlock(&clp->out_mutex);
+		if (0 != status)
+			err_exit(status, "unlock out_mutex");
 
-        res = sg_finish_io(rep->wr, rep, &clp->aux_mutex);
-        if (res < 0) {
-            if (clp->coe)
-                fprintf(stderr, ">> ignored error for out blk=%d for "
-                        "%d bytes\n", rep->blk, rep->num_blks * rep->bs);
-            else {
-                fprintf(stderr, "error finishing sg out command\n");
-		guarded_stop_both(clp);
-                return;
-            }
-        }
-        if (res <= 0) {
-            if (rep->dio_incomplete || rep->resid) {
-                status = pthread_mutex_lock(&clp->aux_mutex);
-                if (0 != status) err_exit(status, "lock aux_mutex");
-                clp->dio_incomplete += rep->dio_incomplete;
-                clp->sum_of_resids += rep->resid;
-                status = pthread_mutex_unlock(&clp->aux_mutex);
-                if (0 != status) err_exit(status, "unlock aux_mutex");
-            }
-            status = pthread_mutex_lock(&clp->out_mutex);
-            if (0 != status) err_exit(status, "lock out_mutex");
-            clp->out_done_count -= rep->num_blks;
-            status = pthread_mutex_unlock(&clp->out_mutex);
-            if (0 != status) err_exit(status, "unlock out_mutex");
-            return;
-        }
-        /* else assume 1 == res so try again with same addr, count info */
-        /* now re-acquire out mutex for balance */
-        /* N.B. This re-write could now be out of write sequence */
-        status = pthread_mutex_lock(&clp->out_mutex);
-        if (0 != status) err_exit(status, "lock out_mutex");
-    }
+		res = sg_finish_io(rep->wr, rep, &clp->aux_mutex);
+		if (res < 0) {
+			if (clp->coe)
+				fprintf(stderr,
+					">> ignored error for out blk=%d for "
+					"%d bytes\n", rep->blk,
+					rep->num_blks * rep->bs);
+			else {
+				fprintf(stderr,
+					"error finishing sg out command\n");
+				guarded_stop_both(clp);
+				return;
+			}
+		}
+		if (res <= 0) {
+			if (rep->dio_incomplete || rep->resid) {
+				status = pthread_mutex_lock(&clp->aux_mutex);
+				if (0 != status)
+					err_exit(status, "lock aux_mutex");
+				clp->dio_incomplete += rep->dio_incomplete;
+				clp->sum_of_resids += rep->resid;
+				status = pthread_mutex_unlock(&clp->aux_mutex);
+				if (0 != status)
+					err_exit(status, "unlock aux_mutex");
+			}
+			status = pthread_mutex_lock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "lock out_mutex");
+			clp->out_done_count -= rep->num_blks;
+			status = pthread_mutex_unlock(&clp->out_mutex);
+			if (0 != status)
+				err_exit(status, "unlock out_mutex");
+			return;
+		}
+		/* else assume 1 == res so try again with same addr, count info */
+		/* now re-acquire out mutex for balance */
+		/* N.B. This re-write could now be out of write sequence */
+		status = pthread_mutex_lock(&clp->out_mutex);
+		if (0 != status)
+			err_exit(status, "lock out_mutex");
+	}
 }
 
 int sg_start_io(Rq_elem * rep)
 {
-    sg_io_hdr_t * hp = &rep->io_hdr;
-    int fua = rep->wr ? (rep->fua_mode & 1) : (rep->fua_mode & 2);
-    int res;
+	sg_io_hdr_t *hp = &rep->io_hdr;
+	int fua = rep->wr ? (rep->fua_mode & 1) : (rep->fua_mode & 2);
+	int res;
 
-    if (sg_build_scsi_cdb(rep->cmd, rep->cdbsz, rep->num_blks, rep->blk,
-    			  rep->wr, fua, 0)) {
-        fprintf(stderr, ME "bad cdb build, start_blk=%d, blocks=%d\n",
-                rep->blk, rep->num_blks);
-        return -1;
-    }
-    memset(hp, 0, sizeof(sg_io_hdr_t));
-    hp->interface_id = 'S';
-    hp->cmd_len = rep->cdbsz;
-    hp->cmdp = rep->cmd;
-    hp->dxfer_direction = rep->wr ? SG_DXFER_TO_DEV : SG_DXFER_FROM_DEV;
-    hp->dxfer_len = rep->bs * rep->num_blks;
-    hp->dxferp = rep->buffp;
-    hp->mx_sb_len = sizeof(rep->sb);
-    hp->sbp = rep->sb;
-    hp->timeout = DEF_TIMEOUT;
-    hp->usr_ptr = rep;
-    hp->pack_id = rep->blk;
-    if (rep->dio)
-        hp->flags |= SG_FLAG_DIRECT_IO;
-    if (rep->debug > 8) {
-        fprintf(stderr, "sg_start_io: SCSI %s, blk=%d num_blks=%d\n",
-               rep->wr ? "WRITE" : "READ", rep->blk, rep->num_blks);
-        sg_print_command(hp->cmdp);
-        fprintf(stderr, "dir=%d, len=%d, dxfrp=%p, cmd_len=%d\n",
-                hp->dxfer_direction, hp->dxfer_len, hp->dxferp, hp->cmd_len);
-    }
+	if (sg_build_scsi_cdb(rep->cmd, rep->cdbsz, rep->num_blks, rep->blk,
+			      rep->wr, fua, 0)) {
+		fprintf(stderr, ME "bad cdb build, start_blk=%d, blocks=%d\n",
+			rep->blk, rep->num_blks);
+		return -1;
+	}
+	memset(hp, 0, sizeof(sg_io_hdr_t));
+	hp->interface_id = 'S';
+	hp->cmd_len = rep->cdbsz;
+	hp->cmdp = rep->cmd;
+	hp->dxfer_direction = rep->wr ? SG_DXFER_TO_DEV : SG_DXFER_FROM_DEV;
+	hp->dxfer_len = rep->bs * rep->num_blks;
+	hp->dxferp = rep->buffp;
+	hp->mx_sb_len = sizeof(rep->sb);
+	hp->sbp = rep->sb;
+	hp->timeout = DEF_TIMEOUT;
+	hp->usr_ptr = rep;
+	hp->pack_id = rep->blk;
+	if (rep->dio)
+		hp->flags |= SG_FLAG_DIRECT_IO;
+	if (rep->debug > 8) {
+		fprintf(stderr, "sg_start_io: SCSI %s, blk=%d num_blks=%d\n",
+			rep->wr ? "WRITE" : "READ", rep->blk, rep->num_blks);
+		sg_print_command(hp->cmdp);
+		fprintf(stderr, "dir=%d, len=%d, dxfrp=%p, cmd_len=%d\n",
+			hp->dxfer_direction, hp->dxfer_len, hp->dxferp,
+			hp->cmd_len);
+	}
 
-    while (((res = write(rep->wr ? rep->outfd : rep->infd, hp,
-                         sizeof(sg_io_hdr_t))) < 0) && (EINTR == errno))
-        ;
-    if (res < 0) {
-        if (ENOMEM == errno)
-            return 1;
-        perror("starting io on sg device, error");
-        return -1;
-    }
-  return 0;
+	while (((res = write(rep->wr ? rep->outfd : rep->infd, hp,
+			     sizeof(sg_io_hdr_t))) < 0) && (EINTR == errno)) ;
+	if (res < 0) {
+		if (ENOMEM == errno)
+			return 1;
+		perror("starting io on sg device, error");
+		return -1;
+	}
+	return 0;
 }
 
 /* -1 -> unrecoverable error, 0 -> successful, 1 -> try again */
 int sg_finish_io(int wr, Rq_elem * rep, pthread_mutex_t * a_mutp)
 {
-    int res, status;
-    sg_io_hdr_t io_hdr;
-    sg_io_hdr_t * hp;
+	int res, status;
+	sg_io_hdr_t io_hdr;
+	sg_io_hdr_t *hp;
 #if 0
-    static int testing = 0;     /* thread dubious! */
+	static int testing = 0;	/* thread dubious! */
 #endif
 
-    memset(&io_hdr, 0 , sizeof(sg_io_hdr_t));
-    /* FORCE_PACK_ID active set only read packet with matching pack_id */
-    io_hdr.interface_id = 'S';
-    io_hdr.dxfer_direction = rep->wr ? SG_DXFER_TO_DEV : SG_DXFER_FROM_DEV;
-    io_hdr.pack_id = rep->blk;
+	memset(&io_hdr, 0, sizeof(sg_io_hdr_t));
+	/* FORCE_PACK_ID active set only read packet with matching pack_id */
+	io_hdr.interface_id = 'S';
+	io_hdr.dxfer_direction = rep->wr ? SG_DXFER_TO_DEV : SG_DXFER_FROM_DEV;
+	io_hdr.pack_id = rep->blk;
 
-    while (((res = read(wr ? rep->outfd : rep->infd, &io_hdr,
-                        sizeof(sg_io_hdr_t))) < 0) && (EINTR == errno))
-        ;
-    if (res < 0) {
-        perror("finishing io on sg device, error");
-        return -1;
-    }
-    if (rep != (Rq_elem *)io_hdr.usr_ptr)
-        err_exit(0, "sg_finish_io: bad usr_ptr, request-response mismatch\n");
-    memcpy(&rep->io_hdr, &io_hdr, sizeof(sg_io_hdr_t));
-    hp = &rep->io_hdr;
-
-    switch (sg_err_category3(hp)) {
-        case SG_ERR_CAT_CLEAN:
-            break;
-        case SG_ERR_CAT_RECOVERED:
-            fprintf(stderr, "Recovered error on block=%d, num=%d\n",
-                    rep->blk, rep->num_blks);
-            break;
-        case SG_ERR_CAT_MEDIA_CHANGED:
-            return 1;
-        default:
-            {
-                char ebuff[EBUFF_SZ];
-
-                snprintf(ebuff, EBUFF_SZ,
-			 "%s blk=%d", rep->wr ? "writing": "reading", rep->blk);
-                status = pthread_mutex_lock(a_mutp);
-                if (0 != status) err_exit(status, "lock aux_mutex");
-                sg_chk_n_print3(ebuff, hp);
-                status = pthread_mutex_unlock(a_mutp);
-                if (0 != status) err_exit(status, "unlock aux_mutex");
-                return -1;
-            }
-    }
-#if 0
-    if (0 == (++testing % 100)) return -1;
-#endif
-    if (rep->dio &&
-        ((hp->info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
-        rep->dio_incomplete = 1; /* count dios done as indirect IO */
-    else
-        rep->dio_incomplete = 0;
-    rep->resid = hp->resid;
-    if (rep->debug > 8)
-        fprintf(stderr, "sg_finish_io: completed %s\n", wr ? "WRITE" : "READ");
-  return 0;
-}
-
-int sg_prepare(int fd, int bs, int bpt, int * scsi_typep)
-{
-    int res, t;
-
-    res = ioctl(fd, SG_GET_VERSION_NUM, &t);
-    if ((res < 0) || (t < 30000)) {
-        fprintf(stderr, ME "sg driver prior to 3.x.y\n");
-        return 1;
-    }
-    res = 0;
-    t = bs * bpt;
-    res = ioctl(fd, SG_SET_RESERVED_SIZE, &t);
-    if (res < 0)
-        perror(ME "SG_SET_RESERVED_SIZE error");
-    t = 1;
-    res = ioctl(fd, SG_SET_FORCE_PACK_ID, &t);
-    if (res < 0)
-        perror(ME "SG_SET_FORCE_PACK_ID error");
-    if (scsi_typep) {
-        struct sg_scsi_id info;
-
-        res = ioctl(fd, SG_GET_SCSI_ID, &info);
-        if (res < 0)
-            perror(ME "SG_SET_SCSI_ID error");
-        *scsi_typep = info.scsi_type;
-    }
-  return 0;
-}
-
-int do_scsi_sgp_read_write(char * device)
-{
-    int skip = 0;
-    int seek = 0;
-    int count = -1;
-    char inf[INOUTF_SZ];
-    char outf[INOUTF_SZ];
-    int res, k;
-    int in_num_sect = 0;
-    int out_num_sect = 0;
-    int num_threads = DEF_NUM_THREADS;
-    pthread_t threads[MAX_NUM_THREADS];
-    int do_time = 1;
-    int do_sync = 1;
-    int in_sect_sz, out_sect_sz, status, infull, outfull;
-    void * vp;
-    char ebuff[EBUFF_SZ];
-    struct timeval start_tm, end_tm;
-    Rq_coll rcoll;
-
-    print_msg(TEST_BREAK, __FUNCTION__);
-
-    memset(&rcoll, 0, sizeof(Rq_coll));
-    rcoll.bpt = DEF_BLOCKS_PER_TRANSFER;
-    rcoll.in_type = FT_OTHER;
-    rcoll.out_type = FT_OTHER;
-    rcoll.cdbsz = DEF_SCSI_CDBSZ;
-
-    strcpy(inf, "/dev/zero");
-    strcpy(outf, device);
-
-    if (rcoll.bs <= 0) {
-        rcoll.bs = DEF_BLOCK_SIZE;
-        fprintf(stderr, "Assume default 'bs' (block size) of %d bytes\n",
-                rcoll.bs);
-    }
-
-    if (rcoll.debug)
-        fprintf(stderr, ME "if=%s skip=%d of=%s seek=%d count=%d\n",
-               inf, skip, outf, seek, count);
-
-    rcoll.infd = STDIN_FILENO;
-    rcoll.outfd = STDOUT_FILENO;
-    if (inf[0] && ('-' != inf[0])) {
-    	rcoll.in_type = dd_filetype(inf);
-
-        if (FT_ST == rcoll.in_type) {
-            fprintf(stderr, ME "unable to use scsi tape device %s\n", inf);
-            return 1;
-        }
-        else if (FT_SG == rcoll.in_type) {
-            if ((rcoll.infd = open(inf, O_RDWR)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for sg reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-            if (sg_prepare(rcoll.infd, rcoll.bs, rcoll.bpt,
-                           &rcoll.in_scsi_type))
-                return 1;
-        }
-        else {
-            if ((rcoll.infd = open(inf, O_RDONLY)) < 0) {
-                snprintf(ebuff, EBUFF_SZ,
-			 ME "could not open %s for reading", inf);
-                perror(ebuff);
-                return 1;
-            }
-            else if (skip > 0) {
-                llse_loff_t offset = skip;
-
-                offset *= rcoll.bs;       /* could exceed 32 here! */
-                if (llse_llseek(rcoll.infd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-			ME "couldn't skip to required position on %s", inf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-        }
-    }
-    if (outf[0] && ('-' != outf[0])) {
-	rcoll.out_type = dd_filetype(outf);
-
-        if (FT_ST == rcoll.out_type) {
-            fprintf(stderr, ME "unable to use scsi tape device %s\n", outf);
-            return 1;
-        }
-        else if (FT_SG == rcoll.out_type) {
-	    if ((rcoll.outfd = open(outf, O_RDWR)) < 0) {
-                snprintf(ebuff,  EBUFF_SZ,
-			 ME "could not open %s for sg writing", outf);
-                perror(ebuff);
-                return 1;
-            }
-
-	    if (sg_prepare(rcoll.outfd, rcoll.bs, rcoll.bpt,
-			   &rcoll.out_scsi_type))
-		return 1;
-        }
-	else if (FT_DEV_NULL == rcoll.out_type)
-            rcoll.outfd = -1; /* don't bother opening */
-	else {
-	    if (FT_RAW != rcoll.out_type) {
-		if ((rcoll.outfd = open(outf, O_WRONLY | O_CREAT, 0666)) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-                             ME "could not open %s for writing", outf);
-                    perror(ebuff);
-                    return 1;
-                }
-	    }
-	    else {
-		if ((rcoll.outfd = open(outf, O_WRONLY)) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-                             ME "could not open %s for raw writing", outf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
-            if (seek > 0) {
-                llse_loff_t offset = seek;
-
-                offset *= rcoll.bs;       /* could exceed 32 bits here! */
-		if (llse_llseek(rcoll.outfd, offset, SEEK_SET) < 0) {
-                    snprintf(ebuff, EBUFF_SZ,
-			ME "couldn't seek to required position on %s", outf);
-                    perror(ebuff);
-                    return 1;
-                }
-            }
+	while (((res = read(wr ? rep->outfd : rep->infd, &io_hdr,
+			    sizeof(sg_io_hdr_t))) < 0) && (EINTR == errno)) ;
+	if (res < 0) {
+		perror("finishing io on sg device, error");
+		return -1;
 	}
-    }
-    if ((STDIN_FILENO == rcoll.infd) && (STDOUT_FILENO == rcoll.outfd)) {
-        fprintf(stderr, "Disallow both if and of to be stdin and stdout");
-        return 1;
-    }
-    if (count < 0) {
-        if (FT_SG == rcoll.in_type) {
-            res = read_capacity(rcoll.infd, &in_num_sect, &in_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(in), continuing\n");
-                res = read_capacity(rcoll.infd, &in_num_sect, &in_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", inf);
-                in_num_sect = -1;
-            }
-            else {
-                if (in_num_sect > skip)
-                    in_num_sect -= skip;
-            }
-        }
-        if (FT_SG == rcoll.out_type) {
-            res = read_capacity(rcoll.outfd, &out_num_sect, &out_sect_sz);
-            if (2 == res) {
-                fprintf(stderr,
-			"Unit attention, media changed(out), continuing\n");
-                res = read_capacity(rcoll.outfd, &out_num_sect, &out_sect_sz);
-            }
-            if (0 != res) {
-                fprintf(stderr, "Unable to read capacity on %s\n", outf);
-                out_num_sect = -1;
-            }
-            else {
-                if (out_num_sect > seek)
-                    out_num_sect -= seek;
-            }
-        }
-        if (in_num_sect > 0) {
-            if (out_num_sect > 0)
-                count = (in_num_sect > out_num_sect) ? out_num_sect :
-                                                       in_num_sect;
-            else
-                count = in_num_sect;
-        }
-        else
-            count = out_num_sect;
-    }
-    if (rcoll.debug > 1)
-        fprintf(stderr, "Start of loop, count=%d, in_num_sect=%d, "
-                "out_num_sect=%d\n", count, in_num_sect, out_num_sect);
-    if (count < 0) {
-        fprintf(stderr, "Couldn't calculate count, please give one\n");
-        return 1;
-    }
+	if (rep != (Rq_elem *) io_hdr.usr_ptr)
+		err_exit(0,
+			 "sg_finish_io: bad usr_ptr, request-response mismatch\n");
+	memcpy(&rep->io_hdr, &io_hdr, sizeof(sg_io_hdr_t));
+	hp = &rep->io_hdr;
 
-    rcoll.in_count = count;
-    rcoll.in_done_count = count;
-    rcoll.skip = skip;
-    rcoll.in_blk = skip;
-    rcoll.out_count = count;
-    rcoll.out_done_count = count;
-    rcoll.seek = seek;
-    rcoll.out_blk = seek;
-    status = pthread_mutex_init(&rcoll.in_mutex, NULL);
-    if (0 != status) err_exit(status, "init in_mutex");
-    status = pthread_mutex_init(&rcoll.out_mutex, NULL);
-    if (0 != status) err_exit(status, "init out_mutex");
-    status = pthread_mutex_init(&rcoll.aux_mutex, NULL);
-    if (0 != status) err_exit(status, "init aux_mutex");
-    status = pthread_cond_init(&rcoll.out_sync_cv, NULL);
-    if (0 != status) err_exit(status, "init out_sync_cv");
+	switch (sg_err_category3(hp)) {
+	case SG_ERR_CAT_CLEAN:
+		break;
+	case SG_ERR_CAT_RECOVERED:
+		fprintf(stderr, "Recovered error on block=%d, num=%d\n",
+			rep->blk, rep->num_blks);
+		break;
+	case SG_ERR_CAT_MEDIA_CHANGED:
+		return 1;
+	default:
+		{
+			char ebuff[EBUFF_SZ];
 
-    sigemptyset(&signal_set);
-    sigaddset(&signal_set, SIGINT);
-    status = pthread_sigmask(SIG_BLOCK, &signal_set, NULL);
-    if (0 != status) err_exit(status, "pthread_sigmask");
-    status = pthread_create(&sig_listen_thread_id, NULL,
-                            sig_listen_thread, (void *)&rcoll);
-    if (0 != status) err_exit(status, "pthread_create, sig...");
+			snprintf(ebuff, EBUFF_SZ,
+				 "%s blk=%d", rep->wr ? "writing" : "reading",
+				 rep->blk);
+			status = pthread_mutex_lock(a_mutp);
+			if (0 != status)
+				err_exit(status, "lock aux_mutex");
+			sg_chk_n_print3(ebuff, hp);
+			status = pthread_mutex_unlock(a_mutp);
+			if (0 != status)
+				err_exit(status, "unlock aux_mutex");
+			return -1;
+		}
+	}
+#if 0
+	if (0 == (++testing % 100))
+		return -1;
+#endif
+	if (rep->dio &&
+	    ((hp->info & SG_INFO_DIRECT_IO_MASK) != SG_INFO_DIRECT_IO))
+		rep->dio_incomplete = 1;	/* count dios done as indirect IO */
+	else
+		rep->dio_incomplete = 0;
+	rep->resid = hp->resid;
+	if (rep->debug > 8)
+		fprintf(stderr, "sg_finish_io: completed %s\n",
+			wr ? "WRITE" : "READ");
+	return 0;
+}
 
-    if (do_time) {
-        start_tm.tv_sec = 0;
-        start_tm.tv_usec = 0;
-        gettimeofday(&start_tm, NULL);
-    }
+int sg_prepare(int fd, int bs, int bpt, int *scsi_typep)
+{
+	int res, t;
+
+	res = ioctl(fd, SG_GET_VERSION_NUM, &t);
+	if ((res < 0) || (t < 30000)) {
+		fprintf(stderr, ME "sg driver prior to 3.x.y\n");
+		return 1;
+	}
+	res = 0;
+	t = bs * bpt;
+	res = ioctl(fd, SG_SET_RESERVED_SIZE, &t);
+	if (res < 0)
+		perror(ME "SG_SET_RESERVED_SIZE error");
+	t = 1;
+	res = ioctl(fd, SG_SET_FORCE_PACK_ID, &t);
+	if (res < 0)
+		perror(ME "SG_SET_FORCE_PACK_ID error");
+	if (scsi_typep) {
+		struct sg_scsi_id info;
+
+		res = ioctl(fd, SG_GET_SCSI_ID, &info);
+		if (res < 0)
+			perror(ME "SG_SET_SCSI_ID error");
+		*scsi_typep = info.scsi_type;
+	}
+	return 0;
+}
+
+int do_scsi_sgp_read_write(char *device)
+{
+	int skip = 0;
+	int seek = 0;
+	int count = -1;
+	char inf[INOUTF_SZ];
+	char outf[INOUTF_SZ];
+	int res, k;
+	int in_num_sect = 0;
+	int out_num_sect = 0;
+	int num_threads = DEF_NUM_THREADS;
+	pthread_t threads[MAX_NUM_THREADS];
+	int do_time = 1;
+	int do_sync = 1;
+	int in_sect_sz, out_sect_sz, status, infull, outfull;
+	void *vp;
+	char ebuff[EBUFF_SZ];
+	struct timeval start_tm, end_tm;
+	Rq_coll rcoll;
+
+	print_msg(TEST_BREAK, __FUNCTION__);
+
+	memset(&rcoll, 0, sizeof(Rq_coll));
+	rcoll.bpt = DEF_BLOCKS_PER_TRANSFER;
+	rcoll.in_type = FT_OTHER;
+	rcoll.out_type = FT_OTHER;
+	rcoll.cdbsz = DEF_SCSI_CDBSZ;
+
+	strcpy(inf, "/dev/zero");
+	strcpy(outf, device);
+
+	if (rcoll.bs <= 0) {
+		rcoll.bs = DEF_BLOCK_SIZE;
+		fprintf(stderr,
+			"Assume default 'bs' (block size) of %d bytes\n",
+			rcoll.bs);
+	}
+
+	if (rcoll.debug)
+		fprintf(stderr, ME "if=%s skip=%d of=%s seek=%d count=%d\n",
+			inf, skip, outf, seek, count);
+
+	rcoll.infd = STDIN_FILENO;
+	rcoll.outfd = STDOUT_FILENO;
+	if (inf[0] && ('-' != inf[0])) {
+		rcoll.in_type = dd_filetype(inf);
+
+		if (FT_ST == rcoll.in_type) {
+			fprintf(stderr,
+				ME "unable to use scsi tape device %s\n", inf);
+			return 1;
+		} else if (FT_SG == rcoll.in_type) {
+			if ((rcoll.infd = open(inf, O_RDWR)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for sg reading",
+					 inf);
+				perror(ebuff);
+				return 1;
+			}
+			if (sg_prepare(rcoll.infd, rcoll.bs, rcoll.bpt,
+				       &rcoll.in_scsi_type))
+				return 1;
+		} else {
+			if ((rcoll.infd = open(inf, O_RDONLY)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for reading",
+					 inf);
+				perror(ebuff);
+				return 1;
+			} else if (skip > 0) {
+				llse_loff_t offset = skip;
+
+				offset *= rcoll.bs;	/* could exceed 32 here! */
+				if (llse_llseek(rcoll.infd, offset, SEEK_SET) <
+				    0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "couldn't skip to required position on %s",
+						 inf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		}
+	}
+	if (outf[0] && ('-' != outf[0])) {
+		rcoll.out_type = dd_filetype(outf);
+
+		if (FT_ST == rcoll.out_type) {
+			fprintf(stderr,
+				ME "unable to use scsi tape device %s\n", outf);
+			return 1;
+		} else if (FT_SG == rcoll.out_type) {
+			if ((rcoll.outfd = open(outf, O_RDWR)) < 0) {
+				snprintf(ebuff, EBUFF_SZ,
+					 ME "could not open %s for sg writing",
+					 outf);
+				perror(ebuff);
+				return 1;
+			}
+
+			if (sg_prepare(rcoll.outfd, rcoll.bs, rcoll.bpt,
+				       &rcoll.out_scsi_type))
+				return 1;
+		} else if (FT_DEV_NULL == rcoll.out_type)
+			rcoll.outfd = -1;	/* don't bother opening */
+		else {
+			if (FT_RAW != rcoll.out_type) {
+				if ((rcoll.outfd =
+				     open(outf, O_WRONLY | O_CREAT,
+					  0666)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "could not open %s for writing",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			} else {
+				if ((rcoll.outfd = open(outf, O_WRONLY)) < 0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "could not open %s for raw writing",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+			if (seek > 0) {
+				llse_loff_t offset = seek;
+
+				offset *= rcoll.bs;	/* could exceed 32 bits here! */
+				if (llse_llseek(rcoll.outfd, offset, SEEK_SET) <
+				    0) {
+					snprintf(ebuff, EBUFF_SZ,
+						 ME
+						 "couldn't seek to required position on %s",
+						 outf);
+					perror(ebuff);
+					return 1;
+				}
+			}
+		}
+	}
+	if ((STDIN_FILENO == rcoll.infd) && (STDOUT_FILENO == rcoll.outfd)) {
+		fprintf(stderr,
+			"Disallow both if and of to be stdin and stdout");
+		return 1;
+	}
+	if (count < 0) {
+		if (FT_SG == rcoll.in_type) {
+			res =
+			    read_capacity(rcoll.infd, &in_num_sect,
+					  &in_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res =
+				    read_capacity(rcoll.infd, &in_num_sect,
+						  &in_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n", inf);
+				in_num_sect = -1;
+			} else {
+				if (in_num_sect > skip)
+					in_num_sect -= skip;
+			}
+		}
+		if (FT_SG == rcoll.out_type) {
+			res =
+			    read_capacity(rcoll.outfd, &out_num_sect,
+					  &out_sect_sz);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(out), continuing\n");
+				res =
+				    read_capacity(rcoll.outfd, &out_num_sect,
+						  &out_sect_sz);
+			}
+			if (0 != res) {
+				fprintf(stderr,
+					"Unable to read capacity on %s\n",
+					outf);
+				out_num_sect = -1;
+			} else {
+				if (out_num_sect > seek)
+					out_num_sect -= seek;
+			}
+		}
+		if (in_num_sect > 0) {
+			if (out_num_sect > 0)
+				count =
+				    (in_num_sect >
+				     out_num_sect) ? out_num_sect : in_num_sect;
+			else
+				count = in_num_sect;
+		} else
+			count = out_num_sect;
+	}
+	if (rcoll.debug > 1)
+		fprintf(stderr, "Start of loop, count=%d, in_num_sect=%d, "
+			"out_num_sect=%d\n", count, in_num_sect, out_num_sect);
+	if (count < 0) {
+		fprintf(stderr, "Couldn't calculate count, please give one\n");
+		return 1;
+	}
+
+	rcoll.in_count = count;
+	rcoll.in_done_count = count;
+	rcoll.skip = skip;
+	rcoll.in_blk = skip;
+	rcoll.out_count = count;
+	rcoll.out_done_count = count;
+	rcoll.seek = seek;
+	rcoll.out_blk = seek;
+	status = pthread_mutex_init(&rcoll.in_mutex, NULL);
+	if (0 != status)
+		err_exit(status, "init in_mutex");
+	status = pthread_mutex_init(&rcoll.out_mutex, NULL);
+	if (0 != status)
+		err_exit(status, "init out_mutex");
+	status = pthread_mutex_init(&rcoll.aux_mutex, NULL);
+	if (0 != status)
+		err_exit(status, "init aux_mutex");
+	status = pthread_cond_init(&rcoll.out_sync_cv, NULL);
+	if (0 != status)
+		err_exit(status, "init out_sync_cv");
+
+	sigemptyset(&signal_set);
+	sigaddset(&signal_set, SIGINT);
+	status = pthread_sigmask(SIG_BLOCK, &signal_set, NULL);
+	if (0 != status)
+		err_exit(status, "pthread_sigmask");
+	status = pthread_create(&sig_listen_thread_id, NULL,
+				sig_listen_thread, (void *)&rcoll);
+	if (0 != status)
+		err_exit(status, "pthread_create, sig...");
+
+	if (do_time) {
+		start_tm.tv_sec = 0;
+		start_tm.tv_usec = 0;
+		gettimeofday(&start_tm, NULL);
+	}
 
 /* vvvvvvvvvvv  Start worker threads  vvvvvvvvvvvvvvvvvvvvvvvv */
-    if ((rcoll.out_done_count > 0) && (num_threads > 0)) {
-        /* Run 1 work thread to shake down infant retryable stuff */
-        status = pthread_mutex_lock(&rcoll.out_mutex);
-        if (0 != status) err_exit(status, "lock out_mutex");
-        status = pthread_create(&threads[0], NULL, read_write_thread,
-                                (void *)&rcoll);
-        if (0 != status) err_exit(status, "pthread_create");
-        if (rcoll.debug)
-            fprintf(stderr, "Starting worker thread k=0\n");
+	if ((rcoll.out_done_count > 0) && (num_threads > 0)) {
+		/* Run 1 work thread to shake down infant retryable stuff */
+		status = pthread_mutex_lock(&rcoll.out_mutex);
+		if (0 != status)
+			err_exit(status, "lock out_mutex");
+		status = pthread_create(&threads[0], NULL, read_write_thread,
+					(void *)&rcoll);
+		if (0 != status)
+			err_exit(status, "pthread_create");
+		if (rcoll.debug)
+			fprintf(stderr, "Starting worker thread k=0\n");
 
-        /* wait for any broadcast */
-        pthread_cleanup_push(cleanup_out, (void *)&rcoll);
-        status = pthread_cond_wait(&rcoll.out_sync_cv, &rcoll.out_mutex);
-        if (0 != status) err_exit(status, "cond out_sync_cv");
-        pthread_cleanup_pop(0);
-        status = pthread_mutex_unlock(&rcoll.out_mutex);
-        if (0 != status) err_exit(status, "unlock out_mutex");
+		/* wait for any broadcast */
+		pthread_cleanup_push(cleanup_out, (void *)&rcoll);
+		status =
+		    pthread_cond_wait(&rcoll.out_sync_cv, &rcoll.out_mutex);
+		if (0 != status)
+			err_exit(status, "cond out_sync_cv");
+		pthread_cleanup_pop(0);
+		status = pthread_mutex_unlock(&rcoll.out_mutex);
+		if (0 != status)
+			err_exit(status, "unlock out_mutex");
 
-        /* now start the rest of the threads */
-        for (k = 1; k < num_threads; ++k) {
-            status = pthread_create(&threads[k], NULL, read_write_thread,
-                                    (void *)&rcoll);
-            if (0 != status) err_exit(status, "pthread_create");
-            if (rcoll.debug)
-                fprintf(stderr, "Starting worker thread k=%d\n", k);
-        }
+		/* now start the rest of the threads */
+		for (k = 1; k < num_threads; ++k) {
+			status =
+			    pthread_create(&threads[k], NULL, read_write_thread,
+					   (void *)&rcoll);
+			if (0 != status)
+				err_exit(status, "pthread_create");
+			if (rcoll.debug)
+				fprintf(stderr, "Starting worker thread k=%d\n",
+					k);
+		}
 
-        /* now wait for worker threads to finish */
-        for (k = 0; k < num_threads; ++k) {
-            status = pthread_join(threads[k], &vp);
-            if (0 != status) err_exit(status, "pthread_join");
-            if (rcoll.debug)
-                fprintf(stderr, "Worker thread k=%d terminated\n", k);
-        }
-    }
+		/* now wait for worker threads to finish */
+		for (k = 0; k < num_threads; ++k) {
+			status = pthread_join(threads[k], &vp);
+			if (0 != status)
+				err_exit(status, "pthread_join");
+			if (rcoll.debug)
+				fprintf(stderr,
+					"Worker thread k=%d terminated\n", k);
+		}
+	}
 
-    if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
-        struct timeval res_tm;
-        double a, b;
+	if ((do_time) && (start_tm.tv_sec || start_tm.tv_usec)) {
+		struct timeval res_tm;
+		double a, b;
 
-        gettimeofday(&end_tm, NULL);
-        res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
-        res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
-        if (res_tm.tv_usec < 0) {
-            --res_tm.tv_sec;
-            res_tm.tv_usec += 1000000;
-        }
-        a = res_tm.tv_sec;
-        a += (0.000001 * res_tm.tv_usec);
-        b = (double)rcoll.bs * (count - rcoll.out_done_count);
-        printf("time to transfer data was %d.%06d secs",
-               (int)res_tm.tv_sec, (int)res_tm.tv_usec);
-        if ((a > 0.00001) && (b > 511))
-            printf(", %.2f MB/sec\n", b / (a * 1000000.0));
-        else
-            printf("\n");
-    }
-    if (do_sync) {
-        if (FT_SG == rcoll.out_type) {
-            fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
-            res = sync_cache(rcoll.outfd);
-            if (2 == res) {
-                fprintf(stderr,
-                        "Unit attention, media changed(in), continuing\n");
-                res = sync_cache(rcoll.outfd);
-            }
-            if (0 != res)
-                fprintf(stderr, "Unable to synchronize cache\n");
-        }
-    }
+		gettimeofday(&end_tm, NULL);
+		res_tm.tv_sec = end_tm.tv_sec - start_tm.tv_sec;
+		res_tm.tv_usec = end_tm.tv_usec - start_tm.tv_usec;
+		if (res_tm.tv_usec < 0) {
+			--res_tm.tv_sec;
+			res_tm.tv_usec += 1000000;
+		}
+		a = res_tm.tv_sec;
+		a += (0.000001 * res_tm.tv_usec);
+		b = (double)rcoll.bs * (count - rcoll.out_done_count);
+		printf("time to transfer data was %d.%06d secs",
+		       (int)res_tm.tv_sec, (int)res_tm.tv_usec);
+		if ((a > 0.00001) && (b > 511))
+			printf(", %.2f MB/sec\n", b / (a * 1000000.0));
+		else
+			printf("\n");
+	}
+	if (do_sync) {
+		if (FT_SG == rcoll.out_type) {
+			fprintf(stderr, ">> Synchronizing cache on %s\n", outf);
+			res = sync_cache(rcoll.outfd);
+			if (2 == res) {
+				fprintf(stderr,
+					"Unit attention, media changed(in), continuing\n");
+				res = sync_cache(rcoll.outfd);
+			}
+			if (0 != res)
+				fprintf(stderr,
+					"Unable to synchronize cache\n");
+		}
+	}
 
-    status = pthread_cancel(sig_listen_thread_id);
-    if (0 != status) err_exit(status, "pthread_cancel");
-    if (STDIN_FILENO != rcoll.infd)
-        close(rcoll.infd);
-    if ((STDOUT_FILENO != rcoll.outfd) && (FT_DEV_NULL != rcoll.out_type))
-        close(rcoll.outfd);
-    res = 0;
-    if (0 != rcoll.out_count) {
-        fprintf(stderr, ">>>> Some error occurred, remaining blocks=%d\n",
-               rcoll.out_count);
-	res = 2;
-    }
-    infull = count - rcoll.in_done_count -  rcoll.in_partial;
-    fprintf(stderr, "%d+%d records in\n", infull, rcoll.in_partial);
-    outfull = count - rcoll.out_done_count - rcoll.out_partial;
-    fprintf(stderr, "%d+%d records out\n", outfull, rcoll.out_partial);
-    if (rcoll.dio_incomplete) {
-        int fd;
-        char c;
+	status = pthread_cancel(sig_listen_thread_id);
+	if (0 != status)
+		err_exit(status, "pthread_cancel");
+	if (STDIN_FILENO != rcoll.infd)
+		close(rcoll.infd);
+	if ((STDOUT_FILENO != rcoll.outfd) && (FT_DEV_NULL != rcoll.out_type))
+		close(rcoll.outfd);
+	res = 0;
+	if (0 != rcoll.out_count) {
+		fprintf(stderr,
+			">>>> Some error occurred, remaining blocks=%d\n",
+			rcoll.out_count);
+		res = 2;
+	}
+	infull = count - rcoll.in_done_count - rcoll.in_partial;
+	fprintf(stderr, "%d+%d records in\n", infull, rcoll.in_partial);
+	outfull = count - rcoll.out_done_count - rcoll.out_partial;
+	fprintf(stderr, "%d+%d records out\n", outfull, rcoll.out_partial);
+	if (rcoll.dio_incomplete) {
+		int fd;
+		char c;
 
-        fprintf(stderr, ">> Direct IO requested but incomplete %d times\n",
-                rcoll.dio_incomplete);
-        if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
-            if (1 == read(fd, &c, 1)) {
-                if ('0' == c)
-                    fprintf(stderr, ">>> %s set to '0' but should be set "
-                            "to '1' for direct IO\n", proc_allow_dio);
-            }
-            close(fd);
-        }
-    }
-    if (rcoll.sum_of_resids)
-        fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
-               rcoll.sum_of_resids);
-    return res;
+		fprintf(stderr,
+			">> Direct IO requested but incomplete %d times\n",
+			rcoll.dio_incomplete);
+		if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
+			if (1 == read(fd, &c, 1)) {
+				if ('0' == c)
+					fprintf(stderr,
+						">>> %s set to '0' but should be set "
+						"to '1' for direct IO\n",
+						proc_allow_dio);
+			}
+			close(fd);
+		}
+	}
+	if (rcoll.sum_of_resids)
+		fprintf(stderr, ">> Non-zero sum of residual counts=%d\n",
+			rcoll.sum_of_resids);
+	return res;
 }
diff --git a/testcases/kernel/fs/scsi/ltpscsi/sg_err.c b/testcases/kernel/fs/scsi/ltpscsi/sg_err.c
index df15510..08eba2c 100644
--- a/testcases/kernel/fs/scsi/ltpscsi/sg_err.c
+++ b/testcases/kernel/fs/scsi/ltpscsi/sg_err.c
@@ -28,17 +28,21 @@
 #define OUTP stderr
 
 static const unsigned char scsi_command_size[8] = { 6, 10, 10, 12,
-                                                   16, 12, 10, 10 };
+	16, 12, 10, 10
+};
 
 #define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
 
 static const char unknown[] = "UNKNOWN";
 
-static const char * group_0_commands[] = {
+static const char *group_0_commands[] = {
 /* 00-03 */ "Test Unit Ready", "Rezero Unit", unknown, "Request Sense",
-/* 04-07 */ "Format Unit", "Read Block Limits", unknown, "Reasssign Blocks",
-/* 08-0d */ "Read (6)", unknown, "Write (6)", "Seek (6)", unknown, unknown,
-/* 0e-12 */ unknown, "Read Reverse", "Write Filemarks", "Space", "Inquiry",
+/* 04-07 */ "Format Unit", "Read Block Limits", unknown,
+	    "Reasssign Blocks",
+/* 08-0d */ "Read (6)", unknown, "Write (6)", "Seek (6)", unknown,
+	    unknown,
+/* 0e-12 */ unknown, "Read Reverse", "Write Filemarks", "Space",
+	    "Inquiry",
 /* 13-16 */ "Verify", "Recover Buffered Data", "Mode Select", "Reserve",
 /* 17-1b */ "Release", "Copy", "Erase", "Mode Sense", "Start/Stop Unit",
 /* 1c-1d */ "Receive Diagnostic", "Send Diagnostic",
@@ -46,67 +50,77 @@
 };
 
 static const char *group_1_commands[] = {
-/* 20-23 */  unknown, unknown, unknown, "Read Format capacities",
+/* 20-23 */ unknown, unknown, unknown, "Read Format capacities",
 /* 24-28 */ "Set window", "Read Capacity",
-            unknown, unknown, "Read (10)",
+	unknown, unknown, "Read (10)",
 /* 29-2d */ "Read Generation", "Write (10)", "Seek (10)", "Erase",
-            "Read updated block",
-/* 2e-31 */ "Write Verify","Verify", "Search High", "Search Equal",
+	"Read updated block",
+/* 2e-31 */ "Write Verify", "Verify", "Search High", "Search Equal",
 /* 32-34 */ "Search Low", "Set Limits", "Prefetch or Read Position",
-/* 35-37 */ "Synchronize Cache","Lock/Unlock Cache", "Read Defect Data",
+/* 35-37 */ "Synchronize Cache", "Lock/Unlock Cache",
+	    "Read Defect Data",
 /* 38-3c */ "Medium Scan", "Compare", "Copy Verify", "Write Buffer",
-            "Read Buffer",
-/* 3d-3f */ "Update Block", "Read Long",  "Write Long",
+	"Read Buffer",
+/* 3d-3f */ "Update Block", "Read Long", "Write Long",
 };
 
 static const char *group_2_commands[] = {
 /* 40-41 */ "Change Definition", "Write Same",
 /* 42-48 */ "Read sub-channel", "Read TOC", "Read header",
-            "Play audio (10)", "Get configuration", "Play audio msf",
-            "Play audio track/index",
+	"Play audio (10)", "Get configuration", "Play audio msf",
+	"Play audio track/index",
 /* 49-4f */ "Play track relative (10)", "Get event status notification",
-            "Pause/resume", "Log Select", "Log Sense", "Stop play/scan",
-            unknown,
-/* 50-55 */ "Xdwrite", "Xpwrite, Read disk info", "Xdread, Read track info",
-            "Reserve track", "Send OPC onfo", "Mode Select (10)",
-/* 56-5b */ "Reserve (10)", "Release (10)", "Repair track", "Read master cue",
-            "Mode Sense (10)", "Close track/session",
-/* 5c-5f */ "Read buffer capacity", "Send cue sheet", "Persistent reserve in",
-            "Persistent reserve out",
+	"Pause/resume", "Log Select", "Log Sense", "Stop play/scan",
+	unknown,
+/* 50-55 */ "Xdwrite", "Xpwrite, Read disk info",
+	    "Xdread, Read track info",
+	"Reserve track", "Send OPC onfo", "Mode Select (10)",
+/* 56-5b */ "Reserve (10)", "Release (10)", "Repair track",
+	    "Read master cue",
+	"Mode Sense (10)", "Close track/session",
+/* 5c-5f */ "Read buffer capacity", "Send cue sheet",
+	    "Persistent reserve in",
+	"Persistent reserve out",
 };
 
 /* The following are 16 byte commands in group 4 */
 static const char *group_4_commands[] = {
-/* 80-84 */ "Xdwrite (16)", "Rebuild (16)", "Regenerate (16)", "Extended copy",
-            "Receive copy results",
-/* 85-89 */ "Memory Export In (16)", "Access control in", "Access control out",
-            "Read (16)", "Memory Export Out (16)",
-/* 8a-8f */ "Write (16)", unknown, "Read attributes", "Write attributes",
-            "Write and verify (16)", "Verify (16)",
+/* 80-84 */ "Xdwrite (16)", "Rebuild (16)", "Regenerate (16)",
+	    "Extended copy",
+	"Receive copy results",
+/* 85-89 */ "Memory Export In (16)", "Access control in",
+	    "Access control out",
+	"Read (16)", "Memory Export Out (16)",
+/* 8a-8f */ "Write (16)", unknown, "Read attributes",
+	    "Write attributes",
+	"Write and verify (16)", "Verify (16)",
 /* 90-94 */ "Pre-fetch (16)", "Synchronize cache (16)",
-            "Lock/unlock cache (16)", "Write same (16)", unknown,
+	"Lock/unlock cache (16)", "Write same (16)", unknown,
 /* 95-99 */ unknown, unknown, unknown, unknown, unknown,
 /* 9a-9f */ unknown, unknown, unknown, unknown, "Service action in",
-            "Service action out",
+	"Service action out",
 };
 
 /* The following are 12 byte commands in group 5 */
 static const char *group_5_commands[] = {
 /* a0-a5 */ "Report luns", "Blank", "Send event", "Maintenance (in)",
-            "Maintenance (out)", "Move medium/play audio(12)",
+	"Maintenance (out)", "Move medium/play audio(12)",
 /* a6-a9 */ "Exchange medium", "Move medium attached", "Read(12)",
-            "Play track relative(12)",
+	"Play track relative(12)",
 /* aa-ae */ "Write(12)", unknown, "Erase(12), Get Performance",
-            "Read DVD structure", "Write and verify(12)",
-/* af-b1 */ "Verify(12)", "Search data high(12)", "Search data equal(12)",
+	"Read DVD structure", "Write and verify(12)",
+/* af-b1 */ "Verify(12)", "Search data high(12)",
+	    "Search data equal(12)",
 /* b2-b4 */ "Search data low(12)", "Set limits(12)",
-            "Read element status attached",
-/* b5-b6 */ "Request volume element address", "Send volume tag, set streaming",
-/* b7-b9 */ "Read defect data(12)", "Read element status", "Read CD msf",
+	"Read element status attached",
+/* b5-b6 */ "Request volume element address",
+	    "Send volume tag, set streaming",
+/* b7-b9 */ "Read defect data(12)", "Read element status",
+	    "Read CD msf",
 /* ba-bc */ "Redundancy group (in), Scan",
-            "Redundancy group (out), Set cd-rom speed", "Spare (in), Play cd",
+	"Redundancy group (out), Set cd-rom speed", "Spare (in), Play cd",
 /* bd-bf */ "Spare (out), Mechanism status", "Volume set (in), Read cd",
-            "Volume set (out), Send DVD structure",
+	"Volume set (out), Send DVD structure",
 };
 
 #define group(opcode) (((opcode) >> 5) & 7)
@@ -115,86 +129,112 @@
 #define VENDOR_GROUP    1
 
 static const char **commands[] = {
-    group_0_commands, group_1_commands, group_2_commands,
-    (const char **) RESERVED_GROUP, group_4_commands,
-    group_5_commands, (const char **) VENDOR_GROUP,
-    (const char **) VENDOR_GROUP
+	group_0_commands, group_1_commands, group_2_commands,
+	(const char **)RESERVED_GROUP, group_4_commands,
+	group_5_commands, (const char **)VENDOR_GROUP,
+	(const char **)VENDOR_GROUP
 };
 
 static const char reserved[] = "RESERVED";
 static const char vendor[] = "VENDOR SPECIFIC";
 
-static void print_opcode(int opcode) {
-    const char **table = commands[ group(opcode) ];
+static void print_opcode(int opcode)
+{
+	const char **table = commands[group(opcode)];
 
-    switch ((unsigned long) table) {
-    case RESERVED_GROUP:
-        fprintf(OUTP, "%s(0x%02x)", reserved, opcode);
-        break;
-    case VENDOR_GROUP:
-        fprintf(OUTP, "%s(0x%02x)", vendor, opcode);
-        break;
-    default:
-	fprintf(OUTP, "%s",table[opcode & 0x1f]);
-        break;
-    }
+	switch ((unsigned long)table) {
+	case RESERVED_GROUP:
+		fprintf(OUTP, "%s(0x%02x)", reserved, opcode);
+		break;
+	case VENDOR_GROUP:
+		fprintf(OUTP, "%s(0x%02x)", vendor, opcode);
+		break;
+	default:
+		fprintf(OUTP, "%s", table[opcode & 0x1f]);
+		break;
+	}
 }
 
-void sg_print_command (const unsigned char * command) {
-    int k, s;
-    print_opcode(command[0]);
-    fprintf(OUTP, " [");
-    for (k = 0, s = COMMAND_SIZE(command[0]); k < s; ++k)
-        fprintf(OUTP, "%02x ", command[k]);
-    fprintf(OUTP, "]\n");
+void sg_print_command(const unsigned char *command)
+{
+	int k, s;
+	print_opcode(command[0]);
+	fprintf(OUTP, " [");
+	for (k = 0, s = COMMAND_SIZE(command[0]); k < s; ++k)
+		fprintf(OUTP, "%02x ", command[k]);
+	fprintf(OUTP, "]\n");
 }
 
 void sg_print_status(int masked_status)
 {
-    int scsi_status = (masked_status << 1) & 0x7e;
+	int scsi_status = (masked_status << 1) & 0x7e;
 
-    sg_print_scsi_status(scsi_status);
+	sg_print_scsi_status(scsi_status);
 }
 
 void sg_print_scsi_status(int scsi_status)
 {
-    const char * ccp;
+	const char *ccp;
 
-    scsi_status &= 0x7e; /* sanitize as much as possible */
-    switch (scsi_status) {
-        case 0: ccp = "Good"; break;
-        case 0x2: ccp = "Check Condition"; break;
-        case 0x4: ccp = "Condition Met"; break;
-        case 0x8: ccp = "Busy"; break;
-        case 0x10: ccp = "Intermediate"; break;
-        case 0x14: ccp = "Intermediate-Condition Met"; break;
-        case 0x18: ccp = "Reservation Conflict"; break;
-        case 0x22: ccp = "Command Terminated (obsolete)"; break;
-        case 0x28: ccp = "Task set Full"; break;
-        case 0x30: ccp = "ACA Active"; break;
-        case 0x40: ccp = "Task Aborted"; break;
-        default: ccp = "Unknown status"; break;
-    }
-    fprintf(OUTP, "%s ", ccp);
+	scsi_status &= 0x7e;	/* sanitize as much as possible */
+	switch (scsi_status) {
+	case 0:
+		ccp = "Good";
+		break;
+	case 0x2:
+		ccp = "Check Condition";
+		break;
+	case 0x4:
+		ccp = "Condition Met";
+		break;
+	case 0x8:
+		ccp = "Busy";
+		break;
+	case 0x10:
+		ccp = "Intermediate";
+		break;
+	case 0x14:
+		ccp = "Intermediate-Condition Met";
+		break;
+	case 0x18:
+		ccp = "Reservation Conflict";
+		break;
+	case 0x22:
+		ccp = "Command Terminated (obsolete)";
+		break;
+	case 0x28:
+		ccp = "Task set Full";
+		break;
+	case 0x30:
+		ccp = "ACA Active";
+		break;
+	case 0x40:
+		ccp = "Task Aborted";
+		break;
+	default:
+		ccp = "Unknown status";
+		break;
+	}
+	fprintf(OUTP, "%s ", ccp);
 }
 
 /* In brackets is the related SCSI document (see www.t10.org) with the */
 /* peripheral device type after the colon */
 /* No programmatic use is made of these flags currently */
-#define D 0x0001  /* DIRECT ACCESS DEVICE (disk) [SBC-2: 0] */
-#define T 0x0002  /* SEQUENTIAL ACCESS DEVICE (tape) [SSC: 1] */
-#define L 0x0004  /* PRINTER DEVICE [SSC: 2] */
-#define P 0x0008  /* PROCESSOR DEVICE [SPC-2: 3] */
-#define W 0x0010  /* WRITE ONCE READ MULTIPLE DEVICE [SBC-2: 4] */
-#define R 0x0020  /* CD/DVD DEVICE [MMC-2: 5] */
-#define S 0x0040  /* SCANNER DEVICE [SCSI-2 (obsolete): 6] */
-#define O 0x0080  /* OPTICAL MEMORY DEVICE [SBC-2: 7] */
-#define M 0x0100  /* MEDIA CHANGER DEVICE [SMC-2: 8] */
-#define C 0x0200  /* COMMUNICATION DEVICE [SCSI-2 (obsolete): 9] */
-#define A 0x0400  /* ARRAY STORAGE [SCC-2: 12] */
-#define E 0x0800  /* ENCLOSURE SERVICES DEVICE [SES: 13] */
-#define B 0x1000  /* SIMPLIFIED DIRECT ACCESS DEVICE [RBC: 14] */
-#define K 0x2000  /* OPTICAL CARD READER/WRITER DEVICE [OCRW: 15] */
+#define D 0x0001		/* DIRECT ACCESS DEVICE (disk) [SBC-2: 0] */
+#define T 0x0002		/* SEQUENTIAL ACCESS DEVICE (tape) [SSC: 1] */
+#define L 0x0004		/* PRINTER DEVICE [SSC: 2] */
+#define P 0x0008		/* PROCESSOR DEVICE [SPC-2: 3] */
+#define W 0x0010		/* WRITE ONCE READ MULTIPLE DEVICE [SBC-2: 4] */
+#define R 0x0020		/* CD/DVD DEVICE [MMC-2: 5] */
+#define S 0x0040		/* SCANNER DEVICE [SCSI-2 (obsolete): 6] */
+#define O 0x0080		/* OPTICAL MEMORY DEVICE [SBC-2: 7] */
+#define M 0x0100		/* MEDIA CHANGER DEVICE [SMC-2: 8] */
+#define C 0x0200		/* COMMUNICATION DEVICE [SCSI-2 (obsolete): 9] */
+#define A 0x0400		/* ARRAY STORAGE [SCC-2: 12] */
+#define E 0x0800		/* ENCLOSURE SERVICES DEVICE [SES: 13] */
+#define B 0x1000		/* SIMPLIFIED DIRECT ACCESS DEVICE [RBC: 14] */
+#define K 0x2000		/* OPTICAL CARD READER/WRITER DEVICE [OCRW: 15] */
 
 #define SC_ALL_DEVS ( D|T|L|P|W|R|S|O|M|C|A|E|B|K )
 
@@ -216,980 +256,1124 @@
 #define SC_ERROR_RATE_TOO_HIGH "\xd"
 #define SC_TIMES_TOO_HIGH "\xe"
 
-struct error_info{
-    unsigned char code1, code2;
-    unsigned short int devices;
-    const char * text;
+struct error_info {
+	unsigned char code1, code2;
+	unsigned short int devices;
+	const char *text;
 };
 
-struct error_info2{
-    unsigned char code1, code2_min, code2_max;
-    unsigned short int devices;
-    const char * text;
+struct error_info2 {
+	unsigned char code1, code2_min, code2_max;
+	unsigned short int devices;
+	const char *text;
 };
 
-static struct error_info2 additional2[] =
-{
-  {0x40,0x00,0x7f,D,"Ram failure (%x)"},
-  {0x40,0x80,0xff,D|T|L|P|W|R|S|O|M|C,"Diagnostic failure on component (%x)"},
-  {0x41,0x00,0xff,D,"Data path failure (%x)"},
-  {0x42,0x00,0xff,D,"Power-on or self-test failure (%x)"},
-  {0, 0, 0, 0, NULL}
+static struct error_info2 additional2[] = {
+	{0x40, 0x00, 0x7f, D, "Ram failure (%x)"},
+	{0x40, 0x80, 0xff, D | T | L | P | W | R | S | O | M | C,
+	 "Diagnostic failure on component (%x)"},
+	{0x41, 0x00, 0xff, D, "Data path failure (%x)"},
+	{0x42, 0x00, 0xff, D, "Power-on or self-test failure (%x)"},
+	{0, 0, 0, 0, NULL}
 };
 
-static struct error_info additional[] =
-{
-  {0x00,0x00,SC_ALL_DEVS,"No additional sense information"},
-  {0x00,0x01,T,"Filemark detected"},
-  {0x00,0x02,T|S,"End-of-partition/medium detected"},
-  {0x00,0x03,T,"Setmark detected"},
-  {0x00,0x04,T|S,"Beginning-of-partition/medium detected"},
-  {0x00,0x05,T|L|S,"End-of-data detected"},
-  {0x00,0x06,SC_ALL_DEVS,"I/O process terminated"},
-  {0x00,0x11,R,SC_AUDIO_PLAY_OPERATION SC_IN_PROGRESS},
-  {0x00,0x12,R,SC_AUDIO_PLAY_OPERATION "paused"},
-  {0x00,0x13,R,SC_AUDIO_PLAY_OPERATION "successfully completed"},
-  {0x00,0x14,R,SC_AUDIO_PLAY_OPERATION "stopped due to error"},
-  {0x00,0x15,R,"No current audio status to return"},
-  {0x00,0x16,SC_ALL_DEVS,SC_OPERATION SC_IN_PROGRESS},
-  {0x00,0x17,D|T|L|W|R|S|O|M|A|E|B|K,"Cleaning requested"},
-  {0x00,0x18,T,"Erase" SC_OPERATION SC_IN_PROGRESS},
-  {0x00,0x19,T,"Locate" SC_OPERATION SC_IN_PROGRESS},
-  {0x00,0x1a,T,"Rewind" SC_OPERATION SC_IN_PROGRESS},
-  {0x00,0x1b,T,"Set capacity" SC_OPERATION SC_IN_PROGRESS},
-  {0x00,0x1c,T,"Verify" SC_OPERATION SC_IN_PROGRESS},
-  {0x01,0x00,D|W|O|B|K,"No index/sector signal"},
-  {0x02,0x00,D|W|R|O|M|B|K,"No seek complete"},
-  {0x03,0x00,D|T|L|W|S|O|B|K,"Peripheral device write fault"},
-  {0x03,0x01,T,"No write current"},
-  {0x03,0x02,T,"Excessive write errors"},
-  {0x04,0x00,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY "cause not reportable"},
-  {0x04,0x01,SC_ALL_DEVS,SC_LOGICAL_UNIT "is" SC_IN_PROGRESS
-  		"of becoming ready"},
-  {0x04,0x02,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY
-  		"initializing cmd. required"},
-  {0x04,0x03,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY
-  		"manual intervention required"},
-  {0x04,0x04,D|T|L|R|O|B,SC_LOGICAL_UNIT SC_NOT_READY "format" SC_IN_PROGRESS},
-  {0x04,0x05,D|T|W|O|M|C|A|B|K,SC_LOGICAL_UNIT SC_NOT_READY
-  		"rebuild" SC_IN_PROGRESS},
-  {0x04,0x06,D|T|W|O|M|C|A|B|K,SC_LOGICAL_UNIT SC_NOT_READY
-  		"recalculation" SC_IN_PROGRESS},
-  {0x04,0x07,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY
-  		SC_OPERATION SC_IN_PROGRESS},
-  {0x04,0x08,R,SC_LOGICAL_UNIT SC_NOT_READY "long write" SC_IN_PROGRESS},
-  {0x04,0x09,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY "self-test"
-		SC_IN_PROGRESS},
-  {0x04,0x0a,SC_ALL_DEVS,SC_LOGICAL_UNIT
-  		"not accessible, asymmetric access state transition"},
-  {0x04,0x0b,SC_ALL_DEVS,SC_LOGICAL_UNIT
-  		"not accessible, target port in standby state"},
-  {0x04,0x0c,SC_ALL_DEVS,SC_LOGICAL_UNIT
-  		"not accessible, target port in unavailable state"},
-  {0x04,0x10,SC_ALL_DEVS,SC_LOGICAL_UNIT SC_NOT_READY
-  		"auxiliary memory not accessible"},
-  {0x05,0x00,D|T|L|W|R|S|O|M|C|A|E|B|K,SC_LOGICAL_UNIT
-  		"does not respond to selection"},
-  {0x06,0x00,D|W|R|O|M|B|K,"No reference position found"},
-  {0x07,0x00,D|T|L|W|R|S|O|M|B|K,"Multiple peripheral devices selected"},
-  {0x08,0x00,D|T|L|W|R|S|O|M|C|A|E|B|K,SC_LOGICAL_UNIT "communication failure"},
-  {0x08,0x01,D|T|L|W|R|S|O|M|C|A|E|B|K,SC_LOGICAL_UNIT
-  		"communication time-out"},
-  {0x08,0x02,D|T|L|W|R|S|O|M|C|A|E|B|K,SC_LOGICAL_UNIT
-  		"communication parity error"},
-  {0x08,0x03,D|T|R|O|M|B|K,SC_LOGICAL_UNIT
-  		"communication CRC error (Ultra-DMA/32)"},
-  {0x08,0x04,D|T|L|P|W|R|S|O|C|K,"Unreachable copy target"},
-  {0x09,0x00,D|T|W|R|O|B,"Track following error"},
-  {0x09,0x01,W|R|O|K,"Tracking servo failure"},
-  {0x09,0x02,W|R|O|K,"Focus servo failure"},
-  {0x09,0x03,W|R|O,"Spindle servo failure"},
-  {0x09,0x04,D|T|W|R|O|B,"Head select fault"},
-  {0x0A,0x00,SC_ALL_DEVS,"Error log overflow"},
-  {0x0B,0x00,SC_ALL_DEVS,"Warning"},
-  {0x0B,0x01,SC_ALL_DEVS,"Warning - specified temperature exceeded"},
-  {0x0B,0x02,SC_ALL_DEVS,"Warning - enclosure degraded"},
-  {0x0C,0x00,T|R|S,"Write error"},
-  {0x0C,0x01,K,"Write error - recovered with auto reallocation"},
-  {0x0C,0x02,D|W|O|B|K,"Write error - auto reallocation failed"},
-  {0x0C,0x03,D|W|O|B|K,"Write error - recommend reassignment"},
-  {0x0C,0x04,D|T|W|O|B,"Compression check miscompare error"},
-  {0x0C,0x05,D|T|W|O|B,"Data expansion occurred during compression"},
-  {0x0C,0x06,D|T|W|O|B,"Block not compressible"},
-  {0x0C,0x07,R,"Write error - recovery needed"},
-  {0x0C,0x08,R,"Write error - recovery failed"},
-  {0x0C,0x09,R,"Write error - loss of streaming"},
-  {0x0C,0x0A,R,"Write error - padding blocks added"},
-  {0x0C,0x0B,D|T|W|R|O|M|B,"Auxiliary memory write error"},
-  {0x0C,0x0C,SC_ALL_DEVS,"Write error - unexpected unsolicited data"},
-  {0x0C,0x0D,SC_ALL_DEVS,"Write error - not enough unsolicited data"},
-  {0x0D,0x00,D|T|L|P|W|R|S|O|C|A|K,
-		"Error detected by third party temporary initiator"},
-  {0x0D,0x01,D|T|L|P|W|R|S|O|C|A|K, "Third party device failure"},
-  {0x0D,0x02,D|T|L|P|W|R|S|O|C|A|K, "Copy target device not reachable"},
-  {0x0D,0x03,D|T|L|P|W|R|S|O|C|A|K, "Incorrect copy target device"},
-  {0x0D,0x04,D|T|L|P|W|R|S|O|C|A|K, "Copy target device underrun"},
-  {0x0D,0x05,D|T|L|P|W|R|S|O|C|A|K, "Copy target device overrun"},
-  {0x10,0x00,D|W|O|B|K,"Id CRC or ECC error"},
-  {0x11,0x00,D|T|W|R|S|O|B|K,"Unrecovered read error"},
-  {0x11,0x01,D|T|W|R|S|O|B|K,"Read retries exhausted"},
-  {0x11,0x02,D|T|W|R|S|O|B|K,"Error too long to correct"},
-  {0x11,0x03,D|T|W|S|O|B|K,"Multiple read errors"},
-  {0x11,0x04,D|W|O|B|K,"Unrecovered read error - auto reallocate failed"},
-  {0x11,0x05,W|R|O|B,"L-EC uncorrectable error"},
-  {0x11,0x06,W|R|O|B,"CIRC unrecovered error"},
-  {0x11,0x07,W|O|B,"Data re-synchronization error"},
-  {0x11,0x08,T,"Incomplete block read"},
-  {0x11,0x09,T,"No gap found"},
-  {0x11,0x0A,D|T|O|B|K,"Miscorrected error"},
-  {0x11,0x0B,D|W|O|B|K,"Unrecovered read error - recommend reassignment"},
-  {0x11,0x0C,D|W|O|B|K,"Unrecovered read error - recommend rewrite the data"},
-  {0x11,0x0D,D|T|W|R|O|B,"De-compression CRC error"},
-  {0x11,0x0E,D|T|W|R|O|B,"Cannot decompress using declared algorithm"},
-  {0x11,0x0F,R,"Error reading UPC/EAN number"},
-  {0x11,0x10,R,"Error reading ISRC number"},
-  {0x11,0x11,R,"Read error - loss of streaming"},
-  {0x11,0x12,D|T|W|R|O|M|B,"Auxiliary memory read error"},
-  {0x11,0x13,SC_ALL_DEVS,"Read error - failed retransmission request"},
-  {0x12,0x00,D|W|O|B|K,"Address mark not found for id field"},
-  {0x13,0x00,D|W|O|B|K,"Address mark not found for data field"},
-  {0x14,0x00,D|T|L|W|R|S|O|B|K,"Recorded entity not found"},
-  {0x14,0x01,D|T|W|R|O|B|K,"Record not found"},
-  {0x14,0x02,T,"Filemark or setmark not found"},
-  {0x14,0x03,T,"End-of-data not found"},
-  {0x14,0x04,T,"Block sequence error"},
-  {0x14,0x05,D|T|W|O|B|K,"Record not found - recommend reassignment"},
-  {0x14,0x06,D|T|W|O|B|K,"Record not found - data auto-reallocated"},
-  {0x14,0x07,T,"Locate" SC_OPERATION " failure"},
-  {0x15,0x00,D|T|L|W|R|S|O|M|B|K,"Random positioning error"},
-  {0x15,0x01,D|T|L|W|R|S|O|M|B|K,"Mechanical positioning error"},
-  {0x15,0x02,D|T|W|R|O|B|K,"Positioning error detected by read of medium"},
-  {0x16,0x00,D|W|O|B|K,"Data synchronization mark error"},
-  {0x16,0x01,D|W|O|B|K,"Data sync error - data rewritten"},
-  {0x16,0x02,D|W|O|B|K,"Data sync error - recommend rewrite"},
-  {0x16,0x03,D|W|O|B|K,"Data sync error - data auto-reallocated"},
-  {0x16,0x04,D|W|O|B|K,"Data sync error - recommend reassignment"},
-  {0x17,0x00,D|T|W|R|S|O|B|K,SC_RECOVERED_DATA
-		"with no error correction applied"},
-  {0x17,0x01,D|T|W|R|S|O|B|K,SC_RECOVERED_DATA "with retries"},
-  {0x17,0x02,D|T|W|R|O|B|K,SC_RECOVERED_DATA "with positive head offset"},
-  {0x17,0x03,D|T|W|R|O|B|K,SC_RECOVERED_DATA "with negative head offset"},
-  {0x17,0x04,W|R|O|B,SC_RECOVERED_DATA "with retries and/or circ applied"},
-  {0x17,0x05,D|W|R|O|B|K,SC_RECOVERED_DATA "using previous sector id"},
-  {0x17,0x06,D|W|O|B|K,SC_RECOVERED_DATA "without ecc - data auto-reallocated"},
-  {0x17,0x07,D|W|R|O|B|K,SC_RECOVERED_DATA
-		"without ecc - recommend reassignment"},
-  {0x17,0x08,D|W|R|O|B|K,SC_RECOVERED_DATA "without ecc - recommend rewrite"},
-  {0x17,0x09,D|W|R|O|B|K,SC_RECOVERED_DATA "without ecc - data rewritten"},
-  {0x18,0x00,D|T|W|R|O|B|K,SC_RECOVERED_DATA "with error correction applied"},
-  {0x18,0x01,D|W|R|O|B|K,SC_RECOVERED_DATA
-		"with error corr. & retries applied"},
-  {0x18,0x02,D|W|R|O|B|K,SC_RECOVERED_DATA "- data auto-reallocated"},
-  {0x18,0x03,R,SC_RECOVERED_DATA "with CIRC"},
-  {0x18,0x04,R,SC_RECOVERED_DATA "with L-EC"},
-  {0x18,0x05,D|W|R|O|B|K,SC_RECOVERED_DATA "- recommend reassignment"},
-  {0x18,0x06,D|W|R|O|B|K,SC_RECOVERED_DATA "- recommend rewrite"},
-  {0x18,0x07,D|W|O|B|K,SC_RECOVERED_DATA "with ecc - data rewritten"},
-  {0x18,0x08,R,SC_RECOVERED_DATA "with linking"},
-  {0x19,0x00,D|O|K,"Defect list error"},
-  {0x19,0x01,D|O|K,"Defect list not available"},
-  {0x19,0x02,D|O|K,"Defect list error in primary list"},
-  {0x19,0x03,D|O|K,"Defect list error in grown list"},
-  {0x1A,0x00,SC_ALL_DEVS,"Parameter list length error"},
-  {0x1B,0x00,SC_ALL_DEVS,"Synchronous data transfer error"},
-  {0x1C,0x00,D|O|B|K,"Defect list not found"},
-  {0x1C,0x01,D|O|B|K,"Primary defect list not found"},
-  {0x1C,0x02,D|O|B|K,"Grown defect list not found"},
-  {0x1D,0x00,D|T|W|R|O|B|K,"Miscompare during verify" SC_OPERATION},
-  {0x1E,0x00,D|W|O|B|K,"Recovered id with ecc correction"},
-  {0x1F,0x00,D|O|K,"Partial defect list transfer"},
-  {0x20,0x00,SC_ALL_DEVS,"Invalid command" SC_OPERATION " code"},
-  {0x20,0x01,D|T|P|W|R|O|M|A|E|B|K,
-  	"Access denied - initiator pending-enrolled"},
-  {0x20,0x02,D|T|P|W|R|O|M|A|E|B|K,"Access denied - no access rights"},
-  {0x20,0x03,D|T|P|W|R|O|M|A|E|B|K,"Access denied - no mgmt id key"},
-  {0x20,0x04,T,"Illegal command while in write capable state"},
-  {0x20,0x05,T,"Obsolete"},
-  {0x20,0x06,T,"Illegal command while in explicit address mode"},
-  {0x20,0x07,T,"Illegal command while in implicit address mode"},
-  {0x20,0x08,D|T|P|W|R|O|M|A|E|B|K,"Access denied - enrollment conflict"},
-  {0x20,0x09,D|T|P|W|R|O|M|A|E|B|K,"Access denied - invalid LU identifier"},
-  {0x20,0x0A,D|T|P|W|R|O|M|A|E|B|K,"Access denied - invalid proxy token"},
-  {0x20,0x0B,D|T|P|W|R|O|M|A|E|B|K,"Access denied - ACL LUN conflict"},
-  {0x21,0x00,D|T|W|R|O|M|B|K,"Logical block address out of range"},
-  {0x21,0x01,D|T|W|R|O|M|B|K,"Invalid element address"},
-  {0x21,0x02,R,"Invalid address for write"},
-  {0x22,0x00,D,"Illegal function (use 20 00,24 00,or 26 00)"},
-  {0x24,0x00,SC_ALL_DEVS,"Invalid field in cdb"},
-  {0x24,0x01,SC_ALL_DEVS,"CDB decryption error"},
-  {0x25,0x00,SC_ALL_DEVS,SC_LOGICAL_UNIT "not supported"},
-  {0x26,0x00,SC_ALL_DEVS,"Invalid field in parameter list"},
-  {0x26,0x01,SC_ALL_DEVS,"Parameter not supported"},
-  {0x26,0x02,SC_ALL_DEVS,"Parameter value invalid"},
-  {0x26,0x03,D|T|L|P|W|R|S|O|M|C|A|E|K,"Threshold parameters not supported"},
-  {0x26,0x04,SC_ALL_DEVS,"Invalid release of persistent reservation"},
-  {0x26,0x05,D|T|L|P|W|R|S|O|M|C|A|B|K,"Data decryption error"},
-  {0x26,0x06,D|T|L|P|W|R|S|O|C|K,"Too many target descriptors"},
-  {0x26,0x07,D|T|L|P|W|R|S|O|C|K,"Unsupported target descriptor type code"},
-  {0x26,0x08,D|T|L|P|W|R|S|O|C|K,"Too many segment descriptors"},
-  {0x26,0x09,D|T|L|P|W|R|S|O|C|K,"Unsupported segment descriptor type code"},
-  {0x26,0x0A,D|T|L|P|W|R|S|O|C|K,"Unexpected inexact segment"},
-  {0x26,0x0B,D|T|L|P|W|R|S|O|C|K,"Inline data length exceeded"},
-  {0x26,0x0C,D|T|L|P|W|R|S|O|C|K,
-		"Invalid" SC_OPERATION " for copy source or destination"},
-  {0x26,0x0D,D|T|L|P|W|R|S|O|C|K,"Copy segment granularity violation"},
-  {0x27,0x00,D|T|W|R|O|B|K,"Write protected"},
-  {0x27,0x01,D|T|W|R|O|B|K,"Hardware write protected"},
-  {0x27,0x02,D|T|W|R|O|B|K,SC_LOGICAL_UNIT "software write protected"},
-  {0x27,0x03,T|R,"Associated write protect"},
-  {0x27,0x04,T|R,"Persistent write protect"},
-  {0x27,0x05,T|R,"Permanent write protect"},
-  {0x27,0x06,R,"Conditional write protect"},
-  {0x28,0x00,SC_ALL_DEVS,"Not ready to ready change, medium may have changed"},
-  {0x28,0x01,D|T|W|R|O|M|B,"Import or export element accessed"},
-  {0x29,0x00,SC_ALL_DEVS,"Power on,reset,or bus device reset occurred"},
-  {0x29,0x01,SC_ALL_DEVS,"Power on occurred"},
-  {0x29,0x02,SC_ALL_DEVS,"Scsi bus reset occurred"},
-  {0x29,0x03,SC_ALL_DEVS,"Bus device reset function occurred"},
-  {0x29,0x04,SC_ALL_DEVS,"Device internal reset"},
-  {0x29,0x05,SC_ALL_DEVS,"Transceiver mode changed to single-ended"},
-  {0x29,0x06,SC_ALL_DEVS,"Transceiver mode changed to lvd"},
-  {0x29,0x07,SC_ALL_DEVS,"I_T nexus loss occurred"},
-  {0x2A,0x00,D|T|L|W|R|S|O|M|C|A|E|B|K,"Parameters changed"},
-  {0x2A,0x01,D|T|L|W|R|S|O|M|C|A|E|B|K,"Mode parameters changed"},
-  {0x2A,0x02,D|T|L|W|R|S|O|M|C|A|E|K,"Log parameters changed"},
-  {0x2A,0x03,D|T|L|P|W|R|S|O|M|C|A|E|K,"Reservations preempted"},
-  {0x2A,0x04,D|T|L|P|W|R|S|O|M|C|A|E,"Reservations released"},
-  {0x2A,0x05,D|T|L|P|W|R|S|O|M|C|A|E,"Registrations preempted"},
-  {0x2A,0x06,SC_ALL_DEVS,"Asymmetric access state changed"},
-  {0x2A,0x07,SC_ALL_DEVS,"Implicit asymmetric access state transition failed"},
-  {0x2B,0x00,D|T|L|P|W|R|S|O|C|K,
-		"Copy cannot execute since host cannot disconnect"},
-  {0x2C,0x00,SC_ALL_DEVS,"Command sequence error"},
-  {0x2C,0x01,S,"Too many windows specified"},
-  {0x2C,0x02,S,"Invalid combination of windows specified"},
-  {0x2C,0x03,R,"Current program area is not empty"},
-  {0x2C,0x04,R,"Current program area is empty"},
-  {0x2C,0x05,B,"Illegal power condition request"},
-  {0x2C,0x06,R,"Persistent prevent conflict"},
-  {0x2C,0x07,SC_ALL_DEVS,"Previous busy status"},
-  {0x2C,0x08,SC_ALL_DEVS,"Previous task set full status"},
-  {0x2C,0x09,D|T|L|P|W|R|S|O|M|E|B|K,"Previous reservation conflict status"},
-  {0x2D,0x00,T,"Overwrite error on update in place"},
-  {0x2F,0x00,SC_ALL_DEVS,"Commands cleared by another initiator"},
-  {0x30,0x00,D|T|W|R|O|M|B|K,"Incompatible medium installed"},
-  {0x30,0x01,D|T|W|R|O|B|K,"Cannot read medium - unknown format"},
-  {0x30,0x02,D|T|W|R|O|B|K,"Cannot read medium - incompatible format"},
-  {0x30,0x03,D|T|R|K,"Cleaning cartridge installed"},
-  {0x30,0x04,D|T|W|R|O|B|K,"Cannot write medium - unknown format"},
-  {0x30,0x05,D|T|W|R|O|B|K,"Cannot write medium - incompatible format"},
-  {0x30,0x06,D|T|W|R|O|B,"Cannot format medium - incompatible medium"},
-  {0x30,0x07,D|T|L|W|R|S|O|M|A|E|B|K,"Cleaning failure"},
-  {0x30,0x08,R,"Cannot write - application code mismatch"},
-  {0x30,0x09,R,"Current session not fixated for append"},
-  {0x30,0x10,R,"Medium not formatted"}, /* should ascq be 0xa ?? */
-  {0x31,0x00,D|T|W|R|O|B|K,"Medium format corrupted"},
-  {0x31,0x01,D|L|R|O|B,"Format command failed"},
-  {0x31,0x02,R,"Zoned formatting failed due to spare linking"},
-  {0x32,0x00,D|W|O|B|K,"No defect spare location available"},
-  {0x32,0x01,D|W|O|B|K,"Defect list update failure"},
-  {0x33,0x00,T,"Tape length error"},
-  {0x34,0x00,SC_ALL_DEVS,"Enclosure failure"},
-  {0x35,0x00,SC_ALL_DEVS,"Enclosure services failure"},
-  {0x35,0x01,SC_ALL_DEVS,"Unsupported enclosure function"},
-  {0x35,0x02,SC_ALL_DEVS,"Enclosure services unavailable"},
-  {0x35,0x03,SC_ALL_DEVS,"Enclosure services transfer failure"},
-  {0x35,0x04,SC_ALL_DEVS,"Enclosure services transfer refused"},
-  {0x36,0x00,L,"Ribbon,ink,or toner failure"},
-  {0x37,0x00,D|T|L|W|R|S|O|M|C|A|E|B|K,"Rounded parameter"},
-  {0x38,0x00,B,"Event status notification"},
-  {0x38,0x02,B,"Esn - power management class event"},
-  {0x38,0x04,B,"Esn - media class event"},
-  {0x38,0x06,B,"Esn - device busy class event"},
-  {0x39,0x00,D|T|L|W|R|S|O|M|C|A|E|K,"Saving parameters not supported"},
-  {0x3A,0x00,D|T|L|W|R|S|O|M|B|K,"Medium not present"},
-  {0x3A,0x01,D|T|W|R|O|M|B|K,"Medium not present - tray closed"},
-  {0x3A,0x02,D|T|W|R|O|M|B|K,"Medium not present - tray open"},
-  {0x3A,0x03,D|T|W|R|O|M|B,"Medium not present - loadable"},
-  {0x3A,0x04,D|T|W|R|O|M|B,
-		"Medium not present - medium auxiliary memory accessible"},
-  {0x3B,0x00,T|L,"Sequential positioning error"},
-  {0x3B,0x01,T,"Tape position error at beginning-of-medium"},
-  {0x3B,0x02,T,"Tape position error at end-of-medium"},
-  {0x3B,0x03,L,"Tape or electronic vertical forms unit " SC_NOT_READY},
-  {0x3B,0x04,L,"Slew failure"},
-  {0x3B,0x05,L,"Paper jam"},
-  {0x3B,0x06,L,"Failed to sense top-of-form"},
-  {0x3B,0x07,L,"Failed to sense bottom-of-form"},
-  {0x3B,0x08,T,"Reposition error"},
-  {0x3B,0x09,S,"Read past end of medium"},
-  {0x3B,0x0A,S,"Read past beginning of medium"},
-  {0x3B,0x0B,S,"Position past end of medium"},
-  {0x3B,0x0C,T|S,"Position past beginning of medium"},
-  {0x3B,0x0D,D|T|W|R|O|M|B|K,"Medium destination element full"},
-  {0x3B,0x0E,D|T|W|R|O|M|B|K,"Medium source element empty"},
-  {0x3B,0x0F,R,"End of medium reached"},
-  {0x3B,0x11,D|T|W|R|O|M|B|K,"Medium magazine not accessible"},
-  {0x3B,0x12,D|T|W|R|O|M|B|K,"Medium magazine removed"},
-  {0x3B,0x13,D|T|W|R|O|M|B|K,"Medium magazine inserted"},
-  {0x3B,0x14,D|T|W|R|O|M|B|K,"Medium magazine locked"},
-  {0x3B,0x15,D|T|W|R|O|M|B|K,"Medium magazine unlocked"},
-  {0x3B,0x16,R,"Mechanical positioning or changer error"},
-  {0x3D,0x00,D|T|L|P|W|R|S|O|M|C|A|E|K,"Invalid bits in identify message"},
-  {0x3E,0x00,SC_ALL_DEVS,SC_LOGICAL_UNIT "has not self-configured yet"},
-  {0x3E,0x01,SC_ALL_DEVS,SC_LOGICAL_UNIT "failure"},
-  {0x3E,0x02,SC_ALL_DEVS,"Timeout on logical unit"},
-  {0x3E,0x03,SC_ALL_DEVS,SC_LOGICAL_UNIT "failed self-test"},
-  {0x3E,0x04,SC_ALL_DEVS,SC_LOGICAL_UNIT "unable to update self-test log"},
-  {0x3F,0x00,SC_ALL_DEVS,"Target operating conditions have changed"},
-  {0x3F,0x01,SC_ALL_DEVS,"Microcode has been changed"},
-  {0x3F,0x02,D|T|L|P|W|R|S|O|M|C|B|K,"Changed operating definition"},
-  {0x3F,0x03,SC_ALL_DEVS,"Inquiry data has changed"},
-  {0x3F,0x04,D|T|W|R|O|M|C|A|E|B|K,"Component device attached"},
-  {0x3F,0x05,D|T|W|R|O|M|C|A|E|B|K,"Device identifier changed"},
-  {0x3F,0x06,D|T|W|R|O|M|C|A|E|B,"Redundancy group created or modified"},
-  {0x3F,0x07,D|T|W|R|O|M|C|A|E|B,"Redundancy group deleted"},
-  {0x3F,0x08,D|T|W|R|O|M|C|A|E|B,"Spare created or modified"},
-  {0x3F,0x09,D|T|W|R|O|M|C|A|E|B,"Spare deleted"},
-  {0x3F,0x0A,D|T|W|R|O|M|C|A|E|B|K,"Volume set created or modified"},
-  {0x3F,0x0B,D|T|W|R|O|M|C|A|E|B|K,"Volume set deleted"},
-  {0x3F,0x0C,D|T|W|R|O|M|C|A|E|B|K,"Volume set deassigned"},
-  {0x3F,0x0D,D|T|W|R|O|M|C|A|E|B|K,"Volume set reassigned"},
-  {0x3F,0x0E,D|T|L|P|W|R|S|O|M|C|A|E,"Reported luns data has changed"},
-  {0x3F,0x10,D|T|W|R|O|M|B,"Medium loadable"},
-  {0x3F,0x11,D|T|W|R|O|M|B,"Medium auxiliary memory accessible"},
-  {0x40,0x00,D,"Ram failure (should use 40 nn)"},
-  /*
-   * FIXME(eric) - need a way to represent wildcards here.
-   */
-  {0x40,0x00,SC_ALL_DEVS,"Diagnostic failure on component nn (80h-ffh)"},
-  {0x41,0x00,D,"Data path failure (should use 40 nn)"},
-  {0x42,0x00,D,"Power-on or self-test failure (should use 40 nn)"},
-  {0x43,0x00,SC_ALL_DEVS,"Message error"},
-  {0x44,0x00,SC_ALL_DEVS,"Internal target failure"},
-  {0x45,0x00,SC_ALL_DEVS,"Select or reselect failure"},
-  {0x46,0x00,D|T|L|P|W|R|S|O|M|C|B|K,"Unsuccessful soft reset"},
-  {0x47,0x00,SC_ALL_DEVS,"Scsi parity error"},
-  {0x47,0x01,SC_ALL_DEVS,"Data phase CRC error detected"},
-  {0x47,0x02,SC_ALL_DEVS,"Scsi parity error detected during st data phase"},
-  {0x47,0x03,SC_ALL_DEVS,"Information unit CRC error detected"},
-  {0x47,0x04,SC_ALL_DEVS,"Asynchronous information protection error detected"},
-  {0x47,0x05,SC_ALL_DEVS,"Protocol service CRC error"},
-  {0x48,0x00,SC_ALL_DEVS,"Initiator detected error message received"},
-  {0x49,0x00,SC_ALL_DEVS,"Invalid message error"},
-  {0x4A,0x00,SC_ALL_DEVS,"Command phase error"},
-  {0x4B,0x00,SC_ALL_DEVS,"Data phase error"},
-  {0x4C,0x00,SC_ALL_DEVS,SC_LOGICAL_UNIT "failed self-configuration"},
-  /*
-   * FIXME(eric) - need a way to represent wildcards here.
-   */
-  {0x4D,0x00,SC_ALL_DEVS,"Tagged overlapped commands (nn = queue tag)"},
-  {0x4E,0x00,SC_ALL_DEVS,"Overlapped commands attempted"},
-  {0x50,0x00,T,"Write append error"},
-  {0x50,0x01,T,"Write append position error"},
-  {0x50,0x02,T,"Position error related to timing"},
-  {0x51,0x00,T|R|O,"Erase failure"},
-  {0x52,0x00,T,"Cartridge fault"},
-  {0x53,0x00,D|T|L|W|R|S|O|M|B|K,"Media load or eject failed"},
-  {0x53,0x01,T,"Unload tape failure"},
-  {0x53,0x02,D|T|W|R|O|M|B|K,"Medium removal prevented"},
-  {0x54,0x00,P,"Scsi to host system interface failure"},
-  {0x55,0x00,P,"System resource failure"},
-  {0x55,0x01,D|O|B|K,"System buffer full"},
-  {0x55,0x02,D|T|L|P|W|R|S|O|M|A|E|K,"Insufficient reservation resources"},
-  {0x55,0x03,D|T|L|P|W|R|S|O|M|C|A|E,"Insufficient resources"},
-  {0x55,0x04,D|T|L|P|W|R|S|O|M|A|E,"Insufficient registration resources"},
-  {0x55,0x05,D|T|P|W|R|O|M|A|E|B|K,"Insufficient access control resources"},
-  {0x55,0x06,D|T|W|R|O|M|B,"Auxiliary memory out of space"},
-  {0x57,0x00,R,"Unable to recover table-of-contents"},
-  {0x58,0x00,O,"Generation does not exist"},
-  {0x59,0x00,O,"Updated block read"},
-  {0x5A,0x00,D|T|L|P|W|R|S|O|M|B|K,"Operator request or state change input"},
-  {0x5A,0x01,D|T|W|R|O|M|B|K,"Operator medium removal request"},
-  {0x5A,0x02,D|T|W|R|O|A|B|K,"Operator selected write protect"},
-  {0x5A,0x03,D|T|W|R|O|A|B|K,"Operator selected write permit"},
-  {0x5B,0x00,D|T|L|P|W|R|S|O|M|K,"Log exception"},
-  {0x5B,0x01,D|T|L|P|W|R|S|O|M|K,"Threshold condition met"},
-  {0x5B,0x02,D|T|L|P|W|R|S|O|M|K,"Log counter at maximum"},
-  {0x5B,0x03,D|T|L|P|W|R|S|O|M|K,"Log list codes exhausted"},
-  {0x5C,0x00,D|O,"Rpl status change"},
-  {0x5C,0x01,D|O,"Spindles synchronized"},
-  {0x5C,0x02,D|O,"Spindles not synchronized"},
-  {0x5D,0x00,SC_ALL_DEVS,"Failure prediction threshold exceeded"},
-  {0x5D,0x01,R|B,"Media failure prediction threshold exceeded"},
-  {0x5D,0x02,R,SC_LOGICAL_UNIT "failure prediction threshold exceeded"},
-  {0x5D,0x03,R,"spare area exhaustion prediction threshold exceeded"},
+static struct error_info additional[] = {
+	{0x00, 0x00, SC_ALL_DEVS, "No additional sense information"},
+	{0x00, 0x01, T, "Filemark detected"},
+	{0x00, 0x02, T | S, "End-of-partition/medium detected"},
+	{0x00, 0x03, T, "Setmark detected"},
+	{0x00, 0x04, T | S, "Beginning-of-partition/medium detected"},
+	{0x00, 0x05, T | L | S, "End-of-data detected"},
+	{0x00, 0x06, SC_ALL_DEVS, "I/O process terminated"},
+	{0x00, 0x11, R, SC_AUDIO_PLAY_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x12, R, SC_AUDIO_PLAY_OPERATION "paused"},
+	{0x00, 0x13, R, SC_AUDIO_PLAY_OPERATION "successfully completed"},
+	{0x00, 0x14, R, SC_AUDIO_PLAY_OPERATION "stopped due to error"},
+	{0x00, 0x15, R, "No current audio status to return"},
+	{0x00, 0x16, SC_ALL_DEVS, SC_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x17, D | T | L | W | R | S | O | M | A | E | B | K,
+	 "Cleaning requested"},
+	{0x00, 0x18, T, "Erase" SC_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x19, T, "Locate" SC_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x1a, T, "Rewind" SC_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x1b, T, "Set capacity" SC_OPERATION SC_IN_PROGRESS},
+	{0x00, 0x1c, T, "Verify" SC_OPERATION SC_IN_PROGRESS},
+	{0x01, 0x00, D | W | O | B | K, "No index/sector signal"},
+	{0x02, 0x00, D | W | R | O | M | B | K, "No seek complete"},
+	{0x03, 0x00, D | T | L | W | S | O | B | K,
+	 "Peripheral device write fault"},
+	{0x03, 0x01, T, "No write current"},
+	{0x03, 0x02, T, "Excessive write errors"},
+	{0x04, 0x00, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY "cause not reportable"},
+	{0x04, 0x01, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "is" SC_IN_PROGRESS "of becoming ready"},
+	{0x04, 0x02, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY "initializing cmd. required"},
+	{0x04, 0x03, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY "manual intervention required"},
+	{0x04, 0x04, D | T | L | R | O | B,
+	 SC_LOGICAL_UNIT SC_NOT_READY "format" SC_IN_PROGRESS},
+	{0x04, 0x05, D | T | W | O | M | C | A | B | K,
+	 SC_LOGICAL_UNIT SC_NOT_READY "rebuild" SC_IN_PROGRESS},
+	{0x04, 0x06, D | T | W | O | M | C | A | B | K,
+	 SC_LOGICAL_UNIT SC_NOT_READY "recalculation" SC_IN_PROGRESS},
+	{0x04, 0x07, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY SC_OPERATION SC_IN_PROGRESS},
+	{0x04, 0x08, R,
+	 SC_LOGICAL_UNIT SC_NOT_READY "long write" SC_IN_PROGRESS},
+	{0x04, 0x09, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY "self-test" SC_IN_PROGRESS},
+	{0x04, 0x0a, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "not accessible, asymmetric access state transition"},
+	{0x04, 0x0b, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "not accessible, target port in standby state"},
+	{0x04, 0x0c, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "not accessible, target port in unavailable state"},
+	{0x04, 0x10, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT SC_NOT_READY "auxiliary memory not accessible"},
+	{0x05, 0x00, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 SC_LOGICAL_UNIT "does not respond to selection"},
+	{0x06, 0x00, D | W | R | O | M | B | K, "No reference position found"},
+	{0x07, 0x00, D | T | L | W | R | S | O | M | B | K,
+	 "Multiple peripheral devices selected"},
+	{0x08, 0x00, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 SC_LOGICAL_UNIT "communication failure"},
+	{0x08, 0x01, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 SC_LOGICAL_UNIT "communication time-out"},
+	{0x08, 0x02, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 SC_LOGICAL_UNIT "communication parity error"},
+	{0x08, 0x03, D | T | R | O | M | B | K,
+	 SC_LOGICAL_UNIT "communication CRC error (Ultra-DMA/32)"},
+	{0x08, 0x04, D | T | L | P | W | R | S | O | C | K,
+	 "Unreachable copy target"},
+	{0x09, 0x00, D | T | W | R | O | B, "Track following error"},
+	{0x09, 0x01, W | R | O | K, "Tracking servo failure"},
+	{0x09, 0x02, W | R | O | K, "Focus servo failure"},
+	{0x09, 0x03, W | R | O, "Spindle servo failure"},
+	{0x09, 0x04, D | T | W | R | O | B, "Head select fault"},
+	{0x0A, 0x00, SC_ALL_DEVS, "Error log overflow"},
+	{0x0B, 0x00, SC_ALL_DEVS, "Warning"},
+	{0x0B, 0x01, SC_ALL_DEVS, "Warning - specified temperature exceeded"},
+	{0x0B, 0x02, SC_ALL_DEVS, "Warning - enclosure degraded"},
+	{0x0C, 0x00, T | R | S, "Write error"},
+	{0x0C, 0x01, K, "Write error - recovered with auto reallocation"},
+	{0x0C, 0x02, D | W | O | B | K,
+	 "Write error - auto reallocation failed"},
+	{0x0C, 0x03, D | W | O | B | K, "Write error - recommend reassignment"},
+	{0x0C, 0x04, D | T | W | O | B, "Compression check miscompare error"},
+	{0x0C, 0x05, D | T | W | O | B,
+	 "Data expansion occurred during compression"},
+	{0x0C, 0x06, D | T | W | O | B, "Block not compressible"},
+	{0x0C, 0x07, R, "Write error - recovery needed"},
+	{0x0C, 0x08, R, "Write error - recovery failed"},
+	{0x0C, 0x09, R, "Write error - loss of streaming"},
+	{0x0C, 0x0A, R, "Write error - padding blocks added"},
+	{0x0C, 0x0B, D | T | W | R | O | M | B, "Auxiliary memory write error"},
+	{0x0C, 0x0C, SC_ALL_DEVS, "Write error - unexpected unsolicited data"},
+	{0x0C, 0x0D, SC_ALL_DEVS, "Write error - not enough unsolicited data"},
+	{0x0D, 0x00, D | T | L | P | W | R | S | O | C | A | K,
+	 "Error detected by third party temporary initiator"},
+	{0x0D, 0x01, D | T | L | P | W | R | S | O | C | A | K,
+	 "Third party device failure"},
+	{0x0D, 0x02, D | T | L | P | W | R | S | O | C | A | K,
+	 "Copy target device not reachable"},
+	{0x0D, 0x03, D | T | L | P | W | R | S | O | C | A | K,
+	 "Incorrect copy target device"},
+	{0x0D, 0x04, D | T | L | P | W | R | S | O | C | A | K,
+	 "Copy target device underrun"},
+	{0x0D, 0x05, D | T | L | P | W | R | S | O | C | A | K,
+	 "Copy target device overrun"},
+	{0x10, 0x00, D | W | O | B | K, "Id CRC or ECC error"},
+	{0x11, 0x00, D | T | W | R | S | O | B | K, "Unrecovered read error"},
+	{0x11, 0x01, D | T | W | R | S | O | B | K, "Read retries exhausted"},
+	{0x11, 0x02, D | T | W | R | S | O | B | K,
+	 "Error too long to correct"},
+	{0x11, 0x03, D | T | W | S | O | B | K, "Multiple read errors"},
+	{0x11, 0x04, D | W | O | B | K,
+	 "Unrecovered read error - auto reallocate failed"},
+	{0x11, 0x05, W | R | O | B, "L-EC uncorrectable error"},
+	{0x11, 0x06, W | R | O | B, "CIRC unrecovered error"},
+	{0x11, 0x07, W | O | B, "Data re-synchronization error"},
+	{0x11, 0x08, T, "Incomplete block read"},
+	{0x11, 0x09, T, "No gap found"},
+	{0x11, 0x0A, D | T | O | B | K, "Miscorrected error"},
+	{0x11, 0x0B, D | W | O | B | K,
+	 "Unrecovered read error - recommend reassignment"},
+	{0x11, 0x0C, D | W | O | B | K,
+	 "Unrecovered read error - recommend rewrite the data"},
+	{0x11, 0x0D, D | T | W | R | O | B, "De-compression CRC error"},
+	{0x11, 0x0E, D | T | W | R | O | B,
+	 "Cannot decompress using declared algorithm"},
+	{0x11, 0x0F, R, "Error reading UPC/EAN number"},
+	{0x11, 0x10, R, "Error reading ISRC number"},
+	{0x11, 0x11, R, "Read error - loss of streaming"},
+	{0x11, 0x12, D | T | W | R | O | M | B, "Auxiliary memory read error"},
+	{0x11, 0x13, SC_ALL_DEVS, "Read error - failed retransmission request"},
+	{0x12, 0x00, D | W | O | B | K, "Address mark not found for id field"},
+	{0x13, 0x00, D | W | O | B | K,
+	 "Address mark not found for data field"},
+	{0x14, 0x00, D | T | L | W | R | S | O | B | K,
+	 "Recorded entity not found"},
+	{0x14, 0x01, D | T | W | R | O | B | K, "Record not found"},
+	{0x14, 0x02, T, "Filemark or setmark not found"},
+	{0x14, 0x03, T, "End-of-data not found"},
+	{0x14, 0x04, T, "Block sequence error"},
+	{0x14, 0x05, D | T | W | O | B | K,
+	 "Record not found - recommend reassignment"},
+	{0x14, 0x06, D | T | W | O | B | K,
+	 "Record not found - data auto-reallocated"},
+	{0x14, 0x07, T, "Locate" SC_OPERATION " failure"},
+	{0x15, 0x00, D | T | L | W | R | S | O | M | B | K,
+	 "Random positioning error"},
+	{0x15, 0x01, D | T | L | W | R | S | O | M | B | K,
+	 "Mechanical positioning error"},
+	{0x15, 0x02, D | T | W | R | O | B | K,
+	 "Positioning error detected by read of medium"},
+	{0x16, 0x00, D | W | O | B | K, "Data synchronization mark error"},
+	{0x16, 0x01, D | W | O | B | K, "Data sync error - data rewritten"},
+	{0x16, 0x02, D | W | O | B | K, "Data sync error - recommend rewrite"},
+	{0x16, 0x03, D | W | O | B | K,
+	 "Data sync error - data auto-reallocated"},
+	{0x16, 0x04, D | W | O | B | K,
+	 "Data sync error - recommend reassignment"},
+	{0x17, 0x00, D | T | W | R | S | O | B | K,
+	 SC_RECOVERED_DATA "with no error correction applied"},
+	{0x17, 0x01, D | T | W | R | S | O | B | K,
+	 SC_RECOVERED_DATA "with retries"},
+	{0x17, 0x02, D | T | W | R | O | B | K,
+	 SC_RECOVERED_DATA "with positive head offset"},
+	{0x17, 0x03, D | T | W | R | O | B | K,
+	 SC_RECOVERED_DATA "with negative head offset"},
+	{0x17, 0x04, W | R | O | B,
+	 SC_RECOVERED_DATA "with retries and/or circ applied"},
+	{0x17, 0x05, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "using previous sector id"},
+	{0x17, 0x06, D | W | O | B | K,
+	 SC_RECOVERED_DATA "without ecc - data auto-reallocated"},
+	{0x17, 0x07, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "without ecc - recommend reassignment"},
+	{0x17, 0x08, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "without ecc - recommend rewrite"},
+	{0x17, 0x09, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "without ecc - data rewritten"},
+	{0x18, 0x00, D | T | W | R | O | B | K,
+	 SC_RECOVERED_DATA "with error correction applied"},
+	{0x18, 0x01, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "with error corr. & retries applied"},
+	{0x18, 0x02, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "- data auto-reallocated"},
+	{0x18, 0x03, R, SC_RECOVERED_DATA "with CIRC"},
+	{0x18, 0x04, R, SC_RECOVERED_DATA "with L-EC"},
+	{0x18, 0x05, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "- recommend reassignment"},
+	{0x18, 0x06, D | W | R | O | B | K,
+	 SC_RECOVERED_DATA "- recommend rewrite"},
+	{0x18, 0x07, D | W | O | B | K,
+	 SC_RECOVERED_DATA "with ecc - data rewritten"},
+	{0x18, 0x08, R, SC_RECOVERED_DATA "with linking"},
+	{0x19, 0x00, D | O | K, "Defect list error"},
+	{0x19, 0x01, D | O | K, "Defect list not available"},
+	{0x19, 0x02, D | O | K, "Defect list error in primary list"},
+	{0x19, 0x03, D | O | K, "Defect list error in grown list"},
+	{0x1A, 0x00, SC_ALL_DEVS, "Parameter list length error"},
+	{0x1B, 0x00, SC_ALL_DEVS, "Synchronous data transfer error"},
+	{0x1C, 0x00, D | O | B | K, "Defect list not found"},
+	{0x1C, 0x01, D | O | B | K, "Primary defect list not found"},
+	{0x1C, 0x02, D | O | B | K, "Grown defect list not found"},
+	{0x1D, 0x00, D | T | W | R | O | B | K,
+	 "Miscompare during verify" SC_OPERATION},
+	{0x1E, 0x00, D | W | O | B | K, "Recovered id with ecc correction"},
+	{0x1F, 0x00, D | O | K, "Partial defect list transfer"},
+	{0x20, 0x00, SC_ALL_DEVS, "Invalid command" SC_OPERATION " code"},
+	{0x20, 0x01, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - initiator pending-enrolled"},
+	{0x20, 0x02, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - no access rights"},
+	{0x20, 0x03, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - no mgmt id key"},
+	{0x20, 0x04, T, "Illegal command while in write capable state"},
+	{0x20, 0x05, T, "Obsolete"},
+	{0x20, 0x06, T, "Illegal command while in explicit address mode"},
+	{0x20, 0x07, T, "Illegal command while in implicit address mode"},
+	{0x20, 0x08, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - enrollment conflict"},
+	{0x20, 0x09, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - invalid LU identifier"},
+	{0x20, 0x0A, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - invalid proxy token"},
+	{0x20, 0x0B, D | T | P | W | R | O | M | A | E | B | K,
+	 "Access denied - ACL LUN conflict"},
+	{0x21, 0x00, D | T | W | R | O | M | B | K,
+	 "Logical block address out of range"},
+	{0x21, 0x01, D | T | W | R | O | M | B | K, "Invalid element address"},
+	{0x21, 0x02, R, "Invalid address for write"},
+	{0x22, 0x00, D, "Illegal function (use 20 00,24 00,or 26 00)"},
+	{0x24, 0x00, SC_ALL_DEVS, "Invalid field in cdb"},
+	{0x24, 0x01, SC_ALL_DEVS, "CDB decryption error"},
+	{0x25, 0x00, SC_ALL_DEVS, SC_LOGICAL_UNIT "not supported"},
+	{0x26, 0x00, SC_ALL_DEVS, "Invalid field in parameter list"},
+	{0x26, 0x01, SC_ALL_DEVS, "Parameter not supported"},
+	{0x26, 0x02, SC_ALL_DEVS, "Parameter value invalid"},
+	{0x26, 0x03, D | T | L | P | W | R | S | O | M | C | A | E | K,
+	 "Threshold parameters not supported"},
+	{0x26, 0x04, SC_ALL_DEVS, "Invalid release of persistent reservation"},
+	{0x26, 0x05, D | T | L | P | W | R | S | O | M | C | A | B | K,
+	 "Data decryption error"},
+	{0x26, 0x06, D | T | L | P | W | R | S | O | C | K,
+	 "Too many target descriptors"},
+	{0x26, 0x07, D | T | L | P | W | R | S | O | C | K,
+	 "Unsupported target descriptor type code"},
+	{0x26, 0x08, D | T | L | P | W | R | S | O | C | K,
+	 "Too many segment descriptors"},
+	{0x26, 0x09, D | T | L | P | W | R | S | O | C | K,
+	 "Unsupported segment descriptor type code"},
+	{0x26, 0x0A, D | T | L | P | W | R | S | O | C | K,
+	 "Unexpected inexact segment"},
+	{0x26, 0x0B, D | T | L | P | W | R | S | O | C | K,
+	 "Inline data length exceeded"},
+	{0x26, 0x0C, D | T | L | P | W | R | S | O | C | K,
+	 "Invalid" SC_OPERATION " for copy source or destination"},
+	{0x26, 0x0D, D | T | L | P | W | R | S | O | C | K,
+	 "Copy segment granularity violation"},
+	{0x27, 0x00, D | T | W | R | O | B | K, "Write protected"},
+	{0x27, 0x01, D | T | W | R | O | B | K, "Hardware write protected"},
+	{0x27, 0x02, D | T | W | R | O | B | K,
+	 SC_LOGICAL_UNIT "software write protected"},
+	{0x27, 0x03, T | R, "Associated write protect"},
+	{0x27, 0x04, T | R, "Persistent write protect"},
+	{0x27, 0x05, T | R, "Permanent write protect"},
+	{0x27, 0x06, R, "Conditional write protect"},
+	{0x28, 0x00, SC_ALL_DEVS,
+	 "Not ready to ready change, medium may have changed"},
+	{0x28, 0x01, D | T | W | R | O | M | B,
+	 "Import or export element accessed"},
+	{0x29, 0x00, SC_ALL_DEVS,
+	 "Power on,reset,or bus device reset occurred"},
+	{0x29, 0x01, SC_ALL_DEVS, "Power on occurred"},
+	{0x29, 0x02, SC_ALL_DEVS, "Scsi bus reset occurred"},
+	{0x29, 0x03, SC_ALL_DEVS, "Bus device reset function occurred"},
+	{0x29, 0x04, SC_ALL_DEVS, "Device internal reset"},
+	{0x29, 0x05, SC_ALL_DEVS, "Transceiver mode changed to single-ended"},
+	{0x29, 0x06, SC_ALL_DEVS, "Transceiver mode changed to lvd"},
+	{0x29, 0x07, SC_ALL_DEVS, "I_T nexus loss occurred"},
+	{0x2A, 0x00, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 "Parameters changed"},
+	{0x2A, 0x01, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 "Mode parameters changed"},
+	{0x2A, 0x02, D | T | L | W | R | S | O | M | C | A | E | K,
+	 "Log parameters changed"},
+	{0x2A, 0x03, D | T | L | P | W | R | S | O | M | C | A | E | K,
+	 "Reservations preempted"},
+	{0x2A, 0x04, D | T | L | P | W | R | S | O | M | C | A | E,
+	 "Reservations released"},
+	{0x2A, 0x05, D | T | L | P | W | R | S | O | M | C | A | E,
+	 "Registrations preempted"},
+	{0x2A, 0x06, SC_ALL_DEVS, "Asymmetric access state changed"},
+	{0x2A, 0x07, SC_ALL_DEVS,
+	 "Implicit asymmetric access state transition failed"},
+	{0x2B, 0x00, D | T | L | P | W | R | S | O | C | K,
+	 "Copy cannot execute since host cannot disconnect"},
+	{0x2C, 0x00, SC_ALL_DEVS, "Command sequence error"},
+	{0x2C, 0x01, S, "Too many windows specified"},
+	{0x2C, 0x02, S, "Invalid combination of windows specified"},
+	{0x2C, 0x03, R, "Current program area is not empty"},
+	{0x2C, 0x04, R, "Current program area is empty"},
+	{0x2C, 0x05, B, "Illegal power condition request"},
+	{0x2C, 0x06, R, "Persistent prevent conflict"},
+	{0x2C, 0x07, SC_ALL_DEVS, "Previous busy status"},
+	{0x2C, 0x08, SC_ALL_DEVS, "Previous task set full status"},
+	{0x2C, 0x09, D | T | L | P | W | R | S | O | M | E | B | K,
+	 "Previous reservation conflict status"},
+	{0x2D, 0x00, T, "Overwrite error on update in place"},
+	{0x2F, 0x00, SC_ALL_DEVS, "Commands cleared by another initiator"},
+	{0x30, 0x00, D | T | W | R | O | M | B | K,
+	 "Incompatible medium installed"},
+	{0x30, 0x01, D | T | W | R | O | B | K,
+	 "Cannot read medium - unknown format"},
+	{0x30, 0x02, D | T | W | R | O | B | K,
+	 "Cannot read medium - incompatible format"},
+	{0x30, 0x03, D | T | R | K, "Cleaning cartridge installed"},
+	{0x30, 0x04, D | T | W | R | O | B | K,
+	 "Cannot write medium - unknown format"},
+	{0x30, 0x05, D | T | W | R | O | B | K,
+	 "Cannot write medium - incompatible format"},
+	{0x30, 0x06, D | T | W | R | O | B,
+	 "Cannot format medium - incompatible medium"},
+	{0x30, 0x07, D | T | L | W | R | S | O | M | A | E | B | K,
+	 "Cleaning failure"},
+	{0x30, 0x08, R, "Cannot write - application code mismatch"},
+	{0x30, 0x09, R, "Current session not fixated for append"},
+	{0x30, 0x10, R, "Medium not formatted"},	/* should ascq be 0xa ?? */
+	{0x31, 0x00, D | T | W | R | O | B | K, "Medium format corrupted"},
+	{0x31, 0x01, D | L | R | O | B, "Format command failed"},
+	{0x31, 0x02, R, "Zoned formatting failed due to spare linking"},
+	{0x32, 0x00, D | W | O | B | K, "No defect spare location available"},
+	{0x32, 0x01, D | W | O | B | K, "Defect list update failure"},
+	{0x33, 0x00, T, "Tape length error"},
+	{0x34, 0x00, SC_ALL_DEVS, "Enclosure failure"},
+	{0x35, 0x00, SC_ALL_DEVS, "Enclosure services failure"},
+	{0x35, 0x01, SC_ALL_DEVS, "Unsupported enclosure function"},
+	{0x35, 0x02, SC_ALL_DEVS, "Enclosure services unavailable"},
+	{0x35, 0x03, SC_ALL_DEVS, "Enclosure services transfer failure"},
+	{0x35, 0x04, SC_ALL_DEVS, "Enclosure services transfer refused"},
+	{0x36, 0x00, L, "Ribbon,ink,or toner failure"},
+	{0x37, 0x00, D | T | L | W | R | S | O | M | C | A | E | B | K,
+	 "Rounded parameter"},
+	{0x38, 0x00, B, "Event status notification"},
+	{0x38, 0x02, B, "Esn - power management class event"},
+	{0x38, 0x04, B, "Esn - media class event"},
+	{0x38, 0x06, B, "Esn - device busy class event"},
+	{0x39, 0x00, D | T | L | W | R | S | O | M | C | A | E | K,
+	 "Saving parameters not supported"},
+	{0x3A, 0x00, D | T | L | W | R | S | O | M | B | K,
+	 "Medium not present"},
+	{0x3A, 0x01, D | T | W | R | O | M | B | K,
+	 "Medium not present - tray closed"},
+	{0x3A, 0x02, D | T | W | R | O | M | B | K,
+	 "Medium not present - tray open"},
+	{0x3A, 0x03, D | T | W | R | O | M | B,
+	 "Medium not present - loadable"},
+	{0x3A, 0x04, D | T | W | R | O | M | B,
+	 "Medium not present - medium auxiliary memory accessible"},
+	{0x3B, 0x00, T | L, "Sequential positioning error"},
+	{0x3B, 0x01, T, "Tape position error at beginning-of-medium"},
+	{0x3B, 0x02, T, "Tape position error at end-of-medium"},
+	{0x3B, 0x03, L, "Tape or electronic vertical forms unit " SC_NOT_READY},
+	{0x3B, 0x04, L, "Slew failure"},
+	{0x3B, 0x05, L, "Paper jam"},
+	{0x3B, 0x06, L, "Failed to sense top-of-form"},
+	{0x3B, 0x07, L, "Failed to sense bottom-of-form"},
+	{0x3B, 0x08, T, "Reposition error"},
+	{0x3B, 0x09, S, "Read past end of medium"},
+	{0x3B, 0x0A, S, "Read past beginning of medium"},
+	{0x3B, 0x0B, S, "Position past end of medium"},
+	{0x3B, 0x0C, T | S, "Position past beginning of medium"},
+	{0x3B, 0x0D, D | T | W | R | O | M | B | K,
+	 "Medium destination element full"},
+	{0x3B, 0x0E, D | T | W | R | O | M | B | K,
+	 "Medium source element empty"},
+	{0x3B, 0x0F, R, "End of medium reached"},
+	{0x3B, 0x11, D | T | W | R | O | M | B | K,
+	 "Medium magazine not accessible"},
+	{0x3B, 0x12, D | T | W | R | O | M | B | K, "Medium magazine removed"},
+	{0x3B, 0x13, D | T | W | R | O | M | B | K, "Medium magazine inserted"},
+	{0x3B, 0x14, D | T | W | R | O | M | B | K, "Medium magazine locked"},
+	{0x3B, 0x15, D | T | W | R | O | M | B | K, "Medium magazine unlocked"},
+	{0x3B, 0x16, R, "Mechanical positioning or changer error"},
+	{0x3D, 0x00, D | T | L | P | W | R | S | O | M | C | A | E | K,
+	 "Invalid bits in identify message"},
+	{0x3E, 0x00, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "has not self-configured yet"},
+	{0x3E, 0x01, SC_ALL_DEVS, SC_LOGICAL_UNIT "failure"},
+	{0x3E, 0x02, SC_ALL_DEVS, "Timeout on logical unit"},
+	{0x3E, 0x03, SC_ALL_DEVS, SC_LOGICAL_UNIT "failed self-test"},
+	{0x3E, 0x04, SC_ALL_DEVS,
+	 SC_LOGICAL_UNIT "unable to update self-test log"},
+	{0x3F, 0x00, SC_ALL_DEVS, "Target operating conditions have changed"},
+	{0x3F, 0x01, SC_ALL_DEVS, "Microcode has been changed"},
+	{0x3F, 0x02, D | T | L | P | W | R | S | O | M | C | B | K,
+	 "Changed operating definition"},
+	{0x3F, 0x03, SC_ALL_DEVS, "Inquiry data has changed"},
+	{0x3F, 0x04, D | T | W | R | O | M | C | A | E | B | K,
+	 "Component device attached"},
+	{0x3F, 0x05, D | T | W | R | O | M | C | A | E | B | K,
+	 "Device identifier changed"},
+	{0x3F, 0x06, D | T | W | R | O | M | C | A | E | B,
+	 "Redundancy group created or modified"},
+	{0x3F, 0x07, D | T | W | R | O | M | C | A | E | B,
+	 "Redundancy group deleted"},
+	{0x3F, 0x08, D | T | W | R | O | M | C | A | E | B,
+	 "Spare created or modified"},
+	{0x3F, 0x09, D | T | W | R | O | M | C | A | E | B, "Spare deleted"},
+	{0x3F, 0x0A, D | T | W | R | O | M | C | A | E | B | K,
+	 "Volume set created or modified"},
+	{0x3F, 0x0B, D | T | W | R | O | M | C | A | E | B | K,
+	 "Volume set deleted"},
+	{0x3F, 0x0C, D | T | W | R | O | M | C | A | E | B | K,
+	 "Volume set deassigned"},
+	{0x3F, 0x0D, D | T | W | R | O | M | C | A | E | B | K,
+	 "Volume set reassigned"},
+	{0x3F, 0x0E, D | T | L | P | W | R | S | O | M | C | A | E,
+	 "Reported luns data has changed"},
+	{0x3F, 0x10, D | T | W | R | O | M | B, "Medium loadable"},
+	{0x3F, 0x11, D | T | W | R | O | M | B,
+	 "Medium auxiliary memory accessible"},
+	{0x40, 0x00, D, "Ram failure (should use 40 nn)"},
+	/*
+	 * FIXME(eric) - need a way to represent wildcards here.
+	 */
+	{0x40, 0x00, SC_ALL_DEVS,
+	 "Diagnostic failure on component nn (80h-ffh)"},
+	{0x41, 0x00, D, "Data path failure (should use 40 nn)"},
+	{0x42, 0x00, D, "Power-on or self-test failure (should use 40 nn)"},
+	{0x43, 0x00, SC_ALL_DEVS, "Message error"},
+	{0x44, 0x00, SC_ALL_DEVS, "Internal target failure"},
+	{0x45, 0x00, SC_ALL_DEVS, "Select or reselect failure"},
+	{0x46, 0x00, D | T | L | P | W | R | S | O | M | C | B | K,
+	 "Unsuccessful soft reset"},
+	{0x47, 0x00, SC_ALL_DEVS, "Scsi parity error"},
+	{0x47, 0x01, SC_ALL_DEVS, "Data phase CRC error detected"},
+	{0x47, 0x02, SC_ALL_DEVS,
+	 "Scsi parity error detected during st data phase"},
+	{0x47, 0x03, SC_ALL_DEVS, "Information unit CRC error detected"},
+	{0x47, 0x04, SC_ALL_DEVS,
+	 "Asynchronous information protection error detected"},
+	{0x47, 0x05, SC_ALL_DEVS, "Protocol service CRC error"},
+	{0x48, 0x00, SC_ALL_DEVS, "Initiator detected error message received"},
+	{0x49, 0x00, SC_ALL_DEVS, "Invalid message error"},
+	{0x4A, 0x00, SC_ALL_DEVS, "Command phase error"},
+	{0x4B, 0x00, SC_ALL_DEVS, "Data phase error"},
+	{0x4C, 0x00, SC_ALL_DEVS, SC_LOGICAL_UNIT "failed self-configuration"},
+	/*
+	 * FIXME(eric) - need a way to represent wildcards here.
+	 */
+	{0x4D, 0x00, SC_ALL_DEVS,
+	 "Tagged overlapped commands (nn = queue tag)"},
+	{0x4E, 0x00, SC_ALL_DEVS, "Overlapped commands attempted"},
+	{0x50, 0x00, T, "Write append error"},
+	{0x50, 0x01, T, "Write append position error"},
+	{0x50, 0x02, T, "Position error related to timing"},
+	{0x51, 0x00, T | R | O, "Erase failure"},
+	{0x52, 0x00, T, "Cartridge fault"},
+	{0x53, 0x00, D | T | L | W | R | S | O | M | B | K,
+	 "Media load or eject failed"},
+	{0x53, 0x01, T, "Unload tape failure"},
+	{0x53, 0x02, D | T | W | R | O | M | B | K, "Medium removal prevented"},
+	{0x54, 0x00, P, "Scsi to host system interface failure"},
+	{0x55, 0x00, P, "System resource failure"},
+	{0x55, 0x01, D | O | B | K, "System buffer full"},
+	{0x55, 0x02, D | T | L | P | W | R | S | O | M | A | E | K,
+	 "Insufficient reservation resources"},
+	{0x55, 0x03, D | T | L | P | W | R | S | O | M | C | A | E,
+	 "Insufficient resources"},
+	{0x55, 0x04, D | T | L | P | W | R | S | O | M | A | E,
+	 "Insufficient registration resources"},
+	{0x55, 0x05, D | T | P | W | R | O | M | A | E | B | K,
+	 "Insufficient access control resources"},
+	{0x55, 0x06, D | T | W | R | O | M | B,
+	 "Auxiliary memory out of space"},
+	{0x57, 0x00, R, "Unable to recover table-of-contents"},
+	{0x58, 0x00, O, "Generation does not exist"},
+	{0x59, 0x00, O, "Updated block read"},
+	{0x5A, 0x00, D | T | L | P | W | R | S | O | M | B | K,
+	 "Operator request or state change input"},
+	{0x5A, 0x01, D | T | W | R | O | M | B | K,
+	 "Operator medium removal request"},
+	{0x5A, 0x02, D | T | W | R | O | A | B | K,
+	 "Operator selected write protect"},
+	{0x5A, 0x03, D | T | W | R | O | A | B | K,
+	 "Operator selected write permit"},
+	{0x5B, 0x00, D | T | L | P | W | R | S | O | M | K, "Log exception"},
+	{0x5B, 0x01, D | T | L | P | W | R | S | O | M | K,
+	 "Threshold condition met"},
+	{0x5B, 0x02, D | T | L | P | W | R | S | O | M | K,
+	 "Log counter at maximum"},
+	{0x5B, 0x03, D | T | L | P | W | R | S | O | M | K,
+	 "Log list codes exhausted"},
+	{0x5C, 0x00, D | O, "Rpl status change"},
+	{0x5C, 0x01, D | O, "Spindles synchronized"},
+	{0x5C, 0x02, D | O, "Spindles not synchronized"},
+	{0x5D, 0x00, SC_ALL_DEVS, "Failure prediction threshold exceeded"},
+	{0x5D, 0x01, R | B, "Media failure prediction threshold exceeded"},
+	{0x5D, 0x02, R,
+	 SC_LOGICAL_UNIT "failure prediction threshold exceeded"},
+	{0x5D, 0x03, R, "spare area exhaustion prediction threshold exceeded"},
 	/* large series of "impending failure" messages */
-  {0x5D,0x10,D|B,SC_HARDWARE_IF "general hard drive failure"},
-  {0x5D,0x11,D|B,SC_HARDWARE_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x12,D|B,SC_HARDWARE_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x13,D|B,SC_HARDWARE_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x14,D|B,SC_HARDWARE_IF "too many block reassigns"},
-  {0x5D,0x15,D|B,SC_HARDWARE_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x16,D|B,SC_HARDWARE_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x17,D|B,SC_HARDWARE_IF "channel parametrics"},
-  {0x5D,0x18,D|B,SC_HARDWARE_IF "controller detected"},
-  {0x5D,0x19,D|B,SC_HARDWARE_IF "throughput performance"},
-  {0x5D,0x1A,D|B,SC_HARDWARE_IF "seek time performance"},
-  {0x5D,0x1B,D|B,SC_HARDWARE_IF "spin-up retry count"},
-  {0x5D,0x1C,D|B,SC_HARDWARE_IF "drive calibration retry count"},
-  {0x5D,0x20,D|B,SC_CONTROLLER_IF "general hard drive failure"},
-  {0x5D,0x21,D|B,SC_CONTROLLER_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x22,D|B,SC_CONTROLLER_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x23,D|B,SC_CONTROLLER_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x24,D|B,SC_CONTROLLER_IF "too many block reassigns"},
-  {0x5D,0x25,D|B,SC_CONTROLLER_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x26,D|B,SC_CONTROLLER_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x27,D|B,SC_CONTROLLER_IF "channel parametrics"},
-  {0x5D,0x28,D|B,SC_CONTROLLER_IF "controller detected"},
-  {0x5D,0x29,D|B,SC_CONTROLLER_IF "throughput performance"},
-  {0x5D,0x2A,D|B,SC_CONTROLLER_IF "seek time performance"},
-  {0x5D,0x2B,D|B,SC_CONTROLLER_IF "spin-up retry count"},
-  {0x5D,0x2C,D|B,SC_CONTROLLER_IF "drive calibration retry count"},
-  {0x5D,0x30,D|B,SC_DATA_CHANNEL_IF "general hard drive failure"},
-  {0x5D,0x31,D|B,SC_DATA_CHANNEL_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x32,D|B,SC_DATA_CHANNEL_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x33,D|B,SC_DATA_CHANNEL_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x34,D|B,SC_DATA_CHANNEL_IF "too many block reassigns"},
-  {0x5D,0x35,D|B,SC_DATA_CHANNEL_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x36,D|B,SC_DATA_CHANNEL_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x37,D|B,SC_DATA_CHANNEL_IF "channel parametrics"},
-  {0x5D,0x38,D|B,SC_DATA_CHANNEL_IF "controller detected"},
-  {0x5D,0x39,D|B,SC_DATA_CHANNEL_IF "throughput performance"},
-  {0x5D,0x3A,D|B,SC_DATA_CHANNEL_IF "seek time performance"},
-  {0x5D,0x3B,D|B,SC_DATA_CHANNEL_IF "spin-up retry count"},
-  {0x5D,0x3C,D|B,SC_DATA_CHANNEL_IF "drive calibration retry count"},
-  {0x5D,0x40,D|B,SC_SERVO_IF "general hard drive failure"},
-  {0x5D,0x41,D|B,SC_SERVO_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x42,D|B,SC_SERVO_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x43,D|B,SC_SERVO_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x44,D|B,SC_SERVO_IF "too many block reassigns"},
-  {0x5D,0x45,D|B,SC_SERVO_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x46,D|B,SC_SERVO_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x47,D|B,SC_SERVO_IF "channel parametrics"},
-  {0x5D,0x48,D|B,SC_SERVO_IF "controller detected"},
-  {0x5D,0x49,D|B,SC_SERVO_IF "throughput performance"},
-  {0x5D,0x4A,D|B,SC_SERVO_IF "seek time performance"},
-  {0x5D,0x4B,D|B,SC_SERVO_IF "spin-up retry count"},
-  {0x5D,0x4C,D|B,SC_SERVO_IF "drive calibration retry count"},
-  {0x5D,0x50,D|B,SC_SPINDLE_IF "general hard drive failure"},
-  {0x5D,0x51,D|B,SC_SPINDLE_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x52,D|B,SC_SPINDLE_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x53,D|B,SC_SPINDLE_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x54,D|B,SC_SPINDLE_IF "too many block reassigns"},
-  {0x5D,0x55,D|B,SC_SPINDLE_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x56,D|B,SC_SPINDLE_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x57,D|B,SC_SPINDLE_IF "channel parametrics"},
-  {0x5D,0x58,D|B,SC_SPINDLE_IF "controller detected"},
-  {0x5D,0x59,D|B,SC_SPINDLE_IF "throughput performance"},
-  {0x5D,0x5A,D|B,SC_SPINDLE_IF "seek time performance"},
-  {0x5D,0x5B,D|B,SC_SPINDLE_IF "spin-up retry count"},
-  {0x5D,0x5C,D|B,SC_SPINDLE_IF "drive calibration retry count"},
-  {0x5D,0x60,D|B,SC_FIRMWARE_IF "general hard drive failure"},
-  {0x5D,0x61,D|B,SC_FIRMWARE_IF "drive" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x62,D|B,SC_FIRMWARE_IF "data" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x63,D|B,SC_FIRMWARE_IF "seek" SC_ERROR_RATE_TOO_HIGH },
-  {0x5D,0x64,D|B,SC_FIRMWARE_IF "too many block reassigns"},
-  {0x5D,0x65,D|B,SC_FIRMWARE_IF "access" SC_TIMES_TOO_HIGH },
-  {0x5D,0x66,D|B,SC_FIRMWARE_IF "start unit" SC_TIMES_TOO_HIGH },
-  {0x5D,0x67,D|B,SC_FIRMWARE_IF "channel parametrics"},
-  {0x5D,0x68,D|B,SC_FIRMWARE_IF "controller detected"},
-  {0x5D,0x69,D|B,SC_FIRMWARE_IF "throughput performance"},
-  {0x5D,0x6A,D|B,SC_FIRMWARE_IF "seek time performance"},
-  {0x5D,0x6B,D|B,SC_FIRMWARE_IF "spin-up retry count"},
-  {0x5D,0x6C,D|B,SC_FIRMWARE_IF "drive calibration retry count"},
-  {0x5D,0xFF,SC_ALL_DEVS,"Failure prediction threshold exceeded (false)"},
-  {0x5E,0x00,D|T|L|P|W|R|S|O|C|A|K,"Low power condition on"},
-  {0x5E,0x01,D|T|L|P|W|R|S|O|C|A|K,"Idle condition activated by timer"},
-  {0x5E,0x02,D|T|L|P|W|R|S|O|C|A|K,"Standby condition activated by timer"},
-  {0x5E,0x03,D|T|L|P|W|R|S|O|C|A|K,"Idle condition activated by command"},
-  {0x5E,0x04,D|T|L|P|W|R|S|O|C|A|K,"Standby condition activated by command"},
-  {0x5E,0x41,B,"Power state change to active"},
-  {0x5E,0x42,B,"Power state change to idle"},
-  {0x5E,0x43,B,"Power state change to standby"},
-  {0x5E,0x45,B,"Power state change to sleep"},
-  {0x5E,0x47,B|K,"Power state change to device control"},
-  {0x60,0x00,S,"Lamp failure"},
-  {0x61,0x00,S,"Video acquisition error"},
-  {0x61,0x01,S,"Unable to acquire video"},
-  {0x61,0x02,S,"Out of focus"},
-  {0x62,0x00,S,"Scan head positioning error"},
-  {0x63,0x00,R,"End of user area encountered on this track"},
-  {0x63,0x01,R,"Packet does not fit in available space"},
-  {0x64,0x00,R,"Illegal mode for this track"},
-  {0x64,0x01,R,"Invalid packet size"},
-  {0x65,0x00,SC_ALL_DEVS,"Voltage fault"},
-  {0x66,0x00,S,"Automatic document feeder cover up"},
-  {0x66,0x01,S,"Automatic document feeder lift up"},
-  {0x66,0x02,S,"Document jam in automatic document feeder"},
-  {0x66,0x03,S,"Document miss feed automatic in document feeder"},
-  {0x67,0x00,A,"Configuration failure"},
-  {0x67,0x01,A,"Configuration of incapable logical units failed"},
-  {0x67,0x02,A,"Add logical unit failed"},
-  {0x67,0x03,A,"Modification of logical unit failed"},
-  {0x67,0x04,A,"Exchange of logical unit failed"},
-  {0x67,0x05,A,"Remove of logical unit failed"},
-  {0x67,0x06,A,"Attachment of logical unit failed"},
-  {0x67,0x07,A,"Creation of logical unit failed"},
-  {0x67,0x08,A,"Assign failure occurred"},
-  {0x67,0x09,A,"Multiply assigned logical unit"},
-  {0x67,0x0A,SC_ALL_DEVS,"Set target port groups command failed"},
-  {0x68,0x00,A,SC_LOGICAL_UNIT "not configured"},
-  {0x69,0x00,A,"Data loss on logical unit"},
-  {0x69,0x01,A,"Multiple logical unit failures"},
-  {0x69,0x02,A,"Parity/data mismatch"},
-  {0x6A,0x00,A,"Informational,refer to log"},
-  {0x6B,0x00,A,"State change has occurred"},
-  {0x6B,0x01,A,"Redundancy level got better"},
-  {0x6B,0x02,A,"Redundancy level got worse"},
-  {0x6C,0x00,A,"Rebuild failure occurred"},
-  {0x6D,0x00,A,"Recalculate failure occurred"},
-  {0x6E,0x00,A,"Command to logical unit failed"},
-  {0x6F,0x00,R,"Copy protection key exchange failure - authentication failure"},
-  {0x6F,0x01,R,"Copy protection key exchange failure - key not present"},
-  {0x6F,0x02,R,"Copy protection key exchange failure - key not established"},
-  {0x6F,0x03,R,"Read of scrambled sector without authentication"},
-  {0x6F,0x04,R,"Media region code is mismatched to logical unit region"},
-  {0x6F,0x05,R,"Drive region must be permanent/region reset count error"},
-  /*
-   * FIXME(eric) - need a way to represent wildcards here.
-   */
-  {0x70,0x00,T,"Decompression exception short algorithm id of nn"},
-  {0x71,0x00,T,"Decompression exception long algorithm id"},
-  {0x72,0x00,R,"Session fixation error"},
-  {0x72,0x01,R,"Session fixation error writing lead-in"},
-  {0x72,0x02,R,"Session fixation error writing lead-out"},
-  {0x72,0x03,R,"Session fixation error - incomplete track in session"},
-  {0x72,0x04,R,"Empty or partially written reserved track"},
-  {0x72,0x05,R,"No more track reservations allowed"},
-  {0x73,0x00,R,"Cd control error"},
-  {0x73,0x01,R,"Power calibration area almost full"},
-  {0x73,0x02,R,"Power calibration area is full"},
-  {0x73,0x03,R,"Power calibration area error"},
-  {0x73,0x04,R,"Program memory area update failure"},
-  {0x73,0x05,R,"Program memory area is full"},
-  {0x73,0x06,R,"RMA/PMA is full"},
-  {0, 0, 0, NULL}
+	{0x5D, 0x10, D | B, SC_HARDWARE_IF "general hard drive failure"},
+	{0x5D, 0x11, D | B, SC_HARDWARE_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x12, D | B, SC_HARDWARE_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x13, D | B, SC_HARDWARE_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x14, D | B, SC_HARDWARE_IF "too many block reassigns"},
+	{0x5D, 0x15, D | B, SC_HARDWARE_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x16, D | B, SC_HARDWARE_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x17, D | B, SC_HARDWARE_IF "channel parametrics"},
+	{0x5D, 0x18, D | B, SC_HARDWARE_IF "controller detected"},
+	{0x5D, 0x19, D | B, SC_HARDWARE_IF "throughput performance"},
+	{0x5D, 0x1A, D | B, SC_HARDWARE_IF "seek time performance"},
+	{0x5D, 0x1B, D | B, SC_HARDWARE_IF "spin-up retry count"},
+	{0x5D, 0x1C, D | B, SC_HARDWARE_IF "drive calibration retry count"},
+	{0x5D, 0x20, D | B, SC_CONTROLLER_IF "general hard drive failure"},
+	{0x5D, 0x21, D | B, SC_CONTROLLER_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x22, D | B, SC_CONTROLLER_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x23, D | B, SC_CONTROLLER_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x24, D | B, SC_CONTROLLER_IF "too many block reassigns"},
+	{0x5D, 0x25, D | B, SC_CONTROLLER_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x26, D | B, SC_CONTROLLER_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x27, D | B, SC_CONTROLLER_IF "channel parametrics"},
+	{0x5D, 0x28, D | B, SC_CONTROLLER_IF "controller detected"},
+	{0x5D, 0x29, D | B, SC_CONTROLLER_IF "throughput performance"},
+	{0x5D, 0x2A, D | B, SC_CONTROLLER_IF "seek time performance"},
+	{0x5D, 0x2B, D | B, SC_CONTROLLER_IF "spin-up retry count"},
+	{0x5D, 0x2C, D | B, SC_CONTROLLER_IF "drive calibration retry count"},
+	{0x5D, 0x30, D | B, SC_DATA_CHANNEL_IF "general hard drive failure"},
+	{0x5D, 0x31, D | B, SC_DATA_CHANNEL_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x32, D | B, SC_DATA_CHANNEL_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x33, D | B, SC_DATA_CHANNEL_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x34, D | B, SC_DATA_CHANNEL_IF "too many block reassigns"},
+	{0x5D, 0x35, D | B, SC_DATA_CHANNEL_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x36, D | B, SC_DATA_CHANNEL_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x37, D | B, SC_DATA_CHANNEL_IF "channel parametrics"},
+	{0x5D, 0x38, D | B, SC_DATA_CHANNEL_IF "controller detected"},
+	{0x5D, 0x39, D | B, SC_DATA_CHANNEL_IF "throughput performance"},
+	{0x5D, 0x3A, D | B, SC_DATA_CHANNEL_IF "seek time performance"},
+	{0x5D, 0x3B, D | B, SC_DATA_CHANNEL_IF "spin-up retry count"},
+	{0x5D, 0x3C, D | B, SC_DATA_CHANNEL_IF "drive calibration retry count"},
+	{0x5D, 0x40, D | B, SC_SERVO_IF "general hard drive failure"},
+	{0x5D, 0x41, D | B, SC_SERVO_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x42, D | B, SC_SERVO_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x43, D | B, SC_SERVO_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x44, D | B, SC_SERVO_IF "too many block reassigns"},
+	{0x5D, 0x45, D | B, SC_SERVO_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x46, D | B, SC_SERVO_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x47, D | B, SC_SERVO_IF "channel parametrics"},
+	{0x5D, 0x48, D | B, SC_SERVO_IF "controller detected"},
+	{0x5D, 0x49, D | B, SC_SERVO_IF "throughput performance"},
+	{0x5D, 0x4A, D | B, SC_SERVO_IF "seek time performance"},
+	{0x5D, 0x4B, D | B, SC_SERVO_IF "spin-up retry count"},
+	{0x5D, 0x4C, D | B, SC_SERVO_IF "drive calibration retry count"},
+	{0x5D, 0x50, D | B, SC_SPINDLE_IF "general hard drive failure"},
+	{0x5D, 0x51, D | B, SC_SPINDLE_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x52, D | B, SC_SPINDLE_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x53, D | B, SC_SPINDLE_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x54, D | B, SC_SPINDLE_IF "too many block reassigns"},
+	{0x5D, 0x55, D | B, SC_SPINDLE_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x56, D | B, SC_SPINDLE_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x57, D | B, SC_SPINDLE_IF "channel parametrics"},
+	{0x5D, 0x58, D | B, SC_SPINDLE_IF "controller detected"},
+	{0x5D, 0x59, D | B, SC_SPINDLE_IF "throughput performance"},
+	{0x5D, 0x5A, D | B, SC_SPINDLE_IF "seek time performance"},
+	{0x5D, 0x5B, D | B, SC_SPINDLE_IF "spin-up retry count"},
+	{0x5D, 0x5C, D | B, SC_SPINDLE_IF "drive calibration retry count"},
+	{0x5D, 0x60, D | B, SC_FIRMWARE_IF "general hard drive failure"},
+	{0x5D, 0x61, D | B, SC_FIRMWARE_IF "drive" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x62, D | B, SC_FIRMWARE_IF "data" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x63, D | B, SC_FIRMWARE_IF "seek" SC_ERROR_RATE_TOO_HIGH},
+	{0x5D, 0x64, D | B, SC_FIRMWARE_IF "too many block reassigns"},
+	{0x5D, 0x65, D | B, SC_FIRMWARE_IF "access" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x66, D | B, SC_FIRMWARE_IF "start unit" SC_TIMES_TOO_HIGH},
+	{0x5D, 0x67, D | B, SC_FIRMWARE_IF "channel parametrics"},
+	{0x5D, 0x68, D | B, SC_FIRMWARE_IF "controller detected"},
+	{0x5D, 0x69, D | B, SC_FIRMWARE_IF "throughput performance"},
+	{0x5D, 0x6A, D | B, SC_FIRMWARE_IF "seek time performance"},
+	{0x5D, 0x6B, D | B, SC_FIRMWARE_IF "spin-up retry count"},
+	{0x5D, 0x6C, D | B, SC_FIRMWARE_IF "drive calibration retry count"},
+	{0x5D, 0xFF, SC_ALL_DEVS,
+	 "Failure prediction threshold exceeded (false)"},
+	{0x5E, 0x00, D | T | L | P | W | R | S | O | C | A | K,
+	 "Low power condition on"},
+	{0x5E, 0x01, D | T | L | P | W | R | S | O | C | A | K,
+	 "Idle condition activated by timer"},
+	{0x5E, 0x02, D | T | L | P | W | R | S | O | C | A | K,
+	 "Standby condition activated by timer"},
+	{0x5E, 0x03, D | T | L | P | W | R | S | O | C | A | K,
+	 "Idle condition activated by command"},
+	{0x5E, 0x04, D | T | L | P | W | R | S | O | C | A | K,
+	 "Standby condition activated by command"},
+	{0x5E, 0x41, B, "Power state change to active"},
+	{0x5E, 0x42, B, "Power state change to idle"},
+	{0x5E, 0x43, B, "Power state change to standby"},
+	{0x5E, 0x45, B, "Power state change to sleep"},
+	{0x5E, 0x47, B | K, "Power state change to device control"},
+	{0x60, 0x00, S, "Lamp failure"},
+	{0x61, 0x00, S, "Video acquisition error"},
+	{0x61, 0x01, S, "Unable to acquire video"},
+	{0x61, 0x02, S, "Out of focus"},
+	{0x62, 0x00, S, "Scan head positioning error"},
+	{0x63, 0x00, R, "End of user area encountered on this track"},
+	{0x63, 0x01, R, "Packet does not fit in available space"},
+	{0x64, 0x00, R, "Illegal mode for this track"},
+	{0x64, 0x01, R, "Invalid packet size"},
+	{0x65, 0x00, SC_ALL_DEVS, "Voltage fault"},
+	{0x66, 0x00, S, "Automatic document feeder cover up"},
+	{0x66, 0x01, S, "Automatic document feeder lift up"},
+	{0x66, 0x02, S, "Document jam in automatic document feeder"},
+	{0x66, 0x03, S, "Document miss feed automatic in document feeder"},
+	{0x67, 0x00, A, "Configuration failure"},
+	{0x67, 0x01, A, "Configuration of incapable logical units failed"},
+	{0x67, 0x02, A, "Add logical unit failed"},
+	{0x67, 0x03, A, "Modification of logical unit failed"},
+	{0x67, 0x04, A, "Exchange of logical unit failed"},
+	{0x67, 0x05, A, "Remove of logical unit failed"},
+	{0x67, 0x06, A, "Attachment of logical unit failed"},
+	{0x67, 0x07, A, "Creation of logical unit failed"},
+	{0x67, 0x08, A, "Assign failure occurred"},
+	{0x67, 0x09, A, "Multiply assigned logical unit"},
+	{0x67, 0x0A, SC_ALL_DEVS, "Set target port groups command failed"},
+	{0x68, 0x00, A, SC_LOGICAL_UNIT "not configured"},
+	{0x69, 0x00, A, "Data loss on logical unit"},
+	{0x69, 0x01, A, "Multiple logical unit failures"},
+	{0x69, 0x02, A, "Parity/data mismatch"},
+	{0x6A, 0x00, A, "Informational,refer to log"},
+	{0x6B, 0x00, A, "State change has occurred"},
+	{0x6B, 0x01, A, "Redundancy level got better"},
+	{0x6B, 0x02, A, "Redundancy level got worse"},
+	{0x6C, 0x00, A, "Rebuild failure occurred"},
+	{0x6D, 0x00, A, "Recalculate failure occurred"},
+	{0x6E, 0x00, A, "Command to logical unit failed"},
+	{0x6F, 0x00, R,
+	 "Copy protection key exchange failure - authentication failure"},
+	{0x6F, 0x01, R,
+	 "Copy protection key exchange failure - key not present"},
+	{0x6F, 0x02, R,
+	 "Copy protection key exchange failure - key not established"},
+	{0x6F, 0x03, R, "Read of scrambled sector without authentication"},
+	{0x6F, 0x04, R,
+	 "Media region code is mismatched to logical unit region"},
+	{0x6F, 0x05, R,
+	 "Drive region must be permanent/region reset count error"},
+	/*
+	 * FIXME(eric) - need a way to represent wildcards here.
+	 */
+	{0x70, 0x00, T, "Decompression exception short algorithm id of nn"},
+	{0x71, 0x00, T, "Decompression exception long algorithm id"},
+	{0x72, 0x00, R, "Session fixation error"},
+	{0x72, 0x01, R, "Session fixation error writing lead-in"},
+	{0x72, 0x02, R, "Session fixation error writing lead-out"},
+	{0x72, 0x03, R, "Session fixation error - incomplete track in session"},
+	{0x72, 0x04, R, "Empty or partially written reserved track"},
+	{0x72, 0x05, R, "No more track reservations allowed"},
+	{0x73, 0x00, R, "Cd control error"},
+	{0x73, 0x01, R, "Power calibration area almost full"},
+	{0x73, 0x02, R, "Power calibration area is full"},
+	{0x73, 0x03, R, "Power calibration area error"},
+	{0x73, 0x04, R, "Program memory area update failure"},
+	{0x73, 0x05, R, "Program memory area is full"},
+	{0x73, 0x06, R, "RMA/PMA is full"},
+	{0, 0, 0, NULL}
 };
 
-static const char * sc_oft_used[0x1f] = {
-        "umulig",                       /* index 0x0 should be impossible */
-        "Audio play operation ",
-        "Logical unit ",
-        "not ready, ",
-        " operation",
-        " in progress ",
-        "Hardware impending failure ",
-        "Controller impending failure ",
-        "Data channel impending failure ",      /* index 0x8 */
-        "Servo impending failure ",
-        "Spindle impending failure ",
-        "Firmware impending failure ",
-        "Recovered data ",
-        " error rate too high",
-        " times too high",
+static const char *sc_oft_used[0x1f] = {
+	"umulig",		/* index 0x0 should be impossible */
+	"Audio play operation ",
+	"Logical unit ",
+	"not ready, ",
+	" operation",
+	" in progress ",
+	"Hardware impending failure ",
+	"Controller impending failure ",
+	"Data channel impending failure ",	/* index 0x8 */
+	"Servo impending failure ",
+	"Spindle impending failure ",
+	"Firmware impending failure ",
+	"Recovered data ",
+	" error rate too high",
+	" times too high",
 };
 
 static const char *snstext[] = {
-    "No Sense",                 /* There is no sense information */
-    "Recovered Error",          /* The last command completed successfully
-                                   but used error correction */
-    "Not Ready",                /* The addressed target is not ready */
-    "Medium Error",             /* Data error detected on the medium */
-    "Hardware Error",           /* Controller or device failure */
-    "Illegal Request",
-    "Unit Attention",           /* Removable medium was changed, or
-                                   the target has been reset */
-    "Data Protect",             /* Access to the data is blocked */
-    "Blank Check",              /* Reached unexpected written or unwritten
-                                   region of the medium */
-    "Key=9",                    /* Vendor specific */
-    "Copy Aborted",             /* COPY or COMPARE was aborted */
-    "Aborted Command",          /* The target aborted the command */
-    "Equal",                    /* SEARCH DATA found data equal (obsolete) */
-    "Volume Overflow",          /* Medium full with still data to be written */
-    "Miscompare",               /* Source data and data on the medium
-                                   do not agree */
-    "Key=15"                    /* Reserved */
+	"No Sense",		/* There is no sense information */
+	"Recovered Error",	/* The last command completed successfully
+				   but used error correction */
+	"Not Ready",		/* The addressed target is not ready */
+	"Medium Error",		/* Data error detected on the medium */
+	"Hardware Error",	/* Controller or device failure */
+	"Illegal Request",
+	"Unit Attention",	/* Removable medium was changed, or
+				   the target has been reset */
+	"Data Protect",		/* Access to the data is blocked */
+	"Blank Check",		/* Reached unexpected written or unwritten
+				   region of the medium */
+	"Key=9",		/* Vendor specific */
+	"Copy Aborted",		/* COPY or COMPARE was aborted */
+	"Aborted Command",	/* The target aborted the command */
+	"Equal",		/* SEARCH DATA found data equal (obsolete) */
+	"Volume Overflow",	/* Medium full with still data to be written */
+	"Miscompare",		/* Source data and data on the medium
+				   do not agree */
+	"Key=15"		/* Reserved */
 };
 
 static
 void sg_print_asc_ascq(unsigned char asc, unsigned char ascq)
 {
-    int k, j;
-    char obuff[256];
-    const char * ccp;
-    const char * oup;
-    char c;
-    int found = 0;
+	int k, j;
+	char obuff[256];
+	const char *ccp;
+	const char *oup;
+	char c;
+	int found = 0;
 
-    for (k=0; additional[k].text; k++) {
-	if (additional[k].code1 == asc &&
-	    additional[k].code2 == ascq) {
-	    found = 1;
-	    ccp = additional[k].text;
-	    for (j = 0; *ccp && (j < sizeof(obuff)); ++ccp) {
-		c = *ccp;
-		if ((c < 0x20) && (c > 0)) {
-		    oup = sc_oft_used[(int)c];
-		    if (oup) {
-			strcpy(obuff + j, oup);
-			j += strlen(oup);
-		    }
-		    else {
-			strcpy(obuff + j, "???");
-			j += 3;
-		    }
+	for (k = 0; additional[k].text; k++) {
+		if (additional[k].code1 == asc && additional[k].code2 == ascq) {
+			found = 1;
+			ccp = additional[k].text;
+			for (j = 0; *ccp && (j < sizeof(obuff)); ++ccp) {
+				c = *ccp;
+				if ((c < 0x20) && (c > 0)) {
+					oup = sc_oft_used[(int)c];
+					if (oup) {
+						strcpy(obuff + j, oup);
+						j += strlen(oup);
+					} else {
+						strcpy(obuff + j, "???");
+						j += 3;
+					}
+				} else
+					obuff[j++] = c;
+			}
+			if (j < sizeof(obuff))
+				obuff[j] = '\0';
+			else
+				obuff[sizeof(obuff) - 1] = '\0';
+			fprintf(OUTP, "Additional sense: %s\n", obuff);
 		}
-		else
-		    obuff[j++] = c;
-	    }
-	    if (j < sizeof(obuff))
-		obuff[j] = '\0';
-	    else
-		obuff[sizeof(obuff) - 1] = '\0';
-	    fprintf(OUTP, "Additional sense: %s\n", obuff);
 	}
-    }
-    if (found)
-	return;
+	if (found)
+		return;
 
-    for (k=0; additional2[k].text; k++) {
-	if ((additional2[k].code1 == asc) &&
-	    (ascq >= additional2[k].code2_min)  &&
-	    (ascq <= additional2[k].code2_max)) {
-	    found = 1;
-	    fprintf(OUTP, "Additional sense: ");
-	    fprintf(OUTP, additional2[k].text, ascq);
-	    fprintf(OUTP, "\n");
+	for (k = 0; additional2[k].text; k++) {
+		if ((additional2[k].code1 == asc) &&
+		    (ascq >= additional2[k].code2_min) &&
+		    (ascq <= additional2[k].code2_max)) {
+			found = 1;
+			fprintf(OUTP, "Additional sense: ");
+			fprintf(OUTP, additional2[k].text, ascq);
+			fprintf(OUTP, "\n");
+		}
 	}
-    }
-    if (! found)
-	fprintf(OUTP, "ASC=%2x ASCQ=%2x\n", asc, ascq);
+	if (!found)
+		fprintf(OUTP, "ASC=%2x ASCQ=%2x\n", asc, ascq);
 }
 
 /* Print sense information */
-void sg_print_sense(const char * leadin, const unsigned char * sense_buffer,
-                    int sb_len)
+void sg_print_sense(const char *leadin, const unsigned char *sense_buffer,
+		    int sb_len)
 {
-    int k, s;
-    int sense_key, sense_class, valid, code;
-    int descriptor_format = 0;
-    const char * error = NULL;
+	int k, s;
+	int sense_key, sense_class, valid, code;
+	int descriptor_format = 0;
+	const char *error = NULL;
 
-    if (sb_len < 1) {
-	    fprintf(OUTP, "sense buffer empty\n");
-	    return;
-    }
-    sense_class = (sense_buffer[0] >> 4) & 0x07;
-    code = sense_buffer[0] & 0xf;
-    valid = sense_buffer[0] & 0x80;
-    if (leadin)
-	fprintf(OUTP, "%s: ", leadin);
-
-    if (sense_class == 7) {     /* extended sense data */
-        s = sense_buffer[7] + 8;
-        if (s > sb_len) {
-	    fprintf(OUTP, "Sense buffer too small (at %d bytes), %d bytes "
-		    "truncated\n", sb_len, s - sb_len);
-	    s = sb_len;
+	if (sb_len < 1) {
+		fprintf(OUTP, "sense buffer empty\n");
+		return;
 	}
+	sense_class = (sense_buffer[0] >> 4) & 0x07;
+	code = sense_buffer[0] & 0xf;
+	valid = sense_buffer[0] & 0x80;
+	if (leadin)
+		fprintf(OUTP, "%s: ", leadin);
 
-        switch (code) {
-        case 0x0:
-            error = "Current";  /* error concerns current command */
-            break;
-        case 0x1:
-            error = "Deferred"; /* error concerns some earlier command */
-                /* e.g., an earlier write to disk cache succeeded, but
-                   now the disk discovers that it cannot write the data */
-            break;
-	case 0x2:
-	    descriptor_format = 1;
-	    error = "Descriptor current";
-	    /* new descriptor sense format */
-	    break;
-	case 0x3:
-	    descriptor_format = 1;
-	    error = "Descriptor deferred";
-	    /* new descriptor sense format (deferred report) */
-	    break;
-        default:
-            error = "Invalid";
-        }
-	sense_key = sense_buffer[ descriptor_format ? 1 : 2 ] & 0xf;
-        fprintf(OUTP, "%s, Sense key: %s\n", error, snstext[sense_key]);
-
-	if (descriptor_format)
-	    sg_print_asc_ascq(sense_buffer[2], sense_buffer[3]);
-	else {
-            if (!valid)
-                fprintf(OUTP, "[valid=0] ");
-            fprintf(OUTP, "Info fld=0x%x, ", (int)((sense_buffer[3] << 24) |
-                    (sense_buffer[4] << 16) | (sense_buffer[5] << 8) |
-                    sense_buffer[6]));
-
-            if (sense_buffer[2] & 0x80)
-               fprintf(OUTP, "FMK "); /* current command has read a filemark */
-            if (sense_buffer[2] & 0x40)
-               fprintf(OUTP, "EOM "); /* end-of-medium condition exists */
-            if (sense_buffer[2] & 0x20)
-               fprintf(OUTP, "ILI "); /* incorrect block length requested */
-
-	    if (s > 13) {
-		if (sense_buffer[12] || sense_buffer[13])
-		    sg_print_asc_ascq(sense_buffer[12], sense_buffer[13]);
-	    }
-	    if (sense_key == 5 && s >= 18 && (sense_buffer[15]&0x80)) {
-		fprintf(OUTP, "Sense Key Specific: Error in %s byte %d",
-			(sense_buffer[15]&0x40)?"Command":"Data",
-			(sense_buffer[16]<<8)|sense_buffer[17]);
-		if (sense_buffer[15]&0x08) {
-		    fprintf(OUTP, " bit %d\n", sense_buffer[15]&0x07);
-		} else {
-		    fprintf(OUTP, "\n");
+	if (sense_class == 7) {	/* extended sense data */
+		s = sense_buffer[7] + 8;
+		if (s > sb_len) {
+			fprintf(OUTP,
+				"Sense buffer too small (at %d bytes), %d bytes "
+				"truncated\n", sb_len, s - sb_len);
+			s = sb_len;
 		}
-	    }
+
+		switch (code) {
+		case 0x0:
+			error = "Current";	/* error concerns current command */
+			break;
+		case 0x1:
+			error = "Deferred";	/* error concerns some earlier command */
+			/* e.g., an earlier write to disk cache succeeded, but
+			   now the disk discovers that it cannot write the data */
+			break;
+		case 0x2:
+			descriptor_format = 1;
+			error = "Descriptor current";
+			/* new descriptor sense format */
+			break;
+		case 0x3:
+			descriptor_format = 1;
+			error = "Descriptor deferred";
+			/* new descriptor sense format (deferred report) */
+			break;
+		default:
+			error = "Invalid";
+		}
+		sense_key = sense_buffer[descriptor_format ? 1 : 2] & 0xf;
+		fprintf(OUTP, "%s, Sense key: %s\n", error, snstext[sense_key]);
+
+		if (descriptor_format)
+			sg_print_asc_ascq(sense_buffer[2], sense_buffer[3]);
+		else {
+			if (!valid)
+				fprintf(OUTP, "[valid=0] ");
+			fprintf(OUTP, "Info fld=0x%x, ",
+				(int)((sense_buffer[3] << 24) |
+				      (sense_buffer[4] << 16) | (sense_buffer[5]
+								 << 8) |
+				      sense_buffer[6]));
+
+			if (sense_buffer[2] & 0x80)
+				fprintf(OUTP, "FMK ");	/* current command has read a filemark */
+			if (sense_buffer[2] & 0x40)
+				fprintf(OUTP, "EOM ");	/* end-of-medium condition exists */
+			if (sense_buffer[2] & 0x20)
+				fprintf(OUTP, "ILI ");	/* incorrect block length requested */
+
+			if (s > 13) {
+				if (sense_buffer[12] || sense_buffer[13])
+					sg_print_asc_ascq(sense_buffer[12],
+							  sense_buffer[13]);
+			}
+			if (sense_key == 5 && s >= 18
+			    && (sense_buffer[15] & 0x80)) {
+				fprintf(OUTP,
+					"Sense Key Specific: Error in %s byte %d",
+					(sense_buffer[15] & 0x40) ? "Command" :
+					"Data",
+					(sense_buffer[16] << 8) |
+					sense_buffer[17]);
+				if (sense_buffer[15] & 0x08) {
+					fprintf(OUTP, " bit %d\n",
+						sense_buffer[15] & 0x07);
+				} else {
+					fprintf(OUTP, "\n");
+				}
+			}
+		}
+
+	} else {		/* non-extended sense data */
+
+		/*
+		 * Standard says:
+		 *    sense_buffer[0] & 0200 : address valid
+		 *    sense_buffer[0] & 0177 : vendor-specific error code
+		 *    sense_buffer[1] & 0340 : vendor-specific
+		 *    sense_buffer[1..3] : 21-bit logical block address
+		 */
+
+		if (sb_len < 4) {
+			fprintf(OUTP,
+				"sense buffer too short (4 byte minimum)\n");
+			return;
+		}
+		if (leadin)
+			fprintf(OUTP, "%s: ", leadin);
+		if (sense_buffer[0] < 15)
+			fprintf(OUTP,
+				"old sense: key %s\n",
+				snstext[sense_buffer[0] & 0x0f]);
+		else
+			fprintf(OUTP, "sns = %2x %2x\n", sense_buffer[0],
+				sense_buffer[2]);
+
+		fprintf(OUTP, "Non-extended sense class %d code 0x%0x ",
+			sense_class, code);
+		s = 4;
 	}
 
-    } else {    /* non-extended sense data */
-
-         /*
-          * Standard says:
-          *    sense_buffer[0] & 0200 : address valid
-          *    sense_buffer[0] & 0177 : vendor-specific error code
-          *    sense_buffer[1] & 0340 : vendor-specific
-          *    sense_buffer[1..3] : 21-bit logical block address
-          */
-
-	if (sb_len < 4) {
-	    fprintf(OUTP, "sense buffer too short (4 byte minimum)\n");
-	    return;
+	fprintf(OUTP, "Raw sense data (in hex):\n  ");
+	for (k = 0; k < s; ++k) {
+		if ((k > 0) && (0 == (k % 24)))
+			fprintf(OUTP, "\n  ");
+		fprintf(OUTP, "%02x ", sense_buffer[k]);
 	}
-        if (leadin)
-            fprintf(OUTP, "%s: ", leadin);
-        if (sense_buffer[0] < 15)
-            fprintf(OUTP,
-	    	    "old sense: key %s\n", snstext[sense_buffer[0] & 0x0f]);
-        else
-            fprintf(OUTP, "sns = %2x %2x\n", sense_buffer[0], sense_buffer[2]);
-
-        fprintf(OUTP, "Non-extended sense class %d code 0x%0x ",
-		sense_class, code);
-        s = 4;
-    }
-
-    fprintf(OUTP, "Raw sense data (in hex):\n  ");
-    for (k = 0; k < s; ++k) {
-        if ((k > 0) && (0 == (k % 24)))
-            fprintf(OUTP, "\n  ");
-        fprintf(OUTP, "%02x ", sense_buffer[k]);
-    }
-    fprintf(OUTP, "\n");
+	fprintf(OUTP, "\n");
 }
 
-static const char * hostbyte_table[]={
-"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET",
-"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
-"DID_PASSTHROUGH", "DID_SOFT_ERROR", NULL};
+static const char *hostbyte_table[] = {
+	"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT",
+	    "DID_BAD_TARGET",
+	"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
+	"DID_PASSTHROUGH", "DID_SOFT_ERROR", NULL
+};
 
 void sg_print_host_status(int host_status)
-{   static int maxcode=0;
-    int i;
+{
+	static int maxcode = 0;
+	int i;
 
-    if (! maxcode) {
-        for (i = 0; hostbyte_table[i]; i++) ;
-        maxcode = i-1;
-    }
-    fprintf(OUTP, "Host_status=0x%02x", host_status);
-    if (host_status > maxcode) {
-        fprintf(OUTP, "is invalid ");
-        return;
-    }
-    fprintf(OUTP, "(%s) ",hostbyte_table[host_status]);
+	if (!maxcode) {
+		for (i = 0; hostbyte_table[i]; i++) ;
+		maxcode = i - 1;
+	}
+	fprintf(OUTP, "Host_status=0x%02x", host_status);
+	if (host_status > maxcode) {
+		fprintf(OUTP, "is invalid ");
+		return;
+	}
+	fprintf(OUTP, "(%s) ", hostbyte_table[host_status]);
 }
 
-static const char * driverbyte_table[]={
-"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT",  "DRIVER_MEDIA", "DRIVER_ERROR",
-"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE", NULL};
+static const char *driverbyte_table[] = {
+	"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA",
+	    "DRIVER_ERROR",
+	"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE", NULL
+};
 
-static const char * driversuggest_table[]={"SUGGEST_OK",
-"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
-unknown,unknown,unknown, "SUGGEST_SENSE",NULL};
+static const char *driversuggest_table[] = { "SUGGEST_OK",
+	"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
+	unknown, unknown, unknown, "SUGGEST_SENSE", NULL
+};
 
 void sg_print_driver_status(int driver_status)
 {
-    static int driver_max =0 , suggest_max=0;
-    int i;
-    int dr = driver_status & SG_ERR_DRIVER_MASK;
-    int su = (driver_status & SG_ERR_SUGGEST_MASK) >> 4;
+	static int driver_max = 0, suggest_max = 0;
+	int i;
+	int dr = driver_status & SG_ERR_DRIVER_MASK;
+	int su = (driver_status & SG_ERR_SUGGEST_MASK) >> 4;
 
-    if (! driver_max) {
-        for (i = 0; driverbyte_table[i]; i++) ;
-        driver_max = i;
-        for (i = 0; driversuggest_table[i]; i++) ;
-        suggest_max = i;
-    }
-    fprintf(OUTP, "Driver_status=0x%02x",driver_status);
-    fprintf(OUTP, " (%s,%s) ",
-            dr < driver_max  ? driverbyte_table[dr]:"invalid",
-            su < suggest_max ? driversuggest_table[su]:"invalid");
+	if (!driver_max) {
+		for (i = 0; driverbyte_table[i]; i++) ;
+		driver_max = i;
+		for (i = 0; driversuggest_table[i]; i++) ;
+		suggest_max = i;
+	}
+	fprintf(OUTP, "Driver_status=0x%02x", driver_status);
+	fprintf(OUTP, " (%s,%s) ",
+		dr < driver_max ? driverbyte_table[dr] : "invalid",
+		su < suggest_max ? driversuggest_table[su] : "invalid");
 }
 
-static int sg_sense_print(const char * leadin, int scsi_status,
-                          int host_status, int driver_status,
-                          const unsigned char * sense_buffer, int sb_len)
+static int sg_sense_print(const char *leadin, int scsi_status,
+			  int host_status, int driver_status,
+			  const unsigned char *sense_buffer, int sb_len)
 {
-    int done_leadin = 0;
-    int done_sense = 0;
+	int done_leadin = 0;
+	int done_sense = 0;
 
-    scsi_status &= 0x7e; /*sanity */
-    if ((0 == scsi_status) && (0 == host_status) &&
-        (0 == driver_status))
-        return 1;       /* No problems */
-    if (0 != scsi_status) {
-        if (leadin)
-            fprintf(OUTP, "%s: ", leadin);
-        done_leadin = 1;
-	fprintf(OUTP, "scsi status: ");
-        sg_print_scsi_status(scsi_status);
-        fprintf(OUTP, "\n");
-        if (sense_buffer && ((scsi_status == SCSI_CHECK_CONDITION) ||
-                             (scsi_status == SCSI_COMMAND_TERMINATED))) {
-            sg_print_sense(0, sense_buffer, sb_len);
-            done_sense = 1;
-        }
-    }
-    if (0 != host_status) {
-        if (leadin && (! done_leadin))
-            fprintf(OUTP, "%s: ", leadin);
-        if (done_leadin)
-            fprintf(OUTP, "plus...: ");
-        else
-            done_leadin = 1;
-        sg_print_host_status(host_status);
-        fprintf(OUTP, "\n");
-    }
-    if (0 != driver_status) {
-        if (leadin && (! done_leadin))
-            fprintf(OUTP, "%s: ", leadin);
-        if (done_leadin)
-            fprintf(OUTP, "plus...: ");
-        else
-            done_leadin = 1;
-        sg_print_driver_status(driver_status);
-        fprintf(OUTP, "\n");
-        if (sense_buffer && (! done_sense) &&
-            (SG_ERR_DRIVER_SENSE == (0xf & driver_status)))
-            sg_print_sense(0, sense_buffer, sb_len);
-    }
-  return 0;
+	scsi_status &= 0x7e;	/*sanity */
+	if ((0 == scsi_status) && (0 == host_status) && (0 == driver_status))
+		return 1;	/* No problems */
+	if (0 != scsi_status) {
+		if (leadin)
+			fprintf(OUTP, "%s: ", leadin);
+		done_leadin = 1;
+		fprintf(OUTP, "scsi status: ");
+		sg_print_scsi_status(scsi_status);
+		fprintf(OUTP, "\n");
+		if (sense_buffer && ((scsi_status == SCSI_CHECK_CONDITION) ||
+				     (scsi_status ==
+				      SCSI_COMMAND_TERMINATED))) {
+			sg_print_sense(0, sense_buffer, sb_len);
+			done_sense = 1;
+		}
+	}
+	if (0 != host_status) {
+		if (leadin && (!done_leadin))
+			fprintf(OUTP, "%s: ", leadin);
+		if (done_leadin)
+			fprintf(OUTP, "plus...: ");
+		else
+			done_leadin = 1;
+		sg_print_host_status(host_status);
+		fprintf(OUTP, "\n");
+	}
+	if (0 != driver_status) {
+		if (leadin && (!done_leadin))
+			fprintf(OUTP, "%s: ", leadin);
+		if (done_leadin)
+			fprintf(OUTP, "plus...: ");
+		else
+			done_leadin = 1;
+		sg_print_driver_status(driver_status);
+		fprintf(OUTP, "\n");
+		if (sense_buffer && (!done_sense) &&
+		    (SG_ERR_DRIVER_SENSE == (0xf & driver_status)))
+			sg_print_sense(0, sense_buffer, sb_len);
+	}
+	return 0;
 }
 
 #ifdef SG_IO
-int sg_chk_n_print3(const char * leadin, struct sg_io_hdr * hp)
+int sg_chk_n_print3(const char *leadin, struct sg_io_hdr *hp)
 {
-    return sg_sense_print(leadin, hp->status, hp->host_status,
-                          hp->driver_status, hp->sbp, hp->sb_len_wr);
+	return sg_sense_print(leadin, hp->status, hp->host_status,
+			      hp->driver_status, hp->sbp, hp->sb_len_wr);
 }
 #endif
 
-int sg_chk_n_print(const char * leadin, int masked_status,
-                   int host_status, int driver_status,
-                   const unsigned char * sense_buffer, int sb_len)
+int sg_chk_n_print(const char *leadin, int masked_status,
+		   int host_status, int driver_status,
+		   const unsigned char *sense_buffer, int sb_len)
 {
-    int scsi_status = (masked_status << 1) & 0x7e;
+	int scsi_status = (masked_status << 1) & 0x7e;
 
-    return sg_sense_print(leadin, scsi_status, host_status, driver_status,
-    			  sense_buffer, sb_len);
+	return sg_sense_print(leadin, scsi_status, host_status, driver_status,
+			      sense_buffer, sb_len);
 }
 
 #ifdef SG_IO
-int sg_err_category3(struct sg_io_hdr * hp)
+int sg_err_category3(struct sg_io_hdr *hp)
 {
-    return sg_err_category_new(hp->status, hp->host_status,
-                               hp->driver_status, hp->sbp, hp->sb_len_wr);
+	return sg_err_category_new(hp->status, hp->host_status,
+				   hp->driver_status, hp->sbp, hp->sb_len_wr);
 }
 #endif
 
 int sg_err_category(int masked_status, int host_status,
-                    int driver_status, const unsigned char * sense_buffer,
-                    int sb_len)
+		    int driver_status, const unsigned char *sense_buffer,
+		    int sb_len)
 {
-    int scsi_status = (masked_status << 1) & 0x7e;
+	int scsi_status = (masked_status << 1) & 0x7e;
 
-    return sg_err_category_new(scsi_status, host_status, driver_status,
-    			       sense_buffer, sb_len);
+	return sg_err_category_new(scsi_status, host_status, driver_status,
+				   sense_buffer, sb_len);
 }
 
 int sg_err_category_new(int scsi_status, int host_status, int driver_status,
-			const unsigned char * sense_buffer, int sb_len)
+			const unsigned char *sense_buffer, int sb_len)
 {
-    scsi_status &= 0x7e;
-    if ((0 == scsi_status) && (0 == host_status) &&
-        (0 == driver_status))
-        return SG_ERR_CAT_CLEAN;
-    if ((SCSI_CHECK_CONDITION == scsi_status) ||
-        (SCSI_COMMAND_TERMINATED == scsi_status) ||
-        (SG_ERR_DRIVER_SENSE == (0xf & driver_status))) {
-        if (sense_buffer && (sb_len > 2)) {
-	    int sense_key;
-	    unsigned char asc;
+	scsi_status &= 0x7e;
+	if ((0 == scsi_status) && (0 == host_status) && (0 == driver_status))
+		return SG_ERR_CAT_CLEAN;
+	if ((SCSI_CHECK_CONDITION == scsi_status) ||
+	    (SCSI_COMMAND_TERMINATED == scsi_status) ||
+	    (SG_ERR_DRIVER_SENSE == (0xf & driver_status))) {
+		if (sense_buffer && (sb_len > 2)) {
+			int sense_key;
+			unsigned char asc;
 
-	    if (sense_buffer[0] & 0x2) {
-	    	sense_key = sense_buffer[1] & 0xf;
-		asc = sense_buffer[2];
-	    }
-	    else {
-	    	sense_key = sense_buffer[2] & 0xf;
-		asc = (sb_len > 12) ? sense_buffer[12] : 0;
-	    }
+			if (sense_buffer[0] & 0x2) {
+				sense_key = sense_buffer[1] & 0xf;
+				asc = sense_buffer[2];
+			} else {
+				sense_key = sense_buffer[2] & 0xf;
+				asc = (sb_len > 12) ? sense_buffer[12] : 0;
+			}
 
-            if (RECOVERED_ERROR == sense_key)
-                return SG_ERR_CAT_RECOVERED;
-            else if (UNIT_ATTENTION == sense_key) {
-                if (0x28 == asc)
-                    return SG_ERR_CAT_MEDIA_CHANGED;
-                if (0x29 == asc)
-                    return SG_ERR_CAT_RESET;
-            }
-        }
-        return SG_ERR_CAT_SENSE;
-    }
-    if (0 != host_status) {
-        if ((SG_ERR_DID_NO_CONNECT == host_status) ||
-            (SG_ERR_DID_BUS_BUSY == host_status) ||
-            (SG_ERR_DID_TIME_OUT == host_status))
-            return SG_ERR_CAT_TIMEOUT;
-    }
-    if (0 != driver_status) {
-        if (SG_ERR_DRIVER_TIMEOUT == driver_status)
-            return SG_ERR_CAT_TIMEOUT;
-    }
-    return SG_ERR_CAT_OTHER;
+			if (RECOVERED_ERROR == sense_key)
+				return SG_ERR_CAT_RECOVERED;
+			else if (UNIT_ATTENTION == sense_key) {
+				if (0x28 == asc)
+					return SG_ERR_CAT_MEDIA_CHANGED;
+				if (0x29 == asc)
+					return SG_ERR_CAT_RESET;
+			}
+		}
+		return SG_ERR_CAT_SENSE;
+	}
+	if (0 != host_status) {
+		if ((SG_ERR_DID_NO_CONNECT == host_status) ||
+		    (SG_ERR_DID_BUS_BUSY == host_status) ||
+		    (SG_ERR_DID_TIME_OUT == host_status))
+			return SG_ERR_CAT_TIMEOUT;
+	}
+	if (0 != driver_status) {
+		if (SG_ERR_DRIVER_TIMEOUT == driver_status)
+			return SG_ERR_CAT_TIMEOUT;
+	}
+	return SG_ERR_CAT_OTHER;
 }
 
 int sg_get_command_size(unsigned char opcode)
 {
-    return COMMAND_SIZE(opcode);
+	return COMMAND_SIZE(opcode);
 }
 
-void sg_get_command_name(unsigned char opcode, int buff_len, char * buff)
+void sg_get_command_name(unsigned char opcode, int buff_len, char *buff)
 {
-    const char **table = commands[ group(opcode) ];
+	const char **table = commands[group(opcode)];
 
-    if ((NULL == buff) || (buff_len < 1))
-    	return;
+	if ((NULL == buff) || (buff_len < 1))
+		return;
 
-    switch ((unsigned long) table) {
-    case RESERVED_GROUP:
-        strncpy(buff, reserved, buff_len);
-        break;
-    case VENDOR_GROUP:
-        strncpy(buff, vendor, buff_len);
-        break;
-    default:
-        strncpy(buff, table[opcode & 0x1f], buff_len);
-        break;
-    }
+	switch ((unsigned long)table) {
+	case RESERVED_GROUP:
+		strncpy(buff, reserved, buff_len);
+		break;
+	case VENDOR_GROUP:
+		strncpy(buff, vendor, buff_len);
+		break;
+	default:
+		strncpy(buff, table[opcode & 0x1f], buff_len);
+		break;
+	}
 }
diff --git a/testcases/kernel/fs/stream/stream01.c b/testcases/kernel/fs/stream/stream01.c
index eff181b..1d6b127 100644
--- a/testcases/kernel/fs/stream/stream01.c
+++ b/testcases/kernel/fs/stream/stream01.c
@@ -36,16 +36,16 @@
 
 char *TCID = "stream01";
 int TST_TOTAL = 1;
-int     local_flag;
+int local_flag;
 
 #define PASSED 1
 #define FAILED 0
 
 /* XXX: add setup and cleanup. */
 
-char progname[] = "stream01()" ;
-char tempfile1[40]="";
-char tempfile2[40]="";
+char progname[] = "stream01()";
+char tempfile1[40] = "";
+char tempfile2[40] = "";
 
 /*--------------------------------------------------------------------*/
 int main(int ac, char *av[])
@@ -56,52 +56,58 @@
 	int lc;
 	char *msg;
 
-         /*
-          * parse standard options
-          */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-        local_flag = PASSED;
+	local_flag = PASSED;
 	tst_tmpdir();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		sprintf(tempfile1, "stream011.%d", getpid());
 		sprintf(tempfile2, "stream012.%d", getpid());
 	/*--------------------------------------------------------------------*/
-	//block0:
-		if ((stream=fopen(tempfile1,"a+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) a+ failed: %s", tempfile1, strerror(errno));
+		//block0:
+		if ((stream = fopen(tempfile1, "a+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile1,
+				 strerror(errno));
 			tst_exit();
 		}
-		fwrite("a",1,1,stream);
-		if ((stream=freopen(tempfile2,"a+",stream)) == NULL) {
-			tst_brkm(TFAIL|TERRNO, NULL, "freopen(%s) a+ failed", tempfile2);
+		fwrite("a", 1, 1, stream);
+		if ((stream = freopen(tempfile2, "a+", stream)) == NULL) {
+			tst_brkm(TFAIL | TERRNO, NULL, "freopen(%s) a+ failed",
+				 tempfile2);
 		}
-		fwrite("a",1,1,stream);
+		fwrite("a", 1, 1, stream);
 		fclose(stream);
 
 		/* now check that a single "a" is in each file */
-		if ((stream=fopen(tempfile1,"r")) == NULL) {
-			tst_brkm(TFAIL|TERRNO, NULL, "fopen(%s) r failed", tempfile1);
-		}
-		else {
-			for (i=0; i<10; i++) buf[i]=0;
-			fread(buf,1,1,stream);
+		if ((stream = fopen(tempfile1, "r")) == NULL) {
+			tst_brkm(TFAIL | TERRNO, NULL, "fopen(%s) r failed",
+				 tempfile1);
+		} else {
+			for (i = 0; i < 10; i++)
+				buf[i] = 0;
+			fread(buf, 1, 1, stream);
 			if ((buf[0] != 'a') || (buf[1] != 0)) {
-				tst_resm(TFAIL,"bad contents in %s", tempfile1);
+				tst_resm(TFAIL, "bad contents in %s",
+					 tempfile1);
 				local_flag = FAILED;
 			}
 			fclose(stream);
 		}
-		if ((stream=fopen(tempfile2,"r")) == NULL) {
-			tst_brkm(TFAIL|TERRNO, NULL, "fopen(%s) r failed", tempfile2);
-		}
-		else {
-			for (i=0; i<10; i++) buf[i]=0;
-			fread(buf,1,1,stream);
+		if ((stream = fopen(tempfile2, "r")) == NULL) {
+			tst_brkm(TFAIL | TERRNO, NULL, "fopen(%s) r failed",
+				 tempfile2);
+		} else {
+			for (i = 0; i < 10; i++)
+				buf[i] = 0;
+			fread(buf, 1, 1, stream);
 			if ((buf[0] != 'a') || (buf[1] != 0)) {
-				tst_resm(TFAIL,"bad contents in %s", tempfile2);
+				tst_resm(TFAIL, "bad contents in %s",
+					 tempfile2);
 				local_flag = FAILED;
 			}
 			fclose(stream);
@@ -118,7 +124,7 @@
 		unlink(tempfile1);
 		unlink(tempfile2);
 
-	} /* end for */
+	}			/* end for */
 	tst_rmdir();
 	tst_exit();
 }
diff --git a/testcases/kernel/fs/stream/stream02.c b/testcases/kernel/fs/stream/stream02.c
index f4245f0..0776187 100644
--- a/testcases/kernel/fs/stream/stream02.c
+++ b/testcases/kernel/fs/stream/stream02.c
@@ -37,13 +37,13 @@
 
 char *TCID = "stream02";
 int TST_TOTAL = 1;
-int     local_flag;
+int local_flag;
 
 #define PASSED 1
 #define FAILED 0
 
-char progname[] = "stream02()" ;
-char tempfile1[40]="";
+char progname[] = "stream02()";
+char tempfile1[40] = "";
 
 /* XXX: add cleanup + setup. */
 
@@ -55,65 +55,68 @@
 	int lc;
 	char *msg;
 
-         /*
-          * parse standard options
-          */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-        local_flag = PASSED;
+	local_flag = PASSED;
 	tst_tmpdir();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 
 		sprintf(tempfile1, "stream1.%d", getpid());
 	/*--------------------------------------------------------------------*/
-	//block0:
-		if (mknod(tempfile1, (S_IFIFO|0666), 0) != 0) {
-			tst_resm(TFAIL,"mknod failed in block0: %s", strerror(errno));
+		//block0:
+		if (mknod(tempfile1, (S_IFIFO | 0666), 0) != 0) {
+			tst_resm(TFAIL, "mknod failed in block0: %s",
+				 strerror(errno));
 			local_flag = FAILED;
 			goto block1;
 		}
-		if ((stream=fopen(tempfile1,"w+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) w+ failed for pipe file: %s", tempfile1, strerror(errno));
+		if ((stream = fopen(tempfile1, "w+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) w+ failed for pipe file: %s",
+				 tempfile1, strerror(errno));
 			local_flag = FAILED;
 		} else {
 			fclose(stream);
 		}
-		if ((stream=fopen(tempfile1,"a+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) a+ failed: %s", tempfile1, strerror(errno));
+		if ((stream = fopen(tempfile1, "a+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile1,
+				 strerror(errno));
 			local_flag = FAILED;
 		} else {
 			fclose(stream);
 			unlink(tempfile1);
 		}
 		if (local_flag == PASSED) {
-		         tst_resm(TPASS, "Test passed in block0.");
+			tst_resm(TPASS, "Test passed in block0.");
 		} else {
-		         tst_resm(TFAIL, "Test failed in block0.");
-	        }
+			tst_resm(TFAIL, "Test failed in block0.");
+		}
 		local_flag = PASSED;
 
 	/*--------------------------------------------------------------------*/
-	block1 :
-		if ((fd = open("/dev/tty", O_WRONLY)) >= 0)
-		{
+block1:
+		if ((fd = open("/dev/tty", O_WRONLY)) >= 0) {
 			close(fd);
-			if (( stream = fopen("/dev/tty","w"))==NULL) {
-				tst_resm(TFAIL|TERRNO,"fopen(/dev/tty) write failed");
+			if ((stream = fopen("/dev/tty", "w")) == NULL) {
+				tst_resm(TFAIL | TERRNO,
+					 "fopen(/dev/tty) write failed");
 				local_flag = FAILED;
 			} else {
 				fclose(stream);
 			}
 		}
 		if (local_flag == PASSED) {
-		         tst_resm(TPASS, "Test passed in block1.");
+			tst_resm(TPASS, "Test passed in block1.");
 		} else {
-		         tst_resm(TFAIL, "Test failed in block1.");
-	        }
+			tst_resm(TFAIL, "Test failed in block1.");
+		}
 
 	/*--------------------------------------------------------------------*/
-	} /* end for */
+	}			/* end for */
 	tst_rmdir();
 	tst_exit();
 }
diff --git a/testcases/kernel/fs/stream/stream03.c b/testcases/kernel/fs/stream/stream03.c
index ca6717f..78b33be 100644
--- a/testcases/kernel/fs/stream/stream03.c
+++ b/testcases/kernel/fs/stream/stream03.c
@@ -39,23 +39,23 @@
 
 char *TCID = "stream03";
 int TST_TOTAL = 1;
-int     local_flag;
+int local_flag;
 
 #define PASSED 1
 #define FAILED 0
 
-char progname[] = "stream03()" ;
-char tempfile1[40]="";
+char progname[] = "stream03()";
+char tempfile1[40] = "";
 
 int main(int ac, char *av[])
 {
 	FILE *stream;
 	char buf[30];
-	char *junk="abcdefghijklmnopqrstuvwxyz";
+	char *junk = "abcdefghijklmnopqrstuvwxyz";
 	long pos;
 	off_t opos;
 	int lc;
-        char *msg;
+	char *msg;
 
 	/*
 	 * parse standard options
@@ -72,31 +72,34 @@
 
 		sprintf(tempfile1, "stream03.%d", getpid());
 	/*--------------------------------------------------------------------*/
-	//block0:
+		//block0:
 
-		if ((stream=fopen(tempfile1, "a+")) == NULL) {
-			tst_resm(TBROK,"fopen(%s) a+ failed: %s", tempfile1, strerror(errno));
+		if ((stream = fopen(tempfile1, "a+")) == NULL) {
+			tst_resm(TBROK, "fopen(%s) a+ failed: %s", tempfile1,
+				 strerror(errno));
 			tst_exit();
 		}
 
 		/* make sure offset of zero at start */
-		pos=ftell(stream);
+		pos = ftell(stream);
 
 		if (pos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 1");
+			tst_resm(TFAIL, "file pointer descrepancy 1");
 			local_flag = FAILED;
 		}
 
 		/* write something and check */
 		if (fwrite(junk, sizeof(*junk), strlen(junk), stream) == 0) {
-			tst_resm(TFAIL,"fwrite failed: %s", strerror(errno));
+			tst_resm(TFAIL, "fwrite failed: %s", strerror(errno));
 			tst_exit();
 		}
 
-		pos=ftell(stream);
+		pos = ftell(stream);
 
 		if (pos != strlen(junk)) {
-			tst_resm(TFAIL, "strlen(junk)=%zi: file pointer descrepancy 2 (pos=%li)", strlen(junk), pos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 2 (pos=%li)",
+				 strlen(junk), pos);
 			local_flag = FAILED;
 		}
 
@@ -105,12 +108,14 @@
 		pos = ftell(stream);
 
 		if (pos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 3 (pos=%li, wanted pos=0)", pos);
+			tst_resm(TFAIL,
+				 "file pointer descrepancy 3 (pos=%li, wanted pos=0)",
+				 pos);
 			local_flag = FAILED;
 		}
 
 		/* seek from current position and then check */
-		if (fseek(stream,strlen(junk), 1) != 0) {
+		if (fseek(stream, strlen(junk), 1) != 0) {
 			tst_resm(TFAIL, "fseek failed: %s", strerror(errno));
 			tst_exit();
 		}
@@ -118,7 +123,9 @@
 		pos = ftell(stream);
 
 		if (pos != strlen(junk)) {
-			tst_resm(TFAIL, "strlen(junk)=%zi: file pointer descrepancy 4 (pos=%li)", strlen(junk), pos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 4 (pos=%li)",
+				 strlen(junk), pos);
 			local_flag = FAILED;
 		}
 
@@ -131,49 +138,56 @@
 		pos = ftell(stream);
 
 		if (pos != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk)=%zi: file pointer descrepancy 5 (pos=%li)", strlen(junk), pos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 5 (pos=%li)",
+				 strlen(junk), pos);
 			local_flag = FAILED;
 		}
 
 		/* rewind with seek and then check */
 		if (fseek(stream, 0, 0) != 0) {
-			tst_resm(TFAIL,"fseek failed: %s", strerror(errno));
+			tst_resm(TFAIL, "fseek failed: %s", strerror(errno));
 			tst_exit();
 		}
 
 		pos = ftell(stream);
 
 		if (pos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 6 (pos=%li, wanted pos=0)", pos);
+			tst_resm(TFAIL,
+				 "file pointer descrepancy 6 (pos=%li, wanted pos=0)",
+				 pos);
 			local_flag = FAILED;
 		}
 
 		/* read till EOF, do getc and then check ftell */
-		while (fgets(buf, sizeof(buf), stream));
-		pos=ftell(stream);
+		while (fgets(buf, sizeof(buf), stream)) ;
+		pos = ftell(stream);
 		getc(stream);
-		pos=ftell(stream);
+		pos = ftell(stream);
 
 		if (pos != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk)=%zi: file pointer descrepancy 7 (pos=%li)", strlen(junk), pos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 7 (pos=%li)",
+				 strlen(junk), pos);
 			local_flag = FAILED;
 		}
 
 		fclose(stream);
 
 		if (local_flag == PASSED) {
-                        tst_resm(TPASS, "Test passed in block0.");
-                } else {
-                        tst_resm(TFAIL, "Test failed in block0.");
-                }
+			tst_resm(TPASS, "Test passed in block0.");
+		} else {
+			tst_resm(TFAIL, "Test failed in block0.");
+		}
 
-                local_flag = PASSED;
+		local_flag = PASSED;
 
 		unlink(tempfile1);
 	/*--------------------------------------------------------------------*/
-	//block1:
+		//block1:
 		if ((stream = fopen(tempfile1, "a+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) a+ failed: %s", tempfile1, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile1,
+				 strerror(errno));
 			tst_exit();
 		}
 
@@ -181,7 +195,9 @@
 		opos = ftello(stream);
 
 		if (opos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 1 (opos=%"PRId64", wanted opos=0)", (int64_t)opos);
+			tst_resm(TFAIL,
+				 "file pointer descrepancy 1 (opos=%" PRId64
+				 ", wanted opos=0)", (int64_t) opos);
 			local_flag = FAILED;
 		}
 
@@ -194,7 +210,9 @@
 		opos = ftello(stream);
 
 		if (opos != strlen(junk)) {
-			tst_resm(TFAIL, "strlen(junk)=%zi: file pointer descrepancy 2 (opos=%"PRId64")", strlen(junk), (int64_t)opos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 2 (opos=%"
+				 PRId64 ")", strlen(junk), (int64_t) opos);
 			local_flag = FAILED;
 		}
 
@@ -203,68 +221,78 @@
 		opos = ftello(stream);
 
 		if (opos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 3 (opos=%"PRId64", wanted opos=0)", (int64_t)opos);
+			tst_resm(TFAIL,
+				 "file pointer descrepancy 3 (opos=%" PRId64
+				 ", wanted opos=0)", (int64_t) opos);
 			local_flag = FAILED;
 		}
 
 		/* seek from current position and then check */
 		if (fseeko(stream, strlen(junk), 1) != 0) {
-			tst_resm(TFAIL,"fseeko failed: %s", strerror(errno));
+			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
 			tst_exit();
 		}
 
 		opos = ftello(stream);
 
 		if (opos != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk)=%zi: file pointer descrepancy 4 (opos=%"PRId64")", strlen(junk), (int64_t)opos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 4 (opos=%"
+				 PRId64 ")", strlen(junk), (int64_t) opos);
 			local_flag = FAILED;
 		}
 
 		/* seek from end of file and then check */
 		if (fseeko(stream, 0, 2) != 0) {
-			tst_resm(TFAIL,"fseeko failed: %s", strerror(errno));
+			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
 			tst_exit();
 		}
 
 		opos = ftello(stream);
 
 		if (opos != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk)=%zi: file pointer descrepancy 5 (opos=%"PRId64")", strlen(junk), (int64_t)opos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 5 (opos=%"
+				 PRId64 ")", strlen(junk), (int64_t) opos);
 			local_flag = FAILED;
 		}
 
 		/* rewind with seek and then check */
 		if (fseeko(stream, 0, 0) != 0) {
-			tst_resm(TFAIL,"fseeko failed: %s", strerror(errno));
+			tst_resm(TFAIL, "fseeko failed: %s", strerror(errno));
 			tst_exit();
 		}
 
 		opos = ftello(stream);
 
 		if (opos != 0) {
-			tst_resm(TFAIL,"file pointer descrepancy 6 (opos=%"PRId64", wanted opos=0)", (int64_t)opos);
+			tst_resm(TFAIL,
+				 "file pointer descrepancy 6 (opos=%" PRId64
+				 ", wanted opos=0)", (int64_t) opos);
 			local_flag = FAILED;
 		}
 
 		/* read till EOF, do getc and then check ftello */
-		while (fgets(buf, sizeof(buf), stream));
+		while (fgets(buf, sizeof(buf), stream)) ;
 
-		opos=ftello(stream);
+		opos = ftello(stream);
 		getc(stream);
-		opos=ftello(stream);
+		opos = ftello(stream);
 
 		if (opos != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk)=%zi: file pointer descrepancy 7 (opos=%li)", strlen(junk), opos);
+			tst_resm(TFAIL,
+				 "strlen(junk)=%zi: file pointer descrepancy 7 (opos=%li)",
+				 strlen(junk), opos);
 			local_flag = FAILED;
 		}
 
 		fclose(stream);
 
 		if (local_flag == PASSED) {
-                        tst_resm(TPASS, "Test passed in block1.");
-                } else {
-                        tst_resm(TFAIL, "Test failed in block1.");
-                }
+			tst_resm(TPASS, "Test passed in block1.");
+		} else {
+			tst_resm(TFAIL, "Test failed in block1.");
+		}
 
 		unlink(tempfile1);
 	}
diff --git a/testcases/kernel/fs/stream/stream04.c b/testcases/kernel/fs/stream/stream04.c
index 7ee7e56..52604e1 100644
--- a/testcases/kernel/fs/stream/stream04.c
+++ b/testcases/kernel/fs/stream/stream04.c
@@ -40,13 +40,13 @@
 
 char *TCID = "stream04";
 int TST_TOTAL = 1;
-int     local_flag;
+int local_flag;
 
 #define PASSED 1
 #define FAILED 0
 
-char progname[] = "stream04()" ;
-char tempfile1[40]="";
+char progname[] = "stream04()";
+char tempfile1[40] = "";
 long ftell();
 
 /* XXX: add setup and cleanup */
@@ -55,16 +55,16 @@
 int main(int ac, char *av[])
 {
 	FILE *stream;
-	char *junk="abcdefghijklmnopqrstuvwxyz";
+	char *junk = "abcdefghijklmnopqrstuvwxyz";
 	char *inbuf;
 	int ret;
 
 	int lc;
 	char *msg;
 
-	 /*
-	  * parse standard options
-	  */
+	/*
+	 * parse standard options
+	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	tst_tmpdir();
@@ -74,42 +74,51 @@
 
 		sprintf(tempfile1, "stream04.%d", getpid());
 	/*--------------------------------------------------------------------*/
-	//block0:
-		if ((stream=fopen(tempfile1,"a+")) == NULL) {
-			tst_resm(TFAIL|TERRNO,"fopen(%s) a+ failed", tempfile1);
+		//block0:
+		if ((stream = fopen(tempfile1, "a+")) == NULL) {
+			tst_resm(TFAIL | TERRNO, "fopen(%s) a+ failed",
+				 tempfile1);
 			tst_rmdir();
 			tst_exit();
 		}
 		/* write something and check */
-		if ((ret=fwrite(junk,sizeof(*junk),strlen(junk),stream)) == 0) {
-			tst_resm(TFAIL,"fwrite failed: %s", strerror(errno));
+		if ((ret =
+		     fwrite(junk, sizeof(*junk), strlen(junk), stream)) == 0) {
+			tst_resm(TFAIL, "fwrite failed: %s", strerror(errno));
 			tst_rmdir();
 			tst_exit();
 		}
 
-		if ((size_t)ret != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fwrite = %zi", strlen(junk), ret);
+		if ((size_t) ret != strlen(junk)) {
+			tst_resm(TFAIL,
+				 "strlen(junk) = %zi != return value from fwrite = %zi",
+				 strlen(junk), ret);
 			local_flag = FAILED;
 		}
 
 		fclose(stream);
-		if ((stream=fopen(tempfile1,"r+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) r+ failed: %s", tempfile1, strerror(errno));
+		if ((stream = fopen(tempfile1, "r+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) r+ failed: %s", tempfile1,
+				 strerror(errno));
 			tst_rmdir();
 			tst_exit();
 		}
-		if ((inbuf=(char *)malloc(strlen(junk))) == 0) {
-			tst_resm(TBROK, "test failed because of malloc: %s", strerror(errno));
+		if ((inbuf = (char *)malloc(strlen(junk))) == 0) {
+			tst_resm(TBROK, "test failed because of malloc: %s",
+				 strerror(errno));
 			tst_rmdir();
 			tst_exit();
 		}
-		if ((ret=fread(inbuf,sizeof(*junk),strlen(junk),stream)) == 0) {
-			tst_resm(TFAIL,"fread failed: %s", strerror(errno));
+		if ((ret =
+		     fread(inbuf, sizeof(*junk), strlen(junk), stream)) == 0) {
+			tst_resm(TFAIL, "fread failed: %s", strerror(errno));
 			tst_rmdir();
 			tst_exit();
 		}
-		if ((size_t)ret != strlen(junk)) {
-			tst_resm(TFAIL,"strlen(junk) = %zi != return value from fread = %zi", strlen(junk), ret);
+		if ((size_t) ret != strlen(junk)) {
+			tst_resm(TFAIL,
+				 "strlen(junk) = %zi != return value from fread = %zi",
+				 strlen(junk), ret);
 			local_flag = FAILED;
 		}
 		fclose(stream);
@@ -120,7 +129,7 @@
 		}
 	/*--------------------------------------------------------------------*/
 		unlink(tempfile1);
-	} /* end for */
+	}			/* end for */
 	tst_rmdir();
 	tst_exit();
 }
diff --git a/testcases/kernel/fs/stream/stream05.c b/testcases/kernel/fs/stream/stream05.c
index 7ed7bbe..43a440b 100644
--- a/testcases/kernel/fs/stream/stream05.c
+++ b/testcases/kernel/fs/stream/stream05.c
@@ -44,53 +44,56 @@
 
 char *TCID = "stream05";
 int TST_TOTAL = 1;
-int     local_flag;
+int local_flag;
 
 #define PASSED 1
 #define FAILED 0
 
-char progname[] = "stream05()" ;
-char tempfile[40]="";
+char progname[] = "stream05()";
+char tempfile[40] = "";
 
 /*--------------------------------------------------------------------*/
 int main(int ac, char *av[])
 {
 	FILE *stream;
 	char buf[10];
-	int nr,fd;
+	int nr, fd;
 
 	int lc;
 	char *msg;
 
-         /*
-          * parse standard options
-          */
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-                 tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+	/*
+	 * parse standard options
+	 */
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	tst_tmpdir();
-        local_flag = PASSED;
+	local_flag = PASSED;
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
-                local_flag = PASSED;
+		local_flag = PASSED;
 
 		sprintf(tempfile, "stream05.%d", getpid());
 	/*--------------------------------------------------------------------*/
-	//block0:
-		if ((stream=fopen(tempfile,"a+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) a+ failed: %s", tempfile, strerror(errno));
+		//block0:
+		if ((stream = fopen(tempfile, "a+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) a+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		fprintf(stream,"a");
+		fprintf(stream, "a");
 		fclose(stream);
 
-		if ((stream=fopen(tempfile,"r+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) r+ failed: %s", tempfile, strerror(errno));
+		if ((stream = fopen(tempfile, "r+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) r+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
 
 		/* check that ferror returns zero */
 		if (ferror(stream) != 0) {
-			tst_resm(TFAIL, "ferror did not return zero: %s", strerror(errno));
+			tst_resm(TFAIL, "ferror did not return zero: %s",
+				 strerror(errno));
 			local_flag = FAILED;
 		}
 
@@ -103,16 +106,16 @@
 		local_flag = PASSED;
 
 	/*--------------------------------------------------------------------*/
-	//block1:
+		//block1:
 
 		/* check that fileno returns valid file descriptor */
-		fd=fileno(stream);
-		if ((nr=read(fd,buf,1)) < 0) {
+		fd = fileno(stream);
+		if ((nr = read(fd, buf, 1)) < 0) {
 			tst_resm(TFAIL, "read failed: %s", strerror(errno));
 			tst_exit();
 		}
 		if (nr != 1) {
-			tst_resm(TFAIL,"read did not read right number");
+			tst_resm(TFAIL, "read did not read right number");
 			local_flag = FAILED;
 		}
 		if (buf[0] != 'a') {
@@ -127,22 +130,27 @@
 
 		local_flag = PASSED;
 	/*--------------------------------------------------------------------*/
-	//block2:
+		//block2:
 
 		/* read to EOF and ensure feof returns non-zero */
 		fclose(stream);
 
-		if ((stream=fopen(tempfile,"r+")) == NULL) {
-			tst_resm(TFAIL,"fopen(%s) r+ failed: %s", tempfile, strerror(errno));
+		if ((stream = fopen(tempfile, "r+")) == NULL) {
+			tst_resm(TFAIL, "fopen(%s) r+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
 		if (feof(stream) != 0) {
-			tst_resm(TFAIL, "feof returned non-zero when it should not: %s", strerror(errno));
+			tst_resm(TFAIL,
+				 "feof returned non-zero when it should not: %s",
+				 strerror(errno));
 			local_flag = FAILED;
 		}
-		fread(buf,1,2,stream);	/* read to EOF */
+		fread(buf, 1, 2, stream);	/* read to EOF */
 		if (feof(stream) == 0) {
-			tst_resm(TFAIL, "feof returned zero when it should not: %s", strerror(errno));
+			tst_resm(TFAIL,
+				 "feof returned zero when it should not: %s",
+				 strerror(errno));
 			local_flag = FAILED;
 		}
 
@@ -154,7 +162,7 @@
 
 		local_flag = PASSED;
 	/*--------------------------------------------------------------------*/
-	//block3:
+		//block3:
 		/* ensure clearerr works */
 		clearerr(stream);
 		if (feof(stream) != 0) {
@@ -169,51 +177,57 @@
 
 		local_flag = PASSED;
 	/*--------------------------------------------------------------------*/
-	//block4:
+		//block4:
 
 		/* test fopen "b" flags -- should be allowed but ignored */
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "rb")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) rb failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) rb failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "wb")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) wb failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) wb failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "ab")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) ab failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) ab failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "rb+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) rb+ failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) rb+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "wb+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) wb+ failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) wb+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		if ((stream = fopen(tempfile, "ab+")) == NULL) {
-			tst_resm(TFAIL, "fopen(%s) ab+ failed: %s", tempfile, strerror(errno));
+			tst_resm(TFAIL, "fopen(%s) ab+ failed: %s", tempfile,
+				 strerror(errno));
 			tst_exit();
 		}
-		(void) fclose(stream);
+		(void)fclose(stream);
 
 		tst_resm(TPASS, "Test passed in block4.");
 	/*--------------------------------------------------------------------*/
 		unlink(tempfile);
-	} /* end for */
+	}			/* end for */
 	tst_rmdir();
 	tst_exit();
 
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index 5216339..a9c618d 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -56,24 +56,24 @@
 #endif
 
 #ifndef MPOL_MF_WAIT
-#define MPOL_MF_WAIT    (1<<2)  /* Wait for existing pages to migrate */
+#define MPOL_MF_WAIT    (1<<2)	/* Wait for existing pages to migrate */
 #endif
 
 #if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
-static inline int nodemask_isset(nodemask_t *mask, int node)
+static inline int nodemask_isset(nodemask_t * mask, int node)
 {
 	if ((unsigned)node >= NUMA_NUM_NODES)
 		return 0;
-	if (mask->n[node / (8*sizeof(unsigned long))] &
-		(1UL<<(node%(8*sizeof(unsigned long)))))
+	if (mask->n[node / (8 * sizeof(unsigned long))] &
+	    (1UL << (node % (8 * sizeof(unsigned long)))))
 		return 1;
 	return 0;
 }
 
-static inline void nodemask_set(nodemask_t *mask, int node)
+static inline void nodemask_set(nodemask_t * mask, int node)
 {
-	mask->n[node / (8*sizeof(unsigned long))] |=
-		(1UL<<(node%(8*sizeof(unsigned long))));
+	mask->n[node / (8 * sizeof(unsigned long))] |=
+	    (1UL << (node % (8 * sizeof(unsigned long))));
 }
 #endif
 
@@ -89,8 +89,7 @@
  *
  * return true if arg [something] exists; else return false
  */
-static bool
-required_arg(char *arg, char *arg_name)
+static bool required_arg(char *arg, char *arg_name)
 {
 	glctx_t *gcp = &glctx;
 
@@ -108,8 +107,7 @@
  *  size_kmgp() -- convert ascii arg to numeric and scale as requested
  */
 #define KILO_SHIFT 10
-static size_t
-size_kmgp(char *arg)
+static size_t size_kmgp(char *arg)
 {
 	size_t argval;
 	char *next;
@@ -119,7 +117,7 @@
 		return argval;
 
 	switch (tolower(*next)) {
-	case 'p':	/* pages */
+	case 'p':		/* pages */
 		argval *= glctx.pagesize;
 		break;
 
@@ -142,23 +140,21 @@
 	return argval;
 }
 
-static size_t
-get_scaled_value(char *args, char *what)
+static size_t get_scaled_value(char *args, char *what)
 {
 	glctx_t *gcp = &glctx;
 	size_t size = size_kmgp(args);
 
 	if (size == BOGUS_SIZE) {
 		fprintf(stderr, "%s:  segment %s must be numeric value"
-		" followed by optional k, m, g or p [pages] scale factor.\n",
+			" followed by optional k, m, g or p [pages] scale factor.\n",
 			gcp->program_name, what);
 	}
 
 	return size;
 }
 
-static int
-get_range(char *args, range_t *range, char **nextarg)
+static int get_range(char *args, range_t * range, char **nextarg)
 {
 
 	if (isdigit(*args)) {
@@ -176,7 +172,8 @@
 		if (*args != '\0') {
 			args = strtok_r(args, whitespace, &nextarg);
 			if (*args != '*') {
-				range->length = get_scaled_value(args, "length");
+				range->length =
+				    get_scaled_value(args, "length");
 				if (range->length == BOGUS_SIZE)
 					return CMD_ERROR;
 			} else
@@ -189,8 +186,7 @@
 	return CMD_SUCCESS;
 }
 
-static int
-get_shared(char *args)
+static int get_shared(char *args)
 {
 	glctx_t *gcp = &glctx;
 	int segflag = MAP_PRIVATE;
@@ -212,28 +208,27 @@
  *	2 = write
  *	0 = neither [error]
  */
-static int
-get_access(char *args)
+static int get_access(char *args)
 {
 	glctx_t *gcp = &glctx;
 	int axcs = 1;
-	int  len = strlen(args);
+	int len = strlen(args);
 
 	if (tolower(*args) == 'w')
 		axcs = 2;
 	else if (len != 0 && tolower(*args) != 'r') {
-		fprintf(stderr, "%s:  segment access must be 'r[ead]' or 'w[rite]'\n",
-			 gcp->program_name);
+		fprintf(stderr,
+			"%s:  segment access must be 'r[ead]' or 'w[rite]'\n",
+			gcp->program_name);
 		return 0;
 	}
 
 	return axcs;
 }
 
-static bool
-numa_supported(void)
+static bool numa_supported(void)
 {
-	glctx_t      *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 
 	if (gcp->numa_max_node <= 0) {
 		fprintf(stderr, "%s:  no NUMA support on this platform\n",
@@ -245,14 +240,14 @@
 
 static struct policies {
 	char *pol_name;
-	int   pol_flag;
-} policies[] =
-{
-	{"default",     MPOL_DEFAULT},
-	{"preferred",   MPOL_PREFERRED},
-	{"bind",        MPOL_BIND},
-	{"interleaved", MPOL_INTERLEAVE},
-	{NULL, -1}
+	int pol_flag;
+} policies[] = {
+	{
+	"default", MPOL_DEFAULT}, {
+	"preferred", MPOL_PREFERRED}, {
+	"bind", MPOL_BIND}, {
+	"interleaved", MPOL_INTERLEAVE}, {
+	NULL, -1}
 };
 
 /*
@@ -262,12 +257,11 @@
  * <mpol> is one of the policies[] above.
  * '+<flags>' = modifiers to mbind() call.  parsed by get_mbind_flags()
  */
-static int
-get_mbind_policy(char *args, char **nextarg)
+static int get_mbind_policy(char *args, char **nextarg)
 {
 	glctx_t *gcp = &glctx;
 	struct policies *polp;
-	char            *pol;
+	char *pol;
 
 	pol = args;
 	args += strcspn(args, " 	+");
@@ -299,17 +293,16 @@
  *
  * returns flags on success; -1 on error
  */
-static int
-get_mbind_flags(char *args, char **nextarg)
+static int get_mbind_flags(char *args, char **nextarg)
 {
 	glctx_t *gcp = &glctx;
-	char    *arg;
-	int      flags = 0;
+	char *arg;
+	int flags = 0;
 
 	arg = args;
 	args += strcspn(args, " 	+");
 
-	if (strncmp(arg, "move", args-arg))
+	if (strncmp(arg, "move", args - arg))
 		goto flags_err;
 
 	flags = MPOL_MF_MOVE;
@@ -343,13 +336,12 @@
  *
  * N.B., caller must free returned nodemask
  */
-static nodemask_t *
-get_nodemask(char *args)
+static nodemask_t *get_nodemask(char *args)
 {
-	glctx_t    *gcp = &glctx;
-	nodemask_t *nmp = (nodemask_t *)calloc(1, sizeof(nodemask_t));
-	char       *next;
-	int         node;
+	glctx_t *gcp = &glctx;
+	nodemask_t *nmp = (nodemask_t *) calloc(1, sizeof(nodemask_t));
+	char *next;
+	int node;
 	while (*args != '\0') {
 		if (!isdigit(*args)) {
 			fprintf(stderr, "%s:  expected digit for <node/list>\n",
@@ -372,7 +364,7 @@
 		if (*next != ',') {
 			break;
 		}
-		args = next+1;
+		args = next + 1;
 	}
 
 out_err:
@@ -385,15 +377,14 @@
  *
  * on success, returns count of id's in list; on error -1
  */
-static int
-get_arg_nodeid_list(char *args, unsigned int *list)
+static int get_arg_nodeid_list(char *args, unsigned int *list)
 {
-	glctx_t    *gcp;
-	char       *next;
-	nodemask_t  my_allowed_nodes;
-	int         node, count = 0;
+	glctx_t *gcp;
+	char *next;
+	nodemask_t my_allowed_nodes;
+	int node, count = 0;
 
-        gcp = &glctx;
+	gcp = &glctx;
 #if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
 	my_allowed_nodes = numa_get_membind_compat();
 #else
@@ -415,7 +406,8 @@
 		}
 
 		if (!nodemask_isset(&my_allowed_nodes, node)) {
-			fprintf(stderr, "%s:  node %d is not in my allowed node mask\n",
+			fprintf(stderr,
+				"%s:  node %d is not in my allowed node mask\n",
 				gcp->program_name, node);
 			return -1;
 		}
@@ -432,7 +424,7 @@
 			fprintf(stderr, "%s:  too many node ids in list\n",
 				gcp->program_name);
 		}
-		args = next+1;
+		args = next + 1;
 	}
 
 	return -1;
@@ -443,25 +435,24 @@
  * current thread's allowed node mask.  return # of nodes in
  * mask.
  */
-static int
-get_current_nodeid_list(unsigned int *fromids)
+static int get_current_nodeid_list(unsigned int *fromids)
 {
 	/*
 	 * FIXME (garrcoop): gcp is unitialized and shortly hereafter used in
 	 * an initialization statement..... UHHHHHHH... test writer fail?
 	 */
-	glctx_t    *gcp;
+	glctx_t *gcp;
 	nodemask_t my_allowed_nodes;
-	int        nr_nodes = 0, max_node = gcp->numa_max_node;
-	int        node;
+	int nr_nodes = 0, max_node = gcp->numa_max_node;
+	int node;
 
-        gcp = &glctx;
+	gcp = &glctx;
 #if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
 	my_allowed_nodes = numa_get_membind_compat();
 #else
 	my_allowed_nodes = numa_get_membind();
 #endif
-	for (node=0; node <= max_node; ++node) {
+	for (node = 0; node <= max_node; ++node) {
 		if (nodemask_isset(&my_allowed_nodes, node))
 			*(fromids + nr_nodes++) = node;
 	}
@@ -480,8 +471,7 @@
  * I don't know what the original intent was for this code.
  */
 #if 0
-static void
-not_implemented()
+static void not_implemented()
 {
 	glctx_t *gcp = &glctx;
 
@@ -493,14 +483,12 @@
 /*
  * =========================================================================
  */
-static int
-quit(char *args)
+static int quit(char *args)
 {
-	exit(0);	/* let cleanup() do its thing */
+	exit(0);		/* let cleanup() do its thing */
 }
 
-static int
-show_pid(char *args)
+static int show_pid(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -509,8 +497,7 @@
 	return CMD_SUCCESS;
 }
 
-static int
-pause_me(char *args)
+static int pause_me(char *args)
 {
 	// glctx_t *gcp = &glctx;
 
@@ -520,31 +507,30 @@
 	return CMD_SUCCESS;
 }
 
-static char *numa_header =
-"  Node  Total Mem[MB]  Free Mem[MB]\n";
-static int
-numa_info(char *args)
+static char *numa_header = "  Node  Total Mem[MB]  Free Mem[MB]\n";
+static int numa_info(char *args)
 {
-	glctx_t      *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	unsigned int *nodeids;
-	int           nr_nodes, i;
-	bool          do_header = true;
+	int nr_nodes, i;
+	bool do_header = true;
 
 	if (!numa_supported())
 		return CMD_ERROR;
 
-	nodeids   = calloc(gcp->numa_max_node, sizeof(*nodeids));
-	nr_nodes  = get_current_nodeid_list(nodeids);
+	nodeids = calloc(gcp->numa_max_node, sizeof(*nodeids));
+	nr_nodes = get_current_nodeid_list(nodeids);
 	if (nr_nodes < 0)
 		return CMD_ERROR;
 
-	for (i=0; i < nr_nodes; ++i) {
-		int  node = nodeids[i];
+	for (i = 0; i < nr_nodes; ++i) {
+		int node = nodeids[i];
 		long node_size, node_free;
 
 		node_size = numa_node_size(node, &node_free);
 		if (node_size < 0) {
-			fprintf(stderr, "%s:  numa_node_size() failed for node %d\n",
+			fprintf(stderr,
+				"%s:  numa_node_size() failed for node %d\n",
 				gcp->program_name, node);
 			return CMD_ERROR;
 		}
@@ -554,7 +540,7 @@
 			puts(numa_header);
 		}
 		printf("  %3d  %9ld      %8ld\n", node,
-			 node_size/(1024*1024), node_free/(1024*1024));
+		       node_size / (1024 * 1024), node_free / (1024 * 1024));
 	}
 
 	return CMD_SUCCESS;
@@ -568,21 +554,20 @@
  * if <from-node-id[s]> omitted, <to-node-id[s]> must be
  * a single node id.
  */
-static int
-migrate_process(char *args)
+static int migrate_process(char *args)
 {
-	glctx_t       *gcp = &glctx;
-	unsigned int  *fromids, *toids;
-	char          *idlist, *nextarg;
+	glctx_t *gcp = &glctx;
+	unsigned int *fromids, *toids;
+	char *idlist, *nextarg;
 	struct timeval t_start, t_end;
-	int            nr_to, nr_from;
-	int            nr_migrated;
-	int            ret = CMD_ERROR;
+	int nr_to, nr_from;
+	int nr_migrated;
+	int ret = CMD_ERROR;
 
 	if (!numa_supported())
 		return CMD_ERROR;
 
-	toids   = calloc(gcp->numa_max_node, sizeof(*toids));
+	toids = calloc(gcp->numa_max_node, sizeof(*toids));
 	fromids = calloc(gcp->numa_max_node, sizeof(*fromids));
 
 	/*
@@ -605,7 +590,8 @@
 		if (nr_from <= 0)
 			goto out_free;
 		if (nr_from != nr_to) {
-			fprintf(stderr, "%s:  # of 'from' ids must = # of 'to' ids\n",
+			fprintf(stderr,
+				"%s:  # of 'from' ids must = # of 'to' ids\n",
 				gcp->program_name);
 			goto out_free;
 		}
@@ -630,10 +616,10 @@
 		 * remove 'to' node from 'from' list.  to and from
 		 * lists can't intersect.
 		 */
-		for (i = nr_from-1; i >= 0; --i) {
+		for (i = nr_from - 1; i >= 0; --i) {
 			if (*toids == *(fromids + i)) {
 				while (i <= nr_from) {
-					*(fromids + i) = *(fromids + i+1);
+					*(fromids + i) = *(fromids + i + 1);
 					++i;
 				}
 				--nr_from;
@@ -649,7 +635,8 @@
 	}
 
 	gettimeofday(&t_start, NULL);
-	nr_migrated = syscall(__NR_migrate_pages, getpid(), nr_from, fromids, toids);
+	nr_migrated =
+	    syscall(__NR_migrate_pages, getpid(), nr_from, fromids, toids);
 	if (nr_migrated < 0) {
 		int err = errno;
 		fprintf(stderr, "%s: migrate_pages failed - %s\n",
@@ -658,8 +645,8 @@
 	}
 	gettimeofday(&t_end, NULL);
 	printf("%s:  migrated %d pages in %6.3fsecs\n",
-		gcp->program_name, nr_migrated,
-		(float)(tv_diff_usec(&t_start, &t_end))/1000000.0);
+	       gcp->program_name, nr_migrated,
+	       (float)(tv_diff_usec(&t_start, &t_end)) / 1000000.0);
 	ret = CMD_SUCCESS;
 
 out_free:
@@ -668,8 +655,7 @@
 	return ret;
 }
 
-static int
-show_seg(char *args)
+static int show_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -688,14 +674,13 @@
 /*
  * anon_seg:  <seg-name> <size>[kmgp] [private|shared]
  */
-static int
-anon_seg(char *args)
+static int anon_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
-	char    *segname, *nextarg;
-	range_t  range = { 0L, 0L };
-	int      segflag = 0;
+	char *segname, *nextarg;
+	range_t range = { 0L, 0L };
+	int segflag = 0;
 
 	args += strspn(args, whitespace);
 
@@ -727,14 +712,13 @@
 /*
  * file_seg:  <path-name> [<offset>[kmgp] <length>[kmgp]  [private|shared]]
  */
-static int
-file_seg(char *args)
+static int file_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
 	char *pathname, *nextarg;
 	range_t range = { 0L, 0L };
-	int  segflag = MAP_PRIVATE;
+	int segflag = MAP_PRIVATE;
 
 	args += strspn(args, whitespace);
 
@@ -765,8 +749,7 @@
 /*
  * remove_seg:  <seg-name> [<seg-name> ...]
  */
-static int
-remove_seg(char *args)
+static int remove_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -788,8 +771,7 @@
 /*
  * touch_seg:  <seg-name> [<offset> <length>] [read|write]
  */
-static int
-touch_seg(char *args)
+static int touch_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -814,7 +796,7 @@
 	if (axcs == 0)
 		return CMD_ERROR;
 
-	if (!segment_touch(segname, &range, axcs-1))
+	if (!segment_touch(segname, &range, axcs - 1))
 		return CMD_ERROR;
 
 	return CMD_SUCCESS;
@@ -823,8 +805,7 @@
 /*
  * unmap <seg-name> - unmap specified segment, but remember name/size/...
  */
-static int
-unmap_seg(char *args)
+static int unmap_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 	char *segname, *nextarg;
@@ -844,15 +825,14 @@
 /*
  * map <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] [<seg-share>]
  */
-static int
-map_seg(char *args)
+static int map_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
-	char    *segname, *nextarg;
-	range_t  range = { 0L, 0L };
+	char *segname, *nextarg;
+	range_t range = { 0L, 0L };
 	range_t *rangep = NULL;
-	int      segflag = MAP_PRIVATE;
+	int segflag = MAP_PRIVATE;
 
 	args += strspn(args, whitespace);
 	if (!required_arg(args, "<seg-name>"))
@@ -885,16 +865,15 @@
 /*
  * mbind <seg-name> [<offset>[kmgp] <length>[kmgp]] <policy> <node-list>
  */
-static int
-mbind_seg(char *args)
+static int mbind_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
-	char       *segname, *nextarg;
-	range_t     range = { 0L, 0L };
+	char *segname, *nextarg;
+	range_t range = { 0L, 0L };
 	nodemask_t *nodemask = NULL;
-	int         policy, flags = 0;
-	int         ret;
+	int policy, flags = 0;
+	int ret;
 
 	if (!numa_supported())
 		return CMD_ERROR;
@@ -935,7 +914,7 @@
 	}
 
 	ret = CMD_SUCCESS;
-#if 1	// for testing
+#if 1				// for testing
 	if (!segment_mbind(segname, &range, policy, nodemask, flags))
 		ret = CMD_ERROR;
 #endif
@@ -949,8 +928,7 @@
  *  shmem_seg - create [shmget] and register a SysV shared memory segment
  *              of specified size
  */
-static int
-shmem_seg(char *args)
+static int shmem_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -987,14 +965,13 @@
  * rather than the entire segment.  Suitable for a "quick look" at where
  * segment resides.
  */
-static int
-where_seg(char *args)
+static int where_seg(char *args)
 {
 	glctx_t *gcp = &glctx;
 
-	char  *segname, *nextarg;
+	char *segname, *nextarg;
 	range_t range = { 0L, 0L };
-	int    ret;
+	int ret;
 
 	if (!numa_supported())
 		return CMD_ERROR;
@@ -1020,8 +997,7 @@
 }
 
 #if 0
-static int
-command(char *args)
+static int command(char *args)
 {
 	glctx_t *gcp = &glctx;
 
@@ -1032,173 +1008,106 @@
 /*
  * =========================================================================
  */
-typedef int (*cmd_func_t)(char *);
+typedef int (*cmd_func_t) (char *);
 
 struct command {
-	char       *cmd_name;
-	cmd_func_t  cmd_func;    /* */
-	char       *cmd_help;
+	char *cmd_name;
+	cmd_func_t cmd_func;	/* */
+	char *cmd_help;
 
 } cmd_table[] = {
 	{
-		.cmd_name="quit",
-		.cmd_func=quit,
-		.cmd_help=
-			"quit           - just what you think\n"
-			"\tEOF on stdin has the same effect\n"
-	},
+	.cmd_name = "quit",.cmd_func = quit,.cmd_help =
+		    "quit           - just what you think\n"
+		    "\tEOF on stdin has the same effect\n"}, {
+	.cmd_name = "help",.cmd_func = help_me,.cmd_help =
+		    "help           - show this help\n"
+		    "help <command> - display help for just <command>\n"}, {
+	.cmd_name = "pid",.cmd_func = show_pid,.cmd_help =
+		    "pid            - show process id of this session\n"}, {
+	.cmd_name = "pause",.cmd_func = pause_me,.cmd_help =
+		    "pause          - pause program until signal"
+		    " -- e.g., INT, USR1\n"}, {
+	.cmd_name = "numa",.cmd_func = numa_info,.cmd_help =
+		    "numa          - display numa info as seen by this program.\n"
+		    "\tshows nodes from which program may allocate memory\n"
+		    "\twith total and free memory.\n"}, {
+	.cmd_name = "migrate",.cmd_func = migrate_process,.cmd_help =
+		    "migrate <to-node-id[s]> [<from-node-id[s]>] - \n"
+		    "\tmigrate this process' memory from <from-node-id[s]>\n"
+		    "\tto <to-node-id[s]>.  Specify multiple node ids as a\n"
+		    "\tcomma-separated list. TODO - more info\n"}, {
+	.cmd_name = "show",.cmd_func = show_seg,.cmd_help =
+		    "show [<name>]  - show info for segment[s]; default all\n"},
 	{
-		.cmd_name="help",
-		.cmd_func=help_me,
-		.cmd_help=
-			"help           - show this help\n"
-			"help <command> - display help for just <command>\n"
-	},
+	.cmd_name = "anon",.cmd_func = anon_seg,.cmd_help =
+		    "anon <seg-name> <seg-size>[k|m|g|p] [<seg-share>] -\n"
+		    "\tdefine a MAP_ANONYMOUS segment of specified size\n"
+		    "\t<seg-share> := private|shared - default = private\n"}, {
+	.cmd_name = "file",.cmd_func = file_seg,.cmd_help =
+		    "file <pathname> [<offset>[k|m|g|p] <length>[k|m|g|p]] [<seg-share>] -\n"
+		    "\tdefine a mapped file segment of specified length starting at the\n"
+		    "\tspecified offset into the file.  <offset> and <length> may be\n"
+		    "\tomitted and specified on the map command.\n"
+		    "\t<seg-share> := private|shared - default = private\n"}, {
+	.cmd_name = "shm",.cmd_func = shmem_seg,.cmd_help =
+		    "shm <seg-name> <seg-size>[k|m|g|p] - \n"
+		    "\tdefine a shared memory segment of specified size.\n"
+		    "\tYou may need to increase limits [/proc/sys/kernel/shmmax].\n"
+		    "\tUse map/unmap to attach/detach\n"}, {
+	.cmd_name = "remove",.cmd_func = remove_seg,.cmd_help =
+		    "remove <seg-name> [<seg-name> ...] - remove the named segment[s]\n"},
 	{
-		.cmd_name="pid",
-		.cmd_func=show_pid,
-		.cmd_help=
-			"pid            - show process id of this session\n"
-	},
+	.cmd_name = "map",.cmd_func = map_seg,.cmd_help =
+		    "map <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] [<seg-share>] - \n"
+		    "\tmmap()/shmat() a previously defined, currently unmapped() segment.\n"
+		    "\t<offset> and <length> apply only to mapped files.\n"
+		    "\tUse <length> of '*' or '0' to map to the end of the file.\n"},
 	{
-		.cmd_name="pause",
-		.cmd_func=pause_me,
-		.cmd_help=
-			"pause          - pause program until signal"
-			" -- e.g., INT, USR1\n"
-	},
+	.cmd_name = "unmap",.cmd_func = unmap_seg,.cmd_help =
+		    "unmap <seg-name> - unmap specified segment, but remember name/size/...\n"},
 	{
-		.cmd_name="numa",
-		.cmd_func=numa_info,
-		.cmd_help=
-			"numa          - display numa info as seen by this program.\n"
-			"\tshows nodes from which program may allocate memory\n"
-			"\twith total and free memory.\n"
-	},
+	.cmd_name = "touch",.cmd_func = touch_seg,.cmd_help =
+		    "touch <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] [read|write] - \n"
+		    "\tread [default] or write the named segment from <offset> through\n"
+		    "\t<offset>+<length>.  If <offset> and <length> omitted, touches all\n"
+		    "\t of mapped segment.\n"}, {
+	.cmd_name = "mbind",.cmd_func = mbind_seg,.cmd_help =
+		    "mbind <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]]\n"
+		    "      <policy>[+move[+wait]] [<node/list>] - \n"
+		    "\tset the numa policy for the specified range of the name segment\n"
+		    "\tto policy --  one of {default, bind, preferred, interleaved}.\n"
+		    "\t<node/list> specifies a node id or a comma separated list of\n"
+		    "\tnode ids.  <node> is ignored for 'default' policy, and only\n"
+		    "\tthe first node is used for 'preferred' policy.\n"
+		    "\t'+move' specifies that currently allocated pages be prepared\n"
+		    "\t        for migration on next touch\n"
+		    "\t'+wait' [valid only with +move] specifies that pages mbind()\n"
+		    "          touch the pages and wait for migration before returning.\n"},
 	{
-		.cmd_name="migrate",
-		.cmd_func=migrate_process,
-		.cmd_help=
-			"migrate <to-node-id[s]> [<from-node-id[s]>] - \n"
-			"\tmigrate this process' memory from <from-node-id[s]>\n"
-			"\tto <to-node-id[s]>.  Specify multiple node ids as a\n"
-			"\tcomma-separated list. TODO - more info\n"
-	},
-
+	.cmd_name = "where",.cmd_func = where_seg,.cmd_help =
+		    "where <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] - \n"
+		    "\tshow the node location of pages in the specified range\n"
+		    "\tof the specified segment.  <offset> defaults to start of\n"
+		    "\tsegment; <length> defaults to 64 pages.\n"},
+#if 0				/* template for new commands */
 	{
-		.cmd_name="show",
-		.cmd_func=show_seg,
-		.cmd_help=
-			"show [<name>]  - show info for segment[s]; default all\n"
-	},
-	{
-		.cmd_name="anon",
-		.cmd_func=anon_seg,
-		.cmd_help=
-			"anon <seg-name> <seg-size>[k|m|g|p] [<seg-share>] -\n"
-			"\tdefine a MAP_ANONYMOUS segment of specified size\n"
-			"\t<seg-share> := private|shared - default = private\n"
-	},
-	{
-		.cmd_name="file",
-		.cmd_func=file_seg,
-		.cmd_help=
-			"file <pathname> [<offset>[k|m|g|p] <length>[k|m|g|p]] [<seg-share>] -\n"
-			"\tdefine a mapped file segment of specified length starting at the\n"
-			"\tspecified offset into the file.  <offset> and <length> may be\n"
-			"\tomitted and specified on the map command.\n"
-			"\t<seg-share> := private|shared - default = private\n"
-	},
-	{
-		.cmd_name="shm",
-		.cmd_func=shmem_seg,
-		.cmd_help=
-			"shm <seg-name> <seg-size>[k|m|g|p] - \n"
-			"\tdefine a shared memory segment of specified size.\n"
-			"\tYou may need to increase limits [/proc/sys/kernel/shmmax].\n"
-			"\tUse map/unmap to attach/detach\n"
-	},
-	{
-		.cmd_name="remove",
-		.cmd_func=remove_seg,
-		.cmd_help=
-			"remove <seg-name> [<seg-name> ...] - remove the named segment[s]\n"
-
-	},
-
-	{
-		.cmd_name="map",
-		.cmd_func=map_seg,
-		.cmd_help=
-			"map <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] [<seg-share>] - \n"
-			"\tmmap()/shmat() a previously defined, currently unmapped() segment.\n"
-			"\t<offset> and <length> apply only to mapped files.\n"
-			"\tUse <length> of '*' or '0' to map to the end of the file.\n"
-	},
-	{
-		.cmd_name="unmap",
-		.cmd_func=unmap_seg,
-		.cmd_help=
-			"unmap <seg-name> - unmap specified segment, but remember name/size/...\n"
-	},
-	{
-		.cmd_name="touch",
-		.cmd_func=touch_seg,
-		.cmd_help=
-			"touch <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] [read|write] - \n"
-			"\tread [default] or write the named segment from <offset> through\n"
-			"\t<offset>+<length>.  If <offset> and <length> omitted, touches all\n"
-			"\t of mapped segment.\n"
-	},
-	{
-		.cmd_name="mbind",
-		.cmd_func=mbind_seg,
-		.cmd_help=
-			"mbind <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]]\n"
-			"      <policy>[+move[+wait]] [<node/list>] - \n"
-			"\tset the numa policy for the specified range of the name segment\n"
-			"\tto policy --  one of {default, bind, preferred, interleaved}.\n"
-			"\t<node/list> specifies a node id or a comma separated list of\n"
-			"\tnode ids.  <node> is ignored for 'default' policy, and only\n"
-			"\tthe first node is used for 'preferred' policy.\n"
-			"\t'+move' specifies that currently allocated pages be prepared\n"
-			"\t        for migration on next touch\n"
-			"\t'+wait' [valid only with +move] specifies that pages mbind()\n"
-			"          touch the pages and wait for migration before returning.\n"
-	},
-	{
-		.cmd_name="where",
-		.cmd_func=where_seg,
-		.cmd_help=
-			"where <seg-name> [<offset>[k|m|g|p] <length>[k|m|g|p]] - \n"
-			"\tshow the node location of pages in the specified range\n"
-			"\tof the specified segment.  <offset> defaults to start of\n"
-			"\tsegment; <length> defaults to 64 pages.\n"
-	},
-
-#if 0 /* template for new commands */
-	{
-		.cmd_name="",
-		.cmd_func= ,
-		.cmd_help=
-	},
+	.cmd_name = "",.cmd_func =,.cmd_help =},
 #endif
 	{
-		.cmd_name=NULL
-	}
+	.cmd_name = NULL}
 };
 
-static int
-help_me(char *args)
+static int help_me(char *args)
 {
 	struct command *cmdp = cmd_table;
 	char *cmd, *nextarg;
-	int   cmdlen;
-	bool  match = false;
+	int cmdlen;
+	bool match = false;
 
 	args += strspn(args, whitespace);
 	if (*args != '\0') {
-		cmd    = strtok_r(args, whitespace, &nextarg);
+		cmd = strtok_r(args, whitespace, &nextarg);
 		cmdlen = strlen(cmd);
 	} else {
 		cmd = NULL;
@@ -1206,8 +1115,7 @@
 	}
 
 	for (cmdp = cmd_table; cmdp->cmd_name != NULL; ++cmdp) {
-		if (cmd == NULL ||
-				!strncmp(cmd, cmdp->cmd_name, cmdlen)) {
+		if (cmd == NULL || !strncmp(cmd, cmdp->cmd_name, cmdlen)) {
 			printf("%s\n", cmdp->cmd_help);
 			match = true;
 		}
@@ -1227,8 +1135,7 @@
  */
 #define CMDBUFSZ 256
 
-static bool
-unique_abbrev(char *cmd, size_t clen, struct command *cmdp)
+static bool unique_abbrev(char *cmd, size_t clen, struct command *cmdp)
 {
 	for (; cmdp->cmd_name != NULL; ++cmdp) {
 		if (!strncmp(cmd, cmdp->cmd_name, clen))
@@ -1237,8 +1144,7 @@
 	return true;
 }
 
-static int
-parse_command(char *cmdline)
+static int parse_command(char *cmdline)
 {
 	glctx_t *gcp = &glctx;
 	char *cmd, *args;
@@ -1254,7 +1160,7 @@
 
 		if (strncmp(cmd, cmdp->cmd_name, clen))
 			continue;
-		if (!unique_abbrev(cmd, clen, cmdp+1)) {
+		if (!unique_abbrev(cmd, clen, cmdp + 1)) {
 			fprintf(stderr, "%s:  ambiguous command:  %s\n",
 				gcp->program_name, cmd);
 			return CMD_ERROR;
@@ -1265,20 +1171,18 @@
 		return ret;
 	}
 
-	fprintf(stderr, "%s:  unrecognized command %s\n",
-		__FUNCTION__, cmd);
+	fprintf(stderr, "%s:  unrecognized command %s\n", __FUNCTION__, cmd);
 	return CMD_ERROR;
 }
 
-void
-process_commands()
+void process_commands()
 {
 	glctx_t *gcp = &glctx;
 
 	char cmdbuf[CMDBUFSZ];
 
 	do {
-		char  *cmdline;
+		char *cmdline;
 		size_t cmdlen;
 
 		if (is_option(INTERACTIVE))
@@ -1287,8 +1191,8 @@
 		cmdline = fgets(cmdbuf, CMDBUFSZ, stdin);
 		if (cmdline == NULL) {
 			printf("%s\n",
-				 is_option(INTERACTIVE) ? "" : "EOF on stdin");
-			exit(0);		/* EOF */
+			       is_option(INTERACTIVE) ? "" : "EOF on stdin");
+			exit(0);	/* EOF */
 		}
 		if (cmdline[0] == '\n')
 			continue;
@@ -1297,11 +1201,11 @@
 		 * trim trailing newline, if any
 		 */
 		cmdlen = strlen(cmdline);
-		if (cmdline[cmdlen-1] == '\n')
+		if (cmdline[cmdlen - 1] == '\n')
 			cmdline[--cmdlen] = '\0';
 
 		cmdline += strspn(cmdline, whitespace);
-		cmdlen  -= (cmdline - cmdbuf);
+		cmdlen -= (cmdline - cmdbuf);
 
 		if (cmdlen == 0) {
 			//TODO:  interactive help?
@@ -1314,7 +1218,7 @@
 		/*
 		 * trim trailing whitespace for ease of parsing
 		 */
-		while (strchr(whitespace, cmdline[cmdlen-1]))
+		while (strchr(whitespace, cmdline[cmdlen - 1]))
 			cmdline[--cmdlen] = '\0';
 
 		if (cmdlen == 0)
@@ -1326,7 +1230,7 @@
 		 */
 		if (signalled(gcp)) {
 			if (!is_option(INTERACTIVE) &&
-			   gcp->siginfo->si_signo == SIGQUIT)
+			    gcp->siginfo->si_signo == SIGQUIT)
 				exit(0);
 			reset_signal();
 		}
diff --git a/testcases/kernel/hotplug/memory_hotplug/memtoy.c b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
index 21e3a3e..1a96d91 100644
--- a/testcases/kernel/hotplug/memory_hotplug/memtoy.c
+++ b/testcases/kernel/hotplug/memory_hotplug/memtoy.c
@@ -42,7 +42,7 @@
 /*
  * global context
  */
-glctx_t glctx;	/* global context */
+glctx_t glctx;			/* global context */
 
 /*
  * command line options:
@@ -56,8 +56,7 @@
 /*
  * usage/help message
  */
-char *USAGE =
-"\nUsage:  %s [-v] [-V] [-{h|x}]\n\n\
+char *USAGE = "\nUsage:  %s [-v] [-V] [-{h|x}]\n\n\
 Where:\n\
 \t-v            enable verbosity\n\
 \t-V            display version info\n\
@@ -72,8 +71,7 @@
  *	   error string.  Print error string after app error message.
  *	   Then exit with abs(exit_code).
  */
-void
-die(int exit_code, char *format, ... )
+void die(int exit_code, char *format, ...)
 {
 	va_list ap;
 	char *errstr;
@@ -86,17 +84,17 @@
 		errstr = strerror(errno);
 	}
 
-	(void) vfprintf(stderr, format, ap);
+	(void)vfprintf(stderr, format, ap);
 	va_end(ap);
 
 	if (exit_code < 0)
-		fprintf(stderr,"Error = (%d) %s\n", saverrno, errstr);
+		fprintf(stderr, "Error = (%d) %s\n", saverrno, errstr);
 
 	exit(abs(exit_code));
 }
 
-void
-usage(char *mesg) {
+void usage(char *mesg)
+{
 	if (mesg != NULL) {
 		fprintf(stderr, "%s\n", mesg);
 	}
@@ -110,8 +108,7 @@
  * can use the DPRINTF(<flag>, (<[f]printf arguments>)) macro for debug
  * prints.  See the definition of DPRINTF in XXX.h
  */
-int
-_dvprintf(char *format, ...)
+int _dvprintf(char *format, ...)
 {
 	va_list ap;
 	int retval;
@@ -123,12 +120,11 @@
 	va_end(ap);
 
 	fflush(stderr);
-	return(retval);
+	return (retval);
 }
 #endif
 
-void
-vprint(char *format, ...)
+void vprint(char *format, ...)
 {
 	va_list ap;
 	glctx_t *gcp = &glctx;
@@ -150,15 +146,13 @@
 /*
  * =========================================================================
  */
-static int signals_to_handle[] =
-{
-	SIGINT,  SIGQUIT, SIGSEGV, SIGBUS,
+static int signals_to_handle[] = {
+	SIGINT, SIGQUIT, SIGSEGV, SIGBUS,
 	SIGUSR1, SIGUSR2, 0
 };
 
-static char *sig_names[] =
-{
-	"SIGINT",  "SIGQUIT", "SIGSEGV", "SIGBUS",
+static char *sig_names[] = {
+	"SIGINT", "SIGQUIT", "SIGSEGV", "SIGBUS",
 	"SIGUSR1", "SIGUSR2", "unknown", 0
 };
 
@@ -167,11 +161,10 @@
  *
  * save siginfo and name in global context
  */
-void
-signal_handler(int sig, siginfo_t *info, void *vcontext)
+void signal_handler(int sig, siginfo_t * info, void *vcontext)
 {
 	glctx_t *gcp = &glctx;
-	int isig=0, *sigp = signals_to_handle;
+	int isig = 0, *sigp = signals_to_handle;
 	static siginfo_t infocopy;
 
 	/*
@@ -179,14 +172,15 @@
 	 * Note, additional signals, before use, can overwrite
 	 */
 	infocopy = *info;
-	gcp->siginfo   = &infocopy;
+	gcp->siginfo = &infocopy;
 
 	while (*sigp) {
 		if (*sigp == sig)
 			break;
-		++isig; ++sigp;
+		++isig;
+		++sigp;
 	}
-	gcp->signame   = sig_names[isig];
+	gcp->signame = sig_names[isig];
 
 	vprint("signal hander entered for sig %s\n", gcp->signame);
 
@@ -199,7 +193,7 @@
 		}
 
 		die(8, "\n%s:  signal %s, but siglongjmp not armed\n",
-		       gcp->program_name, gcp->signame);
+		    gcp->program_name, gcp->signame);
 		break;
 
 	case SIGINT:
@@ -208,7 +202,7 @@
 
 	default:
 		die(8, "\n%s:  Unexpected signal:  %d\n",
-		        gcp->program_name, sig);
+		    gcp->program_name, sig);
 		break;
 	}
 }
@@ -218,8 +212,7 @@
  *
  * Setup signal dispositions to catch selected signals
  */
-void
-set_signals()
+void set_signals()
 {
 	glctx_t *gcp = &glctx;
 	int *sigp = signals_to_handle;
@@ -227,7 +220,7 @@
 
 	struct sigaction act = {
 		.sa_sigaction = signal_handler,
-		.sa_flags	 = SA_SIGINFO
+		.sa_flags = SA_SIGINFO
 	};
 
 	(void)sigfillset(&(act.sa_mask));
@@ -238,38 +231,37 @@
 
 		if (0 != sigaction(sig, &act, NULL)) {
 			die(-1, "%s: Failed to set sigaction for %s\n",
-			        gcp->program_name, sig_name);
+			    gcp->program_name, sig_name);
 		} else
 #if 0
 			vprint("%s: established handler for %s\n",
-			        gcp->program_name, sig_name)
+			       gcp->program_name, sig_name)
 #endif
-			;
+			    ;
 	}
 
-		return;
+	return;
 }
 
-void
-reset_signal(void)
+void reset_signal(void)
 {
 //TODO:  free siginfo if/when malloc'd
 	glctx.siginfo = NULL;
-	glctx.sigjmp  = false;
+	glctx.sigjmp = false;
 }
 
-void
-wait_for_signal(const char *mesg)
+void wait_for_signal(const char *mesg)
 {
-	printf("%s ... ", mesg); fflush(stdout);
+	printf("%s ... ", mesg);
+	fflush(stdout);
 	pause();
 	vprint("%s: wakened by signal %s\n", __FUNCTION__, glctx.signame);
 	reset_signal();
-	printf("\n"); fflush(stdout);
+	printf("\n");
+	fflush(stdout);
 }
 
-void
-show_siginfo()
+void show_siginfo()
 {
 	glctx_t *gcp = &glctx;
 	siginfo_t *info = gcp->siginfo;
@@ -324,19 +316,18 @@
  * =========================================================================
  */
 
-void
-touch_memory(bool rw, unsigned long *memp, size_t memlen)
+void touch_memory(bool rw, unsigned long *memp, size_t memlen)
 {
 	glctx_t *gcp = &glctx;
 
-	unsigned long  *memend, *pp, sink;
-	unsigned long longs_in_page = gcp->pagesize / sizeof (unsigned long);
+	unsigned long *memend, *pp, sink;
+	unsigned long longs_in_page = gcp->pagesize / sizeof(unsigned long);
 
-	memend = memp + memlen/sizeof(unsigned long);
+	memend = memp + memlen / sizeof(unsigned long);
 	vprint("!!!%s from 0x%lx thru 0x%lx\n",
-		rw ? "Writing" : "Reading", memp, memend);
+	       rw ? "Writing" : "Reading", memp, memend);
 
-	for (pp = memp; pp < memend;  pp += longs_in_page) {
+	for (pp = memp; pp < memend; pp += longs_in_page) {
 		// vprint("%s:  touching 0x%lx\n", __FUNCTION__, pp);
 		if (!sigsetjmp(gcp->sigjmp_env, true)) {
 			gcp->sigjmp = true;
@@ -370,13 +361,12 @@
  * =========================================================================
  */
 
-void
-init_glctx(glctx_t *gcp)
+void init_glctx(glctx_t * gcp)
 {
 
 	bzero(gcp, sizeof(glctx_t));
 
-	gcp->pagesize = (size_t)sysconf(_SC_PAGESIZE);
+	gcp->pagesize = (size_t) sysconf(_SC_PAGESIZE);
 
 	if (numa_available() >= 0) {
 		gcp->numa_max_node = numa_max_node();
@@ -393,23 +383,21 @@
 /*
  * cleanup() - at exit cleanup routine
  */
-static void
-cleanup()
+static void cleanup()
 {
 	glctx_t *gcp = &glctx;
 
 	segment_cleanup(gcp);
-} /* cleanup() */
+}				/* cleanup() */
 
-int
-parse_command_line_args(int argc, char *argv[])
+int parse_command_line_args(int argc, char *argv[])
 {
 	extern int optind;
 	extern char *optarg;
 
 	glctx_t *gcp = &glctx;
-	int  argval;
-	int  error = 0;
+	int argval;
+	int error = 0;
 
 	char c;
 
@@ -434,8 +422,8 @@
 			break;
 
 		case 'V':
-			printf ("memtoy " MEMTOY_VERSION " built "
-			         __DATE__ " @ " __TIME__  "\n");
+			printf("memtoy " MEMTOY_VERSION " built "
+			       __DATE__ " @ " __TIME__ "\n");
 			exit(0);
 			break;
 
@@ -444,7 +432,7 @@
 			argval = strtoul(optarg, &next, 0);
 			if (*next != '\0') {
 				fprintf(stderr,
-				    "-D <debug-mask> must be unsigned hex/decimal integer\n");
+					"-D <debug-mask> must be unsigned hex/decimal integer\n");
 				++error;
 			} else
 				gcp->debug = argval;
@@ -452,17 +440,16 @@
 #endif
 
 		default:
-			error=1;
+			error = 1;
 			break;
 		}
 	}
 done:
 
-	return(error);
+	return (error);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	glctx_t *gcp = &glctx;
 	bool user_is_super;
@@ -483,7 +470,7 @@
 
 	error = parse_command_line_args(argc, argv);
 
-	if (error /* || argc==1 */) {
+	if (error /* || argc==1 */ ) {
 		usage(NULL);
 
 	}
@@ -495,7 +482,7 @@
 	vprint("%s:  pagesize = %d\n", gcp->program_name, gcp->pagesize);
 	if (gcp->numa_max_node >= 0)
 		vprint("%s:  NUMA available - max node: %d\n",
-			gcp->program_name, gcp->numa_max_node);
+		       gcp->program_name, gcp->numa_max_node);
 
 	set_signals();
 
@@ -504,9 +491,10 @@
 	return 0;
 
 }
-#else	/* ! (HAVE_NUMA_H && HAVE_NUMAIF_H) */
-int main(void) {
+#else /* ! (HAVE_NUMA_H && HAVE_NUMAIF_H) */
+int main(void)
+{
 	printf("System doesn't have required numa support.\n");
 	return 0;
 }
-#endif	/* HAVE_NUMA_H && HAVE_NUMAIF_H */
+#endif /* HAVE_NUMA_H && HAVE_NUMAIF_H */
diff --git a/testcases/kernel/hotplug/memory_hotplug/segment.c b/testcases/kernel/hotplug/memory_hotplug/segment.c
index 2804801..510eaae 100644
--- a/testcases/kernel/hotplug/memory_hotplug/segment.c
+++ b/testcases/kernel/hotplug/memory_hotplug/segment.c
@@ -50,23 +50,23 @@
 #include "segment.h"
 
 struct segment {
-	char         *seg_name;
-	void         *seg_start;
-	size_t        seg_length;
+	char *seg_name;
+	void *seg_start;
+	size_t seg_length;
 
-	off_t         seg_offset;       /* memory mapped files */
-	char         *seg_path;	        /*   "      "      "   */
+	off_t seg_offset;	/* memory mapped files */
+	char *seg_path;		/*   "      "      "   */
 
-	seg_type_t    seg_type;
-	int           seg_slot;
-	int           seg_flags;        /* shared|private */
-	int           seg_prot;
-	int           seg_fd;           /* saved file descriptor */
-	int           seg_shmid;
+	seg_type_t seg_type;
+	int seg_slot;
+	int seg_flags;		/* shared|private */
+	int seg_prot;
+	int seg_fd;		/* saved file descriptor */
+	int seg_shmid;
 
 };
 
-#define MAX_SEGMENTS 63   /* arbitrary max */
+#define MAX_SEGMENTS 63		/* arbitrary max */
 #define SEG_FD_NONE (-1)
 #define SHM_ID_NONE (-1)
 
@@ -78,25 +78,22 @@
 /*
  * =========================================================================
  */
-void
-segment_init(struct global_context *gcp)
+void segment_init(struct global_context *gcp)
 {
 	/*
 	 * one extra slot to terminate the list
 	 */
-	gcp->seglist = calloc(MAX_SEGMENTS+1, sizeof(segment_t *));
+	gcp->seglist = calloc(MAX_SEGMENTS + 1, sizeof(segment_t *));
 	if (!gcp->seglist)
-		die(4,"%s: can't alloc segment table\n",
-			gcp->program_name);
+		die(4, "%s: can't alloc segment table\n", gcp->program_name);
 	gcp->seg_avail = NULL;
 
 }
 
-static segment_t *
-new_segment(void)
+static segment_t *new_segment(void)
 {
-	glctx_t   *gcp = &glctx;
-	segment_t *segp = (segment_t *)calloc(1, sizeof(segment_t));
+	glctx_t *gcp = &glctx;
+	segment_t *segp = (segment_t *) calloc(1, sizeof(segment_t));
 
 	if (segp == NULL)
 		fprintf(stderr, "%s:  failed to allocate segment\n",
@@ -107,10 +104,9 @@
 /*
  * get_seg_slot() -- allocate a segment table slot for a new segment
  */
-static segment_t *
-get_seg_slot(void)
+static segment_t *get_seg_slot(void)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp, **segpp;
 
 	/*
@@ -140,11 +136,10 @@
 	}
 
 	fprintf(stderr, "%s:  segment table full\n", gcp->program_name);
-	return (segment_t *)NULL;
+	return (segment_t *) NULL;
 }
 
-static void
-unmap_segment(segment_t *segp)
+static void unmap_segment(segment_t * segp)
 {
 
 	if (segp->seg_start == MAP_FAILED)
@@ -173,11 +168,10 @@
  * and removing shm segment, if necessary
  * clear out the segment, but preserve slot #
  */
-static void
-free_seg_slot(segment_t *segp)
+static void free_seg_slot(segment_t * segp)
 {
-	glctx_t   *gcp = &glctx;
-	int        slot = segp->seg_slot;
+	glctx_t *gcp = &glctx;
+	int slot = segp->seg_slot;
 
 	if (segp->seg_name != NULL)
 		free(segp->seg_name);
@@ -185,12 +179,10 @@
 	if (segp->seg_path != NULL)
 		free(segp->seg_path);
 
-	if (segp->seg_type == SEGT_FILE &&
-	    segp->seg_fd != SEG_FD_NONE)
+	if (segp->seg_type == SEGT_FILE && segp->seg_fd != SEG_FD_NONE)
 		close(segp->seg_fd);
 
-	if (segp->seg_type == SEGT_SHM &&
-	    segp->seg_shmid != SHM_ID_NONE)
+	if (segp->seg_type == SEGT_SHM && segp->seg_shmid != SHM_ID_NONE)
 		shmctl(segp->seg_shmid, IPC_RMID, NULL);
 
 	(void)memset(segp, 0, sizeof(*segp));
@@ -205,8 +197,7 @@
  * called from memtoy "at exit" cleanup().
  * primarily to remove any shm segments created.
  */
-void
-segment_cleanup(struct global_context *gcp)
+void segment_cleanup(struct global_context *gcp)
 {
 	segment_t *segp, **segpp;
 
@@ -222,21 +213,19 @@
 	}
 }
 
-static size_t
-round_up_to_pagesize(size_t size)
+static size_t round_up_to_pagesize(size_t size)
 {
 	glctx_t *gcp = &glctx;
-	size_t  pagemask = gcp->pagesize - 1;
+	size_t pagemask = gcp->pagesize - 1;
 
-	return ((size + pagemask ) & ~pagemask);
+	return ((size + pagemask) & ~pagemask);
 
 }
 
-static size_t
-round_down_to_pagesize(size_t size)
+static size_t round_down_to_pagesize(size_t size)
 {
 	glctx_t *gcp = &glctx;
-	size_t  pagemask = gcp->pagesize - 1;
+	size_t pagemask = gcp->pagesize - 1;
 
 	return (size & ~pagemask);
 
@@ -246,12 +235,11 @@
  * get_node() -- fetch numa node id of page at vaddr
  * [from Ray Bryant's [SGI] memory migration tests]
  */
-static int
-get_node(void *vaddr)
+static int get_node(void *vaddr)
 {
 	int rc, node;
 
-	rc = get_mempolicy(&node, NULL, 0, vaddr, MPOL_F_NODE|MPOL_F_ADDR);
+	rc = get_mempolicy(&node, NULL, 0, vaddr, MPOL_F_NODE | MPOL_F_ADDR);
 	if (rc)
 		return -1;
 
@@ -261,22 +249,18 @@
 /*
  * =========================================================================
  */
-static int
-map_anon_segment(segment_t *segp)
+static int map_anon_segment(segment_t * segp)
 {
 	glctx_t *gcp = &glctx;
 
 	char *memp;
-	int   flags = segp->seg_flags;
+	int flags = segp->seg_flags;
 
 	if (!flags)
 		flags = MAP_PRIVATE;	/* default */
 
-	memp = (char *)mmap(0, segp->seg_length,
-	                    segp->seg_prot,
-	                    flags|MAP_ANONYMOUS,
-	                    0,              /* fd -- ignored */
-	                    0);              /* offset -- ignored */
+	memp = (char *)mmap(0, segp->seg_length, segp->seg_prot, flags | MAP_ANONYMOUS, 0,	/* fd -- ignored */
+			    0);	/* offset -- ignored */
 
 	if (memp == MAP_FAILED) {
 		int err = errno;
@@ -286,8 +270,8 @@
 	}
 
 	vprint("%s:  mmap()ed anon seg %s at 0x%lx-0x%lx\n",
-		gcp->program_name, segp->seg_name,
-		memp, memp+segp->seg_length-1);
+	       gcp->program_name, segp->seg_name,
+	       memp, memp + segp->seg_length - 1);
 
 	segp->seg_start = memp;
 
@@ -298,8 +282,7 @@
  * open_file() -- open and validate file when registering a file segment.
  * remember fd in segment struct.
  */
-static int
-open_file(segment_t *segp)
+static int open_file(segment_t * segp)
 {
 	glctx_t *gcp = &glctx;
 
@@ -309,8 +292,7 @@
 	if (stat(segp->seg_path, &stbuf) < 0) {
 		int err = errno;
 		fprintf(stderr, "%s:  can't stat %s - %s\n",
-			gcp->program_name, segp->seg_path,
-			strerror(err));
+			gcp->program_name, segp->seg_path, strerror(err));
 		free_seg_slot(segp);
 		return SEG_ERR;
 	}
@@ -329,7 +311,7 @@
 	 * Open file with maximal privileges;  adjust segment mapping
 	 * protections if permissions don't allow full R/W access.
 	 */
-	if (!access(segp->seg_path, R_OK|W_OK))
+	if (!access(segp->seg_path, R_OK | W_OK))
 		flags = O_RDWR;
 	else if (!access(segp->seg_path, R_OK)) {
 		flags = O_RDONLY;
@@ -348,8 +330,7 @@
 	if (fd < 0) {
 		int err = errno;
 		fprintf(stderr, "%s:  can't open %s - %s\n",
-			gcp->program_name, segp->seg_path,
-			strerror(err));
+			gcp->program_name, segp->seg_path, strerror(err));
 		free_seg_slot(segp);
 		return SEG_ERR;
 	}
@@ -361,8 +342,7 @@
 /*
  * re-fetch file size at map time -- just in case it's changed
  */
-static size_t
-file_size(int fd)
+static size_t file_size(int fd)
 {
 	struct stat stbuf;
 
@@ -376,15 +356,14 @@
 /*
  * map_file_segment() -- map a [range of a] registered file segment.
  */
-static int
-map_file_segment(segment_t *segp)
+static int map_file_segment(segment_t * segp)
 {
 	glctx_t *gcp = &glctx;
 
 	char *memp;
 	size_t size;
 	int fd;
-	int   flags = segp->seg_flags;
+	int flags = segp->seg_flags;
 
 	if (!flags)
 		flags = MAP_PRIVATE;	/* default */
@@ -403,22 +382,18 @@
 	segp->seg_offset = round_down_to_pagesize(segp->seg_offset);
 	if (segp->seg_offset > size) {
 		fprintf(stderr, "%s: offset 0x%lx beyond end of file %s\n",
-			gcp->program_name, segp->seg_offset,
-			segp->seg_path);
+			gcp->program_name, segp->seg_offset, segp->seg_path);
 		return SEG_ERR;
 	}
 
 	if (segp->seg_length == 0)
 		segp->seg_length = round_up_to_pagesize(size) -
-					segp->seg_offset;
+		    segp->seg_offset;
 	else
 		segp->seg_length = round_up_to_pagesize(segp->seg_length);
 
 	memp = (char *)mmap(0, segp->seg_length,
-	                    segp->seg_prot,
-	                    flags,
-	                    fd,
-	                    segp->seg_offset);
+			    segp->seg_prot, flags, fd, segp->seg_offset);
 
 	if (memp == MAP_FAILED) {
 		int err = errno;
@@ -428,8 +403,8 @@
 	}
 
 	vprint("%s:  mmap()ed file seg %s at 0x%lx-0x%lx\n",
-		gcp->program_name, segp->seg_name,
-		memp, memp+segp->seg_length-1);
+	       gcp->program_name, segp->seg_name,
+	       memp, memp + segp->seg_length - 1);
 
 	segp->seg_start = memp;
 
@@ -439,34 +414,31 @@
 /*
  * get_shm_segment() -- create [shmget] a new shared memory segment
  */
-static int
-get_shm_segment(segment_t *segp)
+static int get_shm_segment(segment_t * segp)
 {
 	glctx_t *gcp = &glctx;
 
 	int shmid;
 
-	shmid = shmget(IPC_PRIVATE, segp->seg_length, SHM_R|SHM_W);
+	shmid = shmget(IPC_PRIVATE, segp->seg_length, SHM_R | SHM_W);
 	if (shmid == -1) {
 		int err = errno;
 		fprintf(stderr, "%s:  failed to get shm segment %s - %s\n",
-			gcp->program_name, segp->seg_name,
-			strerror(err));
+			gcp->program_name, segp->seg_name, strerror(err));
 		free_seg_slot(segp);
 		return SEG_ERR;
 	}
 
 	segp->seg_shmid = shmid;
 	vprint("%s:  shm seg %s id:  %d\n",
-		gcp->program_name, segp->seg_name, segp->seg_shmid);
+	       gcp->program_name, segp->seg_name, segp->seg_shmid);
 	return SEG_OK;
 }
 
 /*
  * map_shm_segment() -- attach [shmat] a shared memory segment
  */
-static int
-map_shm_segment(segment_t *segp)
+static int map_shm_segment(segment_t * segp)
 {
 	glctx_t *gcp = &glctx;
 
@@ -474,14 +446,13 @@
 	if (segp->seg_start == MAP_FAILED) {
 		int err = errno;
 		fprintf(stderr, "%s:  failed to attach shm segment %s: %s\n",
-			gcp->program_name, segp->seg_name,
-			strerror(err));
+			gcp->program_name, segp->seg_name, strerror(err));
 		return SEG_ERR;
 	}
 
 	vprint("%s:  mmap()ed shm seg %s at 0x%lx-0x%lx\n",
-		gcp->program_name, segp->seg_name,
-		segp->seg_start, segp->seg_start+segp->seg_length-1);
+	       gcp->program_name, segp->seg_name,
+	       segp->seg_start, segp->seg_start + segp->seg_length - 1);
 
 	return SEG_OK;
 }
@@ -494,10 +465,9 @@
  * segment_get(name) - lookup named segment
 TODO:  move to segment private functions?
  */
-segment_t *
-segment_get(char *name)
+segment_t *segment_get(char *name)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp, **segpp;
 
 	for (segpp = gcp->seglist; (segp = *segpp); ++segpp) {
@@ -510,8 +480,7 @@
 			return segp;
 	}
 
-	if (gcp->seg_avail == NULL &&
-		segpp < &gcp->seglist[MAX_SEGMENTS]) {
+	if (gcp->seg_avail == NULL && segpp < &gcp->seglist[MAX_SEGMENTS]) {
 		/*
 		 * prealloc an available segment
 		 */
@@ -522,7 +491,7 @@
 		}
 	}
 
-	return (segment_t *)NULL;
+	return (segment_t *) NULL;
 }
 
 /*
@@ -532,12 +501,11 @@
  *
  * returns: !0 on success; 0 on failure
  */
-int
-segment_register(seg_type_t type, char *name, range_t *range, int flags)
+int segment_register(seg_type_t type, char *name, range_t * range, int flags)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp;
-	char      *path;
+	char *path;
 
 	segp = segment_get(basename(name));	/* ensure unique name */
 	if (segp != NULL) {
@@ -551,15 +519,15 @@
 		return SEG_ERR;
 
 	path = strdup(name);	/* save a copy */
-	segp->seg_name   = strdup(basename(name));
-	segp->seg_start  = MAP_FAILED;
+	segp->seg_name = strdup(basename(name));
+	segp->seg_start = MAP_FAILED;
 	segp->seg_length = round_up_to_pagesize(range->length);
 	segp->seg_offset = round_down_to_pagesize(range->offset);
-	segp->seg_type   = type;
-	segp->seg_flags  = flags;			/* possibly 0 */
-	segp->seg_prot   = PROT_READ|PROT_WRITE;	/* default */
-	segp->seg_fd     = SEG_FD_NONE;
-	segp->seg_shmid  = SHM_ID_NONE;
+	segp->seg_type = type;
+	segp->seg_flags = flags;	/* possibly 0 */
+	segp->seg_prot = PROT_READ | PROT_WRITE;	/* default */
+	segp->seg_fd = SEG_FD_NONE;
+	segp->seg_shmid = SHM_ID_NONE;
 
 	switch (type) {
 	case SEGT_ANON:
@@ -583,17 +551,16 @@
 }
 
 static char *segment_header =
-"  _____address______ ____length____ ____offset____ prot  share  name\n";
+    "  _____address______ ____length____ ____offset____ prot  share  name\n";
 
 static char seg_type[] = { '.', 'a', 'f', 's' };
 
-static int
-show_one_segment(segment_t *segp, bool header)
+static int show_one_segment(segment_t * segp, bool header)
 {
 	char *protection, *share, *name;
 
-	switch (segp->seg_prot & (PROT_READ|PROT_WRITE)) {
-	case PROT_READ|PROT_WRITE:
+	switch (segp->seg_prot & (PROT_READ | PROT_WRITE)) {
+	case PROT_READ | PROT_WRITE:
 		protection = "rw";
 		break;
 
@@ -622,17 +589,15 @@
 
 	if (segp->seg_start != MAP_FAILED) {
 		printf("%c 0x%p 0x%012lx 0x%012lx  %s  %s %s\n",
-			seg_type[segp->seg_type],
-			segp->seg_start,
-			segp->seg_length,
-			segp->seg_offset,
-			protection, share, name );
+		       seg_type[segp->seg_type],
+		       segp->seg_start,
+		       segp->seg_length,
+		       segp->seg_offset, protection, share, name);
 	} else {
 		printf("%c *** not-mapped *** 0x%012lx 0x%012lx  %s  %s %s\n",
-			seg_type[segp->seg_type],
-			segp->seg_length,
-			segp->seg_offset,
-			protection, share, name );
+		       seg_type[segp->seg_type],
+		       segp->seg_length,
+		       segp->seg_offset, protection, share, name);
 	}
 
 	return SEG_OK;
@@ -641,12 +606,11 @@
 /*
  * segment_show() -- show specifed segment, or all, if none specified.
  */
-int
-segment_show(char *name)
+int segment_show(char *name)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp, **segpp;
-	bool       header;
+	bool header;
 
 	if (name != NULL) {
 		segp = segment_get(name);
@@ -666,7 +630,7 @@
 	for (segpp = gcp->seglist; (segp = *segpp); ++segpp) {
 		if (segp->seg_type != SEGT_NONE) {
 			show_one_segment(segp, header);
-			header = false;		/* first time only */
+			header = false;	/* first time only */
 		}
 	}
 
@@ -677,10 +641,9 @@
 /*
  * segment_remove() - remove the specified segment, if exists.
  */
-int
-segment_remove(char *name)
+int segment_remove(char *name)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp;
 
 	segp = segment_get(name);
@@ -703,13 +666,12 @@
  *                   test protection.
  * NOTE:  offset is relative to start of mapping, not start of file!
  */
-int
-segment_touch(char *name, range_t *range, int rw)
+int segment_touch(char *name, range_t * range, int rw)
 {
-	glctx_t       *gcp = &glctx;
-	segment_t     *segp;
-	off_t          offset;
-	size_t         length, maxlength;
+	glctx_t *gcp = &glctx;
+	segment_t *segp;
+	off_t offset;
+	size_t length, maxlength;
 	unsigned long *memp;
 	struct timeval t_start, t_end;
 
@@ -720,14 +682,14 @@
 		return SEG_ERR;
 	}
 
-	offset    = round_down_to_pagesize(range->offset);
+	offset = round_down_to_pagesize(range->offset);
 	if (offset >= segp->seg_length) {
 		fprintf(stderr, "%s:  offset %ld is past end of segment %s\n",
 			gcp->program_name, offset, name);
 		return SEG_ERR;
 	}
 
-	memp      = (unsigned long*)(segp->seg_start + offset);
+	memp = (unsigned long *)(segp->seg_start + offset);
 	maxlength = segp->seg_length - offset;
 
 	length = range->length;
@@ -744,8 +706,8 @@
 	touch_memory(rw, memp, length);
 	gettimeofday(&t_end, NULL);
 	printf("%s:  touched %d pages in %6.3f secs\n",
-		gcp->program_name, length/gcp->pagesize,
-		(float)(tv_diff_usec(&t_start, &t_end))/1000000.0);
+	       gcp->program_name, length / gcp->pagesize,
+	       (float)(tv_diff_usec(&t_start, &t_end)) / 1000000.0);
 
 	return SEG_OK;
 }
@@ -755,10 +717,9 @@
  *                    to seg_start+seg_lenth.  Leave the segment in the
  *                    table;
  */
-int
-segment_unmap(char *name)
+int segment_unmap(char *name)
 {
-	glctx_t   *gcp = &glctx;
+	glctx_t *gcp = &glctx;
 	segment_t *segp;
 
 	segp = segment_get(name);
@@ -774,13 +735,13 @@
 	switch (segp->seg_type) {
 	case SEGT_ANON:
 	case SEGT_FILE:
-			munmap(segp->seg_start, segp->seg_length);
+		munmap(segp->seg_start, segp->seg_length);
 		break;
 
 	case SEGT_SHM:
-			//TODO:  shmdt()...
+		//TODO:  shmdt()...
 		break;
-	/* Handle default to get rid of -Wswitch-enum */
+		/* Handle default to get rid of -Wswitch-enum */
 	default:
 		break;
 	}
@@ -795,11 +756,10 @@
  *                  no-op if already mapped.
  *                  range only applies to mapped file.
  */
-int
-segment_map(char *name, range_t *range, int flags)
+int segment_map(char *name, range_t * range, int flags)
 {
-	glctx_t       *gcp = &glctx;
-	segment_t     *segp;
+	glctx_t *gcp = &glctx;
+	segment_t *segp;
 
 	segp = segment_get(name);
 	if (segp == NULL) {
@@ -833,12 +793,12 @@
 	case SEGT_SHM:
 		return map_shm_segment(segp);
 		break;
-	/* Handle default to get rid of -Wswitch-enum */
+		/* Handle default to get rid of -Wswitch-enum */
 	default:
 		break;
 	}
 
-	return SEG_ERR;	/* unrecognized segment type -- shouldn't happen */
+	return SEG_ERR;		/* unrecognized segment type -- shouldn't happen */
 
 }
 
@@ -848,15 +808,15 @@
  * NOTE:  offset is relative to start of mapping, not start of file
  */
 int
-segment_mbind(char *name, range_t *range, int policy,
-		nodemask_t *nodemask, int flags)
+segment_mbind(char *name, range_t * range, int policy,
+	      nodemask_t * nodemask, int flags)
 {
-	glctx_t       *gcp = &glctx;
-	segment_t     *segp;
-	char          *start;
-	off_t          offset;
-	size_t         length, maxlength;
-	int            ret;
+	glctx_t *gcp = &glctx;
+	segment_t *segp;
+	char *start;
+	off_t offset;
+	size_t length, maxlength;
+	int ret;
 
 	segp = segment_get(name);
 	if (segp == NULL) {
@@ -871,14 +831,14 @@
 		return SEG_ERR;
 	}
 
-	offset    = round_down_to_pagesize(range->offset);
+	offset = round_down_to_pagesize(range->offset);
 	if (offset >= segp->seg_length) {
 		fprintf(stderr, "%s:  offset %ld is past end of segment %s\n",
 			gcp->program_name, offset, name);
 		return SEG_ERR;
 	}
 
-	start     = segp->seg_start + offset;
+	start = segp->seg_start + offset;
 	maxlength = segp->seg_length - offset;
 
 	length = range->length;
@@ -891,8 +851,8 @@
 	if (length == 0 || length > maxlength)
 		length = maxlength;
 
-	ret = mbind(segp->seg_start+offset, length, policy, nodemask->n,
-			NUMA_NUM_NODES, flags);
+	ret = mbind(segp->seg_start + offset, length, policy, nodemask->n,
+		    NUMA_NUM_NODES, flags);
 
 	if (ret == -1) {
 		int err = errno;
@@ -911,16 +871,15 @@
  */
 #define PG_PER_LINE 8
 #define PPL_MASK (PG_PER_LINE - 1)
-int
-segment_location(char *name, range_t *range)
+int segment_location(char *name, range_t * range)
 {
-	glctx_t       *gcp = &glctx;
-	segment_t     *segp;
-	char          *apage, *end;
-	off_t          offset;
-	size_t         length, maxlength;
-	int            pgid, i;
-	bool           need_nl;
+	glctx_t *gcp = &glctx;
+	segment_t *segp;
+	char *apage, *end;
+	off_t offset;
+	size_t length, maxlength;
+	int pgid, i;
+	bool need_nl;
 
 	segp = segment_get(name);
 	if (segp == NULL) {
@@ -935,14 +894,14 @@
 		return SEG_ERR;
 	}
 
-	offset    = round_down_to_pagesize(range->offset);
+	offset = round_down_to_pagesize(range->offset);
 	if (offset >= segp->seg_length) {
 		fprintf(stderr, "%s:  offset %ld is past end of segment %s\n",
 			gcp->program_name, offset, name);
 		return SEG_ERR;
 	}
 
-	apage     = segp->seg_start + offset;
+	apage = segp->seg_start + offset;
 	maxlength = segp->seg_length - offset;
 
 	length = range->length;
@@ -955,13 +914,13 @@
 	if (length == 0 || length > maxlength)
 		length = maxlength;
 
-	end  = apage + length;
-	pgid = offset/gcp->pagesize;
+	end = apage + length;
+	pgid = offset / gcp->pagesize;
 
 	show_one_segment(segp, false);	/* show mapping, no header */
 
 	printf("page offset   ");
-	for (i=0; i<PG_PER_LINE; ++i)
+	for (i = 0; i < PG_PER_LINE; ++i)
 		printf(" +%02d", i);
 	printf("\n");
 	if (pgid & PPL_MASK) {
@@ -984,8 +943,9 @@
 		node = get_node(apage);
 		if (node < 0) {
 			fprintf(stderr, "\n%s:  "
-			  "failed to get node for segment %s, offset 0x%lx\n",
-			  gcp->program_name, name, SEG_OFFSET(segp, apage));
+				"failed to get node for segment %s, offset 0x%lx\n",
+				gcp->program_name, name, SEG_OFFSET(segp,
+								    apage));
 			return SEG_ERR;
 		}
 
diff --git a/testcases/kernel/io/aio/aio01/aio01.c b/testcases/kernel/io/aio/aio01/aio01.c
index cb440d7..d30697d 100644
--- a/testcases/kernel/io/aio/aio01/aio01.c
+++ b/testcases/kernel/io/aio/aio01/aio01.c
@@ -52,7 +52,7 @@
 #include "config.h"
 
 char *TCID = "aio01";
-int TST_TOTAL=6;
+int TST_TOTAL = 6;
 
 #ifdef HAVE_LIBAIO_H
 
@@ -77,50 +77,50 @@
 int fd;
 char *maddr;
 
-size_t		bufsize;	/* Size of I/O, 8k default */
-io_context_t	io_ctx;		/* I/O Context */
-struct iocb	**iocbs;	/* I/O Control Blocks */
-char		*srcbuf, *dstbuf;
-char		fname[128];
-char		tbuf[80];
-int		pos, nr;
-struct stat	s;
+size_t bufsize;			/* Size of I/O, 8k default */
+io_context_t io_ctx;		/* I/O Context */
+struct iocb **iocbs;		/* I/O Control Blocks */
+char *srcbuf, *dstbuf;
+char fname[128];
+char tbuf[80];
+int pos, nr;
+struct stat s;
 
 struct test_case_t {
 	off_t newsize;
 	char *desc;
 } TC[] = {
-	{mapsize - 8192, "ftruncate mmaped file to a smaller size"},
-	{mapsize + 1024, "ftruncate mmaped file to a larger size"},
-	{0, "ftruncate mmaped file to 0 size"},
-};
+	{
+	mapsize - 8192, "ftruncate mmaped file to a smaller size"}, {
+	mapsize + 1024, "ftruncate mmaped file to a larger size"}, {
+0, "ftruncate mmaped file to 0 size"},};
 
 int main(int argc, char **argv)
 {
 	int i, j, sec, usec;
-	int failflag=0;
-	int bflag=0, nflag=0, Fflag=0;
+	int failflag = 0;
+	int bflag = 0, nflag = 0, Fflag = 0;
 	char *optb, *optn, *optF;
-	char *msg;	/* for parse_opts */
+	char *msg;		/* for parse_opts */
 	struct io_event event;
 	static struct timespec ts;
 	struct timeval stv, etv;
 
 	option_t options[] = {
-		{ "b:", &bflag, &optb },
-		{ "n:", &nflag, &optn },
-		{ "F:", &Fflag, &optF },
-		{ NULL, NULL, NULL}
+		{"b:", &bflag, &optb},
+		{"n:", &nflag, &optn},
+		{"F:", &Fflag, &optF},
+		{NULL, NULL, NULL}
 	};
 
 	msg = parse_opts(argc, argv, options, &help);
-	if (msg != (char *) NULL) {
+	if (msg != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
 	}
 
-	bufsize = (bflag ? atoi(optb):8192);
-	nr = (nflag ? atoi(optn):10);
+	bufsize = (bflag ? atoi(optb) : 8192);
+	nr = (nflag ? atoi(optn) : 10);
 	if (Fflag) {
 		sprintf(fname, optF);
 	} else {
@@ -133,7 +133,7 @@
 	pos = 0;
 	gettimeofday(&stv, NULL);
 	io_prep_pwrite(iocbs[0], fd, srcbuf, bufsize, pos);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
 		do {
@@ -142,11 +142,11 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 1: io_submit failed - retval=%d, "
-					"errno=%d", TEST_RETURN, TEST_ERRNO);
-			failflag=1;
+				 "errno=%d", TEST_RETURN, TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		gettimeofday(&etv, NULL);
 	}
 	if (!failflag) {
@@ -157,15 +157,15 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 1: %d writes in %3d.%06d sec",
-				nr, sec, usec);
+			 nr, sec, usec);
 	}
 
 /* TEST 2 */
 	pos = 0;
-	failflag=0;
+	failflag = 0;
 	gettimeofday(&stv, NULL);
 	io_prep_pread(iocbs[0], fd, dstbuf, bufsize, pos);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
 		do {
@@ -174,11 +174,11 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 2: io_submit failed - retval=%d, "
-					"errno=%d", TEST_RETURN, TEST_ERRNO);
-			failflag=1;
+				 "errno=%d", TEST_RETURN, TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		gettimeofday(&etv, NULL);
 	}
 	if (!failflag) {
@@ -189,14 +189,14 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 2: %d reads in %3d.%06d sec",
-				nr, sec, usec);
+			 nr, sec, usec);
 	}
 
 /* TEST 3 */
 	pos = 0;
-	failflag=0;
+	failflag = 0;
 	gettimeofday(&stv, NULL);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		io_prep_pwrite(iocbs[0], fd, srcbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -206,11 +206,11 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 3: io_submit failed - retval=%d, "
-					"errno=%d", TEST_RETURN, TEST_ERRNO);
-			failflag=1;
+				 "errno=%d", TEST_RETURN, TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		gettimeofday(&etv, NULL);
 	}
 	if (!failflag) {
@@ -221,14 +221,14 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 3: %d prep,writes in %3d.%06d sec",
-				nr, sec, usec);
+			 nr, sec, usec);
 	}
 
 /* TEST 4 */
 	pos = 0;
-	failflag=0;
+	failflag = 0;
 	gettimeofday(&stv, NULL);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		io_prep_pread(iocbs[0], fd, dstbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -238,11 +238,11 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 4: io_submit failed - retval=%d, "
-					"errno=%d", TEST_RETURN, TEST_ERRNO);
-			failflag=1;
+				 "errno=%d", TEST_RETURN, TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		gettimeofday(&etv, NULL);
 	}
 	if (!failflag) {
@@ -253,14 +253,14 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 4: %d prep,reads in %3d.%06d sec",
-				nr, sec, usec);
+			 nr, sec, usec);
 	}
 
 /* TEST 5 */
 	pos = 0;
-	failflag=0;
+	failflag = 0;
 	gettimeofday(&stv, NULL);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		io_prep_pwrite(iocbs[0], fd, srcbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -270,12 +270,12 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 5: write io_submit failed - "
-					"retval=%d, errno=%d", TEST_RETURN,
-					TEST_ERRNO);
-			failflag=1;
+				 "retval=%d, errno=%d", TEST_RETURN,
+				 TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		io_prep_pread(iocbs[0], fd, dstbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -285,12 +285,12 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 5: read io_submit failed - "
-					"retval=%d, errno=%d", TEST_RETURN,
-					TEST_ERRNO);
-			failflag=1;
+				 "retval=%d, errno=%d", TEST_RETURN,
+				 TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		gettimeofday(&etv, NULL);
 	}
 	if (!failflag) {
@@ -301,14 +301,14 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 5: %d reads and writes in %3d.%06d sec",
-				nr, sec, usec);
+			 nr, sec, usec);
 	}
 
 /* TEST 6 */
 	pos = 0;
-	failflag=0;
+	failflag = 0;
 	gettimeofday(&stv, NULL);
-	for (i = 0; i< nr; i++) {
+	for (i = 0; i < nr; i++) {
 		io_prep_pwrite(iocbs[0], fd, srcbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -318,12 +318,12 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 6: write io_submit failed - "
-					"retval=%d, errno=%d", TEST_RETURN,
-					TEST_ERRNO);
-			failflag=1;
+				 "retval=%d, errno=%d", TEST_RETURN,
+				 TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		io_prep_pread(iocbs[0], fd, dstbuf, bufsize, pos);
 		ts.tv_sec = 30;
 		ts.tv_nsec = 0;
@@ -333,18 +333,18 @@
 		if (TEST_RETURN < 0) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			tst_resm(TFAIL, "Test 6: read io_submit failed - "
-					"retval=%d, errno=%d", TEST_RETURN,
-					TEST_ERRNO);
-			failflag=1;
+				 "retval=%d, errno=%d", TEST_RETURN,
+				 TEST_ERRNO);
+			failflag = 1;
 			continue;
 		}
-		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1);
+		while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ;
 		for (j = 0; j < bufsize; j++) {
 			if (srcbuf[j] != dstbuf[j])
 				tst_resm(TFAIL, "Test 6: compare failed - "
-						"read: %c, " "actual: %c",
-						dstbuf[j], srcbuf[j]);
-				break;
+					 "read: %c, " "actual: %c",
+					 dstbuf[j], srcbuf[j]);
+			break;
 		}
 		gettimeofday(&etv, NULL);
 	}
@@ -356,7 +356,7 @@
 			sec--;
 		}
 		tst_resm(TPASS, "Test 6: %d read,write,verify in %d.%06d sec",
-				i, sec, usec);
+			 i, sec, usec);
 	}
 
 	cleanup();
@@ -384,36 +384,41 @@
 
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0600)) < 0)
 		tst_brkm(TFAIL, cleanup, "failed to open %s "
-				"file, errno: %d", fname, errno);
+			 "file, errno: %d", fname, errno);
 	stat(fname, &s);
-	if ((iocbs = malloc(sizeof(int)*nr)) == NULL)
+	if ((iocbs = malloc(sizeof(int) * nr)) == NULL)
 		tst_brkm(TFAIL, cleanup, "malloc for iocbs failed - "
-				"errno: %d",errno);
+			 "errno: %d", errno);
 	if ((iocbs[0] = malloc(sizeof(struct iocb))) == NULL)
 		tst_brkm(TFAIL, cleanup, "malloc for iocbs elements failed - "
-				"errno: %d",errno);
+			 "errno: %d", errno);
 	if (S_ISCHR(s.st_mode)) {
-		if ((ret = posix_memalign((void **)&srcbuf, bufsize, bufsize)) != 0)
-			tst_brkm(TFAIL, cleanup, "posix_memalign for srcbuf "
-					"failed - errno: %d",errno);
-		if ((ret = posix_memalign((void **)&dstbuf, bufsize, bufsize)) != 0)
-			tst_brkm(TFAIL, cleanup, "posix_memalign for dstbuf "
-					"failed - errno: %d",errno);
+		if ((ret =
+		     posix_memalign((void **)&srcbuf, bufsize, bufsize)) != 0)
+			tst_brkm(TFAIL, cleanup,
+				 "posix_memalign for srcbuf "
+				 "failed - errno: %d", errno);
+		if ((ret =
+		     posix_memalign((void **)&dstbuf, bufsize, bufsize)) != 0)
+			tst_brkm(TFAIL, cleanup,
+				 "posix_memalign for dstbuf "
+				 "failed - errno: %d", errno);
 	} else {
-		if ((srcbuf = malloc(sizeof(char)*bufsize)) == NULL)
+		if ((srcbuf = malloc(sizeof(char) * bufsize)) == NULL)
 			tst_brkm(TFAIL, cleanup, "malloc for srcbuf "
-					"failed - errno: %d",errno);
-		if ((dstbuf = malloc(sizeof(char)*bufsize)) == NULL)
+				 "failed - errno: %d", errno);
+		if ((dstbuf = malloc(sizeof(char) * bufsize)) == NULL)
 			tst_brkm(TFAIL, cleanup, "malloc for dstbuf "
-					"failed - errno: %d",errno);
+				 "failed - errno: %d", errno);
 	}
 	memset((void *)srcbuf, 65, bufsize);
 	if ((ret = io_queue_init(1, &io_ctx)) != 0)
 		tst_brkm(TFAIL, cleanup, "io_queue_init failed: %s",
-				strerror(ret));
+			 strerror(ret));
 }
 
-static void cleanup(void) {
+static void cleanup(void)
+{
 	TEST_CLEANUP;
 	free(dstbuf);
 	free(srcbuf);
@@ -429,8 +434,8 @@
 
 int main(void)
 {
-  tst_resm(TCONF, "libaio missing");
-  tst_exit();
+	tst_resm(TCONF, "libaio missing");
+	tst_exit();
 }
 
 #endif
diff --git a/testcases/kernel/io/aio/aio02/aio_tio.c b/testcases/kernel/io/aio/aio02/aio_tio.c
index dea4d5b..9dda462 100644
--- a/testcases/kernel/io/aio/aio02/aio_tio.c
+++ b/testcases/kernel/io/aio/aio02/aio_tio.c
@@ -60,7 +60,7 @@
 			iocb->u.c.nbytes, res2);
 		exit(1);
 	}
-	wait_count --;
+	wait_count--;
 }
 
 /*
@@ -80,8 +80,10 @@
 	/*
 	 * Call the callback functions for each event.
 	 */
-	for (ep = events ; n-- > 0 ; ep++) {
-		io_callback_t cb = (io_callback_t)ep->data ; struct iocb *iocb = ep->obj ; cb(ctx, iocb, ep->res, ep->res2);
+	for (ep = events; n-- > 0; ep++) {
+		io_callback_t cb = (io_callback_t) ep->data;
+		struct iocb *iocb = ep->obj;
+		cb(ctx, iocb, ep->res, ep->res2);
 	}
 	return ret;
 }
@@ -89,7 +91,7 @@
 int io_tio(char *pathname, int flag, int n, int operation)
 {
 	int res, fd = 0, i = 0;
-	void * bufptr = NULL;
+	void *bufptr = NULL;
 	off_t offset = 0;
 	struct timespec timeout;
 
@@ -97,7 +99,7 @@
 	struct iocb iocb_array[AIO_MAXIO];
 	struct iocb *iocbps[AIO_MAXIO];
 
-	fd = open (pathname, flag, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+	fd = open(pathname, flag, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 	if (fd <= 0) {
 		printf("open for %s failed: %s\n", pathname, strerror(errno));
 		return -1;
@@ -106,46 +108,46 @@
 	res = io_queue_init(n, &myctx);
 	//printf (" res = %d \n", res);
 
-	for (i = 0 ; i < AIO_MAXIO ; i ++) {
+	for (i = 0; i < AIO_MAXIO; i++) {
 
 		switch (operation) {
-		case IO_CMD_FSYNC :
-		case IO_CMD_FDSYNC :
-		case IO_CMD_PWRITE :
-			if (posix_memalign (&bufptr, alignment, AIO_BLKSIZE)) {
-				perror (" posix_memalign failed ");
+		case IO_CMD_FSYNC:
+		case IO_CMD_FDSYNC:
+		case IO_CMD_PWRITE:
+			if (posix_memalign(&bufptr, alignment, AIO_BLKSIZE)) {
+				perror(" posix_memalign failed ");
 				return -1;
 			}
-			memset (bufptr, 0, AIO_BLKSIZE);
+			memset(bufptr, 0, AIO_BLKSIZE);
 
-			io_prep_pwrite (&iocb_array[i], fd, bufptr ,
-					 AIO_BLKSIZE, offset);
+			io_prep_pwrite(&iocb_array[i], fd, bufptr,
+				       AIO_BLKSIZE, offset);
 			io_set_callback(&iocb_array[i], work_done);
 			iocbps[i] = &iocb_array[i];
 			offset += AIO_BLKSIZE;
 
 			break;
-		case IO_CMD_PREAD :
-			if (posix_memalign (&bufptr, alignment, AIO_BLKSIZE)) {
-				perror (" posix_memalign failed ");
+		case IO_CMD_PREAD:
+			if (posix_memalign(&bufptr, alignment, AIO_BLKSIZE)) {
+				perror(" posix_memalign failed ");
 				return -1;
 			}
-			memset (bufptr, 0, AIO_BLKSIZE);
+			memset(bufptr, 0, AIO_BLKSIZE);
 
-			io_prep_pread (&iocb_array[i], fd, bufptr ,
-					AIO_BLKSIZE, offset);
+			io_prep_pread(&iocb_array[i], fd, bufptr,
+				      AIO_BLKSIZE, offset);
 			io_set_callback(&iocb_array[i], work_done);
 			iocbps[i] = &iocb_array[i];
 			offset += AIO_BLKSIZE;
 			break;
-		case IO_CMD_POLL :
-		case IO_CMD_NOOP :
+		case IO_CMD_POLL:
+		case IO_CMD_NOOP:
 			break;
 		default:
-			tst_resm (TFAIL,
-				  "Command failed; opcode returned: %d\n",
-				  operation);
-		  	return -1;
+			tst_resm(TFAIL,
+				 "Command failed; opcode returned: %d\n",
+				 operation);
+			return -1;
 			break;
 		}
 	}
@@ -167,50 +169,50 @@
 	timeout.tv_nsec = 0;
 
 	switch (operation) {
-		case IO_CMD_PREAD :
-		case IO_CMD_PWRITE :
-		  {
+	case IO_CMD_PREAD:
+	case IO_CMD_PWRITE:
+		{
 			while (wait_count) {
 				res = io_wait_run(myctx, &timeout);
 				if (res < 0)
 					io_error("io_wait_run", res);
 			}
-		  }
-		  break;
-		  case IO_CMD_FSYNC :
-			for (i = 0 ; i < AIO_MAXIO ; i ++) {
-				res = io_fsync(myctx, iocbps[i], work_done, fd);
-				if (res  < 0) {
-					io_error("io_fsync write", res);
-				}
+		}
+		break;
+	case IO_CMD_FSYNC:
+		for (i = 0; i < AIO_MAXIO; i++) {
+			res = io_fsync(myctx, iocbps[i], work_done, fd);
+			if (res < 0) {
+				io_error("io_fsync write", res);
 			}
-		  break;
-		case IO_CMD_FDSYNC :
-			for (i = 0 ; i < AIO_MAXIO ; i ++) {
-				res = io_fdsync(myctx, iocbps[i], work_done, fd);
-				if (res  < 0) {
-					io_error("io_fsync write", res);
-				}
+		}
+		break;
+	case IO_CMD_FDSYNC:
+		for (i = 0; i < AIO_MAXIO; i++) {
+			res = io_fdsync(myctx, iocbps[i], work_done, fd);
+			if (res < 0) {
+				io_error("io_fsync write", res);
 			}
-		  break;
+		}
+		break;
 	}
 
-	close (fd);
+	close(fd);
 
-	for (i = 0 ; i < AIO_MAXIO ; i ++) {
+	for (i = 0; i < AIO_MAXIO; i++) {
 		if (iocb_array[i].u.c.buf != NULL) {
-			free (iocb_array[i].u.c.buf);
+			free(iocb_array[i].u.c.buf);
 		}
 	}
 
-	io_queue_release (myctx);
+	io_queue_release(myctx);
 
 	return 0;
 }
 
 int test_main(void)
 {
-	int	status = 0 ;
+	int status = 0;
 
 	tst_resm(TINFO, "Running test 1\n");
 	status = io_tio("file1",
@@ -228,29 +230,25 @@
 	}
 
 	tst_resm(TINFO, "Running test 3\n");
-	status = io_tio("file1", O_TRUNC | O_RDWR,
-			AIO_MAXIO, IO_CMD_PWRITE);
+	status = io_tio("file1", O_TRUNC | O_RDWR, AIO_MAXIO, IO_CMD_PWRITE);
 	if (status) {
 		return status;
 	}
 
 	tst_resm(TINFO, "Running test 4\n");
-	status = io_tio("file1", O_RDWR,
-			AIO_MAXIO, IO_CMD_PREAD);
+	status = io_tio("file1", O_RDWR, AIO_MAXIO, IO_CMD_PREAD);
 	if (status) {
 		return status;
 	}
 
 	tst_resm(TINFO, "Running test 5\n");
-	status = io_tio("file1", O_TRUNC | O_WRONLY,
-			AIO_MAXIO, IO_CMD_PWRITE);
+	status = io_tio("file1", O_TRUNC | O_WRONLY, AIO_MAXIO, IO_CMD_PWRITE);
 	if (status) {
 		return status;
 	}
 
 	tst_resm(TINFO, "Running test 6 \n");
-	status = io_tio("file1", O_RDONLY,
-			AIO_MAXIO, IO_CMD_PREAD);
+	status = io_tio("file1", O_RDONLY, AIO_MAXIO, IO_CMD_PREAD);
 	if (status) {
 		return status;
 	}
diff --git a/testcases/kernel/io/direct_io/diotest1.c b/testcases/kernel/io/direct_io/diotest1.c
index e0ea7f4..96e4c66 100644
--- a/testcases/kernel/io/direct_io/diotest1.c
+++ b/testcases/kernel/io/direct_io/diotest1.c
@@ -51,8 +51,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest01";		 		 /* Test program identifier.    */
-int TST_TOTAL=1;		 		 /* Total number of test conditions */
+char *TCID = "diotest01";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -64,51 +64,50 @@
 /*
  * prg_usage: display the program usage.
 */
-void
-prg_usage()
+void prg_usage()
 {
-	fprintf(stderr, "Usage: diotest1 [-b bufsize] [-n numblks] [-i infile] [-o outfile]\n");
-	tst_resm (TBROK, "usage");
+	fprintf(stderr,
+		"Usage: diotest1 [-b bufsize] [-n numblks] [-i infile] [-o outfile]\n");
+	tst_resm(TBROK, "usage");
 	tst_exit();
 }
 
 /*
  * fail_clean: cleanup and exit.
 */
-void
-fail_clean(int fd1, int fd2, char *infile, char *outfile)
+void fail_clean(int fd1, int fd2, char *infile, char *outfile)
 {
 	close(fd1);
 	close(fd2);
 	unlink(infile);
 	unlink(outfile);
-	tst_resm (TFAIL, "Test failed");
+	tst_resm(TFAIL, "Test failed");
 	tst_exit();
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	bufsize = BUFSIZE;	/* Buffer size. Default 8k */
-	int	numblks = NBLKS;	/* Number of blocks. Default 20 */
-	char	infile[LEN];		/* Input file. Default "infile" */
-	char	outfile[LEN];		/* Output file. Default "outfile" */
-	int	fd, fd1, fd2;
-	int	i, n, offset;
-	char	*buf;
+	int bufsize = BUFSIZE;	/* Buffer size. Default 8k */
+	int numblks = NBLKS;	/* Number of blocks. Default 20 */
+	char infile[LEN];	/* Input file. Default "infile" */
+	char outfile[LEN];	/* Output file. Default "outfile" */
+	int fd, fd1, fd2;
+	int i, n, offset;
+	char *buf;
 
 	/* Options */
 	strcpy(infile, "infile");	/* Default input file */
 	strcpy(outfile, "outfile");	/* Default outfile file */
 	while ((i = getopt(argc, argv, "b:n:i:o:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((bufsize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "bufsize must be > 0\n");
 				prg_usage();
 			}
 			if (bufsize % 4096 != 0) {
-				fprintf(stderr, "bufsize must be multiple of 4k\n");
+				fprintf(stderr,
+					"bufsize must be multiple of 4k\n");
 				prg_usage();
 			}
 			break;
@@ -130,23 +129,24 @@
 	}
 
 	/* Test for filesystem support of O_DIRECT */
-	if ((fd = open(infile, O_DIRECT|O_RDWR|O_CREAT, 0666)) < 0) {
-	         tst_resm(TCONF,"O_DIRECT is not supported by this filesystem.");
-                 tst_exit();
-	}else{
+	if ((fd = open(infile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
+		tst_resm(TCONF,
+			 "O_DIRECT is not supported by this filesystem.");
+		tst_exit();
+	} else {
 		close(fd);
 	}
 
 	/* Open files */
-	if ((fd1 = open(infile, O_DIRECT|O_RDWR|O_CREAT, 0666)) < 0) {
+	if ((fd1 = open(infile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
 		tst_resm(TFAIL, "open infile failed: %s", strerror(errno));
 		tst_exit();
 	}
 
-	if ((fd2 = open(outfile, O_DIRECT|O_RDWR|O_CREAT, 0666)) < 0) {
+	if ((fd2 = open(outfile, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
 		close(fd1);
 		unlink(infile);
-		tst_resm(TFAIL,"open outfile failed: %s", strerror(errno));
+		tst_resm(TFAIL, "open outfile failed: %s", strerror(errno));
 		tst_exit();
 	}
 
@@ -158,7 +158,8 @@
 	for (i = 0; i < numblks; i++) {
 		fillbuf(buf, bufsize, (char)(i % 256));
 		if (write(fd1, buf, bufsize) < 0) {
-			tst_resm(TFAIL, "write infile failed: %s", strerror(errno));
+			tst_resm(TFAIL, "write infile failed: %s",
+				 strerror(errno));
 			fail_clean(fd1, fd2, infile, outfile);
 		}
 	}
@@ -171,24 +172,27 @@
 	}
 	while ((n = read(fd1, buf, bufsize)) > 0) {
 		if (lseek(fd2, offset, SEEK_SET) < 0) {
-			tst_resm(TFAIL, "lseek(outfd) failed: %s", strerror(errno));
+			tst_resm(TFAIL, "lseek(outfd) failed: %s",
+				 strerror(errno));
 			fail_clean(fd1, fd2, infile, outfile);
 		}
 		if (write(fd2, buf, n) < n) {
-			tst_resm(TFAIL, "write(outfd) failed: %s", strerror(errno));
+			tst_resm(TFAIL, "write(outfd) failed: %s",
+				 strerror(errno));
 			fail_clean(fd1, fd2, infile, outfile);
 		}
 		offset += n;
 		if (lseek(fd1, offset, SEEK_SET) < 0) {
-			tst_resm(TFAIL, "lseek(infd) failed: %s", strerror(errno));
+			tst_resm(TFAIL, "lseek(infd) failed: %s",
+				 strerror(errno));
 			fail_clean(fd1, fd2, infile, outfile);
 		}
 	}
 
 	/* Verify */
 	if (filecmp(infile, outfile) != 0) {
-		tst_resm(TFAIL,"file compare failed for %s and %s",
-			infile, outfile);
+		tst_resm(TFAIL, "file compare failed for %s and %s",
+			 infile, outfile);
 		fail_clean(fd1, fd2, infile, outfile);
 	}
 
@@ -204,9 +208,9 @@
 
 #else /* O_DIRECT */
 
-int
-main() {
-	tst_resm(TCONF,"O_DIRECT is not defined.");
+int main()
+{
+	tst_resm(TCONF, "O_DIRECT is not defined.");
 	tst_exit();
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/io/direct_io/diotest2.c b/testcases/kernel/io/direct_io/diotest2.c
index 2842696..5218213 100644
--- a/testcases/kernel/io/direct_io/diotest2.c
+++ b/testcases/kernel/io/direct_io/diotest2.c
@@ -58,8 +58,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest02";				/* Test program identifier.    */
-int TST_TOTAL=3;				/* Total number of test conditions */
+char *TCID = "diotest02";	/* Test program identifier.    */
+int TST_TOTAL = 3;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -75,47 +75,46 @@
  *	For each iteration, write data starting at offse+iter*bufsize
  *	location in the file and read from there.
 */
-int
-runtest(int fd_r, int fd_w, int iter, off64_t offset, int action)
+int runtest(int fd_r, int fd_w, int iter, off64_t offset, int action)
 {
-	char	*buf1;
-	char	*buf2;
-	int	i, bufsize = BUFSIZE;
+	char *buf1;
+	char *buf2;
+	int i, bufsize = BUFSIZE;
 
 	/* Allocate for buffers */
 	if ((buf1 = valloc(bufsize)) == 0) {
 		tst_resm(TFAIL, "valloc() buf1 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
 	if ((buf2 = valloc(bufsize)) == 0) {
 		tst_resm(TFAIL, "valloc() buf2 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
 
 	/* seek bufsize*iteration and write. seek and read. verify. */
 	for (i = 0; i < iter; i++) {
 		fillbuf(buf1, bufsize, i);
-		if (lseek(fd_w, offset+iter*bufsize, SEEK_SET) < 0)  {
+		if (lseek(fd_w, offset + iter * bufsize, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before write failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (write(fd_w, buf1, bufsize) < bufsize) {
 			tst_resm(TFAIL, "write failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
-		if (lseek(fd_r, offset+iter*bufsize, SEEK_SET) < 0) {
+		if (lseek(fd_r, offset + iter * bufsize, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before read failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (read(fd_r, buf2, bufsize) < bufsize) {
 			tst_resm(TFAIL, "read failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
 		if (bufcmp(buf1, buf2, bufsize) != 0) {
 			tst_resm(TFAIL, "read/write comparision failed");
-			return(-1);
+			return (-1);
 		}
 	}
 	return 0;
@@ -124,38 +123,38 @@
 /*
  * prg_usage: display the program usage.
 */
-void
-prg_usage()
+void prg_usage()
 {
-	fprintf(stderr, "Usage: diotest2 [-b bufsize] [-o offset] [-i iterations] [-f filename]\n");
+	fprintf(stderr,
+		"Usage: diotest2 [-b bufsize] [-o offset] [-i iterations] [-f filename]\n");
 	exit(1);
 }
 
 int fd1 = -1;
-char	filename[LEN];
+char filename[LEN];
 static void setup(void);
 static void cleanup(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	iter = 100;		/* Iterations. Default 100 */
-	int	bufsize = BUFSIZE;	/* Buffer size. Default 4k */
-	off64_t	offset = 0;		/* Offset. Default 0 */
-	int	i, action, fd_r, fd_w;
-	int	fail_count = 0, total = 0, failed = 0;
+	int iter = 100;		/* Iterations. Default 100 */
+	int bufsize = BUFSIZE;	/* Buffer size. Default 4k */
+	off64_t offset = 0;	/* Offset. Default 0 */
+	int i, action, fd_r, fd_w;
+	int fail_count = 0, total = 0, failed = 0;
 
 	/* Options */
-	sprintf(filename,"testdata-2.%ld", syscall(__NR_gettid));
+	sprintf(filename, "testdata-2.%ld", syscall(__NR_gettid));
 	while ((i = getopt(argc, argv, "b:o:i:f:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((bufsize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "bufsize must be > 0\n");
 				prg_usage();
 			}
 			if (bufsize % 4096 != 0) {
-				fprintf(stderr, "bufsize must be multiple of 4k\n");
+				fprintf(stderr,
+					"bufsize must be multiple of 4k\n");
 				prg_usage();
 			}
 			break;
@@ -183,18 +182,18 @@
 
 	/* Testblock-1: Read with Direct IO, Write without */
 	action = READ_DIRECT;
-	if ((fd_w = open(filename, O_WRONLY|O_CREAT, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_WRONLY..) failed", filename);
-	if ((fd_r = open(filename, O_DIRECT|O_RDONLY, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_DIRECT|O_RDONLY..) failed", filename);
+	if ((fd_w = open(filename, O_WRONLY | O_CREAT, 0666)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_WRONLY..) failed", filename);
+	if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_DIRECT|O_RDONLY..) failed", filename);
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read with Direct IO, Write without");
+		tst_resm(TFAIL, "Read with Direct IO, Write without");
 	} else
-		tst_resm (TPASS, "Read with Direct IO, Write without");
+		tst_resm(TPASS, "Read with Direct IO, Write without");
 	close(fd_w);
 	close(fd_r);
 	unlink(filename);
@@ -202,18 +201,17 @@
 
 	/* Testblock-2: Write with Direct IO, Read without */
 	action = WRITE_DIRECT;
-	if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_DIRECT|O_WRONLY..) failed", filename);
-	if ((fd_r = open(filename, O_RDONLY|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDONLY..) failed", filename);
+	if ((fd_w = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_DIRECT|O_WRONLY..) failed", filename);
+	if ((fd_r = open(filename, O_RDONLY | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDONLY..) failed", filename);
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Write with Direct IO, Read without");
-	}
-	else
+		tst_resm(TFAIL, "Write with Direct IO, Read without");
+	} else
 		tst_resm(TPASS, "Write with Direct IO, Read without");
 	close(fd_w);
 	close(fd_r);
@@ -222,29 +220,30 @@
 
 	/* Testblock-3: Read, Write with Direct IO. */
 	action = RDWR_DIRECT;
-	if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_DIRECT|O_WRONLY|O_CREAT, ..) failed", filename);
-	if ((fd_r = open(filename, O_DIRECT|O_RDONLY|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_DIRECT|O_RDONLY|O_CREAT, ..) failed", filename);
+	if ((fd_w = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_DIRECT|O_WRONLY|O_CREAT, ..) failed",
+			 filename);
+	if ((fd_r = open(filename, O_DIRECT | O_RDONLY | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_DIRECT|O_RDONLY|O_CREAT, ..) failed",
+			 filename);
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
 		tst_resm(TFAIL, "Read, Write with Direct IO");
 	} else
-		tst_resm (TPASS, "Read, Write with Direct IO");
+		tst_resm(TPASS, "Read, Write with Direct IO");
 	close(fd_w);
 	close(fd_r);
 	unlink(filename);
 	total++;
 
 	if (failed)
-		tst_resm(TINFO, "%d/%d testblocks failed",
-			fail_count, total);
+		tst_resm(TINFO, "%d/%d testblocks failed", fail_count, total);
 	else
 		tst_resm(TINFO, "%d testblocks %d iterations completed",
-			total, iter);
+			 total, iter);
 	cleanup();
 
 	tst_exit();
@@ -255,15 +254,15 @@
 {
 	tst_tmpdir();
 
-	if ((fd1 = open(filename, O_CREAT|O_EXCL, 0600)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		   "open(%s, O_CREAT|O_EXCL, ..) failed", filename);
+	if ((fd1 = open(filename, O_CREAT | O_EXCL, 0600)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_CREAT|O_EXCL, ..) failed", filename);
 	close(fd1);
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd1 = open(filename, O_DIRECT, 0600)) == -1)
-		tst_brkm(TCONF|TERRNO, cleanup,
-		    "open(%s, O_DIRECT, ..) failed", filename);
+		tst_brkm(TCONF | TERRNO, cleanup,
+			 "open(%s, O_DIRECT, ..) failed", filename);
 	close(fd1);
 
 }
@@ -278,8 +277,8 @@
 }
 
 #else /* O_DIRECT */
-int
-main() {
+int main()
+{
 	tst_brkm(TCONF, NULL, "O_DIRECT is not defined.");
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/io/direct_io/diotest3.c b/testcases/kernel/io/direct_io/diotest3.c
index 3e3f903..ac460ed 100644
--- a/testcases/kernel/io/direct_io/diotest3.c
+++ b/testcases/kernel/io/direct_io/diotest3.c
@@ -58,8 +58,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest03";		 		/* Test program identifier.    */
-int TST_TOTAL=3;		 		/* Total number of test conditions */
+char *TCID = "diotest03";	/* Test program identifier.    */
+int TST_TOTAL = 3;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -70,18 +70,18 @@
 #define	WRITE_DIRECT 2
 #define	RDWR_DIRECT 3
 
-static int	iter = 100;		/* Iterations. Default 100 */
-static int	bufsize = BUFSIZE;	/* Buffersize. Default 4k */
-static int	offset = 0;		/* Offset. Default 0 */
-static char	filename[LEN];
+static int iter = 100;		/* Iterations. Default 100 */
+static int bufsize = BUFSIZE;	/* Buffersize. Default 4k */
+static int offset = 0;		/* Offset. Default 0 */
+static char filename[LEN];
 
 /*
  * prg_usage: display the program usage
 */
-void
-prg_usage()
+void prg_usage()
 {
-	fprintf(stderr, "Usage: diotest3 [-b bufsize] [-o offset] [-n numchild] [-i iterations] [-f filename]\n");
+	fprintf(stderr,
+		"Usage: diotest3 [-b bufsize] [-o offset] [-n numchild] [-i iterations] [-f filename]\n");
 	exit(1);
 }
 
@@ -92,57 +92,56 @@
  *
  * XXX (garrcoop): shouldn't use libltp APIs because it runs forked.
  */
-int
-runtest(int fd_r, int fd_w, int childnum, int action)
+int runtest(int fd_r, int fd_w, int childnum, int action)
 {
-	char	*buf1;
-	char	*buf2;
-	off_t	seekoff;
-	int	bufsize = BUFSIZE;
-	int	i;
+	char *buf1;
+	char *buf2;
+	off_t seekoff;
+	int bufsize = BUFSIZE;
+	int i;
 
 	/* Allocate for buffers */
-	seekoff = offset+bufsize * childnum;
+	seekoff = offset + bufsize * childnum;
 	if ((buf1 = valloc(bufsize)) == 0) {
-		tst_resm(TFAIL|TERRNO, "valloc for buf1 failed");
-		return(-1);
+		tst_resm(TFAIL | TERRNO, "valloc for buf1 failed");
+		return (-1);
 	}
 	if ((buf2 = valloc(bufsize)) == 0) {
-		tst_resm(TFAIL|TERRNO, "valloc for buf2 failed");
-		return(-1);
+		tst_resm(TFAIL | TERRNO, "valloc for buf2 failed");
+		return (-1);
 	}
 
 	/* seek, write, read and verify */
 	for (i = 0; i < iter; i++) {
-		fillbuf(buf1, bufsize, childnum+i);
+		fillbuf(buf1, bufsize, childnum + i);
 		if (lseek(fd_w, seekoff, SEEK_SET) < 0) {
-			tst_resm(TFAIL|TERRNO, "lseek (fd_w, ..) failed");
-			return(-1);
+			tst_resm(TFAIL | TERRNO, "lseek (fd_w, ..) failed");
+			return (-1);
 		}
 		if (write(fd_w, buf1, bufsize) < bufsize) {
-			tst_resm(TFAIL|TERRNO, "write failed");
-			return(-1);
+			tst_resm(TFAIL | TERRNO, "write failed");
+			return (-1);
 		}
 		if (action == READ_DIRECT) {
 			/* Make sure data is on to disk before read */
 			if (fsync(fd_w) < 0) {
-				tst_resm(TFAIL|TERRNO, "fsync failed");
-				return(-1);
+				tst_resm(TFAIL | TERRNO, "fsync failed");
+				return (-1);
 			}
 		}
 		if (lseek(fd_r, seekoff, SEEK_SET) < 0) {
-			tst_resm(TFAIL|TERRNO, "lseek(fd_r, ..) failed");
-			return(-1);
+			tst_resm(TFAIL | TERRNO, "lseek(fd_r, ..) failed");
+			return (-1);
 		}
 		if (read(fd_r, buf2, bufsize) < bufsize) {
-			tst_resm(TFAIL|TERRNO, "read failed");
-			return(-1);
+			tst_resm(TFAIL | TERRNO, "read failed");
+			return (-1);
 		}
 		if (bufcmp(buf1, buf2, bufsize) != 0) {
 			tst_resm(TFAIL,
-			    "comparsion failed; child=%d offset=%d",
-			    childnum, (int)seekoff);
-			return(-1);
+				 "comparsion failed; child=%d offset=%d",
+				 childnum, (int)seekoff);
+			return (-1);
 		}
 	}
 	tst_exit();
@@ -151,75 +150,78 @@
 /*
  * child_function: open the file for read and write. Call the runtest routine.
 */
-int
-child_function(int childnum, int action)
+int child_function(int childnum, int action)
 {
-	int	fd_w, fd_r;
+	int fd_w, fd_r;
 
-	switch(action) {
+	switch (action) {
 	case READ_DIRECT:
-		if ((fd_w = open(filename, O_WRONLY|O_CREAT, 0666)) < 0) {
-			tst_resm(TFAIL|TERRNO,
-			    "open(%s, O_WRONLY|O_CREAT, ..) failed", filename);
-			return(-1);
+		if ((fd_w = open(filename, O_WRONLY | O_CREAT, 0666)) < 0) {
+			tst_resm(TFAIL | TERRNO,
+				 "open(%s, O_WRONLY|O_CREAT, ..) failed",
+				 filename);
+			return (-1);
 		}
-		if ((fd_r = open(filename, O_DIRECT|O_RDONLY, 0666)) < 0) {
-			tst_resm(TFAIL|TERRNO,
-			    "open(%s, O_DIRECT|O_RDONLY, ..) failed", filename);
+		if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) {
+			tst_resm(TFAIL | TERRNO,
+				 "open(%s, O_DIRECT|O_RDONLY, ..) failed",
+				 filename);
 			close(fd_w);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "Read Direct-child %d failed",
-			    childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
-	 case WRITE_DIRECT:
-		if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
-			tst_resm(TFAIL, "fd_w open failed for %s: %s",
-				filename, strerror(errno));
-			return(-1);
+	case WRITE_DIRECT:
+		if ((fd_w =
+		     open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
+			tst_resm(TFAIL, "fd_w open failed for %s: %s", filename,
+				 strerror(errno));
+			return (-1);
 		}
 		if ((fd_r = open(filename, O_RDONLY, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_r open failed for %s: %s",
-				filename, strerror(errno));
+				 filename, strerror(errno));
 			close(fd_w);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "Write Direct-child %d failed",
-				childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
-	 case RDWR_DIRECT:
-		if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
-			tst_resm(TFAIL, "fd_w open failed for %s: %s",
-				filename, strerror(errno));
-			return(-1);
+	case RDWR_DIRECT:
+		if ((fd_w =
+		     open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
+			tst_resm(TFAIL, "fd_w open failed for %s: %s", filename,
+				 strerror(errno));
+			return (-1);
 		}
-		if ((fd_r = open(filename, O_DIRECT|O_RDONLY, 0666)) < 0) {
+		if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_r open failed for %s: %s",
-				filename, strerror(errno));
+				 filename, strerror(errno));
 			close(fd_w);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "RDWR Direct-child %d failed",
-				childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
 	default:
-		fprintf(stderr,"Invalid Action Value\n");
-		return(-1);
+		fprintf(stderr, "Invalid Action Value\n");
+		return (-1);
 	}
 	close(fd_w);
 	close(fd_r);
@@ -230,23 +232,23 @@
 static void cleanup(void);
 static int fd1 = -1;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	*pidlst;
-	int	numchild = 1;	/* Number of children. Default 5 */
-	int	i, fail_count = 0, failed = 0, total = 0;
+	int *pidlst;
+	int numchild = 1;	/* Number of children. Default 5 */
+	int i, fail_count = 0, failed = 0, total = 0;
 
 	/* Options */
 	while ((i = getopt(argc, argv, "b:o:i:n:f:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((bufsize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "bufsize must be > 0\n");
 				prg_usage();
 			}
 			if (bufsize % 4096 != 0) {
-				fprintf(stderr, "bufsize must be multiple of 4k\n");
+				fprintf(stderr,
+					"bufsize must be multiple of 4k\n");
 				prg_usage();
 			}
 			break;
@@ -275,7 +277,7 @@
 			prg_usage();
 		}
 	}
-	sprintf(filename,"testdata-3.%ld", syscall(__NR_gettid));
+	sprintf(filename, "testdata-3.%ld", syscall(__NR_gettid));
 
 	setup();
 
@@ -284,14 +286,12 @@
 		failed = TRUE;
 		fail_count++;
 		tst_resm(TFAIL, "Read with Direct IO, Write without");
-	}
-	else {
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
 			tst_resm(TFAIL, "Read with Direct IO, Write without");
-		}
-		else
+		} else
 			tst_resm(TPASS, "Read with Direct IO, Write without");
 
 	}
@@ -304,14 +304,12 @@
 		failed = TRUE;
 		fail_count++;
 		tst_resm(TFAIL, "Write with Direct IO, Read without");
-	}
-	else {
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
 			tst_resm(TFAIL, "Write with Direct IO, Read without");
-		}
-		else
+		} else
 			tst_resm(TPASS, "Write with Direct IO, Read without");
 	}
 	unlink(filename);
@@ -322,9 +320,8 @@
 	if (forkchldrn(&pidlst, numchild, RDWR_DIRECT, child_function) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read, Write with Direct IO");
-	}
-	else {
+		tst_resm(TFAIL, "Read, Write with Direct IO");
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
@@ -337,11 +334,11 @@
 	total++;
 
 	if (failed)
-		tst_resm(TINFO, "%d/%d testblocks failed",
-			fail_count, total);
+		tst_resm(TINFO, "%d/%d testblocks failed", fail_count, total);
 	else
-		tst_resm(TINFO, "%d testblocks %d iterations with %d children completed",
-						 total, iter, numchild);
+		tst_resm(TINFO,
+			 "%d testblocks %d iterations with %d children completed",
+			 total, iter, numchild);
 	cleanup();
 
 	tst_exit();
@@ -352,15 +349,15 @@
 {
 	tst_tmpdir();
 
-	if ((fd1 = open(filename, O_CREAT|O_EXCL, 0600)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_CREAT|O_EXCL, ..) failed", filename);
+	if ((fd1 = open(filename, O_CREAT | O_EXCL, 0600)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_CREAT|O_EXCL, ..) failed", filename);
 	close(fd1);
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd1 = open(filename, O_DIRECT, 0600)) < 0)
 		tst_brkm(TCONF, cleanup, "open(%s, O_DIRECT, ..) failed",
-		    filename);
+			 filename);
 	close(fd1);
 }
 
@@ -374,8 +371,7 @@
 }
 #else /* O_DIRECT */
 
-int
-main()
+int main()
 {
 	tst_brkm(TCONF, NULL, "O_DIRECT is not defined.");
 }
diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
index 9d38cba..50ec535 100644
--- a/testcases/kernel/io/direct_io/diotest4.c
+++ b/testcases/kernel/io/direct_io/diotest4.c
@@ -72,8 +72,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest4";		 		 /* Test program identifier.    */
-int TST_TOTAL=17;		 		 /* Total number of test conditions */
+char *TCID = "diotest4";	/* Test program identifier.    */
+int TST_TOTAL = 17;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -82,9 +82,9 @@
 #define LEN	30
 
 #ifdef __GNUC__
-# define ADDRESS_OF_MAIN __builtin_extract_return_addr(__builtin_return_address(0))
+#define ADDRESS_OF_MAIN __builtin_extract_return_addr(__builtin_return_address(0))
 #else
-# define ADDRESS_OF_MAIN main
+#define ADDRESS_OF_MAIN main
 #endif
 
 /*
@@ -92,7 +92,8 @@
  *	running read or write with the expected error value (errnum).
 */
 int
-runtest_f(int fd, char *buf, int   offset, int count, int errnum, int testnum, char *msg)
+runtest_f(int fd, char *buf, int offset, int count, int errnum, int testnum,
+	  char *msg)
 {
 	int ret;
 	int l_fail = 0;
@@ -100,80 +101,74 @@
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		if (errno != errnum) {
 			tst_resm(TFAIL, "lseek before read failed: %s",
-				strerror(errno));
+				 strerror(errno));
 			l_fail = TRUE;
 		}
-	}
-	else {
-		ret=read(fd, buf, count);
+	} else {
+		ret = read(fd, buf, count);
 		if (ret >= 0 || errno != errnum) {
 			tst_resm(TFAIL, "read allows %s. returns %d: %s",
-				msg, ret, strerror(errno));
+				 msg, ret, strerror(errno));
 			l_fail = TRUE;
 		}
 	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		if (errno != errnum) {
 			tst_resm(TFAIL, "lseek before write failed: %s",
-				strerror(errno));
+				 strerror(errno));
 			l_fail = TRUE;
 		}
-	}
-	else {
-		ret=write(fd, buf, count);
+	} else {
+		ret = write(fd, buf, count);
 		if (ret >= 0 || errno != errnum) {
 			tst_resm(TFAIL, "write allows %s.returns %d: %s",
-				msg, ret, strerror(errno));
+				 msg, ret, strerror(errno));
 			l_fail = TRUE;
 		}
 	}
-	return(l_fail);
+	return (l_fail);
 }
 
 /*
  * runtest_s: Do read, writes. Verify the they run successfully.
 */
-int
-runtest_s(int fd, char *buf, int   offset, int count, int testnum, char *msg)
+int runtest_s(int fd, char *buf, int offset, int count, int testnum, char *msg)
 {
 	int ret;
 	int l_fail = 0;
 
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek before read failed: %s",
-			strerror(errno));
+			 strerror(errno));
 		l_fail = TRUE;
-	}
-	else {
-		if ((ret=read(fd, buf, count)) < 0) {
+	} else {
+		if ((ret = read(fd, buf, count)) < 0) {
 			tst_resm(TFAIL, "read failed for %s. returns %d: %s",
-				msg, ret, strerror(errno));
+				 msg, ret, strerror(errno));
 			l_fail = TRUE;
 		}
 	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek before write failed: %s",
-			strerror(errno));
+			 strerror(errno));
 		l_fail = TRUE;
-	}
-	else {
-		if ((ret=write(fd, buf, count)) < 0) {
+	} else {
+		if ((ret = write(fd, buf, count)) < 0) {
 			tst_resm(TFAIL, "write failed for %s. returns %d: %s",
-				msg, ret, strerror(errno));
+				 msg, ret, strerror(errno));
 			l_fail = TRUE;
 		}
 	}
-	return(l_fail);
+	return (l_fail);
 }
 
 /*
  * prg_usage - Display the program usage
 */
-void
-prg_usage()
+void prg_usage()
 {
-        fprintf(stderr, "Usage: diotest4 [-b filesize_in_blocks]\n");
-        exit(1);
+	fprintf(stderr, "Usage: diotest4 [-b filesize_in_blocks]\n");
+	exit(1);
 }
 
 static void setup(void);
@@ -181,24 +176,23 @@
 static int fd1 = -1;
 static char filename[LEN];
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	fblocks = 1;		/* Iterations. Default 1 */
-        int     bufsize = BUFSIZE;
-        int     count, ret;
-	int     offset;
-        int     fd, newfd;
-        int     i, l_fail = 0, fail_count = 0, total = 0;
-	int	failed = 0;
-	int	shmsz = SHMLBA;
-	int	pagemask = ~(sysconf(_SC_PAGE_SIZE) - 1);
-        char    *buf0, *buf1, *buf2;
-	caddr_t	shm_base;
+	int fblocks = 1;	/* Iterations. Default 1 */
+	int bufsize = BUFSIZE;
+	int count, ret;
+	int offset;
+	int fd, newfd;
+	int i, l_fail = 0, fail_count = 0, total = 0;
+	int failed = 0;
+	int shmsz = SHMLBA;
+	int pagemask = ~(sysconf(_SC_PAGE_SIZE) - 1);
+	char *buf0, *buf1, *buf2;
+	caddr_t shm_base;
 
 	/* Options */
 	while ((i = getopt(argc, argv, "b:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((fblocks = atoi(optarg)) <= 0) {
 				fprintf(stderr, "fblocks must be > 0\n");
@@ -213,28 +207,30 @@
 	setup();
 
 	/* Open file and fill, allocate for buffer */
-        if ((fd = open(filename, O_DIRECT|O_RDWR|O_CREAT, 0666)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_RDWR | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed for %s: %s",
-			filename, strerror(errno));
-        }
-        if ((buf0 = valloc(BUFSIZE)) == NULL) {
-		tst_brkm(TBROK, cleanup, "valloc() buf0 failed: %s", strerror(errno));
-        }
-        for (i = 1; i < fblocks; i++) {
-                fillbuf(buf0, BUFSIZE, (char)i);
-                if (write(fd, buf0, BUFSIZE) < 0) {
+			 filename, strerror(errno));
+	}
+	if ((buf0 = valloc(BUFSIZE)) == NULL) {
+		tst_brkm(TBROK, cleanup, "valloc() buf0 failed: %s",
+			 strerror(errno));
+	}
+	for (i = 1; i < fblocks; i++) {
+		fillbuf(buf0, BUFSIZE, (char)i);
+		if (write(fd, buf0, BUFSIZE) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed for %s: %s",
-				filename, strerror(errno));
-                }
-        }
+				 filename, strerror(errno));
+		}
+	}
 	close(fd);
-        if ((buf2 = valloc(BUFSIZE)) == NULL) {
-		tst_brkm(TBROK, cleanup, "valloc() buf2 failed: %s", strerror(errno));
-        }
-        if ((fd = open(filename, O_DIRECT|O_RDWR)) < 0) {
+	if ((buf2 = valloc(BUFSIZE)) == NULL) {
+		tst_brkm(TBROK, cleanup, "valloc() buf2 failed: %s",
+			 strerror(errno));
+	}
+	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed for %s: %s",
-				filename, strerror(errno));
-        }
+			 filename, strerror(errno));
+	}
 
 	/* Test-1: Negative Offset */
 	offset = -1;
@@ -242,32 +238,30 @@
 	ret = lseek(fd, offset, SEEK_SET);
 	if ((ret >= 0) || (errno != EINVAL)) {
 		tst_resm(TFAIL, "lseek allows negative offset. returns %d:%s",
-			ret, strerror(errno));
+			 ret, strerror(errno));
 		failed = TRUE;
 		fail_count++;
-	}
-	else
-		tst_resm (TPASS, "Negative Offset");
+	} else
+		tst_resm(TPASS, "Negative Offset");
 	total++;
 
 	/* Test-2: Removed */
-	tst_resm (TPASS, "removed");
+	tst_resm(TPASS, "removed");
 
 	/* Test-3: Odd count of read and write */
 	offset = 0;
 	count = 1;
 	lseek(fd, 0, SEEK_SET);
 	if (write(fd, buf2, 4096) == -1) {
-		tst_resm(TFAIL,"can't write to file %d",ret);
+		tst_resm(TFAIL, "can't write to file %d", ret);
 	}
 	ret = runtest_f(fd, buf2, offset, count, EINVAL, 3, "odd count");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Odd count of read and write");
-	}
-	else
-		tst_resm (TPASS, "Odd count of read and write");
+		tst_resm(TFAIL, "Odd count of read and write");
+	} else
+		tst_resm(TPASS, "Odd count of read and write");
 	total++;
 
 	/* Test-4: Read beyond the file size */
@@ -277,18 +271,17 @@
 		tst_resm(TFAIL, "lseek failed: %s", strerror(errno));
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read beyond the file size");
-	}
-	else {
-        	ret = read(fd, buf2, count);
-        	if (ret > 0 || (ret < 0 && errno != EINVAL)) {
-                	tst_resm(TFAIL,"allows read beyond file size. returns %d: %s",
-				ret, strerror(errno));
-                	failed = TRUE;
+		tst_resm(TFAIL, "Read beyond the file size");
+	} else {
+		ret = read(fd, buf2, count);
+		if (ret > 0 || (ret < 0 && errno != EINVAL)) {
+			tst_resm(TFAIL,
+				 "allows read beyond file size. returns %d: %s",
+				 ret, strerror(errno));
+			failed = TRUE;
 			fail_count++;
-		}
-		else
-			tst_resm (TPASS, "Read beyond the file size");
+		} else
+			tst_resm(TPASS, "Read beyond the file size");
 	}
 	total++;
 
@@ -300,10 +293,9 @@
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Invalid file descriptor");
-	}
-	else
-		tst_resm (TPASS, "Invalid file descriptor");
+		tst_resm(TFAIL, "Invalid file descriptor");
+	} else
+		tst_resm(TPASS, "Invalid file descriptor");
 	total++;
 
 	/* Test-6: Out of range file descriptor */
@@ -311,18 +303,18 @@
 	offset = 4096;
 	if ((newfd = getdtablesize()) < 0) {
 		tst_resm(TFAIL, "getdtablesize() failed: %s", strerror(errno));
-                failed = TRUE;
-		tst_resm (TFAIL, "Out of range file descriptor");
-	}
-	else {
-		ret = runtest_f(newfd, buf2, offset, count, EBADF, 6,"out of range fd");
+		failed = TRUE;
+		tst_resm(TFAIL, "Out of range file descriptor");
+	} else {
+		ret =
+		    runtest_f(newfd, buf2, offset, count, EBADF, 6,
+			      "out of range fd");
 		if (ret != 0) {
 			failed = TRUE;
 			fail_count++;
-			tst_resm (TFAIL, "Out of range file descriptor");
-		}
-		else
-			tst_resm (TPASS, "Out of range file descriptor");
+			tst_resm(TFAIL, "Out of range file descriptor");
+		} else
+			tst_resm(TPASS, "Out of range file descriptor");
 	}
 	close(newfd);
 	total++;
@@ -330,103 +322,101 @@
 	/* Test-7: Closed file descriptor */
 	offset = 4096;
 	count = bufsize;
-        if (close(fd) < 0) {
-		tst_brkm(TBROK, cleanup, "can't close fd %d: %s", fd, strerror(errno));
-        }
+	if (close(fd) < 0) {
+		tst_brkm(TBROK, cleanup, "can't close fd %d: %s", fd,
+			 strerror(errno));
+	}
 	ret = runtest_f(fd, buf2, offset, count, EBADF, 7, "closed fd");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Closed file descriptor");
-	}
-	else
-		tst_resm (TPASS, "Closed file descriptor");
+		tst_resm(TFAIL, "Closed file descriptor");
+	} else
+		tst_resm(TPASS, "Closed file descriptor");
 	total++;
 
 	/* Test-9: removed */
-	tst_resm (TPASS, "removed");
+	tst_resm(TPASS, "removed");
 
 	/* Test-9: Character device (/dev/null) read, write */
 	offset = 0;
 	count = bufsize;
-	if ((newfd = open("/dev/null", O_DIRECT|O_RDWR)) < 0) {
+	if ((newfd = open("/dev/null", O_DIRECT | O_RDWR)) < 0) {
 		tst_resm(TCONF, "Direct I/O on /dev/null is not supported");
 	} else {
 		ret = runtest_s(newfd, buf2, offset, count, 9, "/dev/null");
 		if (ret != 0) {
 			failed = TRUE;
 			fail_count++;
-			tst_resm (TFAIL, "character device read, write");
-		}
-		else
-			tst_resm (TPASS, "character device read, write");
+			tst_resm(TFAIL, "character device read, write");
+		} else
+			tst_resm(TPASS, "character device read, write");
 	}
 	close(newfd);
 	total++;
 
 	/* Test-10: read, write to a mmaped file */
-	shm_base = (char *)(((long)sbrk(0) + (shmsz-1)) & ~(shmsz-1));
-        if (shm_base == NULL) {
+	shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1));
+	if (shm_base == NULL) {
 		tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno));
-        }
+	}
 	offset = 4096;
 	count = bufsize;
-	if ((fd = open(filename, O_DIRECT|O_RDWR)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
 		tst_brkm(TBROK, cleanup, "can't open %s: %s",
-			filename, strerror(errno));
-        }
-	shm_base = mmap(shm_base, 0x100000, PROT_READ|PROT_WRITE,
-		        MAP_SHARED|MAP_FIXED, fd, 0);
-        if (shm_base == (caddr_t)-1) {
-		tst_brkm(TBROK, cleanup, "can't mmap file: %s", strerror(errno));
-        }
+			 filename, strerror(errno));
+	}
+	shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE,
+			MAP_SHARED | MAP_FIXED, fd, 0);
+	if (shm_base == (caddr_t) - 1) {
+		tst_brkm(TBROK, cleanup, "can't mmap file: %s",
+			 strerror(errno));
+	}
 	ret = runtest_s(fd, buf2, offset, count, 10, "mmapped file");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write to a mmaped file");
-	}
-	else
-		tst_resm (TPASS, "read, write to a mmaped file");
+		tst_resm(TFAIL, "read, write to a mmaped file");
+	} else
+		tst_resm(TPASS, "read, write to a mmaped file");
 	total++;
 
 	/* Test-11: read, write to an unmaped file with munmap */
 	if ((ret = munmap(shm_base, 0x100000)) < 0) {
-		tst_brkm(TBROK, cleanup, "can't unmap file: %s", strerror(errno));
-        }
+		tst_brkm(TBROK, cleanup, "can't unmap file: %s",
+			 strerror(errno));
+	}
 	ret = runtest_s(fd, buf2, offset, count, 11, "unmapped file");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write to an unmapped file");
-	}
-	else
-		tst_resm (TPASS, "read, write to an unmapped file");
+		tst_resm(TFAIL, "read, write to an unmapped file");
+	} else
+		tst_resm(TPASS, "read, write to an unmapped file");
 	close(fd);
 	total++;
 
 	/* Test-12: read from file not open for reading */
 	offset = 4096;
 	count = bufsize;
-        if ((fd = open(filename, O_DIRECT|O_WRONLY)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_WRONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "can't open %s: %s",
-			filename, strerror(errno));
-        }
+			 filename, strerror(errno));
+	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek failed: %s", strerror(errno));
 		failed = TRUE;
 		fail_count++;
-	}
-	else {
+	} else {
 		ret = read(fd, buf2, count);
 		if (ret >= 0 || errno != EBADF) {
-			tst_resm(TFAIL, "allows read on file not open for reading. returns %d: %s",
-				ret, strerror(errno));
+			tst_resm(TFAIL,
+				 "allows read on file not open for reading. returns %d: %s",
+				 ret, strerror(errno));
 			failed = TRUE;
 			fail_count++;
-		}
-		else
-			tst_resm (TPASS, "read from file not open for reading");
+		} else
+			tst_resm(TPASS, "read from file not open for reading");
 	}
 	close(fd);
 	total++;
@@ -434,25 +424,24 @@
 	/* Test-13: write to file not open for writing */
 	offset = 4096;
 	count = bufsize;
-	if ((fd = open(filename, O_DIRECT|O_RDONLY)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "can't open %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek failed: %s", strerror(errno));
 		failed = TRUE;
 		fail_count++;
-	}
-	else {
+	} else {
 		ret = write(fd, buf2, count);
-        	if (ret >= 0 || errno != EBADF) {
-			tst_resm(TFAIL, "allows write on file not open for writing. returns %d: %s",
-				ret, strerror(errno));
+		if (ret >= 0 || errno != EBADF) {
+			tst_resm(TFAIL,
+				 "allows write on file not open for writing. returns %d: %s",
+				 ret, strerror(errno));
 			failed = TRUE;
 			fail_count++;
-		}
-		else
-			tst_resm (TPASS, "write to file not open for writing");
+		} else
+			tst_resm(TPASS, "write to file not open for writing");
 	}
 	close(fd);
 	total++;
@@ -461,41 +450,40 @@
 	offset = 4096;
 	count = bufsize;
 	l_fail = 0;
-        if ((fd = open(filename, O_DIRECT|O_RDWR)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
 		tst_brkm(TBROK, cleanup, "can't open %s: %s",
-			filename, strerror(errno));
-        }
-	if (lseek(fd, offset, SEEK_SET) < 0) {
-		tst_resm(TFAIL, "lseek before read failed: %s",
-			strerror(errno));
-		l_fail = TRUE;
-	}
-	else {
-		if ((ret = read(fd, buf2+1, count)) != -1) {
-                	tst_resm(TFAIL,"allows read nonaligned buf. returns %d: %s",
-				ret, strerror(errno));
-                	l_fail = TRUE;
-        	}
+			 filename, strerror(errno));
 	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek before read failed: %s",
-			strerror(errno));
+			 strerror(errno));
 		l_fail = TRUE;
+	} else {
+		if ((ret = read(fd, buf2 + 1, count)) != -1) {
+			tst_resm(TFAIL,
+				 "allows read nonaligned buf. returns %d: %s",
+				 ret, strerror(errno));
+			l_fail = TRUE;
+		}
 	}
-	else {
-		if ((ret = write(fd, buf2+1, count)) != -1) {
-			tst_resm(TFAIL,"allows write nonaligned buf. returns %d: %s",
-				ret, strerror(errno));
-                	l_fail = TRUE;
-        	}
+	if (lseek(fd, offset, SEEK_SET) < 0) {
+		tst_resm(TFAIL, "lseek before read failed: %s",
+			 strerror(errno));
+		l_fail = TRUE;
+	} else {
+		if ((ret = write(fd, buf2 + 1, count)) != -1) {
+			tst_resm(TFAIL,
+				 "allows write nonaligned buf. returns %d: %s",
+				 ret, strerror(errno));
+			l_fail = TRUE;
+		}
 	}
 	if (l_fail) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write with non-aligned buffer");
-	}
-	else
-		tst_resm (TPASS, "read, write with non-aligned buffer");
+		tst_resm(TFAIL, "read, write with non-aligned buffer");
+	} else
+		tst_resm(TPASS, "read, write with non-aligned buffer");
 	total++;
 	close(fd);
 
@@ -503,92 +491,94 @@
 	offset = 4096;
 	count = bufsize;
 	l_fail = 0;
-        if ((fd = open(filename, O_DIRECT|O_RDWR)) < 0) {
-                tst_brkm(TBROK, cleanup, "can't open %s: %s",
-			filename, strerror(errno));
-        }
+	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
+		tst_brkm(TBROK, cleanup, "can't open %s: %s",
+			 filename, strerror(errno));
+	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek before read failed: %s",
-			strerror(errno));
+			 strerror(errno));
 		l_fail = TRUE;
-	}
-	else {
-		ret = read(fd, (char*)((ulong)ADDRESS_OF_MAIN & pagemask), count);
+	} else {
+		ret =
+		    read(fd, (char *)((ulong) ADDRESS_OF_MAIN & pagemask),
+			 count);
 		if (ret >= 0 || errno != EFAULT) {
-			tst_resm(TFAIL,"read to read-only space. returns %d: %s",
-				ret, strerror(errno));
+			tst_resm(TFAIL,
+				 "read to read-only space. returns %d: %s", ret,
+				 strerror(errno));
 			l_fail = TRUE;
-        	}
+		}
 	}
 	if (lseek(fd, offset, SEEK_SET) < 0) {
 		tst_resm(TFAIL, "lseek before write failed: %s",
-			strerror(errno));
+			 strerror(errno));
 		l_fail = TRUE;
-	}
-	else {
-		ret = write(fd, (char *)((ulong)ADDRESS_OF_MAIN & pagemask), count);
+	} else {
+		ret =
+		    write(fd, (char *)((ulong) ADDRESS_OF_MAIN & pagemask),
+			  count);
 		if (ret < 0) {
-			tst_resm(TFAIL,"write to read-only space. returns %d: %s",
-				ret, strerror(errno));
+			tst_resm(TFAIL,
+				 "write to read-only space. returns %d: %s",
+				 ret, strerror(errno));
 			l_fail = TRUE;
 		}
 	}
 	if (l_fail) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write buffer in read-only space");
-	}
-	else
-		tst_resm (TPASS, "read, write buffer in read-only space");
+		tst_resm(TFAIL, "read, write buffer in read-only space");
+	} else
+		tst_resm(TPASS, "read, write buffer in read-only space");
 	close(fd);
 	total++;
 
 	/* Test-16: read, write in non-existant space */
 	offset = 4096;
 	count = bufsize;
-	if ((buf1 = (char *) (((long)sbrk(0) + (shmsz-1)) & ~(shmsz-1))) == NULL) {
-                tst_brkm(TBROK|TERRNO, cleanup, "sbrk failed");
-        }
-        if ((fd = open(filename, O_DIRECT|O_RDWR)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_DIRECT|O_RDWR) failed", filename);
-        }
-	ret = runtest_f(fd, buf1, offset, count, EFAULT, 16, " nonexistant space");
+	if ((buf1 =
+	     (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1))) == NULL) {
+		tst_brkm(TBROK | TERRNO, cleanup, "sbrk failed");
+	}
+	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_DIRECT|O_RDWR) failed", filename);
+	}
+	ret =
+	    runtest_f(fd, buf1, offset, count, EFAULT, 16,
+		      " nonexistant space");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write in non-existant space");
-	}
-	else
-		tst_resm (TPASS, "read, write in non-existant space");
+		tst_resm(TFAIL, "read, write in non-existant space");
+	} else
+		tst_resm(TPASS, "read, write in non-existant space");
 	total++;
 	close(fd);
 
 	/* Test-17: read, write for file with O_SYNC */
 	offset = 4096;
 	count = bufsize;
-        if ((fd = open(filename,O_DIRECT|O_RDWR|O_SYNC)) < 0) {
+	if ((fd = open(filename, O_DIRECT | O_RDWR | O_SYNC)) < 0) {
 		tst_brkm(TBROK, cleanup,
-		    "open(%s, O_DIRECT|O_RDWR|O_SYNC failed)", filename);
-        }
+			 "open(%s, O_DIRECT|O_RDWR|O_SYNC failed)", filename);
+	}
 	ret = runtest_s(fd, buf2, offset, count, 17, "opened with O_SYNC");
 	if (ret != 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "read, write for file with O_SYNC");
-	}
-	else
-		tst_resm (TPASS, "read, write for file with O_SYNC");
+		tst_resm(TFAIL, "read, write for file with O_SYNC");
+	} else
+		tst_resm(TPASS, "read, write for file with O_SYNC");
 	total++;
 	close(fd);
 
 	unlink(filename);
 	if (failed)
-		tst_resm(TINFO, "%d/%d test blocks failed",
-			fail_count, total);
+		tst_resm(TINFO, "%d/%d test blocks failed", fail_count, total);
 	else
-		tst_resm(TINFO, "%d testblocks completed",
-		 		 total);
+		tst_resm(TINFO, "%d testblocks completed", total);
 	cleanup();
 
 	tst_exit();
@@ -596,22 +586,25 @@
 
 static void setup(void)
 {
-	struct	sigaction act;
+	struct sigaction act;
 
 	tst_tmpdir();
 
 	act.sa_handler = SIG_IGN;
-	(void) sigaction(SIGXFSZ, &act, NULL);
-	sprintf(filename,"testdata-4.%ld", syscall(__NR_gettid));
+	(void)sigaction(SIGXFSZ, &act, NULL);
+	sprintf(filename, "testdata-4.%ld", syscall(__NR_gettid));
 
-	if ((fd1 = open(filename, O_CREAT|O_EXCL, 0600)) < 0) {
-		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s", filename, strerror(errno));
+	if ((fd1 = open(filename, O_CREAT | O_EXCL, 0600)) < 0) {
+		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s",
+			 filename, strerror(errno));
 	}
 	close(fd1);
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd1 = open(filename, O_DIRECT, 0600)) < 0) {
-		tst_brkm(TCONF, cleanup, "O_DIRECT is not supported by this filesystem. %s", strerror(errno));
+		tst_brkm(TCONF, cleanup,
+			 "O_DIRECT is not supported by this filesystem. %s",
+			 strerror(errno));
 	}
 	close(fd1);
 }
@@ -627,8 +620,8 @@
 
 #else /* O_DIRECT */
 
-int
-main() {
+int main()
+{
 	tst_brkm(TCONF, NULL, "O_DIRECT is not defined.");
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/io/direct_io/diotest5.c b/testcases/kernel/io/direct_io/diotest5.c
index e2a8433..595b198 100644
--- a/testcases/kernel/io/direct_io/diotest5.c
+++ b/testcases/kernel/io/direct_io/diotest5.c
@@ -61,8 +61,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest05";		 		 /* Test program identifier.    */
-int TST_TOTAL=3;		 		 /* Total number of test conditions */
+char *TCID = "diotest05";	/* Test program identifier.    */
+int TST_TOTAL = 3;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -73,44 +73,45 @@
 #define	WRITE_DIRECT 2
 #define	RDWR_DIRECT 3
 
-static int	bufsize = BUFSIZE;	/* Buffer size. Default 4k */
-static int	iter = 20;		/* Iterations. Default 20 */
-static int	nvector = 20;		/* Vector array. Default 20 */
-static off64_t	offset = 0;		/* Start offset. Default 0 */
-static char	filename[LEN];		/* Test data file */
+static int bufsize = BUFSIZE;	/* Buffer size. Default 4k */
+static int iter = 20;		/* Iterations. Default 20 */
+static int nvector = 20;	/* Vector array. Default 20 */
+static off64_t offset = 0;	/* Start offset. Default 0 */
+static char filename[LEN];	/* Test data file */
 static int fd1 = -1;
 /*
  * runtest: Write the data in vector array to the file. Read the data
  *	from the file into another vectory array and verify. Repeat the test.
 */
-int
-runtest(int fd_r, int fd_w, int iter, off64_t offset, int action)
+int runtest(int fd_r, int fd_w, int iter, off64_t offset, int action)
 {
-	int	i, bufsize = BUFSIZE;
-	struct 	iovec	*iov1, *iov2, *iovp;
+	int i, bufsize = BUFSIZE;
+	struct iovec *iov1, *iov2, *iovp;
 
 	/* Allocate for buffers and data pointers */
-	if ((iov1 = (struct iovec *)valloc(sizeof(struct iovec)*nvector)) == NULL) {
+	if ((iov1 =
+	     (struct iovec *)valloc(sizeof(struct iovec) * nvector)) == NULL) {
 		tst_resm(TFAIL, "valloc() buf1 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
-	if ((iov2 = (struct iovec *)valloc(sizeof(struct iovec)*nvector)) == NULL) {
+	if ((iov2 =
+	     (struct iovec *)valloc(sizeof(struct iovec) * nvector)) == NULL) {
 		tst_resm(TFAIL, "valloc buf2 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
 	for (i = 0, iovp = iov1; i < nvector; iovp++, i++) {
 		if ((iovp->iov_base = valloc(bufsize)) == NULL) {
 			tst_resm(TFAIL, "valloc for iovp->iov_base: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		iovp->iov_len = bufsize;
-        }
+	}
 	for (i = 0, iovp = iov2; i < nvector; iovp++, i++) {
 		if ((iovp->iov_base = valloc(bufsize)) == NULL) {
 			tst_resm(TFAIL, "valloc, iov2 for iovp->iov_base: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		iovp->iov_len = bufsize;
 	}
@@ -118,28 +119,28 @@
 	/* Test */
 	for (i = 0; i < iter; i++) {
 		vfillbuf(iov1, nvector, i);
-		vfillbuf(iov2, nvector, i+1);
+		vfillbuf(iov2, nvector, i + 1);
 		if (lseek(fd_w, offset, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before writev failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (writev(fd_w, iov1, nvector) < 0) {
 			tst_resm(TFAIL, "writev failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
 		if (lseek(fd_r, offset, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before readv failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (readv(fd_r, iov2, nvector) < 0) {
 			tst_resm(TFAIL, "readv failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
 		if (vbufcmp(iov1, iov2, nvector) != 0) {
 			tst_resm(TFAIL, "readv/writev comparision failed");
-			return(-1);
+			return (-1);
 		}
 	}
 
@@ -158,26 +159,25 @@
 /*
  * prg_usage: Display the program usage
 */
-void
-prg_usage()
+void prg_usage()
 {
-	fprintf(stderr, "Usage: diotest5 [-b bufsize] [-o offset] [ -i iteration] [ -v nvector] [-f filename]\n");
+	fprintf(stderr,
+		"Usage: diotest5 [-b bufsize] [-o offset] [ -i iteration] [ -v nvector] [-f filename]\n");
 	exit(1);
 }
 
 static void setup(void);
 static void cleanup(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	i, action, fd_r, fd_w;
-	int	fail_count = 0, total = 0, failed = 0;
+	int i, action, fd_r, fd_w;
+	int fail_count = 0, total = 0, failed = 0;
 
 	/* Options */
-	sprintf(filename,"testdata-5.%ld", syscall(__NR_gettid));
+	sprintf(filename, "testdata-5.%ld", syscall(__NR_gettid));
 	while ((i = getopt(argc, argv, "b:o:i:v:f:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((bufsize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "bufsize must be > 0");
@@ -218,21 +218,20 @@
 
 	/* Testblock-1: Read with Direct IO, Write without */
 	action = READ_DIRECT;
-	if ((fd_w = open(filename, O_WRONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_w = open(filename, O_WRONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_w open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
-	if ((fd_r = open64(filename, O_DIRECT|O_RDONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_r = open64(filename, O_DIRECT | O_RDONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_r open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read with Direct IO, Write without");
-	}
-	else
-		tst_resm (TPASS, "Read with Direct IO, Write without");
+		tst_resm(TFAIL, "Read with Direct IO, Write without");
+	} else
+		tst_resm(TPASS, "Read with Direct IO, Write without");
 
 	unlink(filename);
 	close(fd_r);
@@ -241,21 +240,20 @@
 
 	/* Testblock-2: Write with Direct IO, Read without */
 	action = WRITE_DIRECT;
-	if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_w = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_w open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
-	if ((fd_r = open64(filename, O_RDONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_r = open64(filename, O_RDONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_r open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Write with Direct IO, Read without");
-	}
-	else
-		tst_resm (TPASS, "Write with Direct IO, Read without");
+		tst_resm(TFAIL, "Write with Direct IO, Read without");
+	} else
+		tst_resm(TPASS, "Write with Direct IO, Read without");
 	unlink(filename);
 	close(fd_r);
 	close(fd_w);
@@ -263,32 +261,31 @@
 
 	/* Testblock-3: Read, Write with Direct IO */
 	action = RDWR_DIRECT;
-	if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_w = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_w open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
-	if ((fd_r = open64(filename, O_DIRECT|O_RDONLY|O_CREAT, 0666)) < 0) {
+	if ((fd_r = open64(filename, O_DIRECT | O_RDONLY | O_CREAT, 0666)) < 0) {
 		tst_brkm(TBROK, cleanup, "fd_r open failed for %s: %s",
-			filename, strerror(errno));
+			 filename, strerror(errno));
 	}
 	if (runtest(fd_r, fd_w, iter, offset, action) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read, Write with Direct IO");
-	}
-	else
-		tst_resm (TPASS, "Read, Write with Direct IO");
+		tst_resm(TFAIL, "Read, Write with Direct IO");
+	} else
+		tst_resm(TPASS, "Read, Write with Direct IO");
 	unlink(filename);
 	close(fd_r);
 	close(fd_w);
 	total++;
 
 	if (failed)
-		tst_resm(TINFO, "%d/%d testblocks failed",
-			fail_count, total);
+		tst_resm(TINFO, "%d/%d testblocks failed", fail_count, total);
 	else
-		tst_resm(TINFO, "%d testblocks %d iterations with %d vector array completed",
-			total, iter, nvector);
+		tst_resm(TINFO,
+			 "%d testblocks %d iterations with %d vector array completed",
+			 total, iter, nvector);
 
 	cleanup();
 
@@ -299,14 +296,17 @@
 {
 	tst_tmpdir();
 
-	if ((fd1 = open(filename, O_CREAT|O_EXCL, 0600)) < 0) {
-		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s", filename, strerror(errno));
+	if ((fd1 = open(filename, O_CREAT | O_EXCL, 0600)) < 0) {
+		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s",
+			 filename, strerror(errno));
 	}
 	close(fd1);
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd1 = open(filename, O_DIRECT, 0600)) < 0) {
-		tst_brkm(TCONF, cleanup, "O_DIRECT is not supported by this filesystem. %s", strerror(errno));
+		tst_brkm(TCONF, cleanup,
+			 "O_DIRECT is not supported by this filesystem. %s",
+			 strerror(errno));
 	}
 	close(fd1);
 }
@@ -321,10 +321,10 @@
 }
 #else /* O_DIRECT */
 
-int
-main() {
+int main()
+{
 
-		 tst_resm(TCONF,"O_DIRECT is not defined.");
-		 return 0;
+	tst_resm(TCONF, "O_DIRECT is not defined.");
+	return 0;
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/io/direct_io/diotest6.c b/testcases/kernel/io/direct_io/diotest6.c
index abe9398..bd5f36f 100644
--- a/testcases/kernel/io/direct_io/diotest6.c
+++ b/testcases/kernel/io/direct_io/diotest6.c
@@ -58,8 +58,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="diotest06";		 		 /* Test program identifier.    */
-int TST_TOTAL=3;		 		 /* Total number of test conditions */
+char *TCID = "diotest06";	/* Test program identifier.    */
+int TST_TOTAL = 3;		/* Total number of test conditions */
 
 #ifdef O_DIRECT
 
@@ -70,11 +70,11 @@
 #define	WRITE_DIRECT 2
 #define	RDWR_DIRECT 3
 
-static int	iter = 100;		/* Iterations. Default 100 */
-static int	bufsize = BUFSIZE;	/* Buffersize. Default 4k */
-static off64_t	offset = 0;		/* Offset. Default 0 */
-static int	nvector = 20;		/* Vector array. Default 20 */
-static char	filename[LEN];		/* Test data file */
+static int iter = 100;		/* Iterations. Default 100 */
+static int bufsize = BUFSIZE;	/* Buffersize. Default 4k */
+static off64_t offset = 0;	/* Offset. Default 0 */
+static int nvector = 20;	/* Vector array. Default 20 */
+static char filename[LEN];	/* Test data file */
 static int fd1 = -1;
 
 static void setup(void);
@@ -83,10 +83,10 @@
 /*
  * prg_usage: display the program usage
 */
-void
-prg_usage()
+void prg_usage()
 {
-	fprintf(stderr, "Usage: diotest6 [-b bufsize] [-o offset] [-n numchild] [-i iterations] [-v nvector] [-f filename]\n");
+	fprintf(stderr,
+		"Usage: diotest6 [-b bufsize] [-o offset] [-n numchild] [-i iterations] [-v nvector] [-f filename]\n");
 	exit(1);
 }
 
@@ -95,36 +95,37 @@
  *	For each iteration, write data starting at offse+iter*bufsize
  *	location in the file and read from there.
 */
-int
-runtest(int fd_r, int fd_w, int childnum, int action)
+int runtest(int fd_r, int fd_w, int childnum, int action)
 {
-	off64_t	seekoff;
-	int	i, bufsize = BUFSIZE;
-	struct  iovec   *iov1, *iov2, *iovp;
+	off64_t seekoff;
+	int i, bufsize = BUFSIZE;
+	struct iovec *iov1, *iov2, *iovp;
 
 	/* Allocate for buffers and data pointers */
-	seekoff = offset+bufsize * childnum;
-	if ((iov1 = (struct iovec *)valloc(sizeof(struct iovec)*nvector)) == NULL) {
+	seekoff = offset + bufsize * childnum;
+	if ((iov1 =
+	     (struct iovec *)valloc(sizeof(struct iovec) * nvector)) == NULL) {
 		tst_resm(TFAIL, "valloc buf1 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
-	if ((iov2 = (struct iovec *)valloc(sizeof(struct iovec)*nvector)) == NULL) {
+	if ((iov2 =
+	     (struct iovec *)valloc(sizeof(struct iovec) * nvector)) == NULL) {
 		tst_resm(TFAIL, "valloc buf2 failed: %s", strerror(errno));
-		return(-1);
+		return (-1);
 	}
 	for (i = 0, iovp = iov1; i < nvector; iovp++, i++) {
 		if ((iovp->iov_base = valloc(bufsize)) == NULL) {
 			tst_resm(TFAIL, "valloc for iovp->iov_base: %s",
-			strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		iovp->iov_len = bufsize;
 	}
 	for (i = 0, iovp = iov2; i < nvector; iovp++, i++) {
 		if ((iovp->iov_base = valloc(bufsize)) == NULL) {
 			tst_resm(TFAIL, "valloc, iov2 for iovp->iov_base: %s",
-			strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		iovp->iov_len = bufsize;
 	}
@@ -132,141 +133,143 @@
 	/* seek, write, read and verify */
 	for (i = 0; i < iter; i++) {
 		/*
-		fillbuf(buf1, bufsize, childnum+i);
-		*/
-		vfillbuf(iov1, nvector, childnum+i);
+		   fillbuf(buf1, bufsize, childnum+i);
+		 */
+		vfillbuf(iov1, nvector, childnum + i);
 		if (lseek(fd_w, seekoff, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before write failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (write(fd_w, iov1, bufsize) < bufsize) {
 			tst_resm(TFAIL, "write failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
 		if (action == READ_DIRECT) {
 			/* Make sure data is on to disk before read */
 			if (fsync(fd_w) < 0) {
 				tst_resm(TFAIL, "fsync failed: %s",
-					strerror(errno));
-				return(-1);
+					 strerror(errno));
+				return (-1);
 			}
 		}
 		if (lseek(fd_r, seekoff, SEEK_SET) < 0) {
 			tst_resm(TFAIL, "lseek before read failed: %s",
-				strerror(errno));
-			return(-1);
+				 strerror(errno));
+			return (-1);
 		}
 		if (read(fd_r, iov2, bufsize) < bufsize) {
 			tst_resm(TFAIL, "read failed: %s", strerror(errno));
-			return(-1);
+			return (-1);
 		}
-		if (bufcmp((char*)iov1, (char*)iov2, bufsize) != 0) {
+		if (bufcmp((char *)iov1, (char *)iov2, bufsize) != 0) {
 			tst_resm(TFAIL, "comparsion failed. Child=%d offset=%d",
-				childnum, (int)seekoff);
-			return(-1);
+				 childnum, (int)seekoff);
+			return (-1);
 		}
 	}
 	return 0;
 }
+
 /*
  * child_function: open the file for read and write. Call the runtest routine.
 */
-int
-child_function(int childnum, int action)
+int child_function(int childnum, int action)
 {
-	int	fd_w, fd_r;
+	int fd_w, fd_r;
 
-	switch(action) {
-	 case READ_DIRECT:
-		if ((fd_w = open(filename, O_WRONLY|O_CREAT, 0666)) < 0) {
+	switch (action) {
+	case READ_DIRECT:
+		if ((fd_w = open(filename, O_WRONLY | O_CREAT, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_w open failed for %s: %s",
-				filename, strerror(errno));
-			return(-1);
+				 filename, strerror(errno));
+			return (-1);
 		}
-		if ((fd_r = open(filename, O_DIRECT|O_RDONLY, 0666)) < 0) {
+		if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_r open failed for %s: %s",
-				filename, strerror(errno));
+				 filename, strerror(errno));
 			close(fd_w);
 			unlink(filename);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "Read Direct-child %d failed",
-				childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
-	 case WRITE_DIRECT:
-		if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
-			tst_resm(TFAIL, "fd_w open failed for %s: %s",
-				filename, strerror(errno));
-			return(-1);
+	case WRITE_DIRECT:
+		if ((fd_w =
+		     open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
+			tst_resm(TFAIL, "fd_w open failed for %s: %s", filename,
+				 strerror(errno));
+			return (-1);
 		}
 		if ((fd_r = open(filename, O_RDONLY, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_r open failed for %s: %s",
-				filename, strerror(errno));
+				 filename, strerror(errno));
 			close(fd_w);
 			unlink(filename);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "Write Direct-child %d failed",
-				childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
-	 case RDWR_DIRECT:
-		if ((fd_w = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666)) < 0) {
-			tst_resm(TFAIL, "fd_w open failed for %s: %s",
-				filename, strerror(errno));
-			return(-1);
+	case RDWR_DIRECT:
+		if ((fd_w =
+		     open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666)) < 0) {
+			tst_resm(TFAIL, "fd_w open failed for %s: %s", filename,
+				 strerror(errno));
+			return (-1);
 		}
-		if ((fd_r = open(filename, O_DIRECT|O_RDONLY, 0666)) < 0) {
+		if ((fd_r = open(filename, O_DIRECT | O_RDONLY, 0666)) < 0) {
 			tst_resm(TFAIL, "fd_r open failed for %s: %s",
-				filename, strerror(errno));
+				 filename, strerror(errno));
 			close(fd_w);
-			return(-1);
+			return (-1);
 		}
 		if (runtest(fd_r, fd_w, childnum, action) == -1) {
 			tst_resm(TFAIL, "RDWR Direct-child %d failed",
-				childnum);
+				 childnum);
 			close(fd_w);
 			close(fd_r);
-			return(-1);
+			return (-1);
 		}
 		break;
-	  default:
-		fprintf(stderr,"Invalid Action Value\n");
-		return(-1);
+	default:
+		fprintf(stderr, "Invalid Action Value\n");
+		return (-1);
 	}
 	close(fd_w);
 	close(fd_r);
 	exit(0);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	*pidlst;
-	int	numchild = 1;	/* Number of children. Default 5 */
-	int	i, fail_count = 0, failed = 0, total = 0;
+	int *pidlst;
+	int numchild = 1;	/* Number of children. Default 5 */
+	int i, fail_count = 0, failed = 0, total = 0;
 
 	/* Options */
-	sprintf(filename,"testdata-6.%ld", syscall(__NR_gettid));
+	sprintf(filename, "testdata-6.%ld", syscall(__NR_gettid));
 	while ((i = getopt(argc, argv, "b:o:i:n:v:f:")) != -1) {
-		switch(i) {
+		switch (i) {
 		case 'b':
 			if ((bufsize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "bufsize must be > 0\n");
 				prg_usage();
 			}
 			if (bufsize % 4096 != 0) {
-				fprintf(stderr, "bufsize must be multiple of 4k\n");
+				fprintf(stderr,
+					"bufsize must be multiple of 4k\n");
 				prg_usage();
 			}
 			break;
@@ -308,16 +311,14 @@
 	if (forkchldrn(&pidlst, numchild, READ_DIRECT, child_function) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read with Direct IO, Write without");
-	}
-	else {
+		tst_resm(TFAIL, "Read with Direct IO, Write without");
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
-			tst_resm (TFAIL, "Read with Direct IO, Write without");
-		}
-		else
-			tst_resm (TPASS, "Read with Direct IO, Write without");
+			tst_resm(TFAIL, "Read with Direct IO, Write without");
+		} else
+			tst_resm(TPASS, "Read with Direct IO, Write without");
 
 	}
 	unlink(filename);
@@ -328,16 +329,14 @@
 	if (forkchldrn(&pidlst, numchild, WRITE_DIRECT, child_function) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Write with Direct IO, Read without");
-	}
-	else {
+		tst_resm(TFAIL, "Write with Direct IO, Read without");
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
-			tst_resm (TFAIL, "Write with Direct IO, Read without");
-		}
-		else
-			tst_resm (TPASS, "Write with Direct IO, Read without");
+			tst_resm(TFAIL, "Write with Direct IO, Read without");
+		} else
+			tst_resm(TPASS, "Write with Direct IO, Read without");
 	}
 	unlink(filename);
 	free(pidlst);
@@ -347,27 +346,25 @@
 	if (forkchldrn(&pidlst, numchild, RDWR_DIRECT, child_function) < 0) {
 		failed = TRUE;
 		fail_count++;
-		tst_resm (TFAIL, "Read, Write with Direct IO");
-	}
-	else {
+		tst_resm(TFAIL, "Read, Write with Direct IO");
+	} else {
 		if (waitchldrn(&pidlst, numchild) < 0) {
 			failed = TRUE;
 			fail_count++;
-			tst_resm (TFAIL, "Read, Write with Direct IO");
-		}
-		else
-			tst_resm (TPASS, "Read, Write with Direct IO");
+			tst_resm(TFAIL, "Read, Write with Direct IO");
+		} else
+			tst_resm(TPASS, "Read, Write with Direct IO");
 	}
 	unlink(filename);
 	free(pidlst);
 	total++;
 
 	if (failed)
-		tst_resm(TINFO, "%d/%d testblocks failed",
-			fail_count, total);
+		tst_resm(TINFO, "%d/%d testblocks failed", fail_count, total);
 	else
-		tst_resm(TINFO, "%d testblocks %d iterations with %d children completed",
-			total, iter, numchild);
+		tst_resm(TINFO,
+			 "%d testblocks %d iterations with %d children completed",
+			 total, iter, numchild);
 	cleanup();
 	tst_exit();
 }
@@ -376,14 +373,17 @@
 {
 	tst_tmpdir();
 
-	if ((fd1 = open(filename, O_CREAT|O_EXCL, 0600)) < 0) {
-		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s", filename, strerror(errno));
+	if ((fd1 = open(filename, O_CREAT | O_EXCL, 0600)) < 0) {
+		tst_brkm(TBROK, cleanup, "Couldn't create test file %s: %s",
+			 filename, strerror(errno));
 	}
 	close(fd1);
 
 	/* Test for filesystem support of O_DIRECT */
 	if ((fd1 = open(filename, O_DIRECT, 0600)) < 0) {
-		tst_brkm(TCONF, cleanup, "O_DIRECT is not supported by this filesystem. %s", strerror(errno));
+		tst_brkm(TCONF, cleanup,
+			 "O_DIRECT is not supported by this filesystem. %s",
+			 strerror(errno));
 	}
 	close(fd1);
 }
@@ -399,10 +399,10 @@
 
 #else /* O_DIRECT */
 
-int
-main() {
+int main()
+{
 
-		 tst_resm(TCONF,"O_DIRECT is not defined.");
-		 return 0;
+	tst_resm(TCONF, "O_DIRECT is not defined.");
+	return 0;
 }
 #endif /* O_DIRECT */
diff --git a/testcases/kernel/io/direct_io/diotest_routines.c b/testcases/kernel/io/direct_io/diotest_routines.c
index 6fdb5ff..fe03630 100644
--- a/testcases/kernel/io/direct_io/diotest_routines.c
+++ b/testcases/kernel/io/direct_io/diotest_routines.c
@@ -53,18 +53,16 @@
  * fillbuf: Fill buffer of given size with given character value
  * vfillbuf: Fill the vector array
 */
-void
-fillbuf(char *buf, int count, char value)
+void fillbuf(char *buf, int count, char value)
 {
 	while (count > 0) {
-		strncpy(buf,&value,1);
+		strncpy(buf, &value, 1);
 		buf++;
 		count = count - 1;
 	}
 }
 
-void
-vfillbuf(struct iovec *iv, int vcnt, char value)
+void vfillbuf(struct iovec *iv, int vcnt, char value)
 {
 	int i;
 
@@ -77,31 +75,31 @@
  * bufcmp: Compare two buffers
  * vbufcmp: Compare two buffers of two io arrays
 */
-int
-bufcmp(char *b1, char *b2, int bsize)
+int bufcmp(char *b1, char *b2, int bsize)
 {
 	int i;
 
 	for (i = 0; i < bsize; i++) {
 		if (strncmp(&b1[i], &b2[i], 1)) {
-			fprintf(stderr, "bufcmp: offset %d: Expected: 0x%x, got 0x%x\n",
+			fprintf(stderr,
+				"bufcmp: offset %d: Expected: 0x%x, got 0x%x\n",
 				i, b1[i], b2[i]);
-			return(-1);
+			return (-1);
 		}
 	}
 	return (0);
 }
 
-int
-vbufcmp(struct iovec *iv1, struct iovec *iv2, int vcnt)
+int vbufcmp(struct iovec *iv1, struct iovec *iv2, int vcnt)
 {
 	int i;
 
 	for (i = 0; i < vcnt; iv1++, iv2++, i++) {
 		if (bufcmp(iv1->iov_base, iv2->iov_base, iv1->iov_len) < 0) {
 			fprintf(stderr, "Vector: %d, iv1base=%s, iv2base=%s\n",
-				i, (char *)iv1->iov_base, (char *)iv2->iov_base);
-			return(-1);
+				i, (char *)iv1->iov_base,
+				(char *)iv2->iov_base);
+			return (-1);
 		}
 	}
 	return 0;
@@ -110,8 +108,7 @@
 /*
  * compare_files: Compares two files
 */
-int
-filecmp(char *f1, char *f2)
+int filecmp(char *f1, char *f2)
 {
 	int i;
 	int fd1, fd2;
@@ -122,34 +119,38 @@
 	if ((fd1 = open(f1, O_RDONLY)) == -1) {
 		fprintf(stderr, "compare_files: open failed %s: %s",
 			f1, strerror(errno));
-		return(-1);
+		return (-1);
 	}
 	if ((fd2 = open(f2, O_RDONLY)) == -1) {
 		fprintf(stderr, "compare_files: open failed %s: %s",
 			f2, strerror(errno));
 		close(fd1);
-		return(-1);
+		return (-1);
 	}
 
 	/* Compare the files */
-	while ((ret1=read(fd1, buf1, BUFSIZ)) > 0) {
-		ret2=read(fd2, buf2, BUFSIZ);
+	while ((ret1 = read(fd1, buf1, BUFSIZ)) > 0) {
+		ret2 = read(fd2, buf2, BUFSIZ);
 		if (ret1 != ret2) {
 			fprintf(stderr, "compare_file: file length mistmatch:");
 			fprintf(stderr, "read: %d from %s, %d from %s",
 				ret1, f1, ret2, f2);
 			close(fd1);
 			close(fd2);
-			return(-1);
+			return (-1);
 		}
 		for (i = 0; i < ret1; i++) {
 			if (strncmp(&buf1[i], &buf2[i], 1)) {
 				fprintf(stderr, "compare_file: char mismatch:");
-				fprintf(stderr, " %s offset %d: 0x%02x %c  ", f1, i, buf1[i], isprint(buf1[i]) ? buf1[1] : '.');
-				fprintf(stderr, " %s offset %d: 0x%02x %c\n", f2, i, buf2[i], isprint(buf2[i]) ? buf2[i] : '.');
+				fprintf(stderr, " %s offset %d: 0x%02x %c  ",
+					f1, i, buf1[i],
+					isprint(buf1[i]) ? buf1[1] : '.');
+				fprintf(stderr, " %s offset %d: 0x%02x %c\n",
+					f2, i, buf2[i],
+					isprint(buf2[i]) ? buf2[i] : '.');
 				close(fd1);
 				close(fd2);
-				return(-1);
+				return (-1);
 			}
 		}
 	}
@@ -164,27 +165,27 @@
  * forkchldrn: fork the given number of children and set the function
  *		that child should execute.
 */
-int
-forkchldrn(int **pidlst, int numchld, int action, int (*chldfunc)())
+int forkchldrn(int **pidlst, int numchld, int action, int (*chldfunc) ())
 {
 	int i, cpid;
 
-	if ((*pidlst = ((int*)malloc(sizeof(int) * numchld))) == 0) {
+	if ((*pidlst = ((int *)malloc(sizeof(int) * numchld))) == 0) {
 		fprintf(stderr, "forkchldrn: calloc failed for pidlst: %s\n",
 			strerror(errno));
-		return(-1);
+		return (-1);
 	}
-	for (i = 0; i < numchld; i++)
-	{
-		if ((cpid = fork()) < 0)
-		{
-			fprintf(stderr,"forkchldrn: fork child %d failed, %s\n",
-				i, strerror(errno));
+	for (i = 0; i < numchld; i++) {
+		if ((cpid = fork()) < 0) {
+			fprintf(stderr,
+				"forkchldrn: fork child %d failed, %s\n", i,
+				strerror(errno));
 			killchldrn(pidlst, i, SIGTERM);
-			return(-1);
+			return (-1);
 		}
-		if (cpid == 0 ) exit((*chldfunc)(i, action));
-		else *(*pidlst+i) = cpid;
+		if (cpid == 0)
+			exit((*chldfunc) (i, action));
+		else
+			*(*pidlst + i) = cpid;
 	}
 	return 0;
 }
@@ -193,42 +194,44 @@
  * killchldrn: signal the children listed in pidlst with the given signal
  *
 */
-int
-killchldrn(int **pidlst, int numchld, int sig)
+int killchldrn(int **pidlst, int numchld, int sig)
 {
 	int i, cpid, errflag = 0;
 
 	for (i = 0; i < numchld; i++) {
-		cpid = *(*pidlst+i);
+		cpid = *(*pidlst + i);
 		if (cpid > 0) {
 			if (kill(cpid, sig) < 0) {
-				fprintf(stderr,"killchldrn: kill %d failed, %s\n",
-				cpid, strerror(errno));
+				fprintf(stderr,
+					"killchldrn: kill %d failed, %s\n",
+					cpid, strerror(errno));
 				errflag--;
 			}
 		}
 	}
-	return(errflag);
+	return (errflag);
 }
 
 /*
  * waitchldrn: wait for child process listed in pidlst to finish.
 */
-int
-waitchldrn(int **pidlst, int numchld)
+int waitchldrn(int **pidlst, int numchld)
 {
 	int i, cpid, ret, errflag = 0;
 	int status;
 
 	for (i = 0; i < numchld; i++) {
-		cpid= *(*pidlst+i);
-		if (cpid == 0) continue;
-		if ((ret=waitpid(cpid, &status, 0)) != cpid) {
-			fprintf(stderr,"waitchldrn: wait failed for child %d, pid %d: %s\n",
+		cpid = *(*pidlst + i);
+		if (cpid == 0)
+			continue;
+		if ((ret = waitpid(cpid, &status, 0)) != cpid) {
+			fprintf(stderr,
+				"waitchldrn: wait failed for child %d, pid %d: %s\n",
 				i, cpid, strerror(errno));
 			errflag--;
 		}
-		if (status) errflag=-1;
+		if (status)
+			errflag = -1;
 	}
-	return(errflag);
+	return (errflag);
 }
diff --git a/testcases/kernel/io/direct_io/dma_thread_diotest7.c b/testcases/kernel/io/direct_io/dma_thread_diotest7.c
index 39e3092..0b29b89 100644
--- a/testcases/kernel/io/direct_io/dma_thread_diotest7.c
+++ b/testcases/kernel/io/direct_io/dma_thread_diotest7.c
@@ -114,275 +114,281 @@
 
 typedef int bool;
 
-bool	done	= false;
-int	workers = 2;
+bool done = false;
+int workers = 2;
 
 #define PATTERN (0xfa)
 
-static void
-usage (void)
+static void usage(void)
 {
-    fprintf(stderr, "\nUsage: dma_thread [-h | -a <alignment> [ -w <workers>]\n"
-		    "\nWith no arguments, generate test files and exit.\n"
-		    "-h Display this help and exit.\n"
-		    "-a align read buffer to offset <alignment>.\n"
-		    "-w number of worker threads, 2 (default) to 256,\n"
-		    "   defaults to number of cores.\n\n"
-
-		    "Run first with no arguments to generate files.\n"
-		    "Then run with -a <alignment> = 512  or 0. \n");
+	fprintf(stderr,
+		"\nUsage: dma_thread [-h | -a <alignment> [ -w <workers>]\n"
+		"\nWith no arguments, generate test files and exit.\n"
+		"-h Display this help and exit.\n"
+		"-a align read buffer to offset <alignment>.\n"
+		"-w number of worker threads, 2 (default) to 256,\n"
+		"   defaults to number of cores.\n\n"
+		"Run first with no arguments to generate files.\n"
+		"Then run with -a <alignment> = 512  or 0. \n");
 }
 
 typedef struct {
-    pthread_t	    tid;
-    int		    worker_number;
-    int		    fd;
-    int		    offset;
-    int		    length;
-    int		    pattern;
-    unsigned char  *buffer;
+	pthread_t tid;
+	int worker_number;
+	int fd;
+	int offset;
+	int length;
+	int pattern;
+	unsigned char *buffer;
 } worker_t;
 
-void *worker_thread(void * arg)
+void *worker_thread(void *arg)
 {
-    int		    bytes_read;
-    int		    i,k;
-    worker_t	   *worker  = (worker_t *) arg;
-    int		    offset  = worker->offset;
-    int		    fd	    = worker->fd;
-    unsigned char  *buffer  = worker->buffer;
-    int		    pattern = worker->pattern;
-    int		    length  = worker->length;
+	int bytes_read;
+	int i, k;
+	worker_t *worker = (worker_t *) arg;
+	int offset = worker->offset;
+	int fd = worker->fd;
+	unsigned char *buffer = worker->buffer;
+	int pattern = worker->pattern;
+	int length = worker->length;
 
-    if (lseek(fd, offset, SEEK_SET) < 0) {
-	fprintf(stderr, "Failed to lseek to %d on fd %d: %s.\n",
+	if (lseek(fd, offset, SEEK_SET) < 0) {
+		fprintf(stderr, "Failed to lseek to %d on fd %d: %s.\n",
 			offset, fd, strerror(errno));
-	exit(1);
-    }
-
-    bytes_read = read(fd, buffer, length);
-    if (bytes_read != length) {
-	fprintf(stderr, "read failed on fd %d: bytes_read %d, %s\n",
-			fd, bytes_read, strerror(errno));
-	exit(1);
-    }
-
-    /* Corruption check */
-    for (i = 0; i < length; i++) {
-	if (buffer[i] != pattern) {
-	    printf("Bad data at 0x%.06x: %p, \n", i, buffer + i);
-	    printf("Data dump starting at 0x%.06x:\n", i - 8);
-	    printf("Expect 0x%x followed by 0x%x:\n",
-		    pattern, PATTERN);
-
-	    for (k = 0; k < 16; k++) {
-		printf("%02x ", buffer[i - 8 + k]);
-		if (k == 7) {
-		    printf("\n");
-		}
-	    }
-
-	    printf("\n");
-	    abort();
+		exit(1);
 	}
-    }
 
-  return 0;
+	bytes_read = read(fd, buffer, length);
+	if (bytes_read != length) {
+		fprintf(stderr, "read failed on fd %d: bytes_read %d, %s\n",
+			fd, bytes_read, strerror(errno));
+		exit(1);
+	}
+
+	/* Corruption check */
+	for (i = 0; i < length; i++) {
+		if (buffer[i] != pattern) {
+			printf("Bad data at 0x%.06x: %p, \n", i, buffer + i);
+			printf("Data dump starting at 0x%.06x:\n", i - 8);
+			printf("Expect 0x%x followed by 0x%x:\n",
+			       pattern, PATTERN);
+
+			for (k = 0; k < 16; k++) {
+				printf("%02x ", buffer[i - 8 + k]);
+				if (k == 7) {
+					printf("\n");
+				}
+			}
+
+			printf("\n");
+			abort();
+		}
+	}
+
+	return 0;
 }
 
-void *fork_thread (void *arg)
+void *fork_thread(void *arg)
 {
-    pid_t pid;
+	pid_t pid;
 
-    while (!done) {
-	pid = fork();
-	if (pid == 0) {
-	    exit(0);
-	} else if (pid < 0) {
-	    fprintf(stderr, "Failed to fork child.\n");
-	    exit(1);
+	while (!done) {
+		pid = fork();
+		if (pid == 0) {
+			exit(0);
+		} else if (pid < 0) {
+			fprintf(stderr, "Failed to fork child.\n");
+			exit(1);
+		}
+		waitpid(pid, NULL, 0);
+		usleep(100);
 	}
-	waitpid(pid, NULL, 0 );
-	usleep(100);
-    }
 
-    return NULL;
+	return NULL;
 
 }
 
 int main(int argc, char *argv[])
 {
-    unsigned char  *buffer = NULL;
-    char	    filename[1024];
-    int		    fd;
-    bool	    dowrite = true;
-    pthread_t	    fork_tid;
-    int		    c, n, j;
-    worker_t	   *worker;
-    int		    align = 0;
-    int		    offset, rc;
+	unsigned char *buffer = NULL;
+	char filename[1024];
+	int fd;
+	bool dowrite = true;
+	pthread_t fork_tid;
+	int c, n, j;
+	worker_t *worker;
+	int align = 0;
+	int offset, rc;
 
-    workers = sysconf(_SC_NPROCESSORS_ONLN);
+	workers = sysconf(_SC_NPROCESSORS_ONLN);
 
-    while ((c = getopt(argc, argv, "a:hw:")) != -1) {
-	switch (c) {
-	case 'a':
-	    align = atoi(optarg);
-	    if (align < 0 || align > PAGE_SIZE) {
-		printf("Bad alignment %d.\n", align);
-		exit(1);
-	    }
-	    dowrite = false;
-	    break;
+	while ((c = getopt(argc, argv, "a:hw:")) != -1) {
+		switch (c) {
+		case 'a':
+			align = atoi(optarg);
+			if (align < 0 || align > PAGE_SIZE) {
+				printf("Bad alignment %d.\n", align);
+				exit(1);
+			}
+			dowrite = false;
+			break;
 
-	case 'h':
-	    usage();
-	    exit(0);
-	    break;
+		case 'h':
+			usage();
+			exit(0);
+			break;
 
-	case 'w':
-	    workers = atoi(optarg);
-	    if (workers < MIN_WORKERS || workers > MAX_WORKERS) {
-		fprintf(stderr, "Worker count %d not between "
-				"%d and %d, inclusive.\n",
-				workers, MIN_WORKERS, MAX_WORKERS);
+		case 'w':
+			workers = atoi(optarg);
+			if (workers < MIN_WORKERS || workers > MAX_WORKERS) {
+				fprintf(stderr, "Worker count %d not between "
+					"%d and %d, inclusive.\n",
+					workers, MIN_WORKERS, MAX_WORKERS);
+				usage();
+				exit(1);
+			}
+			dowrite = false;
+			break;
+
+		default:
+			usage();
+			exit(1);
+		}
+	}
+
+	if (argc > 1 && (optind < argc)) {
+		fprintf(stderr, "Bad command line.\n");
 		usage();
 		exit(1);
-	    }
-	    dowrite = false;
-	    break;
-
-	default:
-	    usage();
-	    exit(1);
-	}
-    }
-
-    if (argc > 1 && (optind < argc)) {
-	fprintf(stderr, "Bad command line.\n");
-	usage();
-	exit(1);
-    }
-
-    if (dowrite) {
-
-	buffer = malloc(FILESIZE);
-	if (buffer == NULL) {
-	    fprintf(stderr, "Failed to malloc write buffer.\n");
-	    exit(1);
 	}
 
+	if (dowrite) {
+
+		buffer = malloc(FILESIZE);
+		if (buffer == NULL) {
+			fprintf(stderr, "Failed to malloc write buffer.\n");
+			exit(1);
+		}
+
+		for (n = 1; n <= FILECOUNT; n++) {
+			sprintf(filename, FILENAME, n);
+			fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
+			if (fd < 0) {
+				printf("create failed(%s): %s.\n", filename,
+				       strerror(errno));
+				exit(1);
+			}
+			memset(buffer, n, FILESIZE);
+			printf("Writing file %s.\n", filename);
+			if (write(fd, buffer, FILESIZE) != FILESIZE) {
+				printf("write failed (%s)\n", filename);
+			}
+
+			close(fd);
+			fd = -1;
+		}
+
+		free(buffer);
+		buffer = NULL;
+
+		printf("done\n");
+		exit(0);
+	}
+
+	printf("Using %d workers.\n", workers);
+
+	worker = malloc(workers * sizeof(worker_t));
+	if (worker == NULL) {
+		fprintf(stderr, "Failed to malloc worker array.\n");
+		exit(1);
+	}
+
+	for (j = 0; j < workers; j++) {
+		worker[j].worker_number = j;
+	}
+
+	printf("Using alignment %d.\n", align);
+
+	posix_memalign((void *)&buffer, PAGE_SIZE, READSIZE + align);
+	printf("Read buffer: %p.\n", buffer);
 	for (n = 1; n <= FILECOUNT; n++) {
-	    sprintf(filename, FILENAME, n);
-	    fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
-	    if (fd < 0) {
-		printf("create failed(%s): %s.\n", filename, strerror(errno));
-		exit(1);
-	    }
-	    memset(buffer, n, FILESIZE);
-	    printf("Writing file %s.\n", filename);
-	    if (write(fd, buffer, FILESIZE) != FILESIZE) {
-		printf("write failed (%s)\n", filename);
-	    }
 
-	    close(fd);
-	    fd = -1;
-	}
+		sprintf(filename, FILENAME, n);
+		for (j = 0; j < workers; j++) {
+			if ((worker[j].fd =
+			     open(filename, O_RDONLY | O_DIRECT)) < 0) {
+				fprintf(stderr, "Failed to open %s: %s.\n",
+					filename, strerror(errno));
+				exit(1);
+			}
 
-	free(buffer);
-	buffer = NULL;
-
-	printf("done\n");
-	exit(0);
-    }
-
-    printf("Using %d workers.\n", workers);
-
-    worker = malloc(workers * sizeof(worker_t));
-    if (worker == NULL) {
-	fprintf(stderr, "Failed to malloc worker array.\n");
-	exit(1);
-    }
-
-    for (j = 0; j < workers; j++) {
-	worker[j].worker_number = j;
-    }
-
-    printf("Using alignment %d.\n", align);
-
-    posix_memalign((void *)&buffer, PAGE_SIZE, READSIZE+ align);
-    printf("Read buffer: %p.\n", buffer);
-    for (n = 1; n <= FILECOUNT; n++) {
-
-	sprintf(filename, FILENAME, n);
-	for (j = 0; j < workers; j++) {
-	    if ((worker[j].fd = open(filename,  O_RDONLY|O_DIRECT)) < 0) {
-		fprintf(stderr, "Failed to open %s: %s.\n",
-				filename, strerror(errno));
-		exit(1);
-	    }
-
-	    worker[j].pattern = n;
-	}
-
-	printf("Reading file %d.\n", n);
-
-	for (offset = 0; offset < FILESIZE; offset += READSIZE) {
-	    memset(buffer, PATTERN, READSIZE + align);
-	    for (j = 0; j < workers; j++) {
-		worker[j].offset = offset + j * PAGE_SIZE;
-		worker[j].buffer = buffer + align + j * PAGE_SIZE;
-		worker[j].length = PAGE_SIZE;
-	    }
-	    /* The final worker reads whatever is left over. */
-	    worker[workers - 1].length = READSIZE - PAGE_SIZE * (workers - 1);
-
-	    done = 0;
-
-	    rc = pthread_create(&fork_tid, NULL, fork_thread, NULL);
-	    if (rc != 0) {
-		fprintf(stderr, "Can't create fork thread: %s.\n",
-				strerror(rc));
-		exit(1);
-	    }
-
-	    for (j = 0; j < workers; j++) {
-		rc = pthread_create(&worker[j].tid,
-				    NULL,
-				    worker_thread,
-				    worker + j);
-		if (rc != 0) {
-		    fprintf(stderr, "Can't create worker thread %d: %s.\n",
-				    j, strerror(rc));
-		    exit(1);
+			worker[j].pattern = n;
 		}
-	    }
 
-	    for (j = 0; j < workers; j++) {
-		rc = pthread_join(worker[j].tid, NULL);
-		if (rc != 0) {
-		    fprintf(stderr, "Failed to join worker thread %d: %s.\n",
-				    j, strerror(rc));
-		    exit(1);
+		printf("Reading file %d.\n", n);
+
+		for (offset = 0; offset < FILESIZE; offset += READSIZE) {
+			memset(buffer, PATTERN, READSIZE + align);
+			for (j = 0; j < workers; j++) {
+				worker[j].offset = offset + j * PAGE_SIZE;
+				worker[j].buffer =
+				    buffer + align + j * PAGE_SIZE;
+				worker[j].length = PAGE_SIZE;
+			}
+			/* The final worker reads whatever is left over. */
+			worker[workers - 1].length =
+			    READSIZE - PAGE_SIZE * (workers - 1);
+
+			done = 0;
+
+			rc = pthread_create(&fork_tid, NULL, fork_thread, NULL);
+			if (rc != 0) {
+				fprintf(stderr,
+					"Can't create fork thread: %s.\n",
+					strerror(rc));
+				exit(1);
+			}
+
+			for (j = 0; j < workers; j++) {
+				rc = pthread_create(&worker[j].tid,
+						    NULL,
+						    worker_thread, worker + j);
+				if (rc != 0) {
+					fprintf(stderr,
+						"Can't create worker thread %d: %s.\n",
+						j, strerror(rc));
+					exit(1);
+				}
+			}
+
+			for (j = 0; j < workers; j++) {
+				rc = pthread_join(worker[j].tid, NULL);
+				if (rc != 0) {
+					fprintf(stderr,
+						"Failed to join worker thread %d: %s.\n",
+						j, strerror(rc));
+					exit(1);
+				}
+			}
+
+			/* Let the fork thread know it's ok to exit */
+			done = 1;
+
+			rc = pthread_join(fork_tid, NULL);
+			if (rc != 0) {
+				fprintf(stderr,
+					"Failed to join fork thread: %s.\n",
+					strerror(rc));
+				exit(1);
+			}
 		}
-	    }
 
-	    /* Let the fork thread know it's ok to exit */
-	    done = 1;
-
-	    rc = pthread_join(fork_tid, NULL);
-	    if (rc != 0) {
-		fprintf(stderr, "Failed to join fork thread: %s.\n",
-				strerror(rc));
-		exit(1);
-	    }
+		/* Close the fd's for the next file. */
+		for (j = 0; j < workers; j++) {
+			close(worker[j].fd);
+		}
 	}
 
-	/* Close the fd's for the next file. */
-	for (j = 0; j < workers; j++) {
-	    close(worker[j].fd);
-	}
-    }
-
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/io/disktest/Getopt.c b/testcases/kernel/io/disktest/Getopt.c
index 8c12346..57c2927 100644
--- a/testcases/kernel/io/disktest/Getopt.c
+++ b/testcases/kernel/io/disktest/Getopt.c
@@ -90,10 +90,11 @@
 int optind;
 char *optarg;
 
-int getopt (int argc, char** argv, char* pszValidOpts) {
+int getopt(int argc, char **argv, char *pszValidOpts)
+{
 	char chOpt;
-	char* psz = NULL;
-	char* pszParam = NULL;
+	char *psz = NULL;
+	char *pszParam = NULL;
 	static int iArg = 1;
 
 	if (iArg < argc) {
@@ -111,19 +112,32 @@
 						psz = &(argv[iArg][2]);
 						if (*psz == '\0') {
 							/* must look at next argv for param */
-							if (iArg+1 < argc) {
-								psz = &(argv[iArg+1][0]);
-								if (*psz == '-' || *psz == '/') {
+							if (iArg + 1 < argc) {
+								psz =
+								    &(argv
+								      [iArg +
+								       1][0]);
+								if (*psz == '-'
+								    || *psz ==
+								    '/') {
 									/* next argv is a new option, so param
 									 * not given for current option
-									*/
-									fprintf(stderr, "-%c option requires an argument.\n", chOpt);
-									chOpt = '?';
-									pszParam = NULL;
+									 */
+									fprintf
+									    (stderr,
+									     "-%c option requires an argument.\n",
+									     chOpt);
+									chOpt =
+									    '?';
+									pszParam
+									    =
+									    NULL;
 								} else {
 									/* next argv is the param */
 									iArg++;
-									pszParam = psz;
+									pszParam
+									    =
+									    psz;
 								}
 							} else {
 								/* reached end of args looking for param */
@@ -137,7 +151,9 @@
 					}
 				} else {
 					/* option specified is not in list of valid options */
-					fprintf(stderr, "Invalid option -- %c\n", chOpt);
+					fprintf(stderr,
+						"Invalid option -- %c\n",
+						chOpt);
 					chOpt = '?';
 					pszParam = NULL;
 				}
diff --git a/testcases/kernel/io/disktest/childmain.c b/testcases/kernel/io/disktest/childmain.c
index 11038df..41cd271 100644
--- a/testcases/kernel/io/disktest/childmain.c
+++ b/testcases/kernel/io/disktest/childmain.c
@@ -64,29 +64,31 @@
  * The following three functions are used to mutex LBAs that are in use by another
  * thread from any other thread performing an action on that lba.
  */
-unsigned short action_in_use(const test_env_t *env, const action_t target)
+unsigned short action_in_use(const test_env_t * env, const action_t target)
 {
 	int i = 0;
 
 	for (i = 0; i < env->action_list_entry; i++) {
-		if ((target.lba == env->action_list[i].lba) /* attempting same transfer start lba */
-		|| ((target.lba < env->action_list[i].lba) && (target.lba+target.trsiz-1) >= env->action_list[i].lba) /* attempting transfer over an lba in use */
-		) {
+		if ((target.lba == env->action_list[i].lba)	/* attempting same transfer start lba */
+		    ||((target.lba < env->action_list[i].lba) && (target.lba + target.trsiz - 1) >= env->action_list[i].lba)	/* attempting transfer over an lba in use */
+		    ) {
 			/*
 			 * The lba(s) we want to do IO to are in use by another thread,
 			 * but since POSIX allows for multiple readers, we need to compare
 			 * our action with the action being executed by the other thread
 			 */
-			switch(target.oper) {
-				case WRITER : /* if we want to write, we can't */
+			switch (target.oper) {
+			case WRITER:	/* if we want to write, we can't */
+				return TRUE;
+			case READER:	/* if we want to read, and a write is in progress, we can't */
+				if (env->action_list[i].oper == WRITER) {
 					return TRUE;
-				case READER : /* if we want to read, and a write is in progress, we can't */
-					if (env->action_list[i].oper == WRITER) { return TRUE; }
-					/* otherwise allow multiple readers */
-					return FALSE;
-				default:
-					/* for all other operations, always assume inuse */
-					return TRUE;
+				}
+				/* otherwise allow multiple readers */
+				return FALSE;
+			default:
+				/* for all other operations, always assume inuse */
+				return TRUE;
 			}
 		}
 	}
@@ -94,45 +96,50 @@
 	return FALSE;
 }
 
-void add_action(test_env_t *env, const child_args_t *args, const action_t target)
+void add_action(test_env_t * env, const child_args_t * args,
+		const action_t target)
 {
 
-	if (env->action_list_entry == args->t_kids) { /* we should never get here */
-		printf("ATTEMPT TO ADD MORE ENTRIES TO LBA WRITE LIST THEN ALLOWED, CODE BUG!!!\n");
+	if (env->action_list_entry == args->t_kids) {	/* we should never get here */
+		printf
+		    ("ATTEMPT TO ADD MORE ENTRIES TO LBA WRITE LIST THEN ALLOWED, CODE BUG!!!\n");
 		abort();
 	}
 
 	env->action_list[env->action_list_entry++] = target;
 }
 
-void remove_action(test_env_t *env, const action_t target)
+void remove_action(test_env_t * env, const action_t target)
 {
 	int i = 0;
 
 	if (env->action_list_entry == 0) {
 		/* we should never get here */
-		printf("ATTEMPT TO REMOVE ENTRIES FROM LBA WRITE LIST WHERE NONE EXIST, CODE BUG!!!\n");
+		printf
+		    ("ATTEMPT TO REMOVE ENTRIES FROM LBA WRITE LIST WHERE NONE EXIST, CODE BUG!!!\n");
 		abort();
 	}
 
 	/* look for the removing target */
 	while (target.lba != env->action_list[i].lba) {
 		if (env->action_list_entry == i++) {
-			printf("INDEX AND CURRENT LIST ENTRY, CODE BUG!!!!!!\n");
+			printf
+			    ("INDEX AND CURRENT LIST ENTRY, CODE BUG!!!!!!\n");
 			abort();
 		}
 	}
 
 	/* move eny other entries down */
-	for (;i < env->action_list_entry-1; i++) {
-		env->action_list[i] = env->action_list[i+1];
+	for (; i < env->action_list_entry - 1; i++) {
+		env->action_list[i] = env->action_list[i + 1];
 	}
 
 	/* reduce the slot */
 	env->action_list_entry--;
 }
 
-void decrement_io_count(const child_args_t *args, test_env_t *env, const action_t target)
+void decrement_io_count(const child_args_t * args, test_env_t * env,
+			const action_t target)
 {
 	if (args->flags & CLD_FLG_LBA_SYNC) {
 		remove_action(env, target);
@@ -149,9 +156,10 @@
  * a target, if an error occured on the target.  This
  * is so a trigger can be set, i.e. on an analyser.
  */
-void write_error_mark(fd_t fd, char *data) {
-	OFF_T ActualBytePos=0;
-	long tcnt=0;
+void write_error_mark(fd_t fd, char *data)
+{
+	OFF_T ActualBytePos = 0;
+	long tcnt = 0;
 
 	ActualBytePos = Seek(fd, 0);
 	if (ActualBytePos != 0) {
@@ -159,7 +167,8 @@
 		return;
 	}
 
-	memcpy(data, "DISKTEST ERROR OCCURRED", strlen("DISKTEST ERROR OCCURRED"));
+	memcpy(data, "DISKTEST ERROR OCCURRED",
+	       strlen("DISKTEST ERROR OCCURRED"));
 	tcnt = Write(fd, data, BLK_SIZE);
 }
 
@@ -167,21 +176,26 @@
  * Sets the test state correctly, and updates test flags
  * based on user parsed options
  */
-void update_test_state(child_args_t *args, test_env_t *env, const int this_thread_id, fd_t fd, char *data)
+void update_test_state(child_args_t * args, test_env_t * env,
+		       const int this_thread_id, fd_t fd, char *data)
 {
 	extern unsigned short glb_run;
-	extern unsigned long  glb_flags;
+	extern unsigned long glb_flags;
 
 	if (args->flags & CLD_FLG_ALLDIE) {
 #ifdef _DEBUG
-		PDBG4(DBUG, args, "Thread %d: Setting bContinue to FALSE, io error, all die\n", this_thread_id);
+		PDBG4(DBUG, args,
+		      "Thread %d: Setting bContinue to FALSE, io error, all die\n",
+		      this_thread_id);
 #endif
 		args->test_state = SET_STS_FAIL(args->test_state);
 		env->bContinue = FALSE;
 	}
 	if (glb_flags & GLB_FLG_KILL) {
 #ifdef _DEBUG
-		PDBG4(DBUG, args, "Thread %d: Setting bContinue to FALSE, io error, global die\n", this_thread_id);
+		PDBG4(DBUG, args,
+		      "Thread %d: Setting bContinue to FALSE, io error, global die\n",
+		      this_thread_id);
 #endif
 		args->test_state = SET_STS_FAIL(args->test_state);
 		env->bContinue = FALSE;
@@ -194,23 +208,24 @@
 
 #ifdef _DEBUG
 #ifdef _DEBUG_PRINTMAP
-void print_lba_bitmap(const test_env_t *env)
+void print_lba_bitmap(const test_env_t * env)
 {
 	unsigned char *wbitmap = (unsigned char *)env->shared_mem + BMP_OFFSET;
 	int i;
 
-	for (i=0;i<(env->bmp_siz-1);i++) {
-		printf("%02x",*(wbitmap+i));
+	for (i = 0; i < (env->bmp_siz - 1); i++) {
+		printf("%02x", *(wbitmap + i));
 	}
 	printf("\n");
 }
 #endif
 #endif
 
-action_t get_next_action(child_args_t *args, test_env_t *env, const OFF_T mask)
+action_t get_next_action(child_args_t * args, test_env_t * env,
+			 const OFF_T mask)
 {
 
-	OFF_T *pVal1 = (OFF_T *)env->shared_mem;
+	OFF_T *pVal1 = (OFF_T *) env->shared_mem;
 	OFF_T *tmpLBA;
 	OFF_T guessLBA;
 	unsigned char *wbitmap = (unsigned char *)env->shared_mem + BMP_OFFSET;
@@ -224,18 +239,26 @@
 	target.oper = env->lastAction.oper;
 	if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD)) {
 		target.oper = TST_OPER(args->test_state);
-	} else if ((args->flags & CLD_FLG_RANDOM) && !(args->flags & CLD_FLG_NTRLVD)) {
-		if ((((env->wcount)*100)/(((env->rcount)+1)+(env->wcount))) >= (args->wperc)) {
+	} else if ((args->flags & CLD_FLG_RANDOM)
+		   && !(args->flags & CLD_FLG_NTRLVD)) {
+		if ((((env->wcount) * 100) /
+		     (((env->rcount) + 1) + (env->wcount))) >= (args->wperc)) {
 			target.oper = READER;
 		} else {
 			target.oper = WRITER;
 		}
 #ifdef _DEBUG
-		PDBG4(DBUG, args, "W:%.2f%% R:%.2f%%\n",  100*((double)(env->wcount)/((double)env->rcount+(double)env->wcount)), 100*((double)(env->rcount)/((double)env->wcount+(double)env->rcount)));
+		PDBG4(DBUG, args, "W:%.2f%% R:%.2f%%\n",
+		      100 * ((double)(env->wcount) /
+			     ((double)env->rcount + (double)env->wcount)),
+		      100 * ((double)(env->rcount) /
+			     ((double)env->wcount + (double)env->rcount)));
 #endif
-	} else if ((args->flags & CLD_FLG_NTRLVD) && !TST_wFST_TIME(args->test_state)) {
+	} else if ((args->flags & CLD_FLG_NTRLVD)
+		   && !TST_wFST_TIME(args->test_state)) {
 		if ((args->flags & CLD_FLG_R) && (args->flags & CLD_FLG_W)) {
-			target.oper = (env->lastAction.oper == WRITER) ? READER : WRITER;
+			target.oper =
+			    (env->lastAction.oper == WRITER) ? READER : WRITER;
 		}
 	} else if (target.oper == NONE) {
 		/* if still no decision for an operation, do the basics */
@@ -247,42 +270,52 @@
 		target.trsiz = args->ltrsiz;
 	} else {
 		if ((args->flags & CLD_FLG_NTRLVD) &&
-				(args->flags & CLD_FLG_W) &&
-				(args->flags & CLD_FLG_R) &&
-				(env->lastAction.trsiz != 0) &&
-				(target.oper == READER)) {
+		    (args->flags & CLD_FLG_W) &&
+		    (args->flags & CLD_FLG_R) &&
+		    (env->lastAction.trsiz != 0) && (target.oper == READER)) {
 			target.trsiz = env->lastAction.trsiz;
 		} else {
 			do {
-				target.trsiz = (rand()&0xFFF) + args->ltrsiz;
-				if ((args->flags & CLD_FLG_SKS) && (((env->wcount)+(env->rcount)) >= args->seeks))
+				target.trsiz = (rand() & 0xFFF) + args->ltrsiz;
+				if ((args->flags & CLD_FLG_SKS)
+				    && (((env->wcount) + (env->rcount)) >=
+					args->seeks))
 					break;
 			} while (target.trsiz > args->htrsiz);
 		}
 	}
 
 	/* pick an lba */
-	if (args->start_blk == args->stop_blk) { /* diskcache test */
+	if (args->start_blk == args->stop_blk) {	/* diskcache test */
 		target.lba = args->start_lba + args->offset;
 	} else if (args->flags & CLD_FLG_LINEAR) {
-		tmpLBA = (target.oper == WRITER) ? pVal1+OFF_WLBA : pVal1+OFF_RLBA;
+		tmpLBA =
+		    (target.oper ==
+		     WRITER) ? pVal1 + OFF_WLBA : pVal1 + OFF_RLBA;
 		direct = (TST_DIRCTN(args->test_state)) ? 1 : -1;
 		if ((target.oper == WRITER) && TST_wFST_TIME(args->test_state)) {
 			*(tmpLBA) = args->start_lba + args->offset;
-		} else if ((target.oper == READER) && TST_rFST_TIME(args->test_state)) {
+		} else if ((target.oper == READER)
+			   && TST_rFST_TIME(args->test_state)) {
 			*(tmpLBA) = args->start_lba + args->offset;
-		} else if ((TST_DIRCTN(args->test_state)) && ((*(tmpLBA)+(target.trsiz-1)) <= args->stop_lba)) {
-		} else if (!(TST_DIRCTN(args->test_state)) && (*(tmpLBA) >= (args->start_lba+args->offset))) {
+		} else if ((TST_DIRCTN(args->test_state))
+			   && ((*(tmpLBA) + (target.trsiz - 1)) <=
+			       args->stop_lba)) {
+		} else if (!(TST_DIRCTN(args->test_state))
+			   && (*(tmpLBA) >= (args->start_lba + args->offset))) {
 		} else {
 			if (args->flags & CLD_FLG_LUNU) {
-				*(tmpLBA) = args->start_lba+args->offset;
-				if ((args->flags & CLD_FLG_CYC) && (target.oper == WRITER)) {
+				*(tmpLBA) = args->start_lba + args->offset;
+				if ((args->flags & CLD_FLG_CYC)
+				    && (target.oper == WRITER)) {
 					target.oper = NONE;
 				}
 			} else if (args->flags & CLD_FLG_LUND) {
 				args->test_state = DIRCT_CNG(args->test_state);
-				direct = (TST_DIRCTN(args->test_state)) ? 1 : -1;
-				*(tmpLBA) += (OFF_T) direct * (OFF_T) target.trsiz;
+				direct =
+				    (TST_DIRCTN(args->test_state)) ? 1 : -1;
+				*(tmpLBA) +=
+				    (OFF_T) direct *(OFF_T) target.trsiz;
 				if ((args->flags & CLD_FLG_CYC) && (direct > 0)) {
 					target.oper = NONE;
 				}
@@ -291,27 +324,35 @@
 		target.lba = *(tmpLBA);
 	} else if (args->flags & CLD_FLG_RANDOM) {
 		if ((args->flags & CLD_FLG_NTRLVD)
-		  && (args->flags & CLD_FLG_W)
-		  && (args->flags & CLD_FLG_R)
-		  && (target.oper == READER)) {
+		    && (args->flags & CLD_FLG_W)
+		    && (args->flags & CLD_FLG_R)
+		    && (target.oper == READER)) {
 			target.lba = env->lastAction.lba;
 		} else {
 			do {
-				target.lba = (Rand64()&mask) + args->start_lba;
+				target.lba =
+				    (Rand64() & mask) + args->start_lba;
 			} while (target.lba > args->stop_lba);
 
-			guessLBA = ALIGN(target.lba, target.trsiz)+args->offset;
-			if (guessLBA > args->stop_lba) { target.lba = guessLBA = args->stop_lba; }
+			guessLBA =
+			    ALIGN(target.lba, target.trsiz) + args->offset;
+			if (guessLBA > args->stop_lba) {
+				target.lba = guessLBA = args->stop_lba;
+			}
 			if (target.lba != guessLBA) {
-				if ((target.lba - guessLBA) <= ((guessLBA + target.trsiz) - target.lba)) {
+				if ((target.lba - guessLBA) <=
+				    ((guessLBA + target.trsiz) - target.lba)) {
 					target.lba = guessLBA;
-				} else if ((guessLBA + target.trsiz) > args->stop_lba) {
+				} else if ((guessLBA + target.trsiz) >
+					   args->stop_lba) {
 					target.lba = guessLBA;
 				} else {
 					target.lba = guessLBA + target.trsiz;
 				}
 			}
-			if ((target.lba+(target.trsiz-1)) > args->stop_lba) { target.lba -= target.trsiz; }
+			if ((target.lba + (target.trsiz - 1)) > args->stop_lba) {
+				target.lba -= target.trsiz;
+			}
 		}
 	}
 	if ((args->flags & CLD_FLG_LBA_SYNC) && (action_in_use(env, target))) {
@@ -319,18 +360,19 @@
 	}
 
 	if (!(args->flags & CLD_FLG_NTRLVD)
-		&& !(args->flags & CLD_FLG_RANDOM)
-		&& (args->flags & CLD_FLG_W)
-		&& (args->flags & CLD_FLG_R)) {
-			if (((target.oper == WRITER) ? env->wcount : env->rcount) >= (args->seeks/2)) {
-				target.oper = NONE;
-			}
+	    && !(args->flags & CLD_FLG_RANDOM)
+	    && (args->flags & CLD_FLG_W)
+	    && (args->flags & CLD_FLG_R)) {
+		if (((target.oper == WRITER) ? env->wcount : env->rcount) >=
+		    (args->seeks / 2)) {
+			target.oper = NONE;
+		}
 	}
 
 	/* get out if exceeded one of the following */
 	if ((args->flags & CLD_FLG_SKS)
-		&& (((env->wcount)+(env->rcount)) >= args->seeks)) {
-			target.oper = NONE;
+	    && (((env->wcount) + (env->rcount)) >= args->seeks)) {
+		target.oper = NONE;
 	}
 
 	/*
@@ -341,9 +383,15 @@
 	 * only matters of error checking or write once
 	 */
 	blk_written = 1;
-	if (args->flags & (CLD_FLG_CMPR|CLD_FLG_WRITE_ONCE)) {
-		for (i=0;i<target.trsiz;i++) {
-			if ((*(wbitmap+(((target.lba-args->offset-args->start_lba)+i)/8))&(0x80>>(((target.lba-args->offset-args->start_lba)+i)%8))) == 0) {
+	if (args->flags & (CLD_FLG_CMPR | CLD_FLG_WRITE_ONCE)) {
+		for (i = 0; i < target.trsiz; i++) {
+			if ((*
+			     (wbitmap +
+			      (((target.lba - args->offset - args->start_lba) +
+				i) / 8)) & (0x80 >> (((target.lba -
+						       args->offset -
+						       args->start_lba) +
+						      i) % 8))) == 0) {
 				blk_written = 0;
 				break;
 			}
@@ -351,16 +399,20 @@
 	}
 
 	/* get out, nothing to do */
-	if ((target.oper == NONE) || (target.oper == RETRY));
+	if ((target.oper == NONE) || (target.oper == RETRY)) ;
 	/* get out, read only, or not comparing */
-	else if (!(args->flags & CLD_FLG_W));
+	else if (!(args->flags & CLD_FLG_W)) ;
 	/* get out, we are a writer, write once enabled, and block not written */
-	else if ((target.oper == WRITER) && (args->flags & CLD_FLG_WRITE_ONCE) && !blk_written);
+	else if ((target.oper == WRITER) && (args->flags & CLD_FLG_WRITE_ONCE)
+		 && !blk_written) ;
 	/* get out, we are a writer and not write once */
-	else if ((target.oper == WRITER) && !(args->flags & CLD_FLG_WRITE_ONCE));
+	else if ((target.oper == WRITER)
+		 && !(args->flags & CLD_FLG_WRITE_ONCE)) ;
 	/* get out, we are a reader, and blocks written */
-	else if ((target.oper == READER) && blk_written);
-	else if ((args->flags & CLD_FLG_LINEAR) || ((args->flags & CLD_FLG_NTRLVD) && (args->flags & CLD_FLG_RANDOM))) {
+	else if ((target.oper == READER) && blk_written) ;
+	else if ((args->flags & CLD_FLG_LINEAR)
+		 || ((args->flags & CLD_FLG_NTRLVD)
+		     && (args->flags & CLD_FLG_RANDOM))) {
 		if (!blk_written) {
 			/*
 			 * if we are linear and not interleaved and on the read pass
@@ -370,11 +422,11 @@
 			 * over at start_lba+offset.
 			 */
 			if ((args->flags & CLD_FLG_LINEAR) &&
-					!(args->flags & CLD_FLG_NTRLVD) &&
-					(args->flags & CLD_FLG_RTRSIZ) &&
-					(target.oper == READER)) {
-				tmpLBA = pVal1+OFF_RLBA;
-				*(tmpLBA) = args->start_lba+args->offset;
+			    !(args->flags & CLD_FLG_NTRLVD) &&
+			    (args->flags & CLD_FLG_RTRSIZ) &&
+			    (target.oper == READER)) {
+				tmpLBA = pVal1 + OFF_RLBA;
+				*(tmpLBA) = args->start_lba + args->offset;
 				target.lba = *(tmpLBA);
 			} else {
 				/*
@@ -384,12 +436,14 @@
 				target.oper = RETRY;
 			}
 		}
-	} else if ((target.oper == READER) && (args->flags & CLD_FLG_CMPR) && !blk_written) {
+	} else if ((target.oper == READER) && (args->flags & CLD_FLG_CMPR)
+		   && !blk_written) {
 		/* should have been a random reader, but blk not written, and running with compare, so make me a writer */
 		target.oper = WRITER;
 		args->test_state = SET_OPER_W(args->test_state);
 		/* if we switched to a writer, then we have to check action_in_use again */
-		if ((args->flags & CLD_FLG_LBA_SYNC) && (action_in_use(env, target))) {
+		if ((args->flags & CLD_FLG_LBA_SYNC)
+		    && (action_in_use(env, target))) {
 			target.oper = RETRY;
 		}
 	} else {
@@ -401,33 +455,43 @@
 
 #ifdef _DEBUG
 #ifdef WINDOWS
-	PDBG5(DBUG, args, "%I64d, %I64d, %I64d, %I64d\n", env->wcount, env->rcount, args->seeks, args->stop_lba);
+	PDBG5(DBUG, args, "%I64d, %I64d, %I64d, %I64d\n", env->wcount,
+	      env->rcount, args->seeks, args->stop_lba);
 #else
-	PDBG5(DBUG, args, "%lld, %lld, %lld, %lld\n", env->wcount, env->rcount, args->seeks, args->stop_lba);
+	PDBG5(DBUG, args, "%lld, %lld, %lld, %lld\n", env->wcount, env->rcount,
+	      args->seeks, args->stop_lba);
 #endif
 #endif
 
 	if (target.oper == WRITER) {
 		(env->wcount)++;
 		if ((args->flags & CLD_FLG_LUND))
-			*(pVal1+OFF_RLBA) = *(pVal1+OFF_WLBA);
-		*(pVal1+OFF_WLBA) += (OFF_T) direct * (OFF_T) target.trsiz;
-		if (TST_wFST_TIME(args->test_state)) args->test_state = CLR_wFST_TIME(args->test_state);
+			*(pVal1 + OFF_RLBA) = *(pVal1 + OFF_WLBA);
+		*(pVal1 + OFF_WLBA) += (OFF_T) direct *(OFF_T) target.trsiz;
+		if (TST_wFST_TIME(args->test_state))
+			args->test_state = CLR_wFST_TIME(args->test_state);
 		env->lastAction = target;
-		if (args->flags & CLD_FLG_LBA_SYNC) { add_action(env, args, target); }
+		if (args->flags & CLD_FLG_LBA_SYNC) {
+			add_action(env, args, target);
+		}
 	}
 	if (target.oper == READER) {
 		(env->rcount)++;
-		*(pVal1+OFF_RLBA) += (OFF_T) direct * (OFF_T) target.trsiz;
-		if (TST_rFST_TIME(args->test_state)) args->test_state = CLR_rFST_TIME(args->test_state);
+		*(pVal1 + OFF_RLBA) += (OFF_T) direct *(OFF_T) target.trsiz;
+		if (TST_rFST_TIME(args->test_state))
+			args->test_state = CLR_rFST_TIME(args->test_state);
 		env->lastAction = target;
-		if (args->flags & CLD_FLG_LBA_SYNC) { add_action(env, args, target); }
+		if (args->flags & CLD_FLG_LBA_SYNC) {
+			add_action(env, args, target);
+		}
 	}
 
 	return target;
 }
 
-void miscompare_dump(const child_args_t *args, const char *data, const size_t buf_len, OFF_T tPosition, const size_t offset, mc_func_t oper, const int this_thread_id)
+void miscompare_dump(const child_args_t * args, const char *data,
+		     const size_t buf_len, OFF_T tPosition, const size_t offset,
+		     mc_func_t oper, const int this_thread_id)
 {
 	FILE *fpDumpFile;
 	char obuff[80];
@@ -437,46 +501,69 @@
 	fpDumpFile = fopen(obuff, "a");
 
 	if (oper == EXP) {
-		if (fpDumpFile) fprintf(fpDumpFile, "\n\n\n");
-		if (fpDumpFile) fprintf(fpDumpFile, "Execution string: %s\n", args->argstr);
-		if (fpDumpFile) fprintf(fpDumpFile, "Target: %s\n", args->device);
-		if (fpDumpFile) fprintf(fpDumpFile, DMSTR, this_thread_id, tPosition, tPosition);
-		if (fpDumpFile) fprintf(fpDumpFile, DMOFFSTR, this_thread_id, offset, offset);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, "\n\n\n");
+		if (fpDumpFile)
+			fprintf(fpDumpFile, "Execution string: %s\n",
+				args->argstr);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, "Target: %s\n", args->device);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, DMSTR, this_thread_id, tPosition,
+				tPosition);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, DMOFFSTR, this_thread_id, offset,
+				offset);
 		pMsg(ERR, args, "EXPECTED:\n");
-		if (fpDumpFile) fprintf(fpDumpFile, DMFILESTR, "EXPECTED", args->device, tPosition, offset);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, DMFILESTR, "EXPECTED", args->device,
+				tPosition, offset);
 	} else if (oper == ACT) {
 		pMsg(ERR, args, "ACTUAL:\n");
-		if (fpDumpFile) fprintf(fpDumpFile, DMFILESTR, "ACTUAL", args->device, tPosition, offset);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, DMFILESTR, "ACTUAL", args->device,
+				tPosition, offset);
 	} else if (oper == REREAD) {
 		pMsg(ERR, args, "REREAD ACTUAL:\n");
-		if (fpDumpFile) fprintf(fpDumpFile, DMFILESTR, "REREAD ACTUAL", args->device, tPosition, offset);
+		if (fpDumpFile)
+			fprintf(fpDumpFile, DMFILESTR, "REREAD ACTUAL",
+				args->device, tPosition, offset);
 	}
 
 	dump_data(stdout, data, 16, 16, offset, FMT_STR);
-	if (fpDumpFile) dump_data(fpDumpFile, data, buf_len, 16, 0, FMT_STR);
-	if (fpDumpFile) fclose(fpDumpFile);
+	if (fpDumpFile)
+		dump_data(fpDumpFile, data, buf_len, 16, 0, FMT_STR);
+	if (fpDumpFile)
+		fclose(fpDumpFile);
 }
 
 /*
  * called after all the checks have been made to verify
  * that the io completed successfully.
  */
-void complete_io(test_env_t *env, const child_args_t *args, const action_t target)
+void complete_io(test_env_t * env, const child_args_t * args,
+		 const action_t target)
 {
 	unsigned char *wbitmap = (unsigned char *)env->shared_mem + BMP_OFFSET;
 	int i = 0;
 
 	if (target.oper == WRITER) {
-		(env->hbeat_stats.wbytes) += target.trsiz*BLK_SIZE;
+		(env->hbeat_stats.wbytes) += target.trsiz * BLK_SIZE;
 		env->hbeat_stats.wcount++;
-		for (i=0;i<target.trsiz;i++) {
-			*(wbitmap+(((target.lba-args->offset-args->start_lba)+i)/8)) |= 0x80>>(((target.lba-args->offset-args->start_lba)+i)%8);
+		for (i = 0; i < target.trsiz; i++) {
+			*(wbitmap +
+			  (((target.lba - args->offset - args->start_lba) +
+			    i) / 8)) |=
+		  0x80 >> (((target.lba - args->offset - args->start_lba) + i) %
+			   8);
 		}
 	} else {
-		(env->hbeat_stats.rbytes) += target.trsiz*BLK_SIZE;
+		(env->hbeat_stats.rbytes) += target.trsiz * BLK_SIZE;
 		env->hbeat_stats.rcount++;
 	}
-	if (args->flags & CLD_FLG_LBA_SYNC) { remove_action(env, target); }
+	if (args->flags & CLD_FLG_LBA_SYNC) {
+		remove_action(env, target);
+	}
 }
 
 /*
@@ -485,13 +572,13 @@
 * were 'main' for that thread.
 */
 #ifdef WINDOWS
-DWORD WINAPI ChildMain(test_ll_t *test)
+DWORD WINAPI ChildMain(test_ll_t * test)
 #else
 void *ChildMain(void *vtest)
 #endif
 {
 #ifndef WINDOWS
-	test_ll_t *test = (test_ll_t *)vtest;
+	test_ll_t *test = (test_ll_t *) vtest;
 #endif
 
 	child_args_t *args = test->args;
@@ -499,25 +586,25 @@
 
 	static int thread_id = 0;
 	int this_thread_id = thread_id++;
-	char *buf1 = NULL, *buffer1 = NULL; /* 'buf' is the aligned 'buffer' */
-	char *buf2 = NULL, *buffer2 = NULL; /* 'buf' is the aligned 'buffer' */
+	char *buf1 = NULL, *buffer1 = NULL;	/* 'buf' is the aligned 'buffer' */
+	char *buf2 = NULL, *buffer2 = NULL;	/* 'buf' is the aligned 'buffer' */
 	unsigned long ulLastError;
 	unsigned long delayTime;
 
 	action_t target = { NONE, 0, 0 };
 	unsigned int i;
-	OFF_T ActualBytePos=0, TargetBytePos=0, mask=1, delayMask=1;
-	long tcnt=0;
-	int exit_code=0, rv=0;
+	OFF_T ActualBytePos = 0, TargetBytePos = 0, mask = 1, delayMask = 1;
+	long tcnt = 0;
+	int exit_code = 0, rv = 0;
 	char filespec[DEV_NAME_LEN];
 	fd_t fd;
 
 	unsigned int retries = 0;
 	BOOL is_retry = FALSE;
 	lvl_t msg_level = WARN;
-	int SET_CHAR = 0; /* when data buffers are cleared, using memset, use this */
+	int SET_CHAR = 0;	/* when data buffers are cleared, using memset, use this */
 
-	extern unsigned long  glb_flags;
+	extern unsigned long glb_flags;
 	extern unsigned short glb_run;
 	extern int signal_action;
 
@@ -525,7 +612,9 @@
 	HANDLE MutexMISCOMP;
 
 	if ((MutexMISCOMP = OpenMutex(SYNCHRONIZE, TRUE, "gbl")) == NULL) {
-		pMsg(ERR, args, "Thread %d: Failed to open semaphore, error = %u\n", this_thread_id, GetLastError());
+		pMsg(ERR, args,
+		     "Thread %d: Failed to open semaphore, error = %u\n",
+		     this_thread_id, GetLastError());
 		args->test_state = SET_STS_FAIL(args->test_state);
 		TEXIT(GETLASTERROR());
 	}
@@ -547,57 +636,80 @@
 
 	fd = Open(filespec, args->flags);
 	if (INVALID_FD(fd)) {
-		pMsg(ERR, args, "Thread %d: could not open %s, errno = %u.\n", this_thread_id,args->device, GETLASTERROR());
+		pMsg(ERR, args, "Thread %d: could not open %s, errno = %u.\n",
+		     this_thread_id, args->device, GETLASTERROR());
 		args->test_state = SET_STS_FAIL(args->test_state);
-		TEXIT((uintptr_t)GETLASTERROR());
+		TEXIT((uintptr_t) GETLASTERROR());
 	}
 
 	/* Create aligned memory buffers for sending IO. */
-	if ((buffer1 = (char *) ALLOC(((args->htrsiz*BLK_SIZE)+ALIGNSIZE))) == NULL) {
-		pMsg(ERR, args, "Thread %d: Memory allocation failure for IO buffer, errno = %u\n", this_thread_id, GETLASTERROR());
+	if ((buffer1 =
+	     (char *)ALLOC(((args->htrsiz * BLK_SIZE) + ALIGNSIZE))) == NULL) {
+		pMsg(ERR, args,
+		     "Thread %d: Memory allocation failure for IO buffer, errno = %u\n",
+		     this_thread_id, GETLASTERROR());
 		args->test_state = SET_STS_FAIL(args->test_state);
 		CLOSE(fd);
-		TEXIT((uintptr_t)GETLASTERROR());
+		TEXIT((uintptr_t) GETLASTERROR());
 	}
-	memset(buffer1, SET_CHAR, ((args->htrsiz*BLK_SIZE)+ALIGNSIZE));
-	buf1 = (char *) BUFALIGN(buffer1);
+	memset(buffer1, SET_CHAR, ((args->htrsiz * BLK_SIZE) + ALIGNSIZE));
+	buf1 = (char *)BUFALIGN(buffer1);
 
-	if ((buffer2 = (char *) ALLOC(((args->htrsiz*BLK_SIZE)+ALIGNSIZE))) == NULL) {
-		pMsg(ERR, args, "Thread %d: Memory allocation failure for IO buffer, errno = %u\n", this_thread_id, GETLASTERROR());
+	if ((buffer2 =
+	     (char *)ALLOC(((args->htrsiz * BLK_SIZE) + ALIGNSIZE))) == NULL) {
+		pMsg(ERR, args,
+		     "Thread %d: Memory allocation failure for IO buffer, errno = %u\n",
+		     this_thread_id, GETLASTERROR());
 		FREE(buffer1);
 		args->test_state = SET_STS_FAIL(args->test_state);
 		CLOSE(fd);
-		TEXIT((uintptr_t)GETLASTERROR());
+		TEXIT((uintptr_t) GETLASTERROR());
 	}
-	memset(buffer2, SET_CHAR, ((args->htrsiz*BLK_SIZE)+ALIGNSIZE));
-	buf2 = (char *) BUFALIGN(buffer2);
+	memset(buffer2, SET_CHAR, ((args->htrsiz * BLK_SIZE) + ALIGNSIZE));
+	buf2 = (char *)BUFALIGN(buffer2);
 
 	/*  set up lba mask of all 1's with value between vsiz and 2*vsiz */
-	while (mask <= (args->stop_lba - args->start_lba)) { mask = mask<<1; }
+	while (mask <= (args->stop_lba - args->start_lba)) {
+		mask = mask << 1;
+	}
 	mask -= 1;
 
 	/*  set up delay mask of all 1's with value between delayTimeMin and 2*delayTimeMax */
-	while (delayMask <= (args->delayTimeMax - args->delayTimeMin)) { delayMask = delayMask<<1; }
+	while (delayMask <= (args->delayTimeMax - args->delayTimeMin)) {
+		delayMask = delayMask << 1;
+	}
 	delayMask -= 1;
 
 	while (env->bContinue) {
 		if (!is_retry) {
 			retries = args->retries;
 #ifdef _DEBUG
-			PDBG5(DBUG, args, "Thread %d: lastAction: oper: %d, lba: %lld, trsiz: %ld\n", this_thread_id, target.oper, target.lba, target.trsiz);
+			PDBG5(DBUG, args,
+			      "Thread %d: lastAction: oper: %d, lba: %lld, trsiz: %ld\n",
+			      this_thread_id, target.oper, target.lba,
+			      target.trsiz);
 #endif
 			do {
-				if (signal_action & SIGNAL_STOP) { break; }		/* user request to stop */
-				if (glb_run == 0) { break; }						/* global request to stop */
+				if (signal_action & SIGNAL_STOP) {
+					break;
+				}	/* user request to stop */
+				if (glb_run == 0) {
+					break;
+				}	/* global request to stop */
 				LOCK(env->mutexs.MutexACTION);
 				target = get_next_action(args, env, mask);
 				UNLOCK(env->mutexs.MutexACTION);
 				/* this thread has to retry, so give up the reset of my time slice */
-				if (target.oper == RETRY) { Sleep(0); }
-			} while ((env->bContinue) && (target.oper == RETRY)); /* we failed to get an action, and were asked to retry */
+				if (target.oper == RETRY) {
+					Sleep(0);
+				}
+			} while ((env->bContinue) && (target.oper == RETRY));	/* we failed to get an action, and were asked to retry */
 
 #ifdef _DEBUG
-			PDBG5(DBUG, args, "Thread %d: nextAction: oper: %d, lba: %lld, trsiz: %ld\n", this_thread_id, target.oper, target.lba, target.trsiz);
+			PDBG5(DBUG, args,
+			      "Thread %d: nextAction: oper: %d, lba: %lld, trsiz: %ld\n",
+			      this_thread_id, target.oper, target.lba,
+			      target.trsiz);
 #endif
 
 			/*
@@ -605,45 +717,67 @@
 			 * processing time, requested by user
 			 */
 
-			if (args->delayTimeMin == args->delayTimeMax) { /* static delay time */
+			if (args->delayTimeMin == args->delayTimeMax) {	/* static delay time */
 				/* only sleep if delay is greater then zero */
-				if (args->delayTimeMin > 0) { Sleep(args->delayTimeMin); }
-			} else { /* random delay time between min & max */
+				if (args->delayTimeMin > 0) {
+					Sleep(args->delayTimeMin);
+				}
+			} else {	/* random delay time between min & max */
 				do {
-					delayTime = (unsigned long)(rand()&delayMask) + args->delayTimeMin;
+					delayTime =
+					    (unsigned long)(rand() & delayMask)
+					    + args->delayTimeMin;
 				} while (delayTime > args->delayTimeMax);
 #ifdef _DEBUG
-				PDBG3(DBUG, args, "Thread %d: Delay time = %lu\n", this_thread_id, delayTime);
+				PDBG3(DBUG, args,
+				      "Thread %d: Delay time = %lu\n",
+				      this_thread_id, delayTime);
 #endif
 				Sleep(delayTime);
 			}
 		}
-
 #ifdef _DEBUG
-		if (target.oper == NONE) {						/* nothing left to do */
-				PDBG3(DBUG, args, "Thread %d: Setting break, oper is NONE\n", this_thread_id);
+		if (target.oper == NONE) {	/* nothing left to do */
+			PDBG3(DBUG, args,
+			      "Thread %d: Setting break, oper is NONE\n",
+			      this_thread_id);
 		}
 #endif
 
-		if (target.oper == NONE) { break; }				/* nothing left so stop */
-		if (signal_action & SIGNAL_STOP) { break; }		/* user request to stop */
-		if (env->bContinue == FALSE) { break; }			/* internal request to stop */
-		if (glb_run == 0) { break; }						/* global request to stop */
-
-		TargetBytePos=(OFF_T) (target.lba*BLK_SIZE);
-		ActualBytePos=Seek(fd, TargetBytePos);
+		if (target.oper == NONE) {
+			break;
+		}		/* nothing left so stop */
+		if (signal_action & SIGNAL_STOP) {
+			break;
+		}		/* user request to stop */
+		if (env->bContinue == FALSE) {
+			break;
+		}		/* internal request to stop */
+		if (glb_run == 0) {
+			break;
+		}
+		/* global request to stop */
+		TargetBytePos = (OFF_T) (target.lba * BLK_SIZE);
+		ActualBytePos = Seek(fd, TargetBytePos);
 		if (ActualBytePos != TargetBytePos) {
 			ulLastError = GETLASTERROR();
-			pMsg(msg_level, args, SFSTR, this_thread_id, (target.oper == WRITER) ? (env->wcount) : (env->rcount),target.lba,TargetBytePos,ActualBytePos,ulLastError);
-			if (retries-- > 1) { /* request to retry on error, decrement retry */
-				pMsg(INFO, args, "Thread %d: Retry after seek failure, retry count: %u\n", this_thread_id, retries);
+			pMsg(msg_level, args, SFSTR, this_thread_id,
+			     (target.oper ==
+			      WRITER) ? (env->wcount) : (env->rcount),
+			     target.lba, TargetBytePos, ActualBytePos,
+			     ulLastError);
+			if (retries-- > 1) {	/* request to retry on error, decrement retry */
+				pMsg(INFO, args,
+				     "Thread %d: Retry after seek failure, retry count: %u\n",
+				     this_thread_id, retries);
 				is_retry = TRUE;
 				Sleep(args->retry_delay);
 			} else {
 				exit_code = SEEK_FAILURE;
 				is_retry = FALSE;
 				LOCK(env->mutexs.MutexACTION);
-				update_test_state(args, env, this_thread_id, fd, buf2);
+				update_test_state(args, env, this_thread_id, fd,
+						  buf2);
 				decrement_io_count(args, env, target);
 				UNLOCK(env->mutexs.MutexACTION);
 			}
@@ -652,83 +786,105 @@
 
 		if (target.oper == WRITER) {
 			if (args->flags & CLD_FLG_LPTYPE) {
-				fill_buffer(buf2, target.trsiz, &(target.lba), sizeof(OFF_T), CLD_FLG_LPTYPE);
+				fill_buffer(buf2, target.trsiz, &(target.lba),
+					    sizeof(OFF_T), CLD_FLG_LPTYPE);
 			} else {
-				memcpy(buf2, env->data_buffer, target.trsiz*BLK_SIZE);
+				memcpy(buf2, env->data_buffer,
+				       target.trsiz * BLK_SIZE);
 			}
 			if (args->flags & CLD_FLG_MBLK) {
-				mark_buffer(buf2, target.trsiz*BLK_SIZE, &(target.lba), args, env);
+				mark_buffer(buf2, target.trsiz * BLK_SIZE,
+					    &(target.lba), args, env);
 			}
 #ifdef _DEBUG
 			setStartTime();
 #endif
 			if (args->flags & CLD_FLG_IO_SERIAL) {
 				LOCK(env->mutexs.MutexIO);
-				tcnt = Write(fd, buf2, target.trsiz*BLK_SIZE);
+				tcnt = Write(fd, buf2, target.trsiz * BLK_SIZE);
 				UNLOCK(env->mutexs.MutexIO);
 			} else {
-				tcnt = Write(fd, buf2, target.trsiz*BLK_SIZE);
+				tcnt = Write(fd, buf2, target.trsiz * BLK_SIZE);
 			}
 
 #ifdef _DEBUG
 			setEndTime();
-			PDBG5(DBUG, args, "Thread %d: I/O Time: %ld usecs\n", this_thread_id, getTimeDiff());
+			PDBG5(DBUG, args, "Thread %d: I/O Time: %ld usecs\n",
+			      this_thread_id, getTimeDiff());
 #endif
 			if (args->flags & CLD_FLG_WFSYNC) {
 				rv = 0;
 				/* if need to sync, then only have one thread do it */
 				LOCK(env->mutexs.MutexACTION);
-				if (0 == (env->hbeat_stats.wcount % args->sync_interval)) {
+				if (0 ==
+				    (env->hbeat_stats.wcount %
+				     args->sync_interval)) {
 #ifdef _DEBUG
-					PDBG3(DBUG, args, "Thread %d: Performing sync, write IO count %llu\n", this_thread_id, env->hbeat_stats.wcount);
+					PDBG3(DBUG, args,
+					      "Thread %d: Performing sync, write IO count %llu\n",
+					      this_thread_id,
+					      env->hbeat_stats.wcount);
 #endif
 					rv = Sync(fd);
 					if (0 != rv) {
 						exit_code = GETLASTERROR();
-						pMsg(msg_level, args, "Thread %d: fsync error = %d\n", this_thread_id, exit_code);
+						pMsg(msg_level, args,
+						     "Thread %d: fsync error = %d\n",
+						     this_thread_id, exit_code);
 						is_retry = FALSE;
-						update_test_state(args, env, this_thread_id, fd, buf2);
-						decrement_io_count(args, env, target);
+						update_test_state(args, env,
+								  this_thread_id,
+								  fd, buf2);
+						decrement_io_count(args, env,
+								   target);
 					}
 				}
 				UNLOCK(env->mutexs.MutexACTION);
 
-				if (0 != rv) { /* sync error, so don't count the write */
+				if (0 != rv) {	/* sync error, so don't count the write */
 					continue;
 				}
 			}
 		}
 
 		if (target.oper == READER) {
-			memset(buf1, SET_CHAR, target.trsiz*BLK_SIZE);
+			memset(buf1, SET_CHAR, target.trsiz * BLK_SIZE);
 #ifdef _DEBUG
 			setStartTime();
 #endif
 			if (args->flags & CLD_FLG_IO_SERIAL) {
 				LOCK(env->mutexs.MutexIO);
-				tcnt = Read(fd, buf1, target.trsiz*BLK_SIZE);
+				tcnt = Read(fd, buf1, target.trsiz * BLK_SIZE);
 				UNLOCK(env->mutexs.MutexIO);
 			} else {
-				tcnt = Read(fd, buf1, target.trsiz*BLK_SIZE);
+				tcnt = Read(fd, buf1, target.trsiz * BLK_SIZE);
 			}
 #ifdef _DEBUG
 			setEndTime();
-			PDBG5(DBUG, args, "Thread %d: I/O Time: %ld usecs\n", this_thread_id, getTimeDiff());
+			PDBG5(DBUG, args, "Thread %d: I/O Time: %ld usecs\n",
+			      this_thread_id, getTimeDiff());
 #endif
 		}
 
-		if (tcnt != (long) target.trsiz*BLK_SIZE) {
+		if (tcnt != (long)target.trsiz * BLK_SIZE) {
 			ulLastError = GETLASTERROR();
-			pMsg(msg_level, args, AFSTR, this_thread_id, (target.oper) ? "Read" : "Write", (target.oper) ? (env->rcount) : (env->wcount),target.lba,target.lba,tcnt,target.trsiz*BLK_SIZE, ulLastError);
-			if (retries-- > 1) { /* request to retry on error, decrement retry */
-				pMsg(INFO, args, "Thread %d: Retry after transfer failure, retry count: %u\n", this_thread_id, retries);
+			pMsg(msg_level, args, AFSTR, this_thread_id,
+			     (target.oper) ? "Read" : "Write",
+			     (target.oper) ? (env->rcount) : (env->wcount),
+			     target.lba, target.lba, tcnt,
+			     target.trsiz * BLK_SIZE, ulLastError);
+			if (retries-- > 1) {	/* request to retry on error, decrement retry */
+				pMsg(INFO, args,
+				     "Thread %d: Retry after transfer failure, retry count: %u\n",
+				     this_thread_id, retries);
 				is_retry = TRUE;
 				Sleep(args->retry_delay);
 			} else {
 				exit_code = ACCESS_FAILURE;
 				is_retry = FALSE;
 				LOCK(env->mutexs.MutexACTION);
-				update_test_state(args, env, this_thread_id, fd, buf2);
+				update_test_state(args, env, this_thread_id, fd,
+						  buf2);
 				decrement_io_count(args, env, target);
 				UNLOCK(env->mutexs.MutexACTION);
 			}
@@ -738,50 +894,98 @@
 		/* data compare routine.  Act as if we were to write, but just compare */
 		if ((target.oper == READER) && (args->flags & CLD_FLG_CMPR)) {
 			/* This is very SLOW!!! */
-			if ((args->cmp_lng == 0) || (args->cmp_lng > target.trsiz*BLK_SIZE)) {
-				args->cmp_lng = target.trsiz*BLK_SIZE;
+			if ((args->cmp_lng == 0)
+			    || (args->cmp_lng > target.trsiz * BLK_SIZE)) {
+				args->cmp_lng = target.trsiz * BLK_SIZE;
 			}
 			if (args->flags & CLD_FLG_LPTYPE) {
-				fill_buffer(buf2, target.trsiz, &(target.lba), sizeof(OFF_T), CLD_FLG_LPTYPE);
+				fill_buffer(buf2, target.trsiz, &(target.lba),
+					    sizeof(OFF_T), CLD_FLG_LPTYPE);
 			} else {
-				memcpy(buf2, env->data_buffer, target.trsiz*BLK_SIZE);
+				memcpy(buf2, env->data_buffer,
+				       target.trsiz * BLK_SIZE);
 			}
 			if (args->flags & CLD_FLG_MBLK) {
-				mark_buffer(buf2, target.trsiz*BLK_SIZE, &(target.lba), args, env);
+				mark_buffer(buf2, target.trsiz * BLK_SIZE,
+					    &(target.lba), args, env);
 			}
 			if (memcmp(buf2, buf1, args->cmp_lng) != 0) {
 				/* data miscompare, this takes lots of time, but its OK... !!! */
 				LOCK(MutexMISCOMP);
-    			pMsg(ERR, args, DMSTR, this_thread_id, target.lba, target.lba);
+				pMsg(ERR, args, DMSTR, this_thread_id,
+				     target.lba, target.lba);
 				/* find the actual byte that started the miscompare */
-				for (i=0;i<args->htrsiz*BLK_SIZE;i++) {
-					if (*(buf2+i) != *(buf1+i)) {
-    					pMsg(ERR, args, DMOFFSTR, this_thread_id, i, i); break;
+				for (i = 0; i < args->htrsiz * BLK_SIZE; i++) {
+					if (*(buf2 + i) != *(buf1 + i)) {
+						pMsg(ERR, args, DMOFFSTR,
+						     this_thread_id, i, i);
+						break;
 					}
 				}
-				miscompare_dump(args, buf2, args->htrsiz*BLK_SIZE, target.lba, i, EXP, this_thread_id);
-				miscompare_dump(args, buf1, args->htrsiz*BLK_SIZE, target.lba, i, ACT, this_thread_id);
+				miscompare_dump(args, buf2,
+						args->htrsiz * BLK_SIZE,
+						target.lba, i, EXP,
+						this_thread_id);
+				miscompare_dump(args, buf1,
+						args->htrsiz * BLK_SIZE,
+						target.lba, i, ACT,
+						this_thread_id);
 				/* perform a reread of the target, if requested */
 				if (args->flags & CLD_FLG_ERR_REREAD) {
-					ActualBytePos=Seek(fd, TargetBytePos);
+					ActualBytePos = Seek(fd, TargetBytePos);
 					if (ActualBytePos == TargetBytePos) {
-						memset(buf1, SET_CHAR, target.trsiz*BLK_SIZE);
+						memset(buf1, SET_CHAR,
+						       target.trsiz * BLK_SIZE);
 #ifdef _DEBUG
 						setStartTime();
 #endif
-						tcnt = Read(fd, buf1, target.trsiz*BLK_SIZE);
+						tcnt =
+						    Read(fd, buf1,
+							 target.trsiz *
+							 BLK_SIZE);
 #ifdef _DEBUG
 						setEndTime();
-						PDBG5(DBUG, args, "Thread %d: ReRead I/O Time: %ld usecs\n", this_thread_id, getTimeDiff());
+						PDBG5(DBUG, args,
+						      "Thread %d: ReRead I/O Time: %ld usecs\n",
+						      this_thread_id,
+						      getTimeDiff());
 #endif
-						if (tcnt != (long) target.trsiz*BLK_SIZE) {
-							pMsg(ERR, args, "Thread %d: ReRead after data miscompare failed on transfer.\n", this_thread_id);
-							pMsg(ERR, args, AFSTR, this_thread_id, "ReRead", (target.oper) ? (env->rcount) : (env->wcount),target.lba,target.lba,tcnt,target.trsiz*BLK_SIZE);
+						if (tcnt !=
+						    (long)target.trsiz *
+						    BLK_SIZE) {
+							pMsg(ERR, args,
+							     "Thread %d: ReRead after data miscompare failed on transfer.\n",
+							     this_thread_id);
+							pMsg(ERR, args, AFSTR,
+							     this_thread_id,
+							     "ReRead",
+							     (target.
+							      oper) ? (env->
+								       rcount)
+							     : (env->wcount),
+							     target.lba,
+							     target.lba, tcnt,
+							     target.trsiz *
+							     BLK_SIZE);
 						}
-						miscompare_dump(args, buf1, args->htrsiz*BLK_SIZE, target.lba, i, REREAD, this_thread_id);
+						miscompare_dump(args, buf1,
+								args->htrsiz *
+								BLK_SIZE,
+								target.lba, i,
+								REREAD,
+								this_thread_id);
 					} else {
-						pMsg(ERR, args, "Thread %d: ReRead after data miscompare failed on seek.\n", this_thread_id);
-						pMsg(ERR, args, SFSTR, this_thread_id, (target.oper == WRITER) ? (env->wcount) : (env->rcount),target.lba,TargetBytePos,ActualBytePos);
+						pMsg(ERR, args,
+						     "Thread %d: ReRead after data miscompare failed on seek.\n",
+						     this_thread_id);
+						pMsg(ERR, args, SFSTR,
+						     this_thread_id,
+						     (target.oper ==
+						      WRITER) ? (env->
+								 wcount)
+						     : (env->rcount),
+						     target.lba, TargetBytePos,
+						     ActualBytePos);
 					}
 				}
 				UNLOCK(MutexMISCOMP);
@@ -789,7 +993,8 @@
 				exit_code = DATA_MISCOMPARE;
 				is_retry = FALSE;
 				LOCK(env->mutexs.MutexACTION);
-				update_test_state(args, env, this_thread_id, fd, buf2);
+				update_test_state(args, env, this_thread_id, fd,
+						  buf2);
 				decrement_io_count(args, env, target);
 				UNLOCK(env->mutexs.MutexACTION);
 				continue;
@@ -819,9 +1024,10 @@
 #ifdef _DEBUG
 		PDBG5(DBUG, args, "Thread %d: starting sync\n", this_thread_id);
 #endif
-	    if (Sync(fd) < 0) { /* just sync, should not matter the device type */
+		if (Sync(fd) < 0) {	/* just sync, should not matter the device type */
 			exit_code = GETLASTERROR();
-			pMsg(ERR, args, "Thread %d: fsync error = %d\n", this_thread_id, exit_code);
+			pMsg(ERR, args, "Thread %d: fsync error = %d\n",
+			     this_thread_id, exit_code);
 			args->test_state = SET_STS_FAIL(args->test_state);
 		}
 #ifdef _DEBUG
@@ -829,11 +1035,12 @@
 #endif
 	}
 
-	if (CLOSE(fd) < 0) { /* check return status on close */
+	if (CLOSE(fd) < 0) {	/* check return status on close */
 		exit_code = GETLASTERROR();
-		pMsg(ERR, args, "Thread %d: close error = %d\n", this_thread_id, exit_code);
+		pMsg(ERR, args, "Thread %d: close error = %d\n", this_thread_id,
+		     exit_code);
 		args->test_state = SET_STS_FAIL(args->test_state);
 	}
 
-	TEXIT((uintptr_t)exit_code);
+	TEXIT((uintptr_t) exit_code);
 }
diff --git a/testcases/kernel/io/disktest/dump.c b/testcases/kernel/io/disktest/dump.c
index 02ae7cd..eef119b 100644
--- a/testcases/kernel/io/disktest/dump.c
+++ b/testcases/kernel/io/disktest/dump.c
@@ -25,49 +25,56 @@
 * $Id: dump.c,v 1.7 2009/02/26 12:02:22 subrata_modak Exp $
 *
 */
-#include <stdio.h>	/* *printf() */
-#include <string.h>	/* memset(), strn***() */
-#include <ctype.h>	/* isprint() */
-#include <stdlib.h>	/* malloc(), free() */
+#include <stdio.h>		/* *printf() */
+#include <string.h>		/* memset(), strn***() */
+#include <ctype.h>		/* isprint() */
+#include <stdlib.h>		/* malloc(), free() */
 
 #include "defs.h"
 #include "io.h"
 #include "sfunc.h"
 #include "dump.h"
 
-int format_str(size_t iBytes, const char *ibuff, size_t ibuff_siz, char *obuff, size_t obuff_siz)
+int format_str(size_t iBytes, const char *ibuff, size_t ibuff_siz, char *obuff,
+	       size_t obuff_siz)
 {
 	unsigned int i;
 	char buff[10];
 	static size_t TotalBytes = 0;
 
 	if ((iBytes == 0) &&
-	   (ibuff == NULL) && (ibuff_siz == 0) &&
-	   (obuff == NULL) && (obuff_siz == 0)) {
+	    (ibuff == NULL) && (ibuff_siz == 0) &&
+	    (obuff == NULL) && (obuff_siz == 0)) {
 		TotalBytes = 0;
 		return 0;
 	}
 
-	if ((ibuff == NULL) || (obuff == NULL) || (iBytes < 1)) return -1;
+	if ((ibuff == NULL) || (obuff == NULL) || (iBytes < 1))
+		return -1;
 
 	memset(obuff, 0, obuff_siz);
-	sprintf(buff,"%08lX", (long)TotalBytes);
-	strncat(obuff, buff, (obuff_siz-1)-strlen(obuff));
-	for (i=0;i<iBytes;i++) {
-		if ((i%4) == 0) strncat(obuff, " ", (obuff_siz-1)-strlen(obuff));
-		if ((i%8) == 0) strncat(obuff, " ", (obuff_siz-1)-strlen(obuff));
-		sprintf(buff,"%02X ", *(ibuff+i));
-		strncat(obuff, buff, (obuff_siz-1)-strlen(obuff));
+	sprintf(buff, "%08lX", (long)TotalBytes);
+	strncat(obuff, buff, (obuff_siz - 1) - strlen(obuff));
+	for (i = 0; i < iBytes; i++) {
+		if ((i % 4) == 0)
+			strncat(obuff, " ", (obuff_siz - 1) - strlen(obuff));
+		if ((i % 8) == 0)
+			strncat(obuff, " ", (obuff_siz - 1) - strlen(obuff));
+		sprintf(buff, "%02X ", *(ibuff + i));
+		strncat(obuff, buff, (obuff_siz - 1) - strlen(obuff));
 	}
-	for (;i<ibuff_siz;i++) {
-		if ((i%4) == 0) strncat(obuff, " ", (obuff_siz-1)-strlen(obuff));
-		if ((i%8) == 0) strncat(obuff, " ", (obuff_siz-1)-strlen(obuff));
-		strncat(obuff, "   ", (obuff_siz-1)-strlen(obuff));
+	for (; i < ibuff_siz; i++) {
+		if ((i % 4) == 0)
+			strncat(obuff, " ", (obuff_siz - 1) - strlen(obuff));
+		if ((i % 8) == 0)
+			strncat(obuff, " ", (obuff_siz - 1) - strlen(obuff));
+		strncat(obuff, "   ", (obuff_siz - 1) - strlen(obuff));
 	}
-	strncat(obuff, " ", (obuff_siz-1)-strlen(obuff));
-	for (i=0;i<iBytes;i++) {
-		sprintf(buff, "%c", (isprint(*(ibuff+i))) ? *(ibuff+i) : '.');
-		strncat(obuff, buff, (obuff_siz-1)-strlen(obuff));
+	strncat(obuff, " ", (obuff_siz - 1) - strlen(obuff));
+	for (i = 0; i < iBytes; i++) {
+		sprintf(buff, "%c",
+			(isprint(*(ibuff + i))) ? *(ibuff + i) : '.');
+		strncat(obuff, buff, (obuff_siz - 1) - strlen(obuff));
 	}
 	TotalBytes += iBytes;
 	return 0;
@@ -80,54 +87,58 @@
 	static size_t TotalBytes = 0;
 
 	if ((iBytes == 0) && (ibuff == NULL) &&
-	   (obuff == NULL) && (obuff_siz == 0)) {
+	    (obuff == NULL) && (obuff_siz == 0)) {
 		TotalBytes = 0;
 		return 0;
 	}
 
-	if ((ibuff == NULL) || (obuff == NULL) || (iBytes < 1)) return -1;
+	if ((ibuff == NULL) || (obuff == NULL) || (iBytes < 1))
+		return -1;
 
 	memset(obuff, 0, obuff_siz);
-	sprintf(buff,"%08lX ", (long)TotalBytes);
-	strncat(obuff, buff, (obuff_siz-1)-strlen(obuff));
-	for (i=0;i<iBytes;i++) {
-		sprintf(buff,"%02X", *(ibuff+i));
-		strncat(obuff, buff, (obuff_siz-1)-strlen(obuff));
+	sprintf(buff, "%08lX ", (long)TotalBytes);
+	strncat(obuff, buff, (obuff_siz - 1) - strlen(obuff));
+	for (i = 0; i < iBytes; i++) {
+		sprintf(buff, "%02X", *(ibuff + i));
+		strncat(obuff, buff, (obuff_siz - 1) - strlen(obuff));
 	}
 	TotalBytes += iBytes;
 	return 0;
 }
 
-int dump_data(FILE *stream, const char *buff, const size_t buff_siz, const size_t ofd_siz, const size_t offset, const int format)
+int dump_data(FILE * stream, const char *buff, const size_t buff_siz,
+	      const size_t ofd_siz, const size_t offset, const int format)
 {
 	size_t TotalRemainingBytes, NumBytes, ibuff_siz, obuff_siz;
 	char *ibuff, *obuff, *buff_curr;
 
-	buff_curr = (char *) buff;
+	buff_curr = (char *)buff;
 	buff_curr += offset;
 	TotalRemainingBytes = buff_siz;
 	NumBytes = 0;
 	ibuff_siz = ofd_siz;
-	obuff_siz = 12+(3*ibuff_siz)+(ibuff_siz/4)+(ibuff_siz/8)+ibuff_siz;
-	switch(format) {
-		case FMT_STR:
-			format_str(0, NULL, 0, NULL, 0);
-			break;
-		case FMT_RAW:
-			format_raw(0, NULL, NULL, 0);
-			break;
-		default:
-			return(-1);
+	obuff_siz =
+	    12 + (3 * ibuff_siz) + (ibuff_siz / 4) + (ibuff_siz / 8) +
+	    ibuff_siz;
+	switch (format) {
+	case FMT_STR:
+		format_str(0, NULL, 0, NULL, 0);
+		break;
+	case FMT_RAW:
+		format_raw(0, NULL, NULL, 0);
+		break;
+	default:
+		return (-1);
 	}
 
-	if ((ibuff = (char *) ALLOC(ibuff_siz)) == NULL) {
+	if ((ibuff = (char *)ALLOC(ibuff_siz)) == NULL) {
 		fprintf(stderr, "Can't allocate ibuff\n");
-		return(-1);
+		return (-1);
 	}
-	if ((obuff = (char *) ALLOC(obuff_siz)) == NULL) {
+	if ((obuff = (char *)ALLOC(obuff_siz)) == NULL) {
 		FREE(ibuff);
 		fprintf(stderr, "Can't allocate obuff\n");
-		return(-1);
+		return (-1);
 	}
 
 	while (TotalRemainingBytes > 0) {
@@ -141,17 +152,18 @@
 			NumBytes = TotalRemainingBytes;
 			TotalRemainingBytes = 0;
 		}
-		switch(format) {
-			case FMT_STR:
-				format_str(NumBytes, ibuff, ibuff_siz, obuff, obuff_siz);
-				fprintf(stream, "%s\n", obuff);
-				break;
-			case FMT_RAW:
-				format_raw(NumBytes, ibuff, obuff, obuff_siz);
-				fprintf(stream, "%s\n", obuff);
-				break;
-			default:
-				return(-1);
+		switch (format) {
+		case FMT_STR:
+			format_str(NumBytes, ibuff, ibuff_siz, obuff,
+				   obuff_siz);
+			fprintf(stream, "%s\n", obuff);
+			break;
+		case FMT_RAW:
+			format_raw(NumBytes, ibuff, obuff, obuff_siz);
+			fprintf(stream, "%s\n", obuff);
+			break;
+		default:
+			return (-1);
 		}
 	}
 	FREE(ibuff);
@@ -159,44 +171,45 @@
 	return 0;
 }
 
-int do_dump(child_args_t *args)
+int do_dump(child_args_t * args)
 {
 	size_t NumBytes = 0;
 	OFF_T TargetLBA, TotalBytes = 0;
 	char *buff;
 	fd_t fd;
 
-	if ((buff = (char *) ALLOC(args->htrsiz*BLK_SIZE)) == NULL) {
+	if ((buff = (char *)ALLOC(args->htrsiz * BLK_SIZE)) == NULL) {
 		fprintf(stderr, "Can't allocate buffer\n");
-		return(-1);
+		return (-1);
 	}
 
-	memset(buff, 0, args->htrsiz*BLK_SIZE);
+	memset(buff, 0, args->htrsiz * BLK_SIZE);
 
 	fd = Open(args->device, args->flags | CLD_FLG_R);
 	if (INVALID_FD(fd)) {
-		pMsg(ERR, args, "could not open %s.\n",args->device);
-		pMsg(ERR, args, "%s: Error = %u\n",args->device, GETLASTERROR());
-		return(-1);
+		pMsg(ERR, args, "could not open %s.\n", args->device);
+		pMsg(ERR, args, "%s: Error = %u\n", args->device,
+		     GETLASTERROR());
+		return (-1);
 	}
 
-	TargetLBA = Seek(fd, args->start_lba*BLK_SIZE);
+	TargetLBA = Seek(fd, args->start_lba * BLK_SIZE);
 	if (TargetLBA != (args->start_lba * (OFF_T) BLK_SIZE)) {
 		pMsg(ERR, args, "Could not seek to start position.\n");
 		CLOSE(fd);
-		return(-1);
+		return (-1);
 	}
 
 	do {
-		NumBytes = Read(fd, buff, args->htrsiz*BLK_SIZE);
-		if ((NumBytes > args->htrsiz*BLK_SIZE) || (NumBytes < 0)) {
+		NumBytes = Read(fd, buff, args->htrsiz * BLK_SIZE);
+		if ((NumBytes > args->htrsiz * BLK_SIZE) || (NumBytes < 0)) {
 			pMsg(ERR, args, "Failure reading %s\n", args->device);
 			pMsg(ERR, args, "Last Error was %lu\n", GETLASTERROR());
 			break;
 		}
 		dump_data(stdout, buff, NumBytes, 16, 0, FMT_STR);
 		TotalBytes += (OFF_T) NumBytes;
-	} while ((TotalBytes < (args->htrsiz*BLK_SIZE)) && (NumBytes > 0));
+	} while ((TotalBytes < (args->htrsiz * BLK_SIZE)) && (NumBytes > 0));
 
 	FREE(buff);
 	CLOSE(fd);
diff --git a/testcases/kernel/io/disktest/globals.c b/testcases/kernel/io/disktest/globals.c
index bc1b722..f559bd9 100644
--- a/testcases/kernel/io/disktest/globals.c
+++ b/testcases/kernel/io/disktest/globals.c
@@ -43,12 +43,12 @@
 #include "sfunc.h"
 
 /* Globals */
-unsigned int gbl_dbg_lvl;	/* the global debugging level	*/
-unsigned long glb_flags;    /* global flags GLB_FLG_xxx	*/
+unsigned int gbl_dbg_lvl;	/* the global debugging level   */
+unsigned long glb_flags;	/* global flags GLB_FLG_xxx */
 time_t global_start_time;	/* global start time */
 unsigned short glb_run = 1;	/* global run flag */
 
-void init_gbl_data(test_env_t *env)
+void init_gbl_data(test_env_t * env)
 {
 	env->kids = 0;
 	env->shared_mem = NULL;
@@ -57,8 +57,8 @@
 	env->pThreads = NULL;
 	env->bContinue = TRUE;
 	env->pass_count = 0;
-	env->start_time = time(NULL);	/*	overall start time of test	*/
-	env->end_time = 0;				/*	overall end time of test	*/
+	env->start_time = time(NULL);	/*      overall start time of test      */
+	env->end_time = 0;	/*      overall end time of test        */
 	memset(&env->global_stats, 0, sizeof(stats_t));
 	memset(&env->cycle_stats, 0, sizeof(stats_t));
 }
@@ -87,15 +87,11 @@
 void GetSystemErrorString(unsigned long ulErrorNum, void *buffer)
 {
 	/* Use Default language */
-	FormatMessage(
-	    FORMAT_MESSAGE_FROM_SYSTEM |
-		FORMAT_MESSAGE_IGNORE_INSERTS,
-	    NULL,
-		ulErrorNum,
-	    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-		(LPTSTR) &buffer,
-	    0,
-		NULL
-	);
+	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+		      FORMAT_MESSAGE_IGNORE_INSERTS,
+		      NULL,
+		      ulErrorNum,
+		      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+		      (LPTSTR) & buffer, 0, NULL);
 }
 #endif
diff --git a/testcases/kernel/io/disktest/io.c b/testcases/kernel/io/disktest/io.c
index cbfdd5e..f83c38c 100644
--- a/testcases/kernel/io/disktest/io.c
+++ b/testcases/kernel/io/disktest/io.c
@@ -49,18 +49,18 @@
 #else
 	tcnt = write(fd, buf, trsiz);
 #endif
-	return(tcnt);
+	return (tcnt);
 }
 
 long Read(fd_t fd, void *buf, const unsigned long trsiz)
 {
 	long tcnt;
 #ifdef WINDOWS
-		ReadFile(fd, buf, trsiz, &tcnt, NULL);
+	ReadFile(fd, buf, trsiz, &tcnt, NULL);
 #else
-		tcnt = read(fd, buf, trsiz);
+	tcnt = read(fd, buf, trsiz);
 #endif
-	return(tcnt);
+	return (tcnt);
 }
 
 #ifdef WINDOWS
@@ -70,18 +70,17 @@
  */
 OFF_T FileSeek64(HANDLE hf, OFF_T distance, DWORD MoveMethod)
 {
-   LARGE_INTEGER li;
+	LARGE_INTEGER li;
 
-   li.QuadPart = distance;
+	li.QuadPart = distance;
 
-   li.LowPart = SetFilePointer(hf, li.LowPart, &li.HighPart, MoveMethod);
+	li.LowPart = SetFilePointer(hf, li.LowPart, &li.HighPart, MoveMethod);
 
-   if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
-   {
-      li.QuadPart = -1;
-   }
+	if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
+		li.QuadPart = -1;
+	}
 
-   return li.QuadPart;
+	return li.QuadPart;
 }
 #endif
 
@@ -90,11 +89,11 @@
 	OFF_T return_lba;
 
 #ifdef WINDOWS
-	return_lba=(OFF_T) FileSeek64(fd, 0, FILE_END);
+	return_lba = (OFF_T) FileSeek64(fd, 0, FILE_END);
 #else
-	return_lba=(OFF_T) lseek64(fd, 0, SEEK_END);
+	return_lba = (OFF_T) lseek64(fd, 0, SEEK_END);
 #endif
-	return(return_lba);
+	return (return_lba);
 }
 
 OFF_T Seek(fd_t fd, OFF_T lba)
@@ -102,18 +101,19 @@
 	OFF_T return_lba;
 
 #ifdef WINDOWS
-	return_lba=(OFF_T) FileSeek64(fd, lba, FILE_BEGIN);
+	return_lba = (OFF_T) FileSeek64(fd, lba, FILE_BEGIN);
 #else
-	return_lba=(OFF_T) lseek64(fd,lba,SEEK_SET);
+	return_lba = (OFF_T) lseek64(fd, lba, SEEK_SET);
 #endif
-	return(return_lba);
+	return (return_lba);
 }
 
 fd_t Open(const char *filespec, const OFF_T flags)
 {
 	fd_t fd;
 #ifdef WINDOWS
-	unsigned long OPEN_FLAGS = 0, OPEN_DISPO = 0, OPEN_READ_WRITE = 0, OPEN_SHARE = 0;
+	unsigned long OPEN_FLAGS = 0, OPEN_DISPO = 0, OPEN_READ_WRITE =
+	    0, OPEN_SHARE = 0;
 
 	if ((flags & CLD_FLG_R) && !(flags & CLD_FLG_W)) {
 		OPEN_READ_WRITE |= GENERIC_READ;
@@ -127,15 +127,18 @@
 	}
 
 #ifdef CLD_FLG_DIRECT
-	if (flags & CLD_FLG_DIRECT) OPEN_FLAGS = FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
+	if (flags & CLD_FLG_DIRECT)
+		OPEN_FLAGS = FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
 #endif
 	OPEN_DISPO = OPEN_EXISTING;
 
 #ifdef CLD_FLG_RANDOM
-	if (flags & CLD_FLG_RANDOM) OPEN_FLAGS |= FILE_FLAG_RANDOM_ACCESS;
+	if (flags & CLD_FLG_RANDOM)
+		OPEN_FLAGS |= FILE_FLAG_RANDOM_ACCESS;
 #endif
 #ifdef CLD_FLG_LINEAR
-	if (flags & CLD_FLG_LINEAR) OPEN_FLAGS |= FILE_FLAG_SEQUENTIAL_SCAN;
+	if (flags & CLD_FLG_LINEAR)
+		OPEN_FLAGS |= FILE_FLAG_SEQUENTIAL_SCAN;
 #endif
 #ifdef CLD_FLG_FILE
 	if (flags & CLD_FLG_FILE) {
@@ -145,29 +148,31 @@
 	}
 #endif
 	fd = CreateFile(filespec,
-		OPEN_READ_WRITE,
-		OPEN_SHARE,
-		NULL,
-		OPEN_DISPO,
-		OPEN_FLAGS,
-		NULL);
+			OPEN_READ_WRITE,
+			OPEN_SHARE, NULL, OPEN_DISPO, OPEN_FLAGS, NULL);
 #else
 	int OPEN_MASK = O_LARGEFILE;
-	if ((flags & CLD_FLG_R) && !(flags & CLD_FLG_W)) OPEN_MASK |= O_RDONLY;
-	else if (!(flags & CLD_FLG_R) && (flags & CLD_FLG_W)) OPEN_MASK |= O_WRONLY;
-	else OPEN_MASK |= O_RDWR;
+	if ((flags & CLD_FLG_R) && !(flags & CLD_FLG_W))
+		OPEN_MASK |= O_RDONLY;
+	else if (!(flags & CLD_FLG_R) && (flags & CLD_FLG_W))
+		OPEN_MASK |= O_WRONLY;
+	else
+		OPEN_MASK |= O_RDWR;
 #ifdef CLD_FLG_FILE
-	if (flags & CLD_FLG_FILE) OPEN_MASK |= O_CREAT;
+	if (flags & CLD_FLG_FILE)
+		OPEN_MASK |= O_CREAT;
 #endif
 #ifdef CLD_FLG_DIRECT
-	if (flags & CLD_FLG_DIRECT) OPEN_MASK |= O_DIRECT;
+	if (flags & CLD_FLG_DIRECT)
+		OPEN_MASK |= O_DIRECT;
 #endif
-	fd = open(filespec,OPEN_MASK,00600);
+	fd = open(filespec, OPEN_MASK, 00600);
 #endif
-	return(fd);
+	return (fd);
 }
 
-int Sync (fd_t fd) {
+int Sync(fd_t fd)
+{
 #ifdef WINDOWS
 	if (FlushFileBuffers(fd) != TRUE) {
 		return -1;
diff --git a/testcases/kernel/io/disktest/main.c b/testcases/kernel/io/disktest/main.c
index 901497d..5e5b91a 100644
--- a/testcases/kernel/io/disktest/main.c
+++ b/testcases/kernel/io/disktest/main.c
@@ -64,11 +64,11 @@
 /* global */
 child_args_t cleanArgs;
 test_env_t cleanEnv;
-char hostname[HOSTNAME_SIZE]; /* global system hostname */
+char hostname[HOSTNAME_SIZE];	/* global system hostname */
 
-void linear_read_write_test(test_ll_t *test)
+void linear_read_write_test(test_ll_t * test)
 {
-	OFF_T *pVal1 = (OFF_T *)test->env->shared_mem;
+	OFF_T *pVal1 = (OFF_T *) test->env->shared_mem;
 	int i;
 
 	if (test->args->flags & CLD_FLG_W) {
@@ -78,22 +78,27 @@
 		test->env->lastAction.oper = WRITER;
 		test->args->test_state = SET_OPER_W(test->args->test_state);
 		test->args->test_state = SET_wFST_TIME(test->args->test_state);
-//		srand(test->args->seed);	/* reseed so we can re create the same random transfers */
-		memset(test->env->action_list,0,sizeof(action_t)*test->args->t_kids);
+//              srand(test->args->seed);        /* reseed so we can re create the same random transfers */
+		memset(test->env->action_list, 0,
+		       sizeof(action_t) * test->args->t_kids);
 		test->env->action_list_entry = 0;
 		test->env->wcount = 0;
 		test->env->rcount = 0;
 		if (test->args->flags & CLD_FLG_CYC)
 			if (test->args->cycles == 0) {
-				pMsg(INFO,test->args, "Starting write pass, cycle %lu\n", (unsigned long) test->env->pass_count);
+				pMsg(INFO, test->args,
+				     "Starting write pass, cycle %lu\n",
+				     (unsigned long)test->env->pass_count);
 			} else {
-				pMsg(INFO,test->args, "Starting write pass, cycle %lu of %lu\n", (unsigned long) test->env->pass_count, test->args->cycles);
-			}
-		else {
-			pMsg(INFO,test->args, "Starting write pass\n");
+				pMsg(INFO, test->args,
+				     "Starting write pass, cycle %lu of %lu\n",
+				     (unsigned long)test->env->pass_count,
+				     test->args->cycles);
+		} else {
+			pMsg(INFO, test->args, "Starting write pass\n");
 		}
 		CreateTestChild(ChildTimer, test);
-		for (i=0;i<test->args->t_kids;i++) {
+		for (i = 0; i < test->args->t_kids; i++) {
 			CreateTestChild(ChildMain, test);
 		}
 		/* Wait for the writers to finish */
@@ -101,7 +106,9 @@
 	}
 
 	/* If the write test failed don't start the read test */
-	if (!(TST_STS(test->args->test_state))) { return; }
+	if (!(TST_STS(test->args->test_state))) {
+		return;
+	}
 
 	if (test->args->flags & CLD_FLG_R) {
 		test->env->bContinue = TRUE;
@@ -110,22 +117,27 @@
 		test->env->lastAction.oper = READER;
 		test->args->test_state = SET_OPER_R(test->args->test_state);
 		test->args->test_state = SET_rFST_TIME(test->args->test_state);
-//		srand(test->args->seed);	/* reseed so we can re create the same random transfers */
-		memset(test->env->action_list,0,sizeof(action_t)*test->args->t_kids);
+//              srand(test->args->seed);        /* reseed so we can re create the same random transfers */
+		memset(test->env->action_list, 0,
+		       sizeof(action_t) * test->args->t_kids);
 		test->env->action_list_entry = 0;
 		test->env->wcount = 0;
 		test->env->rcount = 0;
 		if (test->args->flags & CLD_FLG_CYC)
 			if (test->args->cycles == 0) {
-				pMsg(INFO,test->args, "Starting read pass, cycle %lu\n", (unsigned long) test->env->pass_count);
+				pMsg(INFO, test->args,
+				     "Starting read pass, cycle %lu\n",
+				     (unsigned long)test->env->pass_count);
 			} else {
-				pMsg(INFO,test->args, "Starting read pass, cycle %lu of %lu\n", (unsigned long) test->env->pass_count, test->args->cycles);
-			}
-		else {
-			pMsg(INFO,test->args, "Starting read pass\n");
+				pMsg(INFO, test->args,
+				     "Starting read pass, cycle %lu of %lu\n",
+				     (unsigned long)test->env->pass_count,
+				     test->args->cycles);
+		} else {
+			pMsg(INFO, test->args, "Starting read pass\n");
 		}
 		CreateTestChild(ChildTimer, test);
-		for (i=0;i<test->args->t_kids;i++) {
+		for (i = 0; i < test->args->t_kids; i++) {
 			CreateTestChild(ChildMain, test);
 		}
 		/* Wait for the readers to finish */
@@ -133,7 +145,7 @@
 	}
 }
 
-unsigned long init_data(test_ll_t *test, unsigned char **data_buffer_unaligned)
+unsigned long init_data(test_ll_t * test, unsigned char **data_buffer_unaligned)
 {
 	int i;
 	OFF_T *pVal1;
@@ -142,57 +154,78 @@
 
 #ifdef WINDOWS
 	if (CreateMutex(NULL, FALSE, "gbl") == NULL) {
-		pMsg(ERR, test->args, "Failed to create semaphore, error = %u\n", GetLastError());
-		return(GetLastError());
+		pMsg(ERR, test->args,
+		     "Failed to create semaphore, error = %u\n",
+		     GetLastError());
+		return (GetLastError());
 	}
-	if ((test->env->mutexs.MutexACTION = CreateMutex(NULL, FALSE, NULL)) == NULL) {
-		pMsg(ERR, test->args, "Failed to create semaphore, error = %u\n", GetLastError());
-		return(GetLastError());
+	if ((test->env->mutexs.MutexACTION =
+	     CreateMutex(NULL, FALSE, NULL)) == NULL) {
+		pMsg(ERR, test->args,
+		     "Failed to create semaphore, error = %u\n",
+		     GetLastError());
+		return (GetLastError());
 	}
-	if ((test->env->mutexs.MutexIO = CreateMutex(NULL, FALSE, NULL)) == NULL) {
-		pMsg(ERR, test->args, "Failed to create semaphore, error = %u\n", GetLastError());
-		return(GetLastError());
+	if ((test->env->mutexs.MutexIO =
+	     CreateMutex(NULL, FALSE, NULL)) == NULL) {
+		pMsg(ERR, test->args,
+		     "Failed to create semaphore, error = %u\n",
+		     GetLastError());
+		return (GetLastError());
 	}
 #else
 
-	mutexs_t mutexs = { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
+	mutexs_t mutexs =
+	    { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER };
 	test->env->mutexs = mutexs;
 
 #endif
 
-	if (test->args->seed == 0) test->args->seed = test->args->pid;
+	if (test->args->seed == 0)
+		test->args->seed = test->args->pid;
 	srand(test->args->seed);
 
 	/* create bitmap to hold write/read context: each bit is an LBA */
 	/* the stuff before BMP_OFFSET is the data for child/thread shared context */
-	test->env->bmp_siz = (((((size_t)test->args->vsiz))/8) == 0) ? 1 : ((((size_t)test->args->vsiz))/8);
-	if ((test->args->vsiz/8) != 0) test->env->bmp_siz += 1;	/* account for rounding error */
+	test->env->bmp_siz =
+	    (((((size_t) test->args->vsiz)) / 8) ==
+	     0) ? 1 : ((((size_t) test->args->vsiz)) / 8);
+	if ((test->args->vsiz / 8) != 0)
+		test->env->bmp_siz += 1;	/* account for rounding error */
 
 	/* We use that same data buffer for static data, so alloc here. */
-	data_buffer_size = ((test->args->htrsiz*BLK_SIZE)*2);
-	if ((*data_buffer_unaligned = (unsigned char *) ALLOC(data_buffer_size+ALIGNSIZE)) == NULL) {
-		pMsg(ERR,test->args,  "Failed to allocate static data buffer memory.\n");
-		return(-1);
+	data_buffer_size = ((test->args->htrsiz * BLK_SIZE) * 2);
+	if ((*data_buffer_unaligned =
+	     (unsigned char *)ALLOC(data_buffer_size + ALIGNSIZE)) == NULL) {
+		pMsg(ERR, test->args,
+		     "Failed to allocate static data buffer memory.\n");
+		return (-1);
 	}
 	/* create list to hold lbas currently be written */
-	if ((test->env->action_list = (action_t *) ALLOC(sizeof(action_t)*test->args->t_kids)) == NULL) {
-		pMsg(ERR,test->args,  "Failed to allocate static data buffer memory.\n");
-		return(-1);
+	if ((test->env->action_list =
+	     (action_t *) ALLOC(sizeof(action_t) * test->args->t_kids)) ==
+	    NULL) {
+		pMsg(ERR, test->args,
+		     "Failed to allocate static data buffer memory.\n");
+		return (-1);
 	}
 
-	test->env->data_buffer = (unsigned char *) BUFALIGN(*data_buffer_unaligned);
+	test->env->data_buffer =
+	    (unsigned char *)BUFALIGN(*data_buffer_unaligned);
 
-	if ((test->env->shared_mem = (void *) ALLOC(test->env->bmp_siz+BMP_OFFSET)) == NULL) {
+	if ((test->env->shared_mem =
+	     (void *)ALLOC(test->env->bmp_siz + BMP_OFFSET)) == NULL) {
 		pMsg(ERR, test->args, "Failed to allocate bitmap memory\n");
-		return(-1);
+		return (-1);
 	}
 
-	memset(test->env->shared_mem,0,test->env->bmp_siz+BMP_OFFSET);
-	memset(test->env->data_buffer,0,data_buffer_size);
-	memset(test->env->action_list,0,sizeof(action_t)*test->args->t_kids);
+	memset(test->env->shared_mem, 0, test->env->bmp_siz + BMP_OFFSET);
+	memset(test->env->data_buffer, 0, data_buffer_size);
+	memset(test->env->action_list, 0,
+	       sizeof(action_t) * test->args->t_kids);
 	test->env->action_list_entry = 0;
 
-	pVal1 = (OFF_T *)test->env->shared_mem;
+	pVal1 = (OFF_T *) test->env->shared_mem;
 	*(pVal1 + OFF_WLBA) = test->args->start_lba;
 	*(pVal1 + OFF_RLBA) = test->args->start_lba;
 	test->args->test_state = SET_STS_PASS(test->args->test_state);
@@ -208,32 +241,41 @@
 	}
 
 	/* prefill the data buffer with data for compares and writes */
-	switch(test->args->flags & CLD_FLG_PTYPS) {
-		case CLD_FLG_FPTYPE :
-			for (i=0;i<sizeof(test->args->pattern);i++) {
-				if ((test->args->pattern & (((OFF_T) 0xff) << (((sizeof(test->args->pattern)-1)-i)*8))) != 0) break;
-			}
-			/* special case for pattern = 0 */
-			if (i == sizeof(test->args->pattern)) i = 0;
-			fill_buffer(test->env->data_buffer, data_buffer_size, &test->args->pattern, sizeof(test->args->pattern)-i, CLD_FLG_FPTYPE);
-			break;
-		case CLD_FLG_RPTYPE :
-			fill_buffer(test->env->data_buffer, data_buffer_size, NULL, 0, CLD_FLG_RPTYPE);
-			break;
-		case CLD_FLG_CPTYPE :
-			fill_buffer(test->env->data_buffer, data_buffer_size, 0, 0, CLD_FLG_CPTYPE);
-		case CLD_FLG_LPTYPE :
-			break;
-		default :
-			pMsg(WARN, test->args, "Unknown fill pattern\n");
-			return(-1);
+	switch (test->args->flags & CLD_FLG_PTYPS) {
+	case CLD_FLG_FPTYPE:
+		for (i = 0; i < sizeof(test->args->pattern); i++) {
+			if ((test->args->
+			     pattern & (((OFF_T) 0xff) <<
+					(((sizeof(test->args->pattern) - 1) -
+					  i) * 8))) != 0)
+				break;
+		}
+		/* special case for pattern = 0 */
+		if (i == sizeof(test->args->pattern))
+			i = 0;
+		fill_buffer(test->env->data_buffer, data_buffer_size,
+			    &test->args->pattern,
+			    sizeof(test->args->pattern) - i, CLD_FLG_FPTYPE);
+		break;
+	case CLD_FLG_RPTYPE:
+		fill_buffer(test->env->data_buffer, data_buffer_size, NULL, 0,
+			    CLD_FLG_RPTYPE);
+		break;
+	case CLD_FLG_CPTYPE:
+		fill_buffer(test->env->data_buffer, data_buffer_size, 0, 0,
+			    CLD_FLG_CPTYPE);
+	case CLD_FLG_LPTYPE:
+		break;
+	default:
+		pMsg(WARN, test->args, "Unknown fill pattern\n");
+		return (-1);
 	}
 
 	return 0;
 }
 
 #ifdef WINDOWS
-DWORD WINAPI threadedMain(test_ll_t *test)
+DWORD WINAPI threadedMain(test_ll_t * test)
 #else
 void *threadedMain(void *vtest)
 #endif
@@ -255,19 +297,25 @@
 
 	init_gbl_data(test->env);
 
-	if (make_assumptions(test->args) < 0) { TEXIT((uintptr_t)GETLASTERROR()); }
-	if (check_conclusions(test->args) < 0) { TEXIT((uintptr_t)GETLASTERROR()); }
+	if (make_assumptions(test->args) < 0) {
+		TEXIT((uintptr_t) GETLASTERROR());
+	}
+	if (check_conclusions(test->args) < 0) {
+		TEXIT((uintptr_t) GETLASTERROR());
+	}
 	if (test->args->flags & CLD_FLG_DUMP) {
 		/*
 		 * All we are doing is dumping filespec data to STDOUT, so
 		 * we will do this here and be done.
 		 */
 		do_dump(test->args);
-		TEXIT((uintptr_t)GETLASTERROR());
+		TEXIT((uintptr_t) GETLASTERROR());
 	} else {
 		ulRV = init_data(test, &data_buffer_unaligned);
-		if (ulRV != 0) { TEXIT(ulRV); }
-		pVal1 = (OFF_T *)test->env->shared_mem;
+		if (ulRV != 0) {
+			TEXIT(ulRV);
+		}
+		pVal1 = (OFF_T *) test->env->shared_mem;
 	}
 
 	pMsg(START, test->args, "Start args: %s\n", test->args->argstr);
@@ -278,45 +326,60 @@
 	do {
 		test->env->pass_count++;
 		test->env->start_time = time(NULL);
-		if (test->args->flags & CLD_FLG_RPTYPE) { /* force random data to be different each cycle */
-			fill_buffer(test->env->data_buffer, ((test->args->htrsiz*BLK_SIZE)*2), NULL, 0, CLD_FLG_RPTYPE);
+		if (test->args->flags & CLD_FLG_RPTYPE) {	/* force random data to be different each cycle */
+			fill_buffer(test->env->data_buffer,
+				    ((test->args->htrsiz * BLK_SIZE) * 2), NULL,
+				    0, CLD_FLG_RPTYPE);
 		}
 		sharedMem = test->env->shared_mem;
-		memset(sharedMem+BMP_OFFSET,0,test->env->bmp_siz);
-		if ((test->args->flags & CLD_FLG_LINEAR) && !(test->args->flags & CLD_FLG_NTRLVD)) {
+		memset(sharedMem + BMP_OFFSET, 0, test->env->bmp_siz);
+		if ((test->args->flags & CLD_FLG_LINEAR)
+		    && !(test->args->flags & CLD_FLG_NTRLVD)) {
 			linear_read_write_test(test);
 		} else {
 			/* we only reset the end time if not running a linear read / write test */
-			test->env->end_time = test->env->start_time + test->args->run_time;
+			test->env->end_time =
+			    test->env->start_time + test->args->run_time;
 			test->env->bContinue = TRUE;
 			*(pVal1 + OFF_WLBA) = test->args->start_lba;
-			test->args->test_state = DIRCT_INC(test->args->test_state);
-			test->args->test_state = SET_wFST_TIME(test->args->test_state);
-			test->args->test_state = SET_rFST_TIME(test->args->test_state);
+			test->args->test_state =
+			    DIRCT_INC(test->args->test_state);
+			test->args->test_state =
+			    SET_wFST_TIME(test->args->test_state);
+			test->args->test_state =
+			    SET_rFST_TIME(test->args->test_state);
 			if (test->args->flags & CLD_FLG_W) {
 				test->env->lastAction.oper = WRITER;
-				test->args->test_state = SET_OPER_W(test->args->test_state);
+				test->args->test_state =
+				    SET_OPER_W(test->args->test_state);
 			} else {
 				test->env->lastAction.oper = READER;
-				test->args->test_state = SET_OPER_R(test->args->test_state);
+				test->args->test_state =
+				    SET_OPER_R(test->args->test_state);
 			}
-			memset(test->env->action_list,0,sizeof(action_t)*test->args->t_kids);
+			memset(test->env->action_list, 0,
+			       sizeof(action_t) * test->args->t_kids);
 			test->env->action_list_entry = 0;
 			test->env->wcount = 0;
 			test->env->rcount = 0;
 
 			if (test->args->flags & CLD_FLG_CYC)
 				if (test->args->cycles == 0) {
-					pMsg(INFO,test->args, "Starting pass %lu\n", (unsigned long) test->env->pass_count);
+					pMsg(INFO, test->args,
+					     "Starting pass %lu\n",
+					     (unsigned long)test->env->
+					     pass_count);
 				} else {
-					pMsg(INFO,test->args, "Starting pass %lu of %lu\n", (unsigned long) test->env->pass_count, test->args->cycles);
-				}
-			else {
-				pMsg(INFO,test->args, "Starting pass\n");
+					pMsg(INFO, test->args,
+					     "Starting pass %lu of %lu\n",
+					     (unsigned long)test->env->
+					     pass_count, test->args->cycles);
+			} else {
+				pMsg(INFO, test->args, "Starting pass\n");
 			}
 
 			CreateTestChild(ChildTimer, test);
-			for (i=0;i<test->args->t_kids;i++) {
+			for (i = 0; i < test->args->t_kids; i++) {
 				CreateTestChild(ChildMain, test);
 			}
 			/* Wait for the children to finish */
@@ -324,19 +387,25 @@
 		}
 
 		update_cyc_stats(test->env);
-		if ((test->args->flags & CLD_FLG_CYC) && (test->args->flags & CLD_FLG_PCYC)) {
+		if ((test->args->flags & CLD_FLG_CYC)
+		    && (test->args->flags & CLD_FLG_PCYC)) {
 			print_stats(test->args, test->env, CYCLE);
 		}
 		update_gbl_stats(test->env);
 
-		if (signal_action & SIGNAL_STOP) { break; }	/* user request to stop */
-		if ((glb_run == 0)) { break; }				/* global request to stop */
-
+		if (signal_action & SIGNAL_STOP) {
+			break;
+		}		/* user request to stop */
+		if ((glb_run == 0)) {
+			break;
+		}
+		/* global request to stop */
 		if (!(test->args->flags & CLD_FLG_CYC)) {
-			break;					/* leave, unless cycle testing */
+			break;	/* leave, unless cycle testing */
 		} else {
-			if ((test->args->cycles > 0) && (test->env->pass_count >= test->args->cycles)) {
-				break;				/* leave, cycle testing complete */
+			if ((test->args->cycles > 0)
+			    && (test->env->pass_count >= test->args->cycles)) {
+				break;	/* leave, cycle testing complete */
 			}
 		}
 	} while (TST_STS(test->args->test_state));
@@ -351,18 +420,20 @@
 
 	if (TST_STS(test->args->test_state)) {
 		if (signal_action & SIGNAL_STOP) {
-			pMsg(END, test->args, "User Interrupt: Test Done (Passed)\n");
+			pMsg(END, test->args,
+			     "User Interrupt: Test Done (Passed)\n");
 		} else {
 			pMsg(END, test->args, "Test Done (Passed)\n");
 		}
 	} else {
 		if (signal_action & SIGNAL_STOP) {
-			pMsg(END, test->args, "User Interrupt: Test Done (Failed)\n");
+			pMsg(END, test->args,
+			     "User Interrupt: Test Done (Failed)\n");
 		} else {
 			pMsg(END, test->args, "Test Done (Failed)\n");
 		}
 	}
-	TEXIT((uintptr_t)GETLASTERROR());
+	TEXIT((uintptr_t) GETLASTERROR());
 }
 
 /*
@@ -372,23 +443,31 @@
  *
  * Returns the newly created test structure
  */
-test_ll_t *getNewTest(test_ll_t *testList) {
+test_ll_t *getNewTest(test_ll_t * testList)
+{
 	test_ll_t *pNewTest;
 
-	if ((pNewTest = (test_ll_t *)ALLOC(sizeof(test_ll_t))) == NULL) {
-		pMsg(ERR, &cleanArgs, "%d : Could not allocate memory for new test.\n", GETLASTERROR());
+	if ((pNewTest = (test_ll_t *) ALLOC(sizeof(test_ll_t))) == NULL) {
+		pMsg(ERR, &cleanArgs,
+		     "%d : Could not allocate memory for new test.\n",
+		     GETLASTERROR());
 		return NULL;
 	}
 
 	memset(pNewTest, 0, sizeof(test_ll_t));
 
-	if ((pNewTest->args = (child_args_t *)ALLOC(sizeof(child_args_t))) == NULL) {
-		pMsg(ERR, &cleanArgs, "%d : Could not allocate memory for new test.\n", GETLASTERROR());
+	if ((pNewTest->args =
+	     (child_args_t *) ALLOC(sizeof(child_args_t))) == NULL) {
+		pMsg(ERR, &cleanArgs,
+		     "%d : Could not allocate memory for new test.\n",
+		     GETLASTERROR());
 		FREE(pNewTest);
 		return NULL;
 	}
-	if ((pNewTest->env = (test_env_t *)ALLOC(sizeof(test_env_t))) == NULL) {
-		pMsg(ERR, &cleanArgs, "%d : Could not allocate memory for new test.\n", GETLASTERROR());
+	if ((pNewTest->env = (test_env_t *) ALLOC(sizeof(test_env_t))) == NULL) {
+		pMsg(ERR, &cleanArgs,
+		     "%d : Could not allocate memory for new test.\n",
+		     GETLASTERROR());
 		FREE(pNewTest->args);
 		FREE(pNewTest);
 		return NULL;
@@ -401,7 +480,8 @@
 	return pNewTest;
 }
 
-test_ll_t *run() {
+test_ll_t *run()
+{
 	test_ll_t *newTest = NULL, *lastTest = NULL;
 
 	if (cleanArgs.flags & CLD_FLG_FSLIST) {
@@ -410,30 +490,32 @@
 		FILE *file = NULL;
 
 		if ((aFilespec = (char *)ALLOC(80)) == NULL) {
-			pMsg(ERR, &cleanArgs, "Could not allocate memory to read file");
+			pMsg(ERR, &cleanArgs,
+			     "Could not allocate memory to read file");
 			return newTest;
 		}
 
 		file = fopen(filespec, "r");
-			if (file == NULL) {
-				pMsg(
-					ERR,
-					&cleanArgs,
-					"%s is not a regular file, could not be opened for reading, or was not found.",
-					filespec);
+		if (file == NULL) {
+			pMsg(ERR,
+			     &cleanArgs,
+			     "%s is not a regular file, could not be opened for reading, or was not found.",
+			     filespec);
 
-				return newTest;
-			}
+			return newTest;
+		}
 
 		while (!feof(file)) {
 			memset(aFilespec, 0, 80);
 			fscanf(file, "%79s", aFilespec);
-			if (aFilespec[0] != 0) { /* if we read something useful */
+			if (aFilespec[0] != 0) {	/* if we read something useful */
 				lastTest = newTest;
 				newTest = getNewTest(lastTest);
 				if (newTest != lastTest) {
-					memset(newTest->args->device, 0, DEV_NAME_LEN);
-					strncpy(newTest->args->device, aFilespec, strlen(aFilespec));
+					memset(newTest->args->device, 0,
+					       DEV_NAME_LEN);
+					strncpy(newTest->args->device,
+						aFilespec, strlen(aFilespec));
 					createChild(threadedMain, newTest);
 				} else {
 					newTest = lastTest;
@@ -465,11 +547,12 @@
 	WSADATA wsaData;
 	int err;
 
-	wVersionRequested = MAKEWORD( 2, 2 );
+	wVersionRequested = MAKEWORD(2, 2);
 
-	err = WSAStartup( wVersionRequested, &wsaData );
+	err = WSAStartup(wVersionRequested, &wsaData);
 	if (err != 0) {
-		pMsg(WARN, &cleanArgs, "Windows setup of Winsock failed, can't retrieve host name, continuing");
+		pMsg(WARN, &cleanArgs,
+		     "Windows setup of Winsock failed, can't retrieve host name, continuing");
 	}
 #endif
 
@@ -491,17 +574,20 @@
 	cleanArgs.flags |= CLD_FLG_ERR_REREAD;
 	cleanArgs.flags |= CLD_FLG_LBA_SYNC;
 
-	for (i=1;i<argc-1;i++) {
-		strncat(cleanArgs.argstr, argv[i], (MAX_ARG_LEN-1)-strlen(cleanArgs.argstr));
-		strncat(cleanArgs.argstr, " ", (MAX_ARG_LEN-1)-strlen(cleanArgs.argstr));
+	for (i = 1; i < argc - 1; i++) {
+		strncat(cleanArgs.argstr, argv[i],
+			(MAX_ARG_LEN - 1) - strlen(cleanArgs.argstr));
+		strncat(cleanArgs.argstr, " ",
+			(MAX_ARG_LEN - 1) - strlen(cleanArgs.argstr));
 	}
 
-	if (fill_cld_args(argc, argv, &cleanArgs) < 0) exit(1);
+	if (fill_cld_args(argc, argv, &cleanArgs) < 0)
+		exit(1);
 
 	cleanUp(run());
 
 #ifdef WINDOWS
-    WSACleanup();
+	WSACleanup();
 #endif
 
 	return 0;
diff --git a/testcases/kernel/io/disktest/parse.c b/testcases/kernel/io/disktest/parse.c
index 8b92980..4aa8b54 100644
--- a/testcases/kernel/io/disktest/parse.c
+++ b/testcases/kernel/io/disktest/parse.c
@@ -44,7 +44,7 @@
 #include "sfunc.h"
 #include "parse.h"
 
-int fill_cld_args(int argc, char **argv, child_args_t *args)
+int fill_cld_args(int argc, char **argv, child_args_t * args)
 {
 	extern char *optarg;
 	extern int optind;
@@ -53,674 +53,754 @@
 	signed char c;
 	char *leftovers;
 
-	while ((c = getopt(argc, argv, "?a:A:B:cC:dD:E:f:Fh:I:K:L:m:M:nN:o:p:P:qQrR:s:S:t:T:wvV:z")) != -1) {
-		switch(c) {
-			case ':' :
-				pMsg(WARN, args, "Missing argument for perameter.\n");
-				usage();
-				return(-1);
-			case 'V' :
+	while ((c =
+		getopt(argc, argv,
+		       "?a:A:B:cC:dD:E:f:Fh:I:K:L:m:M:nN:o:p:P:qQrR:s:S:t:T:wvV:z"))
+	       != -1) {
+		switch (c) {
+		case ':':
+			pMsg(WARN, args, "Missing argument for perameter.\n");
+			usage();
+			return (-1);
+		case 'V':
 #ifdef _DEBUG
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					exit(1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c argument is non numeric.\n", c);
-					exit(1);
-				}
-				gbl_dbg_lvl = atoi(optarg);
-#else
-				pMsg(ERR, args, "Debug code not compiled in, recompile with _DEBUG directive.\n", c);
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
 				exit(1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c argument is non numeric.\n", c);
+				exit(1);
+			}
+			gbl_dbg_lvl = atoi(optarg);
+#else
+			pMsg(ERR, args,
+			     "Debug code not compiled in, recompile with _DEBUG directive.\n",
+			     c);
+			exit(1);
 #endif
-				break;
-			case 'd' :
-				glb_flags |= GLB_FLG_QUIET;
-				args->flags |= CLD_FLG_DUMP;
-				break;
-			case 'a' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					return(-1);
-				}
-				args->seed = (unsigned int) strtol(optarg, NULL, 0);
-				break;
-			case 'A' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					exit(1);
-				}
-				if (strchr(optarg,'g')) {
-					glb_flags |= GLB_FLG_KILL;
-				}
-				if (strchr(optarg,'c')) {
-					args->flags &= ~CLD_FLG_ALLDIE;
-				}
-				if (strchr(optarg,'m')) {
-					args->flags |= CLD_FLG_ERR_MARK;
-				}
-				if (strchr(optarg,'r')) {
-					args->flags &= ~CLD_FLG_ERR_REREAD;
-				}
-				if (strchr(optarg,'s')) {
-					args->flags &= ~CLD_FLG_LBA_SYNC;
-				}
-				if (strchr(optarg,'S')) {
-					args->flags |= CLD_FLG_IO_SERIAL;
-				}
-				if (strchr(optarg,'w')) {
-					args->flags |= CLD_FLG_WRITE_ONCE;
-				}
-				if (strchr(optarg,'W')) {
-					args->flags |= CLD_FLG_UNIQ_WRT;
-				}
-				if (strchr(optarg,'t')) {
-					args->flags |= CLD_FLG_TMO_ERROR;
-				}
-				break;
-			case 'q' :
-				glb_flags |= GLB_FLG_QUIET;
-				break;
-			case 'Q' :
-				glb_flags |= GLB_FLG_SUPRESS;
-				break;
-			case 'v' :
-				pMsg(INFO, args, "Version %s\n", VER_STR);
-				exit(0);
-			case 'p' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (args->flags & (CLD_FLG_LINEAR|CLD_FLG_RANDOM)) {
-					pMsg(WARN, args, "Only one seek type, -p, can be specified.\n");
-					return(-1);
-				}
-				/* seek pattern type */
-				if (strchr(optarg,'L'))
-					args->flags |= CLD_FLG_LINEAR;
-				else if (strchr(optarg,'l'))
-					args->flags |= (CLD_FLG_LINEAR|CLD_FLG_NTRLVD);
-				else if (strchr(optarg,'R'))
-					args->flags |= CLD_FLG_RANDOM;
-				else if (strchr(optarg,'r'))
-					args->flags |= (CLD_FLG_RANDOM|CLD_FLG_NTRLVD);
-				else {
-					pMsg(WARN, args, "Unknown Seek pattern\n");
-					usage();
-					return(-1);
-				}
-				if (strchr(optarg,'U') || strchr(optarg,'u'))
-					if ((args->flags & (CLD_FLG_LINEAR)) &&
-							!(args->flags & CLD_FLG_LUND))
-						args->flags |= CLD_FLG_LUNU;
-				if (strchr(optarg,'D') || strchr(optarg,'d'))
-					if ((args->flags & (CLD_FLG_LINEAR)) &&
-							!(args->flags & CLD_FLG_LUNU))
-						args->flags |= CLD_FLG_LUND;
-				break;
-			case 'B' :
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					return(-1);
-				}
-				if (strchr(optarg,':') != NULL) { /* we are given a range of transfer sizes */
-					args->flags |= CLD_FLG_RTRSIZ;
-					args->ltrsiz = strtoul(optarg, &leftovers, 10);
-					if (leftovers == strchr(leftovers,'k')) { /* first value had a 'k' */
-						args->ltrsiz *= 2;
-						leftovers++;
-					} else if (leftovers == strchr(leftovers, 'm')) {	/* first value had a 'm' */
-						args->ltrsiz *= (2 * 1024);
-						leftovers++;
-					} else {
-						if (args->ltrsiz > 256)
-							args->ltrsiz /= BLK_SIZE;
-					}
-					if (!isdigit(leftovers[1])) {
-						pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-						return(-1);
-					}
-					args->htrsiz = atol((char *)strchr(leftovers,':')+1);
-					if ((strchr(leftovers,'k')) != NULL) {/* second value had a 'k' */
-						args->htrsiz *= 2;
-					} else if ((strchr(leftovers,'m')) != NULL) {	/* second value had a 'm' */
-						args->htrsiz *= (2 * 1024);
-					} else {
-						if (args->htrsiz > 256)
-							   args->htrsiz /= BLK_SIZE;
-					}
-				} else { /* only a single value given for transfer size */
-					args->ltrsiz = atoi(optarg);
-					if (strchr(optarg,'k')) {
-						args->ltrsiz *= 2;
-					} else if (strchr(optarg,'m')) {
-						args->ltrsiz *= (2 * 1024);
-					} else {
-						if (args->ltrsiz > 256)
-							   args->ltrsiz /= BLK_SIZE;
-					}
-					args->htrsiz = args->ltrsiz;
-				}
-#ifdef _DEBUG
-				PDBG5(DBUG, args, "Parsed Transfer size: %ld\n", args->htrsiz);
-#endif
-				break;
-			case 'c' :
-				if (args->flags & CLD_FLG_PTYPS) {
-					pMsg(WARN, args, "Please specify only one pattern type\n");
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_CPTYPE;
-				break;
-			case 'n' :
-				if (args->flags & CLD_FLG_PTYPS) {
-					pMsg(WARN, args, "Please specify only one pattern type\n");
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_LPTYPE;
-				break;
-			case 'f' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (args->flags & CLD_FLG_PTYPS) {
-					pMsg(WARN, args, "Please specify only one pattern type\n");
-					usage();
-					return(-1);
-				}
-				args->pattern = my_strtofft(optarg);
-				args->flags |= CLD_FLG_FPTYPE;
-				break;
-			case 'F' :
-				/* the filespec is a list of filespecs in a file */
-				args->flags |= CLD_FLG_FSLIST;
-				break;
-			case 'z' :
-				if (args->flags & CLD_FLG_PTYPS) {
-					pMsg(WARN, args, "Please specify only one pattern type\n");
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_RPTYPE;
-				break;
-			case 'h' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_HBEAT;
-				args->hbeat = atoi(optarg);
-				if (strchr(optarg,'m')) {	/* multiply by sec */
-					args->hbeat *= 60;
-				} else if (strchr(optarg,'h')) { /* multiply sec*min */
-					args->hbeat *= (time_t) (60*60);
-				} else if (strchr(optarg,'d')) { /* multiply by sec*min*hours */
-					args->hbeat *= (time_t) (60*60*24);
-				}
-				break;
-			case 'D' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					usage();
-					return(-1);
-				}
-				args->rperc = atoi(optarg);
-				args->wperc = atoi((char *)(strchr(optarg,':')+1));
-				args->flags |= CLD_FLG_DUTY;
-				break;
-			case 'r' :
-				args->flags |= CLD_FLG_R;
-				break;
-			case 'w' :
-				args->flags |= CLD_FLG_W;
-				break;
-			case 'o' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				args->offset = atol(optarg);
-				args->flags |= CLD_FLG_OFFSET;
-				break;
-			case 'R' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (strchr(optarg,':') != NULL) { /* we are given a retry delay */
-					args->retries = strtol(optarg, &leftovers, 10);
-					args->retry_delay = (time_t) atol((char *)strchr(leftovers,':')+1);
-				} else { /* only a retry count given */
-					args->retries = atoi(optarg);
-				}
-				break;
-			case 'M' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				args->flags |= CLD_FLG_ALT_MARK;
-				args->alt_mark = my_strtofft(optarg);
-				break;
-			case 'm' :
-				args->flags |= CLD_FLG_MBLK;
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (strchr(optarg,'l')) { /* returns NULL if char is not found */
-					args->flags |= CLD_FLG_MRK_LBA;
-				}
-				if (strchr(optarg,'p')) {
-					args->flags |= CLD_FLG_MRK_PASS;
-				}
-				if (strchr(optarg,'t')) {
-					args->flags |= CLD_FLG_MRK_TIME;
-				}
-				if (strchr(optarg,'s')) {
-					args->flags |= CLD_FLG_MRK_SEED;
-				}
-				if (strchr(optarg,'h')) {
-					args->flags |= CLD_FLG_MRK_HOST;
-				}
-				if (strchr(optarg,'f')) {
-					args->flags |= CLD_FLG_MRK_TARGET;
-				}
-				if (strchr(optarg,'a')) {
-					args->flags |= CLD_FLG_MRK_ALL;
-				}
-				if (!strchr(optarg,'l') &&
-						!strchr(optarg,'p') &&
-						!strchr(optarg,'t') &&
-						!strchr(optarg,'s') &&
-						!strchr(optarg,'h') &&
-						!strchr(optarg,'f') &&
-						!strchr(optarg,'a')) {
-					pMsg(WARN, args, "Unknown header mark option\n");
-					return(-1);
-				}
-				break;
-			case 'E' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments are non numeric.\n", c);
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_CMPR;
-				args->cmp_lng = strtol(optarg,NULL,0);
-				if (strchr(optarg,'k')) {	/* multiply by 2^10 */
-					args->cmp_lng <<= 10;
-				} else if (strchr(optarg,'K')) { /* multiply 10^3 */
-					args->cmp_lng *= 1000;
-				} else if (strchr(optarg,'m')) { /* multiply by 2^20 */
-					args->cmp_lng <<= 20;
-				} else if (strchr(optarg,'M')) { /* multiply by 10^6 */
-					args->cmp_lng *= 1000000;
-				}
-				break;
-			case 'N' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments are non numeric.\n", c);
-					return(-1);
-				}
-				args->flags |= CLD_FLG_VSIZ;
-				args->vsiz = my_strtofft(optarg);
-				if (strchr(optarg,'k')) {	/* multiply by 2^10 */
-					args->vsiz <<= 10;
-				} else if (strchr(optarg,'K')) { /* multiply 10^3 */
-					args->vsiz *= 1000;
-				} else if (strchr(optarg,'m')) { /* multiply by 2^20 */
-					args->vsiz <<= 20;
-				} else if (strchr(optarg,'M')) { /* multiply by 10^6 */
-					args->vsiz *= 1000000;
-				} else if (strchr(optarg,'g')) { /* multiply by 2^30 */
-					args->vsiz <<= 30;
-				} else if (strchr(optarg,'G')) { /* multiply by 10^9 */
-					args->vsiz *= 1000000000;
-				}
-				break;
-			case 'I' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (strchr(optarg,'R') || strchr(optarg,'r')) {
-					if (!(args->flags & CLD_FLG_BLK) &&
-					    !(args->flags & CLD_FLG_FILE)) {
-						args->flags |= CLD_FLG_RAW;
-					} else {
-						pMsg(WARN, args, "Can only specify one IO type\n");
-						return(-1);
-					}
-				}
-				if (strchr(optarg,'B') || strchr(optarg,'b')) {
-					if (!(args->flags & CLD_FLG_RAW) &&
-					    !(args->flags & CLD_FLG_FILE)) {
-						args->flags |= CLD_FLG_BLK;
-					} else {
-						pMsg(WARN, args, "Can only specify one IO type\n");
-						return(-1);
-					}
-				}
-				if (strchr(optarg,'F') || strchr(optarg,'f')) {
-					if (!(args->flags & CLD_FLG_RAW) &&
-					    !(args->flags & CLD_FLG_BLK)) {
-						args->flags |= CLD_FLG_FILE;
-					} else {
-						pMsg(WARN, args, "Can only specify one IO type\n");
-						return(-1);
-					}
-				}
-				if (strchr(optarg,'D') || strchr(optarg,'d')) {
-					args->flags |= CLD_FLG_DIRECT;
-				}
-				if (strchr(optarg,'s')) {
-					args->sync_interval = strtoul((char *)strchr(optarg,'s')+1, NULL, 10);
-#ifdef _DEBUG
-					PDBG3(DBUG, args, "Parsed sync interval: %ld\n", args->sync_interval);
-#endif
-					if ((args->flags & CLD_FLG_DIRECT)) {
-						pMsg(ERR, args, "Can't specify sync with Direct IO\n");
-						return(-1);
-					}
-					args->flags |= CLD_FLG_WFSYNC;
-				}
-				break;
-			case 't' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-
-				if (strchr(optarg,':') != NULL) { /* we are given a option for delay & timeout */
-					args->delayTimeMin = strtoul(optarg, &leftovers, 10);
-					/* check to see if we have one or more then one ':' */
-					if ((char *)strchr(optarg,':') == (char *)strrchr(optarg,':')) {
-						/* only one ':', assume no random delayTime, and ioTimeout */
-						args->delayTimeMax = args->delayTimeMin;
-						args->ioTimeout = (time_t) atol((char *)strchr(leftovers,':')+1);
-					} else {
-						/* more then one ':', assume random delayTime, and ioTimeout */
-						args->delayTimeMax = strtoul(leftovers+1, &leftovers, 10);
-						args->ioTimeout = (time_t) atol((char *)strchr(leftovers,':')+1);
-					}
-					if (strchr(leftovers,'m')) {	/* multiply by sec */
-						args->ioTimeout *= 60;
-					} else if (strchr(leftovers,'h')) { /* multiply sec*min */
-						args->ioTimeout *= (time_t) (60*60);
-					} else if (strchr(leftovers,'d')) { /* multiply by sec*min*hours */
-						args->ioTimeout *= (time_t) (60*60*24);
-					}
-				} else {
-					args->delayTimeMin = strtoul(optarg, (char **)NULL, 10);
-					args->delayTimeMax = args->delayTimeMin;
-				}
-				break;
-			case 'T' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				args->run_time = atoi(optarg);
-				args->flags |= CLD_FLG_TMD;
-				if (strchr(optarg,'m')) {	/* multiply by sec */
-					args->run_time *= 60;
-				} else if (strchr(optarg,'h')) { /* multiply sec*min */
-					args->run_time *= (time_t) (60*60);
-				} else if (strchr(optarg,'d')) { /* multiply by sec*min*hours */
-					args->run_time *= (time_t) (60*60*24);
-				}
-				break;
-			case 'L' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				args->seeks = atoi(optarg);
-				args->flags |= CLD_FLG_SKS;
-				if (strchr(optarg,'k')) {	/* multiply by 2^10 */
-					args->seeks <<= 10;
-				} else if (strchr(optarg,'K')) { /* multiply 10^3 */
-					args->seeks *= 1000;
-				} else if (strchr(optarg,'m')) { /* multiply by 2^20 */
-					args->seeks <<= 20;
-				} else if (strchr(optarg,'M')) { /* multiply by 10^6 */
-					args->seeks *= 1000000;
-				} else if (strchr(optarg,'g')) { /* multiply by 2^30 */
-					args->seeks <<= 30;
-				} else if (strchr(optarg,'G')) { /* multiply by 10^9 */
-					args->seeks *= 1000000000;
-				}
-				break;
-			case 'C' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					usage();
-					return(-1);
-				}
-				args->flags |= CLD_FLG_CYC;
-				args->cycles = atol(optarg);
-				break;
-			case 'K' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (!isdigit(optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					usage();
-					return(-1);
-				}
-				if (atoi(optarg) > MAX_THREADS) {
-					pMsg(WARN, args, "%u exceeds max of %u threads.\n", atoi(optarg), MAX_THREADS);
-					return(-1);
-				}
-				args->t_kids = atoi(optarg);
-				break;
-			case 'P' :
-				if (optarg == NULL) {
-					pMsg(WARN, args, "-%c option requires an argument.\n", c);
-					return(-1);
-				}
-				if (strchr(optarg,'X')) { /* returns NULL if char is not found */
-					args->flags |= CLD_FLG_XFERS;
-				}
-				if (strchr(optarg,'T')) {
-					args->flags |= CLD_FLG_TPUTS;
-				}
-				if (strchr(optarg,'P')) {
-					glb_flags |= GLB_FLG_PERFP;
-				}
-				if (strchr(optarg,'R')) {
-					args->flags |= CLD_FLG_RUNT;
-				}
-				if (strchr(optarg,'C')) {
-					args->flags |= CLD_FLG_PCYC;
-				}
-				if (strchr(optarg,'A')) {
-					args->flags |= CLD_FLG_PRFTYPS;
-				}
-				if (!strchr(optarg,'P') &&
-						!strchr(optarg,'A') &&
-						!strchr(optarg,'X') &&
-						!strchr(optarg,'R') &&
-						!strchr(optarg,'C') &&
-						!strchr(optarg,'T')) {
-					pMsg(WARN, args, "Unknown performance option\n");
-					return(-1);
-				}
-				break;
-			case 'S' :
-				if (!isdigit((int)optarg[0])) {
-					pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-					return(-1);
-				}
-				args->flags |= CLD_FLG_BLK_RNG;
-				if (strchr(optarg,':') != NULL) { /* we are given a range */
-					args->start_blk = (OFF_T) strtoul(optarg, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->start_blk <<= 10;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->start_blk *= 1000;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->start_blk <<= 20;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->start_blk *= 1000000;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->start_blk <<= 30;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->start_blk *= 1000000000;
-						leftovers++;  /* at the ':' */
-					}
-					leftovers++;  /* should be at the next value */
-					if (!isdigit((int) leftovers[0])) {
-						pMsg(WARN, args, "-%c arguments is non numeric.\n", c);
-						return(-1);
-					}
-					args->stop_blk = (OFF_T) strtoul(leftovers, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->stop_blk <<= 10;
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->stop_blk *= 1000;
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->stop_blk <<= 20;
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->stop_blk *= 1000000;
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->stop_blk <<= 30;
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->stop_blk *= 1000000000;
-					}
-				} else { /* only a single value given */
-					args->start_blk = (OFF_T) strtoul(optarg, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->start_blk <<= 10;
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->start_blk *= 1000;
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->start_blk <<= 20;
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->start_blk *= 1000000;
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->start_blk <<= 30;
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->start_blk *= 1000000000;
-					}
-				}
-				break;
-			case 's' :
-				if (!isdigit((int)optarg[0])) {
-					pMsg(WARN, args, "-%c argument is non numeric.\n", c);
-					return(-1);
-				}
-				args->flags |= CLD_FLG_LBA_RNG;
-				if (strchr(optarg,':') != NULL) { /* we are given a range */
-					args->start_lba = (OFF_T) strtoul(optarg, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->start_lba <<= 10;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->start_lba *= 1000;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->start_lba <<= 20;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->start_lba *= 1000000;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->start_lba <<= 30;
-						leftovers++;  /* at the ':' */
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->start_lba *= 1000000000;
-						leftovers++;  /* at the ':' */
-					}
-					leftovers++;  /* should be at the next value */
-					if (!isdigit((int) leftovers[0])) {
-						pMsg(WARN, args, "-%c second argument is non numeric.\n", c);
-						return(-1);
-					}
-					args->stop_lba = (OFF_T) strtoul(leftovers, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->stop_lba <<= 10;
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->stop_lba *= 1000;
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->stop_lba <<= 20;
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->stop_lba *= 1000000;
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->stop_lba <<= 30;
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->stop_lba *= 1000000000;
-					}
-				} else { /* only a single value given */
-					args->start_lba = (OFF_T) strtoul(optarg, &leftovers, 0);
-					if (leftovers == strchr(leftovers,'k')) { /* multiply by 2^10 */
-						args->start_lba <<= 10;
-					} else if (leftovers == strchr(leftovers,'K')) { /* multiply 10^3 */
-						args->start_lba *= 1000;
-					} else if (leftovers == strchr(leftovers,'m')) { /* multiply by 2^20 */
-						args->start_lba <<= 20;
-					} else if (leftovers == strchr(leftovers,'M')) { /* multiply by 10^6 */
-						args->start_lba *= 1000000;
-					} else if (leftovers == strchr(leftovers,'g')) { /* multiply by 2^30 */
-						args->start_lba <<= 30;
-					} else if (leftovers == strchr(leftovers,'G')) { /* multiply by 10^9 */
-						args->start_lba *= 1000000000;
-					}
-				}
-				break;
-			case '?' :
-			default  :
+			break;
+		case 'd':
+			glb_flags |= GLB_FLG_QUIET;
+			args->flags |= CLD_FLG_DUMP;
+			break;
+		case 'a':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				return (-1);
+			}
+			args->seed = (unsigned int)strtol(optarg, NULL, 0);
+			break;
+		case 'A':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				exit(1);
+			}
+			if (strchr(optarg, 'g')) {
+				glb_flags |= GLB_FLG_KILL;
+			}
+			if (strchr(optarg, 'c')) {
+				args->flags &= ~CLD_FLG_ALLDIE;
+			}
+			if (strchr(optarg, 'm')) {
+				args->flags |= CLD_FLG_ERR_MARK;
+			}
+			if (strchr(optarg, 'r')) {
+				args->flags &= ~CLD_FLG_ERR_REREAD;
+			}
+			if (strchr(optarg, 's')) {
+				args->flags &= ~CLD_FLG_LBA_SYNC;
+			}
+			if (strchr(optarg, 'S')) {
+				args->flags |= CLD_FLG_IO_SERIAL;
+			}
+			if (strchr(optarg, 'w')) {
+				args->flags |= CLD_FLG_WRITE_ONCE;
+			}
+			if (strchr(optarg, 'W')) {
+				args->flags |= CLD_FLG_UNIQ_WRT;
+			}
+			if (strchr(optarg, 't')) {
+				args->flags |= CLD_FLG_TMO_ERROR;
+			}
+			break;
+		case 'q':
+			glb_flags |= GLB_FLG_QUIET;
+			break;
+		case 'Q':
+			glb_flags |= GLB_FLG_SUPRESS;
+			break;
+		case 'v':
+			pMsg(INFO, args, "Version %s\n", VER_STR);
+			exit(0);
+		case 'p':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (args->flags & (CLD_FLG_LINEAR | CLD_FLG_RANDOM)) {
+				pMsg(WARN, args,
+				     "Only one seek type, -p, can be specified.\n");
+				return (-1);
+			}
+			/* seek pattern type */
+			if (strchr(optarg, 'L'))
+				args->flags |= CLD_FLG_LINEAR;
+			else if (strchr(optarg, 'l'))
+				args->flags |=
+				    (CLD_FLG_LINEAR | CLD_FLG_NTRLVD);
+			else if (strchr(optarg, 'R'))
+				args->flags |= CLD_FLG_RANDOM;
+			else if (strchr(optarg, 'r'))
+				args->flags |=
+				    (CLD_FLG_RANDOM | CLD_FLG_NTRLVD);
+			else {
+				pMsg(WARN, args, "Unknown Seek pattern\n");
 				usage();
-				return(-1);
+				return (-1);
+			}
+			if (strchr(optarg, 'U') || strchr(optarg, 'u'))
+				if ((args->flags & (CLD_FLG_LINEAR)) &&
+				    !(args->flags & CLD_FLG_LUND))
+					args->flags |= CLD_FLG_LUNU;
+			if (strchr(optarg, 'D') || strchr(optarg, 'd'))
+				if ((args->flags & (CLD_FLG_LINEAR)) &&
+				    !(args->flags & CLD_FLG_LUNU))
+					args->flags |= CLD_FLG_LUND;
+			break;
+		case 'B':
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				return (-1);
+			}
+			if (strchr(optarg, ':') != NULL) {	/* we are given a range of transfer sizes */
+				args->flags |= CLD_FLG_RTRSIZ;
+				args->ltrsiz = strtoul(optarg, &leftovers, 10);
+				if (leftovers == strchr(leftovers, 'k')) {	/* first value had a 'k' */
+					args->ltrsiz *= 2;
+					leftovers++;
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* first value had a 'm' */
+					args->ltrsiz *= (2 * 1024);
+					leftovers++;
+				} else {
+					if (args->ltrsiz > 256)
+						args->ltrsiz /= BLK_SIZE;
+				}
+				if (!isdigit(leftovers[1])) {
+					pMsg(WARN, args,
+					     "-%c arguments is non numeric.\n",
+					     c);
+					return (-1);
+				}
+				args->htrsiz =
+				    atol((char *)strchr(leftovers, ':') + 1);
+				if ((strchr(leftovers, 'k')) != NULL) {	/* second value had a 'k' */
+					args->htrsiz *= 2;
+				} else if ((strchr(leftovers, 'm')) != NULL) {	/* second value had a 'm' */
+					args->htrsiz *= (2 * 1024);
+				} else {
+					if (args->htrsiz > 256)
+						args->htrsiz /= BLK_SIZE;
+				}
+			} else {	/* only a single value given for transfer size */
+				args->ltrsiz = atoi(optarg);
+				if (strchr(optarg, 'k')) {
+					args->ltrsiz *= 2;
+				} else if (strchr(optarg, 'm')) {
+					args->ltrsiz *= (2 * 1024);
+				} else {
+					if (args->ltrsiz > 256)
+						args->ltrsiz /= BLK_SIZE;
+				}
+				args->htrsiz = args->ltrsiz;
+			}
+#ifdef _DEBUG
+			PDBG5(DBUG, args, "Parsed Transfer size: %ld\n",
+			      args->htrsiz);
+#endif
+			break;
+		case 'c':
+			if (args->flags & CLD_FLG_PTYPS) {
+				pMsg(WARN, args,
+				     "Please specify only one pattern type\n");
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_CPTYPE;
+			break;
+		case 'n':
+			if (args->flags & CLD_FLG_PTYPS) {
+				pMsg(WARN, args,
+				     "Please specify only one pattern type\n");
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_LPTYPE;
+			break;
+		case 'f':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (args->flags & CLD_FLG_PTYPS) {
+				pMsg(WARN, args,
+				     "Please specify only one pattern type\n");
+				usage();
+				return (-1);
+			}
+			args->pattern = my_strtofft(optarg);
+			args->flags |= CLD_FLG_FPTYPE;
+			break;
+		case 'F':
+			/* the filespec is a list of filespecs in a file */
+			args->flags |= CLD_FLG_FSLIST;
+			break;
+		case 'z':
+			if (args->flags & CLD_FLG_PTYPS) {
+				pMsg(WARN, args,
+				     "Please specify only one pattern type\n");
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_RPTYPE;
+			break;
+		case 'h':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_HBEAT;
+			args->hbeat = atoi(optarg);
+			if (strchr(optarg, 'm')) {	/* multiply by sec */
+				args->hbeat *= 60;
+			} else if (strchr(optarg, 'h')) {	/* multiply sec*min */
+				args->hbeat *= (time_t) (60 * 60);
+			} else if (strchr(optarg, 'd')) {	/* multiply by sec*min*hours */
+				args->hbeat *= (time_t) (60 * 60 * 24);
+			}
+			break;
+		case 'D':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				usage();
+				return (-1);
+			}
+			args->rperc = atoi(optarg);
+			args->wperc = atoi((char *)(strchr(optarg, ':') + 1));
+			args->flags |= CLD_FLG_DUTY;
+			break;
+		case 'r':
+			args->flags |= CLD_FLG_R;
+			break;
+		case 'w':
+			args->flags |= CLD_FLG_W;
+			break;
+		case 'o':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			args->offset = atol(optarg);
+			args->flags |= CLD_FLG_OFFSET;
+			break;
+		case 'R':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (strchr(optarg, ':') != NULL) {	/* we are given a retry delay */
+				args->retries = strtol(optarg, &leftovers, 10);
+				args->retry_delay =
+				    (time_t) atol((char *)strchr(leftovers, ':')
+						  + 1);
+			} else {	/* only a retry count given */
+				args->retries = atoi(optarg);
+			}
+			break;
+		case 'M':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			args->flags |= CLD_FLG_ALT_MARK;
+			args->alt_mark = my_strtofft(optarg);
+			break;
+		case 'm':
+			args->flags |= CLD_FLG_MBLK;
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (strchr(optarg, 'l')) {	/* returns NULL if char is not found */
+				args->flags |= CLD_FLG_MRK_LBA;
+			}
+			if (strchr(optarg, 'p')) {
+				args->flags |= CLD_FLG_MRK_PASS;
+			}
+			if (strchr(optarg, 't')) {
+				args->flags |= CLD_FLG_MRK_TIME;
+			}
+			if (strchr(optarg, 's')) {
+				args->flags |= CLD_FLG_MRK_SEED;
+			}
+			if (strchr(optarg, 'h')) {
+				args->flags |= CLD_FLG_MRK_HOST;
+			}
+			if (strchr(optarg, 'f')) {
+				args->flags |= CLD_FLG_MRK_TARGET;
+			}
+			if (strchr(optarg, 'a')) {
+				args->flags |= CLD_FLG_MRK_ALL;
+			}
+			if (!strchr(optarg, 'l') &&
+			    !strchr(optarg, 'p') &&
+			    !strchr(optarg, 't') &&
+			    !strchr(optarg, 's') &&
+			    !strchr(optarg, 'h') &&
+			    !strchr(optarg, 'f') && !strchr(optarg, 'a')) {
+				pMsg(WARN, args,
+				     "Unknown header mark option\n");
+				return (-1);
+			}
+			break;
+		case 'E':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments are non numeric.\n", c);
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_CMPR;
+			args->cmp_lng = strtol(optarg, NULL, 0);
+			if (strchr(optarg, 'k')) {	/* multiply by 2^10 */
+				args->cmp_lng <<= 10;
+			} else if (strchr(optarg, 'K')) {	/* multiply 10^3 */
+				args->cmp_lng *= 1000;
+			} else if (strchr(optarg, 'm')) {	/* multiply by 2^20 */
+				args->cmp_lng <<= 20;
+			} else if (strchr(optarg, 'M')) {	/* multiply by 10^6 */
+				args->cmp_lng *= 1000000;
+			}
+			break;
+		case 'N':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments are non numeric.\n", c);
+				return (-1);
+			}
+			args->flags |= CLD_FLG_VSIZ;
+			args->vsiz = my_strtofft(optarg);
+			if (strchr(optarg, 'k')) {	/* multiply by 2^10 */
+				args->vsiz <<= 10;
+			} else if (strchr(optarg, 'K')) {	/* multiply 10^3 */
+				args->vsiz *= 1000;
+			} else if (strchr(optarg, 'm')) {	/* multiply by 2^20 */
+				args->vsiz <<= 20;
+			} else if (strchr(optarg, 'M')) {	/* multiply by 10^6 */
+				args->vsiz *= 1000000;
+			} else if (strchr(optarg, 'g')) {	/* multiply by 2^30 */
+				args->vsiz <<= 30;
+			} else if (strchr(optarg, 'G')) {	/* multiply by 10^9 */
+				args->vsiz *= 1000000000;
+			}
+			break;
+		case 'I':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (strchr(optarg, 'R') || strchr(optarg, 'r')) {
+				if (!(args->flags & CLD_FLG_BLK) &&
+				    !(args->flags & CLD_FLG_FILE)) {
+					args->flags |= CLD_FLG_RAW;
+				} else {
+					pMsg(WARN, args,
+					     "Can only specify one IO type\n");
+					return (-1);
+				}
+			}
+			if (strchr(optarg, 'B') || strchr(optarg, 'b')) {
+				if (!(args->flags & CLD_FLG_RAW) &&
+				    !(args->flags & CLD_FLG_FILE)) {
+					args->flags |= CLD_FLG_BLK;
+				} else {
+					pMsg(WARN, args,
+					     "Can only specify one IO type\n");
+					return (-1);
+				}
+			}
+			if (strchr(optarg, 'F') || strchr(optarg, 'f')) {
+				if (!(args->flags & CLD_FLG_RAW) &&
+				    !(args->flags & CLD_FLG_BLK)) {
+					args->flags |= CLD_FLG_FILE;
+				} else {
+					pMsg(WARN, args,
+					     "Can only specify one IO type\n");
+					return (-1);
+				}
+			}
+			if (strchr(optarg, 'D') || strchr(optarg, 'd')) {
+				args->flags |= CLD_FLG_DIRECT;
+			}
+			if (strchr(optarg, 's')) {
+				args->sync_interval =
+				    strtoul((char *)strchr(optarg, 's') + 1,
+					    NULL, 10);
+#ifdef _DEBUG
+				PDBG3(DBUG, args, "Parsed sync interval: %ld\n",
+				      args->sync_interval);
+#endif
+				if ((args->flags & CLD_FLG_DIRECT)) {
+					pMsg(ERR, args,
+					     "Can't specify sync with Direct IO\n");
+					return (-1);
+				}
+				args->flags |= CLD_FLG_WFSYNC;
+			}
+			break;
+		case 't':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+
+			if (strchr(optarg, ':') != NULL) {	/* we are given a option for delay & timeout */
+				args->delayTimeMin =
+				    strtoul(optarg, &leftovers, 10);
+				/* check to see if we have one or more then one ':' */
+				if ((char *)strchr(optarg, ':') ==
+				    (char *)strrchr(optarg, ':')) {
+					/* only one ':', assume no random delayTime, and ioTimeout */
+					args->delayTimeMax = args->delayTimeMin;
+					args->ioTimeout =
+					    (time_t) atol((char *)
+							  strchr(leftovers,
+								 ':') + 1);
+				} else {
+					/* more then one ':', assume random delayTime, and ioTimeout */
+					args->delayTimeMax =
+					    strtoul(leftovers + 1, &leftovers,
+						    10);
+					args->ioTimeout =
+					    (time_t) atol((char *)
+							  strchr(leftovers,
+								 ':') + 1);
+				}
+				if (strchr(leftovers, 'm')) {	/* multiply by sec */
+					args->ioTimeout *= 60;
+				} else if (strchr(leftovers, 'h')) {	/* multiply sec*min */
+					args->ioTimeout *= (time_t) (60 * 60);
+				} else if (strchr(leftovers, 'd')) {	/* multiply by sec*min*hours */
+					args->ioTimeout *=
+					    (time_t) (60 * 60 * 24);
+				}
+			} else {
+				args->delayTimeMin =
+				    strtoul(optarg, (char **)NULL, 10);
+				args->delayTimeMax = args->delayTimeMin;
+			}
+			break;
+		case 'T':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			args->run_time = atoi(optarg);
+			args->flags |= CLD_FLG_TMD;
+			if (strchr(optarg, 'm')) {	/* multiply by sec */
+				args->run_time *= 60;
+			} else if (strchr(optarg, 'h')) {	/* multiply sec*min */
+				args->run_time *= (time_t) (60 * 60);
+			} else if (strchr(optarg, 'd')) {	/* multiply by sec*min*hours */
+				args->run_time *= (time_t) (60 * 60 * 24);
+			}
+			break;
+		case 'L':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			args->seeks = atoi(optarg);
+			args->flags |= CLD_FLG_SKS;
+			if (strchr(optarg, 'k')) {	/* multiply by 2^10 */
+				args->seeks <<= 10;
+			} else if (strchr(optarg, 'K')) {	/* multiply 10^3 */
+				args->seeks *= 1000;
+			} else if (strchr(optarg, 'm')) {	/* multiply by 2^20 */
+				args->seeks <<= 20;
+			} else if (strchr(optarg, 'M')) {	/* multiply by 10^6 */
+				args->seeks *= 1000000;
+			} else if (strchr(optarg, 'g')) {	/* multiply by 2^30 */
+				args->seeks <<= 30;
+			} else if (strchr(optarg, 'G')) {	/* multiply by 10^9 */
+				args->seeks *= 1000000000;
+			}
+			break;
+		case 'C':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				usage();
+				return (-1);
+			}
+			args->flags |= CLD_FLG_CYC;
+			args->cycles = atol(optarg);
+			break;
+		case 'K':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (!isdigit(optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				usage();
+				return (-1);
+			}
+			if (atoi(optarg) > MAX_THREADS) {
+				pMsg(WARN, args,
+				     "%u exceeds max of %u threads.\n",
+				     atoi(optarg), MAX_THREADS);
+				return (-1);
+			}
+			args->t_kids = atoi(optarg);
+			break;
+		case 'P':
+			if (optarg == NULL) {
+				pMsg(WARN, args,
+				     "-%c option requires an argument.\n", c);
+				return (-1);
+			}
+			if (strchr(optarg, 'X')) {	/* returns NULL if char is not found */
+				args->flags |= CLD_FLG_XFERS;
+			}
+			if (strchr(optarg, 'T')) {
+				args->flags |= CLD_FLG_TPUTS;
+			}
+			if (strchr(optarg, 'P')) {
+				glb_flags |= GLB_FLG_PERFP;
+			}
+			if (strchr(optarg, 'R')) {
+				args->flags |= CLD_FLG_RUNT;
+			}
+			if (strchr(optarg, 'C')) {
+				args->flags |= CLD_FLG_PCYC;
+			}
+			if (strchr(optarg, 'A')) {
+				args->flags |= CLD_FLG_PRFTYPS;
+			}
+			if (!strchr(optarg, 'P') &&
+			    !strchr(optarg, 'A') &&
+			    !strchr(optarg, 'X') &&
+			    !strchr(optarg, 'R') &&
+			    !strchr(optarg, 'C') && !strchr(optarg, 'T')) {
+				pMsg(WARN, args,
+				     "Unknown performance option\n");
+				return (-1);
+			}
+			break;
+		case 'S':
+			if (!isdigit((int)optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c arguments is non numeric.\n", c);
+				return (-1);
+			}
+			args->flags |= CLD_FLG_BLK_RNG;
+			if (strchr(optarg, ':') != NULL) {	/* we are given a range */
+				args->start_blk =
+				    (OFF_T) strtoul(optarg, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->start_blk <<= 10;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->start_blk *= 1000;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->start_blk <<= 20;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->start_blk *= 1000000;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->start_blk <<= 30;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->start_blk *= 1000000000;
+					leftovers++;	/* at the ':' */
+				}
+				leftovers++;	/* should be at the next value */
+				if (!isdigit((int)leftovers[0])) {
+					pMsg(WARN, args,
+					     "-%c arguments is non numeric.\n",
+					     c);
+					return (-1);
+				}
+				args->stop_blk =
+				    (OFF_T) strtoul(leftovers, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->stop_blk <<= 10;
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->stop_blk *= 1000;
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->stop_blk <<= 20;
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->stop_blk *= 1000000;
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->stop_blk <<= 30;
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->stop_blk *= 1000000000;
+				}
+			} else {	/* only a single value given */
+				args->start_blk =
+				    (OFF_T) strtoul(optarg, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->start_blk <<= 10;
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->start_blk *= 1000;
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->start_blk <<= 20;
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->start_blk *= 1000000;
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->start_blk <<= 30;
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->start_blk *= 1000000000;
+				}
+			}
+			break;
+		case 's':
+			if (!isdigit((int)optarg[0])) {
+				pMsg(WARN, args,
+				     "-%c argument is non numeric.\n", c);
+				return (-1);
+			}
+			args->flags |= CLD_FLG_LBA_RNG;
+			if (strchr(optarg, ':') != NULL) {	/* we are given a range */
+				args->start_lba =
+				    (OFF_T) strtoul(optarg, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->start_lba <<= 10;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->start_lba *= 1000;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->start_lba <<= 20;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->start_lba *= 1000000;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->start_lba <<= 30;
+					leftovers++;	/* at the ':' */
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->start_lba *= 1000000000;
+					leftovers++;	/* at the ':' */
+				}
+				leftovers++;	/* should be at the next value */
+				if (!isdigit((int)leftovers[0])) {
+					pMsg(WARN, args,
+					     "-%c second argument is non numeric.\n",
+					     c);
+					return (-1);
+				}
+				args->stop_lba =
+				    (OFF_T) strtoul(leftovers, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->stop_lba <<= 10;
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->stop_lba *= 1000;
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->stop_lba <<= 20;
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->stop_lba *= 1000000;
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->stop_lba <<= 30;
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->stop_lba *= 1000000000;
+				}
+			} else {	/* only a single value given */
+				args->start_lba =
+				    (OFF_T) strtoul(optarg, &leftovers, 0);
+				if (leftovers == strchr(leftovers, 'k')) {	/* multiply by 2^10 */
+					args->start_lba <<= 10;
+				} else if (leftovers == strchr(leftovers, 'K')) {	/* multiply 10^3 */
+					args->start_lba *= 1000;
+				} else if (leftovers == strchr(leftovers, 'm')) {	/* multiply by 2^20 */
+					args->start_lba <<= 20;
+				} else if (leftovers == strchr(leftovers, 'M')) {	/* multiply by 10^6 */
+					args->start_lba *= 1000000;
+				} else if (leftovers == strchr(leftovers, 'g')) {	/* multiply by 2^30 */
+					args->start_lba <<= 30;
+				} else if (leftovers == strchr(leftovers, 'G')) {	/* multiply by 10^9 */
+					args->start_lba *= 1000000000;
+				}
+			}
+			break;
+		case '?':
+		default:
+			usage();
+			return (-1);
 		}
 	}
 	if (argv[optind] == NULL) {
 		pMsg(WARN, args, "Unspecified target.\n");
-		return(-1);
+		return (-1);
 	}
-	strncpy(args->device, argv[optind], (DEV_NAME_LEN-1));
+	strncpy(args->device, argv[optind], (DEV_NAME_LEN - 1));
 	return 0;
 }
 
-int make_assumptions(child_args_t *args)
+int make_assumptions(child_args_t * args)
 {
 	char TmpStr[80];
 	struct stat stat_buf;
@@ -731,33 +811,44 @@
 		rv = stat(args->device, &stat_buf);
 		if (0 == rv) {
 			if (IS_FILE(stat_buf.st_mode)) {
-				strncat(args->argstr, "(-I f) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+				strncat(args->argstr, "(-I f) ",
+					(MAX_ARG_LEN - 1) -
+					strlen(args->argstr));
 				args->flags |= CLD_FLG_FILE;
 			} else if (IS_BLK(stat_buf.st_mode)) {
-				strncat(args->argstr, "(-I b) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+				strncat(args->argstr, "(-I b) ",
+					(MAX_ARG_LEN - 1) -
+					strlen(args->argstr));
 				args->flags |= CLD_FLG_BLK;
 #ifndef WINDOWS
 			} else if (S_ISCHR(stat_buf.st_mode)) {
-				strncat(args->argstr, "(-I r) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+				strncat(args->argstr, "(-I r) ",
+					(MAX_ARG_LEN - 1) -
+					strlen(args->argstr));
 				args->flags |= CLD_FLG_RAW;
 #endif
 			}
 		} else {
-			pMsg(WARN, args, "Can't get status on %s, defaulting to file, errno = %d\n", args->device, GETLASTERROR());
-			strncat(args->argstr, "(-I f) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+			pMsg(WARN, args,
+			     "Can't get status on %s, defaulting to file, errno = %d\n",
+			     args->device, GETLASTERROR());
+			strncat(args->argstr, "(-I f) ",
+				(MAX_ARG_LEN - 1) - strlen(args->argstr));
 			args->flags |= CLD_FLG_FILE;
 		}
 	}
 	if ((args->flags & CLD_FLG_WFSYNC) && (0 == args->sync_interval)) {
-		pMsg(INFO, args, "Sync interval set to zero, assuming interval of 1.\n");
+		pMsg(INFO, args,
+		     "Sync interval set to zero, assuming interval of 1.\n");
 		args->sync_interval = 1;
 	}
 
 	if (args->ltrsiz <= 0) {
-		sprintf(TmpStr, "(-B %d) ", TRSIZ*BLK_SIZE);
-		strncat(args->argstr, TmpStr, (MAX_ARG_LEN-1)-strlen(args->argstr));
-		args->ltrsiz=TRSIZ;
-		args->htrsiz=TRSIZ;
+		sprintf(TmpStr, "(-B %d) ", TRSIZ * BLK_SIZE);
+		strncat(args->argstr, TmpStr,
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
+		args->ltrsiz = TRSIZ;
+		args->htrsiz = TRSIZ;
 	}
 	if (args->flags & CLD_FLG_LBA_RNG) {
 		args->start_blk = args->start_lba / args->htrsiz;
@@ -767,106 +858,130 @@
 	if (args->flags & CLD_FLG_BLK_RNG) {
 		args->start_lba = args->start_blk * args->htrsiz;
 		if (!(args->stop_blk < 0))
-			args->stop_lba = (args->stop_blk * args->htrsiz) + (args->htrsiz - 1);
+			args->stop_lba =
+			    (args->stop_blk * args->htrsiz) + (args->htrsiz -
+							       1);
 	}
 	/* if vsiz is still not set, try and get it from the file */
-	if ((args->vsiz <=0) && (args->flags & CLD_FLG_FILE)) {
-		if (0 != get_file_size(args->device)) { /* file size retrieved */
-			args->vsiz=get_file_size(args->device);
+	if ((args->vsiz <= 0) && (args->flags & CLD_FLG_FILE)) {
+		if (0 != get_file_size(args->device)) {	/* file size retrieved */
+			args->vsiz = get_file_size(args->device);
 		}
 	}
 	/* if vsiz is still not set, try and get it from the device */
 	if ((args->vsiz <= 0) && !(args->flags & CLD_FLG_FILE)) {
-		args->vsiz=get_vsiz(args->device);
+		args->vsiz = get_vsiz(args->device);
 	}
 	/* if vsiz is still not set, set based on given range */
-	if ((args->vsiz <=0) && (args->flags & (CLD_FLG_LBA_RNG|CLD_FLG_BLK_RNG))) {
+	if ((args->vsiz <= 0)
+	    && (args->flags & (CLD_FLG_LBA_RNG | CLD_FLG_BLK_RNG))) {
 		if (!(args->stop_lba < 0))
-			args->vsiz=args->stop_lba+1;
+			args->vsiz = args->stop_lba + 1;
 		else
-			args->vsiz=args->start_lba+1;
+			args->vsiz = args->start_lba + 1;
 	}
 	/* if vsiz is still not set, then set it to the default size */
 	if (args->vsiz <= 0) {
-		args->vsiz=VSIZ;
+		args->vsiz = VSIZ;
 	}
 	if (!(args->flags & CLD_FLG_VSIZ)) {
 		sprintf(TmpStr, N_ASSUME, args->vsiz);
-		strncat(args->argstr, TmpStr, (MAX_ARG_LEN-1)-strlen(args->argstr));
+		strncat(args->argstr, TmpStr,
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 	}
 
 	if (args->stop_lba == -1) {
-		args->stop_lba=args->vsiz-1;
+		args->stop_lba = args->vsiz - 1;
 	}
 	if (args->stop_blk == -1) {
-		args->stop_blk=(args->stop_lba / (OFF_T) args->htrsiz);
+		args->stop_blk = (args->stop_lba / (OFF_T) args->htrsiz);
 	}
 	if (args->t_kids == 0) {
 		sprintf(TmpStr, "(-K %d) ", KIDS);
-		strncat(args->argstr, TmpStr, (MAX_ARG_LEN-1)-strlen(args->argstr));
-		args->t_kids=KIDS;
+		strncat(args->argstr, TmpStr,
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
+		args->t_kids = KIDS;
 	}
-	if ((args->flags & (CLD_FLG_W|CLD_FLG_R)) == 0) {
-		if (args->flags & CLD_FLG_DUTY) { /* no read/write but duty cycle specified */
+	if ((args->flags & (CLD_FLG_W | CLD_FLG_R)) == 0) {
+		if (args->flags & CLD_FLG_DUTY) {	/* no read/write but duty cycle specified */
 			if (args->rperc > 0) {
 				args->flags |= CLD_FLG_R;
-				strncat(args->argstr, "(-r) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+				strncat(args->argstr, "(-r) ",
+					(MAX_ARG_LEN - 1) -
+					strlen(args->argstr));
 			}
 			if (args->wperc > 0) {
 				args->flags |= CLD_FLG_W;
-				strncat(args->argstr, "(-w) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+				strncat(args->argstr, "(-w) ",
+					(MAX_ARG_LEN - 1) -
+					strlen(args->argstr));
 			}
 		} else {
-			strncat(args->argstr, "(-r) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+			strncat(args->argstr, "(-r) ",
+				(MAX_ARG_LEN - 1) - strlen(args->argstr));
 			args->flags |= CLD_FLG_R;
 		}
 	}
 	if (!(args->flags & CLD_FLG_PTYPS)) {
-		strncat(args->argstr, "(-c) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+		strncat(args->argstr, "(-c) ",
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 		args->flags |= CLD_FLG_CPTYPE;
 	}
 	if (!(args->flags & CLD_FLG_SKTYPS)) {
-		strncat(args->argstr, "(-p R) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+		strncat(args->argstr, "(-p R) ",
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 		args->flags |= CLD_FLG_RANDOM;
 	}
 	if (!(args->flags & CLD_FLG_SKS)) {
-		if (args->start_blk == args->stop_blk) { /* diskcache test, w/ no seek count set */
+		if (args->start_blk == args->stop_blk) {	/* diskcache test, w/ no seek count set */
 			args->seeks = SEEKS;
-		} else if (args->flags & (CLD_FLG_BLK_RNG|CLD_FLG_LBA_RNG)) { /* range set, w/ no seek count */
+		} else if (args->flags & (CLD_FLG_BLK_RNG | CLD_FLG_LBA_RNG)) {	/* range set, w/ no seek count */
 			args->seeks = args->stop_blk - args->start_blk + 1;
 		} else {
 			/* if vsiz is available, calculated seeks are in terms of the largest transfer size */
-			args->seeks = (args->vsiz > 0) ? (args->vsiz / args->htrsiz) : SEEKS;
+			args->seeks =
+			    (args->vsiz >
+			     0) ? (args->vsiz / args->htrsiz) : SEEKS;
 		}
-		if ((args->flags & CLD_FLG_LINEAR) && (args->flags & CLD_FLG_R) && (args->flags & CLD_FLG_W)) {
+		if ((args->flags & CLD_FLG_LINEAR) && (args->flags & CLD_FLG_R)
+		    && (args->flags & CLD_FLG_W)) {
 			args->seeks *= 2;
 		}
 
 		if (!(args->flags & CLD_FLG_TMD)) {
 			sprintf(TmpStr, L_ASSUME, args->seeks);
-			strncat(args->argstr, TmpStr, (MAX_ARG_LEN-1)-strlen(args->argstr));
+			strncat(args->argstr, TmpStr,
+				(MAX_ARG_LEN - 1) - strlen(args->argstr));
 		}
 	}
-	if (!(args->flags & (CLD_FLG_SKS|CLD_FLG_TMD)) || ((args->flags & CLD_FLG_CYC) && !(args->flags & (CLD_FLG_SKS|CLD_FLG_TMD)))) {
+	if (!(args->flags & (CLD_FLG_SKS | CLD_FLG_TMD))
+	    || ((args->flags & CLD_FLG_CYC)
+		&& !(args->flags & (CLD_FLG_SKS | CLD_FLG_TMD)))) {
 		args->flags |= CLD_FLG_SKS;
 	}
 	if (args->flags & (CLD_FLG_LINEAR)) {
-		if (!(args->flags & (CLD_FLG_LUNU|CLD_FLG_LUND))) {
-			strncat(args->argstr, "(-p u) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+		if (!(args->flags & (CLD_FLG_LUNU | CLD_FLG_LUND))) {
+			strncat(args->argstr, "(-p u) ",
+				(MAX_ARG_LEN - 1) - strlen(args->argstr));
 			args->flags |= CLD_FLG_LUNU;
 		}
 	}
 	normalize_percs(args);
-	if (!(args->flags & CLD_FLG_DUTY) && (args->flags & CLD_FLG_RANDOM) && !(args->flags & CLD_FLG_NTRLVD)) {
+	if (!(args->flags & CLD_FLG_DUTY) && (args->flags & CLD_FLG_RANDOM)
+	    && !(args->flags & CLD_FLG_NTRLVD)) {
 		sprintf(TmpStr, "(-D %d:%d) ", args->rperc, args->wperc);
-		strncat(args->argstr, TmpStr, (MAX_ARG_LEN-1)-strlen(args->argstr));
+		strncat(args->argstr, TmpStr,
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 		args->flags |= CLD_FLG_DUTY;
 	}
-	if ((args->delayTimeMin == 0) && (args->delayTimeMax == 0) && (args->ioTimeout == DEFAULT_IO_TIMEOUT)) {
-		strncat(args->argstr, "(-t 0:2m) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+	if ((args->delayTimeMin == 0) && (args->delayTimeMax == 0)
+	    && (args->ioTimeout == DEFAULT_IO_TIMEOUT)) {
+		strncat(args->argstr, "(-t 0:2m) ",
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 	}
 	if (!(args->flags & CLD_FLG_OFFSET)) {
-		strncat(args->argstr, "(-o 0) ", (MAX_ARG_LEN-1)-strlen(args->argstr));
+		strncat(args->argstr, "(-o 0) ",
+			(MAX_ARG_LEN - 1) - strlen(args->argstr));
 	}
 
 	return 0;
@@ -877,147 +992,184 @@
  * args and make assumtions. returns 0 on
  * success and -1 on failure.
  */
-int check_conclusions(child_args_t *args)
+int check_conclusions(child_args_t * args)
 {
 	extern unsigned long glb_flags;
 	struct stat stat_buf;
 	int rv;
 
-	if ((args->flags & CLD_FLG_DUTY) && ((args->flags & CLD_FLG_LINEAR) || (args->flags & CLD_FLG_NTRLVD))) {
-		pMsg(WARN, args, "Duty cycle testing is supported for random (-pR) tests only.\n");
-		return(-1);
+	if ((args->flags & CLD_FLG_DUTY)
+	    && ((args->flags & CLD_FLG_LINEAR)
+		|| (args->flags & CLD_FLG_NTRLVD))) {
+		pMsg(WARN, args,
+		     "Duty cycle testing is supported for random (-pR) tests only.\n");
+		return (-1);
 	}
 	if ((args->flags & CLD_FLG_BLK_RNG) && (args->flags & CLD_FLG_RTRSIZ)) {
-		pMsg(WARN, args, "Can't have unfixed block sizes and specify seek range in terms of blocks.\n");
-		return(-1);
+		pMsg(WARN, args,
+		     "Can't have unfixed block sizes and specify seek range in terms of blocks.\n");
+		return (-1);
 	}
 	if ((args->vsiz < 0) || (args->ltrsiz < 1) || (args->htrsiz < 1)) {
-		pMsg(WARN, args, "Bounds exceeded for transfer size and/or volume size.\n");
-		pMsg(WARN, args, MAXTRSIZ, (args->htrsiz*BLK_SIZE),args->vsiz);
-		return(-1);
+		pMsg(WARN, args,
+		     "Bounds exceeded for transfer size and/or volume size.\n");
+		pMsg(WARN, args, MAXTRSIZ, (args->htrsiz * BLK_SIZE),
+		     args->vsiz);
+		return (-1);
 	}
 	if (args->htrsiz < args->ltrsiz) {
-		pMsg(ERR, args, "Min transfer size, %lu, greater then Max transfer size, %lu.\n", args->ltrsiz, args->htrsiz);
-		return(-1);
+		pMsg(ERR, args,
+		     "Min transfer size, %lu, greater then Max transfer size, %lu.\n",
+		     args->ltrsiz, args->htrsiz);
+		return (-1);
 	}
-	if (args->vsiz < (args->stop_lba-args->start_lba+1)) {
+	if (args->vsiz < (args->stop_lba - args->start_lba + 1)) {
 		pMsg(ERR, args, "Volume stop block/lba exceeds volume size.\n");
-		return(-1);
+		return (-1);
 	}
 	if (args->vsiz < args->htrsiz) {
 		pMsg(WARN, args, VSIZETS, args->vsiz, args->htrsiz);
-		return(-1);
+		return (-1);
 	}
 	if ((args->flags & CLD_FLG_TMD) == 0 && (args->seeks <= 0)) {
-		pMsg(WARN,args, TSEEK, args->seeks);
-		return(-1);
+		pMsg(WARN, args, TSEEK, args->seeks);
+		return (-1);
 	}
 	if ((args->flags & CLD_FLG_SKS) && (args->t_kids > args->seeks)) {
-		pMsg(WARN, args, "Can't have more children then max number of seeks, use -K/-L to adjust.\n");
-		return(-1);
+		pMsg(WARN, args,
+		     "Can't have more children then max number of seeks, use -K/-L to adjust.\n");
+		return (-1);
 	}
-	if ((args->start_blk > args->vsiz) && !(args->flags & (CLD_FLG_BLK_RNG|CLD_FLG_LBA_RNG))) {
-		pMsg(WARN, args, STBGTTLBA, args->start_blk, (args->vsiz / args->htrsiz));
-		return(-1);
+	if ((args->start_blk > args->vsiz)
+	    && !(args->flags & (CLD_FLG_BLK_RNG | CLD_FLG_LBA_RNG))) {
+		pMsg(WARN, args, STBGTTLBA, args->start_blk,
+		     (args->vsiz / args->htrsiz));
+		return (-1);
 	}
-	if ((args->stop_blk > args->vsiz) && !(args->flags & (CLD_FLG_BLK_RNG|CLD_FLG_LBA_RNG))) {
-		pMsg(WARN, args, SBGTTLBA, args->stop_blk, (args->vsiz / args->htrsiz));
-		return(-1);
+	if ((args->stop_blk > args->vsiz)
+	    && !(args->flags & (CLD_FLG_BLK_RNG | CLD_FLG_LBA_RNG))) {
+		pMsg(WARN, args, SBGTTLBA, args->stop_blk,
+		     (args->vsiz / args->htrsiz));
+		return (-1);
 	}
-	if ((args->start_lba > args->vsiz) && !(args->flags & (CLD_FLG_BLK_RNG|CLD_FLG_LBA_RNG))) {
+	if ((args->start_lba > args->vsiz)
+	    && !(args->flags & (CLD_FLG_BLK_RNG | CLD_FLG_LBA_RNG))) {
 		pMsg(WARN, args, STLBAGTLBA, args->start_lba, args->vsiz);
-		return(-1);
+		return (-1);
 	}
-	if ((args->stop_lba > args->vsiz) && !(args->flags & (CLD_FLG_BLK_RNG|CLD_FLG_LBA_RNG))) {
+	if ((args->stop_lba > args->vsiz)
+	    && !(args->flags & (CLD_FLG_BLK_RNG | CLD_FLG_LBA_RNG))) {
 		pMsg(WARN, args, SLBAGTLBA, args->stop_lba, args->vsiz);
-		return(-1);
+		return (-1);
 	}
 	if (args->start_blk > args->stop_blk) {
 		pMsg(WARN, args, SBRSB, args->stop_blk, args->start_blk);
-		return(-1);
+		return (-1);
 	}
 	if (args->start_lba > args->stop_lba) {
 		pMsg(ERR, args, SLBARSLBA, args->stop_lba, args->start_lba);
-		return(-1);
+		return (-1);
 	}
 	if ((args->flags & CLD_FLG_LBA_RNG) && (args->flags & CLD_FLG_BLK_RNG)) {
-		pMsg(ERR, args, "Can't specify range in both block and LBA, use -s or -S.\n");
-		return(-1);
+		pMsg(ERR, args,
+		     "Can't specify range in both block and LBA, use -s or -S.\n");
+		return (-1);
 	}
 
 	/* use stat to get file properties, and test then agains specified -I */
 	rv = stat(args->device, &stat_buf);
-	if (0 == rv) { /* no error on call to stat, compare against -I option */
+	if (0 == rv) {		/* no error on call to stat, compare against -I option */
 		/* files are usually file type */
 		if ((args->flags & CLD_FLG_FILE) && !IS_FILE(stat_buf.st_mode)) {
-			pMsg(ERR, args, "Can't open non-file filespec with file device type, -If.\n");
-			return(-1);
+			pMsg(ERR, args,
+			     "Can't open non-file filespec with file device type, -If.\n");
+			return (-1);
 		}
 		/* block devices, are usually block type */
 		if ((args->flags & CLD_FLG_BLK) && !IS_BLK(stat_buf.st_mode)) {
-			pMsg(ERR, args, "Can't open non-block filespec with block device type, -Ib.\n");
-			return(-1);
+			pMsg(ERR, args,
+			     "Can't open non-block filespec with block device type, -Ib.\n");
+			return (-1);
 		}
 #ifndef WINDOWS
 		/* raw devices, are usually character type */
 		if ((args->flags & CLD_FLG_RAW) && !S_ISCHR(stat_buf.st_mode)) {
-			pMsg(ERR, args, "Can't open non-raw filespec with raw device type, -Ir.\n");
-			return(-1);
+			pMsg(ERR, args,
+			     "Can't open non-raw filespec with raw device type, -Ir.\n");
+			return (-1);
 		}
 #else
 		if (args->flags & CLD_FLG_RAW) {
-			pMsg(ERR, args, "RAW IO type not supported in Windows, use direct IO instead.\n");
-			return(-1);
+			pMsg(ERR, args,
+			     "RAW IO type not supported in Windows, use direct IO instead.\n");
+			return (-1);
 		}
 #endif
 #ifdef _DEBUG
 	} else {
-		PDBG1(DBUG, args, "Can't get status on %s, assuming a new file, errno = %d\n", args->device, GETLASTERROR());
+		PDBG1(DBUG, args,
+		      "Can't get status on %s, assuming a new file, errno = %d\n",
+		      args->device, GETLASTERROR());
 #endif
 	}
 
-	if ((args->hbeat > 0) && (args->flags & CLD_FLG_TMD) && (args->hbeat > args->run_time)) {
-		pMsg(ERR, args, "Heartbeat should be at least equal to runtime, use -h/-T to adjust.\n");
-		return(-1);
+	if ((args->hbeat > 0) && (args->flags & CLD_FLG_TMD)
+	    && (args->hbeat > args->run_time)) {
+		pMsg(ERR, args,
+		     "Heartbeat should be at least equal to runtime, use -h/-T to adjust.\n");
+		return (-1);
 	}
 	if ((args->hbeat > 0) && !(args->flags & CLD_FLG_PRFTYPS)) {
-		pMsg(ERR, args, "At least one performance option, -P, must be specified when using -h.\n");
-		return(-1);
+		pMsg(ERR, args,
+		     "At least one performance option, -P, must be specified when using -h.\n");
+		return (-1);
 	}
-	if ((args->flags & CLD_FLG_W) && !(args->flags & CLD_FLG_R) && (args->flags & CLD_FLG_CMPR)) {
+	if ((args->flags & CLD_FLG_W) && !(args->flags & CLD_FLG_R)
+	    && (args->flags & CLD_FLG_CMPR)) {
 		pMsg(ERR, args, "Write only, ignoring option -E.\n");
 	}
 	if ((args->flags & CLD_FLG_TMD) && (args->flags & CLD_FLG_SKS)) {
-		pMsg(ERR, args, "Can't specify both -L and -T they are mutually exclusive.\n");
-		return(-1);
+		pMsg(ERR, args,
+		     "Can't specify both -L and -T they are mutually exclusive.\n");
+		return (-1);
 	}
-	if (((args->flags & CLD_FLG_R) && !(args->flags & CLD_FLG_W)) && (args->flags & CLD_FLG_ERR_MARK)) {
-		pMsg(ERR, args, "Can't specify mark on error, -Am, in read only mode.\n");
-		return(-1);
+	if (((args->flags & CLD_FLG_R) && !(args->flags & CLD_FLG_W))
+	    && (args->flags & CLD_FLG_ERR_MARK)) {
+		pMsg(ERR, args,
+		     "Can't specify mark on error, -Am, in read only mode.\n");
+		return (-1);
 	}
 	if (!(args->flags & CLD_FLG_ALLDIE) && (args->flags & CLD_FLG_ERR_MARK)) {
-		pMsg(ERR, args, "Can't specify mark on error, -Am, when continue on error is set.\n");
-		return(-1);
+		pMsg(ERR, args,
+		     "Can't specify mark on error, -Am, when continue on error is set.\n");
+		return (-1);
 	}
 	if ((glb_flags & GLB_FLG_KILL) && !(args->flags & CLD_FLG_ALLDIE)) {
-		pMsg(ERR, args, "Can't specify global kill, -Ag, when continue on error is set, -Ac.\n");
-		return(-1);
+		pMsg(ERR, args,
+		     "Can't specify global kill, -Ag, when continue on error is set, -Ac.\n");
+		return (-1);
 	}
-	if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD) && (args->flags & CLD_FLG_TMD)) {
+	if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD)
+	    && (args->flags & CLD_FLG_TMD)) {
 		pMsg(ERR, args, "Linear read / write test can not be timed.\n");
-		return(-1);
+		return (-1);
 	}
-	if ((args->flags & CLD_FLG_CMPR) && (args->cmp_lng > (args->ltrsiz*BLK_SIZE))) {
-		pMsg(ERR, args, "Compare length, %lu, is greater then transfer size, %lu\n", args->cmp_lng, args->ltrsiz*BLK_SIZE);
-		return(-1);
+	if ((args->flags & CLD_FLG_CMPR)
+	    && (args->cmp_lng > (args->ltrsiz * BLK_SIZE))) {
+		pMsg(ERR, args,
+		     "Compare length, %lu, is greater then transfer size, %lu\n",
+		     args->cmp_lng, args->ltrsiz * BLK_SIZE);
+		return (-1);
 	}
 	if ((args->flags & CLD_FLG_OFFSET) && (args->offset > args->stop_lba)) {
 		pMsg(ERR, args, LBAOFFGSLBA, args->offset, args->stop_lba);
-		return(-1);
+		return (-1);
 	}
-	if ((args->flags & CLD_FLG_OFFSET) && ((args->offset+args->ltrsiz-1) > args->stop_lba)) {
-		pMsg(ERR, args, LBAOTSGSLBA, args->offset, args->ltrsiz, args->stop_lba);
-		return(-1);
+	if ((args->flags & CLD_FLG_OFFSET)
+	    && ((args->offset + args->ltrsiz - 1) > args->stop_lba)) {
+		pMsg(ERR, args, LBAOTSGSLBA, args->offset, args->ltrsiz,
+		     args->stop_lba);
+		return (-1);
 	}
 	return 0;
 }
diff --git a/testcases/kernel/io/disktest/sfunc.c b/testcases/kernel/io/disktest/sfunc.c
index 32d7f1e..5de1e84 100644
--- a/testcases/kernel/io/disktest/sfunc.c
+++ b/testcases/kernel/io/disktest/sfunc.c
@@ -71,11 +71,11 @@
 	 */
 	long myRandomNumber = 0;
 
-	myRandomNumber  = ((long) (rand() & 0x7FFF)) << 16;
-	myRandomNumber |= ((long) (rand() & 0x7FFF)) << 1;
-	myRandomNumber |= ((long) (rand() & 0x1));
+	myRandomNumber = ((long)(rand() & 0x7FFF)) << 16;
+	myRandomNumber |= ((long)(rand() & 0x7FFF)) << 1;
+	myRandomNumber |= ((long)(rand() & 0x1));
 
-	return(myRandomNumber);
+	return (myRandomNumber);
 }
 
 /*
@@ -85,13 +85,13 @@
 {
 	OFF_T myRandomNumber = 0;
 
-	myRandomNumber  = ((OFF_T) (rand() & 0x7FFF)) << 48;
+	myRandomNumber = ((OFF_T) (rand() & 0x7FFF)) << 48;
 	myRandomNumber |= ((OFF_T) (rand() & 0x7FFF)) << 33;
 	myRandomNumber |= ((OFF_T) (rand() & 0x7FFF)) << 18;
 	myRandomNumber |= ((OFF_T) (rand() & 0x7FFF)) << 3;
 	myRandomNumber |= ((OFF_T) (rand() & 0x7));
 
-	return(myRandomNumber);
+	return (myRandomNumber);
 }
 
 /*
@@ -105,22 +105,22 @@
 
 	int neg = 0;
 
-	for (;;pStr++) {
-		switch(*pStr) {
-			case '0':
-				bOct = 1;
-				continue;
-			case 'x':
-				if (bOct) bHex = 1;
-				continue;
-			case ' ':
-			case '\t':
-				continue;
-			case '-':
-				neg = 1;
-				/*FALLTHROUGH*/
-			case '+':
-				pStr++;
+	for (;; pStr++) {
+		switch (*pStr) {
+		case '0':
+			bOct = 1;
+			continue;
+		case 'x':
+			if (bOct)
+				bHex = 1;
+			continue;
+		case ' ':
+		case '\t':
+			continue;
+		case '-':
+			neg = 1;
+		 /*FALLTHROUGH*/ case '+':
+			pStr++;
 		}
 		break;
 	}
@@ -130,8 +130,8 @@
 		}
 	} else if (bHex) {
 		while ((*pStr >= '0' && *pStr <= '9') ||
-			   (*pStr >= 'A' && *pStr <= 'F') ||
-			   (*pStr >= 'a' && *pStr <= 'f')) {
+		       (*pStr >= 'A' && *pStr <= 'F') ||
+		       (*pStr >= 'a' && *pStr <= 'f')) {
 			if (*pStr >= '0' && *pStr <= '9')
 				value = (value << 4) + (*pStr++ - '0');
 			else if (*pStr >= 'A' && *pStr <= 'F')
@@ -150,7 +150,7 @@
 /*
 * prints messages to stdout. with added formating
 */
-int pMsg(lvl_t level, const child_args_t *args, char *Msg,...)
+int pMsg(lvl_t level, const child_args_t * args, char *Msg, ...)
 {
 #define FORMAT "| %s | %s | %d | %s | %s | %s"
 #define TIME_FORMAT "%04d/%02d/%02d-%02d:%02d:%02d"
@@ -191,62 +191,61 @@
 	va_start(l, Msg);
 
 	if (glb_flags & GLB_FLG_SUPRESS) {
-		rv = vprintf(Msg,l);
+		rv = vprintf(Msg, l);
 		va_end(l);
 		return rv;
 	}
 
-	switch(level) {
-		case START:
-			strcpy(levelStr, "START");
-			break;
-		case END:
-			strcpy(levelStr, "END  ");
-			break;
-		case STAT:
-			strcpy(levelStr, "STAT ");
-			break;
-		case INFO:
-			strcpy(levelStr, "INFO ");
-			break;
-		case DBUG:
-			strcpy(levelStr, "DEBUG");
-			break;
-		case WARN:
-			strcpy(levelStr, "WARN ");
-			break;
-		case ERR:
-			strcpy(levelStr, "ERROR");
-			break;
+	switch (level) {
+	case START:
+		strcpy(levelStr, "START");
+		break;
+	case END:
+		strcpy(levelStr, "END  ");
+		break;
+	case STAT:
+		strcpy(levelStr, "STAT ");
+		break;
+	case INFO:
+		strcpy(levelStr, "INFO ");
+		break;
+	case DBUG:
+		strcpy(levelStr, "DEBUG");
+		break;
+	case WARN:
+		strcpy(levelStr, "WARN ");
+		break;
+	case ERR:
+		strcpy(levelStr, "ERROR");
+		break;
 	}
 
-	sprintf(time_str, TIME_FORMAT, struct_time.tm_year+1900,
-		struct_time.tm_mon+1,
+	sprintf(time_str, TIME_FORMAT, struct_time.tm_year + 1900,
+		struct_time.tm_mon + 1,
 		struct_time.tm_mday,
-		struct_time.tm_hour,
-		struct_time.tm_min,
-		struct_time.tm_sec
-	);
+		struct_time.tm_hour, struct_time.tm_min, struct_time.tm_sec);
 
 	len += strlen(FORMAT);
 	len += strlen(time_str);
 	len += strlen(levelStr);
-	len += sizeof(pid_t)*8 + 1;
+	len += sizeof(pid_t) * 8 + 1;
 	len += strlen(VER_STR);
 	len += strlen(args->device);
 	len += strlen(Msg);
 
 	if ((cpTheMsg = (char *)ALLOC(len)) == NULL) {
-		printf("Can't print formatted message, printing message raw.\n");
-		rv = vprintf(Msg,l);
+		printf
+		    ("Can't print formatted message, printing message raw.\n");
+		rv = vprintf(Msg, l);
 		va_end(l);
 		return rv;
 	}
 
 	memset(cpTheMsg, 0, len);
-	sprintf(cpTheMsg, FORMAT, time_str, levelStr, args->pid, VER_STR, args->device, Msg);
+	sprintf(cpTheMsg, FORMAT, time_str, levelStr, args->pid, VER_STR,
+		args->device, Msg);
 
-	rv = vprintf(cpTheMsg,l);
+	rv = vprintf(cpTheMsg, l);
 	FREE(cpTheMsg);
 
 	va_end(l);
@@ -261,9 +260,11 @@
 	unsigned char *ucharpattern;
 	size_t i = 0;
 
-	ucharpattern = (unsigned char *) &data;
-	for (i=0;i<sizeof(OFF_T);i++) {
-		off_tpat |= (((OFF_T)(ucharpattern[i])) << sizeof(OFF_T)*((sizeof(OFF_T)-1)-i));
+	ucharpattern = (unsigned char *)&data;
+	for (i = 0; i < sizeof(OFF_T); i++) {
+		off_tpat |=
+		    (((OFF_T) (ucharpattern[i])) << sizeof(OFF_T) *
+		     ((sizeof(OFF_T) - 1) - i));
 	}
 #endif
 
@@ -276,9 +277,11 @@
 	unsigned char *ucharpattern;
 	size_t i = 0;
 
-	ucharpattern = (unsigned char *) &data;
-	for (i=0;i<sizeof(OFF_T);i++) {
-		off_tpat |= (((OFF_T)(ucharpattern[i])) << sizeof(OFF_T)*((sizeof(OFF_T)-1)-i));
+	ucharpattern = (unsigned char *)&data;
+	for (i = 0; i < sizeof(OFF_T); i++) {
+		off_tpat |=
+		    (((OFF_T) (ucharpattern[i])) << sizeof(OFF_T) *
+		     ((sizeof(OFF_T) - 1) - i));
 	}
 #else
 	off_tpat = data;
@@ -288,15 +291,16 @@
 	return off_tpat;
 }
 
-void mark_buffer(void *buf, const size_t buf_len, void *lba, const child_args_t *args, const test_env_t *env)
+void mark_buffer(void *buf, const size_t buf_len, void *lba,
+		 const child_args_t * args, const test_env_t * env)
 {
 	OFF_T *plocal_lba = lba;
 	OFF_T local_lba = *plocal_lba;
 	OFF_T *off_tbuf = buf;
 	OFF_T off_tpat = 0, off_tpat2 = 0, off_tpat3 = 0, off_tpat4 = 0;
 	OFF_T pass_count = env->pass_count;
-	OFF_T start_time = (OFF_T)env->start_time;
-	unsigned char * ucharBuf = (unsigned char *)buf;
+	OFF_T start_time = (OFF_T) env->start_time;
+	unsigned char *ucharBuf = (unsigned char *)buf;
 	size_t i = 0;
 	extern char hostname[];
 
@@ -308,31 +312,32 @@
 	}
 	off_tpat4 = getByteOrderedData(args->seed);
 
-	for (i=0;i<buf_len;i=i+BLK_SIZE) {
+	for (i = 0; i < buf_len; i = i + BLK_SIZE) {
 		if (args->flags & CLD_FLG_MRK_LBA) {
 			/* fill first 8 bytes with lba number */
 			off_tpat = getByteOrderedData(local_lba);
-			*(off_tbuf+(i/sizeof(OFF_T))) = off_tpat;
+			*(off_tbuf + (i / sizeof(OFF_T))) = off_tpat;
 		}
 		if (args->flags & CLD_FLG_MRK_PASS) {
 			/* fill second 8 bytes with pass_count */
-			*(off_tbuf+(i/sizeof(OFF_T))+1) = off_tpat2;
+			*(off_tbuf + (i / sizeof(OFF_T)) + 1) = off_tpat2;
 		}
 		if (args->flags & CLD_FLG_MRK_TIME) {
 			/* fill third 8 bytes with start_time */
-			*(off_tbuf+(i/sizeof(OFF_T))+2) = off_tpat3;
+			*(off_tbuf + (i / sizeof(OFF_T)) + 2) = off_tpat3;
 		}
 		if (args->flags & CLD_FLG_MRK_SEED) {
 			/* fill fourth 8 bytes with seed data */
-			*(off_tbuf+(i/sizeof(OFF_T))+3) = off_tpat4;
+			*(off_tbuf + (i / sizeof(OFF_T)) + 3) = off_tpat4;
 		}
 		if (args->flags & CLD_FLG_MRK_HOST) {
 			/* now add the hostname to the mark data */
-			memcpy(ucharBuf+32+i, hostname, HOSTNAME_SIZE);
+			memcpy(ucharBuf + 32 + i, hostname, HOSTNAME_SIZE);
 		}
 		if (args->flags & CLD_FLG_MRK_TARGET) {
 			/* now add the target to the mark data */
-			memcpy(ucharBuf+32+HOSTNAME_SIZE+i, args->device, strlen(args->device));
+			memcpy(ucharBuf + 32 + HOSTNAME_SIZE + i, args->device,
+			       strlen(args->device));
 		}
 
 		local_lba++;
@@ -346,7 +351,8 @@
 * pattern will be the address of the lba.
 */
 
-void fill_buffer(void *buf, size_t len, void *pattern, size_t pattern_len, const unsigned int pattern_type)
+void fill_buffer(void *buf, size_t len, void *pattern, size_t pattern_len,
+		 const unsigned int pattern_type)
 {
 	size_t i, j;
 	unsigned char *ucharbuf = buf;
@@ -355,99 +361,117 @@
 	OFF_T *poff_tpattern = pattern;
 	OFF_T off_tpat, off_tpat2;
 
-	switch (pattern_type) { /* the pattern type should only be one of the following */
-		case CLD_FLG_CPTYPE :
-			/* Will fill buffer with counting pattern 0x00 thru 0xff */
-			for (i=0;i<len;i++)
-				ucharbuf[i] = (unsigned char) (i & 0xff);
-			break;
-		case CLD_FLG_FPTYPE :
+	switch (pattern_type) {	/* the pattern type should only be one of the following */
+	case CLD_FLG_CPTYPE:
+		/* Will fill buffer with counting pattern 0x00 thru 0xff */
+		for (i = 0; i < len; i++)
+			ucharbuf[i] = (unsigned char)(i & 0xff);
+		break;
+	case CLD_FLG_FPTYPE:
+		/* arrange data to go on the wire correctly */
+		off_tpat = 0;
+		for (j = 0; j < (sizeof(OFF_T) / pattern_len); j++)
+			for (i = 0; i < pattern_len; ++i)
+#ifdef WINDOWS
+				off_tpat |=
+				    (((OFF_T) (ucharpattern[i])) << 8 *
+				     (7 - ((j * pattern_len) + i)));
+#endif
+#ifdef AIX
+		off_tpat |=
+		    (((OFF_T) (ucharpattern[(8 - pattern_len) + i])) << 8 *
+		     (7 - ((j * pattern_len) + i)));
+#endif
+#ifdef LINUX
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+		off_tpat |=
+		    (((OFF_T) (ucharpattern[i])) << 8 *
+		     (7 - ((j * pattern_len) + i)));
+#else
+		off_tpat |=
+		    (((OFF_T) (ucharpattern[(8 - pattern_len) + i])) << 8 *
+		     (7 - ((j * pattern_len) + i)));
+#endif
+#endif
+
+		/* fill buffer with fixed pattern */
+		for (i = 0; i < len / 8; i++)
+			*(off_tbuf + i) = off_tpat;
+		break;
+	case CLD_FLG_LPTYPE:
+		off_tpat2 = *poff_tpattern;
+		for (j = 0; j < len; j++) {
 			/* arrange data to go on the wire correctly */
+			ucharpattern = (unsigned char *)&off_tpat2;
 			off_tpat = 0;
-			for (j=0;j<(sizeof(OFF_T)/pattern_len);j++)
-				for (i=0;i<pattern_len;++i)
+			for (i = 0; i < pattern_len; i++)
 #ifdef WINDOWS
-					off_tpat |= (((OFF_T)(ucharpattern[i])) << 8*(7-((j*pattern_len)+i)));
+				off_tpat |=
+				    (((OFF_T) (ucharpattern[i])) << 8 *
+				     (7 - i));
 #endif
 #ifdef AIX
-					off_tpat |= (((OFF_T)(ucharpattern[(8-pattern_len)+i])) << 8*(7-((j*pattern_len)+i)));
+			off_tpat |=
+			    (((OFF_T) (ucharpattern[(8 - pattern_len) + i])) <<
+			     8 * (7 - i));
 #endif
 #ifdef LINUX
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-					off_tpat |= (((OFF_T)(ucharpattern[i])) << 8*(7-((j*pattern_len)+i)));
+			off_tpat |=
+			    (((OFF_T) (ucharpattern[i])) << 8 * (7 - i));
 #else
-					off_tpat |= (((OFF_T)(ucharpattern[(8-pattern_len)+i])) << 8*(7-((j*pattern_len)+i)));
+			off_tpat |=
+			    (((OFF_T) (ucharpattern[(8 - pattern_len) + i])) <<
+			     8 * (7 - i));
 #endif
 #endif
 
-			/* fill buffer with fixed pattern */
-			for (i=0;i<len/8;i++)
-				*(off_tbuf+i) = off_tpat;
-			break;
-		case CLD_FLG_LPTYPE :
-			off_tpat2 = *poff_tpattern;
-			for (j=0;j<len;j++) {
-				/* arrange data to go on the wire correctly */
-				ucharpattern = (unsigned char *) &off_tpat2;
-				off_tpat = 0;
-				for (i=0;i<pattern_len;i++)
-#ifdef WINDOWS
-					off_tpat |= (((OFF_T)(ucharpattern[i])) << 8*(7-i));
-#endif
-#ifdef AIX
-					off_tpat |= (((OFF_T)(ucharpattern[(8-pattern_len)+i])) << 8*(7-i));
-#endif
-#ifdef LINUX
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-					off_tpat |= (((OFF_T)(ucharpattern[i])) << 8*(7-i));
-#else
-					off_tpat |= (((OFF_T)(ucharpattern[(8-pattern_len)+i])) << 8*(7-i));
-#endif
-#endif
-
-				/* fill buffer with lba number */
-				for (i=0;i<BLK_SIZE/8;i++) {
-					*(off_tbuf+i+(j*(BLK_SIZE/8))) = off_tpat;
-				}
-				off_tpat2++;
+			/* fill buffer with lba number */
+			for (i = 0; i < BLK_SIZE / 8; i++) {
+				*(off_tbuf + i + (j * (BLK_SIZE / 8))) =
+				    off_tpat;
 			}
-			break;
-		case CLD_FLG_RPTYPE :
-			/* Will fill buffer with a random pattern.
-			 * Unfortunatly, every LBA, 512 bytes of data will be
-			 * the same random data set, this is due to the LBA
-			 * boundary requirement of disktest.  This should be fixed
-			 * at some point...
-			 */
-			for (i=0;i<BLK_SIZE/sizeof(OFF_T);i++)
-				*(off_tbuf+i) = Rand64();
+			off_tpat2++;
+		}
+		break;
+	case CLD_FLG_RPTYPE:
+		/* Will fill buffer with a random pattern.
+		 * Unfortunatly, every LBA, 512 bytes of data will be
+		 * the same random data set, this is due to the LBA
+		 * boundary requirement of disktest.  This should be fixed
+		 * at some point...
+		 */
+		for (i = 0; i < BLK_SIZE / sizeof(OFF_T); i++)
+			*(off_tbuf + i) = Rand64();
 
-			for (i=BLK_SIZE;i<len;i+=BLK_SIZE)
-				memcpy((ucharbuf+i), ucharbuf, BLK_SIZE);
-			break;
-		default :
-			printf("Unknown fill pattern\n");
-			exit(1);
+		for (i = BLK_SIZE; i < len; i += BLK_SIZE)
+			memcpy((ucharbuf + i), ucharbuf, BLK_SIZE);
+		break;
+	default:
+		printf("Unknown fill pattern\n");
+		exit(1);
 	}
 }
 
-void normalize_percs(child_args_t *args)
+void normalize_percs(child_args_t * args)
 {
 	int i, j;
 
 	if ((args->flags & CLD_FLG_R) && !(args->flags & CLD_FLG_W)) {
 		if ((args->flags & CLD_FLG_DUTY) && (args->rperc < 100)) {
-			pMsg(WARN, args, "Read specified w/o write, ignoring -D, forcing read only...\n");
+			pMsg(WARN, args,
+			     "Read specified w/o write, ignoring -D, forcing read only...\n");
 		}
 		args->rperc = 100;
 		args->wperc = 0;
 	} else if ((args->flags & CLD_FLG_W) && !(args->flags & CLD_FLG_R)) {
 		if ((args->flags & CLD_FLG_DUTY) && (args->wperc < 100)) {
-			pMsg(WARN, args, "Write specified w/o read, ignoring -D, forcing write only...\n");
+			pMsg(WARN, args,
+			     "Write specified w/o read, ignoring -D, forcing write only...\n");
 		}
 		args->rperc = 0;
 		args->wperc = 100;
-	} else { /* must be reading and writing */
+	} else {		/* must be reading and writing */
 		if (args->rperc == 0 && args->wperc == 0) {
 			args->rperc = 50;
 			args->wperc = 50;
@@ -459,7 +483,8 @@
 	}
 
 	if (args->rperc + args->wperc != 100) {
-		pMsg(INFO, args, "Balancing percentage between reads and writes\n");
+		pMsg(INFO, args,
+		     "Balancing percentage between reads and writes\n");
 		if ((args->flags & CLD_FLG_R) && (args->flags & CLD_FLG_W)) {
 			i = 100 - (args->rperc + args->wperc);
 			j = i / 2;
@@ -470,26 +495,29 @@
 }
 
 #ifndef WINDOWS
-char *strupr(char *String) {
+char *strupr(char *String)
+{
 	unsigned int i;
 
-	for (i=0;i<strlen(String);i++) {
-		*(String+i) = toupper(*(String+i));
+	for (i = 0; i < strlen(String); i++) {
+		*(String + i) = toupper(*(String + i));
 	}
-	return(String);
+	return (String);
 }
 
-char *strlwr(char *String) {
+char *strlwr(char *String)
+{
 	unsigned int i;
 
-	for (i=0;i<strlen(String);i++) {
-		*(String+i) = tolower(*(String+i));
+	for (i = 0; i < strlen(String); i++) {
+		*(String + i) = tolower(*(String + i));
 	}
-	return(String);
+	return (String);
 }
 #endif
 
-OFF_T get_file_size(char *device) {
+OFF_T get_file_size(char *device)
+{
 	OFF_T size = 0;
 	fd_t fd;
 
@@ -497,12 +525,8 @@
 	SetLastError(0);
 
 	fd = CreateFile(device,
-		GENERIC_READ,
-		FILE_SHARE_READ,
-		NULL,
-		OPEN_EXISTING,
-		0,
-		NULL);
+			GENERIC_READ,
+			FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
 #else
 	fd = open(device, 0);
 #endif
@@ -534,42 +558,34 @@
 	DISK_GEOMETRY DiskGeom;
 
 	hFileHandle = CreateFile(device,
-		GENERIC_READ,
-		FILE_SHARE_READ,
-		NULL,
-		OPEN_EXISTING,
-		0,
-		NULL);
+				 GENERIC_READ,
+				 FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
 
 	if (hFileHandle == INVALID_HANDLE_VALUE) {
-		return(GetLastError());
+		return (GetLastError());
 	}
 
 	SetLastError(0);
 	bRV = DeviceIoControl(hFileHandle,
-		IOCTL_DISK_GET_LENGTH_INFO,
-		NULL,
-		0,
-		&myLengthInfo,
-		sizeof(GET_LENGTH_INFORMATION),
-		&dwLength,
-		NULL);
+			      IOCTL_DISK_GET_LENGTH_INFO,
+			      NULL,
+			      0,
+			      &myLengthInfo,
+			      sizeof(GET_LENGTH_INFORMATION), &dwLength, NULL);
 
 	if (bRV) {
 		size = myLengthInfo.Length.QuadPart;
-		size /= BLK_SIZE; /* return requires BLOCK */
+		size /= BLK_SIZE;	/* return requires BLOCK */
 	} else {
 		bRV = DeviceIoControl(hFileHandle,
-			IOCTL_DISK_GET_DRIVE_GEOMETRY,
-			NULL,
-			0,
-			&DiskGeom,
-			sizeof(DISK_GEOMETRY),
-			&dwLength,
-			NULL);
+				      IOCTL_DISK_GET_DRIVE_GEOMETRY,
+				      NULL,
+				      0,
+				      &DiskGeom,
+				      sizeof(DISK_GEOMETRY), &dwLength, NULL);
 
 		if (bRV) {
-			size =  (OFF_T) DiskGeom.Cylinders.QuadPart;
+			size = (OFF_T) DiskGeom.Cylinders.QuadPart;
 			size *= (OFF_T) DiskGeom.TracksPerCylinder;
 			size *= (OFF_T) DiskGeom.SectorsPerTrack;
 		} else {
@@ -587,43 +603,55 @@
 	if ((fd = open(device, 0)) < 0) {
 		return 0;
 	}
-
 #if AIX
-	my_devinfo = (struct devinfo*) ALLOC(sizeof(struct devinfo));
+	my_devinfo = (struct devinfo *)ALLOC(sizeof(struct devinfo));
 	if (my_devinfo != NULL) {
 		memset(my_devinfo, 0, sizeof(struct devinfo));
-		if (ioctl(fd, IOCINFO, my_devinfo) == -1) size = -1;
+		if (ioctl(fd, IOCINFO, my_devinfo) == -1)
+			size = -1;
 		else {
 			if (my_devinfo->flags & DF_LGDSK) {
-				ulSizeTmp = (unsigned long) my_devinfo->un.scdk64.hi_numblks;
-				size |= ((((OFF_T)ulSizeTmp) << 32) & 0xFFFFFFFF00000000ll);
-				ulSizeTmp = (unsigned long) my_devinfo->un.scdk64.lo_numblks;
-				size |= (((OFF_T) ulSizeTmp) & 0x00000000FFFFFFFFll);
+				ulSizeTmp =
+				    (unsigned long)my_devinfo->un.scdk64.
+				    hi_numblks;
+				size |=
+				    ((((OFF_T) ulSizeTmp) << 32) &
+				     0xFFFFFFFF00000000ll);
+				ulSizeTmp =
+				    (unsigned long)my_devinfo->un.scdk64.
+				    lo_numblks;
+				size |=
+				    (((OFF_T) ulSizeTmp) &
+				     0x00000000FFFFFFFFll);
 			} else {
-				ulSizeTmp = (unsigned long) my_devinfo->un.scdk.numblks;
-				size |= (((OFF_T) ulSizeTmp) & 0x00000000FFFFFFFFll);
+				ulSizeTmp =
+				    (unsigned long)my_devinfo->un.scdk.numblks;
+				size |=
+				    (((OFF_T) ulSizeTmp) &
+				     0x00000000FFFFFFFFll);
 			}
 		}
 		FREE(my_devinfo);
 	}
 #else
-	if (ioctl(fd, BLKGETSIZE, &size) == -1) size = -1;
+	if (ioctl(fd, BLKGETSIZE, &size) == -1)
+		size = -1;
 #endif
 
 	close(fd);
 #endif
 
 #ifdef PPC
-	return((OFF_T)size);
+	return ((OFF_T) size);
 #else
-	return(size);
+	return (size);
 #endif
 }
 
 #ifndef WINDOWS
 void Sleep(unsigned int msecs)
 {
-	usleep(msecs*1000);
+	usleep(msecs * 1000);
 }
 #endif
 
@@ -631,10 +659,10 @@
 {
 	fmt_time_t time_struct;
 
-	time_struct.days    = seconds/86400;
-	time_struct.hours   = (seconds%86400)/3600;
-	time_struct.minutes = (seconds%3600)/60;
-	time_struct.seconds = seconds%60;
+	time_struct.days = seconds / 86400;
+	time_struct.hours = (seconds % 86400) / 3600;
+	time_struct.minutes = (seconds % 3600) / 60;
+	time_struct.seconds = seconds % 60;
 
 	return time_struct;
 }
diff --git a/testcases/kernel/io/disktest/signals.c b/testcases/kernel/io/disktest/signals.c
index 9298c5b..c4b6338 100644
--- a/testcases/kernel/io/disktest/signals.c
+++ b/testcases/kernel/io/disktest/signals.c
@@ -50,9 +50,9 @@
 #endif
 
 #ifdef WINDOWS
-void sig_handler( int sig )
+void sig_handler(int sig)
 #else
-void* sig_handler( void* arg )
+void *sig_handler(void *arg)
 #endif
 {
 #ifndef WINDOWS
@@ -61,72 +61,72 @@
 	int rv;
 
 	/* wait for any and all signals */
-	sigfillset( &signal_set );
+	sigfillset(&signal_set);
 #ifdef AIX
 	/* except in AIX, can't sigwait on this signals */
-	sigdelset( &signal_set, SIGKILL );
-	sigdelset( &signal_set, SIGWAITING );
-	sigdelset( &signal_set, SIGSTOP );
+	sigdelset(&signal_set, SIGKILL);
+	sigdelset(&signal_set, SIGWAITING);
+	sigdelset(&signal_set, SIGSTOP);
 #endif
 
 	for (;;) {
-		rv = sigwait( &signal_set, &sig );
+		rv = sigwait(&signal_set, &sig);
 #endif
 
-		switch( sig ) {
-			case SIGQUIT:
-				LOCK(sig_mutex);
-				handled_signal = SIGQUIT;
-				signal_action |= SIGNAL_STOP;
-				UNLOCK(sig_mutex);
-				break;
+		switch (sig) {
+		case SIGQUIT:
+			LOCK(sig_mutex);
+			handled_signal = SIGQUIT;
+			signal_action |= SIGNAL_STOP;
+			UNLOCK(sig_mutex);
+			break;
 
-			case SIGINT:
-				LOCK(sig_mutex);
-				handled_signal = SIGINT;
-				signal_action |= SIGNAL_STOP;
-				UNLOCK(sig_mutex);
-				break;
+		case SIGINT:
+			LOCK(sig_mutex);
+			handled_signal = SIGINT;
+			signal_action |= SIGNAL_STOP;
+			UNLOCK(sig_mutex);
+			break;
 
-			case SIGTERM:
-				LOCK(sig_mutex);
-				handled_signal = SIGTERM;
-				signal_action |= SIGNAL_STOP;
-				UNLOCK(sig_mutex);
-				break;
+		case SIGTERM:
+			LOCK(sig_mutex);
+			handled_signal = SIGTERM;
+			signal_action |= SIGNAL_STOP;
+			UNLOCK(sig_mutex);
+			break;
 
-			case SIGHUP:
-				LOCK(sig_mutex);
-				handled_signal = SIGHUP;
-				signal_action |= SIGNAL_STOP;
-				UNLOCK(sig_mutex);
-				break;
+		case SIGHUP:
+			LOCK(sig_mutex);
+			handled_signal = SIGHUP;
+			signal_action |= SIGNAL_STOP;
+			UNLOCK(sig_mutex);
+			break;
 
-			case SIGUSR1:
-				LOCK(sig_mutex);
-				handled_signal = SIGUSR1;
-				signal_action |= SIGNAL_STAT;
-				UNLOCK(sig_mutex);
-				break;
+		case SIGUSR1:
+			LOCK(sig_mutex);
+			handled_signal = SIGUSR1;
+			signal_action |= SIGNAL_STAT;
+			UNLOCK(sig_mutex);
+			break;
 
 			/* whatever you need to do for other signals */
-			default:
-				LOCK(sig_mutex);
-				handled_signal = 0;
-				UNLOCK(sig_mutex);
-				break;
-			}
+		default:
+			LOCK(sig_mutex);
+			handled_signal = 0;
+			UNLOCK(sig_mutex);
+			break;
+		}
 #ifndef WINDOWS
 	}
 	return (void *)0;
 #endif
 }
 
-void setup_sig_mask( void )
+void setup_sig_mask(void)
 {
 #ifndef WINDOWS
-    sigset_t signal_set;
-    pthread_t sig_thread;
+	sigset_t signal_set;
+	pthread_t sig_thread;
 #endif
 
 #ifdef WINDOWS
@@ -137,29 +137,29 @@
 
 	/* block all signals */
 #ifdef WINDOWS
-	signal( SIGINT, sig_handler );
-	signal( SIGTERM, sig_handler );
-	signal( SIGUSR1, sig_handler );
+	signal(SIGINT, sig_handler);
+	signal(SIGTERM, sig_handler);
+	signal(SIGUSR1, sig_handler);
 #else
-	sigemptyset( &signal_set );
-	sigaddset( &signal_set, SIGINT );
-	sigaddset( &signal_set, SIGHUP );
-	sigaddset( &signal_set, SIGQUIT );
-	sigaddset( &signal_set, SIGTERM );
-	sigaddset( &signal_set, SIGUSR1 );
+	sigemptyset(&signal_set);
+	sigaddset(&signal_set, SIGINT);
+	sigaddset(&signal_set, SIGHUP);
+	sigaddset(&signal_set, SIGQUIT);
+	sigaddset(&signal_set, SIGTERM);
+	sigaddset(&signal_set, SIGUSR1);
 
 #ifdef AIX
 	sigthreadmask(SIG_SETMASK, &signal_set, NULL);
 #else
-	pthread_sigmask( SIG_SETMASK, &signal_set, NULL );
+	pthread_sigmask(SIG_SETMASK, &signal_set, NULL);
 #endif
 
 	/* create the signal handling thread */
-	pthread_create( &sig_thread, NULL, sig_handler, NULL );
+	pthread_create(&sig_thread, NULL, sig_handler, NULL);
 #endif
 }
 
-void clear_stat_signal( void )
+void clear_stat_signal(void)
 {
 	if (signal_action & SIGNAL_STAT) {
 		LOCK(sig_mutex);
diff --git a/testcases/kernel/io/disktest/stats.c b/testcases/kernel/io/disktest/stats.c
index ae994a9..ac9b474 100644
--- a/testcases/kernel/io/disktest/stats.c
+++ b/testcases/kernel/io/disktest/stats.c
@@ -52,17 +52,19 @@
 #include "threading.h"
 #include "stats.h"
 
-void print_stats(child_args_t *args, test_env_t *env, statop_t operation)
+void print_stats(child_args_t * args, test_env_t * env, statop_t operation)
 {
-	extern time_t global_start_time;/* global pointer to overall start */
+	extern time_t global_start_time;	/* global pointer to overall start */
 	extern unsigned long glb_flags;	/* global flags GLB_FLG_xxx */
 
-	time_t curr_time = 0, hwrite_time = 0, hread_time = 0, write_time = 0, read_time = 0, gw_time = 0, gr_time = 0;
+	time_t curr_time = 0, hwrite_time = 0, hread_time = 0, write_time =
+	    0, read_time = 0, gw_time = 0, gr_time = 0;
 	fmt_time_t time_struct;
 
 	curr_time = time(NULL);
 
-	if ((curr_time - env->start_time) == 0) curr_time++;
+	if ((curr_time - env->start_time) == 0)
+		curr_time++;
 
 	if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD)) {
 		hread_time = env->hbeat_stats.rtime;
@@ -76,64 +78,105 @@
 		hwrite_time = ((env->hbeat_stats.wtime * args->wperc) / 100);
 		read_time = ((env->cycle_stats.rtime * args->rperc) / 100);
 		write_time = ((env->cycle_stats.wtime * args->wperc) / 100);
-		gr_time = (time_t) ((env->global_stats.rtime * args->rperc) / 100);
-		gw_time = (time_t) ((env->global_stats.wtime * args->wperc) / 100);
+		gr_time =
+		    (time_t) ((env->global_stats.rtime * args->rperc) / 100);
+		gw_time =
+		    (time_t) ((env->global_stats.wtime * args->wperc) / 100);
 	}
 
 	/* if one second really has not passed, then make it at least one second */
-	if (hread_time == 0) hread_time++;
-	if (hwrite_time == 0) hwrite_time++;
-	if (read_time == 0) read_time++;
-	if (write_time == 0) write_time++;
-	if (gr_time == 0) gr_time++;
-	if (gw_time == 0) gw_time++;
+	if (hread_time == 0)
+		hread_time++;
+	if (hwrite_time == 0)
+		hwrite_time++;
+	if (read_time == 0)
+		read_time++;
+	if (write_time == 0)
+		write_time++;
+	if (gr_time == 0)
+		gr_time++;
+	if (gw_time == 0)
+		gw_time++;
 
 	if (glb_flags & GLB_FLG_PERFP) {
 		if (args->flags & CLD_FLG_PRFTYPS) {
 			printf("%s;", args->device);
 		}
-		switch(operation) {
-			case HBEAT: /* only display current HBEAT stats */
-				if ((args->flags & CLD_FLG_XFERS)) {
-					printf(CTRSTR, (env->hbeat_stats.rbytes), (env->hbeat_stats.rcount));
-					printf(CTWSTR, (env->hbeat_stats.wbytes), (env->hbeat_stats.wcount));
-				}
-				if ((args->flags & CLD_FLG_TPUTS)) {
-					printf(CTRRSTR, ((double)(env->hbeat_stats.rbytes) / (double)(hread_time)), ((double)(env->hbeat_stats.rcount) / (double)(hread_time)));
-					printf(CTRWSTR, ((double)(env->hbeat_stats.wbytes) / (double)(hwrite_time)), ((double)(env->hbeat_stats.wcount) / (double)(hwrite_time)));
-				}
-				if ((args->flags & CLD_FLG_RUNT)) {
-					printf("%lu;Rsecs;%lu;Wsecs;", hread_time, hwrite_time);
-				}
-				break;
-			case CYCLE: /* only display current CYCLE stats */
-				if ((args->flags & CLD_FLG_XFERS)) {
-					printf(CTRSTR, (env->cycle_stats.rbytes), (env->cycle_stats.rcount));
-					printf(CTWSTR, (env->cycle_stats.wbytes), (env->cycle_stats.wcount));
-				}
-				if ((args->flags & CLD_FLG_TPUTS)) {
-					printf(CTRRSTR, ((double)(env->cycle_stats.rbytes) / (double)(read_time)), ((double)(env->cycle_stats.rcount) / (double)(read_time)));
-					printf(CTRWSTR, ((double)(env->cycle_stats.wbytes) / (double)(write_time)), ((double)(env->cycle_stats.wcount) / (double)(write_time)));
-				}
-				if ((args->flags & CLD_FLG_RUNT)) {
-					printf("%lu;Rsecs;%lu;Wsecs;",read_time, write_time);
-				}
-				break;
-			case TOTAL: /* display total read and write stats */
-				if ((args->flags & CLD_FLG_XFERS)) {
-					printf(TCTRSTR, (env->global_stats.rbytes), (env->global_stats.rcount));
-					printf(TCTWSTR, (env->global_stats.wbytes), (env->global_stats.wcount));
-				}
-				if ((args->flags & CLD_FLG_TPUTS)) {
-					printf(TCTRRSTR, ((double)(env->global_stats.rbytes) / (double)(gr_time)), ((double)(env->global_stats.rcount) / (double)(gr_time)));
-					printf(TCTRWSTR, ((double)(env->global_stats.wbytes) / (double)(gw_time)), ((double)(env->global_stats.wcount) / (double)(gw_time)));
-				}
-				if ((args->flags & CLD_FLG_RUNT)) {
-					printf("%lu;secs;",(curr_time - env->start_time));
-				}
-				break;
-			default:
-				pMsg(ERR, args, "Unknown stats display type.\n");
+		switch (operation) {
+		case HBEAT:	/* only display current HBEAT stats */
+			if ((args->flags & CLD_FLG_XFERS)) {
+				printf(CTRSTR, (env->hbeat_stats.rbytes),
+				       (env->hbeat_stats.rcount));
+				printf(CTWSTR, (env->hbeat_stats.wbytes),
+				       (env->hbeat_stats.wcount));
+			}
+			if ((args->flags & CLD_FLG_TPUTS)) {
+				printf(CTRRSTR,
+				       ((double)(env->hbeat_stats.rbytes) /
+					(double)(hread_time)),
+				       ((double)(env->hbeat_stats.rcount) /
+					(double)(hread_time)));
+				printf(CTRWSTR,
+				       ((double)(env->hbeat_stats.wbytes) /
+					(double)(hwrite_time)),
+				       ((double)(env->hbeat_stats.wcount) /
+					(double)(hwrite_time)));
+			}
+			if ((args->flags & CLD_FLG_RUNT)) {
+				printf("%lu;Rsecs;%lu;Wsecs;", hread_time,
+				       hwrite_time);
+			}
+			break;
+		case CYCLE:	/* only display current CYCLE stats */
+			if ((args->flags & CLD_FLG_XFERS)) {
+				printf(CTRSTR, (env->cycle_stats.rbytes),
+				       (env->cycle_stats.rcount));
+				printf(CTWSTR, (env->cycle_stats.wbytes),
+				       (env->cycle_stats.wcount));
+			}
+			if ((args->flags & CLD_FLG_TPUTS)) {
+				printf(CTRRSTR,
+				       ((double)(env->cycle_stats.rbytes) /
+					(double)(read_time)),
+				       ((double)(env->cycle_stats.rcount) /
+					(double)(read_time)));
+				printf(CTRWSTR,
+				       ((double)(env->cycle_stats.wbytes) /
+					(double)(write_time)),
+				       ((double)(env->cycle_stats.wcount) /
+					(double)(write_time)));
+			}
+			if ((args->flags & CLD_FLG_RUNT)) {
+				printf("%lu;Rsecs;%lu;Wsecs;", read_time,
+				       write_time);
+			}
+			break;
+		case TOTAL:	/* display total read and write stats */
+			if ((args->flags & CLD_FLG_XFERS)) {
+				printf(TCTRSTR, (env->global_stats.rbytes),
+				       (env->global_stats.rcount));
+				printf(TCTWSTR, (env->global_stats.wbytes),
+				       (env->global_stats.wcount));
+			}
+			if ((args->flags & CLD_FLG_TPUTS)) {
+				printf(TCTRRSTR,
+				       ((double)(env->global_stats.rbytes) /
+					(double)(gr_time)),
+				       ((double)(env->global_stats.rcount) /
+					(double)(gr_time)));
+				printf(TCTRWSTR,
+				       ((double)(env->global_stats.wbytes) /
+					(double)(gw_time)),
+				       ((double)(env->global_stats.wcount) /
+					(double)(gw_time)));
+			}
+			if ((args->flags & CLD_FLG_RUNT)) {
+				printf("%lu;secs;",
+				       (curr_time - env->start_time));
+			}
+			break;
+		default:
+			pMsg(ERR, args, "Unknown stats display type.\n");
 		}
 
 		if (args->flags & CLD_FLG_PRFTYPS) {
@@ -141,126 +184,197 @@
 		}
 	} else {
 		if ((args->flags & CLD_FLG_XFERS)) {
-			switch(operation) {
-				case HBEAT: /* only display current HBEAT stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, HRTSTR, (env->hbeat_stats.rbytes), (env->hbeat_stats.rcount));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, HWTSTR, (env->hbeat_stats.wbytes), (env->hbeat_stats.wcount));
-					}
-					break;
-				case CYCLE: /* only display current CYCLE stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, CRTSTR, (env->cycle_stats.rbytes), (env->cycle_stats.rcount));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, CWTSTR, (env->cycle_stats.wbytes), (env->cycle_stats.wcount));
-					}
-					break;
-				case TOTAL: /* display total read and write stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, TRTSTR, (env->global_stats.rcount), (env->global_stats.rbytes));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, TWTSTR, (env->global_stats.wcount), (env->global_stats.wbytes));
-					}
-					break;
-				default:
-					pMsg(ERR, args, "Unknown stats display type.\n");
+			switch (operation) {
+			case HBEAT:	/* only display current HBEAT stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, HRTSTR,
+					     (env->hbeat_stats.rbytes),
+					     (env->hbeat_stats.rcount));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, HWTSTR,
+					     (env->hbeat_stats.wbytes),
+					     (env->hbeat_stats.wcount));
+				}
+				break;
+			case CYCLE:	/* only display current CYCLE stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, CRTSTR,
+					     (env->cycle_stats.rbytes),
+					     (env->cycle_stats.rcount));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, CWTSTR,
+					     (env->cycle_stats.wbytes),
+					     (env->cycle_stats.wcount));
+				}
+				break;
+			case TOTAL:	/* display total read and write stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, TRTSTR,
+					     (env->global_stats.rcount),
+					     (env->global_stats.rbytes));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, TWTSTR,
+					     (env->global_stats.wcount),
+					     (env->global_stats.wbytes));
+				}
+				break;
+			default:
+				pMsg(ERR, args,
+				     "Unknown stats display type.\n");
 			}
 		}
 
 		if ((args->flags & CLD_FLG_TPUTS)) {
-			switch(operation) {
-				case HBEAT: /* only display current read stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, HRTHSTR,
-							((double) env->hbeat_stats.rbytes / (double) (hread_time)),
-							(((double) env->hbeat_stats.rbytes / (double) hread_time) / (double) 1048576.),
-							((double) env->hbeat_stats.rcount / (double) (hread_time)));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, HWTHSTR,
-							((double) env->hbeat_stats.wbytes / (double) hwrite_time),
-							(((double) env->hbeat_stats.wbytes / (double) hwrite_time) / (double) 1048576.),
-							((double) env->hbeat_stats.wcount / (double) hwrite_time));
-					}
-					break;
-				case CYCLE: /* only display current read stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, CRTHSTR,
-							((double) env->cycle_stats.rbytes / (double) (read_time)),
-							(((double) env->cycle_stats.rbytes / (double) read_time) / (double) 1048576.),
-							((double) env->cycle_stats.rcount / (double) (read_time)));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, CWTHSTR,
-							((double) env->cycle_stats.wbytes / (double) write_time),
-							(((double) env->cycle_stats.wbytes / (double) write_time) / (double) 1048576.),
-							((double) env->cycle_stats.wcount / (double) write_time));
-					}
-					break;
-				case TOTAL: /* display total read and write stats */
-					if (args->flags & CLD_FLG_R) {
-						pMsg(STAT, args, TRTHSTR,
-							((double) env->global_stats.rbytes / (double) gr_time),
-							(((double) env->global_stats.rbytes / (double) gr_time) / (double) 1048576.),
-							((double) env->global_stats.rcount / (double) gr_time));
-					}
-					if (args->flags & CLD_FLG_W) {
-						pMsg(STAT, args, TWTHSTR,
-							((double) env->global_stats.wbytes / (double) gw_time),
-							(((double) env->global_stats.wbytes / (double) gw_time) / (double) 1048576.),
-							((double) env->global_stats.wcount / (double) gw_time));
-					}
-					break;
-				default:
-					pMsg(ERR, args, "Unknown stats display type.\n");
+			switch (operation) {
+			case HBEAT:	/* only display current read stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, HRTHSTR,
+					     ((double)env->hbeat_stats.rbytes /
+					      (double)(hread_time)),
+					     (((double)env->hbeat_stats.rbytes /
+					       (double)hread_time) /
+					      (double)1048576.),
+					     ((double)env->hbeat_stats.rcount /
+					      (double)(hread_time)));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, HWTHSTR,
+					     ((double)env->hbeat_stats.wbytes /
+					      (double)hwrite_time),
+					     (((double)env->hbeat_stats.wbytes /
+					       (double)hwrite_time) /
+					      (double)1048576.),
+					     ((double)env->hbeat_stats.wcount /
+					      (double)hwrite_time));
+				}
+				break;
+			case CYCLE:	/* only display current read stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, CRTHSTR,
+					     ((double)env->cycle_stats.rbytes /
+					      (double)(read_time)),
+					     (((double)env->cycle_stats.rbytes /
+					       (double)read_time) /
+					      (double)1048576.),
+					     ((double)env->cycle_stats.rcount /
+					      (double)(read_time)));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, CWTHSTR,
+					     ((double)env->cycle_stats.wbytes /
+					      (double)write_time),
+					     (((double)env->cycle_stats.wbytes /
+					       (double)write_time) /
+					      (double)1048576.),
+					     ((double)env->cycle_stats.wcount /
+					      (double)write_time));
+				}
+				break;
+			case TOTAL:	/* display total read and write stats */
+				if (args->flags & CLD_FLG_R) {
+					pMsg(STAT, args, TRTHSTR,
+					     ((double)env->global_stats.rbytes /
+					      (double)gr_time),
+					     (((double)env->global_stats.
+					       rbytes / (double)gr_time) /
+					      (double)1048576.),
+					     ((double)env->global_stats.rcount /
+					      (double)gr_time));
+				}
+				if (args->flags & CLD_FLG_W) {
+					pMsg(STAT, args, TWTHSTR,
+					     ((double)env->global_stats.wbytes /
+					      (double)gw_time),
+					     (((double)env->global_stats.
+					       wbytes / (double)gw_time) /
+					      (double)1048576.),
+					     ((double)env->global_stats.wcount /
+					      (double)gw_time));
+				}
+				break;
+			default:
+				pMsg(ERR, args,
+				     "Unknown stats display type.\n");
 			}
 		}
 		if (args->flags & CLD_FLG_RUNT) {
-			switch(operation) {
-				case HBEAT: /* only display current cycle stats */
-					if (args->flags & CLD_FLG_R) {
-						time_struct = format_time(hread_time);
-						pMsg(STAT,args,"Heartbeat Read Time: %u seconds (%luh%lum%lus)\n", hread_time, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					if (args->flags & CLD_FLG_W) {
-						time_struct = format_time(hwrite_time);
-						pMsg(STAT,args,"Heartbeat Write Time: %u seconds (%luh%lum%lus)\n", hwrite_time, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					break;
-				case CYCLE: /* only display current cycle stats */
-					if (args->flags & CLD_FLG_R) {
-						time_struct = format_time(read_time);
-						pMsg(STAT,args,"Cycle Read Time: %u seconds (%luh%lum%lus)\n", read_time, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					if (args->flags & CLD_FLG_W) {
-						time_struct = format_time(write_time);
-						pMsg(STAT,args,"Cycle Write Time: %u seconds (%luh%lum%lus)\n", write_time, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					break;
-				case TOTAL:
-					if (args->flags & CLD_FLG_R) {
-						time_struct = format_time(gr_time);
-						pMsg(STAT,args, "Total Read Time: %u seconds (%lud%luh%lum%lus)\n", gr_time, time_struct.days, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					if (args->flags & CLD_FLG_W) {
-						time_struct = format_time(gw_time);
-						pMsg(STAT,args, "Total Write Time: %u seconds (%lud%luh%lum%lus)\n", gw_time, time_struct.days, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					}
-					time_struct = format_time((curr_time - global_start_time));
-					pMsg(STAT,args, "Total overall runtime: %u seconds (%lud%luh%lum%lus)\n", (curr_time - global_start_time), time_struct.days, time_struct.hours, time_struct.minutes, time_struct.seconds);
-					break;
-				default:
-					pMsg(ERR, args, "Unknown stats display type.\n");
+			switch (operation) {
+			case HBEAT:	/* only display current cycle stats */
+				if (args->flags & CLD_FLG_R) {
+					time_struct = format_time(hread_time);
+					pMsg(STAT, args,
+					     "Heartbeat Read Time: %u seconds (%luh%lum%lus)\n",
+					     hread_time, time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				if (args->flags & CLD_FLG_W) {
+					time_struct = format_time(hwrite_time);
+					pMsg(STAT, args,
+					     "Heartbeat Write Time: %u seconds (%luh%lum%lus)\n",
+					     hwrite_time, time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				break;
+			case CYCLE:	/* only display current cycle stats */
+				if (args->flags & CLD_FLG_R) {
+					time_struct = format_time(read_time);
+					pMsg(STAT, args,
+					     "Cycle Read Time: %u seconds (%luh%lum%lus)\n",
+					     read_time, time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				if (args->flags & CLD_FLG_W) {
+					time_struct = format_time(write_time);
+					pMsg(STAT, args,
+					     "Cycle Write Time: %u seconds (%luh%lum%lus)\n",
+					     write_time, time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				break;
+			case TOTAL:
+				if (args->flags & CLD_FLG_R) {
+					time_struct = format_time(gr_time);
+					pMsg(STAT, args,
+					     "Total Read Time: %u seconds (%lud%luh%lum%lus)\n",
+					     gr_time, time_struct.days,
+					     time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				if (args->flags & CLD_FLG_W) {
+					time_struct = format_time(gw_time);
+					pMsg(STAT, args,
+					     "Total Write Time: %u seconds (%lud%luh%lum%lus)\n",
+					     gw_time, time_struct.days,
+					     time_struct.hours,
+					     time_struct.minutes,
+					     time_struct.seconds);
+				}
+				time_struct =
+				    format_time((curr_time -
+						 global_start_time));
+				pMsg(STAT, args,
+				     "Total overall runtime: %u seconds (%lud%luh%lum%lus)\n",
+				     (curr_time - global_start_time),
+				     time_struct.days, time_struct.hours,
+				     time_struct.minutes, time_struct.seconds);
+				break;
+			default:
+				pMsg(ERR, args,
+				     "Unknown stats display type.\n");
 			}
 		}
 	}
 }
 
-void update_gbl_stats(test_env_t *env)
+void update_gbl_stats(test_env_t * env)
 {
 	env->global_stats.wcount += env->cycle_stats.wcount;
 	env->global_stats.rcount += env->cycle_stats.rcount;
@@ -277,7 +391,7 @@
 	env->cycle_stats.rtime = 0;
 }
 
-void update_cyc_stats(test_env_t *env)
+void update_cyc_stats(test_env_t * env)
 {
 	env->cycle_stats.wcount += env->hbeat_stats.wcount;
 	env->cycle_stats.rcount += env->hbeat_stats.rcount;
diff --git a/testcases/kernel/io/disktest/threading.c b/testcases/kernel/io/disktest/threading.c
index d4b1325..007737f 100644
--- a/testcases/kernel/io/disktest/threading.c
+++ b/testcases/kernel/io/disktest/threading.c
@@ -126,7 +126,7 @@
  * unix, this is done through pthread_join.  In Windows we
  * use a sleeping loop.
  */
-void cleanUpTestChildren(test_ll_t *test)
+void cleanUpTestChildren(test_ll_t * test)
 {
 	thread_struct_t *pTmpThread = NULL, *pTmpThreadLast = NULL;
 
@@ -147,7 +147,7 @@
  * during the call.  if we cannot create a child, we fail and exit with
  * errno as the exit status.
  */
-void CreateTestChild(void *function, test_ll_t *test)
+void CreateTestChild(void *function, test_ll_t * test)
 {
 	thread_struct_t *pNewThread;
 	hThread_t hTmpThread;
@@ -155,8 +155,12 @@
 	hTmpThread = spawnThread(function, test);
 
 	if (ISTHREADVALID(hTmpThread)) {
-		if ((pNewThread = (thread_struct_t *) ALLOC(sizeof(thread_struct_t))) == NULL) {
-			pMsg(ERR, test->args, "%d : Could not allocate memory for child thread...\n", GETLASTERROR());
+		if ((pNewThread =
+		     (thread_struct_t *) ALLOC(sizeof(thread_struct_t))) ==
+		    NULL) {
+			pMsg(ERR, test->args,
+			     "%d : Could not allocate memory for child thread...\n",
+			     GETLASTERROR());
 			exit(GETLASTERROR());
 		}
 		test->env->kids++;
@@ -165,13 +169,18 @@
 		test->env->pThreads = pNewThread;
 		test->env->pThreads->hThread = hTmpThread;
 	} else {
-		pMsg(ERR, test->args, "%d : Could not create all child threads.\n", GETLASTERROR());
-		pMsg(INFO, test->args, "Total Number of Threads created was %u\n", test->env->kids);
+		pMsg(ERR, test->args,
+		     "%d : Could not create all child threads.\n",
+		     GETLASTERROR());
+		pMsg(INFO, test->args,
+		     "Total Number of Threads created was %u\n",
+		     test->env->kids);
 		exit(GETLASTERROR());
 	}
 }
 
-void createChild(void *function, test_ll_t *test) {
+void createChild(void *function, test_ll_t * test)
+{
 	hThread_t hTmpThread;
 
 	hTmpThread = spawnThread(function, test);
@@ -179,12 +188,14 @@
 	if (ISTHREADVALID(hTmpThread)) {
 		test->hThread = hTmpThread;
 	} else {
-		pMsg(ERR, test->args, "%d : Could not create child thread...\n", GETLASTERROR());
+		pMsg(ERR, test->args, "%d : Could not create child thread...\n",
+		     GETLASTERROR());
 		exit(GETLASTERROR());
 	}
 }
 
-void cleanUp(test_ll_t *test) {
+void cleanUp(test_ll_t * test)
+{
 	test_ll_t *pTmpTest = test;
 	test_ll_t *pLastTest;
 	while (pTmpTest != NULL) {
@@ -198,7 +209,8 @@
 	}
 }
 
-hThread_t spawnThread(void *function, void *param) {
+hThread_t spawnThread(void *function, void *param)
+{
 	hThread_t hTmpThread;
 
 #ifdef WINDOWS
@@ -212,7 +224,8 @@
 	return hTmpThread;
 }
 
-void closeThread(hThread_t hThread) {
+void closeThread(hThread_t hThread)
+{
 #ifdef WINDOWS
 	DWORD dwExitCode = 0;
 
@@ -222,7 +235,8 @@
 		 * Sleep(0) will force this thread to
 		 * relinquish the remainder of its time slice
 		 */
-		if (dwExitCode == STILL_ACTIVE) Sleep(0);
+		if (dwExitCode == STILL_ACTIVE)
+			Sleep(0);
 	} while (dwExitCode == STILL_ACTIVE);
 #else
 	pthread_join(hThread, NULL);
diff --git a/testcases/kernel/io/disktest/timer.c b/testcases/kernel/io/disktest/timer.c
index 7b63243..45ae09f 100644
--- a/testcases/kernel/io/disktest/timer.c
+++ b/testcases/kernel/io/disktest/timer.c
@@ -64,13 +64,13 @@
  * or if a timed run, the run time is exceeded.
  */
 #ifdef WINDOWS
-DWORD WINAPI ChildTimer(test_ll_t *test)
+DWORD WINAPI ChildTimer(test_ll_t * test)
 #else
 void *ChildTimer(void *vtest)
 #endif
 {
 #ifndef WINDOWS
-	test_ll_t *test = (test_ll_t *)vtest;
+	test_ll_t *test = (test_ll_t *) vtest;
 #endif
 	time_t ioTimeoutCount = 0;
 	time_t total_time = 0;
@@ -95,10 +95,12 @@
 		Sleep(1000);
 		run_time++;
 #ifdef _DEBUG
-		PDBG3(DBUG, args, "Continue timing %lu, %lu, %d\n", time(NULL), run_time, env->bContinue);
+		PDBG3(DBUG, args, "Continue timing %lu, %lu, %d\n", time(NULL),
+		      run_time, env->bContinue);
 #endif
 		if (args->flags & CLD_FLG_W) {
-			if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD)) {
+			if ((args->flags & CLD_FLG_LINEAR)
+			    && !(args->flags & CLD_FLG_NTRLVD)) {
 				if (TST_OPER(args->test_state) == WRITER) {
 					env->hbeat_stats.wtime++;
 				}
@@ -107,7 +109,8 @@
 			}
 		}
 		if (args->flags & CLD_FLG_R) {
-			if ((args->flags & CLD_FLG_LINEAR) && !(args->flags & CLD_FLG_NTRLVD)) {
+			if ((args->flags & CLD_FLG_LINEAR)
+			    && !(args->flags & CLD_FLG_NTRLVD)) {
 				if (TST_OPER(args->test_state) == READER) {
 					env->hbeat_stats.rtime++;
 				}
@@ -120,12 +123,11 @@
 		 * Check to see if we have made any IO progress in the last interval,
 		 * if not incremment the ioTimeout timer, otherwise, clear it
 		 */
-		cur_total_io_count = env->global_stats.wcount	\
-						+ env->cycle_stats.wcount		\
-						+ env->hbeat_stats.wcount		\
-						+ env->global_stats.rcount		\
-						+ env->cycle_stats.rcount		\
-						+ env->hbeat_stats.rcount;
+		cur_total_io_count = env->global_stats.wcount
+		    + env->cycle_stats.wcount
+		    + env->hbeat_stats.wcount
+		    + env->global_stats.rcount
+		    + env->cycle_stats.rcount + env->hbeat_stats.rcount;
 
 		if (cur_total_io_count == 0) {
 			tmp_io_count = 1;
@@ -133,28 +135,32 @@
 			tmp_io_count = cur_total_io_count;
 		}
 
-		total_time = env->global_stats.rtime	\
-					+ env->cycle_stats.rtime	\
-					+ env->hbeat_stats.rtime	\
-					+ env->global_stats.wtime	\
-					+ env->cycle_stats.wtime	\
-					+ env->hbeat_stats.wtime;
+		total_time = env->global_stats.rtime
+		    + env->cycle_stats.rtime
+		    + env->hbeat_stats.rtime
+		    + env->global_stats.wtime
+		    + env->cycle_stats.wtime + env->hbeat_stats.wtime;
 
 #ifdef _DEBUG
-		PDBG3(DBUG, args, "average number of seconds per IO: %0.8lf\n", ((double)(total_time)/(double)(tmp_io_count)));
+		PDBG3(DBUG, args, "average number of seconds per IO: %0.8lf\n",
+		      ((double)(total_time) / (double)(tmp_io_count)));
 #endif
 
-		if (cur_total_io_count == last_total_io_count) { /* no IOs completed in interval */
+		if (cur_total_io_count == last_total_io_count) {	/* no IOs completed in interval */
 			if (0 == (++ioTimeoutCount % args->ioTimeout)) {	/* no progress after modulo ioTimeout interval */
 				if (args->flags & CLD_FLG_TMO_ERROR) {
-					args->test_state = SET_STS_FAIL(args->test_state);
+					args->test_state =
+					    SET_STS_FAIL(args->test_state);
 					env->bContinue = FALSE;
 					msg_level = ERR;
 				}
-				pMsg(msg_level, args, "Possible IO hang condition, IO timeout reached, %lu seconds\n", args->ioTimeout);
+				pMsg(msg_level, args,
+				     "Possible IO hang condition, IO timeout reached, %lu seconds\n",
+				     args->ioTimeout);
 			}
 #ifdef _DEBUG
-			PDBG3(DBUG, args, "io timeout count: %lu\n", ioTimeoutCount);
+			PDBG3(DBUG, args, "io timeout count: %lu\n",
+			      ioTimeoutCount);
 #endif
 		} else {
 			ioTimeoutCount = 0;
@@ -164,37 +170,44 @@
 #endif
 		}
 
-		if (((args->hbeat > 0) && ((run_time % args->hbeat) == 0)) || (signal_action & SIGNAL_STAT)) {
+		if (((args->hbeat > 0) && ((run_time % args->hbeat) == 0))
+		    || (signal_action & SIGNAL_STAT)) {
 			print_stats(args, env, HBEAT);
 			update_cyc_stats(env);
 			clear_stat_signal();
 		}
 
-		if (glb_run == 0) { break; }					/* global run flag cleared */
-		if (signal_action & SIGNAL_STOP) { break; }	/* user request to stop */
-
-		if (args->flags & CLD_FLG_TMD) {			/* if timing */
+		if (glb_run == 0) {
+			break;
+		}		/* global run flag cleared */
+		if (signal_action & SIGNAL_STOP) {
+			break;
+		}
+		/* user request to stop */
+		if (args->flags & CLD_FLG_TMD) {	/* if timing */
 			if (run_time >= args->run_time) {	/* and run time exceeded */
 				break;
 			}
-		} else {					/* if not timing */
+		} else {	/* if not timing */
 			if (env->kids <= 1) {	/* and the timer is the only child */
 				break;
 			}
 		}
 	} while (TRUE);
 #ifdef _DEBUG
-	PDBG3(DBUG, args, "Out of timer %lu, %lu, %d, %d\n", time(NULL), run_time, env->bContinue, env->kids);
+	PDBG3(DBUG, args, "Out of timer %lu, %lu, %d, %d\n", time(NULL),
+	      run_time, env->bContinue, env->kids);
 #endif
 
-	if (args->flags & CLD_FLG_TMD) { /* timed test, timer exit needs to stop io threads */
+	if (args->flags & CLD_FLG_TMD) {	/* timed test, timer exit needs to stop io threads */
 #ifdef _DEBUG
-		PDBG3(DBUG, args, "Setting bContinue to FALSE, timed test & timer exit\n");
+		PDBG3(DBUG, args,
+		      "Setting bContinue to FALSE, timed test & timer exit\n");
 #endif
 		env->bContinue = FALSE;
 	}
 
-	TEXIT((uintptr_t)GETLASTERROR());
+	TEXIT((uintptr_t) GETLASTERROR());
 }
 
 #ifdef _DEBUG
@@ -202,30 +215,37 @@
 DWORD startTime;
 DWORD endTime;
 
-void setStartTime(void) {
+void setStartTime(void)
+{
 	startTime = GetTickCount();
 }
 
-void setEndTime(void) {
+void setEndTime(void)
+{
 	endTime = GetTickCount();
 }
 
-unsigned long getTimeDiff(void) {
-	return((endTime - startTime) * 1000); /* since we report in usecs, and windows is msec, multiply by 1000 */
+unsigned long getTimeDiff(void)
+{
+	return ((endTime - startTime) * 1000);	/* since we report in usecs, and windows is msec, multiply by 1000 */
 }
 #else
-struct timeval tv_start; struct timeval tv_end;
+struct timeval tv_start;
+struct timeval tv_end;
 
-void setStartTime(void) {
+void setStartTime(void)
+{
 	gettimeofday(&tv_start, NULL);
 }
 
-void setEndTime(void) {
+void setEndTime(void)
+{
 	gettimeofday(&tv_end, NULL);
 }
 
-unsigned long getTimeDiff(void) {
-	return(tv_end.tv_usec - tv_start.tv_usec);
+unsigned long getTimeDiff(void)
+{
+	return (tv_end.tv_usec - tv_start.tv_usec);
 }
 
 #endif
diff --git a/testcases/kernel/io/disktest/usage.c b/testcases/kernel/io/disktest/usage.c
index dd1914e..b071db1 100644
--- a/testcases/kernel/io/disktest/usage.c
+++ b/testcases/kernel/io/disktest/usage.c
@@ -37,13 +37,16 @@
 	printf("\t-A action\tSpecifies modified actions during runtime.\n");
 	printf("\t-B lblk[:hblk]\tSet the block transfer size.\n");
 	printf("\t-c\t\tUse a counting sequence as the data pattern.\n");
-	printf("\t-C cycles\tRun until cycles disk access cycles are complete.\n");
+	printf
+	    ("\t-C cycles\tRun until cycles disk access cycles are complete.\n");
 	printf("\t-d\t\tDump data to standard out and exit.\n");
 	printf("\t-D r%%:w%%\tDuty cycle used while reading and/or writing.\n");
-	printf("\t-E cmp_len\tTurn on error checking comparing <cmp_len> bytes.\n");
+	printf
+	    ("\t-E cmp_len\tTurn on error checking comparing <cmp_len> bytes.\n");
 	printf("\t-f byte\t\tUse a fixed data pattern up to 8 bytes.\n");
 	printf("\t-F \t\tfilespec is a file describing a list of targets\n");
-	printf("\t-h hbeat\tDisplays performance statistic every <hbeat> seconds.\n");
+	printf
+	    ("\t-h hbeat\tDisplays performance statistic every <hbeat> seconds.\n");
 	printf("\t-I IO_type\tSet the data transfer type to IO_type.\n");
 	printf("\t-K threads\tSet the number of test threads.\n");
 	printf("\t-L seeks\tTotal number of seeks to occur.\n");
@@ -57,7 +60,8 @@
 	printf("\t-q\t\tSuppress INFO level messages.\n");
 	printf("\t-Q\t\tSuppress header information on messages.\n");
 	printf("\t-r\t\tRead data from disk.\n");
-	printf("\t-R rty[:dly]\tNumber of retries / retry delay after failure.\n");
+	printf
+	    ("\t-R rty[:dly]\tNumber of retries / retry delay after failure.\n");
 	printf("\t-s sLBA[:eLBA]\tSet the start [and stop] test LBA.\n");
 	printf("\t-S sblk[:eblk]\tSet the start [and stop] test block.\n");
 	printf("\t-t dMin[:dMax][:ioTMO] set IO timing /timeout operations.\n");
diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c b/testcases/kernel/io/ltp-aiodio/aio-stress.c
index 66f66e6..710ef3d 100644
--- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
+++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
@@ -68,11 +68,11 @@
 #define RUN_FOREVER -1
 
 enum {
-    WRITE,
-    READ,
-    RWRITE,
-    RREAD,
-    LAST_STAGE,
+	WRITE,
+	READ,
+	RWRITE,
+	RREAD,
+	LAST_STAGE,
 };
 
 #define USE_MALLOC 0
@@ -125,129 +125,130 @@
  */
 #define DEVIATIONS 6
 int deviations[DEVIATIONS] = { 100, 250, 500, 1000, 5000, 10000 };
+
 struct io_latency {
-    double max;
-    double min;
-    double total_io;
-    double total_lat;
-    double deviations[DEVIATIONS];
+	double max;
+	double min;
+	double total_io;
+	double total_lat;
+	double deviations[DEVIATIONS];
 };
 
 /* container for a series of operations to a file */
 struct io_oper {
-    /* already open file descriptor, valid for whatever operation you want */
-    int fd;
+	/* already open file descriptor, valid for whatever operation you want */
+	int fd;
 
-    /* starting byte of the operation */
-    off_t start;
+	/* starting byte of the operation */
+	off_t start;
 
-    /* ending byte of the operation */
-    off_t end;
+	/* ending byte of the operation */
+	off_t end;
 
-    /* size of the read/write buffer */
-    int reclen;
+	/* size of the read/write buffer */
+	int reclen;
 
-    /* max number of pending requests before a wait is triggered */
-    int depth;
+	/* max number of pending requests before a wait is triggered */
+	int depth;
 
-    /* current number of pending requests */
-    int num_pending;
+	/* current number of pending requests */
+	int num_pending;
 
-    /* last error, zero if there were none */
-    int last_err;
+	/* last error, zero if there were none */
+	int last_err;
 
-    /* total number of errors hit. */
-    int num_err;
+	/* total number of errors hit. */
+	int num_err;
 
-    /* read,write, random, etc */
-    int rw;
+	/* read,write, random, etc */
+	int rw;
 
-    /* number of I/O that will get sent to aio */
-    int total_ios;
+	/* number of I/O that will get sent to aio */
+	int total_ios;
 
-    /* number of I/O we've already sent */
-    int started_ios;
+	/* number of I/O we've already sent */
+	int started_ios;
 
-    /* last offset used in an io operation */
-    off_t last_offset;
+	/* last offset used in an io operation */
+	off_t last_offset;
 
-    /* stonewalled = 1 when we got cut off before submitting all our I/O */
-    int stonewalled;
+	/* stonewalled = 1 when we got cut off before submitting all our I/O */
+	int stonewalled;
 
-    /* list management */
-    struct io_oper *next;
-    struct io_oper *prev;
+	/* list management */
+	struct io_oper *next;
+	struct io_oper *prev;
 
-    struct timeval start_time;
+	struct timeval start_time;
 
-    char *file_name;
+	char *file_name;
 };
 
 /* a single io, and all the tracking needed for it */
 struct io_unit {
-    /* note, iocb must go first! */
-    struct iocb iocb;
+	/* note, iocb must go first! */
+	struct iocb iocb;
 
-    /* pointer to parent io operation struct */
-    struct io_oper *io_oper;
+	/* pointer to parent io operation struct */
+	struct io_oper *io_oper;
 
-    /* aligned buffer */
-    char *buf;
+	/* aligned buffer */
+	char *buf;
 
-    /* size of the aligned buffer (record size) */
-    int buf_size;
+	/* size of the aligned buffer (record size) */
+	int buf_size;
 
-    /* state of this io unit (free, pending, done) */
-    int busy;
+	/* state of this io unit (free, pending, done) */
+	int busy;
 
-    /* result of last operation */
-    long res;
+	/* result of last operation */
+	long res;
 
-    struct io_unit *next;
+	struct io_unit *next;
 
-    struct timeval io_start_time;		/* time of io_submit */
+	struct timeval io_start_time;	/* time of io_submit */
 };
 
 struct thread_info {
-    io_context_t io_ctx;
-    pthread_t tid;
+	io_context_t io_ctx;
+	pthread_t tid;
 
-    /* allocated array of io_unit structs */
-    struct io_unit *ios;
+	/* allocated array of io_unit structs */
+	struct io_unit *ios;
 
-    /* list of io units available for io */
-    struct io_unit *free_ious;
+	/* list of io units available for io */
+	struct io_unit *free_ious;
 
-    /* number of io units in the I/O array */
-    int num_global_ios;
+	/* number of io units in the I/O array */
+	int num_global_ios;
 
-    /* number of io units in flight */
-    int num_global_pending;
+	/* number of io units in flight */
+	int num_global_pending;
 
-    /* preallocated array of iocb pointers, only used in run_active */
-    struct iocb **iocbs;
+	/* preallocated array of iocb pointers, only used in run_active */
+	struct iocb **iocbs;
 
-    /* preallocated array of events */
-    struct io_event *events;
+	/* preallocated array of events */
+	struct io_event *events;
 
-    /* size of the events array */
-    int num_global_events;
+	/* size of the events array */
+	int num_global_events;
 
-    /* latency stats for io_submit */
-    struct io_latency io_submit_latency;
+	/* latency stats for io_submit */
+	struct io_latency io_submit_latency;
 
-    /* list of operations still in progress, and of those finished */
-    struct io_oper *active_opers;
-    struct io_oper *finished_opers;
+	/* list of operations still in progress, and of those finished */
+	struct io_oper *active_opers;
+	struct io_oper *finished_opers;
 
-    /* number of files this thread is doing io on */
-    int num_files;
+	/* number of files this thread is doing io on */
+	int num_files;
 
-    /* how much io this thread did in the last stage */
-    double stage_mb_trans;
+	/* how much io this thread did in the last stage */
+	double stage_mb_trans;
 
-    /* latency completion stats i/o time from io_submit until io_getevents */
-    struct io_latency io_completion_latency;
+	/* latency completion stats i/o time from io_submit until io_getevents */
+	struct io_latency io_completion_latency;
 };
 
 /*
@@ -255,18 +256,18 @@
  */
 static double time_since(struct timeval *start_tv, struct timeval *stop_tv)
 {
-    double sec, usec;
-    double ret;
-    sec = stop_tv->tv_sec - start_tv->tv_sec;
-    usec = stop_tv->tv_usec - start_tv->tv_usec;
-    if (sec > 0 && usec < 0) {
-        sec--;
-	usec += 1000000;
-    }
-    ret = sec + usec / (double)1000000;
-    if (ret < 0)
-        ret = 0;
-    return ret;
+	double sec, usec;
+	double ret;
+	sec = stop_tv->tv_sec - start_tv->tv_sec;
+	usec = stop_tv->tv_usec - start_tv->tv_usec;
+	if (sec > 0 && usec < 0) {
+		sec--;
+		usec += 1000000;
+	}
+	ret = sec + usec / (double)1000000;
+	if (ret < 0)
+		ret = 0;
+	return ret;
 }
 
 /*
@@ -274,171 +275,182 @@
  */
 static double time_since_now(struct timeval *start_tv)
 {
-    struct timeval stop_time;
-    gettimeofday(&stop_time, NULL);
-    return time_since(start_tv, &stop_time);
+	struct timeval stop_time;
+	gettimeofday(&stop_time, NULL);
+	return time_since(start_tv, &stop_time);
 }
 
 /*
  * Add latency info to latency struct
  */
 static void calc_latency(struct timeval *start_tv, struct timeval *stop_tv,
-			struct io_latency *lat)
+			 struct io_latency *lat)
 {
-    double delta;
-    int i;
-    delta = time_since(start_tv, stop_tv);
-    delta = delta * 1000;
+	double delta;
+	int i;
+	delta = time_since(start_tv, stop_tv);
+	delta = delta * 1000;
 
-    if (delta > lat->max)
-    	lat->max = delta;
-    if (!lat->min || delta < lat->min)
-    	lat->min = delta;
-    lat->total_io++;
-    lat->total_lat += delta;
-    for (i = 0 ; i < DEVIATIONS ; i++) {
-        if (delta < deviations[i]) {
-	    lat->deviations[i]++;
-	    break;
+	if (delta > lat->max)
+		lat->max = delta;
+	if (!lat->min || delta < lat->min)
+		lat->min = delta;
+	lat->total_io++;
+	lat->total_lat += delta;
+	for (i = 0; i < DEVIATIONS; i++) {
+		if (delta < deviations[i]) {
+			lat->deviations[i]++;
+			break;
+		}
 	}
-    }
 }
 
 static void oper_list_add(struct io_oper *oper, struct io_oper **list)
 {
-    if (!*list) {
-        *list = oper;
-	oper->prev = oper->next = oper;
+	if (!*list) {
+		*list = oper;
+		oper->prev = oper->next = oper;
+		return;
+	}
+	oper->prev = (*list)->prev;
+	oper->next = *list;
+	(*list)->prev->next = oper;
+	(*list)->prev = oper;
 	return;
-    }
-    oper->prev = (*list)->prev;
-    oper->next = *list;
-    (*list)->prev->next = oper;
-    (*list)->prev = oper;
-    return;
 }
 
 static void oper_list_del(struct io_oper *oper, struct io_oper **list)
 {
-    if ((*list)->next == (*list)->prev && *list == (*list)->next) {
-        *list = NULL;
-	return;
-    }
-    oper->prev->next = oper->next;
-    oper->next->prev = oper->prev;
-    if (*list == oper)
-        *list = oper->next;
+	if ((*list)->next == (*list)->prev && *list == (*list)->next) {
+		*list = NULL;
+		return;
+	}
+	oper->prev->next = oper->next;
+	oper->next->prev = oper->prev;
+	if (*list == oper)
+		*list = oper->next;
 }
 
 /* worker func to check error fields in the io unit */
-static int check_finished_io(struct io_unit *io) {
-    int i;
-    if (io->res != io->buf_size) {
+static int check_finished_io(struct io_unit *io)
+{
+	int i;
+	if (io->res != io->buf_size) {
 
-  		 struct stat s;
-  		 fstat(io->io_oper->fd, &s);
+		struct stat s;
+		fstat(io->io_oper->fd, &s);
 
-  		 /*
-  		  * If file size is large enough for the read, then this short
-  		  * read is an error.
-  		  */
-  		 if ((io->io_oper->rw == READ || io->io_oper->rw == RREAD) &&
-  		     s.st_size > (io->iocb.u.c.offset + io->res)) {
+		/*
+		 * If file size is large enough for the read, then this short
+		 * read is an error.
+		 */
+		if ((io->io_oper->rw == READ || io->io_oper->rw == RREAD) &&
+		    s.st_size > (io->iocb.u.c.offset + io->res)) {
 
-  		 		 fprintf(stderr, "io err %lu (%s) op %d, off %Lu size %d\n",
-  		 		 		 io->res, strerror(-io->res), io->iocb.aio_lio_opcode,
-  		 		 		 io->iocb.u.c.offset, io->buf_size);
-  		 		 io->io_oper->last_err = io->res;
-  		 		 io->io_oper->num_err++;
-  		 		 return -1;
-  		 }
-    }
-    if (verify && io->io_oper->rw == READ) {
-        if (memcmp(io->buf, verify_buf, io->io_oper->reclen)) {
-	    fprintf(stderr, "verify error, file %s offset %Lu contents (offset:bad:good):\n",
-	            io->io_oper->file_name, io->iocb.u.c.offset);
-
-	    for (i = 0 ; i < io->io_oper->reclen ; i++) {
-	        if (io->buf[i] != verify_buf[i]) {
-		    fprintf(stderr, "%d:%c:%c ", i, io->buf[i], verify_buf[i]);
+			fprintf(stderr,
+				"io err %lu (%s) op %d, off %Lu size %d\n",
+				io->res, strerror(-io->res),
+				io->iocb.aio_lio_opcode, io->iocb.u.c.offset,
+				io->buf_size);
+			io->io_oper->last_err = io->res;
+			io->io_oper->num_err++;
+			return -1;
 		}
-	    }
-	    fprintf(stderr, "\n");
 	}
+	if (verify && io->io_oper->rw == READ) {
+		if (memcmp(io->buf, verify_buf, io->io_oper->reclen)) {
+			fprintf(stderr,
+				"verify error, file %s offset %Lu contents (offset:bad:good):\n",
+				io->io_oper->file_name, io->iocb.u.c.offset);
 
-    }
-  return 0;
+			for (i = 0; i < io->io_oper->reclen; i++) {
+				if (io->buf[i] != verify_buf[i]) {
+					fprintf(stderr, "%d:%c:%c ", i,
+						io->buf[i], verify_buf[i]);
+				}
+			}
+			fprintf(stderr, "\n");
+		}
+
+	}
+	return 0;
 }
 
 /* worker func to check the busy bits and get an io unit ready for use */
-static int grab_iou(struct io_unit *io, struct io_oper *oper) {
-    if (io->busy == IO_PENDING)
-        return -1;
+static int grab_iou(struct io_unit *io, struct io_oper *oper)
+{
+	if (io->busy == IO_PENDING)
+		return -1;
 
-    io->busy = IO_PENDING;
-    io->res = 0;
-    io->io_oper = oper;
-  return 0;
+	io->busy = IO_PENDING;
+	io->res = 0;
+	io->io_oper = oper;
+	return 0;
 }
 
-char *stage_name(int rw) {
-    switch(rw) {
-    case WRITE:
-        return "write";
-    case READ:
-        return "read";
-    case RWRITE:
-        return "random write";
-    case RREAD:
-        return "random read";
-    }
-    return "unknown";
+char *stage_name(int rw)
+{
+	switch (rw) {
+	case WRITE:
+		return "write";
+	case READ:
+		return "read";
+	case RWRITE:
+		return "random write";
+	case RREAD:
+		return "random read";
+	}
+	return "unknown";
 }
 
-static inline double oper_mb_trans(struct io_oper *oper) {
-    return ((double)oper->started_ios * (double)oper->reclen) /
-                (double)(1024 * 1024);
+static inline double oper_mb_trans(struct io_oper *oper)
+{
+	return ((double)oper->started_ios * (double)oper->reclen) /
+	    (double)(1024 * 1024);
 }
 
-static void print_time(struct io_oper *oper) {
-    double runtime;
-    double tput;
-    double mb;
+static void print_time(struct io_oper *oper)
+{
+	double runtime;
+	double tput;
+	double mb;
 
-    runtime = time_since_now(&oper->start_time);
-    mb = oper_mb_trans(oper);
-    tput = mb / runtime;
-    fprintf(stderr, "%s on %s (%.2f MB/s) %.2f MB in %.2fs\n",
-	    stage_name(oper->rw), oper->file_name, tput, mb, runtime);
+	runtime = time_since_now(&oper->start_time);
+	mb = oper_mb_trans(oper);
+	tput = mb / runtime;
+	fprintf(stderr, "%s on %s (%.2f MB/s) %.2f MB in %.2fs\n",
+		stage_name(oper->rw), oper->file_name, tput, mb, runtime);
 }
 
-static void print_lat(char *str, struct io_latency *lat) {
-    double avg = lat->total_lat / lat->total_io;
-    int i;
-    double total_counted = 0;
-    fprintf(stderr, "%s min %.2f avg %.2f max %.2f\n\t",
-            str, lat->min, avg, lat->max);
+static void print_lat(char *str, struct io_latency *lat)
+{
+	double avg = lat->total_lat / lat->total_io;
+	int i;
+	double total_counted = 0;
+	fprintf(stderr, "%s min %.2f avg %.2f max %.2f\n\t",
+		str, lat->min, avg, lat->max);
 
-    for (i = 0 ; i < DEVIATIONS ; i++) {
-	fprintf(stderr, " %.0f < %d", lat->deviations[i], deviations[i]);
-	total_counted += lat->deviations[i];
-    }
-    if (total_counted && lat->total_io - total_counted)
-        fprintf(stderr, " < %.0f", lat->total_io - total_counted);
-    fprintf(stderr, "\n");
-    memset(lat, 0, sizeof(*lat));
+	for (i = 0; i < DEVIATIONS; i++) {
+		fprintf(stderr, " %.0f < %d", lat->deviations[i],
+			deviations[i]);
+		total_counted += lat->deviations[i];
+	}
+	if (total_counted && lat->total_io - total_counted)
+		fprintf(stderr, " < %.0f", lat->total_io - total_counted);
+	fprintf(stderr, "\n");
+	memset(lat, 0, sizeof(*lat));
 }
 
 static void print_latency(struct thread_info *t)
 {
-    struct io_latency *lat = &t->io_submit_latency;
-    print_lat("latency", lat);
+	struct io_latency *lat = &t->io_submit_latency;
+	print_lat("latency", lat);
 }
 
 static void print_completion_latency(struct thread_info *t)
 {
-    struct io_latency *lat = &t->io_completion_latency;
-    print_lat("completion latency", lat);
+	struct io_latency *lat = &t->io_completion_latency;
+	print_lat("completion latency", lat);
 }
 
 /*
@@ -446,50 +458,52 @@
  * io unit, and make the io unit reusable again
  */
 void finish_io(struct thread_info *t, struct io_unit *io, long result,
-		struct timeval *tv_now) {
-    struct io_oper *oper = io->io_oper;
+	       struct timeval *tv_now)
+{
+	struct io_oper *oper = io->io_oper;
 
-    calc_latency(&io->io_start_time, tv_now, &t->io_completion_latency);
-    io->res = result;
-    io->busy = IO_FREE;
-    io->next = t->free_ious;
-    t->free_ious = io;
-    oper->num_pending--;
-    t->num_global_pending--;
-    check_finished_io(io);
-    if (oper->num_pending == 0 &&
-       (oper->started_ios == oper->total_ios || oper->stonewalled))
-    {
-        print_time(oper);
-    }
+	calc_latency(&io->io_start_time, tv_now, &t->io_completion_latency);
+	io->res = result;
+	io->busy = IO_FREE;
+	io->next = t->free_ious;
+	t->free_ious = io;
+	oper->num_pending--;
+	t->num_global_pending--;
+	check_finished_io(io);
+	if (oper->num_pending == 0 &&
+	    (oper->started_ios == oper->total_ios || oper->stonewalled)) {
+		print_time(oper);
+	}
 }
 
-int read_some_events(struct thread_info *t) {
-    struct io_unit *event_io;
-    struct io_event *event;
-    int nr;
-    int i;
-    int min_nr = io_iter;
-    struct timeval stop_time;
+int read_some_events(struct thread_info *t)
+{
+	struct io_unit *event_io;
+	struct io_event *event;
+	int nr;
+	int i;
+	int min_nr = io_iter;
+	struct timeval stop_time;
 
-    if (t->num_global_pending < io_iter)
-        min_nr = t->num_global_pending;
+	if (t->num_global_pending < io_iter)
+		min_nr = t->num_global_pending;
 
 #ifdef NEW_GETEVENTS
-    nr = io_getevents(t->io_ctx, min_nr, t->num_global_events, t->events,NULL);
+	nr = io_getevents(t->io_ctx, min_nr, t->num_global_events, t->events,
+			  NULL);
 #else
-    nr = io_getevents(t->io_ctx, t->num_global_events, t->events, NULL);
+	nr = io_getevents(t->io_ctx, t->num_global_events, t->events, NULL);
 #endif
-    if (nr <= 0)
-        return nr;
+	if (nr <= 0)
+		return nr;
 
-    gettimeofday(&stop_time, NULL);
-    for (i = 0 ; i < nr ; i++) {
-	event = t->events + i;
-	event_io = (struct io_unit *)((unsigned long)event->obj);
-	finish_io(t, event_io, event->res, &stop_time);
-    }
-    return nr;
+	gettimeofday(&stop_time, NULL);
+	for (i = 0; i < nr; i++) {
+		event = t->events + i;
+		event_io = (struct io_unit *)((unsigned long)event->obj);
+		finish_io(t, event_io, event->res, &stop_time);
+	}
+	return nr;
 }
 
 /*
@@ -498,95 +512,97 @@
  */
 static struct io_unit *find_iou(struct thread_info *t, struct io_oper *oper)
 {
-    struct io_unit *event_io;
-    int nr;
+	struct io_unit *event_io;
+	int nr;
 
 retry:
-    if (t->free_ious) {
-        event_io = t->free_ious;
-	t->free_ious = t->free_ious->next;
-	if (grab_iou(event_io, oper)) {
-	    fprintf(stderr, "io unit on free list but not free\n");
-	    abort();
+	if (t->free_ious) {
+		event_io = t->free_ious;
+		t->free_ious = t->free_ious->next;
+		if (grab_iou(event_io, oper)) {
+			fprintf(stderr, "io unit on free list but not free\n");
+			abort();
+		}
+		return event_io;
 	}
-	return event_io;
-    }
-    nr = read_some_events(t);
-    if (nr > 0)
-    	goto retry;
-    else
-    	fprintf(stderr, "no free ious after read_some_events\n");
-    return NULL;
+	nr = read_some_events(t);
+	if (nr > 0)
+		goto retry;
+	else
+		fprintf(stderr, "no free ious after read_some_events\n");
+	return NULL;
 }
 
 /*
  * wait for all pending requests for this io operation to finish
  */
-static int io_oper_wait(struct thread_info *t, struct io_oper *oper) {
-    struct io_event event;
-    struct io_unit *event_io;
+static int io_oper_wait(struct thread_info *t, struct io_oper *oper)
+{
+	struct io_event event;
+	struct io_unit *event_io;
 
-    if (oper == NULL) {
-      return 0;
-    }
-
-    if (oper->num_pending == 0)
-        goto done;
-
-    /* this func is not speed sensitive, no need to go wild reading
-     * more than one event at a time
-     */
-#ifdef NEW_GETEVENTS
-    while (io_getevents(t->io_ctx, 1, 1, &event, NULL) > 0) {
-#else
-    while (io_getevents(t->io_ctx, 1, &event, NULL) > 0) {
-#endif
-	struct timeval tv_now;
-        event_io = (struct io_unit *)((unsigned long)event.obj);
-
-	gettimeofday(&tv_now, NULL);
-	finish_io(t, event_io, event.res, &tv_now);
+	if (oper == NULL) {
+		return 0;
+	}
 
 	if (oper->num_pending == 0)
-	    break;
-    }
+		goto done;
+
+	/* this func is not speed sensitive, no need to go wild reading
+	 * more than one event at a time
+	 */
+#ifdef NEW_GETEVENTS
+	while (io_getevents(t->io_ctx, 1, 1, &event, NULL) > 0) {
+#else
+	while (io_getevents(t->io_ctx, 1, &event, NULL) > 0) {
+#endif
+		struct timeval tv_now;
+		event_io = (struct io_unit *)((unsigned long)event.obj);
+
+		gettimeofday(&tv_now, NULL);
+		finish_io(t, event_io, event.res, &tv_now);
+
+		if (oper->num_pending == 0)
+			break;
+	}
 done:
-    if (oper->num_err) {
-        fprintf(stderr, "%u errors on oper, last %u\n",
-	        oper->num_err, oper->last_err);
-    }
-  return 0;
+	if (oper->num_err) {
+		fprintf(stderr, "%u errors on oper, last %u\n",
+			oper->num_err, oper->last_err);
+	}
+	return 0;
 }
 
-off_t random_byte_offset(struct io_oper *oper) {
-    off_t num;
-    off_t rand_byte = oper->start;
-    off_t range;
-    off_t offset = 1;
+off_t random_byte_offset(struct io_oper * oper)
+{
+	off_t num;
+	off_t rand_byte = oper->start;
+	off_t range;
+	off_t offset = 1;
 
-    range = (oper->end - oper->start) / (1024 * 1024);
-    if ((page_size_mask+1) > (1024 * 1024))
-        offset = (page_size_mask+1) / (1024 * 1024);
-    if (range < offset)
-        range = 0;
-    else
-        range -= offset;
+	range = (oper->end - oper->start) / (1024 * 1024);
+	if ((page_size_mask + 1) > (1024 * 1024))
+		offset = (page_size_mask + 1) / (1024 * 1024);
+	if (range < offset)
+		range = 0;
+	else
+		range -= offset;
 
-    /* find a random mb offset */
-    num = 1 + (int)((double)range * rand() / (RAND_MAX + 1.0 ));
-    rand_byte += num * 1024 * 1024;
+	/* find a random mb offset */
+	num = 1 + (int)((double)range * rand() / (RAND_MAX + 1.0));
+	rand_byte += num * 1024 * 1024;
 
-    /* find a random byte offset */
-    num = 1 + (int)((double)(1024 * 1024) * rand() / (RAND_MAX + 1.0));
+	/* find a random byte offset */
+	num = 1 + (int)((double)(1024 * 1024) * rand() / (RAND_MAX + 1.0));
 
-    /* page align */
-    num = (num + page_size_mask) & ~page_size_mask;
-    rand_byte += num;
+	/* page align */
+	num = (num + page_size_mask) & ~page_size_mask;
+	rand_byte += num;
 
-    if (rand_byte + oper->reclen > oper->end) {
-	rand_byte -= oper->reclen;
-    }
-    return rand_byte;
+	if (rand_byte + oper->reclen > oper->end) {
+		rand_byte -= oper->reclen;
+	}
+	return rand_byte;
 }
 
 /*
@@ -599,91 +615,90 @@
  */
 static struct io_unit *build_iocb(struct thread_info *t, struct io_oper *oper)
 {
-    struct io_unit *io;
-    off_t rand_byte;
+	struct io_unit *io;
+	off_t rand_byte;
 
-    io = find_iou(t, oper);
-    if (!io) {
-        fprintf(stderr, "unable to find io unit\n");
-	return NULL;
-    }
+	io = find_iou(t, oper);
+	if (!io) {
+		fprintf(stderr, "unable to find io unit\n");
+		return NULL;
+	}
 
-    switch(oper->rw) {
-    case WRITE:
-        io_prep_pwrite(&io->iocb,oper->fd, io->buf, oper->reclen,
-	               oper->last_offset);
-	oper->last_offset += oper->reclen;
-	break;
-    case READ:
-        io_prep_pread(&io->iocb,oper->fd, io->buf, oper->reclen,
-	              oper->last_offset);
-	oper->last_offset += oper->reclen;
-	break;
-    case RREAD:
-	rand_byte = random_byte_offset(oper);
-	oper->last_offset = rand_byte;
-        io_prep_pread(&io->iocb,oper->fd, io->buf, oper->reclen,
-	              rand_byte);
-        break;
-    case RWRITE:
-	rand_byte = random_byte_offset(oper);
-	oper->last_offset = rand_byte;
-        io_prep_pwrite(&io->iocb,oper->fd, io->buf, oper->reclen,
-	              rand_byte);
+	switch (oper->rw) {
+	case WRITE:
+		io_prep_pwrite(&io->iocb, oper->fd, io->buf, oper->reclen,
+			       oper->last_offset);
+		oper->last_offset += oper->reclen;
+		break;
+	case READ:
+		io_prep_pread(&io->iocb, oper->fd, io->buf, oper->reclen,
+			      oper->last_offset);
+		oper->last_offset += oper->reclen;
+		break;
+	case RREAD:
+		rand_byte = random_byte_offset(oper);
+		oper->last_offset = rand_byte;
+		io_prep_pread(&io->iocb, oper->fd, io->buf, oper->reclen,
+			      rand_byte);
+		break;
+	case RWRITE:
+		rand_byte = random_byte_offset(oper);
+		oper->last_offset = rand_byte;
+		io_prep_pwrite(&io->iocb, oper->fd, io->buf, oper->reclen,
+			       rand_byte);
 
-        break;
-    }
+		break;
+	}
 
-    return io;
+	return io;
 }
 
 /*
  * wait for any pending requests, and then free all ram associated with
  * an operation.  returns the last error the operation hit (zero means none)
  */
-static int
-finish_oper(struct thread_info *t, struct io_oper *oper)
+static int finish_oper(struct thread_info *t, struct io_oper *oper)
 {
-    unsigned long last_err;
+	unsigned long last_err;
 
-    io_oper_wait(t, oper);
-    last_err = oper->last_err;
-    if (oper->num_pending > 0) {
-        fprintf(stderr, "oper num_pending is %d\n", oper->num_pending);
-    }
-    close(oper->fd);
-    free(oper);
-    return last_err;
+	io_oper_wait(t, oper);
+	last_err = oper->last_err;
+	if (oper->num_pending > 0) {
+		fprintf(stderr, "oper num_pending is %d\n", oper->num_pending);
+	}
+	close(oper->fd);
+	free(oper);
+	return last_err;
 }
 
 /*
  * allocates an io operation and fills in all the fields.  returns
  * null on error
  */
-static struct io_oper *
-create_oper(int fd, int rw, off_t start, off_t end, int reclen, int depth,
-            int iter, char *file_name)
+static struct io_oper *create_oper(int fd, int rw, off_t start, off_t end,
+				   int reclen, int depth, int iter,
+				   char *file_name)
 {
-    struct io_oper *oper;
+	struct io_oper *oper;
 
-    oper = malloc (sizeof(*oper));
-    if (!oper) {
-	fprintf(stderr, "unable to allocate io oper\n");
-	return NULL;
-    }
-    memset(oper, 0, sizeof(*oper));
+	oper = malloc(sizeof(*oper));
+	if (!oper) {
+		fprintf(stderr, "unable to allocate io oper\n");
+		return NULL;
+	}
+	memset(oper, 0, sizeof(*oper));
 
-    oper->depth = depth;
-    oper->start = start;
-    oper->end = end;
-    oper->last_offset = oper->start;
-    oper->fd = fd;
-    oper->reclen = reclen;
-    oper->rw = rw;
-    oper->total_ios = (oper->end - oper->start) / oper->reclen;
-    oper->file_name = file_name;
+	oper->depth = depth;
+	oper->start = start;
+	oper->end = end;
+	oper->last_offset = oper->start;
+	oper->fd = fd;
+	oper->reclen = reclen;
+	oper->rw = rw;
+	oper->total_ios = (oper->end - oper->start) / oper->reclen;
+	oper->file_name = file_name;
 
-    return oper;
+	return oper;
 }
 
 /*
@@ -691,28 +706,28 @@
  * start any io
  */
 int build_oper(struct thread_info *t, struct io_oper *oper, int num_ios,
-               struct iocb **my_iocbs)
+	       struct iocb **my_iocbs)
 {
-    int i;
-    struct io_unit *io;
+	int i;
+	struct io_unit *io;
 
-    if (oper->started_ios == 0)
-	gettimeofday(&oper->start_time, NULL);
+	if (oper->started_ios == 0)
+		gettimeofday(&oper->start_time, NULL);
 
-    if (num_ios == 0)
-        num_ios = oper->total_ios;
+	if (num_ios == 0)
+		num_ios = oper->total_ios;
 
-    if ((oper->started_ios + num_ios) > oper->total_ios)
-        num_ios = oper->total_ios - oper->started_ios;
+	if ((oper->started_ios + num_ios) > oper->total_ios)
+		num_ios = oper->total_ios - oper->started_ios;
 
-    for (i = 0 ; i < num_ios ; i++) {
-	io = build_iocb(t, oper);
-	if (!io) {
-	    return -1;
+	for (i = 0; i < num_ios; i++) {
+		io = build_iocb(t, oper);
+		if (!io) {
+			return -1;
+		}
+		my_iocbs[i] = &io->iocb;
 	}
-	my_iocbs[i] = &io->iocb;
-    }
-    return num_ios;
+	return num_ios;
 }
 
 /*
@@ -720,122 +735,126 @@
  * counters in the associated oper struct
  */
 static void update_iou_counters(struct iocb **my_iocbs, int nr,
-	struct timeval *tv_now)
+				struct timeval *tv_now)
 {
-    struct io_unit *io;
-    int i;
-    for (i = 0 ; i < nr ; i++) {
-	io = (struct io_unit *)(my_iocbs[i]);
-	io->io_oper->num_pending++;
-	io->io_oper->started_ios++;
-	io->io_start_time = *tv_now;	/* set time of io_submit */
-    }
+	struct io_unit *io;
+	int i;
+	for (i = 0; i < nr; i++) {
+		io = (struct io_unit *)(my_iocbs[i]);
+		io->io_oper->num_pending++;
+		io->io_oper->started_ios++;
+		io->io_start_time = *tv_now;	/* set time of io_submit */
+	}
 }
 
 /* starts some io for a given file, returns zero if all went well */
 int run_built(struct thread_info *t, int num_ios, struct iocb **my_iocbs)
 {
-    int ret;
-    struct timeval start_time;
-    struct timeval stop_time;
+	int ret;
+	struct timeval start_time;
+	struct timeval stop_time;
 
 resubmit:
-    gettimeofday(&start_time, NULL);
-    ret = io_submit(t->io_ctx, num_ios, my_iocbs);
-    gettimeofday(&stop_time, NULL);
-    calc_latency(&start_time, &stop_time, &t->io_submit_latency);
+	gettimeofday(&start_time, NULL);
+	ret = io_submit(t->io_ctx, num_ios, my_iocbs);
+	gettimeofday(&stop_time, NULL);
+	calc_latency(&start_time, &stop_time, &t->io_submit_latency);
 
-    if (ret != num_ios) {
-	/* some I/O got through */
-	if (ret > 0) {
-	    update_iou_counters(my_iocbs, ret, &stop_time);
-	    my_iocbs += ret;
-	    t->num_global_pending += ret;
-	    num_ios -= ret;
-	}
-	/*
-	 * we've used all the requests allocated in aio_init, wait and
-	 * retry
-	 */
-	if (ret > 0 || ret == -EAGAIN) {
-	    int old_ret = ret;
-	    if ((ret = read_some_events(t) > 0)) {
-		goto resubmit;
-	    } else {
-	    	fprintf(stderr, "ret was %d and now is %d\n", ret, old_ret);
-		abort();
-	    }
-	}
+	if (ret != num_ios) {
+		/* some I/O got through */
+		if (ret > 0) {
+			update_iou_counters(my_iocbs, ret, &stop_time);
+			my_iocbs += ret;
+			t->num_global_pending += ret;
+			num_ios -= ret;
+		}
+		/*
+		 * we've used all the requests allocated in aio_init, wait and
+		 * retry
+		 */
+		if (ret > 0 || ret == -EAGAIN) {
+			int old_ret = ret;
+			if ((ret = read_some_events(t) > 0)) {
+				goto resubmit;
+			} else {
+				fprintf(stderr, "ret was %d and now is %d\n",
+					ret, old_ret);
+				abort();
+			}
+		}
 
-	fprintf(stderr, "ret %d (%s) on io_submit\n", ret, strerror(-ret));
-	return -1;
-    }
-    update_iou_counters(my_iocbs, ret, &stop_time);
-    t->num_global_pending += ret;
-  return 0;
+		fprintf(stderr, "ret %d (%s) on io_submit\n", ret,
+			strerror(-ret));
+		return -1;
+	}
+	update_iou_counters(my_iocbs, ret, &stop_time);
+	t->num_global_pending += ret;
+	return 0;
 }
 
 /*
  * changes oper->rw to the next in a command sequence, or returns zero
  * to say this operation is really, completely done for
  */
-static int restart_oper(struct io_oper *oper) {
-    int new_rw  = 0;
-    if (oper->last_err)
-      return 0;
+static int restart_oper(struct io_oper *oper)
+{
+	int new_rw = 0;
+	if (oper->last_err)
+		return 0;
 
-    /* this switch falls through */
-    switch(oper->rw) {
-    case WRITE:
-	if (stages & (1 << READ))
-	    new_rw = READ;
-    case READ:
-	if (!new_rw && stages & (1 << RWRITE))
-	    new_rw = RWRITE;
-    case RWRITE:
-	if (!new_rw && stages & (1 << RREAD))
-	    new_rw = RREAD;
-    }
+	/* this switch falls through */
+	switch (oper->rw) {
+	case WRITE:
+		if (stages & (1 << READ))
+			new_rw = READ;
+	case READ:
+		if (!new_rw && stages & (1 << RWRITE))
+			new_rw = RWRITE;
+	case RWRITE:
+		if (!new_rw && stages & (1 << RREAD))
+			new_rw = RREAD;
+	}
 
-    if (new_rw) {
-	oper->started_ios = 0;
-	oper->last_offset = oper->start;
-	oper->stonewalled = 0;
+	if (new_rw) {
+		oper->started_ios = 0;
+		oper->last_offset = oper->start;
+		oper->stonewalled = 0;
 
-	/*
-	 * we're restarting an operation with pending requests, so the
-	 * timing info won't be printed by finish_io.  Printing it here
-	 */
-	if (oper->num_pending)
-	    print_time(oper);
+		/*
+		 * we're restarting an operation with pending requests, so the
+		 * timing info won't be printed by finish_io.  Printing it here
+		 */
+		if (oper->num_pending)
+			print_time(oper);
 
-	oper->rw = new_rw;
-	return 1;
-    }
-  return 0;
+		oper->rw = new_rw;
+		return 1;
+	}
+	return 0;
 }
 
-static int oper_runnable(struct io_oper *oper) {
-    struct stat buf;
-    int ret;
+static int oper_runnable(struct io_oper *oper)
+{
+	struct stat buf;
+	int ret;
 
-    /* first context is always runnable, if started_ios > 0, no need to
-     * redo the calculations
-     */
-    if (oper->started_ios || oper->start == 0)
-        return 1;
-    /*
-     * only the sequential phases force delays in starting */
-    if (oper->rw >= RWRITE)
-        return 1;
-    ret = fstat(oper->fd, &buf);
-    if (ret < 0) {
-        perror("fstat");
-	exit(1);
-    }
-    if (S_ISREG(buf.st_mode) && buf.st_size < oper->start)
-      return 0;
-    return 1;
+	/* first context is always runnable, if started_ios > 0, no need to
+	 * redo the calculations
+	 */
+	if (oper->started_ios || oper->start == 0)
+		return 1;
+	/*
+	 * only the sequential phases force delays in starting */
+	if (oper->rw >= RWRITE)
+		return 1;
+	ret = fstat(oper->fd, &buf);
+	if (ret < 0) {
+		perror("fstat");
+		exit(1);
+	}
+	if (S_ISREG(buf.st_mode) && buf.st_size < oper->start)
+		return 0;
+	return 1;
 }
 
 /*
@@ -850,135 +869,135 @@
  * the finished_opers list.
  */
 static int run_active_list(struct thread_info *t,
-			 int io_iter,
-			 int max_io_submit)
+			   int io_iter, int max_io_submit)
 {
-    struct io_oper *oper;
-    struct io_oper *built_opers = NULL;
-    struct iocb **my_iocbs = t->iocbs;
-    int ret = 0;
-    int num_built = 0;
+	struct io_oper *oper;
+	struct io_oper *built_opers = NULL;
+	struct iocb **my_iocbs = t->iocbs;
+	int ret = 0;
+	int num_built = 0;
 
-    oper = t->active_opers;
-    while (oper) {
-	if (!oper_runnable(oper)) {
-	    oper = oper->next;
-	    if (oper == t->active_opers)
-	        break;
-	    continue;
+	oper = t->active_opers;
+	while (oper) {
+		if (!oper_runnable(oper)) {
+			oper = oper->next;
+			if (oper == t->active_opers)
+				break;
+			continue;
+		}
+		ret = build_oper(t, oper, io_iter, my_iocbs);
+		if (ret >= 0) {
+			my_iocbs += ret;
+			num_built += ret;
+			oper_list_del(oper, &t->active_opers);
+			oper_list_add(oper, &built_opers);
+			oper = t->active_opers;
+			if (num_built + io_iter > max_io_submit)
+				break;
+		} else
+			break;
 	}
-	ret = build_oper(t, oper, io_iter, my_iocbs);
-	if (ret >= 0) {
-	    my_iocbs += ret;
-	    num_built += ret;
-	    oper_list_del(oper, &t->active_opers);
-	    oper_list_add(oper, &built_opers);
-	    oper = t->active_opers;
-	    if (num_built + io_iter > max_io_submit)
-	        break;
-	} else
-	    break;
-    }
-    if (num_built) {
-	ret = run_built(t, num_built, t->iocbs);
-	if (ret < 0) {
-	    fprintf(stderr, "error %d on run_built\n", ret);
-	    exit(1);
+	if (num_built) {
+		ret = run_built(t, num_built, t->iocbs);
+		if (ret < 0) {
+			fprintf(stderr, "error %d on run_built\n", ret);
+			exit(1);
+		}
+		while (built_opers) {
+			oper = built_opers;
+			oper_list_del(oper, &built_opers);
+			oper_list_add(oper, &t->active_opers);
+			if (oper->started_ios == oper->total_ios) {
+				oper_list_del(oper, &t->active_opers);
+				oper_list_add(oper, &t->finished_opers);
+			}
+		}
 	}
-	while (built_opers) {
-	    oper = built_opers;
-	    oper_list_del(oper, &built_opers);
-	    oper_list_add(oper, &t->active_opers);
-	    if (oper->started_ios == oper->total_ios) {
-		oper_list_del(oper, &t->active_opers);
-		oper_list_add(oper, &t->finished_opers);
-	    }
-	}
-    }
-  return 0;
+	return 0;
 }
 
-void drop_shm() {
-    int ret;
-    struct shmid_ds ds;
-    if (use_shm != USE_SHM)
-        return;
+void drop_shm()
+{
+	int ret;
+	struct shmid_ds ds;
+	if (use_shm != USE_SHM)
+		return;
 
-    ret = shmctl(shm_id, IPC_RMID, &ds);
-    if (ret) {
-        perror("shmctl IPC_RMID");
-    }
+	ret = shmctl(shm_id, IPC_RMID, &ds);
+	if (ret) {
+		perror("shmctl IPC_RMID");
+	}
 }
 
-void aio_setup(io_context_t *io_ctx, int n)
+void aio_setup(io_context_t * io_ctx, int n)
 {
-    int res = io_queue_init(n, io_ctx);
-    if (res != 0) {
-	fprintf(stderr, "io_queue_setup(%d) returned %d (%s)\n",
-		n, res, strerror(-res));
-	exit(3);
-    }
+	int res = io_queue_init(n, io_ctx);
+	if (res != 0) {
+		fprintf(stderr, "io_queue_setup(%d) returned %d (%s)\n",
+			n, res, strerror(-res));
+		exit(3);
+	}
 }
 
 /*
  * allocate io operation and event arrays for a given thread
  */
 int setup_ious(struct thread_info *t,
-              int num_files, int depth,
-	      int reclen, int max_io_submit) {
-    int i;
-    size_t bytes = num_files * depth * sizeof(*t->ios);
+	       int num_files, int depth, int reclen, int max_io_submit)
+{
+	int i;
+	size_t bytes = num_files * depth * sizeof(*t->ios);
 
-    t->ios = malloc(bytes);
-    if (!t->ios) {
-	fprintf(stderr, "unable to allocate io units\n");
-	return -1;
-    }
-    memset(t->ios, 0, bytes);
+	t->ios = malloc(bytes);
+	if (!t->ios) {
+		fprintf(stderr, "unable to allocate io units\n");
+		return -1;
+	}
+	memset(t->ios, 0, bytes);
 
-    for (i = 0 ; i < depth * num_files; i++) {
-	t->ios[i].buf = aligned_buffer;
-	aligned_buffer += padded_reclen;
-	t->ios[i].buf_size = reclen;
-	if (verify)
-	    memset(t->ios[i].buf, 'b', reclen);
-	else
-	    memset(t->ios[i].buf, 0, reclen);
-	t->ios[i].next = t->free_ious;
-	t->free_ious = t->ios + i;
-    }
-    if (verify) {
-        verify_buf = aligned_buffer;
-        memset(verify_buf, 'b', reclen);
-    }
+	for (i = 0; i < depth * num_files; i++) {
+		t->ios[i].buf = aligned_buffer;
+		aligned_buffer += padded_reclen;
+		t->ios[i].buf_size = reclen;
+		if (verify)
+			memset(t->ios[i].buf, 'b', reclen);
+		else
+			memset(t->ios[i].buf, 0, reclen);
+		t->ios[i].next = t->free_ious;
+		t->free_ious = t->ios + i;
+	}
+	if (verify) {
+		verify_buf = aligned_buffer;
+		memset(verify_buf, 'b', reclen);
+	}
 
-    t->iocbs = malloc(sizeof(struct iocb *) * max_io_submit);
-    if (!t->iocbs) {
-        fprintf(stderr, "unable to allocate iocbs\n");
-	goto free_buffers;
-    }
+	t->iocbs = malloc(sizeof(struct iocb *) * max_io_submit);
+	if (!t->iocbs) {
+		fprintf(stderr, "unable to allocate iocbs\n");
+		goto free_buffers;
+	}
 
-    memset(t->iocbs, 0, max_io_submit * sizeof(struct iocb *));
+	memset(t->iocbs, 0, max_io_submit * sizeof(struct iocb *));
 
-    t->events = malloc(sizeof(struct io_event) * depth * num_files);
-    if (!t->events) {
-        fprintf(stderr, "unable to allocate ram for events\n");
-	goto free_buffers;
-    }
-    memset(t->events, 0, num_files * sizeof(struct io_event)*depth);
+	t->events = malloc(sizeof(struct io_event) * depth * num_files);
+	if (!t->events) {
+		fprintf(stderr, "unable to allocate ram for events\n");
+		goto free_buffers;
+	}
+	memset(t->events, 0, num_files * sizeof(struct io_event) * depth);
 
-    t->num_global_ios = num_files * depth;
-    t->num_global_events = t->num_global_ios;
-  return 0;
+	t->num_global_ios = num_files * depth;
+	t->num_global_events = t->num_global_ios;
+	return 0;
 
 free_buffers:
-    if (t->ios)
-        free(t->ios);
-    if (t->iocbs)
-        free(t->iocbs);
-    if (t->events)
-        free(t->events);
-    return -1;
+	if (t->ios)
+		free(t->ios);
+	if (t->iocbs)
+		free(t->iocbs);
+	if (t->events)
+		free(t->events);
+	return -1;
 }
 
 /*
@@ -989,93 +1008,94 @@
  * buffers to
  */
 int setup_shared_mem(int num_threads, int num_files, int depth,
-                     int reclen, int max_io_submit)
+		     int reclen, int max_io_submit)
 {
-    char *p = NULL;
-    size_t total_ram;
+	char *p = NULL;
+	size_t total_ram;
 
-    padded_reclen = (reclen + page_size_mask) / (page_size_mask+1);
-    padded_reclen = padded_reclen * (page_size_mask+1);
-    total_ram = num_files * depth * padded_reclen + num_threads;
-    if (verify)
-    	total_ram += padded_reclen;
+	padded_reclen = (reclen + page_size_mask) / (page_size_mask + 1);
+	padded_reclen = padded_reclen * (page_size_mask + 1);
+	total_ram = num_files * depth * padded_reclen + num_threads;
+	if (verify)
+		total_ram += padded_reclen;
 
-    if (use_shm == USE_MALLOC) {
-	p = malloc(total_ram + page_size_mask);
-    } else if (use_shm == USE_SHM) {
-        shm_id = shmget(IPC_PRIVATE, total_ram, IPC_CREAT | 0700);
-	if (shm_id < 0) {
-	    perror("shmget");
-	    drop_shm();
-	    goto free_buffers;
-	}
-	p = shmat(shm_id, (char *)0x50000000, 0);
-        if ((long)p == -1) {
-	    perror("shmat");
-	    goto free_buffers;
-	}
-	/* won't really be dropped until we shmdt */
-	drop_shm();
-    } else if (use_shm == USE_SHMFS) {
-        char mmap_name[16]; /* /dev/shm/ + null + XXXXXX */
-	int fd;
+	if (use_shm == USE_MALLOC) {
+		p = malloc(total_ram + page_size_mask);
+	} else if (use_shm == USE_SHM) {
+		shm_id = shmget(IPC_PRIVATE, total_ram, IPC_CREAT | 0700);
+		if (shm_id < 0) {
+			perror("shmget");
+			drop_shm();
+			goto free_buffers;
+		}
+		p = shmat(shm_id, (char *)0x50000000, 0);
+		if ((long)p == -1) {
+			perror("shmat");
+			goto free_buffers;
+		}
+		/* won't really be dropped until we shmdt */
+		drop_shm();
+	} else if (use_shm == USE_SHMFS) {
+		char mmap_name[16];	/* /dev/shm/ + null + XXXXXX */
+		int fd;
 
-	strcpy(mmap_name, "/dev/shm/XXXXXX");
-	fd = mkstemp(mmap_name);
-        if (fd < 0) {
-	    perror("mkstemp");
-	    goto free_buffers;
-	}
-	unlink(mmap_name);
-	ftruncate(fd, total_ram);
-	shm_id = fd;
-	p = mmap((char *)0x50000000, total_ram,
-	         PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		strcpy(mmap_name, "/dev/shm/XXXXXX");
+		fd = mkstemp(mmap_name);
+		if (fd < 0) {
+			perror("mkstemp");
+			goto free_buffers;
+		}
+		unlink(mmap_name);
+		ftruncate(fd, total_ram);
+		shm_id = fd;
+		p = mmap((char *)0x50000000, total_ram,
+			 PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 
-        if (p == MAP_FAILED) {
-	    perror("mmap");
-	    goto free_buffers;
+		if (p == MAP_FAILED) {
+			perror("mmap");
+			goto free_buffers;
+		}
 	}
-    }
-    if (!p) {
-        fprintf(stderr, "unable to allocate buffers\n");
-	goto free_buffers;
-    }
-    unaligned_buffer = p;
-    p = (char*)((intptr_t) (p + page_size_mask) & ~page_size_mask);
-    aligned_buffer = p;
-  return 0;
+	if (!p) {
+		fprintf(stderr, "unable to allocate buffers\n");
+		goto free_buffers;
+	}
+	unaligned_buffer = p;
+	p = (char *)((intptr_t) (p + page_size_mask) & ~page_size_mask);
+	aligned_buffer = p;
+	return 0;
 
 free_buffers:
-    drop_shm();
-    if (unaligned_buffer)
-        free(unaligned_buffer);
-    return -1;
+	drop_shm();
+	if (unaligned_buffer)
+		free(unaligned_buffer);
+	return -1;
 }
 
 /*
  * runs through all the thread_info structs and calculates a combined
  * throughput
  */
-void global_thread_throughput(struct thread_info *t, char *this_stage) {
-    int i;
-    double runtime = time_since_now(&global_stage_start_time);
-    double total_mb = 0;
-    double min_trans = 0;
+void global_thread_throughput(struct thread_info *t, char *this_stage)
+{
+	int i;
+	double runtime = time_since_now(&global_stage_start_time);
+	double total_mb = 0;
+	double min_trans = 0;
 
-    for (i = 0 ; i < num_threads ; i++) {
-        total_mb += global_thread_info[i].stage_mb_trans;
-	if (!min_trans || t->stage_mb_trans < min_trans)
-	    min_trans = t->stage_mb_trans;
-    }
-    if (total_mb) {
-	fprintf(stderr, "%s throughput (%.2f MB/s) ", this_stage,
-	        total_mb / runtime);
-	fprintf(stderr, "%.2f MB in %.2fs", total_mb, runtime);
-        if (stonewall)
-	    fprintf(stderr, " min transfer %.2fMB", min_trans);
-        fprintf(stderr, "\n");
-    }
+	for (i = 0; i < num_threads; i++) {
+		total_mb += global_thread_info[i].stage_mb_trans;
+		if (!min_trans || t->stage_mb_trans < min_trans)
+			min_trans = t->stage_mb_trans;
+	}
+	if (total_mb) {
+		fprintf(stderr, "%s throughput (%.2f MB/s) ", this_stage,
+			total_mb / runtime);
+		fprintf(stderr, "%.2f MB in %.2fs", total_mb, runtime);
+		if (stonewall)
+			fprintf(stderr, " min transfer %.2fMB", min_trans);
+		fprintf(stderr, "\n");
+	}
 }
 
 /* this is the meat of the state machine.  There is a list of
@@ -1089,430 +1109,451 @@
  */
 int worker(struct thread_info *t)
 {
-    struct io_oper *oper;
-    char *this_stage = NULL;
-    struct timeval stage_time;
-    int status = 0;
-    int iteration = 0;
-    int cnt;
+	struct io_oper *oper;
+	char *this_stage = NULL;
+	struct timeval stage_time;
+	int status = 0;
+	int iteration = 0;
+	int cnt;
 
-    aio_setup(&t->io_ctx, 512);
+	aio_setup(&t->io_ctx, 512);
 
 restart:
-    if (num_threads > 1) {
-        pthread_mutex_lock(&stage_mutex);
-	threads_starting++;
-	if (threads_starting == num_threads) {
-	    threads_ending = 0;
-	    gettimeofday(&global_stage_start_time, NULL);
-	    pthread_cond_broadcast(&stage_cond);
+	if (num_threads > 1) {
+		pthread_mutex_lock(&stage_mutex);
+		threads_starting++;
+		if (threads_starting == num_threads) {
+			threads_ending = 0;
+			gettimeofday(&global_stage_start_time, NULL);
+			pthread_cond_broadcast(&stage_cond);
+		}
+		while (threads_starting != num_threads)
+			pthread_cond_wait(&stage_cond, &stage_mutex);
+		pthread_mutex_unlock(&stage_mutex);
 	}
-	while (threads_starting != num_threads)
-	    pthread_cond_wait(&stage_cond, &stage_mutex);
-        pthread_mutex_unlock(&stage_mutex);
-    }
-    if (t->active_opers) {
-        this_stage = stage_name(t->active_opers->rw);
-	gettimeofday(&stage_time, NULL);
-	t->stage_mb_trans = 0;
-    }
-
-    cnt = 0;
-    /* first we send everything through aio */
-    while (t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) {
-	if (stonewall && threads_ending) {
-	    oper = t->active_opers;
-	    oper->stonewalled = 1;
-	    oper_list_del(oper, &t->active_opers);
-	    oper_list_add(oper, &t->finished_opers);
-	} else {
-	    run_active_list(t, io_iter,  max_io_submit);
-        }
-	cnt++;
-    }
-    if (latency_stats)
-        print_latency(t);
-
-    if (completion_latency_stats)
-	print_completion_latency(t);
-
-    /* then we wait for all the operations to finish */
-    oper = t->finished_opers;
-    do {
-	if (!oper)
-		break;
-	io_oper_wait(t, oper);
-	oper = oper->next;
-    } while (oper != t->finished_opers);
-
-    /* then we do an fsync to get the timing for any future operations
-     * right, and check to see if any of these need to get restarted
-     */
-    oper = t->finished_opers;
-    while (oper) {
-	if (fsync_stages)
-            fsync(oper->fd);
-	t->stage_mb_trans += oper_mb_trans(oper);
-	if (restart_oper(oper)) {
-	    oper_list_del(oper, &t->finished_opers);
-	    oper_list_add(oper, &t->active_opers);
-	    oper = t->finished_opers;
-	    continue;
+	if (t->active_opers) {
+		this_stage = stage_name(t->active_opers->rw);
+		gettimeofday(&stage_time, NULL);
+		t->stage_mb_trans = 0;
 	}
-	oper = oper->next;
-	if (oper == t->finished_opers)
-	    break;
-    }
 
-    if (t->stage_mb_trans && t->num_files > 0) {
-        double seconds = time_since_now(&stage_time);
-	fprintf(stderr, "thread %td %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
-	        t - global_thread_info, this_stage, t->stage_mb_trans/seconds,
-		t->stage_mb_trans, seconds);
-    }
-
-    if (num_threads > 1) {
-	pthread_mutex_lock(&stage_mutex);
-	threads_ending++;
-	if (threads_ending == num_threads) {
-	    threads_starting = 0;
-	    pthread_cond_broadcast(&stage_cond);
-	    global_thread_throughput(t, this_stage);
+	cnt = 0;
+	/* first we send everything through aio */
+	while (t->active_opers
+	       && (cnt < iterations || iterations == RUN_FOREVER)) {
+		if (stonewall && threads_ending) {
+			oper = t->active_opers;
+			oper->stonewalled = 1;
+			oper_list_del(oper, &t->active_opers);
+			oper_list_add(oper, &t->finished_opers);
+		} else {
+			run_active_list(t, io_iter, max_io_submit);
+		}
+		cnt++;
 	}
-	while (threads_ending != num_threads)
-	    pthread_cond_wait(&stage_cond, &stage_mutex);
-	pthread_mutex_unlock(&stage_mutex);
-    }
+	if (latency_stats)
+		print_latency(t);
 
-    /* someone got restarted, go back to the beginning */
-    if (t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) {
-	iteration++;
-        goto restart;
-    }
+	if (completion_latency_stats)
+		print_completion_latency(t);
 
-    /* finally, free all the ram */
-    while (t->finished_opers) {
+	/* then we wait for all the operations to finish */
 	oper = t->finished_opers;
-	oper_list_del(oper, &t->finished_opers);
-	status = finish_oper(t, oper);
-    }
+	do {
+		if (!oper)
+			break;
+		io_oper_wait(t, oper);
+		oper = oper->next;
+	} while (oper != t->finished_opers);
 
-    if (t->num_global_pending) {
-        fprintf(stderr, "global num pending is %d\n", t->num_global_pending);
-    }
-    io_queue_release(t->io_ctx);
+	/* then we do an fsync to get the timing for any future operations
+	 * right, and check to see if any of these need to get restarted
+	 */
+	oper = t->finished_opers;
+	while (oper) {
+		if (fsync_stages)
+			fsync(oper->fd);
+		t->stage_mb_trans += oper_mb_trans(oper);
+		if (restart_oper(oper)) {
+			oper_list_del(oper, &t->finished_opers);
+			oper_list_add(oper, &t->active_opers);
+			oper = t->finished_opers;
+			continue;
+		}
+		oper = oper->next;
+		if (oper == t->finished_opers)
+			break;
+	}
 
-    return status;
+	if (t->stage_mb_trans && t->num_files > 0) {
+		double seconds = time_since_now(&stage_time);
+		fprintf(stderr,
+			"thread %td %s totals (%.2f MB/s) %.2f MB in %.2fs\n",
+			t - global_thread_info, this_stage,
+			t->stage_mb_trans / seconds, t->stage_mb_trans,
+			seconds);
+	}
+
+	if (num_threads > 1) {
+		pthread_mutex_lock(&stage_mutex);
+		threads_ending++;
+		if (threads_ending == num_threads) {
+			threads_starting = 0;
+			pthread_cond_broadcast(&stage_cond);
+			global_thread_throughput(t, this_stage);
+		}
+		while (threads_ending != num_threads)
+			pthread_cond_wait(&stage_cond, &stage_mutex);
+		pthread_mutex_unlock(&stage_mutex);
+	}
+
+	/* someone got restarted, go back to the beginning */
+	if (t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) {
+		iteration++;
+		goto restart;
+	}
+
+	/* finally, free all the ram */
+	while (t->finished_opers) {
+		oper = t->finished_opers;
+		oper_list_del(oper, &t->finished_opers);
+		status = finish_oper(t, oper);
+	}
+
+	if (t->num_global_pending) {
+		fprintf(stderr, "global num pending is %d\n",
+			t->num_global_pending);
+	}
+	io_queue_release(t->io_ctx);
+
+	return status;
 }
 
-typedef void * (*start_routine)(void *);
+typedef void *(*start_routine) (void *);
 int run_workers(struct thread_info *t, int num_threads)
 {
-    int ret;
-    int thread_ret;
-    int i;
+	int ret;
+	int thread_ret;
+	int i;
 
-    for (i = 0 ; i < num_threads ; i++) {
-        ret = pthread_create(&t[i].tid, NULL, (start_routine)worker, t + i);
-	if (ret) {
-	    perror("pthread_create");
-	    exit(1);
+	for (i = 0; i < num_threads; i++) {
+		ret =
+		    pthread_create(&t[i].tid, NULL, (start_routine) worker,
+				   t + i);
+		if (ret) {
+			perror("pthread_create");
+			exit(1);
+		}
 	}
-    }
-    for (i = 0 ; i < num_threads ; i++) {
-        ret = pthread_join(t[i].tid, (void *)&thread_ret);
-        if (ret) {
-	    perror("pthread_join");
-	    exit(1);
+	for (i = 0; i < num_threads; i++) {
+		ret = pthread_join(t[i].tid, (void *)&thread_ret);
+		if (ret) {
+			perror("pthread_join");
+			exit(1);
+		}
 	}
-    }
-  return 0;
+	return 0;
 }
 
-off_t parse_size(char *size_arg, off_t mult) {
-    char c;
-    int num;
-    off_t ret;
-    c = size_arg[strlen(size_arg) - 1];
-    if (c > '9') {
-        size_arg[strlen(size_arg) - 1] = '\0';
-    }
-    num = atoi(size_arg);
-    switch(c) {
-    case 'g':
-    case 'G':
-        mult = 1024 * 1024 * 1024;
-	break;
-    case 'm':
-    case 'M':
-        mult = 1024 * 1024;
-	break;
-    case 'k':
-    case 'K':
-        mult = 1024;
-	break;
-    case 'b':
-    case 'B':
-        mult = 1;
-	break;
-    }
-    ret = mult * num;
-    return ret;
+off_t parse_size(char *size_arg, off_t mult)
+{
+	char c;
+	int num;
+	off_t ret;
+	c = size_arg[strlen(size_arg) - 1];
+	if (c > '9') {
+		size_arg[strlen(size_arg) - 1] = '\0';
+	}
+	num = atoi(size_arg);
+	switch (c) {
+	case 'g':
+	case 'G':
+		mult = 1024 * 1024 * 1024;
+		break;
+	case 'm':
+	case 'M':
+		mult = 1024 * 1024;
+		break;
+	case 'k':
+	case 'K':
+		mult = 1024;
+		break;
+	case 'b':
+	case 'B':
+		mult = 1;
+		break;
+	}
+	ret = mult * num;
+	return ret;
 }
 
-void print_usage(void) {
-    printf("usage: aio-stress [-s size] [-r size] [-a size] [-d num] [-b num]\n");
-    printf("                  [-i num] [-t num] [-c num] [-C size] [-nxhOS ]\n");
-    printf("                  file1 [file2 ...]\n");
-    printf("\t-a size in KB at which to align buffers\n");
-    printf("\t-b max number of iocbs to give io_submit at once\n");
-    printf("\t-c number of io contexts per file\n");
-    printf("\t-C offset between contexts, default 2MB\n");
-    printf("\t-s size in MB of the test file(s), default 1024MB\n");
-    printf("\t-r record size in KB used for each io, default 64KB\n");
-    printf("\t-d number of pending aio requests for each file, default 64\n");
-    printf("\t-i number of I/O per file sent before switching\n"
-	    "\t   to the next file, default 8\n");
-    printf("\t-I total number of ayncs I/O the program will run, "
-	    "default is run until Cntl-C\n");
-    printf("\t-O Use O_DIRECT (not available in 2.4 kernels),\n");
-    printf("\t-S Use O_SYNC for writes\n");
-    printf("\t-o add an operation to the list: write=0, read=1,\n");
-    printf("\t   random write=2, random read=3.\n");
-    printf("\t   repeat -o to specify multiple ops: -o 0 -o 1 etc.\n");
-    printf("\t-m shm use ipc shared memory for io buffers instead of malloc\n");
-    printf("\t-m shmfs mmap a file in /dev/shm for io buffers\n");
-    printf("\t-n no fsyncs between write stage and read stage\n");
-    printf("\t-l print io_submit latencies after each stage\n");
-    printf("\t-L print io completion latencies after each stage\n");
-    printf("\t-t number of threads to run\n");
-    printf("\t-u unlink files after completion\n");
-    printf("\t-v verification of bytes written\n");
-    printf("\t-x turn off thread stonewalling\n");
-    printf("\t-h this message\n");
-    printf("\n\t   the size options (-a -s and -r) allow modifiers -s 400{k,m,g}\n");
-    printf("\t   translate to 400KB, 400MB and 400GB\n");
-    printf("version %s\n", PROG_VERSION);
+void print_usage(void)
+{
+	printf
+	    ("usage: aio-stress [-s size] [-r size] [-a size] [-d num] [-b num]\n");
+	printf
+	    ("                  [-i num] [-t num] [-c num] [-C size] [-nxhOS ]\n");
+	printf("                  file1 [file2 ...]\n");
+	printf("\t-a size in KB at which to align buffers\n");
+	printf("\t-b max number of iocbs to give io_submit at once\n");
+	printf("\t-c number of io contexts per file\n");
+	printf("\t-C offset between contexts, default 2MB\n");
+	printf("\t-s size in MB of the test file(s), default 1024MB\n");
+	printf("\t-r record size in KB used for each io, default 64KB\n");
+	printf
+	    ("\t-d number of pending aio requests for each file, default 64\n");
+	printf("\t-i number of I/O per file sent before switching\n"
+	       "\t   to the next file, default 8\n");
+	printf("\t-I total number of ayncs I/O the program will run, "
+	       "default is run until Cntl-C\n");
+	printf("\t-O Use O_DIRECT (not available in 2.4 kernels),\n");
+	printf("\t-S Use O_SYNC for writes\n");
+	printf("\t-o add an operation to the list: write=0, read=1,\n");
+	printf("\t   random write=2, random read=3.\n");
+	printf("\t   repeat -o to specify multiple ops: -o 0 -o 1 etc.\n");
+	printf
+	    ("\t-m shm use ipc shared memory for io buffers instead of malloc\n");
+	printf("\t-m shmfs mmap a file in /dev/shm for io buffers\n");
+	printf("\t-n no fsyncs between write stage and read stage\n");
+	printf("\t-l print io_submit latencies after each stage\n");
+	printf("\t-L print io completion latencies after each stage\n");
+	printf("\t-t number of threads to run\n");
+	printf("\t-u unlink files after completion\n");
+	printf("\t-v verification of bytes written\n");
+	printf("\t-x turn off thread stonewalling\n");
+	printf("\t-h this message\n");
+	printf
+	    ("\n\t   the size options (-a -s and -r) allow modifiers -s 400{k,m,g}\n");
+	printf("\t   translate to 400KB, 400MB and 400GB\n");
+	printf("version %s\n", PROG_VERSION);
 }
 
 int main(int ac, char **av)
 {
-    int rwfd;
-    int i;
-    int j;
-    int c;
+	int rwfd;
+	int i;
+	int j;
+	int c;
 
-    off_t file_size = 1 * 1024 * 1024 * 1024;
-    int first_stage = WRITE;
-    struct io_oper *oper;
-    int status = 0;
-    int num_files = 0;
-    int open_fds = 0;
-    struct thread_info *t;
+	off_t file_size = 1 * 1024 * 1024 * 1024;
+	int first_stage = WRITE;
+	struct io_oper *oper;
+	int status = 0;
+	int num_files = 0;
+	int open_fds = 0;
+	struct thread_info *t;
 
-    page_size_mask = getpagesize() - 1;
+	page_size_mask = getpagesize() - 1;
 
-    while (1) {
-	c = getopt(ac, av, "a:b:c:C:m:s:r:d:i:I:o:t:lLnhOSxvu");
-	if  (c < 0)
-	    break;
+	while (1) {
+		c = getopt(ac, av, "a:b:c:C:m:s:r:d:i:I:o:t:lLnhOSxvu");
+		if (c < 0)
+			break;
 
-        switch(c) {
-	case 'a':
-	    page_size_mask = parse_size(optarg, 1024);
-	    page_size_mask--;
-	    break;
-	case 'c':
-	    num_contexts = atoi(optarg);
-	    break;
-	case 'C':
-	    context_offset = parse_size(optarg, 1024 * 1024);
-	case 'b':
-	    max_io_submit = atoi(optarg);
-	    break;
-	case 's':
-	    file_size = parse_size(optarg, 1024 * 1024);
-	    break;
-	case 'd':
-	    depth = atoi(optarg);
-	    break;
-	case 'r':
-	    rec_len = parse_size(optarg, 1024);
-	    break;
-	case 'i':
-	    io_iter = atoi(optarg);
-	    break;
-        case 'I':
-          iterations = atoi(optarg);
-        break;
-	case 'n':
-	    fsync_stages = 0;
-	    break;
-	case 'l':
-	    latency_stats = 1;
-	    break;
-	case 'L':
-	    completion_latency_stats = 1;
-	    break;
-	case 'm':
-	    if (!strcmp(optarg, "shm")) {
-		fprintf(stderr, "using ipc shm\n");
-	        use_shm = USE_SHM;
-	    } else if (!strcmp(optarg, "shmfs")) {
-	        fprintf(stderr, "using /dev/shm for buffers\n");
-		use_shm = USE_SHMFS;
-	    }
-	    break;
-	case 'o':
-	    i = atoi(optarg);
-	    stages |= 1 << i;
-	    fprintf(stderr, "adding stage %s\n", stage_name(i));
-	    break;
-	case 'O':
-	    o_direct = O_DIRECT;
-	    break;
-	case 'S':
-	    o_sync = O_SYNC;
-	    break;
-	case 't':
-	    num_threads = atoi(optarg);
-	    break;
-	case 'x':
-	    stonewall = 0;
-	    break;
-	case 'u':
-	    unlink_files = 1;
-	    break;
-	case 'v':
-	    verify = 1;
-	    break;
-	case 'h':
-	default:
-	    print_usage();
-	    exit(1);
+		switch (c) {
+		case 'a':
+			page_size_mask = parse_size(optarg, 1024);
+			page_size_mask--;
+			break;
+		case 'c':
+			num_contexts = atoi(optarg);
+			break;
+		case 'C':
+			context_offset = parse_size(optarg, 1024 * 1024);
+		case 'b':
+			max_io_submit = atoi(optarg);
+			break;
+		case 's':
+			file_size = parse_size(optarg, 1024 * 1024);
+			break;
+		case 'd':
+			depth = atoi(optarg);
+			break;
+		case 'r':
+			rec_len = parse_size(optarg, 1024);
+			break;
+		case 'i':
+			io_iter = atoi(optarg);
+			break;
+		case 'I':
+			iterations = atoi(optarg);
+			break;
+		case 'n':
+			fsync_stages = 0;
+			break;
+		case 'l':
+			latency_stats = 1;
+			break;
+		case 'L':
+			completion_latency_stats = 1;
+			break;
+		case 'm':
+			if (!strcmp(optarg, "shm")) {
+				fprintf(stderr, "using ipc shm\n");
+				use_shm = USE_SHM;
+			} else if (!strcmp(optarg, "shmfs")) {
+				fprintf(stderr, "using /dev/shm for buffers\n");
+				use_shm = USE_SHMFS;
+			}
+			break;
+		case 'o':
+			i = atoi(optarg);
+			stages |= 1 << i;
+			fprintf(stderr, "adding stage %s\n", stage_name(i));
+			break;
+		case 'O':
+			o_direct = O_DIRECT;
+			break;
+		case 'S':
+			o_sync = O_SYNC;
+			break;
+		case 't':
+			num_threads = atoi(optarg);
+			break;
+		case 'x':
+			stonewall = 0;
+			break;
+		case 'u':
+			unlink_files = 1;
+			break;
+		case 'v':
+			verify = 1;
+			break;
+		case 'h':
+		default:
+			print_usage();
+			exit(1);
+		}
 	}
-    }
 
-    /*
-     * make sure we don't try to submit more I/O than we have allocated
-     * memory for
-     */
-    if (depth < io_iter) {
-	io_iter = depth;
-        fprintf(stderr, "dropping io_iter to %d\n", io_iter);
-    }
-
-    if (optind >= ac) {
-	print_usage();
-	exit(1);
-    }
-
-    num_files = ac - optind;
-
-    if (num_threads > (num_files * num_contexts)) {
-        num_threads = num_files * num_contexts;
-	fprintf(stderr, "dropping thread count to the number of contexts %d\n",
-	        num_threads);
-    }
-
-    t = malloc(num_threads * sizeof(*t));
-    if (!t) {
-        perror("malloc");
-	exit(1);
-    }
-    global_thread_info = t;
-
-    /* by default, allow a huge number of iocbs to be sent towards
-     * io_submit
-     */
-    if (!max_io_submit)
-        max_io_submit = num_files * io_iter * num_contexts;
-
-    /*
-     * make sure we don't try to submit more I/O than max_io_submit allows
-     */
-    if (max_io_submit < io_iter) {
-        io_iter = max_io_submit;
-	fprintf(stderr, "dropping io_iter to %d\n", io_iter);
-    }
-
-    if (!stages) {
-        stages = (1 << WRITE) | (1 << READ) | (1 << RREAD) | (1 << RWRITE);
-    } else {
-        for (i = 0 ; i < LAST_STAGE; i++) {
-	    if (stages & (1 << i)) {
-	        first_stage = i;
-		fprintf(stderr, "starting with %s\n", stage_name(i));
-		break;
-	    }
+	/*
+	 * make sure we don't try to submit more I/O than we have allocated
+	 * memory for
+	 */
+	if (depth < io_iter) {
+		io_iter = depth;
+		fprintf(stderr, "dropping io_iter to %d\n", io_iter);
 	}
-    }
 
-    if (file_size < num_contexts * context_offset) {
-        fprintf(stderr, "file size %ld too small for %d contexts\n",
-	        (long)file_size, num_contexts);
-	exit(1);
-    }
-
-    fprintf(stderr, "file size %ldMB, record size %ldKB, depth %d, "
-	    "I/O per iteration %d\n",
-	    (long)(file_size / (1024 * 1024)),
-	    rec_len / 1024, depth, io_iter);
-    fprintf(stderr, "max io_submit %d, buffer alignment set to %luKB\n",
-            max_io_submit, (page_size_mask + 1)/1024);
-    fprintf(stderr, "threads %d files %d contexts %d context offset %ldMB "
-	    "verification %s\n", num_threads, num_files, num_contexts,
-	    (long)(context_offset / (1024 * 1024)),
-	    verify ? "on" : "off");
-    /* open all the files and do any required setup for them */
-    for (i = optind ; i < ac ; i++) {
-	int thread_index;
-	for (j = 0 ; j < num_contexts ; j++) {
-	    thread_index = open_fds % num_threads;
-	    open_fds++;
-
-	    rwfd = open(av[i], O_CREAT | O_RDWR | o_direct | o_sync, 0600);
-	    if (rwfd == -1) {
-		fprintf(stderr, "error while creating file %s: %s", av[i], strerror(errno));
+	if (optind >= ac) {
+		print_usage();
 		exit(1);
-	    }
-
-	    oper = create_oper(rwfd, first_stage, j * context_offset,
-	                       file_size - j * context_offset, rec_len,
-			       depth, io_iter, av[i]);
-	    if (!oper) {
-		fprintf(stderr, "error in create_oper\n");
-		exit(-1);
-	    }
-	    oper_list_add(oper, &t[thread_index].active_opers);
-	    t[thread_index].num_files++;
 	}
-    }
-    if (setup_shared_mem(num_threads, num_files * num_contexts,
-                         depth, rec_len, max_io_submit))
-    {
-        exit(1);
-    }
-    for (i = 0 ; i < num_threads ; i++) {
-	if (setup_ious(&t[i], t[i].num_files, depth, rec_len, max_io_submit))
+
+	num_files = ac - optind;
+
+	if (num_threads > (num_files * num_contexts)) {
+		num_threads = num_files * num_contexts;
+		fprintf(stderr,
+			"dropping thread count to the number of contexts %d\n",
+			num_threads);
+	}
+
+	t = malloc(num_threads * sizeof(*t));
+	if (!t) {
+		perror("malloc");
 		exit(1);
-    }
-    if (num_threads > 1) {
-        printf("Running multi thread version num_threads:%d\n", num_threads);
-        run_workers(t, num_threads);
-    } else {
-        printf("Running single thread version \n");
-	status = worker(t);
-    }
-    if (unlink_files) {
-	for (i = optind ; i < ac ; i++) {
-	    printf("Cleaning up file %s \n", av[i]);
-	    unlink(av[i]);
 	}
-    }
+	global_thread_info = t;
 
-    if (status) {
-	exit(1);
-    }
-    return status;
+	/* by default, allow a huge number of iocbs to be sent towards
+	 * io_submit
+	 */
+	if (!max_io_submit)
+		max_io_submit = num_files * io_iter * num_contexts;
+
+	/*
+	 * make sure we don't try to submit more I/O than max_io_submit allows
+	 */
+	if (max_io_submit < io_iter) {
+		io_iter = max_io_submit;
+		fprintf(stderr, "dropping io_iter to %d\n", io_iter);
+	}
+
+	if (!stages) {
+		stages =
+		    (1 << WRITE) | (1 << READ) | (1 << RREAD) | (1 << RWRITE);
+	} else {
+		for (i = 0; i < LAST_STAGE; i++) {
+			if (stages & (1 << i)) {
+				first_stage = i;
+				fprintf(stderr, "starting with %s\n",
+					stage_name(i));
+				break;
+			}
+		}
+	}
+
+	if (file_size < num_contexts * context_offset) {
+		fprintf(stderr, "file size %ld too small for %d contexts\n",
+			(long)file_size, num_contexts);
+		exit(1);
+	}
+
+	fprintf(stderr, "file size %ldMB, record size %ldKB, depth %d, "
+		"I/O per iteration %d\n",
+		(long)(file_size / (1024 * 1024)),
+		rec_len / 1024, depth, io_iter);
+	fprintf(stderr, "max io_submit %d, buffer alignment set to %luKB\n",
+		max_io_submit, (page_size_mask + 1) / 1024);
+	fprintf(stderr, "threads %d files %d contexts %d context offset %ldMB "
+		"verification %s\n", num_threads, num_files, num_contexts,
+		(long)(context_offset / (1024 * 1024)), verify ? "on" : "off");
+	/* open all the files and do any required setup for them */
+	for (i = optind; i < ac; i++) {
+		int thread_index;
+		for (j = 0; j < num_contexts; j++) {
+			thread_index = open_fds % num_threads;
+			open_fds++;
+
+			rwfd =
+			    open(av[i], O_CREAT | O_RDWR | o_direct | o_sync,
+				 0600);
+			if (rwfd == -1) {
+				fprintf(stderr,
+					"error while creating file %s: %s",
+					av[i], strerror(errno));
+				exit(1);
+			}
+
+			oper =
+			    create_oper(rwfd, first_stage, j * context_offset,
+					file_size - j * context_offset, rec_len,
+					depth, io_iter, av[i]);
+			if (!oper) {
+				fprintf(stderr, "error in create_oper\n");
+				exit(-1);
+			}
+			oper_list_add(oper, &t[thread_index].active_opers);
+			t[thread_index].num_files++;
+		}
+	}
+	if (setup_shared_mem(num_threads, num_files * num_contexts,
+			     depth, rec_len, max_io_submit)) {
+		exit(1);
+	}
+	for (i = 0; i < num_threads; i++) {
+		if (setup_ious
+		    (&t[i], t[i].num_files, depth, rec_len, max_io_submit))
+			exit(1);
+	}
+	if (num_threads > 1) {
+		printf("Running multi thread version num_threads:%d\n",
+		       num_threads);
+		run_workers(t, num_threads);
+	} else {
+		printf("Running single thread version \n");
+		status = worker(t);
+	}
+	if (unlink_files) {
+		for (i = optind; i < ac; i++) {
+			printf("Cleaning up file %s \n", av[i]);
+			unlink(av[i]);
+		}
+	}
+
+	if (status) {
+		exit(1);
+	}
+	return status;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/aiocp.c b/testcases/kernel/io/ltp-aiodio/aiocp.c
index 852d487..a6bb47d 100644
--- a/testcases/kernel/io/ltp-aiodio/aiocp.c
+++ b/testcases/kernel/io/ltp-aiodio/aiocp.c
@@ -54,8 +54,8 @@
 static const char *srcname = NULL;
 static int source_open_flag = O_RDONLY;	/* open flags on source file */
 static int dest_open_flag = O_WRONLY;	/* open flags on dest file */
-static int no_write;			/* do not write */
-static int zero;			/* write zero's only */
+static int no_write;		/* do not write */
+static int zero;		/* write zero's only */
 
 static int debug;
 static int count_io_q_waits;	/* how many time io_queue_wait called */
@@ -76,13 +76,14 @@
 	}
 
 	for (i = 0; i < n; i++) {
-		if (!(iocb_free[i] = (struct iocb *) malloc(sizeof(struct iocb))))
+		if (!
+		    (iocb_free[i] = (struct iocb *)malloc(sizeof(struct iocb))))
 			return -1;
 		if (posix_memalign(&buf, alignment, iosize))
 			return -1;
 		if (debug > 1) {
 			printf("buf allocated at 0x%p, align:%d\n",
-					buf, alignment);
+			       buf, alignment);
 		}
 		if (zero) {
 			/*
@@ -126,7 +127,7 @@
 	 * Call the callback functions for each event.
 	 */
 	for (ep = events; n-- > 0; ep++) {
-		io_callback_t cb = (io_callback_t)ep->data;
+		io_callback_t cb = (io_callback_t) ep->data;
 		struct iocb *iocb = ep->obj;
 
 		if (debug > 1) {
@@ -273,7 +274,7 @@
 		case 'a':	/* alignment of data buffer */
 			alignment = strtol(optarg, &endp, 0);
 			alignment = (long)scale_by_kmg((long long)alignment,
-							*endp);
+						       *endp);
 			break;
 		case 'f':	/* use these open flags */
 			if (strcmp(optarg, "LARGEFILE") == 0 ||
@@ -281,7 +282,7 @@
 				source_open_flag |= O_LARGEFILE;
 				dest_open_flag |= O_LARGEFILE;
 			} else if (strcmp(optarg, "TRUNC") == 0 ||
-			           strcmp(optarg, "O_TRUNC") == 0) {
+				   strcmp(optarg, "O_TRUNC") == 0) {
 				dest_open_flag |= O_TRUNC;
 			} else if (strcmp(optarg, "SYNC") == 0 ||
 				   strcmp(optarg, "O_SYNC") == 0) {
@@ -303,7 +304,8 @@
 			break;
 		case 'b':	/* block size */
 			aio_blksize = strtol(optarg, &endp, 0);
-			aio_blksize = (long)scale_by_kmg((long long)aio_blksize, *endp);
+			aio_blksize =
+			    (long)scale_by_kmg((long long)aio_blksize, *endp);
 			break;
 
 		case 'n':	/* num io */
@@ -332,7 +334,7 @@
 		usage();
 	}
 	if (!zero) {
-	       	if ((srcfd = open(srcname = *argv, source_open_flag)) < 0) {
+		if ((srcfd = open(srcname = *argv, source_open_flag)) < 0) {
 			perror(srcname);
 			exit(1);
 		}
@@ -388,8 +390,8 @@
 				}
 			}
 			if (!no_write) {
-				flag = (O_SYNC|dest_open_flag) &
-						~(O_DIRECT|O_CREAT);
+				flag = (O_SYNC | dest_open_flag) &
+				    ~(O_DIRECT | O_CREAT);
 				dstfd2 = open(dstname, flag);
 				if (dstfd2 < 0) {
 					perror(dstname);
@@ -413,7 +415,7 @@
 		int i, rc;
 		/* Submit as many reads as once as possible upto aio_maxio */
 		int n = MIN(MIN(aio_maxio - busy, aio_maxio),
-				howmany(length - offset, aio_blksize));
+			    howmany(length - offset, aio_blksize));
 		if (n > 0) {
 			struct iocb *ioq[n];
 
@@ -426,11 +428,11 @@
 					 * We are writing zero's to dstfd
 					 */
 					io_prep_pwrite(io, dstfd, io->u.c.buf,
-							iosize, offset);
+						       iosize, offset);
 					io_set_callback(io, wr_done);
 				} else {
 					io_prep_pread(io, srcfd, io->u.c.buf,
-							iosize, offset);
+						      iosize, offset);
 					io_set_callback(io, rd_done);
 				}
 				ioq[i] = io;
@@ -446,7 +448,7 @@
 				printf("io_submit(%d) busy:%d\n", n, busy);
 			if (delay.tv_usec) {
 				struct timeval t = delay;
-				(void)select(0,0,0,0,&t);
+				(void)select(0, 0, 0, 0, &t);
 			}
 		}
 
@@ -462,7 +464,7 @@
 		if (debug > 1) {
 			printf("io_wait_run: rc == %d\n", rc);
 			printf("busy:%d aio_maxio:%d tocopy:%d\n",
-					busy, aio_maxio, tocopy);
+			       busy, aio_maxio, tocopy);
 		}
 	}
 
@@ -475,11 +477,11 @@
 			 * We are writing zero's to dstfd2
 			 */
 			io_prep_pwrite(io, dstfd2, io->u.c.buf,
-					leftover, offset);
+				       leftover, offset);
 			io_set_callback(io, wr_done);
 		} else {
 			io_prep_pread(io, srcfd2, io->u.c.buf,
-					leftover, offset);
+				      leftover, offset);
 			io_set_callback(io, rd_done);
 		}
 		rc = io_submit(myctx, 1, &io);
@@ -514,8 +516,8 @@
 
 #else
 
-int
-main(void) {
+int main(void)
+{
 	fprintf(stderr, "System doesn't have libaio support.\n");
 	return 1;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_append.c b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
index f29f051..56e9c09 100644
--- a/testcases/kernel/io/ltp-aiodio/aiodio_append.c
+++ b/testcases/kernel/io/ltp-aiodio/aiodio_append.c
@@ -43,7 +43,8 @@
 
 	while (size > 0) {
 		if (*buf != 0) {
-			fprintf(stderr, "non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
+			fprintf(stderr,
+				"non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
 				buf - p, (unsigned int)buf[0],
 				size > 1 ? (unsigned int)buf[1] : 0,
 				size > 2 ? (unsigned int)buf[2] : 0,
@@ -54,7 +55,7 @@
 		buf++;
 		size--;
 	}
-	return 0;	/* all zeros */
+	return 0;		/* all zeros */
 }
 
 int read_eof(char *filename)
@@ -68,20 +69,21 @@
 		sleep(1);	/* wait for file to be created */
 	}
 
-	for (i = 0 ; i < 1000000; i++) {
+	for (i = 0; i < 1000000; i++) {
 		off_t offset;
-		char * bufoff;
+		char *bufoff;
 
 		offset = lseek(fd, SEEK_END, 0);
 		r = read(fd, buf, 4096);
 		if (r > 0) {
 			if ((bufoff = check_zero(buf, r))) {
-				fprintf(stderr, "non-zero read at offset %p\n",offset + bufoff);
+				fprintf(stderr, "non-zero read at offset %p\n",
+					offset + bufoff);
 				exit(1);
 			}
 		}
 	}
-  return 0;
+	return 0;
 }
 
 #define NUM_AIO 16
@@ -101,9 +103,9 @@
 	off_t offset = 0;
 	io_context_t myctx;
 	struct io_event event;
-    struct timespec timeout;
+	struct timespec timeout;
 
-	fd = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666);
+	fd = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666);
 	if (fd < 0) {
 		perror("cannot create file");
 		return;
@@ -138,16 +140,18 @@
 		struct iocb *iocbp;
 
 		n = io_getevents(myctx, 1, 1, &event, &timeout);
-                if (n > 0) {
-		  iocbp = (struct iocb *)event.obj;
-
 		if (n > 0) {
-		io_prep_pwrite(iocbp, fd, iocbp->u.c.buf, AIO_SIZE, offset);
-		offset += AIO_SIZE;
-		if ((w = io_submit(myctx, 1, &iocbp)) < 0) {
-			fprintf(stderr, "write %d returned %d\n", i, w);
-		  }
-		 }
+			iocbp = (struct iocb *)event.obj;
+
+			if (n > 0) {
+				io_prep_pwrite(iocbp, fd, iocbp->u.c.buf,
+					       AIO_SIZE, offset);
+				offset += AIO_SIZE;
+				if ((w = io_submit(myctx, 1, &iocbp)) < 0) {
+					fprintf(stderr,
+						"write %d returned %d\n", i, w);
+				}
+			}
 		}
 	}
 }
@@ -159,7 +163,7 @@
 	int i;
 	char *filename = argv[1];
 
-    printf("Starting aio/dio append test...\n");
+	printf("Starting aio/dio append test...\n");
 
 	for (i = 0; i < num_children; i++) {
 		if ((pid[i] = fork()) == 0) {
@@ -185,5 +189,5 @@
 		kill(pid[i], SIGTERM);
 	}
 
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
index 0663509..944e12b 100644
--- a/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
+++ b/testcases/kernel/io/ltp-aiodio/aiodio_sparse.c
@@ -48,15 +48,16 @@
 static void cleanup(void);
 static void usage(void);
 
-char *TCID="aiodio_sparse";
-int TST_TOTAL=1;
+char *TCID = "aiodio_sparse";
+int TST_TOTAL = 1;
 
 #include "common_sparse.h"
 
 /*
  * do async DIO writes to a sparse file
  */
-int aiodio_sparse(char *filename, int align, int writesize, int filesize, int num_aio)
+int aiodio_sparse(char *filename, int align, int writesize, int filesize,
+		  int num_aio)
 {
 	int fd;
 	int i, w;
@@ -75,15 +76,15 @@
 	iocbs = malloc(sizeof(struct iocb *) * num_aio);
 	for (i = 0; i < num_aio; i++) {
 		if ((iocbs[i] = malloc(sizeof(struct iocb))) == 0) {
-			tst_resm(TBROK|TERRNO, "malloc()");
+			tst_resm(TBROK | TERRNO, "malloc()");
 			return 1;
 		}
 	}
 
-	fd = open(filename, O_DIRECT|O_WRONLY|O_CREAT|O_EXCL, 0600);
+	fd = open(filename, O_DIRECT | O_WRONLY | O_CREAT | O_EXCL, 0600);
 
 	if (fd < 0) {
-		tst_resm(TBROK|TERRNO, "open()");
+		tst_resm(TBROK | TERRNO, "open()");
 		return 1;
 	}
 
@@ -97,7 +98,7 @@
 		void *bufptr;
 
 		if (posix_memalign(&bufptr, align, writesize)) {
-			tst_resm(TBROK|TERRNO, "posix_memalign()");
+			tst_resm(TBROK | TERRNO, "posix_memalign()");
 			close(fd);
 			unlink(filename);
 			return 1;
@@ -125,22 +126,25 @@
 	 */
 	aio_inflight = num_aio;
 
-	while (offset < filesize)  {
+	while (offset < filesize) {
 		int n;
 		struct iocb *iocbp;
 
 		if (debug)
-			tst_resm(TINFO, "aiodio_sparse: offset %p filesize %d inflight %d",
-				&offset, filesize, aio_inflight);
+			tst_resm(TINFO,
+				 "aiodio_sparse: offset %p filesize %d inflight %d",
+				 &offset, filesize, aio_inflight);
 
 		if ((n = io_getevents(myctx, 1, 1, &event, 0)) != 1) {
 			if (-n != EINTR)
-				tst_resm(TBROK, "io_getevents() returned %d", n);
+				tst_resm(TBROK, "io_getevents() returned %d",
+					 n);
 			break;
 		}
 
 		if (debug)
-			tst_resm(TINFO, "aiodio_sparse: io_getevent() returned %d", n);
+			tst_resm(TINFO,
+				 "aiodio_sparse: io_getevent() returned %d", n);
 
 		aio_inflight--;
 
@@ -150,15 +154,16 @@
 		iocbp = (struct iocb *)event.obj;
 		if (event.res2 != 0 || event.res != iocbp->u.c.nbytes) {
 			tst_resm(TBROK,
-			         "AIO write offset %lld expected %ld got %ld",
-			         iocbp->u.c.offset, iocbp->u.c.nbytes,
-			         event.res);
+				 "AIO write offset %lld expected %ld got %ld",
+				 iocbp->u.c.offset, iocbp->u.c.nbytes,
+				 event.res);
 			break;
 		}
 
 		if (debug)
-			tst_resm(TINFO, "aiodio_sparse: io_getevent() res %ld res2 %ld",
-				        event.res, event.res2);
+			tst_resm(TINFO,
+				 "aiodio_sparse: io_getevent() res %ld res2 %ld",
+				 event.res, event.res2);
 
 		/* start next write */
 		io_prep_pwrite(iocbp, fd, iocbp->u.c.buf, writesize, offset);
@@ -193,9 +198,9 @@
 		iocbp = (struct iocb *)event.obj;
 		if (event.res2 != 0 || event.res != iocbp->u.c.nbytes) {
 			tst_resm(TBROK,
-			         "AIO write offset %lld expected %ld got %ld",
-			         iocbp->u.c.offset, iocbp->u.c.nbytes,
-			         event.res);
+				 "AIO write offset %lld expected %ld got %ld",
+				 iocbp->u.c.offset, iocbp->u.c.nbytes,
+				 event.res);
 		}
 	}
 
@@ -220,7 +225,7 @@
 	int i;
 	long alignment = 512;
 	int writesize = 65536;
-	int filesize = 100*1024*1024;
+	int filesize = 100 * 1024 * 1024;
 	int num_aio = 16;
 	int children_errors = 0;
 	int c;
@@ -238,15 +243,17 @@
 		case 'a':
 			alignment = strtol(optarg, &endp, 0);
 			alignment = (int)scale_by_kmg((long long)alignment,
-                                                        *endp);
+						      *endp);
 			break;
 		case 'w':
 			writesize = strtol(optarg, &endp, 0);
-			writesize = (int)scale_by_kmg((long long)writesize, *endp);
+			writesize =
+			    (int)scale_by_kmg((long long)writesize, *endp);
 			break;
 		case 's':
 			filesize = strtol(optarg, &endp, 0);
-			filesize = (int)scale_by_kmg((long long)filesize, *endp);
+			filesize =
+			    (int)scale_by_kmg((long long)filesize, *endp);
 			break;
 		case 'n':
 			num_children = atoi(optarg);
@@ -273,12 +280,12 @@
 		switch (pid[i] = fork()) {
 		case 0:
 			read_sparse(filename, filesize);
-		break;
+			break;
 		case -1:
 			while (i-- > 0)
 				kill(pid[i], SIGTERM);
 
-			tst_brkm(TBROK|TERRNO, cleanup, "fork()");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork()");
 		default:
 			continue;
 		}
@@ -298,7 +305,7 @@
 
 		p = waitpid(pid[i], &status, 0);
 		if (p < 0) {
-			tst_resm(TBROK|TERRNO, "waitpid()");
+			tst_resm(TBROK | TERRNO, "waitpid()");
 		} else {
 			if (WIFEXITED(status) && WEXITSTATUS(status) == 10)
 				children_errors++;
@@ -307,7 +314,7 @@
 
 	if (children_errors)
 		tst_resm(TFAIL, "%i children(s) exited abnormally",
-		         children_errors);
+			 children_errors);
 
 	if (!children_errors && !ret)
 		tst_resm(TPASS, "Test passed");
diff --git a/testcases/kernel/io/ltp-aiodio/dio_append.c b/testcases/kernel/io/ltp-aiodio/dio_append.c
index 9cb0256..878c465 100644
--- a/testcases/kernel/io/ltp-aiodio/dio_append.c
+++ b/testcases/kernel/io/ltp-aiodio/dio_append.c
@@ -50,7 +50,8 @@
 
 	while (size > 0) {
 		if (*buf != 0) {
-			fprintf(stderr, "non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
+			fprintf(stderr,
+				"non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
 				buf - p, (unsigned int)buf[0],
 				size > 1 ? (unsigned int)buf[1] : 0,
 				size > 2 ? (unsigned int)buf[2] : 0,
@@ -61,7 +62,7 @@
 		buf++;
 		size--;
 	}
-	return 0;	/* all zeros */
+	return 0;		/* all zeros */
 }
 
 int read_eof(char *filename)
@@ -75,7 +76,7 @@
 		sleep(1);	/* wait for file to be created */
 	}
 
-	for (i = 0 ; i < 1000000; i++) {
+	for (i = 0; i < 1000000; i++) {
 		off_t offset;
 		char *bufoff;
 
@@ -89,7 +90,7 @@
 			}
 		}
 	}
-  return 0;
+	return 0;
 }
 
 void dio_append(char *filename)
@@ -99,21 +100,21 @@
 	int i;
 	int w;
 
-	fd = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666);
+	fd = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666);
 
 	if (fd < 0) {
 		perror("cannot create file");
 		return;
 	}
 
-	if (posix_memalign(&bufptr, 4096, 64*1024)) {
+	if (posix_memalign(&bufptr, 4096, 64 * 1024)) {
 		perror("cannot malloc aligned memory");
 		return;
 	}
 
-	memset(bufptr, 0, 64*1024);
+	memset(bufptr, 0, 64 * 1024);
 	for (i = 0; i < 1000; i++) {
-		if ((w = write(fd, bufptr, 64*1024)) != 64*1024) {
+		if ((w = write(fd, bufptr, 64 * 1024)) != 64 * 1024) {
 			fprintf(stderr, "write %d returned %d\n", i, w);
 		}
 	}
@@ -127,7 +128,7 @@
 	int i;
 
 	snprintf(filename, sizeof(filename), "%s/aiodio/file",
-		getenv("TMP") ? getenv("TMP") : "/tmp");
+		 getenv("TMP") ? getenv("TMP") : "/tmp");
 
 	printf("Begin dio_append test...\n");
 
@@ -154,5 +155,5 @@
 	for (i = 0; i < num_children; i++) {
 		kill(pid[i], SIGTERM);
 	}
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/dio_sparse.c b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
index 7d81897..7ad5f80 100644
--- a/testcases/kernel/io/ltp-aiodio/dio_sparse.c
+++ b/testcases/kernel/io/ltp-aiodio/dio_sparse.c
@@ -45,8 +45,8 @@
 static void usage(void);
 static int debug = 0;
 
-char *TCID="dio_sparse";
-int TST_TOTAL=1;
+char *TCID = "dio_sparse";
+int TST_TOTAL = 1;
 
 #include "common_sparse.h"
 
@@ -59,10 +59,10 @@
 	void *bufptr;
 	int i, w;
 
-	fd = open(filename, O_DIRECT|O_WRONLY|O_CREAT|O_EXCL, 0600);
+	fd = open(filename, O_DIRECT | O_WRONLY | O_CREAT | O_EXCL, 0600);
 
 	if (fd < 0) {
-		tst_resm(TBROK|TERRNO, "open()");
+		tst_resm(TBROK | TERRNO, "open()");
 		return 1;
 	}
 
@@ -70,14 +70,14 @@
 
 	if (posix_memalign(&bufptr, align, writesize)) {
 		close(fd);
-		tst_resm(TBROK|TERRNO, "posix_memalign()");
+		tst_resm(TBROK | TERRNO, "posix_memalign()");
 		return 1;
 	}
 
 	memset(bufptr, 0, writesize);
-	for (i = 0; i < filesize;)  {
+	for (i = 0; i < filesize;) {
 		if ((w = write(fd, bufptr, writesize)) != writesize) {
-			tst_resm(TBROK|TERRNO, "write() returned %d", w);
+			tst_resm(TBROK | TERRNO, "write() returned %d", w);
 			close(fd);
 			return 1;
 		}
@@ -106,7 +106,7 @@
 	int i;
 	long alignment = 512;
 	int writesize = 65536;
-	int filesize = 100*1024*1024;
+	int filesize = 100 * 1024 * 1024;
 	int c;
 	int children_errors = 0;
 	int ret;
@@ -116,19 +116,19 @@
 		switch (c) {
 		case 'd':
 			debug++;
-		break;
+			break;
 		case 'a':
 			alignment = strtol(optarg, &endp, 0);
 			alignment = scale_by_kmg(alignment, *endp);
-		break;
+			break;
 		case 'w':
 			writesize = strtol(optarg, &endp, 0);
 			writesize = scale_by_kmg(writesize, *endp);
-		break;
+			break;
 		case 's':
 			filesize = strtol(optarg, &endp, 0);
 			filesize = scale_by_kmg(filesize, *endp);
-		break;
+			break;
 		case 'n':
 			num_children = atoi(optarg);
 			if (num_children > NUM_CHILDREN) {
@@ -137,10 +137,10 @@
 					NUM_CHILDREN);
 				num_children = NUM_CHILDREN;
 			}
-		break;
+			break;
 		case '?':
 			usage();
-		break;
+			break;
 		}
 	}
 
@@ -154,12 +154,12 @@
 		switch (pid[i] = fork()) {
 		case 0:
 			read_sparse(filename, filesize);
-		break;
+			break;
 		case -1:
 			while (i-- > 0)
 				kill(pid[i], SIGTERM);
 
-			tst_brkm(TBROK|TERRNO, cleanup, "fork()");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork()");
 		default:
 			continue;
 		}
@@ -179,7 +179,7 @@
 
 		p = waitpid(pid[i], &status, 0);
 		if (p < 0) {
-			tst_resm(TBROK|TERRNO, "waitpid()");
+			tst_resm(TBROK | TERRNO, "waitpid()");
 		} else {
 			if (WIFEXITED(status) && WEXITSTATUS(status) == 10)
 				children_errors++;
@@ -188,7 +188,7 @@
 
 	if (children_errors)
 		tst_resm(TFAIL, "%i children(s) exited abnormally",
-		         children_errors);
+			 children_errors);
 
 	if (!children_errors && !ret)
 		tst_resm(TPASS, "Test passed");
diff --git a/testcases/kernel/io/ltp-aiodio/dio_truncate.c b/testcases/kernel/io/ltp-aiodio/dio_truncate.c
index a1d79e9..7458a19 100644
--- a/testcases/kernel/io/ltp-aiodio/dio_truncate.c
+++ b/testcases/kernel/io/ltp-aiodio/dio_truncate.c
@@ -47,7 +47,8 @@
 
 	while (size > 0) {
 		if (*buf != 0) {
-			fprintf(stderr, "non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
+			fprintf(stderr,
+				"non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
 				buf - p, (unsigned int)buf[0],
 				size > 1 ? (unsigned int)buf[1] : 0,
 				size > 2 ? (unsigned int)buf[2] : 0,
@@ -58,20 +59,21 @@
 		buf++;
 		size--;
 	}
-	return 0;	/* all zeros */
+	return 0;		/* all zeros */
 }
+
 int dio_read(char *filename)
 {
 	int fd;
 	int r;
 	void *bufptr;
 
-	if (posix_memalign(&bufptr, 4096, 64*1024)) {
+	if (posix_memalign(&bufptr, 4096, 64 * 1024)) {
 		perror("cannot malloc aligned memory");
 		return -1;
 	}
 
-	while ((fd = open(filename, O_DIRECT|O_RDONLY)) < 0) {
+	while ((fd = open(filename, O_DIRECT | O_RDONLY)) < 0) {
 	}
 	fprintf(stderr, "dio_truncate: child reading file\n");
 	while (1) {
@@ -81,10 +83,11 @@
 		/* read the file, checking for zeros */
 		offset = lseek(fd, SEEK_SET, 0);
 		do {
-			r = read(fd, bufptr, 64*1024);
+			r = read(fd, bufptr, 64 * 1024);
 			if (r > 0) {
 				if ((bufoff = check_zero(bufptr, r))) {
-					fprintf(stderr, "non-zero read at offset %p\n",
+					fprintf(stderr,
+						"non-zero read at offset %p\n",
 						offset + bufoff);
 					exit(1);
 				}
@@ -92,7 +95,7 @@
 			}
 		} while (r > 0);
 	}
-  return 0;
+	return 0;
 }
 
 void dio_append(char *filename, int fill)
@@ -102,22 +105,22 @@
 	int i;
 	int w;
 
-	fd = open(filename, O_DIRECT|O_WRONLY|O_CREAT, 0666);
+	fd = open(filename, O_DIRECT | O_WRONLY | O_CREAT, 0666);
 
 	if (fd < 0) {
 		perror("cannot create file");
 		return;
 	}
 
-	if (posix_memalign(&bufptr, 4096, 64*1024)) {
+	if (posix_memalign(&bufptr, 4096, 64 * 1024)) {
 		perror("cannot malloc aligned memory");
 		return;
 	}
 
-	memset(bufptr, fill, 64*1024);
+	memset(bufptr, fill, 64 * 1024);
 
 	for (i = 0; i < 1000; i++) {
-		if ((w = write(fd, bufptr, 64*1024)) != 64*1024) {
+		if ((w = write(fd, bufptr, 64 * 1024)) != 64 * 1024) {
 			fprintf(stderr, "write %d returned %d\n", i, w);
 		}
 	}
@@ -132,7 +135,7 @@
 	int i;
 
 	snprintf(filename, sizeof(filename), "%s/aiodio/file",
-		getenv("TMP") ? getenv("TMP") : "/tmp");
+		 getenv("TMP") ? getenv("TMP") : "/tmp");
 
 	for (i = 0; i < num_children; i++) {
 		if ((pid[i] = fork()) == 0) {
@@ -164,5 +167,5 @@
 		kill(pid[i], SIGTERM);
 	}
 
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/dirty.c b/testcases/kernel/io/ltp-aiodio/dirty.c
index e8be3a5..ada9b8a 100644
--- a/testcases/kernel/io/ltp-aiodio/dirty.c
+++ b/testcases/kernel/io/ltp-aiodio/dirty.c
@@ -37,18 +37,18 @@
 {
 	int fd;
 	int i;
-	char buf[32*1024];
+	char buf[32 * 1024];
 	char filename[PATH_MAX];
 
 	printf("Starting dirty tests...\n");
 
 	snprintf(filename, sizeof(filename), "%s/aiodio/file.xx.%d",
-		getenv("TMP") ? getenv("TMP") : "/tmp", getpid());
+		 getenv("TMP") ? getenv("TMP") : "/tmp", getpid());
 
-	fd = open(filename, O_CREAT|O_WRONLY, 0666);
+	fd = open(filename, O_CREAT | O_WRONLY, 0666);
 
 	memset(buf, 0xaa, sizeof(buf));
-	for (i = 0 ; i < 3000; i++)
+	for (i = 0; i < 3000; i++)
 		write(fd, buf, sizeof(buf));
 	fsync(fd);
 	close(fd);
diff --git a/testcases/kernel/io/ltp-aiodio/ltp-diorh.c b/testcases/kernel/io/ltp-aiodio/ltp-diorh.c
index 7984ba1..393f99d 100644
--- a/testcases/kernel/io/ltp-aiodio/ltp-diorh.c
+++ b/testcases/kernel/io/ltp-aiodio/ltp-diorh.c
@@ -52,123 +52,125 @@
 
 void assert(const char *what, int assertion)
 {
-		 if (assertion)
-		 		 return;
-		 perror(what);
-		 exit(1);
+	if (assertion)
+		return;
+	perror(what);
+	exit(1);
 }
 
 void do_buffered_writes(int fd, int pattern)
 {
-		 int rc;
-		 int offset;
+	int rc;
+	int offset;
 
-		 memset(iobuf, pattern, WRITESIZE);
-		 for (offset = 0; offset+WRITESIZE <= BIGSIZE; offset += WRITESIZE) {
-		 		 rc = pwrite(fd, iobuf, WRITESIZE, offset);
-		 		 assert("pwrite", rc >= 0);
-		 		 if (rc != WRITESIZE) {
-		 		 		 fprintf(stderr, "Pass %d: short write (%d out of %d)\n",
-		 		 		 		 pass, rc, WRITESIZE);
-		 		 		 exit(1);
-		 		 }
-		 		 fsync(fd);
-		 }
+	memset(iobuf, pattern, WRITESIZE);
+	for (offset = 0; offset + WRITESIZE <= BIGSIZE; offset += WRITESIZE) {
+		rc = pwrite(fd, iobuf, WRITESIZE, offset);
+		assert("pwrite", rc >= 0);
+		if (rc != WRITESIZE) {
+			fprintf(stderr, "Pass %d: short write (%d out of %d)\n",
+				pass, rc, WRITESIZE);
+			exit(1);
+		}
+		fsync(fd);
+	}
 }
 
 int do_direct_reads(char *filename)
 {
-		 int fd;
-		 int offset;
-		 int rc, i;
-		 int *p;
+	int fd;
+	int offset;
+	int rc, i;
+	int *p;
 
-		 fd = open(filename, O_DIRECT|O_RDONLY, 0);
-		 assert("open", fd >= 0);
+	fd = open(filename, O_DIRECT | O_RDONLY, 0);
+	assert("open", fd >= 0);
 
-		 for (offset = 0; offset+READSIZE <= BIGSIZE; offset += READSIZE) {
-		 		 rc = pread(fd, iobuf, READSIZE, offset);
-		 		 assert("pread", rc >= 0);
-		 		 if (rc != READSIZE) {
-		 		 		 fprintf(stderr, "Pass: %d short read (%d out of %d)\n",
-		 		 		 		 pass, rc, READSIZE);
-		 		 		 exit(1);
-		 		 }
-		 		 for (i=0, p=(int *)iobuf; i<READSIZE; i+=4) {
-		 		 		 if (*p) {
-		 		 		 		 fprintf(stderr,
-		 		 		 		 		 "Pass: %d Found data (%08x) at offset %d+%d\n",
-		 		 		 		 		 pass, *p, offset, i);
-                                 close(fd);
-		 		 		 		 return 1;
-		 		 		 }
-		 		 		 p++;
-		 		 }
-		 }
-		 close(fd);
-		 return 0;
+	for (offset = 0; offset + READSIZE <= BIGSIZE; offset += READSIZE) {
+		rc = pread(fd, iobuf, READSIZE, offset);
+		assert("pread", rc >= 0);
+		if (rc != READSIZE) {
+			fprintf(stderr, "Pass: %d short read (%d out of %d)\n",
+				pass, rc, READSIZE);
+			exit(1);
+		}
+		for (i = 0, p = (int *)iobuf; i < READSIZE; i += 4) {
+			if (*p) {
+				fprintf(stderr,
+					"Pass: %d Found data (%08x) at offset %d+%d\n",
+					pass, *p, offset, i);
+				close(fd);
+				return 1;
+			}
+			p++;
+		}
+	}
+	close(fd);
+	return 0;
 }
 
 int main(int argc, char *argv[])
 {
-		 char *filename;
-		 int fd;
-		 int pid;
-		 int err;
-		 int bufsize;
+	char *filename;
+	int fd;
+	int pid;
+	int err;
+	int bufsize;
 
-		 if (argc != 2) {
-		 		 fprintf(stderr, "Needs a filename as an argument.\n");
-		 		 exit(1);
-		 }
+	if (argc != 2) {
+		fprintf(stderr, "Needs a filename as an argument.\n");
+		exit(1);
+	}
 
-		 filename = argv[1];
+	filename = argv[1];
 
-		 pagesize = getpagesize();
-		 bufsize = READSIZE;
-		 if (WRITESIZE > READSIZE)
-		 		 bufsize = WRITESIZE;
-		 err = posix_memalign((void**) &iobuf, pagesize, bufsize);
-		 if (err) {
-		 		 fprintf(stderr, "Error allocating %d aligned bytes.\n", bufsize);
-		 		 exit(1);
-		 }
+	pagesize = getpagesize();
+	bufsize = READSIZE;
+	if (WRITESIZE > READSIZE)
+		bufsize = WRITESIZE;
+	err = posix_memalign((void **)&iobuf, pagesize, bufsize);
+	if (err) {
+		fprintf(stderr, "Error allocating %d aligned bytes.\n",
+			bufsize);
+		exit(1);
+	}
 
-		 fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0666);
-		 assert("open", fd >= 0);
+	fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0666);
+	assert("open", fd >= 0);
 
-		 do {
+	do {
 
-		 		 assert("ftruncate", ftruncate(fd, BIGSIZE) == 0);
-		 		 fsync(fd);
+		assert("ftruncate", ftruncate(fd, BIGSIZE) == 0);
+		fsync(fd);
 
-		 		 pid = fork();
-		 		 assert("fork", pid >= 0);
+		pid = fork();
+		assert("fork", pid >= 0);
 
-		 		 if (!pid) {
-		 		 		 do_buffered_writes(fd, 0);
-		 		 		 exit(0);
-		 		 }
+		if (!pid) {
+			do_buffered_writes(fd, 0);
+			exit(0);
+		}
 
-		 		 err = do_direct_reads(filename);
+		err = do_direct_reads(filename);
 
-		 		 wait4(pid, NULL, WNOHANG, 0);
+		wait4(pid, NULL, WNOHANG, 0);
 
-		 		 if (err)
-		 		 		 break;
+		if (err)
+			break;
 
-		 		 /* Fill the file with a known pattern so that the blocks
-		 		  * on disk can be detected if they become exposed. */
-		 		 do_buffered_writes(fd, 1);
-		 		 fsync(fd);
+		/* Fill the file with a known pattern so that the blocks
+		 * on disk can be detected if they become exposed. */
+		do_buffered_writes(fd, 1);
+		fsync(fd);
 
-		 		 assert("ftruncate", ftruncate(fd, 0) == 0);
-		 		 fsync(fd);
-		 } while (pass++ < MAX_ITERATIONS);
+		assert("ftruncate", ftruncate(fd, 0) == 0);
+		fsync(fd);
+	} while (pass++ < MAX_ITERATIONS);
 
-         if (!err) {
-             fprintf(stdout, "ltp-diorh: Completed %d iterations OK \n", pass);
-         }
+	if (!err) {
+		fprintf(stdout, "ltp-diorh: Completed %d iterations OK \n",
+			pass);
+	}
 
-		 return err;
+	return err;
 }
diff --git a/testcases/kernel/io/ltp-aiodio/read_checkzero.c b/testcases/kernel/io/ltp-aiodio/read_checkzero.c
index 9e07e29..744178d 100644
--- a/testcases/kernel/io/ltp-aiodio/read_checkzero.c
+++ b/testcases/kernel/io/ltp-aiodio/read_checkzero.c
@@ -41,7 +41,8 @@
 
 	while (size > 0) {
 		if (*buf != 0) {
-			fprintf(stderr, "non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
+			fprintf(stderr,
+				"non zero buffer at buf[%d] => 0x%02x,%02x,%02x,%02x\n",
 				buf - p, (unsigned int)buf[0],
 				size > 1 ? (unsigned int)buf[1] : 0,
 				size > 2 ? (unsigned int)buf[2] : 0,
@@ -52,8 +53,9 @@
 		buf++;
 		size--;
 	}
-	return 0;	/* all zeros */
+	return 0;		/* all zeros */
 }
+
 int read_eof(char *filename)
 {
 	int fd;
@@ -61,19 +63,19 @@
 	int r;
 	char buf[4096];
 
-       if ((fd = open(filename, O_RDWR)) < 0) {
-               fprintf(stderr, "can't open file %s \n",filename);
-               exit(1);
+	if ((fd = open(filename, O_RDWR)) < 0) {
+		fprintf(stderr, "can't open file %s \n", filename);
+		exit(1);
 	}
 
-	for (i = 0 ; i < 100000; i++) {
+	for (i = 0; i < 100000; i++) {
 		off_t offset;
 		char *bufoff;
 
-               offset = lseek(fd, 4096, SEEK_END);
-               r = write(fd,"A",1);
+		offset = lseek(fd, 4096, SEEK_END);
+		r = write(fd, "A", 1);
 
-               offset = lseek(fd, offset - 4096 , SEEK_SET);
+		offset = lseek(fd, offset - 4096, SEEK_SET);
 
 		r = read(fd, buf, 4096);
 		if (r > 0) {
@@ -85,19 +87,19 @@
 		}
 	}
 	fprintf(stderr, "read_checkzero done\n");
-  return 0;
+	return 0;
 }
 
 int main(int argc, char **argv)
 {
-    if (argc < 2) {
-        printf("You must pass a filename to the test \n");
-        exit(1);
-    }
+	if (argc < 2) {
+		printf("You must pass a filename to the test \n");
+		exit(1);
+	}
 
 	char *filename = argv[1];
 
 	read_eof(filename);
 
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/io/stress_cd/stress_cd.c b/testcases/kernel/io/stress_cd/stress_cd.c
index 2632a21..1048b62 100644
--- a/testcases/kernel/io/stress_cd/stress_cd.c
+++ b/testcases/kernel/io/stress_cd/stress_cd.c
@@ -63,7 +63,7 @@
  * USAGE: usage statement
  */
 #define DEFAULT_NUM_THREADS 	10
-#define DEFAULT_NUM_BYTES   	1024*1024*100 /* 100Mb */
+#define DEFAULT_NUM_BYTES   	1024*1024*100	/* 100Mb */
 #define DEFAULT_FILE        	"/dev/cdrom"
 
 /*
@@ -73,11 +73,11 @@
  * error (): Error message function
  * parse_args (): Parses command line arguments
  */
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void parse_args (int, char **);
-void *thread (int *);
-int read_data (int, unsigned long);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void parse_args(int, char **);
+void *thread(int *);
+int read_data(int, unsigned long);
 
 /*
  * Global Variables
@@ -95,76 +95,76 @@
 | Function:  Main program  (see prolog for more details)             |
 |                                                                    |
 +-------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	pthread_attr_t  attr;
+	pthread_attr_t attr;
 	pthread_t *array;
 	int *arg;
 	int rc = 0, i;
 
 	/* Parse command line arguments and print out program header */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
 	/* Read data from CDROM & compute checksum */
-	read_data (0, checksum);
+	read_data(0, checksum);
 	if (debug)
-	   printf("Thread [main] checksum: %-#12lx \n", checksum);
+		printf("Thread [main] checksum: %-#12lx \n", checksum);
 
-	if (pthread_attr_init (&attr))
-	   sys_error ("pthread_attr_init failed", __LINE__);
-	if (pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE))
-	   sys_error ("pthread_attr_setdetachstate failed", __LINE__);
+	if (pthread_attr_init(&attr))
+		sys_error("pthread_attr_init failed", __LINE__);
+	if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE))
+		sys_error("pthread_attr_setdetachstate failed", __LINE__);
 
 	/* Create num_thread threads... */
 	printf("\tThread [main] Creating %d threads\n", num_threads);
 
-	array = (pthread_t *) malloc (sizeof (pthread_t) * num_threads);
-	arg = (int *) malloc (sizeof (int) * num_threads);
-	assert (array);
-	assert (arg);
-	for (i=0; i < num_threads; i++)
-        {
-	    if (debug)
-	       printf("\tThread [main]: creating thread %d\n", i + 1);
-	    arg[i] = i + 1;
-	    if (pthread_create ((pthread_t *) &array [i], &attr, (void *)thread, (void *) &arg[i]))
-	    {
-	       if (errno == EAGAIN)
-		  fprintf(stderr, "\tThread [main]: unable to create thread %d\n", i);
-	       else
-		  sys_error ("pthread_create failed", __LINE__);
-	    }
-	    if (debug)
-	       printf("\tThread [main]: created thread %d\n", i+1);
+	array = (pthread_t *) malloc(sizeof(pthread_t) * num_threads);
+	arg = (int *)malloc(sizeof(int) * num_threads);
+	assert(array);
+	assert(arg);
+	for (i = 0; i < num_threads; i++) {
+		if (debug)
+			printf("\tThread [main]: creating thread %d\n", i + 1);
+		arg[i] = i + 1;
+		if (pthread_create
+		    ((pthread_t *) & array[i], &attr, (void *)thread,
+		     (void *)&arg[i])) {
+			if (errno == EAGAIN)
+				fprintf(stderr,
+					"\tThread [main]: unable to create thread %d\n",
+					i);
+			else
+				sys_error("pthread_create failed", __LINE__);
+		}
+		if (debug)
+			printf("\tThread [main]: created thread %d\n", i + 1);
 	}
-	if (pthread_attr_destroy (&attr))
-	   sys_error ("pthread_attr_destroy failed", __LINE__);
+	if (pthread_attr_destroy(&attr))
+		sys_error("pthread_attr_destroy failed", __LINE__);
 
-	for (i=0; i<num_threads; i++)
-        {
-	    int exit_value;
-	    printf("\tThread [main]: waiting for thread: %d\n", i+1);
-	    /*if (pthread_join ((pthread_t*) array [i], (void **) &exit_value))*/
-	    if (pthread_join ((pthread_t) array [i], (void **) &exit_value))
-	       sys_error ("pthread_join failed", __LINE__);
+	for (i = 0; i < num_threads; i++) {
+		int exit_value;
+		printf("\tThread [main]: waiting for thread: %d\n", i + 1);
+		/*if (pthread_join ((pthread_t*) array [i], (void **) &exit_value)) */
+		if (pthread_join((pthread_t) array[i], (void **)&exit_value))
+			sys_error("pthread_join failed", __LINE__);
 
-	    if (debug)
-	       printf("\tThread [%d]: return %d\n", i + 1, exit_value);
-	    rc += exit_value;
+		if (debug)
+			printf("\tThread [%d]: return %d\n", i + 1, exit_value);
+		rc += exit_value;
 	}
 	free(array);
 	free(arg);
 
 	/* One or more of the threads did not complete sucessfully! */
-	if (rc != 0)
-        {
-	   printf("test failed!\n");
-	   exit (-1);
+	if (rc != 0) {
+		printf("test failed!\n");
+		exit(-1);
 	}
 
 	/* Program completed successfully... */
 	printf("\tThread [main] All threads completed successfully...\n");
-	exit (0);
+	exit(0);
 }
 
 /*-------------------------------------------------------------------+
@@ -174,25 +174,24 @@
 | Function:  ...                                                     |
 |                                                                    |
 +-------------------------------------------------------------------*/
-void *thread (int *parm)
+void *thread(int *parm)
 {
 	int num = *parm;
 	unsigned long cksum = 0;
 
 	if (debug)
-           printf("\tThread [%d]: begin\n", num);
+		printf("\tThread [%d]: begin\n", num);
 
-	read_data (num, cksum);
-	if (checksum != cksum)
-        {
-	   fprintf(stderr, "\tThread [%d]: checksum mismatch!\n", num);
-	   pthread_exit ((void *) -1);
+	read_data(num, cksum);
+	if (checksum != cksum) {
+		fprintf(stderr, "\tThread [%d]: checksum mismatch!\n", num);
+		pthread_exit((void *)-1);
 	}
 
 	if (debug)
-           printf("\tThread [%d]: done\n", num);
+		printf("\tThread [%d]: done\n", num);
 
-	pthread_exit ((void *) 0);
+	pthread_exit((void *)0);
 	return (NULL);
 }
 
@@ -203,7 +202,7 @@
 | Function:  Reads data from the CDROM                               |
 |                                                                    |
 +-------------------------------------------------------------------*/
-int read_data (int num, unsigned long cksum)
+int read_data(int num, unsigned long cksum)
 {
 	int fd;
 	const int bufSize = 1024;
@@ -213,39 +212,39 @@
 	char *p;
 
 	if (debug)
-	   printf("\tThread [%d]: read_data()\n", num);
+		printf("\tThread [%d]: read_data()\n", num);
 
-	if ((fd = open (file, O_RDONLY, NULL)) < 0)
-	   sys_error ("open failed /dev/cdrom", __LINE__);
+	if ((fd = open(file, O_RDONLY, NULL)) < 0)
+		sys_error("open failed /dev/cdrom", __LINE__);
 
-        buffer = (char *) malloc (sizeof(char) * bufSize);
-	assert (buffer);
+	buffer = (char *)malloc(sizeof(char) * bufSize);
+	assert(buffer);
 
-	lseek(fd,1024*36,SEEK_SET);
-	while (bytes_read < num_bytes)
-        {
-	   if ((n = read (fd, buffer, bufSize)) < 0)
-	      sys_error ("read failed", __LINE__);
-	   bytes_read += n;
+	lseek(fd, 1024 * 36, SEEK_SET);
+	while (bytes_read < num_bytes) {
+		if ((n = read(fd, buffer, bufSize)) < 0)
+			sys_error("read failed", __LINE__);
+		bytes_read += n;
 
-	   for (p=buffer; p < buffer+n; p++)
-	      cksum += *p;
+		for (p = buffer; p < buffer + n; p++)
+			cksum += *p;
 
-	   if (debug)
-              printf("\tThread [%d] bytes read: %5d checksum: %-#12lx\n",
-		     num, bytes_read, cksum);
+		if (debug)
+			printf
+			    ("\tThread [%d] bytes read: %5d checksum: %-#12lx\n",
+			     num, bytes_read, cksum);
 	}
 	free(buffer);
 
 	if (debug)
-	   printf("\tThread [%d] bytes read: %5d checksum: %-#12lx\n",
-		  num, bytes_read, cksum);
+		printf("\tThread [%d] bytes read: %5d checksum: %-#12lx\n",
+		       num, bytes_read, cksum);
 
-	if (close (fd) < 0)
-	   sys_error ("close failed", __LINE__);
+	if (close(fd) < 0)
+		sys_error("close failed", __LINE__);
 
 	if (debug)
-	   printf("\tThread [%d]: done\n", num);
+		printf("\tThread [%d]: done\n", num);
 
 	return (0);
 }
@@ -264,54 +263,50 @@
 |            [-d]       enable debugging messages                    |
 |                                                                    |
 +-------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int		i;
-	int		errflag = 0;
-	char		*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
-	while ((i = getopt(argc, argv, "df:n:b:m:?")) != EOF)
-        {
-	   switch (i)
- 	   {
+	while ((i = getopt(argc, argv, "df:n:b:m:?")) != EOF) {
+		switch (i) {
 		case 'd':	/* debug option */
-				debug++;
-				break;
+			debug++;
+			break;
 		case 'f':	/* file to read from */
-				file = optarg;
-				break;
+			file = optarg;
+			break;
 		case 'm':	/* num MB to read */
-				num_bytes = atoi (optarg) * 1024 * 1024 ;
-				break;
+			num_bytes = atoi(optarg) * 1024 * 1024;
+			break;
 		case 'b':	/* num bytes to read */
-				num_bytes = atoi (optarg);
-				break;
+			num_bytes = atoi(optarg);
+			break;
 		case 'n':	/* number of threads */
-				num_threads = atoi (optarg);
-				break;
+			num_threads = atoi(optarg);
+			break;
 		case '?':	/* help */
-				errflag++;
-				break;
-	   }
+			errflag++;
+			break;
+		}
 	}
-	if (num_bytes < 0)
-        {
-	   errflag++;
-	   fprintf(stderr, "ERROR: num_bytes must be greater than 0");
+	if (num_bytes < 0) {
+		errflag++;
+		fprintf(stderr, "ERROR: num_bytes must be greater than 0");
 	}
 
-	if (errflag)
-        {
-	   fprintf(stderr, "\nUsage: %s"
-		   " [-n xx] [-m|b xx] [-d]\n\n"
-		   "\t-n xx    Number of threads to create (up to %d)\n"
-		   "\t-f file  File to read from\n"
-		   "\t-m xx    Number of MB to read\n"
-		   "\t-b xx    Number of bytes to read\n"
-		   "\t-d       Debug option\n", program_name,
-			       DEFAULT_NUM_THREADS);
-	   exit (2);
+	if (errflag) {
+		fprintf(stderr, "\nUsage: %s"
+			" [-n xx] [-m|b xx] [-d]\n\n"
+			"\t-n xx    Number of threads to create (up to %d)\n"
+			"\t-f file  File to read from\n"
+			"\t-m xx    Number of MB to read\n"
+			"\t-b xx    Number of bytes to read\n"
+			"\t-d       Debug option\n", program_name,
+			DEFAULT_NUM_THREADS);
+		exit(2);
 	}
 }
 
@@ -322,12 +317,12 @@
 | Function:  Creates system error message and calls error ()         |
 |                                                                    |
 +-------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror(errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*-------------------------------------------------------------------+
@@ -337,8 +332,8 @@
 | Function:  Prints out message and exits...                         |
 |                                                                    |
 +-------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
 	fprintf(stderr, "ERROR [line: %s] \n", msg);
-	exit (-1);
+	exit(-1);
 }
diff --git a/testcases/kernel/io/writetest/writetest.c b/testcases/kernel/io/writetest/writetest.c
index a67e39d..82a6859 100644
--- a/testcases/kernel/io/writetest/writetest.c
+++ b/testcases/kernel/io/writetest/writetest.c
@@ -56,188 +56,204 @@
 char *TCID = "writetest";
 int TST_TOTAL = 2;
 
-void buf_init(void )
+void buf_init(void)
 {
-    static int seed = 0;
-    if (seed == 0)
-        seed = DefaultSeed;
-    srand(seed);
+	static int seed = 0;
+	if (seed == 0)
+		seed = DefaultSeed;
+	srand(seed);
 }
 
-void buf_fill(uint8_t *buf)
+void buf_fill(uint8_t * buf)
 {
-    int i;
-    for (i=0; i<BLOCKSIZE; i++) {
-        *buf = (rand() & 0xff);
-        buf++;
-    }
+	int i;
+	for (i = 0; i < BLOCKSIZE; i++) {
+		*buf = (rand() & 0xff);
+		buf++;
+	}
 }
 
 int write_file(off_t num_blocks, const char *filename)
 {
-    int fd;
-    int ret = 0;
-    off_t block;
-    uint8_t buf[BLOCKSIZE];
+	int fd;
+	int ret = 0;
+	off_t block;
+	uint8_t buf[BLOCKSIZE];
 
-    fd = open(filename, O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, FILE_MODE);
-    if (fd < 0) {
-        perror(TCID);
-        return(-1);
-    }
-    for (block=0; block<num_blocks; block++) {
-        int rv;
-        if (Verbosity > 2)
-			tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
-        buf_fill(buf);
-        rv = write(fd, buf, BLOCKSIZE);
-        if (rv != BLOCKSIZE) {
-            ret = -1;
-            break;
-        }
-    }
-    if (Verbosity > 2)
-    	tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
-    close(fd);
-    return(ret);
+	fd = open(filename, O_RDWR | O_CREAT | O_TRUNC | O_LARGEFILE,
+		  FILE_MODE);
+	if (fd < 0) {
+		perror(TCID);
+		return (-1);
+	}
+	for (block = 0; block < num_blocks; block++) {
+		int rv;
+		if (Verbosity > 2)
+			tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r",
+				 (long long int)block,
+				 (long long int)num_blocks,
+				 (long long int)(block * 100 / num_blocks));
+		buf_fill(buf);
+		rv = write(fd, buf, BLOCKSIZE);
+		if (rv != BLOCKSIZE) {
+			ret = -1;
+			break;
+		}
+	}
+	if (Verbosity > 2)
+		tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r",
+			 (long long int)block, (long long int)num_blocks,
+			 (long long int)(block * 100 / num_blocks));
+	close(fd);
+	return (ret);
 }
 
 int verify_file(off_t num_blocks, const char *filename)
 {
-    int fd;
-    int ret = 0;
-    off_t block;
-    uint8_t buf_actual[BLOCKSIZE];
-    char buf_read[BLOCKSIZE];
+	int fd;
+	int ret = 0;
+	off_t block;
+	uint8_t buf_actual[BLOCKSIZE];
+	char buf_read[BLOCKSIZE];
 
-    fd = open(filename, O_RDONLY);
-    if (fd < 0) {
-        perror(TCID);
-        return(-1);
-    }
-    for (block=0; block<num_blocks; block++) {
-        int rv;
-        int n;
-        if (Verbosity > 2)
-        	tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
-        buf_fill(buf_actual);
-        rv = read(fd, buf_read, BLOCKSIZE);
-        if (rv != BLOCKSIZE) {
-            ret = -1;
-            break;
-        }
-        for (n=0; n<BLOCKSIZE; n++) {
-            int ba, br;
-            ba = buf_actual[n] & 0xff;
-            br = buf_read[n] & 0xff;
-            if (ba != br) {
-                if (Verbosity > 2)
-                	tst_resm(TINFO, "Mismatch: block=%lld +%d bytes offset=%lld read: %02xh actual: %02xh\n",
-                    (long long int)block, n, (long long int)((block*BLOCKSIZE)+n), br, ba);
-                ret++;
-            }
-        }
-    }
-    close(fd);
-    if (Verbosity > 2)
-    	tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r", (long long int)block, (long long int)num_blocks, (long long int)(block*100/num_blocks));
-    return(ret);
+	fd = open(filename, O_RDONLY);
+	if (fd < 0) {
+		perror(TCID);
+		return (-1);
+	}
+	for (block = 0; block < num_blocks; block++) {
+		int rv;
+		int n;
+		if (Verbosity > 2)
+			tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r",
+				 (long long int)block,
+				 (long long int)num_blocks,
+				 (long long int)(block * 100 / num_blocks));
+		buf_fill(buf_actual);
+		rv = read(fd, buf_read, BLOCKSIZE);
+		if (rv != BLOCKSIZE) {
+			ret = -1;
+			break;
+		}
+		for (n = 0; n < BLOCKSIZE; n++) {
+			int ba, br;
+			ba = buf_actual[n] & 0xff;
+			br = buf_read[n] & 0xff;
+			if (ba != br) {
+				if (Verbosity > 2)
+					tst_resm(TINFO,
+						 "Mismatch: block=%lld +%d bytes offset=%lld read: %02xh actual: %02xh\n",
+						 (long long int)block, n,
+						 (long long
+						  int)((block * BLOCKSIZE) + n),
+						 br, ba);
+				ret++;
+			}
+		}
+	}
+	close(fd);
+	if (Verbosity > 2)
+		tst_resm(TINFO, "Block: %lld/%lld  (%3lld%%)\r",
+			 (long long int)block, (long long int)num_blocks,
+			 (long long int)(block * 100 / num_blocks));
+	return (ret);
 }
 
 void usage(void)
 {
-    printf("%s [-v] [-b blocks] [-s seed] [-o filename]\n", TCID);
-    printf(
-        "\n"
-        "   -v          - increase verbosity level\n"
-        "   blocks      - number of blocks to write\n"
-        "   seed        - seed to use (0 to use timestamp)\n"
-        "   filename    - name of output file\n"
-        );
+	printf("%s [-v] [-b blocks] [-s seed] [-o filename]\n", TCID);
+	printf("\n"
+	       "   -v          - increase verbosity level\n"
+	       "   blocks      - number of blocks to write\n"
+	       "   seed        - seed to use (0 to use timestamp)\n"
+	       "   filename    - name of output file\n");
 }
 
 void parse_args(int argc, char **argv)
 {
-    int c;
-    TCID = argv[0];
+	int c;
+	TCID = argv[0];
 
-    while (1) {
-        int option_index = 0;
-        static struct option long_options[] = {
-            { "blocks", 1, 0, 'b' },
-            { "out", 1, 0, 'o' },
-            { "seed", 1, 0, 's' },
-            { "verbose", 0, 0, 'v' },
-            { "help", 0, 0, 'h' },
-            { 0, 0, 0, 0 }
-        };
-        c = getopt_long(argc, argv, "hvb:o:s:", long_options, &option_index);
-        if (c == -1)
-            break;
-        switch(c) {
-            case 'b':
-                NumBlocks = strtoul(optarg, NULL, 0);
-                break;
-            case 'o':
-                strncpy(Filename, optarg, MAX_FILENAME_LEN);
-                break;
-            case 's':
-                DefaultSeed = strtoul(optarg, NULL, 0);
-                break;
-            case 'v':
-                Verbosity++;
-                break;
-            case 'h':
-            default:
-                usage();
-                exit(-1);
-        }
-    }
+	while (1) {
+		int option_index = 0;
+		static struct option long_options[] = {
+			{"blocks", 1, 0, 'b'},
+			{"out", 1, 0, 'o'},
+			{"seed", 1, 0, 's'},
+			{"verbose", 0, 0, 'v'},
+			{"help", 0, 0, 'h'},
+			{0, 0, 0, 0}
+		};
+		c = getopt_long(argc, argv, "hvb:o:s:", long_options,
+				&option_index);
+		if (c == -1)
+			break;
+		switch (c) {
+		case 'b':
+			NumBlocks = strtoul(optarg, NULL, 0);
+			break;
+		case 'o':
+			strncpy(Filename, optarg, MAX_FILENAME_LEN);
+			break;
+		case 's':
+			DefaultSeed = strtoul(optarg, NULL, 0);
+			break;
+		case 'v':
+			Verbosity++;
+			break;
+		case 'h':
+		default:
+			usage();
+			exit(-1);
+		}
+	}
 }
 
 void setup()
 {
-    tst_tmpdir();
+	tst_tmpdir();
 
 }
 
 void cleanup(void)
 {
-    tst_rmdir();
-    tst_exit();
+	tst_rmdir();
+	tst_exit();
 }
 
 int main(int argc, char *argv[])
 {
-    int rv;
+	int rv;
 
-    setup();
+	setup();
 
-    DefaultSeed = time(NULL);
-    parse_args(argc, argv);
-    tst_resm(TINFO, "Blocks:       %lld\n", (long long int)NumBlocks);
-    tst_resm(TINFO, "Seed:         %d\n", DefaultSeed);
-    tst_resm(TINFO, "Output file: '%s'\n", Filename);
+	DefaultSeed = time(NULL);
+	parse_args(argc, argv);
+	tst_resm(TINFO, "Blocks:       %lld\n", (long long int)NumBlocks);
+	tst_resm(TINFO, "Seed:         %d\n", DefaultSeed);
+	tst_resm(TINFO, "Output file: '%s'\n", Filename);
 
-    tst_resm(TINFO, "Writing %lld blocks of %d bytes to '%s'\n", (long long int)NumBlocks, BLOCKSIZE, Filename);
-    buf_init();
-    rv = write_file(NumBlocks, Filename);
-    if (rv == 0) {
-        tst_resm(TPASS, "Write: Success");
-    } else {
-        tst_resm(TFAIL, "Write: Failure");
-    }
+	tst_resm(TINFO, "Writing %lld blocks of %d bytes to '%s'\n",
+		 (long long int)NumBlocks, BLOCKSIZE, Filename);
+	buf_init();
+	rv = write_file(NumBlocks, Filename);
+	if (rv == 0) {
+		tst_resm(TPASS, "Write: Success");
+	} else {
+		tst_resm(TFAIL, "Write: Failure");
+	}
 
-    tst_resm(TINFO, "Verifying %lld blocks in '%s'\n", (long long int)NumBlocks, Filename);
-    buf_init();
-    rv = verify_file(NumBlocks, Filename);
-    if (rv == 0) {
-        tst_resm(TPASS ,"Verify: Success\n");
-    } else {
-        tst_resm(TFAIL, "Verify: Failure");
-        tst_resm(TINFO, "Total mismatches: %d bytes\n", rv);
-    }
+	tst_resm(TINFO, "Verifying %lld blocks in '%s'\n",
+		 (long long int)NumBlocks, Filename);
+	buf_init();
+	rv = verify_file(NumBlocks, Filename);
+	if (rv == 0) {
+		tst_resm(TPASS, "Verify: Success\n");
+	} else {
+		tst_resm(TFAIL, "Verify: Failure");
+		tst_resm(TINFO, "Total mismatches: %d bytes\n", rv);
+	}
 
-    cleanup();
-  return 0;
+	cleanup();
+	return 0;
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_01.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_01.c
index 35c956b..6a64480 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_01.c
@@ -90,9 +90,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void child (int []);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void child(int[]);
 enum { READ, WRITE };
 
 /*---------------------------------------------------------------------+
@@ -105,70 +105,71 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	key_tt	msqid;			/* message queue id */
-	struct msgbuf	*buf;
-	pid_t	pid;
-	int	mode = 0666;
-	int	fd [2];
+	key_tt msqid;		/* message queue id */
+	struct msgbuf *buf;
+	pid_t pid;
+	int mode = 0666;
+	int fd[2];
 
-        /*
-         * Print out program header
-         */
-        printf ("%s: IPC Message Queue TestSuite program\n", *argv);
-	fflush (stdout);
-	pipe (fd);
+	/*
+	 * Print out program header
+	 */
+	printf("%s: IPC Message Queue TestSuite program\n", *argv);
+	fflush(stdout);
+	pipe(fd);
 
 	if ((pid = fork()) == 0) {
-		child (fd);
-		exit (0);
-	} else if (pid < (pid_t)0)
-		sys_error ("fork failed", __LINE__);
+		child(fd);
+		exit(0);
+	} else if (pid < (pid_t) 0)
+		sys_error("fork failed", __LINE__);
 
 	/*
 	 * Create a NEW unique message queue identifier.
 	 */
-	if ((msqid = msgget (IPC_PRIVATE,  mode|IPC_CREAT|IPC_EXCL)) < 0)
-		sys_error ("msgget failed", __LINE__);
-	printf ("\n\tCreate message queue, id: 0x%8.8x\n", msqid);
-	fflush (stdout);
+	if ((msqid = msgget(IPC_PRIVATE, mode | IPC_CREAT | IPC_EXCL)) < 0)
+		sys_error("msgget failed", __LINE__);
+	printf("\n\tCreate message queue, id: 0x%8.8x\n", msqid);
+	fflush(stdout);
 
 	/*
 	 * Send the newly created message queue identifier to the child
 	 * process via pipes.  Close pipes after sending identifier.
 	 */
-	close (fd [READ]);
-	if (write (fd [WRITE], &msqid, sizeof (key_tt)) < 0)
-		sys_error ("write failed", __LINE__);
-	close (fd [WRITE]);
+	close(fd[READ]);
+	if (write(fd[WRITE], &msqid, sizeof(key_tt)) < 0)
+		sys_error("write failed", __LINE__);
+	close(fd[WRITE]);
 
 	/*
 	 * Read the data from the message queue
 	 */
-	buf = (struct msgbuf *)calloc ((size_t)(sizeof(struct msgbuf) + BUF_SIZE),
-		sizeof (char));
+	buf =
+	    (struct msgbuf *)calloc((size_t) (sizeof(struct msgbuf) + BUF_SIZE),
+				    sizeof(char));
 	if (!buf)
-		sys_error ("calloc failed", __LINE__);
+		sys_error("calloc failed", __LINE__);
 
-	if (msgrcv (msqid, (void *)buf, (size_t)BUF_SIZE, FIRST_MSG, 0) < 0) {
+	if (msgrcv(msqid, (void *)buf, (size_t) BUF_SIZE, FIRST_MSG, 0) < 0) {
 		SAFE_FREE(buf);
-		sys_error ("msgsnd failed", __LINE__);
+		sys_error("msgsnd failed", __LINE__);
 	}
-	printf ("\n\tParent: received message: %s\n", buf->mtext);
-	fflush (stdout);
+	printf("\n\tParent: received message: %s\n", buf->mtext);
+	fflush(stdout);
 	SAFE_FREE(buf);
 
 	/*
 	 * Remove the message queue from the system
 	 */
-	printf ("\n\tRemove the message queue\n");
-	fflush (stdout);
-	if (msgctl (msqid, IPC_RMID, 0) < 0)
-		sys_error ("msgctl (IPC_RMID) failed", __LINE__);
+	printf("\n\tRemove the message queue\n");
+	fflush(stdout);
+	if (msgctl(msqid, IPC_RMID, 0) < 0)
+		sys_error("msgctl (IPC_RMID) failed", __LINE__);
 
-        printf ("\nsuccessful!\n");
-	fflush (stdout);
+	printf("\nsuccessful!\n");
+	fflush(stdout);
 	return (0);
 }
 
@@ -179,40 +180,41 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void child (int fd[])
+static void child(int fd[])
 {
-	key_tt	msqid;			/* message queue id */
-	size_t	nbytes;
-	struct msgbuf	*buf;
+	key_tt msqid;		/* message queue id */
+	size_t nbytes;
+	struct msgbuf *buf;
 
 	/*
 	 * Read the message queue identifier from the parent through
 	 * the pipe.  Close pipe after reading identifier.
 	 */
-	close (fd [WRITE]);
-	if (read (fd [READ], &msqid, sizeof (key_tt)) < 0)
-		sys_error ("read failed", __LINE__);
-	close (fd [READ]);
-        printf ("\n\tChild:  received message queue id: %d\n", msqid);
-	fflush (stdout);
+	close(fd[WRITE]);
+	if (read(fd[READ], &msqid, sizeof(key_tt)) < 0)
+		sys_error("read failed", __LINE__);
+	close(fd[READ]);
+	printf("\n\tChild:  received message queue id: %d\n", msqid);
+	fflush(stdout);
 
 	/*
 	 * Put data on the message queue
 	 */
-	buf = (struct msgbuf *)calloc ((size_t)(sizeof(struct msgbuf) + BUF_SIZE),
-		sizeof (char));
+	buf =
+	    (struct msgbuf *)calloc((size_t) (sizeof(struct msgbuf) + BUF_SIZE),
+				    sizeof(char));
 	if (!buf)
-		sys_error ("calloc failed", __LINE__);
+		sys_error("calloc failed", __LINE__);
 
 	buf->mtype = 1;
-	sprintf (buf->mtext, "\"message queue transmission test....\"");
-	nbytes =  strlen (buf->mtext) + 1;
+	sprintf(buf->mtext, "\"message queue transmission test....\"");
+	nbytes = strlen(buf->mtext) + 1;
 
-	printf ("\n\tChild:  sending message:  %s\n", buf->mtext);
-	fflush (stdout);
-	if (msgsnd (msqid, buf, nbytes, 0) < 0) {
+	printf("\n\tChild:  sending message:  %s\n", buf->mtext);
+	fflush(stdout);
+	if (msgsnd(msqid, buf, nbytes, 0) < 0) {
 		SAFE_FREE(buf);
-		sys_error ("msgsnd failed", __LINE__);
+		sys_error("msgsnd failed", __LINE__);
 	}
 	SAFE_FREE(buf);
 }
@@ -224,12 +226,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -239,8 +241,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_ctl.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_ctl.c
index cf46d27..6021a3b 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_ctl.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_ctl.c
@@ -81,9 +81,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
@@ -91,10 +91,10 @@
  * project_name: Unique path used to create key (ftok)
  * project_id:   Unique number used to create key (ftok)
  */
-char	*project_name = DEFAULT_PROJECT_NAME;
-char	project_id = DEFAULT_PROJECT_ID;
-int	rflg = 0;
-int	sflg = 0;
+char *project_name = DEFAULT_PROJECT_NAME;
+char project_id = DEFAULT_PROJECT_ID;
+int rflg = 0;
+int sflg = 0;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -106,51 +106,51 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	key_t	key;			/* Unique key */
-	int	msqid;			/* Message queue identifier */
-	struct msqid_ds buf;		/* Message queue info */
+	key_t key;		/* Unique key */
+	int msqid;		/* Message queue identifier */
+	struct msqid_ds buf;	/* Message queue info */
 
 	/*
 	 * Parse command line options
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-	if ((key = ftok (project_name, project_id)) < 0)
-		sys_error ("ftok failed", __LINE__);
+	if ((key = ftok(project_name, project_id)) < 0)
+		sys_error("ftok failed", __LINE__);
 
-	if ((msqid = msgget (key, S_IRUSR|S_IWUSR)) < 0)
-		sys_error ("msgget failed", __LINE__);
+	if ((msqid = msgget(key, S_IRUSR | S_IWUSR)) < 0)
+		sys_error("msgget failed", __LINE__);
 
 	if (sflg) {
-		if (msgctl (msqid, IPC_STAT, &buf) < 0)
-			sys_error ("msgctl (IPC_STAT) failed", __LINE__);
+		if (msgctl(msqid, IPC_STAT, &buf) < 0)
+			sys_error("msgctl (IPC_STAT) failed", __LINE__);
 
-		printf ("uid	%d\n",  buf.msg_perm.uid);
-		printf ("gid	%d\n",  buf.msg_perm.gid);
-		printf ("cuid	%d\n",  buf.msg_perm.cuid);
-		printf ("cgid	%d\n",  buf.msg_perm.cgid);
-		printf ("mode	%d\n",  buf.msg_perm.mode);
+		printf("uid	%d\n", buf.msg_perm.uid);
+		printf("gid	%d\n", buf.msg_perm.gid);
+		printf("cuid	%d\n", buf.msg_perm.cuid);
+		printf("cgid	%d\n", buf.msg_perm.cgid);
+		printf("mode	%d\n", buf.msg_perm.mode);
 #ifdef _LINUX_
-		printf ("seq	%ld\n",  (long int)buf.msg_perm.__seq);
-		printf ("key	0x%x\n",  buf.msg_perm.__key);
+		printf("seq	%ld\n", (long int)buf.msg_perm.__seq);
+		printf("key	0x%x\n", buf.msg_perm.__key);
 #else
-		printf ("seq	%d\n",  buf.msg_perm.seq);
-		printf ("key	%\n",  buf.msg_perm.key);
+		printf("seq	%d\n", buf.msg_perm.seq);
+		printf("key	%\n", buf.msg_perm.key);
 #endif
-		printf ("cbytes	%ld\n",  buf.msg_cbytes);
-		printf ("qnum	%ld\n",  buf.msg_qnum);
-		printf ("qbytes	%ld\n",  buf.msg_qbytes);
-		printf ("lspid	%d\n",  buf.msg_lspid);
-		printf ("lrpid	%d\n",  buf.msg_lrpid);
-		printf ("stime	%ld\n", buf.msg_stime);
-		printf ("rtime	%ld\n", buf.msg_rtime);
-		printf ("rtime	%ld\n", buf.msg_ctime);
+		printf("cbytes	%ld\n", buf.msg_cbytes);
+		printf("qnum	%ld\n", buf.msg_qnum);
+		printf("qbytes	%ld\n", buf.msg_qbytes);
+		printf("lspid	%d\n", buf.msg_lspid);
+		printf("lrpid	%d\n", buf.msg_lrpid);
+		printf("stime	%ld\n", buf.msg_stime);
+		printf("rtime	%ld\n", buf.msg_rtime);
+		printf("rtime	%ld\n", buf.msg_ctime);
 	}
 	if (rflg) {
-		if (msgctl (msqid, IPC_RMID, 0) < 0)
-			sys_error ("msgctl (IPC_RMID) failed", __LINE__);
+		if (msgctl(msqid, IPC_RMID, 0) < 0)
+			sys_error("msgctl (IPC_RMID) failed", __LINE__);
 	}
 	exit(0);
 }
@@ -173,33 +173,33 @@
 |            [-r]        remove message queue                          |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "rsf:i:")) != EOF) {
 		switch (opt) {
-			case 's':	/* queue status */
-				sflg++;
-				break;
-			case 'r':	/* remove queue */
-				rflg++;
-				break;
-			case 'f':	/* project file */
-				project_name = optarg;
-				break;
-			case 'i':	/* project id */
-				project_id = *optarg;
-				break;
-			default:
-				errflag++;
-				break;
+		case 's':	/* queue status */
+			sflg++;
+			break;
+		case 'r':	/* remove queue */
+			rflg++;
+			break;
+		case 'f':	/* project file */
+			project_name = optarg;
+			break;
+		case 'i':	/* project id */
+			project_id = *optarg;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	/*
@@ -209,8 +209,8 @@
 		errflag++;
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -221,12 +221,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -236,8 +236,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_get.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_get.c
index 4bba8ab..7161ebc 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_get.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_get.c
@@ -81,9 +81,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
@@ -91,8 +91,8 @@
  * project_name: Unique path used to create key (ftok)
  * project_id:   Unique number used to create key (ftok)
  */
-char	*project_name = DEFAULT_PROJECT_NAME;
-char	project_id = DEFAULT_PROJECT_ID;
+char *project_name = DEFAULT_PROJECT_NAME;
+char project_id = DEFAULT_PROJECT_ID;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -104,31 +104,31 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	key_t	key;		/* Unique key */
-	int	msqid;		/* Message queue identifier */
-	int	fd;		/* Temp file descriptor */
-	mode_t	mode = 0777;	/* Default mode bits */
+	key_t key;		/* Unique key */
+	int msqid;		/* Message queue identifier */
+	int fd;			/* Temp file descriptor */
+	mode_t mode = 0777;	/* Default mode bits */
 
 	/*
 	 * Parse command line options
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-	if ((fd = open (project_name, O_CREAT | O_RDWR, mode)) < 0)
-		sys_error ("open failed", __LINE__);
+	if ((fd = open(project_name, O_CREAT | O_RDWR, mode)) < 0)
+		sys_error("open failed", __LINE__);
 
 	if (close(fd) < 0)
-		sys_error ("close failed", __LINE__);
+		sys_error("close failed", __LINE__);
 
-	if ((key = ftok (project_name, project_id)) < 0)
-		sys_error ("ftok failed", __LINE__);
+	if ((key = ftok(project_name, project_id)) < 0)
+		sys_error("ftok failed", __LINE__);
 
-	if ((msqid = msgget (key, IPC_CREAT|S_IRUSR|S_IWUSR)) < 0)
-		sys_error ("msgget failed", __LINE__);
+	if ((msqid = msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR)) < 0)
+		sys_error("msgget failed", __LINE__);
 
-	printf ("%d\n", msqid);
+	printf("%d\n", msqid);
 
 	return (0);
 }
@@ -147,32 +147,32 @@
 |            [-i] num:   project id                                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "f:i:")) != EOF) {
 		switch (opt) {
-			case 'f':	/* project file */
-				project_name = optarg;
-				break;
-			case 'i':	/* project id */
-				project_id = *optarg;
-				break;
-			default:
-				errflag++;
-				break;
+		case 'f':	/* project file */
+			project_name = optarg;
+			break;
+		case 'i':	/* project id */
+			project_id = *optarg;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -183,12 +183,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -198,8 +198,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_rcv.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_rcv.c
index 8153ef8..78c10bf 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_rcv.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_rcv.c
@@ -82,9 +82,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
@@ -92,8 +92,8 @@
  * project_name: Unique path used to create key (ftok)
  * project_id:   Unique number used to create key (ftok)
  */
-char	*project_name = DEFAULT_PROJECT_NAME;
-char	project_id = DEFAULT_PROJECT_ID;
+char *project_name = DEFAULT_PROJECT_NAME;
+char project_id = DEFAULT_PROJECT_ID;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -105,30 +105,31 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	key_t	key;			/* Unique key */
-	int	msqid;			/* Message queue identifier */
-	struct msgbuf *message;		/* Message buffer */
+	key_t key;		/* Unique key */
+	int msqid;		/* Message queue identifier */
+	struct msgbuf *message;	/* Message buffer */
 
 	/*
 	 * Parse command line options
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-	if ((key = ftok (project_name, project_id)) < 0)
-		sys_error ("ftok failed", __LINE__);
+	if ((key = ftok(project_name, project_id)) < 0)
+		sys_error("ftok failed", __LINE__);
 
-	if ((msqid = msgget (key, S_IRUSR|S_IWUSR)) < 0)
-		sys_error ("msgget failed", __LINE__);
+	if ((msqid = msgget(key, S_IRUSR | S_IWUSR)) < 0)
+		sys_error("msgget failed", __LINE__);
 
-	message = (struct msgbuf *)calloc ((size_t)(sizeof(struct msgbuf) + BUF_SIZE),
-		sizeof (char));
-	if (msgrcv (msqid, message, BUF_SIZE, 0, 0) < 0)
-		sys_error ("msgrcv failed", __LINE__);
+	message =
+	    (struct msgbuf *)calloc((size_t) (sizeof(struct msgbuf) + BUF_SIZE),
+				    sizeof(char));
+	if (msgrcv(msqid, message, BUF_SIZE, 0, 0) < 0)
+		sys_error("msgrcv failed", __LINE__);
 
-	printf ("%s\n", message->mtext);
-	free (message);
+	printf("%s\n", message->mtext);
+	free(message);
 
 	return (0);
 }
@@ -147,32 +148,32 @@
 |            [-i] num:   project id                                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "f:i:")) != EOF) {
 		switch (opt) {
-			case 'f':	/* project file */
-				project_name = optarg;
-				break;
-			case 'i':	/* project id */
-				project_id = *optarg;
-				break;
-			default:
-				errflag++;
-				break;
+		case 'f':	/* project file */
+			project_name = optarg;
+			break;
+		case 'i':	/* project id */
+			project_id = *optarg;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -183,12 +184,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -198,8 +199,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_snd.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_snd.c
index 6b74c14..4b94272 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_02_snd.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_02_snd.c
@@ -57,9 +57,9 @@
 #include <unistd.h>
 #include <sys/ipc.h>
 #ifdef _LINUX_
-# include <sys/stat.h>
+#include <sys/stat.h>
 // defines struct msgbuf
-# define __USE_GNU
+#define __USE_GNU
 #endif
 #include <sys/msg.h>
 #include <sys/types.h>
@@ -73,7 +73,7 @@
  */
 #define BUF_SIZE		256
 #define DEFAULT_MESSAGE 	"<< Message Queue test default message >>"
-//#define DEFAULT_MESSAGE 	""
+//#define DEFAULT_MESSAGE       ""
 #define DEFAULT_PROJECT_NAME 	"/tmp/message_queue_test"
 #define DEFAULT_PROJECT_ID	20
 #define USAGE	"\nUsage: %s [-f project_name ] [-i project_id ] \n" \
@@ -86,9 +86,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
@@ -97,10 +97,10 @@
  * project_name: Unique path used to create key (ftok)
  * project_id:   Unique number used to create key (ftok)
  */
-size_t	bytes = 0;
-char	*message = DEFAULT_MESSAGE;
-char	*project_name = DEFAULT_PROJECT_NAME;
-char	project_id = DEFAULT_PROJECT_ID;
+size_t bytes = 0;
+char *message = DEFAULT_MESSAGE;
+char *project_name = DEFAULT_PROJECT_NAME;
+char project_id = DEFAULT_PROJECT_ID;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -112,46 +112,46 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	struct msgbuf *buf;		/* Message buffer */
-	key_t	key;			/* Unique key */
-	int	msqid;			/* Message queue identifier */
-	size_t	size;			/* Size of message buffer */
+	struct msgbuf *buf;	/* Message buffer */
+	key_t key;		/* Unique key */
+	int msqid;		/* Message queue identifier */
+	size_t size;		/* Size of message buffer */
 
 	/*
 	 * Parse command line options
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-	if ((key = ftok (project_name, project_id)) < 0)
-		sys_error ("ftok failed", __LINE__);
+	if ((key = ftok(project_name, project_id)) < 0)
+		sys_error("ftok failed", __LINE__);
 
-	if ((msqid = msgget (key, S_IRUSR|S_IWUSR)) < 0)
-		sys_error ("msgget failed", __LINE__);
+	if ((msqid = msgget(key, S_IRUSR | S_IWUSR)) < 0)
+		sys_error("msgget failed", __LINE__);
 
 	if (bytes) {
-		buf = (struct msgbuf *) calloc (bytes + sizeof(struct msgbuf),
-			sizeof (char));
+		buf = (struct msgbuf *)calloc(bytes + sizeof(struct msgbuf),
+					      sizeof(char));
 		buf->mtype = 1L;
 
-		if (msgsnd (msqid, buf, bytes, 0) < 0)
-			sys_error ("msgsnd failed", __LINE__);
+		if (msgsnd(msqid, buf, bytes, 0) < 0)
+			sys_error("msgsnd failed", __LINE__);
 
-		free (buf);
+		free(buf);
 
 	} else {
-		size = strlen (message) + 1;
-		buf = (struct msgbuf *) calloc (size + sizeof(struct msgbuf),
-			sizeof (char));
+		size = strlen(message) + 1;
+		buf = (struct msgbuf *)calloc(size + sizeof(struct msgbuf),
+					      sizeof(char));
 
 		buf->mtype = 1L;
-		strcpy (buf->mtext, message);
+		strcpy(buf->mtext, message);
 
-		if (msgsnd (msqid, buf, size, 0) < 0)
-			sys_error ("msgsnd failed", __LINE__);
+		if (msgsnd(msqid, buf, size, 0) < 0)
+			sys_error("msgsnd failed", __LINE__);
 
-		free (buf);
+		free(buf);
 	}
 
 	return (0);
@@ -175,38 +175,38 @@
 |            [-b] byes:  number of bytes to send                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "b:m:f:i:")) != EOF) {
 		switch (opt) {
-			case 'b':	/* number of bytes to send */
-				bytes = atoi (optarg);
-				break;
-			case 'm':	/* message to send */
-				message = optarg;
-				break;
-			case 'f':	/* project file */
-				project_name = optarg;
-				break;
-			case 'i':	/* project id */
-				project_id = *optarg;
-				break;
-			default:
-				errflag++;
-				break;
+		case 'b':	/* number of bytes to send */
+			bytes = atoi(optarg);
+			break;
+		case 'm':	/* message to send */
+			message = optarg;
+			break;
+		case 'f':	/* project file */
+			project_name = optarg;
+			break;
+		case 'i':	/* project id */
+			project_id = *optarg;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -217,12 +217,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -232,8 +232,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_04.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_04.c
index 3bb9eab..9f511a7 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_04.c
@@ -78,19 +78,19 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
  *
  * log_filename: Name of log file
  */
-int	verbose	= 0;
-int	logit	= 0;
-FILE	*logfile;
-char	*log_filename = NULL;
+int verbose = 0;
+int logit = 0;
+FILE *logfile;
+char *log_filename = NULL;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -102,42 +102,43 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	struct msqid_ds info;	/* Message queue info */
 	struct msgbuf buf;	/* Message queue buffer */
-	int	mode = 0777;	/* Default mode bits */
-	int	msqid;		/* Message queue identifier */
-	size_t 	max_bytes;	/* Num bytes sent to message queue */
-	size_t 	msg_size;	/* Num bytes sent to message queue */
-	unsigned long	bytes_sent;	/* Num bytes sent to message queue */
+	int mode = 0777;	/* Default mode bits */
+	int msqid;		/* Message queue identifier */
+	size_t max_bytes;	/* Num bytes sent to message queue */
+	size_t msg_size;	/* Num bytes sent to message queue */
+	unsigned long bytes_sent;	/* Num bytes sent to message queue */
 
 	/*
 	 * Parse command line options
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 	if (logit) {
-		if ((logfile = fopen (log_filename, "w")) == NULL)
-			sys_error ("msgget failed", __LINE__);
+		if ((logfile = fopen(log_filename, "w")) == NULL)
+			sys_error("msgget failed", __LINE__);
 	}
 
 	/*
 	 * Print out program header
 	 */
-	printf ("%s: IPC Message Queue TestSuite program\n\n", *argv);
+	printf("%s: IPC Message Queue TestSuite program\n\n", *argv);
 	if (logit)
-		fprintf (logfile, "%s: IPC Message Queue TestSuite program\n\n", *argv);
+		fprintf(logfile, "%s: IPC Message Queue TestSuite program\n\n",
+			*argv);
 
 	/*
 	 * Obtain a unique message queue identifier using msgget()
 	 */
-	if ((msqid = msgget (IPC_PRIVATE, IPC_CREAT|mode)) < 0)
-		sys_error ("msgget failed", __LINE__);
+	if ((msqid = msgget(IPC_PRIVATE, IPC_CREAT | mode)) < 0)
+		sys_error("msgget failed", __LINE__);
 
 	if (verbose)
-		printf ("\tCreated message queue: %d\n\n", msqid);
+		printf("\tCreated message queue: %d\n\n", msqid);
 	if (logit)
-		fprintf (logfile, "\tCreated message queue: %d\n\n", msqid);
+		fprintf(logfile, "\tCreated message queue: %d\n\n", msqid);
 
 	/*
 	 * Determine message queue limits
@@ -146,8 +147,8 @@
 	 * queue will hold.  Then determine the message size
 	 * (Max num of bytes per queue / maximum num of messages per queue)
 	 */
-	if (msgctl (msqid, IPC_STAT, &info) < 0)
-		sys_error ("msgctl (IPC_STAT) failed", __LINE__);
+	if (msgctl(msqid, IPC_STAT, &info) < 0)
+		sys_error("msgctl (IPC_STAT) failed", __LINE__);
 
 	max_bytes = info.msg_qbytes;
 
@@ -156,17 +157,21 @@
 	 * problem, but here is not the right place to test floating point...
 	 * msg_size  = (size_t) (0.5 + ((float) max_bytes / MAX_MSGS));
 	 */
-	msg_size  = (size_t)((max_bytes + MAX_MSGS - 1) / MAX_MSGS);
+	msg_size = (size_t) ((max_bytes + MAX_MSGS - 1) / MAX_MSGS);
 
 	if (verbose) {
-		printf ("\tMax num of bytes per queue:  %ld\n", (long)max_bytes);
-		printf ("\tMax messages per queue:      %d\n",  MAX_MSGS);
-		printf ("\tCorresponding message size:  %ld\n\n", (long)msg_size);
+		printf("\tMax num of bytes per queue:  %ld\n", (long)max_bytes);
+		printf("\tMax messages per queue:      %d\n", MAX_MSGS);
+		printf("\tCorresponding message size:  %ld\n\n",
+		       (long)msg_size);
 	}
 	if (logit) {
-		fprintf (logfile, "\tMax num of bytes per queue:  %ld\n",  (long)max_bytes);
-		fprintf (logfile, "\tMax messages per queue:      %d\n",  MAX_MSGS);
-		fprintf (logfile, "\tCorresponding message size:  %ld\n\n", (long)msg_size);
+		fprintf(logfile, "\tMax num of bytes per queue:  %ld\n",
+			(long)max_bytes);
+		fprintf(logfile, "\tMax messages per queue:      %d\n",
+			MAX_MSGS);
+		fprintf(logfile, "\tCorresponding message size:  %ld\n\n",
+			(long)msg_size);
 	}
 
 	/*
@@ -174,40 +179,42 @@
 	 *
 	 * Send bytes to the message queue until it fills up
 	 */
-	//	buf = (struct msgbuf *) calloc (msg_size + sizeof(struct msgbuf), sizeof (char));
+	//      buf = (struct msgbuf *) calloc (msg_size + sizeof(struct msgbuf), sizeof (char));
 
 	buf.mtype = 1L;
 
 	bytes_sent = 0;
 	while (bytes_sent < max_bytes - msg_size) {
-		if (msgsnd (msqid, &buf, msg_size, 0) < 0)
-			sys_error ("msgsnd failed", __LINE__);
+		if (msgsnd(msqid, &buf, msg_size, 0) < 0)
+			sys_error("msgsnd failed", __LINE__);
 		bytes_sent += msg_size;
 		//usleep(5000);
 		if (verbose) {
-			printf ("\r\tBytes sent: %ld", (long)bytes_sent);
+			printf("\r\tBytes sent: %ld", (long)bytes_sent);
 			fflush(stdout);
-		  }
+		}
 	}
-	if (verbose) puts ("\n");
-	if (logit) fprintf (logfile, "\tBytes sent: %ld\n", (long)bytes_sent);
+	if (verbose)
+		puts("\n");
+	if (logit)
+		fprintf(logfile, "\tBytes sent: %ld\n", (long)bytes_sent);
 	//free (buf);
 
 	/*
 	 * Remove the message queue
 	 */
-	if (msgctl (msqid, IPC_RMID, 0) < 0)
-		sys_error ("msgctl (IPC_RMID) failed", __LINE__);
+	if (msgctl(msqid, IPC_RMID, 0) < 0)
+		sys_error("msgctl (IPC_RMID) failed", __LINE__);
 	if (verbose)
-		printf ("\n\tRemoved message queue: %d\n", msqid);
+		printf("\n\tRemoved message queue: %d\n", msqid);
 	if (logit)
-		fprintf (logfile, "\n\tRemoved message queue: %d\n", msqid);
+		fprintf(logfile, "\n\tRemoved message queue: %d\n", msqid);
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 	if (logit) {
-		fprintf (logfile, "\nsuccessful!\n");
-		fclose (logfile);
+		fprintf(logfile, "\nsuccessful!\n");
+		fclose(logfile);
 	}
 
 	return (0);
@@ -227,33 +234,33 @@
 |            [-l] logfile: log file name                               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "vl:")) != EOF) {
 		switch (opt) {
-			case 'v':	/* verbose */
-				verbose++;
-				break;
-			case 'l':	/* log file */
-				logit++;
-				log_filename = optarg;
-				break;
-			default:
-				errflag++;
-				break;
+		case 'v':	/* verbose */
+			verbose++;
+			break;
+		case 'l':	/* log file */
+			logit++;
+			log_filename = optarg;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -264,12 +271,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -279,10 +286,10 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
 	if (logit)
-		fprintf (logfile, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+		fprintf(logfile, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/message_queue_test_05.c b/testcases/kernel/ipc/ipc_stress/message_queue_test_05.c
index d1e8258..e475b48 100644
--- a/testcases/kernel/ipc/ipc_stress/message_queue_test_05.c
+++ b/testcases/kernel/ipc/ipc_stress/message_queue_test_05.c
@@ -96,10 +96,10 @@
  * error (): Error message function
  * cleanup (): Cleanup function for the test
  */
-static void parse_args (int, char **);
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void cleanup (int qnum);
+static void parse_args(int, char **);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void cleanup(int qnum);
 /*
  * Global variables
  *
@@ -107,9 +107,9 @@
  * msqid_array: array containing the unique message queue identifiers
  * debug: debugging flag, set with [-d] command line option
  */
-int	max_queues = DEFAULT_MESSAGE_QUEUES;
-int	msqid_array [MAX_MESSAGE_QUEUES];
-int	debug = 0;
+int max_queues = DEFAULT_MESSAGE_QUEUES;
+int msqid_array[MAX_MESSAGE_QUEUES];
+int debug = 0;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -121,28 +121,28 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	nqueues = 0;	/* Current number of message queues */
-	int	i;		/* Loop index */
-	int	mode = 0777;	/* Misc mode bits */
+	int nqueues = 0;	/* Current number of message queues */
+	int i;			/* Loop index */
+	int mode = 0777;	/* Misc mode bits */
 
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Message Queue TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Message Queue TestSuite program\n", *argv);
 
-	printf ("\n\tCreating %d message queues ...\n", max_queues);
+	printf("\n\tCreating %d message queues ...\n", max_queues);
 	while (nqueues < max_queues) {
 
-		for (i=0; i<3; i++) {
-			if (debug) printf ("\tcreating queue [%d]\n", nqueues);
-			if ((msqid_array [nqueues++]
-				= msgget (IPC_PRIVATE, IPC_CREAT|mode)) < 0)
-			{
+		for (i = 0; i < 3; i++) {
+			if (debug)
+				printf("\tcreating queue [%d]\n", nqueues);
+			if ((msqid_array[nqueues++]
+			     = msgget(IPC_PRIVATE, IPC_CREAT | mode)) < 0) {
 				cleanup(nqueues);
-				sys_error ("msgget failed", __LINE__);
+				sys_error("msgget failed", __LINE__);
 			}
 
 			if (nqueues > MAX_MESSAGE_QUEUES)
@@ -152,14 +152,15 @@
 		/*
 		 * Delete the last message queue...
 		 */
-		if (msgctl (msqid_array [--nqueues], IPC_RMID, 0) < 0)
-			sys_error ("msgctl (IPC_RMID) failed", __LINE__);
-		if (debug) printf ("\tremoved queue  [%d]\n", nqueues);
+		if (msgctl(msqid_array[--nqueues], IPC_RMID, 0) < 0)
+			sys_error("msgctl (IPC_RMID) failed", __LINE__);
+		if (debug)
+			printf("\tremoved queue  [%d]\n", nqueues);
 	}
-	printf ("\n\tAll message queues created successfully\n");
+	printf("\n\tAll message queues created successfully\n");
 
-        cleanup(nqueues);
-	printf ("\nsuccessful!\n");
+	cleanup(nqueues);
+	printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -175,35 +176,35 @@
 |            [-n] num:   number of message queues to create            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
 	while ((opt = getopt(argc, argv, "n:d")) != EOF) {
 		switch (opt) {
-			case 'n':	/* number of queues to create */
-				max_queues = atoi (optarg);
-				break;
-			case 'd':	/* debug */
-				debug++;
-				break;
-			default:
-				errflag++;
-				break;
+		case 'n':	/* number of queues to create */
+			max_queues = atoi(optarg);
+			break;
+		case 'd':	/* debug */
+			debug++;
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (max_queues > MAX_MESSAGE_QUEUES)
 		errflag++;
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -214,12 +215,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -229,10 +230,10 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
 
 /*---------------------------------------------------------------------+
@@ -245,14 +246,15 @@
 +---------------------------------------------------------------------*/
 void cleanup(int qnum)
 {
-        /*
-         *  Remove the allocated message queues.
-         */
-        while (qnum > 0) {
-		if (msqid_array [--qnum] < 0)
+	/*
+	 *  Remove the allocated message queues.
+	 */
+	while (qnum > 0) {
+		if (msqid_array[--qnum] < 0)
 			continue;
-                if (msgctl (msqid_array [qnum], IPC_RMID, 0) < 0)
-                        sys_error ("msgctl (IPC_RMID) failed", __LINE__);
-                if (debug) printf ("\tremoved queue  [%d]\n", qnum);
-        }
+		if (msgctl(msqid_array[qnum], IPC_RMID, 0) < 0)
+			sys_error("msgctl (IPC_RMID) failed", __LINE__);
+		if (debug)
+			printf("\tremoved queue  [%d]\n", qnum);
+	}
 }
diff --git a/testcases/kernel/ipc/ipc_stress/pipe_test_01.c b/testcases/kernel/ipc/ipc_stress/pipe_test_01.c
index e1849cf..0a74ca0 100644
--- a/testcases/kernel/ipc/ipc_stress/pipe_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/pipe_test_01.c
@@ -66,10 +66,10 @@
 #include <sys/wait.h>
 
 /* Function prototypes */
-void sys_error (const char *, int);	/* System error message function */
-void error (const char *, int);	/* Error message function */
-void setup_handler ();		/* Sets up signal catching function */
-void handler (int, int, struct sigcontext *);	/* Signal catching function */
+void sys_error(const char *, int);	/* System error message function */
+void error(const char *, int);	/* Error message function */
+void setup_handler();		/* Sets up signal catching function */
+void handler(int, int, struct sigcontext *);	/* Signal catching function */
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -78,27 +78,27 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	pid [2];		/* Child process ids */
-	int	fd [2];  		/* Pipe file descriptors */
-	int	status;			/* Child's exit status */
+	int pid[2];		/* Child process ids */
+	int fd[2];		/* Pipe file descriptors */
+	int status;		/* Child's exit status */
 
-	enum { READ, WRITE };		/* Constants */
+	enum { READ, WRITE };	/* Constants */
 	enum { childA, childB };
 
 	/*
 	 * Setup signal catching function for SIGPIPE in case an
 	 * error occurs
 	 */
-	setup_handler ();
+	setup_handler();
 
 	/*
 	 * Create a Pipe for data transfer between the two child
 	 * processes.
 	 */
-	if (pipe (fd) < 0)
-			sys_error ("pipe failed", __LINE__);
+	if (pipe(fd) < 0)
+		sys_error("pipe failed", __LINE__);
 
 	/*
 	 * Create child process, run command and write info into pipe.
@@ -107,24 +107,25 @@
 	 * end of the pipe, so the the output of the exec'd command will
 	 * be written into the pipe.  Then exec the cat command.
 	 */
-	if ((pid [childA] = fork()) < 0)
-		sys_error ("fork failed", __LINE__);
+	if ((pid[childA] = fork()) < 0)
+		sys_error("fork failed", __LINE__);
 
-	if (pid [childA] == 0) {
+	if (pid[childA] == 0) {
 		/* Child process */
 
-		close (fd [READ]);
+		close(fd[READ]);
 
 		/* Redirect STDOUT to fd [WRITE] */
-		if (fd [WRITE] != STDOUT_FILENO) {
-			if (dup2 (fd [WRITE], STDOUT_FILENO) != STDOUT_FILENO)
-				sys_error ("dup2 failed", __LINE__);
+		if (fd[WRITE] != STDOUT_FILENO) {
+			if (dup2(fd[WRITE], STDOUT_FILENO) != STDOUT_FILENO)
+				sys_error("dup2 failed", __LINE__);
 		}
-		close (fd [WRITE]);
+		close(fd[WRITE]);
 
 /* Vernon Mauery 6/1/2001 changed path and file to work will more flavors of unix */
-		execl ("/bin/cat", "cat", "/etc/inittab", NULL);
-		sys_error ("execl failed (should not reach this line) ", __LINE__);
+		execl("/bin/cat", "cat", "/etc/inittab", NULL);
+		sys_error("execl failed (should not reach this line) ",
+			  __LINE__);
 	}
 
 	/*
@@ -135,37 +136,38 @@
 	 * to stdin, so that the input of the exec'd command will come
 	 * from the pipe.  Then exec the wc command.
 	 */
-	if ((pid [childB] = fork()) < 0)
-		sys_error ("fork failed", __LINE__);
+	if ((pid[childB] = fork()) < 0)
+		sys_error("fork failed", __LINE__);
 
-	if (pid [childB] == 0) {
+	if (pid[childB] == 0) {
 		/* Child process */
-		close (fd [WRITE]);
+		close(fd[WRITE]);
 
-		if (fd [READ] != STDIN_FILENO) {
-			if (dup2 (fd [READ], STDIN_FILENO) != STDIN_FILENO)
-				sys_error ("dup2 failed", __LINE__);
+		if (fd[READ] != STDIN_FILENO) {
+			if (dup2(fd[READ], STDIN_FILENO) != STDIN_FILENO)
+				sys_error("dup2 failed", __LINE__);
 		}
-		close (fd [READ]);
+		close(fd[READ]);
 
-		execl ("/usr/bin/wc","wc","-c",NULL);
-		sys_error ("execl failed (should not reach this line) ", __LINE__);
+		execl("/usr/bin/wc", "wc", "-c", NULL);
+		sys_error("execl failed (should not reach this line) ",
+			  __LINE__);
 	}
 
 	/*
 	 * Close both ends of the pipe and wait for the child processes
 	 * to complete.
 	 */
-	close (fd [READ]);
-	close (fd [WRITE]);
+	close(fd[READ]);
+	close(fd[WRITE]);
 
-	waitpid (pid [childA], &status, 0);
-	if (!WIFEXITED (status))
-		sys_error ("child process A terminated abnormally", __LINE__);
+	waitpid(pid[childA], &status, 0);
+	if (!WIFEXITED(status))
+		sys_error("child process A terminated abnormally", __LINE__);
 
-	waitpid (pid [childB], &status, 0);
-	if (!WIFEXITED (status))
-		sys_error ("child process B terminated abnormally", __LINE__);
+	waitpid(pid[childB], &status, 0);
+	if (!WIFEXITED(status))
+		sys_error("child process B terminated abnormally", __LINE__);
 
 	/* Program completed successfully -- exit */
 	return (0);
@@ -178,16 +180,16 @@
 | Function:  Setup the signal handler for SIGPIPE.                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void setup_handler ()
+void setup_handler()
 {
 	struct sigaction invec;
 
-	invec.sa_handler = (void (*)(int)) handler;
-	sigemptyset (&invec.sa_mask);
+	invec.sa_handler = (void (*)(int))handler;
+	sigemptyset(&invec.sa_mask);
 	invec.sa_flags = 0;
 
-	if (sigaction (SIGPIPE, &invec, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	if (sigaction(SIGPIPE, &invec, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -199,9 +201,9 @@
 | Returns:   Aborts program & prints message upon receiving signal.    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig, int code, struct sigcontext *scp)
+void handler(int sig, int code, struct sigcontext *scp)
 {
-	error ("wrote to pipe with closed read end", __LINE__);
+	error("wrote to pipe with closed read end", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -211,12 +213,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -226,8 +228,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/pipe_test_02.c b/testcases/kernel/ipc/ipc_stress/pipe_test_02.c
index e29f787..a8f8c13 100644
--- a/testcases/kernel/ipc/ipc_stress/pipe_test_02.c
+++ b/testcases/kernel/ipc/ipc_stress/pipe_test_02.c
@@ -108,13 +108,13 @@
  * setup_signal_handlers (): Sets up signal catching functions
  * handler (): Signal catching function
  */
-void setup (int, char **);
-void child (int [], int []);
-void cleanup ();
-void sys_error (const char *, int);
-void error (const char *, int);
-void setup_signal_handlers ();
-void handler (int, int, struct sigcontext *);
+void setup(int, char **);
+void child(int[], int[]);
+void cleanup();
+void sys_error(const char *, int);
+void error(const char *, int);
+void setup_signal_handlers();
+void handler(int, int, struct sigcontext *);
 
 /*
  * Structures & Global variables
@@ -137,26 +137,26 @@
 enum { READ, WRITE };		/* Pipe read & write end indices */
 
 struct data_packet {
-	pid_t		pid;		/* Child process id */
-	int 		last;		/* Indicates last packet when set */
-	long 		valid;		/* Insure packet was not garbled */
-	long 		seq_number;	/* Packet sequence number */
-	unsigned long	checksum;	/* Cumulative checksum so far */
-	unsigned char	data;		/* Data sent in packet */
+	pid_t pid;		/* Child process id */
+	int last;		/* Indicates last packet when set */
+	long valid;		/* Insure packet was not garbled */
+	long seq_number;	/* Packet sequence number */
+	unsigned long checksum;	/* Cumulative checksum so far */
+	unsigned char data;	/* Data sent in packet */
 };
 typedef struct data_packet data_packet;
 
-int     num_children = DEFAULT_NUM_CHILDREN;
-long	num_packets  = DEFAULT_PACKETS_TO_SEND;
-int	non_blocking_flag = 0;	/* Uses NON-BLOCKING pipes when set */
-int	bflg = 0;		/* Data quantity flag (MB) */
-int	mflg = 0;		/* Data quantity flag (bytes) */
+int num_children = DEFAULT_NUM_CHILDREN;
+long num_packets = DEFAULT_PACKETS_TO_SEND;
+int non_blocking_flag = 0;	/* Uses NON-BLOCKING pipes when set */
+int bflg = 0;			/* Data quantity flag (MB) */
+int mflg = 0;			/* Data quantity flag (bytes) */
 
-pid_t	parent_pid;		/* Parent's process id */
-pid_t	pid [MAXCHILD];		/* Process id's of spawned processes */
-int	p2child [MAXCHILD][2]; 	/* Pipes from parent to child processes */
-int	p2parent [2];  		/* Pipe from child processes to parent */
-char	err_msg [256];		/* Generic error message buffer */
+pid_t parent_pid;		/* Parent's process id */
+pid_t pid[MAXCHILD];		/* Process id's of spawned processes */
+int p2child[MAXCHILD][2];	/* Pipes from parent to child processes */
+int p2parent[2];		/* Pipe from child processes to parent */
+char err_msg[256];		/* Generic error message buffer */
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -168,23 +168,23 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int 	i;
-	int 	n;		/* Number of bytes written */
-	int	status;		/* Child's exit status */
-	long	packets_sent;
-	unsigned char 	data;
-	unsigned long 	cksum_parent = 0;
-	data_packet	packet;
+	int i;
+	int n;			/* Number of bytes written */
+	int status;		/* Child's exit status */
+	long packets_sent;
+	unsigned char data;
+	unsigned long cksum_parent = 0;
+	data_packet packet;
 
 	/*
 	 * Parse command line arguments, initialize global variables and
 	 * print program header
 	 */
-	setup (argc, argv);
-	printf ("%s: IPC Pipe TestSuite program\n", *argv);
-	fflush (stdout);
+	setup(argc, argv);
+	printf("%s: IPC Pipe TestSuite program\n", *argv);
+	fflush(stdout);
 
 	/*
 	 * Create two sets of half duplex pipes:
@@ -199,25 +199,27 @@
 	 * prevent reads & and writes from blocking if the data is not yet
 	 * available
 	 */
-	printf ("\n\tCreating pipes...\n");
-	fflush (stdout);
+	printf("\n\tCreating pipes...\n");
+	fflush(stdout);
 
-	if (pipe (p2parent) < 0)
-		sys_error ("pipe failed", __LINE__);
+	if (pipe(p2parent) < 0)
+		sys_error("pipe failed", __LINE__);
 
 	if (non_blocking_flag) {
-		printf ("\n\tSending data NON-BLOCKING!\n");
-		fflush (stdout);
+		printf("\n\tSending data NON-BLOCKING!\n");
+		fflush(stdout);
 	}
 
-	for (i=0; i<num_children; i++) {
-		if (pipe (&p2child [i][0]) < 0)
-			sys_error ("pipe failed", __LINE__);
+	for (i = 0; i < num_children; i++) {
+		if (pipe(&p2child[i][0]) < 0)
+			sys_error("pipe failed", __LINE__);
 		if (non_blocking_flag) {
-			if (fcntl (p2child [i][READ], F_SETFL, O_NONBLOCK) < 0)
-				sys_error ("fcntl (O_NONBLOCK) failed", __LINE__);
-			if (fcntl (p2child [i][WRITE], F_SETFL, O_NONBLOCK) < 0)
-				sys_error ("fcntl (O_NONBLOCK) failed", __LINE__);
+			if (fcntl(p2child[i][READ], F_SETFL, O_NONBLOCK) < 0)
+				sys_error("fcntl (O_NONBLOCK) failed",
+					  __LINE__);
+			if (fcntl(p2child[i][WRITE], F_SETFL, O_NONBLOCK) < 0)
+				sys_error("fcntl (O_NONBLOCK) failed",
+					  __LINE__);
 		}
 	}
 
@@ -232,25 +234,25 @@
 	 * Also close the WRITE end of the p2parent pipe, for just the
 	 * the reverse reasons...
 	 */
-	printf ("\n\tSpawning %d child processes ... \n", num_children);
-	fflush (stdout);
+	printf("\n\tSpawning %d child processes ... \n", num_children);
+	fflush(stdout);
 
-	for (i=0; i<num_children; i++) {
+	for (i = 0; i < num_children; i++) {
 
-		if ((pid [i] = fork()) == 0) {
+		if ((pid[i] = fork()) == 0) {
 
 			/* Child process */
-			child (&p2child[i][0], p2parent);
-			exit (0);
+			child(&p2child[i][0], p2parent);
+			exit(0);
 
-		} else if (pid [i] < (pid_t)0)
-			sys_error ("fork failed", __LINE__);
+		} else if (pid[i] < (pid_t) 0)
+			sys_error("fork failed", __LINE__);
 
-		if (close (p2child [i][READ]) < 0)
-			sys_error ("close failed", __LINE__);
+		if (close(p2child[i][READ]) < 0)
+			sys_error("close failed", __LINE__);
 	}
-	if (close (p2parent [WRITE]) < 0)
-		sys_error ("close failed", __LINE__);
+	if (close(p2parent[WRITE]) < 0)
+		sys_error("close failed", __LINE__);
 
 	/*
 	 * Send data packets to the child processes
@@ -261,8 +263,9 @@
 	 * Might have to make several attempts with the NON-BLOCKING writes
 	 * if the resource is not immediately available.
 	 */
-	printf ("\n\tParent: sending %ld packets (%ld bytes) to child processes ...\n",
-		num_packets, num_packets * sizeof (struct data_packet));
+	printf
+	    ("\n\tParent: sending %ld packets (%ld bytes) to child processes ...\n",
+	     num_packets, num_packets * sizeof(struct data_packet));
 
 	packet.last = 0;
 	packet.valid = VALID_PACKET;
@@ -271,17 +274,17 @@
 
 		packet.seq_number = ++packets_sent;
 		packet.data = data++;
-		packet.pid = pid [i];
+		packet.pid = pid[i];
 		packet.checksum = cksum_parent += packet.data;
 
-		for (i=0; i<num_children; i++) {
-			try_write_ETXN_again:
-			if ((n = write (p2child [i][WRITE], &packet,
-					sizeof (packet))) < 0) {
+		for (i = 0; i < num_children; i++) {
+try_write_ETXN_again:
+			if ((n = write(p2child[i][WRITE], &packet,
+				       sizeof(packet))) < 0) {
 				if (non_blocking_flag && errno == EAGAIN) {
 					goto try_write_ETXN_again;
 				} else {
-					sys_error ("write failed", __LINE__);
+					sys_error("write failed", __LINE__);
 				}
 			}
 		}
@@ -308,38 +311,39 @@
 	 * receiving checksums from the child.
 	 */
 	packet.last = 1;
-	printf ("\n\tParent: done sending packets & waiting for children to complete!\n");
-	for (i=0; i<num_children; i++) {
-		try_read_again:
-		if (write (p2child [i][WRITE], &packet, sizeof (packet)) < 0) {
+	printf
+	    ("\n\tParent: done sending packets & waiting for children to complete!\n");
+	for (i = 0; i < num_children; i++) {
+try_read_again:
+		if (write(p2child[i][WRITE], &packet, sizeof(packet)) < 0) {
 			if (non_blocking_flag && errno == EAGAIN) {
 				goto try_read_again;
 			} else {
-				sys_error ("write failed", __LINE__);
+				sys_error("write failed", __LINE__);
 			}
 		}
-		if (close (p2child [i][WRITE]) < 0)
-			sys_error ("close failed", __LINE__);
+		if (close(p2child[i][WRITE]) < 0)
+			sys_error("close failed", __LINE__);
 
-		if (read (p2parent [READ], &packet, sizeof (packet)) <= 0)
-			sys_error ("read failed", __LINE__);
+		if (read(p2parent[READ], &packet, sizeof(packet)) <= 0)
+			sys_error("read failed", __LINE__);
 
 		if (packet.valid != VALID_PACKET)
-			error ("received packet with corrupted data from child!",
-				__LINE__);
+			error("received packet with corrupted data from child!",
+			      __LINE__);
 
 		if (cksum_parent != packet.checksum) {
-			sprintf (err_msg, "checksum of data sent by parent " \
-				"does not match checksum of data received by " \
-				"child [pid %d]\n"	\
-				"\tchild's checksum: %08lx\n" \
+			sprintf(err_msg, "checksum of data sent by parent "
+				"does not match checksum of data received by "
+				"child [pid %d]\n"
+				"\tchild's checksum: %08lx\n"
 				"\tparent's checksum: %08lx\n",
 				packet.pid, packet.checksum, cksum_parent);
-			error (err_msg, __LINE__);
+			error(err_msg, __LINE__);
 		}
 	}
-	if (close (p2parent [READ]) < 0)
-		sys_error ("close failed", __LINE__);
+	if (close(p2parent[READ]) < 0)
+		sys_error("close failed", __LINE__);
 
 	/*
 	 * Wait for all of the child processes to complete & check their
@@ -347,17 +351,18 @@
 	 *
 	 * Upon completion of the child proccesses, exit program with success.
 	 */
-	for (i=0; i<num_children; i++) {
-		waitpid (pid [i], &status, 0);
+	for (i = 0; i < num_children; i++) {
+		waitpid(pid[i], &status, 0);
 
-		if (!WIFEXITED (status))
-			sys_error ("child process terminated abnormally",
-				__LINE__);
+		if (!WIFEXITED(status))
+			sys_error("child process terminated abnormally",
+				  __LINE__);
 	}
-	printf ("\n\tParent: children received all packets & exited successfully\n");
+	printf
+	    ("\n\tParent: children received all packets & exited successfully\n");
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -377,17 +382,17 @@
 | Returns:   Exits with (-1) if an error occurs                        |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void child (int p2child [], int p2parent [])
+void child(int p2child[], int p2parent[])
 {
-	int	n;			/* Bytes read */
-	pid_t	pid = getpid ();	/* Process id of child */
-	int	end_of_transmission = 0;
-	long	packets_received = 0;	/* Number of packets received
+	int n;			/* Bytes read */
+	pid_t pid = getpid();	/* Process id of child */
+	int end_of_transmission = 0;
+	long packets_received = 0;	/* Number of packets received
 					 * from parent
 					 */
 
-	data_packet 	packet;		/* Packet used to transmiting data */
-	unsigned long 	cksum_child = 0;/* Checksum of data fields received */
+	data_packet packet;	/* Packet used to transmiting data */
+	unsigned long cksum_child = 0;	/* Checksum of data fields received */
 
 	/*
 	 * Close the WRITE end of the p2child pipe, since the child
@@ -395,10 +400,10 @@
 	 * Also close the READ end of the p2parent pipe, for just the
 	 * the reverse reasons...
 	 */
-	if (close (p2child [WRITE]) < 0)
-		sys_error ("close failed", __LINE__);
-	if (close (p2parent [READ]) < 0)
-		sys_error ("close failed", __LINE__);
+	if (close(p2child[WRITE]) < 0)
+		sys_error("close failed", __LINE__);
+	if (close(p2parent[READ]) < 0)
+		sys_error("close failed", __LINE__);
 
 	/*
 	 * Receive packets from parent & insure packets are valid
@@ -416,22 +421,22 @@
 	 * from the parent.
 	 */
 	while (!end_of_transmission) {
-		try_write_again:
-		n = read (p2child [READ], &packet, sizeof (packet));
+try_write_again:
+		n = read(p2child[READ], &packet, sizeof(packet));
 		if (n < 0) {
 			/* Resource not available */
 			if (non_blocking_flag && errno == EAGAIN)
 				goto try_write_again;
 			else
-				sys_error ("read failed", __LINE__);
+				sys_error("read failed", __LINE__);
 		} else if (n > 0) {
 			/* Insure packet is valid */
 			if (packet.valid != VALID_PACKET) {
-				sprintf (err_msg,
-					"child received invalid packet " \
+				sprintf(err_msg,
+					"child received invalid packet "
 					"from parent:\n\tpacket #: %ld\n",
 					packets_received);
-				error (err_msg, __LINE__);
+				error(err_msg, __LINE__);
 			}
 			/* Received last packet */
 			if (packet.last) {
@@ -441,30 +446,32 @@
 				/* Insure packet was not received out of sequence */
 				packets_received++;
 				if (packets_received != packet.seq_number) {
-					sprintf (err_msg,
-						"child received packet out of sequence\n" \
-						"\texpecting packet: %ld\n" \
+					sprintf(err_msg,
+						"child received packet out of sequence\n"
+						"\texpecting packet: %ld\n"
 						"\treceived packet:  %ld\n",
-						packets_received, packet.seq_number);
-					error (err_msg, __LINE__);
+						packets_received,
+						packet.seq_number);
+					error(err_msg, __LINE__);
 				}
 
 				/* Insure checksums still match */
 				cksum_child += packet.data;
 				if (cksum_child != packet.checksum) {
-					sprintf (err_msg,
-						"child & parent checksums do not match\n" \
-						"\tchild checksum:  %08lx\n" \
-						"\tparent checksum: %08lx\n" \
+					sprintf(err_msg,
+						"child & parent checksums do not match\n"
+						"\tchild checksum:  %08lx\n"
+						"\tparent checksum: %08lx\n"
 						"\tpacket number:   %ld\n",
-						cksum_child, packet.checksum, packets_received);
-					error (err_msg, __LINE__);
+						cksum_child, packet.checksum,
+						packets_received);
+					error(err_msg, __LINE__);
 				}
 			}
 		}
 	}
-	if (close (p2child [READ]) < 0)
-		sys_error ("close failed", __LINE__);
+	if (close(p2child[READ]) < 0)
+		sys_error("close failed", __LINE__);
 
 	/*
 	 * Send parent packet containing child's checksum
@@ -475,17 +482,17 @@
 	 * Then close the WRITE p2parent pipe as we have finished sending packets
 	 * to the parent.
 	 */
-	printf ("\t\tChild:  pid [%d] received %ld packets from parent\n",
-		pid, packets_received);
+	printf("\t\tChild:  pid [%d] received %ld packets from parent\n",
+	       pid, packets_received);
 
 	packet.pid = pid;
 	packet.valid = VALID_PACKET;
 	packet.checksum = cksum_child;
 
-	if (write (p2parent [WRITE], &packet, sizeof (packet)) < 0)
-		sys_error ("write failed", __LINE__);
-	if (close (p2parent [WRITE]) < 0)
-		sys_error ("close failed", __LINE__);
+	if (write(p2parent[WRITE], &packet, sizeof(packet)) < 0)
+		sys_error("write failed", __LINE__);
+	if (close(p2parent[WRITE]) < 0)
+		sys_error("close failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -505,59 +512,59 @@
 |            [-c] num_children: number of child processes to spawn ... |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void setup (int argc, char **argv)
+void setup(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	int 	bytes = 0, megabytes = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	int bytes = 0, megabytes = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "nm:b:p:?")) != EOF) {
 		switch (i) {
-			case 'n':		/* NON-BLOCKING flag */
-				non_blocking_flag++;
-				break;
-			case 'm':		/* MB */
-				mflg++;
-				megabytes = atoi (optarg);
-				break;
-			case 'b':		/* bytes */
-				bflg++;
-				bytes = atoi (optarg);
-				break;
-			case 'p':		/* number of child procs */
-				num_children = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 'n':	/* NON-BLOCKING flag */
+			non_blocking_flag++;
+			break;
+		case 'm':	/* MB */
+			mflg++;
+			megabytes = atoi(optarg);
+			break;
+		case 'b':	/* bytes */
+			bflg++;
+			bytes = atoi(optarg);
+			break;
+		case 'p':	/* number of child procs */
+			num_children = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 	if (mflg) {
-		num_packets = megabytes * MB / sizeof (struct data_packet);
+		num_packets = megabytes * MB / sizeof(struct data_packet);
 	} else if (bflg) {
-		num_packets = bytes / sizeof (struct data_packet);
+		num_packets = bytes / sizeof(struct data_packet);
 	}
 
 	if (num_packets == 0 || num_children == 0 || num_children > MAXCHILD)
 		errflag++;
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name, MAXCHILD);
-		exit (2);
+		fprintf(stderr, USAGE, program_name, MAXCHILD);
+		exit(2);
 	}
 	/*
 	 * Setup signal catching function for SIGPIPE & SIGINT, record
 	 * the process id of the parent and initialize the child process
 	 * id array.
 	 */
-	setup_signal_handlers ();
+	setup_signal_handlers();
 
-	parent_pid = getpid ();
+	parent_pid = getpid();
 
-	for (i=0; i<num_children; i++) {
-		pid [i] = (pid_t)0;
+	for (i = 0; i < num_children; i++) {
+		pid[i] = (pid_t) 0;
 	}
 }
 
@@ -568,19 +575,19 @@
 | Function:  Setup the signal handler for SIGPIPE.                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void setup_signal_handlers ()
+void setup_signal_handlers()
 {
 	struct sigaction invec;
 
-	invec.sa_handler = (void (*)(int)) handler;
-	sigemptyset (&invec.sa_mask);
+	invec.sa_handler = (void (*)(int))handler;
+	sigemptyset(&invec.sa_mask);
 	invec.sa_flags = 0;
 
-	if (sigaction (SIGINT, &invec, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	if (sigaction(SIGINT, &invec, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 
-	if (sigaction (SIGPIPE, &invec, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	if (sigaction(SIGPIPE, &invec, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -597,25 +604,24 @@
 |            o  Other:   Print message and abort program...            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig, int code, struct sigcontext *scp)
+void handler(int sig, int code, struct sigcontext *scp)
 {
-	char 	msg [100];	/* Buffer for error message */
+	char msg[100];		/* Buffer for error message */
 
 	if (sig == SIGPIPE) {
-		error ("wrote to pipe with closed read end", __LINE__);
+		error("wrote to pipe with closed read end", __LINE__);
 	} else if (sig == SIGINT) {
-		if (getpid () == parent_pid) {
+		if (getpid() == parent_pid) {
 
-			fprintf (stderr, "Received SIGINT -- cleaning up...\n");
-			fflush (stderr);
+			fprintf(stderr, "Received SIGINT -- cleaning up...\n");
+			fflush(stderr);
 
-			cleanup ();
-		}
-		else
-			exit (-1);
+			cleanup();
+		} else
+			exit(-1);
 	} else {
-		sprintf (msg, "Received an unexpected signal (%d)", sig);
-		error (msg, __LINE__);
+		sprintf(msg, "Received an unexpected signal (%d)", sig);
+		error(msg, __LINE__);
 	}
 }
 
@@ -627,23 +633,23 @@
 |            processes and exits the program...                        |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void cleanup ()
+void cleanup()
 {
 	int i;
 
-	if (getpid () == parent_pid) {
-		for (i=0; i<num_children; i++) {
-			if (pid [i] > (pid_t)0 && kill (pid [i], SIGKILL) < 0)
-				sys_error ("signal failed", __LINE__);
+	if (getpid() == parent_pid) {
+		for (i = 0; i < num_children; i++) {
+			if (pid[i] > (pid_t) 0 && kill(pid[i], SIGKILL) < 0)
+				sys_error("signal failed", __LINE__);
 
-			close (p2child [i][READ]);
-			close (p2child [i][WRITE]);
-			close (p2parent [READ]);
-			close (p2parent [WRITE]);
+			close(p2child[i][READ]);
+			close(p2child[i][WRITE]);
+			close(p2parent[READ]);
+			close(p2parent[WRITE]);
 		}
 	}
 
-	exit (-1);
+	exit(-1);
 }
 
 /*---------------------------------------------------------------------+
@@ -653,12 +659,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -668,9 +674,9 @@
 | Function:  Prints out message and calls cleanup...                   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	fflush (stderr);
-	cleanup ();
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	fflush(stderr);
+	cleanup();
 }
diff --git a/testcases/kernel/ipc/ipc_stress/semaphore_test_01.c b/testcases/kernel/ipc/ipc_stress/semaphore_test_01.c
index 27a0f9b..72218ff 100644
--- a/testcases/kernel/ipc/ipc_stress/semaphore_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/semaphore_test_01.c
@@ -69,7 +69,7 @@
 #include <string.h>
 
 #ifdef _LINUX_
-# include <sys/stat.h>
+#include <sys/stat.h>
 #endif
 
 #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
@@ -77,11 +77,11 @@
 #else
 /* according to X/OPEN we have to define it ourselves */
 union semun {
-  int val;                  /* value for SETVAL */
-  struct semid_ds *buf;     /* buffer for IPC_STAT, IPC_SET */
-  unsigned short *array;    /* array for GETALL, SETALL */
-                            /* Linux specific part: */
-  struct seminfo *__buf;    /* buffer for IPC_INFO */
+	int val;		/* value for SETVAL */
+	struct semid_ds *buf;	/* buffer for IPC_STAT, IPC_SET */
+	unsigned short *array;	/* array for GETALL, SETALL */
+	/* Linux specific part: */
+	struct seminfo *__buf;	/* buffer for IPC_INFO */
 };
 #endif
 
@@ -97,8 +97,8 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -110,11 +110,11 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	uid_t uid = getuid ();		/* User's user id */
-	gid_t gid = getgid ();		/* User's group id */
-	int semid;			/* Unique semaphore id */
+	uid_t uid = getuid();	/* User's user id */
+	gid_t gid = getgid();	/* User's group id */
+	int semid;		/* Unique semaphore id */
 	int nsems = NUM_SEMAPHORES;	/* Number of semaphores to create */
 	struct semid_ds exp_semdata;	/* Expected semaphore values */
 	union semun exp_semdatap;
@@ -124,52 +124,52 @@
 	exp_semdatap.buf = &exp_semdata;
 	act_semdatap.buf = &act_semdata;
 
-	umask (0000);
+	umask(0000);
 
 	/* SET semid_ds STRUCTURE TO DESIRED VALUES........ */
 
 	/*
 	 * Initialize the "expected" sempahore value structure
 	 */
-	exp_semdata.sem_perm.cuid = exp_semdata.sem_perm.uid  = uid;
-	exp_semdata.sem_perm.cgid = exp_semdata.sem_perm.gid  = gid;
+	exp_semdata.sem_perm.cuid = exp_semdata.sem_perm.uid = uid;
+	exp_semdata.sem_perm.cgid = exp_semdata.sem_perm.gid = gid;
 	exp_semdata.sem_perm.mode = 0660;
-	exp_semdata.sem_nsems     = nsems;
+	exp_semdata.sem_nsems = nsems;
 
 	/*
 	 * Create a semaphore, set the semaphore fields and then
 	 * retrieve the fields.
 	 */
-	if ((semid = semget (IPC_PRIVATE, nsems, IPC_CREAT|0666)) < 0)
-		sys_error ("semget (IPC_PRIVATE) failed", __LINE__);
+	if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0)
+		sys_error("semget (IPC_PRIVATE) failed", __LINE__);
 
-	if (semctl (semid, nsems, IPC_SET, exp_semdatap) < 0)
-		sys_error ("semctl (IPC_SET) failed", __LINE__);
+	if (semctl(semid, nsems, IPC_SET, exp_semdatap) < 0)
+		sys_error("semctl (IPC_SET) failed", __LINE__);
 
-	if (semctl (semid, nsems, IPC_STAT, act_semdatap) < 0)
-		sys_error ("semctl (IPC_STAT) failed", __LINE__);
+	if (semctl(semid, nsems, IPC_STAT, act_semdatap) < 0)
+		sys_error("semctl (IPC_STAT) failed", __LINE__);
 
 	/*
 	 * Verify that the semaphore fields were set correctly
 	 */
 	if (act_semdata.sem_perm.cuid != exp_semdata.sem_perm.cuid)
-		error ("sem_perm.cuid field was not set!", __LINE__);
+		error("sem_perm.cuid field was not set!", __LINE__);
 	if (act_semdata.sem_perm.uid != exp_semdata.sem_perm.uid)
-		error ("sem_perm.uid field was not set!", __LINE__);
+		error("sem_perm.uid field was not set!", __LINE__);
 	if (act_semdata.sem_perm.cgid != exp_semdata.sem_perm.cgid)
-		error ("sem_perm.cgid field was not set!", __LINE__);
+		error("sem_perm.cgid field was not set!", __LINE__);
 	if (act_semdata.sem_perm.gid != exp_semdata.sem_perm.gid)
-		error ("sem_perm.gid field was not set!", __LINE__);
+		error("sem_perm.gid field was not set!", __LINE__);
 	if (act_semdata.sem_perm.mode != exp_semdata.sem_perm.mode)
-		error ("sem_perm.mode field was not set!", __LINE__);
+		error("sem_perm.mode field was not set!", __LINE__);
 	if (act_semdata.sem_nsems != exp_semdata.sem_nsems)
-		error ("sem_nsems field was not set!", __LINE__);
+		error("sem_nsems field was not set!", __LINE__);
 
 	/*
 	 * Print out the id of the newly created semaphore for comparison
 	 * with the 'ipcs -s' command and then exit.
 	 */
-	printf ("%d\n", semid);
+	printf("%d\n", semid);
 
 	return (0);
 }
@@ -181,12 +181,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -196,8 +196,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/semaphore_test_02.c b/testcases/kernel/ipc/ipc_stress/semaphore_test_02.c
index cc66935..f733389 100644
--- a/testcases/kernel/ipc/ipc_stress/semaphore_test_02.c
+++ b/testcases/kernel/ipc/ipc_stress/semaphore_test_02.c
@@ -83,10 +83,10 @@
  *
  * NUM_SEMAPHORES: number of semaphores to create
  */
-# define MAX_SEMAPHORES	250
-# define MAX_CHILDREN		200
-# define DEFAULT_NUM_SEMAPHORES	96
-# define DEFAULT_NUM_CHILDREN	0
+#define MAX_SEMAPHORES	250
+#define MAX_CHILDREN		200
+#define DEFAULT_NUM_SEMAPHORES	96
+#define DEFAULT_NUM_CHILDREN	0
 
 #define USAGE	"\nUsage: %s [-s nsems] [-p nproc]\n\n" \
 		"\t-s nsems  number of semaphores (per process)\n\n"	\
@@ -101,10 +101,10 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static void test_commands (pid_t);
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void parse_args (int, char **);
+static void test_commands(pid_t);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void parse_args(int, char **);
 
 /*
  * Structures and Global variables:
@@ -114,17 +114,17 @@
  * childpid: array containing process id's of the child processes
  * parent_pid: process id of parent process
  */
-int	nsems = DEFAULT_NUM_SEMAPHORES;
-int	nprocs = DEFAULT_NUM_CHILDREN;
-int     childpid [MAX_CHILDREN];
-int	errors = 0;
-pid_t   parent_pid;
+int nsems = DEFAULT_NUM_SEMAPHORES;
+int nprocs = DEFAULT_NUM_CHILDREN;
+int childpid[MAX_CHILDREN];
+int errors = 0;
+pid_t parent_pid;
 
 union semun {
-	      int val;
-	      struct semid_ds *buf;
-	      unsigned short *array;
-	    } arg;
+	int val;
+	struct semid_ds *buf;
+	unsigned short *array;
+} arg;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -136,66 +136,67 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	proc;			/* fork loop index */
-	pid_t	pid;			/* Process id */
-	int	status;			/* Child's exit status */
+	int proc;		/* fork loop index */
+	pid_t pid;		/* Process id */
+	int status;		/* Child's exit status */
 
-        /*
-         * Parse command line arguments and print out program header
-         */
-        parse_args (argc, argv);
-        printf ("%s: IPC Semaphore TestSuite program\n", *argv);
-	fflush (stdout);
-	parent_pid = getpid ();
+	/*
+	 * Parse command line arguments and print out program header
+	 */
+	parse_args(argc, argv);
+	printf("%s: IPC Semaphore TestSuite program\n", *argv);
+	fflush(stdout);
+	parent_pid = getpid();
 
 	/*
 	 * Fork off the additional processes.
 	 */
 	if (nprocs > 0) {
-		printf ("\n\tParent: spawning %d child processes\n", nprocs);
-		fflush (stdout);
+		printf("\n\tParent: spawning %d child processes\n", nprocs);
+		fflush(stdout);
 	}
 	for (proc = 1; proc < nprocs; proc++) {
 		/*
 		 * Child leaves loop, parent continues to fork.
 		 */
-	if ((pid = fork ()) < 0)
-			error ("fork failed", __LINE__);
+		if ((pid = fork()) < 0)
+			error("fork failed", __LINE__);
 		else if (pid == 0)
 			break;
 		else
-			childpid [proc] = pid;
+			childpid[proc] = pid;
 	}
 	pid = getpid();
 
-        /*
-         * Test the semget () and semctl () commands
-         */
-	test_commands (pid);
+	/*
+	 * Test the semget () and semctl () commands
+	 */
+	test_commands(pid);
 
-        /*
-         * Finished testing commands, only parent process needs to continue
-         */
-        if (pid != parent_pid) exit (0);
+	/*
+	 * Finished testing commands, only parent process needs to continue
+	 */
+	if (pid != parent_pid)
+		exit(0);
 
-        /*
-         * Wait for all of the child processes to complete & check their
-         * exit status.
-         *
-         * Upon completion of the child proccesses, exit program with success.
-         */
-        for (proc = 1; proc < nprocs; proc++) {
-                waitpid (childpid [proc], &status, 0);
+	/*
+	 * Wait for all of the child processes to complete & check their
+	 * exit status.
+	 *
+	 * Upon completion of the child proccesses, exit program with success.
+	 */
+	for (proc = 1; proc < nprocs; proc++) {
+		waitpid(childpid[proc], &status, 0);
 
-                if (!WIFEXITED (status))
-                        error ("child process terminated abnormally",
-                                __LINE__);
-        }
+		if (!WIFEXITED(status))
+			error("child process terminated abnormally", __LINE__);
+	}
 	if (nprocs > 0)
-		printf ("\n\tAll child processes verified commands successfully\n");
-        printf ("\nsuccessful!\n");
+		printf
+		    ("\n\tAll child processes verified commands successfully\n");
+	printf("\nsuccessful!\n");
 	return (errors);
 }
 
@@ -206,16 +207,16 @@
 | Function:  test semget() and semctl()                                |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void test_commands (pid_t pid)
+static void test_commands(pid_t pid)
 {
-	int	i;			/* loop index */
-	int	semid;			/* Unique semaphore id */
-	int	val;			/* Misc value */
-	gid_t	gid = getgid ();	/* User's group id */
-	mode_t	mode = 0666;		/* User's mode value */
-	uid_t	uid = getuid ();	/* User's user id */
+	int i;			/* loop index */
+	int semid;		/* Unique semaphore id */
+	int val;		/* Misc value */
+	gid_t gid = getgid();	/* User's group id */
+	mode_t mode = 0666;	/* User's mode value */
+	uid_t uid = getuid();	/* User's user id */
 	struct sembuf sops;
-	union  semun semunptr;		/* This union has struct semid_ds *buf*/
+	union semun semunptr;	/* This union has struct semid_ds *buf */
 	/*
 	 * Test semget () with IPC_PRIVATE command
 	 *
@@ -223,9 +224,9 @@
 	 * semaphore identifier as semid.
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (IPC_SET) command operation\n");
-	if ((semid = semget (IPC_PRIVATE, nsems, IPC_CREAT|0666)) < 0)
-		error ("semget failed", __LINE__);
+		printf("\n\tTesting semctl (IPC_SET) command operation\n");
+	if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0)
+		error("semget failed", __LINE__);
 
 	/*
 	 * Test semctl () with IPC_SET command
@@ -233,9 +234,9 @@
 	 * Set the uid, gid and mode fields
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (IPC_SET) command operation\n");
+		printf("\n\tTesting semctl (IPC_SET) command operation\n");
 
-	semunptr.buf = (struct semid_ds *) calloc(1, sizeof (struct semid_ds));
+	semunptr.buf = (struct semid_ds *)calloc(1, sizeof(struct semid_ds));
 	if (!semunptr.buf)
 		error("calloc failed", __LINE__);
 
@@ -243,8 +244,8 @@
 	semunptr.buf->sem_perm.gid = gid;
 	semunptr.buf->sem_perm.mode = mode;
 
-	if (semctl (semid, 0, IPC_SET, semunptr) < 0)
-		sys_error ("semctl failed", __LINE__);
+	if (semctl(semid, 0, IPC_SET, semunptr) < 0)
+		sys_error("semctl failed", __LINE__);
 
 	/*
 	 * Test semctl () with IPC_STAT command
@@ -252,19 +253,19 @@
 	 * Get the semid_ds structure and verify it's fields.
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (IPC_STAT) command operation\n");
+		printf("\n\tTesting semctl (IPC_STAT) command operation\n");
 
-	if (semctl (semid, 0, IPC_STAT, semunptr) < 0)
-		sys_error ("semctl failed", __LINE__);
+	if (semctl(semid, 0, IPC_STAT, semunptr) < 0)
+		sys_error("semctl failed", __LINE__);
 	if (semunptr.buf->sem_perm.uid != uid)
-		sys_error ("semctl: uid was not set", __LINE__);
+		sys_error("semctl: uid was not set", __LINE__);
 	if (semunptr.buf->sem_perm.gid != gid)
-		sys_error ("semctl: gid was not set", __LINE__);
+		sys_error("semctl: gid was not set", __LINE__);
 	if ((semunptr.buf->sem_perm.mode & 0777) != mode)
-		sys_error ("semctl: mode was not set", __LINE__);
+		sys_error("semctl: mode was not set", __LINE__);
 	if (semunptr.buf->sem_nsems != nsems)
-		sys_error ("semctl: nsems (number of semaphores) was not set",
-			__LINE__);
+		sys_error("semctl: nsems (number of semaphores) was not set",
+			  __LINE__);
 	SAFE_FREE(semunptr.buf);
 
 	/*
@@ -274,11 +275,11 @@
 	 * to the loop index (i).
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (SETVAL) command operation\n");
+		printf("\n\tTesting semctl (SETVAL) command operation\n");
 	for (i = 0; i < nsems; i++) {
-	      arg.val=i;
-		if (semctl (semid, i, SETVAL, arg) < 0)
-			sys_error ("semctl failed", __LINE__);
+		arg.val = i;
+		if (semctl(semid, i, SETVAL, arg) < 0)
+			sys_error("semctl failed", __LINE__);
 	}
 
 	/*
@@ -288,38 +289,38 @@
 	 * and compare with the expected value, the loop index (i).
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (GETVAL) command operation\n");
+		printf("\n\tTesting semctl (GETVAL) command operation\n");
 	for (i = 0; i < nsems; i++) {
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl failed", __LINE__);
 		if (val != i)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+			sys_error("semctl (GETVAL) failed", __LINE__);
 	}
 
 	// testing in linux.  before semctl(GETPID) works, we must call semop
 	if (pid == parent_pid)
-		printf ("\n\tTesting semop (signal and wait) operations\n");
+		printf("\n\tTesting semop (signal and wait) operations\n");
 	sops.sem_flg = 0;
 	for (i = 0; i < nsems; i++) {
-	        sops.sem_num = i;
+		sops.sem_num = i;
 		sops.sem_op = 1;
-	        if ((val = semop (semid, &sops, 1)) < 0)
-		        sys_error ("semop signal failed", __LINE__);
+		if ((val = semop(semid, &sops, 1)) < 0)
+			sys_error("semop signal failed", __LINE__);
 		sops.sem_op = -1;
-		if ((val = semop (semid, &sops, 1)) < 0)
-		        sys_error ("semop wait failed", __LINE__);
+		if ((val = semop(semid, &sops, 1)) < 0)
+			sys_error("semop wait failed", __LINE__);
 	}
 
 	/*
 	 * Test semctl () with GETPID command
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (GETPID) command operation\n");
+		printf("\n\tTesting semctl (GETPID) command operation\n");
 	for (i = 0; i < nsems; i++) {
-		if ((val = semctl (semid, i, GETPID, arg)) < 0)
-			sys_error ("semctl failed", __LINE__);
+		if ((val = semctl(semid, i, GETPID, arg)) < 0)
+			sys_error("semctl failed", __LINE__);
 		if (val != pid)
-			sys_error ("semctl (GETPID) failed", __LINE__);
+			sys_error("semctl (GETPID) failed", __LINE__);
 	}
 
 	/*
@@ -332,13 +333,13 @@
 	 *       waits for the semaphore so that semncnt would be nonzero.
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (GETNCNT) command operation\n");
+		printf("\n\tTesting semctl (GETNCNT) command operation\n");
 	for (i = 0; i < nsems; i++) {
-		if ((val = semctl (semid, i, GETNCNT, arg)) < 0)
-			sys_error ("semctl failed", __LINE__);
+		if ((val = semctl(semid, i, GETNCNT, arg)) < 0)
+			sys_error("semctl failed", __LINE__);
 		if (val != 0)
-			sys_error ("semctl (GETNCNT) returned wrong value",
-				__LINE__);
+			sys_error("semctl (GETNCNT) returned wrong value",
+				  __LINE__);
 	}
 
 	/*
@@ -351,13 +352,13 @@
 	 *       waits for the semaphore so that semzcnt would be nonzero.
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (GETZCNT) command operation\n");
+		printf("\n\tTesting semctl (GETZCNT) command operation\n");
 	for (i = 0; i < nsems; i++) {
-		if ((val = semctl (semid, i, GETZCNT, arg)) < 0)
-			sys_error ("semctl failed", __LINE__);
+		if ((val = semctl(semid, i, GETZCNT, arg)) < 0)
+			sys_error("semctl failed", __LINE__);
 		if (val != 0)
-			sys_error ("semctl (GETZCNT) returned wrong value",
-				__LINE__);
+			sys_error("semctl (GETZCNT) returned wrong value",
+				  __LINE__);
 	}
 
 	/*
@@ -367,13 +368,13 @@
 	 */
 	arg.array = malloc(sizeof(int) * nsems);
 	if (!arg.array)
-		error ("malloc failed", __LINE__);
+		error("malloc failed", __LINE__);
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (SETALL) command operation\n");
+		printf("\n\tTesting semctl (SETALL) command operation\n");
 	for (i = 0; i < nsems; i++)
 		arg.array[i] = i;
-	if (semctl (semid, 0, SETALL, arg) < 0)
-		sys_error ("semctl failed", __LINE__);
+	if (semctl(semid, 0, SETALL, arg) < 0)
+		sys_error("semctl failed", __LINE__);
 
 	/*
 	 * Test semctl () with GETALL command
@@ -382,13 +383,13 @@
 	 * they are all correct.
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (GETALL) command operation\n");
-	if (semctl (semid, nsems, GETALL, arg) < 0)
-		sys_error ("semctl failed", __LINE__);
+		printf("\n\tTesting semctl (GETALL) command operation\n");
+	if (semctl(semid, nsems, GETALL, arg) < 0)
+		sys_error("semctl failed", __LINE__);
 	for (i = 0; i < nsems; i++) {
-		if (arg.array [i] != i)
-			sys_error ("semaphore does not match expected value",
-				__LINE__);
+		if (arg.array[i] != i)
+			sys_error("semaphore does not match expected value",
+				  __LINE__);
 	}
 
 	/*
@@ -397,10 +398,10 @@
 	 * Remove the semaphores
 	 */
 	if (pid == parent_pid)
-		printf ("\n\tTesting semctl (IPC_RMID) command operation\n");
-	if (semctl (semid, nsems, IPC_RMID, arg) < 0)
-		sys_error ("semctl failed", __LINE__);
-        SAFE_FREE(arg.array);
+		printf("\n\tTesting semctl (IPC_RMID) command operation\n");
+	if (semctl(semid, nsems, IPC_RMID, arg) < 0)
+		sys_error("semctl failed", __LINE__);
+	SAFE_FREE(arg.array);
 
 }
 
@@ -416,40 +417,40 @@
 |            [-p] nproc: number of child processes                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((opt = getopt(argc, argv, "s:p:")) != EOF) {
 		switch (opt) {
-			case 's':
-				nsems = atoi (optarg);
-				break;
-			case 'p':
-				nprocs = atoi (optarg);
-				break;
-			default:
-				errflag++;
-				break;
+		case 's':
+			nsems = atoi(optarg);
+			break;
+		case 'p':
+			nprocs = atoi(optarg);
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (nsems >= MAX_SEMAPHORES) {
 		errflag++;
-		fprintf (stderr, "ERROR: nsems must be less than %d\n",
+		fprintf(stderr, "ERROR: nsems must be less than %d\n",
 			MAX_SEMAPHORES);
 	}
 	if (nprocs >= MAX_CHILDREN) {
 		errflag++;
-		fprintf (stderr, "ERROR: nproc must be less than %d\n",
+		fprintf(stderr, "ERROR: nproc must be less than %d\n",
 			MAX_CHILDREN);
 	}
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -460,12 +461,12 @@
 | Function:  Creates system error message and increments errors	       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, syserr_msg);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, syserr_msg);
 	errors++;
 	/* error (syserr_msg, line); */
 }
@@ -477,8 +478,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/semaphore_test_03.c b/testcases/kernel/ipc/ipc_stress/semaphore_test_03.c
index ad1c335..8955e02 100644
--- a/testcases/kernel/ipc/ipc_stress/semaphore_test_03.c
+++ b/testcases/kernel/ipc/ipc_stress/semaphore_test_03.c
@@ -90,10 +90,10 @@
  *
  * SEMOP_TABLE: macro for printing attempted semop command combinations
  */
-# define MAX_SEMAPHORES	        32
-# define MAX_CHILDREN		200
-# define DEFAULT_NUM_SEMAPHORES	16
-# define DEFAULT_NUM_CHILDREN	0
+#define MAX_SEMAPHORES	        32
+#define MAX_CHILDREN		200
+#define DEFAULT_NUM_SEMAPHORES	16
+#define DEFAULT_NUM_CHILDREN	0
 
 #define USAGE	"\nUsage: %s [-s nsems] [-p nproc]\n\n" \
 		"\t-s nsems  number of semaphores (per process)\n\n"	\
@@ -115,12 +115,12 @@
  * parse_args (): Parse command line arguments
  * catch: Signal catching function for SIGUSR1 signal
  */
-static void setup_signal_handler ();
-static void test_commands ();
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void parse_args (int, char **);
-static void catch (int);
+static void setup_signal_handler();
+static void test_commands();
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void parse_args(int, char **);
+static void catch(int);
 
 /*
  * Structures and Global variables:
@@ -130,16 +130,16 @@
  * childpid: array containing process id's of the child processes
  * parent_pid: process id of parent process
  */
-int	nsems = DEFAULT_NUM_SEMAPHORES;
-int	nprocs = DEFAULT_NUM_CHILDREN;
-pid_t   childpid [MAX_CHILDREN];
-pid_t   parent_pid;
-pid_t   errpid;
+int nsems = DEFAULT_NUM_SEMAPHORES;
+int nprocs = DEFAULT_NUM_CHILDREN;
+pid_t childpid[MAX_CHILDREN];
+pid_t parent_pid;
+pid_t errpid;
 
 union semun {
-   int val;
-   struct semid_ds *buf;
-   unsigned short *array;
+	int val;
+	struct semid_ds *buf;
+	unsigned short *array;
 } arg;
 
 /*---------------------------------------------------------------------+
@@ -152,73 +152,74 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	pid_t	pid;			/* Child's process id */
-	int	proc;			/* Fork loop index */
-	int	status;			/* Child's exit status */
+	pid_t pid;		/* Child's process id */
+	int proc;		/* Fork loop index */
+	int status;		/* Child's exit status */
 
-        /*
-         * Parse command line arguments, print out program header, setup
+	/*
+	 * Parse command line arguments, print out program header, setup
 	 * signal handler (for SIGUSR1) and save parent process id.
-         */
-        parse_args (argc, argv);
-        printf ("%s: IPC Semaphore TestSuite program\n", *argv);
-	fflush (stdout);
-	setup_signal_handler ();
-	errpid = parent_pid = getpid ();
+	 */
+	parse_args(argc, argv);
+	printf("%s: IPC Semaphore TestSuite program\n", *argv);
+	fflush(stdout);
+	setup_signal_handler();
+	errpid = parent_pid = getpid();
 
-	if (nsems < 8) nsems = 8;
+	if (nsems < 8)
+		nsems = 8;
 
 	/*
 	 * Fork off the additional processes.
 	 */
 	if (nprocs > 0) {
-		printf ("\n\tParent: spawning %d child processes\n", nprocs);
-		fflush (stdout);
+		printf("\n\tParent: spawning %d child processes\n", nprocs);
+		fflush(stdout);
 	}
 	for (proc = 1; proc < nprocs; proc++) {
 		/*
 		 * Child leaves loop, parent continues to fork.
 		 */
-		if ((pid = fork ()) < 0)
-			sys_error ("fork failed", __LINE__);
-		else if (pid == (pid_t)0)
-		    {
-		        errpid = pid;
-		        break;
-		    }
-		else
-			childpid [proc] = pid;
+		if ((pid = fork()) < 0)
+			sys_error("fork failed", __LINE__);
+		else if (pid == (pid_t) 0) {
+			errpid = pid;
+			break;
+		} else
+			childpid[proc] = pid;
 	}
 	pid = getpid();
 
-        /*
-         * Test the semget () and semctl () commands
-         */
-	test_commands (pid);
+	/*
+	 * Test the semget () and semctl () commands
+	 */
+	test_commands(pid);
 
-        /*
-         * Finished testing commands, only parent process needs to continue
-         */
-        if (pid != parent_pid) exit (0);
+	/*
+	 * Finished testing commands, only parent process needs to continue
+	 */
+	if (pid != parent_pid)
+		exit(0);
 
-        /*
-         * Wait for all of the child processes to complete & check their
-         * exit status.
-         *
-         * Upon completion of the child proccesses, exit program with success.
-         */
-        for (proc = 1; proc < nprocs; proc++) {
-                waitpid (childpid [proc], &status, 0);
+	/*
+	 * Wait for all of the child processes to complete & check their
+	 * exit status.
+	 *
+	 * Upon completion of the child proccesses, exit program with success.
+	 */
+	for (proc = 1; proc < nprocs; proc++) {
+		waitpid(childpid[proc], &status, 0);
 
-                if (WEXITSTATUS (status))
-                        sys_error ("child process terminated abnormally",
-                                __LINE__);
-        }
+		if (WEXITSTATUS(status))
+			sys_error("child process terminated abnormally",
+				  __LINE__);
+	}
 	if (nprocs > 0)
-		printf ("\n\tAll child processes verified commands successfully\n");
-        printf ("\nsuccessful!\n");
+		printf
+		    ("\n\tAll child processes verified commands successfully\n");
+	printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -229,70 +230,72 @@
 | Function:  Verifies options for semop () system function call.       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void test_commands (pid_t proc_pid)
+static void test_commands(pid_t proc_pid)
 {
-	int	i;			/* Misc loop index */
-	int	val;			/* Value (semctl parameter) */
-	int	semid;			/* Unique semaphore id */
-	int	status;			/* Child's exit status */
-	int	expected_value;		/* Expected semaphore value */
-	pid_t	pid;			/* Misc process id */
-	gid_t	gid = getgid ();	/* Misc group id */
-	uid_t	uid = getuid ();	/* Misc user id */
-	mode_t	mode = 0666;		/* Misc mode bits */
-	// ushort	array [MAX_SEMAPHORES];	/* Misc array of semaphore values */
-	struct sembuf semoparray [MAX_SEMAPHORES];
+	int i;			/* Misc loop index */
+	int val;		/* Value (semctl parameter) */
+	int semid;		/* Unique semaphore id */
+	int status;		/* Child's exit status */
+	int expected_value;	/* Expected semaphore value */
+	pid_t pid;		/* Misc process id */
+	gid_t gid = getgid();	/* Misc group id */
+	uid_t uid = getuid();	/* Misc user id */
+	mode_t mode = 0666;	/* Misc mode bits */
+	// ushort       array [MAX_SEMAPHORES]; /* Misc array of semaphore values */
+	struct sembuf semoparray[MAX_SEMAPHORES];
 
 	/*
 	 * Create the semaphores...
 	 */
 	if (proc_pid == parent_pid)
-		printf ("\n\tCreating %d semaphores ...\n", nsems);
-	if ((semid = semget (IPC_PRIVATE, nsems, IPC_CREAT|mode)) < 0)
-		sys_error ("semget (IPC_PRIVATE) failed", __LINE__);
+		printf("\n\tCreating %d semaphores ...\n", nsems);
+	if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | mode)) < 0)
+		sys_error("semget (IPC_PRIVATE) failed", __LINE__);
 
 	/*
 	 * Set the semaphore uid, gid and mode
 	 */
 	if (proc_pid == parent_pid)
-		printf ("\n\tSetting semaphore uid, gid and mode ... semid = %d\n", semid);
-	arg.buf = (struct semid_ds *) calloc (1, sizeof (struct semid_ds));
+		printf
+		    ("\n\tSetting semaphore uid, gid and mode ... semid = %d\n",
+		     semid);
+	arg.buf = (struct semid_ds *)calloc(1, sizeof(struct semid_ds));
 	if (!arg.buf)
 		error("calloc failed", __LINE__);
 	arg.buf->sem_perm.uid = uid;
 	arg.buf->sem_perm.gid = gid;
 	arg.buf->sem_perm.mode = mode;
-	if (semctl (semid, 0, IPC_SET, arg) < 0)
-		sys_error ("semctl failed", __LINE__);
+	if (semctl(semid, 0, IPC_SET, arg) < 0)
+		sys_error("semctl failed", __LINE__);
 
 	/*
 	 * Verify that semaphore uid, gid and mode were set correctly
 	 */
 	if (proc_pid == parent_pid)
-		printf ("\n\tVerifying semaphore info ...\n");
-	if (semctl (semid, 0, IPC_STAT, arg) < 0)
-		sys_error ("semctl (IPC_STAT) failed", __LINE__);
+		printf("\n\tVerifying semaphore info ...\n");
+	if (semctl(semid, 0, IPC_STAT, arg) < 0)
+		sys_error("semctl (IPC_STAT) failed", __LINE__);
 	if (arg.buf->sem_perm.uid != uid)
-		error ("semctl: uid was not set", __LINE__);
+		error("semctl: uid was not set", __LINE__);
 	if (arg.buf->sem_perm.gid != gid)
-		error ("semctl: gid was not set", __LINE__);
+		error("semctl: gid was not set", __LINE__);
 	if ((arg.buf->sem_perm.mode & 0777) != mode)
-		error ("semctl: mode was not set", __LINE__);
+		error("semctl: mode was not set", __LINE__);
 	if (arg.buf->sem_nsems != nsems)
-		error ("semctl: nsems (number of semaphores) was not set",
-			__LINE__);
+		error("semctl: nsems (number of semaphores) was not set",
+		      __LINE__);
 	SAFE_FREE(arg.buf);
 
 	/*
 	 * Set the value of each semaphore in the set to 2.
 	 */
-        arg.array = malloc(sizeof(int) * nsems);
+	arg.array = malloc(sizeof(int) * nsems);
 	if (!arg.array)
 		error("malloc failed", __LINE__);
 	for (i = 0; i < nsems; i++)
-		arg.array [i] = 2;
-	if (semctl (semid, 0, SETALL, arg) < 0)
-		sys_error ("semctl (SETALL) failed", __LINE__);
+		arg.array[i] = 2;
+	if (semctl(semid, 0, SETALL, arg) < 0)
+		sys_error("semctl (SETALL) failed", __LINE__);
 	SAFE_FREE(arg.array);
 
 	/* ------------------------------------------------------------------ */
@@ -303,8 +306,9 @@
 	/*               Return Immediately                                   */
 	/* ------------------------------------------------------------------ */
 	if (proc_pid == parent_pid) {
-		printf ("\n\tTesting semop() with all Semaphore values, options and flags\n");
-		printf ("\n\t   Semval Semop  Semflag    Description\n");
+		printf
+		    ("\n\tTesting semop() with all Semaphore values, options and flags\n");
+		printf("\n\t   Semval Semop  Semflag    Description\n");
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -314,20 +318,20 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(2, -1, "0", "Obtain resource");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = -1;
-		semoparray [i].sem_flg = 0;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = -1;
+		semoparray[i].sem_flg = 0;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 1;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -337,20 +341,20 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(1, -1, "0", "Obtain resource");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = -1;
-		semoparray [i].sem_flg = 0;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = -1;
+		semoparray[i].sem_flg = 0;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 0;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -360,20 +364,20 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(0, 0, "0", "Semop function returns immediately");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = 0;
-		semoparray [i].sem_flg = 0;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = 0;
+		semoparray[i].sem_flg = 0;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 0;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -382,31 +386,31 @@
 	/*           THE FOLLOWING SHOULD SHOW semval = 6                     */
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(5, 1, "0", "Return resource");
-        arg.array = malloc(sizeof(int) * nsems);
+	arg.array = malloc(sizeof(int) * nsems);
 	if (!arg.array)
 		error("malloc failed", __LINE__);
 	for (i = 0; i < nsems; i++) {
-		arg.array [i] = 5;
+		arg.array[i] = 5;
 	}
-	if (semctl (semid, 0, SETALL, arg) < 0)
-		sys_error ("semctl (SETALL) failed", __LINE__);
+	if (semctl(semid, 0, SETALL, arg) < 0)
+		sys_error("semctl (SETALL) failed", __LINE__);
 	SAFE_FREE(arg.array);
 
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = 1;
-		semoparray [i].sem_flg = 0;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = 1;
+		semoparray[i].sem_flg = 0;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 6;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -416,23 +420,22 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(6, -7, "IPC_NOWAIT", "Semop function returns immediately");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = -7;
-		semoparray [i].sem_flg = IPC_NOWAIT;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = -7;
+		semoparray[i].sem_flg = IPC_NOWAIT;
 	}
-	if (semop (semid, semoparray, nsems) >= 0)
-		error ("semop did not return EAGAIN", __LINE__);
-	else
-		if (errno != EAGAIN)
-			sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) >= 0)
+		error("semop did not return EAGAIN", __LINE__);
+	else if (errno != EAGAIN)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 6;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -443,23 +446,22 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(6, 0, "IPC_NOWAIT", "Semop function returns immediately");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = 0;
-		semoparray [i].sem_flg = IPC_NOWAIT;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = 0;
+		semoparray[i].sem_flg = IPC_NOWAIT;
 	}
-	if (semop (semid, semoparray, nsems) >= 0)
-		error ("semop did not return EAGAIN", __LINE__);
-	else
-		if (errno != EAGAIN)
-			sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) >= 0)
+		error("semop did not return EAGAIN", __LINE__);
+	else if (errno != EAGAIN)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 6;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -469,20 +471,20 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(6, 1, "0", "Return resource");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = 1;
-		semoparray [i].sem_flg = 0;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = 1;
+		semoparray[i].sem_flg = 0;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 7;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, i, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, i, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -497,39 +499,39 @@
 	/*
 	 * Child process
 	 */
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 0;
-		semoparray [0].sem_op  = -8;
-		semoparray [0].sem_flg = 0;
-		if (semop (semid, semoparray, 1) < 0)
-			sys_error ("semop failed", __LINE__);
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 0;
+		semoparray[0].sem_op = -8;
+		semoparray[0].sem_flg = 0;
+		if (semop(semid, semoparray, 1) < 0)
+			sys_error("semop failed", __LINE__);
 		exit(0);
 	} else if (pid < 0) {
-		sys_error ("fork failed", __LINE__);
+		sys_error("fork failed", __LINE__);
 	}
-	semoparray [0].sem_num = 0;
-	semoparray [0].sem_op  = 2;
-	semoparray [0].sem_flg = 0;
+	semoparray[0].sem_num = 0;
+	semoparray[0].sem_op = 2;
+	semoparray[0].sem_flg = 0;
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 0, GETNCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 0, GETNCNT, arg))
+		sleep(1);
 
-	if (semop (semid, semoparray, 1) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, 1) < 0)
+		sys_error("semop failed", __LINE__);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	expected_value = 1;
 	arg.val = 0;
-	if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-		sys_error ("semctl (GETVAL) failed", __LINE__);
+	if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+		sys_error("semctl (GETVAL) failed", __LINE__);
 	if (val != expected_value)
-		error ("incorrect semaphore value", __LINE__);
+		error("incorrect semaphore value", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/* TEST # 9  --- semval = 7, sem_op[0] = -8, sem_flg = 0              */
@@ -542,41 +544,40 @@
 	/*
 	 * Child process
 	 */
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 1;
-		semoparray [0].sem_op  = -8;
-		semoparray [0].sem_flg = 0;
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 1;
+		semoparray[0].sem_op = -8;
+		semoparray[0].sem_flg = 0;
 
-		if (semop (semid, semoparray, 1) >= 0)
-			error ("semop did not return EINTR", __LINE__);
-		else
-			if (errno != EINTR) {
-				printf ("semop returned: %d\n", errno);
-				sys_error ("semop failed", __LINE__);
-			}
-		exit (0);
-	} else if (pid < (pid_t)0) {
-		sys_error ("fork failed", __LINE__);
+		if (semop(semid, semoparray, 1) >= 0)
+			error("semop did not return EINTR", __LINE__);
+		else if (errno != EINTR) {
+			printf("semop returned: %d\n", errno);
+			sys_error("semop failed", __LINE__);
+		}
+		exit(0);
+	} else if (pid < (pid_t) 0) {
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 1, GETNCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 1, GETNCNT, arg))
+		sleep(1);
 
-	kill (pid, SIGUSR1);
+	kill(pid, SIGUSR1);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	expected_value = 7;
 	arg.val = 0;
-	if ((val = semctl (semid, 1, GETVAL, arg)) < 0)
-		sys_error ("semctl (GETVAL) failed", __LINE__);
+	if ((val = semctl(semid, 1, GETVAL, arg)) < 0)
+		sys_error("semctl (GETVAL) failed", __LINE__);
 	if (val != expected_value)
-		error ("incorrect semaphore value", __LINE__);
+		error("incorrect semaphore value", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/* TEST # 10 --- semval = 1, sem_op[3] = -3, sem_flg = 0              */
@@ -590,50 +591,51 @@
 	/*           --- semval < |semop (-3)| THEN semval = 8                */
 	/*         THE FOLLOWING SHOULD SHOW semval = 8                       */
 	/* ------------------------------------------------------------------ */
-	SEMOP_TABLE(1, 5, "SEM_UNDO", "Sleep (until resource becomes available)");
+	SEMOP_TABLE(1, 5, "SEM_UNDO",
+		    "Sleep (until resource becomes available)");
 	/*
 	 * Child process
 	 */
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 0;
-		semoparray [0].sem_op  = -3;
-		semoparray [0].sem_flg = 0;
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 0;
+		semoparray[0].sem_op = -3;
+		semoparray[0].sem_flg = 0;
 
-		if (semop (semid, semoparray, 1) < 0)
-			sys_error ("semop failed", __LINE__);
-		exit (0);
-	} else if (pid < (pid_t)0) {
-		sys_error ("fork failed", __LINE__);
+		if (semop(semid, semoparray, 1) < 0)
+			sys_error("semop failed", __LINE__);
+		exit(0);
+	} else if (pid < (pid_t) 0) {
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 0, GETNCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 0, GETNCNT, arg))
+		sleep(1);
 
-	semoparray [0].sem_num = 0;
-	semoparray [0].sem_op  = 5;
-	semoparray [0].sem_flg = 0;
-	if (semop (semid, semoparray, 1) < 0)
-		sys_error ("semop failed", __LINE__);
+	semoparray[0].sem_num = 0;
+	semoparray[0].sem_op = 5;
+	semoparray[0].sem_flg = 0;
+	if (semop(semid, semoparray, 1) < 0)
+		sys_error("semop failed", __LINE__);
 
-	semoparray [0].sem_num = 0;
-	semoparray [0].sem_op  = 5;
-	semoparray [0].sem_flg = SEM_UNDO;
-	if (semop (semid, semoparray, 1) < 0)
-		sys_error ("semop failed", __LINE__);
+	semoparray[0].sem_num = 0;
+	semoparray[0].sem_op = 5;
+	semoparray[0].sem_flg = SEM_UNDO;
+	if (semop(semid, semoparray, 1) < 0)
+		sys_error("semop failed", __LINE__);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	expected_value = 8;
 	arg.val = 0;
-	if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-		sys_error ("semctl (GETVAL) failed", __LINE__);
+	if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+		sys_error("semctl (GETVAL) failed", __LINE__);
 	if (val != expected_value)
-		error ("incorrect semaphore value", __LINE__);
+		error("incorrect semaphore value", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/* TEST # 11 --- semval = 7, sem_op[3] = -8, sem_flg = 0              */
@@ -645,37 +647,36 @@
 	/*
 	 * Child process
 	 */
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 2;
-		semoparray [0].sem_op  = -8;
-		semoparray [0].sem_flg = 0;
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 2;
+		semoparray[0].sem_op = -8;
+		semoparray[0].sem_flg = 0;
 
-		if (semop (semid, semoparray, 1) >= 0)
-			error ("semop did not return ERMID", __LINE__);
-		else
-			if (errno != EIDRM) {
-				printf ("semop returned: %d\n", errno);
-				sys_error ("semop failed", __LINE__);
-			}
-		exit (0);
-	} else if (pid < (pid_t)0) {
-		sys_error ("fork failed", __LINE__);
+		if (semop(semid, semoparray, 1) >= 0)
+			error("semop did not return ERMID", __LINE__);
+		else if (errno != EIDRM) {
+			printf("semop returned: %d\n", errno);
+			sys_error("semop failed", __LINE__);
+		}
+		exit(0);
+	} else if (pid < (pid_t) 0) {
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before deleting the
 	 * semaphores...
 	 */
-        while (!semctl (semid, 2, GETNCNT, arg))
-	  sleep (1);
+	while (!semctl(semid, 2, GETNCNT, arg))
+		sleep(1);
 
 	arg.val = 0;
-	if (semctl (semid, 0, IPC_RMID, arg) < 0)
-		sys_error ("semctl (IPC_RMID) failed", __LINE__);
+	if (semctl(semid, 0, IPC_RMID, arg) < 0)
+		sys_error("semctl (IPC_RMID) failed", __LINE__);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/*        IPC_RMID DESTROYED THE SEMAPHORE STRUCTURES.                */
@@ -684,44 +685,44 @@
 	/*
 	 * Create the semaphores...
 	 */
-	if ((semid = semget (IPC_PRIVATE, nsems, IPC_CREAT|mode)) < 0)
-		sys_error ("semget (IPC_PRIVATE) failed", __LINE__);
+	if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | mode)) < 0)
+		sys_error("semget (IPC_PRIVATE) failed", __LINE__);
 
 	/*
 	 * Set the semaphore uid, gid and mode
 	 */
-	arg.buf = (struct semid_ds *) calloc (1, sizeof (struct semid_ds));
+	arg.buf = (struct semid_ds *)calloc(1, sizeof(struct semid_ds));
 	if (!arg.buf)
 		error("calloc failed", __LINE__);
 	arg.buf->sem_perm.uid = uid;
 	arg.buf->sem_perm.gid = gid;
 	arg.buf->sem_perm.mode = mode;
-	if (semctl (semid, 0, IPC_SET, arg) < 0)
-		sys_error ("semctl failed", __LINE__);
+	if (semctl(semid, 0, IPC_SET, arg) < 0)
+		sys_error("semctl failed", __LINE__);
 
 	/*
 	 * Verify that semaphore uid, gid and mode were set correctly
 	 */
-	if (semctl (semid, 0, IPC_STAT, arg) < 0)
-		sys_error ("semctl (IPC_STAT) failed", __LINE__);
+	if (semctl(semid, 0, IPC_STAT, arg) < 0)
+		sys_error("semctl (IPC_STAT) failed", __LINE__);
 	if (arg.buf->sem_perm.uid != uid)
-		error ("semctl: uid was not set", __LINE__);
+		error("semctl: uid was not set", __LINE__);
 	if (arg.buf->sem_perm.gid != gid)
-		error ("semctl: gid was not set", __LINE__);
+		error("semctl: gid was not set", __LINE__);
 	if ((arg.buf->sem_perm.mode & 0777) != mode)
-		error ("semctl: mode was not set", __LINE__);
+		error("semctl: mode was not set", __LINE__);
 	if (arg.buf->sem_nsems != nsems)
-		error ("semctl: nsems (number of semaphores) was not set",
-			__LINE__);
+		error("semctl: nsems (number of semaphores) was not set",
+		      __LINE__);
 	SAFE_FREE(arg.buf);
 
-        arg.array = malloc(sizeof(int) * nsems);
+	arg.array = malloc(sizeof(int) * nsems);
 	if (!arg.array)
 		error("malloc failed", __LINE__);
 	for (i = 0; i < nsems; i++)
-		arg.array [i] = 9;
-	if (semctl (semid, 0, SETALL, arg) < 0)
-		sys_error ("semctl (SETALL) failed", __LINE__);
+		arg.array[i] = 9;
+	if (semctl(semid, 0, SETALL, arg) < 0)
+		sys_error("semctl (SETALL) failed", __LINE__);
 	SAFE_FREE(arg.array);
 
 	/* ------------------------------------------------------------------ */
@@ -732,20 +733,20 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(9, -1, "SEM_UNDO", "Obtain resource");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = -1;
-		semoparray [i].sem_flg = SEM_UNDO;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = -1;
+		semoparray[i].sem_flg = SEM_UNDO;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 8;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
 	/* ------------------------------------------------------------------ */
@@ -755,29 +756,29 @@
 	/* ------------------------------------------------------------------ */
 	SEMOP_TABLE(8, -8, "SEM_UNDO", "Obtain resource");
 	for (i = 0; i < nsems; i++) {
-		semoparray [i].sem_num = i;
-		semoparray [i].sem_op  = -8;
-		semoparray [i].sem_flg = SEM_UNDO;
+		semoparray[i].sem_num = i;
+		semoparray[i].sem_op = -8;
+		semoparray[i].sem_flg = SEM_UNDO;
 	}
-	if (semop (semid, semoparray, nsems) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, nsems) < 0)
+		sys_error("semop failed", __LINE__);
 
 	expected_value = 0;
 	for (i = 0; i < nsems; i++) {
 		arg.val = 0;
-		if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-			sys_error ("semctl (GETVAL) failed", __LINE__);
+		if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+			sys_error("semctl (GETVAL) failed", __LINE__);
 		if (val != expected_value)
-			error ("incorrect semaphore value", __LINE__);
+			error("incorrect semaphore value", __LINE__);
 	}
 
-        arg.array = malloc(sizeof(int) * nsems);
+	arg.array = malloc(sizeof(int) * nsems);
 	if (!arg.array)
 		error("malloc failed", __LINE__);
 	for (i = 0; i < nsems; i++)
-		arg.array [i] = 9;
-	if (semctl (semid, 0, SETALL, arg) < 0)
-		sys_error ("semctl (SETALL) failed", __LINE__);
+		arg.array[i] = 9;
+	if (semctl(semid, 0, SETALL, arg) < 0)
+		sys_error("semctl (SETALL) failed", __LINE__);
 	SAFE_FREE(arg.array);
 
 	/* ------------------------------------------------------------------ */
@@ -791,40 +792,39 @@
 	 * Child process
 	 */
 	if ((pid = fork()) == 0) {
-		semoparray [0].sem_num = 0;
-		semoparray [0].sem_op  = 0;
-		semoparray [0].sem_flg = 0;
+		semoparray[0].sem_num = 0;
+		semoparray[0].sem_op = 0;
+		semoparray[0].sem_flg = 0;
 
-		if (semop (semid, semoparray, 1) >= 0)
-			error ("semop did not return EINTR", __LINE__);
-		else
-			if (errno != EINTR) {
-				printf ("semop returned: %d\n", errno);
-				sys_error ("semop failed", __LINE__);
-			}
-		exit (0);
+		if (semop(semid, semoparray, 1) >= 0)
+			error("semop did not return EINTR", __LINE__);
+		else if (errno != EINTR) {
+			printf("semop returned: %d\n", errno);
+			sys_error("semop failed", __LINE__);
+		}
+		exit(0);
 	} else if (pid < 0) {
-		sys_error ("fork failed", __LINE__);
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 0, GETZCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 0, GETZCNT, arg))
+		sleep(1);
 
-	kill (pid, SIGUSR1);
+	kill(pid, SIGUSR1);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	expected_value = 9;
 	arg.val = 0;
-	if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-		sys_error ("semctl (GETVAL) failed", __LINE__);
+	if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+		sys_error("semctl (GETVAL) failed", __LINE__);
 	if (val != expected_value)
-		error ("incorrect semaphore value", __LINE__);
+		error("incorrect semaphore value", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/* TEST # 15 --- semval = 9, sem_op[0] = 0, sem_flg = 0               */
@@ -838,40 +838,40 @@
 	/*
 	 * Child process
 	 */
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 0;
-		semoparray [0].sem_op  = 0;
-		semoparray [0].sem_flg = 0;
-		if (semop (semid, semoparray, 1) < 0)
-			sys_error ("semop failed", __LINE__);
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 0;
+		semoparray[0].sem_op = 0;
+		semoparray[0].sem_flg = 0;
+		if (semop(semid, semoparray, 1) < 0)
+			sys_error("semop failed", __LINE__);
 		exit(0);
-	} else if (pid < (pid_t)0) {
-		sys_error ("fork failed", __LINE__);
+	} else if (pid < (pid_t) 0) {
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 0, GETZCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 0, GETZCNT, arg))
+		sleep(1);
 
-	semoparray [0].sem_num = 0;
-	semoparray [0].sem_op  = -9;
-	semoparray [0].sem_flg = 0;
+	semoparray[0].sem_num = 0;
+	semoparray[0].sem_op = -9;
+	semoparray[0].sem_flg = 0;
 
-	if (semop (semid, semoparray, 1) < 0)
-		sys_error ("semop failed", __LINE__);
+	if (semop(semid, semoparray, 1) < 0)
+		sys_error("semop failed", __LINE__);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 
 	expected_value = 0;
 	arg.val = 0;
-	if ((val = semctl (semid, 0, GETVAL, arg)) < 0)
-		sys_error ("semctl (GETVAL) failed", __LINE__);
+	if ((val = semctl(semid, 0, GETVAL, arg)) < 0)
+		sys_error("semctl (GETVAL) failed", __LINE__);
 	if (val != expected_value)
-		error ("incorrect semaphore value", __LINE__);
+		error("incorrect semaphore value", __LINE__);
 
 	/* ------------------------------------------------------------------ */
 	/* TEST # 16 --- semval = 4, sem_op[4] = 0, sem_flg = 0               */
@@ -884,39 +884,38 @@
 	 * Child process
 	 */
 	arg.val = 4;
-	if (semctl (semid, 4, SETVAL, arg) < 0)
-		sys_error ("semctl (SETALL) failed", __LINE__);
+	if (semctl(semid, 4, SETVAL, arg) < 0)
+		sys_error("semctl (SETALL) failed", __LINE__);
 
-	if ((pid = fork()) == (pid_t)0) {
-		semoparray [0].sem_num = 4;
-		semoparray [0].sem_op  = -8;
-		semoparray [0].sem_flg = 0;
+	if ((pid = fork()) == (pid_t) 0) {
+		semoparray[0].sem_num = 4;
+		semoparray[0].sem_op = -8;
+		semoparray[0].sem_flg = 0;
 
-		if (semop (semid, semoparray, 1) >= 0)
-			error ("semop did not return ERMID", __LINE__);
-		else
-			if (errno != EIDRM) {
-				printf ("semop returned: %d\n", errno);
-				sys_error ("semop failed", __LINE__);
-			}
-		exit (0);
+		if (semop(semid, semoparray, 1) >= 0)
+			error("semop did not return ERMID", __LINE__);
+		else if (errno != EIDRM) {
+			printf("semop returned: %d\n", errno);
+			sys_error("semop failed", __LINE__);
+		}
+		exit(0);
 	} else if (pid < 0) {
-		sys_error ("fork failed", __LINE__);
+		sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child process's semaphore request before proceeding...
 	 */
-        while (!semctl (semid, 4, GETNCNT, arg))
-                sleep (1);
+	while (!semctl(semid, 4, GETNCNT, arg))
+		sleep(1);
 
 	arg.val = 0;
-	if (semctl (semid, 0, IPC_RMID, arg) < 0)
-		sys_error ("semctl (IPC_RMDI) failed", __LINE__);
+	if (semctl(semid, 0, IPC_RMID, arg) < 0)
+		sys_error("semctl (IPC_RMDI) failed", __LINE__);
 
-	waitpid (pid, &status, 0);	/* Wait for child to complete */
-	if (WEXITSTATUS (status))
-		sys_error ("child process terminated abnormally", __LINE__);
+	waitpid(pid, &status, 0);	/* Wait for child to complete */
+	if (WEXITSTATUS(status))
+		sys_error("child process terminated abnormally", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -931,40 +930,40 @@
 |            [-p] nproc: number of child processes                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((opt = getopt(argc, argv, "s:p:")) != EOF) {
 		switch (opt) {
-			case 's':
-				nsems = atoi (optarg);
-				break;
-			case 'p':
-				nprocs = atoi (optarg);
-				break;
-			default:
-				errflag++;
-				break;
+		case 's':
+			nsems = atoi(optarg);
+			break;
+		case 'p':
+			nprocs = atoi(optarg);
+			break;
+		default:
+			errflag++;
+			break;
 		}
 	}
 	if (nsems >= MAX_SEMAPHORES) {
 		errflag++;
-		fprintf (stderr, "ERROR: nsems must be less than %d\n",
+		fprintf(stderr, "ERROR: nsems must be less than %d\n",
 			MAX_SEMAPHORES);
 	}
 	if (nprocs >= MAX_CHILDREN) {
 		errflag++;
-		fprintf (stderr, "ERROR: nproc must be less than %d\n",
+		fprintf(stderr, "ERROR: nproc must be less than %d\n",
 			MAX_CHILDREN);
 	}
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -975,19 +974,19 @@
 | Function:  Sets up signal handler for SIGUSR1 signal                 |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void setup_signal_handler ()
+static void setup_signal_handler()
 {
-        struct sigaction sigact;
+	struct sigaction sigact;
 
-        sigact.sa_flags = 0;
-        sigfillset (&sigact.sa_mask);
+	sigact.sa_flags = 0;
+	sigfillset(&sigact.sa_mask);
 
-        /*
-         * Establish the signal handler for SIGUSR1
-         */
-        sigact.sa_handler = (void (*)(int)) catch;
-        if (sigaction (SIGUSR1, &sigact, NULL) < 0)
-                sys_error ("sigaction failed", __LINE__);
+	/*
+	 * Establish the signal handler for SIGUSR1
+	 */
+	sigact.sa_handler = (void (*)(int))catch;
+	if (sigaction(SIGUSR1, &sigact, NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -997,18 +996,19 @@
 | Function:  Signal catching function for SIGUSR1                      |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void catch (int sig)
+static void catch(int sig)
 {
-	char	err_msg [256];
-	pid_t	pid = getpid ();
+	char err_msg[256];
+	pid_t pid = getpid();
 
 	if (sig == SIGUSR1) {
 		if (pid == parent_pid)
-			printf ("\t\t\t\t    <<< caught signal (SIGUSR1, %d) >>>\n",
-				sig);
+			printf
+			    ("\t\t\t\t    <<< caught signal (SIGUSR1, %d) >>>\n",
+			     sig);
 	} else {
-		sprintf (err_msg, "caught unexpected signal (%d)", sig);
-		error (err_msg, __LINE__);
+		sprintf(err_msg, "caught unexpected signal (%d)", sig);
+		error(err_msg, __LINE__);
 	}
 }
 
@@ -1019,12 +1019,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -1034,8 +1034,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR pid %d [line: %d] %s\n", errpid, line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR pid %d [line: %d] %s\n", errpid, line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_01.c b/testcases/kernel/ipc/ipc_stress/shmem_test_01.c
index 5b7aae6..a7132e1 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_01.c
@@ -86,9 +86,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-void parse_args (int, char **);
-void sys_error (const char *, int);
-void error (const char *, int);
+void parse_args(int, char **);
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /*
  * Global variables
@@ -108,18 +108,18 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	shmid;		/* (Unique) Shared memory identifier */
-	char	*shmptr,	/* Shared memory segment address */
-		*ptr,		/* Index into shared memory segment */
-		value = 0;	/* Value written into shared memory segment */
+	int shmid;		/* (Unique) Shared memory identifier */
+	char *shmptr,		/* Shared memory segment address */
+	*ptr,			/* Index into shared memory segment */
+	 value = 0;		/* Value written into shared memory segment */
 
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
 	/*
 	 * Obtain a unique shared memory identifier with shmget ().
@@ -127,26 +127,26 @@
 	 * index through the shared memory segment, and then release the
 	 * shared memory segment with shmctl ().
 	 */
-	printf ("\n\tGet shared memory segment (%d bytes)\n", shmem_size);
-	if ((shmid = shmget (IPC_PRIVATE, shmem_size, SHMEM_MODE)) < 0)
-		sys_error ("shmget failed", __LINE__);
+	printf("\n\tGet shared memory segment (%d bytes)\n", shmem_size);
+	if ((shmid = shmget(IPC_PRIVATE, shmem_size, SHMEM_MODE)) < 0)
+		sys_error("shmget failed", __LINE__);
 
-	printf ("\n\tAttach shared memory segment to process\n");
-	if ((shmptr = shmat (shmid, 0, 0)) < 0)
-		sys_error ("shmat failed", __LINE__);
+	printf("\n\tAttach shared memory segment to process\n");
+	if ((shmptr = shmat(shmid, 0, 0)) < 0)
+		sys_error("shmat failed", __LINE__);
 
-	printf ("\n\tIndex through shared memory segment ...\n");
-	for (ptr=shmptr; ptr < (shmptr + shmem_size); ptr++)
+	printf("\n\tIndex through shared memory segment ...\n");
+	for (ptr = shmptr; ptr < (shmptr + shmem_size); ptr++)
 		*ptr = value++;
 
-	printf ("\n\tRelease shared memory\n");
-	if (shmctl (shmid, IPC_RMID, 0) < 0)
-		sys_error ("shmctl failed", __LINE__);
+	printf("\n\tRelease shared memory\n");
+	if (shmctl(shmid, IPC_RMID, 0) < 0)
+		sys_error("shmctl failed", __LINE__);
 
 	/*
 	 * Program completed successfully -- exit
 	 */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -163,21 +163,21 @@
 |            [-s] size: shared memory segment size                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "s:?")) != EOF) {
 		switch (i) {
-			case 's':
-				shmem_size = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 's':
+			shmem_size = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 
@@ -185,8 +185,8 @@
 		errflag++;
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -197,12 +197,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -212,8 +212,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_02.c b/testcases/kernel/ipc/ipc_stress/shmem_test_02.c
index 24d1b40..306b7c7 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_02.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_02.c
@@ -101,23 +101,23 @@
  */
 
 struct data {
-	int	who;
-	int	value;
+	int who;
+	int value;
 };
 
-void cleanup ();
-void handler (int, int, struct sigcontext *);
-void setup_signal_handlers ();
-static void child (int, unsigned char *);
-static int create_lock_file (char *);
-static void unlock_file (int);
-static void write_lock (int);
-static void read_lock (int);
-void parse_args (int, char **);
-void sys_error (const char *, int);
-void error (const char *, int);
-void loop (int, char);
-void tell (int, char *);
+void cleanup();
+void handler(int, int, struct sigcontext *);
+void setup_signal_handlers();
+static void child(int, unsigned char *);
+static int create_lock_file(char *);
+static void unlock_file(int);
+static void write_lock(int);
+static void read_lock(int);
+void parse_args(int, char **);
+void sys_error(const char *, int);
+void error(const char *, int);
+void loop(int, char);
+void tell(int, char *);
 
 enum { READ, WRITE };		/* Pipe read & write end indices */
 enum { PARENT, CHILD };		/* Pipe read & write end indices */
@@ -127,13 +127,13 @@
 #define DEFAULT_NUM_CHILDREN	2
 #define DEFAULT_SHMEM_SIZE	100000
 
-int     num_children = DEFAULT_NUM_CHILDREN;
-int 	buffer_size = DEFAULT_SHMEM_SIZE;
+int num_children = DEFAULT_NUM_CHILDREN;
+int buffer_size = DEFAULT_SHMEM_SIZE;
 
-unsigned long *checksum; 	/* Shared memory segment address */
-int	lockfd;
-pid_t	parent_pid;
-pid_t	pid [MAX_CHILDREN];
+unsigned long *checksum;	/* Shared memory segment address */
+int lockfd;
+pid_t parent_pid;
+pid_t pid[MAX_CHILDREN];
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -145,48 +145,48 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	unsigned char	*shmptr,	/* Shared memory segment address */
-		value = 0;	/* Value written into shared memory segment */
-	int	i;
-	unsigned char 	*ptr;
-	int	status;
-	int	shmem_size;
+	unsigned char *shmptr,	/* Shared memory segment address */
+	 value = 0;		/* Value written into shared memory segment */
+	int i;
+	unsigned char *ptr;
+	int status;
+	int shmem_size;
 	unsigned long cksum;
 
-	lockfd = create_lock_file (LOCK_FILE);
-	setup_signal_handlers ();
+	lockfd = create_lock_file(LOCK_FILE);
+	setup_signal_handlers();
 
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
-	parent_pid = getpid ();
-	for (i=0; i<num_children; i++)
-		pid [i] = (pid_t)0;
+	parent_pid = getpid();
+	for (i = 0; i < num_children; i++)
+		pid[i] = (pid_t) 0;
 
 	/*
 	 * Get chunk of shared memory for storing num_children checksum
 	 */
-	shmem_size = sizeof (unsigned long) * num_children;
-        if ((checksum = (unsigned long *)
-		mmap (0, shmem_size, PROT_READ | PROT_WRITE,
-		      MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED )
-		sys_error ("mmap failed", __LINE__);
+	shmem_size = sizeof(unsigned long) * num_children;
+	if ((checksum = (unsigned long *)
+	     mmap(0, shmem_size, PROT_READ | PROT_WRITE,
+		  MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
+		sys_error("mmap failed", __LINE__);
 
-	for (i=0; i < num_children; i++)
-		*(checksum + (sizeof (unsigned long) * i)) = 0;
+	for (i = 0; i < num_children; i++)
+		*(checksum + (sizeof(unsigned long) * i)) = 0;
 
 	/*
 	 * Get chunk of memory for writing scratch data
 	 */
-	printf ("\n\tGet shared memory segment (%d bytes)\n", buffer_size);
-	if ((shmptr = mmap (0, buffer_size, PROT_READ | PROT_WRITE,
-		MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
-		sys_error ("mmap failed", __LINE__);
+	printf("\n\tGet shared memory segment (%d bytes)\n", buffer_size);
+	if ((shmptr = mmap(0, buffer_size, PROT_READ | PROT_WRITE,
+			   MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED)
+		sys_error("mmap failed", __LINE__);
 
 	/*
 	 * Parent:
@@ -195,79 +195,79 @@
 	 */
 	cksum = value = 0;
 
-	printf ("\n\tParent: calculate shared memory segment checksum\n");
-	write_lock (lockfd);
-	for (ptr=shmptr; ptr < (shmptr+buffer_size); ptr++) {
-                *ptr = (value++) % (UCHAR_MAX + 1);
+	printf("\n\tParent: calculate shared memory segment checksum\n");
+	write_lock(lockfd);
+	for (ptr = shmptr; ptr < (shmptr + buffer_size); ptr++) {
+		*ptr = (value++) % (UCHAR_MAX + 1);
 		cksum += *ptr;
 	}
-	unlock_file (lockfd);
-	printf ("\t        shared memory checksum %08lx\n", cksum);
+	unlock_file(lockfd);
+	printf("\t        shared memory checksum %08lx\n", cksum);
 
-	printf ("\n\tSpawning %d child processes ... \n", num_children);
-	for (i=0; i<num_children; i++) {
+	printf("\n\tSpawning %d child processes ... \n", num_children);
+	for (i = 0; i < num_children; i++) {
 
-		if ((pid [i] = fork()) == (pid_t)0) {
-			child (i, shmptr);
-			exit (0);
-		} else if (pid [i] < (pid_t)0)
-			sys_error ("fork failed", __LINE__);
+		if ((pid[i] = fork()) == (pid_t) 0) {
+			child(i, shmptr);
+			exit(0);
+		} else if (pid[i] < (pid_t) 0)
+			sys_error("fork failed", __LINE__);
 	}
 
 	/*
 	 * Wait for child processes to compute checksum and complete...
 	 */
-	for (i=0; i<num_children; i++) {
-		waitpid (pid [i], &status, 0);
+	for (i = 0; i < num_children; i++) {
+		waitpid(pid[i], &status, 0);
 
-		if (!WIFEXITED (status))
-			sys_error ("child process terminated abnormally",
-				__LINE__);
-		if (cksum != *(checksum + (sizeof (unsigned long) * i))) {
-			printf ("checksum [%d] = %08lx\n", i, checksum [i]);
-			error ("checksums do not match", __LINE__);
+		if (!WIFEXITED(status))
+			sys_error("child process terminated abnormally",
+				  __LINE__);
+		if (cksum != *(checksum + (sizeof(unsigned long) * i))) {
+			printf("checksum [%d] = %08lx\n", i, checksum[i]);
+			error("checksums do not match", __LINE__);
 		}
 	}
-	printf ("\n\tParent: children calculated segment successfully\n");
+	printf("\n\tParent: children calculated segment successfully\n");
 	/*
 	 * Program completed successfully -- exit
 	 */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
 
-static void child (int num, unsigned char *shmptr)
+static void child(int num, unsigned char *shmptr)
 {
 	unsigned long cksum = 0;
-	int	i;
+	int i;
 
-	read_lock (lockfd);
-	for (i=0; i<buffer_size; i++)
+	read_lock(lockfd);
+	for (i = 0; i < buffer_size; i++)
 		cksum += *shmptr++;
-	unlock_file (lockfd);
+	unlock_file(lockfd);
 
-	*(checksum + (sizeof (unsigned long) * num)) = cksum;
-	printf ("\t\tchild (%02d): checksum %08lx\n", num,
-		*(checksum + (sizeof (unsigned long) * num)));
+	*(checksum + (sizeof(unsigned long) * num)) = cksum;
+	printf("\t\tchild (%02d): checksum %08lx\n", num,
+	       *(checksum + (sizeof(unsigned long) * num)));
 }
 
-static void write_lock (int fd)
+static void write_lock(int fd)
 {
-	if (lockf (fd, F_LOCK, 0) < 0)
-		sys_error ("lockf (LOCK) failed", __LINE__);
+	if (lockf(fd, F_LOCK, 0) < 0)
+		sys_error("lockf (LOCK) failed", __LINE__);
 }
 
-static void read_lock (int fd)
+static void read_lock(int fd)
 {
-	if (lockf (fd, F_TEST, 0) < 0)
-		sys_error ("lockf (LOCK) failed", __LINE__);
+	if (lockf(fd, F_TEST, 0) < 0)
+		sys_error("lockf (LOCK) failed", __LINE__);
 }
 
-static void unlock_file (int fd)
+static void unlock_file(int fd)
 {
-	if (lockf (fd, F_ULOCK, 0) < 0)
-		sys_error ("lockf (UNLOCK) failed", __LINE__);
+	if (lockf(fd, F_ULOCK, 0) < 0)
+		sys_error("lockf (UNLOCK) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -277,16 +277,16 @@
 | Function:  Setup the signal handler for SIGPIPE.                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void setup_signal_handlers ()
+void setup_signal_handlers()
 {
 	struct sigaction invec;
 
-	invec.sa_handler = (void (*)(int)) handler;
-	sigemptyset (&invec.sa_mask);
+	invec.sa_handler = (void (*)(int))handler;
+	sigemptyset(&invec.sa_mask);
 	invec.sa_flags = 0;
 
-	if (sigaction (SIGINT, &invec, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	if (sigaction(SIGINT, &invec, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 
 }
 
@@ -304,23 +304,22 @@
 |            o  Other:   Print message and abort program...            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig, int code, struct sigcontext *scp)
+void handler(int sig, int code, struct sigcontext *scp)
 {
-	char 	msg [100];	/* Buffer for error message */
+	char msg[100];		/* Buffer for error message */
 
 	if (sig == SIGINT) {
-		if (getpid () == parent_pid) {
+		if (getpid() == parent_pid) {
 
-			fprintf (stderr, "Received SIGINT -- cleaning up...\n");
-			fflush (stderr);
+			fprintf(stderr, "Received SIGINT -- cleaning up...\n");
+			fflush(stderr);
 
-			cleanup ();
-		}
-		else
-			exit (-1);
+			cleanup();
+		} else
+			exit(-1);
 	} else {
-		sprintf (msg, "Received an unexpected signal (%d)", sig);
-		error (msg, __LINE__);
+		sprintf(msg, "Received an unexpected signal (%d)", sig);
+		error(msg, __LINE__);
 	}
 }
 
@@ -332,30 +331,30 @@
 |            processes and exits the program...                        |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void cleanup ()
+void cleanup()
 {
 	int i;
 
-	if (getpid () == parent_pid) {
-		for (i=0; i<num_children; i++) {
-			if (pid [i] > (pid_t)0 && kill (pid [i], SIGKILL) < 0)
-				sys_error ("signal failed", __LINE__);
+	if (getpid() == parent_pid) {
+		for (i = 0; i < num_children; i++) {
+			if (pid[i] > (pid_t) 0 && kill(pid[i], SIGKILL) < 0)
+				sys_error("signal failed", __LINE__);
 		}
 	}
 
-	exit (-1);
+	exit(-1);
 }
 
-static int create_lock_file (char *lock_name)
+static int create_lock_file(char *lock_name)
 {
-	int	fd;
+	int fd;
 
-        if ((fd = open (lock_name, O_RDWR)) < 0) {
-		if ((fd = open (lock_name, O_RDWR|O_CREAT|O_EXCL, 0666)) < 0) {
-			perror ("cannot create lock file");
-			exit (-1);
+	if ((fd = open(lock_name, O_RDWR)) < 0) {
+		if ((fd = open(lock_name, O_RDWR | O_CREAT | O_EXCL, 0666)) < 0) {
+			perror("cannot create lock file");
+			exit(-1);
 		}
-        }
+	}
 	return (fd);
 }
 
@@ -373,30 +372,30 @@
 |            [-c] num_children: number of child processes              |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "c:s:?")) != EOF) {
 		switch (i) {
-			case 'c':
-				num_children = atoi (optarg);
-				break;
-			case 's':
-				buffer_size = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 'c':
+			num_children = atoi(optarg);
+			break;
+		case 's':
+			buffer_size = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -407,12 +406,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -422,8 +421,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	cleanup ();
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	cleanup();
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
index 5308374..3526370 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
@@ -107,17 +107,17 @@
  * error (): Error message function
  * cleanup (): Releases semaphores & kills child processes
  */
-static void create_semaphores ();
-static void delete_semaphores ();
-static void lock_resource (int);
-static void unlock_resource (int);
-static void parse_args (int, char **);
-static void setup_signal_handlers ();
-static void handler (int, int, struct sigcontext *);
-static void child (int, unsigned char *);
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void cleanup ();
+static void create_semaphores();
+static void delete_semaphores();
+static void lock_resource(int);
+static void unlock_resource(int);
+static void parse_args(int, char **);
+static void setup_signal_handlers();
+static void handler(int, int, struct sigcontext *);
+static void child(int, unsigned char *);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void cleanup();
 
 /*
  * Global Variables:
@@ -130,20 +130,20 @@
  * buffer_size: size of "scratch" shared memory segment
  * read_count: number of child processes reading data
  */
-enum { READ_COUNT, WRITE };		/* semaphore constants */
-int	*read_count;
+enum { READ_COUNT, WRITE };	/* semaphore constants */
+int *read_count;
 
-unsigned long *checksum; 	/* shared memory segment address */
-pid_t	parent_pid;		/* process id of parent */
-pid_t	pid [MAX_CHILDREN];	/* child processes process id's */
-int	semid;			/* semaphore id */
-int     num_children = DEFAULT_NUM_CHILDREN;
-int 	buffer_size = DEFAULT_SHMEM_SIZE;
+unsigned long *checksum;	/* shared memory segment address */
+pid_t parent_pid;		/* process id of parent */
+pid_t pid[MAX_CHILDREN];	/* child processes process id's */
+int semid;			/* semaphore id */
+int num_children = DEFAULT_NUM_CHILDREN;
+int buffer_size = DEFAULT_SHMEM_SIZE;
 
 union semun {
-   int val;
-   struct semid_ds *buf;
-   unsigned short *array;
+	int val;
+	struct semid_ds *buf;
+	unsigned short *array;
 } arg;
 
 /*---------------------------------------------------------------------+
@@ -156,13 +156,13 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	fd;		/* Misc file descriptor  */
-	int	i; 		/* Misc loop index */
-	int	shmem_size;	/* Size (in bytes) of shared memory segment */
-	int	status;		/* Child processes exit status */
-	unsigned char *ptr;		/* Misc pointer */
+	int fd;			/* Misc file descriptor  */
+	int i;			/* Misc loop index */
+	int shmem_size;		/* Size (in bytes) of shared memory segment */
+	int status;		/* Child processes exit status */
+	unsigned char *ptr;	/* Misc pointer */
 	unsigned char data = 0;	/* Value written into shared memory segment */
 	unsigned char *shmptr;	/* Shared memory segment address */
 	unsigned long cksum;	/* Shared memory segment checksum */
@@ -170,8 +170,8 @@
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
 	/*
 	 * Setup the signal handlers (in case user aborts program).
@@ -182,25 +182,25 @@
 	 * Save the parent process id and initialize the array of child
 	 * process ids.
 	 */
-	setup_signal_handlers ();
-	create_semaphores ();
+	setup_signal_handlers();
+	create_semaphores();
 
-	parent_pid = getpid ();
-	for (i=0; i<num_children; i++)
-		pid [i] = (pid_t)0;
+	parent_pid = getpid();
+	for (i = 0; i < num_children; i++)
+		pid[i] = (pid_t) 0;
 
 	/*
 	 * Create a shared memory segment for storing the read count
 	 * (number of child processes reading shared data)
 	 * After creating the shared memory segment, initialize it.
 	 */
-	if ((fd = open ("/dev/zero", O_RDWR)) < 0)
-		sys_error ("open failed", __LINE__);
+	if ((fd = open("/dev/zero", O_RDWR)) < 0)
+		sys_error("open failed", __LINE__);
 	if ((read_count = (int *)
-		mmap (0, sizeof (int), PROT_READ | PROT_WRITE,
-			MAP_SHARED, fd, 0)) < 0)
-		sys_error ("mmap failed", __LINE__);
-	close (fd);
+	     mmap(0, sizeof(int), PROT_READ | PROT_WRITE,
+		  MAP_SHARED, fd, 0)) < 0)
+		sys_error("mmap failed", __LINE__);
+	close(fd);
 	*read_count = 0;
 
 	/*
@@ -208,37 +208,37 @@
 	 * processes checksums by memory mapping /dev/zero.
 	 * After creating the shared memory segment, initialize it.
 	 */
-	if ((fd = open ("/dev/zero", O_RDWR)) < 0)
-		sys_error ("open failed", __LINE__);
-	shmem_size = sizeof (unsigned long) * num_children;
+	if ((fd = open("/dev/zero", O_RDWR)) < 0)
+		sys_error("open failed", __LINE__);
+	shmem_size = sizeof(unsigned long) * num_children;
 	if ((checksum = (unsigned long *)
-		mmap (0, shmem_size, PROT_READ | PROT_WRITE,
-			MAP_SHARED, fd, 0)) < 0)
-		sys_error ("mmap failed", __LINE__);
-	close (fd);
+	     mmap(0, shmem_size, PROT_READ | PROT_WRITE,
+		  MAP_SHARED, fd, 0)) < 0)
+		sys_error("mmap failed", __LINE__);
+	close(fd);
 
-	for (i=0; i < num_children; i++)
-		*(checksum + (sizeof (unsigned long) * i)) = 0;
+	for (i = 0; i < num_children; i++)
+		*(checksum + (sizeof(unsigned long) * i)) = 0;
 
 	/*
 	 * Create the "scratch" shared memory segment for storing
 	 * a series of values by memory mapping /dev/zero.
 	 */
-	if ((fd = open ("/dev/zero", O_RDWR)) < 0)
-		sys_error ("open failed", __LINE__);
+	if ((fd = open("/dev/zero", O_RDWR)) < 0)
+		sys_error("open failed", __LINE__);
 
-	printf ("\n\tGet shared memory segment (%d bytes)\n", buffer_size);
-	if ((shmptr = mmap (0, buffer_size, PROT_READ | PROT_WRITE,
-		MAP_SHARED, fd, 0)) < 0)
-		sys_error ("mmap failed", __LINE__);
-	close (fd);
+	printf("\n\tGet shared memory segment (%d bytes)\n", buffer_size);
+	if ((shmptr = mmap(0, buffer_size, PROT_READ | PROT_WRITE,
+			   MAP_SHARED, fd, 0)) < 0)
+		sys_error("mmap failed", __LINE__);
+	close(fd);
 
 	/*
 	 * Obtain an exclusive "write" lock on the shared memory data
 	 * segment -- get lock now to insure the parent process gets
 	 * first access to the segment.
 	 */
-	lock_resource (WRITE);
+	lock_resource(WRITE);
 
 	/*
 	 * Spawn all N child processes.  Each child process will compute
@@ -246,14 +246,14 @@
 	 * the results in the other shared memory segment accessible
 	 * by the parent.
 	 */
-	printf ("\n\tSpawning %d child processes ... \n", num_children);
-	for (i=0; i<num_children; i++) {
+	printf("\n\tSpawning %d child processes ... \n", num_children);
+	for (i = 0; i < num_children; i++) {
 
-		if ((pid [i] = fork()) == (pid_t)0) {
-			child (i, shmptr);
-			exit (0);
-		} else if (pid [i] < (pid_t)0)
-			sys_error ("fork failed", __LINE__);
+		if ((pid[i] = fork()) == (pid_t) 0) {
+			child(i, shmptr);
+			exit(0);
+		} else if (pid[i] < (pid_t) 0)
+			sys_error("fork failed", __LINE__);
 	}
 
 	/*
@@ -262,15 +262,15 @@
 	 * completing so that the child processes may begin to read the
 	 * data.
 	 */
-	printf ("\n\tParent: calculate shared memory segment checksum\n");
+	printf("\n\tParent: calculate shared memory segment checksum\n");
 	cksum = data = 0;
 
-	for (ptr=shmptr; ptr < (shmptr+buffer_size); ptr++) {
+	for (ptr = shmptr; ptr < (shmptr + buffer_size); ptr++) {
 		*ptr = (data++) % (UCHAR_MAX + 1);
 		cksum += *ptr;
 	}
-	printf ("\t        shared memory checksum %08lx\n", cksum);
-	unlock_resource (WRITE);
+	printf("\t        shared memory checksum %08lx\n", cksum);
+	unlock_resource(WRITE);
 
 	/*
 	 * Wait for the child processes to compute the checksums and complete.
@@ -278,24 +278,24 @@
 	 * that they ran to completion and then verify the corresponding
 	 * checksum.
 	 */
-	for (i=0; i<num_children; i++) {
-		waitpid (pid [i], &status, 0);
+	for (i = 0; i < num_children; i++) {
+		waitpid(pid[i], &status, 0);
 
-		if (!WIFEXITED (status))
-			sys_error ("child process terminated abnormally",
-				__LINE__);
-		if (cksum != *(checksum + (sizeof (unsigned long) * i))) {
-			printf ("checksum [%d] = %08lx\n", i, checksum [i]);
-			error ("checksums do not match", __LINE__);
+		if (!WIFEXITED(status))
+			sys_error("child process terminated abnormally",
+				  __LINE__);
+		if (cksum != *(checksum + (sizeof(unsigned long) * i))) {
+			printf("checksum [%d] = %08lx\n", i, checksum[i]);
+			error("checksums do not match", __LINE__);
 		}
 	}
-	printf ("\n\tParent: children calculated segment successfully\n");
+	printf("\n\tParent: children calculated segment successfully\n");
 
 	/*
 	 * Program completed successfully, cleanup semaphores and exit.
 	 */
-	delete_semaphores ();
-	printf ("\nsuccessful!\n");
+	delete_semaphores();
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -312,37 +312,37 @@
 |                       computed by child processes                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void child (int num, unsigned char *shmptr)
+static void child(int num, unsigned char *shmptr)
 {
 	unsigned long cksum = 0;	/* Shared memory regions checksum */
-	int	i;			/* Misc index */
+	int i;			/* Misc index */
 
 	/*
 	 * Wait for a READ_COUNT lock on the shared memory segment, then
 	 * compute the checksum and release the READ_COUNT lock.
 	 */
-	lock_resource (READ_COUNT);
+	lock_resource(READ_COUNT);
 	(*read_count)++;
 	if (*read_count == 1)
-		lock_resource (WRITE);
-	unlock_resource (READ_COUNT);
+		lock_resource(WRITE);
+	unlock_resource(READ_COUNT);
 
-	for (i=0; i<buffer_size; i++)
+	for (i = 0; i < buffer_size; i++)
 		cksum += *shmptr++;
 
-	lock_resource (READ_COUNT);
+	lock_resource(READ_COUNT);
 	(*read_count)--;
 	if (*read_count == 0)
-		unlock_resource (WRITE);
-	unlock_resource (READ_COUNT);
+		unlock_resource(WRITE);
+	unlock_resource(READ_COUNT);
 
 	/*
 	 * Store the resulting checksum and print out a message
 	 */
-	checksum [num] = cksum;
-	*(checksum + (sizeof (unsigned long) * num)) = cksum;
-	printf ("\t\tchild (%02d): checksum %08lx\n", num,
-		*(checksum + (sizeof (unsigned long) * num)));
+	checksum[num] = cksum;
+	*(checksum + (sizeof(unsigned long) * num)) = cksum;
+	printf("\t\tchild (%02d): checksum %08lx\n", num,
+	       *(checksum + (sizeof(unsigned long) * num)));
 }
 
 /*---------------------------------------------------------------------+
@@ -357,21 +357,21 @@
 | Updates:   semid - system wide semaphore identifier                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void create_semaphores ()
+static void create_semaphores()
 {
-	int	nsems = 2;	/* Number of semaphores to create */
+	int nsems = 2;		/* Number of semaphores to create */
 
 	/*
 	 * Create two system unique semaphores.
 	 */
-	if ((semid = semget (IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0)
-		sys_error ("semget failed", __LINE__);
+	if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0)
+		sys_error("semget failed", __LINE__);
 
 	arg.val = 1;
-	if (semctl (semid, WRITE, SETVAL, arg) < 0)
-		sys_error ("semctl (SETVAL) failed", __LINE__);
-	if (semctl (semid, READ_COUNT, SETVAL, arg) < 0)
-		sys_error ("semctl (SETVAL) failed", __LINE__);
+	if (semctl(semid, WRITE, SETVAL, arg) < 0)
+		sys_error("semctl (SETVAL) failed", __LINE__);
+	if (semctl(semid, READ_COUNT, SETVAL, arg) < 0)
+		sys_error("semctl (SETVAL) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -381,17 +381,17 @@
 | Function:  Deletes the two READ/WRITE semaphores.                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void delete_semaphores ()
+static void delete_semaphores()
 {
-	int	nsems = 2;
+	int nsems = 2;
 
 	/*
 	 * Delete both READ_COUNT and WRITE semaphores.
 	 */
 
 	arg.val = 0;
-	if (semctl (semid, nsems, IPC_RMID, arg) < 0)
-		sys_error ("semctl (IPC_RMID) failed", __LINE__);
+	if (semctl(semid, nsems, IPC_RMID, arg) < 0)
+		sys_error("semctl (IPC_RMID) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -401,16 +401,16 @@
 | Function:  Obtains a READ/WRITE semaphore lock.                      |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void lock_resource (int semaphore)
+static void lock_resource(int semaphore)
 {
-	struct sembuf	buf;
+	struct sembuf buf;
 
-	buf.sem_op = -1;		/* Obtain resource */
+	buf.sem_op = -1;	/* Obtain resource */
 	buf.sem_num = semaphore;
 	buf.sem_flg = 0;
 
-	if (semop (semid, &buf, 1) < 0)
-		sys_error ("semop (LOCK) failed", __LINE__);
+	if (semop(semid, &buf, 1) < 0)
+		sys_error("semop (LOCK) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -420,16 +420,16 @@
 | Function:  Releases a READ/WRITE semaphore lock.                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void unlock_resource (int semaphore)
+static void unlock_resource(int semaphore)
 {
-	struct sembuf	buf;
+	struct sembuf buf;
 
-	buf.sem_op = 1;			/* Release resource */
+	buf.sem_op = 1;		/* Release resource */
 	buf.sem_num = semaphore;
 	buf.sem_flg = 0;
 
-	if (semop (semid, &buf, 1) < 0)
-		sys_error ("semop (UNLOCK) failed", __LINE__);
+	if (semop(semid, &buf, 1) < 0)
+		sys_error("semop (UNLOCK) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -446,35 +446,35 @@
 |            [-c] num_children: number of child processes              |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "c:s:?")) != EOF) {
 		switch (i) {
-			case 'c':
-				num_children = atoi (optarg);
-				break;
-			case 's':
-				buffer_size = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 'c':
+			num_children = atoi(optarg);
+			break;
+		case 's':
+			buffer_size = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 	if (num_children >= MAX_CHILDREN) {
 		errflag++;
-		fprintf (stderr, "ERROR: num_children must be less than %d\n",
+		fprintf(stderr, "ERROR: num_children must be less than %d\n",
 			MAX_CHILDREN);
 	}
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -485,16 +485,16 @@
 | Function:  Setup the signal handler for SIGINT.                      |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void setup_signal_handlers ()
+void setup_signal_handlers()
 {
 	struct sigaction invec;
 
-	invec.sa_handler = (void (*)(int)) handler;
-	sigemptyset (&invec.sa_mask);
+	invec.sa_handler = (void (*)(int))handler;
+	sigemptyset(&invec.sa_mask);
 	invec.sa_flags = 0;
 
-	if (sigaction (SIGINT, &invec, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	if (sigaction(SIGINT, &invec, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 
 }
 
@@ -510,23 +510,22 @@
 |            o  Other:   Print message and abort program...            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig, int code, struct sigcontext *scp)
+void handler(int sig, int code, struct sigcontext *scp)
 {
-	char 	msg [100];	/* Buffer for error message */
+	char msg[100];		/* Buffer for error message */
 
 	if (sig == SIGINT) {
-		if (getpid () == parent_pid) {
+		if (getpid() == parent_pid) {
 
-			fprintf (stderr, "Received SIGINT -- cleaning up...\n");
-			fflush (stderr);
+			fprintf(stderr, "Received SIGINT -- cleaning up...\n");
+			fflush(stderr);
 
-			cleanup ();
-		}
-		else
-			exit (-1);
+			cleanup();
+		} else
+			exit(-1);
 	} else {
-		sprintf (msg, "Received an unexpected signal (%d)", sig);
-		error (msg, __LINE__);
+		sprintf(msg, "Received an unexpected signal (%d)", sig);
+		error(msg, __LINE__);
 	}
 }
 
@@ -538,19 +537,19 @@
 |            processes and exits the program...                        |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void cleanup ()
+void cleanup()
 {
 	int i;
 
-	if (getpid () == parent_pid) {
-		delete_semaphores ();
-		for (i=0; i<num_children; i++) {
-			if (pid [i] > (pid_t)0 && kill (pid [i], SIGKILL) < 0)
-				sys_error ("signal failed", __LINE__);
+	if (getpid() == parent_pid) {
+		delete_semaphores();
+		for (i = 0; i < num_children; i++) {
+			if (pid[i] > (pid_t) 0 && kill(pid[i], SIGKILL) < 0)
+				sys_error("signal failed", __LINE__);
 		}
 	}
 
-	exit (-1);
+	exit(-1);
 }
 
 /*---------------------------------------------------------------------+
@@ -560,12 +559,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -575,8 +574,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	cleanup ();
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	cleanup();
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
index 0e62bb0..2f648b8 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
@@ -69,15 +69,15 @@
 #ifdef _LINUX_
 typedef unsigned long ulong_t;
 //#include <sys/except.h>
-# ifndef PAGE_SIZE
-#  define PAGE_SIZE 0x400
-# endif
-# ifndef SIGDANGER
-#  define SIGDANGER 4
-# endif
+#ifndef PAGE_SIZE
+#define PAGE_SIZE 0x400
+#endif
+#ifndef SIGDANGER
+#define SIGDANGER 4
+#endif
 #else
-# include <sys/m_except.h>
-# include <sys/machine.h>
+#include <sys/m_except.h>
+#include <sys/machine.h>
 #endif
 
 #ifdef _IA64
@@ -116,15 +116,15 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-static int mkemptyfile (uint);
-static void parse_args (int, char **);
-static void cleanup (int);
-static void setup_signal_handlers ();
-static void int_handler (int signal);
-static void segv_handler (int signal, int code, struct sigcontext *scp);
-static void bus_handler (int signal, int code, struct sigcontext *scp);
-static void sys_error (const char *, int);
-static void error (const char *, int);
+static int mkemptyfile(uint);
+static void parse_args(int, char **);
+static void cleanup(int);
+static void setup_signal_handlers();
+static void int_handler(int signal);
+static void segv_handler(int signal, int code, struct sigcontext *scp);
+static void bus_handler(int signal, int code, struct sigcontext *scp);
+static void sys_error(const char *, int);
+static void error(const char *, int);
 
 /*
  * Global variables
@@ -135,16 +135,16 @@
  * nprocs:
  * childpid:
  */
-static int bflg,lflg,mflg,pflg = 0;
-static int Fflg,Mflg,Vflg,Wflg = 0;
-char	*filename;
-int	fd;
-int	nprocs;
-int	childpid [MAXPROCS];
+static int bflg, lflg, mflg, pflg = 0;
+static int Fflg, Mflg, Vflg, Wflg = 0;
+char *filename;
+int fd;
+int nprocs;
+int childpid[MAXPROCS];
 
-int	nloops, objtype, pgspblks;
-pid_t	parent_pid;
-size_t	length;
+int nloops, objtype, pgspblks;
+pid_t parent_pid;
+size_t length;
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -157,7 +157,7 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	caddr_t region;
 	int *wptr;
@@ -172,24 +172,25 @@
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
-	setup_signal_handlers ();
-	parent_pid = getpid ();
+	setup_signal_handlers();
+	parent_pid = getpid();
 
 	/*
 	 * Show options in effect.
 	 */
-	printf ("\n\tObject type to map = %s\n",
-			 (objtype == MEMOBJ) ? "Anonymous memory" : "File");
-	printf ("\tNumber of loops    = %d\n", nloops);
-	printf ("\tNumber of procs    = %d\n", nprocs);
-	printf ("\tBytes per process  = %ld (%ldMB)\n", (long)length, (long)length/MB);
+	printf("\n\tObject type to map = %s\n",
+	       (objtype == MEMOBJ) ? "Anonymous memory" : "File");
+	printf("\tNumber of loops    = %d\n", nloops);
+	printf("\tNumber of procs    = %d\n", nprocs);
+	printf("\tBytes per process  = %ld (%ldMB)\n", (long)length,
+	       (long)length / MB);
 
 	/*
 	 * Determine the number of words for that size.
- 	 */
+	 */
 	nwords = length / sizeof(int);
 
 	/*
@@ -207,9 +208,9 @@
 	 * Map the object with the specified flags.
 	 */
 	if ((region = mmap(0, length, PROT_READ | PROT_WRITE,
-				map_flags | MAP_SHARED, fd, 0))
-		 == MAP_FAILED) {
-		sys_error ("mmap failed", __LINE__);
+			   map_flags | MAP_SHARED, fd, 0))
+	    == MAP_FAILED) {
+		sys_error("mmap failed", __LINE__);
 	}
 
 	/*
@@ -219,8 +220,8 @@
 		/*
 		 * Child leaves loop, parent continues to fork.
 		 */
-		if ((pid = fork()) < (pid_t)0) {
-			sys_error ("fork failed\n", __LINE__);
+		if ((pid = fork()) < (pid_t) 0) {
+			sys_error("fork failed\n", __LINE__);
 		} else if (pid == 0)
 			break;
 		else
@@ -232,82 +233,89 @@
 	/*
 	 * Initialize each word in the region with a unique value.
 	 */
-        checksum = 0;
-        for (word = 0, wptr = (int *)region; word < nwords; word++, wptr++) {
+	checksum = 0;
+	for (word = 0, wptr = (int *)region; word < nwords; word++, wptr++) {
 		if (Vflg) {
 			if (word && word % WPERMB == 0)
-				printf ("\t[%d] %ldMB initialized...\n",
-					pid, (long)word/WPERMB);
+				printf("\t[%d] %ldMB initialized...\n",
+				       pid, (long)word / WPERMB);
 		}
 		*wptr = word;
-                checksum += word;
-        }
+		checksum += word;
+	}
 	if (Vflg) {
-		printf ("\t[%d] checksum = %d\n", pid, checksum);
+		printf("\t[%d] checksum = %d\n", pid, checksum);
 	}
 
 	for (loop = 1; loop <= nloops; loop++) {
 
-	/*
-	 * Read back each word in the region and check its value.
-	 */
-        checksum2 = 0;
-        last = -1;
-        for (word = 0, wptr = (int *)region; word < nwords; word++, wptr++) {
-		if (Vflg) {
-			if (word && word % WPERMB == 0)
-				printf ("\t[%d][%d] %ldMB verified...\n", pid, loop,
-					(long)word/WPERMB);
-		}
-                if (*wptr != word) {
-                        addr = ((intptr_t)wptr & 0x0fffffff)/4096;
-                        if (addr != last) {
-                                last = addr;
-				if (Vflg) {
-					printf ("\t[%d][%d] page in error at addr = %d\n",
-						pid, loop, addr);
-				}
-                        }
+		/*
+		 * Read back each word in the region and check its value.
+		 */
+		checksum2 = 0;
+		last = -1;
+		for (word = 0, wptr = (int *)region; word < nwords;
+		     word++, wptr++) {
 			if (Vflg) {
-				printf ("\t[%d][%d] Word = %d, Value = %d\n",
-					pid, loop, word, *wptr);
+				if (word && word % WPERMB == 0)
+					printf("\t[%d][%d] %ldMB verified...\n",
+					       pid, loop, (long)word / WPERMB);
 			}
-                }
-                checksum2 += *wptr;
-        }
-	if (Vflg) {
-		printf ("\t[%d][%d] checksum2 = %d\n", pid, loop, checksum2);
-	}
-
-	if (checksum2 == checksum) {
-		if (Vflg) {
-			printf ("\t[%d][%d] Check sums compare\n", pid, loop);
+			if (*wptr != word) {
+				addr = ((intptr_t) wptr & 0x0fffffff) / 4096;
+				if (addr != last) {
+					last = addr;
+					if (Vflg) {
+						printf
+						    ("\t[%d][%d] page in error at addr = %d\n",
+						     pid, loop, addr);
+					}
+				}
+				if (Vflg) {
+					printf
+					    ("\t[%d][%d] Word = %d, Value = %d\n",
+					     pid, loop, word, *wptr);
+				}
+			}
+			checksum2 += *wptr;
 		}
-	} else {
 		if (Vflg) {
-			printf ("\t[%d][%d] Check sums DON'T compare\n", pid, loop);
+			printf("\t[%d][%d] checksum2 = %d\n", pid, loop,
+			       checksum2);
 		}
-	}
 
-	} /* end loop */
+		if (checksum2 == checksum) {
+			if (Vflg) {
+				printf("\t[%d][%d] Check sums compare\n", pid,
+				       loop);
+			}
+		} else {
+			if (Vflg) {
+				printf("\t[%d][%d] Check sums DON'T compare\n",
+				       pid, loop);
+			}
+		}
+
+	}			/* end loop */
 
 	/*
 	 * Unmap the region.
 	 */
 	if ((rc = munmap(region, length)) != 0) {
-		sys_error ("munmap failed", __LINE__);
+		sys_error("munmap failed", __LINE__);
 	}
 	/*
 	 * Program completed successfully -- exit
 	 */
-	if (pid != parent_pid) exit (0);
+	if (pid != parent_pid)
+		exit(0);
 
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 	cleanup(0);
 	return 0;
 }
 
-static void cleanup (int rc)
+static void cleanup(int rc)
 {
 	int i;
 
@@ -315,8 +323,8 @@
 	 * Close and remove any file we've created.
 	 */
 	if (Fflg) {
-		close (fd);
-		unlink (filename);
+		close(fd);
+		unlink(filename);
 	}
 
 	/*
@@ -324,7 +332,7 @@
 	 */
 	if (rc) {
 		for (i = 1; i < nprocs; i++) {
-			kill (childpid[i], SIGKILL);
+			kill(childpid[i], SIGKILL);
 		}
 	}
 
@@ -334,7 +342,7 @@
 /*
  * segv_handler - signal handler for SIGSEGV
  */
-static void segv_handler (int signal, int code, struct sigcontext *scp)
+static void segv_handler(int signal, int code, struct sigcontext *scp)
 {
 #ifndef _LINUX_
 	int except;
@@ -345,48 +353,48 @@
 	 * Get the exception type.  This is either an errno value
 	 * or an exception value from <sys/m_except.h>.
 	 */
-# ifdef _IA64
-	except  = scp->sc_context.__excp_type;
-# else
-	except	= scp->sc_jmpbuf.jmp_context.excp_type;
-# endif
+#ifdef _IA64
+	except = scp->sc_context.__excp_type;
+#else
+	except = scp->sc_jmpbuf.jmp_context.excp_type;
+#endif
 
 	/*
 	 * Get the Data Address Register and Interrupt Status Register
 	 * for the exception.
 	 */
-# ifdef _IA64
-	dar     = scp->sc_context.__ifa;
-	dsisr   = scp->sc_context.__isr;
-# else
-	dar	= scp->sc_jmpbuf.jmp_context.except[0];
-	dsisr	= scp->sc_jmpbuf.jmp_context.except[1];
-# endif
+#ifdef _IA64
+	dar = scp->sc_context.__ifa;
+	dsisr = scp->sc_context.__isr;
+#else
+	dar = scp->sc_jmpbuf.jmp_context.except[0];
+	dsisr = scp->sc_jmpbuf.jmp_context.except[1];
+#endif
 
-	printf ("SIGSEGV occurred on address 0x%08x.\n", dar);
+	printf("SIGSEGV occurred on address 0x%08x.\n", dar);
 
 	/*
 	 * Determine if the operation was a load or a store.
 	 * Definition of bits in DSISR are in <sys/machine.h>.
 	 */
 	if (dsisr & DSISR_ST) {
-		printf ("The operation was a store.\n");
+		printf("The operation was a store.\n");
 	} else {
-		printf ("The operation was a load.\n");
+		printf("The operation was a load.\n");
 	}
 
 	switch (except) {
 
 	case EFAULT:
-		printf ("Exception was due to a bad address.\n");
+		printf("Exception was due to a bad address.\n");
 		break;
 
 	case EXCEPT_PROT:
-		printf ("Exception was due to a protection violation.\n");
+		printf("Exception was due to a protection violation.\n");
 		break;
 
 	default:
-		printf ("Exception type = 0x%08x.\n", except);
+		printf("Exception type = 0x%08x.\n", except);
 	}
 #else
 	printf("An unexpected segmentation fault occurred... Exiting\n");
@@ -398,7 +406,7 @@
 /*
  * bus_handler - signal handler for SIGBUS
  */
-static void bus_handler (int signal, int code, struct sigcontext *scp)
+static void bus_handler(int signal, int code, struct sigcontext *scp)
 {
 #ifndef _LINUX_
 	int except;
@@ -409,44 +417,44 @@
 	 * Get the exception type.  This is either an errno value
 	 * or an exception value from <sys/m_except.h>.
 	 */
-# ifdef _IA64
-	except  = scp->sc_context.__excp_type;
-# else
-	except	= scp->sc_jmpbuf.jmp_context.excp_type;
-# endif
+#ifdef _IA64
+	except = scp->sc_context.__excp_type;
+#else
+	except = scp->sc_jmpbuf.jmp_context.excp_type;
+#endif
 
 	/*
 	 * Get the Data Address Register and Interrupt Status Register
 	 * for the exception.
 	 */
-# ifdef _IA64
-	dar     = scp->sc_context.__ifa;
-	dsisr   = scp->sc_context.__isr;
-# else
-	dar	= scp->sc_jmpbuf.jmp_context.except[0];
-	dsisr	= scp->sc_jmpbuf.jmp_context.except[1];
-# endif
+#ifdef _IA64
+	dar = scp->sc_context.__ifa;
+	dsisr = scp->sc_context.__isr;
+#else
+	dar = scp->sc_jmpbuf.jmp_context.except[0];
+	dsisr = scp->sc_jmpbuf.jmp_context.except[1];
+#endif
 
-	printf ("SIGBUS occurred on address 0x%08x:\n", dar);
+	printf("SIGBUS occurred on address 0x%08x:\n", dar);
 
 	switch (except) {
 
 	case ENOSPC:
-		printf ("A mapper fault required disk allocation and \
+		printf("A mapper fault required disk allocation and \
 			no space is left on the device.\n");
 		break;
 
 	case EDQUOT:
-		printf ("A mapper fault required disk allocation and \
+		printf("A mapper fault required disk allocation and \
 			the disc quota was exceeded.\n");
 		break;
 
 	case EXCEPT_EOF:
-		printf ("An mmap() mapper referenced beyond end-of-file.\n");
+		printf("An mmap() mapper referenced beyond end-of-file.\n");
 		break;
 
 	default:
-		printf ("Exception type = 0x%08x.\n", except);
+		printf("Exception type = 0x%08x.\n", except);
 	}
 #else
 	printf("An unexpected bus error occurred... Exiting\n");
@@ -458,7 +466,7 @@
 /*
  * int_handler - signal handler for SIGINT
  */
-static void int_handler (int sig)
+static void int_handler(int sig)
 {
 	cleanup(1);
 }
@@ -468,7 +476,7 @@
  *
  * Make an empty temporary file of a given size and return its descriptor.
  */
-static int mkemptyfile (uint size)
+static int mkemptyfile(uint size)
 {
 #ifdef _LINUX_
 
@@ -483,28 +491,28 @@
 	filename = tempnam(TEMPDIR, TEMPNAME);
 
 	/* Create the file.
-	 * O_EXCL:	I'm supposed to be getting a unique name so if
-	 *		a file already exists by this name then fail.
-	 * 0700:	Set up for r/w access by owner only.
+	 * O_EXCL:      I'm supposed to be getting a unique name so if
+	 *              a file already exists by this name then fail.
+	 * 0700:        Set up for r/w access by owner only.
 	 */
 	if ((fd = open(filename, O_CREAT | O_EXCL | O_RDWR, 0700)) == -1)
-		return(-1);
+		return (-1);
 
 #endif // _LINUX_
 
 	/* Now extend it to the requested length.
 	 */
-	if (lseek(fd, size-1, SEEK_SET) == -1)
-		return(-1);
+	if (lseek(fd, size - 1, SEEK_SET) == -1)
+		return (-1);
 
 	if (write(fd, "\0", 1) == -1)
-		return(-1);
+		return (-1);
 
 	/* Sync the file out.
 	 */
 	fsync(fd);
 
-	return(fd);
+	return (fd);
 }
 
 /*---------------------------------------------------------------------+
@@ -518,27 +526,27 @@
 |            SIGSEGV - segmentation violation                          |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void setup_signal_handlers ()
+static void setup_signal_handlers()
 {
 	struct sigaction sigact;
 
 	sigact.sa_flags = 0;
-	sigfillset (&sigact.sa_mask);
+	sigfillset(&sigact.sa_mask);
 
 	/*
 	 * Establish the signal handlers for SIGSEGV, SIGBUS & SIGINT
 	 */
-	sigact.sa_handler = (void (*)(int)) segv_handler;
-	if (sigaction (SIGSEGV, &sigact, NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	sigact.sa_handler = (void (*)(int))segv_handler;
+	if (sigaction(SIGSEGV, &sigact, NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 
-	sigact.sa_handler = (void (*)(int)) bus_handler;
-	if (sigaction (SIGBUS, &sigact, NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	sigact.sa_handler = (void (*)(int))bus_handler;
+	if (sigaction(SIGBUS, &sigact, NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 
-	sigact.sa_handler = (void (*)(int)) int_handler;
-	if (sigaction (SIGINT, &sigact, NULL) < 0)
-		sys_error ("sigaction failed", __LINE__);
+	sigact.sa_handler = (void (*)(int))int_handler;
+	if (sigaction(SIGINT, &sigact, NULL) < 0)
+		sys_error("sigaction failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -553,21 +561,19 @@
 |            [-s] size: shared memory segment size                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	bytes = 0, megabytes = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int bytes = 0, megabytes = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-	while ((opt = getopt(argc, argv, "DFMWvb:l:m:p:")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "DFMWvb:l:m:p:")) != EOF) {
+		switch (opt) {
 		case 'F':	/* map a file */
 			Fflg++;
 			break;
@@ -602,13 +608,13 @@
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 
 	/*
 	 * Determine the number of processes to run.
- 	 */
+	 */
 	if (pflg) {
 		if (nprocs > MAXPROCS)
 			nprocs = MAXPROCS;
@@ -618,7 +624,7 @@
 
 	/*
 	 * Determine the type of object to map.
- 	 */
+	 */
 	if (Fflg) {
 		objtype = FILEOBJ;
 	} else if (Mflg) {
@@ -633,9 +639,10 @@
 	 * close to the paging space warning level.
 	 */
 
-        if (Wflg)
+	if (Wflg)
 #ifdef _LINUX_
-	        printf("Option 'W' not implemented in Linux (psdanger() and SIGDANGER)\n");
+		printf
+		    ("Option 'W' not implemented in Linux (psdanger() and SIGDANGER)\n");
 #else
 	{
 		pgspblks = psdanger(SIGDANGER);
@@ -674,12 +681,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -689,8 +696,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	cleanup (1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	cleanup(1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_05.c b/testcases/kernel/ipc/ipc_stress/shmem_test_05.c
index b158ac0..e8d7209 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_05.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_05.c
@@ -82,19 +82,20 @@
 
 #include <sys/stat.h>
 off_t offsets[] = {
-0x30000000,
-0x30200000,
-0x30400000,
-0x30600000,
-0x30800000,
-0x30A00000,
-0x30C00000,
-0x30D00000,
-0x30F00000,
-0x31000000,
-0x32000000
+	0x30000000,
+	0x30200000,
+	0x30400000,
+	0x30600000,
+	0x30800000,
+	0x30A00000,
+	0x30C00000,
+	0x30D00000,
+	0x30F00000,
+	0x31000000,
+	0x32000000
 };
-int offsets_cnt = sizeof (offsets) /sizeof (offsets[0]);
+
+int offsets_cnt = sizeof(offsets) / sizeof(offsets[0]);
 /* Defines
  *
  * MAX_SHMEM_SIZE: maximum shared memory segment size of 256MB
@@ -125,9 +126,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-void parse_args (int, char **);
-void sys_error (const char *, int);
-void error (const char *, int);
+void parse_args(int, char **);
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /*
  * Global variables
@@ -147,7 +148,7 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	off_t offset;
 	int i;
@@ -155,13 +156,13 @@
 	int shmid[MAX_SHMEM_NUMBER];	/* (Unique) Shared memory identifier */
 
 	char *shmptr[MAX_SHMEM_NUMBER];	/* Shared memory segment address */
-	char	*ptr;		/* Index into shared memory segment */
+	char *ptr;		/* Index into shared memory segment */
 
-	int value = 0;	/* Value written into shared memory segment */
+	int value = 0;		/* Value written into shared memory segment */
 
 	key_t mykey[MAX_SHMEM_NUMBER];
-	char * null_file = "/dev/null";
-	char  proj[MAX_SHMEM_NUMBER] = {
+	char *null_file = "/dev/null";
+	char proj[MAX_SHMEM_NUMBER] = {
 		'3',
 		'4',
 		'5',
@@ -178,80 +179,86 @@
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
-	for (i=0; i<offsets_cnt; i++) {
-        /*
-         * Create a key to uniquely identify the shared segment
-         */
+	for (i = 0; i < offsets_cnt; i++) {
+		/*
+		 * Create a key to uniquely identify the shared segment
+		 */
 
-	mykey[i] = ftok(null_file,proj[i]);
+		mykey[i] = ftok(null_file, proj[i]);
 
-	printf ("\n\tmykey to uniquely identify the shared memory segment 0x%x\n",mykey[i]);
+		printf
+		    ("\n\tmykey to uniquely identify the shared memory segment 0x%x\n",
+		     mykey[i]);
 
-	printf ("\n\tGet shared memory segment (%d bytes)\n", shmem_size);
-        /*
-         * Obtain a unique shared memory identifier with shmget ().
-         */
+		printf("\n\tGet shared memory segment (%d bytes)\n",
+		       shmem_size);
+		/*
+		 * Obtain a unique shared memory identifier with shmget ().
+		 */
 
 /*	if ((shmid[i]= shmget(mykey[i], shmem_size, IPC_CREAT | 0666 )) < 0) */
-	if ((shmid[i]= shmget (IPC_PRIVATE, shmem_size,
-				IPC_CREAT | IPC_EXCL | 0666 )) < 0)
-		sys_error ("shmget failed", __LINE__);
+		if ((shmid[i] = shmget(IPC_PRIVATE, shmem_size,
+				       IPC_CREAT | IPC_EXCL | 0666)) < 0)
+			sys_error("shmget failed", __LINE__);
 
-	printf ("\n\tAttach shared memory segment to process\n");
-        /*
-         * Attach the shared memory segment to the process
-         */
+		printf("\n\tAttach shared memory segment to process\n");
+		/*
+		 * Attach the shared memory segment to the process
+		 */
 
-                offset = offsets[i];
+		offset = offsets[i];
 
 #ifndef __64BIT__
-         printf ("\n\toffset of the shared memory segment 0x%lx\n",offset);
-        if ((shmptr[i] = (char *) shmat (shmid[i], (const void *)offset, 0)) == (char *)-1)
+		printf("\n\toffset of the shared memory segment 0x%lx\n",
+		       offset);
+		if ((shmptr[i] =
+		     (char *)shmat(shmid[i], (const void *)offset,
+				   0)) == (char *)-1)
 #else
-         printf ("\n\toffset of the shared memory is determined by the system\n"
-);
-         if ((shmptr[i] = (char *) shmat (shmid[i], 0 , 0)) == (char *)-1)
+		printf
+		    ("\n\toffset of the shared memory is determined by the system\n");
+		if ((shmptr[i] = (char *)shmat(shmid[i], 0, 0)) == (char *)-1)
 #endif
-                sys_error ("shmat failed", __LINE__);
+			sys_error("shmat failed", __LINE__);
 
-	printf ("\n\tIndex through shared memory segment ...\n");
+		printf("\n\tIndex through shared memory segment ...\n");
 
-        /*
-         * Index through the shared memory segment
-         */
+		/*
+		 * Index through the shared memory segment
+		 */
 
-	for (ptr=shmptr[i]; ptr < (shmptr[i] + shmem_size); ptr++)
-		*ptr = value++;
+		for (ptr = shmptr[i]; ptr < (shmptr[i] + shmem_size); ptr++)
+			*ptr = value++;
 
 	}
 
-	printf ("\n\tDetach from the segment using the shmdt subroutine\n");
+	printf("\n\tDetach from the segment using the shmdt subroutine\n");
 
-	printf ("\n\tRelease shared memory\n");
+	printf("\n\tRelease shared memory\n");
 
-	for (i=0; i<offsets_cnt; i++) {
-        /*
-         * Detach from the segment
-         */
+	for (i = 0; i < offsets_cnt; i++) {
+		/*
+		 * Detach from the segment
+		 */
 
-	shmdt( shmptr[i] );
+		shmdt(shmptr[i]);
 
-        /*
-         * Release shared memory
-         */
+		/*
+		 * Release shared memory
+		 */
 
-	if (shmctl (shmid[i], IPC_RMID, 0) < 0)
-		sys_error ("shmctl failed", __LINE__);
+		if (shmctl(shmid[i], IPC_RMID, 0) < 0)
+			sys_error("shmctl failed", __LINE__);
 
 	}
 	/*
 	 * Program completed successfully -- exit
 	 */
 
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -268,21 +275,21 @@
 |            [-s] size: shared memory segment size                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "s:?")) != EOF) {
 		switch (i) {
-			case 's':
-				shmem_size = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 's':
+			shmem_size = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 
@@ -290,8 +297,8 @@
 		errflag++;
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -302,12 +309,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -317,8 +324,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_06.c b/testcases/kernel/ipc/ipc_stress/shmem_test_06.c
index 8a18c0e..397391a 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_06.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_06.c
@@ -113,9 +113,9 @@
  * sys_error (): System error message function
  * error (): Error message function
  */
-void parse_args (int, char **);
-void sys_error (const char *, int);
-void error (const char *, int);
+void parse_args(int, char **);
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /*
  * Global variables
@@ -135,98 +135,101 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-  int i;
+	int i;
 
-  int shmid[MAX_SHMEM_NUMBER];	/* (Unique) Shared memory identifier */
+	int shmid[MAX_SHMEM_NUMBER];	/* (Unique) Shared memory identifier */
 
-  char *shmptr[MAX_SHMEM_NUMBER];	/* Shared memory segment address */
-  char	*ptr;		/* Index into shared memory segment */
+	char *shmptr[MAX_SHMEM_NUMBER];	/* Shared memory segment address */
+	char *ptr;		/* Index into shared memory segment */
 
-  int value = 0;	/* Value written into shared memory segment */
+	int value = 0;		/* Value written into shared memory segment */
 
-  key_t mykey[MAX_SHMEM_NUMBER];
-  char * null_file = "/dev/null";
-  char  proj[MAX_SHMEM_NUMBER] = {
-    '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'E'
-  };
+	key_t mykey[MAX_SHMEM_NUMBER];
+	char *null_file = "/dev/null";
+	char proj[MAX_SHMEM_NUMBER] = {
+		'3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'E'
+	};
 
-  /*
-   * Parse command line arguments and print out program header
-   */
-  parse_args (argc, argv);
-  printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
+	/*
+	 * Parse command line arguments and print out program header
+	 */
+	parse_args(argc, argv);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
 
-  for (i=0; i<offsets_cnt; i++)
-    {
-      char tmpstr[256];
-      /*
-       * Create a key to uniquely identify the shared segment
-       */
+	for (i = 0; i < offsets_cnt; i++) {
+		char tmpstr[256];
+		/*
+		 * Create a key to uniquely identify the shared segment
+		 */
 
-      mykey[i] = ftok(null_file,proj[i]);
+		mykey[i] = ftok(null_file, proj[i]);
 
-      printf ("\n\tmykey to uniquely identify the shared memory segment 0x%x\n",mykey[i]);
+		printf
+		    ("\n\tmykey to uniquely identify the shared memory segment 0x%x\n",
+		     mykey[i]);
 
-      printf ("\n\tGet shared memory segment (%d bytes)\n", shmem_size);
-      /*
-       * Obtain a unique shared memory identifier with shmget ().
-       */
+		printf("\n\tGet shared memory segment (%d bytes)\n",
+		       shmem_size);
+		/*
+		 * Obtain a unique shared memory identifier with shmget ().
+		 */
 
-      if ((long)(shmid[i]= shmget (mykey[i], shmem_size, IPC_CREAT | 0666 )) < 0)
-	sys_error ("shmget failed", __LINE__);
+		if ((long)
+		    (shmid[i] =
+		     shmget(mykey[i], shmem_size, IPC_CREAT | 0666)) < 0)
+			sys_error("shmget failed", __LINE__);
 
-      printf ("\n\tAttach shared memory segment to process\n");
+		printf("\n\tAttach shared memory segment to process\n");
 
-      if ((long)(shmptr[i] = (char *) shmat (shmid[i], NULL, 0)) == -1)
-	{
-	  /* If shmat(2) failed, we need the currect process address
-	     space layout to debug. The failure can be random. */
-	  sprintf (tmpstr, "cat /proc/%d/maps >&2", (int) getpid ());
-	  fprintf (stderr, "heap %p\n", sbrk (0));
-	  system (tmpstr);
+		if ((long)(shmptr[i] = (char *)shmat(shmid[i], NULL, 0)) == -1) {
+			/* If shmat(2) failed, we need the currect process address
+			   space layout to debug. The failure can be random. */
+			sprintf(tmpstr, "cat /proc/%d/maps >&2", (int)getpid());
+			fprintf(stderr, "heap %p\n", sbrk(0));
+			system(tmpstr);
 
-	  sprintf(tmpstr, "shmat failed - return: %ld", (long)shmptr[i]);
-	  sys_error (tmpstr, __LINE__);
-	}
+			sprintf(tmpstr, "shmat failed - return: %ld",
+				(long)shmptr[i]);
+			sys_error(tmpstr, __LINE__);
+		}
 
-      printf ("\n\tShared memory segment address : %p \n",shmptr[i]);
+		printf("\n\tShared memory segment address : %p \n", shmptr[i]);
 
-      printf ("\n\tIndex through shared memory segment ...\n");
+		printf("\n\tIndex through shared memory segment ...\n");
 
-      /*
-       * Index through the shared memory segment
-       */
+		/*
+		 * Index through the shared memory segment
+		 */
 
-      for (ptr=shmptr[i]; ptr < (shmptr[i] + shmem_size); ptr++)
-	*ptr = value++;
+		for (ptr = shmptr[i]; ptr < (shmptr[i] + shmem_size); ptr++)
+			*ptr = value++;
 
-    } // for 1..11
+	}			// for 1..11
 
-  printf ("\n\tDetach from the segment using the shmdt subroutine\n");
+	printf("\n\tDetach from the segment using the shmdt subroutine\n");
 
-  printf ("\n\tRelease shared memory\n");
+	printf("\n\tRelease shared memory\n");
 
-  for (i=0; i<offsets_cnt; i++)
-    {
-      // Detach from the segment
+	for (i = 0; i < offsets_cnt; i++) {
+		// Detach from the segment
 
-      shmdt( shmptr[i] );
+		shmdt(shmptr[i]);
 
-      // Release shared memory
+		// Release shared memory
 
-      if (shmctl (shmid[i], IPC_RMID, 0) < 0)
-	sys_error ("shmctl failed", __LINE__);
+		if (shmctl(shmid[i], IPC_RMID, 0) < 0)
+			sys_error("shmctl failed", __LINE__);
 
-    } // 2nd for 1..11
-  /*
-   * Program completed successfully -- exit
-   */
+	}			// 2nd for 1..11
+	/*
+	 * Program completed successfully -- exit
+	 */
 
-  printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
-  return (0);
+	return (0);
 
 }
 
@@ -242,31 +245,31 @@
 |            [-s] size: shared memory segment size                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-  int	i;
-  int	errflag = 0;
-  char	*program_name = *argv;
-  extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
-  while ((i = getopt(argc, argv, "s:?")) != EOF) {
-    switch (i) {
-    case 's':
-      shmem_size = atoi (optarg);
-      break;
-    case '?':
-      errflag++;
-      break;
-    }
-  }
+	while ((i = getopt(argc, argv, "s:?")) != EOF) {
+		switch (i) {
+		case 's':
+			shmem_size = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
+		}
+	}
 
-  if (shmem_size < 1 || shmem_size > MAX_SHMEM_SIZE)
-    errflag++;
+	if (shmem_size < 1 || shmem_size > MAX_SHMEM_SIZE)
+		errflag++;
 
-  if (errflag) {
-    fprintf (stderr, USAGE, program_name);
-    exit (2);
-  }
+	if (errflag) {
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
+	}
 }
 
 /*---------------------------------------------------------------------+
@@ -276,12 +279,12 @@
   | Function:  Creates system error message and calls error ()           |
   |                                                                      |
   +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-  char syserr_msg [256];
+	char syserr_msg[256];
 
-  sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-  error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -291,8 +294,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-  fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-  exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_07.c b/testcases/kernel/ipc/ipc_stress/shmem_test_07.c
index 1714175..1c80ede 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_07.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_07.c
@@ -181,12 +181,12 @@
  * error (): Error message function
  * release (): Release the shared memory segments
  */
-static void parse_args (int, char **);
-static void *reader (void *);
-static void *writer (void *);
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void release ();
+static void parse_args(int, char **);
+static void *reader(void *);
+static void *writer(void *);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void release();
 
 /*
  * Global Variables:
@@ -199,27 +199,27 @@
  * buffer_size: size of "scratch" shared memory segment
  * parent_pid: Process id of the parent
  */
-pthread_t * writer_th;
-pthread_t * reader_th;
+pthread_t *writer_th;
+pthread_t *reader_th;
 
 pthread_mutex_t mutex_r[MAX_WRITER_NUMBER];
 pthread_mutex_t cond_mutex[MAX_WRITER_NUMBER];
-int 		thread_hold[MAX_WRITER_NUMBER];
-pthread_cond_t  cond_var[MAX_WRITER_NUMBER];
+int thread_hold[MAX_WRITER_NUMBER];
+pthread_cond_t cond_var[MAX_WRITER_NUMBER];
 
-int	 *read_count[MAX_WRITER_NUMBER];    /* Shared memory segment address */
-unsigned long *checksum[MAX_WRITER_NUMBER]; /* Shared memory segment address */
-unsigned char *shmptr[MAX_WRITER_NUMBER];   /* Shared memory segment address */
-unsigned long cksum[MAX_WRITER_NUMBER];     /* Shared memory segment checksum */
+int *read_count[MAX_WRITER_NUMBER];	/* Shared memory segment address */
+unsigned long *checksum[MAX_WRITER_NUMBER];	/* Shared memory segment address */
+unsigned char *shmptr[MAX_WRITER_NUMBER];	/* Shared memory segment address */
+unsigned long cksum[MAX_WRITER_NUMBER];	/* Shared memory segment checksum */
 
-int 	 shmem_size = DEFAULT_SHMEM_SIZE;
-pid_t	 parent_pid;			    /* process id of parent */
+int shmem_size = DEFAULT_SHMEM_SIZE;
+pid_t parent_pid;		/* process id of parent */
 
-int      num_readers = DEFAULT_NUM_READERS;
-int 	 buffer_size = DEFAULT_SHMEM_SIZE;
-int 	 num_writers = DEFAULT_NUM_WRITERS;
+int num_readers = DEFAULT_NUM_READERS;
+int buffer_size = DEFAULT_SHMEM_SIZE;
+int num_writers = DEFAULT_NUM_WRITERS;
 
-int 	 shmid[MAX_THREAD_NUMBER + MAX_WRITER_NUMBER];
+int shmid[MAX_THREAD_NUMBER + MAX_WRITER_NUMBER];
 
 /*---------------------------------------------------------------------+
 |                               main                                   |
@@ -231,211 +231,213 @@
 |            (-1) Error occurred                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	pthread_attr_t	newattr;
+	pthread_attr_t newattr;
 
-	int	i; 		/* Misc loop index */
-	int	j; 		/* Misc loop index */
-	int	k; 		/* Misc loop index */
-	size_t Size;		/* Size (in bytes) of shared memory segment*/
+	int i;			/* Misc loop index */
+	int j;			/* Misc loop index */
+	int k;			/* Misc loop index */
+	size_t Size;		/* Size (in bytes) of shared memory segment */
 
 	unsigned long *ulptr;	/* Misc pointer */
-				/* Index into shared memory segment */
+	/* Index into shared memory segment */
 
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-	printf ("%s: IPC Shared Memory TestSuite program\n", *argv);
-        /*
-         * Show options in effect.
-         */
-        printf ("\tNumber of writers    = %d\n", num_writers);
-        printf ("\tNumber of readers    = %d\n", num_readers);
-        printf ("\tBytes per writer	= %d\n", buffer_size);
+	printf("%s: IPC Shared Memory TestSuite program\n", *argv);
+	/*
+	 * Show options in effect.
+	 */
+	printf("\tNumber of writers    = %d\n", num_writers);
+	printf("\tNumber of readers    = %d\n", num_readers);
+	printf("\tBytes per writer	= %d\n", buffer_size);
 
 /*---------------------------------------------------------------------+
 |			shared memory segments                         |
 +---------------------------------------------------------------------*/
 
-	for (i=0; i<num_writers; i++) {
-        /*
-         * Obtain a unique shared memory identifier with shmget ().
-	 * Attach the shared memory segment to the process with shmat ().
-         */
+	for (i = 0; i < num_writers; i++) {
+		/*
+		 * Obtain a unique shared memory identifier with shmget ().
+		 * Attach the shared memory segment to the process with shmat ().
+		 */
 
-	j=i*3;
-	Size=sizeof (int);
-        /*
-         * Create a shared memory segment for storing the read count
-         * (number of reader threads reading shared data)
-         * After creating the shared memory segment, initialize it.
-         */
+		j = i * 3;
+		Size = sizeof(int);
+		/*
+		 * Create a shared memory segment for storing the read count
+		 * (number of reader threads reading shared data)
+		 * After creating the shared memory segment, initialize it.
+		 */
 
-        if ((shmid[j] = shmget (IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
-                sys_error ("read_count shmget failed", __LINE__);
+		if ((shmid[j] = shmget(IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
+			sys_error("read_count shmget failed", __LINE__);
 
-        if ((long)(read_count[i] = (int *) shmat (shmid[j], 0, 0)) == -1)
-		sys_error ("shmat failed", __LINE__);
+		if ((long)(read_count[i] = (int *)shmat(shmid[j], 0, 0)) == -1)
+			sys_error("shmat failed", __LINE__);
 
-        *(read_count[i]) = 0;
+		*(read_count[i]) = 0;
 
-        /*
-         * Create a shared memory segment for storing the checksums of readers.
-         * After creating the shared memory segment, initialize it.
-         */
+		/*
+		 * Create a shared memory segment for storing the checksums of readers.
+		 * After creating the shared memory segment, initialize it.
+		 */
 
-	j++;
-	Size=sizeof (unsigned long) * num_readers;
+		j++;
+		Size = sizeof(unsigned long) * num_readers;
 
-        if ((shmid[j] = shmget (IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
-                sys_error ("checksum shmget failed", __LINE__);
+		if ((shmid[j] = shmget(IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
+			sys_error("checksum shmget failed", __LINE__);
 
-        if ((long)(checksum[i] = (unsigned long *) shmat (shmid[j], 0, 0)) == -1)
-                sys_error ("shmat failed", __LINE__);
+		if ((long)(checksum[i] = (unsigned long *)shmat(shmid[j], 0, 0))
+		    == -1)
+			sys_error("shmat failed", __LINE__);
 
-	ulptr=checksum[i];
+		ulptr = checksum[i];
 
-        for (k=0; k < num_readers; k++)
-	{
-	*ulptr = 0;
-	ulptr++;
+		for (k = 0; k < num_readers; k++) {
+			*ulptr = 0;
+			ulptr++;
+		}
+
+		/*
+		 * Create the "scratch" shared memory segment for storing
+		 * a series of values .
+		 */
+
+		Size = buffer_size;
+		j++;
+
+		if ((shmid[j] = shmget(IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
+			sys_error("shmptr shmget failed", __LINE__);
+
+		if ((long)(shmptr[i] = shmat(shmid[j], 0, 0)) == -1)
+			sys_error("shmat failed", __LINE__);
+
 	}
-
-        /*
-         * Create the "scratch" shared memory segment for storing
-         * a series of values .
-         */
-
-	Size=buffer_size;
-	j++;
-
-        if ((shmid[j] = shmget (IPC_PRIVATE, Size, SHMEM_MODE)) < 0)
-                sys_error ("shmptr shmget failed", __LINE__);
-
-        if ((long)(shmptr[i] = shmat (shmid[j], 0, 0)) == -1)
-                sys_error ("shmat failed", __LINE__);
-
-        }
 /*---------------------------------------------------------------------+
 |			Threads                                        |
 +---------------------------------------------------------------------*/
 
-        /*
-         * Create threads array...
-         */
-       writer_th = (pthread_t *) malloc ((size_t) (num_writers * sizeof (pthread_t)));
-       reader_th = (pthread_t *) malloc ((size_t) (num_writers * num_readers * sizeof (pthread_t)));
+	/*
+	 * Create threads array...
+	 */
+	writer_th =
+	    (pthread_t *) malloc((size_t) (num_writers * sizeof(pthread_t)));
+	reader_th =
+	    (pthread_t *)
+	    malloc((size_t) (num_writers * num_readers * sizeof(pthread_t)));
 	/*
 	 * Initializes mutexes and sets their attributes
 	 */
-        for (i=0; i<num_writers; i++) {
+	for (i = 0; i < num_writers; i++) {
 
-	if (pthread_mutex_init(&mutex_r[i] , NULL) != 0)
-		sys_error ("Can't initialize mutex_r", __LINE__);
+		if (pthread_mutex_init(&mutex_r[i], NULL) != 0)
+			sys_error("Can't initialize mutex_r", __LINE__);
 
-	if (pthread_mutex_init (&cond_mutex[i], NULL))
-		sys_error ("Can't initialize cond_mutex", __LINE__);
-	if (pthread_cond_init (&cond_var[i], NULL))
-		sys_error ("cond_init(&cond_var) failed", __LINE__);
-        /*
-         * lock the access to the shared memory data segment --
-         * get lock now to insure the writer gets first access to the segment.
-         *
-         */
+		if (pthread_mutex_init(&cond_mutex[i], NULL))
+			sys_error("Can't initialize cond_mutex", __LINE__);
+		if (pthread_cond_init(&cond_var[i], NULL))
+			sys_error("cond_init(&cond_var) failed", __LINE__);
+		/*
+		 * lock the access to the shared memory data segment --
+		 * get lock now to insure the writer gets first access to the segment.
+		 *
+		 */
 
-	thread_hold[i]=1;
+		thread_hold[i] = 1;
 
 	}
 
 	/*
 	 * Creates a thread attributes object and initializes it
 	 * with default values.
-	*/
-        if (pthread_attr_init(&newattr))
-                sys_error ("attr_init(&newattr) failed", __LINE__);
+	 */
+	if (pthread_attr_init(&newattr))
+		sys_error("attr_init(&newattr) failed", __LINE__);
 	/*
 	 * Sets the value of the detachstate attribute of a thread attributes
 	 * object :
-	 * PTHREAD_CREATE_UNDETACHED	Specifies that the thread will be
+	 * PTHREAD_CREATE_UNDETACHED    Specifies that the thread will be
 	 * created in undetached state.
-	*/
+	 */
 #ifdef _LINUX_
 	// the DEFAULT state for linux pthread_create is to be "undetatched" or joinable
 	/* if (pthread_attr_setdetachstate (&newattr, PTHREAD_CREATE_JOINABLE))
-                sys_error ("attr_setdetachstate(&newattr) failed", __LINE__);*/
+	   sys_error ("attr_setdetachstate(&newattr) failed", __LINE__); */
 #else
-        if (pthread_attr_setdetachstate (&newattr, PTHREAD_CREATE_UNDETACHED))
-                sys_error ("attr_setdetachstate(&newattr) failed", __LINE__);
+	if (pthread_attr_setdetachstate(&newattr, PTHREAD_CREATE_UNDETACHED))
+		sys_error("attr_setdetachstate(&newattr) failed", __LINE__);
 #endif
 
-        /*
-         * Create all num_writers threads .  Each writer thread will fill
+	/*
+	 * Create all num_writers threads .  Each writer thread will fill
 	 * the "scratch" shared memory segment (shmptr) up with data and
-         * will store the result in cksum array accessible by the main.
-         */
-
-        for (i = 0; i < num_writers; i++)
-        {
-                if (pthread_create (&writer_th[i], &newattr, writer, (void *) (long)i))
-                        sys_error ("writer: pthread_create failed", __LINE__);
-
-        /*
-         * Create all num_readers threads .  Each reader thread will compute
-         * the checksum of the shared memory segment (shmptr) and will store
-         * the result in the other shared memory segment (checksum)accessible
-         * by the writer.
-         */
-
-	k=i*num_readers;
-        for (j = k; j < (k + num_readers) ; j++)
-        {
-                if (pthread_create (&reader_th[j], &newattr, reader, (void *) (long)j))
-                        sys_error ("reader: pthread_create failed", __LINE__);
-	}
-	}
-
-        for (i = 0; i < num_writers; i++)
-        {
-               if (pthread_join( writer_th[i], NULL)) {
-                        printf("writer_th: pthread_join return: %d\n",i);
-                        sys_error("pthread_join bad status", __LINE__);
-                }
-
-        /*
-         * Wait for the reader threads to compute the checksums and complete.
+	 * will store the result in cksum array accessible by the main.
 	 */
-	k=i*num_readers;
-	for (j = k; j < (k + num_readers) ; j++)
-        {
-               if (pthread_join( reader_th[j], NULL)) {
-                        printf("reader_th: pthread_join return: %d\n",j);
-                        sys_error("pthread_join bad status", __LINE__);
-                }
-        }
-        }
+
+	for (i = 0; i < num_writers; i++) {
+		if (pthread_create
+		    (&writer_th[i], &newattr, writer, (void *)(long)i))
+			sys_error("writer: pthread_create failed", __LINE__);
+
+		/*
+		 * Create all num_readers threads .  Each reader thread will compute
+		 * the checksum of the shared memory segment (shmptr) and will store
+		 * the result in the other shared memory segment (checksum)accessible
+		 * by the writer.
+		 */
+
+		k = i * num_readers;
+		for (j = k; j < (k + num_readers); j++) {
+			if (pthread_create
+			    (&reader_th[j], &newattr, reader, (void *)(long)j))
+				sys_error("reader: pthread_create failed",
+					  __LINE__);
+		}
+	}
+
+	for (i = 0; i < num_writers; i++) {
+		if (pthread_join(writer_th[i], NULL)) {
+			printf("writer_th: pthread_join return: %d\n", i);
+			sys_error("pthread_join bad status", __LINE__);
+		}
+
+		/*
+		 * Wait for the reader threads to compute the checksums and complete.
+		 */
+		k = i * num_readers;
+		for (j = k; j < (k + num_readers); j++) {
+			if (pthread_join(reader_th[j], NULL)) {
+				printf("reader_th: pthread_join return: %d\n",
+				       j);
+				sys_error("pthread_join bad status", __LINE__);
+			}
+		}
+	}
 
 	/*
 	 * After the threads complete, check their exit status to insure
 	 * that they ran to completion and then verify the corresponding
 	 * checksum.
 	 */
-        for (i = 0; i < num_writers; i++)
-        {
-	ulptr=checksum[i];
-	for (j=0; j<num_readers; j++) {
+	for (i = 0; i < num_writers; i++) {
+		ulptr = checksum[i];
+		for (j = 0; j < num_readers; j++) {
 
-		if (cksum[i] != *ulptr)
-			error ("checksums do not match", __LINE__);
+			if (cksum[i] != *ulptr)
+				error("checksums do not match", __LINE__);
 
 		}
 	}
-	printf ("\n\tMain: readers calculated segment successfully\n");
+	printf("\n\tMain: readers calculated segment successfully\n");
 
 	release();
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -453,38 +455,40 @@
 |	     data shared memory segment filled up.                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void *writer (void *parm)
+void *writer(void *parm)
 {
-	int num_w = (int) (long)parm;
+	int num_w = (int)(long)parm;
 	unsigned long cksum_w = 0;	/* Shared memory regions checksum */
-        unsigned char data = 0; /* Value written into shared memory segment */
-        unsigned char *ptr;     /* Misc pointer */
+	unsigned char data = 0;	/* Value written into shared memory segment */
+	unsigned char *ptr;	/* Misc pointer */
 
-        /*
-         * Fill the "scratch" shared memory segment up with data and
-         * compute the segments checksum.  Release "write" lock after
-         * completing so that the reader threads may begin to read the
-         * data.
-         */
-        data = num_w;
+	/*
+	 * Fill the "scratch" shared memory segment up with data and
+	 * compute the segments checksum.  Release "write" lock after
+	 * completing so that the reader threads may begin to read the
+	 * data.
+	 */
+	data = num_w;
 
-        for (ptr=shmptr[num_w]; ptr < (shmptr[num_w]+buffer_size); ptr++) {
-                *ptr = (data++) % (UCHAR_MAX + 1);
-                cksum_w += *ptr;
-        }
-        if (pthread_mutex_lock (&cond_mutex[num_w]))
-                sys_error ("mutex_lock(&cond_mutex) failed", __LINE__);
-        thread_hold[num_w]=0;
-        if (pthread_cond_broadcast (&cond_var[num_w]))
-                sys_error ("cond_signal(&cond_var) failed", __LINE__);
-        if (pthread_mutex_unlock (&cond_mutex[num_w]))
-                sys_error ("mutex_unlock(&cond_mutex) failed", __LINE__);
+	for (ptr = shmptr[num_w]; ptr < (shmptr[num_w] + buffer_size); ptr++) {
+		*ptr = (data++) % (UCHAR_MAX + 1);
+		cksum_w += *ptr;
+	}
+	if (pthread_mutex_lock(&cond_mutex[num_w]))
+		sys_error("mutex_lock(&cond_mutex) failed", __LINE__);
+	thread_hold[num_w] = 0;
+	if (pthread_cond_broadcast(&cond_var[num_w]))
+		sys_error("cond_signal(&cond_var) failed", __LINE__);
+	if (pthread_mutex_unlock(&cond_mutex[num_w]))
+		sys_error("mutex_unlock(&cond_mutex) failed", __LINE__);
 
 	cksum[num_w] = cksum_w;
-        printf ("\t\twriter (%03d): shared memory checksum %08lx\n", num_w, cksum_w);
+	printf("\t\twriter (%03d): shared memory checksum %08lx\n", num_w,
+	       cksum_w);
 
 	return NULL;
 }
+
 /*---------------------------------------------------------------------+
 |                               reader ()                              |
 | ==================================================================== |
@@ -497,64 +501,64 @@
 |                       computed by reader threads                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void *reader (void *parm)
+void *reader(void *parm)
 {
-	int num_p = (int) (long)parm;
+	int num_p = (int)(long)parm;
 	unsigned long cksum_r = 0;	/* Shared memory regions checksum */
-	int	i;			/* Misc index */
-	int	num_r;			/* Misc index */
-	int	num_w;			/* Misc index */
-	unsigned char * ptr;	  /* Misc pointer */
-	unsigned long *ulptr_r;   /* Misc pointer */
+	int i;			/* Misc index */
+	int num_r;		/* Misc index */
+	int num_w;		/* Misc index */
+	unsigned char *ptr;	/* Misc pointer */
+	unsigned long *ulptr_r;	/* Misc pointer */
 
 	/*
 	 * Wait for a READ_COUNT lock on the shared memory segment, then
 	 * compute the checksum and release the READ_COUNT lock.
 	 */
 
-	num_r=num_p % num_readers;
-	num_w=num_p - num_r;
-	num_w=num_w / num_readers;
-	ptr=shmptr[num_w];
-	ulptr_r=checksum[num_w];
+	num_r = num_p % num_readers;
+	num_w = num_p - num_r;
+	num_w = num_w / num_readers;
+	ptr = shmptr[num_w];
+	ulptr_r = checksum[num_w];
 
-	if (pthread_mutex_lock (&cond_mutex[num_w]))
-		sys_error ("Can't take cond lock", __LINE__);
-        /*
-         * Check to see if we need to wait: if yes, wait for the condition
-         * variable (blocking wait).
-         */
-	while (thread_hold[num_w])
-	{
-		if (pthread_cond_wait (&cond_var[num_w], &cond_mutex[num_w]))
-			sys_error ("cond_wait failed", __LINE__);
+	if (pthread_mutex_lock(&cond_mutex[num_w]))
+		sys_error("Can't take cond lock", __LINE__);
+	/*
+	 * Check to see if we need to wait: if yes, wait for the condition
+	 * variable (blocking wait).
+	 */
+	while (thread_hold[num_w]) {
+		if (pthread_cond_wait(&cond_var[num_w], &cond_mutex[num_w]))
+			sys_error("cond_wait failed", __LINE__);
 	}
-	if (pthread_mutex_unlock (&cond_mutex[num_w]))
-		sys_error ("Can't release cond lock", __LINE__);
+	if (pthread_mutex_unlock(&cond_mutex[num_w]))
+		sys_error("Can't release cond lock", __LINE__);
 
-        if (pthread_mutex_lock(&mutex_r[num_w]))
-                sys_error ("Can't take read lock", __LINE__);
+	if (pthread_mutex_lock(&mutex_r[num_w]))
+		sys_error("Can't take read lock", __LINE__);
 
-	(*(read_count [num_w]))++;
+	(*(read_count[num_w]))++;
 
-        if (pthread_mutex_unlock(&mutex_r[num_w]))
-                sys_error ("Can't release read lock", __LINE__);
+	if (pthread_mutex_unlock(&mutex_r[num_w]))
+		sys_error("Can't release read lock", __LINE__);
 
-	for (i=0; i<buffer_size; i++)
+	for (i = 0; i < buffer_size; i++)
 		cksum_r += *ptr++;
 
-        if (pthread_mutex_lock(&mutex_r[num_w]))
-                sys_error ("Can't take read lock", __LINE__);
+	if (pthread_mutex_lock(&mutex_r[num_w]))
+		sys_error("Can't take read lock", __LINE__);
 	(*(read_count[num_w]))--;
-        if (pthread_mutex_unlock(&mutex_r[num_w]))
-                sys_error ("Can't release 1 read lock", __LINE__);
+	if (pthread_mutex_unlock(&mutex_r[num_w]))
+		sys_error("Can't release 1 read lock", __LINE__);
 
 	/*
 	 * Store the resulting checksum and print out a message
 	 */
 
 	*ulptr_r = cksum_r;
-	printf ("\t\treader (%03d) of writer (%03d): checksum %08lx\n", num_r, num_w, cksum_r);
+	printf("\t\treader (%03d) of writer (%03d): checksum %08lx\n", num_r,
+	       num_w, cksum_r);
 	return NULL;
 }
 
@@ -574,48 +578,50 @@
 |            [-g] num_writers: number of writer threads                |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	while ((i = getopt(argc, argv, "c:s:g:?")) != EOF) {
 		switch (i) {
-			case 'c':
-				num_readers = atoi (optarg);
-				break;
-			case 's':
-				buffer_size = atoi (optarg);
-				break;
-                        case 'g':               /* number of group */
-                                num_writers = atoi (optarg);
-                                break;
-			case '?':
-				errflag++;
-				break;
+		case 'c':
+			num_readers = atoi(optarg);
+			break;
+		case 's':
+			buffer_size = atoi(optarg);
+			break;
+		case 'g':	/* number of group */
+			num_writers = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 	if (num_writers >= MAX_WRITER_NUMBER) {
 		errflag++;
-		fprintf (stderr, "ERROR: num_writers must be less than %d\n",
+		fprintf(stderr, "ERROR: num_writers must be less than %d\n",
 			MAX_WRITER_NUMBER);
 	}
 	if (num_readers >= MAX_READER_NUMBER) {
 		errflag++;
-		fprintf (stderr, "ERROR: num_readers must be less than %d\n",
+		fprintf(stderr, "ERROR: num_readers must be less than %d\n",
 			MAX_READER_NUMBER);
 	}
-	i=num_readers*num_writers;
+	i = num_readers * num_writers;
 	if (i >= MAX_THREAD_NUMBER) {
 		errflag++;
-		fprintf (stderr, "ERROR: maximun threads number must be less than %d\n", MAX_THREAD_NUMBER);
+		fprintf(stderr,
+			"ERROR: maximun threads number must be less than %d\n",
+			MAX_THREAD_NUMBER);
 	}
 
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -626,32 +632,32 @@
 | Function:  Release shared memory regions.                            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void release ()
+void release()
 {
-        int i;
-        int j;
-        for (i=0; i<num_writers; i++) {
-        if (pthread_mutex_destroy(&cond_mutex[i]) != 0)
-                sys_error ("Can't destroy cond_mutex", __LINE__);
-        if (pthread_mutex_destroy(&mutex_r[i]) != 0)
-                sys_error ("Can't destroy mutex_r", __LINE__);
-        }
+	int i;
+	int j;
+	for (i = 0; i < num_writers; i++) {
+		if (pthread_mutex_destroy(&cond_mutex[i]) != 0)
+			sys_error("Can't destroy cond_mutex", __LINE__);
+		if (pthread_mutex_destroy(&mutex_r[i]) != 0)
+			sys_error("Can't destroy mutex_r", __LINE__);
+	}
 
-        for (i=0; i<num_writers; i++) {
-        /*
-         * Release shared memory regions
-         */
-	j=i*3;
-        if (shmctl (shmid[j], IPC_RMID, 0) < 0)
-                sys_error ("read_count shmctl failed", __LINE__);
-	j++;
-        if (shmctl (shmid[j], IPC_RMID, 0) < 0)
-                sys_error ("checksum shmctl failed", __LINE__);
-	j++;
-        if (shmctl (shmid[j], IPC_RMID, 0) < 0)
-                sys_error ("shmptr shmctl failed", __LINE__);
+	for (i = 0; i < num_writers; i++) {
+		/*
+		 * Release shared memory regions
+		 */
+		j = i * 3;
+		if (shmctl(shmid[j], IPC_RMID, 0) < 0)
+			sys_error("read_count shmctl failed", __LINE__);
+		j++;
+		if (shmctl(shmid[j], IPC_RMID, 0) < 0)
+			sys_error("checksum shmctl failed", __LINE__);
+		j++;
+		if (shmctl(shmid[j], IPC_RMID, 0) < 0)
+			sys_error("shmptr shmctl failed", __LINE__);
 
-        }
+	}
 }
 
 /*---------------------------------------------------------------------+
@@ -661,12 +667,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -676,10 +682,10 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
 	if (line >= 260)
-	release ();
-	exit (-1);
+		release();
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_01.c b/testcases/kernel/ipc/ipc_stress/signal_test_01.c
index 451faaa..601a807 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_01.c
@@ -69,7 +69,7 @@
 #include <string.h>
 #include <errno.h>
 #ifdef _LINUX_
-#  define __USE_XOPEN
+#define __USE_XOPEN
 #endif
 #include <signal.h>
 #include <unistd.h>
@@ -78,39 +78,40 @@
 #define STACKSIZE SIGSTKSZ
 
 /* Define an alternative stack for processing signals */
-char stackarray [STACKSIZE];
+char stackarray[STACKSIZE];
 
 #include "signals.h"
 
 #ifdef _LINUX_
 stack_t stack = {
-    ss_sp: stackarray+STACKSIZE,    // stack pointer
-    ss_flags: 0, //SS_ONSTACK,      // flags
-    ss_size: STACKSIZE              // size
+ss_sp:	stackarray + STACKSIZE,	// stack pointer
+ss_flags:0,			//SS_ONSTACK,      // flags
+ss_size:STACKSIZE		// size
 };
+
 stack_t *oldstack;
 
 // SIGMAX is defined in the AIX headers to be 63 - 64 seems to work in linux??
 // however, signals 32, 33, and 34 are not valid
-# define SIGMAX 64
+#define SIGMAX 64
 
 #else // ! _LINUX_
 
 struct sigstack stack = {
-	stackarray+STACKSIZE, 		/* signal stack pointer */
-	(_ONSTACK & ~ _OLDSTYLE)	/* current status */
+	stackarray + STACKSIZE,	/* signal stack pointer */
+	(_ONSTACK & ~_OLDSTYLE)	/* current status */
 };
 #endif
 
 /* Function prototypes */
-void handler (int);			/* signal catching function */
-void init_sig_vec ();			/* setup signal handler for signals */
-void reset_valid_sig ();		/* reset valid_sig array */
-void sys_error (const char *, int);	/* system error message function */
-void error (const char *, int);		/* error message function */
+void handler(int);		/* signal catching function */
+void init_sig_vec();		/* setup signal handler for signals */
+void reset_valid_sig();		/* reset valid_sig array */
+void sys_error(const char *, int);	/* system error message function */
+void error(const char *, int);	/* error message function */
 
 /* Define an array for verifying received signals */
-int valid_sig [ SIGMAX + 1 ];
+int valid_sig[SIGMAX + 1];
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -119,29 +120,29 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-    sigset_t mask,		/* Initial process signal mask */
-	     newmask, 		/* Second process signal mask */
-	     oldmask;		/* Signal mask returned by sigblock */
-    pid_t pid = getpid ();	/* Process ID (of this process) */
+	sigset_t mask,		/* Initial process signal mask */
+	 newmask,		/* Second process signal mask */
+	 oldmask;		/* Signal mask returned by sigblock */
+	pid_t pid = getpid();	/* Process ID (of this process) */
 
 	/* Print out program header */
-	printf ("%s: IPC Signals TestSuite program\n\n", *argv);
+	printf("%s: IPC Signals TestSuite program\n\n", *argv);
 
 	/*
 	 * Establish signal handler for each signal & reset "valid signals"
 	 * array, and setup alternative stack for processing signals
 	 */
-	init_sig_vec ();
-	reset_valid_sig ();
+	init_sig_vec();
+	reset_valid_sig();
 #ifdef _LINUX_
 	// sigstack function is obsolete, use sigaltstack instead
-	if (sigaltstack (&stack, NULL) < 0)
-	        sys_error ("sigaltstack failed", __LINE__);
+	if (sigaltstack(&stack, NULL) < 0)
+		sys_error("sigaltstack failed", __LINE__);
 #else
-	if (sigstack (&stack, (struct sigstack *)0) < 0)
-		sys_error ("sigstack failed", __LINE__);
+	if (sigstack(&stack, (struct sigstack *)0) < 0)
+		sys_error("sigstack failed", __LINE__);
 #endif
 	/*
 	 * Send SIGILL, SIGALRM & SIGIOT signals to this process:
@@ -155,21 +156,21 @@
 	 * handler by checking to see if the corresponding valid_sig[] array
 	 * fields were reset.
 	 */
-	printf ("\tSend SIGILL, SIGALRM, SIGIOT signals to process\n");
-	valid_sig [SIGILL]  = 1;
-	valid_sig [SIGALRM] = 1;
-	valid_sig [SIGIOT]  = 1;
+	printf("\tSend SIGILL, SIGALRM, SIGIOT signals to process\n");
+	valid_sig[SIGILL] = 1;
+	valid_sig[SIGALRM] = 1;
+	valid_sig[SIGIOT] = 1;
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
 
-	if (valid_sig [SIGILL])
-		error ("failed to receive SIGILL signal!", __LINE__);
-	if (valid_sig [SIGALRM])
-		error ("failed to receive SIGALRM signal!", __LINE__);
-	if (valid_sig [SIGIOT])
-		error ("failed to receive SIGIOT signal!", __LINE__);
+	if (valid_sig[SIGILL])
+		error("failed to receive SIGILL signal!", __LINE__);
+	if (valid_sig[SIGALRM])
+		error("failed to receive SIGALRM signal!", __LINE__);
+	if (valid_sig[SIGIOT])
+		error("failed to receive SIGIOT signal!", __LINE__);
 
 	/*
 	 * Block SIGILL, SIGALRM & SIGIOT signals:
@@ -183,35 +184,35 @@
 	 * process, by sending both blocked and unblocked signals to the
 	 * process. Only the unblocked signals should interrupt the process.
 	 */
-	printf ("\n\tBlock SIGILL, SIGALRM, SIGIOT signals, " \
-		"and resend signals + others\n");
-	sigemptyset (&mask);
-	sigaddset (&mask, SIGILL);
-	sigaddset (&mask, SIGALRM);
-	sigaddset (&mask, SIGIOT);
+	printf("\n\tBlock SIGILL, SIGALRM, SIGIOT signals, "
+	       "and resend signals + others\n");
+	sigemptyset(&mask);
+	sigaddset(&mask, SIGILL);
+	sigaddset(&mask, SIGALRM);
+	sigaddset(&mask, SIGIOT);
 #ifdef _LINUX_
 	sigprocmask(SIG_SETMASK, &mask, NULL);
 #else
-	if (sigsetmask (mask) < 0)
-		sys_error ("setsigmask failed", __LINE__);
+	if (sigsetmask(mask) < 0)
+		sys_error("setsigmask failed", __LINE__);
 #endif
-	valid_sig [SIGFPE]  = 1;
-	valid_sig [SIGTERM] = 1;
-	valid_sig [SIGINT]  = 1;
+	valid_sig[SIGFPE] = 1;
+	valid_sig[SIGTERM] = 1;
+	valid_sig[SIGINT] = 1;
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
-	kill (pid, SIGFPE);
-	kill (pid, SIGTERM);
-	kill (pid, SIGINT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
+	kill(pid, SIGFPE);
+	kill(pid, SIGTERM);
+	kill(pid, SIGINT);
 
-	if (valid_sig [SIGFPE])
-		error ("failed to receive SIGFPE signal!", __LINE__);
-	if (valid_sig [SIGTERM])
-		error ("failed to receive SIGTERM signal!", __LINE__);
-	if (valid_sig [SIGINT])
-		error ("failed to receive SIGINT signal!", __LINE__);
+	if (valid_sig[SIGFPE])
+		error("failed to receive SIGFPE signal!", __LINE__);
+	if (valid_sig[SIGTERM])
+		error("failed to receive SIGTERM signal!", __LINE__);
+	if (valid_sig[SIGINT])
+		error("failed to receive SIGINT signal!", __LINE__);
 
 	/*
 	 * Block additional SIGFPE, SIGTERM & SIGINT signals:
@@ -225,31 +226,31 @@
 	 * interrupting the process.  None of the specified signals should
 	 * interrupt the process until the process signal mask is changed.
 	 */
-	printf ("\n\tBlock rest of signals\n");
-        sigemptyset (&newmask);
-        sigaddset (&newmask, SIGFPE);
-        sigaddset (&newmask, SIGTERM);
-        sigaddset (&newmask, SIGINT);
-	sigemptyset (&oldmask);
-	if (sigprocmask (SIG_BLOCK, &newmask, &oldmask) < 0) {
-		perror ("sigprocmask failed");
-		exit (-1);
+	printf("\n\tBlock rest of signals\n");
+	sigemptyset(&newmask);
+	sigaddset(&newmask, SIGFPE);
+	sigaddset(&newmask, SIGTERM);
+	sigaddset(&newmask, SIGINT);
+	sigemptyset(&oldmask);
+	if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) < 0) {
+		perror("sigprocmask failed");
+		exit(-1);
 	}
-	if (memcmp (&mask, &oldmask, sizeof(mask)) != 0)
-		error ("value returned by sigblock () does not match the " \
-			"old signal mask", __LINE__);
+	if (memcmp(&mask, &oldmask, sizeof(mask)) != 0)
+		error("value returned by sigblock () does not match the "
+		      "old signal mask", __LINE__);
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
-	kill (pid, SIGFPE);
-	kill (pid, SIGTERM);
-	kill (pid, SIGINT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
+	kill(pid, SIGFPE);
+	kill(pid, SIGTERM);
+	kill(pid, SIGINT);
 
 	/* Wait two seconds just to make sure that none of the specified
 	 * signals interrupt the process (They should all be blocked).
 	 */
-	sleep (2);
+	sleep(2);
 
 	/* Change the process signal mask:
 	 *
@@ -259,17 +260,18 @@
 	 *
 	 * Additionally, verify that the SIGINT signal was received.
 	 */
-	valid_sig [SIGINT] = 1;
+	valid_sig[SIGINT] = 1;
 
-	printf ("\n\tChange signal mask & wait until signal interrupts process\n");
-	if (sigpause (SIGINT) != -1 || errno != 4)
-		sys_error ("sigpause failed", __LINE__);
+	printf
+	    ("\n\tChange signal mask & wait until signal interrupts process\n");
+	if (sigpause(SIGINT) != -1 || errno != 4)
+		sys_error("sigpause failed", __LINE__);
 
-	if (valid_sig [SIGINT])
-		error ("failed to receive SIGINT signal!", __LINE__);
+	if (valid_sig[SIGINT])
+		error("failed to receive SIGINT signal!", __LINE__);
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -289,50 +291,58 @@
 | Returns:   Nothing                                                   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void init_sig_vec ()
+void init_sig_vec()
 {
-	char	errmsg [256];
-	int	i;
+	char errmsg[256];
+	int i;
 
 #ifdef _LINUX_
 	static struct sigaction invec;
 
-	for (i=1; i<=SIGMAX; i++) {
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
+	for (i = 1; i <= SIGMAX; i++) {
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
 		invec.sa_handler = handler;
 		//sigaction.sa_mask = 0;
 		invec.sa_flags = 0;
 
-		if (sigaction (i, &invec, (struct sigaction *)0)) {
-		        sprintf (errmsg, "init_sig_vec: sigaction failed on signal (%d)", i);
-		        perror(errmsg);
-			sys_error (errmsg, __LINE__);
+		if (sigaction(i, &invec, (struct sigaction *)0)) {
+			sprintf(errmsg,
+				"init_sig_vec: sigaction failed on signal (%d)",
+				i);
+			perror(errmsg);
+			sys_error(errmsg, __LINE__);
 		}
 	}
 #else
 	static struct sigvec invec;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Cannot catch or ignore the following signals */
-# ifdef _IA64  /* SIGWAITING NOT supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING NOT supported, RESERVED */
 		if ((i == SIGKILL) || (i == SIGSTOP) ||
-		    (i == SIGCONT) || (i == SIGWAITING)) continue;
-# else
-                if ((i == SIGKILL) || (i == SIGSTOP) || (i == SIGCONT)) continue;
-# endif
+		    (i == SIGCONT) || (i == SIGWAITING))
+			continue;
+#else
+		if ((i == SIGKILL) || (i == SIGSTOP) || (i == SIGCONT))
+			continue;
+#endif
 
 		invec.sv_handler = handler;
 		//invec.sv_mask = SA_NOMASK;
-# if defined  _IA64
+#if defined  _IA64
 		invec.sv_flags = 1;
-# else
+#else
 		invec.sv_onstack = 1;
-# endif
-		if (sigvec (i, &invec, (struct sigvec *)0)) {
-		        sprintf (errmsg, "init_sig_vec: sigvec failed on signal (%d)", i);
-		        perror(errmsg);
-			sys_error (errmsg, __LINE__);
+#endif
+		if (sigvec(i, &invec, (struct sigvec *)0)) {
+			sprintf(errmsg,
+				"init_sig_vec: sigvec failed on signal (%d)",
+				i);
+			perror(errmsg);
+			sys_error(errmsg, __LINE__);
 		}
 	}
 #endif //ifdef _LINUX_
@@ -352,17 +362,18 @@
 | Returns:   Aborts program if an unexpected signal was received.      |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig)
+void handler(int sig)
 {
-	char errmsg [256];
+	char errmsg[256];
 
 	/* Check to insure that expected signal was received */
-	if (valid_sig [sig]) {
-		valid_sig [sig] = 0;
-		printf ("\treceived signal: (%s)\n", signames[sig]);
+	if (valid_sig[sig]) {
+		valid_sig[sig] = 0;
+		printf("\treceived signal: (%s)\n", signames[sig]);
 	} else {
-		sprintf (errmsg, "unexpected signal (%d,%s)", sig, (sig<32)?signames[sig]:"unknown signal");
-		error (errmsg, __LINE__);
+		sprintf(errmsg, "unexpected signal (%d,%s)", sig,
+			(sig < 32) ? signames[sig] : "unknown signal");
+		error(errmsg, __LINE__);
 	}
 }
 
@@ -375,12 +386,12 @@
 | Returns:   Nothing                                                   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void reset_valid_sig ()
+void reset_valid_sig()
 {
 	int i;
 
-	for (i=0; i< (SIGMAX + 1); i++)
-		valid_sig [i] = 0;
+	for (i = 0; i < (SIGMAX + 1); i++)
+		valid_sig[i] = 0;
 }
 
 /*---------------------------------------------------------------------+
@@ -390,12 +401,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -405,10 +416,10 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-  char derr[256];
-  sprintf (derr, "ERROR [line: %d] %s\n", line, msg);
-  perror(derr);
-  exit (-1);
+	char derr[256];
+	sprintf(derr, "ERROR [line: %d] %s\n", line, msg);
+	perror(derr);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_02.c b/testcases/kernel/ipc/ipc_stress/signal_test_02.c
index 2cf109b..4ad1062 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_02.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_02.c
@@ -66,7 +66,7 @@
 |                                                                      |
 +---------------------------------------------------------------------*/
 
-#define SIGMAX 64 /* What should this number really be? _NSIG from bits/signum.h maybe? */
+#define SIGMAX 64		/* What should this number really be? _NSIG from bits/signum.h maybe? */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -82,14 +82,14 @@
 #include "signals.h"
 
 /* Function prototypes */
-void init_sig ();
-void handler (int sig);//, int code, struct sigcontext *);
-void reset_valid_sig ();
-void sys_error (const char *, int);
-void error (const char *, int);
+void init_sig();
+void handler(int sig);		//, int code, struct sigcontext *);
+void reset_valid_sig();
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /* Define an array for verifying received signals */
-int valid_sig [ SIGMAX + 1 ];
+int valid_sig[SIGMAX + 1];
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -98,25 +98,25 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	sigset_t	setsig, 		/* Initial signal mask */
-			newsetsig;		/* Second signal mask */
-	pid_t		pid = getpid ();	/* Process ID (of this process) */
+	sigset_t setsig,	/* Initial signal mask */
+	 newsetsig;		/* Second signal mask */
+	pid_t pid = getpid();	/* Process ID (of this process) */
 
 	/* Print out program header */
-	printf ("%s: IPC TestSuite program\n\n", *argv);
+	printf("%s: IPC TestSuite program\n\n", *argv);
 
 	/*
 	 * Establish signal handler for each signal & reset "valid signals"
 	 * array
 	 */
-	init_sig ();
-	reset_valid_sig ();
+	init_sig();
+	reset_valid_sig();
 
 	sigemptyset(&setsig);
-	if (sigprocmask (SIG_SETMASK, &setsig, (sigset_t *) NULL) < 0)
-		sys_error ("sigprocmask failed", __LINE__);
+	if (sigprocmask(SIG_SETMASK, &setsig, (sigset_t *) NULL) < 0)
+		sys_error("sigprocmask failed", __LINE__);
 
 	/*
 	 * Send SIGILL, SIGALRM & SIGIOT signals to this process:
@@ -130,21 +130,21 @@
 	 * handler by checking to see if the corresponding valid_sig[] array
 	 * fields were reset.
 	 */
-	printf ("\tSend SIGILL, SIGALRM, SIGIOT signals to process\n");
-	valid_sig [SIGILL] = 1;
-	valid_sig [SIGALRM] = 1;
-	valid_sig [SIGIOT] = 1;
+	printf("\tSend SIGILL, SIGALRM, SIGIOT signals to process\n");
+	valid_sig[SIGILL] = 1;
+	valid_sig[SIGALRM] = 1;
+	valid_sig[SIGIOT] = 1;
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
 
-	if (valid_sig [SIGILL])
-		error ("failed to receive SIGILL signal!", __LINE__);
-	if (valid_sig [SIGALRM])
-		error ("failed to receive SIGALRM signal!", __LINE__);
-	if (valid_sig [SIGIOT])
-		error ("failed to receive SIGIOT signal!", __LINE__);
+	if (valid_sig[SIGILL])
+		error("failed to receive SIGILL signal!", __LINE__);
+	if (valid_sig[SIGALRM])
+		error("failed to receive SIGALRM signal!", __LINE__);
+	if (valid_sig[SIGIOT])
+		error("failed to receive SIGIOT signal!", __LINE__);
 
 	/*
 	 * Block SIGILL, SIGALRM & SIGIOT signals:
@@ -158,37 +158,37 @@
 	 * process, by sending both blocked and unblocked signals to the
 	 * process.  Only the unblocked signals should interrupt the process.
 	 */
-	printf ("\n\tBlock SIGILL, SIGALRM, SIGIOT signals, " \
-		"and resend signals + others\n");
+	printf("\n\tBlock SIGILL, SIGALRM, SIGIOT signals, "
+	       "and resend signals + others\n");
 	sigemptyset(&setsig);
 
-	if (sigaddset (&setsig, SIGIOT) < 0)
-		sys_error ("sigaddset (SIGIOT) failed", __LINE__);
-	if (sigaddset (&setsig, SIGILL) < 0)
-		sys_error ("sigaddset (SIGILL) failed", __LINE__);
-	if (sigaddset (&setsig, SIGALRM) < 0)
-		sys_error ("sigaddset (SIGALRM) failed", __LINE__);
+	if (sigaddset(&setsig, SIGIOT) < 0)
+		sys_error("sigaddset (SIGIOT) failed", __LINE__);
+	if (sigaddset(&setsig, SIGILL) < 0)
+		sys_error("sigaddset (SIGILL) failed", __LINE__);
+	if (sigaddset(&setsig, SIGALRM) < 0)
+		sys_error("sigaddset (SIGALRM) failed", __LINE__);
 
-	if (sigprocmask (SIG_SETMASK, &setsig, (sigset_t *) NULL) < 0)
-		sys_error ("sigaddset (SIGALRM) failed", __LINE__);
+	if (sigprocmask(SIG_SETMASK, &setsig, (sigset_t *) NULL) < 0)
+		sys_error("sigaddset (SIGALRM) failed", __LINE__);
 
-	valid_sig [SIGFPE] = 1;
-	valid_sig [SIGTERM] = 1;
-	valid_sig [SIGINT] = 1;
+	valid_sig[SIGFPE] = 1;
+	valid_sig[SIGTERM] = 1;
+	valid_sig[SIGINT] = 1;
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
-	kill (pid, SIGFPE);
-	kill (pid, SIGTERM);
-	kill (pid, SIGINT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
+	kill(pid, SIGFPE);
+	kill(pid, SIGTERM);
+	kill(pid, SIGINT);
 
-	if (valid_sig [SIGFPE])
-		sys_error ("failed to receive SIGFPE signal!", __LINE__);
-	if (valid_sig [SIGTERM])
-		sys_error ("failed to receive SIGTERM signal!", __LINE__);
-	if (valid_sig [SIGINT])
-		sys_error ("failed to receive SIGINT signal!", __LINE__);
+	if (valid_sig[SIGFPE])
+		sys_error("failed to receive SIGFPE signal!", __LINE__);
+	if (valid_sig[SIGTERM])
+		sys_error("failed to receive SIGTERM signal!", __LINE__);
+	if (valid_sig[SIGINT])
+		sys_error("failed to receive SIGINT signal!", __LINE__);
 
 	/*
 	 * Block additional SIGFPE, SIGTERM & SIGINT signals:
@@ -203,28 +203,28 @@
 	 * interrupting the process.  None of the specified signals should
 	 * interrupt the process until the process signal mask is changed.
 	 */
-	printf ("\n\tBlock rest of signals\n");
-	sigemptyset (&newsetsig);
+	printf("\n\tBlock rest of signals\n");
+	sigemptyset(&newsetsig);
 
-	sigaddset (&newsetsig, SIGFPE);
-	sigaddset (&newsetsig, SIGTERM);
-	sigaddset (&newsetsig, SIGINT);
+	sigaddset(&newsetsig, SIGFPE);
+	sigaddset(&newsetsig, SIGTERM);
+	sigaddset(&newsetsig, SIGINT);
 
-	if (sigprocmask (SIG_BLOCK, &newsetsig, &setsig) < 0)
-		sys_error ("sigprocmask failed", __LINE__);
+	if (sigprocmask(SIG_BLOCK, &newsetsig, &setsig) < 0)
+		sys_error("sigprocmask failed", __LINE__);
 
-	kill (pid, SIGILL);
-	kill (pid, SIGALRM);
-	kill (pid, SIGIOT);
-	kill (pid, SIGFPE);
-	kill (pid, SIGTERM);
-	kill (pid, SIGINT);
+	kill(pid, SIGILL);
+	kill(pid, SIGALRM);
+	kill(pid, SIGIOT);
+	kill(pid, SIGFPE);
+	kill(pid, SIGTERM);
+	kill(pid, SIGINT);
 
 	/*
 	 * Wait two seconds just to make sure that none of the specified
 	 * signals interrupt the process (They should all be blocked).
 	 */
-	sleep (2);
+	sleep(2);
 
 	/*
 	 * Change the process signal mask:
@@ -240,21 +240,22 @@
 	 *
 	 * Additionally, verify that the SIGINT signal was received.
 	 */
-	valid_sig [SIGINT] = 1;
+	valid_sig[SIGINT] = 1;
 
-	printf ("\n\tChange signal mask & wait until signal interrupts process\n");
-	if (sigfillset (&setsig) < 0)
-		sys_error ("sigfillset failed", __LINE__);
-	if (sigdelset (&setsig, SIGINT) < 0)
-		sys_error ("sigdelset failed", __LINE__);
+	printf
+	    ("\n\tChange signal mask & wait until signal interrupts process\n");
+	if (sigfillset(&setsig) < 0)
+		sys_error("sigfillset failed", __LINE__);
+	if (sigdelset(&setsig, SIGINT) < 0)
+		sys_error("sigdelset failed", __LINE__);
 	if (sigsuspend(&setsig) != -1 || errno != 4)
-		sys_error ("sigsuspend failed", __LINE__);
+		sys_error("sigsuspend failed", __LINE__);
 
-	if (valid_sig [SIGINT])
-		error ("failed to receive SIGIOT signal!", __LINE__);
+	if (valid_sig[SIGINT])
+		error("failed to receive SIGIOT signal!", __LINE__);
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return (0);
 }
@@ -274,33 +275,37 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void init_sig ()
+void init_sig()
 {
 	struct sigaction invec;
-	char 	msg [256];		/* Buffer for error message */
-	int 	i;
+	char msg[256];		/* Buffer for error message */
+	int i;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Cannot catch or ignore the following signals */
-#ifdef _IA64    /* SIGWAITING not supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING not supported, RESERVED */
 		if ((i == SIGKILL) || (i == SIGSTOP) ||
-		    (i == SIGCONT) || (i == SIGWAITING)) continue;
+		    (i == SIGCONT) || (i == SIGWAITING))
+			continue;
 #else
-# ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
-# else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
-# endif
+#ifdef _LINUX_
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
+#else
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
+#endif
 #endif
 
-		invec.sa_handler = (void (*)(int)) handler;
-		sigemptyset (&invec.sa_mask);
+		invec.sa_handler = (void (*)(int))handler;
+		sigemptyset(&invec.sa_mask);
 		invec.sa_flags = 0;
 
-		if (sigaction (i, &invec, (struct sigaction *) NULL) < 0) {
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &invec, (struct sigaction *)NULL) < 0) {
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 }
@@ -319,17 +324,18 @@
 | Returns:   Aborts program if an unexpected signal was received.      |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int sig)//, int code, struct sigcontext *scp)
+void handler(int sig)		//, int code, struct sigcontext *scp)
 {
-	char 	msg [256];
+	char msg[256];
 
 	/* Check to insure that expected signal was received */
-	if (valid_sig [sig]) {
-		valid_sig [sig] = 0;
-		printf ("\treceived signal: (%s)\n", signames[sig]);
+	if (valid_sig[sig]) {
+		valid_sig[sig] = 0;
+		printf("\treceived signal: (%s)\n", signames[sig]);
 	} else {
-		sprintf (msg, "unexpected signal (%d,%s)", sig, (sig<32)?signames[sig]:"unknown signal");
-		error (msg, __LINE__);
+		sprintf(msg, "unexpected signal (%d,%s)", sig,
+			(sig < 32) ? signames[sig] : "unknown signal");
+		error(msg, __LINE__);
 	}
 }
 
@@ -342,12 +348,12 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void reset_valid_sig ()
+void reset_valid_sig()
 {
 	int i;
 
-	for (i=0; i< (SIGMAX + 1); i++)
-		valid_sig [i] = 0;
+	for (i = 0; i < (SIGMAX + 1); i++)
+		valid_sig[i] = 0;
 }
 
 /*---------------------------------------------------------------------+
@@ -357,12 +363,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -372,8 +378,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_03.c b/testcases/kernel/ipc/ipc_stress/signal_test_03.c
index f87b152..83c8c7e 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_03.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_03.c
@@ -66,7 +66,7 @@
 #include <errno.h>
 
 #define MASK(sig)  (1 << ((sig) - 1))
-#define MAXTIME	2			/* MAX timeout (minutes) */
+#define MAXTIME	2		/* MAX timeout (minutes) */
 
 #ifdef _LINUX_
 // bits/signum.h defines _NSIG as 64
@@ -76,10 +76,10 @@
 #include "signals.h"
 
 /* Function prototypes */
-void handler (int);
-void init_sig_vec ();
-void sys_error (const char *, int);
-void error (const char *, int);
+void handler(int);
+void init_sig_vec();
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /* Global variables */
 int signals_received = 0;
@@ -91,15 +91,15 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	timeout = MAXTIME*60;	/* Number sec to wait for signal */
+	int timeout = MAXTIME * 60;	/* Number sec to wait for signal */
 
 	/* Print out program header */
-	printf ("%s: IPC Signals TestSuite program\n\n", *argv);
+	printf("%s: IPC Signals TestSuite program\n\n", *argv);
 
 	/* Set up our signal handlers */
-	init_sig_vec ();
+	init_sig_vec();
 
 	/*
 	 * Critical section - block SIGILL signal
@@ -114,18 +114,18 @@
 	 */
 #ifdef _LINUX_
 	sigset_t mask;
-	sigemptyset (&mask);
-	sigaddset (&mask, SIGILL);
-	sigprocmask (SIG_BLOCK, &mask, NULL);
+	sigemptyset(&mask);
+	sigaddset(&mask, SIGILL);
+	sigprocmask(SIG_BLOCK, &mask, NULL);
 #else
-	if (sigblock ( MASK (SIGILL) ) < 0)
-		sys_error ("sigblock failed", __LINE__);
+	if (sigblock(MASK(SIGILL)) < 0)
+		sys_error("sigblock failed", __LINE__);
 #endif
 
-	printf ("\t(BEGIN) Critial section\n");
+	printf("\t(BEGIN) Critial section\n");
 
 	/* Critial section */
-	sleep (1);
+	sleep(1);
 
 	/*
 	 * End of critical section - ensure SIGILL signal was not received
@@ -135,37 +135,38 @@
 	 * function call.
 	 */
 	if (signals_received > 0)
-		error ("received an unexpected signal during the critical section",
-			__LINE__);
+		error
+		    ("received an unexpected signal during the critical section",
+		     __LINE__);
 
-	printf ("\n\t(END) Critial section\n");
+	printf("\n\t(END) Critial section\n");
 
 #ifdef _LINUX_
-	sigemptyset (&mask);
-	sigprocmask (SIG_SETMASK, &mask, NULL);
+	sigemptyset(&mask);
+	sigprocmask(SIG_SETMASK, &mask, NULL);
 #else
-	if (sigsetmask (0) < 0)
-		sys_error ("sigsetmask failed", __LINE__);
+	if (sigsetmask(0) < 0)
+		sys_error("sigsetmask failed", __LINE__);
 #endif
-	raise (SIGILL);
+	raise(SIGILL);
 
 	/*
 	 * Upon unblocking the signals, should receive the SIGILL signal.
 	 * Verify that it indeed is caught.
 	 */
-	while (signals_received == 0 && --timeout)
-	  {
-	        printf(".");
+	while (signals_received == 0 && --timeout) {
+		printf(".");
 		fflush(stdout);
-		sleep (1);
-	  }
+		sleep(1);
+	}
 
 	if (timeout == 0)
-		error ("failed to receive SIGILL signal after unblocking signals",
-			__LINE__);
+		error
+		    ("failed to receive SIGILL signal after unblocking signals",
+		     __LINE__);
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -184,33 +185,37 @@
 | Returns:   Nothing                                                   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void init_sig_vec ()
+void init_sig_vec()
 {
 	struct sigaction invec;
-	char 	msg [256];		/* Buffer for error message */
-	int 	i;
+	char msg[256];		/* Buffer for error message */
+	int i;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Cannot catch or ignore the following signals */
-#ifdef _IA64    /* SIGWAITING not supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING not supported, RESERVED */
 		if ((i == SIGKILL) || (i == SIGSTOP) ||
-		    (i == SIGCONT) || (i == SIGWAITING)) continue;
+		    (i == SIGCONT) || (i == SIGWAITING))
+			continue;
 #else
-# ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
-# else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
-# endif
+#ifdef _LINUX_
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
+#else
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
+#endif
 #endif
 
-		invec.sa_handler = (void (*)(int)) handler;
-		sigemptyset (&invec.sa_mask);
+		invec.sa_handler = (void (*)(int))handler;
+		sigemptyset(&invec.sa_mask);
 		invec.sa_flags = 0;
 
-		if (sigaction (i, &invec, (struct sigaction *) NULL) < 0) {
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &invec, (struct sigaction *)NULL) < 0) {
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 }
@@ -228,10 +233,11 @@
 | Returns:   Nothing                                                   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int signal)
+void handler(int signal)
 {
-	if (signal == SIGILL) signals_received++;
-	printf ("\treceived signal: (%s)\n", signames[signal]);
+	if (signal == SIGILL)
+		signals_received++;
+	printf("\treceived signal: (%s)\n", signames[signal]);
 }
 
 /*---------------------------------------------------------------------+
@@ -241,12 +247,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -256,8 +262,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_04.c b/testcases/kernel/ipc/ipc_stress/signal_test_04.c
index ac76af4..f4d7e68 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_04.c
@@ -77,7 +77,7 @@
 #include <stdio.h>
 #include <string.h>
 #ifdef _LINUX_
-#  define __USE_XOPEN
+#define __USE_XOPEN
 #endif
 #include <unistd.h>
 #include <stdlib.h>
@@ -91,11 +91,11 @@
 #endif
 
 /* Function prototypes */
-void signal_init ();
-void child (int);
-void handler (int, int, struct sigcontext *);
-void sys_error (const char *, int);
-void error (const char *, int);
+void signal_init();
+void child(int);
+void handler(int, int, struct sigcontext *);
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /* Flag set upon receiving SIGCHLD signal */
 volatile int sigchld_flag = 0;
@@ -108,36 +108,36 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	pid_t 	pid = getpid (),	/* Process ID (of parent process) */
-		cpid;			/* Process ID (of child process) */
-	int	sigusr1_interrupts;	/* xxx */
-	int	status;			/* Child's exit status */
-	int	timeout = 10;		/* How long to wait for SIGCHILD */
-	char	msg [100];		/* Buffer for error message */
+	pid_t pid = getpid(),	/* Process ID (of parent process) */
+	    cpid;		/* Process ID (of child process) */
+	int sigusr1_interrupts;	/* xxx */
+	int status;		/* Child's exit status */
+	int timeout = 10;	/* How long to wait for SIGCHILD */
+	char msg[100];		/* Buffer for error message */
 
 	/* Print out program header */
-	printf ("%s: IPC TestSuite program\n\n", *argv);
-	fflush (stdout);
+	printf("%s: IPC TestSuite program\n\n", *argv);
+	fflush(stdout);
 
 	/* Set up our signal handler */
-	signal_init ();
+	signal_init();
 
 	/*
 	 * Spawn a child process & have the child process send SIGUSR1
 	 * signals to the parent.
 	 */
-	switch (cpid = fork ()) {
-		case -1: /* Unable to create child process */
-			sys_error ("fork failed", __LINE__);
-			exit (-1);
+	switch (cpid = fork()) {
+	case -1:		/* Unable to create child process */
+		sys_error("fork failed", __LINE__);
+		exit(-1);
 
-		case 0: /* Child process */
-			child (pid);
+	case 0:		/* Child process */
+		child(pid);
 
-		default: /* Parent process */
-			break;
+	default:		/* Parent process */
+		break;
 	}
 
 	/*
@@ -152,35 +152,38 @@
 	 * Send SIGKILL signal to child process (child process
 	 * will exit upon receiving the signal).
 	 */
-	printf ("\tWait for SIGUSR1 signal from child process\n");
+	printf("\tWait for SIGUSR1 signal from child process\n");
 #ifdef _IA64
-	while (sigusr1_count < 1) sleep(1);
+	while (sigusr1_count < 1)
+		sleep(1);
 #else
 	while (sigusr1_count < 1) ;
 #endif
-	printf ("\tReceived SIGUSR1 (30)\n");
+	printf("\tReceived SIGUSR1 (30)\n");
 	sigusr1_interrupts = sigusr1_count;
 
-	printf ("\n\tStop the child process\n");
-	kill (cpid, SIGSTOP);
+	printf("\n\tStop the child process\n");
+	kill(cpid, SIGSTOP);
 
-	printf ("\n\tWait for SIGCHLD signal from stopped child process\n");
-	alarm (timeout);
+	printf("\n\tWait for SIGCHLD signal from stopped child process\n");
+	alarm(timeout);
 	while (sigchld_flag < 1) ;
-	printf ("\tReceived SIGCHLD (20)\n");
+	printf("\tReceived SIGCHLD (20)\n");
 
-	printf ("\n\tResume child process & wait for it to send SIGUSR1 signal\n");
-	kill (cpid, SIGCONT);
+	printf
+	    ("\n\tResume child process & wait for it to send SIGUSR1 signal\n");
+	kill(cpid, SIGCONT);
 
 #ifdef _IA64
-	while (sigusr1_interrupts == sigusr1_count) sleep(1) ;
+	while (sigusr1_interrupts == sigusr1_count)
+		sleep(1);
 #else
 	while (sigusr1_interrupts == sigusr1_count) ;
 #endif
-	printf ("\tReceived SIGUSR1 (20)\n");
+	printf("\tReceived SIGUSR1 (20)\n");
 
-	printf ("\n\tNow kill the child process with SIGUSR2 signal\n");
-	kill (cpid, SIGUSR2);
+	printf("\n\tNow kill the child process with SIGUSR2 signal\n");
+	kill(cpid, SIGUSR2);
 
 	/*
 	 * Wait for the child process to abort
@@ -195,26 +198,27 @@
 	 * Additionally verify that the number of SIGCHLD signals received
 	 * has increased.
 	 */
-	printf ("\n\tWait for SIGCHLD signal from killed child process\n");
+	printf("\n\tWait for SIGCHLD signal from killed child process\n");
 
-	wait (&status);
+	wait(&status);
 
-	if (WIFSIGNALED (status)) {
-		if (WTERMSIG (status) != SIGUSR2) {
-			sprintf (msg, "child process was killed with signal (%d)",
-				WTERMSIG (status));
-			error (msg, __LINE__);
+	if (WIFSIGNALED(status)) {
+		if (WTERMSIG(status) != SIGUSR2) {
+			sprintf(msg,
+				"child process was killed with signal (%d)",
+				WTERMSIG(status));
+			error(msg, __LINE__);
 		}
 	} else {
-		error ("child process did not receive SIGUSR2 signal", __LINE__);
+		error("child process did not receive SIGUSR2 signal", __LINE__);
 	}
 	if (sigchld_flag < 2)
-		error ("child process failed to send SIGCHLD signal", __LINE__);
+		error("child process failed to send SIGCHLD signal", __LINE__);
 
-	printf ("\tReceived SIGCHLD (30)\n");
+	printf("\tReceived SIGCHLD (30)\n");
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return 0;
 }
@@ -227,19 +231,19 @@
 |            o  continuously send SIGUSR1 interrupts to parent         |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void child (pid_t pid)
+void child(pid_t pid)
 {
 	while (1) {
-		sleep (2);
+		sleep(2);
 #ifdef _IA64
-		if (kill (pid, SIGUSR1) < 0)
+		if (kill(pid, SIGUSR1) < 0)
 			perror("child: kill");
 #else
-		kill (pid, SIGUSR1);
+		kill(pid, SIGUSR1);
 #endif
 	}
 
-	error ("child process failed to terminate correctly", __LINE__);
+	error("child process failed to terminate correctly", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -253,20 +257,21 @@
 | Returns:   Aborts if an unexpected signal is caught                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int signal, int code, struct sigcontext *scp)
+void handler(int signal, int code, struct sigcontext *scp)
 {
-	char msg [100];
+	char msg[100];
 
 	if (signal == SIGCHLD) {
 		sigchld_flag++;
 	} else if (signal == SIGUSR1) {
 		sigusr1_count++;
 	} else if (signal == SIGALRM) {
-		sprintf (msg, "Timed out waiting for SIGCHLD signal from child, defect # 124551");
-		error (msg, __LINE__);
+		sprintf(msg,
+			"Timed out waiting for SIGCHLD signal from child, defect # 124551");
+		error(msg, __LINE__);
 	} else {
-		sprintf (msg, "caught an unexpected signal (%d)", signal);
-		error (msg, __LINE__);
+		sprintf(msg, "caught an unexpected signal (%d)", signal);
+		error(msg, __LINE__);
 	}
 }
 
@@ -289,58 +294,62 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void signal_init ()
+void signal_init()
 {
 	struct sigaction action;
-	char	msg [100];
-	int	i;
+	char msg[100];
+	int i;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Do not ignore SIGCHILD signal */
-#ifdef _IA64    /* SIGWAITING not supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING not supported, RESERVED */
 		if (i == SIGCHLD || i == SIGALRM ||
-		    i == SIGUSR1 || i == SIGWAITING) continue;
+		    i == SIGUSR1 || i == SIGWAITING)
+			continue;
 #else
-#  ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
-#  else
-                if ((i == SIGKILL) || (i == SIGSTOP) || (i == SIGCONT)) continue;
-#  endif
+#ifdef _LINUX_
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
+#else
+		if ((i == SIGKILL) || (i == SIGSTOP) || (i == SIGCONT))
+			continue;
+#endif
 #endif
 
 		action.sa_handler = SIG_DFL;
-		sigfillset (&action.sa_mask);
+		sigfillset(&action.sa_mask);
 		action.sa_flags = SA_RESTART;
 
-		if (sigaction (i, &action, (struct sigaction *) NULL) < 0) {
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &action, (struct sigaction *)NULL) < 0) {
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 
 	/* Setup signal handler for SIGCHLD & SIGUSR1 signals */
-	action.sa_handler = (void (*)(int)) handler;
-	sigfillset (&action.sa_mask);
+	action.sa_handler = (void (*)(int))handler;
+	sigfillset(&action.sa_mask);
 
 	/* changing */
-	/*action.sa_flags = 0;*/
+	/*action.sa_flags = 0; */
 	action.sa_flags = SA_RESTART;
 
-	if (sigaction (SIGCHLD, &action, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction (SIGCHLD) failed", __LINE__);
+	if (sigaction(SIGCHLD, &action, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction (SIGCHLD) failed", __LINE__);
 
 	/* changing */
 	action.sa_flags = SA_RESTART;
 	/* end of changing */
 
-	if (sigaction (SIGUSR1, &action, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction (SIGUSR1) failed", __LINE__);
+	if (sigaction(SIGUSR1, &action, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction (SIGUSR1) failed", __LINE__);
 
 	/* Setup signal handler for SIGALRM */
-	action.sa_handler = (void (*)(int)) handler;
-	if (sigaction (SIGALRM, &action, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction (SIGCHLD) failed", __LINE__);
+	action.sa_handler = (void (*)(int))handler;
+	if (sigaction(SIGALRM, &action, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction (SIGCHLD) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -350,12 +359,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -365,11 +374,11 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
 #ifdef _IA64
 	fflush(stderr);
 #endif
-	exit (-1);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_05.c b/testcases/kernel/ipc/ipc_stress/signal_test_05.c
index 7074ff6..96ff821 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_05.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_05.c
@@ -64,9 +64,9 @@
 #include <stdio.h>
 #include <string.h>
 #ifdef _LINUX_
-#  define __USE_XOPEN
-#  include <sys/types.h>
-#  include <sys/stat.h>
+#define __USE_XOPEN
+#include <sys/types.h>
+#include <sys/stat.h>
 #endif
 #include <unistd.h>
 #include <sys/signal.h>
@@ -80,11 +80,11 @@
 #endif
 
 /* Function prototypes */
-void ignore_signals ();
-void child (int);
-void handler (int, int, struct sigcontext *);
-void sys_error (const char *, int);
-void error (const char *, int);
+void ignore_signals();
+void child(int);
+void handler(int, int, struct sigcontext *);
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /* Flag set upon receiving SIGCHLD signal */
 int sigchld_flag = 0;
@@ -96,32 +96,32 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 
-	pid_t	pid = getpid ();	/* Process ID (of parent process) */
-	int	status;			/* Child's exit status */
+	pid_t pid = getpid();	/* Process ID (of parent process) */
+	int status;		/* Child's exit status */
 
 	/* Print out program header */
-	printf ("%s: IPC TestSuite program\n\n", *argv);
+	printf("%s: IPC TestSuite program\n\n", *argv);
 
 	/* Set up our signal handler */
-	ignore_signals ();
+	ignore_signals();
 
 	/*
 	 * Spawn a child process & have the child process send all of the
 	 * catchable signals to the parent.
 	 */
-	printf ("\n\tSpawning child process\n");
-	switch (fork ()) {
-		case -1: /* Unable to create child process */
-			sys_error ("fork failed", __LINE__);
+	printf("\n\tSpawning child process\n");
+	switch (fork()) {
+	case -1:		/* Unable to create child process */
+		sys_error("fork failed", __LINE__);
 
-		case 0: /* Child process */
-			child (pid);
+	case 0:		/* Child process */
+		child(pid);
 
-		default: /* Parent process */
-			break;
+	default:		/* Parent process */
+		break;
 	}
 
 	/*
@@ -136,18 +136,18 @@
 	 *
 	 * Check to insure that the SIGCHLD signal was caught.
 	 */
-	wait (&status);
+	wait(&status);
 
-	if (!WIFEXITED (status))
-		error ("child process exited abnormally", __LINE__);
+	if (!WIFEXITED(status))
+		error("child process exited abnormally", __LINE__);
 
 	if (sigchld_flag != 1)
-		error ("child process failed to send SIGCHLD signal", __LINE__);
+		error("child process failed to send SIGCHLD signal", __LINE__);
 
-	printf ("\n\tChild process exited successfully\n");
+	printf("\n\tChild process exited successfully\n");
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 
 	return 0;
 }
@@ -163,36 +163,41 @@
 | Parms:     pid - process id of parent process                        |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void child (pid_t pid)
+void child(pid_t pid)
 {
 	int i;
 
 	/* Send one of each of the possible signals to the process */
-	printf ("\n\tChild: sending ALL signals to parent!\n");
-	for (i=1; i< (SIGMAX + 1); i++) {
+	printf("\n\tChild: sending ALL signals to parent!\n");
+	for (i = 1; i < (SIGMAX + 1); i++) {
 
 		/* Cannot catch or ignore the following signals */
 #ifdef _LINUX_
-		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
 #else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
 #endif
 
 		/* Skip sigchild too */
-		if (i == SIGCHLD) continue;
+		if (i == SIGCHLD)
+			continue;
 #ifdef _IA64
 		/* RESERVED - DON'T USE */
-		if (i == SIGWAITING) continue;
+		if (i == SIGWAITING)
+			continue;
 #endif
 
-		printf ("\tSending (%d)\n", i);
+		printf("\tSending (%d)\n", i);
 
-		if (kill (pid, i) < 0)
-			sys_error ("kill failed", __LINE__);
+		if (kill(pid, i) < 0)
+			sys_error("kill failed", __LINE__);
 	}
 
 	/* Exit & implicitly send a sigchild interrupt to the parent process */
-	exit (0);
+	exit(0);
 }
 
 /*---------------------------------------------------------------------+
@@ -207,16 +212,16 @@
 | Returns:   Aborts if an unexpected signal is caught                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int signal, int code, struct sigcontext *scp)
+void handler(int signal, int code, struct sigcontext *scp)
 {
-	char msg [100];
+	char msg[100];
 
 	if (signal == SIGCHLD) {
-		printf ("\tcaught SIGCHLD(%d) signal\n", signal);
+		printf("\tcaught SIGCHLD(%d) signal\n", signal);
 		sigchld_flag = 1;
 	} else {
-		sprintf (msg, "caught an unexpected signal (%d)", signal);
-		error (msg, __LINE__);
+		sprintf(msg, "caught an unexpected signal (%d)", signal);
+		error(msg, __LINE__);
 	}
 }
 
@@ -240,41 +245,45 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void ignore_signals ()
+void ignore_signals()
 {
 	struct sigaction action;
-	char	msg [100];
+	char msg[100];
 	int i;
 
-	for (i=1; i< (SIGMAX + 1); i++) {
+	for (i = 1; i < (SIGMAX + 1); i++) {
 
 		/* Cannot catch or ignore the following signals: */
 #ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
 #else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
 #endif
 
 		/* Do not ignore SIGCHILD signal */
-		if (i == SIGCHLD) continue;
+		if (i == SIGCHLD)
+			continue;
 
 		action.sa_handler = SIG_IGN;
-		sigfillset (&action.sa_mask);
+		sigfillset(&action.sa_mask);
 		action.sa_flags = SA_RESTART;
 
-		if (sigaction (i, &action, (struct sigaction *) NULL) < 0) {
-		        perror("ignore_signals: sigaction");
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &action, (struct sigaction *)NULL) < 0) {
+			perror("ignore_signals: sigaction");
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 
 	/* Setup signal handler for SIGCHLD signal */
-	action.sa_handler = (void (*)(int)) handler;
-	sigfillset (&action.sa_mask);
+	action.sa_handler = (void (*)(int))handler;
+	sigfillset(&action.sa_mask);
 	action.sa_flags = SA_RESTART;
-	if (sigaction (SIGCHLD, &action, (struct sigaction *) NULL) < 0)
-		sys_error ("sigaction (SIGCHLD) failed", __LINE__);
+	if (sigaction(SIGCHLD, &action, (struct sigaction *)NULL) < 0)
+		sys_error("sigaction (SIGCHLD) failed", __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -284,12 +293,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -299,8 +308,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_06.c b/testcases/kernel/ipc/ipc_stress/signal_test_06.c
index 75e9522..8b8315c 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_06.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_06.c
@@ -71,10 +71,10 @@
 #endif
 
 /* Function prototypes */
-void handler (int, int, struct sigcontext *);
-void init_sig ();
-void sys_error (const char *, int);
-void error (const char *, int);
+void handler(int, int, struct sigcontext *);
+void init_sig();
+void sys_error(const char *, int);
+void error(const char *, int);
 
 /* Global variables */
 int signals_received = 0;
@@ -86,49 +86,50 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	sigset_t	newmask, 	/* New signal mask */
-			oldmask, 	/* Initial signal mask */
-			pendmask; 	/* Pending signal mask */
-	int		i;		/* Loop index */
+	sigset_t newmask,	/* New signal mask */
+	 oldmask,		/* Initial signal mask */
+	 pendmask;		/* Pending signal mask */
+	int i;			/* Loop index */
 
 	/* Print out program header */
-	printf ("%s: IPC TestSuite program\n\n", *argv);
+	printf("%s: IPC TestSuite program\n\n", *argv);
 
 	/* Set up our signal handler */
-	init_sig ();
+	init_sig();
 
 	/*
 	 * Block ALL signals from interrupting the process
 	 */
-	printf ("\tBlock all signals from interrupting the process\n");
-	if (sigfillset (&newmask) < 0)
-		error ("sigfillset failed", __LINE__);
-	if (sigprocmask (SIG_SETMASK, &newmask, &oldmask) < 0)
-		error ("sigprocmask failed", __LINE__);
+	printf("\tBlock all signals from interrupting the process\n");
+	if (sigfillset(&newmask) < 0)
+		error("sigfillset failed", __LINE__);
+	if (sigprocmask(SIG_SETMASK, &newmask, &oldmask) < 0)
+		error("sigprocmask failed", __LINE__);
 
 	/*
 	 * Send MAXSIG signals to the current process -- since ALL of the
 	 * signals are blocked, none of the signals should interrupt the
 	 * process
 	 */
-	printf ("\n\tSend MAX (%d) SIGUSR1 signals to the process...\n", MAXSIG);
-	for (i=0; i<MAXSIG; i++) raise (SIGUSR1);
+	printf("\n\tSend MAX (%d) SIGUSR1 signals to the process...\n", MAXSIG);
+	for (i = 0; i < MAXSIG; i++)
+		raise(SIGUSR1);
 
 	/*
 	 *  Sleep for a short time and the check to ensure that a SIGUSR1
 	 *  signal is pending
 	 */
-	sleep (2);
+	sleep(2);
 
-	printf ("\n\tEnsure at least one SIGUSR1 signal is pending\n");
-	if (sigpending (&pendmask) < 0)
-		error ("sigpending failed", __LINE__);
+	printf("\n\tEnsure at least one SIGUSR1 signal is pending\n");
+	if (sigpending(&pendmask) < 0)
+		error("sigpending failed", __LINE__);
 
-	if (sigismember (&pendmask, SIGUSR1) == 0)
-		error ("sent multiple SIGUSR1 signals to process, " \
-			"yet none are pending!", __LINE__);
+	if (sigismember(&pendmask, SIGUSR1) == 0)
+		error("sent multiple SIGUSR1 signals to process, "
+		      "yet none are pending!", __LINE__);
 
 	/*
 	 * Change the signal mask to allow signals to interrupt the process
@@ -136,18 +137,17 @@
 	 *
 	 * Then verify that at least one signal was received
 	 */
-	printf ("\n\tChange signal mask & wait for SIGUSR1 signal\n");
+	printf("\n\tChange signal mask & wait for SIGUSR1 signal\n");
 	if (sigsuspend(&oldmask) != -1 || errno != 4)
-		error ("sigsuspend failed", __LINE__);
+		error("sigsuspend failed", __LINE__);
 
 	if (signals_received != 1) {
-		printf ("Signals are queued!  Sent %d signals, " \
-			"while %d were queued\n",
-			MAXSIG, signals_received);
+		printf("Signals are queued!  Sent %d signals, "
+		       "while %d were queued\n", MAXSIG, signals_received);
 	}
 
 	/* Program completed successfully -- exit */
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -164,16 +164,16 @@
 | Returns:   Aborts if an unexpected signal is caught                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int signal, int code, struct sigcontext *scp)
+void handler(int signal, int code, struct sigcontext *scp)
 {
-	char msg [256];		/* Buffer for error message */
+	char msg[256];		/* Buffer for error message */
 
 	if (signal != SIGUSR1) {
-		sprintf (msg, "unexpected signal (%d)", signal);
-		error (msg, __LINE__);
+		sprintf(msg, "unexpected signal (%d)", signal);
+		error(msg, __LINE__);
 	}
 
-	printf ("\tcaught SIGUSR1 (%d) signal\n", signal);
+	printf("\tcaught SIGUSR1 (%d) signal\n", signal);
 	signals_received++;
 }
 
@@ -192,33 +192,37 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void init_sig ()
+void init_sig()
 {
 	struct sigaction invec;
-	char 	msg [256];		/* Buffer for error message */
-	int 	i;
+	char msg[256];		/* Buffer for error message */
+	int i;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Cannot catch or ignore the following signals */
-#ifdef _IA64    /* SIGWAITING not supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING not supported, RESERVED */
 		if ((i == SIGKILL) || (i == SIGSTOP) ||
-		    (i == SIGCONT) || (i == SIGWAITING)) continue;
+		    (i == SIGCONT) || (i == SIGWAITING))
+			continue;
 #else
-# ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
-# else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
-# endif
+#ifdef _LINUX_
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
+#else
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
+#endif
 #endif
 
-		invec.sa_handler = (void (*)(int)) handler;
-		sigemptyset (&invec.sa_mask);
+		invec.sa_handler = (void (*)(int))handler;
+		sigemptyset(&invec.sa_mask);
 		invec.sa_flags = 0;
 
-		if (sigaction (i, &invec, (struct sigaction *) NULL) < 0) {
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &invec, (struct sigaction *)NULL) < 0) {
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 }
@@ -230,12 +234,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -245,8 +249,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_07.c b/testcases/kernel/ipc/ipc_stress/signal_test_07.c
index e5894dd..7e4d93a 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_07.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_07.c
@@ -69,15 +69,15 @@
 #endif
 
 /* Function prototypes */
-void handler (int, int, struct sigcontext *);
-void init_sig ();
-void sys_error (const char *, int);
-void error (const char *, int);
+void handler(int, int, struct sigcontext *);
+void init_sig();
+void sys_error(const char *, int);
+void error(const char *, int);
 
 int signals_received = 0;
 
-#define MAXSIG 	1024*1024		/* Max interrupts */
-#define MAXTIME	2			/* Time out (minutes) */
+#define MAXSIG 	1024*1024	/* Max interrupts */
+#define MAXTIME	2		/* Time out (minutes) */
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -86,18 +86,18 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	int	timeout = MAXTIME*60;	/* Timeout value */
-	int	i;			/* Loop index */
-	char 	msg [256];		/* Buffer for error message */
+	int timeout = MAXTIME * 60;	/* Timeout value */
+	int i;			/* Loop index */
+	char msg[256];		/* Buffer for error message */
 
 	/* Print out program header */
-	printf ("%s: IPC TestSuite program\n\n", *argv);
-	fflush (stdout);
+	printf("%s: IPC TestSuite program\n\n", *argv);
+	fflush(stdout);
 
 	/* Set up our signal handler */
-	init_sig ();
+	init_sig();
 
 	/*
 	 * Send MAXSIG signals to the process
@@ -105,26 +105,26 @@
 	 * Using raise, send MAX signals to the process.  Then loop until
 	 * every signal is caught by the signal handler (or the timer expires).
 	 */
-	printf ("\tSend MAX (%d) signals to the process...\n", MAXSIG);
-	fflush (stdout);
-	for (i=0; i<MAXSIG; i++)
-		raise (SIGUSR1);
+	printf("\tSend MAX (%d) signals to the process...\n", MAXSIG);
+	fflush(stdout);
+	for (i = 0; i < MAXSIG; i++)
+		raise(SIGUSR1);
 
 	while (signals_received < MAXSIG && --timeout)
-		sleep (1);
+		sleep(1);
 
 	if (timeout == 0) {
-		sprintf (msg, "failed to received %d signals in %d minutes\n",
+		sprintf(msg, "failed to received %d signals in %d minutes\n",
 			MAXSIG, MAXTIME);
-		error (msg, __LINE__);
+		error(msg, __LINE__);
 	}
 
 	/*
 	 * Received ALL of the sent signals!  Exit with success
 	 */
-	printf ("\n\tReceived EVERY signal!\n");
+	printf("\n\tReceived EVERY signal!\n");
 
-	printf ("\nsuccessful!\n");
+	printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -139,17 +139,17 @@
 | Returns:   Aborts if an unexpected signal is caught                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void handler (int signal, int code, struct sigcontext *scp)
+void handler(int signal, int code, struct sigcontext *scp)
 {
-	char msg [256];		/* Buffer for error message */
+	char msg[256];		/* Buffer for error message */
 
 	if (signal == SIGUSR1) {
 		signals_received++;
 	} else if (signal == SIGUSR2) {
-		printf ("\tcaught signal (%d)\n", signal);
+		printf("\tcaught signal (%d)\n", signal);
 	} else {
-		sprintf (msg, "caught an unexpected signal (%d)", signal);
-		error (msg, __LINE__);
+		sprintf(msg, "caught an unexpected signal (%d)", signal);
+		error(msg, __LINE__);
 	}
 }
 
@@ -168,33 +168,37 @@
 | Returns:   n/a                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void init_sig ()
+void init_sig()
 {
 	struct sigaction invec;
-	char 	msg [256];		/* Buffer for error message */
-	int 	i;
+	char msg[256];		/* Buffer for error message */
+	int i;
 
-	for (i=1; i<=SIGMAX; i++) {
+	for (i = 1; i <= SIGMAX; i++) {
 
 		/* Cannot catch or ignore the following signals */
-#ifdef _IA64    /* SIGWAITING not supported, RESERVED */
+#ifdef _IA64			/* SIGWAITING not supported, RESERVED */
 		if ((i == SIGKILL) || (i == SIGSTOP) ||
-		    (i == SIGCONT) || (i == SIGWAITING)) continue;
+		    (i == SIGCONT) || (i == SIGWAITING))
+			continue;
 #else
-# ifdef _LINUX_
-       		if ((i == SIGKILL) || (i == SIGSTOP) || ((i>=32)&&(i<=34))) continue;
-# else
-		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT) continue;
-# endif
+#ifdef _LINUX_
+		if ((i == SIGKILL) || (i == SIGSTOP)
+		    || ((i >= 32) && (i <= 34)))
+			continue;
+#else
+		if (i == SIGKILL || i == SIGSTOP || i == SIGCONT)
+			continue;
+#endif
 #endif
 
-		invec.sa_handler = (void (*)(int)) handler;
-		sigemptyset (&invec.sa_mask);
+		invec.sa_handler = (void (*)(int))handler;
+		sigemptyset(&invec.sa_mask);
 		invec.sa_flags = 0;
 
-		if (sigaction (i, &invec, (struct sigaction *) NULL) < 0) {
-			sprintf (msg, "sigaction failed on signal %d", i);
-			error (msg, __LINE__);
+		if (sigaction(i, &invec, (struct sigaction *)NULL) < 0) {
+			sprintf(msg, "sigaction failed on signal %d", i);
+			error(msg, __LINE__);
 		}
 	}
 }
@@ -206,12 +210,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, int line)
+void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -221,8 +225,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, int line)
+void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/ipc/pipeio/pipeio.c b/testcases/kernel/ipc/pipeio/pipeio.c
index 49f3b90..7dfbe44 100644
--- a/testcases/kernel/ipc/pipeio/pipeio.c
+++ b/testcases/kernel/ipc/pipeio/pipeio.c
@@ -53,25 +53,24 @@
 
 #include "test.h"
 
-char *TCID="pipeio"; 		/* Test program identifier.    */
-int TST_TOTAL=1;    		/* Total number of test cases. */
+char *TCID = "pipeio";		/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 
 #define SAFE_FREE(p) { if (p) { free(p); (p)=NULL; } }
 
 /* To avoid extensive modifications to the code, use this bodge */
 #define exit(x) myexit(x)
-void
-myexit (int x)
+void myexit(int x)
 {
-  if (x)
-    tst_resm (TFAIL, "Test failed");
-  else
-    tst_resm (TPASS, "Test passed");
- tst_exit();
+	if (x)
+		tst_resm(TFAIL, "Test failed");
+	else
+		tst_resm(TPASS, "Test passed");
+	tst_exit();
 }
 
 #if defined(__linux__)
-# define NBPW sizeof(int)
+#define NBPW sizeof(int)
 #endif
 
 #define PPATH "tpipe"
@@ -108,34 +107,33 @@
 #endif /* ! MAXPATHLEN */
 #endif /* PATH_MAX */
 
-int
-main(ac,av)
+int main(ac, av)
 int ac;
 char *av[];
 {
-	int i,j,c,error = 0;
+	int i, j, c, error = 0;
 	int n;
 	int nb;			/* number of bytes read */
-	int num_wrters=1;	/* number of writers */
-	int num_writes=1;	/* number of writes per child */
-	int loop=0;		/* loop indefinitely */
+	int num_wrters = 1;	/* number of writers */
+	int num_writes = 1;	/* number of writes per child */
+	int loop = 0;		/* loop indefinitely */
 	int exit_error = 1;	/* exit on error #, zero means no exit */
-	int size=327;		/* default size */
+	int size = 327;		/* default size */
 	int unpipe = 0;		/* un-named pipe if non-zero */
-	int verbose=0;		/* verbose mode if set */
-	int quiet=0;		/* quiet mode if set */
-	int num_rpt=0;		/* ping number, how often to print message */
+	int verbose = 0;	/* verbose mode if set */
+	int quiet = 0;		/* quiet mode if set */
+	int num_rpt = 0;	/* ping number, how often to print message */
 	int chld_wait = 0;	/* max time to wait between writes, 1 == no wait */
-	int parent_wait = 0;	/* max time to wait between reads, 1 == no wait*/
+	int parent_wait = 0;	/* max time to wait between reads, 1 == no wait */
 	int ndelay = O_NDELAY;	/* additional flag to open */
 	long clock;
 	char *writebuf = NULL;
 	char *readbuf = NULL;
 	double d;
-	char   *cp;
-        extern char *optarg;
+	char *cp;
+	extern char *optarg;
 	char pname[PATH_MAX];	/* contains the name of the unamed pipe */
-	char dir[PATH_MAX];	/* directory to create pipe in		*/
+	char dir[PATH_MAX];	/* directory to create pipe in          */
 	char *blk_type;		/* blocking i/o or not */
 	char *pipe_type;	/* type of pipe under test */
 	int fds[2];		/* un-named pipe fds */
@@ -149,14 +147,14 @@
 	int format_size = -1;
 	int background = 0;	/* if set, put process in background */
 	struct stat stbuf;
-        int iotype = 0;		/* sync io */
+	int iotype = 0;		/* sync io */
 	char *toutput;		/* for getenv() */
 	int sem_id;
 	struct sembuf sem_op;
 	union semun {		/* for semctl() */
-	  int val;
-	  struct semid_ds *buf;
-	  unsigned short int *array;
+		int val;
+		struct semid_ds *buf;
+		unsigned short int *array;
 	} u;
 	unsigned int uwait_iter = 1000;
 	unsigned int uwait_total = 5000000;
@@ -165,16 +163,18 @@
 	format = HEX;
 	blk_type = NON_BLOCKING_IO;
 	dir[0] = '\0';
-	sprintf(pname,"%s.%d",PPATH,getpid());
+	sprintf(pname, "%s.%d", PPATH, getpid());
 
 	if ((toutput = getenv("TOUTPUT")) != NULL) {
-	    if (strcmp(toutput, "NOPASS") == 0) {
-		quiet=1;
-	    }
+		if (strcmp(toutput, "NOPASS") == 0) {
+			quiet = 1;
+		}
 	}
 
-        while ((c=getopt (ac, av, "T:BbCc:D:d:he:Ef:i:I:ln:p:qs:uvW:w:P:")) != EOF) {
-	    switch (c) {
+	while ((c =
+		getopt(ac, av,
+		       "T:BbCc:D:d:he:Ef:i:I:ln:p:qs:uvW:w:P:")) != EOF) {
+		switch (c) {
 		case 'T':
 			TCID = optarg;
 			break;
@@ -189,44 +189,44 @@
 			strcpy(pname, optarg);
 			break;
 		case 'B':	/* background */
-			background=1;
+			background = 1;
 			break;
 		case 'b':	/* blocked */
-			ndelay=0;
+			ndelay = 0;
 			blk_type = BLOCKING_IO;
 			break;
 		case 'C':
 			fprintf(stderr,
-			    "%s: --C option not supported on this architecture\n",
-			    TCID);
+				"%s: --C option not supported on this architecture\n",
+				TCID);
 			exit(1);
 			break;
 		case 'c':	/* number childern */
 			if (sscanf(optarg, "%d", &num_wrters) != 1) {
-				fprintf(stderr,"%s: --c option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --c option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (num_wrters <= 0) {
+			} else if (num_wrters <= 0) {
 				fprintf(stderr,
-				    "%s: --c option must be greater than zero.\n",
-				    TCID);
+					"%s: --c option must be greater than zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
 			break;
 		case 'e':	/* exit on error # */
 			if (sscanf(optarg, "%d", &exit_error) != 1) {
-				fprintf(stderr,"%s: --e option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --e option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (exit_error < 0) {
+			} else if (exit_error < 0) {
 				fprintf(stderr,
-				    "%s: --e option must be greater than zero.\n",
-				    TCID);
+					"%s: --e option must be greater than zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
@@ -237,7 +237,7 @@
 			exit(0);
 			break;
 		case 'f':	/* format of buffer on error */
-			switch(optarg[0]) {
+			switch (optarg[0]) {
 			case 'x':
 			case 'X':
 				format = HEX;
@@ -254,40 +254,42 @@
 			case 'A':
 				format = ASCII;
 				break;
-			case 'n':		/* not output */
+			case 'n':	/* not output */
 			case 'N':
 				format = NO_OUT;
 				break;
 
-			default :
-				fprintf(stderr,"%s: --f option invalid arg '%s'.\n",
-					TCID,optarg);
+			default:
 				fprintf(stderr,
-				    "\tIt must be x(hex), o(octal), d(decimal), a(ascii) or n(none) with opt sz\n");
+					"%s: --f option invalid arg '%s'.\n",
+					TCID, optarg);
+				fprintf(stderr,
+					"\tIt must be x(hex), o(octal), d(decimal), a(ascii) or n(none) with opt sz\n");
 				exit(1);
 				break;
 			}
 			cp = optarg;
 			cp++;
 			if (*cp) {
-			    if (sscanf(cp, "%i", &format_size) != 1) {
-				fprintf(stderr,"%s: --f option invalid arg '%s'.\n",
-					TCID,optarg);
-				fprintf(stderr,
-				    "\tIt must be x(hex), o(octal), d(decimal), a(ascii) or n(none) with opt sz\n");
-				exit(1);
-				break;
-			    }
+				if (sscanf(cp, "%i", &format_size) != 1) {
+					fprintf(stderr,
+						"%s: --f option invalid arg '%s'.\n",
+						TCID, optarg);
+					fprintf(stderr,
+						"\tIt must be x(hex), o(octal), d(decimal), a(ascii) or n(none) with opt sz\n");
+					exit(1);
+					break;
+				}
 			}
 			break;
 
-    		case 'I':
-     			if ((iotype=lio_parse_io_arg1(optarg)) == -1) {
-         		    fprintf(stderr,
-             			"%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
-             			TCID);
-         		    exit(1);
-     			}
+		case 'I':
+			if ((iotype = lio_parse_io_arg1(optarg)) == -1) {
+				fprintf(stderr,
+					"%s: --I arg is invalid, must be s, p, f, a, l, L or r.\n",
+					TCID);
+				exit(1);
+			}
 			break;
 
 		case 'l':	/* loop forever */
@@ -297,15 +299,15 @@
 		case 'i':
 		case 'n':	/* number writes per child */
 			if (sscanf(optarg, "%d", &num_writes) != 1) {
-				fprintf(stderr,"%s: --i/n option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --i/n option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (num_writes < 0) {
+			} else if (num_writes < 0) {
 				fprintf(stderr,
-				    "%s: --i/n option must be greater than equal to zero.\n",
-				    TCID);
+					"%s: --i/n option must be greater than equal to zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
@@ -315,18 +317,19 @@
 
 			break;
 		case 'P':	/* panic flag */
-			fprintf(stderr, "%s: --P not supported on this architecture\n",
-			    TCID);
+			fprintf(stderr,
+				"%s: --P not supported on this architecture\n",
+				TCID);
 			exit(1);
 			break;
 		case 'p':	/* ping */
 			if (sscanf(optarg, "%d", &num_rpt) != 1) {
-				fprintf(stderr,"%s: --p option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --p option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (num_rpt < 0) {
+			} else if (num_rpt < 0) {
 				fprintf(stderr,
 					"%s: --p option must be greater than equal to zero.\n",
 					TCID);
@@ -334,42 +337,42 @@
 				exit(1);
 			}
 			break;
-	        case 'q':	/* Quiet - NOPASS */
-			quiet=1;
+		case 'q':	/* Quiet - NOPASS */
+			quiet = 1;
 			break;
 		case 's':	/* size */
 			if (sscanf(optarg, "%d", &size) != 1) {
-				fprintf(stderr,"%s: --s option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --s option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (size <= 0) {
+			} else if (size <= 0) {
 				fprintf(stderr,
-				    "%s: --s option must be greater than zero.\n",
-				    TCID);
+					"%s: --s option must be greater than zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
 			break;
 		case 'u':
-			unpipe=1;	/* un-named pipe */
+			unpipe = 1;	/* un-named pipe */
 			break;
 		case 'v':	/* verbose */
-			verbose=1;
+			verbose = 1;
 			break;
 		case 'W':	/* max wait time between writes */
 			d = strtod(optarg, &cp);
 			if (*cp != '\0') {
-				fprintf(stderr,"%s: --w option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --w option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (d < 0) {
+			} else if (d < 0) {
 				fprintf(stderr,
-				    "%s: --w option must be greater than zero.\n",
-				    TCID);
+					"%s: --w option must be greater than zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
@@ -378,15 +381,15 @@
 		case 'w':	/* max wait time between writes */
 			d = strtod(optarg, &cp);
 			if (*cp != '\0') {
-				fprintf(stderr,"%s: --w option invalid arg '%s'.\n",
-					TCID,optarg);
+				fprintf(stderr,
+					"%s: --w option invalid arg '%s'.\n",
+					TCID, optarg);
 				usage();
 				exit(1);
-			}
-			else if (d < 0) {
+			} else if (d < 0) {
 				fprintf(stderr,
-				    "%s: --w option must be greater than zero.\n",
-				    TCID);
+					"%s: --w option must be greater than zero.\n",
+					TCID);
 				usage();
 				exit(1);
 			}
@@ -394,9 +397,9 @@
 			break;
 		case '?':
 			usage();
-			exit (1);
+			exit(1);
 			break;
-	    }
+		}
 	}
 
 	if (format_size == -1)
@@ -413,61 +416,65 @@
 	 * data is written.  This is the same as erroring and telling
 	 * the user the new cmd line to do the same thing.
 	 * Example:
-	 *	pipeio -s 5000 -n 10 -c 5
-	 *	(each child will write at least 50000 bytes, since all
-	 *	writes have to be in 4096 chuncks or 13*4096 (53248)
-	 *	bytes will be written.)  This is the same as:
+	 *      pipeio -s 5000 -n 10 -c 5
+	 *      (each child will write at least 50000 bytes, since all
+	 *      writes have to be in 4096 chuncks or 13*4096 (53248)
+	 *      bytes will be written.)  This is the same as:
 	 *      pipeio -s 4096 -n 13 -c 5
 	 */
 	if (size > PIPE_BUF && num_wrters > 1) {
-	    if (! loop) {
-	      /* we must set num_writes s.t. num_writes*num_wrters doesn't overflow later */
-		num_writes=MIN(((long long)num_writes*size+PIPE_BUF-1)/PIPE_BUF, INT_MAX/num_wrters);
-	        tst_resm (TINFO, "adjusting i/o size to %d, and # of writes to %d",
-		    PIPE_BUF, num_writes);
-	    }
-	    else {
-		tst_resm (TINFO, "adjusting i/o size to %d", PIPE_BUF);
-	    }
-	    size=PIPE_BUF;
+		if (!loop) {
+			/* we must set num_writes s.t. num_writes*num_wrters doesn't overflow later */
+			num_writes =
+			    MIN(((long long)num_writes * size + PIPE_BUF -
+				 1) / PIPE_BUF, INT_MAX / num_wrters);
+			tst_resm(TINFO,
+				 "adjusting i/o size to %d, and # of writes to %d",
+				 PIPE_BUF, num_writes);
+		} else {
+			tst_resm(TINFO, "adjusting i/o size to %d", PIPE_BUF);
+		}
+		size = PIPE_BUF;
 
 	}
 
-	if ((writebuf = (char *) malloc(size)) == NULL ||
-	    (readbuf = (char *) malloc(size)) == NULL) {
-		tst_resm (TFAIL|TERRNO, "malloc() failed");
-  		SAFE_FREE(writebuf);
+	if ((writebuf = (char *)malloc(size)) == NULL ||
+	    (readbuf = (char *)malloc(size)) == NULL) {
+		tst_resm(TFAIL | TERRNO, "malloc() failed");
+		SAFE_FREE(writebuf);
 		SAFE_FREE(readbuf);
 		exit(1);
 	}
 
-	memset(writebuf,'Z',size);
+	memset(writebuf, 'Z', size);
 
-	writebuf[size-1] = 'A';	/* to detect partial read/write problem */
+	writebuf[size - 1] = 'A';	/* to detect partial read/write problem */
 
-	if ((sem_id = semget(IPC_PRIVATE, 2, IPC_CREAT|S_IRWXU)) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "Couldn't allocate semaphore");
+	if ((sem_id = semget(IPC_PRIVATE, 2, IPC_CREAT | S_IRWXU)) == -1) {
+		tst_brkm(TBROK | TERRNO, NULL, "Couldn't allocate semaphore");
 	}
 
 	if (semctl(sem_id, 0, SETVAL, u) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "Couldn't initialize semaphore 0 value");
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "Couldn't initialize semaphore 0 value");
 
 	/* semaphore to hold off children from exiting until open() completes */
 	if (semctl(sem_id, 1, SETVAL, u) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "Couldn't initialize semaphore 1 value");
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "Couldn't initialize semaphore 1 value");
 
 	if (background) {
-	    if ((n=fork()) == -1) {
-		tst_resm (TFAIL|TERRNO, "fork() failed");
-		exit(1);
-	    }
-	    else if (n != 0) /* parent */
-		exit(0);
+		if ((n = fork()) == -1) {
+			tst_resm(TFAIL | TERRNO, "fork() failed");
+			exit(1);
+		} else if (n != 0)	/* parent */
+			exit(0);
 	}
 
 	if (unpipe) {
 		if (pipe(fds) == -1) {
-			tst_resm (TFAIL|TERRNO, "pipe() failed to create un-named pipe");
+			tst_resm(TFAIL | TERRNO,
+				 "pipe() failed to create un-named pipe");
 			exit(1);
 		}
 		read_fd = fds[0];
@@ -476,81 +483,84 @@
 		blk_type = UNNAMED_IO;
 	} else {
 		if (strlen(dir) && chdir(dir) == -1) {
-			tst_resm (TFAIL|TERRNO, "chdir(%s) failed", dir);
+			tst_resm(TFAIL | TERRNO, "chdir(%s) failed", dir);
 			exit(1);
 		}
 
 		if (stat(pname, &stbuf) == -1) {
 
-		    if (mkfifo(pname,0777) == -1) {
-			tst_resm (TFAIL|TERRNO, "mkfifo(%s,0777) failed", pname);
-			exit(1);
-		    }
+			if (mkfifo(pname, 0777) == -1) {
+				tst_resm(TFAIL | TERRNO,
+					 "mkfifo(%s,0777) failed", pname);
+				exit(1);
+			}
 		}
 		pipe_type = PIPE_NAMED;
 	}
 
-	start_time=time(0);
+	start_time = time(0);
 
 #if DEBUG
-printf("num_wrters = %d\n", num_wrters);
+	printf("num_wrters = %d\n", num_wrters);
 #endif
 
 #ifdef linux
-		signal(SIGCHLD, sig_child);
-		signal(SIGHUP, sig_handler);
-		signal(SIGINT, sig_handler);
-		signal(SIGQUIT, sig_handler);
+	signal(SIGCHLD, sig_child);
+	signal(SIGHUP, sig_handler);
+	signal(SIGINT, sig_handler);
+	signal(SIGQUIT, sig_handler);
 #ifdef SIGRECOVERY
-		signal(SIGRECOVERY, sig_handler);
+	signal(SIGRECOVERY, sig_handler);
 #endif /* SIGRECOVERY */
 #else
-		sigset(SIGCHLD, sig_child);
-		sigset(SIGHUP, sig_handler);
-		sigset(SIGINT, sig_handler);
-		sigset(SIGQUIT, sig_handler);
+	sigset(SIGCHLD, sig_child);
+	sigset(SIGHUP, sig_handler);
+	sigset(SIGINT, sig_handler);
+	sigset(SIGQUIT, sig_handler);
 #ifdef SIGRECOVERY
-		sigset(SIGRECOVERY, sig_handler);
+	sigset(SIGRECOVERY, sig_handler);
 #endif /* SIGRECOVERY */
 #endif /* linux */
 
-	for (i=num_wrters; i > 0; --i) {
-		if ((c=fork()) < 0) {
-			tst_resm (TFAIL|TERRNO, "fork() failed");
+	for (i = num_wrters; i > 0; --i) {
+		if ((c = fork()) < 0) {
+			tst_resm(TFAIL | TERRNO, "fork() failed");
 			exit(1);
 		}
-		if (c == 0) break;	/* stop child from forking */
+		if (c == 0)
+			break;	/* stop child from forking */
 	}
 	if (c == 0) {	/***** if child *****/
 #if DEBUG
-printf("child after fork pid = %d\n", getpid());
+		printf("child after fork pid = %d\n", getpid());
 #endif
-		if (! unpipe) {
-			if ((write_fd = open(pname,O_WRONLY)) == -1) {
-				tst_resm (TFAIL|TERRNO, "child pipe open(%s, %#o) failed", pname, O_WRONLY|ndelay);
+		if (!unpipe) {
+			if ((write_fd = open(pname, O_WRONLY)) == -1) {
+				tst_resm(TFAIL | TERRNO,
+					 "child pipe open(%s, %#o) failed",
+					 pname, O_WRONLY | ndelay);
 				exit(1);
 			}
-			if (ndelay && fcntl(write_fd, F_SETFL, O_NONBLOCK) == -1) {
-				tst_brkm(TBROK|TERRNO, NULL, "Failed setting the pipe to nonblocking mode");
+			if (ndelay
+			    && fcntl(write_fd, F_SETFL, O_NONBLOCK) == -1) {
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "Failed setting the pipe to nonblocking mode");
 			}
-		}
-		else {
+		} else {
 			close(read_fd);
 		}
 
 		sem_op = (struct sembuf) {
-			.sem_num = 0,
-			.sem_op = 1,
-			.sem_flg = 0
-		};
+		.sem_num = 0,.sem_op = 1,.sem_flg = 0};
 
 		if (semop(sem_id, &sem_op, 1) == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "Couldn't raise the semaphore 0");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "Couldn't raise the semaphore 0");
 
 		pid_word = (int *)&writebuf[0];
 		count_word = (int *)&writebuf[NBPW];
 
-		for (j=0; j < num_writes || loop; ++j) {
+		for (j = 0; j < num_writes || loop; ++j) {
 
 			/* writes are only in one unit when the size of the write
 			 * is <= PIPE_BUF.
@@ -567,27 +577,31 @@
 			*count_word = j;
 			*pid_word = getpid();
 
-                        if ((nb = lio_write_buffer(write_fd, iotype, writebuf, size,
-                                                        SIGUSR1, &cp, 0)) < 0 ) {
-			/*
-			 * If lio_write_buffer returns a negative number,
-			 * the return will be -errno.
-			 */
-				tst_resm (TFAIL, "pass %d: lio_write_buffer(%s) failed; it returned %d: %s", j, cp, nb, strerror(-nb));
+			if ((nb =
+			     lio_write_buffer(write_fd, iotype, writebuf, size,
+					      SIGUSR1, &cp, 0)) < 0) {
+				/*
+				 * If lio_write_buffer returns a negative number,
+				 * the return will be -errno.
+				 */
+				tst_resm(TFAIL,
+					 "pass %d: lio_write_buffer(%s) failed; it returned %d: %s",
+					 j, cp, nb, strerror(-nb));
 				exit(1);
+			} else if (nb != size) {
+				tst_resm(TFAIL,
+					 "pass %d: lio_write_buffer(%s) failed, write count %d, but expected to write %d",
+					 j, cp, nb, size);
 			}
-			else if (nb != size) {
-				tst_resm (TFAIL, "pass %d: lio_write_buffer(%s) failed, write count %d, but expected to write %d",
-				          j, cp, nb, size);
-			}
-		        if (verbose)
-				tst_resm (TINFO, "pass %d: pid %d: wrote %d bytes, expected %d bytes",
-				          j, getpid(), nb, size);
+			if (verbose)
+				tst_resm(TINFO,
+					 "pass %d: pid %d: wrote %d bytes, expected %d bytes",
+					 j, getpid(), nb, size);
 
 			if (chld_wait) {
-                		clock=time(0);
-               			srand48(clock);
-                		n = lrand48() % chld_wait;
+				clock = time(0);
+				srand48(clock);
+				n = lrand48() % chld_wait;
 				usleep(n);
 			}
 			fflush(stderr);
@@ -595,78 +609,79 @@
 
 		/* child waits until parent completes open() */
 		sem_op = (struct sembuf) {
-			.sem_num = 1,
-			.sem_op = -1,
-			.sem_flg = 0
-		};
+		.sem_num = 1,.sem_op = -1,.sem_flg = 0};
 		if (semop(sem_id, &sem_op, 1) == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "Couldn't lower the semaphore 1");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "Couldn't lower the semaphore 1");
 	}
 	if (c > 0) {	/***** if parent *****/
 
-		if (! unpipe) {
-			if ((read_fd = open(pname,O_RDONLY)) == -1) {
-				tst_resm (TFAIL|TERRNO, "parent pipe open(%s, %#o) failed", pname, O_RDONLY);
+		if (!unpipe) {
+			if ((read_fd = open(pname, O_RDONLY)) == -1) {
+				tst_resm(TFAIL | TERRNO,
+					 "parent pipe open(%s, %#o) failed",
+					 pname, O_RDONLY);
 				exit(1);
 			}
 			if (ndelay && fcntl(read_fd, F_SETFL, O_NONBLOCK) == -1) {
-				tst_brkm(TBROK|TERRNO, NULL, "Failed setting the pipe to nonblocking mode");
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "Failed setting the pipe to nonblocking mode");
 			}
-		}
-		else {
+		} else {
 			close(write_fd);
 		}
 
 		/* raise semaphore so children can exit */
 		sem_op = (struct sembuf) {
-			.sem_num = 1,
-			.sem_op = num_wrters,
-			.sem_flg = 0
-		};
+		.sem_num = 1,.sem_op = num_wrters,.sem_flg = 0};
 		if (semop(sem_id, &sem_op, 1) == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "Couldn't raise the semaphore 1");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "Couldn't raise the semaphore 1");
 
 		sem_op = (struct sembuf) {
-			.sem_num = 0,
-			.sem_op = -num_wrters,
-			.sem_flg = 0
-		};
+		.sem_num = 0,.sem_op = -num_wrters,.sem_flg = 0};
 
-		while (Nchildcomplete < num_wrters && semop(sem_id, &sem_op, 1) == -1) {
+		while (Nchildcomplete < num_wrters
+		       && semop(sem_id, &sem_op, 1) == -1) {
 			if (errno == EINTR) {
 				continue;
 			}
-			tst_brkm(TBROK|TERRNO, NULL, "Couldn't wait on semaphore 0");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "Couldn't wait on semaphore 0");
 		}
 
-		for (i=num_wrters*num_writes; i > 0 || loop; --i) {
+		for (i = num_wrters * num_writes; i > 0 || loop; --i) {
 			if (error >= MAX_ERRS || empty_read >= MAX_EMPTY)
-			  break;
+				break;
 			if (parent_wait) {
-                		clock=time(0);
-                		srand48(clock);
-                		n = lrand48() % parent_wait;
+				clock = time(0);
+				srand48(clock);
+				n = lrand48() % parent_wait;
 				usleep(n);
 			}
 			++count;
-			if ((nb = lio_read_buffer(read_fd, iotype, readbuf, size,
-                   					SIGUSR1, &cp, 0)) < 0 ) {
-                        /*
-                         * If lio_read_buffer returns a negative number,
-                         * the return will be -errno.
-                         */
-				tst_resm (TFAIL, "pass %d: lio_read_buffer(%s) failed; it returned %d: %s", i, cp, nb, strerror(-nb));
-			    ++i;
-			    count--;
-			    error++;
-			    continue;
+			if ((nb =
+			     lio_read_buffer(read_fd, iotype, readbuf, size,
+					     SIGUSR1, &cp, 0)) < 0) {
+				/*
+				 * If lio_read_buffer returns a negative number,
+				 * the return will be -errno.
+				 */
+				tst_resm(TFAIL,
+					 "pass %d: lio_read_buffer(%s) failed; it returned %d: %s",
+					 i, cp, nb, strerror(-nb));
+				++i;
+				count--;
+				error++;
+				continue;
 
- 			} else {
+			} else {
 				if (nb == 0) {
 					if (Nchildcomplete >= num_wrters) {
 						if (!loop)
-							tst_resm(TWARN, "The children have died prematurely");
-						break; /* All children have died */
+							tst_resm(TWARN,
+								 "The children have died prematurely");
+						break;	/* All children have died */
 					}
 					empty_read++;
 /*
@@ -679,18 +694,29 @@
 					count--;
 					continue;
 				} else if (nb < size && size <= PIPE_BUF) {
-					tst_resm (TFAIL, "pass %d: partial read from the pipe: read %d bytes, expected %d, read count %d",
-					          i, nb, size, count);
+					tst_resm(TFAIL,
+						 "pass %d: partial read from the pipe: read %d bytes, expected %d, read count %d",
+						 i, nb, size, count);
 					++error;
 				} else if (nb == size) {
-					for (j=2*NBPW;j < size; ++j) {
+					for (j = 2 * NBPW; j < size; ++j) {
 						if (writebuf[j] != readbuf[j]) {
 							++error;
-							tst_resm (TFAIL, "1 FAIL data error on byte %d; rd# %d, sz= %d, %s %s empty_reads= %d, err= %d",
-							          j, count, size, pipe_type, blk_type, empty_read, error);
-							prt_buf(&readbuf,readbuf,format_size,format);
+							tst_resm(TFAIL,
+								 "1 FAIL data error on byte %d; rd# %d, sz= %d, %s %s empty_reads= %d, err= %d",
+								 j, count, size,
+								 pipe_type,
+								 blk_type,
+								 empty_read,
+								 error);
+							prt_buf(&readbuf,
+								readbuf,
+								format_size,
+								format);
 							fflush(stdout);
-							if (exit_error && exit_error == error)
+							if (exit_error
+							    && exit_error ==
+							    error)
 								goto output;
 
 							else
@@ -701,26 +727,30 @@
 				if (verbose || (num_rpt && !(count % num_rpt))) {
 					current_time = time(0);
 					diff_time = current_time - start_time;	/* elapsed time */
-					tst_resm (TFAIL, "(%d) rd# %d, sz= %d, %s %s empty_reads= %d, err= %d\n",
-						(int)diff_time,count,size,pipe_type,blk_type,empty_read,error);
+					tst_resm(TFAIL,
+						 "(%d) rd# %d, sz= %d, %s %s empty_reads= %d, err= %d\n",
+						 (int)diff_time, count, size,
+						 pipe_type, blk_type,
+						 empty_read, error);
 					fflush(stdout);
 				}
 			}
 		}
-    if (empty_read)
-      tst_resm(TWARN, "%d empty reads", empty_read);
+		if (empty_read)
+			tst_resm(TWARN, "%d empty reads", empty_read);
 output:
 		if (error)
-			tst_resm(TFAIL, "1 FAIL %d data errors on pipe, read size = %d, %s %s",
-			         error,size,pipe_type,blk_type);
-		else
-			if (!quiet)
-				tst_resm(TPASS, "1 PASS %d pipe reads complete, read size = %d, %s %s",
-				          count+1,size,pipe_type,blk_type);
+			tst_resm(TFAIL,
+				 "1 FAIL %d data errors on pipe, read size = %d, %s %s",
+				 error, size, pipe_type, blk_type);
+		else if (!quiet)
+			tst_resm(TPASS,
+				 "1 PASS %d pipe reads complete, read size = %d, %s %s",
+				 count + 1, size, pipe_type, blk_type);
 
 		/* wait for all children to finish, timeout after uwait_total
 		   semtimedop might not be available everywhere */
-		for (i=0; i<uwait_total; i+=uwait_iter) {
+		for (i = 0; i < uwait_total; i += uwait_iter) {
 			if (semctl(sem_id, 1, GETVAL) == 0) {
 				break;
 			}
@@ -728,7 +758,8 @@
 		}
 
 		if (i > uwait_total) {
-			tst_resm(TWARN, "Timed out waiting for child processes to exit");
+			tst_resm(TWARN,
+				 "Timed out waiting for child processes to exit");
 		}
 
 		semctl(sem_id, 0, IPC_RMID);
@@ -737,25 +768,25 @@
 			unlink(pname);
 	}
 
- 	SAFE_FREE(writebuf);
+	SAFE_FREE(writebuf);
 	SAFE_FREE(readbuf);
 	return (error);
 }
 
-void
-usage ()
+void usage()
 {
-	fprintf(stderr, "Usage: %s [-BbCEv][-c #writers][-D pname][-d dir][-h][-e exit_num][-f fmt][-l][-i #writes][-n #writes][-p num_rpt]\n\t[-s size][-W max_wait][-w max_wait][-u]\n",TCID);
+	fprintf(stderr,
+		"Usage: %s [-BbCEv][-c #writers][-D pname][-d dir][-h][-e exit_num][-f fmt][-l][-i #writes][-n #writes][-p num_rpt]\n\t[-s size][-W max_wait][-w max_wait][-u]\n",
+		TCID);
 	fflush(stderr);
 
 }
 
-void
-help()
+void help()
 {
-        usage();
+	usage();
 
-    printf("  -B           - execute actions in background\n\
+	printf("  -B           - execute actions in background\n\
   -b           - blocking reads and writes. default non-block\n\
   -c #writers  - number of writers (childern)\n\
   -D pname     - name of fifo (def tpipe<pid>)\n\
@@ -787,138 +818,136 @@
 
 }
 
-void
-prt_buf(long addr, char * buf, int length, int format)
+void prt_buf(long addr, char *buf, int length, int format)
 {
 
 	int i;
-	int num_words = length/NBPW;  /* given length in bytes, get length in words */
+	int num_words = length / NBPW;	/* given length in bytes, get length in words */
 	int width;		/* number of columns */
 	int extra_words = 0;	/* odd or even number of words */
 	char *a = buf;
 	char b[NBPW];
-	char c[NBPW*2];
+	char c[NBPW * 2];
 	char *p;
 	long *word;
 
-	if (format == NO_OUT)		/* if no output wanted, return */
+	if (format == NO_OUT)	/* if no output wanted, return */
 		return;
 
-	if (length % NBPW) ++num_words; /* is length in full words? */
+	if (length % NBPW)
+		++num_words;	/* is length in full words? */
 	if (format == ASCII) {
-	 	width = 3;
+		width = 3;
 	} else {
 		width = 2;
-	    /* do we have an odd number of words? */
-		extra_words = num_words%width;
+		/* do we have an odd number of words? */
+		extra_words = num_words % width;
 	}
-	for (i=0; i < num_words; ++i, a += NBPW, addr++) {
-		word = (long *) a;
-		if (!(i%width)) {
+	for (i = 0; i < num_words; ++i, a += NBPW, addr++) {
+		word = (long *)a;
+		if (!(i % width)) {
 			if (i > 0 && format != ASCII) {
-		   	  /*
-		    	   * print the ascii equivalent of the data
-			   * before beginning the next line of output.
-			   */
-				memset(c,0x00,width*NBPW);
-			   /*
-			    * get the last 2 words printed
-			    */
-				memcpy(c,a-(width*NBPW),width*NBPW);
-				for (p = c; (p-c) < width*NBPW; ++p) {
+				/*
+				 * print the ascii equivalent of the data
+				 * before beginning the next line of output.
+				 */
+				memset(c, 0x00, width * NBPW);
+				/*
+				 * get the last 2 words printed
+				 */
+				memcpy(c, a - (width * NBPW), width * NBPW);
+				for (p = c; (p - c) < width * NBPW; ++p) {
 					if (*p < '!' || *p > '~')
 						*p = '.';
 				}
-				printf("\t%16.16s",c);
+				printf("\t%16.16s", c);
 			}
-			printf("\n%7lo: ",addr);
+			printf("\n%7lo: ", addr);
 			/***printf("\n%7o (%d): ",addr,i);***/
 		}
 
 		switch (format) {
-			case HEX:
-				printf("%16.16lx ",*word);
-				break;
-			case DECIMAL:
-				printf("%10.10ld ",*word);
-				break;
-			case ASCII:
-				memcpy(b,a,NBPW);
-				for (p = b; (p-b) < NBPW; ++p) {
-					if (*p < '!' || *p > '~')
-						*p = '.';
-				}
-				printf("%8.8s ",b);
-				break;
-			default:
-				printf("%22.22lo ",*word);
-				break;
+		case HEX:
+			printf("%16.16lx ", *word);
+			break;
+		case DECIMAL:
+			printf("%10.10ld ", *word);
+			break;
+		case ASCII:
+			memcpy(b, a, NBPW);
+			for (p = b; (p - b) < NBPW; ++p) {
+				if (*p < '!' || *p > '~')
+					*p = '.';
+			}
+			printf("%8.8s ", b);
+			break;
+		default:
+			printf("%22.22lo ", *word);
+			break;
 		}
 	}
 	if (format != ASCII) {
-   	  /*
-    	   * print the ascii equivalent of the last words in the buffer
-	   * before returning.
-	   */
-		memset(c,0x00,width*NBPW);
-		if (extra_words) width = extra_words; /* odd number of words */
-		memcpy(c,a-(width*NBPW),width*NBPW);
-		for (p = c; (p-c) < width*NBPW; ++p) {
+		/*
+		 * print the ascii equivalent of the last words in the buffer
+		 * before returning.
+		 */
+		memset(c, 0x00, width * NBPW);
+		if (extra_words)
+			width = extra_words;	/* odd number of words */
+		memcpy(c, a - (width * NBPW), width * NBPW);
+		for (p = c; (p - c) < width * NBPW; ++p) {
 			if (*p < '!' || *p > '~')
 				*p = '.';
 		}
 		if (width == 2)
-			printf("\t%16.16s",c);
+			printf("\t%16.16s", c);
 		else
-			printf("\t\t%16.8s",c);
+			printf("\t\t%16.8s", c);
 	}
 	printf("\n");
 	fflush(stdout);
 }
 
-void
-prt_examples()
+void prt_examples()
 {
-    printf("%s -c 5 -i 0 -s 4090 -b\n", TCID);
-    printf("%s -c 5 -i 0 -s 4090 -b -u \n", TCID);
-    printf("%s -c 5 -i 0 -s 4090 -b -W 3 -w 3 \n", TCID);
+	printf("%s -c 5 -i 0 -s 4090 -b\n", TCID);
+	printf("%s -c 5 -i 0 -s 4090 -b -u \n", TCID);
+	printf("%s -c 5 -i 0 -s 4090 -b -W 3 -w 3 \n", TCID);
 
 }
 
-void
-sig_child(int sig)
+void sig_child(int sig)
 {
-    int status;
+	int status;
 
-    Nchildcomplete++;
+	Nchildcomplete++;
 #if DEBUG
-printf("parent: received SIGCHLD\n");
+	printf("parent: received SIGCHLD\n");
 #endif
-    waitpid(-1, &status, WNOHANG);
+	waitpid(-1, &status, WNOHANG);
 #if linux
-    signal(SIGCHLD, sig_child);
+	signal(SIGCHLD, sig_child);
 #else
-    sigset(SIGCHLD, sig_child);
+	sigset(SIGCHLD, sig_child);
 #endif
 }
 
-void
-sig_handler(int sig)
+void sig_handler(int sig)
 {
 #ifdef SIGRECOVERY
-    if (sig == SIGRECOVERY) {
-	printf("%s: received SIGRECOVERY, count = %d\n", TCID, count);
-        fflush(stdout);
+	if (sig == SIGRECOVERY) {
+		printf("%s: received SIGRECOVERY, count = %d\n", TCID, count);
+		fflush(stdout);
 #ifdef linux
-	signal(sig, sig_handler);
+		signal(sig, sig_handler);
 #else
-	sigset(sig, sig_handler);
+		sigset(sig, sig_handler);
 #endif
-	return;
-    }
+		return;
+	}
 #endif
-    printf("%s: received unexpected signal: %d\n", TCID, sig);
-    fflush(stdout);
-    exit(3);
+	printf("%s: received unexpected signal: %d\n", TCID, sig);
+	fflush(stdout);
+	exit(3);
 
 }
diff --git a/testcases/kernel/ipc/semaphore/sem01.c b/testcases/kernel/ipc/semaphore/sem01.c
index ccc05a0..d6fb8fb 100644
--- a/testcases/kernel/ipc/semaphore/sem01.c
+++ b/testcases/kernel/ipc/semaphore/sem01.c
@@ -43,123 +43,128 @@
 #include <sys/sem.h>
 
 union semun {
-  int val;
-  struct semid_ds *buf;
-  unsigned short *array;
+	int val;
+	struct semid_ds *buf;
+	unsigned short *array;
 };
 
 int verbose = 0;
 int loops = 100;
 int errors = 0;
 
-int semup(int semid) {
-  struct sembuf semops;
-  semops.sem_num = 0;
-  semops.sem_op = 1;
-  semops.sem_flg = SEM_UNDO;
-  if (semop(semid, &semops, 1) == -1) {
-    perror("semup");
-    errors++;
-    return 1;
-  }
-        return 0;
+int semup(int semid)
+{
+	struct sembuf semops;
+	semops.sem_num = 0;
+	semops.sem_op = 1;
+	semops.sem_flg = SEM_UNDO;
+	if (semop(semid, &semops, 1) == -1) {
+		perror("semup");
+		errors++;
+		return 1;
+	}
+	return 0;
 }
 
-int semdown(int semid) {
-  struct sembuf semops;
-  semops.sem_num = 0;
-  semops.sem_op = -1;
-  semops.sem_flg = SEM_UNDO;
-  if (semop(semid, &semops, 1) == -1) {
-    perror("semdown");
-    errors++;
-    return 1;
-  }
-        return 0;
+int semdown(int semid)
+{
+	struct sembuf semops;
+	semops.sem_num = 0;
+	semops.sem_op = -1;
+	semops.sem_flg = SEM_UNDO;
+	if (semop(semid, &semops, 1) == -1) {
+		perror("semdown");
+		errors++;
+		return 1;
+	}
+	return 0;
 }
 
-void delayloop() {
-  int delay;
-  delay = 1+((100.0*rand())/RAND_MAX);
-  if (verbose)
-    printf("in delay function for %d microseconds\n",delay);
-  usleep(delay);
+void delayloop()
+{
+	int delay;
+	delay = 1 + ((100.0 * rand()) / RAND_MAX);
+	if (verbose)
+		printf("in delay function for %d microseconds\n", delay);
+	usleep(delay);
 }
 
-void mainloop(int semid) {
-  int i;
-  for (i=0;i<loops;i++) {
-    if (semdown(semid)) {
-      printf("semdown failed\n");
-    }
-    if (verbose)
-      printf("sem is down\n");
-    delayloop();
-    if (semup(semid)) {
-      printf("semup failed\n");
-    }
-    if (verbose)
-      printf("sem is up\n");
-  }
+void mainloop(int semid)
+{
+	int i;
+	for (i = 0; i < loops; i++) {
+		if (semdown(semid)) {
+			printf("semdown failed\n");
+		}
+		if (verbose)
+			printf("sem is down\n");
+		delayloop();
+		if (semup(semid)) {
+			printf("semup failed\n");
+		}
+		if (verbose)
+			printf("sem is up\n");
+	}
 }
 
-int main(int argc, char *argv[]) {
-  int semid, opt;
-  union semun semunion;
-  extern char *optarg;
-  pid_t pid;
-  int chstat;
+int main(int argc, char *argv[])
+{
+	int semid, opt;
+	union semun semunion;
+	extern char *optarg;
+	pid_t pid;
+	int chstat;
 
-  while ((opt=getopt(argc, argv, "l:vh")) !=EOF) {
-    switch((char)opt) {
-      case 'l':
-        loops = atoi(optarg);
-        break;
-      case 'v':
-        verbose = 1;
-        break;
-      case 'h':
-      default:
-        printf("Usage: -l loops [-v]\n");
-        exit(1);
-    }
-  }
+	while ((opt = getopt(argc, argv, "l:vh")) != EOF) {
+		switch ((char)opt) {
+		case 'l':
+			loops = atoi(optarg);
+			break;
+		case 'v':
+			verbose = 1;
+			break;
+		case 'h':
+		default:
+			printf("Usage: -l loops [-v]\n");
+			exit(1);
+		}
+	}
 
-  /* set up the semaphore */
-  if ((semid = semget((key_t)9142, 1, 0666 | IPC_CREAT)) < 0) {
-    printf("error in semget()\n");
-    exit(-1);
-  }
-  semunion.val = 1;
-  if (semctl(semid, 0, SETVAL, semunion) == -1) {
-    printf("error in semctl\n");
-  }
+	/* set up the semaphore */
+	if ((semid = semget((key_t) 9142, 1, 0666 | IPC_CREAT)) < 0) {
+		printf("error in semget()\n");
+		exit(-1);
+	}
+	semunion.val = 1;
+	if (semctl(semid, 0, SETVAL, semunion) == -1) {
+		printf("error in semctl\n");
+	}
 
-  if ((pid = fork()) < 0) {
-    printf("fork error\n");
-    exit(-1);
-  }
-  if (pid) {
-    /* parent */
-    srand(pid);
-    mainloop(semid);
-    waitpid(pid, &chstat, 0);
-    if (!WIFEXITED(chstat)) {
-      printf("child exited with status\n");
-      exit(-1);
-    }
-    if (semctl(semid, 0, IPC_RMID, semunion) == -1) {
-      printf("error in semctl\n");
-    }
-    if (errors) {
-      printf("FAIL: there were %d errors\n",errors);
-    } else {
-      printf("PASS: error count is 0\n");
-    }
-    exit(errors);
-  } else {
-    /* child */
-    mainloop(semid);
-  }
-  exit(0);
+	if ((pid = fork()) < 0) {
+		printf("fork error\n");
+		exit(-1);
+	}
+	if (pid) {
+		/* parent */
+		srand(pid);
+		mainloop(semid);
+		waitpid(pid, &chstat, 0);
+		if (!WIFEXITED(chstat)) {
+			printf("child exited with status\n");
+			exit(-1);
+		}
+		if (semctl(semid, 0, IPC_RMID, semunion) == -1) {
+			printf("error in semctl\n");
+		}
+		if (errors) {
+			printf("FAIL: there were %d errors\n", errors);
+		} else {
+			printf("PASS: error count is 0\n");
+		}
+		exit(errors);
+	} else {
+		/* child */
+		mainloop(semid);
+	}
+	exit(0);
 }
diff --git a/testcases/kernel/ipc/semaphore/sem02.c b/testcases/kernel/ipc/semaphore/sem02.c
index c51c0bf..9ab7773 100644
--- a/testcases/kernel/ipc/semaphore/sem02.c
+++ b/testcases/kernel/ipc/semaphore/sem02.c
@@ -58,111 +58,110 @@
 #define NUMTHREADS 2
 
 void *retval[NUMTHREADS];
-void * waiter(void *);
-void * poster(void *);
+void *waiter(void *);
+void *poster(void *);
 void cleanup(void);
 
 char *TCID = "sem02";
 int TST_TOTAL = 1;
 
-struct sembuf Psembuf = {0, -1, SEM_UNDO};
-struct sembuf Vsembuf = {0, 1, SEM_UNDO};
+struct sembuf Psembuf = { 0, -1, SEM_UNDO };
+struct sembuf Vsembuf = { 0, 1, SEM_UNDO };
 
 union semun {
-        int val;                        /* value for SETVAL */
-        struct semid_ds *buf;           /* buffer for IPC_STAT & IPC_SET */
-        unsigned short *array;          /* array for GETALL & SETALL */
-        struct seminfo *ipc_buf;        /* buffer for IPC_INFO */
+	int val;		/* value for SETVAL */
+	struct semid_ds *buf;	/* buffer for IPC_STAT & IPC_SET */
+	unsigned short *array;	/* array for GETALL & SETALL */
+	struct seminfo *ipc_buf;	/* buffer for IPC_INFO */
 };
 
 int sem_id;
-int err_ret;  /* This is used to determine PASS/FAIL status */
+int err_ret;			/* This is used to determine PASS/FAIL status */
 int main(int argc, char **argv)
 {
-    int i, rc;
-    char *msg;
-    union semun semunion;
+	int i, rc;
+	char *msg;
+	union semun semunion;
 
-    pthread_t pt[NUMTHREADS];
-    pthread_attr_t attr;
+	pthread_t pt[NUMTHREADS];
+	pthread_attr_t attr;
 
-    if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL)) != (char *) NULL) {
-	tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-    }
-    /* Create the semaphore set */
-    sem_id = semget(KEY, 1, 0666 | IPC_CREAT);
-    if (sem_id < 0)
-    {
-		 printf ("semget failed, errno = %d\n", errno);
-		 exit (1);
-    }
-    /* initialize data  structure associated to the semaphore */
-    semunion.val = 1;
-    semctl(sem_id, 0, SETVAL, semunion);
+	if ((msg =
+	     parse_opts(argc, argv, (option_t *) NULL, NULL)) != (char *)NULL) {
+		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	}
+	/* Create the semaphore set */
+	sem_id = semget(KEY, 1, 0666 | IPC_CREAT);
+	if (sem_id < 0) {
+		printf("semget failed, errno = %d\n", errno);
+		exit(1);
+	}
+	/* initialize data  structure associated to the semaphore */
+	semunion.val = 1;
+	semctl(sem_id, 0, SETVAL, semunion);
 
-    /* setup the attributes of the thread        */
-    /* set the scope to be system to make sure the threads compete on a  */
-    /* global scale for cpu   */
-    pthread_attr_init(&attr);
-    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
+	/* setup the attributes of the thread        */
+	/* set the scope to be system to make sure the threads compete on a  */
+	/* global scale for cpu   */
+	pthread_attr_init(&attr);
+	pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
 
-    err_ret=1;  /* Set initial error value to 1 */
-    /* Create the threads */
-    for (i=0; i<NUMTHREADS; i++)
-    {
-		 if (i == 0)
-		     rc = pthread_create(&pt[i], &attr, waiter, retval[i]);
-		 else
-		     rc = pthread_create(&pt[i], &attr, poster, retval[i]);
-    }
+	err_ret = 1;		/* Set initial error value to 1 */
+	/* Create the threads */
+	for (i = 0; i < NUMTHREADS; i++) {
+		if (i == 0)
+			rc = pthread_create(&pt[i], &attr, waiter, retval[i]);
+		else
+			rc = pthread_create(&pt[i], &attr, poster, retval[i]);
+	}
 
-    /* Sleep long enough to see that the other threads do what they are supposed to do */
-    sleep(20);
-    semunion.val = 1;
-    semctl(sem_id, 0, IPC_RMID, semunion);
-    if (err_ret == 1)
-	tst_resm(TFAIL, "failed");
-    else
-	tst_resm(TPASS, "passed");
-    cleanup();
+	/* Sleep long enough to see that the other threads do what they are supposed to do */
+	sleep(20);
+	semunion.val = 1;
+	semctl(sem_id, 0, IPC_RMID, semunion);
+	if (err_ret == 1)
+		tst_resm(TFAIL, "failed");
+	else
+		tst_resm(TPASS, "passed");
+	cleanup();
 
-    tst_exit();
+	tst_exit();
 }
 
 /* This thread sleeps 10 seconds then waits on the semaphore.  As long
    as someone has posted on the semaphore, and no undo has taken
    place, the semop should complete and we'll print "Waiter done
    waiting." */
-void * waiter(void * foo)
+void *waiter(void *foo)
 {
-    int pid;
-    pid = getpid();
+	int pid;
+	pid = getpid();
 
-    tst_resm(TINFO, "Waiter, pid = %d", pid);
-    sleep(10);
+	tst_resm(TINFO, "Waiter, pid = %d", pid);
+	sleep(10);
 
-    tst_resm(TINFO, "Waiter waiting, pid = %d", pid);
-    semop(sem_id, &Psembuf, 1);
-    tst_resm(TINFO, "Waiter done waiting");
-    err_ret=0; /* If the message above is displayed, the test is a PASS */
-    pthread_exit(0);
+	tst_resm(TINFO, "Waiter waiting, pid = %d", pid);
+	semop(sem_id, &Psembuf, 1);
+	tst_resm(TINFO, "Waiter done waiting");
+	err_ret = 0;		/* If the message above is displayed, the test is a PASS */
+	pthread_exit(0);
 }
 
 /* This thread immediately posts on the semaphore and then immediately
    exits.  If the *thread* exits, the undo should not happen, and the
    waiter thread which will start waiting on it in 10 seconds, should
    still get it.   */
-void * poster(void * foo)
+void *poster(void *foo)
 {
-    int pid;
+	int pid;
 
-    pid = getpid();
-    tst_resm(TINFO, "Poster, pid = %d, posting", pid);
-    semop(sem_id, &Vsembuf, 1);
-    tst_resm(TINFO, "Poster posted");
-    tst_resm(TINFO, "Poster exiting");
+	pid = getpid();
+	tst_resm(TINFO, "Poster, pid = %d, posting", pid);
+	semop(sem_id, &Vsembuf, 1);
+	tst_resm(TINFO, "Poster posted");
+	tst_resm(TINFO, "Poster exiting");
 
-    pthread_exit(0);
+	pthread_exit(0);
 }
 
 void cleanup(void)
diff --git a/testcases/kernel/lib/numa_helper.c b/testcases/kernel/lib/numa_helper.c
index d273abf..50d9e9a 100644
--- a/testcases/kernel/lib/numa_helper.c
+++ b/testcases/kernel/lib/numa_helper.c
@@ -58,10 +58,9 @@
 }
 
 #if HAVE_NUMA_H
-static void get_nodemask_allnodes(nodemask_t *nodemask,
-	unsigned long max_node)
+static void get_nodemask_allnodes(nodemask_t * nodemask, unsigned long max_node)
 {
-	unsigned long nodemask_size = max_node/8+1;
+	unsigned long nodemask_size = max_node / 8 + 1;
 	int i;
 	char fn[64];
 	struct stat st;
@@ -74,10 +73,10 @@
 	}
 }
 
-static int filter_nodemask_mem(nodemask_t *nodemask, unsigned long max_node)
+static int filter_nodemask_mem(nodemask_t * nodemask, unsigned long max_node)
 {
 #if MPOL_F_MEMS_ALLOWED
-	unsigned long nodemask_size = max_node/8+1;
+	unsigned long nodemask_size = max_node / 8 + 1;
 	memset(nodemask, 0, nodemask_size);
 	/*
 	 * avoid numa_get_mems_allowed(), because of bug in getpol()
@@ -85,7 +84,7 @@
 	 * http://www.spinics.net/lists/linux-numa/msg00849.html
 	 */
 	if (syscall(__NR_get_mempolicy, NULL, nodemask->n,
-		max_node, 0, MPOL_F_MEMS_ALLOWED) < 0)
+		    max_node, 0, MPOL_F_MEMS_ALLOWED) < 0)
 		return -2;
 #else
 	int i;
@@ -110,13 +109,13 @@
 		if (cpumask[j] == '\0')
 			return 0;
 		else if ((cpumask[j] > '0' && cpumask[j] <= '9') ||
-			(cpumask[j] >= 'a' && cpumask[j] <= 'f'))
+			 (cpumask[j] >= 'a' && cpumask[j] <= 'f'))
 			return 1;
 	return 0;
 
 }
 
-static void filter_nodemask_cpu(nodemask_t *nodemask, unsigned long max_node)
+static void filter_nodemask_cpu(nodemask_t * nodemask, unsigned long max_node)
 {
 	char *cpumask = NULL;
 	char fn[64];
@@ -166,14 +165,14 @@
 
 #if HAVE_NUMA_H
 	unsigned long max_node = get_max_node();
-	unsigned long nodemask_size = max_node/8+1;
+	unsigned long nodemask_size = max_node / 8 + 1;
 
 	nodemask = malloc(nodemask_size);
 	if (nodes)
-		*nodes = malloc(sizeof(int)*max_node);
+		*nodes = malloc(sizeof(int) * max_node);
 
 	do {
-		if (nodemask == NULL ||	(nodes && (*nodes == NULL))) {
+		if (nodemask == NULL || (nodes && (*nodes == NULL))) {
 			ret = -1;
 			break;
 		}
@@ -188,7 +187,7 @@
 		if ((flag & NH_CPUS) == NH_CPUS)
 			filter_nodemask_cpu(nodemask, max_node);
 
-		for (i = 0; i <	max_node; i++) {
+		for (i = 0; i < max_node; i++) {
 			if (nodemask_isset(nodemask, i)) {
 				if (nodes)
 					(*nodes)[*num_nodes] = i;
diff --git a/testcases/kernel/mem/cpuset/cpuset01.c b/testcases/kernel/mem/cpuset/cpuset01.c
index 2be6953..b473e45 100644
--- a/testcases/kernel/mem/cpuset/cpuset01.c
+++ b/testcases/kernel/mem/cpuset/cpuset01.c
@@ -65,8 +65,8 @@
 
 static void testcpuset(void);
 static void sighandler(int signo LTP_ATTRIBUTE_UNUSED);
-static int  mem_hog(void);
-static int  mem_hog_cpuset(int ntasks);
+static int mem_hog(void);
+static int mem_hog_cpuset(int ntasks);
 static long count_cpu(void);
 
 int main(int argc, char *argv[])
@@ -78,8 +78,8 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	ncpus = count_cpu();
-	if (get_allowed_nodes_arr(NH_MEMS|NH_CPUS, &nnodes, &nodes) < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes_arr");
+	if (get_allowed_nodes_arr(NH_MEMS | NH_CPUS, &nnodes, &nodes) < 0)
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes_arr");
 	if (nnodes <= 1)
 		tst_brkm(TCONF, NULL, "requires a NUMA system.");
 
@@ -105,12 +105,12 @@
 
 	switch (child = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		for (i = 0; i < nnodes; i++)
 			nmask += 1 << nodes[i];
 		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy");
+			tst_brkm(TBROK | TERRNO, cleanup, "set_mempolicy");
 		exit(mem_hog_cpuset(ncpus > 1 ? ncpus : 1));
 	}
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -122,7 +122,7 @@
 	}
 
 	if (waitpid(child, &status, WUNTRACED | WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (WEXITSTATUS(status) != 0)
 		tst_resm(TFAIL, "child exit status is %d", WEXITSTATUS(status));
 }
@@ -161,10 +161,10 @@
 	pagesize = getpagesize();
 	while (!end) {
 		addr = mmap(NULL, pagesize * 10, PROT_READ | PROT_WRITE,
-			MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+			    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 		if (addr == MAP_FAILED) {
 			ret = 1;
-			tst_resm(TFAIL|TERRNO, "mmap");
+			tst_resm(TFAIL | TERRNO, "mmap");
 			break;
 		}
 		memset(addr, 0xF7, pagesize * 10);
@@ -180,21 +180,21 @@
 	pid_t *pids;
 
 	if (ntasks <= 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "ntasks is small.");
+		tst_brkm(TBROK | TERRNO, cleanup, "ntasks is small.");
 	sa.sa_handler = sighandler;
 	if (sigemptyset(&sa.sa_mask) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "sigemptyset");
+		tst_brkm(TBROK | TERRNO, cleanup, "sigemptyset");
 	sa.sa_flags = 0;
 	if (sigaction(SIGUSR1, &sa, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "sigaction");
+		tst_brkm(TBROK | TERRNO, cleanup, "sigaction");
 
 	pids = malloc(sizeof(pid_t) * ntasks);
 	if (pids == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc");
 	for (i = 0; i < ntasks; i++) {
 		switch (pids[i] = fork()) {
 		case -1:
-			tst_resm(TFAIL|TERRNO, "fork %d", pids[i]);
+			tst_resm(TFAIL | TERRNO, "fork %d", pids[i]);
 			ret = 1;
 			break;
 		case 0:
@@ -204,11 +204,10 @@
 			break;
 		}
 	}
-	for (lc = 0; TEST_LOOPING(lc); lc++)
-		;
+	for (lc = 0; TEST_LOOPING(lc); lc++) ;
 	while (i--) {
 		if (kill(pids[i], SIGUSR1) == -1) {
-			tst_resm(TFAIL|TERRNO, "kill %d", pids[i]);
+			tst_resm(TFAIL | TERRNO, "kill %d", pids[i]);
 			ret = 1;
 		}
 	}
@@ -216,12 +215,12 @@
 		if (WIFEXITED(status)) {
 			if (WEXITSTATUS(status) != 0) {
 				tst_resm(TFAIL, "child exit status is %d",
-						WEXITSTATUS(status));
+					 WEXITSTATUS(status));
 				ret = 1;
 			}
 		} else if (WIFSIGNALED(status)) {
 			tst_resm(TFAIL, "child caught signal %d",
-					WTERMSIG(status));
+				 WTERMSIG(status));
 			ret = 1;
 		}
 	}
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
index b84262a..d7db0ec 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
@@ -89,9 +89,9 @@
 	int sflag = 0;
 
 	option_t options[] = {
-		{ "H:", &Hflag, &Hopt },
-		{ "s:", &sflag, &nr_opt },
-		{ NULL, NULL, NULL }
+		{"H:", &Hflag, &Hopt},
+		{"s:", &sflag, &nr_opt},
+		{NULL, NULL, NULL}
 	};
 
 	msg = parse_opts(ac, av, options, &help);
@@ -112,7 +112,7 @@
 		/* Creat a temporary file used for mapping */
 		fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666);
 		if (fildes < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup, "open %s failed",
+			tst_brkm(TFAIL | TERRNO, cleanup, "open %s failed",
 				 TEMPFILE);
 
 		Tst_count = 0;
@@ -126,7 +126,8 @@
 		addr = mmap(NULL, page_sz, PROT_READ | PROT_WRITE,
 			    MAP_SHARED, fildes, 0);
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap() Failed on %s", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap() Failed on %s",
+				 TEMPFILE);
 			close(fildes);
 			continue;
 		} else {
@@ -150,7 +151,7 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0)
-			tst_brkm(TFAIL|TERRNO, NULL, "munmap failed");
+			tst_brkm(TFAIL | TERRNO, NULL, "munmap failed");
 
 		close(fildes);
 	}
@@ -164,13 +165,11 @@
 	TEST_PAUSE;
 	tst_require_root(NULL);
 	if (mount("none", Hopt, "hugetlbfs", 0, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, NULL,
-			 "mount failed on %s", Hopt);
+		tst_brkm(TBROK | TERRNO, NULL, "mount failed on %s", Hopt);
 
 	orig_hugepages = get_sys_tune("nr_hugepages");
 	set_sys_tune("nr_hugepages", hugepages, 1);
-	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d",
-		 Hopt, getpid());
+	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", Hopt, getpid());
 }
 
 void cleanup(void)
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
index 5e40b7e..209c63d 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
@@ -86,9 +86,9 @@
 	int sflag = 0;
 
 	option_t options[] = {
-		{ "H:", &Hflag, &Hopt },
-		{ "s:", &sflag, &nr_opt },
-		{ NULL, NULL, NULL }
+		{"H:", &Hflag, &Hopt},
+		{"s:", &sflag, &nr_opt},
+		{NULL, NULL, NULL}
 	};
 
 	msg = parse_opts(ac, av, options, &help);
@@ -110,15 +110,15 @@
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		/* Creat a temporary file used for huge mapping */
-		fildes = open(TEMPFILE, O_RDWR|O_CREAT, 0666);
+		fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666);
 		if (fildes < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "opening %s failed", TEMPFILE);
 
 		/* Creat a file used for normal mapping */
 		nfildes = open("/dev/zero", O_RDONLY, 0666);
 		if (nfildes < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "opening /dev/zero failed");
 
 		Tst_count = 0;
@@ -127,7 +127,7 @@
 		 * Call mmap on /dev/zero 5 times
 		 */
 		for (i = 0; i < 5; i++) {
-			addr = mmap(0, 256*1024*1024, PROT_READ,
+			addr = mmap(0, 256 * 1024 * 1024, PROT_READ,
 				    MAP_SHARED, nfildes, 0);
 			addrlist[i] = addr;
 		}
@@ -136,15 +136,15 @@
 		addr = mmap(LOW_ADDR, page_sz, PROT_READ,
 			    MAP_SHARED | MAP_FIXED, nfildes, 0);
 		if (addr == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "mmap failed on nfildes");
 
 		/* Attempt to mmap a huge page into a low memory address */
 		addr2 = mmap(LOW_ADDR2, map_sz, PROT_READ | PROT_WRITE,
 			     MAP_SHARED, fildes, 0);
-#if __WORDSIZE == 64 /* 64-bit process */
+#if __WORDSIZE == 64		/* 64-bit process */
 		if (addr2 == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "huge mmap failed unexpectedly"
+			tst_resm(TFAIL | TERRNO, "huge mmap failed unexpectedly"
 				 " with %s (64-bit)", TEMPFILE);
 			close(fildes);
 			continue;
@@ -153,7 +153,7 @@
 		}
 #else /* 32-bit process */
 		if (addr2 == MAP_FAILED)
-			tst_resm(TFAIL|TERRNO, "huge mmap failed unexpectedly"
+			tst_resm(TFAIL | TERRNO, "huge mmap failed unexpectedly"
 				 " with %s (32-bit)", TEMPFILE);
 		else if (addr2 > 0) {
 			tst_resm(TCONF,
@@ -166,17 +166,17 @@
 
 		/* Clean up things in case we are looping */
 		for (i = 0; i < 5; i++) {
-			if (munmap(addrlist[i], 256*1024*1024) == -1)
-				tst_resm(TBROK|TERRNO,
+			if (munmap(addrlist[i], 256 * 1024 * 1024) == -1)
+				tst_resm(TBROK | TERRNO,
 					 "munmap of addrlist[%d] failed", i);
 		}
 
 #if __WORDSIZE == 64
 		if (munmap(addr2, map_sz) == -1)
-			tst_brkm(TFAIL|TERRNO, NULL, "huge munmap failed");
+			tst_brkm(TFAIL | TERRNO, NULL, "huge munmap failed");
 #endif
 		if (munmap(addr, page_sz) == -1)
-			tst_brkm(TFAIL|TERRNO, NULL, "munmap failed");
+			tst_brkm(TFAIL | TERRNO, NULL, "munmap failed");
 
 		close(fildes);
 	}
@@ -190,12 +190,10 @@
 	TEST_PAUSE;
 	tst_require_root(NULL);
 	if (mount("none", Hopt, "hugetlbfs", 0, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, NULL,
-			 "mount failed on %s", Hopt);
+		tst_brkm(TBROK | TERRNO, NULL, "mount failed on %s", Hopt);
 	orig_hugepages = get_sys_tune("nr_hugepages");
 	set_sys_tune("nr_hugepages", hugepages, 1);
-	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d",
-		 Hopt, getpid());
+	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", Hopt, getpid());
 }
 
 void cleanup(void)
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
index 062cdb9..0168f96 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
@@ -53,18 +53,18 @@
 #define HIGH_ADDR	(void *)(0x1000000000000)
 
 static unsigned long *addr;
-static int  fildes;
+static int fildes;
 static long hugepages = 128;
 static long orig_hugepages;
 static long map_sz;
 static char TEMPFILE[MAXPATHLEN];
 
 static char *Hopt, *nr_opt;
-static int  Hflag, sflag;
+static int Hflag, sflag;
 static option_t options[] = {
-	{ "H:",	&Hflag,	&Hopt },
-	{ "s:",	&sflag,	&nr_opt },
-	{ NULL,	NULL,	NULL }
+	{"H:", &Hflag, &Hopt},
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 static void help(void);
@@ -96,7 +96,7 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666);
 		if (fildes < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "open %s", TEMPFILE);
+			tst_brkm(TBROK | TERRNO, cleanup, "open %s", TEMPFILE);
 
 		Tst_count = 0;
 
@@ -105,16 +105,16 @@
 			    MAP_SHARED | MAP_FIXED, fildes, 0);
 		if (addr != MAP_FAILED) {
 			tst_resm(TFAIL, "mmap into high region "
-					"succeeded unexpectedly");
+				 "succeeded unexpectedly");
 			goto fail;
 		}
 		if (errno != ENOMEM)
-			tst_resm(TFAIL|TERRNO, "mmap into high region "
-					"failed unexpectedly - expect "
-					"errno=ENOMEM, got");
+			tst_resm(TFAIL | TERRNO, "mmap into high region "
+				 "failed unexpectedly - expect "
+				 "errno=ENOMEM, got");
 		else
-			tst_resm(TPASS|TERRNO, "mmap into high region "
-					"failed as expected");
+			tst_resm(TPASS | TERRNO, "mmap into high region "
+				 "failed as expected");
 fail:
 		close(fildes);
 	}
@@ -127,14 +127,12 @@
 	tst_require_root(NULL);
 
 	if (mount("none", Hopt, "hugetlbfs", 0, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, NULL,
-			 "mount failed on %s", Hopt);
+		tst_brkm(TBROK | TERRNO, NULL, "mount failed on %s", Hopt);
 
 	orig_hugepages = get_sys_tune("nr_hugepages");
 	set_sys_tune("nr_hugepages", hugepages, 1);
 
-	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d",
-		 Hopt, getpid());
+	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", Hopt, getpid());
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
index 3e1e005..4727c6f 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
@@ -92,9 +92,9 @@
 	int huge_pagesize = 0;
 
 	option_t options[] = {
-		{ "H:", &Hflag, &Hopt },
-		{ "s:", &sflag, &nr_opt },
-		{ NULL, NULL, NULL }
+		{"H:", &Hflag, &Hopt},
+		{"s:", &sflag, &nr_opt},
+		{NULL, NULL, NULL}
 	};
 
 	msg = parse_opts(ac, av, options, &help);
@@ -115,7 +115,7 @@
 		/* Creat a temporary file used for huge mapping */
 		fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666);
 		if (fildes < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup, "open %s failed",
+			tst_brkm(TFAIL | TERRNO, cleanup, "open %s failed",
 				 TEMPFILE);
 
 		Tst_count = 0;
@@ -136,18 +136,19 @@
 		if (freepages > 128)
 			freepages = 128;
 #endif
-		mapsize = (long long)freepages * huge_pagesize * 1024;
+		mapsize = (long long)freepages *huge_pagesize * 1024;
 		addr = mmap(NULL, mapsize, PROT_READ | PROT_WRITE,
 			    MAP_SHARED, fildes, 0);
 		sleep(2);
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap() Failed on %s", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap() Failed on %s",
+				 TEMPFILE);
 			close(fildes);
 			continue;
 		} else {
 			tst_resm(TPASS,
-				"Succeeded mapping file using %ld pages",
-				freepages);
+				 "Succeeded mapping file using %ld pages",
+				 freepages);
 			/* force to allocate page and change HugePages_Free */
 			*(int *)addr = 0;
 		}
@@ -166,7 +167,7 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, mapsize) != 0)
-			tst_brkm(TFAIL|TERRNO, NULL, "munmap failed");
+			tst_brkm(TFAIL | TERRNO, NULL, "munmap failed");
 
 		close(fildes);
 	}
@@ -180,12 +181,10 @@
 	TEST_PAUSE;
 	tst_require_root(NULL);
 	if (mount("none", Hopt, "hugetlbfs", 0, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, NULL,
-			 "mount failed on %s", Hopt);
+		tst_brkm(TBROK | TERRNO, NULL, "mount failed on %s", Hopt);
 	orig_hugepages = get_sys_tune("nr_hugepages");
 	set_sys_tune("nr_hugepages", hugepages, 1);
-	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d",
-		 Hopt, getpid());
+	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", Hopt, getpid());
 }
 
 void cleanup(void)
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
index d0b8b50..743801e 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
@@ -86,17 +86,18 @@
 static char buf[BUFSIZ], line[BUFSIZ], path[BUFSIZ], pathover[BUFSIZ];
 static char shmmax[BUFSIZ];
 static char *opt_allocstr;
-static int hugepagesize; /* in Bytes */
+static int hugepagesize;	/* in Bytes */
 static int opt_sysfs, opt_alloc;
 static int shmid = -1;
 static int restore_shmmax;
 static size_t size = 128, length = 384;
 static option_t options[] = {
-	{ "s", &opt_sysfs,	NULL},
-	{ "m", &shmid,		NULL},
-	{ "a:", &opt_alloc,	&opt_allocstr},
-	{ NULL, NULL,		NULL}
+	{"s", &opt_sysfs, NULL},
+	{"m", &shmid, NULL},
+	{"a:", &opt_alloc, &opt_allocstr},
+	{NULL, NULL, NULL}
 };
+
 static void setup(void);
 static void cleanup(void);
 static void overcommit(void);
@@ -104,7 +105,7 @@
 static void read_bytes(void *addr);
 static int lookup(char *line, char *pattern);
 static void usage(void);
-static int checkproc(FILE *fp, char *string, int value);
+static int checkproc(FILE * fp, char *string, int value);
 static int checksys(char *path, char *pattern, int value);
 static void init_hugepagesize(void);
 static void init_sys_sz_paths(void);
@@ -121,15 +122,12 @@
 	if (msg != NULL)
 		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
 	if (opt_sysfs) {
-		strncpy(path, path_sys_sz_huge,
-			strlen(path_sys_sz_huge) + 1);
+		strncpy(path, path_sys_sz_huge, strlen(path_sys_sz_huge) + 1);
 		strncpy(pathover, path_sys_sz_over,
 			strlen(path_sys_sz_over) + 1);
 	} else {
-		strncpy(path, PATH_PROC_HUGE,
-			strlen(PATH_PROC_HUGE) + 1);
-		strncpy(pathover, PATH_PROC_OVER,
-			strlen(PATH_PROC_OVER) + 1);
+		strncpy(path, PATH_PROC_HUGE, strlen(PATH_PROC_HUGE) + 1);
+		strncpy(pathover, PATH_PROC_OVER, strlen(PATH_PROC_OVER) + 1);
 	}
 	if (opt_alloc) {
 		size = atoi(opt_allocstr);
@@ -155,43 +153,42 @@
 		/* Use /proc/meminfo to generate an IPC key. */
 		key = ftok(PATH_MEMINFO, strlen(PATH_MEMINFO));
 		if (key == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "ftok");
+			tst_brkm(TBROK | TERRNO, cleanup, "ftok");
 		shmid = shmget(key, (long)(length / 2 * hugepagesize),
-			SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W);
+			       SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W);
 		if (shmid == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+			tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 	} else {
 		/* XXX (garrcoop): memory leak. */
 		snprintf(s, BUFSIZ, "%s/hugemmap05/file", get_tst_tmpdir());
 		fd = open(s, O_CREAT | O_RDWR, 0755);
 		if (fd == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "open");
+			tst_brkm(TBROK | TERRNO, cleanup, "open");
 		addr = mmap(ADDR, (long)(length / 2 * hugepagesize), PROTECTION,
-				FLAGS, fd, 0);
+			    FLAGS, fd, 0);
 		if (addr == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 	}
 
 	if (opt_sysfs) {
 		tst_resm(TINFO, "check sysfs before allocation.");
 		if (checksys(path_sys_sz_huge, "HugePages_Total",
-				length / 2) != 0)
+			     length / 2) != 0)
 			return;
 		if (checksys(path_sys_sz_free, "HugePages_Free",
-				length / 2) != 0)
+			     length / 2) != 0)
 			return;
 		if (checksys(path_sys_sz_surp, "HugePages_Surp",
-				length / 2 - size) != 0)
+			     length / 2 - size) != 0)
 			return;
 		if (checksys(path_sys_sz_resv, "HugePages_Rsvd",
-				length / 2) != 0)
+			     length / 2) != 0)
 			return;
 	} else {
-		tst_resm(TINFO,
-			"check /proc/meminfo before allocation.");
+		tst_resm(TINFO, "check /proc/meminfo before allocation.");
 		fp = fopen(PATH_MEMINFO, "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+			tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 		if (checkproc(fp, "HugePages_Total", length / 2) != 0)
 			return;
 		if (checkproc(fp, "HugePages_Free", length / 2) != 0)
@@ -206,7 +203,7 @@
 		tst_resm(TINFO, "shmid: 0x%x", shmid);
 		shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS);
 		if (shmaddr == (void *)-1)
-			tst_brkm(TBROK|TERRNO, cleanup, "shmat");
+			tst_brkm(TBROK | TERRNO, cleanup, "shmat");
 		write_bytes(shmaddr);
 		read_bytes(shmaddr);
 	} else {
@@ -216,22 +213,22 @@
 	if (opt_sysfs) {
 		tst_resm(TINFO, "check sysfs.");
 		if (checksys(path_sys_sz_huge, "HugePages_Total",
-				length / 2) != 0)
+			     length / 2) != 0)
 			return;
 		if (checksys(path_sys_sz_free, "HugePages_Free", 0)
-			!= 0)
+		    != 0)
 			return;
 		if (checksys(path_sys_sz_surp, "HugePages_Surp",
-				length / 2 - size) != 0)
+			     length / 2 - size) != 0)
 			return;
 		if (checksys(path_sys_sz_resv, "HugePages_Rsvd", 0)
-			!= 0)
+		    != 0)
 			return;
 	} else {
 		tst_resm(TINFO, "check /proc/meminfo.");
 		fp = fopen(PATH_MEMINFO, "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+			tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 		if (checkproc(fp, "HugePages_Total", length / 2) != 0)
 			return;
 		if (checkproc(fp, "HugePages_Free", 0) != 0)
@@ -244,7 +241,7 @@
 	}
 	if (shmid != -1) {
 		if (shmdt(shmaddr) != 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "shmdt");
+			tst_brkm(TBROK | TERRNO, cleanup, "shmdt");
 	} else {
 		munmap(addr, (long)(length / 2 * hugepagesize));
 		close(fd);
@@ -259,34 +256,34 @@
 	if (restore_shmmax) {
 		fd = open(PATH_SHMMAX, O_WRONLY);
 		if (fd == -1)
-			tst_resm(TWARN|TERRNO, "open");
+			tst_resm(TWARN | TERRNO, "open");
 		if (write(fd, shmmax, strlen(shmmax)) != strlen(shmmax))
-			tst_resm(TWARN|TERRNO, "write");
+			tst_resm(TWARN | TERRNO, "write");
 		close(fd);
 	}
 	fd = open(path, O_WRONLY);
 	if (fd == -1)
-		tst_resm(TWARN|TERRNO, "open");
+		tst_resm(TWARN | TERRNO, "open");
 	tst_resm(TINFO, "restore nr_hugepages to %s.", nr_hugepages);
 	if (write(fd, nr_hugepages,
-			strlen(nr_hugepages)) != strlen(nr_hugepages))
-		tst_resm(TWARN|TERRNO, "write");
+		  strlen(nr_hugepages)) != strlen(nr_hugepages))
+		tst_resm(TWARN | TERRNO, "write");
 	close(fd);
 
 	fd = open(pathover, O_WRONLY);
 	if (fd == -1)
-		tst_resm(TWARN|TERRNO, "open");
+		tst_resm(TWARN | TERRNO, "open");
 	tst_resm(TINFO, "restore nr_overcommit_hugepages to %s.",
-		nr_overcommit_hugepages);
+		 nr_overcommit_hugepages);
 	if (write(fd, nr_overcommit_hugepages, strlen(nr_overcommit_hugepages))
-		!= strlen(nr_overcommit_hugepages))
-		tst_resm(TWARN|TERRNO, "write");
+	    != strlen(nr_overcommit_hugepages))
+		tst_resm(TWARN | TERRNO, "write");
 	close(fd);
 
 	/* XXX (garrcoop): memory leak. */
 	snprintf(buf, BUFSIZ, "%s/hugemmap05", get_tst_tmpdir());
 	if (umount(buf) == -1)
-		tst_resm(TWARN|TERRNO, "umount");
+		tst_resm(TWARN | TERRNO, "umount");
 	if (shmid != -1) {
 		tst_resm(TINFO, "shmdt cleaning");
 		shmctl(shmid, IPC_RMID, NULL);
@@ -306,7 +303,8 @@
 	if (stat(pathover, &stat_buf) == -1) {
 		if (errno == ENOENT || errno == ENOTDIR)
 			tst_brkm(TCONF, NULL,
-			    "file %s does not exist in the system", pathover);
+				 "file %s does not exist in the system",
+				 pathover);
 	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -316,28 +314,28 @@
 	if (shmid != -1) {
 		fp = fopen(PATH_SHMMAX, "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+			tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 		if (fgets(shmmax, BUFSIZ, fp) == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "fgets");
+			tst_brkm(TBROK | TERRNO, cleanup, "fgets");
 		fclose(fp);
 
 		if (atol(shmmax) < (long)(length / 2 * hugepagesize)) {
 			restore_shmmax = 1;
 			fd = open(PATH_SHMMAX, O_RDWR);
 			if (fd == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "open");
+				tst_brkm(TBROK | TERRNO, cleanup, "open");
 			snprintf(buf, BUFSIZ, "%ld",
 				 (long)(length / 2 * hugepagesize));
 			if (write(fd, buf, strlen(buf)) != strlen(buf))
-				tst_brkm(TBROK|TERRNO, cleanup,
-					"failed to change shmmax.");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "failed to change shmmax.");
 		}
 	}
 	fp = fopen(path, "r+");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 	if (fgets(nr_hugepages, BUFSIZ, fp) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fgets");
+		tst_brkm(TBROK | TERRNO, cleanup, "fgets");
 	fclose(fp);
 	/* Remove trailing newline. */
 	nr_hugepages[strlen(nr_hugepages) - 1] = '\0';
@@ -345,48 +343,48 @@
 
 	fd = open(path, O_RDWR);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 	/* Reset. */
 	if (write(fd, "0", 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write");
+		tst_brkm(TBROK | TERRNO, cleanup, "write");
 	if (lseek(fd, 0, SEEK_SET) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek");
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek");
 	snprintf(buf, BUFSIZ, "%zd", size);
 	if (write(fd, buf, strlen(buf)) != strlen(buf))
-		tst_brkm(TBROK|TERRNO, cleanup,
-			"failed to change nr_hugepages.");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "failed to change nr_hugepages.");
 	close(fd);
 
 	fp = fopen(pathover, "r+");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 	if (fgets(nr_overcommit_hugepages, BUFSIZ, fp) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fgets");
+		tst_brkm(TBROK | TERRNO, cleanup, "fgets");
 	fclose(fp);
 	nr_overcommit_hugepages[strlen(nr_overcommit_hugepages) - 1] = '\0';
 	tst_resm(TINFO, "original nr_overcommit_hugepages is %s",
-		nr_overcommit_hugepages);
+		 nr_overcommit_hugepages);
 
 	fd = open(pathover, O_RDWR);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 	/* Reset. */
 	if (write(fd, "0", 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write");
+		tst_brkm(TBROK | TERRNO, cleanup, "write");
 	if (lseek(fd, 0, SEEK_SET) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek");
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek");
 	snprintf(buf, BUFSIZ, "%zd", size);
 	if (write(fd, buf, strlen(buf)) != strlen(buf))
-		tst_brkm(TBROK|TERRNO, cleanup,
-			"failed to change nr_hugepages.");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "failed to change nr_hugepages.");
 	close(fd);
 
 	/* XXX (garrcoop): memory leak. */
 	snprintf(buf, BUFSIZ, "%s/hugemmap05", get_tst_tmpdir());
 	if (mkdir(buf, 0700) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir");
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir");
 	if (mount(NULL, buf, "hugetlbfs", 0, NULL) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mount");
+		tst_brkm(TBROK | TERRNO, cleanup, "mount");
 }
 
 static void write_bytes(void *addr)
@@ -439,20 +437,20 @@
 
 	fp = fopen(path, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 	if (fgets(buf, BUFSIZ, fp) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fgets");
+		tst_brkm(TBROK | TERRNO, cleanup, "fgets");
 	tst_resm(TINFO, "%s is %d.", string, atoi(buf));
 	if (atoi(buf) != value) {
 		tst_resm(TFAIL, "%s is not %d but %d.", string, value,
-			atoi(buf));
+			 atoi(buf));
 		return 1;
 	}
 	fclose(fp);
 	return 0;
 }
 
-static int checkproc(FILE *fp, char *pattern, int value)
+static int checkproc(FILE * fp, char *pattern, int value)
 {
 	memset(buf, -1, BUFSIZ);
 	rewind(fp);
@@ -463,7 +461,7 @@
 	tst_resm(TINFO, "%s is %d.", pattern, atoi(buf));
 	if (atoi(buf) != value) {
 		tst_resm(TFAIL, "%s is not %d but %d.", pattern, value,
-			atoi(buf));
+			 atoi(buf));
 		return 1;
 	}
 	return 0;
@@ -494,15 +492,10 @@
 static void init_sys_sz_paths(void)
 {
 	sprintf(path_sys_sz, "/sys/kernel/mm/hugepages/hugepages-%dkB",
-			hugepagesize / 1024);
-	sprintf(path_sys_sz_over, "%s/nr_overcommit_hugepages",
-			path_sys_sz);
-	sprintf(path_sys_sz_free, "%s/free_hugepages",
-			path_sys_sz);
-	sprintf(path_sys_sz_resv, "%s/resv_hugepages",
-			path_sys_sz);
-	sprintf(path_sys_sz_surp, "%s/surplus_hugepages",
-			path_sys_sz);
-	sprintf(path_sys_sz_huge, "%s/nr_hugepages",
-			path_sys_sz);
+		hugepagesize / 1024);
+	sprintf(path_sys_sz_over, "%s/nr_overcommit_hugepages", path_sys_sz);
+	sprintf(path_sys_sz_free, "%s/free_hugepages", path_sys_sz);
+	sprintf(path_sys_sz_resv, "%s/resv_hugepages", path_sys_sz);
+	sprintf(path_sys_sz_surp, "%s/surplus_hugepages", path_sys_sz);
+	sprintf(path_sys_sz_huge, "%s/nr_hugepages", path_sys_sz);
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
index f308a4e..3d8eee0 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
@@ -63,35 +63,36 @@
 char *TCID = "hugeshmat01";
 int TST_TOTAL = 3;
 
-#define CASE0		10		/* values to write into the shared */
-#define CASE1		20		/* memory location.		   */
+#define CASE0		10	/* values to write into the shared */
+#define CASE1		20	/* memory location.                */
 
 static size_t shm_size;
-static int    shm_id_1 = -1;
-static void   *addr;
+static int shm_id_1 = -1;
+static void *addr;
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
-	int  *shmid;
+	int *shmid;
 	void *addr;
-	int  flags;
+	int flags;
 } TC[] = {
 	/* a straight forward read/write attach */
-	{ &shm_id_1,	0,		0 },
-
-	/*
-	 * an attach using non aligned memory
-	 * -1 will be replaced with an unaligned addr
-	 */
-	{ &shm_id_1,	(void *)-1,	SHM_RND },
-
-	/* a read only attach */
-	{ &shm_id_1,	0,		SHM_RDONLY }
+	{
+	&shm_id_1, 0, 0},
+	    /*
+	     * an attach using non aligned memory
+	     * -1 will be replaced with an unaligned addr
+	     */
+	{
+	&shm_id_1, (void *)-1, SHM_RND},
+	    /* a read only attach */
+	{
+	&shm_id_1, 0, SHM_RDONLY}
 };
 
 static void check_functionality(int i);
@@ -115,7 +116,7 @@
 		for (i = 0; i < TST_TOTAL; i++) {
 			addr = shmat(*(TC[i].shmid), TC[i].addr, TC[i].flags);
 			if (addr == (void *)-1) {
-				tst_brkm(TFAIL|TERRNO, cleanup, "shmat");
+				tst_brkm(TFAIL | TERRNO, cleanup, "shmat");
 			} else {
 				if (STD_FUNCTIONAL_TEST)
 					check_functionality(i);
@@ -129,9 +130,10 @@
 			 */
 			if (i == 0 && addr != (void *)-1)
 				TC[1].addr = (void *)(((unsigned long)addr &
-					     ~(SHMLBA-1)) + SHMLBA - 1);
+						       ~(SHMLBA - 1)) + SHMLBA -
+						      1);
 			if (shmdt(addr) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "shmdt");
+				tst_brkm(TBROK | TERRNO, cleanup, "shmdt");
 		}
 	}
 	cleanup();
@@ -152,7 +154,7 @@
 
 	/* stat the shared memory ID */
 	if (shmctl(shm_id_1, IPC_STAT, &buf) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmctl");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmctl");
 
 	/* check the number of attaches */
 	if (buf.shm_nattch != 1) {
@@ -188,7 +190,7 @@
 		orig_add = addr + ((unsigned long)TC[i].addr % SHMLBA);
 		if (orig_add != TC[i].addr) {
 			tst_resm(TFAIL, "shared memory address is not "
-					"correct");
+				 "correct");
 			return;
 		}
 		break;
@@ -223,9 +225,9 @@
 	update_shm_size(&shm_size);
 	shmkey = getipckey();
 	shm_id_1 = shmget(shmkey++, shm_size,
-		    SHM_HUGETLB|SHM_RW|IPC_CREAT|IPC_EXCL);
+			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
index 8e6f784..f5a41b9 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c
@@ -65,27 +65,27 @@
 #endif
 
 static size_t shm_size;
-static int    shm_id_1 = -1;
-static int    shm_id_2 = -1;
-static void   *addr;
+static int shm_id_1 = -1;
+static int shm_id_2 = -1;
+static void *addr;
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
-	int  *shmid;
+	int *shmid;
 	void *addr;
-	int  error;
+	int error;
 } TC[] = {
 	/* EINVAL - the shared memory ID is not valid */
-	{ &shm_id_1,	NULL,		EINVAL },
-
-	/* EINVAL - the address is not page aligned and SHM_RND is not given */
-	{ &shm_id_2,	(void *)NADDR,	EINVAL },
-};
+	{
+	&shm_id_1, NULL, EINVAL},
+	    /* EINVAL - the address is not page aligned and SHM_RND is not given */
+	{
+&shm_id_2, (void *)NADDR, EINVAL},};
 
 int main(int ac, char **av)
 {
@@ -110,12 +110,12 @@
 				continue;
 			}
 			if (errno == TC[i].error)
-				tst_resm(TPASS|TERRNO, "shmat failed as "
-					    "expected");
+				tst_resm(TPASS | TERRNO, "shmat failed as "
+					 "expected");
 			else
-				tst_resm(TFAIL|TERRNO, "shmat failed "
-					    "unexpectedly - expect errno=%d, "
-					    "got", TC[i].error);
+				tst_resm(TFAIL | TERRNO, "shmat failed "
+					 "unexpectedly - expect errno=%d, "
+					 "got", TC[i].error);
 		}
 	}
 	cleanup();
@@ -141,9 +141,9 @@
 	/* create a shared memory resource with read and write permissions */
 	/* also post increment the shmkey for the next shmget call */
 	shm_id_2 = shmget(shmkey++, shm_size,
-		    SHM_HUGETLB|SHM_RW|IPC_CREAT|IPC_EXCL);
+			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
 	if (shm_id_2 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
index f9e0955..2477ebf 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c
@@ -65,15 +65,15 @@
 int TST_TOTAL = 1;
 
 static size_t shm_size;
-static int    shm_id_1 = -1;
-static void   *addr;
-static uid_t  ltp_uid;
-static char   *ltp_user = "nobody";
+static int shm_id_1 = -1;
+static void *addr;
+static uid_t ltp_uid;
+static char *ltp_user = "nobody";
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 static void do_child(void);
@@ -95,15 +95,15 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		if (setuid(ltp_uid) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "setuid");
+			tst_brkm(TBROK | TERRNO, cleanup, "setuid");
 		do_child();
 		tst_exit();
 	default:
 		if (waitpid(pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	}
 	cleanup();
 	tst_exit();
@@ -122,10 +122,10 @@
 			continue;
 		}
 		if (errno == EACCES)
-			tst_resm(TPASS|TERRNO, "shmat failed as expected");
+			tst_resm(TPASS | TERRNO, "shmat failed as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "shmat failed unexpectedly "
-				    "- expect errno=EACCES, got");
+			tst_resm(TFAIL | TERRNO, "shmat failed unexpectedly "
+				 "- expect errno=EACCES, got");
 	}
 }
 
@@ -145,9 +145,9 @@
 	update_shm_size(&shm_size);
 	shmkey = getipckey();
 	shm_id_1 = shmget(shmkey, shm_size,
-		    SHM_HUGETLB|SHM_RW|IPC_CREAT|IPC_EXCL);
+			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 
 	ltp_uid = getuserid(ltp_user);
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
index c37d731..a4cf337 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c
@@ -92,19 +92,20 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
-	int  cmd;
-	void (*func_test)(void);
-	void (*func_setup)(void);
+	int cmd;
+	void (*func_test) (void);
+	void (*func_setup) (void);
 } TC[] = {
-	{ IPC_STAT,	func_stat,	stat_setup },
-	{ IPC_STAT,	func_stat,	stat_setup },
-	{ IPC_SET,	func_set,	set_setup },
-	{ IPC_RMID,	func_rmid,	NULL }
+	{
+	IPC_STAT, func_stat, stat_setup}, {
+	IPC_STAT, func_stat, stat_setup}, {
+	IPC_SET, func_set, set_setup}, {
+	IPC_RMID, func_rmid, NULL}
 };
 
 int main(int ac, char **av)
@@ -132,9 +133,9 @@
 		 * so that looping (-i) will work correctly.
 		 */
 		shm_id_1 = shmget(shmkey, shm_size,
-			    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+				  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 		if (shm_id_1 == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "shmget #main");
+			tst_brkm(TBROK | TERRNO, cleanup, "shmget #main");
 
 		for (i = 0; i < TST_TOTAL; i++) {
 			/*
@@ -142,14 +143,14 @@
 			 * calling the appropriate setup function
 			 */
 			if (TC[i].func_setup != NULL)
-				(*TC[i].func_setup)();
+				(*TC[i].func_setup) ();
 
 			if (shmctl(shm_id_1, TC[i].cmd, &buf) == -1) {
-				tst_resm(TFAIL|TERRNO, "shmctl #main");
+				tst_resm(TFAIL | TERRNO, "shmctl #main");
 				continue;
 			}
 			if (STD_FUNCTIONAL_TEST) {
-				(*TC[i].func_test)();
+				(*TC[i].func_test) ();
 			} else {
 				tst_resm(TPASS, "shmctl call succeeded");
 
@@ -180,7 +181,7 @@
 
 	rval = shmat(shm_id_1, 0, 0);
 	if (rval == (void *)-1)
-		tst_brkm(TBROK|TERRNO, cleanup, "set shmat");
+		tst_brkm(TBROK | TERRNO, cleanup, "set shmat");
 
 	return rval;
 }
@@ -224,12 +225,12 @@
 	sigemptyset(&newmask);
 	sigaddset(&newmask, SIGUSR1);
 	if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "block SIGUSR1 error");
+		tst_brkm(TBROK | TERRNO, cleanup, "block SIGUSR1 error");
 
 	for (i = 0; i < N_ATTACH; i++) {
 		switch (pid = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			test = (stat_time == FIRST) ? set_shmat() : set_shared;
 
@@ -243,20 +244,20 @@
 			 */
 			rval = sigsuspend(&oldmask);
 			if (rval != -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "sigsuspend");
+				tst_brkm(TBROK | TERRNO, cleanup, "sigsuspend");
 
 			/*
 			 * don't have to block SIGUSR1 any more,
 			 * recover the mask
 			 */
 			if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "child sigprocmask");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "child sigprocmask");
 
 			/* now we're back - detach the memory and exit */
 			if (shmdt(test) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "shmdt in stat_setup()");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "shmdt in stat_setup()");
 			exit(0);
 		default:
 			/* save the child's pid for cleanup later */
@@ -333,12 +334,12 @@
 	/* wake up the childern so they can detach the memory and exit */
 	for (i = 0; i < N_ATTACH; i++)
 		if (kill(pid_arr[i], SIGUSR1) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill with SIGUSR1");
+			tst_brkm(TBROK | TERRNO, cleanup, "kill with SIGUSR1");
 
 	/* remove the parent's shared memory the second time through */
 	if (stat_time == SECOND)
 		if (shmdt(set_shared) == -1)
-			tst_resm(TBROK|TERRNO, "shmdt in stat_cleanup()");
+			tst_resm(TBROK | TERRNO, "shmdt in stat_cleanup()");
 	stat_time++;
 }
 
@@ -361,12 +362,11 @@
 {
 	/* first stat the shared memory to get the new data */
 	if (shmctl(shm_id_1, IPC_STAT, &buf) == -1) {
-		tst_resm(TBROK|TERRNO, "shmctl in func_set()");
+		tst_resm(TBROK | TERRNO, "shmctl in func_set()");
 		return;
 	}
 
-	if ((buf.shm_perm.mode & MODE_MASK) !=
-			((SHM_RW | NEWMODE) & MODE_MASK)) {
+	if ((buf.shm_perm.mode & MODE_MASK) != ((SHM_RW | NEWMODE) & MODE_MASK)) {
 		tst_resm(TFAIL, "new mode is incorrect");
 		return;
 	}
@@ -387,13 +387,13 @@
 	/* Do another shmctl() - we should get EINVAL */
 	if (shmctl(shm_id_1, IPC_STAT, &buf) != -1)
 		tst_brkm(TBROK, cleanup, "shmctl in func_rmid() "
-			    "succeeded unexpectedly");
+			 "succeeded unexpectedly");
 	if (errno != EINVAL)
-		tst_resm(TFAIL|TERRNO, "shmctl in func_rmid() failed "
-			    "unexpectedly - expect errno=EINVAL, got");
+		tst_resm(TFAIL | TERRNO, "shmctl in func_rmid() failed "
+			 "unexpectedly - expect errno=EINVAL, got");
 	else
 		tst_resm(TPASS, "shmctl in func_rmid() failed as expected, "
-			    "shared memory appears to be removed");
+			 "shared memory appears to be removed");
 	shm_id_1 = -1;
 }
 
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
index 3fed3ab..1fd3f15 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c
@@ -68,8 +68,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
@@ -79,17 +79,17 @@
 	int error;
 } TC[] = {
 	/* EFAULT - IPC_SET & buf isn't valid */
-	{ &shm_id_2,	IPC_SET,	(struct shmid_ds *)-1,	EFAULT },
-
-	/* EFAULT - IPC_STAT & buf isn't valid */
-	{ &shm_id_2,	IPC_STAT,	(struct shmid_ds *)-1,	EFAULT },
-
-	/* EINVAL - the shmid is not valid */
-	{ &shm_id_3,	IPC_STAT,	&buf,			EINVAL },
-
-	/* EINVAL - the command is not valid */
-	{ &shm_id_2,	-1,		&buf,			EINVAL },
-};
+	{
+	&shm_id_2, IPC_SET, (struct shmid_ds *)-1, EFAULT},
+	    /* EFAULT - IPC_STAT & buf isn't valid */
+	{
+	&shm_id_2, IPC_STAT, (struct shmid_ds *)-1, EFAULT},
+	    /* EINVAL - the shmid is not valid */
+	{
+	&shm_id_3, IPC_STAT, &buf, EINVAL},
+	    /* EINVAL - the command is not valid */
+	{
+&shm_id_2, -1, &buf, EINVAL},};
 
 int main(int ac, char **av)
 {
@@ -111,16 +111,16 @@
 			TEST(shmctl(*(TC[i].shmid), TC[i].cmd, TC[i].sbuf));
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "shmctl succeeded "
-						"unexpectedly");
+					 "unexpectedly");
 				continue;
 			}
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO, "shmctl failed "
-					    "as expected");
+				tst_resm(TPASS | TTERRNO, "shmctl failed "
+					 "as expected");
 			else
-				tst_resm(TFAIL|TTERRNO, "shmctl failed "
-					    "unexpectedly - expect errno = "
-					    "%d, got", TC[i].error);
+				tst_resm(TFAIL | TTERRNO, "shmctl failed "
+					 "unexpectedly - expect errno = "
+					 "%d, got", TC[i].error);
 		}
 	}
 	cleanup();
@@ -144,15 +144,15 @@
 	shmkey = getipckey();
 
 	/* create a shared memory segment without read or write permissions */
-	shm_id_1 = shmget(shmkey, shm_size, SHM_HUGETLB|IPC_CREAT|IPC_EXCL);
+	shm_id_1 = shmget(shmkey, shm_size, SHM_HUGETLB | IPC_CREAT | IPC_EXCL);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget #1");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget #1");
 
 	/* create a shared memory segment with read and write permissions */
 	shm_id_2 = shmget(shmkey + 1, shm_size,
-		    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+			  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 	if (shm_id_2 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget #2");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget #2");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
index 6e137be..3cd6308 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c
@@ -75,8 +75,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
@@ -86,14 +86,14 @@
 	int error;
 } TC[] = {
 	/* EACCES - child has no read permission for segment */
-	{ &shm_id_1,	IPC_STAT,	&buf,	EACCES },
-
-	/* EPERM - IPC_SET - child doesn't have permission to change segment */
-	{ &shm_id_1,	IPC_SET,	&buf,	EPERM },
-
-	/* EPERM - IPC_RMID - child can not remove the segment */
-	{ &shm_id_1,	IPC_RMID,	&buf,	EPERM },
-};
+	{
+	&shm_id_1, IPC_STAT, &buf, EACCES},
+	    /* EPERM - IPC_SET - child doesn't have permission to change segment */
+	{
+	&shm_id_1, IPC_SET, &buf, EPERM},
+	    /* EPERM - IPC_RMID - child can not remove the segment */
+	{
+&shm_id_1, IPC_RMID, &buf, EPERM},};
 
 static void do_child(void);
 
@@ -113,16 +113,16 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		/* set  the user ID of the child to the non root user */
 		if (setuid(ltp_uid) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "setuid");
+			tst_brkm(TBROK | TERRNO, cleanup, "setuid");
 		do_child();
 		tst_exit();
 	default:
 		if (waitpid(pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	}
 	cleanup();
 	tst_exit();
@@ -139,16 +139,16 @@
 			TEST(shmctl(*(TC[i].shmid), TC[i].cmd, TC[i].sbuf));
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "shmctl succeeded "
-						"unexpectedly");
+					 "unexpectedly");
 				continue;
 			}
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO, "shmctl failed "
-					    "as expected");
+				tst_resm(TPASS | TTERRNO, "shmctl failed "
+					 "as expected");
 			else
-				tst_resm(TFAIL|TTERRNO, "shmctl failed "
-					    "unexpectedly - expect errno = "
-					    "%d, got", TC[i].error);
+				tst_resm(TFAIL | TTERRNO, "shmctl failed "
+					 "unexpectedly - expect errno = "
+					 "%d, got", TC[i].error);
 		}
 	}
 }
@@ -169,9 +169,9 @@
 	update_shm_size(&shm_size);
 	shmkey = getipckey();
 	shm_id_1 = shmget(shmkey, shm_size,
-		    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+			  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 
 	/* get the userid for a non root user */
 	ltp_uid = getuserid(ltp_user);
diff --git a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
index 2a860b5..cba8fbf 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c
@@ -74,8 +74,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 static void check_functionality(void);
@@ -98,7 +98,7 @@
 		Tst_count = 0;
 
 		if (shmdt(shared) == -1) {
-			tst_resm(TFAIL|TERRNO, "shmdt");
+			tst_resm(TFAIL | TERRNO, "shmdt");
 		} else {
 			if (STD_FUNCTIONAL_TEST)
 				check_functionality();
@@ -109,7 +109,7 @@
 		/* reattach the shared memory segment in case we are looping */
 		shared = shmat(shm_id_1, 0, 0);
 		if (shared == (void *)-1)
-			tst_brkm(TBROK|TERRNO, cleanup, "shmat #2: reattach");
+			tst_brkm(TBROK | TERRNO, cleanup, "shmat #2: reattach");
 
 		/* also reset pass */
 		pass = 0;
@@ -122,7 +122,7 @@
 {
 	/* stat the shared memory segment */
 	if (shmctl(shm_id_1, IPC_STAT, &buf) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmctl");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmctl");
 
 	if (buf.shm_nattch != 0) {
 		tst_resm(TFAIL, "# of attaches is incorrect");
@@ -150,7 +150,7 @@
 		tst_resm(TPASS, "huge shared memory detached correctly");
 	else
 		tst_resm(TFAIL, "huge shared memory was not detached "
-				"correctly");
+			 "correctly");
 }
 
 static void sighandler(int sig)
@@ -161,8 +161,7 @@
 		pass = 1;
 		siglongjmp(env, 1);
 	} else {
-		tst_brkm(TBROK, cleanup, "unexpected signal received: %d",
-			    sig);
+		tst_brkm(TBROK, cleanup, "unexpected signal received: %d", sig);
 	}
 }
 
@@ -184,14 +183,14 @@
 
 	/* create a shared memory resource with read and write permissions */
 	shm_id_1 = shmget(shmkey, shm_size,
-		    SHM_HUGETLB|SHM_RW|IPC_CREAT|IPC_EXCL);
+			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget");
 
 	/* attach the shared memory segment */
 	shared = shmat(shm_id_1, 0, 0);
 	if (shared == (void *)-1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmat #1");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmat #1");
 
 	/* give a value to the shared memory integer */
 	*shared = 4;
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
index 2821ec3..6f6f53e 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
@@ -70,8 +70,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 int main(int ac, char **av)
@@ -92,27 +92,27 @@
 		Tst_count = 0;
 
 		shm_id_1 = shmget(shmkey, shm_size,
-			    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+				  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 		if (shm_id_1 == -1) {
-			tst_resm(TFAIL|TERRNO, "shmget");
+			tst_resm(TFAIL | TERRNO, "shmget");
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 				/* do a STAT and check some info */
 				if (shmctl(shm_id_1, IPC_STAT, &buf) == -1) {
-					tst_resm(TBROK|TERRNO,
-						    "shmctl(IPC_STAT)");
+					tst_resm(TBROK | TERRNO,
+						 "shmctl(IPC_STAT)");
 					continue;
 				}
 				/* check the seqment size */
 				if (buf.shm_segsz != shm_size) {
 					tst_resm(TFAIL, "seqment size is not "
-							"correct");
+						 "correct");
 					continue;
 				}
 				/* check the pid of the creator */
 				if (buf.shm_cpid != getpid()) {
 					tst_resm(TFAIL, "creator pid is not "
-							"correct");
+						 "correct");
 					continue;
 				}
 				/*
@@ -120,9 +120,9 @@
 				 * mask out all but the lower 9 bits
 				 */
 				if ((buf.shm_perm.mode & MODE_MASK) !=
-					    ((SHM_RW) & MODE_MASK)) {
+				    ((SHM_RW) & MODE_MASK)) {
 					tst_resm(TFAIL, "segment mode is not "
-							"correct");
+						 "correct");
 					continue;
 				}
 				/* if we get here, everything looks good */
@@ -136,7 +136,7 @@
 		 * clean up things in case we are looping
 		 */
 		if (shmctl(shm_id_1, IPC_RMID, NULL) == -1)
-			tst_resm(TBROK|TERRNO, "shmctl(IPC_RMID)");
+			tst_resm(TBROK | TERRNO, "shmctl(IPC_RMID)");
 		else
 			shm_id_1 = -1;
 	}
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
index 1d3fca8..1193e80 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
@@ -65,8 +65,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 struct test_case_t {
@@ -76,14 +76,18 @@
 	int error;
 } TC[] = {
 	/* EINVAL - size is 0 */
-	{ &shmkey2,  0, SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW,	EINVAL },
-	/* EINVAL - size is larger than created segment */
-	{ &shmkey,   2, SHM_HUGETLB|SHM_RW,			EINVAL },
-	/* EEXIST - the segment exists and IPC_CREAT | IPC_EXCL is given */
-	{ &shmkey,   1, SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW,	EEXIST },
-	/* ENOENT - no segment exists for the key and IPC_CREAT is not given */
-	/* use shm_nonexistend_key (-1) as the key */
-	{ &shm_nonexistent_key, 1, SHM_HUGETLB|SHM_RW,		ENOENT }
+	{
+	&shmkey2, 0, SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW, EINVAL},
+	    /* EINVAL - size is larger than created segment */
+	{
+	&shmkey, 2, SHM_HUGETLB | SHM_RW, EINVAL},
+	    /* EEXIST - the segment exists and IPC_CREAT | IPC_EXCL is given */
+	{
+	&shmkey, 1, SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW, EEXIST},
+	    /* ENOENT - no segment exists for the key and IPC_CREAT is not given */
+	    /* use shm_nonexistend_key (-1) as the key */
+	{
+	&shm_nonexistent_key, 1, SHM_HUGETLB | SHM_RW, ENOENT}
 };
 
 int main(int ac, char **av)
@@ -111,20 +115,20 @@
 					shmctl(shm_id_2, IPC_RMID, NULL);
 			}
 
-			TEST(shmget(*(TC[i].skey), TC[i].size_coe*shm_size,
+			TEST(shmget(*(TC[i].skey), TC[i].size_coe * shm_size,
 				    TC[i].flags));
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "shmget succeeded "
-						"unexpectedly");
+					 "unexpectedly");
 				continue;
 			}
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO, "shmget failed "
-					    "as expected");
+				tst_resm(TPASS | TTERRNO, "shmget failed "
+					 "as expected");
 			else
-				tst_resm(TFAIL|TTERRNO, "shmget failed "
-					    "unexpectedly - expect errno=%d, "
-					    "got", TC[i].error);
+				tst_resm(TFAIL | TTERRNO, "shmget failed "
+					 "unexpectedly - expect errno=%d, "
+					 "got", TC[i].error);
 		}
 	}
 	cleanup();
@@ -148,9 +152,9 @@
 
 	shmkey = getipckey();
 	shmkey2 = shmkey + 1;
-	shm_id_1 = shmget(shmkey, shm_size, IPC_CREAT|IPC_EXCL|SHM_RW);
+	shm_id_1 = shmget(shmkey, shm_size, IPC_CREAT | IPC_EXCL | SHM_RW);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget #setup");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget #setup");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
index 9e9b01e..62adc26 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
@@ -74,8 +74,8 @@
 static long hugepages = 128;
 static long orig_shmmni;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 int main(int ac, char **av)
@@ -95,16 +95,16 @@
 		Tst_count = 0;
 
 		TEST(shmget(IPC_PRIVATE, shm_size,
-			    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW));
+			    SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW));
 		if (TEST_RETURN != -1) {
 			tst_resm(TFAIL, "shmget succeeded unexpectedly");
 			continue;
 		}
 		if (TEST_ERRNO == ENOSPC)
-			tst_resm(TPASS|TTERRNO, "shmget failed as expected");
+			tst_resm(TPASS | TTERRNO, "shmget failed as expected");
 		else
-			tst_resm(TFAIL|TTERRNO, "shmget failed unexpectedly "
-				    "- expect errno=ENOSPC, got");
+			tst_resm(TFAIL | TTERRNO, "shmget failed unexpectedly "
+				 "- expect errno=ENOSPC, got");
 	}
 	cleanup();
 	tst_exit();
@@ -136,19 +136,19 @@
 	 */
 	num_shms = 0;
 	shm_id_1 = shmget(IPC_PRIVATE, shm_size,
-			SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+			  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 	while (shm_id_1 != -1) {
 		shm_id_arr[num_shms++] = shm_id_1;
 		if (num_shms == MAXIDS)
 			tst_brkm(TBROK, cleanup, "The maximum number of "
-				    "shared memory ID's has been reached. "
-				    "Please increase the MAXIDS value in "
-				    "the test.");
+				 "shared memory ID's has been reached. "
+				 "Please increase the MAXIDS value in "
+				 "the test.");
 		shm_id_1 = shmget(IPC_PRIVATE, shm_size,
-			    SHM_HUGETLB|IPC_CREAT|IPC_EXCL|SHM_RW);
+				  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
 	}
 	if (errno != ENOSPC)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget #setup");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget #setup");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
index b49b504..2f8d859 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
@@ -74,8 +74,8 @@
 
 static long hugepages = 128;
 static option_t options[] = {
-	{ "s:",	&sflag,	&nr_opt	},
-	{ NULL,	NULL,	NULL	}
+	{"s:", &sflag, &nr_opt},
+	{NULL, NULL, NULL}
 };
 
 static void do_child(void);
@@ -96,17 +96,17 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		/* set the user ID of the child to the non root user */
 		if (setuid(ltp_uid) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "setuid");
+			tst_brkm(TBROK | TERRNO, cleanup, "setuid");
 		do_child();
 		tst_exit();
 	default:
 		/* wait for the child to return */
 		if (waitpid(pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	}
 	cleanup();
 	tst_exit();
@@ -119,16 +119,16 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		TEST(shmget(shmkey, shm_size, SHM_HUGETLB|SHM_RW));
+		TEST(shmget(shmkey, shm_size, SHM_HUGETLB | SHM_RW));
 		if (TEST_RETURN != -1) {
 			tst_resm(TFAIL, "shmget succeeded unexpectedly");
 			continue;
 		}
 		if (TEST_ERRNO == EACCES)
-			tst_resm(TPASS|TTERRNO, "shmget failed as expected");
+			tst_resm(TPASS | TTERRNO, "shmget failed as expected");
 		else
-			tst_resm(TFAIL|TTERRNO, "shmget failed unexpectedly "
-				    "- expect errno=EACCES, got");
+			tst_resm(TFAIL | TTERRNO, "shmget failed unexpectedly "
+				 "- expect errno=EACCES, got");
 	}
 }
 
@@ -148,9 +148,9 @@
 	update_shm_size(&shm_size);
 	shmkey = getipckey();
 	shm_id_1 = shmget(shmkey, shm_size,
-		    SHM_HUGETLB|SHM_RW|IPC_CREAT|IPC_EXCL);
+			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
 	if (shm_id_1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "shmget #setup");
+		tst_brkm(TBROK | TERRNO, cleanup, "shmget #setup");
 
 	/* get the userid for a non-root user */
 	ltp_uid = getuserid(ltp_user);
diff --git a/testcases/kernel/mem/hugetlb/lib/libipc.c b/testcases/kernel/mem/hugetlb/lib/libipc.c
index ed9b2c7..1569af7 100644
--- a/testcases/kernel/mem/hugetlb/lib/libipc.c
+++ b/testcases/kernel/mem/hugetlb/lib/libipc.c
@@ -54,7 +54,7 @@
 
 	curdir = getcwd(curdir, size);
 	if (curdir == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getcwd(curdir)");
+		tst_brkm(TBROK | TERRNO, cleanup, "getcwd(curdir)");
 
 	/*
 	 * Get a Sys V IPC key
@@ -71,9 +71,9 @@
 	ftime(&time_info);
 	srandom((unsigned int)time_info.millitm);
 
-	ipc_key = ftok(curdir, ascii_a + random()%26);
+	ipc_key = ftok(curdir, ascii_a + random() % 26);
 	if (ipc_key == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "ftok");
+		tst_brkm(TBROK | TERRNO, cleanup, "ftok");
 
 	return ipc_key;
 }
@@ -87,11 +87,11 @@
 
 	ent = (struct passwd *)malloc(sizeof(struct passwd));
 	if (ent == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc ent");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc ent");
 
 	ent = getpwnam(user);
 	if (ent == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam");
+		tst_brkm(TBROK | TERRNO, cleanup, "getpwnam");
 
 	return ent->pw_uid;
 }
diff --git a/testcases/kernel/mem/ksm/ksm01.c b/testcases/kernel/mem/ksm/ksm01.c
index 795d5d8..bbb9747 100644
--- a/testcases/kernel/mem/ksm/ksm01.c
+++ b/testcases/kernel/mem/ksm/ksm01.c
@@ -74,10 +74,10 @@
 int TST_TOTAL = 1;
 
 option_t ksm_options[] = {
-	{ "n:", &opt_num,       &opt_numstr},
-	{ "s:", &opt_size,      &opt_sizestr},
-	{ "u:", &opt_unit,      &opt_unitstr},
-	{ NULL, NULL,           NULL}
+	{"n:", &opt_num, &opt_numstr},
+	{"s:", &opt_size, &opt_sizestr},
+	{"u:", &opt_unit, &opt_unitstr},
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char *argv[])
diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
index 5546309..be9ff96 100644
--- a/testcases/kernel/mem/ksm/ksm02.c
+++ b/testcases/kernel/mem/ksm/ksm02.c
@@ -76,10 +76,10 @@
 #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
 	&& HAVE_MPOL_CONSTANTS
 option_t ksm_options[] = {
-	{ "n:", &opt_num,       &opt_numstr},
-	{ "s:", &opt_size,      &opt_sizestr},
-	{ "u:", &opt_unit,      &opt_unitstr},
-	{ NULL, NULL,           NULL}
+	{"n:", &opt_num, &opt_numstr},
+	{"s:", &opt_size, &opt_sizestr},
+	{"u:", &opt_unit, &opt_unitstr},
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char *argv[])
@@ -94,7 +94,7 @@
 	if (msg != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	node  = get_a_numa_node(tst_exit);
+	node = get_a_numa_node(tst_exit);
 	nmask = 1 << node;
 
 	setup();
@@ -105,12 +105,12 @@
 
 		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) {
 			if (errno != ENOSYS)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "set_mempolicy");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "set_mempolicy");
 			else
 				tst_brkm(TCONF, cleanup,
-					    "set_mempolicy syscall is not "
-					    "implemented on your system.");
+					 "set_mempolicy syscall is not "
+					 "implemented on your system.");
 		}
 		create_same_memory(size, num, unit);
 
diff --git a/testcases/kernel/mem/ksm/ksm03.c b/testcases/kernel/mem/ksm/ksm03.c
index 6984a9a..07b7c4b 100644
--- a/testcases/kernel/mem/ksm/ksm03.c
+++ b/testcases/kernel/mem/ksm/ksm03.c
@@ -74,10 +74,10 @@
 int TST_TOTAL = 1;
 
 option_t ksm_options[] = {
-	{ "n:", &opt_num,       &opt_numstr},
-	{ "s:", &opt_size,      &opt_sizestr},
-	{ "u:", &opt_unit,      &opt_unitstr},
-	{ NULL, NULL,           NULL}
+	{"n:", &opt_num, &opt_numstr},
+	{"s:", &opt_size, &opt_sizestr},
+	{"u:", &opt_unit, &opt_unitstr},
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char *argv[])
diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
index 6ecf3d0..e4aa417 100644
--- a/testcases/kernel/mem/ksm/ksm04.c
+++ b/testcases/kernel/mem/ksm/ksm04.c
@@ -76,10 +76,10 @@
 #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
 	&& HAVE_MPOL_CONSTANTS
 option_t ksm_options[] = {
-	{ "n:", &opt_num,       &opt_numstr},
-	{ "s:", &opt_size,      &opt_sizestr},
-	{ "u:", &opt_unit,      &opt_unitstr},
-	{ NULL, NULL,           NULL}
+	{"n:", &opt_num, &opt_numstr},
+	{"s:", &opt_size, &opt_sizestr},
+	{"u:", &opt_unit, &opt_unitstr},
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char *argv[])
@@ -94,7 +94,7 @@
 	if (msg != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	node  = get_a_numa_node(tst_exit);
+	node = get_a_numa_node(tst_exit);
 	nmask = 1 << node;
 
 	setup();
@@ -107,12 +107,12 @@
 
 		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) {
 			if (errno != ENOSYS)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "set_mempolicy");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "set_mempolicy");
 			else
 				tst_brkm(TCONF, cleanup,
-					    "set_mempolicy syscall is not "
-					    "implemented on your system.");
+					 "set_mempolicy syscall is not "
+					 "implemented on your system.");
 		}
 		create_same_memory(size, num, unit);
 
diff --git a/testcases/kernel/mem/ksm/ksm05.c b/testcases/kernel/mem/ksm/ksm05.c
index 4173a60..ccb0621 100644
--- a/testcases/kernel/mem/ksm/ksm05.c
+++ b/testcases/kernel/mem/ksm/ksm05.c
@@ -98,23 +98,23 @@
 
 		switch (pid = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			if (posix_memalign(&ptr, ps, ps) < 0)
-				tst_brkm(TBROK|TERRNO, cleanup,
-						"posix_memalign");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "posix_memalign");
 			if (madvise(ptr, ps, MADV_MERGEABLE) < 0)
-				tst_brkm(TBROK|TERRNO, cleanup, "madvise");
-			*(char *)NULL = 0; /* SIGSEGV occurs as expected. */
+				tst_brkm(TBROK | TERRNO, cleanup, "madvise");
+			*(char *)NULL = 0;	/* SIGSEGV occurs as expected. */
 			exit(0);
 		default:
 			break;
 		}
-		if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_brkm(TBROK, cleanup,
-					"invalid signal received: %d", status);
+				 "invalid signal received: %d", status);
 	}
 
 	tst_resm(TPASS, "still alive.");
@@ -135,9 +135,9 @@
 	sprintf(buf, "%d", val);
 	fd = open(PATH_KSM "run", O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 	if (write(fd, buf, 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write");
+		tst_brkm(TBROK | TERRNO, cleanup, "write");
 	close(fd);
 }
 
@@ -157,9 +157,9 @@
 	/* save original /sys/kernel/mm/ksm/run value */
 	fd = open(PATH_KSM "run", O_RDONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 	if (read(fd, buf, 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "read");
+		tst_brkm(TBROK | TERRNO, cleanup, "read");
 	close(fd);
 	ksm_run_orig = atoi(buf);
 
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index 2077003..f095fe1 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -31,20 +31,19 @@
 	void *s;
 
 	tst_resm(TINFO, "allocating %ld bytes.", length);
-	s = mmap(NULL, length, PROT_READ|PROT_WRITE,
-		MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+	s = mmap(NULL, length, PROT_READ | PROT_WRITE,
+		 MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 	if (s == MAP_FAILED) {
 		if (testcase == OVERCOMMIT && errno == ENOMEM)
 			return 1;
 		else
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 	}
 	if (testcase == MLOCK && mlock(s, length) == -1)
-		tst_brkm(TINFO|TERRNO, cleanup, "mlock");
+		tst_brkm(TINFO | TERRNO, cleanup, "mlock");
 #ifdef HAVE_MADV_MERGEABLE
-	if (testcase == KSM
-		&& madvise(s, length, MADV_MERGEABLE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "madvise");
+	if (testcase == KSM && madvise(s, length, MADV_MERGEABLE) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "madvise");
 #endif
 	memset(s, '\a', length);
 
@@ -77,14 +76,14 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
 	&& HAVE_MPOL_CONSTANTS
 		if (mempolicy)
 			if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					"set_mempolicy");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "set_mempolicy");
 #endif
 		_test_alloc(testcase, lite);
 		exit(0);
@@ -93,16 +92,16 @@
 	}
 	tst_resm(TINFO, "expected victim is %d.", pid);
 	if (waitpid(-1, &status, 0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 
 	if (testcase == OVERCOMMIT) {
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "the victim unexpectedly failed: %d",
-				status);
+				 status);
 	} else {
 		if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL)
 			tst_resm(TFAIL, "the victim unexpectedly failed: %d",
-				status);
+				 status);
 	}
 }
 
@@ -134,7 +133,6 @@
 	char buf[BUFSIZ], fullpath[BUFSIZ];
 	long actual_val;
 
-
 	snprintf(fullpath, BUFSIZ, "%s%s", PATH_KSM, path);
 	read_file(fullpath, buf);
 	actual_val = SAFE_STRTOL(cleanup, buf, 0, LONG_MAX);
@@ -172,8 +170,8 @@
 		    pages_sharing != old_pages_sharing ||
 		    pages_volatile != old_pages_volatile ||
 		    pages_unshared != old_pages_unshared) {
-			old_pages_shared   = pages_shared;
-			old_pages_sharing  = pages_sharing;
+			old_pages_shared = pages_shared;
+			old_pages_sharing = pages_sharing;
 			old_pages_volatile = pages_volatile;
 			old_pages_unshared = pages_unshared;
 		} else {
@@ -182,12 +180,12 @@
 	}
 
 	tst_resm(TINFO, "ksm daemon takes %ds to scan all mergeable pages",
-		    count * 10);
+		 count * 10);
 }
 
 static void _group_check(int run, int pages_shared, int pages_sharing,
-		int pages_volatile, int pages_unshared,
-		int sleep_millisecs, int pages_to_scan)
+			 int pages_volatile, int pages_unshared,
+			 int sleep_millisecs, int pages_to_scan)
 {
 	/* wait for ksm daemon to scan all mergeable pages. */
 	_wait_ksmd_done();
@@ -203,26 +201,26 @@
 }
 
 static void _verify(char value, int proc, int start, int end,
-		int start2, int end2)
+		    int start2, int end2)
 {
 	int i, j;
 	void *s = NULL;
 
 	s = malloc((end - start) * (end2 - start2));
 	if (s == NULL)
-		tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+		tst_brkm(TBROK | TERRNO, tst_exit, "malloc");
 
 	tst_resm(TINFO, "child %d verifies memory content.", proc);
 	memset(s, value, (end - start) * (end2 - start2));
 	if (memcmp(memory[proc][start], s, (end - start) * (end2 - start2))
-		!= 0)
+	    != 0)
 		for (j = start; j < end; j++)
 			for (i = start2; i < end2; i++)
 				if (memory[proc][j][i] != value)
 					tst_resm(TFAIL, "child %d has %c at "
-						"%d,%d,%d.",
-						proc, memory[proc][j][i], proc,
-						j, i);
+						 "%d,%d,%d.",
+						 proc, memory[proc][j][i], proc,
+						 j, i);
 	free(s);
 }
 
@@ -250,46 +248,46 @@
 
 	child = malloc(num);
 	if (child == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc");
 
 	memory = malloc(num * sizeof(**memory));
 	if (memory == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc");
 
 	/* Don't call cleanup in those children. Instead, do a cleanup from the
-	   parent after fetched children's status.*/
+	   parent after fetched children's status. */
 	switch (child[0] = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 		tst_resm(TINFO, "child 0 allocates %d MB filled with 'c'.",
-			size);
+			 size);
 		memory[0] = malloc(size / unit * sizeof(*memory));
 		if (memory[0] == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+			tst_brkm(TBROK | TERRNO, tst_exit, "malloc");
 		for (j = 0; j * unit < size; j++) {
 			memory[0][j] = mmap(NULL, unit * MB,
-					PROT_READ|PROT_WRITE,
-					MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+					    PROT_READ | PROT_WRITE,
+					    MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 			if (memory[0][j] == MAP_FAILED)
-				tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
+				tst_brkm(TBROK | TERRNO, tst_exit, "mmap");
 
 #ifdef HAVE_MADV_MERGEABLE
 			if (madvise(memory[0][j], unit * MB, MADV_MERGEABLE)
-				== -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "madvise");
+			    == -1)
+				tst_brkm(TBROK | TERRNO, tst_exit, "madvise");
 #endif
 			for (i = 0; i < unit * MB; i++)
 				memory[0][j][i] = 'c';
 		}
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 		_verify('c', 0, 0, size / unit, 0, unit * MB);
@@ -301,47 +299,47 @@
 		/* Unmerge. */
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 
 		tst_resm(TINFO, "child 0 continues...");
 		_verify('d', 0, 0, size / unit, 0, unit * MB);
 		/* Stop. */
 		tst_resm(TINFO, "child 0 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 0 continues...");
 		exit(0);
 	}
 	switch (child[1] = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		tst_resm(TINFO, "child 1 allocates %d MB filled with 'a'.",
-			size);
+			 size);
 		memory[1] = malloc(size / unit * sizeof(*memory));
 		if (memory[1] == NULL)
-			tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+			tst_brkm(TBROK | TERRNO, tst_exit, "malloc");
 		for (j = 0; j < size / unit; j++) {
 			memory[1][j] = mmap(NULL, unit * MB,
-					PROT_READ|PROT_WRITE,
-					MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+					    PROT_READ | PROT_WRITE,
+					    MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 			if (memory[1][j] == MAP_FAILED)
-				tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
+				tst_brkm(TBROK | TERRNO, tst_exit, "mmap");
 #ifdef HAVE_MADV_MERGEABLE
 			if (madvise(memory[1][j], unit * MB, MADV_MERGEABLE)
-				== -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "madvise");
+			    == -1)
+				tst_brkm(TBROK | TERRNO, tst_exit, "madvise");
 #endif
 			for (i = 0; i < unit * MB; i++)
 				memory[1][j][i] = 'a';
 		}
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		_verify('a', 1, 0, size / unit, 0, unit * MB);
 		tst_resm(TINFO, "child 1 changes memory content to 'b'.");
@@ -351,7 +349,7 @@
 		}
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		_verify('b', 1, 0, size / unit, 0, unit * MB);
 		tst_resm(TINFO, "child 1 changes memory content to 'd'");
@@ -360,7 +358,7 @@
 				memory[1][j][i] = 'd';
 		}
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 
 		tst_resm(TINFO, "child 1 continues...");
 		_verify('d', 1, 0, size / unit, 0, unit * MB);
@@ -370,7 +368,7 @@
 		/* Unmerge. */
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		_verify('e', 1, size / unit - 1, size / unit,
 			unit * MB - 1, unit * MB);
@@ -379,47 +377,47 @@
 		/* Stop. */
 		tst_resm(TINFO, "child 1 stops.");
 		if (raise(SIGSTOP) == -1)
-			tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+			tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 		tst_resm(TINFO, "child 1 continues...");
 		exit(0);
 	}
 	for (k = 2; k < num; k++) {
 		switch (child[k] = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			tst_resm(TINFO, "child %d allocates %d "
-				"MB filled with 'a'.", k, size);
+				 "MB filled with 'a'.", k, size);
 			memory[k] = malloc(size / unit * sizeof(*memory));
 			if (memory[k] == NULL)
-				tst_brkm(TBROK|TERRNO, tst_exit, "malloc");
+				tst_brkm(TBROK | TERRNO, tst_exit, "malloc");
 			for (j = 0; j < size / unit; j++) {
 				memory[k][j] = mmap(NULL, unit * MB,
-						PROT_READ|PROT_WRITE,
-						MAP_ANONYMOUS
-						|MAP_PRIVATE, -1, 0);
+						    PROT_READ | PROT_WRITE,
+						    MAP_ANONYMOUS
+						    | MAP_PRIVATE, -1, 0);
 				if (memory[k][j] == MAP_FAILED)
-					tst_brkm(TBROK|TERRNO, cleanup,
-						"mmap");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "mmap");
 #ifdef HAVE_MADV_MERGEABLE
 				if (madvise(memory[k][j], unit * MB,
-						MADV_MERGEABLE) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-						"madvise");
+					    MADV_MERGEABLE) == -1)
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "madvise");
 #endif
 				for (i = 0; i < unit * MB; i++)
 					memory[k][j][i] = 'a';
 			}
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			tst_resm(TINFO, "child %d changes memory content to "
-				"'d'", k);
+				 "'d'", k);
 			for (j = 0; j < size / unit; j++) {
 				for (i = 0; i < unit * MB; i++)
 					memory[k][j][i] = 'd';
@@ -427,13 +425,13 @@
 			/* Unmerge. */
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 
 			/* Stop. */
 			tst_resm(TINFO, "child %d stops.", k);
 			if (raise(SIGSTOP) == -1)
-				tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+				tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 			tst_resm(TINFO, "child %d continues...", k);
 			exit(0);
 		}
@@ -447,33 +445,33 @@
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFSTOPPED(status))
 			tst_brkm(TBROK, cleanup, "child %d was not stopped.",
-				k);
+				 k);
 	}
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill child[%d]", k);
+			tst_brkm(TBROK | TERRNO, cleanup, "kill child[%d]", k);
 	}
 	_group_check(1, 2, size * num * pages - 2, 0, 0, 0, size * pages * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (!WIFSTOPPED(status))
 		tst_brkm(TBROK, cleanup, "child 1 was not stopped.");
 
 	/* Child 1 changes all pages to 'b'. */
 	tst_resm(TINFO, "resume child 1.");
 	if (kill(child[1], SIGCONT) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "kill");
+		tst_brkm(TBROK | TERRNO, cleanup, "kill");
 	_group_check(1, 3, size * num * pages - 3, 0, 0, 0, size * pages * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (!WIFSTOPPED(status))
 		tst_brkm(TBROK, cleanup, "child 1 was not stopped.");
 
@@ -481,34 +479,34 @@
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill child[%d]", k);
+			tst_brkm(TBROK | TERRNO, cleanup, "kill child[%d]", k);
 	}
 	_group_check(1, 1, size * num * pages - 1, 0, 0, 0, size * pages * num);
 
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFSTOPPED(status))
 			tst_brkm(TBROK, cleanup, "child %d was not stopped.",
-				k);
+				 k);
 	}
 	/* Child 1 changes pages to 'e'. */
 	tst_resm(TINFO, "resume child 1.");
 	if (kill(child[1], SIGCONT) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "kill");
+		tst_brkm(TBROK | TERRNO, cleanup, "kill");
 	_group_check(1, 1, size * num * pages - 2, 0, 1, 0, size * pages * num);
 
 	tst_resm(TINFO, "wait for child 1 to stop.");
 	if (waitpid(child[1], &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (!WIFSTOPPED(status))
 		tst_brkm(TBROK, cleanup, "child 1 was not stopped.");
 
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill child[%d]", k);
+			tst_brkm(TBROK | TERRNO, cleanup, "kill child[%d]", k);
 	}
 	tst_resm(TINFO, "KSM unmerging...");
 	write_file(PATH_KSM "run", "2");
@@ -517,15 +515,15 @@
 	tst_resm(TINFO, "wait for all children to stop.");
 	for (k = 0; k < num; k++) {
 		if (waitpid(child[k], &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFSTOPPED(status))
 			tst_brkm(TBROK, cleanup, "child %d was not stopped.",
-				k);
+				 k);
 	}
 	tst_resm(TINFO, "resume all children.");
 	for (k = 0; k < num; k++) {
 		if (kill(child[k], SIGCONT) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill child[%d]", k);
+			tst_brkm(TBROK | TERRNO, cleanup, "kill child[%d]", k);
 	}
 	tst_resm(TINFO, "stop KSM.");
 	write_file(PATH_KSM "run", "0");
@@ -533,7 +531,7 @@
 	while (waitpid(-1, &status, WUNTRACED | WCONTINUED) > 0)
 		if (WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child exit status is %d",
-				WEXITSTATUS(status));
+				 WEXITSTATUS(status));
 }
 
 void check_ksm_options(int *size, int *num, int *unit)
@@ -541,24 +539,23 @@
 	if (opt_size) {
 		*size = atoi(opt_sizestr);
 		if (*size < 1)
-			tst_brkm(TBROK, cleanup,
-				"size cannot be less than 1.");
+			tst_brkm(TBROK, cleanup, "size cannot be less than 1.");
 	}
 	if (opt_unit) {
 		*unit = atoi(opt_unitstr);
 		if (*unit > *size)
 			tst_brkm(TBROK, cleanup,
-				"unit cannot be greater than size.");
+				 "unit cannot be greater than size.");
 		if (*size % *unit != 0)
 			tst_brkm(TBROK, cleanup,
-				"the remainder of division of size by unit is "
-				"not zero.");
+				 "the remainder of division of size by unit is "
+				 "not zero.");
 	}
 	if (opt_num) {
 		*num = atoi(opt_numstr);
 		if (*num < 3)
 			tst_brkm(TBROK, cleanup,
-				"process number cannot be less 3.");
+				 "process number cannot be less 3.");
 	}
 }
 
@@ -604,16 +601,16 @@
 	if (fd == -1) {
 		if (errno == ENOENT) {
 			snprintf(path, BUFSIZ, "%s/cpuset.%s",
-					prefix, filename);
+				 prefix, filename);
 			fd = open(path, O_RDONLY);
 			if (fd == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "open %s", path);
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "open %s", path);
 		} else
-			tst_brkm(TBROK|TERRNO, cleanup, "open %s", path);
+			tst_brkm(TBROK | TERRNO, cleanup, "open %s", path);
 	}
 	if (read(fd, retbuf, BUFSIZ) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "read %s", path);
+		tst_brkm(TBROK | TERRNO, cleanup, "read %s", path);
 	close(fd);
 }
 
@@ -632,16 +629,16 @@
 	if (fd == -1) {
 		if (errno == ENOENT) {
 			snprintf(path, BUFSIZ, "%s/cpuset.%s",
-					prefix, filename);
+				 prefix, filename);
 			fd = open(path, O_WRONLY);
 			if (fd == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-					    "open %s", path);
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "open %s", path);
 		} else
-			tst_brkm(TBROK|TERRNO, cleanup, "open %s", path);
+			tst_brkm(TBROK | TERRNO, cleanup, "open %s", path);
 	}
 	if (write(fd, buf, strlen(buf)) != strlen(buf))
-		tst_brkm(TBROK|TERRNO, cleanup, "write %s", path);
+		tst_brkm(TBROK | TERRNO, cleanup, "write %s", path);
 	close(fd);
 }
 
@@ -670,52 +667,53 @@
 	sprintf(s, "%s/tasks", path);
 	fd = open(s, O_WRONLY);
 	if (fd == -1)
-		tst_resm(TWARN|TERRNO, "open %s", s);
+		tst_resm(TWARN | TERRNO, "open %s", s);
 
 	snprintf(s_new, BUFSIZ, "%s/tasks", path_new);
 	fp = fopen(s_new, "r");
 	if (fp == NULL)
-		tst_resm(TWARN|TERRNO, "fopen %s", s_new);
+		tst_resm(TWARN | TERRNO, "fopen %s", s_new);
 	if ((fd != -1) && (fp != NULL)) {
 		while (fgets(value, BUFSIZ, fp) != NULL)
 			if (write(fd, value, strlen(value) - 1)
-				!= strlen(value) - 1)
-				tst_resm(TWARN|TERRNO, "write %s", s);
+			    != strlen(value) - 1)
+				tst_resm(TWARN | TERRNO, "write %s", s);
 	}
 	if (fd != -1)
 		close(fd);
 	if (fp != NULL)
 		fclose(fp);
 	if (rmdir(path_new) == -1)
-		tst_resm(TWARN|TERRNO, "rmdir %s", path_new);
+		tst_resm(TWARN | TERRNO, "rmdir %s", path_new);
 	if (umount(path) == -1)
-		tst_resm(TWARN|TERRNO, "umount %s", path);
+		tst_resm(TWARN | TERRNO, "umount %s", path);
 	if (rmdir(path) == -1)
-		tst_resm(TWARN|TERRNO, "rmdir %s", path);
+		tst_resm(TWARN | TERRNO, "rmdir %s", path);
 }
 
 void mount_mem(char *name, char *fs, char *options, char *path, char *path_new)
 {
 	if (mkdir(path, 0777) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir %s", path);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir %s", path);
 	if (mount(name, path, fs, 0, options) == -1) {
 		if (errno == ENODEV) {
 			if (rmdir(path) == -1)
-				tst_resm(TWARN|TERRNO, "rmdir %s failed",
-				    path);
+				tst_resm(TWARN | TERRNO, "rmdir %s failed",
+					 path);
 			tst_brkm(TCONF, NULL,
-			    "file system %s is not configured in kernel", fs);
+				 "file system %s is not configured in kernel",
+				 fs);
 		}
-		tst_brkm(TBROK|TERRNO, cleanup, "mount %s", path);
+		tst_brkm(TBROK | TERRNO, cleanup, "mount %s", path);
 	}
 	if (mkdir(path_new, 0777) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir %s", path_new);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir %s", path_new);
 }
 
 /* shared */
 
 /* Warning: *DO NOT* use this function in child */
-unsigned int get_a_numa_node(void (*cleanup_fn)(void))
+unsigned int get_a_numa_node(void (*cleanup_fn) (void))
 {
 	unsigned int nd1, nd2;
 	int ret;
@@ -727,22 +725,22 @@
 	case -3:
 		tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");
 	default:
-		tst_brkm(TBROK|TERRNO, cleanup_fn, "1st get_allowed_nodes");
+		tst_brkm(TBROK | TERRNO, cleanup_fn, "1st get_allowed_nodes");
 	}
 
-	ret = get_allowed_nodes(NH_MEMS|NH_CPUS, 1, &nd1);
+	ret = get_allowed_nodes(NH_MEMS | NH_CPUS, 1, &nd1);
 	switch (ret) {
 	case 0:
 		tst_resm(TINFO, "get node%lu.", nd1);
 		return nd1;
 	case -3:
 		tst_brkm(TCONF, cleanup_fn, "requires a NUMA system that has "
-				"at least one node with both memory and CPU "
-				"available.");
+			 "at least one node with both memory and CPU "
+			 "available.");
 	default:
 		break;
 	}
-	tst_brkm(TBROK|TERRNO, cleanup_fn, "2nd get_allowed_nodes");
+	tst_brkm(TBROK | TERRNO, cleanup_fn, "2nd get_allowed_nodes");
 }
 
 int path_exist(const char *path, ...)
@@ -765,7 +763,7 @@
 
 	fp = fopen(PATH_MEMINFO, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen %s", PATH_MEMINFO);
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen %s", PATH_MEMINFO);
 
 	while (fgets(line, BUFSIZ, fp) != NULL) {
 		if (sscanf(line, "%64s %ld", buf, &val) == 2)
@@ -778,7 +776,7 @@
 	fclose(fp);
 
 	tst_brkm(TBROK, cleanup, "cannot find \"%s\" in %s",
-			item, PATH_MEMINFO);
+		 item, PATH_MEMINFO);
 }
 
 void set_sys_tune(char *sys_file, long tune, int check)
@@ -796,7 +794,7 @@
 		val = get_sys_tune(sys_file);
 		if (val != tune)
 			tst_brkm(TBROK, cleanup, "%s = %ld, but expect %ld",
-					sys_file, val, tune);
+				 sys_file, val, tune);
 	}
 }
 
@@ -815,9 +813,9 @@
 
 	fd = open(filename, O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s", filename);
 	if (write(fd, buf, strlen(buf)) != strlen(buf))
-		tst_brkm(TBROK|TERRNO, cleanup, "write %s", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "write %s", filename);
 	close(fd);
 }
 
@@ -827,13 +825,13 @@
 
 	fd = open(filename, O_RDONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s", filename);
 	if (read(fd, retbuf, BUFSIZ) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "read %s", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "read %s", filename);
 	close(fd);
 }
 
-void update_shm_size(size_t *shm_size)
+void update_shm_size(size_t * shm_size)
 {
 	char buf[BUFSIZ];
 	size_t shmmax;
diff --git a/testcases/kernel/mem/mem/mem01.c b/testcases/kernel/mem/mem/mem01.c
index 7b5cf1c..2c06f9d 100644
--- a/testcases/kernel/mem/mem/mem01.c
+++ b/testcases/kernel/mem/mem/mem01.c
@@ -139,9 +139,12 @@
  * memory size (MB) to allocate.
  */
 option_t options[] = {
-	{"m:", &m_opt, &m_copt},
-	{"r", &r_opt, NULL},
-	{"v", &v_opt, NULL},
+	{"m:", &m_opt, &m_copt}
+	,
+	{"r", &r_opt, NULL}
+	,
+	{"v", &v_opt, NULL}
+	,
 	{NULL, NULL, NULL}
 };
 
diff --git a/testcases/kernel/mem/mmapstress/mmap-corruption01.c b/testcases/kernel/mem/mmapstress/mmap-corruption01.c
index 642e86d..7628eae 100644
--- a/testcases/kernel/mem/mmapstress/mmap-corruption01.c
+++ b/testcases/kernel/mem/mmapstress/mmap-corruption01.c
@@ -56,126 +56,131 @@
 #include "usctest.h"
 
 /* Extern Global Variables */
-extern int  Tst_count;
+extern int Tst_count;
 
 /* Global Variables */
-char *TCID     = "mmap-corruption01"; /* test program identifier.          */
-int  TST_TOTAL = 1;                  /* total number of tests in this file.   */
+char *TCID = "mmap-corruption01";	/* test program identifier.          */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
-long kMemSize  = 128 << 20;
+long kMemSize = 128 << 20;
 int kPageSize = 4096;
 
-char *usage="-h hours -m minutes -s secs\n";
+char *usage = "-h hours -m minutes -s secs\n";
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_rmdir();
-  tst_exit();
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
 }
 
-int main(int argc, char **argv) {
-       char *progname;
-       int status;
-       int count = 0;
-       int i, c;
-       char *fname = "test.mmap-corruption";
-       char *mem;
-       unsigned long alarmtime = 0;
-       struct sigaction sa;
-       void finish(int sig);
+int main(int argc, char **argv)
+{
+	char *progname;
+	int status;
+	int count = 0;
+	int i, c;
+	char *fname = "test.mmap-corruption";
+	char *mem;
+	unsigned long alarmtime = 0;
+	struct sigaction sa;
+	void finish(int sig);
 
-       progname = *argv;
-       while ((c = getopt(argc, argv, ":h:m:s:")) != -1) {
-                switch (c) {
-                case 'h':
-                         alarmtime += atoi(optarg) * 60 * 60;
-                         break;
-                case 'm':
-                         alarmtime += atoi(optarg) * 60;
-                         break;
-                case 's':
-                         alarmtime += atoi(optarg);
-                         break;
-                default:
-                        (void)fprintf(stderr, "usage: %s %s\n", progname,
-                                usage);
-                        anyfail();
-                }
-       }
+	progname = *argv;
+	while ((c = getopt(argc, argv, ":h:m:s:")) != -1) {
+		switch (c) {
+		case 'h':
+			alarmtime += atoi(optarg) * 60 * 60;
+			break;
+		case 'm':
+			alarmtime += atoi(optarg) * 60;
+			break;
+		case 's':
+			alarmtime += atoi(optarg);
+			break;
+		default:
+			(void)fprintf(stderr, "usage: %s %s\n", progname,
+				      usage);
+			anyfail();
+		}
+	}
 
-        /*
-         *  Plan for death by signal.  User may have specified
-         *  a time limit, in which case set an alarm and catch SIGALRM.
-         *  Also catch and cleanup with SIGINT, SIGQUIT, and SIGTERM.
-         */
-        sa.sa_handler = finish;
-        sa.sa_flags = 0;
-        if (sigemptyset(&sa.sa_mask)) {
-                perror("sigempty error");
-                exit(1);
-        }
+	/*
+	 *  Plan for death by signal.  User may have specified
+	 *  a time limit, in which case set an alarm and catch SIGALRM.
+	 *  Also catch and cleanup with SIGINT, SIGQUIT, and SIGTERM.
+	 */
+	sa.sa_handler = finish;
+	sa.sa_flags = 0;
+	if (sigemptyset(&sa.sa_mask)) {
+		perror("sigempty error");
+		exit(1);
+	}
 
-        if (sigaction(SIGINT, &sa, 0) == -1) {
-                perror("sigaction error SIGINT");
-                exit(1);
-        }
-        if (alarmtime) {
-                if (sigaction(SIGALRM, &sa, 0) == -1) {
-                        perror("sigaction error");
-                        exit(1);
-                }
-                (void)alarm(alarmtime);
-                printf("mmap-corruption will run for=> %ld, seconds\n",alarmtime);
-        } else { //Run for 5 secs only
-                if (sigaction(SIGALRM, &sa, 0) == -1) {
-                        perror("sigaction error");
-                        exit(1);
-                }
-                (void)alarm(5);
-                printf("mmap-corruption will run for=> 5, seconds\n");
-        }
-        /* If we get a SIGQUIT or SIGTERM, clean up and exit immediately. */
-        sa.sa_handler = finish;
-        if (sigaction(SIGQUIT, &sa, 0) == -1) {
-                perror("sigaction error SIGQUIT");
-                exit(1);
-        }
-        if (sigaction(SIGTERM, &sa, 0) == -1) {
-                perror("sigaction error SIGTERM");
-                exit(1);
-        }
+	if (sigaction(SIGINT, &sa, 0) == -1) {
+		perror("sigaction error SIGINT");
+		exit(1);
+	}
+	if (alarmtime) {
+		if (sigaction(SIGALRM, &sa, 0) == -1) {
+			perror("sigaction error");
+			exit(1);
+		}
+		(void)alarm(alarmtime);
+		printf("mmap-corruption will run for=> %ld, seconds\n",
+		       alarmtime);
+	} else {		//Run for 5 secs only
+		if (sigaction(SIGALRM, &sa, 0) == -1) {
+			perror("sigaction error");
+			exit(1);
+		}
+		(void)alarm(5);
+		printf("mmap-corruption will run for=> 5, seconds\n");
+	}
+	/* If we get a SIGQUIT or SIGTERM, clean up and exit immediately. */
+	sa.sa_handler = finish;
+	if (sigaction(SIGQUIT, &sa, 0) == -1) {
+		perror("sigaction error SIGQUIT");
+		exit(1);
+	}
+	if (sigaction(SIGTERM, &sa, 0) == -1) {
+		perror("sigaction error SIGTERM");
+		exit(1);
+	}
 
-       tst_tmpdir();
-       while (1) {
-             unlink(fname);
-             int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0600);
-             status = ftruncate(fd, kMemSize);
+	tst_tmpdir();
+	while (1) {
+		unlink(fname);
+		int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0600);
+		status = ftruncate(fd, kMemSize);
 
-             mem = mmap(0, kMemSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-             // Fill the memory with 1s.
-             memset(mem, 1, kMemSize);
+		mem =
+		    mmap(0, kMemSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
+			 0);
+		// Fill the memory with 1s.
+		memset(mem, 1, kMemSize);
 
-             for (i = 0; i < kMemSize; i++) {
-                  int byte_good = mem[i] != 0;
-                  if (!byte_good && ((i % kPageSize) == 0)) {
-                       //printf("%d ", i / kPageSize);
-                       count++;
-                  }
-             }
-             munmap(mem, kMemSize);
-             close(fd);
-             unlink(fname);
-             if (count > 0) {
-                 printf("Running %d bad page\n", count);
-                 return 1;
-             }
-             count=0;
-       }
-     return 0;
+		for (i = 0; i < kMemSize; i++) {
+			int byte_good = mem[i] != 0;
+			if (!byte_good && ((i % kPageSize) == 0)) {
+				//printf("%d ", i / kPageSize);
+				count++;
+			}
+		}
+		munmap(mem, kMemSize);
+		close(fd);
+		unlink(fname);
+		if (count > 0) {
+			printf("Running %d bad page\n", count);
+			return 1;
+		}
+		count = 0;
+	}
+	return 0;
 }
 
-void finish(int sig) {
-     printf("mmap-corruption PASSED\n");
-     exit(0);
+void finish(int sig)
+{
+	printf("mmap-corruption PASSED\n");
+	exit(0);
 }
diff --git a/testcases/kernel/mem/mmapstress/mmapstress01.c b/testcases/kernel/mem/mmapstress/mmapstress01.c
index d3ec438..667a083 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress01.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress01.c
@@ -39,7 +39,7 @@
 #define PASSED 1
 
 int local_flag = PASSED;
-char *TCID = "mmapstress01"; //tmnoextend
+char *TCID = "mmapstress01";	//tmnoextend
 FILE *temp;
 int TST_TOTAL = 1;
 
@@ -98,16 +98,17 @@
 #define roundup(x, y)	((((x)+((y)-1))/(y))*(y))
 #define min(x, y)	(((x) < (y)) ? (x) : (y))
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
 extern void *malloc(size_t);
 extern long lrand48(void);
 extern void srand(unsigned);
 extern void srand48(long);
-extern int  rand(void);
-extern int  atoi(const char *);
+extern int rand(void);
+extern int atoi(const char *);
 
-char *usage="-p nprocs [-t minutes -f filesize -S sparseoffset -r -o -m -l -d]";
+char *usage =
+    "-p nprocs [-t minutes -f filesize -S sparseoffset -r -o -m -l -d]";
 
 typedef unsigned char uchar_t;
 #define SIZE_MAX UINT_MAX
@@ -115,7 +116,7 @@
 unsigned int initrand(void);
 void finish(int sig);
 void child_mapper(char *file, unsigned procno, unsigned nprocs);
-int fileokay(char *file, uchar_t *expbuf);
+int fileokay(char *file, uchar_t * expbuf);
 int finished = 0;
 int leavefile = 0;
 
@@ -133,8 +134,7 @@
 unsigned pattern = 0;
 char filename[64];
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *progname;
 	int fd;
@@ -142,9 +142,9 @@
 	extern char *optarg;
 	unsigned nprocs = 0;
 	unsigned procno;
-	pid_t *pidarray=NULL;
+	pid_t *pidarray = NULL;
 	pid_t pid;
-	uchar_t *buf=NULL;
+	uchar_t *buf = NULL;
 	unsigned int seed;
 	int pagesize = sysconf(_SC_PAGE_SIZE);
 	float alarmtime = 0;
@@ -165,7 +165,7 @@
 	tst_tmpdir();
 	if (argc < 2) {
 		tst_resm(TBROK, "usage: %s %s\n", progname, usage);
-                tst_exit();
+		tst_exit();
 	}
 
 	while ((c = getopt(argc, argv, "S:omdlrf:p:t:")) != -1) {
@@ -190,7 +190,7 @@
 #endif /* LARGE_FILE */
 			if (filesize < 0) {
 				(void)fprintf(stderr, "error: negative "
-					"filesize\n");
+					      "filesize\n");
 				anyfail();
 			}
 			break;
@@ -211,20 +211,21 @@
 #endif /* LARGE_FILE */
 			if (sparseoffset % pagesize != 0) {
 				fprintf(stderr,
-				    "sparseoffset must be pagesize multiple\n");
+					"sparseoffset must be pagesize multiple\n");
 				anyfail();
 			}
 			break;
 		default:
-			(void)fprintf(stderr,"usage: %s %s\n", progname, usage);
-                        tst_exit();
+			(void)fprintf(stderr, "usage: %s %s\n", progname,
+				      usage);
+			tst_exit();
 		}
 	}
 
 	/* nprocs is >= 0 since it's unsigned */
 	if (nprocs > 255) {
 		(void)fprintf(stderr, "invalid nprocs %d - (range 0-255)\n",
-			nprocs);
+			      nprocs);
 		anyfail();
 	}
 
@@ -237,13 +238,14 @@
 	if (debug) {
 #ifdef LARGE_FILE
 		(void)printf("creating file <%s> with %Ld bytes, pattern %d\n",
-			filename, filesize, pattern);
+			     filename, filesize, pattern);
 #else /* LARGE_FILE */
 		(void)printf("creating file <%s> with %ld bytes, pattern %d\n",
-			filename, filesize, pattern);
+			     filename, filesize, pattern);
 #endif /* LARGE_FILE */
 		if (alarmtime)
-			(void)printf("running for %f minutes\n", alarmtime/60);
+			(void)printf("running for %f minutes\n",
+				     alarmtime / 60);
 		else
 			(void)printf("running with no time limit\n");
 	}
@@ -280,27 +282,26 @@
 		}
 		(void)alarm(alarmtime);
 	}
-
 #ifdef LARGE_FILE
-	if ((fd = open64(filename, O_CREAT|O_TRUNC|O_RDWR, 0664)) == -1) {
+	if ((fd = open64(filename, O_CREAT | O_TRUNC | O_RDWR, 0664)) == -1) {
 #else /* LARGE_FILE */
-	if ((fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0664)) == -1) {
+	if ((fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0664)) == -1) {
 #endif /* LARGE_FILE */
 		perror("open error");
 		anyfail();
 	}
 
-	if ((buf = (uchar_t *)malloc(pagesize)) == NULL
-	    || (pidarray = (pid_t *)malloc(nprocs*sizeof(pid_t))) == NULL) {
+	if ((buf = (uchar_t *) malloc(pagesize)) == NULL
+	    || (pidarray = (pid_t *) malloc(nprocs * sizeof(pid_t))) == NULL) {
 		perror("malloc error");
 		anyfail();
 	}
 
 	for (i = 0; i < nprocs; i++)
-		*(pidarray+i) = 0;
+		*(pidarray + i) = 0;
 
 	for (i = 0, data = 0; i < pagesize; i++) {
-		*(buf+i) = (data + pattern) & 0xff;
+		*(buf + i) = (data + pattern) & 0xff;
 		if (++data == nprocs)
 			data = 0;
 	}
@@ -319,8 +320,7 @@
 				perror("write error");
 			} else {
 				(void)fprintf(stderr, "write: wrote %d of %d "
-					"bytes\n",
-					c, write_cnt);
+					      "bytes\n", c, write_cnt);
 			}
 			(void)close(fd);
 			(void)unlink(filename);
@@ -372,7 +372,7 @@
 			if (!WIFEXITED(wait_stat)
 			    || WEXITSTATUS(wait_stat) != 0) {
 				(void)fprintf(stderr, "child exit with err "
-					"<x%x>\n", wait_stat);
+					      "<x%x>\n", wait_stat);
 				goto cleanup;
 			}
 			for (i = 0; i < nprocs; i++)
@@ -380,7 +380,7 @@
 					break;
 			if (i == nprocs) {
 				(void)fprintf(stderr, "unknown child pid %d, "
-					"<x%x>\n", pid, wait_stat);
+					      "<x%x>\n", pid, wait_stat);
 				goto cleanup;
 			}
 
@@ -388,7 +388,7 @@
 				perror("fork error");
 				pidarray[i] = 0;
 				goto cleanup;
-			} else if (pid == 0) {		/* child */
+			} else if (pid == 0) {	/* child */
 				child_mapper(filename, i, nprocs);
 				exit(0);
 			} else
@@ -458,8 +458,7 @@
  *  determined based on nprocs & procno).  After a specific number of
  *  iterations, it exits.
  */
-void
-child_mapper(char *file, unsigned procno, unsigned nprocs)
+void child_mapper(char *file, unsigned procno, unsigned nprocs)
 {
 #ifdef LARGE_FILE
 	struct stat64 statbuf;
@@ -472,7 +471,7 @@
 #endif /* LARGE_FILE */
 	size_t validsize;
 	size_t mapsize;
-	char *maddr=NULL, *paddr;
+	char *maddr = NULL, *paddr;
 	int fd;
 	size_t pagesize = sysconf(_SC_PAGE_SIZE);
 	unsigned randpage;
@@ -482,7 +481,7 @@
 	unsigned mappages;
 	unsigned i;
 
-	seed = initrand();		/* initialize random seed */
+	seed = initrand();	/* initialize random seed */
 
 #ifdef LARGE_FILE
 	if (stat64(file, &statbuf) == -1) {
@@ -507,7 +506,7 @@
 		fprintf(stderr, "size_t overflow when setting up map\n");
 		anyfail();
 	}
-	mapsize = (size_t)(statbuf.st_size - sparseoffset);
+	mapsize = (size_t) (statbuf.st_size - sparseoffset);
 	mappages = roundup(mapsize, pagesize) / pagesize;
 	offset = sparseoffset;
 	if (do_offset) {
@@ -522,23 +521,22 @@
 	if (debug) {
 #ifdef LARGE_FILE
 		(void)printf("child %d (pid %ld): seed %d, fsize %Ld, "
-			"mapsize %d, off %Ld, loop %d\n",
-			procno, getpid(), seed, filesize, mapsize,
-			offset/pagesize, nloops);
+			     "mapsize %d, off %Ld, loop %d\n",
+			     procno, getpid(), seed, filesize, mapsize,
+			     offset / pagesize, nloops);
 #else /* LARGE_FILE */
 		(void)printf("child %d (pid %d): seed %d, fsize %ld, "
-			"mapsize %ld, off %ld, loop %d\n",
-			procno, getpid(), seed, filesize, (long)mapsize,
-			offset/pagesize, nloops);
+			     "mapsize %ld, off %ld, loop %d\n",
+			     procno, getpid(), seed, filesize, (long)mapsize,
+			     offset / pagesize, nloops);
 #endif /* LARGE_FILE */
 	}
-
 #ifdef LARGE_FILE
-	if ((maddr = mmap64(0, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED,
-			  fd, offset)) == (caddr_t)-1) {
+	if ((maddr = mmap64(0, mapsize, PROT_READ | PROT_WRITE, MAP_SHARED,
+			    fd, offset)) == (caddr_t) - 1) {
 #else /* LARGE_FILE */
-	if ((maddr = mmap(0, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED,
-			  fd, offset)) == (caddr_t)-1) {
+	if ((maddr = mmap(0, mapsize, PROT_READ | PROT_WRITE, MAP_SHARED,
+			  fd, offset)) == (caddr_t) - 1) {
 #endif /* LARGE_FILE */
 		perror("mmap error");
 		anyfail();
@@ -551,30 +549,29 @@
 	 */
 	for (loopcnt = 0; loopcnt < nloops; loopcnt++) {
 		randpage = lrand48() % mappages;
-		paddr = maddr + (randpage * pagesize);	 /* page address */
+		paddr = maddr + (randpage * pagesize);	/* page address */
 
-		if (randpage < mappages - 1
-		    || !(mapsize % pagesize))
+		if (randpage < mappages - 1 || !(mapsize % pagesize))
 			validsize = pagesize;
 		else
 			validsize = mapsize % pagesize;
 
 		for (i = procno; i < validsize; i += nprocs) {
-			if (*((unsigned char *)(paddr+i))
+			if (*((unsigned char *)(paddr + i))
 			    != ((procno + pattern) & 0xff)) {
 				(void)fprintf(stderr, "child %d: invalid data "
-					"<x%x>", procno,
-					*((unsigned char *)(paddr+i)));
+					      "<x%x>", procno,
+					      *((unsigned char *)(paddr + i)));
 				(void)fprintf(stderr, " at pg %d off %d, exp "
-					"<x%x>\n", randpage, i,
-					(procno+pattern)&0xff);
+					      "<x%x>\n", randpage, i,
+					      (procno + pattern) & 0xff);
 				anyfail();
 			}
 
 			/*
 			 *  Now write it.
 			 */
-			*(paddr+i) = (procno + pattern) & 0xff;
+			*(paddr + i) = (procno + pattern) & 0xff;
 		}
 	}
 	if (dosync) {
@@ -582,9 +579,9 @@
 		 * Exercise msync() as well!
 		 */
 		randpage = lrand48() % mappages;
-		paddr = maddr + (randpage * pagesize);	 /* page address */
-		if (msync(paddr, (mappages - randpage)*pagesize,
-		    MS_SYNC) == -1) {
+		paddr = maddr + (randpage * pagesize);	/* page address */
+		if (msync(paddr, (mappages - randpage) * pagesize,
+			  MS_SYNC) == -1) {
 			anyfail();
 		}
 	}
@@ -599,8 +596,7 @@
 /*
  *  Make sure file has all the correct data.
  */
-int
-fileokay(char *file, uchar_t *expbuf)
+int fileokay(char *file, uchar_t * expbuf)
 {
 #ifdef LARGE_FILE
 	struct stat64 statbuf;
@@ -647,13 +643,13 @@
 		perror("lseek");
 		anyfail();
 	}
-	readbuf = (uchar_t *)malloc(pagesize);
+	readbuf = (uchar_t *) malloc(pagesize);
 
 	if (statbuf.st_size - sparseoffset > SIZE_MAX) {
 		fprintf(stderr, "size_t overflow when setting up map\n");
 		anyfail();
 	}
-	mapsize = (size_t)(statbuf.st_size - sparseoffset);
+	mapsize = (size_t) (statbuf.st_size - sparseoffset);
 
 	mappages = roundup(mapsize, pagesize) / pagesize;
 
@@ -672,7 +668,7 @@
 			 */
 			if ((i * pagesize) + cnt != mapsize) {
 				(void)fprintf(stderr, "read %d of %ld bytes\n",
-					      (i*pagesize)+cnt,
+					      (i * pagesize) + cnt,
 					      (long)mapsize);
 				return 0;
 			}
@@ -683,14 +679,16 @@
 		for (j = 0; j < cnt; j++) {
 			if (expbuf[j] != readbuf[j]) {
 				(void)fprintf(stderr,
-					"read bad data: exp %c got %c)",
-					expbuf[j], readbuf[j]);
+					      "read bad data: exp %c got %c)",
+					      expbuf[j], readbuf[j]);
 #ifdef LARGE_FILE
 				(void)fprintf(stderr, ", pg %d off %d, "
-					"(fsize %Ld)\n", i, j, statbuf.st_size);
+					      "(fsize %Ld)\n", i, j,
+					      statbuf.st_size);
 #else /* LARGE_FILE */
 				(void)fprintf(stderr, ", pg %d off %d, "
-					"(fsize %ld)\n", i, j, statbuf.st_size);
+					      "(fsize %ld)\n", i, j,
+					      statbuf.st_size);
 #endif /* LARGE_FILE */
 				return 0;
 			}
@@ -701,30 +699,27 @@
 	return 1;
 }
 
-/*ARGSUSED*/
-void
-finish(int sig)
+ /*ARGSUSED*/ void finish(int sig)
 {
 	finished++;
 	return;
 }
 
-unsigned int
-initrand(void)
+unsigned int initrand(void)
 {
 	unsigned int seed;
 
 	/*
 	 *  Initialize random seed...  Got this from a test written
 	 *  by scooter:
-	 *	Use srand/rand to diffuse the information from the
-	 *	time and pid.  If you start several processes, then
-	 *	the time and pid information don't provide much
-	 *	variation.
+	 *      Use srand/rand to diffuse the information from the
+	 *      time and pid.  If you start several processes, then
+	 *      the time and pid information don't provide much
+	 *      variation.
 	 */
 	srand((unsigned int)getpid());
 	seed = rand();
-	srand((unsigned int)time((time_t *)0));
+	srand((unsigned int)time((time_t *) 0));
 	seed = (seed ^ rand()) % 100000;
 	srand48((long int)seed);
 	return (seed);
@@ -733,14 +728,14 @@
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed");
+	tst_resm(TPASS, "Test passed");
 	tst_rmdir();
-        tst_exit();
+	tst_exit();
 }
 
 int anyfail()
 {
-  	tst_resm(TFAIL, "Test failed");
+	tst_resm(TFAIL, "Test failed");
 	tst_rmdir();
 	tst_exit();
 	return 0;
diff --git a/testcases/kernel/mem/mmapstress/mmapstress02.c b/testcases/kernel/mem/mmapstress/mmapstress02.c
index 493ecf0..3490619 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress02.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress02.c
@@ -35,9 +35,9 @@
 #include <errno.h>
 #include <stdio.h>
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
-extern void     exit(int);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
+extern void exit(int);
 
 #define	ERROR(M)	(void)fprintf(stderr, "%s: errno = %d; " M "\n", \
 				argv[0], errno)
@@ -49,7 +49,7 @@
         }
 
 static char tmpname[] = "fileXXXXXX";
-static int	fd;
+static int fd;
 /*****  LTP Port        *****/
 #include "test.h"
 #include "usctest.h"
@@ -57,7 +57,7 @@
 #define PASSED 1
 
 int local_flag = PASSED;
-char *TCID = "mmapstress02"; //uiomove_phys_fail
+char *TCID = "mmapstress02";	//uiomove_phys_fail
 FILE *temp;
 int TST_TOTAL = 1;
 
@@ -65,28 +65,26 @@
 void ok_exit();
 /*****  **      **      *****/
 
-/*ARGSUSED*/
-static
-void
-cleanup(int sig)
+ /*ARGSUSED*/ static
+void cleanup(int sig)
 {
-        /*
-         * Don't check error codes - we could be signaled before the file is
-         * created.
-         */
-        (void)close(fd);
-        (void)unlink(tmpname);
+	/*
+	 * Don't check error codes - we could be signaled before the file is
+	 * created.
+	 */
+	(void)close(fd);
+	(void)unlink(tmpname);
 	tst_rmdir();
-        tst_exit();
+	tst_exit();
 }
 
-int
-main(int argc, char *argv[]) {
-	caddr_t			mmapaddr;
-	size_t			pagesize = sysconf(_SC_PAGE_SIZE);
-	time_t			t;
-	int			i;
-        struct sigaction        sa;
+int main(int argc, char *argv[])
+{
+	caddr_t mmapaddr;
+	size_t pagesize = sysconf(_SC_PAGE_SIZE);
+	time_t t;
+	int i;
+	struct sigaction sa;
 
 	tst_tmpdir();
 	if (!argc) {
@@ -102,20 +100,21 @@
 		ERROR("mkstemp failed");
 		anyfail();
 	}
-        sa.sa_handler = cleanup;
-        sa.sa_flags = 0;
-        if (sigemptyset(&sa.sa_mask)) {
-                ERROR("sigemptyset failed");
+	sa.sa_handler = cleanup;
+	sa.sa_flags = 0;
+	if (sigemptyset(&sa.sa_mask)) {
+		ERROR("sigemptyset failed");
 		anyfail();
-        }
-        CATCH_SIG(SIGINT);
-        CATCH_SIG(SIGQUIT);
-        CATCH_SIG(SIGTERM);
-	if (sbrk(2*pagesize - ((ulong)sbrk(0) & (pagesize-1))) == (char *)-1) {
+	}
+	CATCH_SIG(SIGINT);
+	CATCH_SIG(SIGQUIT);
+	CATCH_SIG(SIGTERM);
+	if (sbrk(2 * pagesize - ((ulong) sbrk(0) & (pagesize - 1))) ==
+	    (char *)-1) {
 		CLEANERROR("couldn't round up brk");
 		anyfail();
 	}
-	if ((mmapaddr = sbrk(0)) == (caddr_t)-1) {
+	if ((mmapaddr = sbrk(0)) == (caddr_t) - 1) {
 		CLEANERROR("couldn't find top of brk");
 		anyfail();
 	}
@@ -123,14 +122,13 @@
 	 * asking for PROT_WRITE.
 	 */
 	for (i = pagesize; i; i--)
-		*(mmapaddr-i) = 'a';
-	if (write(fd, (char *)mmapaddr-pagesize, pagesize) != pagesize) {
+		*(mmapaddr - i) = 'a';
+	if (write(fd, (char *)mmapaddr - pagesize, pagesize) != pagesize) {
 		CLEANERROR("write failed");
 		anyfail();
 	}
 	if (mmap(mmapaddr, pagesize, PROT_NONE,
-		MAP_FIXED|MAP_PRIVATE|MAP_FILE, fd, 0) != mmapaddr)
-	{
+		 MAP_FIXED | MAP_PRIVATE | MAP_FILE, fd, 0) != mmapaddr) {
 		CLEANERROR("couldn't mmap file");
 		anyfail();
 	}
@@ -171,25 +169,25 @@
 		anyfail();
 	}
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t));
-	ok_exit(); /* LTP Port */
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t));
+	ok_exit();		/* LTP Port */
 	tst_exit();
 }
 
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
-  	tst_rmdir();
+	tst_resm(TPASS, "Test passed\n");
+	tst_rmdir();
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed");
-  tst_rmdir();
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed");
+	tst_rmdir();
+	tst_exit();
+	return 0;
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress03.c b/testcases/kernel/mem/mmapstress/mmapstress03.c
index 288cb46..af4eaae 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress03.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress03.c
@@ -67,81 +67,78 @@
 #define NEG1	(char *)-1
 #define POINTER_SIZE	(sizeof(void *) << 3)
 
-extern long	sysconf(int name);
-extern void	exit(int);
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
-static void	do_test(caddr_t brk_max, long pagesize);
+extern long sysconf(int name);
+extern void exit(int);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
+static void do_test(caddr_t brk_max, long pagesize);
 
 static char *progname;
 
-/*ARGSUSED*/
-int
-main(int argc, char *argv[])
+ /*ARGSUSED*/ int main(int argc, char *argv[])
 {
 	char *brk_max_addr, *hole_addr, *brk_start, *hole_start;
-	size_t pagesize = (size_t)sysconf(_SC_PAGE_SIZE);
-	time_t	t;
+	size_t pagesize = (size_t) sysconf(_SC_PAGE_SIZE);
+	time_t t;
 
 	progname = argv[0];
 
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t));
+//      (void)printf("%s: Started %s", argv[0], ctime(&t));
 	if ((brk_start = sbrk(0)) == NEG1) {
 		ERROR("initial sbrk failed");
 		anyfail();
 	}
-	if ((u_long)brk_start % (u_long)pagesize) {
-		if (sbrk(pagesize - ((u_long)brk_start % (u_long)pagesize))
-			== NEG1)
-		{
+	if ((u_long) brk_start % (u_long) pagesize) {
+		if (sbrk(pagesize - ((u_long) brk_start % (u_long) pagesize))
+		    == NEG1) {
 			ERROR("couldn't round up brk to a page boundary");
-        	        anyfail();
+			anyfail();
 		}
 	}
 	/* The brk is now at the beginning of a page. */
 
 	if ((hole_addr = hole_start = sbrk(NUM_SEGS * 2 * pagesize)) == NEG1) {
 		ERROR("couldn't brk large space for segments");
-                anyfail();
+		anyfail();
 	}
 	if ((brk_max_addr = sbrk(0)) == NEG1) {
 		ERROR("couldn't find top of brk");
-                anyfail();
+		anyfail();
 	}
-	do_test((caddr_t)brk_max_addr, pagesize);
+	do_test((caddr_t) brk_max_addr, pagesize);
 
 	/* now make holes and repeat test */
 	while (hole_addr + pagesize < brk_max_addr) {
 		if (munmap(hole_addr, pagesize) == -1) {
 			ERROR("failed to munmap odd hole in brk segment");
-	                anyfail();
+			anyfail();
 		}
 		hole_addr += 2 * pagesize;
 	}
 
 	if (brk_max_addr != sbrk(0)) {
 		ERROR("do_test should leave the top of brk where it began");
-                anyfail();
+		anyfail();
 	}
-	do_test((caddr_t)brk_max_addr, pagesize);
+	do_test((caddr_t) brk_max_addr, pagesize);
 
 	/* Shrink brk */
 	if (sbrk(-NUM_SEGS * pagesize) == NEG1) {
 		ERROR("couldn't brk back over holes");
-                anyfail();
+		anyfail();
 	}
 	if ((brk_max_addr = sbrk(0)) == NEG1) {
 		ERROR("couldn't find top of break again");
-                anyfail();
+		anyfail();
 	}
 	/* sbrked over about half the holes */
 
-	hole_addr = hole_start + pagesize; /* munmap the other pages */
+	hole_addr = hole_start + pagesize;	/* munmap the other pages */
 	while (hole_addr + pagesize < brk_max_addr) {
 		if (munmap(hole_addr, pagesize) == -1) {
 			ERROR("failed to munmap even hole in brk segment");
-        	        anyfail();
+			anyfail();
 		}
 		hole_addr += 2 * pagesize;
 	}
@@ -149,27 +146,27 @@
 
 	if (brk(brk_start) == -1) {
 		ERROR("failed to completely remove brk");
-                anyfail();
+		anyfail();
 	}
 	if (sbrk(pagesize) == NEG1 || sbrk(-pagesize) == NEG1) {
 		ERROR("failed to fiddle with brk at the end");
-                anyfail();
+		anyfail();
 	}
 	/* Ask for a ridiculously large mmap region at a high address */
-	if (mmap((caddr_t)(1UL << (POINTER_SIZE  - 1)) - pagesize,
-		(size_t)((1UL << (POINTER_SIZE - 1)) - pagesize),
-		PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_FIXED|MAP_SHARED, 0, 0)
-		!= (caddr_t)-1)
-	{
+	if (mmap((caddr_t) (1UL << (POINTER_SIZE - 1)) - pagesize,
+		 (size_t) ((1UL << (POINTER_SIZE - 1)) - pagesize),
+		 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_FIXED | MAP_SHARED,
+		 0, 0)
+	    != (caddr_t) - 1) {
 		ERROR("really large mmap didn't fail");
-                anyfail();
+		anyfail();
 	}
 	if (errno != ENOMEM && errno != EINVAL) {
 		ERROR("really large mmap didn't set errno = ENOMEM nor EINVAL");
-                anyfail();
+		anyfail();
 	}
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t));
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t));
 	ok_exit();
 	tst_exit();
 }
@@ -179,21 +176,20 @@
  */
 
 static
-void
-do_test(caddr_t brk_max, long pagesize)
+void do_test(caddr_t brk_max, long pagesize)
 {
-	if (mmap((caddr_t)((long)brk_max - 3*pagesize), (2*pagesize),
-		PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE, 0, 0)
-		== (caddr_t)-1)
-	{
+	if (mmap((caddr_t) ((long)brk_max - 3 * pagesize), (2 * pagesize),
+		 PROT_READ | PROT_WRITE,
+		 MAP_ANONYMOUS | MAP_FIXED | MAP_PRIVATE, 0, 0)
+	    == (caddr_t) - 1) {
 		ERROR("mmap failed");
 		anyfail();
 	}
 	/* extend mmap */
-	if (mmap((caddr_t)((long)brk_max - 2*pagesize), (2*pagesize),
-		PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE, 0, 0)
-		== (caddr_t)-1)
-	{
+	if (mmap((caddr_t) ((long)brk_max - 2 * pagesize), (2 * pagesize),
+		 PROT_READ | PROT_WRITE,
+		 MAP_ANONYMOUS | MAP_FIXED | MAP_PRIVATE, 0, 0)
+	    == (caddr_t) - 1) {
 		ERROR("mmap failed");
 		anyfail();
 	}
@@ -222,15 +218,15 @@
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed");
-        tst_exit();
+	tst_resm(TPASS, "Test passed");
+	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed");
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed");
+	tst_exit();
+	return 0;
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress04.c b/testcases/kernel/mem/mmapstress/mmapstress04.c
index 6a50cbb..242f9cc 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress04.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress04.c
@@ -64,7 +64,7 @@
 static char *filename;
 
 /*****	LTP Port	*****/
-char *TCID = "mmapstress04";//weave
+char *TCID = "mmapstress04";	//weave
 int local_flag = PASSED;
 int block_number;
 FILE *temp;
@@ -80,43 +80,40 @@
 void ok_exit();
 /*****	**	**	*****/
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
-extern void     exit(int);
-static int	rofd, rwfd;
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
+extern void exit(int);
+static int rofd, rwfd;
 
-/*ARGSUSED*/
-static
-void
-cleanup(int sig)
+ /*ARGSUSED*/ static
+void cleanup(int sig)
 {
-        /*
-         * Don't check error codes - we could be signaled before the file is
-         * created.
-         */
-        (void)close(rofd);
-        (void)close(rwfd);
-        (void)unlink(filename);
-        exit(1);
+	/*
+	 * Don't check error codes - we could be signaled before the file is
+	 * created.
+	 */
+	(void)close(rofd);
+	(void)close(rwfd);
+	(void)unlink(filename);
+	exit(1);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	char 			*buf;
-	size_t			pagesize = (size_t)sysconf(_SC_PAGE_SIZE);
-	caddr_t 		mmapaddr;
-	time_t			t;
-	int			i, j;
-        struct sigaction        sa;
+	char *buf;
+	size_t pagesize = (size_t) sysconf(_SC_PAGE_SIZE);
+	caddr_t mmapaddr;
+	time_t t;
+	int i, j;
+	struct sigaction sa;
 #ifdef LARGE_FILE
-	off64_t			startoffset;
-	off64_t			seekoff;
-	off64_t			mapoff;
+	off64_t startoffset;
+	off64_t seekoff;
+	off64_t mapoff;
 #else /* LARGE_FILE */
-	off_t			startoffset;
-	off_t			seekoff;
-	off_t			mapoff;
+	off_t startoffset;
+	off_t seekoff;
+	off_t mapoff;
 #endif /* LARGE_FILE */
 
 	if (argc < 2 || argc > 3) {
@@ -132,26 +129,25 @@
 #else /* LARGE_FILE */
 		startoffset = atoi(argv[2]);
 #endif /* LARGE_FILE */
-	}
-	else
+	} else
 		startoffset = pagesize;
 
 	if (startoffset % pagesize != 0) {
 		fprintf(stderr, "pagesize=%ld\n", (long)pagesize);
 		fprintf(stderr, "startoffset must be a pagesize multiple\n");
-		anyfail();  //LTP Port
+		anyfail();	//LTP Port
 	}
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t));
-	if ((buf = sbrk(6*pagesize)) == (char *)-1) {
+//      (void)printf("%s: Started %s", argv[0], ctime(&t));
+	if ((buf = sbrk(6 * pagesize)) == (char *)-1) {
 		ERROR("couldn't allocate buf");
 		anyfail();	//LTP Port
 	}
-	if (sbrk(pagesize-((ulong)sbrk(0)&(pagesize-1))) == (char *)-1) {
+	if (sbrk(pagesize - ((ulong) sbrk(0) & (pagesize - 1))) == (char *)-1) {
 		ERROR("couldn't round up brk");
 		anyfail();	//LTP Port
 	}
-	if ((mmapaddr = (caddr_t)sbrk(0)) == (caddr_t)-1) {
+	if ((mmapaddr = (caddr_t) sbrk(0)) == (caddr_t) - 1) {
 		ERROR("couldn't find top of brk");
 		anyfail();	//LTP Port
 	}
@@ -166,9 +162,9 @@
 	CATCH_SIG(SIGTERM);
 	tst_tmpdir();
 #ifdef LARGE_FILE
-	if ((rofd = open64(filename, O_RDONLY|O_CREAT, 0777)) == -1) {
+	if ((rofd = open64(filename, O_RDONLY | O_CREAT, 0777)) == -1) {
 #else /* LARGE_FILE */
-	if ((rofd = open(filename, O_RDONLY|O_CREAT, 0777)) == -1) {
+	if ((rofd = open(filename, O_RDONLY | O_CREAT, 0777)) == -1) {
 #endif /* LARGE_FILE */
 		ERROR("read only open failed");
 		anyfail();	//LTP Port
@@ -184,10 +180,10 @@
 		anyfail();	//LTP Port
 	}
 #ifdef LARGE_FILE
-	seekoff = startoffset + (off64_t)64 * (off64_t)6 * (off64_t)pagesize;
+	seekoff = startoffset + (off64_t) 64 *(off64_t) 6 *(off64_t) pagesize;
 	if (lseek64(rwfd, seekoff, SEEK_SET) != seekoff) {
 #else /* LARGE_FILE */
-	seekoff = startoffset + (off_t)64 * (off_t)6 * (off_t)pagesize;
+	seekoff = startoffset + (off_t) 64 *(off_t) 6 *(off_t) pagesize;
 	if (lseek(rwfd, seekoff, SEEK_SET) != seekoff) {
 #endif /* LARGE_FILE */
 		CLEANERROR("first lseek failed");
@@ -213,23 +209,23 @@
 	 */
 	for (i = 0; i < 64; i++) {
 		for (j = 0; j < 6; j++) {
-			if (i & (1<<j)) {
+			if (i & (1 << j)) {
 #ifdef LARGE_FILE
 				mapoff = startoffset +
-					 (off64_t)pagesize * (off64_t)(6+i+j);
-				if (mmap64(mmapaddr+pagesize*(6*i+j),
-					pagesize, PROT_READ,
-					MAP_FILE|MAP_PRIVATE|MAP_FIXED, rofd,
-					mapoff)
-				        == (caddr_t)-1) {
+				    (off64_t) pagesize *(off64_t) (6 + i + j);
+				if (mmap64(mmapaddr + pagesize * (6 * i + j),
+					   pagesize, PROT_READ,
+					   MAP_FILE | MAP_PRIVATE | MAP_FIXED,
+					   rofd, mapoff)
+				    == (caddr_t) - 1) {
 #else /* LARGE_FILE */
 				mapoff = startoffset +
-					 (off_t)pagesize * (off_t)(6+i+j);
-				if (mmap(mmapaddr+pagesize*(6*i+j),
-					pagesize, PROT_READ,
-					MAP_FILE|MAP_PRIVATE|MAP_FIXED, rofd,
-					mapoff)
-				        == (caddr_t)-1) {
+				    (off_t) pagesize *(off_t) (6 + i + j);
+				if (mmap(mmapaddr + pagesize * (6 * i + j),
+					 pagesize, PROT_READ,
+					 MAP_FILE | MAP_PRIVATE | MAP_FIXED,
+					 rofd, mapoff)
+				    == (caddr_t) - 1) {
 #endif /* LARGE_FILE */
 					CLEANERROR("mmap failed");
 					anyfail();	//LTP Port
@@ -238,11 +234,11 @@
 		}
 	}
 	/* done mapping */
-	for (i = 0; i < 6*pagesize; i++)
+	for (i = 0; i < 6 * pagesize; i++)
 		buf[i] = 'a';
 	/* write out 6 pages of stuff into each of the 64 six page sections */
 #ifdef LARGE_FILE
-	if (lseek64(rwfd, startoffset,  SEEK_SET) != startoffset) {
+	if (lseek64(rwfd, startoffset, SEEK_SET) != startoffset) {
 #else /* LARGE_FILE */
 	if (lseek(rwfd, startoffset, SEEK_SET) != startoffset) {
 #endif /* LARGE_FILE */
@@ -250,7 +246,7 @@
 		anyfail();	//LTP Port
 	}
 	for (i = 0; i < 64; i++) {
-		if (write(rwfd, buf, 6*pagesize) != 6*pagesize) {
+		if (write(rwfd, buf, 6 * pagesize) != 6 * pagesize) {
 			CLEANERROR("write failed");
 			anyfail();	//LTP Port
 		}
@@ -261,12 +257,14 @@
 	for (i = 0; i < 64; i++) {
 		for (j = 0; j < 6; j++) {
 			/* if mmaped && not updated */
-			if ((i & (1<<j)) && *(mmapaddr+pagesize*(6*i+j))!='a')
-			{
+			if ((i & (1 << j))
+			    && *(mmapaddr + pagesize * (6 * i + j)) != 'a') {
 				CLEANERROR("'a' missing from mmap");
 				(void)fprintf(stderr, "i=%d\nj=%d\n"
-					"val=0x%x\n", i, j,
-					(int)(*(mmapaddr+pagesize*(6*i+j))));
+					      "val=0x%x\n", i, j,
+					      (int)(*
+						    (mmapaddr +
+						     pagesize * (6 * i + j))));
 				anyfail();	//LTP Port
 			}
 		}
@@ -276,10 +274,10 @@
 	 */
 	CLEAN;
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
-   	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed\n") : tst_resm(TPASS, "Test passed\n"); //LTP Port
-  	tst_rmdir();
-   	tst_exit();	//LTP Port
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed\n") : tst_resm(TPASS, "Test passed\n");	//LTP Port
+	tst_rmdir();
+	tst_exit();		//LTP Port
 
 	tst_exit();
 }
@@ -287,10 +285,10 @@
 /*****	LTP Port	*****/
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_rmdir();
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
+	return 0;
 }
 
 /*****	**	**	*****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress05.c b/testcases/kernel/mem/mmapstress/mmapstress05.c
index e587908..d26e57b 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress05.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress05.c
@@ -49,7 +49,7 @@
 #define PASSED 1
 
 int local_flag = PASSED;
-char *TCID = "mmapstress05";//mfile_insque
+char *TCID = "mmapstress05";	//mfile_insque
 FILE *temp;
 int TST_TOTAL = 1;
 
@@ -81,8 +81,8 @@
                 exit(1); \
         }
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
 extern void exit(int);
 
 static int fd;
@@ -90,10 +90,8 @@
 static char tmpname[] = "fileXXXXXX";
 static char *progname;
 
-/*ARGSUSED*/
-static
-void
-cleanup(int sig)
+ /*ARGSUSED*/ static
+void cleanup(int sig)
 {
 	/*
 	 * Don't check error codes - we could be signaled before the file is
@@ -104,15 +102,14 @@
 	exit(1);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	size_t			pagesize = (size_t)sysconf(_SC_PAGE_SIZE);
-	caddr_t			mmapaddr;
-	char			*buf;
-	time_t			t;
-	int			i;
-	struct sigaction	sa;
+	size_t pagesize = (size_t) sysconf(_SC_PAGE_SIZE);
+	caddr_t mmapaddr;
+	char *buf;
+	time_t t;
+	int i;
+	struct sigaction sa;
 
 	if (!argc) {
 		(void)fprintf(stderr, "argc == 0\n");
@@ -121,8 +118,8 @@
 	tst_tmpdir();
 	progname = argv[0];
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t)); LTP Port
-	if (sbrk(pagesize-((ulong)sbrk(0)&(pagesize-1))) == (char *)-1) {
+//      (void)printf("%s: Started %s", argv[0], ctime(&t)); LTP Port
+	if (sbrk(pagesize - ((ulong) sbrk(0) & (pagesize - 1))) == (char *)-1) {
 		ERROR("couldn't round up brk");
 		anyfail();
 	}
@@ -130,37 +127,37 @@
 		ERROR("couldn't allocate output buffer");
 		anyfail();
 	}
-	if ((mmapaddr = (caddr_t)sbrk(0)) == (caddr_t)-1) {
+	if ((mmapaddr = (caddr_t) sbrk(0)) == (caddr_t) - 1) {
 		ERROR("couldn't find top of brk");
 		anyfail();
 	}
 
 	/* i changed the second argument to NULL
-	from argv[0]. otherwise it causes the
-	open to fail
-	-- sreeni
-	*/
+	   from argv[0]. otherwise it causes the
+	   open to fail
+	   -- sreeni
+	 */
 
-	if ((fd = mkstemp(tmpname))==-1) {
+	if ((fd = mkstemp(tmpname)) == -1) {
 		ERROR("mkstemp failed");
 		anyfail();
 	}
 	sa.sa_handler = cleanup;
-        sa.sa_flags = 0;
-        if (sigemptyset(&sa.sa_mask)) {
+	sa.sa_flags = 0;
+	if (sigemptyset(&sa.sa_mask)) {
 		ERROR("sigemptyset failed");
 		anyfail();
-        }
+	}
 	CATCH_SIG(SIGINT);
-        CATCH_SIG(SIGQUIT);
-        CATCH_SIG(SIGTERM);
+	CATCH_SIG(SIGQUIT);
+	CATCH_SIG(SIGTERM);
 	for (i = 0; i < pagesize; i++)
 		buf[i] = 'a';
 	if (write(fd, buf, pagesize) != pagesize) {
 		CERROR("couldn't write page case 1");
 		anyfail();
 	}
-	if (lseek(fd, MMU_NARROWPTEPG*pagesize, SEEK_SET) == -1) {
+	if (lseek(fd, MMU_NARROWPTEPG * pagesize, SEEK_SET) == -1) {
 		CERROR("lseek case 1 failed");
 		anyfail();
 	}
@@ -168,7 +165,7 @@
 		CERROR("couldn't write page case 2");
 		anyfail();
 	}
-	if (lseek(fd, 2*MMU_NARROWPTEPG*pagesize, SEEK_SET) == -1) {
+	if (lseek(fd, 2 * MMU_NARROWPTEPG * pagesize, SEEK_SET) == -1) {
 		CERROR("lseek case 2 failed");
 		anyfail();
 	}
@@ -180,44 +177,43 @@
 	 * Hopefully different mfile objects will be needed to reference each
 	 * page.
 	 */
-	if (mmap(mmapaddr+pagesize, pagesize, PROT_READ,
-		MAP_FILE|MAP_PRIVATE|MAP_FIXED, fd, MMU_NARROWPTEPG*pagesize)
-		== (caddr_t)-1)
-	{
+	if (mmap(mmapaddr + pagesize, pagesize, PROT_READ,
+		 MAP_FILE | MAP_PRIVATE | MAP_FIXED, fd,
+		 MMU_NARROWPTEPG * pagesize)
+	    == (caddr_t) - 1) {
 		CERROR("first mmap (of third page) failed");
 		anyfail();
 	}
 	if (mmap(mmapaddr, pagesize, PROT_READ,
-		MAP_FILE|MAP_PRIVATE|MAP_FIXED, fd, 2*MMU_NARROWPTEPG*pagesize)
-		== (caddr_t)-1)
-	{
+		 MAP_FILE | MAP_PRIVATE | MAP_FIXED, fd,
+		 2 * MMU_NARROWPTEPG * pagesize)
+	    == (caddr_t) - 1) {
 		CERROR("second mmap (of fifth page) failed");
 		anyfail();
 	}
-	if (mmap(mmapaddr+2*pagesize, pagesize, PROT_READ,
-		MAP_FILE|MAP_PRIVATE|MAP_FIXED, fd, 0) == (caddr_t)-1)
-	{
+	if (mmap(mmapaddr + 2 * pagesize, pagesize, PROT_READ,
+		 MAP_FILE | MAP_PRIVATE | MAP_FIXED, fd, 0) == (caddr_t) - 1) {
 		CERROR("third mmap (of first page) failed");
 		anyfail();
 	}
-	CLEAN; /*comment*/
+	CLEAN;			/*comment */
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
 	ok_exit();
 	tst_exit();
 }
 
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
-  	tst_rmdir();
+	tst_resm(TPASS, "Test passed\n");
+	tst_rmdir();
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_rmdir();
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
+	return 0;
 }
diff --git a/testcases/kernel/mem/mmapstress/mmapstress06.c b/testcases/kernel/mem/mmapstress/mmapstress06.c
index 588d229..66beaa9 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress06.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress06.c
@@ -42,7 +42,7 @@
 #define PASSED 1
 
 int local_flag = PASSED;
-char *TCID = "mmapstress06"; //mfile_swap
+char *TCID = "mmapstress06";	//mfile_swap
 FILE *temp;
 int TST_TOTAL = 1;
 
@@ -52,20 +52,20 @@
 
 #define ANON_GRAN_PAGES_MAX	(32U)
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
 extern int atoi(const char *);
 
 #define NMFPTEPG		(1024)
 #define ERROR(M)	(void)fprintf(stderr, "%s: errno = %d; " M "\n", \
 				argv[0], errno);
 
-int
-main(int argc, char *argv[]) {
-	caddr_t	mmapaddr;
-	size_t	pagesize = sysconf(_SC_PAGE_SIZE);
-	time_t	t;
-	int	sleep_time=0;
+int main(int argc, char *argv[])
+{
+	caddr_t mmapaddr;
+	size_t pagesize = sysconf(_SC_PAGE_SIZE);
+	time_t t;
+	int sleep_time = 0;
 
 	if (!argc) {
 		(void)fprintf(stderr, "argc == 0\n");
@@ -76,26 +76,28 @@
 		anyfail();
 	}
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t));  LTP Port
-	if (sbrk(pagesize - ((ulong)sbrk(0) & (pagesize-1))) == (char *)-1) {
+//      (void)printf("%s: Started %s", argv[0], ctime(&t));  LTP Port
+	if (sbrk(pagesize - ((ulong) sbrk(0) & (pagesize - 1))) == (char *)-1) {
 		ERROR("couldn't round up brk");
-                anyfail();
+		anyfail();
 	}
 	if ((mmapaddr = sbrk(0)) == (char *)-1) {
 		ERROR("couldn't find top of brk");
-                anyfail();
+		anyfail();
 	}
 	/* mmapaddr is now on a page boundary after the brk segment */
-	if (mmap(mmapaddr, (ANON_GRAN_PAGES_MAX*NMFPTEPG+1)*pagesize, PROT_READ|PROT_WRITE,MAP_ANONYMOUS|MAP_SHARED, 0, 0)==(caddr_t)-1)
-	{
+	if (mmap
+	    (mmapaddr, (ANON_GRAN_PAGES_MAX * NMFPTEPG + 1) * pagesize,
+	     PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, 0,
+	     0) == (caddr_t) - 1) {
 		ERROR("large mmap failed");
-		printf ("for this test to run, it needs a mmap space of\n");
-		printf ("%d pages\n", (ANON_GRAN_PAGES_MAX*NMFPTEPG+1));
+		printf("for this test to run, it needs a mmap space of\n");
+		printf("%d pages\n", (ANON_GRAN_PAGES_MAX * NMFPTEPG + 1));
 		return 1;
 	}
 	(void)sleep(sleep_time);
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
 	ok_exit();
 	tst_exit();
 }
@@ -103,15 +105,15 @@
 /*****	LTP Port	*****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
+	tst_resm(TPASS, "Test passed\n");
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_exit();
+	return 0;
 }
 
 /*****	**	**	*****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress07.c b/testcases/kernel/mem/mmapstress/mmapstress07.c
index 45db6aa..5854b63 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress07.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress07.c
@@ -57,10 +57,10 @@
                 exit(1); \
         }
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
-extern void	exit(int);
-static int	checkchars(int fd, char val, int n);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
+extern void exit(int);
+static int checkchars(int fd, char val, int n);
 
 char *TCID = "mmapstress07";
 
@@ -72,48 +72,48 @@
 int anyfail();
 void ok_exit();
 
-/*ARGSUSED*/
-static
-void
-cleanup(int sig)
+ /*ARGSUSED*/ static
+void cleanup(int sig)
 {
-        /*
-         * Don't check error codes - we could be signaled before the file is
-         * created.
-         */
-        (void)unlink(tmpname);
-        exit(1);
+	/*
+	 * Don't check error codes - we could be signaled before the file is
+	 * created.
+	 */
+	(void)unlink(tmpname);
+	exit(1);
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
-	size_t			pagesize = (size_t)sysconf(_SC_PAGE_SIZE);
-	caddr_t			mapaddr;
-	time_t			t;
-	int			rofd, rwfd, i;
-        struct sigaction        sa;
-	int			e_pageskip;
+	size_t pagesize = (size_t) sysconf(_SC_PAGE_SIZE);
+	caddr_t mapaddr;
+	time_t t;
+	int rofd, rwfd, i;
+	struct sigaction sa;
+	int e_pageskip;
 #ifdef LARGE_FILE
-	off64_t			holesize;
-	off64_t			sparseoff;
+	off64_t holesize;
+	off64_t sparseoff;
 #else /* LARGE_FILE */
-	off_t			holesize;
-	off_t			sparseoff;
+	off_t holesize;
+	off_t sparseoff;
 #endif /* LARGE_FILE */
 
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t));
+//      (void)printf("%s: Started %s", argv[0], ctime(&t));
 	/* Test fsync & mmap over a hole in a sparse file & extend fragment */
 	if (argc < 2 || argc > 5) {
-		fprintf(stderr, "Usage: mmapstress07 filename holesize e_pageskip sparseoff\n");
+		fprintf(stderr,
+			"Usage: mmapstress07 filename holesize e_pageskip sparseoff\n");
 		/*****	**	LTP Port 02/01/03	**	**** */
-		fprintf(stderr, "\t*holesize should be a multiple of pagesize\n");
+		fprintf(stderr,
+			"\t*holesize should be a multiple of pagesize\n");
 		fprintf(stderr, "\t*e_pageskip should be 1 always \n");
-		fprintf(stderr, "\t*sparseoff should be a multiple of pagesize\n");
+		fprintf(stderr,
+			"\t*sparseoff should be a multiple of pagesize\n");
 		fprintf(stderr, "Example: mmapstress07 myfile 4096 1 8192\n");
 		/*****	**	******	*****	*****	**	02/01/03 */
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	tst_tmpdir();
 	tmpname = argv[1];
@@ -124,8 +124,7 @@
 #else /* LARGE_FILE */
 		holesize = atoi(argv[2]);
 #endif /* LARGE_FILE */
-	}
-	else
+	} else
 		holesize = pagesize;
 
 	if (argc >= 4)
@@ -139,26 +138,25 @@
 #else /* LARGE_FILE */
 		sparseoff = atoi(argv[4]);
 #endif /* LARGE_FILE */
-	}
-	else
-		sparseoff = pagesize*2;
+	} else
+		sparseoff = pagesize * 2;
 
-        sa.sa_handler = cleanup;
-        sa.sa_flags = 0;
-        if (sigemptyset(&sa.sa_mask)) {
-                ERROR("sigemptyset failed");
-                return 1;
-        }
-        CATCH_SIG(SIGINT);
-        CATCH_SIG(SIGQUIT);
-        CATCH_SIG(SIGTERM);
+	sa.sa_handler = cleanup;
+	sa.sa_flags = 0;
+	if (sigemptyset(&sa.sa_mask)) {
+		ERROR("sigemptyset failed");
+		return 1;
+	}
+	CATCH_SIG(SIGINT);
+	CATCH_SIG(SIGQUIT);
+	CATCH_SIG(SIGTERM);
 #ifdef LARGE_FILE
-	if ((rofd = open64(tmpname, O_RDONLY|O_CREAT, 0777)) == -1) {
+	if ((rofd = open64(tmpname, O_RDONLY | O_CREAT, 0777)) == -1) {
 #else /* LARGE_FILE */
-	if ((rofd = open(tmpname, O_RDONLY|O_CREAT, 0777)) == -1) {
+	if ((rofd = open(tmpname, O_RDONLY | O_CREAT, 0777)) == -1) {
 #endif /* LARGE_FILE */
 		ERROR("couldn't reopen rofd for reading");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 #ifdef LARGE_FILE
 	if ((rwfd = open64(tmpname, O_RDWR)) == -1) {
@@ -166,7 +164,7 @@
 	if ((rwfd = open(tmpname, O_RDWR)) == -1) {
 #endif /* LARGE_FILE */
 		CLEANERROR("couldn't reopen rwfd for read/write");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 #ifdef LARGE_FILE
 	if (lseek64(rwfd, sparseoff, SEEK_SET) < 0) {
@@ -174,7 +172,7 @@
 	if (lseek(rwfd, sparseoff, SEEK_SET) < 0) {
 #endif /* LARGE_FILE */
 		perror("lseek");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* fill file with junk. */
 	i = 0;
@@ -182,7 +180,7 @@
 		i++;
 	if (i != pagesize) {
 		CLEANERROR("couldn't fill first part of file with junk");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 #ifdef LARGE_FILE
 	if (lseek64(rwfd, holesize, SEEK_CUR) == -1) {
@@ -190,41 +188,43 @@
 	if (lseek(rwfd, holesize, SEEK_CUR) == -1) {
 #endif /* LARGE_FILE */
 		CLEANERROR("couldn't create hole in file");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* create fragment */
 	i = 0;
-	while (i < (pagesize>>1) && write(rwfd, "b", 1) == 1)
+	while (i < (pagesize >> 1) && write(rwfd, "b", 1) == 1)
 		i++;
-	if (i != (pagesize>>1)) {
+	if (i != (pagesize >> 1)) {
 		CLEANERROR("couldn't fill second part of file with junk");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* At this point fd contains 1 page of a's, holesize bytes skipped,
 	 * 1/2 page of b's.
 	 */
 
 #ifdef LARGE_FILE
-	if ((mapaddr = mmap64((caddr_t)0, pagesize*2 + holesize, PROT_READ,
-		MAP_SHARED|MAP_FILE, rofd, sparseoff)) == (caddr_t)-1) {
+	if ((mapaddr = mmap64((caddr_t) 0, pagesize * 2 + holesize, PROT_READ,
+			      MAP_SHARED | MAP_FILE, rofd,
+			      sparseoff)) == (caddr_t) - 1) {
 #else /* LARGE_FILE */
-	if ((mapaddr = mmap((caddr_t)0, pagesize*2 + holesize, PROT_READ,
-		MAP_SHARED|MAP_FILE, rofd, sparseoff)) == (caddr_t)-1) {
+	if ((mapaddr = mmap((caddr_t) 0, pagesize * 2 + holesize, PROT_READ,
+			    MAP_SHARED | MAP_FILE, rofd,
+			    sparseoff)) == (caddr_t) - 1) {
 #endif /* LARGE_FILE */
 		CLEANERROR("mmap tmp file failed");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* fill out remainder of page + one more page to extend mmapped flag */
-	while (i < 2*pagesize && write(rwfd, "c", 1) == 1)
+	while (i < 2 * pagesize && write(rwfd, "c", 1) == 1)
 		i++;
-	if (i != 2*pagesize) {
+	if (i != 2 * pagesize) {
 		CLEANERROR("couldn't fill second part of file with junk");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* fiddle with mmapped hole */
-	if (*(mapaddr + pagesize + (holesize>>1)) != 0) {
+	if (*(mapaddr + pagesize + (holesize >> 1)) != 0) {
 		CLEANERROR("hole not filled with 0's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 #ifdef LARGE_FILE
 	if (lseek64(rwfd, sparseoff + e_pageskip * pagesize, SEEK_SET) == -1) {
@@ -232,18 +232,18 @@
 	if (lseek(rwfd, sparseoff + e_pageskip * pagesize, SEEK_SET) == -1) {
 #endif /* LARGE_FILE */
 		CLEANERROR("couldn't lseek back to put e's in hole");
-		anyfail(); /*LTP Port */
+		anyfail();	/*LTP Port */
 	}
 	i = 0;
 	while (i < pagesize && write(rwfd, "e", 1) == 1)
 		i++;
 	if (i != pagesize) {
 		CLEANERROR("couldn't part of hole with e's");
-		anyfail(); /*LTP Port */
+		anyfail();	/*LTP Port */
 	}
 	if (fsync(rwfd) == -1) {
 		CLEANERROR("fsync failed");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 #ifdef LARGE_FILE
 	if (lseek64(rofd, sparseoff, SEEK_SET) == -1) {
@@ -251,47 +251,47 @@
 	if (lseek(rofd, sparseoff, SEEK_SET) == -1) {
 #endif /* LARGE_FILE */
 		CLEANERROR("couldn't lseek to begining to verify contents");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
-	if (munmap(mapaddr, holesize + 2*pagesize) == -1) {
+	if (munmap(mapaddr, holesize + 2 * pagesize) == -1) {
 		CLEANERROR("munmap of tmp file failed");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	/* check file's contents */
 	if (checkchars(rofd, 'a', pagesize)) {
 		CLEANERROR("first page not filled with a's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	if (checkchars(rofd, '\0', (e_pageskip - 1) * pagesize)) {
 		CLEANERROR("e_skip not filled with 0's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	if (checkchars(rofd, 'e', pagesize)) {
 		CLEANERROR("part after first 0's not filled with e's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	if (checkchars(rofd, '\0', holesize - e_pageskip * pagesize)) {
 		CLEANERROR("second hole section not filled with 0's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
-	if (checkchars(rofd, 'b', (pagesize>>1))) {
+	if (checkchars(rofd, 'b', (pagesize >> 1))) {
 		CLEANERROR("next to last half page not filled with b's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
-	if (checkchars(rofd, 'c', pagesize + (pagesize>>1))) {
+	if (checkchars(rofd, 'c', pagesize + (pagesize >> 1))) {
 		CLEANERROR("extended fragment not filled with c's");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	if (close(rofd) == -1) {
 		CLEANERROR("second close of rofd failed");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	if (unlink(tmpname) == -1) {
 		CLEANERROR("unlink failed");
-		anyfail(); /* LTP Port */
+		anyfail();	/* LTP Port */
 	}
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t));
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t));
 	ok_exit();
 	tst_exit();
 }
@@ -300,8 +300,7 @@
  * 	verrify that the next n characters of file fd are of value val.
  *	0 = success; -1 = failure
  */
-static int
-checkchars(int fd, char val, int n)
+static int checkchars(int fd, char val, int n)
 {
 	int i;
 	char buf;
@@ -315,17 +314,17 @@
 /*****	**	LTP Port	**	*****/
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_rmdir();
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
+	return 0;
 }
 
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
+	tst_resm(TPASS, "Test passed\n");
 	tst_rmdir();
-        tst_exit();
+	tst_exit();
 }
 
 /*****	**	******		**	*****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress08.c b/testcases/kernel/mem/mmapstress/mmapstress08.c
index d186484..ed0d7fe 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress08.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress08.c
@@ -53,16 +53,14 @@
 #define GRAN_NUMBER	(1<<8)
 	/* == 256 @ 4MB per mmap(2), we span a total of 1 GB */
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
-extern long	sysconf(int name);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
+extern long sysconf(int name);
 
 #define ERROR(M) (void)fprintf(stderr, "%s: errno = %d: " M "\n", argv[0], \
 			errno)
 
-/*ARGSUSED*/
-int
-main(int argc, char *argv[])
+ /*ARGSUSED*/ int main(int argc, char *argv[])
 {
 	caddr_t mmapaddr, munmap_begin;
 	long pagesize = sysconf(_SC_PAGE_SIZE);
@@ -71,36 +69,36 @@
 
 	(void)time(&t);
 	//(void)printf("%s: Started %s", argv[0], ctime(&t));
-	if (sbrk(pagesize - ((u_long)sbrk(0)%(u_long)pagesize))==(char *)-1) {
+	if (sbrk(pagesize - ((u_long) sbrk(0) % (u_long) pagesize)) ==
+	    (char *)-1) {
 		ERROR("couldn't round up brk to a page boundary");
-                local_flag = FAILED;
-                anyfail();
+		local_flag = FAILED;
+		anyfail();
 	}
 	/* The brk is now at the begining of a page. */
 
-	if ((munmap_begin = mmapaddr = (caddr_t)sbrk(0)) == (caddr_t)-1) {
+	if ((munmap_begin = mmapaddr = (caddr_t) sbrk(0)) == (caddr_t) - 1) {
 		ERROR("couldn't find top of brk");
-                local_flag = FAILED;
-                anyfail();
+		local_flag = FAILED;
+		anyfail();
 	}
 	mmapaddr = 0;
 	/* burn level 2 ptes by spacing mmaps 4Meg apart */
 	/* This should switch to large anonymous swap space granularity */
 	for (i = 0; i < GRAN_NUMBER; i++) {
-		if (mmap(mmapaddr, pagesize, PROT_READ|PROT_WRITE,
-			MAP_ANONYMOUS|MAP_PRIVATE, 0, 0)==(caddr_t)-1)
-		{
+		if (mmap(mmapaddr, pagesize, PROT_READ | PROT_WRITE,
+			 MAP_ANONYMOUS | MAP_PRIVATE, 0, 0) == (caddr_t) - 1) {
 			ERROR("mmap failed");
-                	local_flag = FAILED;
-                	anyfail();
+			local_flag = FAILED;
+			anyfail();
 		}
-		mmapaddr += NPTEPG*pagesize;
+		mmapaddr += NPTEPG * pagesize;
 	}
 	/* Free bizillion level2 ptes to switch to small granularity */
-	if (munmap(munmap_begin, (size_t)(mmapaddr-munmap_begin))) {
+	if (munmap(munmap_begin, (size_t) (mmapaddr - munmap_begin))) {
 		ERROR("munmap failed");
-                local_flag = FAILED;
-                anyfail();
+		local_flag = FAILED;
+		anyfail();
 	}
 	(void)time(&t);
 	//(void)printf("%s: Finished %s", argv[0], ctime(&t));
@@ -111,23 +109,22 @@
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
+	tst_resm(TPASS, "Test passed\n");
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_exit();
+	return 0;
 }
 
 #else /* defined(__i386__) || defined(__x86_64__) */
-int
-main (void)
+int main(void)
 {
-  tst_resm (TCONF, "Test is only applicable for IA-32 and x86-64.");
-  tst_exit ();
+	tst_resm(TCONF, "Test is only applicable for IA-32 and x86-64.");
+	tst_exit();
 }
 #endif
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress09.c b/testcases/kernel/mem/mmapstress/mmapstress09.c
index 607f043..ad2d70b 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress09.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress09.c
@@ -74,31 +74,31 @@
  */
 
 #define MAXLOOPS	500	/* max pages for map children to write */
-#define	MAPSIZE		(64*1024)   /* default mapsize set up by parent */
+#define	MAPSIZE		(64*1024)	/* default mapsize set up by parent */
 #ifdef roundup
 #undef roundup
 #endif
 #define roundup(x, y)	((((x)+((y)-1))/(y))*(y))
 #define min(x, y)	(((x) < (y)) ? (x) : (y))
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
 extern void *malloc(size_t);
 extern void exit(int);
 extern long lrand48(void);
 extern void srand(unsigned);
 extern void srand48(long);
-extern int  rand(void);
-extern int  atoi(const char *);
+extern int rand(void);
+extern int atoi(const char *);
 
 typedef unsigned char uchar_t;
 
-char *usage="-p nprocs [-t minutes -s mapsize -m -r -d]";
+char *usage = "-p nprocs [-t minutes -s mapsize -m -r -d]";
 
 unsigned int initrand(void);
 void finish(int sig);
 void child_mapper(unsigned procno, unsigned nprocs);
-int mapokay(uchar_t *expbuf);
+int mapokay(uchar_t * expbuf);
 
 int finished = 0;
 int debug = 0;
@@ -110,15 +110,14 @@
 unsigned pattern = 0;
 caddr_t mapaddr;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *progname;
 	unsigned c;
 	extern char *optarg;
 	unsigned nprocs = 0;
 	unsigned procno;
-	pid_t *pidarray=NULL;
+	pid_t *pidarray = NULL;
 	pid_t pid;
 	uchar_t *buf, *ptr;
 	unsigned int seed;
@@ -156,8 +155,8 @@
 			mapsize = atoi(optarg);
 			if (mapsize < 0) {
 				(void)fprintf(stderr, "error: negative "
-					"mapsize\n");
-                		anyfail();
+					      "mapsize\n");
+				anyfail();
 			}
 			break;
 		case 'r':
@@ -165,64 +164,65 @@
 			break;
 		default:
 			(void)fprintf(stderr, "usage: %s %s\n", progname,
-				usage);
-        	        anyfail();
+				      usage);
+			anyfail();
 		}
 	}
 
 	/* nprocs is unsigned */
 	if (nprocs > 255) {
 		(void)fprintf(stderr, "invalid nprocs %d - (range 0-255)\n",
-			nprocs);
-                anyfail();
+			      nprocs);
+		anyfail();
 	}
 	(void)time(&t);
-//	(void)printf("%s: Started %s", argv[0], ctime(&t)); LTP Port
+//      (void)printf("%s: Started %s", argv[0], ctime(&t)); LTP Port
 
 	seed = initrand();
 	pattern = seed & 0xff;
 
 	if (debug) {
 		(void)printf("%s mapsize %d bytes, pattern %d\n",
-			progname, mapsize, pattern);
+			     progname, mapsize, pattern);
 		if (alarmtime)
-			(void)printf("running for %f minutes\n", alarmtime/60);
+			(void)printf("running for %f minutes\n",
+				     alarmtime / 60);
 		else
 			(void)printf("running with no time limit\n");
 	}
 
-	if ((mapaddr = mmap(0, mapsize, PROT_READ|PROT_WRITE,
-			    MAP_ANONYMOUS|MAP_SHARED, 0, 0))
-			    == (caddr_t)-1) {
+	if ((mapaddr = mmap(0, mapsize, PROT_READ | PROT_WRITE,
+			    MAP_ANONYMOUS | MAP_SHARED, 0, 0))
+	    == (caddr_t) - 1) {
 		perror("mmap error");
-                anyfail();
+		anyfail();
 	}
 
-	if ((buf = (uchar_t *)malloc(pagesize)) == NULL
-	    || (pidarray = (pid_t *)malloc(nprocs*sizeof(pid_t))) == NULL) {
+	if ((buf = (uchar_t *) malloc(pagesize)) == NULL
+	    || (pidarray = (pid_t *) malloc(nprocs * sizeof(pid_t))) == NULL) {
 		perror("malloc error");
-                anyfail();
+		anyfail();
 	}
 
 	for (i = 0; i < nprocs; i++)
-		*(pidarray+i) = 0;
+		*(pidarray + i) = 0;
 
 	/*
 	 * Initialize page compare buffer, then initialize map.
 	 */
 
 	for (i = 0, data = 0; i < pagesize; i++) {
-		*(buf+i) = (data + pattern) & 0xff;
+		*(buf + i) = (data + pattern) & 0xff;
 		if (++data == nprocs)
 			data = 0;
 	}
 
-	mappages = roundup(mapsize, pagesize)/pagesize;
-	ptr = (uchar_t *)mapaddr;
+	mappages = roundup(mapsize, pagesize) / pagesize;
+	ptr = (uchar_t *) mapaddr;
 
 	for (i = 0; i < mappages; i++) {
 		for (j = 0; j < pagesize; j++)
-			*ptr++ = *(buf+j);
+			*ptr++ = *(buf + j);
 	}
 
 	/*
@@ -294,7 +294,7 @@
 			if (!WIFEXITED(wait_stat)
 			    || WEXITSTATUS(wait_stat) != 0) {
 				(void)fprintf(stderr, "child exit with err "
-					"<x%x>\n", wait_stat);
+					      "<x%x>\n", wait_stat);
 				goto cleanup;
 			}
 			for (i = 0; i < nprocs; i++)
@@ -302,8 +302,8 @@
 					break;
 			if (i == nprocs) {
 				(void)fprintf(stderr,
-					"unknown child pid %d, <x%x>\n",
-					pid, wait_stat);
+					      "unknown child pid %d, <x%x>\n",
+					      pid, wait_stat);
 				goto cleanup;
 			}
 
@@ -311,7 +311,7 @@
 				perror("fork error");
 				pidarray[i] = 0;
 				goto cleanup;
-			} else if (pid == 0) {		/* child */
+			} else if (pid == 0) {	/* child */
 				child_mapper(i, nprocs);
 				exit(0);
 			} else
@@ -355,14 +355,13 @@
 	if (no_prob) {		/* only check file if no errors */
 		if (!mapokay(buf)) {
 			(void)fprintf(stderr, "map data incorrect!\n");
-               		 anyfail();
-		}
-		else
+			anyfail();
+		} else
 			(void)printf("map data okay\n");
 	}
 
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP POrt
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP POrt
 	ok_exit();
 	tst_exit();
 }
@@ -373,8 +372,7 @@
  *  determined based on nprocs & procno).  After a specific number of
  *  iterations, it exits.
  */
-void
-child_mapper(unsigned procno, unsigned nprocs)
+void child_mapper(unsigned procno, unsigned nprocs)
 {
 	uchar_t *paddr;
 	unsigned randpage;
@@ -383,50 +381,51 @@
 	unsigned nloops;
 	unsigned i;
 
-	seed = initrand();		/* initialize random seed */
+	seed = initrand();	/* initialize random seed */
 
 	nloops = (randloops) ? (lrand48() % MAXLOOPS) : MAXLOOPS;
 
 	if (debug)
 		(void)printf("child %d (pid %d): seed %d, loop %d\n",
-			procno, getpid(), seed, nloops);
+			     procno, getpid(), seed, nloops);
 
 	/*
 	 *  Now loop read/writing random pages.
 	 */
 
-	 for (loopcnt = 0; loopcnt < nloops; loopcnt++) {
+	for (loopcnt = 0; loopcnt < nloops; loopcnt++) {
 		randpage = lrand48() % mappages;
 		/* find the page address */
-		paddr = (uchar_t *)(mapaddr + (randpage * pagesize));
+		paddr = (uchar_t *) (mapaddr + (randpage * pagesize));
 
 		for (i = procno; i < pagesize; i += nprocs) {
-			if (*((unsigned char *)(paddr+i))
+			if (*((unsigned char *)(paddr + i))
 			    != ((procno + pattern) & 0xff)) {
 				(void)fprintf(stderr,
-					"child %d: invalid data <x%x>", procno,
-					*((unsigned char *)(paddr+i)));
+					      "child %d: invalid data <x%x>",
+					      procno,
+					      *((unsigned char *)(paddr + i)));
 				(void)fprintf(stderr,
-					" at pg %d off %d, exp <x%x>\n",
-					randpage, i, (procno+pattern)&0xff);
-			         anyfail();
+					      " at pg %d off %d, exp <x%x>\n",
+					      randpage, i,
+					      (procno + pattern) & 0xff);
+				anyfail();
 			}
 			/*
 			 *  Now write it.
 			 */
 
-			*(paddr+i) = (procno + pattern) & 0xff;
+			*(paddr + i) = (procno + pattern) & 0xff;
 		}
 	}
 
 	if (dosync) {
 		randpage = (unsigned)lrand48() % mappages;
-		paddr = (uchar_t *)mapaddr + (randpage * pagesize);
-		if (msync((caddr_t)paddr, (mappages-randpage)*pagesize,
-			MS_SYNC) == -1)
-		{
+		paddr = (uchar_t *) mapaddr + (randpage * pagesize);
+		if (msync((caddr_t) paddr, (mappages - randpage) * pagesize,
+			  MS_SYNC) == -1) {
 			perror("msync error");
-	                anyfail();
+			anyfail();
 		}
 	}
 
@@ -436,13 +435,12 @@
 /*
  *  Make sure file has all the correct data.
  */
-int
-mapokay(uchar_t *expbuf)
+int mapokay(uchar_t * expbuf)
 {
 	uchar_t *ptr;
 	unsigned i, j;
 
-	ptr = (uchar_t *)mapaddr;
+	ptr = (uchar_t *) mapaddr;
 	for (i = 0; i < mappages; i++) {
 		/*
 		 *  Compare read bytes of data.
@@ -450,10 +448,10 @@
 		for (j = 0; j < pagesize; j++) {
 			if (*ptr != expbuf[j]) {
 				(void)fprintf(stderr,
-					"bad map data: exp %c got %c)",
-					expbuf[j], *ptr);
+					      "bad map data: exp %c got %c)",
+					      expbuf[j], *ptr);
 				(void)fprintf(stderr, ", pg %d off %d\n", i, j);
-                		anyfail();
+				anyfail();
 			}
 			ptr++;
 		}
@@ -462,30 +460,27 @@
 	return 1;
 }
 
-/*ARGSUSED*/
-void
-finish(int sig)
+ /*ARGSUSED*/ void finish(int sig)
 {
 	finished++;
 	return;
 }
 
-unsigned int
-initrand(void)
+unsigned int initrand(void)
 {
 	unsigned int seed;
 
 	/*
 	 *  Initialize random seed...  Got this from a test written
 	 *  by scooter:
-	 *	Use srand/rand to diffuse the information from the
-	 *	time and pid.  If you start several processes, then
-	 *	the time and pid information don't provide much
-	 *	variation.
+	 *      Use srand/rand to diffuse the information from the
+	 *      time and pid.  If you start several processes, then
+	 *      the time and pid information don't provide much
+	 *      variation.
 	 */
 	srand((unsigned int)getpid());
 	seed = rand();
-	srand((unsigned int)time((time_t *)0));
+	srand((unsigned int)time((time_t *) 0));
 	seed = (seed ^ rand()) % 100000;
 	srand48((long int)seed);
 	return (seed);
@@ -494,15 +489,15 @@
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
+	tst_resm(TPASS, "Test passed\n");
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_exit();
+	return 0;
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mmapstress/mmapstress10.c b/testcases/kernel/mem/mmapstress/mmapstress10.c
index f3ac391..baddaff 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress10.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress10.c
@@ -111,23 +111,24 @@
 
 #define SIZE_MAX UINT_MAX
 
-extern time_t	time(time_t *);
-extern char	*ctime(const time_t *);
+extern time_t time(time_t *);
+extern char *ctime(const time_t *);
 extern void *malloc(size_t);
 extern void exit(int);
 extern long lrand48(void);
 extern void srand(unsigned);
 extern void srand48(long);
-extern int  rand(void);
-extern int  atoi(const char *);
+extern int rand(void);
+extern int atoi(const char *);
 
-char *usage="-p nprocs [-t minutes -w nbytes -s secs -f fsize -S sparseoffset -r -o -m -l -d]";
+char *usage =
+    "-p nprocs [-t minutes -w nbytes -s secs -f fsize -S sparseoffset -r -o -m -l -d]";
 
-typedef unsigned char uchar_t; //Ananda 12/17/02
+typedef unsigned char uchar_t;	//Ananda 12/17/02
 
 void child_mapper(char *file, unsigned procno, unsigned nprocs);
-void child_writer(char *file, uchar_t *buf);
-int fileokay(char *file, uchar_t *expbuf);
+void child_writer(char *file, uchar_t * buf);
+int fileokay(char *file, uchar_t * expbuf);
 unsigned int initrand(void);
 void finish(int sig);
 void clean_up_file(int sig);
@@ -159,8 +160,7 @@
 
 int fd_writer = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *progname;
 	int fd;
@@ -168,10 +168,10 @@
 	extern char *optarg;
 	unsigned nprocs = 0;
 	unsigned procno;
-	pid_t *pidarray=NULL;
+	pid_t *pidarray = NULL;
 	pid_t pid;
 	pid_t wr_pid = 0;
-	uchar_t *buf=NULL;
+	uchar_t *buf = NULL;
 	unsigned int seed;
 	int pagesize = sysconf(_SC_PAGE_SIZE);
 	float alarmtime = 0;
@@ -213,16 +213,16 @@
 			sleeptime = atoi(optarg);
 			if (sleeptime < 0) {
 				(void)fprintf(stderr, "error: negative "
-					"sleeptime\n");
-                	        anyfail();
+					      "sleeptime\n");
+				anyfail();
 			}
 			break;
 		case 'w':
 			growsize = atoi(optarg);
 			if (growsize < 0) {
 				(void)fprintf(stderr, "error: negative write "
-					"size\n");
-        	                anyfail();
+					      "size\n");
+				anyfail();
 			}
 			break;
 		case 'f':
@@ -233,8 +233,8 @@
 #endif /* LARGE_FILE */
 			if (filesize < 0) {
 				(void)fprintf(stderr, "error: negative "
-					"filesize\n");
-                	        anyfail();
+					      "filesize\n");
+				anyfail();
 			}
 			break;
 		case 'r':
@@ -254,21 +254,21 @@
 #endif /* LARGE_FILE */
 			if (sparseoffset % pagesize != 0) {
 				fprintf(stderr,
-				   "sparseoffset must be pagesize multiple\n");
-        	                anyfail();
+					"sparseoffset must be pagesize multiple\n");
+				anyfail();
 			}
 			break;
 		default:
 			(void)fprintf(stderr, "usage: %s %s\n", progname,
-				usage);
+				      usage);
 			anyfail();
 		}
 	}
 
 	if (nprocs > 255) {
 		(void)fprintf(stderr, "invalid nprocs %d - (range 0-255)\n",
-			nprocs);
-                anyfail();
+			      nprocs);
+		anyfail();
 	}
 	(void)time(&t);
 	//(void)printf("%s: Started %s", argv[0], ctime(&t)); LTP Port
@@ -280,13 +280,14 @@
 	if (debug) {
 #ifdef LARGE_FILE
 		(void)printf("creating file <%s> with %Ld bytes, pattern %d\n",
-			filename, filesize, pattern);
+			     filename, filesize, pattern);
 #else /* LARGE_FILE */
 		(void)printf("creating file <%s> with %ld bytes, pattern %d\n",
-			filename, filesize, pattern);
+			     filename, filesize, pattern);
 #endif /* LARGE_FILE */
 		if (alarmtime)
-			(void)printf("running for %f minutes\n", alarmtime/60);
+			(void)printf("running for %f minutes\n",
+				     alarmtime / 60);
 		else
 			(void)printf("running with no time limit\n");
 	}
@@ -324,32 +325,31 @@
 		perror("sigaction error SIGTERM");
 		goto cleanup;
 	}
-
 #ifdef LARGE_FILE
-	if ((fd = open64(filename, O_CREAT|O_TRUNC|O_RDWR, 0664)) == -1) {
+	if ((fd = open64(filename, O_CREAT | O_TRUNC | O_RDWR, 0664)) == -1) {
 #else /* LARGE_FILE */
-	if ((fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0664)) == -1) {
+	if ((fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0664)) == -1) {
 #endif /* LARGE_FILE */
 		perror("open error");
-                anyfail();
+		anyfail();
 	}
 
-	if ((buf = (uchar_t *)malloc(pagesize+growsize)) == NULL
-	    || (pidarray = (pid_t *)malloc(nprocs*sizeof(pid_t))) == NULL) {
+	if ((buf = (uchar_t *) malloc(pagesize + growsize)) == NULL
+	    || (pidarray = (pid_t *) malloc(nprocs * sizeof(pid_t))) == NULL) {
 		perror("malloc error");
-                anyfail();
+		anyfail();
 	}
 
 	for (i = 0; i < nprocs; i++)
-		*(pidarray+i) = 0;
+		*(pidarray + i) = 0;
 
 	for (i = 0, data = 0; i < pagesize; i++) {
-		*(buf+i) = (data + pattern) & 0xff;
+		*(buf + i) = (data + pattern) & 0xff;
 		if (++data == nprocs)
 			data = 0;
 	}
-	for (data = 0; i < pagesize+growsize; i++) {
-		*(buf+i) = (data + pattern) & 0xff;
+	for (data = 0; i < pagesize + growsize; i++) {
+		*(buf + i) = (data + pattern) & 0xff;
 		if (++data == nprocs)
 			data = 0;
 	}
@@ -360,7 +360,7 @@
 	if (lseek(fd, sparseoffset, SEEK_SET) < 0) {
 #endif /* LARGE_FILE */
 		perror("lseek");
-               anyfail();
+		anyfail();
 	}
 
 	for (bytes_left = filesize; bytes_left; bytes_left -= c) {
@@ -370,7 +370,7 @@
 				perror("write error");
 			} else {
 				(void)fprintf(stderr, "write: wrote %d of %d "
-					"bytes\n", c, write_cnt);
+					      "bytes\n", c, write_cnt);
 			}
 			(void)close(fd);
 			(void)unlink(filename);
@@ -434,7 +434,7 @@
 			if (!WIFEXITED(wait_stat)
 			    || WEXITSTATUS(wait_stat) != 0) {
 				(void)fprintf(stderr, "child exit with err "
-					"<x%x>\n", wait_stat);
+					      "<x%x>\n", wait_stat);
 				goto cleanup;
 			}
 			for (i = 0; i < nprocs; i++)
@@ -443,13 +443,13 @@
 			if (i == nprocs) {
 				if (pid == wr_pid) {
 					(void)fprintf(stderr,
-					"writer child unexpected exit <x%x>\n",
-						wait_stat);
+						      "writer child unexpected exit <x%x>\n",
+						      wait_stat);
 					wr_pid = 0;
 				} else
 					(void)fprintf(stderr, "unknown child "
-						"pid %d, <x%x>\n",
-						pid, wait_stat);
+						      "pid %d, <x%x>\n",
+						      pid, wait_stat);
 				goto cleanup;
 			}
 
@@ -457,7 +457,7 @@
 				perror("fork error");
 				pidarray[i] = 0;
 				goto cleanup;
-			} else if (pid == 0) {		/* child */
+			} else if (pid == 0) {	/* child */
 				child_mapper(filename, i, nprocs);
 				exit(0);
 			} else
@@ -499,7 +499,7 @@
 		if (!fileokay(filename, buf)) {
 			(void)fprintf(stderr, "file data incorrect!\n");
 			(void)printf("  leaving file <%s>\n", filename);
-                        anyfail();
+			anyfail();
 
 		} else {
 			(void)printf("file data okay\n");
@@ -510,7 +510,7 @@
 		(void)printf("  leaving file <%s>\n", filename);
 
 	(void)time(&t);
-//	(void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
+//      (void)printf("%s: Finished %s", argv[0], ctime(&t)); LTP Port
 	ok_exit();
 	tst_exit();
 }
@@ -522,8 +522,7 @@
  *  determined based on nprocs & procno).  After a specific number of
  *  iterations, it exits.
  */
-void
-child_mapper(char *file, unsigned procno, unsigned nprocs)
+void child_mapper(char *file, unsigned procno, unsigned nprocs)
 {
 #ifdef LARGE_FILE
 	struct stat64 statbuf;
@@ -548,44 +547,42 @@
 
 	mapflags = MAP_SHARED;
 
-	seed = initrand();		/* initialize random seed */
+	seed = initrand();	/* initialize random seed */
 
 	sa_mapper.sa_handler = clean_mapper;
 	sa_mapper.sa_flags = 0;
 	if (sigemptyset(&sa_mapper.sa_mask)) {
 		perror("sigempty error");
-                anyfail();
+		anyfail();
 	}
 
 	if (sigaction(SIGUSR1, &sa_mapper, 0) == -1) {
 		perror("sigaction error SIGUSR1");
-                anyfail();
+		anyfail();
 	}
-
 #ifdef LARGE_FILE
 	if ((fd_mapper = open64(file, O_RDWR)) == -1) {
 #else /* LARGE_FILE */
 	if ((fd_mapper = open(file, O_RDWR)) == -1) {
 #endif /* LARGE_FILE */
 		perror("open error");
-                anyfail();
+		anyfail();
 	}
-
 #ifdef LARGE_FILE
 	if (fstat64(fd_mapper, &statbuf) == -1) {
 #else /* LARGE_FILE */
 	if (fstat(fd_mapper, &statbuf) == -1) {
 #endif /* LARGE_FILE */
 		perror("stat error");
-                anyfail();
+		anyfail();
 	}
 	filesize = statbuf.st_size;
 
 	if (statbuf.st_size - sparseoffset > SIZE_MAX) {
 		fprintf(stderr, "size_t overflow when setting up map\n");
-                anyfail();
+		anyfail();
 	}
-	mapsize_mapper = (size_t)(statbuf.st_size - sparseoffset);
+	mapsize_mapper = (size_t) (statbuf.st_size - sparseoffset);
 	mappages = roundup(mapsize_mapper, pagesize) / pagesize;
 	offset = sparseoffset;
 	if (do_offset) {
@@ -595,16 +592,17 @@
 		mapsize_mapper -= byteoffset;
 		mappages -= pageoffset;
 	}
-
 #ifdef LARGE_FILE
-	if ((maddr_mapper = mmap64(0, mapsize_mapper, PROT_READ|PROT_WRITE,
-			mapflags, fd_mapper, offset)) == (caddr_t)-1) {
+	if ((maddr_mapper = mmap64(0, mapsize_mapper, PROT_READ | PROT_WRITE,
+				   mapflags, fd_mapper,
+				   offset)) == (caddr_t) - 1) {
 #else /* LARGE_FILE */
-	if ((maddr_mapper = mmap(0, mapsize_mapper, PROT_READ|PROT_WRITE,
-			mapflags, fd_mapper, offset)) == (caddr_t)-1) {
+	if ((maddr_mapper = mmap(0, mapsize_mapper, PROT_READ | PROT_WRITE,
+				 mapflags, fd_mapper,
+				 offset)) == (caddr_t) - 1) {
 #endif /* LARGE_FILE */
 		perror("mmap error");
-                anyfail();
+		anyfail();
 	}
 
 	(void)close(fd_mapper);
@@ -614,14 +612,14 @@
 	if (debug) {
 #ifdef LARGE_FILE
 		(void)printf("child %d (pid %ld): seed %d, fsize %Ld, "
-			"mapsize %d, off %Ld, loop %d\n",
-			procno, getpid(), seed, filesize, mapsize_mapper,
-			offset/pagesize, nloops);
+			     "mapsize %d, off %Ld, loop %d\n",
+			     procno, getpid(), seed, filesize, mapsize_mapper,
+			     offset / pagesize, nloops);
 #else /* LARGE_FILE */
 		(void)printf("child %d (pid %d): seed %d, fsize %ld, "
-			"mapsize %ld, off %ld, loop %d\n",
-			procno, getpid(), seed, filesize, (long)mapsize_mapper,
-			offset/pagesize, nloops);
+			     "mapsize %ld, off %ld, loop %d\n",
+			     procno, getpid(), seed, filesize,
+			     (long)mapsize_mapper, offset / pagesize, nloops);
 #endif /* LARGE_FILE */
 	}
 
@@ -630,10 +628,9 @@
 	 */
 	for (loopcnt = 0; loopcnt < nloops; loopcnt++) {
 		randpage = lrand48() % mappages;
-		paddr = maddr_mapper + (randpage * pagesize);	 /* page address */
+		paddr = maddr_mapper + (randpage * pagesize);	/* page address */
 
-		if (randpage < mappages - 1
-		    || !(mapsize_mapper % pagesize))
+		if (randpage < mappages - 1 || !(mapsize_mapper % pagesize))
 			validsize = pagesize;
 		else
 			validsize = mapsize_mapper % pagesize;
@@ -644,21 +641,23 @@
 		 * do an exact check -- accept known pattern OR zeros.
 		 */
 		for (i = procno; i < validsize; i += nprocs) {
-			if (*((unsigned char *)(paddr+i))
+			if (*((unsigned char *)(paddr + i))
 			    != ((procno + pattern) & 0xff)
-			    && *((unsigned char *)(paddr+i)) != 0) {
+			    && *((unsigned char *)(paddr + i)) != 0) {
 				(void)fprintf(stderr, "child %d: invalid data "
-				"<x%x>", procno, *((unsigned char *)(paddr+i)));
-				(void)fprintf(stderr, " at pg %d off %d, exp "
-					"<x%x>\n", randpage, i,
-					(procno+pattern)&0xff);
-                        anyfail();
+					      "<x%x>", procno,
+					      *((unsigned char *)(paddr + i)));
+				(void)fprintf(stderr,
+					      " at pg %d off %d, exp "
+					      "<x%x>\n", randpage, i,
+					      (procno + pattern) & 0xff);
+				anyfail();
 			}
 			/*
 			 *  Now write it.
 			 */
 
-			*(paddr+i) = (procno + pattern) & 0xff;
+			*(paddr + i) = (procno + pattern) & 0xff;
 		}
 	}
 	if (dosync) {
@@ -666,14 +665,14 @@
 		 * Exercise msync() as well!
 		 */
 		randpage = lrand48() % mappages;
-		paddr = maddr_mapper + (randpage * pagesize);	 /* page address */
-		if (msync(paddr, (mappages - randpage)*pagesize,
-		    MS_SYNC) == -1) {
+		paddr = maddr_mapper + (randpage * pagesize);	/* page address */
+		if (msync(paddr, (mappages - randpage) * pagesize,
+			  MS_SYNC) == -1) {
 			perror("msync error");
-                        anyfail();
+			anyfail();
 		}
 	}
-	if (munmap(maddr_mapper,mapsize_mapper) == -1) {
+	if (munmap(maddr_mapper, mapsize_mapper) == -1) {
 		perror("munmap failed");
 		anyfail();
 	}
@@ -689,23 +688,21 @@
  *	This process executes until signalled (i.e. has no exit!)
  *	unless error.
  */
-void
-child_writer(char *file, uchar_t *buf)	/* buf already set up in main */
-{
+void child_writer(char *file, uchar_t * buf)
+{				/* buf already set up in main */
 	struct sigaction sa_writer;
 
 	sa_writer.sa_handler = clean_writer;
 	sa_writer.sa_flags = 0;
 	if (sigemptyset(&sa_writer.sa_mask)) {
 		perror("sigempty error");
-                anyfail();
+		anyfail();
 	}
 
 	if (sigaction(SIGUSR1, &sa_writer, 0) == -1) {
 		perror("sigaction error SIGUSR1");
-                anyfail();
+		anyfail();
 	}
-
 #ifdef LARGE_FILE
 	struct stat64 statbuf;
 	off64_t off;
@@ -723,16 +720,15 @@
 	if ((fd_writer = open(file, O_RDWR)) == -1) {
 #endif /* LARGE_FILE */
 		perror("open error");
-                anyfail();
+		anyfail();
 	}
-
 #ifdef LARGE_FILE
 	if ((off = lseek64(fd_writer, 0, SEEK_END)) == -1) {
 #else /* LARGE_FILE */
 	if ((off = lseek(fd_writer, 0, SEEK_END)) == -1) {
 #endif /* LARGE_FILE */
 		perror("lseek error");
-                anyfail();
+		anyfail();
 	}
 
 	for (;;) {
@@ -742,16 +738,16 @@
 		if (fstat(fd_writer, &statbuf) == -1) {
 #endif /* LARGE_FILE */
 			perror("fstat error");
-                        anyfail();
+			anyfail();
 		}
 #ifdef LARGE_FILE
 		if (debug)
 			(void)printf("writer %d bytes at off %Ld, size %Ld\n",
-				growsize, off, statbuf.st_size);
+				     growsize, off, statbuf.st_size);
 #else /* LARGE_FILE */
 		if (debug)
 			(void)printf("writer %d bytes at off %ld, size %ld\n",
-				growsize, off, statbuf.st_size);
+				     growsize, off, statbuf.st_size);
 #endif /* LARGE_FILE */
 
 		/*
@@ -768,8 +764,8 @@
 				perror("write error");
 			else
 				(void)fprintf(stderr, "wrote %d of %d bytes\n",
-					cnt, growsize);
-                        anyfail();
+					      cnt, growsize);
+			anyfail();
 		}
 
 		off += growsize;
@@ -778,7 +774,7 @@
 		if (dosync) {
 			if (fsync(fd_writer) == -1) {
 				perror("fsync error");
-                                anyfail();
+				anyfail();
 			}
 		}
 	}
@@ -789,8 +785,7 @@
  *  Make sure file has all the correct data.
 
  */
-int
-fileokay(char *file, uchar_t *expbuf)
+int fileokay(char *file, uchar_t * expbuf)
 {
 #ifdef LARGE_FILE
 	struct stat64 statbuf;
@@ -811,7 +806,7 @@
 	if ((fd = open(file, O_RDONLY)) == -1) {
 #endif /* LARGE_FILE */
 		perror("open error");
-                anyfail();
+		anyfail();
 	}
 #ifdef LARGE_FILE
 	if (fstat64(fd, &statbuf) == -1) {
@@ -819,7 +814,7 @@
 	if (fstat(fd, &statbuf) == -1) {
 #endif /* LARGE_FILE */
 		perror("stat error");
-                anyfail();
+		anyfail();
 	}
 #ifdef LARGE_FILE
 	if (lseek64(fd, sparseoffset, SEEK_SET) < 0) {
@@ -830,13 +825,13 @@
 		exit(1);
 	}
 
-	readbuf = (uchar_t *)malloc(pagesize);
+	readbuf = (uchar_t *) malloc(pagesize);
 
 	if (statbuf.st_size - sparseoffset > SIZE_MAX) {
 		fprintf(stderr, "size_t overflow when setting up map\n");
 		exit(1);
 	}
-	mapsize = (size_t)(statbuf.st_size - sparseoffset);
+	mapsize = (size_t) (statbuf.st_size - sparseoffset);
 	mappages = roundup(mapsize, pagesize) / pagesize;
 
 	for (i = 0; i < mappages; i++) {
@@ -851,7 +846,8 @@
 			 */
 			if ((i * pagesize) + cnt != mapsize) {
 				(void)fprintf(stderr, "read %d of %ld bytes\n",
-					(i*pagesize)+cnt, (long)mapsize);
+					      (i * pagesize) + cnt,
+					      (long)mapsize);
 				close(fd);
 				return 0;
 			}
@@ -863,14 +859,16 @@
 		for (j = 0; j < cnt; j++) {
 			if (expbuf[j] != readbuf[j] && readbuf[j] != 0) {
 				(void)fprintf(stderr,
-					"read bad data: exp %c got %c",
-					expbuf[j], readbuf[j]);
+					      "read bad data: exp %c got %c",
+					      expbuf[j], readbuf[j]);
 #ifdef LARGE_FILE
 				(void)fprintf(stderr, ", pg %d off %d, "
-					"(fsize %Ld)\n", i, j, statbuf.st_size);
+					      "(fsize %Ld)\n", i, j,
+					      statbuf.st_size);
 #else /* LARGE_FILE */
 				(void)fprintf(stderr, ", pg %d off %d, "
-					"(fsize %ld)\n", i, j, statbuf.st_size);
+					      "(fsize %ld)\n", i, j,
+					      statbuf.st_size);
 #endif /* LARGE_FILE */
 				close(fd);
 				return 0;
@@ -881,17 +879,13 @@
 	return 1;
 }
 
-/*ARGSUSED*/
-void
-finish(int sig)
+ /*ARGSUSED*/ void finish(int sig)
 {
 	finished++;
 	/* finish nicely and check the file contents */
 }
 
-/*ARGSUSED*/
-void
-clean_up_file(int sig)
+ /*ARGSUSED*/ void clean_up_file(int sig)
 {
 	if (!leavefile)
 		(void)unlink(filename);
@@ -902,8 +896,8 @@
 {
 	if (fd_mapper)
 		close(fd_mapper);
-	munmap(maddr_mapper,mapsize_mapper);
-	exit (0);
+	munmap(maddr_mapper, mapsize_mapper);
+	exit(0);
 }
 
 void clean_writer(int sig)
@@ -913,22 +907,21 @@
 	exit(0);
 }
 
-unsigned int
-initrand(void)
+unsigned int initrand(void)
 {
 	unsigned int seed;
 
 	/*
 	 *  Initialize random seed...  Got this from a test written
 	 *  by scooter:
-	 *	Use srand/rand to diffuse the information from the
-	 *	time and pid.  If you start several processes, then
-	 *	the time and pid information don't provide much
-	 *	variation.
+	 *      Use srand/rand to diffuse the information from the
+	 *      time and pid.  If you start several processes, then
+	 *      the time and pid information don't provide much
+	 *      variation.
 	 */
 	srand((unsigned int)getpid());
 	seed = rand();
-	srand((unsigned int)time((time_t *)0));
+	srand((unsigned int)time((time_t *) 0));
 	seed = (seed ^ rand()) % 100000;
 	srand48((long int)seed);
 	return (seed);
@@ -937,17 +930,17 @@
 /*****  LTP Port        *****/
 void ok_exit()
 {
-        tst_resm(TPASS, "Test passed\n");
+	tst_resm(TPASS, "Test passed\n");
 	tst_rmdir();
 	tst_exit();
 }
 
 int anyfail()
 {
-  tst_resm(TFAIL, "Test failed\n");
-  tst_rmdir();
-  tst_exit();
-        return 0;
+	tst_resm(TFAIL, "Test failed\n");
+	tst_rmdir();
+	tst_exit();
+	return 0;
 }
 
 /*****  **      **      *****/
diff --git a/testcases/kernel/mem/mtest01/mtest01.c b/testcases/kernel/mem/mtest01/mtest01.c
index 92d2d9e..8c9e81c 100644
--- a/testcases/kernel/mem/mtest01/mtest01.c
+++ b/testcases/kernel/mem/mtest01/mtest01.c
@@ -57,17 +57,17 @@
 	pid_count++;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 	int c;
 	char *mem;
 	float percent;
-	unsigned int maxpercent = 0, dowrite = 0, verbose=0, j;
+	unsigned int maxpercent = 0, dowrite = 0, verbose = 0, j;
 	unsigned long bytecount, alloc_bytes, max_pids;
 	unsigned long long original_maxbytes, maxbytes = 0;
 	unsigned long long pre_mem = 0, post_mem = 0;
 	unsigned long long total_ram, total_free, D, C;
-	int chunksize = 1024*1024; /* one meg at a time by default */
+	int chunksize = 1024 * 1024;	/* one meg at a time by default */
 	struct sysinfo sstats;
 	int i, pid_cntr;
 	pid_t pid, *pid_list;
@@ -76,34 +76,34 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	sigaction(SIGRTMIN,  &act, 0);
+	sigaction(SIGRTMIN, &act, 0);
 
 	while ((c = getopt(argc, argv, "c:b:p:wvh")) != -1) {
-		switch(c) {
+		switch (c) {
 		case 'c':
 			chunksize = atoi(optarg);
 			break;
 		case 'b':
 			if (maxpercent != 0)
 				tst_brkm(TBROK, NULL,
-				    "ERROR: -b option cannot be used with -p "
-				    "option at the same time");
+					 "ERROR: -b option cannot be used with -p "
+					 "option at the same time");
 			maxbytes = atoll(optarg);
 			break;
 		case 'p':
 			if (maxbytes != 0)
 				tst_brkm(TBROK, NULL,
-				    "ERROR: -p option cannot be used with -b "
-				    "option at the same time");
+					 "ERROR: -p option cannot be used with -b "
+					 "option at the same time");
 			maxpercent = atoi(optarg);
 			if (maxpercent <= 0)
 				tst_brkm(TBROK, NULL,
-				    "ERROR: -p option requires number greater "
-				    "than 0");
+					 "ERROR: -p option requires number greater "
+					 "than 0");
 			if (maxpercent > 99)
 				tst_brkm(TBROK, NULL,
-				    "ERROR: -p option cannot be greater than "
-				    "99");
+					 "ERROR: -p option cannot be greater than "
+					 "99");
 			break;
 		case 'w':
 			dowrite = 1;
@@ -113,11 +113,17 @@
 			break;
 		case 'h':
 		default:
-			printf("usage: %s [-c <bytes>] [-b <bytes>|-p <percent>] [-v]\n", argv[0]);
-			printf("\t-c <num>\tsize of chunk in bytes to malloc on each pass\n");
-			printf("\t-b <bytes>\tmaximum number of bytes to allocate before stopping\n");
-			printf("\t-p <bytes>\tpercent of total memory used at which the program stops\n");
-			printf("\t-w\t\twrite to the memory after allocating\n");
+			printf
+			    ("usage: %s [-c <bytes>] [-b <bytes>|-p <percent>] [-v]\n",
+			     argv[0]);
+			printf
+			    ("\t-c <num>\tsize of chunk in bytes to malloc on each pass\n");
+			printf
+			    ("\t-b <bytes>\tmaximum number of bytes to allocate before stopping\n");
+			printf
+			    ("\t-p <bytes>\tpercent of total memory used at which the program stops\n");
+			printf
+			    ("\t-w\t\twrite to the memory after allocating\n");
 			printf("\t-v\t\tverbose\n");
 			printf("\t-h\t\tdisplay usage\n");
 			exit(1);
@@ -132,13 +138,13 @@
 	max_pids = total_ram / (unsigned long)FIVE_HUNDRED_MB + 1;
 
 	if ((pid_list = malloc(max_pids * sizeof(pid_t))) == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "malloc failed.");
+		tst_brkm(TBROK | TERRNO, NULL, "malloc failed.");
 	memset(pid_list, 0, max_pids * sizeof(pid_t));
 
 	/* Currently used memory */
 	C = sstats.mem_unit * (total_ram - total_free);
 	tst_resm(TINFO, "Total memory already used on system = %llu kbytes",
-	    C / 1024);
+		 C / 1024);
 
 	if (maxpercent) {
 		percent = (float)maxpercent / 100.00;
@@ -146,14 +152,14 @@
 		/* Desired memory needed to reach maxpercent */
 		D = percent * (sstats.mem_unit * total_ram);
 		tst_resm(TINFO,
-		    "Total memory used needed to reach maximum = %llu kbytes",
-		    D / 1024);
+			 "Total memory used needed to reach maximum = %llu kbytes",
+			 D / 1024);
 
 		/* Are we already using more than maxpercent? */
 		if (C > D) {
 			tst_resm(TFAIL,
-			    "More memory than the maximum amount you specified "
-			    " is already being used");
+				 "More memory than the maximum amount you specified "
+				 " is already being used");
 			free(pid_list);
 			tst_exit();
 		}
@@ -161,7 +167,7 @@
 		/* set maxbytes to the extra amount we want to allocate */
 		maxbytes = D - C;
 		tst_resm(TINFO, "Filling up %d%% of ram which is %llu kbytes",
-		    maxpercent, maxbytes / 1024);
+			 maxpercent, maxbytes / 1024);
 	}
 	original_maxbytes = maxbytes;
 	i = 0;
@@ -171,7 +177,7 @@
 		pid_cntr++;
 	pid_list[i] = pid;
 
-#if defined (_s390_) /* s390's 31bit addressing requires smaller chunks */
+#if defined (_s390_)		/* s390's 31bit addressing requires smaller chunks */
 	while (pid != 0 && maxbytes > FIVE_HUNDRED_MB) {
 		i++;
 		maxbytes -= FIVE_HUNDRED_MB;
@@ -184,7 +190,7 @@
 	if (maxbytes > FIVE_HUNDRED_MB)
 		alloc_bytes = FIVE_HUNDRED_MB;
 	else
-		alloc_bytes = (unsigned long) maxbytes;
+		alloc_bytes = (unsigned long)maxbytes;
 
 #elif __WORDSIZE == 32
 	while (pid != 0 && maxbytes > ONE_GB) {
@@ -193,7 +199,7 @@
 		pid = fork();
 		if (pid != 0) {
 			pid_cntr++;
-			pid_list[i]=pid;
+			pid_list[i] = pid;
 		}
 	}
 	if (maxbytes > ONE_GB)
@@ -221,28 +227,28 @@
 		bytecount = chunksize;
 		while (1) {
 			if ((mem = malloc(chunksize)) == NULL) {
-				tst_resm(TBROK|TERRNO,
-				    "stopped at %lu bytes", bytecount);
+				tst_resm(TBROK | TERRNO,
+					 "stopped at %lu bytes", bytecount);
 				free(pid_list);
 				tst_exit();
 			}
 			if (dowrite)
 				for (j = 0; j < chunksize; j++)
-					*(mem+j) = 'a';
+					*(mem + j) = 'a';
 			if (verbose)
 				tst_resm(TINFO,
-				    "allocated %lu bytes chunksize is %d",
-				    bytecount, chunksize);
+					 "allocated %lu bytes chunksize is %d",
+					 bytecount, chunksize);
 			bytecount += chunksize;
 			if (alloc_bytes && bytecount >= alloc_bytes)
 				break;
 		}
 		if (dowrite)
 			tst_resm(TINFO, "... %lu bytes allocated and used.",
-			    bytecount);
+				 bytecount);
 		else
 			tst_resm(TINFO, "... %lu bytes allocated only.",
-			    bytecount);
+				 bytecount);
 		kill(getppid(), SIGRTMIN);
 		while (1)
 			sleep(1);
@@ -252,16 +258,26 @@
 
 		if (dowrite) {
 			/* Total Free Post-Test RAM */
-			post_mem = (unsigned long long)sstats.mem_unit * sstats.freeram;
-			post_mem = post_mem + (unsigned long long)sstats.mem_unit * sstats.freeswap;
+			post_mem =
+			    (unsigned long long)sstats.mem_unit *
+			    sstats.freeram;
+			post_mem =
+			    post_mem +
+			    (unsigned long long)sstats.mem_unit *
+			    sstats.freeswap;
 
 			while ((((unsigned long long)pre_mem - post_mem) <
-			    (unsigned long long)original_maxbytes) &&
-			    pid_count < pid_cntr) {
+				(unsigned long long)original_maxbytes) &&
+			       pid_count < pid_cntr) {
 				sleep(1);
 				sysinfo(&sstats);
-				post_mem = (unsigned long long)sstats.mem_unit * sstats.freeram;
-				post_mem = post_mem + (unsigned long long)sstats.mem_unit * sstats.freeswap;
+				post_mem =
+				    (unsigned long long)sstats.mem_unit *
+				    sstats.freeram;
+				post_mem =
+				    post_mem +
+				    (unsigned long long)sstats.mem_unit *
+				    sstats.freeswap;
 			}
 		}
 		while (pid_list[i] != 0) {
@@ -270,10 +286,10 @@
 		}
 		if (dowrite)
 			tst_resm(TPASS, "%llu kbytes allocated and used.",
-			    original_maxbytes / 1024);
+				 original_maxbytes / 1024);
 		else
 			tst_resm(TPASS, "%llu kbytes allocated only.",
-			    original_maxbytes / 1024);
+				 original_maxbytes / 1024);
 	}
 	free(pid_list);
 	tst_exit();
diff --git a/testcases/kernel/mem/mtest05/dummy.c b/testcases/kernel/mem/mtest05/dummy.c
index d891504..49ce42d 100644
--- a/testcases/kernel/mem/mtest05/dummy.c
+++ b/testcases/kernel/mem/mtest05/dummy.c
@@ -30,10 +30,9 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-int
-main(void)
+int main(void)
 {
-    close(1);
-    printf("U are running Linux Memory Management Stress Tests.\n");
-    exit(0);
+	close(1);
+	printf("U are running Linux Memory Management Stress Tests.\n");
+	exit(0);
 }
diff --git a/testcases/kernel/mem/mtest05/mmstress.c b/testcases/kernel/mem/mtest05/mmstress.c
index 538ce14..f845290 100644
--- a/testcases/kernel/mem/mtest05/mmstress.c
+++ b/testcases/kernel/mem/mtest05/mmstress.c
@@ -83,68 +83,68 @@
 /******************************************************************************/
 
 /* GLOBAL INCLUDE FILES                                                       */
-#include <stdio.h>    /* standard C input/output routines                     */
-#include <sys/types.h>/* definitions for open()                               */
-#include <sys/stat.h> /* definitions for open()                               */
-#include <fcntl.h>    /* definition of open()                                 */
-#include <unistd.h>   /* declaration of close()                               */
-#include <sys/mman.h> /* declaration of mmap()                                */
-#include <sys/wait.h> /* declaration for wait routine                         */
-#include <sys/time.h> /* definitions for the interval timer                   */
-#include <pthread.h>  /* declaration of pthread functions                     */
-#include <signal.h>   /* definitions for signals - required for SIGALRM       */
-#include <errno.h>    /* definitions for errors                               */
-#include <stdlib.h>   /* declaration for malloc                               */
-#include <string.h>   /* declaration for memset                               */
-#include <sched.h>    /* declaration of sched_yield()                         */
+#include <stdio.h>		/* standard C input/output routines                     */
+#include <sys/types.h>		/* definitions for open()                               */
+#include <sys/stat.h>		/* definitions for open()                               */
+#include <fcntl.h>		/* definition of open()                                 */
+#include <unistd.h>		/* declaration of close()                               */
+#include <sys/mman.h>		/* declaration of mmap()                                */
+#include <sys/wait.h>		/* declaration for wait routine                         */
+#include <sys/time.h>		/* definitions for the interval timer                   */
+#include <pthread.h>		/* declaration of pthread functions                     */
+#include <signal.h>		/* definitions for signals - required for SIGALRM       */
+#include <errno.h>		/* definitions for errors                               */
+#include <stdlib.h>		/* declaration for malloc                               */
+#include <string.h>		/* declaration for memset                               */
+#include <sched.h>		/* declaration of sched_yield()                         */
 #include <stdint.h>
 
 #include "test.h"
 
 /* GLOBAL DEFINES                                                             */
-#define SIGENDSIG    -1   /* end of signal marker                             */
-#define THNUM        0    /* array element pointing to number of threads      */
-#define MAPADDR      1    /* array element pointing to map address            */
-#define PAGESIZ      2    /* array element pointing to page size              */
-#define FLTIPE       3    /* array element pointing to fault type             */
-#define READ_FAULT   0    /* instructs routine to simulate read fault         */
-#define WRITE_FAULT  1    /* instructs routine to simulate write fault        */
-#define COW_FAULT    2    /* instructs routine to simulate copy-on-write fault*/
-#define NUMTHREAD    32   /* number of threads to spawn default to 32         */
-#define NUMPAGES     9999 /* default (random) value of number of pages        */
+#define SIGENDSIG    -1		/* end of signal marker                             */
+#define THNUM        0		/* array element pointing to number of threads      */
+#define MAPADDR      1		/* array element pointing to map address            */
+#define PAGESIZ      2		/* array element pointing to page size              */
+#define FLTIPE       3		/* array element pointing to fault type             */
+#define READ_FAULT   0		/* instructs routine to simulate read fault         */
+#define WRITE_FAULT  1		/* instructs routine to simulate write fault        */
+#define COW_FAULT    2		/* instructs routine to simulate copy-on-write fault */
+#define NUMTHREAD    32		/* number of threads to spawn default to 32         */
+#define NUMPAGES     9999	/* default (random) value of number of pages        */
 #ifndef TRUE
 #define TRUE         1
 #endif
 #ifndef FALSE
 #define FALSE        0
 #endif
-#define FAILED       (-1) /* return status for all funcs indicating failure   */
-#define SUCCESS      0    /* return status for all routines indicating success*/
-                          /* prints error if no argument passed               */
+#define FAILED       (-1)	/* return status for all funcs indicating failure   */
+#define SUCCESS      0		/* return status for all routines indicating success */
+			  /* prints error if no argument passed               */
 #define OPT_MISSING(prog, opt) do {                        \
             fprintf(stderr, "%s: option -%c ", prog, opt); \
             fprintf(stderr, "requires an argument\n");    \
                 } while (0)
 
-                          /* exit thread macro                                */
+			  /* exit thread macro                                */
 #define PTHREAD_EXIT(val)      do {              \
             exit_val = val;                      \
                 pthread_exit((void *)exit_val); \
                                   } while (0)
-#define MAXTEST      6   /* total number of testcase in this program          */
-#define BRKSZ        512*1024 /* program data space allocation value          */
+#define MAXTEST      6		/* total number of testcase in this program          */
+#define BRKSZ        512*1024	/* program data space allocation value          */
 
 /* GLOBAL VARIABLES                                                           */
-typedef struct {      /* structure returned by map_and_thread()               */
-    int    status;    /* status of the operation - FAILED or SUCCESS          */
-    caddr_t mapaddr;  /* address at which the file is mapped                  */
+typedef struct {		/* structure returned by map_and_thread()               */
+	int status;		/* status of the operation - FAILED or SUCCESS          */
+	caddr_t mapaddr;	/* address at which the file is mapped                  */
 } RETINFO_t;
 
-static volatile int  wait_thread = 0;  /* used to wake up sleeping threads    */
-static volatile int  thread_begin = 0; /* used to coordinate threads          */
-static   int  verbose_print = FALSE; /* print more test information           */
+static volatile int wait_thread = 0;	/* used to wake up sleeping threads    */
+static volatile int thread_begin = 0;	/* used to coordinate threads          */
+static int verbose_print = FALSE;	/* print more test information           */
 
-static   int    pages_num = NUMPAGES; /* number of pages to use for tests     */
+static int pages_num = NUMPAGES;	/* number of pages to use for tests     */
 
 char *TCID = "mmstress";
 int TST_TOTAL = 6;
@@ -165,18 +165,16 @@
 /* Synopsis:    void signal_handler(int signal);                              */
 /*                                                                            */
 /******************************************************************************/
-static void
-sig_handler(int signal) /* signal number, set to handle SIGALRM               */
-{
-    if (signal != SIGALRM)
-    {
-        fprintf(stderr, "sig_handlder(): unexpected signal caught [%d]\n",
-            signal);
-        exit(-1);
-    }
-    else
-	tst_resm(TPASS, "Test ended, success");
-    exit(0);
+static void sig_handler(int signal)
+{				/* signal number, set to handle SIGALRM               */
+	if (signal != SIGALRM) {
+		fprintf(stderr,
+			"sig_handlder(): unexpected signal caught [%d]\n",
+			signal);
+		exit(-1);
+	} else
+		tst_resm(TPASS, "Test ended, success");
+	exit(0);
 }
 
 /******************************************************************************/
@@ -192,19 +190,18 @@
 /* Synopsis:    void usage(char *progname);                                   */
 /*                                                                            */
 /******************************************************************************/
-static void
-usage(char *progname)        /* name of this program                       */
-{
-    fprintf(stderr, "usage:%s -h -n test -t time -v [-V]\n", progname);
-    fprintf(stderr, "\t-h displays all options\n");
-    fprintf(stderr, "\t-n test number, if no test number\n"
-            "\t   is specified, all the tests will be run\n");
-    fprintf(stderr, "\t-p specify the number of pages to\n"
-            "\t   use for allocation\n");
-    fprintf(stderr, "\t-t specify the time in hours\n");
-    fprintf(stderr, "\t-v verbose output\n");
-    fprintf(stderr, "\t-V program version\n");
-    exit(1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr, "usage:%s -h -n test -t time -v [-V]\n", progname);
+	fprintf(stderr, "\t-h displays all options\n");
+	fprintf(stderr, "\t-n test number, if no test number\n"
+		"\t   is specified, all the tests will be run\n");
+	fprintf(stderr, "\t-p specify the number of pages to\n"
+		"\t   use for allocation\n");
+	fprintf(stderr, "\t-t specify the time in hours\n");
+	fprintf(stderr, "\t-v verbose output\n");
+	fprintf(stderr, "\t-V program version\n");
+	exit(1);
 }
 
 /******************************************************************************/
@@ -221,20 +218,19 @@
 /* Synopsis:    void set_timer(int run_time);                                 */
 /*                                                                            */
 /******************************************************************************/
-static void
-set_timer(int run_time)         /* period for which test is intended to run   */{
-    struct itimerval timer;     /* timer structure, tv_sec is set to run_time */
-    memset(&timer, 0, sizeof(struct itimerval));
-    timer.it_interval.tv_usec = 0;
-    timer.it_interval.tv_sec = 0;
-    timer.it_value.tv_usec = 0;
-    timer.it_value.tv_sec = (time_t)(run_time * 3600.0);
+static void set_timer(int run_time)
+{				/* period for which test is intended to run   */
+	struct itimerval timer;	/* timer structure, tv_sec is set to run_time */
+	memset(&timer, 0, sizeof(struct itimerval));
+	timer.it_interval.tv_usec = 0;
+	timer.it_interval.tv_sec = 0;
+	timer.it_value.tv_usec = 0;
+	timer.it_value.tv_sec = (time_t) (run_time * 3600.0);
 
-    if (setitimer(ITIMER_REAL, &timer, NULL))
-    {
-        perror("set_timer(): setitimer()");
-        exit(1);
-    }
+	if (setitimer(ITIMER_REAL, &timer, NULL)) {
+		perror("set_timer(): setitimer()");
+		exit(1);
+	}
 }
 
 /******************************************************************************/
@@ -253,50 +249,51 @@
 /* Synopsis:    void *thread_fault(void *args);                               */
 /*                                                                            */
 /******************************************************************************/
-static void *
-thread_fault(void *args)         /* pointer to the arguments passed to routine*/
-{
-    long   *local_args   = args; /* local pointer to list of arguments        */
-                                 /* local_args[THNUM]   - the thread number   */
-                                 /* local_args[MAPADDR] - map address         */
-                                 /* local_args[PAGESIZ] - page size           */
-                                 /* local_args[FLTIPE]  - fault type          */
-    int     pgnum_ndx    = 0;    /* index to the number of pages              */
-    caddr_t start_addr           /* start address of the page                 */
-                         = (caddr_t)(local_args[MAPADDR]
-                                     + (int)local_args[THNUM]
-                                     * (pages_num/NUMTHREAD)
-                                     * local_args[PAGESIZ]);
-    char    read_from_addr = 0;  /* address to which read from page is done   */
-    char    write_to_addr[] = {'a'}; /* character to be writen to the page    */
-    uintptr_t exit_val = 0;   /* exit value of the pthread. 0 - success    */
+static void *thread_fault(void *args)
+{				/* pointer to the arguments passed to routine */
+	long *local_args = args;	/* local pointer to list of arguments        */
+	/* local_args[THNUM]   - the thread number   */
+	/* local_args[MAPADDR] - map address         */
+	/* local_args[PAGESIZ] - page size           */
+	/* local_args[FLTIPE]  - fault type          */
+	int pgnum_ndx = 0;	/* index to the number of pages              */
+	caddr_t start_addr	/* start address of the page                 */
+	    = (caddr_t) (local_args[MAPADDR]
+			 + (int)local_args[THNUM]
+			 * (pages_num / NUMTHREAD)
+			 * local_args[PAGESIZ]);
+	char read_from_addr = 0;	/* address to which read from page is done   */
+	char write_to_addr[] = { 'a' };	/* character to be writen to the page    */
+	uintptr_t exit_val = 0;	/* exit value of the pthread. 0 - success    */
 
     /*************************************************************/
-    /*   The way it was, args could be overwritten by subsequent uses
-     *   of it before this routine had a chance to use the data.
-     *   This flag stops the overwrite until this routine gets to
-     *   here.  At this point, it is done initializing and it is
-     *   safe for the parent thread to continue (which will change
-     *   args).
-     */
-    thread_begin = FALSE;
+	/*   The way it was, args could be overwritten by subsequent uses
+	 *   of it before this routine had a chance to use the data.
+	 *   This flag stops the overwrite until this routine gets to
+	 *   here.  At this point, it is done initializing and it is
+	 *   safe for the parent thread to continue (which will change
+	 *   args).
+	 */
+	thread_begin = FALSE;
 
-    while (wait_thread)
-        sched_yield();
+	while (wait_thread)
+		sched_yield();
 
-    for (; pgnum_ndx < (pages_num/NUMTHREAD); pgnum_ndx++)
-    {
-        /* if the fault to be generated is READ_FAULT, read from the page     */
-        /* else write a character to the page.                                */
-        ((int)local_args[3] == READ_FAULT) ? (read_from_addr = *start_addr)
-                                           : (*start_addr = write_to_addr[0]);
-        start_addr += local_args[PAGESIZ];
-        if (verbose_print)
-	    tst_resm(TINFO, "thread_fault(): generating fault type %ld"
-                            " @page address %p", local_args[3], start_addr);
-        fflush(NULL);
-    }
-    PTHREAD_EXIT(0);
+	for (; pgnum_ndx < (pages_num / NUMTHREAD); pgnum_ndx++) {
+		/* if the fault to be generated is READ_FAULT, read from the page     */
+		/* else write a character to the page.                                */
+		((int)local_args[3] == READ_FAULT) ? (read_from_addr =
+						      *start_addr)
+		    : (*start_addr = write_to_addr[0]);
+		start_addr += local_args[PAGESIZ];
+		if (verbose_print)
+			tst_resm(TINFO,
+				 "thread_fault(): generating fault type %ld"
+				 " @page address %p", local_args[3],
+				 start_addr);
+		fflush(NULL);
+	}
+	PTHREAD_EXIT(0);
 }
 
 /******************************************************************************/
@@ -313,29 +310,24 @@
 /* Synopsis:    int remove_files(char *filename);                             */
 /*                                                                            */
 /******************************************************************************/
-static int
-remove_files(char *filename, char * addr)    /* name of the file that is to be removed     */
-{
-    if (addr)
-		     if (munmap(addr, sysconf(_SC_PAGESIZE)*pages_num) < 0) {
-		 		     perror("map_and_thread(): munmap()");
-		 		     return FAILED;
-		     }
-    if (strcmp(filename, "NULL") && strcmp(filename, "/dev/zero"))
-    {
-        if (unlink(filename))
-        {
-            perror("map_and_thread(): ulink()");
-            return FAILED;
-        }
-    }
-    else
-    {
-        if (verbose_print)
-            tst_resm(TINFO, "file %s removed", filename);
+static int remove_files(char *filename, char *addr)
+{				/* name of the file that is to be removed     */
+	if (addr)
+		if (munmap(addr, sysconf(_SC_PAGESIZE) * pages_num) < 0) {
+			perror("map_and_thread(): munmap()");
+			return FAILED;
+		}
+	if (strcmp(filename, "NULL") && strcmp(filename, "/dev/zero")) {
+		if (unlink(filename)) {
+			perror("map_and_thread(): ulink()");
+			return FAILED;
+		}
+	} else {
+		if (verbose_print)
+			tst_resm(TINFO, "file %s removed", filename);
 
-    }
-    return SUCCESS;
+	}
+	return SUCCESS;
 }
 
 /******************************************************************************/
@@ -360,190 +352,177 @@
 /*                        RETINFO_t *retinfo);                                */
 /*                                                                            */
 /******************************************************************************/
-RETINFO_t *
-map_and_thread(
-    char  *tmpfile,              /* name of temporary file to be created      */
-    void  *(*exec_func)(void *), /* thread function to execute                */
-    int    fault_type,           /* type of fault to be generated             */
-    int    num_thread,           /* number of threads to create               */
-    RETINFO_t *retinfo)          /* return map address and oper status        */
+RETINFO_t *map_and_thread(char *tmpfile,	/* name of temporary file to be created      */
+			  void *(*exec_func) (void *),	/* thread function to execute                */
+			  int fault_type,	/* type of fault to be generated             */
+			  int num_thread,	/* number of threads to create               */
+			  RETINFO_t * retinfo)
+{				/* return map address and oper status        */
+	int fd = 0;		/* file descriptor of the file created       */
+	int thrd_ndx = 0;	/* index to the number of threads created    */
+	int map_type = 0;	/* specifies the type of the mapped object   */
+	int *th_status = 0;	/* status of the thread when it is finished  */
+	long th_args[5];	/* argument list passed to  thread_fault()   */
+	char *empty_buf = NULL;	/* empty buffer used to fill temp file       */
+	long pagesize		/* contains page size at runtime             */
+	    = sysconf(_SC_PAGESIZE);
+	static pthread_t pthread_ids[NUMTHREAD];
+	/* contains ids of the threads created       */
+	caddr_t map_addr = NULL;	/* address where the file is mapped          */
 
-{
-    int  fd         = 0;         /* file descriptor of the file created       */
-    int  thrd_ndx   = 0;         /* index to the number of threads created    */
-    int  map_type   = 0;         /* specifies the type of the mapped object   */
-    int  *th_status = 0;         /* status of the thread when it is finished  */
-    long th_args[5];     	/* argument list passed to  thread_fault()   */
-    char *empty_buf = NULL;      /* empty buffer used to fill temp file       */
-    long pagesize                /* contains page size at runtime             */
-                    = sysconf(_SC_PAGESIZE);
-    static pthread_t pthread_ids[NUMTHREAD];
-                                 /* contains ids of the threads created       */
-    caddr_t map_addr = NULL;     /* address where the file is mapped          */
+	/* Create a file with permissions 0666, and open it with RDRW perms       */
+	/* if the name is not a NULL                                              */
 
-    /* Create a file with permissions 0666, and open it with RDRW perms       */
-    /* if the name is not a NULL                                              */
+	if (strcmp(tmpfile, "NULL")) {
+		if ((fd =
+		     open(tmpfile, O_RDWR | O_CREAT,
+			  S_IRWXO | S_IRWXU | S_IRWXG))
+		    == -1) {
+			perror("map_and_thread(): open()");
+			close(fd);
+			fflush(NULL);
+			retinfo->status = FAILED;
+			return retinfo;
+		}
 
-    if (strcmp(tmpfile, "NULL"))
-    {
-        if ((fd = open(tmpfile, O_RDWR|O_CREAT, S_IRWXO|S_IRWXU|S_IRWXG))
-                == -1 )
-        {
-            perror("map_and_thread(): open()");
-            close(fd);
-            fflush(NULL);
-            retinfo->status = FAILED;
-            return retinfo;
-        }
+		/* Write pagesize * pages_num bytes to the file */
+		empty_buf = (char *)malloc(pagesize * pages_num);
+		if (write(fd, empty_buf, pagesize * pages_num) !=
+		    (pagesize * pages_num)) {
+			perror("map_and_thread(): write()");
+			free(empty_buf);
+			fflush(NULL);
+			remove_files(tmpfile, NULL);
+			close(fd);
+			retinfo->status = FAILED;
+			return retinfo;
+		}
+		map_type = (fault_type == COW_FAULT) ? MAP_PRIVATE : MAP_SHARED;
 
-        /* Write pagesize * pages_num bytes to the file */
-        empty_buf = (char *)malloc(pagesize*pages_num);
-        if (write(fd, empty_buf, pagesize*pages_num) != (pagesize*pages_num))
-        {
-            perror("map_and_thread(): write()");
-            free(empty_buf);
-            fflush(NULL);
-            remove_files(tmpfile, NULL);
-            close(fd);
-            retinfo->status = FAILED;
-            return retinfo;
-        }
-        map_type = (fault_type == COW_FAULT) ? MAP_PRIVATE : MAP_SHARED;
+		/* Map the file, if the required fault type is COW_FAULT map the file */
+		/* private, else map the file shared. if READ_FAULT is required to be */
+		/* generated map the file with read protection else map with read -   */
+		/* write protection.                               */
 
-        /* Map the file, if the required fault type is COW_FAULT map the file */
-        /* private, else map the file shared. if READ_FAULT is required to be */
-        /* generated map the file with read protection else map with read -   */
-        /* write protection.                               */
+		if ((map_addr = (caddr_t) mmap(0, pagesize * pages_num,
+					       ((fault_type == READ_FAULT) ?
+						PROT_READ : PROT_READ |
+						PROT_WRITE), map_type, fd, 0))
+		    == MAP_FAILED) {
+			perror("map_and_thread(): mmap()");
+			free(empty_buf);
+			fflush(NULL);
+			remove_files(tmpfile, NULL);
+			close(fd);
+			retinfo->status = FAILED;
+			return retinfo;
+		} else {
+			retinfo->mapaddr = map_addr;
+			if (verbose_print)
+				tst_resm(TINFO,
+					 "map_and_thread(): mmap success, address = %p",
+					 map_addr);
+			fflush(NULL);
+		}
+	}
 
-        if ((map_addr = (caddr_t)mmap(0, pagesize*pages_num,
-                        ((fault_type == READ_FAULT) ?
-			PROT_READ : PROT_READ|PROT_WRITE),
-                        map_type, fd, 0))
-		      == MAP_FAILED)
-        {
-            perror("map_and_thread(): mmap()");
-            free(empty_buf);
-            fflush(NULL);
-            remove_files(tmpfile, NULL);
-            close(fd);
-            retinfo->status = FAILED;
-            return retinfo;
-        }
-        else
-        {
-            retinfo->mapaddr = map_addr;
-            if (verbose_print)
-                tst_resm(TINFO,
-                  "map_and_thread(): mmap success, address = %p", map_addr);
-            fflush(NULL);
-        }
-    }
+	/* As long as wait is set to TRUE, the thread that will be created will */
+	/* loop in its exec routine */
 
-    /* As long as wait is set to TRUE, the thread that will be created will */
-    /* loop in its exec routine */
+	wait_thread = TRUE;
 
-    wait_thread = TRUE;
+	/* Create a few threads, ideally number of threads equals number of CPU'S */
+	/* so that we can assume that each thread will run on a single CPU in     */
+	/* of SMP machines. Currently we will create NR_CPUS number of threads.   */
 
-    /* Create a few threads, ideally number of threads equals number of CPU'S */
-    /* so that we can assume that each thread will run on a single CPU in     */
-    /* of SMP machines. Currently we will create NR_CPUS number of threads.   */
-
-    th_args[1] = (long)map_addr;
-    th_args[2] = pagesize;
-    th_args[3] = fault_type;
-    do
-    {
-        th_args[0] = thrd_ndx;
-        th_args[4] = (long)0;
+	th_args[1] = (long)map_addr;
+	th_args[2] = pagesize;
+	th_args[3] = fault_type;
+	do {
+		th_args[0] = thrd_ndx;
+		th_args[4] = (long)0;
 
        /*************************************************************/
-       /*   The way it was, args could be overwritten by subsequent uses
-        *   of it before the called routine had a chance to fully initialize.
-        *   This flag stops the overwrite until that routine gets to
-        *   begin.  At that point, it is done initializing and it is
-        *   safe for the this thread to continue (which will change
-        *   args).
-        *   A basic race condition.
-        */
-        thread_begin = TRUE;
-        if (pthread_create(&pthread_ids[thrd_ndx++], NULL, exec_func,
-                           (void *)&th_args))
-        {
-            perror("map_and_thread(): pthread_create()");
-            thread_begin = FALSE;
-            free(empty_buf);
-            fflush(NULL);
-            remove_files(tmpfile, map_addr);
-            close(fd);
-            retinfo->status = FAILED;
-            return retinfo;
-        } else {
-            /***************************************************/
-            /*   Yield until new thread is done with args.
-             */
-            while (thread_begin)
-                sched_yield();
-        }
-    } while (thrd_ndx < num_thread);
+		/*   The way it was, args could be overwritten by subsequent uses
+		 *   of it before the called routine had a chance to fully initialize.
+		 *   This flag stops the overwrite until that routine gets to
+		 *   begin.  At that point, it is done initializing and it is
+		 *   safe for the this thread to continue (which will change
+		 *   args).
+		 *   A basic race condition.
+		 */
+		thread_begin = TRUE;
+		if (pthread_create(&pthread_ids[thrd_ndx++], NULL, exec_func,
+				   (void *)&th_args)) {
+			perror("map_and_thread(): pthread_create()");
+			thread_begin = FALSE;
+			free(empty_buf);
+			fflush(NULL);
+			remove_files(tmpfile, map_addr);
+			close(fd);
+			retinfo->status = FAILED;
+			return retinfo;
+		} else {
+	    /***************************************************/
+			/*   Yield until new thread is done with args.
+			 */
+			while (thread_begin)
+				sched_yield();
+		}
+	} while (thrd_ndx < num_thread);
 
-    if (verbose_print)
-        tst_resm(TINFO, "map_and_thread(): pthread_create() success");
-    wait_thread = FALSE;
-    th_status = malloc(sizeof(int *));
+	if (verbose_print)
+		tst_resm(TINFO, "map_and_thread(): pthread_create() success");
+	wait_thread = FALSE;
+	th_status = malloc(sizeof(int *));
 
-    /* suspend the execution of the calling thread till the execution of the  */
-    /* other thread has been terminated.                                      */
+	/* suspend the execution of the calling thread till the execution of the  */
+	/* other thread has been terminated.                                      */
 
-    for (thrd_ndx = 0; thrd_ndx < NUMTHREAD; thrd_ndx++)
-    {
-        if (pthread_join(pthread_ids[thrd_ndx], (void **)th_status))
-        {
-            perror("map_and_thread(): pthread_join()");
-            free(empty_buf);
-            fflush(NULL);
-            remove_files(tmpfile, map_addr);
-            close(fd);
-            retinfo->status = FAILED;
-            return retinfo;
-        }
-        else
-        {
-            if ((int)*th_status == 1)
-            {
-                tst_resm(TINFO,
-                        "thread [%ld] - process exited with errors",
-                (long)pthread_ids[thrd_ndx]);
-                free(empty_buf);
-                remove_files(tmpfile, map_addr);
-                close(fd);
-                exit(1);
-            }
-        }
-    }
+	for (thrd_ndx = 0; thrd_ndx < NUMTHREAD; thrd_ndx++) {
+		if (pthread_join(pthread_ids[thrd_ndx], (void **)th_status)) {
+			perror("map_and_thread(): pthread_join()");
+			free(empty_buf);
+			fflush(NULL);
+			remove_files(tmpfile, map_addr);
+			close(fd);
+			retinfo->status = FAILED;
+			return retinfo;
+		} else {
+			if ((int)*th_status == 1) {
+				tst_resm(TINFO,
+					 "thread [%ld] - process exited with errors",
+					 (long)pthread_ids[thrd_ndx]);
+				free(empty_buf);
+				remove_files(tmpfile, map_addr);
+				close(fd);
+				exit(1);
+			}
+		}
+	}
 
-    /* remove the temporary file that was created. - clean up                 */
-    /* but dont try to remove special files.                                  */
+	/* remove the temporary file that was created. - clean up                 */
+	/* but dont try to remove special files.                                  */
 
     /***********************************************/
-    /*   Was if !(remove_files()) ...
-     *   If that routine succeeds, it returns SUCCESS, which
-     *   happens to be 0.  So if the routine succeeded, the
-     *   above condition would indicate failure.  This change
-     *   fixes that.
-     */
-    if (remove_files(tmpfile, map_addr) == FAILED)
-    {
-        free(empty_buf);
-        free(th_status);
-        retinfo->status = FAILED;
-        return retinfo;
-    }
+	/*   Was if !(remove_files()) ...
+	 *   If that routine succeeds, it returns SUCCESS, which
+	 *   happens to be 0.  So if the routine succeeded, the
+	 *   above condition would indicate failure.  This change
+	 *   fixes that.
+	 */
+	if (remove_files(tmpfile, map_addr) == FAILED) {
+		free(empty_buf);
+		free(th_status);
+		retinfo->status = FAILED;
+		return retinfo;
+	}
 
-    free(empty_buf);
-    free(th_status);
-    close(fd);
-    retinfo->status = SUCCESS;
-    return retinfo;
+	free(empty_buf);
+	free(th_status);
+	close(fd);
+	retinfo->status = SUCCESS;
+	return retinfo;
 }
 
 /******************************************************************************/
@@ -562,16 +541,15 @@
 /* Synopsis:    int test1();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test1()
+static int test1()
 {
-    RETINFO_t retval;    /* contains info relating to test status          */
+	RETINFO_t retval;	/* contains info relating to test status          */
 
-    tst_resm(TINFO, "test1: Test case tests the race condition between "
-           "simultaneous read faults in the same address space.");
-    map_and_thread("./tmp.file.1", thread_fault, READ_FAULT, NUMTHREAD,
-                   &retval);
-    return (retval.status);
+	tst_resm(TINFO, "test1: Test case tests the race condition between "
+		 "simultaneous read faults in the same address space.");
+	map_and_thread("./tmp.file.1", thread_fault, READ_FAULT, NUMTHREAD,
+		       &retval);
+	return (retval.status);
 }
 
 /******************************************************************************/
@@ -590,16 +568,15 @@
 /* Synopsis:    int test2();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test2()
+static int test2()
 {
-    RETINFO_t retval;    /* contains test stats information               */
+	RETINFO_t retval;	/* contains test stats information               */
 
-    tst_resm(TINFO, "test2: Test case tests the race condition between "
-       "simultaneous write faults in the same address space.");
-    map_and_thread("./tmp.file.2", thread_fault, WRITE_FAULT, NUMTHREAD,
-                   &retval);
-    return (retval.status);
+	tst_resm(TINFO, "test2: Test case tests the race condition between "
+		 "simultaneous write faults in the same address space.");
+	map_and_thread("./tmp.file.2", thread_fault, WRITE_FAULT, NUMTHREAD,
+		       &retval);
+	return (retval.status);
 }
 
 /******************************************************************************/
@@ -618,15 +595,15 @@
 /* Synopsis:    int test3();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test3()
+static int test3()
 {
-    RETINFO_t retval;    /* contains test stats information                   */
+	RETINFO_t retval;	/* contains test stats information                   */
 
-    tst_resm(TINFO, "test3: Test case tests the race condition between "
-           "simultaneous COW faults in the same address space.");
-    map_and_thread("./tmp.file.3", thread_fault, COW_FAULT, NUMTHREAD, &retval);
-    return (retval.status);
+	tst_resm(TINFO, "test3: Test case tests the race condition between "
+		 "simultaneous COW faults in the same address space.");
+	map_and_thread("./tmp.file.3", thread_fault, COW_FAULT, NUMTHREAD,
+		       &retval);
+	return (retval.status);
 }
 
 /******************************************************************************/
@@ -645,16 +622,16 @@
 /* Synopsis:    int test4();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test4()
+static int test4()
 {
-    RETINFO_t retval;     /* contains test status information                 */
+	RETINFO_t retval;	/* contains test status information                 */
 
-    tst_resm(TINFO, "test4: Test case tests the race condition between "
-           "simultaneous READ faults in the same address space. "
-           "The file mapped is /dev/zero");
-    map_and_thread("/dev/zero", thread_fault, COW_FAULT, NUMTHREAD, &retval);
-    return (retval.status);
+	tst_resm(TINFO, "test4: Test case tests the race condition between "
+		 "simultaneous READ faults in the same address space. "
+		 "The file mapped is /dev/zero");
+	map_and_thread("/dev/zero", thread_fault, COW_FAULT, NUMTHREAD,
+		       &retval);
+	return (retval.status);
 }
 
 /******************************************************************************/
@@ -672,49 +649,44 @@
 /* Synopsis:    int test5();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test5()
+static int test5()
 {
-    int    fork_ndx = 0;    /* index to the number of processes forked        */
-    pid_t  pid      = 0;    /* process id, returned by fork system call.      */
-    int    wait_status = 0; /* if status is not NULL store status information */
+	int fork_ndx = 0;	/* index to the number of processes forked        */
+	pid_t pid = 0;		/* process id, returned by fork system call.      */
+	int wait_status = 0;	/* if status is not NULL store status information */
 
-    tst_resm(TINFO, "test5: Test case tests the race condition between "
-           "simultaneous fork - exit faults in the same address space.");
+	tst_resm(TINFO, "test5: Test case tests the race condition between "
+		 "simultaneous fork - exit faults in the same address space.");
 
-    /* increment the  program's  data  space  by 200*1024 (BRKSZ) bytes       */
+	/* increment the  program's  data  space  by 200*1024 (BRKSZ) bytes       */
 
-    if (sbrk(BRKSZ) == (caddr_t)-1)
-    {
-        perror("test5(): sbrk()");
-        fflush(NULL);
-        return FAILED;
-    }
+	if (sbrk(BRKSZ) == (caddr_t) - 1) {
+		perror("test5(): sbrk()");
+		fflush(NULL);
+		return FAILED;
+	}
 
-    /* fork NUMTHREAD number of processes, assumption is on SMP each will get */
-    /* a separate CPU if NRCPUS = NUMTHREAD. The child does nothing; exits    */
-    /* immediately, parent waits for child to complete execution.             */
-    do
-    {
-        if (!(pid = fork()))
-            _exit (0);
-        else
-        {
-            if (pid != -1)
-                wait(&wait_status);
-        }
+	/* fork NUMTHREAD number of processes, assumption is on SMP each will get */
+	/* a separate CPU if NRCPUS = NUMTHREAD. The child does nothing; exits    */
+	/* immediately, parent waits for child to complete execution.             */
+	do {
+		if (!(pid = fork()))
+			_exit(0);
+		else {
+			if (pid != -1)
+				wait(&wait_status);
+		}
 
-    } while (fork_ndx++ < NUMTHREAD);
+	} while (fork_ndx++ < NUMTHREAD);
 
-    if (sbrk(-BRKSZ) == (caddr_t)-1)
-    {
-        tst_resm(TINFO, "test5(): rollback sbrk failed");
-        fflush(NULL);
-        perror("test5(): sbrk()");
-        fflush(NULL);
-        return FAILED;
-    }
-    return SUCCESS;
+	if (sbrk(-BRKSZ) == (caddr_t) - 1) {
+		tst_resm(TINFO, "test5(): rollback sbrk failed");
+		fflush(NULL);
+		perror("test5(): sbrk()");
+		fflush(NULL);
+		return FAILED;
+	}
+	return SUCCESS;
 }
 
 /******************************************************************************/
@@ -733,79 +705,70 @@
 /* Synopsis:    int test6();                                                  */
 /*                                                                            */
 /******************************************************************************/
-static int
-test6()
+static int test6()
 {
-    int    res = SUCCESS;
-    int    fork_ndx = 0;   /* index to the number of processes forked         */
-    pid_t  pid = 0;        /* process id, returned by fork system call.       */
-    int    wait_status;    /* if status is not NULL store status information  */
-    char  *argv_init[2] =  /* parameter required for dummy function to execvp */
-                          {"arg1", NULL};
+	int res = SUCCESS;
+	int fork_ndx = 0;	/* index to the number of processes forked         */
+	pid_t pid = 0;		/* process id, returned by fork system call.       */
+	int wait_status;	/* if status is not NULL store status information  */
+	char *argv_init[2] =	/* parameter required for dummy function to execvp */
+	{ "arg1", NULL };
 
-    tst_resm(TINFO, "test6: Test case tests the race condition between "
-           "simultaneous fork -exec - exit faults in the same address space.");
+	tst_resm(TINFO, "test6: Test case tests the race condition between "
+		 "simultaneous fork -exec - exit faults in the same address space.");
 
-    /* increment the  program's  data  space  by 200*1024 (BRKSZ) bytes       */
+	/* increment the  program's  data  space  by 200*1024 (BRKSZ) bytes       */
 
-    if (sbrk(BRKSZ) == (caddr_t)-1)
-    {
-        perror("test6(): sbrk()");
-        fflush(NULL);
-        return FAILED;
-    }
+	if (sbrk(BRKSZ) == (caddr_t) - 1) {
+		perror("test6(): sbrk()");
+		fflush(NULL);
+		return FAILED;
+	}
 
-    /* fork NUMTHREAD number of processes, assumption is on SMP each will get */
-    /* a separate CPU if NRCPUS = NUMTHREAD. The child execs a dummy program  */
-    /*  and parent waits for child to complete execution.                     */
+	/* fork NUMTHREAD number of processes, assumption is on SMP each will get */
+	/* a separate CPU if NRCPUS = NUMTHREAD. The child execs a dummy program  */
+	/*  and parent waits for child to complete execution.                     */
 
-    do
-    {
-        if (!(pid = fork()))
-        {
-            if (execvp("dummy", argv_init) == -1)
-            {
-                if (execvp("./dummy", argv_init) == -1)
-		{
-		   perror("test6(): execvp()");
-                   fflush(NULL);
-                   /*************************************************/
-                   /*   Dummy uses exit 0 so use something else for
-                    *   error exit.
-                    */
-                    exit(99);
+	do {
+		if (!(pid = fork())) {
+			if (execvp("dummy", argv_init) == -1) {
+				if (execvp("./dummy", argv_init) == -1) {
+					perror("test6(): execvp()");
+					fflush(NULL);
+		   /*************************************************/
+					/*   Dummy uses exit 0 so use something else for
+					 *   error exit.
+					 */
+					exit(99);
+				}
+			}
+		} else {
+			if (pid != -1)
+				wait(&wait_status);
+	    /*************************************************/
+			/*   Dummy uses exit 0.
+			 *   Capture exit of child and set res accordingly.
+			 *   It defaults to SUCCESS.  Only gets set if
+			 *   child fails.
+			 */
+			if (WEXITSTATUS(wait_status) != 0)
+				res = FAILED;
 		}
-            }
-        }
-        else
-        {
-            if (pid != -1)
-                wait(&wait_status);
-            /*************************************************/
-            /*   Dummy uses exit 0.
-             *   Capture exit of child and set res accordingly.
-             *   It defaults to SUCCESS.  Only gets set if
-             *   child fails.
-             */
-            if (WEXITSTATUS(wait_status) != 0)
-               res = FAILED;
-        }
 
-    } while (fork_ndx++ < NUMTHREAD);
+	} while (fork_ndx++ < NUMTHREAD);
 
-    if (sbrk(-BRKSZ) == (caddr_t)-1)
-    {
-        tst_resm(TINFO, "test6(): rollback sbrk failed");
-        fflush(NULL);
-        perror("test6(): sbrk()");
-        fflush(NULL);
-        return FAILED;
-    }
+	if (sbrk(-BRKSZ) == (caddr_t) - 1) {
+		tst_resm(TINFO, "test6(): rollback sbrk failed");
+		fflush(NULL);
+		perror("test6(): sbrk()");
+		fflush(NULL);
+		return FAILED;
+	}
     /*************************************/
-    /*  This used to return SUCCESS, whether or not the
-     *  test actually worked.
-     */
-    return res;
+	/*  This used to return SUCCESS, whether or not the
+	 *  test actually worked.
+	 */
+	return res;
 }
 
 /******************************************************************************/
@@ -826,167 +789,166 @@
 /*                   non zero - failure                                       */
 /*                                                                            */
 /******************************************************************************/
-int
-main(int   argc,     /* number of command line parameters                     */
-     char  **argv)   /* pointer to the array of the command line parameters.  */
-{
-    extern char *optarg;  /* getopt() function global variables               */
-    extern int   optind;  /* index into argument                              */
-    extern int   opterr;  /* optarg error detection                           */
-    extern int   optopt;  /* stores bad option passed to the program          */
+int main(int argc,		/* number of command line parameters                     */
+	 char **argv)
+{				/* pointer to the array of the command line parameters.  */
+	extern char *optarg;	/* getopt() function global variables               */
+	extern int optind;	/* index into argument                              */
+	extern int opterr;	/* optarg error detection                           */
+	extern int optopt;	/* stores bad option passed to the program          */
 
-    static char *version_info = "mmstress V1.00 04/17/2001";
-                          /* version of this program                          */
-    int    (*(test_ptr)[])() =
-                               {NULL, test1, test2, test3, test4, test5, test6};
-                                    /* pointer to the array of test names     */
-    int    ch;                      /* command line flag character            */
-    int    test_num     = 0;        /* test number that is to be run          */
-    int    test_time    = 0;        /* duration for which test is to be run   */
-    int    sig_ndx      = 0;        /* index into signal handler structure.   */
-    int    run_once     = TRUE;     /* test/tests are run once by default.    */
-    char   *prog_name   = argv[0];  /* name of this program                   */
-    int    rc           = 0;        /* return value from tests.  0 - success  */
-    int    global_rc    = 0;        /* return value from tests.  0 - success  */
-    int    version_flag = FALSE;    /* printf the program version             */
-    struct sigaction sigptr;        /* set up signal, for interval timer      */
+	static char *version_info = "mmstress V1.00 04/17/2001";
+	/* version of this program                          */
+	int (*(test_ptr)[]) () = {
+	NULL, test1, test2, test3, test4, test5, test6};
+	/* pointer to the array of test names     */
+	int ch;			/* command line flag character            */
+	int test_num = 0;	/* test number that is to be run          */
+	int test_time = 0;	/* duration for which test is to be run   */
+	int sig_ndx = 0;	/* index into signal handler structure.   */
+	int run_once = TRUE;	/* test/tests are run once by default.    */
+	char *prog_name = argv[0];	/* name of this program                   */
+	int rc = 0;		/* return value from tests.  0 - success  */
+	int global_rc = 0;	/* return value from tests.  0 - success  */
+	int version_flag = FALSE;	/* printf the program version             */
+	struct sigaction sigptr;	/* set up signal, for interval timer      */
 
-    static struct signal_info
-    {
-        int  signum;    /* signal number that hasto be handled                */
-        char *signame;  /* name of the signal to be handled.                  */
-    }
-    sig_info[] =  {     {SIGHUP,"SIGHUP"},
-                        {SIGINT,"SIGINT"},
-                        {SIGQUIT,"SIGQUIT"},
-                        {SIGABRT,"SIGABRT"},
-                        {SIGBUS,"SIGBUS"},
-                        {SIGSEGV,"SIGSEGV"},
-                        {SIGALRM, "SIGALRM"},
-                        {SIGUSR1,"SIGUSR1"},
-                        {SIGUSR2,"SIGUSR2"},
-                        {SIGENDSIG,"ENDSIG"}
-                   };
+	static struct signal_info {
+		int signum;	/* signal number that hasto be handled                */
+		char *signame;	/* name of the signal to be handled.                  */
+	} sig_info[] = { {
+	SIGHUP, "SIGHUP"}, {
+	SIGINT, "SIGINT"}, {
+	SIGQUIT, "SIGQUIT"}, {
+	SIGABRT, "SIGABRT"}, {
+	SIGBUS, "SIGBUS"}, {
+	SIGSEGV, "SIGSEGV"}, {
+	SIGALRM, "SIGALRM"}, {
+	SIGUSR1, "SIGUSR1"}, {
+	SIGUSR2, "SIGUSR2"}, {
+	SIGENDSIG, "ENDSIG"}
+	};
 
-    setvbuf(stdout, NULL, _IONBF, 0);
-    setvbuf(stderr, NULL, _IONBF, 0);
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-    optarg = NULL;
-    opterr = 0;
+	optarg = NULL;
+	opterr = 0;
 
-    if (argc < 2)
-    tst_resm(TINFO, "run %s -h for all options", argv[0]);
+	if (argc < 2)
+		tst_resm(TINFO, "run %s -h for all options", argv[0]);
 
-    while ((ch = getopt(argc, argv, "hn:p:t:vV")) != -1)
-    {
-        switch(ch)
-        {
-            case 'h': usage(argv[0]);
-                      break;
-            case 'n': if (optarg)
-                          test_num = atoi(optarg);
-                      else
-                          OPT_MISSING(prog_name, optopt);
-                      break;
-            case 'p': if (optarg)
-                          pages_num = atoi(optarg);
-                      else
-                          OPT_MISSING(prog_name, optopt);
-                      break;
-            case 't': if (optarg)
-                      {
-                          tst_resm(TINFO, "Test is scheduled to run for %d hours",
-				test_time = atoi(optarg));
-                          run_once = FALSE;
-                      }
-                      else
-                          OPT_MISSING(prog_name, optopt);
-                      break;
-            case 'v': verbose_print = TRUE;
-                      break;
-            case 'V': if (!version_flag)
-                      {
-                          version_flag = TRUE;
-                          tst_resm(TINFO, "%s: %s", prog_name, version_info);
-                      }
-                      break;
-            case '?': if (argc < optind)
-                          OPT_MISSING(prog_name, optopt);
-                      else
-                          fprintf(stderr,
-                              "%s: unknown option - %c ignored\n", prog_name,
-                              optopt);
-                      break;
-            default: fprintf(stderr, "%s: getopt() failed!!!\n", prog_name);
-                     exit(2);
-        }
-    }
+	while ((ch = getopt(argc, argv, "hn:p:t:vV")) != -1) {
+		switch (ch) {
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 'n':
+			if (optarg)
+				test_num = atoi(optarg);
+			else
+				OPT_MISSING(prog_name, optopt);
+			break;
+		case 'p':
+			if (optarg)
+				pages_num = atoi(optarg);
+			else
+				OPT_MISSING(prog_name, optopt);
+			break;
+		case 't':
+			if (optarg) {
+				tst_resm(TINFO,
+					 "Test is scheduled to run for %d hours",
+					 test_time = atoi(optarg));
+				run_once = FALSE;
+			} else
+				OPT_MISSING(prog_name, optopt);
+			break;
+		case 'v':
+			verbose_print = TRUE;
+			break;
+		case 'V':
+			if (!version_flag) {
+				version_flag = TRUE;
+				tst_resm(TINFO, "%s: %s", prog_name,
+					 version_info);
+			}
+			break;
+		case '?':
+			if (argc < optind)
+				OPT_MISSING(prog_name, optopt);
+			else
+				fprintf(stderr,
+					"%s: unknown option - %c ignored\n",
+					prog_name, optopt);
+			break;
+		default:
+			fprintf(stderr, "%s: getopt() failed!!!\n", prog_name);
+			exit(2);
+		}
+	}
 
-    /* duration for which the tests have to be run. test_time is converted to */
-    /* corresponding seconds and the tests are run as long as the current time*/
-    /* is less than the required time and test are successul (ie rc = 0)      */
+	/* duration for which the tests have to be run. test_time is converted to */
+	/* corresponding seconds and the tests are run as long as the current time */
+	/* is less than the required time and test are successul (ie rc = 0)      */
 
-    set_timer(test_time);
+	set_timer(test_time);
 
-    /* set up signals */
-    sigptr.sa_handler = (void (*)(int signal))sig_handler;
-    sigfillset(&sigptr.sa_mask);
-    sigptr.sa_flags = 0;
-    for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++)
-    {
-        sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
+	/* set up signals */
+	sigptr.sa_handler = (void (*)(int signal))sig_handler;
+	sigfillset(&sigptr.sa_mask);
+	sigptr.sa_flags = 0;
+	for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++) {
+		sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
 
-        if (sigaction(sig_info[sig_ndx].signum, &sigptr,
-                      (struct sigaction *)NULL) == SIGENDSIG)
-        {
-            perror( "main(): sigaction()" );
-            fprintf(stderr, "could not set handler for SIGALRM, errno = %d\n",
-                    errno);
-            exit(EXIT_FAILURE);
-        }
-    }
+		if (sigaction(sig_info[sig_ndx].signum, &sigptr,
+			      (struct sigaction *)NULL) == SIGENDSIG) {
+			perror("main(): sigaction()");
+			fprintf(stderr,
+				"could not set handler for SIGALRM, errno = %d\n",
+				errno);
+			exit(EXIT_FAILURE);
+		}
+	}
 
     /*************************************************/
-    /*   The way this loop was, 5 of 6 tests could fail,
-     *   and as long test test 6 passed, the test passed.
-     *   The changes in this loop repair that problem.
-     */
-    do
-    {
-        if (!test_num)
-        {
-            int test_ndx;  /* index into the array of tests               */
+	/*   The way this loop was, 5 of 6 tests could fail,
+	 *   and as long test test 6 passed, the test passed.
+	 *   The changes in this loop repair that problem.
+	 */
+	do {
+		if (!test_num) {
+			int test_ndx;	/* index into the array of tests               */
 
-            for (test_ndx = 1; test_ndx <= MAXTEST; test_ndx++) {
-                rc = test_ptr[test_ndx]();
-                if (rc == SUCCESS) {
-                   tst_resm(TPASS, "TEST %d Passed", test_ndx);
-                } else {
-                   tst_resm(TFAIL, "TEST %d Failed", test_ndx);
-                   global_rc = rc;
-                }
-            }
-        }
-        else
-        {
-            global_rc = (test_num > MAXTEST) ?
-		  fprintf(stderr,
-                            "Invalid test number, must be in range [1 - %d]\n",
-                             MAXTEST):
-                  test_ptr[test_num]();
-        }
+			for (test_ndx = 1; test_ndx <= MAXTEST; test_ndx++) {
+				rc = test_ptr[test_ndx] ();
+				if (rc == SUCCESS) {
+					tst_resm(TPASS, "TEST %d Passed",
+						 test_ndx);
+				} else {
+					tst_resm(TFAIL, "TEST %d Failed",
+						 test_ndx);
+					global_rc = rc;
+				}
+			}
+		} else {
+			global_rc = (test_num > MAXTEST) ?
+			    fprintf(stderr,
+				    "Invalid test number, must be in range [1 - %d]\n",
+				    MAXTEST) : test_ptr[test_num] ();
+		}
 
-        if (global_rc != SUCCESS) {
-            tst_resm(TFAIL, "Test Failed");
-            exit(global_rc);
-        }
+		if (global_rc != SUCCESS) {
+			tst_resm(TFAIL, "Test Failed");
+			exit(global_rc);
+		}
 
-    } while ((TRUE) && (!run_once));
+	} while ((TRUE) && (!run_once));
 
-    if (global_rc != SUCCESS) {
-        tst_resm(TFAIL, "Test Failed");
-    } else {
-        tst_resm(TPASS, "Test Passed");
-    }
-    exit(global_rc);
+	if (global_rc != SUCCESS) {
+		tst_resm(TFAIL, "Test Failed");
+	} else {
+		tst_resm(TPASS, "Test Passed");
+	}
+	exit(global_rc);
 }
diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c
index 6d6f89d..61d5369 100644
--- a/testcases/kernel/mem/mtest06/mmap1.c
+++ b/testcases/kernel/mem/mtest06/mmap1.c
@@ -69,7 +69,7 @@
 char *TCID = "mmap1";
 int TST_TOTAL = 1;
 
-static void sig_handler(int signal, siginfo_t *info, void *ut)
+static void sig_handler(int signal, siginfo_t * info, void *ut)
 {
 	switch (signal) {
 	case SIGALRM:
@@ -77,10 +77,9 @@
 		_exit(TPASS);
 	case SIGSEGV:
 		longjmp(jmpbuf, 1);
-	break;
-        default:
-		fprintf(stderr, "Unexpected signal - %d --- exiting\n",
-		        signal);
+		break;
+	default:
+		fprintf(stderr, "Unexpected signal - %d --- exiting\n", signal);
 		_exit(TBROK);
 	}
 }
@@ -89,7 +88,7 @@
  * Signal handler that is active, when file is mapped, eg. we do not expect
  * SIGSEGV to be delivered.
  */
-static void sig_handler_mapped(int signal, siginfo_t *info, void *ut)
+static void sig_handler_mapped(int signal, siginfo_t * info, void *ut)
 {
 	switch (signal) {
 	case SIGALRM:
@@ -97,12 +96,11 @@
 		_exit(TPASS);
 	case SIGSEGV:
 		tst_resm(TINFO, "[%lu] Unexpected page fault at %p",
-		         pthread_self(), info->si_addr);
+			 pthread_self(), info->si_addr);
 		_exit(TFAIL);
-	break;
-        default:
-		fprintf(stderr, "Unexpected signal - %d --- exiting\n",
-		        signal);
+		break;
+	default:
+		fprintf(stderr, "Unexpected signal - %d --- exiting\n", signal);
 		_exit(TBROK);
 	}
 }
@@ -113,19 +111,19 @@
 	int fd, i;
 
 	if ((fd = mkstemp(template)) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "mkstemp() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "mkstemp() failed");
 
 	unlink(template);
 
 	for (i = 0; i < size; i++)
 		if (write(fd, "a", 1) == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "write() failed");
+			tst_brkm(TBROK | TERRNO, NULL, "write() failed");
 
 	if (write(fd, "\0", 1) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "write() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "write() failed");
 
 	if (fsync(fd) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "fsync() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "fsync() failed");
 
 	return fd;
 }
@@ -138,21 +136,21 @@
 	int j;
 
 	tst_resm(TINFO, "[%lu] - map, change contents, unmap files %ld times",
-	         pthread_self(), args[2]);
+		 pthread_self(), args[2]);
 
 	if (verbose_print)
 		tst_resm(TINFO, "map_write_unmap() arguments are: "
-		                "fd - arg[0]: %ld; "
-		                "size of file - arg[1]: %ld; "
-		                "num of map/write/unmap - arg[2]: %ld",
-		                args[0], args[1], args[2]);
+			 "fd - arg[0]: %ld; "
+			 "size of file - arg[1]: %ld; "
+			 "num of map/write/unmap - arg[2]: %ld",
+			 args[0], args[1], args[2]);
 
 	for (i = 0; i < args[2]; i++) {
 
-		map_address = mmap(0, (size_t)args[1], PROT_WRITE|PROT_READ,
-		                        MAP_SHARED, (int)args[0], 0);
+		map_address = mmap(0, (size_t) args[1], PROT_WRITE | PROT_READ,
+				   MAP_SHARED, (int)args[0], 0);
 
-		if (map_address == (void*) -1) {
+		if (map_address == (void *)-1) {
 			perror("map_write_unmap(): mmap()");
 			pthread_exit((void *)1);
 		}
@@ -162,12 +160,12 @@
 
 		sigfillset(&sa.sa_mask);
 		sigdelset(&sa.sa_mask, SIGSEGV);
-		sa.sa_flags = SA_SIGINFO|SA_NODEFER;
+		sa.sa_flags = SA_SIGINFO | SA_NODEFER;
 		sa.sa_sigaction = sig_handler_mapped;
 
 		if (sigaction(SIGSEGV, &sa, NULL)) {
 			perror("map_write_unmap(): sigaction()");
-			pthread_exit((void*)1);
+			pthread_exit((void *)1);
 		}
 
 		if (verbose_print)
@@ -180,21 +178,22 @@
 		}
 
 		if (verbose_print)
-			tst_resm(TINFO, "[%ld] times done: of total [%ld] iterations, "
-			         "map_write_unmap():memset() content of memory = %s",
-                                 i, args[2], (char*)map_address);
+			tst_resm(TINFO,
+				 "[%ld] times done: of total [%ld] iterations, "
+				 "map_write_unmap():memset() content of memory = %s",
+				 i, args[2], (char *)map_address);
 
 		sigfillset(&sa.sa_mask);
 		sigdelset(&sa.sa_mask, SIGSEGV);
-		sa.sa_flags = SA_SIGINFO|SA_NODEFER;
+		sa.sa_flags = SA_SIGINFO | SA_NODEFER;
 		sa.sa_sigaction = sig_handler;
 
 		if (sigaction(SIGSEGV, &sa, NULL)) {
 			perror("map_write_unmap(): sigaction()");
-			pthread_exit((void*)1);
+			pthread_exit((void *)1);
 		}
 
-		if (munmap(map_address, (size_t)args[1]) == -1) {
+		if (munmap(map_address, (size_t) args[1]) == -1) {
 			perror("map_write_unmap(): mmap()");
 			pthread_exit((void *)1);
 		}
@@ -210,29 +209,29 @@
 	int j;
 
 	tst_resm(TINFO, "[%lu] - read contents of memory %p %ld times",
-	         pthread_self(), map_address, args[2]);
+		 pthread_self(), map_address, args[2]);
 
 	if (verbose_print)
 		tst_resm(TINFO, "read_mem() arguments are: "
-		         "number of reads to be performed - arg[2]: %ld; "
-		         "read from address %p",
-                         args[2], map_address);
+			 "number of reads to be performed - arg[2]: %ld; "
+			 "read from address %p", args[2], map_address);
 
 	for (i = 0; i < args[2]; i++) {
 
 		if (verbose_print)
 			tst_resm(TINFO, "read_mem() in while loop %ld times "
-			         "to go %ld times", i, args[2]);
+				 "to go %ld times", i, args[2]);
 
 		if (setjmp(jmpbuf) == 1) {
 			read_lock = 0;
 			if (verbose_print)
 				tst_resm(TINFO, "page fault occurred due to "
-				         "a read after an unmap");
+					 "a read after an unmap");
 		} else {
 			if (verbose_print)
-				tst_resm(TINFO, "read_mem(): content of memory: %s",
-				         (char *)map_address);
+				tst_resm(TINFO,
+					 "read_mem(): content of memory: %s",
+					 (char *)map_address);
 
 			for (j = 0; j < args[1]; j++) {
 				read_lock = 1;
@@ -262,21 +261,21 @@
 }
 
 struct signal_info {
-	int  signum;
+	int signum;
 	char *signame;
 };
 
 static struct signal_info sig_info[] = {
-	{SIGHUP,  "SIGHUP" },
-	{SIGINT,  "SIGINT" },
+	{SIGHUP, "SIGHUP"},
+	{SIGINT, "SIGINT"},
 	{SIGQUIT, "SIGQUIT"},
 	{SIGABRT, "SIGABRT"},
-	{SIGBUS,  "SIGBUS" },
+	{SIGBUS, "SIGBUS"},
 	{SIGSEGV, "SIGSEGV"},
 	{SIGALRM, "SIGALRM"},
 	{SIGUSR1, "SIGUSR1"},
 	{SIGUSR2, "SIGUSR2"},
-	{-1,      "ENDSIG" }
+	{-1, "ENDSIG"}
 };
 
 int main(int argc, char **argv)
@@ -298,47 +297,50 @@
 	num_iter = 1000;
 	exec_time = 24;
 
-	while ((c =  getopt(argc, argv, "hvl:s:x:")) != -1) {
-		switch(c) {
+	while ((c = getopt(argc, argv, "hvl:s:x:")) != -1) {
+		switch (c) {
 		case 'h':
 			usage(argv[0]);
-		break;
+			break;
 		case 'l':
 			if ((num_iter = atoi(optarg)) == 0)
 				OPT_MISSING(argv[0], optopt);
-                	else
-				if (num_iter < 0)
-					printf("WARNING: bad argument. Using default %d\n", (num_iter = 1000));
-		break;
+			else if (num_iter < 0)
+				printf
+				    ("WARNING: bad argument. Using default %d\n",
+				     (num_iter = 1000));
+			break;
 		case 's':
 			if ((file_size = atoi(optarg)) == 0)
 				OPT_MISSING(argv[0], optopt);
-			else
-				if (file_size < 0)
-					printf("WARNING: bad argument. Using default %d\n", (file_size = 1024));
-		break;
+			else if (file_size < 0)
+				printf
+				    ("WARNING: bad argument. Using default %d\n",
+				     (file_size = 1024));
+			break;
 		case 'v':
 			verbose_print = 1;
-		break;
+			break;
 		case 'x':
 			exec_time = atof(optarg);
 			if (exec_time == 0)
 				OPT_MISSING(argv[0], optopt);
-			else
-				if (exec_time < 0)
-					printf("WARNING: bad argument. Using default %.0f\n", (exec_time = 24));
-		break;
+			else if (exec_time < 0)
+				printf
+				    ("WARNING: bad argument. Using default %.0f\n",
+				     (exec_time = 24));
+			break;
 		default:
 			usage(argv[0]);
-		break;
+			break;
 		}
 	}
 
 	if (verbose_print)
 		tst_resm(TINFO, "Input parameters are: File size:  %d; "
-		         "Scheduled to run:  %lf hours; "
-		         "Number of mmap/write/read:  %d",
-		         file_size, exec_time, num_iter);
+			 "Scheduled to run:  %lf hours; "
+			 "Number of mmap/write/read:  %d",
+			 file_size, exec_time, num_iter);
 
 	alarm(exec_time * 3600);
 
@@ -351,15 +353,17 @@
 	for (i = 0; sig_info[i].signum != -1; i++) {
 		if (sigaction(sig_info[i].signum, &sigptr, NULL) == -1) {
 			perror("man(): sigaction()");
-			fprintf(stderr, "could not set handler for %s, errno = %d\n",
-			sig_info[i].signame, errno);
+			fprintf(stderr,
+				"could not set handler for %s, errno = %d\n",
+				sig_info[i].signame, errno);
 			exit(-1);
 		}
 	}
 
 	for (;;) {
 		if ((fd = mkfile(file_size)) == -1)
-			tst_brkm(TBROK, NULL, "main(): mkfile(): Failed to create temp file");
+			tst_brkm(TBROK, NULL,
+				 "main(): mkfile(): Failed to create temp file");
 
 		if (verbose_print)
 			tst_resm(TINFO, "Tmp file created");
@@ -368,24 +372,30 @@
 		chld_args[1] = file_size;
 		chld_args[2] = num_iter;
 
-		if ((ret = pthread_create(&thid[0], NULL, map_write_unmap, chld_args)))
-			tst_brkm(TBROK, NULL, "main(): pthread_create(): %s", strerror(ret));
+		if ((ret =
+		     pthread_create(&thid[0], NULL, map_write_unmap,
+				    chld_args)))
+			tst_brkm(TBROK, NULL, "main(): pthread_create(): %s",
+				 strerror(ret));
 
 		tst_resm(TINFO, "created writing thread[%lu]", thid[0]);
 
 		if ((ret = pthread_create(&thid[1], NULL, read_mem, chld_args)))
-			tst_brkm(TBROK, NULL, "main(): pthread_create(): %s", strerror(ret));
+			tst_brkm(TBROK, NULL, "main(): pthread_create(): %s",
+				 strerror(ret));
 
 		tst_resm(TINFO, "created reading thread[%lu]", thid[1]);
 
 		for (i = 0; i < 2; i++) {
-			if ((ret = pthread_join(thid[i], (void*)&status[i])))
-				tst_brkm(TBROK, NULL, "main(): pthread_join(): %s",
-				         strerror(ret));
+			if ((ret = pthread_join(thid[i], (void *)&status[i])))
+				tst_brkm(TBROK, NULL,
+					 "main(): pthread_join(): %s",
+					 strerror(ret));
 
 			if (status[i])
-				tst_brkm(TFAIL, NULL, "thread [%lu] - process exited "
-				         "with %d", thid[i], status[i]);
+				tst_brkm(TFAIL, NULL,
+					 "thread [%lu] - process exited "
+					 "with %d", thid[i], status[i]);
 		}
 
 		close(fd);
diff --git a/testcases/kernel/mem/mtest06/mmap2.c b/testcases/kernel/mem/mtest06/mmap2.c
index b819ca3..20069f3 100644
--- a/testcases/kernel/mem/mtest06/mmap2.c
+++ b/testcases/kernel/mem/mtest06/mmap2.c
@@ -84,8 +84,8 @@
 
 static int mkfile(int size)
 {
-	int  fd;
-	int  index = 0;
+	int fd;
+	int index = 0;
 	char buff[4096];
 	char template[PATH_MAX];
 
@@ -108,7 +108,7 @@
 		}
 	}
 	fprintf(stdout, "created file of size %d\n"
-			"content of the file is 'a'\n", index);
+		"content of the file is 'a'\n", index);
 
 	if (fsync(fd) == -1) {
 		perror("mkfile(): fsync()");
@@ -121,7 +121,7 @@
 {
 	if (signal != SIGALRM) {
 		fprintf(stderr, "sig_handlder(): unexpected signal caught"
-				"[%d]\n", signal);
+			"[%d]\n", signal);
 		exit(-1);
 	} else
 		fprintf(stdout, "Test ended, success\n");
@@ -131,85 +131,82 @@
 static void usage(char *progname)
 {
 	fprintf(stderr,
-			"Usage: %s -h -s -x\n"
-			"\t -a set map_flags to MAP_ANONYMOUS\n"
-			"\t -h help, usage message.\n"
-			"\t -p set map_flag to MAP_PRIVATE.\tdefault:"
-			"MAP_SHARED\n"
-			"\t -s size of the file/memory to be mmaped.\tdefault:"
-			"1GB\n"
-			"\t -x time for which test is to be run.\tdefault:"
-			"24 Hrs\n",
-			progname);
+		"Usage: %s -h -s -x\n"
+		"\t -a set map_flags to MAP_ANONYMOUS\n"
+		"\t -h help, usage message.\n"
+		"\t -p set map_flag to MAP_PRIVATE.\tdefault:"
+		"MAP_SHARED\n"
+		"\t -s size of the file/memory to be mmaped.\tdefault:"
+		"1GB\n"
+		"\t -x time for which test is to be run.\tdefault:"
+		"24 Hrs\n", progname);
 	exit(-1);
 }
 
 int main(int argc, char **argv)
 {
-	int   fd;
-	int   fsize = 1;
+	int fd;
+	int fsize = 1;
 	float exec_time = 24;
-	int   c;
-	int   sig_ndx;
-	int   map_flags =  MAP_SHARED;
-	int   map_anon =  FALSE;
-	int   run_once = TRUE;
-	char  *memptr;
+	int c;
+	int sig_ndx;
+	int map_flags = MAP_SHARED;
+	int map_anon = FALSE;
+	int run_once = TRUE;
+	char *memptr;
 	struct sigaction sigptr;
 
-	static struct signal_info
-	{
-		int  signum;
+	static struct signal_info {
+		int signum;
 		char *signame;
 	} sig_info[] = {
-		{SIGHUP, "SIGHUP"},
-		{SIGINT, "SIGINT"},
-		{SIGQUIT, "SIGQUIT"},
-		{SIGABRT, "SIGABRT"},
-		{SIGBUS, "SIGBUS"},
-		{SIGSEGV, "SIGSEGV"},
-		{SIGALRM, "SIGALRM"},
-		{SIGUSR1, "SIGUSR1"},
-		{SIGUSR2, "SIGUSR2"},
-		{-1,     "ENDSIG"}
+		{
+		SIGHUP, "SIGHUP"}, {
+		SIGINT, "SIGINT"}, {
+		SIGQUIT, "SIGQUIT"}, {
+		SIGABRT, "SIGABRT"}, {
+		SIGBUS, "SIGBUS"}, {
+		SIGSEGV, "SIGSEGV"}, {
+		SIGALRM, "SIGALRM"}, {
+		SIGUSR1, "SIGUSR1"}, {
+		SIGUSR2, "SIGUSR2"}, {
+		-1, "ENDSIG"}
 	};
 
-	while ((c =  getopt(argc, argv, "ahps:x:")) != -1) {
-			switch (c) {
-			case 'a':
-				map_anon = TRUE;
-				break;
-			case 'h':
-				usage(argv[0]);
-				exit(-1);
-				break;
-			case 'p':
-				map_flags = MAP_PRIVATE;
-				break;
-			case 's':
-				fsize = atoi(optarg);
-				if (fsize == 0)
-					fprintf(stderr, "Using default "
-						"fsize %d GB\n", fsize = 1);
-				break;
-			case 'x':
-				exec_time = atof(optarg);
-				if (exec_time == 0)
-					fprintf(stderr, "Using default exec "
-						"time %f hrs",
-						exec_time = (float)24);
-				run_once = FALSE;
-				break;
-			default:
-				usage(argv[0]);
-				break;
+	while ((c = getopt(argc, argv, "ahps:x:")) != -1) {
+		switch (c) {
+		case 'a':
+			map_anon = TRUE;
+			break;
+		case 'h':
+			usage(argv[0]);
+			exit(-1);
+			break;
+		case 'p':
+			map_flags = MAP_PRIVATE;
+			break;
+		case 's':
+			fsize = atoi(optarg);
+			if (fsize == 0)
+				fprintf(stderr, "Using default "
+					"fsize %d GB\n", fsize = 1);
+			break;
+		case 'x':
+			exec_time = atof(optarg);
+			if (exec_time == 0)
+				fprintf(stderr, "Using default exec "
+					"time %f hrs", exec_time = (float)24);
+			run_once = FALSE;
+			break;
+		default:
+			usage(argv[0]);
+			break;
 		}
 	}
 
 	fprintf(stdout, "MM Stress test, map/write/unmap large file\n"
-			"\tTest scheduled to run for:       %f\n"
-			"\tSize of temp file in GB:         %d\n",
-			exec_time, fsize);
+		"\tTest scheduled to run for:       %f\n"
+		"\tSize of temp file in GB:         %d\n", exec_time, fsize);
 
 	alarm(exec_time * 3600.00);
 
@@ -219,10 +216,10 @@
 	for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++) {
 		sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
 		if (sigaction(sig_info[sig_ndx].signum, &sigptr,
-					(struct sigaction *)NULL) == -1) {
+			      (struct sigaction *)NULL) == -1) {
 			perror("man(): sigaction()");
 			fprintf(stderr, "could not set handler for SIGALRM,"
-				"errno = %d\n",	errno);
+				"errno = %d\n", errno);
 			exit(-1);
 		}
 	}
@@ -237,26 +234,26 @@
 			}
 		} else {
 			fd = -1;
-			map_flags = map_flags|MAP_ANONYMOUS;
+			map_flags = map_flags | MAP_ANONYMOUS;
 		}
-		memptr = mmap(0, (fsize * GB), PROT_READ|PROT_WRITE,
-					map_flags, fd, 0);
-		if (memptr  == MAP_FAILED) {
+		memptr = mmap(0, (fsize * GB), PROT_READ | PROT_WRITE,
+			      map_flags, fd, 0);
+		if (memptr == MAP_FAILED) {
 			perror("main(): mmap()");
 			exit(-1);
 		} else
 			fprintf(stdout, "file mapped at %p\n"
 				"changing file content to 'A'\n", memptr);
 
-		memset(memptr, 'A', ((fsize * GB)/sizeof(char)));
+		memset(memptr, 'A', ((fsize * GB) / sizeof(char)));
 
-		if (msync(memptr, ((fsize * GB)/sizeof(char)),
-					MS_SYNC|MS_INVALIDATE) == -1) {
+		if (msync(memptr, ((fsize * GB) / sizeof(char)),
+			  MS_SYNC | MS_INVALIDATE) == -1) {
 			perror("main(): msync()");
 			exit(-1);
 		}
 
-		if (munmap(memptr, (fsize * GB)/sizeof(char)) == -1) {
+		if (munmap(memptr, (fsize * GB) / sizeof(char)) == -1) {
 			perror("main(): munmap()");
 			exit(-1);
 		} else
diff --git a/testcases/kernel/mem/mtest06/mmap3.c b/testcases/kernel/mem/mtest06/mmap3.c
index 2c20700..ec4de47 100644
--- a/testcases/kernel/mem/mtest06/mmap3.c
+++ b/testcases/kernel/mem/mtest06/mmap3.c
@@ -100,45 +100,40 @@
 /*              -1     - if it failed to create.                              */
 /*                                                                            */
 /******************************************************************************/
-static int
-mkfile(int  *size) 		/* size of the file to be generated in GB     */
-{
-    int   fd;			/* file descriptior of tmpfile		      */
-    int   index = 0;		/* index into the file, fill it with a's      */
-    char  buff[4096];		/* buffer that will be written to the file.   */
-    char template[PATH_MAX];    /* template for temp file name                */
+static int mkfile(int *size)
+{				/* size of the file to be generated in GB     */
+	int fd;			/* file descriptior of tmpfile                */
+	int index = 0;		/* index into the file, fill it with a's      */
+	char buff[4096];	/* buffer that will be written to the file.   */
+	char template[PATH_MAX];	/* template for temp file name                */
 
-    /* fill the buffer with a's and open a temp file */
-    memset(buff, 'a', 4096);
-    snprintf(template, PATH_MAX, "ashfileXXXXXX");
-    if ((fd = mkstemp(template)) == -1)
-    {
-        perror("mkfile(): mkstemp()");
-	return -1;
-    }
-    unlink(template);
-
-    srand(time(NULL)%100);
-    *size = (1 + (int)(1000.0*rand()/(RAND_MAX+1.0))) * 4096;
-
-    /* fill the file with the character a */
-    while (index < *size)
-    {
-        index += 4096;
-        if (write(fd, buff, 4096) == -1)
-	{
-	    perror("mkfile(): write()");
-	    return -1;
+	/* fill the buffer with a's and open a temp file */
+	memset(buff, 'a', 4096);
+	snprintf(template, PATH_MAX, "ashfileXXXXXX");
+	if ((fd = mkstemp(template)) == -1) {
+		perror("mkfile(): mkstemp()");
+		return -1;
 	}
-    }
+	unlink(template);
 
-    /* make sure a's are written to the file. */
-    if (fsync(fd) == -1)
-    {
-	perror("mkfile(): fsync()");
-	return -1;
-    }
-    return fd;
+	srand(time(NULL) % 100);
+	*size = (1 + (int)(1000.0 * rand() / (RAND_MAX + 1.0))) * 4096;
+
+	/* fill the file with the character a */
+	while (index < *size) {
+		index += 4096;
+		if (write(fd, buff, 4096) == -1) {
+			perror("mkfile(): write()");
+			return -1;
+		}
+	}
+
+	/* make sure a's are written to the file. */
+	if (fsync(fd) == -1) {
+		perror("mkfile(): fsync()");
+		return -1;
+	}
+	return fd;
 }
 
 /******************************************************************************/
@@ -148,26 +143,25 @@
 /* Description: handle SIGALRM raised by set_timer(), SIGALRM is raised when  */
 /*              the timer expires. If any other signal is recived exit the    */
 /*              test.                                                         */
-/*                                                                            *//* Input:       signal - signal number, intrested in SIGALRM!                 */
+										/*                                                                            *//* Input:       signal - signal number, intrested in SIGALRM!                 */
 /*                                                                            */
 /* Return:      exit 1 if unexpected signal is recived                        */
 /*              exit 0 if SIGALRM is recieved                                 */
 /*                                                                            */
 /******************************************************************************/
-static void
-sig_handler(int signal)         /* signal number, set to handle SIGALRM       */{
-    if (signal != SIGALRM)
-    {
-        fprintf(stderr, "sig_handlder(): unexpected signal caught [%d]\n",
-            signal);
-        exit(-1);
-    }
-    else
-        fprintf(stdout, "Test ended, success\n");
-    exit(0);
+static void sig_handler(int signal)
+{				/* signal number, set to handle SIGALRM       */
+	if (signal != SIGALRM) {
+		fprintf(stderr,
+			"sig_handlder(): unexpected signal caught [%d]\n",
+			signal);
+		exit(-1);
+	} else
+		fprintf(stdout, "Test ended, success\n");
+	exit(0);
 }
 
-/******************************************************************************//*								 	      */
+										/******************************************************************************//*                                                                            */
 /* Function:	usage							      */
 /*									      */
 /* Description:	Print the usage message.				      */
@@ -175,17 +169,17 @@
 /* Return:	exits with -1						      */
 /*									      */
 /******************************************************************************/
-static void
-usage(char *progname)           /* name of this program                       */{
-    fprintf(stderr,
-               "Usage: %s -h -l -n -p -x\n"
-               "\t -h help, usage message.\n"
-               "\t -l number of map - write - unmap.    default: 1000\n"
-               "\t -n number of LWP's to create.        default: 20\n"
-               "\t -p set mapping to MAP_PRIVATE.       default: MAP_SHARED\n"
-               "\t -x time for which test is to be run. default: 24 Hrs\n",
-                    progname);
-    exit(-1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr,
+		"Usage: %s -h -l -n -p -x\n"
+		"\t -h help, usage message.\n"
+		"\t -l number of map - write - unmap.    default: 1000\n"
+		"\t -n number of LWP's to create.        default: 20\n"
+		"\t -p set mapping to MAP_PRIVATE.       default: MAP_SHARED\n"
+		"\t -x time for which test is to be run. default: 24 Hrs\n",
+		progname);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -204,52 +198,48 @@
 /*              MWU_SUCCESS on error less completion of the loop.             */
 /*									      */
 /******************************************************************************/
-void *
-map_write_unmap(void *args)	/* file descriptor of the file to be mapped.  */
-{
-    int	    fsize;		/* size of the file to be created.	      */
-    int     fd;			/* temporary file descriptor		      */
-    int     mwu_ndx = 0;	/* index to number of map/write/unmap         */
-    caddr_t *map_address;	/* pointer to file in memory		      */
-    int     map_type;		/* MAP_PRIVATE or MAP_SHARED	              */
-    long    *mwuargs =          /* local pointer to arguments		      */
-		       (long *)args;
+void *map_write_unmap(void *args)
+{				/* file descriptor of the file to be mapped.  */
+	int fsize;		/* size of the file to be created.            */
+	int fd;			/* temporary file descriptor                  */
+	int mwu_ndx = 0;	/* index to number of map/write/unmap         */
+	caddr_t *map_address;	/* pointer to file in memory                  */
+	int map_type;		/* MAP_PRIVATE or MAP_SHARED                  */
+	long *mwuargs =		/* local pointer to arguments                 */
+	    (long *)args;
 
-    while (mwu_ndx++ < (int)mwuargs[0])
-    {
-        if ((fd = mkfile(&fsize)) == -1)
-        {
-            fprintf(stderr,
-            	"main(): mkfile(): Failed to create temp file.\n");
-	    pthread_exit((void *)-1);
-        }
+	while (mwu_ndx++ < (int)mwuargs[0]) {
+		if ((fd = mkfile(&fsize)) == -1) {
+			fprintf(stderr,
+				"main(): mkfile(): Failed to create temp file.\n");
+			pthread_exit((void *)-1);
+		}
 
-        if ((int)mwuargs[1])
-	    map_type = MAP_PRIVATE;
-	else
-	    map_type = MAP_SHARED;
-        if ((map_address = mmap(0, (size_t)fsize,  PROT_WRITE|PROT_READ,
-				map_type, (int)fd, 0))
-			 == (caddr_t *) -1)
-        {
-            perror("map_write_unmap(): mmap()");
-            pthread_exit((void *)-1);
-        }
+		if ((int)mwuargs[1])
+			map_type = MAP_PRIVATE;
+		else
+			map_type = MAP_SHARED;
+		if ((map_address =
+		     mmap(0, (size_t) fsize, PROT_WRITE | PROT_READ, map_type,
+			  (int)fd, 0))
+		    == (caddr_t *) - 1) {
+			perror("map_write_unmap(): mmap()");
+			pthread_exit((void *)-1);
+		}
 
-        memset(map_address, 'A', fsize);
+		memset(map_address, 'A', fsize);
 
-        fprintf(stdout,
-		"Map address = %p\nNum iter: [%d]\nTotal Num Iter: [%d]",
-		map_address, mwu_ndx, (int)mwuargs[0]);
-	usleep(1);
-        if (munmap(map_address, (size_t)fsize) == -1)
-        {
-	    perror("map_write_unmap(): mmap()");
-            pthread_exit((void *)-1);
-        }
-        close (fd);
-    }
-    pthread_exit((void *)0);
+		fprintf(stdout,
+			"Map address = %p\nNum iter: [%d]\nTotal Num Iter: [%d]",
+			map_address, mwu_ndx, (int)mwuargs[0]);
+		usleep(1);
+		if (munmap(map_address, (size_t) fsize) == -1) {
+			perror("map_write_unmap(): mmap()");
+			pthread_exit((void *)-1);
+		}
+		close(fd);
+	}
+	pthread_exit((void *)0);
 }
 
 /******************************************************************************/
@@ -266,133 +256,124 @@
 /*		exits with a 0 on success.				      */
 /*                                                                            */
 /******************************************************************************/
-int
-main(int  argc,		/* number of input parameters.			      */
-     char **argv)	/* pointer to the command line arguments.	      */
-{
-    int 	 c;		/* command line options			      */
-    int		 num_iter;	/* number of iteration to perform             */
-    int		 num_thrd;	/* number of threads to create                */
-    int		 thrd_ndx;	/* index into the array of threads.	      */
-    float	 exec_time;	/* period for which the test is executed      */
-    int          status;       /* exit status for light weight process       */
-    int          sig_ndx;      	/* index into signal handler structure.       */
-    pthread_t    thid[1000];	/* pids of process that will map/write/unmap  */
-    long         chld_args[3];	/* arguments to funcs execed by child process */
-    extern  char *optarg;	/* arguments passed to each option	      */
-    struct sigaction sigptr;	/* set up signal, for interval timer          */
-    int          map_private =  /* if TRUE mapping is private, ie, MAP_PRIVATE*/
-			       FALSE;
+int main(int argc,		/* number of input parameters.                        */
+	 char **argv)
+{				/* pointer to the command line arguments.       */
+	int c;			/* command line options                       */
+	int num_iter;		/* number of iteration to perform             */
+	int num_thrd;		/* number of threads to create                */
+	int thrd_ndx;		/* index into the array of threads.           */
+	float exec_time;	/* period for which the test is executed      */
+	int status;		/* exit status for light weight process       */
+	int sig_ndx;		/* index into signal handler structure.       */
+	pthread_t thid[1000];	/* pids of process that will map/write/unmap  */
+	long chld_args[3];	/* arguments to funcs execed by child process */
+	extern char *optarg;	/* arguments passed to each option            */
+	struct sigaction sigptr;	/* set up signal, for interval timer          */
+	int map_private =	/* if TRUE mapping is private, ie, MAP_PRIVATE */
+	    FALSE;
 
-    static struct signal_info
-    {
-        int  signum;    /* signal number that hasto be handled                */        char *signame;  /* name of the signal to be handled.                  */    } sig_info[] =
-                   {
-			   {SIGHUP,"SIGHUP"},
-			   {SIGINT,"SIGINT"},
-			   {SIGQUIT,"SIGQUIT"},
-			   {SIGABRT,"SIGABRT"},
-			   {SIGBUS,"SIGBUS"},
-			   {SIGSEGV,"SIGSEGV"},
-			   {SIGALRM, "SIGALRM"},
-			   {SIGUSR1,"SIGUSR1"},
-			   {SIGUSR2,"SIGUSR2"},
-			   {-1,     "ENDSIG"}
-                   };
+	static struct signal_info {
+		int signum;	/* signal number that hasto be handled                */
+		char *signame;	/* name of the signal to be handled.                  */
+	} sig_info[] = {
+		{
+		SIGHUP, "SIGHUP"}, {
+		SIGINT, "SIGINT"}, {
+		SIGQUIT, "SIGQUIT"}, {
+		SIGABRT, "SIGABRT"}, {
+		SIGBUS, "SIGBUS"}, {
+		SIGSEGV, "SIGSEGV"}, {
+		SIGALRM, "SIGALRM"}, {
+		SIGUSR1, "SIGUSR1"}, {
+		SIGUSR2, "SIGUSR2"}, {
+		-1, "ENDSIG"}
+	};
 
-    /* set up the default values */
-    num_iter = 1000;	/* repeate map - write - unmap operation 1000 times   */
-    num_thrd = 40;	/* number of LWP's to create			      */
-    exec_time = 24;	/* minimum time period for which to run the tests     */
+	/* set up the default values */
+	num_iter = 1000;	/* repeate map - write - unmap operation 1000 times   */
+	num_thrd = 40;		/* number of LWP's to create                          */
+	exec_time = 24;		/* minimum time period for which to run the tests     */
 
-    while ((c =  getopt(argc, argv, "h:l:n:px:")) != -1)
-    {
-        switch(c)
-	{
-	    case 'h':
-		usage(argv[0]);
-		break;
-	    case 'l':
-		if ((num_iter = atoi(optarg)) == 0)
-		    num_iter = 1000;
-		break;
-	    case 'n':
-		if ((num_thrd = atoi(optarg)) == 0)
-		    num_thrd = 20;
-		break;
-	    case 'p':
-                map_private = TRUE;
-		break;
-	    case 'x':
-		if ((exec_time = atof(optarg)) == 0)
-		    exec_time = 24;
-		break;
-	    default :
-		usage(argv[0]);
-		break;
-        }
-    }
+	while ((c = getopt(argc, argv, "h:l:n:px:")) != -1) {
+		switch (c) {
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 'l':
+			if ((num_iter = atoi(optarg)) == 0)
+				num_iter = 1000;
+			break;
+		case 'n':
+			if ((num_thrd = atoi(optarg)) == 0)
+				num_thrd = 20;
+			break;
+		case 'p':
+			map_private = TRUE;
+			break;
+		case 'x':
+			if ((exec_time = atof(optarg)) == 0)
+				exec_time = 24;
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
+	}
 
-    /* set up signals */
-    sigptr.sa_handler = (void (*)(int signal))sig_handler;
-    sigfillset(&sigptr.sa_mask);
-    sigptr.sa_flags = SA_SIGINFO;
-    for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++)
-    {
-        sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
-        if (sigaction(sig_info[sig_ndx].signum, &sigptr,
-                (struct sigaction *)NULL) == -1 )
-        {
-            perror( "man(): sigaction()" );
-            fprintf(stderr, "could not set handler for SIGALRM, errno = %d\n",
-                    errno);
-            exit(-1);
-        }
-    }
-    chld_args[0] = num_iter;
-    chld_args[1] = map_private;
-    alarm(exec_time * 3600.00);
+	/* set up signals */
+	sigptr.sa_handler = (void (*)(int signal))sig_handler;
+	sigfillset(&sigptr.sa_mask);
+	sigptr.sa_flags = SA_SIGINFO;
+	for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++) {
+		sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
+		if (sigaction(sig_info[sig_ndx].signum, &sigptr,
+			      (struct sigaction *)NULL) == -1) {
+			perror("man(): sigaction()");
+			fprintf(stderr,
+				"could not set handler for SIGALRM, errno = %d\n",
+				errno);
+			exit(-1);
+		}
+	}
+	chld_args[0] = num_iter;
+	chld_args[1] = map_private;
+	alarm(exec_time * 3600.00);
 
-    fprintf(stdout, "\n\n\nTest is set to run with the following parameters:\n"
-		    "\tDuration of test: [%f]hrs\n"
-		    "\tNumber of threads created: [%d]\n"
-		    "\tnumber of map-write-unmaps: [%d]\n"
- 		    "\tmap_private?(T=1 F=0): [%d]\n\n\n\n", exec_time,
-			num_thrd, num_iter, map_private);
+	fprintf(stdout,
+		"\n\n\nTest is set to run with the following parameters:\n"
+		"\tDuration of test: [%f]hrs\n"
+		"\tNumber of threads created: [%d]\n"
+		"\tnumber of map-write-unmaps: [%d]\n"
+		"\tmap_private?(T=1 F=0): [%d]\n\n\n\n", exec_time, num_thrd,
+		num_iter, map_private);
 
-    for (;;)
-    {
-        /* create num_thrd number of threads. */
-        for (thrd_ndx = 0; thrd_ndx<num_thrd; thrd_ndx++)
-        {
-            if (pthread_create(&thid[thrd_ndx], NULL, map_write_unmap,
-			chld_args))
-            {
-                perror("main(): pthread_create()");
-                exit(-1);
-            }
-            sched_yield();
-        }
+	for (;;) {
+		/* create num_thrd number of threads. */
+		for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+			if (pthread_create
+			    (&thid[thrd_ndx], NULL, map_write_unmap,
+			     chld_args)) {
+				perror("main(): pthread_create()");
+				exit(-1);
+			}
+			sched_yield();
+		}
 
-        /* wait for the children to terminate */
-        for (thrd_ndx = 0; thrd_ndx<num_thrd; thrd_ndx++)
-        {
-            if (pthread_join(thid[thrd_ndx], (void *)&status))
-            {
-                perror("main(): pthread_create()");
-                exit(-1);
-            }
-            else
-            {
-                if (status)
-                {
-                    fprintf(stderr,
-			    "thread [%d] - process exited with errors %d\n",
-			        WEXITSTATUS(status), status);
-	            exit(-1);
-                }
-            }
-        }
-    }
-    exit(0);
+		/* wait for the children to terminate */
+		for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+			if (pthread_join(thid[thrd_ndx], (void *)&status)) {
+				perror("main(): pthread_create()");
+				exit(-1);
+			} else {
+				if (status) {
+					fprintf(stderr,
+						"thread [%d] - process exited with errors %d\n",
+						WEXITSTATUS(status), status);
+					exit(-1);
+				}
+			}
+		}
+	}
+	exit(0);
 }
diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
index 5cd1947..ddaa49e 100644
--- a/testcases/kernel/mem/mtest06/shmat1.c
+++ b/testcases/kernel/mem/mtest06/shmat1.c
@@ -61,7 +61,7 @@
 
 /* Include Files							      */
 #include <stdio.h>		/* definitions for standard I/O               */
-#include <unistd.h>		/* required by usleep()		              */
+#include <unistd.h>		/* required by usleep()                       */
 #include <errno.h>		/* definitions for errno                      */
 #include <sched.h>		/* definitions for sched_yield()              */
 #include <stdlib.h>		/* definitions for WEXIT macros               */
@@ -71,8 +71,8 @@
 #include <pthread.h>		/* definitions for pthread_create etc         */
 #include <setjmp.h>		/* required by setjmp longjmp                 */
 #include <sys/ucontext.h>	/* required by the signal handler             */
-#include <sys/ipc.h>		/* required by shmat shmget etc		      */
-#include <sys/shm.h>            /* required by shmat shmget etc               */
+#include <sys/ipc.h>		/* required by shmat shmget etc               */
+#include <sys/shm.h>		/* required by shmat shmget etc               */
 #include <string.h>		/* required by strncmp                        */
 
 /* Defines								      */
@@ -89,10 +89,10 @@
 #define STR_READER "      "
 
 /* Global Variables						              */
-void        *map_address;	/* pointer to file in memory	      	      */
-sigjmp_buf  jmpbuf;      	/* argument to setjmp and longjmp             */
-int	    fsize;		/* size of the file to be created.	      */
-int	    done_shmat = 0;	/* disallow read and writes before shmat      */
+void *map_address;		/* pointer to file in memory                  */
+sigjmp_buf jmpbuf;		/* argument to setjmp and longjmp             */
+int fsize;			/* size of the file to be created.            */
+int done_shmat = 0;		/* disallow read and writes before shmat      */
 
 /******************************************************************************/
 /*									      */
@@ -108,98 +108,86 @@
 /*		exit 0 if SIGALRM is recieved			              */
 /*									      */
 /******************************************************************************/
-static void
-sig_handler(int signal,		/* signal number, set to handle SIGALRM       */
-            int code,
-            struct ucontext *ut)/* contains pointer to sigcontext structure   */
-{
+static void sig_handler(int signal,	/* signal number, set to handle SIGALRM       */
+			int code, struct ucontext *ut)
+{				/* contains pointer to sigcontext structure   */
 #ifdef __i386__
-    unsigned long     except;   /* exception type.			      */
-    int               ret = 0;  /* exit code from signal handler.             */
-    struct   sigcontext *scp = 	/* pointer to sigcontext structure	      */
-				(struct sigcontext *)&ut->uc_mcontext;
+	unsigned long except;	/* exception type.                            */
+	int ret = 0;		/* exit code from signal handler.             */
+	struct sigcontext *scp =	/* pointer to sigcontext structure            */
+	    (struct sigcontext *)&ut->uc_mcontext;
 #endif
 
-    if (signal == SIGALRM)
-    {
-        fprintf(stdout, "Test ended, success\n");
-        exit(0);
-    }
+	if (signal == SIGALRM) {
+		fprintf(stdout, "Test ended, success\n");
+		exit(0);
+	}
 #ifdef __i386__
-    else
-    {
-        except = scp->trapno;
-        fprintf(stderr, "signal caught - [%d] ", signal);
-    }
+	else {
+		except = scp->trapno;
+		fprintf(stderr, "signal caught - [%d] ", signal);
+	}
 
-    switch(except)
-    {
-        case 10:
-            fprintf(stderr,
-	        "Exception - invalid TSS, exception #[%ld]\n", except);
-	    break;
+	switch (except) {
+	case 10:
+		fprintf(stderr,
+			"Exception - invalid TSS, exception #[%ld]\n", except);
+		break;
 	case 11:
-	    fprintf(stderr,
-	        "Exception - segment not present, exception #[%ld]\n",
-		    except);
-	    break;
+		fprintf(stderr,
+			"Exception - segment not present, exception #[%ld]\n",
+			except);
+		break;
 	case 12:
-	    fprintf(stderr,
-		"Exception - stack segment not present, exception #[%ld]\n",
-		    except);
-	    break;
-        case 13:
-	    fprintf(stderr,
-		"Exception - general protection, exception #[%ld]\n",
-		    except);
-	    break;
+		fprintf(stderr,
+			"Exception - stack segment not present, exception #[%ld]\n",
+			except);
+		break;
+	case 13:
+		fprintf(stderr,
+			"Exception - general protection, exception #[%ld]\n",
+			except);
+		break;
 	case 14:
-	    fprintf(stderr,
-		"Exception - page fault, exception #[%ld]\n",
-		    except);
-            ret = 1;
-	    break;
-        default:
-	    fprintf(stderr,
-		"Exception type not handled... unknown exception #[%ld]\n",
-		    except);
-	    break;
-    }
+		fprintf(stderr,
+			"Exception - page fault, exception #[%ld]\n", except);
+		ret = 1;
+		break;
+	default:
+		fprintf(stderr,
+			"Exception type not handled... unknown exception #[%ld]\n",
+			except);
+		break;
+	}
 
-    if (ret)
-    {
-        if (scp->edi == (int)map_address)
-	{
-	    fprintf(stdout,
-			"page fault at [%#lx] - ignore\n", scp->edi);
-	    siglongjmp(jmpbuf, 1);
-        }
-        else if (scp->esi == (int)map_address)
-	{
-	    fprintf(stdout,
-			"page fault at [%#lx] - ignore\n", scp->esi);
-	    siglongjmp(jmpbuf, 1);
-        }
-	else
-        {
-            fprintf(stderr, "address at which sigfault occured: [%lx]\n"
-                           "address at which sigfault occured: [%lx]\n"
-                           "address at which memory was shmat: [%p]\n",
-		        (unsigned long)scp->edi,(unsigned long) scp->esi,
-			map_address);
-	    fprintf(stderr, "bad page fault exit test\n");
-	    exit (-1);
-        }
-    }
-    else
-        exit (-1);
+	if (ret) {
+		if (scp->edi == (int)map_address) {
+			fprintf(stdout,
+				"page fault at [%#lx] - ignore\n", scp->edi);
+			siglongjmp(jmpbuf, 1);
+		} else if (scp->esi == (int)map_address) {
+			fprintf(stdout,
+				"page fault at [%#lx] - ignore\n", scp->esi);
+			siglongjmp(jmpbuf, 1);
+		} else {
+			fprintf(stderr,
+				"address at which sigfault occured: [%lx]\n"
+				"address at which sigfault occured: [%lx]\n"
+				"address at which memory was shmat: [%p]\n",
+				(unsigned long)scp->edi,
+				(unsigned long)scp->esi, map_address);
+			fprintf(stderr, "bad page fault exit test\n");
+			exit(-1);
+		}
+	} else
+		exit(-1);
 #else
-    fprintf(stderr, "caught signal %d -- exiting.\n", signal);
-    exit (-1);
+	fprintf(stderr, "caught signal %d -- exiting.\n", signal);
+	exit(-1);
 #endif
 }
 
-/******************************************************************************//*								 	      */
+										/******************************************************************************//*                                                                            */
 /* Function:	usage							      */
 /*									      */
 /* Description:	Print the usage message.				      */
@@ -207,15 +195,15 @@
 /* Return:	exits with -1						      */
 /*									      */
 /******************************************************************************/
-static void
-usage(char *progname)           /* name of this program                       */{
-    fprintf(stderr,
-               "Usage: %s -h -l -x\n"
-               "\t -h help, usage message.\n"
-               "\t -l number of map - write - unmap.    default: 1000\n"
-               "\t -x time for which test is to be run. default: 24 Hrs\n",
-                    progname);
-    exit(-1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr,
+		"Usage: %s -h -l -x\n"
+		"\t -h help, usage message.\n"
+		"\t -l number of map - write - unmap.    default: 1000\n"
+		"\t -x time for which test is to be run. default: 24 Hrs\n",
+		progname);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -232,77 +220,68 @@
 /*               0 on errorless completion of the loop.                       */
 /*									      */
 /******************************************************************************/
-void *
-shmat_shmdt(void *args)		/* arguments to the thread X function.	      */
-{
-    int     shm_ndx  = 0;	/* index to number of shmat/shmdt             */
-    key_t   shmkey   = 0;	/* IPC_PRIVATE (key for shmget)               */
-    int     shmid;		/* shared memory id                           */
-    long    *locargs =          /* local pointer to arguments		      */
-		       (long *)args;
+void *shmat_shmdt(void *args)
+{				/* arguments to the thread X function.          */
+	int shm_ndx = 0;	/* index to number of shmat/shmdt             */
+	key_t shmkey = 0;	/* IPC_PRIVATE (key for shmget)               */
+	int shmid;		/* shared memory id                           */
+	long *locargs =		/* local pointer to arguments                 */
+	    (long *)args;
 
-    while (shm_ndx++ < (int)locargs[0])
-    {
-	/* put the reader and writer threads to sleep		              */
-        done_shmat = 0;
+	while (shm_ndx++ < (int)locargs[0]) {
+		/* put the reader and writer threads to sleep                         */
+		done_shmat = 0;
 
-	/* generate a random size, we will ask for this amount of shared mem  */
-        srand(time(NULL)%100);
-        fsize = (1 + (int)(1000.0*rand()/(RAND_MAX+1.0))) * 4096;
+		/* generate a random size, we will ask for this amount of shared mem  */
+		srand(time(NULL) % 100);
+		fsize = (1 + (int)(1000.0 * rand() / (RAND_MAX + 1.0))) * 4096;
 
-        if ((shmid = shmget(shmkey, fsize, IPC_CREAT | 0666)) == -1)
-        {
-            perror("shmat_shmdt(): shmget()");
-            pthread_exit((void *)-1);
-        }
-        else
-        {
-            fprintf(stdout,
-                     "%s[%#lx]: shmget(): success, got segment of size %d\n",
-		     STR_SHMAT, pthread_self(), fsize);
-        }
+		if ((shmid = shmget(shmkey, fsize, IPC_CREAT | 0666)) == -1) {
+			perror("shmat_shmdt(): shmget()");
+			pthread_exit((void *)-1);
+		} else {
+			fprintf(stdout,
+				"%s[%#lx]: shmget(): success, got segment of size %d\n",
+				STR_SHMAT, pthread_self(), fsize);
+		}
 
-        if ((map_address = shmat(shmid, (void *)0, 0))
-			 ==  (void *)-1)
-        {
-	    fprintf(stderr, "shmat_shmat(): map address = %p\n",
-		map_address);
-            perror("shmat_shmdt(): shmat()");
-            pthread_exit((void *)-1);
-        }
-        else
-        {
-			/* Wake up the reader and writer threads.			      */
+		if ((map_address = shmat(shmid, (void *)0, 0))
+		    == (void *)-1) {
+			fprintf(stderr, "shmat_shmat(): map address = %p\n",
+				map_address);
+			perror("shmat_shmdt(): shmat()");
+			pthread_exit((void *)-1);
+		} else {
+			/* Wake up the reader and writer threads.                             */
 			/* Write 'X' into map_address. We are not sure about
-			reader/writer interleaving. So the reader may expect
-			to find 'X' or 'Y'
-			*/
+			   reader/writer interleaving. So the reader may expect
+			   to find 'X' or 'Y'
+			 */
 			memset(map_address, 'X', 1);
 			done_shmat = 1;
 			usleep(0);
-        }
+		}
 
-        fprintf(stdout, "%s[%#lx]: Map address = %p\n",
-			 STR_SHMAT, pthread_self(), map_address);
-        fprintf(stdout, "%s[%#lx]: Num iter: [%d] Total Num Iter: [%d]\n",
-			 STR_SHMAT, pthread_self(), shm_ndx, (int)locargs[0]);
-	usleep(0);
-	sched_yield();
+		fprintf(stdout, "%s[%#lx]: Map address = %p\n",
+			STR_SHMAT, pthread_self(), map_address);
+		fprintf(stdout,
+			"%s[%#lx]: Num iter: [%d] Total Num Iter: [%d]\n",
+			STR_SHMAT, pthread_self(), shm_ndx, (int)locargs[0]);
+		usleep(0);
+		sched_yield();
 
-	/* put the threads to sleep before un-shmatting 		      */
-        done_shmat = 0;
-        if (shmdt((void *)map_address) == -1)
-        {
-	    perror("shmat_shmdt(): shmdt()");
-            pthread_exit((void *)-1);
-        }
-        if (shmctl(shmid, IPC_RMID, NULL))
-        {
-            perror("shmat_shmdt(): shmctl()");
-	    pthread_exit((void *)-1);
-        }
-    }
-    pthread_exit((void *)0);
+		/* put the threads to sleep before un-shmatting                       */
+		done_shmat = 0;
+		if (shmdt((void *)map_address) == -1) {
+			perror("shmat_shmdt(): shmdt()");
+			pthread_exit((void *)-1);
+		}
+		if (shmctl(shmid, IPC_RMID, NULL)) {
+			perror("shmat_shmdt(): shmctl()");
+			pthread_exit((void *)-1);
+		}
+	}
+	pthread_exit((void *)0);
 }
 
 /******************************************************************************/
@@ -318,33 +297,31 @@
 /*               0 on errorless completion of the loop.                       */
 /*									      */
 /******************************************************************************/
-void *
-write_to_mem(void *args)
+void *write_to_mem(void *args)
 {
-    static   int write_ndx = 0;	/* index to the number of writes to perform   */
-    long         *locargs  =    /* local pointer to the arguments             */
-                             (long *)args;
+	static int write_ndx = 0;	/* index to the number of writes to perform   */
+	long *locargs =		/* local pointer to the arguments             */
+	    (long *)args;
 
-    while (write_ndx++ < (int)locargs[0])
-    {
-	/* wait for the thread to shmat, and dont sleep on the processor. */
-        while (!done_shmat)
-        usleep(0);
+	while (write_ndx++ < (int)locargs[0]) {
+		/* wait for the thread to shmat, and dont sleep on the processor. */
+		while (!done_shmat)
+			usleep(0);
 
-        if (sigsetjmp(jmpbuf,1) == 1)
-        {
-            fprintf(stdout,
-                "page fault ocurred due a write after an shmdt from [%p]\n",
-                        map_address);
-        }
+		if (sigsetjmp(jmpbuf, 1) == 1) {
+			fprintf(stdout,
+				"page fault ocurred due a write after an shmdt from [%p]\n",
+				map_address);
+		}
 
-	fprintf(stdout, "%s[%#lx]: write_to_mem(): memory address: [%p]\n",
-		STR_WRITER, pthread_self(), map_address);
-        memset(map_address, 'Y', 1);
-        usleep(1);
-	sched_yield();
-    }
-    pthread_exit((void *)0);
+		fprintf(stdout,
+			"%s[%#lx]: write_to_mem(): memory address: [%p]\n",
+			STR_WRITER, pthread_self(), map_address);
+		memset(map_address, 'Y', 1);
+		usleep(1);
+		sched_yield();
+	}
+	pthread_exit((void *)0);
 }
 
 /******************************************************************************/
@@ -360,43 +337,38 @@
 /*               0 on errorless completion of the loop.                       */
 /*									      */
 /******************************************************************************/
-void *
-read_from_mem(void *args)
+void *read_from_mem(void *args)
 {
-    static   int read_ndx = 0;	/* index to the number of writes to perform   */
-    long         *locargs  =    /* local pointer to the arguments             */
-                             (long *)args;
+	static int read_ndx = 0;	/* index to the number of writes to perform   */
+	long *locargs =		/* local pointer to the arguments             */
+	    (long *)args;
 
-    while (read_ndx++ < (int)locargs[0])
-    {
-	    /* wait for the shmat to happen */
-	while (!done_shmat)
-        usleep(0);
+	while (read_ndx++ < (int)locargs[0]) {
+		/* wait for the shmat to happen */
+		while (!done_shmat)
+			usleep(0);
 
-	fprintf(stdout,
-		"%s[%#lx]: read_from_mem():  memory address: [%p]\n",
-		STR_READER, pthread_self(), map_address);
-	if (sigsetjmp(jmpbuf,1) == 1)
-        {
-            fprintf(stdout,
-                "page fault ocurred due a read after an shmdt from %p\n",
-			map_address);
-        }
+		fprintf(stdout,
+			"%s[%#lx]: read_from_mem():  memory address: [%p]\n",
+			STR_READER, pthread_self(), map_address);
+		if (sigsetjmp(jmpbuf, 1) == 1) {
+			fprintf(stdout,
+				"page fault ocurred due a read after an shmdt from %p\n",
+				map_address);
+		}
 
-        fprintf(stdout, "%s[%#lx]: read_mem(): content of memory: %s\n",
-        STR_READER, pthread_self(), (char *)map_address);
+		fprintf(stdout, "%s[%#lx]: read_mem(): content of memory: %s\n",
+			STR_READER, pthread_self(), (char *)map_address);
 
-        if (strncmp(map_address, "Y", 1) != 0)
-        {
-            if (strncmp(map_address, "X", 1) != 0)
-            {
-                pthread_exit((void *)-1);
-            }
-        }
-        usleep(1);
-	sched_yield();
-    }
-    pthread_exit((void *)0);
+		if (strncmp(map_address, "Y", 1) != 0) {
+			if (strncmp(map_address, "X", 1) != 0) {
+				pthread_exit((void *)-1);
+			}
+		}
+		usleep(1);
+		sched_yield();
+	}
+	pthread_exit((void *)0);
 }
 
 /******************************************************************************/
@@ -413,148 +385,130 @@
 /*		exits with a 0 on success.				      */
 /*                                                                            */
 /******************************************************************************/
-int
-main(int  argc,		/* number of input parameters.			      */
-     char **argv)	/* pointer to the command line arguments.	      */
-{
-    int 	 c;		/* command line options			      */
-    int		 num_iter;	/* number of iteration to perform             */
-    int		 thrd_ndx;	/* index into the array of threads.	      */
-    double	 exec_time;	/* period for which the test is executed      */
-    int          status[1];     /* exit status for light weight process       */
-    int          sig_ndx;      	/* index into signal handler structure.       */
-    pthread_t    thid[1000];	/* pids of process that will map/write/unmap  */
-    long         chld_args[3];	/* arguments to funcs execed by child process */
-    extern  char *optarg;	/* arguments passed to each option	      */
-    struct sigaction sigptr;	/* set up signal, for interval timer          */
+int main(int argc,		/* number of input parameters.                        */
+	 char **argv)
+{				/* pointer to the command line arguments.       */
+	int c;			/* command line options                       */
+	int num_iter;		/* number of iteration to perform             */
+	int thrd_ndx;		/* index into the array of threads.           */
+	double exec_time;	/* period for which the test is executed      */
+	int status[1];		/* exit status for light weight process       */
+	int sig_ndx;		/* index into signal handler structure.       */
+	pthread_t thid[1000];	/* pids of process that will map/write/unmap  */
+	long chld_args[3];	/* arguments to funcs execed by child process */
+	extern char *optarg;	/* arguments passed to each option            */
+	struct sigaction sigptr;	/* set up signal, for interval timer          */
 
-    static struct signal_info
-    {
-       int  signum;    /* signal number that hasto be handled                */
-       char *signame;  /* name of the signal to be handled.                  */
-       } sig_info[] =
-                   {
-			   {SIGHUP,"SIGHUP"},
-			   {SIGINT,"SIGINT"},
-			   {SIGQUIT,"SIGQUIT"},
-			   {SIGABRT,"SIGABRT"},
-			   {SIGBUS,"SIGBUS"},
-			   {SIGSEGV,"SIGSEGV"},
-			   {SIGALRM, "SIGALRM"},
-			   {SIGUSR1,"SIGUSR1"},
-			   {SIGUSR2,"SIGUSR2"},
-			   {-1,     "ENDSIG"}
-                   };
+	static struct signal_info {
+		int signum;	/* signal number that hasto be handled                */
+		char *signame;	/* name of the signal to be handled.                  */
+	} sig_info[] = {
+		{
+		SIGHUP, "SIGHUP"}, {
+		SIGINT, "SIGINT"}, {
+		SIGQUIT, "SIGQUIT"}, {
+		SIGABRT, "SIGABRT"}, {
+		SIGBUS, "SIGBUS"}, {
+		SIGSEGV, "SIGSEGV"}, {
+		SIGALRM, "SIGALRM"}, {
+		SIGUSR1, "SIGUSR1"}, {
+		SIGUSR2, "SIGUSR2"}, {
+		-1, "ENDSIG"}
+	};
 
-    /* set up the default values */
-    num_iter = 1000;	/* repeate map - write - unmap operation 1000 times   */
-    exec_time = 24.0;	/* minimum time period for which to run the tests     */
+	/* set up the default values */
+	num_iter = 1000;	/* repeate map - write - unmap operation 1000 times   */
+	exec_time = 24.0;	/* minimum time period for which to run the tests     */
 
-    while ((c =  getopt(argc, argv, "h:l:x:")) != -1)
-    {
-        switch(c)
-	{
-	    case 'h':
-		usage(argv[0]);
-		break;
-	    case 'l':	/* number of times to loop in the thread function     */
-		if ((num_iter = atoi(optarg)) == 0)
-		    num_iter = 1000;
-		break;
-	    case 'x':   /* time in hrs to run this test.                      */
-		if ((exec_time = atof(optarg)) == 0)
-		    exec_time = 24;
-		break;
-	    default :
-		usage(argv[0]);
-		break;
-        }
-    }
+	while ((c = getopt(argc, argv, "h:l:x:")) != -1) {
+		switch (c) {
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 'l':	/* number of times to loop in the thread function     */
+			if ((num_iter = atoi(optarg)) == 0)
+				num_iter = 1000;
+			break;
+		case 'x':	/* time in hrs to run this test.                      */
+			if ((exec_time = atof(optarg)) == 0)
+				exec_time = 24;
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
+	}
 
-    fprintf(stdout, "\n\n\nTest is set to run with the following parameters:\n"
-		    "\tDuration of test: [%f]hrs\n"
-		    "\tnumber of shmat  shm detach: [%d]\n", exec_time,
-			 num_iter);
+	fprintf(stdout,
+		"\n\n\nTest is set to run with the following parameters:\n"
+		"\tDuration of test: [%f]hrs\n"
+		"\tnumber of shmat  shm detach: [%d]\n", exec_time, num_iter);
 
-    /* set up signals */
-    sigptr.sa_handler = (void (*)(int signal))sig_handler;
-    sigfillset(&sigptr.sa_mask);
-    sigptr.sa_flags = SA_SIGINFO;
-    for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++)
-    {
-        sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
-        if (sigaction(sig_info[sig_ndx].signum, &sigptr,
-                (struct sigaction *)NULL) == -1 )
-        {
-            perror( "man(): sigaction()" );
-            fprintf(stderr, "could not set handler for SIGALRM, errno = %d\n",
-                    errno);
-            exit(-1);
-        }
-    }
+	/* set up signals */
+	sigptr.sa_handler = (void (*)(int signal))sig_handler;
+	sigfillset(&sigptr.sa_mask);
+	sigptr.sa_flags = SA_SIGINFO;
+	for (sig_ndx = 0; sig_info[sig_ndx].signum != -1; sig_ndx++) {
+		sigaddset(&sigptr.sa_mask, sig_info[sig_ndx].signum);
+		if (sigaction(sig_info[sig_ndx].signum, &sigptr,
+			      (struct sigaction *)NULL) == -1) {
+			perror("man(): sigaction()");
+			fprintf(stderr,
+				"could not set handler for SIGALRM, errno = %d\n",
+				errno);
+			exit(-1);
+		}
+	}
 
-    chld_args[0] = num_iter;
-    alarm(exec_time * 3600.00);
+	chld_args[0] = num_iter;
+	alarm(exec_time * 3600.00);
 
-    for (;;)
-    {
-        /* create 3 threads */
-        if (pthread_create(&thid[0], NULL, shmat_shmdt, chld_args))
-        {
-            perror("main(): pthread_create()");
-            exit(-1);
-        }
-	else
-	{
-	    fprintf(stdout,
-		"created thread id[%#lx], execs fn shmat_shmdt()\n",
-		thid[0]);
-        }
-        sched_yield();
+	for (;;) {
+		/* create 3 threads */
+		if (pthread_create(&thid[0], NULL, shmat_shmdt, chld_args)) {
+			perror("main(): pthread_create()");
+			exit(-1);
+		} else {
+			fprintf(stdout,
+				"created thread id[%#lx], execs fn shmat_shmdt()\n",
+				thid[0]);
+		}
+		sched_yield();
 
-        if (pthread_create(&thid[1], NULL, write_to_mem, chld_args))
-        {
-            perror("main(): pthread_create()");
-            exit(-1);
-        }
-	else
-	{
-	    fprintf(stdout,
-		"created thread id[%#lx], execs fn write_to_mem()\n",
-		thid[1]);
-        }
-        sched_yield();
+		if (pthread_create(&thid[1], NULL, write_to_mem, chld_args)) {
+			perror("main(): pthread_create()");
+			exit(-1);
+		} else {
+			fprintf(stdout,
+				"created thread id[%#lx], execs fn write_to_mem()\n",
+				thid[1]);
+		}
+		sched_yield();
 
-        if (pthread_create(&thid[2], NULL, read_from_mem, chld_args))
-        {
-            perror("main(): pthread_create()");
-            exit(-1);
-        }
-	else
-	{
-	    fprintf(stdout,
-		"created thread id[%#lx], execs fn read_from_mem()\n",
-		thid[2]);
-        }
-        sched_yield();
+		if (pthread_create(&thid[2], NULL, read_from_mem, chld_args)) {
+			perror("main(): pthread_create()");
+			exit(-1);
+		} else {
+			fprintf(stdout,
+				"created thread id[%#lx], execs fn read_from_mem()\n",
+				thid[2]);
+		}
+		sched_yield();
 
-        /* wait for the children to terminate */
-        for (thrd_ndx = 0; thrd_ndx < 3; thrd_ndx++)
-        {
-            if (pthread_join(thid[thrd_ndx], (void *)status))
-            {
-                perror("main(): pthread_create()");
-		exit (-1);
-            }
-            if (*status == -1)
-            {
-                fprintf(stderr,
-	              "thread [%#lx] - process exited with errors %d\n",
-		         thid[thrd_ndx], *status);
-	        exit (-1);
-            }
-        }
-    }
+		/* wait for the children to terminate */
+		for (thrd_ndx = 0; thrd_ndx < 3; thrd_ndx++) {
+			if (pthread_join(thid[thrd_ndx], (void *)status)) {
+				perror("main(): pthread_create()");
+				exit(-1);
+			}
+			if (*status == -1) {
+				fprintf(stderr,
+					"thread [%#lx] - process exited with errors %d\n",
+					thid[thrd_ndx], *status);
+				exit(-1);
+			}
+		}
+	}
 	fprintf(stdout, "TEST PASSED\n");
-  return 0;
+	return 0;
 }
diff --git a/testcases/kernel/mem/mtest07/mallocstress.c b/testcases/kernel/mem/mtest07/mallocstress.c
index 959cd9b..82d3402 100644
--- a/testcases/kernel/mem/mtest07/mallocstress.c
+++ b/testcases/kernel/mem/mtest07/mallocstress.c
@@ -73,8 +73,8 @@
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
-#define MAXL    100     /* default number of loops to do malloc and free      */
-#define MAXT     60     /* default number of threads to create.               */
+#define MAXL    100		/* default number of loops to do malloc and free      */
+#define MAXT     60		/* default number of threads to create.               */
 
 #ifdef DEBUG
 #define dprt(args)	printf args
@@ -88,7 +88,7 @@
                                usage(prog); \
                                    } while (0)
 
-int num_loop = MAXL;/* number of loops to perform		      */
+int num_loop = MAXL;		/* number of loops to perform                     */
 int semid;
 
 /* Define SPEW_SIGNALS to tickle thread_create bug (it fails if interrupted). */
@@ -102,21 +102,20 @@
 /*              Generate a signal, too.                                       */
 /*									      */
 /******************************************************************************/
-static void
-my_yield()
+static void my_yield()
 {
 #ifdef SPEW_SIGNALS
-    /* usleep just happens to use signals in glibc at moment.
-     * This is good because it allows us to test whether pthread_create
-     * improperly returns EINTR (which would violate SUSv3)
-     */
-    usleep(0);
+	/* usleep just happens to use signals in glibc at moment.
+	 * This is good because it allows us to test whether pthread_create
+	 * improperly returns EINTR (which would violate SUSv3)
+	 */
+	usleep(0);
 #else
-    /* If you want this test to pass, don't define SPEW_SIGNALS,
-     * as pthread_create is broken at moment, and fails if interrupted
-     */
-    static const struct timespec t0 = {0, 0};
-    nanosleep(&t0, NULL);
+	/* If you want this test to pass, don't define SPEW_SIGNALS,
+	 * as pthread_create is broken at moment, and fails if interrupted
+	 */
+	static const struct timespec t0 = { 0, 0 };
+	nanosleep(&t0, NULL);
 #endif
 }
 
@@ -131,16 +130,14 @@
 /* Return:	exits with -1						      */
 /*									      */
 /******************************************************************************/
-static void
-usage(char *progname)           /* name of this program                       */
-{
-    fprintf(stderr,
-               "Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
-               "\t -h Help!\n"
-               "\t -l Number of loops:               Default: 1000\n"
-               "\t -t Number of threads to generate: Default: 30\n",
-                    progname);
-    exit(-1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr,
+		"Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
+		"\t -h Help!\n"
+		"\t -l Number of loops:               Default: 1000\n"
+		"\t -t Number of threads to generate: Default: 30\n", progname);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -157,87 +154,87 @@
 /* Return:	1 on failure						      */
 /*		0 on success						      */
 /******************************************************************************/
-int
-allocate_free(int    repeat,	/* number of times to repeat allocate/free    */
-              int    scheme)	/* how fast to increase block size            */
-{
-    int  loop;
-    const int MAXPTRS = 50;	    /* only 42 or so get used on 32 bit machine */
+int allocate_free(int repeat,	/* number of times to repeat allocate/free    */
+		  int scheme)
+{				/* how fast to increase block size            */
+	int loop;
+	const int MAXPTRS = 50;	/* only 42 or so get used on 32 bit machine */
 
-    dprt(("pid[%d]: allocate_free: repeat %d, scheme %d\n", getpid(), repeat, scheme));
+	dprt(("pid[%d]: allocate_free: repeat %d, scheme %d\n", getpid(),
+	      repeat, scheme));
 
-    for (loop = 0; loop < repeat; loop++)
-    {
-        size_t  oldsize    = 5;	    /* remember size for fibannoci series     */
-        size_t  size       = sizeof(long);     /* size of next block in ptrs[]           */
-        long    *ptrs[MAXPTRS];     /* the pointers allocated in this loop    */
-        int     num_alloc;	    /* number of elements in ptrs[] so far    */
-        int     i;
+	for (loop = 0; loop < repeat; loop++) {
+		size_t oldsize = 5;	/* remember size for fibannoci series     */
+		size_t size = sizeof(long);	/* size of next block in ptrs[]           */
+		long *ptrs[MAXPTRS];	/* the pointers allocated in this loop    */
+		int num_alloc;	/* number of elements in ptrs[] so far    */
+		int i;
 
-        dprt(("pid[%d]: allocate_free: loop %d of %d\n", getpid(), loop, repeat));
+		dprt(("pid[%d]: allocate_free: loop %d of %d\n", getpid(), loop,
+		      repeat));
 
-	/* loop terminates in one of three ways:
-	 * 1. after MAXPTRS iterations
-	 * 2. if malloc fails
-	 * 3. if new size overflows
-	 */
-        for (num_alloc=0; num_alloc < MAXPTRS; num_alloc++)
-        {
-            size_t  newsize = 0;
+		/* loop terminates in one of three ways:
+		 * 1. after MAXPTRS iterations
+		 * 2. if malloc fails
+		 * 3. if new size overflows
+		 */
+		for (num_alloc = 0; num_alloc < MAXPTRS; num_alloc++) {
+			size_t newsize = 0;
 
-            dprt(("pid[%d]: loop %d/%d; num_alloc=%d; size=%u\n",
-		getpid(), loop, repeat, num_alloc, size));
+			dprt(("pid[%d]: loop %d/%d; num_alloc=%d; size=%u\n",
+			      getpid(), loop, repeat, num_alloc, size));
 
-	    /* Malloc the next block */
-            ptrs[num_alloc] = (long *)malloc(size);
-            if (ptrs[num_alloc] == NULL)
-            {
-		/* terminate loop if malloc couldn't give us the memory we asked for */
-                break;
-            }
-            ptrs[num_alloc][0] = num_alloc;
+			/* Malloc the next block */
+			ptrs[num_alloc] = (long *)malloc(size);
+			if (ptrs[num_alloc] == NULL) {
+				/* terminate loop if malloc couldn't give us the memory we asked for */
+				break;
+			}
+			ptrs[num_alloc][0] = num_alloc;
 
-	    /* Increase size according to one of four schedules. */
-	    switch (scheme) {
-	    case 0:
-                newsize = size + oldsize;
-		oldsize = size;
-		break;
-	    case 1:
-		newsize = size * 2;
-		break;
-	    case 2:
-		newsize = size * 3;
-		break;
-	    case 3:
-		newsize = size * 5;
-		break;
-	    default:
-		assert(0);
-            }
-	    /* terminate loop on overflow */
-	    if (newsize < size)
-		break;
-	    size = newsize;
+			/* Increase size according to one of four schedules. */
+			switch (scheme) {
+			case 0:
+				newsize = size + oldsize;
+				oldsize = size;
+				break;
+			case 1:
+				newsize = size * 2;
+				break;
+			case 2:
+				newsize = size * 3;
+				break;
+			case 3:
+				newsize = size * 5;
+				break;
+			default:
+				assert(0);
+			}
+			/* terminate loop on overflow */
+			if (newsize < size)
+				break;
+			size = newsize;
 
-            my_yield();
-        }
+			my_yield();
+		}
 
-        for (i = 0; i < num_alloc; i++)
-        {
-            dprt(("pid[%d]: freeing ptrs[i] %p\n", getpid(), ptrs[i]));
-	    if (ptrs[i][0] != i) {
-		fprintf(stderr, "pid[%d]: fail: bad sentinel value\n", getpid());
-		return 1;
-	    }
-	    free(ptrs[i]);
-            my_yield();
-        }
+		for (i = 0; i < num_alloc; i++) {
+			dprt(("pid[%d]: freeing ptrs[i] %p\n", getpid(),
+			      ptrs[i]));
+			if (ptrs[i][0] != i) {
+				fprintf(stderr,
+					"pid[%d]: fail: bad sentinel value\n",
+					getpid());
+				return 1;
+			}
+			free(ptrs[i]);
+			my_yield();
+		}
 
-        my_yield();
-    }
-    /* Success! */
-  return 0;
+		my_yield();
+	}
+	/* Success! */
+	return 0;
 }
 
 /******************************************************************************/
@@ -253,26 +250,26 @@
 /*		pthread_exit  0 on success			              */
 /*								              */
 /******************************************************************************/
-void *
-alloc_mem(void * threadnum)
+void *alloc_mem(void *threadnum)
 {
-    struct sembuf sop[1];
-    sop[0].sem_num = 0;
-    sop[0].sem_op = 0;
-    sop[0].sem_flg = 0;
-    /* waiting for other threads starting */
-    if (semop(semid, sop, 1) == -1) {
-        if (errno != EIDRM)
-            perror("semop");
-        return (void *) -1;
-    }
+	struct sembuf sop[1];
+	sop[0].sem_num = 0;
+	sop[0].sem_op = 0;
+	sop[0].sem_flg = 0;
+	/* waiting for other threads starting */
+	if (semop(semid, sop, 1) == -1) {
+		if (errno != EIDRM)
+			perror("semop");
+		return (void *)-1;
+	}
 
-    /* thread N will use growth scheme N mod 4 */
-    int err = allocate_free(num_loop, ((uintptr_t)threadnum) % 4);
-    fprintf(stdout,
-    "Thread [%d]: allocate_free() returned %d, %s.  Thread exiting.\n",
-    (int)(uintptr_t)threadnum, err, (err ? "failed" : "succeeded"));
-    return (void *)(uintptr_t)(err ? -1 : 0);
+	/* thread N will use growth scheme N mod 4 */
+	int err = allocate_free(num_loop, ((uintptr_t) threadnum) % 4);
+	fprintf(stdout,
+		"Thread [%d]: allocate_free() returned %d, %s.  Thread exiting.\n",
+		(int)(uintptr_t) threadnum, err,
+		(err ? "failed" : "succeeded"));
+	return (void *)(uintptr_t) (err ? -1 : 0);
 }
 
 /******************************************************************************/
@@ -291,132 +288,120 @@
 /*		 0 on success						      */
 /*									      */
 /******************************************************************************/
-int
-main(int	argc,		/* number of input parameters		      */
-     char	**argv)		/* pointer to the command line arguments.     */
-{
-    int		c;		/* command line options			      */
-    int		num_thrd = MAXT;/* number of threads to create                */
-    int		thrd_ndx;	/* index into the array of thread ids         */
-    pthread_t	*thrdid;	/* the threads                                */
-    extern int	 optopt;	/* options to the program		      */
-    struct sembuf sop[1];
-    int ret = 0;
+int main(int argc,		/* number of input parameters                 */
+	 char **argv)
+{				/* pointer to the command line arguments.     */
+	int c;			/* command line options                       */
+	int num_thrd = MAXT;	/* number of threads to create                */
+	int thrd_ndx;		/* index into the array of thread ids         */
+	pthread_t *thrdid;	/* the threads                                */
+	extern int optopt;	/* options to the program                     */
+	struct sembuf sop[1];
+	int ret = 0;
 
-    while ((c =  getopt(argc, argv, "hl:t:")) != -1)
-    {
-        switch(c)
-        {
-            case 'h':
-                usage(argv[0]);
-                break;
-            case 'l':
-		if ((num_loop = atoi(optarg)) == 0)
-	            OPT_MISSING(argv[0], optopt);
-                else
-                if (num_loop < 1)
-                {
-                    fprintf(stdout,
-                        "WARNING: bad argument. Using default\n");
-                    num_loop = MAXL;
-                }
-                break;
-            case 't':
-		if ((num_thrd = atoi(optarg)) == 0)
-	            OPT_MISSING(argv[0], optopt);
-                else
-                if (num_thrd < 1)
-                {
-                    fprintf(stdout,
-                        "WARNING: bad argument. Using default\n");
-                    num_thrd = MAXT;
-                }
-                break;
-            default :
-		usage(argv[0]);
-		break;
+	while ((c = getopt(argc, argv, "hl:t:")) != -1) {
+		switch (c) {
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 'l':
+			if ((num_loop = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_loop < 1) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_loop = MAXL;
+			}
+			break;
+		case 't':
+			if ((num_thrd = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_thrd < 1) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_thrd = MAXT;
+			}
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
 	}
-    }
 
-    dprt(("number of times to loop in the thread = %d\n", num_loop));
+	dprt(("number of times to loop in the thread = %d\n", num_loop));
 
-    thrdid = malloc(sizeof(pthread_t) * num_thrd);
-    if (thrdid == NULL)
-    {
-	perror("main(): allocating space for thrdid[] malloc()");
-	return 1;
-    }
+	thrdid = malloc(sizeof(pthread_t) * num_thrd);
+	if (thrdid == NULL) {
+		perror("main(): allocating space for thrdid[] malloc()");
+		return 1;
+	}
 
-    semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0666);
-    if  (semid < 0) {
-        perror("Semaphore creation failed  Reason:");
-    }
+	semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0666);
+	if (semid < 0) {
+		perror("Semaphore creation failed  Reason:");
+	}
 
-    sop[0].sem_num = 0;
-    sop[0].sem_op = 1;
-    sop[0].sem_flg = 0;
-    if (semop(semid, sop, 1) == -1) {
-        perror("semop");
-        ret = -1;
-        goto out;
-    }
-
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        if (pthread_create(&thrdid[thrd_ndx], NULL, alloc_mem,
-		(void *)(uintptr_t)thrd_ndx))
-        {
-	    int err = errno;
-	    if (err == EINTR) {
-		fprintf(stderr, "main(): pthread_create failed with EINTR!\n");
+	sop[0].sem_num = 0;
+	sop[0].sem_op = 1;
+	sop[0].sem_flg = 0;
+	if (semop(semid, sop, 1) == -1) {
+		perror("semop");
 		ret = -1;
 		goto out;
-	    }
-            perror("main(): pthread_create()");
-            ret = -11;
-            goto out;
-        }
-    }
-    my_yield();
+	}
 
-    sop[0].sem_op = -1;
-    if (semop(semid, sop, 1) == -1) {
-        perror("semop");
-        ret = -1;
-        goto out;
-    }
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		if (pthread_create(&thrdid[thrd_ndx], NULL, alloc_mem,
+				   (void *)(uintptr_t) thrd_ndx)) {
+			int err = errno;
+			if (err == EINTR) {
+				fprintf(stderr,
+					"main(): pthread_create failed with EINTR!\n");
+				ret = -1;
+				goto out;
+			}
+			perror("main(): pthread_create()");
+			ret = -11;
+			goto out;
+		}
+	}
+	my_yield();
 
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        void *th_status;	/* exit status of LWP */
-        if (pthread_join(thrdid[thrd_ndx], &th_status) != 0)
-        {
-            perror("main(): pthread_join()");
-            ret = -1;
-            goto out;
-        }
-        else
-        {
-            if ((intptr_t)th_status != 0)
-            {
-                fprintf(stderr,
-                        "main(): thread [%d] - exited with errors\n", thrd_ndx);
-                ret = -1;
-                goto out;
-            }
-            dprt(("main(): thread [%d]: exited without errors\n", thrd_ndx));
-        }
-        my_yield();
-    }
-    printf("main(): test passed.\n");
+	sop[0].sem_op = -1;
+	if (semop(semid, sop, 1) == -1) {
+		perror("semop");
+		ret = -1;
+		goto out;
+	}
+
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		void *th_status;	/* exit status of LWP */
+		if (pthread_join(thrdid[thrd_ndx], &th_status) != 0) {
+			perror("main(): pthread_join()");
+			ret = -1;
+			goto out;
+		} else {
+			if ((intptr_t) th_status != 0) {
+				fprintf(stderr,
+					"main(): thread [%d] - exited with errors\n",
+					thrd_ndx);
+				ret = -1;
+				goto out;
+			}
+			dprt(("main(): thread [%d]: exited without errors\n",
+			      thrd_ndx));
+		}
+		my_yield();
+	}
+	printf("main(): test passed.\n");
 out:
-    if (semctl(semid, 0, IPC_RMID) == -1) {
-        perror("semctl\n");
-        ret = -1;
-    }
-    if (thrdid) {
-        free(thrdid);
-        thrdid = NULL;
-    }
-    exit(ret);
+	if (semctl(semid, 0, IPC_RMID) == -1) {
+		perror("semctl\n");
+		ret = -1;
+	}
+	if (thrdid) {
+		free(thrdid);
+		thrdid = NULL;
+	}
+	exit(ret);
 }
diff --git a/testcases/kernel/mem/mtest07/shm_test.c b/testcases/kernel/mem/mtest07/shm_test.c
index a176332..2f2c9f1 100644
--- a/testcases/kernel/mem/mtest07/shm_test.c
+++ b/testcases/kernel/mem/mtest07/shm_test.c
@@ -44,20 +44,21 @@
 /*		pair will read from this memory.		              */
 /*									      */
 /******************************************************************************/
-#include <pthread.h>	/* required by pthread functions		      */
-#include <stdio.h>	/* required by fprintf()			      */
-#include <stdlib.h>	/* required by exit(), atoi()			      */
-#include <string.h>     /* required by strncpy()                              */
-#include <unistd.h>	/* required by getopt(), mmap()			      */
-#include <sys/types.h>  /* required by open(), shmat(), shmdt()		      */
-#include <sys/stat.h>   /* required by open()				      */
-#include <sys/ipc.h>    /* required by shmat() shmdt(), shmctl()              */
-#include <sys/shm.h>    /* required by shmat() shmdt(), shmctl()              */
-#include <sys/mman.h>   /* required by mmap()                                 */
-#include <fcntl.h>	/* required by open()				      */
-#include <stdint.h>	/* required by uintptr_t			      */
+#include <pthread.h>		/* required by pthread functions                      */
+#include <stdio.h>		/* required by fprintf()                              */
+#include <stdlib.h>		/* required by exit(), atoi()                         */
+#include <string.h>		/* required by strncpy()                              */
+#include <unistd.h>		/* required by getopt(), mmap()                       */
+#include <sys/types.h>		/* required by open(), shmat(), shmdt()               */
+#include <sys/stat.h>		/* required by open()                                 */
+#include <sys/ipc.h>		/* required by shmat() shmdt(), shmctl()              */
+#include <sys/shm.h>		/* required by shmat() shmdt(), shmctl()              */
+#include <sys/mman.h>		/* required by mmap()                                 */
+#include <fcntl.h>		/* required by open()                                 */
+#include <stdint.h>		/* required by uintptr_t                              */
 
-void noprintf(char* string, ...) {
+void noprintf(char *string, ...)
+{
 }
 
 #ifdef DEBUG
@@ -78,10 +79,10 @@
                                usage(prog); \
                                    } while (0)
 
-#define MAXT	30	/* default number of threads to create.	              */
-#define MAXR	1000	/* default number of repatetions to execute           */
-#define WRITER  0	/* cause thread function to shmat and write           */
-#define READER  1	/* cause thread function to shmat and read            */
+#define MAXT	30		/* default number of threads to create.               */
+#define MAXR	1000		/* default number of repatetions to execute           */
+#define WRITER  0		/* cause thread function to shmat and write           */
+#define READER  1		/* cause thread function to shmat and read            */
 
 /******************************************************************************/
 /*								 	      */
@@ -92,15 +93,15 @@
 /* Return:	exits with -1						      */
 /*									      */
 /******************************************************************************/
-static void
-usage(char *progname)           /* name of this program                       */{
-    fprintf(stderr,
-               "Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
-               "\t -h Help!\n"
-               "\t -l Number of repatetions to execute:       Default: 1000\n"
-               "\t -t Number of threads to generate:          Default: 30\n",
-                    progname);
-    exit(-1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr,
+		"Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
+		"\t -h Help!\n"
+		"\t -l Number of repatetions to execute:       Default: 1000\n"
+		"\t -t Number of threads to generate:          Default: 30\n",
+		progname);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -122,34 +123,28 @@
 /* Return:	exits with -1 on error, 0 on success                          */
 /*									      */
 /******************************************************************************/
-static int
-rm_shared_mem(key_t  shm_id,	/* id of shared memory segment to be removed  */
-	      char *shm_addr,   /* address of shared mem seg to be removed    */
-	      int  cmd)         /* remove id only or remove id and detach seg */
-{
-    struct shmid *shmbuf=NULL;	/* info about the segment pointed by shmkey   */
+static int rm_shared_mem(key_t shm_id,	/* id of shared memory segment to be removed  */
+			 char *shm_addr,	/* address of shared mem seg to be removed    */
+			 int cmd)
+{				/* remove id only or remove id and detach seg */
+	struct shmid *shmbuf = NULL;	/* info about the segment pointed by shmkey   */
 
-    dprt("pid[%d]: rm_shared_mem(): shm_id = %d shm_addr = %#x cmd = %d\n",
-        getpid(), shm_id, shm_addr, cmd);
-    if (shmctl(shm_id, IPC_RMID, (struct shmid_ds *)shmbuf) == -1)
-    {
-	dprt("pid[%d]: rm_shared_mem(): shmctl unable to remove shm_id[%d]\n",
-	    getpid(), shm_id);
-        perror("rm_shared_mem(): shmctl()");
-        return -1;
-    }
+	dprt("pid[%d]: rm_shared_mem(): shm_id = %d shm_addr = %#x cmd = %d\n",
+	     getpid(), shm_id, shm_addr, cmd);
+	if (shmctl(shm_id, IPC_RMID, (struct shmid_ds *)shmbuf) == -1) {
+		dprt("pid[%d]: rm_shared_mem(): shmctl unable to remove shm_id[%d]\n", getpid(), shm_id);
+		perror("rm_shared_mem(): shmctl()");
+		return -1;
+	}
 
-    if (cmd)
-    {
-        if (shmdt((void *)shm_addr) == -1)
-        {
-	    dprt("pid[%d]:rm_shared_mem(): shmdt unable to detach addr = %#x\n",
-	        getpid(), shm_addr);
-            perror("rm_shared_mem(): shmdt()");
-            return -1;
-        }
-    }
-  return 0;
+	if (cmd) {
+		if (shmdt((void *)shm_addr) == -1) {
+			dprt("pid[%d]:rm_shared_mem(): shmdt unable to detach addr = %#x\n", getpid(), shm_addr);
+			perror("rm_shared_mem(): shmdt()");
+			return -1;
+		}
+	}
+	return 0;
 }
 
 /******************************************************************************/
@@ -171,97 +166,88 @@
 /* Return:	exits with -1 on error, 0 on success                          */
 /*									      */
 /******************************************************************************/
-static void *
-shmat_rd_wr(void *args)	/* arguments to the thread function	      */
-{
-    int          shmndx   = 0;	/* index to the number of attach and detach   */
-    int		 index    = 0;  /* index to the number of blocks touched      */
-    int		 reader   = 0;  /* this thread is a reader thread if set to 1 */
-    key_t        shm_id   = 0;	/* shared memory id			      */
-    long         *locargs = 	/* local pointer to arguments		      */
-		            (long *)args;
-    volatile int exit_val = 0;	/* exit value of the pthread 		      */
-    char         *read_from_mem;/* ptr to touch each (4096) block in memory   */
-    char         *write_to_mem; /* ptr to touch each (4096) block in memory   */
-    char         *shmat_addr;   /* address of the attached memory             */
-    char	 buff;          /* temporary buffer                           */
+static void *shmat_rd_wr(void *args)
+{				/* arguments to the thread function             */
+	int shmndx = 0;		/* index to the number of attach and detach   */
+	int index = 0;		/* index to the number of blocks touched      */
+	int reader = 0;		/* this thread is a reader thread if set to 1 */
+	key_t shm_id = 0;	/* shared memory id                           */
+	long *locargs =		/* local pointer to arguments                 */
+	    (long *)args;
+	volatile int exit_val = 0;	/* exit value of the pthread                  */
+	char *read_from_mem;	/* ptr to touch each (4096) block in memory   */
+	char *write_to_mem;	/* ptr to touch each (4096) block in memory   */
+	char *shmat_addr;	/* address of the attached memory             */
+	char buff;		/* temporary buffer                           */
 
-    reader = (int)locargs[3];
-    while (shmndx++ < (int)locargs[0])
-    {
-        dprt("pid[%d]: shmat_rd_wr(): locargs[1] = %#x\n",
-	    getpid(), (int)locargs[1]);
+	reader = (int)locargs[3];
+	while (shmndx++ < (int)locargs[0]) {
+		dprt("pid[%d]: shmat_rd_wr(): locargs[1] = %#x\n",
+		     getpid(), (int)locargs[1]);
 
-	/* get shared memory id */
-        if ((shm_id = shmget((int)locargs[1], (int)locargs[2], IPC_CREAT|0666))
-		    == -1)
-        {
-	    dprt("pid[%d]: shmat_rd_wr(): shmget failed\n", getpid());
-            perror("do_shmat_shmadt(): shmget()");
-            PTHREAD_EXIT(-1);
-        }
+		/* get shared memory id */
+		if ((shm_id =
+		     shmget((int)locargs[1], (int)locargs[2], IPC_CREAT | 0666))
+		    == -1) {
+			dprt("pid[%d]: shmat_rd_wr(): shmget failed\n",
+			     getpid());
+			perror("do_shmat_shmadt(): shmget()");
+			PTHREAD_EXIT(-1);
+		}
 
-        fprintf(stdout, "pid[%d]: shmat_rd_wr(): shmget():"
-			"success got segment id %d\n",
-                           getpid(), shm_id);
+		fprintf(stdout, "pid[%d]: shmat_rd_wr(): shmget():"
+			"success got segment id %d\n", getpid(), shm_id);
 
-	/* get shared memory segment */
-        if ((shmat_addr = (char *)shmat(shm_id, NULL, 0)) ==  (void *)-1)
-        {
-            rm_shared_mem(shm_id, shmat_addr, 0);
-            fprintf(stderr, "pid[%d]: do_shmat_shmadt(): shmat_addr = %#lx\n",
-		 		 		 getpid(), (long)shmat_addr);
-            perror("do_shmat_shmadt(): shmat()");
-            PTHREAD_EXIT(-1);
-        }
-	dprt("pid[%d]: do_shmat_shmadt(): content of memory shmat_addr = %s\n",
-            getpid(), shmat_addr);
+		/* get shared memory segment */
+		if ((shmat_addr = (char *)shmat(shm_id, NULL, 0)) == (void *)-1) {
+			rm_shared_mem(shm_id, shmat_addr, 0);
+			fprintf(stderr,
+				"pid[%d]: do_shmat_shmadt(): shmat_addr = %#lx\n",
+				getpid(), (long)shmat_addr);
+			perror("do_shmat_shmadt(): shmat()");
+			PTHREAD_EXIT(-1);
+		}
+		dprt("pid[%d]: do_shmat_shmadt(): content of memory shmat_addr = %s\n", getpid(), shmat_addr);
 
-        fprintf(stdout, "pid[%d]: do_shmat_shmadt(): got shmat address = %#lx\n",
-            getpid(), (long)shmat_addr);
+		fprintf(stdout,
+			"pid[%d]: do_shmat_shmadt(): got shmat address = %#lx\n",
+			getpid(), (long)shmat_addr);
 
-	if (!reader)
-        {
-	    /* write character 'Y' to that memory area */
-	    index = 0;
-	    write_to_mem = shmat_addr;
-	    while (index < (int)locargs[2])
-            {
-	        dprt("pid[%d]: do_shmat_shmatd(): write_to_mem = %#x\n",
-                    getpid(), write_to_mem);
-	        *write_to_mem = 'Y';
-	        index++;
-	        write_to_mem++;
-	        sched_yield();
-            }
-        }
-	else
-        {
-            /* read from the memory area */
-            index = 0;
-	    read_from_mem = shmat_addr;
-	    while (index < (int)locargs[2])
-            {
-	        buff = *read_from_mem;
-		index++;
-		read_from_mem++;
+		if (!reader) {
+			/* write character 'Y' to that memory area */
+			index = 0;
+			write_to_mem = shmat_addr;
+			while (index < (int)locargs[2]) {
+				dprt("pid[%d]: do_shmat_shmatd(): write_to_mem = %#x\n", getpid(), write_to_mem);
+				*write_to_mem = 'Y';
+				index++;
+				write_to_mem++;
+				sched_yield();
+			}
+		} else {
+			/* read from the memory area */
+			index = 0;
+			read_from_mem = shmat_addr;
+			while (index < (int)locargs[2]) {
+				buff = *read_from_mem;
+				index++;
+				read_from_mem++;
+				sched_yield();
+			}
+		}
+
 		sched_yield();
-            }
-        }
 
-	sched_yield();
+		/* remove the shared memory */
+		if (rm_shared_mem(shm_id, shmat_addr, 1) == -1) {
+			fprintf(stderr,
+				"pid[%d]: do_shmat_shmatd(): rm_shared_mem(): faild to rm id\n",
+				getpid());
+			PTHREAD_EXIT(-1);
+		}
+	}
 
-	/* remove the shared memory */
-	if (rm_shared_mem(shm_id, shmat_addr, 1) == -1)
-        {
-            fprintf(stderr,
-                "pid[%d]: do_shmat_shmatd(): rm_shared_mem(): faild to rm id\n",
-		    getpid());
-	    PTHREAD_EXIT(-1);
-        }
-    }
-
-    PTHREAD_EXIT(0);
+	PTHREAD_EXIT(0);
 }
 
 /******************************************************************************/
@@ -280,108 +266,96 @@
 /*		 0 on success						      */
 /*									      */
 /******************************************************************************/
-int
-main(int	argc,		/* number of input parameters		      */
-     char	**argv)		/* pointer to the command line arguments.     */
-{
-    int		c;		/* command line options			      */
-    int		num_thrd = MAXT;/* number of threads to create                */
-    int		num_reps = MAXR;/* number of repatitions the test is run      */
-    int		thrd_ndx;	/* index into the array of thread ids         */
-    int		th_status;	/* exit status of LWP's	                      */
-    int		map_size;	/* size of the file mapped.                   */
-    int		shmkey   = 1969;/* key used to generate shmid by shmget()     */
-    pthread_t	thrdid[30];	/* maxinum of 30 threads allowed              */
-    long	chld_args[4];   /* arguments to the thread function           */
-    char        *map_address=NULL;
-				/* address in memory of the mapped file       */
-    extern int	 optopt;	/* options to the program		      */
+int main(int argc,		/* number of input parameters                 */
+	 char **argv)
+{				/* pointer to the command line arguments.     */
+	int c;			/* command line options                       */
+	int num_thrd = MAXT;	/* number of threads to create                */
+	int num_reps = MAXR;	/* number of repatitions the test is run      */
+	int thrd_ndx;		/* index into the array of thread ids         */
+	int th_status;		/* exit status of LWP's                       */
+	int map_size;		/* size of the file mapped.                   */
+	int shmkey = 1969;	/* key used to generate shmid by shmget()     */
+	pthread_t thrdid[30];	/* maxinum of 30 threads allowed              */
+	long chld_args[4];	/* arguments to the thread function           */
+	char *map_address = NULL;
+	/* address in memory of the mapped file       */
+	extern int optopt;	/* options to the program                     */
 
-    while ((c =  getopt(argc, argv, "hl:t:")) != -1)
-    {
-        switch(c)
-        {
-            case 'h':
-                usage(argv[0]);
-                break;
-            case 'l':		/* how many repetitions of the test to exec   */
-		if ((num_reps = atoi(optarg)) == 0)
-                    OPT_MISSING(argv[0], optopt);
-                else
-	        if (num_reps < 0)
-                {
-		    fprintf(stdout,
-			"WARNING: bad argument. Using default\n");
-                    num_reps = MAXR;
-                }
-                break;
-            case 't':
-		if ((num_thrd = atoi(optarg)) == 0)
-	            OPT_MISSING(argv[0], optopt);
-                else
-                if (num_thrd < 0)
-                {
-                    fprintf(stdout,
-                        "WARNING: bad argument. Using default\n");
-                    num_thrd = MAXT;
-                }
-                break;
-            default :
-		usage(argv[0]);
-		break;
+	while ((c = getopt(argc, argv, "hl:t:")) != -1) {
+		switch (c) {
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 'l':	/* how many repetitions of the test to exec   */
+			if ((num_reps = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_reps < 0) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_reps = MAXR;
+			}
+			break;
+		case 't':
+			if ((num_thrd = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_thrd < 0) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_thrd = MAXT;
+			}
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
 	}
-    }
 
-    chld_args[0] = num_reps;
+	chld_args[0] = num_reps;
 
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx+=2)
-    {
-        srand(time(NULL)%100);
-        map_size = (1 + (int)(1000.0*rand()/(RAND_MAX+1.0))) * 4096;
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx += 2) {
+		srand(time(NULL) % 100);
+		map_size =
+		    (1 + (int)(1000.0 * rand() / (RAND_MAX + 1.0))) * 4096;
 
-        chld_args[1] = shmkey++;
-        chld_args[2] = map_size;
+		chld_args[1] = shmkey++;
+		chld_args[2] = map_size;
 
-	dprt("main(): thrd_ndx = %d map_address = %#x map_size = %d\n",
-            thrd_ndx, map_address, map_size);
+		dprt("main(): thrd_ndx = %d map_address = %#x map_size = %d\n",
+		     thrd_ndx, map_address, map_size);
 
-        chld_args[3] = WRITER;
+		chld_args[3] = WRITER;
 
-        if (pthread_create(&thrdid[thrd_ndx], NULL, shmat_rd_wr, chld_args))
-        {
-            perror("shmat_rd_wr(): pthread_create()");
-            exit(-1);
-        }
+		if (pthread_create
+		    (&thrdid[thrd_ndx], NULL, shmat_rd_wr, chld_args)) {
+			perror("shmat_rd_wr(): pthread_create()");
+			exit(-1);
+		}
 
-        chld_args[3] = READER;
+		chld_args[3] = READER;
 
-        if (pthread_create(&thrdid[thrd_ndx+1], NULL, shmat_rd_wr, chld_args))
-        {
-            perror("shmat_rd_wr(): pthread_create()");
-            exit(-1);
-        }
-    }
+		if (pthread_create
+		    (&thrdid[thrd_ndx + 1], NULL, shmat_rd_wr, chld_args)) {
+			perror("shmat_rd_wr(): pthread_create()");
+			exit(-1);
+		}
+	}
 
-    sync();
+	sync();
 
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        if (pthread_join(thrdid[thrd_ndx], (void *)&th_status) != 0)
-        {
-            perror("shmat_rd_wr(): pthread_join()");
-            exit(-1);
-        }
-        else
-        {
-            dprt("WE ARE HERE %d\n", __LINE__);
-            if (th_status == -1)
-            {
-                fprintf(stderr,
-                        "thread [%ld] - process exited with errors\n",
-                            (long)thrdid[thrd_ndx]);
-                exit(-1);
-            }
-        }
-    }
-    exit(0);
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		if (pthread_join(thrdid[thrd_ndx], (void *)&th_status) != 0) {
+			perror("shmat_rd_wr(): pthread_join()");
+			exit(-1);
+		} else {
+			dprt("WE ARE HERE %d\n", __LINE__);
+			if (th_status == -1) {
+				fprintf(stderr,
+					"thread [%ld] - process exited with errors\n",
+					(long)thrdid[thrd_ndx]);
+				exit(-1);
+			}
+		}
+	}
+	exit(0);
 }
diff --git a/testcases/kernel/mem/oom/oom03.c b/testcases/kernel/mem/oom/oom03.c
index 6de68b0..54d66b7 100644
--- a/testcases/kernel/mem/oom/oom03.c
+++ b/testcases/kernel/mem/oom/oom03.c
@@ -69,9 +69,9 @@
 		if (access(MEMCG_SW_LIMIT, F_OK) == -1) {
 			if (errno == ENOENT)
 				tst_resm(TCONF,
-				    "memcg swap accounting is disabled");
+					 "memcg swap accounting is disabled");
 			else
-				tst_brkm(TBROK|TERRNO, cleanup, "access");
+				tst_brkm(TBROK | TERRNO, cleanup, "access");
 		} else {
 			write_file(MEMCG_SW_LIMIT, mem);
 			testoom(0, 1, 0);
diff --git a/testcases/kernel/mem/oom/oom04.c b/testcases/kernel/mem/oom/oom04.c
index 15ba660..e182f04 100644
--- a/testcases/kernel/mem/oom/oom04.c
+++ b/testcases/kernel/mem/oom/oom04.c
@@ -73,10 +73,10 @@
 		if (access(MEMCG_SW_LIMIT, F_OK) == -1) {
 			if (errno == ENOENT) {
 				tst_resm(TCONF,
-				    "memcg swap accounting is disabled");
+					 "memcg swap accounting is disabled");
 				swap_acc_on = 0;
 			} else
-				tst_brkm(TBROK|TERRNO, cleanup, "access");
+				tst_brkm(TBROK | TERRNO, cleanup, "access");
 		}
 
 		tst_resm(TINFO, "process mempolicy.");
diff --git a/testcases/kernel/mem/page/page01.c b/testcases/kernel/mem/page/page01.c
index 902e3b5..ea700c1 100644
--- a/testcases/kernel/mem/page/page01.c
+++ b/testcases/kernel/mem/page/page01.c
@@ -20,7 +20,7 @@
 /* 06/30/2001	Port to Linux	nsharoff@us.ibm.com */
 /* 11/01/2002	Port to LTP  	robbiew@us.ibm.com */
 
-                           /* page01.c */
+			   /* page01.c */
 /*======================================================================
 	=================== TESTPLAN SEGMENT ===================
 CALLS:	malloc(3)
@@ -42,7 +42,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-int bd_arg(char*);
+int bd_arg(char *);
 
 /** LTP Port **/
 #include "test.h"
@@ -53,7 +53,7 @@
 void anyfail(void);
 void ok_exit(void);
 void forkfail(void);
-void terror(char*);
+void terror(char *);
 int instress(void);
 
 #define FAILED 0
@@ -63,13 +63,13 @@
 int block_number;
 FILE *temp;
 
-char *TCID="page01";           /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "page01";		/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
 int main(argc, argv)
-	int argc;
-	char *argv[];
+int argc;
+char *argv[];
 {
 	int nchild;
 	int memory_size;
@@ -99,10 +99,10 @@
 	error_count = 0;
 
 	/****************************************/
-	/*					*/
-	/*	attempt to fork a number of 	*/
-	/*	identical processes		*/
-	/*					*/
+	/*                                      */
+	/*      attempt to fork a number of     */
+	/*      identical processes             */
+	/*                                      */
 	/****************************************/
 
 	for (i = 1; i <= nchild; i++) {
@@ -111,24 +111,28 @@
 			if (instress())
 				ok_exit();
 			forkfail();
-		}
-		else if (pid == 0) {
+		} else if (pid == 0) {
 			/********************************/
-			/*				*/
-			/*   allocate memory  of size	*/
-			/*    "memory_size"		*/
-			/*				*/
+			/*                              */
+			/*   allocate memory  of size   */
+			/*    "memory_size"             */
+			/*                              */
 			/********************************/
 
-			memory_pointer = (int*)malloc(memory_size*sizeof(int));
+			memory_pointer =
+			    (int *)malloc(memory_size * sizeof(int));
 			if (memory_pointer == 0) {
-					tst_resm(TBROK, "Cannot allocate memory - malloc failed.\n");
+				tst_resm(TBROK,
+					 "Cannot allocate memory - malloc failed.\n");
 				if (i < 2) {
-					tst_resm(TBROK, "This should not happen for first two children.\n");
-					tst_resm(TFAIL, "Child %d - fail.\n", i);
+					tst_resm(TBROK,
+						 "This should not happen for first two children.\n");
+					tst_resm(TFAIL, "Child %d - fail.\n",
+						 i);
 					tst_exit();
 				} else {
-					tst_resm(TCONF, "This is ok for all but first two children.\n");
+					tst_resm(TCONF,
+						 "This is ok for all but first two children.\n");
 					tst_resm(TCONF, "Child %d - ok.\n", i);
 					tst_exit();
 				}
@@ -136,9 +140,9 @@
 			number_pointer = memory_pointer;
 
 			/********************************/
-			/*				*/
-			/*         write to it		*/
-			/*				*/
+			/*                              */
+			/*         write to it          */
+			/*                              */
 			/********************************/
 
 			for (j = 1; j <= memory_size; j++)
@@ -146,27 +150,28 @@
 			sleep(1);
 
 			/********************************/
-			/*				*/
-			/*      and read from it to	*/
-			/*  check that what was written	*/
-			/*       is still there		*/
-			/*				*/
+			/*                              */
+			/*      and read from it to     */
+			/*  check that what was written */
+			/*       is still there         */
+			/*                              */
 			/********************************/
 
 			number_pointer = memory_pointer;
 			for (j = 1; j <= memory_size; j++) {
-				if (*(number_pointer++) != j) error_count++;
+				if (*(number_pointer++) != j)
+					error_count++;
 			}
 			exit(error_count);
 		}
 	}
 
 	/****************************************/
-	/*					*/
-	/*	wait for the child processes 	*/
-	/*      to teminate and report the #	*/
-	/*	of deviations recognized	*/
-	/*					*/
+	/*                                      */
+	/*      wait for the child processes    */
+	/*      to teminate and report the #    */
+	/*      of deviations recognized        */
+	/*                                      */
 	/****************************************/
 
 	count = 0;
@@ -181,8 +186,7 @@
 
 	if (count != nchild) {
 		tst_resm(TWARN, "Wrong number of children waited on.\n");
-		tst_resm(TWARN, "Count = %d, expected = %d.\n",
-			count, nchild);
+		tst_resm(TWARN, "Count = %d, expected = %d.\n", count, nchild);
 	}
 
 	anyfail();
@@ -191,7 +195,7 @@
 }
 
 int bd_arg(str)
-	char *str;
+char *str;
 {
 	tst_resm(TCONF, "\tCannot parse %s as a number.\n", str);
 	exit(1);
@@ -203,11 +207,10 @@
  *
  * Do set up - here its a dummy function
  */
-void
-setup()
+void setup()
 {
-    tst_tmpdir();
-    temp = stderr;
+	tst_tmpdir();
+	temp = stderr;
 }
 
 /*
@@ -215,11 +218,10 @@
  *
  * Description: Print message on entering a new block
  */
-void
-blenter()
+void blenter()
 {
-    local_flag = PASSED;
-        return;
+	local_flag = PASSED;
+	return;
 }
 
 /*
@@ -228,13 +230,12 @@
  *
  * Description: Exit a test.
  */
-void
-anyfail()
+void anyfail()
 {
-    (local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
-           : tst_resm(TPASS, "Test passed");
-    tst_rmdir();
-    tst_exit();
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
+	    : tst_resm(TPASS, "Test passed");
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -242,11 +243,10 @@
  *
  * Calling block passed the test
  */
-void
-ok_exit()
+void ok_exit()
 {
-        local_flag = PASSED;
-        return;
+	local_flag = PASSED;
+	return;
 }
 
 /*
@@ -254,12 +254,11 @@
  *
  * exit on failure
  */
-void
-forkfail()
+void forkfail()
 {
-        tst_resm(TBROK, "Reason: %s\n", strerror(errno));
-        tst_rmdir();
-        tst_exit();
+	tst_resm(TBROK, "Reason: %s\n", strerror(errno));
+	tst_rmdir();
+	tst_exit();
 }
 
 /*
@@ -269,11 +268,10 @@
  *              test case failed, for example fork() failed. We will log this
  *              failure as TBROK instead of TFAIL.
  */
-void
-terror(char *message)
+void terror(char *message)
 {
-    tst_resm(TBROK, "Reason: %s:%s\n", message, strerror(errno));
-        return;
+	tst_resm(TBROK, "Reason: %s:%s\n", message, strerror(errno));
+	return;
 }
 
 /*
@@ -282,10 +280,9 @@
  * Assume that we are always running under stress, so this function will
  * return > 0 value always.
  */
-int
-instress()
+int instress()
 {
-        tst_resm(TINFO, "System resource may be too low, fork() malloc()"
-                                " etc are likely to fail.\n");
-        return 1;
+	tst_resm(TINFO, "System resource may be too low, fork() malloc()"
+		 " etc are likely to fail.\n");
+	return 1;
 }
diff --git a/testcases/kernel/mem/page/page02.c b/testcases/kernel/mem/page/page02.c
index 81e6135..2f099b2 100644
--- a/testcases/kernel/mem/page/page02.c
+++ b/testcases/kernel/mem/page/page02.c
@@ -20,7 +20,7 @@
 /* 11/05/2002	Port to LTP	robbiew@us.ibm.com */
 /* 06/30/2001	Port to Linux	nsharoff@us.ibm.com */
 
-                           /* page02.c */
+			   /* page02.c */
 /*======================================================================
 	=================== TESTPLAN SEGMENT ===================
 CALLS:	malloc(3)
@@ -58,17 +58,17 @@
 int local_flag = PASSED;
 int block_number;
 
-char *TCID="page02";            /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "page02";		/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
-int bd_arg(char*);
+int bd_arg(char *);
 int chld_flag;
 int parent_pid;
 
 int main(argc, argv)
-	int argc;
-	char *argv[];
+int argc;
+char *argv[];
 {
 	int nchild;
 	int memory_size, half_memory_size;
@@ -79,10 +79,10 @@
 	int chld();
 
 	parent_pid = getpid();
-        tst_tmpdir();
+	tst_tmpdir();
 
 	if (signal(SIGUSR1, (void (*)())chld) == SIG_ERR) {
-		tst_resm(TBROK,"signal failed");
+		tst_resm(TBROK, "signal failed");
 		exit(1);
 	}
 
@@ -99,61 +99,68 @@
 		tst_resm(TCONF, "\tBad arg count.\n");
 		exit(1);
 	}
-	half_memory_size = memory_size/2;
+	half_memory_size = memory_size / 2;
 
 	error_count = 0;
 
 	/****************************************/
-	/*					*/
-	/*	attempt to fork a number of 	*/
-	/*	identical processes		*/
-	/*					*/
+	/*                                      */
+	/*      attempt to fork a number of     */
+	/*      identical processes             */
+	/*                                      */
 	/****************************************/
 
 	for (i = 1; i <= nchild; i++) {
 		chld_flag = 0;
 		if ((pid = fork()) == -1) {
-			tst_resm(TBROK,"Fork failed (may be OK if under stress)");
+			tst_resm(TBROK,
+				 "Fork failed (may be OK if under stress)");
 			tst_resm(TINFO, "System resource may be too low.\n");
 			local_flag = PASSED;
 			tst_resm(TBROK, "Reason: %s\n", strerror(errno));
-		        tst_rmdir();
-		        tst_exit();
-		}
-		else if (pid == 0) {
+			tst_rmdir();
+			tst_exit();
+		} else if (pid == 0) {
 			/********************************/
-			/*				*/
-			/*   allocate memory  of size	*/
-			/*    "memory_size"		*/
-			/*				*/
+			/*                              */
+			/*   allocate memory  of size   */
+			/*    "memory_size"             */
+			/*                              */
 			/********************************/
 
-			memory_pointer = (int*)malloc(memory_size*sizeof(int));
+			memory_pointer =
+			    (int *)malloc(memory_size * sizeof(int));
 			if (memory_pointer == 0) {
 				tst_resm(TBROK, "\tCannot malloc memory.\n");
 				if (i < 2) {
-					tst_resm(TBROK, "\tThis should not happen to first two children.\n");
-					tst_resm(TBROK, "\tChild %d - fail.\n", i);
+					tst_resm(TBROK,
+						 "\tThis should not happen to first two children.\n");
+					tst_resm(TBROK, "\tChild %d - fail.\n",
+						 i);
 				} else {
-					tst_resm(TBROK, "\tThis is ok for all but first two children.\n");
-					tst_resm(TBROK, "\tChild %d - ok.\n", i);
+					tst_resm(TBROK,
+						 "\tThis is ok for all but first two children.\n");
+					tst_resm(TBROK, "\tChild %d - ok.\n",
+						 i);
 					kill(parent_pid, SIGUSR1);
 					_exit(0);
 				}
-				tst_resm(TBROK,"malloc fail");
-				tst_resm(TFAIL, "\t\nImpossible to allocate memory of size %d in process %d\n", memory_size, i);
+				tst_resm(TBROK, "malloc fail");
+				tst_resm(TFAIL,
+					 "\t\nImpossible to allocate memory of size %d in process %d\n",
+					 memory_size, i);
 				kill(parent_pid, SIGUSR1);
 				tst_exit();
 			}
 			kill(parent_pid, SIGUSR1);
 
 			down_pointer = up_pointer = memory_pointer +
-			  (memory_size / 2);
+			    (memory_size / 2);
 
 			/********************************/
-			/*				*/
-			/*         write to it		*/
-			/*				*/
+			/*                              */
+			/*         write to it          */
+			/*                              */
 			/********************************/
 
 			for (j = 1; j <= half_memory_size; j++) {
@@ -163,19 +170,21 @@
 			sleep(1);
 
 			/********************************/
-			/*				*/
-			/*      and read from it to	*/
-			/*  check that what was written	*/
-			/*       is still there		*/
-			/*				*/
+			/*                              */
+			/*      and read from it to     */
+			/*  check that what was written */
+			/*       is still there         */
+			/*                              */
 			/********************************/
 
 			down_pointer = up_pointer = memory_pointer +
-			  (memory_size / 2);
+			    (memory_size / 2);
 
 			for (j = 1; j <= half_memory_size; j++) {
-				if (*(up_pointer++) != j) error_count++;
-				if (*(down_pointer--) != j) error_count++;
+				if (*(up_pointer++) != j)
+					error_count++;
+				if (*(down_pointer--) != j)
+					error_count++;
 			}
 			exit(error_count);
 		}
@@ -184,17 +193,18 @@
 	}
 
 	/****************************************/
-	/*					*/
-	/*	wait for the child processes 	*/
-	/*      to teminate and report the #	*/
-	/*	of deviations recognized	*/
-	/*					*/
+	/*                                      */
+	/*      wait for the child processes    */
+	/*      to teminate and report the #    */
+	/*      of deviations recognized        */
+	/*                                      */
 	/****************************************/
 
 	count = 0;
 	while ((child = wait(&status)) > 0) {
 #ifdef DEBUG
-		tst_resm(TINFO, "\tTest {%d} exited status %d\n", child, status);
+		tst_resm(TINFO, "\tTest {%d} exited status %d\n", child,
+			 status);
 #endif
 		if (status)
 			local_flag = FAILED;
@@ -204,20 +214,20 @@
 	if (count != nchild) {
 		tst_resm(TFAIL, "\tWrong number of children waited on.\n");
 		tst_resm(TFAIL, "\tCount = %d, expected = %d.\n",
-			count, nchild);
+			 count, nchild);
 	}
 
-    	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
-           	: tst_resm(TPASS, "Test passed");
-    	tst_rmdir();
-    	tst_exit();
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
+	    : tst_resm(TPASS, "Test passed");
+	tst_rmdir();
+	tst_exit();
 	/**NOT REACHED**/
 	tst_exit();
 
 }
 
 int bd_arg(str)
-	char *str;
+char *str;
 {
 	tst_resm(TCONF, "\tCannot parse %s as a number.\n", str);
 	tst_exit();
@@ -228,7 +238,7 @@
 int chld()
 {
 	if (signal(SIGUSR1, (void (*)())chld) == SIG_ERR) {
-		tst_resm(TBROK,"signal failed");
+		tst_resm(TBROK, "signal failed");
 		tst_exit();
 	}
 	chld_flag++;
diff --git a/testcases/kernel/mem/shmt/shmt05.c b/testcases/kernel/mem/shmt/shmt05.c
index d869db5..43c4b23 100644
--- a/testcases/kernel/mem/shmt/shmt05.c
+++ b/testcases/kernel/mem/shmt/shmt05.c
@@ -95,14 +95,13 @@
 			 "Error: shmget: shmid1 = %d, errno = %d\n",
 			 shmid1, errno);
 	} else {
-		cp1 = (char *)shmat(shmid1, cp + (SIZE/2), 0);
+		cp1 = (char *)shmat(shmid1, cp + (SIZE / 2), 0);
 		if (cp1 != (char *)-1) {
 			perror("shmat");
 			tst_resm(TFAIL,
 				 "Error: shmat: shmid1 = %d, addr= %p, errno = %d\n",
 				 shmid1, cp1, errno);
-		}
-		else{
+		} else {
 			tst_resm(TPASS, "2nd shmget & shmat");
 		}
 	}
diff --git a/testcases/kernel/mem/shmt/shmt09.c b/testcases/kernel/mem/shmt/shmt09.c
index d29aca8..5e7e52e 100644
--- a/testcases/kernel/mem/shmt/shmt09.c
+++ b/testcases/kernel/mem/shmt/shmt09.c
@@ -62,7 +62,7 @@
 #elif defined (__mips__)  ||  defined (__hppa__) || defined (__sparc__)
 #define INCREMENT		262144	/* 256Kb */
 #elif defined __sh__ || defined (__arm__)
-#define INCREMENT 		16384   /* 16kb */
+#define INCREMENT 		16384	/* 16kb */
 #else
 #define INCREMENT 		SHMLBA
 #endif
diff --git a/testcases/kernel/mem/swapping/swapping01.c b/testcases/kernel/mem/swapping/swapping01.c
index 605ede4..92fb32b 100644
--- a/testcases/kernel/mem/swapping/swapping01.c
+++ b/testcases/kernel/mem/swapping/swapping01.c
@@ -97,7 +97,7 @@
 
 		switch (pid = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			do_alloc();
 			exit(0);
@@ -112,16 +112,16 @@
 static void init_meminfo(void)
 {
 	swap_free_init = read_meminfo("SwapFree:");
-	mem_free_init  = read_meminfo("MemFree:");
-	mem_over       = mem_free_init * COE_SLIGHT_OVER;
-	mem_over_max   = mem_free_init * COE_DELTA;
+	mem_free_init = read_meminfo("MemFree:");
+	mem_over = mem_free_init * COE_SLIGHT_OVER;
+	mem_over_max = mem_free_init * COE_DELTA;
 
 	/* at least 10MB free physical memory needed */
 	if (mem_free_init < 10240) {
 		sleep(5);
 		if (mem_free_init < 10240)
 			tst_brkm(TCONF, cleanup,
-				    "Not enough free memory to test.");
+				 "Not enough free memory to test.");
 	}
 	if (swap_free_init < mem_over)
 		tst_brkm(TCONF, cleanup, "Not enough swap space to test.");
@@ -137,11 +137,11 @@
 	tst_resm(TINFO, "try to allocate: %ld MB", mem_count / 1024);
 	s = malloc(mem_count * 1024);
 	if (s == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc");
 	memset(s, 1, mem_count * 1024);
 	tst_resm(TINFO, "memory allocated: %ld MB", mem_count / 1024);
 	if (raise(SIGSTOP) == -1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "kill");
+		tst_brkm(TBROK | TERRNO, tst_exit, "kill");
 	free(s);
 }
 
@@ -152,7 +152,7 @@
 
 	/* wait child stop */
 	if (waitpid(pid, &status, WUNTRACED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (!WIFSTOPPED(status))
 		tst_brkm(TBROK, cleanup, "child was not stopped.");
 
@@ -162,16 +162,16 @@
 		if (swapped > mem_over_max) {
 			kill(pid, SIGCONT);
 			tst_brkm(TFAIL, cleanup, "heavy swapping detected: "
-					"%ld MB swapped.", swapped / 1024);
+				 "%ld MB swapped.", swapped / 1024);
 		}
 		sleep(1);
 	}
 	tst_resm(TPASS, "no heavy swapping detected, %ld MB swapped.",
-			swapped / 1024);
+		 swapped / 1024);
 	kill(pid, SIGCONT);
 	/* wait child exit */
 	if (waitpid(pid, &status, 0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 }
 
 void setup(void)
diff --git a/testcases/kernel/mem/thp/thp01.c b/testcases/kernel/mem/thp/thp01.c
index fbb814e..753e419 100644
--- a/testcases/kernel/mem/thp/thp01.c
+++ b/testcases/kernel/mem/thp/thp01.c
@@ -77,7 +77,7 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		switch (pid = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			memset(arg, 'c', length - 1);
 			arg[length - 1] = '\0';
@@ -95,10 +95,10 @@
 			}
 		default:
 			if (waitpid(pid, &st, 0) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+				tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 			if (!WIFEXITED(st) || WEXITSTATUS(st) != 0)
 				tst_brkm(TBROK, cleanup,
-					"child exited abnormally");
+					 "child exited abnormally");
 		}
 	}
 	tst_resm(TPASS, "system didn't crash, pass.");
@@ -112,7 +112,7 @@
 	length = 32 * ps;
 	arg = malloc(length);
 	if (arg == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "malloc");
+		tst_brkm(TBROK | TERRNO, NULL, "malloc");
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
diff --git a/testcases/kernel/mem/thp/thp02.c b/testcases/kernel/mem/thp/thp02.c
index 590cc25..c15add5 100644
--- a/testcases/kernel/mem/thp/thp02.c
+++ b/testcases/kernel/mem/thp/thp02.c
@@ -92,11 +92,11 @@
 
 	for (i = 0; i < 4; i++) {
 		if (posix_memalign(&p, hps, size))
-			tst_brkm(TBROK|TERRNO, cleanup, "memalign p");
+			tst_brkm(TBROK | TERRNO, cleanup, "memalign p");
 		if (posix_memalign(&p2, hps, size))
-			tst_brkm(TBROK|TERRNO, cleanup, "memalign p2");
+			tst_brkm(TBROK | TERRNO, cleanup, "memalign p2");
 		if (posix_memalign(&p3, hps, size))
-			tst_brkm(TBROK|TERRNO, cleanup, "memalign p3");
+			tst_brkm(TBROK | TERRNO, cleanup, "memalign p3");
 
 		memset(p, 0xff, size);
 		memset(p2, 0xff, size);
@@ -113,11 +113,11 @@
 		new_addr = p3 + ps * (i & 1);
 		tst_resm(TINFO, "mremap %p to %p", old_addr, new_addr);
 
-		p4 = mremap(old_addr, size-ps, size-ps,
-				MREMAP_FIXED|MREMAP_MAYMOVE, new_addr);
+		p4 = mremap(old_addr, size - ps, size - ps,
+			    MREMAP_FIXED | MREMAP_MAYMOVE, new_addr);
 		if (p4 == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mremap");
-		if (memcmp(p4, p2, size-ps))
+			tst_brkm(TBROK | TERRNO, cleanup, "mremap");
+		if (memcmp(p4, p2, size - ps))
 			tst_brkm(TBROK, cleanup, "mremap bug");
 	}
 }
@@ -127,8 +127,8 @@
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
 
-	ps   = sysconf(_SC_PAGESIZE);
-	hps  = read_meminfo("Hugepagesize:") * 1024;
+	ps = sysconf(_SC_PAGESIZE);
+	hps = read_meminfo("Hugepagesize:") * 1024;
 	size = hps * 4;
 }
 
diff --git a/testcases/kernel/mem/thp/thp03.c b/testcases/kernel/mem/thp/thp03.c
index 85ec274..80356f4 100644
--- a/testcases/kernel/mem/thp/thp03.c
+++ b/testcases/kernel/mem/thp/thp03.c
@@ -86,24 +86,24 @@
 	void *p;
 
 	p = mmap(NULL, unaligned_size, PROT_READ | PROT_WRITE,
-		MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+		 MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 
 	memset(p, 0x00, unaligned_size);
 	if (mprotect(p, unaligned_size, PROT_NONE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mprotect");
+		tst_brkm(TBROK | TERRNO, cleanup, "mprotect");
 	if (madvise(p + hugepage_size, page_size, MADV_MERGEABLE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "madvise");
+		tst_brkm(TBROK | TERRNO, cleanup, "madvise");
 
 	switch (fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		exit(0);
 	default:
 		if (waitpid(-1, NULL, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	}
 }
 
@@ -126,6 +126,6 @@
 int main(void)
 {
 	tst_brkm(TCONF, NULL, "Kernel doesn't support MADV_MERGEABLE"
-			      " or you need to update your glibc-headers");
+		 " or you need to update your glibc-headers");
 }
 #endif
diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index 7a3dae4..fc26e34 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -136,8 +136,8 @@
 	while (getline(&line, &len, fp) != -1) {
 		/* exclude vdso and vsyscall */
 		if (sscanf(line, "%*p-%*p %*4s %*p %*2d:%*2d %*d %s", buf) ==
-			    1 && ((strcmp(buf, "[vdso]") == 0) ||
-				  (strcmp(buf, "[vsyscall]") == 0)))
+		    1 && ((strcmp(buf, "[vdso]") == 0) ||
+			  (strcmp(buf, "[vsyscall]") == 0)))
 			continue;
 		map_count++;
 	}
@@ -187,35 +187,33 @@
 			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			while (mmap(NULL, 1, PROT_READ,
-				    MAP_SHARED|MAP_ANONYMOUS, -1, 0)
-					!= MAP_FAILED)
-				;
+				    MAP_SHARED | MAP_ANONYMOUS, -1, 0)
+			       != MAP_FAILED) ;
 			if (raise(SIGSTOP) != 0)
-				tst_brkm(TBROK|TERRNO, tst_exit, "raise");
+				tst_brkm(TBROK | TERRNO, tst_exit, "raise");
 			exit(0);
 		default:
 			break;
 		}
 		/* wait child done mmap and stop */
 		if (waitpid(pid, &status, WUNTRACED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFSTOPPED(status))
 			tst_brkm(TBROK, cleanup, "child did not stopped");
 
 		map_count = count_maps(pid);
 		if (map_count == max_maps)
 			tst_resm(TPASS, "%ld map entries in total "
-					"as expected.", max_maps);
+				 "as expected.", max_maps);
 		else
 			tst_resm(TFAIL, "%ld map entries in total, but "
-					"expected %ld entries", map_count,
-					max_maps);
+				 "expected %ld entries", map_count, max_maps);
 
 		/* make child continue to exit */
 		if (kill(pid, SIGCONT) != 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "kill");
+			tst_brkm(TBROK | TERRNO, cleanup, "kill");
 		if (waitpid(pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 
 		max_maps = max_maps << 2;
 	}
diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index 873b807..b4d0f75 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -73,10 +73,10 @@
 
 	sa.sa_handler = sighandler;
 	if (sigemptyset(&sa.sa_mask) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "sigemptyset");
+		tst_brkm(TBROK | TERRNO, cleanup, "sigemptyset");
 	sa.sa_flags = 0;
 	if (sigaction(SIGUSR1, &sa, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "sigaction");
+		tst_brkm(TBROK | TERRNO, cleanup, "sigaction");
 
 	msg = parse_opts(argc, argv, NULL, NULL);
 	if (msg != NULL)
@@ -85,7 +85,7 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 
 	case 0:
 		/* startup the check monitor */
@@ -102,12 +102,12 @@
 	}
 
 	if (kill(pid, SIGUSR1) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "kill %d", pid);
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED)  == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		tst_brkm(TBROK | TERRNO, cleanup, "kill %d", pid);
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (WIFEXITED(status) && WEXITSTATUS(status) != 0)
 		tst_resm(TFAIL,
-		    "check_monitor child exit with status: %d", status);
+			 "check_monitor child exit with status: %d", status);
 
 	cleanup();
 	tst_exit();
@@ -129,7 +129,7 @@
 		/* case2 */
 		else if (i == 1) {
 			set_sys_tune("min_free_kbytes", 2 * default_tune, 1);
-		/* case3 */
+			/* case3 */
 		} else {
 			memfree = read_meminfo("MemFree:");
 			memtotal = read_meminfo("MemTotal:");
@@ -143,44 +143,47 @@
 		fflush(stdout);
 		switch (pid[i] = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
 			ret = eatup_mem(overcommit_policy);
 			exit(ret);
 		}
 
-		if (waitpid(pid[i], &status, WUNTRACED|WCONTINUED) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+		if (waitpid(pid[i], &status, WUNTRACED | WCONTINUED) == -1)
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 
 		if (overcommit_policy == 2) {
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_resm(TFAIL,
-				    "child unexpectedly failed: %d", status);
+					 "child unexpectedly failed: %d",
+					 status);
 		} else if (overcommit_policy == 1) {
 			if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL)
 #if __WORDSIZE == 32
 			{
 				if (total_mem < 3145728UL)
 #endif
-				tst_resm(TFAIL,
-				    "child unexpectedly failed: %d", status);
+					tst_resm(TFAIL,
+						 "child unexpectedly failed: %d",
+						 status);
 #if __WORDSIZE == 32
-	/* in 32-bit system, a process allocate about 3Gb memory at most */
+				/* in 32-bit system, a process allocate about 3Gb memory at most */
 				else
 					tst_resm(TINFO, "Child can't allocate "
-					    ">3Gb memory in 32bit system");
+						 ">3Gb memory in 32bit system");
 			}
 #endif
 		} else {
 			if (WIFEXITED(status)) {
 				if (WEXITSTATUS(status) != 0) {
 					tst_resm(TFAIL, "child unexpectedly "
-					    "failed: %d", status);
+						 "failed: %d", status);
 				}
 			} else if (!WIFSIGNALED(status) ||
-				    WTERMSIG(status) != SIGKILL) {
+				   WTERMSIG(status) != SIGKILL) {
 				tst_resm(TFAIL,
-				    "child unexpectedly failed: %d", status);
+					 "child unexpectedly failed: %d",
+					 status);
 			}
 		}
 	}
@@ -195,8 +198,8 @@
 	memfree = read_meminfo("MemFree:");
 	printf("memfree is %lu kB before eatup mem\n", memfree);
 	while (1) {
-		addrs = mmap(NULL, MAP_SIZE, PROT_READ|PROT_WRITE,
-		    MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+		addrs = mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE,
+			     MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 		if (addrs == MAP_FAILED) {
 			if (overcommit_policy != 1 && errno != ENOMEM) {
 				perror("mmap");
@@ -223,7 +226,7 @@
 
 		if (memfree < tune) {
 			tst_resm(TINFO, "MemFree is %lu kB, "
-			    "min_free_kbytes is %lu kB", memfree, tune);
+				 "min_free_kbytes is %lu kB", memfree, tune);
 			tst_resm(TFAIL, "MemFree < min_free_kbytes");
 		}
 
diff --git a/testcases/kernel/mem/vma/vma01.c b/testcases/kernel/mem/vma/vma01.c
index 3d00b97..fc6e692 100644
--- a/testcases/kernel/mem/vma/vma01.c
+++ b/testcases/kernel/mem/vma/vma01.c
@@ -96,18 +96,18 @@
 	void *t, *u, *x;
 
 	create_bighole();
-	t = mmap(p, 3*ps, PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+	t = mmap(p, 3 * ps, PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 	if (t == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 	memset(t, 1, ps);
 
 	switch (fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
 		memset(t, 2, ps);
-		u = mmap(t + 3*ps, 3*ps, PROT_WRITE,
-			    MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+		u = mmap(t + 3 * ps, 3 * ps, PROT_WRITE,
+			 MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 		if (u == MAP_FAILED) {
 			perror("mmap");
 			exit(255);
@@ -120,22 +120,22 @@
 		if (topdown) {
 			x = get_end_addr(u);
 			printf("child : x = %p\n", x);
-			if (x == t + 3*ps)
+			if (x == t + 3 * ps)
 				exit(1);
-			else if (x == t && get_end_addr(x) == t + 3*ps)
+			else if (x == t && get_end_addr(x) == t + 3 * ps)
 				exit(0);
 		} else {
 			x = get_end_addr(t);
 			printf("child : x = %p\n", x);
-			if (x == t + 6*ps)
+			if (x == t + 6 * ps)
 				exit(1);
-			else if (x == u && get_end_addr(x) == t + 6*ps)
+			else if (x == u && get_end_addr(x) == t + 6 * ps)
 				exit(0);
 		}
 		exit(255);
 	default:
 		if (waitpid(-1, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status))
 			tst_brkm(TBROK, cleanup, "child exited abnormally.");
 		check_status(WEXITSTATUS(status));
@@ -154,13 +154,13 @@
 	 * |======|------|        top-down alloc
 	 *        |------|======| bottom-up alloc
 	 */
-	t = mmap(NULL, 9*ps, PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+	t = mmap(NULL, 9 * ps, PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
 	if (t == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 	memset(t, 'a', ps);
-	p = t + 3*ps;
-	if (munmap(t, 9*ps) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "munmap");
+	p = t + 3 * ps;
+	if (munmap(t, 9 * ps) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "munmap");
 }
 
 static void *get_end_addr(void *addr_s)
@@ -171,7 +171,7 @@
 
 	fp = fopen(MAPS_FILE, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 	while (fgets(buf, BUFSIZ, fp) != NULL) {
 		if (sscanf(buf, "%p-%p ", &s, &t) != 2)
 			continue;
diff --git a/testcases/kernel/mem/vma/vma02.c b/testcases/kernel/mem/vma/vma02.c
index 13f0ce2..19a1d4c 100644
--- a/testcases/kernel/mem/vma/vma02.c
+++ b/testcases/kernel/mem/vma/vma02.c
@@ -56,8 +56,8 @@
 static int opt_node;
 static char *opt_nodestr;
 static option_t options[] = {
-	{ "n:", &opt_node,	&opt_nodestr},
-	{ NULL, NULL,		NULL}
+	{"n:", &opt_node, &opt_nodestr},
+	{NULL, NULL, NULL}
 };
 
 static void usage(void);
@@ -79,46 +79,46 @@
 	if (opt_node) {
 		node = SAFE_STRTOL(NULL, opt_nodestr, 1, LONG_MAX);
 	} else {
-		err = get_allowed_nodes(NH_MEMS|NH_MEMS, 1, &node);
+		err = get_allowed_nodes(NH_MEMS | NH_MEMS, 1, &node);
 		if (err == -3)
 			tst_brkm(TCONF, NULL, "requires at least one node.");
 		else if (err < 0)
-			tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes");
+			tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes");
 	}
 	numa_bitmask_setbit(nmask, node);
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
-		addr = mmap(NULL, pagesize*3, PROT_WRITE,
-			MAP_ANON|MAP_PRIVATE, 0, 0);
+		addr = mmap(NULL, pagesize * 3, PROT_WRITE,
+			    MAP_ANON | MAP_PRIVATE, 0, 0);
 		if (addr == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, NULL, "mmap");
+			tst_brkm(TBROK | TERRNO, NULL, "mmap");
 
 		tst_resm(TINFO, "pid = %d addr = %p", getpid(), addr);
 		/* make page populate */
-		memset(addr, 0, pagesize*3);
+		memset(addr, 0, pagesize * 3);
 
 		/* first mbind */
-		err = mbind(addr+pagesize, pagesize, MPOL_BIND, nmask->maskp,
-			nmask->size, MPOL_MF_MOVE_ALL);
+		err = mbind(addr + pagesize, pagesize, MPOL_BIND, nmask->maskp,
+			    nmask->size, MPOL_MF_MOVE_ALL);
 		if (err != 0) {
 			if (errno != ENOSYS)
-				tst_brkm(TBROK|TERRNO, NULL, "mbind1");
+				tst_brkm(TBROK | TERRNO, NULL, "mbind1");
 			else
 				tst_brkm(TCONF, NULL,
-					"mbind syscall not implemented on this system.");
+					 "mbind syscall not implemented on this system.");
 		}
 
 		/* second mbind */
-		err = mbind(addr, pagesize*3, MPOL_DEFAULT, NULL, 0, 0);
+		err = mbind(addr, pagesize * 3, MPOL_DEFAULT, NULL, 0, 0);
 		if (err != 0)
-			tst_brkm(TBROK|TERRNO, NULL, "mbind2");
+			tst_brkm(TBROK | TERRNO, NULL, "mbind2");
 
 		/* /proc/self/maps in the form of
 		   "00400000-00406000 r-xp 00000000". */
 		fp = fopen("/proc/self/maps", "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, NULL, "fopen");
+			tst_brkm(TBROK | TERRNO, NULL, "fopen");
 
 		while (fgets(buf, BUFSIZ, fp) != NULL) {
 			if (sscanf(buf, "%p-%p ", &start, &end) != 2)
@@ -126,8 +126,8 @@
 
 			if (start == addr) {
 				tst_resm(TINFO, "start = %p, end = %p",
-					start, end);
-				if (end == addr + pagesize*3) {
+					 start, end);
+				if (end == addr + pagesize * 3) {
 					tst_resm(TPASS, "only 1 VMA.");
 					break;
 				}
@@ -136,28 +136,28 @@
 				while (fgets(buf, BUFSIZ, fp) != NULL) {
 					/* No more VMAs, break */
 					if (sscanf(buf, "%p-%p ", &start,
-						&end) != 2)
+						   &end) != 2)
 						break;
 					tst_resm(TINFO, "start = %p, end = %p",
-						start, end);
+						 start, end);
 
 					/* more VMAs found */
 					if (start == lastend)
 						lastend = end;
-					if (end == addr + pagesize*3) {
+					if (end == addr + pagesize * 3) {
 						tst_resm(TFAIL,
-							">1 unmerged VMAs.");
+							 ">1 unmerged VMAs.");
 						break;
 					}
 				}
-				if (end != addr + pagesize*3)
+				if (end != addr + pagesize * 3)
 					tst_resm(TFAIL, "no matched VMAs.");
 				break;
 			}
 		}
 		fclose(fp);
-		if (munmap(addr, pagesize*3) == -1)
-			tst_brkm(TWARN|TERRNO, NULL, "munmap");
+		if (munmap(addr, pagesize * 3) == -1)
+			tst_brkm(TWARN | TERRNO, NULL, "munmap");
 	}
 	tst_exit();
 }
diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index 884e100..3032ee2 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -61,7 +61,7 @@
 static int fd;
 
 static void *mmap2(void *addr, size_t length, int prot,
-		int flags, int fd, off_t pgoffset);
+		   int flags, int fd, off_t pgoffset);
 static void setup(void);
 static void cleanup(void);
 
@@ -87,20 +87,20 @@
 
 		fd = open(TESTFILE, O_RDWR);
 		if (fd == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "open %s", TESTFILE);
+			tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
 
 		pgoff = ULONG_MAX - 1;
-		map = mmap2(NULL, pgsz, PROT_READ|PROT_WRITE, MAP_PRIVATE,
-				fd, pgoff);
+		map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+			    fd, pgoff);
 		if (map == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap2");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap2");
 
 		remap = mremap(map, pgsz, 2 * pgsz, 0);
 		if (remap == MAP_FAILED) {
 			if (errno == EINVAL)
-				tst_resm(TPASS,	"mremap failed as expected.");
+				tst_resm(TPASS, "mremap failed as expected.");
 			else
-				tst_resm(TFAIL|TERRNO, "mremap");
+				tst_resm(TFAIL | TERRNO, "mremap");
 		} else {
 			tst_resm(TFAIL, "mremap succeeded unexpectedly.");
 		}
@@ -113,10 +113,10 @@
 }
 
 static void *mmap2(void *addr, size_t length, int prot,
-		int flags, int fd, off_t pgoffset)
+		   int flags, int fd, off_t pgoffset)
 {
 	return (void *)syscall(SYS_mmap2, addr, length, prot,
-			flags, fd, pgoffset);
+			       flags, fd, pgoffset);
 }
 
 static void setup(void)
@@ -127,7 +127,7 @@
 
 	fd = creat(TESTFILE, 0644);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "creat %s", TESTFILE);
+		tst_brkm(TBROK | TERRNO, NULL, "creat %s", TESTFILE);
 	close(fd);
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/mem/vma/vma04.c b/testcases/kernel/mem/vma/vma04.c
index eca4567..2ee7d6b 100644
--- a/testcases/kernel/mem/vma/vma04.c
+++ b/testcases/kernel/mem/vma/vma04.c
@@ -64,8 +64,8 @@
 static struct bitmask *nmask;
 
 static option_t options[] = {
-	{ "n:", &opt_node,	&opt_nodestr},
-	{ NULL, NULL,		NULL}
+	{"n:", &opt_node, &opt_nodestr},
+	{NULL, NULL, NULL}
 };
 
 static void init(void);
@@ -97,11 +97,11 @@
 	if (opt_node) {
 		node = SAFE_STRTOL(NULL, opt_nodestr, 1, LONG_MAX);
 	} else {
-		err = get_allowed_nodes(NH_MEMS|NH_MEMS, 1, &node);
+		err = get_allowed_nodes(NH_MEMS | NH_MEMS, 1, &node);
 		if (err == -3)
 			tst_brkm(TCONF, NULL, "requires at least one node.");
 		else if (err < 0)
-			tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes");
+			tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes");
 	}
 	numa_bitmask_setbit(nmask, node);
 
@@ -129,13 +129,14 @@
 {
 	void *addr;
 
-	addr = SAFE_MMAP(cleanup, NULL, pagesize*8, PROT_NONE,
-		    MAP_ANON|MAP_PRIVATE, 0, 0);
-	SAFE_MMAP(cleanup, addr+pagesize, pagesize*6, PROT_READ|PROT_WRITE,
-		    MAP_ANON|MAP_PRIVATE|MAP_FIXED, 0, 0);
+	addr = SAFE_MMAP(cleanup, NULL, pagesize * 8, PROT_NONE,
+			 MAP_ANON | MAP_PRIVATE, 0, 0);
+	SAFE_MMAP(cleanup, addr + pagesize, pagesize * 6,
+		  PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE | MAP_FIXED, 0,
+		  0);
 
 	mmap_addr = addr + pagesize;
-	memset(mmap_addr, 0, pagesize*6);
+	memset(mmap_addr, 0, pagesize * 6);
 }
 
 static void fin(void)
@@ -143,47 +144,47 @@
 	void *addr;
 
 	addr = mmap_addr - pagesize;
-	SAFE_MUNMAP(cleanup, addr, pagesize*8);
+	SAFE_MUNMAP(cleanup, addr, pagesize * 8);
 
 	memset(retbuf, 0, sizeof(retbuf));
 }
 
 static void mem_bind(int index, int len)
 {
-	if (mbind(mmap_addr+pagesize*index, pagesize*len,
-		    MPOL_BIND, nmask->maskp, nmask->size, 0) != 0) {
+	if (mbind(mmap_addr + pagesize * index, pagesize * len,
+		  MPOL_BIND, nmask->maskp, nmask->size, 0) != 0) {
 		if (errno != ENOSYS)
-			tst_brkm(TBROK|TERRNO, cleanup, "mbind: bind");
+			tst_brkm(TBROK | TERRNO, cleanup, "mbind: bind");
 		else
 			tst_brkm(TCONF, cleanup,
-				    "mbind syscall not implemented "
-				    "on this system.");
+				 "mbind syscall not implemented "
+				 "on this system.");
 	}
 }
 
 static void mem_interleave(int index, int len)
 {
-	if (mbind(mmap_addr+pagesize*index, pagesize*len,
-		    MPOL_INTERLEAVE, nmask->maskp, nmask->size, 0) != 0) {
+	if (mbind(mmap_addr + pagesize * index, pagesize * len,
+		  MPOL_INTERLEAVE, nmask->maskp, nmask->size, 0) != 0) {
 		if (errno != ENOSYS)
-			tst_brkm(TBROK|TERRNO, cleanup, "mbind: interleave");
+			tst_brkm(TBROK | TERRNO, cleanup, "mbind: interleave");
 		else
 			tst_brkm(TCONF, cleanup,
-				    "mbind syscall not implemented "
-				    "on this system.");
+				 "mbind syscall not implemented "
+				 "on this system.");
 	}
 }
 
 static void mem_unbind(int index, int len)
 {
-	if (mbind(mmap_addr+pagesize*index, pagesize*len,
-		    MPOL_DEFAULT, NULL, 0, 0) != 0) {
+	if (mbind(mmap_addr + pagesize * index, pagesize * len,
+		  MPOL_DEFAULT, NULL, 0, 0) != 0) {
 		if (errno != ENOSYS)
-			tst_brkm(TBROK|TERRNO, cleanup, "mbind: unbind");
+			tst_brkm(TBROK | TERRNO, cleanup, "mbind: unbind");
 		else
 			tst_brkm(TCONF, cleanup,
-				    "mbind syscall not implemented "
-				    "on this system.");
+				 "mbind syscall not implemented "
+				 "on this system.");
 	}
 }
 
@@ -193,7 +194,7 @@
 		tst_resm(TPASS, "%s: passed.", name);
 	else
 		tst_resm(TFAIL, "%s: failed. expect '%s', actual '%s'",
-			    name, expected, value);
+			 name, expected, value);
 }
 
 static void get_vmas(char *retbuf, void *addr_s, void *addr_e)
@@ -201,22 +202,22 @@
 	FILE *fp;
 	void *s, *t;
 	char buf[BUFSIZ], tmpstr[BUFSIZ];
-	int  flag;
+	int flag;
 
 	retbuf[0] = '\0';
 	flag = 0;
 	fp = fopen("/proc/self/maps", "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 	while (fgets(buf, BUFSIZ, fp) != NULL) {
 		if (sscanf(buf, "%p-%p ", &s, &t) != 2)
 			continue;
 		if (addr_s <= s && s < addr_e) {
 			if (!flag) {
-				sprintf(tmpstr, "%ld", (t-s)/pagesize);
+				sprintf(tmpstr, "%ld", (t - s) / pagesize);
 				flag = 1;
 			} else {
-				sprintf(tmpstr, ",%ld", (t-s)/pagesize);
+				sprintf(tmpstr, ",%ld", (t - s) / pagesize);
 			}
 			strncat(retbuf, tmpstr, 32);
 		}
@@ -236,7 +237,7 @@
 	init();
 	mem_bind(0, 4);
 	mem_unbind(2, 2);
-	get_vmas(retbuf, mmap_addr, mmap_addr+pagesize*6);
+	get_vmas(retbuf, mmap_addr, mmap_addr + pagesize * 6);
 	assertion("2,4", retbuf, "case4");
 	fin();
 }
@@ -253,7 +254,7 @@
 	init();
 	mem_bind(0, 2);
 	mem_bind(2, 2);
-	get_vmas(retbuf, mmap_addr, mmap_addr+pagesize*6);
+	get_vmas(retbuf, mmap_addr, mmap_addr + pagesize * 6);
 	assertion("4,2", retbuf, "case5");
 	fin();
 }
@@ -270,7 +271,7 @@
 	mem_bind(0, 2);
 	mem_bind(4, 2);
 	mem_bind(2, 2);
-	get_vmas(retbuf, mmap_addr, mmap_addr+pagesize*6);
+	get_vmas(retbuf, mmap_addr, mmap_addr + pagesize * 6);
 	assertion("6", retbuf, "case6");
 	fin();
 }
@@ -287,7 +288,7 @@
 	mem_bind(0, 2);
 	mem_interleave(4, 2);
 	mem_bind(2, 2);
-	get_vmas(retbuf, mmap_addr, mmap_addr+pagesize*6);
+	get_vmas(retbuf, mmap_addr, mmap_addr + pagesize * 6);
 	assertion("4,2", retbuf, "case7");
 	fin();
 }
@@ -304,7 +305,7 @@
 	mem_bind(0, 2);
 	mem_interleave(4, 2);
 	mem_interleave(2, 2);
-	get_vmas(retbuf, mmap_addr, mmap_addr+pagesize*6);
+	get_vmas(retbuf, mmap_addr, mmap_addr + pagesize * 6);
 	assertion("2,4", retbuf, "case8");
 	fin();
 }
diff --git a/testcases/kernel/mem/vmtests/data_space.c b/testcases/kernel/mem/vmtests/data_space.c
index deb61f8..06144c1 100644
--- a/testcases/kernel/mem/vmtests/data_space.c
+++ b/testcases/kernel/mem/vmtests/data_space.c
@@ -53,12 +53,12 @@
 int local_flag = PASSED;
 int block_number;
 
-char *TCID="data_space";              /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "data_space";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
 #define MAXCHILD	100	/* max number of children to allow */
-int allchild[MAXCHILD +1];
+int allchild[MAXCHILD + 1];
 #define K_1		1024
 #define K_2		2048
 #define K_4		4096
@@ -67,24 +67,24 @@
 	tst_brkm(TCONF, NULL, \
 	    "bad argument - %s - could not parse as number.", str)
 
-int	nchild;				/* # kids */
-int	csize;				/* chunk size */
-int	iterations;			/* # total iterations */
-int	rep_freq;			/* report frequency */
-int	max_size;			/* max file size */
-int	parent_pid;
+int nchild;			/* # kids */
+int csize;			/* chunk size */
+int iterations;			/* # total iterations */
+int rep_freq;			/* report frequency */
+int max_size;			/* max file size */
+int parent_pid;
 
-int     usage(char*);
-int 	runtest();
-int	dotest(int,int);
-void    bfill(char*,char,int);
-int     dumpbuf(char*);
-void    dumpbits(char*,int);
-int     massmurder();
-int	okexit(int);
+int usage(char *);
+int runtest();
+int dotest(int, int);
+void bfill(char *, char, int);
+int dumpbuf(char *);
+void dumpbits(char *, int);
+int massmurder();
+int okexit(int);
 
-char	*prog;				/* invoked name */
-int	chld_flag = 0;
+char *prog;			/* invoked name */
+int chld_flag = 0;
 
 void cleanup(void)
 {
@@ -92,57 +92,55 @@
 }
 
 int usage(prog)
-	char	*prog;
+char *prog;
 {
-	tst_resm(TCONF,"Usage: %s <nchild> <size> <chunk_size> <iterations>",prog);
-	tst_resm(TCONF,"DEFAULTS: 10 1024*1024 4096 25");
+	tst_resm(TCONF, "Usage: %s <nchild> <size> <chunk_size> <iterations>",
+		 prog);
+	tst_resm(TCONF, "DEFAULTS: 10 1024*1024 4096 25");
 	tst_exit();
 	return 0;
 }
 
 int main(argc, argv)
-	int	argc;
-	char	*argv[];
+int argc;
+char *argv[];
 {
-	int i =1;
+	int i = 1;
 	int term();
 	int chld();
 
 	prog = argv[0];
 
-	if (argc == 1)
-	{
+	if (argc == 1) {
 		nchild = 10;
 		max_size = K_1 * K_1;
 		csize = K_4;
 		iterations = 25;
-	} else if (argc == 5)
-	{
+	} else if (argc == 5) {
 		if (sscanf(argv[i++], "%d", &nchild) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &max_size) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &csize) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (sscanf(argv[i++], "%d", &iterations) != 1)
-			bd_arg(argv[i-1]);
-		if (nchild > MAXCHILD)
-		{
-			tst_brkm(TBROK, NULL, "FAILURE, %d children exceeded maximum allowed", nchild);
+			bd_arg(argv[i - 1]);
+		if (nchild > MAXCHILD) {
+			tst_brkm(TBROK, NULL,
+				 "FAILURE, %d children exceeded maximum allowed",
+				 nchild);
 		}
 	} else
 		usage(prog);
 
-        tst_tmpdir();
+	tst_tmpdir();
 
 	parent_pid = getpid();
 
-	if (sigset(SIGTERM, (void (*)())term) == SIG_ERR)
-	{
+	if (sigset(SIGTERM, (void (*)())term) == SIG_ERR) {
 		tst_brkm(TBROK, NULL, "first sigset failed");
 	}
-	if (sigset(SIGUSR1, (void (*)())chld) == SIG_ERR)
-	{
+	if (sigset(SIGUSR1, (void (*)())chld) == SIG_ERR) {
 		tst_brkm(TBROK, NULL, "sigset shichld");
 	}
 
@@ -153,21 +151,20 @@
 int runtest()
 {
 	register int i;
-	int	child;
-	int	status;
-	int	count;
+	int child;
+	int status;
+	int count;
 
-	for (i = 0; i < nchild; i++)
-	{
+	for (i = 0; i < nchild; i++) {
 		chld_flag = 0;
 		switch (child = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 		case 0:
 			dotest(nchild, i);
 			exit(0);
 		}
-		allchild[i]=child;
+		allchild[i] = child;
 		while (!chld_flag)
 			sleep(1);
 	}
@@ -177,13 +174,12 @@
 	 */
 
 	count = 0;
-	while ((child = wait(&status)) > 0)
-	{
+	while ((child = wait(&status)) > 0) {
 #ifdef DEBUG
-		tst_resm(TINFO, "\t%s[%d] exited status = 0x%x\n", prog, child, status);
+		tst_resm(TINFO, "\t%s[%d] exited status = 0x%x\n", prog, child,
+			 status);
 #endif
-		if (status)
-		{
+		if (status) {
 			tst_resm(TFAIL, "\tTest failed, expected 0 exit.\n");
 			local_flag = FAILED;
 		}
@@ -194,9 +190,9 @@
 	 * Should have collected all children.
 	 */
 
-	if (count != nchild)
-	{
-		tst_resm(TFAIL, "\tWrong # children waited on, count = %d\n", count);
+	if (count != nchild) {
+		tst_resm(TFAIL, "\tWrong # children waited on, count = %d\n",
+			 count);
 		local_flag = FAILED;
 	}
 
@@ -204,7 +200,7 @@
 		tst_resm(TFAIL, "Test failed");
 	else
 		tst_resm(TPASS, "Test passed");
-	sync();				/* safeness */
+	sync();			/* safeness */
 
 	return 0;
 }
@@ -218,23 +214,23 @@
  *
  */
 
-int	nchunks;
+int nchunks;
 
 #define	CHUNK(i)	((i) * csize)
 
 int dotest(testers, me)
-	int	testers;
-	int	me;
+int testers;
+int me;
 {
-	char	*bits;
-	char	*mondobuf;
-	char	*val_buf;
-	char	*zero_buf;
-	char	*buf;
-	int	count;
-	int	collide;
-	char	val;
-	int	chunk;
+	char *bits;
+	char *mondobuf;
+	char *val_buf;
+	char *zero_buf;
+	char *buf;
+	int count;
+	int collide;
+	char val;
+	int chunk;
 
 	/*
 	 * Do the mondo-test.
@@ -247,18 +243,18 @@
 	 */
 
 	nchunks = max_size / csize;
-	bits = (char*)malloc((nchunks+7)/8);
-		if (bits == 0)
-			okexit(me);
-	val_buf = (char*)(malloc(csize));
-		if (val_buf == 0)
-			okexit(me);
-	zero_buf = (char*)(malloc(csize));
-		if (zero_buf == 0)
-			okexit(me);
-	mondobuf = (char*)malloc(max_size);
-		if (mondobuf == 0)
-			okexit(me);
+	bits = (char *)malloc((nchunks + 7) / 8);
+	if (bits == 0)
+		okexit(me);
+	val_buf = (char *)(malloc(csize));
+	if (val_buf == 0)
+		okexit(me);
+	zero_buf = (char *)(malloc(csize));
+	if (zero_buf == 0)
+		okexit(me);
+	mondobuf = (char *)malloc(max_size);
+	if (mondobuf == 0)
+		okexit(me);
 
 	kill(parent_pid, SIGUSR1);
 
@@ -266,36 +262,34 @@
 	 * No init sectors; allow file to be sparse.
 	 */
 
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
-	 *	Fill-in those chunks not yet seen.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
+	 *      Fill-in those chunks not yet seen.
 	 */
 
 	bfill(zero_buf, 0, csize);
 	bfill(mondobuf, 0, max_size);
 
 	srand(getpid());
-	while (iterations-- > 0)
-	{
-		bfill(bits, 0, (nchunks+7)/8);
+	while (iterations-- > 0) {
+		bfill(bits, 0, (nchunks + 7) / 8);
 		bfill(val_buf, val, csize);
 		count = 0;
 		collide = 0;
-		while (count < nchunks)
-		{
+		while (count < nchunks) {
 			chunk = rand() % nchunks;
 			buf = mondobuf + CHUNK(chunk);
 
@@ -304,31 +298,35 @@
 			 * Else, have.  Verify values.
 			 */
 
-			if ((bits[chunk/8] & (1<<(chunk%8))) == 0)
-			{
-				if (memcmp(buf, zero_buf, csize))
-				{
-					tst_resm(TFAIL, "\t%s[%d] bad verify @ %d (%p) for val %d count %d, should be 0x%x.\n",
-						prog, me, chunk, buf, val, count, val - 1);
-					tst_resm(TINFO, "\tPrev "); dumpbuf(buf-csize);
+			if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
+				if (memcmp(buf, zero_buf, csize)) {
+					tst_resm(TFAIL,
+						 "\t%s[%d] bad verify @ %d (%p) for val %d count %d, should be 0x%x.\n",
+						 prog, me, chunk, buf, val,
+						 count, val - 1);
+					tst_resm(TINFO, "\tPrev ");
+					dumpbuf(buf - csize);
 					dumpbuf(buf);
-					tst_resm(TINFO, "\tNext "); dumpbuf(buf+csize);
-					dumpbits(bits, (nchunks+7)/8);
+					tst_resm(TINFO, "\tNext ");
+					dumpbuf(buf + csize);
+					dumpbits(bits, (nchunks + 7) / 8);
 					tst_exit();
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
-			} else
-			{
+			} else {
 				++collide;
-				if (memcmp(buf, val_buf, csize))
-				{
-					tst_resm(TFAIL, "\t%s[%d] bad verify @ %d (%p) for val %d count %d.\n",
-						prog, me, chunk, buf, val, count);
-					tst_resm(TINFO, "\tPrev "); dumpbuf(buf-csize);
+				if (memcmp(buf, val_buf, csize)) {
+					tst_resm(TFAIL,
+						 "\t%s[%d] bad verify @ %d (%p) for val %d count %d.\n",
+						 prog, me, chunk, buf, val,
+						 count);
+					tst_resm(TINFO, "\tPrev ");
+					dumpbuf(buf - csize);
 					dumpbuf(buf);
-					tst_resm(TINFO, "\tNext "); dumpbuf(buf+csize);
-					dumpbits(bits, (nchunks+7)/8);
+					tst_resm(TINFO, "\tNext ");
+					dumpbuf(buf + csize);
+					dumpbits(bits, (nchunks + 7) / 8);
 					tst_exit();
 				}
 			}
@@ -347,25 +345,25 @@
 		 * End of iteration, maybe before doing all chunks.
 		 */
 #ifdef DEBUG
-		tst_resm(TINFO, "\t%s[%d] val %d done, count = %d, collide = %d.\n",
-				prog, me, val, count, collide);
+		tst_resm(TINFO,
+			 "\t%s[%d] val %d done, count = %d, collide = %d.\n",
+			 prog, me, val, count, collide);
 #endif
-		for (chunk = 0; chunk < nchunks; chunk++)
-		{
-			if ((bits[chunk/8] & (1<<(chunk%8))) == 0)
-				bfill(mondobuf+CHUNK(chunk), val, csize);
+		for (chunk = 0; chunk < nchunks; chunk++) {
+			if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0)
+				bfill(mondobuf + CHUNK(chunk), val, csize);
 		}
 		bfill(zero_buf, val, csize);
 		++val;
 	}
 
-        return 0;
+	return 0;
 }
 
 void bfill(buf, val, size)
-	register char *buf;
-	char	val;
-	register int size;
+register char *buf;
+char val;
+register int size;
 {
 	register int i;
 
@@ -379,38 +377,37 @@
  */
 
 int dumpbuf(buf)
-	register char *buf;
+register char *buf;
 {
 	register int i;
-	char	val;
-	int	idx;
-	int	nout;
+	char val;
+	int idx;
+	int nout;
 
 #ifdef DEBUG
 	tst_resm(TINFO, "Buf: ... ");
-	for (i = -10; i < 0; i++) tst_resm(TINFO, "%x, ", buf[i]);
+	for (i = -10; i < 0; i++)
+		tst_resm(TINFO, "%x, ", buf[i]);
 	tst_resm(TINFO, "\n");
 #endif
 
 	nout = 0;
 	idx = 0;
 	val = buf[0];
-	for (i = 0; i < csize; i++)
-	{
-		if (buf[i] != val)
-		{
+	for (i = 0; i < csize; i++) {
+		if (buf[i] != val) {
 #ifdef DEBUG
-			if (i == idx+1)
+			if (i == idx + 1)
 				tst_resm(TINFO, "%x, ", buf[idx] & 0xff);
 			else
-				tst_resm(TINFO, "%d*%x, ", i-idx, buf[idx] & 0xff);
+				tst_resm(TINFO, "%d*%x, ", i - idx,
+					 buf[idx] & 0xff);
 #endif
 			idx = i;
 			val = buf[i];
 			++nout;
 		}
-		if (nout > 10)
-		{
+		if (nout > 10) {
 #ifdef DEBUG
 			tst_resm(TINFO, " ... more\n");
 #endif
@@ -418,10 +415,10 @@
 		}
 	}
 #ifdef DEBUG
-	if (i == idx+1)
+	if (i == idx + 1)
 		tst_resm(TINFO, "%x\n", buf[idx] & 0xff);
 	else
-		tst_resm(TINFO, "%d*%x\n", i-idx, buf[idx]);
+		tst_resm(TINFO, "%d*%x\n", i - idx, buf[idx]);
 #endif
 	return 0;
 }
@@ -432,17 +429,16 @@
  */
 
 void dumpbits(bits, size)
-	char	*bits;
-	register int size;
+char *bits;
+register int size;
 {
 #ifdef DEBUG
 	register char *buf;
 
 	tst_resm(TINFO, "Bits array:");
-	for (buf = bits; size > 0; --size, ++buf)
-	{
-		if ((buf-bits) % 16 == 0)
-			tst_resm(TINFO, "\n%04x:\t", 8*(buf-bits));
+	for (buf = bits; size > 0; --size, ++buf) {
+		if ((buf - bits) % 16 == 0)
+			tst_resm(TINFO, "\n%04x:\t", 8 * (buf - bits));
 		tst_resm(TINFO, "%02x ", (int)*buf & 0xff);
 	}
 	tst_resm(TINFO, "\n");
@@ -460,8 +456,7 @@
 	tst_resm(TINFO, "\tterm -[%d]- got sig term.\n", getpid());
 #endif
 
-	if (parent_pid == getpid())
-	{
+	if (parent_pid == getpid()) {
 		massmurder();
 		return 0;
 	}
@@ -471,21 +466,19 @@
 
 int chld()
 {
-	if (sigset(SIGUSR1, (void (*)())chld) == SIG_ERR)
-	{
-		tst_resm(TBROK,"sigset shichld");
+	if (sigset(SIGUSR1, (void (*)())chld) == SIG_ERR) {
+		tst_resm(TBROK, "sigset shichld");
 		exit(1);
 	}
 	chld_flag++;
 	return 0;
 }
+
 int massmurder()
 {
 	int i;
-	for (i = 0 ; i < MAXCHILD ; i++)
-	{
-		if (allchild[i])
-		{
+	for (i = 0; i < MAXCHILD; i++) {
+		if (allchild[i]) {
 			kill(allchild[i], SIGTERM);
 		}
 	}
@@ -493,19 +486,18 @@
 }
 
 int okexit(me)
-        int me;
+int me;
 {
-        kill(parent_pid, SIGUSR1);
-        tst_resm(TINFO, "\tChild [%d] - cannot malloc buffer - exiting.\n", me);
-        if (me)
-        {
-                tst_resm(TINFO, "\tThis is ok - probably swap space limit.\n");
-                tst_exit();
-        } else
-        {
-                tst_resm(TBROK,"\tThis is not ok for first child - check parameters.\n");
-                tst_exit();
-        }
+	kill(parent_pid, SIGUSR1);
+	tst_resm(TINFO, "\tChild [%d] - cannot malloc buffer - exiting.\n", me);
+	if (me) {
+		tst_resm(TINFO, "\tThis is ok - probably swap space limit.\n");
+		tst_exit();
+	} else {
+		tst_resm(TBROK,
+			 "\tThis is not ok for first child - check parameters.\n");
+		tst_exit();
+	}
 
 	return 0;
 }
diff --git a/testcases/kernel/mem/vmtests/stack_space.c b/testcases/kernel/mem/vmtests/stack_space.c
index a3c6191..8b3aee5 100644
--- a/testcases/kernel/mem/vmtests/stack_space.c
+++ b/testcases/kernel/mem/vmtests/stack_space.c
@@ -48,52 +48,52 @@
 int local_flag = PASSED;
 int block_number;
 
-char *TCID="stack_space";              /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "stack_space";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
-#define MAXCHILD	100		/* max # kids */
+#define MAXCHILD	100	/* max # kids */
 #define K_1		1024
 #define K_2		2048
 #define K_4		4096
 #define MAXSIZE         10*K_1
 
-int	nchild;				/* # kids */
-int	csize;				/* chunk size */
-int	iterations;			/* # total iterations */
-int	parent_pid;
+int nchild;			/* # kids */
+int csize;			/* chunk size */
+int iterations;			/* # total iterations */
+int parent_pid;
 
-int     usage(char*);
-int     bd_arg(char *);
-int     runtest();
-int     dotest(int,int);
-int     bfill(char*,char,int);
-int     dumpbuf(char*);
-void    dumpbits(char*,int);
+int usage(char *);
+int bd_arg(char *);
+int runtest();
+int dotest(int, int);
+int bfill(char *, char, int);
+int dumpbuf(char *);
+void dumpbits(char *, int);
 
-char	*prog;				/* invoked name */
+char *prog;			/* invoked name */
 
-int usage(char* prog)
+int usage(char *prog)
 {
-	tst_resm(TCONF,"Usage: %s <nchild> <chunk_size> <iterations>",prog);
-        tst_resm(TCONF,"DEFAULTS: 20 1024 50");
-        tst_exit();
-      return 0;
+	tst_resm(TCONF, "Usage: %s <nchild> <chunk_size> <iterations>", prog);
+	tst_resm(TCONF, "DEFAULTS: 20 1024 50");
+	tst_exit();
+	return 0;
 }
 
 int main(argc, argv)
-	int	argc;
-	char	*argv[];
+int argc;
+char *argv[];
 {
 	register int i;
-	void	term();
+	void term();
 
 	prog = argv[0];
 	parent_pid = getpid();
 
-	if (signal(SIGTERM,term) == SIG_ERR) {
-		tst_resm(TBROK,"first sigset failed");
-                tst_exit();
+	if (signal(SIGTERM, term) == SIG_ERR) {
+		tst_resm(TBROK, "first sigset failed");
+		tst_exit();
 
 	}
 
@@ -104,55 +104,59 @@
 	} else if (argc == 4) {
 		i = 1;
 		if (sscanf(argv[i++], "%d", &nchild) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (nchild > MAXCHILD) {
-			tst_resm(TBROK,"Too many children, max is %d\n", MAXCHILD);
+			tst_resm(TBROK, "Too many children, max is %d\n",
+				 MAXCHILD);
 			tst_exit();
 		}
 		if (sscanf(argv[i++], "%d", &csize) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 		if (csize > MAXSIZE) {
-			tst_resm(TBROK,"Chunk size too large , max is %d\n", MAXSIZE);
+			tst_resm(TBROK, "Chunk size too large , max is %d\n",
+				 MAXSIZE);
 			tst_exit();
 		}
 		if (sscanf(argv[i++], "%d", &iterations) != 1)
-			bd_arg(argv[i-1]);
+			bd_arg(argv[i - 1]);
 	} else
 		usage(prog);
 
 	tst_tmpdir();
 	runtest();
 	/**NOT REACHED**/
-      return 0;
+	return 0;
 
 }
 
 int bd_arg(str)
-	char *str;
+char *str;
 {
-	tst_resm(TCONF,"Bad argument - %s - could not parse as number.\n", str);
-        tst_exit();
-      return 0;
+	tst_resm(TCONF, "Bad argument - %s - could not parse as number.\n",
+		 str);
+	tst_exit();
+	return 0;
 }
 
 int runtest()
 {
 	register int i;
-	int	child;
-	int	status;
-	int	count;
+	int child;
+	int status;
+	int count;
 
 	for (i = 0; i < nchild; i++) {
-		if ((child = fork()) == 0) {		/* child */
-			dotest(nchild, i);		/* do it! */
-			exit(0);			/* when done, exit */
+		if ((child = fork()) == 0) {	/* child */
+			dotest(nchild, i);	/* do it! */
+			exit(0);	/* when done, exit */
 		}
 		if (child < 0) {
-			tst_resm(TBROK,"Fork failed (may be OK if under stress)");
-                        tst_resm(TINFO, "System resource may be too low.\n");
-                        tst_resm(TBROK, "Reason: %s\n", strerror(errno));
-                        tst_rmdir();
-                        tst_exit();
+			tst_resm(TBROK,
+				 "Fork failed (may be OK if under stress)");
+			tst_resm(TINFO, "System resource may be too low.\n");
+			tst_resm(TBROK, "Reason: %s\n", strerror(errno));
+			tst_rmdir();
+			tst_exit();
 
 		}
 	}
@@ -164,7 +168,8 @@
 	count = 0;
 	while ((child = wait(&status)) > 0) {
 #ifdef DEBUG
-		tst_resm(TINFO, "\t%s[%d] exited status = 0x%x\n", prog, child, status);
+		tst_resm(TINFO, "\t%s[%d] exited status = 0x%x\n", prog, child,
+			 status);
 #endif
 		if (status) {
 			tst_resm(TINFO, "\tFailed - expected 0 exit status.\n");
@@ -178,18 +183,19 @@
 	 */
 
 	if (count != nchild) {
-		tst_resm(TINFO, "\tWrong # children waited on, count = %d\n", count);
+		tst_resm(TINFO, "\tWrong # children waited on, count = %d\n",
+			 count);
 		local_flag = FAILED;
 	}
 
-        (local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
-                : tst_resm(TPASS, "Test passed");
-        sync();                         /* safeness */
-        tst_rmdir();
-        tst_exit();
+	(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed")
+	    : tst_resm(TPASS, "Test passed");
+	sync();			/* safeness */
+	tst_rmdir();
+	tst_exit();
 
-        /**NOT REACHED**/
-      return 0;
+	/**NOT REACHED**/
+	return 0;
 
 }
 
@@ -201,29 +207,29 @@
  * When fill sectors, iterate.
  */
 
-int	nchunks;
+int nchunks;
 
 #define	CHUNK(i)	((i) * csize)
 
 int dotest(int testers, int me)
 {
-	char	*bits;
-	char	*val_buf;
-	char	*zero_buf;
-	char	*buf;
-	int	count;
-	int	collide;
-	char	val;
-	int	chunk;
-	char	mondobuf[MAXSIZE];
+	char *bits;
+	char *val_buf;
+	char *zero_buf;
+	char *buf;
+	int count;
+	int collide;
+	char val;
+	int chunk;
+	char mondobuf[MAXSIZE];
 
 	nchunks = MAXSIZE / csize;
-	bits = (char*)malloc((nchunks+7)/8);
-	val_buf = (char*)(malloc(csize));
-	zero_buf = (char*)(malloc(csize));
+	bits = (char *)malloc((nchunks + 7) / 8);
+	val_buf = (char *)(malloc(csize));
+	zero_buf = (char *)(malloc(csize));
 
 	if (bits == 0 || val_buf == 0 || zero_buf == 0) {
-		tst_resm(TFAIL, "\tmalloc failed, pid: %d\n",getpid());
+		tst_resm(TFAIL, "\tmalloc failed, pid: %d\n", getpid());
 		tst_exit();
 	}
 
@@ -231,22 +237,22 @@
 	 * No init sectors; allow file to be sparse.
 	 */
 
-	val = (64/testers) * me + 1;
+	val = (64 / testers) * me + 1;
 
 	/*
 	 * For each iteration:
-	 *	zap bits array
-	 *	loop:
-	 *		pick random chunk.
-	 *		if corresponding bit off {
-	 *			verify == 0. (sparse file)
-	 *			++count;
-	 *		} else
-	 *			verify == val.
-	 *		write "val" on it.
-	 *		repeat until count = nchunks.
-	 *	++val.
-	 *	Fill-in those chunks not yet seen.
+	 *      zap bits array
+	 *      loop:
+	 *              pick random chunk.
+	 *              if corresponding bit off {
+	 *                      verify == 0. (sparse file)
+	 *                      ++count;
+	 *              } else
+	 *                      verify == val.
+	 *              write "val" on it.
+	 *              repeat until count = nchunks.
+	 *      ++val.
+	 *      Fill-in those chunks not yet seen.
 	 */
 
 	bfill(zero_buf, 0, csize);
@@ -254,7 +260,7 @@
 
 	srand(getpid());
 	while (iterations-- > 0) {
-		bfill(bits, 0, (nchunks+7)/8);
+		bfill(bits, 0, (nchunks + 7) / 8);
 		bfill(val_buf, val, csize);
 		count = 0;
 		collide = 0;
@@ -267,27 +273,35 @@
 			 * Else, have.  Verify values.
 			 */
 
-			if ((bits[chunk/8] & (1<<(chunk%8))) == 0) {
+			if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0) {
 				if (memcmp(buf, zero_buf, csize)) {
-					tst_resm(TFAIL,"%s[%d] bad verify @ %d (%p) for val %d count %d, should be 0.\n",
-						prog, me, chunk, buf, val, count);
-					tst_resm(TINFO,"Prev "); dumpbuf(buf-csize);
+					tst_resm(TFAIL,
+						 "%s[%d] bad verify @ %d (%p) for val %d count %d, should be 0.\n",
+						 prog, me, chunk, buf, val,
+						 count);
+					tst_resm(TINFO, "Prev ");
+					dumpbuf(buf - csize);
 					dumpbuf(buf);
-					tst_resm(TINFO,"Next "); dumpbuf(buf+csize);
-					dumpbits(bits, (nchunks+7)/8);
+					tst_resm(TINFO, "Next ");
+					dumpbuf(buf + csize);
+					dumpbits(bits, (nchunks + 7) / 8);
 					tst_exit();
 				}
-				bits[chunk/8] |= (1<<(chunk%8));
+				bits[chunk / 8] |= (1 << (chunk % 8));
 				++count;
 			} else {
 				++collide;
 				if (memcmp(buf, val_buf, csize)) {
-					tst_resm(TFAIL,"%s[%d] bad verify @ %d (%p) for val %d count %d.\n",
-						prog, me, chunk, buf, val, count);
-					tst_resm(TINFO,"Prev "); dumpbuf(buf-csize);
+					tst_resm(TFAIL,
+						 "%s[%d] bad verify @ %d (%p) for val %d count %d.\n",
+						 prog, me, chunk, buf, val,
+						 count);
+					tst_resm(TINFO, "Prev ");
+					dumpbuf(buf - csize);
 					dumpbuf(buf);
-					tst_resm(TINFO,"Next "); dumpbuf(buf+csize);
-					dumpbits(bits, (nchunks+7)/8);
+					tst_resm(TINFO, "Next ");
+					dumpbuf(buf + csize);
+					dumpbits(bits, (nchunks + 7) / 8);
 					tst_exit();
 				}
 			}
@@ -307,8 +321,8 @@
 		 */
 
 		for (chunk = 0; chunk < nchunks; chunk++) {
-			if ((bits[chunk/8] & (1<<(chunk%8))) == 0)
-				bfill(mondobuf+CHUNK(chunk), val, csize);
+			if ((bits[chunk / 8] & (1 << (chunk % 8))) == 0)
+				bfill(mondobuf + CHUNK(chunk), val, csize);
 		}
 		bfill(zero_buf, val, csize);
 		++val;
@@ -321,9 +335,9 @@
 }
 
 int bfill(buf, val, size)
-	register char *buf;
-	char	val;
-	register int size;
+register char *buf;
+char val;
+register int size;
 {
 	register int i;
 
@@ -338,51 +352,50 @@
  */
 
 int dumpbuf(buf)
-	register char *buf;
+register char *buf;
 {
 	register int i;
-	char	val;
-	int	idx;
-	int	nout;
+	char val;
+	int idx;
+	int nout;
 
 #ifdef DEBUG
-        tst_resm(TINFO, "Buf: ... ");
-        for (i = -10; i < 0; i++) tst_resm(TINFO, "%x, ", buf[i]);
-        tst_resm(TINFO, "\n");
+	tst_resm(TINFO, "Buf: ... ");
+	for (i = -10; i < 0; i++)
+		tst_resm(TINFO, "%x, ", buf[i]);
+	tst_resm(TINFO, "\n");
 #endif
 
-        nout = 0;
-        idx = 0;
-        val = buf[0];
-        for (i = 0; i < csize; i++)
-        {
-                if (buf[i] != val)
-                {
+	nout = 0;
+	idx = 0;
+	val = buf[0];
+	for (i = 0; i < csize; i++) {
+		if (buf[i] != val) {
 #ifdef DEBUG
-                        if (i == idx+1)
-                                tst_resm(TINFO, "%x, ", buf[idx] & 0xff);
-                        else
-                                tst_resm(TINFO, "%d*%x, ", i-idx, buf[idx] & 0xff);
+			if (i == idx + 1)
+				tst_resm(TINFO, "%x, ", buf[idx] & 0xff);
+			else
+				tst_resm(TINFO, "%d*%x, ", i - idx,
+					 buf[idx] & 0xff);
 #endif
-                        idx = i;
-                        val = buf[i];
-                        ++nout;
-                }
-                if (nout > 10)
-                {
+			idx = i;
+			val = buf[i];
+			++nout;
+		}
+		if (nout > 10) {
 #ifdef DEBUG
-                        tst_resm(TINFO, " ... more\n");
+			tst_resm(TINFO, " ... more\n");
 #endif
-                      return 0;
-                }
-        }
+			return 0;
+		}
+	}
 #ifdef DEBUG
-        if (i == idx+1)
-                tst_resm(TINFO, "%x\n", buf[idx] & 0xff);
-        else
-                tst_resm(TINFO, "%d*%x\n", i-idx, buf[idx]);
+	if (i == idx + 1)
+		tst_resm(TINFO, "%x\n", buf[idx] & 0xff);
+	else
+		tst_resm(TINFO, "%d*%x\n", i - idx, buf[idx]);
 #endif
-      return 0;
+	return 0;
 
 }
 
@@ -392,20 +405,19 @@
  */
 
 void dumpbits(bits, size)
-	char	*bits;
-	register int size;
+char *bits;
+register int size;
 {
 #ifdef DEBUG
-        register char *buf;
+	register char *buf;
 
-        tst_resm(TINFO, "Bits array:");
-        for (buf = bits; size > 0; --size, ++buf)
-        {
-                if ((buf-bits) % 16 == 0)
-                        tst_resm(TINFO, "\n%04x:\t", 8*(buf-bits));
-                tst_resm(TINFO, "%02x ", (int)*buf & 0xff);
-        }
-        tst_resm(TINFO, "\n");
+	tst_resm(TINFO, "Bits array:");
+	for (buf = bits; size > 0; --size, ++buf) {
+		if ((buf - bits) % 16 == 0)
+			tst_resm(TINFO, "\n%04x:\t", 8 * (buf - bits));
+		tst_resm(TINFO, "%02x ", (int)*buf & 0xff);
+	}
+	tst_resm(TINFO, "\n");
 #endif
 
 }
@@ -415,11 +427,11 @@
 
 	if (getpid() == parent_pid) {
 #ifdef DEBUG
-		tst_resm(TINFO,"term - parent - got SIGTERM.\n");
+		tst_resm(TINFO, "term - parent - got SIGTERM.\n");
 #endif
 	} else {
 #ifdef DEBUG
-		tst_resm(TINFO,"term1 - child - exiting\n");
+		tst_resm(TINFO, "term1 - child - exiting\n");
 #endif
 		exit(0);
 	}
diff --git a/testcases/kernel/mem/zram/zram01.c b/testcases/kernel/mem/zram/zram01.c
index 68e32f0..633ea99 100644
--- a/testcases/kernel/mem/zram/zram01.c
+++ b/testcases/kernel/mem/zram/zram01.c
@@ -87,12 +87,12 @@
 	tst_resm(TINFO, "create a zram device with %ld bytes in size.", SIZE);
 	fd = open(PATH_ZRAM "/disksize", O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s",
-				PATH_ZRAM "/disksize");
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s",
+			 PATH_ZRAM "/disksize");
 	sprintf(size, "%ld", SIZE);
 	if (write(fd, size, strlen(size)) != strlen(size))
-		tst_brkm(TBROK|TERRNO, cleanup, "write %s to %s", size,
-				PATH_ZRAM "/disksize");
+		tst_brkm(TBROK | TERRNO, cleanup, "write %s to %s", size,
+			 PATH_ZRAM "/disksize");
 	close(fd);
 }
 
@@ -104,17 +104,17 @@
 	tst_resm(TINFO, "map it into memory.");
 	fd = open(DEVICE, O_RDWR);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s", DEVICE);
-	s = mmap(NULL, SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s", DEVICE);
+	s = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	if (s == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 
 	tst_resm(TINFO, "write all the memory.");
-	memset(s, 'a', SIZE-1);
-	s[SIZE-1] = '\0';
+	memset(s, 'a', SIZE - 1);
+	s[SIZE - 1] = '\0';
 
 	if (munmap(s, SIZE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "munmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "munmap");
 
 	close(fd);
 }
@@ -128,10 +128,10 @@
 	tst_resm(TINFO, "verify contents from device.");
 	fd = open(DEVICE, O_RDONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s", DEVICE);
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s", DEVICE);
 	s = mmap(NULL, SIZE, PROT_READ, MAP_PRIVATE, fd, 0);
 	if (s == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "2nd mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "2nd mmap");
 
 	i = 0;
 	fail = 0;
@@ -140,15 +140,15 @@
 			fail++;
 		i++;
 	}
-	if (i != SIZE-1)
+	if (i != SIZE - 1)
 		tst_resm(TFAIL, "expect size: %ld, actual size: %ld.",
-				SIZE-1, i);
+			 SIZE - 1, i);
 	else if (s[i] != '\0')
 		tst_resm(TFAIL, "zram device seems not null terminated");
 	if (fail)
 		tst_resm(TFAIL, "%ld failed bytes found.", fail);
 	if (munmap(s, SIZE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "2nd munmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "2nd munmap");
 
 	close(fd);
 }
@@ -160,11 +160,11 @@
 	tst_resm(TINFO, "reset it.");
 	fd = open(PATH_ZRAM "/reset", O_WRONLY);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open %s",
-				PATH_ZRAM "/reset");
+		tst_brkm(TBROK | TERRNO, cleanup, "open %s",
+			 PATH_ZRAM "/reset");
 	if (write(fd, "1", 1) != 1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write 1 to %s",
-				PATH_ZRAM "/reset");
+		tst_brkm(TBROK | TERRNO, cleanup, "write 1 to %s",
+			 PATH_ZRAM "/reset");
 	close(fd);
 }
 
@@ -175,17 +175,17 @@
 	tst_require_root(NULL);
 
 retry:
-	if (access(PATH_ZRAM, R_OK|W_OK|X_OK) == -1) {
+	if (access(PATH_ZRAM, R_OK | W_OK | X_OK) == -1) {
 		if (errno == ENOENT) {
 			if (retried)
 				tst_brkm(TCONF, NULL,
-					"system has no zram device.");
+					 "system has no zram device.");
 			system("modprobe zram");
 			modprobe = 1;
-			retried  = 1;
+			retried = 1;
 			goto retry;
 		} else
-			tst_brkm(TBROK|TERRNO, NULL, "access");
+			tst_brkm(TBROK | TERRNO, NULL, "access");
 	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -208,10 +208,10 @@
 	sprintf(buf, "%s/%s", PATH_ZRAM, string);
 	fp = fopen(buf, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fopen %s", buf);
+		tst_brkm(TBROK | TERRNO, cleanup, "fopen %s", buf);
 
 	if (fgets(value, BUFSIZ, fp) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "fgets %s", buf);
+		tst_brkm(TBROK | TERRNO, cleanup, "fgets %s", buf);
 	value[strlen(value) - 1] = '\0';
 	fclose(fp);
 
diff --git a/testcases/kernel/module/create_module/create_module01.c b/testcases/kernel/module/create_module/create_module01.c
index ba63ea4..132a131 100644
--- a/testcases/kernel/module/create_module/create_module01.c
+++ b/testcases/kernel/module/create_module/create_module01.c
@@ -70,7 +70,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 #define MODSIZE 10000		/* Arbitrarily selected MODSIZE */
 #define BASEMODNAME "dummy"
 
@@ -78,17 +77,15 @@
 static void cleanup(void);
 
 char *TCID = "create_module01";	/* Test program identifier.    */
-int TST_TOTAL=1;		/* Total number of test cases. */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 static char modname[20];	/* Name of the module */
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-			(char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -100,19 +97,19 @@
 		Tst_count = 0;
 
 		/* Test the system call */
-		TEST(create_module(modname,MODSIZE));
+		TEST(create_module(modname, MODSIZE));
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			tst_resm(TFAIL, "create_module() failed errno=%d : %s",
-				TEST_ERRNO, strerror(TEST_ERRNO));
+				 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
 			tst_resm(TPASS, "create_module() returned 0x%x",
-				TEST_RETURN);
+				 TEST_RETURN);
 			if (delete_module(modname) != 0) {
 				tst_brkm(TBROK, NULL, "Failed to delete"
-					"loadable module entry for %s",
-					modname);
+					 "loadable module entry for %s",
+					 modname);
 			}
 		}
 	}
@@ -123,17 +120,16 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	tst_require_root(NULL);
 
-	if (tst_kvercmp(2,5,48) >= 0)
+	if (tst_kvercmp(2, 5, 48) >= 0)
 		tst_brkm(TCONF, NULL, "This test will not work on "
-				"kernels after 2.5.48");
+			 "kernels after 2.5.48");
 
 	/* Pause if that option was specified
 	 * TEST_PAUSE contains the code to fork the test with the -c option.
@@ -141,7 +137,7 @@
 	TEST_PAUSE;
 
 	/* Initialize unique module name for each child process */
-	if (sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
+	if (sprintf(modname, "%s_%d", BASEMODNAME, getpid()) == -1) {
 		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
 }
@@ -151,8 +147,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * If module entry is not removed (possible if create_module()
@@ -163,8 +158,8 @@
 		/* With errno, check module exists, if so send msg */
 		if (errno != ENOENT) {
 			tst_resm(TWARN, "Failed to delete loadable module"
-				"entry for %s errno returned %d", modname,
-				errno);
+				 "entry for %s errno returned %d", modname,
+				 errno);
 		}
 	}
 
diff --git a/testcases/kernel/module/create_module/create_module02.c b/testcases/kernel/module/create_module/create_module02.c
index 0274c7c..b97e18d 100644
--- a/testcases/kernel/module/create_module/create_module02.c
+++ b/testcases/kernel/module/create_module/create_module02.c
@@ -97,32 +97,32 @@
 #define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
 #endif
 
-
-#define MODSIZE 10000			/* Arbitrarily selected MODSIZE */
+#define MODSIZE 10000		/* Arbitrarily selected MODSIZE */
 #define NULLMODNAME ""
 #define MAXMODSIZE  0xffffffffffffffff	/* Max size of size_t */
-#define SMALLMODSIZE  1			/* Arbitrarily selected SMALLMODSIZE */
+#define SMALLMODSIZE  1		/* Arbitrarily selected SMALLMODSIZE */
 #define BASEMODNAME "dummy"
-#define LONGMODNAMECHAR 'm'		/* Arbitrarily selected the alphabet */
+#define LONGMODNAMECHAR 'm'	/* Arbitrarily selected the alphabet */
 #define MODNAMEMAX (PAGE_SIZE + 1)
 
-struct test_case_t {			/* test case structure */
-	char 	*modname;
-	size_t  size;
-	caddr_t retval;			/* syscall return value */
-	int	experrno;		/* expected errno */
+struct test_case_t {		/* test case structure */
+	char *modname;
+	size_t size;
+	caddr_t retval;		/* syscall return value */
+	int experrno;		/* expected errno */
 	char *desc;
-	int	(*setup)(void);		/* Individual setup routine */
-	void	(*cleanup)(void);	/* Individual cleanup routine */
+	int (*setup) (void);	/* Individual setup routine */
+	void (*cleanup) (void);	/* Individual cleanup routine */
 };
 
 char *TCID = "create_module02";
-static int exp_enos[]={EFAULT, EPERM, EEXIST, EINVAL, ENOMEM, ENAMETOOLONG, 0};
+static int exp_enos[] =
+    { EFAULT, EPERM, EEXIST, EINVAL, ENOMEM, ENAMETOOLONG, 0 };
 static char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 static char longmodname[MODNAMEMAX];
 static int testno;
-static char modname[20];		/* Name of the module */
+static char modname[20];	/* Name of the module */
 
 static void setup(void);
 static void cleanup(void);
@@ -131,40 +131,39 @@
 static int setup2(void);
 static void cleanup2(void);
 
-static struct test_case_t  tdat[] = {
-	{ modname, MODSIZE, (caddr_t)-1, EPERM,
-		"non-superuser", setup1, cleanup1},
-	{ (char *)-1, MODSIZE, (caddr_t)-1, EFAULT,
-		"module name outside the  program's  accessible  address space",	 NULL, NULL},
-	{ NULL, MODSIZE, (caddr_t)-1, EFAULT,
-		"NULL module name", NULL, NULL},
-	{ NULLMODNAME, MODSIZE, (caddr_t)-1, EINVAL,
-		"null terminated module name", NULL, NULL},
-	{ modname, MODSIZE, (caddr_t)-1, EEXIST,
-		"already existing module", setup2, cleanup2},
-	{ modname, SMALLMODSIZE, (caddr_t)-1, EINVAL,
-		"insufficient module size", NULL, NULL},
-	{ longmodname, MODSIZE, (caddr_t)-1, ENAMETOOLONG,
-		"long module name", NULL, NULL},
+static struct test_case_t tdat[] = {
+	{modname, MODSIZE, (caddr_t) - 1, EPERM,
+	 "non-superuser", setup1, cleanup1},
+	{(char *)-1, MODSIZE, (caddr_t) - 1, EFAULT,
+	 "module name outside the  program's  accessible  address space", NULL,
+	 NULL},
+	{NULL, MODSIZE, (caddr_t) - 1, EFAULT,
+	 "NULL module name", NULL, NULL},
+	{NULLMODNAME, MODSIZE, (caddr_t) - 1, EINVAL,
+	 "null terminated module name", NULL, NULL},
+	{modname, MODSIZE, (caddr_t) - 1, EEXIST,
+	 "already existing module", setup2, cleanup2},
+	{modname, SMALLMODSIZE, (caddr_t) - 1, EINVAL,
+	 "insufficient module size", NULL, NULL},
+	{longmodname, MODSIZE, (caddr_t) - 1, ENAMETOOLONG,
+	 "long module name", NULL, NULL},
 
 	/*
 	 *This test case is giving segmentation fault on
 	 * 2.4.* series, but works as expected with 2.5.* series of kernel.
 	 */
-	{ modname, MAXMODSIZE, (caddr_t)-1, ENOMEM,
-		"large module size", NULL, NULL},
+	{modname, MAXMODSIZE, (caddr_t) - 1, ENOMEM,
+	 "large module size", NULL, NULL},
 };
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -181,19 +180,19 @@
 			}
 
 			TEST(create_module(tdat[testno].modname,
-				tdat[testno].size));
+					   tdat[testno].size));
 			TEST_ERROR_LOG(TEST_ERRNO);
-			if ((TEST_RETURN == (int) tdat[testno].retval) &&
-				(TEST_ERRNO == tdat[testno].experrno) ) {
+			if ((TEST_RETURN == (int)tdat[testno].retval) &&
+			    (TEST_ERRNO == tdat[testno].experrno)) {
 				tst_resm(TPASS, "Expected results for %s, "
-					"errno: %d",
-					tdat[testno].desc, TEST_ERRNO);
+					 "errno: %d",
+					 tdat[testno].desc, TEST_ERRNO);
 			} else {
 				tst_resm(TFAIL, "Unexpected results for %s ; "
-					"returned %d (expected %d), errno %d "
-					"(expected %d)", tdat[testno].desc,
-					TEST_RETURN, tdat[testno].retval,
-					TEST_ERRNO, tdat[testno].experrno);
+					 "returned %d (expected %d), errno %d "
+					 "(expected %d)", tdat[testno].desc,
+					 TEST_RETURN, tdat[testno].retval,
+					 TEST_ERRNO, tdat[testno].experrno);
 			}
 			if (tdat[testno].cleanup) {
 				tdat[testno].cleanup();
@@ -204,47 +203,43 @@
 	tst_exit();
 }
 
-int
-setup1(void)
+int setup1(void)
 {
 	/* Change effective user id to nodody */
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		tst_resm(TBROK, "seteuid failed to set the effective"
-				" uid to %d", ltpuser->pw_uid);
+			 " uid to %d", ltpuser->pw_uid);
 		return 1;
 	}
 	return 0;
 }
 
-void
-cleanup1(void)
+void cleanup1(void)
 {
-	 /* Change effective user id to root */
-         if (seteuid(0) == -1) {
+	/* Change effective user id to root */
+	if (seteuid(0) == -1) {
 		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
-			" uid to root");
-         }
+			 " uid to root");
+	}
 }
 
-int
-setup2(void)
+int setup2(void)
 {
 	/* Create a loadable module entry */
 	if (create_module(modname, MODSIZE) == -1) {
 		tst_resm(TBROK, "Failed to create module entry"
-			" for %s", modname);
+			 " for %s", modname);
 		return 1;
 	}
 	return 0;
 }
 
-void
-cleanup2(void)
+void cleanup2(void)
 {
-	 /* Remove loadable module entry */
+	/* Remove loadable module entry */
 	if (delete_module(modname) == -1) {
 		tst_brkm(TBROK, NULL, "Failed to delete module entry"
-			" for %s", modname);
+			 " for %s", modname);
 	}
 }
 
@@ -252,23 +247,22 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	tst_require_root(NULL);
 
-	if (tst_kvercmp(2,5,48) >= 0)
+	if (tst_kvercmp(2, 5, 48) >= 0)
 		tst_brkm(TCONF, NULL, "This test will not work on "
-				"kernels after 2.5.48");
+			 "kernels after 2.5.48");
 
-        /* Check for nobody_uid user id */
-	 if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
+	/* Check for nobody_uid user id */
+	if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
 		tst_brkm(TBROK, NULL, "Required user %s doesn't exists",
-				nobody_uid);
-	 }
+			 nobody_uid);
+	}
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
 	memset(longmodname, LONGMODNAMECHAR, MODNAMEMAX - 1);
@@ -282,7 +276,7 @@
 	TEST_PAUSE;
 
 	/* Get unique module name for each child process */
-	if (sprintf(modname, "%s_%d",BASEMODNAME, getpid()) == -1) {
+	if (sprintf(modname, "%s_%d", BASEMODNAME, getpid()) == -1) {
 		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
 }
@@ -292,8 +286,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/delete_module/delete_module01.c b/testcases/kernel/module/delete_module/delete_module01.c
index e99efdd..b09a028 100644
--- a/testcases/kernel/module/delete_module/delete_module01.c
+++ b/testcases/kernel/module/delete_module/delete_module01.c
@@ -72,23 +72,20 @@
 #include "test.h"
 #include "usctest.h"
 
-
 static void setup(void);
 static void cleanup(void);
 
-char *TCID = "delete_module01";		 /* Test program identifier.    */
-int TST_TOTAL = 1;			/* Total number of test cases. */
+char *TCID = "delete_module01";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 	char cmd[PATH_MAX];
 	char *module_name = "dummy_del_mod";
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-		(char *) NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -104,9 +101,9 @@
 			module_name);
 
 		/* Insmod the module */
- 		if ((system( cmd )) != 0) {
+		if ((system(cmd)) != 0) {
 			tst_resm(TBROK, "Failed to load %s module",
-					module_name);
+				 module_name);
 			printf("system() failed; cannot test init_module: "
 			       "errno=%i\n", errno);
 			goto EXIT;
@@ -118,13 +115,12 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			tst_resm(TFAIL, "delete_module() failed to remove"
-		 			" module entry for %s, errno=%d : %s",
-		 		 	module_name, TEST_ERRNO,
-					strerror(TEST_ERRNO));
+				 " module entry for %s, errno=%d : %s",
+				 module_name, TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
 			tst_resm(TPASS, "delete_module() successful, returned"
-	 				" %d", TEST_RETURN);
-	 	}
+				 " %d", TEST_RETURN);
+		}
 
 	}
 
@@ -135,8 +131,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -150,7 +145,7 @@
 	/*
 	 * if (tst_kvercmp(2,5,48) >= 0)
 	 * tst_brkm(TCONF, NULL, "This test will not work on "
-	 *				"kernels after 2.5.48");
+	 *                              "kernels after 2.5.48");
 	 */
 	/* Pause if that option was specified
 	 * TEST_PAUSE contains the code to fork the test with the -c option.
@@ -164,8 +159,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/delete_module/delete_module02.c b/testcases/kernel/module/delete_module/delete_module02.c
index 2e515b1..6d61121 100644
--- a/testcases/kernel/module/delete_module/delete_module02.c
+++ b/testcases/kernel/module/delete_module/delete_module02.c
@@ -96,26 +96,26 @@
 #include "test.h"
 #include "usctest.h"
 
-
 #define NULLMODNAME ""
 #define BASEMODNAME "dummy"
-#define LONGMODNAMECHAR 'm'			/* Arbitrarily selected */
+#define LONGMODNAMECHAR 'm'	/* Arbitrarily selected */
 #define EXP_RET_VAL -1
 
 /* Test case structure */
 struct test_case_t {
-	char 		 *modname;
+	char *modname;
 	/* Expected errno. */
-	int		 experrno;
-	char		 *desc;
+	int experrno;
+	char *desc;
 	/* Individual setup routine. */
-	int		 (*setup)(void);
+	int (*setup) (void);
 	/* Individual cleanup routine */
-	void		 (*cleanup)(void);
+	void (*cleanup) (void);
 };
 
 char *TCID = "delete_module02";
 static int exp_enos[] = { EPERM, EINVAL, ENOENT, EFAULT, ENAMETOOLONG, 0 };
+
 static char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 static char longmodname[MODULE_NAME_LEN];
@@ -123,7 +123,7 @@
 /* Name of the module */
 static char modname[20];
 
-char * bad_addr = 0;
+char *bad_addr = 0;
 
 static void setup(void);
 static void cleanup(void);
@@ -132,24 +132,23 @@
 
 struct test_case_t;
 
-static struct test_case_t  tdat[] = {
-		 { modname, ENOENT,
-		 	"nonexistent module", NULL, NULL},
-		 { NULLMODNAME, ENOENT,
-		 	"null terminated module name", NULL, NULL},
-		 { (char *) -1, EFAULT,
-			"module name outside program's "
-			"accessible address space", NULL, NULL},
-		 { longmodname, ENOENT,
-		 	"long module name", NULL, NULL},
-		 { modname, EPERM,
-		 	"non-superuser", setup1, cleanup1},
+static struct test_case_t tdat[] = {
+	{modname, ENOENT,
+	 "nonexistent module", NULL, NULL},
+	{NULLMODNAME, ENOENT,
+	 "null terminated module name", NULL, NULL},
+	{(char *)-1, EFAULT,
+	 "module name outside program's "
+	 "accessible address space", NULL, NULL},
+	{longmodname, ENOENT,
+	 "long module name", NULL, NULL},
+	{modname, EPERM,
+	 "non-superuser", setup1, cleanup1},
 };
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
@@ -165,27 +164,26 @@
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			if ((tdat[testno].setup) && (tdat[testno].setup())) {
-		 		/* setup() failed, skip this test */
-		 		continue;
-		 	}
+				/* setup() failed, skip this test */
+				continue;
+			}
 			/* Test the system call */
-		 	TEST(delete_module(tdat[testno].modname));
-		 	TEST_ERROR_LOG(TEST_ERRNO);
-		 	printf("TEST_RETURN is %d, TEST_ERRNO is %d\n",
-				TEST_RETURN, TEST_ERRNO);
-		 	if ((TEST_RETURN == EXP_RET_VAL) &&
-		 	     (TEST_ERRNO == tdat[testno].experrno) ) {
-		 		tst_resm(TPASS, "Expected results for %s, "
-		 				"errno: %d", tdat[testno].desc,
-		 		 		TEST_ERRNO);
-		 	} else {
+			TEST(delete_module(tdat[testno].modname));
+			TEST_ERROR_LOG(TEST_ERRNO);
+			printf("TEST_RETURN is %d, TEST_ERRNO is %d\n",
+			       TEST_RETURN, TEST_ERRNO);
+			if ((TEST_RETURN == EXP_RET_VAL) &&
+			    (TEST_ERRNO == tdat[testno].experrno)) {
+				tst_resm(TPASS, "Expected results for %s, "
+					 "errno: %d", tdat[testno].desc,
+					 TEST_ERRNO);
+			} else {
 				tst_resm(TFAIL, "Unexpected results for %s ; "
-						"returned %d (expected %d), "
-						"errno %d (expected %d)",
-						tdat[testno].desc,
-						TEST_RETURN, EXP_RET_VAL,
-						TEST_ERRNO,
-						tdat[testno].experrno);
+					 "returned %d (expected %d), "
+					 "errno %d (expected %d)",
+					 tdat[testno].desc,
+					 TEST_RETURN, EXP_RET_VAL,
+					 TEST_ERRNO, tdat[testno].experrno);
 			}
 			if (tdat[testno].cleanup) {
 				tdat[testno].cleanup();
@@ -196,25 +194,23 @@
 	tst_exit();
 }
 
-int
-setup1(void)
+int setup1(void)
 {
 	/* Change effective user id to nodody */
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		tst_resm(TBROK, "seteuid failed to set the effective"
-				" uid to %d", ltpuser->pw_uid);
+			 " uid to %d", ltpuser->pw_uid);
 		return 1;
 	}
 	return 0;
 }
 
-void
-cleanup1(void)
+void cleanup1(void)
 {
 	/* Change effective user id to root */
 	if (seteuid(0) == -1) {
 		tst_brkm(TBROK, NULL, "seteuid failed to set the effective"
-					  " uid to root");
+			 " uid to root");
 	}
 }
 
@@ -222,8 +218,7 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -235,8 +230,8 @@
 	}
 
 	/*if (tst_kvercmp(2,5,48) >= 0)
-		tst_brkm(TCONF, NULL, "This test will not work on "
-					  "kernels after 2.5.48");
+	   tst_brkm(TCONF, NULL, "This test will not work on "
+	   "kernels after 2.5.48");
 	 */
 
 	/* Check for nobody_uid user id */
@@ -260,8 +255,8 @@
 	if (sprintf(modname, "%s_%d", BASEMODNAME, getpid()) <= 0) {
 		tst_brkm(TBROK, NULL, "Failed to initialize module name");
 	}
-        bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
-        if (bad_addr == MAP_FAILED) {
+	bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+	if (bad_addr == MAP_FAILED) {
 		tst_brkm(TBROK, cleanup, "mmap failed");
 	}
 	tdat[2].modname = bad_addr;
@@ -273,8 +268,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/delete_module/delete_module03.c b/testcases/kernel/module/delete_module/delete_module03.c
index cce1f91..71f3ecd 100644
--- a/testcases/kernel/module/delete_module/delete_module03.c
+++ b/testcases/kernel/module/delete_module/delete_module03.c
@@ -86,7 +86,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 #define DUMMY_MOD		 "dummy_del_mod"
 #define DUMMY_MOD_DEP		 "dummy_del_mod_dep"
 #define EXP_RET_VAL		 -1
@@ -95,14 +94,14 @@
 
 char *TCID = "delete_module03";
 /*static int exp_enos[] = {EBUSY, 0}; */
-static int exp_enos[] = {EWOULDBLOCK, 0};
+static int exp_enos[] = { EWOULDBLOCK, 0 };
+
 int TST_TOTAL = 1;
 
 static void setup(void);
 static void cleanup(void);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
@@ -113,14 +112,14 @@
 
 	if (STD_COPIES != 1) {
 		tst_resm(TINFO, "-c option has no effect for this testcase - "
-				"doesn't allow running more than one instance "
-		 		"at a time");
+			 "doesn't allow running more than one instance "
+			 "at a time");
 		STD_COPIES = 1;
 	}
 
 	/* Load first kernel module */
 	if (sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
-		DUMMY_MOD) <= 0) {
+		    DUMMY_MOD) <= 0) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
@@ -130,15 +129,15 @@
 	}
 
 	/* Load dependant kernel module */
-        if (sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
-		DUMMY_MOD_DEP) <= 0) {
+	if (sprintf(cmd, "/sbin/insmod %s/%s.ko", dirname(argv[0]),
+		    DUMMY_MOD_DEP) <= 0) {
 		tst_resm(TBROK, "sprintf failed");
 		goto END;
 	}
-        if ((system(cmd)) != 0) {
+	if ((system(cmd)) != 0) {
 		tst_resm(TBROK, "Failed to load %s module", DUMMY_MOD_DEP);
 		goto END;
-        }
+	}
 
 	setup();
 
@@ -150,20 +149,20 @@
 		TEST(delete_module(DUMMY_MOD));
 
 		TEST_ERROR_LOG(TEST_ERRNO);
-		if ((TEST_RETURN == (int) EXP_RET_VAL) &&
-		     (TEST_ERRNO == EXP_ERRNO) ) {
+		if ((TEST_RETURN == (int)EXP_RET_VAL) &&
+		    (TEST_ERRNO == EXP_ERRNO)) {
 			tst_resm(TPASS, "Expected failure for module in-use, "
-		 			"errno: %d", TEST_ERRNO);
+				 "errno: %d", TEST_ERRNO);
 		} else {
 			tst_resm(TFAIL, "Unexpected results for module in-use; "
-		 			"returned %d (expected %d), errno %d "
-					"(expected %d)", TEST_RETURN,
-					EXP_RET_VAL, TEST_ERRNO, EXP_ERRNO);
+				 "returned %d (expected %d), errno %d "
+				 "(expected %d)", TEST_RETURN,
+				 EXP_RET_VAL, TEST_ERRNO, EXP_ERRNO);
 		}
 	}
 	cleanup();
 END:
-	if (system("rmmod "DUMMY_MOD) != 0) {
+	if (system("rmmod " DUMMY_MOD) != 0) {
 		tst_resm(TBROK, "Failed to unload %s module", DUMMY_MOD);
 		return 1;
 	}
@@ -174,8 +173,7 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -198,17 +196,15 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/* Unload dependent kernel module */
-	if (system("rmmod "DUMMY_MOD_DEP) != 0) {
+	if (system("rmmod " DUMMY_MOD_DEP) != 0) {
 		tst_resm(TBROK, "Failed to unload %s module", DUMMY_MOD_DEP);
 	}
 	/* Unload first kernel module */
-	if (system("rmmod "DUMMY_MOD) != 0) {
-		tst_resm(TBROK, "Failed to unload %s module",
-		DUMMY_MOD);
+	if (system("rmmod " DUMMY_MOD) != 0) {
+		tst_resm(TBROK, "Failed to unload %s module", DUMMY_MOD);
 	}
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/delete_module/dummy_del_mod.c b/testcases/kernel/module/delete_module/dummy_del_mod.c
index 9b33ce1..dfda0e3 100644
--- a/testcases/kernel/module/delete_module/dummy_del_mod.c
+++ b/testcases/kernel/module/delete_module/dummy_del_mod.c
@@ -44,16 +44,18 @@
 	return 0;
 }
 
-static int __init dummy_init(void) {
-        struct proc_dir_entry *proc_dummy;
+static int __init dummy_init(void)
+{
+	struct proc_dir_entry *proc_dummy;
 
-        proc_dummy = proc_mkdir("dummy", 0);
-      return 0;
+	proc_dummy = proc_mkdir("dummy", 0);
+	return 0;
 }
 
-static void __exit dummy_exit(void) {
+static void __exit dummy_exit(void)
+{
 
-        remove_proc_entry("dummy", 0);
+	remove_proc_entry("dummy", 0);
 }
 
 module_init(dummy_init);
diff --git a/testcases/kernel/module/delete_module/dummy_del_mod_dep.c b/testcases/kernel/module/delete_module/dummy_del_mod_dep.c
index e0c175d..a15b2ea 100644
--- a/testcases/kernel/module/delete_module/dummy_del_mod_dep.c
+++ b/testcases/kernel/module/delete_module/dummy_del_mod_dep.c
@@ -37,16 +37,18 @@
 
 extern int dummy_func_test(void);
 
-static int __init dummy_init(void) {
-        struct proc_dir_entry *proc_dummy;
+static int __init dummy_init(void)
+{
+	struct proc_dir_entry *proc_dummy;
 
-        proc_dummy = proc_mkdir("dummy_dep", 0);
-        dummy_func_test();
-      return 0;
+	proc_dummy = proc_mkdir("dummy_dep", 0);
+	dummy_func_test();
+	return 0;
 }
 
-static void __exit dummy_exit(void) {
-        remove_proc_entry("dummy_dep", 0);
+static void __exit dummy_exit(void)
+{
+	remove_proc_entry("dummy_dep", 0);
 }
 
 module_init(dummy_init);
diff --git a/testcases/kernel/module/query_module/dummy_query_mod.c b/testcases/kernel/module/query_module/dummy_query_mod.c
index fc0bc19..27f7408 100644
--- a/testcases/kernel/module/query_module/dummy_query_mod.c
+++ b/testcases/kernel/module/query_module/dummy_query_mod.c
@@ -33,22 +33,19 @@
 void dummy_func_test(void);
 
 /* Initialization routine of module */
-int
-init_module (void)
+int init_module(void)
 {
 	return 0;
 }
 
 /* Cleanup routine of module */
-void
-cleanup_module (void)
+void cleanup_module(void)
 {
 	return;
 }
 
 /* Dummy function used by dependent module */
-void
-dummy_func_test(void)
+void dummy_func_test(void)
 {
 	return;
 }
diff --git a/testcases/kernel/module/query_module/dummy_query_mod_dep.c b/testcases/kernel/module/query_module/dummy_query_mod_dep.c
index 1102e24..31c0293 100644
--- a/testcases/kernel/module/query_module/dummy_query_mod_dep.c
+++ b/testcases/kernel/module/query_module/dummy_query_mod_dep.c
@@ -35,8 +35,7 @@
 extern void dummy_func_test(void);
 
 /* Initialization routine of module */
-int
-init_module (void)
+int init_module(void)
 {
 	/*
 	 * Call function of other module, does nothing, used to create
@@ -47,8 +46,7 @@
 }
 
 /* Cleanup routine of module */
-void
-cleanup_module (void)
+void cleanup_module(void)
 {
 	return;
 }
diff --git a/testcases/kernel/module/query_module/query_module01.c b/testcases/kernel/module/query_module/query_module01.c
index 2c54822..48b2192 100644
--- a/testcases/kernel/module/query_module/query_module01.c
+++ b/testcases/kernel/module/query_module/query_module01.c
@@ -99,7 +99,7 @@
 #define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
 #endif
 
-#define LONGMODNAMECHAR	'm'		/* Arbitrarily selected */
+#define LONGMODNAMECHAR	'm'	/* Arbitrarily selected */
 #define MODNAMEMAX	(PAGE_SIZE + 1)
 #define EXP_RET_VAL	0
 #define DUMMY_MOD	"dummy_query_mod"
@@ -109,13 +109,12 @@
 /* Name of exported function in DUMMY_MOD */
 #define EXP_FUNC_NAME	"dummy_func_test"
 
-
-struct test_case_t {			/* test case structure */
-	char 	*modname;
-	int	which;
-	char	*desc;
-	int	(*setup)(void);		/* Individual setup routine */
-	void	(*cleanup)(void);	/* Individual cleanup routine */
+struct test_case_t {		/* test case structure */
+	char *modname;
+	int which;
+	char *desc;
+	int (*setup) (void);	/* Individual setup routine */
+	void (*cleanup) (void);	/* Individual cleanup routine */
 };
 
 char *TCID = "query_module01";
@@ -132,43 +131,41 @@
 static int setup2(void);
 static void cleanup2(void);
 
-static struct test_case_t  tdat[] = {
-	{ NULL, 0, "module name: NULL, which: 0", NULL, NULL},
+static struct test_case_t tdat[] = {
+	{NULL, 0, "module name: NULL, which: 0", NULL, NULL},
 
-	{ NULL, QM_MODULES, "NULL module name, which: QM_MODULES",
-		setup1, cleanup1},
+	{NULL, QM_MODULES, "NULL module name, which: QM_MODULES",
+	 setup1, cleanup1},
 
-	{ DUMMY_MOD_DEP, QM_DEPS, "valid module name, which: QM_DEPS",
-		setup2, cleanup2},
+	{DUMMY_MOD_DEP, QM_DEPS, "valid module name, which: QM_DEPS",
+	 setup2, cleanup2},
 
-	{ DUMMY_MOD, QM_REFS, "valid module name, which: QM_REFS",
-		setup2, cleanup2},
+	{DUMMY_MOD, QM_REFS, "valid module name, which: QM_REFS",
+	 setup2, cleanup2},
 
-	{ DUMMY_MOD, QM_INFO, "valid module name, which: QM_INFO",
-		setup1, cleanup1},
+	{DUMMY_MOD, QM_INFO, "valid module name, which: QM_INFO",
+	 setup1, cleanup1},
 
-	{ DUMMY_MOD, QM_SYMBOLS, "valid module name, which: QM_SYMBOLS",
-		setup1, cleanup1},
+	{DUMMY_MOD, QM_SYMBOLS, "valid module name, which: QM_SYMBOLS",
+	 setup1, cleanup1},
 };
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 	size_t buflen = sizeof(out_buf);
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (STD_COPIES != 1) {
 		tst_resm(TINFO, "-c option has no effect for these testcases - "
-			"doesn't allow running more than one instance "
-			"at a time");
+			 "doesn't allow running more than one instance "
+			 "at a time");
 		STD_COPIES = 1;
 	}
 
@@ -186,20 +183,20 @@
 			}
 
 			TEST(query_module(tdat[testno].modname,
-				tdat[testno].which, (void *)out_buf, buflen,
-				&ret));
+					  tdat[testno].which, (void *)out_buf,
+					  buflen, &ret));
 
 			if ((TEST_RETURN == EXP_RET_VAL) &&
-				!test_functionality(tdat[testno].which,
-				out_buf, buflen, ret) ) {
+			    !test_functionality(tdat[testno].which,
+						out_buf, buflen, ret)) {
 				tst_resm(TPASS, "query_module() successful "
-					"for %s", tdat[testno].desc);
+					 "for %s", tdat[testno].desc);
 			} else {
 				tst_resm(TFAIL, "query_module() failed for "
-					"%s ; returned"
-					" %d (expected %d), errno %d (expected"
-					" 0)", tdat[testno].desc,
-					TEST_RETURN, EXP_RET_VAL, TEST_ERRNO);
+					 "%s ; returned"
+					 " %d (expected %d), errno %d (expected"
+					 " 0)", tdat[testno].desc,
+					 TEST_RETURN, EXP_RET_VAL, TEST_ERRNO);
 			}
 			if (tdat[testno].cleanup) {
 				tdat[testno].cleanup();
@@ -210,8 +207,7 @@
 	tst_exit();
 }
 
-int
-test_functionality(int which, char *buf, size_t bufsize, size_t ret)
+int test_functionality(int which, char *buf, size_t bufsize, size_t ret)
 {
 	int i = 0;
 	char *modname;
@@ -225,59 +221,58 @@
 		return 0;
 	}
 
-	switch(which) {
-		case 0:
-			/* Always return SUCCESS */
+	switch (which) {
+	case 0:
+		/* Always return SUCCESS */
+		return 0;
+
+	case QM_MODULES:
+	case QM_DEPS:
+		/* Return SUCCESS if found DUMMY_MOD entry */
+		modname = DUMMY_MOD;
+		break;
+
+	case QM_REFS:
+		/* Return SUCCESS if found DUMMY_MOD_DEP entry */
+		modname = DUMMY_MOD_DEP;
+		break;
+
+	case QM_INFO:
+		/*
+		 * Since module is already loaded, flags should show
+		 * MOD_RUNNING
+		 */
+		if (((struct module_info *)buf)->flags & MOD_RUNNING) {
 			return 0;
+		}
+		return 1;
 
-		case QM_MODULES:
-		case QM_DEPS:
-			/* Return SUCCESS if found DUMMY_MOD entry */
-			modname = DUMMY_MOD;
-			break;
+	case QM_SYMBOLS:
+		vals = (unsigned long *)buf;
 
-		case QM_REFS:
-			/* Return SUCCESS if found DUMMY_MOD_DEP entry */
-			modname = DUMMY_MOD_DEP;
-			break;
+		/*
+		 * Find entry for atleast one symbol, checking for
+		 * EXP_FUNC_NAME symbol, if found return SUCCESS.
+		 */
+		for (i = 0; i < ret; i++, vals += 2) {
 
-		case QM_INFO:
-			/*
-			 * Since module is already loaded, flags should show
-			 * MOD_RUNNING
-			 */
-			if (((struct module_info *) buf) -> flags &
-					MOD_RUNNING) {
+			/* buf + vals[1] - address of symbol name */
+			if (!strcmp(buf + vals[1], EXP_FUNC_NAME)) {
 				return 0;
 			}
-			return 1;
+		}
+		return 1;
 
-		case QM_SYMBOLS:
-			vals = (unsigned long *)buf;
-
-			/*
-			 * Find entry for atleast one symbol, checking for
-			 * EXP_FUNC_NAME symbol, if found return SUCCESS.
-			 */
-			for (i = 0; i < ret; i++, vals += 2) {
-
-				/* buf + vals[1] - address of symbol name */
-				if (!strcmp(buf + vals[1], EXP_FUNC_NAME)) {
-					return 0;
-				}
-			}
-			return 1;
-
-		default:
-			/* Unknown which type */
-			return 1;
+	default:
+		/* Unknown which type */
+		return 1;
 	}
 
 	/* Return SUCCESS if found entry */
 	for (i = 0; i != ret; i++) {
 		if (strcmp(buf, modname)) {
 			buf += strlen(buf) + 1;
-		} else{
+		} else {
 			return 0;
 		}
 	}
@@ -286,8 +281,7 @@
 }
 
 /* Insert a module of name mod */
-int
-insert_mod(char *mod)
+int insert_mod(char *mod)
 {
 	char cmd[80];
 
@@ -300,8 +294,8 @@
 		return 1;
 	}
 
-        /* Should use force to ignore kernel version & insure loading  */
-        /* -RW                                                         */
+	/* Should use force to ignore kernel version & insure loading  */
+	/* -RW                                                         */
 	/* if (sprintf(cmd, "insmod %s.o", mod) == -1) {               */
 	if (sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", mod) == -1) {
 		tst_resm(TBROK, "sprintf failed");
@@ -314,8 +308,7 @@
 	return 0;
 }
 
-int
-setup1(void)
+int setup1(void)
 {
 	if (insert_mod(DUMMY_MOD)) {
 		/* Failed */
@@ -325,8 +318,7 @@
 	}
 }
 
-int
-setup2(void)
+int setup2(void)
 {
 	if (insert_mod(DUMMY_MOD)) {
 		/* Failed */
@@ -340,23 +332,21 @@
 	return 0;
 }
 
-void
-cleanup1(void)
+void cleanup1(void)
 {
 	/* Remove the loadable module - DUMMY_MOD */
-	if (system("rmmod "DUMMY_MOD) != 0) {
+	if (system("rmmod " DUMMY_MOD) != 0) {
 		tst_brkm(TBROK, cleanup, "Failed to unload module %s",
-			DUMMY_MOD);
+			 DUMMY_MOD);
 	}
 }
 
-void
-cleanup2(void)
+void cleanup2(void)
 {
 	/* Remove the loadable module - DUMMY_MOD_DEP */
-	if (system("rmmod "DUMMY_MOD_DEP) != 0) {
+	if (system("rmmod " DUMMY_MOD_DEP) != 0) {
 		tst_brkm(TBROK, cleanup, "Failed to unload module %s",
-			DUMMY_MOD_DEP);
+			 DUMMY_MOD_DEP);
 	}
 	/* Remove the loadable module - DUMMY_MOD */
 	cleanup1();
@@ -366,17 +356,16 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	tst_require_root(NULL);
 
-	if (tst_kvercmp(2,5,48) >= 0)
+	if (tst_kvercmp(2, 5, 48) >= 0)
 		tst_brkm(TCONF, NULL, "This test will not work on "
-				"kernels after 2.5.48");
+			 "kernels after 2.5.48");
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
 	memset(longmodname, LONGMODNAMECHAR, MODNAMEMAX - 1);
@@ -392,8 +381,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/query_module/query_module02.c b/testcases/kernel/module/query_module/query_module02.c
index fa26e76..ed131f9 100644
--- a/testcases/kernel/module/query_module/query_module02.c
+++ b/testcases/kernel/module/query_module/query_module02.c
@@ -89,23 +89,23 @@
 #endif
 
 #define NULLMODNAME	""
-#define LONGMODNAMECHAR	'm'		/* Arbitrarily selected */
+#define LONGMODNAMECHAR	'm'	/* Arbitrarily selected */
 #define MODNAMEMAX	(PAGE_SIZE + 1)
 #define EXP_RET_VAL	-1
 #define QM_INVALID	(QM_INFO + 100)
 
-
-struct test_case_t {			/* test case structure */
-	char 	*modname;
-	int	which;
-	void	*buf;
-	size_t	bufsize;
-	int	experrno;		/* expected errno */
-	char	*desc;
+struct test_case_t {		/* test case structure */
+	char *modname;
+	int which;
+	void *buf;
+	size_t bufsize;
+	int experrno;		/* expected errno */
+	char *desc;
 };
 
 char *TCID = "query_module02";
-static int exp_enos[]={ENOENT, EINVAL, ENAMETOOLONG, 0};
+static int exp_enos[] = { ENOENT, EINVAL, ENAMETOOLONG, 0 };
+
 static char longmodname[MODNAMEMAX];
 static int testno;
 static char out_buf[PAGE_SIZE];
@@ -114,34 +114,37 @@
 static void setup(void);
 static void cleanup(void);
 
-static struct test_case_t  tdat[] = {
+static struct test_case_t tdat[] = {
 
-	{ "dummy_mod", QM_REFS, (void *) out_buf, sizeof(out_buf), ENOENT,
-		"results for non-existing module" },
+	{"dummy_mod", QM_REFS, (void *)out_buf, sizeof(out_buf), ENOENT,
+	 "results for non-existing module"}
+	,
 
-	{ NULL, QM_INVALID, (void *) out_buf, sizeof(out_buf), EINVAL,
-		"results for invalid which argument" },
+	{NULL, QM_INVALID, (void *)out_buf, sizeof(out_buf), EINVAL,
+	 "results for invalid which argument"}
+	,
 
-	{ NULL, QM_REFS, (void *) out_buf, sizeof(out_buf), EINVAL,
-		"results for NULL module name and valid which argument" },
+	{NULL, QM_REFS, (void *)out_buf, sizeof(out_buf), EINVAL,
+	 "results for NULL module name and valid which argument"}
+	,
 
-	{ NULLMODNAME, QM_REFS, (void *) out_buf, sizeof(out_buf), EINVAL,
-		"results for null terminated (zero lenght) module name" },
+	{NULLMODNAME, QM_REFS, (void *)out_buf, sizeof(out_buf), EINVAL,
+	 "results for null terminated (zero lenght) module name"}
+	,
 
-	{ longmodname, QM_REFS, (void *) out_buf, sizeof(out_buf), ENAMETOOLONG,
-		"results for long module name" },
+	{longmodname, QM_REFS, (void *)out_buf, sizeof(out_buf), ENAMETOOLONG,
+	 "results for long module name"}
+	,
 };
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -154,19 +157,19 @@
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
 			TEST(query_module(tdat[testno].modname,
-				tdat[testno].which, tdat[testno].buf,
-				tdat[testno].bufsize, &ret_size));
+					  tdat[testno].which, tdat[testno].buf,
+					  tdat[testno].bufsize, &ret_size));
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if ((TEST_RETURN == EXP_RET_VAL) &&
-				(TEST_ERRNO == tdat[testno].experrno) ) {
+			    (TEST_ERRNO == tdat[testno].experrno)) {
 				tst_resm(TPASS, "Expected %s, errno: %d",
-					tdat[testno].desc, TEST_ERRNO);
+					 tdat[testno].desc, TEST_ERRNO);
 			} else {
 				tst_resm(TFAIL, "Unexpected %s ; returned"
-					" %d (expected %d), errno %d (expected"
-					" %d)", tdat[testno].desc,
-					TEST_RETURN, EXP_RET_VAL,
-					TEST_ERRNO, tdat[testno].experrno);
+					 " %d (expected %d), errno %d (expected"
+					 " %d)", tdat[testno].desc,
+					 TEST_RETURN, EXP_RET_VAL,
+					 TEST_ERRNO, tdat[testno].experrno);
 			}
 		}
 	}
@@ -179,15 +182,14 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
-	if (tst_kvercmp(2,5,48) >= 0)
+	if (tst_kvercmp(2, 5, 48) >= 0)
 		tst_brkm(TCONF, NULL, "This test will not work on "
-				"kernels after 2.5.48");
+			 "kernels after 2.5.48");
 
 	/* Initialize longmodname to LONGMODNAMECHAR character */
 	memset(longmodname, LONGMODNAMECHAR, MODNAMEMAX - 1);
@@ -206,8 +208,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/module/query_module/query_module03.c b/testcases/kernel/module/query_module/query_module03.c
index ffa8d61..eee1629 100644
--- a/testcases/kernel/module/query_module/query_module03.c
+++ b/testcases/kernel/module/query_module/query_module03.c
@@ -101,67 +101,68 @@
 #define DUMMY_MOD	"dummy_query_mod"
 #define SMALLBUFSIZE	1
 
-
-struct test_case_t {			/* test case structure */
-	char 	*modname;
-	int	which;
-	void	*buf;
-	size_t	bufsize;
-	size_t	*ret_size;
-	int	experrno;		/* expected errno */
-	char	*desc;
-	int     (*setup)(void);
-	void    (*cleanup)(void);
+struct test_case_t {		/* test case structure */
+	char *modname;
+	int which;
+	void *buf;
+	size_t bufsize;
+	size_t *ret_size;
+	int experrno;		/* expected errno */
+	char *desc;
+	int (*setup) (void);
+	void (*cleanup) (void);
 };
 
 char *TCID = "query_module03";
-static int exp_enos[]={ENOSPC, EFAULT, 0};
+static int exp_enos[] = { ENOSPC, EFAULT, 0 };
+
 static int testno;
 static char out_buf[PAGE_SIZE];
 static size_t ret_size;
 
-char * bad_addr = 0;
+char *bad_addr = 0;
 
 static void setup(void);
 static void cleanup(void);
 static int setup1(void);
 static void cleanup1(void);
 
-static struct test_case_t  tdat[] = {
+static struct test_case_t tdat[] = {
 
-	{ (char *)-1, QM_MODULES, (void *)out_buf, sizeof(out_buf), &ret_size,
-		EFAULT, "results for module name argument outside program's "
-		"accessible address space", NULL, NULL },
+	{(char *)-1, QM_MODULES, (void *)out_buf, sizeof(out_buf), &ret_size,
+	 EFAULT, "results for module name argument outside program's "
+	 "accessible address space", NULL, NULL}
+	,
 
-	{ NULL, QM_MODULES, (void *)out_buf, sizeof(out_buf), (size_t *)-1,
-		EFAULT, "results for return size argument outside program's "
-		"accessible address space", NULL, NULL },
+	{NULL, QM_MODULES, (void *)out_buf, sizeof(out_buf), (size_t *) - 1,
+	 EFAULT, "results for return size argument outside program's "
+	 "accessible address space", NULL, NULL}
+	,
 
-	{ NULL, QM_MODULES, (void *)-1, sizeof(out_buf), &ret_size, EFAULT,
-		"results for output buffer argument outside program's "
-		"accessible address space", setup1, cleanup1 },
+	{NULL, QM_MODULES, (void *)-1, sizeof(out_buf), &ret_size, EFAULT,
+	 "results for output buffer argument outside program's "
+	 "accessible address space", setup1, cleanup1}
+	,
 
-	{ NULL, QM_MODULES, (void *)out_buf, SMALLBUFSIZE, &ret_size, ENOSPC,
-		"results for too small buffer size", setup1, cleanup1 },
+	{NULL, QM_MODULES, (void *)out_buf, SMALLBUFSIZE, &ret_size, ENOSPC,
+	 "results for too small buffer size", setup1, cleanup1},
 };
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    (char *)NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (STD_COPIES != 1) {
 		tst_resm(TINFO, "-c option has no effect for this testcase - "
-			"doesn't allow running more than one instance "
-			"at a time");
+			 "doesn't allow running more than one instance "
+			 "at a time");
 		STD_COPIES = 1;
 	}
 
@@ -179,19 +180,20 @@
 				continue;
 			}
 			TEST(query_module(tdat[testno].modname,
-				tdat[testno].which, tdat[testno].buf,
-				tdat[testno].bufsize, tdat[testno].ret_size));
+					  tdat[testno].which, tdat[testno].buf,
+					  tdat[testno].bufsize,
+					  tdat[testno].ret_size));
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if ((TEST_RETURN == EXP_RET_VAL) &&
-				(TEST_ERRNO == tdat[testno].experrno) ) {
+			    (TEST_ERRNO == tdat[testno].experrno)) {
 				tst_resm(TPASS, "Expected %s, errno: %d",
-					tdat[testno].desc, TEST_ERRNO);
+					 tdat[testno].desc, TEST_ERRNO);
 			} else {
 				tst_resm(TFAIL, "Unexpected %s ; returned"
-					" %d (expected %d), errno %d (expected"
-					" %d)", tdat[testno].desc,
-					TEST_RETURN, EXP_RET_VAL,
-					TEST_ERRNO, tdat[testno].experrno);
+					 " %d (expected %d), errno %d (expected"
+					 " %d)", tdat[testno].desc,
+					 TEST_RETURN, EXP_RET_VAL,
+					 TEST_ERRNO, tdat[testno].experrno);
 			}
 			if (tdat[testno].cleanup) {
 				tdat[testno].cleanup();
@@ -202,24 +204,24 @@
 	tst_exit();
 }
 
-int
-setup1(void)
+int setup1(void)
 {
 	char cmd[80];
 
-        if (sprintf(cmd, "cp `which %s.o` ./", DUMMY_MOD) == -1) {
-                tst_resm(TBROK, "sprintf failed");
-                return 1;
-        }
-        if (system(cmd) != 0) {
-                tst_resm(TBROK, "Failed to copy %s module", DUMMY_MOD);
-                return 1;
-        }
+	if (sprintf(cmd, "cp `which %s.o` ./", DUMMY_MOD) == -1) {
+		tst_resm(TBROK, "sprintf failed");
+		return 1;
+	}
+	if (system(cmd) != 0) {
+		tst_resm(TBROK, "Failed to copy %s module", DUMMY_MOD);
+		return 1;
+	}
 
 	/* Should use force to ignore kernel version & insure loading  */
-        /* -RW                                                         */
-        /* if (sprintf(cmd, "insmod %s.o", DUMMY_MOD) == -1) {         */
-	if (sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", DUMMY_MOD) == -1) {
+	/* -RW                                                         */
+	/* if (sprintf(cmd, "insmod %s.o", DUMMY_MOD) == -1) {         */
+	if (sprintf(cmd, "insmod --force -q %s.o >/dev/null 2>&1", DUMMY_MOD) ==
+	    -1) {
 		tst_resm(TBROK, "sprintf failed");
 		return 1;
 	}
@@ -230,13 +232,12 @@
 	return 0;
 }
 
-void
-cleanup1(void)
+void cleanup1(void)
 {
 	/* Remove the loadable module - DUMMY_MOD */
-	if (system("rmmod "DUMMY_MOD) != 0) {
+	if (system("rmmod " DUMMY_MOD) != 0) {
 		tst_brkm(TBROK, cleanup, "Failed to unload module %s",
-			DUMMY_MOD);
+			 DUMMY_MOD);
 	}
 }
 
@@ -244,17 +245,16 @@
  * setup()
  *	performs all ONE TIME setup for this test
  */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	tst_require_root(NULL);
 
-	if (tst_kvercmp(2,5,48) >= 0)
+	if (tst_kvercmp(2, 5, 48) >= 0)
 		tst_brkm(TCONF, NULL, "This test will not work on "
-				"kernels after 2.5.48");
+			 "kernels after 2.5.48");
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -264,12 +264,12 @@
 	 */
 	TEST_PAUSE;
 
-        bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
-        if (bad_addr == MAP_FAILED) {
-                tst_brkm(TBROK, cleanup, "mmap failed");
-        }
+	bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+	if (bad_addr == MAP_FAILED) {
+		tst_brkm(TBROK, cleanup, "mmap failed");
+	}
 	tdat[0].modname = bad_addr;
-	tdat[2].buf = (void *) bad_addr;
+	tdat[2].buf = (void *)bad_addr;
 
 }
 
@@ -278,8 +278,7 @@
  *	performs all ONE TIME cleanup for this test at
  *	completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/numa/numa_node_size.c b/testcases/kernel/numa/numa_node_size.c
index 8148ba8..53f1cb6 100644
--- a/testcases/kernel/numa/numa_node_size.c
+++ b/testcases/kernel/numa/numa_node_size.c
@@ -41,47 +41,48 @@
 int numa_exit_on_error = 0;
 char *fmt_mem(unsigned long long mem, char *buf)
 {
-        if (mem == -1L)
-            sprintf(buf, "<not available>");
-        else
-            sprintf(buf, "%Lu MB", mem >> 20);
-        return buf;
+	if (mem == -1L)
+		sprintf(buf, "<not available>");
+	else
+		sprintf(buf, "%Lu MB", mem >> 20);
+	return buf;
 }
+
 void hardware(void)
 {
 #if HAVE_NUMA_H
-        int i;
-        int maxnode = numa_max_node();
-        printf("available: %d nodes (0-%d)\n", 1+maxnode, maxnode);
-        for (i = 0; i <= maxnode; i++) {
-            char buf[64];
-            long fr;
-            unsigned long sz = numa_node_size(i, &fr);
-            printf("node %d cpus:", i);
-            printf("node %d size: %s\n", i, fmt_mem(sz, buf));
-            printf("node %d free: %s\n", i, fmt_mem(fr, buf));
-        }
+	int i;
+	int maxnode = numa_max_node();
+	printf("available: %d nodes (0-%d)\n", 1 + maxnode, maxnode);
+	for (i = 0; i <= maxnode; i++) {
+		char buf[64];
+		long fr;
+		unsigned long sz = numa_node_size(i, &fr);
+		printf("node %d cpus:", i);
+		printf("node %d size: %s\n", i, fmt_mem(sz, buf));
+		printf("node %d free: %s\n", i, fmt_mem(fr, buf));
+	}
 #endif
 }
+
 int main()
 {
 #if HAVE_NUMA_H
-        nodemask_t nodemask;
-        void hardware();
-        if (numa_available() < 0)
-        {
-            printf("This system does not support NUMA policy\n");
-            numa_error("numa_available");
-            numa_exit_on_error = 1;
-            exit(numa_exit_on_error);
-        }
-        nodemask_zero(&nodemask);
-        nodemask_set(&nodemask,1);
-        numa_bind(&nodemask);
-        hardware();
-        return numa_exit_on_error;
+	nodemask_t nodemask;
+	void hardware();
+	if (numa_available() < 0) {
+		printf("This system does not support NUMA policy\n");
+		numa_error("numa_available");
+		numa_exit_on_error = 1;
+		exit(numa_exit_on_error);
+	}
+	nodemask_zero(&nodemask);
+	nodemask_set(&nodemask, 1);
+	numa_bind(&nodemask);
+	hardware();
+	return numa_exit_on_error;
 #else
-        printf("NUMA is not available\n");
-        return 1;
+	printf("NUMA is not available\n");
+	return 1;
 #endif
 }
diff --git a/testcases/kernel/numa/support_numa.c b/testcases/kernel/numa/support_numa.c
index d444ee0..2975a95 100644
--- a/testcases/kernel/numa/support_numa.c
+++ b/testcases/kernel/numa/support_numa.c
@@ -47,16 +47,16 @@
 #define barrier() __asm__ __volatile__("": : :"memory")
 
 /* Extern Global Variables */
-extern int  Tst_count;               /* to avoid compilation errors. */
-extern char *TESTDIR;                /* to avoid compilation errors. */
+extern int Tst_count;		/* to avoid compilation errors. */
+extern char *TESTDIR;		/* to avoid compilation errors. */
 
 /* Global Variables */
-char *TCID     = "support_numa"; /* to avoid compilation errors. */
-int  TST_TOTAL = 1;                  /* to avoid compilation errors. */
+char *TCID = "support_numa";	/* to avoid compilation errors. */
+int TST_TOTAL = 1;		/* to avoid compilation errors. */
 
 void sigfunc(int sig)
 {
-        tst_resm(TINFO, "#Caught signal signum=%d", sig);
+	tst_resm(TINFO, "#Caught signal signum=%d", sig);
 }
 
 /******************************************************************************/
@@ -75,46 +75,43 @@
 /*                                                                            */
 /******************************************************************************/
 
-int main( int argc, char *argv[] )
+int main(int argc, char *argv[])
 {
 	int i;
 	char *buf = NULL;
-	int count=0;
+	int count = 0;
 	struct sigaction sa;
 
-        switch(atoi(argv[1]))
-	{
-	case 1: printf("%d", PAGE_SIZE);
+	switch (atoi(argv[1])) {
+	case 1:
+		printf("%d", PAGE_SIZE);
 		tst_exit();
 	case 2:
-		buf = (char*) malloc(MB);
-               	if (!buf)
-		{
+		buf = (char *)malloc(MB);
+		if (!buf) {
 			tst_resm(TINFO, "#Memory is not available\n");
 			tst_exit();
 			exit(2);
 		}
-       		for (i=0; i<MB; i+= PAGE_SIZE)
-		{
+		for (i = 0; i < MB; i += PAGE_SIZE) {
 			count++;
-               		buf[i] = 'a';
-               		barrier();
-       		}
+			buf[i] = 'a';
+			barrier();
+		}
 		free(buf);
 		tst_exit();
 	case 3:
-                /* Trap SIGINT */
-                sa.sa_handler = sigfunc;
-                sa.sa_flags = SA_RESTART;
-                sigemptyset(&sa.sa_mask);
-                if (sigaction(SIGINT, &sa, 0) < 0)
-		{
+		/* Trap SIGINT */
+		sa.sa_handler = sigfunc;
+		sa.sa_flags = SA_RESTART;
+		sigemptyset(&sa.sa_mask);
+		if (sigaction(SIGINT, &sa, 0) < 0) {
 			tst_brkm(TBROK, NULL, "#Sigaction SIGINT failed\n");
 			tst_exit();
 			exit(1);
 		}
-                /* wait for signat Int */
-                pause();
+		/* wait for signat Int */
+		pause();
 		tst_exit();
 	default:
 		exit(1);
diff --git a/testcases/kernel/performance_counters/performance_counter01.c b/testcases/kernel/performance_counters/performance_counter01.c
index 94db270..15ba337 100644
--- a/testcases/kernel/performance_counters/performance_counter01.c
+++ b/testcases/kernel/performance_counters/performance_counter01.c
@@ -43,11 +43,11 @@
 #include "linux_syscall_numbers.h"
 
 /* Extern Global Variables */
-extern int  Tst_count;
-extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;
+extern char *TESTDIR;		/* temporary dir created by tst_tmpdir() */
 /* Global Variables */
-char *TCID     = "performance_counter01"; /* test program identifier.          */
-int  TST_TOTAL = 1;
+char *TCID = "performance_counter01";	/* test program identifier.          */
+int TST_TOTAL = 1;
 
 enum hw_event_types {
 	PERF_COUNT_CYCLES,
@@ -58,25 +58,27 @@
 	PERF_COUNT_BRANCH_MISSES,
 };
 
-void cleanup(void) { /* Stub function. */ }
+void cleanup(void)
+{				/* Stub function. */
+}
 
-int
-main(void) {
+int main(void)
+{
 
 	unsigned long long count1, count2;
 	int fd1, fd2, ret;
 
 	fd1 = syscall(__NR_perf_event_open,
-			PERF_COUNT_INSTRUCTIONS, 0, 0, 0, -1);
+		      PERF_COUNT_INSTRUCTIONS, 0, 0, 0, -1);
 	if (fd1 < 0) {
 		tst_brkm(TBROK | TERRNO, cleanup,
-			"Failed to create PERF_COUNT_INSTRUCTIONS fd");
+			 "Failed to create PERF_COUNT_INSTRUCTIONS fd");
 	}
 	fd2 = syscall(__NR_perf_event_open,
-			PERF_COUNT_CACHE_MISSES, 0, 0, 0, -1);
+		      PERF_COUNT_CACHE_MISSES, 0, 0, 0, -1);
 	if (fd2 < 0) {
 		tst_brkm(TBROK | TERRNO, cleanup,
-			"Failed to create PERF_COUNT_CACHE_MISSES fd");
+			 "Failed to create PERF_COUNT_CACHE_MISSES fd");
 	}
 
 	do {
@@ -89,11 +91,11 @@
 
 			if (ret == sizeof(count2)) {
 				tst_resm(TINFO,
-					"counter1 value: %Ld instructions",
-					count1);
+					 "counter1 value: %Ld instructions",
+					 count1);
 				tst_resm(TINFO,
-					"counter2 value: %Ld cachemisses",
-					count2);
+					 "counter2 value: %Ld cachemisses",
+					 count2);
 				sleep(1);
 			}
 
diff --git a/testcases/kernel/performance_counters/performance_counter02.c b/testcases/kernel/performance_counters/performance_counter02.c
index 10b1a0c..9f07732 100644
--- a/testcases/kernel/performance_counters/performance_counter02.c
+++ b/testcases/kernel/performance_counters/performance_counter02.c
@@ -75,32 +75,32 @@
 #define PR_TASK_PERF_COUNTERS_ENABLE            32
 
 /* Global Variables */
-char *TCID     = "performance_counter02"; /* test program identifier.          */
-int  TST_TOTAL = 1;                  /* total number of tests in this file.   */
+char *TCID = "performance_counter02";	/* test program identifier.          */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 typedef unsigned int u32;
 typedef unsigned long long u64;
 typedef long long s64;
 
 struct perf_counter_hw_event {
-        s64                     type;
-        u64                     irq_period;
-        u32                     record_type;
+	s64 type;
+	u64 irq_period;
+	u32 record_type;
 
-        u32                     disabled     :  1, /* off by default */
-                                nmi          :  1, /* NMI sampling   */
-                                raw          :  1, /* raw event type */
-                                __reserved_1 : 29;
-        u64                     __reserved_2;
+	u32 disabled:1,		/* off by default */
+	 nmi:1,			/* NMI sampling   */
+	 raw:1,			/* raw event type */
+	 __reserved_1:29;
+	u64 __reserved_2;
 };
 
 enum hw_event_types {
-	PERF_COUNT_CYCLES		=  0,
-	PERF_COUNT_INSTRUCTIONS		=  1,
-	PERF_COUNT_CACHE_REFERENCES	=  2,
-	PERF_COUNT_CACHE_MISSES		=  3,
-	PERF_COUNT_BRANCH_INSTRUCTIONS	=  4,
-	PERF_COUNT_BRANCH_MISSES	=  5,
+	PERF_COUNT_CYCLES = 0,
+	PERF_COUNT_INSTRUCTIONS = 1,
+	PERF_COUNT_CACHE_REFERENCES = 2,
+	PERF_COUNT_CACHE_MISSES = 3,
+	PERF_COUNT_BRANCH_INSTRUCTIONS = 4,
+	PERF_COUNT_BRANCH_MISSES = 5,
 
 	/*
 	 * Special "software" counters provided by the kernel, even if
@@ -108,13 +108,13 @@
 	 * counters measure various physical and sw events of the
 	 * kernel (and allow the profiling of them as well):
 	 */
-	PERF_COUNT_CPU_CLOCK		= -1,
-	PERF_COUNT_TASK_CLOCK		= -2,
+	PERF_COUNT_CPU_CLOCK = -1,
+	PERF_COUNT_TASK_CLOCK = -2,
 	/*
 	 * Future software events:
 	 */
-	/* PERF_COUNT_PAGE_FAULTS	= -3,
-	   PERF_COUNT_CONTEXT_SWITCHES	= -4, */
+	/* PERF_COUNT_PAGE_FAULTS       = -3,
+	   PERF_COUNT_CONTEXT_SWITCHES  = -4, */
 };
 
 int sys_perf_counter_open(struct perf_counter_hw_event *hw_event,
@@ -132,13 +132,14 @@
 	int i;
 
 	for (i = 0; i < LOOPS; ++i)
-		asm volatile("" : : "g" (i));
+		asm volatile (""::"g" (i));
 }
 
-void cleanup(void) { /* Stub function. */ }
+void cleanup(void)
+{				/* Stub function. */
+}
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int tsk0;
 	int hwfd[MAX_CTRS], tskfd[MAX_CTRS];
@@ -182,18 +183,19 @@
 
 	tsk0 = sys_perf_counter_open(&tsk_event, 0, -1, -1, 0);
 	if (tsk0 == -1) {
-		tst_brkm(TBROK | TERRNO, cleanup, "perf_counter_open failed (1)");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "perf_counter_open failed (1)");
 	} else {
 
 		tsk_event.disabled = 0;
 		for (i = 0; i < n; ++i) {
-			hwfd[i] =  sys_perf_counter_open(&hw_event, 0, -1,
-							 -1, 0);
+			hwfd[i] = sys_perf_counter_open(&hw_event, 0, -1,
+							-1, 0);
 			tskfd[i] = sys_perf_counter_open(&tsk_event, 0, -1,
 							 hwfd[i], 0);
 			if (tskfd[i] == -1 || hwfd[i] == -1) {
 				tst_brkm(TBROK | TERRNO, cleanup,
-					"perf_counter_open failed (2)");
+					 "perf_counter_open failed (2)");
 			}
 		}
 	}
@@ -204,7 +206,7 @@
 
 	if (read(tsk0, &vt0, sizeof(vt0)) != sizeof(vt0)) {
 		tst_brkm(TBROK | TERRNO, cleanup,
-			"error reading task clock counter");
+			 "error reading task clock counter");
 	}
 
 	vtsum = vhsum = 0;
@@ -212,7 +214,7 @@
 		if (read(tskfd[i], &vt[i], sizeof(vt[i])) != sizeof(vt[i]) ||
 		    read(hwfd[i], &vh[i], sizeof(vh[i])) != sizeof(vh[i])) {
 			tst_brkm(TBROK | TERRNO, cleanup,
-				"error reading counter(s)");
+				 "error reading counter(s)");
 		}
 		vtsum += vt[i];
 		vhsum += vh[i];
diff --git a/testcases/kernel/power_management/get_sched_values.c b/testcases/kernel/power_management/get_sched_values.c
index 0b24df2..08260d5 100644
--- a/testcases/kernel/power_management/get_sched_values.c
+++ b/testcases/kernel/power_management/get_sched_values.c
@@ -17,15 +17,17 @@
 #include <stdio.h>
 #include "test.h"
 
-int get_supp_sched_mc(void) {
-	if (tst_kvercmp(2,6,29) < 0)
+int get_supp_sched_mc(void)
+{
+	if (tst_kvercmp(2, 6, 29) < 0)
 		return 1;
 	else
 		return 2;
 }
 
-int get_supp_sched_smt(void) {
-	if (tst_kvercmp(2,6,29) < 0)
+int get_supp_sched_smt(void)
+{
+	if (tst_kvercmp(2, 6, 29) < 0)
 		return 1;
 	else
 		return 2;
@@ -36,12 +38,11 @@
 	char *param;
 	if (argc == 0)
 		return 1;
-	else
-	{
+	else {
 		param = argv[1];
-		if (strcmp(param, "sched_mc")==0)
+		if (strcmp(param, "sched_mc") == 0)
 			return (get_supp_sched_mc());
-		if (strcmp(param, "sched_smt")==0)
-                        return (get_supp_sched_smt());
+		if (strcmp(param, "sched_smt") == 0)
+			return (get_supp_sched_smt());
 	}
 }
diff --git a/testcases/kernel/pty/hangup01.c b/testcases/kernel/pty/hangup01.c
index 39fbd15..495ca8d 100644
--- a/testcases/kernel/pty/hangup01.c
+++ b/testcases/kernel/pty/hangup01.c
@@ -37,8 +37,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="hangup01";            /* Test program identifier.    */
-int TST_TOTAL=5;                /* Total number of test cases. */
+char *TCID = "hangup01";	/* Test program identifier.    */
+int TST_TOTAL = 5;		/* Total number of test cases. */
 /**************/
 
 /*
@@ -54,12 +54,11 @@
 
 #define BUFSZ 4096
 
-void	cleanup(void);
+void cleanup(void);
 
 pid_t childpid;
 
-void
-cleanup(void)
+void cleanup(void)
 {
 
 	int status;
@@ -70,12 +69,12 @@
 		if (kill(childpid, 0) == 0 || errno == ESRCH) {
 
 			/* KILL IT! */
-			(void) kill(childpid, 15);
+			(void)kill(childpid, 15);
 
 			/* And take care of any leftover zombies. */
 			if (waitpid(childpid, &status, WNOHANG) < 0) {
-				tst_resm(TWARN|TERRNO,
-					"waitpid(%d, ...) failed", childpid);
+				tst_resm(TWARN | TERRNO,
+					 "waitpid(%d, ...) failed", childpid);
 			}
 
 		}
@@ -87,8 +86,7 @@
 /*
  * parent process for hangup test
  */
-void
-parent(int masterfd, int childpid)
+void parent(int masterfd, int childpid)
 {
 	char buf[BUFSZ];
 	struct pollfd pollfds[1];
@@ -101,13 +99,13 @@
 	pollfds[0].fd = masterfd;
 	pollfds[0].events = POLLIN;
 
-        sleep(1);
+	sleep(1);
 
 	while ((i = poll(pollfds, 1, -1)) == 1) {
 		if (read(masterfd, buf, len) == -1) {
 			++hangupcount;
 #ifdef DEBUG
-			tst_resm(TINFO,"hangup %d", hangupcount);
+			tst_resm(TINFO, "hangup %d", hangupcount);
 #endif
 			if (hangupcount == NUMMESSAGES) {
 				break;
@@ -117,30 +115,30 @@
 			switch (datacount) {
 			case 1:
 				if (strncmp(buf, MESSAGE1,
-				    strlen(MESSAGE1)) != 0) {
+					    strlen(MESSAGE1)) != 0) {
 					tst_brkm(TFAIL, cleanup,
-						"unexpected message 1");
+						 "unexpected message 1");
 				}
 				len = strlen(MESSAGE2);
 				break;
 			case 2:
 				if (strncmp(buf, MESSAGE2,
-				    strlen(MESSAGE2)) != 0) {
+					    strlen(MESSAGE2)) != 0) {
 					tst_brkm(TFAIL, cleanup,
-						"unexpected message 2");
+						 "unexpected message 2");
 				}
 				len = strlen(MESSAGE3);
 				break;
 			case 3:
 				if (strncmp(buf, MESSAGE3,
-				    strlen(MESSAGE3)) != 0) {
+					    strlen(MESSAGE3)) != 0) {
 					tst_brkm(TFAIL, cleanup,
-						"unexpected message 3");
+						 "unexpected message 3");
 				}
 				break;
 			default:
 				tst_brkm(TFAIL, cleanup,
-					"unexpected data message");
+					 "unexpected data message");
 
 			}
 		}
@@ -151,15 +149,14 @@
 	while (waitpid(childpid, &status, WNOHANG) < 0 && errno != ESRCH) ;
 
 	tst_resm((status == 0 ? TPASS : TFAIL),
-		"child process exited with status %d", status);
+		 "child process exited with status %d", status);
 }
 
 /*
  * Child process for hangup test.  Write three messages to the slave
  * pty, with a hangup after each.
  */
-int
-child(int masterfd)
+int child(int masterfd)
 {
 	int slavefd;
 	char *slavename;
@@ -219,21 +216,21 @@
 /*--------------------------------------------------------------------*/
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "open %s", MASTERCLONE);
+		tst_brkm(TBROK | TERRNO, NULL, "open %s", MASTERCLONE);
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "ptsname");
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname");
 
 	if (grantpt(masterfd) != 0)
-		tst_brkm(TBROK|TERRNO, NULL, "grantpt");
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt");
 
 	if (unlockpt(masterfd) != 0)
-		tst_brkm(TBROK|TERRNO, NULL, "unlockpt");
+		tst_brkm(TBROK | TERRNO, NULL, "unlockpt");
 
 	childpid = fork();
 	if (childpid == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "fork");
+		tst_brkm(TBROK | TERRNO, NULL, "fork");
 	else if (childpid == 0)
 		exit(child(masterfd));
 	else
diff --git a/testcases/kernel/pty/ptem01.c b/testcases/kernel/pty/ptem01.c
index 7ecbdac..a63dd96 100644
--- a/testcases/kernel/pty/ptem01.c
+++ b/testcases/kernel/pty/ptem01.c
@@ -38,8 +38,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="ptem01";            /* Test program identifier.    */
-int TST_TOTAL=6;                /* Total number of test cases. */
+char *TCID = "ptem01";		/* Test program identifier.    */
+int TST_TOTAL = 6;		/* Total number of test cases. */
 /**************/
 
 /*
@@ -52,8 +52,7 @@
 /*
  * test termio/termios ioctls
  */
-int
-test1(void)
+int test1(void)
 {
 	int masterfd, slavefd;
 	char *slavename;
@@ -62,86 +61,86 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK|TERRNO, "ptsname() call failed");
+		tst_resm(TBROK | TERRNO, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK|TERRNO, "grantpt() call failed");
+		tst_resm(TBROK | TERRNO, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK,"unlockpt() call failed");
+		tst_resm(TBROK, "unlockpt() call failed");
 		tst_exit();
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL,"Could not open %s",slavename);
+		tst_resm(TFAIL, "Could not open %s", slavename);
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCGETS, &termios) != 0) {
-		tst_resm(TFAIL,"TCGETS");
+		tst_resm(TFAIL, "TCGETS");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL,"TCSETS");
+		tst_resm(TFAIL, "TCSETS");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETSW, &termios) != 0) {
-		tst_resm(TFAIL,"TCSETSW");
+		tst_resm(TFAIL, "TCSETSW");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETSF, &termios) != 0) {
-		tst_resm(TFAIL,"TCSETSF");
+		tst_resm(TFAIL, "TCSETSF");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL,"TCSETS");
+		tst_resm(TFAIL, "TCSETS");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCGETA, &termio) != 0) {
-		tst_resm(TFAIL,"TCGETA");
+		tst_resm(TFAIL, "TCGETA");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETA, &termio) != 0) {
-		tst_resm(TFAIL,"TCSETA");
+		tst_resm(TFAIL, "TCSETA");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETAW, &termio) != 0) {
-		tst_resm(TFAIL,"TCSETAW");
+		tst_resm(TFAIL, "TCSETAW");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCSETAF, &termio) != 0) {
-		tst_resm(TFAIL,"TCSETAF");
+		tst_resm(TFAIL, "TCSETAF");
 		tst_exit();
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK,"close slave");
+		tst_resm(TBROK, "close slave");
 		tst_exit();
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK,"close master");
+		tst_resm(TBROK, "close master");
 		tst_exit();
 	}
-	tst_resm(TPASS,"test1");
+	tst_resm(TPASS, "test1");
 
 	/** NOT REACHED **/
 	return 0;
@@ -150,49 +149,48 @@
 /*
  * test window size setting and getting
  */
-int
-test2(void)
+int test2(void)
 {
 	int masterfd, slavefd;
 	char *slavename;
 	struct winsize wsz;
-	struct winsize wsz1 = {24, 80, 5, 10};
-	struct winsize wsz2 = {60, 100, 11, 777};
+	struct winsize wsz1 = { 24, 80, 5, 10 };
+	struct winsize wsz2 = { 60, 100, 11, 777 };
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK|TERRNO, "ptsname() call failed");
+		tst_resm(TBROK | TERRNO, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK|TERRNO, "grantpt() call failed");
+		tst_resm(TBROK | TERRNO, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK,"unlockpt() call failed");
+		tst_resm(TBROK, "unlockpt() call failed");
 		tst_exit();
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK,"Could not open %s",slavename);
+		tst_resm(TBROK, "Could not open %s", slavename);
 		tst_exit();
 	}
 
 	if (ioctl(masterfd, TIOCSWINSZ, &wsz1) != 0) {
-		tst_resm(TFAIL,"TIOCSWINSZ");
+		tst_resm(TFAIL, "TIOCSWINSZ");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL,"TIOCGWINSZ");
+		tst_resm(TFAIL, "TIOCGWINSZ");
 		tst_exit();
 	}
 
@@ -204,7 +202,7 @@
 	}
 
 	if (ioctl(masterfd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL,"TIOCGWINSZ");
+		tst_resm(TFAIL, "TIOCGWINSZ");
 		tst_exit();
 	}
 
@@ -216,12 +214,12 @@
 	}
 
 	if (ioctl(slavefd, TIOCSWINSZ, &wsz2) != 0) {
-		tst_resm(TFAIL,"TIOCSWINSZ");
+		tst_resm(TFAIL, "TIOCSWINSZ");
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TIOCGWINSZ, &wsz) != 0) {
-		tst_resm(TFAIL,"TIOCGWINSZ");
+		tst_resm(TFAIL, "TIOCGWINSZ");
 		tst_exit();
 	}
 
@@ -233,15 +231,15 @@
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK,"close");
+		tst_resm(TBROK, "close");
 		tst_exit();
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK,"close");
+		tst_resm(TBROK, "close");
 		tst_exit();
 	}
-	tst_resm(TPASS,"test2");
+	tst_resm(TPASS, "test2");
 
 	/** NOT REACHED **/
 	return 0;
@@ -250,59 +248,58 @@
 /*
  * test sending a break
  */
-int
-test3(void)
+int test3(void)
 {
 	int masterfd, slavefd;
 	char *slavename;
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK|TERRNO, "ptsname() call failed");
+		tst_resm(TBROK | TERRNO, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK|TERRNO, "grantpt() call failed");
+		tst_resm(TBROK | TERRNO, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK,"unlockpt() call failed");
+		tst_resm(TBROK, "unlockpt() call failed");
 		tst_exit();
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK,"Could not open %s",slavename);
+		tst_resm(TBROK, "Could not open %s", slavename);
 		tst_exit();
 	}
 
 	if (tcsendbreak(masterfd, 10) != 0) {
-		tst_resm(TFAIL,"tcsendbreak");
+		tst_resm(TFAIL, "tcsendbreak");
 		tst_exit();
 	}
 
 	if (tcsendbreak(slavefd, 10) != 0) {
-		tst_resm(TFAIL,"tcsendbreak");
+		tst_resm(TFAIL, "tcsendbreak");
 		tst_exit();
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK,"close slave");
+		tst_resm(TBROK, "close slave");
 		tst_exit();
 	}
 
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK,"close master");
+		tst_resm(TBROK, "close master");
 		tst_exit();
 	}
-	tst_resm(TPASS,"test3");
+	tst_resm(TPASS, "test3");
 
 	/** NOT REACHED **/
 	return 0;
@@ -311,66 +308,65 @@
 /*
  * test multiple opens of slave side
  */
-int
-test4(void)
+int test4(void)
 {
 	int masterfd, slavefd, slavefd2, slavefd3;
 	char *slavename;
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK|TERRNO, "ptsname() call failed");
+		tst_resm(TBROK | TERRNO, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK|TERRNO, "grantpt() call failed");
+		tst_resm(TBROK | TERRNO, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK,"unlockpt() call failed");
+		tst_resm(TBROK, "unlockpt() call failed");
 		tst_exit();
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK,"Could not open %s",slavename);
+		tst_resm(TBROK, "Could not open %s", slavename);
 		tst_exit();
 	}
 
 	if ((slavefd2 = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL,"Could not open %s (again)",slavename);
+		tst_resm(TFAIL, "Could not open %s (again)", slavename);
 		tst_exit();
 	}
 
 	if ((slavefd3 = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TFAIL,"Could not open %s (once more)",slavename);
+		tst_resm(TFAIL, "Could not open %s (once more)", slavename);
 		tst_exit();
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK,"close slave");
+		tst_resm(TBROK, "close slave");
 		tst_exit();
 	}
 	if (close(slavefd2) != 0) {
-		tst_resm(TBROK,"close slave again");
+		tst_resm(TBROK, "close slave again");
 		tst_exit();
 	}
 	if (close(slavefd3) != 0) {
-		tst_resm(TBROK,"close slave once more");
+		tst_resm(TBROK, "close slave once more");
 		tst_exit();
 	}
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK,"close master");
+		tst_resm(TBROK, "close master");
 		tst_exit();
 	}
-	tst_resm(TPASS,"test4");
+	tst_resm(TPASS, "test4");
 
 	/** NOT REACHED **/
 	return 0;
@@ -381,8 +377,7 @@
 /*
  * test several simultaneous opens
  */
-int
-test5(void)
+int test5(void)
 {
 	static int masterfd[NUMOPENS];
 	static int slavefd[NUMOPENS];
@@ -392,14 +387,14 @@
 	for (i = 0; i < NUMOPENS; ++i) {
 		masterfd[i] = open(MASTERCLONE, O_RDWR);
 		if (masterfd[i] < 0) {
-			tst_resm(TBROK,"%s",MASTERCLONE);
+			tst_resm(TBROK, "%s", MASTERCLONE);
 			tst_resm(TBROK, "out of ptys");
 			for (i = 0; i < NUMOPENS; ++i) {
 				if (masterfd[i] != 0) {
-					(void) close(masterfd[i]);
+					(void)close(masterfd[i]);
 				}
 				if (slavefd[i] != 0) {
-					(void) close(slavefd[i]);
+					(void)close(slavefd[i]);
 				}
 			}
 			tst_exit();
@@ -407,22 +402,23 @@
 
 		slavename = ptsname(masterfd[i]);
 		if (slavename == NULL) {
-			tst_resm(TBROK|TERRNO, "ptsname() call failed");
+			tst_resm(TBROK | TERRNO, "ptsname() call failed");
 			tst_exit();
 		}
 
 		if (grantpt(masterfd[i]) != 0) {
-			tst_resm(TBROK|TERRNO, "grantpt() call failed");
+			tst_resm(TBROK | TERRNO, "grantpt() call failed");
 			tst_exit();
 		}
 
 		if (unlockpt(masterfd[i]) != 0) {
-			tst_resm(TBROK,"unlockpt() call failed");
+			tst_resm(TBROK, "unlockpt() call failed");
 			tst_exit();
 		}
 
 		if ((slavefd[i] = open(slavename, O_RDWR)) < 0) {
-			tst_resm(TFAIL,"Iteration %d: Could not open %s",i,slavename);
+			tst_resm(TFAIL, "Iteration %d: Could not open %s", i,
+				 slavename);
 			tst_exit();
 		}
 
@@ -430,15 +426,15 @@
 
 	for (i = 0; i < NUMOPENS; ++i) {
 		if (close(slavefd[i]) != 0) {
-			tst_resm(TBROK,"Iteration %d: close slave",i);
+			tst_resm(TBROK, "Iteration %d: close slave", i);
 			tst_exit();
 		}
 		if (close(masterfd[i]) != 0) {
-			tst_resm(TBROK,"close master");
+			tst_resm(TBROK, "close master");
 			tst_exit();
 		}
 	}
-	tst_resm(TPASS,"test5");
+	tst_resm(TPASS, "test5");
 
 	/** NOT REACHED **/
 	return 0;
@@ -447,8 +443,7 @@
 /*
  * test hangup semantics
  */
-int
-test6(void)
+int test6(void)
 {
 	static int masterfd;
 	static int slavefd;
@@ -457,52 +452,52 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_resm(TBROK|TERRNO, "ptsname() call failed");
+		tst_resm(TBROK | TERRNO, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK|TERRNO, "grantpt() call failed");
+		tst_resm(TBROK | TERRNO, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_resm(TBROK,"unlockpt() call failed");
+		tst_resm(TBROK, "unlockpt() call failed");
 		tst_exit();
 	}
 
 	if ((slavefd = open(slavename, O_RDWR)) < 0) {
-		tst_resm(TBROK,"Could not open %s",slavename);
+		tst_resm(TBROK, "Could not open %s", slavename);
 		tst_exit();
 	}
 
 	if (ioctl(slavefd, TCGETS, &termios) != 0) {
-		tst_resm(TFAIL,"TCGETS");
+		tst_resm(TFAIL, "TCGETS");
 		tst_exit();
 	}
 
 	termios.c_cflag &= ~CBAUD;
-	termios.c_cflag |= B0&CBAUD;
+	termios.c_cflag |= B0 & CBAUD;
 	if (ioctl(slavefd, TCSETS, &termios) != 0) {
-		tst_resm(TFAIL,"TCGETS");
+		tst_resm(TFAIL, "TCGETS");
 		tst_exit();
 	}
 
 	if (close(slavefd) != 0) {
-		tst_resm(TBROK,"close");
+		tst_resm(TBROK, "close");
 		tst_exit();
 	}
 	if (close(masterfd) != 0) {
-		tst_resm(TBROK,"close");
+		tst_resm(TBROK, "close");
 		tst_exit();
 	}
-	tst_resm(TPASS,"test6");
+	tst_resm(TPASS, "test6");
 
 	/** NOT REACHED **/
 	return 0;
@@ -511,8 +506,7 @@
 /*
  * main test driver
  */
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	test1();
 	test2();
@@ -521,7 +515,7 @@
 	test5();
 	test6();
 	/*
- 	 * all done
+	 * all done
 	 */
 	tst_exit();
 
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
index 6136265..8d20498 100644
--- a/testcases/kernel/pty/pty01.c
+++ b/testcases/kernel/pty/pty01.c
@@ -39,8 +39,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="pty01";            /* Test program identifier.    */
-int TST_TOTAL=5;                /* Total number of test cases. */
+char *TCID = "pty01";		/* Test program identifier.    */
+int TST_TOTAL = 5;		/* Total number of test cases. */
 /**************/
 
 /*
@@ -71,8 +71,7 @@
 /*
  * test slave locking
  */
-static int
-test1(void)
+static int test1(void)
 {
 	int masterfd;		/* master pty fd */
 	int slavefd;		/* slave pty fd */
@@ -82,20 +81,20 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, MASTERCLONE);
+		tst_brkm(TBROK | TERRNO, NULL, MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == NULL) {
-		tst_brkm(TBROK|TERRNO, NULL, "ptsname() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "grantpt() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (stat(slavename, &st) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "stat(%s) failed", slavename);
+		tst_brkm(TBROK | TERRNO, NULL, "stat(%s) failed", slavename);
 	}
 	if (st.st_uid != getuid()) {
 		tst_brkm(TBROK, NULL, "uid mismatch");
@@ -111,7 +110,7 @@
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlockpt() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "unlockpt() failed");
 	}
 
 	slavefd = open(slavename, O_RDWR);
@@ -127,16 +126,17 @@
 		 * XXX: the errno printout might be garbage, but better to be
 		 * safe than sorry..
 		 */
-		tst_brkm(TFAIL|TERRNO, NULL, "write to master");
+		tst_brkm(TFAIL | TERRNO, NULL, "write to master");
 	}
 
 	if (read(slavefd, buf, strlen(STRING)) != strlen(STRING)) {
 		/* XXX: Same as write above.. */
-		tst_brkm(TFAIL|TERRNO, NULL, "read from slave");
+		tst_brkm(TFAIL | TERRNO, NULL, "read from slave");
 	}
-	if (strncmp(STRING, buf,strlen(STRING)-1) != 0) {
+	if (strncmp(STRING, buf, strlen(STRING) - 1) != 0) {
 		tst_brkm(TFAIL, NULL,
-			"strings are different (STRING = '%s' != buf = '%s')", STRING, buf);
+			 "strings are different (STRING = '%s' != buf = '%s')",
+			 STRING, buf);
 	}
 
 	/*
@@ -144,45 +144,45 @@
 	 */
 	if (write(slavefd, STRING, strlen(STRING)) != strlen(STRING)) {
 		/* XXX: Same as write above.. */
-		tst_brkm(TFAIL|TERRNO, NULL, "write to slave");
+		tst_brkm(TFAIL | TERRNO, NULL, "write to slave");
 	}
 
 	if (read(masterfd, buf, strlen(STRING)) != strlen(STRING)) {
 		/* XXX: Same as write above.. */
-		tst_brkm(TFAIL|TERRNO, NULL, "read from master");
+		tst_brkm(TFAIL | TERRNO, NULL, "read from master");
 	}
-	if (strncmp(STRING, buf,strlen(STRING)-1) != 0) {
+	if (strncmp(STRING, buf, strlen(STRING) - 1) != 0) {
 		tst_brkm(TFAIL, NULL,
-			"strings are different (STRING = '%s' != buf = '%s').",
-			STRING, buf);
+			 "strings are different (STRING = '%s' != buf = '%s').",
+			 STRING, buf);
 	}
 
 	/*
 	 * try an invalid ioctl on the slave...
 	 */
-	if (ioctl(slavefd, TIOCGWINSZ, NULL) == 0)  {
+	if (ioctl(slavefd, TIOCGWINSZ, NULL) == 0) {
 		tst_brkm(TFAIL, NULL,
-			"invalid slave TIOCGWINSZ ioctl succeeded.. it should "
-			"have failed");
+			 "invalid slave TIOCGWINSZ ioctl succeeded.. it should "
+			 "have failed");
 	}
 
 	/*
 	 * try an invalid ioctl on the master...
 	 */
-	if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0)  {
+	if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) {
 		tst_brkm(TFAIL, NULL,
-			"invalid master TIOCGWINSZ ioctl succeeded.. it should "
-			"have failed");
+			 "invalid master TIOCGWINSZ ioctl succeeded.. it should "
+			 "have failed");
 	}
 
 	/*
 	 * close pty fds
 	 */
 	if (close(slavefd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "close of slave");
+		tst_brkm(TBROK | TERRNO, NULL, "close of slave");
 	}
 	if (close(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "close of master");
+		tst_brkm(TBROK | TERRNO, NULL, "close of master");
 	}
 	tst_resm(TPASS, "test1");
 	/** NOTREACHED **/
@@ -192,8 +192,7 @@
 /*
  * test slave operations with closed master
  */
-static void
-test2(void)
+static void test2(void)
 {
 	int masterfd;		/* master pty fd */
 	int slavefd;		/* slave pty fd */
@@ -203,25 +202,25 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, MASTERCLONE);
+		tst_brkm(TBROK | TERRNO, NULL, MASTERCLONE);
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == (char *)0) {
-		tst_brkm(TBROK|TERRNO, NULL, "ptsname() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "grantpt() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "grantpt() call failed");
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlockpt() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "unlockpt() call failed");
 	}
 
 	slavefd = open(slavename, O_RDWR);
 	if (slavefd < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "Could not open %s", slavename);
+		tst_brkm(TBROK | TERRNO, NULL, "Could not open %s", slavename);
 	}
 
 	/*
@@ -229,25 +228,25 @@
 	 * first.
 	 */
 	if (close(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "close()");
+		tst_brkm(TBROK | TERRNO, NULL, "close()");
 	}
 
 	errno = 0;
 	if ((i = read(slavefd, &c, 1)) == 1) {
 		tst_brkm(TFAIL, NULL,
-			"reading from slave fd should have failed, but didn't"
-			"(read '%c')", c);
+			 "reading from slave fd should have failed, but didn't"
+			 "(read '%c')", c);
 	}
 
 	if ((i = write(slavefd, &c, 1)) == 1) {
 		tst_brkm(TFAIL, NULL,
-			"writing to slave fd should have failed, but didn't");
+			 "writing to slave fd should have failed, but didn't");
 	}
 
-	if (ioctl(slavefd, TIOCGWINSZ, NULL) == 0)  {
+	if (ioctl(slavefd, TIOCGWINSZ, NULL) == 0) {
 		tst_brkm(TFAIL, NULL,
-			"trying TIOCGWINSZ on slave fd should have failed, "
-			"but didn't");
+			 "trying TIOCGWINSZ on slave fd should have failed, "
+			 "but didn't");
 	}
 
 	if (close(slavefd) != 0) {
@@ -259,8 +258,7 @@
 /*
  * test operations on master with closed slave
  */
-static void
-test3(void)
+static void test3(void)
 {
 	int masterfd;		/* master pty fd */
 
@@ -269,19 +267,18 @@
 		tst_brkm(TBROK, NULL, MASTERCLONE);
 	}
 
-	if (ioctl(masterfd, TIOCGWINSZ, (char *)0) == 0)  {
-		tst_brkm(TFAIL|TERRNO, NULL,
-			"trying TIOCGWINSZ on master with no open slave "
-			"succeeded unexpectedly");
+	if (ioctl(masterfd, TIOCGWINSZ, (char *)0) == 0) {
+		tst_brkm(TFAIL | TERRNO, NULL,
+			 "trying TIOCGWINSZ on master with no open slave "
+			 "succeeded unexpectedly");
 	}
-	tst_resm(TPASS,"test3");
+	tst_resm(TPASS, "test3");
 }
 
 /*
  * test multiple opens on slave side of pty
  */
-static void
-test4(void)
+static void test4(void)
 {
 	int masterfd;		/* master pty fd */
 	int slavefd;		/* slave pty fd */
@@ -291,47 +288,47 @@
 
 	masterfd = open(MASTERCLONE, O_RDWR);
 	if (masterfd < 0) {
-		tst_resm(TBROK,"%s",MASTERCLONE);
+		tst_resm(TBROK, "%s", MASTERCLONE);
 		tst_exit();
 	}
 
 	slavename = ptsname(masterfd);
 	if (slavename == (char *)0) {
-		tst_resm(TBROK,"ptsname() call failed");
+		tst_resm(TBROK, "ptsname() call failed");
 		tst_exit();
 	}
 
 	if (grantpt(masterfd) != 0) {
-		tst_resm(TBROK,"grantpt() call failed");
+		tst_resm(TBROK, "grantpt() call failed");
 		tst_exit();
 	}
 
 	if (unlockpt(masterfd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlockpt() call failed");
+		tst_brkm(TBROK | TERRNO, NULL, "unlockpt() call failed");
 	}
 
 	slavefd = open(slavename, O_RDWR);
 	if (slavefd < 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "Could not open %s", slavename);
+		tst_brkm(TBROK | TERRNO, NULL, "Could not open %s", slavename);
 	}
 
 	slavefd2 = open(slavename, O_RDWR);
 	if (slavefd < 0) {
-		tst_brkm(TFAIL|TERRNO, NULL, "Could not open %s (again)",
-			slavename);
+		tst_brkm(TFAIL | TERRNO, NULL, "Could not open %s (again)",
+			 slavename);
 	}
 
 	slavefd3 = open(slavename, O_RDWR);
 	if (slavefd < 0) {
-		tst_brkm(TFAIL|TERRNO, NULL, "Could not open %s (once more)",
-			slavename);
+		tst_brkm(TFAIL | TERRNO, NULL, "Could not open %s (once more)",
+			 slavename);
 	}
 
 	/*
 	 * close pty fds.
 	 */
 	if (close(slavefd) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "close slave");
+		tst_brkm(TBROK | TERRNO, NULL, "close slave");
 	}
 
 	if (close(slavefd2) != 0) {
@@ -345,7 +342,7 @@
 	if (close(masterfd) != 0) {
 		tst_brkm(TBROK, NULL, "close master");
 	}
-	tst_resm(TPASS,"test4");
+	tst_resm(TPASS, "test4");
 }
 
 /*
@@ -353,8 +350,7 @@
  * of ptys for this test depending on how the system is configured,
  * but that's not a fatal error.
  */
-static void
-test5(void)
+static void test5(void)
 {
 	int masterfd;		/* master pty fd */
 	char *slavename;
@@ -370,24 +366,24 @@
 			masterfd = open(MASTERCLONE, O_RDWR);
 			if (masterfd < 0) {
 				printf("proc %d: opening %s failed: %s",
-					i, MASTERCLONE, strerror(errno));
+				       i, MASTERCLONE, strerror(errno));
 				exit(1);
 			}
 			if (grantpt(masterfd) != 0) {
 				printf("proc %d: grantpt() call failed: %s",
-					i, strerror(errno));
+				       i, strerror(errno));
 				exit(1);
 			}
 			slavename = ptsname(masterfd);
 			if (slavename == NULL) {
 				printf("proc %d: ptsname() call failed: %s",
-					i, strerror(errno));
+				       i, strerror(errno));
 				exit(1);
 			}
 			sleep(10);
 			if (close(masterfd) != 0) {
 				printf("proc %d: close failed: %s",
-					i, strerror(errno));
+				       i, strerror(errno));
 				exit(1);
 			}
 			exit(0);
@@ -398,7 +394,8 @@
 	while (wait(&status) > 0) {
 		if (status) {
 			tst_brkm(TFAIL, NULL,
-				"child exited with non-zero status %d", status);
+				 "child exited with non-zero status %d",
+				 status);
 		}
 	}
 	tst_resm(TPASS, "test5");
@@ -407,8 +404,7 @@
 /*
  * main test driver
  */
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	test1();
 	test2();
@@ -417,7 +413,7 @@
 	test5();
 
 	/*
- 	 * all done
+	 * all done
 	 */
 	tst_exit();
 }
diff --git a/testcases/kernel/sched/cfs-scheduler/hackbench.c b/testcases/kernel/sched/cfs-scheduler/hackbench.c
index 8908104..707a912 100644
--- a/testcases/kernel/sched/cfs-scheduler/hackbench.c
+++ b/testcases/kernel/sched/cfs-scheduler/hackbench.c
@@ -61,9 +61,9 @@
 
 #define SAFE_FREE(p) { if (p) { free(p); (p)=NULL; } }
 #define DATASIZE 100
-static struct sender_context ** snd_ctx_tab;      /*Table for sender context pointers.*/
-static struct receiver_context ** rev_ctx_tab;    /*Table for receiver context pointers.*/
-static int gr_num = 0;                            /*For group calculation */
+static struct sender_context **snd_ctx_tab;	/*Table for sender context pointers. */
+static struct receiver_context **rev_ctx_tab;	/*Table for receiver context pointers. */
+static int gr_num = 0;		/*For group calculation */
 static unsigned int loops = 100;
 /*
  * 0 means thread mode and others mean process (default)
@@ -94,7 +94,8 @@
 
 static void print_usage_exit()
 {
-	printf("Usage: hackbench [-pipe] <num groups> [process|thread] [loops]\n");
+	printf
+	    ("Usage: hackbench [-pipe] <num groups> [process|thread] [loops]\n");
 	exit(1);
 }
 
@@ -114,7 +115,7 @@
 static void ready(int ready_out, int wakefd)
 {
 	char dummy;
-	struct pollfd pollfd = { .fd = wakefd, .events = POLLIN };
+	struct pollfd pollfd = {.fd = wakefd,.events = POLLIN };
 
 	/* Tell them we're ready. */
 	if (write(ready_out, &dummy, 1) != 1)
@@ -139,7 +140,9 @@
 			int ret, done = 0;
 
 again:
-			ret = write(ctx->out_fds[j], data + done, sizeof(data)-done);
+			ret =
+			    write(ctx->out_fds[j], data + done,
+				  sizeof(data) - done);
 			if (ret < 0)
 				barf("SENDER: write");
 			done += ret;
@@ -152,7 +155,7 @@
 }
 
 /* One receiver per fd */
-static void *receiver(struct receiver_context* ctx)
+static void *receiver(struct receiver_context *ctx)
 {
 	unsigned int i;
 
@@ -179,7 +182,7 @@
 	return NULL;
 }
 
-pthread_t create_worker(void *ctx, void *(*func)(void *))
+pthread_t create_worker(void *ctx, void *(*func) (void *))
 {
 	pthread_attr_t attr;
 	pthread_t childid;
@@ -189,10 +192,11 @@
 		/* process mode */
 		/* Fork the receiver. */
 		switch (fork()) {
-			case -1: barf("fork()");
-			case 0:
-				(*func) (ctx);
-				exit(0);
+		case -1:
+			barf("fork()");
+		case 0:
+			(*func) (ctx);
+			exit(0);
 		}
 
 		return (pthread_t) 0;
@@ -206,8 +210,9 @@
 		barf("pthread_attr_setstacksize");
 #endif
 
-	if ((err=pthread_create(&childid, &attr, func, ctx)) != 0) {
-		fprintf(stderr, "pthread_create failed: %s (%d)\n", strerror(err), err);
+	if ((err = pthread_create(&childid, &attr, func, ctx)) != 0) {
+		fprintf(stderr, "pthread_create failed: %s (%d)\n",
+			strerror(err), err);
 		exit(-1);
 	}
 	return (childid);
@@ -230,32 +235,30 @@
 }
 
 /* One group of senders and receivers */
-static unsigned int group(pthread_t *pth,
-		unsigned int num_fds,
-		int ready_out,
-		int wakefd)
+static unsigned int group(pthread_t * pth,
+			  unsigned int num_fds, int ready_out, int wakefd)
 {
 	unsigned int i;
-	struct sender_context* snd_ctx = malloc (sizeof(struct sender_context)
-			+num_fds*sizeof(int));
+	struct sender_context *snd_ctx = malloc(sizeof(struct sender_context)
+						+ num_fds * sizeof(int));
 	if (!snd_ctx)
-	    barf("malloc()");
-        else
-            snd_ctx_tab[gr_num] = snd_ctx;
+		barf("malloc()");
+	else
+		snd_ctx_tab[gr_num] = snd_ctx;
 
 	for (i = 0; i < num_fds; i++) {
 		int fds[2];
-		struct receiver_context* ctx = malloc (sizeof(*ctx));
+		struct receiver_context *ctx = malloc(sizeof(*ctx));
 
 		if (!ctx)
 			barf("malloc()");
-                else
-                	rev_ctx_tab[gr_num * num_fds + i] = ctx;
+		else
+			rev_ctx_tab[gr_num * num_fds + i] = ctx;
 
 		/* Create the pipe between client and server */
 		fdpair(fds);
 
-		ctx->num_packets = num_fds*loops;
+		ctx->num_packets = num_fds * loops;
 		ctx->in_fds[0] = fds[0];
 		ctx->in_fds[1] = fds[1];
 		ctx->ready_out = ready_out;
@@ -274,7 +277,8 @@
 		snd_ctx->wakefd = wakefd;
 		snd_ctx->num_fds = num_fds;
 
-		pth[num_fds+i] = create_worker(snd_ctx, (void *)(void *)sender);
+		pth[num_fds + i] =
+		    create_worker(snd_ctx, (void *)(void *)sender);
 	}
 
 	/* Close the fds we have left */
@@ -282,14 +286,14 @@
 		for (i = 0; i < num_fds; i++)
 			close(snd_ctx->out_fds[i]);
 
-        gr_num++;
+	gr_num++;
 	/* Return number of children to reap */
 	return num_fds * 2;
 }
 
 int main(int argc, char *argv[])
 {
-	unsigned int i, j,num_groups = 10, total_children;
+	unsigned int i, j, num_groups = 10, total_children;
 	struct timeval start, stop, diff;
 	unsigned int num_fds = 20;
 	int readyfds[2], wakefds[2];
@@ -306,7 +310,7 @@
 		print_usage_exit();
 
 	printf("Running with %d*40 (== %d) tasks.\n",
-		num_groups, num_groups*40);
+	       num_groups, num_groups * 40);
 
 	fflush(NULL);
 
@@ -323,9 +327,9 @@
 		loops = atoi(argv[3]);
 
 	pth_tab = malloc(num_fds * 2 * num_groups * sizeof(pthread_t));
-        snd_ctx_tab = malloc(num_groups * sizeof(void*));
-        rev_ctx_tab = malloc(num_groups * num_fds * sizeof(void*));
- 	if (!pth_tab || !snd_ctx_tab || !rev_ctx_tab)
+	snd_ctx_tab = malloc(num_groups * sizeof(void *));
+	rev_ctx_tab = malloc(num_groups * num_fds * sizeof(void *));
+	if (!pth_tab || !snd_ctx_tab || !rev_ctx_tab)
 		barf("main:malloc()");
 
 	fdpair(readyfds);
@@ -333,7 +337,9 @@
 
 	total_children = 0;
 	for (i = 0; i < num_groups; i++)
-		total_children += group(pth_tab+total_children, num_fds, readyfds[1], wakefds[0]);
+		total_children +=
+		    group(pth_tab + total_children, num_fds, readyfds[1],
+			  wakefds[0]);
 
 	/* Wait for everyone to be ready */
 	for (i = 0; i < total_children; i++)
@@ -354,17 +360,17 @@
 
 	/* Print time... */
 	timersub(&stop, &start, &diff);
-        printf("Time: %lu.%03lu\n", diff.tv_sec, diff.tv_usec/1000);
+	printf("Time: %lu.%03lu\n", diff.tv_sec, diff.tv_usec / 1000);
 
-        /* free the memory */
-        for (i = 0; i < num_groups; i++) {
-            for (j = 0; j < num_fds; j++) {
-                SAFE_FREE(rev_ctx_tab[i*num_fds+j])
-            }
-            SAFE_FREE(snd_ctx_tab[i]);
-        }
-        SAFE_FREE(pth_tab);
-        SAFE_FREE(snd_ctx_tab);
-        SAFE_FREE(rev_ctx_tab);
-        exit(0);
+	/* free the memory */
+	for (i = 0; i < num_groups; i++) {
+		for (j = 0; j < num_fds; j++) {
+			SAFE_FREE(rev_ctx_tab[i * num_fds + j])
+		}
+		SAFE_FREE(snd_ctx_tab[i]);
+	}
+	SAFE_FREE(pth_tab);
+	SAFE_FREE(snd_ctx_tab);
+	SAFE_FREE(rev_ctx_tab);
+	exit(0);
 }
diff --git a/testcases/kernel/sched/clisrv/pthcli.c b/testcases/kernel/sched/clisrv/pthcli.c
index 310bd89..3bcd688 100644
--- a/testcases/kernel/sched/clisrv/pthcli.c
+++ b/testcases/kernel/sched/clisrv/pthcli.c
@@ -51,108 +51,102 @@
 #include <stdlib.h>
 #define MAXLINE 1024
 
-void noprintf(char* string, ...) {
+void noprintf(char *string, ...)
+{
 }
 
 /* Read contents of FILE *fp. Write each line to socket, then
    read line back from socket and write to standard output.
    Return to caller when done */
 
-void
-str_cli(fp, sockfd)
+void str_cli(fp, sockfd)
 register FILE *fp;
 register int sockfd;
 {
-    int n;
-    char sendline[MAXLINE], recvline[MAXLINE + 1];
-    prtln();
-    while (fgets(sendline, MAXLINE, fp) != NULL)
-        {
-	    n = strlen(sendline);
+	int n;
+	char sendline[MAXLINE], recvline[MAXLINE + 1];
+	prtln();
+	while (fgets(sendline, MAXLINE, fp) != NULL) {
+		n = strlen(sendline);
 
-	    dprt("%s: str_cli(): sendline = %s", __FILE__, sendline);
+		dprt("%s: str_cli(): sendline = %s", __FILE__, sendline);
 
-	    if (writen(sockfd, sendline, n) != n)
-	        perror("str_cli: writen error on socket");
-	    /*
-	    * read a line from socket and write it to standard output
-	    */
+		if (writen(sockfd, sendline, n) != n)
+			perror("str_cli: writen error on socket");
+		/*
+		 * read a line from socket and write it to standard output
+		 */
 
-	    prtln();
-	    n = readline(sockfd, recvline, MAXLINE);
-	    prtln();
-	    /*
-	    printf("strcli: recvline = %s", recvline);
-	    */
-	    if (n < 0)
-	        perror("str_cli: readline error on socket");
-	    recvline[n] = 0;
-	    fputs(recvline, stdout);
-	    prtln();
-        }
+		prtln();
+		n = readline(sockfd, recvline, MAXLINE);
+		prtln();
+		/*
+		   printf("strcli: recvline = %s", recvline);
+		 */
+		if (n < 0)
+			perror("str_cli: readline error on socket");
+		recvline[n] = 0;
+		fputs(recvline, stdout);
+		prtln();
+	}
 
-    prtln();
-    if (ferror(fp))
-            perror("str_cli: error reading file");
+	prtln();
+	if (ferror(fp))
+		perror("str_cli: error reading file");
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    FILE *input;
-    int sockfd;
-    struct sockaddr_in serv_addr;
+	FILE *input;
+	int sockfd;
+	struct sockaddr_in serv_addr;
 
-    pname = argv[0];
-    if (argc < 3)
-    {
-  	printf("\nusage: %s ip data\n", pname);
-  	exit(1);
-    }
+	pname = argv[0];
+	if (argc < 3) {
+		printf("\nusage: %s ip data\n", pname);
+		exit(1);
+	}
 
-    /* Fill in the structure */
-    memset((char *) &serv_addr, 0x00, sizeof(serv_addr));
-    serv_addr.sin_family = AF_INET;
-    serv_addr.sin_addr.s_addr = inet_addr(argv[1]);
-    serv_addr.sin_port = htons(SERV_TCP_PORT);
-    prtln();
-    dprt(
-     "%s: main(): Binding local address for client to use\n"
-     "serv_addr.sin_family = %d\n serv_addr.sin_addr.s_addr = %#x\n"
-     "serv_addr.sin_port = %d\n", __FILE__, serv_addr.sin_family,
-      serv_addr.sin_addr.s_addr, serv_addr.sin_port);
+	/* Fill in the structure */
+	memset((char *)&serv_addr, 0x00, sizeof(serv_addr));
+	serv_addr.sin_family = AF_INET;
+	serv_addr.sin_addr.s_addr = inet_addr(argv[1]);
+	serv_addr.sin_port = htons(SERV_TCP_PORT);
+	prtln();
+	dprt("%s: main(): Binding local address for client to use\n"
+	     "serv_addr.sin_family = %d\n serv_addr.sin_addr.s_addr = %#x\n"
+	     "serv_addr.sin_port = %d\n", __FILE__, serv_addr.sin_family,
+	     serv_addr.sin_addr.s_addr, serv_addr.sin_port);
 
-    /* Open Internet stream socket */
-    if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
-    {
-	printf("client: socket open failure, no = %d\n", errno);
-	return(errno);
-	exit(1);
-    }
-    prtln();
-    dprt(
-    "%s: main(): Open Internet stream socket, socfd = %d\n", __FILE__, sockfd);
-    /* Connect to the server */
-    if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
-    {
-        prtln();
-	printf("client: connect failure, no = %d\n", errno);
-	return(errno);
-	exit(1);
-    }
+	/* Open Internet stream socket */
+	if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+		printf("client: socket open failure, no = %d\n", errno);
+		return (errno);
+		exit(1);
+	}
+	prtln();
+	dprt("%s: main(): Open Internet stream socket, socfd = %d\n", __FILE__,
+	     sockfd);
+	/* Connect to the server */
+	if (connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) <
+	    0) {
+		prtln();
+		printf("client: connect failure, no = %d\n", errno);
+		return (errno);
+		exit(1);
+	}
 #ifdef _LINUX
-    if ((input = fopen(argv[2], "r")) == NULL)
-    {
-	perror("fopen");
-        return(errno);
-    }
-    str_cli(input, sockfd); /* call the routines that do the work */
-    prtln();
+	if ((input = fopen(argv[2], "r")) == NULL) {
+		perror("fopen");
+		return (errno);
+	}
+	str_cli(input, sockfd);	/* call the routines that do the work */
+	prtln();
 #else
-    prtln();
-    str_cli(stdin, sockfd); /* call the routines that do the work */
+	prtln();
+	str_cli(stdin, sockfd);	/* call the routines that do the work */
 #endif
-    prtln();
-    close(sockfd);
-    exit(0);
+	prtln();
+	close(sockfd);
+	exit(0);
 }
diff --git a/testcases/kernel/sched/clisrv/pthserv.c b/testcases/kernel/sched/clisrv/pthserv.c
index d56c32b..64e3431 100644
--- a/testcases/kernel/sched/clisrv/pthserv.c
+++ b/testcases/kernel/sched/clisrv/pthserv.c
@@ -42,10 +42,11 @@
 #include <stdint.h>
 
 #define MAXLINE 1024
-void noprintf(char* string, ...) {
+void noprintf(char *string, ...)
+{
 }
 
-pthread_t	th;
+pthread_t th;
 pthread_mutex_t current_mutex;
 int sockfd;
 
@@ -55,135 +56,128 @@
 int str_echo(sockfd)
 int sockfd;
 {
-   int n, testint;
-   char line[MAXLINE];
+	int n, testint;
+	char line[MAXLINE];
 
-   printf("sockfd = %d\n", sockfd);
-   for (; ;)
-   {
-   prtln();
-   dprt2(("%s: str_echo(): reading from sockfd %d\n", __FILE__, sockfd));
-      n = readline(sockfd, line, MAXLINE);
-      printf("str_echo: n = %d\n",n);
-      if (n == 0)
-      {
-         dprt2(("%s: str_echo(): connection terminated\n", __FILE__));
-       return 0; /* connection terminated */
-      }
-      else if (n < 0)
-      {
-         perror("str_echo: readline error");
-         return(-1);
-      }
-      dprt2(("%s: str_echo(): writing to sockfd = %d\n", __FILE__, sockfd));
-      testint = writen(sockfd, line, n);
-      prtln();
-      if (testint != n)
-      {
-         perror("str_echo: writen error");
-         return(-1);
-      }
-      prtln();
-   }
-}
-
-int
-main(int argc, char *argv[])
-{
-    void *new_thread(void*);
-    pthread_attr_t newattr;
-    int newsockfd;
-    socklen_t clilen;
-    struct sockaddr_in	cli_addr, serv_addr;
-    pname = argv[0];
-
-    prtln();
-    /* Open inet stream socket */
-    if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) <0)
-    {
-	printf("server: socket failure:");
-	exit(1);
-    }
-    prtln();
-    dprt2(("%s: main(): Open inet stream socket sockfd = %d\n", __FILE__, sockfd));
-
-    /* Bind local address for client to use */
-    memset((char *) &serv_addr, 0x00, sizeof(serv_addr));
-    serv_addr.sin_family = AF_INET;
-    serv_addr.sin_addr.s_addr = htonl(INADDR_ANY) ;
-    serv_addr.sin_port = htons(SERV_TCP_PORT);
-    prtln();
-    dprt2(("%s: main(): Binding local address for client to use\n"
-     "serv_addr.sin_family = %d\n serv_addr.sin_addr.s_addr = %#x\n"
-     "serv_addr.sin_port = %d\n", __FILE__, serv_addr.sin_family,
-      serv_addr.sin_addr.s_addr, serv_addr.sin_port));
-
-    prtln();
-    if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
-    {
-	printf("server bind failure:\n");
-	fflush(NULL);
-	exit(1);
-    }
-
-    prtln();
-    if (pthread_mutex_init(&current_mutex, NULL) != 0)
-	printf("current_mutex_init() failure");
-    prtln();
-
-    /* attr init, detached state create thread */
-    if (pthread_attr_init(&newattr))
-	printf("failure to init attributes\n");
-    if (pthread_attr_setdetachstate(&newattr,PTHREAD_CREATE_DETACHED))
-	printf("failure to set detached state\n");
-    prtln();
-    listen(sockfd, 5);
-
-    prtln();
-    for (; ;)
-	{
-	    /* Wait for connection from a client process */
-	    clilen = sizeof(cli_addr);
-
-	    newsockfd = accept (sockfd, (struct sockaddr *) &cli_addr, &clilen);
-            prtln();
-	    if (newsockfd < 0)
-	    {
-                perror("server: accept");
-	        printf("server: accept error");
-	        exit(1);
-	    }
-	    else /* create thread to handle client request */
-	    {
-	        if (pthread_create(&th, &newattr, new_thread,
-			(void *)(uintptr_t)newsockfd))
-		    printf("failure to create thread\n");
-#ifndef _LINUX
-	        yield();
-#else
-	        sched_yield();
-#endif
-	    }
-	    prtln();
+	printf("sockfd = %d\n", sockfd);
+	for (;;) {
+		prtln();
+		dprt2(("%s: str_echo(): reading from sockfd %d\n", __FILE__,
+		       sockfd));
+		n = readline(sockfd, line, MAXLINE);
+		printf("str_echo: n = %d\n", n);
+		if (n == 0) {
+			dprt2(("%s: str_echo(): connection terminated\n",
+			       __FILE__));
+			return 0;	/* connection terminated */
+		} else if (n < 0) {
+			perror("str_echo: readline error");
+			return (-1);
+		}
+		dprt2(("%s: str_echo(): writing to sockfd = %d\n", __FILE__,
+		       sockfd));
+		testint = writen(sockfd, line, n);
+		prtln();
+		if (testint != n) {
+			perror("str_echo: writen error");
+			return (-1);
+		}
+		prtln();
 	}
-    close(sockfd);
 }
 
-void *
-new_thread(void* arg_)
-    {
-    int arg=(uintptr_t)arg_;
-    if (pthread_mutex_lock (&current_mutex))
-	printf("mutex_lock failed");
-    if (str_echo(arg) < 0) /* process the request */
-       printf("new_thread: str_echo returned error");
-    close(arg); /* i.e. newsockfd*/
-    if (pthread_mutex_unlock (&current_mutex))
-	printf("mutex_unlock failed");
+int main(int argc, char *argv[])
+{
+	void *new_thread(void *);
+	pthread_attr_t newattr;
+	int newsockfd;
+	socklen_t clilen;
+	struct sockaddr_in cli_addr, serv_addr;
+	pname = argv[0];
+
+	prtln();
+	/* Open inet stream socket */
+	if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+		printf("server: socket failure:");
+		exit(1);
+	}
+	prtln();
+	dprt2(("%s: main(): Open inet stream socket sockfd = %d\n", __FILE__,
+	       sockfd));
+
+	/* Bind local address for client to use */
+	memset((char *)&serv_addr, 0x00, sizeof(serv_addr));
+	serv_addr.sin_family = AF_INET;
+	serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+	serv_addr.sin_port = htons(SERV_TCP_PORT);
+	prtln();
+	dprt2(("%s: main(): Binding local address for client to use\n"
+	       "serv_addr.sin_family = %d\n serv_addr.sin_addr.s_addr = %#x\n"
+	       "serv_addr.sin_port = %d\n", __FILE__, serv_addr.sin_family,
+	       serv_addr.sin_addr.s_addr, serv_addr.sin_port));
+
+	prtln();
+	if (bind(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
+		printf("server bind failure:\n");
+		fflush(NULL);
+		exit(1);
+	}
+
+	prtln();
+	if (pthread_mutex_init(&current_mutex, NULL) != 0)
+		printf("current_mutex_init() failure");
+	prtln();
+
+	/* attr init, detached state create thread */
+	if (pthread_attr_init(&newattr))
+		printf("failure to init attributes\n");
+	if (pthread_attr_setdetachstate(&newattr, PTHREAD_CREATE_DETACHED))
+		printf("failure to set detached state\n");
+	prtln();
+	listen(sockfd, 5);
+
+	prtln();
+	for (;;) {
+		/* Wait for connection from a client process */
+		clilen = sizeof(cli_addr);
+
+		newsockfd =
+		    accept(sockfd, (struct sockaddr *)&cli_addr, &clilen);
+		prtln();
+		if (newsockfd < 0) {
+			perror("server: accept");
+			printf("server: accept error");
+			exit(1);
+		} else {	/* create thread to handle client request */
+
+			if (pthread_create(&th, &newattr, new_thread,
+					   (void *)(uintptr_t) newsockfd))
+				printf("failure to create thread\n");
 #ifndef _LINUX
-    yield();
+			yield();
 #else
-    sched_yield();
+			sched_yield();
 #endif
-    pthread_exit ( (void *) 0);
+		}
+		prtln();
+	}
+	close(sockfd);
+}
+
+void *new_thread(void *arg_)
+{
+	int arg = (uintptr_t) arg_;
+	if (pthread_mutex_lock(&current_mutex))
+		printf("mutex_lock failed");
+	if (str_echo(arg) < 0)	/* process the request */
+		printf("new_thread: str_echo returned error");
+	close(arg);		/* i.e. newsockfd */
+	if (pthread_mutex_unlock(&current_mutex))
+		printf("mutex_unlock failed");
+#ifndef _LINUX
+	yield();
+#else
+	sched_yield();
+#endif
+	pthread_exit((void *)0);
 }
diff --git a/testcases/kernel/sched/clisrv/readline.c b/testcases/kernel/sched/clisrv/readline.c
index 62f65eb..e65ef18 100644
--- a/testcases/kernel/sched/clisrv/readline.c
+++ b/testcases/kernel/sched/clisrv/readline.c
@@ -30,29 +30,24 @@
 register char *ptr;
 register int maxlen;
 {
-    int n, rc;
-    char c;
-    /*
-    printf("readline: fd = %d\n", fd);
-    */
-    for (n =1; n < maxlen; n++)
-	{
-	if ((rc = read(fd, &c, 1)) == 1)
-	    {
-	    *ptr++ = c;
-	    if (c == '\n')
-		break;
-	    }
-	else if (rc == 0)
-	    {
-	    if (n ==1)
-		return 0; /* EOF no data read */
-	    else
-		break; /* EOF, some data read */
-	    }
-	else
-	    return(-1); /* error */
+	int n, rc;
+	char c;
+	/*
+	   printf("readline: fd = %d\n", fd);
+	 */
+	for (n = 1; n < maxlen; n++) {
+		if ((rc = read(fd, &c, 1)) == 1) {
+			*ptr++ = c;
+			if (c == '\n')
+				break;
+		} else if (rc == 0) {
+			if (n == 1)
+				return 0;	/* EOF no data read */
+			else
+				break;	/* EOF, some data read */
+		} else
+			return (-1);	/* error */
 	}
-    *ptr = 0;
-    return(n);
+	*ptr = 0;
+	return (n);
 }
diff --git a/testcases/kernel/sched/clisrv/writen.c b/testcases/kernel/sched/clisrv/writen.c
index cf1ac41..43db4b2 100644
--- a/testcases/kernel/sched/clisrv/writen.c
+++ b/testcases/kernel/sched/clisrv/writen.c
@@ -30,16 +30,15 @@
 register char *ptr;
 register int nbytes;
 {
-    int nleft, nwritten;
+	int nleft, nwritten;
 
-    nleft = nbytes;
-    while (nleft > 0)
-	{
-	nwritten = write(fd, ptr, nleft);
-	if (nwritten <= 0)
-	    return(nwritten);     /* error */
-	nleft -= nwritten;
-	ptr += nwritten;
+	nleft = nbytes;
+	while (nleft > 0) {
+		nwritten = write(fd, ptr, nleft);
+		if (nwritten <= 0)
+			return (nwritten);	/* error */
+		nleft -= nwritten;
+		ptr += nwritten;
 	}
-    return(nbytes - nleft);
+	return (nbytes - nleft);
 }
diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_affinity.c b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_affinity.c
index 9be6f95..5ac0fa2 100644
--- a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_affinity.c
+++ b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_affinity.c
@@ -50,34 +50,28 @@
 {
 	unsigned int mask;
 	pid_t pid;
-	int result=1;
+	int result = 1;
 	int cpu_count, i, j, k, cpuid;
 
-	pid=getpid();
+	pid = getpid();
 
 	tst_resm(TINFO, "Set affinity through system call");
 
-	cpu_count=get_cpu_count();
-	if (cpu_count==0)
-	{
-	 	return 0;
-	}
-	else if (cpu_count>32)
-		cpu_count=32;
+	cpu_count = get_cpu_count();
+	if (cpu_count == 0) {
+		return 0;
+	} else if (cpu_count > 32)
+		cpu_count = 32;
 
-	for (i=0, mask=0x1;i<cpu_count;i++, mask=mask<<1)
-	{
+	for (i = 0, mask = 0x1; i < cpu_count; i++, mask = mask << 1) {
 		tst_resm(TINFO, "Set test process affinity.");
-		printf("mask: %x\n",mask);
+		printf("mask: %x\n", mask);
 
 		sched_setaffinity(pid, sizeof(unsigned long), &mask);
 
-		for (j=0;j<10;j++)
-		{
-			for (k=0;k<10;k++)
-			{
-				if (fork()==0)
-				{
+		for (j = 0; j < 10; j++) {
+			for (k = 0; k < 10; k++) {
+				if (fork() == 0) {
 					system("ps > /dev/null");
 					exit(0);
 				}
@@ -85,33 +79,27 @@
 
 			sleep(1);
 
-			if (get_current_cpu(pid)!=i)
+			if (get_current_cpu(pid) != i)
 				break;
 		}
 
-		if (j<10)
-		{
+		if (j < 10) {
 			tst_resm(TINFO, "...Error");
-			result=0;
-		}
-		else
+			result = 0;
+		} else
 			tst_resm(TINFO, "...OK");
 
 	}
 
-	for (i=0, mask=0x3;i<cpu_count-1;i++, mask=mask<<1)
-	{
+	for (i = 0, mask = 0x3; i < cpu_count - 1; i++, mask = mask << 1) {
 		tst_resm(TINFO, "Set test process affinity.");
-		printf("mask: %x\n",mask);
+		printf("mask: %x\n", mask);
 
 		sched_setaffinity(pid, sizeof(unsigned long), &mask);
 
-		for (j=0;j<10;j++)
-		{
-			for (k=0;k<10;k++)
-			{
-				if (fork()==0)
-				{
+		for (j = 0; j < 10; j++) {
+			for (k = 0; k < 10; k++) {
+				if (fork() == 0) {
 					system("ps > /dev/null");
 					exit(0);
 				}
@@ -119,17 +107,15 @@
 
 			sleep(1);
 
-			cpuid=get_current_cpu(pid);
-			if (cpuid!=i&&cpuid!=i+1)
+			cpuid = get_current_cpu(pid);
+			if (cpuid != i && cpuid != i + 1)
 				break;
 		}
 
-		if (j<10)
-		{
+		if (j < 10) {
 			tst_resm(TINFO, "...Error");
-			result=0;
-		}
-		else
+			result = 0;
+		} else
 			tst_resm(TINFO, "...OK");
 
 	}
@@ -146,11 +132,10 @@
 
 	sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, AFFINITY_NAME, 0);
 
-	if ((pfile=fopen(buf, "r"))==NULL)
+	if ((pfile = fopen(buf, "r")) == NULL)
 		return 0;
 
-	if (fgets(buf, 255, pfile)==NULL)
-	{
+	if (fgets(buf, 255, pfile) == NULL) {
 		fclose(pfile);
 		return 0;
 	}
@@ -176,8 +161,7 @@
 
 	sched_getaffinity(pid, sizeof(mask), mask1);
 
-	if (mask[0] == 0x1 && mask[0] == mask1[0])
-	{
+	if (mask[0] == 0x1 && mask[0] == mask1[0]) {
 		mask[0] = 0x2;
 		sched_setaffinity(pid, sizeof(mask), mask);
 
@@ -189,8 +173,7 @@
 			return 1;
 		else
 			return 0;
-	}
-	else
+	} else
 		return 0;
 }
 
@@ -206,8 +189,7 @@
 
 	sleep(1);
 	pid = fork();
-	if (pid  == 0)
-	{
+	if (pid == 0) {
 		sleep(1);
 		sched_getaffinity(pid, sizeof(mask), mask);
 		if (mask[0] == 0x2)
@@ -224,8 +206,7 @@
 	if (WEXITSTATUS(status) == 0) {
 		tst_resm(TINFO, "Inherited affinity from parent process");
 		return 1;
-	}
-	else
+	} else
 		return 0;
 }
 
@@ -234,10 +215,10 @@
 {
 
 #if (!defined __i386__ && !defined __x86_64__)
-	tst_brkm(TCONF, NULL, "This test suite can only execute on x86 architecture.");
+	tst_brkm(TCONF, NULL,
+		 "This test suite can only execute on x86 architecture.");
 #else
-	if (!check_ht_capability())
-	{
+	if (!check_ht_capability()) {
 
 		if (HT_GetAffinity())
 			tst_resm(TPASS, "System call getaffinity() is OK.");
@@ -257,9 +238,7 @@
 			tst_resm(TPASS, "System call setaffinity() is OK.");
 		else
 			tst_resm(TFAIL, "System call setaffinity() is error.");
-	}
-	else
-	{
+	} else {
 		tst_brkm(TCONF, NULL, "HT is not enabled or not supported.");
 	}
 #endif
diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.c b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.c
index d49d3d9..d6f3ef5 100644
--- a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.c
+++ b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.c
@@ -18,21 +18,21 @@
 
 int is_ht_cpu()
 {
-	/*Number of logic processor in a physical processor*/
+	/*Number of logic processor in a physical processor */
 	int smp_num_siblings = -1;
-	/*ht flag*/
+	/*ht flag */
 	int ht = -1;
-	unsigned int eax,ebx,ecx,edx;
-	cpuid(1,&eax,&ebx,&ecx,&edx);
-	smp_num_siblings = (ebx&0xff0000) >> 16;
-	ht = (edx&0x10000000) >> 28;
+	unsigned int eax, ebx, ecx, edx;
+	cpuid(1, &eax, &ebx, &ecx, &edx);
+	smp_num_siblings = (ebx & 0xff0000) >> 16;
+	ht = (edx & 0x10000000) >> 28;
 
 	if (ht == 1 && smp_num_siblings >= 2) {
-		/*printf("The processor in this system supports HT\n");*/
+		/*printf("The processor in this system supports HT\n"); */
 		return 1;
 	} else {
-	/*printf("The processor in this system does not support
-	* HT\n");*/
+		/*printf("The processor in this system does not support
+		 * HT\n");*/
 		return 0;
 	}
 }
@@ -43,9 +43,9 @@
 {
 	int result;
 	if (is_ht_cpu())
-		result = 0; /*HT is enabled by default in this system.*/
+		result = 0;	/*HT is enabled by default in this system. */
 	else
-		result = 1; /*HT is not enabled by default in this system.*/
+		result = 1;	/*HT is not enabled by default in this system. */
 
 	return result;
 }
@@ -66,7 +66,7 @@
 	if (pfile == NULL)
 		return 0;
 
-	count=0;
+	count = 0;
 
 	while (fgets(buf, 255, pfile) != NULL) {
 		if (strncmp(buf, CPU_NAME, strlen(CPU_NAME)) == 0)
@@ -80,26 +80,21 @@
 
 int get_current_cpu(pid_t pid)
 {
-	int cpu=-1;
+	int cpu = -1;
 	int da;
 	char str[100];
 	char ch;
 
 	FILE *pfile;
 
-        sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
+	sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
 
 	pfile = fopen(buf, "r");
 	if (pfile == NULL)
 		return -1;
 
 	if (fscanf(pfile, "%d %s %c %d %d %d %d %d %d %d %d %d %d %d %d %d %d\
-	 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
-		 &da, str, &ch, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &cpu)<=0)
-	{
+	 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", &da, str, &ch, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &cpu) <= 0) {
 		fclose(pfile);
 		return -1;
 	}
diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_enabled.c b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_enabled.c
index 067a768..72bce1f 100644
--- a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_enabled.c
+++ b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_enabled.c
@@ -23,9 +23,10 @@
 {
 	int ret_val = 1;
 #if  (!defined __x86_64__ && !defined __i386__)
-	tst_brkm(TCONF, NULL, "This test suite can only execute on x86 architecture.");
+	tst_brkm(TCONF, NULL,
+		 "This test suite can only execute on x86 architecture.");
 #else
-		ret_val = check_ht_capability();
+	ret_val = check_ht_capability();
 #endif
 	return ret_val;
 }
diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.c b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.c
index 0f10b57..a996b6d 100644
--- a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.c
+++ b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.c
@@ -21,20 +21,20 @@
 
 int is_ht_cpu()
 {
-	/*Number of logic processor in a physical processor*/
+	/*Number of logic processor in a physical processor */
 	int smp_num_siblings = -1;
-	/*ht flag*/
+	/*ht flag */
 	int ht = -1;
-	unsigned int eax,ebx,ecx,edx;
-	cpuid(1,&eax,&ebx,&ecx,&edx);
-	smp_num_siblings = (ebx&0xff0000) >> 16;
-	ht = (edx&0x10000000) >> 28;
+	unsigned int eax, ebx, ecx, edx;
+	cpuid(1, &eax, &ebx, &ecx, &edx);
+	smp_num_siblings = (ebx & 0xff0000) >> 16;
+	ht = (edx & 0x10000000) >> 28;
 
 	if (ht == 1 && smp_num_siblings >= 2) {
-		/*printf("The processor in this system supports HT\n");*/
+		/*printf("The processor in this system supports HT\n"); */
 		return 1;
 	} else {
-		/*printf("The processor in this system does not support HT\n");*/
+		/*printf("The processor in this system does not support HT\n"); */
 		return 0;
 	}
 }
@@ -46,10 +46,10 @@
 	int result;
 	if (is_ht_cpu()) {
 		result = 0;
-		/*HT is enabled by default in this system.*/
+		/*HT is enabled by default in this system. */
 	} else {
 		result = 1;
-		/*HT is not enabled by default in this system.*/
+		/*HT is not enabled by default in this system. */
 	}
 	return result;
 }
@@ -70,9 +70,9 @@
 	if (pfile == NULL)
 		return 0;
 
-	count=0;
+	count = 0;
 
-	while (fgets(buf, 255, pfile) !=  NULL) {
+	while (fgets(buf, 255, pfile) != NULL) {
 		if (strncmp(buf, CPU_NAME, strlen(CPU_NAME)) == 0)
 			count++;
 	}
@@ -84,25 +84,20 @@
 
 int get_current_cpu(pid_t pid)
 {
-	int cpu=-1;
+	int cpu = -1;
 	int da;
 	char str[100];
 	char ch;
 
 	FILE *pfile;
 
-        sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
+	sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
 
-	if ((pfile=fopen(buf, "r"))==NULL)
+	if ((pfile = fopen(buf, "r")) == NULL)
 		return -1;
 
 	if (fscanf(pfile, "%d %s %c %d %d %d %d %d %d %d %d %d %d %d %d %d\
-	 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
-		 &da, str, &ch, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &cpu)<=0)
-	{
+	 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", &da, str, &ch, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &cpu) <= 0) {
 		fclose(pfile);
 		return -1;
 	}
diff --git a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_interrupt.c b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_interrupt.c
index f6ffa91..cab968c 100644
--- a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_interrupt.c
+++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_interrupt.c
@@ -27,68 +27,55 @@
 int HT_InterruptDistribution()
 {
 	FILE *pFile;
-	int ci[32],cj[32];
+	int ci[32], cj[32];
 	int cpucount, i;
 	int cmax, cmin, d;
 
 	tst_resm(TINFO, "Get interrupts distribution with HT.");
 
-	if ((cpucount=get_cpu_count())<=0)
-	{
+	if ((cpucount = get_cpu_count()) <= 0) {
 		return 0;
 	}
 
-	if ((pFile=fopen(INTERRUPT_NAME, "r"))==NULL)
-	{
+	if ((pFile = fopen(INTERRUPT_NAME, "r")) == NULL) {
 		return 0;
 	}
 
 	fgets(buf, 255, pFile);
 	fscanf(pFile, "%s %d %d %d %d %d %d %d %d \
 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d \
-%d %d %d %d %d %d %d %d", buf, ci, ci+1, ci+2, ci+3,
-ci+4, ci+5, ci+6, ci+7, ci+8, ci+9, ci+10, ci+11,
-ci+12, ci+13, ci+14, ci+15, ci+16, ci+17, ci+18, ci+19,
-ci+20, ci+21, ci+22, ci+23, ci+24, ci+25, ci+26, ci+27,
-ci+28, ci+29, ci+30, ci+31);
+%d %d %d %d %d %d %d %d", buf, ci, ci + 1, ci + 2, ci + 3, ci + 4, ci + 5, ci + 6, ci + 7, ci + 8, ci + 9, ci + 10, ci + 11, ci + 12, ci + 13, ci + 14, ci + 15, ci + 16, ci + 17, ci + 18, ci + 19, ci + 20, ci + 21, ci + 22, ci + 23, ci + 24, ci + 25, ci + 26, ci + 27, ci + 28, ci + 29, ci + 30, ci + 31);
 
 	fclose(pFile);
 
-	for (i=0;i<10;i++)
-	{
+	for (i = 0; i < 10; i++) {
 		sleep(1);
 		printf(".");
 	}
 
-	if ((pFile=fopen(INTERRUPT_NAME, "r"))==NULL)
-	{
+	if ((pFile = fopen(INTERRUPT_NAME, "r")) == NULL) {
 		return 0;
 	}
 
 	fgets(buf, 255, pFile);
 	fscanf(pFile, "%s %d %d %d %d %d %d %d %d \
 %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d \
-%d %d %d %d %d %d %d %d", buf, cj, cj+1, cj+2, cj+3,
-cj+4, cj+5, cj+6, cj+7, cj+8, cj+9, cj+10, cj+11,
-cj+12, cj+13, cj+14, cj+15, cj+16, cj+17, cj+18, cj+19,
-cj+20, cj+21, cj+22, cj+23, cj+24, cj+25, cj+26, cj+27,
-cj+28, cj+29, cj+30, cj+31);
+%d %d %d %d %d %d %d %d", buf, cj, cj + 1, cj + 2, cj + 3, cj + 4, cj + 5, cj + 6, cj + 7, cj + 8, cj + 9, cj + 10, cj + 11, cj + 12, cj + 13, cj + 14, cj + 15, cj + 16, cj + 17, cj + 18, cj + 19, cj + 20, cj + 21, cj + 22, cj + 23, cj + 24, cj + 25, cj + 26, cj + 27, cj + 28, cj + 29, cj + 30, cj + 31);
 
 	fclose(pFile);
 
 	printf("\n\n");
 	printf("Timer interrupt counts per CPU:\n");
-	d=cj[0]-ci[0];
+	d = cj[0] - ci[0];
 	printf("%d ", d);
-	cmax=cmin=d;
-	for (i=1;i<cpucount;i++)
-	{
-		d=cj[i]-ci[i];
+	cmax = cmin = d;
+	for (i = 1; i < cpucount; i++) {
+		d = cj[i] - ci[i];
 		printf("%d ", d);
-		if (cmax<d)
-			cmax=d;
-		if (cmin>d)
-			cmin=d;
+		if (cmax < d)
+			cmax = d;
+		if (cmin > d)
+			cmin = d;
 	}
 
 	printf("\n\n");
@@ -96,13 +83,10 @@
 	printf("min value: %d\n", cmin);
 	printf("\n");
 
-	if (cmin==0 || cmax/cmin>10)
-	{
-	 	return 0;
-	}
-	else
-	{
-	 	return 1;
+	if (cmin == 0 || cmax / cmin > 10) {
+		return 0;
+	} else {
+		return 1;
 	}
 }
 
@@ -112,17 +96,17 @@
 	tst_resm(TINFO, "Begin: HyperThreading Interrupt");
 
 #if (!defined __i386__ && !defined __x86_64__)
-	tst_brkm(TCONF, NULL, "This test suite can only execute on x86 architecture.");
+	tst_brkm(TCONF, NULL,
+		 "This test suite can only execute on x86 architecture.");
 #else
-	if (!check_ht_capability())
-	{
+	if (!check_ht_capability()) {
 		if (HT_InterruptDistribution())
-			tst_resm(TPASS, "Interrupt distribution is balanceable.");
+			tst_resm(TPASS,
+				 "Interrupt distribution is balanceable.");
 		else
-			tst_resm(TFAIL, "Interrupt distribution is not balanceable.");
-	}
-	else
-	{
+			tst_resm(TFAIL,
+				 "Interrupt distribution is not balanceable.");
+	} else {
 		tst_brkm(TCONF, NULL, "HT is not enabled or not supported.");
 	}
 #endif
diff --git a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.c b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.c
index e6b6cfa..1c33d0c 100644
--- a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.c
+++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.c
@@ -23,12 +23,9 @@
 {
 	FILE *fp;
 
-	if ((fp=fopen("/proc/cmdline","r"))!=NULL && para!=NULL)
-	{
-		while (fgets(buffer, BUFF_SIZE-1, fp) != NULL)
-		{
-			if (strstr(buffer, para) != NULL)
-			{
+	if ((fp = fopen("/proc/cmdline", "r")) != NULL && para != NULL) {
+		while (fgets(buffer, BUFF_SIZE - 1, fp) != NULL) {
+			if (strstr(buffer, para) != NULL) {
 				fclose(fp);
 				return 1;
 			}
@@ -43,12 +40,10 @@
 {
 	FILE *fp;
 
-	if ((fp=fopen("/proc/cpuinfo","r"))!=NULL)
-	{
-		while (fgets(buffer, BUFF_SIZE-1, fp) != NULL)
-		{
-			if (strncmp(buffer, PACKAGE_STR, strlen(PACKAGE_STR)) == 0)
-			{
+	if ((fp = fopen("/proc/cpuinfo", "r")) != NULL) {
+		while (fgets(buffer, BUFF_SIZE - 1, fp) != NULL) {
+			if (strncmp(buffer, PACKAGE_STR, strlen(PACKAGE_STR)) ==
+			    0) {
 				fclose(fp);
 				return 1;
 			}
@@ -61,100 +56,115 @@
 
 int is_ht_cpu()
 {
-	/*Number of logic processor in a physical processor*/
+	/*Number of logic processor in a physical processor */
 	int smp_num_siblings = -1;
-	/*ht flag*/
+	/*ht flag */
 	int ht = -1;
-	unsigned int eax,ebx,ecx,edx;
-	cpuid(1,&eax,&ebx,&ecx,&edx);
-	smp_num_siblings = (ebx&0xff0000) >> 16;
-	ht = (edx&0x10000000) >> 28;
+	unsigned int eax, ebx, ecx, edx;
+	cpuid(1, &eax, &ebx, &ecx, &edx);
+	smp_num_siblings = (ebx & 0xff0000) >> 16;
+	ht = (edx & 0x10000000) >> 28;
 
-	if (ht==1 && smp_num_siblings==2) {
-//		printf("The processor in this system supports HT\n");
+	if (ht == 1 && smp_num_siblings == 2) {
+//              printf("The processor in this system supports HT\n");
 		return 1;
-	}else{
-//		printf("The processor in this system does not support HT\n");
+	} else {
+//              printf("The processor in this system does not support HT\n");
 		return 0;
 	}
 }
 
 int is_ht_enabled()
 {
-    int cpu_map[MAX_CPU_NUM];
-    /*A bit-map shows whether a 'logic' processor has ht flag */
-    int ht_cpu[MAX_CPU_NUM];
-    int logic_cpu_num = 0;
-    int package = -1;
-    int cpu_id = -1;
-    char* ht_flag = NULL;
-    int i = 0;
-    int j = 0;
-    int k = 0;
+	int cpu_map[MAX_CPU_NUM];
+	/*A bit-map shows whether a 'logic' processor has ht flag */
+	int ht_cpu[MAX_CPU_NUM];
+	int logic_cpu_num = 0;
+	int package = -1;
+	int cpu_id = -1;
+	char *ht_flag = NULL;
+	int i = 0;
+	int j = 0;
+	int k = 0;
 
-    FILE *fp;
-    char *proc_cpuinfo = (char*)alloca (strlen (PROC_PATH) + sizeof("/cpuinfo"));
-    strcat (strcpy (proc_cpuinfo, PROC_PATH), "/cpuinfo");
+	FILE *fp;
+	char *proc_cpuinfo =
+	    (char *)alloca(strlen(PROC_PATH) + sizeof("/cpuinfo"));
+	strcat(strcpy(proc_cpuinfo, PROC_PATH), "/cpuinfo");
 
-    if ((fp = fopen(proc_cpuinfo, "r")) != NULL) {
-        while (fgets(buffer, BUFF_SIZE-1, fp) != NULL) {
-            if (strncmp (buffer, PROCESSOR_STR, strlen(PROCESSOR_STR)) == 0) {
-                sscanf(buffer, PROCESSOR_STR "\t: %d", &cpu_id);
-                ht_cpu[cpu_id] =0;
-                while (fgets(buffer, BUFF_SIZE-1, fp) != NULL) {
-                    if (strncmp(buffer, PACKAGE_STR, strlen(PACKAGE_STR)) == 0) {
-                        sscanf(buffer, PACKAGE_STR "\t: %d", &package);
-                        cpu_map[cpu_id] = package;
-                        printf("cpu_map[%d]=%d\n",cpu_id,package);
-                    }
-                    if (strncmp(buffer, FLAG_STR, strlen(FLAG_STR)) == 0) {
-                        ht_flag = buffer;
-                        while (*ht_flag != '\0') {
-                            /*printf("ht_flag=%s",ht_flag);*/
-                            if (strncmp(ht_flag,HT_FLAG,strlen(HT_FLAG))==0) {
-                                ht_cpu[cpu_id] = 1;
-                                break;
-                            }
-                            ht_flag++;
-                        }
-                        printf("ht_cpu[%d]=%d\n",cpu_id,ht_cpu[cpu_id]);
-                        logic_cpu_num += 1;
-                        break;
-                    }
-                }
-            }
-        }
-    }else
-      return 0;
+	if ((fp = fopen(proc_cpuinfo, "r")) != NULL) {
+		while (fgets(buffer, BUFF_SIZE - 1, fp) != NULL) {
+			if (strncmp
+			    (buffer, PROCESSOR_STR,
+			     strlen(PROCESSOR_STR)) == 0) {
+				sscanf(buffer, PROCESSOR_STR "\t: %d", &cpu_id);
+				ht_cpu[cpu_id] = 0;
+				while (fgets(buffer, BUFF_SIZE - 1, fp) != NULL) {
+					if (strncmp
+					    (buffer, PACKAGE_STR,
+					     strlen(PACKAGE_STR)) == 0) {
+						sscanf(buffer,
+						       PACKAGE_STR "\t: %d",
+						       &package);
+						cpu_map[cpu_id] = package;
+						printf("cpu_map[%d]=%d\n",
+						       cpu_id, package);
+					}
+					if (strncmp
+					    (buffer, FLAG_STR,
+					     strlen(FLAG_STR)) == 0) {
+						ht_flag = buffer;
+						while (*ht_flag != '\0') {
+							/*printf("ht_flag=%s",ht_flag); */
+							if (strncmp
+							    (ht_flag, HT_FLAG,
+							     strlen(HT_FLAG)) ==
+							    0) {
+								ht_cpu[cpu_id] =
+								    1;
+								break;
+							}
+							ht_flag++;
+						}
+						printf("ht_cpu[%d]=%d\n",
+						       cpu_id, ht_cpu[cpu_id]);
+						logic_cpu_num += 1;
+						break;
+					}
+				}
+			}
+		}
+	} else
+		return 0;
 
-    fclose(fp);
+	fclose(fp);
 
-    for (i =0; i < logic_cpu_num; i++) {
-        if (ht_cpu[i] == 1) {
-            for (j = i + 1; j < logic_cpu_num; j++) {
-                if (cpu_map[i]==cpu_map[j]) {
-                    for (k = j +1; k < logic_cpu_num; k++) {
-                        if (cpu_map[j]==cpu_map[k]) {
-                        /* Not proper HT support, with 3 logic processor in 1 cpu package*/
-                          return 0;
-                        }
-                    }
-                    if (ht_cpu[j] ==1) {
-                        return 1;
-                    }else
-                      return 0;
-                }
-            }
-            /* in this case, processor[i] has ht flag, but is not ht enabled*/
-            if (j == logic_cpu_num) {
-              return 0;
-            }
-        }
-    }
-    if (i == logic_cpu_num) {
-          return 0;
-    }
-  return 0;
+	for (i = 0; i < logic_cpu_num; i++) {
+		if (ht_cpu[i] == 1) {
+			for (j = i + 1; j < logic_cpu_num; j++) {
+				if (cpu_map[i] == cpu_map[j]) {
+					for (k = j + 1; k < logic_cpu_num; k++) {
+						if (cpu_map[j] == cpu_map[k]) {
+							/* Not proper HT support, with 3 logic processor in 1 cpu package */
+							return 0;
+						}
+					}
+					if (ht_cpu[j] == 1) {
+						return 1;
+					} else
+						return 0;
+				}
+			}
+			/* in this case, processor[i] has ht flag, but is not ht enabled */
+			if (j == logic_cpu_num) {
+				return 0;
+			}
+		}
+	}
+	if (i == logic_cpu_num) {
+		return 0;
+	}
+	return 0;
 }
 
 // return 0 means Pass,
@@ -165,20 +175,16 @@
 {
 	int result;
 
-	if (is_ht_kernel())
-	{
-		if (is_ht_cpu())
-		{
+	if (is_ht_kernel()) {
+		if (is_ht_cpu()) {
 			if (is_ht_enabled())
-				result = 0; //HT is enabled by default in this system.
+				result = 0;	//HT is enabled by default in this system.
 			else
-				result = 1; //HT is not enabled by default in this system.
-		}
-		else
-			result = 2; //This processor does not support HT.
-	}
-	else
-		result = 3; //HT feature is not included in this Linux Kernel.
+				result = 1;	//HT is not enabled by default in this system.
+		} else
+			result = 2;	//This processor does not support HT.
+	} else
+		result = 3;	//HT feature is not included in this Linux Kernel.
 
 	return result;
 }
@@ -195,14 +201,13 @@
 	FILE *pfile;
 	int count;
 
-        if ((pfile=fopen(CPUINFO_PATH, "r"))==NULL)
+	if ((pfile = fopen(CPUINFO_PATH, "r")) == NULL)
 		return 0;
 
-	count=0;
+	count = 0;
 
-	while (fgets(buf, 255, pfile)!=NULL)
-	{
-		if (strncmp(buf, CPU_NAME, strlen(CPU_NAME))==0)
+	while (fgets(buf, 255, pfile) != NULL) {
+		if (strncmp(buf, CPU_NAME, strlen(CPU_NAME)) == 0)
 			count++;
 	}
 
@@ -213,24 +218,25 @@
 
 int get_current_cpu(pid_t pid)
 {
-	int cpu=-1;
+	int cpu = -1;
 	int da;
 	char str[100];
 	char ch;
 
 	FILE *pfile;
 
-        sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
+	sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, STAT_NAME, 0);
 
-	if ((pfile=fopen(buf, "r"))==NULL)
+	if ((pfile = fopen(buf, "r")) == NULL)
 		return -1;
 
-	if (fscanf(pfile, "%d %s %c %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
-		 &da, str, &ch, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,\
-		 &da, &da, &da, &da, &da, &da, &da, &da, &cpu)<=0)
-	{
+	if (fscanf
+	    (pfile,
+	     "%d %s %c %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
+	     &da, str, &ch, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,
+	     &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,
+	     &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da, &da,
+	     &cpu) <= 0) {
 		fclose(pfile);
 		return -1;
 	}
diff --git a/testcases/kernel/sched/nptl/nptl01.c b/testcases/kernel/sched/nptl/nptl01.c
index 0559fd7..8f62736 100644
--- a/testcases/kernel/sched/nptl/nptl01.c
+++ b/testcases/kernel/sched/nptl/nptl01.c
@@ -50,8 +50,8 @@
 #define MAXTIME 72000		/* Maximum # of secs to wait before failing */
 #define NUMLOOPS 100000		/* # of loops */
 
-char *TCID="nptl01";            /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "nptl01";		/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 void cleanup();
 
 pthread_mutex_t req;
@@ -70,222 +70,236 @@
  */
 #define NSECS_TO_WAIT	(1)
 
-void call_mutex_init(pthread_mutex_t* mutex, char* buf, size_t buf_len) {
-    int ret;
+void call_mutex_init(pthread_mutex_t * mutex, char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_mutex_init(mutex, NULL)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_mutex_init failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_mutex_init(mutex, NULL)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_mutex_init failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void call_mutex_lock(pthread_mutex_t* mutex, char* buf, size_t buf_len) {
-    int ret;
+void call_mutex_lock(pthread_mutex_t * mutex, char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_mutex_lock(mutex)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_mutex_lock failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_mutex_lock(mutex)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_mutex_lock failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void call_mutex_unlock(pthread_mutex_t* mutex, char* buf, size_t buf_len) {
-    int ret;
+void call_mutex_unlock(pthread_mutex_t * mutex, char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_mutex_unlock(mutex)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_mutex_unlock failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_mutex_unlock(mutex)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_mutex_unlock failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void call_cond_init(pthread_cond_t* cond, char* buf, size_t buf_len) {
-    int ret;
+void call_cond_init(pthread_cond_t * cond, char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_cond_init(cond, NULL)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_cond_init failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_cond_init(cond, NULL)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_cond_init failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void call_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex,
-		    char* buf, size_t buf_len) {
-    int ret;
+void call_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex,
+		    char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_cond_wait(cond, mutex)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_cond_wait failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_cond_wait(cond, mutex)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_cond_wait failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void call_cond_signal(pthread_cond_t* cond, char* buf, size_t buf_len) {
-    int ret;
+void call_cond_signal(pthread_cond_t * cond, char *buf, size_t buf_len)
+{
+	int ret;
 
-    if ((ret = pthread_cond_signal(cond)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_cond_signal failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_cond_signal(cond)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_cond_signal failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void do_timedwait(pthread_cond_t* cond, pthread_mutex_t* mutex,
-		  char* buf, size_t buf_len, int i) {
-    struct timeval tv;
-    struct timespec ts;
-    int ret;
+void do_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
+		  char *buf, size_t buf_len, int i)
+{
+	struct timeval tv;
+	struct timespec ts;
+	int ret;
 
-    if (gettimeofday(&tv, NULL) != 0) {
-	tst_brkm(TBROK, cleanup, "gettimeofday failed: %s",
-		strerror_r(errno, buf, buf_len));
-    }
+	if (gettimeofday(&tv, NULL) != 0) {
+		tst_brkm(TBROK, cleanup, "gettimeofday failed: %s",
+			 strerror_r(errno, buf, buf_len));
+	}
 
-    ts.tv_sec = tv.tv_sec;
-    ts.tv_nsec = (tv.tv_usec * 1000) + NSECS_TO_WAIT;
-    ts.tv_sec += ts.tv_nsec / 1000000000;
-    ts.tv_nsec = ts.tv_nsec % 1000000000;
+	ts.tv_sec = tv.tv_sec;
+	ts.tv_nsec = (tv.tv_usec * 1000) + NSECS_TO_WAIT;
+	ts.tv_sec += ts.tv_nsec / 1000000000;
+	ts.tv_nsec = ts.tv_nsec % 1000000000;
 
-    call_mutex_lock(mutex, buf, buf_len);
-    if ((ret = pthread_cond_timedwait(cond, mutex, &ts)) != ETIMEDOUT) {
+	call_mutex_lock(mutex, buf, buf_len);
+	if ((ret = pthread_cond_timedwait(cond, mutex, &ts)) != ETIMEDOUT) {
 #if DEBUG
-	tst_resm(TINFO, "Loop %d of 1000000: pthread_cond_timedwait() didn't timeout",i);
-	tst_resm(TINFO, "You may want to try reducing the value of NSECS_TO_WAIT (currently=%d)",
-		NSECS_TO_WAIT);
+		tst_resm(TINFO,
+			 "Loop %d of 1000000: pthread_cond_timedwait() didn't timeout",
+			 i);
+		tst_resm(TINFO,
+			 "You may want to try reducing the value of NSECS_TO_WAIT (currently=%d)",
+			 NSECS_TO_WAIT);
 #endif
-    }
-    call_mutex_unlock(mutex, buf, buf_len);
+	}
+	call_mutex_unlock(mutex, buf, buf_len);
 
 }
 
-void* run(void* arg)
+void *run(void *arg)
 {
-    char buf[1024];
+	char buf[1024];
 
-    while (1) {
-	call_mutex_lock(&ack, buf, sizeof(buf));
-	idle_count = 1;
-	call_cond_signal(&parent, buf, sizeof(buf));
-	call_mutex_lock(&req, buf, sizeof(buf));
-	call_mutex_unlock(&ack, buf, sizeof(buf));
+	while (1) {
+		call_mutex_lock(&ack, buf, sizeof(buf));
+		idle_count = 1;
+		call_cond_signal(&parent, buf, sizeof(buf));
+		call_mutex_lock(&req, buf, sizeof(buf));
+		call_mutex_unlock(&ack, buf, sizeof(buf));
 
-	call_mutex_lock(&wait, buf, sizeof(buf));
-	call_cond_signal(&parent, buf, sizeof(buf));
-	call_mutex_unlock(&wait, buf, sizeof(buf));
+		call_mutex_lock(&wait, buf, sizeof(buf));
+		call_cond_signal(&parent, buf, sizeof(buf));
+		call_mutex_unlock(&wait, buf, sizeof(buf));
 
-	call_cond_wait(&child, &req, buf, sizeof(buf));
-	call_mutex_unlock(&req, buf, sizeof(buf));
-    }
+		call_cond_wait(&child, &req, buf, sizeof(buf));
+		call_mutex_unlock(&req, buf, sizeof(buf));
+	}
 }
 
-void create_child_thread(char* buf, size_t buf_len)
+void create_child_thread(char *buf, size_t buf_len)
 {
-    pthread_attr_t attr;
-    pthread_t child_tid;
-    int ret;
+	pthread_attr_t attr;
+	pthread_t child_tid;
+	int ret;
 
-    if ((ret = pthread_attr_init(&attr)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_attr_init failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
-    if ((ret = pthread_attr_setdetachstate(&attr,
-					   PTHREAD_CREATE_DETACHED)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_attr_setdetachstate failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
-    if ((ret = pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_attr_setscope failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_attr_init(&attr)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_attr_init failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
+	if ((ret = pthread_attr_setdetachstate(&attr,
+					       PTHREAD_CREATE_DETACHED)) != 0) {
+		tst_brkm(TBROK, cleanup,
+			 "pthread_attr_setdetachstate failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
+	if ((ret = pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_attr_setscope failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 
-    if ((ret = pthread_create(&child_tid, &attr, run, NULL)) != 0) {
-	tst_brkm(TBROK, cleanup, "pthread_create failed: %s",
-		strerror_r(ret, buf, buf_len));
-    }
+	if ((ret = pthread_create(&child_tid, &attr, run, NULL)) != 0) {
+		tst_brkm(TBROK, cleanup, "pthread_create failed: %s",
+			 strerror_r(ret, buf, buf_len));
+	}
 }
 
-void trap_alarm(int sig) {
-    tst_brkm(TFAIL, cleanup, "Test hang longer than %d sec detected", MAXTIME);
-}
-
-static void
-usage(const char *progname)
+void trap_alarm(int sig)
 {
-    fprintf(stderr, "usage: %s -l loops\n", progname);
-    fprintf(stderr, "\t-l specify the number of loops to carry out\n");
+	tst_brkm(TFAIL, cleanup, "Test hang longer than %d sec detected",
+		 MAXTIME);
 }
 
-int main(int argc, char** argv)
+static void usage(const char *progname)
+{
+	fprintf(stderr, "usage: %s -l loops\n", progname);
+	fprintf(stderr, "\t-l specify the number of loops to carry out\n");
+}
+
+int main(int argc, char **argv)
 {
 #ifdef USING_NPTL
-    char buf[1024];
-    int i;
-    extern char *optarg;
-    int numloops = NUMLOOPS;
+	char buf[1024];
+	int i;
+	extern char *optarg;
+	int numloops = NUMLOOPS;
 
-    while ((i = getopt(argc, argv, "l:")) != -1) {
-        switch(i) {
-        case 'l':
-            if (optarg)
-                numloops = atoi(optarg);
-            else
-                fprintf(stderr, "%s: option -l requires an argument\n", argv[0]);
-            break;
-        default:
-            usage(argv[0]);
-            exit(1);
-        }
-    }
+	while ((i = getopt(argc, argv, "l:")) != -1) {
+		switch (i) {
+		case 'l':
+			if (optarg)
+				numloops = atoi(optarg);
+			else
+				fprintf(stderr,
+					"%s: option -l requires an argument\n",
+					argv[0]);
+			break;
+		default:
+			usage(argv[0]);
+			exit(1);
+		}
+	}
 
-    signal(SIGALRM, trap_alarm);
-    alarm(MAXTIME);
+	signal(SIGALRM, trap_alarm);
+	alarm(MAXTIME);
 
-    call_mutex_init(&req, buf, sizeof(buf));
-    call_mutex_init(&ack, buf, sizeof(buf));
-    call_mutex_init(&wait, buf, sizeof(buf));
-    call_cond_init(&parent, buf, sizeof(buf));
-    call_cond_init(&child, buf, sizeof(buf));
+	call_mutex_init(&req, buf, sizeof(buf));
+	call_mutex_init(&ack, buf, sizeof(buf));
+	call_mutex_init(&wait, buf, sizeof(buf));
+	call_cond_init(&parent, buf, sizeof(buf));
+	call_cond_init(&child, buf, sizeof(buf));
 
-    call_mutex_lock(&ack, buf, sizeof(buf));
-
-    create_child_thread(buf, sizeof(buf));
-
-    tst_resm(TINFO,"Starting test, please wait.");
-    for (i = 0; i < numloops; i++) {
-	while (idle_count == 0) {
-	    call_cond_wait(&parent, &ack, buf, sizeof(buf));
-	};
-	idle_count = 0;
-	call_mutex_unlock(&ack, buf, sizeof(buf));
-
-	do_timedwait(&parent, &wait, buf, sizeof(buf),i);
-
-	call_mutex_lock(&req, buf, sizeof(buf));
-	call_cond_signal(&child, buf, sizeof(buf));
-	call_mutex_unlock(&req, buf, sizeof(buf));
-#ifdef DEBUG
-	tst_resm(TINFO,"Success in loop %d",i);
-#else
-	if (((i % (numloops / 10)) == 0) && (i != 0))
-	  tst_resm(TINFO,"Success thru loop %d of %i",i,numloops);
-#endif
 	call_mutex_lock(&ack, buf, sizeof(buf));
-    }
 
-    alarm(0);
-    tst_resm(TPASS,"Test completed successfully!");
-    cleanup();
+	create_child_thread(buf, sizeof(buf));
+
+	tst_resm(TINFO, "Starting test, please wait.");
+	for (i = 0; i < numloops; i++) {
+		while (idle_count == 0) {
+			call_cond_wait(&parent, &ack, buf, sizeof(buf));
+		};
+		idle_count = 0;
+		call_mutex_unlock(&ack, buf, sizeof(buf));
+
+		do_timedwait(&parent, &wait, buf, sizeof(buf), i);
+
+		call_mutex_lock(&req, buf, sizeof(buf));
+		call_cond_signal(&child, buf, sizeof(buf));
+		call_mutex_unlock(&req, buf, sizeof(buf));
+#ifdef DEBUG
+		tst_resm(TINFO, "Success in loop %d", i);
+#else
+		if (((i % (numloops / 10)) == 0) && (i != 0))
+			tst_resm(TINFO, "Success thru loop %d of %i", i,
+				 numloops);
+#endif
+		call_mutex_lock(&ack, buf, sizeof(buf));
+	}
+
+	alarm(0);
+	tst_resm(TPASS, "Test completed successfully!");
+	cleanup();
 
 #else
-    tst_resm(TCONF,"Skipping Execution - This system is not using NPTL");
-    tst_exit();
+	tst_resm(TCONF, "Skipping Execution - This system is not using NPTL");
+	tst_exit();
 #endif
 
-    return 1;
+	return 1;
 }
 
 /*
  *cleanup() -  performs all ONE TIME cleanup for this test at
  *              completion or premature exit.
  */
-void
-cleanup()
+void cleanup()
 {
 
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/sched/process_stress/process.c b/testcases/kernel/sched/process_stress/process.c
index d67955f..4c91425 100644
--- a/testcases/kernel/sched/process_stress/process.c
+++ b/testcases/kernel/sched/process_stress/process.c
@@ -81,14 +81,14 @@
 #define    TVAL  (*edat[TNDX].eval.vint)	/* timer value */
 
 #ifdef _LINUX
-typedef long           mtyp_t;
+typedef long mtyp_t;
 #endif
 
 /* structure of information stored about each process in shared memory */
 typedef struct proc_info {
 #ifdef __64LDT__
-	pid_t pid;              /* process id */
-	 pid_t ppid;             /* parent process id */
+	pid_t pid;		/* process id */
+	pid_t ppid;		/* parent process id */
 #else
 	int pid;		/* process id */
 	int ppid;		/* parent process id */
@@ -99,45 +99,53 @@
 } Pinfo;
 
 typedef struct messagebuf {
-	mtyp_t  mtyp;          /* message type */
-	char    mtext[80];       /* message text */
+	mtyp_t mtyp;		/* message type */
+	char mtext[80];		/* message text */
 } Msgbuf;
 
-union semun {	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+union semun {			/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 	int val;
 	struct semid_ds *buf;
 	unsigned short *array;
-} semarg = { 0 };
+} semarg = {
+0};
 
 /* structure of all environment variable used by program */
 struct envstruct {
 	char *env_name;
 	union {
 		char *chptr;
-		int  *vint;
+		int *vint;
 	} eval;
 } envdata[] = {
-	{"AUSDBG",	{"0"}},
-	{"BVAL",	{"3"}},
-	{"DVAL",	{"2"}},
-	{"FORCE",	{"0"}},
-	{"TVAL",	{"1"}},
-	{"",		{""}}
+	{
+		"AUSDBG", {
+	"0"}}, {
+		"BVAL", {
+	"3"}}, {
+		"DVAL", {
+	"2"}}, {
+		"FORCE", {
+	"0"}}, {
+		"TVAL", {
+	"1"}}, {
+		"", {
+	""}}
 };
 
-char *errfile;				/* pointer to errfile name */
+char *errfile;			/* pointer to errfile name */
 
-int msgid; 				/* message queue for leaf nodes */
-int msgerr;				/* message queue for errors */
-int nodesum;				/* total number of process to be created */
-int sem_count; 				/* counter semaphore */
-int sem_lock; 				/* locks access to counter semaphore */
-int shmid;				/* global shared memory id varible */
-int procgrp;				/* process group id */
+int msgid;			/* message queue for leaf nodes */
+int msgerr;			/* message queue for errors */
+int nodesum;			/* total number of process to be created */
+int sem_count;			/* counter semaphore */
+int sem_lock;			/* locks access to counter semaphore */
+int shmid;			/* global shared memory id varible */
+int procgrp;			/* process group id */
 
-timer_t timer;				/* timer structure */
+timer_t timer;			/* timer structure */
 
-Pinfo *shmaddr;				/* Start address  of shared memory */
+Pinfo *shmaddr;			/* Start address  of shared memory */
 
 #ifndef _LINUX
 FILE *errfp = stderr;		/* error file pointer, probably not necessary */
@@ -150,49 +158,49 @@
 struct envstruct *edat = envdata;	/* pointer to environment data */
 
 /* external function declarations */
-extern int	killpg(int procgrp, int sig);
+extern int killpg(int procgrp, int sig);
 extern timer_t gettimerid(int Timer_type, int Notify_type);
-extern int	reltimerid(timer_t timer);
+extern int reltimerid(timer_t timer);
 
 /* internal function declarations */
-void	cleanup(int sig, int code, struct sigcontext *scp);
-void	nextofkin(int sig, int code, struct sigcontext *scp);
-void	doit(void);
-void	debugout(char *fmt, ...);
-int	getenv_val(void);
-void 	messenger(void);
-void	nextofkin(int sig, int code, struct sigcontext *scp);
-int 	notify(int slot);
-void	parse_args(int argc, char *argv[]);
-void	print_shm(void);
-Pinfo	*put_proc_info(int tval);
-void	rm_msgqueue(void);
-void	rm_semseg(void);
-void	rm_shmseg(void);
-int	semoper(int slot, int smid, int opval);
-int	send_message(int id, mtyp_t type, char *text);
-void	set_timer(void);
-void 	set_signals(void * sighandler());
-void	setup_msgqueue(void);
-void	setup_semaphores(void);
-void	setup_shm(void);
-void	severe(char *fmt, ...);
-Pinfo 	*shmgetseg(void);
-int	spawn(int val);
-unsigned long	sumit(int B, int D);
+void cleanup(int sig, int code, struct sigcontext *scp);
+void nextofkin(int sig, int code, struct sigcontext *scp);
+void doit(void);
+void debugout(char *fmt, ...);
+int getenv_val(void);
+void messenger(void);
+void nextofkin(int sig, int code, struct sigcontext *scp);
+int notify(int slot);
+void parse_args(int argc, char *argv[]);
+void print_shm(void);
+Pinfo *put_proc_info(int tval);
+void rm_msgqueue(void);
+void rm_semseg(void);
+void rm_shmseg(void);
+int semoper(int slot, int smid, int opval);
+int send_message(int id, mtyp_t type, char *text);
+void set_timer(void);
+void set_signals(void *sighandler());
+void setup_msgqueue(void);
+void setup_semaphores(void);
+void setup_shm(void);
+void severe(char *fmt, ...);
+Pinfo *shmgetseg(void);
+int spawn(int val);
+unsigned long sumit(int B, int D);
 
 /*
  *  Prints out the data structures in shared memory.
  */
 void print_shm(void)
 {
-	extern int nodesum;		/* total number of nodes created */
-	extern Pinfo *shmaddr;		/* shared memory pointer */
-	extern int shmid;		/* shared memory id */
+	extern int nodesum;	/* total number of nodes created */
+	extern Pinfo *shmaddr;	/* shared memory pointer */
+	extern int shmid;	/* shared memory id */
 
-	Pinfo *pinfo;			/* pointer to process info in shared memory */
-	int   *listp;			/* pointer to sibling info in shared memory */
-	int i, j; 			/* counters */
+	Pinfo *pinfo;		/* pointer to process info in shared memory */
+	int *listp;		/* pointer to sibling info in shared memory */
+	int i, j;		/* counters */
 	struct shmid_ds buf;
 
 	if (shmctl(shmid, IPC_STAT, &buf))
@@ -200,11 +208,11 @@
 
 	for (pinfo = shmaddr, i = 0; i < nodesum; i++, pinfo++) {
 		fprintf(errfp,
-				"slot: %-4d pid: %-6d ppid: %-6d msg: %-2d err: %-2d lst:",
-				i, pinfo->pid, pinfo->ppid, pinfo->msg, pinfo->err);
+			"slot: %-4d pid: %-6d ppid: %-6d msg: %-2d err: %-2d lst:",
+			i, pinfo->pid, pinfo->ppid, pinfo->msg, pinfo->err);
 		for (j = 0, listp = pinfo->list; j < BVAL; j++, listp++)
 			fprintf(errfp, " %d", *listp);
-		fprintf(errfp,"\n");
+		fprintf(errfp, "\n");
 	}
 }
 
@@ -222,11 +230,11 @@
 	while (TRUE) {
 		rc = msgsnd(id, &sndbuf, sizeof(struct messagebuf), IPC_NOWAIT);
 		if (rc == -1 && errno == EAGAIN) {
-			debugout("msgqueue %d of mtyp %d not ready to send\n",msgid,type);
+			debugout("msgqueue %d of mtyp %d not ready to send\n",
+				 msgid, type);
 			errno = 0;
-		}
-		else
-			return(rc);
+		} else
+			return (rc);
 	}
 }
 
@@ -290,7 +298,7 @@
  */
 void rm_shmseg(void)
 {
-	extern int shmid;		/* Global shared memory id */
+	extern int shmid;	/* Global shared memory id */
 	extern Pinfo *shmaddr;	/* Global shared memory address */
 
 	/* remove shared memory id (and shared memory segment). */
@@ -309,13 +317,13 @@
 	extern int sem_count;
 
 	/* remove sem_lock semaphore id */
-	semarg.val = 0; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+	semarg.val = 0;		/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 	if (semctl(sem_lock, 0, IPC_RMID, semarg.val) && errno != EINVAL) {
 		fprintf(errfp, "semctl failed: errno %d\n", errno);
 		perror("semctl failed");
 	}
 	/* remove sem_count semaphore id. */
-	semarg.val = 0; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+	semarg.val = 0;		/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 	if (semctl(sem_count, 0, IPC_RMID, semarg.val) && errno != EINVAL) {
 		fprintf(errfp, "semctl failed: errno %d\n", errno);
 		perror("semctl failed");
@@ -325,7 +333,7 @@
 /*
  * Routine to clean up shared memory and return exit status (CHILD handler).
  */
-void  cleanup(int sig, int code, struct sigcontext *scp)
+void cleanup(int sig, int code, struct sigcontext *scp)
 {
 	int rc;
 	char mtext[80];
@@ -335,14 +343,14 @@
 	rc = send_message(msgerr, 3, mtext);
 	if (rc == -1) {
 		severe("msgsnd failed: %d msgid %d mtyp %d mtext %d\n",
-				   errno, msgerr, 3, mtext);
+		       errno, msgerr, 3, mtext);
 	}
 }
 
 /*
  * Routine to clean up shared memory and return exit status (PARENT handler).
  */
-void  nextofkin(int sig, int code, struct sigcontext *scp)
+void nextofkin(int sig, int code, struct sigcontext *scp)
 {
 	int rc;
 	char mtext[80];
@@ -351,10 +359,10 @@
 	rc = send_message(msgerr, 3, mtext);
 	if (rc == -1) {
 		severe("msgsnd failed: %d msgid %d mtyp %d mtext %d\n",
-				   errno, msgerr, 3, mtext);
+		       errno, msgerr, 3, mtext);
 	}
 #ifndef _LINUX
-	reltimerid( timer );
+	reltimerid(timer);
 #endif
 	exit(1);
 }
@@ -363,20 +371,20 @@
 unsigned long sumit(int B, int D)
 {
 	int i;
-    	int exp = 1;		/* exponent of breadth */
+	int exp = 1;		/* exponent of breadth */
 	unsigned long sum = 1;	/* running sum of nodes */
 
 	for (sum = 1, i = 1; i <= D; i++) {
 		exp = B * exp;
-		sum += (int) exp;
+		sum += (int)exp;
 	}
-    return(sum);
+	return (sum);
 }
 
 /* Finds correct slot for current process in shared memory and stores
  * information about process in it.
  */
-Pinfo * put_proc_info(int tval)
+Pinfo *put_proc_info(int tval)
 {
 	extern int nodesum;
 	extern Pinfo *shmaddr;
@@ -386,28 +394,29 @@
 	Pinfo *smp;		/* ptr to current process data slot */
 
 	smp = shmaddr + tval;
-    	smp->pid = getpid();
-    	smp->ppid = getppid();
-    	smp->err = 0;
-    	smp->msg = 0;
+	smp->pid = getpid();
+	smp->ppid = getppid();
+	smp->err = 0;
+	smp->msg = 0;
 
 	/* if very first process (slot 0), dont fill in info about siblings
 	 *  and parent.  Sibling and parent info is irrevelant in this case.
 	 */
 	if (!tval)
-		return(smp);
+		return (smp);
 
 	/* find parent of current process and store slot location */
-   	smp->list = (int *)(Pinfo *)(shmaddr + nodesum) + (BVAL * tval);
-   	*smp->list = (tval - 1) / BVAL;
+	smp->list = (int *)(Pinfo *) (shmaddr + nodesum) + (BVAL * tval);
+	*smp->list = (tval - 1) / BVAL;
 	listp = smp->list + 1;
 
 	/* calculate and store sibling slot numbers of current process */
-	for (sibslot = *smp->list * BVAL + 1; listp < smp->list + BVAL; sibslot++) {
+	for (sibslot = *smp->list * BVAL + 1; listp < smp->list + BVAL;
+	     sibslot++) {
 		if (tval != sibslot)
 			*(listp++) = sibslot;
 	}
-	return(smp);
+	return (smp);
 }
 
 /* This routine sends a message from the current process to all of her
@@ -427,30 +436,32 @@
 	int cldcnt = 1;
 	int ndx = 0;
 #ifdef __64LDT__
-        pid_t pid = 0;
+	pid_t pid = 0;
 #else
-        int pid = 0;
+	int pid = 0;
 #endif
-        char mtext[80];
+	char mtext[80];
 
 	Msgbuf rcvbuf;
 
 	for (i = 1, listp++; i < BVAL; i++, listp++) {
-		sprintf(mtext, "%d %d %d",i, slot, (shmaddr + slot)->pid);
-		rc = send_message(msgid, (mtyp_t) *listp, mtext);
+		sprintf(mtext, "%d %d %d", i, slot, (shmaddr + slot)->pid);
+		rc = send_message(msgid, (mtyp_t) * listp, mtext);
 		if (rc == -1) {
-		  severe("notify: send_message Failed: %d msgid %d mtyp %d mtext %d\n",
-		  						errno, msgid, *listp, mtext);
+			severe
+			    ("notify: send_message Failed: %d msgid %d mtyp %d mtext %d\n",
+			     errno, msgid, *listp, mtext);
 			exit(1);
 		}
 	}
 
 	while (cldcnt < BVAL) {
-		rc = msgrcv(msgid,&rcvbuf, sizeof(struct messagebuf), slot, 0);
+		rc = msgrcv(msgid, &rcvbuf, sizeof(struct messagebuf), slot, 0);
 		if (rc == -1) {
 			switch (errno) {
 			case EAGAIN:
-				printf("msgqueue %d not ready to receive\n", msgid);
+				printf("msgqueue %d not ready to receive\n",
+				       msgid);
 				fflush(stdout);
 				errno = 0;
 				break;
@@ -464,20 +475,20 @@
 				severe("msgrcv failed, errno: %d\n", errno);
 				exit(1);
 			}
-		}
-		else {
-			sscanf(rcvbuf.mtext,"%d %d %d",&ndx, &tslot, &pid);
+		} else {
+			sscanf(rcvbuf.mtext, "%d %d %d", &ndx, &tslot, &pid);
 			if (*((shmaddr + tslot)->list + ndx) == slot &&
-		 	     		   (shmaddr + tslot)->pid == pid) {
-				debugout("MSGRCV:slot: %d ndx: %d tslot: %d pid: %d\n",
-													slot, ndx, tslot, pid);
+			    (shmaddr + tslot)->pid == pid) {
+				debugout
+				    ("MSGRCV:slot: %d ndx: %d tslot: %d pid: %d\n",
+				     slot, ndx, tslot, pid);
 				(shmaddr + slot)->msg++;
 				cldcnt++;
-			}
-			else {
+			} else {
 				(shmaddr + slot)->err--;
-				debugout("MSGRCV: slot: %d ndx: %d tslot: %d pid: %d\n",
-												slot, ndx, tslot, pid);
+				debugout
+				    ("MSGRCV: slot: %d ndx: %d tslot: %d pid: %d\n",
+				     slot, ndx, tslot, pid);
 			}
 		}
 	}
@@ -489,15 +500,15 @@
  */
 int semoper(int slot, int smid, int opval)
 {
-	int pslot;			/* parent slot */
-	struct sembuf smop;		/* semaphore operator */
+	int pslot;		/* parent slot */
+	struct sembuf smop;	/* semaphore operator */
 
-   	pslot = (slot - 1) / BVAL;	/* calculate parent node */
+	pslot = (slot - 1) / BVAL;	/* calculate parent node */
 	smop.sem_num = pslot;
 	smop.sem_op = opval;
 	smop.sem_flg = 0;
 	semop(smid, &smop, 1);
-	return(pslot);
+	return (pslot);
 }
 
 /*
@@ -518,84 +529,92 @@
 	extern int sem_count;	/* used to keep track of childern */
 	extern int sem_lock;	/* used to lock access to sem_count semaphore */
 
-    	int	i;		/* Breadth counter */
+	int i;			/* Breadth counter */
 	static int level = 0;	/* level counter */
-	int	lvlflg = 0;	/* level toggle, limits parental spawning
-			           to one generation */
-	int	pslot = 0;
+	int lvlflg = 0;		/* level toggle, limits parental spawning
+				   to one generation */
+	int pslot = 0;
 #ifdef __64LDT__
-        pid_t pid;              /* pid of child process */
+	pid_t pid;		/* pid of child process */
 #else
-        int     pid;            /* pid of child process */
+	int pid;		/* pid of child process */
 #endif
-        Pinfo	*pinfo;		/* pointer to process information in shared mem */
-	int	semval;		/* value of semaphore ( equals BVAL initially */
+	Pinfo *pinfo;		/* pointer to process information in shared mem */
+	int semval;		/* value of semaphore ( equals BVAL initially */
 	static int tval = 1;	/* tree node value of child. */
 
 	char foo[1024];
 
-    level++;
+	level++;
 
-    for (i = 1; i <= BVAL; i++) {
-        tval = (val * BVAL) + i;
-        if (!lvlflg) {
+	for (i = 1; i <= BVAL; i++) {
+		tval = (val * BVAL) + i;
+		if (!lvlflg) {
 			pid = fork();
-			if (!pid) { /* CHILD */
+			if (!pid) {	/* CHILD */
 				if (AUSDEBUG) {
 					sprintf(foo, "%sslot%d", SLOTDIR, tval);
 					debugfp = fopen(foo, "a+");
 				}
 				pinfo = put_proc_info(tval);
 
-        		debugout("pid: %-6d ppid: %-6d lev: %-2d i: %-2d val: %-3d\n",pinfo->pid, pinfo->ppid, level, i, tval);
+				debugout
+				    ("pid: %-6d ppid: %-6d lev: %-2d i: %-2d val: %-3d\n",
+				     pinfo->pid, pinfo->ppid, level, i, tval);
 
 				set_timer();	/* set up signal handlers and initialize pgrp */
 				if (level < DVAL) {
 					if (spawn(tval) == -1) {
-						pslot = semoper(tval, sem_lock, -1);
-						semarg.val = 0; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
-						semval = semctl(sem_count, pslot, GETVAL, semarg);
-						semarg.val = --semval; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
-						semctl(sem_count, pslot, SETVAL, semarg);
-						semarg.val = 1; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
-						semctl(sem_lock, pslot, SETVAL, semarg);
+						pslot =
+						    semoper(tval, sem_lock, -1);
+						semarg.val = 0;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+						semval =
+						    semctl(sem_count, pslot,
+							   GETVAL, semarg);
+						semarg.val = --semval;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+						semctl(sem_count, pslot, SETVAL,
+						       semarg);
+						semarg.val = 1;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+						semctl(sem_lock, pslot, SETVAL,
+						       semarg);
 					}
 					lvlflg++;
-				}
-				else {	/* leaf node */
+				} else {	/* leaf node */
 					notify(tval);
-					return(-1);
+					return (-1);
 				}
 			}
 #ifdef __64LDT__
-                        else if (pid > 0 && i >= BVAL) { /* PARENT */
+			else if (pid > 0 && i >= BVAL) {	/* PARENT */
 #else
-                        else if (pid > (pid_t)0 && i >= BVAL) { /* PARENT */
+			else if (pid > (pid_t) 0 && i >= BVAL) {	/* PARENT */
 #endif
-                                pslot = semoper(tval, sem_count, 0);
+				pslot = semoper(tval, sem_count, 0);
 				pslot = semoper(pslot, sem_lock, -1);
-				semarg.val = 0; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
-				semval = semctl(sem_count, pslot, GETVAL, semarg);
-				semarg.val = --semval; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+				semarg.val = 0;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+				semval =
+				    semctl(sem_count, pslot, GETVAL, semarg);
+				semarg.val = --semval;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 				semctl(sem_count, pslot, SETVAL, semarg);
-				semarg.val = 1; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+				semarg.val = 1;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 				semctl(sem_lock, pslot, SETVAL, semarg);
-				(shmaddr+val)->msg++;
+				(shmaddr + val)->msg++;
 			}
 #ifdef __64LDT__
-                        else if (pid < (pid_t)0) {
+			else if (pid < (pid_t) 0) {
 #else
-                        else if (pid < 0) {
+			else if (pid < 0) {
 #endif
 				perror("spawn: fork failed");
-				severe("spawn: fork failed, exiting with errno %d\n", errno);
+				severe
+				    ("spawn: fork failed, exiting with errno %d\n",
+				     errno);
 				exit(1);
-			}
-			else
-				(shmaddr+val)->msg++;
+			} else
+				(shmaddr + val)->msg++;
 		}
-    }
-	return(pslot);
+	}
+	return (pslot);
 }
 
 /*
@@ -607,18 +626,22 @@
 	extern int msgerr;
 
 	msgid = msgget(IPC_PRIVATE,
-				   IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+		       IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR | S_IRGRP |
+		       S_IWGRP);
 	if (msgid == -1) {
 		perror("msgget msgid failed");
-		fprintf( stderr, " SEVERE : msgget msgid failed: errno %d\n", errno);
+		fprintf(stderr, " SEVERE : msgget msgid failed: errno %d\n",
+			errno);
 		exit(1);
 	}
 
 	msgerr = msgget(IPC_PRIVATE,
-				   IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+			IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR | S_IRGRP |
+			S_IWGRP);
 	if (msgerr == -1) {
 		perror("msgget msgerr failed");
-		fprintf( stderr, " SEVERE : msgget msgerr failed: errno %d\n", errno);
+		fprintf(stderr, " SEVERE : msgget msgerr failed: errno %d\n",
+			errno);
 		exit(1);
 	}
 }
@@ -634,48 +657,58 @@
 	int i;
 	int rc;
 
-        prtln();
-	sem_lock = semget(IPC_PRIVATE, nodesum  - 1,
-			  IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
-dprt("nodesum = %d, sem_lock = %d\n", nodesum, sem_lock);
+	prtln();
+	sem_lock = semget(IPC_PRIVATE, nodesum - 1,
+			  IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR | S_IRGRP |
+			  S_IWGRP);
+	dprt("nodesum = %d, sem_lock = %d\n", nodesum, sem_lock);
 
-        prtln();
+	prtln();
 	if (sem_lock == -1) {
 		perror("semget failed for sem_lock");
-		fprintf( stderr, " SEVERE : semget failed for sem_lock, errno: %d\n", errno);
+		fprintf(stderr,
+			" SEVERE : semget failed for sem_lock, errno: %d\n",
+			errno);
 		rm_shmseg();
 		exit(1);
 	}
 
-        prtln();
+	prtln();
 	sem_count = semget(IPC_PRIVATE, nodesum - 1,
-					  IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+			   IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR | S_IRGRP |
+			   S_IWGRP);
 
 	if (sem_count == -1) {
 		perror("semget failed for sem_count");
-		fprintf( stderr, " SEVERE : semget failed for sem_count, errno: %d\n", errno);
+		fprintf(stderr,
+			" SEVERE : semget failed for sem_count, errno: %d\n",
+			errno);
 		rm_shmseg();
 		exit(1);
 	}
-        prtln();
+	prtln();
 
 	for (i = 0; i < (nodesum - 1); i++) {
-		semarg.val = 1; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+		semarg.val = 1;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 		rc = semctl(sem_lock, i, SETVAL, semarg);
 		prtln();
 		if (rc == -1) {
 			perror("semctl failed for sem_lock failed");
-			fprintf( stderr, " SEVERE : semctl failed for sem_lock, errno: %d\n", errno);
+			fprintf(stderr,
+				" SEVERE : semctl failed for sem_lock, errno: %d\n",
+				errno);
 			rm_shmseg();
 			exit(1);
 		}
 
-		semarg.val = BVAL; /* to fix problem with 4th arg of semctl in 64 bits MARIOG */
+		semarg.val = BVAL;	/* to fix problem with 4th arg of semctl in 64 bits MARIOG */
 		rc = semctl(sem_count, i, SETVAL, semarg);
 		prtln();
 		if (rc == -1) {
 			perror("semctl failed for sem_lock failed");
-			fprintf( stderr, " SEVERE : semctl failed for sem_lock, errno: %d\n", errno);
+			fprintf(stderr,
+				" SEVERE : semctl failed for sem_lock, errno: %d\n",
+				errno);
 			rm_shmseg();
 			exit(1);
 		}
@@ -687,55 +720,57 @@
  */
 void setup_shm(void)
 {
-	extern int nodesum;		/* global shared memory id */
-	extern int shmid;		/* global shared memory id */
+	extern int nodesum;	/* global shared memory id */
+	extern int shmid;	/* global shared memory id */
 	extern Pinfo *shmaddr;
 
-	int i,j;			/* counters */
-	Pinfo *shmad = NULL;		/* ptr to start of shared memory. */
-	Pinfo *pinfo = NULL;		/* ptr to struct in shared memory. */
+	int i, j;		/* counters */
+	Pinfo *shmad = NULL;	/* ptr to start of shared memory. */
+	Pinfo *pinfo = NULL;	/* ptr to struct in shared memory. */
 
 	debugout("size = %d, size (in hex) =  %#x  nodes: %d\n",
-	  			sizeof(Pinfo) * nodesum + (nodesum * BVAL * sizeof(int)),
-	   			sizeof(Pinfo) * nodesum + (nodesum * BVAL * sizeof(int)),
-				nodesum);
+		 sizeof(Pinfo) * nodesum + (nodesum * BVAL * sizeof(int)),
+		 sizeof(Pinfo) * nodesum + (nodesum * BVAL * sizeof(int)),
+		 nodesum);
 
 	/* Get shared memory id */
 	shmid = shmget(IPC_PRIVATE,
 		       sizeof(Pinfo) * nodesum + (nodesum * BVAL * sizeof(int)),
-		       IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
+		       IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR | S_IRGRP |
+		       S_IWGRP);
 	if (shmid < 0) {
 		perror("shmget failed");
-		fprintf( stderr, " SEVERE : shmget failed: errno %d\n", errno);
+		fprintf(stderr, " SEVERE : shmget failed: errno %d\n", errno);
 		exit(1);
 	}
 
 	/* allocate shared memory */
 
-	if ((shmad = (Pinfo *)shmat(shmid, (char *)shmad, 0)) == MAP_FAILED) {
+	if ((shmad = (Pinfo *) shmat(shmid, (char *)shmad, 0)) == MAP_FAILED) {
 		printf("SEVERE : shmat failed\n");
 		exit(1);
-	}
-	else {
+	} else {
 		shmctl(shmid, IPC_RMID, NULL);
 	}
 
 	/* set all fields in shared memory to -1 */
 	for (pinfo = shmad, i = 0; i < nodesum; i++, pinfo++) {
 #ifdef __64LDT__
-                pinfo->pid = (pid_t)-1;
-                pinfo->ppid = (pid_t)-1;
+		pinfo->pid = (pid_t) - 1;
+		pinfo->ppid = (pid_t) - 1;
 #else
-                pinfo->pid = -1;
-                pinfo->ppid = -1;
+		pinfo->pid = -1;
+		pinfo->ppid = -1;
 #endif
 		pinfo->msg = -1;
 		pinfo->err = -1;
 
 		/* Changed 10/9/97 */
-                /* pinfo->list = (int *)((ulong)shmad + nodesum * sizeof(Pinfo)
+		/* pinfo->list = (int *)((ulong)shmad + nodesum * sizeof(Pinfo)
 		   + (sizeof(int) * BVAL * i)); */
-		pinfo->list = (int *)((long)shmad + nodesum * sizeof(Pinfo) + (sizeof(int) * BVAL * i));
+		pinfo->list =
+		    (int *)((long)shmad + nodesum * sizeof(Pinfo) +
+			    (sizeof(int) * BVAL * i));
 		for (j = 0; j < BVAL; j++)
 			*(pinfo->list + j) = -1;
 	}
@@ -750,41 +785,42 @@
 	int i;
 	int rc;
 
-    struct sigaction    action;
+	struct sigaction action;
 
-    /* list of signals we want to catch */
+	/* list of signals we want to catch */
 	static struct signalinfo {
 		int signum;
 		char *signame;
 	} siginfo[] = {
-	    {SIGHUP,	"SIGHUP"},
-	    {SIGINT,	"SIGINT"},
-	    {SIGQUIT,	"SIGQUIT"},
-	    {SIGABRT,	"SIGABRT"},
-	    {SIGBUS,	"SIGBUS"},
-	    {SIGSEGV,	"SIGSEGV"},
-	    {SIGALRM,	"SIGALRM"},
-	    {SIGUSR1,	"SIGUSR1"},
-	    {SIGUSR2,	"SIGUSR2"},
-	    {-1,	"ENDSIG"}
+		{
+		SIGHUP, "SIGHUP"}, {
+		SIGINT, "SIGINT"}, {
+		SIGQUIT, "SIGQUIT"}, {
+		SIGABRT, "SIGABRT"}, {
+		SIGBUS, "SIGBUS"}, {
+		SIGSEGV, "SIGSEGV"}, {
+		SIGALRM, "SIGALRM"}, {
+		SIGUSR1, "SIGUSR1"}, {
+		SIGUSR2, "SIGUSR2"}, {
+		-1, "ENDSIG"}
 	};
 
 	char tmpstr[1024];
 
-	action.sa_handler = (void *) sighandler;
+	action.sa_handler = (void *)sighandler;
 
 #ifdef _LINUX
 	sigfillset(&action.sa_mask);
 #else
-        SIGINITSET( action.sa_mask );
+	SIGINITSET(action.sa_mask);
 #endif
- 	action.sa_flags = 0;
+	action.sa_flags = 0;
 
 	/* Set the signal handler up */
 #ifdef _LINUX
 	sigaddset(&action.sa_mask, SIGTERM);
 #else
-	SIGADDSET( action.sa_mask, SIGTERM);
+	SIGADDSET(action.sa_mask, SIGTERM);
 #endif
 	for (i = 0; siginfo[i].signum != -1; i++) {
 #ifdef _LINUX
@@ -796,8 +832,9 @@
 		if (rc == -1) {
 			sprintf(tmpstr, "sigaction: %s\n", siginfo[i].signame);
 			perror(tmpstr);
-			fprintf( stderr, " SEVERE : Could not set %s signal action, errno=%d.",
-					  siginfo[i].signame, errno );
+			fprintf(stderr,
+				" SEVERE : Could not set %s signal action, errno=%d.",
+				siginfo[i].signame, errno);
 			exit(1);
 		}
 	}
@@ -809,11 +846,12 @@
 #ifndef _LINUX
 void set_timer(void)
 {
-	struct itimerstruc_t    itimer, old_itimer;
+	struct itimerstruc_t itimer, old_itimer;
 
-	if ((timer = gettimerid( TIMERID_REAL, DELIVERY_SIGNALS )) == -1) {
-		perror( "gettimerid" );
-		fprintf( stderr, " SEVERE : Could not get timer id, errno=%d.",errno );
+	if ((timer = gettimerid(TIMERID_REAL, DELIVERY_SIGNALS)) == -1) {
+		perror("gettimerid");
+		fprintf(stderr, " SEVERE : Could not get timer id, errno=%d.",
+			errno);
 		exit(1);
 	}
 
@@ -823,11 +861,13 @@
 	itimer.it_interval.tv_nsec = 0;
 	itimer.it_interval.tv_sec = 0;
 	itimer.it_value.tv_nsec = 0;
-	itimer.it_value.tv_sec = (time_t)(TVAL * 60.0);
+	itimer.it_value.tv_sec = (time_t) (TVAL * 60.0);
 	if (incinterval(timer, &itimer, &old_itimer) == -1) {
-		perror( "incinterval" );
-		fprintf( stderr, " SEVERE : Could not set timer interval, errno=%d.", errno );
-		(void)reltimerid( timer );
+		perror("incinterval");
+		fprintf(stderr,
+			" SEVERE : Could not set timer interval, errno=%d.",
+			errno);
+		(void)reltimerid(timer);
 		exit(1);
 	}
 }
@@ -844,11 +884,11 @@
 	itimer.it_interval.tv_usec = 0;
 	itimer.it_interval.tv_sec = 0;
 	itimer.it_value.tv_usec = 0;
-	itimer.it_value.tv_sec = (time_t)(TVAL * 60.0);
+	itimer.it_value.tv_sec = (time_t) (TVAL * 60.0);
 
 	if (setitimer(ITIMER_REAL, &itimer, NULL)) {
 		perror("setitimer");
-		exit (1);
+		exit(1);
 	}
 }
 #endif
@@ -859,96 +899,106 @@
  * Parse command line arguments.  Any errors cause the program to exit
  * at this point.
  */
-void parse_args( int argc, char *argv[] )
+void parse_args(int argc, char *argv[])
 {
 	int i;
-	int		opt, errflag = 0;
-	int		dflag = 0, bflag = 0, fflag = 0, tflag = 0;
-	extern int	optind;
-	extern char	*optarg;
+	int opt, errflag = 0;
+	int dflag = 0, bflag = 0, fflag = 0, tflag = 0;
+	extern int optind;
+	extern char *optarg;
 
-	/* DVAL:	0  1     2      3   4  5  6  7  8  9  10 11 */
-	int limits[] = {-1,-1, MAXBVAL, 17, 8, 5, 4, 3, 2, 2, 2, 2};
+	/* DVAL:        0  1     2      3   4  5  6  7  8  9  10 11 */
+	int limits[] = { -1, -1, MAXBVAL, 17, 8, 5, 4, 3, 2, 2, 2, 2 };
 
-	while ((opt = getopt( argc, argv, "b:d:ft:D?" )) != EOF) {
-		switch ( opt ) {
-			case 'b':
-				if (bflag)
-					errflag++;
-				else {
-					bflag++;
-					errno = 0;
-    				BVAL = atoi(optarg);
-					if (errno) {
-						perror( "atoi" );
-						fprintf( stderr, " ERROR : atoi - errno %d.", errno );
-						errflag++;
-					}
-				}
-				break;
-			case 'd':
-				if (dflag)
-					errflag++;
-				else {
-					dflag++;
-					errno = 0;
-					DVAL = atoi(optarg);
-					if (errno) {
-						perror( "atoi" );
-						fprintf( stderr, " ERROR : atoi - errno %d.", errno );
-						errflag++;
-					}
-				}
-				break;
-			case 'f':
-				fflag = 1;
-				break;
-			case 'D':
-				AUSDEBUG = 1;
-				break;
-			case 't':
-				if (tflag)
-					errflag++;
-				else {
-					tflag++;
-					errno = 0;
-					TVAL = atoi(optarg);
-					if (!TVAL || errno) {
-						perror( "atoi" );
-						fprintf( stderr, " ERROR : atoi - errno %d.", errno );
-						errflag++;
-					}
-				}
-				break;
-			case '?':
+	while ((opt = getopt(argc, argv, "b:d:ft:D?")) != EOF) {
+		switch (opt) {
+		case 'b':
+			if (bflag)
 				errflag++;
-				break;
+			else {
+				bflag++;
+				errno = 0;
+				BVAL = atoi(optarg);
+				if (errno) {
+					perror("atoi");
+					fprintf(stderr,
+						" ERROR : atoi - errno %d.",
+						errno);
+					errflag++;
+				}
+			}
+			break;
+		case 'd':
+			if (dflag)
+				errflag++;
+			else {
+				dflag++;
+				errno = 0;
+				DVAL = atoi(optarg);
+				if (errno) {
+					perror("atoi");
+					fprintf(stderr,
+						" ERROR : atoi - errno %d.",
+						errno);
+					errflag++;
+				}
+			}
+			break;
+		case 'f':
+			fflag = 1;
+			break;
+		case 'D':
+			AUSDEBUG = 1;
+			break;
+		case 't':
+			if (tflag)
+				errflag++;
+			else {
+				tflag++;
+				errno = 0;
+				TVAL = atoi(optarg);
+				if (!TVAL || errno) {
+					perror("atoi");
+					fprintf(stderr,
+						" ERROR : atoi - errno %d.",
+						errno);
+					errflag++;
+				}
+			}
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 
 	if (BVAL < 2) {
-	   errflag++;
-	   fprintf(stderr,"The value of b must be greater than 1\n");
+		errflag++;
+		fprintf(stderr, "The value of b must be greater than 1\n");
 	} else if (DVAL < 2) {
 		errflag++;
-		fprintf(stderr,"The depth value must be greater than 1\n");
+		fprintf(stderr, "The depth value must be greater than 1\n");
 	} else if (!fflag && (DVAL > MAXDVAL)) {
 /* || BVAL > limits[DVAL])) { */
-		fprintf( stderr, "\tExceeded process creation limits.   \
+		fprintf(stderr, "\tExceeded process creation limits.   \
 \n\tParameters will generate %lu processes.  \n\tThe preset limits are as \
-follows:\n\t\tdepth\tbreadth\ttotal\n", sumit(BVAL,DVAL));
+follows:\n\t\tdepth\tbreadth\ttotal\n", sumit(BVAL, DVAL));
 		for (i = 2; i <= MAXDVAL; i++)
-			fprintf(stderr,"\t\t %-3d\t  %-5d\t%-5lu\n", i, limits[i], sumit(limits[i],i));
-		exit ( 1 );
+			fprintf(stderr, "\t\t %-3d\t  %-5d\t%-5lu\n", i,
+				limits[i], sumit(limits[i], i));
+		exit(1);
 	}
 
 	if (errflag) {
-		fprintf( stderr, "usage: %s [-b number] [-d number] [-t number] \n", argv[0] );
-		fprintf( stderr, "where:\n" );
-		fprintf( stderr, "\t-b number\tnumber of children each parent will spawn ( > 1)\n");
-		fprintf( stderr, "\t-d number\tdepth of process tree ( > 1)\n");
-		fprintf( stderr, "\t-t\t\tset timeout value\n");
-		fprintf( stderr, " SEVERE : Command line parameter error.\n" );
+		fprintf(stderr,
+			"usage: %s [-b number] [-d number] [-t number] \n",
+			argv[0]);
+		fprintf(stderr, "where:\n");
+		fprintf(stderr,
+			"\t-b number\tnumber of children each parent will spawn ( > 1)\n");
+		fprintf(stderr, "\t-d number\tdepth of process tree ( > 1)\n");
+		fprintf(stderr, "\t-t\t\tset timeout value\n");
+		fprintf(stderr, " SEVERE : Command line parameter error.\n");
 		exit(1);
 	}
 }
@@ -958,12 +1008,12 @@
  */
 int getenv_val(void)
 {
-	char *c;				/* character pointer */
+	char *c;		/* character pointer */
 	struct envstruct *envd = envdata;	/* pointer to environment data */
 
 	union {
-   		int  *vint;
-   		char *chptr;
+		int *vint;
+		char *chptr;
 	} val;
 
 	/*
@@ -971,7 +1021,7 @@
 	 * variable value if present.
 	 */
 	for (; *envd->env_name != '\0'; envd++) {
-		if ((val.chptr = getenv(envd->env_name) ) == NULL)
+		if ((val.chptr = getenv(envd->env_name)) == NULL)
 			val.chptr = envd->eval.chptr;
 
 		c = val.chptr;
@@ -979,10 +1029,9 @@
 			c++;
 
 		if (*c == '\0') {
-			(envd->eval.vint) = (int *) malloc(sizeof(int));
+			(envd->eval.vint) = (int *)malloc(sizeof(int));
 			*(envd->eval.vint) = atoi(val.chptr);
-		}
-		else {
+		} else {
 			envd->eval.chptr = malloc(strlen(val.chptr) + 1);
 			strcpy(envd->eval.chptr, val.chptr);
 		}
@@ -996,8 +1045,8 @@
  * process group id of the children so it can terminate all children.
  * This routine uses message queues to receive all communications.
  */
-void messenger(void) /* AKA Assassin */
-{
+void messenger(void)
+{				/* AKA Assassin */
 	Msgbuf rcvbuf;
 
 	int discrim = 0;
@@ -1015,7 +1064,8 @@
 		if (rc == -1) {
 			switch (errno) {
 			case EAGAIN:
-				printf("msgqueue %d not ready to receive\n", msgid);
+				printf("msgqueue %d not ready to receive\n",
+				       msgid);
 				fflush(stdout);
 				errno = 0;
 				break;
@@ -1026,45 +1076,50 @@
 				break;
 			default:
 				perror("msgrcv failed");
-				fprintf( stderr, " SEVERE : messenger - msgrcv failed, errno: %d\n", errno);
+				fprintf(stderr,
+					" SEVERE : messenger - msgrcv failed, errno: %d\n",
+					errno);
 				errno = 0;
 				break;
 			}
-		}
-		else
-		{
-			switch ( (int) rcvbuf.mtyp ) {
-			case 1: /* type 1: we received the process group id */
-				sscanf(rcvbuf.mtext,"%d",&procgrp);
+		} else {
+			switch ((int)rcvbuf.mtyp) {
+			case 1:	/* type 1: we received the process group id */
+				sscanf(rcvbuf.mtext, "%d", &procgrp);
 				break;
 
-			case 2: /*  type 2: we received an error */
-				fprintf( stderr, " SEVERE : %s ",rcvbuf.mtext);
+			case 2:	/*  type 2: we received an error */
+				fprintf(stderr, " SEVERE : %s ", rcvbuf.mtext);
 				/* rcvbuf.mtext type %s ou %d ??? */
 				break;
 
-			case 3: /* type 3: somebody got a signal, now we terminate */
-				sscanf(rcvbuf.mtext,"%d",&sig);
+			case 3:	/* type 3: somebody got a signal, now we terminate */
+				sscanf(rcvbuf.mtext, "%d", &sig);
 
-				switch(sig) {
+				switch (sig) {
 				case SIGALRM:
-				/* a process is hung, we will terminate */
+					/* a process is hung, we will terminate */
 					killpg(procgrp, sig);
-					fprintf(errfp, "ALERT! ALERT! WE HAVE TIMED OUT\n");
-					fprintf( stderr, " SEVERE : SIGALRM: A process timed out, we failed\n");
+					fprintf(errfp,
+						"ALERT! ALERT! WE HAVE TIMED OUT\n");
+					fprintf(stderr,
+						" SEVERE : SIGALRM: A process timed out, we failed\n");
 					shmaddr->err++;
 					break;
 
 				case SIGUSR1:
-				/* Special: means everything went ok */
-					discrim=1;
+					/* Special: means everything went ok */
+					discrim = 1;
 					break;
 
 				default:
-				/* somebody sent a signal, we will terminate */
+					/* somebody sent a signal, we will terminate */
 					killpg(procgrp, sig);
-					fprintf(errfp, "We received signal %d\n", sig);
-					fprintf( stderr, " SEVERE : signal %d received, A proc was killed\n",sig);
+					fprintf(errfp,
+						"We received signal %d\n", sig);
+					fprintf(stderr,
+						" SEVERE : signal %d received, A proc was killed\n",
+						sig);
 					break;
 				}
 				/* clean up and exit with status */
@@ -1099,13 +1154,13 @@
 {
 	pid_t pid;		/* process id */
 	int rc;
-	char  mtext[80];	/* message text */
+	char mtext[80];		/* message text */
 	extern int msgerr;
 	extern int procgrp;
 
 	pid = fork();
 #ifdef __64LDT__
-        if (pid == (pid_t)0) {
+	if (pid == (pid_t) 0) {
 #else
 	if (pid == 0) {
 #endif
@@ -1118,48 +1173,53 @@
 #endif
 		if (AUSDEBUG) {
 			fprintf(stderr, "process group: %d\n", procgrp);
-	        	fflush(stderr);
+			fflush(stderr);
 		}
 		if (procgrp == -1) {
 			perror("setpgid failed");
-			fprintf( stderr, " SEVERE : setpgid failed, errno: %d\n", errno);
+			fprintf(stderr, " SEVERE : setpgid failed, errno: %d\n",
+				errno);
 			exit(1);
 		}
-		sprintf(mtext,"%d", procgrp);
+		sprintf(mtext, "%d", procgrp);
 		rc = send_message(msgerr, 1, mtext);
 		if (rc == -1) {
 			perror("send_message failed");
-			fprintf( stderr, " SEVERE : send_message failed, errno: %d\n", errno);
+			fprintf(stderr,
+				" SEVERE : send_message failed, errno: %d\n",
+				errno);
 			exit(1);
 		}
 
-		put_proc_info(0); /* store process info for this (root) process */
+		put_proc_info(0);	/* store process info for this (root) process */
 		spawn(0);
 		if (shmaddr->pid == getpid()) {
 			sprintf(mtext, "%d", SIGUSR1);
 			rc = send_message(msgerr, 3, mtext);
 			if (rc == -1) {
-				severe("msgsnd failed: %d msgid %d mtyp %d mtext %d\n",errno, msgerr, 3, mtext);
+				severe
+				    ("msgsnd failed: %d msgid %d mtyp %d mtext %d\n",
+				     errno, msgerr, 3, mtext);
 				exit(1);
 
 			}
 		}
 		printf("Test exiting with SUCCESS\n");
 		exit(0);
-        }
-
+	}
 #ifdef __64LDT__
-        else if (pid > (pid_t)0) {
+	else if (pid > (pid_t) 0) {
 #else
-        else if (pid > 0) {
+	else if (pid > 0) {
 #endif
 		set_signals((void *)cleanup);	/* set up signal handlers and initialize pgrp */
-		messenger();		/* receives and acts upon messages */
+		messenger();	/* receives and acts upon messages */
 		exit(1);
-	}
-	else {
+	} else {
 		perror("fork failed");
-		fprintf( stderr, " SEVERE : fork failed, exiting with errno %d\n", errno);
+		fprintf(stderr,
+			" SEVERE : fork failed, exiting with errno %d\n",
+			errno);
 		exit(1);
 	}
 }
@@ -1174,17 +1234,20 @@
 	prtln();
 
 	if (argc < 2) {
-                fprintf( stderr, "usage: %s [-b number] [-d number] [-t number] \n", argv[0] );
-                fprintf( stderr, "where:\n" );
-                fprintf( stderr, "\t-b number\tnumber of children each parent will spawn ( > 1)\n");
-                fprintf( stderr, "\t-d number\tdepth of process tree ( > 1)\n");
-                fprintf( stderr, "\t-t\t\tset timeout value\n");
-                fprintf( stderr, " SEVERE : Command line parameter error.\n" );
-                exit(1);
-        }
+		fprintf(stderr,
+			"usage: %s [-b number] [-d number] [-t number] \n",
+			argv[0]);
+		fprintf(stderr, "where:\n");
+		fprintf(stderr,
+			"\t-b number\tnumber of children each parent will spawn ( > 1)\n");
+		fprintf(stderr, "\t-d number\tdepth of process tree ( > 1)\n");
+		fprintf(stderr, "\t-t\t\tset timeout value\n");
+		fprintf(stderr, " SEVERE : Command line parameter error.\n");
+		exit(1);
+	}
 
 	parse_args(argc, argv);	/* Get all command line arguments */
-dprt("value of BVAL = %d, value of DVAL = %d\n", BVAL, DVAL);
+	dprt("value of BVAL = %d, value of DVAL = %d\n", BVAL, DVAL);
 	nodesum = sumit(BVAL, DVAL);
 #ifdef _LINUX
 	if (nodesum > 250) {
@@ -1196,7 +1259,7 @@
 	}
 #endif
 
-dprt("value of nodesum is initiallized to: %d\n", nodesum);
+	dprt("value of nodesum is initiallized to: %d\n", nodesum);
 
 	prtln();
 	setup_shm();		/* Set up, allocate and initialize shared memory */
@@ -1206,7 +1269,7 @@
 	setup_msgqueue();	/* Set up, allocate and initialize message queues */
 	prtln();
 
-	doit(); 		/* spawn off processes */
+	doit();			/* spawn off processes */
 	prtln();
 	return 0;
 
diff --git a/testcases/kernel/sched/pthreads/pth_str01.c b/testcases/kernel/sched/pthreads/pth_str01.c
index 79b5c26..f366d99 100644
--- a/testcases/kernel/sched/pthreads/pth_str01.c
+++ b/testcases/kernel/sched/pthreads/pth_str01.c
@@ -39,17 +39,17 @@
 #include "test.h"
 #include "pth_str01.h"
 
-int	depth = 3;
-int	breadth = 4;
-int	timeout = 30;			/* minutes */
-int	cdepth;				/* current depth */
-int	debug = 0;
+int depth = 3;
+int breadth = 4;
+int timeout = 30;		/* minutes */
+int cdepth;			/* current depth */
+int debug = 0;
 
-c_info		*child_info;		/* pointer to info array */
-int		node_count;		/* number of nodes created so far */
-pthread_mutex_t	node_mutex;		/* mutex for the node_count */
-pthread_cond_t	node_condvar;		/* condition variable for node_count */
-pthread_attr_t	attr;			/* attributes for created threads */
+c_info *child_info;		/* pointer to info array */
+int node_count;			/* number of nodes created so far */
+pthread_mutex_t node_mutex;	/* mutex for the node_count */
+pthread_cond_t node_condvar;	/* condition variable for node_count */
+pthread_attr_t attr;		/* attributes for created threads */
 
 int num_nodes(int, int);
 int synchronize_children(c_info *);
@@ -74,61 +74,64 @@
  * Parse command line arguments.  Any errors cause the program to exit
  * at this point.
  */
-static void	parse_args( int argc, char *argv[] )
+static void parse_args(int argc, char *argv[])
 {
-	int		opt, errflag = 0;
-	int		bflag = 0, dflag = 0, tflag = 0;
+	int opt, errflag = 0;
+	int bflag = 0, dflag = 0, tflag = 0;
 
-	while ((opt = getopt( argc, argv, "b:d:t:Dh?" )) != EOF) {
-	    switch ( opt ) {
+	while ((opt = getopt(argc, argv, "b:d:t:Dh?")) != EOF) {
+		switch (opt) {
 		case 'b':
-		    if (bflag)
-			errflag++;
-		    else {
-			bflag++;
-			breadth = atoi( optarg );
-			if (breadth <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (bflag)
+				errflag++;
+			else {
+				bflag++;
+				breadth = atoi(optarg);
+				if (breadth <= 0)
+					errflag++;
+			}
+			break;
 		case 'd':
-		    if (dflag)
-			errflag++;
-		    else {
-			dflag++;
-			depth = atoi( optarg );
-			if (depth <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (dflag)
+				errflag++;
+			else {
+				dflag++;
+				depth = atoi(optarg);
+				if (depth <= 0)
+					errflag++;
+			}
+			break;
 		case 't':
-		    if (tflag)
-			errflag++;
-		    else {
-			tflag++;
-			timeout = atoi( optarg );
-			if (timeout <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (tflag)
+				errflag++;
+			else {
+				tflag++;
+				timeout = atoi(optarg);
+				if (timeout <= 0)
+					errflag++;
+			}
+			break;
 		case 'D':
-		    debug = 1;
-		    break;
+			debug = 1;
+			break;
 		case 'h':
 		default:
-		    errflag++;
-		    break;
-	    }
+			errflag++;
+			break;
+		}
 	}
 
 	if (errflag) {
-		fprintf( stderr, "usage: %s [-b <num>] [-d <num>] [-t <num>] [-D]", argv[0] );
-		fprintf( stderr, " where:\n" );
-		fprintf( stderr, "\t-b <num>\tbreadth of child nodes\n" );
-		fprintf( stderr, "\t-d <num>\tdepth of child nodes\n" );
-		fprintf( stderr, "\t-t <num>\ttimeout for child communication (in minutes)\n" );
-		fprintf( stderr, "\t-D\t\tdebug mode on\n" );
-		testexit( 1 );
+		fprintf(stderr,
+			"usage: %s [-b <num>] [-d <num>] [-t <num>] [-D]",
+			argv[0]);
+		fprintf(stderr, " where:\n");
+		fprintf(stderr, "\t-b <num>\tbreadth of child nodes\n");
+		fprintf(stderr, "\t-d <num>\tdepth of child nodes\n");
+		fprintf(stderr,
+			"\t-t <num>\ttimeout for child communication (in minutes)\n");
+		fprintf(stderr, "\t-D\t\tdebug mode on\n");
+		testexit(1);
 	}
 
 }
@@ -138,9 +141,9 @@
  *
  * Caculate the number of child nodes for a given breadth and depth tree.
  */
-int	num_nodes( int b, int d )
+int num_nodes(int b, int d)
 {
-	int	n, sum = 1, partial_exp = 1;
+	int n, sum = 1, partial_exp = 1;
 
 	/*
 	 * The total number of children = sum ( b ** n )
@@ -154,7 +157,7 @@
 		sum += partial_exp;
 	}
 
-	return( sum );
+	return (sum);
 }
 
 /*
@@ -163,14 +166,15 @@
  * Register the child with the parent and then wait for all of the children
  * at the same level to register also.  Return when everything is synched up.
  */
-int	synchronize_children( c_info *parent ) {
-	int		my_index, rc;
-	c_info		*info_p;
-	struct timespec	timer;
+int synchronize_children(c_info * parent)
+{
+	int my_index, rc;
+	c_info *info_p;
+	struct timespec timer;
 
 	if (debug) {
-	    printf( "trying to lock node_mutex\n" );
-	    fflush( stdout );
+		printf("trying to lock node_mutex\n");
+		fflush(stdout);
 	}
 
 	/*
@@ -178,10 +182,10 @@
 	 * will unlock it when we broadcast that all of our siblings have
 	 * been created or when we block waiting for that broadcast.
 	 */
-	pthread_mutex_lock( &node_mutex );
+	pthread_mutex_lock(&node_mutex);
 	my_index = node_count++;
 
-	tst_resm( TINFO, "thread %d started", my_index );
+	tst_resm(TINFO, "thread %d started", my_index);
 
 	/*
 	 * Get a pointer into the array of thread structures which will
@@ -191,8 +195,8 @@
 	info_p->index = my_index;
 
 	if (debug) {
-	    printf( "thread %d info_p=%p\n", my_index, info_p );
-	    fflush( stdout );
+		printf("thread %d info_p=%p\n", my_index, info_p);
+		fflush(stdout);
 	}
 
 	/*
@@ -201,28 +205,28 @@
 	 * do the increment.
 	 */
 	if (debug) {
-	    printf( "thread %d locking child_mutex %p\n", my_index,
-	      &parent->child_mutex );
-	    fflush( stdout );
+		printf("thread %d locking child_mutex %p\n", my_index,
+		       &parent->child_mutex);
+		fflush(stdout);
 	}
-	pthread_mutex_lock( &parent->child_mutex );
+	pthread_mutex_lock(&parent->child_mutex);
 	if (debug) {
-	    printf( "thread %d bumping child_count (currently %d)\n",
-	      my_index, parent->child_count );
-	    fflush( stdout );
+		printf("thread %d bumping child_count (currently %d)\n",
+		       my_index, parent->child_count);
+		fflush(stdout);
 	}
 	parent->child_ptrs[parent->child_count++] = info_p;
 	if (debug) {
-	    printf( "thread %d unlocking child_mutex %p\n", my_index,
-	      &parent->child_mutex );
-	    fflush( stdout );
+		printf("thread %d unlocking child_mutex %p\n", my_index,
+		       &parent->child_mutex);
+		fflush(stdout);
 	}
-	pthread_mutex_unlock( &parent->child_mutex );
+	pthread_mutex_unlock(&parent->child_mutex);
 
 	if (debug) {
-	    printf( "thread %d node_count = %d\n", my_index, node_count );
-	    printf( "expecting %d nodes\n", num_nodes(breadth, cdepth) );
-	    fflush( stdout );
+		printf("thread %d node_count = %d\n", my_index, node_count);
+		printf("expecting %d nodes\n", num_nodes(breadth, cdepth));
+		fflush(stdout);
 	}
 
 	/*
@@ -233,53 +237,56 @@
 	 */
 	if (node_count == num_nodes(breadth, cdepth)) {
 
-	    /*
-	     * Increase the current depth variable, as the tree is now
-	     * fully one level taller.
-	     */
-	    if (debug) {
-		printf( "thread %d doing cdepth++ (%d)\n", my_index, cdepth );
-		fflush( stdout );
-	    }
-	    cdepth++;
+		/*
+		 * Increase the current depth variable, as the tree is now
+		 * fully one level taller.
+		 */
+		if (debug) {
+			printf("thread %d doing cdepth++ (%d)\n", my_index,
+			       cdepth);
+			fflush(stdout);
+		}
+		cdepth++;
 
-	    if (debug) {
-		printf( "thread %d sending child_mutex broadcast\n", my_index );
-		fflush( stdout );
-	    }
-	    /*
-	     * Since all of our siblings have been created, this level of
-	     * the tree is now allowed to continue its work, so wake up the
-	     * rest of the siblings.
-	     */
-	    pthread_cond_broadcast( &node_condvar );
+		if (debug) {
+			printf("thread %d sending child_mutex broadcast\n",
+			       my_index);
+			fflush(stdout);
+		}
+		/*
+		 * Since all of our siblings have been created, this level of
+		 * the tree is now allowed to continue its work, so wake up the
+		 * rest of the siblings.
+		 */
+		pthread_cond_broadcast(&node_condvar);
 
 	} else {
 
-	    /*
-	     * In this case, not all of our siblings at this level of the
-	     * tree have been created, so go to sleep and wait for the
-	     * broadcast on node_condvar.
-	     */
-	    if (debug) {
-		printf( "thread %d waiting for siblings to register\n",
-		  my_index );
-		fflush( stdout );
-	    }
-	    time( &timer.tv_sec );
-	    timer.tv_sec += (unsigned long)timeout * 60;
-            timer.tv_nsec = (unsigned long)0;
-	    if ((rc = pthread_cond_timedwait(&node_condvar, &node_mutex,
-	      &timer))) {
-		tst_resm( TINFO, "pthread_cond_timedwait (sync) %d: %s\n",
-		    my_index, strerror(rc) );
-		testexit( 2 );
-	    }
+		/*
+		 * In this case, not all of our siblings at this level of the
+		 * tree have been created, so go to sleep and wait for the
+		 * broadcast on node_condvar.
+		 */
+		if (debug) {
+			printf("thread %d waiting for siblings to register\n",
+			       my_index);
+			fflush(stdout);
+		}
+		time(&timer.tv_sec);
+		timer.tv_sec += (unsigned long)timeout *60;
+		timer.tv_nsec = (unsigned long)0;
+		if ((rc = pthread_cond_timedwait(&node_condvar, &node_mutex,
+						 &timer))) {
+			tst_resm(TINFO,
+				 "pthread_cond_timedwait (sync) %d: %s\n",
+				 my_index, strerror(rc));
+			testexit(2);
+		}
 
-	    if (debug) {
-		printf( "thread %d is now unblocked\n", my_index );
-		fflush( stdout );
-	    }
+		if (debug) {
+			printf("thread %d is now unblocked\n", my_index);
+			fflush(stdout);
+		}
 
 	}
 
@@ -288,21 +295,21 @@
 	 * initializing.
 	 */
 	if (debug) {
-	    printf( "thread %d unlocking node_mutex\n", my_index );
-	    fflush( stdout );
+		printf("thread %d unlocking node_mutex\n", my_index);
+		fflush(stdout);
 	}
-	pthread_mutex_unlock( &node_mutex );
+	pthread_mutex_unlock(&node_mutex);
 	if (debug) {
-	    printf( "thread %d unlocked node_mutex\n", my_index );
-	    fflush( stdout );
+		printf("thread %d unlocked node_mutex\n", my_index);
+		fflush(stdout);
 	}
 
 	if (debug) {
-	    printf( "synchronize_children returning %d\n", my_index );
-	    fflush( stdout );
+		printf("synchronize_children returning %d\n", my_index);
+		fflush(stdout);
 	}
 
-	return( my_index );
+	return (my_index);
 
 }
 
@@ -311,40 +318,41 @@
  *
  * Do it.
  */
-int	doit( c_info *parent ) {
-	int		rc, child, my_index;
-	void		*status;
-	c_info 		*info_p;
-	struct timespec	timer;
+int doit(c_info * parent)
+{
+	int rc, child, my_index;
+	void *status;
+	c_info *info_p;
+	struct timespec timer;
 
 	if (parent != NULL) {
-	    /*
-	     * Synchronize with our siblings so that all the children at
-	     * a given level have been created before we allow those children
-	     * to spawn new ones (or do anything else for that matter).
-	     */
-	    if (debug) {
-		printf( "non-root child calling synchronize_children\n" );
-		fflush( stdout );
-	    }
-	    my_index = synchronize_children( parent );
-	    if (debug) {
-		printf( "non-root child has been assigned index %d\n",
-		  my_index );
-		fflush( stdout );
-	    }
+		/*
+		 * Synchronize with our siblings so that all the children at
+		 * a given level have been created before we allow those children
+		 * to spawn new ones (or do anything else for that matter).
+		 */
+		if (debug) {
+			printf("non-root child calling synchronize_children\n");
+			fflush(stdout);
+		}
+		my_index = synchronize_children(parent);
+		if (debug) {
+			printf("non-root child has been assigned index %d\n",
+			       my_index);
+			fflush(stdout);
+		}
 	} else {
-	    /*
-	     * The first thread has no one with which to synchronize, so
-	     * set some initial values for things.
-	     */
-	    if (debug) {
-		printf( "root child\n" );
-		fflush( stdout );
-	    }
-	    cdepth = 1;
-	    my_index = 0;
-	    node_count = 1;
+		/*
+		 * The first thread has no one with which to synchronize, so
+		 * set some initial values for things.
+		 */
+		if (debug) {
+			printf("root child\n");
+			fflush(stdout);
+		}
+		cdepth = 1;
+		my_index = 0;
+		node_count = 1;
 	}
 
 	/*
@@ -353,203 +361,227 @@
 	info_p = &child_info[my_index];
 
 	if (debug) {
-	    printf( "thread %d getting to heart of doit.\n", my_index );
-	    printf( "info_p=%p, cdepth=%d, depth=%d\n", info_p, cdepth, depth );
-	    fflush( stdout );
+		printf("thread %d getting to heart of doit.\n", my_index);
+		printf("info_p=%p, cdepth=%d, depth=%d\n", info_p, cdepth,
+		       depth);
+		fflush(stdout);
 	}
 
 	if (cdepth <= depth) {
 
-	    /*
-	     * Since the tree is not yet complete (it is not yet tall enough),
-	     * we need to create another level of children.
-	     */
+		/*
+		 * Since the tree is not yet complete (it is not yet tall enough),
+		 * we need to create another level of children.
+		 */
 
-	    tst_resm( TINFO, "thread %d creating kids, cdepth=%d", my_index, cdepth );
+		tst_resm(TINFO, "thread %d creating kids, cdepth=%d", my_index,
+			 cdepth);
 
-	    /*
-	     * Create breadth children.
-	     */
-	    for (child = 0; child < breadth; child++) {
-		if (debug) {
-		    printf( "thread %d making child %d, ptr=%p\n", my_index,
-		 		       child, &(info_p->threads[child]) );
-		    fflush( stdout );
-		}
-		if ((rc = pthread_create(&(info_p->threads[child]), &attr,
-		  (void *)doit, (void *)info_p))) {
-		    tst_resm( TINFO, "pthread_create (doit): %s\n",
-		      strerror(rc) );
-		    testexit( 3 );
-		} else {
-		    if (debug) {
-		 		 		 printf( "pthread_create made thread %p\n",
-			  &(info_p->threads[child]) );
-			fflush( stdout );
-		    }
-		}
-	    }
-
-	    if (debug) {
-		printf( "thread %d waits on kids, cdepth=%d\n", my_index,
-		    cdepth );
-		fflush( stdout );
-	    }
-
-	    /*
-	     * Wait for our children to finish before we exit ourselves.
-	     */
-	    for (child = 0; child < breadth; child++) {
-		if (debug) {
-		    printf( "attempting join on thread %p\n",
-		      &(info_p->threads[child]) );
-		    fflush( stdout );
-		}
-		if ((rc = pthread_join((info_p->threads[child]), &status))) {
-		    if (debug) {
-			printf(
-			  "join failed on thread %d, status addr=%p: %s\n",
-			  my_index, status, strerror(rc) );
-			fflush( stdout );
-		    }
-		    testexit( 4 );
-		} else {
-		    if (debug) {
-			printf( "thread %d joined child %d ok\n", my_index,
-			  child );
-			fflush( stdout );
-		    }
-		}
-	    }
-
-	} else {
-
-	    /*
-	     * This is the leaf node case.  These children don't create
-	     * any kids; they just talk amongst themselves.
-	     */
-	    tst_resm( TINFO, "thread %d is a leaf node, depth=%d", my_index, cdepth );
-
-	    /*
-	     * Talk to siblings (children of the same parent node).
-	     */
-	    if (breadth > 1) {
-
+		/*
+		 * Create breadth children.
+		 */
 		for (child = 0; child < breadth; child++) {
-		    /*
-		     * Don't talk to yourself.
-		     */
-		    if (parent->child_ptrs[child] != info_p) {
 			if (debug) {
-			    printf( "thread %d locking talk_mutex\n",
-			      my_index );
-			    fflush( stdout );
+				printf("thread %d making child %d, ptr=%p\n",
+				       my_index, child,
+				       &(info_p->threads[child]));
+				fflush(stdout);
 			}
-			pthread_mutex_lock(
-			  &(parent->child_ptrs[child]->talk_mutex) );
-			if ( ++parent->child_ptrs[child]->talk_count
-			  == (breadth - 1) ) {
-			    if (debug) {
-				printf( "thread %d talk siblings\n", my_index );
-				fflush( stdout );
-			    }
-			    if ((rc = pthread_cond_broadcast(
-			      &parent->child_ptrs[child]->talk_condvar))) {
-				tst_resm( TINFO, "pthread_cond_broadcast: %s\n",
-				  strerror(rc) );
-				testexit( 5 );
-			    }
+			if ((rc =
+			     pthread_create(&(info_p->threads[child]), &attr,
+					    (void *)doit, (void *)info_p))) {
+				tst_resm(TINFO, "pthread_create (doit): %s\n",
+					 strerror(rc));
+				testexit(3);
+			} else {
+				if (debug) {
+					printf
+					    ("pthread_create made thread %p\n",
+					     &(info_p->threads[child]));
+					fflush(stdout);
+				}
 			}
-			if (debug) {
-			    printf( "thread %d unlocking talk_mutex\n",
-			      my_index );
-			    fflush( stdout );
-			}
-			pthread_mutex_unlock(
-			  &(parent->child_ptrs[child]->talk_mutex) );
-		    }
+		}
+
+		if (debug) {
+			printf("thread %d waits on kids, cdepth=%d\n", my_index,
+			       cdepth);
+			fflush(stdout);
 		}
 
 		/*
-		 * Wait until the breadth - 1 siblings have contacted us.
+		 * Wait for our children to finish before we exit ourselves.
 		 */
-		if (debug) {
-		    printf( "thread %d waiting for talk siblings\n",
-		      my_index );
-		    fflush( stdout );
+		for (child = 0; child < breadth; child++) {
+			if (debug) {
+				printf("attempting join on thread %p\n",
+				       &(info_p->threads[child]));
+				fflush(stdout);
+			}
+			if ((rc =
+			     pthread_join((info_p->threads[child]), &status))) {
+				if (debug) {
+					printf
+					    ("join failed on thread %d, status addr=%p: %s\n",
+					     my_index, status, strerror(rc));
+					fflush(stdout);
+				}
+				testexit(4);
+			} else {
+				if (debug) {
+					printf("thread %d joined child %d ok\n",
+					       my_index, child);
+					fflush(stdout);
+				}
+			}
 		}
 
-		pthread_mutex_lock( &info_p->talk_mutex );
-		if (info_p->talk_count < (breadth - 1)) {
-		    time( &timer.tv_sec );
-		    timer.tv_sec += (unsigned long)timeout * 60;
-		    timer.tv_nsec = (unsigned long)0;
-		    if ((rc = pthread_cond_timedwait(&info_p->talk_condvar,
-		      &info_p->talk_mutex, &timer))) {
-			tst_resm( TINFO,
-			  "pthread_cond_timedwait (leaf) %d: %s\n",
-			  my_index, strerror(rc) );
-			testexit( 6 );
-		    }
-		}
-		pthread_mutex_unlock( &info_p->talk_mutex );
+	} else {
 
-	    }
+		/*
+		 * This is the leaf node case.  These children don't create
+		 * any kids; they just talk amongst themselves.
+		 */
+		tst_resm(TINFO, "thread %d is a leaf node, depth=%d", my_index,
+			 cdepth);
+
+		/*
+		 * Talk to siblings (children of the same parent node).
+		 */
+		if (breadth > 1) {
+
+			for (child = 0; child < breadth; child++) {
+				/*
+				 * Don't talk to yourself.
+				 */
+				if (parent->child_ptrs[child] != info_p) {
+					if (debug) {
+						printf
+						    ("thread %d locking talk_mutex\n",
+						     my_index);
+						fflush(stdout);
+					}
+					pthread_mutex_lock(&
+							   (parent->
+							    child_ptrs[child]->
+							    talk_mutex));
+					if (++parent->child_ptrs[child]->
+					    talk_count == (breadth - 1)) {
+						if (debug) {
+							printf
+							    ("thread %d talk siblings\n",
+							     my_index);
+							fflush(stdout);
+						}
+						if ((rc =
+						     pthread_cond_broadcast
+						     (&parent->
+						      child_ptrs[child]->
+						      talk_condvar))) {
+							tst_resm(TINFO,
+								 "pthread_cond_broadcast: %s\n",
+								 strerror(rc));
+							testexit(5);
+						}
+					}
+					if (debug) {
+						printf
+						    ("thread %d unlocking talk_mutex\n",
+						     my_index);
+						fflush(stdout);
+					}
+					pthread_mutex_unlock(&
+							     (parent->
+							      child_ptrs
+							      [child]->
+							      talk_mutex));
+				}
+			}
+
+			/*
+			 * Wait until the breadth - 1 siblings have contacted us.
+			 */
+			if (debug) {
+				printf("thread %d waiting for talk siblings\n",
+				       my_index);
+				fflush(stdout);
+			}
+
+			pthread_mutex_lock(&info_p->talk_mutex);
+			if (info_p->talk_count < (breadth - 1)) {
+				time(&timer.tv_sec);
+				timer.tv_sec += (unsigned long)timeout *60;
+				timer.tv_nsec = (unsigned long)0;
+				if ((rc =
+				     pthread_cond_timedwait(&info_p->
+							    talk_condvar,
+							    &info_p->talk_mutex,
+							    &timer))) {
+					tst_resm(TINFO,
+						 "pthread_cond_timedwait (leaf) %d: %s\n",
+						 my_index, strerror(rc));
+					testexit(6);
+				}
+			}
+			pthread_mutex_unlock(&info_p->talk_mutex);
+
+		}
 
 	}
 
 	/*
 	 * Our work is done.  We're outta here.
 	 */
-	tst_resm( TINFO, "thread %d exiting, depth=%d, status=%d, addr=%p", my_index,
-	  cdepth, info_p->status, info_p);
+	tst_resm(TINFO, "thread %d exiting, depth=%d, status=%d, addr=%p",
+		 my_index, cdepth, info_p->status, info_p);
 
-	pthread_exit( 0 );
+	pthread_exit(0);
 
 }
 
 /*
  * main
  */
-int	main( int argc, char *argv[] ) {
-	int		rc, ind, total;
-	pthread_t	root_thread;
+int main(int argc, char *argv[])
+{
+	int rc, ind, total;
+	pthread_t root_thread;
 
-	parse_args( argc, argv );
+	parse_args(argc, argv);
 
 	/*
 	 * Initialize node mutex.
 	 */
 	if ((rc = pthread_mutex_init(&node_mutex, NULL))) {
-		tst_resm( TINFO, "pthread_mutex_init(node_mutex): %s\n",
-		    strerror(rc) );
-		testexit( 7 );
+		tst_resm(TINFO, "pthread_mutex_init(node_mutex): %s\n",
+			 strerror(rc));
+		testexit(7);
 	}
 
 	/*
 	 * Initialize node condition variable.
 	 */
 	if ((rc = pthread_cond_init(&node_condvar, NULL))) {
-		tst_resm( TINFO, "pthread_cond_init(node_condvar): %s\n",
-		    strerror(rc) );
-		testexit( 8 );
+		tst_resm(TINFO, "pthread_cond_init(node_condvar): %s\n",
+			 strerror(rc));
+		testexit(8);
 	}
 
 	/*
 	 * Allocate pthread info structure array.
 	 */
-	total = num_nodes( breadth, depth );
-	tst_resm( TINFO, "Allocating %d nodes.", total );
-	if ((child_info = (c_info *)malloc( total * sizeof(c_info) ))
-	    == NULL ) {
-		perror( "malloc child_info" );
-		testexit( 10 );
+	total = num_nodes(breadth, depth);
+	tst_resm(TINFO, "Allocating %d nodes.", total);
+	if ((child_info = (c_info *) malloc(total * sizeof(c_info)))
+	    == NULL) {
+		perror("malloc child_info");
+		testexit(10);
 	}
-	memset( child_info, 0x00, total * sizeof(c_info) );
+	memset(child_info, 0x00, total * sizeof(c_info));
 
 	if (debug) {
-		printf( "Initializing array for %d children\n", total );
-		fflush( stdout );
+		printf("Initializing array for %d children\n", total);
+		fflush(stdout);
 	}
 
 	/*
@@ -557,63 +589,65 @@
 	 */
 	for (ind = 0; ind < total; ind++) {
 
-		if ( (child_info[ind].threads =
-		    (pthread_t *)malloc( breadth * sizeof(pthread_t) ))
-		    == NULL ) {
-			perror( "malloc threads" );
-			testexit( 11 );
+		if ((child_info[ind].threads =
+		     (pthread_t *) malloc(breadth * sizeof(pthread_t)))
+		    == NULL) {
+			perror("malloc threads");
+			testexit(11);
 		}
-		memset( child_info[ind].threads, 0x00, breadth * sizeof(pthread_t) );
+		memset(child_info[ind].threads, 0x00,
+		       breadth * sizeof(pthread_t));
 
-		if ( (child_info[ind].child_ptrs =
-		    (c_info **)malloc( breadth * sizeof(c_info *) )) == NULL ) {
-			perror( "malloc child_ptrs" );
-			testexit( 12 );
+		if ((child_info[ind].child_ptrs =
+		     (c_info **) malloc(breadth * sizeof(c_info *))) == NULL) {
+			perror("malloc child_ptrs");
+			testexit(12);
 		}
-		memset( child_info[ind].child_ptrs, 0x00,
-		    breadth * sizeof(c_info *) );
+		memset(child_info[ind].child_ptrs, 0x00,
+		       breadth * sizeof(c_info *));
 
 		if ((rc = pthread_mutex_init(&child_info[ind].child_mutex,
-		    NULL))) {
-			tst_resm( TINFO, "pthread_mutex_init child_mutex: %s\n",
-			    strerror(rc) );
-			testexit( 13 );
+					     NULL))) {
+			tst_resm(TINFO, "pthread_mutex_init child_mutex: %s\n",
+				 strerror(rc));
+			testexit(13);
 		}
 
 		if ((rc = pthread_mutex_init(&child_info[ind].talk_mutex,
-		    NULL))) {
-			tst_resm( TINFO, "pthread_mutex_init talk_mutex: %s\n",
-			    strerror(rc) );
-			testexit( 14 );
+					     NULL))) {
+			tst_resm(TINFO, "pthread_mutex_init talk_mutex: %s\n",
+				 strerror(rc));
+			testexit(14);
 		}
 
 		if ((rc = pthread_cond_init(&child_info[ind].child_condvar,
-		    NULL))) {
-			tst_resm( TINFO,
-			    "pthread_cond_init child_condvar: %s\n",
-			    strerror(rc) );
-			testexit( 15 );
+					    NULL))) {
+			tst_resm(TINFO,
+				 "pthread_cond_init child_condvar: %s\n",
+				 strerror(rc));
+			testexit(15);
 		}
 
 		if ((rc = pthread_cond_init(&child_info[ind].talk_condvar,
-		    NULL))) {
-			tst_resm( TINFO, "pthread_cond_init talk_condvar: %s\n",
-			    strerror(rc) );
-			testexit( 16 );
+					    NULL))) {
+			tst_resm(TINFO, "pthread_cond_init talk_condvar: %s\n",
+				 strerror(rc));
+			testexit(16);
 		}
 
 		if (debug) {
-			printf( "Successfully initialized child %d.\n", ind );
-			fflush( stdout );
+			printf("Successfully initialized child %d.\n", ind);
+			fflush(stdout);
 		}
 
 	}
 
-	tst_resm( TINFO, "Creating root thread attributes via pthread_attr_init." );
+	tst_resm(TINFO,
+		 "Creating root thread attributes via pthread_attr_init.");
 
 	if ((rc = pthread_attr_init(&attr))) {
-		tst_resm( TINFO, "pthread_attr_init: %s\n", strerror(rc) );
-		testexit( 17 );
+		tst_resm(TINFO, "pthread_attr_init: %s\n", strerror(rc));
+		testexit(17);
 	}
 
 	/*
@@ -622,38 +656,38 @@
 	 * pthread_join call will sometimes fail and cause mass confusion.
 	 */
 	if ((rc = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE))
-	   ) {
-		tst_resm( TINFO, "pthread_attr_setdetachstate: %s\n",
-		    strerror(rc) );
-		testexit( 18 );
+	    ) {
+		tst_resm(TINFO, "pthread_attr_setdetachstate: %s\n",
+			 strerror(rc));
+		testexit(18);
 	}
 
-	tst_resm( TINFO, "Creating root thread via pthread_create." );
+	tst_resm(TINFO, "Creating root thread via pthread_create.");
 
 	if ((rc = pthread_create(&root_thread, &attr, (void *)doit, NULL))) {
-		tst_resm( TINFO, "pthread_create: %s\n", strerror(rc) );
-		testexit( 19 );
+		tst_resm(TINFO, "pthread_create: %s\n", strerror(rc));
+		testexit(19);
 	}
 
 	if (debug) {
-		printf( "Doing pthread_join.\n" );
-		fflush( stdout );
+		printf("Doing pthread_join.\n");
+		fflush(stdout);
 	}
 
 	/*
 	 * Wait for the root child to exit.
 	 */
-	if (( rc = pthread_join(root_thread, NULL) )) {
-		tst_resm( TINFO, "pthread_join: %s\n", strerror(rc) );
-		testexit( 20 );
+	if ((rc = pthread_join(root_thread, NULL))) {
+		tst_resm(TINFO, "pthread_join: %s\n", strerror(rc));
+		testexit(20);
 	}
 
 	if (debug) {
-		printf( "About to pthread_exit.\n" );
-		fflush( stdout );
+		printf("About to pthread_exit.\n");
+		fflush(stdout);
 	}
 
-	testexit( 0 );
+	testexit(0);
 
 	exit(0);
 }
diff --git a/testcases/kernel/sched/pthreads/pth_str02.c b/testcases/kernel/sched/pthreads/pth_str02.c
index 06804cc..e81ecb1 100644
--- a/testcases/kernel/sched/pthreads/pth_str02.c
+++ b/testcases/kernel/sched/pthreads/pth_str02.c
@@ -56,18 +56,18 @@
  * parse_args (): Parses command line arguments
  */
 
-static void sys_error (const char *, int);
-static void error (const char *, int);
-static void parse_args (int, char **);
-void *thread (void *);
+static void sys_error(const char *, int);
+static void error(const char *, int);
+static void parse_args(int, char **);
+void *thread(void *);
 
 /*
  * Global Variables
  */
 
 int num_threads = DEFAULT_NUM_THREADS;
-int test_limit  = 0;
-int debug       = 0;
+int test_limit = 0;
+int debug = 0;
 
 char *TCID = "pth_str02";
 int TST_TOTAL = 1;
@@ -79,25 +79,25 @@
 | Function:  Main program  (see prolog for more details)               |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	/*
 	 * Parse command line arguments and print out program header
 	 */
-	parse_args (argc, argv);
+	parse_args(argc, argv);
 
-        if (test_limit) {
-	  tst_resm (TINFO, "Creating as many threads as possible");
-        } else {
-	  tst_resm (TINFO, "Creating %d threads", num_threads);
-        }
-	thread (0);
+	if (test_limit) {
+		tst_resm(TINFO, "Creating as many threads as possible");
+	} else {
+		tst_resm(TINFO, "Creating %d threads", num_threads);
+	}
+	thread(0);
 
 	/*
 	 * Program completed successfully...
 	 */
 	tst_resm(TPASS, "Test passed");
-	exit (0);
+	exit(0);
 }
 
 /*---------------------------------------------------------------------+
@@ -107,51 +107,55 @@
 | Function:  Recursively creates threads while num < num_threads       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void *thread (void *parm)
+void *thread(void *parm)
 {
 	intptr_t num = (intptr_t) parm;
-	pthread_t	th;
-	pthread_attr_t	attr;
-	size_t		stacksize = 1046528;
-        int             pcrterr;
+	pthread_t th;
+	pthread_attr_t attr;
+	size_t stacksize = 1046528;
+	int pcrterr;
 
 	/*
 	 * Create threads while num < num_threads...
 	 */
 	if (test_limit || (num < num_threads)) {
 
-		if (pthread_attr_init (&attr))
-			sys_error ("pthread_attr_init failed", __LINE__);
-		if (pthread_attr_setstacksize (&attr, stacksize))
-			sys_error ("pthread_attr_setstacksize failed", __LINE__);
-		if (pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_JOINABLE))
-			sys_error ("pthread_attr_setdetachstate failed", __LINE__);
-                /************************************************/
-                /*   pthread_create does not touch errno.  It RETURNS the error
-                 *   if it fails.  errno has no bearing on this test, so it was
-                 *   removed and replaced with return value check(see man page
-                 *   for pthread_create();
-                 */
-		pcrterr = pthread_create (&th, &attr, thread, (void *)(num + 1));
+		if (pthread_attr_init(&attr))
+			sys_error("pthread_attr_init failed", __LINE__);
+		if (pthread_attr_setstacksize(&attr, stacksize))
+			sys_error("pthread_attr_setstacksize failed", __LINE__);
+		if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE))
+			sys_error("pthread_attr_setdetachstate failed",
+				  __LINE__);
+		/************************************************/
+		/*   pthread_create does not touch errno.  It RETURNS the error
+		 *   if it fails.  errno has no bearing on this test, so it was
+		 *   removed and replaced with return value check(see man page
+		 *   for pthread_create();
+		 */
+		pcrterr = pthread_create(&th, &attr, thread, (void *)(num + 1));
 		if (pcrterr != 0) {
 			if (test_limit) {
-			   tst_resm (TINFO, "Testing pthread limit, %d pthreads created.", (int)num);
-			   pthread_exit(0);
+				tst_resm(TINFO,
+					 "Testing pthread limit, %d pthreads created.",
+					 (int)num);
+				pthread_exit(0);
 			}
 			if (pcrterr == EAGAIN) {
-			    tst_resm (TINFO, "Thread [%d]: unable to create more threads!", (int)num);
-			    return NULL;
-			}
-			else
-			    sys_error ("pthread_create failed", __LINE__);
+				tst_resm(TINFO,
+					 "Thread [%d]: unable to create more threads!",
+					 (int)num);
+				return NULL;
+			} else
+				sys_error("pthread_create failed", __LINE__);
 		}
-		pthread_join (th, (void *) NULL);
+		pthread_join(th, (void *)NULL);
 	}
 
 	return 0;
 	/*
-	pthread_exit(0);
-	*/
+	   pthread_exit(0);
+	 */
 }
 
 /*---------------------------------------------------------------------+
@@ -162,33 +166,33 @@
 |            variables.                                                |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void parse_args (int argc, char **argv)
+static void parse_args(int argc, char **argv)
 {
-	int	i;
-	int	errflag = 0;
-	char	*program_name = *argv;
+	int i;
+	int errflag = 0;
+	char *program_name = *argv;
 
 	while ((i = getopt(argc, argv, "dln:?")) != EOF) {
 		switch (i) {
-			case 'd':		/* debug option */
-				debug++;
-				break;
-			case 'l':		/* test pthread limit */
-				test_limit++;
-				break;
-			case 'n':		/* number of threads */
-				num_threads = atoi (optarg);
-				break;
-			case '?':
-				errflag++;
-				break;
+		case 'd':	/* debug option */
+			debug++;
+			break;
+		case 'l':	/* test pthread limit */
+			test_limit++;
+			break;
+		case 'n':	/* number of threads */
+			num_threads = atoi(optarg);
+			break;
+		case '?':
+			errflag++;
+			break;
 		}
 	}
 
 	/* If any errors exit program */
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
 
@@ -199,12 +203,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void sys_error (const char *msg, int line)
+static void sys_error(const char *msg, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -214,9 +218,9 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-static void error (const char *msg, int line)
+static void error(const char *msg, int line)
 {
-	fprintf (stderr, "ERROR [line: %d] %s\n", line, msg);
+	fprintf(stderr, "ERROR [line: %d] %s\n", line, msg);
 	tst_resm(TFAIL, "Test failed");
-	exit (-1);
+	exit(-1);
 }
diff --git a/testcases/kernel/sched/pthreads/pth_str03.c b/testcases/kernel/sched/pthreads/pth_str03.c
index 06e1d69..8332400 100644
--- a/testcases/kernel/sched/pthreads/pth_str03.c
+++ b/testcases/kernel/sched/pthreads/pth_str03.c
@@ -43,35 +43,35 @@
 
 /* Type definition */
 struct kid_info {
-	long		   sum;            /* sum of childrens indexes plus our own */
-	int     	   index;          /* our index into the array */
-	int                status;         /* return status of this thread */
-	int                child_count;    /* Count of children created */
-	int                talk_count;     /* Count of siblings that we talked to */
-	pthread_t          *threads;       /* dynamic array of thread id of kids */
-	pthread_mutex_t    talk_mutex;     /* mutex for the talk_count */
-	pthread_mutex_t    child_mutex;    /* mutex for the child_count */
-	pthread_cond_t     talk_condvar;   /* condition variable for talk_count */
-	pthread_cond_t     child_condvar;  /* condition variable for child_count */
-	struct kid_info    **child_ptrs;   /* dynamic array of ptrs to kids */
-} ;
+	long sum;		/* sum of childrens indexes plus our own */
+	int index;		/* our index into the array */
+	int status;		/* return status of this thread */
+	int child_count;	/* Count of children created */
+	int talk_count;		/* Count of siblings that we talked to */
+	pthread_t *threads;	/* dynamic array of thread id of kids */
+	pthread_mutex_t talk_mutex;	/* mutex for the talk_count */
+	pthread_mutex_t child_mutex;	/* mutex for the child_count */
+	pthread_cond_t talk_condvar;	/* condition variable for talk_count */
+	pthread_cond_t child_condvar;	/* condition variable for child_count */
+	struct kid_info **child_ptrs;	/* dynamic array of ptrs to kids */
+};
 typedef struct kid_info c_info;
 
 /* Global variables */
-int	depth = 3;
-int	breadth = 4;
-int	timeout = 30;			/* minutes */
-int	cdepth;				/* current depth */
-int	debug = 0;
+int depth = 3;
+int breadth = 4;
+int timeout = 30;		/* minutes */
+int cdepth;			/* current depth */
+int debug = 0;
 
-c_info		*child_info;		/* pointer to info array */
-int		node_count;		/* number of nodes created so far */
-pthread_mutex_t	node_mutex;		/* mutex for the node_count */
-pthread_cond_t	node_condvar;		/* condition variable for node_count */
-pthread_attr_t	attr;			/* attributes for created threads */
+c_info *child_info;		/* pointer to info array */
+int node_count;			/* number of nodes created so far */
+pthread_mutex_t node_mutex;	/* mutex for the node_count */
+pthread_cond_t node_condvar;	/* condition variable for node_count */
+pthread_attr_t attr;		/* attributes for created threads */
 
 int num_nodes(int, int);
-int synchronize_children(c_info *) ;
+int synchronize_children(c_info *);
 void *doit(void *);
 
 char *TCID = "pth_str03";
@@ -79,12 +79,12 @@
 
 void testexit(int value)
 {
-      if (value == 0)
-	  tst_resm(TPASS, "Test passed");
-      else
-	  tst_resm(TFAIL, "Test failed");
+	if (value == 0)
+		tst_resm(TPASS, "Test passed");
+	else
+		tst_resm(TFAIL, "Test failed");
 
-      exit(value);
+	exit(value);
 }
 
 /*--------------------------------------------------------------------------------*
@@ -93,61 +93,64 @@
  * Parse command line arguments.  Any errors cause the program to exit
  * at this point.
  *--------------------------------------------------------------------------------*/
-static void parse_args( int argc, char *argv[] )
+static void parse_args(int argc, char *argv[])
 {
-	int		opt, errflag = 0;
-	int		bflag = 0, dflag = 0, tflag = 0;
+	int opt, errflag = 0;
+	int bflag = 0, dflag = 0, tflag = 0;
 
-	while ((opt = getopt( argc, argv, "b:d:t:D?" )) != EOF) {
-	    switch ( opt ) {
+	while ((opt = getopt(argc, argv, "b:d:t:D?")) != EOF) {
+		switch (opt) {
 		case 'b':
-		    if (bflag)
-			errflag++;
-		    else {
-			bflag++;
-			breadth = atoi( optarg );
-			if (breadth <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (bflag)
+				errflag++;
+			else {
+				bflag++;
+				breadth = atoi(optarg);
+				if (breadth <= 0)
+					errflag++;
+			}
+			break;
 		case 'd':
-		    if (dflag)
-			errflag++;
-		    else {
-			dflag++;
-			depth = atoi( optarg );
-			if (depth <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (dflag)
+				errflag++;
+			else {
+				dflag++;
+				depth = atoi(optarg);
+				if (depth <= 0)
+					errflag++;
+			}
+			break;
 		case 't':
-		    if (tflag)
-			errflag++;
-		    else {
-			tflag++;
-			timeout = atoi( optarg );
-			if (timeout <= 0)
-			    errflag++;
-		    }
-		    break;
+			if (tflag)
+				errflag++;
+			else {
+				tflag++;
+				timeout = atoi(optarg);
+				if (timeout <= 0)
+					errflag++;
+			}
+			break;
 		case 'D':
-		    debug = 1;
-		    break;
+			debug = 1;
+			break;
 		case '?':
 		default:
-		    errflag++;
-		    break;
-	    }
+			errflag++;
+			break;
+		}
 	}
 
 	if (errflag) {
-		fprintf( stderr, "usage: %s [-b <num>] [-d <num>] [-t <num>] [-D]", argv[0] );
-		fprintf( stderr, "where:\n" );
-		fprintf( stderr, "\t-b <num>\tbreadth of child nodes\n" );
-		fprintf( stderr, "\t-d <num>\tdepth of child nodes\n" );
-		fprintf( stderr, "\t-t <num>\ttimeout for child communication (in minutes)\n" );
-		fprintf( stderr, "\t-D\tdebug mode\n" );
-		testexit( 1 );
+		fprintf(stderr,
+			"usage: %s [-b <num>] [-d <num>] [-t <num>] [-D]",
+			argv[0]);
+		fprintf(stderr, "where:\n");
+		fprintf(stderr, "\t-b <num>\tbreadth of child nodes\n");
+		fprintf(stderr, "\t-d <num>\tdepth of child nodes\n");
+		fprintf(stderr,
+			"\t-t <num>\ttimeout for child communication (in minutes)\n");
+		fprintf(stderr, "\t-D\tdebug mode\n");
+		testexit(1);
 	}
 
 }
@@ -157,9 +160,9 @@
  *
  * Caculate the number of child nodes for a given breadth and depth tree.
  *--------------------------------------------------------------------------------*/
-int num_nodes( int b, int d )
+int num_nodes(int b, int d)
 {
-	int	n, sum = 1, partial_exp = 1;
+	int n, sum = 1, partial_exp = 1;
 
 	/*
 	 * The total number of children = sum ( b ** n )
@@ -173,7 +176,7 @@
 		sum += partial_exp;
 	}
 
-	return( sum );
+	return (sum);
 }
 
 /*--------------------------------------------------------------------------------*
@@ -182,21 +185,21 @@
  * Register the child with the parent and then wait for all of the children
  * at the same level to register also.  Return when everything is synched up.
  *--------------------------------------------------------------------------------*/
-int synchronize_children( c_info *parent )
+int synchronize_children(c_info * parent)
 {
-	int		  my_index, rc;
-	c_info		  *info_p;
-	struct timespec	  timer;
+	int my_index, rc;
+	c_info *info_p;
+	struct timespec timer;
 
 	if (debug) {
-	    printf( "trying to lock node_mutex\n" );
-	    fflush( stdout );
+		printf("trying to lock node_mutex\n");
+		fflush(stdout);
 	}
 
 	/* Lock the node_count mutex to we can safely increment it.  We
 	 * will unlock it when we broadcast that all of our siblings have
 	 * been created or when we block waiting for that broadcast.  */
-	pthread_mutex_lock( &node_mutex );
+	pthread_mutex_lock(&node_mutex);
 	my_index = node_count++;
 
 	tst_resm(TINFO, "thread %d started", my_index);
@@ -204,38 +207,39 @@
 	/* Get a pointer into the array of thread structures which will be "me". */
 	info_p = &child_info[my_index];
 	info_p->index = my_index;
-	info_p->sum = (long) my_index;
+	info_p->sum = (long)my_index;
 
 	if (debug) {
-	    printf( "thread %d info_p=%p\n", my_index, info_p );
-	    fflush( stdout );
+		printf("thread %d info_p=%p\n", my_index, info_p);
+		fflush(stdout);
 	}
 
 	/* Register with parent bumping the parent's child_count variable.
 	 * Make sure we have exclusive access to that variable before we
 	 * do the increment.  */
 	if (debug) {
-	    printf( "thread %d locking child_mutex %p\n", my_index, &parent->child_mutex );
-	    fflush( stdout );
+		printf("thread %d locking child_mutex %p\n", my_index,
+		       &parent->child_mutex);
+		fflush(stdout);
 	}
-	pthread_mutex_lock( &parent->child_mutex );
+	pthread_mutex_lock(&parent->child_mutex);
 	if (debug) {
-	    printf( "thread %d bumping child_count (currently %d)\n",
-	      my_index, parent->child_count );
-	    fflush( stdout );
+		printf("thread %d bumping child_count (currently %d)\n",
+		       my_index, parent->child_count);
+		fflush(stdout);
 	}
 	parent->child_ptrs[parent->child_count++] = info_p;
 	if (debug) {
-	    printf( "thread %d unlocking child_mutex %p\n", my_index,
-	      &parent->child_mutex );
-	    fflush( stdout );
+		printf("thread %d unlocking child_mutex %p\n", my_index,
+		       &parent->child_mutex);
+		fflush(stdout);
 	}
-	pthread_mutex_unlock( &parent->child_mutex );
+	pthread_mutex_unlock(&parent->child_mutex);
 
 	if (debug) {
-	    printf( "thread %d node_count = %d\n", my_index, node_count );
-	    printf( "expecting %d nodes\n", num_nodes(breadth, cdepth) );
-	    fflush( stdout );
+		printf("thread %d node_count = %d\n", my_index, node_count);
+		printf("expecting %d nodes\n", num_nodes(breadth, cdepth));
+		fflush(stdout);
 	}
 
 	/* Have all the nodes at our level in the tree been created yet?
@@ -244,68 +248,70 @@
 	 * leaf nodes)).  Otherwise, go to sleep waiting for the broadcast.  */
 	if (node_count == num_nodes(breadth, cdepth)) {
 
-	    /* Increase the current depth variable, as the tree is now
-	     * fully one level taller.  */
-	    if (debug) {
-		printf( "thread %d doing cdepth++ (%d)\n", my_index, cdepth );
-		fflush( stdout );
-	    }
-	    cdepth++;
+		/* Increase the current depth variable, as the tree is now
+		 * fully one level taller.  */
+		if (debug) {
+			printf("thread %d doing cdepth++ (%d)\n", my_index,
+			       cdepth);
+			fflush(stdout);
+		}
+		cdepth++;
 
-	    if (debug) {
-		printf( "thread %d sending child_mutex broadcast\n", my_index );
-		fflush( stdout );
-	    }
+		if (debug) {
+			printf("thread %d sending child_mutex broadcast\n",
+			       my_index);
+			fflush(stdout);
+		}
 
-	    /* Since all of our siblings have been created, this level of
-	     * the tree is now allowed to continue its work, so wake up the
-	     * rest of the siblings.  */
-	    pthread_cond_broadcast( &node_condvar );
+		/* Since all of our siblings have been created, this level of
+		 * the tree is now allowed to continue its work, so wake up the
+		 * rest of the siblings.  */
+		pthread_cond_broadcast(&node_condvar);
 
 	} else {
 
-	    /* In this case, not all of our siblings at this level of the
-	     * tree have been created, so go to sleep and wait for the
-	     * broadcast on node_condvar.  */
-	    if (debug) {
-		printf( "thread %d waiting for siblings to register\n",
-		  my_index );
-		fflush( stdout );
-	    }
-	    time( &timer.tv_sec );
-	    timer.tv_sec += (unsigned long)timeout * 60;
-            timer.tv_nsec = (unsigned long)0;
-	    if ((rc = pthread_cond_timedwait(&node_condvar, &node_mutex,
-	      &timer))) {
-		tst_resm( TINFO, "pthread_cond_timedwait (sync) %d: %s",
-		    my_index, strerror(rc) );
-		testexit( 2 );
-	    }
+		/* In this case, not all of our siblings at this level of the
+		 * tree have been created, so go to sleep and wait for the
+		 * broadcast on node_condvar.  */
+		if (debug) {
+			printf("thread %d waiting for siblings to register\n",
+			       my_index);
+			fflush(stdout);
+		}
+		time(&timer.tv_sec);
+		timer.tv_sec += (unsigned long)timeout *60;
+		timer.tv_nsec = (unsigned long)0;
+		if ((rc = pthread_cond_timedwait(&node_condvar, &node_mutex,
+						 &timer))) {
+			tst_resm(TINFO, "pthread_cond_timedwait (sync) %d: %s",
+				 my_index, strerror(rc));
+			testexit(2);
+		}
 
-	    if (debug) {
-		printf( "thread %d is now unblocked\n", my_index );
-		fflush( stdout );
-	    }
+		if (debug) {
+			printf("thread %d is now unblocked\n", my_index);
+			fflush(stdout);
+		}
 
 	}
 
 	/* Unlock the node_mutex lock, as this thread is finished initializing.  */
 	if (debug) {
-	    printf( "thread %d unlocking node_mutex\n", my_index );
-	    fflush( stdout );
+		printf("thread %d unlocking node_mutex\n", my_index);
+		fflush(stdout);
 	}
-	pthread_mutex_unlock( &node_mutex );
+	pthread_mutex_unlock(&node_mutex);
 	if (debug) {
-	    printf( "thread %d unlocked node_mutex\n", my_index );
-	    fflush( stdout );
+		printf("thread %d unlocked node_mutex\n", my_index);
+		fflush(stdout);
 	}
 
 	if (debug) {
-	    printf( "synchronize_children returning %d\n", my_index );
-	    fflush( stdout );
+		printf("synchronize_children returning %d\n", my_index);
+		fflush(stdout);
 	}
 
-	return( my_index );
+	return (my_index);
 }
 
 /*--------------------------------------------------------------------------------*
@@ -313,312 +319,346 @@
  *
  * Do it.
  *--------------------------------------------------------------------------------*/
-void *doit( void *param )
+void *doit(void *param)
 {
-        c_info *parent  = (c_info *) param;
-	int		rc, child, my_index;
-	void		*status;
-	c_info 		*info_p;
-	struct timespec	timer;
+	c_info *parent = (c_info *) param;
+	int rc, child, my_index;
+	void *status;
+	c_info *info_p;
+	struct timespec timer;
 
 	if (parent != NULL) {
-	    /* Synchronize with our siblings so that all the children at
-	     * a given level have been created before we allow those children
-	     * to spawn new ones (or do anything else for that matter).  */
-	    if (debug) {
-		printf( "non-root child calling synchronize_children\n" );
-		fflush( stdout );
-	    }
-	    my_index = synchronize_children( parent );
-	    if (debug) {
-		printf( "non-root child has been assigned index %d\n",
-		  my_index );
-		fflush( stdout );
-	    }
+		/* Synchronize with our siblings so that all the children at
+		 * a given level have been created before we allow those children
+		 * to spawn new ones (or do anything else for that matter).  */
+		if (debug) {
+			printf("non-root child calling synchronize_children\n");
+			fflush(stdout);
+		}
+		my_index = synchronize_children(parent);
+		if (debug) {
+			printf("non-root child has been assigned index %d\n",
+			       my_index);
+			fflush(stdout);
+		}
 	} else {
-	    /* The first thread has no one with which to synchronize, so
-	     * set some initial values for things.  */
-	    if (debug) {
-		printf( "root child\n" );
-		fflush( stdout );
-	    }
-	    cdepth = 1;
-	    my_index = 0;
-	    node_count = 1;
+		/* The first thread has no one with which to synchronize, so
+		 * set some initial values for things.  */
+		if (debug) {
+			printf("root child\n");
+			fflush(stdout);
+		}
+		cdepth = 1;
+		my_index = 0;
+		node_count = 1;
 	}
 
 	/* Figure out our place in the pthread array.  */
 	info_p = &child_info[my_index];
 
 	if (debug) {
-	    printf( "thread %d getting to heart of doit.\n", my_index );
-	    printf( "info_p=%p, cdepth=%d, depth=%d\n", info_p, cdepth, depth );
-	    fflush( stdout );
+		printf("thread %d getting to heart of doit.\n", my_index);
+		printf("info_p=%p, cdepth=%d, depth=%d\n", info_p, cdepth,
+		       depth);
+		fflush(stdout);
 	}
 
-	if (cdepth <= depth)
-	{
-	    /* Since the tree is not yet complete (it is not yet tall enough),
-	     * we need to create another level of children.  */
+	if (cdepth <= depth) {
+		/* Since the tree is not yet complete (it is not yet tall enough),
+		 * we need to create another level of children.  */
 
-	    tst_resm(TINFO, "thread %d creating kids, cdepth=%d", my_index, cdepth);
+		tst_resm(TINFO, "thread %d creating kids, cdepth=%d", my_index,
+			 cdepth);
 
-	    /* Create breadth children.  */
-	    for (child = 0; child < breadth; child++) {
-		if ((rc = pthread_create(&(info_p->threads[child]), &attr, doit, (void *) info_p))) {
-		    tst_resm( TINFO, "pthread_create (doit): %s",
-		      strerror(rc) );
-		    testexit( 3 );
-		} else {
-		    if (debug) {
-			printf( "pthread_create made thread %p\n",
-			  &(info_p->threads[child]) );
-			fflush( stdout );
-		    }
+		/* Create breadth children.  */
+		for (child = 0; child < breadth; child++) {
+			if ((rc =
+			     pthread_create(&(info_p->threads[child]), &attr,
+					    doit, (void *)info_p))) {
+				tst_resm(TINFO, "pthread_create (doit): %s",
+					 strerror(rc));
+				testexit(3);
+			} else {
+				if (debug) {
+					printf
+					    ("pthread_create made thread %p\n",
+					     &(info_p->threads[child]));
+					fflush(stdout);
+				}
+			}
 		}
-	    }
 
-	    if (debug) {
-		printf( "thread %d waits on kids, cdepth=%d\n", my_index,
-		    cdepth );
-		fflush( stdout );
-	    }
-
-	    /* Wait for our children to finish before we exit ourselves.  */
-	    for (child = 0; child < breadth; child++) {
 		if (debug) {
-		    printf( "attempting join on thread %p\n",
-		      &(info_p->threads[child]) );
-		    fflush( stdout );
+			printf("thread %d waits on kids, cdepth=%d\n", my_index,
+			       cdepth);
+			fflush(stdout);
 		}
-		if ((rc = pthread_join((info_p->threads[child]), &status))) {
-		    if (debug) {
-			printf(
-			  "join failed on thread %d, status addr=%p: %s\n",
-			  my_index, status, strerror(rc) );
-			fflush( stdout );
-		    }
-		    testexit( 4 );
-		} else {
-		    if (debug) {
-			printf( "thread %d joined child %d ok\n", my_index, child );
-			fflush( stdout );
-		    }
 
-		    /* Add all childrens indexes to your index value */
-		    info_p->sum += info_p->child_ptrs[child]->sum;
-		    tst_resm(TINFO, "thread %d adding child thread %d to sum = %ld",
-			   my_index, info_p->child_ptrs[child]->index, (long int)info_p->sum);
+		/* Wait for our children to finish before we exit ourselves.  */
+		for (child = 0; child < breadth; child++) {
+			if (debug) {
+				printf("attempting join on thread %p\n",
+				       &(info_p->threads[child]));
+				fflush(stdout);
+			}
+			if ((rc =
+			     pthread_join((info_p->threads[child]), &status))) {
+				if (debug) {
+					printf
+					    ("join failed on thread %d, status addr=%p: %s\n",
+					     my_index, status, strerror(rc));
+					fflush(stdout);
+				}
+				testexit(4);
+			} else {
+				if (debug) {
+					printf("thread %d joined child %d ok\n",
+					       my_index, child);
+					fflush(stdout);
+				}
+
+				/* Add all childrens indexes to your index value */
+				info_p->sum += info_p->child_ptrs[child]->sum;
+				tst_resm(TINFO,
+					 "thread %d adding child thread %d to sum = %ld",
+					 my_index,
+					 info_p->child_ptrs[child]->index,
+					 (long int)info_p->sum);
+			}
 		}
-	    }
 
 	} else {
 
-	    /* This is the leaf node case.  These children don't create
-	     * any kids; they just talk amongst themselves.  */
-	    tst_resm( TINFO, "thread %d is a leaf node, depth=%d", my_index, cdepth );
+		/* This is the leaf node case.  These children don't create
+		 * any kids; they just talk amongst themselves.  */
+		tst_resm(TINFO, "thread %d is a leaf node, depth=%d", my_index,
+			 cdepth);
 
-	    /* Talk to siblings (children of the same parent node).  */
-	    if (breadth > 1) {
+		/* Talk to siblings (children of the same parent node).  */
+		if (breadth > 1) {
 
-		for (child = 0; child < breadth; child++) {
-		    /* Don't talk to yourself.  */
-		    if (parent->child_ptrs[child] != info_p) {
+			for (child = 0; child < breadth; child++) {
+				/* Don't talk to yourself.  */
+				if (parent->child_ptrs[child] != info_p) {
+					if (debug) {
+						printf
+						    ("thread %d locking talk_mutex\n",
+						     my_index);
+						fflush(stdout);
+					}
+					pthread_mutex_lock(&
+							   (parent->
+							    child_ptrs[child]->
+							    talk_mutex));
+					if (++parent->child_ptrs[child]->
+					    talk_count == (breadth - 1)) {
+						if (debug) {
+							printf
+							    ("thread %d talk siblings\n",
+							     my_index);
+							fflush(stdout);
+						}
+						if ((rc =
+						     pthread_cond_broadcast
+						     (&parent->
+						      child_ptrs[child]->
+						      talk_condvar))) {
+							tst_resm(TINFO,
+								 "pthread_cond_broadcast: %s",
+								 strerror(rc));
+							testexit(5);
+						}
+					}
+					if (debug) {
+						printf
+						    ("thread %d unlocking talk_mutex\n",
+						     my_index);
+						fflush(stdout);
+					}
+					pthread_mutex_unlock(&
+							     (parent->
+							      child_ptrs
+							      [child]->
+							      talk_mutex));
+				}
+			}
+
+			/* Wait until the breadth - 1 siblings have contacted us.  */
 			if (debug) {
-			    printf( "thread %d locking talk_mutex\n",
-			      my_index );
-			    fflush( stdout );
+				printf("thread %d waiting for talk siblings\n",
+				       my_index);
+				fflush(stdout);
 			}
-			pthread_mutex_lock(
-			  &(parent->child_ptrs[child]->talk_mutex) );
-			if (++parent->child_ptrs[child]->talk_count == (breadth - 1)) {
-			    if (debug) {
-				printf( "thread %d talk siblings\n", my_index );
-				fflush( stdout );
-			    }
-			    if ((rc = pthread_cond_broadcast(
-			      &parent->child_ptrs[child]->talk_condvar))) {
-				tst_resm( TINFO, "pthread_cond_broadcast: %s",
-				  strerror(rc) );
-				testexit( 5 );
-			    }
+
+			pthread_mutex_lock(&info_p->talk_mutex);
+			if (info_p->talk_count < (breadth - 1)) {
+				time(&timer.tv_sec);
+				timer.tv_sec += (unsigned long)timeout *60;
+				timer.tv_nsec = (unsigned long)0;
+				if ((rc =
+				     pthread_cond_timedwait(&info_p->
+							    talk_condvar,
+							    &info_p->talk_mutex,
+							    &timer))) {
+					tst_resm(TINFO,
+						 "pthread_cond_timedwait (leaf) %d: %s",
+						 my_index, strerror(rc));
+					testexit(6);
+				}
 			}
-			if (debug) {
-			    printf( "thread %d unlocking talk_mutex\n",
-			      my_index );
-			    fflush( stdout );
-			}
-			pthread_mutex_unlock(
-			  &(parent->child_ptrs[child]->talk_mutex) );
-		    }
-		}
+			pthread_mutex_unlock(&info_p->talk_mutex);
 
-		/* Wait until the breadth - 1 siblings have contacted us.  */
-		if (debug) {
-		    printf( "thread %d waiting for talk siblings\n", my_index );
-		    fflush( stdout );
 		}
 
-		pthread_mutex_lock( &info_p->talk_mutex );
-		if (info_p->talk_count < (breadth - 1)) {
-		    time( &timer.tv_sec );
-		    timer.tv_sec += (unsigned long)timeout * 60;
-		    timer.tv_nsec = (unsigned long)0;
-		    if ((rc = pthread_cond_timedwait(&info_p->talk_condvar,
-		      &info_p->talk_mutex, &timer))) {
-			tst_resm( TINFO,
-			  "pthread_cond_timedwait (leaf) %d: %s",
-			  my_index, strerror(rc) );
-			testexit( 6 );
-		    }
-		}
-		pthread_mutex_unlock( &info_p->talk_mutex );
-
-	    }
-
 	}
 
 	/* Our work is done.  We're outta here. */
-	tst_resm(TINFO, "thread %d exiting, depth=%d, status=%d, addr=%p", my_index,
-	  cdepth, info_p->status, info_p);
+	tst_resm(TINFO, "thread %d exiting, depth=%d, status=%d, addr=%p",
+		 my_index, cdepth, info_p->status, info_p);
 
-	pthread_exit( 0 );
+	pthread_exit(0);
 }
 
 /*--------------------------------------------------------------------------------*
  * main
  *--------------------------------------------------------------------------------*/
-int main( int argc, char *argv[] )
+int main(int argc, char *argv[])
 {
-	int		rc, ind, total;
-	pthread_t	root_thread;
+	int rc, ind, total;
+	pthread_t root_thread;
 
-	parse_args( argc, argv );
+	parse_args(argc, argv);
 
 	/* Initialize node mutex.  */
 	if ((rc = pthread_mutex_init(&node_mutex, NULL))) {
-		tst_resm( TINFO, "pthread_mutex_init(node_mutex): %s",
-		    strerror(rc) );
-		testexit( 7 );
+		tst_resm(TINFO, "pthread_mutex_init(node_mutex): %s",
+			 strerror(rc));
+		testexit(7);
 	}
 
 	/* Initialize node condition variable.  */
 	if ((rc = pthread_cond_init(&node_condvar, NULL))) {
-		tst_resm( TINFO, "pthread_cond_init(node_condvar): %s",
-		    strerror(rc) );
-		testexit( 8 );
+		tst_resm(TINFO, "pthread_cond_init(node_condvar): %s",
+			 strerror(rc));
+		testexit(8);
 	}
 
 	/* Allocate pthread info structure array.  */
-	if ((total = num_nodes( breadth, depth )) > MAXTHREADS) {
-		tst_resm( TINFO, "Can't create %d threads; max is %d.",
-		    total, MAXTHREADS );
-		testexit( 9 );
+	if ((total = num_nodes(breadth, depth)) > MAXTHREADS) {
+		tst_resm(TINFO, "Can't create %d threads; max is %d.",
+			 total, MAXTHREADS);
+		testexit(9);
 	}
-	tst_resm( TINFO, "Allocating %d nodes.", total );
-	if ((child_info = (c_info *)malloc( total * sizeof(c_info) )) == NULL) {
-		perror( "malloc child_info" );
-		testexit( 10 );
+	tst_resm(TINFO, "Allocating %d nodes.", total);
+	if ((child_info = (c_info *) malloc(total * sizeof(c_info))) == NULL) {
+		perror("malloc child_info");
+		testexit(10);
 	}
-	memset( child_info, 0x00, total * sizeof(c_info) );
+	memset(child_info, 0x00, total * sizeof(c_info));
 
 	if (debug) {
-		printf( "Initializing array for %d children\n", total );
-		fflush( stdout );
+		printf("Initializing array for %d children\n", total);
+		fflush(stdout);
 	}
 
 	/* Allocate array of pthreads descriptors and initialize variables.  */
 	for (ind = 0; ind < total; ind++) {
 
-		if ( (child_info[ind].threads =
-		    (pthread_t *)malloc( breadth * sizeof(pthread_t) )) == NULL ) {
-			perror( "malloc threads" );
-			testexit( 11 );
+		if ((child_info[ind].threads =
+		     (pthread_t *) malloc(breadth * sizeof(pthread_t))) ==
+		    NULL) {
+			perror("malloc threads");
+			testexit(11);
 		}
-		memset( child_info[ind].threads, 0x00, breadth * sizeof(pthread_t) );
+		memset(child_info[ind].threads, 0x00,
+		       breadth * sizeof(pthread_t));
 
-		if ( (child_info[ind].child_ptrs =
-		    (c_info **)malloc( breadth * sizeof(c_info *) )) == NULL ) {
-			perror( "malloc child_ptrs" );
-			testexit( 12 );
+		if ((child_info[ind].child_ptrs =
+		     (c_info **) malloc(breadth * sizeof(c_info *))) == NULL) {
+			perror("malloc child_ptrs");
+			testexit(12);
 		}
-		memset( child_info[ind].child_ptrs, 0x00,
-		    breadth * sizeof(c_info *) );
+		memset(child_info[ind].child_ptrs, 0x00,
+		       breadth * sizeof(c_info *));
 
-		if ((rc = pthread_mutex_init(&child_info[ind].child_mutex, NULL))) {
-			tst_resm( TINFO, "pthread_mutex_init child_mutex: %s",
-			    strerror(rc) );
-			testexit( 13 );
+		if ((rc =
+		     pthread_mutex_init(&child_info[ind].child_mutex, NULL))) {
+			tst_resm(TINFO, "pthread_mutex_init child_mutex: %s",
+				 strerror(rc));
+			testexit(13);
 		}
 
-		if ((rc = pthread_mutex_init(&child_info[ind].talk_mutex, NULL))) {
-			tst_resm( TINFO, "pthread_mutex_init talk_mutex: %s",
-			    strerror(rc) );
-			testexit( 14 );
+		if ((rc =
+		     pthread_mutex_init(&child_info[ind].talk_mutex, NULL))) {
+			tst_resm(TINFO, "pthread_mutex_init talk_mutex: %s",
+				 strerror(rc));
+			testexit(14);
 		}
 
-		if ((rc = pthread_cond_init(&child_info[ind].child_condvar, NULL))) {
-			tst_resm( TINFO,
-			    "pthread_cond_init child_condvar: %s",
-			    strerror(rc) );
-			testexit( 15 );
+		if ((rc =
+		     pthread_cond_init(&child_info[ind].child_condvar, NULL))) {
+			tst_resm(TINFO, "pthread_cond_init child_condvar: %s",
+				 strerror(rc));
+			testexit(15);
 		}
 
-		if ((rc = pthread_cond_init(&child_info[ind].talk_condvar, NULL))) {
-			tst_resm( TINFO, "pthread_cond_init talk_condvar: %s",
-			    strerror(rc) );
-			testexit( 16 );
+		if ((rc =
+		     pthread_cond_init(&child_info[ind].talk_condvar, NULL))) {
+			tst_resm(TINFO, "pthread_cond_init talk_condvar: %s",
+				 strerror(rc));
+			testexit(16);
 		}
 
 		if (debug) {
-			printf( "Successfully initialized child %d.\n", ind );
-			fflush( stdout );
+			printf("Successfully initialized child %d.\n", ind);
+			fflush(stdout);
 		}
 
 	}
 
-	tst_resm( TINFO, "Creating root thread attributes via pthread_attr_init." );
+	tst_resm(TINFO,
+		 "Creating root thread attributes via pthread_attr_init.");
 
 	if ((rc = pthread_attr_init(&attr))) {
-		tst_resm( TINFO, "pthread_attr_init: %s", strerror(rc) );
-		testexit( 17 );
+		tst_resm(TINFO, "pthread_attr_init: %s", strerror(rc));
+		testexit(17);
 	}
 
 	/* Make sure that all the thread children we create have the
 	 * PTHREAD_CREATE_JOINABLE attribute.  If they don't, then the
 	 * pthread_join call will sometimes fail and cause mass confusion.  */
 	if ((rc = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE))) {
-		tst_resm( TINFO, "pthread_attr_setdetachstate: %s",
-		    strerror(rc) );
-		testexit( 18 );
+		tst_resm(TINFO, "pthread_attr_setdetachstate: %s",
+			 strerror(rc));
+		testexit(18);
 	}
 
-	tst_resm( TINFO, "Creating root thread via pthread_create." );
+	tst_resm(TINFO, "Creating root thread via pthread_create.");
 
 	if ((rc = pthread_create(&root_thread, &attr, doit, NULL))) {
-		tst_resm( TINFO, "pthread_create: %s", strerror(rc) );
-		testexit( 19 );
+		tst_resm(TINFO, "pthread_create: %s", strerror(rc));
+		testexit(19);
 	}
 
 	if (debug) {
-		printf( "Doing pthread_join.\n" );
-		fflush( stdout );
+		printf("Doing pthread_join.\n");
+		fflush(stdout);
 	}
 
 	/* Wait for the root child to exit.  */
 	if ((rc = pthread_join(root_thread, NULL))) {
-		tst_resm( TINFO, "pthread_join: %s", strerror(rc) );
-		testexit( 20 );
+		tst_resm(TINFO, "pthread_join: %s", strerror(rc));
+		testexit(20);
 	}
 
 	if (debug) {
-		printf( "About to pthread_exit.\n" );
-		fflush( stdout );
+		printf("About to pthread_exit.\n");
+		fflush(stdout);
 	}
 
 	tst_resm(TINFO, "The sum of tree (breadth %d, depth %d) is %ld",
-		breadth, depth, child_info[0].sum);
-	testexit( 0 );
+		 breadth, depth, child_info[0].sum);
+	testexit(0);
 
 	exit(0);
 }
diff --git a/testcases/kernel/sched/sched_stress/sched.c b/testcases/kernel/sched/sched_stress/sched.c
index 3ec0f16..80f1e9c 100644
--- a/testcases/kernel/sched/sched_stress/sched.c
+++ b/testcases/kernel/sched/sched_stress/sched.c
@@ -51,17 +51,17 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int openlog (char *filename)
+int openlog(char *filename)
 {
 
 	if (filename == NULL)
-		error ("passed bad file name to openlog()", __FILE__, __LINE__);
+		error("passed bad file name to openlog()", __FILE__, __LINE__);
 
 	/*
 	 * Open the log file...
 	 */
-	if  ( (logfile = fopen (filename, "a")) == (FILE *) NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((logfile = fopen(filename, "a")) == (FILE *) NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
 	return (0);
 }
@@ -73,10 +73,10 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void logmsg (const char *args, ...)
+void logmsg(const char *args, ...)
 {
-	fprintf (logfile, args);
-	fflush (logfile);
+	fprintf(logfile, args);
+	fflush(logfile);
 }
 #endif
 
@@ -87,12 +87,12 @@
 | Function:  Creates system error message and calls error ()           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void sys_error (const char *msg, const char *file, int line)
+void sys_error(const char *msg, const char *file, int line)
 {
-	char syserr_msg [256];
+	char syserr_msg[256];
 
-	sprintf (syserr_msg, "%s: %s\n", msg, strerror (errno));
-	error (syserr_msg, file, line);
+	sprintf(syserr_msg, "%s: %s\n", msg, strerror(errno));
+	error(syserr_msg, file, line);
 }
 
 /*---------------------------------------------------------------------+
@@ -102,8 +102,8 @@
 | Function:  Prints out message and exits...                           |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void error (const char *msg, const char *file, int line)
+void error(const char *msg, const char *file, int line)
 {
-	fprintf (stderr, "ERROR [file: %s, line: %d] %s\n", file, line, msg);
-	exit (-1);
+	fprintf(stderr, "ERROR [file: %s, line: %d] %s\n", file, line, msg);
+	exit(-1);
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c
index 10dbcab..4570acf 100644
--- a/testcases/kernel/sched/sched_stress/sched_driver.c
+++ b/testcases/kernel/sched/sched_stress/sched_driver.c
@@ -93,8 +93,8 @@
  */
 #define MAXPROCS   100
 #define PRIINC     2
-#define MAX_PRI    55    /* was 50 */
-#define MIN_PRI    75    /* was 64 */
+#define MAX_PRI    55		/* was 50 */
+#define MIN_PRI    75		/* was 64 */
 #define DEFAULT_STRESS_PERCENTAGE	0.5
 #define DEFAULT_PROCESS_SLOTS		16
 #define DEFAULT_TIME			1.00
@@ -116,38 +116,38 @@
  *
  * debug: (option flag) enables debugging messages
  */
-int	numprocs,          /* number of process id's in table             */
-	procs[MAXPROCS],   /* array of process id's for killing           */
-	long_running,      /* number of long term testcases running       */
-	short_running;     /* number of short term testcases running      */
-float	e4user,            /* previous elapsed seconds for tc 4-user      */
-	e4real,            /* previous elapsed seconds for tc 4-real      */
-	e5user,            /* previous elapsed seconds for tc 5-user      */
-	e5real,            /* previous elapsed seconds for tc 5-real      */
-	e6user0,           /* previous elapsed seconds for tc 6-user,nf   */
-	e6real0,           /* previous elapsed seconds for tc 6-real,nf   */
-	e6user1,           /* previous elapsed seconds for tc 6-user,f    */
-	e6child;           /* previous elapsed seconds for tc 6-child     */
-double	stress_percent = DEFAULT_STRESS_PERCENTAGE;
-double	execution_time = DEFAULT_TIME;
-int	process_slots  = DEFAULT_PROCESS_SLOTS;
-int	debug = 0;
+int numprocs,			/* number of process id's in table             */
+ procs[MAXPROCS],		/* array of process id's for killing           */
+ long_running,			/* number of long term testcases running       */
+ short_running;			/* number of short term testcases running      */
+float e4user,			/* previous elapsed seconds for tc 4-user      */
+ e4real,			/* previous elapsed seconds for tc 4-real      */
+ e5user,			/* previous elapsed seconds for tc 5-user      */
+ e5real,			/* previous elapsed seconds for tc 5-real      */
+ e6user0,			/* previous elapsed seconds for tc 6-user,nf   */
+ e6real0,			/* previous elapsed seconds for tc 6-real,nf   */
+ e6user1,			/* previous elapsed seconds for tc 6-user,f    */
+ e6child;			/* previous elapsed seconds for tc 6-child     */
+double stress_percent = DEFAULT_STRESS_PERCENTAGE;
+double execution_time = DEFAULT_TIME;
+int process_slots = DEFAULT_PROCESS_SLOTS;
+int debug = 0;
 
 /*
  * Function prototypes
  */
-void  startup (long);
-int   start_testcase (char *, char *, char *, char *, char *, char *);
-int   process_slots_in_use ();
-int   available_user_process_slots ();
-float measure_test (char *, char *, char *, char *, float *);
-void  display_line (char *, int, int, float, float *, int);
-void  perform_throughput_tests (int);
-void  start_long_term_testcases (int, char *);
-void  kill_short_term_testcases ();
-void  start_short_term_testcases (int, double, int);
-void  finishup (long);
-void  parse_args (int, char **);
+void startup(long);
+int start_testcase(char *, char *, char *, char *, char *, char *);
+int process_slots_in_use();
+int available_user_process_slots();
+float measure_test(char *, char *, char *, char *, float *);
+void display_line(char *, int, int, float, float *, int);
+void perform_throughput_tests(int);
+void start_long_term_testcases(int, char *);
+void kill_short_term_testcases();
+void start_short_term_testcases(int, double, int);
+void finishup(long);
+void parse_args(int, char **);
 
 /*---------------------------------------------------------------------+
 |                               main ()                                |
@@ -156,29 +156,29 @@
 | Function:  Main program                                              |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	long    runseconds,              /* number of seconds to run */
-		start_time;              /* time at start of driver */
-	int     current_priority,        /* current priority level for nice */
-		workslots,               /* number of free workslots */
-		long_term_slot_total,    /* workslots for long-term processes */
-		short_term_slot_total;   /* workslots for short-term */
+	long runseconds,	/* number of seconds to run */
+	 start_time;		/* time at start of driver */
+	int current_priority,	/* current priority level for nice */
+	 workslots,		/* number of free workslots */
+	 long_term_slot_total,	/* workslots for long-term processes */
+	 short_term_slot_total;	/* workslots for short-term */
 
 	/*
 	 * Parse command line arguments & printer program header...
 	 */
-	parse_args (argc, argv);
-	printf ("Scheduler Testsuite Program\n\n");
-	fflush (stdout);
+	parse_args(argc, argv);
+	printf("Scheduler Testsuite Program\n\n");
+	fflush(stdout);
 
 	/*
 	 * Calculate number of seconds to run, then print out start info
 	 */
-	runseconds = (long)  (execution_time * 60.0 * 60.0);
-	start_time = time ((long *) 0);
+	runseconds = (long)(execution_time * 60.0 * 60.0);
+	start_time = time((long *)0);
 
-	startup (start_time);
+	startup(start_time);
 
 	/*
 	 * Calculate available workslots, long-term, and short-term slots
@@ -186,46 +186,50 @@
 	workslots = available_user_process_slots() * stress_percent;
 	long_term_slot_total = workslots / 2;
 	if (debug) {
-		printf ("available slots:      %d\n", available_user_process_slots ());
-		printf ("workslots available:  %d\n", workslots);
-		printf ("stress_percent:       %f\n", stress_percent);
-		printf ("run-hours:            %f (hrs)\n", execution_time);
-		 		 printf ("runseconds:           %ld (sec)\n", runseconds);
+		printf("available slots:      %d\n",
+		       available_user_process_slots());
+		printf("workslots available:  %d\n", workslots);
+		printf("stress_percent:       %f\n", stress_percent);
+		printf("run-hours:            %f (hrs)\n", execution_time);
+		printf("runseconds:           %ld (sec)\n", runseconds);
 	}
 
 	/*
 	 * Run the first set of tests with an average priority
 	 */
-	perform_throughput_tests ( (MAX_PRI + MIN_PRI) / 2);
-	fflush (stdout);
+	perform_throughput_tests((MAX_PRI + MIN_PRI) / 2);
+	fflush(stdout);
 
 	/*
 	 * Start the long-term testcases running
 	 */
-	start_long_term_testcases (long_term_slot_total, argv[2]);
+	start_long_term_testcases(long_term_slot_total, argv[2]);
 	short_term_slot_total = workslots / 2;
-	fflush (stdout);
+	fflush(stdout);
 
 	/*
 	 * Loop while there is still time
 	 */
-	current_priority=MAX_PRI;
+	current_priority = MAX_PRI;
 	while ((time(0) - start_time) < runseconds) {
 
-		if (debug) printf ("current priority: %d\n", current_priority);
-		if (debug) printf ("starting short term tests\n");
+		if (debug)
+			printf("current priority: %d\n", current_priority);
+		if (debug)
+			printf("starting short term tests\n");
 
-		start_short_term_testcases (short_term_slot_total,
-			stress_percent, current_priority);
-		fflush (stdout);
+		start_short_term_testcases(short_term_slot_total,
+					   stress_percent, current_priority);
+		fflush(stdout);
 
-		perform_throughput_tests (current_priority);
-		fflush (stdout);
+		perform_throughput_tests(current_priority);
+		fflush(stdout);
 
-		if (debug) printf ("killing short term tests\n");
+		if (debug)
+			printf("killing short term tests\n");
 
-		kill_short_term_testcases ();
-		fflush (stdout);
+		kill_short_term_testcases();
+		fflush(stdout);
 
 		if (current_priority + PRIINC > MIN_PRI)
 			current_priority = MAX_PRI;
@@ -236,9 +240,9 @@
 	/*
 	 * Exit with success...
 	 */
-	finishup (start_time);
-	printf ("\nsuccessful!\n");
-	fflush (stdout);
+	finishup(start_time);
+	printf("\nsuccessful!\n");
+	fflush(stdout);
 	return (0);
 }
 
@@ -247,23 +251,23 @@
  * information to the screen and .  It also initializes the	 *
  * process id list and other global variables.	 			 *
  *-----------------------------------------------------------------------*/
-void startup (long start_time)
+void startup(long start_time)
 {
-	char   tempbuffer[50];   /* temporary buffer to hold names */
+	char tempbuffer[50];	/* temporary buffer to hold names */
 
 	/*
 	 * Now output some diagnostic information
 	 */
-	printf ("start time    = %s\n", ctime (&start_time));
+	printf("start time    = %s\n", ctime(&start_time));
 
-	gethostname (tempbuffer, 40);
-	printf ("host name     = %s\n", tempbuffer);
+	gethostname(tempbuffer, 40);
+	printf("host name     = %s\n", tempbuffer);
 
-	printf ("user name     = %s\n", getpwuid(geteuid())->pw_name);
+	printf("user name     = %s\n", getpwuid(geteuid())->pw_name);
 
-	printf ("test duration = %4.2f (hours)\n", execution_time);
+	printf("test duration = %4.2f (hours)\n", execution_time);
 
-	printf ("test stress   = %4.2f%%%%\n\n", 100 * stress_percent);
+	printf("test stress   = %4.2f%%%%\n\n", 100 * stress_percent);
 
 	/*
 	 * Initialize the global variables
@@ -294,17 +298,18 @@
  *	param4    if sched_tc6:  fork flag:  0=false, 1=true             *
  *-----------------------------------------------------------------------*/
 
-int start_testcase (char *name1, char *name2, char *param1, char *param2, char *param3, char *param4)
+int start_testcase(char *name1, char *name2, char *param1, char *param2,
+		   char *param3, char *param4)
 {
-	int   pid,        /* pid of currently running process */
-	pid_save;   /* saved pid of process */
+	int pid,		/* pid of currently running process */
+	 pid_save;		/* saved pid of process */
 
 	/*
 	 * Fork a process that will run testcase and save the pid
 	 */
 	if (debug)
-		printf ("test: %s %s p1[%s] p2[%s] p3[%s] p4[%s]\n",
-			name1, name2, param1, param2, param3, param4);
+		printf("test: %s %s p1[%s] p2[%s] p3[%s] p4[%s]\n",
+		       name1, name2, param1, param2, param3, param4);
 
 	pid_save = pid = fork();
 
@@ -315,34 +320,38 @@
 	 * anything else, then the parent is running, and we return.
 	 */
 	switch (pid) {
-		case -1 :
-			exit (-1);
-		case 0 :
-			execl (name1, name2, param1, param2, param3, param4, NULL);
-			printf ("ERROR: start_testcase():  execl failed.\n");
-			exit (-1);
-		default :
-			break;
+	case -1:
+		exit(-1);
+	case 0:
+		execl(name1, name2, param1, param2, param3, param4, NULL);
+		printf("ERROR: start_testcase():  execl failed.\n");
+		exit(-1);
+	default:
+		break;
 	}
 	if (debug)
-		printf ("testcase %s started -- pid is %d\n", name2, pid_save);
+		printf("testcase %s started -- pid is %d\n", name2, pid_save);
 
 	/*
 	 * If the process just forked is for a short-term testcase, then
 	 * add the process id to the table.
 	 */
-	if (debug) printf ("new process: %s ", name2);
-	if  (strstr (name2, "tc1") || strstr (name2, "tc3")) {
-		procs[ numprocs ] = pid_save;
+	if (debug)
+		printf("new process: %s ", name2);
+	if (strstr(name2, "tc1") || strstr(name2, "tc3")) {
+		procs[numprocs] = pid_save;
 		numprocs++;
 		short_running++;
-		if (debug) printf ("(%d short term)", short_running);
+		if (debug)
+			printf("(%d short term)", short_running);
 	}
-	if  (strstr (name2, "tc0") || strstr (name2, "tc2")) {
+	if (strstr(name2, "tc0") || strstr(name2, "tc2")) {
 		long_running++;
-		if (debug) printf ("(%d long term)", long_running);
+		if (debug)
+			printf("(%d long term)", long_running);
 	}
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 
 	return (pid_save);
 }
@@ -353,39 +362,39 @@
  *-----------------------------------------------------------------------*/
 int process_slots_in_use()
 {
-	FILE   *psfile;     /* temporary file to hold output of 'ps' command */
-	int    usedslots;   /* holds the number of used process slots */
+	FILE *psfile;		/* temporary file to hold output of 'ps' command */
+	int usedslots;		/* holds the number of used process slots */
 
 	/*
 	 * Call the 'ps' command and write the number of process slots to a file
 	 */
-	if  (system ("ps -e | wc -l > ps.out") < 0)
-		sys_error ("system failed", __FILE__, __LINE__);
+	if (system("ps -e | wc -l > ps.out") < 0)
+		sys_error("system failed", __FILE__, __LINE__);
 
 	/*
 	 * Open the output file
 	 */
-	if  ( (psfile = fopen ("ps.out", "r")) == (FILE *) NULL) {
-		exit (-1);
+	if ((psfile = fopen("ps.out", "r")) == (FILE *) NULL) {
+		exit(-1);
 	}
 
 	/*
 	 * Read the number of process slots in use from the file
 	 */
-	fscanf (psfile, "%d", &usedslots);
+	fscanf(psfile, "%d", &usedslots);
 
 	/*
 	 * Close the output file
 	 */
-	if  (fclose (psfile) == -1) {
-		exit (-1);
+	if (fclose(psfile) == -1) {
+		exit(-1);
 	}
 
 	/*
 	 * Remove the output file
 	 */
-	if  (system ("/bin/rm ps.out") < 0)
-		sys_error ("system failed", __FILE__, __LINE__);
+	if (system("/bin/rm ps.out") < 0)
+		sys_error("system failed", __FILE__, __LINE__);
 
 	return (usedslots - 1);
 }
@@ -395,11 +404,11 @@
  * by subtracting the process slots currently in use from the maximum	 *
  * possible process slots.						 *
  *-----------------------------------------------------------------------*/
-int available_user_process_slots ()
+int available_user_process_slots()
 {
-	int num = process_slots_in_use ();
+	int num = process_slots_in_use();
 
-	return ( (process_slots < num) ? process_slots : process_slots - num);
+	return ((process_slots < num) ? process_slots : process_slots - num);
 }
 
 /*---------------------------- measure_test() ---------------------------*/
@@ -409,77 +418,78 @@
  * If sched_tc6 is called, then the second time is also read from the	 *
  * results file and returned to the caller.				 *
  *-----------------------------------------------------------------------*/
-float measure_test (name, param1, param2, param3, t2)
-char 	*name,     /* filename of testcase to run */
-	*param1,   /* user flag:  0=user, 1=real time */
-	*param2,   /* priority to run the throughput test at */
-	*param3;   /* if sched_tc6:  fork flag, 0=false, 1=true */
-float *t2;       /* if sched_tc6:  second time returned from testcase */
+float measure_test(name, param1, param2, param3, t2)
+char *name,			/* filename of testcase to run */
+*param1,			/* user flag:  0=user, 1=real time */
+*param2,			/* priority to run the throughput test at */
+*param3;			/* if sched_tc6:  fork flag, 0=false, 1=true */
+float *t2;			/* if sched_tc6:  second time returned from testcase */
 {
-	char	temp[PATH_MAX],	/* holds pathname and returned floating number */
-		t2asc[50];   	/* holds second returned floating number */
-	int	saved_pid;	/* process id of forked process */
-	FILE	*datafile;	/* file pointer for temporary file */
+	char temp[PATH_MAX],	/* holds pathname and returned floating number */
+	 t2asc[50];		/* holds second returned floating number */
+	int saved_pid;		/* process id of forked process */
+	FILE *datafile;		/* file pointer for temporary file */
 
 	/*
 	 * Create the path name to be passed to the start_testcase() function
 	 */
-	sprintf (temp, "./%s", name);
+	sprintf(temp, "./%s", name);
 
 	/*
 	 * Send all the parameters, and start the testcase
 	 */
-	saved_pid = start_testcase (temp, name, param1,
-        	"-lsch.measure", param2, param3);
+	saved_pid = start_testcase(temp, name, param1,
+				   "-lsch.measure", param2, param3);
 
 	/*
 	 * Wait for the testcase to finish
 	 */
-	if (debug) printf ("waiting on child %d\n", saved_pid);
-	while (wait((void *) 0) != saved_pid) ;
+	if (debug)
+		printf("waiting on child %d\n", saved_pid);
+	while (wait((void *)0) != saved_pid) ;
 
 	/*
 	 * Open the temporary file to get the returned number of seconds
 	 */
 
-	if ((datafile = fopen ("sch.measure", "r")) == (FILE *) NULL) {
-		sys_error ("cannot open sch.measure", __FILE__, __LINE__);
+	if ((datafile = fopen("sch.measure", "r")) == (FILE *) NULL) {
+		sys_error("cannot open sch.measure", __FILE__, __LINE__);
 	}
 
 	/*
 	 * Read the number of seconds
 	 */
-	fgets (temp, 50, datafile);
+	fgets(temp, 50, datafile);
 	/*added by mpt
-	printf("sched+driver: measure_test: number of seconds=%s\n",temp)
-         *********** */
+	   printf("sched+driver: measure_test: number of seconds=%s\n",temp)
+	   *********** */
 
 	/*
 	 * If this is sched_tc6, then there is another number we must return
 	 */
 
-	if (strcmp (name, "sched_tc6") == 0) {
-		fgets (t2asc, 50, datafile);
-		*t2 = atof (t2asc);
+	if (strcmp(name, "sched_tc6") == 0) {
+		fgets(t2asc, 50, datafile);
+		*t2 = atof(t2asc);
 	}
 
 	/*
 	 * Close the temporary file
 	 */
-	if  (fclose (datafile) != 0) {
-		exit (-1);
+	if (fclose(datafile) != 0) {
+		exit(-1);
 	}
 
 	/*
 	 * Now try to remove the temporary file
 	 */
 	/*added by MPT
-	printf("measure_test:  REMOVING sch.measure\n");
-	fflush(stdout);
-	if  (system ("rm sch.measure") < 0)
-		sys_error ("system failed", __FILE__, __LINE__);
-	*/
-	return (atof (temp));
+	   printf("measure_test:  REMOVING sch.measure\n");
+	   fflush(stdout);
+	   if  (system ("rm sch.measure") < 0)
+	   sys_error ("system failed", __FILE__, __LINE__);
+	 */
+	return (atof(temp));
 }
 
 /*------------------------- display_line() ------------------------------*/
@@ -489,36 +499,34 @@
  * well as the percent change between the current and previous times.	 *
  * It then updates the previous elapsed time to be the current one.	 *
  *-----------------------------------------------------------------------*/
-void display_line (char *tcname, int pri, int f, float et, float *pet, int ff)
+void display_line(char *tcname, int pri, int f, float et, float *pet, int ff)
 {
-	static  int display_header = 0;
-	float	pc;               /* holds percent change */
+	static int display_header = 0;
+	float pc;		/* holds percent change */
 
 	/*
 	 * Print header every eight lines...
 	 */
 	if (display_header-- == 0) {
-		printf ("\n  Test                Processes              "   \
-			"  Time        Notes\n"                           \
-			"---------   ---------------------------   "      \
-			"---------------  -------\n"                      \
-			"name        long  short  priority  mode   "      \
-			"elapsed  %%%%delta\n\n");
+		printf("\n  Test                Processes              "
+		       "  Time        Notes\n"
+		       "---------   ---------------------------   "
+		       "---------------  -------\n"
+		       "name        long  short  priority  mode   "
+		       "elapsed  %%%%delta\n\n");
 		display_header = 6;
 	}
 
 	/*
 	 * Calculate the percent change in time
 	 */
-	pc = (*pet == 0.0)? 0.0 : 100.0 *  ( (et - *pet) / *pet) + 0.05;
+	pc = (*pet == 0.0) ? 0.0 : 100.0 * ((et - *pet) / *pet) + 0.05;
 
-	printf ("%-12s %2d    %2d      %2d      %4s   %06.4f  %+06.4f  %s\n",
-		tcname, long_running, short_running, pri,
-		(f == 0) ? "user" : "real",
-		et, pc,
-		(ff) ? "forked child" : " ");
+	printf("%-12s %2d    %2d      %2d      %4s   %06.4f  %+06.4f  %s\n",
+	       tcname, long_running, short_running, pri,
+	       (f == 0) ? "user" : "real", et, pc, (ff) ? "forked child" : " ");
 
-	fflush (stdout);
+	fflush(stdout);
 
 	*pet = et;
 }
@@ -528,45 +536,53 @@
  * performed.  This procedure executes each of the throughput tests, and *
  * records the results of each to the .	 			 *
  *-----------------------------------------------------------------------*/
-void perform_throughput_tests (int current_priority)
+void perform_throughput_tests(int current_priority)
 {
-	float   esecs,        /* elapsed seconds returned from each testcase */
-		esecs2,       /* elapsed seconds (second part) for sched_tc6 */
-		pc;           /* percent change for sched_tc6 */
-	char    pristr[10];   /* holds ascii value of priority as parameter */
+	float esecs,		/* elapsed seconds returned from each testcase */
+	 esecs2,		/* elapsed seconds (second part) for sched_tc6 */
+	 pc;			/* percent change for sched_tc6 */
+	char pristr[10];	/* holds ascii value of priority as parameter */
 
-	sprintf (pristr, "-p%d", current_priority);
+	sprintf(pristr, "-p%d", current_priority);
 
 #if defined(_IA64) && !defined(__64BIT__)
-	esecs = measure_test ("sched_tc4.32", "-tvariable", pristr, NULL, &esecs2);
-	display_line ("sched_tc4.32", current_priority, 0, esecs, &e4user, 2);
-	esecs = measure_test ("sched_tc4.32", "-tfixed", pristr, NULL, &esecs2);
-	display_line ("sched_tc4.32", current_priority, 1, esecs, &e4real, 2);
-	esecs = measure_test ("sched_tc5.32", "-tvariable", pristr, NULL, &esecs2);
-	display_line ("sched_tc5.32", current_priority, 0, esecs, &e5user, 2);
-	esecs = measure_test ("sched_tc5.32", "-tfixed", pristr, NULL, &esecs2);
-	display_line ("sched_tc5.32", current_priority, 1, esecs, &e5real, 2);
-	esecs = measure_test ("sched_tc6.32", "-tvariable", pristr, " -d ", &esecs2);
-	display_line ("sched_tc6.32", current_priority, 0, esecs, &e6user0, 0);
-	esecs = measure_test ("sched_tc6.32", "-tfixed", pristr, " -d ", &esecs2);
-	display_line ("sched_tc6.32", current_priority, 1, esecs, &e6real0, 0);
-	esecs = measure_test ("sched_tc6.32", "-tvariable", pristr, " -df ", &esecs2);
-	display_line ("sched_tc6.32", current_priority, 0, esecs, &e6user1, 1);
+	esecs =
+	    measure_test("sched_tc4.32", "-tvariable", pristr, NULL, &esecs2);
+	display_line("sched_tc4.32", current_priority, 0, esecs, &e4user, 2);
+	esecs = measure_test("sched_tc4.32", "-tfixed", pristr, NULL, &esecs2);
+	display_line("sched_tc4.32", current_priority, 1, esecs, &e4real, 2);
+	esecs =
+	    measure_test("sched_tc5.32", "-tvariable", pristr, NULL, &esecs2);
+	display_line("sched_tc5.32", current_priority, 0, esecs, &e5user, 2);
+	esecs = measure_test("sched_tc5.32", "-tfixed", pristr, NULL, &esecs2);
+	display_line("sched_tc5.32", current_priority, 1, esecs, &e5real, 2);
+	esecs =
+	    measure_test("sched_tc6.32", "-tvariable", pristr, " -d ", &esecs2);
+	display_line("sched_tc6.32", current_priority, 0, esecs, &e6user0, 0);
+	esecs =
+	    measure_test("sched_tc6.32", "-tfixed", pristr, " -d ", &esecs2);
+	display_line("sched_tc6.32", current_priority, 1, esecs, &e6real0, 0);
+	esecs =
+	    measure_test("sched_tc6.32", "-tvariable", pristr, " -df ",
+			 &esecs2);
+	display_line("sched_tc6.32", current_priority, 0, esecs, &e6user1, 1);
 #else
-	esecs = measure_test ("sched_tc4", "-tvariable", pristr, NULL, &esecs2);
-	display_line ("sched_tc4", current_priority, 0, esecs, &e4user, 2);
-	esecs = measure_test ("sched_tc4", "-tfixed", pristr, NULL, &esecs2);
-	display_line ("sched_tc4", current_priority, 1, esecs, &e4real, 2);
-	esecs = measure_test ("sched_tc5", "-tvariable", pristr, NULL, &esecs2);
-	display_line ("sched_tc5", current_priority, 0, esecs, &e5user, 2);
-	esecs = measure_test ("sched_tc5", "-tfixed", pristr, NULL, &esecs2);
-	display_line ("sched_tc5", current_priority, 1, esecs, &e5real, 2);
-	esecs = measure_test ("sched_tc6", "-tvariable", pristr, " -d ", &esecs2);
-	display_line ("sched_tc6", current_priority, 0, esecs, &e6user0, 0);
-	esecs = measure_test ("sched_tc6", "-tfixed", pristr, " -d ", &esecs2);
-	display_line ("sched_tc6", current_priority, 1, esecs, &e6real0, 0);
-	esecs = measure_test ("sched_tc6", "-tvariable", pristr, " -df ", &esecs2);
-	display_line ("sched_tc6", current_priority, 0, esecs, &e6user1, 1);
+	esecs = measure_test("sched_tc4", "-tvariable", pristr, NULL, &esecs2);
+	display_line("sched_tc4", current_priority, 0, esecs, &e4user, 2);
+	esecs = measure_test("sched_tc4", "-tfixed", pristr, NULL, &esecs2);
+	display_line("sched_tc4", current_priority, 1, esecs, &e4real, 2);
+	esecs = measure_test("sched_tc5", "-tvariable", pristr, NULL, &esecs2);
+	display_line("sched_tc5", current_priority, 0, esecs, &e5user, 2);
+	esecs = measure_test("sched_tc5", "-tfixed", pristr, NULL, &esecs2);
+	display_line("sched_tc5", current_priority, 1, esecs, &e5real, 2);
+	esecs =
+	    measure_test("sched_tc6", "-tvariable", pristr, " -d ", &esecs2);
+	display_line("sched_tc6", current_priority, 0, esecs, &e6user0, 0);
+	esecs = measure_test("sched_tc6", "-tfixed", pristr, " -d ", &esecs2);
+	display_line("sched_tc6", current_priority, 1, esecs, &e6real0, 0);
+	esecs =
+	    measure_test("sched_tc6", "-tvariable", pristr, " -df ", &esecs2);
+	display_line("sched_tc6", current_priority, 0, esecs, &e6user1, 1);
 #endif
 
 	/*
@@ -576,9 +592,10 @@
 	/*
 	 * Calculate the percent change in time
 	 */
-	pc = (e6child == 0.0) ? 0.0 : 100 * ((esecs2 - e6child)/e6child) + 0.05;
-	printf ("%-12s forked child          %4s   %06.4f  %+06.4f\n",
-		"sched_tc6", "real", esecs2, pc);
+	pc = (e6child ==
+	      0.0) ? 0.0 : 100 * ((esecs2 - e6child) / e6child) + 0.05;
+	printf("%-12s forked child          %4s   %06.4f  %+06.4f\n",
+	       "sched_tc6", "real", esecs2, pc);
 	e6child = esecs2;
 }
 
@@ -586,30 +603,39 @@
 /* This procedure takes the number of long-term process slots available, *
  * and executes the long term testcases.				 *
  *-----------------------------------------------------------------------*/
-void start_long_term_testcases (long_term_slot_total, execution_time)
-int long_term_slot_total;    /* total number of long-term slots */
-char *execution_time;              /* runtime hours to pass to each testcase */
+void start_long_term_testcases(long_term_slot_total, execution_time)
+int long_term_slot_total;	/* total number of long-term slots */
+char *execution_time;		/* runtime hours to pass to each testcase */
 {
-	int   i;
+	int i;
 
 	/*
 	 * Now use up the long_term_slot_total by starting testcases call
 	 * half with real-time flag '1' set, other half user flag '0'
 	 */
 	if (debug)
-		printf ("long-term slots available:  %d\n", long_term_slot_total);
+		printf("long-term slots available:  %d\n",
+		       long_term_slot_total);
 
-	for  (i = 0; i <  (long_term_slot_total/4); i++) {
+	for (i = 0; i < (long_term_slot_total / 4); i++) {
 #if defined(_IA64) && !defined(__64BIT__)
-		start_testcase ("./sched_tc0.32", "sched_tc0 -t", execution_time, " -p1", NULL, NULL);
-		start_testcase ("./sched_tc2.32", "sched_tc2", execution_time, "1", NULL, NULL);
-		start_testcase ("./sched_tc0.32", "sched_tc0 -t", execution_time, " -p0", NULL, NULL);
-		start_testcase ("./sched_tc2.32", "sched_tc2", execution_time, "0", NULL, NULL);
+		start_testcase("./sched_tc0.32", "sched_tc0 -t", execution_time,
+			       " -p1", NULL, NULL);
+		start_testcase("./sched_tc2.32", "sched_tc2", execution_time,
+			       "1", NULL, NULL);
+		start_testcase("./sched_tc0.32", "sched_tc0 -t", execution_time,
+			       " -p0", NULL, NULL);
+		start_testcase("./sched_tc2.32", "sched_tc2", execution_time,
+			       "0", NULL, NULL);
 #else
-		start_testcase ("./sched_tc0", "sched_tc0 -t", execution_time, " -p1", NULL, NULL);
-		start_testcase ("./sched_tc2", "sched_tc2", execution_time, "1", NULL, NULL);
-		start_testcase ("./sched_tc0", "sched_tc0 -t", execution_time, " -p0", NULL, NULL);
-		start_testcase ("./sched_tc2", "sched_tc2", execution_time, "0", NULL, NULL);
+		start_testcase("./sched_tc0", "sched_tc0 -t", execution_time,
+			       " -p1", NULL, NULL);
+		start_testcase("./sched_tc2", "sched_tc2", execution_time, "1",
+			       NULL, NULL);
+		start_testcase("./sched_tc0", "sched_tc0 -t", execution_time,
+			       " -p0", NULL, NULL);
+		start_testcase("./sched_tc2", "sched_tc2", execution_time, "0",
+			       NULL, NULL);
 #endif
 	}
 }
@@ -621,38 +647,49 @@
 | Function:  Starts short term testcases (one for each process slot)   |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void start_short_term_testcases (int short_term_slot_total, double stress_percent, int pri)
+void start_short_term_testcases(int short_term_slot_total,
+				double stress_percent, int pri)
 {
-	int	i;
-	int	short_term_slots;   /* number of slots to use */
+	int i;
+	int short_term_slots;	/* number of slots to use */
 
 	/*
 	 * Set up the short_term_slot_total by starting testcases call
 	 * half with real-time flag '1' set, other half user flag '0'
 	 */
-	if  (available_user_process_slots() < short_term_slot_total)
-		short_term_slots = available_user_process_slots() * stress_percent / 2;
+	if (available_user_process_slots() < short_term_slot_total)
+		short_term_slots =
+		    available_user_process_slots() * stress_percent / 2;
 	else
 		short_term_slots = short_term_slot_total;
 
-	printf ("\n<< Starting %d short-term testcases>> \n\n", short_term_slots);
+	printf("\n<< Starting %d short-term testcases>> \n\n",
+	       short_term_slots);
 	if (debug)
-		printf ("short-term slots available:  %d\n", short_term_slots);
+		printf("short-term slots available:  %d\n", short_term_slots);
 
-	for  (i = 0; i <  (short_term_slots/4); i++) {
+	for (i = 0; i < (short_term_slots / 4); i++) {
 #if defined(_IA64) && !defined(__64BIT__)
-		start_testcase ("./sched_tc1.32", "sched_tc1", "1", NULL, NULL, NULL);
-		start_testcase ("./sched_tc3.32", "sched_tc3", "1", NULL, NULL, NULL);
-		start_testcase ("./sched_tc1.32", "sched_tc1", "0", NULL, NULL, NULL);
-		start_testcase ("./sched_tc3.32", "sched_tc3", "0", NULL, NULL, NULL);
+		start_testcase("./sched_tc1.32", "sched_tc1", "1", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc3.32", "sched_tc3", "1", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc1.32", "sched_tc1", "0", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc3.32", "sched_tc3", "0", NULL, NULL,
+			       NULL);
 #else
-		start_testcase ("./sched_tc1", "sched_tc1", "1", NULL, NULL, NULL);
-		start_testcase ("./sched_tc3", "sched_tc3", "1", NULL, NULL, NULL);
-		start_testcase ("./sched_tc1", "sched_tc1", "0", NULL, NULL, NULL);
-		start_testcase ("./sched_tc3", "sched_tc3", "0", NULL, NULL, NULL);
+		start_testcase("./sched_tc1", "sched_tc1", "1", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc3", "sched_tc3", "1", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc1", "sched_tc1", "0", NULL, NULL,
+			       NULL);
+		start_testcase("./sched_tc3", "sched_tc3", "0", NULL, NULL,
+			       NULL);
 #endif
 #if 0
-		perform_throughput_tests (pri);
+		perform_throughput_tests(pri);
 #endif
 	}
 }
@@ -664,18 +701,19 @@
  *-----------------------------------------------------------------------*/
 void kill_short_term_testcases()
 {
-	int   i;   /* loop counter to step through the list of process id's */
+	int i;			/* loop counter to step through the list of process id's */
 
-        /*
+	/*
 	 * Loop through the array of process id's one at a time, and
 	 * attempt to kill each one.  If kill fails, report error and
 	 * continue.
 	 */
 	if (debug)
-		printf ("killing short-term processes...\n");
-	for  (i = 0; i < numprocs; i++) {
-		if (debug) printf ("killing process [%d]\n", procs [i]);
-		kill (procs[i], SIGUSR1);
+		printf("killing short-term processes...\n");
+	for (i = 0; i < numprocs; i++) {
+		if (debug)
+			printf("killing process [%d]\n", procs[i]);
+		kill(procs[i], SIGUSR1);
 	}
 
 	/*
@@ -693,20 +731,20 @@
 /* This procedure closing information to the about ending	 *
  * times, elapsed times, etc.  This procedure then closes the file*
  *-----------------------------------------------------------------------*/
-void finishup (start_time)
-long start_time;   /* starting time to calculate elapsed time */
+void finishup(start_time)
+long start_time;		/* starting time to calculate elapsed time */
 {
-	long   end_time;       /* time when program finished */
+	long end_time;		/* time when program finished */
 
 	/*
 	 * Get the end time and calculate elapsed time; write all this out
 	 */
-	end_time = time ((long *) 0);
+	end_time = time((long *)0);
 
-	printf ("\nend time = %s\n", ctime (&end_time));
+	printf("\nend time = %s\n", ctime(&end_time));
 
-	printf ("elapsed time = %4.2f hours\n",
-		( (end_time - start_time) / 3600.0));
+	printf("elapsed time = %4.2f hours\n",
+	       ((end_time - start_time) / 3600.0));
 }
 
 /*---------------------------------------------------------------------+
@@ -721,32 +759,30 @@
 |            [-s] size: shared memory segment size                     |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	sflg = 0, pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int sflg = 0, pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-	while ((opt = getopt(argc, argv, "vs:p:t:l:d")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "vs:p:t:l:d")) != EOF) {
+		switch (opt) {
 		case 's':	/* stress percentage */
 			sflg++;
-			stress_percent = atof (optarg);
+			stress_percent = atof(optarg);
 			break;
 		case 'p':	/* process slots */
 			pflg++;
-			process_slots = atof (optarg);
+			process_slots = atof(optarg);
 			break;
 		case 't':	/* time (hours) */
 			tflg++;
-			execution_time = atof (optarg);
+			execution_time = atof(optarg);
 			break;
 		case 'd':	/* Enable debugging messages */
 			debug++;
@@ -762,7 +798,7 @@
 
 	/*
 	 * Check percentage, execution time and process slots...
- 	 */
+	 */
 	if (sflg) {
 		if (stress_percent < 0.0 || stress_percent > 1.0)
 			errflag++;
@@ -776,9 +812,9 @@
 			errflag++;
 	}
 	if (debug)
-		printf ("\n(debugging messages enabled)\n\n");
+		printf("\n(debugging messages enabled)\n\n");
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc0.c b/testcases/kernel/sched/sched_stress/sched_tc0.c
index dfaad50..735c229 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc0.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc0.c
@@ -72,8 +72,8 @@
  *
  * parse_args: parse command line arguments
  */
-void process_file (char *);
-void parse_args (int, char **);
+void process_file(char *);
+void parse_args(int, char **);
 
 /*
  * Global variables:
@@ -86,10 +86,10 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose = 0;
-int	debug = 0;
-long    execution_time = DEFAULT_EXECUTION_TIME;
-char 	*priority      = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+long execution_time = DEFAULT_EXECUTION_TIME;
+char *priority = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -98,38 +98,39 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	char	*filename=NULL;
-	long	start_time;      /* time at start of testcase */
-	int	i;
+	char *filename = NULL;
+	long start_time;	/* time at start of testcase */
+	int i;
 
-        if ((filename=getenv("KERNEL"))==NULL)
-        {
-            errno = ENODATA;
-            sys_error("environment variable KERNEL not set", __FILE__,__LINE__);
-        }
+	if ((filename = getenv("KERNEL")) == NULL) {
+		errno = ENODATA;
+		sys_error("environment variable KERNEL not set", __FILE__,
+			  __LINE__);
+	}
 	/*
 	 * Process command line arguments...
 	 */
 
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority:       %s\n", priority);
-		printf ("\texecution_time: %ld (sec)\n", execution_time);
+		printf("\tpriority:       %s\n", priority);
+		printf("\texecution_time: %ld (sec)\n", execution_time);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority, "fixed")) {
+	if (!strcmp(priority, "fixed")) {
 #ifndef __linux__
-		if (setpri (0, DEFAULT_PRIORITY) < 0)
-			sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
 		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-			sys_error ("setpri failed", __FILE__, __LINE__);
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	}
 
@@ -137,24 +138,27 @@
 	 * Continuously read through file as time permits...
 	 */
 	i = 0;
-	start_time = time ((long *) 0);
+	start_time = time((long *)0);
 
-	if (debug) printf ("\n");
-	while  ( (time ((long *)0) - start_time) < execution_time) {
+	if (debug)
+		printf("\n");
+	while ((time((long *)0) - start_time) < execution_time) {
 		if (debug) {
-			printf ("\r\tprocessing file [%d], time left: %ld",
-				i++,
-				execution_time - (time ((long *)0)-start_time));
-			fflush (stdout);
+			printf("\r\tprocessing file [%d], time left: %ld",
+			       i++,
+			       execution_time - (time((long *)0) - start_time));
+			fflush(stdout);
 		}
-		process_file (filename);
+		process_file(filename);
 	}
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -166,29 +170,30 @@
 |            end-of-file and then closes the file..                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void process_file (char *filename)
+void process_file(char *filename)
 {
-	char   record[100];   /* holds each record of the file read */
-	FILE   *datafile;     /* file pointer to the open file */
+	char record[100];	/* holds each record of the file read */
+	FILE *datafile;		/* file pointer to the open file */
 
 	/*
 	 * Try and open the datafile
 	 */
-	if ((datafile = fopen (filename, "r")) == NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((datafile = fopen(filename, "r")) == NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
 	/*
 	 * Read the first record of the datafile, then read until end-of-file
 	 */
-	while (fgets (record, 80, datafile)) {
-		if (feof (datafile)) break;
+	while (fgets(record, 80, datafile)) {
+		if (feof(datafile))
+			break;
 	}
 
 	/*
 	 * Close the datafile
 	 */
-	if (fclose (datafile))
-		sys_error ("fclose failed", __FILE__, __LINE__);
+	if (fclose(datafile))
+		sys_error("fclose failed", __FILE__, __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -206,33 +211,31 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	if (argc < 2) {
-		fprintf (stderr, USAGE, program_name);
-                exit (0);
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
 	}
 
 	/*
 	 * Parse command line options.
 	 */
-	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF) {
+		switch (opt) {
 		case 'p':	/* process type */
 			pflg++;
 			priority = optarg;
 			break;
 		case 't':	/* time (hours) */
 			tflg++;
-			execution_time = atof (optarg);
+			execution_time = atof(optarg);
 			break;
 		case 'v':	/* verbose */
 			verbose++;
@@ -249,9 +252,9 @@
 
 	/*
 	 * Check percentage, execution time and process slots...
- 	 */
+	 */
 	if (pflg) {
-		if (strcmp (priority, "fixed") && strcmp (priority, "variable"))
+		if (strcmp(priority, "fixed") && strcmp(priority, "variable"))
 			errflag++;
 	}
 	if (tflg) {
@@ -259,7 +262,7 @@
 			errflag++;
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc1.c b/testcases/kernel/sched/sched_stress/sched_tc1.c
index 2c8db8a..c7c81d6 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc1.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc1.c
@@ -69,9 +69,9 @@
  *
  * parse_args: parse command line arguments
  */
-void process_file (char *);
-void parse_args (int, char **);
-void signal_handler ();
+void process_file(char *);
+void parse_args(int, char **);
+void signal_handler();
 
 /*
  * Global variables:
@@ -84,10 +84,10 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose   = 0;
-int	debug     = 0;
-int	signaled  = 0;
-char 	*priority = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+int signaled = 0;
+char *priority = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -96,41 +96,42 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	char	*filename = NULL;
+	char *filename = NULL;
 
-	if ((filename=getenv("KERNEL"))==NULL)
-	{
-	   errno = ENODATA;
-	   sys_error("environment variable KERNEL not set", __FILE__,__LINE__);
+	if ((filename = getenv("KERNEL")) == NULL) {
+		errno = ENODATA;
+		sys_error("environment variable KERNEL not set", __FILE__,
+			  __LINE__);
 	}
 	/*
 	 * Setup signal handler & setup alarm so we do not loop forever...
 	 */
-	signal (SIGUSR1, signal_handler);
-	signal (SIGALRM, signal_handler);
-	alarm  (600);	/* wait 10 minutes before aborting */
+	signal(SIGUSR1, signal_handler);
+	signal(SIGALRM, signal_handler);
+	alarm(600);		/* wait 10 minutes before aborting */
 
 	/*
 	 * Process command line arguments...
 	 */
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority:       %s\n", priority);
+		printf("\tpriority:       %s\n", priority);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority, "fixed")) {
+	if (!strcmp(priority, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	}
 
@@ -138,12 +139,13 @@
 	 * Continuously read through file until interrupted...
 	 */
 	while (!signaled)
-		process_file (filename);
+		process_file(filename);
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -155,29 +157,30 @@
 |            end-of-file and then closes the file..                    |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void process_file (char *filename)
+void process_file(char *filename)
 {
-	char   record[100];   /* holds each record of the file read */
-	FILE   *datafile;     /* file pointer to the open file */
+	char record[100];	/* holds each record of the file read */
+	FILE *datafile;		/* file pointer to the open file */
 
 	/*
 	 * Try and open the datafile
 	 */
-	if ((datafile = fopen (filename, "r")) == NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((datafile = fopen(filename, "r")) == NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
 	/*
 	 * Read the first record of the datafile, then read until end-of-file
 	 */
-	while (fgets (record, 80, datafile)) {
-		if (feof (datafile)) break;
+	while (fgets(record, 80, datafile)) {
+		if (feof(datafile))
+			break;
 	}
 
 	/*
 	 * Close the datafile
 	 */
-	if (fclose (datafile))
-		sys_error ("fclose failed", __FILE__, __LINE__);
+	if (fclose(datafile))
+		sys_error("fclose failed", __FILE__, __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -187,17 +190,18 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void signal_handler (int signal)
+void signal_handler(int signal)
 {
 	printf("signal recieved is %d\n", signal);
 	if (signal == SIGUSR1) {
 		signaled++;
-		if (debug) printf ("\n\t<< caught SIGUSR1 interrupt>>\n");
+		if (debug)
+			printf("\n\t<< caught SIGUSR1 interrupt>>\n");
 	} else if (signal == SIGALRM) {
-		error ("Failed to receive SIGUSR1 signal before timeout!",
-			__FILE__, __LINE__);
+		error("Failed to receive SIGUSR1 signal before timeout!",
+		      __FILE__, __LINE__);
 	} else
-		error ("received unexpected signal", __FILE__, __LINE__);
+		error("received unexpected signal", __FILE__, __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -215,26 +219,24 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	pflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int pflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, program_name);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
+	}
 
-	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF) {
+		switch (opt) {
 		case 'p':	/* process type */
 			pflg++;
 			priority = optarg;
@@ -254,13 +256,13 @@
 
 	/*
 	 * Check percentage, execution time and process slots...
- 	 */
+	 */
 	if (pflg) {
-		if (strcmp (priority, "fixed") && strcmp (priority, "variable"))
+		if (strcmp(priority, "fixed") && strcmp(priority, "variable"))
 			errflag++;
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc2.c b/testcases/kernel/sched/sched_stress/sched_tc2.c
index afefe91..7aade76 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc2.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc2.c
@@ -76,8 +76,8 @@
  *
  * parse_args: parse command line arguments
  */
-void parse_args (int, char **);
-void multiply_matrices ();
+void parse_args(int, char **);
+void multiply_matrices();
 
 /*
  * Global variables:
@@ -90,10 +90,10 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose = 0;
-int	debug = 0;
-long    execution_time = DEFAULT_EXECUTION_TIME;
-char 	*priority      = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+long execution_time = DEFAULT_EXECUTION_TIME;
+char *priority = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -102,36 +102,37 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	long	start_time;      /* time at start of testcase */
-	int	i;
+	long start_time;	/* time at start of testcase */
+	int i;
 
 	/*
 	 * Process command line arguments...
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, *argv);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, *argv);
+		exit(0);
+	}
 
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority:       %s\n", priority);
-		printf ("\texecution_time: %ld (sec)\n", execution_time);
+		printf("\tpriority:       %s\n", priority);
+		printf("\texecution_time: %ld (sec)\n", execution_time);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority, "fixed")) {
+	if (!strcmp(priority, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	}
 
@@ -139,24 +140,27 @@
 	 * Continuously multiply matrix as time permits...
 	 */
 	i = 0;
-	start_time = time ((long *) 0);
+	start_time = time((long *)0);
 
-	if (debug) printf ("\n");
-	while  ( (time ((long *)0) - start_time) < execution_time) {
+	if (debug)
+		printf("\n");
+	while ((time((long *)0) - start_time) < execution_time) {
 		if (debug) {
-			printf ("\r\tmultiplying matrix [%d], time left: %ld",
-				i++,
-				execution_time - (time ((long *)0)-start_time));
-			fflush (stdout);
+			printf("\r\tmultiplying matrix [%d], time left: %ld",
+			       i++,
+			       execution_time - (time((long *)0) - start_time));
+			fflush(stdout);
 		}
-		multiply_matrices ();
+		multiply_matrices();
 	}
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -168,31 +172,31 @@
 |            them together.                                            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void multiply_matrices ()
+void multiply_matrices()
 {
-	int     i, j, k; /* various indeces to access the arrays */
-	float   matrix_1 [MATRIX_SIZE] [MATRIX_SIZE];
-	float   matrix_2 [MATRIX_SIZE] [MATRIX_SIZE];
-	float   matrix_3 [MATRIX_SIZE] [MATRIX_SIZE];
+	int i, j, k;		/* various indeces to access the arrays */
+	float matrix_1[MATRIX_SIZE][MATRIX_SIZE];
+	float matrix_2[MATRIX_SIZE][MATRIX_SIZE];
+	float matrix_3[MATRIX_SIZE][MATRIX_SIZE];
 
 	/* first, fill the two matrices to be multiplied with random values */
 
-	for (i=0; i < MATRIX_SIZE; i++) {
-		for (j=0; j < MATRIX_SIZE; j++) {
-			matrix_1 [i][j] = (float) (rand() % 100);
-			matrix_2 [i][j] = (float) (rand() % 100);
+	for (i = 0; i < MATRIX_SIZE; i++) {
+		for (j = 0; j < MATRIX_SIZE; j++) {
+			matrix_1[i][j] = (float)(rand() % 100);
+			matrix_2[i][j] = (float)(rand() % 100);
 		}
 	}
 
 	/*
 	 * Now multiply the two matrices
 	 */
-	for (i=0; i < MATRIX_SIZE; i++) {
-		for (j=0; j < MATRIX_SIZE; j++) {
-			matrix_3 [i][j] = 0.0;	/* clear the element first */
-			for (k=0; k < MATRIX_SIZE; k++)
-				matrix_3 [i][j] +=
-					matrix_1 [i][k] * matrix_2 [k][j];
+	for (i = 0; i < MATRIX_SIZE; i++) {
+		for (j = 0; j < MATRIX_SIZE; j++) {
+			matrix_3[i][j] = 0.0;	/* clear the element first */
+			for (k = 0; k < MATRIX_SIZE; k++)
+				matrix_3[i][j] +=
+				    matrix_1[i][k] * matrix_2[k][j];
 		}
 	}
 }
@@ -212,33 +216,31 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, program_name);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
+	}
 
-	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "p:t:vd")) != EOF) {
+		switch (opt) {
 		case 'p':	/* process type */
 			pflg++;
 			priority = optarg;
 			break;
 		case 't':	/* time (hours) */
 			tflg++;
-			execution_time = atof (optarg);
+			execution_time = atof(optarg);
 			break;
 		case 'v':	/* verbose */
 			verbose++;
@@ -255,9 +257,9 @@
 
 	/*
 	 * Check percentage, execution time and process slots...
- 	 */
+	 */
 	if (pflg) {
-		if (strcmp (priority, "fixed") && strcmp (priority, "variable"))
+		if (strcmp(priority, "fixed") && strcmp(priority, "variable"))
 			errflag++;
 	}
 	if (tflg) {
@@ -265,7 +267,7 @@
 			errflag++;
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc3.c b/testcases/kernel/sched/sched_stress/sched_tc3.c
index 51c90ab..7d2372c 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc3.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc3.c
@@ -76,9 +76,9 @@
  *
  * parse_args: parse command line arguments
  */
-void parse_args (int, char **);
-void multiply_matrices ();
-void signal_handler ();
+void parse_args(int, char **);
+void multiply_matrices();
+void signal_handler();
 
 /*
  * Global variables:
@@ -91,10 +91,10 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose   = 0;
-int	debug     = 0;
-int	signaled  = 0;
-char 	*priority = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+int signaled = 0;
+char *priority = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -103,37 +103,38 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	long	start_time;      /* time at start of testcase */
-	int	i;
+	long start_time;	/* time at start of testcase */
+	int i;
 
 	/*
 	 * Setup signal handler & setup alarm so we do not loop forever...
 	 */
-	signal (SIGUSR1, signal_handler);
-	signal (SIGALRM, signal_handler);
-	alarm  (600);	/* wait 10 minutes before aborting */
+	signal(SIGUSR1, signal_handler);
+	signal(SIGALRM, signal_handler);
+	alarm(600);		/* wait 10 minutes before aborting */
 
 	/*
 	 * Process command line arguments...
 	 */
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority:       %s\n", priority);
+		printf("\tpriority:       %s\n", priority);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority, "fixed")) {
+	if (!strcmp(priority, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	}
 
@@ -141,25 +142,28 @@
 	 * Continuously multiply matrix as time permits...
 	 */
 	i = 0;
-	start_time = time ((long *) 0);
+	start_time = time((long *)0);
 
 	/*
 	 * Continuously read through file until interrupted...
 	 */
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 	while (!signaled) {
 		if (debug) {
-			printf ("\r\tmultiplying matrix [%d]", i++);
-			fflush (stdout);
+			printf("\r\tmultiplying matrix [%d]", i++);
+			fflush(stdout);
 		}
-		multiply_matrices ();
+		multiply_matrices();
 	}
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -171,31 +175,31 @@
 |            them together.                                            |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void multiply_matrices ()
+void multiply_matrices()
 {
-	int     i, j, k; /* various indeces to access the arrays */
-	float   matrix_1 [MATRIX_SIZE] [MATRIX_SIZE];
-	float   matrix_2 [MATRIX_SIZE] [MATRIX_SIZE];
-	float   matrix_3 [MATRIX_SIZE] [MATRIX_SIZE];
+	int i, j, k;		/* various indeces to access the arrays */
+	float matrix_1[MATRIX_SIZE][MATRIX_SIZE];
+	float matrix_2[MATRIX_SIZE][MATRIX_SIZE];
+	float matrix_3[MATRIX_SIZE][MATRIX_SIZE];
 
 	/* first, fill the two matrices to be multiplied with random values */
 
-	for (i=0; i < MATRIX_SIZE; i++) {
-		for (j=0; j < MATRIX_SIZE; j++) {
-			matrix_1 [i][j] = (float) (rand() % 100);
-			matrix_2 [i][j] = (float) (rand() % 100);
+	for (i = 0; i < MATRIX_SIZE; i++) {
+		for (j = 0; j < MATRIX_SIZE; j++) {
+			matrix_1[i][j] = (float)(rand() % 100);
+			matrix_2[i][j] = (float)(rand() % 100);
 		}
 	}
 
 	/*
 	 * Now multiply the two matrices
 	 */
-	for (i=0; i < MATRIX_SIZE; i++) {
-		for (j=0; j < MATRIX_SIZE; j++) {
-			matrix_3 [i][j] = 0.0;	/* clear the element first */
-			for (k=0; k < MATRIX_SIZE; k++)
-				matrix_3 [i][j] +=
-					matrix_1 [i][k] * matrix_2 [k][j];
+	for (i = 0; i < MATRIX_SIZE; i++) {
+		for (j = 0; j < MATRIX_SIZE; j++) {
+			matrix_3[i][j] = 0.0;	/* clear the element first */
+			for (k = 0; k < MATRIX_SIZE; k++)
+				matrix_3[i][j] +=
+				    matrix_1[i][k] * matrix_2[k][j];
 		}
 	}
 }
@@ -207,16 +211,17 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void signal_handler (int signal)
+void signal_handler(int signal)
 {
 	if (signal == SIGUSR1) {
 		signaled++;
-		if (debug) printf ("\n\t<< caught SIGUSR1 interrupt>>\n");
+		if (debug)
+			printf("\n\t<< caught SIGUSR1 interrupt>>\n");
 	} else if (signal == SIGALRM) {
-		error ("Failed to receive SIGUSR1 signal before timeout!",
-			__FILE__, __LINE__);
+		error("Failed to receive SIGUSR1 signal before timeout!",
+		      __FILE__, __LINE__);
 	} else
-		error ("received unexpected signal", __FILE__, __LINE__);
+		error("received unexpected signal", __FILE__, __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -234,26 +239,24 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	pflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int pflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, program_name);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
+	}
 
-	while ((opt = getopt(argc, argv, "p:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "p:vd")) != EOF) {
+		switch (opt) {
 		case 'p':	/* process type */
 			pflg++;
 			priority = optarg;
@@ -273,13 +276,13 @@
 
 	/*
 	 * Check percentage, execution time and process slots...
- 	 */
+	 */
 	if (pflg) {
-		if (strcmp (priority, "fixed") && strcmp (priority, "variable"))
+		if (strcmp(priority, "fixed") && strcmp(priority, "variable"))
 			errflag++;
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc4.c b/testcases/kernel/sched/sched_stress/sched_tc4.c
index eb432e3..5bffb64 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc4.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc4.c
@@ -82,8 +82,8 @@
  *
  * parse_args: parse command line arguments
  */
-void parse_args (int, char **);
-void read_raw_device ();
+void parse_args(int, char **);
+void read_raw_device();
 
 /*
  * Global variables:
@@ -94,11 +94,11 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose   = 0;
-int	debug     = 0;
-int 	priority  = DEFAULT_PRIORITY;
-char	*logfile  = DEFAULT_LOGFILE;
-char 	*priority_type = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+int priority = DEFAULT_PRIORITY;
+char *logfile = DEFAULT_LOGFILE;
+char *priority_type = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -107,64 +107,67 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	FILE	*statfile;
-	clock_t	start_time;		/* start & stop times */
-	clock_t	stop_time;
-	float	elapsed_time;
-	struct tms timer_info;		/* time accounting info */
+	FILE *statfile;
+	clock_t start_time;	/* start & stop times */
+	clock_t stop_time;
+	float elapsed_time;
+	struct tms timer_info;	/* time accounting info */
 
 	/*
 	 * Process command line arguments...
 	 */
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority type:  %s\n", priority_type);
-		printf ("\tpriority:       %d\n", priority);
-		printf ("\tlogfile:        %s\n", logfile);
+		printf("\tpriority type:  %s\n", priority_type);
+		printf("\tpriority:       %d\n", priority);
+		printf("\tlogfile:        %s\n", logfile);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority_type, "fixed")) {
+	if (!strcmp(priority_type, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	} else {
-		if (nice ((priority - 50) - (nice(0) + 20)) < 0 && errno != 0)
-			sys_error ("nice failed", __FILE__, __LINE__);
+		if (nice((priority - 50) - (nice(0) + 20)) < 0 && errno != 0)
+			sys_error("nice failed", __FILE__, __LINE__);
 	}
 
 	/*
 	 * Read from raw I/O device and record elapsed time...
 	 */
-	start_time = time ((time_t *)&timer_info);
+	start_time = time((time_t *) & timer_info);
 
-	read_raw_device ();
+	read_raw_device();
 
-	stop_time = time ((time_t *)&timer_info);
-	elapsed_time = (float) (stop_time - start_time) / 100.0;
+	stop_time = time((time_t *) & timer_info);
+	elapsed_time = (float)(stop_time - start_time) / 100.0;
 
-	if ((statfile = fopen (logfile, "w")) == NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((statfile = fopen(logfile, "w")) == NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
-	fprintf (statfile, "%f\n", elapsed_time);
-	if (debug) printf ("\n\telapsed time: %f\n", elapsed_time);
+	fprintf(statfile, "%f\n", elapsed_time);
+	if (debug)
+		printf("\n\telapsed time: %f\n", elapsed_time);
 
-	if (fclose (statfile) < 0)
-		sys_error ("fclose failed", __FILE__, __LINE__);
+	if (fclose(statfile) < 0)
+		sys_error("fclose failed", __FILE__, __LINE__);
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -180,45 +183,45 @@
 +---------------------------------------------------------------------*/
 void read_raw_device()
 {
-	char	readbuf[BLOCK_SIZE + 1];   /* buffer to store bytes read */
-	int	fd;                        /* file descriptor */
-	int	i;                         /* loop counter */
-	int	blocks=0;                    /* number of blocks read */
+	char readbuf[BLOCK_SIZE + 1];	/* buffer to store bytes read */
+	int fd;			/* file descriptor */
+	int i;			/* loop counter */
+	int blocks = 0;		/* number of blocks read */
 #ifndef __linux__
-	char   raw_dev[50] = "/dev/hd2";  /* name of raw device file */
+	char raw_dev[50] = "/dev/hd2";	/* name of raw device file */
 #else
-	char   *raw_dev;		/* name of raw device file  */
+	char *raw_dev;		/* name of raw device file  */
 
-	if ((raw_dev = getenv("RAWDEV")) == NULL)
-        {
-	    errno = ENODATA;
-	    sys_error("environment variable RAWDEV not set", __FILE__,__LINE__);
+	if ((raw_dev = getenv("RAWDEV")) == NULL) {
+		errno = ENODATA;
+		sys_error("environment variable RAWDEV not set", __FILE__,
+			  __LINE__);
 	}
 #endif
 
 	/*
 	 * Open the raw disk file
 	 */
-	if ((fd = open (raw_dev, 0)) < 0)
-		sys_error ("open failed", __FILE__, __LINE__);
+	if ((fd = open(raw_dev, 0)) < 0)
+		sys_error("open failed", __FILE__, __LINE__);
 
 	/*
 	 * Read through predefined number of blocks TIMES number of times.
 	 * (Seek back to beginning of raw device after reading 10MB)
 	 */
-	for (i=0; i < TIMES; i++) {
-		if (read (fd, readbuf, BLOCK_SIZE) != BLOCK_SIZE)
-			sys_error ("read failed", __FILE__, __LINE__);
+	for (i = 0; i < TIMES; i++) {
+		if (read(fd, readbuf, BLOCK_SIZE) != BLOCK_SIZE)
+			sys_error("read failed", __FILE__, __LINE__);
 		if (blocks == 10000)
-			if (lseek (fd, 0, 0) < 0)
-				sys_error ("lseek failed", __FILE__, __LINE__);
+			if (lseek(fd, 0, 0) < 0)
+				sys_error("lseek failed", __FILE__, __LINE__);
 	}
 
 	/*
 	 * Close the raw disk file
 	 */
-	if (close (fd) < 0)
-		sys_error ("close failed", __FILE__, __LINE__);
+	if (close(fd) < 0)
+		sys_error("close failed", __FILE__, __LINE__);
 }
 
 /*---------------------------------------------------------------------+
@@ -237,26 +240,24 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	lflg = 0, pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int lflg = 0, pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, program_name);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
+	}
 
-	while ((opt = getopt(argc, argv, "l:t:p:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "l:t:p:vd")) != EOF) {
+		switch (opt) {
 		case 'l':	/* log file */
 			lflg++;
 			logfile = optarg;
@@ -267,7 +268,7 @@
 			break;
 		case 'p':	/* process priority */
 			pflg++;
-			priority = atoi (optarg);
+			priority = atoi(optarg);
 			break;
 		case 'v':	/* verbose */
 			verbose++;
@@ -284,23 +285,23 @@
 
 	/*
 	 * Check percentage and process slots...
- 	 */
+	 */
 	if (tflg) {
-		if (strcmp (priority_type, "fixed") &&
-		    strcmp (priority_type, "variable")) {
+		if (strcmp(priority_type, "fixed") &&
+		    strcmp(priority_type, "variable")) {
 			errflag++;
-			fprintf (stderr, "Error: priority type must be: " \
-					 "\'fixed\' or \'variable\'\n");
+			fprintf(stderr, "Error: priority type must be: "
+				"\'fixed\' or \'variable\'\n");
 		}
 	}
 	if (pflg) {
 		if (priority < 50 || priority > 100) {
 			errflag++;
-			fprintf (stderr, "Error: priority range [50..100]\n");
+			fprintf(stderr, "Error: priority range [50..100]\n");
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc5.c b/testcases/kernel/sched/sched_stress/sched_tc5.c
index f484cc2..d242c9e 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc5.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc5.c
@@ -78,8 +78,8 @@
  *
  * parse_args: parse command line arguments
  */
-void parse_args (int, char **);
-void invert_matrix ();
+void parse_args(int, char **);
+void invert_matrix();
 
 /*
  * Global variables:
@@ -90,11 +90,11 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose   = 0;
-int	debug     = 0;
-int 	priority  = DEFAULT_PRIORITY;
-char	*logfile  = DEFAULT_LOGFILE;
-char 	*priority_type = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+int priority = DEFAULT_PRIORITY;
+char *logfile = DEFAULT_LOGFILE;
+char *priority_type = DEFAULT_PRIORITY_TYPE;
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -103,66 +103,69 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	FILE	*statfile;
-	int	i;
-	clock_t	start_time;		/* start & stop times */
-	clock_t	stop_time;
-	float	elapsed_time;
-	struct tms timer_info;		/* time accounting info */
+	FILE *statfile;
+	int i;
+	clock_t start_time;	/* start & stop times */
+	clock_t stop_time;
+	float elapsed_time;
+	struct tms timer_info;	/* time accounting info */
 
 	/*
 	 * Process command line arguments...
 	 */
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority type:  %s\n", priority_type);
-		printf ("\tpriority:       %d\n", priority);
-		printf ("\tlogfile:        %s\n", logfile);
+		printf("\tpriority type:  %s\n", priority_type);
+		printf("\tpriority:       %d\n", priority);
+		printf("\tlogfile:        %s\n", logfile);
 	}
 
 	/*
 	 * Adjust the priority of this process if the real time flag is set
 	 */
-	if (!strcmp (priority_type, "fixed")) {
+	if (!strcmp(priority_type, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	} else {
-		if (nice ((priority - 50) - (nice (0) + 20)) < 0 && errno != 0)
-			sys_error ("nice failed", __FILE__, __LINE__);
+		if (nice((priority - 50) - (nice(0) + 20)) < 0 && errno != 0)
+			sys_error("nice failed", __FILE__, __LINE__);
 	}
 
 	/*
 	 * Read from raw I/O device and record elapsed time...
 	 */
-	start_time = time ((time_t*)&timer_info);
+	start_time = time((time_t *) & timer_info);
 
-	for (i=0; i < TIMES; i++)
-		invert_matrix ();
+	for (i = 0; i < TIMES; i++)
+		invert_matrix();
 
-	stop_time = time ((time_t*)&timer_info);
-	elapsed_time = (float) (stop_time - start_time) / 100.0;
+	stop_time = time((time_t *) & timer_info);
+	elapsed_time = (float)(stop_time - start_time) / 100.0;
 
-	if ((statfile = fopen (logfile, "w")) == NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((statfile = fopen(logfile, "w")) == NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
-	fprintf (statfile, "%f\n", elapsed_time);
-	if (debug) printf ("\n\telapsed time: %f\n", elapsed_time);
+	fprintf(statfile, "%f\n", elapsed_time);
+	if (debug)
+		printf("\n\telapsed time: %f\n", elapsed_time);
 
-	if (fclose (statfile) < 0)
-		sys_error ("fclose failed", __FILE__, __LINE__);
+	if (fclose(statfile) < 0)
+		sys_error("fclose failed", __FILE__, __LINE__);
 
 	/*
 	 * Exit with success!
 	 */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -174,28 +177,27 @@
 |               inverse..                                              |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void invert_matrix ()
+void invert_matrix()
 {
-	int     i, j, k;
-	float   t1;
-	float	matrix_1 [MATRIX_SIZE][MATRIX_SIZE];
-	float	matrix_2 [MATRIX_SIZE][MATRIX_SIZE];
+	int i, j, k;
+	float t1;
+	float matrix_1[MATRIX_SIZE][MATRIX_SIZE];
+	float matrix_2[MATRIX_SIZE][MATRIX_SIZE];
 
 	/*
 	 * Fill the first matrix to be inverted with random values
 	 */
-printf("sched_tc5: invert_matrix: before first matrix inversion\n");
+	printf("sched_tc5: invert_matrix: before first matrix inversion\n");
 	for (i = 0; i < MATRIX_SIZE; i++)
-		for (j = 0; j < MATRIX_SIZE; j++)
-		{
-			matrix_1[i][j] = (float) (rand () % 100);
+		for (j = 0; j < MATRIX_SIZE; j++) {
+			matrix_1[i][j] = (float)(rand() % 100);
 		}
 
 	/*
 	 * Now calculate the inverse of the random matrix first, create an
 	 * identity matrix in the result matrix
 	 */
-printf("sched_tc5: invert_matrix: before second matrix inversion\n");
+	printf("sched_tc5: invert_matrix: before second matrix inversion\n");
 	for (i = 0; i < MATRIX_SIZE; i++)
 		for (j = 0; j < MATRIX_SIZE; j++)
 			if (i == j)
@@ -203,7 +205,7 @@
 			else
 				matrix_2[i][j] = 0;
 
-printf("sched_tc5: invert_matrix: before form identity matrix\n");
+	printf("sched_tc5: invert_matrix: before form identity matrix\n");
 	/*
 	 * Form an identity matrix in the random matrix
 	 */
@@ -215,14 +217,14 @@
 		}
 		for (j = 0; j < MATRIX_SIZE; j++)
 			if (i != j) {
-				t1 = - matrix_1[j][i];
+				t1 = -matrix_1[j][i];
 				for (k = 0; k < MATRIX_SIZE; k++) {
-					matrix_1[j][k] += ( matrix_1[i][k] * t1 );
-					matrix_2[j][k] += ( matrix_2[i][k] * t1 );
+					matrix_1[j][k] += (matrix_1[i][k] * t1);
+					matrix_2[j][k] += (matrix_2[i][k] * t1);
 				}
 			}
 	}
-printf("sched_tc5: invert_matrix: after form identity matrix\n");
+	printf("sched_tc5: invert_matrix: after form identity matrix\n");
 }
 
 /*---------------------------------------------------------------------+
@@ -241,26 +243,24 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	lflg = 0, pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int lflg = 0, pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-        if (argc < 2) {
-                fprintf (stderr, USAGE, program_name);
-                exit (0);
-        }
+	if (argc < 2) {
+		fprintf(stderr, USAGE, program_name);
+		exit(0);
+	}
 
-	while ((opt = getopt(argc, argv, "l:t:p:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "l:t:p:vd")) != EOF) {
+		switch (opt) {
 		case 'l':	/* log file */
 			lflg++;
 			logfile = optarg;
@@ -271,7 +271,7 @@
 			break;
 		case 'p':	/* process priority */
 			pflg++;
-			priority = atoi (optarg);
+			priority = atoi(optarg);
 			break;
 		case 'v':	/* verbose */
 			verbose++;
@@ -285,14 +285,14 @@
 			break;
 		}
 	}
-debug=1;
+	debug = 1;
 
 	/*
 	 * Check percentage and process slots...
- 	 */
+	 */
 	if (tflg) {
-		if (strcmp (priority_type, "fixed") &&
-		    strcmp (priority_type, "variable"))
+		if (strcmp(priority_type, "fixed") &&
+		    strcmp(priority_type, "variable"))
 			errflag++;
 	}
 	if (pflg) {
@@ -300,7 +300,7 @@
 			errflag++;
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/sched_stress/sched_tc6.c b/testcases/kernel/sched/sched_stress/sched_tc6.c
index ab5e430..80a61c7 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc6.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc6.c
@@ -93,12 +93,12 @@
  *
  * parse_args: parse command line arguments
  */
-void parse_args (int, char **);
-int fork_realtime (char **);
-int read_file (int, char *);
-int lock_file (int, short, char *);
-int unlock_file (int, char *);
-int lock_error (int, char *);
+void parse_args(int, char **);
+int fork_realtime(char **);
+int read_file(int, char *);
+int lock_file(int, short, char *);
+int unlock_file(int, char *);
+int lock_error(int, char *);
 
 /*
  * Global variables:
@@ -109,16 +109,16 @@
  *
  * priority: process type (fixed priority, variable priority)
  */
-int	verbose   = 0;
-int	debug     = 0;
-int     fork_flag = 0;
-int 	priority  = DEFAULT_PRIORITY;
-char	*logfile  = DEFAULT_LOGFILE;
-char 	*priority_type = DEFAULT_PRIORITY_TYPE;
+int verbose = 0;
+int debug = 0;
+int fork_flag = 0;
+int priority = DEFAULT_PRIORITY;
+char *logfile = DEFAULT_LOGFILE;
+char *priority_type = DEFAULT_PRIORITY_TYPE;
 struct flock flock_struct;
 struct flock *flock_ptr = &flock_struct;
 
-int open_file (char*, int);
+int open_file(char *, int);
 
 /*---------------------------------------------------------------------+
 |                                 main                                 |
@@ -127,108 +127,111 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-	char	*filename=NULL;
-	FILE	*statfile;
-	pid_t	pid=0;
-	int	fd;
-	int	rc;
-	clock_t	start_time;		/* start & stop times */
-	clock_t	stop_time;
-	float	elapsed_time;
+	char *filename = NULL;
+	FILE *statfile;
+	pid_t pid = 0;
+	int fd;
+	int rc;
+	clock_t start_time;	/* start & stop times */
+	clock_t stop_time;
+	float elapsed_time;
 #ifdef __linux__
-	time_t  timer_info;
+	time_t timer_info;
 #else
-	struct tms timer_info;		/* time accounting info */
+	struct tms timer_info;	/* time accounting info */
 #endif
 
-	if ((filename=getenv("KERNEL"))==NULL)
-        {
-            errno = ENODATA;
-            sys_error("environment variable KERNEL not set",__FILE__, __LINE__);
-        }
+	if ((filename = getenv("KERNEL")) == NULL) {
+		errno = ENODATA;
+		sys_error("environment variable KERNEL not set", __FILE__,
+			  __LINE__);
+	}
 
 	/* Process command line arguments...  */
-	parse_args (argc, argv);
-	if (verbose) printf ("%s: Scheduler TestSuite program\n\n", *argv);
+	parse_args(argc, argv);
+	if (verbose)
+		printf("%s: Scheduler TestSuite program\n\n", *argv);
 	if (debug) {
-		printf ("\tpriority type:  %s\n", priority_type);
-		printf ("\tpriority:       %d\n", priority);
-		printf ("\tlogfile:        %s\n", logfile);
+		printf("\tpriority type:  %s\n", priority_type);
+		printf("\tpriority:       %d\n", priority);
+		printf("\tlogfile:        %s\n", logfile);
 	}
 
 	/* Adjust the priority of this process if the real time flag is set */
-	if (!strcmp (priority_type, "fixed")) {
+	if (!strcmp(priority_type, "fixed")) {
 #ifndef __linux__
-                if (setpri (0, DEFAULT_PRIORITY) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpri(0, DEFAULT_PRIORITY) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #else
-                if (setpriority(PRIO_PROCESS, 0, 0) < 0)
-                        sys_error ("setpri failed", __FILE__, __LINE__);
+		if (setpriority(PRIO_PROCESS, 0, 0) < 0)
+			sys_error("setpri failed", __FILE__, __LINE__);
 #endif
 	} else {
-		if (nice ((priority - 50) - (nice(0) + 20)) < 0 && errno != 0)
-			sys_error ("nice failed", __FILE__, __LINE__);
+		if (nice((priority - 50) - (nice(0) + 20)) < 0 && errno != 0)
+			sys_error("nice failed", __FILE__, __LINE__);
 	}
 
 	/* Read from raw I/O device and record elapsed time...  */
-	start_time = time (&timer_info);
+	start_time = time(&timer_info);
 
 	/* Open and lock file file...  */
-	fd = open_file (filename, O_RDWR);
-	if (!lock_file (fd, F_WRLCK, filename))    /* set exclusive lock */
-		error ("lock_file failed", __FILE__, __LINE__);
+	fd = open_file(filename, O_RDWR);
+	if (!lock_file(fd, F_WRLCK, filename))	/* set exclusive lock */
+		error("lock_file failed", __FILE__, __LINE__);
 
 	/* If fork flag set, fork a real process */
 	if (fork_flag)
-		pid = fork_realtime (argv);
+		pid = fork_realtime(argv);
 
 	/* Read file */
 	if (debug) {
-		printf ("\tprocess id %d successfully locked %s\n",
-			getpid(), filename);
-		printf ("\tprocess id %d starting to read %s\n",
-			getpid(), filename);
+		printf("\tprocess id %d successfully locked %s\n",
+		       getpid(), filename);
+		printf("\tprocess id %d starting to read %s\n",
+		       getpid(), filename);
 	}
 
-	if (!read_file (fd, filename))
-		error ("read_file failed", __FILE__, __LINE__);
+	if (!read_file(fd, filename))
+		error("read_file failed", __FILE__, __LINE__);
 
 	/* Stop the timer and calculate the elapsed time */
-	stop_time = time (&timer_info);
-	elapsed_time = (float) (stop_time - start_time) / 100.0;
+	stop_time = time(&timer_info);
+	elapsed_time = (float)(stop_time - start_time) / 100.0;
 
 	/* Write the elapsed time to the temporary file...  */
-	if ((statfile = fopen (logfile, "w")) == NULL)
-		sys_error ("fopen failed", __FILE__, __LINE__);
+	if ((statfile = fopen(logfile, "w")) == NULL)
+		sys_error("fopen failed", __FILE__, __LINE__);
 
-	fprintf (statfile, "%f\n", elapsed_time);
-	if (debug) printf ("\n\telapsed time: %f\n", elapsed_time);
+	fprintf(statfile, "%f\n", elapsed_time);
+	if (debug)
+		printf("\n\telapsed time: %f\n", elapsed_time);
 
-	if (fclose (statfile) < 0)
-		sys_error ("fclose failed", __FILE__, __LINE__);
+	if (fclose(statfile) < 0)
+		sys_error("fclose failed", __FILE__, __LINE__);
 
 	/* Unlock file at latest possible time to prevent real time child from
 	 * writing throughput results before user process parent */
-	unlock_file (fd, filename);
-	close (fd);
+	unlock_file(fd, filename);
+	close(fd);
 
 	if (debug)
-	    printf ("\tprocess id %d completed read and unlocked file\n",
-			    	getpid());
+		printf("\tprocess id %d completed read and unlocked file\n",
+		       getpid());
 
 	/* The parent waits for child process to complete before exiting
 	 * so the driver will not read the throughput results file before
 	 * child writes to the file */
-	if (pid != 0)                  /* if parent process ... */
-	{                              /* wait for child process */
-	    if (debug)
-	       printf ("parent waiting on child process %d to complete\n", pid);
+	if (pid != 0) {		/* if parent process ... *//* wait for child process */
+		if (debug)
+			printf
+			    ("parent waiting on child process %d to complete\n",
+			     pid);
 
-	    while ((rc=wait ((void *) 0)) != pid)
-	       if (rc == -1)
-	          sys_error ("wait failed", __FILE__, __LINE__);
+		while ((rc = wait((void *)0)) != pid)
+			if (rc == -1)
+				sys_error("wait failed", __FILE__, __LINE__);
 /*
 DARA: which one to use
 1st -- hangs
@@ -242,7 +245,8 @@
 	}
 
 	/* Exit with success! */
-	if (verbose) printf ("\nsuccessful!\n");
+	if (verbose)
+		printf("\nsuccessful!\n");
 	return (0);
 }
 
@@ -253,13 +257,13 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int open_file (char *file, int open_mode)
+int open_file(char *file, int open_mode)
 {
 	int file_desc;
 
-	if ((file_desc = open (file, open_mode)) < 0)
-		sys_error ("open failed", __FILE__, __LINE__);
-	return(file_desc);
+	if ((file_desc = open(file, open_mode)) < 0)
+		sys_error("open failed", __FILE__, __LINE__);
+	return (file_desc);
 }
 
 /*---------------------------------------------------------------------+
@@ -269,36 +273,35 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int fork_realtime (char **args)
+int fork_realtime(char **args)
 {
 	int pid;
 	char *results_file = args[2];
-	char *priority     = args[3];
+	char *priority = args[3];
 
 	/* fork process then determine if process is parent or child */
 	pid = fork();
-	switch(pid)
-	{
+	switch (pid) {
 		/* fork failed  */
-		case -1:
-			sys_error ("fork failed", __FILE__, __LINE__);
+	case -1:
+		sys_error("fork failed", __FILE__, __LINE__);
 
 		/* child process */
-		case 0:
-			if (execl(*args, *args, REAL_TIME, results_file, priority,
-			NO_FORK, (char *) NULL) < 0)
-				sys_error ("execl failed", __FILE__, __LINE__);
+	case 0:
+		if (execl(*args, *args, REAL_TIME, results_file, priority,
+			  NO_FORK, (char *)NULL) < 0)
+			sys_error("execl failed", __FILE__, __LINE__);
 
 		/* parent process */
-		default:
-			#ifdef DEBUG
-			printf ("\tparent process id = %d\n", getpid());
-			printf ("\tchild process id = %d\n\n", pid);
-			#endif
+	default:
+#ifdef DEBUG
+		printf("\tparent process id = %d\n", getpid());
+		printf("\tchild process id = %d\n\n", pid);
+#endif
 
 		break;
 	}
-	return(pid);
+	return (pid);
 }
 
 /*---------------------------------------------------------------------+
@@ -308,11 +311,11 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int read_file (int fd, char *filename)
+int read_file(int fd, char *filename)
 {
 	int bytes_read;
 	int loop_count;
-		 long total_bytes;
+	long total_bytes;
 	off_t lseek();
 	off_t file_offset = 0;
 	int whence = 0;
@@ -321,26 +324,26 @@
 
 	/* read file for "TIMES" number of times */
 	total_bytes = 0;
-	if (debug) printf ("\n");
-	for (loop_count = 1; loop_count <= TIMES; loop_count++)
-	{
-		while ((bytes_read = read (fd, buf, BLOCK_SIZE)) > 0) {
-			if  (bytes_read == -1)
-			{
-				sys_error ("read failed", __FILE__, __LINE__);
+	if (debug)
+		printf("\n");
+	for (loop_count = 1; loop_count <= TIMES; loop_count++) {
+		while ((bytes_read = read(fd, buf, BLOCK_SIZE)) > 0) {
+			if (bytes_read == -1) {
+				sys_error("read failed", __FILE__, __LINE__);
 			} else
 				total_bytes = total_bytes + bytes_read;
 		}
-		if  (lseek (fd, file_offset, whence) < 0)
-			sys_error ("lseek failed", __FILE__, __LINE__);
+		if (lseek(fd, file_offset, whence) < 0)
+			sys_error("lseek failed", __FILE__, __LINE__);
 
 		if (debug) {
-			printf ("\r\ttotal bytes read = %ld", total_bytes);
-			fflush (stdout);
+			printf("\r\ttotal bytes read = %ld", total_bytes);
+			fflush(stdout);
 		}
 		total_bytes = 0;
 	}
-	if (debug) printf ("\n");
+	if (debug)
+		printf("\n");
 	return 1;
 }
 
@@ -351,16 +354,16 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int lock_file (int fd, short lock_type, char *file)
+int lock_file(int fd, short lock_type, char *file)
 {
 	int lock_attempt = 1;
 	int lock_mode;
 
-	#ifdef DEBUG
-		lock_mode = F_SETLK;      /* return if lock fails        */
-	#else
-		lock_mode = F_SETLKW;     /* set lock and use system wait */
-	#endif
+#ifdef DEBUG
+	lock_mode = F_SETLK;	/* return if lock fails        */
+#else
+	lock_mode = F_SETLKW;	/* set lock and use system wait */
+#endif
 
 	/* file segment locking set data type flock - information
 	 * passed to system by user --
@@ -369,18 +372,17 @@
 	 *   l_len:     number of consecutive bytes to be locked
 	 */
 	flock_ptr->l_whence = 0;
-	flock_ptr->l_start  = 0;
-	flock_ptr->l_len    = 0;
-	flock_ptr->l_type   = lock_type;
+	flock_ptr->l_start = 0;
+	flock_ptr->l_len = 0;
+	flock_ptr->l_type = lock_type;
 
-	while (fcntl (fd, lock_mode, flock_ptr) == -1)
-	{
-		if (lock_error (fd, file))
-		{
-			sleep (NAPTIME);
-			if  (++lock_attempt > MAX_TRIES)
-			{
-				printf ("ERROR: max lock attempts of %d reached\n",MAX_TRIES);
+	while (fcntl(fd, lock_mode, flock_ptr) == -1) {
+		if (lock_error(fd, file)) {
+			sleep(NAPTIME);
+			if (++lock_attempt > MAX_TRIES) {
+				printf
+				    ("ERROR: max lock attempts of %d reached\n",
+				     MAX_TRIES);
 				return (0);
 			}
 		} else
@@ -396,12 +398,12 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int unlock_file (int fd, char *file)
+int unlock_file(int fd, char *file)
 {
 	flock_ptr->l_type = F_UNLCK;
 
-	if (fcntl (fd, F_SETLK, flock_ptr) < 0)
-		sys_error ("fcntl failed", __FILE__, __LINE__);
+	if (fcntl(fd, F_SETLK, flock_ptr) < 0)
+		sys_error("fcntl failed", __FILE__, __LINE__);
 
 	return 1;
 }
@@ -413,66 +415,65 @@
 | Function:  ...                                                       |
 |                                                                      |
 +---------------------------------------------------------------------*/
-int lock_error (int fd, char *file)
+int lock_error(int fd, char *file)
 {
 	int ret = 1;
 
-	printf ("ERROR:  lock failed: %s\n", file);
-	switch (errno)
-	{
-		case EACCES:                       /* access not allowed */
-			fcntl(fd,F_GETLK,flock_ptr);
+	printf("ERROR:  lock failed: %s\n", file);
+	switch (errno) {
+	case EACCES:		/* access not allowed */
+		fcntl(fd, F_GETLK, flock_ptr);
 #ifndef __linux__
-			printf ("ERROR: lock exists - nid: %lX pid: %ld\n",
-				flock_ptr->l_sysid, flock_ptr->l_pid);
+		printf("ERROR: lock exists - nid: %lX pid: %ld\n",
+		       flock_ptr->l_sysid, flock_ptr->l_pid);
 #else
-			printf("ERROR: lock exists - nid:\n");
+		printf("ERROR: lock exists - nid:\n");
 #endif
-			break;
+		break;
 
 		/*
 		 * This was a DS error code, and DS does not exist V3.1
 		 */
 #ifndef __linux__
-		case EDIST:	/* DS file server blocking requests */
-			printf ("ERROR: errno == EDIST\n");
-			printf ("The server has blocked new inbound requests\n");
-			printf ("or outbound requests are currently blocked.\n");
-			break;
+	case EDIST:		/* DS file server blocking requests */
+		printf("ERROR: errno == EDIST\n");
+		printf("The server has blocked new inbound requests\n");
+		printf("or outbound requests are currently blocked.\n");
+		break;
 #endif
 
-		case EAGAIN:                      /* server too busy */
-			printf ("ERROR:  Server too busy to accept the request\n");
-			break;
+	case EAGAIN:		/* server too busy */
+		printf("ERROR:  Server too busy to accept the request\n");
+		break;
 
-		case EDEADLK:           /* only when F_SETLKW cmd is used */
-			printf ("ERROR:  Putting the calling process to sleep\n");
-			printf ("would cause a dead lock\n");
-			ret = 0;
-			break;
+	case EDEADLK:		/* only when F_SETLKW cmd is used */
+		printf("ERROR:  Putting the calling process to sleep\n");
+		printf("would cause a dead lock\n");
+		ret = 0;
+		break;
 
-		case ENOLCK:              /* out of locks */
-			printf ("ERROR: No more file locks available\n");
-			ret = 0;
-			break;
+	case ENOLCK:		/* out of locks */
+		printf("ERROR: No more file locks available\n");
+		ret = 0;
+		break;
 
-		case ENOMEM:              /* out of memory */
-			printf ("ERROR: The server or client does not have enough\n");
-			printf ("memory to service the request.\n");
-			ret = 0;
-			break;
+	case ENOMEM:		/* out of memory */
+		printf("ERROR: The server or client does not have enough\n");
+		printf("memory to service the request.\n");
+		ret = 0;
+		break;
 
-		default:                  /* miscellaneous errors */
-			printf ("ERROR: Unknown lock error\n");
-			perror("reason");
-			ret = 0;
-			break;
+	default:		/* miscellaneous errors */
+		printf("ERROR: Unknown lock error\n");
+		perror("reason");
+		ret = 0;
+		break;
 	}
 
-	printf ("errno = %d\n", errno);    /* log the errno value */
-	sleep (10);
+	printf("errno = %d\n", errno);	/* log the errno value */
+	sleep(10);
 
-	return(ret);
+	return (ret);
 }
 
 /*---------------------------------------------------------------------+
@@ -491,21 +492,19 @@
 |            [-d]           enable debugging messages                  |
 |                                                                      |
 +---------------------------------------------------------------------*/
-void parse_args (int argc, char **argv)
+void parse_args(int argc, char **argv)
 {
-	int	opt;
-	int 	lflg = 0, pflg = 0, tflg = 0;
-	int	errflag = 0;
-	char	*program_name = *argv;
-	extern char 	*optarg;	/* Command line option */
+	int opt;
+	int lflg = 0, pflg = 0, tflg = 0;
+	int errflag = 0;
+	char *program_name = *argv;
+	extern char *optarg;	/* Command line option */
 
 	/*
 	 * Parse command line options.
 	 */
-	while ((opt = getopt(argc, argv, "fl:t:p:vd")) != EOF)
-	{
-		switch (opt)
-		{
+	while ((opt = getopt(argc, argv, "fl:t:p:vd")) != EOF) {
+		switch (opt) {
 		case 'f':	/* fork flag */
 			fork_flag++;
 			break;
@@ -519,7 +518,7 @@
 			break;
 		case 'p':	/* process priority */
 			pflg++;
-			priority = atoi (optarg);
+			priority = atoi(optarg);
 			break;
 		case 'v':	/* verbose */
 			verbose++;
@@ -536,23 +535,23 @@
 
 	/*
 	 * Check percentage and process slots...
- 	 */
+	 */
 	if (tflg) {
-		if (strcmp (priority_type, "fixed") &&
-		    strcmp (priority_type, "variable")) {
+		if (strcmp(priority_type, "fixed") &&
+		    strcmp(priority_type, "variable")) {
 			errflag++;
-			fprintf (stderr, "Error: priority type must be: " \
-					 "\'fixed\' or \'variable\'\n");
+			fprintf(stderr, "Error: priority type must be: "
+				"\'fixed\' or \'variable\'\n");
 		}
 	}
 	if (pflg) {
 		if (priority < 50 || priority > 100) {
 			errflag++;
-			fprintf (stderr, "Error: priority range [50..100]\n");
+			fprintf(stderr, "Error: priority range [50..100]\n");
 		}
 	}
 	if (errflag) {
-		fprintf (stderr, USAGE, program_name);
-		exit (2);
+		fprintf(stderr, USAGE, program_name);
+		exit(2);
 	}
 }
diff --git a/testcases/kernel/sched/tool/time-schedule.c b/testcases/kernel/sched/tool/time-schedule.c
index 0616a69..4ff0bba 100644
--- a/testcases/kernel/sched/tool/time-schedule.c
+++ b/testcases/kernel/sched/tool/time-schedule.c
@@ -35,13 +35,13 @@
 */
 #include <unistd.h>
 #ifdef _POSIX_THREADS
-#  ifndef _REENTRANT
-#    define _REENTRANT
-#  endif
-#  ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-#    define _POSIX_THREAD_SAFE_FUNCTIONS
-#  endif
-#  include <pthread.h>
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+#define _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+#include <pthread.h>
 #endif
 #include <stdlib.h>
 #include <stdio.h>
@@ -57,27 +57,27 @@
 #include <errno.h>
 
 #ifndef __KARMA__
-#  define mt_num_processors() 1   /*  Set to the number of processors   */
-#  define ERRSTRING strerror(errno)
-#  define FALSE 0
-#  define TRUE  1
+#define mt_num_processors() 1	/*  Set to the number of processors   */
+#define ERRSTRING strerror(errno)
+#define FALSE 0
+#define TRUE  1
 #else
-#  include <karma.h>
-#  include <karma_mt.h>
+#include <karma.h>
+#include <karma_mt.h>
 #endif
 
 #define MAX_ITERATIONS      1000
 
-static unsigned int hog_other_cpus ();
-static void run_yielder (int use_threads, int read_fd);
-static void *yielder_main (void *arg);
-static void s_term_handler ();
-static void run_low_priority (unsigned int num, int read_fd);
-static unsigned long compute_median (unsigned long values[MAX_ITERATIONS],
-                                     unsigned long max_value);
-static unsigned int get_run_queue_size ();
-static unsigned long get_num_switches ();
-static void use_fpu_value (double val);
+static unsigned int hog_other_cpus();
+static void run_yielder(int use_threads, int read_fd);
+static void *yielder_main(void *arg);
+static void s_term_handler();
+static void run_low_priority(unsigned int num, int read_fd);
+static unsigned long compute_median(unsigned long values[MAX_ITERATIONS],
+				    unsigned long max_value);
+static unsigned int get_run_queue_size();
+static unsigned long get_num_switches();
+static void use_fpu_value(double val);
 
 static volatile unsigned int sched_count = 0;
 /*  For yielder  */
@@ -85,441 +85,436 @@
 static int pipe_write_fd = -1;
 static pid_t child = -1;
 
-int main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-    int use_threads = FALSE;
-    int use_pipe = FALSE;
-    int no_test = FALSE;
-    int frob_fpu = FALSE;
-    int read_fd = -1;
-    int write_fd = -1;
-    int num_low_priority = -1;
-    int i, j;
-    int fds[2];
-    unsigned int count, num_yields, run_queue_size1, run_queue_size2, num_hogs;
-    unsigned long median, switches1, num_switches, num_overhead_switches;
-    signed long overhead, total_diffs;
-    signed long min_diff =  1000000000;
-    signed long max_diff = -1000000000;
-    double dcount = 0.0;
-    unsigned long diffs[MAX_ITERATIONS];
-    struct timeval before, after;
-    sigset_t set;
-    static char *usage =
-        "time-schedule [-h] [-thread] [-notest] [-pipe] [-fpu] [num_running]";
+	int use_threads = FALSE;
+	int use_pipe = FALSE;
+	int no_test = FALSE;
+	int frob_fpu = FALSE;
+	int read_fd = -1;
+	int write_fd = -1;
+	int num_low_priority = -1;
+	int i, j;
+	int fds[2];
+	unsigned int count, num_yields, run_queue_size1, run_queue_size2,
+	    num_hogs;
+	unsigned long median, switches1, num_switches, num_overhead_switches;
+	signed long overhead, total_diffs;
+	signed long min_diff = 1000000000;
+	signed long max_diff = -1000000000;
+	double dcount = 0.0;
+	unsigned long diffs[MAX_ITERATIONS];
+	struct timeval before, after;
+	sigset_t set;
+	static char *usage =
+	    "time-schedule [-h] [-thread] [-notest] [-pipe] [-fpu] [num_running]";
 
-    setpgrp();
-    /*  First create pipe used to sychronise low priority processes  */
-    if (pipe (fds) != 0)
-    {
-        fprintf (stderr, "Error creating pipe\t%s\n", ERRSTRING);
-        exit (1);
-    }
-    read_fd = fds[0];
-    pipe_write_fd = fds[1];
-    for (count = 1; count < argc; ++count)
-    {
-        if (strcmp (argv[count], "-thread") == 0)
-        {
+	setpgrp();
+	/*  First create pipe used to sychronise low priority processes  */
+	if (pipe(fds) != 0) {
+		fprintf(stderr, "Error creating pipe\t%s\n", ERRSTRING);
+		exit(1);
+	}
+	read_fd = fds[0];
+	pipe_write_fd = fds[1];
+	for (count = 1; count < argc; ++count) {
+		if (strcmp(argv[count], "-thread") == 0) {
 #ifdef _POSIX_THREADS
-            use_threads = TRUE;
+			use_threads = TRUE;
 #else
-            fprintf (stderr, "POSIX threads not available\n");
+			fprintf(stderr, "POSIX threads not available\n");
 #endif
-        }
-        else if (strcmp (argv[count], "-pipe") == 0) use_pipe = TRUE;
-        else if (strcmp (argv[count], "-notest") == 0) no_test = TRUE;
-        else if (strcmp (argv[count], "-fpu") == 0) frob_fpu = TRUE;
-        else if (isdigit (argv[count][0]))
-            num_low_priority = atoi (argv[count]);
-        else
-        {
-            fprintf (stderr,
-                     "Programme to time context switches (schedules)\n");
-            fprintf (stderr,
-                     "(C) 1998  Richard Gooch <rgooch@atnf.csiro.au>\n");
-            fprintf (stderr, "Usage:\t%s\n", usage);
-            fprintf (stderr, "\t-thread\t\tswitch threads not processes\n");
-            fprintf (stderr, "\t-pipe\t\tuse pipes not sched_yield()\n");
-            fprintf (stderr,
-                     "\t-fpu\t\tpollute the FPU after each switch in main\n");
-            fprintf (stderr, "\tnum_running\tnumber of extra processes\n");
-            exit (0);
-        }
-    }
-    if (no_test)
-    {
-        if (num_low_priority > 0) run_low_priority (num_low_priority, read_fd);
-        while (TRUE) pause ();
-    }
-    if (geteuid () == 0)
-    {
-        struct sched_param sp;
+		} else if (strcmp(argv[count], "-pipe") == 0)
+			use_pipe = TRUE;
+		else if (strcmp(argv[count], "-notest") == 0)
+			no_test = TRUE;
+		else if (strcmp(argv[count], "-fpu") == 0)
+			frob_fpu = TRUE;
+		else if (isdigit(argv[count][0]))
+			num_low_priority = atoi(argv[count]);
+		else {
+			fprintf(stderr,
+				"Programme to time context switches (schedules)\n");
+			fprintf(stderr,
+				"(C) 1998  Richard Gooch <rgooch@atnf.csiro.au>\n");
+			fprintf(stderr, "Usage:\t%s\n", usage);
+			fprintf(stderr,
+				"\t-thread\t\tswitch threads not processes\n");
+			fprintf(stderr,
+				"\t-pipe\t\tuse pipes not sched_yield()\n");
+			fprintf(stderr,
+				"\t-fpu\t\tpollute the FPU after each switch in main\n");
+			fprintf(stderr,
+				"\tnum_running\tnumber of extra processes\n");
+			exit(0);
+		}
+	}
+	if (no_test) {
+		if (num_low_priority > 0)
+			run_low_priority(num_low_priority, read_fd);
+		while (TRUE)
+			pause();
+	}
+	if (geteuid() == 0) {
+		struct sched_param sp;
 
-        memset (&sp, 0, sizeof sp);
-        sp.sched_priority = 10;
-        if (sched_setscheduler (0, SCHED_FIFO, &sp) != 0)
-        {
-            fprintf (stderr, "Error changing to RT class\t%s\n", ERRSTRING);
-            exit (1);
-        }
-        if (mlockall (MCL_CURRENT | MCL_FUTURE) != 0)
-        {
-            fprintf (stderr, "Error locking pages\t%s\n", ERRSTRING);
-            exit (1);
-        }
-    }
-    else fprintf (stderr, "Not running with RT priority!\n");
-    /*  Give shell and login programme time to finish up and get off the run
-        queue  */
-    usleep (200000);
-    if (use_pipe)
-    {
-        if (pipe (fds) != 0)
-        {
-            fprintf (stderr, "Error creating pipe\t%s\n", ERRSTRING);
-            exit (1);
-        }
-        pipe_read_fd = fds[0];
-        write_fd = fds[1];
-    }
-    num_hogs = hog_other_cpus ();
-    /*  Determine overhead. Do it in a loop=2. The first iteration should warm
-        the cache, the second will compute the overhead  */
-    for (j = 0; j < 2; ++j)
-    {
-        switches1 = get_num_switches ();
-        gettimeofday (&before, NULL);
-        for (i = 0; i < 20; ++i)
-        {
-            if (use_pipe)
-            {
-                char ch = 0;
+		memset(&sp, 0, sizeof sp);
+		sp.sched_priority = 10;
+		if (sched_setscheduler(0, SCHED_FIFO, &sp) != 0) {
+			fprintf(stderr, "Error changing to RT class\t%s\n",
+				ERRSTRING);
+			exit(1);
+		}
+		if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) {
+			fprintf(stderr, "Error locking pages\t%s\n", ERRSTRING);
+			exit(1);
+		}
+	} else
+		fprintf(stderr, "Not running with RT priority!\n");
+	/*  Give shell and login programme time to finish up and get off the run
+	   queue  */
+	usleep(200000);
+	if (use_pipe) {
+		if (pipe(fds) != 0) {
+			fprintf(stderr, "Error creating pipe\t%s\n", ERRSTRING);
+			exit(1);
+		}
+		pipe_read_fd = fds[0];
+		write_fd = fds[1];
+	}
+	num_hogs = hog_other_cpus();
+	/*  Determine overhead. Do it in a loop=2. The first iteration should warm
+	   the cache, the second will compute the overhead  */
+	for (j = 0; j < 2; ++j) {
+		switches1 = get_num_switches();
+		gettimeofday(&before, NULL);
+		for (i = 0; i < 20; ++i) {
+			if (use_pipe) {
+				char ch = 0;
 
-                write (pipe_write_fd, &ch, 1);
-                read (read_fd, &ch, 1);
-            }
-            else sched_yield ();
-            if (frob_fpu) ++dcount;
-        }
-        gettimeofday (&after, NULL);
-        num_overhead_switches = get_num_switches () - switches1;
-        overhead = 1000000 * (after.tv_sec - before.tv_sec);
-        overhead += after.tv_usec - before.tv_usec;
-    }
-    use_fpu_value (dcount);
-    if (num_low_priority > 0) run_low_priority (num_low_priority, read_fd);
-    /*  Set up for the benchmark  */
-    run_yielder (use_threads, read_fd);
-    memset (diffs, 0, sizeof diffs);
-    run_queue_size1 = get_run_queue_size ();
-    total_diffs = 0;
-    switches1 = get_num_switches ();
-    /*  Benchmark!  */
-    for (count = 0; count < MAX_ITERATIONS; ++count)
-    {
-        signed long diff;
+				write(pipe_write_fd, &ch, 1);
+				read(read_fd, &ch, 1);
+			} else
+				sched_yield();
+			if (frob_fpu)
+				++dcount;
+		}
+		gettimeofday(&after, NULL);
+		num_overhead_switches = get_num_switches() - switches1;
+		overhead = 1000000 * (after.tv_sec - before.tv_sec);
+		overhead += after.tv_usec - before.tv_usec;
+	}
+	use_fpu_value(dcount);
+	if (num_low_priority > 0)
+		run_low_priority(num_low_priority, read_fd);
+	/*  Set up for the benchmark  */
+	run_yielder(use_threads, read_fd);
+	memset(diffs, 0, sizeof diffs);
+	run_queue_size1 = get_run_queue_size();
+	total_diffs = 0;
+	switches1 = get_num_switches();
+	/*  Benchmark!  */
+	for (count = 0; count < MAX_ITERATIONS; ++count) {
+		signed long diff;
 
-        gettimeofday (&before, NULL);
-        /*  Generate 20 context switches  */
-        for (i = 0; i < 10; ++i)
-        {
-            if (use_pipe)
-            {
-                char ch = 0;
+		gettimeofday(&before, NULL);
+		/*  Generate 20 context switches  */
+		for (i = 0; i < 10; ++i) {
+			if (use_pipe) {
+				char ch = 0;
 
-                write (write_fd, &ch, 1);
-                read (read_fd, &ch, 1);
-            }
-            else sched_yield ();
-            if (frob_fpu) dcount += 1.0;
-        }
-        gettimeofday (&after, NULL);
-        diff = 1000000 * (after.tv_sec - before.tv_sec);
-        diff += after.tv_usec - before.tv_usec;
-        diffs[count] = diff;
-        total_diffs += diff;
-        if (diff < min_diff) min_diff = diff;
-        if (diff > max_diff) max_diff = diff;
-    }
-    num_yields = sched_count;
-    run_queue_size2 = get_run_queue_size ();
-    num_switches = get_num_switches () - switches1;
-    if (!use_threads) kill (child, SIGTERM);
-    fprintf (stderr, "Started %u hog processes\n", num_hogs);
-    fprintf (stderr, "Syscall%s overhead: %.1f us\n", frob_fpu ? "/FPU" : "",
-             (double) overhead / 20.0);
-    if (switches1 > 0)
-        fprintf (stderr, "Num switches during overhead check: %lu\n",
-                 num_overhead_switches);
-    fprintf (stderr, "Minimum scheduling latency: %.1f (%.1f) us\n",
-             (double) min_diff / 20.0, (double) (min_diff - overhead) / 20.0);
-    median = compute_median (diffs, max_diff);
-    fprintf (stderr, "Median scheduling latency:  %.1f (%.1f) us\n",
-             (double) median / 20.0, (double) (median - overhead) / 20.0);
-    fprintf (stderr, "Average scheduling latency: %.1f (%.1f) us\n",
-             (double) total_diffs / (double) MAX_ITERATIONS / 20.0,
-             (double) (total_diffs - overhead * MAX_ITERATIONS) /
-             (double) MAX_ITERATIONS / 20.0);
-    fprintf (stderr, "Maximum scheduling latency: %.1f (%.1f) us\n",
-             (double) max_diff / 20.0, (double) (max_diff - overhead) / 20.0);
-    fprintf (stderr, "Run queue size: %u, %u\n",
-             run_queue_size1, run_queue_size2);
-    use_fpu_value (dcount);
-    if (use_threads) fprintf (stderr, "Number of yields: %u\n", num_yields);
-    if (num_switches > 0) fprintf (stderr, "Num switches: %lu\n",num_switches);
+				write(write_fd, &ch, 1);
+				read(read_fd, &ch, 1);
+			} else
+				sched_yield();
+			if (frob_fpu)
+				dcount += 1.0;
+		}
+		gettimeofday(&after, NULL);
+		diff = 1000000 * (after.tv_sec - before.tv_sec);
+		diff += after.tv_usec - before.tv_usec;
+		diffs[count] = diff;
+		total_diffs += diff;
+		if (diff < min_diff)
+			min_diff = diff;
+		if (diff > max_diff)
+			max_diff = diff;
+	}
+	num_yields = sched_count;
+	run_queue_size2 = get_run_queue_size();
+	num_switches = get_num_switches() - switches1;
+	if (!use_threads)
+		kill(child, SIGTERM);
+	fprintf(stderr, "Started %u hog processes\n", num_hogs);
+	fprintf(stderr, "Syscall%s overhead: %.1f us\n", frob_fpu ? "/FPU" : "",
+		(double)overhead / 20.0);
+	if (switches1 > 0)
+		fprintf(stderr, "Num switches during overhead check: %lu\n",
+			num_overhead_switches);
+	fprintf(stderr, "Minimum scheduling latency: %.1f (%.1f) us\n",
+		(double)min_diff / 20.0, (double)(min_diff - overhead) / 20.0);
+	median = compute_median(diffs, max_diff);
+	fprintf(stderr, "Median scheduling latency:  %.1f (%.1f) us\n",
+		(double)median / 20.0, (double)(median - overhead) / 20.0);
+	fprintf(stderr, "Average scheduling latency: %.1f (%.1f) us\n",
+		(double)total_diffs / (double)MAX_ITERATIONS / 20.0,
+		(double)(total_diffs - overhead * MAX_ITERATIONS) /
+		(double)MAX_ITERATIONS / 20.0);
+	fprintf(stderr, "Maximum scheduling latency: %.1f (%.1f) us\n",
+		(double)max_diff / 20.0, (double)(max_diff - overhead) / 20.0);
+	fprintf(stderr, "Run queue size: %u, %u\n",
+		run_queue_size1, run_queue_size2);
+	use_fpu_value(dcount);
+	if (use_threads)
+		fprintf(stderr, "Number of yields: %u\n", num_yields);
+	if (num_switches > 0)
+		fprintf(stderr, "Num switches: %lu\n", num_switches);
 
-    /*  Terminate all child processes  */
-    sigemptyset (&set);
-    sigaddset (&set, SIGTERM);
-    sigprocmask (SIG_BLOCK, &set, NULL);
+	/*  Terminate all child processes  */
+	sigemptyset(&set);
+	sigaddset(&set, SIGTERM);
+	sigprocmask(SIG_BLOCK, &set, NULL);
 
-    kill(0, SIGTERM);
-    return (0);
-}   /*  End Function main  */
+	kill(0, SIGTERM);
+	return (0);
+}				/*  End Function main  */
 
-static unsigned int hog_other_cpus ()
+static unsigned int hog_other_cpus()
 /*  [SUMMARY] Hog other CPUs with a high-priority job.
     [RETURNS] The number of hogged CPUs.
 */
 {
-    unsigned int count;
+	unsigned int count;
 
-    for (count = mt_num_processors (); count > 1; --count)
-    {
-        switch ( fork () )
-        {
-          case 0:
-            /*  Child  */
-            while (TRUE);
-            break;
-          case -1:
-            /*  Error  */
-            fprintf (stderr, "Error forking\t%s\n", ERRSTRING);
-            kill (0, SIGTERM);
-            break;
-          default:
-            /*  Parent  */
-            break;
-        }
-    }
-    return mt_num_processors () - 1;
-}   /*  End Function hog_other_cpus  */
+	for (count = mt_num_processors(); count > 1; --count) {
+		switch (fork()) {
+		case 0:
+			/*  Child  */
+			while (TRUE) ;
+			break;
+		case -1:
+			/*  Error  */
+			fprintf(stderr, "Error forking\t%s\n", ERRSTRING);
+			kill(0, SIGTERM);
+			break;
+		default:
+			/*  Parent  */
+			break;
+		}
+	}
+	return mt_num_processors() - 1;
+}				/*  End Function hog_other_cpus  */
 
-static void run_yielder (int use_threads, int read_fd)
+static void run_yielder(int use_threads, int read_fd)
 /*  [SUMMARY] Run other process which will continuously yield.
     <use_threads> If TRUE, the yielding process is just a thread.
     <read_fd> The pipe to read the synchronisation byte from.
     [RETURNS] Nothing.
 */
 {
-    char ch;
-    struct sigaction new_action;
+	char ch;
+	struct sigaction new_action;
 #ifdef _POSIX_THREADS
-    pthread_t thread;
+	pthread_t thread;
 
-    if (use_threads)
-    {
-        if (pthread_create (&thread, NULL, yielder_main, NULL) != 0)
-        {
-            fprintf (stderr, "Error creating thread\t%s\n", ERRSTRING);
-            kill (0, SIGTERM);
-        }
-        read (read_fd, &ch, 1);
-        return;
-    }
+	if (use_threads) {
+		if (pthread_create(&thread, NULL, yielder_main, NULL) != 0) {
+			fprintf(stderr, "Error creating thread\t%s\n",
+				ERRSTRING);
+			kill(0, SIGTERM);
+		}
+		read(read_fd, &ch, 1);
+		return;
+	}
 #endif
-    switch ( child = fork () )
-    {
-      case 0:
-        /*  Child  */
-        break;
-      case -1:
-        /*  Error  */
-        fprintf (stderr, "Error forking\t%s\n", ERRSTRING);
-        kill (0, SIGTERM);
-        break;
-      default:
-        /*  Parent  */
-        read (read_fd, &ch, 1);
-        return;
-        /*break;*/
-    }
-    memset (&new_action, 0, sizeof new_action);
-    sigemptyset (&new_action.sa_mask);
-    new_action.sa_handler = s_term_handler;
-    if (sigaction (SIGTERM, &new_action, NULL) != 0)
-    {
-        fprintf (stderr, "Error setting SIGTERM handler\t%s\n", ERRSTRING);
-        exit (1);
-    }
-    yielder_main (NULL);
-}   /*  End Function run_yielder  */
+	switch (child = fork()) {
+	case 0:
+		/*  Child  */
+		break;
+	case -1:
+		/*  Error  */
+		fprintf(stderr, "Error forking\t%s\n", ERRSTRING);
+		kill(0, SIGTERM);
+		break;
+	default:
+		/*  Parent  */
+		read(read_fd, &ch, 1);
+		return;
+		/*break; */
+	}
+	memset(&new_action, 0, sizeof new_action);
+	sigemptyset(&new_action.sa_mask);
+	new_action.sa_handler = s_term_handler;
+	if (sigaction(SIGTERM, &new_action, NULL) != 0) {
+		fprintf(stderr, "Error setting SIGTERM handler\t%s\n",
+			ERRSTRING);
+		exit(1);
+	}
+	yielder_main(NULL);
+}				/*  End Function run_yielder  */
 
-static void *yielder_main (void *arg)
+static void *yielder_main(void *arg)
 /*  [SUMMARY] Yielder function.
     <arg> An arbirtrary pointer. Ignored.
     [RETURNS] NULL.
 */
 {
-    char ch = 0;
+	char ch = 0;
 
-    sched_count = 0;
-    write (pipe_write_fd, &ch, 1);
-    while (TRUE)
-    {
-        if (pipe_read_fd >= 0)
-        {
-            read (pipe_read_fd, &ch, 1);
-            write (pipe_write_fd, &ch, 1);
-        }
-        else sched_yield ();
-        ++sched_count;
-    }
-    return (NULL);
-}   /*  End Function yielder_main  */
+	sched_count = 0;
+	write(pipe_write_fd, &ch, 1);
+	while (TRUE) {
+		if (pipe_read_fd >= 0) {
+			read(pipe_read_fd, &ch, 1);
+			write(pipe_write_fd, &ch, 1);
+		} else
+			sched_yield();
+		++sched_count;
+	}
+	return (NULL);
+}				/*  End Function yielder_main  */
 
-static void s_term_handler ()
+static void s_term_handler()
 {
-    fprintf (stderr, "Number of yields: %u\n", sched_count);
-    exit (0);
-}   /*  End Function s_term_handler  */
+	fprintf(stderr, "Number of yields: %u\n", sched_count);
+	exit(0);
+}				/*  End Function s_term_handler  */
 
-static void run_low_priority (unsigned int num, int read_fd)
+static void run_low_priority(unsigned int num, int read_fd)
 /*  [SUMMARY] Run low priority processes.
     <num> Number of processes.
     <read_fd> The pipe to read the synchronisation byte from.
     [RETURNS] Nothing.
 */
 {
-    char ch = 0;
+	char ch = 0;
 
-    for (; num > 0; --num)
-    {
-        switch ( fork () )
-        {
-          case 0:
-            /*  Child  */
-            if (geteuid () == 0)
-            {
-                struct sched_param sp;
+	for (; num > 0; --num) {
+		switch (fork()) {
+		case 0:
+			/*  Child  */
+			if (geteuid() == 0) {
+				struct sched_param sp;
 
-                memset (&sp, 0, sizeof sp);
-                sp.sched_priority = 0;
-                if (sched_setscheduler (0, SCHED_OTHER, &sp) != 0)
-                {
-                    fprintf (stderr,
-                             "Error changing to SCHED_OTHER class\t%s\n",
-                             ERRSTRING);
-                    exit (1);
-                }
-            }
-            if (nice (20) != 0)
-            {
-                fprintf (stderr, "Error nicing\t%s\n", ERRSTRING);
-                kill (0, SIGTERM);
-            }
-            write (pipe_write_fd, &ch, 1);
-            while (TRUE) sched_yield ();
-            break;
-          case -1:
-            /*  Error  */
-            fprintf (stderr, "Error forking\t%s\n", ERRSTRING);
-            kill (0, SIGTERM);
-            break;
-          default:
-            /*  Parent  */
-            read (read_fd, &ch, 1);
-            break;
-        }
-    }
-}   /*  End Function run_low_priority  */
+				memset(&sp, 0, sizeof sp);
+				sp.sched_priority = 0;
+				if (sched_setscheduler(0, SCHED_OTHER, &sp) !=
+				    0) {
+					fprintf(stderr,
+						"Error changing to SCHED_OTHER class\t%s\n",
+						ERRSTRING);
+					exit(1);
+				}
+			}
+			if (nice(20) != 0) {
+				fprintf(stderr, "Error nicing\t%s\n",
+					ERRSTRING);
+				kill(0, SIGTERM);
+			}
+			write(pipe_write_fd, &ch, 1);
+			while (TRUE)
+				sched_yield();
+			break;
+		case -1:
+			/*  Error  */
+			fprintf(stderr, "Error forking\t%s\n", ERRSTRING);
+			kill(0, SIGTERM);
+			break;
+		default:
+			/*  Parent  */
+			read(read_fd, &ch, 1);
+			break;
+		}
+	}
+}				/*  End Function run_low_priority  */
 
-static unsigned long compute_median (unsigned long values[MAX_ITERATIONS],
-                                     unsigned long max_value)
+static unsigned long compute_median(unsigned long values[MAX_ITERATIONS],
+				    unsigned long max_value)
 /*  [SUMMARY] Compute the median from an array of values.
     <values> The array of values.
     <max_value> The maximum value in the array.
     [RETURNS] The median value.
 */
 {
-    unsigned long count;
-    unsigned long median = 0;
-    unsigned long peak = 0;
-    unsigned long *table;
+	unsigned long count;
+	unsigned long median = 0;
+	unsigned long peak = 0;
+	unsigned long *table;
 
-    /*  Crude but effective  */
-    if (( table = calloc (max_value + 1, sizeof *table) ) == NULL)
-    {
-        fprintf (stderr, "Error allocating median table\n");
-        exit (1);
-    }
-    for (count = 0; count < MAX_ITERATIONS; ++count)
-    {
-        ++table[ values[count] ];
-    }
-    /*  Now search for peak. Position of peak is median  */
-    for (count = 0; count < max_value + 1; ++count)
-    {
-        if (table[count] < peak) continue;
-        peak = table[count];
-        median = count;
-    }
-    free(table);
-    return (median);
-}   /*  End Function compute_median  */
+	/*  Crude but effective  */
+	if ((table = calloc(max_value + 1, sizeof *table)) == NULL) {
+		fprintf(stderr, "Error allocating median table\n");
+		exit(1);
+	}
+	for (count = 0; count < MAX_ITERATIONS; ++count) {
+		++table[values[count]];
+	}
+	/*  Now search for peak. Position of peak is median  */
+	for (count = 0; count < max_value + 1; ++count) {
+		if (table[count] < peak)
+			continue;
+		peak = table[count];
+		median = count;
+	}
+	free(table);
+	return (median);
+}				/*  End Function compute_median  */
 
-static unsigned int get_run_queue_size ()
+static unsigned int get_run_queue_size()
 /*  [SUMMARY] Compute the current size of the run queue.
     [RETURNS] The length of the run queue.
 */
 {
-    int dummy_i;
-    unsigned int length = 0;
-    FILE *fp;
-    DIR *dp;
-    struct dirent *de;
-    char txt[64], dummy_str[64];
+	int dummy_i;
+	unsigned int length = 0;
+	FILE *fp;
+	DIR *dp;
+	struct dirent *de;
+	char txt[64], dummy_str[64];
 
-    if (( dp = opendir ("/proc") ) == NULL ) return (0);
-    while (( de = readdir (dp) ) != NULL)
-    {
-        if (!isdigit (de->d_name[0])) continue;
-        sprintf (txt, "/proc/%s/stat", de->d_name);
-        if (( fp = fopen (txt, "r") ) == NULL ) return (length);
-        fscanf (fp, "%d %s %s", &dummy_i, dummy_str, txt);
-        if (txt[0] == 'R') ++length;
-        fclose (fp);
-    }
-    closedir (dp);
-    return (length);
-}   /*  End Function get_run_queue_size  */
+	if ((dp = opendir("/proc")) == NULL)
+		return (0);
+	while ((de = readdir(dp)) != NULL) {
+		if (!isdigit(de->d_name[0]))
+			continue;
+		sprintf(txt, "/proc/%s/stat", de->d_name);
+		if ((fp = fopen(txt, "r")) == NULL)
+			return (length);
+		fscanf(fp, "%d %s %s", &dummy_i, dummy_str, txt);
+		if (txt[0] == 'R')
+			++length;
+		fclose(fp);
+	}
+	closedir(dp);
+	return (length);
+}				/*  End Function get_run_queue_size  */
 
-static unsigned long get_num_switches ()
+static unsigned long get_num_switches()
 /*  [SUMMARY] Get the number of context switches.
     [RETURNS] The number of context switches on success, else 0.
 */
 {
-    unsigned long val;
-    FILE *fp;
-    char line[256], name[64];
+	unsigned long val;
+	FILE *fp;
+	char line[256], name[64];
 
-    if (( fp = fopen ("/proc/stat", "r") ) == NULL ) return (0);
-    while (fgets (line, sizeof line, fp) != NULL)
-    {
-        sscanf (line, "%s %lu", name, &val);
-        if (strcasecmp (name, "ctxt") != 0) continue;
-        fclose (fp);
-        return (val);
-    }
-    fclose (fp);
-    return (0);
-}   /*  End Function get_num_switches  */
+	if ((fp = fopen("/proc/stat", "r")) == NULL)
+		return (0);
+	while (fgets(line, sizeof line, fp) != NULL) {
+		sscanf(line, "%s %lu", name, &val);
+		if (strcasecmp(name, "ctxt") != 0)
+			continue;
+		fclose(fp);
+		return (val);
+	}
+	fclose(fp);
+	return (0);
+}				/*  End Function get_num_switches  */
 
-static void use_fpu_value (double val)
+static void use_fpu_value(double val)
 /*  [SUMMARY] Dummy function to consume FPU value. Fools compiler.
     <val> The value.
     [RETURNS] Nothing.
 */
 {
-}   /*  End Function use_fpu_value  */
+}				/*  End Function use_fpu_value  */
diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
index 42698ed..7815686 100644
--- a/testcases/kernel/sched/tool/trace_sched.c
+++ b/testcases/kernel/sched/tool/trace_sched.c
@@ -56,10 +56,11 @@
 #include <unistd.h>
 #include <string.h>
 
-void noprintf(char* string, ...) {
+void noprintf(char *string, ...)
+{
 }
 
-#ifdef DEBUG		/* compile with this flag for debug, use dprt in code */
+#ifdef DEBUG			/* compile with this flag for debug, use dprt in code */
 #define dprt    printf
 #else
 #define dprt    noprintf
@@ -72,14 +73,14 @@
 #define MAXT 100
 
 #ifdef PTHREAD_THREADS_MAX
-#define PIDS PTHREAD_THREADS_MAX /* maximum thread allowed.                     */
+#define PIDS PTHREAD_THREADS_MAX	/* maximum thread allowed.                     */
 #elif defined(PID_MAX_DEFAULT)
-#define PIDS PID_MAX_DEFAULT     /* maximum pids allowed.                       */
+#define PIDS PID_MAX_DEFAULT	/* maximum pids allowed.                       */
 #else
-#define PIDS PID_MAX		 /* alternative way maximum pids may be defined */
+#define PIDS PID_MAX		/* alternative way maximum pids may be defined */
 #endif
 
-#define UP   1                   /* assume UP if no SMP value is specified.     */
+#define UP   1			/* assume UP if no SMP value is specified.     */
 
 #define OPT_MISSING(prog, opt)   do{\
                                fprintf(stderr, "%s: option -%c ", prog, opt); \
@@ -89,15 +90,15 @@
 
 #define SAFE_FREE(p) { if (p) { free(p); (p)=NULL; } }
 
-typedef struct {        /* contains priority and CPU info of the task.        */
-    int exp_prio;	/* priority that we wish to set.                      */
-    int act_prio;	/* priority set by the scheduler.                     */
-    int proc_num;	/* last processor on which this task executed.        */
-    int procs_id;	/* pid of this task.                                  */
-    int s_policy;	/* scheduling policy for the task.                    */
+typedef struct {		/* contains priority and CPU info of the task.        */
+	int exp_prio;		/* priority that we wish to set.                      */
+	int act_prio;		/* priority set by the scheduler.                     */
+	int proc_num;		/* last processor on which this task executed.        */
+	int procs_id;		/* pid of this task.                                  */
+	int s_policy;		/* scheduling policy for the task.                    */
 } thread_sched_t;
 
-int verbose = 0;        /* set verbose printing, makes output look ugly!      */
+int verbose = 0;		/* set verbose printing, makes output look ugly!      */
 
 /******************************************************************************/
 /*                                                                            */
@@ -108,18 +109,17 @@
 /* Return:      exits with -1                                                 */
 /*                                                                            */
 /******************************************************************************/
-void
-usage(char *progname)	/* name of this program				      */
-{
-    fprintf(stderr,
-        "Usage: %s -c NCPU -h -p [fifo:rr:other] -t THREADS -v\n"
-        "\t -c Number of CUPS in the machine. User MUST provide\n"
-        "\t -h Help!\n"
-	"\t -p Scheduling policy, choice: fifo, rr, other. Default: fifo\n"
-        "\t -t Number of threads to create.                Default: %d\n"
-        "\t -v Verbose out put, print ugly!.               Default: OFF\n",
-	progname, MAXT);
-   exit(-1);
+void usage(char *progname)
+{				/* name of this program                                 */
+	fprintf(stderr,
+		"Usage: %s -c NCPU -h -p [fifo:rr:other] -t THREADS -v\n"
+		"\t -c Number of CUPS in the machine. User MUST provide\n"
+		"\t -h Help!\n"
+		"\t -p Scheduling policy, choice: fifo, rr, other. Default: fifo\n"
+		"\t -t Number of threads to create.                Default: %d\n"
+		"\t -v Verbose out put, print ugly!.               Default: OFF\n",
+		progname, MAXT);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -134,36 +134,33 @@
 /*              CPU number - on success				              */
 /*                                                                            */
 /******************************************************************************/
-static int
-get_proc_num(void)
+static int get_proc_num(void)
 {
-    int fd = -1;	/* file descriptor of the /proc/<pid>/stat file.      */
-    int fsize = -1;     /* size of the /proc/<pid>/stat file.	              */
-    char filename[256]; /* buffer to hold the string /proc/<pid>/stat.        */
-    char fbuff[512];    /* contains the contents of the stat file.            */
+	int fd = -1;		/* file descriptor of the /proc/<pid>/stat file.      */
+	int fsize = -1;		/* size of the /proc/<pid>/stat file.                 */
+	char filename[256];	/* buffer to hold the string /proc/<pid>/stat.        */
+	char fbuff[512];	/* contains the contents of the stat file.            */
 
-    /* get the name of the stat file for this process */
-    sprintf(filename, "/proc/%d/stat", getpid());
+	/* get the name of the stat file for this process */
+	sprintf(filename, "/proc/%d/stat", getpid());
 
-    /* open the stat file and read the contents to a buffer */
-    if ((fd  = open(filename, O_RDONLY)) == -1)
-    {
-        perror("get_proc_num(): open()");
-        return -1;
-    }
+	/* open the stat file and read the contents to a buffer */
+	if ((fd = open(filename, O_RDONLY)) == -1) {
+		perror("get_proc_num(): open()");
+		return -1;
+	}
 
-    usleep(6);
-    sched_yield();
+	usleep(6);
+	sched_yield();
 
-    if ((fsize = read(fd, fbuff, 512)) == -1)
-    {
-        perror("main(): read()");
-        return -1;
-    }
+	if ((fsize = read(fd, fbuff, 512)) == -1) {
+		perror("main(): read()");
+		return -1;
+	}
 
-    close(fd);
-    /* return the processor number last executed on. */
-    return atoi(&fbuff[fsize - 2]);
+	close(fd);
+	/* return the processor number last executed on. */
+	return atoi(&fbuff[fsize - 2]);
 }
 
 /******************************************************************************/
@@ -192,96 +189,89 @@
 /*		-1 	       - on error.                                    */
 /*                                                                            */
 /******************************************************************************/
-void *
-thread_func(void *args)		/* arguments to the thread function           */
-{
-    static int max_priority;    /* max possible priority for a process.       */
-    static int min_priority;    /* min possible priority for a process.	      */
-    static int set_priority;    /* set the priority of the proc by this value.*/
-    static int get_priority;    /* get the priority that is set for this proc.*/
-    static int procnum;         /* processor number last executed on.         */
-    static int sched_policy;    /* scheduling policy as set by user/default   */
-    struct sched_param ssp;     /* set schedule priority.                     */
-    struct sched_param gsp;     /* gsp schedule priority.                     */
-    struct timeb       tptr;    /* tptr.millitm will be used to seed srand.   */
-    thread_sched_t *locargptr = /* local ptr to the arguments.                */
-	                (thread_sched_t *) args;
+void *thread_func(void *args)
+{				/* arguments to the thread function           */
+	static int max_priority;	/* max possible priority for a process.       */
+	static int min_priority;	/* min possible priority for a process.       */
+	static int set_priority;	/* set the priority of the proc by this value. */
+	static int get_priority;	/* get the priority that is set for this proc. */
+	static int procnum;	/* processor number last executed on.         */
+	static int sched_policy;	/* scheduling policy as set by user/default   */
+	struct sched_param ssp;	/* set schedule priority.                     */
+	struct sched_param gsp;	/* gsp schedule priority.                     */
+	struct timeb tptr;	/* tptr.millitm will be used to seed srand.   */
+	thread_sched_t *locargptr =	/* local ptr to the arguments.                */
+	    (thread_sched_t *) args;
 
-    /* Get the system max and min static priority for a process. */
-    if (((max_priority = sched_get_priority_max(SCHED_FIFO)) == -1) ||
-         ((min_priority = sched_get_priority_min(SCHED_FIFO)) == -1))
-    {
-        fprintf(stderr, "failed to get static priority range\n");
-	dprt("pid[%d]: exiting with -1\n", getpid());
-	pthread_exit((void*)-1);
-    }
+	/* Get the system max and min static priority for a process. */
+	if (((max_priority = sched_get_priority_max(SCHED_FIFO)) == -1) ||
+	    ((min_priority = sched_get_priority_min(SCHED_FIFO)) == -1)) {
+		fprintf(stderr, "failed to get static priority range\n");
+		dprt("pid[%d]: exiting with -1\n", getpid());
+		pthread_exit((void *)-1);
+	}
 
-    if ((sched_policy = locargptr->s_policy) == SCHED_OTHER)
-        ssp.sched_priority = 0;
-    else
-    {
-        /* Set a random value between max_priority and min_priority */
-        ftime(&tptr);
-        srand((tptr.millitm)%1000);
-        set_priority = (min_priority + (int)((float)max_priority
-		        * rand()/(RAND_MAX+1.0)));
-        ssp.sched_priority = set_priority;
-    }
+	if ((sched_policy = locargptr->s_policy) == SCHED_OTHER)
+		ssp.sched_priority = 0;
+	else {
+		/* Set a random value between max_priority and min_priority */
+		ftime(&tptr);
+		srand((tptr.millitm) % 1000);
+		set_priority = (min_priority + (int)((float)max_priority
+						     * rand() / (RAND_MAX +
+								 1.0)));
+		ssp.sched_priority = set_priority;
+	}
 
-    /* give other threads a chance */
-    usleep(8);
+	/* give other threads a chance */
+	usleep(8);
 
-    /* set a random priority value and check if this value was honoured. */
-    if ((sched_setscheduler(getpid(), sched_policy, &ssp)) == -1)
-    {
-        perror("main(): sched_setscheduler()");
-	dprt("pid[%d]: exiting with -1\n", getpid());
-        pthread_exit((void*)-1);
-    }
+	/* set a random priority value and check if this value was honoured. */
+	if ((sched_setscheduler(getpid(), sched_policy, &ssp)) == -1) {
+		perror("main(): sched_setscheduler()");
+		dprt("pid[%d]: exiting with -1\n", getpid());
+		pthread_exit((void *)-1);
+	}
 
-    /* processor number this process last executed on */
-    if ((procnum = get_proc_num()) == -1)
-    {
-        fprintf(stderr, "main(): get_proc_num() failed\n");
-	dprt("pid[%d]: exiting with -1\n", getpid());
-        pthread_exit((void*)-1);
-    }
+	/* processor number this process last executed on */
+	if ((procnum = get_proc_num()) == -1) {
+		fprintf(stderr, "main(): get_proc_num() failed\n");
+		dprt("pid[%d]: exiting with -1\n", getpid());
+		pthread_exit((void *)-1);
+	}
 
-    if ((get_priority = sched_getparam(getpid(), &gsp)) == -1)
-    {
-        perror("main(): sched_setscheduler()");
-	dprt("pid[%d]: exiting with -1\n", getpid());
-        pthread_exit((void*)-1);
-    }
+	if ((get_priority = sched_getparam(getpid(), &gsp)) == -1) {
+		perror("main(): sched_setscheduler()");
+		dprt("pid[%d]: exiting with -1\n", getpid());
+		pthread_exit((void *)-1);
+	}
 
-    /* processor number this process last executed on */
-    if ((procnum = get_proc_num()) == -1)
-    {
-        fprintf(stderr, "main(): get_proc_num() failed\n");
-	dprt("pid[%d]: exiting with -1\n", getpid());
-        pthread_exit((void*)-1);
-    }
+	/* processor number this process last executed on */
+	if ((procnum = get_proc_num()) == -1) {
+		fprintf(stderr, "main(): get_proc_num() failed\n");
+		dprt("pid[%d]: exiting with -1\n", getpid());
+		pthread_exit((void *)-1);
+	}
 
-    if (verbose)
-    {
-        fprintf(stdout,
-            "PID of this task         = %d\n"
-	    "Max priority             = %d\n"
-	    "Min priority             = %d\n"
-            "Expected priority        = %d\n"
-            "Actual assigned priority = %d\n"
-            "Processor last execed on = %d\n\n", getpid(),
-	     max_priority, min_priority, set_priority,
-	     gsp.sched_priority, procnum);
-    }
+	if (verbose) {
+		fprintf(stdout,
+			"PID of this task         = %d\n"
+			"Max priority             = %d\n"
+			"Min priority             = %d\n"
+			"Expected priority        = %d\n"
+			"Actual assigned priority = %d\n"
+			"Processor last execed on = %d\n\n", getpid(),
+			max_priority, min_priority, set_priority,
+			gsp.sched_priority, procnum);
+	}
 
-    locargptr->exp_prio = set_priority;
-    locargptr->act_prio = gsp.sched_priority;
-    locargptr->proc_num = procnum;
-    locargptr->procs_id = getpid();
+	locargptr->exp_prio = set_priority;
+	locargptr->act_prio = gsp.sched_priority;
+	locargptr->proc_num = procnum;
+	locargptr->procs_id = getpid();
 
-    dprt("pid[%d]: exiting with %ld\n", getpid(),locargptr);
-    pthread_exit((void*)locargptr);
+	dprt("pid[%d]: exiting with %ld\n", getpid(), locargptr);
+	pthread_exit((void *)locargptr);
 }
 
 /******************************************************************************/
@@ -296,204 +286,178 @@
 /*		exits with  0 - on success.				      */
 /*                                                                            */
 /******************************************************************************/
-int
-main(int  argc,		/* number of input parameters.			      */
-     char **argv)	/* pointer to the command line arguments.	      */
-{
-    int       c;	        /* command line options.		      */
-    int       proc_ndx;		/* number of time to repete the loop.         */
-    int       pid_ndx;		/* number of time to repete the loop.         */
-    int       num_cpus = UP;    /* assume machine is an UP machine.           */
-    int	      num_thrd = MAXT;  /* number of threads to create.               */
-    int	      thrd_ndx;	        /* index into the array of threads.	      */
-    int	      exp_prio[PIDS];   /* desired priority, random value.            */
-    int       act_prio[PIDS];   /* priority actually set.                     */
-    int       gen_pid[PIDS];    /* pid of the processes on this processor.    */
-    int       proc_id[PIDS];    /* id of the processor last execed on.        */
-    int       spcy = SCHED_FIFO;/* scheduling policy for the tasks.           */
-    pthread_t thid[PIDS];	/* pids of process or threads spawned         */
-    thread_sched_t *chld_args;	/* arguments to funcs execed by child process.*/
-    thread_sched_t *status;     /* exit status for light weight process.      */
-    extern  char *optarg;	/* arguments passed to each option.	      */
-    thread_sched_t **args_table; /* pointer table of arguments address         */
-    thread_sched_t **status_table; /*pointer table of status address          */
+int main(int argc,		/* number of input parameters.                        */
+	 char **argv)
+{				/* pointer to the command line arguments.       */
+	int c;			/* command line options.                      */
+	int proc_ndx;		/* number of time to repete the loop.         */
+	int pid_ndx;		/* number of time to repete the loop.         */
+	int num_cpus = UP;	/* assume machine is an UP machine.           */
+	int num_thrd = MAXT;	/* number of threads to create.               */
+	int thrd_ndx;		/* index into the array of threads.           */
+	int exp_prio[PIDS];	/* desired priority, random value.            */
+	int act_prio[PIDS];	/* priority actually set.                     */
+	int gen_pid[PIDS];	/* pid of the processes on this processor.    */
+	int proc_id[PIDS];	/* id of the processor last execed on.        */
+	int spcy = SCHED_FIFO;	/* scheduling policy for the tasks.           */
+	pthread_t thid[PIDS];	/* pids of process or threads spawned         */
+	thread_sched_t *chld_args;	/* arguments to funcs execed by child process. */
+	thread_sched_t *status;	/* exit status for light weight process.      */
+	extern char *optarg;	/* arguments passed to each option.           */
+	thread_sched_t **args_table;	/* pointer table of arguments address         */
+	thread_sched_t **status_table;	/*pointer table of status address          */
 
-    if (getuid() != 0)
-    {
-        fprintf(stderr,
-            "ERROR: Only root user can run this program.\n");
-        usage(argv[0]);
-    }
-
-    if (argc < 2)
-    {
-        fprintf(stderr,
-            "ERROR: Enter a value for the number of CPUS\n");
-        usage(argv[0]);
-    }
-
-    while ((c = getopt(argc, argv, "c:hp:t:v")) != -1)
-    {
-        switch(c)
-        {
-            case 'c':   /* number of processors. no default. */
-                if ((num_cpus = atoi(optarg)) == 0)
-                    OPT_MISSING(argv[0], optopt);
-                else
-                if (num_cpus < 0)
-                {
-                    fprintf(stdout,
-                        "WARNING: Bad argument -p %d. Using default\n",
-			 num_cpus);
-                    num_cpus = UP;
-                }
-                /* MAXT threads per cpu. */
-                num_thrd = num_thrd * num_cpus;
-                break;
-            case 'h':	/* usage message */
+	if (getuid() != 0) {
+		fprintf(stderr,
+			"ERROR: Only root user can run this program.\n");
 		usage(argv[0]);
-                break;
-            case 'p':   /* schedular policy. default SCHED_FIFO */
-	        if (strncmp(optarg, "fifo", 4) == 0)
-                    spcy = SCHED_FIFO;
-		else
-                if (strncmp(optarg, "rr", 2) == 0)
-                    spcy = SCHED_RR;
-		else
-                if (strncmp(optarg, "other", 5) == 0)
-                    spcy = SCHED_OTHER;
-		else
-                {
-                    fprintf(stderr, "ERROR: Unrecognized scheduler policy,"
-				    "using default\n");
-		    usage(argv[0]);
-                }
-		break;
-            case 't':	/* input how many threads to create */
-                if ((num_thrd = atoi(optarg)) == 0)
-		    OPT_MISSING(argv[0], optopt);
-                else
-                if (num_thrd < 0)
-                {
-                    fprintf(stderr,
-                        "WARNING: Bad argument -t %d. Using default\n",
-			 num_thrd);
-                    num_thrd = MAXT;
-                }
-		else
-                if (num_thrd > PIDS)
-                {
-                    fprintf(stderr,
-                        "WARNING: -t %d exceeds maximum number of allowed pids"
-                        " %d\n Setting number of threads to %d\n", num_thrd,
-			  PIDS, PIDS - 1000);
-                          num_thrd = (PIDS - 1000);
-                }
-                break;
-            case 'v':	/* verbose out put, make output look ugly! */
-                verbose = 1;
-                break;
-            default :
-	        usage(argv[0]);
- 	        break;
-        }
-    }
+	}
 
-    /* create num_thrd number of threads. */
-    args_table = malloc(num_thrd * sizeof(thread_sched_t*));
-    if (!args_table)
-    {
-            perror("main(): malloc failed");
-            exit(-1);
-    }
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        args_table[thrd_ndx] = malloc(sizeof(thread_sched_t));
-        if (!args_table[thrd_ndx])
-        {
-            perror("main(): malloc failed");
-            exit(-1);
-        }
-        chld_args = args_table[thrd_ndx];
-	chld_args->s_policy = spcy;
-        if (pthread_create(&thid[thrd_ndx], NULL, thread_func,
-		chld_args))
-        {
-            fprintf(stderr, "ERROR: creating task number: %d\n", thrd_ndx);
-            perror("main(): pthread_create()");
-            exit(-1);
-        }
-        if (verbose)
-            fprintf(stdout, "Created thread[%d]\n", thrd_ndx);
-        usleep(9);
-        sched_yield();
-    }
+	if (argc < 2) {
+		fprintf(stderr,
+			"ERROR: Enter a value for the number of CPUS\n");
+		usage(argv[0]);
+	}
 
-    /* wait for the children to terminate */
-    status_table = malloc(num_thrd * sizeof(thread_sched_t*));
-    if (!status_table)
-    {
-            perror("main(): malloc failed");
-            exit(-1);
-    }
-    for (thrd_ndx = 0; thrd_ndx<num_thrd; thrd_ndx++)
-    {
-        status_table[thrd_ndx] = malloc(sizeof(thread_sched_t));
-        if (!status_table[thrd_ndx])
-        {
-            perror("main(): malloc failed");
-            exit(-1);
-        }
-        status = status_table[thrd_ndx];
-        if (pthread_join(thid[thrd_ndx], (void **)&status))
-        {
-            perror("main(): pthread_join()");
-            exit(-1);
-        }
-        else
-        {
-            if (status == (thread_sched_t *)-1)
-            {
-                fprintf(stderr,
-		    "thread [%d] - process exited with errors %d\n",
-                     thrd_ndx, WEXITSTATUS(status));
-	        exit(-1);
-            }
-            else
-            {
-                exp_prio[thrd_ndx] = status->exp_prio;
-                act_prio[thrd_ndx] = status->act_prio;
-                proc_id[thrd_ndx] =  status->proc_num;
-                gen_pid[thrd_ndx] =  status->procs_id;
-            }
-        }
-	SAFE_FREE(args_table[thrd_ndx]);
-        SAFE_FREE(status_table[thrd_ndx]);
-        usleep(10);
-    }
+	while ((c = getopt(argc, argv, "c:hp:t:v")) != -1) {
+		switch (c) {
+		case 'c':	/* number of processors. no default. */
+			if ((num_cpus = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_cpus < 0) {
+				fprintf(stdout,
+					"WARNING: Bad argument -p %d. Using default\n",
+					num_cpus);
+				num_cpus = UP;
+			}
+			/* MAXT threads per cpu. */
+			num_thrd = num_thrd * num_cpus;
+			break;
+		case 'h':	/* usage message */
+			usage(argv[0]);
+			break;
+		case 'p':	/* schedular policy. default SCHED_FIFO */
+			if (strncmp(optarg, "fifo", 4) == 0)
+				spcy = SCHED_FIFO;
+			else if (strncmp(optarg, "rr", 2) == 0)
+				spcy = SCHED_RR;
+			else if (strncmp(optarg, "other", 5) == 0)
+				spcy = SCHED_OTHER;
+			else {
+				fprintf(stderr,
+					"ERROR: Unrecognized scheduler policy,"
+					"using default\n");
+				usage(argv[0]);
+			}
+			break;
+		case 't':	/* input how many threads to create */
+			if ((num_thrd = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_thrd < 0) {
+				fprintf(stderr,
+					"WARNING: Bad argument -t %d. Using default\n",
+					num_thrd);
+				num_thrd = MAXT;
+			} else if (num_thrd > PIDS) {
+				fprintf(stderr,
+					"WARNING: -t %d exceeds maximum number of allowed pids"
+					" %d\n Setting number of threads to %d\n",
+					num_thrd, PIDS, PIDS - 1000);
+				num_thrd = (PIDS - 1000);
+			}
+			break;
+		case 'v':	/* verbose out put, make output look ugly! */
+			verbose = 1;
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
+	}
 
-    if (verbose)
-    {
-       fprintf(stdout,
-           "Number of tasks spawned: %d\n"
-	   "Number of CPUs:          %d\n"
-	   "Scheduling policy:       %d\n", num_thrd, num_cpus, spcy);
-    }
+	/* create num_thrd number of threads. */
+	args_table = malloc(num_thrd * sizeof(thread_sched_t *));
+	if (!args_table) {
+		perror("main(): malloc failed");
+		exit(-1);
+	}
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		args_table[thrd_ndx] = malloc(sizeof(thread_sched_t));
+		if (!args_table[thrd_ndx]) {
+			perror("main(): malloc failed");
+			exit(-1);
+		}
+		chld_args = args_table[thrd_ndx];
+		chld_args->s_policy = spcy;
+		if (pthread_create(&thid[thrd_ndx], NULL, thread_func,
+				   chld_args)) {
+			fprintf(stderr, "ERROR: creating task number: %d\n",
+				thrd_ndx);
+			perror("main(): pthread_create()");
+			exit(-1);
+		}
+		if (verbose)
+			fprintf(stdout, "Created thread[%d]\n", thrd_ndx);
+		usleep(9);
+		sched_yield();
+	}
 
-    SAFE_FREE(args_table);
-    SAFE_FREE(status_table);
+	/* wait for the children to terminate */
+	status_table = malloc(num_thrd * sizeof(thread_sched_t *));
+	if (!status_table) {
+		perror("main(): malloc failed");
+		exit(-1);
+	}
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		status_table[thrd_ndx] = malloc(sizeof(thread_sched_t));
+		if (!status_table[thrd_ndx]) {
+			perror("main(): malloc failed");
+			exit(-1);
+		}
+		status = status_table[thrd_ndx];
+		if (pthread_join(thid[thrd_ndx], (void **)&status)) {
+			perror("main(): pthread_join()");
+			exit(-1);
+		} else {
+			if (status == (thread_sched_t *) - 1) {
+				fprintf(stderr,
+					"thread [%d] - process exited with errors %d\n",
+					thrd_ndx, WEXITSTATUS(status));
+				exit(-1);
+			} else {
+				exp_prio[thrd_ndx] = status->exp_prio;
+				act_prio[thrd_ndx] = status->act_prio;
+				proc_id[thrd_ndx] = status->proc_num;
+				gen_pid[thrd_ndx] = status->procs_id;
+			}
+		}
+		SAFE_FREE(args_table[thrd_ndx]);
+		SAFE_FREE(status_table[thrd_ndx]);
+		usleep(10);
+	}
 
-    for (proc_ndx = 0; proc_ndx < num_cpus; proc_ndx++)
-    {
-        fprintf(stdout, "For processor number = %d\n", proc_ndx);
-        fprintf(stdout, "%s\n", "===========================");
-        for (pid_ndx = 0; pid_ndx < num_thrd; pid_ndx++)
-        {
-            if (proc_id[pid_ndx] == proc_ndx)
-		    fprintf(stdout, "pid of task = %d priority requested = %d"
-                                    " priority assigned by scheduler = %d\n",
-                        gen_pid[pid_ndx], exp_prio[pid_ndx], act_prio[pid_ndx]);
-        }
-    }
-    exit(0);
+	if (verbose) {
+		fprintf(stdout,
+			"Number of tasks spawned: %d\n"
+			"Number of CPUs:          %d\n"
+			"Scheduling policy:       %d\n", num_thrd, num_cpus,
+			spcy);
+	}
+
+	SAFE_FREE(args_table);
+	SAFE_FREE(status_table);
+
+	for (proc_ndx = 0; proc_ndx < num_cpus; proc_ndx++) {
+		fprintf(stdout, "For processor number = %d\n", proc_ndx);
+		fprintf(stdout, "%s\n", "===========================");
+		for (pid_ndx = 0; pid_ndx < num_thrd; pid_ndx++) {
+			if (proc_id[pid_ndx] == proc_ndx)
+				fprintf(stdout,
+					"pid of task = %d priority requested = %d"
+					" priority assigned by scheduler = %d\n",
+					gen_pid[pid_ndx], exp_prio[pid_ndx],
+					act_prio[pid_ndx]);
+		}
+	}
+	exit(0);
 }
diff --git a/testcases/kernel/security/cap_bound/cap_bounds_r.c b/testcases/kernel/security/cap_bound/cap_bounds_r.c
index 97c0ca9..d511155 100644
--- a/testcases/kernel/security/cap_bound/cap_bounds_r.c
+++ b/testcases/kernel/security/cap_bound/cap_bounds_r.c
@@ -34,7 +34,7 @@
 #include "test.h"
 
 char *TCID = "cap_bounds_r";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int main(int argc, char *argv[])
 {
@@ -42,7 +42,7 @@
 	int ret = 1;
 	int i;
 
-	for (i=0; i<=CAP_LAST_CAP; i++) {
+	for (i = 0; i <= CAP_LAST_CAP; i++) {
 #if HAVE_DECL_PR_CAPBSET_READ
 		ret = prctl(PR_CAPBSET_READ, i);
 #else
@@ -50,7 +50,9 @@
 		ret = -1;
 #endif
 		if (ret != 1) {
-			tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, %d) returned %d\n", i, ret);
+			tst_resm(TFAIL,
+				 "prctl(PR_CAPBSET_READ, %d) returned %d\n", i,
+				 ret);
 			if (ret == -1)
 				tst_resm(TINFO, "errno was %d\n", errno);
 			tst_exit();
@@ -63,7 +65,8 @@
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, -1) returned %d\n", ret);
+		tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, -1) returned %d\n",
+			 ret);
 		tst_exit();
 	}
 
@@ -74,14 +77,16 @@
 #define INSANE 63
 #define max(x,y) (x > y ? x : y)
 #if HAVE_DECL_PR_CAPBSET_READ
-	ret = prctl(PR_CAPBSET_READ, max(INSANE,CAP_LAST_CAP+1));
+	ret = prctl(PR_CAPBSET_READ, max(INSANE, CAP_LAST_CAP + 1));
 #else
 	errno = ENOSYS;
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, %d) returned %d\n", CAP_LAST_CAP+1, ret);
-		tst_resm(TINFO, " %d is CAP_LAST_CAP+1 and should not exist\n", CAP_LAST_CAP+1);
+		tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, %d) returned %d\n",
+			 CAP_LAST_CAP + 1, ret);
+		tst_resm(TINFO, " %d is CAP_LAST_CAP+1 and should not exist\n",
+			 CAP_LAST_CAP + 1);
 		tst_exit();
 	}
 	tst_resm(TPASS, "PR_CAPBSET_READ tests passed\n");
diff --git a/testcases/kernel/security/cap_bound/cap_bounds_rw.c b/testcases/kernel/security/cap_bound/cap_bounds_rw.c
index b7acb66..8b23ff8 100644
--- a/testcases/kernel/security/cap_bound/cap_bounds_rw.c
+++ b/testcases/kernel/security/cap_bound/cap_bounds_rw.c
@@ -33,7 +33,7 @@
 #include "test.h"
 
 char *TCID = "cap_bounds_rw";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int check_remaining_caps(int lastdropped)
 {
@@ -48,11 +48,14 @@
 		ret = -1;
 #endif
 		if (ret == -1) {
-			tst_resm(TBROK, "Failed to read bounding set during sanity check\n");
+			tst_resm(TBROK,
+				 "Failed to read bounding set during sanity check\n");
 			tst_exit();
 		}
 		if (ret == 1) {
-			tst_resm(TFAIL, "Bit %d should have been dropped but wasn't\n", i);
+			tst_resm(TFAIL,
+				 "Bit %d should have been dropped but wasn't\n",
+				 i);
 			return i;
 		}
 	}
@@ -65,11 +68,14 @@
 		ret = -1;
 #endif
 		if (ret == -1) {
-			tst_resm(TBROK, "Failed to read bounding set during sanity check\n");
+			tst_resm(TBROK,
+				 "Failed to read bounding set during sanity check\n");
 			tst_exit();
 		}
 		if (ret == 0) {
-			tst_resm(TFAIL, "Bit %d wasn't yet dropped, but isn't in bounding set\n", i);
+			tst_resm(TFAIL,
+				 "Bit %d wasn't yet dropped, but isn't in bounding set\n",
+				 i);
 			return -i;
 		}
 	}
@@ -90,7 +96,8 @@
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, -1) returned %d\n", ret);
+		tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, -1) returned %d\n",
+			 ret);
 		tst_exit();
 	}
 	/* Ideally I'd check CAP_LAST_CAP+1, but userspace
@@ -100,14 +107,16 @@
 #define INSANE 63
 #define max(x,y) (x > y ? x : y)
 #if HAVE_DECL_PR_CAPBSET_DROP
-	ret = prctl(PR_CAPBSET_DROP, max(INSANE,CAP_LAST_CAP+1));
+	ret = prctl(PR_CAPBSET_DROP, max(INSANE, CAP_LAST_CAP + 1));
 #else
 	errno = ENOSYS;
 	ret = -1;
 #endif
 	if (ret != -1) {
-		tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, %d) returned %d\n", max(INSANE, CAP_LAST_CAP+1), ret);
-		tst_resm(TINFO, " %d is should not exist\n", max(INSANE, CAP_LAST_CAP+1));
+		tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, %d) returned %d\n",
+			 max(INSANE, CAP_LAST_CAP + 1), ret);
+		tst_resm(TINFO, " %d is should not exist\n",
+			 max(INSANE, CAP_LAST_CAP + 1));
 		tst_exit();
 	}
 	for (i = 0; i <= CAP_LAST_CAP; i++) {
@@ -118,19 +127,23 @@
 		ret = -1;
 #endif
 		if (ret != 0) {
-			tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, %d) returned %d\n", i, ret);
+			tst_resm(TFAIL,
+				 "prctl(PR_CAPBSET_DROP, %d) returned %d\n", i,
+				 ret);
 			if (ret == -1)
 				tst_resm(TINFO, "errno was %d\n", errno);
 			tst_exit();
 		}
 		ret = check_remaining_caps(i);
 		if (ret > 0) {
-			tst_resm(TFAIL, "after dropping bits 0..%d, %d was still in bounding set\n",
-				i, ret);
+			tst_resm(TFAIL,
+				 "after dropping bits 0..%d, %d was still in bounding set\n",
+				 i, ret);
 			tst_exit();
 		} else if (ret < 0) {
-			tst_resm(TFAIL, "after dropping bits 0..%d, %d was not in bounding set\n",
-				i, -ret);
+			tst_resm(TFAIL,
+				 "after dropping bits 0..%d, %d was not in bounding set\n",
+				 i, -ret);
 			tst_exit();
 		}
 	}
diff --git a/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c b/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
index e0e7de6..da982ca 100644
--- a/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
+++ b/testcases/kernel/security/cap_bound/cap_bset_inh_bounds.c
@@ -36,7 +36,7 @@
 #include "test.h"
 
 char *TCID = "cap_bounds_r";
-int TST_TOTAL=2;
+int TST_TOTAL = 2;
 
 int main(int argc, char *argv[])
 {
@@ -59,13 +59,16 @@
 	/* Make sure it's in pI */
 	cur = cap_from_text("all=eip");
 	if (!cur) {
-		tst_resm(TBROK, "Failed to create cap_sys_admin+i cap_t (errno %d)\n", errno);
+		tst_resm(TBROK,
+			 "Failed to create cap_sys_admin+i cap_t (errno %d)\n",
+			 errno);
 		tst_exit();
 	}
 	ret = cap_set_proc(cur);
 	if (ret) {
-		tst_resm(TBROK, "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
-			ret, errno);
+		tst_resm(TBROK,
+			 "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
+			 ret, errno);
 		tst_exit();
 	}
 	cap_free(cur);
@@ -80,7 +83,8 @@
 	/* drop the capability from bounding set */
 	ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
 	if (ret) {
-		tst_resm(TFAIL, "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
+		tst_resm(TFAIL,
+			 "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
 		tst_resm(TINFO, "(ret=%d, errno %d)\n", ret, errno);
 		tst_exit();
 	}
@@ -89,10 +93,12 @@
 	cur = cap_get_proc();
 	ret = cap_get_flag(cur, CAP_SYS_ADMIN, CAP_INHERITABLE, &f);
 	if (ret || f != CAP_SET) {
-		tst_resm(TFAIL, "CAP_SYS_ADMIN not in pI after dropping from bounding set\n");
+		tst_resm(TFAIL,
+			 "CAP_SYS_ADMIN not in pI after dropping from bounding set\n");
 		tst_exit();
 	}
-	tst_resm(TPASS, "CAP_SYS_ADMIN remains in pI after removing from bounding set\n");
+	tst_resm(TPASS,
+		 "CAP_SYS_ADMIN remains in pI after removing from bounding set\n");
 
 	tmpcap = cap_dup(cur);
 	v[0] = CAP_SYS_ADMIN;
@@ -109,13 +115,15 @@
 	cap_free(tmpcap);
 	/* test 2: can we put it back in pI? */
 	ret = cap_set_proc(cur);
-	if (ret == 0) { /* success means pI was not bounded by X */
-		tst_resm(TFAIL, "Managed to put CAP_SYS_ADMIN back into pI though not in X\n");
+	if (ret == 0) {		/* success means pI was not bounded by X */
+		tst_resm(TFAIL,
+			 "Managed to put CAP_SYS_ADMIN back into pI though not in X\n");
 		tst_exit();
 	}
 	cap_free(cur);
 
-	tst_resm(TPASS, "Couldn't put CAP_SYS_ADMIN back into pI when not in bounding set\n");
+	tst_resm(TPASS,
+		 "Couldn't put CAP_SYS_ADMIN back into pI when not in bounding set\n");
 #else /* HAVE_LIBCAP */
 	tst_resm(TCONF, "System doesn't have POSIX capabilities.");
 #endif
diff --git a/testcases/kernel/security/cap_bound/check_pe.c b/testcases/kernel/security/cap_bound/check_pe.c
index fc80335..3fb30ec 100644
--- a/testcases/kernel/security/cap_bound/check_pe.c
+++ b/testcases/kernel/security/cap_bound/check_pe.c
@@ -37,7 +37,7 @@
 #include "test.h"
 
 char *TCID = "check_pe";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int main(int argc, char *argv[])
 {
diff --git a/testcases/kernel/security/cap_bound/dummy.c b/testcases/kernel/security/cap_bound/dummy.c
index cb58259..46fbe57 100644
--- a/testcases/kernel/security/cap_bound/dummy.c
+++ b/testcases/kernel/security/cap_bound/dummy.c
@@ -8,7 +8,7 @@
 #endif
 
 char *TCID = "dummy";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int main(void)
 {
diff --git a/testcases/kernel/security/cap_bound/exec_with_inh.c b/testcases/kernel/security/cap_bound/exec_with_inh.c
index 8ca29c7..2050311 100644
--- a/testcases/kernel/security/cap_bound/exec_with_inh.c
+++ b/testcases/kernel/security/cap_bound/exec_with_inh.c
@@ -36,7 +36,7 @@
 #include "test.h"
 
 char *TCID = "exec_with_inh";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int main(int argc, char *argv[])
 {
@@ -49,13 +49,16 @@
 	/* Make sure CAP_SYS_ADMIN is in pI */
 	cur = cap_from_text("all=eip");
 	if (!cur) {
-		tst_resm(TBROK, "Failed to create cap_sys_admin+i cap_t (errno %d)\n", errno);
+		tst_resm(TBROK,
+			 "Failed to create cap_sys_admin+i cap_t (errno %d)\n",
+			 errno);
 		tst_exit();
 	}
 	ret = cap_set_proc(cur);
 	if (ret) {
-		tst_resm(TBROK, "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
-			ret, errno);
+		tst_resm(TBROK,
+			 "Failed to cap_set_proc with cap_sys_admin+i (ret %d errno %d)\n",
+			 ret, errno);
 		tst_exit();
 	}
 	cap_free(cur);
@@ -70,7 +73,8 @@
 	/* drop the capability from bounding set */
 	ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
 	if (ret) {
-		tst_resm(TFAIL, "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
+		tst_resm(TFAIL,
+			 "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
 		tst_resm(TINFO, "(ret=%d, errno %d)\n", ret, errno);
 		tst_exit();
 	}
diff --git a/testcases/kernel/security/cap_bound/exec_without_inh.c b/testcases/kernel/security/cap_bound/exec_without_inh.c
index c36ea19..f27b831 100644
--- a/testcases/kernel/security/cap_bound/exec_without_inh.c
+++ b/testcases/kernel/security/cap_bound/exec_without_inh.c
@@ -36,7 +36,7 @@
 #include "test.h"
 
 char *TCID = "exec_without_inh";
-int TST_TOTAL=1;
+int TST_TOTAL = 1;
 
 int main(int argc, char *argv[])
 {
@@ -56,7 +56,8 @@
 		if (!ret)
 			ret = cap_set_proc(cur);
 		if (ret) {
-			tst_resm(TBROK, "Failed to drop cap_sys_admin from pI\n");
+			tst_resm(TBROK,
+				 "Failed to drop cap_sys_admin from pI\n");
 			tst_exit();
 		}
 	} else if (ret) {
@@ -68,7 +69,8 @@
 	/* drop the capability from bounding set */
 	ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
 	if (ret) {
-		tst_resm(TFAIL, "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
+		tst_resm(TFAIL,
+			 "Failed to drop CAP_SYS_ADMIN from bounding set.\n");
 		tst_resm(TINFO, "(ret=%d, errno %d)\n", ret, errno);
 		tst_exit();
 	}
diff --git a/testcases/kernel/security/filecaps/inh_capped.c b/testcases/kernel/security/filecaps/inh_capped.c
index b13ba9b..dd94832 100644
--- a/testcases/kernel/security/filecaps/inh_capped.c
+++ b/testcases/kernel/security/filecaps/inh_capped.c
@@ -98,7 +98,7 @@
 	debug_print_caps("after second drop cap_sys_admin");
 	if (ret) {
 		tst_resm(TFAIL, "failed to drop capsysadmin from pI "
-				"after dropping cappset from pE");
+			 "after dropping cappset from pE");
 		tst_exit();
 	}
 
@@ -110,7 +110,7 @@
 	}
 
 	tst_resm(TFAIL, "succeeded raising capsysadmin in pI "
-			"without having setpcap");
+		 "without having setpcap");
 #else
 	tst_resm(TCONF, "System doesn't have POSIX capabilities support.");
 #endif
diff --git a/testcases/kernel/security/filecaps/print_caps.c b/testcases/kernel/security/filecaps/print_caps.c
index 0ccb4c3..ee7a5f5 100644
--- a/testcases/kernel/security/filecaps/print_caps.c
+++ b/testcases/kernel/security/filecaps/print_caps.c
@@ -62,7 +62,7 @@
 	}
 
 	snprintf(buf, 2000, "%d.%s", seqno, cap_to_text(cap, NULL));
-	write(fd, buf, strlen(buf)+1);
+	write(fd, buf, strlen(buf) + 1);
 	close(fd);
 
 	cap_free(cap);
diff --git a/testcases/kernel/security/filecaps/verify_caps_exec.c b/testcases/kernel/security/filecaps/verify_caps_exec.c
index eea993a..1a6dce6 100644
--- a/testcases/kernel/security/filecaps/verify_caps_exec.c
+++ b/testcases/kernel/security/filecaps/verify_caps_exec.c
@@ -86,7 +86,8 @@
 		cap_t cap = cap_from_text("=eip");
 		int ret;
 		if (!cap)
-			tst_brkm(TBROK | TERRNO, NULL, "cap_from_text failed\n");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "cap_from_text failed\n");
 		ret = cap_set_proc(cap);
 		if (ret < 0)
 			tst_brkm(TBROK | TERRNO, NULL, "cap_set_proc failed\n");
@@ -125,7 +126,8 @@
 
 	ret = mkfifo(FIFOFILE, S_IRWXU | S_IRWXG | S_IRWXO);
 	if (ret == -1 && errno != EEXIST)
-		tst_brkm(TFAIL | TERRNO, NULL, "failed creating %s\n", FIFOFILE);
+		tst_brkm(TFAIL | TERRNO, NULL, "failed creating %s\n",
+			 FIFOFILE);
 }
 
 void write_to_fifo(char *buf)
@@ -180,18 +182,21 @@
 			c = sscanf(buf, "%d", &s);
 			if (c == 1 && s == seqno)
 				break;
-			tst_resm(TINFO, "got a bad seqno (c=%d, s=%d, seqno=%d)",
-				 c, s, seqno);
+			tst_resm(TINFO,
+				 "got a bad seqno (c=%d, s=%d, seqno=%d)", c, s,
+				 seqno);
 		}
 		p = index(buf, '.');
 		if (!p)
-			tst_brkm(TFAIL, NULL, "got a bad message from print_caps\n");
+			tst_brkm(TFAIL, NULL,
+				 "got a bad message from print_caps\n");
 		p += 1;
 		actual_caps = cap_from_text(p);
 		if (cap_compare(actual_caps, expected_caps) != 0) {
 			capstxt = cap_to_text(expected_caps, NULL);
-			tst_resm(TINFO, "Expected to run as .%s., ran as .%s..\n",
-				capstxt, p);
+			tst_resm(TINFO,
+				 "Expected to run as .%s., ran as .%s..\n",
+				 capstxt, p);
 			tst_resm(TINFO, "those are not the same\n");
 			cap_free(capstxt);
 			ret = -1;
@@ -204,7 +209,7 @@
 
 int caps_actually_set_test(void)
 {
-	int  whichcap, finalret = 0, ret;
+	int whichcap, finalret = 0, ret;
 	cap_t fcap, pcap, cap_fullpi;
 	cap_value_t capvalue[1];
 	int i;
@@ -220,7 +225,7 @@
 
 	int num_caps;
 
-	for (num_caps = 0; ; num_caps++) {
+	for (num_caps = 0;; num_caps++) {
 		ret = prctl(PR_CAPBSET_READ, num_caps);
 		/*
 		 * Break from the loop in this manner to avoid incrementing,
@@ -246,8 +251,9 @@
 		}
 		ret = fork_drop_and_exec(DROP_PERMS, fcap);
 		if (ret) {
-			tst_resm(TINFO, "Failed CAP_PERMITTED=%d CAP_EFFECTIVE=0\n",
-					whichcap);
+			tst_resm(TINFO,
+				 "Failed CAP_PERMITTED=%d CAP_EFFECTIVE=0\n",
+				 whichcap);
 			if (!finalret)
 				finalret = ret;
 		}
@@ -267,8 +273,9 @@
 		}
 		ret = fork_drop_and_exec(DROP_PERMS, fcap);
 		if (ret) {
-			tst_resm(TINFO, "Failed CAP_PERMITTED=%d CAP_EFFECTIVE=1\n",
-				whichcap);
+			tst_resm(TINFO,
+				 "Failed CAP_PERMITTED=%d CAP_EFFECTIVE=1\n",
+				 whichcap);
 			if (!finalret)
 				finalret = ret;
 		}
@@ -321,10 +328,10 @@
 			tst_resm(TINFO, "%d\n", whichcap);
 			continue;
 		}
-		ret = fork_drop_and_exec(KEEP_PERMS,  pcap);
+		ret = fork_drop_and_exec(KEEP_PERMS, pcap);
 		if (ret) {
 			tst_resm(TINFO, "Failed with_perms CAP_INHERITABLE=%d "
-					"CAP_EFFECTIVE=0\n", whichcap);
+				 "CAP_EFFECTIVE=0\n", whichcap);
 			if (!finalret)
 				finalret = ret;
 		}
@@ -354,7 +361,7 @@
 		cap_free(cmpcap);
 		if (ret) {
 			tst_resm(TINFO, "Failed with_perms CAP_INHERITABLE=%d "
-					"CAP_EFFECTIVE=1\n", whichcap);
+				 "CAP_EFFECTIVE=1\n", whichcap);
 			if (!finalret)
 				finalret = ret;
 		}
@@ -367,8 +374,9 @@
 		cap_clear(pcap);
 		ret = fork_drop_and_exec(DROP_PERMS, pcap);
 		if (ret) {
-			tst_resm(TINFO, "Failed without_perms CAP_INHERITABLE=%d",
-					whichcap);
+			tst_resm(TINFO,
+				 "Failed without_perms CAP_INHERITABLE=%d",
+				 whichcap);
 			if (!finalret)
 				finalret = ret;
 		}
diff --git a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
index 9bca004..f67eb68 100644
--- a/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
+++ b/testcases/kernel/security/integrity/ima/src/ima_boot_aggregate.c
@@ -32,7 +32,7 @@
 #define MAX_EVENT_SIZE 500
 #define EVENT_HEADER_SIZE 32
 #define MAX_EVENT_DATA_SIZE (MAX_EVENT_SIZE - EVENT_HEADER_SIZE)
-#define NUM_PCRS 8	/*  PCR registers 0-7 in boot aggregate */
+#define NUM_PCRS 8		/*  PCR registers 0-7 in boot aggregate */
 
 char *TCID = "ima_boot_aggregate";
 int TST_TOTAL = 1;
@@ -46,8 +46,7 @@
 	printf("\n");
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 #if HAVE_OPENSSL_SHA_H
 	unsigned char boot_aggregate[SHA_DIGEST_LENGTH];
diff --git a/testcases/kernel/security/integrity/ima/src/ima_measure.c b/testcases/kernel/security/integrity/ima/src/ima_measure.c
index 29d38bf..61851a3 100644
--- a/testcases/kernel/security/integrity/ima/src/ima_measure.c
+++ b/testcases/kernel/security/integrity/ima/src/ima_measure.c
@@ -52,13 +52,13 @@
 	} header;
 	char name[TCG_EVENT_NAME_LEN_MAX + 1];
 	struct {
-       		u_int8_t digest[SHA_DIGEST_LENGTH];
-     		char filename[TCG_EVENT_NAME_LEN_MAX + 1];
+		u_int8_t digest[SHA_DIGEST_LENGTH];
+		char filename[TCG_EVENT_NAME_LEN_MAX + 1];
 	} ima_data;
 	int filename_len;
 };
 
-static void display_sha1_digest(u_int8_t *digest)
+static void display_sha1_digest(u_int8_t * digest)
 {
 	int i;
 
@@ -69,7 +69,7 @@
 /*
  * Calculate the sha1 hash of data
  */
-static void calc_digest(u_int8_t *digest, int len, void *data )
+static void calc_digest(u_int8_t * digest, int len, void *data)
 {
 	SHA_CTX c;
 
@@ -90,7 +90,7 @@
 
 		memset(digest, 0, sizeof digest);
 		calc_digest(digest, sizeof template->ima_data,
-				&template->ima_data);
+			    &template->ima_data);
 		rc = memcmp(digest, template->header.digest, sizeof digest);
 		return rc != 0 ? 1 : 0;
 	}
@@ -129,8 +129,7 @@
  * Return code: if verification enabled, returns number of verification
  * 		errors.
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 
 #if HAVE_OPENSSL_SHA_H
@@ -143,8 +142,8 @@
 	int verify = 0;
 
 	if (argc < 2) {
-		printf("format: %s binary_runtime_measurements" \
-			 " [--validate] [--verbose] [--verify]\n", argv[0]);
+		printf("format: %s binary_runtime_measurements"
+		       " [--validate] [--verbose] [--verify]\n", argv[0]);
 		return 1;
 	}
 
@@ -167,8 +166,8 @@
 	memset(zero, 0, SHA_DIGEST_LENGTH);
 	memset(fox, 0xff, SHA_DIGEST_LENGTH);
 
-	print_info( "### PCR HASH                                  " \
-		 	"TEMPLATE-NAME\n");
+	print_info("### PCR HASH                                  "
+		   "TEMPLATE-NAME\n");
 	while (fread(&template.header, sizeof template.header, 1, fp)) {
 		SHA_CTX c;
 
@@ -186,7 +185,7 @@
 		display_sha1_digest(template.header.digest);
 		if (template.header.name_len > TCG_EVENT_NAME_LEN_MAX) {
 			printf("%d ERROR: event name too long!\n",
-				template.header.name_len);
+			       template.header.name_len);
 			exit(1);
 		}
 		memset(template.name, 0, sizeof template.name);
@@ -195,11 +194,11 @@
 
 		memset(&template.ima_data, 0, sizeof template.ima_data);
 		fread(&template.ima_data.digest,
-			sizeof template.ima_data.digest, 1, fp);
+		      sizeof template.ima_data.digest, 1, fp);
 		display_sha1_digest(template.ima_data.digest);
 
 		fread(&template.filename_len,
-			sizeof template.filename_len, 1, fp);
+		      sizeof template.filename_len, 1, fp);
 		fread(template.ima_data.filename, template.filename_len, 1, fp);
 		print_info(" %s\n", template.ima_data.filename);
 
@@ -210,7 +209,7 @@
 	}
 	fclose(fp);
 
-	verbose=1;
+	verbose = 1;
 	print_info("PCRAggr (re-calculated):");
 	display_sha1_digest(pcr);
 #else
diff --git a/testcases/kernel/security/integrity/ima/src/ima_mmap.c b/testcases/kernel/security/integrity/ima/src/ima_mmap.c
index 4907a34..335f852 100644
--- a/testcases/kernel/security/integrity/ima/src/ima_mmap.c
+++ b/testcases/kernel/security/integrity/ima/src/ima_mmap.c
@@ -38,19 +38,19 @@
 	fd = open(filename, O_CREAT | O_RDWR, S_IRWXU);
 	if (fd < 0) {
 		perror("open");
-		return(-1);
+		return (-1);
 	}
 
 	file = mmap(NULL, 1024, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-	if (file == (void *) -1) {
+	if (file == (void *)-1) {
 		perror("mmap");
-		return(-1);
+		return (-1);
 	}
 	close(fd);
 	sleep(30);
 	if (munmap(file, 1024) < 0) {
 		perror("unmap");
-		return(-1);
+		return (-1);
 	}
 	tst_exit();
 }
diff --git a/testcases/kernel/security/p9auth/unhex.c b/testcases/kernel/security/p9auth/unhex.c
index 9a8429f..7235fa2 100644
--- a/testcases/kernel/security/p9auth/unhex.c
+++ b/testcases/kernel/security/p9auth/unhex.c
@@ -39,7 +39,7 @@
 		return 1;
 	in[40] = '\0';
 	for (i = 0; i < 20; i++) {
-		sscanf(&in[2*i], "%02x", &v);
+		sscanf(&in[2 * i], "%02x", &v);
 		out[i] = v;
 	}
 	write(STDOUT_FILENO, out, 20);
diff --git a/testcases/kernel/security/securebits/check_keepcaps.c b/testcases/kernel/security/securebits/check_keepcaps.c
index 9cdd48f..83e463e 100644
--- a/testcases/kernel/security/securebits/check_keepcaps.c
+++ b/testcases/kernel/security/securebits/check_keepcaps.c
@@ -1,8 +1,8 @@
 #include <errno.h>
 #include "config.h"
 #if HAVE_SYS_CAPABILITY_H
-# include <linux/types.h>
-# include <sys/capability.h>
+#include <linux/types.h>
+#include <sys/capability.h>
 #endif
 #include <sys/prctl.h>
 #include <linux/securebits.h>
@@ -10,7 +10,7 @@
 #include "test.h"
 
 #ifndef SECBIT_KEEP_CAPS
-# define SECBIT_KEEP_CAPS (1<<4)
+#define SECBIT_KEEP_CAPS (1<<4)
 #endif
 
 /* Tests:
diff --git a/testcases/kernel/security/smack/notroot.c b/testcases/kernel/security/smack/notroot.c
index a8d23cb..05858d3 100644
--- a/testcases/kernel/security/smack/notroot.c
+++ b/testcases/kernel/security/smack/notroot.c
@@ -18,8 +18,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	setuid(1);
 
diff --git a/testcases/kernel/security/smack/smack_set_socket_labels.c b/testcases/kernel/security/smack/smack_set_socket_labels.c
index 5e0220e..086e4c8 100644
--- a/testcases/kernel/security/smack/smack_set_socket_labels.c
+++ b/testcases/kernel/security/smack/smack_set_socket_labels.c
@@ -29,8 +29,7 @@
 
 #include <sys/xattr.h>
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char message[256];
 	char *anin = "security.SMACK64IPIN";
diff --git a/testcases/kernel/security/tomoyo/newns.c b/testcases/kernel/security/tomoyo/newns.c
index 4ca7215..f888ca3 100644
--- a/testcases/kernel/security/tomoyo/newns.c
+++ b/testcases/kernel/security/tomoyo/newns.c
@@ -32,7 +32,7 @@
 
 static int child(void *arg)
 {
-	char **argv = (char **) arg;
+	char **argv = (char **)arg;
 	argv++;
 	mount("/tmp/", "/tmp/", "tmpfs", 0, NULL);
 	execvp(argv[0], argv);
@@ -42,8 +42,8 @@
 int main(int argc, char *argv[])
 {
 	char c = 0;
-	const pid_t pid = ltp_clone_quick(CLONE_NEWNS, child, (void *) argv);
+	const pid_t pid = ltp_clone_quick(CLONE_NEWNS, child, (void *)argv);
 	while (waitpid(pid, NULL, __WALL) == EOF && errno == EINTR)
-		c++; /* Dummy. */
+		c++;		/* Dummy. */
 	return 0;
 }
diff --git a/testcases/kernel/security/tomoyo/tomoyo_accept_test.c b/testcases/kernel/security/tomoyo/tomoyo_accept_test.c
index beca5ac..7b69c73 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_accept_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_accept_test.c
@@ -54,8 +54,9 @@
 		 int create_loop)
 {
 	static const int rw_flags[4] = { 0, O_RDONLY, O_WRONLY, O_RDWR };
-	static const int create_flags[3] = { 0, O_CREAT /* nonexistent*/ ,
-					     O_CREAT /* existent */ };
+	static const int create_flags[3] = { 0, O_CREAT /* nonexistent */ ,
+		O_CREAT /* existent */
+	};
 	static const int truncate_flags[2] = { 0, O_TRUNC };
 	static const int append_flags[2] = { 0, O_APPEND };
 	int level;
@@ -68,7 +69,7 @@
 		 append_loop, truncate_loop, create_loop, rw_loop);
 	fprintf(exception_fp, "deny_rewrite %s\n", buffer);
 	flags = rw_flags[rw_loop] | truncate_flags[truncate_loop] |
-		append_flags[append_loop] | create_flags[create_loop];
+	    append_flags[append_loop] | create_flags[create_loop];
 	for (i = 1; i < 8; i++)
 		fprintf(domain_fp, "delete %d %s\n", i, buffer);
 	for (level = 0; level < 4; level++) {
@@ -85,19 +86,19 @@
 			fprintf(stderr, "%d: open(%04o) failed\n", level,
 				flags);
 		/*
-		  fd = open(buffer, flags, 0644)
-		  if (fd != EOF)
-		  close(fd);
-		  else
-		  fprintf(stderr, "%d: open(%04o) failed\n", level, flags);
-		*/
+		   fd = open(buffer, flags, 0644)
+		   if (fd != EOF)
+		   close(fd);
+		   else
+		   fprintf(stderr, "%d: open(%04o) failed\n", level, flags);
+		 */
 		/*
-		  fd = open(buffer, flags, 0644);
-		  if (fd != EOF)
-		  close(fd);
-		  else
-		  fprintf(stderr, "%d: open(%04o) failed\n", level, flags);
-		*/
+		   fd = open(buffer, flags, 0644);
+		   if (fd != EOF)
+		   close(fd);
+		   else
+		   fprintf(stderr, "%d: open(%04o) failed\n", level, flags);
+		 */
 	}
 	for (i = 1; i < 8; i++)
 		fprintf(domain_fp, "delete %d %s\n", i, buffer);
diff --git a/testcases/kernel/security/tomoyo/tomoyo_file_test.c b/testcases/kernel/security/tomoyo/tomoyo_file_test.c
index 3ce84ee..fa2dec1 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_file_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_file_test.c
@@ -51,25 +51,25 @@
 	}
 }
 
-static const char *dev_null_path       = "/dev/null";
-static const char *truncate_path       = "/tmp/truncate_test";
-static const char *ftruncate_path      = "/tmp/ftruncate_test";
-static const char *open_creat_path     = "/tmp/open_test";
-static const char *mknod_reg_path      = "/tmp/mknod_reg_test";
-static const char *mknod_chr_path      = "/tmp/mknod_chr_test";
-static const char *mknod_blk_path      = "/tmp/mknod_blk_test";
-static const char *mknod_fifo_path     = "/tmp/mknod_fifo_test";
-static const char *mknod_sock_path     = "/tmp/mknod_sock_test";
-static const char *unlink_path         = "/tmp/unlink_test";
-static const char *mkdir_path          = "/tmp/mkdir_test";
-static const char *rmdir_path          = "/tmp/rmdir_test";
-static const char *link_source_path    = "/tmp/link_source_test";
-static const char *link_dest_path      = "/tmp/link_dest_test";
+static const char *dev_null_path = "/dev/null";
+static const char *truncate_path = "/tmp/truncate_test";
+static const char *ftruncate_path = "/tmp/ftruncate_test";
+static const char *open_creat_path = "/tmp/open_test";
+static const char *mknod_reg_path = "/tmp/mknod_reg_test";
+static const char *mknod_chr_path = "/tmp/mknod_chr_test";
+static const char *mknod_blk_path = "/tmp/mknod_blk_test";
+static const char *mknod_fifo_path = "/tmp/mknod_fifo_test";
+static const char *mknod_sock_path = "/tmp/mknod_sock_test";
+static const char *unlink_path = "/tmp/unlink_test";
+static const char *mkdir_path = "/tmp/mkdir_test";
+static const char *rmdir_path = "/tmp/rmdir_test";
+static const char *link_source_path = "/tmp/link_source_test";
+static const char *link_dest_path = "/tmp/link_dest_test";
 static const char *symlink_source_path = "/tmp/symlink_source_test";
-static const char *symlink_dest_path   = "/tmp/symlink_dest_test";
-static const char *rename_source_path  = "/tmp/rename_source_test";
-static const char *rename_dest_path    = "/tmp/rename_dest_test";
-static const char *socket_path         = "/tmp/socket_test";
+static const char *symlink_dest_path = "/tmp/symlink_dest_test";
+static const char *rename_source_path = "/tmp/rename_source_test";
+static const char *rename_dest_path = "/tmp/rename_dest_test";
+static const char *socket_path = "/tmp/socket_test";
 
 static int ftruncate_fd = EOF;
 
@@ -78,7 +78,8 @@
 	int fd;
 	{
 		static int name[] = { CTL_NET, NET_IPV4,
-				      NET_IPV4_LOCAL_PORT_RANGE };
+			NET_IPV4_LOCAL_PORT_RANGE
+		};
 		int buffer[2] = { 32768, 61000 };
 		size_t size = sizeof(buffer);
 		show_prompt("sysctl(READ)");
@@ -188,7 +189,7 @@
 		strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1);
 		fd = socket(AF_UNIX, SOCK_STREAM, 0);
 		show_prompt("unix_bind()");
-		show_result(bind(fd, (struct sockaddr *) &addr, sizeof(addr)));
+		show_result(bind(fd, (struct sockaddr *)&addr, sizeof(addr)));
 		if (fd != EOF)
 			close(fd);
 	}
diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
index 5d9a7c9..da4af0f 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
@@ -292,7 +292,8 @@
 				fp = popen(buf, "w");
 			if (fp) {
 				if (fwrite(compressed_ext2_image_sample, 1,
-				    sizeof(compressed_ext2_image_sample), fp) !=
+					   sizeof(compressed_ext2_image_sample),
+					   fp) !=
 				    sizeof(compressed_ext2_image_sample))
 					err(1, "fwrite");
 				pclose(fp);
@@ -369,7 +370,7 @@
 
 		set_profile(0, "file::mount");
 		while (umount("/tmp/mount/") == 0)
-			c++; /* Dummy. */
+			c++;	/* Dummy. */
 	}
 
 	/* Test mount(). */
@@ -419,8 +420,7 @@
 			printf("BUG: %s\n", strerror(errno));
 
 		/* Test remount case */
-		fprintf(domain_fp,
-			"allow_mount any /tmp/mount/ --remount 0\n");
+		fprintf(domain_fp, "allow_mount any /tmp/mount/ --remount 0\n");
 		show_prompt("mount('/tmp/mount/', MS_REMOUNT)", 0);
 		if (mount("none", "/tmp/mount/", "tmpfs", MS_REMOUNT, NULL)
 		    == 0)
@@ -464,7 +464,7 @@
 			"/tmp/mount_move/ --move 0\n");
 
 		while (umount("/tmp/mount/") == 0)
-			c++; /* Dummy. */
+			c++;	/* Dummy. */
 	}
 
 	/* Test umount(). */
@@ -508,7 +508,7 @@
 
 		set_profile(0, "file::umount");
 		while (umount("/tmp/mount/") == 0)
-			c++; /* Dummy. */
+			c++;	/* Dummy. */
 	}
 
 	/* Test chroot(). */
@@ -568,7 +568,7 @@
 		static char stack[8192];
 		set_profile(3, "file::pivot_root");
 		fprintf(domain_fp, "allow_pivot_root %s %s\n",
-			 pivot_root_dir, proc_policy_dir);
+			pivot_root_dir, proc_policy_dir);
 		snprintf(stack, 8191, "pivot_root('%s', '%s')", pivot_root_dir,
 			 proc_policy_dir);
 		show_prompt(stack, 0);
@@ -577,7 +577,7 @@
 							  NULL);
 			while (waitpid(pid, &error, __WALL) == EOF &&
 			       errno == EINTR)
-				c++; /* Dummy. */
+				c++;	/* Dummy. */
 		}
 		errno = WIFEXITED(error) ? WEXITSTATUS(error) : -1;
 		if (errno == 0)
@@ -595,7 +595,7 @@
 							  NULL);
 			while (waitpid(pid, &error, __WALL) == EOF &&
 			       errno == EINTR)
-				c++; /* Dummy. */
+				c++;	/* Dummy. */
 		}
 		errno = WIFEXITED(error) ? WEXITSTATUS(error) : -1;
 		if (errno == EPERM)
@@ -612,7 +612,7 @@
 							  NULL);
 			while (waitpid(pid, &error, __WALL) == EOF &&
 			       errno == EINTR)
-				c++; /* Dummy. */
+				c++;	/* Dummy. */
 		}
 		errno = WIFEXITED(error) ? WEXITSTATUS(error) : -1;
 		if (errno == 0)
diff --git a/testcases/kernel/security/tomoyo/tomoyo_new_file_test.c b/testcases/kernel/security/tomoyo/tomoyo_new_file_test.c
index 463d57b..2ed021e 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_new_file_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_new_file_test.c
@@ -246,8 +246,7 @@
 	memset(&sbuf, 0, sizeof(sbuf));
 	filename = "/dev/null";
 	stat(filename, &sbuf);
-	snprintf(pbuffer, sizeof(pbuffer) - 1,
-		 "allow_write %s", filename);
+	snprintf(pbuffer, sizeof(pbuffer) - 1, "allow_write %s", filename);
 	policy = pbuffer;
 	write_domain_policy(policy, 0);
 	fd = open(filename, O_WRONLY);
@@ -536,15 +535,13 @@
 	addr.sun_family = AF_UNIX;
 	strncpy(addr.sun_path, filename, sizeof(addr.sun_path) - 1);
 	fd = socket(AF_UNIX, SOCK_STREAM, 0);
-	show_result(bind(fd, (struct sockaddr *) &addr, sizeof(addr)),
-		    1);
+	show_result(bind(fd, (struct sockaddr *)&addr, sizeof(addr)), 1);
 	if (fd != EOF)
 		close(fd);
 	write_domain_policy(policy, 1);
 	unlink2(filename);
 	fd = socket(AF_UNIX, SOCK_STREAM, 0);
-	show_result(bind(fd, (struct sockaddr *) &addr, sizeof(addr)),
-		    0);
+	show_result(bind(fd, (struct sockaddr *)&addr, sizeof(addr)), 0);
 	if (fd != EOF)
 		close(fd);
 
@@ -588,8 +585,7 @@
 	set_profile(3, "file::open");
 	show_result(ftruncate(fd, 0), 0);
 
-	show_result(fcntl(fd, F_SETFL,
-			  fcntl(fd, F_GETFL) & ~O_APPEND), 0);
+	show_result(fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_APPEND), 0);
 	if (fd != EOF)
 		close(fd);
 
@@ -602,16 +598,14 @@
 	unlink2(filename);
 
 	policy = "allow_ioctl socket:[family=2:type=2:protocol=17] "
-		"35122-35124";
+	    "35122-35124";
 	write_domain_policy(policy, 0);
 	fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
 	memset(&ifreq, 0, sizeof(ifreq));
-	snprintf(ifreq.ifr_name, sizeof(ifreq.ifr_name) - 1,
-		 "lo");
+	snprintf(ifreq.ifr_name, sizeof(ifreq.ifr_name) - 1, "lo");
 	show_result(ioctl(fd, 35123, &ifreq), 1);
 	write_domain_policy(policy, 1);
-	policy = "allow_ioctl "
-		"socket:[family=2:type=2:protocol=17] 0-35122";
+	policy = "allow_ioctl " "socket:[family=2:type=2:protocol=17] 0-35122";
 	write_domain_policy(policy, 0);
 	show_result(ioctl(fd, 35123, &ifreq), 0);
 	write_domain_policy(policy, 1);
diff --git a/testcases/kernel/security/tomoyo/tomoyo_new_test.c b/testcases/kernel/security/tomoyo/tomoyo_new_test.c
index 10fd062..57c340b 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_new_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_new_test.c
@@ -383,262 +383,231 @@
 	const char *name;
 	const char *policy;
 } tests[] = {
-	{ NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
-	  "allow_read /etc/fstab" },
-	{ NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
-	  "allow_read /etc/fstab" },
-	{ NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
-	  "allow_read /etc/fstab" },
-	{ setup_open_group, test_read_etc_fstab, cleanup_open_group,
-	  "file::open", "allow_read @READABLE" },
-	{ NULL, test_write_dev_null, cleanup_file_open, "file::open",
-	  "allow_write /dev/null" },
-	{ NULL, test_write_dev_null, cleanup_file_open, "file::open",
-	  "allow_write /dev/null" },
-	{ NULL, test_write_dev_null, cleanup_file_open, "file::open",
-	  "allow_write /dev/null" },
-	{ cleanup_mkdir_testdir, test_mkdir_testdir, cleanup_mkdir_testdir,
-	  "file::mkdir", "allow_mkdir /tmp/testdir/ 0755" },
-	{ cleanup_mkdir_testdir, test_mkdir_testdir, cleanup_mkdir_testdir,
-	  "file::mkdir", "allow_mkdir /tmp/testdir/ 0755" },
-	{ cleanup_mkdir_testdir, test_mkdir_testdir, cleanup_mkdir_testdir,
-	  "file::mkdir", "allow_mkdir /tmp/testdir/ 0755" },
-	{ setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
-	  "file::rmdir", "allow_rmdir /tmp/testdir/" },
-	{ setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
-	  "file::rmdir", "allow_rmdir /tmp/testdir/" },
-	{ setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
-	  "file::rmdir", "allow_rmdir /tmp/testdir/" },
-	{ setup_execute_bin_true, test_execute_bin_true,
-	  cleanup_execute_bin_true, "file::execute",
-	  "allow_execute /bin/true" },
-	{ setup_execute_bin_true, test_execute_bin_true,
-	  cleanup_execute_bin_true, "file::execute", "allow_execute /bin/true" },
-	{ setup_execute_bin_true, test_execute_bin_true,
-	  cleanup_execute_bin_true, "file::execute", "allow_execute /bin/true"
-	},
-	{ NULL, test_chmod_dev_null, NULL, "file::chmod",
-	  "allow_chmod /dev/null 0666"
-	},
-	{ NULL, test_chown_dev_null, NULL, "file::chown",
-	  "allow_chown /dev/null 0" },
-	{ NULL, test_chgrp_dev_null, NULL, "file::chgrp",
-	  "allow_chgrp /dev/null 0" },
-	{ NULL, test_ioctl_dev_null, NULL, "file::ioctl",
-	  "allow_ioctl /dev/null 0x5451" },
-	{ setup_chmod_group, test_chmod_dev_null, cleanup_chmod_group,
-	  "file::chmod", "allow_chmod @CHMOD_TARGET @CHMOD_MODES" },
-	{ setup_chown_group, test_chown_dev_null, cleanup_chown_group,
-	  "file::chown", "allow_chown @CHOWN_TARGET @CHOWN_IDS" },
-	{ setup_chown_group, test_chgrp_dev_null, cleanup_chown_group,
-	  "file::chgrp", "allow_chgrp @CHOWN_TARGET @CHOWN_IDS" },
-	{ setup_ioctl_group, test_ioctl_dev_null, cleanup_ioctl_group,
-	  "file::ioctl", "allow_ioctl @IOCTL_TARGET @IOCTL_NUMBERS" },
-	{ setup_test_file, test_file_open_0, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile0" },
-	{ setup_test_file, test_file_open_1, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile1" },
-	{ setup_test_file, test_file_open_1, cleanup_test_file, "file::create",
-	  "allow_create /tmp/testfile1 0600" },
-	{ setup_test_file, test_file_open_2, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile2" },
-	{ setup_test_file, test_file_open_2, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile2"
-	},
-	{ setup_test_file_truncate, test_file_open_2,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile2" },
-	{ setup_test_file, test_file_open_3, cleanup_test_file,
-	  "file::open", "allow_read /tmp/testfile3" },
-	{ setup_test_file, test_file_open_3, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile3 0600"
-	},
-	{ setup_test_file, test_file_open_4, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile4" },
-	{ setup_test_file, test_file_open_5, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile5" },
-	{ setup_test_file, test_file_open_5, cleanup_test_file, "file::create",
-	  "allow_create /tmp/testfile5 0600" },
-	{ setup_test_file, test_file_open_6, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile6" },
-	{ setup_test_file, test_file_open_6, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile6"
-	},
-	{ setup_test_file_truncate, test_file_open_6,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile6" },
-	{ setup_test_file, test_file_open_7, cleanup_test_file, "file::open",
-	  "allow_read /tmp/testfile7" },
-	{ setup_test_file, test_file_open_7, cleanup_test_file, "file::create",
-	  "allow_create /tmp/testfile7 0600" },
-	{ setup_test_file, test_file_open_8, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile8" },
-	{ setup_test_file, test_file_open_8, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile8"
-	},
-	{ setup_test_file, test_file_open_9, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile9" },
-	{ setup_test_file, test_file_open_9, cleanup_test_file, "file::create",
-	  "allow_create /tmp/testfile9 0600" },
-	{ setup_test_file, test_file_open_9, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile9"
-	},
-	{ setup_test_file, test_file_open_10, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile10" },
-	{ setup_test_file, test_file_open_10, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile10"
-	},
-	{ setup_test_file, test_file_open_10, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile10"
-	},
-	{ setup_test_file, test_file_open_11, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile11" },
-	{ setup_test_file, test_file_open_11, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile11 0600"
-	},
-	{ setup_test_file, test_file_open_11, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile11"
-	},
-	{ setup_test_file, test_file_open_12, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile12" },
-	{ setup_test_file, test_file_open_13, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile13" },
-	{ setup_test_file, test_file_open_13, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile13 0600"
-	},
-	{ setup_test_file, test_file_open_14, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile14" },
-	{ setup_test_file, test_file_open_14, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile14"
-	},
-	{ setup_test_file_truncate, test_file_open_14,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile14" },
-	{ setup_test_file, test_file_open_15, cleanup_test_file, "file::open",
-	  "allow_write /tmp/testfile15" },
-	{ setup_test_file, test_file_open_15, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile15 0600"
-	},
-	{ setup_test_file, test_file_open_16, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile16" },
-	{ setup_test_file, test_file_open_16, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile16"
-	},
-	{ setup_test_file, test_file_open_17, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile17" },
-	{ setup_test_file, test_file_open_17, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile17 0600"
-	},
-	{ setup_test_file, test_file_open_17, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile17"
-	},
-	{ setup_test_file, test_file_open_18, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile18" },
-	{ setup_test_file, test_file_open_18, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile18"
-	},
-	{ setup_test_file, test_file_open_18, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile18"
-	},
-	{ setup_test_file, test_file_open_19, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile19" },
-	{ setup_test_file, test_file_open_19, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile19 0600"
-	},
-	{ setup_test_file, test_file_open_19, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile19"
-	},
-	{ setup_test_file, test_file_open_20, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile20" },
-	{ setup_test_file, test_file_open_21, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile21" },
-	{ setup_test_file, test_file_open_21, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile21 0600"
-	},
-	{ setup_test_file, test_file_open_22, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile22" },
-	{ setup_test_file, test_file_open_22, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile22"
-	},
-	{ setup_test_file_truncate, test_file_open_22,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile22" },
-	{ setup_test_file, test_file_open_23, cleanup_test_file, "file::open",
-	  "allow_read/write /tmp/testfile23" },
-	{ setup_test_file, test_file_open_23, cleanup_test_file,
-	  "file::create", "allow_create /tmp/testfile23 0600"
-	},
-	{ setup_all_test_file, test_file_open_0, cleanup_test_file,
-	  "file::open", "allow_read /tmp/testfile0" },
-	{ setup_all_test_file, test_file_open_2, cleanup_test_file,
-	  "file::open", "allow_read /tmp/testfile2" },
-	{ setup_all_test_file, test_file_open_2, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile2"
-	},
-	{ setup_all_test_file_truncate, test_file_open_2,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile2" },
-	{ setup_all_test_file, test_file_open_4, cleanup_test_file,
-	  "file::open", "allow_read /tmp/testfile4" },
-	{ setup_all_test_file, test_file_open_6, cleanup_test_file,
-	  "file::open", "allow_read /tmp/testfile6" },
-	{ setup_all_test_file, test_file_open_6, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile6"
-	},
-	{ setup_all_test_file_truncate, test_file_open_6,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile6" },
-	{ setup_all_test_file, test_file_open_8, cleanup_test_file,
-	  "file::open", "allow_write /tmp/testfile8" },
-	{ setup_all_test_file, test_file_open_8, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile8"
-	},
-	{ setup_all_test_file, test_file_open_10, cleanup_test_file,
-	  "file::open", "allow_write /tmp/testfile10" },
-	{ setup_all_test_file, test_file_open_10, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile10"
-	},
-	{ setup_all_test_file, test_file_open_10, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile10"
-	},
-	{ setup_all_test_file, test_file_open_12, cleanup_test_file,
-	  "file::open", "allow_write /tmp/testfile12" },
-	{ setup_all_test_file, test_file_open_14, cleanup_test_file,
-	  "file::open", "allow_write /tmp/testfile14" },
-	{ setup_all_test_file, test_file_open_14, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile14"
-	},
-	{ setup_all_test_file_truncate, test_file_open_14,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile14" },
-	{ setup_all_test_file, test_file_open_16, cleanup_test_file,
-	  "file::open", "allow_read/write /tmp/testfile16"
-	},
-	{ setup_all_test_file, test_file_open_16, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile16"
-	},
-	{ setup_all_test_file, test_file_open_18, cleanup_test_file,
-	  "file::open", "allow_read/write /tmp/testfile18"
-	},
-	{ setup_all_test_file, test_file_open_18, cleanup_test_file,
-	  "file::truncate", "allow_truncate /tmp/testfile18"
-	},
-	{ setup_all_test_file, test_file_open_18, cleanup_test_file,
-	  "file::rewrite", "allow_rewrite /tmp/testfile18"
-	},
-	{ setup_all_test_file, test_file_open_20, cleanup_test_file,
-	  "file::open",
-	  "allow_read/write /tmp/testfile20" },
-	{ setup_all_test_file, test_file_open_22, cleanup_test_file,
-	  "file::open",
-	  "allow_read/write /tmp/testfile22" },
-	{ setup_all_test_file, test_file_open_22, cleanup_test_file,
-	  "file::truncate",
-	  "allow_truncate /tmp/testfile22" },
-	{ setup_all_test_file_truncate, test_file_open_22,
-	  cleanup_test_file_truncate, "file::rewrite",
-	  "allow_rewrite /tmp/testfile22" },
-	{ NULL }
+	{
+	NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
+		    "allow_read /etc/fstab"}, {
+	NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
+		    "allow_read /etc/fstab"}, {
+	NULL, test_read_etc_fstab, cleanup_file_open, "file::open",
+		    "allow_read /etc/fstab"}, {
+	setup_open_group, test_read_etc_fstab, cleanup_open_group,
+		    "file::open", "allow_read @READABLE"}, {
+	NULL, test_write_dev_null, cleanup_file_open, "file::open",
+		    "allow_write /dev/null"}, {
+	NULL, test_write_dev_null, cleanup_file_open, "file::open",
+		    "allow_write /dev/null"}, {
+	NULL, test_write_dev_null, cleanup_file_open, "file::open",
+		    "allow_write /dev/null"}, {
+	cleanup_mkdir_testdir, test_mkdir_testdir,
+		    cleanup_mkdir_testdir, "file::mkdir",
+		    "allow_mkdir /tmp/testdir/ 0755"}, {
+	cleanup_mkdir_testdir, test_mkdir_testdir,
+		    cleanup_mkdir_testdir, "file::mkdir",
+		    "allow_mkdir /tmp/testdir/ 0755"}, {
+	cleanup_mkdir_testdir, test_mkdir_testdir,
+		    cleanup_mkdir_testdir, "file::mkdir",
+		    "allow_mkdir /tmp/testdir/ 0755"}, {
+	setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
+		    "file::rmdir", "allow_rmdir /tmp/testdir/"}, {
+	setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
+		    "file::rmdir", "allow_rmdir /tmp/testdir/"}, {
+	setup_mkdir_testdir, test_rmdir_testdir, cleanup_mkdir_testdir,
+		    "file::rmdir", "allow_rmdir /tmp/testdir/"}, {
+	setup_execute_bin_true, test_execute_bin_true,
+		    cleanup_execute_bin_true, "file::execute",
+		    "allow_execute /bin/true"}, {
+	setup_execute_bin_true, test_execute_bin_true,
+		    cleanup_execute_bin_true, "file::execute",
+		    "allow_execute /bin/true"}, {
+	setup_execute_bin_true, test_execute_bin_true,
+		    cleanup_execute_bin_true, "file::execute",
+		    "allow_execute /bin/true"}, {
+	NULL, test_chmod_dev_null, NULL, "file::chmod",
+		    "allow_chmod /dev/null 0666"}, {
+	NULL, test_chown_dev_null, NULL, "file::chown",
+		    "allow_chown /dev/null 0"}, {
+	NULL, test_chgrp_dev_null, NULL, "file::chgrp",
+		    "allow_chgrp /dev/null 0"}, {
+	NULL, test_ioctl_dev_null, NULL, "file::ioctl",
+		    "allow_ioctl /dev/null 0x5451"}, {
+	setup_chmod_group, test_chmod_dev_null, cleanup_chmod_group,
+		    "file::chmod", "allow_chmod @CHMOD_TARGET @CHMOD_MODES"}, {
+	setup_chown_group, test_chown_dev_null, cleanup_chown_group,
+		    "file::chown", "allow_chown @CHOWN_TARGET @CHOWN_IDS"}, {
+	setup_chown_group, test_chgrp_dev_null, cleanup_chown_group,
+		    "file::chgrp", "allow_chgrp @CHOWN_TARGET @CHOWN_IDS"}, {
+	setup_ioctl_group, test_ioctl_dev_null, cleanup_ioctl_group,
+		    "file::ioctl", "allow_ioctl @IOCTL_TARGET @IOCTL_NUMBERS"},
+	{
+	setup_test_file, test_file_open_0, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile0"}, {
+	setup_test_file, test_file_open_1, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile1"}, {
+	setup_test_file, test_file_open_1, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile1 0600"}, {
+	setup_test_file, test_file_open_2, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile2"}, {
+	setup_test_file, test_file_open_2, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile2"}, {
+	setup_test_file_truncate, test_file_open_2,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile2"}, {
+	setup_test_file, test_file_open_3, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile3"}, {
+	setup_test_file, test_file_open_3, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile3 0600"}, {
+	setup_test_file, test_file_open_4, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile4"}, {
+	setup_test_file, test_file_open_5, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile5"}, {
+	setup_test_file, test_file_open_5, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile5 0600"}, {
+	setup_test_file, test_file_open_6, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile6"}, {
+	setup_test_file, test_file_open_6, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile6"}, {
+	setup_test_file_truncate, test_file_open_6,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile6"}, {
+	setup_test_file, test_file_open_7, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile7"}, {
+	setup_test_file, test_file_open_7, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile7 0600"}, {
+	setup_test_file, test_file_open_8, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile8"}, {
+	setup_test_file, test_file_open_8, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile8"}, {
+	setup_test_file, test_file_open_9, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile9"}, {
+	setup_test_file, test_file_open_9, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile9 0600"}, {
+	setup_test_file, test_file_open_9, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile9"}, {
+	setup_test_file, test_file_open_10, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile10"}, {
+	setup_test_file, test_file_open_10, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile10"}, {
+	setup_test_file, test_file_open_10, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile10"}, {
+	setup_test_file, test_file_open_11, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile11"}, {
+	setup_test_file, test_file_open_11, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile11 0600"}, {
+	setup_test_file, test_file_open_11, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile11"}, {
+	setup_test_file, test_file_open_12, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile12"}, {
+	setup_test_file, test_file_open_13, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile13"}, {
+	setup_test_file, test_file_open_13, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile13 0600"}, {
+	setup_test_file, test_file_open_14, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile14"}, {
+	setup_test_file, test_file_open_14, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile14"}, {
+	setup_test_file_truncate, test_file_open_14,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile14"}, {
+	setup_test_file, test_file_open_15, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile15"}, {
+	setup_test_file, test_file_open_15, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile15 0600"}, {
+	setup_test_file, test_file_open_16, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile16"}, {
+	setup_test_file, test_file_open_16, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile16"}, {
+	setup_test_file, test_file_open_17, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile17"}, {
+	setup_test_file, test_file_open_17, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile17 0600"}, {
+	setup_test_file, test_file_open_17, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile17"}, {
+	setup_test_file, test_file_open_18, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile18"}, {
+	setup_test_file, test_file_open_18, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile18"}, {
+	setup_test_file, test_file_open_18, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile18"}, {
+	setup_test_file, test_file_open_19, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile19"}, {
+	setup_test_file, test_file_open_19, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile19 0600"}, {
+	setup_test_file, test_file_open_19, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile19"}, {
+	setup_test_file, test_file_open_20, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile20"}, {
+	setup_test_file, test_file_open_21, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile21"}, {
+	setup_test_file, test_file_open_21, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile21 0600"}, {
+	setup_test_file, test_file_open_22, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile22"}, {
+	setup_test_file, test_file_open_22, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile22"}, {
+	setup_test_file_truncate, test_file_open_22,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile22"}, {
+	setup_test_file, test_file_open_23, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile23"}, {
+	setup_test_file, test_file_open_23, cleanup_test_file,
+		    "file::create", "allow_create /tmp/testfile23 0600"}, {
+	setup_all_test_file, test_file_open_0, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile0"}, {
+	setup_all_test_file, test_file_open_2, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile2"}, {
+	setup_all_test_file, test_file_open_2, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile2"}, {
+	setup_all_test_file_truncate, test_file_open_2,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile2"}, {
+	setup_all_test_file, test_file_open_4, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile4"}, {
+	setup_all_test_file, test_file_open_6, cleanup_test_file,
+		    "file::open", "allow_read /tmp/testfile6"}, {
+	setup_all_test_file, test_file_open_6, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile6"}, {
+	setup_all_test_file_truncate, test_file_open_6,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile6"}, {
+	setup_all_test_file, test_file_open_8, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile8"}, {
+	setup_all_test_file, test_file_open_8, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile8"}, {
+	setup_all_test_file, test_file_open_10, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile10"}, {
+	setup_all_test_file, test_file_open_10, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile10"}, {
+	setup_all_test_file, test_file_open_10, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile10"}, {
+	setup_all_test_file, test_file_open_12, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile12"}, {
+	setup_all_test_file, test_file_open_14, cleanup_test_file,
+		    "file::open", "allow_write /tmp/testfile14"}, {
+	setup_all_test_file, test_file_open_14, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile14"}, {
+	setup_all_test_file_truncate, test_file_open_14,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile14"}, {
+	setup_all_test_file, test_file_open_16, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile16"}, {
+	setup_all_test_file, test_file_open_16, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile16"}, {
+	setup_all_test_file, test_file_open_18, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile18"}, {
+	setup_all_test_file, test_file_open_18, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile18"}, {
+	setup_all_test_file, test_file_open_18, cleanup_test_file,
+		    "file::rewrite", "allow_rewrite /tmp/testfile18"}, {
+	setup_all_test_file, test_file_open_20, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile20"}, {
+	setup_all_test_file, test_file_open_22, cleanup_test_file,
+		    "file::open", "allow_read/write /tmp/testfile22"}, {
+	setup_all_test_file, test_file_open_22, cleanup_test_file,
+		    "file::truncate", "allow_truncate /tmp/testfile22"}, {
+	setup_all_test_file_truncate, test_file_open_22,
+		    cleanup_test_file_truncate, "file::rewrite",
+		    "allow_rewrite /tmp/testfile22"}, {
+	NULL}
 };
 
 int main(int argc, char *argv[])
diff --git a/testcases/kernel/security/tomoyo/tomoyo_policy_memory_test.c b/testcases/kernel/security/tomoyo/tomoyo_policy_memory_test.c
index 3699c76..4526d72 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_policy_memory_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_policy_memory_test.c
@@ -73,13 +73,13 @@
 	}
 }
 
-static inline void check_policy_written(FILE *fp, const int id)
+static inline void check_policy_written(FILE * fp, const int id)
 {
 	fflush(fp);
 	check_policy_common(1, id);
 }
 
-static inline void check_policy_deleted(FILE *fp, const int id)
+static inline void check_policy_deleted(FILE * fp, const int id)
 {
 	fflush(fp);
 	check_policy_common(0, id);
@@ -257,9 +257,9 @@
 	"initialize_domain /usr/sbin/sshd from /bin/bash",
 	"no_initialize_domain /usr/sbin/sshd from /bin/bash",
 	"initialize_domain /usr/sbin/sshd from "
-	"<kernel> /bin/mingetty/bin/bash",
+	    "<kernel> /bin/mingetty/bin/bash",
 	"no_initialize_domain /usr/sbin/sshd from "
-	"<kernel> /bin/mingetty/bin/bash",
+	    "<kernel> /bin/mingetty/bin/bash",
 	"keep_domain <kernel> /usr/sbin/sshd /bin/bash",
 	"no_keep_domain <kernel> /usr/sbin/sshd /bin/bash",
 	"keep_domain /bin/pwd from <kernel> /usr/sbin/sshd /bin/bash",
diff --git a/testcases/kernel/syscalls/abort/abort01.c b/testcases/kernel/syscalls/abort/abort01.c
index e4f243f..369d1a8 100644
--- a/testcases/kernel/syscalls/abort/abort01.c
+++ b/testcases/kernel/syscalls/abort/abort01.c
@@ -118,14 +118,15 @@
 		}
 		if (kidpid < 0)
 			if (!instress())
-				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fork failed");
 		count = 0;
 		while ((child = wait(&status)) > 0)
 			count++;
 		if (count != 1) {
 			tst_brkm(TBROK, cleanup,
-			    "wrong # children waited on; got %d, expected 1",
-			    count);
+				 "wrong # children waited on; got %d, expected 1",
+				 count);
 		}
 		if (WIFSIGNALED(status)) {
 
@@ -141,8 +142,8 @@
 #ifdef WCOREDUMP
 		if (core == 0) {
 			tst_brkm(TFAIL, cleanup,
-			    "Child did not dump core; exit code = %d, "
-			    "signal = %d", ex, sig);
+				 "Child did not dump core; exit code = %d, "
+				 "signal = %d", ex, sig);
 		} else if (core != -1)
 			tst_resm(TPASS, "abort dumped core");
 #endif
@@ -151,8 +152,8 @@
 			tst_resm(TPASS, "abort raised SIGIOT");
 		else {
 			tst_brkm(TFAIL, cleanup,
-			    "Child did not raise SIGIOT (%d); exit code = %d, "
-			    "signal = %d", SIGIOT, ex, sig);
+				 "Child did not raise SIGIOT (%d); exit code = %d, "
+				 "signal = %d", SIGIOT, ex, sig);
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/accept/accept01.c b/testcases/kernel/syscalls/accept/accept01.c
index bfe374b..a466711 100644
--- a/testcases/kernel/syscalls/accept/accept01.c
+++ b/testcases/kernel/syscalls/accept/accept01.c
@@ -103,7 +103,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EINVAL, EOPNOTSUPP, 0 };
 
-
 int main(int ac, char *av[])
 {
 	int lc;
@@ -167,7 +166,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "error opening /dev/null");
+		tst_brkm(TBROK | TERRNO, cleanup, "error opening /dev/null");
 }
 
 void cleanup0(void)
diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
index 76d3f6b..9449621 100644
--- a/testcases/kernel/syscalls/accept4/accept4_01.c
+++ b/testcases/kernel/syscalls/accept4/accept4_01.c
@@ -65,7 +65,7 @@
 
 /* Flags for socket(), socketpair(), accept4() */
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #ifndef SOCK_CLOEXEC
@@ -135,9 +135,10 @@
 	TEST_PAUSE;
 	tst_tmpdir();
 }
+
 #if !(__GLIBC_PREREQ(2,10))
 static int
-accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+accept4_01(int fd, struct sockaddr *sockaddr, socklen_t * addrlen, int flags)
 {
 #ifdef DEBUG
 	tst_resm(TINFO, "Calling accept4(): flags = %x", flags);
@@ -192,13 +193,13 @@
 		die("Connect Error");
 
 	addrlen = sizeof(struct sockaddr_in);
-	#if !(__GLIBC_PREREQ(2,10))
+#if !(__GLIBC_PREREQ(2,10))
 	acceptfd = accept4_01(lfd, (struct sockaddr *)&claddr, &addrlen,
-                           closeonexec_flag | nonblock_flag);
-	#else
+			      closeonexec_flag | nonblock_flag);
+#else
 	acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
 			   closeonexec_flag | nonblock_flag);
-	#endif
+#endif
 	if (acceptfd == -1) {
 		tst_resm(TCONF,
 			 "syscall __NR_accept4 not supported on your arch");
diff --git a/testcases/kernel/syscalls/access/access01.c b/testcases/kernel/syscalls/access/access01.c
index 7be8f19..a6fa743 100644
--- a/testcases/kernel/syscalls/access/access01.c
+++ b/testcases/kernel/syscalls/access/access01.c
@@ -130,7 +130,7 @@
 void setup();
 void cleanup();
 
-char *TCID = "access01";	/* Test program identifier.	*/
+char *TCID = "access01";	/* Test program identifier.     */
 int TST_TOTAL = 4;		/* Total number of test cases. */
 
 char Fname[255];
@@ -141,11 +141,11 @@
 	char *string;
 	int experrno;
 } Test_cases[] = {
-	{ Fname, F_OK, "F_OK", 0},
-	{ Fname, X_OK, "X_OK", 0},
-	{ Fname, W_OK, "W_OK", 0},
-	{ Fname, R_OK, "R_OK", 0},
-};
+	{
+	Fname, F_OK, "F_OK", 0}, {
+	Fname, X_OK, "X_OK", 0}, {
+	Fname, W_OK, "W_OK", 0}, {
+Fname, R_OK, "R_OK", 0},};
 
 int Ntc = sizeof(Test_cases) / sizeof(struct test_case_t);
 
@@ -177,19 +177,19 @@
 
 			/* check return code */
 			if (TEST_RETURN == -1 && Test_cases[tc].experrno == 0) {
-				tst_resm(TFAIL|TTERRNO,
-				    "access(%s, %s) failed",
-				    Test_cases[tc].file,
-				    Test_cases[tc].string);
+				tst_resm(TFAIL | TTERRNO,
+					 "access(%s, %s) failed",
+					 Test_cases[tc].file,
+					 Test_cases[tc].string);
 
 			} else if (TEST_RETURN != -1
 				   && Test_cases[tc].experrno != 0) {
 				tst_resm(TFAIL,
-				    "access(%s, %s) returned %ld, "
-				    "exp -1, errno:%d",
-				    Test_cases[tc].file,
-				    Test_cases[tc].string, TEST_RETURN,
-				    Test_cases[tc].experrno);
+					 "access(%s, %s) returned %ld, "
+					 "exp -1, errno:%d",
+					 Test_cases[tc].file,
+					 Test_cases[tc].string, TEST_RETURN,
+					 Test_cases[tc].experrno);
 			} else {
 
 				if (STD_FUNCTIONAL_TEST) {
@@ -227,25 +227,25 @@
 	 * to us.
 	 */
 	if (chown(".", -1, getegid()) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "chown(\".\", -1, %d) failed", getegid());
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "chown(\".\", -1, %d) failed", getegid());
 	}
 
 	sprintf(Fname, "accessfile");
 
 	fd = open(Fname, O_RDWR | O_CREAT, 06777);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			"open(%s, O_RDWR|O_CREAT, 06777) failed", Fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, 06777) failed", Fname);
 	else if (close(fd) == -1)
-		tst_resm(TINFO|TERRNO, "close(%s) failed", Fname);
+		tst_resm(TINFO | TERRNO, "close(%s) failed", Fname);
 
 	/*
 	 * force the mode to be set to 6777
 	 */
 	if (chmod(Fname, 06777) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, 06777) failed",
-		    Fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, 06777) failed",
+			 Fname);
 
 	stat(Fname, &stbuf);
 
diff --git a/testcases/kernel/syscalls/access/access02.c b/testcases/kernel/syscalls/access/access02.c
index 23d19a8..a324544 100644
--- a/testcases/kernel/syscalls/access/access02.c
+++ b/testcases/kernel/syscalls/access/access02.c
@@ -107,14 +107,17 @@
 	int (*setupfunc) ();
 } test_cases[] = {
 	/* Read access */
-	{ TEST_FILE1, R_OK, setup1 },
-	/* Write access */
-	{ TEST_FILE2, W_OK, setup2 },
-	/* Execute access */
-	{ TEST_FILE3, X_OK, setup3 },
-	/* Symlink */
-	{ SYM_FILE, W_OK, setup4 },
-};
+	{
+	TEST_FILE1, R_OK, setup1},
+	    /* Write access */
+	{
+	TEST_FILE2, W_OK, setup2},
+	    /* Execute access */
+	{
+	TEST_FILE3, X_OK, setup3},
+	    /* Symlink */
+	{
+SYM_FILE, W_OK, setup4},};
 
 void setup();
 void cleanup();
@@ -148,7 +151,7 @@
 			TEST(access(file_name, access_mode));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
+				tst_resm(TFAIL | TTERRNO,
 					 "access(%s, %#o) failed",
 					 file_name, access_mode);
 				continue;
@@ -176,9 +179,9 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TINFO|TERRNO, NULL, "setuid failed");
+		tst_brkm(TINFO | TERRNO, NULL, "setuid failed");
 
 	TEST_PAUSE;
 
@@ -201,16 +204,15 @@
 
 	/* Creat a test file under above directory created */
 	if ((fd1 = open(TEST_FILE1, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TEST_FILE1, FILE_MODE);
 	}
 
 	/* write some data into testfile */
 	if (write(fd1, write_buf, strlen(write_buf)) != strlen(write_buf)) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "write(%s) failed in setup1",
-			 TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "write(%s) failed in setup1", TEST_FILE1);
 	}
 
 	return 0;
@@ -227,7 +229,7 @@
 {
 	/* Creat a test file under temporary directory */
 	if ((fd2 = open(TEST_FILE2, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TEST_FILE2, FILE_MODE);
 	}
@@ -251,26 +253,26 @@
 
 	/* Creat a test file under temporary directory */
 	if ((fd3 = open(TEST_FILE3, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TEST_FILE3, FILE_MODE);
 	}
 #ifdef UCLINUX
 	if (write(fd3, exechead, sizeof(exechead)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "write(%s) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "write(%s) failed",
 			 TEST_FILE3);
 	}
 #endif
 
 	/* Close the test file created above */
 	if (close(fd3) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
 			 TEST_FILE3);
 	}
 
 	/* Set execute permission bits on the test file. */
 	if (chmod(TEST_FILE3, EXE_MODE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, %#o) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, %#o) failed",
 			 TEST_FILE3, EXE_MODE);
 	}
 
@@ -289,14 +291,14 @@
 {
 	/* Creat a temporary  file under temporary directory */
 	if ((fd4 = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TEMP_FILE, FILE_MODE);
 	}
 
 	/* Creat a symbolic link for temporary file */
 	if (symlink(TEMP_FILE, SYM_FILE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "symlink(%s, %s) failed", TEMP_FILE, SYM_FILE);
 	}
 
@@ -319,39 +321,40 @@
 
 	switch (i) {
 	case 0:		/*
-			 * The specified file has read access.
-			 * Attempt to read some data from the testfile
-			 * and if successful, access() behaviour is
-			 * correct.
-			 */
+				 * The specified file has read access.
+				 * Attempt to read some data from the testfile
+				 * and if successful, access() behaviour is
+				 * correct.
+				 */
 		if ((rval = read(fd1, &read_buf, sizeof(read_buf))) == -1)
-			tst_resm(TFAIL|TERRNO, "read(%s) failed", TEST_FILE1);
+			tst_resm(TFAIL | TERRNO, "read(%s) failed", TEST_FILE1);
 		break;
 	case 1:		/*
-			 * The specified file has write access.
-			 * Attempt to write some data to the testfile
-			 * and if successful, access() behaviour is correct.
-			 */
+				 * The specified file has write access.
+				 * Attempt to write some data to the testfile
+				 * and if successful, access() behaviour is correct.
+				 */
 		if ((rval = write(fd2, write_buf, strlen(write_buf))) == -1)
-			tst_resm(TFAIL|TERRNO, "write(%s) failed", TEST_FILE2);
+			tst_resm(TFAIL | TERRNO, "write(%s) failed",
+				 TEST_FILE2);
 		break;
 	case 2:		/*
-			 * The specified file has execute access.
-			 * Attempt to execute the specified executable
-			 * file, if successful, access() behaviour is correct.
-			 */
+				 * The specified file has execute access.
+				 * Attempt to execute the specified executable
+				 * file, if successful, access() behaviour is correct.
+				 */
 		if ((rval = system("./" TEST_FILE3)) != 0)
 			tst_resm(TFAIL, "Fail to execute the %s", TEST_FILE3);
 		break;
 	case 3:		/*
-			 * The file pointed to by symbolic link has
-			 * write access.
-			 * Attempt to write some data to this temporary file
-			 * pointed to by symlink. if successful, access() bahaviour
-			 * is correct.
-			 */
+				 * The file pointed to by symbolic link has
+				 * write access.
+				 * Attempt to write some data to this temporary file
+				 * pointed to by symlink. if successful, access() bahaviour
+				 * is correct.
+				 */
 		if ((rval = write(fd4, write_buf, strlen(write_buf))) == -1)
-			tst_resm(TFAIL|TERRNO, "write(%s) failed", TEMP_FILE);
+			tst_resm(TFAIL | TERRNO, "write(%s) failed", TEMP_FILE);
 		break;
 	default:
 		break;
@@ -376,11 +379,11 @@
 
 	/* Close the testfile(s) created in the setup()s */
 	if (close(fd1) == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "close(%s) failed", TEST_FILE1);
+		tst_brkm(TFAIL | TERRNO, NULL, "close(%s) failed", TEST_FILE1);
 	if (close(fd2) == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "close(%s) failed", TEST_FILE2);
+		tst_brkm(TFAIL | TERRNO, NULL, "close(%s) failed", TEST_FILE2);
 	if (close(fd4) == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "close(%s) failed", TEMP_FILE);
+		tst_brkm(TFAIL | TERRNO, NULL, "close(%s) failed", TEMP_FILE);
 
 	/*
 	 * Delete the test directory/file and temporary directory
diff --git a/testcases/kernel/syscalls/access/access03.c b/testcases/kernel/syscalls/access/access03.c
index f3c0682..b1b4d29 100644
--- a/testcases/kernel/syscalls/access/access03.c
+++ b/testcases/kernel/syscalls/access/access03.c
@@ -109,7 +109,7 @@
 static void setup(void);
 static void cleanup(void);
 
-char *TCID = "access03";	/* Test program identifier.	*/
+char *TCID = "access03";	/* Test program identifier.     */
 int TST_TOTAL = 8;		/* Total number of test cases. */
 
 int exp_enos[] = { EFAULT, 0 };	/* List must end with 0 */
@@ -178,12 +178,12 @@
 	TEST_PAUSE;
 
 	low_addr = mmap(0, 1, PROT_NONE,
-	    MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (low_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, NULL, "mmap failed");
+		tst_brkm(TBROK | TERRNO, NULL, "mmap failed");
 	high_addr = get_high_address();
 	if (high_addr == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "get_high_address failed");
+		tst_brkm(TBROK | TERRNO, NULL, "get_high_address failed");
 	high_addr++;
 
 	tst_tmpdir();
diff --git a/testcases/kernel/syscalls/access/access04.c b/testcases/kernel/syscalls/access/access04.c
index 9adb61c..b4c7cd9 100644
--- a/testcases/kernel/syscalls/access/access04.c
+++ b/testcases/kernel/syscalls/access/access04.c
@@ -110,18 +110,18 @@
 		TEST(access(TESTFILE, F_OK));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "access(%s, F_OK) failed",
-			    TESTFILE);
+			tst_resm(TFAIL | TTERRNO, "access(%s, F_OK) failed",
+				 TESTFILE);
 			continue;
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (stat(TESTFILE, &stat_buf) < 0) {
-				tst_resm(TFAIL|TERRNO, "stat(%s) failed",
-				    TESTFILE);
+				tst_resm(TFAIL | TERRNO, "stat(%s) failed",
+					 TESTFILE);
 			} else {
 				tst_resm(TPASS, "functionality of "
-				    "access(%s, F_OK) ok", TESTFILE);
+					 "access(%s, F_OK) ok", TESTFILE);
 			}
 		} else
 			tst_resm(TPASS, "call succeeded");
@@ -143,38 +143,35 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TINFO|TERRNO, NULL, "setuid failed");
+		tst_brkm(TINFO | TERRNO, NULL, "setuid failed");
 
 	TEST_PAUSE;
 
 	tst_tmpdir();
 
 	if (mkdir(TESTDIR, DIR_MODE) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s, %#o) failed",
 			 TESTDIR, DIR_MODE);
 
 	if (chmod(TESTDIR, DIR_MODE) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, %#o) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, %#o) failed",
 			 TESTDIR, DIR_MODE);
 
 	fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TESTFILE, FILE_MODE);
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "close(%s) failed",
-			 TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", TESTFILE);
 
 	if (chmod(TESTFILE, 0) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "chmod(%s, 0) failed",
-			 TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "chmod(%s, 0) failed", TESTFILE);
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/access/access05.c b/testcases/kernel/syscalls/access/access05.c
index 6fbd1e4..02262f5 100644
--- a/testcases/kernel/syscalls/access/access05.c
+++ b/testcases/kernel/syscalls/access/access05.c
@@ -114,19 +114,21 @@
 	char *pathname;
 	int a_mode;
 	int exp_errno;
-	void (*setupfunc)(void);
+	void (*setupfunc) (void);
 } test_cases[] = {
-	{ TEST_FILE1, R_OK, EACCES, setup1 },
-	{ TEST_FILE2, W_OK, EACCES, setup2 },
-	{ TEST_FILE3, X_OK, EACCES, setup3 },
-	{ TEST_FILE4, INV_OK, EINVAL, setup4 },
+	{
+	TEST_FILE1, R_OK, EACCES, setup1}, {
+	TEST_FILE2, W_OK, EACCES, setup2}, {
+	TEST_FILE3, X_OK, EACCES, setup3}, {
+	TEST_FILE4, INV_OK, EINVAL, setup4},
 #if !defined(UCLINUX)
-	{ (char *)-1, R_OK, EFAULT, NULL },
-	{ high_address_node, R_OK, EFAULT, NULL },
+	{
+	(char *)-1, R_OK, EFAULT, NULL}, {
+	high_address_node, R_OK, EFAULT, NULL},
 #endif
-	{ "", W_OK, ENOENT, NULL },
-	{ Longpathname, R_OK, ENAMETOOLONG, longpath_setup },
-};
+	{
+	"", W_OK, ENOENT, NULL}, {
+Longpathname, R_OK, ENAMETOOLONG, longpath_setup},};
 
 char *TCID = "access05";	/* Test program identifier.    */
 int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases);
@@ -177,20 +179,20 @@
 
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL,
-				    "access(%s, %#o) succeeded unexpectedly",
-				    file_name, access_mode);
+					 "access(%s, %#o) succeeded unexpectedly",
+					 file_name, access_mode);
 				continue;
 			}
 
 			if (TEST_ERRNO == test_cases[i].exp_errno)
-				tst_resm(TPASS|TTERRNO,
-				    "access failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "access failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "access failed unexpectedly; expected: "
-				    "%d - %s",
-				    test_cases[i].exp_errno,
-				    strerror(test_cases[i].exp_errno));
+				tst_resm(TFAIL | TTERRNO,
+					 "access failed unexpectedly; expected: "
+					 "%d - %s",
+					 test_cases[i].exp_errno,
+					 strerror(test_cases[i].exp_errno));
 		}
 	}
 
@@ -210,17 +212,17 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid failed");
 
 	TEST_PAUSE;
 
 #if !defined(UCLINUX)
 	bad_addr = mmap(0, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, NULL, "mmap failed");
+		tst_brkm(TBROK | TERRNO, NULL, "mmap failed");
 	test_cases[5].pathname = bad_addr;
 #endif
 
@@ -233,18 +235,18 @@
 
 void setup_file(const char *file, mode_t perms)
 {
-	int fd;		/* file handle for testfile */
+	int fd;			/* file handle for testfile */
 
 	if ((fd = open(file, O_RDWR | O_CREAT, FILE_MODE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 file, FILE_MODE);
 
 	if (fchmod(fd, perms) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, %#o) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, %#o) failed",
 			 file, perms);
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", file);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", file);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index 14f64da..462fd5a 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -59,12 +59,11 @@
 {
 
 	if (acct(NULL) == -1)
-		tst_resm(TBROK|TERRNO, "acct(NULL) failed");
+		tst_resm(TBROK | TERRNO, "acct(NULL) failed");
 
 	tst_rmdir();
 }
 
-
 static void setup(void)
 {
 
@@ -83,10 +82,10 @@
 	if (acct(NULL) == -1) {
 		if (errno == ENOSYS)
 			tst_brkm(TCONF, cleanup,
-			    "BSD process accounting is not configured in this "
-			    "kernel");
+				 "BSD process accounting is not configured in this "
+				 "kernel");
 		else
-			tst_brkm(TBROK|TERRNO, cleanup, "acct(NULL) failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "acct(NULL) failed");
 	}
 }
 
@@ -100,29 +99,29 @@
 	if (acct("/") == -1 && errno == EISDIR)
 		tst_resm(TPASS, "Failed with EISDIR as expected");
 	else
-		tst_brkm(TFAIL|TERRNO, cleanup,
-		    "didn't fail as expected; expected EISDIR");
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "didn't fail as expected; expected EISDIR");
 
 	/* EACCES */
 	if (acct("/dev/null") == -1 && errno == EACCES)
 		tst_resm(TPASS, "Failed with EACCES as expected");
 	else
-		tst_brkm(TFAIL|TERRNO, cleanup,
-		    "didn't fail as expected; expected EACCES");
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "didn't fail as expected; expected EACCES");
 
 	/* ENOENT */
 	if (acct("/tmp/does/not/exist") == -1 && errno == ENOENT)
 		tst_resm(TPASS, "Failed with ENOENT as expected");
 	else
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "didn't fail as expected; expected ENOENT");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "didn't fail as expected; expected ENOENT");
 
 	/* ENOTDIR */
 	if (acct("/etc/fstab/") == -1 && errno == ENOTDIR)
 		tst_resm(TPASS, "Failed with ENOTDIR as expected");
 	else
-		tst_brkm(TFAIL|TERRNO, cleanup,
-		    "didn't fail as expected; expected ENOTDIR");
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "didn't fail as expected; expected ENOTDIR");
 
 	/* EPERM */
 	sprintf(tmpbuf, "./%s.%d", TCID, getpid());
@@ -130,7 +129,7 @@
 	SAFE_CLOSE(cleanup, fd);
 
 	if (acct(tmpbuf) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "acct failed unexpectedly");
+		tst_brkm(TBROK | TERRNO, cleanup, "acct failed unexpectedly");
 
 	pwent = SAFE_GETPWNAM(cleanup, "nobody");
 	SAFE_SETEUID(cleanup, pwent->pw_uid);
@@ -138,8 +137,8 @@
 	if (acct(tmpbuf) == -1 && errno == EPERM)
 		tst_resm(TPASS, "Failed with EPERM as expected");
 	else
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "didn't fail as expected; expected EPERM");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "didn't fail as expected; expected EPERM");
 
 	SAFE_SETEUID(cleanup, 0);
 	SAFE_UNLINK(cleanup, tmpbuf);
diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c
index 6909467..ff3900d 100644
--- a/testcases/kernel/syscalls/acct/acct02.c
+++ b/testcases/kernel/syscalls/acct/acct02.c
@@ -77,7 +77,7 @@
 	/* Attempt to turn off acct as non-root
 	 */
 	if (acct(NULL) != -1) {
-		tst_resm(TBROK|TERRNO,
+		tst_resm(TBROK | TERRNO,
 			 "Non-root attempting to disable acct: didn't fail");
 		tst_exit();
 	}
@@ -89,7 +89,7 @@
 			tst_resm(TCONF, "Test will not run.");
 			tst_exit();
 		} else {
-			tst_resm(TBROK|TERRNO,
+			tst_resm(TBROK | TERRNO,
 				 "Non-root acct disable failed as we wanted EPERM errno");
 			tst_exit();
 		}
@@ -98,13 +98,13 @@
 
 //-------------------------------------------------
 	if (acct("/anystring") != -1) {
-		tst_resm(TBROK|TERRNO,
+		tst_resm(TBROK | TERRNO,
 			 "Non-root attempting to enable acct: didn't fail");
 		tst_exit();
 	}
 
 	if (errno != EPERM) {
-		tst_resm(TFAIL|TERRNO,
+		tst_resm(TFAIL | TERRNO,
 			 "Non-root acct enable failed as we wanted EPERM errno");
 		tst_exit();
 	} else
diff --git a/testcases/kernel/syscalls/add_key/add_key01.c b/testcases/kernel/syscalls/add_key/add_key01.c
index e98c1d2..3920129 100644
--- a/testcases/kernel/syscalls/add_key/add_key01.c
+++ b/testcases/kernel/syscalls/add_key/add_key01.c
@@ -48,8 +48,8 @@
 #include "linux_syscall_numbers.h"
 
 /* Global Variables */
-char *TCID = "add_key01";	/* Test program identifier.*/
-int  TST_TOTAL = 1;		/* total number of tests in this file.   */
+char *TCID = "add_key01";	/* Test program identifier. */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -69,7 +69,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -93,14 +94,16 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
@@ -109,9 +112,11 @@
 	setup();
 
 	/* Call add_key. */
-	TEST(syscall(__NR_add_key, "keyring", "wjkey", NULL, 0, KEY_SPEC_THREAD_KEYRING));
+	TEST(syscall
+	     (__NR_add_key, "keyring", "wjkey", NULL, 0,
+	      KEY_SPEC_THREAD_KEYRING));
 	if (TEST_RETURN == -1)
-		tst_resm(TFAIL|TTERRNO, "add_key call failed");
+		tst_resm(TFAIL | TTERRNO, "add_key call failed");
 	else
 		tst_resm(TPASS, "add_key call succeeded");
 
diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c
index 8b1464c..dc8fec1 100644
--- a/testcases/kernel/syscalls/add_key/add_key02.c
+++ b/testcases/kernel/syscalls/add_key/add_key02.c
@@ -50,9 +50,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "add_key02";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "add_key02";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -72,7 +72,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -96,7 +97,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -110,12 +112,14 @@
 	int plen;
 	int exp_errno;
 } test_cases[] = {
-	{ "user", "firstkey", NULL, 1, EINVAL }
+	{
+	"user", "firstkey", NULL, 1, EINVAL}
 };
 
 int test_count = sizeof(test_cases) / sizeof(struct test_case_t);
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 	int lc;
 	char *msg;
@@ -129,30 +133,30 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (i = 0; i<test_count; i++) {
+			for (i = 0; i < test_count; i++) {
 
 				/* Call add_key. */
 				TEST(syscall(__NR_add_key, test_cases[i].type,
-						test_cases[i].desc,
-						test_cases[i].payload,
-						test_cases[i].plen,
-						KEY_SPEC_USER_KEYRING));
+					     test_cases[i].desc,
+					     test_cases[i].payload,
+					     test_cases[i].plen,
+					     KEY_SPEC_USER_KEYRING));
 
 				if (TEST_RETURN != -1) {
 					tst_resm(TINFO,
-					    "add_key passed unexpectedly");
+						 "add_key passed unexpectedly");
 				} else {
 
 					if (errno == test_cases[i].exp_errno) {
-						tst_resm(TINFO|TTERRNO,
-							"called add_key() "
-							"with wrong args got "
-							"EXPECTED errno");
+						tst_resm(TINFO | TTERRNO,
+							 "called add_key() "
+							 "with wrong args got "
+							 "EXPECTED errno");
 					} else {
-						tst_resm(TFAIL|TTERRNO,
-							"called add_key() "
-							"with wrong args got "
-							"UNEXPECTED errno");
+						tst_resm(TFAIL | TTERRNO,
+							 "called add_key() "
+							 "with wrong args got "
+							 "UNEXPECTED errno");
 					}
 
 				}
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex01.c b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
index 79dae3b..c8a4592 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex01.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex01.c
@@ -108,7 +108,7 @@
 		if ((TEST_RETURN >= 0) && (TEST_RETURN <= 5)) {
 			tst_resm(TPASS, "adjtimex() returned %ld", TEST_RETURN);
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, adjtimex()"
+			tst_resm(TFAIL | TTERRNO, "Test Failed, adjtimex()"
 				 "returned %ld", TEST_RETURN);
 		}
 	}
@@ -132,8 +132,8 @@
 
 	/* Save current parameters in tim_save */
 	if ((adjtimex(&tim_save)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "failed to save current parameters");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "failed to save current parameters");
 }
 
 /*
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex02.c b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
index d980da6..9501191 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex02.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
@@ -112,6 +112,7 @@
 static struct timex tim_save;
 static struct timex buff;
 static int exp_enos[] = { EPERM, EINVAL, EFAULT, 0 };
+
 static char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -178,11 +179,12 @@
 
 			if ((TEST_RETURN == -1) && (TEST_ERRNO ==
 						    test_cases[i].exp_errno)) {
-				tst_resm(TPASS|TTERRNO,
+				tst_resm(TPASS | TTERRNO,
 					 "Test Passed, adjtimex() returned -1");
 			} else {
-				tst_resm(TFAIL|TTERRNO,
-					 "Test Failed, adjtimex() returned %ld", TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "Test Failed, adjtimex() returned %ld",
+					 TEST_RETURN);
 			}
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if (test_cases[i].cleanup) {
@@ -217,8 +219,7 @@
 	/* set the HZ from sysconf */
 	hz = sysconf(_SC_CLK_TCK);
 	if (hz == -1) {
-		tst_brkm(TBROK, NULL,
-			 "Failed to read the HZ from sysconf\n");
+		tst_brkm(TBROK, NULL, "Failed to read the HZ from sysconf\n");
 	}
 
 	TEST_PAUSE;
@@ -279,7 +280,7 @@
 		tst_brkm(TBROK, NULL, "\"nobody\" user not present");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TWARN|TERRNO, "seteuid(%d) failed", ltpuser->pw_uid);
+		tst_resm(TWARN | TERRNO, "seteuid(%d) failed", ltpuser->pw_uid);
 		return 1;
 	}
 	return 0;
@@ -289,7 +290,7 @@
 {
 	/* Set effective user id back to root */
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid failed to set the"
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid failed to set the"
 			 " effective uid to root");
 	}
 }
diff --git a/testcases/kernel/syscalls/alarm/alarm01.c b/testcases/kernel/syscalls/alarm/alarm01.c
index 03122b1..0ee4c95 100644
--- a/testcases/kernel/syscalls/alarm/alarm01.c
+++ b/testcases/kernel/syscalls/alarm/alarm01.c
@@ -142,7 +142,7 @@
 
 		/* check return code */
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "alarm(1) failed");
+			tst_resm(TFAIL | TTERRNO, "alarm(1) failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST) {
diff --git a/testcases/kernel/syscalls/alarm/alarm02.c b/testcases/kernel/syscalls/alarm/alarm02.c
index a1ced12..a4f9a23 100644
--- a/testcases/kernel/syscalls/alarm/alarm02.c
+++ b/testcases/kernel/syscalls/alarm/alarm02.c
@@ -133,21 +133,21 @@
 			alarm(0);
 			if (TEST_RETURN != 0)
 				tst_resm(TFAIL,
-				    "alarm(%lu) returned %ld, when %u was "
-				    "expected for value %s",
-				    sec[i], TEST_RETURN, exp[i], buf[i]);
+					 "alarm(%lu) returned %ld, when %u was "
+					 "expected for value %s",
+					 sec[i], TEST_RETURN, exp[i], buf[i]);
 			else if (STD_FUNCTIONAL_TEST) {
 				if (received_alarm == 1) {
 					tst_resm(TFAIL,
-					    "alarm(%lu) returned %ldu but an "
-					    "alarm signal was received for "
-					    "value %s",
-					    sec[i], TEST_RETURN, buf[i]);
+						 "alarm(%lu) returned %ldu but an "
+						 "alarm signal was received for "
+						 "value %s",
+						 sec[i], TEST_RETURN, buf[i]);
 				} else {
 					tst_resm(TPASS,
-					    "alarm(%lu) returned %ld as "
-					    "expected for value %s",
-					    sec[i], TEST_RETURN, buf[i]);
+						 "alarm(%lu) returned %ld as "
+						 "expected for value %s",
+						 sec[i], TEST_RETURN, buf[i]);
 				}
 
 			}
diff --git a/testcases/kernel/syscalls/alarm/alarm03.c b/testcases/kernel/syscalls/alarm/alarm03.c
index 6b77ad1..e4e8f63 100644
--- a/testcases/kernel/syscalls/alarm/alarm03.c
+++ b/testcases/kernel/syscalls/alarm/alarm03.c
@@ -129,7 +129,7 @@
 
 		switch (FORK_OR_VFORK()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() failed");
 			break;
 
 		case 0:
@@ -138,12 +138,12 @@
 			if (TEST_RETURN != 0) {
 				retval = 1;
 				printf("%d: alarm(100), fork, alarm(0) child's "
-				    "alarm returned %ld\n",
-				    getpid(), TEST_RETURN);
+				       "alarm returned %ld\n",
+				       getpid(), TEST_RETURN);
 			} else if (STD_FUNCTIONAL_TEST) {
 				printf("%d: alarm(100), fork, alarm(0) child's "
-				    "alarm returned %ld\n",
-				    getpid(), TEST_RETURN);
+				       "alarm returned %ld\n",
+				       getpid(), TEST_RETURN);
 			}
 
 			exit(retval);
@@ -164,7 +164,8 @@
 					 TEST_RETURN);
 			}
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_resm(TFAIL, "see failures reported above");
 
diff --git a/testcases/kernel/syscalls/alarm/alarm05.c b/testcases/kernel/syscalls/alarm/alarm05.c
index 87cefef..6f4daf8 100644
--- a/testcases/kernel/syscalls/alarm/alarm05.c
+++ b/testcases/kernel/syscalls/alarm/alarm05.c
@@ -78,7 +78,7 @@
 
 char *TCID = "alarm05";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
-int alarms_received = 0;		/* flag to indicate SIGALRM received or not */
+int alarms_received = 0;	/* flag to indicate SIGALRM received or not */
 
 void setup();			/* Main setup function of test */
 void cleanup();			/* cleanup function for the test */
diff --git a/testcases/kernel/syscalls/alarm/alarm06.c b/testcases/kernel/syscalls/alarm/alarm06.c
index 99545f2..5f05e4f 100644
--- a/testcases/kernel/syscalls/alarm/alarm06.c
+++ b/testcases/kernel/syscalls/alarm/alarm06.c
@@ -150,7 +150,7 @@
 
 	/* Set the signal catching function */
 	if (signal(SIGALRM, sigproc) == SIG_ERR)
-		tst_brkm(TFAIL|TERRNO, cleanup, "signal(SIGALRM, ..) failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "signal(SIGALRM, ..) failed");
 }
 
 void sigproc(int sig)
diff --git a/testcases/kernel/syscalls/alarm/alarm07.c b/testcases/kernel/syscalls/alarm/alarm07.c
index 414abb6..d2ced82 100644
--- a/testcases/kernel/syscalls/alarm/alarm07.c
+++ b/testcases/kernel/syscalls/alarm/alarm07.c
@@ -108,7 +108,7 @@
 		/* Now, fork a child process */
 		cpid = FORK_OR_VFORK();
 		if (cpid < 0) {
-			tst_resm(TFAIL|TERRNO, "fork() failed");
+			tst_resm(TFAIL | TERRNO, "fork() failed");
 		}
 
 		sleep(sleep_time);
@@ -119,19 +119,19 @@
 					exit(0);
 				else {
 					printf("alarm request not cleared in "
-					    "child; alarms received:%d\n",
-					    alarms_received);
+					       "child; alarms received:%d\n",
+					       alarms_received);
 					exit(1);
 				}
 			} else {
 				/* Wait for child to complete execution */
 				if (wait(&status) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				if (!WIFEXITED(status) ||
 				    WEXITSTATUS(status) != 0)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "child exited abnormally");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "child exited abnormally");
 			}
 		} else
 			tst_resm(TPASS, "call returned %ld", TEST_RETURN);
@@ -155,7 +155,7 @@
 
 	/* Set the signal catching function */
 	if (signal(SIGALRM, sigproc) == SIG_ERR) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "signal(SIGALRM, ..) failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "signal(SIGALRM, ..) failed");
 	}
 }
 
diff --git a/testcases/kernel/syscalls/asyncio/asyncio02.c b/testcases/kernel/syscalls/asyncio/asyncio02.c
index 41012c2..feca8b4 100644
--- a/testcases/kernel/syscalls/asyncio/asyncio02.c
+++ b/testcases/kernel/syscalls/asyncio/asyncio02.c
@@ -123,6 +123,7 @@
 int TST_TOTAL = 6;		/* Total number of test cases. */
 
 int exp_enos[] = { 0 };		/* Array of expected errnos */
+
 char *filename;			/* name of the temporary file */
 
 char *Progname;
@@ -198,7 +199,7 @@
 				if ((ret_val =
 				     testrun(Flags[flag_cnt], i, 3)) != OK) {
 					tst_resm(TFAIL, ERR_MSG2, ret_val,
-						      i * WRITES);
+						 i * WRITES);
 				}
 			}
 
@@ -224,7 +225,7 @@
 	 */
 
 	if ((fildes = open(filename, flag, MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "open(%s) failed", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s) failed", filename);
 	}
 
 	/*
@@ -235,7 +236,7 @@
 		TEST(write(fildes, dp, (unsigned)bytes));
 
 		if (TEST_RETURN == -1) {
-			tst_brkm(TBROK|TTERRNO, cleanup, "write() failed");
+			tst_brkm(TBROK | TTERRNO, cleanup, "write() failed");
 		}
 	}			/* end for () */
 
@@ -244,7 +245,7 @@
 	 */
 
 	if (close(fildes) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "close() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close() failed");
 	}
 
 	ret = OK;
@@ -256,7 +257,7 @@
 		 */
 
 		if (stat(filename, &buffer) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "stat() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "stat() failed");
 		}
 
 		if (buffer.st_size != (off_t) (bytes * WRITES)) {
@@ -265,7 +266,8 @@
 	}
 
 	if (unlink(filename) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "unlink(%s) failed", filename);
+		tst_brkm(TBROK | TERRNO, cleanup, "unlink(%s) failed",
+			 filename);
 	}
 
 	return ret;
@@ -293,7 +295,7 @@
 	 */
 
 	if ((dp = (char *)malloc((unsigned)BUFSIZ + 1)) == NULL) {
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc() failed");
 	}
 
 }
diff --git a/testcases/kernel/syscalls/bdflush/bdflush01.c b/testcases/kernel/syscalls/bdflush/bdflush01.c
index 007eacd..e424558 100644
--- a/testcases/kernel/syscalls/bdflush/bdflush01.c
+++ b/testcases/kernel/syscalls/bdflush/bdflush01.c
@@ -88,20 +88,23 @@
 #include "linux_syscall_numbers.h"
 
 char *TCID = "bdflush01";
-int  testno;
-int  TST_TOTAL = 1;
+int testno;
+int TST_TOTAL = 1;
 
-void cleanup() {
-        TEST_CLEANUP;
-        tst_rmdir();
+void cleanup()
+{
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
-void setup() {
+void setup()
+{
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	long data;
 	char *msg;
 
@@ -119,7 +122,7 @@
 	for (testno = 0; testno < TST_TOTAL; ++testno) {
 		TEST(syscall(__NR_bdflush, 3, data));
 		if (TEST_RETURN == -1)
-			tst_brkm(TFAIL|TTERRNO, cleanup, "bdflush failed");
+			tst_brkm(TFAIL | TTERRNO, cleanup, "bdflush failed");
 		else
 			tst_resm(TPASS, "bdflush() = %ld", TEST_RETURN);
 	}
diff --git a/testcases/kernel/syscalls/bind/bind01.c b/testcases/kernel/syscalls/bind/bind01.c
index d832012..29ef046 100644
--- a/testcases/kernel/syscalls/bind/bind01.c
+++ b/testcases/kernel/syscalls/bind/bind01.c
@@ -106,7 +106,6 @@
 
 int exp_enos[] = { EFAULT, EINVAL, ENOTSOCK, EADDRINUSE, EADDRNOTAVAIL, 0 };
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
@@ -191,7 +190,8 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket() failed for bind test %d", testno);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "socket() failed for bind test %d", testno);
 }
 
 void cleanup0(void)
@@ -203,7 +203,7 @@
 {
 	/* setup for the "not a socket" case */
 	if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 
 }
 
diff --git a/testcases/kernel/syscalls/bind/bind02.c b/testcases/kernel/syscalls/bind/bind02.c
index bb19bb6..e7c6337 100644
--- a/testcases/kernel/syscalls/bind/bind02.c
+++ b/testcases/kernel/syscalls/bind/bind02.c
@@ -81,16 +81,16 @@
 
 	// Set effective user/group
 	if ((rc = setegid(gid)) == -1) {
-		tst_brkm(TBROK|TERRNO, 0, "setegid(%u) failed", gid);
+		tst_brkm(TBROK | TERRNO, 0, "setegid(%u) failed", gid);
 		tst_exit();
 	}
 	if ((rc = seteuid(uid)) == -1) {
-		tst_brkm(TBROK|TERRNO, 0, "seteuid(%u) failed", uid);
+		tst_brkm(TBROK | TERRNO, 0, "seteuid(%u) failed", uid);
 		tst_exit();
 	}
 
 	if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-		tst_brkm(TBROK|TERRNO, 0, "socket() failed");
+		tst_brkm(TBROK | TERRNO, 0, "socket() failed");
 		tst_exit();
 	}
 
@@ -113,14 +113,14 @@
 
 	// Set effective user/group
 	if ((rc = setegid(0)) == -1) {
-		tst_brkm(TBROK|TERRNO, 0, "setegid(0) reset failed");
+		tst_brkm(TBROK | TERRNO, 0, "setegid(0) reset failed");
 		tst_exit();
 	}
 	if ((rc = seteuid(uid)) == -1) {
 		/* XXX: is this seteuid() correct !?  it isnt a reset if we
 		 *      made the same exact call above ...
 		 */
-		tst_brkm(TBROK|TERRNO, 0, "seteuid(%u) reset failed", uid);
+		tst_brkm(TBROK | TERRNO, 0, "seteuid(%u) reset failed", uid);
 		tst_exit();
 	}
 
@@ -147,7 +147,7 @@
 	}
 
 	if ((gr = getgrgid(pw->pw_gid)) == NULL) {
-		tst_brkm(TBROK|TERRNO, 0, "getgrgid(%u) failed", pw->pw_gid);
+		tst_brkm(TBROK | TERRNO, 0, "getgrgid(%u) failed", pw->pw_gid);
 		tst_exit();
 	}
 
diff --git a/testcases/kernel/syscalls/brk/brk01.c b/testcases/kernel/syscalls/brk/brk01.c
index 0ad2e88..44c3ce6 100644
--- a/testcases/kernel/syscalls/brk/brk01.c
+++ b/testcases/kernel/syscalls/brk/brk01.c
@@ -190,7 +190,7 @@
 		if (TEST_RETURN == -1) {
 
 			aft_brk_val = (long)sbrk(0);
-			tst_resm(TFAIL|TTERRNO,
+			tst_resm(TFAIL | TTERRNO,
 				 "brk(%ld) failed (size before %ld, after %ld)",
 				 nbrkpt, cur_brk_val, aft_brk_val);
 
@@ -234,13 +234,13 @@
 	   tst_brkm(TBROK|TERRNO, cleanup, "ulimit(3,0) failed"); */
 
 	if (getrlimit(RLIMIT_DATA, &lim) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "getrlimit(RLIMIT_DATA,%p) failed", &lim);
 	ulim_sz = lim.rlim_cur;
 
 #ifdef CRAY
 	if ((usr_mem_sz = sysconf(_SC_CRAY_USRMEM)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "sysconf(_SC_CRAY_USRMEM) failed");
 
 	usr_mem_sz *= 8;	/* convert to bytes */
@@ -256,7 +256,8 @@
 #define _SC_NPROC_ONLN _SC_NPROCESSORS_ONLN
 #endif
 	if ((ncpus = sysconf(_SC_NPROC_ONLN)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "sysconf(_SC_NPROC_ONLN) failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "sysconf(_SC_NPROC_ONLN) failed");
 
 	/*
 	 * allow 2*ncpus copies to run.
diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
index 7af346d..1ec2f5d 100644
--- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
+++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
@@ -55,10 +55,10 @@
 /* Fake linux_syscall_numbers.h */
 #define __NR_cacheflush		0
 #ifndef   ICACHE
-#define   ICACHE   (1<<0)		/* flush instruction cache        */
+#define   ICACHE   (1<<0)	/* flush instruction cache        */
 #endif
 #ifndef   DCACHE
-#define   DCACHE   (1<<1)		/* writeback and flush data cache */
+#define   DCACHE   (1<<1)	/* writeback and flush data cache */
 #endif
 #ifndef   BCACHE
 #define   BCACHE   (ICACHE|DCACHE)	/* flush both caches              */
@@ -68,8 +68,8 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "cacheflush01";	/* Test program identifier.*/
-int  TST_TOTAL = 1;		/* total number of tests in this file.   */
+char *TCID = "cacheflush01";	/* Test program identifier. */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -89,10 +89,11 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
@@ -113,11 +114,12 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 int main(int ac, char **av)
@@ -126,12 +128,12 @@
 	char *addr = NULL;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-        }
+	}
 
-        setup();
+	setup();
 
 	Tst_count = 0;
 	/* Create some user address range */
@@ -163,5 +165,5 @@
 	}
 
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/capget/capget01.c b/testcases/kernel/syscalls/capget/capget01.c
index 9323704..af934ff 100644
--- a/testcases/kernel/syscalls/capget/capget01.c
+++ b/testcases/kernel/syscalls/capget/capget01.c
@@ -105,7 +105,8 @@
 		if (TEST_RETURN == 0) {
 			tst_resm(TPASS, "capget() returned %ld", TEST_RETURN);
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, capget() returned %ld",
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, capget() returned %ld",
 				 TEST_RETURN);
 		}
 	}
diff --git a/testcases/kernel/syscalls/capget/capget02.c b/testcases/kernel/syscalls/capget/capget02.c
index 20a1105..d41ed42 100644
--- a/testcases/kernel/syscalls/capget/capget02.c
+++ b/testcases/kernel/syscalls/capget/capget02.c
@@ -108,12 +108,14 @@
 } test_cases[] = {
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
-	{ (cap_user_header_t) - 1, &data, EFAULT, "EFAULT"},
-	{ &header, (cap_user_data_t) - 1, EFAULT, "EFAULT"},
+	{
+	(cap_user_header_t) - 1, &data, EFAULT, "EFAULT"}, {
+	&header, (cap_user_data_t) - 1, EFAULT, "EFAULT"},
 #endif
-	{ &header, &data, EINVAL, "EINVAL"},
-	{ &header, &data, EINVAL, "EINVAL"},
-	{ &header, &data, ESRCH, "ESRCH"}
+	{
+	&header, &data, EINVAL, "EINVAL"}, {
+	&header, &data, EINVAL, "EINVAL"}, {
+	&header, &data, ESRCH, "ESRCH"}
 };
 
 int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
@@ -136,16 +138,16 @@
 		for (i = 0; i < TST_TOTAL; ++i) {
 			test_setup(i);
 			TEST(syscall(__NR_capget, test_cases[i].headerp,
-				    test_cases[i].datap));
+				     test_cases[i].datap));
 
 			if (TEST_RETURN == -1 &&
 			    TEST_ERRNO == test_cases[i].exp_errno) {
-				tst_resm(TPASS|TTERRNO,
-				    "capget failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "capget failed as expected");
 			} else {
-				tst_resm(TFAIL|TTERRNO,
-				    "capget failed unexpectedly (%ld)",
-				    TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "capget failed unexpectedly (%ld)",
+					 TEST_RETURN);
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/capset/capset01.c b/testcases/kernel/syscalls/capset/capset01.c
index 5bca063..e9e3df1 100644
--- a/testcases/kernel/syscalls/capset/capset01.c
+++ b/testcases/kernel/syscalls/capset/capset01.c
@@ -116,7 +116,8 @@
 		if (TEST_RETURN == 0) {
 			tst_resm(TPASS, "capset() returned %ld", TEST_RETURN);
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, capset() returned %ld"
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, capset() returned %ld"
 				 " Maybe you need to do `modprobe capability`?",
 				 TEST_RETURN);
 		}
@@ -132,14 +133,14 @@
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
-        TEST_EXP_ENOS(exp_enos);
+	TEST_EXP_ENOS(exp_enos);
 
 	TEST_PAUSE;
 
 	header.version = _LINUX_CAPABILITY_VERSION;
 	header.pid = 0;
 	if (syscall(__NR_capget, &header, &data) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "capget() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "capget() failed");
 	}
 
 }
diff --git a/testcases/kernel/syscalls/capset/capset02.c b/testcases/kernel/syscalls/capset/capset02.c
index 9fcbb71..e0c5246 100644
--- a/testcases/kernel/syscalls/capset/capset02.c
+++ b/testcases/kernel/syscalls/capset/capset02.c
@@ -118,12 +118,13 @@
 } test_cases[] = {
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
-	{ (cap_user_header_t) -1, &data, EFAULT, "EFAULT" },
-	{ &header, (cap_user_data_t) -1, EFAULT, "EFAULT" },
+	{
+	(cap_user_header_t) - 1, &data, EFAULT, "EFAULT"}, {
+	&header, (cap_user_data_t) - 1, EFAULT, "EFAULT"},
 #endif
-	{ &header, &data, EINVAL, "EINVAL" },
-	{ &header, &data, EPERM, "EPERM" },
-};
+	{
+	&header, &data, EINVAL, "EINVAL"}, {
+&header, &data, EPERM, "EPERM"},};
 
 int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
 
@@ -151,20 +152,20 @@
 		i = 0;
 #endif
 
-		for ( ; i < TST_TOTAL; i++) {
+		for (; i < TST_TOTAL; i++) {
 
 			test_setup(i, av[0]);
 			TEST(syscall(__NR_capset, test_cases[i].headerp,
-				    test_cases[i].datap));
+				     test_cases[i].datap));
 
 			if (TEST_RETURN == -1 &&
 			    TEST_ERRNO == test_cases[i].exp_errno) {
 				tst_resm(TPASS, "capset() returned -1,"
 					 " errno: %s", test_cases[i].errdesc);
 			} else {
-				tst_resm(TFAIL|TTERRNO,
-				    "Test Failed, capset() returned %ld",
-				    TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "Test Failed, capset() returned %ld",
+					 TEST_RETURN);
 			}
 		}
 	}
@@ -188,7 +189,7 @@
 	 */
 	header.version = _LINUX_CAPABILITY_VERSION;
 	if (syscall(__NR_capget, &header, &data) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "capget failed");
+		tst_brkm(TBROK | TERRNO, NULL, "capget failed");
 	}
 
 }
@@ -242,7 +243,7 @@
 		 */
 		child_pid = FORK_OR_VFORK();
 		if (child_pid == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 		else if (child_pid == 0) {
 #ifdef UCLINUX
 			if (self_exec(argv0, "") < 0) {
@@ -256,11 +257,11 @@
 			header.pid = child_pid;
 			ltpuser = getpwnam(nobody_uid);
 			if (ltpuser == NULL)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "getpwnam failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "getpwnam failed");
 			if (seteuid(ltpuser->pw_uid) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "seteuid failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "seteuid failed");
 
 		}
 		break;
diff --git a/testcases/kernel/syscalls/chdir/chdir01.c b/testcases/kernel/syscalls/chdir/chdir01.c
index 7ebb72d..f678f35 100644
--- a/testcases/kernel/syscalls/chdir/chdir01.c
+++ b/testcases/kernel/syscalls/chdir/chdir01.c
@@ -95,13 +95,13 @@
 		fd = SAFE_CREAT(cleanup, filname, 0000);
 		SAFE_CLOSE(cleanup, fd);
 		if ((ddir = opendir(".")) == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "opendir(.) failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "opendir(.) failed");
 
 		filenames[0] = ".";
 		filenames[1] = "..";
 		filenames[2] = filname;
 		checknames(filenames, sizeof(filenames) / sizeof(filenames[0]),
-		    ddir);
+			   ddir);
 		closedir(ddir);
 
 		TEST(chdir(filname));
@@ -109,14 +109,14 @@
 		if (TEST_RETURN != -1)
 			tst_resm(TFAIL, "call succeeded unexpectedly");
 		else if (TEST_ERRNO != ENOTDIR)
-			tst_resm(TFAIL|TTERRNO,
-			    "failed unexpectedly; wanted ENOTDIR");
+			tst_resm(TFAIL | TTERRNO,
+				 "failed unexpectedly; wanted ENOTDIR");
 		else
-			tst_resm(TPASS,
-			    "failed as expected with ENOTDIR");
+			tst_resm(TPASS, "failed as expected with ENOTDIR");
 
 		if (unlink(filname) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "Couldn't remove file");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "Couldn't remove file");
 
 		SAFE_CHDIR(cleanup, "..");
 
@@ -150,7 +150,7 @@
 	tst_rmdir();
 }
 
-void checknames(char **pfilnames, int fnamecount, DIR *ddir)
+void checknames(char **pfilnames, int fnamecount, DIR * ddir)
 {
 	struct dirent *dir;
 	int i, found;
diff --git a/testcases/kernel/syscalls/chdir/chdir02.c b/testcases/kernel/syscalls/chdir/chdir02.c
index be2ac92..6cabbde 100644
--- a/testcases/kernel/syscalls/chdir/chdir02.c
+++ b/testcases/kernel/syscalls/chdir/chdir02.c
@@ -144,8 +144,8 @@
 		TEST(chdir(dirs[lc % 2]));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "chdir(%s) failed",
-			    dirs[lc % 2]);
+			tst_resm(TFAIL | TTERRNO, "chdir(%s) failed",
+				 dirs[lc % 2]);
 		} else {
 
 			if (STD_FUNCTIONAL_TEST) {
diff --git a/testcases/kernel/syscalls/chdir/chdir03.c b/testcases/kernel/syscalls/chdir/chdir03.c
index c20872f..f8fb160 100644
--- a/testcases/kernel/syscalls/chdir/chdir03.c
+++ b/testcases/kernel/syscalls/chdir/chdir03.c
@@ -151,14 +151,15 @@
 
 		} else {
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_brkm(TBROK, cleanup,
-				    "child exited abnormally");
+					 "child exited abnormally");
 		}
 		if (rmdir(good_dir) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "rmdir(%s) failed", good_dir);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "rmdir(%s) failed", good_dir);
 		}
 	}
 
@@ -180,7 +181,7 @@
 	tst_tmpdir();
 
 	if ((cur_dir = getcwd(cur_dir, 0)) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getcwd failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getcwd failed");
 
 	sprintf(good_dir, "%s/%d", cur_dir, getpid());
 
diff --git a/testcases/kernel/syscalls/chdir/chdir04.c b/testcases/kernel/syscalls/chdir/chdir04.c
index 21b2184..774b8ff 100644
--- a/testcases/kernel/syscalls/chdir/chdir04.c
+++ b/testcases/kernel/syscalls/chdir/chdir04.c
@@ -78,12 +78,14 @@
 	 * to test whether chdir() is setting ENAMETOOLONG if the
 	 * directory is more than VFS_MAXNAMELEN
 	 */
-	{ bad_dir, ENAMETOOLONG},
+	{
+	bad_dir, ENAMETOOLONG},
 	    /*
 	     * to test whether chdir() is setting ENOENT if the
 	     * directory is not existing.
 	     */
-	{ noexist_dir, ENOENT},
+	{
+	noexist_dir, ENOENT},
 #ifndef UCLINUX
 	    /*
 	     * to test whether chdir() is setting EFAULT if the
@@ -130,11 +132,11 @@
 			}
 
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO, "failed as expected");
+				tst_resm(TPASS | TTERRNO, "failed as expected");
 			else {
-				tst_resm(TFAIL|TTERRNO,
-				    "didn't fail as expected (expected %d)",
-				    TC[i].error);
+				tst_resm(TFAIL | TTERRNO,
+					 "didn't fail as expected (expected %d)",
+					 TC[i].error);
 			}
 		}
 	}
@@ -155,9 +157,9 @@
 
 #ifdef UCLINUX
 	bad_addr = mmap(0, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap() failed");
 	TC[2].dname = bad_addr;
 #endif
 }
diff --git a/testcases/kernel/syscalls/chmod/change_owner.c b/testcases/kernel/syscalls/chmod/change_owner.c
index dd8ce3d..22c4d61 100644
--- a/testcases/kernel/syscalls/chmod/change_owner.c
+++ b/testcases/kernel/syscalls/chmod/change_owner.c
@@ -46,8 +46,8 @@
 
 	if (argc != 3) {
 		fprintf(stderr,
-		    "This is a helper binary meant for internal LTP usage "
-		    "only\n");
+			"This is a helper binary meant for internal LTP usage "
+			"only\n");
 		exit(1);
 	}
 
diff --git a/testcases/kernel/syscalls/chmod/chmod01.c b/testcases/kernel/syscalls/chmod/chmod01.c
index 9a48b5f..90d6036 100644
--- a/testcases/kernel/syscalls/chmod/chmod01.c
+++ b/testcases/kernel/syscalls/chmod/chmod01.c
@@ -115,14 +115,15 @@
 			TEST(chmod(TESTFILE, mode));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
-				    "chmod(%s, %#o) failed", TESTFILE, mode);
+				tst_resm(TFAIL | TTERRNO,
+					 "chmod(%s, %#o) failed", TESTFILE,
+					 mode);
 				continue;
 			}
 			if (STD_FUNCTIONAL_TEST) {
 				if (stat(TESTFILE, &stat_buf) < 0)
-					tst_brkm(TFAIL|TERRNO, cleanup,
-					    "stat(%s) failed", TESTFILE);
+					tst_brkm(TFAIL | TERRNO, cleanup,
+						 "stat(%s) failed", TESTFILE);
 				stat_buf.st_mode &= ~S_IFREG;
 
 				if (stat_buf.st_mode == mode)
@@ -155,13 +156,13 @@
 
 	tst_tmpdir();
 
-	fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE);
+	fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT, %o) failed",
-		    TESTFILE, FILE_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, %o) failed",
+			 TESTFILE, FILE_MODE);
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", TESTFILE);
 
 }
 
diff --git a/testcases/kernel/syscalls/chmod/chmod02.c b/testcases/kernel/syscalls/chmod/chmod02.c
index 4d0e6b3..9462fc6 100644
--- a/testcases/kernel/syscalls/chmod/chmod02.c
+++ b/testcases/kernel/syscalls/chmod/chmod02.c
@@ -153,9 +153,8 @@
 			TEST(chmod(fname, mode));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
-					 "chmod(%s, %#o) failed",
-					 fname, mode);
+				tst_resm(TFAIL | TTERRNO,
+					 "chmod(%s, %#o) failed", fname, mode);
 			} else {
 
 				if (STD_FUNCTIONAL_TEST) {
@@ -186,17 +185,13 @@
 
 	strcat(fname, "tfile");
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) failed",
-			 fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 	} else if (write(fd, &buf, strlen(buf)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "write(%s, &buf, strlen(buf)) failed",
-			 fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "write(%s, &buf, strlen(buf)) failed", fname);
 	} else if (close(fd) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "close(%s) failed",
-			 fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", fname);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/chmod/chmod03.c b/testcases/kernel/syscalls/chmod/chmod03.c
index 15ae651..f81a626 100644
--- a/testcases/kernel/syscalls/chmod/chmod03.c
+++ b/testcases/kernel/syscalls/chmod/chmod03.c
@@ -116,15 +116,15 @@
 		TEST(chmod(TESTFILE, PERMS));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "chmod(%s, %#o) failed",
+			tst_resm(TFAIL | TTERRNO, "chmod(%s, %#o) failed",
 				 TESTFILE, PERMS);
 			continue;
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (stat(TESTFILE, &stat_buf) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "stat(%s) failed", TESTFILE);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "stat(%s) failed", TESTFILE);
 			}
 			file_mode = stat_buf.st_mode;
 
@@ -155,9 +155,10 @@
 	tst_require_root(NULL);
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid(%u) failed", ltpuser->pw_uid);
+		tst_brkm(TBROK | TERRNO, NULL, "setuid(%u) failed",
+			 ltpuser->pw_uid);
 
 	TEST_PAUSE;
 
@@ -168,15 +169,14 @@
 	 * mode permissios and set the ownership of the test file to the
 	 * uid/gid of guest user.
 	 */
-	if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TESTFILE, FILE_MODE);
 	}
 
 	if (close(fd) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed",
-			 TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", TESTFILE);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/chmod/chmod04.c b/testcases/kernel/syscalls/chmod/chmod04.c
index 6734854..18b2f24 100644
--- a/testcases/kernel/syscalls/chmod/chmod04.c
+++ b/testcases/kernel/syscalls/chmod/chmod04.c
@@ -120,7 +120,7 @@
 		TEST(chmod(TESTDIR, PERMS));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "chmod(%s, %#o) failed",
+			tst_resm(TFAIL | TTERRNO, "chmod(%s, %#o) failed",
 				 TESTDIR, PERMS);
 			continue;
 		}
@@ -173,7 +173,7 @@
 	tst_require_root(NULL);
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_resm(TINFO|TERRNO, "setuid(%u) failed", ltpuser->pw_uid);
+		tst_resm(TINFO | TERRNO, "setuid(%u) failed", ltpuser->pw_uid);
 
 	TEST_PAUSE;
 
diff --git a/testcases/kernel/syscalls/chmod/chmod05.c b/testcases/kernel/syscalls/chmod/chmod05.c
index c9b33ef..6cfced3 100644
--- a/testcases/kernel/syscalls/chmod/chmod05.c
+++ b/testcases/kernel/syscalls/chmod/chmod05.c
@@ -85,7 +85,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <stdio.h>
@@ -149,9 +149,8 @@
 			 * stat(2).
 			 */
 			if (stat(TESTDIR, &stat_buf) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "stat(%s) failed",
-				    TESTDIR);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "stat(%s) failed", TESTDIR);
 			}
 			dir_mode = stat_buf.st_mode;
 #if DEBUG
@@ -204,11 +203,12 @@
 
 	nobody_u = getpwnam("nobody");
 	if (nobody_u == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam(\"nobody\") failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "getpwnam(\"nobody\") failed");
 
 	bin_group = getgrnam("bin");
 	if (bin_group == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getgrnam(\"bin\") failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getgrnam(\"bin\") failed");
 
 	/*
 	 * Create a test directory under temporary directory with specified
@@ -216,20 +216,20 @@
 	 * gid.
 	 */
 	if (mkdir(TESTDIR, MODE_RWX) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s) failed", TESTDIR);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s) failed", TESTDIR);
 
 	if (setgroups(1, &nobody_u->pw_gid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "setgroups to nobody's gid failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "setgroups to nobody's gid failed");
 
 	if (chown(TESTDIR, nobody_u->pw_uid, bin_group->gr_gid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "chowning testdir to nobody:bin failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "chowning testdir to nobody:bin failed");
 
 	/* change to nobody:nobody */
 	if (setegid(nobody_u->pw_gid) == -1 || seteuid(nobody_u->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "Couldn't switch to nobody:nobody");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "Couldn't switch to nobody:nobody");
 }
 
 void cleanup()
@@ -237,9 +237,9 @@
 	TEST_CLEANUP;
 
 	if (setegid(0) == -1)
-		tst_resm(TWARN|TERRNO, "setegid(0) failed");
+		tst_resm(TWARN | TERRNO, "setegid(0) failed");
 	if (seteuid(0) == -1)
-		tst_resm(TWARN|TERRNO, "seteuid(0) failed");
+		tst_resm(TWARN | TERRNO, "seteuid(0) failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/chmod/chmod06.c b/testcases/kernel/syscalls/chmod/chmod06.c
index db12d35..2598c3f 100644
--- a/testcases/kernel/syscalls/chmod/chmod06.c
+++ b/testcases/kernel/syscalls/chmod/chmod06.c
@@ -77,7 +77,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <stdio.h>
@@ -103,10 +103,10 @@
 #define TEST_FILE2	"testdir_1/tfile_2"
 #define TEST_FILE3	"t_file/tfile_3"
 
-int setup1();		/* setup function to test chmod for EPERM */
-int setup2();		/* setup function to test chmod for EACCES */
-int setup3();		/* setup function to test chmod for ENOTDIR */
-int longpath_setup();	/* setup function to test chmod for ENAMETOOLONG */
+int setup1();			/* setup function to test chmod for EPERM */
+int setup2();			/* setup function to test chmod for EACCES */
+int setup3();			/* setup function to test chmod for ENOTDIR */
+int longpath_setup();		/* setup function to test chmod for ENAMETOOLONG */
 
 char *test_home;		/* variable to hold TESTHOME env. */
 char Longpathname[PATH_MAX + 2];
@@ -119,22 +119,29 @@
 	int (*setupfunc) ();
 } test_cases[] = {
 	/* Process not owner/root */
-	{ TEST_FILE1, FILE_MODE, EPERM, setup1},
-	/* No search permissions to process */
-	{ TEST_FILE2, FILE_MODE, EACCES, setup2},
-	/* Address beyond address space */
-	{ High_address_node, FILE_MODE, EFAULT, NULL },
-	/* Negative address #1 */
-	{ (char *)-1, FILE_MODE, EFAULT, NULL },
-	/* Negative address #2 */
-	{ (char *)-2, FILE_MODE, EFAULT, NULL },
-	/* Pathname too long. */
-	{ Longpathname, FILE_MODE, ENAMETOOLONG, longpath_setup},
-	/* Pathname empty. */
-	{ "", FILE_MODE, ENOENT, NULL },
-	/* Pathname contains a regular file. */
-	{ TEST_FILE3, FILE_MODE, ENOTDIR, setup3 },
-};
+	{
+	TEST_FILE1, FILE_MODE, EPERM, setup1},
+	    /* No search permissions to process */
+	{
+	TEST_FILE2, FILE_MODE, EACCES, setup2},
+	    /* Address beyond address space */
+	{
+	High_address_node, FILE_MODE, EFAULT, NULL},
+	    /* Negative address #1 */
+	{
+	(char *)-1, FILE_MODE, EFAULT, NULL},
+	    /* Negative address #2 */
+	{
+	(char *)-2, FILE_MODE, EFAULT, NULL},
+	    /* Pathname too long. */
+	{
+	Longpathname, FILE_MODE, ENAMETOOLONG, longpath_setup},
+	    /* Pathname empty. */
+	{
+	"", FILE_MODE, ENOENT, NULL},
+	    /* Pathname contains a regular file. */
+	{
+TEST_FILE3, FILE_MODE, ENOTDIR, setup3},};
 
 char *TCID = "chmod06";
 int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases);
@@ -176,11 +183,11 @@
 			if (i < 2) {
 				ltpuser = getpwnam(nobody_uid);
 				if (ltpuser == NULL)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "getpwnam failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "getpwnam failed");
 				if (seteuid(ltpuser->pw_uid) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "seteuid failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "seteuid failed");
 			}
 			if (i >= 2)
 				seteuid(0);
@@ -194,14 +201,14 @@
 
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if (TEST_ERRNO == test_cases[i].exp_errno)
-				tst_resm(TPASS|TTERRNO,
-				    "chmod failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "chmod failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "chmod failed unexpectedly; "
-				    "expected %d - %s",
-				    test_cases[i].exp_errno,
-				    strerror(test_cases[i].exp_errno));
+				tst_resm(TFAIL | TTERRNO,
+					 "chmod failed unexpectedly; "
+					 "expected %d - %s",
+					 test_cases[i].exp_errno,
+					 strerror(test_cases[i].exp_errno));
 		}
 
 	}
@@ -234,9 +241,9 @@
 	tst_tmpdir();
 
 	bad_addr = mmap(0, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	test_cases[3].pathname = bad_addr;
 
 	for (i = 0; i < TST_TOTAL; i++)
@@ -260,18 +267,16 @@
 	/* open/creat a test file and close it */
 	fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDWR|O_CREAT, 0666) failed",
-			 TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, 0666) failed", TEST_FILE1);
 
 	if (fchown(fd, 0, 0) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown(%s) failed",
-			TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown(%s) failed",
+			 TEST_FILE1);
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "close(%s) failed",
-			 TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "close(%s) failed", TEST_FILE1);
 
 	return 0;
 }
@@ -293,18 +298,19 @@
 
 	/* Creat a test directory and a file under it */
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s) failed", DIR_TEMP);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s) failed", DIR_TEMP);
 
 	fd = open(TEST_FILE2, O_RDWR | O_CREAT, 0666);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT, 0666) failed", TEST_FILE2);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, 0666) failed", TEST_FILE2);
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TEST_FILE2);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
+			 TEST_FILE2);
 
 	if (chmod(DIR_TEMP, FILE_MODE) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s) failed", DIR_TEMP);
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s) failed", DIR_TEMP);
 
 	return 0;
 }
@@ -323,12 +329,12 @@
 	int fd;
 
 	/* Create a test file under temporary directory and close it */
-	fd = open("t_file", O_RDWR|O_CREAT, MODE_RWX);
+	fd = open("t_file", O_RDWR | O_CREAT, MODE_RWX);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(t_file) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(t_file) failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(t_file) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close(t_file) failed");
 
 	return 0;
 }
@@ -347,7 +353,7 @@
 	TEST_CLEANUP;
 
 	if (chmod(DIR_TEMP, MODE_RWX) == -1)
-		tst_resm(TBROK|TERRNO, "chmod(%s) failed", DIR_TEMP);
+		tst_resm(TBROK | TERRNO, "chmod(%s) failed", DIR_TEMP);
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/chmod/chmod07.c b/testcases/kernel/syscalls/chmod/chmod07.c
index 3f1af15..754faa2 100644
--- a/testcases/kernel/syscalls/chmod/chmod07.c
+++ b/testcases/kernel/syscalls/chmod/chmod07.c
@@ -120,7 +120,7 @@
 		TEST(chmod(TESTFILE, PERMS));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "chmod(%s, %#o) failed",
+			tst_resm(TFAIL | TTERRNO, "chmod(%s, %#o) failed",
 				 TESTFILE, PERMS);
 			continue;
 		}
@@ -134,7 +134,8 @@
 			 * stat(2).
 			 */
 			if (stat(TESTFILE, &stat_buf) == -1)
-				tst_brkm(TFAIL|TTERRNO, cleanup, "stat failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "stat failed");
 
 			/* Check for expected mode permissions */
 			if ((stat_buf.st_mode & PERMS) == PERMS)
@@ -143,8 +144,8 @@
 					 TESTFILE, PERMS);
 			else
 				tst_resm(TFAIL, "%s: Incorrect modes 0%03o; "
-				    "expected 0%03o", TESTFILE,
-				    stat_buf.st_mode, PERMS);
+					 "expected 0%03o", TESTFILE,
+					 stat_buf.st_mode, PERMS);
 		} else
 			tst_resm(TPASS, "call succeeded");
 	}
@@ -187,19 +188,19 @@
 		tst_brkm(TBROK, cleanup, "getgrnam failed");
 	group1_gid = ltpgroup->gr_gid;
 
-	fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE);
+	fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TESTFILE, FILE_MODE);
 	if (close(fd) == -1)
-		tst_brkm(TBROK, cleanup, "close(%s) failed",
-			 TESTFILE);
+		tst_brkm(TBROK, cleanup, "close(%s) failed", TESTFILE);
 	if (chown(TESTFILE, user1_uid, group1_gid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "chown(%s) failed", TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "chown(%s) failed", TESTFILE);
 
 	if (setgid(group1_gid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "setgid(%d) failed", group1_gid);
+		tst_brkm(TBROK | TERRNO, cleanup, "setgid(%d) failed",
+			 group1_gid);
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/chown/change_owner.c b/testcases/kernel/syscalls/chown/change_owner.c
index 7475b29..7607e9b 100644
--- a/testcases/kernel/syscalls/chown/change_owner.c
+++ b/testcases/kernel/syscalls/chown/change_owner.c
@@ -81,7 +81,7 @@
 	 */
 	if (chown(path_name, user_uid, group_gid) == -1) {
 		fprintf(stderr, "chown(%s, ..) failed: %s",
-		    path_name, strerror(errno));
+			path_name, strerror(errno));
 		exit(1);
 	}
 
diff --git a/testcases/kernel/syscalls/chown/chown01.c b/testcases/kernel/syscalls/chown/chown01.c
index 49b937c..1844924 100644
--- a/testcases/kernel/syscalls/chown/chown01.c
+++ b/testcases/kernel/syscalls/chown/chown01.c
@@ -148,8 +148,8 @@
 		TEST(chown(fname, uid, gid));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "chown(%s, %d,%d) failed",
-			    fname, uid, gid);
+			tst_resm(TFAIL | TTERRNO, "chown(%s, %d,%d) failed",
+				 fname, uid, gid);
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS, "chown(%s, %d,%d) returned %ld",
@@ -177,13 +177,13 @@
 
 	sprintf(fname, "t_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		   "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 	else if (write(fd, &buf, strlen(buf)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "write(%s, &buf, strlen(buf)) failed", fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "write(%s, &buf, strlen(buf)) failed", fname);
 	else if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", fname);
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/chown/chown02.c b/testcases/kernel/syscalls/chown/chown02.c
index ece0a26..f6f0e0f 100644
--- a/testcases/kernel/syscalls/chown/chown02.c
+++ b/testcases/kernel/syscalls/chown/chown02.c
@@ -100,10 +100,12 @@
 	int (*setupfunc) ();
 } test_cases[] = {
 	/* setuid/setgid bits cleared */
-	{ TESTFILE1, 700, 701, 1, setup1 },
-	/* setgid bit not cleared */
-	{ TESTFILE2, 700, 701, 2, setup2 },
-};
+	{
+	TESTFILE1, 700, 701, 1, setup1},
+	    /* setgid bit not cleared */
+	{
+TESTFILE2, 700, 701, 2, setup2},};
+
 int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases);
 
 void setup();			/* setup function for the test */
@@ -144,8 +146,8 @@
 			TEST(chown(file_name, user_id, group_id));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
-				    "chown(%s, ..) failed", file_name);
+				tst_resm(TFAIL | TTERRNO,
+					 "chown(%s, ..) failed", file_name);
 				continue;
 			}
 
@@ -181,21 +183,24 @@
 				 * chown().
 				 */
 				if (test_flag == 1 &&
-				    (stat_buf.st_mode & (S_ISUID|S_ISGID)) != 0)
-					tst_resm(TFAIL, "%s: incorrect mode "
+				    (stat_buf.st_mode & (S_ISUID | S_ISGID)) !=
+				    0)
+					tst_resm(TFAIL,
+						 "%s: incorrect mode "
 						 "permissions %#o, Expected "
 						 "%#o", file_name, NEW_PERMS1,
 						 EXP_PERMS);
-				else if (test_flag == 2 &&
-					   (stat_buf.st_mode & S_ISGID) == 0)
-					tst_resm(TFAIL, "%s: Incorrect mode "
+				else if (test_flag == 2
+					 && (stat_buf.st_mode & S_ISGID) == 0)
+					tst_resm(TFAIL,
+						 "%s: Incorrect mode "
 						 "permissions %#o, Expected "
 						 "%#o", file_name,
 						 stat_buf.st_mode, NEW_PERMS2);
 				else
 					tst_resm(TPASS,
-					    "chown(%s, ..) succeeded",
-					    file_name);
+						 "chown(%s, ..) succeeded",
+						 file_name);
 			} else
 				tst_resm(TPASS, "call succeeded");
 		}
@@ -241,16 +246,17 @@
 
 	/* Creat a testfile and close it */
 	if ((fd = open(TESTFILE1, O_RDWR | O_CREAT, FILE_MODE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT, %o) failed",
-		    TESTFILE1, FILE_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, %o) failed",
+			 TESTFILE1, FILE_MODE);
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TESTFILE1);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
+			 TESTFILE1);
 
 	/* Set setuid/setgid bits on the test file created */
 	if (chmod(TESTFILE1, NEW_PERMS1) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, ..) failed",
-		    TESTFILE1);
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, ..) failed",
+			 TESTFILE1);
 	return 0;
 }
 
@@ -266,15 +272,16 @@
 
 	/* Creat a testfile and close it */
 	if ((fd = open(TESTFILE2, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT, %o) failed",
-		    TESTFILE2, FILE_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, %o) failed",
+			 TESTFILE2, FILE_MODE);
 	}
 	/* Set setgid bit on the test file created */
 	if (fchmod(fd, NEW_PERMS2) != 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchmod failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fchmod failed");
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TESTFILE2);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
+			 TESTFILE2);
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/chown/chown03.c b/testcases/kernel/syscalls/chown/chown03.c
index 859f90e..112f232 100644
--- a/testcases/kernel/syscalls/chown/chown03.c
+++ b/testcases/kernel/syscalls/chown/chown03.c
@@ -118,31 +118,32 @@
 		TEST(chown(TESTFILE, -1, group_id));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "chown(%s, ..) failed",
-			    TESTFILE);
+			tst_resm(TFAIL | TTERRNO, "chown(%s, ..) failed",
+				 TESTFILE);
 			continue;
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (stat(TESTFILE, &stat_buf) == -1)
-				tst_brkm(TFAIL|TERRNO, cleanup, "stat failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "stat failed");
 
 			if (stat_buf.st_uid != user_id ||
 			    stat_buf.st_gid != group_id)
 				tst_resm(TFAIL, "%s: Incorrect ownership"
-				    "set to %d %d, Expected %d %d",
-				    TESTFILE, stat_buf.st_uid,
-				    stat_buf.st_gid, user_id, group_id);
+					 "set to %d %d, Expected %d %d",
+					 TESTFILE, stat_buf.st_uid,
+					 stat_buf.st_gid, user_id, group_id);
 
 			if (stat_buf.st_mode !=
 			    (NEW_PERMS & ~(S_ISUID | S_ISGID)))
 				tst_resm(TFAIL, "%s: incorrect mode permissions"
-				    " %#o, Expected %#o", TESTFILE,
-				    stat_buf.st_mode,
-				    NEW_PERMS & ~(S_ISUID | S_ISGID));
+					 " %#o, Expected %#o", TESTFILE,
+					 stat_buf.st_mode,
+					 NEW_PERMS & ~(S_ISUID | S_ISGID));
 			else
 				tst_resm(TPASS, "chown(%s, ..) was successful",
-				    TESTFILE);
+					 TESTFILE);
 		} else
 			tst_resm(TPASS, "call succeeded");
 	}
@@ -161,7 +162,7 @@
  */
 void setup()
 {
-	int fd;				/* file handler for testfile */
+	int fd;			/* file handler for testfile */
 
 	TEST_PAUSE;
 
@@ -173,33 +174,35 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam(\"nobody\") failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam(\"nobody\") failed");
 	if (setegid(ltpuser->pw_gid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setegid(%d) failed",
-		    ltpuser->pw_gid);
+		tst_brkm(TBROK | TERRNO, NULL, "setegid(%d) failed",
+			 ltpuser->pw_gid);
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "seteuid(%d) failed",
-		    ltpuser->pw_uid);
+		tst_brkm(TBROK | TERRNO, NULL, "seteuid(%d) failed",
+			 ltpuser->pw_uid);
 
 	/* Create a test file under temporary directory */
-	if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "open(%s, O_RDWR|O_CREAT, %o) failed", TESTFILE, FILE_MODE);
+	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, %o) failed", TESTFILE,
+			 FILE_MODE);
 
 	if (seteuid(0) == -1)
-		 tst_brkm(TBROK|TERRNO, cleanup, "seteuid(0) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(0) failed");
 
 	if (fchown(fd, -1, 0) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown failed");
 
 	if (fchmod(fd, NEW_PERMS) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchmod failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fchmod failed");
 
 	if (seteuid(ltpuser->pw_uid) == -1)
-		 tst_brkm(TBROK|TERRNO, cleanup, "seteuid to nobody failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid to nobody failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "closing %s failed", TESTFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "closing %s failed",
+			 TESTFILE);
 }
 
 void cleanup()
@@ -207,9 +210,9 @@
 	TEST_CLEANUP;
 
 	if (setegid(0) == -1)
-		tst_resm(TWARN|TERRNO, "setegid(0) failed");
+		tst_resm(TWARN | TERRNO, "setegid(0) failed");
 	if (seteuid(0) == -1)
-		tst_resm(TWARN|TERRNO, "seteuid(0) failed");
+		tst_resm(TWARN | TERRNO, "seteuid(0) failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/chown/chown04.c b/testcases/kernel/syscalls/chown/chown04.c
index 66d87e3..0a8beed 100644
--- a/testcases/kernel/syscalls/chown/chown04.c
+++ b/testcases/kernel/syscalls/chown/chown04.c
@@ -110,16 +110,16 @@
 struct test_case_t {
 	char *pathname;
 	int exp_errno;
-	void (*setupfunc)(void);
+	void (*setupfunc) (void);
 } test_cases[] = {
-	{ TEST_FILE1, EPERM, setup1 },
-	{ TEST_FILE2, EACCES, setup2 },
-	{ high_address_node, EFAULT, NULL },
-	{ (char *)-1, EFAULT, NULL },
-	{ Longpathname, ENAMETOOLONG, longpath_setup},
-	{ "", ENOENT, NULL},
-	{ TEST_FILE3, ENOTDIR, setup3},
-};
+	{
+	TEST_FILE1, EPERM, setup1}, {
+	TEST_FILE2, EACCES, setup2}, {
+	high_address_node, EFAULT, NULL}, {
+	(char *)-1, EFAULT, NULL}, {
+	Longpathname, ENAMETOOLONG, longpath_setup}, {
+	"", ENOENT, NULL}, {
+TEST_FILE3, ENOTDIR, setup3},};
 
 char *TCID = "chown04";
 int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases);
@@ -167,12 +167,12 @@
 				tst_resm(TFAIL, "chown succeeded unexpectedly");
 				continue;
 			} else if (TEST_ERRNO == test_cases[i].exp_errno)
-				tst_resm(TPASS|TTERRNO, "chown failed");
+				tst_resm(TPASS | TTERRNO, "chown failed");
 			else {
-				tst_resm(TFAIL|TTERRNO,
-				    "chown failed; expected: %d - %s",
-				    test_cases[i].exp_errno,
-				    strerror(test_cases[i].exp_errno));
+				tst_resm(TFAIL | TTERRNO,
+					 "chown failed; expected: %d - %s",
+					 test_cases[i].exp_errno,
+					 strerror(test_cases[i].exp_errno));
 			}
 		}
 	}
@@ -192,19 +192,19 @@
 
 	ltpuser = getpwnam("nobody");
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam(\"nobody\") failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam(\"nobody\") failed");
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "seteuid(%d) failed",
-		    ltpuser->pw_uid);
+		tst_brkm(TBROK | TERRNO, NULL, "seteuid(%d) failed",
+			 ltpuser->pw_uid);
 
 	TEST_PAUSE;
 
 	tst_tmpdir();
 
 	bad_addr = mmap(0, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 	test_cases[3].pathname = bad_addr;
 
@@ -220,22 +220,23 @@
 
 	old_uid = geteuid();
 
-	if ((fd = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "opening \"%s\" failed",
-		    TEST_FILE1);
+	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "opening \"%s\" failed",
+			 TEST_FILE1);
 
 	if (seteuid(0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(0) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(0) failed");
 
 	if (fchown(fd, 0, 0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "closing \"%s\" failed",
-		    TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup, "closing \"%s\" failed",
+			 TEST_FILE1);
 
 	if (seteuid(old_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(%d) failed", old_uid);
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(%d) failed",
+			 old_uid);
 
 }
 
@@ -247,20 +248,21 @@
 	old_uid = geteuid();
 
 	if (seteuid(0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(0) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(0) failed");
 
 	if (mkdir(DIR_TEMP, S_IRWXU) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir failed");
 
-	if ((fd = open(TEST_FILE2, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown failed");
+	if ((fd = open(TEST_FILE2, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "closing \"%s\" failed",
-		    TEST_FILE2);
+		tst_brkm(TBROK | TERRNO, cleanup, "closing \"%s\" failed",
+			 TEST_FILE2);
 
 	if (seteuid(old_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(%d) failed", old_uid);
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(%d) failed",
+			 old_uid);
 
 }
 
@@ -268,10 +270,10 @@
 {
 	int fd;
 
-	if ((fd = open("t_file", O_RDWR|O_CREAT, MODE_RWX)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "opening \"t_file\" failed");
+	if ((fd = open("t_file", O_RDWR | O_CREAT, MODE_RWX)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "opening \"t_file\" failed");
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "closing \"t_file\" failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "closing \"t_file\" failed");
 }
 
 void longpath_setup()
@@ -287,7 +289,7 @@
 	TEST_CLEANUP;
 
 	if (seteuid(0) == -1)
-		tst_resm(TWARN|TERRNO, "seteuid(0) failed");
+		tst_resm(TWARN | TERRNO, "seteuid(0) failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/chown/chown05.c b/testcases/kernel/syscalls/chown/chown05.c
index 1fcb1a3..c2c45b7 100644
--- a/testcases/kernel/syscalls/chown/chown05.c
+++ b/testcases/kernel/syscalls/chown/chown05.c
@@ -87,12 +87,13 @@
 	uid_t user_id;
 	gid_t group_id;
 } test_cases[] = {
-	{ 700, 701 },
-	{ 702, -1 },
-	{ 703, 701 },
-	{ -1, 704 },
-	{ 703, 705 },
-};
+	{
+	700, 701}, {
+	702, -1}, {
+	703, 701}, {
+	-1, 704}, {
+703, 705},};
+
 int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases);
 
 void setup();			/* setup function for the test */
@@ -123,7 +124,7 @@
 			TEST(chown(TESTFILE, user_id, group_id));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO, "chown failed");
+				tst_resm(TFAIL | TTERRNO, "chown failed");
 				continue;
 			}
 			if (STD_FUNCTIONAL_TEST) {
@@ -164,8 +165,9 @@
 
 	tst_tmpdir();
 
-	if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "opening %s failed", TESTFILE);
+	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "opening %s failed",
+			 TESTFILE);
 	if (close(fd) == -1)
 		tst_brkm(TBROK, cleanup, "closing %s failed", TESTFILE);
 
diff --git a/testcases/kernel/syscalls/chroot/chroot01.c b/testcases/kernel/syscalls/chroot/chroot01.c
index 37c5292..9936928 100644
--- a/testcases/kernel/syscalls/chroot/chroot01.c
+++ b/testcases/kernel/syscalls/chroot/chroot01.c
@@ -56,14 +56,14 @@
 
 char path[] = "/tmp";
 int exp_enos[] = { EPERM, 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
 void setup(void);
 void cleanup(void);
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc;
 	char *msg;
@@ -84,7 +84,7 @@
 		if (TEST_RETURN != -1)
 			tst_resm(TFAIL, "call succeeded unexpectedly");
 		else if (errno != EPERM)
-			tst_resm(TFAIL|TTERRNO, "chroot failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "chroot failed unexpectedly");
 		else
 			tst_resm(TPASS, "chroot set errno to EPERM.");
 	}
@@ -94,31 +94,30 @@
 
 }
 
-void
-setup(void)
+void setup(void)
 {
 	tst_require_root(NULL);
 
 	tst_tmpdir();
 
 	if ((ltpuser = getpwnam(nobody_uid)) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam(\"nobody\") failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "getpwnam(\"nobody\") failed");
 
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid to nobody failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid to nobody failed");
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	TEST_PAUSE;
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
 	if (seteuid(0) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid(0) failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid(0) failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/chroot/chroot02.c b/testcases/kernel/syscalls/chroot/chroot02.c
index 875d7af..4f787ae 100644
--- a/testcases/kernel/syscalls/chroot/chroot02.c
+++ b/testcases/kernel/syscalls/chroot/chroot02.c
@@ -127,7 +127,7 @@
 	tst_tmpdir();
 	if ((fileHandle = creat(TMP_FILENAME, 0777)) == -1)
 		tst_brkm(TBROK, cleanup, "failed to create temporary file "
-		    TMP_FILENAME);
+			 TMP_FILENAME);
 	if (stat(TMP_FILENAME, &buf) != 0)
 		tst_brkm(TBROK, cleanup, TMP_FILENAME " does not exist");
 
diff --git a/testcases/kernel/syscalls/chroot/chroot03.c b/testcases/kernel/syscalls/chroot/chroot03.c
index 5766b17..4079bce 100644
--- a/testcases/kernel/syscalls/chroot/chroot03.c
+++ b/testcases/kernel/syscalls/chroot/chroot03.c
@@ -146,12 +146,12 @@
 			}
 
 			if (TEST_ERRNO == TC[i].error) {
-				tst_resm(TPASS|TTERRNO, "failed as expected");
+				tst_resm(TPASS | TTERRNO, "failed as expected");
 			} else {
-				tst_resm(TFAIL|TTERRNO,
-				    "didn't fail as expected (expected errno "
-				    "= %d : %s)",
-				    TC[i].error, strerror(TC[i].error));
+				tst_resm(TFAIL | TTERRNO,
+					 "didn't fail as expected (expected errno "
+					 "= %d : %s)",
+					 TC[i].error, strerror(TC[i].error));
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/chroot/chroot04.c b/testcases/kernel/syscalls/chroot/chroot04.c
index 9ade2d8..5c544cf 100644
--- a/testcases/kernel/syscalls/chroot/chroot04.c
+++ b/testcases/kernel/syscalls/chroot/chroot04.c
@@ -57,6 +57,7 @@
 #define TEST_TMPDIR	"chroot04_tmpdir"
 
 int exp_enos[] = { EACCES, 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -89,7 +90,8 @@
 		else if (TEST_ERRNO == EACCES)
 			tst_resm(TPASS, "got EACCESS as expected");
 		else
-			tst_resm(TFAIL|TTERRNO, "did not get EACCES as expected");
+			tst_resm(TFAIL | TTERRNO,
+				 "did not get EACCES as expected");
 
 	}
 	cleanup();
@@ -132,10 +134,10 @@
 {
 	/* reset the process ID to the saved ID (root) */
 	if (setuid(0) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "setuid(0) failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid(0) failed");
 	}
 	if (rmdir(TEST_TMPDIR) != 0) {
-		tst_brkm(TFAIL|TERRNO, NULL, "rmdir(%s) failed", TEST_TMPDIR);
+		tst_brkm(TFAIL | TERRNO, NULL, "rmdir(%s) failed", TEST_TMPDIR);
 	}
 	/*
 	 * print timing stats if that option was specified.
diff --git a/testcases/kernel/syscalls/clock_getres/clock_getres01.c b/testcases/kernel/syscalls/clock_getres/clock_getres01.c
index 2c71339..38512c7 100644
--- a/testcases/kernel/syscalls/clock_getres/clock_getres01.c
+++ b/testcases/kernel/syscalls/clock_getres/clock_getres01.c
@@ -65,9 +65,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "clock_getres01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "clock_getres01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -87,7 +87,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -112,7 +113,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -131,8 +133,8 @@
 static char *progname;
 
 enum test_type {
-		NORMAL,
-		NULL_POINTER,
+	NORMAL,
+	NULL_POINTER,
 };
 
 /*
@@ -154,42 +156,42 @@
 */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.clk_id	 = CLOCK_REALTIME,
-		.ttype	  = NORMAL,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.clk_id	 = CLOCK_MONOTONIC,
-		.ttype	  = NORMAL,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.clk_id	 = CLOCK_PROCESS_CPUTIME_ID,
-		.ttype	  = NORMAL,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case03
-		.clk_id	 = CLOCK_THREAD_CPUTIME_ID,
-		.ttype	  = NORMAL,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case04
-		.clk_id	 = -1,
-		.ttype	  = NORMAL,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case05
-		.clk_id	 = CLOCK_REALTIME,
-		.ttype	  = NULL_POINTER,
-		.ret	    = 0,
-		.err	    = 0,
-	},
+	{			// case00
+	 .clk_id = CLOCK_REALTIME,
+	 .ttype = NORMAL,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .clk_id = CLOCK_MONOTONIC,
+	 .ttype = NORMAL,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .clk_id = CLOCK_PROCESS_CPUTIME_ID,
+	 .ttype = NORMAL,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case03
+	 .clk_id = CLOCK_THREAD_CPUTIME_ID,
+	 .ttype = NORMAL,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case04
+	 .clk_id = -1,
+	 .ttype = NORMAL,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case05
+	 .clk_id = CLOCK_REALTIME,
+	 .ttype = NULL_POINTER,
+	 .ret = 0,
+	 .err = 0,
+	 },
 };
 
 #define MEM_LENGTH	      (4 * 1024 * 1024)
@@ -233,11 +235,12 @@
 
 static void usage(const char *progname)
 {
-	tst_resm(TINFO,"usage: %s [options]", progname);
-	tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-	tst_resm(TINFO,"options:");
-	tst_resm(TINFO,"    -d --debug	   Show debug messages");
-	tst_resm(TINFO,"    -h --help	    Show this message");
+	tst_resm(TINFO, "usage: %s [options]", progname);
+	tst_resm(TINFO, "This is a regression test program of %s system call.",
+		 SYSCALL_NAME);
+	tst_resm(TINFO, "options:");
+	tst_resm(TINFO, "    -d --debug	   Show debug messages");
+	tst_resm(TINFO, "    -h --help	    Show this message");
 
 	exit(1);
 }
@@ -246,7 +249,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int c, i;
 	int lc;
@@ -254,9 +258,9 @@
 	char *msg;
 
 	struct option long_options[] = {
-		{ "debug",	no_argument,	0,	'd' },
-		{ "help",	no_argument,	0,	'h' },
-		{ NULL,		0,		NULL,	0 }
+		{"debug", no_argument, 0, 'd'},
+		{"help", no_argument, 0, 'h'},
+		{NULL, 0, NULL, 0}
 	};
 
 	progname = basename(av[0]);
@@ -271,8 +275,7 @@
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			TEST(c = getopt_long(ac, av, "dh", long_options,
-					     NULL));
+			TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
 			while (TEST_RETURN != -1) {
 				switch (c) {
 				case 'd':
@@ -285,31 +288,33 @@
 			}
 
 			if (ac != optind) {
-				tst_resm(TINFO,"Options are not match.");
+				tst_resm(TINFO, "Options are not match.");
 				usage(progname);
 
 			}
 
 			/*
 			 * Execute test
-		 	 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
-				tst_resm(TINFO,"(case%02d) START", i);
+			 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
+				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
-				tst_resm((ret == 0 ? TPASS : TFAIL ), "(case%02d) END", i);
+				tst_resm((ret == 0 ? TPASS : TFAIL),
+					 "(case%02d) END", i);
 				result |= ret;
 			}
 
 			/*
 			 * Check results
-		 	*/
-			switch(result) {
+			 */
+			switch (result) {
 			case RESULT_OK:
 				tst_resm(TPASS, "clock_getres call succeeded");
 				break;
 
 			default:
-		 	   	tst_resm(TFAIL, "%s failed", TCID);
+				tst_resm(TFAIL, "%s failed", TCID);
 				RPRINTF("NG\n");
 				cleanup();
 				tst_exit();
diff --git a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
index dbee6f1..a8d6e3e 100644
--- a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
+++ b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c
@@ -65,9 +65,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "clock_nanosleep01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "clock_nanosleep01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -99,7 +99,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -124,7 +125,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	act.sa_handler = sighandler;
 	sigfillset(&act.sa_mask);
@@ -141,9 +143,9 @@
 #define SYSCALL_NAME    "clock_nanosleep"
 
 enum test_type {
-		NORMAL,
-		NULL_POINTER,
-		SEND_SIGINT,
+	NORMAL,
+	NULL_POINTER,
+	SEND_SIGINT,
 };
 
 /*
@@ -170,70 +172,70 @@
  */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.clk_id	 = CLOCK_REALTIME,
-		.ttype	  = NORMAL,
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = 500000000, // 500msec
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.clk_id	 = CLOCK_MONOTONIC,
-		.ttype	  = NORMAL,
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = 500000000, // 500msec
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-		.clk_id	 = CLOCK_REALTIME,
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = -1,   // invalid
-		.ret	    = EINVAL,
-		.err	    = 0,
-	},
-	{ // case03
-		.ttype	  = NORMAL,
-		.clk_id	 = CLOCK_REALTIME,
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = 1000000000,   // invalid
-		.ret	    = EINVAL,
-		.err	    = 0,
-	},
-	{ // case04
-		.ttype	  = NORMAL,
-		.clk_id	 = CLOCK_THREAD_CPUTIME_ID, // not supported
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = 500000000, // 500msec
-		.ret	    = EINVAL, // RHEL4U1 + 2.6.18 returns EINVAL
-		.err	    = 0,
-	},
-	{ // case05
-		.ttype	  = SEND_SIGINT,
-		.clk_id	 = CLOCK_REALTIME,
-		.flags	  = 0,
-		.sec	    = 10,
-		.nsec	   = 0,
-		.ret	    = EINTR,
-		.err	    = 0,
-	},
-#if 0   // glibc generates SEGV error (RHEL4U1 + 2.6.18)
-	{ // caseXX
-		.ttype	  = NULL_POINTER,
-		.clk_id	 = CLOCK_REALTIME,
-		.flags	  = 0,
-		.sec	    = 0,
-		.nsec	   = 500000000, // 500msec
-		.ret	    = EFAULT,
-		.err	    = 0,
-	},
+	{			// case00
+	 .clk_id = CLOCK_REALTIME,
+	 .ttype = NORMAL,
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = 500000000,	// 500msec
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .clk_id = CLOCK_MONOTONIC,
+	 .ttype = NORMAL,
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = 500000000,	// 500msec
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 .clk_id = CLOCK_REALTIME,
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = -1,		// invalid
+	 .ret = EINVAL,
+	 .err = 0,
+	 },
+	{			// case03
+	 .ttype = NORMAL,
+	 .clk_id = CLOCK_REALTIME,
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = 1000000000,	// invalid
+	 .ret = EINVAL,
+	 .err = 0,
+	 },
+	{			// case04
+	 .ttype = NORMAL,
+	 .clk_id = CLOCK_THREAD_CPUTIME_ID,	// not supported
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = 500000000,	// 500msec
+	 .ret = EINVAL,		// RHEL4U1 + 2.6.18 returns EINVAL
+	 .err = 0,
+	 },
+	{			// case05
+	 .ttype = SEND_SIGINT,
+	 .clk_id = CLOCK_REALTIME,
+	 .flags = 0,
+	 .sec = 10,
+	 .nsec = 0,
+	 .ret = EINTR,
+	 .err = 0,
+	 },
+#if 0				// glibc generates SEGV error (RHEL4U1 + 2.6.18)
+	{			// caseXX
+	 .ttype = NULL_POINTER,
+	 .clk_id = CLOCK_REALTIME,
+	 .flags = 0,
+	 .sec = 0,
+	 .nsec = 500000000,	// 500msec
+	 .ret = EFAULT,
+	 .err = 0,
+	 },
 #endif
 };
 
@@ -258,7 +260,8 @@
 	}
 	expect = (sec * 1000) + (nsec / 1000000);
 	result = (t.tv_sec * 1000) + (t.tv_nsec / 1000000);
-	tst_resm(TINFO,"check sleep time: (min:%ld) < %ld < (max:%ld) (msec)",expect - MAX_MSEC_DIFF, result, expect + MAX_MSEC_DIFF);
+	tst_resm(TINFO, "check sleep time: (min:%ld) < %ld < (max:%ld) (msec)",
+		 expect - MAX_MSEC_DIFF, result, expect + MAX_MSEC_DIFF);
 	if (result < expect - MAX_MSEC_DIFF || result > expect + MAX_MSEC_DIFF)
 		return -1;
 	return 0;
@@ -280,7 +283,7 @@
 	int rc, range_ok = 1, remain_ok = 1;
 	pid_t pid = 0;
 
-	 /*
+	/*
 	 * Check before sleep time
 	 */
 	if (tc->ttype == SEND_SIGINT) {
@@ -294,11 +297,11 @@
 	 */
 	TEST(rc = clock_gettime(tc->clk_id, &beftp));
 	if (rc < 0) {
-		tst_resm(TFAIL|TTERRNO, "iclock_gettime failed");
+		tst_resm(TFAIL | TTERRNO, "iclock_gettime failed");
 		result = 1;
 		goto EXIT;
 	}
-	 /*
+	/*
 	 * Execute system call
 	 */
 	rq.tv_sec = tc->sec;
@@ -306,14 +309,16 @@
 	// !!!CAUTION: 'clock_gettime' returns errno itself
 	errno = 0;
 	if (tc->ttype == NULL_POINTER)
-		TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, NULL, &rm));
+		TEST(sys_ret =
+		     clock_nanosleep(tc->clk_id, tc->flags, NULL, &rm));
 	else
-		TEST(sys_ret = clock_nanosleep(tc->clk_id, tc->flags, &rq, &rm));
+		TEST(sys_ret =
+		     clock_nanosleep(tc->clk_id, tc->flags, &rq, &rm));
 	sys_errno = errno;
 	if (sys_ret != 0)
 		goto TEST_END;
 
-	 /*
+	/*
 	 * Check after sleep time
 	 */
 	TEST(rc = clock_gettime(tc->clk_id, &afttp));
@@ -328,7 +333,7 @@
 	 */
 TEST_END:
 	if (tc->ttype == NORMAL || tc->ttype == SEND_SIGINT) {
-		tst_resm(TINFO,"remain time: %ld %ld", rm.tv_sec, rm.tv_nsec);
+		tst_resm(TINFO, "remain time: %ld %ld", rm.tv_sec, rm.tv_nsec);
 		if (tc->ttype == NORMAL)
 			remain_ok = 1;
 		else
@@ -341,10 +346,10 @@
 	result |= (sys_ret != tc->ret) || !range_ok || !remain_ok;
 	if (!range_ok)
 		PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,
-			"time range check", range_ok);
+				   "time range check", range_ok);
 	else
 		PRINT_RESULT_EXTRA(0, tc->ret, tc->err, sys_ret, sys_errno,
-			"remain time check", remain_ok);
+				   "remain time check", remain_ok);
 EXIT:
 	if (pid > 0) {
 		int st;
@@ -358,7 +363,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int i;
 	int lc;
@@ -375,22 +381,25 @@
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
-				tst_resm(TINFO,"(case%02d) START", i);
+				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
-				tst_resm(TINFO,"(case%02d) END => %s",
-					i, (ret == 0) ? "OK" : "NG");
+				tst_resm(TINFO, "(case%02d) END => %s",
+					 i, (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 
 			switch (result) {
 			case RESULT_OK:
-				tst_resm(TPASS, "clock_nanosleep call succeeded");
+				tst_resm(TPASS,
+					 "clock_nanosleep call succeeded");
 				break;
 
 			default:
-	 	   		tst_brkm(TFAIL|TERRNO, cleanup, "clock_nanosleep failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "clock_nanosleep failed");
 				break;
 			}
 
diff --git a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
index ca71328..18be1aa 100644
--- a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
+++ b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c
@@ -52,9 +52,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "clock_nanosleep2_01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "clock_nanosleep2_01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -74,12 +74,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -100,48 +101,55 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-const clockid_t CLOCK_TO_USE=CLOCK_MONOTONIC;
-static int clock_nanosleep2(clockid_t clock_id, int flags, const struct timespec *req,struct timespec *rem)
+const clockid_t CLOCK_TO_USE = CLOCK_MONOTONIC;
+static int clock_nanosleep2(clockid_t clock_id, int flags,
+			    const struct timespec *req, struct timespec *rem)
 {
 	return syscall(__NR_clock_nanosleep, clock_id, flags, req, rem);
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 	int lc;
 	char *msg;
 	struct timespec ts;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			TEST(clock_gettime(CLOCK_TO_USE, &ts));
-			for (i=0; i<=50; i++) {
+			for (i = 0; i <= 50; i++) {
 				ts.tv_sec++;
-				TEST(clock_nanosleep2(CLOCK_TO_USE, TIMER_ABSTIME, &ts, NULL));
-                                if (TEST_ERRNO) {
-                                    tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-                                    cleanup();
-                                    tst_exit();
-                                }
-				tst_resm(TINFO,"Iteration = %i",i);
+				TEST(clock_nanosleep2
+				     (CLOCK_TO_USE, TIMER_ABSTIME, &ts, NULL));
+				if (TEST_ERRNO) {
+					tst_resm(TFAIL,
+						 "%s failed - errno = %d : %s",
+						 TCID, TEST_ERRNO,
+						 strerror(TEST_ERRNO));
+					cleanup();
+					tst_exit();
+				}
+				tst_resm(TINFO, "Iteration = %i", i);
 			}
-                        tst_resm(TPASS, "clock_nanosleep2() passed");
+			tst_resm(TPASS, "clock_nanosleep2() passed");
 		}
-        }
-        tst_exit();
+	}
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/clone/clone02.c b/testcases/kernel/syscalls/clone/clone02.c
index 467ddd6..4722050 100644
--- a/testcases/kernel/syscalls/clone/clone02.c
+++ b/testcases/kernel/syscalls/clone/clone02.c
@@ -104,8 +104,9 @@
 	int flags;
 	int (*parent_fn) ();
 } test_cases[] = {
-	{FLAG_ALL, parent_test1},
-	{FLAG_NONE, parent_test2}
+	{
+	FLAG_ALL, parent_test1}, {
+	FLAG_NONE, parent_test2}
 };
 
 int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
diff --git a/testcases/kernel/syscalls/clone/clone04.c b/testcases/kernel/syscalls/clone/clone04.c
index 8c31f96..217d538 100644
--- a/testcases/kernel/syscalls/clone/clone04.c
+++ b/testcases/kernel/syscalls/clone/clone04.c
@@ -16,10 +16,10 @@
  *
  */
  /*
- *	Verify that,
- *      clone(2) returns -1 and sets errno to EINVAL if
- *	child stack is set to a zero value(NULL)
- */
+  *     Verify that,
+  *      clone(2) returns -1 and sets errno to EINVAL if
+  *     child stack is set to a zero value(NULL)
+  */
 
 #if defined UCLINUX && !__THROW
 /* workaround for libc bug */
@@ -47,7 +47,8 @@
 	int exp_errno;
 	char err_desc[10];
 } test_cases[] = {
-	{ child_fn, NULL, EINVAL, "EINVAL" },};
+	{
+child_fn, NULL, EINVAL, "EINVAL"},};
 
 char *TCID = "clone04";
 int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
diff --git a/testcases/kernel/syscalls/close/close01.c b/testcases/kernel/syscalls/close/close01.c
index 37c9c7f..6c9efc9 100644
--- a/testcases/kernel/syscalls/close/close01.c
+++ b/testcases/kernel/syscalls/close/close01.c
@@ -78,9 +78,11 @@
 	char *type;
 } TC[] = {
 	/* file descriptor for a regular file */
-	{ &newfd, "file"},
-	/* file descriptor for a pipe */
-	{ &pipefildes[0], "pipe"}
+	{
+	&newfd, "file"},
+	    /* file descriptor for a pipe */
+	{
+	&pipefildes[0], "pipe"}
 };
 
 int main(int ac, char **av)
@@ -100,16 +102,15 @@
 		Tst_count = 0;
 
 		if ((fild = creat(fname, 0777)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "can't open file %s",
-			    fname);
+			tst_brkm(TBROK | TERRNO, cleanup, "can't open file %s",
+				 fname);
 
 		if ((newfd = dup(fild)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "can't dup the file des");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "can't dup the file des");
 
 		if (pipe(pipefildes) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "can't open pipe");
+			tst_brkm(TBROK | TERRNO, cleanup, "can't open pipe");
 		}
 
 		for (i = 0; i < TST_TOTAL; i++) {
@@ -138,7 +139,7 @@
 	cleanup();
 
 	tst_exit();
- }
+}
 
 void setup(void)
 {
diff --git a/testcases/kernel/syscalls/close/close02.c b/testcases/kernel/syscalls/close/close02.c
index bd8602c..10c9662 100644
--- a/testcases/kernel/syscalls/close/close02.c
+++ b/testcases/kernel/syscalls/close/close02.c
@@ -74,7 +74,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
diff --git a/testcases/kernel/syscalls/close/close08.c b/testcases/kernel/syscalls/close/close08.c
index d3a6448..eaf3a37 100644
--- a/testcases/kernel/syscalls/close/close08.c
+++ b/testcases/kernel/syscalls/close/close08.c
@@ -144,26 +144,26 @@
 
 		Tst_count = 0;
 
-		if ((fd = open(fname, O_RDWR|O_CREAT, 0700)) == -1) {
-			tst_brkm(TBROK|TTERRNO, cleanup,
-			    "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
+		if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
+			tst_brkm(TBROK | TTERRNO, cleanup,
+				 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 		}
 		TEST(close(fd));
 
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL|TTERRNO, "close(%s) failed", fname);
+			tst_resm(TFAIL | TTERRNO, "close(%s) failed", fname);
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "close(%s) returned %ld", fname,
-				    TEST_RETURN);
+					 TEST_RETURN);
 			}
 		}
 
 		if (unlink(fname) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "unlink(%s) failed", fname);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "unlink(%s) failed", fname);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/cma/process_vm01.c b/testcases/kernel/syscalls/cma/process_vm01.c
index d5bec69..6ae8fb8 100644
--- a/testcases/kernel/syscalls/cma/process_vm01.c
+++ b/testcases/kernel/syscalls/cma/process_vm01.c
@@ -69,8 +69,8 @@
 static char TCID_readv[] = "process_vm_readv";
 static char TCID_writev[] = "process_vm_writev";
 char *TCID = "cma01";
-int  TST_TOTAL = 1;
-static void (*cma_test_params)(struct process_vm_params *params) = NULL;
+int TST_TOTAL = 1;
+static void (*cma_test_params) (struct process_vm_params * params) = NULL;
 
 static void setup(char *argv[]);
 static void cleanup(void);
@@ -104,14 +104,14 @@
 
 	if (rflag && wflag)
 		tst_brkm(TBROK, NULL, "Parameters -r -w can not be used"
-				" at the same time.");
+			 " at the same time.");
 	else if (rflag) {
 		TCID = TCID_readv;
 #if defined(__NR_process_vm_readv)
 		cma_test_params = cma_test_params_read;
 #else
 		tst_brkm(TCONF, NULL, "process_vm_readv does not"
-				" exist on your system.");
+			 " exist on your system.");
 #endif
 	} else if (wflag) {
 		TCID = TCID_writev;
@@ -119,7 +119,7 @@
 		cma_test_params = cma_test_params_write;
 #else
 		tst_brkm(TCONF, NULL, "process_vm_writev does not"
-				" exist on your system.");
+			 " exist on your system.");
 #endif
 	} else
 		tst_brkm(TBROK, NULL, "Parameter missing, required -r or -w.");
@@ -140,28 +140,28 @@
 static void cma_test_params_read(struct process_vm_params *params)
 {
 	TEST(test_process_vm_readv(params->pid,
-				params->lvec, params->liovcnt,
-				params->rvec, params->riovcnt,
-				params->flags));
+				   params->lvec, params->liovcnt,
+				   params->rvec, params->riovcnt,
+				   params->flags));
 }
 
 static void cma_test_params_write(struct process_vm_params *params)
 {
 	TEST(test_process_vm_writev(params->pid,
-				params->lvec, params->liovcnt,
-				params->rvec, params->riovcnt,
-				params->flags));
+				    params->lvec, params->liovcnt,
+				    params->rvec, params->riovcnt,
+				    params->flags));
 }
 
 static int cma_check_ret(long expected_ret, long act_ret)
 {
 	if (expected_ret == act_ret) {
 		tst_resm(TPASS, "expected ret success - "
-				"returned value = %ld", act_ret);
+			 "returned value = %ld", act_ret);
 	} else {
 		tst_resm(TFAIL, "unexpected failure - "
-				"returned value = %ld, expected: %ld",
-				act_ret, expected_ret);
+			 "returned value = %ld, expected: %ld",
+			 act_ret, expected_ret);
 		return 1;
 	}
 	return 0;
@@ -170,14 +170,14 @@
 static int cma_check_errno(long expected_errno)
 {
 	if (TEST_ERRNO == expected_errno)
-		tst_resm(TPASS|TTERRNO, "expected failure");
+		tst_resm(TPASS | TTERRNO, "expected failure");
 	else if (TEST_ERRNO == 0) {
 		tst_resm(TFAIL, "call succeeded unexpectedly");
 		return 1;
 	} else {
-		tst_resm(TFAIL|TTERRNO, "unexpected failure - "
-				"expected = %ld : %s, actual",
-				expected_errno, strerror(expected_errno));
+		tst_resm(TFAIL | TTERRNO, "unexpected failure - "
+			 "expected = %ld : %s, actual",
+			 expected_errno, strerror(expected_errno));
 		return 2;
 	}
 	return 0;
@@ -236,7 +236,7 @@
 {
 	struct process_vm_params *params;
 	long flags[] = { -INT_MAX, -1, 1, INT_MAX, 0 };
-	int flags_size = sizeof(flags)/sizeof(flags[0]);
+	int flags_size = sizeof(flags) / sizeof(flags[0]);
 	int i;
 
 	params = cma_alloc_sane_params();
@@ -312,7 +312,7 @@
 
 static void cma_test_invalid_pid(void)
 {
-	const char pid_max[]="/proc/sys/kernel/pid_max";
+	const char pid_max[] = "/proc/sys/kernel/pid_max";
 	pid_t invalid_pid = -1;
 	struct process_vm_params *params;
 	FILE *fp;
@@ -328,11 +328,9 @@
 
 	fp = fopen(pid_max, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK, cleanup,
-				"Could not open %s", pid_max);
+		tst_brkm(TBROK, cleanup, "Could not open %s", pid_max);
 	if (!fgets(buff, sizeof(buff), fp))
-		tst_brkm(TBROK, cleanup,
-				"Could not read %s", pid_max);
+		tst_brkm(TBROK, cleanup, "Could not read %s", pid_max);
 	fclose(fp);
 	invalid_pid = atol(buff) + 1;
 
@@ -358,30 +356,29 @@
 	parent_pid = getpid();
 	child_pid = fork();
 	switch (child_pid) {
-		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
-			break;
-		case 0:
-			ltpuser = getpwnam(nobody_uid);
-			if (ltpuser == NULL)
-				tst_brkm(TBROK|TERRNO, NULL,
-						"getpwnam failed");
-			if (setuid(ltpuser->pw_uid) == -1)
-				tst_brkm(TBROK|TERRNO, NULL,
-						"setuid(%u) failed", ltpuser->pw_uid);
+	case -1:
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
+		break;
+	case 0:
+		ltpuser = getpwnam(nobody_uid);
+		if (ltpuser == NULL)
+			tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
+		if (setuid(ltpuser->pw_uid) == -1)
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "setuid(%u) failed", ltpuser->pw_uid);
 
-			params = cma_alloc_sane_params();
-			params->pid = parent_pid;
-			cma_test_params(params);
-			ret |= cma_check_ret(-1, TEST_RETURN);
-			ret |= cma_check_errno(EPERM);
-			cma_free_params(params);
-			exit(ret);
-		default:
-			if (waitpid(child_pid, &status, 0) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
-			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
-				tst_resm(TFAIL, "child returns %d", status);
+		params = cma_alloc_sane_params();
+		params->pid = parent_pid;
+		cma_test_params(params);
+		ret |= cma_check_ret(-1, TEST_RETURN);
+		ret |= cma_check_errno(EPERM);
+		cma_free_params(params);
+		exit(ret);
+	default:
+		if (waitpid(child_pid, &status, 0) == -1)
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
+		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
+			tst_resm(TFAIL, "child returns %d", status);
 	}
 }
 
@@ -395,9 +392,9 @@
 	/* make a shallow copy we can 'damage' */
 
 	p = mmap(NULL, getpagesize(), PROT_NONE,
-			MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+		 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 
 	params_copy = *sane_params;
 	params_copy.lvec->iov_base = p;
@@ -414,7 +411,7 @@
 	cma_check_errno(EFAULT);
 
 	if (munmap(p, getpagesize()) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "munmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "munmap");
 
 	cma_free_params(sane_params);
 }
diff --git a/testcases/kernel/syscalls/cma/process_vm_readv02.c b/testcases/kernel/syscalls/cma/process_vm_readv02.c
index 71836de..c0e3aff 100644
--- a/testcases/kernel/syscalls/cma/process_vm_readv02.c
+++ b/testcases/kernel/syscalls/cma/process_vm_readv02.c
@@ -61,14 +61,14 @@
 		len = strlen(tst_string);
 
 		if (pipe(pipe_fd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "pipe");
+			tst_brkm(TBROK | TERRNO, cleanup, "pipe");
 
 		/* the start of child_alloc and child_invoke is already
 		 * synchronized via pipe */
 		pids[0] = fork();
 		switch (pids[0]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #0");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #0");
 		case 0:
 			child_alloc();
 			exit(0);
@@ -77,7 +77,7 @@
 		pids[1] = fork();
 		switch (pids[1]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #1");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #1");
 		case 0:
 			child_invoke();
 			exit(0);
@@ -85,7 +85,7 @@
 
 		/* wait until child_invoke reads from child_alloc's VM */
 		if (waitpid(pids[1], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 1 returns %d", status);
 
@@ -93,7 +93,7 @@
 		safe_semop(semid, 0, 1);
 
 		if (waitpid(pids[0], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 0 returns %d", status);
 	}
@@ -133,21 +133,21 @@
 	SAFE_READ(tst_exit, 0, pipe_fd[0], buf, BUFSIZ);
 	SAFE_CLOSE(tst_exit, pipe_fd[0]);
 	if (sscanf(buf, "%p", &rp) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "sscanf");
+		tst_brkm(TBROK | TERRNO, tst_exit, "sscanf");
 
 	lp = SAFE_MALLOC(tst_exit, len + 1);
-	local.iov_base  = lp;
-	local.iov_len   = len;
+	local.iov_base = lp;
+	local.iov_len = len;
 	remote.iov_base = rp;
-	remote.iov_len  = len;
+	remote.iov_len = len;
 
 	tst_resm(TINFO, "child 1: reading string from same memory location.");
 	TEST(test_process_vm_readv(pids[0], &local, 1, &remote, 1, 0));
 	if (TEST_RETURN != len)
-		tst_brkm(TFAIL|TERRNO, tst_exit, "process_vm_readv");
+		tst_brkm(TFAIL | TERRNO, tst_exit, "process_vm_readv");
 	if (strncmp(lp, tst_string, len) != 0)
 		tst_brkm(TFAIL, tst_exit, "child 1: expected string: %s, "
-			    "received string: %256s", tst_string, lp);
+			 "received string: %256s", tst_string, lp);
 	else
 		tst_resm(TPASS, "expected string received.");
 }
@@ -158,7 +158,7 @@
 
 #if !defined(__NR_process_vm_readv)
 	tst_brkm(TCONF, NULL, "process_vm_readv does not exist "
-		    "on your system");
+		 "on your system");
 #endif
 	semid = init_sem(1);
 
diff --git a/testcases/kernel/syscalls/cma/process_vm_readv03.c b/testcases/kernel/syscalls/cma/process_vm_readv03.c
index 5da779f..c0a047a 100644
--- a/testcases/kernel/syscalls/cma/process_vm_readv03.c
+++ b/testcases/kernel/syscalls/cma/process_vm_readv03.c
@@ -42,9 +42,9 @@
 static int nflag, sflag;
 static char *nr_opt, *sz_opt;
 static option_t options[] = {
-	{ "n:", &nflag, &nr_opt },
-	{ "s:", &sflag, &sz_opt },
-	{ NULL, NULL,   NULL }
+	{"n:", &nflag, &nr_opt},
+	{"s:", &sflag, &sz_opt},
+	{NULL, NULL, NULL}
 };
 
 static int nr_iovecs;
@@ -70,14 +70,14 @@
 	msg = parse_opts(argc, argv, options, &help);
 	if (msg != NULL)
 		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s"
-				"use -help", msg);
+			 "use -help", msg);
 
 	setup();
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
 		if (pipe(pipe_fd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "pipe");
+			tst_brkm(TBROK | TERRNO, cleanup, "pipe");
 
 		bufsz_arr = SAFE_MALLOC(cleanup, nr_iovecs * sizeof(int));
 		gen_random_arr(bufsz_arr, nr_iovecs);
@@ -87,7 +87,7 @@
 		pids[0] = fork();
 		switch (pids[0]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #0");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #0");
 		case 0:
 			child_alloc(bufsz_arr);
 			exit(0);
@@ -96,7 +96,7 @@
 		pids[1] = fork();
 		switch (pids[1]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #1");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #1");
 		case 0:
 			child_invoke(bufsz_arr);
 			exit(0);
@@ -104,7 +104,7 @@
 
 		/* wait until child_invoke reads from child_alloc's VM */
 		if (waitpid(pids[1], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 1 returns %d", status);
 
@@ -112,7 +112,7 @@
 		safe_semop(semid, 0, 1);
 
 		if (waitpid(pids[0], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 0 returns %d", status);
 
@@ -134,7 +134,7 @@
 		arr[i] = bufsz_single;
 		bufsz_left -= bufsz_single;
 	}
-	arr[arr_sz-1] = bufsz_left;
+	arr[arr_sz - 1] = bufsz_left;
 }
 
 static void child_alloc(int *bufsz_arr)
@@ -155,7 +155,7 @@
 		}
 	}
 	tst_resm(TINFO, "child 0: %d iovecs allocated and initialized.",
-		    nr_iovecs);
+		 nr_iovecs);
 
 	/* passing addr via pipe */
 	SAFE_CLOSE(tst_exit, pipe_fd[0]);
@@ -179,18 +179,18 @@
 	SAFE_READ(tst_exit, 0, pipe_fd[0], buf, BUFSIZ);
 	SAFE_CLOSE(tst_exit, pipe_fd[0]);
 	if (sscanf(buf, "%p", &foo) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "sscanf");
+		tst_brkm(TBROK | TERRNO, tst_exit, "sscanf");
 
 	len = nr_iovecs * sizeof(long);
 	bar = SAFE_MALLOC(tst_exit, len);
-	local.iov_base  = bar;
-	local.iov_len   = len;
+	local.iov_base = bar;
+	local.iov_len = len;
 	remote.iov_base = foo;
-	remote.iov_len  = len;
+	remote.iov_len = len;
 
 	TEST(test_process_vm_readv(pids[0], &local, 1, &remote, 1, 0));
 	if (TEST_RETURN != len)
-		tst_brkm(TFAIL|TERRNO, tst_exit, "process_vm_readv");
+		tst_brkm(TFAIL | TERRNO, tst_exit, "process_vm_readv");
 
 	return local.iov_base;
 }
@@ -208,22 +208,22 @@
 	remote = SAFE_MALLOC(tst_exit, nr_iovecs * sizeof(struct iovec));
 	for (i = 0; i < nr_iovecs; i++) {
 		remote[i].iov_base = (void *)addrs[i];
-		remote[i].iov_len  = bufsz_arr[i];
+		remote[i].iov_len = bufsz_arr[i];
 	}
 	tst_resm(TINFO, "child 1: %d remote iovecs received.", nr_iovecs);
 
 	gen_random_arr(rcv_arr, NUM_LOCAL_VECS);
 	for (i = 0; i < NUM_LOCAL_VECS; i++) {
 		local[i].iov_base = SAFE_MALLOC(tst_exit, rcv_arr[i]);
-		local[i].iov_len  = rcv_arr[i];
+		local[i].iov_len = rcv_arr[i];
 	}
 	tst_resm(TINFO, "child 1: %d local iovecs initialized.",
-		    NUM_LOCAL_VECS);
+		 NUM_LOCAL_VECS);
 
 	TEST(test_process_vm_readv(pids[0], local, NUM_LOCAL_VECS,
-		    remote, nr_iovecs, 0));
+				   remote, nr_iovecs, 0));
 	if (TEST_RETURN != bufsz)
-		tst_brkm(TBROK|TERRNO, tst_exit, "process_vm_readv");
+		tst_brkm(TBROK | TERRNO, tst_exit, "process_vm_readv");
 
 	/* verify every byte */
 	count = 0;
@@ -235,8 +235,8 @@
 			if (expect != actual) {
 #if DEBUG
 				tst_resm(TFAIL, "child 1: expected %i, got %i "
-						"for byte seq %d",
-						expect, actual, count);
+					 "for byte seq %d",
+					 expect, actual, count);
 #endif
 				nr_error++;
 			}
@@ -245,7 +245,7 @@
 	}
 	if (nr_error)
 		tst_brkm(TFAIL, tst_exit, "child 1: %d incorrect bytes "
-				"received.", nr_error);
+			 "received.", nr_error);
 	else
 		tst_resm(TPASS, "child 1: all bytes are correctly received.");
 }
@@ -256,11 +256,11 @@
 
 	nr_iovecs = nflag ? SAFE_STRTOL(NULL, nr_opt, 1, IOV_MAX) : 10;
 	bufsz = sflag ? SAFE_STRTOL(NULL, sz_opt, NUM_LOCAL_VECS, LONG_MAX)
-		    : 100000;
+	    : 100000;
 
 #if !defined(__NR_process_vm_readv)
 	tst_brkm(TCONF, NULL, "process_vm_readv does not exist "
-		    "on your system");
+		 "on your system");
 #endif
 	semid = init_sem(1);
 	srand(time(NULL));
diff --git a/testcases/kernel/syscalls/cma/process_vm_writev02.c b/testcases/kernel/syscalls/cma/process_vm_writev02.c
index 32b9503..10d1d50 100644
--- a/testcases/kernel/syscalls/cma/process_vm_writev02.c
+++ b/testcases/kernel/syscalls/cma/process_vm_writev02.c
@@ -41,8 +41,8 @@
 static int sflag;
 static char *sz_opt;
 static option_t options[] = {
-	{ "s:", &sflag, &sz_opt },
-	{ NULL, NULL,   NULL }
+	{"s:", &sflag, &sz_opt},
+	{NULL, NULL, NULL}
 };
 
 static long bufsz;
@@ -70,14 +70,14 @@
 		Tst_count = 0;
 
 		if (pipe(pipe_fd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "pipe");
+			tst_brkm(TBROK | TERRNO, cleanup, "pipe");
 
 		/* the start of child_init_and_verify and child_write is
 		 * already synchronized via pipe */
 		pids[0] = fork();
 		switch (pids[0]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #0");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #0");
 		case 0:
 			child_init_and_verify();
 			exit(0);
@@ -88,7 +88,7 @@
 		pids[1] = fork();
 		switch (pids[1]) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #1");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #1");
 		case 0:
 			child_write();
 			exit(0);
@@ -97,7 +97,7 @@
 		/* wait until child_write writes into
 		 * child_init_and_verify's VM */
 		if (waitpid(pids[1], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 1 returns %d", status);
 
@@ -105,7 +105,7 @@
 		safe_semop(semid, 0, 1);
 
 		if (waitpid(pids[0], &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child 0 returns %d", status);
 	}
@@ -139,15 +139,14 @@
 		if (foo[i] != i % 256) {
 #if DEBUG
 			tst_resm(TFAIL, "child 0: expected %i, got %i for "
-					"byte seq %ld",
-					i % 256, foo[i], i);
+				 "byte seq %ld", i % 256, foo[i], i);
 #endif
 			nr_err++;
 		}
 	}
 	if (nr_err)
 		tst_brkm(TFAIL, tst_exit, "child 0: got %ld incorrect bytes.",
-			    nr_err);
+			 nr_err);
 	else
 		tst_resm(TPASS, "child 0: all bytes are expected.");
 }
@@ -164,36 +163,37 @@
 	SAFE_READ(tst_exit, 0, pipe_fd[0], buf, bufsz);
 	SAFE_CLOSE(tst_exit, pipe_fd[0]);
 	if (sscanf(buf, "%p", &rp) != 1)
-		tst_brkm(TBROK|TERRNO, tst_exit, "sscanf");
+		tst_brkm(TBROK | TERRNO, tst_exit, "sscanf");
 
 	lp = SAFE_MALLOC(tst_exit, bufsz + PADDING_SIZE * 2);
 
 	for (i = 0; i < bufsz + PADDING_SIZE * 2; i++)
 		lp[i] = DEFAULT_CHAR;
 	for (i = 0; i < bufsz; i++)
-		lp[i+PADDING_SIZE] = i % 256;
+		lp[i + PADDING_SIZE] = i % 256;
 
-	local.iov_base  = lp + PADDING_SIZE;
-	local.iov_len   = bufsz;
+	local.iov_base = lp + PADDING_SIZE;
+	local.iov_len = bufsz;
 	remote.iov_base = rp;
-	remote.iov_len  = bufsz;
+	remote.iov_len = bufsz;
 
 	tst_resm(TINFO, "child 2: write to the same memory location.");
 	TEST(test_process_vm_writev(pids[0], &local, 1, &remote, 1, 0));
 	if (TEST_RETURN != bufsz)
-		tst_brkm(TFAIL|TERRNO, tst_exit, "process_vm_readv");
+		tst_brkm(TFAIL | TERRNO, tst_exit, "process_vm_readv");
 }
 
 static void setup(void)
 {
 	tst_require_root(NULL);
 
-	bufsz = sflag ? SAFE_STRTOL(NULL, sz_opt, 1, LONG_MAX-PADDING_SIZE*2)
-		    : 100000;
+	bufsz =
+	    sflag ? SAFE_STRTOL(NULL, sz_opt, 1, LONG_MAX - PADDING_SIZE * 2)
+	    : 100000;
 
 #if !defined(__NR_process_vm_readv)
 	tst_brkm(TCONF, NULL, "process_vm_writev does not exist "
-		    "on your system");
+		 "on your system");
 #endif
 	semid = init_sem(1);
 
diff --git a/testcases/kernel/syscalls/connect/connect01.c b/testcases/kernel/syscalls/connect/connect01.c
index e2085d3..83f11f0 100644
--- a/testcases/kernel/syscalls/connect/connect01.c
+++ b/testcases/kernel/syscalls/connect/connect01.c
@@ -116,7 +116,6 @@
 	EAFNOSUPPORT, 0
 };
 
-
 #ifdef UCLINUX
 static char *argv0;
 #endif
@@ -169,7 +168,7 @@
 	cleanup();
 
 	tst_exit();
- }
+}
 
 pid_t pid;
 
@@ -212,7 +211,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 
 }
 
@@ -225,7 +224,7 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket() failed");
 }
 
 void cleanup1(void)
@@ -238,7 +237,8 @@
 {
 	setup1();		/* get a socket in s */
 	if (connect(s, (const struct sockaddr *)&sin1, sizeof(sin1)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed connect test %d", testno);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "socket setup failed connect test %d", testno);
 }
 
 pid_t start_server(struct sockaddr_in *sin0)
@@ -248,15 +248,15 @@
 
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	switch ((pid = FORK_OR_VFORK())) {
@@ -268,7 +268,7 @@
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 		/* fall through */
 	default:		/* parent */
 		(void)close(sfd);
diff --git a/testcases/kernel/syscalls/creat/creat01.c b/testcases/kernel/syscalls/creat/creat01.c
index 0d718ec..fd90d0c 100644
--- a/testcases/kernel/syscalls/creat/creat01.c
+++ b/testcases/kernel/syscalls/creat/creat01.c
@@ -78,10 +78,11 @@
 struct test_case_t {
 	char *fname;
 	int mode;
-	void (*functest)();
+	void (*functest) ();
 } TC[] = {
-	{ filename, MODE1, functest1},
-	{ filename, MODE2, functest2}
+	{
+	filename, MODE1, functest1}, {
+	filename, MODE2, functest2}
 };
 
 int main(int ac, char **av)
@@ -103,12 +104,12 @@
 			TEST(fd = creat(filename, TC[i].mode));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO, "creat failed");
+				tst_resm(TFAIL | TTERRNO, "creat failed");
 				continue;
 			}
 
 			if (STD_FUNCTIONAL_TEST)
-				(*TC[i].functest)();
+				(*TC[i].functest) ();
 			else
 				tst_resm(TPASS, "call succeeded");
 			close(fd);
@@ -132,7 +133,7 @@
 	struct stat buf;
 
 	if (stat(filename, &buf) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "stat failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "stat failed");
 	if (buf.st_size == 0)
 		tst_resm(TPASS, "creat truncated existing file to 0 bytes");
 	else
@@ -147,9 +148,9 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid failed");
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/creat/creat03.c b/testcases/kernel/syscalls/creat/creat03.c
index 4352afb..040bada 100644
--- a/testcases/kernel/syscalls/creat/creat03.c
+++ b/testcases/kernel/syscalls/creat/creat03.c
@@ -101,7 +101,8 @@
 		close(TEST_RETURN);
 		/* clean up things in case we are looping */
 		if (unlink(pfilname) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "couldn't remove file");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "couldn't remove file");
 		}
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/creat/creat04.c b/testcases/kernel/syscalls/creat/creat04.c
index 8467a44..815e4fb 100644
--- a/testcases/kernel/syscalls/creat/creat04.c
+++ b/testcases/kernel/syscalls/creat/creat04.c
@@ -78,8 +78,9 @@
 struct test_case_t {
 	char *fname;
 } TC[] = {
-	{ fname},
-	{ fname1}
+	{
+	fname}, {
+	fname1}
 };
 
 int main(int ac, char **av)
@@ -104,7 +105,7 @@
 		Tst_count = 0;
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() #1 failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() #1 failed");
 		}
 
 		if (pid == 0) {	/* first child */
@@ -126,7 +127,7 @@
 		}
 
 		if ((pid1 = FORK_OR_VFORK()) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() #2 failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() #2 failed");
 		}
 
 		if (pid1 == 0) {	/* second child */
@@ -158,7 +159,8 @@
 
 				if (TEST_ERRNO != EACCES) {
 					retval = 1;
-					tst_resm(TFAIL|TTERRNO, "Expected EACCES");
+					tst_resm(TFAIL | TTERRNO,
+						 "Expected EACCES");
 				} else {
 					tst_resm(TPASS, "call failed with "
 						 "EACCES as expected");
@@ -185,7 +187,7 @@
 	cleanup();
 
 	tst_exit();
- }
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/creat/creat05.c b/testcases/kernel/syscalls/creat/creat05.c
index ae29bff..741aad6 100644
--- a/testcases/kernel/syscalls/creat/creat05.c
+++ b/testcases/kernel/syscalls/creat/creat05.c
@@ -101,7 +101,7 @@
 			tst_resm(TPASS, "call failed with expected error - "
 				 "EMFILE");
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Expected EMFILE");
+			tst_resm(TFAIL | TTERRNO, "Expected EMFILE");
 		}
 
 		remove_files(ifile);
@@ -154,8 +154,8 @@
 				 "#%d", ifile + 1);
 			if (errno != EMFILE) {
 				remove_files(ifile);
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "Failed unexpectedly (expected EMFILE)");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "Failed unexpectedly (expected EMFILE)");
 			}
 			break;
 		}
diff --git a/testcases/kernel/syscalls/creat/creat06.c b/testcases/kernel/syscalls/creat/creat06.c
index 45990f2..e6e6fcc 100644
--- a/testcases/kernel/syscalls/creat/creat06.c
+++ b/testcases/kernel/syscalls/creat/creat06.c
@@ -101,19 +101,25 @@
 	int error;
 } TC[] = {
 	/* The file name is an existing directory */
-	{ good_dir, MODE1, EISDIR },
-	/* The file name is too long - ENAMETOOLONG */
-	{ long_name, MODE1, ENAMETOOLONG },
-	/* Attempt to create a file in a directory that doesn't exist - ENOENT */
-	{ no_dir, MODE1, ENOENT },
-	/* a compent of the file's path is not a directory - ENOTDIR */
-	{ not_dir, MODE1, ENOTDIR },
+	{
+	good_dir, MODE1, EISDIR},
+	    /* The file name is too long - ENAMETOOLONG */
+	{
+	long_name, MODE1, ENAMETOOLONG},
+	    /* Attempt to create a file in a directory that doesn't exist - ENOENT */
+	{
+	no_dir, MODE1, ENOENT},
+	    /* a compent of the file's path is not a directory - ENOTDIR */
+	{
+	not_dir, MODE1, ENOTDIR},
 #if !defined(UCLINUX)
-	/* The file address is bad - EFAULT */
-	{ (char *)-1, MODE1, EFAULT },
+	    /* The file address is bad - EFAULT */
+	{
+	(char *)-1, MODE1, EFAULT},
 #endif
-	/* The directory lacks execute permission - EACCES */
-	{ test6_file, MODE1, EACCES }
+	    /* The directory lacks execute permission - EACCES */
+	{
+	test6_file, MODE1, EACCES}
 };
 
 int TST_TOTAL = (sizeof(TC) / sizeof(*TC));
@@ -152,9 +158,11 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == TC[i].error) {
-				tst_resm(TPASS|TTERRNO, "got expected failure");
+				tst_resm(TPASS | TTERRNO,
+					 "got expected failure");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "wanted errno %d", TC[i].error);
+				tst_resm(TFAIL | TTERRNO, "wanted errno %d",
+					 TC[i].error);
 			}
 		}
 	}
@@ -174,10 +182,10 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "seteuid(%d) failed", ltpuser->pw_uid);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "seteuid(%d) failed", ltpuser->pw_uid);
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
@@ -187,7 +195,7 @@
 
 	/* get the current directory for the first test */
 	if ((cur_dir = getcwd(cur_dir, 0)) == NULL) {
-		tst_brkm(TBROK|TERRNO, cleanup, "getcwd failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getcwd failed");
 	}
 
 	strncpy(good_dir, cur_dir, NSIZE);
@@ -200,7 +208,7 @@
 	bad_addr = mmap(0, 1, PROT_NONE,
 			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED) {
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	}
 	TC[4].fname = bad_addr;
 #endif
diff --git a/testcases/kernel/syscalls/creat/creat07.c b/testcases/kernel/syscalls/creat/creat07.c
index eea35f0..aea119c 100644
--- a/testcases/kernel/syscalls/creat/creat07.c
+++ b/testcases/kernel/syscalls/creat/creat07.c
@@ -87,7 +87,7 @@
 		Tst_count = 0;
 
 		if ((pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #1 failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #1 failed");
 
 		if (pid == 0) {
 			char *av[2];
@@ -123,7 +123,7 @@
 			exit(retval);
 		}
 		if (wait(&status) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "wait failed");
 		if (WIFEXITED(status) || WEXITSTATUS(status) == 0)
 			tst_resm(TPASS, "creat functionality correct");
 		else
@@ -141,21 +141,20 @@
 
 	if (app[0] == '/')
 		snprintf(test_path, sizeof(test_path), "%s/%s",
-				dirname(app), test_app);
+			 dirname(app), test_app);
 	else {
 		if ((pwd = get_current_dir_name()) == NULL)
-			tst_brkm(TBROK|TERRNO, NULL, "getcwd failed");
+			tst_brkm(TBROK | TERRNO, NULL, "getcwd failed");
 
-		snprintf(test_path, sizeof(test_path), "%s/%s",
-		    pwd, test_app);
+		snprintf(test_path, sizeof(test_path), "%s/%s", pwd, test_app);
 
 		free(pwd);
 	}
 
 	cmd = malloc(strlen(test_path) + strlen("cp -p \"") + strlen("\" .") +
-	    1);
+		     1);
 	if (cmd == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "Cannot alloc command string");
+		tst_brkm(TBROK | TERRNO, NULL, "Cannot alloc command string");
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/creat/creat08.c b/testcases/kernel/syscalls/creat/creat08.c
index c55b05d..fc6b40f 100644
--- a/testcases/kernel/syscalls/creat/creat08.c
+++ b/testcases/kernel/syscalls/creat/creat08.c
@@ -114,7 +114,8 @@
 
 		/* Get the uid of user1 */
 		if ((user1 = getpwnam("nobody")) == NULL) {
-			tst_brkm(TBROK|TERRNO, NULL, "getpwnam(\"nobody\") failed");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "getpwnam(\"nobody\") failed");
 		}
 
 		user1_uid = user1->pw_uid;
@@ -124,15 +125,15 @@
 		 */
 		if ((group = getgrnam("nobody")) == NULL) {
 			if ((group = getgrnam("nogroup")) == NULL) {
-				tst_brkm(TBROK|TERRNO, cleanup,
-					"getgrnam(\"nobody\") and "
-					"getgrnam(\"nogroup\") failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "getgrnam(\"nobody\") and "
+					 "getgrnam(\"nogroup\") failed");
 			}
 		}
 		group1_gid = group->gr_gid;
 		if ((group = getgrnam("bin")) == NULL) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "getgrnam(\"bin\") failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "getgrnam(\"bin\") failed");
 		}
 		group2_gid = group->gr_gid;
 
@@ -244,7 +245,7 @@
 		/*
 		 * Create the file with setgid not set
 		 */
-		fd = open(nosetgid_A, O_CREAT|O_EXCL|O_RDWR, MODE_RWX);
+		fd = open(nosetgid_A, O_CREAT | O_EXCL | O_RDWR, MODE_RWX);
 		if (fd == -1) {
 			tst_resm(TFAIL, "Creation of %s failed", nosetgid_A);
 			local_flag = FAILED;
@@ -388,7 +389,8 @@
 /*--------------------------------------------------------------*/
 		/* Become root again */
 		if (setreuid(-1, save_myuid) == -1) {
-			tst_resm(TFAIL|TERRNO, "Changing back to root failed");
+			tst_resm(TFAIL | TERRNO,
+				 "Changing back to root failed");
 			local_flag = FAILED;
 		}
 
@@ -446,19 +448,20 @@
 		tst_resm(TBROK, "unlink %s failed", nosetgid_A);
 	}
 	if (rmdir(DIR_A) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "rmdir %s failed", DIR_A);
+		tst_brkm(TBROK | TERRNO, NULL, "rmdir %s failed", DIR_A);
 	}
 	if (unlink(setgid_B) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlink %s failed", setgid_B);
+		tst_brkm(TBROK | TERRNO, NULL, "unlink %s failed", setgid_B);
 	}
 	if (unlink(root_setgid_B) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlink %s failed", root_setgid_B);
+		tst_brkm(TBROK | TERRNO, NULL, "unlink %s failed",
+			 root_setgid_B);
 	}
 	if (unlink(nosetgid_B) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "unlink %s failed", nosetgid_B);
+		tst_brkm(TBROK | TERRNO, NULL, "unlink %s failed", nosetgid_B);
 	}
 	if (rmdir(DIR_B) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "rmdir %s failed", DIR_B);
+		tst_brkm(TBROK | TERRNO, NULL, "rmdir %s failed", DIR_B);
 	}
 
 	tst_rmdir();
diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c
index 2fb8444..bd4e467 100644
--- a/testcases/kernel/syscalls/creat/creat09.c
+++ b/testcases/kernel/syscalls/creat/creat09.c
@@ -157,9 +157,11 @@
 
 		/* close and remove file, possibly for next loop */
 		if (close(TEST_RETURN) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "closing %s failed", fname);
+			tst_brkm(TBROK | TERRNO, cleanup, "closing %s failed",
+				 fname);
 		} else if (unlink(fname) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup, "unlinking %s failed", fname);
+			tst_brkm(TBROK | TERRNO, cleanup, "unlinking %s failed",
+				 fname);
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/dup/dup01.c b/testcases/kernel/syscalls/dup/dup01.c
index 61aaf0b..33364f8 100644
--- a/testcases/kernel/syscalls/dup/dup01.c
+++ b/testcases/kernel/syscalls/dup/dup01.c
@@ -153,20 +153,20 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL, "dup(%s) Failed, errno=%d : %s", filename,
-				 TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL, "dup(%s) Failed, errno=%d : %s",
+				 filename, TEST_ERRNO, strerror(TEST_ERRNO));
 		} else {
 
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "dup(%s) returned %ld",
-				    filename, TEST_RETURN);
+					 filename, TEST_RETURN);
 			}
 
 			/* close the new file so loops do not open too many files */
 			if (close(TEST_RETURN) == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "closing %s failed", filename);
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "closing %s failed", filename);
 			}
 		}
 
@@ -189,7 +189,7 @@
 
 	sprintf(filename, "dupfile");
 	if ((fd = open(filename, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -198,7 +198,7 @@
 
 	if (fd != -1)
 		if (close(fd) == -1)
-			tst_resm(TWARN|TERRNO, "closing %s failed", filename);
+			tst_resm(TWARN | TERRNO, "closing %s failed", filename);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/dup/dup02.c b/testcases/kernel/syscalls/dup/dup02.c
index baf833c..bb86feb 100644
--- a/testcases/kernel/syscalls/dup/dup02.c
+++ b/testcases/kernel/syscalls/dup/dup02.c
@@ -152,18 +152,18 @@
 				if (STD_FUNCTIONAL_TEST) {
 					if (TEST_ERRNO == EBADF)
 						tst_resm(TPASS,
-						    "dup failed as expected "
-						    "with EBADF");
+							 "dup failed as expected "
+							 "with EBADF");
 					else
-						tst_resm(TFAIL|TTERRNO,
-						    "dup failed unexpectedly");
+						tst_resm(TFAIL | TTERRNO,
+							 "dup failed unexpectedly");
 				}
 			} else {
 				tst_resm(TFAIL, "dup succeeded unexpectedly");
 
 				if (close(TEST_RETURN) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "close failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "close failed");
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/dup/dup03.c b/testcases/kernel/syscalls/dup/dup03.c
index 1cbad62..e7cc18d 100644
--- a/testcases/kernel/syscalls/dup/dup03.c
+++ b/testcases/kernel/syscalls/dup/dup03.c
@@ -147,18 +147,18 @@
 			if (STD_FUNCTIONAL_TEST) {
 				if (TEST_ERRNO == EMFILE)
 					tst_resm(TPASS,
-					    "dup failed as expected with "
-					    "EMFILE");
+						 "dup failed as expected with "
+						 "EMFILE");
 				else
-					tst_resm(TFAIL|TTERRNO,
-					    "dup failed unexpectedly");
+					tst_resm(TFAIL | TTERRNO,
+						 "dup failed unexpectedly");
 			}
 		} else {
 			tst_resm(TFAIL, "dup succeeded unexpectedly");
 
 			if (close(TEST_RETURN) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "close failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "close failed");
 		}
 
 	}
@@ -178,12 +178,12 @@
 	 * why == -1 matters for errno.
 	 */
 	if (maxfds < 1)
-		tst_brkm((maxfds == -1 ? TBROK|TERRNO : TBROK), NULL,
-		    "sysconf(_SC_OPEN_MAX) failed");
+		tst_brkm((maxfds == -1 ? TBROK | TERRNO : TBROK), NULL,
+			 "sysconf(_SC_OPEN_MAX) failed");
 
 	fd = malloc(maxfds * sizeof(int));
 	if (fd == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
+		tst_brkm(TBROK | TERRNO, NULL, "malloc failed");
 	fd[0] = -1;
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
@@ -194,11 +194,12 @@
 
 	sprintf(filename, "dupfile");
 	for (nfds = 1; nfds <= maxfds; nfds++)
-		if ((fd[nfds-1] = open(filename, O_RDWR|O_CREAT, 0700)) == -1) {
+		if ((fd[nfds - 1] =
+		     open(filename, O_RDWR | O_CREAT, 0700)) == -1) {
 			if (errno == EMFILE)
 				break;
 			else
-				tst_brkm(TBROK|TBROK, cleanup, "open failed");
+				tst_brkm(TBROK | TBROK, cleanup, "open failed");
 			nfds--;
 		}
 
@@ -206,9 +207,8 @@
 		tst_brkm(TBROK, cleanup, "unable to open at least one file");
 	if (nfds > maxfds)
 		tst_brkm(TBROK, cleanup,
-		    "unable to open enough files to use all file descriptors, "
-		    "tried %ld",
-		    maxfds);
+			 "unable to open enough files to use all file descriptors, "
+			 "tried %ld", maxfds);
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/dup/dup04.c b/testcases/kernel/syscalls/dup/dup04.c
index 213166e..88de646 100644
--- a/testcases/kernel/syscalls/dup/dup04.c
+++ b/testcases/kernel/syscalls/dup/dup04.c
@@ -150,8 +150,8 @@
 		TEST(dup(fd[0]));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TERRNO,
-			    "dup of read side of pipe failed");
+			tst_resm(TFAIL | TERRNO,
+				 "dup of read side of pipe failed");
 		else {
 			if (STD_FUNCTIONAL_TEST) {
 				tst_resm(TPASS,
@@ -168,8 +168,8 @@
 		TEST(dup(fd[1]));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO,
-			    "dup of write side of pipe failed");
+			tst_resm(TFAIL | TTERRNO,
+				 "dup of write side of pipe failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST) {
@@ -181,8 +181,8 @@
 				Tst_count++;
 
 			if (close(TEST_RETURN) == -1)
-				tst_brkm(TBROK|TTERRNO, cleanup,
-				    "close failed");
+				tst_brkm(TBROK | TTERRNO, cleanup,
+					 "close failed");
 		}
 
 	}
@@ -202,7 +202,7 @@
 	tst_tmpdir();
 
 	if (pipe(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/dup/dup05.c b/testcases/kernel/syscalls/dup/dup05.c
index 3c07e3c..974742a 100644
--- a/testcases/kernel/syscalls/dup/dup05.c
+++ b/testcases/kernel/syscalls/dup/dup05.c
@@ -148,15 +148,16 @@
 		TEST(dup(fd));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "dup failed");
+			tst_resm(TFAIL | TTERRNO, "dup failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS, "dup returned %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 
 			if (close(TEST_RETURN) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "close failed");
 		}
 
 	}
@@ -189,7 +190,7 @@
 
 	if (fd != -1)
 		if (close(fd) == -1)
-			tst_resm(TWARN|TERRNO, "close failed");
+			tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/dup/dup07.c b/testcases/kernel/syscalls/dup/dup07.c
index 1714483..c9ddaf0 100644
--- a/testcases/kernel/syscalls/dup/dup07.c
+++ b/testcases/kernel/syscalls/dup/dup07.c
@@ -69,7 +69,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 }
+	}
 
 	local_flag = PASSED;
 
diff --git a/testcases/kernel/syscalls/dup2/dup201.c b/testcases/kernel/syscalls/dup2/dup201.c
index 76d0f30..59be0f0 100644
--- a/testcases/kernel/syscalls/dup2/dup201.c
+++ b/testcases/kernel/syscalls/dup2/dup201.c
@@ -89,13 +89,17 @@
 	void (*setupfunc) ();
 } TC[] = {
 	/* First fd argument is less than 0 - EBADF */
-	{ &badfd, &goodfd, EBADF, NULL},
-	/* First fd argument is getdtablesize() - EBADF */
-	{ &maxfd, &goodfd, EBADF, NULL},
-	/* Second fd argument is less than 0 - EBADF */
-	{ &mystdout, &badfd, EBADF, NULL},
-	/* Second fd argument is getdtablesize() - EBADF */
-	{ &mystdout, &maxfd, EBADF, NULL},};
+	{
+	&badfd, &goodfd, EBADF, NULL},
+	    /* First fd argument is getdtablesize() - EBADF */
+	{
+	&maxfd, &goodfd, EBADF, NULL},
+	    /* Second fd argument is less than 0 - EBADF */
+	{
+	&mystdout, &badfd, EBADF, NULL},
+	    /* Second fd argument is getdtablesize() - EBADF */
+	{
+&mystdout, &maxfd, EBADF, NULL},};
 
 int main(int ac, char **av)
 {
@@ -121,7 +125,7 @@
 
 			/* call the test case setup routine if necessary */
 			if (TC[i].setupfunc != NULL)
-				(*TC[i].setupfunc)();
+				(*TC[i].setupfunc) ();
 
 			TEST(dup2(*TC[i].ofd, *TC[i].nfd));
 
@@ -134,12 +138,13 @@
 
 			if (TEST_ERRNO == TC[i].error) {
 				tst_resm(TPASS,
-				    "failed as expected - errno = %d : %s",
-				    TEST_ERRNO, strerror(TEST_ERRNO));
+					 "failed as expected - errno = %d : %s",
+					 TEST_ERRNO, strerror(TEST_ERRNO));
 			} else {
-				tst_resm(TFAIL|TTERRNO, "failed unexpectedly; "
-				    "expected %d: %s", TC[i].error,
-				    strerror(TC[i].error));
+				tst_resm(TFAIL | TTERRNO,
+					 "failed unexpectedly; "
+					 "expected %d: %s", TC[i].error,
+					 strerror(TC[i].error));
 			}
 		}
 		/* cleanup things in case we are looping */
diff --git a/testcases/kernel/syscalls/dup2/dup202.c b/testcases/kernel/syscalls/dup2/dup202.c
index 997d4f8..d05290a 100644
--- a/testcases/kernel/syscalls/dup2/dup202.c
+++ b/testcases/kernel/syscalls/dup2/dup202.c
@@ -73,11 +73,15 @@
 	mode_t mode;
 } TC[] = {
 	/* The first test creat(es) a file with mode 0444 */
-	{ &duprdo, (S_IRUSR | S_IRGRP | S_IROTH) },
-	/* The second test creat(es) a file with mode 0222 */
-	{ &dupwro, (S_IWUSR | S_IWGRP | S_IWOTH) },
-	/* The third test creat(es) a file with mode 0666 */
-	{ &duprdwr, (S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH) }
+	{
+	&duprdo, (S_IRUSR | S_IRGRP | S_IROTH)},
+	    /* The second test creat(es) a file with mode 0222 */
+	{
+	&dupwro, (S_IWUSR | S_IWGRP | S_IWOTH)},
+	    /* The third test creat(es) a file with mode 0666 */
+	{
+	&duprdwr,
+		    (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH)}
 };
 
 int main(int ac, char **av)
@@ -100,13 +104,14 @@
 		for (i = 0; i < TST_TOTAL; i++) {
 
 			if ((ofd = creat(testfile, TC[i].mode)) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "creat failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "creat failed");
 
 			TEST(dup2(ofd, *TC[i].nfd));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TERRNO,
-				    "call failed unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "call failed unexpectedly");
 				continue;
 			}
 
@@ -114,13 +119,13 @@
 
 				/* stat the original file */
 				if (fstat(ofd, &oldbuf) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "fstat #1 failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "fstat #1 failed");
 
 				/* stat the duped file */
 				if (fstat(*TC[i].nfd, &newbuf) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "fstat #2 failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "fstat #2 failed");
 
 				if (oldbuf.st_mode != newbuf.st_mode)
 					tst_resm(TFAIL, "original and dup "
diff --git a/testcases/kernel/syscalls/dup2/dup203.c b/testcases/kernel/syscalls/dup2/dup203.c
index 32aea3b..878415b 100644
--- a/testcases/kernel/syscalls/dup2/dup203.c
+++ b/testcases/kernel/syscalls/dup2/dup203.c
@@ -142,7 +142,7 @@
 		}
 		if (fcntl(fd0, F_SETFD, 1) == -1) {
 			tst_brkm(TBROK, cleanup, "setting close on exec flag "
-				"on fd0 failed");
+				 "on fd0 failed");
 		}
 
 		if ((fd2 = creat(filename1, 0666)) == -1) {
@@ -164,15 +164,16 @@
 			}
 
 			if ((rval = fcntl(fd1, F_GETFD, 0)) != 0) {
-				tst_resm(TBROK|TERRNO,
-				    "fcntl F_GETFD on fd1 failed; expected a "
-				    "return value of 0x0, got %#x", rval);
+				tst_resm(TBROK | TERRNO,
+					 "fcntl F_GETFD on fd1 failed; expected a "
+					 "return value of 0x0, got %#x", rval);
 				break;
 			}
 			if ((rval = (fcntl(fd0, F_GETFL, 0) & O_ACCMODE)) !=
 			    O_WRONLY) {
 				tst_resm(TFAIL, "fctnl F_GETFL bad rval on fd0 "
-					"Expected %#x got %#x", O_WRONLY, rval);
+					 "Expected %#x got %#x", O_WRONLY,
+					 rval);
 			}
 			tst_resm(TPASS, "dup2 test 2 functionality is correct");
 		} else {
diff --git a/testcases/kernel/syscalls/dup2/dup204.c b/testcases/kernel/syscalls/dup2/dup204.c
index e15cb36..9740cdf 100644
--- a/testcases/kernel/syscalls/dup2/dup204.c
+++ b/testcases/kernel/syscalls/dup2/dup204.c
@@ -104,7 +104,8 @@
 				tst_resm(TPASS, "call succeeded");
 
 			if (close(TEST_RETURN) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "close failed");
 		}
 	}
 	cleanup();
@@ -123,7 +124,7 @@
 	tst_tmpdir();
 
 	if (pipe(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/dup2/dup205.c b/testcases/kernel/syscalls/dup2/dup205.c
index 91a3016..c728fcc 100644
--- a/testcases/kernel/syscalls/dup2/dup205.c
+++ b/testcases/kernel/syscalls/dup2/dup205.c
@@ -75,26 +75,26 @@
 
 		fildes = malloc((min + 10) * sizeof(int));
 		if (fildes == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "malloc error");
+			tst_brkm(TBROK | TERRNO, cleanup, "malloc error");
 
 		sprintf(pfilname, "./dup205.%d\n", getpid());
 		unlink(pfilname);
 		serrno = 0;
 		if ((fildes[0] = creat(pfilname, 0666)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "creat failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "creat failed");
 		else {
 			fildes[fildes[0]] = fildes[0];
 			for (ifile = fildes[0] + 1; ifile < min + 10; ifile++) {
 				if ((fildes[ifile] = dup2(fildes[ifile - 1],
-				    ifile)) == -1) {
+							  ifile)) == -1) {
 					serrno = errno;
 					break;
 				} else {
 					if (fildes[ifile] != ifile) {
 						tst_brkm(TFAIL, cleanup,
-						    "got wrong descriptor "
-						    "number back (%d != %d)",
-						    fildes[ifile], ifile);
+							 "got wrong descriptor "
+							 "number back (%d != %d)",
+							 fildes[ifile], ifile);
 					}
 				}
 			}	/* end for */
@@ -125,14 +125,12 @@
 	tst_exit();
 }
 
-static void
-setup(void)
+static void setup(void)
 {
 	tst_tmpdir();
 }
 
-static void
-cleanup(void)
+static void cleanup(void)
 {
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/dup3/dup3_01.c b/testcases/kernel/syscalls/dup3/dup3_01.c
index d4417a2..657e6f7 100644
--- a/testcases/kernel/syscalls/dup3/dup3_01.c
+++ b/testcases/kernel/syscalls/dup3/dup3_01.c
@@ -64,7 +64,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 /* Global Variables */
@@ -132,25 +132,24 @@
 
 	fd = syscall(__NR_dup3, 1, 4, 0);
 	if (fd == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "dup3(0) failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "dup3(0) failed");
 	}
 	coe = fcntl(fd, F_GETFD);
 	if (coe == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fcntl failed");
 	}
 	if (coe & FD_CLOEXEC) {
-		tst_brkm(TFAIL, cleanup,
-			 "dup3(0) set close-on-exec flag");
+		tst_brkm(TFAIL, cleanup, "dup3(0) set close-on-exec flag");
 	}
 	close(fd);
 
 	fd = syscall(__NR_dup3, 1, 4, O_CLOEXEC);
 	if (fd == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "dup3(O_CLOEXEC) failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "dup3(O_CLOEXEC) failed");
 	}
 	coe = fcntl(fd, F_GETFD);
 	if (coe == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fcntl failed");
 	}
 	if ((coe & FD_CLOEXEC) == 0) {
 		tst_brkm(TFAIL, cleanup,
diff --git a/testcases/kernel/syscalls/epoll/epoll-ltp.c b/testcases/kernel/syscalls/epoll/epoll-ltp.c
index 83aa956..62d0ecd 100644
--- a/testcases/kernel/syscalls/epoll/epoll-ltp.c
+++ b/testcases/kernel/syscalls/epoll/epoll-ltp.c
@@ -71,7 +71,7 @@
 *******************************************************************************/
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <stdio.h>
@@ -217,13 +217,13 @@
 	num_epoll_create_test_calls++;
 	epoll_fd = epoll_create(fd_set_size);
 	if (epoll_fd >= 0) {
-		tst_resm(TFAIL|TERRNO,
+		tst_resm(TFAIL | TERRNO,
 			 "epoll_create with negative set size succeeded unexpectedly");
 		num_epoll_create_test_fails++;
 		close(epoll_fd);
 	} else {
 		if (errno != EINVAL) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "epoll_create with negative set size didn't set errno to EINVAL");
 			num_epoll_create_test_fails++;
 		} else {
@@ -235,7 +235,8 @@
 	   small amount (expect num_rand_attempts to be approximately the
 	   amount we'd like to go below INT_MAX). */
 	fd_set_size = INT_MAX;
-	for (attempt_count = num_rand_attempts; attempt_count > 0; attempt_count--, fd_set_size--) {
+	for (attempt_count = num_rand_attempts; attempt_count > 0;
+	     attempt_count--, fd_set_size--) {
 		num_epoll_create_test_calls++;
 		epoll_fd = epoll_create(fd_set_size);
 		if (epoll_fd == -1) {
@@ -251,13 +252,15 @@
 			}
 		} else {
 			tst_resm(TPASS,
-				 "epoll_create with large set size (size = %d)", fd_set_size);
+				 "epoll_create with large set size (size = %d)",
+				 fd_set_size);
 			close(epoll_fd);
 		}
 	}
 
 	/* Random large set sizes */
-	for (attempt_count = num_rand_attempts; attempt_count > 0; attempt_count--) {
+	for (attempt_count = num_rand_attempts; attempt_count > 0;
+	     attempt_count--) {
 		fd_set_size = abs(rand() + SHRT_MAX) % INT_MAX;
 		errno = 0;
 		num_epoll_create_test_calls++;
@@ -283,11 +286,11 @@
 
 	tst_resm(TINFO,
 		 "Summary: Of %d tests, epoll_create failed %d (%3.0f%% passed).",
-		 num_epoll_create_test_calls, num_epoll_create_test_fails, ((float)
-									    (num_epoll_create_test_calls -
-									     num_epoll_create_test_fails)
-									    * 100.0f / (float)
-									    num_epoll_create_test_calls));
+		 num_epoll_create_test_calls, num_epoll_create_test_fails,
+		 ((float)
+		  (num_epoll_create_test_calls - num_epoll_create_test_fails)
+		  * 100.0f / (float)
+		  num_epoll_create_test_calls));
 	/* Return 0 on success. */
 
 	return num_epoll_create_test_fails;
@@ -390,7 +393,8 @@
 	int epoll_fds[] = { 0, -1, 0, INT_MAX };
 	int epoll_events[64];
 	/* The list of operations to try AND THE ORDER THEY ARE TRIED IN */
-	int epoll_ctl_ops[] = { EPOLL_CTL_DEL, EPOLL_CTL_MOD, EPOLL_CTL_ADD, EPOLL_CTL_MOD,
+	int epoll_ctl_ops[] =
+	    { EPOLL_CTL_DEL, EPOLL_CTL_MOD, EPOLL_CTL_ADD, EPOLL_CTL_MOD,
 		EPOLL_CTL_DEL, EPOLL_CTL_MOD, EPOLL_CTL_DEL, INT_MAX, -1
 	};
 	struct epoll_event event;
@@ -426,7 +430,8 @@
 	{
 		char *unalign_ptr = event_mem;
 
-		unalign_ptr = unalign_ptr + (((unsigned long)unalign_ptr & 1) ? 0 : 1);
+		unalign_ptr =
+		    unalign_ptr + (((unsigned long)unalign_ptr & 1) ? 0 : 1);
 		unaligned_event_ptr = (struct epoll_event *)unalign_ptr;
 	}
 
@@ -454,20 +459,29 @@
 			break;
 		}
 
-		for (epfd_index = 0; epfd_index < (sizeof(epoll_fds) / sizeof(int)); epfd_index++) {
-			for (event_index = 0; event_index < (sizeof(epoll_events) / sizeof(int)); event_index++) {
-				for (fd_index = 0; fd_index < (sizeof(fds) / sizeof(int)); fd_index++) {
+		for (epfd_index = 0;
+		     epfd_index < (sizeof(epoll_fds) / sizeof(int));
+		     epfd_index++) {
+			for (event_index = 0;
+			     event_index < (sizeof(epoll_events) / sizeof(int));
+			     event_index++) {
+				for (fd_index = 0;
+				     fd_index < (sizeof(fds) / sizeof(int));
+				     fd_index++) {
 					/* Now epoll_fd is a descriptor that references the set of
 					   file descriptors we are interested in. Next we test epoll_ctl */
 					for (op_index = 0;
 					     op_index <
-					     (sizeof(epoll_ctl_ops) / sizeof(int)); op_index++) {
+					     (sizeof(epoll_ctl_ops) /
+					      sizeof(int)); op_index++) {
 						int result;
 						int expected_errno = 0;
 						int num_errors_expected = 0;
 
 						if (ev_ptr != NULL)
-							ev_ptr->events = epoll_events[event_index];
+							ev_ptr->events =
+							    epoll_events
+							    [event_index];
 
 						/* Perform the call itself. Put it in a protected region which
 						   returns -1 in the variable result if a protection violation
@@ -481,7 +495,9 @@
 						    epoll_ctl(epoll_fds
 							      [epfd_index],
 							      epoll_ctl_ops
-							      [op_index], fds[fd_index], ev_ptr);
+							      [op_index],
+							      fds[fd_index],
+							      ev_ptr);
 
 						/* We can't test errno resulting from the epoll_ctl call outside of
 						   the PROTECT_REGION hence we do not have a PROTECT_REGION_END
@@ -492,13 +508,17 @@
 						 */
 
 						/* Check the epfd */
-						if (epoll_fds[epfd_index] != epoll_fd) {
+						if (epoll_fds[epfd_index] !=
+						    epoll_fd) {
 							/* Expect an error */
-							if (epoll_fds[epfd_index] == 0)
-								expected_errno = EINVAL;
+							if (epoll_fds
+							    [epfd_index] == 0)
+								expected_errno =
+								    EINVAL;
 							else	/* epfd is not a valid file descriptor since it is
 								   neither epoll_fd nor stdin */
-								expected_errno = EBADF;
+								expected_errno =
+								    EBADF;
 							num_errors_expected++;
 						}
 
@@ -520,16 +540,22 @@
 							expected_errno = EINVAL;
 							num_errors_expected++;
 						} else if ((ev_ptr == &event)
-							   || (ev_ptr == unaligned_event_ptr)) {
+							   || (ev_ptr ==
+							       unaligned_event_ptr))
+						{
 							if (ev_ptr->events == 0) {
-								expected_errno = EINVAL;
+								expected_errno =
+								    EINVAL;
 								num_errors_expected++;
 							}
 
-							for (index = 1; index < 64; index++) {
-								if (ev_ptr->
-								    events != epoll_events[index]) {
-									expected_errno = EINVAL;
+							for (index = 1;
+							     index < 64;
+							     index++) {
+								if (ev_ptr->events != epoll_events[index]) {
+									expected_errno
+									    =
+									    EINVAL;
 									num_errors_expected++;
 								}
 							}
@@ -540,20 +566,25 @@
 						if (num_errors_expected == 0) {
 							/* We did not expect an error */
 							if (result == 0) {
-	/* We didn't get an error. Think of this as RES_PASS_RETV_MAT_ERRNO_IGN */
+								/* We didn't get an error. Think of this as RES_PASS_RETV_MAT_ERRNO_IGN */
 								return RES_PASS;
 							} else if (result == -1) {	/* The return value is -1, so it's not bad */
-								return RES_FAIL_RETV_MIS_ERRNO_IGN;
+								return
+								    RES_FAIL_RETV_MIS_ERRNO_IGN;
 							} else {
-								return RES_FAIL_RETV_BAD_ERRNO_IGN;
+								return
+								    RES_FAIL_RETV_BAD_ERRNO_IGN;
 							}
-						} else if (num_errors_expected == 1) {
+						} else if (num_errors_expected
+							   == 1) {
 							/* We expected an error */
 							if (result == 0) {
 								return RES_FAIL_RETV_MIS_ERRNO_IGN;	/* Unexpected success */
 							} else if (result == -1) {
 								/* We got an error. Check errno */
-								if (errno == expected_errno) {
+								if (errno ==
+								    expected_errno)
+								{
 									return RES_PASS;	/* think of this as RETV_MAT_ERRNO_MAT */
 								} else {
 									return
@@ -562,20 +593,24 @@
 							} else {
 								/* We got a bad return code! Interpret this as
 								   getting an error and check errno. */
-								if (errno == expected_errno)
+								if (errno ==
+								    expected_errno)
 									return
 									    RES_FAIL_RETV_BAD_ERRNO_MAT;
 								else
 									return
 									    RES_FAIL_RETV_BAD_ERRNO_MIS;
 							}
-						} else if (num_errors_expected > 1) {
+						} else if (num_errors_expected >
+							   1) {
 							/* We expected multiple errors */
 							if (result == 0) {
 								return RES_FAIL_RETV_MIS_ERRNO_IGN;	/* Unexpected success */
 							} else if (result == -1) {
 								/* We got an error. Check errno */
-								if (errno == expected_errno) {
+								if (errno ==
+								    expected_errno)
+								{
 									return RES_PASS;	/* think of this as RETV_MAT_ERRNO_MAT */
 								} else {
 									/* Ignore errno because the desired value is unknowable
@@ -586,7 +621,8 @@
 							} else {
 								/* We got a bad return code! Interpret this as
 								   getting an error and check errno. */
-								if (errno == expected_errno)
+								if (errno ==
+								    expected_errno)
 									/* Don't Ignore errno because the desired value
 									   happened to match what we expected. */
 									return
@@ -612,9 +648,15 @@
 
 						/* Now test the result */
 						if (!((result == RES_PASS)
-						      || (result == RES_PASS_RETV_MAT_ERRNO_IGN))) {
-							if (result > (sizeof(result_strings) / sizeof(const char *))) {
-							/* Returned a result which has no corresponding text description */
+						      || (result ==
+							  RES_PASS_RETV_MAT_ERRNO_IGN)))
+						{
+							if (result >
+							    (sizeof
+							     (result_strings) /
+							     sizeof(const char
+								    *))) {
+								/* Returned a result which has no corresponding text description */
 								EPOLL_CTL_TEST_FAIL
 								    ("FIXME FIX ME BUG in Test Program itself!");
 							} else {
@@ -623,14 +665,12 @@
 									    ("Test arguments caused abnormal exit.");
 								else	/* The 'normal' failiure */
 									EPOLL_CTL_TEST_FAIL
-									    ((result_strings
-									      [result]));
+									    ((result_strings[result]));
 							}
 							num_epoll_ctl_test_fails++;
 #ifdef DEBUG
 						} else	/* The call of epoll_ctl behaved as expected */
-							EPOLL_CTL_TEST_PASS((result_strings
-									     [result]));
+							EPOLL_CTL_TEST_PASS((result_strings[result]));
 #else
 						}
 #endif
@@ -659,14 +699,16 @@
 
 	/* Get the current time */
 	if (gettimeofday(&tv, NULL) != 0) {
-		tst_brkm(TBROK|TERRNO, NULL, "gettimeofday failed");
+		tst_brkm(TBROK | TERRNO, NULL, "gettimeofday failed");
 	} else {
 		tst_resm(TINFO, "gettimeofday() works");
 	}
 
 	/* Set up RNG */
 	srand(tv.tv_usec);
-	tst_resm(TINFO, "random number seeded with gettimeofday() [seed = %ld] works", tv.tv_usec);
+	tst_resm(TINFO,
+		 "random number seeded with gettimeofday() [seed = %ld] works",
+		 tv.tv_usec);
 
 	tst_resm(TINFO, "Testing epoll_create");
 	/* Testing epoll_create with some different sizes */
@@ -678,7 +720,7 @@
 	/* Create an epoll_fd for testing epoll_ctl */
 	epoll_fd = epoll_create(BACKING_STORE_SIZE_HINT);
 	if (epoll_fd < 0) {
-		tst_brkm(TFAIL|TERRNO, NULL, "epoll_create failed");
+		tst_brkm(TFAIL | TERRNO, NULL, "epoll_create failed");
 	}
 
 	tst_resm(TINFO, "Testing epoll_ctl");
diff --git a/testcases/kernel/syscalls/epoll2/examples/epoll-test.c b/testcases/kernel/syscalls/epoll2/examples/epoll-test.c
index 517ace7..f2d077d 100644
--- a/testcases/kernel/syscalls/epoll2/examples/epoll-test.c
+++ b/testcases/kernel/syscalls/epoll2/examples/epoll-test.c
@@ -681,7 +681,7 @@
 				goto sess_out;
 		}
 	}
-      sess_out:
+sess_out:
 	eph_exit_conn(conn);
 	return data;
 }
@@ -814,7 +814,7 @@
 		}
 	}
 
-      main_exit:
+main_exit:
 	eph_cleanup();
 	return 0;
 }
diff --git a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
index d7ba287..0282aee 100644
--- a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
+++ b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
@@ -66,7 +66,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define EPOLL_CLOEXEC O_CLOEXEC
@@ -134,8 +134,8 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0)
 		tst_brkm(TCONF, NULL,
-		    "This test can only run on kernels that are 2.6.27 and "
-		    "higher");
+			 "This test can only run on kernels that are 2.6.27 and "
+			 "higher");
 
 	setup();
 
@@ -149,13 +149,12 @@
 	}
 	if (coe & FD_CLOEXEC) {
 		tst_brkm(TFAIL, cleanup,
-		    "epoll_create1(0) set close-on-exec flag");
+			 "epoll_create1(0) set close-on-exec flag");
 	}
 	close(fd);
 	fd = syscall(__NR_epoll_create1, EPOLL_CLOEXEC);
 	if (fd == -1) {
-		tst_brkm(TFAIL, cleanup,
-		    "epoll_create1(EPOLL_CLOEXEC) failed");
+		tst_brkm(TFAIL, cleanup, "epoll_create1(EPOLL_CLOEXEC) failed");
 	}
 	coe = fcntl(fd, F_GETFD);
 	if (coe == -1) {
@@ -163,7 +162,7 @@
 	}
 	if ((coe & FD_CLOEXEC) == 0) {
 		tst_brkm(TFAIL, cleanup,
-		    "epoll_create1(EPOLL_CLOEXEC) set close-on-exec flag");
+			 "epoll_create1(EPOLL_CLOEXEC) set close-on-exec flag");
 	}
 	close(fd);
 	tst_resm(TPASS, "epoll_create1(EPOLL_CLOEXEC) PASSED");
diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index f921fc0..b75843a 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -92,7 +92,7 @@
 	ret = read(fd, &dummy, sizeof(dummy));
 	if (ret == -1) {
 		if (errno != EAGAIN) {
-			tst_resm(TINFO|TERRNO, "error clearing counter");
+			tst_resm(TINFO | TERRNO, "error clearing counter");
 			return -1;
 		}
 	}
@@ -120,7 +120,7 @@
 
 	ret = write(fd, &val, sizeof(val));
 	if (ret == -1) {
-		tst_resm(TINFO|TERRNO, "error setting counter value");
+		tst_resm(TINFO | TERRNO, "error setting counter value");
 		return -1;
 	}
 
@@ -137,7 +137,7 @@
 
 	ret = read(fd, &val, sizeof(val));
 	if (ret == -1) {
-		tst_resm(TBROK|TERRNO, "error reading eventfd");
+		tst_resm(TBROK | TERRNO, "error reading eventfd");
 		return;
 	}
 
@@ -145,7 +145,7 @@
 		tst_resm(TPASS, "counter value matches required");
 	else
 		tst_resm(TFAIL, "counter value mismatch: "
-			 "required: %"PRIu64", got: %"PRIu64, required, val);
+			 "required: %" PRIu64 ", got: %" PRIu64, required, val);
 }
 
 /*
@@ -167,7 +167,7 @@
 		if (errno == EAGAIN)
 			tst_resm(TPASS, "read failed with EAGAIN as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "read failed (wanted EAGAIN)");
+			tst_resm(TFAIL | TERRNO, "read failed (wanted EAGAIN)");
 	} else
 		tst_resm(TFAIL, "read returned with %d", ret);
 }
@@ -184,7 +184,7 @@
 
 	ret = set_counter(fd, val);
 	if (ret == -1) {
-		tst_resm(TBROK, "error setting counter value to %"PRIu64, val);
+		tst_resm(TBROK, "error setting counter value to %" PRIu64, val);
 		return;
 	}
 
@@ -231,7 +231,7 @@
 		if (errno == EINVAL)
 			tst_resm(TPASS, "read failed with EINVAL as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "read failed (wanted EINVAL)");
+			tst_resm(TFAIL | TERRNO, "read failed (wanted EINVAL)");
 	} else
 		tst_resm(TFAIL, "read returned with %d", ret);
 }
@@ -250,7 +250,8 @@
 		if (errno == EINVAL)
 			tst_resm(TPASS, "write failed with EINVAL as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "write failed (wanted EINVAL)");
+			tst_resm(TFAIL | TERRNO,
+				 "write failed (wanted EINVAL)");
 	} else
 		tst_resm(TFAIL, "write returned with %d", ret);
 }
@@ -276,7 +277,8 @@
 		if (errno == EINVAL)
 			tst_resm(TPASS, "write failed with EINVAL as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "write failed (wanted EINVAL)");
+			tst_resm(TFAIL | TERRNO,
+				 "write failed (wanted EINVAL)");
 	} else {
 		tst_resm(TFAIL, "write returned with %d", ret);
 	}
@@ -298,7 +300,7 @@
 
 	ret = set_counter(fd, non_zero);
 	if (ret == -1) {
-		tst_resm(TBROK, "error setting counter value to %"PRIu64,
+		tst_resm(TBROK, "error setting counter value to %" PRIu64,
 			 non_zero);
 		return;
 	}
@@ -306,7 +308,7 @@
 	ret = select(fd + 1, &readfds, NULL, NULL, &timeout);
 	if (ret == -1) {
 		/* EINTR cannot occur, since we don't block. */
-		tst_resm(TBROK|TERRNO, "select() failed");
+		tst_resm(TBROK | TERRNO, "select() failed");
 		return;
 	}
 
@@ -338,7 +340,7 @@
 	ret = select(fd + 1, &readfds, NULL, NULL, &timeout);
 	if (ret == -1) {
 		/* EINTR cannot occur, since we don't block. */
-		tst_resm(TBROK|TERRNO, "select() failed");
+		tst_resm(TBROK | TERRNO, "select() failed");
 		return;
 	}
 
@@ -364,14 +366,15 @@
 
 	ret = set_counter(fd, non_max);
 	if (ret == -1) {
-		tst_resm(TBROK, "error setting counter value to %"PRIu64, non_max);
+		tst_resm(TBROK, "error setting counter value to %" PRIu64,
+			 non_max);
 		return;
 	}
 
 	ret = select(fd + 1, NULL, &writefds, NULL, &timeout);
 	if (ret == -1) {
 		/* EINTR cannot occur, since we don't block. */
-		tst_resm(TBROK|TERRNO, "select: error getting fd status");
+		tst_resm(TBROK | TERRNO, "select: error getting fd status");
 		return;
 	}
 
@@ -403,7 +406,7 @@
 	ret = select(fd + 1, NULL, &writefds, NULL, &timeout);
 	if (ret == -1) {
 		/* EINTR cannot occur, since we don't block. */
-		tst_resm(TBROK|TERRNO, "select: error getting fd status");
+		tst_resm(TBROK | TERRNO, "select: error getting fd status");
 		return;
 	}
 
@@ -427,7 +430,7 @@
 
 	cpid = fork();
 	if (cpid == -1)
-		tst_resm(TBROK|TERRNO, "fork failed");
+		tst_resm(TBROK | TERRNO, "fork failed");
 	else if (cpid != 0) {
 		ret = wait(&status);
 		if (ret == -1) {
@@ -443,7 +446,7 @@
 
 		ret = read(fd, &val, sizeof(val));
 		if (ret == -1) {
-			tst_resm(TBROK|TERRNO, "error reading eventfd");
+			tst_resm(TBROK | TERRNO, "error reading eventfd");
 			return;
 		}
 
@@ -457,13 +460,13 @@
 		/* Child */
 		ret = read(fd, &dummy, sizeof(dummy));
 		if (ret == -1 && errno != EAGAIN) {
-			tst_resm(TWARN|TERRNO, "error clearing counter");
+			tst_resm(TWARN | TERRNO, "error clearing counter");
 			exit(1);
 		}
 
 		ret = write(fd, &to_parent, sizeof(to_parent));
 		if (ret == -1) {
-			tst_resm(TWARN|TERRNO, "error writing eventfd");
+			tst_resm(TWARN | TERRNO, "error writing eventfd");
 			exit(1);
 		}
 
@@ -508,13 +511,13 @@
 	ret = io_setup(16, ctx);
 	if (ret < 0) {
 		errno = -ret;
-		tst_resm(TINFO|TERRNO, "io_setup error");
+		tst_resm(TINFO | TERRNO, "io_setup error");
 		return -1;
 	}
 
 	*fd = open("testfile", O_RDWR | O_CREAT, 0644);
 	if (*fd == -1) {
-		tst_resm(TINFO|TERRNO, "open(testfile) failed");
+		tst_resm(TINFO | TERRNO, "open(testfile) failed");
 		goto err_io_destroy;
 	}
 
@@ -531,7 +534,7 @@
 	ret = io_submit(*ctx, 1, iocbap);
 	if (ret < 0) {
 		errno = -ret;
-		tst_resm(TINFO|TERRNO, "error submitting iocb");
+		tst_resm(TINFO | TERRNO, "error submitting iocb");
 		goto err_close_file;
 	}
 
@@ -570,7 +573,8 @@
 	FD_SET(evfd, &readfds);
 	ret = select(evfd + 1, &readfds, NULL, NULL, &timeout);
 	if (ret == -1)
-		tst_resm(TBROK|TERRNO, "error getting evfd status with select");
+		tst_resm(TBROK | TERRNO,
+			 "error getting evfd status with select");
 	else {
 		if (FD_ISSET(evfd, &readfds))
 			tst_resm(TPASS, "read fd set as expected");
@@ -598,7 +602,7 @@
 	pollfd.revents = 0;
 	ret = poll(&pollfd, 1, 10000);
 	if (ret == -1)
-		tst_resm(TBROK|TERRNO, "error getting evfd status with poll");
+		tst_resm(TBROK | TERRNO, "error getting evfd status with poll");
 	else {
 		if (pollfd.revents & POLLERR)
 			tst_resm(TPASS, "POLLERR occurred as expected");
@@ -623,7 +627,7 @@
 
 	ret = read(evfd, &count, sizeof(count));
 	if (ret == -1)
-		tst_resm(TBROK|TERRNO, "error reading eventfd");
+		tst_resm(TBROK | TERRNO, "error reading eventfd");
 	else {
 
 		if (count == UINT64_MAX)
@@ -669,11 +673,13 @@
 
 		fd = myeventfd(einit, 0);
 		if (fd == -1)
-			tst_brkm(TBROK|TERRNO, CLEANUP, "error creating eventfd");
+			tst_brkm(TBROK | TERRNO, CLEANUP,
+				 "error creating eventfd");
 
 		ret = fcntl(fd, F_SETFL, O_NONBLOCK);
 		if (ret == -1)
-			tst_brkm(TBROK|TERRNO, CLEANUP, "error setting non-block mode");
+			tst_brkm(TBROK | TERRNO, CLEANUP,
+				 "error setting non-block mode");
 
 		read_test(fd, einit);
 		read_eagain_test(fd);
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
index 982e570..5b0dd5a 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
@@ -65,7 +65,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define EFD_CLOEXEC O_CLOEXEC
@@ -134,7 +134,7 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
-		    "This test can only run on kernels that are 2.6.27 and higher");
+			 "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
index 74ea48d..66e80f5 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
@@ -62,7 +62,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define EFD_NONBLOCK O_NONBLOCK
@@ -131,7 +131,7 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
-		    "This test can only run on kernels that are 2.6.27 and higher");
+			 "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
@@ -145,8 +145,7 @@
 		tst_brkm(TBROK, cleanup, "fcntl failed");
 	}
 	if (fl & O_NONBLOCK) {
-		tst_brkm(TFAIL, cleanup,
-		    "eventfd2(0) sets non-blocking mode");
+		tst_brkm(TFAIL, cleanup, "eventfd2(0) sets non-blocking mode");
 	}
 	close(fd);
 
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
index 4dbf528..375907e 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
@@ -40,32 +40,37 @@
 #include "usctest.h"
 #include "linux_syscall_numbers.h"
 
-char *TCID = "eventfd2_03";     /* test program identifier*/
-int TST_TOTAL = 1;	        	/* total number of tests in this file */
+char *TCID = "eventfd2_03";	/* test program identifier */
+int TST_TOTAL = 1;		/* total number of tests in this file */
 
 #ifndef EFD_SEMLIKE
 #define EFD_SEMLIKE (1 << 0)
 #endif
 
 /* Dummy function as syscall from linux_syscall_numbers.h uses cleanup(). */
-void cleanup() { }
+void cleanup()
+{
+}
 
-static int eventfd2(int count, int flags) {
+static int eventfd2(int count, int flags)
+{
 	return syscall(__NR_eventfd2, count, flags);
 }
 
-static void xsem_wait(int fd) {
+static void xsem_wait(int fd)
+{
 	u_int64_t cntr;
 
 	if (read(fd, &cntr, sizeof(cntr)) != sizeof(cntr)) {
 		perror("reading eventfd");
 		exit(1);
 	}
-	fprintf(stdout, "[%u] wait completed on %d: count=%"PRIu64"\n",
+	fprintf(stdout, "[%u] wait completed on %d: count=%" PRIu64 "\n",
 		getpid(), fd, cntr);
 }
 
-static void xsem_post(int fd, int count) {
+static void xsem_post(int fd, int count)
+{
 	u_int64_t cntr = count;
 
 	if (write(fd, &cntr, sizeof(cntr)) != sizeof(cntr)) {
@@ -74,7 +79,8 @@
 	}
 }
 
-static void sem_player(int fd1, int fd2) {
+static void sem_player(int fd1, int fd2)
+{
 	fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1);
 	xsem_post(fd1, 1);
 
@@ -98,11 +104,13 @@
 	xsem_wait(fd2);
 }
 
-static void usage(char const *prg) {
+static void usage(char const *prg)
+{
 	fprintf(stderr, "use: %s [-h]\n", prg);
 }
 
-int main (int argc, char **argv) {
+int main(int argc, char **argv)
+{
 	int c, fd1, fd2, status;
 	pid_t cpid_poster, cpid_waiter;
 
diff --git a/testcases/kernel/syscalls/execl/execl01.c b/testcases/kernel/syscalls/execl/execl01.c
index 467993c..8f195e6 100644
--- a/testcases/kernel/syscalls/execl/execl01.c
+++ b/testcases/kernel/syscalls/execl/execl01.c
@@ -135,7 +135,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
@@ -161,23 +160,23 @@
 			 */
 			exit(errno);
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 			break;
 		default:
 			if (waitpid(pid, &status, 0) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "waitpid failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "waitpid failed");
 			if (WIFEXITED(status)) {
 				if (STD_FUNCTIONAL_TEST) {
 					/* No Verification test, yet... */
 					tst_resm(TPASS,
-					    "execl - properly exec's a simple "
-					    "program..");
+						 "execl - properly exec's a simple "
+						 "program..");
 				}
 			} else {
 				tst_resm(TFAIL,
-				    "child exited abnormally; wait status=%d",
-				    status);
+					 "child exited abnormally; wait status=%d",
+					 status);
 			}
 		}
 
@@ -195,9 +194,9 @@
 
 	if (STD_TIMING_ON)
 		tst_resm(TINFO,
-		    "There are NO timing statistics produced by this test.\n"
-		    "This is because the test forks to create a child process "
-		    "which then calls execl.\nThe TEST macro is NOT used.");
+			 "There are NO timing statistics produced by this test.\n"
+			 "This is because the test forks to create a child process "
+			 "which then calls execl.\nThe TEST macro is NOT used.");
 
 	TEST_PAUSE;
 
diff --git a/testcases/kernel/syscalls/execle/execle01.c b/testcases/kernel/syscalls/execle/execle01.c
index 2312853..1d0cf83 100644
--- a/testcases/kernel/syscalls/execle/execle01.c
+++ b/testcases/kernel/syscalls/execle/execle01.c
@@ -135,7 +135,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
@@ -153,24 +152,23 @@
 			/* should not get here!! if we do, the parent will fail the Test Case */
 			exit(errno);
 		case -1:	/* ERROR!!! exit now!! */
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 			break;
 		default:
 			if (waitpid(pid, &status, 0) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "waitpid failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "waitpid failed");
 			if (WIFEXITED(status)) {
 				if (STD_FUNCTIONAL_TEST) {
 					/* No Verification test, yet... */
 					tst_resm(TPASS,
-					    "execle - properly exec's a "
-					    "simple program..");
+						 "execle - properly exec's a "
+						 "simple program..");
 				}
 			} else
 				tst_resm(TFAIL,
-				    "child process exited abnormally; wait "
-				    "status = %d",
-				    status);
+					 "child process exited abnormally; wait "
+					 "status = %d", status);
 			break;
 		}		/* switch */
 
diff --git a/testcases/kernel/syscalls/execlp/execlp01.c b/testcases/kernel/syscalls/execlp/execlp01.c
index 0739706..be7a362 100644
--- a/testcases/kernel/syscalls/execlp/execlp01.c
+++ b/testcases/kernel/syscalls/execlp/execlp01.c
@@ -136,7 +136,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
@@ -153,7 +152,7 @@
 			execlp("/usr/bin/test", "/usr/bin/test", NULL);
 			exit(errno);
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 			break;
 		default:
 			waitpid(pid, &status, 0);
@@ -165,8 +164,8 @@
 				}
 			} else
 				tst_resm(TFAIL,
-				    "child process exited abnormally; wait "
-				    "status = %d", status);
+					 "child process exited abnormally; wait "
+					 "status = %d", status);
 			break;
 		}		/* switch */
 
diff --git a/testcases/kernel/syscalls/execv/execv01.c b/testcases/kernel/syscalls/execv/execv01.c
index 3bb6f7c..f77ee21 100644
--- a/testcases/kernel/syscalls/execv/execv01.c
+++ b/testcases/kernel/syscalls/execv/execv01.c
@@ -137,7 +137,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
diff --git a/testcases/kernel/syscalls/execve/execve01.c b/testcases/kernel/syscalls/execve/execve01.c
index 9bd0f91..e142615 100644
--- a/testcases/kernel/syscalls/execve/execve01.c
+++ b/testcases/kernel/syscalls/execve/execve01.c
@@ -137,7 +137,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
diff --git a/testcases/kernel/syscalls/execve/execve02.c b/testcases/kernel/syscalls/execve/execve02.c
index 784d8f8..94f3100 100644
--- a/testcases/kernel/syscalls/execve/execve02.c
+++ b/testcases/kernel/syscalls/execve/execve02.c
@@ -111,10 +111,10 @@
 		Tst_count = 0;
 
 		if (chmod(test_app, 0700) != 0)
-			tst_resm(TFAIL|TERRNO, "chmod failed");
+			tst_resm(TFAIL | TERRNO, "chmod failed");
 
 		if ((pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 
 		if (pid == 0) {
 			if (seteuid(ltpuser1->pw_uid) == -1)
@@ -132,7 +132,8 @@
 				retval = 1;
 				perror("execve failed unexpectedly");
 			} else
-				printf("execve failed with EACCES as expected\n");
+				printf
+				    ("execve failed with EACCES as expected\n");
 
 			if (seteuid(0) == -1)
 				perror("setuid(0) failed");
@@ -142,7 +143,7 @@
 			exit(retval);
 		}
 		if (wait(&status) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "wait failed");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child exited abnormally");
 
@@ -172,18 +173,18 @@
 		strncpy(test_path, test_app, sizeof(test_path));
 	else {
 		if ((pwd = get_current_dir_name()) == NULL)
-			tst_brkm(TBROK|TERRNO, NULL, "getcwd failed");
+			tst_brkm(TBROK | TERRNO, NULL, "getcwd failed");
 
 		snprintf(test_path, sizeof(test_path), "%s/%s",
-		    pwd, basename(test_app));
+			 pwd, basename(test_app));
 
 		free(pwd);
 	}
 
 	cmd = malloc(strlen(test_path) + strlen("cp -p \"") + strlen("\" .") +
-	    1);
+		     1);
 	if (cmd == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "Cannot alloc command string");
+		tst_brkm(TBROK | TERRNO, NULL, "Cannot alloc command string");
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/execve/execve03.c b/testcases/kernel/syscalls/execve/execve03.c
index 9ccfd56..17fb47b 100644
--- a/testcases/kernel/syscalls/execve/execve03.c
+++ b/testcases/kernel/syscalls/execve/execve03.c
@@ -104,19 +104,25 @@
 	int error;
 } TC[] = {
 	/* the file name is greater than VFS_MAXNAMELEN - ENAMTOOLONG */
-	{ long_file, ENAMETOOLONG},
-	/* the filename does not exist - ENOENT */
-	{ no_dir, ENOENT},
-	/* the path contains a directory name which doesn't exist - ENOTDIR */
-	{ test_name3, ENOTDIR},
+	{
+	long_file, ENAMETOOLONG},
+	    /* the filename does not exist - ENOENT */
+	{
+	no_dir, ENOENT},
+	    /* the path contains a directory name which doesn't exist - ENOTDIR */
+	{
+	test_name3, ENOTDIR},
 #if !defined(UCLINUX)
-	/* the filename isn't part of the process address space - EFAULT */
-	{ (char *)-1, EFAULT},
+	    /* the filename isn't part of the process address space - EFAULT */
+	{
+	(char *)-1, EFAULT},
 #endif
-	/* the filename does not have execute permission - EACCES */
-	{ test_name5, EACCES},
-	/* the file is zero length with execute permissions - ENOEXEC */
-	{ test_name6, ENOEXEC}
+	    /* the filename does not have execute permission - EACCES */
+	{
+	test_name5, EACCES},
+	    /* the file is zero length with execute permissions - ENOEXEC */
+	{
+	test_name6, ENOEXEC}
 };
 
 int TST_TOTAL = sizeof(TC) / sizeof(*TC);
@@ -150,13 +156,13 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO,
-				    "execve failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "execve failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "execve failed unexpectedly; expected "
-				    "%d - %s",
-				    TC[i].error, strerror(TC[i].error));
+				tst_resm(TFAIL | TTERRNO,
+					 "execve failed unexpectedly; expected "
+					 "%d - %s",
+					 TC[i].error, strerror(TC[i].error));
 		}
 	}
 	cleanup();
@@ -196,7 +202,7 @@
 	fd = SAFE_CLOSE(cleanup, fd);
 #ifndef UCLINUX
 	bad_addr = SAFE_MMAP(cleanup, NULL, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			     MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	TC[3].tname = bad_addr;
 #endif
 }
diff --git a/testcases/kernel/syscalls/execve/execve04.c b/testcases/kernel/syscalls/execve/execve04.c
index caa4533..f7cd7bb 100644
--- a/testcases/kernel/syscalls/execve/execve04.c
+++ b/testcases/kernel/syscalls/execve/execve04.c
@@ -75,6 +75,7 @@
 void do_child_2(void);
 
 int exp_enos[] = { ETXTBSY, 0 };
+
 int start_sync_pipes[2];
 int end_sync_pipes[2];
 
@@ -109,7 +110,7 @@
 
 	if (!Fflag)
 		tst_brkm(TBROK, NULL,
-		    "You must specify an executable file with the -F option.");
+			 "You must specify an executable file with the -F option.");
 
 	setup(*av);
 
@@ -169,12 +170,12 @@
 				perror("didn't get ETXTBSY\n");
 			} else
 				printf("execve failed with ETXTBSY as "
-				    "expected\n");
+				       "expected\n");
 			exit(retval);
 		}
 		/* wait for the child to finish */
 		if (waitpid(pid1, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid failed");
 		if (WIFEXITED(status) && WEXITSTATUS(status) == 3)
 			tst_resm(TPASS, "execve failed as expected");
 		else
@@ -182,7 +183,7 @@
 
 		/*  terminate first child */
 		sync_pipe_notify(end_sync_pipes);
-		(void) waitpid(pid, NULL, 0);
+		(void)waitpid(pid, NULL, 0);
 	}
 	cleanup();
 
@@ -203,18 +204,18 @@
 		strncpy(test_path, test_app, sizeof(test_path));
 	else {
 		if ((pwd = get_current_dir_name()) == NULL)
-			tst_brkm(TBROK|TERRNO, NULL, "getcwd failed");
+			tst_brkm(TBROK | TERRNO, NULL, "getcwd failed");
 
 		snprintf(test_path, sizeof(test_path), "%s/%s",
-		    pwd, basename(test_app));
+			 pwd, basename(test_app));
 
 		free(pwd);
 	}
 
 	cmd = malloc(strlen(test_path) + strlen("cp -p \"") + strlen("\" .") +
-	    1);
+		     1);
 	if (cmd == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "Cannot alloc command string");
+		tst_brkm(TBROK | TERRNO, NULL, "Cannot alloc command string");
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/execve/execve05.c b/testcases/kernel/syscalls/execve/execve05.c
index 90b479e..b8c4d11 100644
--- a/testcases/kernel/syscalls/execve/execve05.c
+++ b/testcases/kernel/syscalls/execve/execve05.c
@@ -64,7 +64,7 @@
 void usage(void)
 {
 	tst_brkm(TBROK, NULL, "usage: %s <iters> <fname1> <fname2> <count>",
-	    TCID);
+		 TCID);
 }
 
 int main(int ac, char **av)
@@ -148,7 +148,8 @@
 			tst_resm(TINFO, "Main - started pid %d", pid);
 #endif
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_resm(TFAIL, "child exited abnormally");
 
@@ -172,7 +173,8 @@
 			tst_resm(TINFO, "Main - started pid %d", pid);
 #endif
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_resm(TFAIL, "child exited abnormally");
 
@@ -180,7 +182,7 @@
 
 		if (wait(&status) != -1)
 			tst_brkm(TBROK, cleanup,
-			    "leftover children haven't exited yet");
+				 "leftover children haven't exited yet");
 
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/execvp/execvp01.c b/testcases/kernel/syscalls/execvp/execvp01.c
index 75114bb..76b0bbf 100644
--- a/testcases/kernel/syscalls/execvp/execvp01.c
+++ b/testcases/kernel/syscalls/execvp/execvp01.c
@@ -137,7 +137,6 @@
 	int lc;
 	char *msg;
 
-
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
diff --git a/testcases/kernel/syscalls/exit/exit01.c b/testcases/kernel/syscalls/exit/exit01.c
index a72967d..f4d1225 100644
--- a/testcases/kernel/syscalls/exit/exit01.c
+++ b/testcases/kernel/syscalls/exit/exit01.c
@@ -61,7 +61,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, cleanup, "OPTION PARSIkNG ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
@@ -73,7 +73,7 @@
 		exno = 1;
 
 		if ((pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() failed");
 
 		if (pid == 0) {	/* parent */
 			exit(exno);
diff --git a/testcases/kernel/syscalls/exit/exit02.c b/testcases/kernel/syscalls/exit/exit02.c
index 0e8323d..10f0976 100644
--- a/testcases/kernel/syscalls/exit/exit02.c
+++ b/testcases/kernel/syscalls/exit/exit02.c
@@ -79,7 +79,7 @@
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
@@ -98,7 +98,7 @@
 		exno = sig = 0;
 
 		if ((pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() failed");
 
 		if (pid == 0) {	/* child */
 			sleep(1);
diff --git a/testcases/kernel/syscalls/exit_group/exit_group01.c b/testcases/kernel/syscalls/exit_group/exit_group01.c
index e350279..5802603 100644
--- a/testcases/kernel/syscalls/exit_group/exit_group01.c
+++ b/testcases/kernel/syscalls/exit_group/exit_group01.c
@@ -51,9 +51,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "exit_group01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "exit_group01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -73,10 +73,11 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 }
 
 /* Local  Functions */
@@ -97,36 +98,38 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
-        int status;
-        pid_t cpid, w;
+int main(int ac, char **av)
+{
+	int status;
+	pid_t cpid, w;
 
-        setup();
+	setup();
 
-	cpid = fork();     //call exit_group()
+	cpid = fork();		//call exit_group()
 	if (cpid == -1) {
-        	tst_brkm(TFAIL|TERRNO, cleanup, "fork failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "fork failed");
 	} else if (cpid == 0) {
 		sleep(5);
-		TEST(syscall(__NR_exit_group,4));
+		TEST(syscall(__NR_exit_group, 4));
 	} else {
 		w = wait(&status);
 		if (w == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "wait failed");
 		if (WIFEXITED(status) && (WEXITSTATUS(status) == 4))
 			tst_resm(TPASS, "exit_group succeeded");
 		else {
-			tst_resm(TFAIL|TERRNO,
-			    "exit_group failed (wait status = %d)", w);
-                }
-        }
+			tst_resm(TFAIL | TERRNO,
+				 "exit_group failed (wait status = %d)", w);
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise02.c b/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
index 95bf5c1..5e0f725 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
@@ -154,7 +154,7 @@
 	TEST_PAUSE;
 
 	/* Make WRONG_FD really wrong. */
-      retry:
+retry:
 	errno = 0;
 	if (close(WRONG_FD) != 0) {
 		if (errno == EBADF) ;	/* Good. Do nothing. */
diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
index a58caef..d3cef1d 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
@@ -129,9 +129,9 @@
 {
 
 	if (close(fd_mode1) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fname_mode1);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fname_mode1);
 	if (close(fd_mode2) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fname_mode2);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fname_mode2);
 	tst_rmdir();
 }
 
@@ -150,16 +150,16 @@
 	sprintf(fname_mode1, "tfile_mode1_%d", getpid());
 	fd_mode1 = open(fname_mode1, O_RDWR | O_CREAT, 0700);
 	if (fd_mode1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(%s, O_RDWR) failed",
-		    fname_mode1);
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s, O_RDWR) failed",
+			 fname_mode1);
 	get_blocksize(fd_mode1);
 	populate_files(fd_mode1);
 
 	sprintf(fname_mode2, "tfile_mode2_%d", getpid());
-	fd_mode2 = open(fname_mode2, O_RDWR|O_CREAT, 0700);
+	fd_mode2 = open(fname_mode2, O_RDWR | O_CREAT, 0700);
 	if (fd_mode2 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(%s, O_RDWR) failed",
-		    fname_mode2);
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s, O_RDWR) failed",
+			 fname_mode2);
 	populate_files(fd_mode2);
 }
 
@@ -171,7 +171,8 @@
 	struct stat file_stat;
 
 	if (fstat(fd, &file_stat) < 0)
-		tst_resm(TFAIL|TERRNO, "fstat failed while getting block_size");
+		tst_resm(TFAIL | TERRNO,
+			 "fstat failed while getting block_size");
 
 	block_size = file_stat.st_blksize;
 	buf_size = block_size;
@@ -199,7 +200,7 @@
 			buf[index] = 'A' + (index % 26);
 		buf[buf_size] = '\0';
 		if ((data = write(fd, buf, buf_size)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 	}
 }
 
@@ -243,9 +244,11 @@
 static inline long fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
 #if __WORDSIZE == 32
-	return (long) syscall(__NR_fallocate, fd, mode,
-	    __LONG_LONG_PAIR((off_t)(offset >> 32), (off_t)offset),
-	    __LONG_LONG_PAIR((off_t)(len >> 32), (off_t)len));
+	return (long)syscall(__NR_fallocate, fd, mode,
+			     __LONG_LONG_PAIR((off_t) (offset >> 32),
+					      (off_t) offset),
+			     __LONG_LONG_PAIR((off_t) (len >> 32),
+					      (off_t) len));
 #else
 	return syscall(__NR_fallocate, fd, mode, offset, len);
 #endif
@@ -271,33 +274,34 @@
 				 "fallocate system call is not implemented");
 		}
 		TEST_ERROR_LOG(TEST_ERRNO);
-		tst_resm(TFAIL|TTERRNO,
-			 "fallocate(%d, %d, %"PRId64", %"PRId64") failed",
+		tst_resm(TFAIL | TTERRNO,
+			 "fallocate(%d, %d, %" PRId64 ", %" PRId64 ") failed",
 			 fd, mode, offset, len);
 		return;
 	} else {
 		if (STD_FUNCTIONAL_TEST) {
 			/* No Verification test, yet... */
 			tst_resm(TPASS,
-				 "fallocate(%d, %d, %"PRId64", %"PRId64") returned %ld",
-				 fd, mode, offset, len, TEST_RETURN);
+				 "fallocate(%d, %d, %" PRId64 ", %" PRId64
+				 ") returned %ld", fd, mode, offset, len,
+				 TEST_RETURN);
 		}
 	}
 
 	if (fstat(fd, &file_stat) < 0)
-		tst_resm(TFAIL|TERRNO, "fstat failed after fallocate()");
+		tst_resm(TFAIL | TERRNO, "fstat failed after fallocate()");
 
 	if (file_stat.st_size != expected_size)
-		tst_resm(TFAIL|TTERRNO,
-			 "fstat test fails on fallocate (%d, %d, %"PRId64", %"PRId64") Failed on mode",
-			 fd, mode, offset, len);
+		tst_resm(TFAIL | TTERRNO,
+			 "fstat test fails on fallocate (%d, %d, %" PRId64 ", %"
+			 PRId64 ") Failed on mode", fd, mode, offset, len);
 
 	write_offset = random() % len;
 	lseek_offset = lseek(fd, write_offset, SEEK_CUR);
 	if (lseek_offset != offset + write_offset) {
-		tst_resm(TFAIL|TTERRNO,
-			 "lseek fails in fallocate(%d, %d, %"PRId64", %"PRId64") failed on mode",
-			 fd, mode, offset, len);
+		tst_resm(TFAIL | TTERRNO,
+			 "lseek fails in fallocate(%d, %d, %" PRId64 ", %"
+			 PRId64 ") failed on mode", fd, mode, offset, len);
 		return;
 	}
 	//Write a character to file at random location
@@ -305,15 +309,16 @@
 	/* check return code */
 	if (TEST_RETURN == -1) {
 		TEST_ERROR_LOG(TEST_ERRNO);
-		tst_resm(TFAIL|TTERRNO,
-			 "write fails in fallocate(%d, %d, %"PRId64", %"PRId64") failed",
-			 fd, mode, offset, len);
+		tst_resm(TFAIL | TTERRNO,
+			 "write fails in fallocate(%d, %d, %" PRId64 ", %"
+			 PRId64 ") failed", fd, mode, offset, len);
 	} else {
 		if (STD_FUNCTIONAL_TEST) {
 			/* No Verification test, yet... */
 			tst_resm(TPASS,
-				 "write operation on fallocated(%d, %d, %"PRId64", %"PRId64") returned %ld",
-				 fd, mode, offset, len, TEST_RETURN);
+				 "write operation on fallocated(%d, %d, %"
+				 PRId64 ", %" PRId64 ") returned %ld", fd, mode,
+				 offset, len, TEST_RETURN);
 		}
 	}
 }
diff --git a/testcases/kernel/syscalls/fallocate/fallocate02.c b/testcases/kernel/syscalls/fallocate/fallocate02.c
index 1a7c6f2..c4578f8 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate02.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate02.c
@@ -141,6 +141,7 @@
 	WFILE, DEFAULT_TEST_MODE, -(BLOCKS_WRITTEN + OFFSET), 1, EINVAL}, {
 	WFILE, DEFAULT_TEST_MODE, BLOCKS_WRITTEN - OFFSET, 1, 0}
 };
+
 /* total number of tests in this file */
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
 int block_size;
@@ -156,10 +157,10 @@
 {
 	/* Close all open file descriptors. */
 	if (close(fdw) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fnamew);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fnamew);
 
 	if (close(fdr) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fnamer);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fnamer);
 
 	tst_rmdir();
 
@@ -184,14 +185,12 @@
 
 	fdr = open(fnamer, O_RDONLY | O_CREAT, S_IRUSR);
 	if (fdr == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDONLY|O_CREAT, S_IRUSR) failed",
-			 fnamer);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDONLY|O_CREAT, S_IRUSR) failed", fnamer);
 	fdw = open(fnamew, O_RDWR | O_CREAT, S_IRWXU);
 	if (fdw == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDWR|O_CREAT, S_IRWXU) failed",
-			 fnamew);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT, S_IRWXU) failed", fnamew);
 	get_blocksize(fdr);
 	populate_file();
 }
@@ -204,7 +203,7 @@
 	struct stat file_stat;
 
 	if (fstat(fd, &file_stat) < 0)
-		tst_resm(TFAIL|TERRNO,
+		tst_resm(TFAIL | TERRNO,
 			 "fstat failed while getting block_size");
 
 	block_size = (int)file_stat.st_blksize;
@@ -225,7 +224,7 @@
 			buf[index] = 'A' + (index % 26);
 		buf[buf_size] = '\0';
 		if ((data = write(fdw, buf, buf_size)) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "Unable to write to %s", fnamew);
 	}
 }
@@ -236,9 +235,11 @@
 static inline long fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
 #if __WORDSIZE == 32
-	return (long) syscall(__NR_fallocate, fd, mode,
-	    __LONG_LONG_PAIR((off_t)(offset >> 32), (off_t)offset),
-	    __LONG_LONG_PAIR((off_t)(len >> 32), (off_t)len));
+	return (long)syscall(__NR_fallocate, fd, mode,
+			     __LONG_LONG_PAIR((off_t) (offset >> 32),
+					      (off_t) offset),
+			     __LONG_LONG_PAIR((off_t) (len >> 32),
+					      (off_t) len));
 #else
 	return syscall(__NR_fallocate, fd, mode, offset, len);
 #endif
@@ -280,7 +281,8 @@
 				strcpy(fname, fnamew);
 				break;
 			default:
-				tst_brkm(TCONF, cleanup, "invalid test setting");
+				tst_brkm(TCONF, cleanup,
+					 "invalid test setting");
 				tst_exit();
 			}
 
@@ -290,21 +292,26 @@
 			      test_data[test_index].len * block_size));
 			/* check return code */
 			if (TEST_ERRNO != test_data[test_index].error) {
-				if (TEST_ERRNO == EOPNOTSUPP || TEST_ERRNO == ENOSYS) {
+				if (TEST_ERRNO == EOPNOTSUPP
+				    || TEST_ERRNO == ENOSYS) {
 					tst_brkm(TCONF, cleanup,
 						 "fallocate system call is not implemented");
 				}
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO, "fallocate(%s:%d, %d, %"PRId64", %"PRId64") failed, expected errno:%d",
-					fname, fd, test_data[test_index].mode,
-					test_data[test_index].offset * block_size,
-					test_data[test_index].len * block_size,
-					test_data[test_index].error);
+				tst_resm(TFAIL | TTERRNO,
+					 "fallocate(%s:%d, %d, %" PRId64 ", %"
+					 PRId64 ") failed, expected errno:%d",
+					 fname, fd, test_data[test_index].mode,
+					 test_data[test_index].offset *
+					 block_size,
+					 test_data[test_index].len * block_size,
+					 test_data[test_index].error);
 			} else {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
-					 "fallocate(%s:%d, %d, %"PRId64", %"PRId64") returned %d",
-					 fname, fd, test_data[test_index].mode,
+					 "fallocate(%s:%d, %d, %" PRId64 ", %"
+					 PRId64 ") returned %d", fname, fd,
+					 test_data[test_index].mode,
 					 test_data[test_index].offset *
 					 block_size,
 					 test_data[test_index].len * block_size,
diff --git a/testcases/kernel/syscalls/fallocate/fallocate03.c b/testcases/kernel/syscalls/fallocate/fallocate03.c
index 924b189..2d81a36 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate03.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate03.c
@@ -126,14 +126,18 @@
 	{
 	DEFAULT_MODE, 2, 1, TRUE}, {
 	DEFAULT_MODE, BLOCKS_WRITTEN, 1, TRUE}, {
-	DEFAULT_MODE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS / 2 - 1, 1, TRUE}, {
+	DEFAULT_MODE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS / 2 - 1, 1, TRUE},
+	{
 	DEFAULT_MODE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS + 1, 1, TRUE}, {
 	FALLOC_FL_KEEP_SIZE, 2, 1, TRUE}, {
 	FALLOC_FL_KEEP_SIZE, BLOCKS_WRITTEN, 1, TRUE}, {
-	FALLOC_FL_KEEP_SIZE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS / 2 + 1, 1, TRUE}, {
-	FALLOC_FL_KEEP_SIZE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS + 2, 1, TRUE}
+	FALLOC_FL_KEEP_SIZE,
+		    BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS / 2 + 1, 1, TRUE}, {
+	FALLOC_FL_KEEP_SIZE, BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS + 2,
+		    1, TRUE}
 };
-int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]); /* total number of tests in this file.   */
+
+int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);	/* total number of tests in this file.   */
 int block_size;
 int buf_size;
 
@@ -147,7 +151,7 @@
 {
 	/* Close all open file descriptors. */
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fname);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fname);
 
 	tst_rmdir();
 
@@ -169,8 +173,7 @@
 	sprintf(fname, "tfile_sparse_%d", getpid());
 	fd = open(fname, O_RDWR | O_CREAT, 0700);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s) failed", fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s) failed", fname);
 	get_blocksize(fd);
 	populate_file();
 	file_seek(BLOCKS_WRITTEN + HOLE_SIZE_IN_BLOCKS);	/* create holes */
@@ -186,7 +189,7 @@
 	struct stat file_stat;
 
 	if (fstat(fd, &file_stat) < 0)
-		tst_resm(TFAIL|TERRNO,
+		tst_resm(TFAIL | TERRNO,
 			 "fstat failed while getting block_size");
 
 	block_size = (int)file_stat.st_blksize;
@@ -216,7 +219,7 @@
 			buf[index] = 'A' + (index % 26);
 		buf[buf_size] = '\0';
 		if ((data = write(fd, buf, buf_size)) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "Unable to write to %s", fname);
 	}
 }
@@ -227,9 +230,11 @@
 static inline long fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
 #if __WORDSIZE == 32
-	return (long) syscall(__NR_fallocate, fd, mode,
-	    __LONG_LONG_PAIR((off_t)(offset >> 32), (off_t)offset),
-	    __LONG_LONG_PAIR((off_t)(len >> 32), (off_t)len));
+	return (long)syscall(__NR_fallocate, fd, mode,
+			     __LONG_LONG_PAIR((off_t) (offset >> 32),
+					      (off_t) offset),
+			     __LONG_LONG_PAIR((off_t) (len >> 32),
+					      (off_t) len));
 #else
 	return syscall(__NR_fallocate, fd, mode, offset, len);
 #endif
@@ -266,22 +271,26 @@
 
 			/* check return code */
 			if (TEST_RETURN != test_data[test_index].error) {
-				if (TEST_ERRNO == EOPNOTSUPP || TEST_ERRNO == ENOSYS) {
+				if (TEST_ERRNO == EOPNOTSUPP
+				    || TEST_ERRNO == ENOSYS) {
 					tst_brkm(TCONF, cleanup,
 						 "fallocate system call is not implemented");
 				}
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO,
-					 "fallocate(%s, %d, %"PRId64", %"PRId64") failed",
-					 fname, test_data[test_index].mode,
+				tst_resm(TFAIL | TTERRNO,
+					 "fallocate(%s, %d, %" PRId64 ", %"
+					 PRId64 ") failed", fname,
+					 test_data[test_index].mode,
 					 test_data[test_index].offset *
 					 block_size,
-					 test_data[test_index].len * block_size);
+					 test_data[test_index].len *
+					 block_size);
 			} else {
 				if (STD_FUNCTIONAL_TEST) {
 					/* No Verification test, yet... */
 					tst_resm(TPASS,
-						 "fallocate(%s, %d, %"PRId64", %"PRId64") returned %ld",
+						 "fallocate(%s, %d, %" PRId64
+						 ", %" PRId64 ") returned %ld",
 						 fname,
 						 test_data[test_index].mode,
 						 test_data[test_index].offset *
diff --git a/testcases/kernel/syscalls/fchdir/fchdir01.c b/testcases/kernel/syscalls/fchdir/fchdir01.c
index dd64acb..6788251 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir01.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir01.c
@@ -108,7 +108,8 @@
 		TEST(fchdir(fd));
 
 		if (TEST_RETURN == -1)
-			tst_brkm(TFAIL|TTERRNO, cleanup, "fchdir call failed");
+			tst_brkm(TFAIL | TTERRNO, cleanup,
+				 "fchdir call failed");
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				check_functionality();
@@ -129,10 +130,10 @@
 
 		/* chdir back to our temporary work directory */
 		if ((r_val = chdir("..")) == -1)
-			tst_resm(TBROK|TERRNO, "chdir failed");
+			tst_resm(TBROK | TERRNO, "chdir failed");
 
 		if ((r_val = rmdir(TEST_DIR)) == -1)
-			tst_resm(TBROK|TERRNO, "rmdir failed");
+			tst_resm(TBROK | TERRNO, "rmdir failed");
 
 		free(temp_dir);
 		temp_dir = NULL;
diff --git a/testcases/kernel/syscalls/fchdir/fchdir02.c b/testcases/kernel/syscalls/fchdir/fchdir02.c
index d9a82df..c5b4bd3 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir02.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir02.c
@@ -90,8 +90,8 @@
 		if (TEST_ERRNO == EBADF)
 			tst_resm(TPASS, "failed as expected with EBADF");
 		else
-			tst_brkm(TFAIL|TTERRNO, cleanup,
-			    "call failed unexpectedly");
+			tst_brkm(TFAIL | TTERRNO, cleanup,
+				 "call failed unexpectedly");
 	}
 
 	cleanup();
diff --git a/testcases/kernel/syscalls/fchdir/fchdir03.c b/testcases/kernel/syscalls/fchdir/fchdir03.c
index 798cbcc..c95e89e 100644
--- a/testcases/kernel/syscalls/fchdir/fchdir03.c
+++ b/testcases/kernel/syscalls/fchdir/fchdir03.c
@@ -126,7 +126,7 @@
 				exit(1);
 			} else if (TEST_ERRNO != EACCES) {
 				printf("Expected %d - got %d\n",
-				    EACCES, TEST_ERRNO);
+				       EACCES, TEST_ERRNO);
 				exit(1);
 			} else
 				printf("Got EACCES as expected\n");
@@ -137,11 +137,12 @@
 
 		} else {
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_brkm(TBROK, cleanup,
-				    "child exited abnormally (wait status = "
-				    "%d", status);
+					 "child exited abnormally (wait status = "
+					 "%d", status);
 			else {
 				/* let the child carry on */
 				exit(0);
@@ -170,7 +171,7 @@
 	tst_tmpdir();
 
 	if ((cur_dir = getcwd(cur_dir, 0)) == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getcwd failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getcwd failed");
 
 	sprintf(good_dir, "%s.%d", cur_dir, getpid());
 
diff --git a/testcases/kernel/syscalls/fchmod/fchmod01.c b/testcases/kernel/syscalls/fchmod/fchmod01.c
index f9cefb3..3706eb2 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod01.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod01.c
@@ -145,7 +145,7 @@
 		TEST(fchmod(fd, 0700));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO,
+			tst_resm(TFAIL | TTERRNO,
 				 "fchmod(%s, 0700) failed", fname);
 		else {
 
@@ -174,9 +174,9 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 	else if (write(fd, &buf, strlen(buf)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 }
 
 /***************************************************************
@@ -188,7 +188,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_brkm(TWARN|TERRNO, cleanup, "close failed");
+		tst_brkm(TWARN | TERRNO, cleanup, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fchmod/fchmod03.c b/testcases/kernel/syscalls/fchmod/fchmod03.c
index c0bd395..36f6849 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod03.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod03.c
@@ -115,7 +115,7 @@
 		TEST(fchmod(fd, PERMS));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "fchmod failed");
+			tst_resm(TFAIL | TTERRNO, "fchmod failed");
 			continue;
 		}
 		/*
@@ -128,7 +128,8 @@
 			 * fstat(2).
 			 */
 			if (fstat(fd, &stat_buf) == -1)
-				tst_brkm(TFAIL|TERRNO, cleanup, "fstat failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "fstat failed");
 			file_mode = stat_buf.st_mode;
 
 			/* Verify STICKY BIT set on testfile */
@@ -156,9 +157,9 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "seteuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "seteuid failed");
 
 	TEST_PAUSE;
 
@@ -170,7 +171,7 @@
 	 * uid/gid of guest user.
 	 */
 	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -178,7 +179,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fchmod/fchmod04.c b/testcases/kernel/syscalls/fchmod/fchmod04.c
index 5055288..bee0959 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod04.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod04.c
@@ -122,7 +122,7 @@
 		TEST(fchmod(fd, PERMS));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "fchmod failed");
+			tst_resm(TFAIL | TTERRNO, "fchmod failed");
 			continue;
 		}
 		/*
@@ -131,7 +131,8 @@
 		 */
 		if (STD_FUNCTIONAL_TEST) {
 			if (fstat(fd, &stat_buf) == -1)
-				tst_brkm(TFAIL|TERRNO, cleanup, "fstat failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "fstat failed");
 			dir_mode = stat_buf.st_mode;
 
 			if ((dir_mode & PERMS) == PERMS)
diff --git a/testcases/kernel/syscalls/fchmod/fchmod05.c b/testcases/kernel/syscalls/fchmod/fchmod05.c
index c6baf96..1d75cb2 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod05.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod05.c
@@ -71,7 +71,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <stdio.h>
@@ -153,7 +153,8 @@
 					 TESTDIR, dir_mode, PERMS & ~S_ISGID);
 			} else {
 				tst_resm(TPASS, "Functionality of fchmod(%d, "
-					 "%#o) successful", fd, PERMS & ~S_ISGID);
+					 "%#o) successful", fd,
+					 PERMS & ~S_ISGID);
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -211,17 +212,18 @@
 	}
 
 	if (setgroups(1, &nobody_u->pw_gid) == -1)
-		tst_brkm(TBROK, cleanup, "Couldn't change supplementary group Id: %s",
-				strerror(errno));
+		tst_brkm(TBROK, cleanup,
+			 "Couldn't change supplementary group Id: %s",
+			 strerror(errno));
 
 	if (chown(TESTDIR, nobody_u->pw_uid, bin_group->gr_gid) == -1)
 		tst_brkm(TBROK, cleanup, "Couldn't change owner of testdir: %s",
-				strerror(errno));
+			 strerror(errno));
 
 	/* change to nobody:nobody */
 	if (setegid(nobody_u->pw_gid) == -1 || seteuid(nobody_u->pw_uid) == -1)
 		tst_brkm(TBROK, cleanup, "Couldn't switch to nobody:nobody: %s",
-				strerror(errno));
+			 strerror(errno));
 
 	/* Open the test directory for reading */
 	fd = open(TESTDIR, O_RDONLY);
diff --git a/testcases/kernel/syscalls/fchmod/fchmod06.c b/testcases/kernel/syscalls/fchmod/fchmod06.c
index baad757..75de7b4 100644
--- a/testcases/kernel/syscalls/fchmod/fchmod06.c
+++ b/testcases/kernel/syscalls/fchmod/fchmod06.c
@@ -103,11 +103,11 @@
 	int fd;
 	int mode;
 	int exp_errno;
-	void (*setupfunc)();
+	void (*setupfunc) ();
 } test_cases[] = {
-	{ 1, FILE_MODE, EPERM, setup1 },
-	{ 2, FILE_MODE, EBADF, setup2 },
-};
+	{
+	1, FILE_MODE, EPERM, setup1}, {
+2, FILE_MODE, EBADF, setup2},};
 
 char *TCID = "fchmod06";	/* Test program identifier.    */
 int TST_TOTAL = 2;		/* Total number of test cases. */
@@ -152,14 +152,14 @@
 
 			if (TEST_RETURN == -1) {
 				if (TEST_ERRNO == test_cases[i].exp_errno)
-					tst_resm(TPASS|TTERRNO,
-					    "fchmod failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "fchmod failed as expected");
 				else
-					tst_resm(TFAIL|TTERRNO,
-					    "fchmod failed unexpectedly");
+					tst_resm(TFAIL | TTERRNO,
+						 "fchmod failed unexpectedly");
 			} else
 				tst_resm(TFAIL,
-				    "fchmod succeeded unexpectedly");
+					 "fchmod succeeded unexpectedly");
 		}
 
 	}
@@ -177,9 +177,9 @@
 	tst_require_root(NULL);
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_resm(TBROK|TERRNO, "seteuid failed");
+		tst_resm(TBROK | TERRNO, "seteuid failed");
 
 	test_home = get_current_dir_name();
 
@@ -195,28 +195,29 @@
 {
 	uid_t old_uid;
 
-	if ((fd1 = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(%s, ..) failed",
-		    TEST_FILE1);
+	if ((fd1 = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s, ..) failed",
+			 TEST_FILE1);
 
 	old_uid = geteuid();
 	if (seteuid(0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(0) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(0) failed");
 
 	if (fchown(fd1, 0, 0) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown of %s failed",
-		    TEST_FILE1);
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown of %s failed",
+			 TEST_FILE1);
 
 	if (seteuid(old_uid) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid(%d) failed", old_uid);
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid(%d) failed",
+			 old_uid);
 
 }
 
 void setup2()
 {
-	if ((fd2 = open(TEST_FILE2, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(%s, ..) failed",
-		    TEST_FILE2);
+	if ((fd2 = open(TEST_FILE2, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open(%s, ..) failed",
+			 TEST_FILE2);
 	if (close(fd2) == -1)
 		tst_brkm(TBROK, cleanup, "closing %s failed", TEST_FILE2);
 }
@@ -226,7 +227,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd1) == -1)
-		tst_resm(TWARN|TERRNO, "closing %s failed", TEST_FILE1);
+		tst_resm(TWARN | TERRNO, "closing %s failed", TEST_FILE1);
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/fchown/fchown01.c b/testcases/kernel/syscalls/fchown/fchown01.c
index 91dec49..c04a06d 100644
--- a/testcases/kernel/syscalls/fchown/fchown01.c
+++ b/testcases/kernel/syscalls/fchown/fchown01.c
@@ -143,13 +143,11 @@
 		TEST(fchown(fd, geteuid(), getegid()));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fchown failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS,
-				    "fchown(fd, geteuid(), getegid()) "
-				    "returned %ld",
-				    TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "fchown failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS,
+				 "fchown(fd, geteuid(), getegid()) "
+				 "returned %ld", TEST_RETURN);
 	}
 
 	cleanup();
@@ -169,7 +167,7 @@
 
 	sprintf(fname, "./tmpfile.%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/fchown/fchown02.c b/testcases/kernel/syscalls/fchown/fchown02.c
index 7c0ae32..f2904a9 100644
--- a/testcases/kernel/syscalls/fchown/fchown02.c
+++ b/testcases/kernel/syscalls/fchown/fchown02.c
@@ -227,7 +227,7 @@
 
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fchown/fchown03.c b/testcases/kernel/syscalls/fchown/fchown03.c
index 3f3e7fc..c5ee0c3 100644
--- a/testcases/kernel/syscalls/fchown/fchown03.c
+++ b/testcases/kernel/syscalls/fchown/fchown03.c
@@ -180,7 +180,7 @@
 
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
@@ -201,8 +201,8 @@
 	ltpuser = getpwnam(nobody_uid);
 	if (seteuid(ltpuser->pw_uid) == -1) {
 		tst_brkm(TBROK, cleanup, "seteuid failed to "
-			"to set the effective uid to %d: %s", ltpuser->pw_uid,
-				strerror(errno));
+			 "to set the effective uid to %d: %s", ltpuser->pw_uid,
+			 strerror(errno));
 	}
 
 	TEST_PAUSE;
@@ -218,11 +218,11 @@
 	seteuid(0);
 	if (fchown(fildes, -1, 0) < 0)
 		tst_brkm(TBROK, cleanup, "Fail to modify Ownership of %s: %s",
-				TESTFILE, strerror(errno));
+			 TESTFILE, strerror(errno));
 
 	if (fchmod(fildes, NEW_PERMS) < 0)
 		tst_brkm(TBROK, cleanup, "Fail to modify Mode of %s: %s",
-				TESTFILE, strerror(errno));
+			 TESTFILE, strerror(errno));
 
 	setegid(ltpuser->pw_gid);
 	seteuid(ltpuser->pw_uid);
diff --git a/testcases/kernel/syscalls/fchown/fchown04.c b/testcases/kernel/syscalls/fchown/fchown04.c
index c6cdb49..c601ae9 100644
--- a/testcases/kernel/syscalls/fchown/fchown04.c
+++ b/testcases/kernel/syscalls/fchown/fchown04.c
@@ -100,9 +100,9 @@
 	int exp_errno;
 	void (*setupfunc) ();
 } test_cases[] = {
-	{ 1, EPERM, setup1 },
-	{ 2, EBADF, setup2 },
-};
+	{
+	1, EPERM, setup1}, {
+2, EBADF, setup2},};
 
 char test_home[PATH_MAX];	/* variable to hold TESTHOME env */
 char *TCID = "fchown04";	/* Test program identifier.    */
@@ -151,14 +151,15 @@
 
 			if (TEST_RETURN == -1) {
 				if (TEST_ERRNO == test_cases[i].exp_errno)
-					tst_resm(TPASS|TTERRNO,
-					    "fchown failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "fchown failed as expected");
 				else
-					tst_resm(TFAIL|TTERRNO,
-					    "fchown failed unexpectedly; "
-					    "expected %d - %s",
-					    test_cases[i].exp_errno,
-					    strerror(test_cases[i].exp_errno));
+					tst_resm(TFAIL | TTERRNO,
+						 "fchown failed unexpectedly; "
+						 "expected %d - %s",
+						 test_cases[i].exp_errno,
+						 strerror(test_cases[i].
+							  exp_errno));
 			} else
 				tst_resm(TFAIL, "fchown passed unexpectedly");
 		}
@@ -201,7 +202,7 @@
 	int old_uid;
 	struct passwd *nobody;
 
-	fd1 = SAFE_OPEN(cleanup, TEST_FILE1, O_RDWR|O_CREAT, 0666);
+	fd1 = SAFE_OPEN(cleanup, TEST_FILE1, O_RDWR | O_CREAT, 0666);
 
 	old_uid = geteuid();
 
@@ -210,14 +211,14 @@
 	nobody = SAFE_GETPWNAM(cleanup, "nobody");
 
 	if (fchown(fd1, nobody->pw_uid, nobody->pw_gid) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "fchown failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fchown failed");
 
 	SAFE_SETEUID(cleanup, old_uid);
 }
 
 void setup2()
 {
-	fd2 = SAFE_OPEN(cleanup, TEST_FILE2, O_RDWR|O_CREAT, 0666);
+	fd2 = SAFE_OPEN(cleanup, TEST_FILE2, O_RDWR | O_CREAT, 0666);
 	SAFE_CLOSE(cleanup, fd2);
 }
 
diff --git a/testcases/kernel/syscalls/fchown/fchown05.c b/testcases/kernel/syscalls/fchown/fchown05.c
index 2adbee5..1c0426c 100644
--- a/testcases/kernel/syscalls/fchown/fchown05.c
+++ b/testcases/kernel/syscalls/fchown/fchown05.c
@@ -186,7 +186,7 @@
 
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
index fd7366d..e7fbf12 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
@@ -76,6 +76,7 @@
 char *filenames[TEST_CASES];
 int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, EINVAL, 0 };
 int flags[TEST_CASES] = { 0, 0, 0, 0, 9999, 0 };
+
 uid_t uid;
 gid_t gid;
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl01.c b/testcases/kernel/syscalls/fcntl/fcntl01.c
index 82551f9..6c44cc0 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl01.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl01.c
@@ -64,8 +64,9 @@
 		mypid = getpid();
 		for (i = 0; i < 8; i++) {
 			sprintf(fname, "./fcntl%d.%d", i, mypid);
-			if ((fd[i] = open(fname, O_WRONLY|O_CREAT, 0666)) == -1)
-				tst_resm(TBROK|TERRNO, "open failed");
+			if ((fd[i] =
+			     open(fname, O_WRONLY | O_CREAT, 0666)) == -1)
+				tst_resm(TBROK | TERRNO, "open failed");
 			fd2[i] = fd[i];
 		}
 
@@ -75,21 +76,21 @@
 		close(fd[5]);
 
 		if ((fd[2] = fcntl(fd[1], F_DUPFD, 1)) == -1)
-			tst_resm(TFAIL|TERRNO, "fcntl(.., 1) failed");
+			tst_resm(TFAIL | TERRNO, "fcntl(.., 1) failed");
 
 		if (fd[2] < fd2[2])
 			tst_resm(TFAIL, "new fd has unexpected value: "
 				 "got %d, expected greater than %d", fd[2], 5);
 
 		if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl(.., fd2[3]) failed");
+			tst_resm(TFAIL | TERRNO, "fcntl(.., fd2[3]) failed");
 
 		if (fd[4] < fd2[3])
 			tst_resm(TFAIL, "new fd has unexpected value, got %d, "
 				 "expect greater than %d", fd[4], fd2[3]);
 
 		if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl(.., fd2[5]) failed");
+			tst_resm(TFAIL | TERRNO, "fcntl(.., fd2[5]) failed");
 
 		if (fd[8] != fd2[5])
 			tst_resm(TFAIL, "new fd has unexpected value: "
@@ -102,30 +103,31 @@
 
 		/* Check setting of no_delay flag */
 		if (fcntl(fd[2], F_SETFL, O_NDELAY) == -1)
-			tst_resm(TBROK|TERRNO, "fcntl(.., O_NDELAY) failed");
+			tst_resm(TBROK | TERRNO, "fcntl(.., O_NDELAY) failed");
 
 		flags = fcntl(fd[2], F_GETFL, 0);
-		if ((flags & (O_NDELAY|O_WRONLY)) == 0)
+		if ((flags & (O_NDELAY | O_WRONLY)) == 0)
 			tst_resm(TFAIL, "unexpected flag 0x%x, expected 0x%x",
-				 flags, O_NDELAY|O_WRONLY);
+				 flags, O_NDELAY | O_WRONLY);
 
 		/* Check of setting append flag */
 		if (fcntl(fd[2], F_SETFL, O_APPEND) == -1)
-			tst_resm(TFAIL|TERRNO, "fcntl(.., O_APPEND) failed");
+			tst_resm(TFAIL | TERRNO, "fcntl(.., O_APPEND) failed");
 
 		flags = fcntl(fd[2], F_GETFL, 0);
-		if ((flags & (O_APPEND|O_WRONLY)) == 0)
+		if ((flags & (O_APPEND | O_WRONLY)) == 0)
 			tst_resm(TFAIL, "unexpected flag ox%x, expected 0x%x",
 				 flags, O_APPEND | O_WRONLY);
 
 		/* Check setting flags together */
-		if (fcntl(fd[2], F_SETFL, O_NDELAY|O_APPEND) < 0)
+		if (fcntl(fd[2], F_SETFL, O_NDELAY | O_APPEND) < 0)
 			tst_resm(TFAIL, "fcntl(.., O_NDELAY|O_APPEND) failed");
 
 		flags = fcntl(fd[2], F_GETFL, 0);
 		if ((flags & (O_NDELAY | O_APPEND | O_WRONLY)) == 0)
 			tst_resm(TFAIL, "unexpected flag 0x%x, expected 0x%x",
-				 flags, O_NDELAY|O_APPEND|O_SYNC|O_WRONLY);
+				 flags,
+				 O_NDELAY | O_APPEND | O_SYNC | O_WRONLY);
 
 		/* Check that flags are not cummulative */
 		if (fcntl(fd[2], F_SETFL, 0) == -1)
@@ -141,16 +143,16 @@
 		 * Check ability to set (F_SETFD) the close on exec flag
 		 */
 		if ((flags = fcntl(fd[2], F_GETFD, 0)) < 0)
-			tst_resm(TFAIL|TERRNO,
-			    "fcntl(.., F_GETFD, ..) #1 failed");
+			tst_resm(TFAIL | TERRNO,
+				 "fcntl(.., F_GETFD, ..) #1 failed");
 		if (flags != 0)
 			tst_resm(TFAIL, "unexpected flags got 0x%x expected "
 				 "0x%x", flags, 0);
 		if ((flags = fcntl(fd[2], F_SETFD, 1)) == -1)
 			tst_resm(TFAIL, "fcntl(.., F_SETFD, ..) failed");
 		if ((flags = fcntl(fd[2], F_GETFD, 0)) == -1)
-			tst_resm(TFAIL|TERRNO,
-			    "fcntl(.., F_GETFD, ..) #2 failed");
+			tst_resm(TFAIL | TERRNO,
+				 "fcntl(.., F_GETFD, ..) #2 failed");
 		if (flags != 1)
 			tst_resm(TFAIL, "unexpected flags, got 0x%x, "
 				 "expected 0x%x", flags, 1);
@@ -160,8 +162,8 @@
 		for (i = 0; i < 8; i++) {
 			sprintf(fname, "./fcntl%d.%d", i, mypid);
 			if ((unlink(fname)) == -1)
-				tst_resm(TFAIL|TERRNO,
-				    "unlinking %s failed", fname);
+				tst_resm(TFAIL | TERRNO,
+					 "unlinking %s failed", fname);
 		}
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/fcntl/fcntl02.c b/testcases/kernel/syscalls/fcntl/fcntl02.c
index f4811dc..998914f 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl02.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl02.c
@@ -149,15 +149,15 @@
 		TEST(fcntl(fd, F_DUPFD, 0));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fcntl(%s, F_DUPFD, 0) failed",
-			    fname);
+			tst_resm(TFAIL | TTERRNO,
+				 "fcntl(%s, F_DUPFD, 0) failed", fname);
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS,
 					 "fcntl(%s, F_DUPFD, 0) returned %ld",
 					 fname, TEST_RETURN);
 			if (close(TEST_RETURN) == -1)
-				tst_resm(TWARN|TERRNO, "close failed");
+				tst_resm(TWARN | TERRNO, "close failed");
 		}
 
 	}
@@ -186,7 +186,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TBROK|TERRNO, "close failed");
+		tst_resm(TBROK | TERRNO, "close failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/fcntl/fcntl03.c b/testcases/kernel/syscalls/fcntl/fcntl03.c
index 76231b8..0e7ba5b 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl03.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl03.c
@@ -149,12 +149,11 @@
 		TEST(fcntl(fd, F_GETFD, 0));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fcntl failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS,
-					 "fcntl(%s, F_GETFD, 0) returned %ld",
-					 fname, TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "fcntl failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS,
+				 "fcntl(%s, F_GETFD, 0) returned %ld",
+				 fname, TEST_RETURN);
 
 	}
 
@@ -174,7 +173,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -182,7 +181,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/fcntl/fcntl04.c b/testcases/kernel/syscalls/fcntl/fcntl04.c
index 89c68e3..fdc48dc 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl04.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl04.c
@@ -149,11 +149,9 @@
 		TEST(fcntl(fd, F_GETFL, 0));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fcntl failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS,
-				    "fcntl returned %ld", TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "fcntl failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "fcntl returned %ld", TEST_RETURN);
 	}
 
 	cleanup();
@@ -172,7 +170,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -180,7 +178,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl05.c b/testcases/kernel/syscalls/fcntl/fcntl05.c
index c6e7fd9..324f879 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl05.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl05.c
@@ -151,11 +151,11 @@
 		TEST(fcntl(fd, F_GETLK, &flocks));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fcntl failed");
+			tst_resm(TFAIL | TTERRNO, "fcntl failed");
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS, "fcntl returned %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 		}
 
 	}
@@ -176,7 +176,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	/* set needed flags in the flocks structure */
 	flocks.l_whence = 1;
@@ -190,7 +190,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl06.c b/testcases/kernel/syscalls/fcntl/fcntl06.c
index ddcdac6..3e06e90 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl06.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl06.c
@@ -87,8 +87,8 @@
 	if (fcntl(fd, F_RGETLK, &tl) == -1) {
 		if (errno == EINVAL)
 			tst_brkm(TCONF, cleanup,
-			    "fcntl remote locking feature not implemented in "
-			    "the kernel");
+				 "fcntl remote locking feature not implemented in "
+				 "the kernel");
 		else {
 			/*
 			 * FIXME (garrcoop): having it always pass on
@@ -106,7 +106,7 @@
 		tst_resm(TFAIL, "F_RSETLK WRLCK failed");
 
 	if (do_lock(F_RSETLK, F_UNLCK, 0, 5, 5) == -1)
-		tst_resm(TFAIL|TERRNO, "F_RSETLK UNLOCK failed");
+		tst_resm(TFAIL | TERRNO, "F_RSETLK UNLOCK failed");
 
 	unlock_file();
 #else
@@ -133,10 +133,10 @@
 	snprintf(template, PATH_MAX, "fcntl06XXXXXX");
 
 	if ((fd = mkstemp(template)) == -1)
-		tst_resm(TBROK|TERRNO, "mkstemp failed");
+		tst_resm(TBROK | TERRNO, "mkstemp failed");
 
 	if (write(fd, buf, STRINGSIZE) == -1)
-		tst_resm(TBROK|TERRNO, "write failed");
+		tst_resm(TBROK | TERRNO, "write failed");
 }
 
 int do_lock(int cmd, short type, short whence, int start, int len)
@@ -154,7 +154,7 @@
 {
 	if (do_lock(F_RSETLK, (short)F_UNLCK, (short)0, 0, 0) == -1) {
 		/* Same as FIXME comment above. */
-		tst_resm(TPASS|TERRNO, "fcntl on file failed");
+		tst_resm(TPASS | TERRNO, "fcntl on file failed");
 	}
 }
 
@@ -162,7 +162,7 @@
 {
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	TEST_CLEANUP;
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl07.c b/testcases/kernel/syscalls/fcntl/fcntl07.c
index 3901eb2..3bcd860 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl07.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl07.c
@@ -220,10 +220,9 @@
 			TEST(fcntl(**tcp, F_SETFD, FD_CLOEXEC));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
+				tst_resm(TFAIL | TTERRNO,
 					 "fcntl(%s[%d], F_SETFD, FD_CLOEXEC) "
-					 "failed",
-					 *tcd, **tcp);
+					 "failed", *tcd, **tcp);
 			} else {
 
 				if (STD_FUNCTIONAL_TEST) {
@@ -277,7 +276,7 @@
 
 	tst_tmpdir();
 
-	file_fd = SAFE_OPEN(cleanup, File1, O_CREAT|O_RDWR, 0666);
+	file_fd = SAFE_OPEN(cleanup, File1, O_CREAT | O_RDWR, 0666);
 	SAFE_PIPE(cleanup, pipe_fds);
 }
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl08.c b/testcases/kernel/syscalls/fcntl/fcntl08.c
index ad0dcfe..a4a3094 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl08.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl08.c
@@ -145,12 +145,12 @@
 		TEST(fcntl(fd, F_SETFL, arg));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fcntl failed");
+			tst_resm(TFAIL | TTERRNO, "fcntl failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST) {
 				tst_resm(TPASS, "fcntl returned %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 			}
 		}
 
@@ -171,7 +171,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	/* set the flags to be used */
 #ifdef CRAY
@@ -193,7 +193,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
index 26e88fd..4f36b6c 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl11.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
@@ -110,7 +110,8 @@
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGCLD);
 	if ((sigaction(SIGCLD, &act, NULL)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "sigaction(SIGCLD, ..) failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "sigaction(SIGCLD, ..) failed");
 }
 
 void do_child()
@@ -122,7 +123,7 @@
 	while (1) {
 		child_get(&fl);
 		if (fcntl(fd, F_GETLK, &fl) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 		child_put(&fl);
 	}
 }
@@ -164,16 +165,16 @@
 
 	if (fl->l_start != start)
 		tst_resm(TFAIL, "region starts in wrong place, should be "
-			 "%d is %"PRId64, start, (int64_t)fl->l_start);
+			 "%d is %" PRId64, start, (int64_t) fl->l_start);
 
 	if (fl->l_len != len)
 		tst_resm(TFAIL,
-		    "region length is wrong, should be %d is %"PRId64,
-		    len, (int64_t)fl->l_len);
+			 "region length is wrong, should be %d is %" PRId64,
+			 len, (int64_t) fl->l_len);
 
 	if (fl->l_pid != pid)
 		tst_resm(TFAIL, "locking pid is wrong, should be %d is %d",
-		    pid, fl->l_pid);
+			 pid, fl->l_pid);
 }
 
 void unlock_file()
@@ -181,7 +182,7 @@
 	struct flock fl;
 
 	if (do_lock(F_SETLK, (short)F_UNLCK, (short)0, 0, 0) < 0)
-		tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+		tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 	do_test(&fl, F_WRLCK, 0, 0, 0);
 	compare_lock(&fl, (short)F_UNLCK, (short)0, 0, 0, (pid_t) 0);
 }
@@ -264,15 +265,15 @@
 		if ((child_pid = FORK_OR_VFORK()) == 0) {	/* parent */
 #ifdef UCLINUX
 			if (self_exec(av[0], "ddddd", parent_pipe[0],
-			    parent_pipe[1], child_pipe[0], child_pipe[1],
-			    fd) < 0)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "self_exec failed");
+				      parent_pipe[1], child_pipe[0],
+				      child_pipe[1], fd) < 0)
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "self_exec failed");
 #else
 			do_child();
 #endif
 		} else if (child_pid == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 
 		SAFE_CLOSE(cleanup, parent_pipe[0]);
 		SAFE_CLOSE(cleanup, child_pipe[1]);
@@ -285,10 +286,10 @@
 		 * at the begining
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 1, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test read lock
@@ -323,10 +324,10 @@
 		 * read lock just before
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 5, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the read lock
@@ -361,10 +362,10 @@
 		 * ends at the first byte of the write lock
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 5, 6) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test read lock
@@ -399,10 +400,10 @@
 		 * lock that overlaps the front of the write.
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 5, 8) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the read lock
@@ -437,10 +438,10 @@
 		 * lock in the middle of it
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 10) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 13, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the first write lock
@@ -479,13 +480,13 @@
 		 * lock that overlaps the end
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Set a read lock on the whole file
 		 */
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 13, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the write lock
@@ -520,13 +521,13 @@
 		 * lock starting at the last byte of the write lock
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Set a read lock on the whole file.
 		 */
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 14, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test write lock
@@ -562,13 +563,13 @@
 		 * write lock.
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Set a read lock on the whole file
 		 */
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 15, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the write lock
@@ -603,10 +604,10 @@
 		 * lock that starts past the end of the write lock.
 		 */
 		if (do_lock(F_SETLK, (short)F_WRLCK, (short)0, 10, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		if (do_lock(F_SETLK, (short)F_RDLCK, (short)0, 16, 5) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 
 		/*
 		 * Test the write lock
diff --git a/testcases/kernel/syscalls/fcntl/fcntl12.c b/testcases/kernel/syscalls/fcntl/fcntl12.c
index 6ca2fde..ad6d992 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl12.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl12.c
@@ -83,7 +83,7 @@
 		if (pid < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 } else if (pid == 0) {	/* child */
+		} else if (pid == 0) {	/* child */
 			max_files = getdtablesize();
 			for (i = 0; i < max_files; i++) {
 				if ((fd = open(fname, O_CREAT | O_RDONLY,
diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
index e6d9214..82efe02 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl14.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
@@ -594,7 +594,7 @@
 		tst_resm(TFAIL, "SIGUSR1 signal setup failed, errno = %d",
 			 errno);
 		cleanup();
-	 }
+	}
 
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_alarm;
@@ -603,7 +603,7 @@
 	if ((sigaction(SIGALRM, &act, NULL)) < 0) {
 		tst_resm(TFAIL, "SIGALRM signal setup failed");
 		cleanup();
-	 }
+	}
 }
 
 void wake_parent(void)
@@ -666,17 +666,19 @@
 
 			if (flock.l_start != thiscase->c_start) {
 				tst_resm(TFAIL,
-					 "Test case %d, GETLK: start = %"PRId64", "
-					 "should have remained %"PRId64, test + 1,
-					 (int64_t)flock.l_start, (int64_t)thiscase->c_start);
+					 "Test case %d, GETLK: start = %" PRId64
+					 ", " "should have remained %" PRId64,
+					 test + 1, (int64_t) flock.l_start,
+					 (int64_t) thiscase->c_start);
 				fail = 1;
 			}
 
 			if (flock.l_len != thiscase->c_len) {
 				tst_resm(TFAIL,
-					 "Test case %d, GETLK: len = %"PRId64", "
-					 "should have remained %"PRId64, test + 1,
-					 (int64_t)flock.l_len, (int64_t)thiscase->c_len);
+					 "Test case %d, GETLK: len = %" PRId64
+					 ", " "should have remained %" PRId64,
+					 test + 1, (int64_t) flock.l_len,
+					 (int64_t) thiscase->c_len);
 				fail = 1;
 			}
 
@@ -802,18 +804,18 @@
 		fd = open(tmpname, file_flag, file_mode);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open() failed");
-		 }
+		}
 
 		/* write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write() failed");
-		 }
+		}
 
 		/* seek into file if indicated */
 		if (seek) {
 			if (lseek(fd, seek, 0) < 0) {
 				tst_brkm(TBROK, cleanup, "lseek() failed");
-			 }
+			}
 		}
 
 		/* Initialize first parent lock structure */
@@ -869,7 +871,7 @@
 				      thiscase->a_type, fd, test, parent) < 0) {
 				tst_resm(TFAIL, "self_exec failed");
 				cleanup();
-			 }
+			}
 #else
 			dochild();
 #endif
@@ -877,7 +879,7 @@
 		if (child < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 }
+		}
 		/* parent process */
 		if ((thiscase->c_flag) == WILLBLOCK) {
 			/*
@@ -1064,12 +1066,12 @@
 		fd = open(tmpname, O_CREAT | O_RDWR | O_TRUNC, 0777);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 }
+		}
 
 		/* Write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 }
+		}
 
 		/* Initialize lock structure */
 		flock.l_type = F_WRLCK;
@@ -1115,12 +1117,12 @@
 		fd = open(tmpname, O_CREAT | O_RDWR | O_TRUNC, 0777);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 }
+		}
 
 		/* Write some dummy data to the file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 }
+		}
 
 		/* Initialize first parent lock structure */
 		thiscase = &testcases[58];
@@ -1139,12 +1141,12 @@
 		/* Write some additional data to end of file */
 		if (write(fd, FILEDATA, 10) < 0) {
 			tst_brkm(TBROK, cleanup, "write failed");
-		 }
+		}
 
 		/* Mask signal to avoid race */
 		if (sighold(SIGUSR1) < 0) {
 			tst_brkm(TBROK, cleanup, "sighold failed");
-		 }
+		}
 
 		/* spawn a child process */
 		if ((child = FORK_OR_VFORK()) == 0) {
@@ -1155,7 +1157,7 @@
 				      thiscase->a_type, fd, test, parent) < 0) {
 				tst_resm(TFAIL, "self_exec failed");
 				cleanup();
-			 }
+			}
 #else
 			dochild();
 #endif
@@ -1163,7 +1165,7 @@
 		if (child < 0) {
 			tst_resm(TFAIL, "Fork failed");
 			cleanup();
-		 }
+		}
 
 		/* parent process */
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl15.c b/testcases/kernel/syscalls/fcntl/fcntl15.c
index dcbf298..6d6d6f4 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl15.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl15.c
@@ -466,8 +466,8 @@
 	} else if (child2 == 0) {	/* child */
 #ifdef UCLINUX
 		if (self_exec(argv0, "ndddds", 2, file_flag, file_mode,
-		    dup_flag, parent, tmpname) < 0)
-			tst_brkm(TBROK|TERRNO, NULL, "self_exec failed");
+			      dup_flag, parent, tmpname) < 0)
+			tst_brkm(TBROK | TERRNO, NULL, "self_exec failed");
 #else
 		dochild2(file_flag, file_mode, dup_flag);
 #endif
diff --git a/testcases/kernel/syscalls/fcntl/fcntl16.c b/testcases/kernel/syscalls/fcntl/fcntl16.c
index 285ca34..e41d6e9 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl16.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl16.c
@@ -461,7 +461,7 @@
 		fd = open(tmpname, file_flag, file_mode);
 		if (fd < 0) {
 			tst_brkm(TBROK, cleanup, "open failed");
-		 }
+		}
 
 		/* write some dummy data to the file */
 		(void)write(fd, FILEDATA, 10);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
index b28ddd3..f67fc0a 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl17.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
@@ -42,7 +42,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <fcntl.h>
@@ -302,13 +302,15 @@
 
 	if (fl.l_start != lock->l_start) {
 		tst_resm(TFAIL, "region starts in wrong place, "
-			 "should be %"PRId64" is %"PRId64, (int64_t)lock->l_start, (int64_t)fl.l_start);
+			 "should be %" PRId64 " is %" PRId64,
+			 (int64_t) lock->l_start, (int64_t) fl.l_start);
 		return 1;
 	}
 
 	if (fl.l_len != lock->l_len) {
-		tst_resm(TFAIL, "region length is wrong, should be %"PRId64" is %"PRId64,
-			 (int64_t)lock->l_len, (int64_t)fl.l_len);
+		tst_resm(TFAIL,
+			 "region length is wrong, should be %" PRId64 " is %"
+			 PRId64, (int64_t) lock->l_len, (int64_t) fl.l_len);
 		return 1;
 	}
 
@@ -392,7 +394,7 @@
 {
 	tst_resm(TFAIL, "Unexpected death of child process");
 	cleanup();
- }
+}
 
 void catch_alarm()
 {
@@ -414,7 +416,7 @@
 	tst_resm(TFAIL, "Alarm expired, deadlock not detected");
 	tst_resm(TWARN, "You may need to kill child processes by hand");
 	cleanup();
- }
+}
 
 int main(int ac, char **av)
 {
@@ -447,7 +449,7 @@
 	if (setup()) {		/* global testup */
 		tst_resm(TINFO, "setup failed");
 		cleanup();
-	 }
+	}
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -471,7 +473,7 @@
 		} else if (child_pid1 < 0) {
 			perror("Fork failed: child 1");
 			cleanup();
-		 }
+		}
 
 		/* parent */
 
@@ -495,7 +497,7 @@
 					 "1 failed");
 			}
 			cleanup();
-		 }
+		}
 
 		/* parent */
 
@@ -524,7 +526,7 @@
 					 "failed");
 			}
 			cleanup();
-		 }
+		}
 		/* parent */
 
 		close(parent_pipe[1]);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
index cb46993..780d031 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl19.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
@@ -137,7 +137,7 @@
 	while (1) {
 		child_get(&fl);
 		if (fcntl(fd, F_GETLK, &fl) < 0)
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 		child_put(&fl);
 	}
 }
@@ -183,13 +183,14 @@
 
 	if (fl->l_start != start) {
 		tst_resm(TFAIL, "region starts in wrong place, should be"
-			 "%d is %"PRId64, start, (int64_t)fl->l_start);
+			 "%d is %" PRId64, start, (int64_t) fl->l_start);
 		fail = 1;
 	}
 
 	if (fl->l_len != len) {
-		tst_resm(TFAIL, "region length is wrong, should be %d is %"PRId64,
-			 len, (int64_t)fl->l_len);
+		tst_resm(TFAIL,
+			 "region length is wrong, should be %d is %" PRId64,
+			 len, (int64_t) fl->l_len);
 		fail = 1;
 	}
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
index 8f564d1..32a6170 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl20.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
@@ -103,7 +103,7 @@
 	snprintf(template, PATH_MAX, "fcntl20XXXXXX");
 
 	if ((fd = mkstemp(template)) == -1)
-		tst_resm(TFAIL|TERRNO, "mkstemp failed");
+		tst_resm(TFAIL | TERRNO, "mkstemp failed");
 
 	SAFE_WRITE(cleanup, 0, fd, buf, STRINGSIZE);
 
@@ -112,7 +112,7 @@
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGCLD);
 	if (sigaction(SIGCLD, &act, NULL) == -1)
-		tst_brkm(TFAIL|TERRNO, cleanup, "SIGCLD signal setup failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "SIGCLD signal setup failed");
 }
 
 void cleanup()
@@ -134,7 +134,7 @@
 	while (1) {
 		child_get(&fl);
 		if (fcntl(fd, F_GETLK, &fl) < 0) {
-			tst_resm(TFAIL|TERRNO, "fcntl on file failed");
+			tst_resm(TFAIL | TERRNO, "fcntl on file failed");
 			fail = 1;
 		}
 		child_put(&fl);
@@ -182,13 +182,14 @@
 
 	if (fl->l_start != start) {
 		tst_resm(TFAIL, "region starts in wrong place, should be"
-			 "%d is %"PRId64, start, (int64_t)fl->l_start);
+			 "%d is %" PRId64, start, (int64_t) fl->l_start);
 		fail = 1;
 	}
 
 	if (fl->l_len != len) {
-		tst_resm(TFAIL, "region length is wrong, should be %d is %"PRId64,
-			 len, (int64_t)fl->l_len);
+		tst_resm(TFAIL,
+			 "region length is wrong, should be %d is %" PRId64,
+			 len, (int64_t) fl->l_len);
 		fail = 1;
 	}
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
index 8d5b681..af24536 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl21.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
@@ -193,13 +193,14 @@
 
 	if (fl->l_start != start) {
 		tst_resm(TFAIL, "region starts in wrong place, should be"
-			 "%d is %"PRId64, start, (int64_t)fl->l_start);
+			 "%d is %" PRId64, start, (int64_t) fl->l_start);
 		fail = 1;
 	}
 
 	if (fl->l_len != len) {
-		tst_resm(TFAIL, "region length is wrong, should be %d is %"PRId64,
-			 len, (int64_t)fl->l_len);
+		tst_resm(TFAIL,
+			 "region length is wrong, should be %d is %" PRId64,
+			 len, (int64_t) fl->l_len);
 		fail = 1;
 	}
 
diff --git a/testcases/kernel/syscalls/fcntl/fcntl22.c b/testcases/kernel/syscalls/fcntl/fcntl22.c
index d606447..8a31e4d 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl22.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl22.c
@@ -195,8 +195,7 @@
 
 	/* lock file */
 	if (fcntl(file, F_SETLK, &fl) < 0) {
-		tst_resm(TFAIL|TERRNO, "fcntl on file %d failed",
-			 file);
+		tst_resm(TFAIL | TERRNO, "fcntl on file %d failed", file);
 	}
 
 }
diff --git a/testcases/kernel/syscalls/fdatasync/fdatasync01.c b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
index 749ec15..24f19fe 100644
--- a/testcases/kernel/syscalls/fdatasync/fdatasync01.c
+++ b/testcases/kernel/syscalls/fdatasync/fdatasync01.c
@@ -72,7 +72,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 static int fd;
 static char filename[30];
 static void setup(void);
@@ -86,8 +85,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -134,13 +132,13 @@
 	/* Initialize unique filename for each child process */
 	if (sprintf(filename, "fdatasync_%d", getpid()) <= 0) {
 		tst_brkm(TBROK, cleanup, "Failed to initialize filename");
-	 }
+	}
 	if ((fd = open(filename, O_CREAT | O_WRONLY, 0777)) == -1) {	//mode must be specified when O_CREATE is in the flag
 		tst_brkm(TBROK, cleanup, "open() failed");
-	 }
+	}
 	if ((write(fd, filename, strlen(filename) + 1)) == -1) {
 		tst_brkm(TBROK, cleanup, "write() failed");
-	 }
+	}
 }
 
 /*
@@ -160,4 +158,4 @@
 
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/fdatasync/fdatasync02.c b/testcases/kernel/syscalls/fdatasync/fdatasync02.c
index c4ee5ee..cf5c556 100644
--- a/testcases/kernel/syscalls/fdatasync/fdatasync02.c
+++ b/testcases/kernel/syscalls/fdatasync/fdatasync02.c
@@ -78,7 +78,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 #define EXP_RET_VAL	-1
 #define SPL_FILE	"/dev/null"
 
@@ -91,6 +90,7 @@
 
 char *TCID = "fdatasync02";
 static int exp_enos[] = { EBADF, EINVAL, 0 };
+
 static int testno;
 static int fd;
 
@@ -112,8 +112,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -210,4 +209,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/flock/flock01.c b/testcases/kernel/syscalls/flock/flock01.c
index 65b023f..9bf4db3 100644
--- a/testcases/kernel/syscalls/flock/flock01.c
+++ b/testcases/kernel/syscalls/flock/flock01.c
@@ -98,10 +98,9 @@
 	/* loop counter */
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/* global setup */
 	setup();
@@ -199,4 +198,4 @@
 	unlink(filename);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/flock/flock02.c b/testcases/kernel/syscalls/flock/flock02.c
index 6b66afb..4853200 100644
--- a/testcases/kernel/syscalls/flock/flock02.c
+++ b/testcases/kernel/syscalls/flock/flock02.c
@@ -107,35 +107,32 @@
 		TEST(flock(-1, LOCK_SH));
 
 		if (TEST_RETURN == -1 && TEST_ERRNO == EBADF)
-			tst_resm(TPASS,
-				 "flock failed as expected with EBADF");
+			tst_resm(TPASS, "flock failed as expected with EBADF");
 		else if (TEST_RETURN == 0)
 			tst_resm(TFAIL, "flock succeeded unexpectedly");
 		else
-			tst_resm(TFAIL|TTERRNO, "flock failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "flock failed unexpectedly");
 
 		/* Test system call with invalid argument */
 		TEST(flock(fd, LOCK_NB));
 
 		if (TEST_RETURN == -1 && TEST_ERRNO == EINVAL)
-			tst_resm(TPASS,
-				 "flock failed as expected with EINVAL");
+			tst_resm(TPASS, "flock failed as expected with EINVAL");
 		else if (TEST_RETURN == 0)
 			tst_resm(TFAIL, "flock succeeded unexpectedly");
 		else
-			tst_resm(TFAIL|TTERRNO, "flock failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "flock failed unexpectedly");
 
 		/* Test system call with invalid combination of arguments */
-		TEST(flock(fd, LOCK_SH|LOCK_EX));
+		TEST(flock(fd, LOCK_SH | LOCK_EX));
 
 		if (TEST_RETURN == -1 && TEST_ERRNO == EINVAL) {
-			tst_resm(TPASS,
-				 "flock failed as expected with EINVAL");
+			tst_resm(TPASS, "flock failed as expected with EINVAL");
 			continue;	/*next loop for MTKERNEL  */
 		} else if (TEST_RETURN == 0)
 			tst_resm(TFAIL, "flock succeeded unexpectedly");
 		else
-			tst_resm(TFAIL|TTERRNO, "flock failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "flock failed unexpectedly");
 
 	}
 
@@ -162,7 +159,7 @@
 
 	fd = creat(filename, 0666);
 	if (fd < 0)
-		tst_brkm(TFAIL|TERRNO, cleanup, "creat failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "creat failed");
 }
 
 void cleanup(void)
diff --git a/testcases/kernel/syscalls/flock/flock03.c b/testcases/kernel/syscalls/flock/flock03.c
index 9e0ce0a..b438f18 100644
--- a/testcases/kernel/syscalls/flock/flock03.c
+++ b/testcases/kernel/syscalls/flock/flock03.c
@@ -94,10 +94,9 @@
 	int status;
 	int fd;			/* for opening the temporary file */
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	maybe_run_child(&childfunc_uc, "ds", &fd_uc, filename);
 #endif
@@ -252,4 +251,4 @@
 	unlink(filename);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/flock/flock04.c b/testcases/kernel/syscalls/flock/flock04.c
index fefdbe0..d827717 100644
--- a/testcases/kernel/syscalls/flock/flock04.c
+++ b/testcases/kernel/syscalls/flock/flock04.c
@@ -108,7 +108,8 @@
 
 			pid = FORK_OR_VFORK();
 			if (pid == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fork failed");
 			if (pid == 0) {
 				fd1 = open(filename, O_RDONLY);
 				retval = flock(fd1, LOCK_SH | LOCK_NB);
@@ -121,18 +122,18 @@
 						 "flock() PASSED in acquiring shared lock on "
 						 "Share Locked file");
 				exit(0);
-			} else
-				if (wait(&status) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+			} else if (wait(&status) == -1)
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 
 			pid = FORK_OR_VFORK();
 			if (pid == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fork failed");
 
 			if (pid == 0) {
 				fd1 = open(filename, O_RDWR);
-				retval = flock(fd1, LOCK_EX|LOCK_NB);
+				retval = flock(fd1, LOCK_EX | LOCK_NB);
 				if (retval == -1) {
 					tst_resm(TPASS,
 						 "flock() failed to acquire exclusive lock on existing "
@@ -143,12 +144,11 @@
 						 "Share Locked file");
 				}
 				exit(0);
-			} else
-				if (wait(&status) == -1)
-					tst_resm(TBROK|TERRNO, "wait failed");
+			} else if (wait(&status) == -1)
+				tst_resm(TBROK | TERRNO, "wait failed");
 			TEST(flock(fd, LOCK_UN));
 		} else
-			tst_resm(TFAIL|TERRNO, "flock failed");
+			tst_resm(TFAIL | TERRNO, "flock failed");
 
 		close(fd);
 		close(fd1);
diff --git a/testcases/kernel/syscalls/flock/flock05.c b/testcases/kernel/syscalls/flock/flock05.c
index c7e5d43..945f9ab 100644
--- a/testcases/kernel/syscalls/flock/flock05.c
+++ b/testcases/kernel/syscalls/flock/flock05.c
@@ -96,10 +96,9 @@
 	char *msg;
 	pid_t pid;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/* global setup */
 	setup();
@@ -167,7 +166,7 @@
 	cleanup();
 	tst_exit();
 
- }
+}
 
 /*
  * setup()
@@ -223,4 +222,4 @@
 
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/flock/flock06.c b/testcases/kernel/syscalls/flock/flock06.c
index 44da1d6..67fb109 100644
--- a/testcases/kernel/syscalls/flock/flock06.c
+++ b/testcases/kernel/syscalls/flock/flock06.c
@@ -81,10 +81,9 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
@@ -194,4 +193,4 @@
 	unlink(filename);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/fork/fork05.c b/testcases/kernel/syscalls/fork/fork05.c
index e629b3c..66740c7 100644
--- a/testcases/kernel/syscalls/fork/fork05.c
+++ b/testcases/kernel/syscalls/fork/fork05.c
@@ -110,6 +110,7 @@
 char *TCID = "fork05";
 
 static char *environ_list[] = { "TERM", "NoTSetzWq", "TESTPROG" };
+
 #define NUMBER_OF_ENVIRON (sizeof(environ_list)/sizeof(char *))
 int TST_TOTAL = NUMBER_OF_ENVIRON;
 
diff --git a/testcases/kernel/syscalls/fork/fork07.c b/testcases/kernel/syscalls/fork/fork07.c
index c552d02..bfa23b2 100644
--- a/testcases/kernel/syscalls/fork/fork07.c
+++ b/testcases/kernel/syscalls/fork/fork07.c
@@ -210,8 +210,7 @@
 	TEST_CLEANUP;
 
 	/* collect our zombies */
-	while (wait(&waitstatus) > 0)
-		;
+	while (wait(&waitstatus) > 0) ;
 
 	unlink(fnamebuf);
 	tst_rmdir();
diff --git a/testcases/kernel/syscalls/fork/fork12.c b/testcases/kernel/syscalls/fork/fork12.c
index a8964d5..9a1d879 100644
--- a/testcases/kernel/syscalls/fork/fork12.c
+++ b/testcases/kernel/syscalls/fork/fork12.c
@@ -104,8 +104,7 @@
 		 */
 		sleep(3);
 		kill(0, SIGQUIT);
-		while (wait(&waitstatus) > 0)
-			;
+		while (wait(&waitstatus) > 0) ;
 
 	}
 
@@ -125,8 +124,7 @@
 
 	/* collect our kids */
 	kill(0, SIGQUIT);
-	while (wait(&waitstatus) > 0)
-		;
+	while (wait(&waitstatus) > 0) ;
 	TEST_CLEANUP;
 }
 
diff --git a/testcases/kernel/syscalls/fork/fork13.c b/testcases/kernel/syscalls/fork/fork13.c
index 563360d..b184c01 100644
--- a/testcases/kernel/syscalls/fork/fork13.c
+++ b/testcases/kernel/syscalls/fork/fork13.c
@@ -142,7 +142,7 @@
 
 	/* Backup pid_max value. */
 	SAFE_FILE_SCANF(NULL, PID_MAX_PATH, "%lu", &pid_max);
-	
+
 	SAFE_FILE_PRINTF(NULL, PID_MAX_PATH, "%d", PID_MAX);
 }
 
diff --git a/testcases/kernel/syscalls/fpathconf/fpathconf01.c b/testcases/kernel/syscalls/fpathconf/fpathconf01.c
index 5e7f18d..271243c 100644
--- a/testcases/kernel/syscalls/fpathconf/fpathconf01.c
+++ b/testcases/kernel/syscalls/fpathconf/fpathconf01.c
@@ -171,9 +171,9 @@
 
 			if (TEST_RETURN == -1 && args[i].defined) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO,
-				    "fpathconf(fd, %s) failed",
-				    args[i].define_tag);
+				tst_resm(TFAIL | TTERRNO,
+					 "fpathconf(fd, %s) failed",
+					 args[i].define_tag);
 			} else {
 				if (STD_FUNCTIONAL_TEST) {
 					tst_resm(TPASS,
@@ -211,7 +211,7 @@
 
 	if (fd != -1) {
 		if (close(fd) == -1)
-			tst_resm(TWARN|TERRNO, "close failed");
+			tst_resm(TWARN | TERRNO, "close failed");
 		fd = -1;
 	}
 
diff --git a/testcases/kernel/syscalls/fstat/fstat01.c b/testcases/kernel/syscalls/fstat/fstat01.c
index e39e3d3..c4b373e 100644
--- a/testcases/kernel/syscalls/fstat/fstat01.c
+++ b/testcases/kernel/syscalls/fstat/fstat01.c
@@ -150,13 +150,13 @@
 		TEST(fstat(fd, &statter));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fstat failed");
+			tst_resm(TFAIL | TTERRNO, "fstat failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "fstat returned %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 			}
 		}
 
@@ -177,9 +177,9 @@
 	tst_tmpdir();
 
 	sprintf(fname, "tfile_%d", getpid());
-	fd = open(fname, O_RDWR|O_CREAT, 0700);
+	fd = open(fname, O_RDWR | O_CREAT, 0700);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -187,7 +187,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close(%s) failed", fname);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fname);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fstat/fstat02.c b/testcases/kernel/syscalls/fstat/fstat02.c
index d66b452..2e0925d 100644
--- a/testcases/kernel/syscalls/fstat/fstat02.c
+++ b/testcases/kernel/syscalls/fstat/fstat02.c
@@ -113,7 +113,7 @@
 		TEST(fstat(fildes, &stat_buf));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "fstat(%s) failed", TESTFILE);
+			tst_resm(TFAIL | TTERRNO, "fstat(%s) failed", TESTFILE);
 			continue;
 		}
 		if (STD_FUNCTIONAL_TEST) {
@@ -122,10 +122,10 @@
 			    stat_buf.st_size != FILE_SIZE ||
 			    (stat_buf.st_mode & MASK) != FILE_MODE) {
 				tst_resm(TFAIL,
-				    "functionality of fstat incorrect");
+					 "functionality of fstat incorrect");
 			} else
 				tst_resm(TPASS,
-				    "functionality of fstat correct");
+					 "functionality of fstat correct");
 		} else
 			tst_resm(TPASS, "call succeeded");
 	}
@@ -145,25 +145,25 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid failed");
 
 	TEST_PAUSE;
 
 	tst_tmpdir();
 
-	fildes = open(TESTFILE, O_WRONLY|O_CREAT, FILE_MODE);
+	fildes = open(TESTFILE, O_WRONLY | O_CREAT, FILE_MODE);
 	if (fildes == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	/* Fill the test buffer with the known data */
-	memset(tst_buff, 'a', BUF_SIZE-1);
+	memset(tst_buff, 'a', BUF_SIZE - 1);
 
 	/* Write to the file 1k data from the buffer */
 	while (write_len < FILE_SIZE) {
 		if ((wbytes = write(fildes, tst_buff, sizeof(tst_buff))) <= 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 		else
 			write_len += wbytes;
 	}
@@ -178,7 +178,7 @@
 	TEST_CLEANUP;
 
 	if (close(fildes) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fstat/fstat03.c b/testcases/kernel/syscalls/fstat/fstat03.c
index 198c2d1..0cf0ec5 100644
--- a/testcases/kernel/syscalls/fstat/fstat03.c
+++ b/testcases/kernel/syscalls/fstat/fstat03.c
@@ -65,6 +65,7 @@
 char *TCID = "fstat03";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { EBADF, 0 };
+
 int fildes;			/* testfile descriptor */
 
 void setup();			/* Main setup function for the tests */
@@ -107,12 +108,15 @@
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if (TEST_ERRNO == EBADF) {
-				tst_resm(TPASS, "fstat() fails with expected error EBADF");
+				tst_resm(TPASS,
+					 "fstat() fails with expected error EBADF");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "fstat() did not fail with EBADF");
+				tst_resm(TFAIL | TTERRNO,
+					 "fstat() did not fail with EBADF");
 			}
 		} else {
-			tst_resm(TFAIL, "fstat() returned %ld, expected -1", TEST_RETURN);
+			tst_resm(TFAIL, "fstat() returned %ld, expected -1",
+				 TEST_RETURN);
 		}
 	}
 
@@ -146,11 +150,12 @@
 	/* Create a testfile under temporary directory */
 	fildes = open(TEST_FILE, O_RDWR | O_CREAT, 0666);
 	if (fildes == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed", TEST_FILE);
 
 	if (close(fildes) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TEST_FILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
+			 TEST_FILE);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/fstat/fstat04.c b/testcases/kernel/syscalls/fstat/fstat04.c
index c4f73bc..720a021 100644
--- a/testcases/kernel/syscalls/fstat/fstat04.c
+++ b/testcases/kernel/syscalls/fstat/fstat04.c
@@ -118,7 +118,7 @@
 		TEST(fstat(fildes, &stat_buf));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "fstat failed");
+			tst_resm(TFAIL | TTERRNO, "fstat failed");
 			continue;
 		}
 		/*
@@ -134,7 +134,8 @@
 			    stat_buf.st_gid != group_id ||
 			    stat_buf.st_size != FILE_SIZE ||
 			    (stat_buf.st_mode & MASK) != FILE_MODE) {
-				tst_resm(TFAIL, "fstat functionality incorrect");
+				tst_resm(TFAIL,
+					 "fstat functionality incorrect");
 			} else
 				tst_resm(TPASS, "fstat functionality correct");
 		} else
@@ -163,9 +164,9 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid failed");
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
@@ -175,13 +176,13 @@
 
 	fildes = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE);
 	if (fildes == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
-	memset(tst_buff, 'a', BUF_SIZE-1);
+	memset(tst_buff, 'a', BUF_SIZE - 1);
 
 	while (write_len < FILE_SIZE) {
 		if ((wbytes = write(fildes, tst_buff, sizeof(tst_buff))) <= 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 		else
 			write_len += wbytes;
 	}
@@ -196,7 +197,7 @@
 	TEST_CLEANUP;
 
 	if (close(fildes) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fstat/fstat05.c b/testcases/kernel/syscalls/fstat/fstat05.c
index 866d563..f820890 100644
--- a/testcases/kernel/syscalls/fstat/fstat05.c
+++ b/testcases/kernel/syscalls/fstat/fstat05.c
@@ -104,6 +104,7 @@
 char *TCID = "fstat05";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { EFAULT, 0 };
+
 int fildes;			/* testfile descriptor */
 
 void setup();			/* Main setup function for the tests */
@@ -167,9 +168,10 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 			if (TEST_ERRNO == EFAULT)
 				tst_resm(TPASS,
-				    "fstat failed with EFAULT as expected");
+					 "fstat failed with EFAULT as expected");
 			else
-				tst_resm(TFAIL|TTERRNO, "fstat failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "fstat failed unexpectedly");
 		} else
 			tst_resm(TFAIL, "fstat() returned %ld but we wanted -1",
 				 TEST_RETURN);
@@ -214,14 +216,15 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid(%d) failed", ltpuser->pw_uid);
+		tst_brkm(TBROK | TERRNO, NULL, "setuid(%d) failed",
+			 ltpuser->pw_uid);
 
 	tst_tmpdir();
 
 	/* Create a testfile under temporary directory */
 	fildes = open(TEST_FILE, O_RDWR | O_CREAT, 0666);
 	if (fildes == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed", TEST_FILE);
 
 	TEST_PAUSE;
@@ -245,7 +248,8 @@
 	TEST_CLEANUP;
 
 	if (close(fildes) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", TEST_FILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed",
+			 TEST_FILE);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
index a1f8f1b..54adf6f 100644
--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
@@ -116,8 +116,8 @@
 
 	if ((tst_kvercmp(2, 6, 16)) < 0)
 		tst_brkm(TCONF, NULL,
-		    "This test can only run on kernels that are 2.6.16 and "
-		    "higher");
+			 "This test can only run on kernels that are 2.6.16 and "
+			 "higher");
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -136,10 +136,10 @@
 			if (TEST_ERRNO == expected_errno[i]) {
 
 				if (STD_FUNCTIONAL_TEST)
-					tst_resm(TPASS|TTERRNO,
+					tst_resm(TPASS | TTERRNO,
 						 "fstatat failed as expected");
 			} else
-				tst_resm(TFAIL|TTERRNO, "fstatat failed");
+				tst_resm(TFAIL | TTERRNO, "fstatat failed");
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/fstatfs/fstatfs01.c b/testcases/kernel/syscalls/fstatfs/fstatfs01.c
index 4d15b33..47ab00f 100644
--- a/testcases/kernel/syscalls/fstatfs/fstatfs01.c
+++ b/testcases/kernel/syscalls/fstatfs/fstatfs01.c
@@ -154,7 +154,7 @@
 		TEST(FSTATFSCALL);
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fstatfs failed");
+			tst_resm(TFAIL | TTERRNO, "fstatfs failed");
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS,
@@ -180,7 +180,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -188,7 +188,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/fsync/fsync01.c b/testcases/kernel/syscalls/fsync/fsync01.c
index c6042c4..a8135aa 100644
--- a/testcases/kernel/syscalls/fsync/fsync01.c
+++ b/testcases/kernel/syscalls/fsync/fsync01.c
@@ -147,15 +147,13 @@
 		Tst_count = 0;
 
 		if (write(fd, &buf, strlen(buf)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 		TEST(fsync(fd));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "fsync failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "fsync returned %ld",
-				    TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "fsync failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "fsync returned %ld", TEST_RETURN);
 
 	}
 
@@ -174,8 +172,8 @@
 	tst_tmpdir();
 
 	sprintf(fname, "tfile_%d", getpid());
-	if ((fd = open(fname, O_RDWR|O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/fsync/fsync02.c b/testcases/kernel/syscalls/fsync/fsync02.c
index 78fc8dc..8fe8ba4 100644
--- a/testcases/kernel/syscalls/fsync/fsync02.c
+++ b/testcases/kernel/syscalls/fsync/fsync02.c
@@ -105,37 +105,39 @@
 			offset = i * ((BLOCKSIZE * max_block) / data_blocks);
 			offset -= BUFSIZ;
 			if ((offsetret = lseek(fd, offset, SEEK_SET)) != offset)
-				tst_brkm(TBROK|TERRNO, cleanup, "lseek failed: %ld, %ld", offsetret, offset);
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "lseek failed: %ld, %ld", offsetret,
+					 offset);
 			if ((ret = write(fd, pbuf, BUFSIZ)) != BUFSIZ)
 				tst_brkm(TBROK, cleanup, "write failed");
 		}
 		if (time(&time_start) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "getting start time failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "getting start time failed");
 
 		TEST(fsync(fd));
 
 		if (time(&time_end) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "getting end time failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "getting end time failed");
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "fsync failed");
+			tst_resm(TFAIL | TTERRNO, "fsync failed");
 			continue;
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (time_end < time_start)
 				tst_resm(TBROK,
-				    "timer broken end %ld < start %ld",
-				    time_end, time_start);
+					 "timer broken end %ld < start %ld",
+					 time_end, time_start);
 
 			if ((time_delta =
 			     difftime(time_end, time_start)) > TIME_LIMIT)
 				tst_resm(TFAIL,
-				    "fsync took too long: %lf seconds; "
-				    "max_block: %d; data_blocks: %d",
-				    time_delta, max_block, data_blocks);
+					 "fsync took too long: %lf seconds; "
+					 "max_block: %d; data_blocks: %d",
+					 time_delta, max_block, data_blocks);
 			else
 				tst_resm(TPASS, "fsync succeeded in an "
 					 "acceptable amount of time");
@@ -181,11 +183,11 @@
 
 #ifdef LARGEFILE
 	if ((fcntl(fd, F_SETFL, O_LARGEFILE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "fcntl(.., O_LARGEFILE) failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "fcntl(.., O_LARGEFILE) failed");
 
 	if (write(fd, pbuf, BUFSIZ) != BUFSIZ)
-		tst_brkm(TBROK|TERRNO, cleanup, "write(fd, pbuf, ..) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write(fd, pbuf, ..) failed");
 #endif
 }
 
@@ -194,7 +196,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate01.c b/testcases/kernel/syscalls/ftruncate/ftruncate01.c
index 12dceaf..984ead9 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate01.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate01.c
@@ -117,7 +117,8 @@
 		TEST(ftruncate(fildes, TRUNC_LEN));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "ftruncate(%s) failed", TESTFILE);
+			tst_resm(TFAIL | TTERRNO, "ftruncate(%s) failed",
+				 TESTFILE);
 			continue;
 		}
 		/*
@@ -142,9 +143,10 @@
 			 * truncate(2) on it.
 			 */
 			if (file_length != TRUNC_LEN) {
-				tst_resm(TFAIL, "%s: Incorrect file size %"PRId64", "
-					 "Expected %d", TESTFILE, (int64_t)file_length,
-					 TRUNC_LEN);
+				tst_resm(TFAIL,
+					 "%s: Incorrect file size %" PRId64 ", "
+					 "Expected %d", TESTFILE,
+					 (int64_t) file_length, TRUNC_LEN);
 			} else {
 				tst_resm(TPASS, "Functionality of ftruncate() "
 					 "on %s successful", TESTFILE);
@@ -186,14 +188,15 @@
 	/* open a file for reading/writing */
 	fildes = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE);
 	if (fildes == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) failed",
 			 TESTFILE, FILE_MODE);
 
 	/* Write to the file 1k data from the buffer */
 	while (c_total < FILE_SIZE) {
 		if ((c = write(fildes, tst_buff, sizeof(tst_buff))) <= 0) {
-			tst_brkm(TBROK|TERRNO, cleanup, "write(%s) failed", TESTFILE);
+			tst_brkm(TBROK | TERRNO, cleanup, "write(%s) failed",
+				 TESTFILE);
 		} else {
 			c_total += c;
 		}
@@ -216,7 +219,7 @@
 
 	/* Close the testfile after writing data into it */
 	if (close(fildes) == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "close(%s) failed", TESTFILE);
+		tst_brkm(TFAIL | TERRNO, NULL, "close(%s) failed", TESTFILE);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate02.c b/testcases/kernel/syscalls/ftruncate/ftruncate02.c
index 82c5763..9319794 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate02.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate02.c
@@ -123,8 +123,9 @@
 		TEST(ftruncate(fd, TRUNC_LEN1));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "ftruncate(%s) to size %d failed",
-				 TESTFILE, TRUNC_LEN1);
+			tst_resm(TFAIL | TTERRNO,
+				 "ftruncate(%s) to size %d failed", TESTFILE,
+				 TRUNC_LEN1);
 			continue;
 		}
 		/*
@@ -301,7 +302,7 @@
 
 	/* Close the testfile after writing data into it */
 	if (close(fd) == -1)
-		tst_brkm(TFAIL|TERRNO, NULL, "close(%s) failed", TESTFILE);
+		tst_brkm(TFAIL | TERRNO, NULL, "close(%s) failed", TESTFILE);
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate03.c b/testcases/kernel/syscalls/ftruncate/ftruncate03.c
index 3ac216b..1e6c261 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate03.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate03.c
@@ -110,13 +110,13 @@
 	errno = 0;
 	wjh_f = open(TESTFILE, O_RDWR | O_CREAT, 0644);
 	if (wjh_f == -1) {
-		tst_resm(TFAIL|TERRNO, "open(%s) failed", TESTFILE);
+		tst_resm(TFAIL | TERRNO, "open(%s) failed", TESTFILE);
 		tst_rmdir();
 		tst_exit();
 	}
 	while (count < strlen(str)) {
 		if ((count += write(wjh_f, str, strlen(str))) == -1) {
-			tst_resm(TFAIL|TERRNO, "write() failed");
+			tst_resm(TFAIL | TERRNO, "write() failed");
 			close(wjh_f);
 			tst_rmdir();
 			tst_exit();
@@ -135,7 +135,7 @@
 
 	wjh_f = open(TESTFILE, flag);
 	if (wjh_f == -1) {
-		tst_resm(TFAIL|TERRNO, "open(%s) failed", TESTFILE);
+		tst_resm(TFAIL | TERRNO, "open(%s) failed", TESTFILE);
 		tst_rmdir();
 		tst_exit();
 	}
@@ -150,7 +150,7 @@
 		if (wjh_ret == 0) {
 			tst_resm(TPASS, "Test Succeeded!");
 		} else {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "ftruncate(%s) should have succeeded, but didn't! ret="
 				 "%d (wanted 0)", TESTFILE, wjh_ret);
 		}
@@ -177,7 +177,7 @@
 	       wjh_f, wjh_ret, errno, strerror(errno));
 #endif
 	if (wjh_ret != -1 || errno != EBADF) {
-		tst_resm(TFAIL|TERRNO,
+		tst_resm(TFAIL | TERRNO,
 			 "ftruncate(invalid_fd)=%d (wanted -1 and EBADF)",
 			 wjh_ret);
 	} else {
diff --git a/testcases/kernel/syscalls/ftruncate/ftruncate04.c b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
index 1af3ea6..844aba0 100644
--- a/testcases/kernel/syscalls/ftruncate/ftruncate04.c
+++ b/testcases/kernel/syscalls/ftruncate/ftruncate04.c
@@ -188,8 +188,8 @@
 	}
 	if (sb.st_size != recstart + (RECLEN / 2)) {
 		tst_resm(TFAIL, "unexpected ftruncate failure case 4");
-		tst_resm(TFAIL, "expected size of %d, got size of %"PRId64,
-			 recstart + (RECLEN / 2), (int64_t)sb.st_size);
+		tst_resm(TFAIL, "expected size of %d, got size of %" PRId64,
+			 recstart + (RECLEN / 2), (int64_t) sb.st_size);
 		local_flag = FAILED;
 		cleanup();
 	}
@@ -212,8 +212,8 @@
 	}
 	if (sb.st_size != RECLEN) {
 		tst_resm(TFAIL, "unexpected ftruncate failure case 5");
-		tst_resm(TFAIL, "expected size of %d, got size of %"PRId64,
-			 RECLEN, (int64_t)sb.st_size);
+		tst_resm(TFAIL, "expected size of %d, got size of %" PRId64,
+			 RECLEN, (int64_t) sb.st_size);
 		local_flag = FAILED;
 		cleanup();
 	}
@@ -231,8 +231,8 @@
 	}
 	if (sb.st_size != (2 * len)) {
 		tst_resm(TFAIL, "unexpected ftruncate failure case 6");
-		tst_resm(TFAIL, "expected size of %d, got size of %"PRId64,
-			 (2 * len), (int64_t)sb.st_size);
+		tst_resm(TFAIL, "expected size of %d, got size of %" PRId64,
+			 (2 * len), (int64_t) sb.st_size);
 		local_flag = FAILED;
 		cleanup();
 	}
@@ -303,7 +303,7 @@
 	local_flag = PASSED;
 	tst_tmpdir();
 	if (statvfs(".", &fs) == -1) {
-		tst_resm(TFAIL|TERRNO, "statvfs failed");
+		tst_resm(TFAIL | TERRNO, "statvfs failed");
 		tst_rmdir();
 		tst_exit();
 	}
diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
index e499584..5a96f66 100644
--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
@@ -75,6 +75,7 @@
 int fds[TEST_CASES];
 char *filenames[TEST_CASES];
 int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
+
 struct timeval times[2];
 
 int myfutimesat(int dirfd, const char *filename, struct timeval *times)
@@ -88,13 +89,12 @@
 	char *msg;
 	int i;
 
-       /* Disable test if the version of the kernel is less than 2.6.16 */
-        if ((tst_kvercmp(2,6,16)) < 0)
-          {
-             tst_resm(TWARN, "This test can only run on kernels that are ");
-             tst_resm(TWARN, "2.6.16 and higher");
-             exit(0);
-          }
+	/* Disable test if the version of the kernel is less than 2.6.16 */
+	if ((tst_kvercmp(2, 6, 16)) < 0) {
+		tst_resm(TWARN, "This test can only run on kernels that are ");
+		tst_resm(TWARN, "2.6.16 and higher");
+		exit(0);
+	}
 
 	/***************************************************************
 	 * parse standard options
diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index 49341c7..e51639d 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -65,18 +65,18 @@
 #include "common_j_h.c"
 #include "numa_helper.h"
 
-char *TCID = "get_mempolicy01";  /* Test program identifier.*/
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "get_mempolicy01";	/* Test program identifier. */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 #if HAVE_NUMA_H && HAVE_NUMAIF_H && HAVE_MPOL_CONSTANTS
 
 #define MEM_LENGTH	(4 * 1024 * 1024)
 
-static int  testno;
+static int testno;
 
 enum test_type {
-	DEFAULT,	/* get default policy */
-	ADDR,		/* get policy of memory which include mapped address */
+	DEFAULT,		/* get default policy */
+	ADDR,			/* get policy of memory which include mapped address */
 	INVALID_POINTER,
 	INVALID_FLAGS,
 };
@@ -106,93 +106,93 @@
  *   EINVAL	     v (invalid parameters)
  */
 static struct test_case tcase[] = {
-	{ /* case00 */
-		.ttype	    = DEFAULT,
-		.policy	    = MPOL_DEFAULT,
-		.from_node  = NONE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case01 */
-		.ttype	    = DEFAULT,
-		.policy	    = MPOL_BIND,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case02 */
-		.ttype	    = DEFAULT,
-		.policy	    = MPOL_INTERLEAVE,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case03 */
-		.ttype	    = DEFAULT,
-		.policy	    = MPOL_PREFERRED,
-		.from_node  = NONE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case04 */
-		.ttype	    = DEFAULT,
-		.policy	    = MPOL_PREFERRED,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case05 */
-		.ttype	    = ADDR,
-		.policy	    = MPOL_DEFAULT,
-		.from_node  = NONE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case06 */
-		.ttype	    = ADDR,
-		.policy	    = MPOL_BIND,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case07 */
-		.ttype	    = ADDR,
-		.policy	    = MPOL_INTERLEAVE,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case08 */
-		.ttype	    = ADDR,
-		.policy	    = MPOL_PREFERRED,
-		.from_node  = NONE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case09 */
-		.ttype	    = ADDR,
-		.policy     = MPOL_PREFERRED,
-		.from_node  = SELF,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ /* case10 */
-		.ttype	    = INVALID_POINTER,
-		.policy	    = MPOL_DEFAULT,
-		.from_node  = NONE,
-		.ret	    = -1,
-		.err	    = EFAULT,
-	},
-	{ /* case11 */
-		.ttype	    = INVALID_FLAGS,
-		.policy	    = MPOL_DEFAULT,
-		.from_node  = NONE,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
+	{			/* case00 */
+	 .ttype = DEFAULT,
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case01 */
+	 .ttype = DEFAULT,
+	 .policy = MPOL_BIND,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case02 */
+	 .ttype = DEFAULT,
+	 .policy = MPOL_INTERLEAVE,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case03 */
+	 .ttype = DEFAULT,
+	 .policy = MPOL_PREFERRED,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case04 */
+	 .ttype = DEFAULT,
+	 .policy = MPOL_PREFERRED,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case05 */
+	 .ttype = ADDR,
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case06 */
+	 .ttype = ADDR,
+	 .policy = MPOL_BIND,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case07 */
+	 .ttype = ADDR,
+	 .policy = MPOL_INTERLEAVE,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case08 */
+	 .ttype = ADDR,
+	 .policy = MPOL_PREFERRED,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case09 */
+	 .ttype = ADDR,
+	 .policy = MPOL_PREFERRED,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case10 */
+	 .ttype = INVALID_POINTER,
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .ret = -1,
+	 .err = EFAULT,
+	 },
+	{			/* case11 */
+	 .ttype = INVALID_FLAGS,
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
 };
 
-static int  do_test(struct test_case *tc);
+static int do_test(struct test_case *tc);
 static void setup(void);
 static void cleanup(void);
 
@@ -210,8 +210,8 @@
 		for (i = 0; i < testno; i++) {
 			tst_resm(TINFO, "(case%02d) START", i);
 			ret = do_test(&tcase[i]);
-			tst_resm((ret == 0 ? TPASS : TFAIL|TERRNO),
-				  "(case%02d) END", i);
+			tst_resm((ret == 0 ? TPASS : TFAIL | TERRNO),
+				 "(case%02d) END", i);
 		}
 	}
 
@@ -236,7 +236,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 1, &test_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 	nodemask = malloc(sizeof(nodemask_t));
 	nodemask_zero(nodemask);
@@ -251,42 +251,40 @@
 		flags = 0;
 		p = NULL;
 		if (tc->from_node == NONE)
-			TEST(syscall(__NR_set_mempolicy, tc->policy,
-					    NULL, 0));
+			TEST(syscall(__NR_set_mempolicy, tc->policy, NULL, 0));
 		else
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 			TEST(syscall(__NR_set_mempolicy, tc->policy,
-					    nodemask, maxnode));
+				     nodemask, maxnode));
 #else
 			TEST(syscall(__NR_set_mempolicy, tc->policy,
-					    nodemask->maskp, nodemask->size));
+				     nodemask->maskp, nodemask->size));
 #endif
 		if (TEST_RETURN < 0) {
-			tst_resm(TBROK|TERRNO, "set_mempolicy");
+			tst_resm(TBROK | TERRNO, "set_mempolicy");
 			return -1;
 		}
 
 		break;
 	default:
 		flags = MPOL_F_ADDR;
-		p = mmap(NULL, len, PROT_READ|PROT_WRITE,
-			    MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+		p = mmap(NULL, len, PROT_READ | PROT_WRITE,
+			 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 		if (p == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 		if (tc->from_node == NONE)
 			TEST(syscall(__NR_mbind, p, len, tc->policy,
-					    NULL, 0, 0));
+				     NULL, 0, 0));
 		else
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 			TEST(syscall(__NR_mbind, p, len, tc->policy,
-					    nodemask, maxnode, 0));
+				     nodemask, maxnode, 0));
 #else
 			TEST(syscall(__NR_mbind, p, len, tc->policy,
-					    nodemask->maskp, nodemask->size,
-					    0));
+				     nodemask->maskp, nodemask->size, 0));
 #endif
 		if (TEST_RETURN < 0) {
-			tst_resm(TBROK|TERRNO, "mbind");
+			tst_resm(TBROK | TERRNO, "mbind");
 			return -1;
 		}
 
@@ -300,14 +298,14 @@
 		if (tc->ttype == INVALID_FLAGS)
 			flags = -1;
 	}
-	errno  = 0;
+	errno = 0;
 	cmp_ok = 1;
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 	TEST(ret = syscall(__NR_get_mempolicy, &policy, getnodemask,
-			    maxnode, p, flags));
+			   maxnode, p, flags));
 #else
 	TEST(ret = syscall(__NR_get_mempolicy, &policy, getnodemask->maskp,
-			    getnodemask->size, p, flags));
+			   getnodemask->size, p, flags));
 #endif
 	err = TEST_ERRNO;
 	if (ret < 0)
@@ -318,11 +316,13 @@
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 		nodemask_zero(nodemask);
 	cmp_ok = (tc->policy == policy && (tc->from_node == NONE ||
-			    nodemask_equal(nodemask, getnodemask)));
+					   nodemask_equal(nodemask,
+							  getnodemask)));
 #else
 		numa_bitmask_clearall(nodemask);
 	cmp_ok = (tc->policy == policy && (tc->from_node == NONE ||
-			    numa_bitmask_equal(nodemask, getnodemask)));
+					   numa_bitmask_equal(nodemask,
+							      getnodemask)));
 #endif
 TEST_END:
 	result = (err != tc->err) || !cmp_ok;
@@ -330,7 +330,6 @@
 	return result;
 }
 
-
 static void cleanup(void)
 {
 	TEST_CLEANUP;
diff --git a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
index f70cd0d..4300588 100644
--- a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
+++ b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
@@ -67,7 +67,6 @@
 	struct robust_list *list_op_pending;
 };
 
-
 int exp_enos[] = { ESRCH, EPERM, EFAULT, 0 };
 
 void setup(void);
@@ -106,14 +105,14 @@
 		if (TEST_RETURN == -1) {
 			if (TEST_ERRNO == EFAULT)
 				tst_resm(TPASS,
-				    "get_robust_list failed as expected with "
-				    "EFAULT");
+					 "get_robust_list failed as expected with "
+					 "EFAULT");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "get_robust_list failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "get_robust_list failed unexpectedly");
 		} else
 			tst_resm(TFAIL,
-			    "get_robust_list succeeded unexpectedly");
+				 "get_robust_list succeeded unexpectedly");
 
 		TEST(retval = syscall(__NR_get_robust_list, 0,
 				      (struct robust_list_head **)NULL,
@@ -122,14 +121,14 @@
 		if (TEST_RETURN) {
 			if (TEST_ERRNO == EFAULT)
 				tst_resm(TPASS,
-				    "get_robust_list failed as expected with "
-				    "EFAULT");
+					 "get_robust_list failed as expected with "
+					 "EFAULT");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "get_robust_list failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "get_robust_list failed unexpectedly");
 		} else
 			tst_resm(TFAIL,
-			    "get_robust_list succeeded unexpectedly");
+				 "get_robust_list succeeded unexpectedly");
 
 		/*
 		 * The get_robust_list function fails with ESRCH if it can't
@@ -143,14 +142,14 @@
 		if (TEST_RETURN == -1) {
 			if (TEST_ERRNO == ESRCH)
 				tst_resm(TPASS,
-				    "get_robust_list failed as expected with "
-				    "ESRCH");
+					 "get_robust_list failed as expected with "
+					 "ESRCH");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "get_robust_list failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "get_robust_list failed unexpectedly");
 		} else
 			tst_resm(TFAIL,
-			    "get_robust_list succeeded unexpectedly");
+				 "get_robust_list succeeded unexpectedly");
 
 		TEST(retval = syscall(__NR_get_robust_list, 0,
 				      (struct robust_list_head **)&head,
@@ -159,11 +158,11 @@
 		if (TEST_RETURN == 0)
 			tst_resm(TPASS, "get_robust_list succeeded");
 		else
-			tst_resm(TFAIL|TTERRNO,
+			tst_resm(TFAIL | TTERRNO,
 				 "get_robust_list failed unexpectedly");
 
 		if (setuid(1) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "setuid(1) failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "setuid(1) failed");
 
 		TEST(retval = syscall(__NR_get_robust_list, 1,
 				      (struct robust_list_head *)&head,
@@ -172,14 +171,14 @@
 		if (TEST_RETURN == -1) {
 			if (TEST_ERRNO == EPERM)
 				tst_resm(TPASS,
-				    "get_robust_list failed as expected with "
-				    "EPERM");
+					 "get_robust_list failed as expected with "
+					 "EPERM");
 			else
-				tst_resm(TFAIL|TERRNO,
-				    "get_robust_list failed unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "get_robust_list failed unexpectedly");
 		} else
 			tst_resm(TFAIL,
-			    "get_robust_list succeeded unexpectedly");
+				 "get_robust_list succeeded unexpectedly");
 	}
 
 	cleanup();
diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index fa62dee..866ce46 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -74,7 +74,7 @@
 		TEST(getcontext(&ptr));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getcontext failed");
+			tst_resm(TFAIL | TTERRNO, "getcontext failed");
 		else if (TEST_RETURN >= 0)
 			tst_resm(TPASS, "getcontext passed");
 
diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
index 87e8f3d..2536a35 100644
--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
@@ -204,7 +204,6 @@
 		tst_resm(TFAIL, "CPU_ALLOC:errno:%d", errno);
 		tst_exit();
 	}
-
 #if __GLIBC_PREREQ(2, 7)
 	size = CPU_ALLOC_SIZE(nrcpus);
 	CPU_ZERO_S(size, set);
@@ -221,7 +220,8 @@
 		}
 #else
 		if (errno == EINVAL)
-			tst_resm(TFAIL, "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
+			tst_resm(TFAIL,
+				 "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
 		else
 #endif
 			tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno);
@@ -274,10 +274,10 @@
 
 	directory_parent = opendir("/sys/devices/system/node");
 	if (!directory_parent) {
-                tst_resm(TCONF,
-                    "/sys not mounted or not a numa system. Assuming one node");
-                tst_resm(TCONF,
-                    "Error opening: /sys/devices/system/node :%s",
+		tst_resm(TCONF,
+			 "/sys not mounted or not a numa system. Assuming one node");
+		tst_resm(TCONF,
+			 "Error opening: /sys/devices/system/node :%s",
 			 strerror(errno));
 		return 0;	//By Default assume it to belong to node Zero
 	} else {
diff --git a/testcases/kernel/syscalls/getcwd/getcwd02.c b/testcases/kernel/syscalls/getcwd/getcwd02.c
index 4b9e935..a1e7900 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd02.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd02.c
@@ -104,11 +104,11 @@
 		if ((fin = popen(pwd, "r")) == NULL) {
 			tst_resm(TINFO, "%s: can't run %s", TCID, pwd);
 			tst_brkm(TBROK, cleanup, "%s FAILED", TCID);
-		 }
+		}
 		while (fgets(pwd_buf, sizeof(pwd_buf), fin) != NULL) {
 			if ((cp = strchr(pwd_buf, '\n')) == NULL) {
 				tst_brkm(TBROK, cleanup, "pwd output too long");
-			 }
+			}
 			*cp = 0;
 			cp_cur = pwd_buf;
 		}
diff --git a/testcases/kernel/syscalls/getcwd/getcwd03.c b/testcases/kernel/syscalls/getcwd/getcwd03.c
index 0e1c457..9203244 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd03.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd03.c
@@ -102,10 +102,10 @@
 		sprintf(dir1, "getcwd1.%d", getpid());
 		if (mkdir(dir1, 00755) < 0) {
 			tst_brkm(TBROK, cleanup, "mkdir(2) failed");
-		 }
+		}
 		if (chdir(dir1) != 0) {
 			tst_brkm(TBROK, cleanup, "chdir(2) failed");
-		 }
+		}
 
 		pwd1 = getpwd();
 		if (getcwd(cwd1, sizeof cwd1) == NULL) {
@@ -117,7 +117,7 @@
 			tst_brkm(TFAIL, cleanup, "getcwd() returned unexpected "
 				 "working directory: expected: %s, got: %s\n",
 				 pwd1, cwd1);
-		 }
+		}
 
 		tst_resm(TINFO, "getcwd(2) succeeded in returning correct path "
 			 "for dir1");
@@ -133,12 +133,12 @@
 		if (symlink(dir1, dir2) < 0) {
 			tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d",
 				 errno);
-		 }
+		}
 
 		if (chdir(dir2) != 0) {
 			tst_brkm(TBROK, cleanup, "chdir(2) failed: errno: %d",
 				 errno);
-		 }
+		}
 
 		pwd2 = getpwd();
 		if (getcwd(cwd2, sizeof cwd2) == NULL) {
@@ -152,7 +152,7 @@
 		    ((n = readlink(dir2, link2, sizeof(link2))) < 0)) {
 			tst_brkm(TBROK, cleanup, "readlink(2) failed: errno:%d",
 				 errno);
-		 }
+		}
 
 		/*
 		 * Finally compare the pwd, cwd, link informations:
@@ -236,11 +236,11 @@
 	if ((fin = popen(pwd, "r")) == NULL) {
 		tst_resm(TINFO, "%s: can't run %s", TCID, pwd);
 		tst_brkm(TBROK, cleanup, "%s FAILED", TCID);
-	 }
+	}
 	while (fgets(buf, BUFSIZ, fin) != NULL) {
 		if ((cp = strchr(buf, '\n')) == NULL) {
 			tst_brkm(TBROK, cleanup, "pwd output too long");
-		 }
+		}
 		*cp = 0;
 		cp_cur = buf;
 	}
diff --git a/testcases/kernel/syscalls/getdents/getdents01.c b/testcases/kernel/syscalls/getdents/getdents01.c
index 7ea4f6c..76428c6 100644
--- a/testcases/kernel/syscalls/getdents/getdents01.c
+++ b/testcases/kernel/syscalls/getdents/getdents01.c
@@ -111,12 +111,14 @@
 
 			TEST_ERROR_LOG(errno);
 
-			tst_resm(TFAIL|TERRNO, "getdents failed unexpectedly");
+			tst_resm(TFAIL | TERRNO,
+				 "getdents failed unexpectedly");
 			continue;
 		}
 
 		if (rval == 0) {
-			tst_resm(TFAIL, "getdents failed - returned end of directory");
+			tst_resm(TFAIL,
+				 "getdents failed - returned end of directory");
 			continue;
 		}
 
diff --git a/testcases/kernel/syscalls/getdents/getdents02.c b/testcases/kernel/syscalls/getdents/getdents02.c
index 4d19b0d..d792a55 100644
--- a/testcases/kernel/syscalls/getdents/getdents02.c
+++ b/testcases/kernel/syscalls/getdents/getdents02.c
@@ -111,11 +111,11 @@
 			switch (errno) {
 			case EBADF:
 				tst_resm(TPASS,
-				    "failed as expected with EBADF");
+					 "failed as expected with EBADF");
 				break;
 			default:
-				tst_resm(TFAIL|TERRNO,
-				    "getdents failed unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "getdents failed unexpectedly");
 				break;
 			}
 		} else
diff --git a/testcases/kernel/syscalls/getdents/getdents03.c b/testcases/kernel/syscalls/getdents/getdents03.c
index 3f89fbe..40d84c9 100644
--- a/testcases/kernel/syscalls/getdents/getdents03.c
+++ b/testcases/kernel/syscalls/getdents/getdents03.c
@@ -90,7 +90,6 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-
 		if ((dir_name = getcwd(dir_name, size)) == NULL)
 			tst_brkm(TBROK, cleanup, "Can not get current "
 				 "directory name");
@@ -117,11 +116,11 @@
 			switch (errno) {
 			case EINVAL:
 				tst_resm(TPASS,
-				    "getdents failed with EINVAL as expected");
+					 "getdents failed with EINVAL as expected");
 				break;
 			default:
-				tst_resm(TFAIL|TERRNO,
-				    "getdents call failed unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "getdents call failed unexpectedly");
 				break;
 			}
 		} else
diff --git a/testcases/kernel/syscalls/getdents/getdents04.c b/testcases/kernel/syscalls/getdents/getdents04.c
index fd220b7..0de17f2 100644
--- a/testcases/kernel/syscalls/getdents/getdents04.c
+++ b/testcases/kernel/syscalls/getdents/getdents04.c
@@ -109,7 +109,8 @@
 			tst_brkm(TBROK, cleanup, "sprintf failed");
 
 		if ((fd = open(newfile, O_CREAT | O_RDWR, 0777)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "open of file failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "open of file failed");
 
 		/* set up some space for the stat buffer */
 		if ((sbuf = malloc(sizeof(struct stat))) == NULL)
@@ -135,11 +136,11 @@
 			switch (errno) {
 			case ENOTDIR:
 				tst_resm(TPASS,
-				    "getdents failed as expected with ENOTDIR");
+					 "getdents failed as expected with ENOTDIR");
 				break;
 			default:
-				tst_resm(TFAIL|TERRNO,
-				    "getdents failed unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "getdents failed unexpectedly");
 				break;
 			}
 		} else
diff --git a/testcases/kernel/syscalls/getegid/getegid01.c b/testcases/kernel/syscalls/getegid/getegid01.c
index 4df5d16..dcf3c89 100644
--- a/testcases/kernel/syscalls/getegid/getegid01.c
+++ b/testcases/kernel/syscalls/getegid/getegid01.c
@@ -144,7 +144,7 @@
 		TEST(GETEGID());
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "getegid failed");
+			tst_resm(TFAIL | TTERRNO, "getegid failed");
 			continue;	/* next loop for MTKERNEL */
 		}
 
diff --git a/testcases/kernel/syscalls/getegid/getegid02.c b/testcases/kernel/syscalls/getegid/getegid02.c
index ba599bf..a6402f6 100644
--- a/testcases/kernel/syscalls/getegid/getegid02.c
+++ b/testcases/kernel/syscalls/getegid/getegid02.c
@@ -116,7 +116,8 @@
 						 " %ld unexpected - expected %d",
 						 TEST_RETURN, pwent->pw_gid);
 				} else {
-					tst_resm(TPASS, "effective group id %ld "
+					tst_resm(TPASS,
+						 "effective group id %ld "
 						 "is correct", TEST_RETURN);
 				}
 			}
diff --git a/testcases/kernel/syscalls/geteuid/geteuid01.c b/testcases/kernel/syscalls/geteuid/geteuid01.c
index 836449b..57103d7 100644
--- a/testcases/kernel/syscalls/geteuid/geteuid01.c
+++ b/testcases/kernel/syscalls/geteuid/geteuid01.c
@@ -120,7 +120,7 @@
 void setup();
 void cleanup();
 
-TCID_DEFINE(geteuid01);	        /* Test program identifier.    */
+TCID_DEFINE(geteuid01);		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0 };		/* must be a 0 terminated list */
@@ -144,7 +144,7 @@
 		TEST(GETEUID());
 
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO, "geteuid failed");
+			tst_resm(TFAIL | TTERRNO, "geteuid failed");
 			continue;	/* next loop for MTKERNEL */
 		}
 
diff --git a/testcases/kernel/syscalls/getgid/getgid01.c b/testcases/kernel/syscalls/getgid/getgid01.c
index d539fa6..f801974 100644
--- a/testcases/kernel/syscalls/getgid/getgid01.c
+++ b/testcases/kernel/syscalls/getgid/getgid01.c
@@ -149,7 +149,7 @@
 		else {
 			if (STD_FUNCTIONAL_TEST)
 				tst_resm(TPASS, "getgid returned %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/getgid/getgid03.c b/testcases/kernel/syscalls/getgid/getgid03.c
index 6c46d14..cf5fe3a 100644
--- a/testcases/kernel/syscalls/getgid/getgid03.c
+++ b/testcases/kernel/syscalls/getgid/getgid03.c
@@ -82,7 +82,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
diff --git a/testcases/kernel/syscalls/getgroups/getgroups01.c b/testcases/kernel/syscalls/getgroups/getgroups01.c
index 6b82769..ab80fa1 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups01.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups01.c
@@ -121,10 +121,10 @@
 		else if (STD_FUNCTIONAL_TEST) {
 			if (errno == EINVAL)
 				tst_resm(TPASS,
-				    "getgroups failed as expected with EINVAL");
+					 "getgroups failed as expected with EINVAL");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "getgroups didn't fail as expected with EINVAL");
+				tst_resm(TFAIL | TTERRNO,
+					 "getgroups didn't fail as expected with EINVAL");
 		}
 
 		/*
@@ -138,15 +138,15 @@
 
 		TEST(getgroups(0, gidset));
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getgroups failed");
+			tst_resm(TFAIL | TTERRNO, "getgroups failed");
 		else if (STD_FUNCTIONAL_TEST) {
 			if (memcmp(cmpset, gidset, NGROUPS) != 0)
 				tst_resm(TFAIL,
-				    "getgroups modified the gidset array");
+					 "getgroups modified the gidset array");
 			else
 				tst_resm(TPASS,
-				    "getgroups did not modify the gidset "
-				    "array");
+					 "getgroups did not modify the gidset "
+					 "array");
 		}
 
 		/*
@@ -156,31 +156,31 @@
 
 		if (TEST_RETURN <= 1)
 			tst_resm(TCONF,
-				"getgroups returned %ld; unable to test that using ngrps >=1 but less than number of grps", TEST_RETURN);
+				 "getgroups returned %ld; unable to test that using ngrps >=1 but less than number of grps",
+				 TEST_RETURN);
 		else {
 			TEST(getgroups(TEST_RETURN - 1, gidset));
 			if (TEST_RETURN == -1) {
 				if (STD_FUNCTIONAL_TEST) {
 					if (errno == EINVAL)
 						tst_resm(TPASS,
-						    "getgroups failed as "
-						    "expected with EINVAL");
+							 "getgroups failed as "
+							 "expected with EINVAL");
 					else
-						tst_resm(TFAIL|TERRNO,
-						    "getgroups didn't fail "
-						    "with EINVAL");
+						tst_resm(TFAIL | TERRNO,
+							 "getgroups didn't fail "
+							 "with EINVAL");
 				}
 			} else
 				tst_resm(TFAIL,
-				    "getgroups succeeded unexpectedly with %ld",
-				    TEST_RETURN);
+					 "getgroups succeeded unexpectedly with %ld",
+					 TEST_RETURN);
 		}
 
-
 		TEST(getgroups(NGROUPS, gidset));
 		if ((entries = TEST_RETURN) == -1)
-			tst_resm(TFAIL|TTERRNO,
-			    "getgroups failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO,
+				 "getgroups failed unexpectedly");
 		else if (STD_FUNCTIONAL_TEST) {
 
 			group = getgid();
@@ -188,18 +188,18 @@
 			for (i = 0; i < entries; i++)
 				if (gidset[i] == group) {
 					tst_resm(TPASS,
-					    "getgroups(NGROUPS,gidset) "
-					    "returned %d contains gid %d "
-					    "(from getgid)",
-					    entries, group);
+						 "getgroups(NGROUPS,gidset) "
+						 "returned %d contains gid %d "
+						 "(from getgid)",
+						 entries, group);
 					break;
 				}
 
 			if (i == entries)
 				tst_resm(TFAIL,
-				    "getgroups(NGROUPS,gidset) ret %d, does "
-				    "not contain gid %d (from getgid)",
-				    entries, group);
+					 "getgroups(NGROUPS,gidset) ret %d, does "
+					 "not contain gid %d (from getgid)",
+					 entries, group);
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/getgroups/getgroups02.c b/testcases/kernel/syscalls/getgroups/getgroups02.c
index 3fdf553..1882724 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups02.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups02.c
@@ -150,11 +150,9 @@
 		TEST(getgroups(GID_ARRAY_SIZE, gidset));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getgroups failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "getgroups returned %ld",
-					 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "getgroups failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "getgroups returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/getgroups/getgroups03.c b/testcases/kernel/syscalls/getgroups/getgroups03.c
index ae3cb1e..cce1e6f 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups03.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups03.c
@@ -112,14 +112,14 @@
 		TEST(getgroups(gidsetsize, groups_list));
 
 		if ((ret_val = TEST_RETURN) == -1) {
-			tst_resm(TFAIL|TTERRNO, "getgroups failed");
+			tst_resm(TFAIL | TTERRNO, "getgroups failed");
 			continue;
 		}
 		if (STD_FUNCTIONAL_TEST) {
 			fflag = verify_groups(ret_val);
 			if (fflag)
 				tst_resm(TPASS,
-				    "getgroups functionality correct");
+					 "getgroups functionality correct");
 		} else
 			tst_resm(TPASS, "call succeeded");
 	}
@@ -150,7 +150,7 @@
 	 * getgroups()
 	 */
 	if (setgroups(ngroups, groups) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "setgroups failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "setgroups failed");
 
 }
 
@@ -279,13 +279,12 @@
 	 * Now, if ngroups matches ret_val, as above comparisons of the array
 	 * are successful, this implies that the array contents match.
 	 */
-	if (egid_flag == 0) 	/* If egid is not returned */
+	if (egid_flag == 0)	/* If egid is not returned */
 		ngroups--;
 	if (ngroups != ret_val) {
 		tst_resm(TFAIL,
 			 "getgroups(2) returned incorrect no. of gids %d "
-			 "(expected %d)",
-			 ret_val, ngroups);
+			 "(expected %d)", ret_val, ngroups);
 		fflag = 0;
 	}
 
diff --git a/testcases/kernel/syscalls/getgroups/getgroups04.c b/testcases/kernel/syscalls/getgroups/getgroups04.c
index ff4006a..e440c52 100644
--- a/testcases/kernel/syscalls/getgroups/getgroups04.c
+++ b/testcases/kernel/syscalls/getgroups/getgroups04.c
@@ -92,8 +92,8 @@
 	int exp_errno;
 	int (*setupfunc) ();
 } test_cases[] = {
-	{ -1, 1, "Size is < no. suppl. gids", EINVAL },
-};
+	{
+-1, 1, "Size is < no. suppl. gids", EINVAL},};
 
 int main(int ac, char **av)
 {
@@ -122,17 +122,18 @@
 
 			if (TEST_RETURN == -1) {
 				if (TEST_ERRNO == test_cases[i].exp_errno)
-					tst_resm(TPASS|TTERRNO,
-					    "getgroups failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "getgroups failed as expected");
 				else
-					tst_resm(TFAIL|TTERRNO,
-					    "getgroups failed unexpectedly; "
-					    "expected: %d - %s",
-					    test_cases[i].exp_errno,
-					    strerror(test_cases[i].exp_errno));
+					tst_resm(TFAIL | TTERRNO,
+						 "getgroups failed unexpectedly; "
+						 "expected: %d - %s",
+						 test_cases[i].exp_errno,
+						 strerror(test_cases[i].
+							  exp_errno));
 			} else
 				tst_resm(TFAIL,
-				    "getgroups succeeded unexpectedly");
+					 "getgroups succeeded unexpectedly");
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/gethostid/gethostid01.c b/testcases/kernel/syscalls/gethostid/gethostid01.c
index de20b7e..4b9cfee 100644
--- a/testcases/kernel/syscalls/gethostid/gethostid01.c
+++ b/testcases/kernel/syscalls/gethostid/gethostid01.c
@@ -164,7 +164,7 @@
 		TEST(gethostid());
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "gethostid failed");
+			tst_resm(TFAIL | TTERRNO, "gethostid failed");
 			continue;	/* next loop for MTKERNEL */
 		}
 		sprintf(hostid, "%08lx", TEST_RETURN);
@@ -186,8 +186,8 @@
 
 			if (strcmp(name, hostid) == 0) {
 				tst_resm(TPASS,
-				    "Hostid command and gethostid both report "
-				    "hostid is %s", hostid);
+					 "Hostid command and gethostid both report "
+					 "hostid is %s", hostid);
 			} else {
 
 				/*
@@ -232,14 +232,12 @@
 					tst_resm(TPASS,
 						 "Hostid command reports "
 						 "hostid is %s, and gethostid "
-						 "reports %s",
-						 name2, hostid3);
+						 "reports %s", name2, hostid3);
 				} else
 					tst_resm(TFAIL,
 						 "Hostid command reports "
 						 "hostid is %s, but gethostid "
-						 "reports %s",
-						 name2, hostid2);
+						 "reports %s", name2, hostid2);
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/gethostname/gethostname01.c b/testcases/kernel/syscalls/gethostname/gethostname01.c
index 018762b..e23c025 100644
--- a/testcases/kernel/syscalls/gethostname/gethostname01.c
+++ b/testcases/kernel/syscalls/gethostname/gethostname01.c
@@ -143,13 +143,13 @@
 		TEST(gethostname(hname, sizeof(hname)));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "gethostname failed");
+			tst_resm(TFAIL | TTERRNO, "gethostname failed");
 			continue;	/* next loop for MTKERNEL */
 		}
 
 		if (STD_FUNCTIONAL_TEST)
 			tst_resm(TPASS, "gethostname returned %ld",
-			    TEST_RETURN);
+				 TEST_RETURN);
 	}
 
 	cleanup();
diff --git a/testcases/kernel/syscalls/getpagesize/getpagesize01.c b/testcases/kernel/syscalls/getpagesize/getpagesize01.c
index a213e44..acbca4f 100644
--- a/testcases/kernel/syscalls/getpagesize/getpagesize01.c
+++ b/testcases/kernel/syscalls/getpagesize/getpagesize01.c
@@ -75,7 +75,7 @@
 		TEST(getpagesize());
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "getpagesize failed");
+			tst_resm(TFAIL | TTERRNO, "getpagesize failed");
 			continue;	/* next loop for MTKERNEL */
 		}
 
diff --git a/testcases/kernel/syscalls/getpeername/getpeername01.c b/testcases/kernel/syscalls/getpeername/getpeername01.c
index 1384bbb..0c461d8 100644
--- a/testcases/kernel/syscalls/getpeername/getpeername01.c
+++ b/testcases/kernel/syscalls/getpeername/getpeername01.c
@@ -105,7 +105,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, ENOTCONN, EFAULT, 0 };
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
@@ -176,7 +175,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 
 }
 
@@ -189,12 +188,14 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed for getpeername "
-			 " test %d", testno);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "socket setup failed for getpeername " " test %d",
+			 testno);
 	}
 	if (bind(s, (struct sockaddr *)&sin0, sizeof(sin0)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "socket bind failed for getpeername "
-			 "test %d", testno);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "socket bind failed for getpeername " "test %d",
+			 testno);
 	}
 	sinlen = sizeof(fsin1);
 }
@@ -211,8 +212,9 @@
 
 	if (socketpair(tdat[testno].domain, tdat[testno].type,
 		       tdat[testno].proto, sv) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "socketpair failed for getpeername "
-			 "test %d", testno);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "socketpair failed for getpeername " "test %d",
+			 testno);
 	}
 	s = sv[0];
 	s2 = sv[1];
diff --git a/testcases/kernel/syscalls/getpgid/getpgid01.c b/testcases/kernel/syscalls/getpgid/getpgid01.c
index 7394c30..f9c1fb3 100644
--- a/testcases/kernel/syscalls/getpgid/getpgid01.c
+++ b/testcases/kernel/syscalls/getpgid/getpgid01.c
@@ -90,7 +90,7 @@
 		tst_resm(TINFO, "Enter block 1");
 		fail = 0;
 		if ((pgid_0 = getpgid(0)) == -1) {
-			tst_resm(TFAIL|TERRNO, "getpgid(0) failed");
+			tst_resm(TFAIL | TERRNO, "getpgid(0) failed");
 			fail = 1;
 		}
 
@@ -106,7 +106,7 @@
 
 		my_pid = getpid();
 		if ((pgid_1 = getpgid(my_pid)) == -1)
-			tst_resm(TFAIL|TERRNO, "getpgid(%d) failed", my_pid);
+			tst_resm(TFAIL | TERRNO, "getpgid(%d) failed", my_pid);
 
 		if (pgid_0 != pgid_1) {
 			tst_resm(TFAIL, "getpgid(my_pid=%d) != getpgid(0) "
@@ -127,11 +127,11 @@
 
 		my_ppid = getppid();
 		if ((pgid_1 = getpgid(my_ppid)) == -1)
-			tst_resm(TFAIL|TERRNO, "getpgid(%d) failed", my_ppid);
+			tst_resm(TFAIL | TERRNO, "getpgid(%d) failed", my_ppid);
 
 		if (pgid_0 != pgid_1) {
 			tst_resm(TFAIL, "getpgid(%d) != getpgid(0) [%d != %d]",
-			    my_ppid, pgid_1, pgid_0);
+				 my_ppid, pgid_1, pgid_0);
 			fail = 1;
 		}
 
@@ -149,11 +149,11 @@
 		fail = 0;
 
 		if ((pgid_1 = getpgid(pgid_0)) < 0)
-			tst_resm(TFAIL|TERRNO, "getpgid(%d) failed", pgid_0);
+			tst_resm(TFAIL | TERRNO, "getpgid(%d) failed", pgid_0);
 
 		if (pgid_0 != pgid_1) {
 			tst_resm(TFAIL, "getpgid(%d) != getpgid(0) [%d != %d]",
-			    pgid_0, pgid_1, pgid_0);
+				 pgid_0, pgid_1, pgid_0);
 			fail = 1;
 		}
 
@@ -168,7 +168,7 @@
 		fail = 0;
 
 		if (getpgid(1) < 0) {
-			tst_resm(TFAIL|TERRNO, "getpgid(1) failed");
+			tst_resm(TFAIL | TERRNO, "getpgid(1) failed");
 			fail = 1;
 		}
 
diff --git a/testcases/kernel/syscalls/getpgrp/getpgrp01.c b/testcases/kernel/syscalls/getpgrp/getpgrp01.c
index 2fcdb96..e63e5e7 100644
--- a/testcases/kernel/syscalls/getpgrp/getpgrp01.c
+++ b/testcases/kernel/syscalls/getpgrp/getpgrp01.c
@@ -144,11 +144,9 @@
 		TEST(getpgrp());
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getpgrp failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "getpgrp returned %ld",
-				    TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "getpgrp failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "getpgrp returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/getpid/getpid01.c b/testcases/kernel/syscalls/getpid/getpid01.c
index 05f393c..628a8f3 100644
--- a/testcases/kernel/syscalls/getpid/getpid01.c
+++ b/testcases/kernel/syscalls/getpid/getpid01.c
@@ -142,11 +142,9 @@
 		TEST(getpid());
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getpid failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "getpid returned %ld",
-				    TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "getpid failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "getpid returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/getpid/getpid02.c b/testcases/kernel/syscalls/getpid/getpid02.c
index e1e170a..85fd2bd 100644
--- a/testcases/kernel/syscalls/getpid/getpid02.c
+++ b/testcases/kernel/syscalls/getpid/getpid02.c
@@ -103,7 +103,7 @@
 
 		if (STD_FUNCTIONAL_TEST) {
 			if ((pid = FORK_OR_VFORK()) == -1)
-				tst_resm(TFAIL|TERRNO, "fork failed");
+				tst_resm(TFAIL | TERRNO, "fork failed");
 			else if (pid == 0) {
 				pproc_id = getppid();
 
@@ -112,15 +112,15 @@
 				exit(0);
 			} else {
 				if (wait(&status) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				if (!WIFEXITED(status) ||
 				    WEXITSTATUS(status) != 0)
 					tst_resm(TFAIL, "getpid() returned "
 						 "invalid pid %d", proc_id);
 				else
 					tst_resm(TPASS,
-					    "getpid functionality is correct");
+						 "getpid functionality is correct");
 			}
 		} else
 			tst_resm(TPASS, "call succeeded");
diff --git a/testcases/kernel/syscalls/getppid/getppid01.c b/testcases/kernel/syscalls/getppid/getppid01.c
index 8c9760a..8397545 100644
--- a/testcases/kernel/syscalls/getppid/getppid01.c
+++ b/testcases/kernel/syscalls/getppid/getppid01.c
@@ -144,11 +144,9 @@
 		TEST(getppid());
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getppid failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "getppid returned %ld",
-					 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "getppid failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "getppid returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/getppid/getppid02.c b/testcases/kernel/syscalls/getppid/getppid02.c
index 0a660d9..8b81b0a 100644
--- a/testcases/kernel/syscalls/getppid/getppid02.c
+++ b/testcases/kernel/syscalls/getppid/getppid02.c
@@ -79,19 +79,20 @@
 			if (STD_FUNCTIONAL_TEST) {
 				if (TEST_RETURN != ppid)
 					errx(1, "getppid failed (%ld != %d)",
-					    TEST_RETURN, ppid);
+					     TEST_RETURN, ppid);
 				else
 					printf("return value and parent's pid "
-					    "value match\n");
+					       "value match\n");
 			} else
 				tst_resm(TPASS, "call succeeded");
 			exit(0);
 		} else {
 			if (wait(&status) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "wait failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "wait failed");
 			if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 				tst_resm(TFAIL,
-				    "getppid functionality incorrect");
+					 "getppid functionality incorrect");
 		}
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit01.c b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
index a918f02..9bc927d 100644
--- a/testcases/kernel/syscalls/getrlimit/getrlimit01.c
+++ b/testcases/kernel/syscalls/getrlimit/getrlimit01.c
@@ -71,7 +71,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 static void cleanup(void);
 static void setup(void);
 
diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit02.c b/testcases/kernel/syscalls/getrlimit/getrlimit02.c
index c8e7122..b2f002c 100644
--- a/testcases/kernel/syscalls/getrlimit/getrlimit02.c
+++ b/testcases/kernel/syscalls/getrlimit/getrlimit02.c
@@ -76,7 +76,6 @@
 
 #define RLIMIT_TOO_HIGH 1000
 
-
 char *TCID = "getrlimit02";
 
 static void cleanup(void);
diff --git a/testcases/kernel/syscalls/getrusage/getrusage01.c b/testcases/kernel/syscalls/getrusage/getrusage01.c
index 6b022ef..0a7af5f 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage01.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage01.c
@@ -75,6 +75,7 @@
 
 char *TCID = "getrusage01";	/* Test program identifier.    */
 int who[2] = { RUSAGE_SELF, RUSAGE_CHILDREN };
+
 int TST_TOTAL = 2;
 
 int main(int ac, char **av)
@@ -99,7 +100,7 @@
 			if (TEST_RETURN == 0)
 				tst_resm(TPASS, "getrusage passed");
 			else
-				tst_resm(TFAIL|TTERRNO, "getrusage failed");
+				tst_resm(TFAIL | TTERRNO, "getrusage failed");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/getrusage/getrusage02.c b/testcases/kernel/syscalls/getrusage/getrusage02.c
index 965e9d7..8ce0351 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage02.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage02.c
@@ -90,9 +90,11 @@
 	struct rusage *usage;
 	int exp_errno;
 } test_cases[] = {
-	{ RUSAGE_BOTH, &usage, EINVAL},
+	{
+	RUSAGE_BOTH, &usage, EINVAL},
 #ifndef UCLINUX
-	{ RUSAGE_SELF, (struct rusage *)-1, EFAULT}
+	{
+	RUSAGE_SELF, (struct rusage *)-1, EFAULT}
 #endif
 };
 
@@ -114,16 +116,15 @@
 		Tst_count = 0;
 
 		for (i = 0; i < TST_TOTAL; i++) {
-			TEST(getrusage(test_cases[i].who,
-				       test_cases[i].usage));
+			TEST(getrusage(test_cases[i].who, test_cases[i].usage));
 
 			if (TEST_RETURN == -1 &&
 			    TEST_ERRNO == test_cases[i].exp_errno)
-				tst_resm(TPASS|TTERRNO,
-				    "getrusage failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "getrusage failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "getrusage failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "getrusage failed unexpectedly");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/getrusage/getrusage03.c b/testcases/kernel/syscalls/getrusage/getrusage03.c
index 3ec5284..ae78be3 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage03.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage03.c
@@ -106,7 +106,7 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork #1");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork #1");
 	case 0:
 		maxrss_init = ru.ru_maxrss;
 		SAFE_GETRUSAGE(cleanup, RUSAGE_SELF, &ru);
@@ -116,10 +116,10 @@
 		break;
 	}
 
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	check_return(WEXITSTATUS(status), "initial.self ~= child.self",
-		    "initial.self !~= child.self");
+		     "initial.self !~= child.self");
 }
 
 /* Testcase #02: fork inherit (cont.)
@@ -137,7 +137,7 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork #2");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork #2");
 	case 0:
 		SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 		tst_resm(TINFO, "child.children = %ld", ru.ru_maxrss);
@@ -146,10 +146,10 @@
 		break;
 	}
 
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	check_return(WEXITSTATUS(status), "child.children == 0",
-		    "child.children != 0");
+		     "child.children != 0");
 }
 
 /* Testcase #03: fork + malloc
@@ -163,7 +163,7 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork #3");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork #3");
 	case 0:
 		maxrss_init = ru.ru_maxrss;
 		tst_resm(TINFO, "child allocate +50MB");
@@ -175,10 +175,10 @@
 		break;
 	}
 
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	check_return(WEXITSTATUS(status), "initial.self + 50MB ~= child.self",
-		    "initial.self + 50MB !~= child.self");
+		     "initial.self + 50MB !~= child.self");
 }
 
 /* Testcase #04: grandchild maxrss
@@ -192,20 +192,20 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork #4");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork #4");
 	case 0:
 		retval = system("getrusage03_child -g 300");
 		if ((WIFEXITED(retval) && WEXITSTATUS(retval) != 0))
-			tst_brkm(TBROK|TERRNO, cleanup, "system");
+			tst_brkm(TBROK | TERRNO, cleanup, "system");
 		exit(0);
 	default:
 		break;
 	}
 
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (WEXITSTATUS(status) != 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "child exit status is not 0");
+		tst_brkm(TBROK | TERRNO, cleanup, "child exit status is not 0");
 
 	SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 	tst_resm(TINFO, "post_wait.children = %ld", ru.ru_maxrss);
@@ -231,13 +231,13 @@
 	case 0:
 		retval = system("getrusage03_child -n 400");
 		if ((WIFEXITED(retval) && WEXITSTATUS(retval) != 0))
-			tst_brkm(TBROK|TERRNO, cleanup, "system");
+			tst_brkm(TBROK | TERRNO, cleanup, "system");
 		exit(0);
 	default:
 		break;
 	}
 
-	sleep(1); /* children become zombie */
+	sleep(1);		/* children become zombie */
 	SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 	tst_resm(TINFO, "pre_wait.children = %ld", ru.ru_maxrss);
 	if (is_in_delta(ru.ru_maxrss - maxrss_init))
@@ -245,10 +245,10 @@
 	else
 		tst_resm(TFAIL, "initial.children !~= pre_wait.children");
 
-	if (waitpid(pid, &status, WUNTRACED|WCONTINUED) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+	if (waitpid(pid, &status, WUNTRACED | WCONTINUED) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 	if (WEXITSTATUS(status) != 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "child exit status is not 0");
+		tst_brkm(TBROK | TERRNO, cleanup, "child exit status is not 0");
 
 	SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 	tst_resm(TINFO, "post_wait.children = %ld", ru.ru_maxrss);
@@ -275,13 +275,13 @@
 	case 0:
 		retval = system("getrusage03_child -n 500");
 		if ((WIFEXITED(retval) && WEXITSTATUS(retval) != 0))
-			tst_brkm(TBROK|TERRNO, cleanup, "system");
+			tst_brkm(TBROK | TERRNO, cleanup, "system");
 		exit(0);
 	default:
 		break;
 	}
 
-	sleep(1); /* children become zombie */
+	sleep(1);		/* children become zombie */
 	SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 	tst_resm(TINFO, "after_zombie.children = %ld", ru.ru_maxrss);
 	if (is_in_delta(ru.ru_maxrss - maxrss_init))
@@ -305,14 +305,13 @@
 	SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 	maxrss_child = ru.ru_maxrss;
 	tst_resm(TINFO, "initial.self = %ld, initial.children = %ld",
-		    maxrss_self, maxrss_child);
+		 maxrss_self, maxrss_child);
 
 	sprintf(str_maxrss_self, "%ld", maxrss_self);
 	sprintf(str_maxrss_child, "%ld", maxrss_child);
 	if (execlp("getrusage03_child", "getrusage03_child", "-v",
-		    "-s", str_maxrss_self,
-		    "-l", str_maxrss_child, NULL) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "execlp");
+		   "-s", str_maxrss_self, "-l", str_maxrss_child, NULL) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "execlp");
 }
 
 static int is_in_delta(long value)
@@ -340,7 +339,7 @@
 	size_t sz;
 	void *ptr;
 
-	sz  = mega * 1024 * 1024;
+	sz = mega * 1024 * 1024;
 	ptr = SAFE_MALLOC(cleanup, sz);
 	memset(ptr, 0, sz);
 }
diff --git a/testcases/kernel/syscalls/getrusage/getrusage03_child.c b/testcases/kernel/syscalls/getrusage/getrusage03_child.c
index 62be7d3..827e007 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage03_child.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage03_child.c
@@ -45,12 +45,12 @@
 static char *consume_str, *grand_consume_str, *self_str, *child_str;
 
 option_t child_options[] = {
-	{ "n:", &opt_consume, &consume_str },
-	{ "g:", &opt_grand,   &grand_consume_str },
-	{ "v",  &opt_show,    NULL },
-	{ "s:", &opt_self,    &self_str },
-	{ "l:", &opt_child,   &child_str },
-	{ NULL, NULL,         NULL }
+	{"n:", &opt_consume, &consume_str},
+	{"g:", &opt_grand, &grand_consume_str},
+	{"v", &opt_show, NULL},
+	{"s:", &opt_self, &self_str},
+	{"l:", &opt_child, &child_str},
+	{NULL, NULL, NULL}
 };
 
 static void usage(void);
@@ -78,16 +78,17 @@
 
 		if (opt_consume) {
 			consume_nr = SAFE_STRTOL(cleanup,
-				    consume_str, 0, LONG_MAX);
+						 consume_str, 0, LONG_MAX);
 			tst_resm(TINFO, "child allocate %ldMB", consume_nr);
 			consume(consume_nr);
 		}
 
 		if (opt_grand) {
 			grand_consume_nr = SAFE_STRTOL(cleanup,
-				    grand_consume_str, 0, LONG_MAX);
+						       grand_consume_str, 0,
+						       LONG_MAX);
 			tst_resm(TINFO, "grandchild allocate %ldMB",
-				    grand_consume_nr);
+				 grand_consume_nr);
 			switch (pid = fork()) {
 			case -1:
 				tst_brkm(TBROK, cleanup, "fork");
@@ -97,10 +98,10 @@
 			default:
 				break;
 			}
-			while (waitpid(-1, &pid, WUNTRACED|WCONTINUED) > 0)
+			while (waitpid(-1, &pid, WUNTRACED | WCONTINUED) > 0)
 				if (WEXITSTATUS(pid) != 0)
-					tst_brkm(TBROK|TERRNO, cleanup,
-						"child exit status is not 0");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "child exit status is not 0");
 		}
 
 		if (opt_show) {
@@ -109,28 +110,28 @@
 			SAFE_GETRUSAGE(cleanup, RUSAGE_CHILDREN, &ru);
 			maxrss_children = ru.ru_maxrss;
 			tst_resm(TINFO, "exec.self = %ld, exec.children = %ld",
-				    maxrss_self, maxrss_children);
+				 maxrss_self, maxrss_children);
 			if (opt_self) {
 				self_nr = SAFE_STRTOL(cleanup,
-					    self_str, 0, LONG_MAX);
+						      self_str, 0, LONG_MAX);
 				delta = maxrss_self - self_nr;
 				if (delta >= -DELTA_MAX && delta <= DELTA_MAX)
 					tst_resm(TPASS,
-						"initial.self ~= exec.self");
+						 "initial.self ~= exec.self");
 				else
 					tst_resm(TFAIL,
-						"initial.self !~= exec.self");
+						 "initial.self !~= exec.self");
 			}
 			if (opt_child) {
 				child_nr = SAFE_STRTOL(cleanup,
-					    child_str, 0, LONG_MAX);
+						       child_str, 0, LONG_MAX);
 				delta = maxrss_children - child_nr;
 				if (delta >= -DELTA_MAX && delta <= DELTA_MAX)
 					tst_resm(TPASS,
-						"initial.children ~= exec.children");
+						 "initial.children ~= exec.children");
 				else
 					tst_resm(TFAIL,
-						"initial.children !~= exec.children");
+						 "initial.children !~= exec.children");
 			}
 		}
 	}
@@ -153,7 +154,7 @@
 	size_t sz;
 	void *ptr;
 
-	sz  = mega * 1024 * 1024;
+	sz = mega * 1024 * 1024;
 	ptr = SAFE_MALLOC(cleanup, sz);
 	memset(ptr, 0, sz);
 }
diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
index 9801192..ceda15f 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage04.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
@@ -65,8 +65,8 @@
 static long factor_nr = 1;
 
 option_t child_options[] = {
-	{ "m:", &opt_factor, &factor_str },
-	{ NULL, NULL,         NULL }
+	{"m:", &opt_factor, &factor_str},
+	{NULL, NULL, NULL}
 };
 
 static void fusage(void);
@@ -99,10 +99,11 @@
 		 "increment (1000+%ldus)!", factor_nr, BIAS_MAX * factor_nr);
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
-		Tst_count = 0; i = 0;
+		Tst_count = 0;
+		i = 0;
 		SAFE_GETRUSAGE(cleanup, RUSAGE_THREAD, &usage);
 		tst_resm(TINFO, "utime:%12luus; stime:%12luus",
-			usage.ru_utime.tv_usec, usage.ru_stime.tv_usec);
+			 usage.ru_utime.tv_usec, usage.ru_stime.tv_usec);
 		ulast = usage.ru_utime.tv_usec;
 		slast = usage.ru_stime.tv_usec;
 
@@ -113,21 +114,21 @@
 			if (udelta > 0 || sdelta > 0) {
 				i++;
 				tst_resm(TINFO, "utime:%12luus; stime:%12luus",
-					    usage.ru_utime.tv_usec,
-					    usage.ru_stime.tv_usec);
-				if (udelta > 1000+(BIAS_MAX * factor_nr)) {
+					 usage.ru_utime.tv_usec,
+					 usage.ru_stime.tv_usec);
+				if (udelta > 1000 + (BIAS_MAX * factor_nr)) {
 					sprintf(msg_string,
 						"utime increased > %ldus:",
 						1000 + BIAS_MAX * factor_nr);
 					tst_brkm(TFAIL, cleanup, msg_string,
-						    " delta = %luus", udelta);
+						 " delta = %luus", udelta);
 				}
-				if (sdelta > 1000+(BIAS_MAX * factor_nr)) {
+				if (sdelta > 1000 + (BIAS_MAX * factor_nr)) {
 					sprintf(msg_string,
 						"stime increased > %ldus:",
 						1000 + BIAS_MAX * factor_nr);
 					tst_brkm(TFAIL, cleanup, msg_string,
-						    " delta = %luus", sdelta);
+						 " delta = %luus", sdelta);
 				}
 			}
 			ulast = usage.ru_utime.tv_usec;
@@ -147,8 +148,7 @@
 
 static void busyloop(long wait)
 {
-	while (wait--)
-		;
+	while (wait--) ;
 }
 
 static void setup(void)
diff --git a/testcases/kernel/syscalls/getsid/getsid02.c b/testcases/kernel/syscalls/getsid/getsid02.c
index 3f0081a..4832934 100644
--- a/testcases/kernel/syscalls/getsid/getsid02.c
+++ b/testcases/kernel/syscalls/getsid/getsid02.c
@@ -33,7 +33,7 @@
 static void cleanup(void);
 static void setup(void);
 
-int exp_enos[] = {ESRCH, 0};
+int exp_enos[] = { ESRCH, 0 };
 
 int main(int ac, char **av)
 {
@@ -77,7 +77,7 @@
 	SAFE_FILE_SCANF(NULL, "/proc/sys/kernel/pid_max", "%lu", &pid_max);
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
-	
+
 	TEST_EXP_ENOS(exp_enos);
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/getsockname/getsockname01.c b/testcases/kernel/syscalls/getsockname/getsockname01.c
index aacc3b0..adc5f73 100644
--- a/testcases/kernel/syscalls/getsockname/getsockname01.c
+++ b/testcases/kernel/syscalls/getsockname/getsockname01.c
@@ -89,11 +89,11 @@
 	PF_INET, SOCK_STREAM, 0, (struct sockaddr *)0,
 		    &sinlen, -1, EFAULT, setup1, cleanup1,
 		    "invalid socket buffer"}, {
-	/* invalid salen test for aligned input */
+		/* invalid salen test for aligned input */
 	PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&fsin1,
 		    (socklen_t *) 0, -1, EFAULT, setup1, cleanup1,
 		    "invalid aligned salen"}, {
-	/* invalid salen test for unaligned input */
+		/* invalid salen test for unaligned input */
 	PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&fsin1,
 		    (socklen_t *) 1, -1, EFAULT, setup1, cleanup1,
 		    "invalid unaligned salen"},
@@ -104,7 +104,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, 0 };
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/getsockopt/getsockopt01.c b/testcases/kernel/syscalls/getsockopt/getsockopt01.c
index edc74af..a30e645 100644
--- a/testcases/kernel/syscalls/getsockopt/getsockopt01.c
+++ b/testcases/kernel/syscalls/getsockopt/getsockopt01.c
@@ -129,7 +129,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, EOPNOTSUPP, ENOPROTOOPT, 0 };
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
index f0493d5..1bb46b0 100644
--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
+++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday01.c
@@ -104,7 +104,7 @@
 	}
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
index 1501214..2dc6b6f 100644
--- a/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
+++ b/testcases/kernel/syscalls/gettimeofday/gettimeofday02.c
@@ -110,8 +110,8 @@
 		    (tv2.tv_sec == tv1.tv_sec && tv2.tv_usec < tv1.tv_usec)) {
 			tst_resm(TFAIL,
 				 "Time is going backwards: old %jd.%jd vs new %jd.%jd!",
-				 (intmax_t)tv1.tv_sec, (intmax_t)tv1.tv_usec, (intmax_t)tv2.tv_sec,
-				 (intmax_t)tv2.tv_usec);
+				 (intmax_t) tv1.tv_sec, (intmax_t) tv1.tv_usec,
+				 (intmax_t) tv2.tv_sec, (intmax_t) tv2.tv_usec);
 			cleanup();
 			return 1;
 		}
diff --git a/testcases/kernel/syscalls/getuid/getuid01.c b/testcases/kernel/syscalls/getuid/getuid01.c
index 7b0904a..9eaaf10 100644
--- a/testcases/kernel/syscalls/getuid/getuid01.c
+++ b/testcases/kernel/syscalls/getuid/getuid01.c
@@ -121,7 +121,7 @@
 void setup();
 void cleanup();
 
-TCID_DEFINE(getuid01);          /* Test program identifier.    */
+TCID_DEFINE(getuid01);		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
@@ -145,11 +145,9 @@
 		TEST(GETUID());
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "getuid failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "getuid returned %ld",
-					 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "getuid failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "getuid returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/getuid/getuid02.c b/testcases/kernel/syscalls/getuid/getuid02.c
index 336fb5e..bf2f28d 100644
--- a/testcases/kernel/syscalls/getuid/getuid02.c
+++ b/testcases/kernel/syscalls/getuid/getuid02.c
@@ -69,17 +69,17 @@
 		TEST(GETEUID());
 
 		if (TEST_RETURN == -1)
-			tst_brkm(TBROK|TTERRNO, cleanup, "geteuid* failed");
+			tst_brkm(TBROK | TTERRNO, cleanup, "geteuid* failed");
 
 		if (STD_FUNCTIONAL_TEST) {
 
 			pwent = getpwuid(TEST_RETURN);
 			if (pwent == NULL)
-				tst_resm(TFAIL|TERRNO, "getpwuid failed");
+				tst_resm(TFAIL | TERRNO, "getpwuid failed");
 			else if (!UID_SIZE_CHECK(pwent->pw_uid))
 				tst_brkm(TBROK, cleanup,
-				    "uid = %ld is too large for testing "
-				    "via geteuid16", TEST_RETURN);
+					 "uid = %ld is too large for testing "
+					 "via geteuid16", TEST_RETURN);
 			else {
 				if (pwent->pw_uid != TEST_RETURN)
 					tst_resm(TFAIL, "getpwuid value, %d, "
diff --git a/testcases/kernel/syscalls/getuid/getuid03.c b/testcases/kernel/syscalls/getuid/getuid03.c
index edada84..3cfa5ca 100644
--- a/testcases/kernel/syscalls/getuid/getuid03.c
+++ b/testcases/kernel/syscalls/getuid/getuid03.c
@@ -70,12 +70,12 @@
 		TEST(GETUID());
 
 		if (TEST_RETURN == -1)
-			tst_brkm(TBROK|TTERRNO, cleanup, "getuid failed");
+			tst_brkm(TBROK | TTERRNO, cleanup, "getuid failed");
 
 		if (STD_FUNCTIONAL_TEST) {
 			pwent = getpwuid(TEST_RETURN);
 			if (pwent == NULL)
-				tst_resm(TFAIL|TERRNO, "getpwuid failed");
+				tst_resm(TFAIL | TERRNO, "getpwuid failed");
 			else if (!UID_SIZE_CHECK(pwent->pw_uid))
 				tst_brkm(TBROK, cleanup,
 					 "uid = %ld is too large for testing "
diff --git a/testcases/kernel/syscalls/getxattr/getxattr01.c b/testcases/kernel/syscalls/getxattr/getxattr01.c
index de4824c..96392f8 100644
--- a/testcases/kernel/syscalls/getxattr/getxattr01.c
+++ b/testcases/kernel/syscalls/getxattr/getxattr01.c
@@ -71,27 +71,27 @@
 	int exp_err;
 };
 struct test_case tc[] = {
-	{	/* case 00, get non-existing attribute */
-		.fname = filename,
-		.key = "user.nosuchkey",
-		.value = NULL,
-		.size = BUFFSIZE - 1,
-		.exp_err = ENOATTR,
-	},
-	{	/* case 01, small value buffer */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = NULL,
-		.size = 1,
-		.exp_err = ERANGE,
-	},
-	{	/* case 02, get existing attribute */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = NULL,
-		.size = BUFFSIZE - 1,
-		.exp_err = 0,
-	},
+	{			/* case 00, get non-existing attribute */
+	 .fname = filename,
+	 .key = "user.nosuchkey",
+	 .value = NULL,
+	 .size = BUFFSIZE - 1,
+	 .exp_err = ENOATTR,
+	 },
+	{			/* case 01, small value buffer */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = NULL,
+	 .size = 1,
+	 .exp_err = ERANGE,
+	 },
+	{			/* case 02, get existing attribute */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = NULL,
+	 .size = BUFFSIZE - 1,
+	 .exp_err = 0,
+	 },
 };
 
 int TST_TOTAL = sizeof(tc) / sizeof(tc[0]) + 1;
@@ -113,19 +113,20 @@
 
 		for (i = 0; i < (sizeof(tc) / sizeof(tc[0])); i++) {
 			TEST(getxattr(tc[i].fname, tc[i].key, tc[i].value,
-			    tc[i].size));
+				      tc[i].size));
 
 			if (TEST_ERRNO == tc[i].exp_err) {
 				tst_resm(TPASS | TTERRNO, "expected behavior");
 			} else {
 				tst_resm(TFAIL | TTERRNO, "unexpected behavior"
-				    "- expected errno %d - Got", tc[i].exp_err);
+					 "- expected errno %d - Got",
+					 tc[i].exp_err);
 			}
 		}
 
 		if (strcmp(tc[i - 1].value, XATTR_TEST_VALUE))
 			tst_resm(TFAIL, "Wrong value, expect \"%s\" got \"%s\"",
-			    XATTR_TEST_VALUE, tc[i - 1].value);
+				 XATTR_TEST_VALUE, tc[i - 1].value);
 		else
 			tst_resm(TPASS, "Got the right value");
 	}
@@ -148,13 +149,13 @@
 	fd = creat(filename, 0644);
 	if (fd == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test file(%s) failed",
-		    filename);
+			 filename);
 	close(fd);
 	if (setxattr(filename, XATTR_TEST_KEY, XATTR_TEST_VALUE,
-	    strlen(XATTR_TEST_VALUE), XATTR_CREATE) == -1) {
+		     strlen(XATTR_TEST_VALUE), XATTR_CREATE) == -1) {
 		if (errno == ENOTSUP) {
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "mount without user_xattr option");
+				 "mount without user_xattr option");
 		}
 	}
 
@@ -163,7 +164,7 @@
 		tc[i].value = malloc(BUFFSIZE);
 		if (tc[i].value == NULL) {
 			tst_brkm(TBROK | TERRNO, cleanup,
-			    "Cannot allocate memory");
+				 "Cannot allocate memory");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/getxattr/getxattr02.c b/testcases/kernel/syscalls/getxattr/getxattr02.c
index d71a02b..078ac96 100644
--- a/testcases/kernel/syscalls/getxattr/getxattr02.c
+++ b/testcases/kernel/syscalls/getxattr/getxattr02.c
@@ -69,10 +69,10 @@
 static void cleanup(void);
 
 static char *tc[] = {
-	FIFO,	/* case 00, get attr from fifo */
-	CHR,	/* case 01, get attr from char special */
-	BLK,	/* case 02, get attr from block special */
-	SOCK,	/* case 03, get attr from UNIX domain socket */
+	FIFO,			/* case 00, get attr from fifo */
+	CHR,			/* case 01, get attr from char special */
+	BLK,			/* case 02, get attr from block special */
+	SOCK,			/* case 03, get attr from UNIX domain socket */
 };
 
 int TST_TOTAL = sizeof(tc) / sizeof(tc[0]);
@@ -104,14 +104,14 @@
 		else
 			exp_eno = EPERM;
 
-		for (i = 0; i < TST_TOTAL; i++)	{
+		for (i = 0; i < TST_TOTAL; i++) {
 			TEST(getxattr(tc[0], XATTR_TEST_KEY, buf, BUFSIZ));
 
 			if (TEST_RETURN == -1 && TEST_ERRNO == exp_eno)
 				tst_resm(TPASS | TTERRNO, "expected behavior");
 			else
 				tst_resm(TFAIL | TTERRNO, "unexpected behavior"
-				    " - expected errno %d - Got", exp_eno);
+					 " - expected errno %d - Got", exp_eno);
 		}
 	}
 
@@ -135,25 +135,25 @@
 	if (setxattr("testfile", "user.test", "test", 4, XATTR_CREATE) == -1)
 		if (errno == ENOTSUP)
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "mount without user_xattr option");
+				 "mount without user_xattr option");
 	unlink("testfile");
 
 	/* Create test files */
 	if (mknod(FIFO, S_IFIFO | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create FIFO(%s) failed",
-		    FIFO);
+			 FIFO);
 
 	if (mknod(CHR, S_IFCHR | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create char special(%s)"
-		    " failed", CHR);
+			 " failed", CHR);
 
 	if (mknod(BLK, S_IFBLK | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create block special(%s)"
-		    " failed", BLK);
+			 " failed", BLK);
 
 	if (mknod(SOCK, S_IFSOCK | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create socket(%s) failed",
-		    SOCK);
+			 SOCK);
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/syscalls/getxattr/getxattr03.c b/testcases/kernel/syscalls/getxattr/getxattr03.c
index 0595e53..51506a6 100644
--- a/testcases/kernel/syscalls/getxattr/getxattr03.c
+++ b/testcases/kernel/syscalls/getxattr/getxattr03.c
@@ -98,13 +98,13 @@
 	close(fd);
 
 	if (setxattr(TESTFILE, XATTR_TEST_KEY, XATTR_TEST_VALUE,
-	    XATTR_TEST_VALUE_SIZE, XATTR_CREATE) == -1) {
+		     XATTR_TEST_VALUE_SIZE, XATTR_CREATE) == -1) {
 		if (errno == ENOTSUP)
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "fs mounted without user_xattr option");
+				 "fs mounted without user_xattr option");
 		else
 			tst_brkm(TBROK | TERRNO, cleanup, "setxattr %s failed",
-			    TESTFILE);
+				 TESTFILE);
 	}
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/inotify/inotify01.c b/testcases/kernel/syscalls/inotify/inotify01.c
index f8f85cf..ce7fa36 100644
--- a/testcases/kernel/syscalls/inotify/inotify01.c
+++ b/testcases/kernel/syscalls/inotify/inotify01.c
@@ -104,22 +104,22 @@
 		 * generate sequence of events
 		 */
 		if (chmod(fname, 0755) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "chmod(%s, 0755) failed", fname);
 		}
 		event_set[Tst_count] = IN_ATTRIB;
 		Tst_count++;
 
 		if ((fd = open(fname, O_RDONLY)) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 		}
 		event_set[Tst_count] = IN_OPEN;
 		Tst_count++;
 
 		if (read(fd, buf, BUF_SIZE) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "read(%d, buf, %d) failed", fd, BUF_SIZE);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "read(%d, buf, %d) failed", fd, BUF_SIZE);
 		}
 		event_set[Tst_count] = IN_ACCESS;
 		Tst_count++;
@@ -132,28 +132,27 @@
 
 		if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
 			tst_brkm(TBROK, cleanup,
-			    "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
+				 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 		}
 		event_set[Tst_count] = IN_OPEN;
 		Tst_count++;
 
 		if (write(fd, buf, BUF_SIZE) == -1) {
 			tst_brkm(TBROK, cleanup,
-			    "write(%d, %s, 1) failed", fd, fname);
+				 "write(%d, %s, 1) failed", fd, fname);
 		}
 		event_set[Tst_count] = IN_MODIFY;
 		Tst_count++;
 
 		if (close(fd) == -1) {
-			tst_brkm(TBROK, cleanup,
-			    "close(%s) failed", fname);
+			tst_brkm(TBROK, cleanup, "close(%s) failed", fname);
 		}
 		event_set[Tst_count] = IN_CLOSE_WRITE;
 		Tst_count++;
 
 		if (TST_TOTAL != Tst_count) {
 			tst_brkm(TBROK, cleanup,
-			     "TST_TOTAL and Tst_count are not equal");
+				 "TST_TOTAL and Tst_count are not equal");
 		}
 		Tst_count = 0;
 
@@ -163,8 +162,8 @@
 		int len, i = 0, test_num = 0;
 		if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
 			tst_brkm(TBROK, cleanup,
-			    "read(%d, buf, %zu) failed",
-			    fd_notify, EVENT_BUF_LEN);
+				 "read(%d, buf, %zu) failed",
+				 fd_notify, EVENT_BUF_LEN);
 
 		}
 
@@ -198,7 +197,7 @@
 		}
 		for (; test_num < TST_TOTAL; test_num++) {
 			tst_resm(TFAIL, "didn't get event: mask=%x",
-			    event_set[test_num]);
+				 event_set[test_num]);
 
 		}
 
@@ -222,13 +221,12 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) failed",
-			 fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 	}
 	if ((write(fd, fname, 1)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "write(%d, %s, 1) failed",
-		    fd, fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "write(%d, %s, 1) failed",
+			 fd, fname);
 	}
 
 	/* close the file we have open */
@@ -240,14 +238,15 @@
 			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
 		} else {
-			tst_brkm(TBROK|TERRNO, cleanup, "inotify_init failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "inotify_init failed");
 		}
 	}
 
 	if ((wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "inotify_add_watch (%d, %s, IN_ALL_EVENTS) failed",
-		    fd_notify, fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "inotify_add_watch (%d, %s, IN_ALL_EVENTS) failed",
+			 fd_notify, fname);
 	};
 
 }
@@ -259,7 +258,7 @@
 void cleanup()
 {
 	if (myinotify_rm_watch(fd_notify, wd) < 0) {
-		tst_resm(TWARN|TERRNO, "inotify_rm_watch (%d, %d) failed",
+		tst_resm(TWARN | TERRNO, "inotify_rm_watch (%d, %d) failed",
 			 fd_notify, wd);
 
 	}
diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c
index a4e7d08..4dbf738 100644
--- a/testcases/kernel/syscalls/inotify/inotify02.c
+++ b/testcases/kernel/syscalls/inotify/inotify02.c
@@ -73,7 +73,7 @@
 void cleanup();
 
 char *TCID = "inotify02";	/* Test program identifier. */
-int TST_TOTAL = 9;		/* Total number of test cases.*/
+int TST_TOTAL = 9;		/* Total number of test cases. */
 
 #define BUF_SIZE 256
 char fname1[BUF_SIZE], fname2[BUF_SIZE], fname3[BUF_SIZE];
@@ -120,7 +120,7 @@
 		 * generate sequence of events
 		 */
 		if (chmod(".", 0755) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "chmod(\".\", 0755) failed");
 		}
 		event_set[Tst_count].mask = IN_ISDIR | IN_ATTRIB;
@@ -128,9 +128,8 @@
 		Tst_count++;
 
 		if ((fd = creat(FILE_NAME1, 0755)) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "creat(\"%s\", 755) failed",
-				 FILE_NAME1);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "creat(\"%s\", 755) failed", FILE_NAME1);
 		}
 
 		event_set[Tst_count].mask = IN_CREATE;
@@ -141,7 +140,7 @@
 		Tst_count++;
 
 		if (close(fd) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "close(%s) failed", FILE_NAME1);
 		}
 		event_set[Tst_count].mask = IN_CLOSE_WRITE;
@@ -149,7 +148,7 @@
 		Tst_count++;
 
 		if (rename(FILE_NAME1, FILE_NAME2) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "rename(%s, %s) failed",
 				 FILE_NAME1, FILE_NAME2);
 		}
@@ -161,14 +160,13 @@
 		Tst_count++;
 
 		if (getcwd(fname1, BUF_SIZE) == NULL) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "getcwd(%p, %d) failed", fname1,
-				 BUF_SIZE);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "getcwd(%p, %d) failed", fname1, BUF_SIZE);
 		}
 
 		snprintf(fname2, BUF_SIZE, "%s.rename1", fname1);
 		if (rename(fname1, fname2) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "rename(%s, %s) failed", fname1, fname2);
 		}
 		event_set[Tst_count].mask = IN_MOVE_SELF;
@@ -176,7 +174,7 @@
 		Tst_count++;
 
 		if (unlink(FILE_NAME2) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "unlink(%s) failed", FILE_NAME2);
 		}
 		event_set[Tst_count].mask = IN_DELETE;
@@ -191,12 +189,12 @@
 		 */
 		snprintf(fname3, BUF_SIZE, "%s.rename2", fname1);
 		if (rename(fname2, fname3) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "rename(%s, %s) failed", fname2, fname3);
 		}
 
 		if (rename(fname3, fname1) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "rename(%s, %s) failed", fname3, fname1);
 		}
 		event_set[Tst_count].mask = IN_MOVE_SELF;
@@ -212,7 +210,7 @@
 
 		int len, i = 0, test_num = 0;
 		if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "read(%d, buf, %zu) failed",
 				 fd_notify, EVENT_BUF_LEN);
 
@@ -298,13 +296,13 @@
 			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
 		} else {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "inotify_init () failed");
 		}
 	}
 
 	if ((wd = myinotify_add_watch(fd_notify, ".", IN_ALL_EVENTS)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "inotify_add_watch (%d, \".\", IN_ALL_EVENTS) failed",
 			 fd_notify);
 	};
diff --git a/testcases/kernel/syscalls/inotify/inotify03.c b/testcases/kernel/syscalls/inotify/inotify03.c
index bfad39a..8d70f85 100644
--- a/testcases/kernel/syscalls/inotify/inotify03.c
+++ b/testcases/kernel/syscalls/inotify/inotify03.c
@@ -156,9 +156,8 @@
 
 	len = read(fd_notify, event_buf, EVENT_BUF_LEN);
 	if (len < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "read(%d, buf, %zu) failed",
-			 fd_notify, EVENT_BUF_LEN);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "read(%d, buf, %zu) failed", fd_notify, EVENT_BUF_LEN);
 	}
 
 	/* check events */
@@ -196,12 +195,12 @@
 	}
 	ret = myinotify_rm_watch(fd_notify, wd);
 	if (ret != -1 || errno != EINVAL)
-		tst_resm(TFAIL|TERRNO,
-			"inotify_rm_watch (%d, %d) didn't return EINVAL",
-			fd_notify, wd);
+		tst_resm(TFAIL | TERRNO,
+			 "inotify_rm_watch (%d, %d) didn't return EINVAL",
+			 fd_notify, wd);
 	else
 		tst_resm(TPASS, "inotify_rm_watch (%d, %d) returned EINVAL",
-			fd_notify, wd);
+			 fd_notify, wd);
 
 	cleanup();
 	tst_exit();
@@ -223,8 +222,8 @@
 	(void)sprintf(mntpoint, "mnt_%d", getpid());
 
 	if (mkdir(mntpoint, DIR_MODE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
-			mntpoint, DIR_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s, %#o) failed",
+			 mntpoint, DIR_MODE);
 	}
 
 	/* Call mount(2) */
@@ -234,28 +233,26 @@
 	/* check return code */
 	if (TEST_RETURN != 0) {
 		TEST_ERROR_LOG(TEST_ERRNO);
-		tst_brkm(TBROK|TTERRNO, cleanup, "mount(2) failed");
+		tst_brkm(TBROK | TTERRNO, cleanup, "mount(2) failed");
 	}
 	mount_flag = 1;
 
 	sprintf(fname, "%s/tfile_%d", mntpoint, getpid());
 	fd = open(fname, O_RDWR | O_CREAT, 0700);
 	if (fd == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "open(%s, O_RDWR|O_CREAT,0700) failed",
-			 fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "open(%s, O_RDWR|O_CREAT,0700) failed", fname);
 	}
 
 	ret = write(fd, fname, 1);
 	if (ret == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			 "write(%d, %s, 1) failed",
-			 fd, fname);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "write(%d, %s, 1) failed", fd, fname);
 	}
 
 	/* close the file we have open */
 	if (close(fd) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "close(%s) failed", fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(%s) failed", fname);
 	}
 
 	fd_notify = myinotify_init();
@@ -265,13 +262,14 @@
 			tst_brkm(TCONF, cleanup,
 				 "inotify is not configured in this kernel.");
 		} else {
-			tst_brkm(TBROK|TERRNO, cleanup, "inotify_init failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "inotify_init failed");
 		}
 	}
 
 	wd = myinotify_add_watch(fd_notify, fname, IN_ALL_EVENTS);
 	if (wd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "inotify_add_watch (%d, %s, IN_ALL_EVENTS) failed.",
 			 fd_notify, fname);
 	};
@@ -286,13 +284,14 @@
 {
 	free(Fstype);
 	if (close(fd_notify) == -1) {
-		tst_resm(TWARN|TERRNO, "close(%d) failed", fd_notify);
+		tst_resm(TWARN | TERRNO, "close(%d) failed", fd_notify);
 	}
 
 	if (mount_flag) {
 		TEST(umount(mntpoint));
 		if (TEST_RETURN != 0) {
-			tst_resm(TWARN|TTERRNO, "umount(%s) failed", mntpoint);
+			tst_resm(TWARN | TTERRNO, "umount(%s) failed",
+				 mntpoint);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/inotify/inotify04.c b/testcases/kernel/syscalls/inotify/inotify04.c
index 5c7cdfb..bbb73fa 100644
--- a/testcases/kernel/syscalls/inotify/inotify04.c
+++ b/testcases/kernel/syscalls/inotify/inotify04.c
@@ -84,11 +84,13 @@
 
 	if (reap_wd_dir && myinotify_rm_watch(fd_notify, wd_dir) == -1)
 		tst_resm(TWARN,
-		    "inotify_rm_watch(%d, %d) [1] failed", fd_notify, wd_dir);
+			 "inotify_rm_watch(%d, %d) [1] failed", fd_notify,
+			 wd_dir);
 
 	if (reap_wd_file && myinotify_rm_watch(fd_notify, wd_file) == -1)
 		tst_resm(TWARN,
-		    "inotify_rm_watch(%d, %d) [2] failed", fd_notify, wd_file);
+			 "inotify_rm_watch(%d, %d) [2] failed", fd_notify,
+			 wd_file);
 
 	if (close(fd_notify) == -1)
 		tst_resm(TWARN, "close(%d) [1] failed", fd_notify);
@@ -115,7 +117,7 @@
 
 	fd_notify = myinotify_init();
 	if (fd_notify == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "inotify_init() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "inotify_init() failed");
 
 	SAFE_MKDIR(cleanup, TEST_DIR, 00700);
 
@@ -123,22 +125,21 @@
 
 	wd_dir = myinotify_add_watch(fd_notify, TEST_DIR, IN_ALL_EVENTS);
 	if (wd_dir == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "inotify_add_watch(%d, \"%s\", IN_ALL_EVENTS) [1] failed",
-		    fd_notify, TEST_DIR);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "inotify_add_watch(%d, \"%s\", IN_ALL_EVENTS) [1] failed",
+			 fd_notify, TEST_DIR);
 	}
 	reap_wd_dir = 1;
 
 	wd_file = myinotify_add_watch(fd_notify, TEST_FILE, IN_ALL_EVENTS);
 	if (wd_file == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "inotify_add_watch(%d, \"%s\", IN_ALL_EVENTS) [2] failed",
-		    fd_notify, TEST_FILE);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "inotify_add_watch(%d, \"%s\", IN_ALL_EVENTS) [2] failed",
+			 fd_notify, TEST_FILE);
 	reap_wd_file = 1;
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	char *msg;
 	size_t len;
@@ -192,7 +193,7 @@
 
 	len = read(fd_notify, event_buf, EVENT_BUF_LEN);
 	if (len == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "read failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "read failed");
 
 	reap_wd_dir = 0;
 	reap_wd_file = 0;
@@ -202,8 +203,7 @@
 		event = (struct inotify_event *)&event_buf[i];
 		if (test_num >= TST_TOTAL) {
 			if (tst_kvercmp(2, 6, 25) < 0
-			    && event_set[TST_TOTAL - 1].mask ==
-			    event->mask)
+			    && event_set[TST_TOTAL - 1].mask == event->mask)
 				tst_resm(TWARN,
 					 "This may be kernel bug. "
 					 "Before kernel 2.6.25, a kernel bug "
@@ -220,8 +220,7 @@
 				 "got unnecessary event: "
 				 "wd=%d mask=%x cookie=%u len=%u "
 				 "name=\"%s\"", event->wd, event->mask,
-				 event->cookie, event->len,
-				 event->name);
+				 event->cookie, event->len, event->name);
 
 		} else if ((event_set[test_num].mask == event->mask)
 			   &&
@@ -242,8 +241,7 @@
 				 event_set[test_num].mask,
 				 event->cookie, event->len, event->name,
 				 event_set[test_num].name,
-				 strcmp(event_set[test_num].name,
-					event->name));
+				 strcmp(event_set[test_num].name, event->name));
 		}
 		test_num++;
 		i += EVENT_SIZE + event->len;
diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
index 8bb68e3..cf94652 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
@@ -65,7 +65,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define IN_CLOEXEC O_CLOEXEC
@@ -140,8 +140,8 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
-			"This test can only run on kernels that are 2.6.27 "
-			"and higher");
+			 "This test can only run on kernels that are 2.6.27 "
+			 "and higher");
 	}
 	setup();
 
@@ -150,35 +150,36 @@
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			fd = syscall(__NR_inotify_init1, 0);
 			if (fd == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"inotify_init1(0) failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "inotify_init1(0) failed");
 			}
 			coe = fcntl(fd, F_GETFD);
 			if (coe == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fcntl failed");
 			}
 			if (coe & FD_CLOEXEC) {
 				tst_brkm(TFAIL, cleanup,
-					"inotify_init1(0) set close-on-exit");
+					 "inotify_init1(0) set close-on-exit");
 			}
 			close(fd);
 
 			fd = syscall(__NR_inotify_init1, IN_CLOEXEC);
 			if (fd == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
+				tst_brkm(TFAIL | TERRNO, cleanup,
 					 "inotify_init1(IN_CLOEXEC) failed");
 			}
 			coe = fcntl(fd, F_GETFD);
 			if (coe == -1) {
-				tst_resm(TBROK|TERRNO, "fcntl failed");
+				tst_resm(TBROK | TERRNO, "fcntl failed");
 			} else if ((coe & FD_CLOEXEC) == 0) {
 				tst_resm(TFAIL,
-					"inotify_init1(O_CLOEXEC) did not "
-					"set close-on-exit");
+					 "inotify_init1(O_CLOEXEC) did not "
+					 "set close-on-exit");
 			} else {
 				close(fd);
 				tst_resm(TPASS, "inotify_init1(O_CLOEXEC) "
-					"PASSED");
+					 "PASSED");
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
index ac36b90..a574650 100644
--- a/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
+++ b/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
@@ -62,7 +62,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define IN_NONBLOCK O_NONBLOCK
@@ -135,8 +135,8 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
-			"This test can only run on kernels that are 2.6.27 "
-			"and higher");
+			 "This test can only run on kernels that are 2.6.27 "
+			 "and higher");
 	}
 	setup();
 
@@ -145,33 +145,35 @@
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			fd = syscall(__NR_inotify_init1, 0);
 			if (fd == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"inotify_init1(0) failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "inotify_init1(0) failed");
 			}
 			fl = fcntl(fd, F_GETFL);
 			if (fl == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fcntl failed");
 			}
 			if (fl & O_NONBLOCK) {
 				tst_brkm(TFAIL, cleanup,
-					"inotify_init1(0) set non-blocking "
-					"mode");
+					 "inotify_init1(0) set non-blocking "
+					 "mode");
 			}
 			close(fd);
 
 			fd = syscall(__NR_inotify_init1, IN_NONBLOCK);
 			if (fd == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
+				tst_brkm(TFAIL | TERRNO, cleanup,
 					 "inotify_init1(IN_NONBLOCK) failed");
 			}
 			fl = fcntl(fd, F_GETFL);
 			if (fl == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup, "fcntl failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fcntl failed");
 			}
 			if ((fl & O_NONBLOCK) == 0) {
 				tst_brkm(TFAIL, cleanup,
-					"inotify_init1(IN_NONBLOCK) set "
-					"non-blocking mode");
+					 "inotify_init1(IN_NONBLOCK) set "
+					 "non-blocking mode");
 			}
 			close(fd);
 			tst_resm(TPASS, "inotify_init1(IN_NONBLOCK) PASSED");
diff --git a/testcases/kernel/syscalls/io_cancel/io_cancel01.c b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
index a4bfac9..b3fc12d 100644
--- a/testcases/kernel/syscalls/io_cancel/io_cancel01.c
+++ b/testcases/kernel/syscalls/io_cancel/io_cancel01.c
@@ -88,20 +88,20 @@
 		switch (TEST_RETURN) {
 		case 0:
 			tst_resm(TFAIL, "call succeeded unexpectedly");
-		break;
+			break;
 		case EXP_RET:
 			tst_resm(TPASS, "expected failure - "
 				 "returned value = %ld : %s", TEST_RETURN,
 				 strerror(-TEST_RETURN));
-		break;
+			break;
 		case -ENOSYS:
 			tst_resm(TCONF, "io_cancel returned ENOSYS");
-		break;
+			break;
 		default:
 			tst_resm(TFAIL, "unexpected returned value - %s (%i) - "
 				 "expected %s (%i)", strerror(-TEST_RETURN),
 				 (int)TEST_RETURN, strerror(-EXP_RET), EXP_RET);
-		break;
+			break;
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/io_destroy/io_destroy01.c b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
index 447c311..882dc96 100644
--- a/testcases/kernel/syscalls/io_destroy/io_destroy01.c
+++ b/testcases/kernel/syscalls/io_destroy/io_destroy01.c
@@ -83,20 +83,20 @@
 		switch (TEST_RETURN) {
 		case 0:
 			tst_resm(TFAIL, "call succeeded unexpectedly");
-		break;
+			break;
 		case EXP_RET:
 			tst_resm(TPASS, "expected failure - "
 				 "returned value = %ld : %s", TEST_RETURN,
 				 strerror(-TEST_RETURN));
-		break;
+			break;
 		case -ENOSYS:
 			tst_resm(TCONF, "io_cancel returned ENOSYS");
-		break;
+			break;
 		default:
 			tst_resm(TFAIL, "unexpected returned value - %s (%i) - "
 				 "expected %s (%i)", strerror(-TEST_RETURN),
 				 (int)TEST_RETURN, strerror(-EXP_RET), EXP_RET);
-		break;
+			break;
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/io_getevents/io_getevents01.c b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
index af2fae3..4f64037 100644
--- a/testcases/kernel/syscalls/io_getevents/io_getevents01.c
+++ b/testcases/kernel/syscalls/io_getevents/io_getevents01.c
@@ -88,20 +88,20 @@
 		switch (TEST_RETURN) {
 		case 0:
 			tst_resm(TFAIL, "call succeeded unexpectedly");
-		break;
+			break;
 		case EXP_RET:
 			tst_resm(TPASS, "expected failure - "
 				 "returned value = %ld : %s", TEST_RETURN,
 				 strerror(-TEST_RETURN));
-		break;
+			break;
 		case -ENOSYS:
 			tst_resm(TCONF, "io_cancel returned ENOSYS");
-		break;
+			break;
 		default:
 			tst_resm(TFAIL, "unexpected returned value - %s (%i) - "
 				 "expected %s (%i)", strerror(-TEST_RETURN),
 				 (int)TEST_RETURN, strerror(-EXP_RET), EXP_RET);
-		break;
+			break;
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index c9603c9..ef30b2d 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -54,11 +54,11 @@
 
 	tst_tmpdir();
 
-	fd = open(TESTFILE, O_CREAT|O_RDWR, 0755);
+	fd = open(TESTFILE, O_CREAT | O_RDWR, 0755);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close");
+		tst_brkm(TBROK | TERRNO, cleanup, "close");
 }
 
 static void check_result(long exp, long act)
@@ -66,27 +66,25 @@
 	if (exp >= 0) {
 		if (act == exp)
 			tst_resm(TPASS, "expected success - "
-					"returned value = %ld", act);
+				 "returned value = %ld", act);
 		else
 			tst_resm(TFAIL, "unexpected failure - "
-					"returned value = %ld : %s",
-					act, strerror(-1 * act));
+				 "returned value = %ld : %s",
+				 act, strerror(-1 * act));
 		return;
 	}
 
 	/* if return value is expected to be < 0 */
 	if (act == exp)
 		tst_resm(TPASS, "expected failure - "
-				"returned value = %ld : %s",
-				act, strerror(-1 * act));
+			 "returned value = %ld : %s", act, strerror(-1 * act));
 	else if (act == 0)
 		tst_resm(TFAIL, "call succeeded unexpectedly");
 	else
 		tst_resm(TFAIL, "unexpected failure - "
-				"returned value = %ld : %s, "
-				"expected value = %ld : %s",
-				act, strerror(-1 * act),
-				exp, strerror(-1 * exp));
+			 "returned value = %ld : %s, "
+			 "expected value = %ld : %s",
+			 act, strerror(-1 * act), exp, strerror(-1 * exp));
 }
 
 int main(int argc, char *argv[])
@@ -126,19 +124,19 @@
 		/* 1.3 - EINVAL: uninitialized iocb */
 		iocbs[0] = &iocb;
 		TEST(io_submit(ctx, 1, iocbs));
-		switch(TEST_RETURN) {
+		switch (TEST_RETURN) {
 		case -EINVAL:
 		case -EBADF:
 		case -EFAULT:
 			tst_resm(TPASS, "expected failure - "
-					"returned value = %ld : %s",
-					TEST_RETURN, strerror(-1 * TEST_RETURN));
+				 "returned value = %ld : %s",
+				 TEST_RETURN, strerror(-1 * TEST_RETURN));
 			break;
 		default:
 			tst_resm(TFAIL, "unexpected failure - "
-					"returned value = %ld : %s, "
-					"expected one of -EINVAL, -EBADF, -EFAULT",
-					TEST_RETURN, strerror(-1 * TEST_RETURN));
+				 "returned value = %ld : %s, "
+				 "expected one of -EINVAL, -EBADF, -EFAULT",
+				 TEST_RETURN, strerror(-1 * TEST_RETURN));
 		}
 
 		/* 2 - EFAULT: iocb points to invalid data */
@@ -155,18 +153,17 @@
 		TEST(io_submit(ctx, -1, (struct iocb **)-1));
 		if (TEST_RETURN == 0)
 			tst_resm(TFAIL, "call succeeded unexpectedly");
-		else if (TEST_RETURN == -EFAULT
-				|| TEST_RETURN == -EINVAL)
+		else if (TEST_RETURN == -EFAULT || TEST_RETURN == -EINVAL)
 			tst_resm(TPASS, "expected failure - "
-					"returned value = %ld : %s",
-					TEST_RETURN, strerror(-1 * TEST_RETURN));
+				 "returned value = %ld : %s",
+				 TEST_RETURN, strerror(-1 * TEST_RETURN));
 		else
 			tst_resm(TFAIL, "unexpected failure - "
-					"returned value = %ld : %s, "
-					"expected = %d : %s or %d : %s",
-					TEST_RETURN, strerror(-1 * TEST_RETURN),
-					-EFAULT, strerror(EFAULT),
-					-EINVAL, strerror(EINVAL));
+				 "returned value = %ld : %s, "
+				 "expected = %d : %s or %d : %s",
+				 TEST_RETURN, strerror(-1 * TEST_RETURN),
+				 -EFAULT, strerror(EFAULT),
+				 -EINVAL, strerror(EINVAL));
 
 		/*
 		 * 4 - EBADF: fd in iocb is invalid
@@ -183,13 +180,13 @@
 		/* 6 - Positive test: valid fd */
 		fd = open(TESTFILE, O_RDONLY);
 		if (fd == -1)
-			tst_resm(TBROK|TERRNO, "open");
+			tst_resm(TBROK | TERRNO, "open");
 		io_prep_pread(&iocb, fd, buf, sizeof(buf), 0);
 		iocbs[0] = &iocb;
 		TEST(io_submit(ctx, 1, iocbs));
 		check_result(1, TEST_RETURN);
 		if (close(fd) == -1)
-			tst_resm(TBROK|TERRNO, "close");
+			tst_resm(TBROK | TERRNO, "close");
 
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/ioctl/ioctl01.c b/testcases/kernel/syscalls/ioctl/ioctl01.c
index ee3b960..243f263 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl01.c
@@ -80,18 +80,23 @@
 	int error;
 } TC[] = {
 	/* file descriptor is invalid */
-	{&bfd, TCGETA, &termio, EBADF},
-	/* termio address is invalid */
-	{&fd, TCGETA, (struct termio *)-1, EFAULT},
-	/* command is invalid */
-	/* This errno value was changed from EINVAL to ENOTTY
-	 * by kernel commit 07d106d0 and bbb63c51
-	 */
-	{&fd, INVAL_IOCTL, &termio, ENOTTY},
-	/* file descriptor is for a regular file */
-	{&fd1, TCGETA, &termio, ENOTTY},
-	/* termio is NULL */
-	{&fd, TCGETA, NULL, EFAULT}
+	{
+	&bfd, TCGETA, &termio, EBADF},
+	    /* termio address is invalid */
+	{
+	&fd, TCGETA, (struct termio *)-1, EFAULT},
+	    /* command is invalid */
+	    /* This errno value was changed from EINVAL to ENOTTY
+	     * by kernel commit 07d106d0 and bbb63c51
+	     */
+	{
+	&fd, INVAL_IOCTL, &termio, ENOTTY},
+	    /* file descriptor is for a regular file */
+	{
+	&fd1, TCGETA, &termio, ENOTTY},
+	    /* termio is NULL */
+	{
+	&fd, TCGETA, NULL, EFAULT}
 };
 
 static int Devflag;
@@ -123,7 +128,7 @@
 
 	fd = open(devname, O_RDWR, 0777);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "Couldn't open %s", devname);
+		tst_brkm(TBROK | TERRNO, cleanup, "Couldn't open %s", devname);
 
 	TEST_EXP_ENOS(exp_enos);
 
@@ -144,11 +149,11 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == TC[i].error)
-				tst_resm(TPASS|TTERRNO, "failed as expected");
+				tst_resm(TPASS | TTERRNO, "failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "failed unexpectedly; expected %d - %s",
-				    TC[i].error, strerror(TC[i].error));
+				tst_resm(TFAIL | TTERRNO,
+					 "failed unexpectedly; expected %d - %s",
+					 TC[i].error, strerror(TC[i].error));
 		}
 	}
 	cleanup();
@@ -178,7 +183,7 @@
 	/* create a temporary file */
 	fd1 = open("x", O_CREAT, 0777);
 	if (fd1 == -1)
-		tst_resm(TFAIL|TERRNO, "Could not open test file");
+		tst_resm(TFAIL | TERRNO, "Could not open test file");
 }
 
 static void cleanup(void)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl02.c b/testcases/kernel/syscalls/ioctl/ioctl02.c
index 5a214d9..ab41aea 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl02.c
@@ -309,7 +309,7 @@
 	 * However, it has been observed that other flags are properly set.
 	 */
 #if 0
-	if (termio.c_cflag != (B50|CS7|CREAD|PARENB|PARODD|CLOCAL)) {
+	if (termio.c_cflag != (B50 | CS7 | CREAD | PARENB | PARODD | CLOCAL)) {
 		tst_resm(TINFO, "cflag has incorrect value. %o",
 			 termio.c_cflag);
 		flag++;
diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c
index 31e320d..5cdba51 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl03.c
@@ -58,7 +58,6 @@
 #define IFF_VNET_HDR	0x4000
 #endif
 
-
 char *TCID = "ioctl03";
 int TST_TOTAL = 1;
 
@@ -95,11 +94,12 @@
 
 	int netfd = open("/dev/net/tun", O_RDWR);
 	if (netfd < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "opening /dev/net/tun failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "opening /dev/net/tun failed");
 
 	if (ioctl(netfd, TUNGETFEATURES, &features) != 0)
 		tst_brkm(TCONF, cleanup,
-		    "Kernel does not support TUNGETFEATURES");
+			 "Kernel does not support TUNGETFEATURES");
 	tst_resm(TINFO, "Available features are: %#x", features);
 	for (i = 0; i < sizeof(known_flags) / sizeof(known_flags[0]); i++) {
 		if (features & known_flags[i].flag) {
diff --git a/testcases/kernel/syscalls/ioperm/ioperm01.c b/testcases/kernel/syscalls/ioperm/ioperm01.c
index bf51ddf..4903129 100644
--- a/testcases/kernel/syscalls/ioperm/ioperm01.c
+++ b/testcases/kernel/syscalls/ioperm/ioperm01.c
@@ -74,7 +74,7 @@
 #include "test.h"
 #include "usctest.h"
 
-unsigned long io_addr;			/*kernel version dependant io start address */
+unsigned long io_addr;		/*kernel version dependant io start address */
 #define NUM_BYTES 3		/* number of bytes from start address */
 #define TURN_ON 1
 #define TURN_OFF 0
@@ -133,7 +133,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	/*
 	 * The value of IO_BITMAP_BITS (include/asm-i386/processor.h) changed
diff --git a/testcases/kernel/syscalls/iopl/iopl01.c b/testcases/kernel/syscalls/iopl/iopl01.c
index 35fff45..bf911ab 100644
--- a/testcases/kernel/syscalls/iopl/iopl01.c
+++ b/testcases/kernel/syscalls/iopl/iopl01.c
@@ -131,7 +131,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	TEST_PAUSE;
 
diff --git a/testcases/kernel/syscalls/ipc/lib/libipc.c b/testcases/kernel/syscalls/ipc/lib/libipc.c
index 8ef187d..a94e1f2 100644
--- a/testcases/kernel/syscalls/ipc/lib/libipc.c
+++ b/testcases/kernel/syscalls/ipc/lib/libipc.c
@@ -202,7 +202,7 @@
 
 	f = popen("ipcs -q", "r");
 	if (!f) {
-		tst_brkm(TBROK|TERRNO, NULL, "pipe failed");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe failed");
 	}
 	/* FIXME: Start at -4 because ipcs prints four lines of header */
 	for (used_queues = -4; fgets(buff, BUFSIZE, f); used_queues++) ;
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
index 83bc987..dc12ff3 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl01.c
@@ -92,7 +92,7 @@
 		TEST(msgctl(msg_q_1, IPC_STAT, &qs_buf));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "msgctl() call failed");
+			tst_resm(TFAIL | TTERRNO, "msgctl() call failed");
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 				if (qs_buf.msg_qbytes > 0) {
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
index d374501..91db5e2 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl02.c
@@ -94,7 +94,7 @@
 		TEST(msgctl(msg_q_1, IPC_SET, &qs_buf));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "msgctl() call failed");
+			tst_resm(TFAIL | TTERRNO, "msgctl() call failed");
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
index 0b21685..bd7a5c5 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl03.c
@@ -84,7 +84,7 @@
 	TEST(msgctl(msg_q_1, IPC_RMID, NULL));
 
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, cleanup, "msgctl() call failed");
+		tst_brkm(TFAIL | TTERRNO, cleanup, "msgctl() call failed");
 	} else {
 		if (STD_FUNCTIONAL_TEST) {
 			/*
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
index a04d50e..0ffa04c 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl04.c
@@ -135,9 +135,9 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == TC[i].error) {
-				tst_resm(TPASS|TTERRNO, "expected failure");
+				tst_resm(TPASS | TTERRNO, "expected failure");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "unexpected error");
+				tst_resm(TFAIL | TTERRNO, "unexpected error");
 				tst_resm(TINFO, "expected error is - %d : %s",
 					 TC[i].error, strerror(TC[i].error));
 			}
@@ -185,13 +185,15 @@
 
 	/* now we have a key, so let's create a message queue */
 	if ((msg_q_1 = msgget(msgkey, IPC_CREAT | IPC_EXCL)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "Can't create message queue #1");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "Can't create message queue #1");
 	}
 
 	/* now let's create another message queue with read & write access */
 	if ((msg_q_2 =
 	     msgget(msgkey2, IPC_CREAT | IPC_EXCL | MSG_RD | MSG_WR)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "Can't create message queue #2");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "Can't create message queue #2");
 	}
 }
 
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
index 1499c57..995d86a 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl05.c
@@ -99,7 +99,7 @@
 		do_child();
 	} else {		/* parent */
 		if (waitpid(pid, NULL, 0) == -1) {
-			tst_resm(TBROK|TERRNO, "waitpid() failed");
+			tst_resm(TBROK | TERRNO, "waitpid() failed");
 		}
 
 		/* if it exists, remove the message queue */
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
index 065d753..2e5ea9d 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl06.c
@@ -78,14 +78,14 @@
 	TEST(msgget(key, IPC_CREAT | IPC_EXCL));
 	msqid = TEST_RETURN;
 	if (TEST_RETURN == -1) {
-		tst_resm(TFAIL|TTERRNO, "msgget() failed");
+		tst_resm(TFAIL | TTERRNO, "msgget() failed");
 		tst_exit();
 	}
 
 	TEST(msgctl(msqid, IPC_STAT, &buf));
 	status = TEST_RETURN;
 	if (TEST_RETURN == -1) {
-		tst_resm(TFAIL|TTERRNO,
+		tst_resm(TFAIL | TTERRNO,
 			 "msgctl(msqid, IPC_STAT, &buf) failed");
 		(void)msgctl(msqid, IPC_RMID, NULL);
 		tst_exit();
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
index 84e539c..9ba6768 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl07.c
@@ -85,8 +85,7 @@
 #ifdef UCLINUX
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -99,7 +98,7 @@
 
 	key = getipckey();
 	if ((msqid = msgget(key, IPC_CREAT | IPC_EXCL)) == -1) {
-		tst_resm(TFAIL|TERRNO, "msgget() failed");
+		tst_resm(TFAIL | TERRNO, "msgget() failed");
 		tst_exit();
 
 	}
@@ -126,7 +125,7 @@
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGALRM);
 		if ((sigaction(SIGALRM, &act, NULL)) < 0) {
-			tst_resm(TFAIL|TERRNO, "signal failed");
+			tst_resm(TFAIL | TERRNO, "signal failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -139,7 +138,7 @@
 			p1_msgp.text[i] = 'i';
 		p1_msgp.type = 1;
 		if (msgsnd(msqid, &p1_msgp, BYTES, 0) == -1) {
-			tst_resm(TFAIL|TERRNO, "msgsnd() failed");
+			tst_resm(TFAIL | TERRNO, "msgsnd() failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -174,7 +173,7 @@
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGALRM);
 		if ((sigaction(SIGALRM, &act, NULL)) < 0) {
-			tst_resm(TFAIL|TERRNO, "signal failed");
+			tst_resm(TFAIL | TERRNO, "signal failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -187,7 +186,7 @@
 			p1_msgp.text[i] = 'i';
 		p1_msgp.type = 1;
 		if (msgsnd(msqid, &p1_msgp, BYTES, 0) == -1) {
-			tst_resm(TFAIL|TERRNO, "msgsnd() failed");
+			tst_resm(TFAIL | TERRNO, "msgsnd() failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -196,7 +195,7 @@
 			p2_msgp.text[j] = 'j';
 		p2_msgp.type = 2;
 		if (msgsnd(msqid, &p2_msgp, BYTES, 0) == -1) {
-			tst_resm(TFAIL|TERRNO, "msgsnd() failed");
+			tst_resm(TFAIL | TERRNO, "msgsnd() failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -205,7 +204,7 @@
 			p3_msgp.text[k] = 'k';
 		p3_msgp.type = 3;
 		if (msgsnd(msqid, &p3_msgp, BYTES, 0) == -1) {
-			tst_resm(TFAIL|TERRNO, "msgsnd() failed");
+			tst_resm(TFAIL | TERRNO, "msgsnd() failed");
 			kill(pid, SIGKILL);
 			(void)msgctl(msqid, IPC_RMID, NULL);
 			tst_exit();
@@ -255,7 +254,7 @@
 	int size;
 
 	if ((size = msgrcv(msqid, &c1_msgp, BYTES, 0, 0)) == -1) {
-		tst_resm(TFAIL|TERRNO, "msgrcv() failed");
+		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
 		tst_exit();
 	}
 	if (size != BYTES) {
@@ -277,7 +276,7 @@
 	int size;
 
 	if ((size = msgrcv(msqid, &c3_msgp, BYTES, 3, 0)) == -1) {
-		tst_resm(TFAIL|TERRNO, "msgrcv() failed");
+		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
 		tst_exit();
 	}
 	if (size != BYTES) {
@@ -291,7 +290,7 @@
 			tst_exit();
 		}
 	if ((size = msgrcv(msqid, &c2_msgp, BYTES, 2, 0)) == -1) {
-		tst_resm(TFAIL|TERRNO, "msgrcv() failed");
+		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
 		tst_exit();
 	}
 	if (size != BYTES) {
@@ -305,7 +304,7 @@
 			tst_exit();
 		}
 	if ((size = msgrcv(msqid, &c1_msgp, BYTES, 1, 0)) == -1) {
-		tst_resm(TFAIL|TERRNO, "msgrcv() failed");
+		tst_resm(TFAIL | TERRNO, "msgrcv() failed");
 		tst_exit();
 	}
 	if (size != BYTES) {
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
index d5a2285..f733946 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl08.c
@@ -119,8 +119,7 @@
 
 	argv0 = argv[0];
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -280,7 +279,7 @@
 	sighold(SIGTERM);
 	TEST(msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR));
 	if (TEST_RETURN < 0) {
-		tst_resm(TFAIL|TTERRNO, "Msgget error in child %d",
+		tst_resm(TFAIL | TTERRNO, "Msgget error in child %d",
 			 child_process);
 		tst_exit();
 	}
@@ -292,7 +291,7 @@
 		tst_resm(TWARN, "\tFork failed (may be OK if under stress)");
 		TEST(msgctl(tid, IPC_RMID, 0));
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO, "Msgctl error in cleanup");
+			tst_resm(TFAIL | TTERRNO, "Msgctl error in cleanup");
 		}
 		tst_exit();
 	}
@@ -303,7 +302,8 @@
 			tst_resm(TWARN, "self_exec failed");
 			TEST(msgctl(tid, IPC_RMID, 0));
 			if (TEST_RETURN < 0) {
-				tst_resm(TFAIL|TTERRNO, "Msgctl error in cleanup");
+				tst_resm(TFAIL | TTERRNO,
+					 "Msgctl error in cleanup");
 			}
 			tst_exit();
 		}
@@ -332,7 +332,7 @@
 
 	for (i = 0; i < nreps; i++) {
 		if ((size = msgrcv(id, &buffer, 100, 0, 0)) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "Msgrcv error in child %d, read # = %d",
 				 (i + 1), child);
 			tst_exit();
@@ -371,7 +371,7 @@
 		buffer.type = 1;
 		TEST(msgsnd(id, &buffer, size + 1, 0));
 		if (TEST_RETURN < 0) {
-			tst_brkm(TBROK|TTERRNO, cleanup,
+			tst_brkm(TBROK | TTERRNO, cleanup,
 				 "Msgsnd error in child %d, key =   %lx",
 				 child, key);
 		}
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
index c5198a0..bec852a 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl09.c
@@ -123,8 +123,7 @@
 
 	argv0 = argv[0];
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -309,7 +308,7 @@
 	}
 
 	if (msgctl(tid, IPC_RMID, 0) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgctl error in cleanup");
+		tst_resm(TFAIL | TERRNO, "Msgctl error in cleanup");
 		tst_exit();
 	}
 }
@@ -323,7 +322,7 @@
 
 	sighold(SIGTERM);
 	if ((id = msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR)) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgget error in child %d",
+		tst_resm(TFAIL | TERRNO, "Msgget error in child %d",
 			 child_process);
 		tst_exit();
 	}
@@ -404,7 +403,7 @@
 					kill(wkidarray[i], SIGTERM);
 				}
 				if (msgctl(tid, IPC_RMID, 0) < 0) {
-					tst_resm(TFAIL|TERRNO,
+					tst_resm(TFAIL | TERRNO,
 						 "Msgctl error");
 				}
 				tst_exit();
@@ -422,12 +421,12 @@
 			 "Wrong number of children exited in child group %d, Saw %d Expected %d",
 			 child_process, count, (nkids * 2));
 		if (msgctl(tid, IPC_RMID, 0) < 0) {
-			tst_resm(TFAIL|TERRNO, "Msgctl error");
+			tst_resm(TFAIL | TERRNO, "Msgctl error");
 		}
 		tst_exit();
 	}
 	if (msgctl(id, IPC_RMID, 0) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgctl failure in child group %d",
+		tst_resm(TFAIL | TERRNO, "Msgctl failure in child group %d",
 			 child_process);
 		tst_exit();
 	}
@@ -442,9 +441,8 @@
 	int id;
 
 	if ((id = msgget(key, 0)) < 0) {
-		tst_resm(TFAIL|TERRNO,
-			 "Msgget error in reader of child group %d",
-			 child);
+		tst_resm(TFAIL | TERRNO,
+			 "Msgget error in reader of child group %d", child);
 		tst_exit();
 	}
 	if (id != tid) {
@@ -455,7 +453,7 @@
 	}
 	for (i = 0; i < nreps; i++) {
 		if ((size = msgrcv(id, &buffer, 100, type, 0)) < 0) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "Msgrcv error in child %d, read # = %d",
 				 (i + 1), child);
 			tst_exit();
@@ -493,9 +491,8 @@
 	int id;
 
 	if ((id = msgget(key, 0)) < 0) {
-		tst_resm(TFAIL|TERRNO,
-			 "Msgget error in writer of child group %d",
-			 child);
+		tst_resm(TFAIL | TERRNO,
+			 "Msgget error in writer of child group %d", child);
 		tst_exit();
 	}
 	if (id != tid) {
@@ -515,7 +512,7 @@
 		buffer.data.len = size;
 		buffer.type = type;
 		if (msgsnd(id, &buffer, size + 1, 0) < 0) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "Msgsnd error in child %d, key =   %lx",
 				 child, key);
 			tst_exit();
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
index cd49434..895a319 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl10.c
@@ -64,8 +64,8 @@
 
 int exp_enos[] = { 0 };		/* List must end with 0 */
 
-#define MAXNPROCS	10000 /*These should be sufficient*/
-#define MAXNREPS	10000 /*Else they srewup the system un-necessarily*/
+#define MAXNPROCS	10000	/*These should be sufficient */
+#define MAXNREPS	10000	/*Else they srewup the system un-necessarily */
 #define FAIL		1
 #define PASS		0
 
@@ -116,8 +116,7 @@
 
 	argv0 = argv[0];
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -274,7 +273,7 @@
 	sighold(SIGTERM);
 	TEST(msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR));
 	if (TEST_RETURN < 0) {
-		tst_resm(TFAIL|TTERRNO, "Msgget error in child %d",
+		tst_resm(TFAIL | TTERRNO, "Msgget error in child %d",
 			 child_process);
 		tst_exit();
 	}
@@ -286,7 +285,7 @@
 		tst_resm(TWARN, "\tFork failed (may be OK if under stress)");
 		TEST(msgctl(tid, IPC_RMID, 0));
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO, "Msgctl error in cleanup");
+			tst_resm(TFAIL | TTERRNO, "Msgctl error in cleanup");
 		}
 		tst_exit();
 	}
@@ -297,7 +296,8 @@
 			tst_resm(TWARN, "self_exec failed");
 			TEST(msgctl(tid, IPC_RMID, 0));
 			if (TEST_RETURN < 0) {
-				tst_resm(TFAIL|TTERRNO, "Msgctl error in cleanup");
+				tst_resm(TFAIL | TTERRNO,
+					 "Msgctl error in cleanup");
 			}
 			tst_exit();
 		}
@@ -312,7 +312,7 @@
 	wait(0);
 	TEST(msgctl(id, IPC_RMID, 0));
 	if (TEST_RETURN < 0) {
-		tst_resm(TFAIL|TTERRNO, "msgctl failed");
+		tst_resm(TFAIL | TTERRNO, "msgctl failed");
 		tst_exit();
 	}
 	exit(PASS);
@@ -324,7 +324,7 @@
 
 	for (i = 0; i < nreps; i++) {
 		if ((size = msgrcv(id, &buffer, 100, 0, 0)) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "Msgrcv error in child %d, read # = %d",
 				 (i + 1), child);
 			tst_exit();
@@ -363,7 +363,7 @@
 		buffer.type = 1;
 		TEST(msgsnd(id, &buffer, size + 1, 0));
 		if (TEST_RETURN < 0) {
-			tst_brkm(TBROK|TTERRNO, cleanup,
+			tst_brkm(TBROK | TTERRNO, cleanup,
 				 "Msgsnd error in child %d, key =   %lx",
 				 child, key);
 		}
diff --git a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
index da0f330..82ad2d3 100644
--- a/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
+++ b/testcases/kernel/syscalls/ipc/msgctl/msgctl11.c
@@ -78,6 +78,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0 };		/* List must end with 0 */
+
 int maxnkids = MAXNKIDS;	/* Used if pid_max is exceeded */
 
 key_t keyarray[MAXNPROCS];
@@ -126,8 +127,7 @@
 
 	argv0 = argv[0];
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -312,7 +312,7 @@
 	}
 
 	if (msgctl(tid, IPC_RMID, 0) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgctl error in cleanup");
+		tst_resm(TFAIL | TERRNO, "Msgctl error in cleanup");
 		tst_exit();
 	}
 }
@@ -326,7 +326,7 @@
 
 	sighold(SIGTERM);
 	if ((id = msgget(key, IPC_CREAT | S_IRUSR | S_IWUSR)) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgget error in child %d",
+		tst_resm(TFAIL | TERRNO, "Msgget error in child %d",
 			 child_process);
 		tst_exit();
 	}
@@ -407,7 +407,7 @@
 					kill(wkidarray[i], SIGTERM);
 				}
 				if (msgctl(tid, IPC_RMID, 0) < 0) {
-					tst_resm(TFAIL|TERRNO,
+					tst_resm(TFAIL | TERRNO,
 						 "Msgctl error");
 				}
 				tst_exit();
@@ -425,12 +425,12 @@
 			 "Wrong number of children exited in child group %d, Saw %d Expected %d",
 			 child_process, count, (nkids * 2));
 		if (msgctl(tid, IPC_RMID, 0) < 0) {
-			tst_resm(TFAIL|TERRNO, "Msgctl error");
+			tst_resm(TFAIL | TERRNO, "Msgctl error");
 		}
 		tst_exit();
 	}
 	if (msgctl(id, IPC_RMID, 0) < 0) {
-		tst_resm(TFAIL|TERRNO, "Msgctl failure in child group %d",
+		tst_resm(TFAIL | TERRNO, "Msgctl failure in child group %d",
 			 child_process);
 		tst_exit();
 	}
@@ -445,9 +445,8 @@
 	int id;
 
 	if ((id = msgget(key, 0)) < 0) {
-		tst_resm(TFAIL|TERRNO,
-			 "Msgget error in reader of child group %d",
-			 child);
+		tst_resm(TFAIL | TERRNO,
+			 "Msgget error in reader of child group %d", child);
 		tst_exit();
 	}
 	if (id != tid) {
@@ -458,7 +457,7 @@
 	}
 	for (i = 0; i < nreps; i++) {
 		if ((size = msgrcv(id, &buffer, 100, type, 0)) < 0) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "Msgrcv error in child %d, read # = %d",
 				 (i + 1), child);
 			tst_exit();
@@ -496,9 +495,8 @@
 	int id;
 
 	if ((id = msgget(key, 0)) < 0) {
-		tst_resm(TFAIL|TERRNO,
-			 "Msgget error in writer of child group %d",
-			 child);
+		tst_resm(TFAIL | TERRNO,
+			 "Msgget error in writer of child group %d", child);
 		tst_exit();
 	}
 	if (id != tid) {
@@ -518,7 +516,7 @@
 		buffer.data.len = size;
 		buffer.type = type;
 		if (msgsnd(id, &buffer, size + 1, 0) < 0) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "Msgsnd error in child %d, key =   %lx",
 				 child, key);
 			tst_exit();
diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
index 19da081..bab609f 100644
--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv05.c
@@ -170,15 +170,15 @@
 		tst_resm(TPASS, "got EINTR as expected");
 		break;
 	default:
-		tst_resm(TFAIL|TTERRNO, "call failed with an unexpected error");
+		tst_resm(TFAIL | TTERRNO,
+			 "call failed with an unexpected error");
 		break;
 	}
 
 	exit(0);
 }
 
-void
-sighandler(int sig)
+void sighandler(int sig)
 {
 	if (sig == SIGHUP)
 		return;
@@ -224,7 +224,7 @@
 	msgkey = getipckey();
 
 	/* create a message queue with read/write permission */
-	if ((msg_q_1 = msgget(msgkey, IPC_CREAT|IPC_EXCL|MSG_RW)) == -1)
+	if ((msg_q_1 = msgget(msgkey, IPC_CREAT | IPC_EXCL | MSG_RW)) == -1)
 		tst_brkm(TBROK, cleanup, "Can't create message queue");
 }
 
diff --git a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
index 9e3be12..716ec5b 100644
--- a/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
+++ b/testcases/kernel/syscalls/ipc/msgsnd/msgsnd05.c
@@ -197,8 +197,7 @@
 	exit(0);
 }
 
-void
-sighandler(int sig)
+void sighandler(int sig)
 {
 	if (sig == SIGHUP)
 		return;
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl01.c b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
index c679fb7..4b5e77e 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl01.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl01.c
@@ -205,8 +205,8 @@
 					 /*FALLTHROUGH*/ case GETZCNT:
 					 /*FALLTHROUGH*/ case GETPID:
 					 /*FALLTHROUGH*/ case GETVAL:
-						(*TC[i].
-						 func_test) (TEST_RETURN);
+						(*TC[i].func_test)
+						    (TEST_RETURN);
 						break;
 					default:
 						(*TC[i].func_test) ();
diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl06.c b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
index dc7da7f..b6f7022 100644
--- a/testcases/kernel/syscalls/ipc/semctl/semctl06.c
+++ b/testcases/kernel/syscalls/ipc/semctl/semctl06.c
@@ -113,8 +113,7 @@
 
 #ifdef UCLINUX
 	char *msg;
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
diff --git a/testcases/kernel/syscalls/ipc/semget/semget05.c b/testcases/kernel/syscalls/ipc/semget/semget05.c
index f9fd4a6..215e557 100644
--- a/testcases/kernel/syscalls/ipc/semget/semget05.c
+++ b/testcases/kernel/syscalls/ipc/semget/semget05.c
@@ -69,6 +69,7 @@
 int MAXIDS = 2048;
 
 int exp_enos[] = { ENOSPC, 0 };	/* 0 terminated list of expected errnos */
+
 int *sem_id_arr = NULL;
 int num_sems = 0;		/* count the semaphores created */
 
@@ -130,7 +131,7 @@
 
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop01.c b/testcases/kernel/syscalls/ipc/semop/semop01.c
index 8e7901c..29b23dc 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop01.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop01.c
@@ -142,7 +142,7 @@
 
 	cleanup();
 
-	  return (0);
+	return (0);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/semop/semop05.c b/testcases/kernel/syscalls/ipc/semop/semop05.c
index 2287297..afa2e28 100644
--- a/testcases/kernel/syscalls/ipc/semop/semop05.c
+++ b/testcases/kernel/syscalls/ipc/semop/semop05.c
@@ -255,8 +255,7 @@
 	exit(0);
 }
 
-void
-sighandler(int sig)
+void sighandler(int sig)
 {
 	if (sig == SIGHUP)
 		return;
diff --git a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
index 0b37e9e..6f3e746 100644
--- a/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
+++ b/testcases/kernel/syscalls/ipc/shmdt/shmdt01.c
@@ -133,7 +133,8 @@
 {
 	/* stat the shared memory segment */
 	if (shmctl(shm_id_1, IPC_STAT, &buf) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "could not stat in signal handler");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "could not stat in signal handler");
 
 	if (buf.shm_nattch != 0) {
 		tst_resm(TFAIL, "# of attaches is incorrect");
@@ -174,7 +175,7 @@
 		siglongjmp(env, 1);
 	} else
 		tst_brkm(TBROK, cleanup,
-		    "received an unexpected signal: %d", sig);
+			 "received an unexpected signal: %d", sig);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/ipc/shmget/shmget05.c b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
index 3eeb9c1..6a7ec04 100644
--- a/testcases/kernel/syscalls/ipc/shmget/shmget05.c
+++ b/testcases/kernel/syscalls/ipc/shmget/shmget05.c
@@ -97,7 +97,7 @@
 
 		cleanup();
 
-	 } else {	/* parent */
+	} else {		/* parent */
 		/* wait for the child to return */
 		if (waitpid(pid, NULL, 0) == -1) {
 			tst_brkm(TBROK, cleanup, "waitpid failed");
diff --git a/testcases/kernel/syscalls/keyctl/keyctl01.c b/testcases/kernel/syscalls/keyctl/keyctl01.c
index 29b82a0..9d329b5 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl01.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl01.c
@@ -58,9 +58,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "keyctl01";/* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 2;	/* total number of tests in this file.   */
+char *TCID = "keyctl01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
 #if HAVE_KEYCTL_SYSCALL
 /* Extern Global Functions */
@@ -81,7 +81,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -106,14 +107,16 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int ret;
 	int lc;
 	key_serial_t ne_key;
@@ -134,17 +137,17 @@
 
 			/* Call keyctl() and ask for a keyring's ID. */
 			ret = syscall(__NR_keyctl, KEYCTL_GET_KEYRING_ID,
-					KEY_SPEC_USER_SESSION_KEYRING);
+				      KEY_SPEC_USER_SESSION_KEYRING);
 			if (ret != -1) {
-				tst_resm(TPASS,"KEYCTL_GET_KEYRING_ID succeeded");
+				tst_resm(TPASS,
+					 "KEYCTL_GET_KEYRING_ID succeeded");
 			} else {
-		 		tst_resm(TFAIL|TERRNO, "KEYCTL_GET_KEYRING_ID");
+				tst_resm(TFAIL | TERRNO,
+					 "KEYCTL_GET_KEYRING_ID");
 			}
 
-			for (ne_key = INT32_MAX; ne_key > INT32_MIN;
-			    ne_key--) {
-				ret = syscall(__NR_keyctl, KEYCTL_READ,
-					ne_key);
+			for (ne_key = INT32_MAX; ne_key > INT32_MIN; ne_key--) {
+				ret = syscall(__NR_keyctl, KEYCTL_READ, ne_key);
 				if (ret == -1 && errno == ENOKEY)
 					break;
 			}
@@ -152,18 +155,18 @@
 			/* Call keyctl. */
 			ret = syscall(__NR_keyctl, KEYCTL_REVOKE, ne_key);
 			if (ret != -1) {
-				tst_resm(TFAIL|TERRNO,
-					"KEYCTL_REVOKE succeeded unexpectedly");
+				tst_resm(TFAIL | TERRNO,
+					 "KEYCTL_REVOKE succeeded unexpectedly");
 			} else {
 				/* Check for the correct error num. */
 				if (errno == ENOKEY) {
-					tst_resm(TPASS|TERRNO,
-						"KEYCTL_REVOKE got expected "
-						"errno");
+					tst_resm(TPASS | TERRNO,
+						 "KEYCTL_REVOKE got expected "
+						 "errno");
 				} else {
-					tst_resm(TFAIL|TERRNO,
-						"KEYCTL_REVOKE got unexpected "
-						"errno");
+					tst_resm(TFAIL | TERRNO,
+						 "KEYCTL_REVOKE got unexpected "
+						 "errno");
 				}
 
 			}
@@ -176,8 +179,7 @@
 	return (1);
 }
 #else
-int
-main(void)
+int main(void)
 {
 	tst_resm(TCONF, "keyctl syscall support not available on system");
 	tst_exit();
diff --git a/testcases/kernel/syscalls/kill/kill01.c b/testcases/kernel/syscalls/kill/kill01.c
index fd10654..0e9cfb2 100644
--- a/testcases/kernel/syscalls/kill/kill01.c
+++ b/testcases/kernel/syscalls/kill/kill01.c
@@ -69,7 +69,6 @@
 char *TCID = "kill01";
 int TST_TOTAL = 1;
 
-
 #define TEST_SIG SIGKILL
 
 int main(int ac, char **av)
@@ -115,7 +114,7 @@
 		if (TEST_RETURN == -1) {
 			tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-		 }
+		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -148,7 +147,7 @@
 	int exno = 1;
 
 	pause();
-	  exit(exno);
+	exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill02.c b/testcases/kernel/syscalls/kill/kill02.c
index ce1ab31..00fcbff 100644
--- a/testcases/kernel/syscalls/kill/kill02.c
+++ b/testcases/kernel/syscalls/kill/kill02.c
@@ -247,7 +247,8 @@
 						tst_resm(TWARN,
 							 "Child process may not have been killed.");
 					}
-					tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "fork failed");
 				}
 #else
 				(void)child2_rout();
@@ -260,7 +261,8 @@
 					tst_resm(TWARN,
 						 "Child process may not have been killed.");
 				}
-				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "fork failed");
 			}
 
 		} else if (pid1 == 0) {
@@ -272,7 +274,8 @@
 			    (argv0, "ndddddd", 3, pipe1_fd[1], pipe2_fd[1],
 			     pipeA_fd[0], pipeA_fd[1], pipeB_fd[0],
 			     pipeB_fd[1]) < 0) {
-				tst_brkm(TBROK|TERRNO, cleanup, "self_exec() failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "self_exec() failed");
 			}
 #else
 			(void)child1_rout();
@@ -281,7 +284,7 @@
 			/*
 			 * Fork failed.
 			 */
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 		}
 	}
 
@@ -352,7 +355,7 @@
 	TEST(kill(0, SIGUSR1));
 
 	if (TEST_RETURN == -1) {
-		tst_brkm(TBROK|TERRNO, NULL, "kill() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "kill() failed");
 		(void)par_kill();
 		cleanup();
 	}
@@ -385,7 +388,7 @@
 		/*
 		 * The read system call failed.
 		 */
-		tst_brkm(TBROK|TERRNO, NULL, "read() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "read() failed");
 		(void)par_kill();
 		cleanup();
 	}
@@ -469,7 +472,8 @@
 			/* This is child B. */
 #ifdef UCLINUX
 			if (self_exec(argv0, "nd", 2, pipeB_fd[1]) < 0) {
-				tst_brkm(TBROK|TERRNO, NULL, "self_exec() failed");
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "self_exec() failed");
 				(void)write(pipe1_fd[1], CHAR_SET_FAILED, 1);
 				exit(0);
 			}
@@ -485,7 +489,7 @@
 			if (kill(pidA, SIGKILL) == -1)
 				tst_resm(TWARN,
 					 "Child process may not have been killed.");
-			tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+			tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 			(void)write(pipe2_fd[1], CHAR_SET_FAILED, 1);
 			exit(0);
 		}
@@ -495,7 +499,7 @@
 		/* This is child A. */
 #ifdef UCLINUX
 		if (self_exec(argv0, "nd", 1, pipeA_fd[1]) < 0) {
-			tst_brkm(TBROK|TERRNO, NULL, "self_exec() failed");
+			tst_brkm(TBROK | TERRNO, NULL, "self_exec() failed");
 			(void)write(pipe1_fd[1], CHAR_SET_FAILED, 1);
 			exit(0);
 		}
@@ -509,7 +513,7 @@
 		/*
 		 *  The fork of child A failed.
 		 */
-		tst_brkm(TBROK|TERRNO, NULL, "fork failed");
+		tst_brkm(TBROK | TERRNO, NULL, "fork failed");
 		(void)write(pipe1_fd[1], CHAR_SET_FAILED, 1);
 		exit(0);
 	}
@@ -717,12 +721,14 @@
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	if (signal(SIGUSR1, SIG_IGN) == SIG_ERR) {
-		tst_brkm(TBROK|TFAIL, NULL, "signal(SIGUSR1, SIG_IGN) failed");
+		tst_brkm(TBROK | TFAIL, NULL,
+			 "signal(SIGUSR1, SIG_IGN) failed");
 		tst_exit();
 	}
 
 	if (signal(SIGCLD, SIG_IGN) == SIG_ERR) {
-		tst_brkm(TBROK|TERRNO, NULL, "signal(SIGCLD, SIG_IGN) failed");
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "signal(SIGCLD, SIG_IGN) failed");
 		tst_exit();
 	}
 
@@ -762,7 +768,7 @@
 	 *  Check for errors.
 	 */
 	if (err_flag == TRUE) {
-		tst_brkm(TBROK|TERRNO, NULL, "pipe() failed");
+		tst_brkm(TBROK | TERRNO, NULL, "pipe() failed");
 		tst_exit();
 	}
 	return;
@@ -797,8 +803,8 @@
 		break;
 	default:
 		tst_resm(TWARN,
-			"Unexpected value %d for who_am_i in usr1_rout()",
-			who_am_i);
+			 "Unexpected value %d for who_am_i in usr1_rout()",
+			 who_am_i);
 		break;
 	}
 
@@ -827,8 +833,9 @@
 	 *  Indicate to child1 that it can remove it's children and itself now.
 	 */
 	if (kill(pid1, SIGUSR2) == -1 && errno != ESRCH) {
-		tst_resm(TWARN|TERRNO, "kill() failed");
-		tst_resm(TWARN, "Child 1 and it's children may still be alive.");
+		tst_resm(TWARN | TERRNO, "kill() failed");
+		tst_resm(TWARN,
+			 "Child 1 and it's children may still be alive.");
 	}
 
 	/*
@@ -852,12 +859,16 @@
 	 *  Remove children A & B.
 	 */
 	if (kill(pidA, SIGKILL) == -1 && errno != ESRCH)
-		tst_resm(TWARN|TERRNO, "kill(%d) failed; child 1's(A) child may still be alive", pidA);
+		tst_resm(TWARN | TERRNO,
+			 "kill(%d) failed; child 1's(A) child may still be alive",
+			 pidA);
 
 	(void)write(pipe1_fd[1], CHAR_SET_PASSED, 1);
 
 	if (kill(pidB, SIGKILL) == -1 && errno != ESRCH)
-		tst_resm(TWARN|TERRNO, "kill(%d) failed; child 1's(B) child may still be alive", pidB);
+		tst_resm(TWARN | TERRNO,
+			 "kill(%d) failed; child 1's(B) child may still be alive",
+			 pidB);
 
 	exit(0);
 
diff --git a/testcases/kernel/syscalls/kill/kill03.c b/testcases/kernel/syscalls/kill/kill03.c
index a2ea82f..e12443b 100644
--- a/testcases/kernel/syscalls/kill/kill03.c
+++ b/testcases/kernel/syscalls/kill/kill03.c
@@ -69,7 +69,6 @@
 char *TCID = "kill03";
 int TST_TOTAL = 1;
 
-
 int exp_enos[] = { EINVAL, 0 };
 
 #define TEST_SIG 2000
@@ -122,7 +121,7 @@
 				 "Expected a return value of -1 got %ld",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO),
 				 TEST_RETURN);
-		 }
+		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -155,7 +154,7 @@
 	int exno = 1;
 
 	pause();
-	  exit(exno);
+	exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill04.c b/testcases/kernel/syscalls/kill/kill04.c
index 1a003bd..7e42c88 100644
--- a/testcases/kernel/syscalls/kill/kill04.c
+++ b/testcases/kernel/syscalls/kill/kill04.c
@@ -69,7 +69,6 @@
 char *TCID = "kill04";
 int TST_TOTAL = 1;
 
-
 int exp_enos[] = { ESRCH, 0 };
 
 #define TEST_SIG SIGKILL
@@ -138,7 +137,7 @@
 				 "Expected a return value of -1 got %ld",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO),
 				 TEST_RETURN);
-		 }
+		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -171,7 +170,7 @@
 	int exno = 1;
 
 	pause();
-	  exit(exno);
+	exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill05.c b/testcases/kernel/syscalls/kill/kill05.c
index b8ead9e..0fe9137 100644
--- a/testcases/kernel/syscalls/kill/kill05.c
+++ b/testcases/kernel/syscalls/kill/kill05.c
@@ -122,7 +122,7 @@
 		do_master_child(av);
 
 	if (waitpid(pid, &status, 0) == -1)
-		tst_resm(TBROK|TERRNO, "waitpid failed");
+		tst_resm(TBROK | TERRNO, "waitpid failed");
 	else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 		tst_resm(TFAIL, "child exited abnormally");
 	else
@@ -163,7 +163,7 @@
 	pid1 = FORK_OR_VFORK();
 
 	if (pid1 == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "Fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "Fork failed");
 
 	if (pid1 == 0) {
 		ltpuser1 = SAFE_GETPWNAM(NULL, user1name);
@@ -233,11 +233,11 @@
 
 	semkey = getipckey();
 
-	if ((shmid1 = shmget(semkey, getpagesize(), 0666|IPC_CREAT)) == -1)
+	if ((shmid1 = shmget(semkey, getpagesize(), 0666 | IPC_CREAT)) == -1)
 		tst_brkm(TBROK, cleanup, "Failed to setup shared memory");
 
 	if ((flag = (int *)shmat(shmid1, 0, 0)) == (int *)-1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "Failed to attach shared memory:%d", shmid1);
 }
 
diff --git a/testcases/kernel/syscalls/kill/kill06.c b/testcases/kernel/syscalls/kill/kill06.c
index cae35ee..8f5883d 100644
--- a/testcases/kernel/syscalls/kill/kill06.c
+++ b/testcases/kernel/syscalls/kill/kill06.c
@@ -70,7 +70,6 @@
 char *TCID = "kill06";
 int TST_TOTAL = 1;
 
-
 #define TEST_SIG SIGKILL
 
 int main(int ac, char **av)
@@ -125,8 +124,8 @@
 			TEST(kill(-getpgrp(), TEST_SIG));
 			sleep(300);
 
-			    tst_resm(TINFO, "%d never recieved a"
-				     " signal", getpid());
+			tst_resm(TINFO, "%d never recieved a"
+				 " signal", getpid());
 			exit(exno);
 		} else {
 			waitpid(pid1, &status, 0);
@@ -169,7 +168,7 @@
 
 	sleep(299);
 
-	    tst_resm(TINFO, "%d never recieved a" " signal", getpid());
+	tst_resm(TINFO, "%d never recieved a" " signal", getpid());
 	exit(exno);
 }
 
diff --git a/testcases/kernel/syscalls/kill/kill07.c b/testcases/kernel/syscalls/kill/kill07.c
index 0f334aa..6cf63f0 100644
--- a/testcases/kernel/syscalls/kill/kill07.c
+++ b/testcases/kernel/syscalls/kill/kill07.c
@@ -151,7 +151,7 @@
 		if (TEST_RETURN == -1) {
 			tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s",
 				 TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-		 }
+		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			/*
@@ -178,7 +178,7 @@
 		}
 		if (shmdt(flag)) {
 			tst_brkm(TBROK, cleanup, "shmdt failed ");
-		 }
+		}
 	}
 	cleanup();
 
@@ -204,7 +204,7 @@
 	int exno = 1;
 
 	sleep(300);
-	  tst_resm(TINFO, "Child never recieved a signal");
+	tst_resm(TINFO, "Child never recieved a signal");
 	exit(exno);
 }
 
diff --git a/testcases/kernel/syscalls/kill/kill08.c b/testcases/kernel/syscalls/kill/kill08.c
index 13cc54c..62f937e 100644
--- a/testcases/kernel/syscalls/kill/kill08.c
+++ b/testcases/kernel/syscalls/kill/kill08.c
@@ -70,7 +70,6 @@
 char *TCID = "kill08";
 int TST_TOTAL = 1;
 
-
 #define TEST_SIG SIGKILL
 
 int main(int ac, char **av)
@@ -124,7 +123,7 @@
 			/* Kill all processes in this process group */
 			TEST(kill(0, TEST_SIG));
 			pause();
-			  exit(exno);
+			exit(exno);
 		} else {
 			waitpid(pid1, &status, 0);
 			if (TEST_RETURN != 0) {
@@ -165,7 +164,7 @@
 	int exno = 1;
 
 	pause();
-	  exit(exno);
+	exit(exno);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/kill/kill09.c b/testcases/kernel/syscalls/kill/kill09.c
index 08f0e5e..e7a68da 100644
--- a/testcases/kernel/syscalls/kill/kill09.c
+++ b/testcases/kernel/syscalls/kill/kill09.c
@@ -149,7 +149,7 @@
 		Tst_count = 0;
 
 		if ((fork_pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 
 		if (fork_pid == 0) {
 #ifdef UCLINUX
@@ -164,11 +164,12 @@
 
 		TEST(kill(fork_pid, SIGKILL));
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "kill(.., SIGKILL) failed");
+			tst_resm(TFAIL | TTERRNO, "kill(.., SIGKILL) failed");
 		else {
 
 			if (STD_FUNCTIONAL_TEST) {
-				tst_resm(TPASS, "kill(%d, SIGKILL) returned %ld",
+				tst_resm(TPASS,
+					 "kill(%d, SIGKILL) returned %ld",
 					 fork_pid, TEST_RETURN);
 			}
 		}
diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
index be5521f..b27c644 100644
--- a/testcases/kernel/syscalls/kill/kill10.c
+++ b/testcases/kernel/syscalls/kill/kill10.c
@@ -221,28 +221,24 @@
 	char *msg;
 	int cnt;
 
-
 	if ((msg = parse_opts(ac, av, options, &help))) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	if (nflag) {
 		if (sscanf(narg, "%i", &num_procs) != 1) {
-			tst_brkm(TBROK, NULL,
-			    "-n option arg is not a number");
+			tst_brkm(TBROK, NULL, "-n option arg is not a number");
 		}
 	}
 	if (gflag) {
 		if (sscanf(garg, "%i", &num_pgrps) != 1) {
-			tst_brkm(TBROK, NULL,
-			    "-g option arg is not a number");
+			tst_brkm(TBROK, NULL, "-g option arg is not a number");
 		}
 	}
 
 	if (dflag) {
 		if (sscanf(darg, "%i", &debug_flag) != 1) {
-			tst_brkm(TBROK, NULL,
-			    "-d option arg is not a number");
+			tst_brkm(TBROK, NULL, "-d option arg is not a number");
 		}
 	}
 
@@ -398,7 +394,7 @@
 		}
 	} else {
 		printf("received unexpected signal %d from %d",
-		    sig, si->si_pid);
+		       sig, si->si_pid);
 	}
 }
 
@@ -425,7 +421,7 @@
 		}
 	} else {
 		printf("received unexpected signal %d from %d",
-		    sig, si->si_pid);
+		       sig, si->si_pid);
 	}
 }
 
@@ -469,7 +465,7 @@
 			printf("%d: forking new Manager\n", mypid);
 		switch (child = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "fork() failed in fork_pgrps(%d)", pgrps_left);
 			break;
 		case 0:
@@ -587,8 +583,8 @@
 			       getppid());
 		if (kill(getppid(), SIGUSR1) == -1) {
 			printf("%d: Couldn't signal master (%d) that we're "
-			    "ready. %d: %s",
-			    mypid, getppid(), errno, strerror(errno));
+			       "ready. %d: %s",
+			       mypid, getppid(), errno, strerror(errno));
 			exit(errno);
 		}
 		usleep(100);
@@ -604,16 +600,16 @@
 		if (child_signal_counter >= num_procs) {
 			confirmed_ready_flag = 0;
 			printf("%d: All %d children reported in\n",
-			    mypid, child_signal_counter);
+			       mypid, child_signal_counter);
 			while (child_signal_counter) {
 				if (debug_flag >= 3)
 					printf("%d: Manager, SIGUSR2 -> %d\n",
 					       mypid, getppid());
 				if (kill(getppid(), SIGUSR2) == -1) {
 					printf("%d: Couldn't signal master "
-					    "(%d) that we're ready. %d: %s\n",
-					    mypid, getppid(), errno,
-					    strerror(errno));
+					       "(%d) that we're ready. %d: %s\n",
+					       mypid, getppid(), errno,
+					       strerror(errno));
 					exit(errno);
 				}
 				usleep(100);
@@ -627,18 +623,21 @@
 {
 	exit(0);
 }
+
 void set_signal_parents(int sig)
 {
 	if (debug_flag >= 8)
 		printf("%d: Child start signaling\n", mypid);
 	signal_parents_flag = 1;
 }
+
 void clear_signal_parents(int sig)
 {
 	if (debug_flag >= 8)
 		printf("%d: Child stop signaling\n", mypid);
 	signal_parents_flag = 0;
 }
+
 void set_confirmed_ready(int sig)
 {
 
@@ -646,6 +645,7 @@
 		printf("%d: Manager confirmed ready\n", mypid);
 	confirmed_ready_flag = 1;
 }
+
 void reset_counter(int sig)
 {
 	checklist_reset(0xFF);
@@ -708,9 +708,8 @@
 			printf("%d: forking new child\n", mypid);
 		switch (child = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "fork() failed in fork_procs(%d)",
-				 procs_left);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "fork() failed in fork_procs(%d)", procs_left);
 			break;
 		case 0:
 			mypid = getpid();
@@ -731,14 +730,14 @@
 				while (signal_parents_flag) {
 					if (debug_flag >= 6)
 						printf("%d: child, SIGUSR2 "
-						    "-> %d\n",
-						    mypid, getppid());
+						       "-> %d\n",
+						       mypid, getppid());
 					if (kill(getppid(), SIGUSR2) == -1) {
 						/* something went wrong */
 						printf("%d: kill(ppid:%d, "
-						    "SIGUSR2) failed. %d: %s",
-						    mypid, getppid(), errno,
-						    strerror(errno));
+						       "SIGUSR2) failed. %d: %s",
+						       mypid, getppid(), errno,
+						       strerror(errno));
 						exit(errno);
 					}
 					usleep(100);
@@ -775,8 +774,8 @@
 {
 	int ret;
 	if ((ret = sigaction(sig, sa, osa)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "sigaction(%d, ...) failed",
-		    sig);
+		tst_brkm(TBROK | TERRNO, cleanup, "sigaction(%d, ...) failed",
+			 sig);
 	}
 	return ret;
 }
diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
index c832920..6047cf4 100644
--- a/testcases/kernel/syscalls/kill/kill12.c
+++ b/testcases/kernel/syscalls/kill/kill12.c
@@ -89,8 +89,7 @@
 #ifdef UCLINUX
 	char *msg;
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
diff --git a/testcases/kernel/syscalls/lchown/lchown01.c b/testcases/kernel/syscalls/lchown/lchown01.c
index b1e94ad..b0ec10f 100644
--- a/testcases/kernel/syscalls/lchown/lchown01.c
+++ b/testcases/kernel/syscalls/lchown/lchown01.c
@@ -95,12 +95,12 @@
 
 static struct test_case_t test_cases[] = {
 	{"Change Owner/Group ids", 700, 701},
-	{"Change Owner id only",   702,  -1},
+	{"Change Owner id only", 702, -1},
 	{"Change Owner/Group ids", 703, 701},
-	{"Change Group id only",    -1, 704},
+	{"Change Group id only", -1, 704},
 	{"Change Group/Group ids", 703, 705},
-	{"Change none",             -1,  -1},
-	{NULL,                       0,   0}
+	{"Change none", -1, -1},
+	{NULL, 0, 0}
 };
 
 void setup(void);
@@ -151,18 +151,20 @@
 				 */
 				if (lstat(SFILE, &stat_buf) < 0) {
 					tst_brkm(TFAIL, cleanup, "lstat(2) "
-					         "%s failed, errno %d",
+						 "%s failed, errno %d",
 						 SFILE, TEST_ERRNO);
 				}
 				if (user_id == -1) {
 					if (i > 0)
-						user_id = test_cases[i-1].user_id;
+						user_id =
+						    test_cases[i - 1].user_id;
 					else
 						user_id = geteuid();
 				}
 				if (group_id == -1) {
 					if (i > 0)
-						group_id = test_cases[i-1].group_id;
+						group_id =
+						    test_cases[i - 1].group_id;
 					else
 						group_id = getegid();
 				}
@@ -208,15 +210,15 @@
 	TEST_PAUSE;
 	tst_tmpdir();
 
-	if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
+	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
 		tst_brkm(TBROK, cleanup, "open failed");
 	}
 	if (close(fd) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 	}
 
 	if (symlink(TESTFILE, SFILE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "symlink failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "symlink failed");
 	}
 }
 
diff --git a/testcases/kernel/syscalls/lchown/lchown02.c b/testcases/kernel/syscalls/lchown/lchown02.c
index 0e8a969..1a54d4a 100644
--- a/testcases/kernel/syscalls/lchown/lchown02.c
+++ b/testcases/kernel/syscalls/lchown/lchown02.c
@@ -121,24 +121,24 @@
 	char *pathname;
 	char *desc;
 	int exp_errno;
-	void (*setup)(int pos);
+	void (*setup) (int pos);
 };
 
 static struct test_case_t test_cases[] = {
-	{SFILE1, "Process is not owner/root",    EPERM,   setup_eperm},
-	{SFILE2, "Search permission denied",     EACCES,  setup_eacces},
-	{NULL,   "Address beyond address space", EFAULT,  setup_highaddress},
-	{NULL,   "Unaccessible address space",   EFAULT,  setup_efault},
-	{path,   "Pathname too long",            ENAMETOOLONG, setup_longpath},
-	{SFILE3, "Path contains regular file",   ENOTDIR, setup_enotdir},
-	{"",     "Pathname is empty",            ENOENT,  NULL},
-	{NULL,   NULL,                           0,       NULL}
+	{SFILE1, "Process is not owner/root", EPERM, setup_eperm},
+	{SFILE2, "Search permission denied", EACCES, setup_eacces},
+	{NULL, "Address beyond address space", EFAULT, setup_highaddress},
+	{NULL, "Unaccessible address space", EFAULT, setup_efault},
+	{path, "Pathname too long", ENAMETOOLONG, setup_longpath},
+	{SFILE3, "Path contains regular file", ENOTDIR, setup_enotdir},
+	{"", "Pathname is empty", ENOENT, NULL},
+	{NULL, NULL, 0, NULL}
 };
 
 static struct passwd *ltpuser;
 
 static int exp_enos[] =
-	{EPERM, EACCES, EFAULT, ENAMETOOLONG, ENOENT, ENOTDIR, 0};
+    { EPERM, EACCES, EFAULT, ENAMETOOLONG, ENOENT, ENOTDIR, 0 };
 
 void setup(void);
 void cleanup(void);
@@ -244,23 +244,23 @@
 	int fd;
 
 	/* create a testfile */
-	if ((fd = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 
 	/* become root once more */
 	if (seteuid(0) == -1)
-		tst_resm(TBROK|TERRNO, "setuid(0) failed");
+		tst_resm(TBROK | TERRNO, "setuid(0) failed");
 
 	/* create symling to testfile */
 	if (symlink(TEST_FILE1, SFILE1) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "symlink failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "symlink failed");
 
 	/* back to the user nobody */
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_resm(TBROK|TERRNO, "seteuid(%d) failed", ltpuser->pw_uid);
+		tst_resm(TBROK | TERRNO, "seteuid(%d) failed", ltpuser->pw_uid);
 }
 
 /*
@@ -278,14 +278,14 @@
 
 	/* create a test directory */
 	if (mkdir(DIR_TEMP, MODE_RWX) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir failed");
 
 	/* create a file under test directory */
-	if ((fd = open(TEST_FILE2, O_RDWR|O_CREAT, 0666)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+	if ((fd = open(TEST_FILE2, O_RDWR | O_CREAT, 0666)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 
 	/* create a symlink of testfile */
 	if (symlink(TEST_FILE2, SFILE2) < 0) {
@@ -296,7 +296,7 @@
 	/* modify mode permissions on test directory */
 	if (chmod(DIR_TEMP, FILE_MODE) < 0) {
 		tst_brkm(TBROK | TERRNO, cleanup, "chmod(2) %s failed",
-		         DIR_TEMP);
+			 DIR_TEMP);
 	}
 }
 
@@ -343,13 +343,11 @@
 
 	/* create a testfile under temporary directory */
 	if ((fd = open(TFILE3, O_RDWR | O_CREAT, MODE_RWX)) == -1) {
-		tst_brkm(TBROK | TERRNO, cleanup, "open(2) %s failed",
-		         TFILE3);
+		tst_brkm(TBROK | TERRNO, cleanup, "open(2) %s failed", TFILE3);
 	}
 
 	if (close(fd) == -1) {
-		tst_brkm(TBROK | TERRNO, cleanup, "close(2) %s failed",
-		         TFILE3);
+		tst_brkm(TBROK | TERRNO, cleanup, "close(2) %s failed", TFILE3);
 	}
 }
 
@@ -376,8 +374,8 @@
 
 	/* become root again */
 	if (seteuid(0) == -1) {
-		tst_resm(TINFO|TERRNO,
-		         "seteuid(2) failed to set the effective uid to 0");
+		tst_resm(TINFO | TERRNO,
+			 "seteuid(2) failed to set the effective uid to 0");
 	}
 
 	tst_rmdir();
diff --git a/testcases/kernel/syscalls/link/link03.c b/testcases/kernel/syscalls/link/link03.c
index 1cd6f61..9235877 100644
--- a/testcases/kernel/syscalls/link/link03.c
+++ b/testcases/kernel/syscalls/link/link03.c
@@ -155,7 +155,6 @@
 	int nlinks;
 	char lname[255];
 
-
     /***************************************************************
      * parse standard options
      ***************************************************************/
diff --git a/testcases/kernel/syscalls/link/link04.c b/testcases/kernel/syscalls/link/link04.c
index 931c12c..b46af70 100644
--- a/testcases/kernel/syscalls/link/link04.c
+++ b/testcases/kernel/syscalls/link/link04.c
@@ -268,8 +268,8 @@
 							 "link(<%s>, <%s>) Failed, errno=%d, expected errno:%d",
 							 desc1, desc2,
 							 TEST_ERRNO,
-							 Test_cases[ind].
-							 exp_errno);
+							 Test_cases
+							 [ind].exp_errno);
 				} else
 					Tst_count++;
 			} else {
diff --git a/testcases/kernel/syscalls/link/link06.c b/testcases/kernel/syscalls/link/link06.c
index be8c6ff..5272243 100644
--- a/testcases/kernel/syscalls/link/link06.c
+++ b/testcases/kernel/syscalls/link/link06.c
@@ -96,6 +96,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { EACCES, 0 };
+
 char *file1, *file2;		/* oldpath and newpath */
 
 /***********************************************************************
@@ -198,15 +199,15 @@
 	file2 = "new_test_file";
 
 	if ((nobody_pwd = getpwnam("nobody")) == NULL) {
-		tst_brkm(TCONF|TERRNO, cleanup,
-			"couldn't determine login information for nobody");
+		tst_brkm(TCONF | TERRNO, cleanup,
+			 "couldn't determine login information for nobody");
 	}
 
 	/* set effective user ID to "nobody"'s UID using seteuid */
 	if (seteuid(nobody_pwd->pw_uid) != 0) {
-		tst_brkm(TCONF|TERRNO, cleanup,
-			"seteuid to %d for %s failed",
-			nobody_pwd->pw_uid, nobody_pwd->pw_name);
+		tst_brkm(TCONF | TERRNO, cleanup,
+			 "seteuid to %d for %s failed",
+			 nobody_pwd->pw_uid, nobody_pwd->pw_name);
 	}
 
 }
@@ -219,7 +220,7 @@
 {
 	/* set back effective user ID to ROOT_USER using seteuid */
 	if (seteuid(ROOT_USER) != 0) {
-		tst_resm(TFAIL|TERRNO, "seteuid to %d failed", ROOT_USER);
+		tst_resm(TFAIL | TERRNO, "seteuid to %d failed", ROOT_USER);
 	}
 
 	/*
diff --git a/testcases/kernel/syscalls/link/link07.c b/testcases/kernel/syscalls/link/link07.c
index 10eba2d..3ca7cf6 100644
--- a/testcases/kernel/syscalls/link/link07.c
+++ b/testcases/kernel/syscalls/link/link07.c
@@ -102,6 +102,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { EACCES, 0 };
+
 char *file1, *file2;		/* oldpath and newpath */
 
 /***********************************************************************
@@ -219,15 +220,15 @@
 	file2 = NEW_TEST_FILE2;
 
 	if ((nobody_pwd = getpwnam("nobody")) == NULL) {
-		tst_brkm(TCONF|TERRNO, cleanup,
-			"couldn't determine login information for nobody");
+		tst_brkm(TCONF | TERRNO, cleanup,
+			 "couldn't determine login information for nobody");
 	}
 
 	/* set effective user ID to "nobody"'s UID using seteuid */
 	if (seteuid(nobody_pwd->pw_uid) != 0) {
-		tst_brkm(TCONF|TERRNO, cleanup,
-			"seteuid to %d for %s failed",
-			nobody_pwd->pw_uid, nobody_pwd->pw_name);
+		tst_brkm(TCONF | TERRNO, cleanup,
+			 "seteuid to %d for %s failed",
+			 nobody_pwd->pw_uid, nobody_pwd->pw_name);
 	}
 
 }
@@ -240,7 +241,7 @@
 {
 	/* set back effective user ID to ROOT_USER using seteuid */
 	if (seteuid(ROOT_USER) != 0) {
-		tst_resm(TFAIL|TERRNO, "seteuid(%d) failed", ROOT_USER);
+		tst_resm(TFAIL | TERRNO, "seteuid(%d) failed", ROOT_USER);
 	}
 
 	/*
diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
index ebed315..a1f435f 100644
--- a/testcases/kernel/syscalls/linkat/linkat01.c
+++ b/testcases/kernel/syscalls/linkat/linkat01.c
@@ -73,7 +73,7 @@
 static void setup();
 static void cleanup();
 static void setup_every_copy();
-static void mylinkat_test(struct test_struct* desc);
+static void mylinkat_test(struct test_struct *desc);
 
 #define TEST_DIR1 "olddir"
 #define TEST_DIR2 "newdir"
@@ -87,90 +87,106 @@
 
 static char dpathname[PATH_MAX];
 static char spathname[PATH_MAX];
-static int olddirfd, newdirfd = -1, cwd_fd = AT_FDCWD, stdinfd = 0, badfd = -1, deldirfd;
+static int olddirfd, newdirfd = -1, cwd_fd = AT_FDCWD, stdinfd = 0, badfd =
+    -1, deldirfd;
 
 struct test_struct {
-	int* oldfd;
-	const char* oldfn;
-	int* newfd;
-	const char* newfn;
+	int *oldfd;
+	const char *oldfn;
+	int *newfd;
+	const char *newfn;
 	int flags;
-	const char* referencefn1;
-	const char* referencefn2;
+	const char *referencefn1;
+	const char *referencefn2;
 	int expected_errno;
 } test_desc[] = {
 	/* 1. relative paths */
-	{ &olddirfd, TEST_FILE1, &newdirfd, TEST_FILE1, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 2. abs path at source */
-	{ &olddirfd, spathname, &newdirfd, TEST_FILE1, 0,
-	  0, 0, 0 },
-	/* 3. abs path at dst */
-	{ &olddirfd, TEST_FILE1, &newdirfd, dpathname, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 4. relative paths to cwd */
-	{ &cwd_fd, TEST_DIR1"/"TEST_FILE1, &newdirfd, TEST_FILE1, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 5. relative paths to cwd */
-	{ &olddirfd, TEST_FILE1, &cwd_fd, TEST_DIR2"/"TEST_FILE1, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 6. abs path at source */
-	{ &cwd_fd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0 },
-	/* 7. abs path at dst */
-	{ &olddirfd, TEST_FILE1, &cwd_fd, dpathname, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 8. relative paths to invalid */
-	{ &stdinfd, TEST_DIR1"/"TEST_FILE1, &newdirfd, TEST_FILE1, 0,
-	  0, 0, ENOTDIR },
-	/* 9. relative paths to invalid */
-	{ &olddirfd, TEST_FILE1, &stdinfd, TEST_DIR2"/"TEST_FILE1, 0,
-	  0, 0, ENOTDIR },
-	/* 10. abs path at source */
-	{ &stdinfd, spathname, &newdirfd, TEST_FILE1, 0,
-	  0, 0, 0 },
-	/* 11. abs path at dst */
-	{ &olddirfd, TEST_FILE1, &stdinfd, dpathname, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-	/* 12. relative paths to bad */
-	{ &badfd, TEST_DIR1"/"TEST_FILE1, &newdirfd, TEST_FILE1, 0,
-	  0, 0, EBADF },
-	/* 13. relative paths to bad */
-	{ &olddirfd, TEST_FILE1, &badfd, TEST_DIR2"/"TEST_FILE1, 0,
-	  0, 0, EBADF },
-	/* 14. abs path at source */
-	{ &badfd, spathname, &newdirfd, TEST_FILE1, 0,
-	  0, 0, 0 },
-	/* 15. abs path at dst */
-	{ &olddirfd, TEST_FILE1, &badfd, dpathname, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* 16. relative paths to deleted */
-	{ &deldirfd, TEST_DIR1"/"TEST_FILE1, &newdirfd, TEST_FILE1, 0,
-	  0, 0, ENOENT },
-	/* 17. relative paths to deleted */
-	{ &olddirfd, TEST_FILE1, &deldirfd, TEST_DIR2"/"TEST_FILE1, 0,
-	  0, 0, ENOENT },
-	/* 18. abs path at source */
-	{ &deldirfd, spathname, &newdirfd, TEST_FILE1, 0,
-	  0, 0, 0 },
-	/* 19. abs path at dst */
-	{ &olddirfd, TEST_FILE1, &deldirfd, dpathname, 0,
-	  TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-	/* 20. x-device link */
-	{ &cwd_fd, "/proc/cpuinfo", &newdirfd, TEST_FILE1, 0,
-	  0, 0, EXDEV },
-	/* 21. directory link */
-	{ &olddirfd, ".", &newdirfd, TEST_FILE1, 0,
-	  0, 0, EPERM },
-	/* 22. invalid flag */
-	{ &olddirfd, TEST_FILE1, &newdirfd, TEST_FILE1, 1,
-	  0, 0, EINVAL },
-	/* 23. fifo link */
-	/* XXX (garrcoop): Removed because it hangs the overall test. Need to
-	 * find a legitimate means to exercise this functionality, if in fact
-	 * it's a valid testcase -- which it should be.
-	 */
-	/* { &olddirfd, TEST_FIFO, &newdirfd, TEST_FILE1, 0,
-	  TEST_DIR1"/"TEST_FIFO, TEST_DIR2"/"TEST_FILE1, 0 } */
+	{
+	&olddirfd, TEST_FILE1, &newdirfd, TEST_FILE1, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 2. abs path at source */
+	{
+	&olddirfd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0},
+	    /* 3. abs path at dst */
+	{
+	&olddirfd, TEST_FILE1, &newdirfd, dpathname, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 4. relative paths to cwd */
+	{
+	&cwd_fd, TEST_DIR1 "/" TEST_FILE1, &newdirfd, TEST_FILE1, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 5. relative paths to cwd */
+	{
+	&olddirfd, TEST_FILE1, &cwd_fd, TEST_DIR2 "/" TEST_FILE1, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 6. abs path at source */
+	{
+	&cwd_fd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0},
+	    /* 7. abs path at dst */
+	{
+	&olddirfd, TEST_FILE1, &cwd_fd, dpathname, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 8. relative paths to invalid */
+	{
+	&stdinfd, TEST_DIR1 "/" TEST_FILE1, &newdirfd, TEST_FILE1, 0,
+		    0, 0, ENOTDIR},
+	    /* 9. relative paths to invalid */
+	{
+	&olddirfd, TEST_FILE1, &stdinfd, TEST_DIR2 "/" TEST_FILE1, 0,
+		    0, 0, ENOTDIR},
+	    /* 10. abs path at source */
+	{
+	&stdinfd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0},
+	    /* 11. abs path at dst */
+	{
+	&olddirfd, TEST_FILE1, &stdinfd, dpathname, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 12. relative paths to bad */
+	{
+	&badfd, TEST_DIR1 "/" TEST_FILE1, &newdirfd, TEST_FILE1, 0,
+		    0, 0, EBADF},
+	    /* 13. relative paths to bad */
+	{
+	&olddirfd, TEST_FILE1, &badfd, TEST_DIR2 "/" TEST_FILE1, 0,
+		    0, 0, EBADF},
+	    /* 14. abs path at source */
+	{
+	&badfd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0},
+	    /* 15. abs path at dst */
+	{
+	&olddirfd, TEST_FILE1, &badfd, dpathname, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 16. relative paths to deleted */
+	{
+	&deldirfd, TEST_DIR1 "/" TEST_FILE1, &newdirfd, TEST_FILE1, 0,
+		    0, 0, ENOENT},
+	    /* 17. relative paths to deleted */
+	{
+	&olddirfd, TEST_FILE1, &deldirfd, TEST_DIR2 "/" TEST_FILE1, 0,
+		    0, 0, ENOENT},
+	    /* 18. abs path at source */
+	{
+	&deldirfd, spathname, &newdirfd, TEST_FILE1, 0, 0, 0, 0},
+	    /* 19. abs path at dst */
+	{
+	&olddirfd, TEST_FILE1, &deldirfd, dpathname, 0,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* 20. x-device link */
+	{
+	&cwd_fd, "/proc/cpuinfo", &newdirfd, TEST_FILE1, 0, 0, 0, EXDEV},
+	    /* 21. directory link */
+	{
+	&olddirfd, ".", &newdirfd, TEST_FILE1, 0, 0, 0, EPERM},
+	    /* 22. invalid flag */
+	{
+	&olddirfd, TEST_FILE1, &newdirfd, TEST_FILE1, 1, 0, 0, EINVAL},
+	    /* 23. fifo link */
+	    /* XXX (garrcoop): Removed because it hangs the overall test. Need to
+	     * find a legitimate means to exercise this functionality, if in fact
+	     * it's a valid testcase -- which it should be.
+	     */
+	    /* { &olddirfd, TEST_FIFO, &newdirfd, TEST_FILE1, 0,
+	       TEST_DIR1"/"TEST_FIFO, TEST_DIR2"/"TEST_FILE1, 0 } */
 };
 
 char *TCID = "linkat01";
@@ -228,50 +244,51 @@
 	close(newdirfd);
 	rmobj(TEST_DIR2, NULL);
 
-	SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed",
-			TEST_DIR2, 0700);
+	SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed", TEST_DIR2, 0700);
 	newdirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed",
-			TEST_DIR2, O_DIRECTORY);
+				  TEST_DIR2, O_DIRECTORY);
 }
 
-static void mylinkat_test(struct test_struct* desc)
+static void mylinkat_test(struct test_struct *desc)
 {
 	int fd;
 
-	TEST(mylinkat(*desc->oldfd, desc->oldfn, *desc->newfd, desc->newfn, desc->flags));
+	TEST(mylinkat
+	     (*desc->oldfd, desc->oldfn, *desc->newfd, desc->newfn,
+	      desc->flags));
 
 	if (TEST_ERRNO == desc->expected_errno) {
 
 		if (STD_FUNCTIONAL_TEST) {
 
 			if (TEST_RETURN == 0 && desc->referencefn1 != NULL) {
-				int tnum=rand(), vnum=~tnum;
+				int tnum = rand(), vnum = ~tnum;
 				fd = SAFE_OPEN(cleanup, desc->referencefn1,
-				    O_RDWR);
+					       O_RDWR);
 				SAFE_WRITE(cleanup, 1, fd, &tnum, sizeof(tnum));
 				SAFE_CLOSE(cleanup, fd);
 
 				fd = SAFE_OPEN(cleanup, desc->referencefn2,
-				    O_RDONLY);
+					       O_RDONLY);
 				SAFE_READ(cleanup, 1, fd, &vnum, sizeof(vnum));
 				SAFE_CLOSE(cleanup, fd);
 
 				if (tnum == vnum)
 					tst_resm(TPASS,
-					    "linkat is functionality correct");
+						 "linkat is functionality correct");
 				else {
 					tst_resm(TFAIL,
-						"The link file's content isn't "
-						"as same as the original file's "
-						"although linkat returned 0");
+						 "The link file's content isn't "
+						 "as same as the original file's "
+						 "although linkat returned 0");
 				}
 			} else {
 				if (TEST_RETURN == 0)
 					tst_resm(TPASS,
-					    "linkat succeeded as expected");
+						 "linkat succeeded as expected");
 				else
-					tst_resm(TPASS|TTERRNO,
-					    "linkat failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "linkat failed as expected");
 			}
 		} else
 			tst_resm(TPASS, "Test passed");
@@ -279,10 +296,10 @@
 		if (TEST_RETURN == 0)
 			tst_resm(TFAIL, "linkat succeeded unexpectedly");
 		else
-			tst_resm(TFAIL|TTERRNO,
-			    "linkat failed unexpectedly; expected %d - %s",
-			    desc->expected_errno,
-			    strerror(desc->expected_errno));
+			tst_resm(TFAIL | TTERRNO,
+				 "linkat failed unexpectedly; expected %d - %s",
+				 desc->expected_errno,
+				 strerror(desc->expected_errno));
 	}
 }
 
@@ -296,25 +313,25 @@
 
 	cwd = get_current_dir_name();
 	if (cwd == NULL)
-		tst_brkm(TFAIL|TERRNO, cleanup,
-			"Failed to get current working directory");
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "Failed to get current working directory");
 	else {
 
 		SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed", TEST_DIR1, 0700);
 		SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed", TEST_DIR3, 0700);
 		olddirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed",
-						TEST_DIR1, O_DIRECTORY);
+					  TEST_DIR1, O_DIRECTORY);
 		deldirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed",
-						TEST_DIR3, O_DIRECTORY);
+					  TEST_DIR3, O_DIRECTORY);
 		SUCCEED_OR_DIE(rmdir, "rmdir(%s) failed", TEST_DIR3);
 		SUCCEED_OR_DIE(close, "close(%d) failed",
-				SUCCEED_OR_DIE(open, "open(%s, 0x%x, %o) "
-						     "failed",
-						TEST_DIR1"/"TEST_FILE1,
-						O_CREAT | O_EXCL, 0600));
+			       SUCCEED_OR_DIE(open, "open(%s, 0x%x, %o) "
+					      "failed",
+					      TEST_DIR1 "/" TEST_FILE1,
+					      O_CREAT | O_EXCL, 0600));
 
 		SUCCEED_OR_DIE(mkfifo, "mkfifo(%s, %o) failed",
-				TEST_DIR1"/"TEST_FIFO, 0600);
+			       TEST_DIR1 "/" TEST_FIFO, 0600);
 
 		snprintf(dpathname, sizeof(dpathname), DPATHNAME_FMT, cwd);
 		snprintf(spathname, sizeof(spathname), SPATHNAME_FMT, cwd);
diff --git a/testcases/kernel/syscalls/listen/listen01.c b/testcases/kernel/syscalls/listen/listen01.c
index 732ac9f..56e0fe0 100644
--- a/testcases/kernel/syscalls/listen/listen01.c
+++ b/testcases/kernel/syscalls/listen/listen01.c
@@ -84,7 +84,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EOPNOTSUPP, 0 };
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/llseek/llseek01.c b/testcases/kernel/syscalls/llseek/llseek01.c
index bc54920..be2c1f8 100644
--- a/testcases/kernel/syscalls/llseek/llseek01.c
+++ b/testcases/kernel/syscalls/llseek/llseek01.c
@@ -67,7 +67,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <unistd.h>
@@ -121,7 +121,7 @@
 		 */
 		TEST(lseek64(fildes, (loff_t) (80 * BUFSIZ), SEEK_SET));
 
-		if (TEST_RETURN == (loff_t) -1) {
+		if (TEST_RETURN == (loff_t) - 1) {
 			tst_resm(TFAIL, "llseek on (%s) Failed, errno=%d : %s",
 				 TEMP_FILE, TEST_ERRNO, strerror(TEST_ERRNO));
 			continue;
@@ -130,8 +130,8 @@
 		if (STD_FUNCTIONAL_TEST) {
 			if (TEST_RETURN != (loff_t) (80 * BUFSIZ)) {
 				tst_resm(TFAIL, "llseek() returned incorrect "
-					 "value %"PRId64", expected %d",
-					 (int64_t)offset, BUFSIZ);
+					 "value %" PRId64 ", expected %d",
+					 (int64_t) offset, BUFSIZ);
 				continue;
 			}
 
diff --git a/testcases/kernel/syscalls/llseek/llseek02.c b/testcases/kernel/syscalls/llseek/llseek02.c
index 495c64c..2f3a6f3 100644
--- a/testcases/kernel/syscalls/llseek/llseek02.c
+++ b/testcases/kernel/syscalls/llseek/llseek02.c
@@ -68,7 +68,7 @@
  */
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <stdio.h>
@@ -163,7 +163,8 @@
 			TEST(lseek64(fildes, (loff_t) 0, whence));
 
 			if (TEST_RETURN != (loff_t) - 1) {
-				tst_resm(TFAIL, "llseek() returned %ld, expected"
+				tst_resm(TFAIL,
+					 "llseek() returned %ld, expected"
 					 " -1, errno:%d", TEST_RETURN,
 					 Test_cases[ind].exp_errno);
 				continue;
diff --git a/testcases/kernel/syscalls/lseek/lseek03.c b/testcases/kernel/syscalls/lseek/lseek03.c
index 8284072..d15b082 100644
--- a/testcases/kernel/syscalls/lseek/lseek03.c
+++ b/testcases/kernel/syscalls/lseek/lseek03.c
@@ -46,7 +46,7 @@
 
 static char fname[255];
 static int fd;
-static int whences[] = {5, -1, 7};
+static int whences[] = { 5, -1, 7 };
 
 char *TCID = "lseek03";
 int TST_TOTAL = sizeof(whences) / sizeof(*whences);
@@ -69,7 +69,7 @@
 		for (i = 0; i < TST_TOTAL; i++) {
 
 			/* Call lseek(2) */
-			TEST(lseek(fd, (off_t)1, whences[i]));
+			TEST(lseek(fd, (off_t) 1, whences[i]));
 
 			/* check return code */
 			if (TEST_RETURN == -1) {
diff --git a/testcases/kernel/syscalls/lseek/lseek07.c b/testcases/kernel/syscalls/lseek/lseek07.c
index bd67265..32a8310 100644
--- a/testcases/kernel/syscalls/lseek/lseek07.c
+++ b/testcases/kernel/syscalls/lseek/lseek07.c
@@ -120,8 +120,8 @@
 		TEST(lseek(fildes, offset, SEEK_SET));
 
 		if (TEST_RETURN == (off_t) - 1) {
-			tst_resm(TFAIL|TTERRNO, "lseek on (%s) failed",
-			    TEMP_FILE);
+			tst_resm(TFAIL | TTERRNO, "lseek on (%s) failed",
+				 TEMP_FILE);
 			continue;
 		}
 		/*
@@ -136,7 +136,8 @@
 			if (TEST_RETURN != offset) {
 				tst_resm(TFAIL, "lseek() returned "
 					 "incorrect value %ld, expected "
-					 "%"PRId64, TEST_RETURN, (int64_t)offset);
+					 "%" PRId64, TEST_RETURN,
+					 (int64_t) offset);
 				continue;
 			}
 			/*
@@ -145,8 +146,8 @@
 			 */
 			if (write(fildes, write_buf2, strlen(write_buf2)) !=
 			    strlen(write_buf2)) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "write() failed to write additional data");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "write() failed to write additional data");
 			}
 
 			/*
diff --git a/testcases/kernel/syscalls/lseek/lseek08.c b/testcases/kernel/syscalls/lseek/lseek08.c
index d0ff005..6c8fd8e 100644
--- a/testcases/kernel/syscalls/lseek/lseek08.c
+++ b/testcases/kernel/syscalls/lseek/lseek08.c
@@ -113,8 +113,8 @@
 		TEST(lseek(fildes, 0, SEEK_END));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO,
-			    "lseek of %s failed", TEMP_FILE);
+			tst_resm(TFAIL | TTERRNO,
+				 "lseek of %s failed", TEMP_FILE);
 			continue;
 		}
 		/*
@@ -178,20 +178,20 @@
 
 	/* Creat/open a temporary file under above directory */
 	if ((fildes = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TEMP_FILE, FILE_MODE);
 	}
 
 	/* Write data into temporary file */
 	if (write(fildes, write_buf, strlen(write_buf)) <= 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "writing to %s failed", TEMP_FILE);
 	}
 
 	/* Get the size of the file using fstat */
 	if (fstat(fildes, &stat_buf) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "fstat of %s failed", TEMP_FILE);
 	}
 
diff --git a/testcases/kernel/syscalls/lseek/lseek10.c b/testcases/kernel/syscalls/lseek/lseek10.c
index 0b574e3..4ce9669 100644
--- a/testcases/kernel/syscalls/lseek/lseek10.c
+++ b/testcases/kernel/syscalls/lseek/lseek10.c
@@ -164,7 +164,8 @@
 			TEST(lseek(fildes, 0, whence));
 
 			if (TEST_RETURN != (off_t) - 1) {
-				tst_resm(TFAIL, "lseek() returned %ld, expected "
+				tst_resm(TFAIL,
+					 "lseek() returned %ld, expected "
 					 "-1, errno:%d", TEST_RETURN,
 					 Test_cases[ind].exp_errno);
 				continue;
diff --git a/testcases/kernel/syscalls/lstat/lstat02.c b/testcases/kernel/syscalls/lstat/lstat02.c
index d9649e8..cf2dcbc 100644
--- a/testcases/kernel/syscalls/lstat/lstat02.c
+++ b/testcases/kernel/syscalls/lstat/lstat02.c
@@ -189,7 +189,8 @@
 
 			/* Check return code from lstat(2) */
 			if (TEST_RETURN != -1) {
-				tst_resm(TFAIL, "lstat(2) returned %ld, expected"
+				tst_resm(TFAIL,
+					 "lstat(2) returned %ld, expected"
 					 " -1, errno:%d", TEST_RETURN,
 					 Test_cases[ind].exp_errno);
 				continue;
diff --git a/testcases/kernel/syscalls/madvise/madvise01.c b/testcases/kernel/syscalls/madvise/madvise01.c
index addd651..fe0de10 100644
--- a/testcases/kernel/syscalls/madvise/madvise01.c
+++ b/testcases/kernel/syscalls/madvise/madvise01.c
@@ -115,9 +115,9 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		fd = open(filename, O_RDWR|O_CREAT, 0664);
+		fd = open(filename, O_RDWR | O_CREAT, 0664);
 		if (fd < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 #ifdef MM_DEBUG
 		tst_resm(TINFO, "filename = %s opened successfully", filename);
 #endif
@@ -126,7 +126,8 @@
 		   [32 * 1280 = 40960] */
 		for (i = 0; i < 1280; i++)
 			if (write(fd, str_for_file, strlen(str_for_file)) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "write failed");
 
 		if (fstat(fd, &stat) == -1)
 			tst_brkm(TBROK, cleanup, "fstat failed");
@@ -157,7 +158,7 @@
 		check_and_print("MADV_DONTNEED");
 
 		if (munmap(file, stat.st_size) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "munmap failed");
 
 		close(fd);
 	}
@@ -187,7 +188,7 @@
 static void check_and_print(char *advice)
 {
 	if (TEST_RETURN == -1)
-		tst_resm(TFAIL|TTERRNO, "madvise test for %s failed", advice);
+		tst_resm(TFAIL | TTERRNO, "madvise test for %s failed", advice);
 	else if (STD_FUNCTIONAL_TEST)
 		tst_resm(TPASS, "madvise test for %s PASSED", advice);
 }
diff --git a/testcases/kernel/syscalls/madvise/madvise02.c b/testcases/kernel/syscalls/madvise/madvise02.c
index 5661352..84e0321 100644
--- a/testcases/kernel/syscalls/madvise/madvise02.c
+++ b/testcases/kernel/syscalls/madvise/madvise02.c
@@ -132,7 +132,7 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		fd = open(filename, O_RDWR|O_CREAT, 0664);
+		fd = open(filename, O_RDWR | O_CREAT, 0664);
 		if (fd < 0)
 			tst_brkm(TBROK, cleanup, "open failed");
 #ifdef MM_DEBUG
@@ -144,14 +144,15 @@
 		/* Writing 16 pages of random data into this file */
 		for (i = 0; i < (pagesize / 2); i++)
 			if (write(fd, str_for_file, strlen(str_for_file)) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "write failed");
 
 		if (fstat(fd, &stat) == -1)
 			tst_brkm(TBROK, cleanup, "fstat failed");
 
 		file = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
 		if (file == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 #ifdef MM_DEBUG
 		tst_resm(TINFO, "The Page size is %d", pagesize);
 #endif
@@ -173,7 +174,7 @@
 		check_and_print(EINVAL);
 
 		if (munmap(file, stat.st_size) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "munmap failed");
 #endif /* if !defined(UCLINUX) */
 
 		/* Test Case 4 */
@@ -207,7 +208,8 @@
 		len = (high - low) + pagesize;
 
 		if (munmap(high, stat.st_size / 2) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap [high] failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "munmap [high] failed");
 
 		TEST(madvise(low, len, MADV_NORMAL));
 		check_and_print(ENOMEM);
@@ -215,7 +217,8 @@
 		/* Test Case 5 */
 		/* Unmap the file map from low */
 		if (munmap(low, stat.st_size / 2) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap [low] failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "munmap [low] failed");
 		/* Create one memory segment using malloc */
 		ptr_memory_allocated = (char *)malloc(5 * pagesize);
 		/*
@@ -224,8 +227,8 @@
 		 */
 		tmp_memory_allocated = ptr_memory_allocated;
 		tmp_memory_allocated =
-			(char *)(((unsigned long)tmp_memory_allocated +
-				pagesize - 1) & ~(pagesize - 1));
+		    (char *)(((unsigned long)tmp_memory_allocated +
+			      pagesize - 1) & ~(pagesize - 1));
 
 		TEST(madvise
 		     (tmp_memory_allocated, 5 * pagesize, MADV_WILLNEED));
@@ -260,11 +263,11 @@
 {
 	if (TEST_RETURN == -1) {
 		if (TEST_ERRNO == expected_errno)
-			tst_resm(TPASS|TTERRNO, "failed as expected");
+			tst_resm(TPASS | TTERRNO, "failed as expected");
 		else
-			tst_resm(TFAIL|TTERRNO,
-			    "failed unexpectedly; expected - %d : %s",
-			    expected_errno, strerror(expected_errno));
+			tst_resm(TFAIL | TTERRNO,
+				 "failed unexpectedly; expected - %d : %s",
+				 expected_errno, strerror(expected_errno));
 	} else {
 		tst_resm(TFAIL, "madvise succeeded unexpectedly");
 	}
diff --git a/testcases/kernel/syscalls/madvise/madvise03.c b/testcases/kernel/syscalls/madvise/madvise03.c
index 5ebcdc0..b0c17e8 100644
--- a/testcases/kernel/syscalls/madvise/madvise03.c
+++ b/testcases/kernel/syscalls/madvise/madvise03.c
@@ -88,27 +88,28 @@
 		   [32 * 1280 = 40960] */
 		for (i = 0; i < 1280; i++)
 			if (write(fd, str_for_file, strlen(str_for_file)) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "write failed");
 
 		if (fstat(fd, &stat) == -1)
 			tst_brkm(TBROK, cleanup, "fstat failed");
 
 		file = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
 		if (file == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 		/* Allocate shared memory segment */
 		shm_size = get_shmmax();
 
 #define min(a, b) ((a) < (b) ? (a) : (b))
-		shmid1 = shmget(IPC_PRIVATE, min(1024*1024, shm_size),
-				IPC_CREAT|IPC_EXCL|0701);
+		shmid1 = shmget(IPC_PRIVATE, min(1024 * 1024, shm_size),
+				IPC_CREAT | IPC_EXCL | 0701);
 		if (shmid1 == -1)
 			tst_brkm(TBROK, cleanup, "shmget failed");
 
 		/* Attach shared memory segment to an address selected by the system */
 		addr1 = shmat(shmid1, NULL, 0);
-		if (addr1 == (void *) -1)
+		if (addr1 == (void *)-1)
 			tst_brkm(TBROK, cleanup, "shmat error");
 
 		/* (1) Test case for MADV_REMOVE */
@@ -125,7 +126,7 @@
 
 		/* Finally Unmapping the whole file */
 		if (munmap(file, stat.st_size) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "munmap failed");
 
 		close(fd);
 	}
@@ -148,8 +149,8 @@
 {
 	if (shmid1 != -1)
 		if (shmctl(shmid1, IPC_RMID, 0) < 0)
-			tst_resm(TBROK|TERRNO,
-			    "shmctl(.., IPC_RMID, ..) failed");
+			tst_resm(TBROK | TERRNO,
+				 "shmctl(.., IPC_RMID, ..) failed");
 
 	TEST_CLEANUP;
 
@@ -171,7 +172,7 @@
 static long get_shmmax(void)
 {
 	long maxsize;
-	
+
 	SAFE_FILE_SCANF(cleanup, "/proc/sys/kernel/shmmax", "%ld", &maxsize);
 
 	return maxsize;
@@ -181,6 +182,6 @@
 {
 	/* "Requires 2.6.16+" were the original comments */
 	tst_brkm(TCONF, NULL,
-	    "this system doesn't have required madvise support");
+		 "this system doesn't have required madvise support");
 }
 #endif
diff --git a/testcases/kernel/syscalls/madvise/madvise04.c b/testcases/kernel/syscalls/madvise/madvise04.c
index 3708f52..8824256 100644
--- a/testcases/kernel/syscalls/madvise/madvise04.c
+++ b/testcases/kernel/syscalls/madvise/madvise04.c
@@ -80,14 +80,15 @@
 		   [32 * 1280 = 40960] */
 		for (i = 0; i < 1280; i++)
 			if (write(fd, str_for_file, strlen(str_for_file)) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "write failed");
 
 		if (fstat(fd, &stat) == -1)
 			tst_brkm(TBROK, cleanup, "fstat failed");
 
 		file = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
 		if (file == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 		/* (1) Test case for MADV_DONTDUMP */
 		TEST(madvise(file, stat.st_size, MADV_DONTDUMP));
@@ -99,7 +100,7 @@
 
 		/* Finally Unmapping the whole file */
 		if (munmap(file, stat.st_size) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "munmap failed");
 
 		close(fd);
 	}
diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
index 67f6c89..7668bdf 100644
--- a/testcases/kernel/syscalls/mbind/mbind01.c
+++ b/testcases/kernel/syscalls/mbind/mbind01.c
@@ -66,14 +66,14 @@
 #include "numa_helper.h"
 
 char *TCID = "mbind01";
-int  TST_TOTAL = 2;
+int TST_TOTAL = 2;
 
 #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H && \
 	HAVE_MPOL_CONSTANTS
 
 #define MEM_LENGTH	      (4 * 1024 * 1024)
 
-static int  testno;
+static int testno;
 
 enum test_type {
 	NORMAL,
@@ -105,77 +105,77 @@
  *		(only we can do is simulate 1-node NUMA)
  */
 static struct test_case tcase[] = {
-	{ /* case00 */
-		.policy		= MPOL_DEFAULT,
-		.from_node	= NONE,
-		.ret		= 0,
-		.err		= 0,
-	},
-	{ /* case01 */
-		.policy		= MPOL_DEFAULT,
-		.from_node	= SELF, /* target exists */
-		.ret		= -1,
-		.err		= EINVAL,
-	},
-	{ /* case02 */
-		.policy		= MPOL_BIND,
-		.from_node	= NONE, /* no target */
-		.ret		= -1,
-		.err		= EINVAL,
-	},
-	{ /* case03 */
-		.policy		= MPOL_BIND,
-		.from_node	= SELF,
-		.ret		= 0,
-		.err		= 0,
-	},
-	{ /* case04 */
-		.policy		= MPOL_INTERLEAVE,
-		.from_node	= NONE, /* no target */
-		.ret		= -1,
-		.err		= EINVAL,
-	},
-	{ /* case05 */
-		.policy		= MPOL_INTERLEAVE,
-		.from_node	= SELF,
-		.ret		= 0,
-		.err		= 0,
-	},
-	{ /* case06 */
-		.policy		= MPOL_PREFERRED,
-		.from_node	= NONE,
-		.ret		= 0,
-		.err		= 0,
-	},
-	{ /* case07 */
-		.policy		= MPOL_PREFERRED,
-		.from_node	= SELF,
-		.ret		= 0,
-		.err		= 0,
-	},
-	{ /* case08 */
-		.policy		= -1, /* unknown policy */
-		.from_node	= NONE,
-		.ret		= -1,
-		.err		= EINVAL,
-	},
-	{ /* case09 */
-		.policy		= MPOL_DEFAULT,
-		.from_node	= NONE,
-		.flags		= -1, /* invalid flags */
-		.ret		= -1,
-		.err		= EINVAL,
-	},
-	{ /* case10 */
-		.ttype		= INVALID_POINTER,
-		.policy		= MPOL_PREFERRED,
-		.from_node	= SELF,
-		.ret		= -1,
-		.err		= EFAULT,
-	},
+	{			/* case00 */
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case01 */
+	 .policy = MPOL_DEFAULT,
+	 .from_node = SELF,	/* target exists */
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			/* case02 */
+	 .policy = MPOL_BIND,
+	 .from_node = NONE,	/* no target */
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			/* case03 */
+	 .policy = MPOL_BIND,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case04 */
+	 .policy = MPOL_INTERLEAVE,
+	 .from_node = NONE,	/* no target */
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			/* case05 */
+	 .policy = MPOL_INTERLEAVE,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case06 */
+	 .policy = MPOL_PREFERRED,
+	 .from_node = NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case07 */
+	 .policy = MPOL_PREFERRED,
+	 .from_node = SELF,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			/* case08 */
+	 .policy = -1,		/* unknown policy */
+	 .from_node = NONE,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			/* case09 */
+	 .policy = MPOL_DEFAULT,
+	 .from_node = NONE,
+	 .flags = -1,		/* invalid flags */
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			/* case10 */
+	 .ttype = INVALID_POINTER,
+	 .policy = MPOL_PREFERRED,
+	 .from_node = SELF,
+	 .ret = -1,
+	 .err = EFAULT,
+	 },
 };
 
-static int  do_test(struct test_case *tc);
+static int do_test(struct test_case *tc);
 static void setup(void);
 static void cleanup(void);
 
@@ -196,8 +196,8 @@
 		for (i = 0; i < testno; i++) {
 			tst_resm(TINFO, "(case%02d) START", i);
 			ret = do_test(&tcase[i]);
-			tst_resm((ret == 0 ? TPASS : TFAIL|TERRNO),
-				    "(case%02d) END", i);
+			tst_resm((ret == 0 ? TPASS : TFAIL | TERRNO),
+				 "(case%02d) END", i);
 		}
 	}
 	cleanup();
@@ -222,7 +222,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 1, &test_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 	nodemask = malloc(sizeof(nodemask_t));
@@ -233,10 +233,10 @@
 #else
 	numa_bitmask_setbit(nodemask, test_node);
 #endif
-	p = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-		    0, 0);
+	p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
+		 0, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 
 	if (tc->ttype == INVALID_POINTER)
 		invalid_nodemask = (unsigned long *)0xc0000000;
@@ -244,18 +244,17 @@
 	errno = 0;
 	if (tc->from_node == NONE)
 		TEST(ret = syscall(__NR_mbind, p, len, tc->policy,
-				    NULL, 0, tc->flags));
+				   NULL, 0, tc->flags));
 	else if (tc->ttype == INVALID_POINTER)
 		TEST(ret = syscall(__NR_mbind, p, len, tc->policy,
-				    invalid_nodemask, maxnode, tc->flags));
+				   invalid_nodemask, maxnode, tc->flags));
 	else
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 		TEST(ret = syscall(__NR_mbind, p, len, tc->policy,
-				    nodemask, maxnode, tc->flags));
+				   nodemask, maxnode, tc->flags));
 #else
 		TEST(ret = syscall(__NR_mbind, p, len, tc->policy,
-				    nodemask->maskp, nodemask->size,
-				    tc->flags));
+				   nodemask->maskp, nodemask->size, tc->flags));
 #endif
 
 	err = TEST_ERRNO;
@@ -265,13 +264,13 @@
 	/* Check policy of the allocated memory */
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
 	TEST(syscall(__NR_get_mempolicy, &policy, getnodemask,
-			    maxnode, p, MPOL_F_ADDR));
+		     maxnode, p, MPOL_F_ADDR));
 #else
 	TEST(syscall(__NR_get_mempolicy, &policy, getnodemask->maskp,
-			    getnodemask->size, p, MPOL_F_ADDR));
+		     getnodemask->size, p, MPOL_F_ADDR));
 #endif
 	if (TEST_RETURN < 0) {
-		tst_resm(TFAIL|TERRNO, "get_mempolicy failed");
+		tst_resm(TFAIL | TERRNO, "get_mempolicy failed");
 		return -1;
 	}
 
@@ -288,9 +287,9 @@
 	else
 		cmp_ok = ((tc->policy == policy) &&
 #if !defined(LIBNUMA_API_VERSION) || LIBNUMA_API_VERSION < 2
-			    nodemask_equal(nodemask, getnodemask));
+			  nodemask_equal(nodemask, getnodemask));
 #else
-			    numa_bitmask_equal(nodemask, getnodemask));
+			  numa_bitmask_equal(nodemask, getnodemask));
 #endif
 TEST_END:
 	result = ((err != tc->err) || (!cmp_ok));
diff --git a/testcases/kernel/syscalls/memset/memset01.c b/testcases/kernel/syscalls/memset/memset01.c
index 5472a31..fb5f23d 100644
--- a/testcases/kernel/syscalls/memset/memset01.c
+++ b/testcases/kernel/syscalls/memset/memset01.c
@@ -59,7 +59,6 @@
 int block_number;
 int TST_TOTAL = 1;
 
-
 int anyfail();
 void setup();
 int blenter();
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
index 1c52b62..fb68b38 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages01.c
@@ -50,10 +50,10 @@
 #include "migrate_pages_common.h"
 
 char *TCID = "migrate_pages01";
-int  TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
 option_t options[] = {
-	{ NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
 #if defined(__NR_migrate_pages) && HAVE_NUMA_H && HAVE_NUMAIF_H
@@ -69,7 +69,7 @@
 {
 	tst_resm(TINFO, "test_empty_mask");
 	TEST(syscall(__NR_migrate_pages, 0, sane_max_node,
-		sane_old_nodes, sane_new_nodes));
+		     sane_old_nodes, sane_new_nodes));
 	check_ret(0);
 }
 
@@ -82,22 +82,20 @@
 
 	tst_resm(TINFO, "test_invalid_pid -1");
 	TEST(syscall(__NR_migrate_pages, invalid_pid, sane_max_node,
-		sane_old_nodes, sane_new_nodes));
+		     sane_old_nodes, sane_new_nodes));
 	check_ret(-1);
 	check_errno(ESRCH);
 
 	tst_resm(TINFO, "test_invalid_pid pid_max+1");
 	fp = fopen(pid_max, "r");
 	if (fp == NULL)
-		tst_brkm(TBROK, cleanup,
-			"Could not open %s", pid_max);
+		tst_brkm(TBROK, cleanup, "Could not open %s", pid_max);
 	if (!fgets(buff, sizeof(buff), fp))
-		tst_brkm(TBROK, cleanup,
-			"Could not read %s", pid_max);
+		tst_brkm(TBROK, cleanup, "Could not read %s", pid_max);
 	fclose(fp);
 	invalid_pid = atol(buff) + 1;
 	TEST(syscall(__NR_migrate_pages, invalid_pid, sane_max_node,
-		sane_old_nodes, sane_new_nodes));
+		     sane_old_nodes, sane_new_nodes));
 	check_ret(-1);
 	check_errno(ESRCH);
 }
@@ -106,7 +104,7 @@
 {
 	tst_resm(TINFO, "test_invalid_masksize");
 	TEST(syscall(__NR_migrate_pages, 0, -1, sane_old_nodes,
-		sane_new_nodes));
+		     sane_new_nodes));
 	check_ret(-1);
 	check_errno(EINVAL);
 }
@@ -122,15 +120,15 @@
 
 	tst_resm(TINFO, "test_invalid_mem invalid prot");
 	p = mmap(NULL, getpagesize(), PROT_NONE,
-		MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+		 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 	TEST(syscall(__NR_migrate_pages, 0, sane_max_node, p, p));
 	check_ret(-1);
 	check_errno(EFAULT);
 
 	if (munmap(p, getpagesize()) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "munmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "munmap");
 	tst_resm(TINFO, "test_invalid_mem unmmaped");
 	TEST(syscall(__NR_migrate_pages, 0, sane_max_node, p, p));
 	check_ret(-1);
@@ -147,8 +145,8 @@
 	tst_resm(TINFO, "test_invalid_nodes");
 	ret = get_allowed_nodes_arr(NH_MEMS, &num_nodes, &nodes);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup,
-			"get_allowed_nodes_arr: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "get_allowed_nodes_arr: %d", ret);
 
 	/* get first node which is not in nodes */
 	for (i = 0; i < num_nodes; i++, invalid_node++)
@@ -162,7 +160,7 @@
 		set_bit(new_nodes, invalid_node, 1);
 
 		TEST(syscall(__NR_migrate_pages, 0, sane_max_node,
-			old_nodes, new_nodes));
+			     old_nodes, new_nodes));
 		check_ret(-1);
 		check_errno(EINVAL);
 		free(old_nodes);
@@ -189,26 +187,23 @@
 	child_pid = fork();
 	switch (child_pid) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		break;
 	case 0:
 		ltpuser = getpwnam(nobody_uid);
 		if (ltpuser == NULL)
-			tst_brkm(TBROK|TERRNO, NULL,
-					"getpwnam failed");
+			tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 		if (setuid(ltpuser->pw_uid) == -1)
-			tst_brkm(TBROK|TERRNO, NULL,
-					"setuid(%u) failed",
-					ltpuser->pw_uid);
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "setuid(%u) failed", ltpuser->pw_uid);
 		TEST(syscall(__NR_migrate_pages, parent_pid,
-			sane_max_node, sane_old_nodes,
-			sane_new_nodes));
+			     sane_max_node, sane_old_nodes, sane_new_nodes));
 		ret |= check_ret(-1);
 		ret |= check_errno(EPERM);
 		exit(ret);
 	default:
 		if (waitpid(child_pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child returns %d", status);
 	}
@@ -249,10 +244,11 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 1, &node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes_arr: %d", ret);
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes_arr: %d",
+			 ret);
 
 	sane_max_node = get_max_node();
-	sane_nodemask_size = sane_max_node/8+1;
+	sane_nodemask_size = sane_max_node / 8 + 1;
 	sane_old_nodes = SAFE_MALLOC(NULL, sane_nodemask_size);
 	sane_new_nodes = SAFE_MALLOC(NULL, sane_nodemask_size);
 	memset(sane_old_nodes, 0, sane_nodemask_size);
@@ -275,6 +271,6 @@
 int main(void)
 {
 	tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages"
-			" or libnuma is not available");
+		 " or libnuma is not available");
 }
 #endif
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
index b1c294a..12affab 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
@@ -64,7 +64,7 @@
 #define NODE_MIN_FREEMEM (32*1024*1024)
 
 char *TCID = "migrate_pages02";
-int  TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
 #if defined(__NR_migrate_pages) && HAVE_NUMA_H && HAVE_NUMAIF_H
 static const char nobody_uid[] = "nobody";
@@ -76,7 +76,7 @@
 static void cleanup(void);
 
 option_t options[] = {
-	{ NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
 static void print_mem_stats(pid_t pid, int node)
@@ -98,7 +98,7 @@
 	/* dump node free mem */
 	node_size = numa_node_size64(node, &freep);
 	tst_resm(TINFO, "Node id: %d, size: %lld, free: %lld",
-		node, node_size, freep);
+		 node, node_size, freep);
 }
 
 static int migrate_to_node(pid_t pid, int node)
@@ -108,9 +108,9 @@
 	int i;
 
 	tst_resm(TINFO, "pid(%d) migrate pid %d to node -> %d",
-		getpid(), pid, node);
+		 getpid(), pid, node);
 	max_node = get_max_node();
-	nodemask_size = max_node/8+1;
+	nodemask_size = max_node / 8 + 1;
 	old_nodes = SAFE_MALLOC(NULL, nodemask_size);
 	new_nodes = SAFE_MALLOC(NULL, nodemask_size);
 
@@ -123,11 +123,11 @@
 	TEST(syscall(__NR_migrate_pages, pid, max_node, old_nodes, new_nodes));
 	if (TEST_RETURN != 0) {
 		if (TEST_RETURN < 0)
-			tst_resm(TFAIL|TERRNO, "migrate_pages failed "
-					"ret: %ld, ", TEST_RETURN);
+			tst_resm(TFAIL | TERRNO, "migrate_pages failed "
+				 "ret: %ld, ", TEST_RETURN);
 		else
 			tst_resm(TWARN, "migrate_pages could not migrate all "
-				"pages, not migrated: %ld", TEST_RETURN);
+				 "pages, not migrated: %ld", TEST_RETURN);
 		print_mem_stats(pid, node);
 	}
 	free(old_nodes);
@@ -141,10 +141,10 @@
 	int ret;
 
 	ret = syscall(__NR_get_mempolicy, &node, NULL, (unsigned long)0,
-			(unsigned long) addr, MPOL_F_NODE | MPOL_F_ADDR);
+		      (unsigned long)addr, MPOL_F_NODE | MPOL_F_ADDR);
 	if (ret == -1) {
 		tst_resm(TBROK | TERRNO, "error getting memory policy "
-				"for page %p", addr);
+			 "for page %p", addr);
 	}
 	return node;
 }
@@ -156,19 +156,17 @@
 	node = addr_on_node(addr);
 	if (node == exp_node) {
 		tst_resm(TPASS, "pid(%d) addr %p is on expected node: %d",
-				getpid(), addr, exp_node);
+			 getpid(), addr, exp_node);
 		return 0;
 	} else {
 		tst_resm(TFAIL, "pid(%d) addr %p not on expected node: %d "
-				", expected %d", getpid(), addr, node,
-				exp_node);
+			 ", expected %d", getpid(), addr, node, exp_node);
 		print_mem_stats(0, exp_node);
 		return 1;
 	}
 }
 
-static void test_migrate_current_process(int node1, int node2,
-	int cap_sys_nice)
+static void test_migrate_current_process(int node1, int node2, int cap_sys_nice)
 {
 	char *testp, *testp2;
 	int ret, status;
@@ -186,10 +184,10 @@
 	free(testp);
 
 	/* parent can migrate shared memory with CAP_SYS_NICE */
-	testp2 = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
-		MAP_ANONYMOUS|MAP_SHARED, 0, 0);
+	testp2 = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE,
+		      MAP_ANONYMOUS | MAP_SHARED, 0, 0);
 	if (testp2 == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	testp2[0] = 1;
 	tst_resm(TINFO, "shared anonymous: %p", testp2);
 	migrate_to_node(0, node2);
@@ -200,17 +198,18 @@
 	child = fork();
 	switch (child) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		break;
 	case 0:
 		tst_resm(TINFO, "child shared anonymous, cap_sys_nice: %d",
-			cap_sys_nice);
+			 cap_sys_nice);
 		testp = SAFE_MALLOC(NULL, getpagesize());
 		testp[0] = 1;
 		testp2[0] = 1;
 		if (!cap_sys_nice)
 			if (seteuid(ltpuser->pw_uid) == -1)
-				tst_brkm(TBROK|TERRNO, NULL, "seteuid failed");
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "seteuid failed");
 
 		migrate_to_node(0, node1);
 		/* child can migrate non-shared memory */
@@ -221,7 +220,7 @@
 		exit(ret);
 	default:
 		if (waitpid(child, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child returns %d", status);
 		if (cap_sys_nice)
@@ -234,8 +233,7 @@
 	}
 }
 
-static void test_migrate_other_process(int node1, int node2,
-	int cap_sys_nice)
+static void test_migrate_other_process(int node1, int node2, int cap_sys_nice)
 {
 	char *testp;
 	int status, ret, tmp;
@@ -255,7 +253,7 @@
 	child = fork();
 	switch (child) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		break;
 	case 0:
 		close(child_ready[0]);
@@ -269,13 +267,13 @@
 		check_addr_on_node(testp, node1);
 
 		if (seteuid(ltpuser->pw_uid) == -1)
-			tst_brkm(TBROK|TERRNO, NULL, "seteuid failed");
+			tst_brkm(TBROK | TERRNO, NULL, "seteuid failed");
 
 		/* signal parent it's OK to migrate child and wait */
 		if (write(child_ready[1], &tmp, 1) != 1)
-			tst_brkm(TBROK|TERRNO, NULL, "write #1 failed");
+			tst_brkm(TBROK | TERRNO, NULL, "write #1 failed");
 		if (read(pages_migrated[0], &tmp, 1) != 1)
-			tst_brkm(TBROK|TERRNO, NULL, "read #1 failed");
+			tst_brkm(TBROK | TERRNO, NULL, "read #1 failed");
 
 		/* parent can migrate child process with same euid */
 		/* parent can migrate child process with CAP_SYS_NICE */
@@ -291,18 +289,19 @@
 
 		if (!cap_sys_nice)
 			if (seteuid(ltpuser->pw_uid) == -1)
-				tst_brkm(TBROK|TERRNO, NULL, "seteuid failed");
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "seteuid failed");
 
 		/* wait until child is ready on node1, then migrate and
 		 * signal to check current node */
 		if (read(child_ready[0], &tmp, 1) != 1)
-			tst_brkm(TBROK|TERRNO, NULL, "read #2 failed");
+			tst_brkm(TBROK | TERRNO, NULL, "read #2 failed");
 		migrate_to_node(child, node2);
 		if (write(pages_migrated[1], &tmp, 1) != 1)
-			tst_brkm(TBROK|TERRNO, NULL, "write #2 failed");
+			tst_brkm(TBROK | TERRNO, NULL, "write #2 failed");
 
 		if (waitpid(child, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid");
 		if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
 			tst_resm(TFAIL, "child returns %d", status);
 		close(child_ready[0]);
@@ -311,7 +310,8 @@
 		/* reset euid, so this testcase can be used in loop */
 		if (!cap_sys_nice)
 			if (seteuid(0) == -1)
-				tst_brkm(TBROK|TERRNO, NULL, "seteuid failed");
+				tst_brkm(TBROK | TERRNO, NULL,
+					 "seteuid failed");
 	}
 }
 
@@ -350,11 +350,11 @@
 
 	ret = get_allowed_nodes_arr(NH_MEMS, &num_nodes, &nodes);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes(): %d", ret);
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes(): %d", ret);
 
 	if (num_nodes < 2)
 		tst_brkm(TCONF, NULL, "at least 2 allowed NUMA nodes"
-				" are required");
+			 " are required");
 	else if (tst_kvercmp(2, 6, 18) < 0)
 		tst_brkm(TCONF, NULL, "2.6.18 or greater kernel required");
 
@@ -376,7 +376,7 @@
 
 		j = 0;
 		while (j < NODE_MIN_FREEMEM) {
-			if (addr_on_node(p+j) != nodes[i])
+			if (addr_on_node(p + j) != nodes[i])
 				break;
 			j += pagesize;
 		}
@@ -394,12 +394,12 @@
 
 	if (nodeA == -1 || nodeB == -1)
 		tst_brkm(TCONF, NULL, "at least 2 NUMA nodes with "
-			"free mem > %d are needed", NODE_MIN_FREEMEM);
+			 "free mem > %d are needed", NODE_MIN_FREEMEM);
 	tst_resm(TINFO, "Using nodes: %d %d", nodeA, nodeB);
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 
 	TEST_PAUSE;
 }
@@ -414,6 +414,6 @@
 int main(void)
 {
 	tst_brkm(TCONF, NULL, "System doesn't support __NR_migrate_pages"
-			" or libnuma is not available");
+		 " or libnuma is not available");
 }
 #endif
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages_common.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages_common.c
index a96d75d..41cdde8 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages_common.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages_common.c
@@ -29,34 +29,34 @@
 void set_bit(unsigned long *b, unsigned int n, unsigned int v)
 {
 	if (v)
-		b[n/bitsperlong] |= 1UL << (n % bitsperlong);
+		b[n / bitsperlong] |= 1UL << (n % bitsperlong);
 	else
-		b[n/bitsperlong] &= ~(1UL << (n % bitsperlong));
+		b[n / bitsperlong] &= ~(1UL << (n % bitsperlong));
 }
 
 int check_ret(long expected_ret)
 {
 	if (expected_ret == TEST_RETURN) {
 		tst_resm(TPASS, "expected ret success: "
-			"returned value = %ld", TEST_RETURN);
+			 "returned value = %ld", TEST_RETURN);
 		return 0;
 	} else
 		tst_resm(TFAIL, "unexpected failure - "
-			"returned value = %ld, expected: %ld",
-			TEST_RETURN, expected_ret);
+			 "returned value = %ld, expected: %ld",
+			 TEST_RETURN, expected_ret);
 	return 1;
 }
 
 int check_errno(long expected_errno)
 {
 	if (TEST_ERRNO == expected_errno) {
-		tst_resm(TPASS|TTERRNO, "expected failure");
+		tst_resm(TPASS | TTERRNO, "expected failure");
 		return 0;
 	} else if (TEST_ERRNO == 0)
 		tst_resm(TFAIL, "call succeeded unexpectedly");
 	else
-		tst_resm(TFAIL|TTERRNO, "unexpected failure - "
-			"expected = %ld : %s, actual",
-			expected_errno, strerror(expected_errno));
+		tst_resm(TFAIL | TTERRNO, "unexpected failure - "
+			 "expected = %ld : %s, actual",
+			 expected_errno, strerror(expected_errno));
 	return 1;
 }
diff --git a/testcases/kernel/syscalls/mkdir/mkdir02.c b/testcases/kernel/syscalls/mkdir/mkdir02.c
index ce55a23..2b1effd 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir02.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir02.c
@@ -295,7 +295,7 @@
 			tst_resm(TFAIL, "Test to attempt to make a directory"
 				 " inherits group ID FAILED");
 			cleanup();
-		 }
+		}
 
 	}
 
diff --git a/testcases/kernel/syscalls/mkdir/mkdir03.c b/testcases/kernel/syscalls/mkdir/mkdir03.c
index efbb53e..81e7d00 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir03.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir03.c
@@ -250,7 +250,7 @@
 	/* create a file */
 	if ((fileHandle2 = creat(tstfile5, PERMS)) == -1) {
 		tst_brkm(TBROK, cleanup, "creat a file failed");
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mkdir/mkdir04.c b/testcases/kernel/syscalls/mkdir/mkdir04.c
index 663f362..12db2ea 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir04.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir04.c
@@ -134,7 +134,7 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TBROK, cleanup, "fork #1 failed");
-		 }
+		}
 
 		if (pid == 0) {	/* first child */
 			/* set to ltpuser1 */
@@ -146,13 +146,13 @@
 					 ltpuser1->pw_uid, ltpuser1->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 }
+			}
 			/* create the parent directory with 0700 permits */
 			if (mkdir(tstdir1, PERMS) == -1) {
 				tst_resm(TFAIL, "mkdir(%s, %#o) Failed",
 					 tstdir1, PERMS);
 				exit(1);
-			 }
+			}
 			/* create tstdir1 succeeded */
 			exit(0);
 		}
@@ -168,7 +168,7 @@
 
 		if ((pid1 = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TBROK, cleanup, "fork #2 failed");
-		 }
+		}
 
 		if (pid1 == 0) {	/* second child */
 			/* set to ltpuser2 */
@@ -180,17 +180,17 @@
 					 ltpuser2->pw_uid, ltpuser2->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 }
+			}
 			if (mkdir(tstdir2, PERMS) != -1) {
 				tst_resm(TFAIL, "mkdir(%s, %#o) unexpected "
 					 "succeeded", tstdir2, PERMS);
 				exit(1);
-			 }
+			}
 			if (errno != EACCES) {
 				tst_resm(TFAIL, "Expected EACCES got %d",
 					 errno);
 				exit(1);
-			 }
+			}
 			/* PASS */
 			exit(0);
 		}
@@ -222,7 +222,7 @@
 	/* must run as root */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must run this as root");
-	 }
+	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/mkdir/mkdir05.c b/testcases/kernel/syscalls/mkdir/mkdir05.c
index a52ef24..6b97946 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir05.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir05.c
@@ -132,7 +132,7 @@
 			if (stat(tstdir1, &buf) == -1) {
 				tst_brkm(TBROK, cleanup, "failed to stat the "
 					 "new directory");
-			 }
+			}
 			/* check the owner */
 			if (buf.st_uid != geteuid()) {
 				tst_resm(TFAIL, "mkdir() FAILED to set owner ID"
diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
index 0724dcf..b995e9a 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
@@ -115,8 +115,7 @@
 #ifdef UCLINUX
 	char *msg;
 
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
diff --git a/testcases/kernel/syscalls/mknod/mknod02.c b/testcases/kernel/syscalls/mknod/mknod02.c
index 53dc4d1..f53ec18 100644
--- a/testcases/kernel/syscalls/mknod/mknod02.c
+++ b/testcases/kernel/syscalls/mknod/mknod02.c
@@ -241,7 +241,8 @@
 	/* Get the uid/gid of ltpuser */
 	if ((user1 = getpwnam(LTPUSER)) == NULL) {
 		tst_brkm(TBROK | TERRNO, cleanup,
-			"Couldn't determine if %s was in /etc/passwd", LTPUSER);
+			 "Couldn't determine if %s was in /etc/passwd",
+			 LTPUSER);
 	}
 	user1_uid = user1->pw_uid;
 	group1_gid = user1->pw_gid;
diff --git a/testcases/kernel/syscalls/mknod/mknod06.c b/testcases/kernel/syscalls/mknod/mknod06.c
index f3e1803..5a7995f 100644
--- a/testcases/kernel/syscalls/mknod/mknod06.c
+++ b/testcases/kernel/syscalls/mknod/mknod06.c
@@ -179,7 +179,8 @@
 
 			/* Check return code from mknod(2) */
 			if (TEST_RETURN != -1) {
-				tst_resm(TFAIL, "mknod() returned %ld, expected "
+				tst_resm(TFAIL,
+					 "mknod() returned %ld, expected "
 					 "-1, errno:%d", TEST_RETURN,
 					 Test_cases[ind].exp_errno);
 				continue;
diff --git a/testcases/kernel/syscalls/mknod/mknod07.c b/testcases/kernel/syscalls/mknod/mknod07.c
index a89136a..7aa2e17 100644
--- a/testcases/kernel/syscalls/mknod/mknod07.c
+++ b/testcases/kernel/syscalls/mknod/mknod07.c
@@ -91,11 +91,11 @@
 	char *pathname;
 	int mode;
 	int exp_errno;
-	void (*setupfunc)(void);
+	void (*setupfunc) (void);
 } test_cases[] = {
-	{ "tnode_1", SOCKET_MODE, EACCES, NULL },
-	{ "tnode_2", NEWMODE, EACCES, setup2 },
-};
+	{
+	"tnode_1", SOCKET_MODE, EACCES, NULL}, {
+"tnode_2", NEWMODE, EACCES, setup2},};
 
 char *TCID = "mknod07";		/* Test program identifier.    */
 int TST_TOTAL = 2;		/* Total number of test cases. */
@@ -138,13 +138,13 @@
 			}
 
 			if (TEST_ERRNO == test_cases[i].exp_errno)
-				tst_resm(TPASS|TTERRNO,
-				    "mknod failed as expected");
+				tst_resm(TPASS | TTERRNO,
+					 "mknod failed as expected");
 			else
-				tst_resm(TFAIL|TTERRNO,
-				    "mknod failed unexpectedly; expected: "
-				    "%d - %s", test_cases[i].exp_errno,
-				    strerror(test_cases[i].exp_errno));
+				tst_resm(TFAIL | TTERRNO,
+					 "mknod failed unexpectedly; expected: "
+					 "%d - %s", test_cases[i].exp_errno,
+					 strerror(test_cases[i].exp_errno));
 		}
 
 	}
@@ -163,22 +163,22 @@
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "setuid failed");
+		tst_brkm(TBROK | TERRNO, NULL, "setuid failed");
 
 	TEST_PAUSE;
 
 	tst_tmpdir();
 
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir failed");
 
 	if (chmod(DIR_TEMP, MODE_RWX) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod failed");
 
 	if (chdir(DIR_TEMP) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "chdir failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "chdir failed");
 
 	for (i = 0; i < TST_TOTAL; i++)
 		if (test_cases[i].setupfunc != NULL)
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index b10b00c..dca8913 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -74,6 +74,7 @@
 int fds[TEST_CASES];
 char *filenames[TEST_CASES];
 int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
+
 dev_t dev;
 
 int mymknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
diff --git a/testcases/kernel/syscalls/mlock/mlock01.c b/testcases/kernel/syscalls/mlock/mlock01.c
index ee80437..958230d 100644
--- a/testcases/kernel/syscalls/mlock/mlock01.c
+++ b/testcases/kernel/syscalls/mlock/mlock01.c
@@ -66,16 +66,17 @@
 struct test_case_t {
 	void **addr;
 	int len;
-	void (*setupfunc)();
+	void (*setupfunc) ();
 } TC[] = {
 	/* mlock should return ENOMEM when some or all of the address
 	 * range pointed to by addr and len are not valid mapped pages
 	 * in the address space of the process
 	 */
-	{ &addr1, 1, setup1},
-	{ &addr1, 1024, setup1},
-	{ &addr1, 1024 * 1024, setup1},
-	{ &addr1, 1024 * 1024 * 10, setup1}
+	{
+	&addr1, 1, setup1}, {
+	&addr1, 1024, setup1}, {
+	&addr1, 1024 * 1024, setup1}, {
+	&addr1, 1024 * 1024 * 10, setup1}
 };
 
 #if !defined(UCLINUX)
@@ -114,7 +115,7 @@
 			 * should fail as designed, but this application
 			 * */
 			if (TEST_RETURN == -1)
-				tst_resm(TFAIL|TTERRNO, "mlock failed");
+				tst_resm(TFAIL | TTERRNO, "mlock failed");
 			else
 				tst_resm(TPASS, "mlock passed");
 		}
diff --git a/testcases/kernel/syscalls/mlock/mlock02.c b/testcases/kernel/syscalls/mlock/mlock02.c
index 05936f9..c272b60 100644
--- a/testcases/kernel/syscalls/mlock/mlock02.c
+++ b/testcases/kernel/syscalls/mlock/mlock02.c
@@ -72,7 +72,8 @@
 	 * range pointed to by addr and len are not valid mapped pages
 	 * in the address space of the process
 	 */
-	{ &addr1, 1024, ENOMEM, setup1 }
+	{
+	&addr1, 1024, ENOMEM, setup1}
 };
 
 #if !defined(UCLINUX)
@@ -102,16 +103,17 @@
 
 			if (TEST_RETURN == -1) {
 				if (TEST_ERRNO != TC[i].error)
-					tst_brkm(TFAIL|TTERRNO, cleanup,
-					    "mlock didn't fail as expected; "
-					    "expected - %d : %s",
-					    TC[i].error, strerror(TC[i].error));
+					tst_brkm(TFAIL | TTERRNO, cleanup,
+						 "mlock didn't fail as expected; "
+						 "expected - %d : %s",
+						 TC[i].error,
+						 strerror(TC[i].error));
 				else
-					tst_resm(TPASS|TTERRNO,
-					    "mlock failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "mlock failed as expected");
 			} else
 				tst_brkm(TFAIL, cleanup,
-				    "mlock succeeded unexpectedly");
+					 "mlock succeeded unexpectedly");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/mlock/mlock03.c b/testcases/kernel/syscalls/mlock/mlock03.c
index da469cb..445472e 100644
--- a/testcases/kernel/syscalls/mlock/mlock03.c
+++ b/testcases/kernel/syscalls/mlock/mlock03.c
@@ -64,7 +64,7 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		fp = fopen("/proc/self/maps", "r");
 		if (fp == NULL)
-			tst_brkm(TBROK|TERRNO, cleanup, "fopen");
+			tst_brkm(TBROK | TERRNO, cleanup, "fopen");
 		while (!feof(fp)) {
 			if (!fgets(b, KB - 1, fp))
 				break;
@@ -73,23 +73,24 @@
 
 			/* Record the initial stack size. */
 			if (lc == 0 && strstr(b, "[stack]") != NULL)
-				first = (to - from)/KB;
+				first = (to - from) / KB;
 
 			switch (lc & 1) {
 			case 0:
-				if (mlock((const void*)from, to-from) == -1)
-					tst_resm(TINFO|TERRNO, "mlock failed");
+				if (mlock((const void *)from, to - from) == -1)
+					tst_resm(TINFO | TERRNO,
+						 "mlock failed");
 				break;
 			case 1:
-				if (munlock((void*)from, to - from) == -1)
-					tst_resm(TINFO|TERRNO,
-					    "munlock failed");
+				if (munlock((void *)from, to - from) == -1)
+					tst_resm(TINFO | TERRNO,
+						 "munlock failed");
 				break;
 			default:
 				break;
 			}
 			tst_resm(TINFO, "%s from %lx to %0lx",
-				(lc&1) ? "munlock" : "mlock", from, to);
+				 (lc & 1) ? "munlock" : "mlock", from, to);
 
 			/* Record the final stack size. */
 			if (strstr(b, "[stack]") != NULL)
diff --git a/testcases/kernel/syscalls/mlock/mlock04.c b/testcases/kernel/syscalls/mlock/mlock04.c
index 7ee0e8d..707dc51 100644
--- a/testcases/kernel/syscalls/mlock/mlock04.c
+++ b/testcases/kernel/syscalls/mlock/mlock04.c
@@ -63,18 +63,18 @@
 		buf = mmap(NULL, file_len, PROT_WRITE, MAP_SHARED, fd, 0);
 
 		if (buf == MAP_FAILED)
-			tst_brkm(TBROK|TERRNO, cleanup, "mmap");
+			tst_brkm(TBROK | TERRNO, cleanup, "mmap");
 
 		if (mlock(buf, file_len) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "mlock");
+			tst_brkm(TBROK | TERRNO, cleanup, "mlock");
 
 		tst_resm(TINFO, "locked %d bytes from %p", file_len, buf);
 
 		if (munlock(buf, file_len) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "munlock");
+			tst_brkm(TBROK | TERRNO, cleanup, "munlock");
 
 		if (munmap(buf, file_len) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "munmap");
+			tst_brkm(TBROK | TERRNO, cleanup, "munmap");
 	}
 
 	tst_resm(TPASS, "test succeeded.");
@@ -90,10 +90,10 @@
 
 	fd = open(testfile, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
 	if (fd == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open");
+		tst_brkm(TBROK | TERRNO, cleanup, "open");
 
 	if (ftruncate(fd, file_len) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "ftruncate");
+		tst_brkm(TBROK | TERRNO, cleanup, "ftruncate");
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/syscalls/mlockall/mlockall01.c b/testcases/kernel/syscalls/mlockall/mlockall01.c
index 64cb5d7..0cd8fb6 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall01.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall01.c
@@ -117,9 +117,10 @@
 
 			if (TEST_RETURN == -1) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO, "mlockall(%s) Failed with "
-					 "return=%ld",
-					 TC[i].fdesc, TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "mlockall(%s) Failed with "
+					 "return=%ld", TC[i].fdesc,
+					 TEST_RETURN);
 			} else {
 				tst_resm(TPASS, "mlockall test passed for %s",
 					 TC[i].fdesc);
diff --git a/testcases/kernel/syscalls/mmap/mmap001.c b/testcases/kernel/syscalls/mmap/mmap001.c
index 02d0ee6..3b1d82e 100644
--- a/testcases/kernel/syscalls/mmap/mmap001.c
+++ b/testcases/kernel/syscalls/mmap/mmap001.c
@@ -67,7 +67,7 @@
 	snprintf(buf, 1024, "testfile.%d", getpid());
 
 	if ((filename = strdup(buf)) == NULL) {
-		tst_brkm(TBROK|TERRNO, cleanup, "strdup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "strdup failed");
 	}
 
 }
@@ -101,7 +101,7 @@
 
 		if (memsize < 1) {
 			tst_brkm(TBROK, cleanup, "Invalid arg for -m: %s",
-				m_copt);
+				 m_copt);
 		}
 
 		memsize *= getpagesize();	/* N PAGES */
@@ -115,37 +115,37 @@
 	}
 
 	tst_resm(TINFO, "mmap()ing file of %u pages or %u bytes", pages,
-		memsize);
+		 memsize);
 
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		fd = open(filename, O_RDWR|O_CREAT, 0666);
+		fd = open(filename, O_RDWR | O_CREAT, 0666);
 		if ((fd == -1))
-			tst_brkm(TBROK|TERRNO, cleanup,
-				"opening %s failed", filename);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "opening %s failed", filename);
 
 		if (lseek(fd, memsize, SEEK_SET) != memsize) {
 			TEST_ERRNO = errno;
 			close(fd);
-			tst_brkm(TBROK|TTERRNO, cleanup, "lseek failed");
+			tst_brkm(TBROK | TTERRNO, cleanup, "lseek failed");
 		}
 
 		if (write(fd, "\0", 1) != 1) {
 			TEST_ERRNO = errno;
 			close(fd);
-			tst_brkm(TBROK|TTERRNO, cleanup,
-				"writing to %s failed", filename);
+			tst_brkm(TBROK | TTERRNO, cleanup,
+				 "writing to %s failed", filename);
 		}
 
 		array = mmap(0, memsize, PROT_WRITE, MAP_SHARED, fd, 0);
 		if (array == (char *)MAP_FAILED) {
 			TEST_ERRNO = errno;
 			close(fd);
-			tst_brkm(TBROK|TTERRNO, cleanup,
-				"mmapping %s failed", filename);
+			tst_brkm(TBROK | TTERRNO, cleanup,
+				 "mmapping %s failed", filename);
 		} else {
 			tst_resm(TPASS, "mmap() completed successfully.");
 		}
@@ -168,11 +168,11 @@
 			TEST(msync(array, memsize, MS_SYNC));
 
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO,
-					"synchronizing mmapped page failed");
+				tst_resm(TFAIL | TTERRNO,
+					 "synchronizing mmapped page failed");
 			} else {
 				tst_resm(TPASS,
-					"synchronizing mmapped page passed");
+					 "synchronizing mmapped page passed");
 			}
 
 		}
@@ -180,11 +180,10 @@
 		TEST(munmap(array, memsize));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO,
-				"munmapping %s failed", filename);
+			tst_resm(TFAIL | TTERRNO,
+				 "munmapping %s failed", filename);
 		} else {
-			tst_resm(TPASS,
-				"munmapping %s successful", filename);
+			tst_resm(TPASS, "munmapping %s successful", filename);
 		}
 
 		close(fd);
diff --git a/testcases/kernel/syscalls/mmap/mmap01.c b/testcases/kernel/syscalls/mmap/mmap01.c
index b1c7c4a..e3268c6 100644
--- a/testcases/kernel/syscalls/mmap/mmap01.c
+++ b/testcases/kernel/syscalls/mmap/mmap01.c
@@ -125,7 +125,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 		/*
@@ -140,8 +140,8 @@
 			 */
 			if (memcmp(&addr[file_sz], dummy, page_sz - file_sz)) {
 				tst_brkm(TFAIL, cleanup,
-					"mapped memory area contains invalid "
-					"data");
+					 "mapped memory area contains invalid "
+					 "data");
 			}
 
 			/*
@@ -156,8 +156,8 @@
 			 * with the file.
 			 */
 			if (msync(addr, page_sz, MS_SYNC) != 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"failed to synchronize mapped file");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "failed to synchronize mapped file");
 			}
 
 			/*
@@ -167,10 +167,10 @@
 			 */
 			if (system(cmd_buffer) != 0) {
 				tst_resm(TPASS,
-					"Functionality of mmap() successful");
+					 "Functionality of mmap() successful");
 			} else {
 				tst_resm(TFAIL,
-					"Specified pattern found in file");
+					 "Specified pattern found in file");
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -179,7 +179,7 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL|TERRNO, NULL, "munmap failed");
+			tst_brkm(TFAIL | TERRNO, NULL, "munmap failed");
 		}
 	}
 
@@ -212,7 +212,7 @@
 
 	/* Get the path of temporary file to be created */
 	if (getcwd(Path_name, sizeof(Path_name)) == NULL) {
-		tst_brkm(TFAIL|TERRNO, cleanup,
+		tst_brkm(TFAIL | TERRNO, cleanup,
 			 "getcwd failed to get current working directory");
 	}
 
@@ -228,15 +228,15 @@
 
 	/* Get the size of temporary file */
 	if (stat(TEMPFILE, &stat_buf) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "stat of %s failed",
-			TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "stat of %s failed",
+			 TEMPFILE);
 	}
 	file_sz = stat_buf.st_size;
 
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, cleanup,
-			"getpagesize() fails to get system page size");
+			 "getpagesize() fails to get system page size");
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
@@ -254,8 +254,8 @@
 	 * page size.
 	 */
 	if ((intptr_t) sbrk(SHMLBA + page_sz) == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup,
-			"sbrk(SHMLBA + page_sz) failed");
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "sbrk(SHMLBA + page_sz) failed");
 	}
 
 	/* Initialize one page region from addr with 'A' */
diff --git a/testcases/kernel/syscalls/mmap/mmap02.c b/testcases/kernel/syscalls/mmap/mmap02.c
index 1361029..e6fcfc0 100644
--- a/testcases/kernel/syscalls/mmap/mmap02.c
+++ b/testcases/kernel/syscalls/mmap/mmap02.c
@@ -120,7 +120,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 		/*
@@ -133,8 +133,8 @@
 			 * string.
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"reading %s failed", TEMPFILE);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "reading %s failed", TEMPFILE);
 			}
 
 			/*
@@ -155,7 +155,7 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL|TERRNO, cleanup, "munmapping failed");
+			tst_brkm(TFAIL | TERRNO, cleanup, "munmapping failed");
 		}
 
 	}
@@ -203,14 +203,15 @@
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
 		free(tst_buff);
-		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "opening %s failed",
+			 TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
 		free(tst_buff);
-		tst_brkm(TFAIL|TERRNO, cleanup,
-			"writing to %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "writing to %s failed", TEMPFILE);
 		cleanup();
 	}
 
@@ -219,19 +220,20 @@
 
 	/* Change Mode permissions on Temporary file */
 	if (fchmod(fildes, 0444) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "fchmod(%s, 0444) failed",
-			TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "fchmod(%s, 0444) failed",
+			 TEMPFILE);
 	}
 
 	/* Close the temporary file */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "closing %s failed",
+			 TEMPFILE);
 	}
 
 	/* Open the temporary file again, - Readonly mode */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
 		tst_brkm(TFAIL, cleanup, "reopening %s readonly failed",
-			TEMPFILE);
+			 TEMPFILE);
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
diff --git a/testcases/kernel/syscalls/mmap/mmap03.c b/testcases/kernel/syscalls/mmap/mmap03.c
index 8133f7c..e732930 100644
--- a/testcases/kernel/syscalls/mmap/mmap03.c
+++ b/testcases/kernel/syscalls/mmap/mmap03.c
@@ -130,7 +130,8 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap() failed on %s", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap() failed on %s",
+				 TEMPFILE);
 			continue;
 		}
 		/*
@@ -143,9 +144,8 @@
 			 * variable.
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"reading %s failed",
-					TEMPFILE);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "reading %s failed", TEMPFILE);
 			}
 
 			/*
@@ -184,8 +184,8 @@
 		/* Clean up things in case we are looping */
 		/* Unmap the mapped memory */
 		if (munmap(addr, page_sz) != 0) {
-			tst_brkm(TFAIL|TERRNO, cleanup,
-				"failed to unmap the mmapped pages");
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "failed to unmap the mmapped pages");
 		}
 		pass = 0;
 
@@ -231,14 +231,15 @@
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
 		free(tst_buff);
-		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "opening %s failed",
+			 TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
 		free(tst_buff);
-		tst_brkm(TFAIL|TERRNO, cleanup, "writing to %s failed",
-			TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "writing to %s failed",
+			 TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
@@ -251,7 +252,8 @@
 
 	/* Close the temporary file opened for write */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "closing %s failed",
+			 TEMPFILE);
 	}
 
 	/* Allocate and initialize dummy string of system page size bytes */
@@ -261,8 +263,8 @@
 
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup,
-			"opening %s read-only failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup,
+			 "opening %s read-only failed", TEMPFILE);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/mmap/mmap04.c b/testcases/kernel/syscalls/mmap/mmap04.c
index 8289376..f48b3b5 100644
--- a/testcases/kernel/syscalls/mmap/mmap04.c
+++ b/testcases/kernel/syscalls/mmap/mmap04.c
@@ -123,7 +123,7 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap of %s failed", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap of %s failed", TEMPFILE);
 			continue;
 		}
 
@@ -138,7 +138,7 @@
 			 */
 			if (read(fildes, dummy, page_sz) < 0) {
 				tst_brkm(TFAIL, cleanup, "reading %s failed",
-					TEMPFILE);
+					 TEMPFILE);
 			}
 
 			/*
@@ -147,11 +147,11 @@
 			 */
 			if (memcmp(dummy, addr, page_sz)) {
 				tst_resm(TFAIL,
-					"mapped memory region contains invalid "
-					"data");
+					 "mapped memory region contains invalid "
+					 "data");
 			} else {
 				tst_resm(TPASS,
-					"Functionality of mmap() successful");
+					 "Functionality of mmap() successful");
 			}
 		} else {
 			tst_resm(TPASS, "call succeeded");
@@ -232,7 +232,7 @@
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
 		tst_brkm(TFAIL, cleanup,
-			"opening %s read-only failed", TEMPFILE);
+			 "opening %s read-only failed", TEMPFILE);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/mmap/mmap05.c b/testcases/kernel/syscalls/mmap/mmap05.c
index 5b2bd20..c4d9223 100644
--- a/testcases/kernel/syscalls/mmap/mmap05.c
+++ b/testcases/kernel/syscalls/mmap/mmap05.c
@@ -127,7 +127,8 @@
 
 		/* Check for the return value of mmap() */
 		if (addr == MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO, "mmap() failed on %s", TEMPFILE);
+			tst_resm(TFAIL | TERRNO, "mmap() failed on %s",
+				 TEMPFILE);
 			continue;
 		}
 
@@ -162,7 +163,7 @@
 
 		/* Unmap mapped memory and reset pass in case we are looping */
 		if (munmap((void *)addr, page_sz) != 0) {
-			tst_brkm(TFAIL|TERRNO, cleanup, "munmap failed");
+			tst_brkm(TFAIL | TERRNO, cleanup, "munmap failed");
 		}
 		pass = 0;
 
@@ -207,14 +208,14 @@
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
 		free(tst_buff);
-		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s failed", TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "opening %s failed",
+			 TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) != page_sz) {
 		free(tst_buff);
-		tst_brkm(TFAIL, cleanup, "writing to %s failed",
-			 TEMPFILE);
+		tst_brkm(TFAIL, cleanup, "writing to %s failed", TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
@@ -222,20 +223,20 @@
 
 	/* Make sure proper permissions set on file */
 	if (fchmod(fildes, 0444) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "fchmod of %s failed",
+		tst_brkm(TFAIL | TERRNO, cleanup, "fchmod of %s failed",
 			 TEMPFILE);
 	}
 
 	/* Close the temporary file opened for write */
 	if (close(fildes) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "closing %s failed",
+		tst_brkm(TFAIL | TERRNO, cleanup, "closing %s failed",
 			 TEMPFILE);
 	}
 
 	/* Open the temporary file again for reading */
 	if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "opening %s readonly failed",
-			TEMPFILE);
+		tst_brkm(TFAIL | TERRNO, cleanup, "opening %s readonly failed",
+			 TEMPFILE);
 	}
 }
 
@@ -253,7 +254,7 @@
 		siglongjmp(env, 1);
 	} else
 		tst_brkm(TBROK, cleanup, "received an unexpected signal: %d",
-			sig);
+			 sig);
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mmap/mmap06.c b/testcases/kernel/syscalls/mmap/mmap06.c
index 5323f97..cd6c0ec 100644
--- a/testcases/kernel/syscalls/mmap/mmap06.c
+++ b/testcases/kernel/syscalls/mmap/mmap06.c
@@ -124,9 +124,9 @@
 
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO,
-				"mmap() returned invalid value, expected: %p",
-				MAP_FAILED);
+			tst_resm(TFAIL | TERRNO,
+				 "mmap() returned invalid value, expected: %p",
+				 MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
 				tst_resm(TBROK, "munmap() failed");
@@ -138,8 +138,8 @@
 		if (TEST_ERRNO == EACCES) {
 			tst_resm(TPASS, "mmap failed with EACCES");
 		} else {
-			tst_resm(TFAIL|TERRNO,
-				"mmap failed with unexpected errno");
+			tst_resm(TFAIL | TERRNO,
+				 "mmap failed with unexpected errno");
 		}
 	}
 	cleanup();
@@ -164,7 +164,7 @@
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
-			"getpagesize() fails to get system page size");
+			 "getpagesize() fails to get system page size");
 	}
 
 	/* Allocate space for the test buffer */
diff --git a/testcases/kernel/syscalls/mmap/mmap07.c b/testcases/kernel/syscalls/mmap/mmap07.c
index 94110a4..ace83d4 100644
--- a/testcases/kernel/syscalls/mmap/mmap07.c
+++ b/testcases/kernel/syscalls/mmap/mmap07.c
@@ -125,9 +125,9 @@
 
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
-			tst_resm(TFAIL|TERRNO,
-				"mmap() returned invalid value, expected: %p",
-				MAP_FAILED);
+			tst_resm(TFAIL | TERRNO,
+				 "mmap() returned invalid value, expected: %p",
+				 MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
 				tst_resm(TBROK, "munmap() failed");
@@ -139,8 +139,8 @@
 		if (TEST_ERRNO == EACCES) {
 			tst_resm(TPASS, "mmap failed with EACCES");
 		} else {
-			tst_resm(TFAIL|TERRNO,
-				"mmap failed with unexpected errno");
+			tst_resm(TFAIL | TERRNO,
+				 "mmap failed with unexpected errno");
 		}
 
 	}
@@ -183,15 +183,13 @@
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
 		free(tst_buff);
-		tst_brkm(TFAIL, cleanup, "open() on %s failed",
-			 TEMPFILE);
+		tst_brkm(TFAIL, cleanup, "open() on %s failed", TEMPFILE);
 	}
 
 	/* Write test buffer contents into temporary file */
 	if (write(fildes, tst_buff, page_sz) < page_sz) {
 		free(tst_buff);
-		tst_brkm(TFAIL, cleanup, "writing to %s failed",
-			 TEMPFILE);
+		tst_brkm(TFAIL, cleanup, "writing to %s failed", TEMPFILE);
 	}
 
 	/* Free the memory allocated for test buffer */
diff --git a/testcases/kernel/syscalls/mmap/mmap08.c b/testcases/kernel/syscalls/mmap/mmap08.c
index 1f7a504..d7239ac 100644
--- a/testcases/kernel/syscalls/mmap/mmap08.c
+++ b/testcases/kernel/syscalls/mmap/mmap08.c
@@ -121,7 +121,7 @@
 		/* Check for the return value of mmap() */
 		if (addr != MAP_FAILED) {
 			tst_resm(TFAIL, "mmap() didn't fail (%p != %p)",
-				addr, MAP_FAILED);
+				 addr, MAP_FAILED);
 			/* Unmap the mapped memory */
 			if (munmap(addr, page_sz) != 0) {
 				tst_brkm(TBROK, cleanup, "munmap() failed");
@@ -130,11 +130,10 @@
 		}
 		TEST_ERROR_LOG(TEST_ERRNO);
 		if (TEST_ERRNO == EBADF) {
-			tst_resm(TPASS,
-				"mmap failed with EBADF");
+			tst_resm(TPASS, "mmap failed with EBADF");
 		} else {
-			tst_resm(TFAIL|TERRNO,
-				"mmap failed with an invalid errno");
+			tst_resm(TFAIL | TERRNO,
+				 "mmap failed with an invalid errno");
 		}
 	}
 
@@ -160,12 +159,12 @@
 	/* Get the system page size */
 	if ((page_sz = getpagesize()) < 0) {
 		tst_brkm(TFAIL, NULL,
-			"getpagesize() fails to get system page size");
+			 "getpagesize() fails to get system page size");
 	}
 
 	if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
 		tst_brkm(TFAIL, NULL,
-			"calloc() failed to allocate space for tst_buff");
+			 "calloc() failed to allocate space for tst_buff");
 	}
 
 	/* Fill the test buffer with the known data */
diff --git a/testcases/kernel/syscalls/mmap/mmap09.c b/testcases/kernel/syscalls/mmap/mmap09.c
index 9b10b48..61861e3 100644
--- a/testcases/kernel/syscalls/mmap/mmap09.c
+++ b/testcases/kernel/syscalls/mmap/mmap09.c
@@ -99,7 +99,7 @@
 
 			if (TEST_RETURN == -1) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO, "%s", TC[i].desc);
+				tst_resm(TFAIL | TTERRNO, "%s", TC[i].desc);
 			} else {
 				tst_resm(TPASS, "%s", TC[i].desc);
 			}
@@ -121,16 +121,16 @@
 	tst_tmpdir();
 
 	if ((fd = open("mmaptest", O_RDWR | O_CREAT, 0666)) < 0)
-		tst_brkm(TFAIL|TERRNO, cleanup, "opening mmaptest failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "opening mmaptest failed");
 
 	/* ftruncate the file to 16k */
 	if (ftruncate(fd, mapsize) < 0)
-		tst_brkm(TFAIL|TERRNO, cleanup, "ftruncate file failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "ftruncate file failed");
 
 	maddr = mmap(0, (size_t) mapsize, PROT_READ | PROT_WRITE,
-		    MAP_FILE | MAP_SHARED, fd, (off_t) 0);
+		     MAP_FILE | MAP_SHARED, fd, (off_t) 0);
 	if (maddr == MAP_FAILED)
-		tst_brkm(TFAIL|TERRNO, cleanup, "mmapping mmaptest failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "mmapping mmaptest failed");
 
 	/* fill up the file with A's */
 	memset(maddr, 'A', mapsize);
diff --git a/testcases/kernel/syscalls/mmap/mmap10.c b/testcases/kernel/syscalls/mmap/mmap10.c
index 1d104ce..7dee7d0 100644
--- a/testcases/kernel/syscalls/mmap/mmap10.c
+++ b/testcases/kernel/syscalls/mmap/mmap10.c
@@ -69,7 +69,7 @@
 char *TCID = "mmap10";
 int TST_TOTAL = 1;
 
-static int  fd, opt_anon, opt_ksm;
+static int fd, opt_anon, opt_ksm;
 static long ps;
 static char *x;
 
@@ -79,9 +79,9 @@
 void help(void);
 
 static option_t options[] = {
-	{ "a", &opt_anon,   NULL},
-	{ "s", &opt_ksm,    NULL},
-	{ NULL, NULL,       NULL}
+	{"a", &opt_anon, NULL},
+	{"s", &opt_ksm, NULL},
+	{NULL, NULL, NULL}
 };
 
 int main(int argc, char *argv[])
@@ -93,10 +93,10 @@
 	if (msg != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	if (opt_ksm)
-	{
+	if (opt_ksm) {
 		if (access(PATH_KSM, F_OK) == -1)
-			tst_brkm(TCONF, NULL, "KSM configuration is not enabled");
+			tst_brkm(TCONF, NULL,
+				 "KSM configuration is not enabled");
 #ifdef HAVE_MADV_MERGEABLE
 		tst_resm(TINFO, "add to KSM regions.");
 #else
@@ -125,51 +125,51 @@
 	int n;
 
 	if (opt_anon) {
-		x = mmap(NULL, SIZE+SIZE-ps, PROT_READ|PROT_WRITE,
-			MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+		x = mmap(NULL, SIZE + SIZE - ps, PROT_READ | PROT_WRITE,
+			 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 	} else {
 		if ((fd = open("/dev/zero", O_RDWR, 0666)) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "open");
-		x = mmap(NULL, SIZE+SIZE-ps, PROT_READ|PROT_WRITE,
-			MAP_PRIVATE, fd, 0);
+			tst_brkm(TBROK | TERRNO, cleanup, "open");
+		x = mmap(NULL, SIZE + SIZE - ps, PROT_READ | PROT_WRITE,
+			 MAP_PRIVATE, fd, 0);
 	}
 	if (x == MAP_FAILED)
-		tst_brkm(TFAIL|TERRNO, cleanup, "mmap");
+		tst_brkm(TFAIL | TERRNO, cleanup, "mmap");
 #ifdef HAVE_MADV_MERGEABLE
 	if (opt_ksm) {
-		if (madvise(x, SIZE+SIZE-ps, MADV_MERGEABLE) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "madvise");
+		if (madvise(x, SIZE + SIZE - ps, MADV_MERGEABLE) == -1)
+			tst_brkm(TBROK | TERRNO, cleanup, "madvise");
 	}
 #endif
 	x[SIZE] = 0;
 
-	switch(n = fork()) {
+	switch (n = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
-		if (munmap(x+SIZE+ps, SIZE-ps-ps) == -1)
-			tst_brkm(TFAIL|TERRNO, cleanup, "munmap");
+		if (munmap(x + SIZE + ps, SIZE - ps - ps) == -1)
+			tst_brkm(TFAIL | TERRNO, cleanup, "munmap");
 		exit(0);
 	default:
 		break;
 	}
 
-	switch(n = fork()) {
+	switch (n = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork");
 	case 0:
-		if (munmap(x+SIZE+ps, SIZE-ps-ps) == -1)
-			tst_brkm(TFAIL|TERRNO, cleanup,
-					"subsequent munmap #1");
+		if (munmap(x + SIZE + ps, SIZE - ps - ps) == -1)
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "subsequent munmap #1");
 		exit(0);
 	default:
 		switch (n = fork()) {
 		case -1:
-			tst_brkm(TBROK|TERRNO, cleanup, "fork");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
-			if (munmap(x+SIZE+ps, SIZE-ps-ps) == -1)
-				tst_brkm(TFAIL|TERRNO, cleanup,
-						"subsequent munmap #2");
+			if (munmap(x + SIZE + ps, SIZE - ps - ps) == -1)
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "subsequent munmap #2");
 			exit(0);
 		default:
 			break;
@@ -177,13 +177,13 @@
 		break;
 	}
 
-	if (munmap(x, SIZE+SIZE-ps) == -1)
-		tst_resm(TFAIL|TERRNO, "munmap all");
+	if (munmap(x, SIZE + SIZE - ps) == -1)
+		tst_resm(TFAIL | TERRNO, "munmap all");
 
 	while (waitpid(-1, &n, WUNTRACED | WCONTINUED) > 0)
 		if (WEXITSTATUS(n) != 0)
 			tst_resm(TFAIL, "child exit status is %d",
-				WEXITSTATUS(n));
+				 WEXITSTATUS(n));
 }
 
 void cleanup(void)
@@ -199,7 +199,7 @@
 	TEST_PAUSE;
 
 	if ((ps = sysconf(_SC_PAGESIZE)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "sysconf(_SC_PAGESIZE)");
+		tst_brkm(TBROK | TERRNO, cleanup, "sysconf(_SC_PAGESIZE)");
 }
 
 void help(void)
diff --git a/testcases/kernel/syscalls/mmap/mmap11.c b/testcases/kernel/syscalls/mmap/mmap11.c
index 786724b..46f97eb 100644
--- a/testcases/kernel/syscalls/mmap/mmap11.c
+++ b/testcases/kernel/syscalls/mmap/mmap11.c
@@ -101,26 +101,27 @@
 
 	ret = pthread_attr_init(&attr);
 	if (ret)
-		tst_brkm(TBROK|TERRNO, cleanup, "pthread_attr_init");
+		tst_brkm(TBROK | TERRNO, cleanup, "pthread_attr_init");
 	ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 	if (ret)
-		tst_brkm(TBROK|TERRNO, cleanup, "pthread_attr_setdetachstate");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "pthread_attr_setdetachstate");
 	thread = malloc(STD_LOOP_COUNT * sizeof(pthread_t));
 	if (thread == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "malloc");
+		tst_brkm(TBROK | TERRNO, cleanup, "malloc");
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 		ret = pthread_create(&th, &attr, wait_thread, NULL);
 		if (ret) {
 			tst_resm(TINFO, "[%d] ", count);
-			tst_brkm(TBROK|TERRNO, cleanup, "pthread_create");
+			tst_brkm(TBROK | TERRNO, cleanup, "pthread_create");
 		}
 		count++;
 		ret = pthread_create(&thread[lc], &attr, wait_thread2, NULL);
 		if (ret) {
 			tst_resm(TINFO, "[%d] ", count);
-			tst_brkm(TBROK|TERRNO, cleanup, "pthread_create");
+			tst_brkm(TBROK | TERRNO, cleanup, "pthread_create");
 		}
 		count++;
 	}
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
index 853de01..bdcc131 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
@@ -105,7 +105,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -182,7 +182,7 @@
 		 */
 		if (create_segment(seg, sizeof(seg)) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 }
+		}
 
 		/*
 		 * Check for EFAULT
diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
index da02760..71e0a0b 100644
--- a/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
+++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c
@@ -101,7 +101,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -118,7 +118,7 @@
 		seg[0] = 12345;
 		if (create_segment(seg, sizeof(seg)) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 }
+		}
 
 		val = read_segment(0);
 
@@ -142,7 +142,7 @@
 
 		if (create_segment(0, 10) == -1) {
 			tst_brkm(TINFO, cleanup, "Creation of segment failed");
-		 }
+		}
 
 		tst_flush();
 		if ((pid = FORK_OR_VFORK()) == 0) {
diff --git a/testcases/kernel/syscalls/mount/mount01.c b/testcases/kernel/syscalls/mount/mount01.c
index f0decc1..e268c35 100644
--- a/testcases/kernel/syscalls/mount/mount01.c
+++ b/testcases/kernel/syscalls/mount/mount01.c
@@ -110,21 +110,22 @@
 	/* Check for mandatory option of the testcase */
 	if (!Dflag)
 		tst_brkm(TBROK, NULL,
-		    "you must specify the device used for mounting with the -D "
-		    "option");
+			 "you must specify the device used for mounting with the -D "
+			 "option");
 
 	if (Tflag) {
 		Fstype = malloc(strlen(fstype) + 1);
 		if (Fstype == NULL) {
-			tst_brkm(TBROK|TERRNO, NULL,
-			    "malloc - failed to alloc %zd", strlen(fstype));
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "malloc - failed to alloc %zd",
+				 strlen(fstype));
 		}
 		strncpy(Fstype, fstype, strlen(fstype) + 1);
 	} else {
 		Fstype = malloc(strlen(DEFAULT_FSTYPE) + 1);
 		if (Fstype == NULL) {
 			tst_brkm(TBROK, NULL, "malloc - failed to alloc %zu",
-			    strlen(DEFAULT_FSTYPE));
+				 strlen(DEFAULT_FSTYPE));
 		}
 		strncpy(Fstype, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE) + 1);
 	}
@@ -147,13 +148,13 @@
 
 		/* check return code */
 		if (TEST_RETURN != 0) {
-			tst_resm(TFAIL|TTERRNO, "mount(2) failed");
+			tst_resm(TFAIL | TTERRNO, "mount(2) failed");
 		} else {
 			tst_resm(TPASS, "mount(2) passed ");
 			TEST(umount(mntpoint));
 			if (TEST_RETURN != 0) {
-				tst_brkm(TBROK|TTERRNO, cleanup,
-				    "umount(2) failed");
+				tst_brkm(TBROK | TTERRNO, cleanup,
+					 "umount(2) failed");
 			}
 		}
 	}
@@ -186,8 +187,8 @@
 	(void)sprintf(mntpoint, "mnt_%d", getpid());
 
 	if (mkdir(mntpoint, DIR_MODE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
-		    mntpoint, DIR_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s, %#o) failed",
+			 mntpoint, DIR_MODE);
 	}
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/mount/mount02.c b/testcases/kernel/syscalls/mount/mount02.c
index 8aea20d..7423517 100644
--- a/testcases/kernel/syscalls/mount/mount02.c
+++ b/testcases/kernel/syscalls/mount/mount02.c
@@ -150,7 +150,7 @@
 
 	Type = malloc(FSTYPE_LEN);
 	if (Type == NULL) {
-		tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
+		tst_brkm(TBROK | TERRNO, NULL, "malloc failed");
 	}
 
 	if (Tflag == 1) {
@@ -189,17 +189,17 @@
 
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == exp_enos[i]) {
-				tst_resm(TPASS|TERRNO,
-				    "mount got expected failure");
+				tst_resm(TPASS | TERRNO,
+					 "mount got expected failure");
 			} else {
 				if (umount(mntpoint) == -1) {
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "umount of %s failed", Mntpoint);
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "umount of %s failed",
+						 Mntpoint);
 				}
-				tst_resm(TFAIL|TERRNO,
-				    "mount(2) failed to produce expected "
-				    "error (%d)",
-				    exp_enos[i]);
+				tst_resm(TFAIL | TERRNO,
+					 "mount(2) failed to produce expected "
+					 "error (%d)", exp_enos[i]);
 			}
 
 			(void)cleanup_test(i);
@@ -243,7 +243,7 @@
 			return 0;
 		} else {
 			tst_resm(TWARN, "mknod(2) failed to create device: %s",
-			    Path);
+				 Path);
 			return 1;
 		}
 	case 2:
@@ -251,9 +251,8 @@
 
 		TEST(mount(Device, Mntpoint, Fstype, 0, NULL));
 		if (TEST_RETURN != 0) {
-			tst_resm(TWARN|TTERRNO,
-			    "mount(2) failed to mount device %s",
-			    device);
+			tst_resm(TWARN | TTERRNO,
+				 "mount(2) failed to mount device %s", device);
 			return 1;
 		}
 		return 0;
@@ -262,19 +261,19 @@
 
 		TEST(mount(Device, Mntpoint, Fstype, 0, NULL));
 		if (TEST_RETURN != 0) {
-			tst_resm(TWARN|TTERRNO,
-			    "mount(2) failed to mount device %s", device);
+			tst_resm(TWARN | TTERRNO,
+				 "mount(2) failed to mount device %s", device);
 			return 1;
 		}
 		if (getcwd(Path, PATH_MAX) == NULL) {
-			tst_resm(TWARN|TERRNO, "getcwd failed");
+			tst_resm(TWARN | TERRNO, "getcwd failed");
 			return 1;
 		}
 		sprintf(temp, "/%s/t3_%d", mntpoint, cnt);
 		strcat(Path, temp);
 		if ((fd = open(Path, O_CREAT | O_RDWR, S_IRWXU)) == -1) {
-			tst_resm(TWARN|TERRNO, "open() failed to create %s",
-			    Path);
+			tst_resm(TWARN | TERRNO, "open() failed to create %s",
+				 Path);
 			return 1;
 		}
 		Flag = MS_REMOUNT | MS_RDONLY;
@@ -356,8 +355,8 @@
 		if (Tflag) {
 			/* Avoid buffer overflow */
 			strncpy(Type, fstype,
-				(FSTYPE_LEN < strlen(fstype)+1) ? FSTYPE_LEN :
-				strlen(fstype)+1);
+				(FSTYPE_LEN < strlen(fstype) + 1) ? FSTYPE_LEN :
+				strlen(fstype) + 1);
 		} else {
 			strcpy(Type, "ext2");
 		}
@@ -368,7 +367,7 @@
 	case 2:
 		TEST(umount(mntpoint));
 		if (TEST_RETURN != 0) {
-			tst_resm(TWARN|TTERRNO, "umount failed");
+			tst_resm(TWARN | TTERRNO, "umount failed");
 		}
 		break;
 	case 12:
@@ -392,8 +391,8 @@
 	(void)sprintf(mntpoint, "mnt_%d", getpid());
 
 	if (mkdir(mntpoint, DIR_MODE) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
-		    mntpoint, DIR_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s, %#o) failed",
+			 mntpoint, DIR_MODE);
 	}
 
 	/* set up expected error numbers */
diff --git a/testcases/kernel/syscalls/mount/mount03.c b/testcases/kernel/syscalls/mount/mount03.c
index dab4f23..adb20c8 100644
--- a/testcases/kernel/syscalls/mount/mount03.c
+++ b/testcases/kernel/syscalls/mount/mount03.c
@@ -79,7 +79,7 @@
  *****************************************************************************/
 
 #ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 #endif
 
 #include <sys/types.h>
@@ -153,21 +153,21 @@
 	/* Check for mandatory option of the testcase */
 	if (!Dflag) {
 		tst_brkm(TBROK, NULL,
-		    "you must specify the device used for mounting with -D "
-		    "option");
+			 "you must specify the device used for mounting with -D "
+			 "option");
 	}
 
 	if (Tflag) {
-		Fstype = (char *)malloc(strlen(fstype)+1);
+		Fstype = (char *)malloc(strlen(fstype) + 1);
 		if (Fstype == NULL) {
-			tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
+			tst_brkm(TBROK | TERRNO, NULL, "malloc failed");
 		}
 		Fstype[strlen(fstype)] = '\0';
 		strncpy(Fstype, fstype, strlen(fstype));
 	} else {
-		Fstype = (char *)malloc(strlen(DEFAULT_FSTYPE)+1);
+		Fstype = (char *)malloc(strlen(DEFAULT_FSTYPE) + 1);
 		if (Fstype == NULL) {
-			tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
+			tst_brkm(TBROK | TERRNO, NULL, "malloc failed");
 		}
 		strncpy(Fstype, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE));
 		Fstype[strlen(DEFAULT_FSTYPE)] = '\0';
@@ -193,22 +193,22 @@
 
 			/* check return code */
 			if (TEST_RETURN != 0) {
-				tst_resm(TFAIL|TTERRNO, "mount(2) failed");
+				tst_resm(TFAIL | TTERRNO, "mount(2) failed");
 				continue;
 			}
 
 			/* Validate the rwflag */
 			if (test_rwflag(i, lc) == 1) {
 				tst_resm(TFAIL, "mount(2) failed while"
-				    " validating %ld", rwflags[i]);
+					 " validating %ld", rwflags[i]);
 			} else {
 				tst_resm(TPASS, "mount(2) passed with "
-				    "rwflag = %ld", rwflags[i]);
+					 "rwflag = %ld", rwflags[i]);
 			}
 			TEST(umount(mntpoint));
 			if (TEST_RETURN != 0) {
-				tst_brkm(TBROK|TTERRNO, cleanup,
-				    "umount(2) failed for %s", mntpoint);
+				tst_brkm(TBROK | TTERRNO, cleanup,
+					 "umount(2) failed for %s", mntpoint);
 			}
 		}
 	}
@@ -239,8 +239,8 @@
 			if (errno == EROFS) {
 				return 0;
 			} else {
-				tst_resm(TWARN|TERRNO,
-				    "open didn't fail with EROFS");
+				tst_resm(TWARN | TERRNO,
+					 "open didn't fail with EROFS");
 				return 1;
 			}
 		}
@@ -250,21 +250,21 @@
 		/* Validate MS_NODEV flag of mount call */
 
 		snprintf(file, PATH_MAX, "%smynod_%d_%d", Path_name, getpid(),
-			       cnt);
+			 cnt);
 		if (mknod(file, S_IFBLK | 0777, 0) == 0) {
 			if ((fd = open(file, O_RDWR, S_IRWXU)) == -1) {
 				if (errno == EACCES) {
 					return 0;
 				} else {
-					tst_resm(TWARN|TERRNO,
-					    "open didn't fail with EACCES");
+					tst_resm(TWARN | TERRNO,
+						 "open didn't fail with EACCES");
 					return 1;
 				}
 			}
 			close(fd);
 		} else {
-			tst_resm(TWARN|TERRNO, "mknod(2) failed to create %s",
-			    file);
+			tst_resm(TWARN | TERRNO, "mknod(2) failed to create %s",
+				 file);
 			return 1;
 		}
 		return 1;
@@ -273,7 +273,7 @@
 
 		snprintf(file, PATH_MAX, "%stmp1", Path_name);
 		if ((fd = open(file, O_CREAT | O_RDWR, S_IRWXU)) == -1) {
-			tst_resm(TWARN|TERRNO, "opening %s failed", file);
+			tst_resm(TWARN | TERRNO, "opening %s failed", file);
 		} else {
 			close(fd);
 			execlp(file, basename(file), NULL);
@@ -291,16 +291,16 @@
 		snprintf(file, PATH_MAX, "%s%s", Path_name, TEMP_FILE);
 		if ((fildes = open(file, O_RDWR | O_CREAT, FILE_MODE))
 		    == -1) {
-			tst_resm(TWARN|TERRNO,
-			    "open(%s, O_RDWR|O_CREAT, %#o) failed",
-			    file, FILE_MODE);
+			tst_resm(TWARN | TERRNO,
+				 "open(%s, O_RDWR|O_CREAT, %#o) failed",
+				 file, FILE_MODE);
 			return 1;
 		}
 
 		/* Write the buffer data into file */
 		if (write(fildes, write_buffer, strlen(write_buffer)) !=
 		    strlen(write_buffer)) {
-			tst_resm(TWARN|TERRNO, "writing to %s failed", file);
+			tst_resm(TWARN | TERRNO, "writing to %s failed", file);
 			close(fildes);
 			return 1;
 		}
@@ -317,7 +317,7 @@
 		if (read(fildes, read_buffer, sizeof(read_buffer)) > 0) {
 			if (strcmp(read_buffer, write_buffer)) {
 				tst_resm(TWARN, "Data read from %s and written "
-				    "mismatch", file);
+					 "mismatch", file);
 				close(fildes);
 				return 1;
 			} else {
@@ -325,7 +325,7 @@
 				return 0;
 			}
 		} else {
-			tst_resm(TWARN|TERRNO, "read() Fails on %s", file);
+			tst_resm(TWARN | TERRNO, "read() Fails on %s", file);
 			close(fildes);
 			return 1;
 		}
@@ -335,7 +335,7 @@
 
 		TEST(mount(device, mntpoint, Fstype, MS_REMOUNT, NULL));
 		if (TEST_RETURN != 0) {
-			tst_resm(TWARN|TTERRNO, "mount(2) failed to remount");
+			tst_resm(TWARN | TTERRNO, "mount(2) failed to remount");
 			return 1;
 		} else {
 			snprintf(file, PATH_MAX, "%stmp2", Path_name);
@@ -353,25 +353,25 @@
 		/* Validate MS_NOSUID flag of mount call */
 
 		if (setup_uid() != 0) {
-			tst_resm(TBROK|TERRNO, "setup_uid failed");
+			tst_resm(TBROK | TERRNO, "setup_uid failed");
 			return 1;
 		}
 		switch (pid = fork()) {
 		case -1:
-			tst_resm(TBROK|TERRNO, "fork failed");
+			tst_resm(TBROK | TERRNO, "fork failed");
 			return 1;
 		case 0:
 			snprintf(file, PATH_MAX, "%ssetuid_test", Path_name);
 			if (chmod(file, SUID_MODE) != 0) {
 				tst_resm(TWARN, "chmod(%s, %#o) failed",
-				    file, SUID_MODE);
+					 file, SUID_MODE);
 			}
 
 			ltpuser = getpwnam(nobody_uid);
 			if (setreuid(ltpuser->pw_uid, ltpuser->pw_uid) == -1) {
-				tst_resm(TWARN|TERRNO,
-				    "seteuid() failed to change euid to %d",
-				    ltpuser->pw_uid);
+				tst_resm(TWARN | TERRNO,
+					 "seteuid() failed to change euid to %d",
+					 ltpuser->pw_uid);
 			}
 			execlp(file, basename(file), NULL);
 			exit(1);
@@ -397,7 +397,7 @@
 
 	switch (pid = fork()) {
 	case -1:
-		tst_resm(TWARN|TERRNO, "fork failed");
+		tst_resm(TWARN | TERRNO, "fork failed");
 		return 1;
 	case 0:
 		Cmd_buffer[0] = cmd;
@@ -422,7 +422,7 @@
 			return WTERMSIG(status);
 		} else {
 			/* Should be 0. */
-			assert (status == 0);
+			assert(status == 0);
 			return 0;
 		}
 	}
@@ -452,8 +452,8 @@
 	(void)sprintf(mntpoint, "mnt_%d", getpid());
 
 	if (mkdir(mntpoint, DIR_MODE)) {
-		tst_brkm(TBROK|TERRNO, cleanup, "mkdir(%s, %#o) failed",
-		    mntpoint, DIR_MODE);
+		tst_brkm(TBROK | TERRNO, cleanup, "mkdir(%s, %#o) failed",
+			 mntpoint, DIR_MODE);
 	}
 	/* Get the current working directory of the process */
 	if (getcwd(Path_name, sizeof(Path_name)) == NULL) {
@@ -461,21 +461,21 @@
 	}
 	if (chmod(Path_name, DIR_MODE) != 0) {
 		tst_brkm(TBROK, cleanup, "chmod(%s, %#o) failed",
-		    Path_name, DIR_MODE);
+			 Path_name, DIR_MODE);
 	}
 	snprintf(file, PATH_MAX, "%ssetuid_test", Path_name);
 	if (stat(file, &setuid_test_stat) < 0) {
 		tst_brkm(TBROK, cleanup, "stat for setuid_test failed");
 	} else {
 		if ((setuid_test_stat.st_uid || setuid_test_stat.st_gid) &&
-		     chown(file, 0, 0) < 0) {
+		    chown(file, 0, 0) < 0) {
 			tst_brkm(TBROK, cleanup,
-					"chown for setuid_test failed");
+				 "chown for setuid_test failed");
 		}
 		if (setuid_test_stat.st_mode != SUID_MODE &&
 		    chmod(file, SUID_MODE) < 0) {
 			tst_brkm(TBROK, cleanup,
-					"setuid for setuid_test failed");
+				 "setuid for setuid_test failed");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/move_pages/move_pages01.c b/testcases/kernel/syscalls/move_pages/move_pages01.c
index bb6430a..baaeefe 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages01.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages01.c
@@ -143,4 +143,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages02.c b/testcases/kernel/syscalls/move_pages/move_pages02.c
index 2fa23fd..062d263 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages02.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages02.c
@@ -88,7 +88,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -159,4 +159,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages03.c b/testcases/kernel/syscalls/move_pages/move_pages03.c
index 8cf94ac..910b89c 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages03.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages03.c
@@ -127,7 +127,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -179,15 +179,15 @@
 
 		verify_pages_on_node(pages, status, TEST_PAGES, to_node);
 
-	      err_kill_child:
+err_kill_child:
 		/* Test done. Ask child to terminate. */
 		if (sem_post(&sem[SEM_PARENT_TEST]) == -1)
 			tst_resm(TWARN | TERRNO, "error post semaphore");
 		/* Read the status, no zombies! */
 		wait(NULL);
-	      err_free_sem:
+err_free_sem:
 		free_sem(sem, MAX_SEMS);
-	      err_free_pages:
+err_free_pages:
 		free_shared_pages(pages, TEST_PAGES);
 	}
 #else
@@ -226,4 +226,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages04.c b/testcases/kernel/syscalls/move_pages/move_pages04.c
index c057bf6..9a52f68 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages04.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages04.c
@@ -93,8 +93,8 @@
 	int ret;
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
-	if (ret	< 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+	if (ret < 0)
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -125,7 +125,8 @@
 				      status, MPOL_MF_MOVE);
 		TEST_ERRNO = errno;
 		if (ret == -1) {
-			tst_resm(TFAIL | TERRNO, "move_pages unexpectedly failed");
+			tst_resm(TFAIL | TERRNO,
+				 "move_pages unexpectedly failed");
 			goto err_free_pages;
 		}
 
@@ -136,11 +137,11 @@
 			tst_resm(TFAIL, "status[%d] is %d", UNTOUCHED_PAGE,
 				 status[UNTOUCHED_PAGE]);
 
-		err_free_pages:
-		    /* This is capable of freeing both the touched and
-		     * untouched pages.
-		     */
-		    free_pages(pages, TEST_PAGES);
+err_free_pages:
+		/* This is capable of freeing both the touched and
+		 * untouched pages.
+		 */
+		free_pages(pages, TEST_PAGES);
 	}
 #else
 	tst_resm(TCONF, "move_pages support not found.");
@@ -178,4 +179,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages05.c b/testcases/kernel/syscalls/move_pages/move_pages05.c
index 1adaf56..5ffa3bc 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages05.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages05.c
@@ -128,7 +128,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -180,7 +180,8 @@
 				      status, MPOL_MF_MOVE);
 		TEST_ERRNO = errno;
 		if (ret == -1) {
-			tst_resm(TFAIL | TERRNO, "move_pages unexpectedly failed");
+			tst_resm(TFAIL | TERRNO,
+				 "move_pages unexpectedly failed");
 			goto err_kill_child;
 		}
 
@@ -191,17 +192,17 @@
 			tst_resm(TFAIL, "status[%d] is %d",
 				 SHARED_PAGE, status[SHARED_PAGE]);
 
-	      err_kill_child:
+err_kill_child:
 		/* Test done. Ask child to terminate. */
 		if (sem_post(&sem[SEM_PARENT_TEST]) == -1)
 			tst_resm(TWARN | TERRNO, "error post semaphore");
 		/* Read the status, no zombies! */
 		wait(NULL);
-	      err_free_sem:
+err_free_sem:
 		free_sem(sem, MAX_SEMS);
-	      err_free_unshared:
+err_free_unshared:
 		free_pages(pages + UNSHARED_PAGE, N_UNSHARED_PAGES);
-	      err_free_shared:
+err_free_shared:
 		free_shared_pages(pages + SHARED_PAGE, N_SHARED_PAGES);
 	}
 #else
@@ -240,4 +241,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages06.c b/testcases/kernel/syscalls/move_pages/move_pages06.c
index 5570917..95363b7 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages06.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages06.c
@@ -88,7 +88,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 1, &from_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -155,4 +155,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages07.c b/testcases/kernel/syscalls/move_pages/move_pages07.c
index 97caba7..d4ab668 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages07.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages07.c
@@ -88,7 +88,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -127,7 +127,7 @@
 			tst_resm(TFAIL, "move pages did not fail "
 				 "with ESRCH");
 
-	      err_free_pages:
+err_free_pages:
 		free_pages(pages, TEST_PAGES);
 	}
 #else
@@ -166,4 +166,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages08.c b/testcases/kernel/syscalls/move_pages/move_pages08.c
index a9eb7ef..4c541a6 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages08.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages08.c
@@ -86,7 +86,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
diff --git a/testcases/kernel/syscalls/move_pages/move_pages09.c b/testcases/kernel/syscalls/move_pages/move_pages09.c
index 04ab86a..25caccb 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages09.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages09.c
@@ -85,7 +85,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 1, &from_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -117,13 +117,13 @@
 			if (ret == 0)
 				tst_resm(TPASS, "move_pages succeeded");
 			else
-				tst_resm(TFAIL|TERRNO, "move_pages");
+				tst_resm(TFAIL | TERRNO, "move_pages");
 		} else {
 			if (ret == -1 && errno == ENOENT)
 				tst_resm(TPASS, "move_pages failed with "
 					 "ENOENT as expected");
 			else
-				tst_resm(TFAIL|TERRNO, "move_pages");
+				tst_resm(TFAIL | TERRNO, "move_pages");
 		}
 
 		free_pages(pages, TEST_PAGES);
diff --git a/testcases/kernel/syscalls/move_pages/move_pages10.c b/testcases/kernel/syscalls/move_pages/move_pages10.c
index 15c62c3..fa700c4 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages10.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages10.c
@@ -88,7 +88,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -154,4 +154,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages11.c b/testcases/kernel/syscalls/move_pages/move_pages11.c
index 9cf3305..e5c2ceb 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages11.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages11.c
@@ -127,7 +127,7 @@
 
 	ret = get_allowed_nodes(NH_MEMS, 2, &from_node, &to_node);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_allowed_nodes: %d", ret);
+		tst_brkm(TBROK | TERRNO, cleanup, "get_allowed_nodes: %d", ret);
 
 	/* check for looping state if -i option is given */
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
@@ -187,9 +187,9 @@
 				 strerror(errno));
 		/* Read the status, no zombies! */
 		wait(NULL);
-	      err_free_sem:
+err_free_sem:
 		free_sem(sem, MAX_SEMS);
-	      err_free_pages:
+err_free_pages:
 		free_shared_pages(pages, TEST_PAGES);
 	}
 #else
@@ -244,4 +244,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages_support.c b/testcases/kernel/syscalls/move_pages/move_pages_support.c
index 1a9b585..4eb6656 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages_support.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages_support.c
@@ -97,7 +97,6 @@
 	return -1;
 }
 
-
 /*
  * alloc_pages_linear() - allocate pages in each NUMA node
  * @pages: array in which the page pointers will be stored
@@ -121,9 +120,9 @@
 	int ret;
 
 	ret = get_allowed_nodes_arr(NH_MEMS, &num_allowed_nodes,
-		&allowed_nodes);
+				    &allowed_nodes);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes(): %d", ret);
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes(): %d", ret);
 
 	for (i = 0; i < num; i++) {
 		nodes[i] = allowed_nodes[n];
@@ -191,7 +190,7 @@
 				    pages[i], MPOL_F_NODE | MPOL_F_ADDR);
 		if (ret == -1) {
 			tst_resm(TBROK | TERRNO, "error getting memory policy "
-				 		 "for page %p", pages[i]);
+				 "for page %p", pages[i]);
 			return;
 		}
 
@@ -225,9 +224,9 @@
 	int ret;
 
 	ret = get_allowed_nodes_arr(NH_MEMS, &num_allowed_nodes,
-		&allowed_nodes);
+				    &allowed_nodes);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes(): %d", ret);
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes(): %d", ret);
 
 	for (i = 0; i < num; i++) {
 		nodes[i] = allowed_nodes[n];
@@ -349,7 +348,7 @@
 		ret = sem_init(&sem[i], 1, 0);
 		if (ret == -1) {
 			tst_resm(TBROK | TERRNO, "semaphore initialization "
-						 "failed");
+				 "failed");
 			goto err_free_mem;
 		}
 	}
@@ -400,13 +399,13 @@
 
 	ret = get_allowed_nodes_arr(NH_MEMS, &num_allowed_nodes, NULL);
 	if (ret < 0)
-		tst_brkm(TBROK|TERRNO, NULL, "get_allowed_nodes(): %d", ret);
+		tst_brkm(TBROK | TERRNO, NULL, "get_allowed_nodes(): %d", ret);
 
 	if (numa_available() < 0) {
 		tst_brkm(TCONF, NULL, "NUMA support is not available");
 	} else if (num_allowed_nodes < min_nodes) {
 		tst_brkm(TCONF, NULL, "at least %d allowed NUMA nodes"
-		    " are required", min_nodes);
+			 " are required", min_nodes);
 	} else if (tst_kvercmp(2, 6, 18) < 0) {
 		tst_brkm(TCONF, NULL, "2.6.18 or greater kernel required");
 	}
diff --git a/testcases/kernel/syscalls/mprotect/mprotect01.c b/testcases/kernel/syscalls/mprotect/mprotect01.c
index ea09527..3ca15e4 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect01.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect01.c
@@ -164,7 +164,7 @@
 	}
 	cleanup();
 	tst_exit();
- }
+}
 
 #else
 
@@ -193,7 +193,7 @@
 	addr2 = (char *)malloc(PAGESIZE);
 	if (addr2 == NULL) {
 		tst_brkm(TINFO, cleanup, "malloc failed");
-	 }
+	}
 	addr2++;		/* Ensure addr2 is not page aligned */
 }
 
@@ -205,7 +205,7 @@
 	fd = open("/etc/passwd", O_RDONLY);
 	if (fd < 0) {
 		tst_brkm(TBROK, cleanup, "open failed");
-	 }
+	}
 
 	/*
 	 * mmap the PAGESIZE bytes as read only.
@@ -213,7 +213,7 @@
 	addr3 = mmap(0, PAGESIZE, PROT_READ, MAP_SHARED, fd, 0);
 	if (addr3 < 0) {
 		tst_brkm(TBROK, cleanup, "mmap failed");
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/mprotect/mprotect02.c b/testcases/kernel/syscalls/mprotect/mprotect02.c
index c576fac..99040fa 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect02.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect02.c
@@ -91,7 +91,7 @@
 
 		Tst_count = 0;
 
-		fd = SAFE_OPEN(cleanup, file1, O_RDWR|O_CREAT, 0777);
+		fd = SAFE_OPEN(cleanup, file1, O_RDWR | O_CREAT, 0777);
 
 		num_bytes = getpagesize();
 
@@ -102,16 +102,17 @@
 			else
 				bytes_to_write = num_bytes;
 
-			num_bytes -= SAFE_WRITE(cleanup, 1, fd, buf, bytes_to_write);
+			num_bytes -=
+			    SAFE_WRITE(cleanup, 1, fd, buf, bytes_to_write);
 
 		} while (0 < num_bytes);
 
 		/* mmap the PAGESIZE bytes as read only. */
 		addr = SAFE_MMAP(cleanup, 0, sizeof(buf), PROT_READ,
-		    MAP_SHARED, fd, 0);
+				 MAP_SHARED, fd, 0);
 
 		if ((pid = FORK_OR_VFORK()) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "fork #1 failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork #1 failed");
 
 		if (pid == 0) {
 			(void)memcpy(addr, buf, strlen(buf));
@@ -119,20 +120,20 @@
 		}
 
 		if (waitpid(pid, &status, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "waitpid failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "waitpid failed");
 		if (!WIFEXITED(status))
 			tst_brkm(TBROK, cleanup, "child exited abnormally "
-					"with status: %d", status);
+				 "with status: %d", status);
 		switch (status) {
 		case 255:
 			tst_brkm(TBROK, cleanup,
-					"memcpy did not generate SIGSEGV");
+				 "memcpy did not generate SIGSEGV");
 		case 0:
 			tst_resm(TPASS, "got SIGSEGV as expected");
 			break;
 		default:
 			tst_brkm(TBROK, cleanup, "got unexpected signal: %d",
-					status);
+				 status);
 			break;
 		}
 
@@ -144,7 +145,7 @@
 			if (STD_FUNCTIONAL_TEST) {
 
 				if ((pid = FORK_OR_VFORK()) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
+					tst_brkm(TBROK | TERRNO, cleanup,
 						 "fork #2 failed");
 
 				if (pid == 0) {
@@ -153,21 +154,21 @@
 				}
 
 				if (waitpid(pid, &status, 0) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "waitpid failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "waitpid failed");
 
 				if (WIFEXITED(status) &&
 				    WEXITSTATUS(status) == 0)
 					tst_resm(TPASS, "didn't get SIGSEGV");
 				else
 					tst_brkm(TBROK, cleanup,
-					    "child exited abnormally");
+						 "child exited abnormally");
 
 			} else
 				tst_resm(TPASS, "call succeeded");
 
 		} else {
-			tst_resm(TFAIL|TERRNO, "mprotect failed");
+			tst_resm(TFAIL | TERRNO, "mprotect failed");
 			continue;
 		}
 
diff --git a/testcases/kernel/syscalls/mprotect/mprotect03.c b/testcases/kernel/syscalls/mprotect/mprotect03.c
index e87758f..252b214 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect03.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect03.c
@@ -73,7 +73,6 @@
 int status;
 char file1[BUFSIZ];
 
-
 #ifndef UCLINUX
 
 int main(int ac, char **av)
@@ -99,7 +98,7 @@
 
 		if ((fd = open(file1, O_RDWR | O_CREAT, 0777)) < 0) {	//mode must be specified when O_CREAT is in the flag
 			tst_brkm(TBROK, cleanup, "open failed");
-		 }
+		}
 
 		(void)write(fd, buf, strlen(buf));
 
@@ -110,7 +109,7 @@
 			    fd, 0);
 		if (addr < 0) {
 			tst_brkm(TBROK, cleanup, "mmap failed");
-		 }
+		}
 
 		/*
 		 * Try to change the protection to WRITE.
@@ -129,7 +128,7 @@
 					tst_resm(TINFO, "memcpy() did "
 						 "not generate SIGSEGV");
 					exit(1);
-				 }
+				}
 
 				/* parent */
 				(void)waitpid(pid, &status, 0);
@@ -146,7 +145,7 @@
 		} else {
 			tst_resm(TFAIL, "mprotect failed "
 				 "unexpectedly, errno: %d", errno);
-		 }
+		}
 
 		/* clean up things in case we are looping */
 		if (munmap(addr, strlen(buf)) == -1) {
diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify01.c b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
index 4d09e63..3acd0d2 100644
--- a/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+++ b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
@@ -66,9 +66,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "mq_notify01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "mq_notify01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -88,7 +88,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -113,7 +114,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -164,64 +166,66 @@
 */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.ttype	  = NORMAL,
-		.notify	 = SIGEV_NONE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-		.notify	 = SIGEV_SIGNAL,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-		.notify	 = SIGEV_THREAD,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case03
-		.ttype	  = FD_NONE,
-		.notify	 = SIGEV_NONE,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case04
-		.ttype	  = FD_NOT_EXIST,
-		.notify	 = SIGEV_NONE,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case05
-		.ttype	  = FD_FILE,
-		.notify	 = SIGEV_NONE,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case06
-		.ttype	  = ALREADY_REGISTERED,
-		.notify	 = SIGEV_NONE,
-		.ret	    = -1,
-		.err	    = EBUSY,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .notify = SIGEV_NONE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 .notify = SIGEV_SIGNAL,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 .notify = SIGEV_THREAD,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case03
+	 .ttype = FD_NONE,
+	 .notify = SIGEV_NONE,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case04
+	 .ttype = FD_NOT_EXIST,
+	 .notify = SIGEV_NONE,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case05
+	 .ttype = FD_FILE,
+	 .notify = SIGEV_NONE,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case06
+	 .ttype = ALREADY_REGISTERED,
+	 .notify = SIGEV_NONE,
+	 .ret = -1,
+	 .err = EBUSY,
+	 },
 };
 
-static void sigfunc(int signo, siginfo_t *info, void *data)
+static void sigfunc(int signo, siginfo_t * info, void *data)
 {
 	if (opt_debug) {
-		tst_resm(TINFO,"si_code  E:%d,\tR:%d", info->si_code, SI_MESGQ);
-		tst_resm(TINFO,"si_signo E:%d,\tR:%d", info->si_signo, SIGUSR1);
-		tst_resm(TINFO,"si_value E:0x%x,\tR:0x%x", info->si_value.sival_int,USER_DATA);
-		tst_resm(TINFO,"si_pid   E:%d,\tR:%d", info->si_pid, getpid());
-		tst_resm(TINFO,"si_uid   E:%d,\tR:%d", info->si_uid, getuid());
+		tst_resm(TINFO, "si_code  E:%d,\tR:%d", info->si_code,
+			 SI_MESGQ);
+		tst_resm(TINFO, "si_signo E:%d,\tR:%d", info->si_signo,
+			 SIGUSR1);
+		tst_resm(TINFO, "si_value E:0x%x,\tR:0x%x",
+			 info->si_value.sival_int, USER_DATA);
+		tst_resm(TINFO, "si_pid   E:%d,\tR:%d", info->si_pid, getpid());
+		tst_resm(TINFO, "si_uid   E:%d,\tR:%d", info->si_uid, getuid());
 	}
 	cmp_ok = info->si_code == SI_MESGQ &&
-		 info->si_signo == SIGUSR1 &&
-		 info->si_value.sival_int == USER_DATA &&
-		 info->si_pid == getpid() &&
-		 info->si_uid == getuid();
+	    info->si_signo == SIGUSR1 &&
+	    info->si_value.sival_int == USER_DATA &&
+	    info->si_pid == getpid() && info->si_uid == getuid();
 	notified = 1;
 }
 
@@ -271,7 +275,7 @@
 	case FD_FILE:
 		TEST(fd = open("/", O_RDONLY));
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL,"can't open \"/\".");
+			tst_resm(TFAIL, "can't open \"/\".");
 			result = 1;
 			goto EXIT;
 		}
@@ -280,9 +284,11 @@
 		/*
 		 * Open message queue
 		 */
-		TEST(fd = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
+		TEST(fd =
+		     mq_open(QUEUE_NAME, O_CREAT | O_EXCL | O_RDWR, S_IRWXU,
+			     NULL));
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO,"mq_open failed");
+			tst_resm(TFAIL | TTERRNO, "mq_open failed");
 			result = 1;
 			goto EXIT;
 		}
@@ -315,7 +321,7 @@
 	if (tc->ttype == ALREADY_REGISTERED) {
 		TEST(rc = mq_notify(fd, &ev));
 		if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO,"mq_notify failed");
+			tst_resm(TFAIL | TTERRNO, "mq_notify failed");
 			result = 1;
 			goto EXIT;
 		}
@@ -337,7 +343,7 @@
 		smsg[i] = i;
 	TEST(rc = mq_timedsend(fd, smsg, MSG_SIZE, 0, &abs_timeout));
 	if (rc < 0) {
-		tst_resm(TFAIL|TTERRNO, "mq_timedsend failed");
+		tst_resm(TFAIL | TTERRNO, "mq_timedsend failed");
 		result = 1;
 		goto EXIT;
 	}
@@ -368,18 +374,20 @@
 
 static void usage(const char *progname)
 {
-	tst_resm(TINFO,"usage: %s [options]", progname);
-	tst_resm(TINFO,"This is a regression test program of %s system call.",SYSCALL_NAME);
-	tst_resm(TINFO,"options:");
-	tst_resm(TINFO,"    -d --debug	   Show debug messages");
-	tst_resm(TINFO,"    -h --help	    Show this message");
+	tst_resm(TINFO, "usage: %s [options]", progname);
+	tst_resm(TINFO, "This is a regression test program of %s system call.",
+		 SYSCALL_NAME);
+	tst_resm(TINFO, "options:");
+	tst_resm(TINFO, "    -d --debug	   Show debug messages");
+	tst_resm(TINFO, "    -h --help	    Show this message");
 }
 
 /*
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int c;
 	int i;
@@ -387,9 +395,9 @@
 	char *msg;
 
 	struct option long_options[] = {
-		{ "debug", no_argument, 0, 'd' },
-		{ "help",  no_argument, 0, 'h' },
-		{ NULL, 0, NULL, 0 }
+		{"debug", no_argument, 0, 'd'},
+		{"help", no_argument, 0, 'h'},
+		{NULL, 0, NULL, 0}
 	};
 
 	progname = basename(av[0]);
@@ -402,8 +410,8 @@
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
-			 TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
-			 while (TEST_RETURN != -1) {
+			TEST(c = getopt_long(ac, av, "dh", long_options, NULL));
+			while (TEST_RETURN != -1) {
 				switch (c) {
 				case 'd':
 					opt_debug = 1;
@@ -414,26 +422,27 @@
 			}
 
 			if (ac != optind) {
-				tst_resm(TINFO,"Options are not match.");
+				tst_resm(TINFO, "Options are not match.");
 				usage(progname);
 			}
 
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
-				tst_resm(TINFO,"(case%02d) START", i);
+				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
-				tst_resm(TINFO,"(case%02d) END => %s",
-					i, (ret == 0) ? "OK" : "NG");
+				tst_resm(TINFO, "(case%02d) END => %s",
+					 i, (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 
-			switch(result) {
+			switch (result) {
 			case RESULT_OK:
 				tst_resm(TPASS, "mq_notify call succeeded");
 				break;
 
 			default:
-		 	   	tst_brkm(TFAIL, cleanup, "mq_notify failed");
+				tst_brkm(TFAIL, cleanup, "mq_notify failed");
 				break;
 			}
 
diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c
index 8107b3e..640c7bf 100644
--- a/testcases/kernel/syscalls/mq_open/mq_open01.c
+++ b/testcases/kernel/syscalls/mq_open/mq_open01.c
@@ -69,9 +69,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "mq_open01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "mq_open01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -91,7 +91,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-void cleanup(void) {
+void cleanup(void)
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -115,7 +116,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -141,7 +143,7 @@
 	char *user;
 	char *qname;
 	int oflag;
-	long mq_maxmsg;	 // Maximum numebr of messages.
+	long mq_maxmsg;		// Maximum numebr of messages.
 	long mq_msgsize;	// Maximum message size.
 	int ret;
 	int err;
@@ -169,86 +171,86 @@
 
 static struct test_case tcase[] = {
 #if 1
-	{ // case00
-		.ttype	  = NORMAL,
-		.qname	  = QUEUE_NAME,
-		.oflag	  = O_CREAT,
-		.mq_maxmsg      = 20,
-		.mq_msgsize     = 16384,
-		.ret	    = 0,
-		.err	    = 0,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .qname = QUEUE_NAME,
+	 .oflag = O_CREAT,
+	 .mq_maxmsg = 20,
+	 .mq_msgsize = 16384,
+	 .ret = 0,
+	 .err = 0,
+	 },
 #else
-	{ // case00
-		.ttype	  = NORMAL,
-		.qname	  = QUEUE_NAME,
-		.oflag	  = O_CREAT,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-				//  0	 1	 2	 3
-				//  0123456789012345678901234567890123456789
-				   "aaaaaaaaaaaaaaa",
-		.oflag	  = O_CREAT,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-				//  0	 1	 2	 3
-				//  0123456789012345678901234567890123456789
-				   "aaaaaaaaaaaaaaaa",
-		.oflag	  = O_CREAT,
-		.ret	    = -1,
-		.err	    = ENAMETOOLONG,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .qname = QUEUE_NAME,
+	 .oflag = O_CREAT,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 //  0    1       2       3
+	 //  0123456789012345678901234567890123456789
+	 "aaaaaaaaaaaaaaa",
+	 .oflag = O_CREAT,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 //  0    1       2       3
+	 //  0123456789012345678901234567890123456789
+	 "aaaaaaaaaaaaaaaa",
+	 .oflag = O_CREAT,
+	 .ret = -1,
+	 .err = ENAMETOOLONG,
+	 },
 
-	{ // case03
-		.ttype	  = NORMAL,
-		.qname	  = "",
-		.oflag	  = O_CREAT,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case04
-		.ttype	  = NORMAL,
-		.user	   = "nobody",
-		.qname	  = QUEUE_NAME,
-		.ret	    = -1,
-		.err	    = EACCES,
-	},
-	{ // case05
-		.ttype	  = NORMAL,
-		.qname	  = QUEUE_NAME,
-		.oflag	  = O_CREAT|O_EXCL,
-		.ret	    = -1,
-		.err	    = EEXIST,
-	},
-	{ // case06
-		.ttype	  = NO_FILE,
-		.qname	  = QUEUE_NAME,
-		.oflag	  = O_CREAT,
-		.ret	    = -1,
-		.err	    = EMFILE,
-	},
-	{ // case07
-		.ttype	  = NORMAL,
-		.qname	  = "/notexist",
-		.oflag	  = 0,
-		.ret	    = -1,
-		.err	    = ENOENT,
-	},
+	{			// case03
+	 .ttype = NORMAL,
+	 .qname = "",
+	 .oflag = O_CREAT,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case04
+	 .ttype = NORMAL,
+	 .user = "nobody",
+	 .qname = QUEUE_NAME,
+	 .ret = -1,
+	 .err = EACCES,
+	 },
+	{			// case05
+	 .ttype = NORMAL,
+	 .qname = QUEUE_NAME,
+	 .oflag = O_CREAT | O_EXCL,
+	 .ret = -1,
+	 .err = EEXIST,
+	 },
+	{			// case06
+	 .ttype = NO_FILE,
+	 .qname = QUEUE_NAME,
+	 .oflag = O_CREAT,
+	 .ret = -1,
+	 .err = EMFILE,
+	 },
+	{			// case07
+	 .ttype = NORMAL,
+	 .qname = "/notexist",
+	 .oflag = 0,
+	 .ret = -1,
+	 .err = ENOENT,
+	 },
 
-	{ // case08
-		.ttype	  = NO_SPACE,
-		.user	   = "nobody",
-		.qname	  = QUEUE_NAME,
-		.oflag	  = O_CREAT,
-		.ret	    = -1,
-		.err	    = ENOSPC,
-	},
+	{			// case08
+	 .ttype = NO_SPACE,
+	 .user = "nobody",
+	 .qname = QUEUE_NAME,
+	 .oflag = O_CREAT,
+	 .ret = -1,
+	 .err = ENOSPC,
+	 },
 #endif
 };
 
@@ -271,7 +273,7 @@
 	int oldval = -1;
 	struct mq_attr new, old, *p_attr;
 
-	 /*
+	/*
 	 * When test ended with SIGTERM etc, mq discriptor is left remains.
 	 * So we delete it first.
 	 */
@@ -283,7 +285,9 @@
 
 	if (tc->ttype != NO_SPACE && !(tc->oflag & O_CREAT)) {
 		errno = 0;
-		TEST(sys_ret = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL));
+		TEST(sys_ret =
+		     mq_open(QUEUE_NAME, O_CREAT | O_EXCL | O_RDWR, S_IRWXU,
+			     NULL));
 		sys_errno = errno;
 		if (sys_ret < 0)
 			goto TEST_END;
@@ -319,7 +323,7 @@
 		}
 	}
 
-	 /*
+	/*
 	 * Execute system call
 	 */
 	//tst_resm(TINFO,"PATH_MAX: %d\n", PATH_MAX);
@@ -343,14 +347,18 @@
 	if (p_attr) {
 		TEST(rc = syscall(__NR_mq_getsetattr, fd2, NULL, &old));
 		if (TEST_RETURN < 0) {
-		 	tst_resm(TFAIL, "mq_getsetattr failed - errno = %d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL,
+				 "mq_getsetattr failed - errno = %d : %s",
+				 TEST_ERRNO, strerror(TEST_ERRNO));
 			result = 1;
 			goto EXIT;
 		}
-		tst_resm(TINFO,"mq_maxmsg E:%ld,\tR:%ld",new.mq_maxmsg, old.mq_maxmsg);
-		tst_resm(TINFO,"mq_msgsize E:%ld,\tR:%ld",new.mq_msgsize, old.mq_msgsize);
-		cmp_ok = old.mq_maxmsg == new.mq_maxmsg &&
-			 old.mq_msgsize == new.mq_msgsize;
+		tst_resm(TINFO, "mq_maxmsg E:%ld,\tR:%ld", new.mq_maxmsg,
+			 old.mq_maxmsg);
+		tst_resm(TINFO, "mq_msgsize E:%ld,\tR:%ld", new.mq_msgsize,
+			 old.mq_msgsize);
+		cmp_ok = old.mq_maxmsg == new.mq_maxmsg
+		    && old.mq_msgsize == new.mq_msgsize;
 	}
 
 TEST_END:
@@ -358,7 +366,8 @@
 	 * Check results
 	 */
 	result |= (sys_errno != tc->err) || !cmp_ok;
-	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
+			 cmp_ok);
 
 EXIT:
 	if (tc->user != NULL && old_uid != -1)
@@ -385,7 +394,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int i;
 	int lc;
@@ -402,27 +412,28 @@
 
 			/*
 			 * Execute test
-	 		 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
 				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
 				tst_resm(TINFO, "(case%02d) END => %s", i,
-					(ret == 0) ? "OK" : "NG");
+					 (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 
 			/*
 			 * Check results
-	 		 */
-			switch(result) {
+			 */
+			switch (result) {
 			case RESULT_OK:
 				tst_resm(TPASS, "mq_open call succeeded ");
 				break;
 
 			default:
-			   	tst_brkm(TFAIL|TTERRNO, cleanup,
-					"mq_open failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "mq_open failed");
 				break;
 			}
 
diff --git a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
index bcb245e..217ef81 100644
--- a/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
+++ b/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
@@ -73,9 +73,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "mq_timedreceive01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "mq_timedreceive01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -107,7 +107,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -132,7 +133,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	act.sa_handler = sighandler;
 	sigfillset(&act.sa_mask);
@@ -187,102 +189,102 @@
  *   EBADMSG	    can't check because this error never occur
  */
 static struct test_case tcase[] = {
-	{ // case00
-		.ttype	    = NORMAL,
-		.len	    = 0,    // also success when size equals zero
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-		.len	    = 1,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-		.len	    = MAX_MSGSIZE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case03
-		.ttype	  = NORMAL,
-		.len	    = 1,
-		.prio	   = 32767, // max priority
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case04
-		.ttype	  = INVALID_MSG_LEN,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EMSGSIZE,
-	},
-	{ // case05
-		.ttype	  = FD_NONE,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case06
-		.ttype	  = FD_NOT_EXIST,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case07
-		.ttype	  = FD_FILE,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case08
-		.ttype	  = EMPTY_QUEUE,
-		.non_block      = 1,
-		.len	    = 16,
-		.ret	    = -1,
-		.err	    = EAGAIN,
-	},
-	{ // case09
-		.ttype	  = EMPTY_QUEUE,
-		.len	    = 16,
-		.sec	    = -1,
-		.nsec	   = 0,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case10
-		.ttype	  = EMPTY_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = -1,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case11
-		.ttype	  = EMPTY_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = 1000000000,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case12
-		.ttype	  = EMPTY_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = 999999999,
-		.ret	    = -1,
-		.err	    = ETIMEDOUT,
-	},
-	{ // case13
-		.ttype	  = SEND_SIGINT,
-		.len	    = 16,
-		.sec	    = 3,
-		.nsec	   = 0,
-		.ret	    = -1,
-		.err	    = EINTR,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .len = 0,		// also success when size equals zero
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 .len = 1,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 .len = MAX_MSGSIZE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case03
+	 .ttype = NORMAL,
+	 .len = 1,
+	 .prio = 32767,		// max priority
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case04
+	 .ttype = INVALID_MSG_LEN,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EMSGSIZE,
+	 },
+	{			// case05
+	 .ttype = FD_NONE,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case06
+	 .ttype = FD_NOT_EXIST,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case07
+	 .ttype = FD_FILE,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case08
+	 .ttype = EMPTY_QUEUE,
+	 .non_block = 1,
+	 .len = 16,
+	 .ret = -1,
+	 .err = EAGAIN,
+	 },
+	{			// case09
+	 .ttype = EMPTY_QUEUE,
+	 .len = 16,
+	 .sec = -1,
+	 .nsec = 0,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case10
+	 .ttype = EMPTY_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = -1,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case11
+	 .ttype = EMPTY_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = 1000000000,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case12
+	 .ttype = EMPTY_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = 999999999,
+	 .ret = -1,
+	 .err = ETIMEDOUT,
+	 },
+	{			// case13
+	 .ttype = SEND_SIGINT,
+	 .len = 16,
+	 .sec = 3,
+	 .nsec = 0,
+	 .ret = -1,
+	 .err = EINTR,
+	 },
 };
 
 #define MEM_LENGTH	      (4 * 1024 * 1024)
@@ -302,7 +304,7 @@
 	int oflag;
 	int i, rc, cmp_ok = 1, fd = -1;
 	char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
-	struct timespec ts = {0,0};
+	struct timespec ts = { 0, 0 };
 	pid_t pid = 0;
 	unsigned prio;
 	size_t msg_len;
@@ -322,7 +324,7 @@
 	case FD_FILE:
 		TEST(fd = open("/", O_RDONLY));
 		if (TEST_RETURN < 0) {
-		 	tst_resm(TFAIL|TTERRNO, "can't open \"/\".");
+			tst_resm(TFAIL | TTERRNO, "can't open \"/\".");
 			result = 1;
 			goto EXIT;
 		}
@@ -331,13 +333,13 @@
 		/*
 		 * Open message queue
 		 */
-		oflag = O_CREAT|O_EXCL|O_RDWR;
+		oflag = O_CREAT | O_EXCL | O_RDWR;
 		if (tc->non_block)
 			oflag |= O_NONBLOCK;
 
 		TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
 		if (TEST_RETURN < 0) {
-		 	tst_resm(TFAIL|TTERRNO, "mq_open failed");
+			tst_resm(TFAIL | TTERRNO, "mq_open failed");
 			result = 1;
 			goto EXIT;
 		}
@@ -371,7 +373,7 @@
 	default:
 		TEST(rc = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
 		if (TEST_RETURN < 0) {
-		 	tst_resm(TFAIL|TTERRNO, "mq_timedsend failed");
+			tst_resm(TFAIL | TTERRNO, "mq_timedsend failed");
 			result = 1;
 			goto EXIT;
 		}
@@ -398,7 +400,7 @@
 	if (sys_ret < 0)
 		goto TEST_END;
 
-	 /*
+	/*
 	 * Compare received message
 	 */
 	if (sys_ret != tc->len || tc->prio != prio)
@@ -411,12 +413,13 @@
 			}
 	}
 
-	TEST_END:
+TEST_END:
 	/*
 	 * Check results
 	 */
 	result |= (sys_errno != tc->err) || !cmp_ok;
-	PRINT_RESULT_CMP(0, tc->ret == 0 ? tc->len : tc->ret, tc->err,sys_ret, sys_errno, cmp_ok);
+	PRINT_RESULT_CMP(0, tc->ret == 0 ? tc->len : tc->ret, tc->err, sys_ret,
+			 sys_errno, cmp_ok);
 
 EXIT:
 	if (fd >= 0) {
@@ -435,7 +438,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int i;
 	int lc;
@@ -452,26 +456,29 @@
 
 			/*
 			 * Execute test
-		 	 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			 */
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
-				tst_resm(TINFO,"(case%02d) START", i);
+				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
-				tst_resm(TINFO,"(case%02d) END => %s",
-					i, (ret == 0) ? "OK" : "NG");
+				tst_resm(TINFO, "(case%02d) END => %s",
+					 i, (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 
 			/*
 			 * Check results
-	 		 */
-			switch(result) {
+			 */
+			switch (result) {
 			case RESULT_OK:
-				tst_resm(TPASS, "mq_timedreceive call succeeded");
-			break;
+				tst_resm(TPASS,
+					 "mq_timedreceive call succeeded");
+				break;
 
 			default:
-				tst_brkm(TFAIL|TTERRNO, cleanup, "mq_timedreceive failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "mq_timedreceive failed");
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c b/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
index 57d2159..f60297c 100644
--- a/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
+++ b/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
@@ -71,9 +71,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "mq_timedsend01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "mq_timedsend01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 struct sigaction act;
 
 /*
@@ -104,7 +104,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -128,7 +129,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 
 	/* Capture signals if any */
 	act.sa_handler = sighandler;
@@ -146,12 +148,12 @@
 #define SYSCALL_NAME    "mq_timedsend"
 
 enum test_type {
-		NORMAL,
-		FD_NONE,
-		FD_NOT_EXIST,
-		FD_FILE,
-		FULL_QUEUE,
-		SEND_SIGINT,
+	NORMAL,
+	FD_NONE,
+	FD_NOT_EXIST,
+	FD_FILE,
+	FULL_QUEUE,
+	SEND_SIGINT,
 };
 
 /*
@@ -185,109 +187,109 @@
 */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.ttype	  = NORMAL,
-		.len	    = 0,    // also success when size equals zero
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-		.len	    = 1,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-		.len	    = MAX_MSGSIZE,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case03
-		.ttype	  = NORMAL,
-		.len	    = 1,
-		.prio	   = 32767, // max priority
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case04
-		.ttype	  = NORMAL,
-		.len	    = MAX_MSGSIZE + 1,
-		.ret	    = -1,
-		.err	    = EMSGSIZE,
-	},
-	{ // case05
-		.ttype	  = FD_NONE,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case06
-		.ttype	  = FD_NOT_EXIST,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case07
-		.ttype	  = FD_FILE,
-		.len	    = 0,
-		.ret	    = -1,
-		.err	    = EBADF,
-	},
-	{ // case08
-		.ttype	  = FULL_QUEUE,
-		.non_block      = 1,
-		.len	    = 16,
-		.ret	    = -1,
-		.err	    = EAGAIN,
-	},
-	{ // case09
-		.ttype	  = NORMAL,
-		.len	    = 1,
-		.prio	   = 32768, // max priority + 1
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case10
-		.ttype	  = FULL_QUEUE,
-		.len	    = 16,
-		.sec	    = -1,
-		.nsec	   = 0,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case11
-		.ttype	  = FULL_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = -1,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case12
-		.ttype	  = FULL_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = 1000000000,
-		.ret	    = -1,
-		.err	    = EINVAL,
-	},
-	{ // case13
-		.ttype	  = FULL_QUEUE,
-		.len	    = 16,
-		.sec	    = 0,
-		.nsec	   = 999999999,
-		.ret	    = -1,
-		.err	    = ETIMEDOUT,
-	},
-	{ // case14
-		.ttype	  = SEND_SIGINT,
-		.len	    = 16,
-		.ret	    = -1,
-		.sec	    = 3,
-		.nsec	   = 0,
-		.err	    = EINTR,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .len = 0,		// also success when size equals zero
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 .len = 1,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 .len = MAX_MSGSIZE,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case03
+	 .ttype = NORMAL,
+	 .len = 1,
+	 .prio = 32767,		// max priority
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case04
+	 .ttype = NORMAL,
+	 .len = MAX_MSGSIZE + 1,
+	 .ret = -1,
+	 .err = EMSGSIZE,
+	 },
+	{			// case05
+	 .ttype = FD_NONE,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case06
+	 .ttype = FD_NOT_EXIST,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case07
+	 .ttype = FD_FILE,
+	 .len = 0,
+	 .ret = -1,
+	 .err = EBADF,
+	 },
+	{			// case08
+	 .ttype = FULL_QUEUE,
+	 .non_block = 1,
+	 .len = 16,
+	 .ret = -1,
+	 .err = EAGAIN,
+	 },
+	{			// case09
+	 .ttype = NORMAL,
+	 .len = 1,
+	 .prio = 32768,		// max priority + 1
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case10
+	 .ttype = FULL_QUEUE,
+	 .len = 16,
+	 .sec = -1,
+	 .nsec = 0,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case11
+	 .ttype = FULL_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = -1,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case12
+	 .ttype = FULL_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = 1000000000,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case13
+	 .ttype = FULL_QUEUE,
+	 .len = 16,
+	 .sec = 0,
+	 .nsec = 999999999,
+	 .ret = -1,
+	 .err = ETIMEDOUT,
+	 },
+	{			// case14
+	 .ttype = SEND_SIGINT,
+	 .len = 16,
+	 .ret = -1,
+	 .sec = 3,
+	 .nsec = 0,
+	 .err = EINTR,
+	 },
 };
 
 /*
@@ -306,7 +308,7 @@
 	int oflag;
 	int i, rc, cmp_ok = 1, fd = -1;
 	char smsg[MAX_MSGSIZE], rmsg[MAX_MSGSIZE];
-	struct timespec ts = {0,0};
+	struct timespec ts = { 0, 0 };
 	pid_t pid = 0;
 	unsigned prio;
 
@@ -325,7 +327,8 @@
 	case FD_FILE:
 		TEST(fd = open("/", O_RDONLY));
 		if (fd < 0) {
-		 	tst_resm(TFAIL, "can't open \"/\".- errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL, "can't open \"/\".- errno = %d : %s\n",
+				 TEST_ERRNO, strerror(TEST_ERRNO));
 			result = 1;
 			goto EXIT;
 		}
@@ -334,21 +337,26 @@
 		/*
 		 * Open message queue
 		 */
-		oflag = O_CREAT|O_EXCL|O_RDWR;
+		oflag = O_CREAT | O_EXCL | O_RDWR;
 		if (tc->non_block)
 			oflag |= O_NONBLOCK;
 
 		TEST(fd = mq_open(QUEUE_NAME, oflag, S_IRWXU, NULL));
 		if (TEST_RETURN < 0) {
-		 	tst_resm(TFAIL, "mq_open failed - errno = %d : %s\n", TEST_ERRNO, strerror(TEST_ERRNO));
+			tst_resm(TFAIL, "mq_open failed - errno = %d : %s\n",
+				 TEST_ERRNO, strerror(TEST_ERRNO));
 			result = 1;
 			goto EXIT;
 		}
 		if (tc->ttype == FULL_QUEUE || tc->ttype == SEND_SIGINT) {
 			for (i = 0; i < MAX_MSG; i++) {
-				TEST(rc = mq_timedsend(fd, smsg, tc->len, 0, &ts));
+				TEST(rc =
+				     mq_timedsend(fd, smsg, tc->len, 0, &ts));
 				if (rc < 0) {
-		 	   		tst_resm(TFAIL, "mq_timedsend failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
+					tst_resm(TFAIL,
+						 "mq_timedsend failed - errno = %d : %s\n",
+						 TEST_ERRNO,
+						 strerror(TEST_ERRNO));
 					result = 1;
 					goto EXIT;
 				}
@@ -379,7 +387,7 @@
 		ts.tv_sec += time(NULL);
 
 	/*
-	* Execut test system call
+	 * Execut test system call
 	 */
 	errno = 0;
 	TEST(sys_ret = mq_timedsend(fd, smsg, tc->len, tc->prio, &ts));
@@ -394,7 +402,8 @@
 	ts.tv_nsec = 0;
 	TEST(rc = mq_timedreceive(fd, rmsg, MAX_MSGSIZE, &prio, &ts));
 	if (rc < 0) {
-		tst_resm(TFAIL, "mq_timedreceive failed - errno = %d : %s\n",TEST_ERRNO, strerror(TEST_ERRNO));
+		tst_resm(TFAIL, "mq_timedreceive failed - errno = %d : %s\n",
+			 TEST_ERRNO, strerror(TEST_ERRNO));
 		result = 1;
 		goto EXIT;
 	}
@@ -412,7 +421,8 @@
 	 * Check results
 	 */
 	result |= (sys_errno != tc->err) || !cmp_ok;
-	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
+			 cmp_ok);
 
 EXIT:
 	if (fd >= 0) {
@@ -431,7 +441,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int i;
 	int lc;
@@ -449,25 +460,26 @@
 			/*
 			 * Execute test
 			 */
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
 				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
 				tst_resm(TINFO, "(case%02d) END => %s", i,
-					(ret == 0) ? "OK" : "NG");
+					 (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 			/*
 			 * Check results
-		 	 */
-			switch(result) {
+			 */
+			switch (result) {
 			case RESULT_OK:
 				tst_resm(TPASS, "mq_timedsend call succeeded");
 				break;
 
 			default:
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"mq_timedsend failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "mq_timedsend failed");
 			}
 
 		}
diff --git a/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c b/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
index be65b37..26dd307 100644
--- a/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
+++ b/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
@@ -70,9 +70,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "mq_ulink01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "mq_ulink01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -92,7 +92,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -116,7 +117,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	tst_require_root(tst_exit);
 	/* Capture signals if any */
 	/* Create temporary directories */
@@ -154,47 +156,45 @@
 */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.ttype	  = NORMAL,
-		.qname	  = QUEUE_NAME,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-		.user	   = "nobody",
-		.qname	  = QUEUE_NAME,
-		.ret	    = -1,
-		.err	    = EACCES,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-				//  0	 1	 2	 3
-				//  0123456789012345678901234567890123456789
-		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaa",
-		.ret	    = -1,
-		.err	    = ENOENT,
-	},
-	{ // case03
-		.ttype	  = NORMAL,
-				//  0	 1	 2	 3
-				//  0123456789012345678901234567890123456789
-		.qname	  = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-				   "aaaaaaaaaaaaaaaa",
-		.ret	    = -1,
-		.err	    = ENAMETOOLONG,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .qname = QUEUE_NAME,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 .user = "nobody",
+	 .qname = QUEUE_NAME,
+	 .ret = -1,
+	 .err = EACCES,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 //  0    1       2       3
+	 //  0123456789012345678901234567890123456789
+	 .qname = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaa",
+	 .ret = -1,
+	 .err = ENOENT,
+	 },
+	{			// case03
+	 .ttype = NORMAL,
+	 //  0    1       2       3
+	 //  0123456789012345678901234567890123456789
+	 .qname = "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+	 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaa",
+	 .ret = -1,
+	 .err = ENAMETOOLONG,
+	 },
 };
 
 /*
@@ -222,9 +222,9 @@
 	/*
 	 * Open message queue
 	 */
-	rc = mq_open(QUEUE_NAME, O_CREAT|O_EXCL|O_RDWR, S_IRWXU, NULL);
+	rc = mq_open(QUEUE_NAME, O_CREAT | O_EXCL | O_RDWR, S_IRWXU, NULL);
 	if (rc == -1) {
-		tst_resm(TFAIL|TTERRNO, "mq_open failed");
+		tst_resm(TFAIL | TTERRNO, "mq_open failed");
 		result = 1;
 		goto EXIT;
 	}
@@ -268,7 +268,8 @@
 	return 0;
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 	int lc;
 	char *msg;
@@ -287,7 +288,7 @@
 			ret = 0;
 
 			for (i = 0; ret == 0 &&
-				    i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			     i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
 				ret = do_test(&tcase[i]);
 			}
 
diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
index 7226819..a92c462 100644
--- a/testcases/kernel/syscalls/mremap/mremap01.c
+++ b/testcases/kernel/syscalls/mremap/mremap01.c
@@ -117,7 +117,7 @@
 
 	/* Check for the return value of mremap() */
 	if (addr == MAP_FAILED) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "mremap failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "mremap failed");
 	}
 
 	/*
@@ -140,7 +140,7 @@
 		 * with the file.
 		 */
 		if (msync(addr, newsize, MS_SYNC) != 0) {
-			tst_resm(TFAIL|TERRNO, "msync failed to synch "
+			tst_resm(TFAIL | TERRNO, "msync failed to synch "
 				 "mapped file");
 		} else {
 			tst_resm(TPASS, "Functionality of "
@@ -189,14 +189,14 @@
 	tst_tmpdir();
 
 	/* Creat a temporary file used for mapping */
-	if ((fildes = open(TEMPFILE, O_RDWR|O_CREAT, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "opening %s failed",
+	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup, "opening %s failed",
 			 TEMPFILE);
 
 	/* Stretch the file to the size of virtual memory area */
 	if (lseek(fildes, (off_t) memsize, SEEK_SET) != (off_t) memsize) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "lseeking to %d offset pos. failed", memsize);
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "lseeking to %d offset pos. failed", memsize);
 	}
 
 	/* Write one byte data into temporary file */
@@ -212,8 +212,7 @@
 
 	/* Check for the return value of mmap() */
 	if (addr == (char *)MAP_FAILED) {
-		tst_brkm(TBROK, cleanup, "mmaping Failed on %s",
-			 TEMPFILE);
+		tst_brkm(TBROK, cleanup, "mmaping Failed on %s", TEMPFILE);
 	}
 
 	/* Stretch the file to newsize of virtual memory block */
@@ -224,7 +223,7 @@
 
 	/* Write one byte data into temporary file */
 	if (write(fildes, "\0", 1) != 1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "writing to %s failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "writing to %s failed",
 			 TEMPFILE);
 	}
 }
@@ -247,7 +246,7 @@
 
 	/* Unmap the mapped memory */
 	if (munmap(addr, newsize) != 0)
-		tst_brkm(TBROK|TERRNO, NULL, "munmap failed");
+		tst_brkm(TBROK | TERRNO, NULL, "munmap failed");
 
 	/* Close the temporary file */
 	if (close(fildes) < 0) {
diff --git a/testcases/kernel/syscalls/mremap/mremap05.c b/testcases/kernel/syscalls/mremap/mremap05.c
index 793c404..e037be4 100644
--- a/testcases/kernel/syscalls/mremap/mremap05.c
+++ b/testcases/kernel/syscalls/mremap/mremap05.c
@@ -47,15 +47,15 @@
 struct test_case_t {
 	char *old_address;
 	char *new_address;
-	size_t old_size;        /* in pages */
-	size_t new_size;        /* in pages */
+	size_t old_size;	/* in pages */
+	size_t new_size;	/* in pages */
 	int flags;
 	const char *msg;
 	void *exp_ret;
 	int exp_errno;
 	char *ret;
-	void (*setup)(struct test_case_t *);
-	void (*cleanup)(struct test_case_t *);
+	void (*setup) (struct test_case_t *);
+	void (*cleanup) (struct test_case_t *);
 };
 
 static void setup(void);
@@ -70,51 +70,46 @@
 
 struct test_case_t tdat[] = {
 	{
-		.old_size = 1,
-		.new_size = 1,
-		.flags = MREMAP_FIXED,
-		.msg = "MREMAP_FIXED requires MREMAP_MAYMOVE",
-		.exp_ret = MAP_FAILED,
-		.exp_errno = EINVAL,
-		.setup = setup0,
-		.cleanup = cleanup0
-	},
+	 .old_size = 1,
+	 .new_size = 1,
+	 .flags = MREMAP_FIXED,
+	 .msg = "MREMAP_FIXED requires MREMAP_MAYMOVE",
+	 .exp_ret = MAP_FAILED,
+	 .exp_errno = EINVAL,
+	 .setup = setup0,
+	 .cleanup = cleanup0},
 	{
-		.old_size = 1,
-		.new_size = 1,
-		.flags = MREMAP_FIXED|MREMAP_MAYMOVE,
-		.msg = "new_addr has to be page aligned",
-		.exp_ret = MAP_FAILED,
-		.exp_errno = EINVAL,
-		.setup = setup1,
-		.cleanup = cleanup0
-	},
+	 .old_size = 1,
+	 .new_size = 1,
+	 .flags = MREMAP_FIXED | MREMAP_MAYMOVE,
+	 .msg = "new_addr has to be page aligned",
+	 .exp_ret = MAP_FAILED,
+	 .exp_errno = EINVAL,
+	 .setup = setup1,
+	 .cleanup = cleanup0},
 	{
-		.old_size = 2,
-		.new_size = 1,
-		.flags = MREMAP_FIXED|MREMAP_MAYMOVE,
-		.msg = "old/new area must not overlap",
-		.exp_ret = MAP_FAILED,
-		.exp_errno = EINVAL,
-		.setup = setup2,
-		.cleanup = cleanup0
-	},
+	 .old_size = 2,
+	 .new_size = 1,
+	 .flags = MREMAP_FIXED | MREMAP_MAYMOVE,
+	 .msg = "old/new area must not overlap",
+	 .exp_ret = MAP_FAILED,
+	 .exp_errno = EINVAL,
+	 .setup = setup2,
+	 .cleanup = cleanup0},
 	{
-		.old_size = 1,
-		.new_size = 1,
-		.flags = MREMAP_FIXED|MREMAP_MAYMOVE,
-		.msg = "mremap #1",
-		.setup = setup3,
-		.cleanup = cleanup0
-	},
+	 .old_size = 1,
+	 .new_size = 1,
+	 .flags = MREMAP_FIXED | MREMAP_MAYMOVE,
+	 .msg = "mremap #1",
+	 .setup = setup3,
+	 .cleanup = cleanup0},
 	{
-		.old_size = 1,
-		.new_size = 1,
-		.flags = MREMAP_FIXED|MREMAP_MAYMOVE,
-		.msg = "mremap #2",
-		.setup = setup4,
-		.cleanup = cleanup1
-	},
+	 .old_size = 1,
+	 .new_size = 1,
+	 .flags = MREMAP_FIXED | MREMAP_MAYMOVE,
+	 .msg = "mremap #2",
+	 .setup = setup4,
+	 .cleanup = cleanup1},
 };
 
 static int pagesize;
@@ -123,16 +118,16 @@
 static void free_test_area(void *p, int size)
 {
 	if (munmap(p, size) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "free_test_area munmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "free_test_area munmap");
 }
 
 static void *get_test_area(int size, int free_area)
 {
 	void *p;
-	p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-		0, 0);
+	p = mmap(NULL, size, PROT_READ | PROT_WRITE,
+		 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "get_test_area mmap");
+		tst_brkm(TBROK | TERRNO, cleanup, "get_test_area mmap");
 	if (free_area)
 		free_test_area(p, size);
 	return p;
@@ -141,7 +136,7 @@
 static void test_mremap(struct test_case_t *t)
 {
 	t->ret = mremap(t->old_address, t->old_size, t->new_size, t->flags,
-		t->new_address);
+			t->new_address);
 
 	if (t->ret == t->exp_ret) {
 		if (t->ret != MAP_FAILED) {
@@ -154,44 +149,44 @@
 			if (errno == t->exp_errno)
 				tst_resm(TPASS, "%s", t->msg);
 			else
-				tst_resm(TFAIL|TERRNO, "%s", t->msg);
+				tst_resm(TFAIL | TERRNO, "%s", t->msg);
 		}
 	} else {
 		tst_resm(TFAIL, "%s ret: %p, expected: %p", t->msg,
-				t->ret, t->exp_ret);
+			 t->ret, t->exp_ret);
 	}
 }
 
 static void setup0(struct test_case_t *t)
 {
-	t->old_address = get_test_area(t->old_size*pagesize, 0);
-	t->new_address = get_test_area(t->new_size*pagesize, 1);
+	t->old_address = get_test_area(t->old_size * pagesize, 0);
+	t->new_address = get_test_area(t->new_size * pagesize, 1);
 }
 
 static void setup1(struct test_case_t *t)
 {
-	t->old_address = get_test_area(t->old_size*pagesize, 0);
-	t->new_address = get_test_area((t->new_size + 1)*pagesize, 1) + 1;
+	t->old_address = get_test_area(t->old_size * pagesize, 0);
+	t->new_address = get_test_area((t->new_size + 1) * pagesize, 1) + 1;
 }
 
 static void setup2(struct test_case_t *t)
 {
-	t->old_address = get_test_area(t->old_size*pagesize, 0);
+	t->old_address = get_test_area(t->old_size * pagesize, 0);
 	t->new_address = t->old_address;
 }
 
 static void setup3(struct test_case_t *t)
 {
-	t->old_address = get_test_area(t->old_size*pagesize, 0);
-	t->new_address = get_test_area(t->new_size*pagesize, 1);
+	t->old_address = get_test_area(t->old_size * pagesize, 0);
+	t->new_address = get_test_area(t->new_size * pagesize, 1);
 	t->exp_ret = t->new_address;
 	*(t->old_address) = 0x1;
 }
 
 static void setup4(struct test_case_t *t)
 {
-	t->old_address = get_test_area(t->old_size*pagesize, 0);
-	t->new_address = get_test_area(t->new_size*pagesize, 0);
+	t->old_address = get_test_area(t->old_size * pagesize, 0);
+	t->new_address = get_test_area(t->new_size * pagesize, 0);
 	t->exp_ret = t->new_address;
 	*(t->old_address) = 0x1;
 	*(t->new_address) = 0x2;
@@ -200,18 +195,18 @@
 static void cleanup0(struct test_case_t *t)
 {
 	if (t->ret == MAP_FAILED)
-		free_test_area(t->old_address, t->old_size*pagesize);
+		free_test_area(t->old_address, t->old_size * pagesize);
 	else
-		free_test_area(t->ret, t->new_size*pagesize);
+		free_test_area(t->ret, t->new_size * pagesize);
 }
 
 static void cleanup1(struct test_case_t *t)
 {
 	if (t->ret == MAP_FAILED) {
-		free_test_area(t->old_address, t->old_size*pagesize);
-		free_test_area(t->new_address, t->new_size*pagesize);
+		free_test_area(t->old_address, t->old_size * pagesize);
+		free_test_area(t->new_address, t->new_size * pagesize);
 	} else {
-		free_test_area(t->ret, t->new_size*pagesize);
+		free_test_area(t->ret, t->new_size * pagesize);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/msync/msync01.c b/testcases/kernel/syscalls/msync/msync01.c
index fcbf621..2454489 100644
--- a/testcases/kernel/syscalls/msync/msync01.c
+++ b/testcases/kernel/syscalls/msync/msync01.c
@@ -106,13 +106,14 @@
 		TEST(msync(addr, page_sz, MS_ASYNC));
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TERRNO, "msync failed");
+			tst_resm(TFAIL | TERRNO, "msync failed");
 			continue;
 		}
 
 		if (STD_FUNCTIONAL_TEST) {
 			if (lseek(fildes, (off_t) 100, SEEK_SET) != 100)
-				tst_brkm(TBROK|TERRNO, cleanup, "lseek failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "lseek failed");
 
 			/*
 			 * Seeking to specified offset. successful.
@@ -165,17 +166,17 @@
 	TEST_PAUSE;
 
 	if ((page_sz = getpagesize()) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "getpagesize failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
 
 	tst_tmpdir();
 
-	if ((fildes = open(TEMPFILE, O_RDWR|O_CREAT, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	while (c_total < page_sz) {
 		nwrite = write(fildes, write_buf, sizeof(write_buf));
 		if (nwrite <= 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 		else
 			c_total += nwrite;
 	}
@@ -184,12 +185,12 @@
 	 * Call mmap to map virtual memory (mul. of page size bytes) from the
 	 * beginning of temporary file (offset is 0) into memory.
 	 */
-	addr = mmap(0, page_sz, PROT_READ|PROT_WRITE, MAP_FILE|MAP_SHARED,
+	addr = mmap(0, page_sz, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED,
 		    fildes, 0);
 
 	/* Check for the return value of mmap() */
 	if (addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 	/* Set 256 bytes, at 100 byte offset in the mapped region */
 	memset(addr + 100, 1, 256);
@@ -200,10 +201,10 @@
 	TEST_CLEANUP;
 
 	if (munmap(addr, page_sz) == -1)
-		tst_resm(TBROK|TERRNO, "munmap failed");
+		tst_resm(TBROK | TERRNO, "munmap failed");
 
 	if (close(fildes) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/msync/msync02.c b/testcases/kernel/syscalls/msync/msync02.c
index c200978..7988208 100644
--- a/testcases/kernel/syscalls/msync/msync02.c
+++ b/testcases/kernel/syscalls/msync/msync02.c
@@ -96,13 +96,11 @@
 	TEST(msync(addr, page_sz, MS_INVALIDATE));
 
 	if (TEST_RETURN == -1)
-		tst_resm(TFAIL|TTERRNO, "msync failed");
-	else if (memcmp(addr+100, write_buf, strlen(write_buf)) != 0)
-		tst_resm(TFAIL,
-			 "memory region contains invalid data");
+		tst_resm(TFAIL | TTERRNO, "msync failed");
+	else if (memcmp(addr + 100, write_buf, strlen(write_buf)) != 0)
+		tst_resm(TFAIL, "memory region contains invalid data");
 	else
-		tst_resm(TPASS,
-			 "Functionality of msync successful");
+		tst_resm(TPASS, "Functionality of msync successful");
 
 	cleanup();
 
@@ -119,17 +117,17 @@
 	TEST_PAUSE;
 
 	if ((page_sz = getpagesize()) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "getpagesize failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
 
 	tst_tmpdir();
 
-	if ((fildes = open(TEMPFILE, O_RDWR|O_CREAT, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	/* Write one page size of char data into temporary file */
 	while (c_total < page_sz) {
 		if ((nwrite = write(fildes, tst_buf, sizeof(tst_buf))) <= 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 		else
 			c_total += nwrite;
 	}
@@ -138,15 +136,15 @@
 		    fildes, 0);
 
 	if (addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 	/* Again, Seek to the specified byte offset (100) position */
 	if (lseek(fildes, 100, SEEK_SET) != 100)
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek failed");
 
 	/* Write the string in write_buf at the 100 byte offset */
 	if (write(fildes, write_buf, strlen(write_buf)) != strlen(write_buf))
-		tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 }
 
 void cleanup()
@@ -154,11 +152,11 @@
 	TEST_CLEANUP;
 
 	if (munmap(addr, page_sz) == -1)
-		tst_resm(TBROK|TERRNO, "munmap failed");
+		tst_resm(TBROK | TERRNO, "munmap failed");
 
 	/* Close the temporary file */
 	if (close(fildes) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 }
diff --git a/testcases/kernel/syscalls/msync/msync03.c b/testcases/kernel/syscalls/msync/msync03.c
index 5fa2ff2..7f109f5 100644
--- a/testcases/kernel/syscalls/msync/msync03.c
+++ b/testcases/kernel/syscalls/msync/msync03.c
@@ -108,7 +108,7 @@
 		if (errno == EINVAL)
 			tst_resm(TPASS, "msync failed with EINVAL as expected");
 		else
-			tst_resm(TFAIL|TERRNO, "msync failed unexpectedly");
+			tst_resm(TFAIL | TERRNO, "msync failed unexpectedly");
 	}
 
 	cleanup();
@@ -124,11 +124,11 @@
 	TEST_PAUSE;
 
 	if ((page_sz = getpagesize()) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "getpagesize failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
 
 	getrlimit(RLIMIT_DATA, &brkval);
 
-	addr = (void*) brkval.rlim_max;
+	addr = (void *)brkval.rlim_max;
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/msync/msync04.c b/testcases/kernel/syscalls/msync/msync04.c
index dc47b9f..5a0302c 100644
--- a/testcases/kernel/syscalls/msync/msync04.c
+++ b/testcases/kernel/syscalls/msync/msync04.c
@@ -102,7 +102,7 @@
 	else if (TEST_ERRNO == EINVAL)
 		tst_resm(TPASS, "msync failed with EINVAL as expected");
 	else
-		tst_resm(TFAIL|TTERRNO, "msync failed unexpectedly");
+		tst_resm(TFAIL | TTERRNO, "msync failed unexpectedly");
 
 	cleanup();
 
@@ -117,7 +117,7 @@
 	TEST_PAUSE;
 
 	if ((page_sz = getpagesize()) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "getpagesize failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
 
 	tst_tmpdir();
 
@@ -125,7 +125,7 @@
 
 	/* Creat a temporary file used for mapping */
 	if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 
 	/* Write one page size of char data into temporary file */
 	while (c_total < page_sz) {
@@ -135,12 +135,12 @@
 			c_total += nwrite;
 	}
 
-	addr = mmap(0, page_sz, PROT_READ|PROT_WRITE, MAP_FILE|MAP_PRIVATE,
+	addr = mmap(0, page_sz, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE,
 		    fildes, 0);
 
 	/* Check for the return value of mmap() */
 	if (addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/msync/msync05.c b/testcases/kernel/syscalls/msync/msync05.c
index 178d6fa..ef1e084 100644
--- a/testcases/kernel/syscalls/msync/msync05.c
+++ b/testcases/kernel/syscalls/msync/msync05.c
@@ -104,7 +104,7 @@
 		else if (TEST_ERRNO == ENOMEM)
 			tst_resm(TPASS, "msync failed as expected with ENOMEM");
 		else
-			tst_resm(TFAIL|TTERRNO, "msync failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "msync failed unexpectedly");
 	}
 
 	cleanup();
@@ -118,7 +118,7 @@
 	TEST_PAUSE;
 
 	if ((page_sz = getpagesize()) == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "getpagesize failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed");
 
 	addr = get_high_address();
 }
diff --git a/testcases/kernel/syscalls/munlock/munlock01.c b/testcases/kernel/syscalls/munlock/munlock01.c
index aa29bcc..a92c5a4 100644
--- a/testcases/kernel/syscalls/munlock/munlock01.c
+++ b/testcases/kernel/syscalls/munlock/munlock01.c
@@ -119,9 +119,9 @@
 			/* check return code */
 			if (TEST_RETURN == -1) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO, "mlock(%p, %d) Failed with "
-					 "return=%ld",
-					 TC[i].addr, TC[i].len,
+				tst_resm(TFAIL | TTERRNO,
+					 "mlock(%p, %d) Failed with "
+					 "return=%ld", TC[i].addr, TC[i].len,
 					 TEST_RETURN);
 			} else {
 				tst_resm(TPASS, "test %d passed length = %d",
@@ -146,8 +146,9 @@
 	/* check return code */
 	if (TEST_RETURN == -1) {
 		TEST_ERROR_LOG(TEST_ERRNO);
-		tst_brkm(TFAIL|TTERRNO, cleanup, "mlock(%p, %d) Failed with return=%ld",
-			 TC[i].addr, TC[i].len, TEST_RETURN);
+		tst_brkm(TFAIL | TTERRNO, cleanup,
+			 "mlock(%p, %d) Failed with return=%ld", TC[i].addr,
+			 TC[i].len, TEST_RETURN);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/munlock/munlock02.c b/testcases/kernel/syscalls/munlock/munlock02.c
index 13e336c..96567b3 100644
--- a/testcases/kernel/syscalls/munlock/munlock02.c
+++ b/testcases/kernel/syscalls/munlock/munlock02.c
@@ -173,8 +173,9 @@
 
 	/* check return code */
 	if (TEST_RETURN == -1) {
-		tst_brkm(TFAIL|TTERRNO, cleanup, "mlock(%p, %d) Failed with return=%ld",
-			 address, TC[0].len, TEST_RETURN);
+		tst_brkm(TFAIL | TTERRNO, cleanup,
+			 "mlock(%p, %d) Failed with return=%ld", address,
+			 TC[0].len, TEST_RETURN);
 	}
 	TC[0].addr = address;
 	/*
diff --git a/testcases/kernel/syscalls/munlockall/munlockall01.c b/testcases/kernel/syscalls/munlockall/munlockall01.c
index c61112d..7120576 100644
--- a/testcases/kernel/syscalls/munlockall/munlockall01.c
+++ b/testcases/kernel/syscalls/munlockall/munlockall01.c
@@ -96,9 +96,8 @@
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "munlockall() Failed with"
-				 " return=%ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "munlockall() Failed with"
+				 " return=%ld", TEST_RETURN);
 		} else {
 			tst_resm(TPASS, "munlockall() passed with"
 				 " return=%ld ", TEST_RETURN);
diff --git a/testcases/kernel/syscalls/munmap/munmap03.c b/testcases/kernel/syscalls/munmap/munmap03.c
index 148e447..39b6f62 100644
--- a/testcases/kernel/syscalls/munmap/munmap03.c
+++ b/testcases/kernel/syscalls/munmap/munmap03.c
@@ -125,9 +125,10 @@
 
 		/* Check for expected errno. */
 		if (TEST_ERRNO == EINVAL) {
-			tst_resm(TPASS|TTERRNO, "munmap failed as expected");
+			tst_resm(TPASS | TTERRNO, "munmap failed as expected");
 		} else {
-			tst_resm(TPASS|TTERRNO, "munmap didn't fail as expected");
+			tst_resm(TPASS | TTERRNO,
+				 "munmap didn't fail as expected");
 		}
 
 		cleanup();
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep01.c b/testcases/kernel/syscalls/nanosleep/nanosleep01.c
index c66c1b1..6cc3e7a 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep01.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep01.c
@@ -155,8 +155,8 @@
 					retval = 1;
 					tst_resm(TFAIL, "Child execution not "
 						 "suspended for %jd seconds.  (Wanted %ld ms, got %ld ms)",
-						 (intmax_t)timereq.tv_sec, want_ms,
-						 got_ms);
+						 (intmax_t) timereq.tv_sec,
+						 want_ms, got_ms);
 				} else {
 					tst_resm(TPASS, "nanosleep "
 						 "functionality is correct");
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep02.c b/testcases/kernel/syscalls/nanosleep/nanosleep02.c
index 0526f5c..aa02427 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep02.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep02.c
@@ -83,7 +83,6 @@
 char *TCID = "nanosleep02";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
-
 struct timespec timereq;	/* time struct. buffer for nanosleep() */
 struct timespec timerem;	/* time struct. buffer for nanosleep() */
 
@@ -159,10 +158,10 @@
 		wait(&status);
 		if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
 			tst_resm(TPASS, "Functionality of nanosleep() is "
-					"correct");
+				 "correct");
 		} else {
 			tst_resm(TFAIL, "child process exited abnormally; "
-					"status = %d", status);
+				 "status = %d", status);
 		}
 	}
 
@@ -246,8 +245,8 @@
 			 */
 			req = timereq.tv_sec * 1000000 + timereq.tv_nsec / 1000;
 			elapsed =
-			    (ntime.tv_sec - otime.tv_sec) * 1000000 + ntime.tv_usec -
-			    otime.tv_usec;
+			    (ntime.tv_sec - otime.tv_sec) * 1000000 +
+			    ntime.tv_usec - otime.tv_usec;
 			if (elapsed - req > USEC_PRECISION) {
 				tst_resm(TWARN,
 					 "This test could fail if the system "
@@ -255,10 +254,10 @@
 					 "of the way it calculates the system "
 					 "call execution time.");
 				tst_resm(TFAIL, "Child execution not suspended "
-						"for %jd seconds %lu "
-						"nanoseconds",
-						(intmax_t)timereq.tv_sec,
-						timereq.tv_nsec);
+					 "for %jd seconds %lu "
+					 "nanoseconds",
+					 (intmax_t) timereq.tv_sec,
+					 timereq.tv_nsec);
 			} else {
 				tst_resm(TINFO, "call succeeded");
 			}
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep03.c b/testcases/kernel/syscalls/nanosleep/nanosleep03.c
index 823bc60..d9fed11 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep03.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep03.c
@@ -140,10 +140,10 @@
 		wait(&status);
 		if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
 			tst_resm(TPASS, "nanosleep() failed, interrupted"
-					" by signal (%d) as expected", EINTR);
+				 " by signal (%d) as expected", EINTR);
 		} else {
 			tst_resm(TFAIL, "child process exited abnormally; "
-					"status = %d", status);
+				 "status = %d", status);
 		}
 	}
 
@@ -173,13 +173,13 @@
 		/* Check for expected errno is set */
 		if (TEST_ERRNO != EINTR) {
 			tst_resm(TFAIL | TTERRNO,
-				"nanosleep() failed; expected errno: %d",
-				EINTR);
+				 "nanosleep() failed; expected errno: %d",
+				 EINTR);
 			exit(1);
 		}
 	} else {
 		tst_resm(TFAIL, "nanosleep() returns %ld, "
-				"expected -1, errno:%d", TEST_RETURN, EINTR);
+			 "expected -1, errno:%d", TEST_RETURN, EINTR);
 		exit(1);
 	}
 
diff --git a/testcases/kernel/syscalls/nanosleep/nanosleep04.c b/testcases/kernel/syscalls/nanosleep/nanosleep04.c
index 6da7e43..de79352 100644
--- a/testcases/kernel/syscalls/nanosleep/nanosleep04.c
+++ b/testcases/kernel/syscalls/nanosleep/nanosleep04.c
@@ -142,11 +142,11 @@
 		wait(&status);
 		if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
 			tst_resm(TPASS, "nanosleep() failed, when provided "
-					"invalid pause time, with expected "
-					"errno: %d", EINVAL);
+				 "invalid pause time, with expected "
+				 "errno: %d", EINVAL);
 		} else if (WEXITSTATUS(status) == 1) {
 			tst_resm(TFAIL, "child process exited abnormally; "
-					"status = %d", status);
+				 "status = %d", status);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/newuname/newuname01.c b/testcases/kernel/syscalls/newuname/newuname01.c
index 46c1a1d..db24f46 100644
--- a/testcases/kernel/syscalls/newuname/newuname01.c
+++ b/testcases/kernel/syscalls/newuname/newuname01.c
@@ -52,9 +52,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "newuname01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "newuname01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -74,12 +74,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -100,56 +101,73 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
-        struct utsname name;
+int main(int ac, char **av)
+{
+	struct utsname name;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-                     TEST(syscall(__NR_uname,&name));     //call newuname()
-                     if (TEST_RETURN == -1) {
-                 	   tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-                           cleanup();
-	  	           tst_exit();
-                     }else {
-	   		tst_resm(TPASS, "newuname call succeed: return value = %ld ",TEST_RETURN);
-			TEST(strcmp(name.sysname,"Linux")); //Linux ?
-			if (TEST_RETURN == 0) {
-				tst_resm(TINFO,"This system is %s",name.sysname);
-				tst_resm(TINFO,"The system infomation is :");
-				tst_resm(TINFO,"System is %s on %s hardware",name.sysname,name.machine);
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+			TEST(syscall(__NR_uname, &name));	//call newuname()
+			if (TEST_RETURN == -1) {
+				tst_resm(TFAIL, "%s failed - errno = %d : %s",
+					 TCID, TEST_ERRNO,
+					 strerror(TEST_ERRNO));
+				cleanup();
+				tst_exit();
+			} else {
+				tst_resm(TPASS,
+					 "newuname call succeed: return value = %ld ",
+					 TEST_RETURN);
+				TEST(strcmp(name.sysname, "Linux"));	//Linux ?
+				if (TEST_RETURN == 0) {
+					tst_resm(TINFO, "This system is %s",
+						 name.sysname);
+					tst_resm(TINFO,
+						 "The system infomation is :");
+					tst_resm(TINFO,
+						 "System is %s on %s hardware",
+						 name.sysname, name.machine);
 
-				tst_resm(TINFO,"Nodename is %s",name.nodename);
-				tst_resm(TINFO,"Version is %s, %s",name.release,name.version);
-				tst_resm(TINFO,"Domainname is %s ",*(&name.machine+1));
-                           	cleanup();
-	  	           	tst_exit();
-	                }else{
-                 	  	tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-			   	tst_resm(TINFO,"This system is not Linux");
-                           	cleanup();
-	  	           	tst_exit();
+					tst_resm(TINFO, "Nodename is %s",
+						 name.nodename);
+					tst_resm(TINFO, "Version is %s, %s",
+						 name.release, name.version);
+					tst_resm(TINFO, "Domainname is %s ",
+						 *(&name.machine + 1));
+					cleanup();
+					tst_exit();
+				} else {
+					tst_resm(TFAIL,
+						 "%s failed - errno = %d : %s",
+						 TCID, TEST_ERRNO,
+						 strerror(TEST_ERRNO));
+					tst_resm(TINFO,
+						 "This system is not Linux");
+					cleanup();
+					tst_exit();
+				}
+
 			}
 
-     		   }
-
+		}
 	}
-     }
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/nftw/lib.c b/testcases/kernel/syscalls/nftw/lib.c
index b49bf32..521e757 100644
--- a/testcases/kernel/syscalls/nftw/lib.c
+++ b/testcases/kernel/syscalls/nftw/lib.c
@@ -194,8 +194,8 @@
 #endif
 
 	if ((path = (char *)malloc(pcPathMax + 2)) == NULL) {
-		tst_resm(TFAIL, "malloc(%zu) for path failed: %s", pcPathMax + 2,
-			 strerror(errno));
+		tst_resm(TFAIL, "malloc(%zu) for path failed: %s",
+			 pcPathMax + 2, strerror(errno));
 		cleanup_function();
 		fail_exit();
 	}
diff --git a/testcases/kernel/syscalls/nftw/lib64.c b/testcases/kernel/syscalls/nftw/lib64.c
index 7eeab1f..2e01e36 100644
--- a/testcases/kernel/syscalls/nftw/lib64.c
+++ b/testcases/kernel/syscalls/nftw/lib64.c
@@ -194,8 +194,8 @@
 #endif
 
 	if ((path = (char *)malloc(pcPathMax + 2)) == NULL) {
-		tst_resm(TFAIL, "malloc(%zu) for path failed: %s", pcPathMax + 2,
-			 strerror(errno));
+		tst_resm(TFAIL, "malloc(%zu) for path failed: %s",
+			 pcPathMax + 2, strerror(errno));
 		cleanup_function();
 		fail_exit();
 	}
diff --git a/testcases/kernel/syscalls/nftw/nftw.c b/testcases/kernel/syscalls/nftw/nftw.c
index 536eb5e..9651905 100644
--- a/testcases/kernel/syscalls/nftw/nftw.c
+++ b/testcases/kernel/syscalls/nftw/nftw.c
@@ -250,8 +250,7 @@
 int npathdats, ngoods, nbads, nmnem;
 
 /*--------------------------------------------------------------*/
-int
-main(void)
+int main(void)
 {
 	setup();		/* temp file is now open        */
 
diff --git a/testcases/kernel/syscalls/nftw/nftw64.c b/testcases/kernel/syscalls/nftw/nftw64.c
index cb19736..0b3fe6c 100644
--- a/testcases/kernel/syscalls/nftw/nftw64.c
+++ b/testcases/kernel/syscalls/nftw/nftw64.c
@@ -247,8 +247,7 @@
 int npathdats, ngoods, nbads, nmnem;
 
 /*--------------------------------------------------------------*/
-int
-main(void)
+int main(void)
 {
 	setup();		/* temp file is now open        */
 
diff --git a/testcases/kernel/syscalls/nice/nice04.c b/testcases/kernel/syscalls/nice/nice04.c
index cfb4bd6..5413454 100644
--- a/testcases/kernel/syscalls/nice/nice04.c
+++ b/testcases/kernel/syscalls/nice/nice04.c
@@ -126,7 +126,7 @@
 				tst_resm(TPASS, "nice(2) returned %ld for %s",
 					 TEST_RETURN, test_desc);
 			} else {
-				tst_resm(TFAIL|TTERRNO,
+				tst_resm(TFAIL | TTERRNO,
 					 "nice() returned %ld for %s",
 					 TEST_RETURN, test_desc);
 			}
diff --git a/testcases/kernel/syscalls/open/open01.c b/testcases/kernel/syscalls/open/open01.c
index a4e79df..0d5c384 100644
--- a/testcases/kernel/syscalls/open/open01.c
+++ b/testcases/kernel/syscalls/open/open01.c
@@ -78,7 +78,7 @@
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
diff --git a/testcases/kernel/syscalls/open/open02.c b/testcases/kernel/syscalls/open/open02.c
index be778d1..22dff85 100644
--- a/testcases/kernel/syscalls/open/open02.c
+++ b/testcases/kernel/syscalls/open/open02.c
@@ -70,7 +70,7 @@
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
diff --git a/testcases/kernel/syscalls/open/open03.c b/testcases/kernel/syscalls/open/open03.c
index 7d01e22..3446e3c 100644
--- a/testcases/kernel/syscalls/open/open03.c
+++ b/testcases/kernel/syscalls/open/open03.c
@@ -164,7 +164,7 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL|TTERRNO,
+			tst_resm(TFAIL | TTERRNO,
 				 "open(%s,O_RDWR|O_CREAT,0700) failed", fname);
 		} else {
 	    /***************************************************************
@@ -178,10 +178,10 @@
 			}
 
 			if (close(fd) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
+				tst_brkm(TBROK | TERRNO, cleanup,
 					 "close(%s) failed", fname);
 			else if (unlink(fname) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
+				tst_brkm(TBROK | TERRNO, cleanup,
 					 "unlink(%s) failed", fname);
 		}
 	}
diff --git a/testcases/kernel/syscalls/open/open05.c b/testcases/kernel/syscalls/open/open05.c
index d7f784c..491eaff 100644
--- a/testcases/kernel/syscalls/open/open05.c
+++ b/testcases/kernel/syscalls/open/open05.c
@@ -87,7 +87,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if (pid == 0) {	/* child */
 			if (seteuid(nobody->pw_uid) == -1) {
@@ -159,7 +159,7 @@
 
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1) {
 		tst_brkm(TBROK, cleanup, "open() failed, errno: %d", errno);
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/open/open06.c b/testcases/kernel/syscalls/open/open06.c
index e4061d4..db9f9c4 100644
--- a/testcases/kernel/syscalls/open/open06.c
+++ b/testcases/kernel/syscalls/open/open06.c
@@ -113,7 +113,7 @@
 
 	sprintf(fname, "%s.%d", fname, getpid());
 
-	if (mknod(fname, S_IFIFO|0644, 0) == -1)
+	if (mknod(fname, S_IFIFO | 0644, 0) == -1)
 		tst_brkm(TBROK, cleanup, "mknod FAILED");
 }
 
diff --git a/testcases/kernel/syscalls/open/open07.c b/testcases/kernel/syscalls/open/open07.c
index b257689..e652132 100644
--- a/testcases/kernel/syscalls/open/open07.c
+++ b/testcases/kernel/syscalls/open/open07.c
@@ -90,17 +90,18 @@
 	int exp_errno;
 } TC[] = {
 	{
-	"Test for ELOOP on f2: f1 -> f2", {}, O_NOFOLLOW, 00700,
-		    setupfunc_test1, ELOOP}, {
-	"Test for ELOOP on d2: d1 -> d2", {}, O_NOFOLLOW, 00700,
-		    setupfunc_test2, ELOOP}, {
-	"Test for ELOOP on f3: f1 -> f2 -> f3", {}, O_NOFOLLOW,
-		    00700, setupfunc_test3, ELOOP}, {
-	"Test for ELOOP on d3: d1 -> d2 -> d3", {}, O_NOFOLLOW,
-		    00700, setupfunc_test4, ELOOP}, {
-	"Test for success on d2: d1 -> d2", {}, O_NOFOLLOW, 00700,
-		    setupfunc_test5, 0}, {
-	NULL, {}, 0, 0, NULL, 0}
+		"Test for ELOOP on f2: f1 -> f2", {
+	}, O_NOFOLLOW, 00700, setupfunc_test1, ELOOP}, {
+		"Test for ELOOP on d2: d1 -> d2", {
+	}, O_NOFOLLOW, 00700, setupfunc_test2, ELOOP}, {
+		"Test for ELOOP on f3: f1 -> f2 -> f3", {
+	}, O_NOFOLLOW, 00700, setupfunc_test3, ELOOP}, {
+		"Test for ELOOP on d3: d1 -> d2 -> d3", {
+	}, O_NOFOLLOW, 00700, setupfunc_test4, ELOOP}, {
+		"Test for success on d2: d1 -> d2", {
+	}, O_NOFOLLOW, 00700, setupfunc_test5, 0}, {
+		NULL, {
+	}, 0, 0, NULL, 0}
 };
 
 int main(int ac, char **av)
@@ -159,7 +160,7 @@
 					tst_resm(TPASS, "open succeeded as "
 						 "expected");
 				}
- 			}
+			}
 			if (TEST_RETURN != -1)
 				close(TEST_RETURN);
 		}
@@ -176,10 +177,10 @@
 	sprintf(file2, "open03.2.%d", getpid());
 	if ((fd1 = creat(file1, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	strcpy(TC[0].filename, file2);
 }
 
@@ -191,10 +192,10 @@
 	sprintf(file2, "open03.4.%d", getpid());
 	if (mkdir(file1, 00700) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	strcpy(TC[1].filename, file2);
 }
 
@@ -207,13 +208,13 @@
 	sprintf(file3, "open03.7.%d", getpid());
 	if ((fd2 = creat(file1, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file2, file3) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	strcpy(TC[2].filename, file3);
 }
 
@@ -226,13 +227,13 @@
 	sprintf(file3, "open03.10.%d", getpid());
 	if (mkdir(file1, 00700) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file1, file2) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	if (symlink(file2, file3) < 0) {
 		tst_brkm(TBROK, cleanup, "symlink(2) failed: errno: %d", errno);
-	 }
+	}
 	strcpy(TC[3].filename, file3);
 }
 
diff --git a/testcases/kernel/syscalls/open/open08.c b/testcases/kernel/syscalls/open/open08.c
index 6b48de1..754f2dd 100644
--- a/testcases/kernel/syscalls/open/open08.c
+++ b/testcases/kernel/syscalls/open/open08.c
@@ -164,10 +164,10 @@
 	ltpuser = getpwnam(nobody_uid);
 	if (setgid(ltpuser->pw_gid) == -1) {
 		tst_brkm(TBROK | TERRNO, NULL, "setgid(%d) failed",
-			ltpuser->pw_gid);
+			 ltpuser->pw_gid);
 	} else if (setuid(ltpuser->pw_uid) == -1) {
 		tst_brkm(TBROK | TERRNO, NULL, "setuid(%d) failed",
-			ltpuser->pw_uid);
+			 ltpuser->pw_uid);
 	}
 
 	tst_tmpdir();
diff --git a/testcases/kernel/syscalls/open/open09.c b/testcases/kernel/syscalls/open/open09.c
index bc42a06..d9564be 100644
--- a/testcases/kernel/syscalls/open/open09.c
+++ b/testcases/kernel/syscalls/open/open09.c
@@ -64,7 +64,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_resm(TBROK, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 }
+	}
 	tst_tmpdir();
 	local_flag = PASSED;
 	sprintf(tempfile, "open09.%d", getpid());
diff --git a/testcases/kernel/syscalls/open/open10.c b/testcases/kernel/syscalls/open/open10.c
index e8c8f40..6888203 100644
--- a/testcases/kernel/syscalls/open/open10.c
+++ b/testcases/kernel/syscalls/open/open10.c
@@ -123,7 +123,7 @@
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	tst_tmpdir();
 
@@ -176,17 +176,17 @@
 		 * and with no setgid bit.
 		 */
 		if ((ret = mkdir(DIR_A, MODE_RWX)) < 0) {
-			tst_resm(TFAIL|TERRNO, "mkdir(%s) failed", DIR_A);
+			tst_resm(TFAIL | TERRNO, "mkdir(%s) failed", DIR_A);
 			local_flag = FAILED;
 		}
 
 		if ((ret = chown(DIR_A, user1_uid, group2_gid)) < 0) {
-			tst_resm(TFAIL|TERRNO, "chown(%s) failed", DIR_A);
+			tst_resm(TFAIL | TERRNO, "chown(%s) failed", DIR_A);
 			local_flag = FAILED;
 		}
 
 		if ((ret = stat(DIR_A, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", DIR_A);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", DIR_A);
 			local_flag = FAILED;
 		}
 
@@ -209,22 +209,22 @@
 		 * this process and with the setgid bit set.
 		 */
 		if ((ret = mkdir(DIR_B, MODE_RWX)) < 0) {
-			tst_resm(TFAIL|TERRNO, "mkdir(%s) failed", DIR_B);
+			tst_resm(TFAIL | TERRNO, "mkdir(%s) failed", DIR_B);
 			local_flag = FAILED;
 		}
 
 		if ((ret = chown(DIR_B, user1_uid, group2_gid)) < 0) {
-			tst_resm(TFAIL|TERRNO, "chown(%s) failed", DIR_B);
+			tst_resm(TFAIL | TERRNO, "chown(%s) failed", DIR_B);
 			local_flag = FAILED;
 		}
 
 		if ((ret = chmod(DIR_B, MODE_SGID)) < 0) {
-			tst_resm(TFAIL|TERRNO, "chmod(%s) failed", DIR_B);
+			tst_resm(TFAIL | TERRNO, "chmod(%s) failed", DIR_B);
 			local_flag = FAILED;
 		}
 
 		if ((ret = stat(DIR_B, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", DIR_B);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", DIR_B);
 			local_flag = FAILED;
 		}
 
@@ -265,7 +265,8 @@
 		 * Now become user1, group1
 		 */
 		if ((ret = setgid(group1_gid)) < 0) {
-			tst_resm(TINFO, "Unable to set process group ID to group1");
+			tst_resm(TINFO,
+				 "Unable to set process group ID to group1");
 		}
 
 		if ((ret = setreuid(-1, user1_uid)) < 0) {
@@ -278,13 +279,13 @@
 		 */
 		ret = open(nosetgid_A, O_CREAT | O_EXCL | O_RDWR, MODE_RWX);
 		if (ret < 0) {
-			tst_resm(TFAIL|TERRNO, "open(%s) failed", nosetgid_A);
+			tst_resm(TFAIL | TERRNO, "open(%s) failed", nosetgid_A);
 			local_flag = FAILED;
 		}
 		close(ret);
 
 		if ((ret = stat(nosetgid_A, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", nosetgid_A);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", nosetgid_A);
 			local_flag = FAILED;
 		}
 
@@ -307,13 +308,13 @@
 		 */
 		ret = open(setgid_A, O_CREAT | O_EXCL | O_RDWR, MODE_SGID);
 		if (ret < 0) {
-			tst_resm(TFAIL|TERRNO, "open(%s) failed", setgid_A);
+			tst_resm(TFAIL | TERRNO, "open(%s) failed", setgid_A);
 			local_flag = FAILED;
 		}
 		close(ret);
 
 		if ((ret = stat(setgid_A, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", setgid_A);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", setgid_A);
 			local_flag = FAILED;
 		}
 
@@ -355,13 +356,13 @@
 		 */
 		ret = open(nosetgid_B, O_CREAT | O_EXCL | O_RDWR, MODE_RWX);
 		if (ret < 0) {
-			tst_resm(TFAIL|TERRNO, "open(%s) failed", nosetgid_B);
+			tst_resm(TFAIL | TERRNO, "open(%s) failed", nosetgid_B);
 			local_flag = FAILED;
 		}
 		close(ret);
 
 		if ((ret = stat(nosetgid_B, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", nosetgid_B);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", nosetgid_B);
 			local_flag = FAILED;
 		}
 
@@ -385,13 +386,13 @@
 		 */
 		ret = open(setgid_B, O_CREAT | O_EXCL | O_RDWR, MODE_SGID);
 		if (ret < 0) {
-			tst_resm(TFAIL|TERRNO, "open(%s) failed", setgid_B);
+			tst_resm(TFAIL | TERRNO, "open(%s) failed", setgid_B);
 			local_flag = FAILED;
 		}
 		close(ret);
 
 		if ((ret = stat(setgid_B, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", setgid_B);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed", setgid_B);
 			local_flag = FAILED;
 		}
 
@@ -429,20 +430,23 @@
 
 		/* Become root again */
 		if ((ret = setreuid(-1, save_myuid)) < 0) {
-			tst_resm(TFAIL|TERRNO, "Changing back to root failed");
+			tst_resm(TFAIL | TERRNO,
+				 "Changing back to root failed");
 			local_flag = FAILED;
 		}
 
 		/* Create the file with setgid set */
 		if ((ret = open(root_setgid_B, O_CREAT | O_EXCL | O_RDWR,
 				MODE_SGID)) < 0) {
-			tst_resm(TFAIL|TERRNO, "open(%s) failed", root_setgid_B);
+			tst_resm(TFAIL | TERRNO, "open(%s) failed",
+				 root_setgid_B);
 			local_flag = FAILED;
 		}
 		close(ret);
 
 		if ((ret = stat(root_setgid_B, &buf)) < 0) {
-			tst_resm(TFAIL|TERRNO, "stat(%s) failed", root_setgid_B);
+			tst_resm(TFAIL | TERRNO, "stat(%s) failed",
+				 root_setgid_B);
 			local_flag = FAILED;
 		}
 
@@ -473,20 +477,23 @@
 		/* Remove the directories.                                      */
 	/*--------------------------------------------------------------*/
 		if ((ret = unlink(setgid_A)) < 0)
-			tst_resm(TWARN|TERRNO, "unlink(%s) failed", setgid_A);
+			tst_resm(TWARN | TERRNO, "unlink(%s) failed", setgid_A);
 		if ((ret = unlink(nosetgid_A)) < 0)
-			tst_resm(TWARN|TERRNO, "unlink(%s) failed", nosetgid_A);
+			tst_resm(TWARN | TERRNO, "unlink(%s) failed",
+				 nosetgid_A);
 		if ((ret = rmdir(DIR_A)) < 0)
-			tst_resm(TWARN|TERRNO, "rmdir(%s) failed", DIR_A);
+			tst_resm(TWARN | TERRNO, "rmdir(%s) failed", DIR_A);
 
 		if ((ret = unlink(setgid_B)) < 0)
-			tst_resm(TWARN|TERRNO, "unlink(%s) failed", setgid_B);
+			tst_resm(TWARN | TERRNO, "unlink(%s) failed", setgid_B);
 		if ((ret = unlink(root_setgid_B)) < 0)
-			tst_resm(TWARN|TERRNO, "unlink(%s) failed", root_setgid_B);
+			tst_resm(TWARN | TERRNO, "unlink(%s) failed",
+				 root_setgid_B);
 		if ((ret = unlink(nosetgid_B)) < 0)
-			tst_resm(TWARN|TERRNO, "unlink(%s) failed", nosetgid_B);
+			tst_resm(TWARN | TERRNO, "unlink(%s) failed",
+				 nosetgid_B);
 		if ((ret = rmdir(DIR_B)) < 0)
-			tst_resm(TWARN|TERRNO, "rmdir(%s) failed", DIR_B);
+			tst_resm(TWARN | TERRNO, "rmdir(%s) failed", DIR_B);
 
 		if (fail_count == 0) {
 			tst_resm(TPASS, "Test passed.");
diff --git a/testcases/kernel/syscalls/pause/pause01.c b/testcases/kernel/syscalls/pause/pause01.c
index 53a9ad4..23e2b8b 100644
--- a/testcases/kernel/syscalls/pause/pause01.c
+++ b/testcases/kernel/syscalls/pause/pause01.c
@@ -121,6 +121,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { EINTR, 0 };
+
 void go();
 
 int main(int ac, char **av)
diff --git a/testcases/kernel/syscalls/pause/pause02.c b/testcases/kernel/syscalls/pause/pause02.c
index 89e2282..9f7b9d8 100644
--- a/testcases/kernel/syscalls/pause/pause02.c
+++ b/testcases/kernel/syscalls/pause/pause02.c
@@ -74,6 +74,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { EINTR, 0 };
+
 pid_t cpid;			/* child process id */
 
 void do_child();		/* Function to run in child process */
diff --git a/testcases/kernel/syscalls/pipe/pipe01.c b/testcases/kernel/syscalls/pipe/pipe01.c
index 6bfdf7f..a70c03d 100644
--- a/testcases/kernel/syscalls/pipe/pipe01.c
+++ b/testcases/kernel/syscalls/pipe/pipe01.c
@@ -109,7 +109,8 @@
 			}
 
 			if ((red = safe_read(fildes[0], rebuf, written)) == -1) {
-				tst_brkm(TBROK|TERRNO, cleanup, "read() failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "read() failed");
 			}
 
 			if (red < 0 || red > written) {
diff --git a/testcases/kernel/syscalls/pipe/pipe02.c b/testcases/kernel/syscalls/pipe/pipe02.c
index 4fc4eea..e90dd54 100644
--- a/testcases/kernel/syscalls/pipe/pipe02.c
+++ b/testcases/kernel/syscalls/pipe/pipe02.c
@@ -90,7 +90,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "dd", &pp[0], &pp[1]);
 #endif
diff --git a/testcases/kernel/syscalls/pipe/pipe03.c b/testcases/kernel/syscalls/pipe/pipe03.c
index f82cdf1..17ec779 100644
--- a/testcases/kernel/syscalls/pipe/pipe03.c
+++ b/testcases/kernel/syscalls/pipe/pipe03.c
@@ -87,24 +87,24 @@
 		TEST(pipe(fildes));
 
 		if (TEST_RETURN == -1)
-			tst_brkm(TBROK|TTERRNO, cleanup,
-			    "pipe() failed unexpectedly");
+			tst_brkm(TBROK | TTERRNO, cleanup,
+				 "pipe() failed unexpectedly");
 
 		TEST(write(fildes[0], "A", 1));
 		if (TEST_RETURN == -1 && TEST_ERRNO == EBADF)
 			tst_resm(TPASS, "expected failure writing to "
 				 "read end of pipe");
 		else
-			tst_resm(TFAIL|TTERRNO, "success when writing to read "
-				 "end of pipe ret=%ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO,
+				 "success when writing to read "
+				 "end of pipe ret=%ld", TEST_RETURN);
 
 		TEST(safe_read(fildes[1], rbuf, 1));
 		if (TEST_RETURN == -1 && TEST_ERRNO == EBADF)
 			tst_resm(TPASS, "expected failure reading from "
 				 "write end of pipe");
 		else
-			tst_resm(TFAIL|TTERRNO, "success when reading from "
+			tst_resm(TFAIL | TTERRNO, "success when reading from "
 				 "write end of pipe ret=%ld", TEST_RETURN);
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/pipe/pipe04.c b/testcases/kernel/syscalls/pipe/pipe04.c
index 9e68496..f67c350 100644
--- a/testcases/kernel/syscalls/pipe/pipe04.c
+++ b/testcases/kernel/syscalls/pipe/pipe04.c
@@ -171,7 +171,7 @@
 		 * Set action for the alarm
 		 */
 		if (signal(SIGALRM, alarmfunc) == SIG_ERR)
-			tst_resm(TWARN|TERRNO, "call to signal failed");
+			tst_resm(TWARN | TERRNO, "call to signal failed");
 		/*
 		 * Set an alarm for 60 seconds just in case the child
 		 * processes don't die
@@ -179,8 +179,9 @@
 		alarm(60);
 		if (waitpid(c1pid, &wtstatus, 0) != -1) {
 			if (wtstatus != SIGKILL)
-				tst_resm(TFAIL|TERRNO, "unexpected wait status "
-				    "%d", wtstatus);
+				tst_resm(TFAIL | TERRNO,
+					 "unexpected wait status " "%d",
+					 wtstatus);
 			else
 				tst_resm(TPASS, "Child 1 killed while "
 					 "writing to a pipe");
@@ -188,8 +189,9 @@
 		if (waitpid(c2pid, &wtstatus, 0) != -1) {
 			if (!WIFSIGNALED(wtstatus) ||
 			    WTERMSIG(wtstatus) != SIGKILL)
-				tst_resm(TFAIL|TERRNO, "unexpected wait status "
-				    "%d", wtstatus);
+				tst_resm(TFAIL | TERRNO,
+					 "unexpected wait status " "%d",
+					 wtstatus);
 			else
 				tst_resm(TPASS, "Child 2 killed while "
 					 "writing to a pipe");
@@ -232,7 +234,7 @@
 		tst_resm(TWARN, "Could not close fildes[0] - errno %d", errno);
 	while (1)
 		if (write(fildes[1], "bbbbbbbbbbbbbbbbbbbbbbbbb", 25) == -1)
-			tst_resm(TBROK|TERRNO, "[child 1] pipe write failed");
+			tst_resm(TBROK | TERRNO, "[child 1] pipe write failed");
 }
 
 void c2func()
@@ -241,12 +243,12 @@
 		tst_resm(TWARN, "Could not close fildes[0] - errno %d", errno);
 	while (1)
 		if (write(fildes[1], "AAAAAAAAAAAAAAAAAAAAAAAAA", 25) == -1)
-			tst_resm(TBROK|TERRNO, "[child 2] pipe write failed");
+			tst_resm(TBROK | TERRNO, "[child 2] pipe write failed");
 }
 
 void alarmfunc(int sig)
 {
 	/* for some reason tst_brkm doesn't seem to work in a signal handler */
 	tst_brkm(TFAIL, cleanup, "one or more children did't die in 60 second "
-	    "time limit");
+		 "time limit");
 }
diff --git a/testcases/kernel/syscalls/pipe/pipe06.c b/testcases/kernel/syscalls/pipe/pipe06.c
index 5013225..43243dc 100644
--- a/testcases/kernel/syscalls/pipe/pipe06.c
+++ b/testcases/kernel/syscalls/pipe/pipe06.c
@@ -83,7 +83,7 @@
 		TEST_ERROR_LOG(TEST_ERRNO);
 
 		if (TEST_ERRNO != EMFILE) {
-			tst_resm(TFAIL|TTERRNO, "pipe failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "pipe failed unexpectedly");
 		} else {
 			tst_resm(TPASS, "failed with EMFILE");
 		}
@@ -111,8 +111,8 @@
 		pipe_ret = pipe(pipes);
 		if (pipe_ret < 0) {
 			if (errno != EMFILE) {
-				tst_brkm(TBROK|TTERRNO, cleanup,
-				    "didn't get EMFILE");
+				tst_brkm(TBROK | TTERRNO, cleanup,
+					 "didn't get EMFILE");
 			}
 			break;
 		}
diff --git a/testcases/kernel/syscalls/pipe/pipe09.c b/testcases/kernel/syscalls/pipe/pipe09.c
index 4c4d09a..38763cc 100644
--- a/testcases/kernel/syscalls/pipe/pipe09.c
+++ b/testcases/kernel/syscalls/pipe/pipe09.c
@@ -136,7 +136,7 @@
 
 		if ((fork_2 = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #2 failed");
-		 }
+		}
 
 		if (fork_2 == 0) {	/* 2nd child */
 			if (close(pipefd[0]) != 0) {
@@ -163,8 +163,8 @@
 		}
 
 		if (close(pipefd[1]) != 0) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "pipefd[1] close failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "pipefd[1] close failed");
 		}
 
 		while ((red = safe_read(pipefd[0], rebuf, 100)) > 0) {
@@ -184,8 +184,8 @@
 		}
 
 		if (red == -1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "reading pipefd pipe failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "reading pipefd pipe failed");
 		}
 
 		if (Bcnt == Acnt && Bcnt == (PIPEWRTCNT / 2)) {
diff --git a/testcases/kernel/syscalls/pipe/pipe10.c b/testcases/kernel/syscalls/pipe/pipe10.c
index 566cd01..11576ab 100644
--- a/testcases/kernel/syscalls/pipe/pipe10.c
+++ b/testcases/kernel/syscalls/pipe/pipe10.c
@@ -116,7 +116,7 @@
 
 		if (forkstat == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if (forkstat == 0) {	/* child */
 			red = safe_read(fd[0], rebuf, written);
diff --git a/testcases/kernel/syscalls/pipe/pipe11.c b/testcases/kernel/syscalls/pipe/pipe11.c
index b37b28b..f2daabe 100644
--- a/testcases/kernel/syscalls/pipe/pipe11.c
+++ b/testcases/kernel/syscalls/pipe/pipe11.c
@@ -96,7 +96,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child_uclinux, "ddddd", &fd[0], &fd[1], &kidid,
 			&ncperchild, &szcharbuf);
@@ -126,13 +126,13 @@
 			tst_brkm(TBROK, cleanup, "write to pipe failed");
 		}
 
-	      refork:
+refork:
 		++kidid;
 		fork_ret = FORK_OR_VFORK();
 
 		if (fork_ret < 0) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if ((fork_ret != 0) && (fork_ret != -1) && (kidid < numchild)) {
 			goto refork;
@@ -143,7 +143,7 @@
 			if (self_exec(av[0], "ddddd", fd[0], fd[1], kidid,
 				      ncperchild, szcharbuf) < 0) {
 				tst_brkm(TBROK, cleanup, "self_exec failed");
-			 }
+			}
 #else
 			do_child();
 #endif
@@ -197,7 +197,7 @@
 {
 	if ((rdbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
-	 }
+	}
 
 	do_child();
 }
@@ -229,11 +229,11 @@
 
 	if ((wrbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc failed");
-	 }
+	}
 
 	if ((rdbuf = (char *)malloc(szcharbuf)) == (char *)0) {
 		tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
-	 }
+	}
 
 	/* initialize wrbuf */
 	j = 0;
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_01.c b/testcases/kernel/syscalls/pipe2/pipe2_01.c
index 25d977e..026ef3c 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_01.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_01.c
@@ -73,7 +73,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 /* Extern Global Variables */
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_02.c b/testcases/kernel/syscalls/pipe2/pipe2_02.c
index 6074110..26f5d9c 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_02.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_02.c
@@ -64,7 +64,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 /* Extern Global Variables */
diff --git a/testcases/kernel/syscalls/ppoll/ppoll01.c b/testcases/kernel/syscalls/ppoll/ppoll01.c
index e31386a..7642f0a 100644
--- a/testcases/kernel/syscalls/ppoll/ppoll01.c
+++ b/testcases/kernel/syscalls/ppoll/ppoll01.c
@@ -79,12 +79,11 @@
 #define POLLRDHUP 0x2000
 #endif
 
-char *TCID = "ppoll01"; /* Test program identifier.*/
+char *TCID = "ppoll01";		/* Test program identifier. */
 int testno;
-int TST_TOTAL = 1; /* total number of tests in this file.   */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
-void
-sighandler(int sig)
+void sighandler(int sig)
 {
 	if (sig == SIGINT)
 		return;
@@ -92,13 +91,15 @@
 		tst_brkm(TBROK, NULL, "received unexpected signal %d", sig);
 }
 
-void cleanup() {
+void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
 }
 
-void setup() {
+void setup()
+{
 	tst_sig(FORK, sighandler, cleanup);
 
 	TEST_PAUSE;
@@ -151,61 +152,61 @@
  */
 
 static struct test_case tcase[] = {
-		{ // case00
-			.ttype = NORMAL,
-			.expect_revents = POLLIN | POLLOUT,
-			.ret = 0,
-			.err = 0,
-		},
-		{ // case01
-			.ttype = MASK_SIGNAL,
-			.expect_revents = 0, // don't care
-			.ret = 0,
-			.err = 0,
-		},
-		{ // case02
-			.ttype = TIMEOUT,
-			.expect_revents = 0, // don't care
-			.ret = 0,
-			.err = 0,
-		},
-		{ // case03
-			.ttype = FD_ALREADY_CLOSED,
-			.expect_revents = POLLNVAL,
-			.ret = 0, .err = 0,
-		},
-		{ // case04
-			.ttype = SEND_SIGINT,
-			.ret = -1,
-			.err = EINTR,
-		},
-		{ // case05
-			.ttype = SEND_SIGINT_RACE_TEST,
-			.ret = -1,
-			.err = EINTR,
-		},
-		{ // case06
-			.ttype = INVALID_NFDS,
-			.ret = -1,
-			.err = EINVAL,
-		},
-		{ // case07
-			.ttype = INVALID_FDS,
-			.ret = -1,
-			.err = EFAULT, },
+	{			// case00
+	 .ttype = NORMAL,
+	 .expect_revents = POLLIN | POLLOUT,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = MASK_SIGNAL,
+	 .expect_revents = 0,	// don't care
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = TIMEOUT,
+	 .expect_revents = 0,	// don't care
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case03
+	 .ttype = FD_ALREADY_CLOSED,
+	 .expect_revents = POLLNVAL,
+	 .ret = 0,.err = 0,
+	 },
+	{			// case04
+	 .ttype = SEND_SIGINT,
+	 .ret = -1,
+	 .err = EINTR,
+	 },
+	{			// case05
+	 .ttype = SEND_SIGINT_RACE_TEST,
+	 .ret = -1,
+	 .err = EINTR,
+	 },
+	{			// case06
+	 .ttype = INVALID_NFDS,
+	 .ret = -1,
+	 .err = EINVAL,
+	 },
+	{			// case07
+	 .ttype = INVALID_FDS,
+	 .ret = -1,
+	 .err = EFAULT,},
 #if 0
-		{ // case08
-			.ttype = MINUS_NSEC,
-			.ret = -1,
-			.err = EINVAL, // RHEL4U1 + 2.6.18 returns SUCCESS
-		},
-		{ // case09
-			.ttype = TOO_LARGE_NSEC,
-			.ret = -1,
-			.err = EINVAL, // RHEL4U1 + 2.6.18 returns SUCCESS
-		},
+	{			// case08
+	 .ttype = MINUS_NSEC,
+	 .ret = -1,
+	 .err = EINVAL,		// RHEL4U1 + 2.6.18 returns SUCCESS
+	 },
+	{			// case09
+	 .ttype = TOO_LARGE_NSEC,
+	 .ret = -1,
+	 .err = EINVAL,		// RHEL4U1 + 2.6.18 returns SUCCESS
+	 },
 #endif
-		};
+};
 
 #define NUM_TEST_FDS    1
 
@@ -217,7 +218,8 @@
  *
  */
 
-static int do_test(struct test_case *tc) {
+static int do_test(struct test_case *tc)
+{
 	int sys_ret, sys_errno;
 	int result = RESULT_OK;
 	int fd = -1, cmp_ok = 1;
@@ -242,7 +244,7 @@
 	case TIMEOUT:
 		nfds = 0;
 		ts.tv_sec = 0;
-		ts.tv_nsec = 50000000; // 50msec
+		ts.tv_nsec = 50000000;	// 50msec
 		p_ts = &ts;
 		break;
 	case FD_ALREADY_CLOSED:
@@ -256,13 +258,13 @@
 		p_sigmask = &sigmask;
 		nfds = 0;
 		ts.tv_sec = 0;
-		ts.tv_nsec = 300000000; // 300msec => need to be enough for
+		ts.tv_nsec = 300000000;	// 300msec => need to be enough for
 		//   waiting the signal
 		p_ts = &ts;
 		// fallthrough
 	case SEND_SIGINT:
 		nfds = 0;
-		pid = create_sig_proc(100000, SIGINT, UINT_MAX); // 100msec
+		pid = create_sig_proc(100000, SIGINT, UINT_MAX);	// 100msec
 		if (pid < 0)
 			return 1;
 		break;
@@ -277,7 +279,7 @@
 		p_sigmask = &sigmask;
 		nfds = 0;
 		ts.tv_sec = 0;
-		ts.tv_nsec = 300000000; // 300msec => need to be enough for
+		ts.tv_nsec = 300000000;	// 300msec => need to be enough for
 		//   waiting the signal
 		p_ts = &ts;
 		nfds = 0;
@@ -292,7 +294,7 @@
 		nfds = -1;
 		break;
 	case INVALID_FDS:
-		p_fds = (void*) 0xc0000000;
+		p_fds = (void *)0xc0000000;
 		break;
 	case MINUS_NSEC:
 		ts.tv_sec = 0;
@@ -328,17 +330,20 @@
 		sigprocmask(SIG_SETMASK, NULL, &sigmask);
 		for (sig = 1; sig < SIGRTMAX; sig++) {
 			TEST(sigismember(&sigmask, sig));
-			if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL && sig != SIGINT)
-				continue; /* let's ignore errors if they are for other signal than SIGINT that we set */
+			if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL
+			    && sig != SIGINT)
+				continue;	/* let's ignore errors if they are for other signal than SIGINT that we set */
 			if ((sig == SIGINT) != (TEST_RETURN != 0)) {
-				tst_resm(TFAIL, "Bad value of signal mask, signal %d is %s",
-						sig, TEST_RETURN ? "on" : "off");
+				tst_resm(TFAIL,
+					 "Bad value of signal mask, signal %d is %s",
+					 sig, TEST_RETURN ? "on" : "off");
 				cmp_ok |= 1;
 			}
 		}
 	}
 	result |= (sys_errno != tc->err) || !cmp_ok;
-	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno, cmp_ok);
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
+			 cmp_ok);
 cleanup:
 	if (fd >= 0) {
 		close(fd);
@@ -359,7 +364,8 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 	int ret;
 
@@ -367,12 +373,11 @@
 
 	ret = 0;
 
-	for (i = 0; ret == 0 &&
-	    i < (sizeof(tcase) / sizeof(tcase[0])); i++) {
+	for (i = 0; ret == 0 && i < (sizeof(tcase) / sizeof(tcase[0])); i++) {
 		tst_resm(TINFO, "(case%02d) START", i);
 		ret = do_test(&tcase[i]);
 		tst_resm(TINFO, "(case%02d) END => %s", i, (ret == 0) ? "OK"
-				: "NG");
+			 : "NG");
 	}
 	cleanup();
 	tst_exit();
diff --git a/testcases/kernel/syscalls/prctl/prctl01.c b/testcases/kernel/syscalls/prctl/prctl01.c
index d8018e4..220789c 100644
--- a/testcases/kernel/syscalls/prctl/prctl01.c
+++ b/testcases/kernel/syscalls/prctl/prctl01.c
@@ -86,6 +86,7 @@
 char *TCID = "prctl01";		/* Test program identifier.    */
 
 int option[2] = { PR_GET_PDEATHSIG, PR_SET_PDEATHSIG };
+
 int TST_TOTAL = 2;
 
 int main(int ac, char **av)
@@ -126,7 +127,8 @@
 				if (TEST_RETURN == 0) {
 					exit(0);
 				} else {
-					tst_resm(TWARN|TTERRNO, "prctl() returned %ld",
+					tst_resm(TWARN | TTERRNO,
+						 "prctl() returned %ld",
 						 TEST_RETURN);
 					exit(1);
 				}
diff --git a/testcases/kernel/syscalls/prctl/prctl02.c b/testcases/kernel/syscalls/prctl/prctl02.c
index 9340e70..a1029f6 100644
--- a/testcases/kernel/syscalls/prctl/prctl02.c
+++ b/testcases/kernel/syscalls/prctl/prctl02.c
@@ -136,11 +136,12 @@
 				TEST(prctl(test_cases[i].option,
 					   test_cases[i].arg2));
 				if ((TEST_RETURN == -1) && (TEST_ERRNO ==
-							    test_cases[i].
-							    exp_errno)) {
+							    test_cases
+							    [i].exp_errno)) {
 					exit(TEST_ERRNO);
 				} else {
-					tst_resm(TWARN|TTERRNO, "prctl() returned %ld",
+					tst_resm(TWARN | TTERRNO,
+						 "prctl() returned %ld",
 						 TEST_RETURN);
 					exit(TEST_ERRNO);
 				}
@@ -153,8 +154,9 @@
 				}
 
 				if ((WIFEXITED(status)) && (WEXITSTATUS(status)
-							    == test_cases[i].
-							    exp_errno)) {
+							    ==
+							    test_cases
+							    [i].exp_errno)) {
 					tst_resm(TPASS, "Test Passed");
 				} else {
 					tst_resm(TFAIL, "Test Failed");
diff --git a/testcases/kernel/syscalls/pread/pread01.c b/testcases/kernel/syscalls/pread/pread01.c
index ec3cf5f..ba71039 100644
--- a/testcases/kernel/syscalls/pread/pread01.c
+++ b/testcases/kernel/syscalls/pread/pread01.c
@@ -300,8 +300,9 @@
 	off_t offloc;		/* offset ret. from lseek() */
 
 	if ((offloc = lseek(fdesc, offset, whence)) != checkoff) {
-		tst_resm(TWARN, "return = %"PRId64", expected %"PRId64, (int64_t)offloc, (int64_t)checkoff);
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek() on %s failed",
+		tst_resm(TWARN, "return = %" PRId64 ", expected %" PRId64,
+			 (int64_t) offloc, (int64_t) checkoff);
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek() on %s failed",
 			 TEMPFILE);
 	}
 }
diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c
index 3672564..66bec22 100644
--- a/testcases/kernel/syscalls/pselect/pselect01.c
+++ b/testcases/kernel/syscalls/pselect/pselect01.c
@@ -100,27 +100,26 @@
 
 		tst_resm(TINFO,
 			 "Testing basic pselect sanity,Sleeping for %jd secs",
-			 (intmax_t)tv.tv_sec);
+			 (intmax_t) tv.tv_sec);
 		clock_gettime(CLOCK_REALTIME, &tv_start);
-		retval =
-		    pselect(0, &readfds, NULL, NULL, &tv,
-			    NULL);
+		retval = pselect(0, &readfds, NULL, NULL, &tv, NULL);
 		clock_gettime(CLOCK_REALTIME, &tv_end);
 
 		real_sec = (0.5 + (tv_end.tv_sec - tv_start.tv_sec +
-			    1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec)));
+				   1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec)));
 		if (abs(real_sec - total_sec) < 0.2 * total_sec)
 			tst_resm(TPASS, "Sleep time was correct "
-				"(%lf/%d < 20 %%)", real_sec, total_sec);
+				 "(%lf/%d < 20 %%)", real_sec, total_sec);
 		else
 			tst_resm(TFAIL, "Sleep time was incorrect (%d/%lf "
-				">= 20%%)", total_sec, real_sec);
+				 ">= 20%%)", total_sec, real_sec);
 	}
 
 #ifdef DEBUG
 	tst_resm(TINFO, "Now checking nsec sleep precision");
 #endif
-	for (total_nsec = 1e8; total_nsec <= LOOP_COUNT * 1e8; total_nsec += 1e8) {
+	for (total_nsec = 1e8; total_nsec <= LOOP_COUNT * 1e8;
+	     total_nsec += 1e8) {
 		FD_ZERO(&readfds);
 		FD_SET(0, &readfds);
 
@@ -131,17 +130,15 @@
 			 "Testing basic pselect sanity,Sleeping for %ld nano secs",
 			 tv.tv_nsec);
 		clock_gettime(CLOCK_REALTIME, &tv_start);
-		retval =
-		    pselect(0, &readfds, NULL, NULL, &tv,
-			    NULL);
+		retval = pselect(0, &readfds, NULL, NULL, &tv, NULL);
 		clock_gettime(CLOCK_REALTIME, &tv_end);
 
 		/* Changed total_sec compare to an at least vs an exact compare */
 
 		real_nsec = (tv_end.tv_sec - tv_start.tv_sec) * 1e9 +
-			tv_end.tv_nsec - tv_start.tv_nsec;
+		    tv_end.tv_nsec - tv_start.tv_nsec;
 
-		/* allow 20% error*/
+		/* allow 20% error */
 		if (abs(real_nsec - tv.tv_nsec) < 0.2 * total_nsec)
 			tst_resm(TPASS, "Sleep time was correct");
 		else {
@@ -151,7 +148,7 @@
 				 "due to the limitation of the way it calculates the");
 			tst_resm(TWARN, "system call execution time.");
 			tst_resm(TFAIL,
-				"Sleep time was incorrect:%ld nsec vs expected %ld nsec",
+				 "Sleep time was incorrect:%ld nsec vs expected %ld nsec",
 				 real_nsec, total_nsec);
 		}
 	}
diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
index e9a8365..55a385e 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace03.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
@@ -167,11 +167,12 @@
 				TEST(ptrace(test_cases[i].request,
 					    test_cases[i].pid, NULL, NULL));
 				if ((TEST_RETURN == -1) && (TEST_ERRNO ==
-							    test_cases[i].
-							    exp_errno)) {
+							    test_cases
+							    [i].exp_errno)) {
 					exit(TEST_ERRNO);
 				} else {
-					tst_resm(TWARN|TTERRNO, "ptrace() returned %ld",
+					tst_resm(TWARN | TTERRNO,
+						 "ptrace() returned %ld",
 						 TEST_RETURN);
 					exit(TEST_ERRNO);
 				}
diff --git a/testcases/kernel/syscalls/ptrace/ptrace04.c b/testcases/kernel/syscalls/ptrace/ptrace04.c
index 5b51c37..c4b319e 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace04.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace04.c
@@ -23,7 +23,7 @@
 
 char *TCID = "ptrace04";
 
-static void cleanup ();
+static void cleanup();
 
 #define R(r) { .name = "PT_" #r, .off = PT_##r },
 static struct {
@@ -32,17 +32,17 @@
 } regs[] = {
 #ifdef __bfin__
 	R(ORIG_R0) R(ORIG_P0)
-	R(R0) R(R1) R(R2) R(R3) R(R4) R(R5) R(R6) R(R7)
-	R(P0) R(P1) R(P2) R(P3) R(P4) R(P5) R(FP) R(USP)
-	R(I0) R(I1) R(I2) R(I3)
-	R(M0) R(M1) R(M2) R(M3)
-	R(L0) R(L1) R(L2) R(L3)
-	R(B0) R(B1) R(B2) R(B3)
-	R(A0X) R(A0W) R(A1X) R(A1W)
-	R(LC0) R(LC1) R(LT0) R(LT1) R(LB0) R(LB1)
-	R(ASTAT)
-	R(RETS) R(PC) R(RETX) R(RETN) R(RETE)
-	R(SEQSTAT) R(IPEND) R(SYSCFG)
+	    R(R0) R(R1) R(R2) R(R3) R(R4) R(R5) R(R6) R(R7)
+	    R(P0) R(P1) R(P2) R(P3) R(P4) R(P5) R(FP) R(USP)
+	    R(I0) R(I1) R(I2) R(I3)
+	    R(M0) R(M1) R(M2) R(M3)
+	    R(L0) R(L1) R(L2) R(L3)
+	    R(B0) R(B1) R(B2) R(B3)
+	    R(A0X) R(A0W) R(A1X) R(A1W)
+	    R(LC0) R(LC1) R(LT0) R(LT1) R(LB0) R(LB1)
+	    R(ASTAT)
+	    R(RETS) R(PC) R(RETX) R(RETN) R(RETE)
+	    R(SEQSTAT) R(IPEND) R(SYSCFG)
 #endif
 };
 
@@ -66,12 +66,12 @@
 		for (i = 0; i < ARRAY_SIZE(regs); ++i) {
 			errno = 0;
 			ret = ptrace(PTRACE_PEEKUSER, pid,
-				(void *)regs[i].off, NULL);
+				     (void *)regs[i].off, NULL);
 			if (ret && errno) {
 				tst_resm(TFAIL | TERRNO,
-					"PTRACE_PEEKUSER: register %s "
-					"(offset %li) failed",
-					regs[i].name, regs[i].off);
+					 "PTRACE_PEEKUSER: register %s "
+					 "(offset %li) failed",
+					 regs[i].name, regs[i].off);
 				failed = true;
 				continue;
 			}
@@ -79,11 +79,11 @@
 			long *pt_val = (void *)&_pt_regs + regs[i].off;
 			if (*pt_val != ret) {
 				tst_resm(TFAIL,
-					"register %s (offset %li) did not "
-					"match\n\tGETREGS: 0x%08lx "
-					"PEEKUSER: 0x%08lx",
-					regs[i].name, regs[i].off, *pt_val,
-					ret);
+					 "register %s (offset %li) did not "
+					 "match\n\tGETREGS: 0x%08lx "
+					 "PEEKUSER: 0x%08lx",
+					 regs[i].name, regs[i].off, *pt_val,
+					 ret);
 				failed = true;
 			}
 
@@ -92,7 +92,7 @@
 	}
 
 	tst_resm((failed ? TFAIL : TPASS),
-		"PTRACE PEEKUSER/GETREGS (poison 0x%02x)", poison);
+		 "PTRACE PEEKUSER/GETREGS (poison 0x%02x)", poison);
 #else
 	tst_brkm(TCONF, cleanup, "System doesn't have ptrace_regs structure");
 #endif
@@ -103,8 +103,7 @@
 	char *msg;
 
 	if (ARRAY_SIZE(regs) == 0)
-		tst_brkm(TCONF, NULL,
-			"test not supported for your arch (yet)");
+		tst_brkm(TCONF, NULL, "test not supported for your arch (yet)");
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)))
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -132,4 +131,6 @@
 	tst_exit();
 }
 
-static void cleanup() { }
+static void cleanup()
+{
+}
diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c
index ceac818..7b27fa9 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace05.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace05.c
@@ -40,24 +40,22 @@
 #include "test.h"
 #include "usctest.h"
 
-char	*TCID		= "ptrace05";
-int	TST_TOTAL	= 0;
+char *TCID = "ptrace05";
+int TST_TOTAL = 0;
 
-int usage(const char*);
+int usage(const char *);
 
-int
-usage(const char *argv0)
+int usage(const char *argv0)
 {
 	fprintf(stderr, "usage: %s [start-signum] [end-signum]\n", argv0);
 	return 1;
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 
 	int end_signum = -1;
-       	int signum;
+	int signum;
 	int start_signum = -1;
 	int status;
 
@@ -66,20 +64,20 @@
 	/* Parse the CLI args appropriately. */
 	switch (argc) {
 	case 3:
-		end_signum = (int) strtol((const char*) *(argv+2), NULL, 10);
+		end_signum = (int)strtol((const char *)*(argv + 2), NULL, 10);
 		/* Parse the signal value. */
 		if (end_signum == 0 && errno != 0) {
 			tst_resm(TBROK, "argument (%s) isn't a valid number.\n",
-					*(argv+2));
+				 *(argv + 2));
 			tst_exit();
 		}
 		/* FALLTHROUGH */
 	case 2:
-		start_signum = (int) strtol((const char*) *(argv+1), NULL, 10);
+		start_signum = (int)strtol((const char *)*(argv + 1), NULL, 10);
 		/* Parse the signal value. */
 		if (end_signum == 0 && errno != 0) {
 			tst_resm(TBROK, "argument (%s) isn't a valid number.\n",
-					*(argv+1) );
+				 *(argv + 1));
 			tst_exit();
 		}
 		break;
@@ -107,11 +105,11 @@
 
 			if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) != -1) {
 				tst_resm(TINFO, "[child] Sending kill(.., %d)",
-						signum);
+					 signum);
 				if (kill(getpid(), signum) < 0) {
 					tst_resm(TINFO | TERRNO,
-						"[child] kill(.., %d) failed.",
-						signum);
+						 "[child] kill(.., %d) failed.",
+						 signum);
 				}
 			} else {
 
@@ -121,8 +119,8 @@
 				 * nonetheless.
 				 */
 				tst_resm(TFAIL | TERRNO,
-					"Failed to ptrace(PTRACE_TRACEME, ...) "
-					"properly");
+					 "Failed to ptrace(PTRACE_TRACEME, ...) "
+					 "properly");
 
 			}
 			/* Shouldn't get here if signum == 0. */
@@ -133,14 +131,17 @@
 
 			waitpid(child, &status, 0);
 
-			switch(signum) {
+			switch (signum) {
 			case 0:
-				if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
-					tst_resm(TPASS, "kill(.., 0) exited "
-							"with 0, as expected.");
+				if (WIFEXITED(status)
+				    && WEXITSTATUS(status) == 0) {
+					tst_resm(TPASS,
+						 "kill(.., 0) exited "
+						 "with 0, as expected.");
 				} else {
-					tst_resm(TFAIL, "kill(.., 0) didn't exit "
-							"with 0.");
+					tst_resm(TFAIL,
+						 "kill(.., 0) didn't exit "
+						 "with 0.");
 				}
 				break;
 			case SIGKILL:
@@ -148,41 +149,41 @@
 					/* SIGKILL must be uncatchable. */
 					if (WTERMSIG(status) == SIGKILL) {
 						tst_resm(TPASS,
-							"Killed with SIGKILL, "
-							"as expected.");
+							 "Killed with SIGKILL, "
+							 "as expected.");
 					} else {
 						tst_resm(TPASS,
-							"Didn't die with "
-							"SIGKILL (?!) ");
+							 "Didn't die with "
+							 "SIGKILL (?!) ");
 					}
 				} else if (WIFEXITED(status)) {
 					tst_resm(TFAIL,
-						"Exited unexpectedly instead "
-						"of dying with SIGKILL.");
+						 "Exited unexpectedly instead "
+						 "of dying with SIGKILL.");
 				} else if (WIFSTOPPED(status)) {
 					tst_resm(TFAIL,
-						"Stopped instead of dying "
-						"with SIGKILL.");
+						 "Stopped instead of dying "
+						 "with SIGKILL.");
 				}
 				break;
-			/* All other processes should be stopped. */
+				/* All other processes should be stopped. */
 			default:
 				if (WIFSTOPPED(status)) {
 					tst_resm(TPASS, "Stopped as expected");
 				} else {
 					tst_resm(TFAIL, "Didn't stop as "
-							"expected.");
-					if (kill (child, 0)) {
+						 "expected.");
+					if (kill(child, 0)) {
 						tst_resm(TINFO,
-							"Is still alive!?");
+							 "Is still alive!?");
 					} else if (WIFEXITED(status)) {
 						tst_resm(TINFO,
-							"Exited normally");
+							 "Exited normally");
 					} else if (WIFSIGNALED(status)) {
 						tst_resm(TINFO,
-							"Was signaled with "
-							"signum=%d",
-							WTERMSIG(status));
+							 "Was signaled with "
+							 "signum=%d",
+							 WTERMSIG(status));
 					}
 
 				}
diff --git a/testcases/kernel/syscalls/ptrace/ptrace06.c b/testcases/kernel/syscalls/ptrace/ptrace06.c
index 8b4c3ec..16262dc 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace06.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace06.c
@@ -29,11 +29,11 @@
  * in the kernel asm/user.h which is not exported to userspace.
  */
 #if defined(__i386__)
-# define SIZEOF_USER 284
+#define SIZEOF_USER 284
 #elif defined(__x86_64__)
-# define SIZEOF_USER 928
+#define SIZEOF_USER 928
 #else
-# define SIZEOF_USER 0x1000		/* just pick a big number */
+#define SIZEOF_USER 0x1000	/* just pick a big number */
 #endif
 
 char *TCID = "ptrace06";
@@ -43,124 +43,120 @@
 	long addr;
 	long data;
 } test_cases[] = {
-	{ PTRACE_PEEKDATA, .addr = 0 },
-	{ PTRACE_PEEKDATA, .addr = 1 },
-	{ PTRACE_PEEKDATA, .addr = 2 },
-	{ PTRACE_PEEKDATA, .addr = 3 },
-	{ PTRACE_PEEKDATA, .addr = -1 },
-	{ PTRACE_PEEKDATA, .addr = -2 },
-	{ PTRACE_PEEKDATA, .addr = -3 },
-	{ PTRACE_PEEKDATA, .addr = -4 },
-
-	{ PTRACE_PEEKTEXT, .addr = 0 },
-	{ PTRACE_PEEKTEXT, .addr = 1 },
-	{ PTRACE_PEEKTEXT, .addr = 2 },
-	{ PTRACE_PEEKTEXT, .addr = 3 },
-	{ PTRACE_PEEKTEXT, .addr = -1 },
-	{ PTRACE_PEEKTEXT, .addr = -2 },
-	{ PTRACE_PEEKTEXT, .addr = -3 },
-	{ PTRACE_PEEKTEXT, .addr = -4 },
-
-	{ PTRACE_PEEKUSER, .addr = SIZEOF_USER + 1 },
-	{ PTRACE_PEEKUSER, .addr = SIZEOF_USER + 2 },
-	{ PTRACE_PEEKUSER, .addr = SIZEOF_USER + 3 },
-	{ PTRACE_PEEKUSER, .addr = SIZEOF_USER + 4 },
-	{ PTRACE_PEEKUSER, .addr = -1 },
-	{ PTRACE_PEEKUSER, .addr = -2 },
-	{ PTRACE_PEEKUSER, .addr = -3 },
-	{ PTRACE_PEEKUSER, .addr = -4 },
-
-	{ PTRACE_POKEDATA, .addr = 0 },
-	{ PTRACE_POKEDATA, .addr = 1 },
-	{ PTRACE_POKEDATA, .addr = 2 },
-	{ PTRACE_POKEDATA, .addr = 3 },
-	{ PTRACE_POKEDATA, .addr = -1 },
-	{ PTRACE_POKEDATA, .addr = -2 },
-	{ PTRACE_POKEDATA, .addr = -3 },
-	{ PTRACE_POKEDATA, .addr = -4 },
-
-	{ PTRACE_POKETEXT, .addr = 0 },
-	{ PTRACE_POKETEXT, .addr = 1 },
-	{ PTRACE_POKETEXT, .addr = 2 },
-	{ PTRACE_POKETEXT, .addr = 3 },
-	{ PTRACE_POKETEXT, .addr = -1 },
-	{ PTRACE_POKETEXT, .addr = -2 },
-	{ PTRACE_POKETEXT, .addr = -3 },
-	{ PTRACE_POKETEXT, .addr = -4 },
-
-	{ PTRACE_POKEUSER, .addr = SIZEOF_USER + 1 },
-	{ PTRACE_POKEUSER, .addr = SIZEOF_USER + 2 },
-	{ PTRACE_POKEUSER, .addr = SIZEOF_USER + 3 },
-	{ PTRACE_POKEUSER, .addr = SIZEOF_USER + 4 },
-	{ PTRACE_POKEUSER, .addr = -1 },
-	{ PTRACE_POKEUSER, .addr = -2 },
-	{ PTRACE_POKEUSER, .addr = -3 },
-	{ PTRACE_POKEUSER, .addr = -4 },
-
+	{
+	PTRACE_PEEKDATA,.addr = 0}, {
+	PTRACE_PEEKDATA,.addr = 1}, {
+	PTRACE_PEEKDATA,.addr = 2}, {
+	PTRACE_PEEKDATA,.addr = 3}, {
+	PTRACE_PEEKDATA,.addr = -1}, {
+	PTRACE_PEEKDATA,.addr = -2}, {
+	PTRACE_PEEKDATA,.addr = -3}, {
+	PTRACE_PEEKDATA,.addr = -4}, {
+	PTRACE_PEEKTEXT,.addr = 0}, {
+	PTRACE_PEEKTEXT,.addr = 1}, {
+	PTRACE_PEEKTEXT,.addr = 2}, {
+	PTRACE_PEEKTEXT,.addr = 3}, {
+	PTRACE_PEEKTEXT,.addr = -1}, {
+	PTRACE_PEEKTEXT,.addr = -2}, {
+	PTRACE_PEEKTEXT,.addr = -3}, {
+	PTRACE_PEEKTEXT,.addr = -4}, {
+	PTRACE_PEEKUSER,.addr = SIZEOF_USER + 1}, {
+	PTRACE_PEEKUSER,.addr = SIZEOF_USER + 2}, {
+	PTRACE_PEEKUSER,.addr = SIZEOF_USER + 3}, {
+	PTRACE_PEEKUSER,.addr = SIZEOF_USER + 4}, {
+	PTRACE_PEEKUSER,.addr = -1}, {
+	PTRACE_PEEKUSER,.addr = -2}, {
+	PTRACE_PEEKUSER,.addr = -3}, {
+	PTRACE_PEEKUSER,.addr = -4}, {
+	PTRACE_POKEDATA,.addr = 0}, {
+	PTRACE_POKEDATA,.addr = 1}, {
+	PTRACE_POKEDATA,.addr = 2}, {
+	PTRACE_POKEDATA,.addr = 3}, {
+	PTRACE_POKEDATA,.addr = -1}, {
+	PTRACE_POKEDATA,.addr = -2}, {
+	PTRACE_POKEDATA,.addr = -3}, {
+	PTRACE_POKEDATA,.addr = -4}, {
+	PTRACE_POKETEXT,.addr = 0}, {
+	PTRACE_POKETEXT,.addr = 1}, {
+	PTRACE_POKETEXT,.addr = 2}, {
+	PTRACE_POKETEXT,.addr = 3}, {
+	PTRACE_POKETEXT,.addr = -1}, {
+	PTRACE_POKETEXT,.addr = -2}, {
+	PTRACE_POKETEXT,.addr = -3}, {
+	PTRACE_POKETEXT,.addr = -4}, {
+	PTRACE_POKEUSER,.addr = SIZEOF_USER + 1}, {
+	PTRACE_POKEUSER,.addr = SIZEOF_USER + 2}, {
+	PTRACE_POKEUSER,.addr = SIZEOF_USER + 3}, {
+	PTRACE_POKEUSER,.addr = SIZEOF_USER + 4}, {
+	PTRACE_POKEUSER,.addr = -1}, {
+	PTRACE_POKEUSER,.addr = -2}, {
+	PTRACE_POKEUSER,.addr = -3}, {
+	PTRACE_POKEUSER,.addr = -4},
 #ifdef PTRACE_GETREGS
-	{ PTRACE_GETREGS, .data = 0 },
-	{ PTRACE_GETREGS, .data = 1 },
-	{ PTRACE_GETREGS, .data = 2 },
-	{ PTRACE_GETREGS, .data = 3 },
-	{ PTRACE_GETREGS, .data = -1 },
-	{ PTRACE_GETREGS, .data = -2 },
-	{ PTRACE_GETREGS, .data = -3 },
-	{ PTRACE_GETREGS, .data = -4 },
+	{
+	PTRACE_GETREGS,.data = 0}, {
+	PTRACE_GETREGS,.data = 1}, {
+	PTRACE_GETREGS,.data = 2}, {
+	PTRACE_GETREGS,.data = 3}, {
+	PTRACE_GETREGS,.data = -1}, {
+	PTRACE_GETREGS,.data = -2}, {
+	PTRACE_GETREGS,.data = -3}, {
+	PTRACE_GETREGS,.data = -4},
 #endif
-
 #ifdef PTRACE_GETFGREGS
-	{ PTRACE_GETFGREGS, .data = 0 },
-	{ PTRACE_GETFGREGS, .data = 1 },
-	{ PTRACE_GETFGREGS, .data = 2 },
-	{ PTRACE_GETFGREGS, .data = 3 },
-	{ PTRACE_GETFGREGS, .data = -1 },
-	{ PTRACE_GETFGREGS, .data = -2 },
-	{ PTRACE_GETFGREGS, .data = -3 },
-	{ PTRACE_GETFGREGS, .data = -4 },
+	{
+	PTRACE_GETFGREGS,.data = 0}, {
+	PTRACE_GETFGREGS,.data = 1}, {
+	PTRACE_GETFGREGS,.data = 2}, {
+	PTRACE_GETFGREGS,.data = 3}, {
+	PTRACE_GETFGREGS,.data = -1}, {
+	PTRACE_GETFGREGS,.data = -2}, {
+	PTRACE_GETFGREGS,.data = -3}, {
+	PTRACE_GETFGREGS,.data = -4},
 #endif
-
 #ifdef PTRACE_SETREGS
-	{ PTRACE_SETREGS, .data = 0 },
-	{ PTRACE_SETREGS, .data = 1 },
-	{ PTRACE_SETREGS, .data = 2 },
-	{ PTRACE_SETREGS, .data = 3 },
-	{ PTRACE_SETREGS, .data = -1 },
-	{ PTRACE_SETREGS, .data = -2 },
-	{ PTRACE_SETREGS, .data = -3 },
-	{ PTRACE_SETREGS, .data = -4 },
+	{
+	PTRACE_SETREGS,.data = 0}, {
+	PTRACE_SETREGS,.data = 1}, {
+	PTRACE_SETREGS,.data = 2}, {
+	PTRACE_SETREGS,.data = 3}, {
+	PTRACE_SETREGS,.data = -1}, {
+	PTRACE_SETREGS,.data = -2}, {
+	PTRACE_SETREGS,.data = -3}, {
+	PTRACE_SETREGS,.data = -4},
 #endif
-
 #ifdef PTRACE_SETFGREGS
-	{ PTRACE_SETFGREGS, .data = 0 },
-	{ PTRACE_SETFGREGS, .data = 1 },
-	{ PTRACE_SETFGREGS, .data = 2 },
-	{ PTRACE_SETFGREGS, .data = 3 },
-	{ PTRACE_SETFGREGS, .data = -1 },
-	{ PTRACE_SETFGREGS, .data = -2 },
-	{ PTRACE_SETFGREGS, .data = -3 },
-	{ PTRACE_SETFGREGS, .data = -4 },
+	{
+	PTRACE_SETFGREGS,.data = 0}, {
+	PTRACE_SETFGREGS,.data = 1}, {
+	PTRACE_SETFGREGS,.data = 2}, {
+	PTRACE_SETFGREGS,.data = 3}, {
+	PTRACE_SETFGREGS,.data = -1}, {
+	PTRACE_SETFGREGS,.data = -2}, {
+	PTRACE_SETFGREGS,.data = -3}, {
+	PTRACE_SETFGREGS,.data = -4},
 #endif
-
 #if HAVE_DECL_PTRACE_GETSIGINFO
-	{ PTRACE_GETSIGINFO, .data = 0 },
-	{ PTRACE_GETSIGINFO, .data = 1 },
-	{ PTRACE_GETSIGINFO, .data = 2 },
-	{ PTRACE_GETSIGINFO, .data = 3 },
-	{ PTRACE_GETSIGINFO, .data = -1 },
-	{ PTRACE_GETSIGINFO, .data = -2 },
-	{ PTRACE_GETSIGINFO, .data = -3 },
-	{ PTRACE_GETSIGINFO, .data = -4 },
+	{
+	PTRACE_GETSIGINFO,.data = 0}, {
+	PTRACE_GETSIGINFO,.data = 1}, {
+	PTRACE_GETSIGINFO,.data = 2}, {
+	PTRACE_GETSIGINFO,.data = 3}, {
+	PTRACE_GETSIGINFO,.data = -1}, {
+	PTRACE_GETSIGINFO,.data = -2}, {
+	PTRACE_GETSIGINFO,.data = -3}, {
+	PTRACE_GETSIGINFO,.data = -4},
 #endif
-
 #if HAVE_DECL_PTRACE_SETSIGINFO
-	{ PTRACE_SETSIGINFO, .data = 0 },
-	{ PTRACE_SETSIGINFO, .data = 1 },
-	{ PTRACE_SETSIGINFO, .data = 2 },
-	{ PTRACE_SETSIGINFO, .data = 3 },
-	{ PTRACE_SETSIGINFO, .data = -1 },
-	{ PTRACE_SETSIGINFO, .data = -2 },
-	{ PTRACE_SETSIGINFO, .data = -3 },
-	{ PTRACE_SETSIGINFO, .data = -4 },
+	{
+	PTRACE_SETSIGINFO,.data = 0}, {
+	PTRACE_SETSIGINFO,.data = 1}, {
+	PTRACE_SETSIGINFO,.data = 2}, {
+	PTRACE_SETSIGINFO,.data = 3}, {
+	PTRACE_SETSIGINFO,.data = -1}, {
+	PTRACE_SETSIGINFO,.data = -2}, {
+	PTRACE_SETSIGINFO,.data = -3}, {
+	PTRACE_SETSIGINFO,.data = -4},
 #endif
 };
 
@@ -182,18 +178,24 @@
 		struct test_case_t *tc = &test_cases[i];
 
 		errno = 0;
-		ret = ptrace(tc->request, pid, (void *)tc->addr, (void *)tc->data);
+		ret =
+		    ptrace(tc->request, pid, (void *)tc->addr,
+			   (void *)tc->data);
 		saved_errno = errno;
 		if (ret != -1)
-			tst_resm(TFAIL, "ptrace(%s, ..., %li, %li) returned %li instead of -1",
-				strptrace(tc->request), tc->addr, tc->data, ret);
+			tst_resm(TFAIL,
+				 "ptrace(%s, ..., %li, %li) returned %li instead of -1",
+				 strptrace(tc->request), tc->addr, tc->data,
+				 ret);
 		else if (saved_errno != EIO && saved_errno != EFAULT)
-			tst_resm(TFAIL, "ptrace(%s, ..., %li, %li) expected errno EIO or EFAULT; actual: %i (%s)",
-				strptrace(tc->request), tc->addr, tc->data,
-				saved_errno, strerror(saved_errno));
+			tst_resm(TFAIL,
+				 "ptrace(%s, ..., %li, %li) expected errno EIO or EFAULT; actual: %i (%s)",
+				 strptrace(tc->request), tc->addr, tc->data,
+				 saved_errno, strerror(saved_errno));
 		else
-			tst_resm(TPASS, "ptrace(%s, ..., %li, %li) failed as expected",
-				strptrace(tc->request), tc->addr, tc->data);
+			tst_resm(TPASS,
+				 "ptrace(%s, ..., %li, %li) failed as expected",
+				 strptrace(tc->request), tc->addr, tc->data);
 	}
 
 	/* hopefully this worked */
diff --git a/testcases/kernel/syscalls/ptrace/simple_tracer.c b/testcases/kernel/syscalls/ptrace/simple_tracer.c
index 44ee66d..9fe9e33 100644
--- a/testcases/kernel/syscalls/ptrace/simple_tracer.c
+++ b/testcases/kernel/syscalls/ptrace/simple_tracer.c
@@ -78,21 +78,21 @@
 	decode_sysnum(nr);
 	puts("");
 #elif defined(__sparc__)
-	#define G1 u_regs[0]
-	#define G2 u_regs[1]
-	#define G3 u_regs[2]
-	#define G4 u_regs[3]
-	#define G5 u_regs[4]
-	#define G6 u_regs[5]
-	#define G7 u_regs[6]
-	#define O0 u_regs[7]
-	#define O1 u_regs[8]
-	#define O2 u_regs[9]
-	#define O3 u_regs[10]
-	#define O4 u_regs[11]
-	#define O5 u_regs[12]
-	#define O6 u_regs[13]
-	#define O7 u_regs[14]
+#define G1 u_regs[0]
+#define G2 u_regs[1]
+#define G3 u_regs[2]
+#define G4 u_regs[3]
+#define G5 u_regs[4]
+#define G6 u_regs[5]
+#define G7 u_regs[6]
+#define O0 u_regs[7]
+#define O1 u_regs[8]
+#define O2 u_regs[9]
+#define O3 u_regs[10]
+#define O4 u_regs[11]
+#define O5 u_regs[12]
+#define O6 u_regs[13]
+#define O7 u_regs[14]
 	decode(G1);
 	decode(G2);
 	decode(G3);
@@ -111,7 +111,7 @@
 	decode_sysnum(pt->G1);
 	puts("");
 #else
-# warning "no idea how to decode your arch"
+#warning "no idea how to decode your arch"
 	puts("no idea how to decode your arch");
 #endif
 }
diff --git a/testcases/kernel/syscalls/pwrite/pwrite01.c b/testcases/kernel/syscalls/pwrite/pwrite01.c
index 1a0d934..a87f87c 100644
--- a/testcases/kernel/syscalls/pwrite/pwrite01.c
+++ b/testcases/kernel/syscalls/pwrite/pwrite01.c
@@ -265,9 +265,9 @@
 	off_t offloc;		/* offset ret. from lseek() */
 
 	if ((offloc = lseek(fdesc, offset, whence)) != checkoff) {
-		tst_resm(TWARN, "lseek returned %"PRId64", expected %"PRId64, (int64_t)offloc,
-			 (int64_t)checkoff);
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek() on %s Failed",
+		tst_resm(TWARN, "lseek returned %" PRId64 ", expected %" PRId64,
+			 (int64_t) offloc, (int64_t) checkoff);
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek() on %s Failed",
 			 TEMPFILE);
 	}
 }
@@ -296,17 +296,16 @@
 		/* Seek to specified offset position from beginning */
 		offloc = lseek(fildes, count * K1, SEEK_SET);
 		if (offloc != (count * K1)) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "lseek() failed: offloc=%"PRId64,
-				 (int64_t)offloc);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "lseek() failed: offloc=%" PRId64,
+				 (int64_t) offloc);
 		}
 
 		/* Read the data from file into a buffer */
 		nread = read(fildes, read_buf, K1);
 		if (nread != K1) {
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "read() failed: nread=%d",
-				 nread);
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "read() failed: nread=%d", nread);
 		}
 
 		/* Compare the read data with the data written using pwrite */
diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c
index 48056e7..78260b7 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl01.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl01.c
@@ -51,11 +51,11 @@
 #if defined(HAVE_QUOTAV2) || defined(HAVE_QUOTAV1)
 #if defined(HAVE_QUOTAV2)
 #define _LINUX_QUOTA_VERSION 2
-#else	/* HAVE_QUOTAV1 */
+#else /* HAVE_QUOTAV1 */
 #define _LINUX_QUOTA_VERSION 1
 #endif
 #include <sys/quota.h>
-#else	/* ! (HAVE_QUOTAV2 || HAVE_QUOTAV1) */
+#else /* ! (HAVE_QUOTAV2 || HAVE_QUOTAV1) */
 /* Not HAVE_QUOTAV2 */
 #define BROKEN_QUOTACTL 1
 #endif
@@ -68,9 +68,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "quotactl01";		/* Test program identifier.		*/
-int  testno;
-int  TST_TOTAL = 1;			/* total number of tests in this file.	*/
+char *TCID = "quotactl01";	/* Test program identifier.             */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.  */
 
 #define QUOTACTL(cmd, addr) \
 	syscall(__NR_quotactl, QCMD(cmd, USRQUOTA), block_dev, id, \
@@ -114,7 +114,8 @@
 	if (block_dev) {
 		if (quota_started == 1 && QUOTACTL(Q_QUOTAOFF, &dq)) {
 			tst_brkm(TBROK | TERRNO, NULL,
-				"failed to disable the quota on %s", block_dev);
+				 "failed to disable the quota on %s",
+				 block_dev);
 		}
 	}
 
@@ -138,18 +139,19 @@
 /*		On success - returns 0.					      */
 /*									      */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 
 	/* Capture signals if any */
 	/* Create temporary directories */
 
 	if (geteuid() != 0) {
 		tst_brkm(TCONF, NULL,
-			"You must be root in order to execute this test");
+			 "You must be root in order to execute this test");
 	}
 	if ((quota_loc = malloc(FILENAME_MAX)) == NULL) {
 		tst_brkm(TCONF | TERRNO, NULL,
-			"couldn't allocate memory for the quota loc buffer");
+			 "couldn't allocate memory for the quota loc buffer");
 	}
 
 	TEST_PAUSE;
@@ -161,16 +163,16 @@
 
 		if (errno == ENOENT) {
 			tst_brkm(TCONF, cleanup,
-				"quota file - %s - doesn't exist (is the name "
-				"correct?)", quota_loc);
+				 "quota file - %s - doesn't exist (is the name "
+				 "correct?)", quota_loc);
 		} else {
 			/* Provide a terse explanation for why the command
 			 * failed.. */
 			tst_brkm(TCONF | TERRNO, cleanup,
-				"failed to enable quotas on block device: %s; "
-				"1. Ensure that the device is mounted with the "
-				"quota option. 2. Check the filesystem status "
-				"with `quotacheck %s'", block_dev, block_dev);
+				 "failed to enable quotas on block device: %s; "
+				 "1. Ensure that the device is mounted with the "
+				 "quota option. 2. Check the filesystem status "
+				 "with `quotacheck %s'", block_dev, block_dev);
 		}
 	} else {
 		quota_started = 1;
@@ -189,8 +191,8 @@
 */
 
 #ifdef BROKEN_QUOTACTL
-int
-main(void) {
+int main(void)
+{
 	tst_resm(TBROK, "This system doesn't support quota v2");
 	tst_exit();
 }
@@ -207,16 +209,15 @@
 	Q_SYNC
 };
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 
 	static int block_dev_FLAG = 0, mountpoint_FLAG = 0, quota_file_FLAG = 0;
 	option_t opts[] = {
-		{ .option = "b:", .flag = &block_dev_FLAG, .arg = &block_dev },
-		{ .option = "m:", .flag = &mountpoint_FLAG, .arg = &mountpoint },
-		{ .option = "q:", .flag = &quota_file_FLAG, .arg = &quota_file },
-		{ .option = '\0' }
+		{.option = "b:",.flag = &block_dev_FLAG,.arg = &block_dev},
+		{.option = "m:",.flag = &mountpoint_FLAG,.arg = &mountpoint},
+		{.option = "q:",.flag = &quota_file_FLAG,.arg = &quota_file},
+		{.option = '\0'}
 	};
 
 	int newtid = -1;
@@ -226,7 +227,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(ac, av, (option_t*) opts, NULL)) != (char*)NULL) {
+	if ((msg = parse_opts(ac, av, (option_t *) opts, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -238,14 +239,15 @@
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (i = 0; i <= sizeof(cmd)/sizeof(cmd[0]); i++) {
+			for (i = 0; i <= sizeof(cmd) / sizeof(cmd[0]); i++) {
 
 				ret = QUOTACTL(cmd[i], &dq);
 				if (ret != 0) {
 					tst_resm(TFAIL | TERRNO,
-						"cmd=0x%x failed", cmd[i]);
+						 "cmd=0x%x failed", cmd[i]);
 				} else {
-					tst_resm(TPASS, "quotactl call succeeded");
+					tst_resm(TPASS,
+						 "quotactl call succeeded");
 				}
 
 			}
diff --git a/testcases/kernel/syscalls/read/read01.c b/testcases/kernel/syscalls/read/read01.c
index e870293..d0d2ecc 100644
--- a/testcases/kernel/syscalls/read/read01.c
+++ b/testcases/kernel/syscalls/read/read01.c
@@ -134,6 +134,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 char fname[255];
 int fd, i;
 int offset = 0;
diff --git a/testcases/kernel/syscalls/read/read02.c b/testcases/kernel/syscalls/read/read02.c
index 795f135..78855b3 100644
--- a/testcases/kernel/syscalls/read/read02.c
+++ b/testcases/kernel/syscalls/read/read02.c
@@ -175,7 +175,7 @@
 
 	if (write(fd3, "A", 1) != 1) {
 		tst_brkm(TBROK, cleanup, "can't write to fd3");
-	 }
+	}
 	close(fd3);
 	if ((fd3 = open(fname, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup, "open of fd3 (temp file) failed");
diff --git a/testcases/kernel/syscalls/read/read03.c b/testcases/kernel/syscalls/read/read03.c
index fe90ceb..483ae76 100644
--- a/testcases/kernel/syscalls/read/read03.c
+++ b/testcases/kernel/syscalls/read/read03.c
@@ -127,13 +127,13 @@
 
 	if (mknod(fifo, S_IFIFO | 0777, 0) < 0) {
 		tst_brkm(TBROK, cleanup, "mknod() failed, errno: %d", errno);
-	 }
+	}
 	if (stat(fifo, &buf) != 0) {
 		tst_brkm(TBROK, cleanup, "stat() failed, errno: %d", errno);
-	 }
+	}
 	if ((buf.st_mode & S_IFIFO) == 0) {
 		tst_brkm(TBROK, cleanup, "Mode does not indicate fifo file");
-	 }
+	}
 
 	rfd = open(fifo, O_RDONLY | O_NONBLOCK);
 	wfd = open(fifo, O_WRONLY | O_NONBLOCK);
diff --git a/testcases/kernel/syscalls/read/read04.c b/testcases/kernel/syscalls/read/read04.c
index b0f8146..6f826ef 100644
--- a/testcases/kernel/syscalls/read/read04.c
+++ b/testcases/kernel/syscalls/read/read04.c
@@ -77,7 +77,7 @@
 	 */
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
@@ -87,7 +87,7 @@
 
 		if ((rfild = open(fname, O_RDONLY)) == -1) {
 			tst_brkm(TBROK, cleanup, "can't open for reading");
-		 }
+		}
 		TEST(read(rfild, prbuf, BUFSIZ));
 
 		if (TEST_RETURN == -1) {
@@ -112,7 +112,7 @@
 		}
 		if (close(rfild) == -1) {
 			tst_brkm(TBROK, cleanup, "close() failed");
-		 }
+		}
 	}
 	cleanup();
 	tst_exit();
@@ -138,10 +138,10 @@
 	if ((fild = creat(fname, 0777)) == -1) {
 		tst_brkm(TBROK, cleanup, "creat(%s, 0777) Failed, errno = %d"
 			 " : %s", fname, errno, strerror(errno));
-	 }
+	}
 	if (write(fild, palfa, TST_SIZE) != TST_SIZE) {
 		tst_brkm(TBROK, cleanup, "can't write to Xread");
-	 }
+	}
 	close(fild);
 }
 
diff --git a/testcases/kernel/syscalls/readahead/readahead01.c b/testcases/kernel/syscalls/readahead/readahead01.c
index e896b0e..84ea9cb 100644
--- a/testcases/kernel/syscalls/readahead/readahead01.c
+++ b/testcases/kernel/syscalls/readahead/readahead01.c
@@ -40,10 +40,10 @@
 #include "linux_syscall_numbers.h"
 
 char *TCID = "readahead01";
-int  TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
 option_t options[] = {
-	{ NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
 #if defined(__NR_readahead)
@@ -54,28 +54,28 @@
 {
 	if (expected_ret == TEST_RETURN) {
 		tst_resm(TPASS, "expected ret success - "
-			"returned value = %ld", TEST_RETURN);
+			 "returned value = %ld", TEST_RETURN);
 		return 0;
 	}
 	tst_resm(TFAIL, "unexpected failure - "
-			"returned value = %ld, expected: %ld",
-			TEST_RETURN, expected_ret);
+		 "returned value = %ld, expected: %ld",
+		 TEST_RETURN, expected_ret);
 	return 1;
 }
 
 static int check_errno(long expected_errno)
 {
 	if (TEST_ERRNO == expected_errno) {
-		tst_resm(TPASS|TTERRNO, "expected failure");
+		tst_resm(TPASS | TTERRNO, "expected failure");
 		return 0;
 	}
 
 	if (TEST_ERRNO == 0)
 		tst_resm(TFAIL, "call succeeded unexpectedly");
 	else
-		tst_resm(TFAIL|TTERRNO, "unexpected failure - "
-			"expected = %ld : %s, actual",
-			expected_errno, strerror(expected_errno));
+		tst_resm(TFAIL | TTERRNO, "unexpected failure - "
+			 "expected = %ld : %s, actual",
+			 expected_errno, strerror(expected_errno));
 	return 1;
 }
 
@@ -92,11 +92,11 @@
 	tst_resm(TINFO, "test_bad_fd O_WRONLY");
 	fd = mkstemp(tempname);
 	if (fd == -1)
-		tst_resm(TBROK|TERRNO, "mkstemp failed");
+		tst_resm(TBROK | TERRNO, "mkstemp failed");
 	close(fd);
 	fd = open(tempname, O_WRONLY);
 	if (fd == -1)
-		tst_resm(TBROK|TERRNO, "Failed to open testfile");
+		tst_resm(TBROK | TERRNO, "Failed to open testfile");
 	TEST(syscall(__NR_readahead, fd, 0, getpagesize()));
 	check_ret(-1);
 	check_errno(EBADF);
@@ -110,7 +110,7 @@
 
 	tst_resm(TINFO, "test_invalid_fd pipe");
 	if (pipe(fd) < 0)
-		tst_resm(TBROK|TERRNO, "Failed to create pipe");
+		tst_resm(TBROK | TERRNO, "Failed to create pipe");
 	TEST(syscall(__NR_readahead, fd[0], 0, getpagesize()));
 	check_ret(-1);
 	check_errno(EINVAL);
@@ -120,7 +120,7 @@
 	tst_resm(TINFO, "test_invalid_fd socket");
 	fd[0] = socket(AF_INET, SOCK_STREAM, 0);
 	if (fd[0] < 0)
-		tst_resm(TBROK|TERRNO, "Failed to create socket");
+		tst_resm(TBROK | TERRNO, "Failed to create socket");
 	TEST(syscall(__NR_readahead, fd[0], 0, getpagesize()));
 	check_ret(-1);
 	check_errno(EINVAL);
diff --git a/testcases/kernel/syscalls/readahead/readahead02.c b/testcases/kernel/syscalls/readahead/readahead02.c
index 3fc241b..d05bffd 100644
--- a/testcases/kernel/syscalls/readahead/readahead02.c
+++ b/testcases/kernel/syscalls/readahead/readahead02.c
@@ -49,20 +49,20 @@
 #include "linux_syscall_numbers.h"
 
 char *TCID = "readahead02";
-int  TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
 #if defined(__NR_readahead)
 static const char testfile[] = "testfile";
 static const char drop_caches_fname[] = "/proc/sys/vm/drop_caches";
 static const char meminfo_fname[] = "/proc/meminfo";
-static size_t testfile_size = 64*1024*1024;
+static size_t testfile_size = 64 * 1024 * 1024;
 static int opt_fsize;
 static char *opt_fsizestr;
 static int pagesize;
 
 option_t options[] = {
-	{ "s:", &opt_fsize, &opt_fsizestr},
-	{ NULL, NULL, NULL }
+	{"s:", &opt_fsize, &opt_fsizestr},
+	{NULL, NULL, NULL}
 };
 
 static void setup(void);
@@ -77,12 +77,12 @@
 {
 	if (expected_ret == TEST_RETURN) {
 		tst_resm(TPASS, "expected ret success - "
-			"returned value = %ld", TEST_RETURN);
+			 "returned value = %ld", TEST_RETURN);
 		return 0;
 	}
 	tst_resm(TFAIL, "unexpected failure - "
-			"returned value = %ld, expected: %ld",
-			TEST_RETURN, expected_ret);
+		 "returned value = %ld, expected: %ld",
+		 TEST_RETURN, expected_ret);
 	return 1;
 }
 
@@ -95,11 +95,11 @@
 		if (errno == ENOENT)
 			if (required)
 				tst_brkm(TCONF, cleanup, "%s not available",
-					fname);
+					 fname);
 			else
 				return 0;
 		else
-			tst_brkm(TBROK|TERRNO, cleanup, "stat %s", fname);
+			tst_brkm(TBROK | TERRNO, cleanup, "stat %s", fname);
 	}
 	return 1;
 }
@@ -169,15 +169,15 @@
 	f = fopen(testfile, "w");
 	if (!f) {
 		free(tmp);
-		tst_brkm(TBROK|TERRNO, cleanup, "Failed to create %s",
-			testfile);
+		tst_brkm(TBROK | TERRNO, cleanup, "Failed to create %s",
+			 testfile);
 	}
 
 	for (i = 0; i < testfile_size; i += pagesize)
 		if (fwrite(tmp, pagesize, 1, f) < 1) {
 			free(tmp);
 			tst_brkm(TBROK, cleanup, "Failed to create %s",
-				testfile);
+				 testfile);
 		}
 	fflush(f);
 	fsync(fileno(f));
@@ -197,7 +197,7 @@
  * @cached: returns cached kB from /proc/meminfo
  */
 static void read_testfile(int do_readahead, const char *fname, size_t fsize,
-	long *read_bytes, long *usec, long *cached)
+			  long *read_bytes, long *usec, long *cached)
 {
 	int fd, i;
 	long read_bytes_start;
@@ -208,18 +208,17 @@
 
 	fd = open(fname, O_RDONLY);
 	if (fd < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "Failed to open %s",
-			fname);
+		tst_brkm(TBROK | TERRNO, cleanup, "Failed to open %s", fname);
 
 	if (do_readahead) {
-		TEST(syscall(__NR_readahead, fd, (off64_t)0, (size_t)fsize));
+		TEST(syscall(__NR_readahead, fd, (off64_t) 0, (size_t) fsize));
 		check_ret(0);
 		*cached = get_cached_size();
 
 		/* offset of file shouldn't change after readahead */
 		offset = lseek(fd, 0, SEEK_CUR);
-		if (offset == (off_t) -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "lseek failed");
+		if (offset == (off_t) - 1)
+			tst_brkm(TBROK | TERRNO, cleanup, "lseek failed");
 		if (offset == 0)
 			tst_resm(TPASS, "offset is still at 0 as expected");
 		else
@@ -227,13 +226,13 @@
 	}
 
 	if (gettimeofday(&now, NULL) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "gettimeofday failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "gettimeofday failed");
 	time_start_usec = now.tv_sec * 1000000 + now.tv_usec;
 	read_bytes_start = get_bytes_read();
 
-	p = mmap(NULL, fsize, PROT_READ, MAP_SHARED|MAP_POPULATE, fd, 0);
+	p = mmap(NULL, fsize, PROT_READ, MAP_SHARED | MAP_POPULATE, fd, 0);
 	if (p == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 
 	/* for old kernels, where MAP_POPULATE doesn't work, touch each page */
 	tmp = 0;
@@ -247,16 +246,16 @@
 		*cached = get_cached_size();
 
 	if (munmap(p, fsize) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "munmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "munmap failed");
 
 	*read_bytes = get_bytes_read() - read_bytes_start;
 	if (gettimeofday(&now, NULL) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "gettimeofday failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "gettimeofday failed");
 	time_end_usec = now.tv_sec * 1000000 + now.tv_usec;
 	*usec = time_end_usec - time_start_usec;
 
 	if (close(fd) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 }
 
 static void test_readahead(void)
@@ -268,8 +267,7 @@
 	sprintf(proc_io_fname, "/proc/%u/io", getpid());
 
 	/* find out how much can cache hold if we read whole file */
-	read_testfile(0, testfile, testfile_size, &read_bytes,
-		&usec, &cached);
+	read_testfile(0, testfile, testfile_size, &read_bytes, &usec, &cached);
 	cached_max = get_cached_size();
 	sync();
 	drop_caches();
@@ -277,8 +275,7 @@
 	cached_max = cached_max - cached_low;
 
 	tst_resm(TINFO, "read_testfile(0)");
-	read_testfile(0, testfile, testfile_size, &read_bytes,
-		&usec, &cached);
+	read_testfile(0, testfile, testfile_size, &read_bytes, &usec, &cached);
 	cached = cached - cached_low;
 
 	sync();
@@ -286,16 +283,15 @@
 	cached_low = get_cached_size();
 	tst_resm(TINFO, "read_testfile(1)");
 	read_testfile(1, testfile, testfile_size, &read_bytes_ra,
-		&usec_ra, &cached_ra);
+		      &usec_ra, &cached_ra);
 	cached_ra = cached_ra - cached_low;
 
 	tst_resm(TINFO, "read_testfile(0) took: %ld usec", usec);
 	tst_resm(TINFO, "read_testfile(1) took: %ld usec", usec_ra);
 	if (has_file(proc_io_fname, 0)) {
-		tst_resm(TINFO, "read_testfile(0) read: %ld bytes",
-				read_bytes);
+		tst_resm(TINFO, "read_testfile(0) read: %ld bytes", read_bytes);
 		tst_resm(TINFO, "read_testfile(1) read: %ld bytes",
-				read_bytes_ra);
+			 read_bytes_ra);
 		/* actual number of read bytes depends on total RAM */
 		if (read_bytes_ra < read_bytes)
 			tst_resm(TPASS, "readahead saved some I/O");
@@ -303,25 +299,25 @@
 			tst_resm(TFAIL, "readahead failed to save any I/O");
 	} else {
 		tst_resm(TCONF, "Your system doesn't have /proc/pid/io,"
-			" unable to determine read bytes during test");
+			 " unable to determine read bytes during test");
 	}
 
 	tst_resm(TINFO, "cache can hold at least: %ld kB", cached_max);
 	tst_resm(TINFO, "read_testfile(0) used cache: %ld kB", cached);
 	tst_resm(TINFO, "read_testfile(1) used cache: %ld kB", cached_ra);
 
-	if (cached_max*1024 >= testfile_size) {
+	if (cached_max * 1024 >= testfile_size) {
 		/*
 		 * if cache can hold ~testfile_size then cache increase
 		 * for readahead should be at least testfile_size/2
 		 */
-		if (cached_ra*1024 > testfile_size/2)
+		if (cached_ra * 1024 > testfile_size / 2)
 			tst_resm(TPASS, "using cache as expected");
 		else
 			tst_resm(TWARN, "using less cache than expected");
 	} else {
 		tst_resm(TCONF, "Page cache on your system is too small "
-				"to hold whole testfile.");
+			 "to hold whole testfile.");
 	}
 }
 
diff --git a/testcases/kernel/syscalls/readdir/readdir01.c b/testcases/kernel/syscalls/readdir/readdir01.c
index 88a5df8..a5b6cf7 100644
--- a/testcases/kernel/syscalls/readdir/readdir01.c
+++ b/testcases/kernel/syscalls/readdir/readdir01.c
@@ -170,7 +170,6 @@
 	DIR *test_dir;
 	struct dirent *dptr;
 
-
     /***************************************************************
      * parse standard options
      ***************************************************************/
diff --git a/testcases/kernel/syscalls/readlink/readlink01.c b/testcases/kernel/syscalls/readlink/readlink01.c
index f551d48..ae85579 100644
--- a/testcases/kernel/syscalls/readlink/readlink01.c
+++ b/testcases/kernel/syscalls/readlink/readlink01.c
@@ -172,7 +172,7 @@
 		tst_brkm(TBROK, cleanup, "getpwname(nobody_uid) failed ");
 	}
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup, "seteuid to nobody failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "seteuid to nobody failed");
 	}
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -182,19 +182,19 @@
 	tst_tmpdir();
 
 	if ((fd = open(TESTFILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) failed",
 			 TESTFILE, FILE_MODE);
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN|TERRNO, "close(%s) failed", TESTFILE);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", TESTFILE);
 	}
 
 	/* Create a symlink of testfile under temporary directory */
 	if (symlink(TESTFILE, SYMFILE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "symlink(%s, %s) failed",
-		    TESTFILE, SYMFILE);
+		tst_brkm(TBROK | TERRNO, cleanup, "symlink(%s, %s) failed",
+			 TESTFILE, SYMFILE);
 	}
 
 	/* Get the strlen of testfile */
diff --git a/testcases/kernel/syscalls/readlink/readlink02.c b/testcases/kernel/syscalls/readlink/readlink02.c
index 30a46f7..b02d991 100644
--- a/testcases/kernel/syscalls/readlink/readlink02.c
+++ b/testcases/kernel/syscalls/readlink/readlink02.c
@@ -124,6 +124,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 char fname[255], buf[255], symlnk[255];
 int fd;
 
diff --git a/testcases/kernel/syscalls/readlink/readlink03.c b/testcases/kernel/syscalls/readlink/readlink03.c
index 6bb239e..75fc610 100644
--- a/testcases/kernel/syscalls/readlink/readlink03.c
+++ b/testcases/kernel/syscalls/readlink/readlink03.c
@@ -199,9 +199,11 @@
 					 "errno=%d, expected errno=%d",
 					 test_desc, TEST_ERRNO,
 					 Test_cases[i].exp_errno);
-				if ((strncmp(test_desc, "Symlink Pathname is empty", 25) == 0) &&
-				     TEST_ERRNO == EINVAL)
-					tst_resm(TWARN, "It may be a Kernel Bug, see the patch:"
+				if ((strncmp
+				     (test_desc, "Symlink Pathname is empty",
+				      25) == 0) && TEST_ERRNO == EINVAL)
+					tst_resm(TWARN,
+						 "It may be a Kernel Bug, see the patch:"
 						 "http://git.kernel.org/linus/1fa1e7f6");
 			}
 		}
diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
index fc41774..517e074 100644
--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
@@ -85,6 +85,7 @@
 int fds[TEST_CASES];
 char *filenames[TEST_CASES];
 int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
+
 char expected_buff[TEST_CASES][256];
 char buffer[BUFF_SIZE];
 
diff --git a/testcases/kernel/syscalls/readv/readv01.c b/testcases/kernel/syscalls/readv/readv01.c
index 7b1d14b..25327da 100644
--- a/testcases/kernel/syscalls/readv/readv01.c
+++ b/testcases/kernel/syscalls/readv/readv01.c
@@ -91,7 +91,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/readv/readv02.c b/testcases/kernel/syscalls/readv/readv02.c
index fb7ae1c..34b3257 100644
--- a/testcases/kernel/syscalls/readv/readv02.c
+++ b/testcases/kernel/syscalls/readv/readv02.c
@@ -106,7 +106,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/readv/readv03.c b/testcases/kernel/syscalls/readv/readv03.c
index 8c1a72d..c5e926d 100644
--- a/testcases/kernel/syscalls/readv/readv03.c
+++ b/testcases/kernel/syscalls/readv/readv03.c
@@ -83,7 +83,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/reboot/reboot01.c b/testcases/kernel/syscalls/reboot/reboot01.c
index a7903fd..f5fdbcd 100644
--- a/testcases/kernel/syscalls/reboot/reboot01.c
+++ b/testcases/kernel/syscalls/reboot/reboot01.c
@@ -83,6 +83,7 @@
 int TST_TOTAL = 2;		/* Total number of test cases. */
 
 static int flag[2] = { LINUX_REBOOT_CMD_CAD_ON, LINUX_REBOOT_CMD_CAD_OFF };
+
 static const char *option_message[] = { "LINUX_REBOOT_CMD_CAD_ON",
 	"LINUX_REBOOT_CMD_CAD_OFF"
 };
diff --git a/testcases/kernel/syscalls/reboot/reboot02.c b/testcases/kernel/syscalls/reboot/reboot02.c
index a2d5018..2096846 100644
--- a/testcases/kernel/syscalls/reboot/reboot02.c
+++ b/testcases/kernel/syscalls/reboot/reboot02.c
@@ -138,9 +138,10 @@
 				}
 			}
 			/* check return code */
-			if ((TEST_RETURN == -1) && (TEST_ERRNO == testcase[i].
-						    exp_errno)) {
-				tst_resm(TPASS, "reboot(2) expected failure;"
+			if ((TEST_RETURN == -1)
+			    && (TEST_ERRNO == testcase[i].exp_errno)) {
+				tst_resm(TPASS,
+					 "reboot(2) expected failure;"
 					 " Got errno - %s : %s",
 					 testcase[i].exp_errval,
 					 testcase[i].err_desc);
diff --git a/testcases/kernel/syscalls/recv/recv01.c b/testcases/kernel/syscalls/recv/recv01.c
index 4c17b1d..a1a7755 100644
--- a/testcases/kernel/syscalls/recv/recv01.c
+++ b/testcases/kernel/syscalls/recv/recv01.c
@@ -103,7 +103,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, EINVAL, 0 };
 
-
 #ifdef UCLINUX
 static char *argv0;
 #endif
@@ -183,7 +182,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null)");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null)");
 }
 
 void cleanup0(void)
@@ -199,10 +198,10 @@
 
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed");
 	if (tdat[testno].type == SOCK_STREAM &&
 	    connect(s, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "connect failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "connect failed");
 	}
 	/* Wait for something to be readable, else we won't detect EFAULT on recv */
 	FD_ZERO(&rdfds);
@@ -228,35 +227,36 @@
 
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	switch ((pid = FORK_OR_VFORK())) {
 	case 0:		/* child */
 #ifdef UCLINUX
 		if (self_exec(argv0, "d", sfd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "server self_exec failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "server self_exec failed");
 #else
 		do_child();
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 		/* fall through */
 	default:		/* parent */
 		(void)close(sfd);
 		return pid;
 	}
 
-	  exit(1);
+	exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/recvfrom/recvfrom01.c b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
index ca0dffb..c0c0fc9 100644
--- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
+++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
@@ -123,7 +123,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, EINVAL, 0 };
 
-
 #ifdef UCLINUX
 static char *argv0;
 #endif
@@ -202,7 +201,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 	fromlen = sizeof(from);
 }
 
@@ -219,10 +218,10 @@
 
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket() failed");
 	if (tdat[testno].type == SOCK_STREAM &&
 	    connect(s, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "connect failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "connect failed");
 	}
 	/* Wait for something to be readable, else we won't detect EFAULT on recv */
 	FD_ZERO(&rdfds);
@@ -255,15 +254,15 @@
 
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	switch ((pid = FORK_OR_VFORK())) {
@@ -277,14 +276,14 @@
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 		/* fall through */
 	default:		/* parent */
 		(void)close(sfd);
 		return pid;
 	}
 
-	  exit(1);
+	exit(1);
 }
 
 void do_child()
diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg01.c b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
index 82c7be6..996772f 100644
--- a/testcases/kernel/syscalls/recvmsg/recvmsg01.c
+++ b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
@@ -191,7 +191,6 @@
 
 int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, EINVAL, 0 };
 
-
 #ifdef UCLINUX
 static char *argv0;
 #endif
@@ -295,7 +294,7 @@
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
 	else if ((s = open("/dev/null", O_WRONLY)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open(/dev/null) failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 }
 
 void cleanup0(void)
@@ -311,12 +310,13 @@
 
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed");
 	if (tdat[testno].type == SOCK_STREAM) {
 		if (tdat[testno].domain == PF_INET) {
 			if (connect(s, (struct sockaddr *)&sin1, sizeof(sin1)) <
 			    0)
-				tst_brkm(TBROK|TERRNO, cleanup, "connect failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "connect failed");
 			/* Wait for something to be readable, else we won't detect EFAULT on recv */
 			FD_ZERO(&rdfds);
 			FD_SET(s, &rdfds);
@@ -329,7 +329,8 @@
 		} else if (tdat[testno].domain == PF_UNIX) {
 			if (connect(s, (struct sockaddr *)&sun1, sizeof(sun1)) <
 			    0)
-				tst_brkm(TBROK|TERRNO, cleanup, "UD connect failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "UD connect failed");
 		}
 	}
 }
@@ -338,7 +339,7 @@
 {
 	setup1();
 	if (write(s, "R", 1) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "test setup failed: write:");
+		tst_brkm(TBROK | TERRNO, cleanup, "test setup failed: write:");
 	control = (struct cmsghdr *)cbuf;
 	controllen = control->cmsg_len = sizeof(cbuf);
 }
@@ -384,29 +385,29 @@
 	/* set up inet socket */
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)ssin, sizeof(*ssin)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	/* set up UNIX-domain socket */
 	ufd = socket(PF_UNIX, SOCK_STREAM, 0);
 	if (ufd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server UD socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server UD socket failed");
 		return -1;
 	}
 	if (bind(ufd, (struct sockaddr *)ssun, sizeof(*ssun))) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server UD bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server UD bind failed");
 		return -1;
 	}
 	if (listen(ufd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server UD listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server UD listen failed");
 		return -1;
 	}
 
@@ -414,13 +415,14 @@
 	case 0:		/* child */
 #ifdef UCLINUX
 		if (self_exec(argv0, "dd", sfd, ufd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "server self_exec failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "server self_exec failed");
 #else
 		do_child();
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 		/* fall through */
 	default:		/* parent */
 		(void)close(sfd);
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
index 48ddcc2..8b08be8 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
@@ -168,8 +168,7 @@
 	}
 
 	data = mmap((void *)WINDOW_START,
-		    window_sz,
-		    PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		    window_sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 
 	if (data == MAP_FAILED) {
 		tst_resm(TFAIL, "mmap Error, errno=%d : %s", errno,
@@ -177,13 +176,13 @@
 		cleanup(NULL);
 	}
 
-      again:
+again:
 	for (i = 0; i < window_pages; i += 2) {
 		char *page = data + i * page_sz;
 
 		if (remap_file_pages(page, page_sz * 2, 0,
 				     (window_pages - i - 2), 0) == -1) {
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "remap_file_pages error for page=%p, page_sz=%zu, window_pages=%zu",
 				 page, (page_sz * 2), (window_pages - i - 2));
 			cleanup(data);
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
index 821140c..747a645 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
@@ -313,8 +313,7 @@
 	}
 
 	data = mmap((void *)WINDOW_START,
-		    cache_sz,
-		    PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		    cache_sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 
 	if (data == MAP_FAILED) {
 		tst_resm(TFAIL, "mmap Error, errno=%d : %s", errno,
diff --git a/testcases/kernel/syscalls/rename/rename01.c b/testcases/kernel/syscalls/rename/rename01.c
index 8f3a2ae..4c7756e 100644
--- a/testcases/kernel/syscalls/rename/rename01.c
+++ b/testcases/kernel/syscalls/rename/rename01.c
@@ -219,7 +219,7 @@
 	/* create "old" directory */
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 }
+	}
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s"
diff --git a/testcases/kernel/syscalls/rename/rename02.c b/testcases/kernel/syscalls/rename/rename02.c
index daebec3..6c3844f 100644
--- a/testcases/kernel/syscalls/rename/rename02.c
+++ b/testcases/kernel/syscalls/rename/rename02.c
@@ -125,6 +125,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 int fd;
 char fname[255], mname[255];
 
diff --git a/testcases/kernel/syscalls/rename/rename03.c b/testcases/kernel/syscalls/rename/rename03.c
index 11d47a7..7ed8f9f 100644
--- a/testcases/kernel/syscalls/rename/rename03.c
+++ b/testcases/kernel/syscalls/rename/rename03.c
@@ -92,8 +92,9 @@
 	dev_t *olddev;
 	ino_t *oldino;
 } TC[] = {
-	{ fname, mname, "file", &f_olddev, &f_oldino},
-	{ fdir, mdir, "directory", &d_olddev, &d_oldino}
+	{
+	fname, mname, "file", &f_olddev, &f_oldino}, {
+	fdir, mdir, "directory", &d_olddev, &d_oldino}
 };
 
 int main(int ac, char **av)
@@ -179,7 +180,7 @@
 		/* remove the new directory */
 		if (rmdir(mdir) == -1) {
 			tst_brkm(TBROK, cleanup, "Couldn't remove directory %s",
-			    mdir);
+				 mdir);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/rename/rename04.c b/testcases/kernel/syscalls/rename/rename04.c
index 056067e..3a56628 100644
--- a/testcases/kernel/syscalls/rename/rename04.c
+++ b/testcases/kernel/syscalls/rename/rename04.c
@@ -160,7 +160,7 @@
 	/* create "old" directory */
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 }
+	}
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s"
@@ -175,7 +175,7 @@
 	/* create another directory */
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 }
+	}
 
 	/* create a file under "new" directory */
 	do_file_setup(tstfile);
diff --git a/testcases/kernel/syscalls/rename/rename05.c b/testcases/kernel/syscalls/rename/rename05.c
index 7853db9..6246018 100644
--- a/testcases/kernel/syscalls/rename/rename05.c
+++ b/testcases/kernel/syscalls/rename/rename05.c
@@ -163,11 +163,11 @@
 	/* create another directory */
 	if (stat(mdir, &buf2) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", mdir);
-	 }
+	}
 
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 }
+	}
 
 	if (stat(mdir, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
diff --git a/testcases/kernel/syscalls/rename/rename06.c b/testcases/kernel/syscalls/rename/rename06.c
index 5369943..d11018a 100644
--- a/testcases/kernel/syscalls/rename/rename06.c
+++ b/testcases/kernel/syscalls/rename/rename06.c
@@ -149,10 +149,10 @@
 	/* create "old" directory */
 	if (stat(fdir, &buf1) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", fdir);
-	 }
+	}
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 }
+	}
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
 			 "in rename()", fdir);
@@ -165,10 +165,10 @@
 	/* create another directory */
 	if (stat(mdir, &buf2) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", mdir);
-	 }
+	}
 	if (mkdir(mdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", mdir);
-	 }
+	}
 
 	if (stat(mdir, &buf2) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
diff --git a/testcases/kernel/syscalls/rename/rename07.c b/testcases/kernel/syscalls/rename/rename07.c
index 5793a6c..8d0e725 100644
--- a/testcases/kernel/syscalls/rename/rename07.c
+++ b/testcases/kernel/syscalls/rename/rename07.c
@@ -131,11 +131,11 @@
 	/* create "old" directory */
 	if (stat(fdir, &buf1) != -1) {
 		tst_brkm(TBROK, cleanup, "tmp directory %s found!", fdir);
-	 }
+	}
 
 	if (mkdir(fdir, 00770) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 }
+	}
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s "
diff --git a/testcases/kernel/syscalls/rename/rename08.c b/testcases/kernel/syscalls/rename/rename08.c
index 09d06ef..102fbb9 100644
--- a/testcases/kernel/syscalls/rename/rename08.c
+++ b/testcases/kernel/syscalls/rename/rename08.c
@@ -103,6 +103,7 @@
 	{
 	NULL, NULL, EFAULT}
 };
+
 int TST_TOTAL = (sizeof(TC) / sizeof(*TC));
 
 int main(int ac, char **av)
diff --git a/testcases/kernel/syscalls/rename/rename09.c b/testcases/kernel/syscalls/rename/rename09.c
index db2dd36..3ed3a22 100644
--- a/testcases/kernel/syscalls/rename/rename09.c
+++ b/testcases/kernel/syscalls/rename/rename09.c
@@ -131,7 +131,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #1 failed");
-		 }
+		}
 
 		if (pid == 0) {	/* first child */
 			/* set to nobody */
@@ -143,14 +143,14 @@
 					 nobody->pw_uid, nobody->pw_uid);
 				perror("setreuid");
 				exit(1);
-			 }
+			}
 
 			/* create the a directory with 0700 permits */
 			if (mkdir(fdir, PERMS) == -1) {
 				tst_resm(TWARN, "mkdir(%s, %#o) Failed",
 					 fdir, PERMS);
 				exit(1);
-			 }
+			}
 
 			/* create "old" file under it */
 			do_file_setup(fname);
@@ -167,7 +167,7 @@
 
 		if ((pid1 = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() #2 failed");
-		 }
+		}
 
 		if (pid1 == 0) {	/* second child */
 			/* set to bin */
@@ -175,14 +175,14 @@
 				tst_resm(TWARN, "seteuid() failed");
 				perror("setreuid");
 				exit(1);
-			 }
+			}
 
 			/* create "new" directory */
 			if (mkdir(mdir, PERMS) == -1) {
 				tst_resm(TWARN, "mkdir(%s, %#o) failed",
 					 mdir, PERMS);
 				exit(1);
-			 }
+			}
 
 			/* create the new file */
 			do_file_setup(mname);
@@ -199,7 +199,7 @@
 			if (TEST_ERRNO != EACCES) {
 				tst_resm(TFAIL, "Expected EACCES got %d",
 					 TEST_ERRNO);
-			 } else {
+			} else {
 				tst_resm(TPASS, "rename() returned EACCES");
 			}
 
@@ -249,7 +249,7 @@
 	/* must run as root */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must run test as root");
-	 }
+	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
diff --git a/testcases/kernel/syscalls/rename/rename12.c b/testcases/kernel/syscalls/rename/rename12.c
index a385802..443b921 100644
--- a/testcases/kernel/syscalls/rename/rename12.c
+++ b/testcases/kernel/syscalls/rename/rename12.c
@@ -131,7 +131,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if (pid == 0) {	/* child */
 			/* set to nobody */
@@ -139,7 +139,7 @@
 				tst_resm(TWARN, "setreuid failed");
 				perror("setreuid");
 				exit(1);
-			 }
+			}
 
 			/* rename "old" to "new" */
 			TEST(rename(fname, mname));
@@ -147,7 +147,7 @@
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "call succeeded unexpectedly");
 				exit(1);
-			 }
+			}
 
 			TEST_ERROR_LOG(TEST_ERRNO);
 
@@ -156,7 +156,7 @@
 					 "Expected EPERM or EACCES, got %d",
 					 TEST_ERRNO);
 				exit(1);
-			 } else {
+			} else {
 				tst_resm(TPASS,
 					 "rename returned EPERM or EACCES");
 			}
@@ -189,7 +189,7 @@
 	/* must run as root */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must run this as root");
-	 }
+	}
 
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
@@ -207,7 +207,7 @@
 	/* create a directory */
 	if (mkdir(fdir, PERMS) == -1) {
 		tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
-	 }
+	}
 
 	if (stat(fdir, &buf1) == -1) {
 		tst_brkm(TBROK, cleanup, "failed to stat directory %s", fdir);
diff --git a/testcases/kernel/syscalls/rename/rename13.c b/testcases/kernel/syscalls/rename/rename13.c
index 0f98bc5..995f924 100644
--- a/testcases/kernel/syscalls/rename/rename13.c
+++ b/testcases/kernel/syscalls/rename/rename13.c
@@ -195,7 +195,7 @@
 	if (link(fname, mname) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "link from %s to %s failed!", fname, mname);
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 3143656..9468adf 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -99,7 +99,8 @@
 
 	/* Disable test if the version of the kernel is less than 2.6.16 */
 	if ((tst_kvercmp(2, 6, 16)) < 0) {
-		tst_brkm(TCONF, NULL, "This test can only run on kernels that are 2.6.16 and higher");
+		tst_brkm(TCONF, NULL,
+			 "This test can only run on kernels that are 2.6.16 and higher");
 	}
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
@@ -125,12 +126,12 @@
 
 				if (STD_FUNCTIONAL_TEST) {
 					/* No Verification test, yet... */
-					tst_resm(TPASS|TTERRNO,
-					    "renameat failed as expected");
+					tst_resm(TPASS | TTERRNO,
+						 "renameat failed as expected");
 				}
 			} else {
-				tst_resm(TFAIL|TTERRNO,
-				    "renameat failed unexpectedly");
+				tst_resm(TFAIL | TTERRNO,
+					 "renameat failed unexpectedly");
 			}
 		}
 
diff --git a/testcases/kernel/syscalls/rmdir/rmdir01.c b/testcases/kernel/syscalls/rmdir/rmdir01.c
index 4ec77b5..b51b3f4 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir01.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir01.c
@@ -110,7 +110,7 @@
 		if (mkdir(tstdir, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir, PERMS);
-		 }
+		}
 		/* call rmdir using TEST macro */
 
 		TEST(rmdir(tstdir));
diff --git a/testcases/kernel/syscalls/rmdir/rmdir02.c b/testcases/kernel/syscalls/rmdir/rmdir02.c
index c68a0fc..3d07658 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir02.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir02.c
@@ -133,6 +133,7 @@
 	{
 	NULL, EFAULT, NULL}
 };
+
 int TST_TOTAL = (sizeof(TC) / sizeof(*TC));
 
 int main(int ac, char **av)
@@ -228,7 +229,7 @@
 		if (mkdir(tstdir1, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir1, PERMS);
-		 }
+		}
 
 		/* create a file under tstdir1 */
 		do_file_setup(tstfile);
@@ -249,7 +250,7 @@
 		/* create a file */
 		if ((fd = creat(tstfile, PERMS)) == -1) {
 			tst_brkm(TBROK, cleanup, "creat() failed");
-		 }
+		}
 		close(fd);
 		break;
 	default:
diff --git a/testcases/kernel/syscalls/rmdir/rmdir03.c b/testcases/kernel/syscalls/rmdir/rmdir03.c
index 99116df..f3ad25c 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir03.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir03.c
@@ -138,12 +138,12 @@
 		if (stat(tstdir1, &buf1) != -1) {
 			tst_brkm(TBROK, cleanup,
 				 "tmp directory %s found!", tstdir1);
-		 }
+		}
 		/* create a directory */
 		if (mkdir(tstdir1, PERMS) == -1) {
 			tst_brkm(TBROK, cleanup,
 				 "Couldnot create directory %s", tstdir1);
-		 }
+		}
 		if (stat(tstdir1, &buf1) == -1) {
 			perror("stat");
 			tst_brkm(TBROK, cleanup, "failed to stat directory %s "
@@ -165,7 +165,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if (pid == 0) {	/* first child */
 #ifdef UCLINUX
@@ -183,16 +183,16 @@
 		if (mkdir(tstdir3, 0700) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir3, PERMS);
-		 }
+		}
 		/* create the a directory with 0700 permits */
 		if (mkdir(tstdir4, 0777) == -1) {
 			tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
 				 tstdir4, PERMS);
-		 }
+		}
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		 }
+		}
 
 		if (pid == 0) {	/* child */
 #ifdef UCLINUX
@@ -250,7 +250,7 @@
 		retval = 1;
 		tst_brkm(TBROK, cleanup, "setreuid failed to "
 			 "set effective uid to %d", nobody->pw_uid);
-	 }
+	}
 
 	/* rmdir tstdir2 */
 	TEST(rmdir(tstdir2));
@@ -290,7 +290,7 @@
 		retval = 1;
 		tst_brkm(TBROK, cleanup, "setreuid failed to "
 			 "set effective uid to %d", nobody->pw_uid);
-	 }
+	}
 
 	/* rmdir tstdir4 */
 	TEST(rmdir(tstdir4));
diff --git a/testcases/kernel/syscalls/rmdir/rmdir04.c b/testcases/kernel/syscalls/rmdir/rmdir04.c
index ded9198..b11b9a7 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir04.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir04.c
@@ -127,6 +127,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 char *cwd;
 char fname[255];
 
diff --git a/testcases/kernel/syscalls/rmdir/rmdir05.c b/testcases/kernel/syscalls/rmdir/rmdir05.c
index da3d69c..986575f 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir05.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir05.c
@@ -126,8 +126,7 @@
     /***************************************************************
      * parse standard options
      ***************************************************************/
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	}
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
index e3178ac..ce498af 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
@@ -60,9 +60,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigaction01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "rt_sigaction01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -82,7 +82,8 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-void cleanup() {
+void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -107,25 +108,28 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int test_flags[] = {SA_RESETHAND|SA_SIGINFO, SA_RESETHAND, SA_RESETHAND|SA_SIGINFO, SA_RESETHAND|SA_SIGINFO, SA_NOMASK};
-char *test_flags_list[] = {"SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND|SA_SIGINFO", "SA_NOMASK"};
+int test_flags[] =
+    { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
+SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+char *test_flags_list[] =
+    { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
+"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
 
-void
-handler(int sig)
+void handler(int sig)
 {
 	tst_resm(TINFO, "Signal Handler Called with signal number %d\n", sig);
 	return;
 }
 
-int
-set_handler(int sig, int sig_to_mask, int mask_flags)
+int set_handler(int sig, int sig_to_mask, int mask_flags)
 {
 #ifdef __x86_64__
 	struct kernel_sigaction sa, oldaction;
@@ -140,11 +144,12 @@
 	sigemptyset(&sa.sa_mask);
 	sigaddset(&sa.sa_mask, sig);
 
-	return syscall(__NR_rt_sigaction, sig, &sa, &oldaction,SIGSETSIZE);
+	return syscall(__NR_rt_sigaction, sig, &sa, &oldaction, SIGSETSIZE);
 
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int signal, flag;
 	int lc;
 	char *msg;
@@ -161,32 +166,41 @@
 
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (signal = SIGRTMIN; signal <= (SIGRTMAX ); signal++) {//signal for 34 to 65
+			for (signal = SIGRTMIN; signal <= (SIGRTMAX); signal++) {	//signal for 34 to 65
 
 #ifdef __x86_64__
 				sig_initial(signal);
 #endif
 
-				for (flag = 0; flag < (sizeof(test_flags) / sizeof(test_flags[0])); flag++) {
+				for (flag = 0;
+				     flag <
+				     (sizeof(test_flags) /
+				      sizeof(test_flags[0])); flag++) {
 
-					TEST(set_handler(signal, 0, test_flags[flag]));
+					TEST(set_handler
+					     (signal, 0, test_flags[flag]));
 
 					if (TEST_RETURN == 0) {
-						tst_resm(TINFO,"signal: %d ", signal);
-						tst_resm(TPASS, "rt_sigaction call succeeded: result = %ld ",TEST_RETURN );
-						tst_resm(TINFO, "sa.sa_flags = %s ",test_flags_list[flag]);
-						kill(getpid(),signal);
+						tst_resm(TINFO, "signal: %d ",
+							 signal);
+						tst_resm(TPASS,
+							 "rt_sigaction call succeeded: result = %ld ",
+							 TEST_RETURN);
+						tst_resm(TINFO,
+							 "sa.sa_flags = %s ",
+							 test_flags_list[flag]);
+						kill(getpid(), signal);
 					} else {
-	         	   			tst_resm(TFAIL | TTERRNO,
-							"rt_sigaction call "
-							"failed");
-	               			}
+						tst_resm(TFAIL | TTERRNO,
+							 "rt_sigaction call "
+							 "failed");
+					}
 
-	        		}
+				}
 
 			}
 
-	        }
+		}
 
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
index 7f1b3ee..f22d86b 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
@@ -75,9 +75,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigaction02";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "rt_sigaction02";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -97,12 +97,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -123,63 +124,87 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int test_flags[] = {SA_RESETHAND|SA_SIGINFO, SA_RESETHAND, SA_RESETHAND|SA_SIGINFO, SA_RESETHAND|SA_SIGINFO, SA_NOMASK};
-char *test_flags_list[] = {"SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND|SA_SIGINFO", "SA_NOMASK"};
+int test_flags[] =
+    { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
+SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+char *test_flags_list[] =
+    { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
+"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
 
 struct test_case_t {
-        int exp_errno;
-        char *errdesc;
+	int exp_errno;
+	char *errdesc;
 } test_cases[] = {
-	{ EFAULT, "EFAULT" }
+	{
+	EFAULT, "EFAULT"}
 };
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int signal, flag;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (signal = SIGRTMIN; signal <= (SIGRTMAX ); signal++) {//signal for 34 to 65
-			 	for (flag=0; flag<5;flag++) {
+			for (signal = SIGRTMIN; signal <= (SIGRTMAX); signal++) {	//signal for 34 to 65
+				for (flag = 0; flag < 5; flag++) {
 
-				/*   							        *
-				 * long sys_rt_sigaction (int sig, const struct sigaction *act, *
-				 * truct sigaction *oact, size_t sigsetsize);			*
-				 * EFAULT:							*
-		        	 * An invalid act or oact value was specified 			*
-				 */
+					/*                                                              *
+					 * long sys_rt_sigaction (int sig, const struct sigaction *act, *
+					 * truct sigaction *oact, size_t sigsetsize);                   *
+					 * EFAULT:                                                      *
+					 * An invalid act or oact value was specified                   *
+					 */
 
-					 TEST(syscall(__NR_rt_sigaction,signal, INVAL_STRUCT, NULL,SIGSETSIZE));
-					if ((TEST_RETURN == -1) && (TEST_ERRNO == test_cases[0].exp_errno)) {
-        						tst_resm(TINFO, "sa.sa_flags = %s ",test_flags_list[flag]);
-                 	   				tst_resm(TPASS, "%s failure with sig: %d as expected errno  = %s : %s", TCID, signal,test_cases[0].errdesc, strerror(TEST_ERRNO));
-			                         } else {
-        					tst_resm(TFAIL, "rt_sigaction call succeeded: result = %ld got error %d:but expected  %d", TEST_RETURN, TEST_ERRNO, test_cases[0].exp_errno);
-        					tst_resm(TINFO, "sa.sa_flags = %s ",test_flags_list[flag]);
-						}
-                			}
-		 	printf("\n");
-        		}
+					TEST(syscall
+					     (__NR_rt_sigaction, signal,
+					      INVAL_STRUCT, NULL, SIGSETSIZE));
+					if ((TEST_RETURN == -1)
+					    && (TEST_ERRNO ==
+						test_cases[0].exp_errno)) {
+						tst_resm(TINFO,
+							 "sa.sa_flags = %s ",
+							 test_flags_list[flag]);
+						tst_resm(TPASS,
+							 "%s failure with sig: %d as expected errno  = %s : %s",
+							 TCID, signal,
+							 test_cases[0].errdesc,
+							 strerror(TEST_ERRNO));
+					} else {
+						tst_resm(TFAIL,
+							 "rt_sigaction call succeeded: result = %ld got error %d:but expected  %d",
+							 TEST_RETURN,
+							 TEST_ERRNO,
+							 test_cases[0].
+							 exp_errno);
+						tst_resm(TINFO,
+							 "sa.sa_flags = %s ",
+							 test_flags_list[flag]);
+					}
+				}
+				printf("\n");
+			}
 
-                }
-        }
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
index 45337e0..456bd29 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
@@ -56,9 +56,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigaction03";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "rt_sigaction03";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -78,12 +78,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -104,87 +105,109 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int test_flags[] = {SA_RESETHAND|SA_SIGINFO, SA_RESETHAND, SA_RESETHAND|SA_SIGINFO, SA_RESETHAND|SA_SIGINFO, SA_NOMASK};
-char *test_flags_list[] = {"SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND|SA_SIGINFO", "SA_NOMASK"};
+int test_flags[] =
+    { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
+SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+char *test_flags_list[] =
+    { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
+"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
 
 struct test_case_t {
-        int exp_errno;
-        char *errdesc;
+	int exp_errno;
+	char *errdesc;
 } test_cases[] = {
-	{ EINVAL, "EINVAL" }
+	{
+	EINVAL, "EINVAL"}
 };
 
-void
-handler(int sig)
+void handler(int sig)
 {
-        tst_resm(TINFO,"Signal Handler Called with signal number %d\n",sig);
-        return;
+	tst_resm(TINFO, "Signal Handler Called with signal number %d\n", sig);
+	return;
 }
 
-int
-set_handler(int sig, int sig_to_mask, int mask_flags)
+int set_handler(int sig, int sig_to_mask, int mask_flags)
 {
-        struct sigaction sa, oldaction;
+	struct sigaction sa, oldaction;
 
-                sa.sa_sigaction = (void *)handler;
-                sa.sa_flags = mask_flags;
-                sigemptyset(&sa.sa_mask);
-                sigaddset(&sa.sa_mask, sig_to_mask);
+	sa.sa_sigaction = (void *)handler;
+	sa.sa_flags = mask_flags;
+	sigemptyset(&sa.sa_mask);
+	sigaddset(&sa.sa_mask, sig_to_mask);
 
-		/*   							        *
-		 * long sys_rt_sigaction (int sig, const struct sigaction *act, *
-		 * truct sigaction *oact, size_t sigsetsize);			*
-		 * EINVAL:							*
-        	 * sigsetsize was not equivalent to the size of a sigset_t type *
-		 */
+	/*                                                              *
+	 * long sys_rt_sigaction (int sig, const struct sigaction *act, *
+	 * truct sigaction *oact, size_t sigsetsize);                   *
+	 * EINVAL:                                                      *
+	 * sigsetsize was not equivalent to the size of a sigset_t type *
+	 */
 
-                TEST(syscall(__NR_rt_sigaction,sig, &sa , &oldaction,INVAL_SIGSETSIZE));
-                if (TEST_RETURN == 0) {
-                      return 0;
-                } else {
-                        return TEST_RETURN;
-                }
+	TEST(syscall
+	     (__NR_rt_sigaction, sig, &sa, &oldaction, INVAL_SIGSETSIZE));
+	if (TEST_RETURN == 0) {
+		return 0;
+	} else {
+		return TEST_RETURN;
+	}
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int signal, flag;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (signal = SIGRTMIN; signal <= (SIGRTMAX ); signal++) {//signal for 34 to 65
-			 	for (flag=0; flag<5;flag++) {
-	                        	 TEST(set_handler(signal, 0, test_flags[flag]));
-					if ((TEST_RETURN == -1) && (TEST_ERRNO == test_cases[0].exp_errno)) {
-        						tst_resm(TINFO, "sa.sa_flags = %s ",test_flags_list[flag]);
-                 	   				tst_resm(TPASS, "%s failure with sig: %d as expected errno  = %s : %s", TCID, signal,test_cases[0].errdesc, strerror(TEST_ERRNO));
-			                         } else {
-        					tst_resm(TFAIL, "rt_sigaction call succeeded: result = %ld got error %d:but expected  %d", TEST_RETURN, TEST_ERRNO, test_cases[0].exp_errno);
-        					tst_resm(TINFO, "sa.sa_flags = %s ",test_flags_list[flag]);
-						}
-                			}
-		 	printf("\n");
-        		}
+			for (signal = SIGRTMIN; signal <= (SIGRTMAX); signal++) {	//signal for 34 to 65
+				for (flag = 0; flag < 5; flag++) {
+					TEST(set_handler
+					     (signal, 0, test_flags[flag]));
+					if ((TEST_RETURN == -1)
+					    && (TEST_ERRNO ==
+						test_cases[0].exp_errno)) {
+						tst_resm(TINFO,
+							 "sa.sa_flags = %s ",
+							 test_flags_list[flag]);
+						tst_resm(TPASS,
+							 "%s failure with sig: %d as expected errno  = %s : %s",
+							 TCID, signal,
+							 test_cases[0].errdesc,
+							 strerror(TEST_ERRNO));
+					} else {
+						tst_resm(TFAIL,
+							 "rt_sigaction call succeeded: result = %ld got error %d:but expected  %d",
+							 TEST_RETURN,
+							 TEST_ERRNO,
+							 test_cases[0].
+							 exp_errno);
+						tst_resm(TINFO,
+							 "sa.sa_flags = %s ",
+							 test_flags_list[flag]);
+					}
+				}
+				printf("\n");
+			}
 
-                }
-        }
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
index 2563887..d9e432d 100644
--- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
@@ -67,9 +67,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigprocmask01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 8;                   /* total number of tests in this file.   */
+char *TCID = "rt_sigprocmask01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 8;		/* total number of tests in this file.   */
 
 #define TEST_SIG SIGRTMIN+1
 
@@ -91,7 +91,8 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-void cleanup() {
+void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -116,7 +117,8 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -130,7 +132,8 @@
 	sig_count++;
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 #if __x86_64
 	struct kernel_sigaction act, oact;
 	sig_initial(TEST_SIG);
@@ -139,8 +142,8 @@
 	act.k_sa_handler = sig_handler;
 #else
 	struct sigaction act, oact;
-	memset(&act,0,sizeof(act));
-	memset(&oact,0,sizeof(oact));
+	memset(&act, 0, sizeof(act));
+	memset(&oact, 0, sizeof(oact));
 	act.sa_handler = sig_handler;
 #endif
 	sigset_t set, oset;
@@ -148,86 +151,87 @@
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-	        Tst_count = 0;
-	        for (testno = 0; testno < TST_TOTAL; ++testno) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
 			if (sigemptyset(&set) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"sigemptyset call failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "sigemptyset call failed");
 			}
 			if (sigaddset(&set, TEST_SIG) < 0) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"sigaddset call failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "sigaddset call failed");
 			}
 
 			/* call rt_sigaction() */
 			TEST(syscall(__NR_rt_sigaction, TEST_SIG, &act, &oact,
-			    SIGSETSIZE));
+				     SIGSETSIZE));
 			if (TEST_RETURN < 0) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"rt_sigaction call failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "rt_sigaction call failed");
 			}
 			/* call rt_sigprocmask() to block signal#TEST_SIG */
-	                TEST(syscall(__NR_rt_sigprocmask, SIG_BLOCK, &set,
-					&oset, SIGSETSIZE));
+			TEST(syscall(__NR_rt_sigprocmask, SIG_BLOCK, &set,
+				     &oset, SIGSETSIZE));
 			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"rt_sigprocmask call failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "rt_sigprocmask call failed");
 			}
 			/* Make sure that the masked process is indeed
 			 * masked. */
 			if (kill(getpid(), TEST_SIG) < 0) {
 				tst_brkm(TFAIL | TERRNO, cleanup,
-					"call to kill() failed");
+					 "call to kill() failed");
 			}
 			if (sig_count) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-					"rt_sigprocmask() failed to change "
-					"the process's signal mask");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "rt_sigprocmask() failed to change "
+					 "the process's signal mask");
 			} else {
 				/* call rt_sigpending() */
 				TEST(syscall(__NR_rt_sigpending, &oset,
-				    SIGSETSIZE));
+					     SIGSETSIZE));
 				if (TEST_RETURN == -1) {
-					tst_brkm(TFAIL|TTERRNO,	cleanup,
-						"rt_sigpending call failed");
+					tst_brkm(TFAIL | TTERRNO, cleanup,
+						 "rt_sigpending call failed");
 				}
 				TEST(sigismember(&oset, TEST_SIG));
 				if (TEST_RETURN == 0) {
-					tst_brkm(TFAIL|TTERRNO,
-						cleanup,
-						"sigismember call failed");
+					tst_brkm(TFAIL | TTERRNO,
+						 cleanup,
+						 "sigismember call failed");
 				}
 				/* call rt_sigprocmask() to unblock
 				 * signal#TEST_SIG */
 				TEST(syscall(__NR_rt_sigprocmask,
-					SIG_UNBLOCK, &set, &oset, SIGSETSIZE));
+					     SIG_UNBLOCK, &set, &oset,
+					     SIGSETSIZE));
 				if (TEST_RETURN == -1) {
-					tst_brkm(TFAIL|TTERRNO,
-						cleanup,
-						"rt_sigprocmask call failed");
+					tst_brkm(TFAIL | TTERRNO,
+						 cleanup,
+						 "rt_sigprocmask call failed");
 				}
 				if (sig_count) {
 					tst_resm(TPASS,
-						"rt_sigprocmask "
-						"functionality passed");
+						 "rt_sigprocmask "
+						 "functionality passed");
 					break;
 				} else {
-					tst_brkm(TFAIL|TERRNO,
-						cleanup,
-						"rt_sigprocmask "
-						"functionality failed");
+					tst_brkm(TFAIL | TERRNO,
+						 cleanup,
+						 "rt_sigprocmask "
+						 "functionality failed");
 				}
 
 			}
 
-	        }
+		}
 
 		Tst_count++;
 
diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
index 169cb56..625b314 100644
--- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask02.c
@@ -79,8 +79,8 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigprocmask02";/* Test program identifier.*/
-int  TST_TOTAL = 2;		/* total number of tests in this file.   */
+char *TCID = "rt_sigprocmask02";	/* Test program identifier. */
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -100,7 +100,8 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -125,7 +126,8 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -139,13 +141,15 @@
 	int sssize;
 	int exp_errno;
 } test_cases[] = {
-	{ &set, 1, EINVAL },
-	{ (sigset_t *)-1, SIGSETSIZE, EFAULT }
+	{
+	&set, 1, EINVAL}, {
+	(sigset_t *) - 1, SIGSETSIZE, EFAULT}
 };
 
 int test_count = sizeof(test_cases) / sizeof(struct test_case_t);
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 	sigset_t s;
 	char *msg;
@@ -161,20 +165,18 @@
 
 	TEST(sigfillset(&s));
 	if (TEST_RETURN == -1) {
-		tst_resm(TFAIL | TTERRNO,
-			"Call to sigfillset() failed.");
+		tst_resm(TFAIL | TTERRNO, "Call to sigfillset() failed.");
 		cleanup();
 		tst_exit();
 	}
 
-	for (i=0; i < test_count; i++) {
+	for (i = 0; i < test_count; i++) {
 		TEST(syscall(__NR_rt_sigprocmask, SIG_BLOCK,
-				&s, test_cases[i].ss,
-				test_cases[i].sssize));
+			     &s, test_cases[i].ss, test_cases[i].sssize));
 		if (TEST_RETURN == 0) {
 			tst_resm(TFAIL | TTERRNO,
-				"Call to rt_sigprocmask() succeeded, "
-				"but should failed");
+				 "Call to rt_sigprocmask() succeeded, "
+				 "but should failed");
 		} else if (TEST_ERRNO == test_cases[i].exp_errno) {
 			tst_resm(TPASS | TTERRNO, "Got expected errno");
 		} else {
diff --git a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
index b57940b..bce45b6 100644
--- a/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
+++ b/testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
@@ -54,23 +54,26 @@
 #include "linux_syscall_numbers.h"
 
 /* Global Variables */
-char *TCID = "rt_sigqueueinfo01"; /* Test program identifier.*/
+char *TCID = "rt_sigqueueinfo01";	/* Test program identifier. */
 int testno;
-int TST_TOTAL = 2; /* total number of tests in this file.   */
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
 
 }
 
-void setup() {
+void setup()
+{
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int status;
 	pid_t pid;
 	pid = getpid();
@@ -81,12 +84,12 @@
 		TEST(pid = fork());
 		setup();
 		if (TEST_RETURN < 0)
-			tst_brkm(TFAIL|TTERRNO, cleanup, "fork failed");
+			tst_brkm(TFAIL | TTERRNO, cleanup, "fork failed");
 		else if (TEST_RETURN == 0) {
 			uinfo.si_errno = 0;
 			uinfo.si_code = SI_QUEUE;
 			TEST(syscall(__NR_rt_sigqueueinfo, getpid(), SIGCHLD,
-			    &uinfo));
+				     &uinfo));
 			if (TEST_RETURN != 0)
 				err(1, "rt_sigqueueinfo");
 			exit(0);
diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
index f05d580..7cd9453 100644
--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
+++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
@@ -52,9 +52,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "rt_sigsuspend01"; /* Test program identifier.		 */
-int  testno;
-int  TST_TOTAL = 1;	      /* total number of tests in this file.	 */
+char *TCID = "rt_sigsuspend01";	/* Test program identifier.              */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.     */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -74,7 +74,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-void cleanup() {
+void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -99,7 +100,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -110,14 +112,15 @@
 {
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 
 	sigset_t set, set1, set2;
 	int lc;
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
 	setup();
@@ -127,33 +130,34 @@
 		Tst_count = 0;
 
 		if (sigemptyset(&set) < 0) {
-			tst_brkm(TFAIL|TERRNO, cleanup, "sigemptyset failed");
+			tst_brkm(TFAIL | TERRNO, cleanup, "sigemptyset failed");
 		}
 #ifdef __x86_64__
 		struct kernel_sigaction act, oact;
 		sig_initial(SIGALRM);
-		memset(&act,0,sizeof(act));
-		memset(&oact,0,sizeof(oact));
+		memset(&act, 0, sizeof(act));
+		memset(&oact, 0, sizeof(oact));
 		act.sa_flags |= SA_RESTORER;
 		act.sa_restorer = restore_rt;
 		act.k_sa_handler = sig_handler;
 #else
 		struct sigaction act, oact;
-		memset(&act,0,sizeof(act));
-		memset(&oact,0,sizeof(oact));
+		memset(&act, 0, sizeof(act));
+		memset(&oact, 0, sizeof(oact));
 		act.sa_handler = sig_handler;
 #endif
 
 		TEST(syscall(__NR_rt_sigaction, SIGALRM, &act, &oact,
-				SIGSETSIZE));
+			     SIGSETSIZE));
 		if (TEST_RETURN == -1) {
-			tst_brkm(TFAIL|TTERRNO, cleanup, "rt_sigaction failed");
+			tst_brkm(TFAIL | TTERRNO, cleanup,
+				 "rt_sigaction failed");
 		}
 		TEST(syscall(__NR_rt_sigprocmask, SIG_UNBLOCK, 0,
-				&set1, SIGSETSIZE));
+			     &set1, SIGSETSIZE));
 		if (TEST_RETURN == -1) {
-			tst_brkm(TFAIL|TTERRNO,	cleanup,
-				"rt_sigprocmask failed");
+			tst_brkm(TFAIL | TTERRNO, cleanup,
+				 "rt_sigprocmask failed");
 		}
 
 		TEST(alarm(5));
@@ -162,19 +166,19 @@
 		TEST(alarm(0));
 		if (result == -1 && TEST_ERRNO != EINTR) {
 			TEST(syscall(__NR_rt_sigprocmask, SIG_UNBLOCK, 0, &set2,
-					SIGSETSIZE));
+				     SIGSETSIZE));
 			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"rt_sigprocmask failed");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "rt_sigprocmask failed");
 			} else if (set1.__val[0] != set2.__val[0]) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"rt_sigsuspend failed to "
-					"preserve signal mask");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "rt_sigsuspend failed to "
+					 "preserve signal mask");
 			} else {
-				tst_resm(TPASS,	"rt_sigsuspend PASSED");
+				tst_resm(TPASS, "rt_sigsuspend PASSED");
 			}
 		} else {
-			tst_resm(TFAIL|TTERRNO,	"rt_sigsuspend failed");
+			tst_resm(TFAIL | TTERRNO, "rt_sigsuspend failed");
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
index 3227fdd..760ae88 100644
--- a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
+++ b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
@@ -111,7 +111,7 @@
 				tst_resm(TPASS, "%s Passed",
 					 test_cases[ind].desc);
 			} else {
-				tst_resm(TFAIL|TTERRNO, "%s Failed,"
+				tst_resm(TFAIL | TTERRNO, "%s Failed,"
 					 "sched_get_priority_max() returned %ld",
 					 test_cases[ind].desc, TEST_RETURN);
 			}
diff --git a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
index 967dd88..60d7467 100644
--- a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
+++ b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max02.c
@@ -101,9 +101,9 @@
 		if ((TEST_RETURN == -1) && (TEST_ERRNO == EINVAL)) {
 			tst_resm(TPASS, "Test Passed, Got EINVAL");
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, sched_get_priority_max()"
-				 " returned %ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, sched_get_priority_max()"
+				 " returned %ld", TEST_RETURN);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
index 0630459..9d41d37 100644
--- a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
+++ b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
@@ -111,7 +111,7 @@
 				tst_resm(TPASS, "%s Passed",
 					 test_cases[ind].desc);
 			} else {
-				tst_resm(TFAIL|TTERRNO, "%s Failed,"
+				tst_resm(TFAIL | TTERRNO, "%s Failed,"
 					 "sched_get_priority_min() returned %ld",
 					 test_cases[ind].desc, TEST_RETURN);
 			}
diff --git a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
index a8371a6..7923c3d 100644
--- a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
+++ b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min02.c
@@ -101,9 +101,9 @@
 		if ((TEST_RETURN == -1) && (TEST_ERRNO == EINVAL)) {
 			tst_resm(TPASS, "Test Passed, Got EINVAL");
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, sched_get_priority_min()"
-				 " returned %ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, sched_get_priority_min()"
+				 " returned %ld", TEST_RETURN);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
index 6e4977a..d9d9437 100644
--- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
@@ -54,7 +54,7 @@
 #include "linux_syscall_numbers.h"
 
 char *TCID = "sched_getaffinity01";
-int  TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
 static long num;
 static void do_test(void);
@@ -81,7 +81,6 @@
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	setup();
 
-
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
 		Tst_count = 0;
 
@@ -103,11 +102,11 @@
 #if __GLIBC_PREREQ(2, 7)
 realloc:
 	mask = CPU_ALLOC(nrcpus);
-# else
+#else
 	mask = malloc(sizeof(cpu_set_t));
 #endif
 	if (mask == NULL)
-		tst_brkm(TFAIL|TTERRNO, cleanup, "fail to get enough memory");
+		tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory");
 #if __GLIBC_PREREQ(2, 7)
 	len = CPU_ALLOC_SIZE(nrcpus);
 	CPU_ZERO_S(len, mask);
@@ -127,10 +126,10 @@
 #else
 		if (errno == EINVAL)
 			tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
-					"newer glibc(>= 2.7)");
+				 "newer glibc(>= 2.7)");
 		else
 #endif
-			tst_resm(TFAIL|TTERRNO, "fail to get cpu affinity");
+			tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity");
 		cleanup();
 	} else {
 		tst_resm(TINFO, "cpusetsize is %d", len);
@@ -143,8 +142,8 @@
 #endif
 			if (TEST_RETURN != -1)
 				tst_resm(TPASS, "sched_getaffinity() succeed, "
-						"this process %d is running "
-						"processor: %d", getpid(), i);
+					 "this process %d is running "
+					 "processor: %d", getpid(), i);
 		}
 	}
 
@@ -154,7 +153,7 @@
 	CPU_ZERO(mask);
 #endif
 	/* negative tests */
-	QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *)-1));
+	QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1));
 	QUICK_TEST(sched_getaffinity(0, 0, mask));
 	/*
 	 * pid_t -> int -- the actual kernel limit is lower
@@ -188,7 +187,7 @@
 
 	num = sysconf(_SC_NPROCESSORS_CONF);
 	if (num == -1)
-		tst_brkm(TBROK|TERRNO, NULL, "sysconf");
+		tst_brkm(TBROK | TERRNO, NULL, "sysconf");
 	tst_resm(TINFO, "system has %ld processor(s).", num);
 }
 
diff --git a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
index f6c6d48..587f2dd 100644
--- a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
+++ b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler01.c
@@ -62,11 +62,14 @@
 	int policy;
 } TC[] = {
 	/* set scheduling policy to SCHED_RR */
-	{ 1, SCHED_RR},
-	/* set scheduling policy to SCHED_OTHER */
-	{ 0, SCHED_OTHER},
-	/* set scheduling policy to SCHED_FIFO */
-	{ 1, SCHED_FIFO}
+	{
+	1, SCHED_RR},
+	    /* set scheduling policy to SCHED_OTHER */
+	{
+	0, SCHED_OTHER},
+	    /* set scheduling policy to SCHED_FIFO */
+	{
+	1, SCHED_FIFO}
 };
 
 int main(int ac, char **av)
@@ -92,7 +95,7 @@
 
 			if (sched_setscheduler(0, TC[i].policy, &param) == -1)
 				tst_brkm(TBROK, cleanup,
-				    "sched_setscheduler failed");
+					 "sched_setscheduler failed");
 
 			TEST(sched_getscheduler(0));
 
@@ -104,11 +107,11 @@
 			if (STD_FUNCTIONAL_TEST) {
 				if (TEST_RETURN != TC[i].policy)
 					tst_resm(TFAIL,
-					    "policy value returned is not "
-					    "correct");
+						 "policy value returned is not "
+						 "correct");
 				else
 					tst_resm(TPASS,
-					    "policy value returned is correct");
+						 "policy value returned is correct");
 			} else
 				tst_resm(TPASS, "call succeeded");
 		}
diff --git a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
index 2109ce7..5ee6ca2 100644
--- a/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
+++ b/testcases/kernel/syscalls/sched_getscheduler/sched_getscheduler02.c
@@ -63,7 +63,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
index 463931f..8751adb 100644
--- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
+++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
@@ -103,7 +103,8 @@
 			tst_resm(TPASS, "sched_rr_get_interval() returned %ld",
 				 TEST_RETURN);
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, sched_rr_get_interval()"
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, sched_rr_get_interval()"
 				 "returned %ld", TEST_RETURN);
 		}
 	}
diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
index 549c1e7..13147b5 100644
--- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
+++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval03.c
@@ -127,8 +127,9 @@
 			    (TEST_ERRNO == test_cases[i].exp_errno)) {
 				tst_resm(TPASS, "Test Passed");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "Test Failed,"
-					 " sched_rr_get_interval() returned %ld", TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO, "Test Failed,"
+					 " sched_rr_get_interval() returned %ld",
+					 TEST_RETURN);
 			}
 			TEST_ERROR_LOG(TEST_ERRNO);
 		}
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
index 63c93dd..e91c43c 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam01.c
@@ -100,8 +100,9 @@
 			tst_resm(TPASS, "sched_setparam() returned %ld",
 				 TEST_RETURN);
 		} else {
-			tst_resm(TFAIL|TTERRNO, "Test Failed, sched_setparam()"
-				 "returned %ld", TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO,
+				 "Test Failed, sched_setparam()" "returned %ld",
+				 TEST_RETURN);
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
index 05e9db8..2cc0da8 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam02.c
@@ -130,9 +130,10 @@
 			if ((TEST_RETURN == 0) && (verify_priority(i))) {
 				tst_resm(TPASS, "%s Passed", testcases[i].desc);
 			} else {
-				tst_resm(TFAIL|TTERRNO, "%s Failed. sched_setparam()"
-					 " returned %ld",
-					 testcases[i].desc, TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "%s Failed. sched_setparam()"
+					 " returned %ld", testcases[i].desc,
+					 TEST_RETURN);
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c b/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
index 9c465df..0a3e5db 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam05.c
@@ -86,6 +86,7 @@
 
 static struct sched_param param = { 0 };
 static int exp_enos[] = { EPERM, 0 };
+
 static char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -138,9 +139,9 @@
 				exit(0);
 			}
 
-			tst_resm(TWARN|TTERRNO, "Test failed, sched_setparam()"
-				 " returned : %ld",
-				 TEST_RETURN);
+			tst_resm(TWARN | TTERRNO,
+				 "Test failed, sched_setparam()"
+				 " returned : %ld", TEST_RETURN);
 			TEST_ERROR_LOG(TEST_ERRNO);
 			exit(1);
 
diff --git a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
index ae45a09..da264ec 100644
--- a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
+++ b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler01.c
@@ -104,7 +104,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		/* reset Tst_count in case we are looping */
diff --git a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
index e3d8149..6cb1fc7 100644
--- a/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
+++ b/testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c
@@ -60,6 +60,7 @@
 int TST_TOTAL = 1;
 
 int exp_enos[] = { EPERM, 0 };
+
 extern struct passwd *my_getpwnam(char *);
 
 void setup(void);
@@ -79,7 +80,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/sched_yield/sched_yield01.c b/testcases/kernel/syscalls/sched_yield/sched_yield01.c
index 99eda68..649a45d 100644
--- a/testcases/kernel/syscalls/sched_yield/sched_yield01.c
+++ b/testcases/kernel/syscalls/sched_yield/sched_yield01.c
@@ -61,7 +61,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/select/select01.c b/testcases/kernel/syscalls/select/select01.c
index bf38325..1e47826 100644
--- a/testcases/kernel/syscalls/select/select01.c
+++ b/testcases/kernel/syscalls/select/select01.c
@@ -222,7 +222,7 @@
 	tst_tmpdir();
 
 	if ((Fd = open(FILENAME, O_CREAT | O_RDWR, 0777)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_CREAT | O_RDWR) failed", FILENAME);
 
 	/*
@@ -248,7 +248,7 @@
 
 	if (Fd >= 0) {
 		if (close(Fd) == -1)
-			tst_resm(TWARN|TERRNO, "close(%s) failed", FILENAME);
+			tst_resm(TWARN | TERRNO, "close(%s) failed", FILENAME);
 		Fd = -1;
 	}
 
diff --git a/testcases/kernel/syscalls/send/send01.c b/testcases/kernel/syscalls/send/send01.c
index cd0a4c6..fb9fbdd 100644
--- a/testcases/kernel/syscalls/send/send01.c
+++ b/testcases/kernel/syscalls/send/send01.c
@@ -50,7 +50,7 @@
 static char buf[1024], bigbuf[128 * 1024];
 static int s;
 static struct sockaddr_in sin1;
-static int sfd; /* shared between do_child and start_server */
+static int sfd;			/* shared between do_child and start_server */
 
 struct test_case_t {		/* test case structure */
 	int domain;		/* PF_INET, PF_UNIX, ... */
@@ -61,8 +61,8 @@
 	unsigned flags;		/* send's 4th argument */
 	int retval;
 	int experrno;
-	void (*setup)(void);
-	void (*cleanup)(void);
+	void (*setup) (void);
+	void (*cleanup) (void);
 	char *desc;
 };
 
@@ -87,7 +87,8 @@
 	 .experrno = EBADF,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "bad file descriptor"},
+	 .desc = "bad file descriptor"}
+	,
 	{.domain = 0,
 	 .type = 0,
 	 .proto = 0,
@@ -98,7 +99,8 @@
 	 .experrno = ENOTSOCK,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "invalid socket"},
+	 .desc = "invalid socket"}
+	,
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
 	{.domain = PF_INET,
@@ -111,7 +113,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid send buffer"},
+	 .desc = "invalid send buffer"}
+	,
 #endif
 	{.domain = PF_INET,
 	 .type = SOCK_DGRAM,
@@ -123,7 +126,8 @@
 	 .experrno = EMSGSIZE,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "UDP message too big"},
+	 .desc = "UDP message too big"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -134,7 +138,8 @@
 	 .experrno = EPIPE,
 	 .setup = setup2,
 	 .cleanup = cleanup1,
-	 .desc = "local endpoint shutdown"},
+	 .desc = "local endpoint shutdown"}
+	,
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
 	{.domain = PF_INET,
@@ -153,7 +158,7 @@
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);
 
-int exp_enos[] = {EBADF, ENOTSOCK, EFAULT, EMSGSIZE, EPIPE, EINVAL, 0};
+int exp_enos[] = { EBADF, ENOTSOCK, EFAULT, EMSGSIZE, EPIPE, EINVAL, 0 };
 
 #ifdef UCLINUX
 static char *argv0;
@@ -166,29 +171,29 @@
 
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	switch ((pid = FORK_OR_VFORK())) {
 	case 0:
 #ifdef UCLINUX
 		if (self_exec(argv0, "d", sfd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
+			tst_brkm(TBROK | TERRNO, cleanup,
 				 "server self_exec failed");
 #else
 		do_child();
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 	default:
 		close(sfd);
 		return pid;
@@ -262,7 +267,7 @@
 			tdat[testno].setup();
 
 			TEST(send(s, tdat[testno].buf, tdat[testno].buflen,
-			          tdat[testno].flags));
+				  tdat[testno].flags));
 
 			if (TEST_RETURN != -1) {
 				tst_resm(TFAIL, "call succeeded unexpectedly");
@@ -315,10 +320,8 @@
 {
 	if (tdat[testno].experrno == EBADF)
 		s = 400;	/* anything not an open file */
-	else
-		if ((s = open("/dev/null", O_WRONLY)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-				 "open(/dev/null) failed");
+	else if ((s = open("/dev/null", O_WRONLY)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 }
 
 static void cleanup0(void)
@@ -330,9 +333,9 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed");
 	if (connect(s, (const struct sockaddr *)&sin1, sizeof(sin1)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "connect failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "connect failed");
 }
 
 static void cleanup1(void)
@@ -346,7 +349,7 @@
 	setup1();
 
 	if (shutdown(s, 1) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed connect "
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed connect "
 			 "test %d", testno);
 }
 
diff --git a/testcases/kernel/syscalls/sendfile/sendfile02.c b/testcases/kernel/syscalls/sendfile/sendfile02.c
index 52e67dd..3473eb0 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile02.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile02.c
@@ -108,22 +108,22 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 }
+	}
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 }
+	}
 
 	if ((before_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek before invoking sendfile failed: %d", errno);
-	 }
+	}
 
 	TEST(sendfile(out_fd, in_fd, &offset, sb.st_size - offset));
 
 	if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek after invoking sendfile failed: %d", errno);
-	 }
+	}
 
 	if (STD_FUNCTIONAL_TEST) {
 		/* Close the sockets */
@@ -138,13 +138,14 @@
 		} else if (offset != testcases[i].exp_updated_offset) {
 			tst_resm(TFAIL, "sendfile(2) failed to update "
 				 "OFFSET parameter to expected value, "
-				 "expected: %d, got: %"PRId64,
-				 testcases[i].exp_updated_offset, (int64_t)offset);
+				 "expected: %d, got: %" PRId64,
+				 testcases[i].exp_updated_offset,
+				 (int64_t) offset);
 		} else if (before_pos != after_pos) {
 			tst_resm(TFAIL, "sendfile(2) updated the file position "
-				 " of in_fd unexpectedly, expected file position: %"PRId64", "
-				 " actual file position %"PRId64,
-				 (int64_t)before_pos, (int64_t)after_pos);
+				 " of in_fd unexpectedly, expected file position: %"
+				 PRId64 ", " " actual file position %" PRId64,
+				 (int64_t) before_pos, (int64_t) after_pos);
 		} else {
 			tst_resm(TPASS, "functionality of sendfile() is "
 				 "correct");
@@ -201,11 +202,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -288,7 +289,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
diff --git a/testcases/kernel/syscalls/sendfile/sendfile03.c b/testcases/kernel/syscalls/sendfile/sendfile03.c
index 515aefa..ede9dfa 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile03.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile03.c
@@ -95,7 +95,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
@@ -155,19 +155,19 @@
 	if ((in_fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(in_fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(in_fd);
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 }
+	}
 	sprintf(out_file, "out.%d", getpid());
 	if ((out_fd = open(out_file, O_TRUNC | O_CREAT | O_RDWR, 0777)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sendfile/sendfile04.c b/testcases/kernel/syscalls/sendfile/sendfile04.c
index 27a7fa4..84a04f0 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile04.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile04.c
@@ -108,21 +108,21 @@
 				prot, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
 	if (protected_buffer == MAP_FAILED) {
 		tst_brkm(TBROK, cleanup, "mmap failed: %d", errno);
-	 }
+	}
 
 	out_fd = create_server();
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 }
+	}
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 }
+	}
 
 	if (pass_unmapped_buffer) {
 		if (munmap(protected_buffer, sizeof(*protected_buffer)) < 0) {
 			tst_brkm(TBROK, cleanup, "munmap failed: %d", errno);
-		 }
+		}
 	}
 
 	TEST(sendfile(out_fd, in_fd, protected_buffer, sb.st_size));
@@ -188,11 +188,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -275,7 +275,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
diff --git a/testcases/kernel/syscalls/sendfile/sendfile05.c b/testcases/kernel/syscalls/sendfile/sendfile05.c
index d0c9592..bc45d40 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile05.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile05.c
@@ -88,10 +88,10 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 }
+	}
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 }
+	}
 
 	offset = -1;
 	TEST(sendfile(out_fd, in_fd, &offset, sb.st_size));
@@ -152,11 +152,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -238,7 +238,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
diff --git a/testcases/kernel/syscalls/sendfile/sendfile06.c b/testcases/kernel/syscalls/sendfile/sendfile06.c
index dbe975f..0d04709 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile06.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile06.c
@@ -92,16 +92,16 @@
 
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed: %d", errno);
-	 }
+	}
 	if (stat(in_file, &sb) < 0) {
 		tst_brkm(TBROK, cleanup, "stat failed: %d", errno);
-	 }
+	}
 
 	TEST(sendfile(out_fd, in_fd, NULL, sb.st_size));
 	if ((after_pos = lseek(in_fd, 0, SEEK_CUR)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "lseek after invoking sendfile failed: %d", errno);
-	 }
+	}
 
 	if (STD_FUNCTIONAL_TEST) {
 		/* Close the sockets */
@@ -109,15 +109,15 @@
 		shutdown(s, SHUT_RDWR);
 		if (TEST_RETURN != sb.st_size) {
 			tst_resm(TFAIL, "sendfile(2) failed to return "
-				 "expected value, expected: %"PRId64", "
-				 "got: %ld", (int64_t)sb.st_size, TEST_RETURN);
+				 "expected value, expected: %" PRId64 ", "
+				 "got: %ld", (int64_t) sb.st_size, TEST_RETURN);
 			kill(child_pid, SIGKILL);
 		} else if (after_pos != sb.st_size) {
 			tst_resm(TFAIL, "sendfile(2) failed to update "
 				 " the file position of in_fd, "
-				 "expected file position: %"PRId64", "
-				 "actual file position %"PRId64,
-				 (int64_t)sb.st_size, (int64_t)after_pos);
+				 "expected file position: %" PRId64 ", "
+				 "actual file position %" PRId64,
+				 (int64_t) sb.st_size, (int64_t) after_pos);
 			kill(child_pid, SIGKILL);
 		} else {
 			tst_resm(TPASS, "functionality of sendfile() is "
@@ -174,11 +174,11 @@
 	if ((fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(fd);
 	sprintf(out_file, "out.%d", getpid());
 }
@@ -260,7 +260,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	argv0 = av[0];
 	maybe_run_child(&do_child, "");
diff --git a/testcases/kernel/syscalls/sendfile/sendfile07.c b/testcases/kernel/syscalls/sendfile/sendfile07.c
index 362353e..c31032e 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile07.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile07.c
@@ -81,7 +81,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
@@ -136,20 +136,20 @@
 	if ((in_fd = creat(in_file, 00700)) < 0) {
 		tst_brkm(TBROK, cleanup, "creat failed in setup, errno: %d",
 			 errno);
-	 }
+	}
 	sprintf(buf, "abcdefghijklmnopqrstuvwxyz");
 	if (write(in_fd, buf, strlen(buf)) < 0) {
 		tst_brkm(TBROK, cleanup, "write failed, errno: %d", errno);
-	 }
+	}
 	close(in_fd);
 	if ((in_fd = open(in_file, O_RDONLY)) < 0) {
 		tst_brkm(TBROK, cleanup, "open failed, errno: %d", errno);
-	 }
+	}
 
 	/* Make fulfilled out_fd. */
 	if (socketpair(PF_UNIX, SOCK_DGRAM, 0, p) < 0) {
 		tst_brkm(TBROK, cleanup, "socketpair failed, errno: %d", errno);
-	 }
+	}
 
 	/* Don't close.
 	   You cannot write nothing on out_fd if ignored_fd is closed. */
diff --git a/testcases/kernel/syscalls/sendfile/sendfile08.c b/testcases/kernel/syscalls/sendfile/sendfile08.c
index c59b571..3d4caa3 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile08.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile08.c
@@ -73,18 +73,18 @@
 		ret = lseek(out_fd, 0, SEEK_SET);
 		if (ret == -1)
 			tst_brkm(TBROK | TERRNO, cleanup, "lseek %s failed",
-			    out_file);
+				 out_file);
 		ret = read(out_fd, buf, BUFSIZ);
 		if (ret == -1)
 			tst_brkm(TBROK | TERRNO, cleanup, "read %s failed",
-			    out_file);
+				 out_file);
 
 		if (!strcmp(buf, TEST_MSG_OUT TEST_MSG_IN))
 			tst_resm(TPASS, "sendfile(2) copies data correctly");
 		else
 			tst_resm(TFAIL, "sendfile(2) copies data incorrectly."
-			    " Expect \"%s%s\", got \"%s\"", TEST_MSG_OUT,
-			    TEST_MSG_IN, buf);
+				 " Expect \"%s%s\", got \"%s\"", TEST_MSG_OUT,
+				 TEST_MSG_IN, buf);
 	}
 
 	cleanup();
diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg01.c b/testcases/kernel/syscalls/sendmsg/sendmsg01.c
index 5f463a6..e1424ca 100644
--- a/testcases/kernel/syscalls/sendmsg/sendmsg01.c
+++ b/testcases/kernel/syscalls/sendmsg/sendmsg01.c
@@ -36,12 +36,12 @@
  * and this test to function correctly.
  */
 #ifndef MSG_CMSG_COMPAT
-# if defined(__powerpc64__) || defined(__mips64) || defined(__x86_64__) || \
+#if defined(__powerpc64__) || defined(__mips64) || defined(__x86_64__) || \
      defined(__sparc64__) || defined(__ia64__) || defined(__s390x__)
-#  define MSG_CMSG_COMPAT 0x80000000
-# else
-#  define MSG_CMSG_COMPAT 0
-# endif
+#define MSG_CMSG_COMPAT 0x80000000
+#else
+#define MSG_CMSG_COMPAT 0
+#endif
 #endif /* MSG_CMSG_COMPAT */
 
 #include <stdio.h>
@@ -111,8 +111,8 @@
 	int tolen;		/* length of "to" buffer */
 	int retval;		/* syscall return value */
 	int experrno;		/* expected errno */
-	void (*setup)(void);
-	void (*cleanup)(void);
+	void (*setup) (void);
+	void (*cleanup) (void);
 	char *desc;
 };
 
@@ -132,7 +132,8 @@
 	 .experrno = EBADF,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "bad file descriptor"},
+	 .desc = "bad file descriptor"}
+	,
 	{.domain = 0,
 	 .type = 0,
 	 .proto = 0,
@@ -148,7 +149,8 @@
 	 .experrno = ENOTSOCK,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "invalid socket"},
+	 .desc = "invalid socket"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -164,7 +166,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid send buffer"},
+	 .desc = "invalid send buffer"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -180,7 +183,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup5,
 	 .cleanup = cleanup1,
-	 .desc = "connected TCP"},
+	 .desc = "connected TCP"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -196,7 +200,8 @@
 	 .experrno = EPIPE,
 	 .setup = setup3,
 	 .cleanup = cleanup1,
-	 .desc = "not connected TCP"},
+	 .desc = "not connected TCP"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -244,7 +249,8 @@
 	 .experrno = EMSGSIZE,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "UDP message too big"},
+	 .desc = "UDP message too big"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -260,7 +266,8 @@
 	 .experrno = EPIPE,
 	 .setup = setup2,
 	 .cleanup = cleanup1,
-	 .desc = "local endpoint shutdown"},
+	 .desc = "local endpoint shutdown"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -276,7 +283,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid iovec pointer"},
+	 .desc = "invalid iovec pointer"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -292,7 +300,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid msghdr pointer"},
+	 .desc = "invalid msghdr pointer"}
+	,
 	{.domain = PF_UNIX,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -308,7 +317,8 @@
 	 .experrno = 0,
 	 .setup = setup4,
 	 .cleanup = cleanup4,
-	 .desc = "rights passing"},
+	 .desc = "rights passing"}
+	,
 	{.domain = PF_UNIX,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -324,7 +334,8 @@
 	 .experrno = EOPNOTSUPP,
 	 .setup = setup4,
 	 .cleanup = cleanup4,
-	 .desc = "invalid flags set w/ control"},
+	 .desc = "invalid flags set w/ control"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -340,7 +351,8 @@
 	 .experrno = EOPNOTSUPP,
 	 .setup = setup7,
 	 .cleanup = cleanup1,
-	 .desc = "invalid flags set"},
+	 .desc = "invalid flags set"}
+	,
 	{.domain = PF_UNIX,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -356,7 +368,8 @@
 	 .experrno = EOPNOTSUPP,
 	 .setup = setup6,
 	 .cleanup = cleanup4,
-	 .desc = "invalid cmsg length"},
+	 .desc = "invalid cmsg length"}
+	,
 	{.domain = PF_UNIX,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -500,7 +513,7 @@
 		return pid;
 	}
 
-	  exit(1);
+	exit(1);
 }
 
 static void do_child(void)
diff --git a/testcases/kernel/syscalls/sendto/sendto01.c b/testcases/kernel/syscalls/sendto/sendto01.c
index 665df03..0c330be 100644
--- a/testcases/kernel/syscalls/sendto/sendto01.c
+++ b/testcases/kernel/syscalls/sendto/sendto01.c
@@ -62,8 +62,8 @@
 	int tolen;		/* length of "to" buffer */
 	int retval;
 	int experrno;
-	void (*setup)(void);
-	void (*cleanup)(void);
+	void (*setup) (void);
+	void (*cleanup) (void);
 	char *desc;
 };
 
@@ -91,7 +91,8 @@
 	 .experrno = EBADF,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "bad file descriptor"},
+	 .desc = "bad file descriptor"}
+	,
 	{.domain = 0,
 	 .type = 0,
 	 .proto = 0,
@@ -104,7 +105,8 @@
 	 .experrno = ENOTSOCK,
 	 .setup = setup0,
 	 .cleanup = cleanup0,
-	 .desc = "invalid socket"},
+	 .desc = "invalid socket"}
+	,
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
 	{.domain = PF_INET,
@@ -119,7 +121,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid send buffer"},
+	 .desc = "invalid send buffer"}
+	,
 #endif
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
@@ -133,7 +136,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "connected TCP"},
+	 .desc = "connected TCP"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -146,7 +150,8 @@
 	 .experrno = EPIPE,
 	 .setup = setup3,
 	 .cleanup = cleanup1,
-	 .desc = "not connected TCP"},
+	 .desc = "not connected TCP"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_DGRAM,
 	 .proto = 0,
@@ -159,7 +164,8 @@
 	 .experrno = EINVAL,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid to buffer length"},
+	 .desc = "invalid to buffer length"}
+	,
 #ifndef UCLINUX
 	/* Skip since uClinux does not implement memory protection */
 	{.domain = PF_INET,
@@ -174,7 +180,8 @@
 	 .experrno = EFAULT,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "invalid to buffer"},
+	 .desc = "invalid to buffer"}
+	,
 #endif
 	{.domain = PF_INET,
 	 .type = SOCK_DGRAM,
@@ -188,7 +195,8 @@
 	 .experrno = EMSGSIZE,
 	 .setup = setup1,
 	 .cleanup = cleanup1,
-	 .desc = "UDP message too big"},
+	 .desc = "UDP message too big"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -201,7 +209,8 @@
 	 .experrno = EPIPE,
 	 .setup = setup2,
 	 .cleanup = cleanup1,
-	 .desc = "local endpoint shutdown"},
+	 .desc = "local endpoint shutdown"}
+	,
 	{.domain = PF_INET,
 	 .type = SOCK_STREAM,
 	 .proto = 0,
@@ -234,29 +243,29 @@
 
 	sfd = socket(PF_INET, SOCK_STREAM, 0);
 	if (sfd < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server socket failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server socket failed");
 		return -1;
 	}
 	if (bind(sfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server bind failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server bind failed");
 		return -1;
 	}
 	if (listen(sfd, 10) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "server listen failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server listen failed");
 		return -1;
 	}
 	switch ((pid = FORK_OR_VFORK())) {
 	case 0:
 #ifdef UCLINUX
 		if (self_exec(argv0, "d", sfd) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			         "server self_exec failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "server self_exec failed");
 #else
 		do_child();
 #endif
 		break;
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "server fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "server fork failed");
 	default:
 		(void)close(sfd);
 		return pid;
@@ -383,10 +392,8 @@
 {
 	if (tdat[testno].experrno == EBADF)
 		s = 400;
-	else
-		if ((s = open("/dev/null", O_WRONLY)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			         "open(/dev/null) failed");
+	else if ((s = open("/dev/null", O_WRONLY)) == -1)
+		tst_brkm(TBROK | TERRNO, cleanup, "open(/dev/null) failed");
 }
 
 static void cleanup0(void)
@@ -398,9 +405,9 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed");
 	if (connect(s, (const struct sockaddr *)&sin1, sizeof(sin1)) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "connect failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "connect failed");
 }
 
 static void cleanup1(void)
@@ -413,7 +420,7 @@
 {
 	setup1();
 	if (shutdown(s, 1) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed connect "
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed connect "
 			 "test %d", testno);
 }
 
@@ -421,7 +428,7 @@
 {
 	s = socket(tdat[testno].domain, tdat[testno].type, tdat[testno].proto);
 	if (s < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "socket setup failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "socket setup failed");
 }
 
 static void setup4(void)
diff --git a/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c b/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
index 27b8a03..497b80c 100644
--- a/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
+++ b/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
@@ -68,7 +68,6 @@
 #include "test.h"
 #include "usctest.h"
 
-
 char *TCID = "set_robust_list01";	/* test program identifier.              */
 int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
diff --git a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
index 582b52f..3410f39 100644
--- a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
+++ b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c
@@ -22,7 +22,7 @@
 #include "set_thread_area.h"
 
 char *TCID = "set_thread_area_01";
-int  TST_TOTAL = 6;
+int TST_TOTAL = 6;
 
 #if defined(HAVE_ASM_LDT_H) && defined(HAVE_STRUCT_USER_DESC)
 
@@ -49,16 +49,16 @@
  * So when we call get_thread_area on u_info1, the entry number is initalized
  * corectly by the previous set_thread_area.
  */
-static struct user_desc u_info1 = {.entry_number = -1};
-static struct user_desc u_info2 = {.entry_number = -2};
+static struct user_desc u_info1 = {.entry_number = -1 };
+static struct user_desc u_info2 = {.entry_number = -2 };
 
 static struct test tests[] = {
-	{__NR_set_thread_area, &u_info1,   0, 0},
-	{__NR_get_thread_area, &u_info1,   0, 0},
-	{__NR_set_thread_area, &u_info2,  -1, EINVAL},
-	{__NR_get_thread_area, &u_info2,  -1, EINVAL},
-	{__NR_set_thread_area, (void*)-9, -1, EFAULT},
-	{__NR_get_thread_area, (void*)-9, -1, EFAULT},
+	{__NR_set_thread_area, &u_info1, 0, 0},
+	{__NR_get_thread_area, &u_info1, 0, 0},
+	{__NR_set_thread_area, &u_info2, -1, EINVAL},
+	{__NR_get_thread_area, &u_info2, -1, EINVAL},
+	{__NR_set_thread_area, (void *)-9, -1, EFAULT},
+	{__NR_get_thread_area, (void *)-9, -1, EFAULT},
 };
 
 static const char *get_name(int syscall)
@@ -66,10 +66,10 @@
 	switch (syscall) {
 	case __NR_set_thread_area:
 		return "set_thread_area()";
-	break;
+		break;
 	case __NR_get_thread_area:
 		return "get_thread_area()";
-	break;
+		break;
 	default:
 		return "invalid syscall";
 	}
@@ -81,7 +81,7 @@
 	char *msg;
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
-		 tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -91,21 +91,23 @@
 
 			if (TEST_RETURN != tests[i].exp_ret) {
 				tst_resm(TFAIL, "%s returned %li expected %i",
-				         get_name(tests[i].syscall),
+					 get_name(tests[i].syscall),
 					 TEST_RETURN, tests[i].exp_ret);
 				continue;
 			}
 
 			if (TEST_ERRNO != tests[i].exp_errno) {
-				tst_resm(TFAIL, "%s failed with %i (%s) expected %i (%s)",
-				         get_name(tests[i].syscall), TEST_ERRNO,
-					 strerror(TEST_ERRNO), tests[i].exp_errno,
+				tst_resm(TFAIL,
+					 "%s failed with %i (%s) expected %i (%s)",
+					 get_name(tests[i].syscall), TEST_ERRNO,
+					 strerror(TEST_ERRNO),
+					 tests[i].exp_errno,
 					 strerror(tests[i].exp_errno));
 				continue;
 			}
 
 			tst_resm(TPASS, "%s returned %li errno %i (%s)",
-			         get_name(tests[i].syscall), TEST_RETURN,
+				 get_name(tests[i].syscall), TEST_RETURN,
 				 TEST_ERRNO, strerror(TEST_ERRNO));
 		}
 	}
@@ -116,7 +118,8 @@
 #else
 int main(void)
 {
-	tst_brkm(TCONF, NULL, "set_thread_area isn't available for this architecture");
+	tst_brkm(TCONF, NULL,
+		 "set_thread_area isn't available for this architecture");
 	tst_exit();
 }
 #endif
diff --git a/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c b/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
index a16084c..6303a56 100644
--- a/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
+++ b/testcases/kernel/syscalls/set_tid_address/set_tid_address01.c
@@ -49,9 +49,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "set_tid_address01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "set_tid_address01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -71,12 +71,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -97,39 +98,44 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
-        int newtid = -1;
+int main(int ac, char **av)
+{
+	int newtid = -1;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
-                     TEST(syscall(__NR_set_tid_address, &newtid));     //call set_tid_address()
-                     if (TEST_RETURN == getpid()) {
-        		tst_resm(TPASS, "set_tid_address call succeeded:  as expected %ld",TEST_RETURN);
-                     }
-                     else {
-                 	   tst_resm(TFAIL, "%s failed - errno = %d : %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
-                           cleanup();
-	  	           tst_exit();
-                     }
-                }
-        }
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
+			TEST(syscall(__NR_set_tid_address, &newtid));	//call set_tid_address()
+			if (TEST_RETURN == getpid()) {
+				tst_resm(TPASS,
+					 "set_tid_address call succeeded:  as expected %ld",
+					 TEST_RETURN);
+			} else {
+				tst_resm(TFAIL, "%s failed - errno = %d : %s",
+					 TCID, TEST_ERRNO,
+					 strerror(TEST_ERRNO));
+				cleanup();
+				tst_exit();
+			}
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/setfsgid/setfsgid02.c b/testcases/kernel/syscalls/setfsgid/setfsgid02.c
index 2d87d8a..0bd790d 100644
--- a/testcases/kernel/syscalls/setfsgid/setfsgid02.c
+++ b/testcases/kernel/syscalls/setfsgid/setfsgid02.c
@@ -108,7 +108,7 @@
 	}
 	cleanup();
 
-	  return EXIT_SUCCESS;
+	return EXIT_SUCCESS;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setfsgid/setfsgid03.c b/testcases/kernel/syscalls/setfsgid/setfsgid03.c
index 2599f86..d0dbf6e 100644
--- a/testcases/kernel/syscalls/setfsgid/setfsgid03.c
+++ b/testcases/kernel/syscalls/setfsgid/setfsgid03.c
@@ -111,7 +111,7 @@
 	}
 	cleanup();
 
-	  return EXIT_SUCCESS;
+	return EXIT_SUCCESS;
 }
 
 /*
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid02.c b/testcases/kernel/syscalls/setfsuid/setfsuid02.c
index 02b1010..7c3b898 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid02.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid02.c
@@ -113,7 +113,7 @@
 	tst_exit();
 	tst_exit();
 
- }
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid03.c b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
index d9eac57..0970609 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid03.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
@@ -116,7 +116,7 @@
 	tst_exit();
 	tst_exit();
 
- }
+}
 
 /*
  * setup() - performs all ONE TIME setup for this test.
diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid04.c b/testcases/kernel/syscalls/setfsuid/setfsuid04.c
index cc36231..1055712 100644
--- a/testcases/kernel/syscalls/setfsuid/setfsuid04.c
+++ b/testcases/kernel/syscalls/setfsuid/setfsuid04.c
@@ -66,6 +66,7 @@
 struct passwd *ltpuser;
 
 int exp_enos[] = { EACCES, 0 };
+
 int fd = -1;
 
 void setup(void);
@@ -93,7 +94,7 @@
 		do_master_child();
 
 	if (waitpid(pid, &status, 0) == -1)
-		tst_resm(TBROK|TERRNO, "waitpid failed");
+		tst_resm(TBROK | TERRNO, "waitpid failed");
 	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
 		tst_resm(TFAIL, "child process terminated abnormally");
 
diff --git a/testcases/kernel/syscalls/setgid/setgid01.c b/testcases/kernel/syscalls/setgid/setgid01.c
index e52d0cb..796259f 100644
--- a/testcases/kernel/syscalls/setgid/setgid01.c
+++ b/testcases/kernel/syscalls/setgid/setgid01.c
@@ -124,6 +124,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 GID_T gid;
 
 int main(int ac, char **av)
diff --git a/testcases/kernel/syscalls/setgid/setgid02.c b/testcases/kernel/syscalls/setgid/setgid02.c
index eea227f..454407b 100644
--- a/testcases/kernel/syscalls/setgid/setgid02.c
+++ b/testcases/kernel/syscalls/setgid/setgid02.c
@@ -72,7 +72,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/setgid/setgid03.c b/testcases/kernel/syscalls/setgid/setgid03.c
index 97dc1bf..517fb9a 100644
--- a/testcases/kernel/syscalls/setgid/setgid03.c
+++ b/testcases/kernel/syscalls/setgid/setgid03.c
@@ -67,7 +67,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/setgroups/setgroups01.c b/testcases/kernel/syscalls/setgroups/setgroups01.c
index 08c4d7e..a3be20f 100644
--- a/testcases/kernel/syscalls/setgroups/setgroups01.c
+++ b/testcases/kernel/syscalls/setgroups/setgroups01.c
@@ -173,8 +173,8 @@
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS,
-					 "setgroups(%d, list) returned %ld", len,
-					 TEST_RETURN);
+					 "setgroups(%d, list) returned %ld",
+					 len, TEST_RETURN);
 			}
 		}
 
diff --git a/testcases/kernel/syscalls/sethostname/sethostname01.c b/testcases/kernel/syscalls/sethostname/sethostname01.c
index 520b0e2..96fd962 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname01.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname01.c
@@ -74,7 +74,6 @@
 
 #define MAX_LENGTH __NEW_UTS_LEN
 
-
 static void setup();
 static void cleanup();
 
diff --git a/testcases/kernel/syscalls/sethostname/sethostname02.c b/testcases/kernel/syscalls/sethostname/sethostname02.c
index c520a89..ba6d0ed 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname02.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname02.c
@@ -86,7 +86,6 @@
 #define LARGE_LENGTH MAX_LENGTH + 1
 #define MAX_LENGTH _UTSNAME_LENGTH - 1
 
-
 static void cleanup(void);
 static void setup(void);
 
diff --git a/testcases/kernel/syscalls/sethostname/sethostname03.c b/testcases/kernel/syscalls/sethostname/sethostname03.c
index bcb1b78..9d3e845 100644
--- a/testcases/kernel/syscalls/sethostname/sethostname03.c
+++ b/testcases/kernel/syscalls/sethostname/sethostname03.c
@@ -84,6 +84,7 @@
 static char ltpthost[] = "ltphost";
 static char hname[MAX_LENGTH];
 static int exp_enos[] = { EPERM, 0 };
+
 static char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
diff --git a/testcases/kernel/syscalls/setpgid/setpgid01.c b/testcases/kernel/syscalls/setpgid/setpgid01.c
index 59787a1..36deea7 100644
--- a/testcases/kernel/syscalls/setpgid/setpgid01.c
+++ b/testcases/kernel/syscalls/setpgid/setpgid01.c
@@ -124,6 +124,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 int exp_enos[] = { 0, 0 };
+
 int pgid, pid;
 
 int main(int ac, char **av)
diff --git a/testcases/kernel/syscalls/setpgid/setpgid03.c b/testcases/kernel/syscalls/setpgid/setpgid03.c
index 33a9681..8dd5a46 100644
--- a/testcases/kernel/syscalls/setpgid/setpgid03.c
+++ b/testcases/kernel/syscalls/setpgid/setpgid03.c
@@ -63,7 +63,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 #ifdef UCLINUX
 	maybe_run_child(&do_child, "");
 #endif
diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c
index f3e6067..6c798ed 100644
--- a/testcases/kernel/syscalls/setregid/setregid01.c
+++ b/testcases/kernel/syscalls/setregid/setregid01.c
@@ -250,12 +250,12 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL|TTERRNO, "setregid failed");
+			tst_resm(TFAIL | TTERRNO, "setregid failed");
 		} else {
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
 				tst_resm(TPASS, "setregid return %ld",
-				    TEST_RETURN);
+					 TEST_RETURN);
 			}
 		}
 
diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
index 2bbb406..9268bea 100644
--- a/testcases/kernel/syscalls/setregid/setregid02.c
+++ b/testcases/kernel/syscalls/setregid/setregid02.c
@@ -72,11 +72,11 @@
 #include "usctest.h"
 #include <errno.h>
 
-
 char *TCID = "setregid02";
 gid_t users_gr_gid, root_gr_gid, bin_gr_gid;
 gid_t neg_one = -1;
 int exp_enos[] = { EPERM, 0 };
+
 gid_t inval_user = (USHRT_MAX);
 char nobody_uid[] = "nobody";
 struct passwd *nobody;
@@ -205,14 +205,14 @@
 	}
 
 	if (setgid(nobody->pw_gid) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL,
-		    "setgid failed to set the effective gid to %d",
-		    nobody->pw_gid);
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "setgid failed to set the effective gid to %d",
+			 nobody->pw_gid);
 	}
 	if (setuid(nobody->pw_uid) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL,
-		    "setuid failed to to set the effective uid to %d",
-		    nobody->pw_uid);
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "setuid failed to to set the effective uid to %d",
+			 nobody->pw_uid);
 	}
 
 	/* set the expected errnos... */
@@ -248,7 +248,7 @@
 	 * print errno log if that option was specified.
 	 */
 	TEST_CLEANUP;
- }
+}
 
 void gid_verify(struct group *rg, struct group *eg, char *when)
 {
diff --git a/testcases/kernel/syscalls/setregid/setregid03.c b/testcases/kernel/syscalls/setregid/setregid03.c
index 4c7bbb3..25dffaa 100644
--- a/testcases/kernel/syscalls/setregid/setregid03.c
+++ b/testcases/kernel/syscalls/setregid/setregid03.c
@@ -71,12 +71,12 @@
 #include "usctest.h"
 #include <sys/wait.h>
 
-
 char *TCID = "setregid03";
 int fail = -1;
 int pass = 0;
 gid_t neg_one = -1;
 int exp_enos[] = { 0 };
+
 gid_t users_gr_gid, root_gr_gid, sys_gr_gid, bin_gr_gid;
 uid_t nobody_pw_uid;
 
@@ -98,18 +98,28 @@
 	struct group *exp_eff_usr;
 	char *test_msg;
 } test_data[] = {
-	{ &sys_gr_gid, &bin_gr_gid, &pass, &sys, &bin, "After setregid(sys, bin)," },
-	{ &neg_one, &sys_gr_gid, &pass, &sys, &sys, "After setregid(-1, sys)" },
-	{ &neg_one, &bin_gr_gid, &pass, &sys, &bin, "After setregid(-1, bin)," },
-	{ &bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1)," },
-	{ &neg_one, &neg_one, &pass, &bin, &bin, "After setregid(-1, -1)," },
-	{ &neg_one, &bin_gr_gid, &pass, &bin, &bin, "After setregid(-1, bin)," },
-	{ &bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1)," },
-	{ &bin_gr_gid, &bin_gr_gid, &pass, &bin, &bin, "After setregid(bin, bin)," },
-	{ &sys_gr_gid, &neg_one, &fail, &bin, &bin, "After setregid(sys, -1)" },
-	{ &neg_one, &sys_gr_gid, &fail, &bin, &bin, "After setregid(-1, sys)"},
-	{ &sys_gr_gid, &sys_gr_gid, &fail, &bin, &bin, "After setregid(sys, sys)"},
-};
+	{
+	&sys_gr_gid, &bin_gr_gid, &pass, &sys, &bin,
+		    "After setregid(sys, bin),"}, {
+	&neg_one, &sys_gr_gid, &pass, &sys, &sys, "After setregid(-1, sys)"},
+	{
+	&neg_one, &bin_gr_gid, &pass, &sys, &bin, "After setregid(-1, bin),"},
+	{
+	&bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1),"},
+	{
+	&neg_one, &neg_one, &pass, &bin, &bin, "After setregid(-1, -1),"}, {
+	&neg_one, &bin_gr_gid, &pass, &bin, &bin, "After setregid(-1, bin),"},
+	{
+	&bin_gr_gid, &neg_one, &pass, &bin, &bin, "After setregid(bin, -1),"},
+	{
+	&bin_gr_gid, &bin_gr_gid, &pass, &bin, &bin,
+		    "After setregid(bin, bin),"}, {
+	&sys_gr_gid, &neg_one, &fail, &bin, &bin, "After setregid(sys, -1)"},
+	{
+	&neg_one, &sys_gr_gid, &fail, &bin, &bin, "After setregid(-1, sys)"},
+	{
+&sys_gr_gid, &sys_gr_gid, &fail, &bin, &bin,
+		    "After setregid(sys, sys)"},};
 
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
 
@@ -137,7 +147,7 @@
 		/* set the appropriate ownership values */
 		if (setregid(sys_gr_gid, bin_gr_gid) == -1) {
 			tst_brkm(TBROK, NULL, "Initial setregid failed");
-		 }
+		}
 
 		if (seteuid(nobody_pw_uid) == -1) {
 			tst_brkm(TBROK, NULL, "Initial seteuid failed");
@@ -159,20 +169,20 @@
 								 "setregid(%d, %d) "
 								 "did not set errno "
 								 "value as expected.",
-								 *test_data[i].
-								 real_gid,
-								 *test_data[i].
-								 eff_gid);
+								 *test_data
+								 [i].real_gid,
+								 *test_data
+								 [i].eff_gid);
 							fail = -1;
 							continue;
 						} else {
 							tst_resm(TPASS,
 								 "setregid(%d, %d) "
 								 "failed as expected.",
-								 *test_data[i].
-								 real_gid,
-								 *test_data[i].
-								 eff_gid);
+								 *test_data
+								 [i].real_gid,
+								 *test_data
+								 [i].eff_gid);
 						}
 					} else {
 						tst_resm(TPASS,
diff --git a/testcases/kernel/syscalls/setregid/setregid04.c b/testcases/kernel/syscalls/setregid/setregid04.c
index a66c1c4..714172c 100644
--- a/testcases/kernel/syscalls/setregid/setregid04.c
+++ b/testcases/kernel/syscalls/setregid/setregid04.c
@@ -69,7 +69,6 @@
 #include "usctest.h"
 #include <errno.h>
 
-
 char *TCID = "setregid04";
 gid_t users_gr_gid, root_gr_gid, daemon_gr_gid, bin_gr_gid;
 gid_t neg_one = -1;
@@ -91,33 +90,24 @@
 	const char *test_msg;
 } test_data[] = {
 	{
-		&root_gr_gid, &root_gr_gid, &root_gr, &root_gr,
-		"After setregid(root, root),"
-	}, {
-		&users_gr_gid, &neg_one, &users_gr, &root_gr,
-		"After setregid(users, -1)"
-	}, {
-		&root_gr_gid, &neg_one, &root_gr, &root_gr,
-		"After setregid(root,-1),"
-	}, {
-		&neg_one, &neg_one, &root_gr, &root_gr,
-		"After setregid(-1, -1),"
-	}, {
-		&neg_one, &root_gr_gid, &root_gr, &root_gr,
-		"After setregid(-1, root)"
-	}, {
-		&root_gr_gid, &neg_one, &root_gr, &root_gr,
-		"After setregid(root, -1),"
-	}, {
-		&daemon_gr_gid, &users_gr_gid, &daemon_gr, &users_gr,
-		"After setregid(daemon, users)"
-	}, {
-		&neg_one, &neg_one, &daemon_gr, &users_gr,
-		"After setregid(-1, -1)"
-	}, {
-		&neg_one, &users_gr_gid, &daemon_gr, &users_gr,
-		"After setregid(-1, users)"
-	}
+	&root_gr_gid, &root_gr_gid, &root_gr, &root_gr,
+		    "After setregid(root, root),"}, {
+	&users_gr_gid, &neg_one, &users_gr, &root_gr,
+		    "After setregid(users, -1)"}, {
+	&root_gr_gid, &neg_one, &root_gr, &root_gr,
+		    "After setregid(root,-1),"}, {
+	&neg_one, &neg_one, &root_gr, &root_gr,
+		    "After setregid(-1, -1),"}, {
+	&neg_one, &root_gr_gid, &root_gr, &root_gr,
+		    "After setregid(-1, root)"}, {
+	&root_gr_gid, &neg_one, &root_gr, &root_gr,
+		    "After setregid(root, -1),"}, {
+	&daemon_gr_gid, &users_gr_gid, &daemon_gr, &users_gr,
+		    "After setregid(daemon, users)"}, {
+	&neg_one, &neg_one, &daemon_gr, &users_gr,
+		    "After setregid(-1, -1)"}, {
+	&neg_one, &users_gr_gid, &daemon_gr, &users_gr,
+		    "After setregid(-1, users)"}
 };
 
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
diff --git a/testcases/kernel/syscalls/setresgid/setresgid01.c b/testcases/kernel/syscalls/setresgid/setresgid01.c
index 503caf9..c573776 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid01.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid01.c
@@ -79,7 +79,6 @@
 
 #define EXP_RET_VAL	0
 
-
 struct test_case_t {		/* test case structure */
 	uid_t *rgid;		/* real GID */
 	uid_t *egid;		/* effective GID */
@@ -120,8 +119,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -200,7 +198,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
 		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
@@ -236,4 +234,4 @@
 
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/setresgid/setresgid02.c b/testcases/kernel/syscalls/setresgid/setresgid02.c
index 4b8595a..062fa4e 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid02.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid02.c
@@ -84,7 +84,6 @@
 
 #define EXP_RET_VAL	0
 
-
 struct test_case_t {		/* test case structure */
 	uid_t *rgid;		/* real GID */
 	uid_t *egid;		/* effective GID */
@@ -127,8 +126,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -208,7 +206,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
 		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
@@ -258,4 +256,4 @@
 
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/setresgid/setresgid03.c b/testcases/kernel/syscalls/setresgid/setresgid03.c
index 3338f81..5e7aaf8 100644
--- a/testcases/kernel/syscalls/setresgid/setresgid03.c
+++ b/testcases/kernel/syscalls/setresgid/setresgid03.c
@@ -86,7 +86,6 @@
 #define EXP_ERRNO	EPERM
 #define TEST_DESC	"unprivileged user"
 
-
 struct test_case_t {		/* test case structure */
 	uid_t *rgid;		/* real GID */
 	uid_t *egid;		/* effective GID */
@@ -120,8 +119,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -206,7 +204,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	if ((passwd_p = getpwnam("root")) == NULL) {
 		tst_brkm(TBROK, NULL, "getpwnam() failed for root");
@@ -263,4 +261,4 @@
 
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/setresuid/setresuid01.c b/testcases/kernel/syscalls/setresuid/setresuid01.c
index b188eff..3a93f08 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid01.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid01.c
@@ -129,7 +129,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -184,17 +184,17 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -227,7 +227,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -235,7 +235,7 @@
 	uid_t cur_ru, cur_eu, cur_su;
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 }
+	}
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid02.c b/testcases/kernel/syscalls/setresuid/setresuid02.c
index 7cc83f2..391312a 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid02.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid02.c
@@ -118,7 +118,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -131,11 +131,11 @@
 		/* set the appropriate ownership values */
 		if (setresuid(nobody_pw_uid, bin_pw_uid, nobody_pw_uid) == -1) {
 			tst_brkm(TFAIL, cleanup, "Initial setresuid failed");
-		 }
+		}
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 } else if (pid == 0) {	/* child */
+		} else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -197,12 +197,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
@@ -237,7 +237,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -246,7 +246,7 @@
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		flag = -1;
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 }
+	}
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid03.c b/testcases/kernel/syscalls/setresuid/setresuid03.c
index 5f18655..6ba1afa 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid03.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid03.c
@@ -129,7 +129,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -143,11 +143,11 @@
 		if (setresuid(root_pw_uid, bin_pw_uid, bin_pw_uid)
 		    == -1) {
 			tst_brkm(TFAIL, cleanup, "Initial setresuid failed");
-		 }
+		}
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 } else if (pid == 0) {	/* child */
+		} else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -210,18 +210,18 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 }
+	}
 
 	root = *(getpwnam("root"));
 	root_pw_uid = root.pw_uid;
@@ -253,7 +253,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void
 uid_verify(struct passwd *ru, struct passwd *eu, struct passwd *su, char *when)
@@ -262,7 +262,7 @@
 	if (getresuid(&cur_ru, &cur_eu, &cur_su) != 0) {
 		flag = -1;
 		tst_brkm(TBROK, cleanup, "Set getresuid() failed");
-	 }
+	}
 	if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su !=
 								 su->pw_uid)) {
 		tst_resm(TFAIL, "ERROR: %s real uid = %d; effective uid = %d; "
diff --git a/testcases/kernel/syscalls/setresuid/setresuid04.c b/testcases/kernel/syscalls/setresuid/setresuid04.c
index f5e6c57..2aa62e4 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid04.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid04.c
@@ -61,6 +61,7 @@
 struct passwd *ltpuser;
 
 int exp_enos[] = { EACCES, 0 };
+
 int fd = -1;
 
 void setup(void);
@@ -87,7 +88,7 @@
 		do_master_child();
 
 	if (waitpid(pid, &status, 0) == -1)
-		tst_resm(TBROK|TERRNO, "waitpid failed");
+		tst_resm(TBROK | TERRNO, "waitpid failed");
 	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
 		tst_resm(TFAIL, "child process terminated abnormally");
 
@@ -163,7 +164,7 @@
 			}
 		} else {
 			/* Wait for son completion */
-			if(waitpid(pid, &status, 0) == -1) {
+			if (waitpid(pid, &status, 0) == -1) {
 				perror("waitpid failed");
 				exit(1);
 			}
diff --git a/testcases/kernel/syscalls/setreuid/setreuid02.c b/testcases/kernel/syscalls/setreuid/setreuid02.c
index a352e37..23e8795 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid02.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid02.c
@@ -69,7 +69,6 @@
 #include "usctest.h"
 #include <errno.h>
 
-
 char *TCID = "setreuid02";
 uid_t nobody_pw_uid, root_pw_uid, daemon_pw_uid, bin_pw_uid;
 uid_t neg_one = -1;
@@ -114,7 +113,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -166,12 +165,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("daemon") == NULL) {
 		tst_brkm(TBROK, NULL, "daemon must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* Check that the test process id is root  */
 	if (geteuid() != 0) {
@@ -213,7 +212,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid03.c b/testcases/kernel/syscalls/setreuid/setreuid03.c
index f52e93c..06ba059 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid03.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid03.c
@@ -140,7 +140,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -216,12 +216,12 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("bin") == NULL) {
 		tst_brkm(TBROK, NULL, "bin must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -261,7 +261,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid04.c b/testcases/kernel/syscalls/setreuid/setreuid04.c
index 5ab90e7..f636cc5 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid04.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid04.c
@@ -111,7 +111,7 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -123,7 +123,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 } else if (pid == 0) {	/* child */
+		} else if (pid == 0) {	/* child */
 
 			for (i = 0; i < TST_TOTAL; i++) {
 
@@ -182,7 +182,7 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	/* Check that the test process id is root */
 	if (geteuid() != 0) {
@@ -217,7 +217,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid05.c b/testcases/kernel/syscalls/setreuid/setreuid05.c
index 540a7d3..523b79a 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid05.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid05.c
@@ -135,11 +135,10 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -151,7 +150,7 @@
 
 		if ((pid = FORK_OR_VFORK()) == -1) {
 			tst_brkm(TBROK, cleanup, "fork failed");
-		 } else if (pid == 0) {	/* child */
+		} else if (pid == 0) {	/* child */
 			for (i = 0; i < TST_TOTAL; i++) {
 				/* Set the real or effective user id */
 				TEST(setreuid(*test_data[i].real_uid,
@@ -164,10 +163,10 @@
 								 "setreuid(%d, %d) "
 								 "did not set errno "
 								 "value as expected.",
-								 *test_data[i].
-								 real_uid,
-								 *test_data[i].
-								 eff_uid);
+								 *test_data
+								 [i].real_uid,
+								 *test_data
+								 [i].eff_uid);
 							flag = -1;
 							continue;
 						}
@@ -230,17 +229,17 @@
 	if (getpwnam("nobody") == NULL) {
 		tst_brkm(TBROK, NULL, "nobody must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getpwnam("daemon") == NULL) {
 		tst_brkm(TBROK, NULL, "daemon must be a valid user.");
 		tst_exit();
-	 }
+	}
 
 	if (getuid() != 0) {
 		tst_resm(TBROK, "Must be run as root");
 		tst_exit();
-	 }
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -276,7 +275,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void uid_verify(struct passwd *ru, struct passwd *eu, char *when)
 {
diff --git a/testcases/kernel/syscalls/setreuid/setreuid06.c b/testcases/kernel/syscalls/setreuid/setreuid06.c
index 23d9bcf..31c8502 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid06.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid06.c
@@ -71,10 +71,9 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/*
 	 * perform global setup for the test
diff --git a/testcases/kernel/syscalls/setreuid/setreuid07.c b/testcases/kernel/syscalls/setreuid/setreuid07.c
index b55660b..df7f6ae 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid07.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid07.c
@@ -60,6 +60,7 @@
 struct passwd *ltpuser;
 
 int exp_enos[] = { EACCES, 0 };
+
 int fd = -1;
 
 void setup(void);
@@ -86,7 +87,7 @@
 		do_master_child();
 
 	if (waitpid(pid, &status, 0) == -1)
-		tst_resm(TBROK|TERRNO, "waitpid failed");
+		tst_resm(TBROK | TERRNO, "waitpid failed");
 	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
 		tst_resm(TFAIL, "child process terminated abnormally");
 
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit01.c b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
index 9525862..ff35e7e 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit01.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit01.c
@@ -80,7 +80,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* set "tstdir", and "fname" vars */
 
@@ -169,7 +169,7 @@
 	}
 
 	if (pid == 0) {
-		close(pipefd[0]); /* close unused read end */
+		close(pipefd[0]);	/* close unused read end */
 		rlim.rlim_cur = 10;
 		rlim.rlim_max = 10;
 		if ((setrlimit(RLIMIT_FSIZE, &rlim)) == -1) {
@@ -182,10 +182,10 @@
 
 		if ((bytes = write(fd, buf, 26)) != 10) {
 			if (write(pipefd[1], &bytes, sizeof(bytes))
-				< sizeof(bytes)) {
+			    < sizeof(bytes)) {
 				perror("child: write to pipe failed");
 			}
-			close(pipefd[1]); /* EOF */
+			close(pipefd[1]);	/* EOF */
 			exit(3);
 		}
 		exit(0);	/* success */
@@ -207,7 +207,7 @@
 		tst_resm(TFAIL, "creating testfile failed");
 		break;
 	case 3:
-		close(pipefd[1]); /* close unused write end */
+		close(pipefd[1]);	/* close unused write end */
 		if (read(pipefd[0], &bytes, sizeof(bytes)) < sizeof(bytes)) {
 			tst_resm(TFAIL, "parent: reading pipe failed");
 		}
@@ -286,7 +286,7 @@
 	TEST(setrlimit(RLIMIT_CORE, &rlim));
 
 	if (TEST_RETURN == -1) {
-		tst_resm(TFAIL|TERRNO, "setrlimit failed to set RLIMIT_CORE");
+		tst_resm(TFAIL | TERRNO, "setrlimit failed to set RLIMIT_CORE");
 		return;
 	}
 
@@ -310,7 +310,7 @@
 		tst_resm(TFAIL, "core dump dumped unexpectedly");
 		return;
 	} else if (errno != ENOENT) {
-		tst_resm(TFAIL|TERRNO, "access failed unexpectedly");
+		tst_resm(TFAIL | TERRNO, "access failed unexpectedly");
 		return;
 	}
 
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit02.c b/testcases/kernel/syscalls/setrlimit/setrlimit02.c
index 1ecbb2b..9cd6ef5 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit02.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit02.c
@@ -87,7 +87,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
index aca0663..ebfbaac 100644
--- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
+++ b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
@@ -53,7 +53,7 @@
 
 #if !defined(NR_OPEN)
 //Taken from definition in /usr/include/linux/fs.h
-# define NR_OPEN (1024*1024)
+#define NR_OPEN (1024*1024)
 #endif
 
 void setup();
@@ -69,7 +69,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt01.c b/testcases/kernel/syscalls/setsockopt/setsockopt01.c
index fcbfadf..04d1298 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt01.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt01.c
@@ -130,7 +130,6 @@
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);	/* Total number of test cases. */
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
@@ -141,7 +140,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 }
+	}
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday01.c b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
index 43df84a..6b3c806 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday01.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
@@ -83,11 +83,10 @@
 	char *msg;
 	suseconds_t delta;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -168,7 +167,7 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 }
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -182,7 +181,7 @@
 	if ((gettimeofday(&tp, (struct timezone *)&tp1)) == -1) {
 		tst_brkm(TBROK, cleanup, "gettimeofday failed. "
 			 "errno=%d", errno);
-	 }
+	}
 	save_tv_sec = tp.tv_sec;
 	save_tv_usec = tp.tv_usec;
 }
@@ -208,4 +207,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday02.c b/testcases/kernel/syscalls/settimeofday/settimeofday02.c
index 8e42a49..1e61afb 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday02.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday02.c
@@ -69,13 +69,13 @@
 char *TCID = "settimeofday02";
 int TST_TOTAL = 1;
 int exp_enos[] = { EFAULT, EPERM, 0 };
+
 struct timeval tp;
 time_t save_tv_sec, save_tv_usec;
 
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
-
 void setup(void);
 void cleanup(void);
 void restore_time(void);
@@ -87,8 +87,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -156,7 +155,7 @@
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
 		tst_exit();
-	 }
+	}
 
 	/* Switch to nobody user for correct error code collection */
 	ltpuser = getpwnam(nobody_uid);
@@ -178,7 +177,7 @@
 	if ((gettimeofday(&tp, (struct timezone *)&tp)) == -1) {
 		tst_brkm(TBROK, cleanup, "gettimeofday failed. "
 			 "errno=%d", errno);
-	 }
+	}
 	save_tv_sec = tp.tv_sec;
 	save_tv_usec = tp.tv_usec;
 }
@@ -196,7 +195,7 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
 
 void restore_time(void)
 {
diff --git a/testcases/kernel/syscalls/setuid/setuid03.c b/testcases/kernel/syscalls/setuid/setuid03.c
index 2b93c05..bba6e98 100644
--- a/testcases/kernel/syscalls/setuid/setuid03.c
+++ b/testcases/kernel/syscalls/setuid/setuid03.c
@@ -66,7 +66,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/*
 	 * perform global setup for the test
diff --git a/testcases/kernel/syscalls/setuid/setuid04.c b/testcases/kernel/syscalls/setuid/setuid04.c
index bafa0fc..ac6c231 100644
--- a/testcases/kernel/syscalls/setuid/setuid04.c
+++ b/testcases/kernel/syscalls/setuid/setuid04.c
@@ -62,6 +62,7 @@
 struct passwd *ltpuser;
 
 int exp_enos[] = { EACCES, 0 };
+
 int fd = -1;
 
 void setup(void);
@@ -76,7 +77,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/*
 	 * perform global setup for the test
diff --git a/testcases/kernel/syscalls/setxattr/setxattr01.c b/testcases/kernel/syscalls/setxattr/setxattr01.c
index 425fcf3..a241e72 100644
--- a/testcases/kernel/syscalls/setxattr/setxattr01.c
+++ b/testcases/kernel/syscalls/setxattr/setxattr01.c
@@ -86,62 +86,62 @@
 	int exp_err;
 };
 struct test_case tc[] = {
-	{	/* case 00, invalid flags */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = ~0,
-		.exp_err = EINVAL,
-	},
-	{	/* case 01, replace non-existing attribute */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_REPLACE,
-		.exp_err = ENOATTR,
-	},
-	{	/* case 02, long key name, key will be set in setup() */
-		.fname = filename,
-		.key = NULL,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = ERANGE,
-	},
-	{	/* case 03, long value, value will be set in setup() */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = NULL,
-		.size = XATTR_SIZE_MAX + 1,
-		.flags = XATTR_CREATE,
-		.exp_err = E2BIG,
-	},
-	{	/* case 04, zero length value */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = 0,
-		.flags = XATTR_CREATE,
-		.exp_err = 0,
-	},
-	{	/* case 05, create existing attribute */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EEXIST,
-	},
-	{	/* case 06, replace existing attribute */
-		.fname = filename,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_REPLACE,
-		.exp_err = 0,
-	},
+	{			/* case 00, invalid flags */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = ~0,
+	 .exp_err = EINVAL,
+	 },
+	{			/* case 01, replace non-existing attribute */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_REPLACE,
+	 .exp_err = ENOATTR,
+	 },
+	{			/* case 02, long key name, key will be set in setup() */
+	 .fname = filename,
+	 .key = NULL,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = ERANGE,
+	 },
+	{			/* case 03, long value, value will be set in setup() */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = NULL,
+	 .size = XATTR_SIZE_MAX + 1,
+	 .flags = XATTR_CREATE,
+	 .exp_err = E2BIG,
+	 },
+	{			/* case 04, zero length value */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = 0,
+	 .flags = XATTR_CREATE,
+	 .exp_err = 0,
+	 },
+	{			/* case 05, create existing attribute */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EEXIST,
+	 },
+	{			/* case 06, replace existing attribute */
+	 .fname = filename,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_REPLACE,
+	 .exp_err = 0,
+	 },
 };
 
 int TST_TOTAL = sizeof(tc) / sizeof(tc[0]);
@@ -161,15 +161,16 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		for (i = 0; i < TST_TOTAL; i++)	{
+		for (i = 0; i < TST_TOTAL; i++) {
 			TEST(setxattr(tc[i].fname, tc[i].key, tc[i].value,
-			    tc[i].size, tc[i].flags));
+				      tc[i].size, tc[i].flags));
 
 			if (TEST_ERRNO == tc[i].exp_err) {
 				tst_resm(TPASS | TTERRNO, "expected behavior");
 			} else {
 				tst_resm(TFAIL | TTERRNO, "unexpected behavior "
-				    "- expected errno %d - Got", tc[i].exp_err);
+					 "- expected errno %d - Got",
+					 tc[i].exp_err);
 			}
 		}
 	}
@@ -194,14 +195,14 @@
 	if (setxattr("testfile", "user.test", "test", 4, XATTR_CREATE) == -1)
 		if (errno == ENOTSUP)
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "mount without user_xattr option");
+				 "mount without user_xattr option");
 
 	/* Create test file */
 	snprintf(filename, BUFSIZ, "setxattr01testfile");
 	fd = creat(filename, 0644);
 	if (fd == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test file(%s) failed",
-		    filename);
+			 filename);
 	close(fd);
 
 	/* Prepare test cases */
diff --git a/testcases/kernel/syscalls/setxattr/setxattr02.c b/testcases/kernel/syscalls/setxattr/setxattr02.c
index 465796c..912d751 100644
--- a/testcases/kernel/syscalls/setxattr/setxattr02.c
+++ b/testcases/kernel/syscalls/setxattr/setxattr02.c
@@ -86,62 +86,62 @@
 	int exp_err;
 };
 static struct test_case tc[] = {
-	{	/* case 00, set attr to reg */
-		.fname = FILENAME,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = 0,
-	},
-	{	/* case 01, set attr to dir */
-		.fname = DIRNAME,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = 0,
-	},
-	{	/* case 02, set attr to symlink */
-		.fname = SYMLINK,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EEXIST,
-	},
-	{	/* case 03, set attr to fifo */
-		.fname = FIFO,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
-	{	/* case 04, set attr to character special */
-		.fname = CHR,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
-	{	/* case 05, set attr to block special */
-		.fname = BLK,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
-	{	/* case 06, set attr to socket */
-		.fname = SOCK,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
+	{			/* case 00, set attr to reg */
+	 .fname = FILENAME,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = 0,
+	 },
+	{			/* case 01, set attr to dir */
+	 .fname = DIRNAME,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = 0,
+	 },
+	{			/* case 02, set attr to symlink */
+	 .fname = SYMLINK,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EEXIST,
+	 },
+	{			/* case 03, set attr to fifo */
+	 .fname = FIFO,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
+	{			/* case 04, set attr to character special */
+	 .fname = CHR,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
+	{			/* case 05, set attr to block special */
+	 .fname = BLK,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
+	{			/* case 06, set attr to socket */
+	 .fname = SOCK,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
 };
 
 int TST_TOTAL = sizeof(tc) / sizeof(tc[0]);
@@ -161,15 +161,16 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		for (i = 0; i < TST_TOTAL; i++)	{
+		for (i = 0; i < TST_TOTAL; i++) {
 			TEST(setxattr(tc[i].fname, tc[i].key, tc[i].value,
-			    tc[i].size, tc[i].flags));
+				      tc[i].size, tc[i].flags));
 
 			if (TEST_ERRNO == tc[i].exp_err) {
 				tst_resm(TPASS | TTERRNO, "expected behavior");
 			} else {
 				tst_resm(TFAIL | TTERRNO, "unexpected behavior "
-				    "- expected errno %d - Got", tc[i].exp_err);
+					 "- expected errno %d - Got",
+					 tc[i].exp_err);
 			}
 		}
 	}
@@ -194,39 +195,39 @@
 	if (setxattr("testfile", "user.test", "test", 4, XATTR_CREATE) == -1)
 		if (errno == ENOTSUP)
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "mount without user_xattr option");
+				 "mount without user_xattr option");
 	unlink("testfile");
 
 	/* Create test files */
 	fd = creat(FILENAME, 0644);
 	if (fd == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test file(%s) failed",
-		    FILENAME);
+			 FILENAME);
 	close(fd);
 
 	if (mkdir(DIRNAME, 0644) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test dir(%s) failed",
-		    DIRNAME);
+			 DIRNAME);
 
 	if (symlink(FILENAME, SYMLINK) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create symlink(%s->%s)"
-		    " failed", SYMLINK, FILENAME);
+			 " failed", SYMLINK, FILENAME);
 
 	if (mknod(FIFO, S_IFIFO | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create FIFO(%s) failed",
-		    FIFO);
+			 FIFO);
 
 	if (mknod(CHR, S_IFCHR | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create char special(%s)"
-		    " failed", CHR);
+			 " failed", CHR);
 
 	if (mknod(BLK, S_IFBLK | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create block special(%s)"
-		    " failed", BLK);
+			 " failed", BLK);
 
 	if (mknod(SOCK, S_IFSOCK | 0777, 0) == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create socket(%s) failed",
-		    SOCK);
+			 SOCK);
 
 	TEST_PAUSE;
 }
diff --git a/testcases/kernel/syscalls/setxattr/setxattr03.c b/testcases/kernel/syscalls/setxattr/setxattr03.c
index 47a82b0..01d32b0 100644
--- a/testcases/kernel/syscalls/setxattr/setxattr03.c
+++ b/testcases/kernel/syscalls/setxattr/setxattr03.c
@@ -77,24 +77,24 @@
 	int exp_err;
 };
 static struct test_case tc[] = {
-	{	/* case 00, set attr to immutable file */
-		.desc = "Set attr to immutable file",
-		.fname = IMMU_FILE,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
-	{	/* case 01, set attr to append-only file */
-		.desc = "Set attr to append-only file",
-		.fname = APPEND_FILE,
-		.key = XATTR_TEST_KEY,
-		.value = XATTR_TEST_VALUE,
-		.size = XATTR_TEST_VALUE_SIZE,
-		.flags = XATTR_CREATE,
-		.exp_err = EPERM,
-	},
+	{			/* case 00, set attr to immutable file */
+	 .desc = "Set attr to immutable file",
+	 .fname = IMMU_FILE,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
+	{			/* case 01, set attr to append-only file */
+	 .desc = "Set attr to append-only file",
+	 .fname = APPEND_FILE,
+	 .key = XATTR_TEST_KEY,
+	 .value = XATTR_TEST_VALUE,
+	 .size = XATTR_TEST_VALUE_SIZE,
+	 .flags = XATTR_CREATE,
+	 .exp_err = EPERM,
+	 },
 };
 
 static void setup(void);
@@ -120,15 +120,16 @@
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		Tst_count = 0;
 
-		for (i = 0; i < TST_TOTAL; i++)	{
+		for (i = 0; i < TST_TOTAL; i++) {
 			TEST(setxattr(tc[i].fname, tc[i].key, tc[i].value,
-			    tc[i].size, tc[i].flags));
+				      tc[i].size, tc[i].flags));
 
 			if (TEST_ERRNO == tc[i].exp_err) {
 				tst_resm(TPASS | TTERRNO, "%s", tc[i].desc);
 			} else {
 				tst_resm(TFAIL | TTERRNO, "%s - expected errno"
-				    " %d - Got", tc[i].desc, tc[i].exp_err);
+					 " %d - Got", tc[i].desc,
+					 tc[i].exp_err);
 			}
 		}
 	}
@@ -177,25 +178,25 @@
 	if (setxattr("testfile", "user.test", "test", 4, XATTR_CREATE) == -1)
 		if (errno == ENOTSUP)
 			tst_brkm(TCONF, cleanup, "No xattr support in fs or "
-			    "fs mounted without user_xattr option");
+				 "fs mounted without user_xattr option");
 	unlink("testfile");
 
 	/* Create test files and set file immutable or append-only */
 	immu_fd = creat(IMMU_FILE, 0644);
 	if (immu_fd == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test file(%s) failed",
-		    IMMU_FILE);
+			 IMMU_FILE);
 	if (set_immutable_on(immu_fd))
 		tst_brkm(TBROK | TERRNO, cleanup, "Set %s immutable failed",
-		    IMMU_FILE);
+			 IMMU_FILE);
 
 	append_fd = creat(APPEND_FILE, 0644);
 	if (append_fd == -1)
 		tst_brkm(TBROK | TERRNO, cleanup, "Create test file(%s) failed",
-		    APPEND_FILE);
+			 APPEND_FILE);
 	if (set_append_on(append_fd))
 		tst_brkm(TBROK | TERRNO, cleanup, "Set %s append-only failed",
-		    APPEND_FILE);
+			 APPEND_FILE);
 
 	TEST_PAUSE;
 }
@@ -204,10 +205,10 @@
 {
 	if ((immu_fd > 0) && set_immutable_off(immu_fd))
 		tst_resm(TWARN | TERRNO, "Unset %s immutable failed",
-		    IMMU_FILE);
+			 IMMU_FILE);
 	if ((append_fd > 0) && set_append_off(append_fd))
 		tst_resm(TWARN | TERRNO, "Unset %s append-only failed",
-		    APPEND_FILE);
+			 APPEND_FILE);
 	close(immu_fd);
 	close(append_fd);
 
@@ -218,6 +219,6 @@
 int main(void)
 {
 	tst_brkm(TCONF, NULL, "<attr/xattr.h> not present or FS_IOC_FLAGS "
-	                      "missing in <linux/fs.h>");
+		 "missing in <linux/fs.h>");
 }
 #endif /* defined HAVE_ATTR_XATTR_H && defined HAVE_FS_IOC_FLAGS */
diff --git a/testcases/kernel/syscalls/sgetmask/sgetmask01.c b/testcases/kernel/syscalls/sgetmask/sgetmask01.c
index 9ddd205..af9e42a 100644
--- a/testcases/kernel/syscalls/sgetmask/sgetmask01.c
+++ b/testcases/kernel/syscalls/sgetmask/sgetmask01.c
@@ -60,9 +60,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "sgetmask01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 2;                   /* total number of tests in this file.   */
+char *TCID = "sgetmask01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -82,12 +82,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -108,44 +109,50 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
-        int sig;
+int main(int ac, char **av)
+{
+	int sig;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
 			for (sig = -3; sig <= SIGRTMAX + 1; sig++) {
-				TEST(syscall(__NR_ssetmask,sig));
-                		tst_resm(TINFO,"Setting signal : %d -- return of setmask : %ld",sig,TEST_RETURN);     //call sgetmask()
-                     		TEST(syscall(__NR_sgetmask));     //call sgetmask()
-                     		if (TEST_RETURN != sig) {
-        				tst_resm(TINFO,"Oops,setting sig %d, got %ld",sig,TEST_RETURN);
-                     		} else
-        				tst_resm(TPASS,"OK,setting sig %d, got %ld",sig,TEST_RETURN);
-                     		if (sig == SIGRTMAX + 1) {
+				TEST(syscall(__NR_ssetmask, sig));
+				tst_resm(TINFO, "Setting signal : %d -- return of setmask : %ld", sig, TEST_RETURN);	//call sgetmask()
+				TEST(syscall(__NR_sgetmask));	//call sgetmask()
+				if (TEST_RETURN != sig) {
+					tst_resm(TINFO,
+						 "Oops,setting sig %d, got %ld",
+						 sig, TEST_RETURN);
+				} else
+					tst_resm(TPASS,
+						 "OK,setting sig %d, got %ld",
+						 sig, TEST_RETURN);
+				if (sig == SIGRTMAX + 1) {
 					cleanup();
 					tst_exit();
 				}
-                	}
+			}
 		}
-        }
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/sigaction/sigaction01.c b/testcases/kernel/syscalls/sigaction/sigaction01.c
index fae7540..08f4e67 100644
--- a/testcases/kernel/syscalls/sigaction/sigaction01.c
+++ b/testcases/kernel/syscalls/sigaction/sigaction01.c
@@ -230,6 +230,7 @@
 	TEST_CLEANUP;
 
 }
+
 int main(int ac, char **av)
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
index 500f6bd..a5b6b65 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
@@ -81,6 +81,7 @@
 char *TCID = "sigaltstack01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 void *addr, *main_stk;		/* address of main stack for signal */
 int got_signal = 0;
 pid_t my_pid;			/* test process id */
@@ -103,7 +104,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -209,7 +210,7 @@
 	if ((sigaction(SIGUSR1, &act, &oact)) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() fails in setup, errno=%d", errno);
-	 }
+	}
 
 	/* Send the signal to the test process */
 	kill(my_pid, SIGUSR1);
@@ -224,7 +225,7 @@
 	if ((sigstk.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
 		tst_brkm(TFAIL, cleanup,
 			 "could not allocate memory for the alternate stack");
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
index 6aa902f..17b60b1 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
@@ -122,7 +122,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
-	 }
+	}
 
 	setup();
 
@@ -159,8 +159,8 @@
 							 "fails, %s, errno:%d, "
 							 "expected errno:%d",
 							 test_desc, TEST_ERRNO,
-							 Test_cases[ind].
-							 exp_errno);
+							 Test_cases
+							 [ind].exp_errno);
 					}
 				} else {
 					tst_resm(TPASS, "Call returned -1 as "
@@ -196,7 +196,7 @@
 	if ((sigstk.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
 		tst_brkm(TFAIL, cleanup,
 			 "could not allocate memory for the alternate stack");
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
index bf6e35a..03c6bfa 100644
--- a/testcases/kernel/syscalls/sighold/sighold02.c
+++ b/testcases/kernel/syscalls/sighold/sighold02.c
@@ -192,7 +192,7 @@
 		 * fork off a child process
 		 */
 		if ((pid = FORK_OR_VFORK()) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() failed");
 
 		} else if (pid > 0) {
 
@@ -253,7 +253,9 @@
 #endif
 				    ) {
 					if (kill(pid, sig) < 0) {
-						tst_brkm(TBROK|TERRNO, NULL, "kill(%d, %d) failed", pid, sig);
+						tst_brkm(TBROK | TERRNO, NULL,
+							 "kill(%d, %d) failed",
+							 pid, sig);
 						getout();
 					}
 				}
@@ -299,7 +301,8 @@
 #ifdef UCLINUX
 			if (self_exec(av[0], "dd", CHILDSWRITEFD, CHILDSREADFD)
 			    < 0) {
-				tst_brkm(TBROK|TERRNO, cleanup, "self_exec() failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "self_exec() failed");
 			}
 #else
 			do_child();
@@ -461,7 +464,7 @@
 #endif
 	if (write(fd, (char *)&p_p, sizeof(struct pipe_packet)) < 0) {
 		if (pid)
-			tst_brkm(TBROK|TERRNO, getout, "write() pipe failed");
+			tst_brkm(TBROK | TERRNO, getout, "write() pipe failed");
 		return -1;
 	}
 #ifdef debug
@@ -585,7 +588,7 @@
 static void getout()
 {
 	if (kill(pid, SIGKILL) < 0)
-		tst_resm(TWARN|TERRNO, "kill(%d) failed", pid);
+		tst_resm(TWARN | TERRNO, "kill(%d) failed", pid);
 	cleanup();
 }
 
@@ -599,11 +602,11 @@
 
 	/* set up pipe for child sending to parent communications */
 	if (pipe(Fds1) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe() failed");
 
 	/* set up pipe for parent sending to child communications */
 	if (pipe(Fds2) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "pipe() failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "pipe() failed");
 
 #if debug
 	printf("child 2 parent Fds1[0] = %d, Fds1[1] = %d\n", Fds1[0], Fds1[1]);
diff --git a/testcases/kernel/syscalls/signal/signal01.c b/testcases/kernel/syscalls/signal/signal01.c
index 5338dfc..18abc22 100644
--- a/testcases/kernel/syscalls/signal/signal01.c
+++ b/testcases/kernel/syscalls/signal/signal01.c
@@ -180,7 +180,7 @@
 void catchsig();
 
 #if defined(linux)
-# define SIG_PF sig_t		/* This might need to be sighandler_t on some systems */
+#define SIG_PF sig_t		/* This might need to be sighandler_t on some systems */
 #endif
 
 #define SIG_CAUGHT	1
@@ -239,8 +239,7 @@
     /***************************************************************
     * parse standard options
     ***************************************************************/
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 		tst_exit();
 	}
@@ -302,7 +301,7 @@
 	 * Create a pipe of ipc
 	 */
 	if (pipe(fd1) == -1) {
-		tst_resm(TBROK|TERRNO, "pipe() failed");
+		tst_resm(TBROK | TERRNO, "pipe() failed");
 		return;
 	}
 
@@ -312,7 +311,8 @@
 	 */
 
 	if (fcntl(fd1[0], F_SETFL, O_NONBLOCK) == -1) {
-		tst_resm(TBROK|TERRNO, "fcntl(fd1[0], F_SETFL, O_NONBLOCK) failed");
+		tst_resm(TBROK | TERRNO,
+			 "fcntl(fd1[0], F_SETFL, O_NONBLOCK) failed");
 		close(fd1[0]);
 		close(fd1[1]);
 		return;
@@ -342,7 +342,8 @@
 			}
 
 			if (rd_sz == 0) {	/* if EOF encountered */
-				tst_resm(TBROK, "child's pipe is closed before 'go' message received");
+				tst_resm(TBROK,
+					 "child's pipe is closed before 'go' message received");
 				close(fd1[0]);
 				return;
 			}
@@ -379,7 +380,7 @@
 		 * Send the signal SIGKILL to the child.
 		 */
 		if (kill(Pid, SIGKILL) == -1) {
-			tst_resm(TBROK|TERRNO, "kill(%d) failed", Pid);
+			tst_resm(TBROK | TERRNO, "kill(%d) failed", Pid);
 			close(fd1[0]);
 			return;
 		}
@@ -391,7 +392,7 @@
 			/*
 			 * The wait system call failed.
 			 */
-			tst_resm(TBROK|TERRNO, "wait() failed");
+			tst_resm(TBROK | TERRNO, "wait() failed");
 			close(fd1[0]);
 			return;
 		} else if (STD_FUNCTIONAL_TEST) {
@@ -403,18 +404,21 @@
 				tst_resm(TPASS,
 					 "The child was killed by SIGKILL.");
 			} else if ((term_stat >> 8) == TIMED_OUT) {
-				tst_resm(TBROK, "child exited with a timed out exit status");
+				tst_resm(TBROK,
+					 "child exited with a timed out exit status");
 			} else {
 				if ((term_stat >> 8) == SIG_IGNORED
 				    && test_case == IGNORE_TEST) {
-					tst_resm(TFAIL, "SIGKILL was ignored by child after sent by parent.");
+					tst_resm(TFAIL,
+						 "SIGKILL was ignored by child after sent by parent.");
 				} else if ((term_stat >> 8) == SIG_CAUGHT
 					   && test_case == CATCH_TEST) {
-					tst_resm(TFAIL, "SIGKILL was caught by child after sent by parent.");
+					tst_resm(TFAIL,
+						 "SIGKILL was caught by child after sent by parent.");
 				} else {
 					tst_resm(TFAIL,
-						"Child's termination status is unexpected. Status: %d (%#o).",
-						term_stat, term_stat);
+						 "Child's termination status is unexpected. Status: %d (%#o).",
+						 term_stat, term_stat);
 				}
 			}
 		} else {
@@ -422,15 +426,14 @@
 		}
 		close(fd1[0]);
 
-	}
-	else if (Pid == 0) {
+	} else if (Pid == 0) {
 		/*
 		 * This is the child.
 		 * Set up to ignore/catch SIGKILL and check the return values.
 		 */
 #ifdef UCLINUX
 		if (self_exec(argv0, "dd", test_case, fd1[1]) < 0) {
-			tst_resm(TBROK|TERRNO, "self_exec() failed");
+			tst_resm(TBROK | TERRNO, "self_exec() failed");
 			close(fd1[0]);
 			close(fd1[1]);
 			return;
@@ -439,9 +442,8 @@
 		do_child(test_case);
 #endif
 
-	}
-	else {
-		tst_resm(TBROK|TERRNO, "fork() failed");
+	} else {
+		tst_resm(TBROK | TERRNO, "fork() failed");
 		close(fd1[0]);
 		close(fd1[1]);
 		return;
@@ -545,20 +547,20 @@
 	if (Tret == SIG_ERR) {
 		if (STD_FUNCTIONAL_TEST) {
 			if (TEST_ERRNO != EINVAL) {
-				tst_resm(TFAIL|TTERRNO,
-					"signal(SIGKILL,SIG_DFL) expected ret:-1, errno:EINVAL, got ret:%p",
-					Tret);
+				tst_resm(TFAIL | TTERRNO,
+					 "signal(SIGKILL,SIG_DFL) expected ret:-1, errno:EINVAL, got ret:%p",
+					 Tret);
 			} else {
 				tst_resm(TPASS,
-					"signal(SIGKILL,SIG_DFL) ret:%p, errno EINVAL as expected",
-					Tret);
+					 "signal(SIGKILL,SIG_DFL) ret:%p, errno EINVAL as expected",
+					 Tret);
 			}
 		} else
 			Tst_count++;
 	} else {
 		tst_resm(TFAIL,
-			"signal(SIGKILL,SIG_DFL) ret:%p, errno:%d expected ret:-1, errno:%d",
-			Tret, TEST_ERRNO, EINVAL);
+			 "signal(SIGKILL,SIG_DFL) ret:%p, errno:%d expected ret:-1, errno:%d",
+			 Tret, TEST_ERRNO, EINVAL);
 	}
 
 }
diff --git a/testcases/kernel/syscalls/signal/signal02.c b/testcases/kernel/syscalls/signal/signal02.c
index dfee20b..8724345 100644
--- a/testcases/kernel/syscalls/signal/signal02.c
+++ b/testcases/kernel/syscalls/signal/signal02.c
@@ -79,7 +79,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -102,7 +102,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID, TEST_ERRNO,
 					 strerror(TEST_ERRNO));
-			 }
+			}
 
 			TEST_ERROR_LOG(TEST_ERRNO);
 
diff --git a/testcases/kernel/syscalls/signal/signal03.c b/testcases/kernel/syscalls/signal/signal03.c
index 223069b..a9b9391 100644
--- a/testcases/kernel/syscalls/signal/signal03.c
+++ b/testcases/kernel/syscalls/signal/signal03.c
@@ -97,7 +97,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -120,7 +120,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID,
 					 TEST_ERRNO, strerror(TEST_ERRNO));
-			 }
+			}
 
 			if (STD_FUNCTIONAL_TEST) {
 				/*
@@ -133,7 +133,7 @@
 				if ((rval = kill(pid, siglist[i])) != 0) {
 					tst_brkm(TBROK, cleanup, "call to "
 						 "kill failed");
-				 }
+				}
 
 				if (fail == 0) {
 					tst_resm(TPASS, "%s call succeeded",
diff --git a/testcases/kernel/syscalls/signal/signal04.c b/testcases/kernel/syscalls/signal/signal04.c
index 495b539..55218d6 100644
--- a/testcases/kernel/syscalls/signal/signal04.c
+++ b/testcases/kernel/syscalls/signal/signal04.c
@@ -91,7 +91,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -115,7 +115,7 @@
 			if ((rval = signal(siglist[i], &sighandler)) == SIG_ERR) {
 				tst_brkm(TBROK, cleanup, "initial signal call"
 					 " failed");
-			 }
+			}
 
 			/* store the return value */
 			first = rval;
@@ -129,7 +129,7 @@
 				tst_brkm(TFAIL, cleanup, "%s call failed - "
 					 "errno = %d : %s", TCID, TEST_ERRNO,
 					 strerror(TEST_ERRNO));
-			 }
+			}
 
 			if (STD_FUNCTIONAL_TEST) {
 				/* now set the handler back to our own */
@@ -137,7 +137,7 @@
 				    == SIG_ERR) {
 					tst_brkm(TBROK, cleanup, "initial "
 						 "signal call failed");
-				 }
+				}
 
 				/*
 				 * the first return value should equal the
@@ -151,7 +151,7 @@
 						 "values for signal(%d) don't "
 						 "match. Got %p, expected %p.",
 						 siglist[i], rval, first);
-				 }
+				}
 			} else {
 				tst_resm(TPASS, "Call of signal(%d) succeeded",
 					 siglist[i]);
diff --git a/testcases/kernel/syscalls/signal/signal05.c b/testcases/kernel/syscalls/signal/signal05.c
index 18ba939..d9c0b49 100644
--- a/testcases/kernel/syscalls/signal/signal05.c
+++ b/testcases/kernel/syscalls/signal/signal05.c
@@ -85,6 +85,7 @@
 	SIGUNUSED
 #endif
 };
+
 int pass = 0;
 
 int main(int ac, char **av)
@@ -96,7 +97,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -132,7 +133,7 @@
 				if ((rval = kill(pid, siglist[i])) != 0) {
 					tst_brkm(TBROK, cleanup,
 						 "call to kill failed");
-				 }
+				}
 
 				if (siglist[i] == pass) {
 					tst_resm(TPASS,
diff --git a/testcases/kernel/syscalls/signalfd/signalfd01.c b/testcases/kernel/syscalls/signalfd/signalfd01.c
index 59b9991..c3ac390 100644
--- a/testcases/kernel/syscalls/signalfd/signalfd01.c
+++ b/testcases/kernel/syscalls/signalfd/signalfd01.c
@@ -33,7 +33,7 @@
  * RESTRICTIONS
  * 	None
  */
-# define _GNU_SOURCE
+#define _GNU_SOURCE
 
 #include "config.h"
 
@@ -57,9 +57,9 @@
 #if defined HAVE_SYS_SIGNALFD_H
 #include <sys/signalfd.h>
 #elif defined HAVE_LINUX_SIGNALFD_H
-# if defined HAVE_LINUX_TYPES_H
-# include <linux/types.h>
-# endif
+#if defined HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
 #include <linux/signalfd.h>
 #define USE_OWNIMPL
 #elif defined HAVE_SIGNALFD_H
@@ -69,11 +69,11 @@
 #endif
 
 #if defined HAVE_STRUCT_SIGNALFD_SIGINFO_SSI_SIGNO
-# define SIGNALFD_PREFIX(FIELD) ssi_##FIELD
+#define SIGNALFD_PREFIX(FIELD) ssi_##FIELD
 #elif defined HAVE_STRUCT_SIGNALFD_SIGINFO_SIGNO
-# define SIGNALFD_PREFIX(FIELD) FIELD
+#define SIGNALFD_PREFIX(FIELD) FIELD
 #else
-# define USE_STUB
+#define USE_STUB
 #endif
 
 #ifdef USE_STUB
@@ -147,7 +147,7 @@
 	if ((s > 0) && (s != sizeof(struct signalfd_siginfo))) {
 		tst_resm(TFAIL,
 			 "getting incomplete signalfd_siginfo data: "
-			 "actual-size=%"PRId32", expected-size=%"PRId32,
+			 "actual-size=%" PRId32 ", expected-size=%" PRId32,
 			 s, sizeof(struct signalfd_siginfo));
 		sfd_for_next = -1;
 		close(sfd);
@@ -185,7 +185,7 @@
 		goto out;
 	}
 
-      out:
+out:
 	return sfd_for_next;
 }
 
@@ -237,7 +237,7 @@
 	if ((s > 0) && (s != sizeof(struct signalfd_siginfo))) {
 		tst_resm(TFAIL,
 			 "getting incomplete signalfd_siginfo data: "
-			 "actual-size=%"PRId32", expected-size= %"PRId32,
+			 "actual-size=%" PRId32 ", expected-size= %" PRId32,
 			 s, sizeof(struct signalfd_siginfo));
 		goto out;
 	} else if (s < 0) {
@@ -266,7 +266,7 @@
 		goto out;
 	}
 
-      out:
+out:
 	return;
 }
 
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
index 1c0f124..1f13b76 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
@@ -68,7 +68,7 @@
 #include "ltp_signal.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define SFD_CLOEXEC O_CLOEXEC
@@ -176,7 +176,8 @@
 			}
 			close(fd);
 
-			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, SFD_CLOEXEC);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE,
+				     SFD_CLOEXEC);
 			if (fd == -1) {
 				tst_resm(TFAIL,
 					 "signalfd4(SFD_CLOEXEC) failed");
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
index bdf949e..6d0fdfa 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
@@ -168,7 +168,8 @@
 			}
 			close(fd);
 
-			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, SFD_NONBLOCK);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE,
+				     SFD_NONBLOCK);
 			if (fd == -1) {
 				tst_resm(TFAIL,
 					 "signalfd4(SFD_NONBLOCK) failed");
diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
index 5fcf091..dc43ae7 100644
--- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
@@ -89,6 +89,7 @@
 char *TCID = "sigprocmask01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 int sig_catch = 0;		/* variable to blocked/unblocked signals */
 
 struct sigaction sa_new;	/* struct to hold signal info */
@@ -171,7 +172,7 @@
 						tst_brkm(TFAIL, cleanup,
 							 "sigismember() failed, "
 							 "error:%d", errno);
-					 }
+					}
 
 					/*
 					 * Invoke sigprocmask() again to
@@ -186,7 +187,7 @@
 							 "sigprocmask() failed "
 							 "to unblock signal, "
 							 "error=%d", errno);
-					 }
+					}
 					if (sig_catch) {
 						tst_resm(TPASS, "Functionality "
 							 "of sigprocmask() "
@@ -236,12 +237,12 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigemptyset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	if (sigfillset(&sigset2) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigfillset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 
 	/* Set the signal handler function to catch the signal */
 	sa_new.sa_handler = sig_handler;
@@ -249,7 +250,7 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 
 	/*
 	 * Add specified signal (SIGINT) to the signal set
@@ -259,7 +260,7 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaddset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sigrelse/sigrelse01.c b/testcases/kernel/syscalls/sigrelse/sigrelse01.c
index 635f678..fb2c1e3 100644
--- a/testcases/kernel/syscalls/sigrelse/sigrelse01.c
+++ b/testcases/kernel/syscalls/sigrelse/sigrelse01.c
@@ -128,7 +128,7 @@
 static void timeout();
 static int setup_sigs();
 static void handler();
-static void wait_a_while ();
+static void wait_a_while();
 static char *read_pipe();
 static int write_pipe();
 static int set_timeout();
@@ -193,8 +193,7 @@
 	/*
 	 * parse standard options
 	 */
-	if ((msg =
-	     parse_opts(argc, argv, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	}
@@ -215,7 +214,7 @@
 		 * fork off a child process
 		 */
 		if ((pid = FORK_OR_VFORK()) < 0) {
-			tst_brkm(TBROK|TERRNO, cleanup, "fork() failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "fork() failed");
 
 		} else if (pid > 0) {
 			parent();
@@ -224,7 +223,8 @@
 #ifdef UCLINUX
 			if (self_exec(argv[0], "dd", pipe_fd[1], pipe_fd2[0]) <
 			    0) {
-				tst_brkm(TBROK|TERRNO, cleanup, "self_exec() failed");
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "self_exec() failed");
 			}
 #else
 			child();
@@ -273,31 +273,37 @@
 			if (kill(pid, sig) < 0) {
 				if (errno == ESRCH) {
 					if (kill(pid, SIGTERM) < 0)
-						tst_brkm(TBROK|TERRNO, getout,
-							"kill(%d, %d) and kill(%d, SIGTERM) failed", pid, sig, pid);
+						tst_brkm(TBROK | TERRNO, getout,
+							 "kill(%d, %d) and kill(%d, SIGTERM) failed",
+							 pid, sig, pid);
 					else
-						tst_brkm(TBROK|TERRNO, getout,
-							"kill(%d, %d) failed, but kill(%d, SIGTERM) worked", pid, sig, pid);
+						tst_brkm(TBROK | TERRNO, getout,
+							 "kill(%d, %d) failed, but kill(%d, SIGTERM) worked",
+							 pid, sig, pid);
 				} else
-					tst_brkm(TBROK|TERRNO, getout, "kill(%d, %d) failed", pid, sig);
+					tst_brkm(TBROK | TERRNO, getout,
+						 "kill(%d, %d) failed", pid,
+						 sig);
 			}
 		}
 	}
 
 	if (write_pipe(pipe_fd2[1], READY) < 0) {
-		tst_brkm(TBROK|TERRNO, getout, "Unable to tell child to go, write to pipe failed");
+		tst_brkm(TBROK | TERRNO, getout,
+			 "Unable to tell child to go, write to pipe failed");
 	}
 
 	/*
 	 * child is now releasing signals, wait and check exit value
 	 */
 	if (wait(&term_stat) < 0)
-		tst_brkm(TBROK|TERRNO, getout, "wait() failed");
+		tst_brkm(TBROK | TERRNO, getout, "wait() failed");
 
 	/* check child's signal exit value */
 	if ((sig = CHILD_SIG(term_stat)) != 0)
 		/* the child was zapped by a signal */
-		tst_brkm(TBROK, cleanup, "Unexpected signal %d killed child", sig);
+		tst_brkm(TBROK, cleanup, "Unexpected signal %d killed child",
+			 sig);
 
 	/* get child exit value */
 
@@ -488,7 +494,7 @@
 			}
 
 			/* give signal handler some time to process signal */
-			wait_a_while ();
+			wait_a_while();
 		}
 
 	}			/* endfor */
@@ -691,7 +697,7 @@
 /*****************************************************************************
  *  wait_a_while () : wait a while before returning.
  ****************************************************************************/
-static void wait_a_while ()
+static void wait_a_while()
 {
 	long btime;
 
@@ -774,8 +780,8 @@
 	 * read to return -1 if pipe is empty.
 	 */
 	if (fcntl(pipe_fd[0], F_SETFL, O_NONBLOCK) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "fcntl(Fds[0], F_SETFL, O_NONBLOCK) failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "fcntl(Fds[0], F_SETFL, O_NONBLOCK) failed");
 
 	/* set up pipe for parent/child communications */
 	SAFE_PIPE(cleanup, pipe_fd2);
@@ -785,8 +791,8 @@
 	 * read to return -1 if pipe is empty.
 	 */
 	if (fcntl(pipe_fd2[0], F_SETFL, O_NONBLOCK) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup,
-		    "fcntl(Fds[0], F_SETFL, O_NONBLOCK) failed");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "fcntl(Fds[0], F_SETFL, O_NONBLOCK) failed");
 }
 
 void cleanup()
diff --git a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
index dbc3c56..ac1b932 100644
--- a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
+++ b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
@@ -135,8 +135,7 @@
 				 * Read the current signal mask of process,
 				 * Check whether previous signal mask preserved
 				 */
-				if (sigprocmask(SIG_UNBLOCK, 0, &sigset2) ==
-				    -1) {
+				if (sigprocmask(SIG_UNBLOCK, 0, &sigset2) == -1) {
 					tst_resm(TFAIL, "sigprocmask() Failed "
 						 "to get previous signal mask "
 						 "of process");
@@ -152,7 +151,7 @@
 					 "Received expected return value.");
 			}
 		} else {
-			tst_resm(TFAIL|TTERRNO,
+			tst_resm(TFAIL | TTERRNO,
 				 "sigsuspend() returned value %ld",
 				 TEST_RETURN);
 		}
@@ -188,12 +187,12 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigemptyset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	if (sigfillset(&sigset2) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigfillset() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 
 	/* Set the signal handler function to catch the signal */
 	sa_new.sa_handler = sig_handler;
@@ -201,14 +200,14 @@
 		tst_brkm(TFAIL, cleanup,
 			 "sigaction() failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 
 	/* Read the test process's current signal mask. */
 	if (sigprocmask(SIG_UNBLOCK, 0, &sigset1) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigprocmask() Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
index a63fbd1..16ed4c5 100644
--- a/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
+++ b/testcases/kernel/syscalls/sigwaitinfo/sigwaitinfo01.c
@@ -40,19 +40,24 @@
 	 exp_return and exp_errno, resp., and cond is true. If cond is not
 	 true, report condition_errmsg
 */
-static void report_success_cond(const char *func, const char* file, int line,
-		long exp_return, int exp_errno, int condition, char* condition_errmsg)
+static void report_success_cond(const char *func, const char *file, int line,
+				long exp_return, int exp_errno, int condition,
+				char *condition_errmsg)
 {
-	if (exp_return == TEST_RETURN && (exp_return != -1 || exp_errno == TEST_ERRNO))
+	if (exp_return == TEST_RETURN
+	    && (exp_return != -1 || exp_errno == TEST_ERRNO))
 		if (condition)
 			tst_resm(TPASS, "Test passed");
 		else
-			tst_resm(TFAIL, "%s (%s: %d): %s", func, file, line, condition_errmsg);
+			tst_resm(TFAIL, "%s (%s: %d): %s", func, file, line,
+				 condition_errmsg);
 	else if (TEST_RETURN != -1)
-		tst_resm(TFAIL, "%s (%s: %d): Unexpected return value; expected %ld, got %ld",
-						 func, file, line, exp_return, TEST_RETURN);
+		tst_resm(TFAIL,
+			 "%s (%s: %d): Unexpected return value; expected %ld, got %ld",
+			 func, file, line, exp_return, TEST_RETURN);
 	else
-		tst_resm(TFAIL|TTERRNO, "%s (%s: %d): Unexpected failure", func, file, line);
+		tst_resm(TFAIL | TTERRNO, "%s (%s: %d): Unexpected failure",
+			 func, file, line);
 }
 
 #define REPORT_SUCCESS_COND(exp_return, exp_errno, condition, condition_errmsg)	\
@@ -86,14 +91,16 @@
 	TEST_CLEANUP;
 }
 
-typedef int (*swi_func)(const sigset_t* set, siginfo_t* info, struct timespec* timeout);
-typedef void (*test_func)(swi_func, int);
+typedef int (*swi_func) (const sigset_t * set, siginfo_t * info,
+			 struct timespec * timeout);
+typedef void (*test_func) (swi_func, int);
 
 #ifdef TEST_SIGWAIT
-static int my_sigwait(const sigset_t* set, siginfo_t* info, struct timespec* timeout)
+static int my_sigwait(const sigset_t * set, siginfo_t * info,
+		      struct timespec *timeout)
 {
 	int ret;
-	int err=sigwait(set, &ret);
+	int err = sigwait(set, &ret);
 
 	if (err == 0)
 		return ret;
@@ -103,7 +110,8 @@
 #endif
 
 #ifdef TEST_SIGWAITINFO
-static int my_sigwaitinfo(const sigset_t* set, siginfo_t* info, struct timespec* timeout)
+static int my_sigwaitinfo(const sigset_t * set, siginfo_t * info,
+			  struct timespec *timeout)
 {
 
 	return sigwaitinfo(set, info);
@@ -111,7 +119,8 @@
 #endif
 
 #ifdef TEST_SIGTIMEDWAIT
-static int my_sigtimedwait(const sigset_t* set, siginfo_t* info, struct timespec* timeout)
+static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
+			   struct timespec *timeout)
 {
 
 	return sigtimedwait(set, info, timeout);
@@ -119,7 +128,8 @@
 #endif
 
 #ifdef TEST_RT_SIGTIMEDWAIT
-static int my_rt_sigtimedwait(const sigset_t* set, siginfo_t* info, struct timespec* timeout)
+static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info,
+			      struct timespec *timeout)
 {
 
 	/* The last argument is (number_of_signals)/(bits_per_byte), which are 64 and 8, resp. */
@@ -135,7 +145,7 @@
 
 	SUCCEED_OR_DIE(sigemptyset, "sigemptyset failed", &sigs);
 	/* Run a child that will wake us up */
-	child=create_sig_proc(100000, signo, UINT_MAX);
+	child = create_sig_proc(100000, signo, UINT_MAX);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
 	REPORT_SUCCESS(-1, EINTR);
@@ -148,12 +158,12 @@
 	sigset_t sigs;
 	siginfo_t si;
 	pid_t child;
-	struct timespec ts = { .tv_sec = 1 };
+	struct timespec ts = {.tv_sec = 1 };
 
 	SUCCEED_OR_DIE(sigemptyset, "sigemptyset failed", &sigs);
 
 	/* Run a child that will wake us up */
-	child=create_sig_proc(100000, signo, UINT_MAX);
+	child = create_sig_proc(100000, signo, UINT_MAX);
 
 	TEST(sigwaitinfo(&sigs, &si, &ts));
 	REPORT_SUCCESS(-1, EAGAIN);
@@ -174,10 +184,12 @@
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, signo);
 
 	/* Run a child that will wake us up */
-	child=create_sig_proc(100000, signo, UINT_MAX);
+	child = create_sig_proc(100000, signo, UINT_MAX);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
-	REPORT_SUCCESS_COND(signo, 0, si.si_pid==child && si.si_code==SI_USER && si.si_signo==signo, "Struct siginfo mismatch");
+	REPORT_SUCCESS_COND(signo, 0, si.si_pid == child
+			    && si.si_code == SI_USER
+			    && si.si_signo == signo, "Struct siginfo mismatch");
 
 	kill(child, SIGTERM);
 }
@@ -190,7 +202,7 @@
 	SUCCEED_OR_DIE(sigemptyset, "sigemptyset failed", &sigs);
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, signo);
 	/* Run a child that will wake us up */
-	child=create_sig_proc(100000, signo, UINT_MAX);
+	child = create_sig_proc(100000, signo, UINT_MAX);
 
 	TEST(sigwaitinfo(&sigs, NULL, NULL));
 	REPORT_SUCCESS(signo, 0);
@@ -209,25 +221,30 @@
 	/* let's not get interrupted by our dying child */
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, SIGCHLD);
 
-	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs,
+		       &oldmask);
 
 	/* don't wait on a SIGCHLD */
 	SUCCEED_OR_DIE(sigdelset, "sigaddset failed", &sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child=create_sig_proc(0, signo, 1);
+	child = create_sig_proc(0, signo, 1);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
-	REPORT_SUCCESS_COND(signo, 0, si.si_pid==child && si.si_code==SI_USER && si.si_signo==signo, "Struct siginfo mismatch");
+	REPORT_SUCCESS_COND(signo, 0, si.si_pid == child
+			    && si.si_code == SI_USER
+			    && si.si_signo == signo, "Struct siginfo mismatch");
 
-	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed", SIG_SETMASK, &oldmask, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed",
+		       SIG_SETMASK, &oldmask, &oldmask);
 
 	Tst_count--;
 
 	if (sigismember(&oldmask, signo))
 		tst_resm(TPASS, "sigwaitinfo restored the original mask");
 	else
-		tst_resm(TFAIL, "sigwaitinfo failed to restore the original mask");
+		tst_resm(TFAIL,
+			 "sigwaitinfo failed to restore the original mask");
 }
 
 void test_masked_matching_rt(swi_func sigwaitinfo, int signo)
@@ -236,39 +253,47 @@
 	siginfo_t si;
 	pid_t child[2];
 
-	signo = SIGRTMIN+1;
+	signo = SIGRTMIN + 1;
 
 	SUCCEED_OR_DIE(sigemptyset, "sigemptyset failed", &sigs);
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, signo);
-	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, signo+1);
+	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, signo + 1);
 	/* let's not get interrupted by our dying child */
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, SIGCHLD);
 
-	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs,
+		       &oldmask);
 
 	/* don't wait on a SIGCHLD */
 	SUCCEED_OR_DIE(sigdelset, "sigdelset failed", &sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child[0]=create_sig_proc(0, signo, 1);
-	child[1]=create_sig_proc(0, signo+1, 1);
+	child[0] = create_sig_proc(0, signo, 1);
+	child[1] = create_sig_proc(0, signo + 1, 1);
 
 	TEST(sigwaitinfo(&sigs, &si, NULL));
-	REPORT_SUCCESS_COND(signo, 0, si.si_pid==child[0] && si.si_code==SI_USER && si.si_signo==signo, "Struct siginfo mismatch");
+	REPORT_SUCCESS_COND(signo, 0, si.si_pid == child[0]
+			    && si.si_code == SI_USER
+			    && si.si_signo == signo, "Struct siginfo mismatch");
 
 	/* eat the other signal */
 	Tst_count--;
 	TEST(sigwaitinfo(&sigs, &si, NULL));
-	REPORT_SUCCESS_COND(signo+1, 0, si.si_pid==child[1] && si.si_code==SI_USER && si.si_signo==signo+1, "Struct siginfo mismatch");
+	REPORT_SUCCESS_COND(signo + 1, 0, si.si_pid == child[1]
+			    && si.si_code == SI_USER
+			    && si.si_signo == signo + 1,
+			    "Struct siginfo mismatch");
 
-	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed", SIG_SETMASK, &oldmask, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed",
+		       SIG_SETMASK, &oldmask, &oldmask);
 
 	Tst_count--;
 
 	if (sigismember(&oldmask, signo))
 		tst_resm(TPASS, "sigwaitinfo restored the original mask");
 	else
-		tst_resm(TFAIL, "sigwaitinfo failed to restore the original mask");
+		tst_resm(TFAIL,
+			 "sigwaitinfo failed to restore the original mask");
 }
 
 void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo)
@@ -281,25 +306,28 @@
 	/* let's not get interrupted by our dying child */
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, SIGCHLD);
 
-	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs,
+		       &oldmask);
 
 	/* don't wait on a SIGCHLD */
 	SUCCEED_OR_DIE(sigdelset, "sigaddset failed", &sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child=create_sig_proc(0, signo, 1);
+	child = create_sig_proc(0, signo, 1);
 
 	TEST(sigwaitinfo(&sigs, NULL, NULL));
 	REPORT_SUCCESS(signo, 0);
 
-	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed", SIG_SETMASK, &oldmask, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "restoring original signal mask failed",
+		       SIG_SETMASK, &oldmask, &oldmask);
 
 	Tst_count--;
 
 	if (sigismember(&oldmask, signo))
 		tst_resm(TPASS, "sigwaitinfo restored the original mask");
 	else
-		tst_resm(TFAIL, "sigwaitinfo failed to restore the original mask");
+		tst_resm(TFAIL,
+			 "sigwaitinfo failed to restore the original mask");
 
 }
 
@@ -313,25 +341,27 @@
 	/* let's not get interrupted by our dying child */
 	SUCCEED_OR_DIE(sigaddset, "sigaddset failed", &sigs, SIGCHLD);
 
-	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &sigs,
+		       &oldmask);
 
 	/* don't wait on a SIGCHLD */
 	SUCCEED_OR_DIE(sigdelset, "sigaddset failed", &sigs, SIGCHLD);
 
 	/* Run a child that will wake us up */
-	child=create_sig_proc(0, signo, 1);
+	child = create_sig_proc(0, signo, 1);
 
-	TEST(sigwaitinfo(&sigs, (void*)1, NULL));
+	TEST(sigwaitinfo(&sigs, (void *)1, NULL));
 	REPORT_SUCCESS(-1, EFAULT);
 
-	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &oldmask, &oldmask);
+	SUCCEED_OR_DIE(sigprocmask, "sigprocmask failed", SIG_SETMASK, &oldmask,
+		       &oldmask);
 
 	kill(child, SIGTERM);
 }
 
 void test_bad_address2(swi_func sigwaitinfo, int signo)
 {
-	TEST(sigwaitinfo((void*)1, NULL, NULL));
+	TEST(sigwaitinfo((void *)1, NULL, NULL));
 	REPORT_SUCCESS(-1, EFAULT);
 }
 
@@ -340,7 +370,7 @@
 	sigset_t sigs;
 	SUCCEED_OR_DIE(sigemptyset, "sigemptyset failed", &sigs);
 
-	TEST(sigwaitinfo(&sigs, NULL, (void*)1));
+	TEST(sigwaitinfo(&sigs, NULL, (void *)1));
 	REPORT_SUCCESS(-1, EFAULT);
 }
 
@@ -350,73 +380,76 @@
 	int signo;
 } tests[] = {
 #ifdef TEST_RT_SIGTIMEDWAIT
-	{ test_empty_set, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_unmasked_matching, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_masked_matching, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_unmasked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_bad_address, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_bad_address2, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_bad_address3, my_rt_sigtimedwait, SIGUSR1 },
-	{ test_timeout, my_rt_sigtimedwait, 0 },
-
-	/* Special cases */
-	/* 1: sigwaitinfo does respond to ignored signal */
-	{ test_masked_matching, my_rt_sigtimedwait, SIGUSR2 },
-
-	/* 2: An ignored signal doesn't cause sigwaitinfo to return EINTR */
-	{ test_timeout, my_rt_sigtimedwait, SIGUSR2 },
-
-	/* 3: The handler is not called when the signal is waited for by sigwaitinfo */
-	{ test_masked_matching, my_rt_sigtimedwait, SIGTERM },
-
-	/* 4: Simultaneous realtime signals are delivered in the order of increasing signal number */
-	{ test_masked_matching_rt, my_rt_sigtimedwait, -1 },
+	{
+	test_empty_set, my_rt_sigtimedwait, SIGUSR1}, {
+	test_unmasked_matching, my_rt_sigtimedwait, SIGUSR1}, {
+	test_masked_matching, my_rt_sigtimedwait, SIGUSR1}, {
+	test_unmasked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, {
+	test_masked_matching_noinfo, my_rt_sigtimedwait, SIGUSR1}, {
+	test_bad_address, my_rt_sigtimedwait, SIGUSR1}, {
+	test_bad_address2, my_rt_sigtimedwait, SIGUSR1}, {
+	test_bad_address3, my_rt_sigtimedwait, SIGUSR1}, {
+	test_timeout, my_rt_sigtimedwait, 0},
+	    /* Special cases */
+	    /* 1: sigwaitinfo does respond to ignored signal */
+	{
+	test_masked_matching, my_rt_sigtimedwait, SIGUSR2},
+	    /* 2: An ignored signal doesn't cause sigwaitinfo to return EINTR */
+	{
+	test_timeout, my_rt_sigtimedwait, SIGUSR2},
+	    /* 3: The handler is not called when the signal is waited for by sigwaitinfo */
+	{
+	test_masked_matching, my_rt_sigtimedwait, SIGTERM},
+	    /* 4: Simultaneous realtime signals are delivered in the order of increasing signal number */
+	{
+	test_masked_matching_rt, my_rt_sigtimedwait, -1},
 #endif
 #if defined TEST_SIGWAIT
-	{ test_unmasked_matching_noinfo, my_sigwait, SIGUSR1 },
-	{ test_masked_matching_noinfo, my_sigwait, SIGUSR1 },
+	{
+	test_unmasked_matching_noinfo, my_sigwait, SIGUSR1}, {
+	test_masked_matching_noinfo, my_sigwait, SIGUSR1},
 #endif
 #if defined TEST_SIGWAITINFO
-	{ test_empty_set, my_sigwaitinfo, SIGUSR1 },
-	{ test_unmasked_matching, my_sigwaitinfo, SIGUSR1 },
-	{ test_masked_matching, my_sigwaitinfo, SIGUSR1 },
-	{ test_unmasked_matching_noinfo, my_sigwaitinfo, SIGUSR1 },
-	{ test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1 },
-	{ test_bad_address, my_sigwaitinfo, SIGUSR1 },
-	{ test_bad_address2, my_sigwaitinfo, SIGUSR1 },
+	{
+	test_empty_set, my_sigwaitinfo, SIGUSR1}, {
+	test_unmasked_matching, my_sigwaitinfo, SIGUSR1}, {
+	test_masked_matching, my_sigwaitinfo, SIGUSR1}, {
+	test_unmasked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, {
+	test_masked_matching_noinfo, my_sigwaitinfo, SIGUSR1}, {
+	test_bad_address, my_sigwaitinfo, SIGUSR1}, {
+	test_bad_address2, my_sigwaitinfo, SIGUSR1},
 #endif
 #if defined TEST_SIGTIMEDWAIT
-	{ test_empty_set, my_sigtimedwait, SIGUSR1 },
-	{ test_unmasked_matching, my_sigtimedwait, SIGUSR1 },
-	{ test_masked_matching, my_sigtimedwait, SIGUSR1 },
-	{ test_unmasked_matching_noinfo, my_sigtimedwait, SIGUSR1 },
-	{ test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1 },
-	{ test_bad_address, my_sigtimedwait, SIGUSR1 },
-	{ test_bad_address2, my_sigtimedwait, SIGUSR1 },
-	{ test_bad_address3, my_sigtimedwait, SIGUSR1 },
-	{ test_timeout, my_sigtimedwait, 0 },
+	{
+	test_empty_set, my_sigtimedwait, SIGUSR1}, {
+	test_unmasked_matching, my_sigtimedwait, SIGUSR1}, {
+	test_masked_matching, my_sigtimedwait, SIGUSR1}, {
+	test_unmasked_matching_noinfo, my_sigtimedwait, SIGUSR1}, {
+	test_masked_matching_noinfo, my_sigtimedwait, SIGUSR1}, {
+	test_bad_address, my_sigtimedwait, SIGUSR1}, {
+	test_bad_address2, my_sigtimedwait, SIGUSR1}, {
+	test_bad_address3, my_sigtimedwait, SIGUSR1}, {
+	test_timeout, my_sigtimedwait, 0},
 #endif
 };
 
 #if defined TEST_SIGWAITINFO
-const char* TCID="sigwaitinfo01";
+const char *TCID = "sigwaitinfo01";
 #elif defined TEST_RT_SIGTIMEDWAIT
-const char* TCID="rt_sigtimedwait01";
+const char *TCID = "rt_sigtimedwait01";
 #elif defined TEST_SIGTIMEDWAIT
-const char* TCID="sigtimedwait01";
+const char *TCID = "sigtimedwait01";
 #elif defined TEST_SIGWAIT
-const char* TCID="sigwait01";
+const char *TCID = "sigwait01";
 #endif
 
+int TST_TOTAL = sizeof(tests) / sizeof(*tests);
 
-int TST_TOTAL = sizeof(tests)/sizeof(*tests);
-
-int main(int argc, char** argv)
+int main(int argc, char **argv)
 {
 	unsigned i;
 	int lc;
-	char* msg;
+	char *msg;
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
@@ -426,8 +459,8 @@
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
 		Tst_count = 0;
 
-		for (i=0; i<sizeof(tests)/sizeof(*tests); i++) {
-			alarm(10); /* arrange a 10 second timeout */
+		for (i = 0; i < sizeof(tests) / sizeof(*tests); i++) {
+			alarm(10);	/* arrange a 10 second timeout */
 			tst_resm(TINFO, "%p, %d", tests[i].swi, tests[i].signo);
 			tests[i].tf(tests[i].swi, tests[i].signo);
 		}
diff --git a/testcases/kernel/syscalls/socket/socket01.c b/testcases/kernel/syscalls/socket/socket01.c
index f308c23..f855279 100644
--- a/testcases/kernel/syscalls/socket/socket01.c
+++ b/testcases/kernel/syscalls/socket/socket01.c
@@ -82,7 +82,6 @@
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);	/* Total number of test cases. */
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/socket/socket02.c b/testcases/kernel/syscalls/socket/socket02.c
index cd51f2c..7aa6df0 100644
--- a/testcases/kernel/syscalls/socket/socket02.c
+++ b/testcases/kernel/syscalls/socket/socket02.c
@@ -69,12 +69,12 @@
 #define PORT 57392
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 /* For Linux these must be the same.  */
 #ifndef SOCK_CLOEXEC
-# define SOCK_CLOEXEC O_CLOEXEC
+#define SOCK_CLOEXEC O_CLOEXEC
 #endif
 
 /* Extern Global Variables */
diff --git a/testcases/kernel/syscalls/socket/socket03.c b/testcases/kernel/syscalls/socket/socket03.c
index cf941bd..905a4fb 100644
--- a/testcases/kernel/syscalls/socket/socket03.c
+++ b/testcases/kernel/syscalls/socket/socket03.c
@@ -58,7 +58,7 @@
 #include "usctest.h"
 
 #ifndef SOCK_NONBLOCK
-# define SOCK_NONBLOCK O_NONBLOCK
+#define SOCK_NONBLOCK O_NONBLOCK
 #endif
 
 /* Extern Global Variables */
diff --git a/testcases/kernel/syscalls/socketcall/socketcall01.c b/testcases/kernel/syscalls/socketcall/socketcall01.c
index 3777a15..bce3aa5 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall01.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall01.c
@@ -84,7 +84,6 @@
 void setup();
 void cleanup();
 
-
 struct test_case_t {
 	int call;
 	unsigned long args[3];
@@ -127,9 +126,9 @@
 
 			/* check return code */
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO, "socketcall() Failed with"
-					 " return=%ld",
-					 TEST_RETURN);
+				tst_resm(TFAIL | TTERRNO,
+					 "socketcall() Failed with"
+					 " return=%ld", TEST_RETURN);
 			} else {
 				tst_resm(TPASS, "socketcall() passed for"
 					 " :%s with return=%ld ",
diff --git a/testcases/kernel/syscalls/socketcall/socketcall03.c b/testcases/kernel/syscalls/socketcall/socketcall03.c
index 0751b6b..7b6168e 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall03.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall03.c
@@ -124,9 +124,8 @@
 		/* check return code */
 
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TERRNO, "socketcall() Failed "
-				 " with return=%ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TERRNO, "socketcall() Failed "
+				 " with return=%ld", TEST_RETURN);
 		} else {
 			tst_resm(TPASS, "socketcall() passed "
 				 "for %s with return=%ld ",
diff --git a/testcases/kernel/syscalls/socketcall/socketcall04.c b/testcases/kernel/syscalls/socketcall/socketcall04.c
index f009484..f37487d 100644
--- a/testcases/kernel/syscalls/socketcall/socketcall04.c
+++ b/testcases/kernel/syscalls/socketcall/socketcall04.c
@@ -123,9 +123,8 @@
 
 		/* check return code */
 		if (TEST_RETURN == -1) {
-			tst_resm(TFAIL|TTERRNO, "socketcall() Failed "
-				 " with return=%ld",
-				 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "socketcall() Failed "
+				 " with return=%ld", TEST_RETURN);
 		} else {
 			tst_resm(TPASS, "socketcall() passed "
 				 "for %s with return=%ld ",
diff --git a/testcases/kernel/syscalls/socketpair/socketpair01.c b/testcases/kernel/syscalls/socketpair/socketpair01.c
index d62d8d8..7f2e41e 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair01.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair01.c
@@ -81,7 +81,8 @@
 	    /* Skip since uClinux does not implement memory protection */
 	{
 	PF_UNIX, SOCK_STREAM, 0, 0, -1, EFAULT, "bad aligned pointer"}, {
-	PF_UNIX, SOCK_STREAM, 0, (int *)7, -1, EFAULT, "bad unaligned pointer"},
+	PF_UNIX, SOCK_STREAM, 0, (int *)7, -1, EFAULT,
+		    "bad unaligned pointer"},
 #endif
 	{
 	PF_INET, SOCK_DGRAM, 17, sv, -1, EOPNOTSUPP, "UDP socket"}, {
@@ -91,7 +92,6 @@
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);	/* Total number of test cases. */
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/socketpair/socketpair02.c b/testcases/kernel/syscalls/socketpair/socketpair02.c
index 4f403d4..5c3a6db 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair02.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair02.c
@@ -58,7 +58,7 @@
 #include "usctest.h"
 
 #ifndef SOCK_NONBLOCK
-# define SOCK_NONBLOCK O_NONBLOCK
+#define SOCK_NONBLOCK O_NONBLOCK
 #endif
 
 int TST_TOTAL = 2;
@@ -122,7 +122,7 @@
 
 	if ((tst_kvercmp(2, 6, 27)) < 0) {
 		tst_brkm(TCONF, NULL,
-		    "This test can only run on kernels that are 2.6.27 and higher");
+			 "This test can only run on kernels that are 2.6.27 and higher");
 	}
 	setup();
 
@@ -136,8 +136,8 @@
 		}
 		if (fl & O_NONBLOCK) {
 			tst_brkm(TFAIL, cleanup,
-			    "socketpair(0) set non-blocking mode for fds[%d]",
-			    i);
+				 "socketpair(0) set non-blocking mode for fds[%d]",
+				 i);
 		}
 		close(fds[i]);
 	}
@@ -152,8 +152,8 @@
 		}
 		if ((fl & O_NONBLOCK) == 0) {
 			tst_brkm(TFAIL, cleanup,
-			    "socketpair(SOCK_NONBLOCK) didn't set non-blocking "
-			    "mode for fds[%d]", i);
+				 "socketpair(SOCK_NONBLOCK) didn't set non-blocking "
+				 "mode for fds[%d]", i);
 		}
 		close(fds[i]);
 	}
diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index 400d318..b2018c9 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -129,7 +129,6 @@
 
 int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]);	/* Total number of test cases. */
 
-
 int main(int argc, char *argv[])
 {
 	int lc;
diff --git a/testcases/kernel/syscalls/splice/splice02.c b/testcases/kernel/syscalls/splice/splice02.c
index 56e2516..f9158b5 100644
--- a/testcases/kernel/syscalls/splice/splice02.c
+++ b/testcases/kernel/syscalls/splice/splice02.c
@@ -45,16 +45,15 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "splice02";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "splice02";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
-static inline long ltp_splice(int fd_in, loff_t *off_in,
-				int fd_out, loff_t *off_out,
-				size_t len, unsigned int flags)
+static inline long ltp_splice(int fd_in, loff_t * off_in,
+			      int fd_out, loff_t * off_out,
+			      size_t len, unsigned int flags)
 {
-			return syscall(__NR_splice, fd_in, off_in, fd_out,
-					off_out, len, flags);
+	return syscall(__NR_splice, fd_in, off_in, fd_out, off_out, len, flags);
 }
 
 /* Extern Global Functions */
@@ -75,12 +74,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -101,16 +101,18 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 #define SPLICE_SIZE (64*1024)
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int fd = 0;
 	int results = 0;
 
@@ -121,31 +123,32 @@
 		exit(0);
 	}
 
-        setup();
+	setup();
 
-        if (ac < 2) {
-            tst_resm(TFAIL, "%s failed - Usage: %s outfile", TCID, av[0]);
-            tst_exit();
-	}
-	fd=open(av[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
-	if (fd < 0) {
-		tst_resm(TFAIL, "open(%s) failed - errno = %d : %s", av[1], errno, strerror(errno));
-	   cleanup();
-	   tst_exit();
-	}
-
-        do {
-		TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0));
-	    if (TEST_RETURN < 0) {
-            	tst_resm(TFAIL, "splice failed - errno = %d : %s", TEST_ERRNO, strerror(TEST_ERRNO));
-	        cleanup();
+	if (ac < 2) {
+		tst_resm(TFAIL, "%s failed - Usage: %s outfile", TCID, av[0]);
 		tst_exit();
-	    } else
-            if (TEST_RETURN == 0) {
-							tst_resm(TPASS, "splice() system call Passed");
-		close(fd);
-	        cleanup();
-	        tst_exit();
-	    }
+	}
+	fd = open(av[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
+	if (fd < 0) {
+		tst_resm(TFAIL, "open(%s) failed - errno = %d : %s", av[1],
+			 errno, strerror(errno));
+		cleanup();
+		tst_exit();
+	}
+
+	do {
+		TEST(ltp_splice(STDIN_FILENO, NULL, fd, NULL, SPLICE_SIZE, 0));
+		if (TEST_RETURN < 0) {
+			tst_resm(TFAIL, "splice failed - errno = %d : %s",
+				 TEST_ERRNO, strerror(TEST_ERRNO));
+			cleanup();
+			tst_exit();
+		} else if (TEST_RETURN == 0) {
+			tst_resm(TPASS, "splice() system call Passed");
+			close(fd);
+			cleanup();
+			tst_exit();
+		}
 	} while (1);
 }
diff --git a/testcases/kernel/syscalls/ssetmask/ssetmask01.c b/testcases/kernel/syscalls/ssetmask/ssetmask01.c
index 0eca62c..d2e5894 100644
--- a/testcases/kernel/syscalls/ssetmask/ssetmask01.c
+++ b/testcases/kernel/syscalls/ssetmask/ssetmask01.c
@@ -125,13 +125,13 @@
 			syscall(__NR_ssetmask, SIGALRM);
 			TEST(syscall(__NR_sgetmask));	//call ssetmask()
 			if (TEST_RETURN != SIGALRM) {
-				tst_resm(TFAIL|TTERRNO, "sgetmask() failed");
+				tst_resm(TFAIL | TTERRNO, "sgetmask() failed");
 				cleanup();
 				tst_exit();
 			}
 			TEST(syscall(__NR_ssetmask, SIGUSR1));	//call ssetmask()
 			if (TEST_RETURN != SIGALRM) {
-				tst_resm(TFAIL|TTERRNO, "ssetmask() failed");
+				tst_resm(TFAIL | TTERRNO, "ssetmask() failed");
 				cleanup();
 				tst_exit();
 			}
diff --git a/testcases/kernel/syscalls/stat/stat01.c b/testcases/kernel/syscalls/stat/stat01.c
index 1bee404..40e7473 100644
--- a/testcases/kernel/syscalls/stat/stat01.c
+++ b/testcases/kernel/syscalls/stat/stat01.c
@@ -87,6 +87,7 @@
 char *TCID = "stat01";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 uid_t user_id;			/* Owner id of the test file */
 gid_t group_id;			/* Group id of the test file */
 char nobody_uid[] = "nobody";
@@ -202,7 +203,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Fill the test buffer with the known data */
 	for (i = 0; i < BUF_SIZE; i++) {
@@ -215,7 +216,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TESTFILE, errno, strerror(errno));
-		 } else {
+		} else {
 			write_len += wbytes;
 		}
 	}
diff --git a/testcases/kernel/syscalls/stat/stat02.c b/testcases/kernel/syscalls/stat/stat02.c
index bc3c227..ac0fcae 100644
--- a/testcases/kernel/syscalls/stat/stat02.c
+++ b/testcases/kernel/syscalls/stat/stat02.c
@@ -89,6 +89,7 @@
 char *TCID = "stat02";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 uid_t user_id;			/* eff. user id/group id of test process */
 gid_t group_id;
 char nobody_uid[] = "nobody";
@@ -204,7 +205,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Fill the test buffer with the known data */
 	for (i = 0; i < BUF_SIZE; i++) {
@@ -214,20 +215,22 @@
 	/* Write to the file 1k data from the buffer */
 	while (write_len < FILE_SIZE) {
 		if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
-			tst_brkm(TBROK|TERRNO, cleanup, "write to %s failed", TESTFILE);
+			tst_brkm(TBROK | TERRNO, cleanup, "write to %s failed",
+				 TESTFILE);
 		} else {
 			write_len += wbytes;
 		}
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN|TERRNO, "closing %s failed", TESTFILE);
+		tst_resm(TWARN | TERRNO, "closing %s failed", TESTFILE);
 	}
 
 	/* Modify mode permissions on the testfile */
 	if (chmod(TESTFILE, NEW_MODE) < 0) {
-		tst_brkm(TBROK|TERRNO, cleanup, "chmodding %s failed", TESTFILE);
-	 }
+		tst_brkm(TBROK | TERRNO, cleanup, "chmodding %s failed",
+			 TESTFILE);
+	}
 
 	/* Get the uid/gid of the process */
 	user_id = getuid();
diff --git a/testcases/kernel/syscalls/stat/stat03.c b/testcases/kernel/syscalls/stat/stat03.c
index aceec6b..9637de1 100644
--- a/testcases/kernel/syscalls/stat/stat03.c
+++ b/testcases/kernel/syscalls/stat/stat03.c
@@ -296,25 +296,25 @@
 	/* Creat a test directory */
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
-	 }
+	}
 
 	/* Creat a test file under above test directory */
 	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 	/* Close the test file */
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 
 	/* Modify mode permissions on test directory */
 	if (chmod(DIR_TEMP, FILE_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
-	 }
+	}
 	return 0;
 }
 
@@ -336,13 +336,13 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	/* Close the test file created above */
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/stat/stat05.c b/testcases/kernel/syscalls/stat/stat05.c
index 4af66cf..9073951 100644
--- a/testcases/kernel/syscalls/stat/stat05.c
+++ b/testcases/kernel/syscalls/stat/stat05.c
@@ -193,8 +193,7 @@
 	}
 
 	if (close(fd) == -1) {
-		tst_resm(TWARN|TERRNO, "close(%s) failed",
-			 fname);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", fname);
 	}
 }
 
diff --git a/testcases/kernel/syscalls/stat/stat06.c b/testcases/kernel/syscalls/stat/stat06.c
index 60fa1d4..b01da8a 100644
--- a/testcases/kernel/syscalls/stat/stat06.c
+++ b/testcases/kernel/syscalls/stat/stat06.c
@@ -169,6 +169,7 @@
 	{
 	NULL, NULL, NULL, 0, no_setup}
 };
+
 int TST_TOTAL = sizeof(Test_cases) / sizeof(*Test_cases);
 
 /***********************************************************************
@@ -249,8 +250,8 @@
 						tst_resm(TFAIL,
 							 "stat(<%s>, &stbuf) Failed, errno=%d, expected errno:%d",
 							 desc, TEST_ERRNO,
-							 Test_cases[ind].
-							 exp_errno);
+							 Test_cases
+							 [ind].exp_errno);
 				} else
 					Tst_count++;
 			} else {
diff --git a/testcases/kernel/syscalls/statfs/statfs01.c b/testcases/kernel/syscalls/statfs/statfs01.c
index 1724153..50d30c3 100644
--- a/testcases/kernel/syscalls/statfs/statfs01.c
+++ b/testcases/kernel/syscalls/statfs/statfs01.c
@@ -156,11 +156,11 @@
 		/* check return code */
 		if (TEST_RETURN == -1) {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL|TERRNO, "statfs(%s, ..) failed",
-				fname);
+			tst_resm(TFAIL | TERRNO, "statfs(%s, ..) failed",
+				 fname);
 		} else {
 
-	     		/*
+			/*
 			 * only perform functional verification if flag set
 			 * (-f not given)
 			 */
diff --git a/testcases/kernel/syscalls/statfs/statfs03.c b/testcases/kernel/syscalls/statfs/statfs03.c
index 50819f9..71d2ffb 100644
--- a/testcases/kernel/syscalls/statfs/statfs03.c
+++ b/testcases/kernel/syscalls/statfs/statfs03.c
@@ -62,6 +62,7 @@
 int fileHandle = 0;
 
 int exp_enos[] = { EACCES, 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -129,7 +130,7 @@
 	/* make a temporary directory and cd to it */
 	tst_tmpdir();
 	if (chmod(get_tst_tmpdir(), S_IRWXU) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "chmod(%s, 700) failed",
+		tst_brkm(TBROK | TERRNO, cleanup, "chmod(%s, 700) failed",
 			 get_tst_tmpdir());
 
 	/* create a test file */
@@ -139,14 +140,14 @@
 	} else {
 		sprintf(path, "%s/%s", fname, fname);
 		if ((fileHandle = creat(path, 0444)) == -1)
-			tst_brkm(TFAIL|TERRNO, cleanup, "creat failed");
+			tst_brkm(TFAIL | TERRNO, cleanup, "creat failed");
 	}
 
 	ltpuser = getpwnam(nobody_uid);
 	if (ltpuser == NULL)
-		tst_brkm(TBROK|TERRNO, cleanup, "getpwnam failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "getpwnam failed");
 	if (seteuid(ltpuser->pw_uid) == -1) {
-		tst_resm(TINFO|TERRNO, "seteuid failed to "
+		tst_resm(TINFO | TERRNO, "seteuid failed to "
 			 "to set the effective uid to %d", ltpuser->pw_uid);
 	}
 
diff --git a/testcases/kernel/syscalls/statvfs/statvfs01.c b/testcases/kernel/syscalls/statvfs/statvfs01.c
index c330564..54eaf73 100644
--- a/testcases/kernel/syscalls/statvfs/statvfs01.c
+++ b/testcases/kernel/syscalls/statvfs/statvfs01.c
@@ -74,8 +74,8 @@
 		TEST(statvfs(TEST_PATH, &buf));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TERRNO, "statvfs(%s, ...) failed",
-			    TEST_PATH);
+			tst_resm(TFAIL | TERRNO, "statvfs(%s, ...) failed",
+				 TEST_PATH);
 		else
 			tst_resm(TPASS, "statvfs(%s, ...) passed", TEST_PATH);
 
@@ -86,9 +86,12 @@
 		 TEST_PATH);
 	tst_resm(TINFO, "file system block size = %lu bytes", buf.f_bsize);
 	tst_resm(TINFO, "file system fragment size = %lu bytes", buf.f_frsize);
-	tst_resm(TINFO, "file system free blocks = %ju", (uintmax_t)buf.f_bfree);
-	tst_resm(TINFO, "file system total inodes = %ju", (uintmax_t)buf.f_files);
-	tst_resm(TINFO, "file system free inodes = %ju", (uintmax_t)buf.f_ffree);
+	tst_resm(TINFO, "file system free blocks = %ju",
+		 (uintmax_t) buf.f_bfree);
+	tst_resm(TINFO, "file system total inodes = %ju",
+		 (uintmax_t) buf.f_files);
+	tst_resm(TINFO, "file system free inodes = %ju",
+		 (uintmax_t) buf.f_ffree);
 	tst_resm(TINFO, "file system id = %lu", buf.f_fsid);
 	tst_resm(TINFO, "file system max filename length = %lu", buf.f_namemax);
 
diff --git a/testcases/kernel/syscalls/stime/stime01.c b/testcases/kernel/syscalls/stime/stime01.c
index 8e79e96..7376ca5 100644
--- a/testcases/kernel/syscalls/stime/stime01.c
+++ b/testcases/kernel/syscalls/stime/stime01.c
@@ -102,7 +102,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -124,8 +124,8 @@
 		 * to as far as clock skew is concerned :P.
 		 */
 		if (gettimeofday(&real_time_tv, NULL) < 0) {
-			tst_brkm(TBROK|TERRNO, NULL,
-				"failed to get current time via gettimeofday(2)");
+			tst_brkm(TBROK | TERRNO, NULL,
+				 "failed to get current time via gettimeofday(2)");
 		}
 
 		/* Get the system's new time */
@@ -138,7 +138,7 @@
 		 * new_time.
 		 */
 		if (stime(&new_time) < 0) {
-			tst_resm(TFAIL|TERRNO, "stime(%ld) failed", new_time);
+			tst_resm(TFAIL | TERRNO, "stime(%ld) failed", new_time);
 		} else {
 
 			/*
@@ -152,26 +152,25 @@
 				 * to stime().
 				 */
 				if (gettimeofday(&pres_time_tv, NULL) < 0) {
-					tst_brkm(TFAIL|TERRNO, cleanup,
+					tst_brkm(TFAIL | TERRNO, cleanup,
 						 "time() failed to get "
 						 "system's time after stime");
 				}
 
 				/* Now do the actual verification */
-				switch(pres_time_tv.tv_sec - new_time) {
+				switch (pres_time_tv.tv_sec - new_time) {
 				case 0:
 				case 1:
 					tst_resm(TINFO, "pt.tv_sec: %ld",
-							pres_time_tv.tv_sec);
+						 pres_time_tv.tv_sec);
 					tst_resm(TPASS, "system time was set "
-							"to %ld", new_time);
+						 "to %ld", new_time);
 					break;
 				default:
 					tst_resm(TFAIL, "system time was not "
-							"set to %ld (time is "
-							"actually: %ld)",
-							new_time,
-							pres_time_tv.tv_sec);
+						 "set to %ld (time is "
+						 "actually: %ld)",
+						 new_time, pres_time_tv.tv_sec);
 				}
 
 			} else {
@@ -204,8 +203,7 @@
 
 	/* Check that the test process id is super/root  */
 	if (geteuid() != 0) {
-		tst_brkm(TBROK, NULL,
-			"you must be root to execute this test!");
+		tst_brkm(TBROK, NULL, "you must be root to execute this test!");
 	}
 
 	TEST_PAUSE;
@@ -228,8 +226,8 @@
 	/* Restore the original system time. */
 	if (settimeofday(&real_time_tv, NULL) != 0) {
 		tst_resm(TBROK | TERRNO, "failed to restore time to original "
-					 "value; system clock may need to be "
-					 "fixed manually");
+			 "value; system clock may need to be "
+			 "fixed manually");
 	}
 
 }
diff --git a/testcases/kernel/syscalls/stime/stime02.c b/testcases/kernel/syscalls/stime/stime02.c
index fceffca..74eec1a 100644
--- a/testcases/kernel/syscalls/stime/stime02.c
+++ b/testcases/kernel/syscalls/stime/stime02.c
@@ -81,6 +81,7 @@
 char *TCID = "stime02";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { EPERM, 0 };
+
 time_t curr_time;		/* system's current time in seconds */
 time_t new_time;		/* system's new time */
 time_t tloc;			/* argument var. for time() */
@@ -166,7 +167,7 @@
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 }
+	}
 
 	/* Get the system's new time */
 	new_time = curr_time + INCR_TIME;
diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c
index f067127..5b98b63 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff02.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c
@@ -151,9 +151,10 @@
 			}
 
 			/* check return code */
-			if ((TEST_RETURN == -1) && (TEST_ERRNO == testcase[i].
-						    exp_errno)) {
-				tst_resm(TPASS, "swapoff(2) expected failure;"
+			if ((TEST_RETURN == -1)
+			    && (TEST_ERRNO == testcase[i].exp_errno)) {
+				tst_resm(TPASS,
+					 "swapoff(2) expected failure;"
 					 " Got errno - %s : %s",
 					 testcase[i].exp_errval,
 					 testcase[i].err_desc);
@@ -166,7 +167,9 @@
 					 testcase[i].exp_errval, TEST_ERRNO);
 
 				if ((TEST_RETURN == 0) && (i == 2)) {
-					if (syscall(__NR_swapon, "./swapfile01", 0) != 0) {
+					if (syscall
+					    (__NR_swapon, "./swapfile01",
+					     0) != 0) {
 						tst_brkm(TBROK, cleanup,
 							 " Failed to turn on"
 							 " swap file");
@@ -293,8 +296,10 @@
 	 */
 	TEST_CLEANUP;
 
-	if (need_swapfile_cleanup && (syscall(__NR_swapoff, "./swapfile01") != 0)) {
-		tst_resm(TWARN, " Failed to turn off swap file. System reboot"
+	if (need_swapfile_cleanup
+	    && (syscall(__NR_swapoff, "./swapfile01") != 0)) {
+		tst_resm(TWARN,
+			 " Failed to turn off swap file. System reboot"
 			 " after execution of LTP test suite is"
 			 " recommended.");
 	}
diff --git a/testcases/kernel/syscalls/swapon/swapon02.c b/testcases/kernel/syscalls/swapon/swapon02.c
index bddfab6..e4db80f 100644
--- a/testcases/kernel/syscalls/swapon/swapon02.c
+++ b/testcases/kernel/syscalls/swapon/swapon02.c
@@ -161,7 +161,7 @@
 				continue;
 			} else {
 				/* run the test */
-				TEST(syscall(__NR_swapon,testcase[i].path, 0));
+				TEST(syscall(__NR_swapon, testcase[i].path, 0));
 			}
 			/* do the clean if the test have one */
 			if (testcase[i].cleanfunc
@@ -189,8 +189,11 @@
 					 testcase[i].exp_errval, TEST_ERRNO);
 				/*If swapfile is turned on, turn it off */
 				if (TEST_RETURN == 0) {
-					if (syscall(__NR_swapoff, testcase[i].path) != 0) {
-						tst_resm(TWARN, "Failed to"
+					if (syscall
+					    (__NR_swapoff,
+					     testcase[i].path) != 0) {
+						tst_resm(TWARN,
+							 "Failed to"
 							 " turn off swapfile"
 							 " swapfile. System"
 							 " reboot after"
@@ -264,8 +267,8 @@
 int cleanup01()
 {
 	if (seteuid(0) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
-			"seteuid failed to set uid to root");
+		tst_brkm(TBROK | TERRNO, cleanup,
+			 "seteuid failed to set uid to root");
 	}
 
 	return 0;
diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c
index 18fd052..9264468 100644
--- a/testcases/kernel/syscalls/swapon/swapon03.c
+++ b/testcases/kernel/syscalls/swapon/swapon03.c
@@ -86,6 +86,7 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
 static int exp_enos[] = { EPERM, 0 };
+
 static int swapfiles;		/* Number of swapfiles turned on */
 
 struct utsname uval;
@@ -138,28 +139,31 @@
 		/* Check return code */
 		if ((TEST_RETURN == -1) && (TEST_ERRNO == expected_errno)) {
 			tst_resm(TPASS, "swapon(2) got expected failure (%d),",
-				expected_errno);
+				 expected_errno);
 		} else if (TEST_RETURN < 0) {
-			tst_resm(TFAIL|TTERRNO,
-				"swapon(2) failed to produce expected error "
-				"(%d). System reboot recommended.",
-				expected_errno);
+			tst_resm(TFAIL | TTERRNO,
+				 "swapon(2) failed to produce expected error "
+				 "(%d). System reboot recommended.",
+				 expected_errno);
 		} else {
 			/* Probably the system supports MAX_SWAPFILES > 30,
 			 * let's try with MAX_SWAPFILES == 32 */
 
 			/* Call swapon sys call once again for 32
 			 * now we can't receive an error */
-			TEST(syscall(__NR_swapon, swap_testfiles[1].filename, 0));
+			TEST(syscall
+			     (__NR_swapon, swap_testfiles[1].filename, 0));
 
 			/* Check return code (now we're expecting success) */
 			if (TEST_RETURN < 0) {
-				tst_resm(TFAIL|TTERRNO,
+				tst_resm(TFAIL | TTERRNO,
 					 "swapon(2) got an unexpected failure");
 			} else {
 				/* Call swapon sys call once again for 33
 				 * now we have to receive an error */
-				TEST(syscall(__NR_swapon, swap_testfiles[2].filename, 0));
+				TEST(syscall
+				     (__NR_swapon, swap_testfiles[2].filename,
+				      0));
 
 				/* Check return code (should be an error) */
 				if ((TEST_RETURN == -1)
@@ -213,19 +217,19 @@
 	swapfiles = 0;
 
 	if (seteuid(0) < 0) {
-		tst_brkm(TFAIL|TERRNO, cleanup, "Failed to call seteuid");
+		tst_brkm(TFAIL | TERRNO, cleanup, "Failed to call seteuid");
 	}
 
 	/* This includes the first (header) line */
 	if ((fd = open("/proc/swaps", O_RDONLY)) == -1) {
-		tst_brkm(TFAIL|TERRNO, cleanup,
+		tst_brkm(TFAIL | TERRNO, cleanup,
 			 "Failed to find out existing number of swap files");
 	}
 	do {
 		char *p = buf;
 		res = read(fd, buf, BUFSIZ);
 		if (res < 0) {
-			tst_brkm(TFAIL|TERRNO, cleanup,
+			tst_brkm(TFAIL | TERRNO, cleanup,
 				 "Failed to find out existing number of swap "
 				 "files");
 		}
@@ -241,7 +245,7 @@
 
 	if (swapfiles < 0) {
 		tst_brkm(TFAIL, cleanup,
-			"Failed to find existing number of swapfiles");
+			 "Failed to find existing number of swapfiles");
 	}
 
 	/* Determine how many more files are to be created */
@@ -269,8 +273,8 @@
 
 			/* prepare filename for the iteration */
 			if (sprintf(filename, "swapfile%02d", j + 2) < 0) {
-				printf( "sprintf() failed to create "
-					"filename");
+				printf("sprintf() failed to create "
+				       "filename");
 				exit(1);
 			}
 
@@ -283,12 +287,12 @@
 			/* turn on the swap file */
 			if ((res = syscall(__NR_swapon, filename, 0)) != 0) {
 				if (errno == EPERM) {
-					printf(	"Successfully created %d "
-						"swapfiles\n", j);
+					printf("Successfully created %d "
+					       "swapfiles\n", j);
 					break;
 				} else {
-					printf( "Failed to create "
-						"swapfile: %s\n", filename);
+					printf("Failed to create "
+					       "swapfile: %s\n", filename);
 					exit(1);
 				}
 			}
@@ -323,8 +327,8 @@
 
 	/* prepare the path string for dd command */
 	if (snprintf(cmd_buffer, sizeof(cmd_buffer),
-		    "dd if=/dev/zero of=%s bs=%d "
-		    "count=%d > tmpfile 2>&1", swapfile, bs, count) < 0) {
+		     "dd if=/dev/zero of=%s bs=%d "
+		     "count=%d > tmpfile 2>&1", swapfile, bs, count) < 0) {
 		tst_resm(TWARN,
 			 "sprintf() failed to create the command string");
 
@@ -333,13 +337,13 @@
 
 	if (system(cmd_buffer) != 0) {
 		tst_resm(TWARN, "dd command failed to create file via "
-				"command: %s", cmd_buffer);
+			 "command: %s", cmd_buffer);
 		return -1;
 	}
 
 	/* make the file swapfile */
 	if (snprintf(cmd_buffer, sizeof(cmd_buffer),
-		    "mkswap %s > tmpfile 2>&1", swapfile) < 0) {
+		     "mkswap %s > tmpfile 2>&1", swapfile) < 0) {
 		tst_resm(TWARN,
 			 "snprintf() failed to create mkswap command string");
 		return -1;
@@ -364,7 +368,7 @@
 
 	for (j = 0; j < swapfiles; j++) {
 		if (snprintf(filename, sizeof(filename),
-			    "swapfile%02d", j+2) < 0) {
+			     "swapfile%02d", j + 2) < 0) {
 			tst_resm(TWARN, "sprintf() failed to create filename");
 			tst_resm(TWARN, "Failed to turn off swap files. System"
 				 " reboot after execution of LTP test"
@@ -399,7 +403,7 @@
 	int rc = -1;
 
 	if (snprintf(cmd_buffer, sizeof(cmd_buffer),
-		    "grep -q '%s.*file' /proc/swaps", filename) < 0) {
+		     "grep -q '%s.*file' /proc/swaps", filename) < 0) {
 		tst_resm(TWARN,
 			 "sprintf() failed to create the command string");
 	} else {
@@ -412,9 +416,9 @@
 			if (syscall(__NR_swapoff, filename) != 0) {
 
 				tst_resm(TWARN, "Failed to turn off swap "
-						"file. system reboot after "
-						"execution of LTP test suite "
-						"is recommended");
+					 "file. system reboot after "
+					 "execution of LTP test suite "
+					 "is recommended");
 				rc = -1;
 
 			}
diff --git a/testcases/kernel/syscalls/symlink/symlink01.c b/testcases/kernel/syscalls/symlink/symlink01.c
index 1a42ea2..416fb08 100644
--- a/testcases/kernel/syscalls/symlink/symlink01.c
+++ b/testcases/kernel/syscalls/symlink/symlink01.c
@@ -326,66 +326,110 @@
 
 } test_objects[] = {
 	{
-		SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, { "%bc+eFhi!k", S_FILE, NULL}}, {
-		SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		SYMLINK, 0, 0, 1, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		SYMLINK, 1, EEXIST, 2, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		SYMLINK, 1, ENAMETOOLONG, 3, creat_path_max, ck_path_max, { O_FILE, S_FILE, NULL}}, {
-		READLINK, 0, 0, 4, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		READLINK, 0, 0, 4, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		READLINK, 1, ENAMETOOLONG, 5, creat_path_max, ck_path_max, { O_FILE, S_FILE, NULL}}, {
-		READLINK, 1, EINVAL, 29, creat_object, ck_object, { O_FILE, NULL, NULL}}, {
-		STAT, 0, 0, 6, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}},
+		SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, {
+	"%bc+eFhi!k", S_FILE, NULL}}, {
+		SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		SYMLINK, 0, 0, 1, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		SYMLINK, 1, EEXIST, 2, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		SYMLINK, 1, ENAMETOOLONG, 3, creat_path_max, ck_path_max, {
+	O_FILE, S_FILE, NULL}}, {
+		READLINK, 0, 0, 4, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		READLINK, 0, 0, 4, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		READLINK, 1, ENAMETOOLONG, 5, creat_path_max, ck_path_max, {
+	O_FILE, S_FILE, NULL}}, {
+		READLINK, 1, EINVAL, 29, creat_object, ck_object, {
+	O_FILE, NULL, NULL}}, {
+		STAT, 0, 0, 6, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}},
 	    /* 10 */
 	{
-		STAT, 1, ENOENT, 7, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		STAT, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}, {
-		STAT_64, 0, 0, 6, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		STAT_64, 1, ENOENT, 7, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		STAT_64, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}, {
-		LSTAT, 0, 0, 8, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		LSTAT, 0, 0, 9, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		LSTAT, 0, 0, 30, creat_object, ck_object, { O_FILE, NULL, NULL}}, {
-		LSTAT_64, 0, 0, 8, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		LSTAT_64, 0, 0, 9, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}},
+		STAT, 1, ENOENT, 7, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		STAT, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}, {
+		STAT_64, 0, 0, 6, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		STAT_64, 1, ENOENT, 7, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		STAT_64, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}, {
+		LSTAT, 0, 0, 8, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		LSTAT, 0, 0, 9, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		LSTAT, 0, 0, 30, creat_object, ck_object, {
+	O_FILE, NULL, NULL}}, {
+		LSTAT_64, 0, 0, 8, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		LSTAT_64, 0, 0, 9, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}},
 	    /* 20 */
 	{
-		LSTAT_64, 0, 0, 30, creat_object, ck_object, { O_FILE, NULL, NULL}}, {
-		MKDIR, 1, EEXIST, 10, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		RMDIR, 1, ENOTDIR, 11, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		CHDIR, 0, 0, 12, creat_symlink, ck_symlink, { O_FILE, S_FILE, O_FILE}}, {
-		CHDIR, 1, ENOENT, 13, creat_symlink, ck_symlink, { "%bc+eFhi!k", S_FILE, NULL}}, {
-		CHDIR, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}, {
-		LINK, 0, 0, 14, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		LINK, 0, 0, 15, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}},
+		LSTAT_64, 0, 0, 30, creat_object, ck_object, {
+	O_FILE, NULL, NULL}}, {
+		MKDIR, 1, EEXIST, 10, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		RMDIR, 1, ENOTDIR, 11, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		CHDIR, 0, 0, 12, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, O_FILE}}, {
+		CHDIR, 1, ENOENT, 13, creat_symlink, ck_symlink, {
+	"%bc+eFhi!k", S_FILE, NULL}}, {
+		CHDIR, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}, {
+		LINK, 0, 0, 14, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		LINK, 0, 0, 15, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}},
 	    /* The following link test case is invalid - leaving it defined so */
 	    /* I don't have to change all the entries in the all_tcses array after link */
 	    /* It has been disabled at the moment. */
 	{
-		LINK, 1, -1, -1, creat_symlink, ck_symlink, { NULL, NULL, NULL}}, {
-		UNLINK, 0, 0, 16, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}},
+		LINK, 1, -1, -1, creat_symlink, ck_symlink, {
+	NULL, NULL, NULL}}, {
+		UNLINK, 0, 0, 16, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}},
 	    /* 30 */
 	{
-		CHMOD, 0, 0, 17, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		CHMOD, 1, ENOENT, 18, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		CHMOD, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}, {
-		UTIME, 0, 0, 19, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		UTIME, 1, ENOENT, 20, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		UTIME, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}, {
-		RENAME, 0, 0, 21, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		RENAME, 0, 0, 22, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}},
+		CHMOD, 0, 0, 17, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		CHMOD, 1, ENOENT, 18, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		CHMOD, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}, {
+		UTIME, 0, 0, 19, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		UTIME, 1, ENOENT, 20, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		UTIME, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}, {
+		RENAME, 0, 0, 21, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		RENAME, 0, 0, 22, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}},
 	    /* The following rename test makes assumption that the link and target */
 	    /* files are located in different filesystems, which is incorrect. */
 	    /* It has been disabled at the moment. */
 	{
-		RENAME, 1, EXDEV, 23, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		OPEN, 0, 0, 24, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}},
+		RENAME, 1, EXDEV, 23, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		OPEN, 0, 0, 24, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}},
 	    /* 40 */
 	{
-		OPEN, 0, 0, 25, creat_both, ck_both, { O_FILE, S_FILE, O_FILE}}, {
-		OPEN, 1, EEXIST, 26, creat_symlink, ck_symlink, { O_FILE, S_FILE, O_FILE}}, {
-		OPEN, 1, ENOENT, 27, creat_symlink, ck_symlink, { O_FILE, S_FILE, NULL}}, {
-		OPEN, 1, ELOOP, 28, creat_symlink, ck_symlink, { S_FILE, S_FILE, NULL}}
+		OPEN, 0, 0, 25, creat_both, ck_both, {
+	O_FILE, S_FILE, O_FILE}}, {
+		OPEN, 1, EEXIST, 26, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, O_FILE}}, {
+		OPEN, 1, ENOENT, 27, creat_symlink, ck_symlink, {
+	O_FILE, S_FILE, NULL}}, {
+		OPEN, 1, ELOOP, 28, creat_symlink, ck_symlink, {
+	S_FILE, S_FILE, NULL}}
 };
 
 /*
@@ -400,19 +444,24 @@
 } all_tcses[] = {
 
 	{
-	SYMLINK, "symlink", 5, &test_objects[0], "Make a Symbolic Link to a File"}, {
-	READLINK, "readlink", 4, &test_objects[5], "Reads Value of a Symbolic Link"}, {
+	SYMLINK, "symlink", 5, &test_objects[0],
+		    "Make a Symbolic Link to a File"}, {
+	READLINK, "readlink", 4, &test_objects[5],
+		    "Reads Value of a Symbolic Link"}, {
 	STAT, "stat", 3, &test_objects[9],
 		    "Gets File Status Indirectly From a Symbolic Link file"}, {
 	STAT_64, "stat64", 3, &test_objects[12],
 		    "Gets File Status Indirectly From a Symbolic Link file"}, {
-	LSTAT, "lstat", 3, &test_objects[15], "Get file Status About a Symbolic Link File"}, {
+	LSTAT, "lstat", 3, &test_objects[15],
+		    "Get file Status About a Symbolic Link File"}, {
 	LSTAT_64, "lstat64", 3, &test_objects[18],
 		    "Get file Status About a Symbolic Link File"}, {
 	MKDIR, "mkdir", 1, &test_objects[21],
-		    "Fail When Making a Directory File Indirectly from a symlink"}, {
+		    "Fail When Making a Directory File Indirectly from a symlink"},
+	{
 	RMDIR, "rmdir", 1, &test_objects[22],
-		    "Fail When Removing a Directory File Indirectly from a symlink"}, {
+		    "Fail When Removing a Directory File Indirectly from a symlink"},
+	{
 	CHDIR, "chdir", 3, &test_objects[23],
 		    "Changes CWD Location Indirectly from a symlink"}, {
 	LINK, "link", 2, &test_objects[26],
@@ -420,9 +469,11 @@
 	UNLINK, "unlink", 1, &test_objects[29],
 		    "Removes a Link To a File but not the Object File"}, {
 	CHMOD, "chmod", 3, &test_objects[30],
-		    "Change Object File Permissions Indirectly From a Symbolic"}, {
+		    "Change Object File Permissions Indirectly From a Symbolic"},
+	{
 	UTIME, "utime", 3, &test_objects[33],
-		    "Set File Access And Modify Object File Times via symlink"}, {
+		    "Set File Access And Modify Object File Times via symlink"},
+	{
 	RENAME, "rename", 2, &test_objects[36],
 		    "Rename a Symbolic Link File And Not Any Object file"}, {
 OPEN, "open", 5, &test_objects[39],
@@ -490,7 +541,8 @@
 	 */
 	if ((tcs_ptr = get_tcs_info(Selectedtests)) == NULL) {
 		TST_TOTAL = 1;
-		tst_brkm(TBROK, cleanup, "Unknown symbolic link test case specification executed");
+		tst_brkm(TBROK, cleanup,
+			 "Unknown symbolic link test case specification executed");
 	}
 
    /***************************************************************
@@ -539,7 +591,8 @@
 	if (ptr == NULL) {
 
 		TST_TOTAL = 0;
-		for (ctr = 1; ctr < sizeof(all_tcses) / sizeof(struct tcses); ctr++)
+		for (ctr = 1; ctr < sizeof(all_tcses) / sizeof(struct tcses);
+		     ctr++)
 			TST_TOTAL += all_tcses[ctr].test_cases;
 		return all_tcses;
 	}
@@ -716,11 +769,15 @@
 		return 0;
 	else if ((stat(path3, &statter) == -1) && (errno == ENOENT)) {
 		TEST_RESULT = TBROK;
-		sprintf(test_msg, "stat(2) Failure when accessing %s object file ", path3);
+		sprintf(test_msg,
+			"stat(2) Failure when accessing %s object file ",
+			path3);
 		return 0;
 	} else if ((stat(path2, &asymlink) == -1) && (errno == ENOENT)) {
 		TEST_RESULT = TBROK;
-		sprintf(test_msg, "stat(2) Failure when accessing %s symbolic link file ", path2);
+		sprintf(test_msg,
+			"stat(2) Failure when accessing %s symbolic link file ",
+			path2);
 		return 0;
 	} else if (statter.st_ino != asymlink.st_ino) {
 		TEST_RESULT = TBROK;
@@ -791,7 +848,8 @@
 		sprintf(test_msg, "%s %d %s %s %s %s",
 			"full_path character array length was not",
 			(PATH_MAX + 1),
-			"characters long for test case object elements", path1, path2, path3);
+			"characters long for test case object elements", path1,
+			path2, path3);
 		return 0;
 	}
 }
@@ -869,7 +927,8 @@
 		if (strcmp(tcs->tcid, tc_ptr->tcid) != 0) {
 			tst_resm(TBROK,
 				 "%s TCID attempted to execute %s %d %d test case",
-				 tcs->tcid, tc_ptr->tcid, tc_ptr->test_fail, tc_ptr->errno_val);
+				 tcs->tcid, tc_ptr->tcid, tc_ptr->test_fail,
+				 tc_ptr->errno_val);
 			continue;
 		}
 		TEST_RESULT = TPASS;
@@ -918,7 +977,8 @@
 				ret =
 				    (tc_ptr->ck_test) (tc_ptr->fn_arg[0],
 						       tc_ptr->fn_arg[1],
-						       tc_ptr->fn_arg[2], tc_ptr->errno_val);
+						       tc_ptr->fn_arg[2],
+						       tc_ptr->errno_val);
 
 				/* Perform requested symbolic link system call test */
 
@@ -926,9 +986,12 @@
 				    (cktcsid(tc_ptr->tcid, LSTAT)) ||
 				    (cktcsid(tc_ptr->tcid, LSTAT_64))) {
 					if (ret == 1)
-						tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+						tst_resm(TEST_RESULT, "%s",
+							 msgs[tc_ptr->
+							      pass_msg]);
 					else
-						tst_resm(TEST_RESULT, "%s", test_msg);
+						tst_resm(TEST_RESULT, "%s",
+							 test_msg);
 				} else if (ret == 0)
 					tst_resm(TEST_RESULT, "%s", test_msg);
 				else if (cktcsid(tc_ptr->tcid, READLINK))
@@ -990,7 +1053,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == EEXIST))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else {
@@ -1006,7 +1070,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == EEXIST))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1015,7 +1080,8 @@
 				 "through a symbolic link file was not received:",
 				 errno, strerror(errno));
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1033,7 +1099,8 @@
 		if ((stat(tc_ptr->fn_arg[1], &asymlink) == -1)
 		    && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1044,7 +1111,8 @@
 	} else if (cktcsid(tc_ptr->tcid, CHDIR)) {
 		if ((chdir(tc_ptr->fn_arg[1]) == -1) && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else {
@@ -1060,43 +1128,50 @@
 		if ((link(tc_ptr->fn_arg[1], "nick") == -1)
 		    && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else {
 			tst_resm(TFAIL, "%s %s errno:%d %s",
 				 "Expected ENOENT error condition when link(2) a symbolic",
-				 "link which pointed at no object:", errno, strerror(errno));
+				 "link which pointed at no object:", errno,
+				 strerror(errno));
 			delete_files("nick", NULL);
 		}
 	} else if (cktcsid(tc_ptr->tcid, CHMOD)) {
 
 		if ((chmod(tc_ptr->fn_arg[1], MODE) == -1) && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
 			tst_resm(TFAIL, "%s %s errno:%d %s",
 				 "Expected ENOENT error condition when chmod(2) a symbolic",
-				 "link which pointed at no object,", errno, strerror(errno));
+				 "link which pointed at no object,", errno,
+				 strerror(errno));
 	} else if (cktcsid(tc_ptr->tcid, UTIME)) {
 
 		if ((utime(tc_ptr->fn_arg[1], NULL) == -1) && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
 			tst_resm(TFAIL, "%s %s errno:%d %s",
 				 "Expected ENOENT error condition when utime(2) a symbolic",
-				 "link which pointed at no object:", errno, strerror(errno));
+				 "link which pointed at no object:", errno,
+				 strerror(errno));
 	} else if (cktcsid(tc_ptr->tcid, OPEN)) {
 
 		if ((open(tc_ptr->fn_arg[1], O_RDWR) == -1)
 		    && (errno == ENOENT))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1105,7 +1180,8 @@
 				 " file through a symbolic link file was not received,",
 				 errno, strerror(errno));
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1124,7 +1200,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
@@ -1139,7 +1216,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else {
@@ -1156,7 +1234,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1169,7 +1248,8 @@
 		errno = TEST_ERRNO;
 		if ((TEST_RETURN == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1184,7 +1264,8 @@
 
 		if ((TEST_RETURN == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1199,7 +1280,8 @@
 		errno = TEST_ERRNO;
 		if ((fd == -1) && (errno == ELOOP))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1207,7 +1289,8 @@
 				 "Expected ELOOP error condition when open(2) a nested symbolic link:",
 				 errno, strerror(errno));
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1225,11 +1308,13 @@
 		TEST(mkdir(tc_ptr->fn_arg[0], MODE));
 		errno = TEST_ERRNO;
 		if (TEST_RETURN == -1)
-			tst_resm(TBROK, "mkdir(2) Failure when creating %s", tc_ptr->fn_arg[0]);
+			tst_resm(TBROK, "mkdir(2) Failure when creating %s",
+				 tc_ptr->fn_arg[0]);
 		else if ((rmdir(tc_ptr->fn_arg[1]) == -1) && (errno == ENOTDIR)) {
 
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 			rmdir(tc_ptr->fn_arg[0]);
@@ -1239,7 +1324,8 @@
 				 "directory through a symbolic link file was not received,",
 				 errno, strerror(errno));
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1259,14 +1345,16 @@
 		if ((TEST_RETURN == -1) && (errno == EXDEV)) {
 			if (see_if_a_symlink(Y_A_S_FILE) == -1)
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-					tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					tst_resm(TEST_RESULT, "%s",
+						 msgs[tc_ptr->pass_msg]);
 				else
 					Tst_count++;
 			else
 				tst_resm(TFAIL,
 					 "%s %s %s file outside of current file system",
 					 "rename(3) returned -1 when trying to move symbolic link file",
-					 "outside of current file system, but created", Y_A_S_FILE);
+					 "outside of current file system, but created",
+					 Y_A_S_FILE);
 		} else {
 			tst_resm(TFAIL, "%s %s errno:%d %s",
 				 "Expected EXDEV error for renaming an existing symbolic",
@@ -1275,7 +1363,8 @@
 			delete_files("/NiCkEr", NULL);
 		}
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1297,7 +1386,8 @@
 		if ((TEST_RETURN == -1) && (errno == ENAMETOOLONG))
 			if (see_if_a_symlink(full_path) == -1)
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-					tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					tst_resm(TEST_RESULT, "%s",
+						 msgs[tc_ptr->pass_msg]);
 				else
 					Tst_count++;
 			else
@@ -1307,7 +1397,7 @@
 					 (PATH_MAX + 1),
 					 "characters, but it created the symbolic link file");
 		else
-			tst_resm(TFAIL|TERRNO,
+			tst_resm(TFAIL | TERRNO,
 				 "Expected ENAMETOOLONG error when creating %s symbolic link file with a path exceeding %d characters",
 				 tc_ptr->fn_arg[1], (PATH_MAX + 1));
 	} else if (cktcsid(tc_ptr->tcid, READLINK)) {
@@ -1317,15 +1407,18 @@
 		ret = readlink(full_path, scratch, strlen(full_path));
 		if ((ret == -1) && (errno == ENAMETOOLONG))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
 			tst_resm(TFAIL,
 				 "Expected ENAMETOOLONG error when reading %s symbolic link file with a path exceeding %d characters: errno:%d %s",
-				 tc_ptr->fn_arg[1], (PATH_MAX + 1), errno, strerror(errno));
+				 tc_ptr->fn_arg[1], (PATH_MAX + 1), errno,
+				 strerror(errno));
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1344,7 +1437,8 @@
 		if (TEST_RETURN == -1) {
 			if (errno == EINVAL) {
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-					tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					tst_resm(TEST_RESULT, "%s",
+						 msgs[tc_ptr->pass_msg]);
 				else
 					Tst_count++;
 			} else
@@ -1357,7 +1451,8 @@
 				 "a file which is not a symbolic link file");
 		}
 	} else
-		tst_resm(TBROK, "Unknown test case processing actions declared");
+		tst_resm(TBROK,
+			 "Unknown test case processing actions declared");
 }
 
 /***********************************************************************
@@ -1378,9 +1473,12 @@
      /*** the TEST macro cannot be used here for some reason ****/
 
 	if (ret == -1) {
-		tst_resm(TFAIL, "readlink(2) failure on %s symbolic link file", tc_ptr->fn_arg[1]);
+		tst_resm(TFAIL, "readlink(2) failure on %s symbolic link file",
+			 tc_ptr->fn_arg[1]);
 
-	} else if (strncmp(tc_ptr->fn_arg[0], scratch, strlen(tc_ptr->fn_arg[0])) != 0) {
+	} else
+	    if (strncmp(tc_ptr->fn_arg[0], scratch, strlen(tc_ptr->fn_arg[0]))
+		!= 0) {
 
 		/* Must null terminate scratch because readlink(2) doesn't */
 
@@ -1408,27 +1506,29 @@
 	if (statter.st_dev != asymlink.st_dev)
 		tst_resm(TFAIL,
 			 "stat of symbolic link reference to object device info %jd != stat of object file device info %jd",
-			 (intmax_t)statter.st_dev, (intmax_t)asymlink.st_dev);
+			 (intmax_t) statter.st_dev, (intmax_t) asymlink.st_dev);
 
 	else if (statter.st_mode != asymlink.st_mode)
 		tst_resm(TFAIL,
 			 "stat of symbolic link reference to object file permissions %jd != stat of object file permissions %jd",
-			 (intmax_t)statter.st_mode, (intmax_t)asymlink.st_mode);
+			 (intmax_t) statter.st_mode,
+			 (intmax_t) asymlink.st_mode);
 
 	else if (statter.st_nlink != asymlink.st_nlink)
 		tst_resm(TFAIL,
 			 "stat of symbolic link reference to object file link count %jd != stat of object file link count %jd",
-			 (intmax_t)statter.st_nlink, (intmax_t)asymlink.st_nlink);
+			 (intmax_t) statter.st_nlink,
+			 (intmax_t) asymlink.st_nlink);
 
 	else if (statter.st_uid != asymlink.st_uid)
 		tst_resm(TFAIL,
 			 "stat of symbolic link reference to object file uid %jd != stat of object file uid %jd",
-			 (intmax_t)statter.st_uid, (intmax_t)asymlink.st_uid);
+			 (intmax_t) statter.st_uid, (intmax_t) asymlink.st_uid);
 
 	else if (statter.st_gid != asymlink.st_gid)
 		tst_resm(TFAIL,
 			 "stat of symbolic link reference to object file gid %jd != stat of object file gid %jd",
-			 (intmax_t)statter.st_gid, (intmax_t)asymlink.st_gid);
+			 (intmax_t) statter.st_gid, (intmax_t) asymlink.st_gid);
 
 	else if (statter.st_size != asymlink.st_size)
 		tst_resm(TFAIL,
@@ -1469,13 +1569,15 @@
 		tst_resm(TFAIL, "Could not create a setup directory file");
 	else {
 
-		sprintf(Buf, "mkdir(%s, %#o) was successful\n", tc_ptr->fn_arg[2], MODE);
+		sprintf(Buf, "mkdir(%s, %#o) was successful\n",
+			tc_ptr->fn_arg[2], MODE);
 		strcat(Buffer, Buf);
 
 		if (chdir(tc_ptr->fn_arg[1]) == -1)
 			tst_resm(TFAIL,
 				 "%sCould not change a directory file through a %s",
-				 Buffer, "symbolic link which which pointed at object");
+				 Buffer,
+				 "symbolic link which which pointed at object");
 		else {
 
 			char *cwd, *getcwd();
@@ -1492,7 +1594,8 @@
 				tst_resm(TFAIL, "getcwd(3) FAILURE");
 			else if (strcmp(cwd, expected_location) == 0)
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-					tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					tst_resm(TEST_RESULT, "%s",
+						 msgs[tc_ptr->pass_msg]);
 				else
 					Tst_count++;
 			else {
@@ -1528,7 +1631,8 @@
 			 "link of new file to object file via symbolic link file failed",
 			 "when expected not to");
 	} else {
-		sprintf(Buf, "link(%s, \"nick\") was successful\n", tc_ptr->fn_arg[1]);
+		sprintf(Buf, "link(%s, \"nick\") was successful\n",
+			tc_ptr->fn_arg[1]);
 		strcat(Buffer, Buf);
 
 		if (STD_FUNCTIONAL_TEST) {
@@ -1540,18 +1644,23 @@
 					 tc_ptr->fn_arg[1], errno);
 
 			} else if (lstat("nick", &statter) == -1) {
-				tst_resm(TBROK, "lstat(nick) failed, errno:%d", errno);
+				tst_resm(TBROK, "lstat(nick) failed, errno:%d",
+					 errno);
 			} else {
 				if (statter.st_ino == asymlink.st_ino) {
 					if ((statter.st_nlink == 2)
 					    && (asymlink.st_nlink == 2)) {
-						if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-							tst_resm(TEST_RESULT, "%s",
-								 msgs[tc_ptr->pass_msg]);
+						if (TEST_RESULT != TPASS
+						    || STD_FUNCTIONAL_TEST)
+							tst_resm(TEST_RESULT,
+								 "%s",
+								 msgs[tc_ptr->
+								      pass_msg]);
 						else
 							Tst_count++;
 					} else {
-						lstat(tc_ptr->fn_arg[2], &stbuf);
+						lstat(tc_ptr->fn_arg[2],
+						      &stbuf);
 
 						tst_resm(TFAIL,
 							 "%slink(%s, %s) failed to adjust link count.\n\
@@ -1561,7 +1670,8 @@
 					}
 				} else {
 					tst_resm(TFAIL, "%sA lstat of %s (ino:%jd) and of\n\t\t\
-%s (ino:%jd), does not show them being the same ino.", Buffer, tc_ptr->fn_arg[1], (intmax_t)asymlink.st_ino, "nick", (intmax_t)statter.st_ino);
+%s (ino:%jd), does not show them being the same ino.", Buffer,
+						 tc_ptr->fn_arg[1], (intmax_t) asymlink.st_ino, "nick", (intmax_t) statter.st_ino);
 				}
 			}
 		}
@@ -1580,9 +1690,11 @@
 struct all_test_cases *tc_ptr;
 {
 	if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
-		tst_resm(TBROK, "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
+		tst_resm(TBROK, "stat(2) Failure when accessing %s object file",
+			 tc_ptr->fn_arg[2]);
 	else if (unlink(tc_ptr->fn_arg[1]) == -1)
-		tst_resm(TFAIL, "unlink(2) failed when removing symbolic link file");
+		tst_resm(TFAIL,
+			 "unlink(2) failed when removing symbolic link file");
 	else {
 		sprintf(Buf, "unlink(%s) was successful\n", tc_ptr->fn_arg[1]);
 		strcat(Buffer, Buf);
@@ -1596,7 +1708,8 @@
 			 (statter.st_size == asymlink.st_size))
 
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1619,13 +1732,15 @@
 struct all_test_cases *tc_ptr;
 {
 	if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
-		tst_resm(TBROK, "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
+		tst_resm(TBROK, "stat(2) Failure when accessing %s object file",
+			 tc_ptr->fn_arg[2]);
 	else if (chmod(tc_ptr->fn_arg[1], (MODE | MASK)) == -1)
 		tst_resm(TFAIL, "%s%s %s", Buffer,
 			 "chmod(2) failed when changing file permission",
 			 "through symbolic link file");
 	else {
-		sprintf(Buf, "chmod(%s, %#o) was successful\n", tc_ptr->fn_arg[1], (MODE | MASK));
+		sprintf(Buf, "chmod(%s, %#o) was successful\n",
+			tc_ptr->fn_arg[1], (MODE | MASK));
 		strcat(Buffer, Buf);
 
 		if (stat(tc_ptr->fn_arg[2], &statter) == -1)
@@ -1635,13 +1750,15 @@
 		else if ((statter.st_mode == (MODE | MASK))
 			 && (statter.st_mode != asymlink.st_mode))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
 			tst_resm(TFAIL, "%s%s %o to %o %s", Buffer,
 				 "chmod(2) failed to change object file permissions from",
-				 asymlink.st_mode, (MODE | MASK), "through symbolic link file");
+				 asymlink.st_mode, (MODE | MASK),
+				 "through symbolic link file");
 	}
 
 }
@@ -1659,7 +1776,8 @@
 	struct utimbuf utimes;
 
 	if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
-		tst_resm(TBROK, "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
+		tst_resm(TBROK, "stat(2) Failure when accessing %s object file",
+			 tc_ptr->fn_arg[2]);
 	else {
 		/* Now add a few values to access and modify times */
 
@@ -1683,11 +1801,16 @@
 				time_t temp, diff;
 
 				temp = statter.st_atime - asymlink.st_atime;
-				diff = (statter.st_mtime - asymlink.st_mtime) - temp;
+				diff =
+				    (statter.st_mtime - asymlink.st_mtime) -
+				    temp;
 
 				if (!diff)
-					if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-						tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					if (TEST_RESULT != TPASS
+					    || STD_FUNCTIONAL_TEST)
+						tst_resm(TEST_RESULT, "%s",
+							 msgs[tc_ptr->
+							      pass_msg]);
 					else
 						Tst_count++;
 				else
@@ -1695,7 +1818,7 @@
 						 "%s %s %jd greater than original times",
 						 "utime(2) failed to change object file access and",
 						 "modify times through symbolic link to a value",
-						 (intmax_t)a_time_value);
+						 (intmax_t) a_time_value);
 			}
 		}
 	}
@@ -1725,7 +1848,8 @@
 	else if (pts_at_object)
 		if (ck_both(tc_ptr->fn_arg[0], A_S_FILE, tc_ptr->fn_arg[2]))
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		else
@@ -1823,19 +1947,24 @@
 			tst_resm(TFAIL,
 				 "read(2) Failed to read %zu bytes to object file opened through a symbolic link file",
 				 strlen(BIG_STRING));
-		} else if (strncmp(BIG_STRING, scratch, strlen(BIG_STRING)) != 0) {
+		} else if (strncmp(BIG_STRING, scratch, strlen(BIG_STRING)) !=
+			   0) {
 			tst_resm(TFAIL,
 				 "Content of write(2) and read(2) Failed to object file through symbolic link file was not as expected. Expected %s and read returned %s",
 				 BIG_STRING, scratch);
 		} else if (pts_at_object) {
 			if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-				tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+				tst_resm(TEST_RESULT, "%s",
+					 msgs[tc_ptr->pass_msg]);
 			else
 				Tst_count++;
 		} else {	/* Insure newly created object file is pointed at */
-			if (ck_both(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1], tc_ptr->fn_arg[0]))
+			if (ck_both
+			    (tc_ptr->fn_arg[0], tc_ptr->fn_arg[1],
+			     tc_ptr->fn_arg[0]))
 				if (TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST)
-					tst_resm(TEST_RESULT, "%s", msgs[tc_ptr->pass_msg]);
+					tst_resm(TEST_RESULT, "%s",
+						 msgs[tc_ptr->pass_msg]);
 				else
 					Tst_count++;
 			else
diff --git a/testcases/kernel/syscalls/symlink/symlink03.c b/testcases/kernel/syscalls/symlink/symlink03.c
index 1893729..49e4a8f 100644
--- a/testcases/kernel/syscalls/symlink/symlink03.c
+++ b/testcases/kernel/syscalls/symlink/symlink03.c
@@ -162,7 +162,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	/*
 	 * Invoke setup function to call individual test setup functions
@@ -249,7 +249,7 @@
 	}
 	ltpuser = getpwnam(nobody_uid);
 	if (setuid(ltpuser->pw_uid) == -1)
-		tst_resm(TINFO|TERRNO, "setuid(%d) failed", ltpuser->pw_uid);
+		tst_resm(TINFO | TERRNO, "setuid(%d) failed", ltpuser->pw_uid);
 
 	tst_tmpdir();
 
@@ -296,23 +296,23 @@
 
 	if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
 		tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
-	 }
+	}
 
 	if ((fd = open(TEST_FILE1, O_RDWR | O_CREAT, 0666)) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 
 	/* Modify mode permissions on test directory */
 	if (chmod(DIR_TEMP, FILE_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
-	 }
+	}
 	return 0;
 }
 
@@ -328,18 +328,18 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE2, errno, strerror(errno));
-	 }
+	}
 
 	if (symlink(TEST_FILE2, SYM_FILE2) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "symlink() Fails to create %s in setup2, error=%d",
 			 SYM_FILE2, errno);
-	 }
+	}
 	return 0;
 }
 
@@ -377,11 +377,11 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	if (close(fd) == -1) {
 		tst_brkm(TBROK, cleanup, "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/symlink/symlink04.c b/testcases/kernel/syscalls/symlink/symlink04.c
index 4599546..6765e47 100644
--- a/testcases/kernel/syscalls/symlink/symlink04.c
+++ b/testcases/kernel/syscalls/symlink/symlink04.c
@@ -100,7 +100,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -136,7 +136,7 @@
 					tst_brkm(TFAIL, cleanup, "lstat(2) of "
 						 "%s failed, error:%d", SYMFILE,
 						 errno);
-				 }
+				}
 
 				/* Check if the st_mode contains a link  */
 				if (!S_ISLNK(stat_buf.st_mode)) {
@@ -158,7 +158,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "unlink(%s) Failed, errno=%d : %s",
 				 SYMFILE, errno, strerror(errno));
-		 }
+		}
 		Tst_count++;	/* incr TEST_LOOP counter */
 	}
 
@@ -193,7 +193,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Close the temporary file created above */
 	if (close(fd) == -1) {
diff --git a/testcases/kernel/syscalls/symlink/symlink05.c b/testcases/kernel/syscalls/symlink/symlink05.c
index 33a02fa..74c6d06 100644
--- a/testcases/kernel/syscalls/symlink/symlink05.c
+++ b/testcases/kernel/syscalls/symlink/symlink05.c
@@ -100,7 +100,7 @@
 	if (msg != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();
 
@@ -137,7 +137,7 @@
 					tst_brkm(TFAIL, cleanup, "lstat(2) of "
 						 "%s failed, error:%d",
 						 SYMFILE, errno);
-				 }
+				}
 
 				/* Check if the st_mode contains a link  */
 				if (!S_ISLNK(stat_buf.st_mode)) {
diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
index 2208530..226f322 100644
--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
@@ -67,7 +67,7 @@
 static void setup();
 static void cleanup();
 static void setup_every_copy();
-static void mysymlinkat_test(struct test_struct* desc);
+static void mysymlinkat_test(struct test_struct *desc);
 
 #define TEST_DIR1 "olddir"
 #define TEST_DIR2 "newdir"
@@ -76,44 +76,61 @@
 #define TEST_FILE2 "newfile"
 #define TEST_FIFO "fifo"
 
-static char dpathname[256] = "%s/"TEST_DIR2"/"TEST_FILE1;
-static int olddirfd, newdirfd = -1, cwd_fd = AT_FDCWD, stdinfd = 0, crapfd = -1, deldirfd;
+static char dpathname[256] = "%s/" TEST_DIR2 "/" TEST_FILE1;
+static int olddirfd, newdirfd = -1, cwd_fd = AT_FDCWD, stdinfd = 0, crapfd =
+    -1, deldirfd;
 
 struct test_struct {
-	const char* oldfn;
-	int* newfd;
-	const char* newfn;
-	const char* referencefn1;
-	const char* referencefn2;
+	const char *oldfn;
+	int *newfd;
+	const char *newfn;
+	const char *referencefn1;
+	const char *referencefn2;
 	int expected_errno;
-} test_desc[]= {
+} test_desc[] = {
 	/* relative paths */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &newdirfd, TEST_FILE1, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* abs path at dst */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &newdirfd, dpathname, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-
-	/* relative paths to cwd */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &cwd_fd, TEST_DIR2"/"TEST_FILE1, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0 },
-	/* abs path */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &cwd_fd, dpathname, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-
-	/* relative paths to invalid */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &stdinfd, TEST_DIR2"/"TEST_FILE1, 0, 0, ENOTDIR },
-	/* abs path at dst */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &stdinfd, dpathname, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-
-	/* relative paths to crap */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &crapfd, TEST_DIR2"/"TEST_FILE1, 0, 0, EBADF },
-	/* abs path at dst */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &crapfd, dpathname, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-
-	/* relative paths to deleted */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &deldirfd, TEST_DIR2"/"TEST_FILE1, 0, 0, ENOENT },
-	/* abs path at dst */
-	{ "../"TEST_DIR1"/"TEST_FILE1, &deldirfd, dpathname, TEST_DIR1"/"TEST_FILE1, TEST_DIR2"/"TEST_FILE1, 0},
-
-	/* fifo link */
-	/*	{ TEST_FIFO, &newdirfd, TEST_FILE1, TEST_DIR1"/"TEST_FIFO, TEST_DIR2"/"TEST_FILE1, 0 },*/
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &newdirfd, TEST_FILE1,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* abs path at dst */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &newdirfd, dpathname,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* relative paths to cwd */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &cwd_fd,
+		    TEST_DIR2 "/" TEST_FILE1, TEST_DIR1 "/" TEST_FILE1,
+		    TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* abs path */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &cwd_fd, dpathname,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* relative paths to invalid */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &stdinfd,
+		    TEST_DIR2 "/" TEST_FILE1, 0, 0, ENOTDIR},
+	    /* abs path at dst */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &stdinfd, dpathname,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* relative paths to crap */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &crapfd,
+		    TEST_DIR2 "/" TEST_FILE1, 0, 0, EBADF},
+	    /* abs path at dst */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &crapfd, dpathname,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* relative paths to deleted */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &deldirfd,
+		    TEST_DIR2 "/" TEST_FILE1, 0, 0, ENOENT},
+	    /* abs path at dst */
+	{
+	"../" TEST_DIR1 "/" TEST_FILE1, &deldirfd, dpathname,
+		    TEST_DIR1 "/" TEST_FILE1, TEST_DIR2 "/" TEST_FILE1, 0},
+	    /* fifo link */
+	    /*      { TEST_FIFO, &newdirfd, TEST_FILE1, TEST_DIR1"/"TEST_FIFO, TEST_DIR2"/"TEST_FILE1, 0 }, */
 };
 
 char *TCID = "symlinkat01";	/* Test program identifier.    */
@@ -127,10 +144,9 @@
 			ret;}))
 
 static int mysymlinkat(const char *oldfilename,
-	     int newdirfd, const char *newfilename)
+		       int newdirfd, const char *newfilename)
 {
-	return syscall(__NR_symlinkat, oldfilename, newdirfd,
-		       newfilename);
+	return syscall(__NR_symlinkat, oldfilename, newdirfd, newfilename);
 }
 
 int main(int ac, char **av)
@@ -189,10 +205,12 @@
 	rmobj(TEST_DIR2, NULL);
 
 	SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed: %s", TEST_DIR2, 0700);
-	newdirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR2, O_DIRECTORY);
+	newdirfd =
+	    SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR2,
+			   O_DIRECTORY);
 }
 
-static void mysymlinkat_test(struct test_struct* desc)
+static void mysymlinkat_test(struct test_struct *desc)
 {
 	int fd;
 
@@ -208,37 +226,54 @@
 			/* No Verification test, yet... */
 
 			if (TEST_RETURN == 0 && desc->referencefn1 != NULL) {
-				int tnum=rand(), vnum=~tnum;
+				int tnum = rand(), vnum = ~tnum;
 				int len;
-				fd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", desc->referencefn1, O_RDWR);
-				if ((len=write(fd, &tnum, sizeof(tnum))) != sizeof(tnum))
-					tst_brkm(TBROK, cleanup, "write() failed: expected %zu, returned %d; error: %s", sizeof(tnum), len, strerror(errno));
-				SUCCEED_OR_DIE(close, "close(%d) failed: %s", fd);
+				fd = SUCCEED_OR_DIE(open,
+						    "open(%s, 0x%x) failed: %s",
+						    desc->referencefn1, O_RDWR);
+				if ((len =
+				     write(fd, &tnum,
+					   sizeof(tnum))) != sizeof(tnum))
+					tst_brkm(TBROK, cleanup,
+						 "write() failed: expected %zu, returned %d; error: %s",
+						 sizeof(tnum), len,
+						 strerror(errno));
+				SUCCEED_OR_DIE(close, "close(%d) failed: %s",
+					       fd);
 
-				fd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", desc->referencefn2, O_RDONLY);
-				if ((len=read(fd, &vnum, sizeof(vnum))) != sizeof(tnum))
-					tst_brkm(TBROK, cleanup, "read() failed: expected %zu, returned %d; error: %s", sizeof(vnum), len, strerror(errno));
-				SUCCEED_OR_DIE(close, "close(%d) failed: %s", fd);
+				fd = SUCCEED_OR_DIE(open,
+						    "open(%s, 0x%x) failed: %s",
+						    desc->referencefn2,
+						    O_RDONLY);
+				if ((len =
+				     read(fd, &vnum,
+					  sizeof(vnum))) != sizeof(tnum))
+					tst_brkm(TBROK, cleanup,
+						 "read() failed: expected %zu, returned %d; error: %s",
+						 sizeof(vnum), len,
+						 strerror(errno));
+				SUCCEED_OR_DIE(close, "close(%d) failed: %s",
+					       fd);
 
 				if (tnum == vnum)
 					tst_resm(TPASS, "Test passed");
 				else
 					tst_resm(TFAIL,
-									 "The link file's content isn't as same as the original file's "
-									 "although symlinkat returned 0");
-			}
-			else
+						 "The link file's content isn't as same as the original file's "
+						 "although symlinkat returned 0");
+			} else
 				tst_resm(TPASS,
-								 "symlinkat() returned the expected  errno %d: %s",
-								 TEST_ERRNO,
-								 strerror(TEST_ERRNO));
+					 "symlinkat() returned the expected  errno %d: %s",
+					 TEST_ERRNO, strerror(TEST_ERRNO));
 		} else
 			tst_resm(TPASS, "Test passed");
 	} else {
 		TEST_ERROR_LOG(TEST_ERRNO);
 		tst_resm(TFAIL,
-						 TEST_RETURN == 0 ? "symlinkat() surprisingly succeeded" : "symlinkat() Failed, errno=%d : %s",
-						 TEST_ERRNO, strerror(TEST_ERRNO));
+			 TEST_RETURN ==
+			 0 ? "symlinkat() surprisingly succeeded" :
+			 "symlinkat() Failed, errno=%d : %s", TEST_ERRNO,
+			 strerror(TEST_ERRNO));
 	}
 }
 
@@ -255,11 +290,17 @@
 
 	SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed: %s", TEST_DIR1, 0700);
 	SUCCEED_OR_DIE(mkdir, "mkdir(%s, %o) failed: %s", TEST_DIR3, 0700);
-	olddirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR1, O_DIRECTORY);
-	deldirfd = SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR3, O_DIRECTORY);
+	olddirfd =
+	    SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR1,
+			   O_DIRECTORY);
+	deldirfd =
+	    SUCCEED_OR_DIE(open, "open(%s, 0x%x) failed: %s", TEST_DIR3,
+			   O_DIRECTORY);
 	SUCCEED_OR_DIE(rmdir, "rmdir(%s) failed: %s", TEST_DIR3);
 	SUCCEED_OR_DIE(close, "close(%d) failed: %s",
-								 SUCCEED_OR_DIE(open, "open(%s, 0x%x, %o) failed: %s", TEST_DIR1"/"TEST_FILE1, O_CREAT | O_EXCL, 0600));
+		       SUCCEED_OR_DIE(open, "open(%s, 0x%x, %o) failed: %s",
+				      TEST_DIR1 "/" TEST_FILE1,
+				      O_CREAT | O_EXCL, 0600));
 
 	/* gratuitous memory leak here */
 	tmp = strdup(dpathname);
diff --git a/testcases/kernel/syscalls/sync/sync02.c b/testcases/kernel/syscalls/sync/sync02.c
index 31605e5..886d762 100644
--- a/testcases/kernel/syscalls/sync/sync02.c
+++ b/testcases/kernel/syscalls/sync/sync02.c
@@ -124,7 +124,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek() "
 						 "failed on %s, error=%d",
 						 TEMP_FILE, errno);
-				 }
+				}
 
 				/* Read the contents of file */
 				if (read(fildes, read_buffer,
@@ -142,7 +142,7 @@
 					tst_brkm(TFAIL, cleanup,
 						 "read() Fails on %s, error=%d",
 						 TEMP_FILE, errno);
-				 }
+				}
 			} else {
 				tst_resm(TPASS, "call succeeded");
 			}
@@ -184,7 +184,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR | O_CREAT, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Write the buffer data into file */
 	if (write(fildes, write_buffer, strlen(write_buffer) + 1) !=
@@ -192,7 +192,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "write() failed to write buffer data to %s",
 			 TEMP_FILE);
-	 }
+	}
 
 }
 
diff --git a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
index 1a5e681..de2ea3e 100644
--- a/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
+++ b/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c
@@ -108,7 +108,7 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "sync_file_range01";	/* test program identifier.	  */
+char *TCID = "sync_file_range01";	/* test program identifier.       */
 char filename[255];		/* file used for testing */
 char spl_file[] = "/dev/null";
 int filed, sfd;			/* normal and special fds */
@@ -121,11 +121,12 @@
 	unsigned int flags;
 	int error;
 } test_data[] = {
-	{ &bfd, 0, 1, SYNC_FILE_RANGE_WRITE, EBADF},
-	{ &sfd, 0, 1, SYNC_FILE_RANGE_WAIT_AFTER, ESPIPE},
-	{ &filed, -1, 1, SYNC_FILE_RANGE_WAIT_BEFORE, EINVAL},
-	{ &filed, 0, -1, SYNC_FILE_RANGE_WRITE, EINVAL},
-	{ &filed, 0, 1, SYNC_FILE_RANGE_INVALID, EINVAL}
+	{
+	&bfd, 0, 1, SYNC_FILE_RANGE_WRITE, EBADF}, {
+	&sfd, 0, 1, SYNC_FILE_RANGE_WAIT_AFTER, ESPIPE}, {
+	&filed, -1, 1, SYNC_FILE_RANGE_WAIT_BEFORE, EINVAL}, {
+	&filed, 0, -1, SYNC_FILE_RANGE_WRITE, EINVAL}, {
+	&filed, 0, 1, SYNC_FILE_RANGE_INVALID, EINVAL}
 };
 
 int TST_TOTAL = sizeof(test_data) / sizeof(test_data[0]);
@@ -158,7 +159,7 @@
 
 	/* close the file we have open */
 	if (close(filed) == -1) {
-		tst_resm(TWARN|TERRNO, "close(%s) failed", filename);
+		tst_resm(TWARN | TERRNO, "close(%s) failed", filename);
 	}
 
 	tst_rmdir();
@@ -193,11 +194,11 @@
 
 	sprintf(filename, "tmpfile_%d", getpid());
 	if ((filed = open(filename, O_RDWR | O_CREAT, 0700)) == -1) {
-		tst_brkm(TBROK|TERRNO, cleanup,
+		tst_brkm(TBROK | TERRNO, cleanup,
 			 "open(%s, O_RDWR|O_CREAT,0700) failed", filename);
 	}
 
-	sfd = open(spl_file, O_RDWR|O_CREAT, 0700);
+	sfd = open(spl_file, O_RDWR | O_CREAT, 0700);
 }
 
 /*****************************************************************************
@@ -255,13 +256,15 @@
 
 #if defined(__powerpc__) || defined(__powerpc64__)	/* for PPC, kernel version > 2.6.21 needed */
 	if (tst_kvercmp(2, 16, 22) < 0) {
-		tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
+		tst_brkm(TCONF, NULL,
+			 "System doesn't support execution of the test");
 	}
 #else
 	/* For other archs, need kernel version > 2.6.16 */
 
 	if (tst_kvercmp(2, 6, 17) < 0) {
-		tst_brkm(TCONF, NULL, "System doesn't support execution of the test");
+		tst_brkm(TCONF, NULL,
+			 "System doesn't support execution of the test");
 	}
 #endif
 
@@ -276,19 +279,18 @@
 
 		if (TEST_RETURN != -1) {
 			tst_resm(TFAIL,
-				"call succeeded unexpectedly (%ld != -1)",
-				TEST_RETURN);
+				 "call succeeded unexpectedly (%ld != -1)",
+				 TEST_RETURN);
 			continue;
 		}
 
 		TEST_ERROR_LOG(TEST_ERRNO);
 
 		if (TEST_ERRNO == test_data[test_index].error) {
-			tst_resm(TPASS|TTERRNO, "got expected error");
+			tst_resm(TPASS | TTERRNO, "got expected error");
 		} else {
-			tst_resm(TFAIL|TTERRNO, "got unexpected error; "
-				 "expected %d",
-				 test_data[test_index].error);
+			tst_resm(TFAIL | TTERRNO, "got unexpected error; "
+				 "expected %d", test_data[test_index].error);
 		}
 
 	}
diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
index b6abeb8..cc806d9 100644
--- a/testcases/kernel/syscalls/sysconf/sysconf01.c
+++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
@@ -64,11 +64,11 @@
 			break;
 		case 0:
 			tst_resm(TCONF, "Not supported sysconf resource: %s",
-					strname);
+				 strname);
 			break;
 		default:
 			tst_resm(TFAIL | TERRNO, "Unexpected errno value for "
-						 "%s", strname);
+				 "%s", strname);
 			break;
 		}
 	} else
@@ -164,7 +164,7 @@
 				 "errno (%i) != actual (%i)", EINVAL, actual);
 		} else
 			tst_resm(TPASS, "The invalid sysconf key was trapped "
-					"appropriately");
+				 "appropriately");
 	}
 
 	tst_exit();
diff --git a/testcases/kernel/syscalls/sysctl/sysctl01.c b/testcases/kernel/syscalls/sysctl/sysctl01.c
index 6939371..ed2d067 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl01.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl01.c
@@ -56,7 +56,7 @@
 int TST_TOTAL = 3;
 
 static int sysctl(int *name, int nlen, void *oldval, size_t * oldlenp,
-	   void *newval, size_t newlen)
+		  void *newval, size_t newlen)
 {
 	struct __sysctl_args args =
 	    { name, nlen, oldval, oldlenp, newval, newlen };
@@ -133,11 +133,13 @@
 
 			if (TEST_RETURN != 0) {
 				if (TEST_ERRNO == ENOSYS) {
-					tst_resm(TCONF, "You may need to make CONFIG_SYSCTL_SYSCALL=y"
-							" to your kernel config.");
+					tst_resm(TCONF,
+						 "You may need to make CONFIG_SYSCTL_SYSCALL=y"
+						 " to your kernel config.");
 				} else {
-					tst_resm(TFAIL, "sysctl(2) failed unexpectedly "
-							"errno:%d", TEST_ERRNO);
+					tst_resm(TFAIL,
+						 "sysctl(2) failed unexpectedly "
+						 "errno:%d", TEST_ERRNO);
 				}
 				continue;
 			}
diff --git a/testcases/kernel/syscalls/sysctl/sysctl03.c b/testcases/kernel/syscalls/sysctl/sysctl03.c
index 34179c2..09713d7 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl03.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl03.c
@@ -103,8 +103,7 @@
 	pid_t pid;
 	struct passwd *ltpuser;
 
-	if ((msg = parse_opts(ac, av, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -114,7 +113,8 @@
 		exp_eno = EPERM;
 	} else {
 		/* ^^ Look above this warning. ^^ */
-		tst_resm(TWARN, "this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details");
+		tst_resm(TWARN,
+			 "this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details");
 		exp_eno = EACCES;
 		exp_enos[0] = EACCES;
 	}
@@ -137,12 +137,14 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == exp_eno) {
-				tst_resm(TPASS|TTERRNO, "Got expected error");
+				tst_resm(TPASS | TTERRNO, "Got expected error");
 			} else if (errno == ENOSYS) {
-				tst_resm(TCONF, "You may need to make CONFIG_SYSCTL_SYSCALL=y"
-						" to your kernel config.");
+				tst_resm(TCONF,
+					 "You may need to make CONFIG_SYSCTL_SYSCALL=y"
+					 " to your kernel config.");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "Got unexpected error");
+				tst_resm(TFAIL | TTERRNO,
+					 "Got unexpected error");
 			}
 		}
 
@@ -170,14 +172,15 @@
 				TEST_ERROR_LOG(TEST_ERRNO);
 
 				if (TEST_ERRNO == exp_eno) {
-					tst_resm(TPASS|TTERRNO,
-						"Got expected error");
+					tst_resm(TPASS | TTERRNO,
+						 "Got expected error");
 				} else if (TEST_ERRNO == ENOSYS) {
-					tst_resm(TCONF, "You may need to make CONFIG_SYSCTL_SYSCALL=y"
-							" to your kernel config.");
+					tst_resm(TCONF,
+						 "You may need to make CONFIG_SYSCTL_SYSCALL=y"
+						 " to your kernel config.");
 				} else {
-					tst_resm(TFAIL|TTERRNO,
-						"Got unexpected error");
+					tst_resm(TFAIL | TTERRNO,
+						 "Got unexpected error");
 				}
 			}
 
diff --git a/testcases/kernel/syscalls/sysctl/sysctl04.c b/testcases/kernel/syscalls/sysctl/sysctl04.c
index 8c0b3ae..3e41418 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl04.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl04.c
@@ -127,8 +127,9 @@
 					 "errno = %d : %s", TEST_ERRNO,
 					 strerror(TEST_ERRNO));
 			} else if (TEST_ERRNO == ENOSYS) {
-				tst_resm(TCONF, "You may need to make CONFIG_SYSCTL_SYSCALL=y"
-						" to your kernel config.");
+				tst_resm(TCONF,
+					 "You may need to make CONFIG_SYSCTL_SYSCALL=y"
+					 " to your kernel config.");
 			} else {
 				tst_resm(TFAIL, "unexpected error - %d : %s - "
 					 "expected %d", TEST_ERRNO,
diff --git a/testcases/kernel/syscalls/sysctl/sysctl05.c b/testcases/kernel/syscalls/sysctl/sysctl05.c
index 35a1868..4ec4e20 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl05.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl05.c
@@ -137,15 +137,16 @@
 			TEST_ERROR_LOG(TEST_ERRNO);
 
 			if (TEST_ERRNO == ENOSYS) {
-				tst_resm(TCONF, "You may need to make CONFIG_SYSCTL_SYSCALL=y"
-						" to your kernel config.");
+				tst_resm(TCONF,
+					 "You may need to make CONFIG_SYSCTL_SYSCALL=y"
+					 " to your kernel config.");
 			} else if (TEST_ERRNO != testcases[i].exp_errno) {
 				tst_resm(TFAIL, "sysctl(2) returned unexpected "
 					 "errno, expected: %d, got: %d",
 					 testcases[i].exp_errno, errno);
 			} else {
 				tst_resm(TPASS, "sysctl(2) set errno correctly "
-						"to %d", testcases[i].exp_errno);
+					 "to %d", testcases[i].exp_errno);
 			}
 
 			if (testcases[i].cleanup) {
diff --git a/testcases/kernel/syscalls/sysfs/sysfs05.c b/testcases/kernel/syscalls/sysfs/sysfs05.c
index 1bf492b..ad7c218 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs05.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs05.c
@@ -92,6 +92,7 @@
 	"Invalid filesystem name", EINVAL, "EINVAL "}, {
 	"Address is out of your address space", EFAULT, "EFAULT "}
 };
+
 int TST_TOTAL = sizeof(testcase) / sizeof(*testcase);
 
 int main(int ac, char **av)
diff --git a/testcases/kernel/syscalls/sysfs/sysfs06.c b/testcases/kernel/syscalls/sysfs/sysfs06.c
index a4ff3ce..7a986b2 100644
--- a/testcases/kernel/syscalls/sysfs/sysfs06.c
+++ b/testcases/kernel/syscalls/sysfs/sysfs06.c
@@ -93,6 +93,7 @@
 	"fs_index is out of bounds", EINVAL, "EINVAL"}, {
 	"buf is outside your accessible address space", EFAULT, "EFAULT"}
 };
+
 int TST_TOTAL = sizeof(testcase) / sizeof(*testcase);
 
 char *bad_addr = 0;
diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo01.c b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
index 5df5b3c..356e263 100644
--- a/testcases/kernel/syscalls/sysinfo/sysinfo01.c
+++ b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
@@ -92,7 +92,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* Global setup */
 
@@ -108,7 +108,7 @@
 			/* To gather stats on errnos returned, log the errno */
 			tst_brkm(TFAIL, cleanup, "sysinfo() Failed, errno=%d"
 				 " : %s", TEST_ERRNO, strerror(TEST_ERRNO));
-		 } else {
+		} else {
 			/* Test succeeded */
 
 			/* This portion of the code generates information
@@ -145,7 +145,8 @@
 				printf("procs %lu\n",
 				       (unsigned long)sys_buf->procs);
 			} else {
-				tst_resm(TPASS, "Test to check the return code PASSED");
+				tst_resm(TPASS,
+					 "Test to check the return code PASSED");
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo02.c b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
index e6bac21..ad727e5 100644
--- a/testcases/kernel/syscalls/sysinfo/sysinfo02.c
+++ b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
@@ -91,7 +91,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* Global setup */
 
@@ -105,13 +105,14 @@
 		/* check return code */
 		if (TEST_RETURN != 0 && TEST_ERRNO == EFAULT) {
 			/* Test succeeded as it was supposed to return -1 */
-			tst_resm(TPASS, "Test to check the error code %d PASSED",
+			tst_resm(TPASS,
+				 "Test to check the error code %d PASSED",
 				 TEST_ERRNO);
 		} else {
 			/* Test Failed */
 			tst_brkm(TFAIL, cleanup, "sysinfo() Failed, Expected -1"
 				 "returned %d/n", TEST_ERRNO);
-		 }
+		}
 	}
 	cleanup();
 	tst_exit();
diff --git a/testcases/kernel/syscalls/syslog/syslog11.c b/testcases/kernel/syscalls/syslog/syslog11.c
index e20be54..c013970 100644
--- a/testcases/kernel/syscalls/syslog/syslog11.c
+++ b/testcases/kernel/syscalls/syslog/syslog11.c
@@ -74,7 +74,6 @@
 
 #define UNEXP_RET_VAL	-1
 
-
 struct test_case_t {		/* test case structure */
 	int type;		/* 1st arg. */
 	char *buf;		/* 2nd arg. */
@@ -121,8 +120,7 @@
 	int lc;
 	char *msg;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 	setup();
@@ -199,7 +197,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	/* Check for nobody_uid user id */
 	if ((ltpuser = getpwnam("nobody")) == NULL) {
@@ -227,4 +225,4 @@
 
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/syslog/syslog12.c b/testcases/kernel/syscalls/syslog/syslog12.c
index 73fc8b7..3e3813f 100644
--- a/testcases/kernel/syscalls/syslog/syslog12.c
+++ b/testcases/kernel/syscalls/syslog/syslog12.c
@@ -84,7 +84,6 @@
 
 #define EXP_RET_VAL	-1
 
-
 struct test_case_t {		/* test case structure */
 	int type;		/* 1st arg */
 	char *buf;		/* 2nd arg */
@@ -98,6 +97,7 @@
 char *TCID = "syslog12";
 static int testno;
 static int exp_enos[] = { EPERM, EINVAL, 0 };
+
 static char buf;
 static struct passwd *ltpuser;
 
@@ -132,8 +132,7 @@
 	struct sigaction sa;
 	int ret;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -222,7 +221,7 @@
 	/* Check whether we are root  */
 	if (geteuid() != 0) {
 		tst_brkm(TBROK, NULL, "Must be root for this test!");
-	 }
+	}
 
 	/* Check for nobody_uid user id */
 	if ((ltpuser = getpwnam("nobody")) == NULL) {
@@ -253,4 +252,4 @@
 
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/syslog/syslogtst.c b/testcases/kernel/syscalls/syslog/syslogtst.c
index 4b364e8..fad6fc0 100644
--- a/testcases/kernel/syscalls/syslog/syslogtst.c
+++ b/testcases/kernel/syscalls/syslog/syslogtst.c
@@ -91,7 +91,7 @@
 	}
 
 	/* Ensure ch1 is properly allocated when ch == 2 or ch == 8. */
-	assert (!((ch == 2 || ch == 8) && ch1 == -1));
+	assert(!((ch == 2 || ch == 8) && ch1 == -1));
 
 	/*
 	 * Send syslog messages according to the case number, which
diff --git a/testcases/kernel/syscalls/time/time02.c b/testcases/kernel/syscalls/time/time02.c
index d0a6d44..ec85b0e 100644
--- a/testcases/kernel/syscalls/time/time02.c
+++ b/testcases/kernel/syscalls/time/time02.c
@@ -124,12 +124,12 @@
 				if (tloc == TEST_RETURN) {
 					tst_resm(TPASS, "time() returned value "
 						 "%ld, stored value %jd are same",
-						 TEST_RETURN, (intmax_t)tloc);
+						 TEST_RETURN, (intmax_t) tloc);
 				} else {
 					tst_resm(TFAIL, "time() returned value "
 						 "%ld, stored value %jd are "
 						 "different", TEST_RETURN,
-						 (intmax_t)tloc);
+						 (intmax_t) tloc);
 				}
 			} else {
 				tst_resm(TPASS, "call succeeded");
diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
index bcb58d6..5bfa31e 100644
--- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
@@ -57,9 +57,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "timer_getoverrun01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;                   /* total number of tests in this file.   */
+char *TCID = "timer_getoverrun01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -79,12 +79,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -105,11 +106,12 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
+void setup()
+{
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
 char tmpname[40];
@@ -119,53 +121,64 @@
 #define ENTER(normal) tst_resm(TINFO, "Enter block %d: test %d (%s)", \
                          block, Tst_count, normal?"NORMAL":"ERROR");
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int lc;
 	char *msg;
 	kernel_timer_t created_timer_id;
-        struct sigevent ev;
+	struct sigevent ev;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-		ev.sigev_value = (sigval_t)0;
-                ev.sigev_signo = SIGALRM;
-                ev.sigev_notify = SIGEV_SIGNAL;
+			ev.sigev_value = (sigval_t) 0;
+			ev.sigev_signo = SIGALRM;
+			ev.sigev_notify = SIGEV_SIGNAL;
 
-                TEST(syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &created_timer_id ));
+			TEST(syscall
+			     (__NR_timer_create, CLOCK_REALTIME, &ev,
+			      &created_timer_id));
 
-		ENTER(1);
-                TEST( syscall(__NR_timer_getoverrun, created_timer_id ));
-		if (TEST_RETURN == 0) {
-			tst_resm(TPASS, "Block %d: test %d PASSED", block, Tst_count );
-                } else {
-			tst_resm(TFAIL, "Block %d: test %d FAILED... errno = %d : %s", block, Tst_count,TEST_ERRNO, strerror(TEST_ERRNO) );
-                        cleanup();
-                        tst_exit();
-                }
+			ENTER(1);
+			TEST(syscall(__NR_timer_getoverrun, created_timer_id));
+			if (TEST_RETURN == 0) {
+				tst_resm(TPASS, "Block %d: test %d PASSED",
+					 block, Tst_count);
+			} else {
+				tst_resm(TFAIL,
+					 "Block %d: test %d FAILED... errno = %d : %s",
+					 block, Tst_count, TEST_ERRNO,
+					 strerror(TEST_ERRNO));
+				cleanup();
+				tst_exit();
+			}
 
-		ENTER(0);
-                TEST( syscall(__NR_timer_getoverrun, -1 ));
-                if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL) {
-                        tst_resm(TPASS, "Block %d: test %d PASSED", block, Tst_count );
-                } else {
-                        tst_resm(TFAIL, "Block %d: test %d FAILED... errno = %d : %s", block, Tst_count,TEST_ERRNO, strerror(TEST_ERRNO) );
-                        cleanup();
-                        tst_exit();
-                }
+			ENTER(0);
+			TEST(syscall(__NR_timer_getoverrun, -1));
+			if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL) {
+				tst_resm(TPASS, "Block %d: test %d PASSED",
+					 block, Tst_count);
+			} else {
+				tst_resm(TFAIL,
+					 "Block %d: test %d FAILED... errno = %d : %s",
+					 block, Tst_count, TEST_ERRNO,
+					 strerror(TEST_ERRNO));
+				cleanup();
+				tst_exit();
+			}
 
-                }
-        }
+		}
+	}
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
 
 /*
diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
index c3fa95f..bbabc57 100644
--- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
@@ -56,9 +56,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "timer_gettime01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 3;                   /* total number of tests in this file.   */
+char *TCID = "timer_gettime01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 3;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -78,7 +78,8 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -103,7 +104,8 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -118,7 +120,8 @@
 int parent;
 int block = 1;
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int lc;
 	char *msg;
 
@@ -135,20 +138,20 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			ENTER(1);
-			ev.sigev_value = (sigval_t)0;
+			ev.sigev_value = (sigval_t) 0;
 			ev.sigev_signo = SIGALRM;
 			ev.sigev_notify = SIGEV_SIGNAL;
 			TEST(syscall(__NR_timer_create, CLOCK_REALTIME, &ev,
-				&created_timer_id));
+				     &created_timer_id));
 			TEST(syscall(__NR_timer_gettime, created_timer_id,
-				&spec));
+				     &spec));
 			if (TEST_RETURN == 0) {
 				tst_resm(TPASS, "Block %d: test %d PASSED",
-					block, Tst_count);
+					 block, Tst_count);
 			} else {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "Block %d: test %d FAILED",
-				    block, Tst_count);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "Block %d: test %d FAILED",
+					 block, Tst_count);
 			}
 
 /*
@@ -161,12 +164,12 @@
 			TEST(syscall(__NR_timer_gettime, -1, &spec));
 			if (TEST_RETURN < 0 && TEST_ERRNO == EINVAL) {
 				tst_resm(TPASS,
-				    "Block %d: test %d PASSED",
-				    block, Tst_count);
+					 "Block %d: test %d PASSED",
+					 block, Tst_count);
 			} else {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "Block %d: test %d FAILED",
-				    block, Tst_count);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "Block %d: test %d FAILED",
+					 block, Tst_count);
 			}
 
 /*
@@ -177,15 +180,15 @@
 
 			ENTER(0);
 			TEST(syscall(__NR_timer_gettime, created_timer_id,
-			    NULL));
-			if (TEST_RETURN < 0 && TEST_ERRNO == EFAULT ) {
+				     NULL));
+			if (TEST_RETURN < 0 && TEST_ERRNO == EFAULT) {
 				tst_resm(TPASS,
-				    "Block %d: test %d PASSED",
-				    block, Tst_count);
+					 "Block %d: test %d PASSED",
+					 block, Tst_count);
 			} else {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "Block %d: test %d FAILED",
-				    block, Tst_count);
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "Block %d: test %d FAILED",
+					 block, Tst_count);
 			}
 
 		}
diff --git a/testcases/kernel/syscalls/timerfd/timerfd02.c b/testcases/kernel/syscalls/timerfd/timerfd02.c
index 08c782b..7ee1c6c 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd02.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd02.c
@@ -67,7 +67,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define TFD_CLOEXEC O_CLOEXEC
diff --git a/testcases/kernel/syscalls/timerfd/timerfd03.c b/testcases/kernel/syscalls/timerfd/timerfd03.c
index 5d05090..f24da66 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd03.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd03.c
@@ -63,7 +63,7 @@
 #include "linux_syscall_numbers.h"
 
 #ifndef O_CLOEXEC
-# define O_CLOEXEC 02000000
+#define O_CLOEXEC 02000000
 #endif
 
 #define TFD_NONBLOCK O_NONBLOCK
diff --git a/testcases/kernel/syscalls/times/times01.c b/testcases/kernel/syscalls/times/times01.c
index 9a2bb30..4ae4848 100644
--- a/testcases/kernel/syscalls/times/times01.c
+++ b/testcases/kernel/syscalls/times/times01.c
@@ -146,11 +146,10 @@
 		TEST(times(&mytimes));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "times failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "times(&mytimes) returned %ld",
-					 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "times failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "times(&mytimes) returned %ld",
+				 TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/times/times03.c b/testcases/kernel/syscalls/times/times03.c
index 4d71734..a261492 100644
--- a/testcases/kernel/syscalls/times/times03.c
+++ b/testcases/kernel/syscalls/times/times03.c
@@ -58,6 +58,7 @@
 char *TCID = "times03";
 int TST_TOTAL = 1;
 int exp_enos[] = { 0 };
+
 volatile int timeout;		/* Did we timeout in alarm() ? */
 
 void work(void);
@@ -91,7 +92,7 @@
 	sa.sa_flags = SA_SIGINFO;
 
 	if (sigaction(SIGALRM, &sa, NULL) < 0)
-		tst_brkm(TBROK|TERRNO, cleanup, "Sigaction failed !\n");
+		tst_brkm(TBROK | TERRNO, cleanup, "Sigaction failed !\n");
 
 	timeout = 0;
 	alarm(3);
@@ -107,14 +108,14 @@
 	start_time = time(NULL);
 	for (;;) {
 		if (times(&buf1) == -1)
-			tst_resm(TFAIL|TERRNO, "times failed");
+			tst_resm(TFAIL | TERRNO, "times failed");
 		end_time = time(NULL);
 		if ((end_time - start_time) > 5) {
 			break;
 		}
 	}
 	if (times(&buf1) == -1)
-		tst_resm(TFAIL|TERRNO, "times failed");
+		tst_resm(TFAIL | TERRNO, "times failed");
 	else {
 		/*
 		 * Perform functional verification if test
@@ -122,8 +123,7 @@
 		 */
 		if (STD_FUNCTIONAL_TEST) {
 			if (buf1.tms_utime == 0)
-				tst_resm(TFAIL, "times report "
-					 "0 user time");
+				tst_resm(TFAIL, "times report " "0 user time");
 			if (buf1.tms_stime == 0)
 				tst_resm(TFAIL, "times report "
 					 "0 system time");
@@ -140,7 +140,7 @@
 			pid2 = FORK_OR_VFORK();
 			if (pid2 < 0) {
 				tst_brkm(TFAIL, cleanup, "Fork failed");
-			 } else if (pid2 == 0) {
+			} else if (pid2 == 0) {
 
 				/* Spend some cycles in userspace */
 
@@ -181,7 +181,7 @@
 			}
 			if (times(&buf2) == -1) {
 				TEST_ERROR_LOG(TEST_ERRNO);
-				tst_resm(TFAIL|TTERRNO, "times failed");
+				tst_resm(TFAIL | TTERRNO, "times failed");
 			}
 			if (buf1.tms_utime > buf2.tms_utime)
 				tst_resm(TFAIL, "Error: parents's "
@@ -267,4 +267,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/tkill/tkill01.c b/testcases/kernel/syscalls/tkill/tkill01.c
index 7da3c9e..a3d8e3d 100644
--- a/testcases/kernel/syscalls/tkill/tkill01.c
+++ b/testcases/kernel/syscalls/tkill/tkill01.c
@@ -56,17 +56,19 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "tkill01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 2;		   /* total number of tests in this file.   */
+char *TCID = "tkill01";		/* Test program identifier. */
+int testno;
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
-void cleanup() {
+void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
 }
 
-void setup() {
+void setup()
+{
 	TEST_PAUSE;
 	tst_tmpdir();
 }
@@ -78,7 +80,8 @@
 	sig_count = 1;
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int tid;
 	int lc;
 	char *msg;
@@ -92,17 +95,17 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			if (signal(SIGUSR1, &sig_action) == SIG_ERR)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "signal(SIGUSR1, ..) failed");
-			TEST(tid = syscall( __NR_gettid));
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "signal(SIGUSR1, ..) failed");
+			TEST(tid = syscall(__NR_gettid));
 			if (TEST_RETURN == -1) {
-				tst_resm(TFAIL|TTERRNO, "tkill failed");
+				tst_resm(TFAIL | TTERRNO, "tkill failed");
 			}
-			TEST(syscall(__NR_tkill,tid, SIGUSR1));
+			TEST(syscall(__NR_tkill, tid, SIGUSR1));
 			if (TEST_RETURN == 0) {
 				tst_resm(TPASS, "tkill call succeeded");
 			} else {
-				tst_resm(TFAIL|TTERRNO, "tkill failed");
+				tst_resm(TFAIL | TTERRNO, "tkill failed");
 			}
 		}
 	}
diff --git a/testcases/kernel/syscalls/tkill/tkill02.c b/testcases/kernel/syscalls/tkill/tkill02.c
index 4be84dc..7d04a44 100644
--- a/testcases/kernel/syscalls/tkill/tkill02.c
+++ b/testcases/kernel/syscalls/tkill/tkill02.c
@@ -53,8 +53,8 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "tkill02";  /* Test program identifier.*/
-int  testno;
+char *TCID = "tkill02";		/* Test program identifier. */
+int testno;
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -74,7 +74,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -98,7 +99,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
@@ -109,13 +111,15 @@
 	int tid;
 	int exp_errno;
 } test_cases[] = {
-	{ -1, EINVAL },
-	{ 99999, ESRCH }
+	{
+	-1, EINVAL}, {
+	99999, ESRCH}
 };
 
 int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int i;
 
 	setup();
@@ -125,19 +129,19 @@
 		TEST(syscall(__NR_tkill, test_cases[i].tid, SIGUSR1));
 
 		if (TEST_RETURN == -1) {
-		    	if (TEST_ERRNO == test_cases[i].exp_errno) {
-				tst_resm(TPASS|TTERRNO,
-				    "tkill(%d, SIGUSR1) failed as expected",
-				    test_cases[i].tid);
+			if (TEST_ERRNO == test_cases[i].exp_errno) {
+				tst_resm(TPASS | TTERRNO,
+					 "tkill(%d, SIGUSR1) failed as expected",
+					 test_cases[i].tid);
 			} else {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-				    "tkill(%d, SIGUSR1) failed unexpectedly",
-				    test_cases[i].tid);
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "tkill(%d, SIGUSR1) failed unexpectedly",
+					 test_cases[i].tid);
 			}
 		} else {
 			tst_brkm(TFAIL, cleanup,
-			    "tkill(%d) succeeded unexpectedly",
-			    test_cases[i].tid);
+				 "tkill(%d) succeeded unexpectedly",
+				 test_cases[i].tid);
 		}
 	}
 	cleanup();
diff --git a/testcases/kernel/syscalls/truncate/truncate01.c b/testcases/kernel/syscalls/truncate/truncate01.c
index 4fd55cc..f65ff83 100644
--- a/testcases/kernel/syscalls/truncate/truncate01.c
+++ b/testcases/kernel/syscalls/truncate/truncate01.c
@@ -141,7 +141,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TESTFILE, errno);
-				 }
+				}
 				stat_buf.st_mode &= ~S_IFREG;
 				file_length = stat_buf.st_size;
 
@@ -151,8 +151,9 @@
 				 */
 				if (file_length != TRUNC_LEN) {
 					tst_resm(TFAIL, "%s: Incorrect file "
-						 "size %"PRId64", Expected %d",
-						 TESTFILE, (int64_t)file_length,
+						 "size %" PRId64
+						 ", Expected %d", TESTFILE,
+						 (int64_t) file_length,
 						 TRUNC_LEN);
 				} else {
 					tst_resm(TPASS, "Functionality of "
@@ -206,7 +207,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Write to the file 1k data from the buffer */
 	while (c_total < FILE_SIZE) {
@@ -214,7 +215,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TESTFILE, errno, strerror(errno));
-		 } else {
+		} else {
 			c_total += c;
 		}
 	}
@@ -224,7 +225,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TESTFILE, errno, strerror(errno));
-	 }
+	}
 }
 
 /*
diff --git a/testcases/kernel/syscalls/truncate/truncate02.c b/testcases/kernel/syscalls/truncate/truncate02.c
index d38233c..81fd169 100644
--- a/testcases/kernel/syscalls/truncate/truncate02.c
+++ b/testcases/kernel/syscalls/truncate/truncate02.c
@@ -148,7 +148,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed after 1st truncate, "
 						 "error:%d", TESTFILE, errno);
-				 }
+				}
 				file_length1 = stat_buf.st_size;
 
 				/*
@@ -159,7 +159,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek(2) on "
 						 "%s failed after 1st truncate, "
 						 "error:%d", TESTFILE, errno);
-				 }
+				}
 
 				/* Read the testfile from the beginning. */
 				while ((rbytes = read(fd, tst_buff,
@@ -190,7 +190,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed after 2nd truncate, "
 						 "error:%d", TESTFILE, errno);
-				 }
+				}
 				file_length2 = stat_buf.st_size;
 
 				/*
@@ -201,7 +201,7 @@
 					tst_brkm(TFAIL, cleanup, "lseek(2) on "
 						 "%s failed after 2nd truncate, "
 						 "error:%d", TESTFILE, errno);
-				 }
+				}
 
 				/* Read the testfile contents till EOF */
 				while ((rbytes = read(fd, tst_buff,
@@ -275,7 +275,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TESTFILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Write to the file 1k data from the buffer */
 	while (write_len < FILE_SIZE) {
diff --git a/testcases/kernel/syscalls/truncate/truncate03.c b/testcases/kernel/syscalls/truncate/truncate03.c
index c423d2a..03632db 100644
--- a/testcases/kernel/syscalls/truncate/truncate03.c
+++ b/testcases/kernel/syscalls/truncate/truncate03.c
@@ -134,6 +134,7 @@
 	"", "Pathname is empty", ENOENT, no_setup}, {
 	NULL, NULL, 0, no_setup}
 };
+
 int TST_TOTAL = sizeof(Test_cases) / sizeof(*Test_cases);
 
 void setup();			/* Main setup function for the test */
@@ -258,7 +259,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
 			 TEST_FILE1, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Write to the file 1k data from the buffer */
 	while (c_total < FILE_SIZE) {
@@ -266,7 +267,7 @@
 			tst_brkm(TBROK, cleanup,
 				 "write(2) on %s Failed, errno=%d : %s",
 				 TEST_FILE1, errno, strerror(errno));
-		 } else {
+		} else {
 			c_total += c;
 		}
 	}
@@ -276,7 +277,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s",
 			 TEST_FILE1, errno, strerror(errno));
-	 }
+	}
 #if !defined(UCLINUX)
 	bad_addr = mmap(0, 1, PROT_NONE,
 			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
@@ -317,7 +318,7 @@
 	/* Change mode permissions on test file */
 	if (chmod(TEST_FILE1, NEW_MODE) < 0) {
 		tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", TEST_FILE1);
-	 }
+	}
 
 	return 0;
 }
@@ -340,13 +341,13 @@
 		tst_brkm(TBROK, cleanup,
 			 "open(2) on t_file failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	/* Close the file created above */
 	if (close(fildes) == -1) {
 		tst_brkm(TBROK, cleanup,
 			 "close(t_file) Failed, errno=%d : %s",
 			 errno, strerror(errno));
-	 }
+	}
 	return 0;
 }
 
diff --git a/testcases/kernel/syscalls/truncate/truncate04.c b/testcases/kernel/syscalls/truncate/truncate04.c
index 4450040..aa86de7 100644
--- a/testcases/kernel/syscalls/truncate/truncate04.c
+++ b/testcases/kernel/syscalls/truncate/truncate04.c
@@ -92,6 +92,7 @@
 
 char test_desc[] = "File is a directory";
 int exp_enos[] = { EISDIR, 0 };
+
 int r_val;
 int fd;
 
diff --git a/testcases/kernel/syscalls/ulimit/ulimit01.c b/testcases/kernel/syscalls/ulimit/ulimit01.c
index 608c28b..dde79aa 100644
--- a/testcases/kernel/syscalls/ulimit/ulimit01.c
+++ b/testcases/kernel/syscalls/ulimit/ulimit01.c
@@ -194,12 +194,12 @@
 			if (TEST_RETURN == -1) {
 				if (Scenarios[i].exp_fail) {
 					if (STD_FUNCTIONAL_TEST) {
-						tst_resm(TPASS|TTERRNO,
+						tst_resm(TPASS | TTERRNO,
 							 "ulimit(%d, %ld) Failed expectedly",
 							 cmd, limit);
 					}
 				} else {
-					tst_resm(TFAIL|TTERRNO,
+					tst_resm(TFAIL | TTERRNO,
 						 "ulimit(%d, %ld) Failed",
 						 cmd, limit);
 				}
@@ -223,15 +223,13 @@
 					     tmp++) {
 						if (Scenarios[tmp].nlim_flag ==
 						    1) {
-							Scenarios[tmp].
-							    newlimit =
-							    TEST_RETURN;
+							Scenarios[tmp].newlimit
+							    = TEST_RETURN;
 						}
 						if (Scenarios[tmp].nlim_flag ==
 						    2) {
-							Scenarios[tmp].
-							    newlimit =
-							    TEST_RETURN - 1;
+							Scenarios[tmp].newlimit
+							    = TEST_RETURN - 1;
 						}
 					}
 				}
diff --git a/testcases/kernel/syscalls/umask/umask02.c b/testcases/kernel/syscalls/umask/umask02.c
index dafa4bf..f8f02de 100644
--- a/testcases/kernel/syscalls/umask/umask02.c
+++ b/testcases/kernel/syscalls/umask/umask02.c
@@ -67,10 +67,9 @@
 	int uret = 0, i, mskval = 0000;
 	int failcnt = 0;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();
 
@@ -125,4 +124,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/umask/umask03.c b/testcases/kernel/syscalls/umask/umask03.c
index 4da01f1..dc5871b 100644
--- a/testcases/kernel/syscalls/umask/umask03.c
+++ b/testcases/kernel/syscalls/umask/umask03.c
@@ -101,7 +101,7 @@
 							 "mask didnot take",
 							 low9mode,
 							 (~mskval & 0777));
-					 }
+					}
 				}
 			}
 			close(fildes);
diff --git a/testcases/kernel/syscalls/umount/umount02.c b/testcases/kernel/syscalls/umount/umount02.c
index d8d70e8..c71939d 100644
--- a/testcases/kernel/syscalls/umount/umount02.c
+++ b/testcases/kernel/syscalls/umount/umount02.c
@@ -169,9 +169,10 @@
 	if (Tflag == 1) {
 		strncpy(Type, fstype,
 			(FSTYPE_LEN <
-			 (strlen(fstype)+1)) ? FSTYPE_LEN : (strlen(fstype)+1));
+			 (strlen(fstype) + 1)) ? FSTYPE_LEN : (strlen(fstype) +
+							       1));
 	} else {
-		strncpy(Type, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE)+1);
+		strncpy(Type, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE) + 1);
 	}
 
 	if (STD_COPIES != 1) {
@@ -247,9 +248,9 @@
 	switch (i) {
 	case 0:
 		/* Setup for umount(2) returning errno EBUSY. */
-		if (access(Device,F_OK)) {
+		if (access(Device, F_OK)) {
 			tst_brkm(TBROK, cleanup,
-				"Device %s does not exist", Device);
+				 "Device %s does not exist", Device);
 			return 1;
 		}
 
diff --git a/testcases/kernel/syscalls/umount/umount03.c b/testcases/kernel/syscalls/umount/umount03.c
index d10e5b3..f815350 100644
--- a/testcases/kernel/syscalls/umount/umount03.c
+++ b/testcases/kernel/syscalls/umount/umount03.c
@@ -147,9 +147,10 @@
 	if (Tflag == 1) {
 		strncpy(Type, fstype,
 			(FSTYPE_LEN <
-			 (strlen(fstype)+1)) ? FSTYPE_LEN : (strlen(fstype)+1));
+			 (strlen(fstype) + 1)) ? FSTYPE_LEN : (strlen(fstype) +
+							       1));
 	} else {
-		strncpy(Type, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE)+1);
+		strncpy(Type, DEFAULT_FSTYPE, strlen(DEFAULT_FSTYPE) + 1);
 	}
 
 	if (STD_COPIES != 1) {
@@ -267,9 +268,8 @@
 	/* set up expected error numbers */
 	TEST_EXP_ENOS(exp_enos);
 
-	if (access(device,F_OK)) {
-		tst_brkm(TBROK, cleanup1,
-			"Device '%s' does not exist", device);
+	if (access(device, F_OK)) {
+		tst_brkm(TBROK, cleanup1, "Device '%s' does not exist", device);
 	}
 
 	TEST(mount(device, mntpoint, Type, 0, NULL));
diff --git a/testcases/kernel/syscalls/uname/uname01.c b/testcases/kernel/syscalls/uname/uname01.c
index 30431cc..fc65089 100644
--- a/testcases/kernel/syscalls/uname/uname01.c
+++ b/testcases/kernel/syscalls/uname/uname01.c
@@ -145,11 +145,9 @@
 		TEST(uname(&un));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "uname failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "uname(&un) returned %ld",
-					 TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "uname failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "uname(&un) returned %ld", TEST_RETURN);
 
 	}
 
diff --git a/testcases/kernel/syscalls/uname/uname02.c b/testcases/kernel/syscalls/uname/uname02.c
index f996037..295c411 100644
--- a/testcases/kernel/syscalls/uname/uname02.c
+++ b/testcases/kernel/syscalls/uname/uname02.c
@@ -94,10 +94,10 @@
 
 		switch (TEST_ERRNO) {
 		case EFAULT:
-			tst_resm(TPASS|TTERRNO, "uname failed as expected");
+			tst_resm(TPASS | TTERRNO, "uname failed as expected");
 			break;
 		default:
-			tst_resm(TFAIL|TTERRNO, "uname failed unexpectedly");
+			tst_resm(TFAIL | TTERRNO, "uname failed unexpectedly");
 		}
 	}
 
diff --git a/testcases/kernel/syscalls/uname/uname03.c b/testcases/kernel/syscalls/uname/uname03.c
index 411dec8..d6c3056 100644
--- a/testcases/kernel/syscalls/uname/uname03.c
+++ b/testcases/kernel/syscalls/uname/uname03.c
@@ -74,7 +74,7 @@
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup */
 
@@ -83,7 +83,7 @@
 	if ((buf = (struct utsname *)malloc((size_t)
 					    sizeof(struct utsname))) == NULL) {
 		tst_brkm(TBROK, cleanup, "malloc failed for buf");
-	 }
+	}
 
 	/* The following loop checks looping state if -i option given */
 
diff --git a/testcases/kernel/syscalls/unlink/unlink05.c b/testcases/kernel/syscalls/unlink/unlink05.c
index 3805647..5304f72 100644
--- a/testcases/kernel/syscalls/unlink/unlink05.c
+++ b/testcases/kernel/syscalls/unlink/unlink05.c
@@ -171,8 +171,8 @@
 	     ***************************************************************/
 			if (STD_FUNCTIONAL_TEST) {
 				/* No Verification test, yet... */
-				tst_resm(TPASS, "unlink(%s) returned %ld", fname,
-					 TEST_RETURN);
+				tst_resm(TPASS, "unlink(%s) returned %ld",
+					 fname, TEST_RETURN);
 			}
 			/* recreate file for next loop */
 			create_file();
diff --git a/testcases/kernel/syscalls/unlink/unlink06.c b/testcases/kernel/syscalls/unlink/unlink06.c
index cf72399..73dba27 100644
--- a/testcases/kernel/syscalls/unlink/unlink06.c
+++ b/testcases/kernel/syscalls/unlink/unlink06.c
@@ -179,8 +179,8 @@
 					 "unlink(%s) returned %ld, but access says file still exists.",
 					 Fname, TEST_RETURN);
 			} else {
-				tst_resm(TPASS, "unlink(%s) returned %ld", Fname,
-					 TEST_RETURN);
+				tst_resm(TPASS, "unlink(%s) returned %ld",
+					 Fname, TEST_RETURN);
 			}
 		} else
 			Tst_count++;
diff --git a/testcases/kernel/syscalls/unlink/unlink07.c b/testcases/kernel/syscalls/unlink/unlink07.c
index 3727bc1..ce8b4fb 100644
--- a/testcases/kernel/syscalls/unlink/unlink07.c
+++ b/testcases/kernel/syscalls/unlink/unlink07.c
@@ -227,8 +227,8 @@
 						tst_resm(TFAIL,
 							 "unlink(<%s>) Failed, errno=%d, expected errno:%d",
 							 desc, TEST_ERRNO,
-							 Test_cases[ind].
-							 exp_errno);
+							 Test_cases
+							 [ind].exp_errno);
 				} else
 					Tst_count++;
 			} else {
diff --git a/testcases/kernel/syscalls/unlink/unlink08.c b/testcases/kernel/syscalls/unlink/unlink08.c
index 6ce7f0c..bab3c30 100644
--- a/testcases/kernel/syscalls/unlink/unlink08.c
+++ b/testcases/kernel/syscalls/unlink/unlink08.c
@@ -215,8 +215,7 @@
 								 desc,
 								 TEST_ERRNO,
 								 Test_cases
-								 [ind].
-								 exp_errno);
+								 [ind].exp_errno);
 					} else
 						Tst_count++;
 				} else {
diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c
index 349bc3b..f636a95 100644
--- a/testcases/kernel/syscalls/unshare/unshare01.c
+++ b/testcases/kernel/syscalls/unshare/unshare01.c
@@ -97,9 +97,9 @@
 #include "config.h"
 
 /* Global Variables */
-char *TCID = "unshare01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "unshare01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 #ifdef HAVE_UNSHARE
 
@@ -121,7 +121,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -145,14 +146,16 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	pid_t pid1;
 	int lc;
 	int rval;
@@ -167,14 +170,15 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			pid1 = fork();    //call to fork()
+			pid1 = fork();	//call to fork()
 			if (pid1 == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup, "fork failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "fork failed");
 			} else if (pid1 == 0) {
 				switch (unshare(CLONE_FILES)) {
 				case 0:
 					printf("unshare with CLONE_FILES call "
-					    "succeeded\n");
+					       "succeeded\n");
 					rval = 0;
 					break;
 				case -1:
@@ -188,31 +192,31 @@
 				exit(rval);
 			} else {
 				if (wait(&rval) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				if (rval != 0 && WIFEXITED(rval)) {
 					switch (WEXITSTATUS(rval)) {
 					case 1:
 						tst_brkm(TCONF, cleanup,
-						    "unshare not supported in "
-						    "kernel");
+							 "unshare not supported in "
+							 "kernel");
 						break;
 					default:
 						tst_brkm(TFAIL, cleanup,
-						    "unshare failed");
+							 "unshare failed");
 					}
 				}
 			}
 
 			pid1 = fork();
 			if (pid1 == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "fork failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "fork failed");
 			} else if (pid1 == 0) {
 				switch (unshare(CLONE_FS)) {
 				case 0:
 					printf("unshare with CLONE_FS call "
-					    "succeeded\n");
+					       "succeeded\n");
 					rval = 0;
 					break;
 				case -1:
@@ -226,31 +230,31 @@
 				exit(rval);
 			} else {
 				if (wait(&rval) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				if (rval != 0 && WIFEXITED(rval)) {
 					switch (WEXITSTATUS(rval)) {
 					case 1:
 						tst_brkm(TCONF, cleanup,
-						    "unshare not supported in "
-						    "kernel");
+							 "unshare not supported in "
+							 "kernel");
 						break;
 					default:
 						tst_brkm(TFAIL, cleanup,
-						    "unshare failed");
+							 "unshare failed");
 					}
 				}
 			}
 
 			pid1 = fork();
 			if (pid1 == -1) {
-				tst_brkm(TFAIL|TERRNO, cleanup,
-				    "fork() failed.");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "fork() failed.");
 			} else if (pid1 == 0) {
 				switch (unshare(CLONE_NEWNS)) {
 				case 0:
 					printf("unshare call with CLONE_NEWNS "
-					    "succeeded\n");
+					       "succeeded\n");
 					rval = 0;
 					break;
 				case -1:
@@ -264,18 +268,18 @@
 				exit(rval);
 			} else {
 				if (wait(&rval) == -1)
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				if (rval != 0 && WIFEXITED(rval)) {
 					switch (WEXITSTATUS(rval)) {
 					case 1:
 						tst_brkm(TCONF, cleanup,
-						    "unshare not supported in "
-						    "kernel");
+							 "unshare not supported in "
+							 "kernel");
 						break;
 					default:
 						tst_brkm(TFAIL, cleanup,
-						    "unshare failed");
+							 "unshare failed");
 					}
 
 				}
diff --git a/testcases/kernel/syscalls/unshare/unshare02.c b/testcases/kernel/syscalls/unshare/unshare02.c
index f22be6c..c30d508 100644
--- a/testcases/kernel/syscalls/unshare/unshare02.c
+++ b/testcases/kernel/syscalls/unshare/unshare02.c
@@ -61,9 +61,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "unshare02";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 2;		   /* total number of tests in this file.   */
+char *TCID = "unshare02";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 2;		/* total number of tests in this file.   */
 
 #ifdef HAVE_UNSHARE
 
@@ -85,7 +85,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' TEST_RETURNurn code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -112,21 +113,23 @@
 /*	      On success - TEST_RETURNurns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	pid_t pid1;
 	int lc;
 	int rval;
-	char *msg;	      /* message TEST_RETURNurned from parse_opts */
+	char *msg;		/* message TEST_RETURNurned from parse_opts */
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -134,10 +137,10 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			TEST(pid1 = fork());    //call to fork()
+			TEST(pid1 = fork());	//call to fork()
 			if (TEST_RETURN == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"fork() failed.");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "fork() failed.");
 			} else if (TEST_RETURN == 0) {
 				TEST_RETURN = unshare(-1);
 				if (TEST_RETURN == 0) {
@@ -157,28 +160,28 @@
 				exit(rval);
 			} else {
 				if (wait(&rval) == -1) {
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				}
 				if (rval != 0 && WIFEXITED(rval)) {
 					switch (WEXITSTATUS(rval)) {
 					case 1:
 						tst_brkm(TBROK, cleanup,
-						    "unshare call unsupported "
-						    "in kernel");
+							 "unshare call unsupported "
+							 "in kernel");
 						break;
 					case 2:
 						tst_brkm(TFAIL, cleanup,
-						    "unshare call failed");
+							 "unshare call failed");
 						break;
 					}
 				}
 			}
 
-			TEST(pid1=fork());    //call to fork()
+			TEST(pid1 = fork());	//call to fork()
 			if (pid1 == -1) {
-				tst_brkm(TFAIL|TTERRNO, cleanup,
-					"fork() failed.");
+				tst_brkm(TFAIL | TTERRNO, cleanup,
+					 "fork() failed.");
 			} else if (TEST_RETURN == 0) {
 				TEST_RETURN = unshare(0);
 				if (TEST_RETURN == 0) {
@@ -195,19 +198,19 @@
 				exit(rval);
 			} else {
 				if (wait(&rval) == -1) {
-					tst_brkm(TBROK|TERRNO, cleanup,
-					    "wait failed");
+					tst_brkm(TBROK | TERRNO, cleanup,
+						 "wait failed");
 				}
 				if (rval != 0 && WIFEXITED(rval)) {
 					switch (WEXITSTATUS(rval)) {
 					case 1:
 						tst_brkm(TBROK, cleanup,
-						    "unshare call unsupported "
-						    "in kernel");
+							 "unshare call unsupported "
+							 "in kernel");
 						break;
 					case 2:
 						tst_brkm(TFAIL, cleanup,
-						    "unshare call failed");
+							 "unshare call failed");
 						break;
 					}
 				}
diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
index 326edf9..1903ae5 100644
--- a/testcases/kernel/syscalls/ustat/ustat02.c
+++ b/testcases/kernel/syscalls/ustat/ustat02.c
@@ -124,9 +124,10 @@
 				TEST(ustat(dev_num[i], (struct ustat *)-1));
 			}
 
-			if ((TEST_RETURN == -1) && (TEST_ERRNO == testcase[i].
-						    exp_errno)) {
-				tst_resm(TPASS, "ustat(2) expected failure;"
+			if ((TEST_RETURN == -1)
+			    && (TEST_ERRNO == testcase[i].exp_errno)) {
+				tst_resm(TPASS,
+					 "ustat(2) expected failure;"
 					 " Got errno - %s : %s",
 					 testcase[i].exp_errval,
 					 testcase[i].err_desc);
diff --git a/testcases/kernel/syscalls/utils/common_j_h.c b/testcases/kernel/syscalls/utils/common_j_h.c
index 94541a8..4c255ca 100644
--- a/testcases/kernel/syscalls/utils/common_j_h.c
+++ b/testcases/kernel/syscalls/utils/common_j_h.c
@@ -77,7 +77,7 @@
 /*
  * Change effective user ID
  */
-int setup_euid(char *uname, uid_t *old_uid)
+int setup_euid(char *uname, uid_t * old_uid)
 {
 	struct passwd *pw;
 	int rc;
@@ -112,6 +112,7 @@
 {
 	_exit(0);
 }
+
 /*
  * Generate a child process which will send a signal
  */
@@ -120,12 +121,10 @@
 	pid_t pid, cpid;
 
 	pid = getpid();
-	WITH_SIGNALS_BLOCKED(
-		if ((cpid = fork()) == 0) {
-			tst_sig(NOFORK, SIG_DFL, NULL);
-			signal(SIGTERM, sigterm_handler);
-		}
-	);
+	WITH_SIGNALS_BLOCKED(if ((cpid = fork()) == 0) {
+			     tst_sig(NOFORK, SIG_DFL, NULL);
+			     signal(SIGTERM, sigterm_handler);}
+	) ;
 	switch (cpid) {
 	case 0:
 		while (count-- > 0) {
@@ -149,7 +148,7 @@
 int setup_file(char *testdir, char *fname, char *path)
 {
 	return _setup_file(testdir, fname, path,
-			   O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
+			   O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
 }
 
 int _setup_file(char *testdir, char *fname, char *path, int flags, mode_t mode)
@@ -185,7 +184,7 @@
 	char *p = NULL;
 
 	sprintf(path, "%s/%s", testdir, fname);
-	fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
+	fd = open(path, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
 	if (fd < 0) {
 		EPRINTF("open failed.\n");
 		goto ERR_EXIT;
@@ -201,7 +200,7 @@
 	}
 	/* Swap file must not have hole area */
 	memset(p, 0x5a, size);
-	r_sz = (size_t)write(fd, p, size);
+	r_sz = (size_t) write(fd, p, size);
 	if (r_sz != size) {
 		EPRINTF("write failed.\n");
 		goto ERR_EXIT;
@@ -231,7 +230,7 @@
 /*
  * Change user limit that the calling process can open
  */
-int setup_ulimit_fnum(rlim_t newlim, rlim_t *oldlim)
+int setup_ulimit_fnum(rlim_t newlim, rlim_t * oldlim)
 {
 	int rc;
 	struct rlimit rlim;
diff --git a/testcases/kernel/syscalls/utime/utime01.c b/testcases/kernel/syscalls/utime/utime01.c
index 122db73..f445d35 100644
--- a/testcases/kernel/syscalls/utime/utime01.c
+++ b/testcases/kernel/syscalls/utime/utime01.c
@@ -120,10 +120,10 @@
 			 "Cannot do utime on a file located on an NFS filesystem");
 	}
 
-        if (tst_is_cwd_v9fs()) {
-                tst_brkm(TCONF, cleanup,
-                         "Cannot do utime on a file located on an 9P filesystem");
-        }
+	if (tst_is_cwd_v9fs()) {
+		tst_brkm(TCONF, cleanup,
+			 "Cannot do utime on a file located on an 9P filesystem");
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -164,7 +164,7 @@
 						 "failed to get present time "
 						 "after utime, error=%d",
 						 errno);
-				 }
+				}
 
 				/*
 				 * Get the modification and access times of
@@ -174,7 +174,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 }
+				}
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -230,20 +230,20 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 }
+	}
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 }
+	}
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime02.c b/testcases/kernel/syscalls/utime/utime02.c
index 231a784..9666ead 100644
--- a/testcases/kernel/syscalls/utime/utime02.c
+++ b/testcases/kernel/syscalls/utime/utime02.c
@@ -94,6 +94,7 @@
 time_t curr_time;		/* current time in seconds */
 time_t tloc;			/* argument var. for time() */
 int exp_enos[] = { 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -125,10 +126,10 @@
 			 "Cannot do utime on a file located on an NFS filesystem");
 	}
 
-        if (tst_is_cwd_v9fs()) {
-                tst_brkm(TCONF, cleanup,
-                         "Cannot do utime on a file located on an 9P filesystem");
-        }
+	if (tst_is_cwd_v9fs()) {
+		tst_brkm(TCONF, cleanup,
+			 "Cannot do utime on a file located on an 9P filesystem");
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -169,7 +170,7 @@
 						 "failed to get present time "
 						 "after utime, error=%d",
 						 errno);
-				 }
+				}
 
 				/*
 				 * Get the modification and access times of
@@ -179,7 +180,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, errno:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 }
+				}
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
@@ -245,20 +246,20 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 }
+	}
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 }
+	}
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime03.c b/testcases/kernel/syscalls/utime/utime03.c
index 6b14bc4..cd57ad0 100644
--- a/testcases/kernel/syscalls/utime/utime03.c
+++ b/testcases/kernel/syscalls/utime/utime03.c
@@ -136,10 +136,10 @@
 			 "Cannot do utime on a file located on an NFS filesystem");
 	}
 
-        if (tst_is_cwd_v9fs()) {
-                tst_brkm(TCONF, cleanup,
-                         "Cannot do utime on a file located on an 9P filesystem");
-        }
+	if (tst_is_cwd_v9fs()) {
+		tst_brkm(TCONF, cleanup,
+			 "Cannot do utime on a file located on an 9P filesystem");
+	}
 
 	/* set the expected errnos... */
 	TEST_EXP_ENOS(exp_enos);
@@ -198,7 +198,7 @@
 							 "present time after "
 							 "utime, error=%d",
 							 errno);
-					 }
+					}
 
 					/*
 					 * Get the modification and access
@@ -210,7 +210,7 @@
 							 "stat(2) of %s failed, "
 							 "error:%d", TEMP_FILE,
 							 TEST_ERRNO);
-					 }
+					}
 					modf_time = stat_buf.st_mtime;
 					access_time = stat_buf.st_atime;
 
@@ -291,14 +291,14 @@
 		tst_brkm(TBROK, cleanup,
 			 "creat(%s, %#o) Failed, errno=%d :%s",
 			 TEMP_FILE, FILE_MODE, errno, strerror(errno));
-	 }
+	}
 
 	/* Close the temporary file created */
 	if (close(fildes) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "close(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 }
+	}
 
 	/*
 	 * Make sure that specified Mode permissions set as
@@ -308,7 +308,7 @@
 		tst_brkm(TBROK, cleanup,
 			 "chmod(%s) Failed, errno=%d : %s:",
 			 TEMP_FILE, errno, strerror(errno));
-	 }
+	}
 
 	if (chmod(tmpd, 0711) != 0) {
 		tst_brkm(TBROK, cleanup, "chmod() failed");
@@ -317,7 +317,7 @@
 	if ((ltpuser = getpwnam(LTPUSER2)) == NULL) {
 		tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 			 LTPUSER2);
-	 }
+	}
 
 	/* get uid/gid of user accordingly */
 	user_uid = ltpuser->pw_uid;
@@ -330,13 +330,13 @@
 	if (chown(TEMP_FILE, user_uid, group_gid) < 0) {
 		tst_brkm(TBROK, cleanup, "chown() of %s failed, error %d",
 			 TEMP_FILE, errno);
-	 }
+	}
 
 	/* Get the current time */
 	if ((curr_time = time(&tloc)) < 0) {
 		tst_brkm(TBROK, cleanup,
 			 "time() failed to get current time, errno=%d", errno);
-	 }
+	}
 
 	/*
 	 * Sleep for a second so that mod time and access times will be
diff --git a/testcases/kernel/syscalls/utime/utime04.c b/testcases/kernel/syscalls/utime/utime04.c
index b71e03d..e2d94bf 100644
--- a/testcases/kernel/syscalls/utime/utime04.c
+++ b/testcases/kernel/syscalls/utime/utime04.c
@@ -89,6 +89,7 @@
 char *TCID = "utime04";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 struct utimbuf times;		/* struct. buffer for utime() */
 
 void setup();			/* Main setup function of test */
@@ -144,7 +145,7 @@
 						 "stat(2) of %s failed, "
 						 "error:%d", TEMP_FILE,
 						 TEST_ERRNO);
-				 }
+				}
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
diff --git a/testcases/kernel/syscalls/utime/utime05.c b/testcases/kernel/syscalls/utime/utime05.c
index 3525101..9932023 100644
--- a/testcases/kernel/syscalls/utime/utime05.c
+++ b/testcases/kernel/syscalls/utime/utime05.c
@@ -92,6 +92,7 @@
 char *TCID = "utime05";		/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 int exp_enos[] = { 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 
@@ -149,7 +150,7 @@
 					tst_brkm(TFAIL, cleanup, "stat(2) of "
 						 "%s failed, error:%d",
 						 TEMP_FILE, TEST_ERRNO);
-				 }
+				}
 				modf_time = stat_buf.st_mtime;
 				access_time = stat_buf.st_atime;
 
diff --git a/testcases/kernel/syscalls/utime/utime06.c b/testcases/kernel/syscalls/utime/utime06.c
index 3edf51a..c8de57f 100644
--- a/testcases/kernel/syscalls/utime/utime06.c
+++ b/testcases/kernel/syscalls/utime/utime06.c
@@ -151,11 +151,11 @@
 
 	if (pid == -1) {
 		tst_brkm(TBROK, cleanup, "fork() failed");
-	 } else if (pid == 0) {
+	} else if (pid == 0) {
 		if ((ltpuser = getpwnam(LTPUSER1)) == NULL) {
 			tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 				 LTPUSER1);
-		 }
+		}
 
 		/* get uid of user */
 		user_uid = ltpuser->pw_uid;
@@ -190,11 +190,12 @@
 							 "fails, %s, errno:%d, "
 							 "expected errno:%d",
 							 test_desc, TEST_ERRNO,
-							 Test_cases[ind].
-							 exp_errno);
+							 Test_cases
+							 [ind].exp_errno);
 					}
 				} else {
-					tst_resm(TFAIL, "utime(2) returned %ld, "
+					tst_resm(TFAIL,
+						 "utime(2) returned %ld, "
 						 "expected -1, errno:%d",
 						 TEST_RETURN,
 						 Test_cases[ind].exp_errno);
@@ -285,7 +286,7 @@
 	if ((ltpuser = getpwnam(LTPUSER2)) == NULL) {
 		tst_brkm(TBROK, cleanup, "%s not found in /etc/passwd",
 			 LTPUSER2);
-	 }
+	}
 
 	/* get uid/gid of user accordingly */
 	user_uid = ltpuser->pw_uid;
@@ -294,7 +295,7 @@
 	if (chown(TEMP_FILE, user_uid, group_gid) < 0) {
 		tst_brkm(TBROK, cleanup, "chown() of %s failed, error %d",
 			 TEMP_FILE, errno);
-	 }
+	}
 
 	return 0;
 }
diff --git a/testcases/kernel/syscalls/utimensat/utimensat01.c b/testcases/kernel/syscalls/utimensat/utimensat01.c
index 06a68c9..a0c94a8 100644
--- a/testcases/kernel/syscalls/utimensat/utimensat01.c
+++ b/testcases/kernel/syscalls/utimensat/utimensat01.c
@@ -65,8 +65,8 @@
 #define errExit(msg)    do { perror(msg); exit(EXIT_failed_syscall); \
                         } while (0)
 
-# define UTIME_NOW      ((1l << 30) - 1l)
-# define UTIME_OMIT     ((1l << 30) - 2l)
+#define UTIME_NOW      ((1l << 30) - 1l)
+#define UTIME_OMIT     ((1l << 30) - 2l)
 
 static inline int
 utimensat_sc(int dirfd, const char *pathname,
diff --git a/testcases/kernel/syscalls/utimes/utimes01.c b/testcases/kernel/syscalls/utimes/utimes01.c
index 2f93ce7..7826e73 100644
--- a/testcases/kernel/syscalls/utimes/utimes01.c
+++ b/testcases/kernel/syscalls/utimes/utimes01.c
@@ -63,9 +63,9 @@
 #include "linux_syscall_numbers.h"
 
 /* Global Variables */
-char *TCID = "utimes01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 1;		   /* total number of tests in this file.   */
+char *TCID = "utimes01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -85,7 +85,8 @@
 /*	      On success - Exits calling tst_exit(). With '0' return code.  */
 /*									    */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
 	TEST_CLEANUP;
 	tst_rmdir();
@@ -110,7 +111,8 @@
 /*	      On success - returns 0.				       */
 /*									    */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	tst_require_root(NULL);
 
 	/* Capture signals if any */
@@ -156,41 +158,41 @@
  */
 
 static struct test_case tcase[] = {
-	{ // case00
-		.ttype	  = NORMAL,
-		.a_sec	  = 0,
-		.m_sec	  = 1000,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case01
-		.ttype	  = NORMAL,
-		.a_sec	  = 1000,
-		.m_sec	  = 0,
-		.ret	    = 0,
-		.err	    = 0,
-	},
-	{ // case02
-		.ttype	  = NORMAL,
-		.user	   = "nobody",
-		.ret	    = -1,
-		.err	    = EACCES, // RHEL4U1 + 2.6.18 returns EPERM
-	},
-	{ // case03
-		.ttype	  = FILE_NOT_EXIST,
-		.a_sec	  = 1000,
-		.m_sec	  = 2000,
-		.ret	    = -1,
-		.err	    = ENOENT,
-	},
+	{			// case00
+	 .ttype = NORMAL,
+	 .a_sec = 0,
+	 .m_sec = 1000,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case01
+	 .ttype = NORMAL,
+	 .a_sec = 1000,
+	 .m_sec = 0,
+	 .ret = 0,
+	 .err = 0,
+	 },
+	{			// case02
+	 .ttype = NORMAL,
+	 .user = "nobody",
+	 .ret = -1,
+	 .err = EACCES,		// RHEL4U1 + 2.6.18 returns EPERM
+	 },
+	{			// case03
+	 .ttype = FILE_NOT_EXIST,
+	 .a_sec = 1000,
+	 .m_sec = 2000,
+	 .ret = -1,
+	 .err = ENOENT,
+	 },
 
-	{ // case04
-		.ttype	  = NO_FNAME,
-		.a_sec	  = 1000,
-		.m_sec	  = 2000,
-		.ret	    = -1,
-		.err	    = EFAULT,
-	},
+	{			// case04
+	 .ttype = NO_FNAME,
+	 .a_sec = 1000,
+	 .m_sec = 2000,
+	 .ret = -1,
+	 .err = EFAULT,
+	 },
 };
 
 /*
@@ -251,23 +253,22 @@
 		 **/
 		const char *dummy = NULL;
 		TEST(sys_ret = utimes(dummy, tv));
-	}
-	else {
+	} else {
 		if (tc->user == NULL)
 			TEST(sys_ret = utimes(fpath, tv));
 		else
 			TEST(sys_ret = utimes(fpath, NULL));
 	}
-        tv[0].tv_sec = tc->a_sec;
-        tv[1].tv_sec = tc->m_sec;
-        TEST(len = strlen(fpath));
-        if (tc->ttype == FILE_NOT_EXIST) {
-                c = fpath[len - 1];
-                fpath[len - 1] = '\0';
-        }
-        errno = 0;
-        if (tc->ttype == NO_FNAME) {
-                /**
+	tv[0].tv_sec = tc->a_sec;
+	tv[1].tv_sec = tc->m_sec;
+	TEST(len = strlen(fpath));
+	if (tc->ttype == FILE_NOT_EXIST) {
+		c = fpath[len - 1];
+		fpath[len - 1] = '\0';
+	}
+	errno = 0;
+	if (tc->ttype == NO_FNAME) {
+		/**
                  * Note (garrcoop):
                  *
                  * If you do NULL directly, then gcc [4.3] will complain when
@@ -275,15 +276,14 @@
                  * test, but let's not allow the compiler to complain about
                  * something trivial like this.
                  **/
-                const char *dummy = NULL;
-                TEST(sys_ret = utimes(dummy, tv));
-        }
-        else {
-                if (tc->user == NULL)
-                        TEST(sys_ret = utimes(fpath, tv));
-                else
-                        TEST(sys_ret = utimes(fpath, NULL));
-        }
+		const char *dummy = NULL;
+		TEST(sys_ret = utimes(dummy, tv));
+	} else {
+		if (tc->user == NULL)
+			TEST(sys_ret = utimes(fpath, tv));
+		else
+			TEST(sys_ret = utimes(fpath, NULL));
+	}
 	sys_errno = errno;
 	if (tc->ttype == FILE_NOT_EXIST)
 		fpath[len - 1] = c;
@@ -299,7 +299,8 @@
 		result = 1;
 		goto EXIT1;
 	}
-	tst_resm(TINFO,"E:%ld,%ld <=> R:%ld,%ld",tv[0].tv_sec, tv[1].tv_sec, st.st_atime, st.st_mtime);
+	tst_resm(TINFO, "E:%ld,%ld <=> R:%ld,%ld", tv[0].tv_sec, tv[1].tv_sec,
+		 st.st_atime, st.st_mtime);
 	cmp_ok = st.st_atime == tv[0].tv_sec && st.st_mtime == tv[1].tv_sec;
 
 	/*
@@ -307,7 +308,8 @@
 	 */
 TEST_END:
 	result |= (sys_errno != tc->err) || !cmp_ok;
-	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,cmp_ok);
+	PRINT_RESULT_CMP(sys_ret >= 0, tc->ret, tc->err, sys_ret, sys_errno,
+			 cmp_ok);
 
 	/*
 	 * Restore effective user id
@@ -328,14 +330,15 @@
  * main()
  */
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	int result = RESULT_OK;
 	int i;
 	int lc;
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
-	     tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
 
@@ -343,16 +346,17 @@
 		Tst_count = 0;
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0])); i++) {
+			for (i = 0; i < (int)(sizeof(tcase) / sizeof(tcase[0]));
+			     i++) {
 				int ret;
 				tst_resm(TINFO, "(case%02d) START", i);
 				ret = do_test(&tcase[i]);
 				tst_resm(TINFO, "(case%02d) END => %s",
-					i, (ret == 0) ? "OK" : "NG");
+					 i, (ret == 0) ? "OK" : "NG");
 				result |= ret;
 			}
 
-        	}
+		}
 	}
 	cleanup();
 	tst_exit();
diff --git a/testcases/kernel/syscalls/vhangup/vhangup01.c b/testcases/kernel/syscalls/vhangup/vhangup01.c
index 2d4da06..993f883 100644
--- a/testcases/kernel/syscalls/vhangup/vhangup01.c
+++ b/testcases/kernel/syscalls/vhangup/vhangup01.c
@@ -72,8 +72,7 @@
 
 	struct passwd *nobody;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -87,7 +86,7 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TFAIL, cleanup, "fork failed");
-		 } else if (pid > 0) {	/* parent */
+		} else if (pid > 0) {	/* parent */
 			waitpid(pid, &status, 0);
 			_exit(0);	/*
 					 * Exit here and let the child clean up.
@@ -102,12 +101,12 @@
 			if (retval < 0) {
 				perror("setreuid");
 				tst_brkm(TFAIL, cleanup, "setreuid failed");
-			 }
+			}
 			TEST(vhangup());
 			if (TEST_RETURN != -1) {
 				tst_brkm(TFAIL, cleanup, "vhangup() failed to "
 					 "fail");
-			 } else if (TEST_ERRNO == EPERM) {
+			} else if (TEST_ERRNO == EPERM) {
 				TEST_ERROR_LOG(TEST_ERRNO);
 				tst_resm(TPASS, "Got EPERM as expected.");
 			} else {
@@ -150,4 +149,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/vhangup/vhangup02.c b/testcases/kernel/syscalls/vhangup/vhangup02.c
index 1d2cb2f..be3c7a3 100644
--- a/testcases/kernel/syscalls/vhangup/vhangup02.c
+++ b/testcases/kernel/syscalls/vhangup/vhangup02.c
@@ -64,8 +64,7 @@
 	pid_t pid, pid1;
 	int status;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -79,14 +78,14 @@
 
 		if ((pid = FORK_OR_VFORK()) < 0) {
 			tst_brkm(TFAIL, cleanup, "fork failed");
-		 } else if (pid > 0) {	/* parent */
+		} else if (pid > 0) {	/* parent */
 			waitpid(pid, &status, 0);
 			_exit(0);
 		} else {	/* child */
 			pid1 = setsid();
 			if (pid1 < 0) {
 				tst_brkm(TFAIL, cleanup, "setsid failed");
-			 }
+			}
 			TEST(vhangup());
 			if (TEST_RETURN == -1) {
 				tst_resm(TFAIL, "vhangup() failed, errno:%d",
@@ -126,4 +125,4 @@
 	 */
 	TEST_CLEANUP;
 
- }
+}
diff --git a/testcases/kernel/syscalls/wait4/wait401.c b/testcases/kernel/syscalls/wait4/wait401.c
index 065fdf3..6449d84 100644
--- a/testcases/kernel/syscalls/wait4/wait401.c
+++ b/testcases/kernel/syscalls/wait4/wait401.c
@@ -59,14 +59,14 @@
 		switch (pid) {
 		case -1:
 			tst_brkm(TBROK, cleanup, "fork() failed");
-		break;
+			break;
 		case 0:
 			sleep(1);
 			exit(0);
-		break;
+			break;
 		default:
 			TEST(wait4(pid, &status, 0, &rusage));
-		break;
+			break;
 		}
 
 		if (TEST_RETURN == -1) {
@@ -83,8 +83,8 @@
 					 "- %d", TCID, WIFEXITED(status));
 			} else if (TEST_RETURN != pid) {
 				tst_resm(TFAIL, "%s did not return the "
-					 "expected value (%d), actual: %ld", TCID,
-					 pid, TEST_RETURN);
+					 "expected value (%d), actual: %ld",
+					 TCID, pid, TEST_RETURN);
 			} else {
 
 				tst_resm(TPASS,
diff --git a/testcases/kernel/syscalls/wait4/wait402.c b/testcases/kernel/syscalls/wait4/wait402.c
index afbbd50..9018efd 100644
--- a/testcases/kernel/syscalls/wait4/wait402.c
+++ b/testcases/kernel/syscalls/wait4/wait402.c
@@ -39,7 +39,7 @@
 static void cleanup(void);
 static void setup(void);
 
-static int exp_enos[] = {ECHILD, 0};
+static int exp_enos[] = { ECHILD, 0 };
 
 static long get_pid_max(void)
 {
diff --git a/testcases/kernel/syscalls/waitid/waitid01.c b/testcases/kernel/syscalls/waitid/waitid01.c
index f25c2ce..0e54252 100644
--- a/testcases/kernel/syscalls/waitid/waitid01.c
+++ b/testcases/kernel/syscalls/waitid/waitid01.c
@@ -54,9 +54,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "waitid01";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 3;                   /* total number of tests in this file.   */
+char *TCID = "waitid01";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 3;		/* total number of tests in this file.   */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -76,12 +76,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -102,82 +103,85 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
-        /* Capture signals if any */
-        /* Create temporary directories */
-        TEST_PAUSE;
-        tst_tmpdir();
-}
-
-void display_status(siginfo_t *infop)
+void setup()
 {
-        tst_resm(TINFO,"Process %d terminated:", infop->si_pid);
-        tst_resm(TINFO,"code = %d",infop->si_code);
-        if (infop->si_code == CLD_EXITED)
-                tst_resm(TINFO,"exit value = %d",infop->si_status);
-        else
-		tst_resm(TINFO,"signal = %d",infop->si_status);
+	/* Capture signals if any */
+	/* Create temporary directories */
+	TEST_PAUSE;
+	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+void display_status(siginfo_t * infop)
+{
+	tst_resm(TINFO, "Process %d terminated:", infop->si_pid);
+	tst_resm(TINFO, "code = %d", infop->si_code);
+	if (infop->si_code == CLD_EXITED)
+		tst_resm(TINFO, "exit value = %d", infop->si_status);
+	else
+		tst_resm(TINFO, "signal = %d", infop->si_status);
+}
+
+int main(int ac, char **av)
+{
 	id_t pid;
-        siginfo_t infop;
+	siginfo_t infop;
 	int lc;
 	char *msg;
 
-        if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
-             tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-             tst_exit();
-           }
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+		tst_exit();
+	}
 
-        setup();
+	setup();
 
-        for (lc = 0; TEST_LOOPING(lc); ++lc) {
-                Tst_count = 0;
-                for (testno = 0; testno < TST_TOTAL; ++testno) {
+	for (lc = 0; TEST_LOOPING(lc); ++lc) {
+		Tst_count = 0;
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-	TEST(fork());
-	if (TEST_RETURN == 0) {
-                exit(123);
-        }
-        else{
-                TEST(waitid(P_ALL,getpid(),&infop,WEXITED));
-		if (TEST_RETURN == -1) {
-                        tst_resm(TFAIL|TTERRNO, "waitid(getpid()) failed");
-                        tst_exit();
-		}else
-		    display_status(&infop); //CLD_EXITED = 1
-        }
+			TEST(fork());
+			if (TEST_RETURN == 0) {
+				exit(123);
+			} else {
+				TEST(waitid(P_ALL, getpid(), &infop, WEXITED));
+				if (TEST_RETURN == -1) {
+					tst_resm(TFAIL | TTERRNO,
+						 "waitid(getpid()) failed");
+					tst_exit();
+				} else
+					display_status(&infop);	//CLD_EXITED = 1
+			}
 
-        TEST(fork());
-        if (TEST_RETURN == 0) {
-		int a, b = 0;
-                a = 1/b;
-                tst_exit();
-        } else{
-                TEST(waitid(P_ALL,0,&infop,WEXITED));
-		if (TEST_RETURN == -1) {
-                        tst_resm(TFAIL|TTERRNO, "waitid(0) failed");
-                        tst_exit();
-                } else
-			display_status(&infop); //CLD_DUMPED = 3 ; SIGFPE = 8
-        }
+			TEST(fork());
+			if (TEST_RETURN == 0) {
+				int a, b = 0;
+				a = 1 / b;
+				tst_exit();
+			} else {
+				TEST(waitid(P_ALL, 0, &infop, WEXITED));
+				if (TEST_RETURN == -1) {
+					tst_resm(TFAIL | TTERRNO,
+						 "waitid(0) failed");
+					tst_exit();
+				} else
+					display_status(&infop);	//CLD_DUMPED = 3 ; SIGFPE = 8
+			}
 
-        TEST(pid = fork());
-	if (TEST_RETURN == 0) {
-                TEST(sleep(10));
-                tst_exit();
-        }
-        TEST(kill(pid,SIGHUP));
-        TEST(waitid(P_ALL,0,&infop,WEXITED));
-	if (TEST_RETURN == -1) {
-                tst_resm(TFAIL|TTERRNO, "waitid(0) failed");
-                tst_exit();
-        } else
-		display_status(&infop); //CLD_KILLED = 2 ; SIGHUP = 1
-                }
-        }
-        tst_resm(TPASS, "waitid(): system call passed");
+			TEST(pid = fork());
+			if (TEST_RETURN == 0) {
+				TEST(sleep(10));
+				tst_exit();
+			}
+			TEST(kill(pid, SIGHUP));
+			TEST(waitid(P_ALL, 0, &infop, WEXITED));
+			if (TEST_RETURN == -1) {
+				tst_resm(TFAIL | TTERRNO, "waitid(0) failed");
+				tst_exit();
+			} else
+				display_status(&infop);	//CLD_KILLED = 2 ; SIGHUP = 1
+		}
+	}
+	tst_resm(TPASS, "waitid(): system call passed");
 	cleanup();
-        tst_exit();
+	tst_exit();
 }
diff --git a/testcases/kernel/syscalls/waitid/waitid02.c b/testcases/kernel/syscalls/waitid/waitid02.c
index 7fb03fc..a1ff48c 100644
--- a/testcases/kernel/syscalls/waitid/waitid02.c
+++ b/testcases/kernel/syscalls/waitid/waitid02.c
@@ -54,9 +54,9 @@
 /* Extern Global Variables */
 
 /* Global Variables */
-char *TCID = "waitid02";  /* Test program identifier.*/
-int  testno;
-int  TST_TOTAL = 4;                   /* total number of tests in this file.  */
+char *TCID = "waitid02";	/* Test program identifier. */
+int testno;
+int TST_TOTAL = 4;		/* total number of tests in this file.  */
 
 /* Extern Global Functions */
 /******************************************************************************/
@@ -76,12 +76,13 @@
 /*              On success - Exits calling tst_exit(). With '0' return code.  */
 /*                                                                            */
 /******************************************************************************/
-extern void cleanup() {
+extern void cleanup()
+{
 
-        TEST_CLEANUP;
-        tst_rmdir();
+	TEST_CLEANUP;
+	tst_rmdir();
 
-        tst_exit();
+	tst_exit();
 }
 
 /* Local  Functions */
@@ -102,14 +103,16 @@
 /*              On success - returns 0.                                       */
 /*                                                                            */
 /******************************************************************************/
-void setup() {
+void setup()
+{
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
 	tst_tmpdir();
 }
 
-int main(int ac, char **av) {
+int main(int ac, char **av)
+{
 	id_t pgid;
 	id_t id1, id2, id3;
 	siginfo_t infop;
@@ -128,99 +131,122 @@
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
 		Tst_count = 0;
-		for (testno = 0; testno < TST_TOTAL; ++testno)	{
+		for (testno = 0; testno < TST_TOTAL; ++testno) {
 
-	TEST(waitid(P_ALL, 0, &infop, WNOHANG));
-	if (TEST_RETURN == -1)
-		tst_resm(TPASS, "Success1 ... -1 is returned. error is %d.",
-		TEST_ERRNO);
-	else {
-		tst_resm(TFAIL, "%s Failed1 ...", TCID);
-	}
+			TEST(waitid(P_ALL, 0, &infop, WNOHANG));
+			if (TEST_RETURN == -1)
+				tst_resm(TPASS,
+					 "Success1 ... -1 is returned. error is %d.",
+					 TEST_ERRNO);
+			else {
+				tst_resm(TFAIL, "%s Failed1 ...", TCID);
+			}
 
-	/* option == WEXITED | WCONTINUED | WSTOPPED | WNOHANG | WNOWAIT*/
+			/* option == WEXITED | WCONTINUED | WSTOPPED | WNOHANG | WNOWAIT */
 
-	TEST(id1 = fork());
-	if (TEST_RETURN == 0) {
-		tst_resm(TINFO, "I'm a child 1,my id is %d,gpid is %d",
-		id1 = getpid(), __getpgid(0));
-		sleep(1);
-		exit(5);
-	}
+			TEST(id1 = fork());
+			if (TEST_RETURN == 0) {
+				tst_resm(TINFO,
+					 "I'm a child 1,my id is %d,gpid is %d",
+					 id1 = getpid(), __getpgid(0));
+				sleep(1);
+				exit(5);
+			}
 
-	TEST(id2 = fork());
-	if (TEST_RETURN == 0) {
-		sleep(3);
-		tst_resm(TINFO, "I'm a child 2,my id is %d,gpid is %d",
-		id2 = getpid(), __getpgid(0));
-		exit(7);
-	}
+			TEST(id2 = fork());
+			if (TEST_RETURN == 0) {
+				sleep(3);
+				tst_resm(TINFO,
+					 "I'm a child 2,my id is %d,gpid is %d",
+					 id2 = getpid(), __getpgid(0));
+				exit(7);
+			}
 
-	TEST(id3 = fork());
-	if (TEST_RETURN == 0) {
-		sleep(2);
-		TEST(kill(id2, SIGCONT));
-		tst_resm(TINFO, "I'm a child 3,my id is %d,gpid is %d",
-		id3 = getpid(), __getpgid(0));
-		exit(6);
-	}
+			TEST(id3 = fork());
+			if (TEST_RETURN == 0) {
+				sleep(2);
+				TEST(kill(id2, SIGCONT));
+				tst_resm(TINFO,
+					 "I'm a child 3,my id is %d,gpid is %d",
+					 id3 = getpid(), __getpgid(0));
+				exit(6);
+			}
 
-	TEST(waitid(P_ALL, 0, &infop, WNOHANG | WEXITED));
-	if (TEST_RETURN == 0)
-		tst_resm(TPASS, "Success 2 ...0 is returned.. error is %d.",
-		TEST_ERRNO);
-	else {
-		tst_resm(TFAIL|TTERRNO, "%s Failed 2", TCID);
-		tst_exit();
-	}
+			TEST(waitid(P_ALL, 0, &infop, WNOHANG | WEXITED));
+			if (TEST_RETURN == 0)
+				tst_resm(TPASS,
+					 "Success 2 ...0 is returned.. error is %d.",
+					 TEST_ERRNO);
+			else {
+				tst_resm(TFAIL | TTERRNO, "%s Failed 2", TCID);
+				tst_exit();
+			}
 
-	tst_resm(TINFO, "I'm a Parent,my id is %d,gpid is %d",
-		getpid(), pgid = __getpgid(0));
+			tst_resm(TINFO, "I'm a Parent,my id is %d,gpid is %d",
+				 getpid(), pgid = __getpgid(0));
 
-	TEST(waitid(P_PGID, pgid, &infop, WEXITED));
-	if (TEST_RETURN == 0) {
-		tst_resm(TPASS, "Success3 ... 0 is returned.");
-		tst_resm(TINFO, "si_pid = %d ; si_code = %d ; si_status = %d",
-		infop.si_pid, infop.si_code, infop.si_status);
-	} else {
-		tst_resm(TFAIL|TTERRNO, "Fail3 ...  %ld is returned", TEST_RETURN);
-		tst_exit();
-	}
+			TEST(waitid(P_PGID, pgid, &infop, WEXITED));
+			if (TEST_RETURN == 0) {
+				tst_resm(TPASS, "Success3 ... 0 is returned.");
+				tst_resm(TINFO,
+					 "si_pid = %d ; si_code = %d ; si_status = %d",
+					 infop.si_pid, infop.si_code,
+					 infop.si_status);
+			} else {
+				tst_resm(TFAIL | TTERRNO,
+					 "Fail3 ...  %ld is returned",
+					 TEST_RETURN);
+				tst_exit();
+			}
 
-	TEST(kill(id2, SIGSTOP));
+			TEST(kill(id2, SIGSTOP));
 
-	TEST(i = waitid(P_PID, id2, &infop, WSTOPPED | WNOWAIT));
-	if (TEST_RETURN == 0) {	/*EINVAL*/
-		tst_resm(TINFO, "si_pid = %d, si_code = %d, si_status = %d",
-		infop.si_pid, infop.si_code, infop.si_status);
-		tst_resm(TPASS, "Success4 ... 0 is returned");
-	} else {
-		tst_resm(TFAIL|TTERRNO, "Fail4 ...  %d is returned", i);
-		tst_exit();
-	}
+			TEST(i =
+			     waitid(P_PID, id2, &infop, WSTOPPED | WNOWAIT));
+			if (TEST_RETURN == 0) {
+				/*EINVAL*/
+				    tst_resm(TINFO,
+					     "si_pid = %d, si_code = %d, si_status = %d",
+					     infop.si_pid, infop.si_code,
+					     infop.si_status);
+				tst_resm(TPASS, "Success4 ... 0 is returned");
+			} else {
+				tst_resm(TFAIL | TTERRNO,
+					 "Fail4 ...  %d is returned", i);
+				tst_exit();
+			}
 
-	TEST(waitid(P_PID, id3, &infop, WEXITED));
-	if (TEST_RETURN == 0) {	/*NOCHILD*/
-		tst_resm(TINFO, "si_pid = %d, si_code = %d, si_status = %d",
-		infop.si_pid, infop.si_code, infop.si_status);
-		tst_resm(TPASS, "Success5 ... 0 is returned");
-	} else {
-		tst_resm(TFAIL|TTERRNO, "Fail5 ...  %ld is returned", TEST_RETURN);
-		tst_exit();
-	}
+			TEST(waitid(P_PID, id3, &infop, WEXITED));
+			if (TEST_RETURN == 0) {
+				/*NOCHILD*/
+				    tst_resm(TINFO,
+					     "si_pid = %d, si_code = %d, si_status = %d",
+					     infop.si_pid, infop.si_code,
+					     infop.si_status);
+				tst_resm(TPASS, "Success5 ... 0 is returned");
+			} else {
+				tst_resm(TFAIL | TTERRNO,
+					 "Fail5 ...  %ld is returned",
+					 TEST_RETURN);
+				tst_exit();
+			}
 
-	TEST(i = waitid(P_PID, id2, &infop, WCONTINUED));
-	if (TEST_RETURN == 0) {	/*EINVAL*/
-		tst_resm(TINFO, "si_pid = %d, si_code = %d, si_status = %d",
-		infop.si_pid, infop.si_code, infop.si_status);
-		tst_resm(TPASS, "Success6 ... 0 is returned");
-	} else {
-		tst_resm(TFAIL|TTERRNO, "Fail6 ...  %d is returned", i);
-		tst_exit();
-	}
+			TEST(i = waitid(P_PID, id2, &infop, WCONTINUED));
+			if (TEST_RETURN == 0) {
+				/*EINVAL*/
+				    tst_resm(TINFO,
+					     "si_pid = %d, si_code = %d, si_status = %d",
+					     infop.si_pid, infop.si_code,
+					     infop.si_status);
+				tst_resm(TPASS, "Success6 ... 0 is returned");
+			} else {
+				tst_resm(TFAIL | TTERRNO,
+					 "Fail6 ...  %d is returned", i);
+				tst_exit();
+			}
 
-	sleep(3);
-	}
+			sleep(3);
+		}
 	}
 	cleanup();
 	tst_exit();
diff --git a/testcases/kernel/syscalls/write/write01.c b/testcases/kernel/syscalls/write/write01.c
index ebd2526..f91d43d 100644
--- a/testcases/kernel/syscalls/write/write01.c
+++ b/testcases/kernel/syscalls/write/write01.c
@@ -153,11 +153,9 @@
 		TEST(write(fd, &buf, 1));
 
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "write failed");
-		else
-			if (STD_FUNCTIONAL_TEST)
-				tst_resm(TPASS, "write returned %ld",
-				    TEST_RETURN);
+			tst_resm(TFAIL | TTERRNO, "write failed");
+		else if (STD_FUNCTIONAL_TEST)
+			tst_resm(TPASS, "write returned %ld", TEST_RETURN);
 
 	}
 
@@ -177,7 +175,7 @@
 
 	sprintf(fname, "tfile_%d", getpid());
 	if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 }
 
 void cleanup()
@@ -185,7 +183,7 @@
 	TEST_CLEANUP;
 
 	if (close(fd) == -1)
-		tst_resm(TWARN|TERRNO, "close failed");
+		tst_resm(TWARN | TERRNO, "close failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/write/write02.c b/testcases/kernel/syscalls/write/write02.c
index d63e7dd..1a6b859 100644
--- a/testcases/kernel/syscalls/write/write02.c
+++ b/testcases/kernel/syscalls/write/write02.c
@@ -75,7 +75,7 @@
 
 	if ((msg = parse_opts(argc, argv, NULL, NULL))) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* global setup for test */
 
@@ -96,7 +96,7 @@
 
 		if ((fild = creat(pfiln, 0777)) == -1) {
 			tst_brkm(TBROK, cleanup, "Can't creat Xwrit");
-		 }
+		}
 		for (iws = BUFSIZ; iws > 0; iws--) {
 			if ((cwrite = write(fild, pwbuf, iws)) != iws) {
 				TEST_ERROR_LOG(errno);
diff --git a/testcases/kernel/syscalls/write/write03.c b/testcases/kernel/syscalls/write/write03.c
index 5f1103e..f1a1943 100644
--- a/testcases/kernel/syscalls/write/write03.c
+++ b/testcases/kernel/syscalls/write/write03.c
@@ -78,10 +78,9 @@
 	char wbuf[BUFSIZ], rbuf[BUFSIZ];
 	int fd;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/* global setup */
 	setup();
@@ -100,31 +99,31 @@
 		if (fd < 0) {
 			tst_resm(TBROK, "creating a new file failed");
 			cleanup();
-		 }
+		}
 
 		(void)memset(wbuf, '0', 100);
 
 		if (write(fd, wbuf, 100) == -1) {
 			tst_resm(TFAIL, "failed to write to %s", filename);
 			cleanup();
-		 }
+		}
 
 		if (write(fd, bad_addr, 100) != -1) {
 			tst_resm(TFAIL, "write(2) failed to fail");
 			cleanup();
-		 }
+		}
 		TEST_ERROR_LOG(errno);
 		close(fd);
 
 		if ((fd = open(filename, O_RDONLY)) == -1) {
 			tst_resm(TBROK, "open(2) failed, errno: %d", errno);
 			cleanup();
-		 }
+		}
 
 		if (read(fd, rbuf, 100) == -1) {
 			tst_resm(TBROK, "read(2) failed, errno: %d", errno);
 			cleanup();
-		 }
+		}
 
 		if (memcmp(wbuf, rbuf, 100) == 0) {
 			tst_resm(TPASS, "failure of write(2) didnot corrupt "
@@ -196,4 +195,4 @@
 	unlink(filename);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/write/write04.c b/testcases/kernel/syscalls/write/write04.c
index 9e4ab45..e85ac75 100644
--- a/testcases/kernel/syscalls/write/write04.c
+++ b/testcases/kernel/syscalls/write/write04.c
@@ -81,10 +81,9 @@
 	char wbuf[17 * PIPE_SIZE_TEST];
 	struct sigaction sigptr;	/* set up signal handler */
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/* global setup */
 	setup();
@@ -99,15 +98,15 @@
 		if (mknod(fifo, S_IFIFO | 0777, 0) < 0) {
 			tst_resm(TBROK, "mknod() failed, errno: %d", errno);
 			cleanup();
-		 }
+		}
 		if (stat(fifo, &buf) != 0) {
 			tst_resm(TBROK, "stat() failed, errno: %d", errno);
 			cleanup();
-		 }
+		}
 		if ((buf.st_mode & S_IFIFO) == 0) {
 			tst_resm(TBROK, "Mode does not indicate fifo file");
 			cleanup();
-		 }
+		}
 #if 0
 		sigset(SIGALRM, alarm_handler);
 #endif
@@ -146,7 +145,7 @@
 		if (sigsetjmp(jmp, 1)) {
 			tst_resm(TBROK, "setjmp() failed");
 			cleanup();
-		 }
+		}
 		(void)alarm(10);	/* set alarm for 10 seconds */
 		wfd = open(fifo, O_WRONLY | O_NONBLOCK);
 		(void)alarm(0);
@@ -252,4 +251,4 @@
 	unlink(fifo);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/write/write05.c b/testcases/kernel/syscalls/write/write05.c
index 6252e98..dd73f28 100644
--- a/testcases/kernel/syscalls/write/write05.c
+++ b/testcases/kernel/syscalls/write/write05.c
@@ -84,10 +84,9 @@
 	int pipefildes[2];
 	int status, pid;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	/* global setup */
 	setup();
@@ -117,19 +116,19 @@
 		if (fd < 0) {
 			tst_resm(TFAIL, "creating a new file failed");
 			cleanup();
-		 }
+		}
 		if (write(fd, bad_addr, 10) != -1) {
 			tst_resm(TFAIL, "write() on an invalid buffer "
 				 "succeeded, but should have failed");
 			cleanup();
-		 } else {
+		} else {
 			TEST_ERROR_LOG(errno);
 			if (errno != EFAULT) {
 				tst_resm(TFAIL, "write() returned illegal "
 					 "errno: expected EFAULT, got %d",
 					 errno);
 				cleanup();
-			 }
+			}
 			tst_resm(TPASS, "received EFAULT as expected.");
 		}
 		tst_resm(TINFO, "Exit Block 2");
@@ -232,4 +231,4 @@
 	unlink(filename);
 	tst_rmdir();
 
- }
+}
diff --git a/testcases/kernel/syscalls/writev/writev01.c b/testcases/kernel/syscalls/writev/writev01.c
index b5ce3df..8bb8d6f 100644
--- a/testcases/kernel/syscalls/writev/writev01.c
+++ b/testcases/kernel/syscalls/writev/writev01.c
@@ -151,27 +151,26 @@
 		fd[1] = -1;	/* Invalid file descriptor  */
 
 		if (signal(SIGTERM, sighandler) == SIG_ERR)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "signal(SIGTERM, ..) failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "signal(SIGTERM, ..) failed");
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "signal(SIGPIPE, ..) failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "signal(SIGPIPE, ..) failed");
 
 		init_buffs(buf_list);
 
 		if ((fd[0] = open(f_name, O_WRONLY | O_CREAT, 0666)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "open(.., O_WRONLY|O_CREAT, ..) failed");
-		else
-			if ((nbytes = write(fd[0], buf_list[2], K_1)) != K_1)
-				tst_brkm(TBROK|TERRNO, cleanup, "write failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "open(.., O_WRONLY|O_CREAT, ..) failed");
+		else if ((nbytes = write(fd[0], buf_list[2], K_1)) != K_1)
+			tst_brkm(TBROK | TERRNO, cleanup, "write failed");
 
 		if (close(fd[0]) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "open failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "open failed");
 //block1: /* given vector length -1, writev return EINVAL. */
 		tst_resm(TPASS, "Enter Block 1");
 
@@ -194,31 +193,29 @@
 		tst_resm(TPASS, "Enter block 2");
 
 		if (lseek(fd[0], CHUNK * 6, 0) == -1)
-			tst_resm(TBROK|TERRNO, "block2: 1st lseek failed");
+			tst_resm(TBROK | TERRNO, "block2: 1st lseek failed");
 
 		if ((ret = writev(fd[0], (wr_iovec + 6), 3)) == CHUNK) {
 			if (lseek(fd[0], CHUNK * 6, 0) == -1)
-				tst_brkm(TBROK|TERRNO, cleanup,
-				    "block2: 2nd lseek failed");
-			if ((nbytes = read(fd[0], buf_list[0], CHUNK)) !=
-			    CHUNK)
+				tst_brkm(TBROK | TERRNO, cleanup,
+					 "block2: 2nd lseek failed");
+			if ((nbytes = read(fd[0], buf_list[0], CHUNK)) != CHUNK)
 				tst_resm(TFAIL, "read failed; expected nbytes "
-				    "= 1024, got = %d", nbytes);
+					 "= 1024, got = %d", nbytes);
 			else if (memcmp((buf_list[0] + CHUNK * 6),
-					  (buf_list[2] + CHUNK * 6),
-					  CHUNK) != 0)
+					(buf_list[2] + CHUNK * 6), CHUNK) != 0)
 				tst_resm(TFAIL, "writev over "
 					 "wrote %s", f_name);
 		} else
-			tst_resm(TFAIL|TERRNO, "writev failed unexpectedly");
+			tst_resm(TFAIL | TERRNO, "writev failed unexpectedly");
 		tst_resm(TINFO, "Exit block 2");
 
 //block3: /* given 1 bad vector buffer with good ones, writev success */
 		tst_resm(TPASS, "Enter block 3");
 
 		if (lseek(fd[0], CHUNK * 6, 0) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "block3: 1st lseek failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "block3: 1st lseek failed");
 		if ((nbytes = writev(fd[0], (wr_iovec + 6), 3)) == -1) {
 			if (errno == EFAULT)
 				tst_resm(TFAIL, "Got EFAULT");
@@ -226,9 +223,9 @@
 		if (lseek(fd[0], 0, 0) == -1)
 			tst_brkm(TBROK, cleanup, "block3: 2nd lseek failed");
 		if ((nbytes = read(fd[0], buf_list[0], K_1)) != K_1) {
-			tst_resm(TFAIL|TERRNO,
-			    "read failed; expected nbytes = 1024, got = %d",
-			    nbytes);
+			tst_resm(TFAIL | TERRNO,
+				 "read failed; expected nbytes = 1024, got = %d",
+				 nbytes);
 		} else if (memcmp((buf_list[0] + CHUNK * 6),
 				  (buf_list[2] + CHUNK * 6), CHUNK * 3) != 0)
 			tst_resm(TFAIL, "writev overwrote file");
@@ -246,8 +243,7 @@
 				tst_resm(TFAIL, "expected errno = EBADF, "
 					 "got %d", TEST_ERRNO);
 		} else
-			tst_resm(TFAIL, "writev returned a "
-				 "positive value");
+			tst_resm(TFAIL, "writev returned a " "positive value");
 
 		tst_resm(TINFO, "Exit block 4");
 
@@ -262,8 +258,7 @@
 				tst_resm(TFAIL, "expected errno = EINVAL, "
 					 "got %d", TEST_ERRNO);
 		} else
-			tst_resm(TFAIL, "writev returned a "
-				 "positive value");
+			tst_resm(TFAIL, "writev returned a " "positive value");
 
 		tst_resm(TINFO, "Exit block 5");
 
@@ -272,7 +267,7 @@
 
 		TEST(writev(fd[0], (wr_iovec + 11), 0));
 		if (TEST_RETURN == -1)
-			tst_resm(TFAIL|TTERRNO, "writev failed");
+			tst_resm(TFAIL | TTERRNO, "writev failed");
 		else
 			tst_resm(TPASS, "writev wrote 0 iovectors");
 
@@ -299,21 +294,21 @@
 		tst_resm(TPASS, "Enter block 8");
 
 		if (pipe(pfd) == -1)
-			tst_resm(TFAIL|TERRNO, "pipe failed");
+			tst_resm(TFAIL | TERRNO, "pipe failed");
 		else {
 			if (close(pfd[0]) == -1)
-				tst_resm(TFAIL|TERRNO, "close failed");
+				tst_resm(TFAIL | TERRNO, "close failed");
 			else if (writev(pfd[1], (wr_iovec + 12), 1) == -1 &&
-			    in_sighandler) {
+				 in_sighandler) {
 				if (errno == EPIPE)
 					tst_resm(TPASS, "Received EPIPE as "
 						 "expected");
 				else
-					tst_resm(TFAIL|TERRNO,
-					    "didn't get EPIPE");
+					tst_resm(TFAIL | TERRNO,
+						 "didn't get EPIPE");
 			} else
 				tst_resm(TFAIL, "writev returned a positive "
-						"value");
+					 "value");
 		}
 		tst_resm(TINFO, "Exit block 8");
 	}
@@ -338,7 +333,7 @@
 	bad_addr = mmap(0, 1, PROT_NONE,
 			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	wr_iovec[7].iov_base = bad_addr;
 
 }
@@ -348,13 +343,13 @@
 	TEST_CLEANUP;
 
 	if (munmap(bad_addr, 1) == -1)
-		tst_resm(TBROK|TERRNO, "munmap failed");
+		tst_resm(TBROK | TERRNO, "munmap failed");
 
 	close(fd[0]);
 	close(fd[1]);
 
 	if (unlink(f_name) == -1)
-		tst_resm(TBROK|TERRNO, "unlink failed");
+		tst_resm(TBROK | TERRNO, "unlink failed");
 
 	tst_rmdir();
 
diff --git a/testcases/kernel/syscalls/writev/writev02.c b/testcases/kernel/syscalls/writev/writev02.c
index 03595f8..3efdf33 100644
--- a/testcases/kernel/syscalls/writev/writev02.c
+++ b/testcases/kernel/syscalls/writev/writev02.c
@@ -72,7 +72,7 @@
 char *bad_addr = 0;
 
 struct iovec wr_iovec[MAX_IOVEC] = {
-	{(caddr_t) -1, CHUNK},
+	{(caddr_t) - 1, CHUNK},
 	{(caddr_t) NULL, 0},
 };
 
@@ -118,26 +118,29 @@
 		fd[1] = -1;	/* Invalid file descriptor */
 
 		if (signal(SIGTERM, sighandler) == SIG_ERR)
-			tst_brkm(TFAIL|TERRNO, cleanup, "signal(SIGTERM, ..)");
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "signal(SIGTERM, ..)");
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR)
-			tst_brkm(TFAIL|TERRNO, cleanup, "signal(SIGPIPE, ..)");
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "signal(SIGPIPE, ..)");
 
-		if ((fd[0] = open(f_name, O_WRONLY|O_CREAT, 0666)) < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup,
-			    "open(.., O_WRONLY|O_CREAT, ..) failed");
+		if ((fd[0] = open(f_name, O_WRONLY | O_CREAT, 0666)) < 0)
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "open(.., O_WRONLY|O_CREAT, ..) failed");
 		else {
 			l_seek(fd[0], K_1, 0);
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1)
-				tst_brkm(TFAIL|TERRNO, cleanup, "write failed");
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "write failed");
 		}
 
 		if (close(fd[0]) == -1)
-			tst_brkm(TFAIL|TERRNO, cleanup, "close failed");
+			tst_brkm(TFAIL | TERRNO, cleanup, "close failed");
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0)
-			tst_brkm(TFAIL|TERRNO, cleanup,
-			    "open(.., O_RDWR, ..) failed");
+			tst_brkm(TFAIL | TERRNO, cleanup,
+				 "open(.., O_RDWR, ..) failed");
 //block1:
 		/*
 		 * In this block we are trying to call writev() with invalid
@@ -191,9 +194,9 @@
 	sprintf(f_name, "%s.%d", name, getpid());
 
 	bad_addr = mmap(0, 1, PROT_NONE,
-			MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0);
+			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	wr_iovec[0].iov_base = bad_addr;
 
 }
@@ -206,9 +209,9 @@
 	close(fd[1]);
 
 	if (munmap(bad_addr, 1) == -1)
-		tst_resm(TWARN|TERRNO, "unmap failed");
+		tst_resm(TWARN | TERRNO, "unmap failed");
 	if (unlink(f_name) == -1)
-		tst_resm(TWARN|TERRNO, "unlink failed");
+		tst_resm(TWARN | TERRNO, "unlink failed");
 
 	tst_rmdir();
 
@@ -228,7 +231,7 @@
 	}
 
 	if (unlink(f_name) == -1 && errno != ENOENT)
-		tst_resm(TFAIL|TERRNO, "unlink failed");
+		tst_resm(TFAIL | TERRNO, "unlink failed");
 }
 
 /*
@@ -238,5 +241,5 @@
 void l_seek(int fdesc, off_t offset, int whence)
 {
 	if (lseek(fdesc, offset, whence) == -1)
-		tst_resm(TBROK|TERRNO, "lseek failed");
+		tst_resm(TBROK | TERRNO, "lseek failed");
 }
diff --git a/testcases/kernel/syscalls/writev/writev03.c b/testcases/kernel/syscalls/writev/writev03.c
index f6f6977..460a7c2 100644
--- a/testcases/kernel/syscalls/writev/writev03.c
+++ b/testcases/kernel/syscalls/writev/writev03.c
@@ -112,29 +112,28 @@
 		fd[1] = -1;	/* Invalid file descriptor */
 
 		if (signal(SIGTERM, sighandler) == SIG_ERR)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "signal(SIGTERM, ..) failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "signal(SIGTERM, ..) failed");
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "signal(SIGPIPE, ..) failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "signal(SIGPIPE, ..) failed");
 
 		memset(buf_list[0], 0, K_1);
 		memset(buf_list[1], 0, K_1);
 
-		if ((fd[0] = open(f_name, O_WRONLY|O_CREAT, 0666)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "open(.., O_WRONLY|O_CREAT, ..) failed");
-		else
-			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1)
-				tst_brkm(TFAIL|TERRNO, cleanup, "write failed");
+		if ((fd[0] = open(f_name, O_WRONLY | O_CREAT, 0666)) == -1)
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "open(.., O_WRONLY|O_CREAT, ..) failed");
+		else if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1)
+			tst_brkm(TFAIL | TERRNO, cleanup, "write failed");
 
 		if (close(fd[0]) < 0)
-			tst_brkm(TBROK|TERRNO, cleanup, "close failed");
+			tst_brkm(TBROK | TERRNO, cleanup, "close failed");
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup,
-			    "open(.., O_RDWR, ..) failed");
+			tst_brkm(TBROK | TERRNO, cleanup,
+				 "open(.., O_RDWR, ..) failed");
 //block1:
 		tst_resm(TINFO, "Enter block 1");
 
@@ -280,5 +279,5 @@
 void l_seek(int fdesc, off_t offset, int whence)
 {
 	if (lseek(fdesc, offset, whence) == -1)
-		tst_brkm(TBROK|TERRNO, cleanup, "lseek failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "lseek failed");
 }
diff --git a/testcases/kernel/syscalls/writev/writev04.c b/testcases/kernel/syscalls/writev/writev04.c
index 2125450..7bb3491 100644
--- a/testcases/kernel/syscalls/writev/writev04.c
+++ b/testcases/kernel/syscalls/writev/writev04.c
@@ -98,11 +98,10 @@
 
 	int nbytes;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-	 }
+	}
 
 	setup();		/* set "tstdir", and "testfile" vars */
 
@@ -123,13 +122,13 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 }
+		}
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 }
+		}
 
 		memset(buf_list[0], 0, K_1);
 		memset(buf_list[1], 0, K_1);
@@ -138,18 +137,18 @@
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 } else {
+		} else {
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 }
+			}
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 }
+		}
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
@@ -357,7 +356,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 }
+	}
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev05.c b/testcases/kernel/syscalls/writev/writev05.c
index cc732c8..57443e4 100644
--- a/testcases/kernel/syscalls/writev/writev05.c
+++ b/testcases/kernel/syscalls/writev/writev05.c
@@ -97,10 +97,9 @@
 
 	int nbytes;
 
-	if ((msg = parse_opts(argc, argv, NULL, NULL)) !=
-	    NULL) {
+	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	 }
+	}
 
 	setup();		/* set "tstdir", and "testfile" vars */
 
@@ -119,13 +118,13 @@
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGTERM FAILED");
 			cleanup();
-		 }
+		}
 
 		if (signal(SIGPIPE, sighandler) == SIG_ERR) {
 			perror("signal");
 			tst_resm(TFAIL, "signal() SIGPIPE FAILED");
 			cleanup();
-		 }
+		}
 
 		/* Fill the buf_list[0] and buf_list[1] with 0 zeros */
 		memset(buf_list[0], 0, K_1);
@@ -135,24 +134,24 @@
 			tst_resm(TFAIL, "open(2) failed: fname = %s, "
 				 "errno = %d", f_name, errno);
 			cleanup();
-		 } else {
+		} else {
 			if ((nbytes = write(fd[0], buf_list[1], K_1)) != K_1) {
 				tst_resm(TFAIL, "write(2) failed: nbytes "
 					 "= %d, errno = %d", nbytes, errno);
 				cleanup();
-			 }
+			}
 		}
 
 		if (close(fd[0]) < 0) {
 			tst_resm(TFAIL, "close failed: errno = %d", errno);
 			cleanup();
-		 }
+		}
 
 		if ((fd[0] = open(f_name, O_RDWR, 0666)) < 0) {
 			tst_resm(TFAIL, "open failed: fname = %s, errno = %d",
 				 f_name, errno);
 			cleanup();
-		 }
+		}
 
 		/*
 		 * In this block we are trying to call writev() with invalid
@@ -288,7 +287,7 @@
 		tst_resm(TFAIL, "unlink Failed--file = %s, errno = %d",
 			 f_name, errno);
 		cleanup();
-	 }
+	}
 	exit(sig);
 }
 
diff --git a/testcases/kernel/syscalls/writev/writev06.c b/testcases/kernel/syscalls/writev/writev06.c
index a9d8bc6..252a87f 100644
--- a/testcases/kernel/syscalls/writev/writev06.c
+++ b/testcases/kernel/syscalls/writev/writev06.c
@@ -132,7 +132,8 @@
 		TEST(writev(fd[0], wr_iovec, 2));
 		if (TEST_RETURN >= 0) {
 			if (TEST_RETURN == 2) {
-				tst_resm(TINFO, "writev returned %d as expected", 2);
+				tst_resm(TINFO,
+					 "writev returned %d as expected", 2);
 			} else {
 				tst_resm(TFAIL, "Expected nbytes = %d, got "
 					 "%ld", 2, TEST_RETURN);
@@ -140,7 +141,8 @@
 			}
 		} else {
 			TEST_ERROR_LOG(TEST_ERRNO);
-			tst_resm(TFAIL|TTERRNO, "Error writev return value = %ld",
+			tst_resm(TFAIL | TTERRNO,
+				 "Error writev return value = %ld",
 				 TEST_RETURN);
 			fail = 1;
 		}
diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime02.c b/testcases/kernel/timers/clock_gettime/clock_gettime02.c
index ece382c..685ce25 100644
--- a/testcases/kernel/timers/clock_gettime/clock_gettime02.c
+++ b/testcases/kernel/timers/clock_gettime/clock_gettime02.c
@@ -77,15 +77,14 @@
 char *TCID = "clock_gettime02";	/* Test program identifier.    */
 int TST_TOTAL;			/* Total number of test cases. */
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
 	struct timespec spec;
-	clockid_t clocks[2] = {CLOCK_REALTIME, CLOCK_MONOTONIC};
+	clockid_t clocks[2] = { CLOCK_REALTIME, CLOCK_MONOTONIC };
 
-	if ((msg = parse_opts (ac, av, NULL, NULL)) != NULL)
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	TST_TOTAL = sizeof(clocks) / sizeof(clocks[0]);
@@ -99,7 +98,8 @@
 		for (i = 0; i < TST_TOTAL; i++) {
 			TEST(syscall(__NR_clock_gettime, clocks[i], &spec));
 			tst_resm((TEST_RETURN < 0 ? TFAIL | TTERRNO : TPASS),
-				"%s", (TEST_RETURN == 0 ? "passed" : "failed"));
+				 "%s",
+				 (TEST_RETURN == 0 ? "passed" : "failed"));
 		}
 	}
 
@@ -108,8 +108,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, CLEANUP);
@@ -121,12 +120,11 @@
  * CLEANUP() - Performs one time CLEANUP for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/clock_gettime/clock_gettime03.c b/testcases/kernel/timers/clock_gettime/clock_gettime03.c
index d5d9810..6c0134f 100644
--- a/testcases/kernel/timers/clock_gettime/clock_gettime03.c
+++ b/testcases/kernel/timers/clock_gettime/clock_gettime03.c
@@ -78,21 +78,20 @@
 
 void setup(void);
 
-char *TCID = "clock_gettime03"; /* Test program identifier.    */
-int TST_TOTAL;		/* Total number of test cases. */
-static int exp_enos[] = {EINVAL, EFAULT, 0};
+char *TCID = "clock_gettime03";	/* Test program identifier.    */
+int TST_TOTAL;			/* Total number of test cases. */
+static int exp_enos[] = { EINVAL, EFAULT, 0 };
 
 int testcase[6] = {
-	EFAULT,	/* Bad timespec   */
-	EFAULT, /* Bad timespec   */
-	EINVAL,	/* MAX_CLOCKS	  */
-	EINVAL	/* MAX_CLOCKS + 1 */
+	EFAULT,			/* Bad timespec   */
+	EFAULT,			/* Bad timespec   */
+	EINVAL,			/* MAX_CLOCKS     */
+	EINVAL			/* MAX_CLOCKS + 1 */
 };
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
-	int i, lc;	/* loop counter */
+	int i, lc;		/* loop counter */
 	char *msg;
 	struct timespec spec, *temp;
 
@@ -117,8 +116,7 @@
 	if ((tst_kvercmp(2, 6, 12)) < 0) {
 		testcase[4] = EINVAL;
 		testcase[5] = EINVAL;
-	}
-	else {
+	} else {
 		testcase[4] = EFAULT;
 		testcase[5] = EFAULT;
 	}
@@ -133,11 +131,11 @@
 			temp = &spec;
 
 			if (i == 0) {
-				temp = (struct timespec *) -1;
+				temp = (struct timespec *)-1;
 			} else if (i == 1) {
-				temp = (struct timespec *) NULL;
+				temp = (struct timespec *)NULL;
 			} else if ((i >= 4) && (tst_kvercmp(2, 6, 12) >= 0)) {
-				temp = (struct timespec *) NULL;
+				temp = (struct timespec *)NULL;
 			}
 
 			TEST(syscall(__NR_clock_gettime, clocks[i], temp));
@@ -145,27 +143,26 @@
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == testcase[i]) {
 				tst_resm(TPASS | TTERRNO,
-					"got expected failure");
+					 "got expected failure");
 			} else {
 				tst_resm(TFAIL | TTERRNO,
-					"failed to produce expected error "
-					"[expected errno = %d (%s), "
-					"TEST_RETURN = %ld]",
-					testcase[i], strerror(testcase[i]),
-					TEST_RETURN);
-			} /* end of else */
+					 "failed to produce expected error "
+					 "[expected errno = %d (%s), "
+					 "TEST_RETURN = %ld]",
+					 testcase[i], strerror(testcase[i]),
+					 TEST_RETURN);
+			}	/* end of else */
 
-		}	/*End of TEST CASE LOOPING*/
+		}		/*End of TEST CASE LOOPING */
 
-	}	/*End for TEST_LOOPING*/
+	}			/*End for TEST_LOOPING */
 
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -180,12 +177,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/clock_settime/clock_settime02.c b/testcases/kernel/timers/clock_settime/clock_settime02.c
index c784b76..6c2e07c 100644
--- a/testcases/kernel/timers/clock_settime/clock_settime02.c
+++ b/testcases/kernel/timers/clock_settime/clock_settime02.c
@@ -79,14 +79,13 @@
 int TST_TOTAL = 1;		/* Total number of test cases. */
 static struct timespec saved;	/* Used to reset the time */
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc;
 	char *msg;
 	struct timespec spec;	/* Used to specify time for test */
 
-	if ((msg = parse_opts (ac, av, NULL, NULL)) != NULL)
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
 	setup();
@@ -100,8 +99,8 @@
 
 		TEST(syscall(__NR_clock_settime, CLOCK_REALTIME, &spec));
 		tst_resm((TEST_RETURN < 0 ? TFAIL | TTERRNO : TPASS),
-			"clock_settime %s",
-			(TEST_RETURN == 0 ? "passed" : "failed"));
+			 "clock_settime %s",
+			 (TEST_RETURN == 0 ? "passed" : "failed"));
 	}
 
 	cleanup();
@@ -109,8 +108,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -131,8 +129,7 @@
  * completion or premature exit
  */
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	/* Set the saved time */
 	if (clock_settime(CLOCK_REALTIME, &saved) < 0) {
@@ -141,8 +138,8 @@
 	}
 
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/clock_settime/clock_settime03.c b/testcases/kernel/timers/clock_settime/clock_settime03.c
index 7247ce6..b48e2d4 100644
--- a/testcases/kernel/timers/clock_settime/clock_settime03.c
+++ b/testcases/kernel/timers/clock_settime/clock_settime03.c
@@ -42,13 +42,13 @@
 };
 
 int testcases[] = {
-	EFAULT,	/* tp bad		*/
-	EINVAL,	/* CLOCK_MONOTONIC	*/
-	EINVAL,	/* MAX_CLOCKS		*/
-	EINVAL,	/* MAX_CLOCKS + 1	*/
-	EINVAL,	/* Invalid timespec	*/
-	EINVAL,	/* NSEC_PER_SEC + 1	*/
-	EPERM,	/* non-root user	*/
+	EFAULT,			/* tp bad               */
+	EINVAL,			/* CLOCK_MONOTONIC      */
+	EINVAL,			/* MAX_CLOCKS           */
+	EINVAL,			/* MAX_CLOCKS + 1       */
+	EINVAL,			/* Invalid timespec     */
+	EINVAL,			/* NSEC_PER_SEC + 1     */
+	EPERM,			/* non-root user        */
 	0,
 	0,
 };
@@ -57,6 +57,7 @@
 int TST_TOTAL = sizeof(testcases) / sizeof(*testcases);
 
 static int exp_enos[] = { EINVAL, EFAULT, EPERM, 0 };
+
 char nobody_uid[] = "nobody";
 struct passwd *ltpuser;
 static struct timespec spec, *temp, saved;
@@ -69,7 +70,6 @@
 	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 
-
 	/* PROCESS_CPUTIME_ID & THREAD_CPUTIME_ID are not supported on
 	 * kernel versions lower than 2.6.12 and changed back in 2.6.38
 	 */
@@ -98,28 +98,29 @@
 			if (i == TST_TOTAL - 1) {
 				if (seteuid(0) == -1) {
 					tst_brkm(TBROK | TERRNO, cleanup,
-						"Failed to set the effective "
-						"uid to root");
+						 "Failed to set the effective "
+						 "uid to root");
 				}
 			}
 
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == testcases[i]) {
 				tst_resm(TPASS | TTERRNO,
-					"clock_settime(2) got expected "
-					"failure.");
+					 "clock_settime(2) got expected "
+					 "failure.");
 			} else {
 				tst_resm(TFAIL | TTERRNO,
-					"clock_settime(2) failed to produce "
-					"expected error (return code = %ld)",
-					TEST_RETURN);
+					 "clock_settime(2) failed to produce "
+					 "expected error (return code = %ld)",
+					 TEST_RETURN);
 				/* Restore the clock to its previous state. */
 				if (TEST_RETURN == 0) {
 					if (syscall(__NR_clock_settime,
-						CLOCK_REALTIME,	&saved) < 0) {
+						    CLOCK_REALTIME,
+						    &saved) < 0) {
 						tst_resm(TWARN | TERRNO,
-							"FATAL: could not set "
-							"the clock!");
+							 "FATAL: could not set "
+							 "the clock!");
 					}
 				}
 			}
@@ -142,7 +143,7 @@
 	switch (option) {
 	case 0:
 		/* Make tp argument bad pointer */
-		temp = (struct timespec *) -1;
+		temp = (struct timespec *)-1;
 		break;
 	case 4:
 		/* Make the parameter of timespec invalid */
@@ -157,14 +158,13 @@
 		spec.tv_nsec = 0;
 		if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
 			tst_resm(TWARN, "user \"nobody\" not present; "
-					"skipping test");
+				 "skipping test");
 			return -1;
 		}
 		if (seteuid(ltpuser->pw_uid) == -1) {
 			tst_resm(TWARN | TERRNO,
-				"seteuid failed to set the effective "
-				"uid to %d (nobody)",
-				ltpuser->pw_uid);
+				 "seteuid failed to set the effective "
+				 "uid to %d (nobody)", ltpuser->pw_uid);
 			return -1;
 		}
 		break;
@@ -172,7 +172,7 @@
 	case 8:
 		/* Make tp argument bad pointer */
 		if (tst_kvercmp(2, 6, 12) >= 0)
-			temp = (struct timespec *) -1;
+			temp = (struct timespec *)-1;
 	}
 	return 0;
 }
diff --git a/testcases/kernel/timers/leapsec/leapsec_timer.c b/testcases/kernel/timers/leapsec/leapsec_timer.c
index 0775adb..2e7f715 100644
--- a/testcases/kernel/timers/leapsec/leapsec_timer.c
+++ b/testcases/kernel/timers/leapsec/leapsec_timer.c
@@ -80,7 +80,7 @@
 
 static void adjtimex_status(struct timex *tx, int status)
 {
-	const char * const msgs[6] = {
+	const char *const msgs[6] = {
 		"clock synchronized",
 		"insert leap second",
 		"delete leap second",
@@ -105,7 +105,7 @@
 		tst_resm(TINFO, "%s adjtimex: %s", strtime(&now), msgs[r]);
 	else
 		tst_resm(TINFO, "%s adjtimex: clock state %d",
-		    strtime(&now), r);
+			 strtime(&now), r);
 }
 
 static const char *strtime(const struct timespec *now)
@@ -145,12 +145,12 @@
 
 	fail = !in_order(target, now);
 	tst_resm(fail ? TFAIL : TINFO, "hrtimer early expiration is %s.",
-	    fail ? "detected" : "not detected");
+		 fail ? "detected" : "not detected");
 }
 
 static void run_leapsec(void)
 {
-	const struct timespec sleeptime = {0, NSEC_PER_SEC / 2};
+	const struct timespec sleeptime = { 0, NSEC_PER_SEC / 2 };
 	struct timespec now, leap, start;
 	struct timex tx;
 
diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
index a93b2a2..c576c3a 100644
--- a/testcases/kernel/timers/timer_create/timer_create02.c
+++ b/testcases/kernel/timers/timer_create/timer_create02.c
@@ -80,8 +80,7 @@
 int TST_TOTAL = 3;		/* Total number of test cases. */
 static struct sigevent evp, *evp_ptr;
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i, j;		/* loop counter */
 	char *msg;
@@ -109,7 +108,7 @@
 			for (j = 0; j < CLOCKS_DEFINED; ++j) {
 
 				if (strstr(get_clock_str(clock_list[j]),
-						"CPUTIME_ID")) {
+					   "CPUTIME_ID")) {
 					/* (PROCESS_CPUTIME_ID &
 					 *  THREAD_CPUTIME_ID)
 					 * is not supported on kernel versions
@@ -123,17 +122,15 @@
 					continue;
 
 				TEST(syscall(__NR_timer_create, clock_list[j],
-						evp_ptr, &created_timer_id));
+					     evp_ptr, &created_timer_id));
 
 				tst_resm((TEST_RETURN == 0 ?
-							TPASS :
-							TFAIL | TTERRNO),
-					"%s %s with notification type = %s",
-					get_clock_str(clock_list[j]),
-					(TEST_RETURN == 0 ?
-							"passed" :
-							"failed"),
-					message[i]);
+					  TPASS :
+					  TFAIL | TTERRNO),
+					 "%s %s with notification type = %s",
+					 get_clock_str(clock_list[j]),
+					 (TEST_RETURN == 0 ?
+					  "passed" : "failed"), message[i]);
 			}
 		}
 	}
@@ -143,8 +140,7 @@
 }
 
 /* setup_test() - sets up individual test */
-void
-setup_test(int option)
+void setup_test(int option)
 {
 	switch (option) {
 	case 0:
@@ -157,8 +153,8 @@
 		evp_ptr = NULL;
 		break;
 	case 2:
-		evp.sigev_value =  (sigval_t) 0;
-		evp.sigev_signo = SIGALRM; /* any will do */
+		evp.sigev_value = (sigval_t) 0;
+		evp.sigev_signo = SIGALRM;	/* any will do */
 		evp.sigev_notify = SIGEV_NONE;
 		evp_ptr = &evp;
 		break;
@@ -166,8 +162,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -179,12 +174,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
index 299ed3e..fa53cff 100644
--- a/testcases/kernel/timers/timer_create/timer_create03.c
+++ b/testcases/kernel/timers/timer_create/timer_create03.c
@@ -84,18 +84,16 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
@@ -106,8 +104,7 @@
 		"SIGEV_NONE"
 	};
 
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
+	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -121,12 +118,12 @@
 
 			setup_test(i);
 			TEST(syscall(__NR_timer_create, CLOCK_MONOTONIC,
-					evp_ptr, &created_timer_id));
+				     evp_ptr, &created_timer_id));
 
 			tst_resm((TEST_RETURN == 0 ? TPASS : TFAIL | TTERRNO),
-				"%s with notification type = %s",
-				(TEST_RETURN == 0 ? "passed" : "failed"),
-				message[i]);
+				 "%s with notification type = %s",
+				 (TEST_RETURN == 0 ? "passed" : "failed"),
+				 message[i]);
 
 		}
 
@@ -137,8 +134,7 @@
 }
 
 /* setup_test() - sets up individual test */
-void
-setup_test(int option)
+void setup_test(int option)
 {
 	switch (option) {
 	case 0:
@@ -151,8 +147,8 @@
 		evp_ptr = NULL;
 		break;
 	case 2:
-		evp.sigev_value =  (sigval_t) 0;
-		evp.sigev_signo = SIGALRM; /* any will do */
+		evp.sigev_value = (sigval_t) 0;
+		evp.sigev_signo = SIGALRM;	/* any will do */
 		evp.sigev_notify = SIGEV_NONE;
 		evp_ptr = &evp;
 		break;
@@ -160,8 +156,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/timers/timer_create/timer_create04.c b/testcases/kernel/timers/timer_create/timer_create04.c
index 37d54ab..9d7ee17 100644
--- a/testcases/kernel/timers/timer_create/timer_create04.c
+++ b/testcases/kernel/timers/timer_create/timer_create04.c
@@ -78,35 +78,33 @@
 
 void setup(void);
 
-char *TCID = "timer_create04"; 	/* Test program identifier.    */
+char *TCID = "timer_create04";	/* Test program identifier.    */
 int TST_TOTAL;			/* Total number of test cases. */
 
-static int exp_enos[] = {EINVAL, EFAULT, 0};
+static int exp_enos[] = { EINVAL, EFAULT, 0 };
 
 int testcase[6] = {
-	EINVAL,	/* MAX_CLOCKS     */
-	EINVAL,	/* MAX_CLOCKS + 1 */
-	EFAULT,	/* bad sigevent   */
-	EFAULT	/* bad timer_id   */
+	EINVAL,			/* MAX_CLOCKS     */
+	EINVAL,			/* MAX_CLOCKS + 1 */
+	EFAULT,			/* bad sigevent   */
+	EFAULT			/* bad timer_id   */
 };
 
 /*
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 
 }
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
@@ -146,41 +144,40 @@
 
 		for (i = 0; i < TST_TOTAL; i++) {
 
-			temp_ev = (struct sigevent *) NULL;
+			temp_ev = (struct sigevent *)NULL;
 			temp_id = &timer_id;
 
 			switch (i) {
-			case 2: /* make the timer_id bad address */
-				temp_id = (kernel_timer_t *) -1;
+			case 2:	/* make the timer_id bad address */
+				temp_id = (kernel_timer_t *) - 1;
 				break;
 			case 3:
 				/* make the event bad address */
-				temp_ev = (struct sigevent *) -1;
+				temp_ev = (struct sigevent *)-1;
 				break;
 			case 4:
 				/* Produce an invalid timer_id address. */
 				if (tst_kvercmp(2, 6, 12) >= 0)
-					temp_id = (kernel_timer_t *) -1;
+					temp_id = (kernel_timer_t *) - 1;
 				break;
 			case 5:
 				/* Produce an invalid event address. */
 				if (tst_kvercmp(2, 6, 12) >= 0)
-					temp_ev = (struct sigevent *) -1;
+					temp_ev = (struct sigevent *)-1;
 			}
 
 			TEST(syscall(__NR_timer_create, clocks[i], temp_ev,
-					temp_id));
+				     temp_id));
 
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == testcase[i]) {
 				tst_resm(TPASS | TTERRNO, "failed as expected");
 			} else {
 				tst_resm(TFAIL | TTERRNO,
-					"didn't fail as expected [expected "
-					"errno = %d (%s)]",
-					testcase[i],
-					strerror(testcase[i]));
-			} /* end of else */
+					 "didn't fail as expected [expected "
+					 "errno = %d (%s)]",
+					 testcase[i], strerror(testcase[i]));
+			}	/* end of else */
 
 		}
 
@@ -191,8 +188,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
diff --git a/testcases/kernel/timers/timer_delete/timer_delete02.c b/testcases/kernel/timers/timer_delete/timer_delete02.c
index 95c62c7..9a303ef 100644
--- a/testcases/kernel/timers/timer_delete/timer_delete02.c
+++ b/testcases/kernel/timers/timer_delete/timer_delete02.c
@@ -78,15 +78,13 @@
 char *TCID = "timer_delete02";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc;
 	char *msg;
 	kernel_timer_t timer_id;
 
-	if ((msg = parse_opts (ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
+	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -97,16 +95,16 @@
 		Tst_count = 0;
 
 		/* Create a Posix timer */
-		if (syscall(__NR_timer_create, CLOCK_REALTIME, NULL, &timer_id) < 0) {
+		if (syscall(__NR_timer_create, CLOCK_REALTIME, NULL, &timer_id)
+		    < 0) {
 			Tst_count = TST_TOTAL;
 			tst_brkm(TBROK | TERRNO, cleanup,
-				"timer_delete can't be tested because "
-				"timer_create failed");
+				 "timer_delete can't be tested because "
+				 "timer_create failed");
 		}
 		TEST(syscall(__NR_timer_delete, timer_id));
 		tst_resm((TEST_RETURN == 0 ? TPASS : TFAIL | TTERRNO),
-			"%s",
-			(TEST_RETURN == 0 ? "passed" : "failed"));
+			 "%s", (TEST_RETURN == 0 ? "passed" : "failed"));
 	}
 
 	cleanup();
@@ -114,8 +112,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -127,12 +124,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/timer_delete/timer_delete03.c b/testcases/kernel/timers/timer_delete/timer_delete03.c
index bd137fc..2080fad 100644
--- a/testcases/kernel/timers/timer_delete/timer_delete03.c
+++ b/testcases/kernel/timers/timer_delete/timer_delete03.c
@@ -77,23 +77,22 @@
 
 void setup(void);
 
-char *TCID = "timer_delete03"; 	/* Test program identifier.    */
-int TST_TOTAL;		       	/* Total number of test cases. */
+char *TCID = "timer_delete03";	/* Test program identifier.    */
+int TST_TOTAL;			/* Total number of test cases. */
 
-static int exp_enos[] = {EINVAL, 0};
+static int exp_enos[] = { EINVAL, 0 };
 
 int testcase[] = {
-	EINVAL /* Invalid timer ID */
+	EINVAL			/* Invalid timer ID */
 };
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL))
-		!= NULL) {
+	    != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -112,26 +111,24 @@
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == testcase[i]) {
 				tst_resm(TPASS | TTERRNO,
-					"failed as expected failure");
+					 "failed as expected failure");
 			} else {
 				tst_resm(TFAIL | TTERRNO,
-					"didn't fail as expected [expected "
-					"errno = %d (%s)]",
-					testcase[i],
-					strerror(testcase[i]));
-			} /* end of else */
+					 "didn't fail as expected [expected "
+					 "errno = %d (%s)]",
+					 testcase[i], strerror(testcase[i]));
+			}	/* end of else */
 
-		}	/* End of TEST CASE LOOPING*/
+		}		/* End of TEST CASE LOOPING */
 
-	}	/* End for TEST_LOOPING*/
+	}			/* End for TEST_LOOPING */
 
 	cleanup();
 	tst_exit();
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -146,12 +143,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/timer_settime/timer_settime02.c b/testcases/kernel/timers/timer_settime/timer_settime02.c
index eea206d..05705a7 100644
--- a/testcases/kernel/timers/timer_settime/timer_settime02.c
+++ b/testcases/kernel/timers/timer_settime/timer_settime02.c
@@ -83,14 +83,12 @@
 static kernel_timer_t timer;
 static int flag;
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
 
-	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
-			(char *) NULL) {
+	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -105,13 +103,14 @@
 			/* Set up individual test */
 			if (setup_test(i) == 0) {
 				TEST(syscall(__NR_timer_settime, timer, flag,
-						&new_set, old_temp));
+					     &new_set, old_temp));
 				tst_resm((TEST_RETURN == 0 ?
-							TPASS :
-							TFAIL | TTERRNO),
-					"%s",
-					(TEST_RETURN == 0 ? "passed" : "failed")
-				);
+					  TPASS :
+					  TFAIL | TTERRNO),
+					 "%s",
+					 (TEST_RETURN ==
+					  0 ? "passed" : "failed")
+				    );
 			}
 
 		}
@@ -122,8 +121,7 @@
 }
 
 /* This function does set up for individual tests */
-static int
-setup_test(int option)
+static int setup_test(int option)
 {
 	struct timespec timenow;	/* Used to obtain current time */
 	int rc = 0;
@@ -135,7 +133,7 @@
 		 * make flags equal to zero
 		 * use one-shot timer
 		 */
-		old_temp = (struct itimerspec *) NULL;
+		old_temp = (struct itimerspec *)NULL;
 		new_set.it_interval.tv_sec = 0;
 		new_set.it_interval.tv_nsec = 0;
 		new_set.it_value.tv_sec = 5;
@@ -153,7 +151,7 @@
 	case 2:
 		/* Use the periodic timer */
 		new_set.it_interval.tv_sec = 5;
-	        new_set.it_value.tv_sec = 0;
+		new_set.it_value.tv_sec = 0;
 		break;
 	case 3:
 		/* Use TIMER_ABSTIME flag for setting
@@ -168,7 +166,7 @@
 		 */
 		if (clock_gettime(CLOCK_REALTIME, &timenow) < 0) {
 			tst_resm(TWARN | TERRNO,
-				"clock_gettime failed; skipping the test");
+				 "clock_gettime failed; skipping the test");
 			rc = -1;
 		} else {
 			new_set.it_value.tv_sec = timenow.tv_sec + 25;
@@ -179,8 +177,7 @@
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -195,12 +192,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/kernel/timers/timer_settime/timer_settime03.c b/testcases/kernel/timers/timer_settime/timer_settime03.c
index e4dff7e..93836a6 100644
--- a/testcases/kernel/timers/timer_settime/timer_settime03.c
+++ b/testcases/kernel/timers/timer_settime/timer_settime03.c
@@ -76,31 +76,30 @@
 void setup(void);
 void setup_test(int option);
 
-char *TCID = "timer_settime03"; 	/* Test program identifier.    */
-int TST_TOTAL;				/* Total number of test cases. */
+char *TCID = "timer_settime03";	/* Test program identifier.    */
+int TST_TOTAL;			/* Total number of test cases. */
 
 static struct itimerspec new_set, old_set, *old_temp, *new_temp;
 static kernel_timer_t timer, tim;
 
-static int exp_enos[] = {EINVAL, EFAULT, 0};
+static int exp_enos[] = { EINVAL, EFAULT, 0 };
 
 int testcase[] = {
-	EINVAL,	/* New setting null */
-	EINVAL,	/* tv_nsec < 0 */
-	EINVAL,	/* nsec > NSEC/SEC */
-	EINVAL,	/* Invalid timerid */
-	EFAULT,	/* bad newsetting * */
-	EFAULT	/* bad oldsetting * */
+	EINVAL,			/* New setting null */
+	EINVAL,			/* tv_nsec < 0 */
+	EINVAL,			/* nsec > NSEC/SEC */
+	EINVAL,			/* Invalid timerid */
+	EFAULT,			/* bad newsetting * */
+	EFAULT			/* bad oldsetting * */
 };
 
-int
-main(int ac, char **av)
+int main(int ac, char **av)
 {
 	int lc, i;
 	char *msg;
 
 	if ((msg = parse_opts(ac, av, NULL, NULL))
-		!= NULL) {
+	    != NULL) {
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
 	}
 
@@ -117,17 +116,17 @@
 			/* Set up individual tests */
 			setup_test(i);
 			TEST(syscall(__NR_timer_settime, tim, 0, new_temp,
-					old_temp));
+				     old_temp));
 
 			/* check return code */
 			if (TEST_RETURN == -1 && TEST_ERRNO == testcase[i]) {
 				tst_resm(TPASS | TTERRNO, "failed as expected");
 			} else {
 				tst_resm(TFAIL | TTERRNO,
-					"didn't fail as expected [expected "
-					"errno = %d (%s)]",
-					testcase[i], strerror(testcase[i]));
-			} /* end of else */
+					 "didn't fail as expected [expected "
+					 "errno = %d (%s)]",
+					 testcase[i], strerror(testcase[i]));
+			}	/* end of else */
 
 		}
 
@@ -138,13 +137,12 @@
 }
 
 /* This function sets up individual tests */
-void
-setup_test(int option)
+void setup_test(int option)
 {
 	switch (option) {
 	case 0:
 		/* Pass NULL structure as new setting */
-		new_temp = (struct itimerspec *) NULL;
+		new_temp = (struct itimerspec *)NULL;
 		tim = timer;
 		old_temp = &old_set;
 		break;
@@ -162,32 +160,31 @@
 		break;
 	case 3:
 		/* make timer_id invalid */
-		tim = (kernel_timer_t)-1;
+		tim = (kernel_timer_t) - 1;
 		new_set.it_value.tv_nsec = 0;
 		break;
 	case 4:
 		/* make new_setting a bad pointer */
 		tim = timer;
-		new_temp = (struct itimerspec *) -1;
+		new_temp = (struct itimerspec *)-1;
 		break;
 	case 5:
 		/* make old_setting a bad pointer */
 		new_temp = &new_set;
-		old_temp = (struct itimerspec *) -1;
+		old_temp = (struct itimerspec *)-1;
 		break;
 	}
 }
 
 /* setup() - performs all ONE TIME setup for this test */
-void
-setup(void)
+void setup(void)
 {
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
 	if (syscall(__NR_timer_create, CLOCK_REALTIME, NULL, &timer) < 0) {
 		tst_brkm(TBROK, NULL, "Timer create failed. Cannot"
-				" setup test");
+			 " setup test");
 	}
 
 	/* set the expected errnos... */
@@ -200,12 +197,11 @@
  * cleanup() - Performs one time cleanup for this test at
  * completion or premature exit
  */
-void
-cleanup(void)
+void cleanup(void)
 {
 	/*
-	* print timing stats if that option was specified.
-	* print errno log if that option was specified.
-	*/
+	 * print timing stats if that option was specified.
+	 * print errno log if that option was specified.
+	 */
 	TEST_CLEANUP;
 }
diff --git a/testcases/misc/crash/crash01.c b/testcases/misc/crash/crash01.c
index 0bfaf73..b1ecc3d 100644
--- a/testcases/misc/crash/crash01.c
+++ b/testcases/misc/crash/crash01.c
@@ -63,8 +63,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="crash01";
-int TST_TOTAL=1;
+char *TCID = "crash01";
+int TST_TOTAL = 1;
 
 static int x_opt = 0;
 static int v_opt = 0;
@@ -136,65 +136,65 @@
  *  crashme +2000.80 666 100 1:10:30 2
  *	nsub  -> -c ?
  */
-option_t options[] =
-{
-	{ "v:", &v_opt, &v_copt },
-	{ "s:", &s_opt, &s_copt },
-	{ "n:", &n_opt, &n_copt },
-	{ "b:", &b_opt, &b_copt },
-	{ "x", &x_opt, NULL },
+option_t options[] = {
+	{"v:", &v_opt, &v_copt},
+	{"s:", &s_opt, &s_copt},
+	{"n:", &n_opt, &n_copt},
+	{"b:", &b_opt, &b_copt},
+	{"x", &x_opt, NULL},
 
-	{ NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
-int malloc_flag = 1; /* to be phased out */
+int malloc_flag = 1;		/* to be phased out */
 
-void badboy_fork ();
-void badboy_loop ();
-void summarize_status ();
+void badboy_fork();
+void badboy_loop();
+void summarize_status();
 void record_status(unsigned int n);
 
-int
-main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-  char *msg;
-  int lc;
+	char *msg;
+	int lc;
 
-  if ((msg=parse_opts(argc, argv, options, help)) != (char *) NULL)
-	tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
+	if ((msg = parse_opts(argc, argv, options, help)) != (char *)NULL)
+		tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
 
-  if (v_opt)
-	  verbose_level = atoi(v_copt);
+	if (v_opt)
+		verbose_level = atoi(v_copt);
 
-  if (n_opt)
-	  ntries = atoi(n_copt);
+	if (n_opt)
+		ntries = atoi(n_copt);
 
-  if (s_opt)
-	  nseed = atoi(s_copt);
-  else
-	  nseed = time(NULL);
-
-  if (b_opt) {
-	int inc;
-
-	inc = atoi(b_copt);
-	if (inc <= nbytes/2)
-	  	incptr = inc;
+	if (s_opt)
+		nseed = atoi(s_copt);
 	else
-		tst_brkm(TBROK, cleanup, "Invalid arg for -b (max: %u): %s", nbytes/2, b_copt);
-  }
+		nseed = time(NULL);
 
-   	setup();
+	if (b_opt) {
+		int inc;
 
-	for (lc=0; TEST_LOOPING(lc); lc++)
-    {
-		Tst_count=0;
+		inc = atoi(b_copt);
+		if (inc <= nbytes / 2)
+			incptr = inc;
+		else
+			tst_brkm(TBROK, cleanup,
+				 "Invalid arg for -b (max: %u): %s", nbytes / 2,
+				 b_copt);
+	}
+
+	setup();
+
+	for (lc = 0; TEST_LOOPING(lc); lc++) {
+		Tst_count = 0;
 
 		tst_resm(TINFO, "crashme %s%d.%d %d %d",
-	   		(malloc_flag == 0) ? "" : "+", nbytes, incptr, nseed, ntries);
+			 (malloc_flag == 0) ? "" : "+", nbytes, incptr, nseed,
+			 ntries);
 
-  		srand (nseed);
-		badboy_fork ();
+		srand(nseed);
+		badboy_fork();
 
 		/* still there? */
 		tst_resm(TPASS, "we're still here, OS seems to be robust");
@@ -209,60 +209,56 @@
 /* ************************* */
 int badboy_pid;
 
-void my_signal (int sig, void (*func) ());
+void my_signal(int sig, void (*func) ());
 
-void monitor_fcn (int sig)
+void monitor_fcn(int sig)
 {
-  int status;
+	int status;
 
- if (verbose_level >= 3)
-	    printf ("time limit reached on pid. using kill.\n");
-
-  status = kill (badboy_pid, SIGKILL);
-  if (status < 0)
-    {
 	if (verbose_level >= 3)
-      		printf ("failed to kill process\n");
-    }
+		printf("time limit reached on pid. using kill.\n");
+
+	status = kill(badboy_pid, SIGKILL);
+	if (status < 0) {
+		if (verbose_level >= 3)
+			printf("failed to kill process\n");
+	}
 }
 
-void
-badboy_fork ()
+void badboy_fork()
 {
 	int status, pid;
 
-      status = fork ();
-      badboy_pid = status;
-      if (status == 0)	/* badboy */
-	{
+	status = fork();
+	badboy_pid = status;
+	if (status == 0) {	/* badboy */
 #ifdef DEBUG_LATE_BADBOY
-	  sleep(ntries*MAX_TRY_TIME+10);
+		sleep(ntries * MAX_TRY_TIME + 10);
 #else
-	  badboy_loop ();
+		badboy_loop();
 #endif
-	  exit (0);	/* good goy, he survived! */
-	}
-      else if (status < 0)
-	perror ("fork");
-      else			/* parent watching over badboy */
-	{
-	  if (verbose_level > 3)
-	  	printf ("badboy pid = %d\n", badboy_pid);
+		exit(0);	/* good goy, he survived! */
+	} else if (status < 0)
+		perror("fork");
+	else {			/* parent watching over badboy */
+
+		if (verbose_level > 3)
+			printf("badboy pid = %d\n", badboy_pid);
 
 /* don't trust the child to return at night */
-      my_signal (SIGALRM, monitor_fcn);
-      alarm (ntries*MAX_TRY_TIME);
+		my_signal(SIGALRM, monitor_fcn);
+		alarm(ntries * MAX_TRY_TIME);
 
-	  pid = wait (&status);
-	  if (pid <= 0)
-	  {
-		  perror ("wait");
-	  } else {
-	  	if (verbose_level > 3)
-		  printf ("pid %d exited with status %d\n", pid, status);
-		record_status(status);
-	   }
-	}	/* parent */
+		pid = wait(&status);
+		if (pid <= 0) {
+			perror("wait");
+		} else {
+			if (verbose_level > 3)
+				printf("pid %d exited with status %d\n", pid,
+				       status);
+			record_status(status);
+		}
+	}			/* parent */
 	alarm(0);
 }
 
@@ -280,20 +276,18 @@
 }
 
 /* may not work with -c option */
-void
-summarize_status ()
+void summarize_status()
 {
-  int i;
+	int i;
 
-  if (verbose_level < 2)
-		  return;
+	if (verbose_level < 2)
+		return;
 
-  printf ("exit status ... number of cases\n");
-  for (i = 0; i < STATUS_MAX; i++)
-    {
-      if (status_table[i])
-      	printf ( "%11d ... %5d\n", i, status_table[i]);
-    }
+	printf("exit status ... number of cases\n");
+	for (i = 0; i < STATUS_MAX; i++) {
+		if (status_table[i])
+			printf("%11d ... %5d\n", i, status_table[i]);
+	}
 }
 
 /* ************* badboy ******************************************* */
@@ -308,229 +302,215 @@
 int offset = 0;
 int next_offset = 0;
 
-char * bad_malloc (int n);
-void my_signal (int sig, void (*func) ());
-void again_handler (int sig);
-void compute_block_badboy (int n);
-void compute_badboy ();
-BADBOY castaway (char *dat);
-void try_one_crash ();
-void set_up_signals ();
+char *bad_malloc(int n);
+void my_signal(int sig, void (*func) ());
+void again_handler(int sig);
+void compute_block_badboy(int n);
+void compute_badboy();
+BADBOY castaway(char *dat);
+void try_one_crash();
+void set_up_signals();
 
 /* badboy "entry" point */
-void
-badboy_loop ()
+void badboy_loop()
 {
-  int i;
+	int i;
 
-  if (malloc_flag == 0)
-	    {
-	      the_data = bad_malloc ((nbytes < 0) ? -nbytes : nbytes);
-	      badboy = castaway (the_data);
-	      printf ("Badboy at %p\n", badboy);
-	    }
-
-  for (i = 0; i < ntries; ++i)
-    {
-      compute_badboy ();
-	  /* level 5 */
-
-  if (!x_opt && verbose_level >= 5) {
-      if (offset)
-		printf ("try %d, offset %d\n", i, offset);
-      else if (malloc_flag == 1)
-		printf ("try %d, Badboy at %p\n", i, badboy);
-      else
-		printf ("try %d\n", i);
-  }
-
-      if (setjmp (again_buff) == 3)
-	{
-  	  if (verbose_level >= 5)
-	  	printf ("Barfed\n");
+	if (malloc_flag == 0) {
+		the_data = bad_malloc((nbytes < 0) ? -nbytes : nbytes);
+		badboy = castaway(the_data);
+		printf("Badboy at %p\n", badboy);
 	}
-      else
-	{
-	  set_up_signals ();
-	  alarm (MAX_TRY_TIME);
-	  try_one_crash ();
-  	  if (!x_opt && verbose_level >= 5)
-	  	printf ("didn't barf!\n");
+
+	for (i = 0; i < ntries; ++i) {
+		compute_badboy();
+		/* level 5 */
+
+		if (!x_opt && verbose_level >= 5) {
+			if (offset)
+				printf("try %d, offset %d\n", i, offset);
+			else if (malloc_flag == 1)
+				printf("try %d, Badboy at %p\n", i, badboy);
+			else
+				printf("try %d\n", i);
+		}
+
+		if (setjmp(again_buff) == 3) {
+			if (verbose_level >= 5)
+				printf("Barfed\n");
+		} else {
+			set_up_signals();
+			alarm(MAX_TRY_TIME);
+			try_one_crash();
+			if (!x_opt && verbose_level >= 5)
+				printf("didn't barf!\n");
+		}
 	}
-  }
 }
 
-char * bad_malloc (int n)
+char *bad_malloc(int n)
 {
-  char *data;
-  data = (char *) malloc (n);
+	char *data;
+	data = (char *)malloc(n);
 #ifdef pyr
-  if (mprotect (((int) data / PAGSIZ) * PAGSIZ, (n / PAGSIZ + 1) * PAGSIZ,
-		PROT_READ | PROT_WRITE | PROT_EXEC))
-    perror ("mprotect");
+	if (mprotect(((int)data / PAGSIZ) * PAGSIZ, (n / PAGSIZ + 1) * PAGSIZ,
+		     PROT_READ | PROT_WRITE | PROT_EXEC))
+		perror("mprotect");
 #endif
-  return (data);
+	return (data);
 }
 
-void again_handler (int sig)
+void again_handler(int sig)
 {
-  char *ss;
+	char *ss;
 
-  switch (sig)
-    {
-    case SIGILL:
-      ss = " illegal instruction";
-      break;
+	switch (sig) {
+	case SIGILL:
+		ss = " illegal instruction";
+		break;
 #ifdef SIGTRAP
-    case SIGTRAP:
-      ss = " trace trap";
-      break;
+	case SIGTRAP:
+		ss = " trace trap";
+		break;
 #endif
-    case SIGFPE:
-      ss = " arithmetic exception";
-      break;
+	case SIGFPE:
+		ss = " arithmetic exception";
+		break;
 #ifdef SIGBUS
-    case SIGBUS:
-      ss = " bus error";
-      break;
+	case SIGBUS:
+		ss = " bus error";
+		break;
 #endif
-    case SIGSEGV:
-      ss = " segmentation violation";
-      break;
+	case SIGSEGV:
+		ss = " segmentation violation";
+		break;
 #ifdef SIGIOT
-    case SIGIOT:
-      ss = " IOT instruction";
-      break;
+	case SIGIOT:
+		ss = " IOT instruction";
+		break;
 #endif
 #ifdef SIGEMT
-    case SIGEMT:
-      ss = " EMT instruction";
-      break;
+	case SIGEMT:
+		ss = " EMT instruction";
+		break;
 #endif
 #ifdef SIGALRM
-    case SIGALRM:
-      ss = " alarm clock";
-      break;
+	case SIGALRM:
+		ss = " alarm clock";
+		break;
 #endif
-    case SIGINT:
-      ss = " interrupt";
-      break;
-    default:
-      ss = "";
-    }
-  if (verbose_level >= 5)
-  	printf ("Got signal %d%s\n", sig, ss);
+	case SIGINT:
+		ss = " interrupt";
+		break;
+	default:
+		ss = "";
+	}
+	if (verbose_level >= 5)
+		printf("Got signal %d%s\n", sig, ss);
 
-  longjmp (again_buff, 3);
+	longjmp(again_buff, 3);
 }
 
-void my_signal (int sig, void (*func) ())
+void my_signal(int sig, void (*func) ())
 {
-  struct sigaction act;
+	struct sigaction act;
 
-  act.sa_handler = func;
-  memset (&act.sa_mask, 0x00, sizeof (sigset_t));
-  act.sa_flags = SA_NOMASK|SA_RESTART;
-  sigaction (sig, &act, 0);
+	act.sa_handler = func;
+	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
+	act.sa_flags = SA_NOMASK | SA_RESTART;
+	sigaction(sig, &act, 0);
 }
 
-void
-set_up_signals ()
+void set_up_signals()
 {
-  my_signal (SIGILL, again_handler);
+	my_signal(SIGILL, again_handler);
 #ifdef SIGTRAP
-  my_signal (SIGTRAP, again_handler);
+	my_signal(SIGTRAP, again_handler);
 #endif
-  my_signal (SIGFPE, again_handler);
+	my_signal(SIGFPE, again_handler);
 #ifdef SIGBUS
-  my_signal (SIGBUS, again_handler);
+	my_signal(SIGBUS, again_handler);
 #endif
-  my_signal (SIGSEGV, again_handler);
+	my_signal(SIGSEGV, again_handler);
 #ifdef SIGIOT
-  my_signal (SIGIOT, again_handler);
+	my_signal(SIGIOT, again_handler);
 #endif
 #ifdef SIGEMT
-  my_signal (SIGEMT, again_handler);
+	my_signal(SIGEMT, again_handler);
 #endif
 #ifdef SIGALRM
-  my_signal (SIGALRM, again_handler);
+	my_signal(SIGALRM, again_handler);
 #endif
-  my_signal (SIGINT, again_handler);
+	my_signal(SIGINT, again_handler);
 }
 
-void compute_block_badboy (int n)
+void compute_block_badboy(int n)
 {
-  int j;
+	int j;
 
-  if (malloc_flag == 1) {
-	free(the_data);
-    	the_data = bad_malloc (n);
-  }
+	if (malloc_flag == 1) {
+		free(the_data);
+		the_data = bad_malloc(n);
+	}
 
-  for (j = 0; j < n; ++j) {
+	for (j = 0; j < n; ++j) {
 #ifdef WANT_SLOW_RAND
-    the_data[j] = 0xFF & (int) (256.0*rand()/(RAND_MAX+1.0));
+		the_data[j] = 0xFF & (int)(256.0 * rand() / (RAND_MAX + 1.0));
 #else
-    the_data[j] = (rand () >> 7) & 0xFF;
+		the_data[j] = (rand() >> 7) & 0xFF;
 #endif
 #ifdef __powerpc__
-    __asm__ __volatile__("dcbst 0,%0 ; icbi 0,%0 ; isync" : : "r"(&the_data[j]) );
+		__asm__
+		    __volatile__("dcbst 0,%0 ; icbi 0,%0 ; isync"::"r"
+				 (&the_data[j]));
 #endif
 
-  }
-
-  /* was (nbytes < 0) */
-  if (x_opt)
-    {
-      if (verbose_level >= 1)
-      		printf ("Dump of %d bytes of data\n", n);
-      for (j = 0; j < n; ++j)
-	{
-	  if ((j % 16) == 0)
-	    printf ("\n%04d: ", j);
-
-	  printf ("%02x ", the_data[j]);
 	}
-      putc ('\n', stdout);
-    }
+
+	/* was (nbytes < 0) */
+	if (x_opt) {
+		if (verbose_level >= 1)
+			printf("Dump of %d bytes of data\n", n);
+		for (j = 0; j < n; ++j) {
+			if ((j % 16) == 0)
+				printf("\n%04d: ", j);
+
+			printf("%02x ", the_data[j]);
+		}
+		putc('\n', stdout);
+	}
 }
 
-BADBOY
-castaway (char *dat)
+BADBOY castaway(char *dat)
 {
-  return ((BADBOY) dat);
+	return ((BADBOY) dat);
 }
 
-void
-compute_badboy ()
+void compute_badboy()
 {
-  if (incptr == 0)
-    {
-      compute_block_badboy (nbytes);
-      badboy = castaway (the_data);
-    }
-    /* trigger block generation at xx % of the current block */
-  else if ((next_offset == 0) || (next_offset > ((nbytes * BLOCK_TRIGGER) / 100)))
-    {
-      compute_block_badboy (nbytes);
-      offset = 0;
-      next_offset = offset + incptr;
-      badboy = castaway (the_data);
-    }
-  else
-    {
-      offset = next_offset;
-      next_offset = offset + incptr;
-      badboy = castaway (&the_data[offset]);
-    }
+	if (incptr == 0) {
+		compute_block_badboy(nbytes);
+		badboy = castaway(the_data);
+	}
+	/* trigger block generation at xx % of the current block */
+	else if ((next_offset == 0)
+		 || (next_offset > ((nbytes * BLOCK_TRIGGER) / 100))) {
+		compute_block_badboy(nbytes);
+		offset = 0;
+		next_offset = offset + incptr;
+		badboy = castaway(the_data);
+	} else {
+		offset = next_offset;
+		next_offset = offset + incptr;
+		badboy = castaway(&the_data[offset]);
+	}
 }
 
-void
-try_one_crash ()
+void try_one_crash()
 {
-  /* was (nbytes < 0) */
-  if (!x_opt)
-    (*badboy) ();
-  else if (nbytes == 0)
-    while (1);
+	/* was (nbytes < 0) */
+	if (!x_opt)
+		(*badboy) ();
+	else if (nbytes == 0)
+		while (1) ;
 }
diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
index 4e1d67b..b6309cc 100644
--- a/testcases/misc/crash/crash02.c
+++ b/testcases/misc/crash/crash02.c
@@ -65,8 +65,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="crash02";
-int TST_TOTAL=1;
+char *TCID = "crash02";
+int TST_TOTAL = 1;
 
 static int x_opt = 0;
 static int v_opt = 0;
@@ -116,7 +116,8 @@
 
 void help()
 {
-	printf("	-x		dry run, hexdump random code instead\n");
+	printf
+	    ("	-x		dry run, hexdump random code instead\n");
 	printf("	-l x		max syscall no\n");
 	printf("	-v x		verbose level\n");
 	printf("	-s x		random seed\n");
@@ -125,25 +126,23 @@
 
 /*
  */
-option_t options[] =
-{
-	{ "v:", &v_opt, &v_copt },
-	{ "l:", &l_opt, &l_copt },
-	{ "s:", &s_opt, &s_copt },
-	{ "n:", &n_opt, &n_copt },
-	{ "x", &x_opt, NULL },
+option_t options[] = {
+	{"v:", &v_opt, &v_copt},
+	{"l:", &l_opt, &l_copt},
+	{"s:", &s_opt, &s_copt},
+	{"n:", &n_opt, &n_copt},
+	{"x", &x_opt, NULL},
 
-	{ NULL, NULL, NULL }
+	{NULL, NULL, NULL}
 };
 
-void badboy_fork ();
-void badboy_loop ();
+void badboy_fork();
+void badboy_loop();
 
-void summarize_errno ();
+void summarize_errno();
 void record_errno(unsigned int n);
 
-int
-main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *msg;
 	int lc;
@@ -168,7 +167,7 @@
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
-		Tst_count=0;
+		Tst_count = 0;
 
 		tst_resm(TINFO, "crashme02 %d %d %d", sysno_max, nseed, ntries);
 
@@ -187,24 +186,23 @@
 /* ************************* */
 int badboy_pid;
 
-void my_signal (int sig, void (*func) ());
+void my_signal(int sig, void (*func) ());
 
 void monitor_fcn(int sig)
 {
 	int status;
 
 	if (verbose_level >= 3)
-	printf ("time limit reached on pid. using kill.\n");
+		printf("time limit reached on pid. using kill.\n");
 
 	status = kill(badboy_pid, SIGKILL);
 	if (status < 0) {
 		if (verbose_level >= 3)
-			printf ("failed to kill process\n");
+			printf("failed to kill process\n");
 	}
 }
 
-void
-badboy_fork()
+void badboy_fork()
 {
 	int status, pid;
 	pid_t child;
@@ -215,26 +213,26 @@
 		perror("fork");
 	case 0:
 #ifdef DEBUG_LATE_BADBOY
-		sleep(ntries*MAX_TRY_TIME+10);
+		sleep(ntries * MAX_TRY_TIME + 10);
 #else
 		badboy_loop();
 #endif
 		exit(0);
 	default:
 		if (verbose_level > 3)
-			printf ("badboy pid = %d\n", badboy_pid);
+			printf("badboy pid = %d\n", badboy_pid);
 
 		/* don't trust the child to return at night */
-		my_signal (SIGALRM, monitor_fcn);
-		alarm (ntries*MAX_TRY_TIME);
+		my_signal(SIGALRM, monitor_fcn);
+		alarm(ntries * MAX_TRY_TIME);
 
-		pid = waitpid (-1, &status, WUNTRACED);
+		pid = waitpid(-1, &status, WUNTRACED);
 		if (pid <= 0)
 			perror("wait");
 		else {
 			if (verbose_level > 3)
 				printf("pid %d exited with status %d\n",
-				    pid, status);
+				       pid, status);
 #if 0
 			record_status(status);
 #endif
@@ -258,18 +256,17 @@
 }
 
 /* may not work with -c option */
-void
-summarize_errno ()
+void summarize_errno()
 {
 	int i;
 
 	if (x_opt || verbose_level < 2)
-			return;
+		return;
 
-	printf ("errno status ... number of cases\n");
+	printf("errno status ... number of cases\n");
 	for (i = 0; i < STATUS_MAX; i++) {
 		if (errno_table[i])
-			printf ( "%12d ... %5d\n", i, errno_table[i]);
+			printf("%12d ... %5d\n", i, errno_table[i]);
 	}
 }
 
@@ -277,20 +274,19 @@
 
 jmp_buf again_buff;
 
-unsigned char * bad_malloc (int n);
-void my_signal (int sig, void (*func) ());
-void again_handler (int sig);
-void try_one_crash (int try_num);
-void set_up_signals ();
-int in_blacklist (int sysno);
+unsigned char *bad_malloc(int n);
+void my_signal(int sig, void (*func) ());
+void again_handler(int sig);
+void try_one_crash(int try_num);
+void set_up_signals();
+int in_blacklist(int sysno);
 
 /* badboy "entry" point */
 
 /*
  * Unlike crashme, faulty syscalls are not supposed to barf
  */
-void
-badboy_loop ()
+void badboy_loop()
 {
 	int i;
 
@@ -301,19 +297,19 @@
 			printf("try %d\n", i);
 		}
 
-		if (setjmp (again_buff) == 3) {
+		if (setjmp(again_buff) == 3) {
 			if (verbose_level >= 5)
-					printf("Barfed\n");
+				printf("Barfed\n");
 		} else {
-			set_up_signals ();
+			set_up_signals();
 			alarm(MAX_TRY_TIME);
-			try_one_crash (i);
+			try_one_crash(i);
 		}
 	}
 	summarize_errno();
 }
 
-void again_handler (int sig)
+void again_handler(int sig)
 {
 	char *ss;
 
@@ -359,43 +355,42 @@
 		ss = "";
 	}
 	if (verbose_level >= 5)
-		printf ("Got signal %d%s\n", sig, ss);
+		printf("Got signal %d%s\n", sig, ss);
 
-	longjmp (again_buff, 3);
+	longjmp(again_buff, 3);
 }
 
-void my_signal (int sig, void (*func) ())
+void my_signal(int sig, void (*func) ())
 {
 	struct sigaction act;
 
 	act.sa_handler = func;
-	memset (&act.sa_mask, 0x00, sizeof (sigset_t));
-	act.sa_flags = SA_NOMASK|SA_RESTART;
-	sigaction (sig, &act, 0);
+	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
+	act.sa_flags = SA_NOMASK | SA_RESTART;
+	sigaction(sig, &act, 0);
 }
 
-void
-set_up_signals ()
+void set_up_signals()
 {
-	my_signal (SIGILL, again_handler);
+	my_signal(SIGILL, again_handler);
 #ifdef SIGTRAP
-	my_signal (SIGTRAP, again_handler);
+	my_signal(SIGTRAP, again_handler);
 #endif
-	my_signal (SIGFPE, again_handler);
+	my_signal(SIGFPE, again_handler);
 #ifdef SIGBUS
-	my_signal (SIGBUS, again_handler);
+	my_signal(SIGBUS, again_handler);
 #endif
-	my_signal (SIGSEGV, again_handler);
+	my_signal(SIGSEGV, again_handler);
 #ifdef SIGIOT
-	my_signal (SIGIOT, again_handler);
+	my_signal(SIGIOT, again_handler);
 #endif
 #ifdef SIGEMT
-	my_signal (SIGEMT, again_handler);
+	my_signal(SIGEMT, again_handler);
 #endif
 #ifdef SIGALRM
-	my_signal (SIGALRM, again_handler);
+	my_signal(SIGALRM, again_handler);
 #endif
-	my_signal (SIGINT, again_handler);
+	my_signal(SIGINT, again_handler);
 }
 
 /*
@@ -412,28 +407,27 @@
  */
 long int rand_long()
 {
-		int r1, r2;
+	int r1, r2;
 
-		r1 = rand();
-		r2 = rand();
+	r1 = rand();
+	r2 = rand();
 
-		if (r1 & 0x10000L)
-			r1 = 0;
-		if (!r1 && (r2 & 0x50000L))
-			r2 = 0;
-		else if (!r1 && (r2 & 0x20000L))
-			r2 &= 0x00ffL;
+	if (r1 & 0x10000L)
+		r1 = 0;
+	if (!r1 && (r2 & 0x50000L))
+		r2 = 0;
+	else if (!r1 && (r2 & 0x20000L))
+		r2 &= 0x00ffL;
 
-		return (long int) ((r1 & 0xffffL) << 16) | (r2 & 0xffffL);
+	return (long int)((r1 & 0xffffL) << 16) | (r2 & 0xffffL);
 }
 
-void
-try_one_crash (int try_num)
+void try_one_crash(int try_num)
 {
 	long int sysno, arg1, arg2, arg3, arg4, arg5, arg6, arg7;
 
 	do {
-		sysno = rand()%sysno_max;
+		sysno = rand() % sysno_max;
 	} while (in_blacklist(sysno));
 
 	arg1 = rand_long();
@@ -447,19 +441,18 @@
 	if (x_opt) {
 		if (verbose_level >= 1)
 			printf("%04d: syscall(%ld, %#lx, %#lx, %#lx, %#lx, "
-					"%#lx, %#lx, %#lx)\n",
-					try_num, sysno, arg1, arg2, arg3, arg4, arg5,
-					arg6, arg7);
+			       "%#lx, %#lx, %#lx)\n",
+			       try_num, sysno, arg1, arg2, arg3, arg4, arg5,
+			       arg6, arg7);
 	} else {
-		syscall (sysno, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+		syscall(sysno, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 		record_errno(errno);
 	}
 }
 
 /* The following syscalls create new processes which may cause the test
 	 unable to finish. */
-int
-in_blacklist (int sysno)
+int in_blacklist(int sysno)
 {
 	int i;
 	const int list[] = {
diff --git a/testcases/misc/f00f/f00f.c b/testcases/misc/f00f/f00f.c
index d987974..1eb15fc 100644
--- a/testcases/misc/f00f/f00f.c
+++ b/testcases/misc/f00f/f00f.c
@@ -42,48 +42,43 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="f00f";
-int TST_TOTAL=1;
+char *TCID = "f00f";
+int TST_TOTAL = 1;
 
 #ifdef __i386__
 
-void
-sigill (int sig)
+void sigill(int sig)
 {
-  tst_resm(TPASS, "SIGILL received from f00f instruction.  Good.");
-  tst_exit();
+	tst_resm(TPASS, "SIGILL received from f00f instruction.  Good.");
+	tst_exit();
 }
 
-int
-main ()
+int main()
 {
-  signal (SIGILL, sigill);
-  tst_resm(TINFO, "Testing for proper f00f instruction handling.");
+	signal(SIGILL, sigill);
+	tst_resm(TINFO, "Testing for proper f00f instruction handling.");
 
-  /*
-   * an f00f instruction
-   */
-  asm volatile (".byte	0xf0\n"
-		".byte	0x0f\n"
-		".byte	0xc7\n"
-		".byte	0xc8\n");
+	/*
+	 * an f00f instruction
+	 */
+	asm volatile (".byte	0xf0\n"
+		      ".byte	0x0f\n" ".byte	0xc7\n" ".byte	0xc8\n");
 
-  /*
-   * we shouldn't get here, the f00f instruction should trigger
-   * a SIGILL or lock the system.
-   */
-  tst_resm(TFAIL, "f00f instruction did not properly cause SIGILL");
-  tst_exit();
+	/*
+	 * we shouldn't get here, the f00f instruction should trigger
+	 * a SIGILL or lock the system.
+	 */
+	tst_resm(TFAIL, "f00f instruction did not properly cause SIGILL");
+	tst_exit();
 }
 
 #else /* __i386__ */
 
-int
-main ()
+int main()
 {
-  tst_resm(TCONF, "f00f bug test only for i386");
-  tst_exit();
-        return 0;
+	tst_resm(TCONF, "f00f bug test only for i386");
+	tst_exit();
+	return 0;
 }
 
 #endif /* __i386__ */
diff --git a/testcases/misc/math/abs/abs01.c b/testcases/misc/math/abs/abs01.c
index 80e26f9..83bc521 100644
--- a/testcases/misc/math/abs/abs01.c
+++ b/testcases/misc/math/abs/abs01.c
@@ -36,7 +36,7 @@
  */
 #define _GNU_SOURCE 1
 
-#include <stdio.h>		/* needed by testhead.h		*/
+#include <stdio.h>		/* needed by testhead.h         */
 #include <stdlib.h>
 #include <unistd.h>
 #include <ctype.h>
@@ -55,8 +55,8 @@
 int local_flag = PASSED;
 int block_number;
 int errno;
-FILE * temp;
-int TST_TOTAL =1;
+FILE *temp;
+int TST_TOTAL = 1;
 
 void setup();
 int blenter();
@@ -65,14 +65,14 @@
 /********************************/
 
 /*--------------------------------------------------------------*/
-int main (argc, argv)
-	int  argc;
-	char *argv[];
+int main(argc, argv)
+int argc;
+char *argv[];
 {
 	register long long i;
-	register int j, k, l,m;
+	register int j, k, l, m;
 
-	setup();		/* temp file is now open	*/
+	setup();		/* temp file is now open        */
 /*--------------------------------------------------------------*/
 	blenter();
 
@@ -97,7 +97,7 @@
 /*--------------------------------------------------------------*/
 	blenter();
 
-	for (m = 1; m >= 0 ; m <<= 1) {
+	for (m = 1; m >= 0; m <<= 1) {
 		j = ~m;
 		k = j + 1;
 		l = abs(k);
@@ -111,24 +111,27 @@
 
 	tst_exit();
 }
+
 /*--------------------------------------------------------------*/
 
 /*****  LTP Port	*****/
 void setup()
 {
-  temp = stderr;
+	temp = stderr;
 }
 
 int blenter()
 {
-  local_flag = PASSED;
-  return(0);
+	local_flag = PASSED;
+	return (0);
 }
 
 int blexit()
 {
-  (local_flag == PASSED ) ? tst_resm(TPASS, "Test passed") : tst_resm(TFAIL, "Test failed");
-  return(0);
+	(local_flag == PASSED) ? tst_resm(TPASS,
+					  "Test passed") : tst_resm(TFAIL,
+								    "Test failed");
+	return (0);
 }
 
 /******			*****/
diff --git a/testcases/misc/math/atof/atof01.c b/testcases/misc/math/atof/atof01.c
index ea4c366..8b160f3 100644
--- a/testcases/misc/math/atof/atof01.c
+++ b/testcases/misc/math/atof/atof01.c
@@ -56,7 +56,7 @@
 
 /*char progname[]= "atof1()"; */
 /**	LTP Port	**/
-char *TCID = "atof01"; /* Test program identifier*/
+char *TCID = "atof01";		/* Test program identifier */
 
 int local_flag = PASSED;
 int block_number;
@@ -67,29 +67,28 @@
 void setup();
 void blenter();
 void blexit();
-int numin(char*, double*);
-int checkbuf(char*, int, int);
+int numin(char *, double *);
+int checkbuf(char *, int, int);
 
 /*--------------------------------------------------------------*/
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	register int i, j;
 	double r1, r2, x;
 	char buf[100];
 
-	setup();		/* temp file is now open	*/
+	setup();		/* temp file is now open        */
 	pi = 4.0 * atan(1.0);
 
 /*--------------------------------------------------------------*/
 	blenter();
 
-	for (i=0; i < 30; i++)
-		for (j=0; j < 30; j++) {
+	for (i = 0; i < 30; i++)
+		for (j = 0; j < 30; j++) {
 			sprintf(buf, "%*.*f", i, j, pi);
 			if (checkbuf(buf, i, j)) {
 				fprintf(temp, "output conversion incorrect.");
-				fprintf(temp, "%*.*f = '%s'",
-				  i, j, pi,buf);
+				fprintf(temp, "%*.*f = '%s'", i, j, pi, buf);
 				local_flag = FAILED;
 			}
 			r1 = atof(buf);
@@ -100,7 +99,7 @@
 			x = fabs(r1 - r2);
 			if (x > ERR) {
 				fprintf(temp, "\tcompare fails, %f vs %f\n",
-				  r1, r2);
+					r1, r2);
 				fprintf(temp, "\terr value is %f\n", x);
 				local_flag = FAILED;
 			}
@@ -125,8 +124,8 @@
 /*--------------------------------------------------------------*/
 	blenter();
 
-	for (i=1; i < 200; i++) {
-		x = 100.0 / (double) i;
+	for (i = 1; i < 200; i++) {
+		x = 100.0 / (double)i;
 		sprintf(buf, "%f", x);
 		r1 = atof(buf);
 		if (numin(buf, &r2)) {
@@ -146,10 +145,9 @@
 		if (x > 0.0) {
 			fprintf(temp, "\tx = %.15f = %e\n", x, x);
 			fprintf(temp, "\titeration %d\n", i);
-			fprintf(temp, "\tcompare fails, %f vs %f\n",
-			  r1, r2);
+			fprintf(temp, "\tcompare fails, %f vs %f\n", r1, r2);
 			fprintf(temp, "\tcompare fails, %.15f vs %.15f\n",
-			  r1, r2);
+				r1, r2);
 			fprintf(temp, "\tbuf = '%s'\n", buf);
 			x = r1 - r2;
 			if (x == 0.0)
@@ -167,8 +165,8 @@
 /*--------------------------------------------------------------*/
 	blenter();
 
-	for (i= -1; i > -200; i--) {
-		x = 100.0 / (double) i;
+	for (i = -1; i > -200; i--) {
+		x = 100.0 / (double)i;
 		sprintf(buf, "%f", x);
 		r1 = atof(buf);
 		if (numin(buf, &r2)) {
@@ -183,10 +181,9 @@
 		else
 			x = r2 - r1 - 1e-10;
 		if (x > 0.0) {
-			fprintf(temp, "\tcompare fails, %f vs %f\n",
-			  r1, r2);
+			fprintf(temp, "\tcompare fails, %f vs %f\n", r1, r2);
 			fprintf(temp, "\tcompare fails, %.15f vs %.15f\n",
-			  r1, r2);
+				r1, r2);
 			x = r1 - r2;
 			if (x == 0.0)
 				fprintf(temp, "\tx == 0.0)\n");
@@ -203,12 +200,12 @@
 /*--------------------------------------------------------------*/
 	tst_exit();
 }
+
 /* FUNCTIONS GO HERE */
 
-int
-numin(str, rval)
-	char *str;
-	double *rval;
+int numin(str, rval)
+char *str;
+double *rval;
 {
 	register int i, v3, e_flag;
 	register char c;
@@ -232,7 +229,7 @@
 		if (!isdigit(c))
 			break;
 		v1 *= 10.0;
-		v1 += (double) (c - '0');
+		v1 += (double)(c - '0');
 		str++;
 	}
 
@@ -248,13 +245,12 @@
 			c = *str;
 			if (!isdigit(c))
 				break;
-			v2+= k * (double) (c - '0');
+			v2 += k * (double)(c - '0');
 			k /= 10.0;
 			str++;
 		}
 		val += v2;
 	}
-
 #ifdef DEBUG
 	printf("Second conversion, val = %f = %e\n", val, val);
 #endif
@@ -271,24 +267,24 @@
 		default:
 			fprintf(temp, "\tbad char '%c' after 'e'\n", *str);
 			printf("bad char '%c' after 'e'\n", *str);
-			return(-1);
+			return (-1);
 		}
 		str++;
 		if (!isdigit(*str)) {
 			fprintf(temp, "\tbad exponent field\n");
 			printf("bad exponent field\n");
-			return(-1);
+			return (-1);
 		}
-		v3 = 10 * (int) (*str - '0');
+		v3 = 10 * (int)(*str - '0');
 		str++;
 		if (!isdigit(*str)) {
 			fprintf(temp, "\tbad exponent field\n");
 			printf("bad exponent field\n");
-			return(-1);
+			return (-1);
 		}
-		v3 += (int) (*str - '0');
+		v3 += (int)(*str - '0');
 		str++;
-		for (i=0; i < v3; i++) {
+		for (i = 0; i < v3; i++) {
 			if (e_flag > 0)
 				val *= 10.0;
 			else
@@ -312,17 +308,17 @@
 		break;
 	default:
 		printf("unexpected char '%c'\n", *str);
-		return(-1);
+		return (-1);
 	}
 
 	*rval = val;
-	return(0);
+	return (0);
 }
 
 int checkbuf(str, n1, n2)
-	char *str;
-	int n1;
-	int n2;
+char *str;
+int n1;
+int n2;
 {
 	register int bd;	/* before decimal point */
 	register int ad;	/* after decimal point */
@@ -369,7 +365,7 @@
 		return (-1);
 	}
 
-	return(0);
+	return (0);
 }
 
 /**	LTP Port	**/
diff --git a/testcases/misc/math/float/bessel/genbessel.c b/testcases/misc/math/float/bessel/genbessel.c
index d3aaf6f..91ea3b6 100644
--- a/testcases/misc/math/float/bessel/genbessel.c
+++ b/testcases/misc/math/float/bessel/genbessel.c
@@ -55,12 +55,12 @@
 	switch (myproc = fork()) {
 	case -1:
 		err(1, "fork failed");
-	case 0: {
-		char *arglist[] = { func_name, NULL };
-	     	execvp(arglist[0], arglist);
+	case 0:{
+			char *arglist[] = { func_name, NULL };
+			execvp(arglist[0], arglist);
 
-	     	err(1, "execvp failed");
-	}
+			err(1, "execvp failed");
+		}
 	default:
 		;
 	}
diff --git a/testcases/misc/math/float/bessel/genj0.c b/testcases/misc/math/float/bessel/genj0.c
index f644204..43a4ff0 100644
--- a/testcases/misc/math/float/bessel/genj0.c
+++ b/testcases/misc/math/float/bessel/genj0.c
@@ -39,7 +39,7 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -48,21 +48,17 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = j0( Inc*i);
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = j0(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -74,7 +70,7 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -83,21 +79,17 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
@@ -105,37 +97,38 @@
 	return 0;
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
-  if (argc > 1)
-  {
-    switch ( atoi(argv[1]) )
-    {
-      case 1:
-      	     if (create_Data_file() == 0)
-	       printf("Data file created\n");
-	     else
-	       printf("problem during %s data file creation\n", argv[0]);
-	     break;
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
+		case 1:
+			if (create_Data_file() == 0)
+				printf("Data file created\n");
+			else
+				printf("problem during %s data file creation\n",
+				       argv[0]);
+			break;
 
-      case 2:
-             if (create_Result_file() == 0)
-	       printf("Result file created\n");
-	     else
-	       printf("problem during %s result file creation\n", argv[0]);
-	     break;
-      default:
-             printf("Bad arglist code for: '%s'\n", argv[0]);
-	     return -1;
-	     break;
-    }
-  }
-  else
-  {
-    if (create_Data_file() != 0)
-      printf("problem during %s data file creation\n", argv[0]);
-    if (create_Result_file() != 0)
-      printf("problem during %s result file creation\n", argv[0]);
-  }
-  return(0);
+		case 2:
+			if (create_Result_file() == 0)
+				printf("Result file created\n");
+			else
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
+			break;
+		default:
+			printf("Bad arglist code for: '%s'\n", argv[0]);
+			return -1;
+			break;
+		}
+	} else {
+		if (create_Data_file() != 0)
+			printf("problem during %s data file creation\n",
+			       argv[0]);
+		if (create_Result_file() != 0)
+			printf("problem during %s result file creation\n",
+			       argv[0]);
+	}
+	return (0);
 }
diff --git a/testcases/misc/math/float/bessel/genj1.c b/testcases/misc/math/float/bessel/genj1.c
index 7226cff..367dec4 100644
--- a/testcases/misc/math/float/bessel/genj1.c
+++ b/testcases/misc/math/float/bessel/genj1.c
@@ -39,7 +39,7 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -48,33 +48,29 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = j1(Inc*i);
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = j1(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -83,60 +79,57 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
-	return(0);
+	return (0);
 }
diff --git a/testcases/misc/math/float/bessel/genlgamma.c b/testcases/misc/math/float/bessel/genlgamma.c
index 79c8175..81e6b3d 100644
--- a/testcases/misc/math/float/bessel/genlgamma.c
+++ b/testcases/misc/math/float/bessel/genlgamma.c
@@ -39,7 +39,7 @@
 
 	int signgam = 0;
 	int i, nbVal, tabSign[20000];
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name, *F_namesign;
 	int fp, fpsi;
 
@@ -49,40 +49,35 @@
 
 	Inc = sqrt(3);
 
-	for (i=0; i<nbVal; i++)
-	{
-		tabR[i] = lgamma(1+Inc*i);
+	for (i = 0; i < nbVal; i++) {
+		tabR[i] = lgamma(1 + Inc * i);
 		tabSign[i] = signgam;
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-	fpsi = open(F_namesign,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp || !fpsi)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	fpsi = open(F_namesign, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp || !fpsi) {
+		printf("error opening file");
 		close(fp);
 		close(fpsi);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
-			write(fpsi,&tabSign[i],sizeof(int));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
+			write(fpsi, &tabSign[i], sizeof(int));
 		}
 
 		close(fp);
 		close(fpsi);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -91,60 +86,57 @@
 
 	Inc = sqrt(3);
 
-	for (i=0; i<nbVal; i++)
-		tabD[i] = (1+Inc*i);
+	for (i = 0; i < nbVal; i++)
+		tabD[i] = (1 + Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
-	return(0);
+	return (0);
 }
diff --git a/testcases/misc/math/float/bessel/geny0.c b/testcases/misc/math/float/bessel/geny0.c
index 645bb40..a5a81ea 100644
--- a/testcases/misc/math/float/bessel/geny0.c
+++ b/testcases/misc/math/float/bessel/geny0.c
@@ -39,7 +39,7 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -48,33 +48,29 @@
 
 	Inc = sqrt(2);
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = y0(Inc*i);
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = y0(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -83,60 +79,57 @@
 
 	Inc = sqrt(2);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
-	return(0);
+	return (0);
 }
diff --git a/testcases/misc/math/float/bessel/geny1.c b/testcases/misc/math/float/bessel/geny1.c
index eb16b82..2786261 100644
--- a/testcases/misc/math/float/bessel/geny1.c
+++ b/testcases/misc/math/float/bessel/geny1.c
@@ -39,7 +39,7 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -48,33 +48,29 @@
 
 	Inc = sqrt(2);
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = y1(Inc*i);
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = y1(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -83,60 +79,57 @@
 
 	Inc = sqrt(2);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
-	return(0);
+	return (0);
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
-	return(0);
+	return (0);
 }
diff --git a/testcases/misc/math/float/exp_log/genexp.c b/testcases/misc/math/float/exp_log/genexp.c
index 45b1638..98bb275 100644
--- a/testcases/misc/math/float/exp_log/genexp.c
+++ b/testcases/misc/math/float/exp_log/genexp.c
@@ -39,30 +39,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "exp_out.ref";
 	nbVal = 20000;
 
-	Inc = log( exp(1)/10 );
+	Inc = log(exp(1) / 10);
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = exp ( (Inc*i) + Inc );
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = exp((Inc * i) + Inc);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -73,70 +69,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "exp_inp.ref";
 	nbVal = 20000;
 
-	Inc = log( exp(1)/10);
+	Inc = log(exp(1) / 10);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genexp_log.c b/testcases/misc/math/float/exp_log/genexp_log.c
index cf3fdf5..7f26945 100644
--- a/testcases/misc/math/float/exp_log/genexp_log.c
+++ b/testcases/misc/math/float/exp_log/genexp_log.c
@@ -52,14 +52,14 @@
 {
 	pid_t myproc;
 
-        if (( myproc = fork() )!=0)
-                return myproc;
-        else {
-		char *arglist[] = { func_name, NULL};
-	     	execvp(arglist[0], arglist);
+	if ((myproc = fork()) != 0)
+		return myproc;
+	else {
+		char *arglist[] = { func_name, NULL };
+		execvp(arglist[0], arglist);
 
-	     	fprintf(stderr, "ERROR %s\n", strerror(errno));
-	     	abort();
+		fprintf(stderr, "ERROR %s\n", strerror(errno));
+		abort();
 	}
 }
 
@@ -69,40 +69,40 @@
 	pid_t child;
 
 	if (argc != 2) {
-                printf ("ERROR: need the path to generation binaries\n");
-                abort();
-        }
+		printf("ERROR: need the path to generation binaries\n");
+		abort();
+	}
 
 	bin_path = argv[1];
 
-	funct = malloc (strlen (bin_path) + MAX_FNAME_LEN);
-        sprintf (funct, "%s/genexp", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	funct = malloc(strlen(bin_path) + MAX_FNAME_LEN);
+	sprintf(funct, "%s/genexp", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genlog", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genlog", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genlog10", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genlog10", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genfrexp", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genfrexp", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genldexp", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genldexp", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genhypot", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genhypot", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genmodf", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genmodf", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
 	return 0;
 }
diff --git a/testcases/misc/math/float/exp_log/genfrexp.c b/testcases/misc/math/float/exp_log/genfrexp.c
index 16065d2..5bf1334 100644
--- a/testcases/misc/math/float/exp_log/genfrexp.c
+++ b/testcases/misc/math/float/exp_log/genfrexp.c
@@ -39,7 +39,7 @@
 {
 
 	int i, nbVal, tabRI[20000];
-	double	tabR[20000], Inc, Val;
+	double tabR[20000], Inc, Val;
 	char *F_name, *F_name1;
 	int fp, fp1;
 
@@ -49,27 +49,22 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
-	{
-		Val = Inc*(i+1);
-		tabR[i] = frexp (Val, &(tabRI[i]));
+	for (i = 0; i < nbVal; i++) {
+		Val = Inc * (i + 1);
+		tabR[i] = frexp(Val, &(tabRI[i]));
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-	fp1 = open(F_name1,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp || !fp1)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	fp1 = open(F_name1, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp || !fp1) {
+		printf("error opening file");
 		close(fp);
 		close(fp1);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
-			write(fp1,&tabRI[i],sizeof(int));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
+			write(fp1, &tabRI[i], sizeof(int));
 		}
 
 		close(fp);
@@ -81,7 +76,7 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
@@ -90,61 +85,58 @@
 
 	Inc = exp(1);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genhypot.c b/testcases/misc/math/float/exp_log/genhypot.c
index 2ed5c41..5670d98 100644
--- a/testcases/misc/math/float/exp_log/genhypot.c
+++ b/testcases/misc/math/float/exp_log/genhypot.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "hypot_out.ref";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;
+	Inc = (2 * M_PIl) / nbVal;
 
-	for (i=0; i<nbVal; i++) {
-		tabR[i] = hypot( cos(Inc*i), sin(Inc*i));
+	for (i = 0; i < nbVal; i++) {
+		tabR[i] = hypot(cos(Inc * i), sin(Inc * i));
 	}
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,71 +71,68 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "hypot_inp.ref";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;
+	Inc = (2 * M_PIl) / nbVal;
 
-	for (i=0; i<nbVal; i++) {
+	for (i = 0; i < nbVal; i++) {
 		tabD[i] = (Inc * i);
-		}
+	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genldexp.c b/testcases/misc/math/float/exp_log/genldexp.c
index 2bf7882..12f8b0e 100644
--- a/testcases/misc/math/float/exp_log/genldexp.c
+++ b/testcases/misc/math/float/exp_log/genldexp.c
@@ -49,7 +49,7 @@
 {
 
 	int i, nbVal, tabInpi[20000];
-	double	tabR[20000], tabInpd[20000];
+	double tabR[20000], tabInpd[20000];
 	char *F_name;
 	char *F_namini;
 	char *F_namind;
@@ -60,37 +60,31 @@
 	F_namind = "ldexp_inp.ref";
 	nbVal = 20000;
 
-	fpi = open(F_namini,O_RDONLY,0777);
-	fpd = open(F_namind,O_RDONLY,0777);
+	fpi = open(F_namini, O_RDONLY, 0777);
+	fpd = open(F_namind, O_RDONLY, 0777);
 
 	if (!fpi || !fpd) {
-            	printf("error opening file");
+		printf("error opening file");
 		close(fpi);
 		close(fpd);
 		return -1;
-	}
-	else
-	{
-		for (i=0; i<nbVal; i++) {
-		    read(fpi, &(tabInpi[i]), sizeof(int) );
-		    read(fpd, &(tabInpd[i]), sizeof(double) );
-		    tabR[i] = ldexp (tabInpd[i], tabInpi[i]);
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			read(fpi, &(tabInpi[i]), sizeof(int));
+			read(fpd, &(tabInpd[i]), sizeof(double));
+			tabR[i] = ldexp(tabInpd[i], tabInpi[i]);
 		}
 		close(fpi);
 		close(fpd);
 
-		fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        	if (!fp)
-        	{
-        	    	printf("error opening file");
+		fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+		if (!fp) {
+			printf("error opening file");
 			close(fp);
 			return -1;
-		}
-		else
-		{
-			for (i = 0; i<nbVal; i++)
-			{
-			    write(fp,&tabR[i],sizeof(double));
+		} else {
+			for (i = 0; i < nbVal; i++) {
+				write(fp, &tabR[i], sizeof(double));
 			}
 
 			close(fp);
@@ -109,7 +103,7 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDD[20000], tabDI[20000], Inc;
+	double tabDD[20000], tabDI[20000], Inc;
 	char *F_named, *F_namei;
 	int fp, fpi;
 
@@ -117,28 +111,24 @@
 	F_namei = "ildexp_inp.ref";
 	nbVal = 20000;
 
-	Inc = exp(1)/10;
+	Inc = exp(1) / 10;
 
-	for (i=0; i<(nbVal); i++) {
+	for (i = 0; i < (nbVal); i++) {
 		tabDD[i] = (Inc * i) + Inc;
-		tabDI[i] = nbVal -i;
+		tabDI[i] = nbVal - i;
 	}
 
-	fp = open(F_named,O_RDWR|O_CREAT|O_TRUNC,0777);
-	fpi = open(F_namei,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp || !fpi)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	close(fpi);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDD[i],sizeof(double));
-			write(fpi,&tabDI[i],sizeof(int));
+	fp = open(F_named, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	fpi = open(F_namei, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp || !fpi) {
+		printf("error opening file");
+		close(fp);
+		close(fpi);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDD[i], sizeof(double));
+			write(fpi, &tabDI[i], sizeof(int));
 		}
 		close(fp);
 		close(fpi);
@@ -146,40 +136,41 @@
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genlog.c b/testcases/misc/math/float/exp_log/genlog.c
index 35fdd61..aa581ec 100644
--- a/testcases/misc/math/float/exp_log/genlog.c
+++ b/testcases/misc/math/float/exp_log/genlog.c
@@ -38,30 +38,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "log_out.ref2";
 	nbVal = 20000;
 
-	Inc = exp(1)/10;
+	Inc = exp(1) / 10;
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = log ( (Inc*i) + Inc );
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = log((Inc * i) + Inc);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -72,70 +68,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "log_inp.ref";
 	nbVal = 20000;
 
-	Inc = exp(1)/10;
+	Inc = exp(1) / 10;
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genlog10.c b/testcases/misc/math/float/exp_log/genlog10.c
index ec52264..39d4cdb 100644
--- a/testcases/misc/math/float/exp_log/genlog10.c
+++ b/testcases/misc/math/float/exp_log/genlog10.c
@@ -39,30 +39,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "log10_out.ref";
 	nbVal = 20000;
 
-	Inc = exp(1)/10;
+	Inc = exp(1) / 10;
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = log10 ( (Inc*i) + Inc );
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = log10((Inc * i) + Inc);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -73,70 +69,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "log10_inp.ref";
 	nbVal = 20000;
 
-	Inc = exp(1)/10;
+	Inc = exp(1) / 10;
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/exp_log/genmodf.c b/testcases/misc/math/float/exp_log/genmodf.c
index 2931b7c..9729f27 100644
--- a/testcases/misc/math/float/exp_log/genmodf.c
+++ b/testcases/misc/math/float/exp_log/genmodf.c
@@ -47,43 +47,38 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc, tabRI[20000];
+	double tabR[20000], Inc, tabRI[20000];
 	char *F_name, *F_name1;
 	int fp, fp1;
 	double TestInputValue, TestChkSum;
 
-	F_name =  "modf_out.ref";
-	F_name1 =  "modf1_out.ref";
+	F_name = "modf_out.ref";
+	F_name1 = "modf1_out.ref";
 	nbVal = 20000;
 
-	Inc = log( exp(1)/10 );
+	Inc = log(exp(1) / 10);
 
-	for (i=0; i<nbVal; i++) {
-		TestInputValue = ((Inc*i) + Inc);
+	for (i = 0; i < nbVal; i++) {
+		TestInputValue = ((Inc * i) + Inc);
 		tabR[i] = modf(TestInputValue, &tabRI[i]);
 		// tabR[i] = modf( ((Inc*i) + Inc), &tabRI[i]);
-		if ((TestChkSum = tabR[i] + tabRI[i]) != TestInputValue)
-		  {
-		    return -1;
-		  }
+		if ((TestChkSum = tabR[i] + tabRI[i]) != TestInputValue) {
+			return -1;
+		}
 
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-	fp1 = open(F_name1,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp || !fp1)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	fp1 = open(F_name1, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp || !fp1) {
+		printf("error opening file");
 		close(fp);
 		close(fp1);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
-			write(fp1,&tabRI[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
+			write(fp1, &tabRI[i], sizeof(double));
 		}
 
 		close(fp);
@@ -95,70 +90,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "modf_inp.ref";
 	nbVal = 20000;
 
-	Inc = log( exp(1)/10 );
+	Inc = log(exp(1) / 10);
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/float_bessel.c b/testcases/misc/math/float/float_bessel.c
index 5320efb..52b8b76 100644
--- a/testcases/misc/math/float/float_bessel.c
+++ b/testcases/misc/math/float/float_bessel.c
@@ -26,16 +26,16 @@
 #include "tfloat.h"
 
 const TH_FUNC th_func[] = {
-	{FUNC_NORMAL, 30, j0,    "j0",    "j0_inp.ref",    "j0_out.ref2",
-		""},
-	{FUNC_NORMAL, 30, j1,    "j1",    "j1_inp.ref",    "j1_out.ref2",
-		""},
-	{FUNC_NORMAL, 30, y0,    "y0",    "y0_inp.ref",    "y0_out.ref2",
-		""},
-	{FUNC_NORMAL, 30, y1,    "y1",    "y1_inp.ref",    "y1_out.ref2",
-		""},
-	{FUNC_GAM,  30, lgamma,"lgamma","gamma_inp.ref","gamma_out.ref",
-		"gamma_sign.ref"}
+	{FUNC_NORMAL, 30, j0, "j0", "j0_inp.ref", "j0_out.ref2",
+	 ""},
+	{FUNC_NORMAL, 30, j1, "j1", "j1_inp.ref", "j1_out.ref2",
+	 ""},
+	{FUNC_NORMAL, 30, y0, "y0", "y0_inp.ref", "y0_out.ref2",
+	 ""},
+	{FUNC_NORMAL, 30, y1, "y1", "y1_inp.ref", "y1_out.ref2",
+	 ""},
+	{FUNC_GAM, 30, lgamma, "lgamma", "gamma_inp.ref", "gamma_out.ref",
+	 "gamma_sign.ref"}
 };
 
 #define NB_FUNC  (sizeof(th_func)/sizeof(TH_FUNC))
diff --git a/testcases/misc/math/float/float_exp_log.c b/testcases/misc/math/float/float_exp_log.c
index 49bb60d..9e23734 100644
--- a/testcases/misc/math/float/float_exp_log.c
+++ b/testcases/misc/math/float/float_exp_log.c
@@ -26,20 +26,20 @@
 #include "tfloat.h"
 
 const TH_FUNC th_func[] = {
-	{FUNC_NORMAL, 50, exp,   "exp",   "exp_inp.ref",   "exp_out.ref",
-		""},
-	{FUNC_NORMAL, 50, log,   "log",   "log_inp.ref",   "log_out.ref2",
-		""},
+	{FUNC_NORMAL, 50, exp, "exp", "exp_inp.ref", "exp_out.ref",
+	 ""},
+	{FUNC_NORMAL, 50, log, "log", "log_inp.ref", "log_out.ref2",
+	 ""},
 	{FUNC_NORMAL, 50, log10, "log10", "log10_inp.ref", "log10_out.ref",
-		""},
-	{FUNC_FREXP,  50, frexp, "frexp", "frexp_inp.ref", "frexp_out.ref",
-		"frexp1_out.ref"},
-	{FUNC_HYPOT,  50, hypot, "hypot", "hypot_inp.ref", "hypot_out.ref",
-		""},
-	{FUNC_LDEXP,  50, ldexp, "ldexp", "ldexp_inp.ref", "ldexp_out.ref",
-		"ildexp_inp.ref"},
-	{FUNC_MODF,   50, modf,  "modf",  "modf_inp.ref",  "modf_out.ref",
-		"modf1_out.ref"}
+	 ""},
+	{FUNC_FREXP, 50, frexp, "frexp", "frexp_inp.ref", "frexp_out.ref",
+	 "frexp1_out.ref"},
+	{FUNC_HYPOT, 50, hypot, "hypot", "hypot_inp.ref", "hypot_out.ref",
+	 ""},
+	{FUNC_LDEXP, 50, ldexp, "ldexp", "ldexp_inp.ref", "ldexp_out.ref",
+	 "ildexp_inp.ref"},
+	{FUNC_MODF, 50, modf, "modf", "modf_inp.ref", "modf_out.ref",
+	 "modf1_out.ref"}
 };
 
 #define NB_FUNC  (sizeof(th_func)/sizeof(TH_FUNC))
diff --git a/testcases/misc/math/float/float_iperb.c b/testcases/misc/math/float/float_iperb.c
index b59d3c4..82c8d90 100644
--- a/testcases/misc/math/float/float_iperb.c
+++ b/testcases/misc/math/float/float_iperb.c
@@ -26,12 +26,12 @@
 #include "tfloat.h"
 
 const TH_FUNC th_func[] = {
-	{FUNC_NORMAL, 50, cosh,  "cosh",  "dcosh",         "rcosh",
-		""},
-	{FUNC_NORMAL, 50, sinh,  "sinh",  "dsinh",         "rsinh",
-		""},
-	{FUNC_NORMAL, 50, tanh,  "tanh",  "dtanh",         "rtanh",
-		""}
+	{FUNC_NORMAL, 50, cosh, "cosh", "dcosh", "rcosh",
+	 ""},
+	{FUNC_NORMAL, 50, sinh, "sinh", "dsinh", "rsinh",
+	 ""},
+	{FUNC_NORMAL, 50, tanh, "tanh", "dtanh", "rtanh",
+	 ""}
 };
 
 #define NB_FUNC  (sizeof(th_func)/sizeof(TH_FUNC))
diff --git a/testcases/misc/math/float/float_power.c b/testcases/misc/math/float/float_power.c
index b37fd9f..f339929 100644
--- a/testcases/misc/math/float/float_power.c
+++ b/testcases/misc/math/float/float_power.c
@@ -26,18 +26,18 @@
 #include "tfloat.h"
 
 const TH_FUNC th_func[] = {
-	{FUNC_NORMAL, 50, ceil,  "ceil",  "ceil_inp.ref",  "ceil_out.ref",
-		""},
-	{FUNC_NORMAL, 50, fabs,  "fabs",  "fabs_inp.ref",  "fabs_out.ref",
-		""},
+	{FUNC_NORMAL, 50, ceil, "ceil", "ceil_inp.ref", "ceil_out.ref",
+	 ""},
+	{FUNC_NORMAL, 50, fabs, "fabs", "fabs_inp.ref", "fabs_out.ref",
+	 ""},
 	{FUNC_NORMAL, 50, floor, "floor", "floor_inp.ref", "floor_out.ref",
-		""},
-	{FUNC_FMOD,   50, fmod,  "fmod",  "fmod_inp.ref",  "fmod_out.ref",
-		"1fmod_inp.ref"},
-	{FUNC_POW,    47, pow,   "pow",   "pow_inp.ref",   "pow_out.ref",
-		"1pow_inp.ref"},
-	{FUNC_NORMAL, 50, sqrt,  "sqrt",  "sqrt_inp.ref",  "sqrt_out.ref",
-		""}
+	 ""},
+	{FUNC_FMOD, 50, fmod, "fmod", "fmod_inp.ref", "fmod_out.ref",
+	 "1fmod_inp.ref"},
+	{FUNC_POW, 47, pow, "pow", "pow_inp.ref", "pow_out.ref",
+	 "1pow_inp.ref"},
+	{FUNC_NORMAL, 50, sqrt, "sqrt", "sqrt_inp.ref", "sqrt_out.ref",
+	 ""}
 };
 
 #define NB_FUNC  (sizeof(th_func)/sizeof(TH_FUNC))
diff --git a/testcases/misc/math/float/float_trigo.c b/testcases/misc/math/float/float_trigo.c
index fa9b45a..2ab95c7 100644
--- a/testcases/misc/math/float/float_trigo.c
+++ b/testcases/misc/math/float/float_trigo.c
@@ -26,20 +26,20 @@
 #include "tfloat.h"
 
 const TH_FUNC th_func[] = {
-	{FUNC_NORMAL, 50, acos,  "acos",  "dacos",         "racos",
-		""},
-	{FUNC_NORMAL, 50, asin,  "asin",  "dasin",         "rasin",
-		""},
-	{FUNC_NORMAL, 50, atan,  "atan",  "datan",         "ratan",
-		""},
-	{FUNC_ATAN2,  50, atan2, "atan2", "datan2",        "ratan2",
-		""},
-	{FUNC_NORMAL, 50, cos,   "cos",   "dcos",          "rcos",
-		""},
-	{FUNC_NORMAL, 50, sin,   "sin",   "dsin",          "rsin",
-		""},
-	{FUNC_NORMAL, 50, tan,   "tan",   "dtan",          "rtan",
-		""}
+	{FUNC_NORMAL, 50, acos, "acos", "dacos", "racos",
+	 ""},
+	{FUNC_NORMAL, 50, asin, "asin", "dasin", "rasin",
+	 ""},
+	{FUNC_NORMAL, 50, atan, "atan", "datan", "ratan",
+	 ""},
+	{FUNC_ATAN2, 50, atan2, "atan2", "datan2", "ratan2",
+	 ""},
+	{FUNC_NORMAL, 50, cos, "cos", "dcos", "rcos",
+	 ""},
+	{FUNC_NORMAL, 50, sin, "sin", "dsin", "rsin",
+	 ""},
+	{FUNC_NORMAL, 50, tan, "tan", "dtan", "rtan",
+	 ""}
 };
 
 #define NB_FUNC  (sizeof(th_func)/sizeof(TH_FUNC))
diff --git a/testcases/misc/math/float/iperb/gencosh.c b/testcases/misc/math/float/iperb/gencosh.c
index 074ca84..3716b05 100644
--- a/testcases/misc/math/float/iperb/gencosh.c
+++ b/testcases/misc/math/float/iperb/gencosh.c
@@ -39,30 +39,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rcosh";
 	nbVal = 20000;
 
-	Inc = exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = cosh( (Inc*i) + Inc );
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = cosh((Inc * i) + Inc);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -73,70 +69,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dcosh";
 	nbVal = 20000;
 
-	Inc = exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabD[i] = (Inc * i) + Inc;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/iperb/geniperb.c b/testcases/misc/math/float/iperb/geniperb.c
index e562a50..f7bf55c 100644
--- a/testcases/misc/math/float/iperb/geniperb.c
+++ b/testcases/misc/math/float/iperb/geniperb.c
@@ -55,12 +55,12 @@
 	switch (myproc = fork()) {
 	case -1:
 		err(1, "fork failed");
-	case 0: {
-		char *arglist[] = { func_name, NULL};
-	     	execvp(arglist[0], arglist);
+	case 0:{
+			char *arglist[] = { func_name, NULL };
+			execvp(arglist[0], arglist);
 
-		err(1, "execvp failed");
-	}
+			err(1, "execvp failed");
+		}
 	default:
 		;
 	}
@@ -77,7 +77,7 @@
 
 	bin_path = argv[1];
 
-	funct = malloc(strlen (bin_path) + MAX_FNAME_LEN);
+	funct = malloc(strlen(bin_path) + MAX_FNAME_LEN);
 	sprintf(funct, "%s/gencosh", bin_path);
 	child = create_file(funct, 0);
 	waitpid(child, NULL, 0);
diff --git a/testcases/misc/math/float/iperb/gensinh.c b/testcases/misc/math/float/iperb/gensinh.c
index 3f65cc6..59b47ef 100644
--- a/testcases/misc/math/float/iperb/gensinh.c
+++ b/testcases/misc/math/float/iperb/gensinh.c
@@ -39,30 +39,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rsinh";
 	nbVal = 20000;
 
-	Inc = exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = sinh( Inc*(i- nbVal/2) );
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = sinh(Inc * (i - nbVal / 2));
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -73,70 +69,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dsinh";
 	nbVal = 20000;
 
-	Inc = exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
-		tabD[i] = Inc * (i- nbVal/2);
+	for (i = 0; i < nbVal; i++)
+		tabD[i] = Inc * (i - nbVal / 2);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/iperb/gentanh.c b/testcases/misc/math/float/iperb/gentanh.c
index cb8d32b..3c0012a 100644
--- a/testcases/misc/math/float/iperb/gentanh.c
+++ b/testcases/misc/math/float/iperb/gentanh.c
@@ -39,30 +39,26 @@
 {
 
 	int i, nbVal;
-	double	tabR[20000], Inc;
+	double tabR[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rtanh";
 	nbVal = 20000;
 
-	Inc =  exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
-		tabR[i] = tanh( Inc*(i-nbVal/2));
+	for (i = 0; i < nbVal; i++)
+		tabR[i] = tanh(Inc * (i - nbVal / 2));
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabR[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabR[i], sizeof(double));
 		}
 
 		close(fp);
@@ -73,70 +69,67 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dtanh";
 	nbVal = 20000;
 
-	Inc = exp(1)/100;
+	Inc = exp(1) / 100;
 
-	for (i=0; i<nbVal; i++)
-		tabD[i] = Inc *( i-nbVal/2);
+	for (i = 0; i < nbVal; i++)
+		tabD[i] = Inc * (i - nbVal / 2);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/main.c b/testcases/misc/math/float/main.c
index 4ed95b9..c0a5c51 100644
--- a/testcases/misc/math/float/main.c
+++ b/testcases/misc/math/float/main.c
@@ -29,19 +29,18 @@
 
 #define SAFE_FREE(p) { if (p) { free(p); (p)=NULL; } }
 /* LTP status reporting */
-char *TCID;	 		/* Test program identifier.    */
-int TST_TOTAL=1;    		/* Total number of test cases. */
+char *TCID;			/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 
 /* To avoid extensive modifications to the code, use this bodge */
 #define exit(x) myexit(x)
 
-void
-myexit (int x)
+void myexit(int x)
 {
 	if (x)
-		tst_resm (TFAIL, "Test failed");
+		tst_resm(TFAIL, "Test failed");
 	else
-		tst_resm (TPASS, "Test passed");
+		tst_resm(TPASS, "Test passed");
 	tst_exit();
 }
 
@@ -51,32 +50,32 @@
 #ifndef	PATH_MAX
 #define PATH_MAX		1024
 #endif
-char datadir[PATH_MAX];     		/* DATA directory */
+char datadir[PATH_MAX];		/* DATA directory */
 
 #ifndef PTHREAD_THREADS_MAX
 #define PTHREAD_THREADS_MAX	1024
 #endif
 #define DEFAULT_NUM_THREADS	20
-int     num_threads      = DEFAULT_NUM_THREADS;
-int     num_loops=500;
+int num_threads = DEFAULT_NUM_THREADS;
+int num_loops = 500;
 
-int     sig_cancel = 0; /* flag set by handle_signals to tell initial thread
-			to stop creating new threads (signal caught) */
+int sig_cancel = 0;		/* flag set by handle_signals to tell initial thread
+				   to stop creating new threads (signal caught) */
 
-int	indice = 0; /* # of threads created, to be canceled by handle_signals
-			or waited for by initial thread */
+int indice = 0;			/* # of threads created, to be canceled by handle_signals
+				   or waited for by initial thread */
 
 pthread_mutex_t sig_mutex;
-pthread_t	*threads;
+pthread_t *threads;
 
-int     debug = 0;
-int     true = 1;
+int debug = 0;
+int true = 1;
 
-static void *handle_signals (void *);
+static void *handle_signals(void *);
 
 static void sys_error(const char *, int);
 
-const double EPS=  0.1e-300;
+const double EPS = 0.1e-300;
 
 const int nb_func = NB_FUNC;
 
@@ -85,18 +84,17 @@
 	char *cmdline;
 	char *fmt = "cd %s; %s/%s %s";
 
-	cmdline = malloc (2 * strlen(bin_path) + strlen(datadir) +
-		   strlen(GENERATOR) + strlen(fmt));
+	cmdline = malloc(2 * strlen(bin_path) + strlen(datadir) +
+			 strlen(GENERATOR) + strlen(fmt));
 	if (cmdline == NULL)
-	    return(1);
-	sprintf(cmdline,fmt,datadir,bin_path,GENERATOR,bin_path);
+		return (1);
+	sprintf(cmdline, fmt, datadir, bin_path, GENERATOR, bin_path);
 	system(cmdline);
 	free(cmdline);
-	return(0);
+	return (0);
 }
 
-static void
-cleanup(void)
+static void cleanup(void)
 {
 	tst_rmdir();
 }
@@ -110,27 +108,27 @@
 	void *exit_value;
 	pthread_attr_t newattr;
 	pthread_t sig_hand;
-	size_t	  stacksize = 2093056;
+	size_t stacksize = 2093056;
 	int th_num;
 	int retvalend = 0;
 	int retval = 0;
-	int error =0;
-	/*int time=1;*/
+	int error = 0;
+	/*int time=1; */
 	int i;
 
 	/* Generate test ID from invocation name */
-	if ((TCID = strrchr (argv[0], '/')) != NULL)
+	if ((TCID = strrchr(argv[0], '/')) != NULL)
 		TCID++;
 	else
 		TCID = argv[0];
 	ltproot = getenv("LTPROOT");
 	if (ltproot == NULL || strlen(ltproot) == 0) {
 		tst_brkm(TBROK, NULL,
-		    "You must set $LTPROOT before executing this test");
+			 "You must set $LTPROOT before executing this test");
 	}
 	bin_path = malloc(strlen(ltproot) + 16);
 	if (bin_path == NULL) {
-		tst_brkm(TBROK|TERRNO, NULL, "malloc failed");
+		tst_brkm(TBROK | TERRNO, NULL, "malloc failed");
 	}
 	sprintf(bin_path, "%s/testcases/bin", ltproot);
 
@@ -142,7 +140,7 @@
 	datadir[1] = '\0';
 
 	if (argc != 1) {
-		while ((opt = getopt( argc, argv, "vn:l:D:?")) != EOF) {
+		while ((opt = getopt(argc, argv, "vn:l:D:?")) != EOF) {
 			switch (opt) {
 			case 'D':
 				strncpy(datadir, optarg, PATH_MAX);
@@ -154,10 +152,12 @@
 				num_threads = atoi(optarg);
 				break;
 			case 'v':
-				++debug; /* verbose mode */
+				++debug;	/* verbose mode */
 				break;
 			default:
-				fprintf(stderr, "usage: %s [-n number_of_threads] [-v]\n", argv[0]);
+				fprintf(stderr,
+					"usage: %s [-n number_of_threads] [-v]\n",
+					argv[0]);
 				fprintf(stderr, "[-l number_of_loops] ");
 				fprintf(stderr, "[-D DATAs absolute path]\n");
 				exit(1);
@@ -166,7 +166,7 @@
 	}
 	switch (pid = fork()) {
 	case -1:
-		tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
+		tst_brkm(TBROK | TERRNO, cleanup, "fork failed");
 	case 0:
 		generate(datadir, bin_path);
 		exit(0);
@@ -177,24 +177,24 @@
 
 	if (debug) {
 		tst_resm(TINFO,
-		    "%s: will run for %d loops; using %s as a data directory",
-		    argv[0], num_loops, datadir);
+			 "%s: will run for %d loops; using %s as a data directory",
+			 argv[0], num_loops, datadir);
 	}
 	if (num_threads <= 0) {
 		tst_resm(TWARN,
-		    "num_threads undefined or incorrect, using \"1\"");
+			 "num_threads undefined or incorrect, using \"1\"");
 		num_threads = 1;
 	}
 
-	if (nb_func * num_threads > PTHREAD_THREADS_MAX-2)
-		while (nb_func * num_threads > PTHREAD_THREADS_MAX-2)
+	if (nb_func * num_threads > PTHREAD_THREADS_MAX - 2)
+		while (nb_func * num_threads > PTHREAD_THREADS_MAX - 2)
 			num_threads--;
 	if (debug)
 		tst_resm(TINFO,
-		    "%s: will run %d functions, %d threads per function",
-		    argv[0], nb_func, num_threads);
+			 "%s: will run %d functions, %d threads per function",
+			 argv[0], nb_func, num_threads);
 
-	retval = pthread_mutex_init (&sig_mutex, NULL);
+	retval = pthread_mutex_init(&sig_mutex, NULL);
 	if (retval != 0)
 		sys_error("main : mutex_init(&sig_mutex) FAILED", __LINE__);
 
@@ -207,61 +207,62 @@
 	 */
 	threads = malloc(nb_func * num_threads * sizeof(pthread_t));
 	if (threads == NULL)
-		tst_brkm(TFAIL|TERRNO, cleanup, "malloc failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "malloc failed");
 
 	tabcom = malloc((sizeof(TH_DATA *) * nb_func * num_threads));
 	if (!tabcom)
-		tst_brkm(TFAIL|TERRNO, cleanup, "malloc failed");
+		tst_brkm(TFAIL | TERRNO, cleanup, "malloc failed");
 	tabcour = tabcom;
 
 	retval = pthread_attr_init(&newattr);
 	if (retval != 0)
 		sys_error("main : attr_init(&newattr) FAILED", __LINE__);
 
-	if (pthread_attr_setstacksize (&newattr, stacksize))
-      		sys_error("main: pthread_attr_setstacksize failed", __LINE__);
+	if (pthread_attr_setstacksize(&newattr, stacksize))
+		sys_error("main: pthread_attr_setstacksize failed", __LINE__);
 
 	retval = pthread_attr_setdetachstate(&newattr, PTHREAD_CREATE_JOINABLE);
 	if (retval != 0)
 		sys_error("main : attr_setdetachstate(&newattr) FAILED",
-		    __LINE__);
+			  __LINE__);
 
 	/* run the nb_func functions on num_threads */
 
 	indice = 0;
 	for (i = 0; i < nb_func; i++) {
 
-	  for (th_num = 0; th_num < num_threads; th_num++) {
+		for (th_num = 0; th_num < num_threads; th_num++) {
 
-		/* allocate struct of commucation  with the thread */
-		pcom = calloc (1, sizeof(TH_DATA));
-		if (pcom == NULL)
-			tst_brkm(TFAIL|TERRNO, cleanup, "calloc failed");
-		*tabcour = (TH_DATA *) pcom;
-		tabcour++;
-		/*
-		 * update structure of communication
-		 */
-		pcom->th_num = th_num;
-		pcom->th_func = th_func[i];
+			/* allocate struct of commucation  with the thread */
+			pcom = calloc(1, sizeof(TH_DATA));
+			if (pcom == NULL)
+				tst_brkm(TFAIL | TERRNO, cleanup,
+					 "calloc failed");
+			*tabcour = (TH_DATA *) pcom;
+			tabcour++;
+			/*
+			 * update structure of communication
+			 */
+			pcom->th_num = th_num;
+			pcom->th_func = th_func[i];
 
-		pthread_mutex_lock(&sig_mutex);
+			pthread_mutex_lock(&sig_mutex);
 
-		if (sig_cancel) { /* stop processing right now! */
+			if (sig_cancel) {	/* stop processing right now! */
+				pthread_mutex_unlock(&sig_mutex);
+				goto finished;
+			}
+			retval = pthread_create(&threads[indice], &newattr,
+						thread_code, (void *)pcom);
+			if (retval != 0)
+				sys_error("main : create FAILED", __LINE__);
+			indice++;
 			pthread_mutex_unlock(&sig_mutex);
-			goto finished;
-		}
-		retval = pthread_create(&threads[indice], &newattr,
-		    thread_code, (void *) pcom);
-		if (retval != 0)
-			sys_error("main : create FAILED",__LINE__);
-		indice++;
-		pthread_mutex_unlock(&sig_mutex);
 
-	   }/* num_threads */
-	} /* for i*/
+		}		/* num_threads */
+	}			/* for i */
 
-	/*alarm(60*time);*/		/* start all threads for TEST_time */
+	/*alarm(60*time); *//* start all threads for TEST_time */
 
 	/*
 	 * Wait for the threads finish their task
@@ -271,30 +272,30 @@
 finished:
 	if (debug) {
 		tst_resm(TINFO,
-			"initial thread: Waiting for %d threads to finish",
-			indice);
+			 "initial thread: Waiting for %d threads to finish",
+			 indice);
 	}
 	tabcour = tabcom;
 
 	for (th_num = 0; th_num < indice; th_num++) {
-		retvalend = pthread_join (threads[th_num], &exit_value);
+		retvalend = pthread_join(threads[th_num], &exit_value);
 		if (retvalend != 0)
-			sys_error("finish : join FAILED",__LINE__);
+			sys_error("finish : join FAILED", __LINE__);
 
 		/* test the result in TH_DATA : communication buffer */
-		pcom = * tabcour++;
+		pcom = *tabcour++;
 		if (pcom->th_result != 0) {
 			error++;
 			tst_resm(TFAIL,
-			    "thread %d (%s) terminated unsuccessfully %d "
-			    "errors/%d loops\n%s",
-			    th_num, pcom->th_func.fident, pcom->th_nerror,
-			    pcom->th_nloop, pcom->detail_data);
-		}
-		else if (debug) {
+				 "thread %d (%s) terminated unsuccessfully %d "
+				 "errors/%d loops\n%s",
+				 th_num, pcom->th_func.fident, pcom->th_nerror,
+				 pcom->th_nloop, pcom->detail_data);
+		} else if (debug) {
 			tst_resm(TINFO,
-			    "thread %d (%s) terminated successfully %d loops",
-			    th_num, pcom->th_func.fident, pcom->th_nloop - 1);
+				 "thread %d (%s) terminated successfully %d loops",
+				 th_num, pcom->th_func.fident,
+				 pcom->th_nloop - 1);
 		}
 		SAFE_FREE(pcom);
 
@@ -324,9 +325,9 @@
 static void *handle_signals(void *arg)
 {
 	sigset_t signals_set;
-	int	thd;
-	int	sig;
-	int	retvalsig = 0;
+	int thd;
+	int sig;
+	int retvalsig = 0;
 
 	if (debug)
 		tst_resm(TINFO, "signal handler %lu started", pthread_self());
@@ -353,8 +354,8 @@
 		case SIGINT:
 			if (sig_cancel)
 				tst_resm(TINFO,
-				    "Signal handler: already finished; "
-				    "ignoring signal");
+					 "Signal handler: already finished; "
+					 "ignoring signal");
 			else {
 				/*
 				 * Have to signal all non started threads...
@@ -362,42 +363,50 @@
 
 				retvalsig = pthread_mutex_lock(&sig_mutex);
 				if (retvalsig != 0)
-					sys_error("handle_signal : mutex_lock(&sig_mutex) FAILED", __LINE__);
+					sys_error
+					    ("handle_signal : mutex_lock(&sig_mutex) FAILED",
+					     __LINE__);
 
 				sig_cancel = 1;
-				retvalsig = pthread_mutex_unlock (&sig_mutex);
+				retvalsig = pthread_mutex_unlock(&sig_mutex);
 				if (retvalsig != 0)
-					sys_error("handle_signal : mutex_unlock(&sig_mutex) FAILED", __LINE__);
+					sys_error
+					    ("handle_signal : mutex_unlock(&sig_mutex) FAILED",
+					     __LINE__);
 
 				/*
 				 * ......... and all started
-		     		 */
+				 */
 				for (thd = 0; thd < indice; thd++) {
 					if (debug)
 						tst_resm(TINFO,
-						    "signal handler: "
-						    "cancelling thread (%d of "
-						    "%d)", thd, indice);
-					retvalsig = pthread_cancel (threads[thd]);
+							 "signal handler: "
+							 "cancelling thread (%d of "
+							 "%d)", thd, indice);
+					retvalsig =
+					    pthread_cancel(threads[thd]);
 					if (retvalsig != 0)
-						sys_error("handle_signal : cancel FAILED", __LINE__);
+						sys_error
+						    ("handle_signal : cancel FAILED",
+						     __LINE__);
 				}
 			}
 			break;
 		case SIGQUIT:
 			tst_resm(TINFO,
-			    "Signal handler: Caught SIGQUIT; doing nothing");
+				 "Signal handler: Caught SIGQUIT; doing nothing");
 			break;
 		case SIGTERM:
 			tst_resm(TINFO,
-			    "Signal handler: Caught SIGTERM; doing nothing");
+				 "Signal handler: Caught SIGTERM; doing nothing");
 			break;
 		default:
-			exit (1);
+			exit(1);
 		}
 	}
 	return NULL;
 }
+
 /*----------------------------------------------------------------------+
  |				error ()				|
  | =====================================================================|
diff --git a/testcases/misc/math/float/power/genceil.c b/testcases/misc/math/float/power/genceil.c
index da28e35..27c8bf3 100644
--- a/testcases/misc/math/float/power/genceil.c
+++ b/testcases/misc/math/float/power/genceil.c
@@ -102,14 +102,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -118,9 +121,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/power/genfabs.c b/testcases/misc/math/float/power/genfabs.c
index c6d14c2..47ccde1 100644
--- a/testcases/misc/math/float/power/genfabs.c
+++ b/testcases/misc/math/float/power/genfabs.c
@@ -111,14 +111,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -127,9 +130,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/power/genfloor.c b/testcases/misc/math/float/power/genfloor.c
index fa99ce0..5c4d5ab 100644
--- a/testcases/misc/math/float/power/genfloor.c
+++ b/testcases/misc/math/float/power/genfloor.c
@@ -102,14 +102,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -118,9 +121,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/power/genfmod.c b/testcases/misc/math/float/power/genfmod.c
index 257fb79..3a35918 100644
--- a/testcases/misc/math/float/power/genfmod.c
+++ b/testcases/misc/math/float/power/genfmod.c
@@ -132,14 +132,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -148,9 +151,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/power/genpow.c b/testcases/misc/math/float/power/genpow.c
index c7b2336..15d6721 100644
--- a/testcases/misc/math/float/power/genpow.c
+++ b/testcases/misc/math/float/power/genpow.c
@@ -124,14 +124,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -140,9 +143,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/power/gensqrt.c b/testcases/misc/math/float/power/gensqrt.c
index c6da73d..ef64cf3 100644
--- a/testcases/misc/math/float/power/gensqrt.c
+++ b/testcases/misc/math/float/power/gensqrt.c
@@ -109,14 +109,17 @@
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during %s data file creation\n", argv[0]);
+				printf("problem during %s data file creation\n",
+				       argv[0]);
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during %s result file creation\n", argv[0]);
+				printf
+				    ("problem during %s result file creation\n",
+				     argv[0]);
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
@@ -125,9 +128,11 @@
 		}
 	} else {
 		if (create_Data_file() != 0)
-			printf("problem during %s data file creation\n", argv[0]);
+			printf("problem during %s data file creation\n",
+			       argv[0]);
 		if (create_Result_file() != 0)
-			printf("problem during %s result file creation\n", argv[0]);
+			printf("problem during %s result file creation\n",
+			       argv[0]);
 	}
 
 	return 0;
diff --git a/testcases/misc/math/float/thread_code.c b/testcases/misc/math/float/thread_code.c
index d02fa2b..4eb6ff6 100644
--- a/testcases/misc/math/float/thread_code.c
+++ b/testcases/misc/math/float/thread_code.c
@@ -54,18 +54,19 @@
 	while (stat(path, &bufstat)) {
 		if (errno == ETIMEDOUT || errno == EINTR || errno == 0) {
 			printf("Error stat'ing %s: %s\n",
-				path, strerror(errno));
+			       path, strerror(errno));
 			pthread_testcancel();
 			/* retrying... */
 			if (maxretries--)
 				continue;
 		}
-		return (size_t)0;
+		return (size_t) 0;
 	}
 
 	fsize = bufstat.st_size;
 	if (!fsize) {
-		errno = ENOENT; return (size_t)0;
+		errno = ENOENT;
+		return (size_t) 0;
 	}
 
 	while ((buffer = malloc(fsize)) == (void *)0) {
@@ -76,36 +77,34 @@
 			if (maxretries--)
 				continue;
 		}
-		return (size_t)0;
+		return (size_t) 0;
 	}
 
 	while ((fd = open(path, O_RDONLY)) < 0) {
 		if (errno == ETIMEDOUT || errno == EINTR || errno == 0) {
-			printf("Error opening %s: %s\n",
-				path, strerror(errno));
+			printf("Error opening %s: %s\n", path, strerror(errno));
 			pthread_testcancel();
 			/* retrying... */
 			if (maxretries--)
 				continue;
 		}
 		SAFE_FREE(buffer);
-		return (size_t)0;
+		return (size_t) 0;
 	}
 
 	while (read(fd, buffer, fsize) != fsize) {
 		if (errno == ETIMEDOUT || errno == EINTR || errno == 0) {
-			printf("Error reading %s: %s\n",
-				path, strerror(errno));
+			printf("Error reading %s: %s\n", path, strerror(errno));
 			pthread_testcancel();
 			/* retrying... */
-			if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)0) {
+			if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) 0) {
 				if (maxretries--)
 					continue;
 			}
 		}
 		(void)close(fd);
 		SAFE_FREE(buffer);
-		return (size_t)0;
+		return (size_t) 0;
 	}
 
 	(void)close(fd);
@@ -115,23 +114,23 @@
 
 /* this subroutine is used in compute_xxx functions to check results
    and record errors if appropriate */
-static void check_error(TH_DATA *th_data, double e, double r, int index)
+static void check_error(TH_DATA * th_data, double e, double r, int index)
 {
 	double x;
 	int pe, pr, px;
 	static const char errtmplt[] =
-		"%s failed at index %d: OLD: %2.18e NEW: %2.18e DIFF: %2.18e\n";
+	    "%s failed at index %d: OLD: %2.18e NEW: %2.18e DIFF: %2.18e\n";
 
-	x = fabs(r - e); /* diff expected/computed */
+	x = fabs(r - e);	/* diff expected/computed */
 
-	if (x > EPS) { /* error ? */
+	if (x > EPS) {		/* error ? */
 		/* compute exponent parts */
-		(void)frexp(r, &pr); /* for computed */
-		(void)frexp(x, &px); /* for difference */
-		(void)frexp(e, &pe); /* for dexected */
+		(void)frexp(r, &pr);	/* for computed */
+		(void)frexp(x, &px);	/* for difference */
+		(void)frexp(e, &pe);	/* for dexected */
 
 		if (abs(pe - px) < th_data->th_func.precision ||
-		   abs(pr - px) < th_data->th_func.precision) {
+		    abs(pr - px) < th_data->th_func.precision) {
 			/* not a rounding error */
 			++th_data->th_nerror;
 			/* record first error only ! */
@@ -139,8 +138,7 @@
 				sprintf(th_data->detail_data,
 					errtmplt,
 					th_data->th_func.fident,
-					index,
-					e, r, x);
+					index, e, r, x);
 				th_data->th_result = 1;
 			}
 		}
@@ -153,52 +151,53 @@
  */
 
 /* normal case: compares f(input data) to expected data */
-static void compute_normal(TH_DATA *th_data, double *din, double *dex, int index)
+static void compute_normal(TH_DATA * th_data, double *din, double *dex,
+			   int index)
 {
 	double d, r, e;
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(d);
+	r = (*(th_data->th_func.funct)) (d);
 
 	check_error(th_data, e, r, index);
 }
 
 /* atan2 and hypot case: compares f(sin(input data),cos(input data))
    to expected data */
-static void compute_atan2_hypot(TH_DATA *th_data, double *din, double *dex, int index)
+static void compute_atan2_hypot(TH_DATA * th_data, double *din, double *dex,
+				int index)
 {
 	double d, r, e;
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(sin(d), cos(d));
+	r = (*(th_data->th_func.funct)) (sin(d), cos(d));
 
 	check_error(th_data, e, r, index);
 }
 
 /* modf case: compares integral and fractional parts to expected datas */
-static void compute_modf(TH_DATA *th_data, double *din, double *dex,
-	double *dex2, int index)
+static void compute_modf(TH_DATA * th_data, double *din, double *dex,
+			 double *dex2, int index)
 {
 	static const char errtmplt1[] =
-		"%s failed at index %d: OLD integral part: %f NEW: %f\n";
+	    "%s failed at index %d: OLD integral part: %f NEW: %f\n";
 	double d, r, e;
 	double tmp;
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(d, &tmp);
+	r = (*(th_data->th_func.funct)) (d, &tmp);
 
-	if (tmp != dex2[index]) { /* bad integral part! */
+	if (tmp != dex2[index]) {	/* bad integral part! */
 		++th_data->th_nerror;
 		/* record first error only ! */
 		if (th_data->th_result == 0) {
 			sprintf(th_data->detail_data,
 				errtmplt1,
 				th_data->th_func.fident,
-				index,
-				dex2[index], tmp);
+				index, dex2[index], tmp);
 			th_data->th_result = 1;
 		}
 		return;
@@ -208,61 +207,60 @@
 }
 
 /* fmod and pow case: compares f(input data, input data2) to expected data */
-static void compute_fmod_pow(TH_DATA *th_data, double *din, double *dex,
-	double *dex2, int index)
+static void compute_fmod_pow(TH_DATA * th_data, double *din, double *dex,
+			     double *dex2, int index)
 {
 	double d, r, e;
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(d, dex2[index]);
+	r = (*(th_data->th_func.funct)) (d, dex2[index]);
 
 	check_error(th_data, e, r, index);
 }
 
 /* frexp case: compares mantissa and exponent to expected datas */
 /* lgamma case: compares result and signgam to expected datas */
-static void compute_frexp_lgamma(TH_DATA *th_data, double *din, double *dex,
-	int *dex2, int index)
+static void compute_frexp_lgamma(TH_DATA * th_data, double *din, double *dex,
+				 int *dex2, int index)
 {
 	static const char errtmplt2[] =
-		"%s failed at index %d: OLD (exp. or sign): %d NEW: %d\n";
+	    "%s failed at index %d: OLD (exp. or sign): %d NEW: %d\n";
 	double d, r, e;
 	int tmp;
-	static const char xinf[8]="lgamma";
+	static const char xinf[8] = "lgamma";
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(d, &tmp);
+	r = (*(th_data->th_func.funct)) (d, &tmp);
 
-	if (strcmp(th_data->th_func.fident,xinf) != 0) {
-	if (tmp != dex2[index]) { /* bad exponent! */
-		++th_data->th_nerror;
-		/* record first error only ! */
-		if (th_data->th_result == 0) {
-			sprintf(th_data->detail_data,
-				errtmplt2,
-				th_data->th_func.fident,
-				index,
-				dex2[index], tmp);
-			th_data->th_result = 1;
+	if (strcmp(th_data->th_func.fident, xinf) != 0) {
+		if (tmp != dex2[index]) {	/* bad exponent! */
+			++th_data->th_nerror;
+			/* record first error only ! */
+			if (th_data->th_result == 0) {
+				sprintf(th_data->detail_data,
+					errtmplt2,
+					th_data->th_func.fident,
+					index, dex2[index], tmp);
+				th_data->th_result = 1;
+			}
+			return;
 		}
-		return;
-	}
 	}
 
 	check_error(th_data, e, r, index);
 }
 
 /* ldexp case: compares f(input data, input data2) to expected data */
-static void compute_ldexp(TH_DATA *th_data, double *din, double *dex,
-	int *din2, int index)
+static void compute_ldexp(TH_DATA * th_data, double *din, double *dex,
+			  int *din2, int index)
 {
 	double d, r, e;
 
 	d = din[index];
 	e = dex[index];
-	r = (*(th_data->th_func.funct))(d, din2[index]);
+	r = (*(th_data->th_func.funct)) (d, din2[index]);
 
 	check_error(th_data, e, r, index);
 }
@@ -276,144 +274,136 @@
  *	pointer to a TH_DATA structure.
  *
  */
-void * thread_code(void * arg)
+void *thread_code(void *arg)
 {
-	TH_DATA *th_data = (TH_DATA *)arg;
+	TH_DATA *th_data = (TH_DATA *) arg;
 	size_t fsize, fsize2, fsize3;
 	double *din, *dex, *dex2 = (double *)0;
 	int imax, index;
 
 	fsize = read_file(th_data->th_func.din_fname, (void **)&din);
-	if (fsize == (size_t)0) {
+	if (fsize == (size_t) 0) {
 		sprintf(th_data->detail_data,
 			"FAIL: %s: reading %s, %s\n",
 			th_data->th_func.fident,
-			th_data->th_func.din_fname,
-			strerror(errno));
+			th_data->th_func.din_fname, strerror(errno));
 		th_data->th_result = 1;
 		SAFE_FREE(din);
 		pthread_exit((void *)1);
 	}
 	fsize2 = read_file(th_data->th_func.dex_fname, (void **)&dex);
-	if (fsize2 == (size_t)0) {
+	if (fsize2 == (size_t) 0) {
 		sprintf(th_data->detail_data,
 			"FAIL: %s: reading %s, %s\n",
 			th_data->th_func.fident,
-			th_data->th_func.dex_fname,
-			strerror(errno));
+			th_data->th_func.dex_fname, strerror(errno));
 		th_data->th_result = 1;
 		SAFE_FREE(din);
 		SAFE_FREE(dex);
 		pthread_exit((void *)1);
 	}
 
-	fsize3 = (size_t)0;
-	switch(th_data->th_func.code_funct) {
-		case FUNC_MODF:
-		case FUNC_FMOD:
-		case FUNC_POW:
-		case FUNC_FREXP:
-		case FUNC_LDEXP:
-		case FUNC_GAM:
-			fsize3 = read_file(th_data->th_func.dex2_fname,
-					(void **)&dex2);
-			if (fsize3 == (size_t)0) {
-				sprintf(th_data->detail_data,
-					"FAIL: %s: reading %s, %s\n",
-					th_data->th_func.fident,
-					th_data->th_func.dex2_fname,
-					strerror(errno));
-				th_data->th_result = 1;
-				SAFE_FREE(din);
-				SAFE_FREE(dex);
-				pthread_exit((void *)1);
-			}
-	}
-
-	switch(th_data->th_func.code_funct) {
-		case FUNC_NORMAL:
-		case FUNC_ATAN2:
-		case FUNC_HYPOT:
-			if (fsize2 != fsize)
-				goto file_size_error;
-			break;
-		case FUNC_MODF:
-		case FUNC_FMOD:
-		case FUNC_POW:
-			if (fsize2 != fsize || fsize3 != fsize)
-				goto file_size_error;
-			break;
-		case FUNC_FREXP:
-		case FUNC_LDEXP:
-		case FUNC_GAM:
-			if (fsize2 != fsize ||
-			   (sizeof(double)/sizeof(int)) * fsize3 != fsize)
-				goto file_size_error;
-			break;
-		default:
-file_size_error:
+	fsize3 = (size_t) 0;
+	switch (th_data->th_func.code_funct) {
+	case FUNC_MODF:
+	case FUNC_FMOD:
+	case FUNC_POW:
+	case FUNC_FREXP:
+	case FUNC_LDEXP:
+	case FUNC_GAM:
+		fsize3 = read_file(th_data->th_func.dex2_fname, (void **)&dex2);
+		if (fsize3 == (size_t) 0) {
 			sprintf(th_data->detail_data,
-			    "FAIL: %s: file sizes don't match\n",
-			    th_data->th_func.fident);
+				"FAIL: %s: reading %s, %s\n",
+				th_data->th_func.fident,
+				th_data->th_func.dex2_fname, strerror(errno));
 			th_data->th_result = 1;
 			SAFE_FREE(din);
 			SAFE_FREE(dex);
-			if (fsize3)
-				SAFE_FREE(dex2);
 			pthread_exit((void *)1);
+		}
+	}
+
+	switch (th_data->th_func.code_funct) {
+	case FUNC_NORMAL:
+	case FUNC_ATAN2:
+	case FUNC_HYPOT:
+		if (fsize2 != fsize)
+			goto file_size_error;
+		break;
+	case FUNC_MODF:
+	case FUNC_FMOD:
+	case FUNC_POW:
+		if (fsize2 != fsize || fsize3 != fsize)
+			goto file_size_error;
+		break;
+	case FUNC_FREXP:
+	case FUNC_LDEXP:
+	case FUNC_GAM:
+		if (fsize2 != fsize ||
+		    (sizeof(double) / sizeof(int)) * fsize3 != fsize)
+			goto file_size_error;
+		break;
+	default:
+file_size_error:
+		sprintf(th_data->detail_data,
+			"FAIL: %s: file sizes don't match\n",
+			th_data->th_func.fident);
+		th_data->th_result = 1;
+		SAFE_FREE(din);
+		SAFE_FREE(dex);
+		if (fsize3)
+			SAFE_FREE(dex2);
+		pthread_exit((void *)1);
 	}
 
 	imax = fsize / sizeof(double);
 
 	while (th_data->th_nloop <= num_loops) {
-	/* loop stopped by pthread_cancel */
+		/* loop stopped by pthread_cancel */
 
-		for (index = th_data->th_num;
-		    index < imax;
-		    index += num_threads) { /* computation loop */
-			switch(th_data->th_func.code_funct) {
-				case FUNC_NORMAL:
-					compute_normal(th_data,
-						din, dex, index);
-					break;
-				case FUNC_ATAN2:
-				case FUNC_HYPOT:
-					compute_atan2_hypot(th_data,
-						din, dex, index);
-					break;
-				case FUNC_MODF:
-					compute_modf(th_data,
-						din, dex, dex2, index);
-					break;
-				case FUNC_FMOD:
-				case FUNC_POW:
-					compute_fmod_pow(th_data,
-						din, dex, dex2, index);
-					break;
-				case FUNC_FREXP:
-				case FUNC_GAM:
-					compute_frexp_lgamma(th_data,
-						din, dex, (int *)dex2, index);
-					break;
-				case FUNC_LDEXP:
-					compute_ldexp(th_data,
-						din, dex, (int *)dex2, index);
-					break;
-				default:
-					sprintf(th_data->detail_data,
-					 "FAIL: %s: unexpected function type\n",
-					 th_data->th_func.fident);
-					th_data->th_result = 1;
-					SAFE_FREE(din);
-					SAFE_FREE(dex);
-					if (fsize3)
-						SAFE_FREE(dex2);
-					pthread_exit((void *)1);
+		for (index = th_data->th_num; index < imax; index += num_threads) {	/* computation loop */
+			switch (th_data->th_func.code_funct) {
+			case FUNC_NORMAL:
+				compute_normal(th_data, din, dex, index);
+				break;
+			case FUNC_ATAN2:
+			case FUNC_HYPOT:
+				compute_atan2_hypot(th_data, din, dex, index);
+				break;
+			case FUNC_MODF:
+				compute_modf(th_data, din, dex, dex2, index);
+				break;
+			case FUNC_FMOD:
+			case FUNC_POW:
+				compute_fmod_pow(th_data,
+						 din, dex, dex2, index);
+				break;
+			case FUNC_FREXP:
+			case FUNC_GAM:
+				compute_frexp_lgamma(th_data,
+						     din, dex, (int *)dex2,
+						     index);
+				break;
+			case FUNC_LDEXP:
+				compute_ldexp(th_data,
+					      din, dex, (int *)dex2, index);
+				break;
+			default:
+				sprintf(th_data->detail_data,
+					"FAIL: %s: unexpected function type\n",
+					th_data->th_func.fident);
+				th_data->th_result = 1;
+				SAFE_FREE(din);
+				SAFE_FREE(dex);
+				if (fsize3)
+					SAFE_FREE(dex2);
+				pthread_exit((void *)1);
 			}
 			pthread_testcancel();
-		} /* end of computation loop */
+		}		/* end of computation loop */
 		++th_data->th_nloop;
-	}   /* end of loop */
+	}			/* end of loop */
 	SAFE_FREE(din);
 	SAFE_FREE(dex);
 	if (fsize3)
diff --git a/testcases/misc/math/float/trigo/genacos.c b/testcases/misc/math/float/trigo/genacos.c
index 6d81331..61a98a5 100644
--- a/testcases/misc/math/float/trigo/genacos.c
+++ b/testcases/misc/math/float/trigo/genacos.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabRacos[20000], Inc;
+	double tabRacos[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "racos";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabRacos[i] = acos ((Inc * i) -1);
+	for (i = 0; i < nbVal; i++)
+		tabRacos[i] = acos((Inc * i) - 1);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRacos[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRacos[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,70 +71,64 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDacos[20000], Inc;
+	double tabDacos[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dacos";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabDacos[i] = -1 +(Inc * i);
+	for (i = 0; i < nbVal; i++)
+		tabDacos[i] = -1 + (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDacos[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDacos[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during acos data file creation\n");
+				printf
+				    ("problem during acos data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during acos result file creation\n");
+				printf
+				    ("problem during acos result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during acos data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during acos result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/genasin.c b/testcases/misc/math/float/trigo/genasin.c
index 56ea39c..fdf9f71 100644
--- a/testcases/misc/math/float/trigo/genasin.c
+++ b/testcases/misc/math/float/trigo/genasin.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabRasin[20000], Inc;
+	double tabRasin[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rasin";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabRasin[i] = asin( (Inc * i) -1);
+	for (i = 0; i < nbVal; i++)
+		tabRasin[i] = asin((Inc * i) - 1);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRasin[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRasin[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,70 +71,64 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDasin[20000], Inc;
+	double tabDasin[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dasin";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabDasin[i] = (Inc * i) -1;
+	for (i = 0; i < nbVal; i++)
+		tabDasin[i] = (Inc * i) - 1;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDasin[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDasin[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during asin data file creation\n");
+				printf
+				    ("problem during asin data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during asin result file creation\n");
+				printf
+				    ("problem during asin result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during asindata file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during asin result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/genatan.c b/testcases/misc/math/float/trigo/genatan.c
index cbd6340..db0689c 100644
--- a/testcases/misc/math/float/trigo/genatan.c
+++ b/testcases/misc/math/float/trigo/genatan.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabRatan[20000], Inc;
+	double tabRatan[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "ratan";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabRatan[i] = atan ( (Inc*i)-1 );
+	for (i = 0; i < nbVal; i++)
+		tabRatan[i] = atan((Inc * i) - 1);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRatan[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRatan[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,70 +71,64 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDatan[20000], Inc;
+	double tabDatan[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "datan";
 	nbVal = 20000;
 
-	Inc = 2/nbVal;
+	Inc = 2 / nbVal;
 
-	for (i=0; i<nbVal; i++)
-		tabDatan[i] = (Inc * i) -1;
+	for (i = 0; i < nbVal; i++)
+		tabDatan[i] = (Inc * i) - 1;
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDatan[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDatan[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during atan data file creation\n");
+				printf
+				    ("problem during atan data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during atan result file creation\n");
+				printf
+				    ("problem during atan result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during atan data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during atan result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/genatan2.c b/testcases/misc/math/float/trigo/genatan2.c
index a598367..f4f4ec3 100644
--- a/testcases/misc/math/float/trigo/genatan2.c
+++ b/testcases/misc/math/float/trigo/genatan2.c
@@ -41,32 +41,27 @@
 {
 
 	int i, nbVal;
-	double	tabRatan2[20000], Inc;
+	double tabRatan2[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "ratan2";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;
+	Inc = (2 * M_PIl) / nbVal;
 
-	for (i=0; i<nbVal; i++)
-	{
-		tabRatan2[i] = atan2 (sin(Inc*i), cos(Inc*i));
+	for (i = 0; i < nbVal; i++) {
+		tabRatan2[i] = atan2(sin(Inc * i), cos(Inc * i));
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRatan2[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRatan2[i], sizeof(double));
 		}
 
 		close(fp);
@@ -77,71 +72,65 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabD[20000], Inc;
+	double tabD[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "datan2";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;
+	Inc = (2 * M_PIl) / nbVal;
 
-	for (i=0; i<nbVal; i++) {
-		tabD[i] = (Inc * i );
+	for (i = 0; i < nbVal; i++) {
+		tabD[i] = (Inc * i);
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabD[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabD[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during atan2 data file creation\n");
+				printf
+				    ("problem during atan2 data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during atan2 result file creation\n");
+				printf
+				    ("problem during atan2 result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during atan2 data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during atan2 result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/gencos.c b/testcases/misc/math/float/trigo/gencos.c
index d4cc2dc..1871206 100644
--- a/testcases/misc/math/float/trigo/gencos.c
+++ b/testcases/misc/math/float/trigo/gencos.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabRcos[20000], Inc;
+	double tabRcos[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rcos";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
-		tabRcos[i] = cos (Inc * i);
+	for (i = 0; i < nbVal; i++)
+		tabRcos[i] = cos(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRcos[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRcos[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,70 +71,64 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDcos[20000], Inc;
+	double tabDcos[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dcos";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabDcos[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDcos[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDcos[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during cos data file creation\n");
+				printf
+				    ("problem during cos data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during cos result file creation\n");
+				printf
+				    ("problem during cos result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during cos data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during cos result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/gensin.c b/testcases/misc/math/float/trigo/gensin.c
index ebe624e..698edc4 100644
--- a/testcases/misc/math/float/trigo/gensin.c
+++ b/testcases/misc/math/float/trigo/gensin.c
@@ -41,30 +41,26 @@
 {
 
 	int i, nbVal;
-	double	tabRsin [20000], Inc;
+	double tabRsin[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rsin";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
-		tabRsin[i] = sin (Inc * i);
+	for (i = 0; i < nbVal; i++)
+		tabRsin[i] = sin(Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRsin[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRsin[i], sizeof(double));
 		}
 
 		close(fp);
@@ -75,70 +71,64 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDsin[20000], Inc;
+	double tabDsin[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dsin";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
+	for (i = 0; i < nbVal; i++)
 		tabDsin[i] = (Inc * i);
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDsin[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDsin[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during sin data file creation\n");
+				printf
+				    ("problem during sin data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during sin result file creation\n");
+				printf
+				    ("problem during sin result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during sin data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during sin result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/gentan.c b/testcases/misc/math/float/trigo/gentan.c
index a5262a4..505d604 100644
--- a/testcases/misc/math/float/trigo/gentan.c
+++ b/testcases/misc/math/float/trigo/gentan.c
@@ -41,35 +41,30 @@
 {
 
 	int i, nbVal;
-	double	tabRtan[20000], Inc;
+	double tabRtan[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "rtan";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
-	{
-		if ((Inc*i) != (M_PIl/2))
-			tabRtan[i] = tan (Inc * i);
+	for (i = 0; i < nbVal; i++) {
+		if ((Inc * i) != (M_PIl / 2))
+			tabRtan[i] = tan(Inc * i);
 		else
-			tabRtan[i] = tan (0);
+			tabRtan[i] = tan(0);
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
 		close(fp);
 		return -1;
-	}
-	else
-	{
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabRtan[i],sizeof(double));
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabRtan[i], sizeof(double));
 		}
 
 		close(fp);
@@ -80,75 +75,68 @@
 int create_Data_file()
 {
 	int i, nbVal;
-	double	tabDtan[20000], Inc;
+	double tabDtan[20000], Inc;
 	char *F_name;
 	int fp;
 
 	F_name = "dtan";
 	nbVal = 20000;
 
-	Inc = (2*M_PIl)/nbVal;  /* condering a period of 2 pi rad */
+	Inc = (2 * M_PIl) / nbVal;	/* condering a period of 2 pi rad */
 
-	for (i=0; i<nbVal; i++)
-	{
-		if ((Inc*i) != (M_PIl/2))
+	for (i = 0; i < nbVal; i++) {
+		if ((Inc * i) != (M_PIl / 2))
 			tabDtan[i] = (Inc * i);
-                else
+		else
 			tabDtan[i] = 0;
 	}
 
-	fp = open(F_name,O_RDWR|O_CREAT|O_TRUNC,0777);
-        if (!fp)
-        {
-            	printf("error opening file");
-	    	close(fp);
-	    	return -1;
-        }
-        else
-        {
-		for (i = 0; i<nbVal; i++)
-		{
-			write(fp,&tabDtan[i],sizeof(double));
+	fp = open(F_name, O_RDWR | O_CREAT | O_TRUNC, 0777);
+	if (!fp) {
+		printf("error opening file");
+		close(fp);
+		return -1;
+	} else {
+		for (i = 0; i < nbVal; i++) {
+			write(fp, &tabDtan[i], sizeof(double));
 		}
 		close(fp);
 		return 0;
 	}
 }
 
-int main(int argc, char  *argv[])
+int main(int argc, char *argv[])
 {
 
-	if (argc > 1)
-	{
-		switch ( atoi(argv[1]) )
-		{
+	if (argc > 1) {
+		switch (atoi(argv[1])) {
 		case 1:
 			if (create_Data_file() == 0)
 				printf("Data file created\n");
 			else
-				printf("problem during tan  data file creation\n");
+				printf
+				    ("problem during tan  data file creation\n");
 			break;
 
 		case 2:
 			if (create_Result_file() == 0)
 				printf("Result file created\n");
 			else
-				printf("problem during tan result file creation\n");
+				printf
+				    ("problem during tan result file creation\n");
 			break;
 		default:
 			printf("Bad arglist code for: '%s'\n", argv[0]);
 			return -1;
 			break;
 		}
-	}
-	else
-	{
+	} else {
 		if (create_Data_file() != 0)
 			printf("problem during tan data file creation\n");
 		if (create_Result_file() != 0)
 			printf("problem during tan result file creation\n");
 	}
 
-  return(0);
+	return (0);
 
 }
diff --git a/testcases/misc/math/float/trigo/gentrigo.c b/testcases/misc/math/float/trigo/gentrigo.c
index 89b26f4..5f7e0cb 100644
--- a/testcases/misc/math/float/trigo/gentrigo.c
+++ b/testcases/misc/math/float/trigo/gentrigo.c
@@ -53,57 +53,57 @@
 {
 	pid_t myproc;
 
-        if (( myproc = fork() )!=0)
-                return myproc;
-        else {
-		char *arglist[] = { func_name, NULL};
-	     	execvp(arglist[0], arglist);
+	if ((myproc = fork()) != 0)
+		return myproc;
+	else {
+		char *arglist[] = { func_name, NULL };
+		execvp(arglist[0], arglist);
 
-	     	fprintf(stderr, "ERROR %s\n", strerror(errno));
-	     	abort();
+		fprintf(stderr, "ERROR %s\n", strerror(errno));
+		abort();
 	}
 }
 
 int main(int argc, char *argv[])
 {
 	char *funct, *bin_path;
-	pid_t  child;
+	pid_t child;
 
 	if (argc != 2) {
-                printf ("ERROR: need the path to generation binaries\n");
-                abort();
-        }
+		printf("ERROR: need the path to generation binaries\n");
+		abort();
+	}
 
 	bin_path = argv[1];
 
-	funct = malloc (strlen (bin_path) + MAX_FNAME_LEN);
-	sprintf (funct, "%s/gencos", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	funct = malloc(strlen(bin_path) + MAX_FNAME_LEN);
+	sprintf(funct, "%s/gencos", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/gensin", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/gensin", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/gentan", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/gentan", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genatan", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genatan", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genatan2", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genatan2", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genacos", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genacos", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
-	sprintf (funct, "%s/genasin", bin_path);
-	child=create_file(funct, 0);
-	waitpid(child,NULL,0);
+	sprintf(funct, "%s/genasin", bin_path);
+	child = create_file(funct, 0);
+	waitpid(child, NULL, 0);
 
 	return 0;
 }
diff --git a/testcases/misc/math/fptests/fptest01.c b/testcases/misc/math/fptests/fptest01.c
index 9d6f65f..b580c17 100644
--- a/testcases/misc/math/fptests/fptest01.c
+++ b/testcases/misc/math/fptests/fptest01.c
@@ -62,8 +62,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="fptest01";          /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "fptest01";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
 int init();
@@ -71,31 +71,30 @@
 int term();
 int addevent();
 double gauss();
-void   gaussinit();
+void gaussinit();
 struct event {
 	int proc;
 	int type;
 	double time;
-	};
+};
 
 struct event eventtab[EVENTMX];
 struct event rtrevent;
-int waiting[EVENTMX];	/* array of waiting processors */
-int nwaiting;		/* number of waiting processors */
+int waiting[EVENTMX];		/* array of waiting processors */
+int nwaiting;			/* number of waiting processors */
 double global_time;		/* global clock */
-double lsttime;		/* time used for editing */
-double dtc, dts, alpha;	/* timing parameters */
-int nproc;		/* number of processors */
-int barcnt;		/* number of processors ATBARRIER */
-int ncycle;		/* number of cycles completed */
-int ncycmax;		/* number of cycles to run */
-int critfree;		/* TRUE if critical section not occupied */
-int gcount;		/* # calls to gauss */
+double lsttime;			/* time used for editing */
+double dtc, dts, alpha;		/* timing parameters */
+int nproc;			/* number of processors */
+int barcnt;			/* number of processors ATBARRIER */
+int ncycle;			/* number of cycles completed */
+int ncycmax;			/* number of cycles to run */
+int critfree;			/* TRUE if critical section not occupied */
+int gcount;			/* # calls to gauss */
 
 struct event *nextevent();
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	struct event *ev;
 
@@ -107,71 +106,70 @@
 
 	init();
 
-	while ((ev=nextevent()) != NULL) {
+	while ((ev = nextevent()) != NULL) {
 		doevent(ev);
 	}
 
 	term();
-	tst_resm(TPASS,"PASS");
+	tst_resm(TPASS, "PASS");
 	tst_exit();
 }
 
 /*
 	initialize all processes to "entering work section"
 */
-int
-init()
+int init()
 {
 	int p;
 	double dtw, dtwsig;
 
-	ncycle=0;
-	global_time=0;
-	lsttime=0;
-	barcnt=0;
-	nwaiting=0;
-	critfree=TRUE;
+	ncycle = 0;
+	global_time = 0;
+	lsttime = 0;
+	barcnt = 0;
+	nwaiting = 0;
+	critfree = TRUE;
 
-	dtw=1./nproc;		/* mean process work time */
-	dtwsig=dtw*alpha;	/* std deviation of work time */
-	gaussinit(dtw,dtwsig);
+	dtw = 1. / nproc;	/* mean process work time */
+	dtwsig = dtw * alpha;	/* std deviation of work time */
+	gaussinit(dtw, dtwsig);
 
-	for (p=1; p<=nproc; p++) {
+	for (p = 1; p <= nproc; p++) {
 		eventtab[p].type = NULLEVENT;
 	}
 
-	for (p=1; p<=nproc; p++) {
-		addevent(ENTERWORK,p,global_time);
+	for (p = 1; p <= nproc; p++) {
+		addevent(ENTERWORK, p, global_time);
 	}
 
-	return(0);
+	return (0);
 }
+
 /*
 	print edit quantities
 */
-int
-term()
+int term()
 {
 	double avgspd;
 	double t_total = 0.0;
 	double v;
 	int i;
 
-	for (i=0; i < nproc; i++)
+	for (i = 0; i < nproc; i++)
 		t_total += eventtab[i].time;
 
-	avgspd=ncycle/global_time;
+	avgspd = ncycle / global_time;
 
 	v = t_total - MAGIC1;
 	if (v < 0.0)
 		v *= -1.0;
 
 	if (v > DIFF1) {
-		tst_resm(TFAIL,"FAIL");
+		tst_resm(TFAIL, "FAIL");
 		v = t_total - MAGIC1;
-		tst_resm(TINFO,"t_total = %.15f\n", t_total);
-		tst_resm(TINFO,"expected  %.15f\n", MAGIC1);
-		tst_resm(TINFO,"diff = %.15f\n", v);
+		tst_resm(TINFO, "t_total = %.15f\n", t_total);
+		tst_resm(TINFO, "expected  %.15f\n", MAGIC1);
+		tst_resm(TINFO, "diff = %.15f\n", v);
 		tst_exit();
 	}
 
@@ -180,53 +178,53 @@
 		v *= -1.0;
 
 	if (v > DIFF2) {
-		tst_resm(TFAIL,"FAIL");
+		tst_resm(TFAIL, "FAIL");
 		v = avgspd - MAGIC2;
-		tst_resm(TINFO,"avgspd  = %.15f\n", avgspd);
-		tst_resm(TINFO,"expected  %.15f\n", MAGIC2);
-		tst_resm(TINFO,"diff = %.15f\n", v);
+		tst_resm(TINFO, "avgspd  = %.15f\n", avgspd);
+		tst_resm(TINFO, "expected  %.15f\n", MAGIC2);
+		tst_resm(TINFO, "diff = %.15f\n", v);
 		tst_exit();
 	}
-	return(0);
+	return (0);
 }
+
 /*
 	add an event to the event queue
 */
-int
-addevent(int type,int proc, double t)
+int addevent(int type, int proc, double t)
 {
 	int i;
-	int ok=FALSE;
+	int ok = FALSE;
 
-	for (i=1; i<=nproc; i++) {
-		if (eventtab[i].type==NULLEVENT) {
-			eventtab[i].type=type;
-			eventtab[i].proc=proc;
-			eventtab[i].time=t;
-			ok=TRUE;
+	for (i = 1; i <= nproc; i++) {
+		if (eventtab[i].type == NULLEVENT) {
+			eventtab[i].type = type;
+			eventtab[i].proc = proc;
+			eventtab[i].time = t;
+			ok = TRUE;
 			break;
 		}
 	}
 	if (ok)
-		return(0);
+		return (0);
 	else
 		tst_brkm(TBROK, NULL, "No room for event");
-	return(0);
+	return (0);
 }
+
 /*
 	get earliest event in event queue
 */
 struct event *nextevent()
 {
-	double mintime=BIG;
-	int imin=0;
+	double mintime = BIG;
+	int imin = 0;
 	int i;
 
-	for (i=1; i<=nproc; i++) {
-		if (eventtab[i].type != NULLEVENT &&
-		    eventtab[i].time<mintime) {
-			imin=i;
-			mintime=eventtab[i].time;
+	for (i = 1; i <= nproc; i++) {
+		if (eventtab[i].type != NULLEVENT && eventtab[i].time < mintime) {
+			imin = i;
+			mintime = eventtab[i].time;
 		}
 	}
 
@@ -234,50 +232,53 @@
 		rtrevent.type = eventtab[imin].type;
 		rtrevent.proc = eventtab[imin].proc;
 		rtrevent.time = eventtab[imin].time;
-		eventtab[imin].type=NULLEVENT;
-		return(&rtrevent);
+		eventtab[imin].type = NULLEVENT;
+		return (&rtrevent);
 	} else
-		return((struct event *)NULL);
+		return ((struct event *)NULL);
 }
+
 /*
 	add a processor to the waiting queue
 */
-int
-addwaiting(p)
+int addwaiting(p)
 int p;
 {
-	waiting[++nwaiting]=p;
-	return(0);
+	waiting[++nwaiting] = p;
+	return (0);
 }
+
 /*
 	remove the next processor from the waiting queue
 */
-int
-getwaiting()
+int getwaiting()
 {
 	if (nwaiting)
-		return(waiting[nwaiting--]);
+		return (waiting[nwaiting--]);
 	else
-		return(0);
+		return (0);
 }
+
 double dtcrit()
 {
-	return(dtc);
+	return (dtc);
 }
+
 double dtspinoff()
 {
-	return(dts);
+	return (dts);
 }
+
 double dtwork()
 {
-	return(gauss());
+	return (gauss());
 }
+
 /*
 	take the action prescribed by 'ev', update the clock, and
 	generate any subsequent events
 */
-int
-doevent(ev)
+int doevent(ev)
 struct event *ev;
 {
 	double nxttime;
@@ -288,69 +289,69 @@
 
 	switch (ev->type) {
 	case TRYCRIT:
-		if (critfree==TRUE)
-			addevent(ENTERCRIT,proc,global_time);
+		if (critfree == TRUE)
+			addevent(ENTERCRIT, proc, global_time);
 		else
 			addwaiting(proc);
 		break;
 	case ENTERCRIT:
 		critfree = FALSE;
-		nxttime=global_time+dtcrit();
-		addevent(LEAVECRIT,proc,nxttime);
+		nxttime = global_time + dtcrit();
+		addevent(LEAVECRIT, proc, nxttime);
 		break;
 	case LEAVECRIT:
 		critfree = TRUE;
-		addevent(ATBARRIER,proc,global_time);
-		if ((p=getwaiting())!=0) {
-			nxttime=global_time;
-			addevent(ENTERCRIT,p,nxttime);
+		addevent(ATBARRIER, proc, global_time);
+		if ((p = getwaiting()) != 0) {
+			nxttime = global_time;
+			addevent(ENTERCRIT, p, nxttime);
 		}
 		break;
 	case ATBARRIER:
 		barcnt++;
-		if (barcnt==nproc) {
-			nxttime=global_time;
-			for (i=1; i<=nproc; i++) {
-				nxttime+=dtspinoff();
-				addevent(ENTERWORK,i,nxttime);
+		if (barcnt == nproc) {
+			nxttime = global_time;
+			for (i = 1; i <= nproc; i++) {
+				nxttime += dtspinoff();
+				addevent(ENTERWORK, i, nxttime);
 			}
-			barcnt=0;
+			barcnt = 0;
 			ncycle++;
 		}
 		break;
 	case ENTERWORK:
-		nxttime=global_time+dtwork();
-		if (ncycle<ncycmax)
-			addevent(LEAVEWORK,proc,nxttime);
+		nxttime = global_time + dtwork();
+		if (ncycle < ncycmax)
+			addevent(LEAVEWORK, proc, nxttime);
 		break;
 	case LEAVEWORK:
-		addevent(TRYCRIT,proc,global_time);
+		addevent(TRYCRIT, proc, global_time);
 		break;
 	default:
 		tst_brkm(TBROK, NULL, "Illegal event");
 		break;
 	}
-	return(0);
+	return (0);
 }
 
-static int alternator=1;
+static int alternator = 1;
 static double mean;
 static double stdev;
-static double u1,u2;
+static double u1, u2;
 static double twopi;
 
 void gaussinit(double m, double s)
 {
-	mean=m;
-	stdev=s;
-	twopi=2.*acos((double)-1.0);
+	mean = m;
+	stdev = s;
+	twopi = 2. * acos((double)-1.0);
 	u1 = twopi / 400.0;
 	u2 = twopi / 500.0;
 }
 
 double gauss()
 {
-	double x1,x2;
+	double x1, x2;
 
 	gcount++;
 
@@ -361,13 +362,13 @@
 	if (u2 > 0.99)
 		u2 = twopi / 400.0;
 
-	if (alternator==1) {
+	if (alternator == 1) {
 		alternator = -1;
-		x1 = sqrt(-2.0*log(u1))*cos(twopi*u2);
-		return(mean + stdev*x1);
+		x1 = sqrt(-2.0 * log(u1)) * cos(twopi * u2);
+		return (mean + stdev * x1);
 	} else {
 		alternator = 1;
-		x2 = sqrt(-2.0*log(u1))*sin(twopi*u2);
-		return(mean + stdev*x2);
+		x2 = sqrt(-2.0 * log(u1)) * sin(twopi * u2);
+		return (mean + stdev * x2);
 	}
 }
diff --git a/testcases/misc/math/fptests/fptest02.c b/testcases/misc/math/fptests/fptest02.c
index d5ae970..1c61e53 100644
--- a/testcases/misc/math/fptests/fptest02.c
+++ b/testcases/misc/math/fptests/fptest02.c
@@ -62,8 +62,8 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="fptest02";          /* Test program identifier.    */
-int TST_TOTAL=1;                /* Total number of test cases. */
+char *TCID = "fptest02";	/* Test program identifier.    */
+int TST_TOTAL = 1;		/* Total number of test cases. */
 /**************/
 
 int init();
@@ -78,25 +78,24 @@
 	int proc;
 	int type;
 	double time;
-	};
+};
 
 struct event eventtab[EVENTMX];
 struct event rtrevent;
-int waiting[EVENTMX];		 /* array of waiting processors */
-int nwaiting;		/* number of waiting processors */
-double sgtime;		/* global clock */
-double lsttime;		/* time used for editing */
-double dtc, dts, alpha;		 /* timing parameters */
-int nproc;		/* number of processors */
-int barcnt;		/* number of processors ATBARRIER */
-int ncycle;		/* number of cycles completed */
-int ncycmax;		/* number of cycles to run */
-int critfree;		/* TRUE if critical section not occupied */
+int waiting[EVENTMX];		/* array of waiting processors */
+int nwaiting;			/* number of waiting processors */
+double sgtime;			/* global clock */
+double lsttime;			/* time used for editing */
+double dtc, dts, alpha;		/* timing parameters */
+int nproc;			/* number of processors */
+int barcnt;			/* number of processors ATBARRIER */
+int ncycle;			/* number of cycles completed */
+int ncycmax;			/* number of cycles to run */
+int critfree;			/* TRUE if critical section not occupied */
 
 struct event *nextevent();
 
-int
-main(argc,argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {
@@ -110,160 +109,163 @@
 
 	init();
 
-	while ((ev=nextevent()) != NULL) {
+	while ((ev = nextevent()) != NULL) {
 		doevent(ev);
 	}
 
 	term();
-	tst_resm(TPASS,"PASS");
+	tst_resm(TPASS, "PASS");
 	tst_exit();
 }
 
 /*
 	initialize all processes to "entering work section"
 */
-int
-init()
+int init()
 {
 	int p;
 	double dtw, dtwsig;
 
-	ncycle=0;
-	sgtime=0;
-	lsttime=0;
-	barcnt=0;
-	nwaiting=0;
-	critfree=TRUE;
+	ncycle = 0;
+	sgtime = 0;
+	lsttime = 0;
+	barcnt = 0;
+	nwaiting = 0;
+	critfree = TRUE;
 
-	dtw=1./nproc;		/* mean process work time */
-	dtwsig=dtw*alpha;	/* std deviation of work time */
-	gaussinit(dtw,dtwsig,time(0));
+	dtw = 1. / nproc;	/* mean process work time */
+	dtwsig = dtw * alpha;	/* std deviation of work time */
+	gaussinit(dtw, dtwsig, time(0));
 
-	for (p=1; p<=nproc; p++) {
+	for (p = 1; p <= nproc; p++) {
 		eventtab[p].type = NULLEVENT;
-		}
+	}
 
-	for (p=1; p<=nproc; p++) {
-		addevent(ENTERWORK,p,sgtime);
-		}
+	for (p = 1; p <= nproc; p++) {
+		addevent(ENTERWORK, p, sgtime);
+	}
 
-	return(0);
+	return (0);
 }
+
 /*
 	print edit quantities
 */
-int
-term()
+int term()
 {
 	double avgspd;
 	double v;
 
-	avgspd=ncycle/sgtime;
+	avgspd = ncycle / sgtime;
 	v = avgspd - MAGIC;
 	if (v < 0.0)
 		v *= -1.0;
 	if (v > DIFF) {
-		tst_resm(TFAIL,"FAIL");
+		tst_resm(TFAIL, "FAIL");
 		v = avgspd - MAGIC;
-		tst_resm(TINFO,"avgspd = %.15f\n", avgspd);
-		tst_resm(TINFO,"expected %.15f\n", MAGIC);
-		tst_resm(TINFO,"diff = %.15f\n", v);
+		tst_resm(TINFO, "avgspd = %.15f\n", avgspd);
+		tst_resm(TINFO, "expected %.15f\n", MAGIC);
+		tst_resm(TINFO, "diff = %.15f\n", v);
 		tst_exit();
 	}
-	return(0);
+	return (0);
 }
+
 /*
 	add an event to the event queue
 */
-int
-addevent(type,proc,t)
+int addevent(type, proc, t)
 int type, proc;
 double t;
 {
 	int i;
-	int ok=FALSE;
+	int ok = FALSE;
 
-	for (i=1; i<=nproc; i++) {
-		if (eventtab[i].type==NULLEVENT) {
-			eventtab[i].type=type;
-			eventtab[i].proc=proc;
-			eventtab[i].time=t;
-			ok=TRUE;
+	for (i = 1; i <= nproc; i++) {
+		if (eventtab[i].type == NULLEVENT) {
+			eventtab[i].type = type;
+			eventtab[i].proc = proc;
+			eventtab[i].time = t;
+			ok = TRUE;
 			break;
-			}
 		}
+	}
 	if (ok)
-		return(0);
+		return (0);
 	else
 		tst_brkm(TBROK, NULL, "No room for event");
 
-	return(0);
+	return (0);
 }
+
 /*
 	get earliest event in event queue
 */
 struct event *nextevent()
 {
-	double mintime=BIG;
-	int imin=0;
+	double mintime = BIG;
+	int imin = 0;
 	int i;
 
-	for (i=1; i<=nproc; i++) {
-          if ((eventtab[i].type!=NULLEVENT) && (eventtab[i].time<mintime)) {
-		imin=i;
-		mintime=eventtab[i].time;
+	for (i = 1; i <= nproc; i++) {
+		if ((eventtab[i].type != NULLEVENT)
+		    && (eventtab[i].time < mintime)) {
+			imin = i;
+			mintime = eventtab[i].time;
 		}
-	  }
+	}
 
 	if (imin) {
 		rtrevent.type = eventtab[imin].type;
 		rtrevent.proc = eventtab[imin].proc;
 		rtrevent.time = eventtab[imin].time;
-		eventtab[imin].type=NULLEVENT;
-		return(&rtrevent);
-		}
-	else
-		return((struct event *)NULL);
+		eventtab[imin].type = NULLEVENT;
+		return (&rtrevent);
+	} else
+		return ((struct event *)NULL);
 }
+
 /*
 	add a processor to the waiting queue
 */
-int
-addwaiting(p)
+int addwaiting(p)
 int p;
 {
-	waiting[++nwaiting]=p;
-	return(0);
+	waiting[++nwaiting] = p;
+	return (0);
 }
+
 /*
 	remove the next processor from the waiting queue
 */
-int
-getwaiting()
+int getwaiting()
 {
 	if (nwaiting)
-		return(waiting[nwaiting--]);
+		return (waiting[nwaiting--]);
 	else
-		return(0);
+		return (0);
 }
+
 double dtcrit()
 {
-	return(dtc);
+	return (dtc);
 }
+
 double dtspinoff()
 {
-	return(dts);
+	return (dts);
 }
+
 double dtwork()
 {
-	return(gauss());
+	return (gauss());
 }
+
 /*
 	take the action prescribed by 'ev', update the clock, and
 	generate any subsequent events
 */
-int
-doevent(ev)
+int doevent(ev)
 struct event *ev;
 {
 	double nxttime;
@@ -273,84 +275,83 @@
 	proc = ev->proc;
 
 	switch (ev->type) {
-		case TRYCRIT :
-			if (critfree==TRUE)
-				addevent(ENTERCRIT,proc,sgtime);
-			else
-				addwaiting(proc);
-			break;
-		case ENTERCRIT :
-			critfree = FALSE;
-			nxttime=sgtime+dtcrit();
-			addevent(LEAVECRIT,proc,nxttime);
-			break;
-		case LEAVECRIT :
-			critfree = TRUE;
-			addevent(ATBARRIER,proc,sgtime);
-			if ((p=getwaiting())!=0) {
-				nxttime=sgtime;
-				addevent(ENTERCRIT,p,nxttime);
-				}
-			break;
-		case ATBARRIER :
-			barcnt++;
-			if (barcnt==nproc) {
-				nxttime=sgtime;
-				for (i=1; i<=nproc; i++) {
-					nxttime+=dtspinoff();
-					addevent(ENTERWORK,i,nxttime);
-					}
-				barcnt=0;
-				ncycle++;
-				}
-			break;
-		case ENTERWORK :
-			nxttime=sgtime+dtwork();
-			if (ncycle<ncycmax)
-				addevent(LEAVEWORK,proc,nxttime);
-			break;
-		case LEAVEWORK :
-			addevent(TRYCRIT,proc,sgtime);
-			break;
-		default:
-			tst_brkm(TBROK, NULL, "Illegal event");
-			break;
+	case TRYCRIT:
+		if (critfree == TRUE)
+			addevent(ENTERCRIT, proc, sgtime);
+		else
+			addwaiting(proc);
+		break;
+	case ENTERCRIT:
+		critfree = FALSE;
+		nxttime = sgtime + dtcrit();
+		addevent(LEAVECRIT, proc, nxttime);
+		break;
+	case LEAVECRIT:
+		critfree = TRUE;
+		addevent(ATBARRIER, proc, sgtime);
+		if ((p = getwaiting()) != 0) {
+			nxttime = sgtime;
+			addevent(ENTERCRIT, p, nxttime);
 		}
-	return(0);
+		break;
+	case ATBARRIER:
+		barcnt++;
+		if (barcnt == nproc) {
+			nxttime = sgtime;
+			for (i = 1; i <= nproc; i++) {
+				nxttime += dtspinoff();
+				addevent(ENTERWORK, i, nxttime);
+			}
+			barcnt = 0;
+			ncycle++;
+		}
+		break;
+	case ENTERWORK:
+		nxttime = sgtime + dtwork();
+		if (ncycle < ncycmax)
+			addevent(LEAVEWORK, proc, nxttime);
+		break;
+	case LEAVEWORK:
+		addevent(TRYCRIT, proc, sgtime);
+		break;
+	default:
+		tst_brkm(TBROK, NULL, "Illegal event");
+		break;
+	}
+	return (0);
 }
 
-static int alternator=1;
+static int alternator = 1;
 static double mean;
 static double stdev;
-static double u1,u2;
+static double u1, u2;
 static double twopi;
-static double rnorm=2147483647;
+static double rnorm = 2147483647;
 
-void gaussinit(m,s,seed)
-double m,s;
+void gaussinit(m, s, seed)
+double m, s;
 int seed;
 {
 	srand48(seed);
-	mean=m;
-	stdev=s;
-	twopi=2.*acos((double)-1.0);
+	mean = m;
+	stdev = s;
+	twopi = 2. * acos((double)-1.0);
 	return;
 }
 
 double gauss()
 {
-	double x1,x2;
+	double x1, x2;
 
-	if (alternator==1) {
+	if (alternator == 1) {
 		alternator = -1;
-		u1 = lrand48()/rnorm;
-		u2 = lrand48()/rnorm;
-		x1 = sqrt(-2.0*log(u1))*cos(twopi*u2);
-		return(mean + stdev*x1);
-		}
-	else {
+		u1 = lrand48() / rnorm;
+		u2 = lrand48() / rnorm;
+		x1 = sqrt(-2.0 * log(u1)) * cos(twopi * u2);
+		return (mean + stdev * x1);
+	} else {
 		alternator = 1;
-		x2 = sqrt(-2.0*log(u1))*sin(twopi*u2);
-		return(mean + stdev*x2);
-		}
+		x2 = sqrt(-2.0 * log(u1)) * sin(twopi * u2);
+		return (mean + stdev * x2);
+	}
 }
diff --git a/testcases/misc/math/nextafter/nextafter01.c b/testcases/misc/math/nextafter/nextafter01.c
index 98f580d..bdee392 100644
--- a/testcases/misc/math/nextafter/nextafter01.c
+++ b/testcases/misc/math/nextafter/nextafter01.c
@@ -60,7 +60,7 @@
 int main()
 {
 	double answer;
-	double check;		 /* tmp variable */
+	double check;		/* tmp variable */
 
 	setup();		/* temp file is now open */
 /*--------------------------------------------------------------*/
@@ -70,37 +70,38 @@
 	check = (answer + 1.0) / 2;
 	if ((check != answer) && ((float)check != 1.0)) {
 		fprintf(temp, "nextafter returned %e, expected answer or 1.0\n",
-				answer);
+			answer);
 		local_flag = FAILED;
 	}
 
-        blexit();
+	blexit();
 /*--------------------------------------------------------------*/
 	blenter();
 
 	answer = nextafter(1.0, 0.9);
 	if ((check != answer) && (check != 1.0)) {
 		fprintf(temp, "nextafter returned %e, expected answer or 1.0\n",
-				answer);
+			answer);
 		local_flag = FAILED;
 	}
 
-        blexit();
+	blexit();
 /*--------------------------------------------------------------*/
 	blenter();
 
 	answer = nextafter(1.0, 1.0);
 	if (answer != 1.0) {
 		fprintf(temp, "nextafter 3 returned %e, expected 1.0\n",
-				answer);
+			answer);
 		local_flag = FAILED;
 	}
 
-        blexit();
+	blexit();
 /*--------------------------------------------------------------*/
 
 	tst_exit();
 }
+
 /*--------------------------------------------------------------*/
 
 /*****	*****	LTP Port	*****/
diff --git a/testcases/misc/tcore_patch_test_suites/tcore.c b/testcases/misc/tcore_patch_test_suites/tcore.c
index 7cdc4a7..d5ac14a 100644
--- a/testcases/misc/tcore_patch_test_suites/tcore.c
+++ b/testcases/misc/tcore_patch_test_suites/tcore.c
@@ -22,10 +22,10 @@
 #include "usctest.h"
 
 /* Extern Global Variables */
-extern int  Tst_count;
-extern char *TESTDIR;                /* temporary dir created by tst_tmpdir() */
+extern int Tst_count;
+extern char *TESTDIR;		/* temporary dir created by tst_tmpdir() */
 /* Global Variables */
-char *TCID     = "tcore";            /* test program identifier.              */
+char *TCID = "tcore";		/* test program identifier.              */
 
 #if defined __i386__ || defined(__x86_64__)
 #include <stdio.h>
@@ -36,71 +36,65 @@
 
 #define BUFFER_SIZE 16
 
-int  TST_TOTAL = 1;                  /* total number of tests in this file.   */
+int TST_TOTAL = 1;		/* total number of tests in this file.   */
 
 /* Circular buffer of integers. */
 
-struct prodcons
-{
-  int buffer[BUFFER_SIZE];	/* the actual data */
-  pthread_mutex_t lock;		/* mutex ensuring exclusive access to buffer */
-  int readpos, writepos;	/* positions for reading and writing */
-  pthread_cond_t notempty;	/* signaled when buffer is not empty */
-  pthread_cond_t notfull;	/* signaled when buffer is not full */
+struct prodcons {
+	int buffer[BUFFER_SIZE];	/* the actual data */
+	pthread_mutex_t lock;	/* mutex ensuring exclusive access to buffer */
+	int readpos, writepos;	/* positions for reading and writing */
+	pthread_cond_t notempty;	/* signaled when buffer is not empty */
+	pthread_cond_t notfull;	/* signaled when buffer is not full */
 };
 
 /* Initialize a buffer */
-static void
-init (struct prodcons *b)
+static void init(struct prodcons *b)
 {
-  pthread_mutex_init (&b->lock, NULL);
-  pthread_cond_init (&b->notempty, NULL);
-  pthread_cond_init (&b->notfull, NULL);
-  b->readpos = 0;
-  b->writepos = 0;
+	pthread_mutex_init(&b->lock, NULL);
+	pthread_cond_init(&b->notempty, NULL);
+	pthread_cond_init(&b->notfull, NULL);
+	b->readpos = 0;
+	b->writepos = 0;
 }
 
 /* Store an integer in the buffer */
-static void
-put (struct prodcons *b, int data)
+static void put(struct prodcons *b, int data)
 {
-  pthread_mutex_lock (&b->lock);
-  /* Wait until buffer is not full */
-  while ((b->writepos + 1) % BUFFER_SIZE == b->readpos)
-    {
-      pthread_cond_wait (&b->notfull, &b->lock);
-      /* pthread_cond_wait reacquired b->lock before returning */
-    }
-  /* Write the data and advance write pointer */
-  b->buffer[b->writepos] = data;
-  b->writepos++;
-  if (b->writepos >= BUFFER_SIZE)
-    b->writepos = 0;
-  /* Signal that the buffer is now not empty */
-  pthread_cond_signal (&b->notempty);
-  pthread_mutex_unlock (&b->lock);
+	pthread_mutex_lock(&b->lock);
+	/* Wait until buffer is not full */
+	while ((b->writepos + 1) % BUFFER_SIZE == b->readpos) {
+		pthread_cond_wait(&b->notfull, &b->lock);
+		/* pthread_cond_wait reacquired b->lock before returning */
+	}
+	/* Write the data and advance write pointer */
+	b->buffer[b->writepos] = data;
+	b->writepos++;
+	if (b->writepos >= BUFFER_SIZE)
+		b->writepos = 0;
+	/* Signal that the buffer is now not empty */
+	pthread_cond_signal(&b->notempty);
+	pthread_mutex_unlock(&b->lock);
 }
 
 /* Read and remove an integer from the buffer */
-static int
-get (struct prodcons *b)
+static int get(struct prodcons *b)
 {
-  int data;
-  pthread_mutex_lock (&b->lock);
-  /* Wait until buffer is not empty */
-  while (b->writepos == b->readpos)
-    {
-      pthread_cond_wait (&b->notempty, &b->lock);
-    }
-  /* Read the data and advance read pointer */
-  data = b->buffer[b->readpos];
-  b->readpos++;
-  if (b->readpos >= BUFFER_SIZE)
-    b->readpos = 0;
-  /* Signal that the buffer is now not full */
-  pthread_cond_signal (&b->notfull);
-  pthread_mutex_unlock (&b->lock);
-  return data;
+	int data;
+	pthread_mutex_lock(&b->lock);
+	/* Wait until buffer is not empty */
+	while (b->writepos == b->readpos) {
+		pthread_cond_wait(&b->notempty, &b->lock);
+	}
+	/* Read the data and advance read pointer */
+	data = b->buffer[b->readpos];
+	b->readpos++;
+	if (b->readpos >= BUFFER_SIZE)
+		b->readpos = 0;
+	/* Signal that the buffer is now not full */
+	pthread_cond_signal(&b->notfull);
+	pthread_mutex_unlock(&b->lock);
+	return data;
 }
 
 /* A test program: one thread inserts integers from 1 to 10000,
@@ -110,109 +104,108 @@
 
 struct prodcons buffer;
 
-static void *
-producer (void *data)
+static void *producer(void *data)
 {
-  int n;
-  pid_t pid;
-  long double a3 = 100.5678943, b3 = 200.578435698;
-  long double c3, d3, e3, f3;
-  a3 += b3;
-  a3 *= pow(b3, 2);
-  pid = getpid();
-  tst_resm(TINFO,"producer pid=%d", pid);
-  sleep(1);
-  for (n = 0; n < 10000; n++)
-    {
-      tst_resm(TINFO,"%d --->", n);
-      put (&buffer, n);
+	int n;
+	pid_t pid;
+	long double a3 = 100.5678943, b3 = 200.578435698;
+	long double c3, d3, e3, f3;
+	a3 += b3;
+	a3 *= pow(b3, 2);
+	pid = getpid();
+	tst_resm(TINFO, "producer pid=%d", pid);
+	sleep(1);
+	for (n = 0; n < 10000; n++) {
+		tst_resm(TINFO, "%d --->", n);
+		put(&buffer, n);
 
-      if (n==7686) {
-	    system("ps ax | grep ex");
-	   c3 = pow(pid, pid);
-	   d3 = log(pid);
-	   e3 = c3 * d3;
-	   f3 = c3 / d3;
- 	{
-	char buf[16];
-	sprintf(buf, "%d%d\n", pid, pid);
-        asm volatile ("movups (%0), %%xmm1;"::"r" (buf):"memory");
+		if (n == 7686) {
+			system("ps ax | grep ex");
+			c3 = pow(pid, pid);
+			d3 = log(pid);
+			e3 = c3 * d3;
+			f3 = c3 / d3;
+			{
+				char buf[16];
+				sprintf(buf, "%d%d\n", pid, pid);
+				asm volatile ("movups (%0), %%xmm1;"::
+					      "r" (buf):"memory");
+			}
+			sleep(1);
+		}
 	}
-	    sleep(1);
-      }
-    }
-  put (&buffer, OVER);
-  return NULL;
+	put(&buffer, OVER);
+	return NULL;
 }
 
-static void *
-consumer (void *data)
+static void *consumer(void *data)
 {
-  int d;
-  char *junk = NULL;
-  pid_t pid;
-  long double a2 = 10002.5, b2 = 2888883.5;
-  long double d2, e2, f2;
-  a2 += b2;
-  pid = getpid();
-  tst_resm(TINFO,"consumer pid=%d", pid);
-  sleep(1);
-  while (1)
-    {
-      d = get (&buffer);
-      if (d == OVER)
-	break;
-      tst_resm(TINFO,"---> %d", d);
-      if (d==7688) {
-	    system("ps ax | grep ex");
-	    d2 = pid * a2 / b2;
-	    e2 = tan(pid);
-	    f2 = cos (pid)/d2;
- 	{
-	char buf[16];
-	char buf1[16];
-	sprintf(buf, "%d%d\n", pid, pid);
-	sprintf(buf1,"%Lf",d2);
-        asm volatile ("movups (%0), %%xmm2;":: "r" (buf):"memory");
-        asm volatile ("movups (%0), %%xmm5;":: "r" (buf):"memory");
+	int d;
+	char *junk = NULL;
+	pid_t pid;
+	long double a2 = 10002.5, b2 = 2888883.5;
+	long double d2, e2, f2;
+	a2 += b2;
+	pid = getpid();
+	tst_resm(TINFO, "consumer pid=%d", pid);
+	sleep(1);
+	while (1) {
+		d = get(&buffer);
+		if (d == OVER)
+			break;
+		tst_resm(TINFO, "---> %d", d);
+		if (d == 7688) {
+			system("ps ax | grep ex");
+			d2 = pid * a2 / b2;
+			e2 = tan(pid);
+			f2 = cos(pid) / d2;
+			{
+				char buf[16];
+				char buf1[16];
+				sprintf(buf, "%d%d\n", pid, pid);
+				sprintf(buf1, "%Lf", d2);
+				asm volatile ("movups (%0), %%xmm2;"::
+					      "r" (buf):"memory");
+				asm volatile ("movups (%0), %%xmm5;"::
+					      "r" (buf):"memory");
+			}
+			*junk = 0;
+		}
 	}
-	    *junk = 0;
-      }
-    }
-  return NULL;
+	return NULL;
 }
 
-int
-main (void)
+int main(void)
 {
-  pthread_t th_a, th_b;
-  void *retval;
-  double a1 = 1.5, b1 = 2.5;
-  long double c1 ;
-  pid_t pid;
-  a1 += b1;
+	pthread_t th_a, th_b;
+	void *retval;
+	double a1 = 1.5, b1 = 2.5;
+	long double c1;
+	pid_t pid;
+	a1 += b1;
 
-  pid = getpid();
+	pid = getpid();
 
-  init (&buffer);
-  /* Create the threads */
-  pthread_create (&th_a, NULL, producer, 0);
-  pthread_create (&th_b, NULL, consumer, 0);
+	init(&buffer);
+	/* Create the threads */
+	pthread_create(&th_a, NULL, producer, 0);
+	pthread_create(&th_b, NULL, consumer, 0);
 
-  c1 = exp(pid);
-  /* Wait until producer and consumer finish. */
-  pthread_join (th_a, &retval);
-  pthread_join (th_b, &retval);
-        return 0;
+	c1 = exp(pid);
+	/* Wait until producer and consumer finish. */
+	pthread_join(th_a, &retval);
+	pthread_join(th_b, &retval);
+	return 0;
 }
 
 #else /* Not __i386__ */
 
-int TST_TOTAL = 0;              /* Total number of test cases. */
+int TST_TOTAL = 0;		/* Total number of test cases. */
 
-int main() {
-        tst_resm(TCONF, "tcore only works on x86 systems ...");
-        tst_exit();
+int main()
+{
+	tst_resm(TCONF, "tcore only works on x86 systems ...");
+	tst_exit();
 }
 
 #endif /* __i386__ */
diff --git a/testcases/network/can/filter-tests/tst-filter.c b/testcases/network/can/filter-tests/tst-filter.c
index 6ec0a4b..1ffc893 100644
--- a/testcases/network/can/filter-tests/tst-filter.c
+++ b/testcases/network/can/filter-tests/tst-filter.c
@@ -60,10 +60,12 @@
 #include <linux/can/raw.h>
 
 #define ID 0x123
-#define TC 18 /* # of testcases */
+#define TC 18			/* # of testcases */
 
-const int rx_res[TC] = {4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1};
-const int rxbits_res[TC] = {4369, 4369, 4369, 4369, 17, 4352, 17, 4352, 257, 257, 4112, 4112, 1, 256, 16, 4096, 1, 256};
+const int rx_res[TC] = { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1 };
+const int rxbits_res[TC] =
+    { 4369, 4369, 4369, 4369, 17, 4352, 17, 4352, 257, 257, 4112, 4112, 1, 256,
+16, 4096, 1, 256 };
 
 canid_t calc_id(int testcase)
 {
@@ -95,7 +97,7 @@
 int main(int argc, char **argv)
 {
 	fd_set rdfs;
-        struct timeval tv;
+	struct timeval tv;
 	int s;
 	struct sockaddr_can addr;
 	struct can_filter rfilter;
@@ -139,13 +141,14 @@
 
 	for (testcase = 0; testcase < TC; testcase++) {
 
-		rfilter.can_id   = calc_id(testcase);
+		rfilter.can_id = calc_id(testcase);
 		rfilter.can_mask = calc_mask(testcase);
 		setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER,
 			   &rfilter, sizeof(rfilter));
 
-		printf("testcase %2d filters : can_id = 0x%08X can_mask = 0x%08X\n",
-		       testcase, rfilter.can_id, rfilter.can_mask);
+		printf
+		    ("testcase %2d filters : can_id = 0x%08X can_mask = 0x%08X\n",
+		     testcase, rfilter.can_id, rfilter.can_mask);
 
 		printf("testcase %2d sending patterns ... ", testcase);
 
@@ -185,9 +188,9 @@
 			FD_ZERO(&rdfs);
 			FD_SET(s, &rdfs);
 			tv.tv_sec = 0;
-			tv.tv_usec = 50000; /* 50ms timeout */
+			tv.tv_usec = 50000;	/* 50ms timeout */
 
-			ret = select(s+1, &rdfs, NULL, NULL, &tv);
+			ret = select(s + 1, &rdfs, NULL, NULL, &tv);
 			if (ret < 0) {
 				perror("select");
 				exit(1);
@@ -201,37 +204,48 @@
 					exit(1);
 				}
 				if ((frame.can_id & CAN_SFF_MASK) != ID) {
-					fprintf(stderr, "received wrong can_id!\n");
+					fprintf(stderr,
+						"received wrong can_id!\n");
 					exit(1);
 				}
 				if (frame.data[0] != testcase) {
-					fprintf(stderr, "received wrong testcase!\n");
+					fprintf(stderr,
+						"received wrong testcase!\n");
 					exit(1);
 				}
 
 				/* test & calc rxbits */
-				rxbitval = 1 << ((frame.can_id & (CAN_EFF_FLAG|CAN_RTR_FLAG|CAN_ERR_FLAG)) >> 28);
+				rxbitval =
+				    1 <<
+				    ((frame.
+				      can_id & (CAN_EFF_FLAG | CAN_RTR_FLAG |
+						CAN_ERR_FLAG)) >> 28);
 
 				/* only receive a rxbitval once */
 				if ((rxbits & rxbitval) == rxbitval) {
-					fprintf(stderr, "received rxbitval %d twice!\n", rxbitval);
+					fprintf(stderr,
+						"received rxbitval %d twice!\n",
+						rxbitval);
 					exit(1);
 				}
 				rxbits |= rxbitval;
 				rx++;
 
-				printf("testcase %2d rx : can_id = 0x%08X rx = %d rxbits = %d\n",
-				       testcase, frame.can_id, rx, rxbits);
+				printf
+				    ("testcase %2d rx : can_id = 0x%08X rx = %d rxbits = %d\n",
+				     testcase, frame.can_id, rx, rxbits);
 			}
 		}
 		/* rx timed out -> check the received results */
 		if (rx_res[testcase] != rx) {
-			fprintf(stderr, "wrong rx value in testcase %d : %d (expected %d)\n",
+			fprintf(stderr,
+				"wrong rx value in testcase %d : %d (expected %d)\n",
 				testcase, rx, rx_res[testcase]);
 			exit(1);
 		}
 		if (rxbits_res[testcase] != rxbits) {
-			fprintf(stderr, "wrong rxbits value in testcase %d : %d (expected %d)\n",
+			fprintf(stderr,
+				"wrong rxbits value in testcase %d : %d (expected %d)\n",
 				testcase, rxbits, rxbits_res[testcase]);
 			exit(1);
 		}
diff --git a/testcases/network/can/filter-tests/tst-rcv-own-msgs.c b/testcases/network/can/filter-tests/tst-rcv-own-msgs.c
index 593e9fb..808b11e 100644
--- a/testcases/network/can/filter-tests/tst-rcv-own-msgs.c
+++ b/testcases/network/can/filter-tests/tst-rcv-own-msgs.c
@@ -59,7 +59,6 @@
 #include <linux/can.h>
 #include <linux/can/raw.h>
 
-
 #define max(a,b) (a > b ? a : b)
 
 struct rxs {
@@ -71,7 +70,7 @@
 {
 	fd_set rdfs;
 	struct timeval tv;
-	int m = max(s,t)+1;
+	int m = max(s, t) + 1;
 	int have_rx = 1;
 	struct can_frame frame;
 	struct rxs rx;
@@ -92,7 +91,7 @@
 		FD_SET(s, &rdfs);
 		FD_SET(t, &rdfs);
 		tv.tv_sec = 0;
-		tv.tv_usec = 50000; /* 50ms timeout */
+		tv.tv_usec = 50000;	/* 50ms timeout */
 		have_rx = 0;
 
 		ret = select(m, &rdfs, NULL, NULL, &tv);
@@ -148,7 +147,6 @@
 	       loopback, recv_own_msgs);
 }
 
-
 int main(int argc, char **argv)
 {
 	int s, t;
diff --git a/testcases/network/lib6/asapi_01.c b/testcases/network/lib6/asapi_01.c
index f29e697..67874e5 100644
--- a/testcases/network/lib6/asapi_01.c
+++ b/testcases/network/lib6/asapi_01.c
@@ -47,183 +47,231 @@
 #include "usctest.h"
 #include "runcc.h"
 
-char *TCID="asapi_01";		/* Test program identifier.    */
+char *TCID = "asapi_01";	/* Test program identifier.    */
 
 void setup(void), cleanup(void);
 
 enum ttype { EXISTS, ALIAS, VALUE };
 
 struct ftent {
-	char	*ft_tname;		/* test name */
-	int	ft_type;		/* test type */
-	char	*ft_incl;		/* include file list */
-	char	*ft_struct;		/* structure name */
-	char	*ft_field;		/* field name */
-	char	*ft_offset;		/* field offset */
+	char *ft_tname;		/* test name */
+	int ft_type;		/* test type */
+	char *ft_incl;		/* include file list */
+	char *ft_struct;	/* structure name */
+	char *ft_field;		/* field name */
+	char *ft_offset;	/* field offset */
 	union {
-		char	*fu_value;	/* field size or value */
-		char	*fu_dname;	/* #define name */
+		char *fu_value;	/* field size or value */
+		char *fu_dname;	/* #define name */
 	} ftun;
 #define ft_value	ftun.fu_value
 #define ft_dname	ftun.fu_dname
 } ftab[] = {
 /* section 2.1 structure & field definitions */
-	{ "ip6_hdr un1_flow", EXISTS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_flow", "0", {"4"} },
-	{ "ip6_hdr ip6_flow", ALIAS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_flow", NULL, {"ip6_flow"} },
-	{ "ip6_hdr un1_plen", EXISTS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_plen", "4", {"2"} },
-	{ "ip6_hdr ip6_plen", ALIAS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_plen", "4", {"ip6_plen"} },
-	{ "ip6_hdr un1_nxt", EXISTS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_nxt", "6", {"1"} },
-	{ "ip6_hdr ip6_nxt", ALIAS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_nxt", NULL, {"ip6_nxt"} },
-	{ "ip6_hdr un1_hlim", EXISTS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_hlim", "7", {"1"} },
-	{ "ip6_hdr ip6_hlim", ALIAS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un1.ip6_un1_hlim", NULL, {"ip6_hlim"} },
-	{ "ip6_hdr un1_vfc", EXISTS, IP6_H, "ip6_hdr",
-		"ip6_ctlun.ip6_un2_vfc", "0",
-		{"1"} },
-	{ "ip6_hdr ip6_src", EXISTS, IP6_H, "ip6_hdr", "ip6_src",
-		"sizeof(struct ip6_hdrctl)",
-		{"sizeof(struct in6_addr)"} },
-	{ "ip6_hdr ip6_dst", EXISTS, IP6_H, "ip6_hdr", "ip6_dst",
-		"(sizeof(struct ip6_hdrctl)+sizeof(struct in6_addr))",
-		{"sizeof(struct in6_addr)"} },
+	{
+		"ip6_hdr un1_flow", EXISTS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_flow", "0", {
+	"4"}}, {
+		"ip6_hdr ip6_flow", ALIAS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_flow", NULL, {
+	"ip6_flow"}}, {
+		"ip6_hdr un1_plen", EXISTS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_plen", "4", {
+	"2"}}, {
+		"ip6_hdr ip6_plen", ALIAS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_plen", "4", {
+	"ip6_plen"}}, {
+		"ip6_hdr un1_nxt", EXISTS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_nxt", "6", {
+	"1"}}, {
+		"ip6_hdr ip6_nxt", ALIAS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_nxt", NULL, {
+	"ip6_nxt"}}, {
+		"ip6_hdr un1_hlim", EXISTS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_hlim", "7", {
+	"1"}}, {
+		"ip6_hdr ip6_hlim", ALIAS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un1.ip6_un1_hlim", NULL, {
+	"ip6_hlim"}}, {
+		"ip6_hdr un1_vfc", EXISTS, IP6_H, "ip6_hdr",
+		    "ip6_ctlun.ip6_un2_vfc", "0", {
+	"1"}}, {
+		"ip6_hdr ip6_src", EXISTS, IP6_H, "ip6_hdr", "ip6_src",
+		    "sizeof(struct ip6_hdrctl)", {
+	"sizeof(struct in6_addr)"}}, {
+		"ip6_hdr ip6_dst", EXISTS, IP6_H, "ip6_hdr", "ip6_dst",
+		    "(sizeof(struct ip6_hdrctl)+sizeof(struct in6_addr))", {
+	"sizeof(struct in6_addr)"}},
 /* section 2.2 structure and field definitions */
-	{ "IPPROTO_HOPOPTS", VALUE, IN_H, "IPPROTO_HOPOPTS",
-		NULL, NULL, {"0"} },
-	{ "IPPROTO_IPV6", VALUE, IN_H, "IPPROTO_IPV6",
-		NULL, NULL, {"41"} },
-	{ "IPPROTO_ROUTING", VALUE, IN_H, "IPPROTO_ROUTING",
-		NULL, NULL, {"43"} },
-	{ "IPPROTO_FRAGMENT", VALUE, IN_H, "IPPROTO_FRAGMENT",
-		NULL, NULL, {"44"} },
-	{ "IPPROTO_ESP", VALUE, IN_H, "IPPROTO_ESP",
-		NULL, NULL, {"50"} },
-	{ "IPPROTO_AH", VALUE, IN_H, "IPPROTO_AH",
-		NULL, NULL, {"51"} },
-	{ "IPPROTO_ICMPV6", VALUE, IN_H, "IPPROTO_ICMPV6",
-		NULL, NULL, {"58"} },
-	{ "IPPROTO_NONE", VALUE, IN_H, "IPPROTO_NONE",
-		NULL, NULL, {"59"} },
-	{ "IPPROTO_DSTOPTS", VALUE, IN_H, "IPPROTO_DSTOPTS",
-		NULL, NULL, {"60"} },
+	{
+		"IPPROTO_HOPOPTS", VALUE, IN_H, "IPPROTO_HOPOPTS", NULL, NULL, {
+	"0"}}, {
+		"IPPROTO_IPV6", VALUE, IN_H, "IPPROTO_IPV6", NULL, NULL, {
+	"41"}}, {
+		"IPPROTO_ROUTING", VALUE, IN_H, "IPPROTO_ROUTING", NULL, NULL, {
+	"43"}}, {
+		"IPPROTO_FRAGMENT", VALUE, IN_H, "IPPROTO_FRAGMENT", NULL, NULL, {
+	"44"}}, {
+		"IPPROTO_ESP", VALUE, IN_H, "IPPROTO_ESP", NULL, NULL, {
+	"50"}}, {
+		"IPPROTO_AH", VALUE, IN_H, "IPPROTO_AH", NULL, NULL, {
+	"51"}}, {
+		"IPPROTO_ICMPV6", VALUE, IN_H, "IPPROTO_ICMPV6", NULL, NULL, {
+	"58"}}, {
+		"IPPROTO_NONE", VALUE, IN_H, "IPPROTO_NONE", NULL, NULL, {
+	"59"}}, {
+		"IPPROTO_DSTOPTS", VALUE, IN_H, "IPPROTO_DSTOPTS", NULL, NULL, {
+	"60"}},
 /* ip6_hbh */
-	{ "ip6_hbh ip6h_nxt", EXISTS, IP6_H, "ip6_hbh",
-		"ip6h_nxt", "0", {"1"} },
-	{ "ip6_hbh ip6h_nxt", EXISTS, IP6_H, "ip6_hbh",
-		"ip6h_len", "1", {"1"} },
+	{
+		"ip6_hbh ip6h_nxt", EXISTS, IP6_H, "ip6_hbh", "ip6h_nxt", "0", {
+	"1"}}, {
+		"ip6_hbh ip6h_nxt", EXISTS, IP6_H, "ip6_hbh", "ip6h_len", "1", {
+	"1"}},
 /* ip6_dest */
-	{ "ip6_dest ip6d_nxt", EXISTS, IP6_H, "ip6_dest",
-		"ip6d_nxt", "0", {"1"} },
-	{ "ip6_dest ip6d_nxt", EXISTS, IP6_H, "ip6_dest",
-		"ip6d_len", "1", {"1"} },
+	{
+		"ip6_dest ip6d_nxt", EXISTS, IP6_H, "ip6_dest", "ip6d_nxt", "0", {
+	"1"}}, {
+		"ip6_dest ip6d_nxt", EXISTS, IP6_H, "ip6_dest", "ip6d_len", "1", {
+	"1"}},
 /* ip6_rthdr0 */
-	{ "ip6_rthdr0 ip6r0_nxt", EXISTS, IP6_H, "ip6_rthdr0",
-		"ip6r0_nxt", "0", {"1"} },
-	{ "ip6_rthdr0 ip6r0_len", EXISTS, IP6_H, "ip6_rthdr0",
-		"ip6r0_len", "1", {"1"} },
-	{ "ip6_rthdr0 ip6r0_type", EXISTS, IP6_H, "ip6_rthdr0",
-		"ip6r0_type", "2", {"1"} },
-	{ "ip6_rthdr0 ip6r0_segleft", EXISTS, IP6_H, "ip6_rthdr0",
-		"ip6r0_segleft", "3", {"1"} },
-	{ "ip6_rthdr0 ip6r0_reserved", EXISTS, IP6_H, "ip6_rthdr0",
-		"ip6r0_reserved", "4", {"1"} },
+	{
+		"ip6_rthdr0 ip6r0_nxt", EXISTS, IP6_H, "ip6_rthdr0",
+		    "ip6r0_nxt", "0", {
+	"1"}}, {
+		"ip6_rthdr0 ip6r0_len", EXISTS, IP6_H, "ip6_rthdr0",
+		    "ip6r0_len", "1", {
+	"1"}}, {
+		"ip6_rthdr0 ip6r0_type", EXISTS, IP6_H, "ip6_rthdr0",
+		    "ip6r0_type", "2", {
+	"1"}}, {
+		"ip6_rthdr0 ip6r0_segleft", EXISTS, IP6_H, "ip6_rthdr0",
+		    "ip6r0_segleft", "3", {
+	"1"}}, {
+		"ip6_rthdr0 ip6r0_reserved", EXISTS, IP6_H, "ip6_rthdr0",
+		    "ip6r0_reserved", "4", {
+	"1"}},
 /* ip6_frag */
-	{ "ip6_frag ip6f_nxt", EXISTS, IP6_H, "ip6_frag",
-		"ip6f_nxt", "0", {"1"} },
-	{ "ip6_frag ip6f_reserved", EXISTS, IP6_H, "ip6_frag",
-		"ip6f_reserved", "1", {"1"} },
-	{ "ip6_frag ip6f_offlg", EXISTS, IP6_H, "ip6_frag",
-		"ip6f_offlg", "2", {"2"} },
-	{ "ip6_frag ip6f_ident", EXISTS, IP6_H, "ip6_frag",
-		"ip6f_ident", "4", {"4"} },
-
-	{ "IP6F_OFF_MASK", VALUE, IP6_H, "IP6F_OFF_MASK",
-		NULL, NULL, {"htons(0xfff8)"} },
-	{ "IP6F_RESERVED_MASK", VALUE, IP6_H, "IP6F_RESERVED_MASK",
-		NULL, NULL, {"htons(0x0006)"} },
-	{ "IP6F_MORE_FRAG", VALUE, IP6_H, "IP6F_MORE_FRAG",
-		NULL, NULL, {"htons(0x0001)"} },
-	{ "IP6OPT_TYPE", VALUE, IP6_H, "IP6OPT_TYPE(0xff)",
-		NULL, NULL, {"0xc0"} },
-	{ "IP6OPT_TYPE_SKIP", VALUE, IP6_H, "IP6OPT_TYPE_SKIP",
-		NULL, NULL, {"0x00"} },
-	{ "IP6OPT_TYPE_DISCARD", VALUE, IP6_H, "IP6OPT_TYPE_DISCARD",
-		NULL, NULL, {"0x40"} },
-	{ "IP6OPT_TYPE_FORCEICMP", VALUE, IP6_H, "IP6OPT_TYPE_FORCEICMP",
-		NULL, NULL, {"0x80"} },
-	{ "IP6OPT_TYPE_ICMP", VALUE, IP6_H, "IP6OPT_TYPE_ICMP",
-		NULL, NULL, {"0xc0"} },
-	{ "IP6OPT_TYPE_MUTABLE", VALUE, IP6_H, "IP6OPT_TYPE_MUTABLE",
-		NULL, NULL, {"0x20"} },
-	{ "IP6OPT_PAD1", VALUE, IP6_H, "IP6OPT_PAD1",
-		NULL, NULL, {"0x00"} },
-	{ "IP6OPT_PADN", VALUE, IP6_H, "IP6OPT_PADN",
-		NULL, NULL, {"0x01"} },
-	{ "IP6OPT_JUMBO", VALUE, IP6_H, "IP6OPT_JUMBO",
-		NULL, NULL, {"0xc2"} },
-	{ "IP6OPT_NSAP_ADDR", VALUE, IP6_H, "IP6OPT_NSAP_ADDR",
-		NULL, NULL, {"0xc3"} },
-	{ "IP6OPT_TUNNEL_LIMIT", VALUE, IP6_H, "IP6OPT_TUNNEL_LIMIT",
-		NULL, NULL, {"0x04"} },
-	{ "IP6OPT_ROUTER_ALERT", VALUE, IP6_H, "IP6OPT_ROUTER_ALERT",
-		NULL, NULL, {"0x05"} },
+	{
+		"ip6_frag ip6f_nxt", EXISTS, IP6_H, "ip6_frag", "ip6f_nxt", "0", {
+	"1"}}, {
+		"ip6_frag ip6f_reserved", EXISTS, IP6_H, "ip6_frag",
+		    "ip6f_reserved", "1", {
+	"1"}}, {
+		"ip6_frag ip6f_offlg", EXISTS, IP6_H, "ip6_frag",
+		    "ip6f_offlg", "2", {
+	"2"}}, {
+		"ip6_frag ip6f_ident", EXISTS, IP6_H, "ip6_frag",
+		    "ip6f_ident", "4", {
+	"4"}}, {
+		"IP6F_OFF_MASK", VALUE, IP6_H, "IP6F_OFF_MASK", NULL, NULL, {
+	"htons(0xfff8)"}}, {
+		"IP6F_RESERVED_MASK", VALUE, IP6_H, "IP6F_RESERVED_MASK",
+		    NULL, NULL, {
+	"htons(0x0006)"}}, {
+		"IP6F_MORE_FRAG", VALUE, IP6_H, "IP6F_MORE_FRAG", NULL, NULL, {
+	"htons(0x0001)"}}, {
+		"IP6OPT_TYPE", VALUE, IP6_H, "IP6OPT_TYPE(0xff)", NULL, NULL, {
+	"0xc0"}}, {
+		"IP6OPT_TYPE_SKIP", VALUE, IP6_H, "IP6OPT_TYPE_SKIP",
+		    NULL, NULL, {
+	"0x00"}}, {
+		"IP6OPT_TYPE_DISCARD", VALUE, IP6_H, "IP6OPT_TYPE_DISCARD",
+		    NULL, NULL, {
+	"0x40"}}, {
+		"IP6OPT_TYPE_FORCEICMP", VALUE, IP6_H, "IP6OPT_TYPE_FORCEICMP",
+		    NULL, NULL, {
+	"0x80"}}, {
+		"IP6OPT_TYPE_ICMP", VALUE, IP6_H, "IP6OPT_TYPE_ICMP",
+		    NULL, NULL, {
+	"0xc0"}}, {
+		"IP6OPT_TYPE_MUTABLE", VALUE, IP6_H, "IP6OPT_TYPE_MUTABLE",
+		    NULL, NULL, {
+	"0x20"}}, {
+		"IP6OPT_PAD1", VALUE, IP6_H, "IP6OPT_PAD1", NULL, NULL, {
+	"0x00"}}, {
+		"IP6OPT_PADN", VALUE, IP6_H, "IP6OPT_PADN", NULL, NULL, {
+	"0x01"}}, {
+		"IP6OPT_JUMBO", VALUE, IP6_H, "IP6OPT_JUMBO", NULL, NULL, {
+	"0xc2"}}, {
+		"IP6OPT_NSAP_ADDR", VALUE, IP6_H, "IP6OPT_NSAP_ADDR",
+		    NULL, NULL, {
+	"0xc3"}}, {
+		"IP6OPT_TUNNEL_LIMIT", VALUE, IP6_H, "IP6OPT_TUNNEL_LIMIT",
+		    NULL, NULL, {
+	"0x04"}}, {
+		"IP6OPT_ROUTER_ALERT", VALUE, IP6_H, "IP6OPT_ROUTER_ALERT",
+		    NULL, NULL, {
+	"0x05"}},
 /* ip6_opt_jumbo */
-	{ "ip6_opt_jumbo ip6oj_type", EXISTS, IP6_H, "ip6_opt_jumbo",
-		"ip6oj_type", "0", {"1"} },
-	{ "ip6_opt_jumbo ip6oj_len", EXISTS, IP6_H, "ip6_opt_jumbo",
-		"ip6oj_len", "1", {"1"} },
-	{ "ip6_opt_jumbo ip6oj_jumbo_len element", EXISTS, IP6_H,
-		"ip6_opt_jumbo", "ip6oj_jumbo_len[0]", "2", {"1"} },
-	{ "ip6_opt_jumbo ip6oj_jumbo_len array", EXISTS, IP6_H,
-		"ip6_opt_jumbo", "ip6oj_jumbo_len", "2", {"4"} },
+	{
+		"ip6_opt_jumbo ip6oj_type", EXISTS, IP6_H, "ip6_opt_jumbo",
+		    "ip6oj_type", "0", {
+	"1"}}, {
+		"ip6_opt_jumbo ip6oj_len", EXISTS, IP6_H, "ip6_opt_jumbo",
+		    "ip6oj_len", "1", {
+	"1"}}, {
+		"ip6_opt_jumbo ip6oj_jumbo_len element", EXISTS, IP6_H,
+		    "ip6_opt_jumbo", "ip6oj_jumbo_len[0]", "2", {
+	"1"}}, {
+		"ip6_opt_jumbo ip6oj_jumbo_len array", EXISTS, IP6_H,
+		    "ip6_opt_jumbo", "ip6oj_jumbo_len", "2", {
+	"4"}},
 /* ip6_opt_nsap */
-	{ "ip6_opt_nsap ip6on_type", EXISTS, IP6_H, "ip6_opt_nsap",
-		"ip6on_type", "0", {"1"} },
-	{ "ip6_opt_nsap ip6on_len", EXISTS, IP6_H, "ip6_opt_nsap",
-		"ip6on_len", "1", {"1"} },
-	{ "ip6_opt_nsap ip6on_src_nsap_len", EXISTS, IP6_H, "ip6_opt_nsap",
-		"ip6on_src_nsap_len", "2", {"1"} },
-	{ "ip6_opt_nsap ip6on_dst_nsap_len", EXISTS, IP6_H, "ip6_opt_nsap",
-		"ip6on_dst_nsap_len", "3", {"1"} },
+	{
+		"ip6_opt_nsap ip6on_type", EXISTS, IP6_H, "ip6_opt_nsap",
+		    "ip6on_type", "0", {
+	"1"}}, {
+		"ip6_opt_nsap ip6on_len", EXISTS, IP6_H, "ip6_opt_nsap",
+		    "ip6on_len", "1", {
+	"1"}}, {
+		"ip6_opt_nsap ip6on_src_nsap_len", EXISTS, IP6_H,
+		    "ip6_opt_nsap", "ip6on_src_nsap_len", "2", {
+	"1"}}, {
+		"ip6_opt_nsap ip6on_dst_nsap_len", EXISTS, IP6_H,
+		    "ip6_opt_nsap", "ip6on_dst_nsap_len", "3", {
+	"1"}},
 /* ip6_opt_tunnel */
-	{ "ip6_opt_tunnel ip6ot_type", EXISTS, IP6_H, "ip6_opt_tunnel",
-		"ip6ot_type", "0", {"1"} },
-	{ "ip6_opt_tunnel ip6ot_len", EXISTS, IP6_H, "ip6_opt_tunnel",
-		"ip6ot_len", "1", {"1"} },
-	{ "ip6_opt_tunnel ip6ot_encap_limit", EXISTS, IP6_H, "ip6_opt_tunnel",
-		"ip6ot_encap_limit", "2", {"1"} },
+	{
+		"ip6_opt_tunnel ip6ot_type", EXISTS, IP6_H, "ip6_opt_tunnel",
+		    "ip6ot_type", "0", {
+	"1"}}, {
+		"ip6_opt_tunnel ip6ot_len", EXISTS, IP6_H, "ip6_opt_tunnel",
+		    "ip6ot_len", "1", {
+	"1"}}, {
+		"ip6_opt_tunnel ip6ot_encap_limit", EXISTS, IP6_H,
+		    "ip6_opt_tunnel", "ip6ot_encap_limit", "2", {
+	"1"}},
 /* ip6_opt_router */
-	{ "ip6_opt_router ip6or_type", EXISTS, IP6_H, "ip6_opt_router",
-		"ip6or_type", "0", {"1"} },
-	{ "ip6_opt_router ip6or_len", EXISTS, IP6_H, "ip6_opt_router",
-		"ip6or_len", "1", {"1"} },
-	{ "ip6_opt_router ip6or_value element", EXISTS, IP6_H,
-		"ip6_opt_router", "ip6or_value[0]", "2", {"1"} },
-	{ "ip6_opt_router ip6or_value array", EXISTS, IP6_H, "ip6_opt_router",
-		"ip6or_value", "2", {"2"} },
+	{
+		"ip6_opt_router ip6or_type", EXISTS, IP6_H, "ip6_opt_router",
+		    "ip6or_type", "0", {
+	"1"}}, {
+		"ip6_opt_router ip6or_len", EXISTS, IP6_H, "ip6_opt_router",
+		    "ip6or_len", "1", {
+	"1"}}, {
+		"ip6_opt_router ip6or_value element", EXISTS, IP6_H,
+		    "ip6_opt_router", "ip6or_value[0]", "2", {
+	"1"}}, {
+		"ip6_opt_router ip6or_value array", EXISTS, IP6_H,
+		    "ip6_opt_router", "ip6or_value", "2", {
+	"2"}},
 /* IP6_ALERT_* definitions */
-	{ "IP6_ALERT_MLD", VALUE, IP6_H, "IP6_ALERT_MLD",
-		NULL, NULL, {"0"} },
-	{ "IP6_ALERT_RSVP", VALUE, IP6_H, "IP6_ALERT_RSVP",
-		NULL, NULL, {"htons(1)"} },
-	{ "IP6_ALERT_AN", VALUE, IP6_H, "IP6_ALERT_AN",
-		NULL, NULL, {"htons(2)"} },
-};
+	{
+		"IP6_ALERT_MLD", VALUE, IP6_H, "IP6_ALERT_MLD", NULL, NULL, {
+	"0"}}, {
+		"IP6_ALERT_RSVP", VALUE, IP6_H, "IP6_ALERT_RSVP", NULL, NULL, {
+	"htons(1)"}}, {
+		"IP6_ALERT_AN", VALUE, IP6_H, "IP6_ALERT_AN", NULL, NULL, {
+"htons(2)"}},};
 
 #define FTCOUNT	(sizeof(ftab)/sizeof(ftab[0]))
 
 int TST_TOTAL = FTCOUNT;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	i, lc;
+	int i, lc;
 	char *msg;
 
 	/* Parse standard options given to run the test. */
@@ -235,25 +283,26 @@
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		for (i=0; i<FTCOUNT; ++i) {
+		for (i = 0; i < FTCOUNT; ++i) {
 			switch (ftab[i].ft_type) {
 			case EXISTS:
 				structcheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_offset, ftab[i].ft_value);
+					    ftab[i].ft_struct, ftab[i].ft_field,
+					    ftab[i].ft_offset,
+					    ftab[i].ft_value);
 				break;
 			case ALIAS:
 				aliascheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_field,
+					   ftab[i].ft_dname);
 				break;
 			case VALUE:
 				valuecheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_dname);
 				break;
 			default:
 				tst_resm(TBROK, "invalid type %d",
-					ftab[i].ft_type);
+					 ftab[i].ft_type);
 				break;
 			}
 		}
@@ -264,14 +313,12 @@
 	tst_exit();
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
diff --git a/testcases/network/lib6/asapi_02.c b/testcases/network/lib6/asapi_02.c
index 6d1de2b..7b0f668 100644
--- a/testcases/network/lib6/asapi_02.c
+++ b/testcases/network/lib6/asapi_02.c
@@ -47,285 +47,343 @@
 #include "usctest.h"
 #include "runcc.h"
 
-char *TCID="asapi_02";		/* Test program identifier.    */
+char *TCID = "asapi_02";	/* Test program identifier.    */
 
 void setup(void), cleanup(void);
 
 enum ttype { EXISTS, ALIAS, VALUE };
 
 struct ftent {
-	char	*ft_tname;		/* test name */
-	int	ft_type;		/* test type */
-	char	*ft_incl;		/* include file list */
-	char	*ft_struct;		/* structure name */
-	char	*ft_field;		/* field name */
-	char	*ft_offset;		/* field offset */
+	char *ft_tname;		/* test name */
+	int ft_type;		/* test type */
+	char *ft_incl;		/* include file list */
+	char *ft_struct;	/* structure name */
+	char *ft_field;		/* field name */
+	char *ft_offset;	/* field offset */
 	union {
-		char	*fu_value;	/* field size or value */
-		char	*fu_dname;	/* #define name */
+		char *fu_value;	/* field size or value */
+		char *fu_dname;	/* #define name */
 	} ftun;
 #define ft_value	ftun.fu_value
 #define ft_dname	ftun.fu_dname
 } ftab[] = {
 /* Section 2.2, icmp6_hdr & defines */
-	{ "icmp6_hdr icmp6_type", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_type", "0", {"1"} },
-	{ "icmp6_hdr icmp6_code", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_code", "1", {"1"} },
-	{ "icmp6_hdr icmp6_cksum", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_cksum", "2", {"2"} },
-	{ "icmp6_hdr icmp6_un_data32 element", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data32[0]", "4", {"4"} },
-	{ "icmp6_hdr icmp6_un_data32 array", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data32", "4", {"4"} },
-	{ "icmp6_hdr icmp6_un_data16 element", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16[0]", "4", {"2"} },
-	{ "icmp6_hdr icmp6_un_data16 array", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16", "4", {"4"} },
-	{ "icmp6_hdr icmp6_un_data8 element", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data8[0]", "4", {"1"} },
-	{ "icmp6_hdr icmp6_un_data8 array", EXISTS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data8", "4", {"4"} },
+	{
+		"icmp6_hdr icmp6_type", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_type", "0", {
+	"1"}}, {
+		"icmp6_hdr icmp6_code", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_code", "1", {
+	"1"}}, {
+		"icmp6_hdr icmp6_cksum", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_cksum", "2", {
+	"2"}}, {
+		"icmp6_hdr icmp6_un_data32 element", EXISTS, ICMP6_H,
+		    "icmp6_hdr", "icmp6_dataun.icmp6_un_data32[0]", "4", {
+	"4"}}, {
+		"icmp6_hdr icmp6_un_data32 array", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data32", "4", {
+	"4"}}, {
+		"icmp6_hdr icmp6_un_data16 element", EXISTS, ICMP6_H,
+		    "icmp6_hdr", "icmp6_dataun.icmp6_un_data16[0]", "4", {
+	"2"}}, {
+		"icmp6_hdr icmp6_un_data16 array", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data16", "4", {
+	"4"}}, {
+		"icmp6_hdr icmp6_un_data8 element", EXISTS, ICMP6_H,
+		    "icmp6_hdr", "icmp6_dataun.icmp6_un_data8[0]", "4", {
+	"1"}}, {
+		"icmp6_hdr icmp6_un_data8 array", EXISTS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data8", "4", {
+	"4"}},
 /* icmp6_hdr definitions */
-	{ "icmp6_hdr icmp6_data32 define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data32", NULL, {"icmp6_data32"} },
-	{ "icmp6_hdr icmp6_data16 define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16", NULL, {"icmp6_data16"} },
-	{ "icmp6_hdr icmp6_data8 define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data8", NULL, {"icmp6_data8"} },
-	{ "icmp6_hdr icmp6_pptr define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data32[0]", NULL, {"icmp6_pptr"} },
-	{ "icmp6_hdr icmp6_mtu define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data32[0]", NULL, {"icmp6_mtu"} },
-	{ "icmp6_hdr icmp6_id define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16[0]", NULL, {"icmp6_id"} },
-	{ "icmp6_hdr icmp6_seq define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16[1]", NULL, {"icmp6_seq"} },
-	{ "icmp6_hdr icmp6_maxdelay define", ALIAS, ICMP6_H, "icmp6_hdr",
-		"icmp6_dataun.icmp6_un_data16[0]", NULL,
-		{"icmp6_maxdelay"} },
+	{
+		"icmp6_hdr icmp6_data32 define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data32", NULL, {
+	"icmp6_data32"}}, {
+		"icmp6_hdr icmp6_data16 define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data16", NULL, {
+	"icmp6_data16"}}, {
+		"icmp6_hdr icmp6_data8 define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data8", NULL, {
+	"icmp6_data8"}}, {
+		"icmp6_hdr icmp6_pptr define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data32[0]", NULL, {
+	"icmp6_pptr"}}, {
+		"icmp6_hdr icmp6_mtu define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data32[0]", NULL, {
+	"icmp6_mtu"}}, {
+		"icmp6_hdr icmp6_id define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data16[0]", NULL, {
+	"icmp6_id"}}, {
+		"icmp6_hdr icmp6_seq define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data16[1]", NULL, {
+	"icmp6_seq"}}, {
+		"icmp6_hdr icmp6_maxdelay define", ALIAS, ICMP6_H, "icmp6_hdr",
+		    "icmp6_dataun.icmp6_un_data16[0]", NULL, {
+	"icmp6_maxdelay"}},
 /* Section 2.2.1 ICMPv6 Type and Code Values */
-	{ "ICMP6_DST_UNREACH", VALUE, ICMP6_H, "ICMP6_DST_UNREACH",
-		NULL, NULL, {"1"} },
-	{ "ICMP6_PACKET_TOO_BIG", VALUE,ICMP6_H, "ICMP6_PACKET_TOO_BIG",
-		NULL, NULL, {"2"} },
-	{ "ICMP6_TIME_EXCEEDED", VALUE, ICMP6_H, "ICMP6_TIME_EXCEEDED",
-		NULL, NULL, {"3"} },
-	{ "ICMP6_PARAM_PROB", VALUE, ICMP6_H, "ICMP6_PARAM_PROB",
-		NULL, NULL, {"4"} },
-	{ "ICMP6_INFOMSG_MASK", VALUE, ICMP6_H, "ICMP6_INFOMSG_MASK",
-		NULL, NULL, {"0x80"} },
-	{ "ICMP6_ECHO_REQUEST", VALUE, ICMP6_H, "ICMP6_ECHO_REQUEST",
-		NULL, NULL, {"128"} },
-	{ "ICMP6_ECHO_REPLY", VALUE, ICMP6_H, "ICMP6_ECHO_REPLY",
-		NULL, NULL, {"129"} },
-	{ "ICMP6_DST_UNREACH_NOROUTE", VALUE, ICMP6_H,
-		"ICMP6_DST_UNREACH_NOROUTE", NULL, NULL, {"0"} },
-	{ "ICMP6_DST_UNREACH_ADMIN", VALUE, ICMP6_H,
-		"ICMP6_DST_UNREACH_ADMIN", NULL, NULL, {"1"} },
-	{ "ICMP6_DST_UNREACH_BEYONDSCOPE", VALUE, ICMP6_H,
-		"ICMP6_DST_UNREACH_BEYONDSCOPE", NULL, NULL, {"2"} },
-	{ "ICMP6_DST_UNREACH_ADDR", VALUE, ICMP6_H,
-		"ICMP6_DST_UNREACH_ADDR", NULL, NULL, {"3"} },
-	{ "ICMP6_DST_UNREACH_NOPORT", VALUE, ICMP6_H,
-		"ICMP6_DST_UNREACH_NOPORT", NULL, NULL, {"4"} },
-	{ "ICMP6_TIME_EXCEED_TRANSIT", VALUE, ICMP6_H,
-		"ICMP6_TIME_EXCEED_TRANSIT", NULL, NULL, {"0"} },
-	{ "ICMP6_TIME_EXCEED_REASSEMBLY", VALUE, ICMP6_H,
-		"ICMP6_TIME_EXCEED_REASSEMBLY", NULL, NULL, {"1"} },
-	{ "ICMP6_PARAMPROB_HEADER", VALUE, ICMP6_H,
-		"ICMP6_PARAMPROB_HEADER", NULL, NULL, {"0"} },
-	{ "ICMP6_PARAMPROB_NEXTHEADER", VALUE, ICMP6_H,
-		"ICMP6_PARAMPROB_NEXTHEADER", NULL, NULL, {"1"} },
-	{ "ICMP6_PARAMPROB_OPTION", VALUE, ICMP6_H,
-		"ICMP6_PARAMPROB_OPTION", NULL, NULL, {"2"} },
+	{
+		"ICMP6_DST_UNREACH", VALUE, ICMP6_H, "ICMP6_DST_UNREACH",
+		    NULL, NULL, {
+	"1"}}, {
+		"ICMP6_PACKET_TOO_BIG", VALUE, ICMP6_H, "ICMP6_PACKET_TOO_BIG",
+		    NULL, NULL, {
+	"2"}}, {
+		"ICMP6_TIME_EXCEEDED", VALUE, ICMP6_H, "ICMP6_TIME_EXCEEDED",
+		    NULL, NULL, {
+	"3"}}, {
+		"ICMP6_PARAM_PROB", VALUE, ICMP6_H, "ICMP6_PARAM_PROB",
+		    NULL, NULL, {
+	"4"}}, {
+		"ICMP6_INFOMSG_MASK", VALUE, ICMP6_H, "ICMP6_INFOMSG_MASK",
+		    NULL, NULL, {
+	"0x80"}}, {
+		"ICMP6_ECHO_REQUEST", VALUE, ICMP6_H, "ICMP6_ECHO_REQUEST",
+		    NULL, NULL, {
+	"128"}}, {
+		"ICMP6_ECHO_REPLY", VALUE, ICMP6_H, "ICMP6_ECHO_REPLY",
+		    NULL, NULL, {
+	"129"}}, {
+		"ICMP6_DST_UNREACH_NOROUTE", VALUE, ICMP6_H,
+		    "ICMP6_DST_UNREACH_NOROUTE", NULL, NULL, {
+	"0"}}, {
+		"ICMP6_DST_UNREACH_ADMIN", VALUE, ICMP6_H,
+		    "ICMP6_DST_UNREACH_ADMIN", NULL, NULL, {
+	"1"}}, {
+		"ICMP6_DST_UNREACH_BEYONDSCOPE", VALUE, ICMP6_H,
+		    "ICMP6_DST_UNREACH_BEYONDSCOPE", NULL, NULL, {
+	"2"}}, {
+		"ICMP6_DST_UNREACH_ADDR", VALUE, ICMP6_H,
+		    "ICMP6_DST_UNREACH_ADDR", NULL, NULL, {
+	"3"}}, {
+		"ICMP6_DST_UNREACH_NOPORT", VALUE, ICMP6_H,
+		    "ICMP6_DST_UNREACH_NOPORT", NULL, NULL, {
+	"4"}}, {
+		"ICMP6_TIME_EXCEED_TRANSIT", VALUE, ICMP6_H,
+		    "ICMP6_TIME_EXCEED_TRANSIT", NULL, NULL, {
+	"0"}}, {
+		"ICMP6_TIME_EXCEED_REASSEMBLY", VALUE, ICMP6_H,
+		    "ICMP6_TIME_EXCEED_REASSEMBLY", NULL, NULL, {
+	"1"}}, {
+		"ICMP6_PARAMPROB_HEADER", VALUE, ICMP6_H,
+		    "ICMP6_PARAMPROB_HEADER", NULL, NULL, {
+	"0"}}, {
+		"ICMP6_PARAMPROB_NEXTHEADER", VALUE, ICMP6_H,
+		    "ICMP6_PARAMPROB_NEXTHEADER", NULL, NULL, {
+	"1"}}, {
+		"ICMP6_PARAMPROB_OPTION", VALUE, ICMP6_H,
+		    "ICMP6_PARAMPROB_OPTION", NULL, NULL, {
+	"2"}},
 /* section 2.2.2, Neighbor Discovery */
-	{ "ND_ROUTER_SOLICIT", VALUE, ICMP6_H, "ND_ROUTER_SOLICIT",
-		NULL, NULL, {"133"} },
-	{ "ND_ROUTER_ADVERT", VALUE, ICMP6_H, "ND_ROUTER_ADVERT",
-		NULL, NULL, {"134"} },
-	{ "ND_NEIGHBOR_SOLICIT", VALUE, ICMP6_H, "ND_NEIGHBOR_SOLICIT",
-		NULL, NULL, {"135"} },
-	{ "ND_NEIGHBOR_ADVERT", VALUE, ICMP6_H, "ND_NEIGHBOR_ADVERT",
-		NULL, NULL, {"136"} },
-	{ "ND_REDIRECT", VALUE, ICMP6_H, "ND_REDIRECT",
-		NULL, NULL, {"137"} },
-
-	{ "nd_router_solicit nd_rs_hdr", EXISTS, ICMP6_H, "nd_router_solicit",
-		"nd_rs_hdr", "0", {"sizeof(struct icmp6_hdr)"} },
-	{ "nd_router_solicit nd_rs_type define", ALIAS, ICMP6_H,
-		"nd_router_solicit", "nd_rs_hdr.icmp6_type",
-		NULL, {"nd_rs_type"} },
-	{ "nd_router_solicit nd_rs_code define", ALIAS, ICMP6_H,
-		"nd_router_solicit", "nd_rs_hdr.icmp6_code",
-		NULL, {"nd_rs_code"} },
-	{ "nd_router_solicit nd_rs_cksum define", ALIAS, ICMP6_H,
-		"nd_router_solicit", "nd_rs_hdr.icmp6_cksum",
-		NULL, {"nd_rs_cksum"} },
-	{ "nd_router_solicit nd_rs_reserved define", ALIAS, ICMP6_H,
-		"nd_router_solicit", "nd_rs_hdr.icmp6_data32[0]",
-		NULL, {"nd_rs_reserved"} },
-
-	{ "nd_router_advert nd_ra_hdr", EXISTS, ICMP6_H, "nd_router_advert",
-		"nd_ra_hdr", "0", {"sizeof(struct icmp6_hdr)"} },
-	{ "nd_router_advert nd_ra_reachable", EXISTS, ICMP6_H,
-		"nd_router_advert", "nd_ra_reachable",
-		"sizeof(struct icmp6_hdr)", {"4"} },
-	{ "nd_router_advert nd_ra_retransmit", EXISTS, ICMP6_H,
-		"nd_router_advert", "nd_ra_retransmit",
-		"sizeof(struct icmp6_hdr)+4", {"4"} },
-	{ "nd_router_advert nd_ra_type define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_type",
-		NULL, {"nd_ra_type"} },
-	{ "nd_router_advert nd_ra_code define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_code",
-		NULL, {"nd_ra_code"} },
-	{ "nd_router_advert nd_ra_cksum define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_cksum",
-		NULL, {"nd_ra_cksum"} },
-	{ "nd_router_advert nd_ra_curhoplimit define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_data8[0]",
-		NULL, {"nd_ra_curhoplimit"} },
-	{ "nd_router_advert nd_ra_flags_reserved define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_data8[1]",
-		NULL, {"nd_ra_flags_reserved"} },
-	{ "ND_RA_FLAG_MANAGED", VALUE, ICMP6_H, "ND_RA_FLAG_MANAGED",
-		NULL, NULL, {"0x80"} },
-	{ "ND_RA_FLAG_OTHER", VALUE, ICMP6_H, "ND_RA_FLAG_OTHER",
-		NULL, NULL, {"0x40"} },
-	{ "nd_router_advert nd_ra_router_lifetime define", ALIAS, ICMP6_H,
-		"nd_router_advert", "nd_ra_hdr.icmp6_data16[1]",
-		NULL, {"nd_ra_router_lifetime"} },
-
-	{ "nd_neighbor_solicit nd_ns_hdr", EXISTS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_hdr",
-		"0", {"sizeof(struct icmp6_hdr)"} },
-	{ "nd_neighbor_solicit nd_ns_target", EXISTS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_target",
-		"sizeof(struct icmp6_hdr)",
-		{"sizeof(struct in6_addr)"} },
-	{ "nd_neighbor_solicit nd_ns_type define", ALIAS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_hdr.icmp6_type",
-		NULL, {"nd_ns_type"} },
-	{ "nd_neighbor_solicit nd_ns_code define", ALIAS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_hdr.icmp6_code",
-		NULL, {"nd_ns_code"} },
-	{ "nd_neighbor_solicit nd_ns_cksum define", ALIAS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_hdr.icmp6_cksum",
-		NULL, {"nd_ns_cksum"} },
-	{ "nd_neighbor_solicit nd_ns_reserved define", ALIAS, ICMP6_H,
-		"nd_neighbor_solicit", "nd_ns_hdr.icmp6_data32[0]",
-		NULL, {"nd_ns_reserved"} },
-
-	{ "nd_neighbor_advert nd_na_hdr", EXISTS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr",
-		"0", {"sizeof(struct icmp6_hdr)"} },
-	{ "nd_neighbor_advert nd_na_target", EXISTS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_target",
-		"sizeof(struct icmp6_hdr)",
-		{"sizeof(struct in6_addr)"} },
-	{ "nd_neighbor_advert nd_na_type define", ALIAS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr.icmp6_type",
-		NULL, {"nd_na_type"} },
-	{ "nd_neighbor_advert nd_na_code define", ALIAS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr.icmp6_code",
-		NULL, {"nd_na_code"} },
-	{ "nd_neighbor_advert nd_na_cksum define", ALIAS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr.icmp6_cksum",
-		NULL, {"nd_na_cksum"} },
-	{ "nd_neighbor_advert nd_na_flags_reserved define", ALIAS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr.icmp6_data32[0]",
-		NULL, {"nd_na_flags_reserved"} },
-
-	{ "ND_NA_FLAG_ROUTER", VALUE, ICMP6_H, "ND_NA_FLAG_ROUTER",
-		NULL, NULL, {"htonl(0x80000000)"} },
-	{ "ND_NA_FLAG_SOLICITED", VALUE, ICMP6_H, "ND_NA_FLAG_SOLICITED",
-		NULL, NULL, {"htonl(0x40000000)"} },
-	{ "ND_NA_FLAG_OVERRIDE", VALUE, ICMP6_H, "ND_NA_FLAG_OVERRIDE",
-		NULL, NULL, {"htonl(0x20000000)"} },
-
-	{ "nd_redirect nd_rd_hdr", EXISTS, ICMP6_H, "nd_redirect", "nd_rd_hdr",
-		"0", {"sizeof(struct icmp6_hdr)"} },
-	{ "nd_redirect nd_rd_target", EXISTS, ICMP6_H,
-		"nd_redirect", "nd_rd_target", "sizeof(struct icmp6_hdr)",
-		{"sizeof(struct in6_addr)"} },
-	{ "nd_redirect nd_rd_dst", EXISTS, ICMP6_H, "nd_redirect",
-		"nd_rd_dst", "sizeof(struct icmp6_hdr)+sizeof(struct in6_addr)",
-		{"sizeof(struct in6_addr)"} },
-	{ "nd_redirect nd_rd_type define", ALIAS, ICMP6_H,
-		"nd_neighbor_advert", "nd_na_hdr.icmp6_data32[0]",
-		NULL, {"nd_na_flags_reserved"} },
-
-	{ "nd_opt_hdr nd_rd_hdr", EXISTS, ICMP6_H, "nd_opt_hdr", "nd_opt_type",
-		"0", {"1"} },
-	{ "nd_opt_hdr nd_rd_hdr", EXISTS, ICMP6_H, "nd_opt_hdr", "nd_opt_len",
-		"1", {"1"} },
-	{ "ND_OPT_SOURCE_LINKADDR", VALUE, ICMP6_H, "ND_OPT_SOURCE_LINKADDR",
-		NULL, NULL, {"1"} },
-	{ "ND_OPT_TARGET_LINKADDR", VALUE, ICMP6_H, "ND_OPT_TARGET_LINKADDR",
-		NULL, NULL, {"2"} },
-	{ "ND_OPT_PREFIX_INFORMATION", VALUE, ICMP6_H,
-		"ND_OPT_PREFIX_INFORMATION", NULL, NULL, {"3"} },
-	{ "ND_OPT_REDIRECTED_HEADER", VALUE, ICMP6_H,
-		"ND_OPT_REDIRECTED_HEADER", NULL, NULL, {"4"} },
-	{ "ND_OPT_MTU", VALUE, ICMP6_H, "ND_OPT_MTU", NULL, NULL, {"5"} },
-
-	{ "nd_opt_prefix_info nd_opt_pi_type", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_type",
-		"0", {"1"} },
-	{ "nd_opt_prefix_info nd_opt_pi_len", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_len",
-		"1", {"1"} },
-	{ "nd_opt_prefix_info nd_opt_pi_prefix_len", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_prefix_len",
-		"2", {"1"} },
-	{ "nd_opt_prefix_info nd_opt_pi_flags_reserved", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_flags_reserved",
-		"3", {"1"} },
-	{ "nd_opt_prefix_info nd_opt_pi_valid_time", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_valid_time",
-		"4", {"4"} },
-	{ "nd_opt_prefix_info nd_opt_pi_preferred_time", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_preferred_time",
-		"8", {"4"} },
-	{ "nd_opt_prefix_info nd_opt_pi_reserved2", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_reserved2",
-		"12", {"4"} },
-	{ "nd_opt_prefix_info nd_opt_pi_prefix", EXISTS, ICMP6_H,
-		"nd_opt_prefix_info", "nd_opt_pi_prefix",
-		"16", {"sizeof(struct in6_addr)"} },
-	{ "ND_OPT_PI_FLAG_ONLINK", VALUE, ICMP6_H, "ND_OPT_PI_FLAG_ONLINK",
-		NULL, NULL, {"0x80"} },
-	{ "ND_OPT_PI_FLAG_AUTO", VALUE, ICMP6_H, "ND_OPT_PI_FLAG_AUTO",
-		NULL, NULL, {"0x40"} },
-
-	{ "nd_opt_rd_hdr nd_opt_rh_type", EXISTS, ICMP6_H, "nd_opt_rd_hdr",
-		"nd_opt_rh_type", "0", {"1"} },
-	{ "nd_opt_rd_hdr nd_opt_rh_len", EXISTS, ICMP6_H, "nd_opt_rd_hdr",
-		"nd_opt_rh_len", "1", {"1"} },
-	{ "nd_opt_rd_hdr nd_opt_rh_reserved1", EXISTS, ICMP6_H, "nd_opt_rd_hdr",
-		"nd_opt_rh_reserved1", "2", {"2"} },
-	{ "nd_opt_rd_hdr nd_opt_rh_reserved2", EXISTS, ICMP6_H, "nd_opt_rd_hdr",
-		"nd_opt_rh_reserved2", "4", {"4"} },
-
-	{ "nd_opt_mtu nd_opt_mtu_type", EXISTS, ICMP6_H, "nd_opt_mtu",
-		"nd_opt_mtu_type", "0", {"1"} },
-	{ "nd_opt_mtu nd_opt_mtu_len", EXISTS, ICMP6_H, "nd_opt_mtu",
-		"nd_opt_mtu_len", "1", {"1"} },
-	{ "nd_opt_mtu nd_opt_mtu_reserved", EXISTS, ICMP6_H, "nd_opt_mtu",
-		"nd_opt_mtu_reserved", "2", {"2"} },
-	{ "nd_opt_mtu nd_opt_mtu_mtu", EXISTS, ICMP6_H, "nd_opt_mtu",
-		"nd_opt_mtu_mtu", "4", {"4"} },
-};
+	{
+		"ND_ROUTER_SOLICIT", VALUE, ICMP6_H, "ND_ROUTER_SOLICIT",
+		    NULL, NULL, {
+	"133"}}, {
+		"ND_ROUTER_ADVERT", VALUE, ICMP6_H, "ND_ROUTER_ADVERT",
+		    NULL, NULL, {
+	"134"}}, {
+		"ND_NEIGHBOR_SOLICIT", VALUE, ICMP6_H, "ND_NEIGHBOR_SOLICIT",
+		    NULL, NULL, {
+	"135"}}, {
+		"ND_NEIGHBOR_ADVERT", VALUE, ICMP6_H, "ND_NEIGHBOR_ADVERT",
+		    NULL, NULL, {
+	"136"}}, {
+		"ND_REDIRECT", VALUE, ICMP6_H, "ND_REDIRECT", NULL, NULL, {
+	"137"}}, {
+		"nd_router_solicit nd_rs_hdr", EXISTS, ICMP6_H,
+		    "nd_router_solicit", "nd_rs_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"nd_router_solicit nd_rs_type define", ALIAS, ICMP6_H,
+		    "nd_router_solicit", "nd_rs_hdr.icmp6_type", NULL, {
+	"nd_rs_type"}}, {
+		"nd_router_solicit nd_rs_code define", ALIAS, ICMP6_H,
+		    "nd_router_solicit", "nd_rs_hdr.icmp6_code", NULL, {
+	"nd_rs_code"}}, {
+		"nd_router_solicit nd_rs_cksum define", ALIAS, ICMP6_H,
+		    "nd_router_solicit", "nd_rs_hdr.icmp6_cksum", NULL, {
+	"nd_rs_cksum"}}, {
+		"nd_router_solicit nd_rs_reserved define", ALIAS, ICMP6_H,
+		    "nd_router_solicit", "nd_rs_hdr.icmp6_data32[0]", NULL, {
+	"nd_rs_reserved"}}, {
+		"nd_router_advert nd_ra_hdr", EXISTS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"nd_router_advert nd_ra_reachable", EXISTS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_reachable",
+		    "sizeof(struct icmp6_hdr)", {
+	"4"}}, {
+		"nd_router_advert nd_ra_retransmit", EXISTS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_retransmit",
+		    "sizeof(struct icmp6_hdr)+4", {
+	"4"}}, {
+		"nd_router_advert nd_ra_type define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_type", NULL, {
+	"nd_ra_type"}}, {
+		"nd_router_advert nd_ra_code define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_code", NULL, {
+	"nd_ra_code"}}, {
+		"nd_router_advert nd_ra_cksum define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_cksum", NULL, {
+	"nd_ra_cksum"}}, {
+		"nd_router_advert nd_ra_curhoplimit define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_data8[0]", NULL, {
+	"nd_ra_curhoplimit"}}, {
+		"nd_router_advert nd_ra_flags_reserved define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_data8[1]", NULL, {
+	"nd_ra_flags_reserved"}}, {
+		"ND_RA_FLAG_MANAGED", VALUE, ICMP6_H, "ND_RA_FLAG_MANAGED",
+		    NULL, NULL, {
+	"0x80"}}, {
+		"ND_RA_FLAG_OTHER", VALUE, ICMP6_H, "ND_RA_FLAG_OTHER",
+		    NULL, NULL, {
+	"0x40"}}, {
+		"nd_router_advert nd_ra_router_lifetime define", ALIAS, ICMP6_H,
+		    "nd_router_advert", "nd_ra_hdr.icmp6_data16[1]", NULL, {
+	"nd_ra_router_lifetime"}}, {
+		"nd_neighbor_solicit nd_ns_hdr", EXISTS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"nd_neighbor_solicit nd_ns_target", EXISTS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_target",
+		    "sizeof(struct icmp6_hdr)", {
+	"sizeof(struct in6_addr)"}}, {
+		"nd_neighbor_solicit nd_ns_type define", ALIAS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_hdr.icmp6_type", NULL, {
+	"nd_ns_type"}}, {
+		"nd_neighbor_solicit nd_ns_code define", ALIAS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_hdr.icmp6_code", NULL, {
+	"nd_ns_code"}}, {
+		"nd_neighbor_solicit nd_ns_cksum define", ALIAS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_hdr.icmp6_cksum", NULL, {
+	"nd_ns_cksum"}}, {
+		"nd_neighbor_solicit nd_ns_reserved define", ALIAS, ICMP6_H,
+		    "nd_neighbor_solicit", "nd_ns_hdr.icmp6_data32[0]", NULL, {
+	"nd_ns_reserved"}}, {
+		"nd_neighbor_advert nd_na_hdr", EXISTS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"nd_neighbor_advert nd_na_target", EXISTS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_target",
+		    "sizeof(struct icmp6_hdr)", {
+	"sizeof(struct in6_addr)"}}, {
+		"nd_neighbor_advert nd_na_type define", ALIAS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_hdr.icmp6_type", NULL, {
+	"nd_na_type"}}, {
+		"nd_neighbor_advert nd_na_code define", ALIAS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_hdr.icmp6_code", NULL, {
+	"nd_na_code"}}, {
+		"nd_neighbor_advert nd_na_cksum define", ALIAS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_hdr.icmp6_cksum", NULL, {
+	"nd_na_cksum"}}, {
+		"nd_neighbor_advert nd_na_flags_reserved define", ALIAS,
+		    ICMP6_H, "nd_neighbor_advert", "nd_na_hdr.icmp6_data32[0]",
+		    NULL, {
+	"nd_na_flags_reserved"}}, {
+		"ND_NA_FLAG_ROUTER", VALUE, ICMP6_H, "ND_NA_FLAG_ROUTER",
+		    NULL, NULL, {
+	"htonl(0x80000000)"}}, {
+		"ND_NA_FLAG_SOLICITED", VALUE, ICMP6_H, "ND_NA_FLAG_SOLICITED",
+		    NULL, NULL, {
+	"htonl(0x40000000)"}}, {
+		"ND_NA_FLAG_OVERRIDE", VALUE, ICMP6_H, "ND_NA_FLAG_OVERRIDE",
+		    NULL, NULL, {
+	"htonl(0x20000000)"}}, {
+		"nd_redirect nd_rd_hdr", EXISTS, ICMP6_H, "nd_redirect",
+		    "nd_rd_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"nd_redirect nd_rd_target", EXISTS, ICMP6_H,
+		    "nd_redirect", "nd_rd_target", "sizeof(struct icmp6_hdr)", {
+	"sizeof(struct in6_addr)"}}, {
+		"nd_redirect nd_rd_dst", EXISTS, ICMP6_H, "nd_redirect",
+		    "nd_rd_dst",
+		    "sizeof(struct icmp6_hdr)+sizeof(struct in6_addr)", {
+	"sizeof(struct in6_addr)"}}, {
+		"nd_redirect nd_rd_type define", ALIAS, ICMP6_H,
+		    "nd_neighbor_advert", "nd_na_hdr.icmp6_data32[0]", NULL, {
+	"nd_na_flags_reserved"}}, {
+		"nd_opt_hdr nd_rd_hdr", EXISTS, ICMP6_H, "nd_opt_hdr",
+		    "nd_opt_type", "0", {
+	"1"}}, {
+		"nd_opt_hdr nd_rd_hdr", EXISTS, ICMP6_H, "nd_opt_hdr",
+		    "nd_opt_len", "1", {
+	"1"}}, {
+		"ND_OPT_SOURCE_LINKADDR", VALUE, ICMP6_H,
+		    "ND_OPT_SOURCE_LINKADDR", NULL, NULL, {
+	"1"}}, {
+		"ND_OPT_TARGET_LINKADDR", VALUE, ICMP6_H,
+		    "ND_OPT_TARGET_LINKADDR", NULL, NULL, {
+	"2"}}, {
+		"ND_OPT_PREFIX_INFORMATION", VALUE, ICMP6_H,
+		    "ND_OPT_PREFIX_INFORMATION", NULL, NULL, {
+	"3"}}, {
+		"ND_OPT_REDIRECTED_HEADER", VALUE, ICMP6_H,
+		    "ND_OPT_REDIRECTED_HEADER", NULL, NULL, {
+	"4"}}, {
+		"ND_OPT_MTU", VALUE, ICMP6_H, "ND_OPT_MTU", NULL, NULL, {
+	"5"}}, {
+		"nd_opt_prefix_info nd_opt_pi_type", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_type", "0", {
+	"1"}}, {
+		"nd_opt_prefix_info nd_opt_pi_len", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_len", "1", {
+	"1"}}, {
+		"nd_opt_prefix_info nd_opt_pi_prefix_len", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_prefix_len", "2", {
+	"1"}}, {
+		"nd_opt_prefix_info nd_opt_pi_flags_reserved", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_flags_reserved", "3", {
+	"1"}}, {
+		"nd_opt_prefix_info nd_opt_pi_valid_time", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_valid_time", "4", {
+	"4"}}, {
+		"nd_opt_prefix_info nd_opt_pi_preferred_time", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_preferred_time", "8", {
+	"4"}}, {
+		"nd_opt_prefix_info nd_opt_pi_reserved2", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_reserved2", "12", {
+	"4"}}, {
+		"nd_opt_prefix_info nd_opt_pi_prefix", EXISTS, ICMP6_H,
+		    "nd_opt_prefix_info", "nd_opt_pi_prefix", "16", {
+	"sizeof(struct in6_addr)"}}, {
+		"ND_OPT_PI_FLAG_ONLINK", VALUE, ICMP6_H,
+		    "ND_OPT_PI_FLAG_ONLINK", NULL, NULL, {
+	"0x80"}}, {
+		"ND_OPT_PI_FLAG_AUTO", VALUE, ICMP6_H, "ND_OPT_PI_FLAG_AUTO",
+		    NULL, NULL, {
+	"0x40"}}, {
+		"nd_opt_rd_hdr nd_opt_rh_type", EXISTS, ICMP6_H,
+		    "nd_opt_rd_hdr", "nd_opt_rh_type", "0", {
+	"1"}}, {
+		"nd_opt_rd_hdr nd_opt_rh_len", EXISTS, ICMP6_H, "nd_opt_rd_hdr",
+		    "nd_opt_rh_len", "1", {
+	"1"}}, {
+		"nd_opt_rd_hdr nd_opt_rh_reserved1", EXISTS, ICMP6_H,
+		    "nd_opt_rd_hdr", "nd_opt_rh_reserved1", "2", {
+	"2"}}, {
+		"nd_opt_rd_hdr nd_opt_rh_reserved2", EXISTS, ICMP6_H,
+		    "nd_opt_rd_hdr", "nd_opt_rh_reserved2", "4", {
+	"4"}}, {
+		"nd_opt_mtu nd_opt_mtu_type", EXISTS, ICMP6_H, "nd_opt_mtu",
+		    "nd_opt_mtu_type", "0", {
+	"1"}}, {
+		"nd_opt_mtu nd_opt_mtu_len", EXISTS, ICMP6_H, "nd_opt_mtu",
+		    "nd_opt_mtu_len", "1", {
+	"1"}}, {
+		"nd_opt_mtu nd_opt_mtu_reserved", EXISTS, ICMP6_H, "nd_opt_mtu",
+		    "nd_opt_mtu_reserved", "2", {
+	"2"}}, {
+		"nd_opt_mtu nd_opt_mtu_mtu", EXISTS, ICMP6_H, "nd_opt_mtu",
+		    "nd_opt_mtu_mtu", "4", {
+"4"}},};
 
 #define FTCOUNT	(sizeof(ftab)/sizeof(ftab[0]))
 
 int TST_TOTAL = FTCOUNT;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	i, lc;
+	int i, lc;
 	char *msg;
 
 	/* Parse standard options given to run the test. */
@@ -337,25 +395,26 @@
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		for (i=0; i<FTCOUNT; ++i) {
+		for (i = 0; i < FTCOUNT; ++i) {
 			switch (ftab[i].ft_type) {
 			case EXISTS:
 				structcheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_offset, ftab[i].ft_value);
+					    ftab[i].ft_struct, ftab[i].ft_field,
+					    ftab[i].ft_offset,
+					    ftab[i].ft_value);
 				break;
 			case ALIAS:
 				aliascheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_field,
+					   ftab[i].ft_dname);
 				break;
 			case VALUE:
 				valuecheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_dname);
 				break;
 			default:
 				tst_resm(TBROK, "invalid type %d",
-					ftab[i].ft_type);
+					 ftab[i].ft_type);
 				break;
 			}
 		}
@@ -366,14 +425,12 @@
 	tst_exit();
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
diff --git a/testcases/network/lib6/asapi_03.c b/testcases/network/lib6/asapi_03.c
index fd3a6cf..9ac07d1 100644
--- a/testcases/network/lib6/asapi_03.c
+++ b/testcases/network/lib6/asapi_03.c
@@ -47,164 +47,205 @@
 #include "usctest.h"
 #include "runcc.h"
 
-char *TCID="asapi_03";		/* Test program identifier.    */
+char *TCID = "asapi_03";	/* Test program identifier.    */
 
 void setup(void), cleanup(void);
 
 enum ttype { EXISTS, ALIAS, VALUE };
 
 struct ftent {
-	char	*ft_tname;		/* test name */
-	int	ft_type;		/* test type */
-	char	*ft_incl;		/* include file list */
-	char	*ft_struct;		/* structure name */
-	char	*ft_field;		/* field name */
-	char	*ft_offset;		/* field offset */
+	char *ft_tname;		/* test name */
+	int ft_type;		/* test type */
+	char *ft_incl;		/* include file list */
+	char *ft_struct;	/* structure name */
+	char *ft_field;		/* field name */
+	char *ft_offset;	/* field offset */
 	union {
-		char	*fu_value;	/* field size or value */
-		char	*fu_dname;	/* #define name */
+		char *fu_value;	/* field size or value */
+		char *fu_dname;	/* #define name */
 	} ftun;
 #define ft_value	ftun.fu_value
 #define ft_dname	ftun.fu_dname
 } ftab[] = {
 /* section 2.2.3, MLDv1 */
-	{ "MLD_LISTENER_QUERY", VALUE, ICMP6_H, "MLD_LISTENER_QUERY",
-		NULL, NULL, {"130"} },
-	{ "MLD_LISTENER_REPORT", VALUE, ICMP6_H, "MLD_LISTENER_REPORT",
-		NULL, NULL, {"131"} },
-	{ "MLD_LISTENER_REDUCTION", VALUE, ICMP6_H, "MLD_LISTENER_REDUCTION",
-		NULL, NULL, {"132"} },
-	{ "mld_hdr mld_icmp6_hdr", EXISTS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr", "0", {"sizeof(struct icmp6_hdr)"} },
-	{ "mld_hdr mld_addr", EXISTS, ICMP6_H, "mld_hdr", "mld_addr",
-		"sizeof(struct icmp6_hdr)",
-		{"sizeof(struct in6_addr)"} },
-	{ "mld_hdr mld_type define", ALIAS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr.icmp6_type", NULL, {"mld_type"} },
-	{ "mld_hdr mld_code define", ALIAS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr.icmp6_code", NULL, {"mld_code"} },
-	{ "mld_hdr mld_cksum define", ALIAS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr.icmp6_cksum", NULL, {"mld_cksum"} },
-	{ "mld_hdr mld_maxdelay define", ALIAS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr.icmp6_data16[0]", NULL, {"mld_maxdelay"} },
-	{ "mld_hdr mld_reserved define", ALIAS, ICMP6_H, "mld_hdr",
-		"mld_icmp6_hdr.icmp6_data16[1]", NULL, {"mld_reserved"} },
+	{
+		"MLD_LISTENER_QUERY", VALUE, ICMP6_H, "MLD_LISTENER_QUERY",
+		    NULL, NULL, {
+	"130"}}, {
+		"MLD_LISTENER_REPORT", VALUE, ICMP6_H, "MLD_LISTENER_REPORT",
+		    NULL, NULL, {
+	"131"}}, {
+		"MLD_LISTENER_REDUCTION", VALUE, ICMP6_H,
+		    "MLD_LISTENER_REDUCTION", NULL, NULL, {
+	"132"}}, {
+		"mld_hdr mld_icmp6_hdr", EXISTS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"mld_hdr mld_addr", EXISTS, ICMP6_H, "mld_hdr", "mld_addr",
+		    "sizeof(struct icmp6_hdr)", {
+	"sizeof(struct in6_addr)"}}, {
+		"mld_hdr mld_type define", ALIAS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr.icmp6_type", NULL, {
+	"mld_type"}}, {
+		"mld_hdr mld_code define", ALIAS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr.icmp6_code", NULL, {
+	"mld_code"}}, {
+		"mld_hdr mld_cksum define", ALIAS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr.icmp6_cksum", NULL, {
+	"mld_cksum"}}, {
+		"mld_hdr mld_maxdelay define", ALIAS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr.icmp6_data16[0]", NULL, {
+	"mld_maxdelay"}}, {
+		"mld_hdr mld_reserved define", ALIAS, ICMP6_H, "mld_hdr",
+		    "mld_icmp6_hdr.icmp6_data16[1]", NULL, {
+	"mld_reserved"}},
 /* section 2.2.4, Router renumbering */
-	{ "ICMP6_ROUTER_RENUMBERING", VALUE, ICMP6_H,"ICMP6_ROUTER_RENUMBERING",
-		NULL, NULL, {"138"} },
-	{ "icmp6_router_renum rr_hdr", EXISTS, ICMP6_H, "icmp6_router_renum",
-		"rr_hdr", "0", {"sizeof(struct icmp6_hdr)"} },
-	{ "icmp6_router_renum rr_segnum", EXISTS, ICMP6_H, "icmp6_router_renum",
-		"rr_segnum", "sizeof(struct icmp6_hdr)", {"1"} },
-	{ "icmp6_router_renum rr_flags", EXISTS, ICMP6_H, "icmp6_router_renum",
-		"rr_flags", "sizeof(struct icmp6_hdr)+1", {"1"} },
-	{ "icmp6_router_renum rr_maxdelay", EXISTS, ICMP6_H,
-		"icmp6_router_renum", "rr_maxdelay",
-		"sizeof(struct icmp6_hdr)+2",  {"2"} },
-	{ "icmp6_router_renum rr_reserved", EXISTS, ICMP6_H,
-		"icmp6_router_renum", "rr_reserved",
-		"sizeof(struct icmp6_hdr)+4", {"4"} },
-	{ "icmp6_router_renum rr_type define", ALIAS, ICMP6_H,
-		"icmp6_router_renum", "rr_hdr.icmp6_type",
-		NULL, {"rr_type"} },
-	{ "icmp6_router_renum rr_code define", ALIAS, ICMP6_H,
-		"icmp6_router_renum", "rr_hdr.icmp6_code",
-		NULL, {"rr_code"} },
-	{ "icmp6_router_renum rr_cksum define", ALIAS, ICMP6_H,
-		"icmp6_router_renum", "rr_hdr.icmp6_cksum",
-		NULL, {"rr_cksum"} },
-	{ "icmp6_router_renum rr_seqnum define", ALIAS, ICMP6_H,
-		"icmp6_router_renum", "rr_hdr.icmp6_data32[0]",
-		NULL, {"rr_seqnum"} },
-	{ "ICMP6_RR_FLAGS_TEST", VALUE, ICMP6_H, "ICMP6_RR_FLAGS_TEST",
-		NULL, NULL, {"0x80"} },
-	{ "ICMP6_RR_FLAGS_REQRESULT", VALUE, ICMP6_H,
-		"ICMP6_RR_FLAGS_REQRESULT", NULL, NULL, {"0x40"} },
-	{ "ICMP6_RR_FLAGS_FORCEAPPLY", VALUE, ICMP6_H,
-		"ICMP6_RR_FLAGS_FORCEAPPLY", NULL, NULL, {"0x20"} },
-	{ "ICMP6_RR_FLAGS_SPECSITE", VALUE, ICMP6_H,
-		"ICMP6_RR_FLAGS_SPECSITE", NULL, NULL, {"0x10"} },
-	{ "ICMP6_RR_FLAGS_PREVDONE", VALUE, ICMP6_H,
-		"ICMP6_RR_FLAGS_PREVDONE", NULL, NULL, {"0x08"} },
-
-	{ "rr_pco_match rpm_code", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_code", "0", {"1"} },
-	{ "rr_pco_match rpm_len", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_len", "1", {"1"} },
-	{ "rr_pco_match rpm_ordinal", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_ordinal", "2", {"1"} },
-	{ "rr_pco_match rpm_matchlen", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_matchlen", "3", {"1"} },
-	{ "rr_pco_match rpm_minlen", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_minlen", "4", {"1"} },
-	{ "rr_pco_match rpm_maxlen", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_maxlen", "5", {"1"} },
-	{ "rr_pco_match rpm_reserved", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_reserved", "6", {"2"} },
-	{ "rr_pco_match rpm_prefix", EXISTS, ICMP6_H, "rr_pco_match",
-		"rpm_prefix", "8", {"sizeof(struct in6_addr)"} },
-
-	{ "RPM_PCO_ADD", VALUE, ICMP6_H, "RPM_PCO_ADD", NULL, NULL, {"1"} },
-	{ "RPM_PCO_CHANGE", VALUE, ICMP6_H, "RPM_PCO_CHANGE", NULL, NULL,
-		{"2"} },
-	{ "RPM_PCO_SETGLOBAL", VALUE, ICMP6_H, "RPM_PCO_SETGLOBAL", NULL, NULL,
-		{"3"} },
-
-	{ "rr_pco_use rpu_uselen", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_uselen", "0", {"1"} },
-	{ "rr_pco_use rpu_keeplen", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_keeplen", "1", {"1"} },
-	{ "rr_pco_use rpu_ramask", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_ramask", "2", {"1"} },
-	{ "rr_pco_use rpu_raflags", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_raflags", "3", {"1"} },
-	{ "rr_pco_use rpu_vltime", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_vltime", "4", {"4"} },
-	{ "rr_pco_use rpu_pltime", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_pltime", "8", {"4"} },
-	{ "rr_pco_use rpu_flags", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_flags", "12", {"4"} },
-	{ "rr_pco_use rpu_prefix", EXISTS, ICMP6_H, "rr_pco_use",
-		"rpu_prefix", "16", {"sizeof(struct in6_addr)"} },
-
-	{ "ICMP6_RR_PCOUSE_RAFLAGS_ONLINK", VALUE, ICMP6_H,
-		"ICMP6_RR_PCOUSE_RAFLAGS_ONLINK", NULL, NULL, {"0x20"} },
-	{ "ICMP6_RR_PCOUSE_RAFLAGS_AUTO", VALUE, ICMP6_H,
-		"ICMP6_RR_PCOUSE_RAFLAGS_AUTO", NULL, NULL, {"0x10"} },
-	{ "ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME", VALUE, ICMP6_H,
-		"ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME", NULL, NULL,
-		{"htonl(0x80000000)"} },
-	{ "ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME", VALUE, ICMP6_H,
-		"ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME", NULL, NULL,
-		{"htonl(0x40000000)"} },
-
-	{ "rr_result rrr_flags", EXISTS, ICMP6_H, "rr_result",
-		"rrr_flags", "0", {"2"} },
-	{ "rr_result rrr_ordinal", EXISTS, ICMP6_H, "rr_result",
-		"rrr_ordinal", "2", {"1"} },
-	{ "rr_result rrr_matchedlen", EXISTS, ICMP6_H, "rr_result",
-		"rrr_matchedlen", "3", {"1"} },
-	{ "rr_result rrr_ifid", EXISTS, ICMP6_H, "rr_result",
-		"rrr_ifid", "4", {"4"} },
-	{ "rr_result rrr_prefix", EXISTS, ICMP6_H, "rr_result",
-		"rrr_prefix", "8", {"sizeof(struct in6_addr)"} },
-
-	{ "ICMP6_RR_RESULT_FLAGS_OOB", VALUE, ICMP6_H,
-		"ICMP6_RR_RESULT_FLAGS_OOB", NULL, NULL,
-		{"htons(0x0002)"} },
-	{ "ICMP6_RR_RESULT_FLAGS_FORBIDDEN", VALUE, ICMP6_H,
-		"ICMP6_RR_RESULT_FLAGS_FORBIDDEN", NULL, NULL,
-		{"htons(0x0001)"} },
-};
+	{
+		"ICMP6_ROUTER_RENUMBERING", VALUE, ICMP6_H,
+		    "ICMP6_ROUTER_RENUMBERING", NULL, NULL, {
+	"138"}}, {
+		"icmp6_router_renum rr_hdr", EXISTS, ICMP6_H,
+		    "icmp6_router_renum", "rr_hdr", "0", {
+	"sizeof(struct icmp6_hdr)"}}, {
+		"icmp6_router_renum rr_segnum", EXISTS, ICMP6_H,
+		    "icmp6_router_renum", "rr_segnum",
+		    "sizeof(struct icmp6_hdr)", {
+	"1"}}, {
+		"icmp6_router_renum rr_flags", EXISTS, ICMP6_H,
+		    "icmp6_router_renum", "rr_flags",
+		    "sizeof(struct icmp6_hdr)+1", {
+	"1"}}, {
+		"icmp6_router_renum rr_maxdelay", EXISTS, ICMP6_H,
+		    "icmp6_router_renum", "rr_maxdelay",
+		    "sizeof(struct icmp6_hdr)+2", {
+	"2"}}, {
+		"icmp6_router_renum rr_reserved", EXISTS, ICMP6_H,
+		    "icmp6_router_renum", "rr_reserved",
+		    "sizeof(struct icmp6_hdr)+4", {
+	"4"}}, {
+		"icmp6_router_renum rr_type define", ALIAS, ICMP6_H,
+		    "icmp6_router_renum", "rr_hdr.icmp6_type", NULL, {
+	"rr_type"}}, {
+		"icmp6_router_renum rr_code define", ALIAS, ICMP6_H,
+		    "icmp6_router_renum", "rr_hdr.icmp6_code", NULL, {
+	"rr_code"}}, {
+		"icmp6_router_renum rr_cksum define", ALIAS, ICMP6_H,
+		    "icmp6_router_renum", "rr_hdr.icmp6_cksum", NULL, {
+	"rr_cksum"}}, {
+		"icmp6_router_renum rr_seqnum define", ALIAS, ICMP6_H,
+		    "icmp6_router_renum", "rr_hdr.icmp6_data32[0]", NULL, {
+	"rr_seqnum"}}, {
+		"ICMP6_RR_FLAGS_TEST", VALUE, ICMP6_H, "ICMP6_RR_FLAGS_TEST",
+		    NULL, NULL, {
+	"0x80"}}, {
+		"ICMP6_RR_FLAGS_REQRESULT", VALUE, ICMP6_H,
+		    "ICMP6_RR_FLAGS_REQRESULT", NULL, NULL, {
+	"0x40"}}, {
+		"ICMP6_RR_FLAGS_FORCEAPPLY", VALUE, ICMP6_H,
+		    "ICMP6_RR_FLAGS_FORCEAPPLY", NULL, NULL, {
+	"0x20"}}, {
+		"ICMP6_RR_FLAGS_SPECSITE", VALUE, ICMP6_H,
+		    "ICMP6_RR_FLAGS_SPECSITE", NULL, NULL, {
+	"0x10"}}, {
+		"ICMP6_RR_FLAGS_PREVDONE", VALUE, ICMP6_H,
+		    "ICMP6_RR_FLAGS_PREVDONE", NULL, NULL, {
+	"0x08"}}, {
+		"rr_pco_match rpm_code", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_code", "0", {
+	"1"}}, {
+		"rr_pco_match rpm_len", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_len", "1", {
+	"1"}}, {
+		"rr_pco_match rpm_ordinal", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_ordinal", "2", {
+	"1"}}, {
+		"rr_pco_match rpm_matchlen", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_matchlen", "3", {
+	"1"}}, {
+		"rr_pco_match rpm_minlen", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_minlen", "4", {
+	"1"}}, {
+		"rr_pco_match rpm_maxlen", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_maxlen", "5", {
+	"1"}}, {
+		"rr_pco_match rpm_reserved", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_reserved", "6", {
+	"2"}}, {
+		"rr_pco_match rpm_prefix", EXISTS, ICMP6_H, "rr_pco_match",
+		    "rpm_prefix", "8", {
+	"sizeof(struct in6_addr)"}}, {
+		"RPM_PCO_ADD", VALUE, ICMP6_H, "RPM_PCO_ADD", NULL, NULL, {
+	"1"}}, {
+		"RPM_PCO_CHANGE", VALUE, ICMP6_H, "RPM_PCO_CHANGE", NULL, NULL, {
+	"2"}}, {
+		"RPM_PCO_SETGLOBAL", VALUE, ICMP6_H, "RPM_PCO_SETGLOBAL", NULL,
+		    NULL, {
+	"3"}}, {
+		"rr_pco_use rpu_uselen", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_uselen", "0", {
+	"1"}}, {
+		"rr_pco_use rpu_keeplen", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_keeplen", "1", {
+	"1"}}, {
+		"rr_pco_use rpu_ramask", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_ramask", "2", {
+	"1"}}, {
+		"rr_pco_use rpu_raflags", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_raflags", "3", {
+	"1"}}, {
+		"rr_pco_use rpu_vltime", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_vltime", "4", {
+	"4"}}, {
+		"rr_pco_use rpu_pltime", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_pltime", "8", {
+	"4"}}, {
+		"rr_pco_use rpu_flags", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_flags", "12", {
+	"4"}}, {
+		"rr_pco_use rpu_prefix", EXISTS, ICMP6_H, "rr_pco_use",
+		    "rpu_prefix", "16", {
+	"sizeof(struct in6_addr)"}}, {
+		"ICMP6_RR_PCOUSE_RAFLAGS_ONLINK", VALUE, ICMP6_H,
+		    "ICMP6_RR_PCOUSE_RAFLAGS_ONLINK", NULL, NULL, {
+	"0x20"}}, {
+		"ICMP6_RR_PCOUSE_RAFLAGS_AUTO", VALUE, ICMP6_H,
+		    "ICMP6_RR_PCOUSE_RAFLAGS_AUTO", NULL, NULL, {
+	"0x10"}}, {
+		"ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME", VALUE, ICMP6_H,
+		    "ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME", NULL, NULL, {
+	"htonl(0x80000000)"}}, {
+		"ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME", VALUE, ICMP6_H,
+		    "ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME", NULL, NULL, {
+	"htonl(0x40000000)"}}, {
+		"rr_result rrr_flags", EXISTS, ICMP6_H, "rr_result",
+		    "rrr_flags", "0", {
+	"2"}}, {
+		"rr_result rrr_ordinal", EXISTS, ICMP6_H, "rr_result",
+		    "rrr_ordinal", "2", {
+	"1"}}, {
+		"rr_result rrr_matchedlen", EXISTS, ICMP6_H, "rr_result",
+		    "rrr_matchedlen", "3", {
+	"1"}}, {
+		"rr_result rrr_ifid", EXISTS, ICMP6_H, "rr_result",
+		    "rrr_ifid", "4", {
+	"4"}}, {
+		"rr_result rrr_prefix", EXISTS, ICMP6_H, "rr_result",
+		    "rrr_prefix", "8", {
+	"sizeof(struct in6_addr)"}}, {
+		"ICMP6_RR_RESULT_FLAGS_OOB", VALUE, ICMP6_H,
+		    "ICMP6_RR_RESULT_FLAGS_OOB", NULL, NULL, {
+	"htons(0x0002)"}}, {
+		"ICMP6_RR_RESULT_FLAGS_FORBIDDEN", VALUE, ICMP6_H,
+		    "ICMP6_RR_RESULT_FLAGS_FORBIDDEN", NULL, NULL, {
+"htons(0x0001)"}},};
 
 #define FTCOUNT	(sizeof(ftab)/sizeof(ftab[0]))
 
 int TST_TOTAL = FTCOUNT;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	i, lc;
+	int i, lc;
 	char *msg;
 
 	/* Parse standard options given to run the test. */
@@ -216,25 +257,26 @@
 	setup();
 
 	for (lc = 0; TEST_LOOPING(lc); ++lc) {
-		for (i=0; i<FTCOUNT; ++i) {
+		for (i = 0; i < FTCOUNT; ++i) {
 			switch (ftab[i].ft_type) {
 			case EXISTS:
 				structcheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_offset, ftab[i].ft_value);
+					    ftab[i].ft_struct, ftab[i].ft_field,
+					    ftab[i].ft_offset,
+					    ftab[i].ft_value);
 				break;
 			case ALIAS:
 				aliascheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_field,
-					ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_field,
+					   ftab[i].ft_dname);
 				break;
 			case VALUE:
 				valuecheck(ftab[i].ft_tname, ftab[i].ft_incl,
-					ftab[i].ft_struct, ftab[i].ft_dname);
+					   ftab[i].ft_struct, ftab[i].ft_dname);
 				break;
 			default:
 				tst_resm(TBROK, "invalid type %d",
-					ftab[i].ft_type);
+					 ftab[i].ft_type);
 				break;
 			}
 		}
@@ -245,14 +287,12 @@
 	tst_exit();
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
diff --git a/testcases/network/lib6/asapi_04.c b/testcases/network/lib6/asapi_04.c
index 6987441..6084384 100644
--- a/testcases/network/lib6/asapi_04.c
+++ b/testcases/network/lib6/asapi_04.c
@@ -50,24 +50,24 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="asapi_04";		/* Test program identifier.    */
+char *TCID = "asapi_04";	/* Test program identifier.    */
 
 pid_t pid;
 
 struct {
-	char	*prt_name;
-	int	prt_value;
+	char *prt_name;
+	int prt_value;
 } ptab[] = {
-	{ "hopopt", 0 },
-	{ "ipv6", 41 },
-	{ "ipv6-route", 43 },
-	{ "ipv6-frag", 44 },
-	{ "esp", 50 },
-	{ "ah", 51 },
-	{ "ipv6-icmp", 58 },
-	{ "ipv6-nonxt", 59 },
-	{ "ipv6-opts", 60},
-};
+	{
+	"hopopt", 0}, {
+	"ipv6", 41}, {
+	"ipv6-route", 43}, {
+	"ipv6-frag", 44}, {
+	"esp", 50}, {
+	"ah", 51}, {
+	"ipv6-icmp", 58}, {
+	"ipv6-nonxt", 59}, {
+"ipv6-opts", 60},};
 
 #define PTCOUNT	(sizeof(ptab)/sizeof(ptab[0]))
 
@@ -77,8 +77,7 @@
 void setup(void), cleanup(void);
 int csum_test(char *rhost);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *msg;
 	int lc;
@@ -101,8 +100,7 @@
 	tst_exit();
 }
 
-void
-do_tests(void)
+void do_tests(void)
 {
 	int i;
 
@@ -115,18 +113,19 @@
 	 * in the second address and check for equal. Covers all bits, all
 	 * combinations.
 	 */
-	{ struct in6_addr a1, a2;
-	  int word, bit;
-	  int rv = 1;
+	{
+		struct in6_addr a1, a2;
+		int word, bit;
+		int rv = 1;
 
 		memset(&a1, 0, sizeof(a1));
 		memset(&a2, 0, sizeof(a2));
 
 		rv = IN6_ARE_ADDR_EQUAL(&a1, &a2);
 
-		for (word=0; word<4; ++word)
-			for (bit=0; bit<32; ++bit) {
-				uint32_t newbit = 1<<bit;
+		for (word = 0; word < 4; ++word)
+			for (bit = 0; bit < 32; ++bit) {
+				uint32_t newbit = 1 << bit;
 
 				a1.s6_addr32[word] |= newbit;	/* unequal */
 				rv &= !IN6_ARE_ADDR_EQUAL(&a1, &a2);
@@ -138,14 +137,14 @@
 #endif /* IN6_ARE_ADDR_EQUAL */
 
 /* RFC 3542, Section 2.4 */
-	for (i=0; i < PTCOUNT; ++i) {
+	for (i = 0; i < PTCOUNT; ++i) {
 		struct protoent *pe;
-		int	pass;
+		int pass;
 
 		pe = getprotobyname(ptab[i].prt_name);
 		pass = pe && pe->p_proto == ptab[i].prt_value;
 		tst_resm(pass ? TPASS : TFAIL, "\"%s\" protocols entry",
-			ptab[i].prt_name);
+			 ptab[i].prt_name);
 	}
 /* RFC 3542, Section 3.1 */
 	csum_test("::1");
@@ -162,31 +161,35 @@
 #define	NH_TEST	0x9f
 
 struct tprot {
-	int		tp_pid;		/* sender PID */
-	int		tp_seq;		/* sequence # */
-	int		tp_offset;	/* offset of cksum */
-	int		tp_dlen;	/* tp_dat length */
-	unsigned char	tp_dat[0];	/* user data */
+	int tp_pid;		/* sender PID */
+	int tp_seq;		/* sequence # */
+	int tp_offset;		/* offset of cksum */
+	int tp_dlen;		/* tp_dat length */
+	unsigned char tp_dat[0];	/* user data */
 };
 
 unsigned char tpbuf[sizeof(struct tprot) + 2048];
 unsigned char rpbuf[sizeof(struct tprot) + 2048];
 
 struct csent {
-	int	 cs_offset;
-	int	 cs_dlen;
-	int	 cs_setresult;	/* setsockopt expected result */
-	int	 cs_seterrno;	/* setsockopt expected errno */
-	int	 cs_sndresult;	/* send expected result */
-	int	 cs_snderrno;	/* send expected errno */
+	int cs_offset;
+	int cs_dlen;
+	int cs_setresult;	/* setsockopt expected result */
+	int cs_seterrno;	/* setsockopt expected errno */
+	int cs_sndresult;	/* send expected result */
+	int cs_snderrno;	/* send expected errno */
 } cstab[] = {
-	{ 0, 5, 0, 0, 0, 0 },
-	{ 6, 30, 0, 0, 0, 0 },
-	{ 3, 20, -1, EINVAL, -1, -1 },	/* non-aligned offset */
-	{ 4, 5, 0, 0, -1, EINVAL },		/* not enough space */
-	{ 50, 5, 0, 0, -1, EINVAL },	/* outside of packet */
-	{ 22, 30, 0, 0, 0, 0 },
-	{ 2000, 2004, 0, 0, 0, 0 },	/* in a fragment (over Ethernet) */
+	{
+	0, 5, 0, 0, 0, 0}, {
+	6, 30, 0, 0, 0, 0}, {
+	3, 20, -1, EINVAL, -1, -1},	/* non-aligned offset */
+	{
+	4, 5, 0, 0, -1, EINVAL},	/* not enough space */
+	{
+	50, 5, 0, 0, -1, EINVAL},	/* outside of packet */
+	{
+	22, 30, 0, 0, 0, 0}, {
+	2000, 2004, 0, 0, 0, 0},	/* in a fragment (over Ethernet) */
 };
 
 #define CSCOUNT	(sizeof(cstab)/sizeof(cstab[0]))
@@ -206,7 +209,7 @@
 	if (cc <= 0)
 		return cc;
 	while (cc > 0 && total < expected) {
-		cc = recv(sd, &packet[total], expected-total, 0);
+		cc = recv(sd, &packet[total], expected - total, 0);
 		if (cc >= 0) {
 			total += cc;
 			if (!gothead && total >= sizeof(struct tprot)) {
@@ -228,10 +231,10 @@
 	int i;
 
 	ps = (unsigned short *)packet;
-	for (i=0; i<len/2; ++i)
+	for (i = 0; i < len / 2; ++i)
 		sum += *ps++;
 	if (len & 1)
-		sum += htons(packet[len-1]<<8);
+		sum += htons(packet[len - 1] << 8);
 	sum = (sum >> 16) + (sum & 0xffff);
 	sum += (sum >> 16);
 	return ~sum;
@@ -267,7 +270,7 @@
 		tst_resm(TBROK, "can't create raw socket: %s", strerror(errno));
 		return -1;
 	}
-	for (i=0; i<CSCOUNT; ++i) {
+	for (i = 0; i < CSCOUNT; ++i) {
 		int offset, len, xlen;
 		int rv;
 		unsigned char *p, *pend;
@@ -286,41 +289,43 @@
 		TEST(setsockopt(sd, IPPROTO_IPV6, IPV6_CHECKSUM, &offset,
 				sizeof(offset)));
 		if (TEST_RETURN != cstab[i].cs_setresult) {
-			tst_resm(TFAIL|TTERRNO, "IPV6_CHECKSUM offset %d len %d "
-				"- result %ld != %d", offset, len,
-				TEST_RETURN, cstab[i].cs_setresult);
+			tst_resm(TFAIL | TTERRNO,
+				 "IPV6_CHECKSUM offset %d len %d "
+				 "- result %ld != %d", offset, len, TEST_RETURN,
+				 cstab[i].cs_setresult);
 			continue;
 		}
 		if (TEST_RETURN < 0) {
 			tst_resm(TPASS, "IPV6_CHECKSUM offset %d len %d",
-				offset, len);
+				 offset, len);
 			continue;
 		}
 		if (TEST_RETURN && TEST_ERRNO != cstab[i].cs_seterrno) {
 			tst_resm(TFAIL, "IPV6_CHECKSUM offset %d len %d "
-				"- errno %d != %d", offset, len,
-				TEST_ERRNO, cstab[i].cs_seterrno);
+				 "- errno %d != %d", offset, len,
+				 TEST_ERRNO, cstab[i].cs_seterrno);
 			continue;
 		}
 		/* send packet */
 		TEST(sendto(sd, pttp, len, 0, (struct sockaddr *)&rsin6,
-			sizeof(rsin6)));
+			    sizeof(rsin6)));
 		xlen = (cstab[i].cs_sndresult < 0) ? -1 : len;
 		if (TEST_RETURN != xlen) {
-			tst_resm(TFAIL|TTERRNO, "IPV6_CHECKSUM offset %d len %d "
-				"- sndresult %ld != %d",
-				offset, len, TEST_RETURN, xlen);
+			tst_resm(TFAIL | TTERRNO,
+				 "IPV6_CHECKSUM offset %d len %d "
+				 "- sndresult %ld != %d", offset, len,
+				 TEST_RETURN, xlen);
 			continue;
 		}
 		if (TEST_RETURN < 0 && TEST_ERRNO != cstab[i].cs_snderrno) {
 			tst_resm(TFAIL, "IPV6_CHECKSUM offset %d len %d "
-				"- snderrno %d != %d", offset, len,
-				TEST_ERRNO, cstab[i].cs_snderrno);
+				 "- snderrno %d != %d", offset, len,
+				 TEST_ERRNO, cstab[i].cs_snderrno);
 			continue;
 		}
 		if (TEST_RETURN < 0) {
 			tst_resm(TPASS, "IPV6_CHECKSUM offset %d len %d",
-				offset, len);
+				 offset, len);
 			continue;
 		}
 		while ((cc = recvtprot(sfd, rpbuf, sizeof(rpbuf)))) {
@@ -330,14 +335,13 @@
 		}
 		rv = 1;
 		pend = rpbuf + sizeof(struct tprot) + ntohl(prtp->tp_dlen);
-		for (p=&prtp->tp_dat[0]; p < pend; ++p) {
-			if (p == &rpbuf[offset] ||
-			    p == &rpbuf[offset+1])
+		for (p = &prtp->tp_dat[0]; p < pend; ++p) {
+			if (p == &rpbuf[offset] || p == &rpbuf[offset + 1])
 				continue;
 			if (*p != 0xa5) {
 				tst_resm(TFAIL, "IPV6_CHECKSUM corrupt data "
-					"0x%02x != 0xa5 at offset %d in packet",
-					*p, p - rpbuf);
+					 "0x%02x != 0xa5 at offset %d in packet",
+					 *p, p - rpbuf);
 				rv = 0;
 				break;
 			}
@@ -349,7 +353,7 @@
 		cs = csum(~cs, rpbuf, xlen);
 		if (!csum(0, rpbuf, xlen)) {
 			tst_resm(TFAIL, "IPV6_CHECKSUM offset %d len %d (bad "
-				"checksum)", offset, len);
+				 "checksum)", offset, len);
 			continue;
 		}
 		tst_resm(TPASS, "IPV6_CHECKSUM offset %d len %d", offset, len);
@@ -360,8 +364,7 @@
 static int listen_fd, connect_fd;
 sem_t ilsem;
 
-void *
-ilistener(void *arg)
+void *ilistener(void *arg)
 {
 	connect_fd = accept(listen_fd, 0, 0);
 	close(listen_fd);
@@ -369,10 +372,9 @@
 	return NULL;
 }
 
-int
-isocketpair(int pf, int type, int proto, int fd[2])
+int isocketpair(int pf, int type, int proto, int fd[2])
 {
-	pthread_t	thid;
+	pthread_t thid;
 	struct sockaddr_in sin4;
 	socklen_t namelen;
 
@@ -426,11 +428,10 @@
 #define MAX(a, b) ((a) >= (b) ? (a) : (b))
 #endif /* MAX */
 
-int
-csum_test(char *rhost)
+int csum_test(char *rhost)
 {
 	fd_set rset, rset_save;
-	int csd[2];	/* control sockets */
+	int csd[2];		/* control sockets */
 	int sd, nfds, maxfd, cc;
 	struct timeval tv;
 
@@ -451,7 +452,7 @@
 			tst_resm(TBROK, "IPV6_CHECKSUM tests must run as root");
 		else
 			tst_resm(TBROK, "All IPv6_CHECKSUM tests broken: "
-				"socket: %s", strerror(saved_errno));
+				 "socket: %s", strerror(saved_errno));
 		return -1;
 	}
 	FD_ZERO(&rset_save);
@@ -462,13 +463,13 @@
 
 	/* server socket set; now start the client */
 	switch (fork()) {
-	case 0:	/* child */
+	case 0:		/* child */
 		close(csd[0]);
 		break;
 	case -1:
 		tst_resm(TBROK, "can't fork rserver");
 		return -1;
-	default: /* parent */
+	default:		/* parent */
 		close(sd);
 		close(csd[1]);
 		return client(pid, csd[0]);
@@ -476,7 +477,7 @@
 
 	tv.tv_sec = READ_TIMEOUT;
 	tv.tv_usec = 0;
-	while ((nfds = select(maxfd+1, &rset, 0, 0, &tv)) >= 0) {
+	while ((nfds = select(maxfd + 1, &rset, 0, 0, &tv)) >= 0) {
 		if (nfds < 0) {
 			if (errno == EINTR)
 				continue;
@@ -488,7 +489,7 @@
 		if (FD_ISSET(sd, &rset)) {
 			static char packet[2048];
 
-			cc = recv(sd, packet, sizeof(packet),0);
+			cc = recv(sd, packet, sizeof(packet), 0);
 			if (cc < 0) {
 				perror("server recvtprot");
 				exit(1);
@@ -520,14 +521,12 @@
 	return 0;
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
diff --git a/testcases/network/lib6/asapi_05.c b/testcases/network/lib6/asapi_05.c
index f40d110..deb17d5 100644
--- a/testcases/network/lib6/asapi_05.c
+++ b/testcases/network/lib6/asapi_05.c
@@ -50,7 +50,7 @@
 #include "usctest.h"
 #include "runcc.h"
 
-char *TCID="asapi_05";		/* Test program identifier.    */
+char *TCID = "asapi_05";	/* Test program identifier.    */
 
 void setup(void);
 void cleanup(void);
@@ -58,11 +58,10 @@
 void icmp6_et(void);
 void icmp6_ft(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	lc;
-	char	*msg;
+	int lc;
+	char *msg;
 
 	/* Parse standard options given to run the test. */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
@@ -83,107 +82,124 @@
 enum ttype { EXISTS, ALIAS, VALUE, DEFINED };
 
 struct etent {
-	char	*et_tname;		/* test name */
-	int	et_type;		/* test type */
-	char	*et_incl;		/* include file list */
-	char	*et_struct;		/* structure name */
-	char	*et_field;		/* field name */
-	char	*et_offset;		/* field offset */
+	char *et_tname;		/* test name */
+	int et_type;		/* test type */
+	char *et_incl;		/* include file list */
+	char *et_struct;	/* structure name */
+	char *et_field;		/* field name */
+	char *et_offset;	/* field offset */
 	union {
-		char	*fu_value;	/* field size or value */
-		char	*fu_dname;	/* #define name */
+		char *fu_value;	/* field size or value */
+		char *fu_dname;	/* #define name */
 	} ftun;
 #define et_value	ftun.fu_value
 #define et_dname	ftun.fu_dname
 } etab[] = {
 /* existence checks, RFC 3542 section 3 */
-	{ "icmp6_filter icmp6_filt", EXISTS, ICMP6_H, "icmp6_filter",
-		"icmp6_filt", "0", {"32"} },
-	{ "icmp6_filter icmp6_filt[0]", EXISTS, ICMP6_H, "icmp6_filter",
-		"icmp6_filt[0]", "0", {"4"} },
-	{ "ICMP6_FILTER_WILLPASS", DEFINED, ICMP6_H, "ICMP6_FILTER_WILLPASS",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER_WILLBLOCK", DEFINED, ICMP6_H, "ICMP6_FILTER_WILLBLOCK",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER_SETPASS", DEFINED, ICMP6_H, "ICMP6_FILTER_SETPASS",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER_SETBLOCK", DEFINED, ICMP6_H, "ICMP6_FILTER_SETBLOCK",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER_SETPASSALL", DEFINED, ICMP6_H,"ICMP6_FILTER_SETPASSALL",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER_SETBLOCKALL",DEFINED,ICMP6_H,"ICMP6_FILTER_SETBLOCKALL",
-		NULL, NULL, {0} },
-	{ "ICMP6_FILTER", DEFINED, ICMP6_H, "ICMP6_FILTER", NULL, NULL, {0} },
+	{
+		"icmp6_filter icmp6_filt", EXISTS, ICMP6_H, "icmp6_filter",
+		    "icmp6_filt", "0", {
+	"32"}}, {
+		"icmp6_filter icmp6_filt[0]", EXISTS, ICMP6_H, "icmp6_filter",
+		    "icmp6_filt[0]", "0", {
+	"4"}}, {
+		"ICMP6_FILTER_WILLPASS", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_WILLPASS", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER_WILLBLOCK", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_WILLBLOCK", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER_SETPASS", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_SETPASS", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER_SETBLOCK", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_SETBLOCK", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER_SETPASSALL", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_SETPASSALL", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER_SETBLOCKALL", DEFINED, ICMP6_H,
+		    "ICMP6_FILTER_SETBLOCKALL", NULL, NULL, {
+	0}}, {
+		"ICMP6_FILTER", DEFINED, ICMP6_H, "ICMP6_FILTER", NULL, NULL, {
+	0}},
 /* existence checks, RFC 3542 section 4 */
 /* socket options */
-	{ "IPV6_RECVPKTINFO", VALUE, IN_H, "IPV6_RECVPKTINFO", NULL, NULL,
-		{"IPV6_RECVPKTINFO"} },
-	{ "IPV6_RECVHOPLIMIT", VALUE, IN_H, "IPV6_RECVHOPLIMIT", NULL, NULL,
-		{"IPV6_RECVHOPLIMIT"} },
-	{ "IPV6_RECVRTHDR", VALUE, IN_H, "IPV6_RECVRTHDR", NULL, NULL,
-		{"IPV6_RECVRTHDR"} },
-	{ "IPV6_RECVHOPOPTS", VALUE, IN_H, "IPV6_RECVHOPOPTS", NULL, NULL,
-		{"IPV6_RECVHOPOPTS"} },
-	{ "IPV6_RECVDSTOPTS", VALUE, IN_H, "IPV6_RECVDSTOPTS", NULL, NULL,
-		{"IPV6_RECVDSTOPTS"} },
-	{ "IPV6_RECVTCLASS", VALUE, IN_H, "IPV6_RECVTCLASS", NULL, NULL,
-		{"IPV6_RECVTCLASS"} },
+	{
+		"IPV6_RECVPKTINFO", VALUE, IN_H, "IPV6_RECVPKTINFO", NULL, NULL, {
+	"IPV6_RECVPKTINFO"}}, {
+		"IPV6_RECVHOPLIMIT", VALUE, IN_H, "IPV6_RECVHOPLIMIT", NULL,
+		    NULL, {
+	"IPV6_RECVHOPLIMIT"}}, {
+		"IPV6_RECVRTHDR", VALUE, IN_H, "IPV6_RECVRTHDR", NULL, NULL, {
+	"IPV6_RECVRTHDR"}}, {
+		"IPV6_RECVHOPOPTS", VALUE, IN_H, "IPV6_RECVHOPOPTS", NULL, NULL, {
+	"IPV6_RECVHOPOPTS"}}, {
+		"IPV6_RECVDSTOPTS", VALUE, IN_H, "IPV6_RECVDSTOPTS", NULL, NULL, {
+	"IPV6_RECVDSTOPTS"}}, {
+		"IPV6_RECVTCLASS", VALUE, IN_H, "IPV6_RECVTCLASS", NULL, NULL, {
+	"IPV6_RECVTCLASS"}},
 /* cmsg types */
-	{ "IPV6_PKTINFO", DEFINED, IN_H, "IPV6_PKTINFO", NULL, NULL, {0} },
-	{ "IPV6_HOPLIMIT", DEFINED, IN_H, "IPV6_HOPLIMIT", NULL, NULL, {0} },
-	{ "IPV6_NEXTHOP", DEFINED, IN_H, "IPV6_NEXTHOP", NULL, NULL, {0} },
-	{ "IPV6_RTHDR", DEFINED, IN_H, "IPV6_RTHDR", NULL, NULL, {0} },
-	{ "IPV6_HOPOPTS", DEFINED, IN_H, "IPV6_HOPOPTS", NULL, NULL, {0} },
-	{ "IPV6_DSTOPTS", DEFINED, IN_H, "IPV6_DSTOPTS", NULL, NULL, {0} },
-	{ "IPV6_RTHDRDSTOPTS", DEFINED, IN_H, "IPV6_RTHDRDSTOPTS", NULL, NULL, {0} },
-	{ "IPV6_TCLASS", DEFINED, IN_H, "IPV6_TCLASS", NULL, NULL, {0} },
-};
+	{
+		"IPV6_PKTINFO", DEFINED, IN_H, "IPV6_PKTINFO", NULL, NULL, {
+	0}}, {
+		"IPV6_HOPLIMIT", DEFINED, IN_H, "IPV6_HOPLIMIT", NULL, NULL, {
+	0}}, {
+		"IPV6_NEXTHOP", DEFINED, IN_H, "IPV6_NEXTHOP", NULL, NULL, {
+	0}}, {
+		"IPV6_RTHDR", DEFINED, IN_H, "IPV6_RTHDR", NULL, NULL, {
+	0}}, {
+		"IPV6_HOPOPTS", DEFINED, IN_H, "IPV6_HOPOPTS", NULL, NULL, {
+	0}}, {
+		"IPV6_DSTOPTS", DEFINED, IN_H, "IPV6_DSTOPTS", NULL, NULL, {
+	0}}, {
+		"IPV6_RTHDRDSTOPTS", DEFINED, IN_H, "IPV6_RTHDRDSTOPTS", NULL,
+		    NULL, {
+	0}}, {
+		"IPV6_TCLASS", DEFINED, IN_H, "IPV6_TCLASS", NULL, NULL, {
+0}},};
 
 #define ETCOUNT	(sizeof(etab)/sizeof(etab[0]))
 
 /*  existence tests */
-void
-icmp6_et(void)
+void icmp6_et(void)
 {
-	int	i;
+	int i;
 
-	for (i=0; i<ETCOUNT; ++i) {
+	for (i = 0; i < ETCOUNT; ++i) {
 		switch (etab[i].et_type) {
 		case EXISTS:
 			structcheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_field,
-				etab[i].et_offset, etab[i].et_value);
+				    etab[i].et_struct, etab[i].et_field,
+				    etab[i].et_offset, etab[i].et_value);
 			break;
 		case ALIAS:
 			aliascheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_field,
-				etab[i].et_dname);
+				   etab[i].et_struct, etab[i].et_field,
+				   etab[i].et_dname);
 			break;
 		case VALUE:
 			valuecheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_dname);
+				   etab[i].et_struct, etab[i].et_dname);
 			break;
 		case DEFINED:
 			funccheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct);
+				  etab[i].et_struct);
 			break;
 		default:
-			tst_resm(TBROK, "invalid type %d",
-				etab[i].et_type);
+			tst_resm(TBROK, "invalid type %d", etab[i].et_type);
 			break;
 		}
 	}
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 	tst_require_root(NULL);
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
@@ -197,36 +213,36 @@
 /*#define icmp_filt	data */
 
 enum tt { T_WILLPASS, T_WILLBLOCK, T_SETPASS, T_SETBLOCK, T_SETPASSALL,
-		T_SETBLOCKALL };
-struct ftent {
-	char		*ft_tname;	/* test name, for logging */
-	unsigned char	ft_sndtype;	/* send type field */
-	unsigned char	ft_flttype;	/* filter type field */
-	enum tt		ft_test;	/* what macro to test */
-	int		ft_expected;	/* packet should pass? */
-} ftab[] = {
-	{ "ICMP6_FILTER_SETPASS s 20 f 20", 20, 20,  T_SETPASS, 1 },
-	{ "ICMP6_FILTER_SETPASS s 20 f 21", 20, 21, T_SETPASS, 0 },
-	{ "ICMP6_FILTER_SETBLOCK s 20 f 20", 20, 20, T_SETBLOCK, 0 },
-	{ "ICMP6_FILTER_SETBLOCK s 20 f 21", 20, 21, T_SETBLOCK, 1 },
-	{ "ICMP6_FILTER_PASSALL s 20", 20, 0, T_SETPASSALL, 1 },
-	{ "ICMP6_FILTER_PASSALL s 20", 21, 0, T_SETPASSALL, 1 },
-	{ "ICMP6_FILTER_BLOCKALL s 20", 20, 0, T_SETBLOCKALL, 0 },
-	{ "ICMP6_FILTER_BLOCKALL s 20", 21, 0, T_SETBLOCKALL, 0 },
-	{ "ICMP6_FILTER_WILLBLOCK s 20 f 21", 20, 21, T_WILLBLOCK, 0 },
-	{ "ICMP6_FILTER_WILLBLOCK s 20 f 20", 20, 20, T_WILLBLOCK, 1 },
-	{ "ICMP6_FILTER_WILLPASS s 20 f 21", 20, 21, T_WILLPASS, 0 },
-	{ "ICMP6_FILTER_WILLPASS s 22 f 22", 22, 22, T_WILLPASS, 1 },
+	T_SETBLOCKALL
 };
+struct ftent {
+	char *ft_tname;		/* test name, for logging */
+	unsigned char ft_sndtype;	/* send type field */
+	unsigned char ft_flttype;	/* filter type field */
+	enum tt ft_test;	/* what macro to test */
+	int ft_expected;	/* packet should pass? */
+} ftab[] = {
+	{
+	"ICMP6_FILTER_SETPASS s 20 f 20", 20, 20, T_SETPASS, 1}, {
+	"ICMP6_FILTER_SETPASS s 20 f 21", 20, 21, T_SETPASS, 0}, {
+	"ICMP6_FILTER_SETBLOCK s 20 f 20", 20, 20, T_SETBLOCK, 0}, {
+	"ICMP6_FILTER_SETBLOCK s 20 f 21", 20, 21, T_SETBLOCK, 1}, {
+	"ICMP6_FILTER_PASSALL s 20", 20, 0, T_SETPASSALL, 1}, {
+	"ICMP6_FILTER_PASSALL s 20", 21, 0, T_SETPASSALL, 1}, {
+	"ICMP6_FILTER_BLOCKALL s 20", 20, 0, T_SETBLOCKALL, 0}, {
+	"ICMP6_FILTER_BLOCKALL s 20", 21, 0, T_SETBLOCKALL, 0}, {
+	"ICMP6_FILTER_WILLBLOCK s 20 f 21", 20, 21, T_WILLBLOCK, 0}, {
+	"ICMP6_FILTER_WILLBLOCK s 20 f 20", 20, 20, T_WILLBLOCK, 1}, {
+	"ICMP6_FILTER_WILLPASS s 20 f 21", 20, 21, T_WILLPASS, 0}, {
+"ICMP6_FILTER_WILLPASS s 22 f 22", 22, 22, T_WILLPASS, 1},};
 
 #define FTCOUNT	(sizeof(ftab)/sizeof(ftab[0]))
 
-int
-ic6_send1(char *tname, unsigned char type)
+int ic6_send1(char *tname, unsigned char type)
 {
-	struct sockaddr_in6	sin6;
-	struct icmp6_hdr	ic6;
-	int			s;
+	struct sockaddr_in6 sin6;
+	struct icmp6_hdr ic6;
+	int s;
 
 	s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
 	if (s == -1) {
@@ -241,22 +257,21 @@
 	sin6.sin6_family = AF_INET6;
 	sin6.sin6_addr = in6addr_loopback;
 	if (sendto(s, &ic6, sizeof(ic6), 0, (struct sockaddr *)&sin6,
-			sizeof(sin6)) == -1) {
-		tst_resm(TBROK|TERRNO, "%s: sendto failed", tname);
+		   sizeof(sin6)) == -1) {
+		tst_resm(TBROK | TERRNO, "%s: sendto failed", tname);
 		return 1;
 	}
 	return 0;
 }
 
-int
-ic6_recv1(char *tname, int sall, int sf)
+int ic6_recv1(char *tname, int sall, int sf)
 {
-	fd_set	readfds, readfds_saved;
-	struct timeval	tv;
-	int	maxfd, nfds;
-	int	gotall, gotone;
-	int	cc;
-	static	unsigned char rbuf[2048];
+	fd_set readfds, readfds_saved;
+	struct timeval tv;
+	int maxfd, nfds;
+	int gotall, gotone;
+	int cc;
+	static unsigned char rbuf[2048];
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 250000;
@@ -274,21 +289,21 @@
 	 * updating tv with time elapsed)
 	 */
 	while (!gotall || !gotone) {
-		struct icmp6_hdr	*pic6 = (struct icmp6_hdr *)rbuf;
+		struct icmp6_hdr *pic6 = (struct icmp6_hdr *)rbuf;
 
-		nfds = select(maxfd+1, &readfds, 0, 0, &tv);
+		nfds = select(maxfd + 1, &readfds, 0, 0, &tv);
 		if (nfds == 0)
 			break;	/* timed out */
 		if (nfds < 0) {
 			if (errno == EINTR)
 				continue;
-			tst_resm(TBROK|TERRNO, "%s: select failed", tname);
+			tst_resm(TBROK | TERRNO, "%s: select failed", tname);
 		}
 		if (FD_ISSET(sall, &readfds)) {
 			cc = recv(sall, rbuf, sizeof(rbuf), 0);
 			if (cc < 0) {
-				tst_resm(TBROK|TERRNO,
-				    "%s: recv(sall, ..) failed", tname);
+				tst_resm(TBROK | TERRNO,
+					 "%s: recv(sall, ..) failed", tname);
 				return -1;
 			}
 			/* if packet check succeeds... */
@@ -298,8 +313,8 @@
 		if (FD_ISSET(sf, &readfds)) {
 			cc = recv(sf, rbuf, sizeof(rbuf), 0);
 			if (cc < 0) {
-				tst_resm(TBROK|TERRNO,
-				    "%s: recv(sf, ..) failed", tname);
+				tst_resm(TBROK | TERRNO,
+					 "%s: recv(sf, ..) failed", tname);
 				return -1;
 			}
 			/* if packet check succeeds... */
@@ -318,28 +333,29 @@
 }
 
 /* functional tests */
-void
-icmp6_ft(void)
+void icmp6_ft(void)
 {
-	struct icmp6_filter	i6f;
+	struct icmp6_filter i6f;
 	int sall, sf;
 	int i;
 
 	sall = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
 	if (sall < 0) {
-		tst_resm(TBROK|TERRNO,
-			"icmp6_ft socket: can't create sall socket");
+		tst_resm(TBROK | TERRNO,
+			 "icmp6_ft socket: can't create sall socket");
 		return;
 	}
 	ICMP6_FILTER_SETPASSALL(&i6f);
 	if (setsockopt(sall, IPPROTO_ICMPV6, ICMP6_FILTER, &i6f,
-			sizeof(i6f)) < 0) {
-		tst_resm(TBROK|TERRNO, "setsockopt pass all ICMP6_FILTER failed");
+		       sizeof(i6f)) < 0) {
+		tst_resm(TBROK | TERRNO,
+			 "setsockopt pass all ICMP6_FILTER failed");
 	}
 
 	sf = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
 	if (sf < 0) {
-		tst_resm(TBROK|TERRNO, "icmp6_ft socket: can't create test socket");
+		tst_resm(TBROK | TERRNO,
+			 "icmp6_ft socket: can't create test socket");
 		return;
 	}
 
@@ -376,14 +392,15 @@
 			break;
 		default:
 			tst_resm(TBROK, "%s: unknown test type %d",
-				ftab[i].ft_tname, ftab[i].ft_test);
+				 ftab[i].ft_tname, ftab[i].ft_test);
 			continue;
 		}
 		if (ftab[i].ft_test != T_WILLBLOCK &&
 		    ftab[i].ft_test != T_WILLPASS) {
 			if (setsockopt(sf, IPPROTO_ICMPV6, ICMP6_FILTER, &i6f,
-					sizeof(i6f)) < 0) {
-				tst_resm(TFAIL|TERRNO, "setsockopt ICMP6_FILTER");
+				       sizeof(i6f)) < 0) {
+				tst_resm(TFAIL | TERRNO,
+					 "setsockopt ICMP6_FILTER");
 				continue;
 			}
 			if (ic6_send1(ftab[i].ft_tname, ftab[i].ft_sndtype))
@@ -396,7 +413,7 @@
 			continue;
 		if (rv != ftab[i].ft_expected)
 			tst_resm(TFAIL, "%s: rv %d != expected %d",
-				ftab[i].ft_tname, rv, ftab[i].ft_expected);
+				 ftab[i].ft_tname, rv, ftab[i].ft_expected);
 		else
 			tst_resm(TPASS, ftab[i].ft_tname);
 	}
diff --git a/testcases/network/lib6/asapi_06.c b/testcases/network/lib6/asapi_06.c
index 381a662..60bc04d 100644
--- a/testcases/network/lib6/asapi_06.c
+++ b/testcases/network/lib6/asapi_06.c
@@ -59,15 +59,15 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="asapi_06";		/* Test program identifier.    */
+char *TCID = "asapi_06";	/* Test program identifier.    */
 
 int TST_TOTAL = 1;
 
 pid_t pid;
 
 struct {
-	char	*prt_name;
-	int	prt_value;
+	char *prt_name;
+	int prt_value;
 } ptab[] = {
 };
 
@@ -78,8 +78,7 @@
 void do_tests(void);
 void setup(void), cleanup(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	char *msg;
 	int lc;
@@ -142,15 +141,15 @@
 #endif
 
 union soval {
-	struct in6_pktinfo	sou_pktinfo;
-	int			sou_hoplimit;
-	struct sockaddr_in6	sou_nexthop;
-	struct ip6_rthdr	sou_rthdr;
-	struct ip6_hbh		sou_hopopts;
-	struct ip6_dest		sou_dstopts;
-	struct ip6_dest		sou_rthdrdstopts;
-	int			sou_tclass;
-	int			sou_bool;
+	struct in6_pktinfo sou_pktinfo;
+	int sou_hoplimit;
+	struct sockaddr_in6 sou_nexthop;
+	struct ip6_rthdr sou_rthdr;
+	struct ip6_hbh sou_hopopts;
+	struct ip6_dest sou_dstopts;
+	struct ip6_dest sou_rthdrdstopts;
+	int sou_tclass;
+	int sou_bool;
 };
 
 /* in6_addr initializer for loopback interface */
@@ -159,51 +158,65 @@
 
 /* so_clrval and so_setval members are initilized in the body */
 struct soent {
-	char		*so_tname;
-	int		so_opt;
-	int		so_dorecv;	/* do receive test? */
-	int		so_cmtype;
-	int		so_clear;	/* get fresh socket? */
-	union soval	so_clrval;
-	union soval	so_setval;
-	socklen_t	so_valsize;
+	char *so_tname;
+	int so_opt;
+	int so_dorecv;		/* do receive test? */
+	int so_cmtype;
+	int so_clear;		/* get fresh socket? */
+	union soval so_clrval;
+	union soval so_setval;
+	socklen_t so_valsize;
 } sotab[] = {
 /* RFC 3542, Section 4 */
-	{ "IPV6_RECVPKTINFO", IPV6_RECVPKTINFO, 1, IPV6_PKTINFO, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_RECVHOPLIMIT", IPV6_RECVHOPLIMIT, 1, IPV6_HOPLIMIT, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_RECVRTHDR", IPV6_RECVRTHDR, 0, IPV6_RTHDR, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_RECVHOPOPTS", IPV6_RECVHOPOPTS, 0, IPV6_HOPOPTS, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_RECVDSTOPTS", IPV6_RECVDSTOPTS, 0, IPV6_DSTOPTS, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_RECVTCLASS", IPV6_RECVTCLASS, 1, IPV6_TCLASS, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
+	{
+		"IPV6_RECVPKTINFO", IPV6_RECVPKTINFO, 1, IPV6_PKTINFO, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_RECVHOPLIMIT", IPV6_RECVHOPLIMIT, 1, IPV6_HOPLIMIT, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_RECVRTHDR", IPV6_RECVRTHDR, 0, IPV6_RTHDR, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_RECVHOPOPTS", IPV6_RECVHOPOPTS, 0, IPV6_HOPOPTS, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_RECVDSTOPTS", IPV6_RECVDSTOPTS, 0, IPV6_DSTOPTS, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_RECVTCLASS", IPV6_RECVTCLASS, 1, IPV6_TCLASS, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)},
 /* make sure TCLASS stays when setting another opt */
-	{ "IPV6_RECVTCLASS (2)", IPV6_RECVHOPLIMIT, 1, IPV6_TCLASS, 0,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
+	{
+		"IPV6_RECVTCLASS (2)", IPV6_RECVHOPLIMIT, 1, IPV6_TCLASS, 0, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)},
 /* OLD values */
-	{ "IPV6_2292PKTINFO", IPV6_2292PKTINFO, 1, IPV6_2292PKTINFO, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_2292HOPLIMIT", IPV6_2292HOPLIMIT, 1, IPV6_2292HOPLIMIT, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_2292RTHDR", IPV6_2292RTHDR, 0, IPV6_2292RTHDR, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_2292HOPOPTS", IPV6_2292HOPOPTS, 0, IPV6_2292HOPOPTS, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-	{ "IPV6_2292DSTOPTS", IPV6_2292DSTOPTS, 0, IPV6_2292DSTOPTS, 1,
-		{{{{{0}}}}}, {{{{{0}}}}}, sizeof(int) },
-};
+	{
+		"IPV6_2292PKTINFO", IPV6_2292PKTINFO, 1, IPV6_2292PKTINFO, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_2292HOPLIMIT", IPV6_2292HOPLIMIT, 1, IPV6_2292HOPLIMIT, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_2292RTHDR", IPV6_2292RTHDR, 0, IPV6_2292RTHDR, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_2292HOPOPTS", IPV6_2292HOPOPTS, 0, IPV6_2292HOPOPTS, 1, { { { { {
+		0}}}}}, { { { { {
+	0}}}}}, sizeof(int)}, {
+		"IPV6_2292DSTOPTS", IPV6_2292DSTOPTS, 0, IPV6_2292DSTOPTS, 1, { { { { {
+		0}}}}}, { { { { {
+0}}}}}, sizeof(int)},};
 
 #define SOCOUNT	(sizeof(sotab)/sizeof(sotab[0]))
 
 struct soprot {
-	int		sop_pid;	/* sender PID */
-	int		sop_seq;	/* sequence # */
-	int		sop_dlen;	/* tp_dat length */
-	unsigned char	sop_dat[0];	/* user data */
+	int sop_pid;		/* sender PID */
+	int sop_seq;		/* sequence # */
+	int sop_dlen;		/* tp_dat length */
+	unsigned char sop_dat[0];	/* user data */
 };
 
 unsigned char tpbuf[sizeof(struct soprot) + 2048];
@@ -214,35 +227,39 @@
 
 int seq;
 
-int
-setupso(void)
+int setupso(void)
 {
 /* add routing headers, other ancillary data here */
 	return 0;
 }
 
 struct cme {
-	int	cm_len;
-	int	cm_level;
-	int	cm_type;
+	int cm_len;
+	int cm_level;
+	int cm_type;
 	union {
-	        uint32_t cmu_tclass;
+		uint32_t cmu_tclass;
 		uint32_t cmu_hops;
 	} cmu;
 } cmtab[] = {
-	{ sizeof(uint32_t), SOL_IPV6, IPV6_TCLASS, {0x12} },
-	{ sizeof(uint32_t), SOL_IPV6, IPV6_HOPLIMIT, {0x21} },
-};
+	{
+		sizeof(uint32_t), SOL_IPV6, IPV6_TCLASS, {
+		0x12}
+	}
+	, {
+		sizeof(uint32_t), SOL_IPV6, IPV6_HOPLIMIT, {
+		0x21}
+	}
+,};
 
 #define CMCOUNT	(sizeof(cmtab)/sizeof(cmtab[0]))
 
-ssize_t
-sendall(int st)
+ssize_t sendall(int st)
 {
 	struct sockaddr_in6 sin6;
 	struct msghdr msg;
 	struct iovec iov;
-	struct soprot	*psop;
+	struct soprot *psop;
 	unsigned char *pd;
 	int i, ctotal;
 
@@ -265,8 +282,8 @@
 
 	pd = control;
 	ctotal = 0;
-	for (i=0; i<CMCOUNT; ++i) {
-		struct cmsghdr *pcmsg = (struct cmsghdr *) pd;
+	for (i = 0; i < CMCOUNT; ++i) {
+		struct cmsghdr *pcmsg = (struct cmsghdr *)pd;
 
 		pcmsg->cmsg_len = CMSG_LEN(cmtab[i].cm_len);
 		pcmsg->cmsg_level = cmtab[i].cm_level;
@@ -281,27 +298,26 @@
 	return sendmsg(st, &msg, 0);
 }
 
-void
-so_test(struct soent *psoe)
+void so_test(struct soent *psoe)
 {
 	struct sockaddr_in6 sin6;
-	union soval	sobuf;
-        socklen_t valsize;
+	union soval sobuf;
+	socklen_t valsize;
 	static int sr = -1;
 	int st;
 
 	if (psoe->so_opt == -1) {
 		tst_resm(TBROK, "%s not present at compile time",
-			psoe->so_tname);
+			 psoe->so_tname);
 		return;
 	}
 	if (psoe->so_clear || sr < 0) {
-		if (sr <  0)
+		if (sr < 0)
 			close(sr);
 		sr = socket(PF_INET6, SOCK_RAW, NH_TEST);
 		if (sr < 0) {
 			tst_resm(TBROK, "%s socket: %s", psoe->so_tname,
-				strerror(errno));
+				 strerror(errno));
 			return;
 		}
 	}
@@ -310,26 +326,26 @@
 	sin6.sin6_addr = in6addr_loopback;
 	if (bind(sr, (struct sockaddr *)&sin6, sizeof(sin6)) < 0) {
 		tst_resm(TBROK, "%s: bind: %s", psoe->so_tname,
-			strerror(errno));
+			 strerror(errno));
 	}
 	if (setsockopt(sr, SOL_IPV6, psoe->so_opt, &psoe->so_clrval,
-	    psoe->so_valsize) < 0) {
+		       psoe->so_valsize) < 0) {
 		tst_resm(TBROK, "%s: setsockopt: %s", psoe->so_tname,
-			strerror(errno));
+			 strerror(errno));
 		return;
 	}
 	TEST(setsockopt(sr, SOL_IPV6, psoe->so_opt, &psoe->so_setval,
-		psoe->so_valsize));
+			psoe->so_valsize));
 	if (TEST_RETURN != 0) {
 		tst_resm(TFAIL, "%s set-get: setsockopt: %s", psoe->so_tname,
-			strerror(errno));
+			 strerror(errno));
 		return;
 	}
 	valsize = psoe->so_valsize;
 	TEST(getsockopt(sr, SOL_IPV6, psoe->so_opt, &sobuf, &valsize));
 	if (TEST_RETURN != 0) {
 		tst_resm(TBROK, "%s set-get: getsockopt: %s", psoe->so_tname,
-				strerror(errno));
+			 strerror(errno));
 		return;
 	} else if (memcmp(&psoe->so_setval, &sobuf, psoe->so_valsize))
 		tst_resm(TFAIL, "%s set-get optval != setval", psoe->so_tname);
@@ -339,26 +355,27 @@
 	st = socket(PF_INET6, SOCK_RAW, NH_TEST);
 	if (st < 0) {
 		tst_resm(TBROK, "%s transmit socket: %s", psoe->so_tname,
-			strerror(errno));
+			 strerror(errno));
 		return;
 	}
 	if (sendall(st) < 0) {
 		tst_resm(TBROK, "%s transmit sendto: %s", psoe->so_tname,
-			strerror(errno));
+			 strerror(errno));
 		close(st);
 		return;
 	}
 	close(st);
 
 	/* receiver processing */
-	{ fd_set rfds, rfds_saved;
-	  int nfds, cc;
-	  int gotone;
-	  struct timeval tv;
-	  struct msghdr msg;
-	  unsigned char cmsg[2048];
-	  struct cmsghdr *pcmsg;
-	  struct iovec iov;
+	{
+		fd_set rfds, rfds_saved;
+		int nfds, cc;
+		int gotone;
+		struct timeval tv;
+		struct msghdr msg;
+		unsigned char cmsg[2048];
+		struct cmsghdr *pcmsg;
+		struct iovec iov;
 
 		FD_ZERO(&rfds_saved);
 		FD_SET(sr, &rfds_saved);
@@ -368,17 +385,17 @@
 
 		while (1) {
 			memcpy(&rfds, &rfds_saved, sizeof(rfds));
-			nfds = select(sr+1, &rfds, 0, 0, &tv);
+			nfds = select(sr + 1, &rfds, 0, 0, &tv);
 			if (nfds < 0) {
 				if (errno == EINTR)
 					continue;
 				tst_resm(TBROK, "%s select: %s", psoe->so_tname,
-					strerror(errno));
+					 strerror(errno));
 				return;
 			}
 			if (nfds == 0) {
 				tst_resm(TBROK, "%s recvmsg timed out",
-					psoe->so_tname);
+					 psoe->so_tname);
 				return;
 			}
 			/* else, nfds == 1 */
@@ -394,9 +411,9 @@
 			msg.msg_controllen = sizeof(cmsg);
 
 			cc = recvmsg(sr, &msg, 0);
-			if (cc  < 0) {
+			if (cc < 0) {
 				tst_resm(TBROK, "%s recvmsg: %s",
-					psoe->so_tname, strerror(errno));
+					 psoe->so_tname, strerror(errno));
 				return;
 			}
 /* check pid & seq here */
@@ -404,7 +421,7 @@
 		}
 		gotone = 0;
 		for (pcmsg = CMSG_FIRSTHDR(&msg); pcmsg != NULL;
-				pcmsg = CMSG_NXTHDR(&msg, pcmsg)) {
+		     pcmsg = CMSG_NXTHDR(&msg, pcmsg)) {
 			if (!psoe->so_dorecv)
 				break;
 			gotone = pcmsg->cmsg_level == SOL_IPV6 &&
@@ -413,16 +430,16 @@
 				break;
 			else if (psoe->so_clear) {
 				tst_resm(TFAIL, "%s receive: extraneous data "
-					"in control: level %d type %d len %zu",
-					psoe->so_tname, pcmsg->cmsg_level,
-					pcmsg->cmsg_type, pcmsg->cmsg_len);
+					 "in control: level %d type %d len %zu",
+					 psoe->so_tname, pcmsg->cmsg_level,
+					 pcmsg->cmsg_type, pcmsg->cmsg_len);
 				return;
 			}
 		}
 /* check contents here */
 		if (psoe->so_dorecv)
 			tst_resm(gotone ? TPASS : TFAIL, "%s receive",
-				psoe->so_tname);
+				 psoe->so_tname);
 	}
 }
 
@@ -439,7 +456,7 @@
 		return IPV6_ADDR_NODE;
 	return IPV6_ADDR_GLOBAL;
 }
-#endif	/* HAVE_IFADDRS_H */
+#endif /* HAVE_IFADDRS_H */
 
 int getsock(char *tname, struct sockaddr_in6 *psin6_arg, int scope)
 {
@@ -459,7 +476,7 @@
 		ifindex = psin6_arg->sin6_scope_id;
 
 	/* first, find a global address */
-	for (pifa=pifa_head; pifa; pifa=pifa->ifa_next) {
+	for (pifa = pifa_head; pifa; pifa = pifa->ifa_next) {
 		int this_scope;
 
 		if (!(pifa->ifa_flags & IFF_UP))
@@ -478,18 +495,20 @@
 			continue;
 		s = socket(PF_INET6, SOCK_DGRAM, 0);
 		if (s < 0) {
-			tst_resm(TBROK, "%s: socket %s", tname,strerror(errno));
+			tst_resm(TBROK, "%s: socket %s", tname,
+				 strerror(errno));
 			return -1;
 		}
 		if (bind(s, pifa->ifa_addr, sizeof(struct sockaddr_in6)) < 0) {
 			tst_resm(TBROK, "%s: bind \"%s\": %s", tname,
-				inet_ntop(AF_INET6, &psin6->sin6_addr, strbuf,
-					sizeof(strbuf)), strerror(errno));
+				 inet_ntop(AF_INET6, &psin6->sin6_addr, strbuf,
+					   sizeof(strbuf)), strerror(errno));
 			return -1;
 		}
 		if (psin6_arg) {
 			*psin6_arg = *psin6;
-			psin6_arg->sin6_scope_id=if_nametoindex(pifa->ifa_name);
+			psin6_arg->sin6_scope_id =
+			    if_nametoindex(pifa->ifa_name);
 		}
 		return s;
 	}
@@ -497,11 +516,18 @@
 		char *scopestr, *intfstr;
 
 		switch (scope) {
-		case IPV6_ADDR_NODE:	scopestr = " node-local"; break;
-		case IPV6_ADDR_LINK:	scopestr = " link-local"; break;
-		case IPV6_ADDR_GLOBAL:	scopestr = " global"; break;
+		case IPV6_ADDR_NODE:
+			scopestr = " node-local";
+			break;
+		case IPV6_ADDR_LINK:
+			scopestr = " link-local";
+			break;
+		case IPV6_ADDR_GLOBAL:
+			scopestr = " global";
+			break;
 		default:
-			scopestr = ""; break;
+			scopestr = "";
+			break;
 		}
 		if (ifindex < 0) {
 			intfstr = " not on ifindex";
@@ -513,10 +539,10 @@
 
 		if (intfstr)
 			tst_resm(TBROK, "%s: getsock : no%s addresses%s %d",
-				tname, scopestr, intfstr, ifindex);
+				 tname, scopestr, intfstr, ifindex);
 		else
 			tst_resm(TBROK, "%s: getsock : no%s addresses",
-				tname,  scopestr);
+				 tname, scopestr);
 	}
 	return -1;
 #else /* HAVE_IFADDRS_H */
@@ -531,14 +557,14 @@
  */
 void test_pktinfo(void)
 {
-	int s_snd, s_rcv[3] = {-1, -1, -1 };
-	struct sockaddr_in6	sa_rcv[3];
+	int s_snd, s_rcv[3] = { -1, -1, -1 };
+	struct sockaddr_in6 sa_rcv[3];
 	int s, i;
 	struct ifaddrs *pifa_head, *pifa;
 	struct sockaddr_in6 *psin6;
 	char strbuf[128];
 	char *tname = "IPV6_PKTINFO";
-	struct in6_pktinfo	pi, pi_tmp;
+	struct in6_pktinfo pi, pi_tmp;
 	int sinlen;
 	int optlen;
 
@@ -559,7 +585,7 @@
 	s_rcv[1] = getsock(tname, &sa_rcv[1], IPV6_ADDR_LINK);
 	if (s_rcv[1] < 0) {
 		tst_resm(TBROK, "%s: no link-local address on ifindex %d",
-			tname, sa_rcv[0].sin6_scope_id);
+			 tname, sa_rcv[0].sin6_scope_id);
 		return;
 	}
 	/* link-local-scope address, interface Y */
@@ -590,10 +616,10 @@
 	else if (memcmp(&pi, &pi_tmp, sizeof(pi)) != 0) {
 		char strbuf2[64];
 		tst_resm(TFAIL, "%s: {\"%s\",%d} != {\"%s\",%d}", tname,
-			inet_ntop(AF_INET6, &pi_tmp.ipi6_addr, strbuf,
-				sizeof(strbuf)), pi_tmp.ipi6_ifindex,
-			inet_ntop(AF_INET6, &pi.ipi6_addr, strbuf2,
-				sizeof(strbuf2)), pi.ipi6_ifindex);
+			 inet_ntop(AF_INET6, &pi_tmp.ipi6_addr, strbuf,
+				   sizeof(strbuf)), pi_tmp.ipi6_ifindex,
+			 inet_ntop(AF_INET6, &pi.ipi6_addr, strbuf2,
+				   sizeof(strbuf2)), pi.ipi6_ifindex);
 	} else
 		tst_resm(TPASS, "%s", tname);
 /* ancillary data override */
@@ -604,7 +630,7 @@
 	TEST(setsockopt(s_snd, SOL_IPV6, IPV6_PKTINFO, &pi, sizeof(pi)));
 	if (TEST_RETURN == 0)
 		tst_resm(TFAIL, "%s returns success, should be -1, EINVAL",
-			tname);
+			 tname);
 	else if (TEST_ERRNO != EINVAL)
 		tst_resm(TFAIL, "%s errno %d != %d", tname, TEST_ERRNO, EINVAL);
 	else
@@ -617,12 +643,11 @@
 }
 #endif /* notyet */
 
-void
-do_tests(void)
+void do_tests(void)
 {
-	int	i;
+	int i;
 
-	for (i=0; i<SOCOUNT; ++i) {
+	for (i = 0; i < SOCOUNT; ++i) {
 		sotab[i].so_clrval.sou_bool = 0;
 		sotab[i].so_setval.sou_bool = 1;
 		so_test(&sotab[i]);
@@ -632,14 +657,12 @@
 #endif /* notyet - see test_pktinfo() comment above */
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
diff --git a/testcases/network/lib6/asapi_07.c b/testcases/network/lib6/asapi_07.c
index dc2eb40..2968cc8 100644
--- a/testcases/network/lib6/asapi_07.c
+++ b/testcases/network/lib6/asapi_07.c
@@ -49,7 +49,7 @@
 #include "usctest.h"
 #include "runcc.h"
 
-char *TCID="asapi_07";		/* Test program identifier.    */
+char *TCID = "asapi_07";	/* Test program identifier.    */
 
 void setup(void);
 void cleanup(void);
@@ -57,11 +57,10 @@
 void adatet(void);
 void adatft(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int	lc;
-	char	*msg;
+	int lc;
+	char *msg;
 
 	/* Parse standard options given to run the test. */
 	if ((msg = parse_opts(argc, argv, NULL, NULL)) != NULL)
@@ -81,74 +80,86 @@
 enum ttype { EXISTS, ALIAS, VALUE, DEFINED };
 
 struct etent {
-	char	*et_tname;		/* test name */
-	int	et_type;		/* test type */
-	char	*et_incl;		/* include file list */
-	char	*et_struct;		/* structure name */
-	char	*et_field;		/* field name */
-	char	*et_offset;		/* field offset */
+	char *et_tname;		/* test name */
+	int et_type;		/* test type */
+	char *et_incl;		/* include file list */
+	char *et_struct;	/* structure name */
+	char *et_field;		/* field name */
+	char *et_offset;	/* field offset */
 	union {
-		char	*fu_value;	/* field size or value */
-		char	*fu_dname;	/* #define name */
+		char *fu_value;	/* field size or value */
+		char *fu_dname;	/* #define name */
 	} ftun;
 #define et_value	ftun.fu_value
 #define et_dname	ftun.fu_dname
 } etab[] = {
 /* existence checks, RFC 3542 sections 5, 20 */
-	{ "msghdr msg_name", EXISTS, SOCKET_H, "msghdr",
-		"msg_name", NULL, {"sizeof(void *)"} },
-	{ "msghdr msg_namelen", EXISTS, SOCKET_H, "msghdr",
-		"msg_namelen", NULL, {"sizeof(socklen_t)"} },
-	{ "msghdr msg_iov", EXISTS, SOCKET_H, "msghdr",
-		"msg_iov", NULL, {"sizeof(struct iovec *)"} },
-	{ "msghdr msg_iovlen", EXISTS, SOCKET_H, "msghdr",
-		"msg_iovlen", NULL, {"sizeof(struct iovec *)"} },
-	{ "msghdr msg_control", EXISTS, SOCKET_H, "msghdr",
-		"msg_control", NULL, {"sizeof(void *)"} },
-	{ "msghdr msg_controllen", EXISTS, SOCKET_H, "msghdr",
-		"msg_controllen", NULL, {"sizeof(socklen_t)"} },
-	{ "msghdr msg_flags", EXISTS, SOCKET_H, "msghdr",
-		"msg_flags", NULL, {"sizeof(int)"} },
-	{ "cmsghdr cmsg_len", EXISTS, SOCKET_H, "cmsghdr",
-		"cmsg_len", NULL, {"sizeof(socklen_t)"} },
-	{ "cmsghdr cmsg_level", EXISTS, SOCKET_H, "cmsghdr",
-		"cmsg_level", NULL, {"sizeof(int)"} },
-	{ "cmsghdr cmsg_type", EXISTS, SOCKET_H, "cmsghdr",
-		"cmsg_type", NULL, {"sizeof(int)"} },
-	{ "CMSG_DATA", DEFINED, SOCKET_H, "CMSG_DATA", NULL, NULL, {0}},
-	{ "CMSG_NXTHDR", DEFINED, SOCKET_H, "CMSG_NXTHDR", NULL, NULL, {0}},
-	{ "CMSG_FIRSTHDR", DEFINED, SOCKET_H, "CMSG_FIRSTHDR", NULL, NULL, {0}},
-	{ "CMSG_SPACE", DEFINED, SOCKET_H, "CMSG_SPACE", NULL, NULL, {0}},
-	{ "CMSG_LEN", DEFINED, SOCKET_H, "CMSG_LEN", NULL, NULL, {0}},
-};
+	{
+		"msghdr msg_name", EXISTS, SOCKET_H, "msghdr", "msg_name", NULL, {
+	"sizeof(void *)"}}, {
+		"msghdr msg_namelen", EXISTS, SOCKET_H, "msghdr",
+		    "msg_namelen", NULL, {
+	"sizeof(socklen_t)"}}, {
+		"msghdr msg_iov", EXISTS, SOCKET_H, "msghdr", "msg_iov", NULL, {
+	"sizeof(struct iovec *)"}}, {
+		"msghdr msg_iovlen", EXISTS, SOCKET_H, "msghdr",
+		    "msg_iovlen", NULL, {
+	"sizeof(struct iovec *)"}}, {
+		"msghdr msg_control", EXISTS, SOCKET_H, "msghdr",
+		    "msg_control", NULL, {
+	"sizeof(void *)"}}, {
+		"msghdr msg_controllen", EXISTS, SOCKET_H, "msghdr",
+		    "msg_controllen", NULL, {
+	"sizeof(socklen_t)"}}, {
+		"msghdr msg_flags", EXISTS, SOCKET_H, "msghdr",
+		    "msg_flags", NULL, {
+	"sizeof(int)"}}, {
+		"cmsghdr cmsg_len", EXISTS, SOCKET_H, "cmsghdr",
+		    "cmsg_len", NULL, {
+	"sizeof(socklen_t)"}}, {
+		"cmsghdr cmsg_level", EXISTS, SOCKET_H, "cmsghdr",
+		    "cmsg_level", NULL, {
+	"sizeof(int)"}}, {
+		"cmsghdr cmsg_type", EXISTS, SOCKET_H, "cmsghdr",
+		    "cmsg_type", NULL, {
+	"sizeof(int)"}}, {
+		"CMSG_DATA", DEFINED, SOCKET_H, "CMSG_DATA", NULL, NULL, {
+	0}}, {
+		"CMSG_NXTHDR", DEFINED, SOCKET_H, "CMSG_NXTHDR", NULL, NULL, {
+	0}}, {
+		"CMSG_FIRSTHDR", DEFINED, SOCKET_H, "CMSG_FIRSTHDR", NULL, NULL, {
+	0}}, {
+		"CMSG_SPACE", DEFINED, SOCKET_H, "CMSG_SPACE", NULL, NULL, {
+	0}}, {
+		"CMSG_LEN", DEFINED, SOCKET_H, "CMSG_LEN", NULL, NULL, {
+0}},};
 
 #define ETCOUNT	(sizeof(etab)/sizeof(etab[0]))
 
 /*  existence tests */
-void
-adatet(void)
+void adatet(void)
 {
-	int	i;
+	int i;
 
-	for (i=0; i<ETCOUNT; ++i) {
+	for (i = 0; i < ETCOUNT; ++i) {
 		switch (etab[i].et_type) {
 		case EXISTS:
 			structcheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_field,
-				etab[i].et_offset, etab[i].et_value);
+				    etab[i].et_struct, etab[i].et_field,
+				    etab[i].et_offset, etab[i].et_value);
 			break;
 		case ALIAS:
 			aliascheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_field,
-				etab[i].et_dname);
+				   etab[i].et_struct, etab[i].et_field,
+				   etab[i].et_dname);
 			break;
 		case VALUE:
 			valuecheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct, etab[i].et_dname);
+				   etab[i].et_struct, etab[i].et_dname);
 			break;
 		case DEFINED:
 			funccheck(etab[i].et_tname, etab[i].et_incl,
-				etab[i].et_struct);
+				  etab[i].et_struct);
 			break;
 		default:
 			tst_resm(TBROK, "invalid type %d", etab[i].et_type);
@@ -157,14 +168,12 @@
 	}
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 }
diff --git a/testcases/network/lib6/getaddrinfo_01.c b/testcases/network/lib6/getaddrinfo_01.c
index 3b56c90..c19fbc7 100644
--- a/testcases/network/lib6/getaddrinfo_01.c
+++ b/testcases/network/lib6/getaddrinfo_01.c
@@ -51,15 +51,14 @@
 #include "usctest.h"
 
 #ifndef AI_V4MAPPED
-# define AI_V4MAPPED    0x0008  /* IPv4 mapped addresses are acceptable.  */
+#define AI_V4MAPPED    0x0008	/* IPv4 mapped addresses are acceptable.  */
 #endif
 
-char *TCID="getaddrinfo_01";		/* Test program identifier.    */
+char *TCID = "getaddrinfo_01";	/* Test program identifier.    */
 int testno;
 
 void setup(void), cleanup(void);
 
-
 int TST_TOTAL = 1;
 
 /* a host that isn't where LTP is running */
@@ -68,8 +67,7 @@
 void gaiv4(void), gaiv6(void);
 void dumpres(struct addrinfo *);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int lc;
 	char *msg;
@@ -88,24 +86,23 @@
 	}
 	cleanup();
 
-	return(0);
+	return (0);
 }
 
 /* getaddrinfo tests (v4) */
 
-void
-gaiv4(void)
+void gaiv4(void)
 {
 	struct addrinfo *aires, hints, *pai;
-	char hostname[MAXHOSTNAMELEN+1];
-	char shortname[MAXHOSTNAMELEN+1];
-	char service[NI_MAXSERV+1];
+	char hostname[MAXHOSTNAMELEN + 1];
+	char shortname[MAXHOSTNAMELEN + 1];
+	char service[NI_MAXSERV + 1];
 	int servnum;
 	char *p;
 
 	if (gethostname(hostname, sizeof(hostname)) < 0)
 		tst_brkm(TBROK, NULL, "gethostname failed - %s",
-			strerror(errno));
+			 strerror(errno));
 	strncpy(shortname, hostname, MAXHOSTNAMELEN);
 	shortname[MAXHOSTNAMELEN] = '\0';
 	p = strchr(shortname, '.');
@@ -134,19 +131,19 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 basic lookup: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 basic lookup");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv4 basic "
-			"lookup (\"%s\") returns %ld (\"%s\")", hostname,
-			TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "lookup (\"%s\") returns %ld (\"%s\")", hostname,
+			 TEST_RETURN, gai_strerror(TEST_RETURN));
 
 	/* test 2, IPv4 canonical name */
 	memset(&hints, 0, sizeof(hints));
@@ -159,18 +156,18 @@
 				break;
 		if (!pai) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 canonical name: no "
-				"entries with canonical name set");
+				 "entries with canonical name set");
 		} else if (strcasecmp(hostname, pai->ai_canonname)) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 canonical name "
-				"(\"%s\") doesn't match hostname (\"%s\")",
-				pai->ai_canonname, hostname);
+				 "(\"%s\") doesn't match hostname (\"%s\")",
+				 pai->ai_canonname, hostname);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 canonical name");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv4 "
-			"canonical name (\"%s\") returns %ld (\"%s\")",
-			shortname, TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "canonical name (\"%s\") returns %ld (\"%s\")",
+			 shortname, TEST_RETURN, gai_strerror(TEST_RETURN));
 
 	/* test 3, IPv4 host+service name */
 
@@ -202,19 +199,19 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 host+service: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 host+service");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv4 host+"
-			"service returns %ld (\"%s\")", TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "service returns %ld (\"%s\")", TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 4, IPv4 hostname+service, AI_PASSIVE */
 	memset(&hints, 0, sizeof(hints));
@@ -246,20 +243,21 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 host+service, PASSIVE"
-				": fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 ": fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
-			tst_resm(TPASS,"getaddrinfo IPv4 host+service PASSIVE");
+			tst_resm(TPASS,
+				 "getaddrinfo IPv4 host+service PASSIVE");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv4 host+"
-			"service, PASSIVE (\"%s\", \"%s\") returns %ld (\"%s\")",
-			hostname, service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "service, PASSIVE (\"%s\", \"%s\") returns %ld (\"%s\")",
+			 hostname, service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 5, IPv4 host+service w/ AI_NUMERICHOST */
 
@@ -271,8 +269,8 @@
 	TEST(getaddrinfo(hostname, service, &hints, &aires));
 	if (TEST_RETURN != EAI_NONAME) {
 		tst_resm(TFAIL, "getaddrinfo IPv4 AI_NUMERICHOST w/ hostname: "
-				"returns %ld expected %d (EAI_NONAME)",
-				TEST_RETURN, EAI_NONAME);
+			 "returns %ld expected %d (EAI_NONAME)",
+			 TEST_RETURN, EAI_NONAME);
 	} else
 		tst_resm(TPASS, "getaddrinfo IPv4 AI_NUMERICHOST w/ hostname");
 	if (!TEST_RETURN)
@@ -307,20 +305,20 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 0+service, PASSIVE:"
-				" fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 " fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 0+service, PASSIVE");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv4 0+service, PASSIVE (\"\", \"%s\") "
-			"returns %ld (\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv4 0+service, PASSIVE (\"\", \"%s\") "
+			 "returns %ld (\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 7, IPv4 0+service */
 
@@ -342,7 +340,7 @@
 			if (pai->ai_addr) {
 				/* hostname not set; addr should be loopback */
 				err |= psin->sin_addr.s_addr !=
-					htonl(INADDR_LOOPBACK);
+				    htonl(INADDR_LOOPBACK);
 				err |= psin->sin_family != AF_INET;
 				err |= psin->sin_port != servnum;
 			}
@@ -351,26 +349,26 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 0+service: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 0+service");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv4 0+service (\"\", \"%s\") returns %ld "
-			"(\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv4 0+service (\"\", \"%s\") returns %ld "
+			 "(\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 8, IPv4 host+service, AI_NUMERICSERV */
 
 #ifndef AI_NUMERICSERV
 	tst_resm(TFAIL, "getaddrinfo IPv4 host+service, AI_NUMERICSERV: flag "
-		"not implemented");
+		 "not implemented");
 #else
 	memset(&hints, 0, sizeof(hints));
 	strcpy(service, "echo");
@@ -379,12 +377,13 @@
 	hints.ai_flags = AI_NUMERICSERV;
 	TEST(getaddrinfo(hostname, service, &hints, &aires));
 	if (TEST_RETURN != EAI_NONAME) {
-		tst_resm(TFAIL,"getaddrinfo IPv4 host+service, AI_NUMERICSERV: "
-				"returns %ld (\"%s\") expected %d (EAI_NONAME)",
-				TEST_RETURN, gai_strerror(TEST_RETURN),
-				EAI_NONAME);
+		tst_resm(TFAIL,
+			 "getaddrinfo IPv4 host+service, AI_NUMERICSERV: "
+			 "returns %ld (\"%s\") expected %d (EAI_NONAME)",
+			 TEST_RETURN, gai_strerror(TEST_RETURN), EAI_NONAME);
 	} else
-		tst_resm(TPASS,"getaddrinfo IPv4 host+service, AI_NUMERICSERV");
+		tst_resm(TPASS,
+			 "getaddrinfo IPv4 host+service, AI_NUMERICSERV");
 	if (!TEST_RETURN)
 		freeaddrinfo(aires);
 #endif /* AI_NUMERICSERV */
@@ -400,11 +399,11 @@
 	TEST(getaddrinfo(0, service, &hints, &aires));
 	if (!TEST_RETURN) {
 		tst_resm(TFAIL, "getaddrinfo IPv4 SOCK_STREAM/IPPROTO_UDP "
-			"hints");
+			 "hints");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TPASS, "getaddrinfo IPv4 SOCK_STREAM/IPPROTO_UDP "
-			"hints");
+			 "hints");
 
 	/* test 10, IPv4 socktype 0, 513 */
 
@@ -430,7 +429,7 @@
 			if (pai->ai_addr) {
 				/* hostname not set; addr should be loopback */
 				err |= psin->sin_addr.s_addr !=
-					htonl(INADDR_LOOPBACK);
+				    htonl(INADDR_LOOPBACK);
 				err |= psin->sin_family != AF_INET;
 				err |= psin->sin_port != servnum;
 			}
@@ -439,23 +438,23 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 socktype 0,513: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else if (got_tcp && got_udp)
 			tst_resm(TPASS, "getaddrinfo IPv4 socktype 0,513");
 		else
 			tst_resm(TFAIL, "getaddrinfo IPv4 socktype 0,513 TCP %d"
-				" UDP %d", got_tcp, got_udp);
+				 " UDP %d", got_tcp, got_udp);
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv4 socktype 0,513 (\"\", \"%s\") returns"
-			" %ld (\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv4 socktype 0,513 (\"\", \"%s\") returns"
+			 " %ld (\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 11, IPv4 AI_V4MAPPED */
 
@@ -482,35 +481,35 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv4 AI_V4MAPPED: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin,
-				psin ? psin->sin_family : 0,
-				psin ? psin->sin_port : 0,
-				psin ? htons(psin->sin_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin,
+				 psin ? psin->sin_family : 0,
+				 psin ? psin->sin_port : 0,
+				 psin ? htons(psin->sin_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv4 AI_V4MAPPED");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv4 "
-			"AI_V4MAPPED (\"%s\") returns %ld (\"%s\")", hostname,
-			TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "AI_V4MAPPED (\"%s\") returns %ld (\"%s\")", hostname,
+			 TEST_RETURN, gai_strerror(TEST_RETURN));
 }
+
 /* getaddrinfo tests (v6) */
 
-void
-gaiv6(void)
+void gaiv6(void)
 {
 	struct addrinfo *aires, hints, *pai;
-	char hostname[MAXHOSTNAMELEN+1];
-	char shortname[MAXHOSTNAMELEN+1];
-	char service[NI_MAXSERV+1];
+	char hostname[MAXHOSTNAMELEN + 1];
+	char shortname[MAXHOSTNAMELEN + 1];
+	char service[NI_MAXSERV + 1];
 	int servnum;
 	char *p;
 
 	if (gethostname(hostname, sizeof(hostname)) < 0)
 		tst_brkm(TBROK, NULL, "gethostname failed - %s",
-			strerror(errno));
+			 strerror(errno));
 	strncpy(shortname, hostname, MAXHOSTNAMELEN);
 	shortname[MAXHOSTNAMELEN] = '\0';
 	p = strchr(shortname, '.');
@@ -539,19 +538,19 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 basic lookup: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 basic lookup");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv6 basic "
-			"lookup (\"%s\") returns %ld (\"%s\")", hostname,
-			TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "lookup (\"%s\") returns %ld (\"%s\")", hostname,
+			 TEST_RETURN, gai_strerror(TEST_RETURN));
 
 	/* test 13, IPv6 canonical name */
 	memset(&hints, 0, sizeof(hints));
@@ -564,18 +563,18 @@
 				break;
 		if (!pai) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 canonical name: no "
-				"entries with canonical name set");
+				 "entries with canonical name set");
 		} else if (strcasecmp(hostname, pai->ai_canonname)) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 canonical name "
-				"(\"%s\") doesn't match hostname (\"%s\")",
-				pai->ai_canonname, hostname);
+				 "(\"%s\") doesn't match hostname (\"%s\")",
+				 pai->ai_canonname, hostname);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 canonical name");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv6 "
-			"canonical name (\"%s\") returns %ld (\"%s\")",
-			shortname, TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "canonical name (\"%s\") returns %ld (\"%s\")",
+			 shortname, TEST_RETURN, gai_strerror(TEST_RETURN));
 
 	/* test 14, IPv6 host+service name */
 
@@ -607,19 +606,19 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 host+service: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 host+service");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv6 host+"
-			"service returns %ld (\"%s\")", TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "service returns %ld (\"%s\")", TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 15, IPv6 hostname+service, AI_PASSIVE */
 	memset(&hints, 0, sizeof(hints));
@@ -643,7 +642,7 @@
 				 * non-null; address must be set
 				 */
 				err |= memcmp(&psin6->sin6_addr, &in6addr_any,
-					sizeof(struct in6_addr)) == 0;
+					      sizeof(struct in6_addr)) == 0;
 				err |= psin6->sin6_family != AF_INET6;
 				err |= psin6->sin6_port != servnum;
 			}
@@ -652,20 +651,21 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 host+service, PASSIVE"
-				": fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 ": fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
-			tst_resm(TPASS,"getaddrinfo IPv6 host+service PASSIVE");
+			tst_resm(TPASS,
+				 "getaddrinfo IPv6 host+service PASSIVE");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv6 host+"
-			"service, PASSIVE (\"%s\", \"%s\") returns %ld (\"%s\")",
-			hostname, service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "service, PASSIVE (\"%s\", \"%s\") returns %ld (\"%s\")",
+			 hostname, service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 16, IPv6 host+service w/ AI_NUMERICHOST */
 
@@ -677,8 +677,8 @@
 	TEST(getaddrinfo(hostname, service, &hints, &aires));
 	if (TEST_RETURN != EAI_NONAME) {
 		tst_resm(TFAIL, "getaddrinfo IPv6 AI_NUMERICHOST w/ hostname: "
-				"returns %ld expected %d (EAI_NONAME)",
-				TEST_RETURN, EAI_NONAME);
+			 "returns %ld expected %d (EAI_NONAME)",
+			 TEST_RETURN, EAI_NONAME);
 	} else
 		tst_resm(TPASS, "getaddrinfo IPv6 AI_NUMERICHOST w/ hostname");
 	if (!TEST_RETURN)
@@ -705,7 +705,7 @@
 
 				/* AI_PASSIVE means addr must be INADDR_ANY */
 				err |= memcmp(&psin6->sin6_addr, &in6addr_any,
-					sizeof(struct in6_addr)) != 0;
+					      sizeof(struct in6_addr)) != 0;
 				err |= psin6->sin6_family != AF_INET6;
 				err |= psin6->sin6_port != servnum;
 			}
@@ -714,20 +714,20 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 0+service, PASSIVE:"
-				" fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 " fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 0+service, PASSIVE");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv6 0+service, PASSIVE (\"\", \"%s\") "
-			"returns %ld (\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv6 0+service, PASSIVE (\"\", \"%s\") "
+			 "returns %ld (\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 18, IPv6 0+service */
 
@@ -749,8 +749,8 @@
 			if (pai->ai_addr) {
 				/* hostname not set; addr should be loopback */
 				err |= memcmp(&psin6->sin6_addr,
-					&in6addr_loopback,
-					sizeof(struct in6_addr)) != 0;
+					      &in6addr_loopback,
+					      sizeof(struct in6_addr)) != 0;
 				err |= psin6->sin6_family != AF_INET6;
 				err |= psin6->sin6_port != servnum;
 			}
@@ -759,26 +759,26 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 0+service: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 0+service");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv6 0+service (\"\", \"%s\") returns %ld "
-			"(\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv6 0+service (\"\", \"%s\") returns %ld "
+			 "(\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 19, IPv6 host+service, AI_NUMERICSERV */
 
 #ifndef AI_NUMERICSERV
 	tst_resm(TFAIL, "getaddrinfo IPv6 host+service, AI_NUMERICSERV: flag "
-		"not implemented");
+		 "not implemented");
 #else
 	memset(&hints, 0, sizeof(hints));
 	strcpy(service, "echo");
@@ -787,12 +787,13 @@
 	hints.ai_flags = AI_NUMERICSERV;
 	TEST(getaddrinfo(hostname, service, &hints, &aires));
 	if (TEST_RETURN != EAI_NONAME) {
-		tst_resm(TFAIL,"getaddrinfo IPv6 host+service, AI_NUMERICSERV: "
-				"returns %ld (\"%s\") expected %d (EAI_NONAME)",
-				TEST_RETURN, gai_strerror(TEST_RETURN),
-				EAI_NONAME);
+		tst_resm(TFAIL,
+			 "getaddrinfo IPv6 host+service, AI_NUMERICSERV: "
+			 "returns %ld (\"%s\") expected %d (EAI_NONAME)",
+			 TEST_RETURN, gai_strerror(TEST_RETURN), EAI_NONAME);
 	} else
-		tst_resm(TPASS,"getaddrinfo IPv6 host+service, AI_NUMERICSERV");
+		tst_resm(TPASS,
+			 "getaddrinfo IPv6 host+service, AI_NUMERICSERV");
 	if (!TEST_RETURN)
 		freeaddrinfo(aires);
 #endif /* AI_NUMERICSERV */
@@ -808,11 +809,11 @@
 	TEST(getaddrinfo(0, service, &hints, &aires));
 	if (!TEST_RETURN) {
 		tst_resm(TFAIL, "getaddrinfo IPv6 SOCK_STREAM/IPPROTO_UDP "
-			"hints");
+			 "hints");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TPASS, "getaddrinfo IPv6 SOCK_STREAM/IPPROTO_UDP "
-			"hints");
+			 "hints");
 
 	/* test 21, IPv6 socktype 0, 513 */
 
@@ -838,8 +839,8 @@
 			if (pai->ai_addr) {
 				/* hostname not set; addr should be loopback */
 				err |= memcmp(&psin6->sin6_addr,
-					&in6addr_loopback,
-					sizeof(struct in6_addr)) != 0;
+					      &in6addr_loopback,
+					      sizeof(struct in6_addr)) != 0;
 				err |= psin6->sin6_family != AF_INET6;
 				err |= psin6->sin6_port != servnum;
 			}
@@ -848,23 +849,23 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 socktype 0,513: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else if (got_tcp && got_udp)
 			tst_resm(TPASS, "getaddrinfo IPv6 socktype 0,513");
 		else
 			tst_resm(TFAIL, "getaddrinfo IPv6 socktype 0,513 TCP %d"
-				" UDP %d", got_tcp, got_udp);
+				 " UDP %d", got_tcp, got_udp);
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN == EAI_BADFLAGS ? TPASS : TFAIL,
-			"getaddrinfo IPv6 socktype 0,513 (\"\", \"%s\") returns"
-			" %ld (\"%s\")", service, TEST_RETURN,
-			gai_strerror(TEST_RETURN));
+			 "getaddrinfo IPv6 socktype 0,513 (\"\", \"%s\") returns"
+			 " %ld (\"%s\")", service, TEST_RETURN,
+			 gai_strerror(TEST_RETURN));
 
 	/* test 22, IPv6 AI_V4MAPPED */
 
@@ -890,26 +891,25 @@
 		}
 		if (err) {
 			tst_resm(TFAIL, "getaddrinfo IPv6 AI_V4MAPPED: "
-				"fam %d alen %d addr 0x%p addr/fam %d "
-				"addr/port %d H[%d]",
-				pai->ai_family, pai->ai_addrlen, psin6,
-				psin6 ? psin6->sin6_family : 0,
-				psin6 ? psin6->sin6_port : 0,
-				psin6 ? htons(psin6->sin6_port) : 0);
+				 "fam %d alen %d addr 0x%p addr/fam %d "
+				 "addr/port %d H[%d]",
+				 pai->ai_family, pai->ai_addrlen, psin6,
+				 psin6 ? psin6->sin6_family : 0,
+				 psin6 ? psin6->sin6_port : 0,
+				 psin6 ? htons(psin6->sin6_port) : 0);
 		} else
 			tst_resm(TPASS, "getaddrinfo IPv6 AI_V4MAPPED");
 		freeaddrinfo(aires);
 	} else
 		tst_resm(TEST_RETURN ? TFAIL : TPASS, "getaddrinfo IPv6 "
-			"AI_V4MAPPED (\"%s\") returns %ld (\"%s\")", hostname,
-			TEST_RETURN, gai_strerror(TEST_RETURN));
+			 "AI_V4MAPPED (\"%s\") returns %ld (\"%s\")", hostname,
+			 TEST_RETURN, gai_strerror(TEST_RETURN));
 }
 
 /* this prints an addrinfo list; useful for debugging */
-void
-dumpres(struct addrinfo *pai)
+void dumpres(struct addrinfo *pai)
 {
-	int	count = 1;
+	int count = 1;
 	for (; pai; pai = pai->ai_next, count++) {
 		printf("result %d [0x%p]\n", count, pai);
 		printf("\tai_flags %x\n", pai->ai_flags);
@@ -922,20 +922,20 @@
 		if (pai->ai_addr->sa_family == AF_INET) {
 			char buf[1024];
 			struct sockaddr_in *psin =
-					(struct sockaddr_in *)pai->ai_addr;
+			    (struct sockaddr_in *)pai->ai_addr;
 
 			if (!inet_ntop(AF_INET, &psin->sin_addr, buf,
-				sizeof(buf)))
-					buf[0] = '\0';
+				       sizeof(buf)))
+				buf[0] = '\0';
 			printf("\tai_addr.sin_addr \"%s\"\n", buf);
 		} else if (pai->ai_addr->sa_family == AF_INET6) {
 			char buf[1024];
 
 			struct sockaddr_in6 *psin6 =
-				(struct sockaddr_in6 *)pai->ai_addr;
+			    (struct sockaddr_in6 *)pai->ai_addr;
 			if (!inet_ntop(AF_INET6, &psin6->sin6_addr, buf,
-				sizeof(buf)))
-					buf[0] = '\0';
+				       sizeof(buf)))
+				buf[0] = '\0';
 			printf("\tai_addr.sin6_addr \"%s\"\n", buf);
 
 		}
@@ -943,14 +943,12 @@
 	}
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
diff --git a/testcases/network/lib6/in6_01.c b/testcases/network/lib6/in6_01.c
index f23f793..20ba63d 100644
--- a/testcases/network/lib6/in6_01.c
+++ b/testcases/network/lib6/in6_01.c
@@ -45,45 +45,44 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="in6_01";		/* Test program identifier.    */
+char *TCID = "in6_01";		/* Test program identifier.    */
 
 void setup(void), cleanup(void);
 
 struct {
-	char	*addr;
-	int	ismap;
+	char *addr;
+	int ismap;
 } maptab[] = {
-	{"2002::1", 0 },
-	{"::ffff:10.0.0.1", 1 },
-	{"::fffe:10.0.0.1", 0 },
-	{"::7fff:10.0.0.1", 0 },
-	{"0:0:0:0:0:0:ffff:0a001", 1 },
-	{"0:0:1:0:0:0:ffff:0a001", 0 },
-};
+	{
+	"2002::1", 0}, {
+	"::ffff:10.0.0.1", 1}, {
+	"::fffe:10.0.0.1", 0}, {
+	"::7fff:10.0.0.1", 0}, {
+	"0:0:0:0:0:0:ffff:0a001", 1}, {
+"0:0:1:0:0:0:ffff:0a001", 0},};
 
 #define MAPSIZE (sizeof(maptab)/sizeof(maptab[0]))
 
 struct {
 	char *addr;
 } sstab[] = {
-	{ "2002::1" },
-	{ "10.0.0.1" },
-	{ "::ffff:10.0.0.1" },
-	{ "::1" },
-	{ "::" },
-};
+	{
+	"2002::1"}, {
+	"10.0.0.1"}, {
+	"::ffff:10.0.0.1"}, {
+	"::1"}, {
+"::"},};
 
 #define SSSIZE (sizeof(sstab)/sizeof(sstab[0]))
 
 int TST_TOTAL = 9 + MAPSIZE + SSSIZE;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	uint8_t	ui8 = 1;
+	uint8_t ui8 = 1;
 	uint32_t ui16 = 2;
 	uint32_t ui32 = 3;
-	struct in6_addr	in6;
+	struct in6_addr in6;
 	struct in6_addr ina6 = IN6ADDR_ANY_INIT;
 	struct in6_addr inl6 = IN6ADDR_LOOPBACK_INIT;
 	struct sockaddr_in6 sin6;
@@ -135,17 +134,17 @@
 
 	/* IN6_IS_ADDR_V4MAPPED tests */
 
-	for (i=0; i<MAPSIZE; ++i) {
+	for (i = 0; i < MAPSIZE; ++i) {
 		if (inet_pton(AF_INET6, maptab[i].addr, &in6) <= 0) {
 			tst_resm(TBROK, "\"%s\" is not a valid IPv6 address",
-				maptab[i].addr);
+				 maptab[i].addr);
 			continue;
 		}
 		TEST(IN6_IS_ADDR_V4MAPPED(in6.s6_addr));
 		if (TEST_RETURN == maptab[i].ismap)
-		tst_resm(TEST_RETURN == maptab[i].ismap ? TPASS : TFAIL,
-			"IN6_IS_ADDR_V4MAPPED(\"%s\") %ld",
-			maptab[i].addr, TEST_RETURN);
+			tst_resm(TEST_RETURN == maptab[i].ismap ? TPASS : TFAIL,
+				 "IN6_IS_ADDR_V4MAPPED(\"%s\") %ld",
+				 maptab[i].addr, TEST_RETURN);
 	}
 
 	/* sockaddr_storage tests */
@@ -155,7 +154,7 @@
 		tst_resm(TFAIL, "sockaddr_storage too small");
 	else
 		tst_resm(TPASS, "sockaddr_storage size ok");
-	for (i=0; i<SSSIZE; ++i) {
+	for (i = 0; i < SSSIZE; ++i) {
 		struct sockaddr_in *psin = (struct sockaddr_in *)&ss;
 		struct sockaddr_in6 *psin6 = (struct sockaddr_in6 *)&ss;
 		int rv;
@@ -166,36 +165,34 @@
 		if (rv == 0) {
 			af = psin6->sin6_family = AF_INET6;
 			rv = inet_pton(AF_INET6, sstab[i].addr,
-				&psin6->sin6_addr);
+				       &psin6->sin6_addr);
 		}
 		if (rv <= 0) {
 			tst_resm(TBROK, "\"%s\" is not a valid address",
-				sstab[i].addr);
+				 sstab[i].addr);
 			continue;
 		}
 		if (ss.ss_family == af)
 			tst_resm(TPASS, "\"%s\" is AF_INET%s",
-				sstab[i].addr, af == AF_INET ? "" : "6");
+				 sstab[i].addr, af == AF_INET ? "" : "6");
 		else
 			tst_resm(TFAIL, "\"%s\" ss_family (%d) != AF_INET%s",
-				sstab[i].addr, af, af == AF_INET ? "" : "6");
+				 sstab[i].addr, af, af == AF_INET ? "" : "6");
 	}
 
 	cleanup();
 
-	return(0);
+	return (0);
 }
 
 pid_t pid;
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
diff --git a/testcases/network/lib6/in6_02.c b/testcases/network/lib6/in6_02.c
index cfcf7ad..152350f 100644
--- a/testcases/network/lib6/in6_02.c
+++ b/testcases/network/lib6/in6_02.c
@@ -50,33 +50,31 @@
 #include "test.h"
 #include "usctest.h"
 
-char *TCID="in6_02";		/* Test program identifier.    */
+char *TCID = "in6_02";		/* Test program identifier.    */
 int testno;
 
 void setup(void), cleanup(void);
 
 struct {
-	char	*name;
-	int	nonzero;
+	char *name;
+	int nonzero;
 } n2i[] = {
-	{ "lo", 1 },
-	{ "eth0", 1 },
-	{ "hoser75", 0 },
-	{ "6", 0 },
-};
+	{
+	"lo", 1}, {
+	"eth0", 1}, {
+	"hoser75", 0}, {
+"6", 0},};
 
 #define N2I_COUNT (sizeof(n2i)/sizeof(n2i[0]))
 
 #define I2N_RNDCOUNT	10	/* random ints */
 #define I2N_LOWCOUNT	10	/* sequential from 0 */
 
-
 int TST_TOTAL = N2I_COUNT;
 
 void n2itest(void), i2ntest(void), initest(void);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int lc;
 	char *msg;
@@ -96,17 +94,16 @@
 	}
 	cleanup();
 
-	return(0);
+	return (0);
 }
 
 /* if_nametoindex tests */
 
-void
-n2itest()
+void n2itest()
 {
 	int i;
 
-	for (i=0; i < N2I_COUNT; ++i) {
+	for (i = 0; i < N2I_COUNT; ++i) {
 		char ifname[IF_NAMESIZE], *pifn;
 		int fail;
 
@@ -114,30 +111,30 @@
 		fail = !TEST_RETURN != !n2i[i].nonzero;
 		if (fail) {
 			tst_resm(TFAIL, "if_nametoindex(\"%s\") %ld "
-				"[should be %szero]", n2i[i].name,
-				TEST_RETURN, n2i[i].nonzero ? "non" : "");
+				 "[should be %szero]", n2i[i].name,
+				 TEST_RETURN, n2i[i].nonzero ? "non" : "");
 			continue;
 		}
 		if (!TEST_RETURN) {
 			tst_resm(TPASS, "if_nametoindex(\"%s\") %ld",
-				n2i[i].name, TEST_RETURN);
+				 n2i[i].name, TEST_RETURN);
 			continue;
 		}
 
 		pifn = if_indextoname(TEST_RETURN, ifname);
 		if (!pifn || strcmp(n2i[i].name, pifn)) {
 			tst_resm(TFAIL, "if_nametoindex(\"%s\") %ld doesn't "
-				"match if_indextoname(%ld) \"%s\"", n2i[i].name,
-				TEST_RETURN, TEST_RETURN, pifn ? pifn : "");
+				 "match if_indextoname(%ld) \"%s\"",
+				 n2i[i].name, TEST_RETURN, TEST_RETURN,
+				 pifn ? pifn : "");
 			continue;
 		}
 		tst_resm(TPASS, "if_nametoindex(\"%s\") %ld", n2i[i].name,
-			TEST_RETURN);
+			 TEST_RETURN);
 	}
 }
 
-int
-i2ntest1(unsigned int if_index)
+int i2ntest1(unsigned int if_index)
 {
 	char ifname[IF_NAMESIZE];
 	unsigned int idx;
@@ -146,8 +143,8 @@
 	if (!TEST_RETURN) {
 		if (TEST_ERRNO != ENXIO) {
 			tst_resm(TFAIL, "if_indextoname(%d) returns %ld "
-				"but errno %d != ENXIO", if_index, TEST_RETURN,
-				TEST_ERRNO);
+				 "but errno %d != ENXIO", if_index, TEST_RETURN,
+				 TEST_ERRNO);
 			return 0;
 		}
 		tst_resm(TPASS, "if_indextoname(%d) returns NULL", if_index);
@@ -157,36 +154,33 @@
 	idx = if_nametoindex(ifname);
 	if (idx != if_index) {
 		tst_resm(TFAIL, "if_indextoname(%u) returns \"%s\" but "
-			"doesn't if_nametoindex(\"%s\") returns %u",
-			if_index, ifname, ifname, idx);
+			 "doesn't if_nametoindex(\"%s\") returns %u",
+			 if_index, ifname, ifname, idx);
 		return 0;
 	}
-	tst_resm(TPASS, "if_indextoname(%d) returns \"%s\"", if_index,
-		ifname);
+	tst_resm(TPASS, "if_indextoname(%d) returns \"%s\"", if_index, ifname);
 	return 1;
 }
 
-void
-i2ntest(void)
+void i2ntest(void)
 {
 	unsigned int i;
 
 	/* some low-numbered indexes-- likely to get valid interfaces here */
-	for (i=0; i<I2N_LOWCOUNT; ++i)
+	for (i = 0; i < I2N_LOWCOUNT; ++i)
 		if (!i2ntest1(i))
-			return;		/* skip the rest, if broken */
+			return;	/* skip the rest, if broken */
 	/* some random ints; should mostly fail */
-	for (i=0; i<I2N_RNDCOUNT; ++i)
+	for (i = 0; i < I2N_RNDCOUNT; ++i)
 		if (!i2ntest1(rand()))
-			return;		/* skip the rest, if broken */
+			return;	/* skip the rest, if broken */
 }
 
 /*
  * This is an ugly, linux-only solution. getrusage() doesn't support the
  * current data segment size, so we get it out of /proc
  */
-static int
-getdatasize(void)
+static int getdatasize(void)
 {
 	char line[128], *p;
 	int dsize = -1;
@@ -198,7 +192,7 @@
 	while (fgets(line, sizeof(line), fp)) {
 		if (strncmp(line, "VmData:", 7) == 0) {
 			dsize = strtol(line + 7, &p, 0);
-			++p; /* skip space */
+			++p;	/* skip space */
 			if (!strcmp(p, "kB"))
 				return -1;	/* don't know units */
 			dsize *= 1024;
@@ -209,8 +203,7 @@
 	return dsize;
 }
 
-void
-initest(void)
+void initest(void)
 {
 	int freenicount;
 	struct if_nameindex *pini;
@@ -219,31 +212,31 @@
 	pini = if_nameindex();
 	if (pini == 0) {
 		tst_resm(TFAIL, "if_nameindex() returns NULL, errno %d (%s)",
-			TEST_ERRNO, strerror(TEST_ERRNO));
+			 TEST_ERRNO, strerror(TEST_ERRNO));
 		return;
 	}
-	for (i=0; pini[i].if_index; ++i) {
+	for (i = 0; pini[i].if_index; ++i) {
 		char buf[IF_NAMESIZE], *p;
 		int idx;
 
 		p = if_indextoname(pini[i].if_index, buf);
 		if (!p || strcmp(p, pini[i].if_name)) {
 			tst_resm(TFAIL, "if_nameindex idx %d name \"%s\" but "
-				"if_indextoname(%d) is \"%s\"",
-				pini[i].if_index, pini[i].if_name,
-				pini[i].if_index, p ? p : "");
+				 "if_indextoname(%d) is \"%s\"",
+				 pini[i].if_index, pini[i].if_name,
+				 pini[i].if_index, p ? p : "");
 			continue;
 		}
 		idx = if_nametoindex(pini[i].if_name);
 		if (idx != pini[i].if_index) {
 			tst_resm(TFAIL, "if_nameindex idx %d name \"%s\" but "
-				"if_indextoname(\"%s\") is %d",
-				pini[i].if_index, pini[i].if_name,
-				pini[i].if_name, idx);
+				 "if_indextoname(\"%s\") is %d",
+				 pini[i].if_index, pini[i].if_name,
+				 pini[i].if_name, idx);
 			continue;
 		}
 		tst_resm(TPASS, "if_nameindex idx %d name \"%s\"",
-			pini[i].if_index, pini[i].if_name);
+			 pini[i].if_index, pini[i].if_name);
 	}
 	if_freenameindex(pini);
 
@@ -253,18 +246,18 @@
 	dsize_before = getdatasize();
 	if (dsize_before < 0) {
 		tst_resm(TBROK, "getdatasize failed: errno %d (%s)", errno,
-			strerror(errno));
+			 strerror(errno));
 		return;
 	}
 	/* we need to leak at least a page to detect a leak; 1 byte per call
 	 * will be detected with getpagesize() calls.
 	 */
 	freenicount = getpagesize();
-	for (i=0; i<freenicount; ++i) {
+	for (i = 0; i < freenicount; ++i) {
 		pini = if_nameindex();
 		if (!pini) {
 			tst_resm(TFAIL, "if_freenameindex test failed "
-				"if_nameindex() iteration %d", i);
+				 "if_nameindex() iteration %d", i);
 			break;
 		}
 		if_freenameindex(pini);
@@ -272,25 +265,23 @@
 	dsize_after = getdatasize();
 	if (dsize_after < 0) {
 		tst_resm(TBROK, "getdatasize failed: errno %d (%s)", errno,
-			strerror(errno));
+			 strerror(errno));
 		return;
 	}
 	if (dsize_after > dsize_before + getpagesize())
 		tst_resm(TFAIL, "if_freenameindex leaking memory "
-			"(%d iterations) dsize before %d dsize after %d", i,
-			dsize_before, dsize_after);
+			 "(%d iterations) dsize before %d dsize after %d", i,
+			 dsize_before, dsize_after);
 	else
 		tst_resm(TPASS, "if_freenameindex passed %d iterations", i);
 }
 
-void
-setup(void)
+void setup(void)
 {
-	TEST_PAUSE;	/* if -P option specified */
+	TEST_PAUSE;		/* if -P option specified */
 }
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	TEST_CLEANUP;
 
diff --git a/testcases/network/lib6/runcc.c b/testcases/network/lib6/runcc.c
index 8b3b4d9..75210a6 100644
--- a/testcases/network/lib6/runcc.c
+++ b/testcases/network/lib6/runcc.c
@@ -48,32 +48,30 @@
 /*
  * like strspn, with ASCII, numbers and underscore only
  */
-int
-strfpn(char *name)
+int strfpn(char *name)
 {
 	int i;
 
-	for (i=0; *name; ++name, ++i)
+	for (i = 0; *name; ++name, ++i)
 		if (!(isalnum(*name) || *name == '_'))
 			break;
 	return i;
 }
 
-int
-runcc(char *tname, char *filename0, char *program)
+int runcc(char *tname, char *filename0, char *program)
 {
 	static char filename[1024];
 	int fd, es, saved_errno;
-	char * cflags = "";
+	char *cflags = "";
 
 	fd = mkstemp(filename0);
 	if (fd < 0) {
 		perror("mkstemp");
 		return -1;
 	}
-	strncpy(filename, filename0, sizeof(filename)-1);
-	filename[sizeof(filename)-1] = '\0';
-	strncat(filename, ".c", sizeof(filename)-strlen(filename)-1);
+	strncpy(filename, filename0, sizeof(filename) - 1);
+	filename[sizeof(filename) - 1] = '\0';
+	strncat(filename, ".c", sizeof(filename) - strlen(filename) - 1);
 	if (rename(filename0, filename) < 0) {
 		perror("rename");
 		unlink(filename0);
@@ -84,7 +82,7 @@
 		unlink(filename);
 		return -1;
 	}
-	(void) close(fd);
+	(void)close(fd);
 
 	cflags = getenv("CFLAGS");
 	if (cflags == NULL) {
@@ -93,18 +91,18 @@
 	}
 
 	snprintf(cmd, sizeof(cmd), "%s %s -o %s %s > /tmp/test 2>&1", "cc",
-		cflags, filename0, filename);
+		 cflags, filename0, filename);
 	es = system(cmd);
 	if (WEXITSTATUS(es) == 127) {
 		tst_resm(TBROK, "can't run C compiler: \"%s\"", cmd);
 		if (unlink(filename) < 0)
 			tst_resm(TWARN, "%s; unlink \"%s\" failed: %s", tname,
-				filename, strerror(errno));
+				 filename, strerror(errno));
 		return -1;
 	}
 	if (unlink(filename) < 0)
 		tst_resm(TWARN, "%s: unlink \"%s\" failed: %s", tname,
-			filename, strerror(errno));
+			 filename, strerror(errno));
 
 	if (WIFSIGNALED(es) &&
 	    (WTERMSIG(es) == SIGINT || WTERMSIG(es) == SIGQUIT))
@@ -120,7 +118,7 @@
 	saved_errno = errno;
 	if (unlink(filename0) < 0)
 		tst_resm(TWARN, "%s: unlink \"%s\" failed: %s", tname,
-			filename0, strerror(errno));
+			 filename0, strerror(errno));
 
 	if (WIFSIGNALED(es) &&
 	    (WTERMSIG(es) == SIGINT || WTERMSIG(es) == SIGQUIT))
@@ -128,7 +126,7 @@
 
 	if (WEXITSTATUS(es) == 127)
 		tst_resm(TBROK, "%s: can't run \"%s\": %s", tname, filename0,
-			strerror(saved_errno));
+			 strerror(saved_errno));
 	if (WEXITSTATUS(es))
 		tst_resm(TFAIL, "%s: present, but incorrect", tname);
 	else
@@ -137,18 +135,18 @@
 }
 
 char *field_fmt = "\n\texit((offsetof(struct %s, %s) != %s) || "
-	"sizeof(tst.%s) != (%s));\n";
+    "sizeof(tst.%s) != (%s));\n";
 /* no offset check */
 char *field_fmt2 = "\n\texit(sizeof(tst.%s) != (%s));\n";
 
 const char *stmpl =
-"%s\n#ifndef offsetof\n"\
-"#define offsetof(dtype, dfield) ((int)&((dtype *)0)->dfield)\n"\
-"#endif\n\nstruct %s tst;\n\nmain(int argc, char *argv[])\n{\n\t%s\n}\n";
+    "%s\n#ifndef offsetof\n"
+    "#define offsetof(dtype, dfield) ((int)&((dtype *)0)->dfield)\n"
+    "#endif\n\nstruct %s tst;\n\nmain(int argc, char *argv[])\n{\n\t%s\n}\n";
 
 int
 structcheck(char *tname, char *incl, char *structure, char *field,
-	char *offset, char *size)
+	    char *offset, char *size)
 {
 	int rv;
 	static char filename[1024];
@@ -160,12 +158,13 @@
 		sprintf(fieldref, field_fmt2, field, size);
 	sprintf(program, stmpl, incl, structure, fieldref);
 	snprintf(filename, sizeof(filename), filetmpl, strfpn(structure),
-		structure);
+		 structure);
 	rv = runcc(tname, filename, program);
 	return rv;
 }
 
-char *aliasfmt = "exit(&tst.%s != &tst.%s || sizeof(tst.%s) != sizeof(tst.%s));";
+char *aliasfmt =
+    "exit(&tst.%s != &tst.%s || sizeof(tst.%s) != sizeof(tst.%s));";
 
 int
 aliascheck(char *tname, char *incl, char *structure, char *field, char *dname)
@@ -176,16 +175,15 @@
 	sprintf(fieldref, aliasfmt, field, dname, field, dname);
 	sprintf(program, stmpl, incl, structure, fieldref);
 	snprintf(filename, sizeof(filename), filetmpl, strfpn(structure),
-		structure);
+		 structure);
 	rv = runcc(tname, filename, program);
 	return rv;
 }
 
 const char *dtmpl =
-"%s\n\nmain(int argc, char *argv[])\n{\n\texit((%s) != (%s));\n}\n";
+    "%s\n\nmain(int argc, char *argv[])\n{\n\texit((%s) != (%s));\n}\n";
 
-int
-valuecheck(char *tname, char *incl, char *dname, char *dval)
+int valuecheck(char *tname, char *incl, char *dname, char *dval)
 {
 	int rv;
 	static char filename[1024];
@@ -197,11 +195,10 @@
 }
 
 const char *ftmpl =
-"%s\n\nmain(int argc, char *argv[])\n{\n#ifdef %s\n\texit(0);\n#else\n"
-	"\tsyntax error;\n#endif\n}\n";
+    "%s\n\nmain(int argc, char *argv[])\n{\n#ifdef %s\n\texit(0);\n#else\n"
+    "\tsyntax error;\n#endif\n}\n";
 
-int
-funccheck(char *tname, char *incl, char *fname)
+int funccheck(char *tname, char *incl, char *fname)
 {
 	int rv;
 	static char filename[1024];
diff --git a/testcases/network/multicast/mc_commo/mc_recv.c b/testcases/network/multicast/mc_commo/mc_recv.c
index c8a4f86..43768f2 100644
--- a/testcases/network/multicast/mc_commo/mc_recv.c
+++ b/testcases/network/multicast/mc_commo/mc_recv.c
@@ -16,85 +16,89 @@
 int main(int argc, char *argv[])
 {
 	struct ip_mreq imr;
-        struct sockaddr_in from_in, mcast_in;
-        int s=0, n=0, one=1;
+	struct sockaddr_in from_in, mcast_in;
+	int s = 0, n = 0, one = 1;
 	/*DHH 052697 Added for 64BIT Compatibility */
 /*	6/2/97	Mario Gallegos changed from ifdef to ifndef (PORTING)	*/
 #ifndef __64BIT__
-	unsigned int len=0;
+	unsigned int len = 0;
 #else
-	unsigned long len=0;
+	unsigned long len = 0;
 #endif
-        unsigned i1, i2, i3, i4, g1, g2, g3, g4;
-        struct hostent *hp, *gethostbyname();
+	unsigned i1, i2, i3, i4, g1, g2, g3, g4;
+	struct hostent *hp, *gethostbyname();
 
-        /*int loop=0;*/
+	/*int loop=0; */
 
-  	if (argc < 4) {
-           fprintf(stderr,
-                   "usage: %s g.g.g.g interface_name (or i.i.i.i) port\n",
-                   argv[ 0]);
-           exit( 1);
-        }
-
-        /* set up multicast membership structure */
-        if ((n = sscanf(argv[1], "%u.%u.%u.%u", &g1, &g2, &g3, &g4)) != 4) {
-          fprintf(stderr, "bad group address\n" );
-          exit(1);
-        }
-        imr.imr_multiaddr.s_addr = htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
-
-        if ((hp = gethostbyname(argv[2])))
-           memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
-        else
-           if ((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
-               fprintf (stderr,"Bad group interface address\n");
-               exit (1);
-           } else
-               imr.imr_interface.s_addr = htonl((i1<<24) | (i2<<16) | (i3<<8) | i4);
-
-        /* set up socket structure */
-        if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
-            perror( "can not open socket" );
-            exit(1);
-        }
-
-        memset(&mcast_in, 0x00, sizeof(mcast_in));
-        mcast_in.sin_family = AF_INET;
-        mcast_in.sin_port = htons(atoi(argv[3]));
-
-        /* allow address reuse for binding multiple multicast applications to
-           the same group */
-        if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) {
-           perror("setsockopt SO_REUSEADDR failed");
-           exit(1);
-        }
-
-        if (bind(s, ( struct sockaddr *) &mcast_in, sizeof (mcast_in)) < 0) {
-           perror("bind");
-           exit(1);
-        }
-
-        /* Add interface to multicast group */
-        if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &imr, sizeof(struct ip_mreq)) < 0) {
-            perror("can not join group");
-            exit (1);
+	if (argc < 4) {
+		fprintf(stderr,
+			"usage: %s g.g.g.g interface_name (or i.i.i.i) port\n",
+			argv[0]);
+		exit(1);
 	}
-        printf ("Joined group\n");
 
-        /* Receive datagrams */
-        len = sizeof (from_in);
-        for (;;) {
-            memset(&from_in, 0x00, sizeof(from_in));
-            if ((n = recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr *) &from_in, &len)) < 0)
-            {
-               perror("recvfrom");
-               exit(1);
-            }
-            if (strcmp (buf,"quit") == 0)
-               break;
-            printf ("%s\n",buf);
-        }
-        close (s);
-        exit (0);
+	/* set up multicast membership structure */
+	if ((n = sscanf(argv[1], "%u.%u.%u.%u", &g1, &g2, &g3, &g4)) != 4) {
+		fprintf(stderr, "bad group address\n");
+		exit(1);
+	}
+	imr.imr_multiaddr.s_addr =
+	    htonl((g1 << 24) | (g2 << 16) | (g3 << 8) | g4);
+
+	if ((hp = gethostbyname(argv[2])))
+		memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
+	else if ((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
+		fprintf(stderr, "Bad group interface address\n");
+		exit(1);
+	} else
+		imr.imr_interface.s_addr =
+		    htonl((i1 << 24) | (i2 << 16) | (i3 << 8) | i4);
+
+	/* set up socket structure */
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("can not open socket");
+		exit(1);
+	}
+
+	memset(&mcast_in, 0x00, sizeof(mcast_in));
+	mcast_in.sin_family = AF_INET;
+	mcast_in.sin_port = htons(atoi(argv[3]));
+
+	/* allow address reuse for binding multiple multicast applications to
+	   the same group */
+	if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) {
+		perror("setsockopt SO_REUSEADDR failed");
+		exit(1);
+	}
+
+	if (bind(s, (struct sockaddr *)&mcast_in, sizeof(mcast_in)) < 0) {
+		perror("bind");
+		exit(1);
+	}
+
+	/* Add interface to multicast group */
+	if (setsockopt
+	    (s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &imr,
+	     sizeof(struct ip_mreq)) < 0) {
+		perror("can not join group");
+		exit(1);
+	}
+	printf("Joined group\n");
+
+	/* Receive datagrams */
+	len = sizeof(from_in);
+	for (;;) {
+		memset(&from_in, 0x00, sizeof(from_in));
+		if ((n =
+		     recvfrom(s, buf, sizeof(buf), 0,
+			      (struct sockaddr *)&from_in, &len)) < 0) {
+			perror("recvfrom");
+			exit(1);
+		}
+		if (strcmp(buf, "quit") == 0)
+			break;
+		printf("%s\n", buf);
+	}
+	close(s);
+	exit(0);
 }
diff --git a/testcases/network/multicast/mc_commo/mc_send.c b/testcases/network/multicast/mc_commo/mc_send.c
index c325a2d..6bc5fbf 100644
--- a/testcases/network/multicast/mc_commo/mc_send.c
+++ b/testcases/network/multicast/mc_commo/mc_send.c
@@ -13,74 +13,75 @@
 #define	MAXBUFSIZ	8096
 
 char buf[MAXBUFSIZ];
-int Num_Loops=100;
+int Num_Loops = 100;
 
 int main(argc, argv)
 int argc;
 char *argv[];
 {
 	struct ip_mreq imr;
-        struct sockaddr_in sin, mcast_out;
-        int i=0, s=0, n=0;
-        unsigned i1, i2, i3, i4, g1, g2, g3, g4;
-        struct hostent *hp, *gethostbyname();
-        char myname[64];
-	char ttl=0;
+	struct sockaddr_in sin, mcast_out;
+	int i = 0, s = 0, n = 0;
+	unsigned i1, i2, i3, i4, g1, g2, g3, g4;
+	struct hostent *hp, *gethostbyname();
+	char myname[64];
+	char ttl = 0;
 
-  	if (argc < 4) {
-           fprintf(stderr,
-                   "usage: %s g.g.g.g interface_name (or i.i.i.i) port [ttl]\n",
-                   argv[ 0]);
-           exit( 1);
-        }
+	if (argc < 4) {
+		fprintf(stderr,
+			"usage: %s g.g.g.g interface_name (or i.i.i.i) port [ttl]\n",
+			argv[0]);
+		exit(1);
+	}
 
-        /* Get local host name */
-        if (gethostname(myname, sizeof (myname) - 1) < 0) {
-          perror("gethostname");
-          exit(1);
-        }
+	/* Get local host name */
+	if (gethostname(myname, sizeof(myname) - 1) < 0) {
+		perror("gethostname");
+		exit(1);
+	}
 
-        /* set up multicast membership structure */
-        if ((n = sscanf(argv[1], "%u.%u.%u.%u", &g1, &g2, &g3, &g4)) != 4) {
-          fprintf(stderr, "bad group address\n" );
-          exit(1);
-        }
-        imr.imr_multiaddr.s_addr = htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
+	/* set up multicast membership structure */
+	if ((n = sscanf(argv[1], "%u.%u.%u.%u", &g1, &g2, &g3, &g4)) != 4) {
+		fprintf(stderr, "bad group address\n");
+		exit(1);
+	}
+	imr.imr_multiaddr.s_addr =
+	    htonl((g1 << 24) | (g2 << 16) | (g3 << 8) | g4);
 
-        if ((hp = gethostbyname(argv[2]))) {
-           memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
-        } else
-           if ((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
-               fprintf (stderr,"Bad interface address\n");
-               exit (1);
-           } else
-              imr.imr_interface.s_addr =
-                                     htonl((i1<<24) | (i2<<16) | (i3<<8) | i4);
+	if ((hp = gethostbyname(argv[2]))) {
+		memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
+	} else
+	    if ((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
+		fprintf(stderr, "Bad interface address\n");
+		exit(1);
+	} else
+		imr.imr_interface.s_addr =
+		    htonl((i1 << 24) | (i2 << 16) | (i3 << 8) | i4);
 
-        /* Set up socket structure for sendto */
-        memset(&mcast_out, 0x00, sizeof(mcast_out));
-        memset(&sin, 0x00, sizeof(sin));
-        mcast_out.sin_family = sin.sin_family = AF_INET;
-        mcast_out.sin_port = sin.sin_port = htons(atoi(argv[3]));
+	/* Set up socket structure for sendto */
+	memset(&mcast_out, 0x00, sizeof(mcast_out));
+	memset(&sin, 0x00, sizeof(sin));
+	mcast_out.sin_family = sin.sin_family = AF_INET;
+	mcast_out.sin_port = sin.sin_port = htons(atoi(argv[3]));
 
-        mcast_out.sin_addr.s_addr = imr.imr_multiaddr.s_addr;
+	mcast_out.sin_addr.s_addr = imr.imr_multiaddr.s_addr;
 
-        /* Create socket */
-        if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
-            perror( "can not open socket" );
-            exit(1);
-        }
+	/* Create socket */
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+		perror("can not open socket");
+		exit(1);
+	}
 
-        /* Set socket for multicasting */
-        if ( setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
-             &imr.imr_interface.s_addr, sizeof(imr.imr_interface.s_addr)) != 0 )
-        {
-           fprintf (stderr,
-                    "Error: unable to set socket option IP_MULTICAST_IF\n");
-           exit (1);
-        }
+	/* Set socket for multicasting */
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
+		       &imr.imr_interface.s_addr,
+		       sizeof(imr.imr_interface.s_addr)) != 0) {
+		fprintf(stderr,
+			"Error: unable to set socket option IP_MULTICAST_IF\n");
+		exit(1);
+	}
 
-        /* With an even port number the loopback will be disabled */
+	/* With an even port number the loopback will be disabled */
 /*      loop = atoi(argv[3])&1;
         if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&loop,sizeof(char))!= 0) {
            fprintf (stderr,
@@ -89,31 +90,32 @@
         }
 */
 	ttl = atoi(argv[4]);
-	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0)
-	{
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0) {
 		perror("can not set ttl");
 		exit(1);
 	}
 
-        /* Send datagrams */
-        for (i=1;i < Num_Loops;i++) {
-            sprintf(buf, "%s %d %d", argv[2], i, (int)time(0));
-            if ((n = sendto(s, buf, sizeof(buf), 0, (struct sockaddr *) &mcast_out,
-                          sizeof(mcast_out))) < 0) {
-               perror("setsockopt");
-               exit(1);
-            }
-            sleep (1);
-        }
+	/* Send datagrams */
+	for (i = 1; i < Num_Loops; i++) {
+		sprintf(buf, "%s %d %d", argv[2], i, (int)time(0));
+		if ((n =
+		     sendto(s, buf, sizeof(buf), 0,
+			    (struct sockaddr *)&mcast_out,
+			    sizeof(mcast_out))) < 0) {
+			perror("setsockopt");
+			exit(1);
+		}
+		sleep(1);
+	}
 
-        /* Tell recevier to close */
-        sprintf(buf, "quit");
-        if ((n = sendto(s, buf, sizeof(buf), 0, (struct sockaddr *) &mcast_out,
-                        sizeof(mcast_out))) < 0) {
-           perror("setsockopt");
-           exit(1);
-        }
+	/* Tell recevier to close */
+	sprintf(buf, "quit");
+	if ((n = sendto(s, buf, sizeof(buf), 0, (struct sockaddr *)&mcast_out,
+			sizeof(mcast_out))) < 0) {
+		perror("setsockopt");
+		exit(1);
+	}
 
-        close (s);
-        exit (0);
+	close(s);
+	exit(0);
 }
diff --git a/testcases/network/multicast/mc_member/member.c b/testcases/network/multicast/mc_member/member.c
index 45bd617..5b51dbe 100644
--- a/testcases/network/multicast/mc_member/member.c
+++ b/testcases/network/multicast/mc_member/member.c
@@ -10,173 +10,178 @@
 #include <unistd.h>
 
 char *prog;
-int errors=0;
-int ttl_no=255;
+int errors = 0;
+int ttl_no = 255;
 
-int join_group (int, char *, struct ip_mreq *);
-int leave_group (int, char *, struct ip_mreq *);
+int join_group(int, char *, struct ip_mreq *);
+int leave_group(int, char *, struct ip_mreq *);
 void usage(void);
 
 int main(argc, argv)
 int argc;
 char *argv[];
 {
-        int s;
-        struct ip_mreq imr;
+	int s;
+	struct ip_mreq imr;
 
-        char *group_list=NULL, *interface=NULL;
-        unsigned i1, i2, i3, i4;
-        struct hostent *hp, *gethostbyname();
+	char *group_list = NULL, *interface = NULL;
+	unsigned i1, i2, i3, i4;
+	struct hostent *hp, *gethostbyname();
 	int c, n;
-        /*int errors=0;*/
-        int lflg=0, jflg=0, sflg=0;
+	/*int errors=0; */
+	int lflg = 0, jflg = 0, sflg = 0;
 
-        extern int optind;
-        extern char *optarg;
-        prog = argv[0];
-        if (argc == 1)
-            usage ();
+	extern int optind;
+	extern char *optarg;
+	prog = argv[0];
+	if (argc == 1)
+		usage();
 
-        while ((c = getopt(argc,argv,"jlg:s:i:")) != EOF)
-        	switch (c)
-                {
-                	case 'j':
-				if (lflg)
-					usage();
-                                else
-                                	jflg++;
-                                break;
-                        case 'l':
-                                if (jflg)
-                                        usage();
-                                else
-                                        lflg++;
-                                break;
-                        case 'g':
-                                group_list = optarg;
-                                break;
-                        case 's':
-                                sflg=atoi(optarg);
-				break;
-			case 'i':
-				interface = optarg;
-                                break;
-                        case '?':
-                                usage();
-               }
+	while ((c = getopt(argc, argv, "jlg:s:i:")) != EOF)
+		switch (c) {
+		case 'j':
+			if (lflg)
+				usage();
+			else
+				jflg++;
+			break;
+		case 'l':
+			if (jflg)
+				usage();
+			else
+				lflg++;
+			break;
+		case 'g':
+			group_list = optarg;
+			break;
+		case 's':
+			sflg = atoi(optarg);
+			break;
+		case 'i':
+			interface = optarg;
+			break;
+		case '?':
+			usage();
+		}
 
-        if (optind != argc)
-           usage ();
+	if (optind != argc)
+		usage();
 
-        if (access (group_list, R_OK) != 0) {
-                printf ("Unabled to read group file %s\n",group_list);
-                exit (1);
-        }
+	if (access(group_list, R_OK) != 0) {
+		printf("Unabled to read group file %s\n", group_list);
+		exit(1);
+	}
 
-        if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-            perror( "can not open socket" );
-            exit(1);
-        }
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
+		perror("can not open socket");
+		exit(1);
+	}
 
-        if ((hp = gethostbyname(interface))) {
-           memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
-        } else
-           if ((n = sscanf(interface, "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
-              fprintf(stderr, "bad group address\n" );
-              exit (1);
-           } else
-              imr.imr_interface.s_addr =
-                                 htonl((i1<<24) | (i2<<16) | (i3<<8) | i4);
-        /* verify socket options */
-	if ( setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
-                        &imr.imr_interface.s_addr,
-                        sizeof(imr.imr_interface.s_addr)) != 0 ) {
-           fprintf(stderr,"Error: unable to set socket option IP_MULTICAST_IF\n");
-           errors++;
+	if ((hp = gethostbyname(interface))) {
+		memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
 	} else
-	   printf("Socket set for Multicasting on: %s\n",interface);
+	    if ((n =
+		 sscanf(interface, "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
+		fprintf(stderr, "bad group address\n");
+		exit(1);
+	} else
+		imr.imr_interface.s_addr =
+		    htonl((i1 << 24) | (i2 << 16) | (i3 << 8) | i4);
+	/* verify socket options */
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
+		       &imr.imr_interface.s_addr,
+		       sizeof(imr.imr_interface.s_addr)) != 0) {
+		fprintf(stderr,
+			"Error: unable to set socket option IP_MULTICAST_IF\n");
+		errors++;
+	} else
+		printf("Socket set for Multicasting on: %s\n", interface);
 
-        if ((!jflg && !lflg) || jflg)
-           join_group ( s, group_list, &imr );
+	if ((!jflg && !lflg) || jflg)
+		join_group(s, group_list, &imr);
 
-        sleep (sflg);
+	sleep(sflg);
 
-        if ((!jflg && !lflg) || lflg)
-           leave_group ( s, group_list, &imr );
+	if ((!jflg && !lflg) || lflg)
+		leave_group(s, group_list, &imr);
 
-        close (s);
-        if (errors)
-           exit (1);
-        return (0);
+	close(s);
+	if (errors)
+		exit(1);
+	return (0);
 }
 
-int join_group (int s, char *glist, struct ip_mreq *imr)
+int join_group(int s, char *glist, struct ip_mreq *imr)
 {
-        char buf[40];
-        unsigned g1, g2, g3, g4;
-        FILE *fd;
-        char group[40], itf[40];
+	char buf[40];
+	unsigned g1, g2, g3, g4;
+	FILE *fd;
+	char group[40], itf[40];
 
-        if ((fd = fopen(glist,"r")) == NULL)
-           printf ("Error: unable to open %s\n",glist);
+	if ((fd = fopen(glist, "r")) == NULL)
+		printf("Error: unable to open %s\n", glist);
 
-        while (fgets(buf, sizeof(buf), fd) != NULL) {
-           if (sscanf(buf, "%u.%u.%u.%u", &g1, &g2, &g3, &g4) != 4) {
-             fprintf(stderr, "bad group address\n" );
-             exit(1);
-           }
+	while (fgets(buf, sizeof(buf), fd) != NULL) {
+		if (sscanf(buf, "%u.%u.%u.%u", &g1, &g2, &g3, &g4) != 4) {
+			fprintf(stderr, "bad group address\n");
+			exit(1);
+		}
 
-           imr->imr_multiaddr.s_addr = htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
+		imr->imr_multiaddr.s_addr =
+		    htonl((g1 << 24) | (g2 << 16) | (g3 << 8) | g4);
 
-           if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP,
-                         imr, sizeof(struct ip_mreq)) == -1) {
-              fprintf(stderr, "errno is %d \n", errno);
-              perror("can't join group");
-              errors++;
-           } else {
-              strcpy (group,inet_ntoa(imr->imr_multiaddr));
-              strcpy (itf,inet_ntoa(imr->imr_interface));
-              printf ("IPM group: %s added to interface: %s\n",group,itf);
-           }
-        }
-        return (0);
+		if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+			       imr, sizeof(struct ip_mreq)) == -1) {
+			fprintf(stderr, "errno is %d \n", errno);
+			perror("can't join group");
+			errors++;
+		} else {
+			strcpy(group, inet_ntoa(imr->imr_multiaddr));
+			strcpy(itf, inet_ntoa(imr->imr_interface));
+			printf("IPM group: %s added to interface: %s\n", group,
+			       itf);
+		}
+	}
+	return (0);
 }
 
-int leave_group (int s, char *glist, struct ip_mreq *imr)
+int leave_group(int s, char *glist, struct ip_mreq *imr)
 {
-        char buf[40];
-        unsigned g1, g2, g3, g4;
-        FILE *fd;
-        char group[40], itf[40];
+	char buf[40];
+	unsigned g1, g2, g3, g4;
+	FILE *fd;
+	char group[40], itf[40];
 
-        if ((fd = fopen(glist,"r")) == NULL)
-           printf ("Error: unable to open %s\n",glist);
+	if ((fd = fopen(glist, "r")) == NULL)
+		printf("Error: unable to open %s\n", glist);
 
-        while (fgets(buf, sizeof(buf), fd) != NULL) {
-           if (sscanf(buf, "%u.%u.%u.%u", &g1, &g2, &g3, &g4) != 4) {
-             fprintf(stderr, "leave_group: bad group address\n" );
-             exit(1);
-           }
+	while (fgets(buf, sizeof(buf), fd) != NULL) {
+		if (sscanf(buf, "%u.%u.%u.%u", &g1, &g2, &g3, &g4) != 4) {
+			fprintf(stderr, "leave_group: bad group address\n");
+			exit(1);
+		}
 
-           imr->imr_multiaddr.s_addr =
-                                      htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
+		imr->imr_multiaddr.s_addr =
+		    htonl((g1 << 24) | (g2 << 16) | (g3 << 8) | g4);
 
-           if (setsockopt(s, IPPROTO_IP, IP_DROP_MEMBERSHIP,
-                         imr, sizeof(struct ip_mreq)) == -1) {
-              perror("can't leave group");
-              errors++;
-           } else {
-              strcpy (group,inet_ntoa(imr->imr_multiaddr));
-              strcpy (itf,inet_ntoa(imr->imr_interface));
-              printf ("IPM group: %s dropped from interface: %s\n",group,itf);
-           }
-        }
-        return (0);
+		if (setsockopt(s, IPPROTO_IP, IP_DROP_MEMBERSHIP,
+			       imr, sizeof(struct ip_mreq)) == -1) {
+			perror("can't leave group");
+			errors++;
+		} else {
+			strcpy(group, inet_ntoa(imr->imr_multiaddr));
+			strcpy(itf, inet_ntoa(imr->imr_interface));
+			printf("IPM group: %s dropped from interface: %s\n",
+			       group, itf);
+		}
+	}
+	return (0);
 }
 
 void usage()
 {
-           fprintf(stderr,
-              "usage: %s [ -j -l ] -g group_list [-s time_to_sleep] -i interface_name (or i.i.i.i)\n",prog);
-           exit( 1);
+	fprintf(stderr,
+		"usage: %s [ -j -l ] -g group_list [-s time_to_sleep] -i interface_name (or i.i.i.i)\n",
+		prog);
+	exit(1);
 }
diff --git a/testcases/network/multicast/mc_opts/opts.c b/testcases/network/multicast/mc_opts/opts.c
index 55d6007..0174d91 100644
--- a/testcases/network/multicast/mc_opts/opts.c
+++ b/testcases/network/multicast/mc_opts/opts.c
@@ -12,138 +12,139 @@
 #define	MAXBUFSIZ	8096
 
 char buff[MAXBUFSIZ];
-int errors=0;
+int errors = 0;
 
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {
-        int s;
-        struct in_addr gimr;
-        struct ip_mreq simr;
+	int s;
+	struct in_addr gimr;
+	struct ip_mreq simr;
 
-        unsigned i1, i2, i3, i4;
-        struct hostent *hp, *gethostbyname();
+	unsigned i1, i2, i3, i4;
+	struct hostent *hp, *gethostbyname();
 
-        char sintf[20], gintf[20];
-        int n=0;
-        unsigned char ttl;
-        char loop=0;
-	unsigned int len=0;
+	char sintf[20], gintf[20];
+	int n = 0;
+	unsigned char ttl;
+	char loop = 0;
+	unsigned int len = 0;
 
-  	if (argc != 2) {
-           fprintf(stderr,
-                   "usage: %s interface_name (or i.i.i.i)\n",
-                   argv[ 0]);
-           exit( 1);
-        }
-        if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-            perror( "Error: can't open socket" );
-            exit(1);
-        }
+	if (argc != 2) {
+		fprintf(stderr,
+			"usage: %s interface_name (or i.i.i.i)\n", argv[0]);
+		exit(1);
+	}
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
+		perror("Error: can't open socket");
+		exit(1);
+	}
 
 	printf("agrv sub 1 is %s\n", argv[1]);
-        if ((hp = gethostbyname(argv[1])))
-           memcpy(&simr.imr_interface.s_addr, hp->h_addr, hp->h_length);
-        else
-           if ((n = sscanf(argv[1], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
-               fprintf(stderr,"Bad interface address\n");
-               exit(1);
-           } else
-               simr.imr_interface.s_addr =
-                                   htonl((i1<<24) | (i2<<16) | (i3<<8) | i4);
-        strcpy(sintf, inet_ntoa(simr.imr_interface));
+	if ((hp = gethostbyname(argv[1])))
+		memcpy(&simr.imr_interface.s_addr, hp->h_addr, hp->h_length);
+	else if ((n = sscanf(argv[1], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
+		fprintf(stderr, "Bad interface address\n");
+		exit(1);
+	} else
+		simr.imr_interface.s_addr =
+		    htonl((i1 << 24) | (i2 << 16) | (i3 << 8) | i4);
+	strcpy(sintf, inet_ntoa(simr.imr_interface));
 
-        /* verify socket options */
-	if ( setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
-                        &simr.imr_interface.s_addr,
-                        sizeof(simr.imr_interface.s_addr)) != 0 )
-        {
-           perror ("Error: Setting IP_MULTICAST_IF");
-           errors++;
-        }
-	else
-           printf("Set interface: %s for multicasting\n", sintf);
+	/* verify socket options */
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF,
+		       &simr.imr_interface.s_addr,
+		       sizeof(simr.imr_interface.s_addr)) != 0) {
+		perror("Error: Setting IP_MULTICAST_IF");
+		errors++;
+	} else
+		printf("Set interface: %s for multicasting\n", sintf);
 
-        len = sizeof(gimr);
-        if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_IF,&gimr,(socklen_t*)&len)!= 0) {
-           perror ("Getting IP_MULTICAST_IF");
-           errors++;
-        }
-        else {
-           strcpy(gintf, inet_ntoa(gimr));
-           printf("Got multicasting socket interface: %s\n",gintf);
-        }
+	len = sizeof(gimr);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_IF, &gimr, (socklen_t *) & len) != 0) {
+		perror("Getting IP_MULTICAST_IF");
+		errors++;
+	} else {
+		strcpy(gintf, inet_ntoa(gimr));
+		printf("Got multicasting socket interface: %s\n", gintf);
+	}
 
-        /* Verify that the multicastion for the interface was set */
-        if (strcmp (sintf, gintf) != 0) {
-           printf ("Error: IP_MULTICAST_IF was not set\n");
-           errors++;
-        }
-	else
-	   printf ("Socket has been set for multicasting on interface: %s\n",
-                    sintf);
+	/* Verify that the multicastion for the interface was set */
+	if (strcmp(sintf, gintf) != 0) {
+		printf("Error: IP_MULTICAST_IF was not set\n");
+		errors++;
+	} else
+		printf
+		    ("Socket has been set for multicasting on interface: %s\n",
+		     sintf);
 
-        len = sizeof(ttl);
-	if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,(socklen_t*)&len) != 0) {
-           perror ("Error: Gettting IP_MULTICAST_TTL");
-           errors++;
-        }
-        else
-           printf ("getsockopt: got ttl = %i\n",ttl);
-        if (ttl != 1)
-           printf ("Error: IP_MULTICAST_TTL not default value, ttl = %i\n",ttl );
-        ttl = 10; /* Set ttl to 10 */
-        len = sizeof (ttl);
-	if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,sizeof(ttl)) != 0)
-        {
-           perror ("Error: Setting IP_MULTICAST_TTL");
-           errors++;
-        }
-	else
-           printf ("TTL set on multicast socket\n");
-	if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,(socklen_t*)&len) != 0) {
-           perror ("Error: Getting IP_MULTICAST_TTL");
-           errors++;
-        }
-        if (ttl != 10) {
-           printf ("Error: IP_MULTICAST_TTL not set, ttl = %i\n",ttl);
-           errors++;
-        }
+	len = sizeof(ttl);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, (socklen_t *) & len) != 0) {
+		perror("Error: Gettting IP_MULTICAST_TTL");
+		errors++;
+	} else
+		printf("getsockopt: got ttl = %i\n", ttl);
+	if (ttl != 1)
+		printf("Error: IP_MULTICAST_TTL not default value, ttl = %i\n",
+		       ttl);
+	ttl = 10;		/* Set ttl to 10 */
+	len = sizeof(ttl);
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) != 0) {
+		perror("Error: Setting IP_MULTICAST_TTL");
+		errors++;
+	} else
+		printf("TTL set on multicast socket\n");
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, (socklen_t *) & len) != 0) {
+		perror("Error: Getting IP_MULTICAST_TTL");
+		errors++;
+	}
+	if (ttl != 10) {
+		printf("Error: IP_MULTICAST_TTL not set, ttl = %i\n", ttl);
+		errors++;
+	}
 
-        len = sizeof (loop);
-        if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&loop,(socklen_t*)&len) != 0) {
-           perror ("Error: Getting IP_MULTICAST_LOOP");
-           errors++;
-        } else
-           printf ("Got loopback setting\n");
-        if (loop != 1) {
-           printf ("Error: IP_MULTICAST_LOOP not enabled, loop = %i\n",loop);
-           errors++;
-        } else
-           printf ("IP_MULTICAST_LOOP is enabled\n");
+	len = sizeof(loop);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop,
+	     (socklen_t *) & len) != 0) {
+		perror("Error: Getting IP_MULTICAST_LOOP");
+		errors++;
+	} else
+		printf("Got loopback setting\n");
+	if (loop != 1) {
+		printf("Error: IP_MULTICAST_LOOP not enabled, loop = %i\n",
+		       loop);
+		errors++;
+	} else
+		printf("IP_MULTICAST_LOOP is enabled\n");
 
-        loop = 0; /* Disable IP_MULTICAST_LOOP */
-        if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&loop,sizeof(char)) != 0)
-        {
-           errors++;
-           perror ("Error: Setting IP_MULTICAST_LOOP");
-        } else
-           printf ("Multicast loopback disabled\n");
-        if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&loop,(socklen_t*)&len) != 0) {
-           perror ("Error: Getting IP_MULTICAST_LOOP");
-           errors++;
-        } else
-           printf ("Got multicast loopback value\n");
-        if (loop != 0) {
-           printf ("Error: IP_MULTICAST_LOOP not disabled, loop = %i\n",loop);
-           errors++;
-        } else
-           printf ("IP_MULTICAST_LOOP disabled\n");
+	loop = 0;		/* Disable IP_MULTICAST_LOOP */
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(char)) !=
+	    0) {
+		errors++;
+		perror("Error: Setting IP_MULTICAST_LOOP");
+	} else
+		printf("Multicast loopback disabled\n");
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop,
+	     (socklen_t *) & len) != 0) {
+		perror("Error: Getting IP_MULTICAST_LOOP");
+		errors++;
+	} else
+		printf("Got multicast loopback value\n");
+	if (loop != 0) {
+		printf("Error: IP_MULTICAST_LOOP not disabled, loop = %i\n",
+		       loop);
+		errors++;
+	} else
+		printf("IP_MULTICAST_LOOP disabled\n");
 
-        close (s);
-        if (errors)
-           exit (1);
-        exit (0);
+	close(s);
+	if (errors)
+		exit(1);
+	exit(0);
 }
diff --git a/testcases/network/multicast/mc_opts/opts_e.c b/testcases/network/multicast/mc_opts/opts_e.c
index 5d24fe9..f91fa93 100644
--- a/testcases/network/multicast/mc_opts/opts_e.c
+++ b/testcases/network/multicast/mc_opts/opts_e.c
@@ -12,68 +12,70 @@
 
 char buff[MAXBUFSIZ];
 
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {
-        int s;
-        struct in_addr simr, gimr;
+	int s;
+	struct in_addr simr, gimr;
 
-        unsigned i1, i2, i3, i4;
-        struct hostent *hp, *gethostbyname();
+	unsigned i1, i2, i3, i4;
+	struct hostent *hp, *gethostbyname();
 
-        unsigned char ttl;
-        char no_loop=0, do_loop=1;
-        unsigned long len=0;
-	int n=0;
+	unsigned char ttl;
+	char no_loop = 0, do_loop = 1;
+	unsigned long len = 0;
+	int n = 0;
 
-  	if (argc != 2) {
-           fprintf(stderr,
-                   "usage: %s interface_name  (or i.i.i.i)\n",
-                   argv[0]);
-           exit( 1);
-        }
-        if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-            perror( "can't open socket" );
-            exit(1);
-        }
+	if (argc != 2) {
+		fprintf(stderr,
+			"usage: %s interface_name  (or i.i.i.i)\n", argv[0]);
+		exit(1);
+	}
+	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
+		perror("can't open socket");
+		exit(1);
+	}
 
-        if ((hp = gethostbyname(argv[1])))
-           memcpy(&simr.s_addr, hp->h_addr, hp->h_length);
-        else
-           if ((n = sscanf(argv[1], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4)
-           {
-              fprintf (stderr,"Bad interface address\n");
-              exit (1);
-           } else
-              simr.s_addr = htonl((i1<<24) | (i2<<16) | (i3<<8) | i4);
+	if ((hp = gethostbyname(argv[1])))
+		memcpy(&simr.s_addr, hp->h_addr, hp->h_length);
+	else if ((n = sscanf(argv[1], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
+		fprintf(stderr, "Bad interface address\n");
+		exit(1);
+	} else
+		simr.s_addr = htonl((i1 << 24) | (i2 << 16) | (i3 << 8) | i4);
 
-        /* verify socket options error messages */
-	if ( setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &simr,
-                        sizeof(simr)) != 0 )
-           perror ("Setting IP_MULTICAST_IF"), exit(1);
-        len = sizeof (gimr);
-        if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_IF,&gimr,(socklen_t*)&len)!= 0)
-           perror ("Getting IP_MULTICAST_IF"), exit(1);
+	/* verify socket options error messages */
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &simr,
+		       sizeof(simr)) != 0)
+		perror("Setting IP_MULTICAST_IF"), exit(1);
+	len = sizeof(gimr);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_IF, &gimr, (socklen_t *) & len) != 0)
+		perror("Getting IP_MULTICAST_IF"), exit(1);
 
-        len = sizeof (ttl);
-	if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,(socklen_t*)&len) != 0)
-           perror ("Getting IP_MULTICAST_TTL"), exit(1);
+	len = sizeof(ttl);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, (socklen_t *) & len) != 0)
+		perror("Getting IP_MULTICAST_TTL"), exit(1);
 
-        ttl = 10; /* Set ttl to 10 */
+	ttl = 10;		/* Set ttl to 10 */
 /*		printf("setting ttl=10\n");*/
-	if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,sizeof(ttl)) != 0)
-           perror ("Setting IP_MULTICAST_TTL"), exit (1);
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) != 0)
+		perror("Setting IP_MULTICAST_TTL"), exit(1);
 
-      if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&do_loop,sizeof(char)) != 0)
-           perror ("Setting IP_MULTICAST_LOOP"), exit(1);
-      if (setsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&no_loop,sizeof(char)) != 0)
-           perror ("Setting IP_MULTICAST_LOOP"), exit(1);
-      len = sizeof (no_loop);
-      if (getsockopt(s,IPPROTO_IP,IP_MULTICAST_LOOP,&no_loop,(socklen_t*)&len) != 0)
-           perror ("Getting IP_MULTICAST_LOOP"), exit(1);
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &do_loop, sizeof(char))
+	    != 0)
+		perror("Setting IP_MULTICAST_LOOP"), exit(1);
+	if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &no_loop, sizeof(char))
+	    != 0)
+		perror("Setting IP_MULTICAST_LOOP"), exit(1);
+	len = sizeof(no_loop);
+	if (getsockopt
+	    (s, IPPROTO_IP, IP_MULTICAST_LOOP, &no_loop,
+	     (socklen_t *) & len) != 0)
+		perror("Getting IP_MULTICAST_LOOP"), exit(1);
 
-        close (s);
-        exit (0);
+	close(s);
+	exit(0);
 }
diff --git a/testcases/network/nfs/nfs01/open_files.c b/testcases/network/nfs/nfs01/open_files.c
index 95efc15..533e150 100644
--- a/testcases/network/nfs/nfs01/open_files.c
+++ b/testcases/network/nfs/nfs01/open_files.c
@@ -16,107 +16,111 @@
 void delete_files(void);
 void abortx(char *fmt, ...);
 
-int main(argc,argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {
-    int filedes[25500];
-    int i, n, first, n_files;
-    int cid, fork_number;
-    int status;
-    char filename[PATH_MAX];
+	int filedes[25500];
+	int i, n, first, n_files;
+	int cid, fork_number;
+	int status;
+	char filename[PATH_MAX];
 
-    if (argc != 2) {
-	fprintf(stderr, "Usage: %s <number of files>\n", argv[0]);
-	exit(1);
-    }
-
-    n = sscanf(argv[1], "%d", &n_files);
-    if (n != 1) {
-	fprintf(stderr, "Usage: %s <number of files>\n", argv[0]);
-	exit(1);
-    }
-
-    first = 0;
-    fork_number = 0;
-    for (n=0;  n < n_files; n++) {
-	strcpy(filename, TEMPLATE);
-	filedes[n] = mkstemp(filename);
-	if (filedes[n] == -1) {
-	    if (errno != EMFILE)
-		abortx("open() error: file = \"%s\", errno = %d",
-		      filename, errno);
-	    else {
-		if ((cid = fork())) {
-		    if (cid == -1)
-			abortx("Error forking child");
-		    else {
-			waitpid(cid, &status, 0);
-			for (i=first; i < n; i++)
-			    if (!write_something(filedes[i]))
-				abortx("Error writing to files");
-			if (fork_number == 0)
-			    delete_files();
-			exit(WEXITSTATUS(status));
-		    }
-		}
-		else {
-		    fork_number++;
-		    for (i=first ; i < n; i++)
-			close(filedes[i]);
-		    first = n;
-		    n--;
-		}
-	    }
+	if (argc != 2) {
+		fprintf(stderr, "Usage: %s <number of files>\n", argv[0]);
+		exit(1);
 	}
-    }
 
-    for (i=first; i < n; i++)
-	if (!write_something(filedes[i]))
-	    abortx("Error writing to files");
-    if (fork_number == 0)
-	delete_files();
-    exit(0);
+	n = sscanf(argv[1], "%d", &n_files);
+	if (n != 1) {
+		fprintf(stderr, "Usage: %s <number of files>\n", argv[0]);
+		exit(1);
+	}
+
+	first = 0;
+	fork_number = 0;
+	for (n = 0; n < n_files; n++) {
+		strcpy(filename, TEMPLATE);
+		filedes[n] = mkstemp(filename);
+		if (filedes[n] == -1) {
+			if (errno != EMFILE)
+				abortx
+				    ("open() error: file = \"%s\", errno = %d",
+				     filename, errno);
+			else {
+				if ((cid = fork())) {
+					if (cid == -1)
+						abortx("Error forking child");
+					else {
+						waitpid(cid, &status, 0);
+						for (i = first; i < n; i++)
+							if (!write_something
+							    (filedes[i]))
+								abortx
+								    ("Error writing to files");
+						if (fork_number == 0)
+							delete_files();
+						exit(WEXITSTATUS(status));
+					}
+				} else {
+					fork_number++;
+					for (i = first; i < n; i++)
+						close(filedes[i]);
+					first = n;
+					n--;
+				}
+			}
+		}
+	}
+
+	for (i = first; i < n; i++)
+		if (!write_something(filedes[i]))
+			abortx("Error writing to files");
+	if (fork_number == 0)
+		delete_files();
+	exit(0);
 }
 
 int write_something(int fd)
 {
-    int rc;
+	int rc;
 
-    rc = write(fd, "I Love Linux!!!\n", 23);
-    if (rc != 23)
-	return(0);
-    if (close(fd))
-	return(0);
-    return(1);
+	rc = write(fd, "I Love Linux!!!\n", 23);
+	if (rc != 23)
+		return (0);
+	if (close(fd))
+		return (0);
+	return (1);
 }
 
 void delete_files(void)
 {
-    DIR *dirp;
-    struct dirent *entp;
-    struct stat stat_buffer;
+	DIR *dirp;
+	struct dirent *entp;
+	struct stat stat_buffer;
 
-    dirp = opendir(".");
-    for (entp=readdir(dirp); entp; entp=readdir(dirp))
-	if (!strncmp(entp->d_name, "apt", 3)) {
-	    if (stat(entp->d_name, &stat_buffer))
-		abortx("stat() failed for \"%s\", errno = %d",
-		      entp->d_name, errno);
-	    if (stat_buffer.st_size != 23)
-		abortx("wrong file size for \"%s\"", entp->d_name);
-	    if (unlink(entp->d_name))
-		abortx("unlink failed for \"%s\"", entp->d_name);
-	}
+	dirp = opendir(".");
+	for (entp = readdir(dirp); entp; entp = readdir(dirp))
+		if (!strncmp(entp->d_name, "apt", 3)) {
+			if (stat(entp->d_name, &stat_buffer))
+				abortx("stat() failed for \"%s\", errno = %d",
+				       entp->d_name, errno);
+			if (stat_buffer.st_size != 23)
+				abortx("wrong file size for \"%s\"",
+				       entp->d_name);
+			if (unlink(entp->d_name))
+				abortx("unlink failed for \"%s\"",
+				       entp->d_name);
+		}
 }
 
 void abortx(char *fmt, ...)
 {
-    va_list args;
+	va_list args;
 
-    va_start(args, fmt);
-    vfprintf(stderr, fmt, args);
-    va_end(args);
-    fprintf(stderr, "\n");
-    exit(1);
+	va_start(args, fmt);
+	vfprintf(stderr, fmt, args);
+	va_end(args);
+	fprintf(stderr, "\n");
+	exit(1);
 }
diff --git a/testcases/network/nfs/nfs04/nfs04_create_file.c b/testcases/network/nfs/nfs04/nfs04_create_file.c
index a37c590..653c500 100644
--- a/testcases/network/nfs/nfs04/nfs04_create_file.c
+++ b/testcases/network/nfs/nfs04/nfs04_create_file.c
@@ -36,41 +36,39 @@
 /* set write buffer size to whatever floats your boat.  I usually use 1M */
 #define BSIZE 1048576L
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-   off_t i;
-   long bufnum;
-   char buf[BSIZE];
-   off_t fd;
+	off_t i;
+	long bufnum;
+	char buf[BSIZE];
+	off_t fd;
 
-   if (argc != 3 || atoi(argv[1]) < 1)
-   {
-      printf("usage:\n\tcreate_file <# of %ld buffers to write> <name of file to create>\n\t ex. # create_file 10 /tmp/testfile\n",BSIZE);
-      exit(3);
-   }
-   bufnum = strtol(argv[1],NULL,0);
-   printf("Started building a %lu megabyte file\n",bufnum);
-   buf[0]='A';
-   for (i=1;i<BSIZE;i++)
-      buf[i]=buf[i-1]+1;
-   buf[BSIZE-1]='Z';
+	if (argc != 3 || atoi(argv[1]) < 1) {
+		printf
+		    ("usage:\n\tcreate_file <# of %ld buffers to write> <name of file to create>\n\t ex. # create_file 10 /tmp/testfile\n",
+		     BSIZE);
+		exit(3);
+	}
+	bufnum = strtol(argv[1], NULL, 0);
+	printf("Started building a %lu megabyte file\n", bufnum);
+	buf[0] = 'A';
+	for (i = 1; i < BSIZE; i++)
+		buf[i] = buf[i - 1] + 1;
+	buf[BSIZE - 1] = 'Z';
 
-   if ((fd = creat(argv[2],0755)) == -1)
-      perror("lftest: ");
+	if ((fd = creat(argv[2], 0755)) == -1)
+		perror("lftest: ");
 
-   for (i=0;i<bufnum;i++)
-   {
-      if (write(fd,buf,BSIZE) == -1)
-	 return -1;
-      else
-      {
-	 printf(".");
-	 fflush(stdout);
-      }
-      fsync(fd);
-   }
-   close(fd);
-   printf("\nFinished building a %lu megabyte file\n",bufnum);
-   return (0);
+	for (i = 0; i < bufnum; i++) {
+		if (write(fd, buf, BSIZE) == -1)
+			return -1;
+		else {
+			printf(".");
+			fflush(stdout);
+		}
+		fsync(fd);
+	}
+	close(fd);
+	printf("\nFinished building a %lu megabyte file\n", bufnum);
+	return (0);
 }
diff --git a/testcases/network/nfs/nfs_fsstress/fsstress.c b/testcases/network/nfs/nfs_fsstress/fsstress.c
index 0073b2d..ac91262 100644
--- a/testcases/network/nfs/nfs_fsstress/fsstress.c
+++ b/testcases/network/nfs/nfs_fsstress/fsstress.c
@@ -74,32 +74,32 @@
 	OP_LAST
 } opty_t;
 
-typedef void (*opfnc_t)(int, long);
+typedef void (*opfnc_t) (int, long);
 
 typedef struct opdesc {
-	opty_t	op;
-	char	*name;
-	opfnc_t	func;
-	int	freq;
-	int	iswrite;
-	int	isxfs;
+	opty_t op;
+	char *name;
+	opfnc_t func;
+	int freq;
+	int iswrite;
+	int isxfs;
 } opdesc_t;
 
 typedef struct fent {
-	int	id;
-	int	parent;
+	int id;
+	int parent;
 } fent_t;
 
 typedef struct flist {
-	int	nfiles;
-	int	nslots;
-	int	tag;
-	fent_t	*fents;
+	int nfiles;
+	int nslots;
+	int tag;
+	fent_t *fents;
 } flist_t;
 
 typedef struct pathname {
-	int	len;
-	char	*path;
+	int len;
+	char *path;
 } pathname_t;
 
 #define	FT_DIR	0
@@ -123,180 +123,179 @@
 #define	MAXFSIZE	((1ULL << 63) - 1ULL)
 #define	MAXFSIZE32	((1ULL << 40) - 1ULL)
 
-void	allocsp_f(int, long);
-void	attr_remove_f(int, long);
-void	attr_set_f(int, long);
-void	bulkstat_f(int, long);
-void	bulkstat1_f(int, long);
-void	chown_f(int, long);
-void	creat_f(int, long);
-void	dread_f(int, long);
-void	dwrite_f(int, long);
-void	fdatasync_f(int, long);
-void	freesp_f(int, long);
-void	fsync_f(int, long);
-void	getdents_f(int, long);
-void	link_f(int, long);
-void	mkdir_f(int, long);
-void	mknod_f(int, long);
-void	read_f(int, long);
-void	readlink_f(int, long);
-void	rename_f(int, long);
-void	resvsp_f(int, long);
-void	rmdir_f(int, long);
-void	stat_f(int, long);
-void	symlink_f(int, long);
-void	sync_f(int, long);
-void	truncate_f(int, long);
-void	unlink_f(int, long);
-void	unresvsp_f(int, long);
-void	write_f(int, long);
+void allocsp_f(int, long);
+void attr_remove_f(int, long);
+void attr_set_f(int, long);
+void bulkstat_f(int, long);
+void bulkstat1_f(int, long);
+void chown_f(int, long);
+void creat_f(int, long);
+void dread_f(int, long);
+void dwrite_f(int, long);
+void fdatasync_f(int, long);
+void freesp_f(int, long);
+void fsync_f(int, long);
+void getdents_f(int, long);
+void link_f(int, long);
+void mkdir_f(int, long);
+void mknod_f(int, long);
+void read_f(int, long);
+void readlink_f(int, long);
+void rename_f(int, long);
+void resvsp_f(int, long);
+void rmdir_f(int, long);
+void stat_f(int, long);
+void symlink_f(int, long);
+void sync_f(int, long);
+void truncate_f(int, long);
+void unlink_f(int, long);
+void unresvsp_f(int, long);
+void write_f(int, long);
 
-opdesc_t	ops[] = {
+opdesc_t ops[] = {
 #ifndef NO_XFS
-	{ OP_ALLOCSP, "allocsp", allocsp_f, 1, 1, 1 },
-	{ OP_ATTR_REMOVE, "attr_remove", attr_remove_f, /* 1 */ 0, 1, 1 },
-	{ OP_ATTR_SET, "attr_set", attr_set_f, /* 2 */ 0, 1, 1 },
-	{ OP_BULKSTAT, "bulkstat", bulkstat_f, 1, 0, 1 },
-	{ OP_BULKSTAT1, "bulkstat1", bulkstat1_f, 1, 0, 1 },
+	{OP_ALLOCSP, "allocsp", allocsp_f, 1, 1, 1},
+	{OP_ATTR_REMOVE, "attr_remove", attr_remove_f, /* 1 */ 0, 1, 1},
+	{OP_ATTR_SET, "attr_set", attr_set_f, /* 2 */ 0, 1, 1},
+	{OP_BULKSTAT, "bulkstat", bulkstat_f, 1, 0, 1},
+	{OP_BULKSTAT1, "bulkstat1", bulkstat1_f, 1, 0, 1},
 #endif
-	{ OP_CHOWN, "chown", chown_f, 3, 1 },
-	{ OP_CREAT, "creat", creat_f, 4, 1 },
-	{ OP_DREAD, "dread", dread_f, 4, 0 },
-	{ OP_DWRITE, "dwrite", dwrite_f, 4, 1 },
-	{ OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1 },
+	{OP_CHOWN, "chown", chown_f, 3, 1},
+	{OP_CREAT, "creat", creat_f, 4, 1},
+	{OP_DREAD, "dread", dread_f, 4, 0},
+	{OP_DWRITE, "dwrite", dwrite_f, 4, 1},
+	{OP_FDATASYNC, "fdatasync", fdatasync_f, 1, 1},
 #ifndef NO_XFS
-	{ OP_FREESP, "freesp", freesp_f, 1, 1, 1 },
+	{OP_FREESP, "freesp", freesp_f, 1, 1, 1},
 #endif
-	{ OP_FSYNC, "fsync", fsync_f, 1, 1 },
-	{ OP_GETDENTS, "getdents", getdents_f, 1, 0 },
-	{ OP_LINK, "link", link_f, 1, 1 },
-	{ OP_MKDIR, "mkdir", mkdir_f, 2, 1 },
-	{ OP_MKNOD, "mknod", mknod_f, 2, 1 },
-	{ OP_READ, "read", read_f, 1, 0 },
-	{ OP_READLINK, "readlink", readlink_f, 1, 0 },
-	{ OP_RENAME, "rename", rename_f, 2, 1 },
+	{OP_FSYNC, "fsync", fsync_f, 1, 1},
+	{OP_GETDENTS, "getdents", getdents_f, 1, 0},
+	{OP_LINK, "link", link_f, 1, 1},
+	{OP_MKDIR, "mkdir", mkdir_f, 2, 1},
+	{OP_MKNOD, "mknod", mknod_f, 2, 1},
+	{OP_READ, "read", read_f, 1, 0},
+	{OP_READLINK, "readlink", readlink_f, 1, 0},
+	{OP_RENAME, "rename", rename_f, 2, 1},
 #ifndef NO_XFS
-	{ OP_RESVSP, "resvsp", resvsp_f, 1, 1, 1 },
+	{OP_RESVSP, "resvsp", resvsp_f, 1, 1, 1},
 #endif
-	{ OP_RMDIR, "rmdir", rmdir_f, 1, 1 },
-	{ OP_STAT, "stat", stat_f, 1, 0 },
-	{ OP_SYMLINK, "symlink", symlink_f, 2, 1 },
-	{ OP_SYNC, "sync", sync_f, 1, 0 },
-	{ OP_TRUNCATE, "truncate", truncate_f, 2, 1 },
-	{ OP_UNLINK, "unlink", unlink_f, 1, 1 },
+	{OP_RMDIR, "rmdir", rmdir_f, 1, 1},
+	{OP_STAT, "stat", stat_f, 1, 0},
+	{OP_SYMLINK, "symlink", symlink_f, 2, 1},
+	{OP_SYNC, "sync", sync_f, 1, 0},
+	{OP_TRUNCATE, "truncate", truncate_f, 2, 1},
+	{OP_UNLINK, "unlink", unlink_f, 1, 1},
 #ifndef NO_XFS
-	{ OP_UNRESVSP, "unresvsp", unresvsp_f, 1, 1, 1 },
+	{OP_UNRESVSP, "unresvsp", unresvsp_f, 1, 1, 1},
 #endif
-	{ OP_WRITE, "write", write_f, 4, 1 },
+	{OP_WRITE, "write", write_f, 4, 1},
 }, *ops_end;
 
-flist_t	flist[FT_nft] = {
-	{ 0, 0, 'd', NULL },
-	{ 0, 0, 'f', NULL },
-	{ 0, 0, 'l', NULL },
-	{ 0, 0, 'c', NULL },
-	{ 0, 0, 'r', NULL },
+flist_t flist[FT_nft] = {
+	{0, 0, 'd', NULL},
+	{0, 0, 'f', NULL},
+	{0, 0, 'l', NULL},
+	{0, 0, 'c', NULL},
+	{0, 0, 'r', NULL},
 };
 
-int		dcache[NDCACHE];
-int		errrange;
-int		errtag;
-opty_t		*freq_table;
-int		freq_table_size;
+int dcache[NDCACHE];
+int errrange;
+int errtag;
+opty_t *freq_table;
+int freq_table_size;
 #ifndef NO_XFS
-xfs_fsop_geom_t	geom;
+xfs_fsop_geom_t geom;
 #endif
-char		*homedir;
-int		*ilist;
-int		ilistlen;
-off64_t		maxfsize;
-char		*myprog;
-int		namerand;
-int		nameseq;
-int		nops;
-int		nproc = 1;
-int		operations = 1;
-int		procid;
-int		rtpct;
-unsigned long	seed = 0;
-ino_t		top_ino;
-int		verbose = 0;
+char *homedir;
+int *ilist;
+int ilistlen;
+off64_t maxfsize;
+char *myprog;
+int namerand;
+int nameseq;
+int nops;
+int nproc = 1;
+int operations = 1;
+int procid;
+int rtpct;
+unsigned long seed = 0;
+ino_t top_ino;
+int verbose = 0;
 #ifndef NO_XFS
 int no_xfs = 0;
 #else
 int no_xfs = 1;
 #endif
 
-void	add_to_flist(int, int, int);
-void	append_pathname(pathname_t *, char *);
+void add_to_flist(int, int, int);
+void append_pathname(pathname_t *, char *);
 #ifndef NO_XFS
-int	attr_list_path(pathname_t *, char *, const int, int,
-		       attrlist_cursor_t *);
-int	attr_remove_path(pathname_t *, const char *, int);
-int	attr_set_path(pathname_t *, const char *, const char *, const int, int);
+int attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *);
+int attr_remove_path(pathname_t *, const char *, int);
+int attr_set_path(pathname_t *, const char *, const char *, const int, int);
 #endif
-void	check_cwd(void);
-int	creat_path(pathname_t *, mode_t);
-void	dcache_enter(int, int);
-void	dcache_init(void);
-fent_t	*dcache_lookup(int);
-void	dcache_purge(int);
-void	del_from_flist(int, int);
-int	dirid_to_name(char *, int);
-void	doproc(void);
-void	fent_to_name(pathname_t *, flist_t *, fent_t *);
-void	fix_parent(int, int);
-void	free_pathname(pathname_t *);
-int	generate_fname(fent_t *, int, pathname_t *, int *, int *);
-int	get_fname(int, long, pathname_t *, flist_t **, fent_t **, int *);
-void	init_pathname(pathname_t *);
-int	lchown_path(pathname_t *, uid_t, gid_t);
-int	link_path(pathname_t *, pathname_t *);
-int	lstat64_path(pathname_t *, struct stat64 *);
-void	make_freq_table(void);
-int	mkdir_path(pathname_t *, mode_t);
-int	mknod_path(pathname_t *, mode_t, dev_t);
-void	namerandpad(int, char *, int);
-int	open_path(pathname_t *, int);
-DIR	*opendir_path(pathname_t *);
-void	process_freq(char *);
-int	readlink_path(pathname_t *, char *, size_t);
-int	rename_path(pathname_t *, pathname_t *);
-int	rmdir_path(pathname_t *);
-void	separate_pathname(pathname_t *, char *, pathname_t *);
-void	show_ops(int, char *);
-int	stat64_path(pathname_t *, struct stat64 *);
-int	symlink_path(const char *, pathname_t *);
-int	truncate64_path(pathname_t *, off64_t);
-int	unlink_path(pathname_t *);
-void	usage(void);
-void	write_freq(void);
-void	zero_freq(void);
+void check_cwd(void);
+int creat_path(pathname_t *, mode_t);
+void dcache_enter(int, int);
+void dcache_init(void);
+fent_t *dcache_lookup(int);
+void dcache_purge(int);
+void del_from_flist(int, int);
+int dirid_to_name(char *, int);
+void doproc(void);
+void fent_to_name(pathname_t *, flist_t *, fent_t *);
+void fix_parent(int, int);
+void free_pathname(pathname_t *);
+int generate_fname(fent_t *, int, pathname_t *, int *, int *);
+int get_fname(int, long, pathname_t *, flist_t **, fent_t **, int *);
+void init_pathname(pathname_t *);
+int lchown_path(pathname_t *, uid_t, gid_t);
+int link_path(pathname_t *, pathname_t *);
+int lstat64_path(pathname_t *, struct stat64 *);
+void make_freq_table(void);
+int mkdir_path(pathname_t *, mode_t);
+int mknod_path(pathname_t *, mode_t, dev_t);
+void namerandpad(int, char *, int);
+int open_path(pathname_t *, int);
+DIR *opendir_path(pathname_t *);
+void process_freq(char *);
+int readlink_path(pathname_t *, char *, size_t);
+int rename_path(pathname_t *, pathname_t *);
+int rmdir_path(pathname_t *);
+void separate_pathname(pathname_t *, char *, pathname_t *);
+void show_ops(int, char *);
+int stat64_path(pathname_t *, struct stat64 *);
+int symlink_path(const char *, pathname_t *);
+int truncate64_path(pathname_t *, off64_t);
+int unlink_path(pathname_t *);
+void usage(void);
+void write_freq(void);
+void zero_freq(void);
 
 int main(int argc, char **argv)
 {
-	char		buf[10];
-	int		c;
-	char		*dirname = NULL;
-	int		fd;
-	int		i;
-	int		cleanup = 0;
-	int		loops = 1;
-	int		loopcntr = 1;
-	char		cmd[256];
+	char buf[10];
+	int c;
+	char *dirname = NULL;
+	int fd;
+	int i;
+	int cleanup = 0;
+	int loops = 1;
+	int loopcntr = 1;
+	char cmd[256];
 #ifndef NO_XFS
-	int		j;
+	int j;
 #endif
-	char		*p;
-	int		stat;
-	struct timeval	t;
+	char *p;
+	int stat;
+	struct timeval t;
 #ifndef NO_XFS
-	ptrdiff_t	srval;
+	ptrdiff_t srval;
 #endif
-        int             nousage=0;
+	int nousage = 0;
 #ifndef NO_XFS
-	xfs_error_injection_t	err_inj;
+	xfs_error_injection_t err_inj;
 #endif
 
 	errrange = errtag = 0;
@@ -307,8 +306,8 @@
 	while ((c = getopt(argc, argv, "cd:e:f:i:l:n:p:rs:vwzHSX")) != -1) {
 		switch (c) {
 		case 'c':
-			/*Don't cleanup*/
-			cleanup=1;
+			/*Don't cleanup */
+			cleanup = 1;
 			break;
 		case 'd':
 			dirname = optarg;
@@ -361,11 +360,10 @@
 		case 'S':
 			show_ops(0, NULL);
 			printf("\n");
-                        nousage=1;
+			nousage = 1;
 			break;
 		case '?':
-			fprintf(stderr, "%s - invalid parameters\n",
-				myprog);
+			fprintf(stderr, "%s - invalid parameters\n", myprog);
 			/* fall through */
 		case 'H':
 			usage();
@@ -375,8 +373,7 @@
 			break;
 		}
 	}
-        while ((loopcntr <= loops) || (loops == 0))
-        {
+	while ((loopcntr <= loops) || (loops == 0)) {
 		if (no_xfs && errtag) {
 			fprintf(stderr, "error injection only works on XFS\n");
 			exit(1);
@@ -384,17 +381,18 @@
 
 		if (no_xfs) {
 			int i;
-			for (i = 0; ops+i < ops_end; ++i) {
+			for (i = 0; ops + i < ops_end; ++i) {
 				if (ops[i].isxfs)
 					ops[i].freq = 0;
 			}
 		}
 
-       	 	if (!dirname) {
-       	     	/* no directory specified */
-    	        	if (!nousage) usage();
-           	 exit(1);
-        	}
+		if (!dirname) {
+			/* no directory specified */
+			if (!nousage)
+				usage();
+			exit(1);
+		}
 
 		(void)mkdir(dirname, 0777);
 		if (chdir(dirname) < 0) {
@@ -403,10 +401,10 @@
 		}
 		sprintf(buf, "fss%x", getpid());
 		fd = creat(buf, 0666);
-		if (lseek64(fd, (off64_t)(MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
-			maxfsize = (off64_t)MAXFSIZE32;
+		if (lseek64(fd, (off64_t) (MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
+			maxfsize = (off64_t) MAXFSIZE32;
 		else
-			maxfsize = (off64_t)MAXFSIZE;
+			maxfsize = (off64_t) MAXFSIZE;
 		make_freq_table();
 		dcache_init();
 		setlinebuf(stdout);
@@ -417,12 +415,13 @@
 		}
 #ifndef NO_XFS
 		if (!no_xfs) {
-		i = ioctl(fd, XFS_IOC_FSGEOMETRY, &geom);
-		if (i >= 0 && geom.rtblocks)
-			rtpct = MIN(MAX(geom.rtblocks * 100 /
-					(geom.rtblocks + geom.datablocks), 1), 99);
-		else
-			rtpct = 0;
+			i = ioctl(fd, XFS_IOC_FSGEOMETRY, &geom);
+			if (i >= 0 && geom.rtblocks)
+				rtpct = MIN(MAX(geom.rtblocks * 100 /
+						(geom.rtblocks +
+						 geom.datablocks), 1), 99);
+			else
+				rtpct = 0;
 		}
 		if (errtag != 0) {
 			if (errrange == 0) {
@@ -431,25 +430,29 @@
 					j = random() % 100;
 
 					for (i = 0; i < j; i++)
-						(void) random();
+						(void)random();
 
-					errtag = (random() % (XFS_ERRTAG_MAX-1)) + 1;
+					errtag =
+					    (random() % (XFS_ERRTAG_MAX - 1)) +
+					    1;
 				}
 			} else {
 				srandom(seed);
 				j = random() % 100;
 
 				for (i = 0; i < j; i++)
-					(void) random();
+					(void)random();
 
-				errtag += (random() % (XFS_ERRTAG_MAX - errtag));
+				errtag +=
+				    (random() % (XFS_ERRTAG_MAX - errtag));
 			}
 			printf("Injecting failure on tag #%d\n", errtag);
 			err_inj.errtag = errtag;
 			err_inj.fd = fd;
 			srval = ioctl(fd, XFS_IOC_ERROR_INJECTION, &err_inj);
 			if (srval < -1) {
-				perror("fsstress - XFS_SYSSGI error injection call");
+				perror
+				    ("fsstress - XFS_SYSSGI error injection call");
 				close(fd);
 				unlink(buf);
 				exit(1);
@@ -476,30 +479,32 @@
 		if (errtag != 0) {
 			err_inj.errtag = 0;
 			err_inj.fd = fd;
-			if ((srval = ioctl(fd, XFS_IOC_ERROR_CLEARALL, &err_inj)) != 0) {
-				fprintf(stderr, "Bad ej clear on %d (%d).\n", fd, errno);
-				perror("fsstress - XFS_SYSSGI clear error injection call");
+			if ((srval =
+			     ioctl(fd, XFS_IOC_ERROR_CLEARALL,
+				   &err_inj)) != 0) {
+				fprintf(stderr, "Bad ej clear on %d (%d).\n",
+					fd, errno);
+				perror
+				    ("fsstress - XFS_SYSSGI clear error injection call");
 				close(fd);
 				exit(1);
 			}
 			close(fd);
 		}
 #endif
-	if (cleanup == 0)
-	{
-	  sprintf(cmd,"rm -rf %s/*",dirname);
-	  system(cmd);
-	}
-        loopcntr++;
+		if (cleanup == 0) {
+			sprintf(cmd, "rm -rf %s/*", dirname);
+			system(cmd);
+		}
+		loopcntr++;
 	}
 	return 0;
 }
 
-void
-add_to_flist(int ft, int id, int parent)
+void add_to_flist(int ft, int id, int parent)
 {
-	fent_t	*fep;
-	flist_t	*ftp;
+	fent_t *fep;
+	flist_t *ftp;
 
 	ftp = &flist[ft];
 	if (ftp->nfiles == ftp->nslots) {
@@ -511,10 +516,9 @@
 	fep->parent = parent;
 }
 
-void
-append_pathname(pathname_t *name, char *str)
+void append_pathname(pathname_t * name, char *str)
 {
-	int	len;
+	int len;
 
 	len = strlen(str);
 #ifdef DEBUG
@@ -532,12 +536,12 @@
 
 #ifndef NO_XFS
 int
-attr_list_path(pathname_t *name, char *buffer, const int buffersize, int flags,
-	       attrlist_cursor_t *cursor)
+attr_list_path(pathname_t * name, char *buffer, const int buffersize, int flags,
+	       attrlist_cursor_t * cursor)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_list(name->path, buffer, buffersize, flags, cursor);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -545,19 +549,18 @@
 	separate_pathname(name, buf, &newname);
 	if (chdir(buf) == 0) {
 		rval = attr_list_path(&newname, buffer, buffersize, flags,
-			cursor);
+				      cursor);
 		chdir("..");
 	}
 	free_pathname(&newname);
 	return rval;
 }
 
-int
-attr_remove_path(pathname_t *name, const char *attrname, int flags)
+int attr_remove_path(pathname_t * name, const char *attrname, int flags)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_remove(name->path, attrname, flags);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -572,12 +575,12 @@
 }
 
 int
-attr_set_path(pathname_t *name, const char *attrname, const char *attrvalue,
+attr_set_path(pathname_t * name, const char *attrname, const char *attrvalue,
 	      const int valuelength, int flags)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = attr_set(name->path, attrname, attrvalue, valuelength, flags);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -585,7 +588,7 @@
 	separate_pathname(name, buf, &newname);
 	if (chdir(buf) == 0) {
 		rval = attr_set_path(&newname, attrname, attrvalue, valuelength,
-			flags);
+				     flags);
 		chdir("..");
 	}
 	free_pathname(&newname);
@@ -593,11 +596,10 @@
 }
 #endif
 
-void
-check_cwd(void)
+void check_cwd(void)
 {
 #ifdef DEBUG
-	struct stat64	statbuf;
+	struct stat64 statbuf;
 
 	if (stat64(".", &statbuf) == 0 && statbuf.st_ino == top_ino)
 		return;
@@ -608,12 +610,11 @@
 #endif
 }
 
-int
-creat_path(pathname_t *name, mode_t mode)
+int creat_path(pathname_t * name, mode_t mode)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = creat(name->path, mode);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -627,26 +628,23 @@
 	return rval;
 }
 
-void
-dcache_enter(int dirid, int slot)
+void dcache_enter(int dirid, int slot)
 {
 	dcache[dirid % NDCACHE] = slot;
 }
 
-void
-dcache_init(void)
+void dcache_init(void)
 {
-	int	i;
+	int i;
 
 	for (i = 0; i < NDCACHE; i++)
 		dcache[i] = -1;
 }
 
-fent_t *
-dcache_lookup(int dirid)
+fent_t *dcache_lookup(int dirid)
 {
-	fent_t	*fep;
-	int	i;
+	fent_t *fep;
+	int i;
 
 	i = dcache[dirid % NDCACHE];
 	if (i >= 0 && (fep = &flist[FT_DIR].fents[i])->id == dirid)
@@ -654,20 +652,18 @@
 	return NULL;
 }
 
-void
-dcache_purge(int dirid)
+void dcache_purge(int dirid)
 {
-	int	*dcp;
+	int *dcp;
 
 	dcp = &dcache[dirid % NDCACHE];
 	if (*dcp >= 0 && flist[FT_DIR].fents[*dcp].id == dirid)
 		*dcp = -1;
 }
 
-void
-del_from_flist(int ft, int slot)
+void del_from_flist(int ft, int slot)
 {
-	flist_t	*ftp;
+	flist_t *ftp;
 
 	ftp = &flist[ft];
 	if (ft == FT_DIR)
@@ -680,12 +676,11 @@
 		ftp->nfiles--;
 }
 
-fent_t *
-dirid_to_fent(int dirid)
+fent_t *dirid_to_fent(int dirid)
 {
-	fent_t	*efep;
-	fent_t	*fep;
-	flist_t	*flp;
+	fent_t *efep;
+	fent_t *fep;
+	flist_t *flp;
 
 	if ((fep = dcache_lookup(dirid)))
 		return fep;
@@ -699,14 +694,13 @@
 	return NULL;
 }
 
-void
-doproc(void)
+void doproc(void)
 {
-	struct stat64	statbuf;
-	char		buf[10];
-	int		opno;
-	int		rval;
-	opdesc_t	*p;
+	struct stat64 statbuf;
+	char buf[10];
+	int opno;
+	int rval;
+	opdesc_t *p;
 
 	sprintf(buf, "p%x", procid);
 	(void)mkdir(buf, 0777);
@@ -722,7 +716,8 @@
 		namerand = random();
 	for (opno = 0; opno < operations; opno++) {
 		p = &ops[freq_table[random() % freq_table_size]];
-		if ((unsigned long)p->func < 4096) abort();
+		if ((unsigned long)p->func < 4096)
+			abort();
 
 		p->func(opno, random());
 		/*
@@ -730,9 +725,9 @@
 		 * directory.  If this stat returns EIO, assume
 		 * the forced shutdown happened.
 		 */
-		if (errtag != 0 && opno % 100 == 0)  {
+		if (errtag != 0 && opno % 100 == 0) {
 			rval = stat64(".", &statbuf);
-			if (rval == EIO)  {
+			if (rval == EIO) {
 				fprintf(stderr, "Detected EIO\n");
 				return;
 			}
@@ -740,12 +735,11 @@
 	}
 }
 
-void
-fent_to_name(pathname_t *name, flist_t *flp, fent_t *fep)
+void fent_to_name(pathname_t * name, flist_t * flp, fent_t * fep)
 {
-	char	buf[MAXNAMELEN];
-	int	i;
-	fent_t	*pfep;
+	char buf[MAXNAMELEN];
+	int i;
+	fent_t *pfep;
 
 	if (fep == NULL)
 		return;
@@ -759,13 +753,12 @@
 	append_pathname(name, buf);
 }
 
-void
-fix_parent(int oldid, int newid)
+void fix_parent(int oldid, int newid)
 {
-	fent_t	*fep;
-	flist_t	*flp;
-	int	i;
-	int	j;
+	fent_t *fep;
+	flist_t *flp;
+	int i;
+	int j;
 
 	for (i = 0, flp = flist; i < FT_nft; i++, flp++) {
 		for (j = 0, fep = flp->fents; j < flp->nfiles; j++, fep++) {
@@ -775,8 +768,7 @@
 	}
 }
 
-void
-free_pathname(pathname_t *name)
+void free_pathname(pathname_t * name)
 {
 	if (name->path) {
 		free(name->path);
@@ -785,14 +777,13 @@
 	}
 }
 
-int
-generate_fname(fent_t *fep, int ft, pathname_t *name, int *idp, int *v)
+int generate_fname(fent_t * fep, int ft, pathname_t * name, int *idp, int *v)
 {
-	char	buf[MAXNAMELEN];
-	flist_t	*flp;
-	int	id;
-	int	j;
-	int	len;
+	char buf[MAXNAMELEN];
+	flist_t *flp;
+	int id;
+	int j;
+	int len;
 
 	flp = &flist[ft];
 	len = sprintf(buf, "%c%x", flp->tag, id = nameseq++);
@@ -814,15 +805,15 @@
 }
 
 int
-get_fname(int which, long r, pathname_t *name, flist_t **flpp, fent_t **fepp,
+get_fname(int which, long r, pathname_t * name, flist_t ** flpp, fent_t ** fepp,
 	  int *v)
 {
-	int	c;
-	fent_t	*fep;
-	flist_t	*flp;
-	int	i;
-	int	j;
-	int	x;
+	int c;
+	fent_t *fep;
+	flist_t *flp;
+	int i;
+	int j;
+	int x;
 
 	for (i = 0, c = 0, flp = flist; i < FT_nft; i++, flp++) {
 		if (which & (1 << i))
@@ -863,23 +854,21 @@
 	fprintf(stderr, "fsstress: get_fname failure\n");
 	abort();
 #endif
-        return -1;
+	return -1;
 
 }
 
-void
-init_pathname(pathname_t *name)
+void init_pathname(pathname_t * name)
 {
 	name->len = 0;
 	name->path = NULL;
 }
 
-int
-lchown_path(pathname_t *name, uid_t owner, gid_t group)
+int lchown_path(pathname_t * name, uid_t owner, gid_t group)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = lchown(name->path, owner, group);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -893,15 +882,14 @@
 	return rval;
 }
 
-int
-link_path(pathname_t *name1, pathname_t *name2)
+int link_path(pathname_t * name1, pathname_t * name2)
 {
-	char		buf1[MAXNAMELEN];
-	char		buf2[MAXNAMELEN];
-	int		down1;
-	pathname_t	newname1;
-	pathname_t	newname2;
-	int		rval;
+	char buf1[MAXNAMELEN];
+	char buf2[MAXNAMELEN];
+	int down1;
+	pathname_t newname1;
+	pathname_t newname2;
+	int rval;
 
 	rval = link(name1->path, name2->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -924,7 +912,7 @@
 			down1 = 1;
 		else
 			down1 = MAX(newname1.len, 3 + name2->len) <=
-				MAX(3 + name1->len, newname2.len);
+			    MAX(3 + name1->len, newname2.len);
 		if (down1) {
 			free_pathname(&newname2);
 			append_pathname(&newname2, "../");
@@ -948,12 +936,11 @@
 	return rval;
 }
 
-int
-lstat64_path(pathname_t *name, struct stat64 *sbuf)
+int lstat64_path(pathname_t * name, struct stat64 *sbuf)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = lstat64(name->path, sbuf);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -967,12 +954,11 @@
 	return rval;
 }
 
-void
-make_freq_table(void)
+void make_freq_table(void)
 {
-	int		f;
-	int		i;
-	opdesc_t	*p;
+	int f;
+	int i;
+	opdesc_t *p;
 
 	for (p = ops, f = 0; p < ops_end; p++)
 		f += p->freq;
@@ -984,12 +970,11 @@
 	}
 }
 
-int
-mkdir_path(pathname_t *name, mode_t mode)
+int mkdir_path(pathname_t * name, mode_t mode)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = mkdir(name->path, mode);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1003,12 +988,11 @@
 	return rval;
 }
 
-int
-mknod_path(pathname_t *name, mode_t mode, dev_t dev)
+int mknod_path(pathname_t * name, mode_t mode, dev_t dev)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = mknod(name->path, mode, dev);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1022,14 +1006,12 @@
 	return rval;
 }
 
-void
-namerandpad(int id, char *buf, int i)
+void namerandpad(int id, char *buf, int i)
 {
-	int		bucket;
-	static int	buckets[] =
-				{ 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 };
-	int		padlen;
-	int		padmod;
+	int bucket;
+	static int buckets[] = { 2, 4, 8, 16, 32, 64, 128, MAXNAMELEN - 1 };
+	int padlen;
+	int padmod;
 
 	if (namerand == 0)
 		return;
@@ -1044,12 +1026,11 @@
 	}
 }
 
-int
-open_path(pathname_t *name, int oflag)
+int open_path(pathname_t * name, int oflag)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = open(name->path, oflag);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1063,12 +1044,11 @@
 	return rval;
 }
 
-DIR *
-opendir_path(pathname_t *name)
+DIR *opendir_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	DIR		*rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	DIR *rval;
 
 	rval = opendir(name->path);
 	if (rval || errno != ENAMETOOLONG)
@@ -1082,11 +1062,10 @@
 	return rval;
 }
 
-void
-process_freq(char *arg)
+void process_freq(char *arg)
 {
-	opdesc_t	*p;
-	char		*s;
+	opdesc_t *p;
+	char *s;
 
 	s = strchr(arg, '=');
 	if (s == NULL) {
@@ -1104,12 +1083,11 @@
 	exit(1);
 }
 
-int
-readlink_path(pathname_t *name, char *lbuf, size_t lbufsiz)
+int readlink_path(pathname_t * name, char *lbuf, size_t lbufsiz)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = readlink(name->path, lbuf, lbufsiz);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1123,15 +1101,14 @@
 	return rval;
 }
 
-int
-rename_path(pathname_t *name1, pathname_t *name2)
+int rename_path(pathname_t * name1, pathname_t * name2)
 {
-	char		buf1[MAXNAMELEN];
-	char		buf2[MAXNAMELEN];
-	int		down1;
-	pathname_t	newname1;
-	pathname_t	newname2;
-	int		rval;
+	char buf1[MAXNAMELEN];
+	char buf2[MAXNAMELEN];
+	int down1;
+	pathname_t newname1;
+	pathname_t newname2;
+	int rval;
 
 	rval = rename(name1->path, name2->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1154,7 +1131,7 @@
 			down1 = 1;
 		else
 			down1 = MAX(newname1.len, 3 + name2->len) <=
-				MAX(3 + name1->len, newname2.len);
+			    MAX(3 + name1->len, newname2.len);
 		if (down1) {
 			free_pathname(&newname2);
 			append_pathname(&newname2, "../");
@@ -1178,12 +1155,11 @@
 	return rval;
 }
 
-int
-rmdir_path(pathname_t *name)
+int rmdir_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = rmdir(name->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1197,10 +1173,9 @@
 	return rval;
 }
 
-void
-separate_pathname(pathname_t *name, char *buf, pathname_t *newname)
+void separate_pathname(pathname_t * name, char *buf, pathname_t * newname)
 {
-	char	*slash;
+	char *slash;
 
 	init_pathname(newname);
 	slash = strchr(name->path, '/');
@@ -1216,47 +1191,47 @@
 
 #define WIDTH 80
 
-void
-show_ops(int flag, char *lead_str)
+void show_ops(int flag, char *lead_str)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
-        if (flag<0) {
-                /* print in list form */
-                int             x = WIDTH;
+	if (flag < 0) {
+		/* print in list form */
+		int x = WIDTH;
 
-	        for (p = ops; p < ops_end; p++) {
-			if (lead_str != NULL && x+strlen(p->name)>=WIDTH-5)
-				x=printf("%s%s", (p==ops)?"":"\n", lead_str);
-                        x+=printf("%s ", p->name);
-                }
-                printf("\n");
-        } else {
-	        int		f;
-	        for (f = 0, p = ops; p < ops_end; p++)
-		        f += p->freq;
+		for (p = ops; p < ops_end; p++) {
+			if (lead_str != NULL
+			    && x + strlen(p->name) >= WIDTH - 5)
+				x = printf("%s%s", (p == ops) ? "" : "\n",
+					   lead_str);
+			x += printf("%s ", p->name);
+		}
+		printf("\n");
+	} else {
+		int f;
+		for (f = 0, p = ops; p < ops_end; p++)
+			f += p->freq;
 
-	        if (f == 0)
-		        flag = 1;
+		if (f == 0)
+			flag = 1;
 
-	        for (p = ops; p < ops_end; p++) {
-		        if (flag != 0 || p->freq > 0) {
-			        if (lead_str != NULL)
-				        printf("%s", lead_str);
-			        printf("%20s %d/%d %s\n",
-			        p->name, p->freq, f,
-			        (p->iswrite == 0) ? " " : "write op");
-		        }
-                }
+		for (p = ops; p < ops_end; p++) {
+			if (flag != 0 || p->freq > 0) {
+				if (lead_str != NULL)
+					printf("%s", lead_str);
+				printf("%20s %d/%d %s\n",
+				       p->name, p->freq, f,
+				       (p->iswrite == 0) ? " " : "write op");
+			}
+		}
 	}
 }
 
-int
-stat64_path(pathname_t *name, struct stat64 *sbuf)
+int stat64_path(pathname_t * name, struct stat64 *sbuf)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = stat64(name->path, sbuf);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1270,17 +1245,16 @@
 	return rval;
 }
 
-int
-symlink_path(const char *name1, pathname_t *name)
+int symlink_path(const char *name1, pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
-        if (!strcmp(name1, name->path)) {
-            printf("yikes! %s %s\n", name1, name->path);
-        return 0;
-        }
+	if (!strcmp(name1, name->path)) {
+		printf("yikes! %s %s\n", name1, name->path);
+		return 0;
+	}
 
 	rval = symlink(name1, name->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1294,12 +1268,11 @@
 	return rval;
 }
 
-int
-truncate64_path(pathname_t *name, off64_t length)
+int truncate64_path(pathname_t * name, off64_t length)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = truncate64(name->path, length);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1313,12 +1286,11 @@
 	return rval;
 }
 
-int
-unlink_path(pathname_t *name)
+int unlink_path(pathname_t * name)
 {
-	char		buf[MAXNAMELEN];
-	pathname_t	newname;
-	int		rval;
+	char buf[MAXNAMELEN];
+	pathname_t newname;
+	int rval;
 
 	rval = unlink(name->path);
 	if (rval >= 0 || errno != ENAMETOOLONG)
@@ -1332,38 +1304,47 @@
 	return rval;
 }
 
-void
-usage(void)
+void usage(void)
 {
 	printf("Usage: %s -H   or\n", myprog);
-	printf("       %s [-c][-d dir][-e errtg][-f op_name=freq][-l loops][-n nops]\n",
-		myprog);
+	printf
+	    ("       %s [-c][-d dir][-e errtg][-f op_name=freq][-l loops][-n nops]\n",
+	     myprog);
 	printf("          [-p nproc][-r len][-s seed][-v][-w][-z][-S]\n");
 	printf("where\n");
-	printf("   -c               specifies not to remove files(cleanup) after execution\n");
-	printf("   -d dir           specifies the base directory for operations\n");
+	printf
+	    ("   -c               specifies not to remove files(cleanup) after execution\n");
+	printf
+	    ("   -d dir           specifies the base directory for operations\n");
 	printf("   -e errtg         specifies error injection stuff\n");
-	printf("   -f op_name=freq  changes the frequency of option name to freq\n");
+	printf
+	    ("   -f op_name=freq  changes the frequency of option name to freq\n");
 	printf("                    the valid operation names are:\n");
 	show_ops(-1, "                        ");
-	printf("   -l loops         specifies the no. of times the testrun should loop.\n");
+	printf
+	    ("   -l loops         specifies the no. of times the testrun should loop.\n");
 	printf("                     *use 0 for infinite (default 1)\n");
-	printf("   -n nops          specifies the no. of operations per process (default 1)\n");
-	printf("   -p nproc         specifies the no. of processes (default 1)\n");
+	printf
+	    ("   -n nops          specifies the no. of operations per process (default 1)\n");
+	printf
+	    ("   -p nproc         specifies the no. of processes (default 1)\n");
 	printf("   -r               specifies random name padding\n");
-	printf("   -s seed          specifies the seed for the random generator (default random)\n");
+	printf
+	    ("   -s seed          specifies the seed for the random generator (default random)\n");
 	printf("   -v               specifies verbose mode\n");
-	printf("   -w               zeros frequencies of non-write operations\n");
+	printf
+	    ("   -w               zeros frequencies of non-write operations\n");
 	printf("   -z               zeros frequencies of all operations\n");
-	printf("   -S               prints the table of operations (omitting zero frequency)\n");
+	printf
+	    ("   -S               prints the table of operations (omitting zero frequency)\n");
 	printf("   -H               prints usage and exits\n");
-	printf("   -X               don't do anything XFS specific (default with -DNO_XFS)\n");
+	printf
+	    ("   -X               don't do anything XFS specific (default with -DNO_XFS)\n");
 }
 
-void
-write_freq(void)
+void write_freq(void)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
 	for (p = ops; p < ops_end; p++) {
 		if (!p->iswrite)
@@ -1371,10 +1352,9 @@
 	}
 }
 
-void
-zero_freq(void)
+void zero_freq(void)
 {
-	opdesc_t	*p;
+	opdesc_t *p;
 
 	for (p = ops; p < ops_end; p++)
 		p->freq = 0;
@@ -1382,17 +1362,16 @@
 
 #ifndef NO_XFS
 
-void
-allocsp_f(int opno, long r)
+void allocsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	struct flock64	fl;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	struct flock64 fl;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1407,20 +1386,20 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: allocsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: allocsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
@@ -1428,25 +1407,24 @@
 	e = ioctl(fd, XFS_IOC_ALLOCSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_ALLOCSP64) %s %lld 0 %d\n",
-			procid, opno, f.path, off, e);
+		       procid, opno, f.path, off, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-attr_remove_f(int opno, long r)
+void attr_remove_f(int opno, long r)
 {
-	attrlist_ent_t		*aep;
-	attrlist_t		*alist;
-	char			*aname;
-	char			buf[4096];
-	attrlist_cursor_t	cursor;
-	int			e;
-	int			ent;
-	pathname_t		f;
-	int			total;
-	int			v;
-	int			which;
+	attrlist_ent_t *aep;
+	attrlist_t *alist;
+	char *aname;
+	char buf[4096];
+	attrlist_cursor_t cursor;
+	int e;
+	int ent;
+	pathname_t f;
+	int total;
+	int v;
+	int which;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
@@ -1455,17 +1433,17 @@
 	memset(&cursor, 0x00, sizeof(cursor));
 	do {
 		e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
-			&cursor);
+				   &cursor);
 		check_cwd();
 		if (e)
 			break;
-		alist = (attrlist_t *)buf;
+		alist = (attrlist_t *) buf;
 		total += alist->al_count;
 	} while (alist->al_more);
 	if (total == 0) {
 		if (v)
 			printf("%d/%d: attr_remove - no attrs for %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -1475,14 +1453,14 @@
 	aname = NULL;
 	do {
 		e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW,
-			&cursor);
+				   &cursor);
 		check_cwd();
 		if (e)
 			break;
-		alist = (attrlist_t *)buf;
+		alist = (attrlist_t *) buf;
 		if (which < ent + alist->al_count) {
 			aep = (attrlist_ent_t *)
-				&buf[alist->al_offset[which - ent]];
+			    & buf[alist->al_offset[which - ent]];
 			aname = aep->a_name;
 			break;
 		}
@@ -1490,9 +1468,8 @@
 	} while (alist->al_more);
 	if (aname == NULL) {
 		if (v)
-			printf(
-			"%d/%d: attr_remove - name %d not found at %s\n",
-				procid, opno, which, f.path);
+			printf("%d/%d: attr_remove - name %d not found at %s\n",
+			       procid, opno, which, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -1500,21 +1477,20 @@
 	check_cwd();
 	if (v)
 		printf("%d/%d: attr_remove %s %s %d\n",
-			procid, opno, f.path, aname, e);
+		       procid, opno, f.path, aname, e);
 	free_pathname(&f);
 }
 
-void
-attr_set_f(int opno, long r)
+void attr_set_f(int opno, long r)
 {
-	char		aname[10];
-	char		*aval;
-	int		e;
-	pathname_t	f;
-	int		len;
-	static int	lengths[] = { 10, 100, 1000, 10000 };
-	int		li;
-	int		v;
+	char aname[10];
+	char *aval;
+	int e;
+	pathname_t f;
+	int len;
+	static int lengths[] = { 10, 100, 1000, 10000 };
+	int li;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
@@ -1527,25 +1503,24 @@
 	aval = malloc(len);
 	memset(aval, nameseq & 0xff, len);
 	e = attr_set_path(&f, aname, aval, len, ATTR_DONTFOLLOW) < 0 ?
-		errno : 0;
+	    errno : 0;
 	check_cwd();
 	free(aval);
 	if (v)
 		printf("%d/%d: attr_set %s %s %d\n", procid, opno, f.path,
-			aname, e);
+		       aname, e);
 	free_pathname(&f);
 }
 
-void
-bulkstat_f(int opno, long r)
+void bulkstat_f(int opno, long r)
 {
-	int		count;
-	int		fd;
-	__uint64_t	last;
-	int		nent;
-	xfs_bstat_t	*t;
-	__int64_t	total;
-        xfs_fsop_bulkreq_t bsr;
+	int count;
+	int fd;
+	__uint64_t last;
+	int nent;
+	xfs_bstat_t *t;
+	__int64_t total;
+	xfs_fsop_bulkreq_t bsr;
 
 	last = 0;
 	nent = (r % 999) + 2;
@@ -1553,89 +1528,88 @@
 	fd = open(".", O_RDONLY);
 	total = 0;
 
-        bsr.lastip=&last;
-        bsr.icount=nent;
-        bsr.ubuffer=t;
-        bsr.ocount=&count;
+	bsr.lastip = &last;
+	bsr.icount = nent;
+	bsr.ubuffer = t;
+	bsr.ocount = &count;
 
 	while (ioctl(fd, XFS_IOC_FSBULKSTAT, &bsr) == 0 && count > 0)
 		total += count;
 	free(t);
 	if (verbose)
 		printf("%d/%d: bulkstat nent %d total %lld\n",
-			procid, opno, nent, total);
+		       procid, opno, nent, total);
 	close(fd);
 }
 
-void
-bulkstat1_f(int opno, long r)
+void bulkstat1_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		good;
-	__uint64_t	ino;
-	struct stat64	s;
-	xfs_bstat_t	t;
-	int		v;
-        xfs_fsop_bulkreq_t bsr;
+	int e;
+	pathname_t f;
+	int fd;
+	int good;
+	__uint64_t ino;
+	struct stat64 s;
+	xfs_bstat_t t;
+	int v;
+	xfs_fsop_bulkreq_t bsr;
 
 	good = random() & 1;
 	if (good) {
-               /* use an inode we know exists */
+		/* use an inode we know exists */
 		init_pathname(&f);
 		if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
 			append_pathname(&f, ".");
-		ino = stat64_path(&f, &s) < 0 ? (ino64_t)r : s.st_ino;
+		ino = stat64_path(&f, &s) < 0 ? (ino64_t) r : s.st_ino;
 		check_cwd();
 		free_pathname(&f);
 	} else {
-                /*
-                 * pick a random inode
-                 *
-                 * note this can generate kernel warning messages
-                 * since bulkstat_one will read the disk block that
-                 * would contain a given inode even if that disk
-                 * block doesn't contain inodes.
-                 *
-                 * this is detected later, but not until after the
-                 * warning is displayed.
-                 *
-                 * "XFS: device 0x825- bad inode magic/vsn daddr 0x0 #0"
-                 *
-                 */
-		ino = (ino64_t)r;
+		/*
+		 * pick a random inode
+		 *
+		 * note this can generate kernel warning messages
+		 * since bulkstat_one will read the disk block that
+		 * would contain a given inode even if that disk
+		 * block doesn't contain inodes.
+		 *
+		 * this is detected later, but not until after the
+		 * warning is displayed.
+		 *
+		 * "XFS: device 0x825- bad inode magic/vsn daddr 0x0 #0"
+		 *
+		 */
+		ino = (ino64_t) r;
 		v = verbose;
 	}
 	fd = open(".", O_RDONLY);
 
-        bsr.lastip=&ino;
-        bsr.icount=1;
-        bsr.ubuffer=&t;
-        bsr.ocount=NULL;
+	bsr.lastip = &ino;
+	bsr.icount = 1;
+	bsr.ubuffer = &t;
+	bsr.ocount = NULL;
 
 	e = ioctl(fd, XFS_IOC_FSBULKSTAT_SINGLE, &bsr) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: bulkstat1 %s ino %lld %d\n",
-                    procid, opno, good?"real":"random", (int64_t)ino, e);
+		       procid, opno, good ? "real" : "random", (int64_t) ino,
+		       e);
 	close(fd);
 }
 
 #endif
 
-void
-chown_f(int opno, long r)
+void chown_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		nbits;
-	uid_t		u;
-	int		v;
+	int e;
+	pathname_t f;
+	int nbits;
+	uid_t u;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
 		append_pathname(&f, ".");
-	u = (uid_t)random();
+	u = (uid_t) random();
 	nbits = (int)(random() % 32);
 	u &= (1 << nbits) - 1;
 	e = lchown_path(&f, u, -1) < 0 ? errno : 0;
@@ -1645,21 +1619,20 @@
 	free_pathname(&f);
 }
 
-void
-creat_f(int opno, long r)
+void creat_f(int opno, long r)
 {
-	int		e;
-	int		e1;
-	int		extsize;
-	pathname_t	f;
-	int		fd;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		type;
-	int		v;
-	int		v1;
-	int esz=0;
+	int e;
+	int e1;
+	int extsize;
+	pathname_t f;
+	int fd;
+	fent_t *fep;
+	int id;
+	int parid;
+	int type;
+	int v;
+	int v1;
+	int esz = 0;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v1))
 		parid = -1;
@@ -1677,7 +1650,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: creat - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -1689,28 +1662,27 @@
 	esz = 0;
 	if (fd >= 0) {
 #ifndef NO_XFS
-		struct fsxattr	a;
+		struct fsxattr a;
 		if (extsize && ioctl(fd, XFS_IOC_FSGETXATTR, &a) >= 0) {
 			a.fsx_xflags |= XFS_XFLAG_REALTIME;
 			a.fsx_extsize =
-				geom.rtextsize * geom.blocksize * extsize;
+			    geom.rtextsize * geom.blocksize * extsize;
 			if (ioctl(fd, XFS_IOC_FSSETXATTR, &a) < 0)
 				e1 = errno;
 			esz = a.fsx_estsize;
 
 		}
 #endif
-		 		 add_to_flist(type, id, parid);
+		add_to_flist(type, id, parid);
 		close(fd);
 	}
 	if (v)
 		printf("%d/%d: creat %s x:%d %d %d\n", procid, opno, f.path,
-			esz, e, e1);
+		       esz, e, e1);
 	free_pathname(&f);
 }
 
-int
-setdirect(int fd)
+int setdirect(int fd)
 {
 	static int no_direct;
 	int flags;
@@ -1722,32 +1694,31 @@
 	if (flags < 0)
 		return 0;
 
-	if (fcntl(fd, F_SETFL, flags|O_DIRECT)  < 0) {
+	if (fcntl(fd, F_SETFL, flags | O_DIRECT) < 0) {
 		if (no_xfs) {
 			no_direct = 1;
 			return 0;
 		}
-		printf("cannot set O_DIRECT: %s\n",strerror(errno));
+		printf("cannot set O_DIRECT: %s\n", strerror(errno));
 		return 0;
 	}
 
 	return 1;
 }
 
-void
-dread_f(int opno, long r)
+void dread_f(int opno, long r)
 {
-	__int64_t	align;
-	char		*buf;
-	struct dioattr	diob;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	__int64_t align;
+	char *buf;
+	struct dioattr diob;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1767,14 +1738,14 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: dread - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: dread - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -1782,7 +1753,7 @@
 	if (stb.st_size == 0) {
 		if (v)
 			printf("%d/%d: dread - %s zero size\n", procid, opno,
-				f.path);
+			       f.path);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -1790,23 +1761,23 @@
 
 	if (no_xfs) {
 		diob.d_miniosz = stb.st_blksize;
-		diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
+		diob.d_maxiosz = stb.st_blksize * 256;	/* good number ? */
 		diob.d_mem = stb.st_blksize;
 	}
 #ifndef NO_XFS
-	   else 	if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
+	else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
 		if (v)
-			printf(
-			"%d/%d: dread - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
-				procid, opno, f.path, errno);
+			printf
+			    ("%d/%d: dread - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+			     procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
 #endif
-	align = (__int64_t)diob.d_miniosz;
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % stb.st_size);
+	align = (__int64_t) diob.d_miniosz;
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % stb.st_size);
 	off -= (off % align);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -1815,30 +1786,29 @@
 		len = align;
 	else if (len > diob.d_maxiosz)
 		len = diob.d_maxiosz;
-	posix_memalign((void**)&buf, diob.d_mem, len);
+	posix_memalign((void **)&buf, diob.d_mem, len);
 	e = read(fd, buf, len) < 0 ? errno : 0;
 	free(buf);
 	if (v)
 		printf("%d/%d: dread %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long int)off, (long)len, e);
+		       procid, opno, f.path, (long long int)off, (long)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-dwrite_f(int opno, long r)
+void dwrite_f(int opno, long r)
 {
-	__int64_t	align;
-	char		*buf;
-	struct dioattr	diob;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	__int64_t align;
+	char *buf;
+	struct dioattr diob;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1853,7 +1823,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: dwrite - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -1863,30 +1833,30 @@
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: dwrite - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
 	if (no_xfs) {
 		diob.d_miniosz = stb.st_blksize;
-		diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
+		diob.d_maxiosz = stb.st_blksize * 256;	/* good number ? */
 		diob.d_mem = stb.st_blksize;
 	}
 #ifndef NO_XFS
 	else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
 		if (v)
-			printf(
-			"%d/%d: dwrite - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
-				procid, opno, f.path, errno);
+			printf
+			    ("%d/%d: dwrite - ioctl(fd, XFS_IOC_DIOINFO) %s failed %d\n",
+			     procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
 #endif
-	align = (__int64_t)diob.d_miniosz;
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	align = (__int64_t) diob.d_miniosz;
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off -= (off % align);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -1895,7 +1865,7 @@
 		len = align;
 	else if (len > diob.d_maxiosz)
 		len = diob.d_maxiosz;
-	posix_memalign((void**)&buf, diob.d_mem, len);
+	posix_memalign((void **)&buf, diob.d_mem, len);
 	off %= maxfsize;
 	lseek64(fd, off, SEEK_SET);
 	memset(buf, nameseq & 0xff, len);
@@ -1903,24 +1873,23 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: dwrite %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-fdatasync_f(int opno, long r)
+void fdatasync_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
 		if (v)
 			printf("%d/%d: fdatasync - no filename\n",
-				procid, opno);
+			       procid, opno);
 		free_pathname(&f);
 		return;
 	}
@@ -1930,7 +1899,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: fdatasync - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -1942,17 +1911,16 @@
 }
 
 #ifndef NO_XFS
-void
-freesp_f(int opno, long r)
+void freesp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	struct flock64	fl;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	struct flock64 fl;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -1967,20 +1935,20 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: freesp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: freesp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
@@ -1988,20 +1956,19 @@
 	e = ioctl(fd, XFS_IOC_FREESP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_FREESP64) %s %lld 0 %d\n",
-			procid, opno, f.path, off, e);
+		       procid, opno, f.path, off, e);
 	free_pathname(&f);
 	close(fd);
 }
 
 #endif
 
-void
-fsync_f(int opno, long r)
+void fsync_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2016,7 +1983,7 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: fsync - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
@@ -2027,12 +1994,11 @@
 	close(fd);
 }
 
-void
-getdents_f(int opno, long r)
+void getdents_f(int opno, long r)
 {
-	DIR		*dir;
-	pathname_t	f;
-	int		v;
+	DIR *dir;
+	pathname_t f;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_DIRm, r, &f, NULL, NULL, &v))
@@ -2042,7 +2008,7 @@
 	if (dir == NULL) {
 		if (v)
 			printf("%d/%d: getdents - can't open %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		free_pathname(&f);
 		return;
 	}
@@ -2054,18 +2020,17 @@
 	closedir(dir);
 }
 
-void
-link_f(int opno, long r)
+void link_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		id;
-	pathname_t	l;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int id;
+	pathname_t l;
+	int parid;
+	int v;
+	int v1;
 
 	init_pathname(&f);
 	if (!get_fname(FT_NOTDIR, r, &f, &flp, NULL, &v1)) {
@@ -2086,7 +2051,7 @@
 		if (v) {
 			fent_to_name(&l, &flist[FT_DIR], fep);
 			printf("%d/%d: link - no filename from %s\n",
-				procid, opno, l.path);
+			       procid, opno, l.path);
 		}
 		free_pathname(&l);
 		free_pathname(&f);
@@ -2098,21 +2063,20 @@
 		add_to_flist(flp - flist, id, parid);
 	if (v)
 		printf("%d/%d: link %s %s %d\n", procid, opno, f.path, l.path,
-			e);
+		       e);
 	free_pathname(&l);
 	free_pathname(&f);
 }
 
-void
-mkdir_f(int opno, long r)
+void mkdir_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int id;
+	int parid;
+	int v;
+	int v1;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2125,7 +2089,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: mkdir - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -2139,16 +2103,15 @@
 	free_pathname(&f);
 }
 
-void
-mknod_f(int opno, long r)
+void mknod_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		id;
-	int		parid;
-	int		v;
-	int		v1;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int id;
+	int parid;
+	int v;
+	int v1;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2161,12 +2124,12 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: mknod - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
 	}
-	e = mknod_path(&f, S_IFCHR|0444, 0) < 0 ? errno : 0;
+	e = mknod_path(&f, S_IFCHR | 0444, 0) < 0 ? errno : 0;
 	check_cwd();
 	if (e == 0)
 		add_to_flist(FT_DEV, id, parid);
@@ -2175,18 +2138,17 @@
 	free_pathname(&f);
 }
 
-void
-read_f(int opno, long r)
+void read_f(int opno, long r)
 {
-	char		*buf;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	char *buf;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2201,14 +2163,14 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: read - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: read - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
@@ -2216,13 +2178,13 @@
 	if (stb.st_size == 0) {
 		if (v)
 			printf("%d/%d: read - %s zero size\n", procid, opno,
-				f.path);
+			       f.path);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % stb.st_size);
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % stb.st_size);
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
 	buf = malloc(len);
@@ -2230,18 +2192,17 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: read %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
 
-void
-readlink_f(int opno, long r)
+void readlink_f(int opno, long r)
 {
-	char		buf[PATH_MAX];
-	int		e;
-	pathname_t	f;
-	int		v;
+	char buf[PATH_MAX];
+	int e;
+	pathname_t f;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_SYMm, r, &f, NULL, NULL, &v)) {
@@ -2257,20 +2218,19 @@
 	free_pathname(&f);
 }
 
-void
-rename_f(int opno, long r)
+void rename_f(int opno, long r)
 {
-	fent_t		*dfep;
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		id;
-	pathname_t	newf;
-	int		oldid;
-	int		parid;
-	int		v;
-	int		v1;
+	fent_t *dfep;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int id;
+	pathname_t newf;
+	int oldid;
+	int parid;
+	int v;
+	int v1;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, &flp, &fep, &v1)) {
@@ -2291,7 +2251,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], dfep);
 			printf("%d/%d: rename - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&newf);
 		free_pathname(&f);
@@ -2309,23 +2269,22 @@
 	}
 	if (v)
 		printf("%d/%d: rename %s to %s %d\n", procid, opno, f.path,
-			newf.path, e);
+		       newf.path, e);
 	free_pathname(&newf);
 	free_pathname(&f);
 }
 
 #ifndef NO_XFS
-void
-resvsp_f(int opno, long r)
+void resvsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	struct flock64	fl;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	struct flock64 fl;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2340,40 +2299,39 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: resvsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: resvsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
-	fl.l_len = (off64_t)(random() % (1024 * 1024));
+	fl.l_len = (off64_t) (random() % (1024 * 1024));
 	e = ioctl(fd, XFS_IOC_RESVSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %lld %d\n",
-			procid, opno, f.path, off, fl.l_len, e);
+		       procid, opno, f.path, off, fl.l_len, e);
 	free_pathname(&f);
 	close(fd);
 }
 #endif
 
-void
-rmdir_f(int opno, long r)
+void rmdir_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		v;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_DIRm, r, &f, NULL, &fep, &v)) {
@@ -2391,13 +2349,12 @@
 	free_pathname(&f);
 }
 
-void
-stat_f(int opno, long r)
+void stat_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v)) {
@@ -2413,19 +2370,18 @@
 	free_pathname(&f);
 }
 
-void
-symlink_f(int opno, long r)
+void symlink_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	int		i;
-	int		id;
-	int		len;
-	int		parid;
-	int		v;
-	int		v1;
-	char		*val;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	int i;
+	int id;
+	int len;
+	int parid;
+	int v;
+	int v1;
+	char *val;
 
 	if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
 		parid = -1;
@@ -2438,7 +2394,7 @@
 		if (v) {
 			fent_to_name(&f, &flist[FT_DIR], fep);
 			printf("%d/%d: symlink - no filename from %s\n",
-				procid, opno, f.path);
+			       procid, opno, f.path);
 		}
 		free_pathname(&f);
 		return;
@@ -2461,23 +2417,21 @@
 }
 
 /* ARGSUSED */
-void
-sync_f(int opno, long r)
+void sync_f(int opno, long r)
 {
 	sync();
 	if (verbose)
 		printf("%d/%d: sync\n", procid, opno);
 }
 
-void
-truncate_f(int opno, long r)
+void truncate_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2491,29 +2445,28 @@
 	if (e > 0) {
 		if (v)
 			printf("%d/%d: truncate - stat64 %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	e = truncate64_path(&f, off) < 0 ? errno : 0;
 	check_cwd();
 	if (v)
 		printf("%d/%d: truncate %s %lld %d\n", procid, opno, f.path,
-			(long long)off, e);
+		       (long long)off, e);
 	free_pathname(&f);
 }
 
-void
-unlink_f(int opno, long r)
+void unlink_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	fent_t		*fep;
-	flist_t		*flp;
-	int		v;
+	int e;
+	pathname_t f;
+	fent_t *fep;
+	flist_t *flp;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_NOTDIR, r, &f, &flp, &fep, &v)) {
@@ -2532,17 +2485,16 @@
 }
 
 #ifndef NO_XFS
-void
-unresvsp_f(int opno, long r)
+void unresvsp_f(int opno, long r)
 {
-	int		e;
-	pathname_t	f;
-	int		fd;
-	struct flock64	fl;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	int e;
+	pathname_t f;
+	int fd;
+	struct flock64 fl;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGFILE, r, &f, NULL, NULL, &v)) {
@@ -2557,45 +2509,44 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: unresvsp - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: unresvsp - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	fl.l_whence = SEEK_SET;
 	fl.l_start = off;
-	fl.l_len = (off64_t)(random() % (1 << 20));
+	fl.l_len = (off64_t) (random() % (1 << 20));
 	e = ioctl(fd, XFS_IOC_UNRESVSP64, &fl) < 0 ? errno : 0;
 	if (v)
 		printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %lld %d\n",
-			procid, opno, f.path, off, fl.l_len, e);
+		       procid, opno, f.path, off, fl.l_len, e);
 	free_pathname(&f);
 	close(fd);
 }
 #endif
 
-void
-write_f(int opno, long r)
+void write_f(int opno, long r)
 {
-	char		*buf;
-	int		e;
-	pathname_t	f;
-	int		fd;
-	size_t		len;
-	__int64_t	lr;
-	off64_t		off;
-	struct stat64	stb;
-	int		v;
+	char *buf;
+	int e;
+	pathname_t f;
+	int fd;
+	size_t len;
+	__int64_t lr;
+	off64_t off;
+	struct stat64 stb;
+	int v;
 
 	init_pathname(&f);
 	if (!get_fname(FT_REGm, r, &f, NULL, NULL, &v)) {
@@ -2610,20 +2561,20 @@
 	if (fd < 0) {
 		if (v)
 			printf("%d/%d: write - open %s failed %d\n",
-				procid, opno, f.path, e);
+			       procid, opno, f.path, e);
 		free_pathname(&f);
 		return;
 	}
 	if (fstat64(fd, &stb) < 0) {
 		if (v)
 			printf("%d/%d: write - fstat64 %s failed %d\n",
-				procid, opno, f.path, errno);
+			       procid, opno, f.path, errno);
 		free_pathname(&f);
 		close(fd);
 		return;
 	}
-	lr = ((__int64_t)random() << 32) + random();
-	off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+	lr = ((__int64_t) random() << 32) + random();
+	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
 	off %= maxfsize;
 	lseek64(fd, off, SEEK_SET);
 	len = (random() % (getpagesize() * 32)) + 1;
@@ -2633,7 +2584,7 @@
 	free(buf);
 	if (v)
 		printf("%d/%d: write %s [%lld,%ld] %d\n",
-			procid, opno, f.path, (long long)off, (long int)len, e);
+		       procid, opno, f.path, (long long)off, (long int)len, e);
 	free_pathname(&f);
 	close(fd);
 }
diff --git a/testcases/network/nfs/nfslock01/nfs_flock.c b/testcases/network/nfs/nfslock01/nfs_flock.c
index cb0df79..39f6125 100644
--- a/testcases/network/nfs/nfslock01/nfs_flock.c
+++ b/testcases/network/nfs/nfslock01/nfs_flock.c
@@ -13,69 +13,68 @@
 #define BYTES 64
 #define LINES 16384
 
-int
-main(argc, argv)
-   int argc;
-   char **argv;
+int main(argc, argv)
+int argc;
+char **argv;
 {
-   int i, fd, mac;
-   int offset=0;
-   char buf[BUFSIZ];
+	int i, fd, mac;
+	int offset = 0;
+	char buf[BUFSIZ];
 
-   if (argc != 3) {
-      fprintf(stderr, "Usage: %s <mac num> <file name>\n", argv[0]);
-      exit(2);
-   }
+	if (argc != 3) {
+		fprintf(stderr, "Usage: %s <mac num> <file name>\n", argv[0]);
+		exit(2);
+	}
 
-   if ((fd = open(argv[2], O_RDWR)) < 0) {
-      perror("opening a file");
-      exit(1);
-   }
+	if ((fd = open(argv[2], O_RDWR)) < 0) {
+		perror("opening a file");
+		exit(1);
+	}
 
-   mac = atoi(argv[1]);
+	mac = atoi(argv[1]);
 
-   /*
-    * Replace a line of characters by 1's if it is process one
-    * else with 0's. Number of charcters in any line are BYTES-1,
-    * the last character being a newline character.
-    */
-   for (i = 0; i < BYTES-1; i++) {
-      if (mac == 1)
-         buf[i] = '1';
-      else
-         buf[i] = '0';
-   }
-   buf[BYTES-1]='\n';
+	/*
+	 * Replace a line of characters by 1's if it is process one
+	 * else with 0's. Number of charcters in any line are BYTES-1,
+	 * the last character being a newline character.
+	 */
+	for (i = 0; i < BYTES - 1; i++) {
+		if (mac == 1)
+			buf[i] = '1';
+		else
+			buf[i] = '0';
+	}
+	buf[BYTES - 1] = '\n';
 
-   for (i = 0; i < LINES; i++) {
-      if (mac == 1) {        /* Set the offset to even lines */
-         if ((i%2) == 0) {
-            if (i == 0)
-               offset = 0;
-            else
-               offset += 2*BYTES;
-         } else
-            continue;
-      } else {               /* Set the offset to odd lines */
-         if ((i%2) == 1) {
-            if (i == 1)
-               offset = BYTES;
-            else
-               offset += 2*BYTES;
-         } else
-            continue;
-      }
+	for (i = 0; i < LINES; i++) {
+		if (mac == 1) {	/* Set the offset to even lines */
+			if ((i % 2) == 0) {
+				if (i == 0)
+					offset = 0;
+				else
+					offset += 2 * BYTES;
+			} else
+				continue;
+		} else {	/* Set the offset to odd lines */
+			if ((i % 2) == 1) {
+				if (i == 1)
+					offset = BYTES;
+				else
+					offset += 2 * BYTES;
+			} else
+				continue;
+		}
 
-      if (writeb_lock(fd, offset, SEEK_SET, BYTES) < 0)
-         printf("failed in writeb_lock, Errno = %d", errno);
+		if (writeb_lock(fd, offset, SEEK_SET, BYTES) < 0)
+			printf("failed in writeb_lock, Errno = %d", errno);
 
-      lseek(fd, offset, SEEK_SET);
+		lseek(fd, offset, SEEK_SET);
 
-      /* write to the test file */
-      write(fd, buf, BYTES);
+		/* write to the test file */
+		write(fd, buf, BYTES);
 
-      if (unb_lock(fd, offset, SEEK_SET, BYTES) < 0)
-         printf("failed in unb_lock, Errno = %d", errno);
-   }
-   exit(0);
+		if (unb_lock(fd, offset, SEEK_SET, BYTES) < 0)
+			printf("failed in unb_lock, Errno = %d", errno);
+	}
+	exit(0);
 }
diff --git a/testcases/network/nfs/nfslock01/nfs_flock_dgen.c b/testcases/network/nfs/nfslock01/nfs_flock_dgen.c
index df7b6bd..2b33ca9 100644
--- a/testcases/network/nfs/nfslock01/nfs_flock_dgen.c
+++ b/testcases/network/nfs/nfslock01/nfs_flock_dgen.c
@@ -6,15 +6,15 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-int
-main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int i, j, k, nlines, nchars, ctype;
 	char c, buf[BUFSIZ];
 	FILE *fp;
 
 	if (argc != 5) {
-		printf("usage: <nfs_flock_dgen> <file> <char/line> <lines> <ctype>\n");
+		printf
+		    ("usage: <nfs_flock_dgen> <file> <char/line> <lines> <ctype>\n");
 		exit(2);
 	}
 
@@ -22,7 +22,8 @@
 
 	nchars = atoi(argv[2]);
 	if (nchars > BUFSIZ) {
-		printf("Exceeded the maximum limit of the buffer (%d)\n", BUFSIZ);
+		printf("Exceeded the maximum limit of the buffer (%d)\n",
+		       BUFSIZ);
 		exit(3);
 	}
 	nlines = atoi(argv[3]);
@@ -36,9 +37,9 @@
 		else
 			c = 'A' + k;
 
-	for (j = 0; j < nchars; j++)
+		for (j = 0; j < nchars; j++)
 
-		buf[j] = c;
+			buf[j] = c;
 
 		fprintf(fp, "%s\n", buf);
 
@@ -52,5 +53,5 @@
 	}
 
 	fclose(fp);
-	return(0);
+	return (0);
 }
diff --git a/testcases/network/nfs/nfslock01/nfs_flock_frk.c b/testcases/network/nfs/nfslock01/nfs_flock_frk.c
index 26f85cb..ba513aa 100644
--- a/testcases/network/nfs/nfslock01/nfs_flock_frk.c
+++ b/testcases/network/nfs/nfslock01/nfs_flock_frk.c
@@ -10,31 +10,30 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-int
-main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-   pid_t pid;
-   char *Prog;
+	pid_t pid;
+	char *Prog;
 
-   if (argc != 3) {
-      fprintf(stderr, "Usage: %s <process> <datafile>\n", argv[0]);
-      exit(2);
-   }
+	if (argc != 3) {
+		fprintf(stderr, "Usage: %s <process> <datafile>\n", argv[0]);
+		exit(2);
+	}
 
-   Prog = strrchr(argv[1], '/');
-   Prog++;
+	Prog = strrchr(argv[1], '/');
+	Prog++;
 
-   if ((pid = fork()) < 0) {
-      printf("Failed in forking, Errno = %d", errno);
-      exit(2);
-   } else if (pid == 0) {               /* child */
-      execl(argv[1], Prog, "0", argv[2], (char *) 0);
-   } else {                             /* parent */
-      execl(argv[1], Prog, "1", argv[2], (char *) 0);
-   }
+	if ((pid = fork()) < 0) {
+		printf("Failed in forking, Errno = %d", errno);
+		exit(2);
+	} else if (pid == 0) {	/* child */
+		execl(argv[1], Prog, "0", argv[2], (char *)0);
+	} else {		/* parent */
+		execl(argv[1], Prog, "1", argv[2], (char *)0);
+	}
 
-   /*if (waitpid(pid, NULL, 0) != pid)
-      printf("Failed in waitpid, Errno = %d", errno);
-*/
-   exit(0);
+	/*if (waitpid(pid, NULL, 0) != pid)
+	   printf("Failed in waitpid, Errno = %d", errno);
+	 */
+	exit(0);
 }
diff --git a/testcases/network/nfs/nfslock01/nfs_flock_func.c b/testcases/network/nfs/nfslock01/nfs_flock_func.c
index 0a3d33a..8111361 100644
--- a/testcases/network/nfs/nfslock01/nfs_flock_func.c
+++ b/testcases/network/nfs/nfslock01/nfs_flock_func.c
@@ -3,36 +3,34 @@
 
 #include "nfs_flock.h"
 
-int
-lock_reg(int fd, int type, off_t offset, int whence, off_t len, int cmd)
+int lock_reg(int fd, int type, off_t offset, int whence, off_t len, int cmd)
 {
-   struct flock lock;
+	struct flock lock;
 
-   lock.l_type = type;
-   lock.l_start = offset;
-   lock.l_whence = whence;
-   lock.l_len = len;
+	lock.l_type = type;
+	lock.l_start = offset;
+	lock.l_whence = whence;
+	lock.l_len = len;
 
-   return(fcntl(fd, cmd, &lock));
+	return (fcntl(fd, cmd, &lock));
 }
 
-int
-lock_test(int fd, int type, off_t offset, int whence, int len)
+int lock_test(int fd, int type, off_t offset, int whence, int len)
 {
-   struct flock lock;
+	struct flock lock;
 
-   lock.l_type = type;
-   lock.l_start = offset;
-   lock.l_whence = whence;
-   lock.l_len = len;
+	lock.l_type = type;
+	lock.l_start = offset;
+	lock.l_whence = whence;
+	lock.l_len = len;
 
-   if (fcntl(fd, F_GETLK, &lock) < 0) {
-      perror("F_GETLK");
-      exit(2);
-   }
+	if (fcntl(fd, F_GETLK, &lock) < 0) {
+		perror("F_GETLK");
+		exit(2);
+	}
 
-   if (lock.l_type == F_UNLCK)
-      return(0);
+	if (lock.l_type == F_UNLCK)
+		return (0);
 
-   return(lock.l_pid);
+	return (lock.l_pid);
 }
diff --git a/testcases/network/nfs/nfsstress/make_tree.c b/testcases/network/nfs/nfsstress/make_tree.c
index 5db6063..7df0b8d 100644
--- a/testcases/network/nfs/nfsstress/make_tree.c
+++ b/testcases/network/nfs/nfsstress/make_tree.c
@@ -196,8 +196,8 @@
 #define dprt(fmt, args...)
 #endif
 
-#define MAKE_EXE	1	/* initate a make			      */
-#define MAKE_CLEAN	0	/* initate a make clean			      */
+#define MAKE_EXE	1	/* initate a make                             */
+#define MAKE_CLEAN	0	/* initate a make clean                       */
 
 #define PTHREAD_EXIT(val)    do {\
 			exit_val = val; \
@@ -211,9 +211,9 @@
                                usage(prog); \
                                    } while (0)
 
-#define MAXD	100	/* default number of directories to create.	      */
-#define MAXF	100	/* default number of files to create.	              */
-#define MAXT	8	/* default number of threads to create.	              */
+#define MAXD	100		/* default number of directories to create.           */
+#define MAXF	100		/* default number of files to create.                 */
+#define MAXT	8		/* default number of threads to create.               */
 
 /******************************************************************************/
 /*								 	      */
@@ -224,16 +224,16 @@
 /* Return:	exits with -1						      */
 /*									      */
 /******************************************************************************/
-static void
-usage(char *progname)           /* name of this program                       */{
-    fprintf(stderr,
-               "Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
-               "\t -d Number of subdirectories to generate:   Default: 100\n"
-               "\t -f Number of c files in each subdirectory: Default: 100\n"
-               "\t -h Help!\n"
-               "\t -t Number of threads to generate:          Default: 8\n",
-                    progname);
-    exit(-1);
+static void usage(char *progname)
+{				/* name of this program                       */
+	fprintf(stderr,
+		"Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
+		"\t -d Number of subdirectories to generate:   Default: 100\n"
+		"\t -f Number of c files in each subdirectory: Default: 100\n"
+		"\t -h Help!\n"
+		"\t -t Number of threads to generate:          Default: 8\n",
+		progname);
+	exit(-1);
 }
 
 /******************************************************************************/
@@ -253,87 +253,78 @@
 /* Return:	exits with 1 on error, 0 on success                           */
 /*									      */
 /******************************************************************************/
-static int
-init_compile( int  what_todo,		 /* do a compile or clean             */
-              char *base_dir,            /* base directory of the test        */
-              char *hname)		 /* hostname of the machine           */
-{
-    int 	status;		/* return status of execve process            */
-    pid_t	pid;		/* pid of the process that does compile       */
-    char	*dirname;	/* location where compile is initated         */
-    char	*command;	/* make or make clean command.                */
+static int init_compile(int what_todo,	/* do a compile or clean             */
+			char *base_dir,	/* base directory of the test        */
+			char *hname)
+{				/* hostname of the machine           */
+	int status;		/* return status of execve process            */
+	pid_t pid;		/* pid of the process that does compile       */
+	char *dirname;		/* location where compile is initated         */
+	char *command;		/* make or make clean command.                */
 
-    if ((dirname = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("init_compile(): dirname malloc()");
-        return 1;
-    }
+	if ((dirname = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("init_compile(): dirname malloc()");
+		return 1;
+	}
 
-    if ((command = malloc(sizeof(char) * 1024)) == NULL) /* just paranoid */
-    {
-        perror("init_compile(): dirname malloc()");
-        return 1;
-    }
+	if ((command = malloc(sizeof(char) * 1024)) == NULL) {	/* just paranoid */
+		perror("init_compile(): dirname malloc()");
+		return 1;
+	}
 
-    what_todo ? sprintf(command, "make -s") : sprintf(command, "make -s clean");
+	what_todo ? sprintf(command, "make -s") : sprintf(command,
+							  "make -s clean");
 
-    sprintf(dirname, "%s/%s.%ld", base_dir, hname, gettid());
+	sprintf(dirname, "%s/%s.%ld", base_dir, hname, gettid());
 
-    if (chdir(dirname) == -1)
-    {
-        dprt("pid[%d]: init_compile(): dir name = %s\n", gettid(), dirname);
-        perror("init_compile() chdir()");
-        free(dirname);
-        return 1;
-    }
+	if (chdir(dirname) == -1) {
+		dprt("pid[%d]: init_compile(): dir name = %s\n", gettid(),
+		     dirname);
+		perror("init_compile() chdir()");
+		free(dirname);
+		return 1;
+	}
 
-    dprt("pid[%d]: init_compile(): command = %s\n", gettid(), command);
+	dprt("pid[%d]: init_compile(): command = %s\n", gettid(), command);
 
-    if ((pid = fork()) == -1)
-    {
-        perror("init_compile(): fork()");
-        return 1;
-    }
-    if (!pid)
-    {
-        char *argv[4];
+	if ((pid = fork()) == -1) {
+		perror("init_compile(): fork()");
+		return 1;
+	}
+	if (!pid) {
+		char *argv[4];
 
-        argv[0] = "/bin/sh";
-        argv[1] = "-c";
-        argv[2] = command;
-        argv[3] = 0;
+		argv[0] = "/bin/sh";
+		argv[1] = "-c";
+		argv[2] = command;
+		argv[3] = 0;
 
-	if (execv("/bin/sh", argv) == -1)
-        {
-	  perror("init_compile(): execv()");
-            return 1;
-        }
-    }
-    do
-    {
-        if (waitpid(pid, &status, 0) == -1)
-        {
-            if (errno != EINTR)
-            {
-                fprintf(stderr, "init_compile(): waitpid() failed\n");
-                return 1;
-            }
-        }
-        else
-        {
-            if (chdir(base_dir) == -1)
-            {
-                dprt("pid[%d]: init_compile(): dir = %s\n", gettid(), dirname);
-                perror("init_compile(): chdir()");
-                return 1;
-            }
+		if (execv("/bin/sh", argv) == -1) {
+			perror("init_compile(): execv()");
+			return 1;
+		}
+	}
+	do {
+		if (waitpid(pid, &status, 0) == -1) {
+			if (errno != EINTR) {
+				fprintf(stderr,
+					"init_compile(): waitpid() failed\n");
+				return 1;
+			}
+		} else {
+			if (chdir(base_dir) == -1) {
+				dprt("pid[%d]: init_compile(): dir = %s\n",
+				     gettid(), dirname);
+				perror("init_compile(): chdir()");
+				return 1;
+			}
 
-            dprt("pid[%d]: init_compile(): status = %d\n", status);
-            dprt("we are here %d\n", __LINE__);
-            return status;
-        }
+			dprt("pid[%d]: init_compile(): status = %d\n", status);
+			dprt("we are here %d\n", __LINE__);
+			return status;
+		}
 
-    } while (1);
+	} while (1);
 }
 
 /******************************************************************************/
@@ -348,124 +339,120 @@
 /* Return:	exits with 1 on error, 0 on success      		      */
 /*									      */
 /******************************************************************************/
-static int
-rm_file_dir( int  numsdir,		/* how many subdirs to remove         */
-	     int  numfiles,		/* number of files to remove per dir  */
-             char *hname,		/* hostname of the client machine     */
-	     char *base_dir)            /* directory where the test is located*/
-{
-    int		filecnt;		/* index to the num of files to remove*/
-    int		dircnt;		        /* index into directory tree          */
-    int		sindex = numsdir;       /* num subdirectory tree to remove    */
-    char	*dirname;		/* name of the directory to chdir()   */
-    char	*tmpdirname;		/* temp name for directory, for swap  */
-    char	*filename;		/* name of the cfile to remove        */
-    char	*subdir;		/* name of the sub dir to remove      */
+static int rm_file_dir(int numsdir,	/* how many subdirs to remove         */
+		       int numfiles,	/* number of files to remove per dir  */
+		       char *hname,	/* hostname of the client machine     */
+		       char *base_dir)
+{				/* directory where the test is located */
+	int filecnt;		/* index to the num of files to remove */
+	int dircnt;		/* index into directory tree          */
+	int sindex = numsdir;	/* num subdirectory tree to remove    */
+	char *dirname;		/* name of the directory to chdir()   */
+	char *tmpdirname;	/* temp name for directory, for swap  */
+	char *filename;		/* name of the cfile to remove        */
+	char *subdir;		/* name of the sub dir to remove      */
 
-    if ((dirname = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("crte_mk_rm(): dirname malloc()");
-	return 1;
-    }
+	if ((dirname = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("crte_mk_rm(): dirname malloc()");
+		return 1;
+	}
 
-    if ((tmpdirname = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("crte_mk_rm(): tmpdirname malloc()");
-	return 1;
-    }
+	if ((tmpdirname = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("crte_mk_rm(): tmpdirname malloc()");
+		return 1;
+	}
 
-    if ((filename = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("crte_mk_rm(): filename malloc()");
-	return 1;
-    }
+	if ((filename = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("crte_mk_rm(): filename malloc()");
+		return 1;
+	}
 
-    if ((subdir = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("crte_mk_rm(): subdir malloc()");
-	return 1;
-    }
+	if ((subdir = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("crte_mk_rm(): subdir malloc()");
+		return 1;
+	}
 
-    dprt("pid[%d]: base directory: %s\n", gettid(), base_dir);
-    while (sindex)
-    {
-        /* get the name of the last directory created. */
-        for (dircnt = 0; dircnt < sindex; dircnt++)
-        {
-            if (dircnt == 0)
-                sprintf(dirname, "%s/%s.%ld", base_dir, hname, gettid());
-            else
-            {
-                 sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(), dircnt);
-                 sprintf(dirname, "%s", tmpdirname);
-            }
-            sync();
-        }
+	dprt("pid[%d]: base directory: %s\n", gettid(), base_dir);
+	while (sindex) {
+		/* get the name of the last directory created. */
+		for (dircnt = 0; dircnt < sindex; dircnt++) {
+			if (dircnt == 0)
+				sprintf(dirname, "%s/%s.%ld", base_dir, hname,
+					gettid());
+			else {
+				sprintf(tmpdirname, "%s/%ld.%d", dirname,
+					gettid(), dircnt);
+				sprintf(dirname, "%s", tmpdirname);
+			}
+			sync();
+		}
 
-        dprt("pid[%d]: cd'ing to last created dir: %s\n", gettid(), dirname);
+		dprt("pid[%d]: cd'ing to last created dir: %s\n", gettid(),
+		     dirname);
 
-        sindex--;
+		sindex--;
 
-        /* remove all the ".c" files and makefile in this directory */
-        for (filecnt = 0; filecnt < numfiles; filecnt++)
-        {
-            sprintf(filename, "%s/%ld.%d.%d.c", dirname, gettid(), dircnt - 1,
-		filecnt);
-            dprt("pid[%d]: removing file: %s\n", gettid(), filename);
+		/* remove all the ".c" files and makefile in this directory */
+		for (filecnt = 0; filecnt < numfiles; filecnt++) {
+			sprintf(filename, "%s/%ld.%d.%d.c", dirname, gettid(),
+				dircnt - 1, filecnt);
+			dprt("pid[%d]: removing file: %s\n", gettid(),
+			     filename);
 
-	    if (unlink(filename))
-            {
-                dprt("pid[%d]: failed removing file: %s\n", gettid(), filename);
-                perror("rm_file_dir(): unlink()");
-                free(tmpdirname);
-                free(dirname);
-                free(filename);
-                free(subdir);
-	        return 1;
-            }
-            sync();
-        }
+			if (unlink(filename)) {
+				dprt("pid[%d]: failed removing file: %s\n",
+				     gettid(), filename);
+				perror("rm_file_dir(): unlink()");
+				free(tmpdirname);
+				free(dirname);
+				free(filename);
+				free(subdir);
+				return 1;
+			}
+			sync();
+		}
 
-        sprintf(filename, "%s/%s", dirname, "makefile");
-        dprt("pid[%d]: removing %s\n", gettid(), filename);
-        if (unlink(filename))
-        {
-            perror("rm_file_dir() cound not remove makefile unlink()");
-            free(tmpdirname);
-            free(dirname);
-            free(filename);
-            free(subdir);
-            return 1;
-        }
-        sync();
+		sprintf(filename, "%s/%s", dirname, "makefile");
+		dprt("pid[%d]: removing %s\n", gettid(), filename);
+		if (unlink(filename)) {
+			perror
+			    ("rm_file_dir() cound not remove makefile unlink()");
+			free(tmpdirname);
+			free(dirname);
+			free(filename);
+			free(subdir);
+			return 1;
+		}
+		sync();
 
-        /* the last directory does not have any more sub directories */
-        /* nothing to remove.				         */
-        dprt("pid[%d]: in directory count(dircnt): %d\n", gettid(), dircnt);
-        dprt("pid[%d]: last directory(numsdir): %d\n", gettid(), numsdir);
-        if (dircnt < numsdir)
-        {
-            /* remove the sub directory */
-            sprintf(subdir, "%s/%ld.%d", dirname, gettid(), dircnt);
-            dprt("pid[%d]: removing subdirectory: %s\n", gettid(), subdir);
-            if (rmdir(subdir) == -1)
-            {
-                perror("rm_file_dir() rmdir()");
-                free(tmpdirname);
-                free(dirname);
-                free(filename);
-                free(subdir);
-	        return 1;
-            }
-            sync();
-        }
-    }
+		/* the last directory does not have any more sub directories */
+		/* nothing to remove.                                    */
+		dprt("pid[%d]: in directory count(dircnt): %d\n", gettid(),
+		     dircnt);
+		dprt("pid[%d]: last directory(numsdir): %d\n", gettid(),
+		     numsdir);
+		if (dircnt < numsdir) {
+			/* remove the sub directory */
+			sprintf(subdir, "%s/%ld.%d", dirname, gettid(), dircnt);
+			dprt("pid[%d]: removing subdirectory: %s\n", gettid(),
+			     subdir);
+			if (rmdir(subdir) == -1) {
+				perror("rm_file_dir() rmdir()");
+				free(tmpdirname);
+				free(dirname);
+				free(filename);
+				free(subdir);
+				return 1;
+			}
+			sync();
+		}
+	}
 
-    free(tmpdirname);
-    free(dirname);
-    free(filename);
-    free(subdir);
-        return 0;
+	free(tmpdirname);
+	free(dirname);
+	free(filename);
+	free(subdir);
+	return 0;
 }
 
 /******************************************************************************/
@@ -486,254 +473,228 @@
 /*		 0 on success					              */
 /*									      */
 /******************************************************************************/
-static void *
-crte_mk_rm(void *args)
+static void *crte_mk_rm(void *args)
 {
-    int 	dircnt;		/* index to the number of subdirectories      */
-    int		fd;		/* file discriptor of the files genetated     */
-    int		filecnt;	/* index to the number of ".c" files created  */
-    int		numchar[2];	/* number of characters written to buffer     */
-    char 	*dirname;	/* name of the directory/idirectory tree      */
-    char 	*tmpdirname;	/* name of a temporary directory, for swaping */
-    char	*cfilename;     /* name of the ".c" file created	      */
-    char	*mkfilename;	/* name of the makefile - which is "makefile" */
-    char	*hostname;	/* hostname of the client machine             */
-    char	*prog_buf;	/* buffer containing contents of the ".c" file*/
-    char	*make_buf;	/* buffer the contents of the makefile        */
-    char	*pwd;	        /* contains the current working directory     */
-    long	*locargptr =	/* local pointer to arguments                 */
-                             (long *)args;
-    volatile int exit_val = 0;  /* exit value of the pthreads		      */
+	int dircnt;		/* index to the number of subdirectories      */
+	int fd;			/* file discriptor of the files genetated     */
+	int filecnt;		/* index to the number of ".c" files created  */
+	int numchar[2];		/* number of characters written to buffer     */
+	char *dirname;		/* name of the directory/idirectory tree      */
+	char *tmpdirname;	/* name of a temporary directory, for swaping */
+	char *cfilename;	/* name of the ".c" file created              */
+	char *mkfilename;	/* name of the makefile - which is "makefile" */
+	char *hostname;		/* hostname of the client machine             */
+	char *prog_buf;		/* buffer containing contents of the ".c" file */
+	char *make_buf;		/* buffer the contents of the makefile        */
+	char *pwd;		/* contains the current working directory     */
+	long *locargptr =	/* local pointer to arguments                 */
+	    (long *)args;
+	volatile int exit_val = 0;	/* exit value of the pthreads                 */
 
-    if ((dirname = malloc(sizeof(char) * 2048)) == NULL) /* just paranoid */
-    {
-        perror("crte_mk_rm(): dirname malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((dirname = malloc(sizeof(char) * 2048)) == NULL) {	/* just paranoid */
+		perror("crte_mk_rm(): dirname malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((tmpdirname = malloc(sizeof(char) * 2048)) == NULL)
-    {
-        perror("crte_mk_rm(): tmpdirname malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((tmpdirname = malloc(sizeof(char) * 2048)) == NULL) {
+		perror("crte_mk_rm(): tmpdirname malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((cfilename = malloc(sizeof(char) * 2048)) == NULL)
-    {
-        perror("crte_mk_rm(): cfilename malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((cfilename = malloc(sizeof(char) * 2048)) == NULL) {
+		perror("crte_mk_rm(): cfilename malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((mkfilename = malloc(sizeof(char) * 2048)) == NULL)
-    {
-        perror("crte_mk_rm(): mkfilename malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((mkfilename = malloc(sizeof(char) * 2048)) == NULL) {
+		perror("crte_mk_rm(): mkfilename malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((prog_buf = malloc(sizeof(char) * 4096)) == NULL)
-    {
-        perror("crte_mk_rm(): prog_buf malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((prog_buf = malloc(sizeof(char) * 4096)) == NULL) {
+		perror("crte_mk_rm(): prog_buf malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((pwd = malloc(PATH_MAX)) == NULL)
-    {
-        perror("crte_mk_rm(): pwd malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((pwd = malloc(PATH_MAX)) == NULL) {
+		perror("crte_mk_rm(): pwd malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if ((hostname = malloc(sizeof(char) * 1024)) == NULL)
-    {
-        perror("crte_mk_rm(): hostname malloc()");
-	PTHREAD_EXIT(-1);
-    }
+	if ((hostname = malloc(sizeof(char) * 1024)) == NULL) {
+		perror("crte_mk_rm(): hostname malloc()");
+		PTHREAD_EXIT(-1);
+	}
 
-    if (gethostname(hostname, 255) == -1)
-    {
-        perror("crte_mk_rm(): gethostname()");
-        PTHREAD_EXIT(-1);
-    }
-    if (!getcwd(pwd, PATH_MAX))
-    {
-        perror("crte_mk_rm(): getcwd()");
-	PTHREAD_EXIT(-1);
-    }
+	if (gethostname(hostname, 255) == -1) {
+		perror("crte_mk_rm(): gethostname()");
+		PTHREAD_EXIT(-1);
+	}
+	if (!getcwd(pwd, PATH_MAX)) {
+		perror("crte_mk_rm(): getcwd()");
+		PTHREAD_EXIT(-1);
+	}
 
-    numchar[0] = sprintf(prog_buf,
-                "main()\n{\n\t printf(\"hello world\");\n}\n");
+	numchar[0] = sprintf(prog_buf,
+			     "main()\n{\n\t printf(\"hello world\");\n}\n");
 
-    for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++)
-    {
-        /* First create the base directory, then create the subdirectories   */
-        if (dircnt == 0)
-            sprintf(dirname, "%s.%ld", hostname, gettid());
-        else
-        {
-            sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(), dircnt);
-            sprintf(dirname, "%s", tmpdirname);
-        }
-        sync();
+	for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
+		/* First create the base directory, then create the subdirectories   */
+		if (dircnt == 0)
+			sprintf(dirname, "%s.%ld", hostname, gettid());
+		else {
+			sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(),
+				dircnt);
+			sprintf(dirname, "%s", tmpdirname);
+		}
+		sync();
 
-        dprt("pid[%d] creating directory: %s\n", gettid(), dirname);
-        if (mkdir(dirname, 0777) == -1)
-        {
-            perror("crte_mk_rm(): mkdir()");
-	    PTHREAD_EXIT(-1);
-        }
-    }
+		dprt("pid[%d] creating directory: %s\n", gettid(), dirname);
+		if (mkdir(dirname, 0777) == -1) {
+			perror("crte_mk_rm(): mkdir()");
+			PTHREAD_EXIT(-1);
+		}
+	}
 
-    sync();
-    usleep(10);
-    for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++)
-    {
-        if (dircnt == 0)
-            sprintf(dirname, "%s/%s.%ld", pwd, hostname, gettid());
-        else
-        {
-            sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(), dircnt);
-            sprintf(dirname, "%s", tmpdirname);
-        }
-        sync();
-        if ((make_buf = malloc(sizeof(char) * 4096)) == NULL)
-        {
-            perror("crte_mk_rm(): make_buf malloc()");
-            PTHREAD_EXIT(-1);
-        }
-        sprintf(mkfilename, "%s/makefile", dirname);
-        {
-            /* HACK! I could not write "%.c" to the makefile */
-            /* there is probably a correct way to do it      */
-            char *dotc = malloc(10);
-            dotc = ".c";
-            sync();
-            usleep(10);
-	    if (dircnt == (locargptr[0] - 1))
-            {
-                numchar[1] = sprintf(make_buf,
-                "CFLAGS := -O -w -g\n"
-                "SUBDIRS = %ld.%d\n"
-                "SRCS=$(wildcard *.c)\n"
-                "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n"
-                "all:\t $(TARGETS)\n"
-                "clean:\n"
-                "\trm -f $(TARGETS)\n",
-                       gettid(), dircnt + 1, dotc);
-	    }
-            else
-            {
-	        numchar[1] = sprintf(make_buf,
-	        "CFLAGS := -O -w -g\n"
-	        "SUBDIRS = %ld.%d\n"
-	        "SRCS=$(wildcard *.c)\n"
-	        "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n\n\n"
-	        "all:\t $(TARGETS)\n"
-                "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done\n\n"
-	        "clean:\n"
-	        "\trm -f $(TARGETS)\n"
-                "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done\n",
-                       gettid(), dircnt + 1, dotc);
-            }
-        }
+	sync();
+	usleep(10);
+	for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
+		if (dircnt == 0)
+			sprintf(dirname, "%s/%s.%ld", pwd, hostname, gettid());
+		else {
+			sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(),
+				dircnt);
+			sprintf(dirname, "%s", tmpdirname);
+		}
+		sync();
+		if ((make_buf = malloc(sizeof(char) * 4096)) == NULL) {
+			perror("crte_mk_rm(): make_buf malloc()");
+			PTHREAD_EXIT(-1);
+		}
+		sprintf(mkfilename, "%s/makefile", dirname);
+		{
+			/* HACK! I could not write "%.c" to the makefile */
+			/* there is probably a correct way to do it      */
+			char *dotc = malloc(10);
+			dotc = ".c";
+			sync();
+			usleep(10);
+			if (dircnt == (locargptr[0] - 1)) {
+				numchar[1] = sprintf(make_buf,
+						     "CFLAGS := -O -w -g\n"
+						     "SUBDIRS = %ld.%d\n"
+						     "SRCS=$(wildcard *.c)\n"
+						     "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n"
+						     "all:\t $(TARGETS)\n"
+						     "clean:\n"
+						     "\trm -f $(TARGETS)\n",
+						     gettid(), dircnt + 1,
+						     dotc);
+			} else {
+				numchar[1] = sprintf(make_buf,
+						     "CFLAGS := -O -w -g\n"
+						     "SUBDIRS = %ld.%d\n"
+						     "SRCS=$(wildcard *.c)\n"
+						     "TARGETS=$(patsubst %%%s,\%%,$(SRCS))\n\n\n"
+						     "all:\t $(TARGETS)\n"
+						     "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i ; done\n\n"
+						     "clean:\n"
+						     "\trm -f $(TARGETS)\n"
+						     "\t@for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done\n",
+						     gettid(), dircnt + 1,
+						     dotc);
+			}
+		}
 
-        sync();
-        usleep(10);
-	dprt("pid[%d]: creating in dir: %s\n", gettid(), mkfilename);
-        /* create the makefile, complies .c files and initiates make in   */
-        /* subdirectories.	       		                          */
-        if ((fd = open(mkfilename, O_CREAT|O_RDWR,
-                                  S_IRWXU|S_IRWXG|S_IRWXO)) == -1)
-        {
-	    dprt(" pid[%d]: failed to create makefile\n", gettid());
-            dprt("pid[%d]: failed in directory %s\n", gettid(), dirname);
-            perror("crte_mk_rm() failed creating makefile: open()");
-	    PTHREAD_EXIT(-1);
-        }
-        else
-        {
-	    sync();
-            if (write(fd, make_buf, numchar[1]) == -1)
-            {
-                perror("crte_mk_rm(): write()");
-	        PTHREAD_EXIT(-1);
-            }
+		sync();
+		usleep(10);
+		dprt("pid[%d]: creating in dir: %s\n", gettid(), mkfilename);
+		/* create the makefile, complies .c files and initiates make in   */
+		/* subdirectories.                                                */
+		if ((fd = open(mkfilename, O_CREAT | O_RDWR,
+			       S_IRWXU | S_IRWXG | S_IRWXO)) == -1) {
+			dprt(" pid[%d]: failed to create makefile\n", gettid());
+			dprt("pid[%d]: failed in directory %s\n", gettid(),
+			     dirname);
+			perror("crte_mk_rm() failed creating makefile: open()");
+			PTHREAD_EXIT(-1);
+		} else {
+			sync();
+			if (write(fd, make_buf, numchar[1]) == -1) {
+				perror("crte_mk_rm(): write()");
+				PTHREAD_EXIT(-1);
+			}
 
-            free(make_buf);
+			free(make_buf);
 
-            if (close(fd) == -1)
-	    {
-                perror("crte_mk_rm(): close()");
-	        PTHREAD_EXIT(-1);
-            }
-        }
-    }
+			if (close(fd) == -1) {
+				perror("crte_mk_rm(): close()");
+				PTHREAD_EXIT(-1);
+			}
+		}
+	}
 
-    for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++)
-    {
-        if (dircnt == 0)
-            sprintf(dirname, "%s/%s.%ld", pwd, hostname, gettid());
-        else
-        {
-            sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(), dircnt);
-            sprintf(dirname, "%s", tmpdirname);
-        }
-        sync();
-        /* In each directory create N ".c" files and a makefile. */
-        for (filecnt = 0; filecnt < (int)locargptr[1]; filecnt++)
-        {
-            sprintf(cfilename, "%s/%ld.%d.%d.c", dirname, gettid(),
-			dircnt, filecnt);
-	    dprt("pid[%d]: creating file: %s\n", gettid(), cfilename);
-            if ((fd = open(cfilename, O_CREAT|O_RDWR,
-	                       S_IRWXU|S_IRWXG|S_IRWXO)) == -1)
-            {
-		fprintf(stderr, "open() failed to create file %s\n", cfilename);
-                perror("crte_mk_rm(): failed creating .c files: open()");
-	        PTHREAD_EXIT(-1);
-            }
-            else
-            {
-                sync();
-                /* write the code, this program prints hello world */
-                if (write(fd, prog_buf, numchar[0]) == -1)
-                {
-                    perror("crte_mk_rm(): write()");
-	            PTHREAD_EXIT(-1);
-                }
+	for (dircnt = 0; dircnt < (int)locargptr[0]; dircnt++) {
+		if (dircnt == 0)
+			sprintf(dirname, "%s/%s.%ld", pwd, hostname, gettid());
+		else {
+			sprintf(tmpdirname, "%s/%ld.%d", dirname, gettid(),
+				dircnt);
+			sprintf(dirname, "%s", tmpdirname);
+		}
+		sync();
+		/* In each directory create N ".c" files and a makefile. */
+		for (filecnt = 0; filecnt < (int)locargptr[1]; filecnt++) {
+			sprintf(cfilename, "%s/%ld.%d.%d.c", dirname, gettid(),
+				dircnt, filecnt);
+			dprt("pid[%d]: creating file: %s\n", gettid(),
+			     cfilename);
+			if ((fd =
+			     open(cfilename, O_CREAT | O_RDWR,
+				  S_IRWXU | S_IRWXG | S_IRWXO)) == -1) {
+				fprintf(stderr,
+					"open() failed to create file %s\n",
+					cfilename);
+				perror
+				    ("crte_mk_rm(): failed creating .c files: open()");
+				PTHREAD_EXIT(-1);
+			} else {
+				sync();
+				/* write the code, this program prints hello world */
+				if (write(fd, prog_buf, numchar[0]) == -1) {
+					perror("crte_mk_rm(): write()");
+					PTHREAD_EXIT(-1);
+				}
 
-                fsync(fd);
+				fsync(fd);
 
-	        if (close(fd) == -1)
-	        {
-                    perror("crte_mk_rm(): close()");
-	            PTHREAD_EXIT(-1);
-                }
-            }
+				if (close(fd) == -1) {
+					perror("crte_mk_rm(): close()");
+					PTHREAD_EXIT(-1);
+				}
+			}
 
-        }
-    }
+		}
+	}
 
-    if (init_compile(MAKE_EXE, pwd, hostname) == 1)
-    {
-        fprintf(stderr, "init_compile() make failed\n");
-        PTHREAD_EXIT(-1);
-    }
-    else
-    {
-        if (init_compile(MAKE_CLEAN, pwd, hostname) == 1)
-        {
-            fprintf(stderr, "init_compile() make clean failed\n");
-            PTHREAD_EXIT(-1);
-        }
-    }
+	if (init_compile(MAKE_EXE, pwd, hostname) == 1) {
+		fprintf(stderr, "init_compile() make failed\n");
+		PTHREAD_EXIT(-1);
+	} else {
+		if (init_compile(MAKE_CLEAN, pwd, hostname) == 1) {
+			fprintf(stderr, "init_compile() make clean failed\n");
+			PTHREAD_EXIT(-1);
+		}
+	}
 
-    sync();
-    /* remove all the files makefiles and subdirecotries  */
-    if (rm_file_dir((int)locargptr[0], (int)locargptr[1], hostname, pwd))
-    {
-        fprintf(stderr, "crte_mk_rm(): rm_file_dir() failed\n");
-        PTHREAD_EXIT(-1);
-    }
-    /* if it made it this far exit with success */
-    PTHREAD_EXIT(0);
+	sync();
+	/* remove all the files makefiles and subdirecotries  */
+	if (rm_file_dir((int)locargptr[0], (int)locargptr[1], hostname, pwd)) {
+		fprintf(stderr, "crte_mk_rm(): rm_file_dir() failed\n");
+		PTHREAD_EXIT(-1);
+	}
+	/* if it made it this far exit with success */
+	PTHREAD_EXIT(0);
 }
 
 /******************************************************************************/
@@ -752,98 +713,83 @@
 /*		 0 on success						      */
 /*									      */
 /******************************************************************************/
-int
-main(int	argc,		/* number of input parameters		      */
-     char	**argv)		/* pointer to the command line arguments.     */
-{
-    int		c;		/* command line options			      */
-    int		num_thrd = MAXT;/* number of threads to create                */
-    int		num_dirs = MAXD;/* number of subdirectories to create         */
-    int		num_files = MAXF;/* number of files in each subdirectory      */
-    int		thrd_ndx;	/* index into the array of thread ids         */
-    int		th_status[1];	/* exit status of LWP's	                      */
-    pthread_t	thrdid[30];	/* maxinum of 30 threads allowed              */
-    long	chld_args[3];   /* arguments to the thread function           */
-    extern int	 optopt;	/* options to the program		      */
+int main(int argc,		/* number of input parameters                 */
+	 char **argv)
+{				/* pointer to the command line arguments.     */
+	int c;			/* command line options                       */
+	int num_thrd = MAXT;	/* number of threads to create                */
+	int num_dirs = MAXD;	/* number of subdirectories to create         */
+	int num_files = MAXF;	/* number of files in each subdirectory      */
+	int thrd_ndx;		/* index into the array of thread ids         */
+	int th_status[1];	/* exit status of LWP's                       */
+	pthread_t thrdid[30];	/* maxinum of 30 threads allowed              */
+	long chld_args[3];	/* arguments to the thread function           */
+	extern int optopt;	/* options to the program                     */
 
-    while ((c =  getopt(argc, argv, "d:f:ht:")) != -1)
-    {
-        switch(c)
-        {
-            case 'd':		/* specify how deep the tree needs to grow    */
-	        if ((num_dirs = atoi(optarg)) == 0)
-		    OPT_MISSING(argv[0], optopt);
-                else
-                if (num_dirs < 0)
-                {
-		    fprintf(stdout,
-			"WARNING: bad argument. Using default\n");
-	            num_dirs = MAXD;
-                }
-		break;
-            case 'f':		/* how many ".c" files in each directory.     */
-		if ((num_files = atoi(optarg)) == 0)
-                    OPT_MISSING(argv[0], optopt);
-                else
-	        if (num_files < 0)
-                {
-		    fprintf(stdout,
-			"WARNING: bad argument. Using default\n");
-                    num_files = MAXF;
-                }
-                break;
-            case 'h':
-                usage(argv[0]);
-                break;
-            case 't':
-		if ((num_thrd = atoi(optarg)) == 0)
-	            OPT_MISSING(argv[0], optopt);
-                else
-                if (num_thrd < 0)
-                {
-                    fprintf(stdout,
-                        "WARNING: bad argument. Using default\n");
-                    num_thrd = MAXT;
-                }
-                break;
-            default :
-		usage(argv[0]);
-		break;
+	while ((c = getopt(argc, argv, "d:f:ht:")) != -1) {
+		switch (c) {
+		case 'd':	/* specify how deep the tree needs to grow    */
+			if ((num_dirs = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_dirs < 0) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_dirs = MAXD;
+			}
+			break;
+		case 'f':	/* how many ".c" files in each directory.     */
+			if ((num_files = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_files < 0) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_files = MAXF;
+			}
+			break;
+		case 'h':
+			usage(argv[0]);
+			break;
+		case 't':
+			if ((num_thrd = atoi(optarg)) == 0)
+				OPT_MISSING(argv[0], optopt);
+			else if (num_thrd < 0) {
+				fprintf(stdout,
+					"WARNING: bad argument. Using default\n");
+				num_thrd = MAXT;
+			}
+			break;
+		default:
+			usage(argv[0]);
+			break;
+		}
 	}
-    }
 
-    chld_args[0] = num_dirs;
-    chld_args[1] = num_files;
+	chld_args[0] = num_dirs;
+	chld_args[1] = num_files;
 
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        if (pthread_create(&thrdid[thrd_ndx], NULL, crte_mk_rm, chld_args))
-        {
-            perror("crte_mk_rm(): pthread_create()");
-            exit(-1);
-        }
-    }
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		if (pthread_create
+		    (&thrdid[thrd_ndx], NULL, crte_mk_rm, chld_args)) {
+			perror("crte_mk_rm(): pthread_create()");
+			exit(-1);
+		}
+	}
 
-    sync();
+	sync();
 
-    for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++)
-    {
-        if (pthread_join(thrdid[thrd_ndx], (void **)&th_status) != 0)
-        {
-            perror("crte_mk_rm(): pthread_join()");
-            exit(-1);
-        }
-        else
-        {
-            dprt("WE ARE HERE %d\n", __LINE__);
-            if (*th_status == -1)
-            {
-                fprintf(stderr,
-                        "thread [%ld] - process exited with errors\n",
-                            thrdid[thrd_ndx]);
-                exit(-1);
-            }
-        }
-    }
-    return(0);
+	for (thrd_ndx = 0; thrd_ndx < num_thrd; thrd_ndx++) {
+		if (pthread_join(thrdid[thrd_ndx], (void **)&th_status) != 0) {
+			perror("crte_mk_rm(): pthread_join()");
+			exit(-1);
+		} else {
+			dprt("WE ARE HERE %d\n", __LINE__);
+			if (*th_status == -1) {
+				fprintf(stderr,
+					"thread [%ld] - process exited with errors\n",
+					thrdid[thrd_ndx]);
+				exit(-1);
+			}
+		}
+	}
+	return (0);
 }
diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
index 18a92a0..b8b67b4 100644
--- a/testcases/network/nfsv4/acl/acl1.c
+++ b/testcases/network/nfsv4/acl/acl1.c
@@ -41,7 +41,8 @@
 acl_t testacl;
 /* the "typical" acl used for the test */
 
-static char *permtab[] = {"---","r--","-w-","rw-","--x","r-x","-wx","rwx"};
+static char *permtab[] =
+    { "---", "r--", "-w-", "rw-", "--x", "r-x", "-wx", "rwx" };
 
 struct statstore {
 	/* number of passed tests */
@@ -50,7 +51,8 @@
 	int failed;
 } aclstat;
 
-int do_file_op(char* filename) {
+int do_file_op(char *filename)
+{
 	int exe;
 	int result;
 	uid_t uid;
@@ -62,67 +64,71 @@
 	uid = geteuid();
 	strcat(str, filename);
 
-	exe = execl(str,NULL,NULL);
-	if (exe == -1 && errno!=EACCES)
+	exe = execl(str, NULL, NULL);
+	if (exe == -1 && errno != EACCES)
 		result = result + OP_EXEC;
 
-	fptr = fopen(filename,"r");
+	fptr = fopen(filename, "r");
 	if (fptr != NULL) {
 		result = result + OP_READ;
-		fclose(fptr); }
+		fclose(fptr);
+	}
 
-	fptr = fopen(filename,"r+");
+	fptr = fopen(filename, "r+");
 	if (fptr != NULL) {
 		result = result + OP_WRITE;
-		fclose(fptr); }
+		fclose(fptr);
+	}
 
 	return result;
 }
 
 /*  acl with user entries used for the test */
-acl_t test_acl_user_create(void) {
+acl_t test_acl_user_create(void)
+{
 	char acl_text[] =
-	"u::rwx,u:user1:rwx,u:user2:rw-,u:user3:r--,u:user4:r-x,u:user5:---,g::r-x,o::r-x,m::rwx";
+	    "u::rwx,u:user1:rwx,u:user2:rw-,u:user3:r--,u:user4:r-x,u:user5:---,g::r-x,o::r-x,m::rwx";
 	acl_t acl;
-	acl = acl_from_text (acl_text);
+	acl = acl_from_text(acl_text);
 	return acl;
 }
 
 /*  acl with group entries used for the test */
 
-acl_t test_acl_grp_create(void) {
-	char acl_text[] =
-	"u::rwx,g:grp1:rwx,g:grp2:rw-,g:grp3:r--,g:grp4:r-x,g:grp5:---,g::---,o::r-x,m::rwx";
-	acl_t acl;
-	acl = acl_from_text (acl_text);
-	return acl;
-}
-
-acl_t test_acl_default_create(void) {
-	char acl_text[] =
-	"u::rwx,u:user1:rwx,u:user2:rw-,u:user3:r--,u:user4:r-x,u:user5:---,g::r-x,m::rwx,o::r-x";
-	acl_t acl;
-	acl = acl_from_text (acl_text);
-	return acl;
-}
-
-static void
-report(testnum, expected, result, fail)
-	int testnum;			/* test number */
-	int expected;			/* expected result */
-	int result;			/* actual result */
-	int fail;			/* fail or warning */
+acl_t test_acl_grp_create(void)
 {
-	char * res;
+	char acl_text[] =
+	    "u::rwx,g:grp1:rwx,g:grp2:rw-,g:grp3:r--,g:grp4:r-x,g:grp5:---,g::---,o::r-x,m::rwx";
+	acl_t acl;
+	acl = acl_from_text(acl_text);
+	return acl;
+}
+
+acl_t test_acl_default_create(void)
+{
+	char acl_text[] =
+	    "u::rwx,u:user1:rwx,u:user2:rw-,u:user3:r--,u:user4:r-x,u:user5:---,g::r-x,m::rwx,o::r-x";
+	acl_t acl;
+	acl = acl_from_text(acl_text);
+	return acl;
+}
+
+static void report(testnum, expected, result, fail)
+int testnum;			/* test number */
+int expected;			/* expected result */
+int result;			/* actual result */
+int fail;			/* fail or warning */
+{
+	char *res;
 	if (expected == result) {
 		res = "[OK]";
 		aclstat.ok++;
-	}
-	else {
+	} else {
 		res = "[FAILED]";
 		aclstat.failed++;
 	}
-	printf("\ttest #%d - Expected: %s - Obtained: %s - %s\n", testnum, permtab[expected], permtab[result], res);
+	printf("\ttest #%d - Expected: %s - Obtained: %s - %s\n", testnum,
+	       permtab[expected], permtab[result], res);
 
 	fflush(stdout);
 }
@@ -132,16 +138,15 @@
  * - try to read
  * - try to write
  */
-static void
-test1(char *file)
+static void test1(char *file)
 {
 	int result;
-	if (seteuid((uid_t)601) == 0) {
+	if (seteuid((uid_t) 601) == 0) {
 		result = do_file_op(file);
 		/* expected result = OP_READ || OP_WRITE || OP_EXEC */
 		report(1, OP_READ + OP_WRITE + OP_EXEC, result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
+		seteuid((uid_t) 0);
+		setegid((gid_t) 0);
 	}
 }
 
@@ -152,16 +157,14 @@
  *
  */
 
-static void
-test2(char *file)
+static void test2(char *file)
 {
 	int result;
-	if (seteuid((uid_t)602) == 0)
-	{
+	if (seteuid((uid_t) 602) == 0) {
 		result = do_file_op(file);
 		/* expected result = OP_READ || OP_WRITE */
-		report(2, OP_READ + OP_WRITE , result);
-		seteuid((uid_t)0);
+		report(2, OP_READ + OP_WRITE, result);
+		seteuid((uid_t) 0);
 	}
 }
 
@@ -171,16 +174,14 @@
  * - try to write
  */
 
-static void
-test3(char *file)
+static void test3(char *file)
 {
 	int result;
-	if (seteuid((uid_t)603) == 0)
-	{
+	if (seteuid((uid_t) 603) == 0) {
 		result = do_file_op(file);
 		/* expected result = OP_READ */
 		report(3, OP_READ, result);
-		seteuid((uid_t)0);
+		seteuid((uid_t) 0);
 	}
 }
 
@@ -190,43 +191,38 @@
  * - try to write
  */
 
-static void
-test4(char *file)
+static void test4(char *file)
 {
 	int result;
-	if (seteuid((uid_t)604) == 0)
-	{
+	if (seteuid((uid_t) 604) == 0) {
 		result = do_file_op(file);
 		/* expected result = OP_READ || OP_EXEC */
 		report(4, OP_READ + OP_EXEC, result);
-		seteuid((uid_t)0);
-}
-}
-
-static void
-test5(char *file)
-{
-	int result;
-	if (seteuid((uid_t)605) == 0)
-	{
-		result = do_file_op(file);
-		/* expected result = 0x0 */
-		report(5, 0x00, result);
-		seteuid((uid_t)0);
+		seteuid((uid_t) 0);
 	}
 }
 
-static void
-testgrp1(char *file)
+static void test5(char *file)
 {
 	int result;
-	if (setegid((gid_t)601) == 0) {
-		if (seteuid((uid_t)601) == 0) {
+	if (seteuid((uid_t) 605) == 0) {
 		result = do_file_op(file);
-		/* expected result = OP_READ || OP_WRITE || OP_EXEC */
-		report(1, OP_READ + OP_WRITE + OP_EXEC, result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
+		/* expected result = 0x0 */
+		report(5, 0x00, result);
+		seteuid((uid_t) 0);
+	}
+}
+
+static void testgrp1(char *file)
+{
+	int result;
+	if (setegid((gid_t) 601) == 0) {
+		if (seteuid((uid_t) 601) == 0) {
+			result = do_file_op(file);
+			/* expected result = OP_READ || OP_WRITE || OP_EXEC */
+			report(1, OP_READ + OP_WRITE + OP_EXEC, result);
+			seteuid((uid_t) 0);
+			setegid((gid_t) 0);
 		}
 	}
 }
@@ -238,17 +234,15 @@
  *
  */
 
-static void
-testgrp2(char *file)
+static void testgrp2(char *file)
 {
 	int result;
-	if ((setegid((gid_t)602) == 0) && (seteuid((uid_t)602) == 0))
-	{
+	if ((setegid((gid_t) 602) == 0) && (seteuid((uid_t) 602) == 0)) {
 		result = do_file_op(file);
 		/* expected result = OP_READ || OP_WRITE */
-		report(2, OP_READ + OP_WRITE , result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
+		report(2, OP_READ + OP_WRITE, result);
+		seteuid((uid_t) 0);
+		setegid((gid_t) 0);
 	}
 }
 
@@ -258,17 +252,15 @@
  * - try to write
  */
 
-static void
-testgrp3(char *file)
+static void testgrp3(char *file)
 {
 	int result;
-	if ((setegid((gid_t)603) == 0) && (seteuid((uid_t)603) == 0))
-	{
+	if ((setegid((gid_t) 603) == 0) && (seteuid((uid_t) 603) == 0)) {
 		result = do_file_op(file);
 		/* expected result = OP_READ */
 		report(3, OP_READ, result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
+		seteuid((uid_t) 0);
+		setegid((gid_t) 0);
 	}
 }
 
@@ -278,57 +270,54 @@
  * - try to write
  */
 
-static void
-testgrp4(char *file)
+static void testgrp4(char *file)
 {
 	int result;
-	if (setegid((gid_t)604) == 0)
-	{
-		if (seteuid((uid_t)604) == 0)
-		result = do_file_op(file);
+	if (setegid((gid_t) 604) == 0) {
+		if (seteuid((uid_t) 604) == 0)
+			result = do_file_op(file);
 		/* expected result = OP_READ || OP_EXEC */
 		report(4, OP_READ + OP_EXEC, result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
-}
+		seteuid((uid_t) 0);
+		setegid((gid_t) 0);
+	}
 }
 
-static void
-testgrp5(char *file)
+static void testgrp5(char *file)
 {
 	int result;
-	if (setegid((gid_t)605) == 0)
-	{
-		if (seteuid((uid_t)605) == 0)
-		result = do_file_op(file);
+	if (setegid((gid_t) 605) == 0) {
+		if (seteuid((uid_t) 605) == 0)
+			result = do_file_op(file);
 		/* expected result = 0x0 */
 		report(5, 0x00, result);
-		seteuid((uid_t)0);
-		setegid((gid_t)0);
+		seteuid((uid_t) 0);
+		setegid((gid_t) 0);
 	}
 }
 
 /* testing default acl */
-void test_acl_default(char * dir, acl_t acl) {
+void test_acl_default(char *dir, acl_t acl)
+{
 	/* set default acl on directory */
 	/* create a file in this directory */
 	/* compare the file's acl and the parent directory's one */
 	int res;
-	acl_t acl1,acl2;
+	acl_t acl1, acl2;
 
 	res = acl_set_file(dir, ACL_TYPE_DEFAULT, acl);
-	acl1 = acl_get_file(dir,ACL_TYPE_DEFAULT);
+	acl1 = acl_get_file(dir, ACL_TYPE_DEFAULT);
 	if (res == -1)
-		printf("path = %s **** errno = %d",dir,errno);
-	char *path = strcat(dir,"/testfile");
-	fopen(path,"w+");
-	char * cmd=malloc(256);
+		printf("path = %s **** errno = %d", dir, errno);
+	char *path = strcat(dir, "/testfile");
+	fopen(path, "w+");
+	char *cmd = malloc(256);
 
-        strcpy(cmd, "chmod 7777 ");
+	strcpy(cmd, "chmod 7777 ");
 	printf(cmd);
-        strcat(cmd,dir);
-        system(cmd);
-	acl2 = acl_get_file(path,ACL_TYPE_ACCESS);
+	strcat(cmd, dir);
+	system(cmd);
+	acl2 = acl_get_file(path, ACL_TYPE_ACCESS);
 
 	test1(path);
 	test2(path);
@@ -337,17 +326,17 @@
 	test5(path);
 }
 
-static void
-showstats(void)
+static void showstats(void)
 {
-	printf("\nACL TESTS RESULTS: %d passed, %d failed\n\n", aclstat.ok, aclstat.failed);
+	printf("\nACL TESTS RESULTS: %d passed, %d failed\n\n", aclstat.ok,
+	       aclstat.failed);
 }
 
 int main(int argc, char *argv[])
 {
 	int result;
-	aclstat.ok=0;
-	aclstat.failed=0;
+	aclstat.ok = 0;
+	aclstat.failed = 0;
 	acl_t testacl;
 	printf("Test acl with entries on users\n");
 	testacl = test_acl_user_create();
@@ -355,9 +344,10 @@
 	/* set the right acl for the test */
 	result = acl_set_file(argv[1], ACL_TYPE_ACCESS, testacl);
 	if (result == -1) {
-		printf("setting acl on file %s failed\nBad NFS configuration",argv[1]);
+		printf("setting acl on file %s failed\nBad NFS configuration",
+		       argv[1]);
 		exit(1);
-		}
+	}
 	test1(argv[1]);
 	test2(argv[1]);
 	test3(argv[1]);
@@ -367,13 +357,13 @@
 	printf("\nTest of default acl:\n");
 
 	testacl = test_acl_default_create();
-	test_acl_default(argv[2],testacl);
+	test_acl_default(argv[2], testacl);
 
 	printf("\nTest acl with entries concerning groups\n");
 	testacl = test_acl_grp_create();
 	result = acl_set_file(argv[1], ACL_TYPE_ACCESS, testacl);
 	if (result == -1)
-		printf("setting acl on file %s failed\n",argv[1]);
+		printf("setting acl on file %s failed\n", argv[1]);
 
 	testgrp1(argv[1]);
 	testgrp2(argv[1]);
diff --git a/testcases/network/nfsv4/locks/locktests.c b/testcases/network/nfsv4/locks/locktests.c
index 1b9cf42..cefecee 100644
--- a/testcases/network/nfsv4/locks/locktests.c
+++ b/testcases/network/nfsv4/locks/locktests.c
@@ -29,8 +29,8 @@
 
 #include "locktests.h"
 
-int MAXLEN=64;
-int MAXTEST=10;
+int MAXLEN = 64;
+int MAXTEST = 10;
 extern int maxClients;
 extern int fdServeur;
 
@@ -41,102 +41,111 @@
 
 /* Quel lock sera appplique par le maitre en debut de test */
 /* Which lock will be applied by the master process on test startup */
-int LISTE_LOCKS[]=      {READLOCK, WRITELOCK,
-                         READLOCK, WRITELOCK,
-                         READLOCK, WRITELOCK,
-                         READLOCK, WRITELOCK,
-                         BYTELOCK_READ, BYTELOCK_WRITE
+int LISTE_LOCKS[] = { READLOCK, WRITELOCK,
+	READLOCK, WRITELOCK,
+	READLOCK, WRITELOCK,
+	READLOCK, WRITELOCK,
+	BYTELOCK_READ, BYTELOCK_WRITE
 };
 
 /* Les operations que les programes esclaves essaieront de faire */
 /* The operations the slave processes will try to perform */
 
-int LISTE_TESTS[]=      {WRONLY,  WRONLY,
-                         RDONLY,  RDONLY,
-                         READLOCK, WRITELOCK,
-                         WRITELOCK, READLOCK,
-                         BYTELOCK_READ, BYTELOCK_WRITE
+int LISTE_TESTS[] = { WRONLY, WRONLY,
+	RDONLY, RDONLY,
+	READLOCK, WRITELOCK,
+	WRITELOCK, READLOCK,
+	BYTELOCK_READ, BYTELOCK_WRITE
 };
 
 /* List of test names */
-char *LISTE_NOMS_TESTS[]={"WRITE ON A READ  LOCK",
-                          "WRITE ON A WRITE LOCK",
-                          "READ  ON A READ  LOCK",
-                          "READ  ON A WRITE LOCK",
-                          "SET A READ  LOCK ON A READ  LOCK",
-                          "SET A WRITE LOCK ON A WRITE LOCK",
-                          "SET A WRITE LOCK ON A READ  LOCK",
-                          "SET A READ  LOCK ON A WRITE LOCK",
-                          "READ LOCK THE WHOLE FILE BYTE BY BYTE",
-                          "WRITE LOCK THE WHOLE FILE BYTE BY BYTE"
-
+char *LISTE_NOMS_TESTS[] = { "WRITE ON A READ  LOCK",
+	"WRITE ON A WRITE LOCK",
+	"READ  ON A READ  LOCK",
+	"READ  ON A WRITE LOCK",
+	"SET A READ  LOCK ON A READ  LOCK",
+	"SET A WRITE LOCK ON A WRITE LOCK",
+	"SET A WRITE LOCK ON A READ  LOCK",
+	"SET A READ  LOCK ON A WRITE LOCK",
+	"READ LOCK THE WHOLE FILE BYTE BY BYTE",
+	"WRITE LOCK THE WHOLE FILE BYTE BY BYTE"
 };
 
 /* Resultat attendu du test - Processus */
 /* List of expected test results, when slaves are processes */
 
-int LISTE_RESULTATS_PROCESS[]=  {SUCCES, SUCCES,
-                                SUCCES,  SUCCES,
-                                SUCCES,  ECHEC,
-                                ECHEC,   ECHEC,
-                                SUCCES,  SUCCES
-
+int LISTE_RESULTATS_PROCESS[] = { SUCCES, SUCCES,
+	SUCCES, SUCCES,
+	SUCCES, ECHEC,
+	ECHEC, ECHEC,
+	SUCCES, SUCCES
 };
+
 /* List of expected test results, when slaves are threads */
 
-int LISTE_RESULTATS_THREADS[]=  { SUCCES,  SUCCES,
-                                SUCCES,  SUCCES,
-                                SUCCES,  SUCCES,
-                                SUCCES,  SUCCES,
-                                ECHEC,  ECHEC
-
+int LISTE_RESULTATS_THREADS[] = { SUCCES, SUCCES,
+	SUCCES, SUCCES,
+	SUCCES, SUCCES,
+	SUCCES, SUCCES,
+	ECHEC, ECHEC
 };
 
-int *LISTE_RESULTATS=NULL;
-char *eType=NULL;
+int *LISTE_RESULTATS = NULL;
+char *eType = NULL;
 
-int TOTAL_RESULTAT_OK[]={0,0,0,0,0,0,0,0,0,0};
+int TOTAL_RESULTAT_OK[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
-void * esclave(void *donnees);
-int (*terminer)(int a);
+void *esclave(void *donnees);
+int (*terminer) (int a);
 
-int terminerProcess(int a) {
-    exit(a);
+int terminerProcess(int a)
+{
+	exit(a);
 }
 
-int (*load)();
+int (*load) ();
 
 struct donneesPub dp;
 
 /* Manipulation des tests/ noms de tests/ resultats de tests */
 /* Functions to access tests/tests names/tests results*/
-int testSuiv(int n) {
-   return LISTE_TESTS[n];
+int testSuiv(int n)
+{
+	return LISTE_TESTS[n];
 }
-int resAttSuiv(int n) {
-    return LISTE_RESULTATS[n];
+
+int resAttSuiv(int n)
+{
+	return LISTE_RESULTATS[n];
 }
-char * nomTestSuiv(int n) {
-    return LISTE_NOMS_TESTS[n];
+
+char *nomTestSuiv(int n)
+{
+	return LISTE_NOMS_TESTS[n];
 }
-int lockSuiv(int n) {
-    return LISTE_LOCKS[n];
+
+int lockSuiv(int n)
+{
+	return LISTE_LOCKS[n];
 }
 
 /* Verifie si le resultat obtenu pour le test est le resultat attendu pour ce test */
 /* Verifie the test result is the expected one */
-int matchResult(int r, int n) {
+int matchResult(int r, int n)
+{
 
-    P("r=%d\n",r);
-    if (r==LISTE_RESULTATS[n])
-        return 1;
-    else return 0;
+	P("r=%d\n", r);
+	if (r == LISTE_RESULTATS[n])
+		return 1;
+	else
+		return 0;
 }
 
 /* Incremente le nombre de process ayant valide le test */
 /* Increments the number of process which have successfully passed the test */
-void compteur(int r,int n) {
-    TOTAL_RESULTAT_OK[n]+=matchResult(r, n);
+void compteur(int r, int n)
+{
+	TOTAL_RESULTAT_OK[n] += matchResult(r, n);
 }
 
 /* Validation des resultats pour le lock de fichier octet par octet
@@ -146,328 +155,349 @@
  * We ensure each byte is correctly locked.
  */
 
-void validationResultats(int n) {
-    int i,u,l, fsize;
-    struct flock request;
+void validationResultats(int n)
+{
+	int i, u, l, fsize;
+	struct flock request;
 
-    fsize=dp.nclnt*(maxClients+1);
-    TOTAL_RESULTAT_OK[n]=0;
-    l=FALSE;
-    u=TRUE;
-    /* Si le resultat de l'operation attendu est un succe on prevoi d'incrementer le nombre de resultats corrects */
-    /* If the expected operation result is a success, we will have to increase the number of correct results */
-    if (LISTE_RESULTATS[n]) {
-        l=TRUE;
-        u=FALSE;
-    }
+	fsize = dp.nclnt * (maxClients + 1);
+	TOTAL_RESULTAT_OK[n] = 0;
+	l = FALSE;
+	u = TRUE;
+	/* Si le resultat de l'operation attendu est un succe on prevoi d'incrementer le nombre de resultats corrects */
+	/* If the expected operation result is a success, we will have to increase the number of correct results */
+	if (LISTE_RESULTATS[n]) {
+		l = TRUE;
+		u = FALSE;
+	}
 
-    for (i=0;i<fsize;i++) {
-        request.l_type=F_WRLCK;
-        request.l_whence=SEEK_SET;
-        request.l_start=i;
-        request.l_len=1;
-        fcntl(dp.fd, F_GETLK, &request);
-        /* On verifie si le lock est mis ou non */
-        /* Ensure the lock is correctly set */
-        if (request.l_type!=F_UNLCK)
-            TOTAL_RESULTAT_OK[n]+=l;
-        else
-            TOTAL_RESULTAT_OK[n]+=u;
-    }
+	for (i = 0; i < fsize; i++) {
+		request.l_type = F_WRLCK;
+		request.l_whence = SEEK_SET;
+		request.l_start = i;
+		request.l_len = 1;
+		fcntl(dp.fd, F_GETLK, &request);
+		/* On verifie si le lock est mis ou non */
+		/* Ensure the lock is correctly set */
+		if (request.l_type != F_UNLCK)
+			TOTAL_RESULTAT_OK[n] += l;
+		else
+			TOTAL_RESULTAT_OK[n] += u;
+	}
 }
 
 /* Procedures d'initialisation */
 /* Initialisation functions */
 
-int initTest() {
+int initTest()
+{
 
-    P("Maitre ouvre %s\n",dp.fname);
-    dp.fd = open(dp.fname, OPENFLAGS, MANDMODES);
-    if (dp.fd < 0) {
-        perror("lock test : can't open test file :");
-        terminer(1);
-    }
-    P("fd=%d\n", dp.fd);
-        return 0;
+	P("Maitre ouvre %s\n", dp.fname);
+	dp.fd = open(dp.fname, OPENFLAGS, MANDMODES);
+	if (dp.fd < 0) {
+		perror("lock test : can't open test file :");
+		terminer(1);
+	}
+	P("fd=%d\n", dp.fd);
+	return 0;
 }
 
 struct donneesFils *initClientFork(int i)
 {
-    struct donneesPriv *dpr;
-    struct donneesFils *df;
+	struct donneesPriv *dpr;
+	struct donneesFils *df;
 
-    /* Initialisation des champs de donnees */
-    /* Initialize private data fields */
-    dpr=(struct donneesPriv *)malloc(sizeof(struct donneesPriv ));
-    df=(struct donneesFils *)malloc(sizeof(struct donneesFils));
-    dpr->whoami=i;
-    df->dp=&dp;
-    df->dpr=dpr;
-    /* Initialisation du tubes de synchronisation */
-    /* Initialize master to client pipe */
-    dp.lclnt[i]=(int *)malloc(sizeof(int)*2);
-    if (pipe(dp.lclnt[i])<0) {
-        perror("Impossible to create pipe\n");
-        exit(1);
-    }
-    P("Initialization %d\n", i);
-    write(0,".",1);
-    return df;
+	/* Initialisation des champs de donnees */
+	/* Initialize private data fields */
+	dpr = (struct donneesPriv *)malloc(sizeof(struct donneesPriv));
+	df = (struct donneesFils *)malloc(sizeof(struct donneesFils));
+	dpr->whoami = i;
+	df->dp = &dp;
+	df->dpr = dpr;
+	/* Initialisation du tubes de synchronisation */
+	/* Initialize master to client pipe */
+	dp.lclnt[i] = (int *)malloc(sizeof(int) * 2);
+	if (pipe(dp.lclnt[i]) < 0) {
+		perror("Impossible to create pipe\n");
+		exit(1);
+	}
+	P("Initialization %d\n", i);
+	write(0, ".", 1);
+	return df;
 }
 
-int initialise(int clnt) {
+int initialise(int clnt)
+{
 
-    /* Initialisation des donnees publiques */
-    /* Initialize private data fields */
-    printf("Init\n");
-    dp.nclnt=clnt;
-    dp.lclnt=(int **)malloc(sizeof(int *)*clnt);
-    dp.lthreads=(pthread_t *)malloc(sizeof(pthread_t)*clnt);
+	/* Initialisation des donnees publiques */
+	/* Initialize private data fields */
+	printf("Init\n");
+	dp.nclnt = clnt;
+	dp.lclnt = (int **)malloc(sizeof(int *) * clnt);
+	dp.lthreads = (pthread_t *) malloc(sizeof(pthread_t) * clnt);
 
-    /* initialisation de la communication avec le maitre */
-    /* Initialize client to master pipe */
-    if (pipe(dp.maitre)<0) {
-        perror("Master pipe creation error\n");
-        exit(1);
-    }
-    printf("%s initialization\n",eType);
-    load();
-    initTest();
+	/* initialisation de la communication avec le maitre */
+	/* Initialize client to master pipe */
+	if (pipe(dp.maitre) < 0) {
+		perror("Master pipe creation error\n");
+		exit(1);
+	}
+	printf("%s initialization\n", eType);
+	load();
+	initTest();
 
-        return 0;
+	return 0;
 }
 
-void cleanClient(struct donneesFils *df) {
-    int i;
-    i=df->dpr->whoami;
-    free(dp.lclnt[i]);
-    free(df->dpr);
-    free(df);
+void cleanClient(struct donneesFils *df)
+{
+	int i;
+	i = df->dpr->whoami;
+	free(dp.lclnt[i]);
+	free(df->dpr);
+	free(df);
 }
 
-void clean() {
-    free(dp.lthreads);
-    free(dp.lclnt);
+void clean()
+{
+	free(dp.lthreads);
+	free(dp.lclnt);
 }
 
-int loadProcess() {
-    int i;
-    struct donneesFils *df;
-    for (i=0; i<dp.nclnt; i++) {
-            df=initClientFork(i);
-        if (!fork()) {
-            P("Running slave num: %d\n",df->dpr->whoami);
-            write(0,".",1);
-            esclave((void *)df);
-            cleanClient(df);
-            exit(0);
-        }
-    }
-        return 0;
+int loadProcess()
+{
+	int i;
+	struct donneesFils *df;
+	for (i = 0; i < dp.nclnt; i++) {
+		df = initClientFork(i);
+		if (!fork()) {
+			P("Running slave num: %d\n", df->dpr->whoami);
+			write(0, ".", 1);
+			esclave((void *)df);
+			cleanClient(df);
+			exit(0);
+		}
+	}
+	return 0;
 }
 
-void lockWholeFile(struct flock *request) {
-    request->l_whence = SEEK_SET;
-    request->l_start =  0;
-    /* Lock de l'ensemble du fichier*/
-    /* Lock the whole file */
-    request->l_len = 0;
+void lockWholeFile(struct flock *request)
+{
+	request->l_whence = SEEK_SET;
+	request->l_start = 0;
+	/* Lock de l'ensemble du fichier */
+	/* Lock the whole file */
+	request->l_len = 0;
 }
 
-void selectTest(int n, struct s_test *test) {
+void selectTest(int n, struct s_test *test)
+{
 
-    test->test=testSuiv(n);
-    test->resAtt=resAttSuiv(n);
-    test->nom=nomTestSuiv(n);
-    test->type=lockSuiv(n);
+	test->test = testSuiv(n);
+	test->resAtt = resAttSuiv(n);
+	test->nom = nomTestSuiv(n);
+	test->type = lockSuiv(n);
 }
 
 /* Final test report */
-void rapport(clnt) {
-    int i;
-    int totalClients;
-    totalClients=clnt*(maxClients+1);
-    printf("\n%s number : %d - Remote clients: %d local client 1 - Total client %d - Total concurent tests: %d\n",
-            eType,
-            clnt,
-            maxClients,
-            maxClients+1,
-            totalClients);
-    printf("%s number running test successfully :\n",eType);
-    for (i=0; i<MAXTEST; i++)
-        printf("%d %s of %d successfully ran test : %s\n", TOTAL_RESULTAT_OK[i], eType, totalClients, LISTE_NOMS_TESTS[i]);
+void rapport(clnt)
+{
+	int i;
+	int totalClients;
+	totalClients = clnt * (maxClients + 1);
+	printf
+	    ("\n%s number : %d - Remote clients: %d local client 1 - Total client %d - Total concurent tests: %d\n",
+	     eType, clnt, maxClients, maxClients + 1, totalClients);
+	printf("%s number running test successfully :\n", eType);
+	for (i = 0; i < MAXTEST; i++)
+		printf("%d %s of %d successfully ran test : %s\n",
+		       TOTAL_RESULTAT_OK[i], eType, totalClients,
+		       LISTE_NOMS_TESTS[i]);
 
 }
 
-int serverSendLocal() {
-    int i;
-    /* Synchronisation des processus esclaves. */
-    /* Synchronize slave processes */
+int serverSendLocal()
+{
+	int i;
+	/* Synchronisation des processus esclaves. */
+	/* Synchronize slave processes */
 
-    /* On configure les esclaves pour le test */
-    /* Configure slaves for test */
+	/* On configure les esclaves pour le test */
+	/* Configure slaves for test */
 
-    for (i=0; i<dp.nclnt; i++)
-        write(dp.lclnt[i][1], message,M_SIZE );
-        return 0;
+	for (i = 0; i < dp.nclnt; i++)
+		write(dp.lclnt[i][1], message, M_SIZE);
+	return 0;
 
 }
 
-void serverSendNet() {
-   writeToAllClients(message);
+void serverSendNet()
+{
+	writeToAllClients(message);
 }
 
-int serverReceiveNet() {
-    int i,c;
-    for (c=0;c<maxClients; c++) {
-        for (i=0;i<dp.nclnt;i++) {
-            serverReceiveClient(c);
-        }
-    }
-        return 0;
+int serverReceiveNet()
+{
+	int i, c;
+	for (c = 0; c < maxClients; c++) {
+		for (i = 0; i < dp.nclnt; i++) {
+			serverReceiveClient(c);
+		}
+	}
+	return 0;
 }
 
-int serverReceiveLocal() {
-    int i;
-    for (i=0; i<dp.nclnt; i++)
-        read(maitreLecteur, message,M_SIZE );
-        return 0;
+int serverReceiveLocal()
+{
+	int i;
+	for (i = 0; i < dp.nclnt; i++)
+		read(maitreLecteur, message, M_SIZE);
+	return 0;
 }
 
-int clientReceiveLocal() {
-    read(esclaveLecteur,message,M_SIZE);
-        return 0;
+int clientReceiveLocal()
+{
+	read(esclaveLecteur, message, M_SIZE);
+	return 0;
 }
 
-int clientSend() {
-    write(esclaveEcrivain, message, M_SIZE);
-        return 0;
+int clientSend()
+{
+	write(esclaveEcrivain, message, M_SIZE);
+	return 0;
 }
 
-int serverSend() {
-    serverSendNet();
-    serverSendLocal();
-        return 0;
+int serverSend()
+{
+	serverSendNet();
+	serverSendLocal();
+	return 0;
 }
 
-int serverReceive() {
-    serverReceiveNet();
-    serverReceiveLocal();
-        return 0;
+int serverReceive()
+{
+	serverReceiveNet();
+	serverReceiveLocal();
+	return 0;
 }
 
 /* binary structure <-> ASCII functions used to ensure data will be correctly used over
  * the network, especially when multiples clients do not use the same hardware architecture.
  */
-int serialiseTLock(struct s_test *tLock) {
-    memset(message,0,M_SIZE);
-    sprintf(message,"T:%d:%d:%d::",tLock->test, tLock->type,tLock->resAtt );
-        return 0;
+int serialiseTLock(struct s_test *tLock)
+{
+	memset(message, 0, M_SIZE);
+	sprintf(message, "T:%d:%d:%d::", tLock->test, tLock->type,
+		tLock->resAtt);
+	return 0;
 }
 
-void unSerialiseTLock(struct s_test *tLock) {
-    sscanf(message, "T:%d:%d:%d::",&(tLock->test),&( tLock->type),&(tLock->resAtt) );
-    memset(message,0, M_SIZE);
+void unSerialiseTLock(struct s_test *tLock)
+{
+	sscanf(message, "T:%d:%d:%d::", &(tLock->test), &(tLock->type),
+	       &(tLock->resAtt));
+	memset(message, 0, M_SIZE);
 
 }
 
-void serialiseFLock(struct flock *request) {
-    int len, pid, start;
-    memset(message,0,M_SIZE);
-    len=(int )request->l_len;
-    pid=(int )request->l_pid;
-    start=(int)request->l_start;
-    /* Beware to length of integer conversions ... */
-    sprintf(message,"L:%hd:%hd:%d:%d:%d::",
-            request->l_type,
-            request->l_whence,
-            start,
-            len,
-            pid
-            );
+void serialiseFLock(struct flock *request)
+{
+	int len, pid, start;
+	memset(message, 0, M_SIZE);
+	len = (int)request->l_len;
+	pid = (int)request->l_pid;
+	start = (int)request->l_start;
+	/* Beware to length of integer conversions ... */
+	sprintf(message, "L:%hd:%hd:%d:%d:%d::",
+		request->l_type, request->l_whence, start, len, pid);
 }
 
-void serialiseResult(int resultat) {
-    memset(message, 0, M_SIZE);
-    sprintf(message,"R:%d::", resultat);
+void serialiseResult(int resultat)
+{
+	memset(message, 0, M_SIZE);
+	sprintf(message, "R:%d::", resultat);
 
 }
 
-void unSerialiseResult(int *resultat) {
-    sscanf(message,"R:%d::", resultat);
+void unSerialiseResult(int *resultat)
+{
+	sscanf(message, "R:%d::", resultat);
 }
 
-void unSerialiseFLock(struct flock *request) {
-    int len, pid, start;
-    sscanf(message,"L:%hd:%hd:%d:%d:%d::",
-            &(request->l_type),
-            &(request->l_whence),
-            &start,
-            &len,
-            &pid
-            );
-    request->l_start=(off_t)start;
-    request->l_len=(off_t)len;
-    request->l_pid=(pid_t)pid;
+void unSerialiseFLock(struct flock *request)
+{
+	int len, pid, start;
+	sscanf(message, "L:%hd:%hd:%d:%d:%d::",
+	       &(request->l_type), &(request->l_whence), &start, &len, &pid);
+	request->l_start = (off_t) start;
+	request->l_len = (off_t) len;
+	request->l_pid = (pid_t) pid;
 }
 
-int serverSendLockClient(struct flock *request, int client) {
-    serialiseFLock(request);
-    return serverSendClient(client);
+int serverSendLockClient(struct flock *request, int client)
+{
+	serialiseFLock(request);
+	return serverSendClient(client);
 }
 
-int serverSendLockLocal(struct flock *request, int esclave) {
-    serialiseFLock(request);
-    return write(dp.lclnt[esclave][1], message, M_SIZE);
+int serverSendLockLocal(struct flock *request, int esclave)
+{
+	serialiseFLock(request);
+	return write(dp.lclnt[esclave][1], message, M_SIZE);
 }
 
-int getLockSection(struct flock *request) {
-    memset(message, 0, M_SIZE);
-    clientReceiveLocal();
-    unSerialiseFLock(request);
-        return 0;
+int getLockSection(struct flock *request)
+{
+	memset(message, 0, M_SIZE);
+	clientReceiveLocal();
+	unSerialiseFLock(request);
+	return 0;
 }
 
-int sendLockTest(struct s_test *tLock) {
-    serialiseTLock(tLock);
-    serverSend();
-        return 0;
+int sendLockTest(struct s_test *tLock)
+{
+	serialiseTLock(tLock);
+	serverSend();
+	return 0;
 }
 
-int getLockTest(struct s_test *tLock) {
-    clientReceiveLocal();
-    unSerialiseTLock(tLock);
-        return 0;
+int getLockTest(struct s_test *tLock)
+{
+	clientReceiveLocal();
+	unSerialiseTLock(tLock);
+	return 0;
 }
 
-int sendResult(int resultat) {
-    serialiseResult(resultat);
-    clientSend();
-        return 0;
+int sendResult(int resultat)
+{
+	serialiseResult(resultat);
+	clientSend();
+	return 0;
 }
 
-int getResults(int ntest) {
-    int i,c;
-    int resultat=0;
-   /* On comptabilise les resultats distants */
-    /* Add remote test results */
-    for (c=0;c<maxClients;c++) {
-        for (i=0;i<dp.nclnt; i++) {
-            serverReceiveClient(c);
-            unSerialiseResult(&resultat);
-            compteur(resultat,ntest);
+int getResults(int ntest)
+{
+	int i, c;
+	int resultat = 0;
+	/* On comptabilise les resultats distants */
+	/* Add remote test results */
+	for (c = 0; c < maxClients; c++) {
+		for (i = 0; i < dp.nclnt; i++) {
+			serverReceiveClient(c);
+			unSerialiseResult(&resultat);
+			compteur(resultat, ntest);
 
-        }
-    }
-    /* On comptabilise les resultats locaux */
-    /* Add local test results */
-    for (i=0; i<dp.nclnt; i++) {
-        read(maitreLecteur, message,M_SIZE );
-        unSerialiseResult(&resultat);
-        compteur(resultat,ntest);
-    }
+		}
+	}
+	/* On comptabilise les resultats locaux */
+	/* Add local test results */
+	for (i = 0; i < dp.nclnt; i++) {
+		read(maitreLecteur, message, M_SIZE);
+		unSerialiseResult(&resultat);
+		compteur(resultat, ntest);
+	}
 
-        return 0;
+	return 0;
 }
 
 /* Usefull debug macro */
@@ -482,597 +512,604 @@
  * a 'repeater' of information. It resends server-master instructions to its own slaves.
  */
 
-void maitreClient() {
-    fd_set fdread;
-    struct timeval tv;
-    int n,i,r,m,start;
+void maitreClient()
+{
+	fd_set fdread;
+	struct timeval tv;
+	int n, i, r, m, start;
 #ifdef DEBUG
-    char dbg[16];
+	char dbg[16];
 #endif
-    struct flock lock;
-    int t;
+	struct flock lock;
+	int t;
 
-    maitreLecteur=dp.maitre[0];
-    FD_ZERO(&fdread);
-    tv.tv_sec = 50;
-    tv.tv_usec = 0;
-    n=fdServeur>maitreLecteur?fdServeur:maitreLecteur;
-    printf("Maitre CLient - fdServeur=%d\n", fdServeur);
-    while (1) {
-        /* On ajoute les descripteurs esclave et serveur */
-        /* Add slave and server pipe file descriptors */
-        FD_ZERO(&fdread);
-        FD_SET(fdServeur,&fdread);
-        FD_SET(maitreLecteur,&fdread);
-        r=select(n+1, &fdread, NULL, NULL,&tv);
-        if (r<0) {
-            perror("select:\n");
-            continue;
-        }
-        if (r==0) {
-            exit(0);
-        }
+	maitreLecteur = dp.maitre[0];
+	FD_ZERO(&fdread);
+	tv.tv_sec = 50;
+	tv.tv_usec = 0;
+	n = fdServeur > maitreLecteur ? fdServeur : maitreLecteur;
+	printf("Maitre CLient - fdServeur=%d\n", fdServeur);
+	while (1) {
+		/* On ajoute les descripteurs esclave et serveur */
+		/* Add slave and server pipe file descriptors */
+		FD_ZERO(&fdread);
+		FD_SET(fdServeur, &fdread);
+		FD_SET(maitreLecteur, &fdread);
+		r = select(n + 1, &fdread, NULL, NULL, &tv);
+		if (r < 0) {
+			perror("select:\n");
+			continue;
+		}
+		if (r == 0) {
+			exit(0);
+		}
 
-        if (FD_ISSET(fdServeur, &fdread)) {
-            /* On vient de recevoir une information du serveur
-             * On la retransmet aux esclaves
-             */
-            /* We just have received information from the server.
-             * We repeat it to slaves.
-             */
-            i=readFromServer(message);
-            t=message[0];
-            switch(t) {
-                case 'L':
-                    /* Instruction : Lock. Dans ce cas il faut envoyer a chaque processus une section differente a locker */
-                    /* Lock instruction. We need to send a different section to lock to each process */
+		if (FD_ISSET(fdServeur, &fdread)) {
+			/* On vient de recevoir une information du serveur
+			 * On la retransmet aux esclaves
+			 */
+			/* We just have received information from the server.
+			 * We repeat it to slaves.
+			 */
+			i = readFromServer(message);
+			t = message[0];
+			switch (t) {
+			case 'L':
+				/* Instruction : Lock. Dans ce cas il faut envoyer a chaque processus une section differente a locker */
+				/* Lock instruction. We need to send a different section to lock to each process */
 
-                    unSerialiseFLock(&lock);
-                    start=lock.l_start;
-                    for (i=0;i<dp.nclnt;i++) {
-                        lock.l_start=start+i;
-                        serialiseFLock(&lock);
-                        write(dp.lclnt[i][1], message,M_SIZE);
-                    }
-                    printf("\n");
-                    continue;
-                case 'T':
-                    /* Instruction: Test. Il s'agit d'une trame annoncant un nouveau test : on verifie qu'il ne s'agit pas d'une
-                     * demande de FIN des tests
-                     */
-                    /* Test instruction. Ensure server is not sending the FIN(ish) instruction to end tests */
+				unSerialiseFLock(&lock);
+				start = lock.l_start;
+				for (i = 0; i < dp.nclnt; i++) {
+					lock.l_start = start + i;
+					serialiseFLock(&lock);
+					write(dp.lclnt[i][1], message, M_SIZE);
+				}
+				printf("\n");
+				continue;
+			case 'T':
+				/* Instruction: Test. Il s'agit d'une trame annoncant un nouveau test : on verifie qu'il ne s'agit pas d'une
+				 * demande de FIN des tests
+				 */
+				/* Test instruction. Ensure server is not sending the FIN(ish) instruction to end tests */
 
-                    /* A re-ecrire un peu mieux des que possible */
-                    /* To be rewritten asap*/
-                    m=atoi(&(message[2]));
-                    if (m==FIN)
-                        break;
-                    if (m==CLEAN)
-                        printf("\n");
+				/* A re-ecrire un peu mieux des que possible */
+				/* To be rewritten asap */
+				m = atoi(&(message[2]));
+				if (m == FIN)
+					break;
+				if (m == CLEAN)
+					printf("\n");
 
-            serverSendLocal();
-            continue;
-            }
-            break;
-        }else{
-            /* Dans le cas inverse, on lis les esclaves et on remonte l'information au serveur
-             */
-            /* Else, we read information from slaves and repeat them to the server */
-            for (i=0;i<dp.nclnt;i++) {
-                r=read(maitreLecteur, message,M_SIZE );
-                r=write(fdServeur,message,M_SIZE );
-                if (r<0)perror("write : ");
+				serverSendLocal();
+				continue;
+			}
+			break;
+		} else {
+			/* Dans le cas inverse, on lis les esclaves et on remonte l'information au serveur
+			 */
+			/* Else, we read information from slaves and repeat them to the server */
+			for (i = 0; i < dp.nclnt; i++) {
+				r = read(maitreLecteur, message, M_SIZE);
+				r = write(fdServeur, message, M_SIZE);
+				if (r < 0)
+					perror("write : ");
 
-            }
-            continue;
-        }
-    }
+			}
+			continue;
+		}
+	}
 
-    /* On vient de recevoir la trame FIN de programme */
-    /* Receive the FIN(ish) instruction*/
+	/* On vient de recevoir la trame FIN de programme */
+	/* Receive the FIN(ish) instruction */
 
-    /* On la communique a tous les esclaves */
-    /* Repeat it to the slaves */
-    printf("Fin du programme en cours...\n");
-    serverSendLocal();
+	/* On la communique a tous les esclaves */
+	/* Repeat it to the slaves */
+	printf("Fin du programme en cours...\n");
+	serverSendLocal();
 
-    /* Et c'est fini! */
-    /* Ok, we can quit */
-    printf("Bye :)\n");
+	/* Et c'est fini! */
+	/* Ok, we can quit */
+	printf("Bye :)\n");
 
 }
 
 void maitre()
 {
-    int i,n,bl;
-    int clnt;
-    char tmp[MAXLEN], *buf;
+	int i, n, bl;
+	int clnt;
+	char tmp[MAXLEN], *buf;
 #ifdef DEBUG
-    char dbg[16];
+	char dbg[16];
 #endif
-    struct flock request;
-    struct s_test tLock;
-    enum etat_t etat;
-    int offset;
-    /* A test sentence written in the file */
-    char phraseTest[]="Ceci est une phrase test ecrite par le maitre dans le fichier";
-    bl = -1;
-    clnt=dp.nclnt;
-    maitreLecteur=dp.maitre[0];
-    etat=SELECT;
-    /* On commence par le premier test. C'est original ;) */
-    /* Start with the first test ;) */
-    n=0;
-    printf("\n--------------------------------------\n");
-    while (1) {
-        switch(etat) {
-            case SELECT:
-                /* Selection du test a effectuer */
-                /* Select the test to perform   */
-                printf("\n");
-                E("Maitre: SELECT");
-                selectTest(n, &tLock);
-                etat=tLock.type;
-                bl=0;
-                if (n<MAXTEST) {
-                    memset(tmp,0,MAXLEN);
-                    sprintf(tmp,"TEST : TRY TO %s:",LISTE_NOMS_TESTS[n]);
-                    write(0, tmp, strlen(tmp));
-                }
-                else
-                    etat=FIN;
-                P("etat=%d\n", etat);
-                n+=1;
-                continue;
+	struct flock request;
+	struct s_test tLock;
+	enum etat_t etat;
+	int offset;
+	/* A test sentence written in the file */
+	char phraseTest[] =
+	    "Ceci est une phrase test ecrite par le maitre dans le fichier";
+	bl = -1;
+	clnt = dp.nclnt;
+	maitreLecteur = dp.maitre[0];
+	etat = SELECT;
+	/* On commence par le premier test. C'est original ;) */
+	/* Start with the first test ;) */
+	n = 0;
+	printf("\n--------------------------------------\n");
+	while (1) {
+		switch (etat) {
+		case SELECT:
+			/* Selection du test a effectuer */
+			/* Select the test to perform   */
+			printf("\n");
+			E("Maitre: SELECT");
+			selectTest(n, &tLock);
+			etat = tLock.type;
+			bl = 0;
+			if (n < MAXTEST) {
+				memset(tmp, 0, MAXLEN);
+				sprintf(tmp, "TEST : TRY TO %s:",
+					LISTE_NOMS_TESTS[n]);
+				write(0, tmp, strlen(tmp));
+			} else
+				etat = FIN;
+			P("etat=%d\n", etat);
+			n += 1;
+			continue;
 
-            case RDONLY:
-            case WRONLY:
+		case RDONLY:
+		case WRONLY:
 
-            case READLOCK:
-                P("Read lock :%d\n", etat);
-                request.l_type=F_RDLCK;
-                etat=LOCK;
-                continue;
+		case READLOCK:
+			P("Read lock :%d\n", etat);
+			request.l_type = F_RDLCK;
+			etat = LOCK;
+			continue;
 
-            case WRITELOCK:
-                P("Write lock :%d\n", etat);
-                request.l_type=F_WRLCK;
-                etat=LOCK;
-                continue;
+		case WRITELOCK:
+			P("Write lock :%d\n", etat);
+			request.l_type = F_WRLCK;
+			etat = LOCK;
+			continue;
 
-            case LOCK:
-                /* On applique le lock que l'on veut */
-                /* Apply the wanted lock */
-                E("Maitre: LOCK");
-                write(dp.fd,phraseTest,strlen(phraseTest));
-                lockWholeFile(&request);
-                if (fcntl(dp.fd, F_SETLK, &request)<0) {
-                    perror("Master: can't set lock\n");
-                    perror("Echec\n");
-                    exit(0);
-                }
-                E("Maitre");
-                etat=SYNC;
-                continue;
+		case LOCK:
+			/* On applique le lock que l'on veut */
+			/* Apply the wanted lock */
+			E("Maitre: LOCK");
+			write(dp.fd, phraseTest, strlen(phraseTest));
+			lockWholeFile(&request);
+			if (fcntl(dp.fd, F_SETLK, &request) < 0) {
+				perror("Master: can't set lock\n");
+				perror("Echec\n");
+				exit(0);
+			}
+			E("Maitre");
+			etat = SYNC;
+			continue;
 
-            case BYTELOCK_READ:
-                bl=1;
-                request.l_type=F_RDLCK;
-                etat=SYNC;
-                continue;
+		case BYTELOCK_READ:
+			bl = 1;
+			request.l_type = F_RDLCK;
+			etat = SYNC;
+			continue;
 
-            case BYTELOCK_WRITE:
-                bl=1;
-                request.l_type=F_WRLCK;
-                etat=SYNC;
-                continue;
+		case BYTELOCK_WRITE:
+			bl = 1;
+			request.l_type = F_WRLCK;
+			etat = SYNC;
+			continue;
 
-            case BYTELOCK:
-                /*
-                 * L'idee est de faire locker l'ensemble du fichier octet par octet par un ensemble de sous processus
-                 * Il nous faut donc
-                 * -creer un fichier ayant autant d'octet que le nombre de processus passe en parametres
-                 * -passer les sections a locker a chacun des esclaves
-                 * -verifier que les locks sont bien appliques
-                 *
-                 */
+		case BYTELOCK:
+			/*
+			 * L'idee est de faire locker l'ensemble du fichier octet par octet par un ensemble de sous processus
+			 * Il nous faut donc
+			 * -creer un fichier ayant autant d'octet que le nombre de processus passe en parametres
+			 * -passer les sections a locker a chacun des esclaves
+			 * -verifier que les locks sont bien appliques
+			 *
+			 */
 
-                /* The main idea is to lock all the bytes in a file. Each slave process locks one byte.
-                 *
-                 * We need :
-                 * - To create a file of a length equal to the total number of slave processes
-                 * - send the exact section to lock to each slave
-                 * - ensure locks have been correctly set
-                 */
+			/* The main idea is to lock all the bytes in a file. Each slave process locks one byte.
+			 *
+			 * We need :
+			 * - To create a file of a length equal to the total number of slave processes
+			 * - send the exact section to lock to each slave
+			 * - ensure locks have been correctly set
+			 */
 
-                /* On cree une chaine de caracteres a enregistrer dans le fichier qui contienne exactement un octet par
-                 * processus.
-                 */
-                /* Create a string to record in the test file. Length is exactly the number of sub process */
-                P("Maitre: BYTELOCK: %d\n", etat);
-                buf=(char *)malloc(clnt*(maxClients+1));
-                memset(buf,'*', clnt);
-                write(dp.fd, buf, clnt);
-                free(buf);
+			/* On cree une chaine de caracteres a enregistrer dans le fichier qui contienne exactement un octet par
+			 * processus.
+			 */
+			/* Create a string to record in the test file. Length is exactly the number of sub process */
+			P("Maitre: BYTELOCK: %d\n", etat);
+			buf = (char *)malloc(clnt * (maxClients + 1));
+			memset(buf, '*', clnt);
+			write(dp.fd, buf, clnt);
+			free(buf);
 
-                /* Chaque processus esclave reecrit son champs a locker. */
-                /* Each slave process re-writes its own field to lock */
-                request.l_whence=SEEK_SET;
-                request.l_start=0;
-                request.l_len=1;
+			/* Chaque processus esclave reecrit son champs a locker. */
+			/* Each slave process re-writes its own field to lock */
+			request.l_whence = SEEK_SET;
+			request.l_start = 0;
+			request.l_len = 1;
 
-                /* On commence par les envois reseau */
-                /* Start to send sections to lock to remote process (network clients) */
+			/* On commence par les envois reseau */
+			/* Start to send sections to lock to remote process (network clients) */
 
-                for (i=0;i<maxClients;i++) {
-                    /* On renseigne la structure avec le lock qui va bien */
-                    /* Set the correct byte to lock */
-                    offset=(i+1)*clnt;
-                    request.l_start=(off_t )offset;
-                    serverSendLockClient(&request, i);
-                }
+			for (i = 0; i < maxClients; i++) {
+				/* On renseigne la structure avec le lock qui va bien */
+				/* Set the correct byte to lock */
+				offset = (i + 1) * clnt;
+				request.l_start = (off_t) offset;
+				serverSendLockClient(&request, i);
+			}
 
-                /* Puis les envois locaux */
-                /* Now send sections to local processes */
-                for (i=0;i<clnt;i++) {
-                    request.l_start=i;
-                    serverSendLockLocal(&request, i);
-                }
-                etat=RESULTAT;
-                continue;
+			/* Puis les envois locaux */
+			/* Now send sections to local processes */
+			for (i = 0; i < clnt; i++) {
+				request.l_start = i;
+				serverSendLockLocal(&request, i);
+			}
+			etat = RESULTAT;
+			continue;
 
-            case SYNC:
-                sendLockTest(&tLock);
-                if (bl) {
-                    etat=BYTELOCK;
-                    continue;
-                }
+		case SYNC:
+			sendLockTest(&tLock);
+			if (bl) {
+				etat = BYTELOCK;
+				continue;
+			}
 
-                if (n<MAXTEST+1) etat=RESULTAT;
-                else etat=FIN;
-                continue;
+			if (n < MAXTEST + 1)
+				etat = RESULTAT;
+			else
+				etat = FIN;
+			continue;
 
-            case RESULTAT:
-                /* On lit les resultats un par un */
-                /* Read results by one */
-                getResults(n-1);
-                if (bl) validationResultats(n-1);
-                etat=CLEAN;
-                continue;
+		case RESULTAT:
+			/* On lit les resultats un par un */
+			/* Read results by one */
+			getResults(n - 1);
+			if (bl)
+				validationResultats(n - 1);
+			etat = CLEAN;
+			continue;
 
-            case CLEAN:
-                /* On demande aux clients d'arreter le test */
-                /* Ask the clients to stop testing ... */
-                tLock.test=CLEAN;
-                serialiseTLock(&tLock);
-                serverSend();
-                /* ... et on attend un accuse de reception avant de fermer */
-                /* ... and wait for an ack before closing */
-                serverReceive();
-                /* On ignore les resultats, ce n'est qu'un accuse de reception */
-                /* Ignore message content : that is only an ack */
+		case CLEAN:
+			/* On demande aux clients d'arreter le test */
+			/* Ask the clients to stop testing ... */
+			tLock.test = CLEAN;
+			serialiseTLock(&tLock);
+			serverSend();
+			/* ... et on attend un accuse de reception avant de fermer */
+			/* ... and wait for an ack before closing */
+			serverReceive();
+			/* On ignore les resultats, ce n'est qu'un accuse de reception */
+			/* Ignore message content : that is only an ack */
 
-                /* close and open file */
-                close(dp.fd);
-                initTest(dp);
-                etat=SELECT;
-                continue;
-            case FIN:
-                tLock.test=FIN;
-                serialiseTLock(&tLock);
-                serverSend();
-                sleep(2);
-                break;
+			/* close and open file */
+			close(dp.fd);
+			initTest(dp);
+			etat = SELECT;
+			continue;
+		case FIN:
+			tLock.test = FIN;
+			serialiseTLock(&tLock);
+			serverSend();
+			sleep(2);
+			break;
 
-                printf("(end)\n");
-                exit(0);
+			printf("(end)\n");
+			exit(0);
 
-        }/* switch */
-        break;
-    }/* while */
+		}		/* switch */
+		break;
+	}			/* while */
 
-    rapport(clnt);
+	rapport(clnt);
 }
 
 /* Slave process/thread */
 
-void * esclave(void *donnees)
+void *esclave(void *donnees)
 {
-    struct donneesFils *df;
-    int i, a, resultat,ftest;
-    struct s_test tLock;
-    struct flock request;
-    char tmp[16];
+	struct donneesFils *df;
+	int i, a, resultat, ftest;
+	struct s_test tLock;
+	struct flock request;
+	char tmp[16];
 #ifdef DEBUG
-    char dbg[16];
+	char dbg[16];
 #endif
-    char *phraseTest="L'ecriture a reussi";
-    int len;
-    enum etat_t etat;
+	char *phraseTest = "L'ecriture a reussi";
+	int len;
+	enum etat_t etat;
 
-    resultat = -1;
-    ftest = -1;
-    len=strlen(phraseTest);
-    df=(struct donneesFils *)donnees;
-    i=df->dpr->whoami;
-    P("Esclave n=%d\n", i);
-    esclaveLecteur=dp.lclnt[i][0];
-    esclaveEcrivain=dp.maitre[1];
-    etat=SYNC;
-    errno=0;
-    memset(tmp,0,16);
-    while (1) {
-        switch(etat) {
-            case SELECT:
-            case SYNC:
-                getLockTest(&tLock);
-                etat=tLock.test;
-                P("Esclave Etat=%d\n",etat);
+	resultat = -1;
+	ftest = -1;
+	len = strlen(phraseTest);
+	df = (struct donneesFils *)donnees;
+	i = df->dpr->whoami;
+	P("Esclave n=%d\n", i);
+	esclaveLecteur = dp.lclnt[i][0];
+	esclaveEcrivain = dp.maitre[1];
+	etat = SYNC;
+	errno = 0;
+	memset(tmp, 0, 16);
+	while (1) {
+		switch (etat) {
+		case SELECT:
+		case SYNC:
+			getLockTest(&tLock);
+			etat = tLock.test;
+			P("Esclave Etat=%d\n", etat);
 
-                continue;
-            case RDONLY:
-                /* On tente de lire un fichier */
-                /* Try to read a file */
-                P("TEST READ ONLY %d\n", RDONLY);
-                if ((ftest=open(dp.fname, O_RDONLY|O_NONBLOCK))<0) {
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    if (dp.verbose)
-                        perror("Open:");
-                    continue;
-                }
-                P("fd=%d\n",ftest);
-                a=read(ftest, tmp, 16);
-                if (a<16)
-                    resultat=ECHEC;
-                else
-                    resultat=SUCCES;
-                etat=RESULTAT;
-                continue;
+			continue;
+		case RDONLY:
+			/* On tente de lire un fichier */
+			/* Try to read a file */
+			P("TEST READ ONLY %d\n", RDONLY);
+			if ((ftest = open(dp.fname, O_RDONLY | O_NONBLOCK)) < 0) {
+				resultat = ECHEC;
+				etat = RESULTAT;
+				if (dp.verbose)
+					perror("Open:");
+				continue;
+			}
+			P("fd=%d\n", ftest);
+			a = read(ftest, tmp, 16);
+			if (a < 16)
+				resultat = ECHEC;
+			else
+				resultat = SUCCES;
+			etat = RESULTAT;
+			continue;
 
-            case WRONLY:
-                /* On tente d'ecrire un fichier */
-                /* Try to write a file */
-                P("TEST WRITE ONLY %d\n", WRONLY);
-                if ((ftest=open(dp.fname, O_WRONLY|O_NONBLOCK))<0) {
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    if (dp.verbose)
-                        perror("Open read only:");
-                    continue;
-                }
-                P("fd=%d\n",ftest);
-                if (write(ftest, phraseTest, len)<len)
-                    resultat=ECHEC;
-                else
-                    resultat=SUCCES;
-                etat=RESULTAT;
-                continue;
+		case WRONLY:
+			/* On tente d'ecrire un fichier */
+			/* Try to write a file */
+			P("TEST WRITE ONLY %d\n", WRONLY);
+			if ((ftest = open(dp.fname, O_WRONLY | O_NONBLOCK)) < 0) {
+				resultat = ECHEC;
+				etat = RESULTAT;
+				if (dp.verbose)
+					perror("Open read only:");
+				continue;
+			}
+			P("fd=%d\n", ftest);
+			if (write(ftest, phraseTest, len) < len)
+				resultat = ECHEC;
+			else
+				resultat = SUCCES;
+			etat = RESULTAT;
+			continue;
 
-            case LOCK:
+		case LOCK:
 
-            case READLOCK:
-                /* On essaie de lire une section lockee en lecture sur le fichier */
-                /* Try to read a read-locked section */
-                P("READ LOCK %d\n", F_RDLCK);
-                if ((ftest=open(dp.fname, O_RDONLY|O_NONBLOCK))<0) {
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    if (dp.verbose)
-                        perror("Open read-write:");
-                    continue;
-                }
+		case READLOCK:
+			/* On essaie de lire une section lockee en lecture sur le fichier */
+			/* Try to read a read-locked section */
+			P("READ LOCK %d\n", F_RDLCK);
+			if ((ftest = open(dp.fname, O_RDONLY | O_NONBLOCK)) < 0) {
+				resultat = ECHEC;
+				etat = RESULTAT;
+				if (dp.verbose)
+					perror("Open read-write:");
+				continue;
+			}
 
-                P("fd=%d\n",ftest);
-                /* Lock de l'ensemble du fichier*/
-                /* Lock the whole file */
-                request.l_type=F_RDLCK;
-                request.l_whence = SEEK_SET;
-                request.l_start =  0;
-                request.l_len = 0;
+			P("fd=%d\n", ftest);
+			/* Lock de l'ensemble du fichier */
+			/* Lock the whole file */
+			request.l_type = F_RDLCK;
+			request.l_whence = SEEK_SET;
+			request.l_start = 0;
+			request.l_len = 0;
 
-                if (fcntl(ftest, F_SETLK, &request)<0) {
-                    if (dp.verbose || errno != EAGAIN)
-                        perror("RDONLY: fcntl");
-                    resultat=ECHEC;
-                }
-                else
-                    resultat=SUCCES;
-                etat=RESULTAT;
-                continue;
+			if (fcntl(ftest, F_SETLK, &request) < 0) {
+				if (dp.verbose || errno != EAGAIN)
+					perror("RDONLY: fcntl");
+				resultat = ECHEC;
+			} else
+				resultat = SUCCES;
+			etat = RESULTAT;
+			continue;
 
-            case WRITELOCK:
-                /* On essaie d'ecrire le fichier */
-                /* Try to write a file */
-                P("WRITE LOCK %d\n", F_WRLCK);
-                if ((ftest=open(dp.fname, O_WRONLY|O_NONBLOCK))<0) {
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    if (dp.verbose)
-                        perror("\nOpen:");
-                    continue;
-                }
-                /* Lock de l'ensemble du fichier*/
-                /* Lock the whole file */
-                P("fd=%d\n",ftest);
-                request.l_type=F_WRLCK;
-                request.l_whence = SEEK_SET;
-                request.l_start =  0;
-                request.l_len = 0;
+		case WRITELOCK:
+			/* On essaie d'ecrire le fichier */
+			/* Try to write a file */
+			P("WRITE LOCK %d\n", F_WRLCK);
+			if ((ftest = open(dp.fname, O_WRONLY | O_NONBLOCK)) < 0) {
+				resultat = ECHEC;
+				etat = RESULTAT;
+				if (dp.verbose)
+					perror("\nOpen:");
+				continue;
+			}
+			/* Lock de l'ensemble du fichier */
+			/* Lock the whole file */
+			P("fd=%d\n", ftest);
+			request.l_type = F_WRLCK;
+			request.l_whence = SEEK_SET;
+			request.l_start = 0;
+			request.l_len = 0;
 
-                if (fcntl(ftest, F_SETLK, &request)<0) {
-                    if (dp.verbose || errno != EAGAIN)
-                        perror("\nWRONLY: fcntl");
-                    resultat=ECHEC;
-                }
-                else
-                    resultat=SUCCES;
-                etat=RESULTAT;
-                continue;
+			if (fcntl(ftest, F_SETLK, &request) < 0) {
+				if (dp.verbose || errno != EAGAIN)
+					perror("\nWRONLY: fcntl");
+				resultat = ECHEC;
+			} else
+				resultat = SUCCES;
+			etat = RESULTAT;
+			continue;
 
-            case BYTELOCK_READ:
-                P("BYTE LOCK READ: %d\n", etat);
-                etat=BYTELOCK;
-                continue;
+		case BYTELOCK_READ:
+			P("BYTE LOCK READ: %d\n", etat);
+			etat = BYTELOCK;
+			continue;
 
-            case BYTELOCK_WRITE:
-                P("BYTE LOCK WRITE: %d\n", etat);
-                etat=BYTELOCK;
-                continue;
+		case BYTELOCK_WRITE:
+			P("BYTE LOCK WRITE: %d\n", etat);
+			etat = BYTELOCK;
+			continue;
 
-            case BYTELOCK:
-                /* On se met en attente de la section a locker. L'ensemble de la structure est
-                 * donnee par le maitre et transmise par le tube.
-                 */
-                /* Wait for the exact section to lock. The whole file is sent by the master */
+		case BYTELOCK:
+			/* On se met en attente de la section a locker. L'ensemble de la structure est
+			 * donnee par le maitre et transmise par le tube.
+			 */
+			/* Wait for the exact section to lock. The whole file is sent by the master */
 
-                P("BYTE LOCK %d\n", etat);
-                getLockSection(&request);
-                if ((ftest=open(dp.fname, O_RDWR|O_NONBLOCK))<0) {
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    if (dp.verbose)
-                        perror("\nOpen:");
-                    continue;
-                }
+			P("BYTE LOCK %d\n", etat);
+			getLockSection(&request);
+			if ((ftest = open(dp.fname, O_RDWR | O_NONBLOCK)) < 0) {
+				resultat = ECHEC;
+				etat = RESULTAT;
+				if (dp.verbose)
+					perror("\nOpen:");
+				continue;
+			}
 
-                if (fcntl(ftest, F_SETLK, &request)<0) {
-                    if (dp.verbose || errno != EAGAIN)
-                        perror("\nBTLOCK: fcntl");
-                    resultat=ECHEC;
-                    etat=RESULTAT;
-                    continue;
-                }
-                /* On change le caractere a la place donnee pour verification */
-                /* Change the character at the given position for an easier verification */
-                a=lseek(ftest, request.l_start,SEEK_SET);
-                write(ftest,"=",1);
-                resultat=SUCCES;
-                etat=RESULTAT;
-                continue;
+			if (fcntl(ftest, F_SETLK, &request) < 0) {
+				if (dp.verbose || errno != EAGAIN)
+					perror("\nBTLOCK: fcntl");
+				resultat = ECHEC;
+				etat = RESULTAT;
+				continue;
+			}
+			/* On change le caractere a la place donnee pour verification */
+			/* Change the character at the given position for an easier verification */
+			a = lseek(ftest, request.l_start, SEEK_SET);
+			write(ftest, "=", 1);
+			resultat = SUCCES;
+			etat = RESULTAT;
+			continue;
 
-            case RESULTAT:
-                if (resultat==SUCCES)
-                    write(0,"=",1);
-                else
-                    write(0,"x",1);
-                P("RESULTAT: %d\n", resultat);
-                sendResult(resultat);
-                etat=SYNC;
-                continue;
+		case RESULTAT:
+			if (resultat == SUCCES)
+				write(0, "=", 1);
+			else
+				write(0, "x", 1);
+			P("RESULTAT: %d\n", resultat);
+			sendResult(resultat);
+			etat = SYNC;
+			continue;
 
-            case CLEAN:
-                close(ftest);
-                /* Send CLEAN Ack */
-                sendResult(resultat);
-                etat=SYNC;
-                continue;
+		case CLEAN:
+			close(ftest);
+			/* Send CLEAN Ack */
+			sendResult(resultat);
+			etat = SYNC;
+			continue;
 
-            case FIN:
-                E("(End)\n");
-                terminer(0);
-            printf("Unknown command\n");
-            terminer(1);
+		case FIN:
+			E("(End)\n");
+			terminer(0);
+			printf("Unknown command\n");
+			terminer(1);
 
-        }
-    }
+		}
+	}
 
 }
 
-char *nextArg(int argc, char **argv, int *i) {
-    if (((*i)+1)<argc) {
-            (*i)+=1;
-            return argv[(*i)];
-        }
-        return NULL;
+char *nextArg(int argc, char **argv, int *i)
+{
+	if (((*i) + 1) < argc) {
+		(*i) += 1;
+		return argv[(*i)];
+	}
+	return NULL;
 }
 
-int usage() {
-        printf("locktest -n <number of process> -f <test file> [-T]\n");
-        printf("Number of child process must be higher than 1\n");
-        printf("\n");
-        printf("Send bugs to vincent.roqueta@ext.bull.net\n");
-        exit(0);
-    return 0;
+int usage()
+{
+	printf("locktest -n <number of process> -f <test file> [-T]\n");
+	printf("Number of child process must be higher than 1\n");
+	printf("\n");
+	printf("Send bugs to vincent.roqueta@ext.bull.net\n");
+	exit(0);
+	return 0;
 }
 
-int main(int argc,char ** argv) {
-    int i, nThread=0;
-    char *tmp;
-    int type=0;
-    int clients;
-    type=PROCESS;
-    dp.fname=NULL;
-    dp.verbose=0;
-    int serveur=1;
-    char *host;
+int main(int argc, char **argv)
+{
+	int i, nThread = 0;
+	char *tmp;
+	int type = 0;
+	int clients;
+	type = PROCESS;
+	dp.fname = NULL;
+	dp.verbose = 0;
+	int serveur = 1;
+	char *host;
 
-    host = NULL;
-    clients=0;
+	host = NULL;
+	clients = 0;
 
-    for (i=1;i<argc;i++) {
+	for (i = 1; i < argc; i++) {
 
-        if (!strcmp("-n",argv[i])) {
-              if (!(tmp=nextArg(argc, argv,&i)))
-                  usage();
-              nThread=atoi(tmp);
-              continue;
-        }
+		if (!strcmp("-n", argv[i])) {
+			if (!(tmp = nextArg(argc, argv, &i)))
+				usage();
+			nThread = atoi(tmp);
+			continue;
+		}
 
-        if (!strcmp("-f",argv[i])) {
-            if (!(dp.fname=nextArg(argc, argv,&i)))
-                usage();
-            continue;
-        }
-        if (!strcmp("-v",argv[i])) {
-            dp.verbose=TRUE;
-            continue;
-        }
-        if (!strcmp("-c",argv[i])) {
-            if (!(clients=atoi(nextArg(argc, argv,&i))))
-                usage();
-            continue;
-        }
+		if (!strcmp("-f", argv[i])) {
+			if (!(dp.fname = nextArg(argc, argv, &i)))
+				usage();
+			continue;
+		}
+		if (!strcmp("-v", argv[i])) {
+			dp.verbose = TRUE;
+			continue;
+		}
+		if (!strcmp("-c", argv[i])) {
+			if (!(clients = atoi(nextArg(argc, argv, &i))))
+				usage();
+			continue;
+		}
 
-        if (!strcmp("--server",argv[i])) {
-            if (!(host=nextArg(argc, argv,&i)))
-                usage();
-            serveur=0;
-            continue;
-        }
-        /* Option inconnue */
-        printf("Ignoring unknown option: %s\n", argv[i]);
-    }
+		if (!strcmp("--server", argv[i])) {
+			if (!(host = nextArg(argc, argv, &i)))
+				usage();
+			serveur = 0;
+			continue;
+		}
+		/* Option inconnue */
+		printf("Ignoring unknown option: %s\n", argv[i]);
+	}
 
-    if (serveur) {
-        if (!(dp.fname && nThread))
-            usage();
-        if (clients>0) {
-            configureServeur(clients);
-            setupClients(type, dp.fname, nThread);
-        }
-    }else{
-        configureClient(host);
-        dp.fname=(char *)malloc(512);
-        memset(dp.fname,0, 512);
-        getConfiguration(&type, dp.fname, &nThread);
-    }
+	if (serveur) {
+		if (!(dp.fname && nThread))
+			usage();
+		if (clients > 0) {
+			configureServeur(clients);
+			setupClients(type, dp.fname, nThread);
+		}
+	} else {
+		configureClient(host);
+		dp.fname = (char *)malloc(512);
+		memset(dp.fname, 0, 512);
+		getConfiguration(&type, dp.fname, &nThread);
+	}
 
-    if (dp.verbose)
-        printf("By process.\n");
-    load=loadProcess;
-    eType="process";
-    terminer=terminerProcess;
-    LISTE_RESULTATS=LISTE_RESULTATS_PROCESS;
-    initialise(nThread);
-    if (serveur) {
-       maitre();
+	if (dp.verbose)
+		printf("By process.\n");
+	load = loadProcess;
+	eType = "process";
+	terminer = terminerProcess;
+	LISTE_RESULTATS = LISTE_RESULTATS_PROCESS;
+	initialise(nThread);
+	if (serveur) {
+		maitre();
 
-    }else{
-        maitreClient();
-        free(dp.fname);
-    }
-    clean();
+	} else {
+		maitreClient();
+		free(dp.fname);
+	}
+	clean();
 
-        return 0;
+	return 0;
 }
diff --git a/testcases/network/nfsv4/locks/netsync.c b/testcases/network/nfsv4/locks/netsync.c
index 3e449d9..0a58e43 100644
--- a/testcases/network/nfsv4/locks/netsync.c
+++ b/testcases/network/nfsv4/locks/netsync.c
@@ -11,191 +11,208 @@
 int fdServeur;
 extern char message[M_SIZE];
 
-int serverReceiveClient(int c) {
-    char tmp[M_SIZE];
-    int r,s;
-    /* Il faut etre sur que l'on lit _exactement_ la trame envoyee (M_SIZE) */
-    /* Ensure we read _exactly_ M_SIZE characters in the message */
-    memset(message,0,M_SIZE);
-    memset(tmp,0,M_SIZE);
-    r=0;
-    s=0;
+int serverReceiveClient(int c)
+{
+	char tmp[M_SIZE];
+	int r, s;
+	/* Il faut etre sur que l'on lit _exactement_ la trame envoyee (M_SIZE) */
+	/* Ensure we read _exactly_ M_SIZE characters in the message */
+	memset(message, 0, M_SIZE);
+	memset(tmp, 0, M_SIZE);
+	r = 0;
+	s = 0;
 
-    while (s<M_SIZE) {
-        r=read(fdClient[c],tmp, M_SIZE-s);
-        /* On complete le message au fur et a mesure */
-        /* Loop until we have a complete  message */
-        strncpy(message+s,tmp,r);
-        s+=r;
-    }
-   return s;
+	while (s < M_SIZE) {
+		r = read(fdClient[c], tmp, M_SIZE - s);
+		/* On complete le message au fur et a mesure */
+		/* Loop until we have a complete  message */
+		strncpy(message + s, tmp, r);
+		s += r;
+	}
+	return s;
 }
 
-int serverSendClient(int n) {
-    return write(fdClient[n],message, M_SIZE);
+int serverSendClient(int n)
+{
+	return write(fdClient[n], message, M_SIZE);
 }
 
-int clientReceiveNet() {
-    readFromServer(message);
-        return 0;
+int clientReceiveNet()
+{
+	readFromServer(message);
+	return 0;
 }
 
-int setupConnectionServeur() {
-    struct sockaddr_in local;
-    int c;
-    socklen_t size;
-    int sock;
-    struct sockaddr_in remote;
+int setupConnectionServeur()
+{
+	struct sockaddr_in local;
+	int c;
+	socklen_t size;
+	int sock;
+	struct sockaddr_in remote;
 
-    if ((sock = socket (AF_INET, SOCK_STREAM, 0))<0) {
-        perror ("socket");
-        exit(1);
-    }
-    memset(&local, 0x00, sizeof(local));
-    local.sin_family = AF_INET;
-    local.sin_port = htons(PORT);
-    local.sin_addr.s_addr = INADDR_ANY;
-    memset(&(local.sin_zero), 0x00, 8);
+	if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+		perror("socket");
+		exit(1);
+	}
+	memset(&local, 0x00, sizeof(local));
+	local.sin_family = AF_INET;
+	local.sin_port = htons(PORT);
+	local.sin_addr.s_addr = INADDR_ANY;
+	memset(&(local.sin_zero), 0x00, 8);
 
-    if (bind(sock, (struct sockaddr *)&local, sizeof(struct sockaddr))== -1) {
-        perror("bind");
-        exit(1);
-    }
+	if (bind(sock, (struct sockaddr *)&local, sizeof(struct sockaddr)) ==
+	    -1) {
+		perror("bind");
+		exit(1);
+	}
 
-    if (listen(sock, MAX_CONNECTION) == -1) {
-        perror("listen");
-        return 1;
-    }
-    size = sizeof(struct sockaddr_in);
-    for (c=0;c<maxClients; c++) {
+	if (listen(sock, MAX_CONNECTION) == -1) {
+		perror("listen");
+		return 1;
+	}
+	size = sizeof(struct sockaddr_in);
+	for (c = 0; c < maxClients; c++) {
 
-        /* On accepte les connections clientes */
-        /* Accept incoming connections */
-        if ((fdClient[c]=accept(sock, (struct sockaddr *)&remote, &size)) == -1) {
-            perror("accept");
-            return 1;
-        }
+		/* On accepte les connections clientes */
+		/* Accept incoming connections */
+		if ((fdClient[c] =
+		     accept(sock, (struct sockaddr *)&remote, &size)) == -1) {
+			perror("accept");
+			return 1;
+		}
 
-    }
-        return 0;
+	}
+	return 0;
 }
 
-int writeToClient(int c, char *message) {
-    return write(fdClient[c], message, 512);
+int writeToClient(int c, char *message)
+{
+	return write(fdClient[c], message, 512);
 }
 
-int serverCloseConnection() {
-    int c;
-    for (c=0;c<maxClients;c++)
-        close(fdClient[c]);
-        return 0;
+int serverCloseConnection()
+{
+	int c;
+	for (c = 0; c < maxClients; c++)
+		close(fdClient[c]);
+	return 0;
 
 }
 
-int writeToAllClients(char *foo) {
-    int c;
-    for (c=0;c<maxClients;c++)
-        writeToClient(c, foo);
-        return 0;
+int writeToAllClients(char *foo)
+{
+	int c;
+	for (c = 0; c < maxClients; c++)
+		writeToClient(c, foo);
+	return 0;
 }
 
-int setupClients(int type, char *fname, int nThread) {
-    /*
-     * Envoi des parametres a tous les clients
-     *
-     * on doit envoyer 3 parametres :
-     * - l'emplacement du fichier test
-     * - Le nombre d'esclaves
-     * - Le type de sous processus : thread ou process
-     */
+int setupClients(int type, char *fname, int nThread)
+{
+	/*
+	 * Envoi des parametres a tous les clients
+	 *
+	 * on doit envoyer 3 parametres :
+	 * - l'emplacement du fichier test
+	 * - Le nombre d'esclaves
+	 * - Le type de sous processus : thread ou process
+	 */
 
-    /*
-     * Send parameters to all slaves :
-     *
-     * We must send :
-     * - the position of the test file
-     * - the number of slaves for each client
-     * - The kind of slaves : process or thread
-     */
+	/*
+	 * Send parameters to all slaves :
+	 *
+	 * We must send :
+	 * - the position of the test file
+	 * - the number of slaves for each client
+	 * - The kind of slaves : process or thread
+	 */
 
-    char message[512];
-    sprintf(message,"%d:%s:%d::", type,fname,nThread);
-    writeToAllClients(message);
-        return 0;
+	char message[512];
+	sprintf(message, "%d:%s:%d::", type, fname, nThread);
+	writeToAllClients(message);
+	return 0;
 }
 
-int configureServeur(int  max) {
-    maxClients=max;
-    fdClient=(int *)malloc(sizeof(int)*max);
+int configureServeur(int max)
+{
+	maxClients = max;
+	fdClient = (int *)malloc(sizeof(int) * max);
 
-    setupConnectionServeur();
+	setupConnectionServeur();
 
-        return 0;
+	return 0;
 }
 
-int setupConnectionClient() {
+int setupConnectionClient()
+{
 
-    struct hostent *server;
-    struct sockaddr_in serv_addr;
+	struct hostent *server;
+	struct sockaddr_in serv_addr;
 
-    if (! (server=gethostbyname(serveur))) {
-        printf("erreur DNS\n");
-        return 1;
-    }
+	if (!(server = gethostbyname(serveur))) {
+		printf("erreur DNS\n");
+		return 1;
+	}
 
-    fdServeur = socket (AF_INET, SOCK_STREAM, 0);
-    if (fdServeur < 0) {
-        perror ("socket");
-        return 1;
-    }
+	fdServeur = socket(AF_INET, SOCK_STREAM, 0);
+	if (fdServeur < 0) {
+		perror("socket");
+		return 1;
+	}
 
-    serv_addr.sin_addr = *(struct in_addr*)server->h_addr;
-    serv_addr.sin_port = htons(PORT);
-    serv_addr.sin_family = AF_INET;
-    if (connect(fdServeur, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
-        perror("connect");
-        return 1;
-    }
- return 0;
+	serv_addr.sin_addr = *(struct in_addr *)server->h_addr;
+	serv_addr.sin_port = htons(PORT);
+	serv_addr.sin_family = AF_INET;
+	if (connect(fdServeur, (struct sockaddr *)&serv_addr, sizeof(serv_addr))
+	    < 0) {
+		perror("connect");
+		return 1;
+	}
+	return 0;
 }
 
-int readFromServer(char *message) {
-    char tmp[M_SIZE];
-    int r,s;
-    /* Il faut etre sur que l'on lit _exactement_ la trame envoyee de taille M_SIZE */
-    /* Ensure we read exactly M_SIZE characters */
-    memset(message,0,M_SIZE);
-    memset(tmp,0,M_SIZE);
-    r=0; s=0;
-    while (s<M_SIZE) {
-        r=read(fdServeur,tmp, M_SIZE-s);
-        /* On complete le message au fur et a mesure */
-        /* Loop until we have a complete message */
-        strncpy(message+s,tmp,r);
-        s+=r;
-    }
-   return s;
+int readFromServer(char *message)
+{
+	char tmp[M_SIZE];
+	int r, s;
+	/* Il faut etre sur que l'on lit _exactement_ la trame envoyee de taille M_SIZE */
+	/* Ensure we read exactly M_SIZE characters */
+	memset(message, 0, M_SIZE);
+	memset(tmp, 0, M_SIZE);
+	r = 0;
+	s = 0;
+	while (s < M_SIZE) {
+		r = read(fdServeur, tmp, M_SIZE - s);
+		/* On complete le message au fur et a mesure */
+		/* Loop until we have a complete message */
+		strncpy(message + s, tmp, r);
+		s += r;
+	}
+	return s;
 }
 
-int getConfiguration(int *type, char *fname, int *nThread) {
-    char conf[M_SIZE];
-    char *p;
-    int i;
-    readFromServer(conf);
-    p=strtok(conf,":");
-    printf("%s\n",p);
-    *type=atoi(p);
-    p=strtok(NULL,":");
-    i=strlen(p);
-    strncpy(fname, p,i);
-    p=strtok(NULL,":");
-    *nThread=atoi(p);
+int getConfiguration(int *type, char *fname, int *nThread)
+{
+	char conf[M_SIZE];
+	char *p;
+	int i;
+	readFromServer(conf);
+	p = strtok(conf, ":");
+	printf("%s\n", p);
+	*type = atoi(p);
+	p = strtok(NULL, ":");
+	i = strlen(p);
+	strncpy(fname, p, i);
+	p = strtok(NULL, ":");
+	*nThread = atoi(p);
 
-        return 0;
+	return 0;
 }
 
-int configureClient(char *s) {
-    serveur=s;
-    setupConnectionClient();
-        return 0;
+int configureClient(char *s)
+{
+	serveur = s;
+	setupConnectionClient();
+	return 0;
 }
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc1.c b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
index 1772f0d..946cb21 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc1.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
@@ -29,8 +29,7 @@
 void do_compare(int, char *, struct data *, char *);
 void usage_error(char *program_name);
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	struct hostent *hp;
 	struct data buffer, *return_buffer;
@@ -43,7 +42,7 @@
 	int sock;
 	struct timeval timeout;
 
-	for (i=1; i<argc; i++) {
+	for (i = 1; i < argc; i++) {
 		if (!strcmp(argv[i], "-s")) {
 			if (++i >= argc) {
 				fprintf(stderr, "-s requires a host name\n");
@@ -69,7 +68,8 @@
 			}
 			n = sscanf(argv[i], "%d", &program);
 			if (n != 1) {
-				fprintf(stderr, "-p requires an numeric argument\n");
+				fprintf(stderr,
+					"-p requires an numeric argument\n");
 				usage_error(argv[0]);
 			}
 			continue;
@@ -82,7 +82,8 @@
 			}
 			n = sscanf(argv[i], "%d", &version);
 			if (n != 1) {
-				fprintf(stderr, "-v requires an numeric argument\n");
+				fprintf(stderr,
+					"-v requires an numeric argument\n");
 				usage_error(argv[0]);
 			}
 			continue;
@@ -94,13 +95,13 @@
 		usage_error(argv[0]);
 	}
 	hp = gethostbyname(server);
-	if (hp == (struct hostent *) NULL) {
+	if (hp == (struct hostent *)NULL) {
 		fprintf(stderr, "server %s unknown\n", server);
 		usage_error(argv[0]);
 	}
 	memset(&server_sin, 0x00, sizeof(server_sin));
 	server_sin.sin_family = AF_INET;
-	memcpy((char *) &server_sin.sin_addr, hp->h_addr, sizeof(hp->h_addr));
+	memcpy((char *)&server_sin.sin_addr, hp->h_addr, sizeof(hp->h_addr));
 
 	if (!file_name) {
 		fprintf(stderr, "file name not given\n");
@@ -108,8 +109,8 @@
 	}
 
 	gethostname(host_name, 100);
-	if ((hp=gethostbyname(host_name)) != NULL)
-		host_address = (long) *((int *) hp->h_addr_list[0]);
+	if ((hp = gethostbyname(host_name)) != NULL)
+		host_address = (long)*((int *)hp->h_addr_list[0]);
 	buffer.address = host_address;
 	buffer.request_id = getpid();
 
@@ -119,20 +120,21 @@
 		usage_error(argv[0]);
 	}
 	if (stat(file_name, &stat_buffer))
-		fprintf(stderr, "stat() failed for %s, errno %d\n", file_name, errno);
-		buffer.data_length = stat_buffer.st_size;
+		fprintf(stderr, "stat() failed for %s, errno %d\n", file_name,
+			errno);
+	buffer.data_length = stat_buffer.st_size;
 	if (buffer.data_length > 2187) {
 		fprintf(stderr, "file too large (2187 max)\n");
 		usage_error(argv[0]);
 	}
 
-	buffer.data = (char *) malloc(buffer.data_length);
-	for (i=0, p=buffer.data; i < buffer.data_length; i++, p++)
-	*p = getc(fp);
+	buffer.data = (char *)malloc(buffer.data_length);
+	for (i = 0, p = buffer.data; i < buffer.data_length; i++, p++)
+		*p = getc(fp);
 	fclose(fp);
 
 	rc = callrpc(server, program, version, 1, xdr_send_data, &buffer,
-		 xdr_receive_data, &return_buffer);
+		     xdr_receive_data, &return_buffer);
 	do_compare(rc, "callrpc", &buffer, return_buffer->data);
 
 	server_sin.sin_port = 0;
@@ -141,13 +143,13 @@
 	timeout.tv_sec = 10;
 	clnt = clntudp_create(&server_sin, program, version, timeout, &sock);
 	if (clnt == (CLIENT *) NULL) {
-	fprintf(stderr, "clntudp_create failed\n");
-	exit(1);
+		fprintf(stderr, "clntudp_create failed\n");
+		exit(1);
 	}
 	timeout.tv_usec = 0;
 	timeout.tv_sec = 30;
-	rc = (int) clnt_call(clnt, 1, xdr_send_data, &buffer,
-			 xdr_receive_data, &return_buffer, timeout);
+	rc = (int)clnt_call(clnt, 1, xdr_send_data, &buffer,
+			    xdr_receive_data, &return_buffer, timeout);
 	clnt_destroy(clnt);
 	do_compare(rc, "udp transport", &buffer, return_buffer->data);
 
@@ -160,16 +162,15 @@
 	}
 	timeout.tv_usec = 0;
 	timeout.tv_sec = 30;
-	rc = (int) clnt_call(clnt, 1, xdr_send_data, &buffer,
-						 xdr_receive_data, &return_buffer, timeout);
+	rc = (int)clnt_call(clnt, 1, xdr_send_data, &buffer,
+			    xdr_receive_data, &return_buffer, timeout);
 	clnt_destroy(clnt);
 	do_compare(rc, "tcp transport", &buffer, return_buffer->data);
 
 	exit(0);
 }
 
-void
-do_compare(int rpc_rc, char *msg, struct data *buffer, char *ret_data)
+void do_compare(int rpc_rc, char *msg, struct data *buffer, char *ret_data)
 {
 	int rc;
 
@@ -186,25 +187,23 @@
 	}
 }
 
-int
-xdr_receive_data(XDR *xdrs, struct data **buffer)
+int xdr_receive_data(XDR * xdrs, struct data **buffer)
 {
 	struct data *bp;
 	int i, rc;
 	char *p;
 
-	bp = *buffer = (struct data *) malloc(sizeof(struct data));
+	bp = *buffer = (struct data *)malloc(sizeof(struct data));
 	rc = xdr_long(xdrs, &(bp->address));
 	rc = rc && xdr_long(xdrs, &bp->request_id);
 	rc = rc && xdr_long(xdrs, &bp->data_length);
-	p = (*buffer)->data = (char *) malloc(bp->data_length);
-	for (i=0; rc && i < bp->data_length; p++, i++)
+	p = (*buffer)->data = (char *)malloc(bp->data_length);
+	for (i = 0; rc && i < bp->data_length; p++, i++)
 		rc = xdr_char(xdrs, p);
-	return(rc);
+	return (rc);
 }
 
-int
-xdr_send_data(XDR *xdrs, struct data *buffer)
+int xdr_send_data(XDR * xdrs, struct data *buffer)
 {
 	int i, rc;
 	char *p;
@@ -212,15 +211,15 @@
 	rc = xdr_long(xdrs, &buffer->address);
 	rc = rc && xdr_long(xdrs, &buffer->request_id);
 	rc = rc && xdr_long(xdrs, &buffer->data_length);
-	for (i=0, p=buffer->data; rc && i < buffer->data_length; i++, p++)
+	for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
 		rc = xdr_char(xdrs, p);
-	return(rc);
+	return (rc);
 }
 
-void
-usage_error(char *program_name)
+void usage_error(char *program_name)
 {
-	fprintf(stderr, "Usage: %s -s server -f file [-p program-number] [-v version]\n",
+	fprintf(stderr,
+		"Usage: %s -s server -f file [-p program-number] [-v version]\n",
 		program_name);
 	exit(2);
 }
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
index fb46987..4fdff8e 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
@@ -14,148 +14,148 @@
 long host_address;
 
 struct data {
-    long address;
-    long request_id;
-    long data_length;
-    char *data;
+	long address;
+	long request_id;
+	long data_length;
+	char *data;
 };
 
 void breakpoint(void);
-void service_request(struct svc_req *rqstp, SVCXPRT *transp);
-int xdr_receive_data(XDR *xdrs, struct data **buffer);
-int xdr_send_data(XDR *xdrs, struct data *buffer);
+void service_request(struct svc_req *rqstp, SVCXPRT * transp);
+int xdr_receive_data(XDR * xdrs, struct data **buffer);
+int xdr_send_data(XDR * xdrs, struct data *buffer);
 
-int
-main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    SVCXPRT *transp;
-    struct hostent *hp;
-    int i, n;
+	SVCXPRT *transp;
+	struct hostent *hp;
+	int i, n;
 
-    for (i=1; i<argc; i++) {
-	if (!strcmp(argv[i], "-d"))
-	    debug = 1;
-	if (!strcmp(argv[i], "-p")) {
-	    if (++i >= argc) {
-		fprintf(stderr, "%s: -p requires an argument\n", argv[0]);
-		exit(1);
-	    }
-	    n = sscanf(argv[i], "%d", &program);
-	    if (n != 1) {
-		fprintf(stderr, "%s: -p requires an numeric argument\n",
-			argv[0]);
-		exit(1);
-	    }
-	}
-	if (!strcmp(argv[i], "-v")) {
-	    if (++i >= argc) {
-		fprintf(stderr, "%s: -v requires an argument\n", argv[0]);
-		exit(1);
-	    }
-	    n = sscanf(argv[i], "%d", &version);
-	    if (n != 1) {
-		fprintf(stderr, "%s: -v requires an numeric argument\n",
-			argv[0]);
-		exit(1);
-	    }
-	}
-    }
-
-    if (!debug) {
-	if ((n=fork()) < 0) {
-	    fprintf(stderr, "%s: Can't fork\n", argv[0]);
-	    exit(1);
+	for (i = 1; i < argc; i++) {
+		if (!strcmp(argv[i], "-d"))
+			debug = 1;
+		if (!strcmp(argv[i], "-p")) {
+			if (++i >= argc) {
+				fprintf(stderr, "%s: -p requires an argument\n",
+					argv[0]);
+				exit(1);
+			}
+			n = sscanf(argv[i], "%d", &program);
+			if (n != 1) {
+				fprintf(stderr,
+					"%s: -p requires an numeric argument\n",
+					argv[0]);
+				exit(1);
+			}
+		}
+		if (!strcmp(argv[i], "-v")) {
+			if (++i >= argc) {
+				fprintf(stderr, "%s: -v requires an argument\n",
+					argv[0]);
+				exit(1);
+			}
+			n = sscanf(argv[i], "%d", &version);
+			if (n != 1) {
+				fprintf(stderr,
+					"%s: -v requires an numeric argument\n",
+					argv[0]);
+				exit(1);
+			}
+		}
 	}
 
-	if (n > 0)
-	    exit(0);
+	if (!debug) {
+		if ((n = fork()) < 0) {
+			fprintf(stderr, "%s: Can't fork\n", argv[0]);
+			exit(1);
+		}
 
-	i = 50;
-	while (--i >= 0)
-	    close(i);
-	open("/dev/null", O_RDONLY);
-	open("/dev/null", O_WRONLY);
-	dup(1);
+		if (n > 0)
+			exit(0);
 
-	if ((i=open("/dev/tty", O_RDWR)) >= 0) {
-	    ioctl(i, TIOCNOTTY, 0);
-	    close(i);
+		i = 50;
+		while (--i >= 0)
+			close(i);
+		open("/dev/null", O_RDONLY);
+		open("/dev/null", O_WRONLY);
+		dup(1);
+
+		if ((i = open("/dev/tty", O_RDWR)) >= 0) {
+			ioctl(i, TIOCNOTTY, 0);
+			close(i);
+		}
 	}
-    }
 
-    gethostname(host_name, 100);
-    if (hp=gethostbyname(host_name))
-	host_address = *((long *) hp->h_addr_list[0]);
+	gethostname(host_name, 100);
+	if (hp = gethostbyname(host_name))
+		host_address = *((long *)hp->h_addr_list[0]);
 
-    pmap_unset(program, version);
-    transp = svcudp_create(RPC_ANYSOCK);
-    svc_register(transp, program, version, service_request, IPPROTO_UDP);
-    transp = svctcp_create(RPC_ANYSOCK, 0, 0);
-    svc_register(transp, program, version, service_request, IPPROTO_TCP);
-    svc_run();
-    exit(1);
+	pmap_unset(program, version);
+	transp = svcudp_create(RPC_ANYSOCK);
+	svc_register(transp, program, version, service_request, IPPROTO_UDP);
+	transp = svctcp_create(RPC_ANYSOCK, 0, 0);
+	svc_register(transp, program, version, service_request, IPPROTO_TCP);
+	svc_run();
+	exit(1);
 }
 
-void
-service_request(struct svc_req *rqstp, SVCXPRT *transp)
+void service_request(struct svc_req *rqstp, SVCXPRT * transp)
 {
-    struct data *buffer;
+	struct data *buffer;
 
-    switch (rqstp->rq_proc) {
-    case 0:
-	svc_sendreply(transp, xdr_void, (char *) 0);
-	breakpoint();
-	return;
+	switch (rqstp->rq_proc) {
+	case 0:
+		svc_sendreply(transp, xdr_void, (char *)0);
+		breakpoint();
+		return;
 
-    case 99:
-	exit(0);
+	case 99:
+		exit(0);
 
-    case 1:
-	svc_getargs(transp, xdr_receive_data, (unsigned char *) &buffer);
-	svc_sendreply(transp, xdr_send_data, (unsigned char *) buffer);
-	free(buffer->data);
-	free(buffer);
-	return;
+	case 1:
+		svc_getargs(transp, xdr_receive_data, (unsigned char *)&buffer);
+		svc_sendreply(transp, xdr_send_data, (unsigned char *)buffer);
+		free(buffer->data);
+		free(buffer);
+		return;
 
-    default:
-	svcerr_noproc(transp);
-	return;
-    }
+	default:
+		svcerr_noproc(transp);
+		return;
+	}
 }
 
-int
-xdr_receive_data(XDR *xdrs, struct data **buffer)
+int xdr_receive_data(XDR * xdrs, struct data **buffer)
 {
-    struct data *bp;
-    int i, rc;
-    char *p;
+	struct data *bp;
+	int i, rc;
+	char *p;
 
-    bp = *buffer = (struct data *) malloc(sizeof(struct data));
-    rc = xdr_long(xdrs, &(bp->address));
-    rc = rc && xdr_long(xdrs, &bp->request_id);
-    rc = rc && xdr_long(xdrs, &bp->data_length);
-    p = (*buffer)->data = (char *) malloc(bp->data_length);
-    for (i=0; rc && i < bp->data_length; p++, i++)
-	rc = xdr_char(xdrs, p);
-    return(rc);
+	bp = *buffer = (struct data *)malloc(sizeof(struct data));
+	rc = xdr_long(xdrs, &(bp->address));
+	rc = rc && xdr_long(xdrs, &bp->request_id);
+	rc = rc && xdr_long(xdrs, &bp->data_length);
+	p = (*buffer)->data = (char *)malloc(bp->data_length);
+	for (i = 0; rc && i < bp->data_length; p++, i++)
+		rc = xdr_char(xdrs, p);
+	return (rc);
 }
 
-int
-xdr_send_data(XDR *xdrs, struct data *buffer)
+int xdr_send_data(XDR * xdrs, struct data *buffer)
 {
-    int i, rc;
-    char *p;
+	int i, rc;
+	char *p;
 
-    rc = xdr_long(xdrs, &buffer->address);
-    rc = rc && xdr_long(xdrs, &buffer->request_id);
-    rc = rc && xdr_long(xdrs, &buffer->data_length);
-    for (i=0, p=buffer->data; rc && i < buffer->data_length; i++, p++)
-	rc = xdr_char(xdrs, p);
-    return(rc);
+	rc = xdr_long(xdrs, &buffer->address);
+	rc = rc && xdr_long(xdrs, &buffer->request_id);
+	rc = rc && xdr_long(xdrs, &buffer->data_length);
+	for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
+		rc = xdr_char(xdrs, p);
+	return (rc);
 }
 
 void breakpoint(void)
 {
-    if (debug)
-	printf("breakpoint\n");
+	if (debug)
+		printf("breakpoint\n");
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_get_myaddress/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_get_myaddress/1-basic.c
index eac9708..da08edf 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_get_myaddress/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_get_myaddress/1-basic.c
@@ -39,14 +39,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct sockaddr_in sin;
 
@@ -56,7 +56,7 @@
 	//Call tested routine
 	get_myaddress(&sin);
 
-    test_status = (sin.sin_addr.s_addr == 0);
+	test_status = (sin.sin_addr.s_addr == 0);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getmaps/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getmaps/1-basic.c
index a8a7291..c42f97b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getmaps/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getmaps/1-basic.c
@@ -39,37 +39,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct pmaplist *ml = NULL;
 	struct hostent *hp = NULL;
 	struct sockaddr_in sin;
 
 	//Initialization
-	if ((hp = gethostbyname(argc[1])) == NULL)
-	{
+	if ((hp = gethostbyname(argc[1])) == NULL) {
 		fprintf(stderr, "gethostbyname failed\n");
 		exit(1);
 	}
 	sin.sin_family = AF_INET;
-	sin.sin_addr.s_addr = *(u_int *)hp->h_addr;
+	sin.sin_addr.s_addr = *(u_int *) hp->h_addr;
 
-    ml = pmap_getmaps(&sin);
+	ml = pmap_getmaps(&sin);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("List. %d\n", ml);
 		printf("Addr. %u\n", sin.sin_addr.s_addr);
-    }
+	}
 
-    test_status = (ml == NULL);
+	test_status = (ml == NULL);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getport/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getport/1-basic.c
index 257dc16..67f1e6e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getport/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_getport/1-basic.c
@@ -39,37 +39,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	u_int getPort;
 	struct hostent *hp = NULL;
 	struct sockaddr_in sin;
 
 	//Initialization
-	if ((hp = gethostbyname(argc[1])) == NULL)
-	{
+	if ((hp = gethostbyname(argc[1])) == NULL) {
 		fprintf(stderr, "gethostbyname failed\n");
 		exit(1);
 	}
 	sin.sin_family = AF_INET;
-	sin.sin_addr.s_addr = *(u_int *)hp->h_addr;
+	sin.sin_addr.s_addr = *(u_int *) hp->h_addr;
 
-    getPort = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
+	getPort = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("Port got. %u\n", getPort);
 		printf("Addr. %u\n", sin.sin_addr.s_addr);
-    }
+	}
 
-    test_status = (getPort == 0);
+	test_status = (getPort == 0);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/1-basic.c
index e1e5053..26e2995 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/1-basic.c
@@ -41,46 +41,43 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct hostent *hp = NULL;
 	struct sockaddr_in sin;
 	enum clnt_stat cs;
-    u_long port;
+	u_long port;
 	struct timeval tv;
 	int var_snd = 10;
 	int var_rec = -1;
 
 	//Initialization
-	if ((hp = gethostbyname(argc[1])) == NULL)
-	{
+	if ((hp = gethostbyname(argc[1])) == NULL) {
 		fprintf(stderr, "gethostbyname failed\n");
 		exit(1);
 	}
 
 	sin.sin_family = AF_INET;
-	sin.sin_addr.s_addr = *(u_int *)hp->h_addr;
-    port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
+	sin.sin_addr.s_addr = *(u_int *) hp->h_addr;
+	port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-    if (run_mode)
-    {
+	if (run_mode) {
 		printf("port : %d\n", port);
 	}
 
 	cs = pmap_rmtcall(&sin, progNum, VERSNUM, PROCNUM,
-	                  (xdrproc_t)xdr_int, (char *)&var_snd,
-	                  (xdrproc_t)xdr_int, (char *)&var_rec,
-	                  tv, &port);
+			  (xdrproc_t) xdr_int, (char *)&var_snd,
+			  (xdrproc_t) xdr_int, (char *)&var_rec, tv, &port);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/2-stress.c
index 470d263..17a0e25 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/2-stress.c
@@ -41,60 +41,56 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct hostent *hp = NULL;
 	struct sockaddr_in sin;
 	enum clnt_stat cs;
-    u_long port;
+	u_long port;
 	struct timeval tv;
 	int var_snd = 10;
 	int var_rec = -1;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-	if ((hp = gethostbyname(argc[1])) == NULL)
-	{
+	if ((hp = gethostbyname(argc[1])) == NULL) {
 		fprintf(stderr, "gethostbyname failed\n");
 		exit(1);
 	}
 
 	sin.sin_family = AF_INET;
-	sin.sin_addr.s_addr = *(u_int *)hp->h_addr;
-    port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
+	sin.sin_addr.s_addr = *(u_int *) hp->h_addr;
+	port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-    if (run_mode)
-    {
+	if (run_mode) {
 		printf("port : %d\n", port);
 	}
 
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		cs = pmap_rmtcall(&sin, progNum, VERSNUM, PROCNUM,
-	                  (xdrproc_t)xdr_int, (char *)&var_snd,
-	                  (xdrproc_t)xdr_int, (char *)&var_rec,
-	                  tv, &port);
+				  (xdrproc_t) xdr_int, (char *)&var_snd,
+				  (xdrproc_t) xdr_int, (char *)&var_rec,
+				  tv, &port);
 
 		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/7-performance.c
index 1984240..203771a 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_rmtcall/7-performance.c
@@ -48,8 +48,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -62,8 +61,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -76,8 +74,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -87,80 +84,76 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	struct hostent *hp = NULL;
 	struct sockaddr_in sin;
 	enum clnt_stat cs;
-    u_long port;
+	u_long port;
 	struct timeval tv;
 	int var_snd = 10;
 	int var_rec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    if ((hp = gethostbyname(argc[1])) == NULL)
-	{
+	if ((hp = gethostbyname(argc[1])) == NULL) {
 		fprintf(stderr, "gethostbyname failed\n");
 		exit(1);
 	}
 
 	sin.sin_family = AF_INET;
-	sin.sin_addr.s_addr = *(u_int *)hp->h_addr;
-    port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
+	sin.sin_addr.s_addr = *(u_int *) hp->h_addr;
+	port = pmap_getport(&sin, progNum, VERSNUM, IPPROTO_UDP);
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = pmap_rmtcall(&sin, progNum, VERSNUM, PROCNUM,
-	                  		(xdrproc_t)xdr_int, (char *)&var_snd,
-	                  		(xdrproc_t)xdr_int, (char *)&var_rec,
-	                  		tv, &port);
+				  (xdrproc_t) xdr_int, (char *)&var_snd,
+				  (xdrproc_t) xdr_int, (char *)&var_rec,
+				  tv, &port);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_set/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_set/1-basic.c
index 1abd7d3..4601154 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_set/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_set/1-basic.c
@@ -36,14 +36,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	int port = 600;
 	SVCXPRT *transp = NULL;
@@ -51,14 +51,13 @@
 	//Initialization
 	pmap_unset(progNum, VERSNUM);
 
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 	}
 
 	transp = svcudp_create(RPC_ANYSOCK);
 
-    test_status = !pmap_set(progNum, VERSNUM, IPPROTO_UDP, port);
+	test_status = !pmap_set(progNum, VERSNUM, IPPROTO_UDP, port);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_unset/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_unset/1-basic.c
index 3048be5..1f71f67 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_unset/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_addrmanagmt_pmap_unset/1-basic.c
@@ -36,30 +36,29 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
-	int progNum = 5000000; //This test doesn't care with progNum, just local test of reg/unreg...
+	int test_status = 1;	//Default test result set to FAILED
+	int progNum = 5000000;	//This test doesn't care with progNum, just local test of reg/unreg...
 	int port = 600;
 	SVCXPRT *transp = NULL;
 
 	//Initialization
 	pmap_unset(progNum, VERSNUM);
 
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 	}
 
 	transp = svcudp_create(RPC_ANYSOCK);
 	pmap_set(progNum, VERSNUM, IPPROTO_UDP, port);
 
-    test_status = !pmap_unset(progNum, VERSNUM);
+	test_status = !pmap_unset(progNum, VERSNUM);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/1-basic.c
index e5a25df..29f18fb 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/1-basic.c
@@ -42,14 +42,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authNone = NULL;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/1-basic.c
index e2ee334..868157c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/1-basic.c
@@ -42,21 +42,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authNone = NULL;
 
 	authNone = authnone_create();
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authNone != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authNone != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/1-basic.c
index 8cc75bb..e38ee21 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/1-basic.c
@@ -44,20 +44,20 @@
 
 //Other define
 #ifndef NGROUPS_MAX
-   #define NGROUPS_MAX 16
+#define NGROUPS_MAX 16
 #endif
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authUnx = NULL;
 	char hostname[256];
@@ -73,23 +73,21 @@
 	gid = getegid();
 
 	num_groups = getgroups(NGROUPS_MAX, groups);
-	if (num_groups == -1)
-	{
-    	fprintf(stderr, "getgroups() failed for %d\n", uid);
-    	return 1;
+	if (num_groups == -1) {
+		fprintf(stderr, "getgroups() failed for %d\n", uid);
+		return 1;
 	}
 
 	rslt = gethostname(hostname, 256);
-	if (rslt == -1)
-	{
-	    fprintf(stderr, "gethostname() failed\n");
-	    return 1;
+	if (rslt == -1) {
+		fprintf(stderr, "gethostname() failed\n");
+		return 1;
 	}
 
 	authUnx = authunix_create(hostname, uid, gid, num_groups, aup_gids);
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authUnx != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authUnx != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/1-basic.c
index 0625bef..99ac9ea 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/1-basic.c
@@ -45,14 +45,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	//This is only a test case, normally use, clnt->cl_auth instead of an AUTH structure
 	AUTH *authUnx = NULL;
@@ -60,7 +60,7 @@
 	authUnx = authunix_create_default();
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authUnx != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authUnx != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/1-basic.c
index 9aafe17..e4b9efe 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/1-basic.c
@@ -34,35 +34,32 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-int eachResult (char *out, struct sockaddr_in *addr);
+int eachResult(char *out, struct sockaddr_in *addr);
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Show information in debug mode...
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
-
 	//Call broadcast routine
 	cs = clnt_broadcast(progNum, VERSNUM, PROCNUM,
-				   		(xdrproc_t)xdr_int, (char *)&varSnd,
-				   		(xdrproc_t)xdr_int, (char *)&varRec,
-				   		eachResult);
+			    (xdrproc_t) xdr_int, (char *)&varSnd,
+			    (xdrproc_t) xdr_int, (char *)&varRec, eachResult);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
@@ -76,7 +73,7 @@
 	return test_status;
 }
 
-int eachResult (char *out, struct sockaddr_in *addr)
+int eachResult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do here in that test case...
 	return 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/2-stress.c
index 2dd18e3..da85b86 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/2-stress.c
@@ -34,20 +34,20 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-void eachResult (char *out, struct sockaddr_in *addr);
+void eachResult(char *out, struct sockaddr_in *addr);
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
@@ -57,25 +57,21 @@
 	int i;
 
 	//Show information in debug mode...
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
-
 	//Call broadcast routine
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		cs = clnt_broadcast(progNum, VERSNUM, PROCNUM,
-					   		(xdrproc_t)xdr_int, (char *)&varSnd,
-					   		(xdrproc_t)xdr_int, (char *)&varRec,
-					   		eachResult);
+				    (xdrproc_t) xdr_int, (char *)&varSnd,
+				    (xdrproc_t) xdr_int, (char *)&varRec,
+				    eachResult);
 		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
@@ -89,7 +85,7 @@
 	return test_status;
 }
 
-void eachResult (char *out, struct sockaddr_in *addr)
+void eachResult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do here in that test case...
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/5-scalability.c
index ec25f12..1d6282f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/5-scalability.c
@@ -37,7 +37,7 @@
 //Set number of test call
 int maxIter;
 
-int eachResult (char *out, struct sockaddr_in *addr);
+int eachResult(char *out, struct sockaddr_in *addr);
 
 double average(double *tbl)
 {
@@ -45,8 +45,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -59,8 +58,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -73,8 +71,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -84,41 +81,40 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_broadcast(progNum, VERSNUM, PROCNUM,
-				   			(xdrproc_t)xdr_int, (char *)&varSnd,
-				   			(xdrproc_t)xdr_int, (char *)&varRec,
-				   			eachResult);
+				    (xdrproc_t) xdr_int, (char *)&varSnd,
+				    (xdrproc_t) xdr_int, (char *)&varRec,
+				    eachResult);
 
 		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
@@ -127,23 +123,21 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
@@ -153,7 +147,7 @@
 	return test_status;
 }
 
-int eachResult (char *out, struct sockaddr_in *addr)
+int eachResult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do here in that test case...
 	return 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/6-dataint.c
index 3688ff2..0bfcf73 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/6-dataint.c
@@ -37,19 +37,19 @@
 #define STRPROCNUM 4000
 #define VERSNUM 1
 
-int eachResult (char *out, struct sockaddr_in *addr);
+int eachResult(char *out, struct sockaddr_in *addr);
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 1;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	//Sent variables
@@ -70,9 +70,8 @@
 	intSnd = -65536;
 
 	clnt_broadcast(progNum, VERSNUM, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec,
-				   eachResult);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, eachResult);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -83,9 +82,8 @@
 	intSnd = 16777216;
 
 	clnt_broadcast(progNum, VERSNUM, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec,
-				   eachResult);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, eachResult);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -96,9 +94,8 @@
 	lngSnd = -430000;
 
 	clnt_broadcast(progNum, VERSNUM, LNGPROCNUM,
-				   (xdrproc_t)xdr_long, (char *)&lngSnd,
-				   (xdrproc_t)xdr_long, (char *)&lngRec,
-				   eachResult);
+		       (xdrproc_t) xdr_long, (char *)&lngSnd,
+		       (xdrproc_t) xdr_long, (char *)&lngRec, eachResult);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -109,9 +106,8 @@
 	dblSnd = -1735.63000f;
 
 	clnt_broadcast(progNum, VERSNUM, LNGPROCNUM,
-				   (xdrproc_t)xdr_double, (char *)&dblSnd,
-				   (xdrproc_t)xdr_double, (char *)&dblRec,
-				   eachResult);
+		       (xdrproc_t) xdr_double, (char *)&dblSnd,
+		       (xdrproc_t) xdr_double, (char *)&dblRec, eachResult);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -123,9 +119,8 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	clnt_broadcast(progNum, VERSNUM, LNGPROCNUM,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-				   eachResult);
+		       (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		       (xdrproc_t) xdr_wrapstring, (char *)&strRec, eachResult);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
@@ -139,7 +134,7 @@
 	return test_status;
 }
 
-int eachResult (char *out, struct sockaddr_in *addr)
+int eachResult(char *out, struct sockaddr_in *addr)
 {
 	fprintf(stderr, "er : %d\n", *out);
 	return *out;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/7-performance.c
index 1f66458..aff5a8f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/7-performance.c
@@ -37,7 +37,7 @@
 //Set number of test call
 int maxIter;
 
-int eachResult (char *out, struct sockaddr_in *addr);
+int eachResult(char *out, struct sockaddr_in *addr);
 
 double average(double *tbl)
 {
@@ -45,8 +45,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -59,8 +58,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -73,8 +71,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -84,41 +81,40 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_broadcast(progNum, VERSNUM, PROCNUM,
-				   			(xdrproc_t)xdr_int, (char *)&varSnd,
-				   			(xdrproc_t)xdr_int, (char *)&varRec,
-				   			eachResult);
+				    (xdrproc_t) xdr_int, (char *)&varSnd,
+				    (xdrproc_t) xdr_int, (char *)&varRec,
+				    eachResult);
 
 		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
@@ -127,23 +123,21 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
@@ -156,7 +150,7 @@
 	return test_status;
 }
 
-int eachResult (char *out, struct sockaddr_in *addr)
+int eachResult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do here in that test case...
 	return 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/8-complex.c
index 3abb77c..348df86 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_broadc_clnt_broadcast/8-complex.c
@@ -40,12 +40,11 @@
 int currentAnswer;
 int maxAnswer;
 
-bool_t eachResult (char *out, struct sockaddr_in *addr)
+bool_t eachResult(char *out, struct sockaddr_in *addr)
 {
 	//printf("in each result\n");
 	currentAnswer++;
-	if (currentAnswer >= maxAnswer)
-	{
+	if (currentAnswer >= maxAnswer) {
 		return (1);
 	}
 	return (0);
@@ -54,36 +53,33 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of host ready to answer to broadcast
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of host ready to answer to broadcast
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 0;
 	int varRec;
 
-	bool_t eachResult (char *out, struct sockaddr_in *addr);
+	bool_t eachResult(char *out, struct sockaddr_in *addr);
 	maxAnswer = atoi(argc[3]);
 	currentAnswer = 0;
 
 	//Show information in debug mode...
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 		printf("Max SVC : %d\n", maxAnswer);
 	}
-
 	//Call broadcast routine
 	cs = clnt_broadcast(progNum, VERSNUM, PROCNUM,
-				   		(xdrproc_t)xdr_int, (char *)&varSnd,
-				   		(xdrproc_t)xdr_int, (char *)&varRec,
-				   		eachResult);
+			    (xdrproc_t) xdr_int, (char *)&varSnd,
+			    (xdrproc_t) xdr_int, (char *)&varRec, eachResult);
 
 	if (currentAnswer == maxAnswer)
 		test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/1-basic.c
index 3bbce7f..1f5e3da 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "tcp";
 	CLIENT *clnt = NULL;
@@ -52,13 +52,11 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 	}
-
 	//If we are here, macro call was successful
-	test_status = ((CLIENT *)clnt != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) clnt != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/2-stress.c
index 54ae3d5..58f55d7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_create/2-stress.c
@@ -37,33 +37,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "tcp";
 	CLIENT *clnt = NULL;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//First of all, create a client
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
 		if (clnt != NULL)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/1-basic.c
index d00ca7a..daba803 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char *proto = "tcp";
 	CLIENT *clnt = NULL;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/2-stress.c
index 8597a5b..9fef30f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnt_destroy/2-stress.c
@@ -37,33 +37,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char *proto = "tcp";
 	CLIENT *clnt = NULL;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//First of all, create a client
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 		clnt_destroy(clnt);
 		nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/1-basic.c
index 396afaa..dea1634 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "tcp";
 	CLIENT *clnt = NULL;
@@ -52,11 +52,9 @@
 	//First of all, create a client
 	clnt = clntraw_create(progNum, VERSNUM);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 	}
-
 	//If we are here, macro call was successful
 	test_status = (clnt != NULL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/7-performance.c
index be92d89..6005831 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,32 +79,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	char proto[8] = "tcp";
 	CLIENT *clnt = NULL;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
@@ -118,22 +114,20 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (clnt != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (clnt != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/8-complex.c
index 3172bc6..02f286d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntraw_create/8-complex.c
@@ -39,123 +39,116 @@
 
 int main(int argc, char **argv)
 {
-     CLIENT *clnt = NULL;
-     SVCXPRT *svc = NULL;
-	 int progNum = atoi(argv[2]);
-	 int test_status = 0;
-	 int run_mode = 0;
-	 struct timeval tv;
-	 long long resTbl[MAXITER];
-	 struct timeval tv1,tv2;
-     struct timezone tz;
-     long long diff;
-     int intSnd = 0;
-     int intRec;
-	 int i;
-	 int sum;
+	CLIENT *clnt = NULL;
+	SVCXPRT *svc = NULL;
+	int progNum = atoi(argv[2]);
+	int test_status = 0;
+	int run_mode = 0;
+	struct timeval tv;
+	long long resTbl[MAXITER];
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	int intSnd = 0;
+	int intRec;
+	int i;
+	int sum;
 
-	 //Initialization
-	 tv.tv_sec = 0;
-	 tv.tv_usec = 100;
+	//Initialization
+	tv.tv_sec = 0;
+	tv.tv_usec = 100;
 
-	 for (i = 0; i < MAXITER; i++)
-	 	resTbl[i] = -1;
+	for (i = 0; i < MAXITER; i++)
+		resTbl[i] = -1;
 
-	 //Create both client and server handle
-     svc = svcraw_create();
+	//Create both client and server handle
+	svc = svcraw_create();
 
-     if (svc == NULL)
-     {
-          fprintf(stderr,"Could not create server handle\n");
-          exit(5);
-     }
+	if (svc == NULL) {
+		fprintf(stderr, "Could not create server handle\n");
+		exit(5);
+	}
 
-     if (!svc_register(svc, progNum, VERSNUM, (void *)serverDisp, 0))
-     {
-     	fprintf(stderr, "Error svc_register\n");
-     	exit(5);
-     }
+	if (!svc_register(svc, progNum, VERSNUM, (void *)serverDisp, 0)) {
+		fprintf(stderr, "Error svc_register\n");
+		exit(5);
+	}
 
-     clnt = clntraw_create(progNum, VERSNUM);
+	clnt = clntraw_create(progNum, VERSNUM);
 
-     if (clnt == NULL)
-     {
-          clnt_pcreateerror("raw");
-          exit(1);
-     }
+	if (clnt == NULL) {
+		clnt_pcreateerror("raw");
+		exit(1);
+	}
 
-     if (run_mode == 1)
-     {
-     	printf("CLNT %d\n", clnt);
-     	printf("SVC %d\n", svc);
-     }
+	if (run_mode == 1) {
+		printf("CLNT %d\n", clnt);
+		printf("SVC %d\n", svc);
+	}
+	//Call RPC using testing mode (raw)
+	for (i = 0; i < MAXITER; i++) {
+		intSnd = i;
 
-	 //Call RPC using testing mode (raw)
-	 for (i = 0; i < MAXITER; i++)
-	 {
-	 	intSnd = i;
+		gettimeofday(&tv1, &tz);
+		if (clnt_call
+		    (clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,
+		     (xdrproc_t) xdr_int, (char *)&intRec, tv) != RPC_SUCCESS) {
+			clnt_perror(clnt, "raw");
+			exit(1);
+		} else {
+			gettimeofday(&tv2, &tz);
+			diff =
+			    (tv2.tv_sec - tv1.tv_sec) * 1000000L +
+			    (tv2.tv_usec - tv1.tv_usec);
+			resTbl[i] = diff;
+		}
+	}
 
-     	gettimeofday(&tv1, &tz);
-     	if (clnt_call(clnt, PROCNUM, (xdrproc_t)xdr_int, (char *)&intSnd, (xdrproc_t)xdr_int, (char *)&intRec,
-       	tv) != RPC_SUCCESS)
-       	{
-          	clnt_perror(clnt, "raw");
-         	exit(1);
-     	}
-     	else
-     	{
-     		gettimeofday(&tv2, &tz);
-     		diff = (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec - tv1.tv_usec);
-     		resTbl[i] = diff;
-     	}
-     }
+	//Test all returned values, calc. average
+	for (i = 0; i < MAXITER; i++) {
+		if (resTbl[i] == -1) {
+			test_status = 1;
+			break;
+		}
+		sum += resTbl[i];
+		if (run_mode == 1)
+			fprintf(stderr, "%d\n", resTbl[i]);
+	}
+	sum = (int)(sum / MAXITER);
 
-     //Test all returned values, calc. average
-     for (i = 0; i < MAXITER; i++)
-     {
-	 	if (resTbl[i] == -1)
-	 	{
-	 		test_status = 1;
-	 		break;
-	 	}
-	 	sum += resTbl[i];
-	 	if (run_mode == 1)
-	 		fprintf(stderr, "%d\n", resTbl[i]);
-	 }
-	 sum = (int)(sum / MAXITER);
-
-     printf("%d\n", test_status);
+	printf("%d\n", test_status);
 }
 
-static void serverDisp(struct svc_req *rqstp, SVCXPRT *transp)
+static void serverDisp(struct svc_req *rqstp, SVCXPRT * transp)
 {
-     int numRec;
-     fprintf(stderr, "in server proc\n");
+	int numRec;
+	fprintf(stderr, "in server proc\n");
 
-     switch(rqstp->rq_proc) {
-     case 0:
-          if (svc_sendreply(transp, (xdrproc_t)xdr_void, 0) == FALSE) {
-               fprintf(stderr, "error in null proc\n");
-               exit(1);
-          }
-          return;
-     case PROCNUM:
-          break;
-     default:
-          svcerr_noproc(transp);
-          return;
-     }
+	switch (rqstp->rq_proc) {
+	case 0:
+		if (svc_sendreply(transp, (xdrproc_t) xdr_void, 0) == FALSE) {
+			fprintf(stderr, "error in null proc\n");
+			exit(1);
+		}
+		return;
+	case PROCNUM:
+		break;
+	default:
+		svcerr_noproc(transp);
+		return;
+	}
 
-     if (!svc_getargs(transp, (xdrproc_t)xdr_int, (char *)&numRec)) {
-          svcerr_decode(transp);
-          return;
-     }
+	if (!svc_getargs(transp, (xdrproc_t) xdr_int, (char *)&numRec)) {
+		svcerr_decode(transp);
+		return;
+	}
 
-     numRec++;
-     if (svc_sendreply(transp, (xdrproc_t)xdr_int, (char *)&numRec) == FALSE) {
-          fprintf(stderr, "error in sending answer\n");
-          exit(1);
-     }
+	numRec++;
+	if (svc_sendreply(transp, (xdrproc_t) xdr_int, (char *)&numRec) ==
+	    FALSE) {
+		fprintf(stderr, "error in sending answer\n");
+		exit(1);
+	}
 
-     return;
+	return;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/1-basic.c
index edea56d..5e716f5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/1-basic.c
@@ -42,14 +42,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
@@ -58,22 +58,20 @@
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//First of all, create a client
 	clnt = clnttcp_create(&server_addr, progNum, VERSNUM, &sock, 0, 0);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 	}
-
 	//If we are here, macro call was successful
 	test_status = (clnt != NULL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/2-stress.c
index 23c027d..09d1bf9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/2-stress.c
@@ -42,45 +42,44 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
 	struct hostent *hp = NULL;
 	int sock = RPC_ANYSOCK;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//First of all, create a client
-	for (i = 0; i < nbCall; i++)
-	{
-		clnt = clnttcp_create(&server_addr, progNum, VERSNUM, &sock, 0, 0);
-		if ((CLIENT *)clnt != NULL)
+	for (i = 0; i < nbCall; i++) {
+		clnt =
+		    clnttcp_create(&server_addr, progNum, VERSNUM, &sock, 0, 0);
+		if ((CLIENT *) clnt != NULL)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/3-limits.c
index b372838..55bac16 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/3-limits.c
@@ -42,24 +42,23 @@
 //Other define
 #define NBCASE 4
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -70,15 +69,15 @@
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
-    //Test arguments initialization
+	//Test arguments initialization
 	paramList[0].bufsnd = 1;
 	paramList[0].bufrec = 0;
 	paramList[1].bufsnd = 0;
@@ -91,22 +90,20 @@
 	sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP);
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		clnt = clnttcp_create(&server_addr, progNum, VERSNUM, &sock, paramList[i].bufsnd, paramList[i].bufrec);
+		clnt =
+		    clnttcp_create(&server_addr, progNum, VERSNUM, &sock,
+				   paramList[i].bufsnd, paramList[i].bufrec);
 
 		//Check result
-		if ((CLIENT *)clnt == NULL)
-		{
+		if ((CLIENT *) clnt == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/7-performance.c
index 1795723..327ce2b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/7-performance.c
@@ -45,8 +45,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -59,8 +58,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -73,8 +71,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -84,21 +81,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
@@ -106,53 +103,49 @@
 	int sock = RPC_ANYSOCK;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        printf("5\n 0 0 0 0\n");
-        exit(5);
-    }
+	if ((hp = gethostbyname(argc[1])) == NULL) {
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		printf("5\n 0 0 0 0\n");
+		exit(5);
+	}
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
-		clnt = clnttcp_create(&server_addr, progNum, VERSNUM, &sock, 0, 0);
+		clnt =
+		    clnttcp_create(&server_addr, progNum, VERSNUM, &sock, 0, 0);
 
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("CLIENT : %d\n", clnt);
 		}
-
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (clnt != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (clnt != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/1-basic.c
index 48c6b0b..534e2d9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/1-basic.c
@@ -42,14 +42,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
@@ -59,27 +59,27 @@
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
-
-    pertry_timeout.tv_sec = 1;
-    pertry_timeout.tv_usec = 0;
-
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
-
-	//First of all, create a client
-	clnt = clntudp_bufcreate(&server_addr, progNum, VERSNUM, pertry_timeout, &sock, 1024, 1024);
-
-	if (run_mode == 1)
-	{
-		printf("CLIENT : %d\n", clnt);
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
 	}
 
+	pertry_timeout.tv_sec = 1;
+	pertry_timeout.tv_usec = 0;
+
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
+
+	//First of all, create a client
+	clnt =
+	    clntudp_bufcreate(&server_addr, progNum, VERSNUM, pertry_timeout,
+			      &sock, 1024, 1024);
+
+	if (run_mode == 1) {
+		printf("CLIENT : %d\n", clnt);
+	}
 	//If we are here, macro call was successful
-	test_status = ((CLIENT *)clnt != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) clnt != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/3-limits.c
index cabc53a..a7030a2 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/3-limits.c
@@ -42,24 +42,23 @@
 //Other define
 #define NBCASE 2
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -71,16 +70,16 @@
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    pertry_timeout.tv_sec = 1;
-    pertry_timeout.tv_usec = 0;
+	pertry_timeout.tv_sec = 1;
+	pertry_timeout.tv_usec = 0;
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//Test initialization
 	paramList[0].bufsnd = 2147483647;
@@ -89,23 +88,21 @@
 	paramList[1].bufrec = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		clnt = clntudp_bufcreate(&server_addr, progNum, VERSNUM, pertry_timeout,
-								 &sock, paramList[i].bufsnd, paramList[i].bufrec);
+		clnt =
+		    clntudp_bufcreate(&server_addr, progNum, VERSNUM,
+				      pertry_timeout, &sock,
+				      paramList[i].bufsnd, paramList[i].bufrec);
 
 		//Check result
-		if (clnt == NULL)
-		{
+		if (clnt == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/1-basic.c
index dae2687..6861f72 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/1-basic.c
@@ -42,14 +42,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
@@ -59,25 +59,25 @@
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
-
-    pertry_timeout.tv_sec = 1;
-    pertry_timeout.tv_usec = 0;
-
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
-
-	//First of all, create a client
-	clnt = clntudp_create(&server_addr, progNum, VERSNUM, pertry_timeout, &sock);
-
-	if (run_mode == 1)
-	{
-		printf("CLIENT : %d\n", clnt);
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
 	}
 
+	pertry_timeout.tv_sec = 1;
+	pertry_timeout.tv_usec = 0;
+
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
+
+	//First of all, create a client
+	clnt =
+	    clntudp_create(&server_addr, progNum, VERSNUM, pertry_timeout,
+			   &sock);
+
+	if (run_mode == 1) {
+		printf("CLIENT : %d\n", clnt);
+	}
 	//If we are here, macro call was successful
 	test_status = (clnt != NULL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/2-stress.c
index f356af4..ca38aa0 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/2-stress.c
@@ -42,49 +42,49 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
 	struct hostent *hp = NULL;
 	struct timeval pertry_timeout;
 	int sock = RPC_ANYSOCK;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Test initialization
 	if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    pertry_timeout.tv_sec = 1;
-    pertry_timeout.tv_usec = 0;
+	pertry_timeout.tv_sec = 1;
+	pertry_timeout.tv_usec = 0;
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//First of all, create a client
-	for (i = 0; i < nbCall; i++)
-	{
-		clnt = clntudp_create(&server_addr, progNum, VERSNUM, pertry_timeout, &sock);
-		if ((CLIENT *)clnt != NULL)
+	for (i = 0; i < nbCall; i++) {
+		clnt =
+		    clntudp_create(&server_addr, progNum, VERSNUM,
+				   pertry_timeout, &sock);
+		if ((CLIENT *) clnt != NULL)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/7-performance.c
index 09393d8..54be450 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/7-performance.c
@@ -44,8 +44,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -58,8 +57,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -72,8 +70,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -83,21 +80,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	struct sockaddr_in server_addr;
@@ -106,50 +103,49 @@
 	int sock = RPC_ANYSOCK;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    if ((hp = gethostbyname(argc[1])) == NULL) {
-        fprintf(stderr, "can't get addr for %s\n",argc[1]);
-        exit(-1);
-    }
+	if ((hp = gethostbyname(argc[1])) == NULL) {
+		fprintf(stderr, "can't get addr for %s\n", argc[1]);
+		exit(-1);
+	}
 
-    pertry_timeout.tv_sec = 1;
-    pertry_timeout.tv_usec = 0;
+	pertry_timeout.tv_sec = 1;
+	pertry_timeout.tv_usec = 0;
 
-    bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr, hp->h_length);
-    server_addr.sin_family = AF_INET;
-    server_addr.sin_port = 0;
+	bcopy(hp->h_addr, (caddr_t) & server_addr.sin_addr, hp->h_length);
+	server_addr.sin_family = AF_INET;
+	server_addr.sin_port = 0;
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
-		clnt = clntudp_create(&server_addr, progNum, VERSNUM, pertry_timeout, &sock);
+		clnt =
+		    clntudp_create(&server_addr, progNum, VERSNUM,
+				   pertry_timeout, &sock);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (clnt != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (clnt != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/1-basic.c
index b193e61..c459bea 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int fd;
 	SVCXPRT *svcr = NULL;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/2-stress.c
index 82ffb04..3f10516 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svc_destroy/2-stress.c
@@ -37,24 +37,23 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int fd;
 	SVCXPRT *svcr = NULL;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//First of all, create a server
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		svcr = svcfd_create(fd, 0, 0);
 
 		//Then call destroy macro
@@ -64,8 +63,7 @@
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/1-basic.c
index b52bccd..cf6fcac 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/1-basic.c
@@ -37,22 +37,22 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
-	int fd=0;
+	int test_status = 1;	//Default test result set to FAILED
+	int fd = 0;
 	SVCXPRT *svcr = NULL;
 
 	//create a server
 	svcr = svcfd_create(fd, 0, 0);
 
 	//check returned value
-	test_status = ((SVCXPRT *)svcr != NULL) ? 0 : 1;
+	test_status = ((SVCXPRT *) svcr != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/3-limits.c
index 0ecc3f4..7c9b8b0 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcfd_create/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 4
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -72,22 +71,19 @@
 	paramList[3].bufrec = 0;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		svcr = svcfd_create(fd, paramList[i].bufsnd, paramList[i].bufrec);
+		svcr =
+		    svcfd_create(fd, paramList[i].bufsnd, paramList[i].bufrec);
 
 		//Check result
-		if (svcr == NULL)
-		{
+		if (svcr == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/1-basic.c
index 6f7945c..2a8cf22 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	SVCXPRT *svcr = NULL;
 
 	//create a server
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/7-performance.c
index 9abca66..b2b983f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcraw_create/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,30 +79,29 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	SVCXPRT *svcr = NULL;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
@@ -116,22 +112,20 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (svcr != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (svcr != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/1-basic.c
index af67854..3142212 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/2-stress.c
index 5f0bfbc..241ffd7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/2-stress.c
@@ -40,33 +40,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//create a server
 	sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP);
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		svcr = svctcp_create(sock, 0, 0);
 		if (svcr != NULL)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/3-limits.c
index 65aefc0..4b601da 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 4
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -74,22 +73,20 @@
 	sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP);
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		svcr = svctcp_create(sock, paramList[i].bufsnd, paramList[i].bufrec);
+		svcr =
+		    svctcp_create(sock, paramList[i].bufsnd,
+				  paramList[i].bufrec);
 
 		//Check result
-		if (svcr == NULL)
-		{
+		if (svcr == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/7-performance.c
index 7ded5c6..a9e8532 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,33 +79,32 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
-    int sock = 600;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
+	int sock = 600;
 	SVCXPRT *svcr = NULL;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP);
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
@@ -119,22 +115,20 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (svcr != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (svcr != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/1-basic.c
index 549bde6..4e9955b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
 
@@ -57,7 +57,7 @@
 	svcr = svcudp_bufcreate(sock, 1500, 1500);
 
 	//check returned value
-	test_status = ((SVCXPRT *)svcr != NULL) ? 0 : 1;
+	test_status = ((SVCXPRT *) svcr != NULL) ? 0 : 1;
 
 	//clean up
 	svc_destroy(svcr);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/3-limits.c
index 01a69b8..b487d2b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_bufcreate/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 4
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -74,22 +73,20 @@
 	sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP);
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		svcr = svcudp_bufcreate(sock, paramList[i].bufsnd, paramList[i].bufrec);
+		svcr =
+		    svcudp_bufcreate(sock, paramList[i].bufsnd,
+				     paramList[i].bufrec);
 
 		//Check result
-		if (svcr == NULL)
-		{
+		if (svcr == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/1-basic.c
index c40eeab..ae2a2cc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/2-stress.c
index 6bcb210..3b6b640 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/2-stress.c
@@ -40,34 +40,32 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//create a server
 	//
 	sock = socket(AF_UNIX, SOCK_SEQPACKET, IPPROTO_UDP);
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		svcr = svcudp_create(sock);
 		if (svcr != NULL)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/7-performance.c
index 609024d..bf2e040 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,33 +79,32 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int sock = 600;
 	SVCXPRT *svcr = NULL;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    sock = socket(AF_UNIX, SOCK_SEQPACKET, IPPROTO_UDP);
+	sock = socket(AF_UNIX, SOCK_SEQPACKET, IPPROTO_UDP);
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
@@ -119,22 +115,20 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (svcr != NULL)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    	}
+		if (svcr != NULL) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_pcreateerror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_pcreateerror/1-basic.c
index e733a11..f8c1782 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_pcreateerror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_pcreateerror/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	char nettype[8] = "udp";
@@ -55,8 +55,8 @@
 
 	clnt_pcreateerror("#SUCCESS");
 
-    //If we are here, test has passed
-    test_status = 0;
+	//If we are here, test has passed
+	test_status = 0;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perrno/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perrno/1-basic.c
index b9d45e8..e9d09c5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perrno/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perrno/1-basic.c
@@ -39,42 +39,38 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "udp";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&recVar, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	clnt_perrno(rslt);
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ clnt_perrno(rslt);
 
 	//If we are here, test has passed
 	test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perror/1-basic.c
index 18dcd20..7f41c4e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_perror/1-basic.c
@@ -39,42 +39,38 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "udp";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_void, NULL, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	clnt_perror(clnt, "#SUCCESS");
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_void, NULL,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ clnt_perror(clnt, "#SUCCESS");
 
 	//If we are here, test has passed
 	test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_spcreateerror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_spcreateerror/1-basic.c
index 3fd6e67..115a4d9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_spcreateerror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_spcreateerror/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	char nettype[8] = "udp";
@@ -56,8 +56,8 @@
 
 	rslt = clnt_spcreateerror("#SUCCESS");
 
-    //If we are here, test has passed
-    test_status = (rslt == NULL);
+	//If we are here, test has passed
+	test_status = (rslt == NULL);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperrno/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperrno/1-basic.c
index 6352a29..3ccfe09 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperrno/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperrno/1-basic.c
@@ -39,43 +39,39 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "udp";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
-    char *chrRslt = NULL;
+	int recVar = -1;
+	struct timeval total_timeout;
+	char *chrRslt = NULL;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&recVar, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	chrRslt = clnt_sperrno(rslt);
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ chrRslt = clnt_sperrno(rslt);
 
 	//If we are here, test has passed
 	test_status = (chrRslt == NULL);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperror/1-basic.c
index 8289991..14e1799 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_clnt_sperror/1-basic.c
@@ -39,43 +39,39 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "udp";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
-    char *chrRslt = NULL;
+	int recVar = -1;
+	struct timeval total_timeout;
+	char *chrRslt = NULL;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_void, NULL, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	chrRslt = clnt_sperror(clnt, "#SUCCESS");
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_void, NULL,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ chrRslt = clnt_sperror(clnt, "#SUCCESS");
 
 	//If we are here, test has passed
 	test_status = (chrRslt == NULL);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_auth/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_auth/1-basic.c
index 3098111..27e5cd7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_auth/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_auth/1-basic.c
@@ -37,37 +37,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 	char nettype[8] = "udp";
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 	}
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-	client = clnt_create(argc[1], progNum, VERSNUM, nettype);/* Call AuthErr RP */
+	client = clnt_create(argc[1], progNum, VERSNUM, nettype);	/* Call AuthErr RP */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_AUTHERROR) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noproc/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noproc/1-basic.c
index e4dc5ac..ab1c058 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noproc/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noproc/1-basic.c
@@ -40,25 +40,24 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 	char nettype[8] = "udp";
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 	}
 
@@ -68,10 +67,9 @@
 	client = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	cs = clnt_call((CLIENT *)client, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&var_snd,  // xdr_in
-                   (xdrproc_t)xdr_int, (char *)&var_snd,  // xdr_out
-				   tv);
+	cs = clnt_call((CLIENT *) client, PROCNUM, (xdrproc_t) xdr_int, (char *)&var_snd,	// xdr_in
+		       (xdrproc_t) xdr_int, (char *)&var_snd,	// xdr_out
+		       tv);
 
 	test_status = (cs == RPC_PROCUNAVAIL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noprog/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noprog/1-basic.c
index 6ed8905..32f9b07 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noprog/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_noprog/1-basic.c
@@ -37,22 +37,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int var_snd = 0;
 
 	//Then call remote procedure
-	cs = callrpc (argc[1], 667, VERSNUM, PROCNUM,
-	              (xdrproc_t)xdr_int, (char *)&var_snd,  // xdr_in
-                  (xdrproc_t)xdr_int, (char *)&var_snd); // xdr_out
+	cs = callrpc(argc[1], 667, VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&var_snd,	// xdr_in
+		     (xdrproc_t) xdr_int, (char *)&var_snd);	// xdr_out
 
 	test_status = (cs != RPC_PROGNOTREGISTERED);
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_progvers/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_progvers/1-basic.c
index 006a94d..fa57f7d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_progvers/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_progvers/1-basic.c
@@ -37,37 +37,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 	char nettype[8] = "udp";
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 	}
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-	client = clnt_create(argc[1], progNum, VERSNUM, nettype); /* Call wrong version RP */
+	client = clnt_create(argc[1], progNum, VERSNUM, nettype);	/* Call wrong version RP */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_PROGVERSMISMATCH) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_systemerr/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_systemerr/1-basic.c
index 0bc4ad7..4a6a039 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_systemerr/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_systemerr/1-basic.c
@@ -37,37 +37,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 	char nettype[8] = "udp";
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 	}
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-	client = clnt_create(argc[1], progNum, VERSNUM, nettype);/* Call SysErr RP */
+	client = clnt_create(argc[1], progNum, VERSNUM, nettype);	/* Call SysErr RP */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_SYSTEMERROR) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_weakauth/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_weakauth/1-basic.c
index 2a59626..f8a1e08 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_weakauth/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_err_svcerr_weakauth/1-basic.c
@@ -37,37 +37,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 	char nettype[8] = "udp";
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 	}
 
 	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
-	client = clnt_create(argc[1], progNum, VERSNUM, nettype);/* Call WeakAuthErr RP */
+	client = clnt_create(argc[1], progNum, VERSNUM, nettype);	/* Call WeakAuthErr RP */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_AUTHERROR) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_registerrpc/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_registerrpc/1-basic.c
index b1f90c2..6ab1e23 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_registerrpc/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_registerrpc/1-basic.c
@@ -40,24 +40,24 @@
 
 char *simplePing(char *i_var)
 {
-        //Simple function, returns what received
-        static int result = 0;
-        result = *i_var;
-        return (char *)&result;
+	//Simple function, returns what received
+	static int result = 0;
+	result = *i_var;
+	return (char *)&result;
 
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *svcr = NULL;
 	int rslt;
@@ -68,10 +68,11 @@
 	svcr = svcudp_create(RPC_ANYSOCK);
 
 	//call routine
-	rslt = registerrpc(progNum, VERSNUM, PROCNUM, simplePing, xdr_int, xdr_int);
+	rslt =
+	    registerrpc(progNum, VERSNUM, PROCNUM, simplePing, xdr_int,
+			xdr_int);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("SVC : %d\n", svcr);
 		printf("rslt : %d\n", rslt);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_register/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_register/1-basic.c
index bfbbf29..dccac86 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_register/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_register/1-basic.c
@@ -37,19 +37,19 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-void dispatch(struct svc_req *request, SVCXPRT *xprt);
+void dispatch(struct svc_req *request, SVCXPRT * xprt);
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *svcr = NULL;
 	int sock = 0;
@@ -60,13 +60,12 @@
 	svcr = svctcp_create(RPC_ANYSOCK, 0, 0);
 
 	//call routine
-	test_status = !svc_register(svcr, progNum, VERSNUM, dispatch, IPPROTO_TCP);
+	test_status =
+	    !svc_register(svcr, progNum, VERSNUM, dispatch, IPPROTO_TCP);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("SVC : %d\n", svcr);
 	}
-
 	//clean up
 	svc_destroy(svcr);
 
@@ -77,6 +76,6 @@
 	return test_status;
 }
 
-void dispatch(struct svc_req *request, SVCXPRT *xprt)
+void dispatch(struct svc_req *request, SVCXPRT * xprt)
 {
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_unregister/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_unregister/1-basic.c
index ff495f8..79194ec 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_unregister/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_svc_unregister/1-basic.c
@@ -37,19 +37,19 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-void dispatch(struct svc_req *request, SVCXPRT *xprt);
+void dispatch(struct svc_req *request, SVCXPRT * xprt);
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *svcr = NULL;
 	int sock = 0;
@@ -61,11 +61,9 @@
 
 	svc_register(svcr, progNum, VERSNUM, dispatch, IPPROTO_TCP);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("SVC : %d\n", svcr);
 	}
-
 	//call routine
 	svc_unregister(progNum, VERSNUM);
 
@@ -82,6 +80,6 @@
 	return test_status;
 }
 
-void dispatch(struct svc_req *request, SVCXPRT *xprt)
+void dispatch(struct svc_req *request, SVCXPRT * xprt)
 {
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_register/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_register/1-basic.c
index d4b89eb..1eb76fc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_register/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_register/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	SVCXPRT *svcr = NULL;
 	int fd = 0;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_unregister/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_unregister/1-basic.c
index 26fa9c1..1d7151c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_unregister/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_regunreg_xprt_unregister/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	SVCXPRT *svcr = NULL;
 	int fd = 0;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/1-basic.c
index 69c3be9..fd78bcf 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/1-basic.c
@@ -37,28 +37,27 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
 	cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varRec);
+		     (xdrproc_t) xdr_int, (char *)&varSnd,
+		     (xdrproc_t) xdr_int, (char *)&varRec);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/2-stress.c
index 103e40a..4621112 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/2-stress.c
@@ -37,42 +37,39 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-					   (xdrproc_t)xdr_int, (char *)&varSnd,
-					   (xdrproc_t)xdr_int, (char *)&varRec);
+			     (xdrproc_t) xdr_int, (char *)&varSnd,
+			     (xdrproc_t) xdr_int, (char *)&varRec);
 
 		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/5-scalability.c
index 36e548b..b89e734 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/5-scalability.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,40 +79,39 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   	 (xdrproc_t)xdr_int, (char *)&varSnd,
-				   	 (xdrproc_t)xdr_int, (char *)&varRec);
+			     (xdrproc_t) xdr_int, (char *)&varSnd,
+			     (xdrproc_t) xdr_int, (char *)&varRec);
 
 		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
@@ -124,23 +120,21 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/6-dataint.c
index f003b1e..8e12cf8 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/6-dataint.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	//Sent variables
@@ -68,8 +68,8 @@
 	intSnd = -65536;
 
 	callrpc(argc[1], progNum, VERSNUM, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec);
+		(xdrproc_t) xdr_int, (char *)&intSnd,
+		(xdrproc_t) xdr_int, (char *)&intRec);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -80,8 +80,8 @@
 	intSnd = 16777216;
 
 	callrpc(argc[1], progNum, VERSNUM, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec);
+		(xdrproc_t) xdr_int, (char *)&intSnd,
+		(xdrproc_t) xdr_int, (char *)&intRec);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -92,8 +92,8 @@
 	lngSnd = -430000;
 
 	callrpc(argc[1], progNum, VERSNUM, LNGPROCNUM,
-				   (xdrproc_t)xdr_long, (char *)&lngSnd,
-				   (xdrproc_t)xdr_long, (char *)&lngRec);
+		(xdrproc_t) xdr_long, (char *)&lngSnd,
+		(xdrproc_t) xdr_long, (char *)&lngRec);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -104,8 +104,8 @@
 	dblSnd = -1735.63000f;
 
 	callrpc(argc[1], progNum, VERSNUM, DBLPROCNUM,
-				   (xdrproc_t)xdr_double, (char *)&dblSnd,
-				   (xdrproc_t)xdr_double, (char *)&dblRec);
+		(xdrproc_t) xdr_double, (char *)&dblSnd,
+		(xdrproc_t) xdr_double, (char *)&dblRec);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -117,8 +117,8 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	callrpc(argc[1], progNum, VERSNUM, STRPROCNUM,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strRec);
+		(xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		(xdrproc_t) xdr_wrapstring, (char *)&strRec);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/7-performance.c
index 04fceb8..e12d3f3 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_callrpc/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,40 +79,39 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 10;
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   	 (xdrproc_t)xdr_int, (char *)&varSnd,
-				   	 (xdrproc_t)xdr_int, (char *)&varRec);
+			     (xdrproc_t) xdr_int, (char *)&varSnd,
+			     (xdrproc_t) xdr_int, (char *)&varRec);
 
 		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
@@ -124,23 +120,21 @@
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/1-basic.c
index 5aa5e52..790085e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -60,24 +60,21 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 		printf("progNum : %d\n", progNum);
 		printf("Proto : %s\n", proto);
 	}
 
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("1\n");
 		return 1;
 	}
 
 	cs = clnt_call(clnt, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varRec,
-				   to);
+		       (xdrproc_t) xdr_int, (char *)&varSnd,
+		       (xdrproc_t) xdr_int, (char *)&varRec, to);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/2-stress.c
index e2a1841..6f1c9d1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/2-stress.c
@@ -37,15 +37,15 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -53,7 +53,7 @@
 	struct timeval to;
 	int varSnd = 10;
 	int varRec = -1;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
@@ -64,33 +64,28 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 		printf("progNum : %d\n", progNum);
 		printf("Proto : %s\n", proto);
 	}
 
-	if ((CLIENT *)clnt == NULL)
-	{
+	if ((CLIENT *) clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("1\n");
 		return 1;
 	}
 
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		cs = clnt_call(clnt, PROCNUM,
-					   (xdrproc_t)xdr_int, (char *)&varSnd,
-					   (xdrproc_t)xdr_int, (char *)&varRec,
-					   to);
+			       (xdrproc_t) xdr_int, (char *)&varSnd,
+			       (xdrproc_t) xdr_int, (char *)&varRec, to);
 		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
 	//If we are here, macro call was successful
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/5-scalability.c
index 521e447..4d3f9e8 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/5-scalability.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -54,21 +53,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -78,55 +77,49 @@
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 	to.tv_sec = 1;
 	to.tv_usec = 100;
 
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("5\n");
 		return 5;
 	}
-
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_call(clnt, PROCNUM,
-				   		(xdrproc_t)xdr_int, (char *)&varSnd,
-				   		(xdrproc_t)xdr_int, (char *)&varRec,
-				   		to);
+			       (xdrproc_t) xdr_int, (char *)&varSnd,
+			       (xdrproc_t) xdr_int, (char *)&varRec, to);
 
-    	if (cs != RPC_SUCCESS)
+		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/6-dataint.c
index 0e8b5f0..041c78c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/6-dataint.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -71,28 +71,24 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 		printf("progNum : %d\n", progNum);
 		printf("Proto : %s\n", proto);
 	}
 
-	if ((CLIENT *)clnt == NULL)
-	{
+	if ((CLIENT *) clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("1\n");
 		return 1;
 	}
-
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
 	cs = clnt_call(clnt, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec,
-				   to);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, to);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -103,9 +99,8 @@
 	intSnd = 16777216;
 
 	cs = clnt_call(clnt, INTPROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&intSnd,
-				   (xdrproc_t)xdr_int, (char *)&intRec,
-				   to);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, to);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -116,9 +111,8 @@
 	lngSnd = -430000;
 
 	cs = clnt_call(clnt, LNGPROCNUM,
-				   (xdrproc_t)xdr_long, (char *)&lngSnd,
-				   (xdrproc_t)xdr_long, (char *)&lngRec,
-				   to);
+		       (xdrproc_t) xdr_long, (char *)&lngSnd,
+		       (xdrproc_t) xdr_long, (char *)&lngRec, to);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -129,9 +123,8 @@
 	dblSnd = -1735.63000f;
 
 	cs = clnt_call(clnt, DBLPROCNUM,
-				   (xdrproc_t)xdr_double, (char *)&dblSnd,
-				   (xdrproc_t)xdr_double, (char *)&dblRec,
-				   to);
+		       (xdrproc_t) xdr_double, (char *)&dblSnd,
+		       (xdrproc_t) xdr_double, (char *)&dblRec, to);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -143,9 +136,8 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	cs = clnt_call(clnt, STRPROCNUM,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-				   (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-				   to);
+		       (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		       (xdrproc_t) xdr_wrapstring, (char *)&strRec, to);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/7-performance.c
index b886fe4..15d068c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,21 +79,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -106,55 +103,49 @@
 	int varRec = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 	to.tv_sec = 1;
 	to.tv_usec = 100;
 
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("5\n");
 		return 5;
 	}
-
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_call(clnt, PROCNUM,
-				   		(xdrproc_t)xdr_int, (char *)&varSnd,
-				   		(xdrproc_t)xdr_int, (char *)&varRec,
-				   		to);
+			       (xdrproc_t) xdr_int, (char *)&varSnd,
+			       (xdrproc_t) xdr_int, (char *)&varRec, to);
 
-    	if (cs != RPC_SUCCESS)
+		if (cs != RPC_SUCCESS)
 			clnt_perrno(cs);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/8-complex.c
index 015663b..f73a72e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_call/8-complex.c
@@ -38,24 +38,21 @@
 
 #define MAXCALC 100
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -66,14 +63,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -91,22 +88,19 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 		printf("progNum : %d\n", progNum);
 		printf("Proto : %s\n", proto);
 	}
 
-	if ((CLIENT *)clnt == NULL)
-	{
+	if ((CLIENT *) clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("1\n");
 		return 1;
 	}
 
-	for (i = 0; i < MAXCALC; i++)
-	{
+	for (i = 0; i < MAXCALC; i++) {
 		vars.a = getRand();
 		vars.b = getRand();
 		vars.c = getRand();
@@ -114,21 +108,22 @@
 		resTbl[i].locRes = vars.a + (vars.b * vars.c);
 
 		cs = clnt_call(clnt, CALCPROC,
-				   		(xdrproc_t)xdr_datas, (char *)&vars,
-				   		(xdrproc_t)xdr_double, (char *)&resTbl[i].svcRes,
-				   		to);
+			       (xdrproc_t) xdr_datas, (char *)&vars,
+			       (xdrproc_t) xdr_double,
+			       (char *)&resTbl[i].svcRes, to);
 
-		if (resTbl[i].locRes != resTbl[i].svcRes)
-		{
+		if (resTbl[i].locRes != resTbl[i].svcRes) {
 			test_status = 1;
 			break;
 		}
 
-		if (run_mode == 1)
-		{
-			fprintf(stderr, "value sent : %lf, %lf, %lf\n", vars.a, vars.b, vars.c);
-			fprintf(stderr, "value localy calculated : %lf\n", resTbl[i].locRes);
-			fprintf(stderr, "value from server : %lf\n", resTbl[i].svcRes);
+		if (run_mode == 1) {
+			fprintf(stderr, "value sent : %lf, %lf, %lf\n", vars.a,
+				vars.b, vars.c);
+			fprintf(stderr, "value localy calculated : %lf\n",
+				resTbl[i].locRes);
+			fprintf(stderr, "value from server : %lf\n",
+				resTbl[i].svcRes);
 		}
 	}
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/1-basic.c
index 99e54b4..c81ec3f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -53,11 +53,9 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 	}
-
 	//If we are here, macro call was successful
 	test_status = !clnt_control(clnt, CLGET_FD, (char *)&fd);
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/6-dataint.c
index a391c47..f5ff4da 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_control/6-dataint.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -54,8 +54,7 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("CLIENT : %d\n", clnt);
 	}
 
@@ -68,10 +67,11 @@
 	if ((tvSet.tv_sec != tvGet.tv_sec) || (tvSet.tv_usec != tvGet.tv_usec))
 		test_status = 1;
 
-	if (run_mode)
-	{
-		printf("Time Set : %d sec %d usec\n", tvSet.tv_sec, tvSet.tv_usec);
-		printf("Time Get : %d sec %d usec\n", tvGet.tv_sec, tvGet.tv_usec);
+	if (run_mode) {
+		printf("Time Set : %d sec %d usec\n", tvSet.tv_sec,
+		       tvSet.tv_usec);
+		printf("Time Get : %d sec %d usec\n", tvGet.tv_sec,
+		       tvGet.tv_usec);
 	}
 
 	tvSet.tv_sec = 4000;
@@ -83,12 +83,12 @@
 	if ((tvSet.tv_sec != tvGet.tv_sec) || (tvSet.tv_usec != tvGet.tv_usec))
 		test_status = 1;
 
-	if (run_mode)
-	{
-		printf("Time Set : %d sec %d usec\n", tvSet.tv_sec, tvSet.tv_usec);
-		printf("Time Get : %d sec %d usec\n", tvGet.tv_sec, tvGet.tv_usec);
+	if (run_mode) {
+		printf("Time Set : %d sec %d usec\n", tvSet.tv_sec,
+		       tvSet.tv_usec);
+		printf("Time Get : %d sec %d usec\n", tvGet.tv_sec,
+		       tvGet.tv_usec);
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_freeres/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_freeres/1-basic.c
index de4a74f..d7fcaa9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_freeres/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_freeres/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -59,26 +59,23 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 		printf("progNum : %d\n", progNum);
 		printf("Proto : %s\n", proto);
 	}
 
-	if ((CLIENT *)clnt == NULL)
-	{
+	if ((CLIENT *) clnt == NULL) {
 		clnt_pcreateerror("err");
 		printf("1\n");
 		return 1;
 	}
 
 	cs = clnt_call(clnt, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   to);
+		       (xdrproc_t) xdr_int, (char *)&varSnd,
+		       (xdrproc_t) xdr_int, (char *)&varSnd, to);
 
-	test_status = !clnt_freeres(clnt, (xdrproc_t)xdr_int, (char *)&varSnd);
+	test_status = !clnt_freeres(clnt, (xdrproc_t) xdr_int, (char *)&varSnd);
 
 	if (cs != RPC_SUCCESS)
 		clnt_perrno(cs);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_geterr/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_geterr/1-basic.c
index a260972..c4cac51 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_geterr/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_clnt_geterr/1-basic.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char proto[8] = "udp";
 	CLIENT *clnt = NULL;
@@ -53,11 +53,9 @@
 	//First of all, create a client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, proto);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("CLIENT : %d\n", clnt);
 	}
-
 	//Call tested routine
 	clnt_geterr(clnt, &err);
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/1-basic.c
index 6403f4e..aed9fe5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/1-basic.c
@@ -37,27 +37,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 1;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
 	cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varSnd);
+		     (xdrproc_t) xdr_int, (char *)&varSnd,
+		     (xdrproc_t) xdr_int, (char *)&varSnd);
 
 	//test_status = varSnd;
 
@@ -68,5 +67,5 @@
 	//normally should be 0: test has passed or 1: test has failed
 	//printf("%d\n", test_status);
 
-	tst_exit();//test_status;
+	tst_exit();		//test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/svc.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/svc.c
index 8937279..da8e4b4 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/svc.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_freeargs/svc.c
@@ -35,8 +35,8 @@
 #define PROCSIMPLEPING	1
 #define SVCGETCALLTEST	2
 
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp);
-char *simplePing(int inVar, SVCXPRT *transp);
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp);
+char *simplePing(int inVar, SVCXPRT * transp);
 
 static int argument;
 
@@ -46,8 +46,8 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
@@ -59,24 +59,23 @@
 	//Initialization
 	pmap_unset(progNum, VERSNUM);
 
-    //registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
-    //    		simplePing, xdr_int, xdr_int);
-    transpUDP = svcudp_create(RPC_ANYSOCK);
+	//registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
+	//                  simplePing, xdr_int, xdr_int);
+	transpUDP = svcudp_create(RPC_ANYSOCK);
 
-    if (run_mode)
-    {
-    	printf ("SVC TCP : %d\n", transpUDP);
-    }
+	if (run_mode) {
+		printf("SVC TCP : %d\n", transpUDP);
+	}
 
-	if (!svc_register(transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP))
-	{
-    	fprintf(stderr, "svc_register: error (TCP)\n");
-    }
+	if (!svc_register
+	    (transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP)) {
+		fprintf(stderr, "svc_register: error (TCP)\n");
+	}
 
-    svc_run();
-    fprintf(stderr, "Error: svc_run returned!\n");
-    //Test has failed if we are here
-    printf("1\n");
+	svc_run();
+	fprintf(stderr, "Error: svc_run returned!\n");
+	//Test has failed if we are here
+	printf("1\n");
 
 	return 1;
 }
@@ -84,7 +83,7 @@
 //****************************************//
 //***        Remotes Procedures        ***//
 //****************************************//
-char *simplePing(int inVar, SVCXPRT *transp)
+char *simplePing(int inVar, SVCXPRT * transp)
 {
 	static int result;
 	result = inVar;
@@ -94,46 +93,41 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp)
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp)
 {
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(int , SVCXPRT *);
+	char *(*proc) (int, SVCXPRT *);
 	int test_status = 1;
 
-    switch (rqstp->rq_proc)
-    {
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(int, SVCXPRT *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(int, SVCXPRT *))simplePing;
 			break;
 		}
-    }
+	}
 
-    memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	memset((char *)&argument, (int)0, sizeof(argument));
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)(argument, transp);
+	result = (char *)(*proc) (argument, transp);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
-	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		//Test has failed
 		test_status = 1;
-	}
-	else
-	{
+	} else {
 		//Test succeeds
 		test_status = 0;
 	}
@@ -142,5 +136,5 @@
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-	exit (test_status);
+	exit(test_status);
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/1-basic.c
index e69bc5f..4743a1c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/1-basic.c
@@ -35,8 +35,8 @@
 #define PROCSIMPLEPING	1
 #define SVCGETCALLTEST	2
 
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp);
-char *simplePing(int inVar, SVCXPRT *transp);
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp);
+char *simplePing(int inVar, SVCXPRT * transp);
 
 static int argument;
 
@@ -46,8 +46,8 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
@@ -59,24 +59,23 @@
 	//Initialization
 	pmap_unset(progNum, VERSNUM);
 
-    //registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
-    //    		simplePing, xdr_int, xdr_int);
-    transpUDP = svcudp_create(RPC_ANYSOCK);
+	//registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
+	//                  simplePing, xdr_int, xdr_int);
+	transpUDP = svcudp_create(RPC_ANYSOCK);
 
-    if (run_mode)
-    {
-    	printf ("SVC TCP : %d\n", transpUDP);
-    }
+	if (run_mode) {
+		printf("SVC TCP : %d\n", transpUDP);
+	}
 
-	if (!svc_register(transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP))
-	{
-    	fprintf(stderr, "svc_register: error (TCP)\n");
-    }
+	if (!svc_register
+	    (transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP)) {
+		fprintf(stderr, "svc_register: error (TCP)\n");
+	}
 
-    svc_run();
-    fprintf(stderr, "Error: svc_run returned!\n");
-    //Test has failed if we are here
-    printf("1\n");
+	svc_run();
+	fprintf(stderr, "Error: svc_run returned!\n");
+	//Test has failed if we are here
+	printf("1\n");
 
 	return 1;
 }
@@ -84,7 +83,7 @@
 //****************************************//
 //***        Remotes Procedures        ***//
 //****************************************//
-char *simplePing(int inVar, SVCXPRT *transp)
+char *simplePing(int inVar, SVCXPRT * transp)
 {
 	static int result;
 	result = inVar;
@@ -94,52 +93,46 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp)
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp)
 {
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(int , SVCXPRT *);
+	char *(*proc) (int, SVCXPRT *);
 	int test_status = 1;
 
-    switch (rqstp->rq_proc)
-    {
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(int, SVCXPRT *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(int, SVCXPRT *))simplePing;
 			break;
 		}
-    }
+	}
 
-    memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	memset((char *)&argument, (int)0, sizeof(argument));
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		//Test has failed
 		test_status = 1;
-	}
-	else
-	{
+	} else {
 		//Test succeeds
 		test_status = 0;
 	}
 
-	result = (char *)(*proc)(argument, transp);
+	result = (char *)(*proc) (argument, transp);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
-	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-	exit (test_status);
+	exit(test_status);
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/6-dataint.c
index a1a5903..73c0b51 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/6-dataint.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
 	//Sent variables
 	int intSnd;
@@ -60,8 +60,8 @@
 	intSnd = 1;
 
 	callrpc(argc[1], progNum, VERSNUM, SVCGETARGSPROC,
-			(xdrproc_t)xdr_int, (char *)&intSnd,
-			(xdrproc_t)xdr_int, (char *)&intRec);
+		(xdrproc_t) xdr_int, (char *)&intSnd,
+		(xdrproc_t) xdr_int, (char *)&intRec);
 
 	if (intSnd != intRec)
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/client.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/client.c
index 6403f4e..aed9fe5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/client.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getargs/client.c
@@ -37,27 +37,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 1;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
 	cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varSnd);
+		     (xdrproc_t) xdr_int, (char *)&varSnd,
+		     (xdrproc_t) xdr_int, (char *)&varSnd);
 
 	//test_status = varSnd;
 
@@ -68,5 +67,5 @@
 	//normally should be 0: test has passed or 1: test has failed
 	//printf("%d\n", test_status);
 
-	tst_exit();//test_status;
+	tst_exit();		//test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getcaller/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getcaller/1-basic.c
index 4a55ae8..6f9294d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getcaller/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_getcaller/1-basic.c
@@ -37,27 +37,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 1;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
 	cs = callrpc((const char *)argc[1], progNum, VERSNUM, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varSnd);
+		     (xdrproc_t) xdr_int, (char *)&varSnd,
+		     (xdrproc_t) xdr_int, (char *)&varSnd);
 
 	test_status = varSnd;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/1-basic.c
index cb6aa47..e827989 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/1-basic.c
@@ -35,8 +35,8 @@
 #define PROCSIMPLEPING	1
 #define SVCGETCALLTEST	2
 
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp);
-char *simplePing(int inVar, SVCXPRT *transp);
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp);
+char *simplePing(int inVar, SVCXPRT * transp);
 
 static int argument;
 
@@ -46,8 +46,8 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
@@ -59,24 +59,23 @@
 	//Initialization
 	pmap_unset(progNum, VERSNUM);
 
-    //registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
-    //    		simplePing, xdr_int, xdr_int);
-    transpUDP = svcudp_create(RPC_ANYSOCK);
+	//registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
+	//                  simplePing, xdr_int, xdr_int);
+	transpUDP = svcudp_create(RPC_ANYSOCK);
 
-    if (run_mode)
-    {
-    	printf ("SVC TCP : %d\n", transpUDP);
-    }
+	if (run_mode) {
+		printf("SVC TCP : %d\n", transpUDP);
+	}
 
-	if (!svc_register(transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP))
-	{
-    	fprintf(stderr, "svc_register: error (TCP)\n");
-    }
+	if (!svc_register
+	    (transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP)) {
+		fprintf(stderr, "svc_register: error (TCP)\n");
+	}
 
-    svc_run();
-    fprintf(stderr, "Error: svc_run returned!\n");
-    //Test has failed if we are here
-    printf("1\n");
+	svc_run();
+	fprintf(stderr, "Error: svc_run returned!\n");
+	//Test has failed if we are here
+	printf("1\n");
 
 	return 1;
 }
@@ -84,7 +83,7 @@
 //****************************************//
 //***        Remotes Procedures        ***//
 //****************************************//
-char *simplePing(int inVar, SVCXPRT *transp)
+char *simplePing(int inVar, SVCXPRT * transp)
 {
 	static int result;
 	result = inVar;
@@ -94,52 +93,46 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp)
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp)
 {
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(int , SVCXPRT *);
+	char *(*proc) (int, SVCXPRT *);
 	int test_status = 1;
 
-    switch (rqstp->rq_proc)
-    {
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(int, SVCXPRT *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(int, SVCXPRT *))simplePing;
 			break;
 		}
-    }
+	}
 
-    memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	memset((char *)&argument, (int)0, sizeof(argument));
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 
 	}
 
-	result = (char *)(*proc)(argument, transp);
+	result = (char *)(*proc) (argument, transp);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		//Test has failed
 		test_status = 1;
-	}
-	else
-	{
+	} else {
 		//Test succeeds
 		test_status = 0;
 	}
-	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-	exit (test_status);
+	exit(test_status);
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/client.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/client.c
index 6403f4e..aed9fe5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/client.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/rpc/rpc_stdcall_svc_sendreply/client.c
@@ -37,27 +37,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	int varSnd = 1;
 
 	//Initialization
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 	}
 
 	cs = callrpc(argc[1], progNum, VERSNUM, PROCNUM,
-				   (xdrproc_t)xdr_int, (char *)&varSnd,
-				   (xdrproc_t)xdr_int, (char *)&varSnd);
+		     (xdrproc_t) xdr_int, (char *)&varSnd,
+		     (xdrproc_t) xdr_int, (char *)&varSnd);
 
 	//test_status = varSnd;
 
@@ -68,5 +67,5 @@
 	//normally should be 0: test has passed or 1: test has failed
 	//printf("%d\n", test_status);
 
-	tst_exit();//test_status;
+	tst_exit();		//test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/1-basic.c
index 7ce4fbd..748c310 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/1-basic.c
@@ -43,40 +43,36 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 
 	//Initialization
 	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("Host : %s\n", argc[1]);
 		printf("ProgNum : %d\n", progNum);
 	}
 
 	/* Returns a pointer to nconf corresponding to NETCONF */
-	if ((nconf = getnetconfigent("udp")) ==
-               (struct netconfig *)NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == (struct netconfig *)NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
-  	test_status = !rpcb_getaddr(progNum, VERSNUM, nconf,
-                                &svcaddr, argc[1]);
+	test_status = !rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1]);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/3-limits.c
index f9d7dfd..e25834b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getaddr/3-limits.c
@@ -43,40 +43,34 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 
 	//Test initialization
 	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if ((nconf = getnetconfigent("udp")) ==
-               (struct netconfig *)NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	printf("5\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == (struct netconfig *)NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		printf("5\n");
+		exit(1);
 	}
-
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Check result
-		if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                          &svcaddr, argc[1]))
-		{
+		if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getmaps/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getmaps/1-basic.c
index cf5ea7d..8274d4c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getmaps/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_addrmanagmt_rpcb_getmaps/1-basic.c
@@ -43,41 +43,37 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	struct netconfig *nconf = NULL;
-    rpcblist *rl = NULL;
+	rpcblist *rl = NULL;
 
 	//Initialization
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("Host : %s\n", argc[1]);
 		printf("ProgNum : %d\n", progNum);
 		printf("RList @ %d\n", rl);
 	}
 
-	if ((nconf = getnetconfigent("udp")) ==
-               (struct netconfig *)NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == (struct netconfig *)NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
 	rl = rpcb_getmaps(nconf, argc[1]);
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("RList @ %d\n", rl);
 	}
 
-  	test_status = (rl != NULL) ? 0 : 1;
+	test_status = (rl != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_create/1-basic.c
index af92fd6..117dfee 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_create/1-basic.c
@@ -38,14 +38,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authDes = NULL;
 	struct sockaddr server_addr;
@@ -55,7 +55,7 @@
 	authDes = authdes_create(argc[1], 60, &server_addr, NULL);
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authDes != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authDes != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_seccreate/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_seccreate/1-basic.c
index 6e458d6..c9e3d48 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_seccreate/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_seccreate/1-basic.c
@@ -38,24 +38,24 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authDes = NULL;
 	struct sockaddr server_addr;
 
 	//Initialization
 
-	authDes = authdes_seccreate(argc[1], 60, (char *) &server_addr, NULL);
+	authDes = authdes_seccreate(argc[1], 60, (char *)&server_addr, NULL);
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authDes != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authDes != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authnone_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authnone_create/1-basic.c
index ee41aae..b4f2c27 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authnone_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authnone_create/1-basic.c
@@ -38,21 +38,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authNone = NULL;
 
 	authNone = authnone_create();
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authNone != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authNone != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create/1-basic.c
index e6abc76..8fffb72 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create/1-basic.c
@@ -38,14 +38,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authSys = NULL;
 	uid_t uid;
@@ -61,7 +61,7 @@
 	authSys = authsys_create(argc[1], uid, gid, len, aup_gids);
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authSys != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authSys != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create_default/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create_default/1-basic.c
index 62b73a2..ddd1261 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create_default/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_auth_authsys_create_default/1-basic.c
@@ -38,21 +38,21 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	AUTH *authSys = NULL;
 
 	authSys = authsys_create_default();
 
 	//If we are here, macro call was successful
-	test_status = ((AUTH *)authSys != NULL) ? 0 : 1;
+	test_status = ((AUTH *) authSys != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/1-basic.c
index 99d66d5..98450f3 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/1-basic.c
@@ -43,28 +43,27 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 10;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -73,8 +72,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -85,38 +83,32 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
 		printf("5\n");
-  		exit(1);
-    }
+		exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
 		printf("5\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
+				progNum, VERSNUM, 1024, 1024);
 
-	if (client == NULL)
-	{
+	if (client == NULL) {
 		clnt_pcreateerror("ERR");
 		printf("5\n");
 		exit(1);
 	}
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_rec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/2-stress.c
index f183a37..7168857 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/2-stress.c
@@ -43,32 +43,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 10;
 	int var_rec = -1;
 	struct timeval tv;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -77,8 +76,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -88,38 +86,31 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
 		printf("5\n");
-  		exit(1);
-    }
+		exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
+				progNum, VERSNUM, 1024, 1024);
 
-	for (i = 0; i < nbCall; i++)
-	{
-		cs = clnt_call((CLIENT *)client, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&var_snd,   // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&var_rec,   // xdr_out
-						    tv);
+	for (i = 0; i < nbCall; i++) {
+		cs = clnt_call((CLIENT *) client, PROCNUM, (xdrproc_t) xdr_int, (char *)&var_snd,	// xdr_in
+			       (xdrproc_t) xdr_int, (char *)&var_rec,	// xdr_out
+			       tv);
 		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/4-mt.c
index f49b871..fb9672d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/4-mt.c
@@ -48,20 +48,19 @@
 char *hostname;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 10;
 	int var_rec = -1;
 	struct timeval tv;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -69,82 +68,73 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
-		pthread_exit (1);
+		pthread_exit(1);
 	}
 
 	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	pthread_exit (1);
-    }
-
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (svcaddr.buf == NULL) {
+		pthread_exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
 	if (!rpcb_getaddr(progNum + atoi(arg), VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	pthread_exit (1);
-    }
-    //printf("svc get\n");
+			  &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		pthread_exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum + atoi(arg), VERSNUM, 1024, 1024);
+				progNum + atoi(arg), VERSNUM, 1024, 1024);
 
-	if (client == NULL)
-	{
+	if (client == NULL) {
 		clnt_pcreateerror("ERR");
-		pthread_exit (1);
+		pthread_exit(1);
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		cs = clnt_call(client, PROCNUM,
-	               		(xdrproc_t)xdr_int, (char *)&var_snd,
-	               		(xdrproc_t)xdr_int, (char *)&var_rec,
-	               		tv);
+			       (xdrproc_t) xdr_int, (char *)&var_snd,
+			       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 		thread_array_result[atoi(arg)] += (cs == RPC_SUCCESS);
-    }
+	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	hostname = argc[1];
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -152,43 +142,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/5-scalability.c
index 1c4a18c..97c57d2 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/5-scalability.c
@@ -51,19 +51,18 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -71,8 +70,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -83,78 +81,71 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
 		printf("5\n");
-  		exit(1);
-    }
+		exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
 		printf("5\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
+				progNum, VERSNUM, 1024, 1024);
 
-	if (client == NULL)
-	{
+	if (client == NULL) {
 		clnt_pcreateerror("ERR");
 		printf("5\n");
 		exit(1);
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_rec,
-	               tv);
+			  (xdrproc_t) xdr_int, (char *)&var_snd,
+			  (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 	}
 
 	clnt_destroy(client);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -162,19 +153,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr, (size_t *)&ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -182,55 +173,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -242,8 +231,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/6-dataint.c
index 79552fd..3c590a8 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/6-dataint.c
@@ -43,19 +43,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	struct timeval tv;
 	//Sent variables
@@ -74,8 +74,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -86,41 +85,34 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
 		printf("5\n");
-  		exit(1);
-    }
+		exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
 		printf("5\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
+				progNum, VERSNUM, 1024, 1024);
 
-	if (client == NULL)
-	{
+	if (client == NULL) {
 		clnt_pcreateerror("ERR");
 		exit(1);
 	}
-
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
 	cs = clnt_call(client, INTPROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&intSnd,
-	               (xdrproc_t)xdr_int, (char *)&intRec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -131,9 +123,8 @@
 	intSnd = 16777216;
 
 	cs = clnt_call(client, INTPROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&intSnd,
-	               (xdrproc_t)xdr_int, (char *)&intRec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -144,9 +135,8 @@
 	lngSnd = -430000;
 
 	cs = clnt_call(client, LNGPROCNUM,
-	               (xdrproc_t)xdr_long, (char *)&lngSnd,
-	               (xdrproc_t)xdr_long, (char *)&lngRec,
-	               tv);
+		       (xdrproc_t) xdr_long, (char *)&lngSnd,
+		       (xdrproc_t) xdr_long, (char *)&lngRec, tv);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -157,9 +147,8 @@
 	dblSnd = -1735.63000f;
 
 	cs = clnt_call(client, DBLPROCNUM,
-	               (xdrproc_t)xdr_double, (char *)&dblSnd,
-	               (xdrproc_t)xdr_double, (char *)&dblRec,
-	               tv);
+		       (xdrproc_t) xdr_double, (char *)&dblSnd,
+		       (xdrproc_t) xdr_double, (char *)&dblRec, tv);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -171,9 +160,8 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	cs = clnt_call(client, STRPROCNUM,
-	               (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-	               (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-	               tv);
+		       (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		       (xdrproc_t) xdr_wrapstring, (char *)&strRec, tv);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/7-performance.c
index 7ad141c..073ed8c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/7-performance.c
@@ -46,8 +46,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -60,8 +59,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -74,8 +72,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -85,41 +82,40 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    tv.tv_sec = 0;
+	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -130,66 +126,56 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
 		printf("5\n");
-  		exit(1);
-    }
+		exit(1);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
 		printf("5\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
+				progNum, VERSNUM, 1024, 1024);
 
-	if (client == NULL)
-	{
+	if (client == NULL) {
 		clnt_pcreateerror("ERR");
 		exit(1);
 	}
-
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_call(client, PROCNUM,
-	               		(xdrproc_t)xdr_int, (char *)&var_snd,
-	               		(xdrproc_t)xdr_int, (char *)&var_rec,
-	               		tv);
+			       (xdrproc_t) xdr_int, (char *)&var_snd,
+			       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/8-complex.c
index 4f65f98..347c24a 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_call/8-complex.c
@@ -47,26 +47,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -74,58 +71,52 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	struct datas vars;
 	static double result = 0;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit (5);
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-    svcaddr.len = 0;
+	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		pthread_exit (5);
-    }
-
-    if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	pthread_exit (5);
-    }
-
-    clnt = clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);
-
-	if (clnt == NULL)
-	{
+	if (svcaddr.buf == NULL) {
 		printf("5\n");
-		pthread_exit (5);
+		pthread_exit(5);
 	}
 
-	if (run_mode == 1)
-	{
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		pthread_exit(5);
+	}
+
+	clnt = clnt_dg_create(RPC_ANYFD, &svcaddr,
+			      progNum, VERSNUM, 1024, 1024);
+
+	if (clnt == NULL) {
+		printf("5\n");
+		pthread_exit(5);
+	}
+
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -135,97 +126,88 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-    clnt_call((CLIENT *)clnt, CALCTHREADPROC,
-				(xdrproc_t)xdr_datas, (char *)&vars, // xdr_in
-                (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes, // xdr_out
-				total_timeout);
+	clnt_call((CLIENT *) clnt, CALCTHREADPROC, (xdrproc_t) xdr_datas, (char *)&vars,	// xdr_in
+		  (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,	// xdr_out
+		  total_timeout);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		thread_array_result[i] = 1;
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/1-basic.c
index 5126417..6031d9b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/1-basic.c
@@ -43,32 +43,30 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -79,28 +77,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-    	printf("5\n");
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		printf("5\n");
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
-
-	client =  clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				 progNum, VERSNUM, 1024, 1024);/**/
-
-	test_status = ((CLIENT *)client != NULL) ? 0 : 1;
+	client = clnt_dg_create(RPC_ANYFD, &svcaddr,
+				progNum, VERSNUM, 1024, 1024);
+	/**/ test_status = ((CLIENT *) client != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/3-limits.c
index 0ed865a..13ecedb 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_dg_create/3-limits.c
@@ -40,37 +40,35 @@
 //Sys define
 #define ADDRBUFSIZE 100
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Test initialization
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -81,22 +79,18 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-    	printf("5\n");
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		printf("5\n");
+		return 1;
+	}
 
-    if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(1);
-    }
-
-    //Test arguments initialization
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(1);
+	}
+	//Test arguments initialization
 	paramList[0].bufsnd = 0;
 	paramList[0].bufrec = 0;
 	paramList[1].bufsnd = 0;
@@ -107,23 +101,20 @@
 	paramList[3].bufrec = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		client =  clnt_dg_create(RPC_ANYFD, &svcaddr,
-			 				 progNum, VERSNUM, paramList[i].bufsnd, paramList[i].bufrec);
+		client = clnt_dg_create(RPC_ANYFD, &svcaddr,
+					progNum, VERSNUM, paramList[i].bufsnd,
+					paramList[i].bufrec);
 
 		//Check result
-		if (client == NULL)
-		{
+		if (client == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/1-basic.c
index 20d79b9..855359a 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/1-basic.c
@@ -43,32 +43,30 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -78,26 +76,21 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_vc_create(RPC_ANYFD, &svcaddr,
-			 				progNum, VERSNUM, 1024, 1024);/**/
-
-	test_status = ((CLIENT *)client != NULL) ? 0 : 1;
+				progNum, VERSNUM, 1024, 1024);
+	/**/ test_status = ((CLIENT *) client != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/3-limits.c
index fd5df71..facb3f5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_clnt_vc_create/3-limits.c
@@ -40,37 +40,35 @@
 //Sys define
 #define ADDRBUFSIZE 100
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Test initialization
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -81,22 +79,18 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-    	printf("5\n");
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		printf("5\n");
+		return 1;
+	}
 
-    if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(1);
-    }
-
-    //Test arguments initialization
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(1);
+	}
+	//Test arguments initialization
 	paramList[0].bufsnd = 0;
 	paramList[0].bufrec = 0;
 	paramList[1].bufsnd = 0;
@@ -107,23 +101,20 @@
 	paramList[3].bufrec = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		client =  clnt_vc_create(RPC_ANYFD, &svcaddr,
-			 				 	 progNum, VERSNUM, paramList[i].bufsnd, paramList[i].bufrec);
+		client = clnt_vc_create(RPC_ANYFD, &svcaddr,
+					progNum, VERSNUM, paramList[i].bufsnd,
+					paramList[i].bufrec);
 
 		//Check result
-		if (client == NULL)
-		{
+		if (client == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/1-basic.c
index fae3261..4ac17de 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/1-basic.c
@@ -40,19 +40,18 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	SVCXPRT *transp = NULL;
 
-	transp = svc_dg_create(RPC_ANYFD, 0, 0);/**/
-
-	test_status = ((SVCXPRT *)transp != NULL) ? 0 : 1;
+	transp = svc_dg_create(RPC_ANYFD, 0, 0);
+	/**/ test_status = ((SVCXPRT *) transp != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/3-limits.c
index 5243422..41ce772 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_dg_create/3-limits.c
@@ -40,30 +40,29 @@
 //Sys define
 #define ADDRBUFSIZE 100
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
 	SVCXPRT *transp = NULL;
 
-    //Test arguments initialization
+	//Test arguments initialization
 	paramList[0].bufsnd = 0;
 	paramList[0].bufrec = 0;
 	paramList[1].bufsnd = 0;
@@ -74,22 +73,20 @@
 	paramList[3].bufrec = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		transp = svc_dg_create(RPC_ANYFD, paramList[i].bufsnd, paramList[i].bufrec);
+		transp =
+		    svc_dg_create(RPC_ANYFD, paramList[i].bufsnd,
+				  paramList[i].bufrec);
 
 		//Check result
-		if (transp == NULL)
-		{
+		if (transp == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/1-basic.c
index 2a75910..ae83ee1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/1-basic.c
@@ -40,19 +40,18 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	SVCXPRT *transp = NULL;
 
-	transp = svc_vc_create(RPC_ANYFD, 0, 0);/**/
-
-	test_status = ((SVCXPRT *)transp != NULL) ? 0 : 1;
+	transp = svc_vc_create(RPC_ANYFD, 0, 0);
+	/**/ test_status = ((SVCXPRT *) transp != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/3-limits.c
index 3835651..a496c42 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_bottomlevel_svc_vc_create/3-limits.c
@@ -40,30 +40,29 @@
 //Sys define
 #define ADDRBUFSIZE 100
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufsnd;
 	int bufrec;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
 	SVCXPRT *transp = NULL;
 
-    //Test arguments initialization
+	//Test arguments initialization
 	paramList[0].bufsnd = 0;
 	paramList[0].bufrec = 0;
 	paramList[1].bufsnd = 0;
@@ -74,22 +73,20 @@
 	paramList[3].bufrec = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufsnd);
 			printf("%d", paramList[i].bufrec);
 			printf("\n");
 		}
-
 		//Call function
-		transp = svc_vc_create(RPC_ANYFD, paramList[i].bufsnd, paramList[i].bufrec);
+		transp =
+		    svc_vc_create(RPC_ANYFD, paramList[i].bufsnd,
+				  paramList[i].bufrec);
 
 		//Check result
-		if (transp == NULL)
-		{
+		if (transp == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_pcreateerror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_pcreateerror/1-basic.c
index 3ed647b..fb7f5af 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_pcreateerror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_pcreateerror/1-basic.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	CLIENT *clnt = NULL;
 	char nettype[8] = "udp";
@@ -58,8 +58,8 @@
 
 	clnt_pcreateerror("#SUCCESS");
 
-    //If we are here, test has passed
-    test_status = 0;
+	//If we are here, test has passed
+	test_status = 0;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/1-basic.c
index 0fdd253..cc25e23 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/1-basic.c
@@ -43,42 +43,38 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_void, NULL, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	clnt_perrno(rslt);
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_void, NULL,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ clnt_perrno(rslt);
 
 	//If we are here, test has passed
 	test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/8-complex.c
index e454f01..b976a94 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perrno/8-complex.c
@@ -43,55 +43,49 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
-    enum clnt_stat rslt;
+	int recVar = -1;
+	struct timeval total_timeout;
+	enum clnt_stat rslt;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//Multiple test case
-    rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //Multiple test case
+	    rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
+			    (xdrproc_t) xdr_int, (char *)&sndVar,
+			    (xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perrno(rslt);
 
-    rslt = rpc_call(argc[1], 1, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	rslt = rpc_call(argc[1], 1, VERSNUM, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perrno(rslt);
 
-    rslt = rpc_call(argc[1], progNum, 10, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	rslt = rpc_call(argc[1], progNum, 10, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perrno(rslt);
 
-    rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        "wrong");
+	rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, "wrong");
 	clnt_perrno(rslt);
 
 	//If we are here, test has passed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/1-basic.c
index 4cf2279..6fc08e8 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/1-basic.c
@@ -43,42 +43,38 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_void, NULL, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	clnt_perror(clnt, "#SUCCESS");
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_void, NULL,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ clnt_perror(clnt, "#SUCCESS");
 
 	//If we are here, test has passed
 	test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/8-complex.c
index a200a79..dd1314e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_clnt_perror/8-complex.c
@@ -43,58 +43,51 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
-    enum clnt_stat rslt;
-    CLIENT *clnt = NULL;
+	int recVar = -1;
+	struct timeval total_timeout;
+	enum clnt_stat rslt;
+	CLIENT *clnt = NULL;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
-
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
+	total_timeout.tv_usec = 1;
+	/**/ clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
 	//Multiple test case
-    rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perror(clnt, "Success");
 
-    rslt = rpc_call(argc[1], 1, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	rslt = rpc_call(argc[1], 1, VERSNUM, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perror(clnt, "Wrong Prog");
 
-    rslt = rpc_call(argc[1], progNum, 10, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        nettype);
+	rslt = rpc_call(argc[1], progNum, 10, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, nettype);
 	clnt_perror(clnt, "Wrong Vers");
 
-    rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
-                        (xdrproc_t)xdr_int, (char *)&sndVar,
-                        (xdrproc_t)xdr_int, (char *)&recVar,
-                        "wrong");
+	rslt = rpc_call(argc[1], progNum, VERSNUM, PROCNUM,
+			(xdrproc_t) xdr_int, (char *)&sndVar,
+			(xdrproc_t) xdr_int, (char *)&recVar, "wrong");
 	clnt_perror(clnt, "Wrong Proto");
 
 	//If we are here, test has passed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noproc/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noproc/1-basic.c
index ae371b1..6076395 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noproc/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noproc/1-basic.c
@@ -43,27 +43,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -72,8 +71,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -83,29 +81,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/**/
-
-	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+				 progNum, VERSNUM, 0, 0);
+	/**/ cs = clnt_call(client, PROCNUM,
+			    (xdrproc_t) xdr_int, (char *)&var_snd,
+			    (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_PROCUNAVAIL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noprog/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noprog/1-basic.c
index 4849e00..8666ca7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noprog/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_noprog/1-basic.c
@@ -43,27 +43,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -72,8 +71,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -83,29 +81,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         667, VERSNUM, 0, 0);/* Wrong Program Number */
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr, 667, VERSNUM, 0, 0);	/* Wrong Program Number */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_PROGUNAVAIL) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_progvers/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_progvers/1-basic.c
index 84c0db5..c272c4c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_progvers/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_progvers/1-basic.c
@@ -43,27 +43,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -72,8 +71,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -83,29 +81,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/* Wrong Program Version */
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr, progNum, VERSNUM, 0, 0);	/* Wrong Program Version */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_PROGVERSMISMATCH) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_systemerr/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_systemerr/1-basic.c
index 796ed9b..8db8d77 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_systemerr/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_systemerr/1-basic.c
@@ -43,27 +43,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -72,8 +71,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -83,29 +81,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/* Wrong Program Version */
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr, progNum, VERSNUM, 0, 0);	/* Wrong Program Version */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_SYSTEMERROR) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_weakauth/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_weakauth/1-basic.c
index 864274c..ae08509 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_weakauth/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_err_svcerr_weakauth/1-basic.c
@@ -43,27 +43,26 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -72,8 +71,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -83,29 +81,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/* Wrong Program Version */
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr, progNum, VERSNUM, 0, 0);	/* Wrong Program Version */
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_snd, tv);
 
 	test_status = (cs == RPC_AUTHERROR) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/1-basic.c
index 512f417..5796900 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/1-basic.c
@@ -43,28 +43,27 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -73,8 +72,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -84,33 +82,28 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
+	}
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
 
 	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);
+				 progNum, VERSNUM, 0, 0);
 
-	if (client == NULL)
-	{
-    	printf("5\n");
-    	exit(5);
+	if (client == NULL) {
+		printf("5\n");
+		exit(5);
 	}
 
 	cs = clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_rec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&var_snd,
+		       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/2-stress.c
index 45afaaa..4d72b4f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/2-stress.c
@@ -43,32 +43,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -77,8 +76,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -89,38 +87,30 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
 		exit(5);
-    }
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
 		exit(5);
-    }
-    //printf("svc get\n");
+	}
+	//printf("svc get\n");
 
 	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/**/
-
-	for (i = 0; i < nbCall; i++)
-	{
+				 progNum, VERSNUM, 0, 0);
+	/**/ for (i = 0; i < nbCall; i++) {
 		cs = clnt_call(client, PROCNUM,
-	    	           (xdrproc_t)xdr_int, (char *)&var_snd,
-	    	           (xdrproc_t)xdr_int, (char *)&var_rec,
-	    	           tv);
-	    if (cs == RPC_SUCCESS)
+			       (xdrproc_t) xdr_int, (char *)&var_snd,
+			       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
+		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/4-mt.c
index 7de09b1..ac6cfd1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/4-mt.c
@@ -48,20 +48,19 @@
 char *hostname;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -69,78 +68,70 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		printf("err nconf\n");
-		pthread_exit (1);
+		pthread_exit(1);
 	}
 
 	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-  		pthread_exit (1);
-    }
-
-	if (!rpcb_getaddr(progNum + atoi(arg), VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	pthread_exit (1);
-    }
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum + atoi(arg), VERSNUM, 0, 0);
-
-	if (client == NULL)
-	{
-		clnt_pcreateerror("ERR");
-		pthread_exit (1);
+	if (svcaddr.buf == NULL) {
+		pthread_exit(1);
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	if (!rpcb_getaddr(progNum + atoi(arg), VERSNUM, nconf,
+			  &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		pthread_exit(1);
+	}
+
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
+				 progNum + atoi(arg), VERSNUM, 0, 0);
+
+	if (client == NULL) {
+		clnt_pcreateerror("ERR");
+		pthread_exit(1);
+	}
+
+	for (i = 0; i < callNb; i++) {
 		cs = clnt_call(client, PROCNUM,
-	               		(xdrproc_t)xdr_int, (char *)&var_snd,
-	               		(xdrproc_t)xdr_int, (char *)&var_rec,
-	               		tv);
+			       (xdrproc_t) xdr_int, (char *)&var_snd,
+			       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 		thread_array_result[atoi(arg)] += (cs == RPC_SUCCESS);
-    }
+	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	hostname = argc[1];
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -148,43 +139,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit(1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/5-scalability.c
index 40ee172..0d3c8b1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/5-scalability.c
@@ -51,19 +51,18 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -71,8 +70,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(1);
@@ -82,73 +80,67 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);
-
-	if (client == NULL)
-	{
-    	printf("5\n");
-    	exit(5);
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
+
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
+				 progNum, VERSNUM, 0, 0);
+
+	if (client == NULL) {
+		printf("5\n");
+		exit(5);
+	}
+
+	for (i = 0; i < callNb; i++) {
 		clnt_call(client, PROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&var_snd,
-	               (xdrproc_t)xdr_int, (char *)&var_rec,
-	               tv);
+			  (xdrproc_t) xdr_int, (char *)&var_snd,
+			  (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 	}
 
 	clnt_destroy(client);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -156,19 +148,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr,(size_t *) &ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -176,55 +168,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -236,8 +226,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/6-dataint.c
index d68c4f4..8980fde 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/6-dataint.c
@@ -43,19 +43,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	struct timeval tv;
 	//Sent variables
@@ -74,8 +74,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -85,36 +84,30 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);
-	if (client == NULL)
-	{
-    	printf("5\n");
-    	exit(5);
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
 	}
 
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
+
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
+				 progNum, VERSNUM, 0, 0);
+	if (client == NULL) {
+		printf("5\n");
+		exit(5);
+	}
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
 	cs = clnt_call(client, INTPROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&intSnd,
-	               (xdrproc_t)xdr_int, (char *)&intRec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -125,9 +118,8 @@
 	intSnd = 16777216;
 
 	cs = clnt_call(client, INTPROCNUM,
-	               (xdrproc_t)xdr_int, (char *)&intSnd,
-	               (xdrproc_t)xdr_int, (char *)&intRec,
-	               tv);
+		       (xdrproc_t) xdr_int, (char *)&intSnd,
+		       (xdrproc_t) xdr_int, (char *)&intRec, tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -138,9 +130,8 @@
 	lngSnd = -430000;
 
 	cs = clnt_call(client, LNGPROCNUM,
-	               (xdrproc_t)xdr_long, (char *)&lngSnd,
-	               (xdrproc_t)xdr_long, (char *)&lngRec,
-	               tv);
+		       (xdrproc_t) xdr_long, (char *)&lngSnd,
+		       (xdrproc_t) xdr_long, (char *)&lngRec, tv);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -151,9 +142,8 @@
 	dblSnd = -1735.63000f;
 
 	cs = clnt_call(client, DBLPROCNUM,
-	               (xdrproc_t)xdr_double, (char *)&dblSnd,
-	               (xdrproc_t)xdr_double, (char *)&dblRec,
-	               tv);
+		       (xdrproc_t) xdr_double, (char *)&dblSnd,
+		       (xdrproc_t) xdr_double, (char *)&dblRec, tv);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -165,9 +155,8 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	cs = clnt_call(client, STRPROCNUM,
-	               (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-	               (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-	               tv);
+		       (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		       (xdrproc_t) xdr_wrapstring, (char *)&strRec, tv);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/7-performance.c
index a22d203..aa1c64d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/7-performance.c
@@ -46,8 +46,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -60,8 +59,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -74,8 +72,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -85,38 +82,37 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -125,8 +121,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -136,62 +131,53 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
-
-	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);
-
-	if (client == NULL)
-	{
-    	printf("5\n");
-    	exit(1);
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
 	}
 
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
+
+	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
+				 progNum, VERSNUM, 0, 0);
+
+	if (client == NULL) {
+		printf("5\n");
+		exit(1);
+	}
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = clnt_call(client, PROCNUM,
-	               		(xdrproc_t)xdr_int, (char *)&var_snd,
-	              	 	(xdrproc_t)xdr_int, (char *)&var_rec,
-	               		tv);
+			       (xdrproc_t) xdr_int, (char *)&var_snd,
+			       (xdrproc_t) xdr_int, (char *)&var_rec, tv);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/8-complex.c
index 6e244ca..07aa254 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_call/8-complex.c
@@ -47,26 +47,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -74,58 +71,52 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	struct datas vars;
 	static double result = 0;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit (5);
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-    svcaddr.len = 0;
+	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		pthread_exit (5);
-    }
-
-    if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	pthread_exit (5);
-    }
-
-    clnt = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);
-
-	if (clnt == NULL)
-	{
+	if (svcaddr.buf == NULL) {
 		printf("5\n");
-		pthread_exit (5);
+		pthread_exit(5);
 	}
 
-	if (run_mode == 1)
-	{
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		pthread_exit(5);
+	}
+
+	clnt = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
+			       progNum, VERSNUM, 0, 0);
+
+	if (clnt == NULL) {
+		printf("5\n");
+		pthread_exit(5);
+	}
+
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -135,53 +126,50 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-    clnt_call((CLIENT *)clnt, CALCTHREADPROC,
-				(xdrproc_t)xdr_datas, (char *)&vars, // xdr_in
-                (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes, // xdr_out
-				total_timeout);
+	clnt_call((CLIENT *) clnt, CALCTHREADPROC, (xdrproc_t) xdr_datas, (char *)&vars,	// xdr_in
+		  (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,	// xdr_out
+		  total_timeout);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -189,43 +177,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/1-basic.c
index c3fe794..3adf52d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/1-basic.c
@@ -43,32 +43,30 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
@@ -78,26 +76,21 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	exit(1);
-    }
-    //printf("svc get\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		exit(1);
+	}
+	//printf("svc get\n");
 
 	client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         progNum, VERSNUM, 0, 0);/**/
-
-	test_status = ((CLIENT *)client != NULL) ? 0 : 1;
+				 progNum, VERSNUM, 0, 0);
+	/**/ test_status = ((CLIENT *) client != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/3-limits.c
index b8d0056..9a032b2 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_clnt_tli_create/3-limits.c
@@ -40,44 +40,41 @@
 //Other define
 #define NBCASE 3
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufmin;
 	int bufmax;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	bool_t rpcb_rslt;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
@@ -88,22 +85,17 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		return 1;
-    }
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		return 1;
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
 		printf("5\n");
-    	exit(1);
-    }
-
+		exit(1);
+	}
 	//Test arguments initialization
 	paramList[0].bufmin = 0;
 	paramList[0].bufmax = 2147483647;
@@ -113,23 +105,20 @@
 	paramList[2].bufmax = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufmin);
 			printf("%d", paramList[i].bufmax);
 			printf("\n");
 		}
-
 		//Call function
 		client = clnt_tli_create(RPC_ANYFD, nconf, &svcaddr,
-	                         	 progNum, VERSNUM, paramList[i].bufmin, paramList[i].bufmax);
+					 progNum, VERSNUM, paramList[i].bufmin,
+					 paramList[i].bufmax);
 
 		//Check result
-		if (client == NULL)
-		{
+		if (client == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/1-basic.c
index c456a37..6d4af68 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/1-basic.c
@@ -43,28 +43,27 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -73,8 +72,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -84,24 +82,20 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
+	}
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, PROCNUM,
-	                  (xdrproc_t)xdr_int, (char *)&var_snd,
-	                  (xdrproc_t)xdr_int, (char *)&var_rec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_int, (char *)&var_snd,
+			  (xdrproc_t) xdr_int, (char *)&var_rec, tv, &svcaddr);
 
 	test_status = (cs == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/2-stress.c
index c95cb8c..927467d 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/2-stress.c
@@ -43,32 +43,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
@@ -77,46 +76,39 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
-  		exit(5);
+		exit(5);
 	}
 
 	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-  		exit(5);
-    }
-
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, PROCNUM,
-	     	              (xdrproc_t)xdr_int, (char *)&var_snd,
-	    	              (xdrproc_t)xdr_int, (char *)&var_rec,
-	       	              tv, &svcaddr);
-	    if (cs == RPC_SUCCESS)
+				  (xdrproc_t) xdr_int, (char *)&var_snd,
+				  (xdrproc_t) xdr_int, (char *)&var_rec,
+				  tv, &svcaddr);
+		if (cs == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/4-mt.c
index 5e623ce..f91f147 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/4-mt.c
@@ -48,20 +48,19 @@
 char *hostname;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -69,8 +68,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		pthread_exit(5);
@@ -80,62 +78,56 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	/* if malloc() failed, print error messages and exit */
-  		pthread_exit(5);
-    }
-
-    //printf("svcaddr reserved (%s)\n", argc[1]);
+	if (svcaddr.buf == NULL) {
+		/* if malloc() failed, print error messages and exit */
+		pthread_exit(5);
+	}
+	//printf("svcaddr reserved (%s)\n", argc[1]);
 
 	if (!rpcb_getaddr(progNum + atoi(arg), VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	pthread_exit (5);
-    }
+			  &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		pthread_exit(5);
+	}
 
-	for (i = 0; i < callNb; i++)
-	{
-		cs = rpcb_rmtcall(nconf, hostname, progNum + atoi(arg), VERSNUM, PROCNUM,
-	                  		(xdrproc_t)xdr_int, (char *)&var_snd,
-	                  		(xdrproc_t)xdr_int, (char *)&var_rec,
-	                  		tv, &svcaddr);
+	for (i = 0; i < callNb; i++) {
+		cs = rpcb_rmtcall(nconf, hostname, progNum + atoi(arg), VERSNUM,
+				  PROCNUM, (xdrproc_t) xdr_int,
+				  (char *)&var_snd, (xdrproc_t) xdr_int,
+				  (char *)&var_rec, tv, &svcaddr);
 
 		thread_array_result[atoi(arg)] += (cs == RPC_SUCCESS);
-    }
+	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	hostname = argc[1];
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -143,43 +135,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/5-scalability.c
index c27a967..add33f9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/5-scalability.c
@@ -51,19 +51,18 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -71,8 +70,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -82,62 +80,58 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		exit(5);
-    }
-
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(5);
-    }
-
-	for (i = 0; i < callNb; i++)
-	{
-		rpcb_rmtcall(nconf, hostname, progNum, VERSNUM, PROCNUM,
-	                  (xdrproc_t)xdr_int, (char *)&var_snd,
-	                  (xdrproc_t)xdr_int, (char *)&var_rec,
-	                  tv, &svcaddr);
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		exit(5);
 	}
 
-    pthread_exit (0);
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(5);
+	}
+
+	for (i = 0; i < callNb; i++) {
+		rpcb_rmtcall(nconf, hostname, progNum, VERSNUM, PROCNUM,
+			     (xdrproc_t) xdr_int, (char *)&var_snd,
+			     (xdrproc_t) xdr_int, (char *)&var_rec,
+			     tv, &svcaddr);
+	}
+
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -145,19 +139,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr,(size_t *) &ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -165,55 +159,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -225,8 +217,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/6-dataint.c
index 4bc546d..0038ced 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/6-dataint.c
@@ -43,19 +43,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	struct timeval tv;
 	//Sent variables
@@ -74,8 +74,7 @@
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -85,28 +84,23 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
 		exit(5);
-    }
+	}
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	exit(1);
-    }
-
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		exit(1);
+	}
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, INTPROCNUM,
-	                  (xdrproc_t) xdr_int, (char *)&intSnd,
-	                  (xdrproc_t) xdr_int, (char *)&intRec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_int, (char *)&intSnd,
+			  (xdrproc_t) xdr_int, (char *)&intRec, tv, &svcaddr);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -117,9 +111,8 @@
 	intSnd = 16777216;
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, INTPROCNUM,
-	                  (xdrproc_t) xdr_int, (char *)&intSnd,
-	                  (xdrproc_t) xdr_int, (char *)&intRec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_int, (char *)&intSnd,
+			  (xdrproc_t) xdr_int, (char *)&intRec, tv, &svcaddr);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -130,9 +123,8 @@
 	lngSnd = -430000;
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, LNGPROCNUM,
-	                  (xdrproc_t) xdr_long, (char *)&lngSnd,
-	                  (xdrproc_t) xdr_long, (char *)&lngRec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_long, (char *)&lngSnd,
+			  (xdrproc_t) xdr_long, (char *)&lngRec, tv, &svcaddr);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -143,9 +135,9 @@
 	dblSnd = -1735.63000f;
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, DBLPROCNUM,
-	                  (xdrproc_t) xdr_double, (char *)&dblSnd,
-	                  (xdrproc_t) xdr_double, (char *)&dblRec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_double, (char *)&dblSnd,
+			  (xdrproc_t) xdr_double, (char *)&dblRec,
+			  tv, &svcaddr);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -157,9 +149,9 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, STRPROCNUM,
-	                  (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
-	                  (xdrproc_t) xdr_wrapstring, (char *)&strRec,
-	                  tv, &svcaddr);
+			  (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+			  (xdrproc_t) xdr_wrapstring, (char *)&strRec,
+			  tv, &svcaddr);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/7-performance.c
index 06c8969..150b4f1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/7-performance.c
@@ -46,8 +46,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -60,8 +59,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -74,8 +72,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -85,41 +82,40 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 	enum clnt_stat cs;
 	int var_snd = 0;
 	int var_rec = -1;
 	struct timeval tv;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    tv.tv_sec = 0;
+	tv.tv_sec = 0;
 	tv.tv_usec = 100;
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(5);
@@ -129,53 +125,46 @@
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
 		exit(5);
-    }
+	}
 
-	if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, argc[1]))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, argc[1])) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
 		exit(5);
-    }
-
+	}
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = rpcb_rmtcall(nconf, argc[1], progNum, VERSNUM, PROCNUM,
-	                  		(xdrproc_t)xdr_int, (char *)&var_snd,
-	                  		(xdrproc_t)xdr_int, (char *)&var_rec,
-	                  		tv, &svcaddr);
+				  (xdrproc_t) xdr_int, (char *)&var_snd,
+				  (xdrproc_t) xdr_int, (char *)&var_rec,
+				  tv, &svcaddr);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/8-complex.c
index c479581..b3af076 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_rmtcall/8-complex.c
@@ -47,26 +47,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -74,49 +71,44 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	struct datas vars;
 	static double result = 0;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    char addrbuf[ADDRBUFSIZE];
+	char addrbuf[ADDRBUFSIZE];
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit(5);
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-    svcaddr.len = 0;
+	svcaddr.len = 0;
 	svcaddr.maxlen = ADDRBUFSIZE;
 	svcaddr.buf = addrbuf;
 
-	if (svcaddr.buf == NULL)
-	{
-    	printf("5\n");
-  		pthread_exit(5);
-    }
+	if (svcaddr.buf == NULL) {
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-    if (!rpcb_getaddr(progNum, VERSNUM, nconf,
-                               &svcaddr, hostname))
-    {
-    	fprintf(stderr, "rpcb_getaddr failed!!\n");
-    	printf("5\n");
-    	pthread_exit(5);
-    }
+	if (!rpcb_getaddr(progNum, VERSNUM, nconf, &svcaddr, hostname)) {
+		fprintf(stderr, "rpcb_getaddr failed!!\n");
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -126,53 +118,51 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-    rpcb_rmtcall(nconf, hostname, progNum, VERSNUM, CALCTHREADPROC,
-	             (xdrproc_t)xdr_datas, (char *)&vars,
-	             (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes,
-	             total_timeout, &svcaddr);
+	rpcb_rmtcall(nconf, hostname, progNum, VERSNUM, CALCTHREADPROC,
+		     (xdrproc_t) xdr_datas, (char *)&vars,
+		     (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,
+		     total_timeout, &svcaddr);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit(0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -180,43 +170,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/1-basic.c
index b0b978f..4b60586 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_set/1-basic.c
@@ -40,39 +40,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    test_status = !rpcb_set(progNum, VERSNUM, nconf, &svcaddr);
+	test_status = !rpcb_set(progNum, VERSNUM, nconf, &svcaddr);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/1-basic.c
index 57529a0..75155cf 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_rpcb_unset/1-basic.c
@@ -40,41 +40,37 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    rpcb_set(progNum, VERSNUM, nconf, &svcaddr);
+	rpcb_set(progNum, VERSNUM, nconf, &svcaddr);
 
-    test_status = !rpcb_unset(progNum, VERSNUM, nconf);
+	test_status = !rpcb_unset(progNum, VERSNUM, nconf);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/1-basic.c
index 06af53c..5fee7bc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/1-basic.c
@@ -42,41 +42,36 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    svc_unreg(progNum, VERSNUM);
-    test_status = !svc_reg(transp, progNum, VERSNUM,
-                           exm_proc, nconf);
+	svc_unreg(progNum, VERSNUM);
+	test_status = !svc_reg(transp, progNum, VERSNUM, exm_proc, nconf);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
@@ -85,7 +80,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/2-stress.c
index 8163406..b70a1fe 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/2-stress.c
@@ -42,52 +42,45 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    svc_unreg(progNum, VERSNUM);
-    for (i = 0; i < nbCall; i++)
-	{
-		if (svc_reg(transp, progNum, VERSNUM,
-                    exm_proc, nconf))
+	svc_unreg(progNum, VERSNUM);
+	for (i = 0; i < nbCall; i++) {
+		if (svc_reg(transp, progNum, VERSNUM, exm_proc, nconf))
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
@@ -101,7 +94,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/4-mt.c
index 31b2b76..c08ae2c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_reg/4-mt.c
@@ -45,66 +45,60 @@
 int progNum;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
-		pthread_exit (1);
+		pthread_exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		svc_unreg(progNum + atoi(arg), VERSNUM);
-    	thread_array_result[atoi(arg)] += svc_reg(transp, progNum + atoi(arg), VERSNUM,
-                           						 exm_proc, nconf);
-    }
-    pthread_exit (0);
+		thread_array_result[atoi(arg)] +=
+		    svc_reg(transp, progNum + atoi(arg), VERSNUM, exm_proc,
+			    nconf);
+	}
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -112,43 +106,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
@@ -156,7 +144,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/1-basic.c
index 5ae0cea..d2d2da7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/1-basic.c
@@ -40,38 +40,34 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-	test_status = ((SVCXPRT *)transp != NULL) ? 0 : 1;
+	test_status = ((SVCXPRT *) transp != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/3-limits.c
index b2ad8a0..1e8cf2c 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_tli_create/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 3
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int bufmin;
 	int bufmax;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -62,21 +61,18 @@
 	struct netconfig *nconf = NULL;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		fprintf(stderr, "err nconf\n");
 		printf("5\n");
 		exit(1);
 	}
-
 	//Test arguments initialization
 	paramList[0].bufmin = 0;
 	paramList[0].bufmax = 2147483647;
@@ -86,24 +82,21 @@
 	paramList[2].bufmax = 2147483647;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
+		if (run_mode == 1) {
 			printf("Test using values : %d ", paramList[i].bufmin);
 			printf("%d", paramList[i].bufmax);
 			printf("\n");
 		}
-
 		//Call function
 		transp = svc_tli_create(RPC_ANYFD, nconf,
-                            	(struct t_bind *)NULL,
-                            	paramList[i].bufmin, paramList[i].bufmax);
+					(struct t_bind *)NULL,
+					paramList[i].bufmin,
+					paramList[i].bufmax);
 
 		//Check result
-		if (transp == NULL)
-		{
+		if (transp == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/1-basic.c
index d79c48a..0c2b790 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/1-basic.c
@@ -42,46 +42,41 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    svc_unreg(progNum, VERSNUM);
-    svc_reg(transp, progNum, VERSNUM,
-            exm_proc, nconf);
+	svc_unreg(progNum, VERSNUM);
+	svc_reg(transp, progNum, VERSNUM, exm_proc, nconf);
 
-    svc_unreg(progNum, VERSNUM);
+	svc_unreg(progNum, VERSNUM);
 
-    //If we are here, test has passed
-    test_status = 0;
+	//If we are here, test has passed
+	test_status = 0;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
@@ -90,7 +85,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/2-stress.c
index 0ed3fa7..b4040c9 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/2-stress.c
@@ -42,54 +42,48 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
-    int nbCall = atoi(argc[3]);
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
 	//Initialization
-    if (run_mode)
-    {
-    	printf("Before creation\n");
+	if (run_mode) {
+		printf("Before creation\n");
 		printf("nconf : %d\n", nconf);
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
 		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    svc_unreg(progNum, VERSNUM);
+	svc_unreg(progNum, VERSNUM);
 
-    for (i = 0; i < nbCall; i++)
-	{
-		svc_reg(transp, progNum, VERSNUM,
-            exm_proc, nconf);
+	for (i = 0; i < nbCall; i++) {
+		svc_reg(transp, progNum, VERSNUM, exm_proc, nconf);
 
-    	svc_unreg(progNum, VERSNUM);
-    }
+		svc_unreg(progNum, VERSNUM);
+	}
 
-    //If we are here, test has passed
-    test_status = 0;
+	//If we are here, test has passed
+	test_status = 0;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
@@ -98,7 +92,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/4-mt.c
index 2010113..26da4bc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_expertlevel_svc_unreg/4-mt.c
@@ -45,72 +45,64 @@
 int progNum;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	SVCXPRT *transp = NULL;
 	struct netconfig *nconf = NULL;
 	struct netbuf svcaddr;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
 	nconf = getnetconfigent("udp");
-	if (nconf == (struct netconfig *) NULL)
-	{
+	if (nconf == (struct netconfig *)NULL) {
 		//syslog(LOG_ERR, "getnetconfigent for udp failed");
 		printf("err nconf\n");
-		pthread_exit (1);
+		pthread_exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-    for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		svc_unreg(progNum + atoi(arg), VERSNUM);
-    	svc_reg(transp, progNum + atoi(arg), VERSNUM,
-            	exm_proc, nconf);
+		svc_reg(transp, progNum + atoi(arg), VERSNUM, exm_proc, nconf);
 
-    	svc_unreg(progNum + atoi(arg), VERSNUM);
+		svc_unreg(progNum + atoi(arg), VERSNUM);
 
-    	//If we are here, test was sucessfull
-    	thread_array_result[atoi(arg)] += 1;
-    }
+		//If we are here, test was sucessfull
+		thread_array_result[atoi(arg)] += 1;
+	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -118,43 +110,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
@@ -162,7 +148,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do here in that test case
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/1-basic.c
index 23917b0..d0ab7fc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/1-basic.c
@@ -42,49 +42,45 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    int sndVar = 0;
-    int recVar = -1;
-    CLIENT *client = NULL;
+	int sndVar = 0;
+	int recVar = -1;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 	enum clnt_stat rslt;
 
-    //First, test initialization : create client using intermediate level API
+	//First, test initialization : create client using intermediate level API
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	return 5;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		return 5;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	printf("5\n");
-    	return 5;
-    }
-
+	if (client == NULL) {
+		printf("5\n");
+		return 5;
+	}
 	//Call routine
-	rslt = clnt_call(client, PROCNUM,
-					 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                     (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                     tv);
+	rslt = clnt_call(client, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 tv);
 
 	test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/2-stress.c
index 3f464fd..1a6a2c8 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/2-stress.c
@@ -42,19 +42,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    int sndVar = 0;
-    int recVar = -1;
-    CLIENT *client = NULL;
+	int sndVar = 0;
+	int recVar = -1;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 	enum clnt_stat rslt;
@@ -62,41 +62,35 @@
 	int nbOk = 0;
 	int i;
 
-    //First, test initialization : create client using intermediate level API
+	//First, test initialization : create client using intermediate level API
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	return 5;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		return 5;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	printf("5\n");
-    	return 5;
-    }
-
+	if (client == NULL) {
+		printf("5\n");
+		return 5;
+	}
 	//Call routine
-	for (i = 0; i < nbCall; i++)
-	{
-		rslt = clnt_call(client, PROCNUM,
-					 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                     (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                     tv);
-    	if (rslt == RPC_SUCCESS)
+	for (i = 0; i < nbCall; i++) {
+		rslt = clnt_call(client, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				 tv);
+		if (rslt == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/4-mt.c
index 5cdd805..29e44b1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/4-mt.c
@@ -45,86 +45,77 @@
 char *hostname;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int sndVar = 0;
 	int recVar = -1;
-    CLIENT *client = NULL;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 	enum clnt_stat rslt;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
-
 	//First, test initialization : create client using intermediate level API
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit (5);
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		pthread_exit(5);
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(hostname, progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(hostname, progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	clnt_pcreateerror("ERR");
-    	thread_array_result[atoi(arg)] = 0;
-    	pthread_exit (5);
-    }
-
+	if (client == NULL) {
+		clnt_pcreateerror("ERR");
+		thread_array_result[atoi(arg)] = 0;
+		pthread_exit(5);
+	}
 	//Call routine
-	for (i = 0; i < callNb; i++)
-	{
-		rslt = clnt_call(client, PROCNUM,
-					 	 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                     	 (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                     	 tv);
+	for (i = 0; i < callNb; i++) {
+		rslt = clnt_call(client, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				 tv);
 
 		thread_array_result[atoi(arg)] += (rslt == RPC_SUCCESS);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	hostname = argc[1];
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -132,43 +123,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/5-scalability.c
index 3eae598..778e51b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/5-scalability.c
@@ -48,85 +48,80 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	int sndVar = 0;
-    int recVar = -1;
-    CLIENT *client = NULL;
+	int recVar = -1;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 
 	//First, test initialization : create client using intermediate level API
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit((void *)5);
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		pthread_exit((void *)5);
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(hostname, progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(hostname, progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	printf("5\n");
-    	pthread_exit((void *)5);
-    }
+	if (client == NULL) {
+		printf("5\n");
+		pthread_exit((void *)5);
+	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
-		clnt_call(client, PROCNUM,
-					 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                     (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                     tv);
+	for (i = 0; i < callNb; i++) {
+		clnt_call(client, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			  (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			  tv);
 	}
 
 	clnt_destroy(client);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, j, rthcreate;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -134,19 +129,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr, (size_t *) &ssz);//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -154,55 +149,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -214,8 +207,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/6-dataint.c
index 9696769..b83f242 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/6-dataint.c
@@ -40,17 +40,17 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
-    int recVar = -1;
-    CLIENT *client = NULL;
+	int recVar = -1;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 	enum clnt_stat rslt;
@@ -69,33 +69,29 @@
 	//create client using intermediate level API
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	return 5;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		return 5;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	printf("5\n");
-    	return 5;
-    }
-
+	if (client == NULL) {
+		printf("5\n");
+		return 5;
+	}
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
-	rslt = clnt_call(client, INTPROCNUM,
-					 (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                     (xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-                     tv);
+	rslt = clnt_call(client, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+			 tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -105,10 +101,9 @@
 	//Test positive number
 	intSnd = 16777216;
 
-	rslt = clnt_call(client, INTPROCNUM,
-					 (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                     (xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-                     tv);
+	rslt = clnt_call(client, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+			 tv);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -118,10 +113,9 @@
 	//Long test : call LNGPROCNUM RPC
 	lngSnd = -430000;
 
-	rslt = clnt_call(client, LNGPROCNUM,
-					 (xdrproc_t)xdr_long, (char *)&lngSnd, // xdr_in
-                     (xdrproc_t)xdr_long, (char *)&lngRec, // xdr_out
-                     tv);
+	rslt = clnt_call(client, LNGPROCNUM, (xdrproc_t) xdr_long, (char *)&lngSnd,	// xdr_in
+			 (xdrproc_t) xdr_long, (char *)&lngRec,	// xdr_out
+			 tv);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -131,10 +125,9 @@
 	//Double test : call DBLPROCNUM RPC
 	dblSnd = -1735.63000f;
 
-	rslt = clnt_call(client, DBLPROCNUM,
-					 (xdrproc_t)xdr_double, (char *)&dblSnd, // xdr_in
-                     (xdrproc_t)xdr_double, (char *)&dblRec, // xdr_out
-                     tv);
+	rslt = clnt_call(client, DBLPROCNUM, (xdrproc_t) xdr_double, (char *)&dblSnd,	// xdr_in
+			 (xdrproc_t) xdr_double, (char *)&dblRec,	// xdr_out
+			 tv);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -145,10 +138,9 @@
 	strSnd = "text to send.";
 	strRec = (char *)malloc(64 * sizeof(char));
 
-	rslt = clnt_call(client, STRPROCNUM,
-					 (xdrproc_t)xdr_wrapstring, (char *)&strSnd, // xdr_in
-                     (xdrproc_t)xdr_wrapstring, (char *)&strRec, // xdr_out
-                     tv);
+	rslt = clnt_call(client, STRPROCNUM, (xdrproc_t) xdr_wrapstring, (char *)&strSnd,	// xdr_in
+			 (xdrproc_t) xdr_wrapstring, (char *)&strRec,	// xdr_out
+			 tv);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/7-performance.c
index 065b694..1c91f02 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,87 +79,80 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
-    int sndVar = 0;
-    int recVar = -1;
-    CLIENT *client = NULL;
+	int sndVar = 0;
+	int recVar = -1;
+	CLIENT *client = NULL;
 	struct netconfig *nconf = NULL;
 	struct timeval tv;
 	enum clnt_stat cs;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    nconf = getnetconfigent("udp");
+	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	return 5;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("5\n");
+		return 5;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (client == NULL)
-    {
-    	printf("5\n");
-    	return 5;
-    }
-
+	if (client == NULL) {
+		printf("5\n");
+		return 5;
+	}
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
-		cs = clnt_call(client, PROCNUM,
-						 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                	     (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                    	 tv);
+		cs = clnt_call(client, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			       (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			       tv);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/8-complex.c
index d00a36d..0038468 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_call/8-complex.c
@@ -45,26 +45,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -72,38 +69,36 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	struct datas vars;
 	static double result = 0;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 	struct netconfig *nconf = NULL;
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("5\n");
-    	pthread_exit (5);
-    }
-
-	clnt = clnt_tp_create_timed(hostname, progNum,
-                                VERSNUM, (struct netconfig *)nconf, &total_timeout);
-
-	if (clnt == NULL)
-	{
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
 		printf("5\n");
-		pthread_exit (5);
+		pthread_exit(5);
 	}
 
-	if (run_mode == 1)
-	{
+	clnt = clnt_tp_create_timed(hostname, progNum,
+				    VERSNUM, (struct netconfig *)nconf,
+				    &total_timeout);
+
+	if (clnt == NULL) {
+		printf("5\n");
+		pthread_exit(5);
+	}
+
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -113,53 +108,50 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-    clnt_call((CLIENT *)clnt, CALCTHREADPROC,
-				(xdrproc_t)xdr_datas, (char *)&vars, // xdr_in
-                (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes, // xdr_out
-				total_timeout);
+	clnt_call((CLIENT *) clnt, CALCTHREADPROC, (xdrproc_t) xdr_datas, (char *)&vars,	// xdr_in
+		  (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,	// xdr_out
+		  total_timeout);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -167,43 +159,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/1-basic.c
index cb57fd8..501ea41 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/1-basic.c
@@ -43,14 +43,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *client = NULL;
@@ -62,23 +62,21 @@
 	//First, test initialization
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("1\n");
-    	return 1;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("1\n");
+		return 1;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
 	//Call routine
 	rslt = clnt_control(client, CLGET_FD, (int *)&fd);
-    if (run_mode)
-    {
+	if (run_mode) {
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 		printf("F. Desc. : %d\n", fd);
@@ -90,7 +88,7 @@
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-    //clnt_destroy(client);
+	//clnt_destroy(client);
 
 	return test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/3-limits.c
index 9b95f18..9a38b7e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_control/3-limits.c
@@ -37,14 +37,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *client = NULL;
@@ -58,50 +58,43 @@
 	//First, test initialization
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("1\n");
-    	return 1;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("1\n");
+		return 1;
+	}
 
-    tv.tv_sec = 10;
+	tv.tv_sec = 10;
 	tv.tv_usec = 20;
 
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
-    if (client == NULL)
-    {
-    	//No client creation
-    	printf("1\n");
-    	return 1;
-    }
-
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
+	if (client == NULL) {
+		//No client creation
+		printf("1\n");
+		return 1;
+	}
 	//Call tested function using all tests cases
-	rslt = clnt_control(client, CLGET_SVC_ADDR, (struct netbuf *)&tst_nconf);
-	if (rslt == 0)
-	{
+	rslt =
+	    clnt_control(client, CLGET_SVC_ADDR, (struct netbuf *)&tst_nconf);
+	if (rslt == 0) {
 		test_status = 1;
 	}
 
 	rslt = clnt_control(client, CLGET_TIMEOUT, (struct timeval *)&tv);
-	if (rslt == 0)
-	{
+	if (rslt == 0) {
 		test_status = 1;
 	}
 
 	rslt = clnt_control(client, CLGET_FD, (int *)&fd);
-	if (rslt == 0)
-	{
+	if (rslt == 0) {
 		test_status = 1;
 	}
 
 	rslt = clnt_control(client, CLGET_VERS, (unsigned long *)&clver);
-	if (rslt == 0)
-	{
+	if (rslt == 0) {
 		test_status = 1;
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create/1-basic.c
index 5f24299..81c9b93 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create/1-basic.c
@@ -43,14 +43,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *client = NULL;
@@ -59,30 +59,27 @@
 	//First, test initialization
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("1\n");
-    	return 1;
-    }
-
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("1\n");
+		return 1;
+	}
 	//Call routine
-    client = clnt_tp_create(argc[1], progNum,
-                            VERSNUM, (struct netconfig *)nconf);
+	client = clnt_tp_create(argc[1], progNum,
+				VERSNUM, (struct netconfig *)nconf);
 
-    if (run_mode)
-    {
+	if (run_mode) {
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
-	test_status = ((CLIENT *)client != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) client != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-    //clnt_destroy(client);
+	//clnt_destroy(client);
 
 	return test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/1-basic.c
index bb744aa..7d48032 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/1-basic.c
@@ -42,14 +42,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *client = NULL;
@@ -59,33 +59,31 @@
 	//First, test initialization
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("1\n");
-    	return 1;
-    }
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("1\n");
+		return 1;
+	}
 
-    tv.tv_sec = 1;
+	tv.tv_sec = 1;
 	tv.tv_usec = 1;
 
 	//Call routine
-    client = clnt_tp_create_timed(argc[1], progNum,
-                                  VERSNUM, (struct netconfig *)nconf, &tv);
+	client = clnt_tp_create_timed(argc[1], progNum,
+				      VERSNUM, (struct netconfig *)nconf, &tv);
 
-    if (run_mode)
-    {
+	if (run_mode) {
 		printf("client : %d\n", client);
 		printf("nconf : %d\n", nconf);
 	}
 
-	test_status = ((CLIENT *)client != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) client != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
 
-    //clnt_destroy(client);
+	//clnt_destroy(client);
 
 	return test_status;
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/3-limits.c
index dec63ee..bec53ea 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_clnt_tp_create_timed/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 3
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int init_tout;
 	int next_tout;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -65,13 +64,11 @@
 	//First, test initialization
 	nconf = getnetconfigent("udp");
 
-    if ((struct netconfig *)nconf == NULL)
-    {
-    	//Test failed
-    	printf("1\n");
-    	return 1;
-    }
-
+	if ((struct netconfig *)nconf == NULL) {
+		//Test failed
+		printf("1\n");
+		return 1;
+	}
 	//Test arguments initialization
 	paramList[0].init_tout = 0;
 	paramList[0].next_tout = 1;
@@ -81,26 +78,24 @@
 	paramList[2].next_tout = 1;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
-			printf("Test using values : %d ", paramList[i].init_tout);
+		if (run_mode == 1) {
+			printf("Test using values : %d ",
+			       paramList[i].init_tout);
 			printf("%d", paramList[i].next_tout);
 			printf("\n");
 		}
-
 		//Call function
 		tv.tv_sec = paramList[i].init_tout;
 		tv.tv_usec = paramList[i].next_tout;
 
 		//Call routine
-    	client = clnt_tp_create_timed(argc[1], progNum,
-                                  	 VERSNUM, (struct netconfig *)nconf, &tv);
+		client = clnt_tp_create_timed(argc[1], progNum,
+					      VERSNUM,
+					      (struct netconfig *)nconf, &tv);
 		//Check result
-		if (client == NULL)
-		{
+		if (client == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_svc_tp_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_svc_tp_create/1-basic.c
index 81017cd..a5b4d37 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_svc_tp_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_interlevel_svc_tp_create/1-basic.c
@@ -46,23 +46,20 @@
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[1]);
 	SVCXPRT *transp;
 	struct netconfig *nconf;
 
 	//Test initialization
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
-
 	//Call routine
-	transp = svc_tp_create(exm_proc, progNum, VERSNUM,
-                           nconf);
+	transp = svc_tp_create(exm_proc, progNum, VERSNUM, nconf);
 
-    test_status = (transp != NULL) ? 0 : 1;
+	test_status = (transp != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
@@ -70,7 +67,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/1-basic.c
index f60e482..df18454 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/1-basic.c
@@ -39,7 +39,7 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -48,29 +48,28 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP -> not used for this test
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat rslt;
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server # %d\n", progNum);
 	}
 
 	rslt = rpc_broadcast(progNum, VERSNUM, PROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&sndVar,
-						  (xdrproc_t)xdr_int, (char *)&recVar,
-						  (resultproc_t)eachresult, nettype);
+			     (xdrproc_t) xdr_int, (char *)&sndVar,
+			     (xdrproc_t) xdr_int, (char *)&recVar,
+			     (resultproc_t) eachresult, nettype);
 
 	test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/2-stress.c
index f97af35..a8022b4 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/2-stress.c
@@ -39,7 +39,7 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 }
@@ -47,41 +47,38 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP -> not used for this test
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat rslt;
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
-    int nbCall = atoi(argc[3]);
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server # %d\n", progNum);
 	}
 
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		rslt = rpc_broadcast(progNum, VERSNUM, PROCNUM,
-							  (xdrproc_t)xdr_int, (char *)&sndVar,
-							  (xdrproc_t)xdr_int, (char *)&recVar,
-							  (resultproc_t)eachresult, nettype);
-    	if (rslt == RPC_SUCCESS)
+				     (xdrproc_t) xdr_int, (char *)&sndVar,
+				     (xdrproc_t) xdr_int, (char *)&recVar,
+				     (resultproc_t) eachresult, nettype);
+		if (rslt == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/4-mt.c
index 1677609..699938f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/4-mt.c
@@ -45,64 +45,60 @@
 char *nettype;
 int callNb;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	enum clnt_stat rslt;
-    int sndVar = atoi(arg);
-    int recVar;
-    int i;
+	int sndVar = atoi(arg);
+	int recVar;
+	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		rslt = rpc_broadcast(progNum, VERSNUM, PROCNUM,
-						  	 (xdrproc_t)xdr_int, (char *)&sndVar,
-						  	 (xdrproc_t)xdr_int, (char *)&recVar,
-						  	 (resultproc_t) eachresult, nettype);
+				     (xdrproc_t) xdr_int, (char *)&sndVar,
+				     (xdrproc_t) xdr_int, (char *)&recVar,
+				     (resultproc_t) eachresult, nettype);
 
 		thread_array_result[atoi(arg)] += (rslt == RPC_SUCCESS);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    nettype = "visible";
+	nettype = "visible";
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -110,43 +106,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/5-scalability.c
index 312e014..76deef5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/5-scalability.c
@@ -48,65 +48,63 @@
 char *nettype = "visible";
 char *hostname;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	int sndVar = 0;
 	int recVar;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		rpc_broadcast(progNum, VERSNUM, PROCNUM,
-						(xdrproc_t)xdr_int, (char *)&sndVar,
-						(xdrproc_t)xdr_int, (char *)&recVar,
-						(resultproc_t)eachresult, nettype);
+			      (xdrproc_t) xdr_int, (char *)&sndVar,
+			      (xdrproc_t) xdr_int, (char *)&recVar,
+			      (resultproc_t) eachresult, nettype);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -114,19 +112,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr, (size_t *) &ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -134,55 +132,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -194,8 +190,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/6-dataint.c
index f9d8562..300442e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/6-dataint.c
@@ -37,7 +37,7 @@
 #define STRPROCNUM 40
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -46,16 +46,16 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    char nettype[16] = "visible";
+	char nettype[16] = "visible";
 	//Sent variables
 	int intSnd;
 	double dblSnd;
@@ -74,9 +74,9 @@
 	intSnd = -65536;
 
 	rpc_broadcast(progNum, VERSNUM, INTPROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&intSnd,
-						  (xdrproc_t)xdr_int, (char *)&intRec,
-						  (resultproc_t)eachresult, nettype);
+		      (xdrproc_t) xdr_int, (char *)&intSnd,
+		      (xdrproc_t) xdr_int, (char *)&intRec,
+		      (resultproc_t) eachresult, nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -87,9 +87,9 @@
 	intSnd = 16777216;
 
 	rpc_broadcast(progNum, VERSNUM, INTPROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&intSnd,
-						  (xdrproc_t)xdr_int, (char *)&intRec,
-						  (resultproc_t)eachresult, nettype);
+		      (xdrproc_t) xdr_int, (char *)&intSnd,
+		      (xdrproc_t) xdr_int, (char *)&intRec,
+		      (resultproc_t) eachresult, nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -100,9 +100,9 @@
 	lngSnd = -430000;
 
 	rpc_broadcast(progNum, VERSNUM, LNGPROCNUM,
-						  (xdrproc_t)xdr_long, (char *)&lngSnd,
-						  (xdrproc_t)xdr_long, (char *)&lngRec,
-						  (resultproc_t)eachresult, nettype);
+		      (xdrproc_t) xdr_long, (char *)&lngSnd,
+		      (xdrproc_t) xdr_long, (char *)&lngRec,
+		      (resultproc_t) eachresult, nettype);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -113,9 +113,9 @@
 	dblSnd = -1735.63000f;
 
 	rpc_broadcast(progNum, VERSNUM, DBLPROCNUM,
-						  (xdrproc_t)xdr_double, (char *)&dblSnd,
-						  (xdrproc_t)xdr_double, (char *)&dblRec,
-						  (resultproc_t)eachresult, nettype);
+		      (xdrproc_t) xdr_double, (char *)&dblSnd,
+		      (xdrproc_t) xdr_double, (char *)&dblRec,
+		      (resultproc_t) eachresult, nettype);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -127,9 +127,9 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	rpc_broadcast(progNum, VERSNUM, DBLPROCNUM,
-						  (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-						  (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-						  (resultproc_t)eachresult, nettype);
+		      (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+		      (xdrproc_t) xdr_wrapstring, (char *)&strRec,
+		      (resultproc_t) eachresult, nettype);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/7-performance.c
index 6adfb1a..d42a842 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/7-performance.c
@@ -37,7 +37,7 @@
 //Set number of test call
 int maxIter;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -49,8 +49,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -63,8 +62,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -77,8 +75,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -88,64 +85,61 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = rpc_broadcast(progNum, VERSNUM, PROCNUM,
-						  	 (xdrproc_t)xdr_int, (char *)&sndVar,
-						  	 (xdrproc_t)xdr_int, (char *)&recVar,
-						  	 (resultproc_t) eachresult, nettype);
+				   (xdrproc_t) xdr_int, (char *)&sndVar,
+				   (xdrproc_t) xdr_int, (char *)&recVar,
+				   (resultproc_t) eachresult, nettype);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/8-complex.c
index 03b3122..6b017e5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast/8-complex.c
@@ -39,12 +39,11 @@
 int currentAnswer;
 int maxAnswer;
 
-bool_t eachResult (char *out, struct sockaddr_in *addr)
+bool_t eachResult(char *out, struct sockaddr_in *addr)
 {
 	//printf("in each result\n");
 	currentAnswer++;
-	if (currentAnswer >= maxAnswer)
-	{
+	if (currentAnswer >= maxAnswer) {
 		return (1);
 	}
 	return (0);
@@ -53,37 +52,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of host ready to answer to broadcast
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of host ready to answer to broadcast
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	char nettype[16] = "visible";
 	int varSnd = 0;
 	int varRec;
 
-	bool_t eachResult (char *out, struct sockaddr_in *addr);
+	bool_t eachResult(char *out, struct sockaddr_in *addr);
 	maxAnswer = atoi(argc[3]);
 	currentAnswer = 0;
 
 	//Show information in debug mode...
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 		printf("Max SVC : %d\n", maxAnswer);
 	}
-
 	//Call broadcast routine
 	cs = rpc_broadcast(progNum, VERSNUM, PINGPROC,
-						  (xdrproc_t)xdr_int, (char *)&varSnd,
-						  (xdrproc_t)xdr_int, (char *)&varRec,
-						  (resultproc_t) eachResult, nettype);
+			   (xdrproc_t) xdr_int, (char *)&varSnd,
+			   (xdrproc_t) xdr_int, (char *)&varRec,
+			   (resultproc_t) eachResult, nettype);
 
 	if (currentAnswer == maxAnswer)
 		test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/1-basic.c
index 195b5fb..df44800 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/1-basic.c
@@ -39,7 +39,7 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -48,30 +48,30 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP -> not used for this test
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Init. timeout
-	//					   argc[4] : Reply timeout
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Init. timeout
+	//                                         argc[4] : Reply timeout
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
-    enum clnt_stat rslt;
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
+	enum clnt_stat rslt;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server # %d\n", progNum);
 	}
 
 	rslt = rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&sndVar,
-						  (xdrproc_t)xdr_int, (char *)&recVar,
-						  (resultproc_t)eachresult, atoi(argc[3]), atoi(argc[4]), nettype);
+				 (xdrproc_t) xdr_int, (char *)&sndVar,
+				 (xdrproc_t) xdr_int, (char *)&recVar,
+				 (resultproc_t) eachresult, atoi(argc[3]),
+				 atoi(argc[4]), nettype);
 
 	test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/2-stress.c
index 2c2b07e..326944b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/2-stress.c
@@ -39,7 +39,7 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 }
@@ -47,42 +47,40 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP -> not used for this test
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Init. timeout
-	//					   argc[4] : Reply timeout
-	//					   argc[5] : Number of testes function calls
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Init. timeout
+	//                                         argc[4] : Reply timeout
+	//                                         argc[5] : Number of testes function calls
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat rslt;
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
-    int nbCall = atoi(argc[5]);
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
+	int nbCall = atoi(argc[5]);
 	int nbOk = 0;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server # %d\n", progNum);
 	}
 
-	for (i = 0; i < nbCall; i++)
-	{
+	for (i = 0; i < nbCall; i++) {
 		rslt = rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-							  (xdrproc_t)xdr_int, (char *)&sndVar,
-							  (xdrproc_t)xdr_int, (char *)&recVar,
-							  (resultproc_t)eachresult, atoi(argc[3]), atoi(argc[4]), nettype);
+					 (xdrproc_t) xdr_int, (char *)&sndVar,
+					 (xdrproc_t) xdr_int, (char *)&recVar,
+					 (resultproc_t) eachresult,
+					 atoi(argc[3]), atoi(argc[4]), nettype);
 		if (rslt == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/3-limits.c
index 8a50fd4..f1103f7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/3-limits.c
@@ -37,13 +37,12 @@
 //Other define
 #define NBCASE 3
 
-typedef struct
-{
+typedef struct {
 	int init_tout;
 	int next_tout;
-}params;
+} params;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -52,18 +51,18 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	enum clnt_stat rslt;
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
 	int i;
 	int progNum = atoi(argc[2]);
 	params paramList[NBCASE];
@@ -77,30 +76,29 @@
 	paramList[2].next_tout = 1000;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
-			printf("Test using values : %d ", paramList[i].init_tout);
+		if (run_mode == 1) {
+			printf("Test using values : %d ",
+			       paramList[i].init_tout);
 			printf("%d", paramList[i].next_tout);
 			printf("\n");
 		}
-
 		//Call function
 		rslt = rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-						  		 (xdrproc_t)xdr_int, (char *)&sndVar,
-						  		 (xdrproc_t)xdr_int, (char *)&recVar,
-						  		 (resultproc_t)eachresult, paramList[i].init_tout, paramList[i].next_tout, nettype);
+					 (xdrproc_t) xdr_int, (char *)&sndVar,
+					 (xdrproc_t) xdr_int, (char *)&recVar,
+					 (resultproc_t) eachresult,
+					 paramList[i].init_tout,
+					 paramList[i].next_tout, nettype);
 
 		//Check result
-		if (rslt != RPC_TIMEDOUT)
-		{
+		if (rslt != RPC_TIMEDOUT) {
 			//test has failed
 			test_status = 1;
 			break;
-		}/**/
-	}
+		}
+	/**/}
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/4-mt.c
index 526adc5..4cf21d0 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/4-mt.c
@@ -45,68 +45,65 @@
 char *nettype;
 int callNb;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	enum clnt_stat rslt;
-    int sndVar = atoi(arg);
-    int recVar;
-    int i;
+	int sndVar = atoi(arg);
+	int recVar;
+	int i;
 
-    int iTimeOut = 1;
-    int mTimeOut = 1;
+	int iTimeOut = 1;
+	int mTimeOut = 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		rslt = rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-						  		 (xdrproc_t)xdr_int, (char *)&recVar,
-						  	 	 (xdrproc_t)xdr_int, (char *)&recVar,
-						  	 	 (resultproc_t)eachresult, iTimeOut, mTimeOut, nettype);
+					 (xdrproc_t) xdr_int, (char *)&recVar,
+					 (xdrproc_t) xdr_int, (char *)&recVar,
+					 (resultproc_t) eachresult, iTimeOut,
+					 mTimeOut, nettype);
 
 		thread_array_result[atoi(arg)] += (rslt == RPC_SUCCESS);
-    }
+	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    nettype = "visible";
+	nettype = "visible";
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -114,43 +111,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/5-scalability.c
index 43f1c94..3898d87 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/5-scalability.c
@@ -48,65 +48,63 @@
 char *nettype = "visible";
 char *hostname;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	int sndVar = 0;
 	int recVar;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
+	for (i = 0; i < callNb; i++) {
 		rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&sndVar,
-						  (xdrproc_t)xdr_int, (char *)&recVar,
-						  (resultproc_t)eachresult, 1, 1, nettype);
+				  (xdrproc_t) xdr_int, (char *)&sndVar,
+				  (xdrproc_t) xdr_int, (char *)&recVar,
+				  (resultproc_t) eachresult, 1, 1, nettype);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -114,19 +112,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr, (size_t *) &ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -134,55 +132,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -194,8 +190,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/6-dataint.c
index 0a7ab79..4284d85 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/6-dataint.c
@@ -37,7 +37,7 @@
 #define STRPROCNUM 40
 #define VERSNUM 1
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -46,16 +46,16 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
-    char nettype[16] = "visible";
+	char nettype[16] = "visible";
 	//Sent variables
 	int intSnd;
 	double dblSnd;
@@ -74,9 +74,9 @@
 	intSnd = -65536;
 
 	rpc_broadcast_exp(progNum, VERSNUM, INTPROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&intSnd,
-						  (xdrproc_t)xdr_int, (char *)&intRec,
-						  (resultproc_t) eachresult, 1, 1, nettype);
+			  (xdrproc_t) xdr_int, (char *)&intSnd,
+			  (xdrproc_t) xdr_int, (char *)&intRec,
+			  (resultproc_t) eachresult, 1, 1, nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -87,9 +87,9 @@
 	intSnd = 16777216;
 
 	rpc_broadcast_exp(progNum, VERSNUM, INTPROCNUM,
-						  (xdrproc_t)xdr_int, (char *)&intSnd,
-						  (xdrproc_t)xdr_int, (char *)&intRec,
-						  (resultproc_t) eachresult, 1, 1, nettype);
+			  (xdrproc_t) xdr_int, (char *)&intSnd,
+			  (xdrproc_t) xdr_int, (char *)&intRec,
+			  (resultproc_t) eachresult, 1, 1, nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -100,9 +100,9 @@
 	lngSnd = -430000;
 
 	rpc_broadcast_exp(progNum, VERSNUM, LNGPROCNUM,
-						  (xdrproc_t)xdr_long, (char *)&lngSnd,
-						  (xdrproc_t)xdr_long, (char *)&lngSnd,
-						  (resultproc_t) eachresult, 1, 1, nettype);
+			  (xdrproc_t) xdr_long, (char *)&lngSnd,
+			  (xdrproc_t) xdr_long, (char *)&lngSnd,
+			  (resultproc_t) eachresult, 1, 1, nettype);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -113,9 +113,9 @@
 	dblSnd = -1735.63000f;
 
 	rpc_broadcast_exp(progNum, VERSNUM, DBLPROCNUM,
-						  (xdrproc_t)xdr_long, (char *)&dblSnd,
-						  (xdrproc_t)xdr_long, (char *)&dblSnd,
-						  (resultproc_t) eachresult, 1, 1, nettype);
+			  (xdrproc_t) xdr_long, (char *)&dblSnd,
+			  (xdrproc_t) xdr_long, (char *)&dblSnd,
+			  (resultproc_t) eachresult, 1, 1, nettype);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -127,9 +127,9 @@
 	strRec = (char *)malloc(64 * sizeof(char));
 
 	rpc_broadcast_exp(progNum, VERSNUM, DBLPROCNUM,
-						  (xdrproc_t)xdr_wrapstring, (char *)&strSnd,
-						  (xdrproc_t)xdr_wrapstring, (char *)&strRec,
-						  (resultproc_t) eachresult, 1, 1, nettype);
+			  (xdrproc_t) xdr_wrapstring, (char *)&strSnd,
+			  (xdrproc_t) xdr_wrapstring, (char *)&strRec,
+			  (resultproc_t) eachresult, 1, 1, nettype);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/7-performance.c
index 4276956..47f76b6 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/7-performance.c
@@ -37,7 +37,7 @@
 //Set number of test call
 int maxIter;
 
-int eachresult (char *out, struct sockaddr_in *addr)
+int eachresult(char *out, struct sockaddr_in *addr)
 {
 	//Nothing to do for that test
 	return 1;
@@ -49,8 +49,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -63,8 +62,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -77,8 +75,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -88,64 +85,62 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
-    enum clnt_stat cs;
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
+	enum clnt_stat cs;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
 		cs = rpc_broadcast_exp(progNum, VERSNUM, PROCNUM,
-						  		(xdrproc_t)xdr_int, (char *)&sndVar,
-						  		(xdrproc_t)xdr_int, (char *)&recVar,
-						  		(resultproc_t)eachresult, atoi(argc[3]), atoi(argc[4]), nettype);
+				       (xdrproc_t) xdr_int, (char *)&sndVar,
+				       (xdrproc_t) xdr_int, (char *)&recVar,
+				       (resultproc_t) eachresult, atoi(argc[3]),
+				       atoi(argc[4]), nettype);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/8-complex.c
index 60caf3f..06a86de 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_broadcast_exp/8-complex.c
@@ -39,12 +39,11 @@
 int currentAnswer;
 int maxAnswer;
 
-bool_t eachResult (char *out, struct sockaddr_in *addr)
+bool_t eachResult(char *out, struct sockaddr_in *addr)
 {
 	//printf("in each result\n");
 	currentAnswer++;
-	if (currentAnswer >= maxAnswer)
-	{
+	if (currentAnswer >= maxAnswer) {
 		return (1);
 	}
 	return (0);
@@ -53,37 +52,35 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of host ready to answer to broadcast
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of host ready to answer to broadcast
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
 	char nettype[16] = "visible";
 	int varSnd = 0;
 	int varRec;
 
-	bool_t eachResult (char *out, struct sockaddr_in *addr);
+	bool_t eachResult(char *out, struct sockaddr_in *addr);
 	maxAnswer = atoi(argc[3]);
 	currentAnswer = 0;
 
 	//Show information in debug mode...
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("progNum : %d\n", progNum);
 		printf("Max SVC : %d\n", maxAnswer);
 	}
-
 	//Call broadcast routine
-	cs = rpc_broadcast_exp (progNum, VERSNUM, PINGPROC,
-						  	(xdrproc_t)xdr_int, (char *)&varSnd,
-						  	(xdrproc_t)xdr_int, (char *)&varRec,
-						  	(resultproc_t)eachResult, 0, 100, nettype);
+	cs = rpc_broadcast_exp(progNum, VERSNUM, PINGPROC,
+			       (xdrproc_t) xdr_int, (char *)&varSnd,
+			       (xdrproc_t) xdr_int, (char *)&varRec,
+			       (resultproc_t) eachResult, 0, 100, nettype);
 
 	if (currentAnswer == maxAnswer)
 		test_status = 0;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/1-basic.c
index f2963d9..0ae82d4 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/1-basic.c
@@ -42,39 +42,37 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat rslt;
-    char hostname[256] = { 0 };
-    char nettype[16] = "visible";
-    int sndVar = 10;
-    int recVar = -1;
+	char hostname[256] = { 0 };
+	char nettype[16] = "visible";
+	int sndVar = 10;
+	int recVar = -1;
 
-    strcpy(hostname, argc[1]);
+	strcpy(hostname, argc[1]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Server : %s\n", hostname);
 		fprintf(stderr, "Server # %d\n", progNum);
 	}
 
-	rslt = rpc_call(hostname, progNum, VERSNUM, PROCNUM,
-                    (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                    nettype);
-    //fprintf(stderr, "received = %d\n", recVar);
+	rslt = rpc_call(hostname, progNum, VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			(xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			nettype);
+	//fprintf(stderr, "received = %d\n", recVar);
 
-	if (run_mode == 1)
-        {
-		if (rslt != RPC_SUCCESS) fprintf(stderr,"FAILLLLLLLLLLLLLLLLLLLLLL\n");
-  }
+	if (run_mode == 1) {
+		if (rslt != RPC_SUCCESS)
+			fprintf(stderr, "FAILLLLLLLLLLLLLLLLLLLLLL\n");
+	}
 
 	test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/2-stress.c
index 01641d7..54f3cc6 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/2-stress.c
@@ -42,45 +42,41 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	enum clnt_stat rslt;
-    char hostname[256] = { 0 };
-    char nettype[16] = "visible";
-    int sndVar = 0;
-    int recVar = -1;
-    int nbCall = atoi(argc[3]);
+	char hostname[256] = { 0 };
+	char nettype[16] = "visible";
+	int sndVar = 0;
+	int recVar = -1;
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
-    strcpy(hostname, argc[1]);
+	strcpy(hostname, argc[1]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", hostname);
 		printf("Server # %d\n", progNum);
 	}
 
-    for (i = 0; i < nbCall; i++)
-	{
-		rslt = rpc_call(hostname, progNum, VERSNUM, PROCNUM,
-                    	(xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    	(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                    	nettype);
+	for (i = 0; i < nbCall; i++) {
+		rslt = rpc_call(hostname, progNum, VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				(xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				nettype);
 		if (rslt == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/4-mt.c
index 85654c7..72ae47e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/4-mt.c
@@ -46,65 +46,60 @@
 int progNum;
 int callNb;
 
-void *my_thread_process (void *arg)
+void *my_thread_process(void *arg)
 {
 	enum clnt_stat rslt;
-    int sndVar = atoi(arg);
-    int recVar;
-    int i;
+	int sndVar = atoi(arg);
+	int recVar;
+	int i;
 
-    if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 		fprintf(stderr, "%s\n", nettype);
-    	fprintf(stderr, "%s\n", hostname);
-    	fprintf(stderr, "Value sent : %d\n", sndVar);
-    }
-
-	for (i = 0; i < callNb; i++)
-	{
-		rslt = rpc_call(hostname, progNum + atoi(arg), VERSNUM, PROCNUM,
-                    (xdrproc_t)xdr_int, (char *)&sndVar,    // xdr_in
-                    (xdrproc_t)xdr_int, (char *)&recVar,    // xdr_out
-                    nettype);	/**/
-
-    	//printf("Value received : %d\n", recVar);
-
-		thread_array_result[atoi(arg)] = thread_array_result[atoi(arg)] + (rslt == RPC_SUCCESS);
+		fprintf(stderr, "%s\n", hostname);
+		fprintf(stderr, "Value sent : %d\n", sndVar);
 	}
 
-    pthread_exit (0);
+	for (i = 0; i < callNb; i++) {
+		rslt = rpc_call(hostname, progNum + atoi(arg), VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				(xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				nettype);
+		/**/
+		    //printf("Value received : %d\n", recVar);
+		    thread_array_result[atoi(arg)] =
+		    thread_array_result[atoi(arg)] + (rslt == RPC_SUCCESS);
+	}
+
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    nettype = "visible";
+	nettype = "visible";
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
-    hostname = argc[1];
+	hostname = argc[1];
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -112,43 +107,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/5-scalability.c
index 538cf18..331447e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/5-scalability.c
@@ -48,59 +48,56 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
-    int sndVar = 10;
-    int recVar = -1;
+	int sndVar = 10;
+	int recVar = -1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
-		rpc_call(hostname, progNum, VERSNUM, PROCNUM,
-                 (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                 (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                 nettype);
+	for (i = 0; i < callNb; i++) {
+		rpc_call(hostname, progNum, VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 nettype);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -108,19 +105,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr,(size_t *) &ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -128,55 +125,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -188,8 +183,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/6-dataint.c
index 62c3e6c..194a0ba 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/6-dataint.c
@@ -40,14 +40,14 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	//Sent variables
 	int intSnd;
 	double dblSnd;
@@ -61,7 +61,7 @@
 	enum clnt_stat rslt;
 	//
 	char *hostname;
-    char nettype[16] = "visible";
+	char nettype[16] = "visible";
 	int progNum = atoi(argc[2]);
 
 	//Test initialization
@@ -70,10 +70,9 @@
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
-	rslt = rpc_call(hostname, progNum, VERSNUM, INTPROCNUM,
-                    (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                    (xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-                    nettype);
+	rslt = rpc_call(hostname, progNum, VERSNUM, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+			(xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+			nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -82,10 +81,9 @@
 
 	//Test positive number
 	intSnd = 16777216;
-	rslt = rpc_call(hostname, progNum, VERSNUM, INTPROCNUM,
-                    (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                    (xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-                    nettype);
+	rslt = rpc_call(hostname, progNum, VERSNUM, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+			(xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+			nettype);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -94,10 +92,9 @@
 
 	//Double test : call DBLPROCNUM RPC
 	dblSnd = -1735.63000f;
-	rslt = rpc_call(hostname, progNum, VERSNUM, DBLPROCNUM,
-                    (xdrproc_t)xdr_double, (char *)&dblSnd, // xdr_in
-                    (xdrproc_t)xdr_double, (char *)&dblRec, // xdr_out
-                    nettype);
+	rslt = rpc_call(hostname, progNum, VERSNUM, DBLPROCNUM, (xdrproc_t) xdr_double, (char *)&dblSnd,	// xdr_in
+			(xdrproc_t) xdr_double, (char *)&dblRec,	// xdr_out
+			nettype);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -106,10 +103,9 @@
 
 	//Long test : call LNGPROCNUM RPC
 	lngSnd = -430000;
-	rslt = rpc_call(hostname, progNum, VERSNUM, LNGPROCNUM,
-                    (xdrproc_t)xdr_long, (char *)&lngSnd, // xdr_in
-                    (xdrproc_t)xdr_long, (char *)&lngRec, // xdr_out
-                    nettype);
+	rslt = rpc_call(hostname, progNum, VERSNUM, LNGPROCNUM, (xdrproc_t) xdr_long, (char *)&lngSnd,	// xdr_in
+			(xdrproc_t) xdr_long, (char *)&lngRec,	// xdr_out
+			nettype);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -120,15 +116,15 @@
 	strSnd = "text to send.";
 	strRec = (char *)malloc(64 * sizeof(char));
 
-	rslt = rpc_call(hostname, progNum, VERSNUM, STRPROCNUM,
-                    (xdrproc_t)xdr_wrapstring, (char *)&strSnd, // xdr_in
-                    (xdrproc_t)xdr_wrapstring, (char *)&strRec, // xdr_out
-                    nettype);
+	rslt = rpc_call(hostname, progNum, VERSNUM, STRPROCNUM, (xdrproc_t) xdr_wrapstring, (char *)&strSnd,	// xdr_in
+			(xdrproc_t) xdr_wrapstring, (char *)&strRec,	// xdr_out
+			nettype);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
 	if (run_mode == 1)
-		printf("Send (string) : \"%s\", Received : \"%s\"\n", strSnd, strRec);
+		printf("Send (string) : \"%s\", Received : \"%s\"\n", strSnd,
+		       strRec);
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/7-performance.c
index 251ef54..9ef2a04 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,73 +79,67 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	enum clnt_stat cs;
-    char hostname[256] = { 0 };
-    char nettype[16] = "visible";
-    int sndVar = 10;
-    int recVar = -1;
+	char hostname[256] = { 0 };
+	char nettype[16] = "visible";
+	int sndVar = 10;
+	int recVar = -1;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    strcpy(hostname, argc[1]);
+	strcpy(hostname, argc[1]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", hostname);
 		printf("Server # %d\n", progNum);
 	}
-
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
-		cs = rpc_call(hostname, progNum, VERSNUM, PROCNUM,
-                    	(xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    	(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-                    	nettype);
+		cs = rpc_call(hostname, progNum, VERSNUM, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			      (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			      nettype);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/8-complex.c
index 03db2d3..ececb8f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_call/8-complex.c
@@ -45,26 +45,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -72,14 +69,13 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	struct datas vars;
 	static double result = 0;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -89,53 +85,50 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-	rpc_call(hostname, progNum, VERSNUM, CALCTHREADPROC,
-             (xdrproc_t)xdr_datas, (char *)&vars, // xdr_in
-             (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes, // xdr_out
-             nettype);
+	rpc_call(hostname, progNum, VERSNUM, CALCTHREADPROC, (xdrproc_t) xdr_datas, (char *)&vars,	// xdr_in
+		 (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,	// xdr_out
+		 nettype);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -143,43 +136,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/1-basic.c
index 789b777..e6f2044 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/1-basic.c
@@ -39,36 +39,36 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-char *registeredProc(char *i_var) {
-        static int result = 0;
-        result = *i_var;
-        return (char *)&result;
+char *registeredProc(char *i_var)
+{
+	static int result = 0;
+	result = *i_var;
+	return (char *)&result;
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 
 	char *registeredProc();
 	bool_t rslt;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 	}
 
 	svc_unreg(progNum, VERSNUM);
 	rslt = rpc_reg(progNum, VERSNUM, PROCNUM, (void *)registeredProc,
-			(xdrproc_t)xdr_int, (xdrproc_t)xdr_int, "visible");
+		       (xdrproc_t) xdr_int, (xdrproc_t) xdr_int, "visible");
 	test_status = (rslt == 0) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/2-stress.c
index 2c2b982..c70f31e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/2-stress.c
@@ -39,24 +39,25 @@
 #define PROCNUM 1
 #define VERSNUM 1
 
-char *registeredProc(char *i_var) {
+char *registeredProc(char *i_var)
+{
 	static int result = 0;
-        result = *i_var;
-        return (char *)&result;
+	result = *i_var;
+	return (char *)&result;
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
@@ -65,23 +66,22 @@
 	char *registeredProc();
 	bool_t rslt;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 	}
 
 	svc_unreg(progNum, VERSNUM);
 
-	for (i = 0; i < nbCall; i++)
-	{
-		rslt = rpc_reg(progNum, VERSNUM, PROCNUM, (void *)registeredProc,
-				(xdrproc_t)xdr_int, (xdrproc_t)xdr_int, "visible");
+	for (i = 0; i < nbCall; i++) {
+		rslt =
+		    rpc_reg(progNum, VERSNUM, PROCNUM, (void *)registeredProc,
+			    (xdrproc_t) xdr_int, (xdrproc_t) xdr_int,
+			    "visible");
 		if (rslt == 0)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/4-mt.c
index bd05f53..ddfa3c3 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_simple_rpc_reg/4-mt.c
@@ -44,60 +44,66 @@
 int run_mode;
 int callNb;
 
-char *registeredProc(char *i_var) {
+char *registeredProc(char *i_var)
+{
 	static int result = 0;
-        result = *i_var;
-        return (char *)&result;
+	result = *i_var;
+	return (char *)&result;
 
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	char *registeredProc();
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
-		thread_array_result[atoi(arg)] = thread_array_result[atoi(arg)] + !rpc_reg(progNum + atoi(arg), VERSNUM, PROCNUM, (void *)registeredProc,
-											 								 	 (xdrproc_t)xdr_int, (xdrproc_t)xdr_int, "visible");
+	for (i = 0; i < callNb; i++) {
+		thread_array_result[atoi(arg)] =
+		    thread_array_result[atoi(arg)] + !rpc_reg(progNum +
+							      atoi(arg),
+							      VERSNUM, PROCNUM,
+							      (void *)
+							      registeredProc,
+							      (xdrproc_t)
+							      xdr_int,
+							      (xdrproc_t)
+							      xdr_int,
+							      "visible");
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	//Thread declaration
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server base ID    : %d\n", progNum);
 		printf("Number of threads : %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -105,43 +111,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/1-basic.c
index 08e25f2..0d887ef 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/1-basic.c
@@ -43,49 +43,43 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
 	int sndVar = 10;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
-
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
 		return 5;
 	}
-
 	//Then call remote procedure
-	rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-
-	test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
+	rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			 total_timeout);
+	/**/ test_status = (rslt == RPC_SUCCESS) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/2-stress.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/2-stress.c
index 720155b..c166060 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/2-stress.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/2-stress.c
@@ -43,59 +43,52 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of testes function calls
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of testes function calls
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
-    int nbCall = atoi(argc[3]);
+	int sndVar = 0;
+	int recVar = -1;
+	struct timeval total_timeout;
+	int nbCall = atoi(argc[3]);
 	int nbOk = 0;
 	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
-
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
 		return 5;
 	}
-
 	//Then call remote procedure
-	for (i = 0; i < nbCall; i++)
-	{
-		rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);	/**/
-		if (rslt == RPC_SUCCESS)
+	for (i = 0; i < nbCall; i++) {
+		rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				 total_timeout);
+		/**/ if (rslt == RPC_SUCCESS)
 			nbOk++;
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Aimed : %d\n", nbCall);
 		printf("Got : %d\n", nbOk);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/4-mt.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/4-mt.c
index d3b253c..5f75007 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/4-mt.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/4-mt.c
@@ -46,77 +46,70 @@
 char *nettype;
 int callNb;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
 	int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
-    int i;
+	int recVar = -1;
+	struct timeval total_timeout;
+	int i;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(hostname, progNum, VERSNUM, nettype);
 
-	//First of all, create client using top level API
-	clnt = clnt_create(hostname, progNum, VERSNUM, nettype);
-
-	if (clnt == NULL)
-    {
-    	clnt_pcreateerror("ERR");
-    	thread_array_result[atoi(arg)] = 0;
-    	pthread_exit (5);
-    }
-
+	if (clnt == NULL) {
+		clnt_pcreateerror("ERR");
+		thread_array_result[atoi(arg)] = 0;
+		pthread_exit(5);
+	}
 	//Then call remote procedure
-	for (i = 0; i < callNb; i++)
-	{
-		rslt = clnt_call((CLIENT *)clnt, PROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						    total_timeout);
+	for (i = 0; i < callNb; i++) {
+		rslt = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+				 (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+				 total_timeout);
 
-		thread_array_result[atoi(arg)] = thread_array_result[atoi(arg)] + (rslt == RPC_SUCCESS);
+		thread_array_result[atoi(arg)] =
+		    thread_array_result[atoi(arg)] + (rslt == RPC_SUCCESS);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[2]);
 	hostname = argc[1];
 	nettype = "visible";
 	callNb = atoi(argc[4]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -124,43 +117,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != callNb)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != callNb) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/5-scalability.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/5-scalability.c
index e802e39..895b215 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/5-scalability.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/5-scalability.c
@@ -48,76 +48,71 @@
 char *nettype = "visible";
 char *hostname;
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
-
 	//Initialisation
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(hostname, progNum, VERSNUM, nettype);
 
-	//First of all, create client using top level API
-	clnt = clnt_create(hostname, progNum, VERSNUM, nettype);
-
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
-		exit (5);
+		exit(5);
 	}
 
-	for (i = 0; i < callNb; i++)
-	{
-		clnt_call((CLIENT *)clnt, PROCNUM,
-					(xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                    (xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-					total_timeout);	/**/
-	}
+	for (i = 0; i < callNb; i++) {
+		clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			  (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			  total_timeout);
+	/**/}
 
 	clnt_destroy(clnt);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Maximal number of threads
-	//					   argc[4] : Number of calls per thread
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Maximal number of threads
+	//                                         argc[4] : Number of calls per thread
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
-	int i,rthcreate;
+	int test_status = 1;	//Default test result set to FAILED
+	int i, rthcreate;
 	long j;
 	int threadNb = atoi((char *)argc[3]);
-    int curThd = 1;
+	int curThd = 1;
 
 	//Thread declarations
 	pthread_t *pThreadArray;
-    void *ret = NULL;
+	void *ret = NULL;
 	pthread_attr_t thread_attr;
 	int ssz = 0;
 
-    //Time measurement declarations
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	//Time measurement declarations
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 
-    //Program initialization
+	//Program initialization
 	progNum = atoi((char *)argc[2]);
 	callNb = atoi((char *)argc[4]);
 	hostname = (char *)argc[1];
@@ -125,19 +120,19 @@
 	//Initialization
 	maxThd = maxThd << (threadNb - 1);	//Set the maximum threads number
 
-	pthread_attr_init (&thread_attr);
+	pthread_attr_init(&thread_attr);
 
-	if (run_mode == 1)
-	{
-		pthread_attr_getstacksize(&thread_attr, (size_t *)&ssz);	//For debug purpose, get default thread stack size
+	if (run_mode == 1) {
+		pthread_attr_getstacksize(&thread_attr, (size_t *) & ssz);	//For debug purpose, get default thread stack size
 		fprintf(stderr, "Server #%d\n", progNum);
 		fprintf(stderr, "Calls per thread : %d\n", callNb);
 		fprintf(stderr, "Instances : %d\n", threadNb);
 		fprintf(stderr, "Max threads to create : %d\n", maxThd);
-		fprintf(stderr, "Standard thread stack size in bytes %d\n", ssz);
+		fprintf(stderr, "Standard thread stack size in bytes %d\n",
+			ssz);
 	}
 
-	pthread_attr_setstacksize(&thread_attr, 40000);		//Set thread stack size to 40 KB
+	pthread_attr_setstacksize(&thread_attr, 40000);	//Set thread stack size to 40 KB
 
 	//Init results table
 	thread_time_result = (double *)malloc((threadNb) * sizeof(double));
@@ -145,55 +140,53 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(maxThd * sizeof(pthread_t));
+	pThreadArray = (pthread_t *) malloc(maxThd * sizeof(pthread_t));
 
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode)
-			fprintf(stderr, "Threads for pass %d : %d\n", i, curThd);
+			fprintf(stderr, "Threads for pass %d : %d\n", i,
+				curThd);
 
 		gettimeofday(&tv1, &tz);
 
-		for (j = 0; j < curThd; j++)
-		{
+		for (j = 0; j < curThd; j++) {
 			//Create thread using defined parameters (stack size = 40 KB)
-			if (pthread_create (&pThreadArray[j], &thread_attr, my_thread_process, (void *)j) != 0)
-	    	{
-	        	fprintf (stderr, "pthread_create error for thread %d\n", j);
-	        	printf("1\n");
-	        	exit (1);
-	    	}
-	    }
+			if (pthread_create
+			    (&pThreadArray[j], &thread_attr, my_thread_process,
+			     (void *)j) != 0) {
+				fprintf(stderr,
+					"pthread_create error for thread %d\n",
+					j);
+				printf("1\n");
+				exit(1);
+			}
+		}
 
 		//Clean threads
-		for (j = 0; j < curThd; j++)
-		{
-			if ((pthread_t *)pThreadArray[j] != NULL)
-			{
-				(void)pthread_join (pThreadArray[j], &ret);
-			}
-			else
-			{
+		for (j = 0; j < curThd; j++) {
+			if ((pthread_t *) pThreadArray[j] != NULL) {
+				(void)pthread_join(pThreadArray[j], &ret);
+			} else {
 				fprintf(stderr, "pThread Join Err : %d\n", j);
 			}
 		}
 
-	    gettimeofday(&tv2, &tz);
+		gettimeofday(&tv2, &tz);
 
-	    //Calculate and store delay to table results
-	    diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		//Calculate and store delay to table results
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 		thread_time_result[i] = rslt;
 
-	    curThd = curThd * 2;
+		curThd = curThd * 2;
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_time_result[i] == 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_time_result[i] == 0) {
 			test_status = 1;
 			break;
 		}
@@ -205,8 +198,7 @@
 
 	//Print scalability results
 	curThd = 1;
-	for (i = 0; i < threadNb; i++)
-	{
+	for (i = 0; i < threadNb; i++) {
 		printf("%d %lf\n", curThd, thread_time_result[i]);
 		curThd = curThd * 2;
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/6-dataint.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/6-dataint.c
index ef380e6..c950f2e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/6-dataint.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/6-dataint.c
@@ -40,19 +40,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASSED
+	int test_status = 0;	//Default test result set to PASSED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat rslt;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 	//Sent variables
 	int intSnd;
 	double dblSnd;
@@ -66,25 +66,22 @@
 
 	//Test initialization
 	total_timeout.tv_sec = 1;
-	total_timeout.tv_usec = 1;/**/
+	total_timeout.tv_usec = 1;
+	/**/
+	    //First of all, create client using top level API
+	    clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
-	//First of all, create client using top level API
-	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
-
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
 		return 5;
 	}
-
 	//Call tested procedure several times
 	//Int test : call INTPROCNUM RPC
 	intSnd = -65536;
 
-	clnt_call((CLIENT *)clnt, INTPROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-						    total_timeout);
+	clnt_call((CLIENT *) clnt, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+		  (xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+		  total_timeout);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -94,10 +91,9 @@
 	//Test positive number
 	intSnd = 16777216;
 
-	clnt_call((CLIENT *)clnt, INTPROCNUM,
-						    (xdrproc_t)xdr_int, (char *)&intSnd, // xdr_in
-                    		(xdrproc_t)xdr_int, (char *)&intRec, // xdr_out
-						    total_timeout);
+	clnt_call((CLIENT *) clnt, INTPROCNUM, (xdrproc_t) xdr_int, (char *)&intSnd,	// xdr_in
+		  (xdrproc_t) xdr_int, (char *)&intRec,	// xdr_out
+		  total_timeout);
 
 	if (intSnd != intRec)
 		test_status = 1;
@@ -107,10 +103,9 @@
 	//Long test : call LNGPROCNUM RPC
 	lngSnd = -430000;
 
-	clnt_call((CLIENT *)clnt, LNGPROCNUM,
-						    (xdrproc_t)xdr_long, (char *)&lngSnd, // xdr_in
-                    		(xdrproc_t)xdr_long, (char *)&lngRec, // xdr_out
-						    total_timeout);
+	clnt_call((CLIENT *) clnt, LNGPROCNUM, (xdrproc_t) xdr_long, (char *)&lngSnd,	// xdr_in
+		  (xdrproc_t) xdr_long, (char *)&lngRec,	// xdr_out
+		  total_timeout);
 
 	if (lngSnd != lngRec)
 		test_status = 1;
@@ -120,10 +115,9 @@
 	//Double test : call DBLPROCNUM RPC
 	dblSnd = -1735.63000f;
 
-	clnt_call((CLIENT *)clnt, DBLPROCNUM,
-						    (xdrproc_t)xdr_double, (char *)&dblSnd, // xdr_in
-                    		(xdrproc_t)xdr_double, (char *)&dblRec, // xdr_out
-						    total_timeout);
+	clnt_call((CLIENT *) clnt, DBLPROCNUM, (xdrproc_t) xdr_double, (char *)&dblSnd,	// xdr_in
+		  (xdrproc_t) xdr_double, (char *)&dblRec,	// xdr_out
+		  total_timeout);
 
 	if (dblSnd != dblRec)
 		test_status = 1;
@@ -134,10 +128,9 @@
 	strSnd = "text to send.";
 	strRec = (char *)malloc(64 * sizeof(char));
 
-	clnt_call((CLIENT *)clnt, STRPROCNUM,
-				(xdrproc_t)xdr_wrapstring, (char *)&strSnd, // xdr_in
-                (xdrproc_t)xdr_wrapstring, (char *)&strRec, // xdr_out
-				total_timeout);
+	clnt_call((CLIENT *) clnt, STRPROCNUM, (xdrproc_t) xdr_wrapstring, (char *)&strSnd,	// xdr_in
+		  (xdrproc_t) xdr_wrapstring, (char *)&strRec,	// xdr_out
+		  total_timeout);
 
 	if (strcmp(strSnd, strRec))
 		test_status = 1;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/7-performance.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/7-performance.c
index bc2d5ac..de1d73e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/7-performance.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/7-performance.c
@@ -43,8 +43,7 @@
 	int i;
 	double rslt = 0;
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		rslt += tbl[i];
 	}
 	rslt = rslt / maxIter;
@@ -57,8 +56,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt > tbl[i])
 			rslt = tbl[i];
 	}
@@ -71,8 +69,7 @@
 	int i;
 	double rslt = tbl[0];
 
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		if (rslt < tbl[i])
 			rslt = tbl[i];
 	}
@@ -82,78 +79,72 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of test call
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of test call
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int i;
 	double *resultTbl;
-	struct timeval tv1,tv2;
-    struct timezone tz;
-    long long diff;
-    double rslt;
+	struct timeval tv1, tv2;
+	struct timezone tz;
+	long long diff;
+	double rslt;
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	enum clnt_stat cs;
 	int sndVar = 0;
-    int recVar = -1;
-    struct timeval total_timeout;
+	int recVar = -1;
+	struct timeval total_timeout;
 
 	//Test initialisation
-    maxIter = atoi(argc[3]);
-    resultTbl = (double *)malloc(maxIter * sizeof(double));
+	maxIter = atoi(argc[3]);
+	resultTbl = (double *)malloc(maxIter * sizeof(double));
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
 		return 5;
 	}
-
 	//Call tested function several times
-	for (i = 0; i < maxIter; i++)
-	{
+	for (i = 0; i < maxIter; i++) {
 		//Tic
 		gettimeofday(&tv1, &tz);
 
 		//Call function
-		cs = clnt_call((CLIENT *)clnt, PROCNUM,
-						(xdrproc_t)xdr_int, (char *)&sndVar, // xdr_in
-                   		(xdrproc_t)xdr_int, (char *)&recVar, // xdr_out
-						total_timeout);
+		cs = clnt_call((CLIENT *) clnt, PROCNUM, (xdrproc_t) xdr_int, (char *)&sndVar,	// xdr_in
+			       (xdrproc_t) xdr_int, (char *)&recVar,	// xdr_out
+			       total_timeout);
 
 		//Toc
 		gettimeofday(&tv2, &tz);
 
 		//Add function execution time (toc-tic)
-		diff = (tv2.tv_sec-tv1.tv_sec) * 1000000L + (tv2.tv_usec-tv1.tv_usec);
+		diff =
+		    (tv2.tv_sec - tv1.tv_sec) * 1000000L + (tv2.tv_usec -
+							    tv1.tv_usec);
 		rslt = (double)diff / 1000;
 
-    	if (cs == RPC_SUCCESS)
-    	{
-    		resultTbl[i] = rslt;
-    	}
-    	else
-    	{
-    		test_status = 1;
-    		clnt_perrno(cs);
-    		break;
-    	}
+		if (cs == RPC_SUCCESS) {
+			resultTbl[i] = rslt;
+		} else {
+			test_status = 1;
+			clnt_perrno(cs);
+			break;
+		}
 
-    	if (run_mode)
-    	{
-    		fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
-    	}
+		if (run_mode) {
+			fprintf(stderr, "lf time  = %lf usecn\n", resultTbl[i]);
+		}
 	}
 
 	//This last printf gives the result status to the tests suite
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/8-complex.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/8-complex.c
index 2281299..ab05940 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/8-complex.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_call/8-complex.c
@@ -45,26 +45,23 @@
 char *hostname;
 char *nettype;
 
-struct RES
-{
+struct RES {
 	double locRes;
 	double svcRes;
 };
 
 struct RES *resTbl;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
 };
 
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 double getRand()
@@ -72,27 +69,25 @@
 	return (drand48() * 1000);
 }
 
-void *my_thread_process (void * arg)
+void *my_thread_process(void *arg)
 {
 	int i;
 	CLIENT *clnt = NULL;
 	struct datas vars;
 	static double result = 0;
-    struct timeval total_timeout;
+	struct timeval total_timeout;
 
-    total_timeout.tv_sec = 1;
+	total_timeout.tv_sec = 1;
 	total_timeout.tv_usec = 1;
 
 	clnt = clnt_create(hostname, progNum, VERSNUM, nettype);
 
-	if (clnt == NULL)
-	{
+	if (clnt == NULL) {
 		printf("5\n");
-		pthread_exit (5);
+		pthread_exit(5);
 	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread %d\n", atoi(arg));
 	}
 
@@ -102,53 +97,50 @@
 
 	resTbl[atoi(arg)].locRes = vars.a + (vars.b * vars.c);
 
-    clnt_call((CLIENT *)clnt, CALCTHREADPROC,
-				(xdrproc_t)xdr_datas, (char *)&vars, // xdr_in
-                (xdrproc_t)xdr_double, (char *)&resTbl[atoi(arg)].svcRes, // xdr_out
-				total_timeout);
+	clnt_call((CLIENT *) clnt, CALCTHREADPROC, (xdrproc_t) xdr_datas, (char *)&vars,	// xdr_in
+		  (xdrproc_t) xdr_double, (char *)&resTbl[atoi(arg)].svcRes,	// xdr_out
+		  total_timeout);
 
-	thread_array_result[atoi(arg)] = (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
+	thread_array_result[atoi(arg)] =
+	    (resTbl[atoi(arg)].svcRes == resTbl[atoi(arg)].locRes) ? 0 : 1;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		fprintf(stderr, "Thread #%d calc : %lf, received : %lf\n",
-		        atoi(arg), resTbl[atoi(arg)].locRes,
-		        resTbl[atoi(arg)].svcRes);
+			atoi(arg), resTbl[atoi(arg)].locRes,
+			resTbl[atoi(arg)].svcRes);
 	}
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   argc[3] : Number of threads
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         argc[3] : Number of threads
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	run_mode = 0;
-	int test_status = 0; //Default test result set to FAILED
+	int test_status = 0;	//Default test result set to FAILED
 	int threadNb = atoi(argc[3]);
 	int i;
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
-    hostname = argc[1];
-    nettype = "VISIBLE";
+	hostname = argc[1];
+	nettype = "VISIBLE";
 
-    resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
+	resTbl = (struct RES *)malloc(threadNb * sizeof(struct RES));
 
 	progNum = atoi(argc[2]);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d\n", progNum);
 		printf("Thread to create %d\n", threadNb);
 	}
-
 	//Initialization : create threads results array, init elements to 0
 	//Each thread will put function result (pas/fail) into array
 	thread_array_result = (int *)malloc(threadNb * sizeof(int));
@@ -156,43 +148,37 @@
 
 	//Create all threads
 	//Run all threads
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create thread %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, my_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create thread %d\n", i);
+		if (pthread_create(&pThreadArray[i], NULL, my_thread_process, i)
+		    < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	//Check if all threads results are ok
 	test_status = 0;
-	for (i = 0; i < threadNb; i++)
-	{
-		if (thread_array_result[i] != 0)
-		{
+	for (i = 0; i < threadNb; i++) {
+		if (thread_array_result[i] != 0) {
 			test_status = 1;
 			break;
 		}
 	}
 
-	if (run_mode == 1)
-	{
-		for (i = 0; i < threadNb; i++)
-		{
-			fprintf(stderr, "Result[%d]=%d\n", i, thread_array_result[i]);
+	if (run_mode == 1) {
+		for (i = 0; i < threadNb; i++) {
+			fprintf(stderr, "Result[%d]=%d\n", i,
+				thread_array_result[i]);
 		}
 	}
-
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
 	printf("%d\n", test_status);
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create/1-basic.c
index 84ae7f5..7d7905b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create/1-basic.c
@@ -42,33 +42,31 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
-		printf("Client : %d\n", (CLIENT *)clnt);
+		printf("Client : %d\n", (CLIENT *) clnt);
 	}
 	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
-	if (run_mode == 1)
-	{
-		printf("Client after creation : %d\n", (CLIENT *)clnt);
+	if (run_mode == 1) {
+		printf("Client after creation : %d\n", (CLIENT *) clnt);
 	}
 
-	test_status = ((CLIENT *)clnt != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) clnt != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/1-basic.c
index 3510a64..877bf5b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/1-basic.c
@@ -43,25 +43,24 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 	struct timeval tv;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
-		printf("Client : %d\n", (CLIENT *)clnt);
+		printf("Client : %d\n", (CLIENT *) clnt);
 	}
 
 	tv.tv_sec = 1;
@@ -69,12 +68,11 @@
 
 	clnt = clnt_create_timed(argc[1], progNum, VERSNUM, nettype, &tv);
 
-	if (run_mode == 1)
-	{
-		printf("Client after creation : %d\n", (CLIENT *)clnt);
+	if (run_mode == 1) {
+		printf("Client after creation : %d\n", (CLIENT *) clnt);
 	}
 
-	test_status = ((CLIENT *)clnt != NULL) ? 0 : 1;
+	test_status = ((CLIENT *) clnt != NULL) ? 0 : 1;
 
 	//This last printf gives the result status to the tests suite
 	//normally should be 0: test has passed or 1: test has failed
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/3-limits.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/3-limits.c
index e4a236d..ffcdac1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/3-limits.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_create_timed/3-limits.c
@@ -37,24 +37,23 @@
 //Other define
 #define NBCASE 1
 
-typedef struct
-{
+typedef struct {
 	//List parameters here
 	int init_tout;
 	int next_tout;
-}params;
+} params;
 
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 0; //Default test result set to PASS
+	int test_status = 0;	//Default test result set to PASS
 	int progNum = atoi(argc[2]);
 	int i;
 	params paramList[NBCASE];
@@ -67,25 +66,23 @@
 	paramList[0].next_tout = 1;
 
 	//Call tested function using all tests cases
-	for (i = 0; i < NBCASE; i++)
-	{
+	for (i = 0; i < NBCASE; i++) {
 		//Debug mode prints
-		if (run_mode == 1)
-		{
-			printf("Test using values : %d ", paramList[i].init_tout);
+		if (run_mode == 1) {
+			printf("Test using values : %d ",
+			       paramList[i].init_tout);
 			printf("%d", paramList[i].next_tout);
 			printf("\n");
 		}
-
 		//Call function
 		tv.tv_sec = paramList[i].init_tout;
 		tv.tv_usec = paramList[i].next_tout;
 
-		clnt = clnt_create_timed(argc[1], progNum, VERSNUM, nettype, &tv);
+		clnt =
+		    clnt_create_timed(argc[1], progNum, VERSNUM, nettype, &tv);
 
 		//Check result
-		if (clnt == NULL)
-		{
+		if (clnt == NULL) {
 			//test has failed
 			test_status = 1;
 			break;
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_destroy/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_destroy/1-basic.c
index 6cb00ad..330e4dc 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_destroy/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_clnt_destroy/1-basic.c
@@ -45,26 +45,24 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	CLIENT *clnt = NULL;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
-		printf("Client : %d\n", (CLIENT *)clnt);
+		printf("Client : %d\n", (CLIENT *) clnt);
 	}
-
 	//first create client
 	clnt = clnt_create(argc[1], progNum, VERSNUM, nettype);
 
@@ -81,7 +79,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_create/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_create/1-basic.c
index 3b213cf..5891175 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_create/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_create/1-basic.c
@@ -45,20 +45,19 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	int transpnum;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 		printf("Net : %s\n", nettype);
@@ -67,8 +66,7 @@
 
 	transpnum = svc_create(exm_proc, progNum, VERSNUM, nettype);
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server transport after creation : %d\n", transpnum);
 	}
 
@@ -83,7 +81,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_destroy/1-basic.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_destroy/1-basic.c
index 0e8939e..a327ab4 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_destroy/1-basic.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_suite/tirpc/tirpc_toplevel_svc_destroy/1-basic.c
@@ -45,31 +45,29 @@
 int main(int argn, char *argc[])
 {
 	//Program parameters : argc[1] : HostName or Host IP
-	//					   argc[2] : Server Program Number
-	//					   other arguments depend on test case
+	//                                         argc[2] : Server Program Number
+	//                                         other arguments depend on test case
 
 	//run_mode can switch into stand alone program or program launch by shell script
 	//1 : stand alone, debug mode, more screen information
 	//0 : launch by shell script as test case, only one printf -> result status
 	int run_mode = 0;
-	int test_status = 1; //Default test result set to FAILED
+	int test_status = 1;	//Default test result set to FAILED
 	int progNum = atoi(argc[2]);
 	char nettype[16] = "visible";
 	SVCXPRT *svcr;
-        struct netconfig *nconf;
+	struct netconfig *nconf;
 
-        //Test initialization
-        if ((nconf = getnetconfigent("tcp")) == NULL) {
-        	fprintf(stderr, "Cannot get netconfig entry for TCP\n");
+	//Test initialization
+	if ((nconf = getnetconfigent("tcp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for TCP\n");
 		exit(1);
-        }
+	}
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server : %s\n", argc[1]);
 		printf("Server # %d\n", progNum);
 	}
-
 	//First create server
 	svcr = svc_tp_create(exm_proc, progNum, VERSNUM, nconf);
 
@@ -91,7 +89,7 @@
 	return test_status;
 }
 
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//Nothing to do
 }
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_1/rpc_svc_1.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_1/rpc_svc_1.c
index 0f617f6..3dd56d7 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_1/rpc_svc_1.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_1/rpc_svc_1.c
@@ -45,7 +45,7 @@
 #define STRPROCNUM 4000
 #define SVCGETARGSPROC 5000
 
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp);
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp);
 
 //static int argument;
 union u_argument {
@@ -61,7 +61,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 1;
 	int progNum = atoi(argc[1]);
 	SVCXPRT *transpTCP = NULL;
@@ -72,56 +72,55 @@
 	pmap_unset(progNum, VERSNUM);
 	svc_unregister(progNum, VERSNUM);
 
-    //registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
-    //    		simplePing, xdr_int, xdr_int);
-    transpTCP = svctcp_create(RPC_ANYSOCK, 1000, 1000);
-    transpUDP = svcudp_create(RPC_ANYSOCK);
+	//registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
+	//                  simplePing, xdr_int, xdr_int);
+	transpTCP = svctcp_create(RPC_ANYSOCK, 1000, 1000);
+	transpUDP = svcudp_create(RPC_ANYSOCK);
 
-    if (run_mode)
-    {
-    	printf ("SVC TCP : %d\n", transpTCP);
-    	printf ("SVC UDP : %d\n", transpUDP);
-    }
+	if (run_mode) {
+		printf("SVC TCP : %d\n", transpTCP);
+		printf("SVC UDP : %d\n", transpUDP);
+	}
 
-	if (!svc_register(transpTCP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_TCP))
-	{
-    	fprintf(stderr, "svc_register: error (TCP)\n");
-    }
+	if (!svc_register
+	    (transpTCP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_TCP)) {
+		fprintf(stderr, "svc_register: error (TCP)\n");
+	}
 
-    if (!svc_register(transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP))
-	{
-    	fprintf(stderr, "svc_register: error (UDP)\n");
-    }
+	if (!svc_register
+	    (transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP)) {
+		fprintf(stderr, "svc_register: error (UDP)\n");
+	}
 
-    svc_run();
-    fprintf(stderr, "Error: svc_run returned!\n");
-    exit(1);
+	svc_run();
+	fprintf(stderr, "Error: svc_run returned!\n");
+	exit(1);
 }
 
 //****************************************//
 //***        Remotes Procedures        ***//
 //****************************************//
-char *simplePing(union u_argument *inVar, SVCXPRT *transp)
+char *simplePing(union u_argument *inVar, SVCXPRT * transp)
 {
 	static int result;
 	result = inVar->varInt;
 	return (char *)&result;
 }
 
-char *svc_getcaller_test(union u_argument *inVar, SVCXPRT *transp)
+char *svc_getcaller_test(union u_argument *inVar, SVCXPRT * transp)
 {
 	//In this function we test svc_getcaller function basically (simple call)
 	struct sockaddr_in *sa = NULL;
 	static int result;
 
-	sa = svc_getcaller (transp);
+	sa = svc_getcaller(transp);
 	//If the result is not NULL we consider that function call succeeds
 	//so returns 0 (PASS)
 	result = (sa != NULL) ? 0 : 1;
 	return (char *)&result;
 }
 
-char *intTestProc(union u_argument *in, SVCXPRT *transp)
+char *intTestProc(union u_argument *in, SVCXPRT * transp)
 {
 	//printf("*** in intTestProc.\n");
 	//returns what received
@@ -131,7 +130,7 @@
 	return (char *)&result;
 }
 
-char *lngTestProc(union u_argument *in, SVCXPRT *transp)
+char *lngTestProc(union u_argument *in, SVCXPRT * transp)
 {
 	//printf("*** in lngTestProc.\n");
 	//returns what received
@@ -141,7 +140,7 @@
 	return (char *)&result;
 }
 
-char *dblTestProc(union u_argument *in, SVCXPRT *transp)
+char *dblTestProc(union u_argument *in, SVCXPRT * transp)
 {
 	//printf("*** in dblTestProc.\n");
 	//returns what received
@@ -151,7 +150,7 @@
 	return (char *)&result;
 }
 
-char *strTestProc(union u_argument *in, SVCXPRT *transp)
+char *strTestProc(union u_argument *in, SVCXPRT * transp)
 {
 	//printf("*** in strTestProc.\n");
 	//returns what received
@@ -161,7 +160,7 @@
 	return (char *)&result;
 }
 
-char *svcGetargsProc(union u_argument *in, SVCXPRT *transp)
+char *svcGetargsProc(union u_argument *in, SVCXPRT * transp)
 {
 	//printf("*** in svcGetargsProc.\n");
 	//returns what received inside this procedure : test svc_getargs function
@@ -170,12 +169,10 @@
 	static char *result;
 	result = in->str;
 
-	if ((svc_getargs(transp, (xdrproc_t)xdr_int, (char *)&args)) == FALSE)
-	{
+	if ((svc_getargs(transp, (xdrproc_t) xdr_int, (char *)&args)) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
-
 	//printf("%s\n", result);
 	return (char *)&result;
 }
@@ -183,119 +180,131 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp)
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	/*union {
-		int varIn;
-	} argument;*/
+	   int varIn;
+	   } argument; */
 
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(union u_argument *, SVCXPRT *);
+	char *(*proc) (union u_argument *, SVCXPRT *);
 	enum auth_stat why;
 
-    switch (rqstp->rq_proc)
-    {
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCSIMPLEPING dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    simplePing;
 			break;
 		}
-		case SVCGETCALLTEST:
+	case SVCGETCALLTEST:
 		{
 			//printf("** in SVCGETCALLTEST dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))svc_getcaller_test;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    svc_getcaller_test;
 			break;
 		}
-		case PROGSYSERROR:
+	case PROGSYSERROR:
 		{
 			//printf("** in PROGSYSERROR dispatch Func.\n");
 			//Simulate an error
 			svcerr_systemerr(transp);
 			return;
 		}
-		case PROGAUTHERROR:
+	case PROGAUTHERROR:
 		{
 			//printf("** in PROGAUTHERROR dispatch Func.\n");
 			//Simulate an authentification error
 			svcerr_auth(transp, why);
 			return;
 		}
-		case PROGWKAUTHERROR:
+	case PROGWKAUTHERROR:
 		{
 			//printf("** in PROGWKAUTHERROR dispatch Func.\n");
 			//Simulate an authentification error
 			svcerr_weakauth(transp);
 			return;
 		}
-		case INTPROCNUM:
+	case INTPROCNUM:
 		{
 			//printf("** in INTPROCNUM dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))intTestProc;
-						 //(char *(*)(union u_argument *))
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    intTestProc;
+			//(char *(*)(union u_argument *))
 			break;
 		}
-		case DBLPROCNUM:
+	case DBLPROCNUM:
 		{
 			//printf("** in DBLPROCNUM dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_double;
-			xdr_result   = (xdrproc_t)xdr_double;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))dblTestProc;
+			xdr_argument = (xdrproc_t) xdr_double;
+			xdr_result = (xdrproc_t) xdr_double;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    dblTestProc;
 			break;
 		}
-		case LNGPROCNUM:
+	case LNGPROCNUM:
 		{
 			//printf("** in LNGPROCNUM dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_long;
-			xdr_result   = (xdrproc_t)xdr_long;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))lngTestProc;
+			xdr_argument = (xdrproc_t) xdr_long;
+			xdr_result = (xdrproc_t) xdr_long;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    lngTestProc;
 			break;
 		}
-		case STRPROCNUM:
+	case STRPROCNUM:
 		{
 			//printf("** in STRPROCNUM dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_wrapstring;
-			xdr_result   = (xdrproc_t)xdr_wrapstring;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))strTestProc;
+			xdr_argument = (xdrproc_t) xdr_wrapstring;
+			xdr_result = (xdrproc_t) xdr_wrapstring;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    strTestProc;
 			break;
 		}
-		case SVCGETARGSPROC:
+	case SVCGETARGSPROC:
 		{
 			//printf("** in SVCGETARGSPROC dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *, SVCXPRT *))svcGetargsProc;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc =
+			    (char *(*)(union u_argument *, SVCXPRT *))
+			    svcGetargsProc;
 			break;
 		}
-		default:
+	default:
 		{
 			//printf("** in NOT DEFINED dispatch Func.\n");
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
-    }
+			svcerr_noproc(transp);
+			return;
+		}
+	}
 
-    memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	memset((char *)&argument, (int)0, sizeof(argument));
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((union u_argument *)&argument, transp);
+	result = (char *)(*proc) ((union u_argument *)&argument, transp);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_2/rpc_svc_2.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_2/rpc_svc_2.c
index 6fed3ae..7a7c6a1 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_2/rpc_svc_2.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/rpc_svc_2/rpc_svc_2.c
@@ -34,21 +34,19 @@
 //Complex procs
 #define CALCPROC   10000
 
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp);
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp);
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
-}argument;
+} argument;
 
 //XDR Struct function
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
 //****************************************//
@@ -57,7 +55,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 1;
 	int progNum = atoi(argc[1]);
 	SVCXPRT *transpTCP = NULL;
@@ -68,37 +66,36 @@
 	pmap_unset(progNum, VERSNUM);
 	svc_unregister(progNum, VERSNUM);
 
-    //registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
-    //    		simplePing, xdr_int, xdr_int);
-    transpTCP = svctcp_create(RPC_ANYSOCK, 1000, 1000);
-    transpUDP = svcudp_create(RPC_ANYSOCK);
+	//registerrpc(progNum, VERSNUM, PROCSIMPLEPING,
+	//                  simplePing, xdr_int, xdr_int);
+	transpTCP = svctcp_create(RPC_ANYSOCK, 1000, 1000);
+	transpUDP = svcudp_create(RPC_ANYSOCK);
 
-    if (run_mode)
-    {
-    	printf ("SVC TCP : %d\n", transpTCP);
-    	printf ("SVC UDP : %d\n", transpUDP);
-    }
+	if (run_mode) {
+		printf("SVC TCP : %d\n", transpTCP);
+		printf("SVC UDP : %d\n", transpUDP);
+	}
 
-	if (!svc_register(transpTCP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_TCP))
-	{
-    	fprintf(stderr, "svc_register: error (TCP)\n");
-    }
+	if (!svc_register
+	    (transpTCP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_TCP)) {
+		fprintf(stderr, "svc_register: error (TCP)\n");
+	}
 
-    if (!svc_register(transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP))
-	{
-    	fprintf(stderr, "svc_register: error (UDP)\n");
-    }
+	if (!svc_register
+	    (transpUDP, progNum, VERSNUM, (void *)rcp_service, IPPROTO_UDP)) {
+		fprintf(stderr, "svc_register: error (UDP)\n");
+	}
 
-    svc_run();
-    fprintf(stderr, "Error: svc_run returned!\n");
-    exit(1);
+	svc_run();
+	fprintf(stderr, "Error: svc_run returned!\n");
+	exit(1);
 }
 
 //****************************************//
 //***        Remotes Procedures        ***//
 //****************************************//
 
-char *calcProc(struct datas *dt, SVCXPRT *svc)
+char *calcProc(struct datas *dt, SVCXPRT * svc)
 {
 	//Makes a + b * c from structure dt and returns double
 	//printf("*** In calcProc ***\n");
@@ -111,46 +108,44 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-void rcp_service(register struct svc_req *rqstp, register SVCXPRT *transp)
+void rcp_service(register struct svc_req *rqstp, register SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(struct datas *, SVCXPRT *);
+	char *(*proc) (struct datas *, SVCXPRT *);
 	enum auth_stat why;
 
-    switch (rqstp->rq_proc)
-    {
-		case CALCPROC:
+	switch (rqstp->rq_proc) {
+	case CALCPROC:
 		{
 			//printf("** in CALCPROC dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_datas;
-			xdr_result   = (xdrproc_t)xdr_double;
-			proc         = (char *(*)(struct datas *, SVCXPRT *))calcProc;
+			xdr_argument = (xdrproc_t) xdr_datas;
+			xdr_result = (xdrproc_t) xdr_double;
+			proc = (char *(*)(struct datas *, SVCXPRT *))calcProc;
 			break;
 		}
-		default:
+	default:
 		{
 			//printf("** in NOT DEFINED dispatch Func.\n");
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
-    }
+			svcerr_noproc(transp);
+			return;
+		}
+	}
 
-    memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	memset((char *)&argument, (int)0, sizeof(argument));
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((struct datas *)&argument, transp);
+	result = (char *)(*proc) ((struct datas *)&argument, transp);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_1/tirpc_svc_1.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_1/tirpc_svc_1.c
index cc9b066..4f05f10 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_1/tirpc_svc_1.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_1/tirpc_svc_1.c
@@ -48,22 +48,22 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	char *simplePing_proc();
 	bool_t rslt;
-    char nettype[16] = "visible";
+	char nettype[16] = "visible";
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("Prog Num : %d\n", progNum);
 	}
 
 	svc_unreg(progNum, VERSNUM);
 
-	rslt = rpc_reg(progNum, VERSNUM, PROCSIMPLEPING, (void *)simplePing_proc,
-					(xdrproc_t)xdr_int, (xdrproc_t)xdr_int, nettype);
+	rslt =
+	    rpc_reg(progNum, VERSNUM, PROCSIMPLEPING, (void *)simplePing_proc,
+		    (xdrproc_t) xdr_int, (xdrproc_t) xdr_int, nettype);
 
 	svc_run();
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_11/tirpc_svc_11.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_11/tirpc_svc_11.c
index 3d2e349..d71367b 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_11/tirpc_svc_11.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_11/tirpc_svc_11.c
@@ -49,7 +49,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	bool_t rslt;
@@ -60,25 +60,21 @@
 	//Initialization
 	svc_unreg(progNum, VERSNUM);
 
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
-	transp = svc_tp_create(exm_proc, progNum, VERSNUM,
-                           nconf);
+	transp = svc_tp_create(exm_proc, progNum, VERSNUM, nconf);
 
-	if (transp == NULL)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (transp == NULL) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
-	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf))
-	{
-    	fprintf(stderr, "svc_reg failed!!\n");
-    	exit(1);
+	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf)) {
+		fprintf(stderr, "svc_reg failed!!\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -104,7 +100,7 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	union {
@@ -114,48 +110,46 @@
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(char *);
+	char *(*proc) (char *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(char *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(char *))simplePing;
 			break;
 		}
-		case PROGSYSERROR:
+	case PROGSYSERROR:
 		{
 			//Simulate an error
 			svcerr_systemerr(transp);
 			return;
 		}
-		case PROGAUTHERROR:
+	case PROGAUTHERROR:
 		{
 			//Simulate an authentification error
 			svcerr_weakauth(transp);
 			return;
 		}
-		default:
+	default:
 		{
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
+			svcerr_noproc(transp);
+			return;
+		}
 	}
 	memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((char *)&argument);
+	result = (char *)(*proc) ((char *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, (char *)result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, (char *)result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_2/tirpc_svc_2.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_2/tirpc_svc_2.c
index cf8b58c..49b1dc5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_2/tirpc_svc_2.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_2/tirpc_svc_2.c
@@ -48,22 +48,22 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	char *simplePing_proc();
 	bool_t rslt;
-    char nettype[16] = "visible";
+	char nettype[16] = "visible";
 
-	if (run_mode)
-	{
+	if (run_mode) {
 		printf("Prog Num : %d\n", progNum);
 	}
 
 	svc_unreg(progNum, VERSNUM);
 
-	rslt = rpc_reg(progNum, VERSNUM, PROCSIMPLEPING, (void *)simplePing_proc,
-					(xdrproc_t)xdr_int, (xdrproc_t)xdr_int, nettype);
+	rslt =
+	    rpc_reg(progNum, VERSNUM, PROCSIMPLEPING, (void *)simplePing_proc,
+		    (xdrproc_t) xdr_int, (xdrproc_t) xdr_int, nettype);
 
 	svc_run();
 
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_3/tirpc_svc_3.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_3/tirpc_svc_3.c
index 19498d2..e0dc94f 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_3/tirpc_svc_3.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_3/tirpc_svc_3.c
@@ -46,28 +46,26 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	//char *simplePing_proc();
 	bool_t rslt;
-    //char nettype[16] = "visible";
+	//char nettype[16] = "visible";
 
 	SVCXPRT *transp;
 	struct netconfig *nconf;
 
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
-	transp = svc_tp_create(exm_proc, progNum, VERSNUM,
-                           nconf);
+	transp = svc_tp_create(exm_proc, progNum, VERSNUM, nconf);
 
 	if (transp == NULL) {
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -93,7 +91,7 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	union {
@@ -103,30 +101,28 @@
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(char *);
+	char *(*proc) (char *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
 			xdr_argument = (xdrproc_t) xdr_int;
-			xdr_result   = (xdrproc_t) xdr_int;
-			proc         = (char *(*)(char *))simplePing;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(char *))simplePing;
 			break;
 		}
 	}
 	memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((char *)&argument);
+	result = (char *)(*proc) ((char *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_4/tirpc_svc_4.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_4/tirpc_svc_4.c
index 4392602..72d4557 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_4/tirpc_svc_4.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_4/tirpc_svc_4.c
@@ -46,7 +46,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	bool_t rslt;
@@ -58,26 +58,21 @@
 	//Initialization
 	svc_unreg(progNum, VERSNUM);
 
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
-	transp = svc_tli_create(RPC_ANYFD, nconf,
-                            (struct t_bind *)NULL,
-                            0, 0);
+	transp = svc_tli_create(RPC_ANYFD, nconf, (struct t_bind *)NULL, 0, 0);
 
-	if (transp == NULL)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (transp == NULL) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
-	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf))
-	{
-    	fprintf(stderr, "svc_reg failed!!\n");
-    	exit(1);
+	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf)) {
+		fprintf(stderr, "svc_reg failed!!\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -103,7 +98,7 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	union {
@@ -113,30 +108,28 @@
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(char *);
+	char *(*proc) (char *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
 			xdr_argument = (xdrproc_t) xdr_int;
-			xdr_result   = (xdrproc_t) xdr_int;
-			proc         = (char *(*)(char *))simplePing;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(char *))simplePing;
 			break;
 		}
 	}
 	memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((char *)&argument);
+	result = (char *)(*proc) ((char *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_5/tirpc_svc_5.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_5/tirpc_svc_5.c
index 80b3fd8..cfab9b2 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_5/tirpc_svc_5.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_5/tirpc_svc_5.c
@@ -47,7 +47,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	bool_t rslt;
@@ -58,24 +58,21 @@
 	//Initialization
 	svc_unreg(progNum, VERSNUM);
 
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
 	transp = svc_vc_create(RPC_ANYFD, 1024, 1024);
 
-	if (transp == NULL)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (transp == NULL) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
-	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf))
-	{
-    	fprintf(stderr, "svc_reg failed!!\n");
-    	exit(1);
+	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf)) {
+		fprintf(stderr, "svc_reg failed!!\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -101,7 +98,7 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	union {
@@ -111,30 +108,28 @@
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(char *);
+	char *(*proc) (char *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
 			xdr_argument = (xdrproc_t) xdr_int;
-			xdr_result   = (xdrproc_t) xdr_int;
-			proc         = (char *(*)(char *))simplePing;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(char *))simplePing;
 			break;
 		}
 	}
 	memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((char *)&argument);
+	result = (char *)(*proc) ((char *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_6/tirpc_svc_6.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_6/tirpc_svc_6.c
index 1dddd57..bd3b60a 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_6/tirpc_svc_6.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_6/tirpc_svc_6.c
@@ -45,13 +45,12 @@
 int progNum;
 int run_mode;
 
-void *server_thread_process (void * arg)
+void *server_thread_process(void *arg)
 {
 	//Server process in a thread
-	int err=0;
+	int err = 0;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d launched\n", atoi(arg));
 		printf("Server Nb : %d\n", progNum + atoi(arg));
 	}
@@ -60,10 +59,9 @@
 
 	err = svc_create(exm_proc, progNum + atoi(arg), VERSNUM, "VISIBLE");
 
-	if (err == 0)
-	{
-    		fprintf(stderr, "Cannot create service.\n");
-    		exit(1);
+	if (err == 0) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -71,7 +69,7 @@
 	fprintf(stderr, "svc_run() returned.  ERROR has occurred.\n");
 	svc_unreg(progNum, VERSNUM);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 //****************************************//
@@ -80,33 +78,31 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    argc[2] : Number of threads
-	//					    others arguments depend on server program
+	//                                          argc[2] : Number of threads
+	//                                          others arguments depend on server program
 	run_mode = 0;
 	int threadNb = atoi(argc[2]);
 	int i;
 	//Thread declaration
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[1]);
 
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create Thread Server %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, server_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create Thread Server %d\n", i);
+		if (pthread_create
+		    (&pThreadArray[i], NULL, server_thread_process, i) < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	return 1;
@@ -119,16 +115,16 @@
 {
 	//printf("*** in Ping Func.\n");
 	//Simple function, returns what received
-        static int result = 0;
-        result = *in;
-        return (char *)&result;
+	static int result = 0;
+	result = *in;
+	return (char *)&result;
 
 }
 
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 	union {
@@ -138,52 +134,49 @@
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	int *(*proc)(int *);
+	int *(*proc) (int *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (int *(*)(int *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (int *(*)(int *))simplePing;
 			break;
 		}
-		case PROGSYSERROR:
+	case PROGSYSERROR:
 		{
 			//Simulate an error
 			svcerr_systemerr(transp);
 			return;
 		}
-		case PROGAUTHERROR:
+	case PROGAUTHERROR:
 		{
 			//Simulate an authentification error
 			svcerr_weakauth(transp);
 			return;
 		}
-		default:
+	default:
 		{
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
+			svcerr_noproc(transp);
+			return;
+		}
 	}
 	memset((int *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (int *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (int *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((int *)&argument);
+	result = (char *)(*proc) ((int *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
-	if (svc_freeargs(transp, xdr_argument, (int *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (int *)&argument) == FALSE) {
 		(void)fprintf(stderr, "unable to free arguments\n");
 		exit(1);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_7/tirpc_svc_7.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_7/tirpc_svc_7.c
index a6a0414..bb31ecd 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_7/tirpc_svc_7.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_7/tirpc_svc_7.c
@@ -60,7 +60,7 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    others arguments depend on server program
+	//                                          others arguments depend on server program
 	int run_mode = 0;
 	int progNum = atoi(argc[1]);
 	bool_t rslt;
@@ -71,25 +71,21 @@
 	//Initialization
 	svc_unreg(progNum, VERSNUM);
 
-	if ((nconf = getnetconfigent("udp")) == NULL)
-    {
-    	fprintf(stderr, "Cannot get netconfig entry for UDP\n");
-    	exit(1);
+	if ((nconf = getnetconfigent("udp")) == NULL) {
+		fprintf(stderr, "Cannot get netconfig entry for UDP\n");
+		exit(1);
 	}
 
-	transp = svc_tp_create(exm_proc, progNum, VERSNUM,
-                           nconf);
+	transp = svc_tp_create(exm_proc, progNum, VERSNUM, nconf);
 
-	if (transp == NULL)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (transp == NULL) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
-	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf))
-	{
-    	fprintf(stderr, "svc_reg failed!!\n");
-    	exit(1);
+	if (!svc_reg(transp, progNum, VERSNUM, exm_proc, nconf)) {
+		fprintf(stderr, "svc_reg failed!!\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -155,68 +151,66 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	char *(*proc)(union u_argument *);
+	char *(*proc) (union u_argument *);
 
-	switch (rqstp->rq_proc)
-	{
-		case PROCSIMPLEPING:
+	switch (rqstp->rq_proc) {
+	case PROCSIMPLEPING:
 		{
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *))simplePing;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(union u_argument *))simplePing;
 			break;
 		}
-		case INTPROCNUM:
+	case INTPROCNUM:
 		{
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (char *(*)(union u_argument *))intTestProc;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (char *(*)(union u_argument *))intTestProc;
 			break;
 		}
-		case DBLPROCNUM:
+	case DBLPROCNUM:
 		{
-			xdr_argument = (xdrproc_t)xdr_double;
-			xdr_result   = (xdrproc_t)xdr_double;
-			proc         = (char *(*)(union u_argument *))dblTestProc;
+			xdr_argument = (xdrproc_t) xdr_double;
+			xdr_result = (xdrproc_t) xdr_double;
+			proc = (char *(*)(union u_argument *))dblTestProc;
 			break;
 		}
-		case LNGPROCNUM:
+	case LNGPROCNUM:
 		{
-			xdr_argument = (xdrproc_t)xdr_long;
-			xdr_result   = (xdrproc_t)xdr_long;
-			proc         = (char *(*)(union u_argument *))lngTestProc;
+			xdr_argument = (xdrproc_t) xdr_long;
+			xdr_result = (xdrproc_t) xdr_long;
+			proc = (char *(*)(union u_argument *))lngTestProc;
 			break;
 		}
-		case STRPROCNUM:
+	case STRPROCNUM:
 		{
-			xdr_argument = (xdrproc_t)xdr_wrapstring;
-			xdr_result   = (xdrproc_t)xdr_wrapstring;
-			proc         = (char *(*)(union u_argument *))strTestProc;
+			xdr_argument = (xdrproc_t) xdr_wrapstring;
+			xdr_result = (xdrproc_t) xdr_wrapstring;
+			proc = (char *(*)(union u_argument *))strTestProc;
 			break;
 		}
-		default:
+	default:
 		{
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
+			svcerr_noproc(transp);
+			return;
+		}
 	}
 	memset((char *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((union u_argument *)&argument);
+	result = (char *)(*proc) ((union u_argument *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, (char *)result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, (char *)result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
 	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_8/tirpc_svc_8.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_8/tirpc_svc_8.c
index 672f526..c736a1e 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_8/tirpc_svc_8.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_8/tirpc_svc_8.c
@@ -45,13 +45,12 @@
 int progNum;
 int run_mode;
 
-void *server_thread_process (void * arg)
+void *server_thread_process(void *arg)
 {
 	//Server process in a thread
-	int err=0;
+	int err = 0;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d launched\n", atoi(arg));
 		printf("Server Nb : %d\n", progNum + atoi(arg));
 	}
@@ -60,10 +59,9 @@
 
 	err = svc_create(exm_proc, progNum + atoi(arg), VERSNUM, "VISIBLE");
 
-	if (err == 0)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (err == 0) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -71,7 +69,7 @@
 	fprintf(stderr, "svc_run() returned.  ERROR has occurred.\n");
 	svc_unreg(progNum, VERSNUM);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 //****************************************//
@@ -80,33 +78,31 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    argc[2] : Number of threads
-	//					    others arguments depend on server program
+	//                                          argc[2] : Number of threads
+	//                                          others arguments depend on server program
 	run_mode = 0;
 	int threadNb = atoi(argc[2]);
 	int i;
 	//Thread declaration
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[1]);
 
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create Thread Server %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, server_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create Thread Server %d\n", i);
+		if (pthread_create
+		    (&pThreadArray[i], NULL, server_thread_process, i) < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	return 1;
@@ -128,64 +124,60 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	int *(*proc)(int *);
+	int *(*proc) (int *);
 
-	union
-	{
+	union {
 		int varIn;
-	}argument;
+	} argument;
 
-	switch (rqstp->rq_proc)
-	{
-		case PINGPROC:
+	switch (rqstp->rq_proc) {
+	case PINGPROC:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_int;
-			xdr_result   = (xdrproc_t)xdr_int;
-			proc         = (int *(*)(int *))pingProc;
+			xdr_argument = (xdrproc_t) xdr_int;
+			xdr_result = (xdrproc_t) xdr_int;
+			proc = (int *(*)(int *))pingProc;
 			break;
 		}
-		case PROGSYSERROR:
+	case PROGSYSERROR:
 		{
 			//Simulate an error
 			svcerr_systemerr(transp);
 			return;
 		}
-		case PROGAUTHERROR:
+	case PROGAUTHERROR:
 		{
 			//Simulate an authentification error
 			svcerr_weakauth(transp);
 			return;
 		}
-		default:
+	default:
 		{
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
+			svcerr_noproc(transp);
+			return;
+		}
 	}
 	memset((int *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((int *)&argument);
+	result = (char *)(*proc) ((int *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
-	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		(void)fprintf(stderr, "unable to free arguments\n");
 		exit(1);
 	}
diff --git a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_9/tirpc_svc_9.c b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_9/tirpc_svc_9.c
index 14a42ba..e8861b5 100644
--- a/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_9/tirpc_svc_9.c
+++ b/testcases/network/rpc/rpc-tirpc-full-test-suite/tests_pack/tirpc_svc_9/tirpc_svc_9.c
@@ -45,28 +45,25 @@
 int progNum;
 int run_mode;
 
-struct datas
-{
+struct datas {
 	double a;
 	double b;
 	double c;
-}argument;
+} argument;
 
 //XDR Struct function
-bool_t xdr_datas(XDR *pt_xdr, struct datas* pt)
+bool_t xdr_datas(XDR * pt_xdr, struct datas *pt)
 {
-	return(xdr_double(pt_xdr, &(pt->a)) &&
-		   xdr_double(pt_xdr, &(pt->b)) &&
-		   xdr_double(pt_xdr, &(pt->c)));
+	return (xdr_double(pt_xdr, &(pt->a)) &&
+		xdr_double(pt_xdr, &(pt->b)) && xdr_double(pt_xdr, &(pt->c)));
 }
 
-void *server_thread_process (void * arg)
+void *server_thread_process(void *arg)
 {
 	//Server process in a thread
-	int err=0;
+	int err = 0;
 
-	if (run_mode == 1)
-	{
+	if (run_mode == 1) {
 		printf("Server #%d launched\n", atoi(arg));
 		printf("Server Nb : %d\n", progNum + atoi(arg));
 	}
@@ -75,10 +72,9 @@
 
 	err = svc_create(exm_proc, progNum + atoi(arg), VERSNUM, "VISIBLE");
 
-	if (err == 0)
-	{
-    	fprintf(stderr, "Cannot create service.\n");
-    	exit(1);
+	if (err == 0) {
+		fprintf(stderr, "Cannot create service.\n");
+		exit(1);
 	}
 
 	svc_run();
@@ -86,7 +82,7 @@
 	fprintf(stderr, "svc_run() returned.  ERROR has occurred.\n");
 	svc_unreg(progNum, VERSNUM);
 
-    pthread_exit (0);
+	pthread_exit(0);
 }
 
 //****************************************//
@@ -95,33 +91,31 @@
 int main(int argn, char *argc[])
 {
 	//Server parameter is : argc[1] : Server Program Number
-	//					    argc[2] : Number of threads
-	//					    others arguments depend on server program
+	//                                          argc[2] : Number of threads
+	//                                          others arguments depend on server program
 	run_mode = 0;
 	int threadNb = atoi(argc[2]);
 	int i;
 	//Thread declaration
 	pthread_t *pThreadArray;
-    void *ret;
+	void *ret;
 
 	progNum = atoi(argc[1]);
 
-	pThreadArray = (pthread_t *)malloc(threadNb * sizeof(pthread_t));
-	for (i = 0; i < threadNb; i++)
-	{
+	pThreadArray = (pthread_t *) malloc(threadNb * sizeof(pthread_t));
+	for (i = 0; i < threadNb; i++) {
 		if (run_mode == 1)
-			fprintf (stderr, "Try to create Thread Server %d\n", i);
-		if (pthread_create (&pThreadArray[i], NULL, server_thread_process, i) < 0)
-	    {
-	        fprintf (stderr, "pthread_create error for thread 1\n");
-	        exit (1);
-	    }
+			fprintf(stderr, "Try to create Thread Server %d\n", i);
+		if (pthread_create
+		    (&pThreadArray[i], NULL, server_thread_process, i) < 0) {
+			fprintf(stderr, "pthread_create error for thread 1\n");
+			exit(1);
+		}
 	}
 
 	//Clean threads
-	for (i = 0; i < threadNb; i++)
-	{
-		(void)pthread_join (pThreadArray[i], &ret);
+	for (i = 0; i < threadNb; i++) {
+		(void)pthread_join(pThreadArray[i], &ret);
 	}
 
 	return 1;
@@ -143,59 +137,56 @@
 //****************************************//
 //***       Dispatch Function          ***//
 //****************************************//
-static void exm_proc(struct svc_req *rqstp, SVCXPRT *transp)
+static void exm_proc(struct svc_req *rqstp, SVCXPRT * transp)
 {
 	//printf("* in Dispatch Func.\n");
 
 	char *result;
 	xdrproc_t xdr_argument;
 	xdrproc_t xdr_result;
-	int *(*proc)(struct datas *);
+	int *(*proc) (struct datas *);
 
-	switch (rqstp->rq_proc)
-	{
-		case CALCTHREADPROC:
+	switch (rqstp->rq_proc) {
+	case CALCTHREADPROC:
 		{
 			//printf("** in PROCPONG dispatch Func.\n");
-			xdr_argument = (xdrproc_t)xdr_datas;
-			xdr_result   = (xdrproc_t)xdr_double;
-			proc         = (int *(*)(struct datas *))calcProc;
+			xdr_argument = (xdrproc_t) xdr_datas;
+			xdr_result = (xdrproc_t) xdr_double;
+			proc = (int *(*)(struct datas *))calcProc;
 			break;
 		}
-		case PROGSYSERROR:
+	case PROGSYSERROR:
 		{
 			//Simulate an error
 			svcerr_systemerr(transp);
 			return;
 		}
-		case PROGAUTHERROR:
+	case PROGAUTHERROR:
 		{
 			//Simulate an authentification error
 			svcerr_weakauth(transp);
 			return;
 		}
-		default:
+	default:
 		{
 			//Proc is unavaible
-      		svcerr_noproc(transp);
-      		return;
-      	}
+			svcerr_noproc(transp);
+			return;
+		}
 	}
 	memset((int *)&argument, (int)0, sizeof(argument));
-	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_getargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		svcerr_decode(transp);
 		return;
 	}
 
-	result = (char *)(*proc)((struct datas *)&argument);
+	result = (char *)(*proc) ((struct datas *)&argument);
 
-	if ((result != NULL) && (svc_sendreply(transp, xdr_result, result) == FALSE))
-	{
+	if ((result != NULL)
+	    && (svc_sendreply(transp, xdr_result, result) == FALSE)) {
 		svcerr_systemerr(transp);
 	}
-	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE)
-	{
+	if (svc_freeargs(transp, xdr_argument, (char *)&argument) == FALSE) {
 		(void)fprintf(stderr, "unable to free arguments\n");
 		exit(1);
 	}
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c b/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
index bf7c566..e9a13e7 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_accept_close.c
@@ -57,7 +57,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -70,159 +70,158 @@
 
 #define SK_MAX  10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        socklen_t len;
+	socklen_t len;
 	int i;
-	int sk,lstn_sk,clnt_sk[SK_MAX],acpt_sk,pf_class;
-	int new_sk[SK_MAX],clnt2_sk[SK_MAX];
+	int sk, lstn_sk, clnt_sk[SK_MAX], acpt_sk, pf_class;
+	int new_sk[SK_MAX], clnt2_sk[SK_MAX];
 	int error;
 
-        struct sockaddr_in conn_addr,lstn_addr,acpt_addr;
+	struct sockaddr_in conn_addr, lstn_addr, acpt_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	for (i=0 ; i < SK_MAX ; i++)
+	for (i = 0; i < SK_MAX; i++)
 		new_sk[i] = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/* Creating a regular socket */
-	for (i = 0 ; i < SK_MAX ; i++)
+	for (i = 0; i < SK_MAX; i++)
 		clnt_sk[i] = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	for (i = 0 ; i < SK_MAX ; i++)
+	for (i = 0; i < SK_MAX; i++)
 		clnt2_sk[i] = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/* Creating a listen socket */
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	/* Binding the listen socket */
-	test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
 	/* Listening many sockets as we are calling too many connect here */
-	test_listen(lstn_sk, SK_MAX );
+	test_listen(lstn_sk, SK_MAX);
 
 	/* connect() is called just to make sure accept() doesn't block the
 	 * program
 	 */
 	i = 0;
 	len = sizeof(struct sockaddr_in);
-	test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len);
+	test_connect(clnt_sk[i++], (struct sockaddr *)&conn_addr, len);
 
 	/* accept() TEST1: Bad socket descriptor EBADF, Expected error */
-        error = accept(-1, (struct sockaddr *) &acpt_addr, &len);
-        if (error != -1 || errno != EBADF)
+	error = accept(-1, (struct sockaddr *)&acpt_addr, &len);
+	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "accept with a bad socket descriptor"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with a bad socket descriptor - EBADF");
 
-        /*accept() TEST2: Invalid socket ENOTSOCK, Expected error*/
-        error = accept(0, (struct sockaddr *) &acpt_addr, &len);
-        if (error != -1 || errno != ENOTSOCK)
+	/*accept() TEST2: Invalid socket ENOTSOCK, Expected error */
+	error = accept(0, (struct sockaddr *)&acpt_addr, &len);
+	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "accept with invalid socket"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid socket - ENOTSOCK");
 
-        /*accept() TEST3: Invalid address EFAULT, Expected error*/
-        error = accept(lstn_sk, (struct sockaddr *) -1, &len);
-        if (error != -1 || errno != EFAULT)
+	/*accept() TEST3: Invalid address EFAULT, Expected error */
+	error = accept(lstn_sk, (struct sockaddr *)-1, &len);
+	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "accept with invalid address"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid address - EFAULT");
 
-	test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len);
+	test_connect(clnt_sk[i++], (struct sockaddr *)&conn_addr, len);
 
-        /*accept() TEST4: on a non-listening socket EINVAL, Expected error*/
-        error = accept(sk, (struct sockaddr *) &acpt_addr, &len);
-        if (error != -1 || errno != EINVAL)
+	/*accept() TEST4: on a non-listening socket EINVAL, Expected error */
+	error = accept(sk, (struct sockaddr *)&acpt_addr, &len);
+	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "accept on a non-listening socket"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on a non-listening socket - EINVAL");
 
-	test_connect(clnt_sk[i++], (struct sockaddr *) &conn_addr, len);
+	test_connect(clnt_sk[i++], (struct sockaddr *)&conn_addr, len);
 
-	/*Calling accept to establish the connection*/
-	acpt_sk = test_accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len);
+	/*Calling accept to establish the connection */
+	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&acpt_addr, &len);
 
-	/*accept() TEST5: On a established socket EINVAL, Expected error*/
-	error = accept(acpt_sk, (struct sockaddr *) &acpt_addr, &len);
+	/*accept() TEST5: On a established socket EINVAL, Expected error */
+	error = accept(acpt_sk, (struct sockaddr *)&acpt_addr, &len);
 	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "accept on an established socket"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on an established socket - EINVAL");
 
-	/*Closing the previously established association*/
+	/*Closing the previously established association */
 	close(acpt_sk);
 
-	test_connect(clnt_sk[i], (struct sockaddr *) &conn_addr, len);
+	test_connect(clnt_sk[i], (struct sockaddr *)&conn_addr, len);
 
-	/*accept() TEST6: On the CLOSED association should succeed*/
-	acpt_sk = accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len);
-        if (acpt_sk < 0)
+	/*accept() TEST6: On the CLOSED association should succeed */
+	acpt_sk = accept(lstn_sk, (struct sockaddr *)&acpt_addr, &len);
+	if (acpt_sk < 0)
 		tst_brkm(TBROK, NULL, "accept a closed association"
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() a closed association - SUCCESS");
 
 	close(acpt_sk);
 
 	/*accept() TEST7: Extracting the association on the listening socket
-	as new socket, new socket socket descriptor should return*/
-	for (i = 0 ; i < (SK_MAX - 1); i++)
-		test_connect(clnt2_sk[i], (struct sockaddr *) &conn_addr, len);
+	   as new socket, new socket socket descriptor should return */
+	for (i = 0; i < (SK_MAX - 1); i++)
+		test_connect(clnt2_sk[i], (struct sockaddr *)&conn_addr, len);
 
-	for (i = 0 ; i < (SK_MAX - 1); i++)
+	for (i = 0; i < (SK_MAX - 1); i++)
 		new_sk[i] = test_accept(lstn_sk, (struct sockaddr *)&acpt_addr,
 					&len);
 
 	tst_resm(TPASS, "accept() on a listening socket - SUCCESS");
 
-        /*close() TEST8: Bad socket descriptor, EBADF Expected error*/
+	/*close() TEST8: Bad socket descriptor, EBADF Expected error */
 	error = close(-1);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "close with a bad socket descriptor "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a bad socket descriptor - EBADF");
 
-	/*close() TEST9: valid socket descriptor should succeed*/
+	/*close() TEST9: valid socket descriptor should succeed */
 	error = close(sk);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "close with a valid socket descriptor"
-                         " error:%d, errno:%d", error, errno);
+			 " error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a valid socket descriptor - SUCCESS");
 
-	/*close() TEST10: closed socket descriptor, EBADF Expected error*/
-        error = close(sk);
-        if (error != -1 || errno != EBADF)
+	/*close() TEST10: closed socket descriptor, EBADF Expected error */
+	error = close(sk);
+	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "close with a closed socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a closed socket descriptor - EBADF");
 
-	for (i = 0 ; i < SK_MAX ; i++) {
+	for (i = 0; i < SK_MAX; i++) {
 		close(clnt_sk[i]);
 		close(new_sk[i]);
 		close(clnt2_sk[i]);
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_addrs.c b/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
index 2bce171..7b3b86f 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_addrs.c
@@ -63,7 +63,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -74,107 +74,106 @@
 int TST_TOTAL = 10;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int error;
+	int error;
 	socklen_t len;
-	int sk,lstn_sk,clnt_sk,acpt_sk,pf_class,sk1;
+	int sk, lstn_sk, clnt_sk, acpt_sk, pf_class, sk1;
 	struct msghdr outmessage;
-        struct msghdr inmessage;
-        char *message = "hello, world!\n";
-        struct iovec iov;
-        struct iovec iov_rcv;
-        struct sctp_sndrcvinfo *sinfo;
-        int msg_count;
-        char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
-        struct cmsghdr *cmsg;
-        struct iovec out_iov;
-        char * buffer_snd;
-        char * buffer_rcv;
+	struct msghdr inmessage;
+	char *message = "hello, world!\n";
+	struct iovec iov;
+	struct iovec iov_rcv;
+	struct sctp_sndrcvinfo *sinfo;
+	int msg_count;
+	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
+	struct cmsghdr *cmsg;
+	struct iovec out_iov;
+	char *buffer_snd;
+	char *buffer_rcv;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	struct sockaddr *laddrs, *paddrs;
 
-        struct sockaddr_in conn_addr,lstn_addr,acpt_addr;
+	struct sockaddr_in conn_addr, lstn_addr, acpt_addr;
 	struct sockaddr_in *addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a regular socket*/
+	/*Creating a regular socket */
 	clnt_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a listen socket*/
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	/*Creating a listen socket */
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-	test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-	/*Listening many sockets as we are calling too many connect here*/
+	/*Listening many sockets as we are calling too many connect here */
 	test_listen(lstn_sk, 1);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(clnt_sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(clnt_sk, (struct sockaddr *)&conn_addr, len);
 
-	acpt_sk = test_accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len);
+	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&acpt_addr, &len);
 
 	memset(&inmessage, 0, sizeof(inmessage));
-        buffer_rcv = malloc(REALLY_BIG);
+	buffer_rcv = malloc(REALLY_BIG);
 
-        iov_rcv.iov_base = buffer_rcv;
-        iov_rcv.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov_rcv;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
+	iov_rcv.iov_base = buffer_rcv;
+	iov_rcv.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov_rcv;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
 
-        msg_count = strlen(message) + 1;
+	msg_count = strlen(message) + 1;
 
 	memset(&outmessage, 0, sizeof(outmessage));
-        buffer_snd = malloc(REALLY_BIG);
+	buffer_snd = malloc(REALLY_BIG);
 
-        outmessage.msg_name = &lstn_addr;
-        outmessage.msg_namelen = sizeof(lstn_addr);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_name = &lstn_addr;
+	outmessage.msg_namelen = sizeof(lstn_addr);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 
-        cmsg = CMSG_FIRSTHDR(&outmessage);
-        cmsg->cmsg_level = IPPROTO_SCTP;
-        cmsg->cmsg_type = SCTP_SNDRCV;
-        cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_controllen = cmsg->cmsg_len;
-        sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
-        memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
+	cmsg = CMSG_FIRSTHDR(&outmessage);
+	cmsg->cmsg_level = IPPROTO_SCTP;
+	cmsg->cmsg_type = SCTP_SNDRCV;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_controllen = cmsg->cmsg_len;
+	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
+	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 
-        iov.iov_base = buffer_snd;
+	iov.iov_base = buffer_snd;
 	iov.iov_len = REALLY_BIG;
-        outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_base = message;
 
-        outmessage.msg_iov->iov_len = msg_count;
+	outmessage.msg_iov->iov_len = msg_count;
 	test_sendmsg(clnt_sk, &outmessage, MSG_NOSIGNAL, msg_count);
 
 	test_recvmsg(acpt_sk, &inmessage, MSG_NOSIGNAL);
 
-	/*sctp_getladdrs() TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*sctp_getladdrs() TEST1: Bad socket descriptor, EBADF Expected error */
 	error = sctp_getladdrs(-1, 0, &laddrs);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "sctp_getladdrs with a bad socket "
@@ -183,7 +182,7 @@
 	tst_resm(TPASS, "sctp_getladdrs() with a bad socket descriptor - "
 		 "EBADF");
 
-	/*sctp_getladdrs() TEST2: Invalid socket, ENOTSOCK Expected error*/
+	/*sctp_getladdrs() TEST2: Invalid socket, ENOTSOCK Expected error */
 	error = sctp_getladdrs(0, 0, &laddrs);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "sctp_getladdrs with invalid socket "
@@ -192,8 +191,8 @@
 	tst_resm(TPASS, "sctp_getladdrs() with invalid socket - ENOTSOCK");
 
 	/*sctp_getladdrs() TEST3: socket of different protocol
-	EOPNOTSUPP Expected error*/
-        sk1 = socket(pf_class, SOCK_STREAM, IPPROTO_IP);
+	   EOPNOTSUPP Expected error */
+	sk1 = socket(pf_class, SOCK_STREAM, IPPROTO_IP);
 	error = sctp_getladdrs(sk1, 0, &laddrs);
 	if (error != -1 || errno != EOPNOTSUPP)
 		tst_brkm(TBROK, NULL, "sctp_getladdrs with socket of "
@@ -202,7 +201,7 @@
 	tst_resm(TPASS, "sctp_getladdrs() with socket of different protocol - "
 		 "EOPNOTSUPP");
 
-	/*sctp_getladdrs() TEST4: Getting the local addresses*/
+	/*sctp_getladdrs() TEST4: Getting the local addresses */
 	error = sctp_getladdrs(lstn_sk, 0, &laddrs);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "sctp_getladdrs with valid socket "
@@ -216,14 +215,14 @@
 
 	tst_resm(TPASS, "sctp_getladdrs() - SUCCESS");
 
-	/*sctp_freealddrs() TEST5: freeing the local address*/
+	/*sctp_freealddrs() TEST5: freeing the local address */
 	if ((sctp_freeladdrs(laddrs)) < 0)
 		tst_brkm(TBROK, NULL, "sctp_freeladdrs "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_freeladdrs() - SUCCESS");
 
-	/*sctp_getpaddrs() TEST6: Bad socket descriptor, EBADF Expected error*/
+	/*sctp_getpaddrs() TEST6: Bad socket descriptor, EBADF Expected error */
 	error = sctp_getpaddrs(-1, 0, &paddrs);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "sctp_getpaddrs with a bad socket "
@@ -232,7 +231,7 @@
 	tst_resm(TPASS, "sctp_getpaddrs() with a bad socket descriptor - "
 		 "EBADF");
 
-	/*sctp_getpaddrs() TEST7: Invalid socket, ENOTSOCK Expected error*/
+	/*sctp_getpaddrs() TEST7: Invalid socket, ENOTSOCK Expected error */
 	error = sctp_getpaddrs(0, 0, &paddrs);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "sctp_getpaddrs with invalid socket "
@@ -241,7 +240,7 @@
 	tst_resm(TPASS, "sctp_getpaddrs() with invalid socket - ENOTSOCK");
 
 	/*sctp_getpaddrs() TEST8: socket of different protocol
-	EOPNOTSUPP Expected error*/
+	   EOPNOTSUPP Expected error */
 	error = sctp_getpaddrs(sk1, 0, &laddrs);
 	if (error != -1 || errno != EOPNOTSUPP)
 		tst_brkm(TBROK, NULL, "sctp_getpaddrs with socket of "
@@ -250,7 +249,7 @@
 	tst_resm(TPASS, "sctp_getpaddrs() with socket of different protocol - "
 		 "EOPNOTSUPP");
 
-	/*sctp_getpaddrs() TEST9: Getting the peer addresses*/
+	/*sctp_getpaddrs() TEST9: Getting the peer addresses */
 	error = sctp_getpaddrs(acpt_sk, 0, &paddrs);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "sctp_getpaddrs with valid socket "
@@ -258,13 +257,13 @@
 
 	addr = (struct sockaddr_in *)paddrs;
 	if (addr->sin_port != acpt_addr.sin_port ||
-            addr->sin_family != acpt_addr.sin_family ||
-            addr->sin_addr.s_addr != acpt_addr.sin_addr.s_addr)
+	    addr->sin_family != acpt_addr.sin_family ||
+	    addr->sin_addr.s_addr != acpt_addr.sin_addr.s_addr)
 		tst_brkm(TBROK, NULL, "sctp_getpaddrs comparision failed");
 
 	tst_resm(TPASS, "sctp_getpaddrs() - SUCCESS");
 
-	/*sctp_freeapddrs() TEST10: freeing the peer address*/
+	/*sctp_freeapddrs() TEST10: freeing the peer address */
 	if ((sctp_freepaddrs(paddrs)) < 0)
 		tst_brkm(TBROK, NULL, "sctp_freepaddrs "
 			 "error:%d, errno:%d", error, errno);
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_connect.c b/testcases/network/sctp/func_tests/test_1_to_1_connect.c
index 36e34cc..93f2caa 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_connect.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_connect.c
@@ -52,7 +52,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <linux/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <sys/uio.h>
@@ -65,100 +65,99 @@
 
 #define SK_MAX 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int error,i;
+	int error, i;
 	socklen_t len;
-	int sk,lstn_sk,clnt_sk[SK_MAX],acpt_sk[SK_MAX],pf_class;
-	int sk1,clnt2_sk;
+	int sk, lstn_sk, clnt_sk[SK_MAX], acpt_sk[SK_MAX], pf_class;
+	int sk1, clnt2_sk;
 
-        struct sockaddr_in conn_addr,lstn_addr,acpt_addr;
+	struct sockaddr_in conn_addr, lstn_addr, acpt_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
-        sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a listen socket*/
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	/*Creating a listen socket */
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a regular socket*/
-	for (i = 0 ; i < SK_MAX ; i++)
+	/*Creating a regular socket */
+	for (i = 0; i < SK_MAX; i++)
 		clnt_sk[i] = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	clnt2_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-	test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-	/*Listening the socket*/
-	test_listen(lstn_sk, SK_MAX-1);
+	/*Listening the socket */
+	test_listen(lstn_sk, SK_MAX - 1);
 
-	/*connect () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*connect () TEST1: Bad socket descriptor, EBADF Expected error */
 	len = sizeof(struct sockaddr_in);
-	error = connect(-1, (const struct sockaddr *) &conn_addr, len);
+	error = connect(-1, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "connect with bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with bad socket descriptor - EBADF");
 
-	/*connect () TEST2: Invalid socket, ENOTSOCK Expected error*/
-	error = connect(0, (const struct sockaddr *) &conn_addr, len);
+	/*connect () TEST2: Invalid socket, ENOTSOCK Expected error */
+	error = connect(0, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "connect with invalid socket "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid socket - ENOTSOCK");
 
-	/*connect () TEST3: Invalid address, EFAULT Expected error*/
-	error = connect(sk, (const struct sockaddr *) -1, len);
+	/*connect () TEST3: Invalid address, EFAULT Expected error */
+	error = connect(sk, (const struct sockaddr *)-1, len);
 	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "connect with invalid address "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address - EFAULT");
 
-	/*connect () TEST4: Invalid address length, EINVAL Expected error*/
-	error = connect(sk, (const struct sockaddr *) &conn_addr, (len - 3));
+	/*connect () TEST4: Invalid address length, EINVAL Expected error */
+	error = connect(sk, (const struct sockaddr *)&conn_addr, (len - 3));
 	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "connect with invalid address length "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address length - EINVAL");
 
-	/*connect () TEST5: Invalid address family, EINVAL Expect error*/
-	conn_addr.sin_family = 9090; /*Assigning invalid address family*/
-        error = connect(sk, (const struct sockaddr *) &conn_addr, len);
-        if (error != -1 || errno != EINVAL)
+	/*connect () TEST5: Invalid address family, EINVAL Expect error */
+	conn_addr.sin_family = 9090;	/*Assigning invalid address family */
+	error = connect(sk, (const struct sockaddr *)&conn_addr, len);
+	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "connect with invalid address family "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address family - EINVAL");
 
 	conn_addr.sin_family = AF_INET;
 
-	/*connect () TEST6: Blocking connect, should pass*/
+	/*connect () TEST6: Blocking connect, should pass */
 	/*All the be below blocking connect should pass as socket will be
-	listening SK_MAX clients*/
-	for (i = 0 ; i < SK_MAX ; i++) {
+	   listening SK_MAX clients */
+	for (i = 0; i < SK_MAX; i++) {
 		error = connect(clnt_sk[i], (const struct sockaddr *)&conn_addr,
-			      len);
+				len);
 		if (error < 0)
 			tst_brkm(TBROK, NULL, "valid blocking connect "
 				 "error:%d, errno:%d", error, errno);
@@ -167,38 +166,38 @@
 	tst_resm(TPASS, "valid blocking connect() - SUCCESS");
 
 	/*connect () TEST7: connect when accept queue is full, ECONNREFUSED
-	Expect error*/
-	/*Now that accept queue is full, the below connect should fail*/
-	error = connect(clnt2_sk, (const struct sockaddr *) &conn_addr, len);
+	   Expect error */
+	/*Now that accept queue is full, the below connect should fail */
+	error = connect(clnt2_sk, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != ECONNREFUSED)
 		tst_brkm(TBROK, NULL, "connect when accept queue is full "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() when accept queue is full - ECONNREFUSED");
 
-	/*Calling a accept first to estblish the pending connections*/
-	for (i=0 ; i < SK_MAX ; i++)
+	/*Calling a accept first to estblish the pending connections */
+	for (i = 0; i < SK_MAX; i++)
 		acpt_sk[i] = test_accept(lstn_sk,
-					 (struct sockaddr *) &acpt_addr, &len);
+					 (struct sockaddr *)&acpt_addr, &len);
 
-	/*connect () TEST8: from a listening socket, EISCONN Expect error*/
-	error = connect(lstn_sk, (const struct sockaddr *) &lstn_addr, len);
+	/*connect () TEST8: from a listening socket, EISCONN Expect error */
+	error = connect(lstn_sk, (const struct sockaddr *)&lstn_addr, len);
 	if (error != -1 || errno != EISCONN)
 		tst_brkm(TBROK, NULL, "connect on a listening socket "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on a listening socket - EISCONN");
 
-	/*connect() TEST9: On established socket, EISCONN Expect error*/
-	i=0;
-	error = connect(acpt_sk[i], (const struct sockaddr *) &lstn_addr, len);
-        if (error != -1 || errno != EISCONN)
+	/*connect() TEST9: On established socket, EISCONN Expect error */
+	i = 0;
+	error = connect(acpt_sk[i], (const struct sockaddr *)&lstn_addr, len);
+	if (error != -1 || errno != EISCONN)
 		tst_brkm(TBROK, NULL, "connect on an established socket "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on an established socket - EISCONN");
 
-	for (i = 0 ; i < 4 ; i++) {
+	for (i = 0; i < 4; i++) {
 		close(clnt_sk[i]);
 		close(acpt_sk[i]);
 	}
@@ -209,7 +208,7 @@
 	error = connect(sk1, (const struct sockaddr *)&conn_addr, len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "Re-establish an association that "
-				 "is closed error:%d, errno:%d", error, errno);
+			 "is closed error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() to re-establish a closed association - "
 		 "SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_connectx.c b/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
index b9677ba..551d49b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_connectx.c
@@ -52,7 +52,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <linux/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <sys/uio.h>
@@ -65,15 +65,14 @@
 
 #define SK_MAX 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int error,i;
+	int error, i;
 	socklen_t len;
-	int sk,lstn_sk,clnt_sk[SK_MAX],acpt_sk[SK_MAX],pf_class;
-	int sk1,clnt2_sk;
+	int sk, lstn_sk, clnt_sk[SK_MAX], acpt_sk[SK_MAX], pf_class;
+	int sk1, clnt2_sk;
 
-	struct sockaddr_in conn_addr,lstn_addr,acpt_addr;
+	struct sockaddr_in conn_addr, lstn_addr, acpt_addr;
 	struct sockaddr *tmp_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
@@ -87,11 +86,11 @@
 	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a listen socket*/
+	/*Creating a listen socket */
 	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*Creating a regular socket*/
-	for (i = 0 ; i < SK_MAX ; i++)
+	/*Creating a regular socket */
+	for (i = 0; i < SK_MAX; i++)
 		clnt_sk[i] = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	clnt2_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
@@ -104,64 +103,66 @@
 	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
 	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-	test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-	/*Listening the socket*/
-	test_listen(lstn_sk, SK_MAX-1);
+	/*Listening the socket */
+	test_listen(lstn_sk, SK_MAX - 1);
 
-	/*sctp_connectx () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*sctp_connectx () TEST1: Bad socket descriptor, EBADF Expected error */
 	len = sizeof(struct sockaddr_in);
-	error = sctp_connectx(-1, (struct sockaddr *) &conn_addr, 1);
+	error = sctp_connectx(-1, (struct sockaddr *)&conn_addr, 1);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "sctp_connectx with bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with bad socket descriptor - EBADF");
 
-	/*sctp_connectx () TEST2: Invalid socket, ENOTSOCK Expected error*/
-	error = sctp_connectx(0, (struct sockaddr *) &conn_addr, 1);
+	/*sctp_connectx () TEST2: Invalid socket, ENOTSOCK Expected error */
+	error = sctp_connectx(0, (struct sockaddr *)&conn_addr, 1);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "sctp_connectx with invalid socket "
-	                 "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid socket - ENOTSOCK");
 
-	/*sctp_connectx () TEST3: Invalid address, EINVAL Expected error*/
-	tmp_addr = (struct sockaddr *) malloc(sizeof(struct sockaddr) - 1);
+	/*sctp_connectx () TEST3: Invalid address, EINVAL Expected error */
+	tmp_addr = (struct sockaddr *)malloc(sizeof(struct sockaddr) - 1);
 	tmp_addr->sa_family = AF_INET;
 	error = sctp_connectx(sk, tmp_addr, 1);
 	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address "
-	                 "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address - EINVAL");
 
-	/*sctp_connectx () TEST4: Invalid address length, EINVAL Expected error*/
-	error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 0);
+	/*sctp_connectx () TEST4: Invalid address length, EINVAL Expected error */
+	error = sctp_connectx(sk, (struct sockaddr *)&conn_addr, 0);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address length "
-	                 "error:%d, errno:%d", error, errno);
+		tst_brkm(TBROK, NULL,
+			 "sctp_connectx with invalid address length "
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address length - EINVAL");
 
-	/*sctp_connectx () TEST5: Invalid address family, EINVAL Expect error*/
-	conn_addr.sin_family = 9090; /*Assigning invalid address family*/
-	error = sctp_connectx(sk, (struct sockaddr *) &conn_addr, 1);
+	/*sctp_connectx () TEST5: Invalid address family, EINVAL Expect error */
+	conn_addr.sin_family = 9090;	/*Assigning invalid address family */
+	error = sctp_connectx(sk, (struct sockaddr *)&conn_addr, 1);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "sctp_connectx with invalid address family "
-	                 "error:%d, errno:%d", error, errno);
+		tst_brkm(TBROK, NULL,
+			 "sctp_connectx with invalid address family "
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() with invalid address family - EINVAL");
 
 	conn_addr.sin_family = AF_INET;
 
-	/*sctp_connectx () TEST6: Blocking sctp_connectx, should pass*/
+	/*sctp_connectx () TEST6: Blocking sctp_connectx, should pass */
 	/*All the be below blocking sctp_connectx should pass as socket will be
-	listening SK_MAX clients*/
-	for (i = 0 ; i < SK_MAX ; i++) {
+	   listening SK_MAX clients */
+	for (i = 0; i < SK_MAX; i++) {
 		error = sctp_connectx(clnt_sk[i], (struct sockaddr *)&conn_addr,
-			      1);
+				      1);
 		if (error < 0)
 			tst_brkm(TBROK, NULL, "valid blocking sctp_connectx "
 				 "error:%d, errno:%d", error, errno);
@@ -170,38 +171,39 @@
 	tst_resm(TPASS, "valid blocking sctp_connectx() - SUCCESS");
 
 	/*sctp_connectx () TEST7: sctp_connectx when accept queue is full, ECONNREFUSED
-	Expect error*/
-	/*Now that accept queue is full, the below sctp_connectx should fail*/
-	error = sctp_connectx(clnt2_sk, (struct sockaddr *) &conn_addr, 1);
+	   Expect error */
+	/*Now that accept queue is full, the below sctp_connectx should fail */
+	error = sctp_connectx(clnt2_sk, (struct sockaddr *)&conn_addr, 1);
 	if (error != -1 || errno != ECONNREFUSED)
 		tst_brkm(TBROK, NULL, "sctp_connectx when accept queue is full "
-	                 "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
-	tst_resm(TPASS, "sctp_connectx() when accept queue is full - ECONNREFUSED");
+	tst_resm(TPASS,
+		 "sctp_connectx() when accept queue is full - ECONNREFUSED");
 
-	/*Calling a accept first to estblish the pending sctp_connectxions*/
-	for (i=0 ; i < SK_MAX ; i++)
+	/*Calling a accept first to estblish the pending sctp_connectxions */
+	for (i = 0; i < SK_MAX; i++)
 		acpt_sk[i] = test_accept(lstn_sk,
-					 (struct sockaddr *) &acpt_addr, &len);
+					 (struct sockaddr *)&acpt_addr, &len);
 
-	/*sctp_connectx () TEST8: from a listening socket, EISCONN Expect error*/
-	error = sctp_connectx(lstn_sk, (struct sockaddr *) &lstn_addr, 1);
+	/*sctp_connectx () TEST8: from a listening socket, EISCONN Expect error */
+	error = sctp_connectx(lstn_sk, (struct sockaddr *)&lstn_addr, 1);
 	if (error != -1 || errno != EISCONN)
 		tst_brkm(TBROK, NULL, "sctp_connectx on a listening socket "
-	                 "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() on a listening socket - EISCONN");
 
-	/*sctp_connectx() TEST9: On established socket, EISCONN Expect error*/
-	i=0;
-	error = sctp_connectx(acpt_sk[i], (struct sockaddr *) &lstn_addr, 1);
+	/*sctp_connectx() TEST9: On established socket, EISCONN Expect error */
+	i = 0;
+	error = sctp_connectx(acpt_sk[i], (struct sockaddr *)&lstn_addr, 1);
 	if (error != -1 || errno != EISCONN)
 		tst_brkm(TBROK, NULL, "sctp_connectx on an established socket "
-	                 "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_connectx() on an established socket - EISCONN");
 
-	for (i = 0 ; i < 4 ; i++) {
+	for (i = 0; i < 4; i++) {
 		close(clnt_sk[i]);
 		close(acpt_sk[i]);
 	}
@@ -212,9 +214,10 @@
 	error = sctp_connectx(sk1, (struct sockaddr *)&conn_addr, 1);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "Re-establish an association that "
-				 "is closed error:%d, errno:%d", error, errno);
+			 "is closed error:%d, errno:%d", error, errno);
 
-	tst_resm(TPASS, "sctp_connectx() to re-establish a closed association - "
+	tst_resm(TPASS,
+		 "sctp_connectx() to re-establish a closed association - "
 		 "SUCCESS");
 
 	close(sk);
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_events.c b/testcases/network/sctp/func_tests/test_1_to_1_events.c
index 6be09e0..514b25b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_events.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_events.c
@@ -37,9 +37,9 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>
-#include <sys/socket.h>         /* needed by linux/sctp.h */
+#include <sys/socket.h>		/* needed by linux/sctp.h */
 #include <sys/uio.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <errno.h>
 #include <netinet/sctp.h>
 #include <sctputil.h>
@@ -49,11 +49,10 @@
 int TST_TOTAL = 4;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int svr_sk, clt_sk,acpt_sk;
-	struct sockaddr_in svr_loop, clt_loop,acpt_loop;
+	int svr_sk, clt_sk, acpt_sk;
+	struct sockaddr_in svr_loop, clt_loop, acpt_loop;
 	struct iovec iov, out_iov;
 	struct msghdr inmessage, outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
@@ -68,7 +67,7 @@
 	uint32_t ppid;
 	uint32_t stream;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -83,8 +82,8 @@
 	clt_loop.sin_port = htons(SCTP_TESTPORT_1);
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
-	test_bind(svr_sk, (struct sockaddr *) &svr_loop, sizeof(svr_loop));
+	svr_sk = test_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
+	test_bind(svr_sk, (struct sockaddr *)&svr_loop, sizeof(svr_loop));
 
 	/* Mark server socket as being able to accept new associations.  */
 	test_listen(svr_sk, 3);
@@ -100,9 +99,9 @@
 	test_setsockopt(clt_sk, SCTP_EVENTS, &event, len);
 
 	len = sizeof(struct sockaddr_in);
-	test_connect(clt_sk, (struct sockaddr *) &clt_loop, len);
+	test_connect(clt_sk, (struct sockaddr *)&clt_loop, len);
 
-	acpt_sk = test_accept(svr_sk, (struct sockaddr *) &acpt_loop, &len);
+	acpt_sk = test_accept(svr_sk, (struct sockaddr *)&acpt_loop, &len);
 
 	/* Build up a msghdr structure we can use for all sending.  */
 	memset(&outmessage, 0, sizeof(outmessage));
@@ -121,7 +120,7 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 
 	sinfo->sinfo_ppid = ppid;
@@ -130,13 +129,15 @@
 	outmessage.msg_iov->iov_base = message;
 	outmessage.msg_iov->iov_len = (strlen(message) + 1);
 
-	/* Send . This will create the association*/
-	test_sendmsg(clt_sk, &outmessage, 0, strlen(message)+1);
+	/* Send . This will create the association */
+	test_sendmsg(clt_sk, &outmessage, 0, strlen(message) + 1);
 
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	/* NOW initialize inmessage with enough space for DATA... */
 	big_buffer = malloc(REALLY_BIG);
-	if (!big_buffer) { DUMP_CORE; }
+	if (!big_buffer) {
+		DUMP_CORE;
+	}
 
 	/* Let's do a test to do a recvmsg when we are not listening and
 	 * when we have no associations.
@@ -150,37 +151,34 @@
 
 	error = test_recvmsg(clt_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage,
-                                    error,
-                                    sizeof(struct sctp_assoc_change),
-                                    SCTP_ASSOC_CHANGE,
-                                    SCTP_COMM_UP);
+				    error,
+				    sizeof(struct sctp_assoc_change),
+				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 
 	tst_resm(TPASS, "COMM_UP notification on client socket - SUCCESS");
 
 	error = test_recvmsg(acpt_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage,
-                                    error,
-                                    sizeof(struct sctp_assoc_change),
-                                    SCTP_ASSOC_CHANGE,
-                                    SCTP_COMM_UP);
+				    error,
+				    sizeof(struct sctp_assoc_change),
+				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 
 	tst_resm(TPASS, "COMM_UP notification on server socket - SUCCESS");
 
 	inmessage.msg_control = incmsg;
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = test_recvmsg(acpt_sk, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
-                            MSG_EOR, stream, ppid);
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
+			    MSG_EOR, stream, ppid);
 
 	tst_resm(TPASS, "Data message on server socket - SUCCESS");
 
 	close(clt_sk);
 	error = test_recvmsg(acpt_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage,
-                                    error,
-                                    sizeof(struct sctp_shutdown_event),
-                                    SCTP_SHUTDOWN_EVENT,
-                                    0);
+				    error,
+				    sizeof(struct sctp_shutdown_event),
+				    SCTP_SHUTDOWN_EVENT, 0);
 
 	tst_resm(TPASS, "SHUTDOWN notification on accepted socket - SUCCESS");
 	close(svr_sk);
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_initmsg_connect.c b/testcases/network/sctp/func_tests/test_1_to_1_initmsg_connect.c
index 9208328..11b629a 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_initmsg_connect.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_initmsg_connect.c
@@ -41,7 +41,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -52,14 +52,13 @@
 int TST_TOTAL = 1;
 int TST_CNT = 0;
 
-int
-main (int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int sk1, sk2, sk3, pf_class;
 	socklen_t len;
 	struct sockaddr_in lstn_addr, acpt_addr;
 	struct sockaddr_in conn_addr;
-	char * buffer_rcv;
+	char *buffer_rcv;
 	struct sctp_initmsg sinmsg;
 	char *message = "Hello World!\n";
 
@@ -69,22 +68,22 @@
 	setvbuf(stdout, NULL, _IONBF, 0);
 	setvbuf(stderr, NULL, _IONBF, 0);
 
-	/* Opening the socket*/
+	/* Opening the socket */
 
 	pf_class = PF_INET;
 
 	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 	sk3 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_family = AF_INET;
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-        lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_family = AF_INET;
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	test_bind(sk3, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	test_bind(sk3, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
 	len = sizeof(struct sctp_initmsg);
 	sinmsg.sinit_num_ostreams = 65535;
@@ -99,9 +98,9 @@
 	test_listen(sk3, 1);
 
 	len = sizeof(struct sockaddr_in);
-	test_connect(sk1, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk1, (struct sockaddr *)&conn_addr, len);
 
-	sk2 = test_accept(sk3, (struct sockaddr *) &acpt_addr, &len);
+	sk2 = test_accept(sk3, (struct sockaddr *)&acpt_addr, &len);
 
 	test_sctp_sendmsg(sk1, message, strlen(message) + 1,
 			  (struct sockaddr *)&conn_addr, len,
@@ -112,9 +111,9 @@
 
 	tst_resm(TPASS, "connect() with init timeout set to 0 - SUCCESS");
 
-	close (sk1);
-	close (sk2);
-	close (sk3);
+	close(sk1);
+	close(sk2);
+	close(sk3);
 
-    return 0;
+	return 0;
 }
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c b/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
index 2b348fe..7b66b20 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_nonblock.c
@@ -48,7 +48,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -60,92 +60,91 @@
 int TST_TOTAL = 5;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int error,msg_count;
+	int error, msg_count;
 	socklen_t len;
-	int sk,pf_class,lstn_sk,acpt_sk,flag,cflag,sflag;
+	int sk, pf_class, lstn_sk, acpt_sk, flag, cflag, sflag;
 	struct msghdr outmessage;
 	struct msghdr inmessage;
-        char *message = "hello, world!\n";
-        struct iovec iov;
-        struct iovec iov_rcv;
+	char *message = "hello, world!\n";
+	struct iovec iov;
+	struct iovec iov_rcv;
 	struct sctp_sndrcvinfo *sinfo;
-        int count;
+	int count;
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
-        struct iovec out_iov;
-        char * buffer_snd;
-	char * buffer_rcv;
+	struct iovec out_iov;
+	char *buffer_snd;
+	char *buffer_rcv;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbufferd
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbufferd
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 	flag = MSG_NOSIGNAL;
 
-	/*Setting server socket non-blocking*/
+	/*Setting server socket non-blocking */
 	sflag = fcntl(lstn_sk, F_GETFL, 0);
 	if (sflag < 0)
 		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
-                         "sflag:%d, errno:%d", sflag, errno);
+			 "sflag:%d, errno:%d", sflag, errno);
 
 	error = fcntl(lstn_sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	/* TEST1: accept should return EAGAIN instead blocking. */
 	error = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (error != -1 || errno != EAGAIN)
 		tst_brkm(TBROK, NULL, "non-blocking accept "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking accept() - EAGAIN");
 
 	/* TEST2: Non Block connect should return EINPROGRESS */
-	/*Set client socket as non-blocking*/
+	/*Set client socket as non-blocking */
 	cflag = fcntl(sk, F_GETFL, 0);
 	if (cflag < 0)
 		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
-                         "cflag:%d, errno:%d", cflag, errno);
+			 "cflag:%d, errno:%d", cflag, errno);
 
 	error = fcntl(sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
-	error = connect(sk, (const struct sockaddr *) &conn_addr, len);
+	error = connect(sk, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != EINPROGRESS)
 		tst_brkm(TBROK, NULL, "non-blocking connect "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connect() - EINPROGRESS");
 
@@ -153,44 +152,44 @@
 	acpt_sk = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (acpt_sk < 0)
 		tst_brkm(TBROK, NULL, "accept after a non-blocking connect "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() after a non-blocking connect - SUCCESS");
 
 	memset(&outmessage, 0, sizeof(outmessage));
-        buffer_snd = malloc(REALLY_BIG);
+	buffer_snd = malloc(REALLY_BIG);
 
-        outmessage.msg_name = &svr_addr;
-        outmessage.msg_namelen = sizeof(svr_addr);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_name = &svr_addr;
+	outmessage.msg_namelen = sizeof(svr_addr);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 
 	cmsg = CMSG_FIRSTHDR(&outmessage);
-        cmsg->cmsg_level = IPPROTO_SCTP;
-        cmsg->cmsg_type = SCTP_SNDRCV;
-        cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_controllen = cmsg->cmsg_len;
+	cmsg->cmsg_level = IPPROTO_SCTP;
+	cmsg->cmsg_type = SCTP_SNDRCV;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
-        memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
+	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 
 	iov.iov_base = buffer_snd;
-        iov.iov_len = REALLY_BIG;
-        outmessage.msg_iov->iov_base = message;
+	iov.iov_len = REALLY_BIG;
+	outmessage.msg_iov->iov_base = message;
 
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
 
 	memset(&inmessage, 0, sizeof(inmessage));
-        buffer_rcv = malloc(REALLY_BIG);
+	buffer_rcv = malloc(REALLY_BIG);
 
-        iov_rcv.iov_base = buffer_rcv;
-        iov_rcv.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov_rcv;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
+	iov_rcv.iov_base = buffer_rcv;
+	iov_rcv.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov_rcv;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
 
 	msg_count = strlen(message) + 1;
 
@@ -198,7 +197,7 @@
 	error = recvmsg(sk, &inmessage, MSG_WAITALL);
 	if (error != -1 || errno != EAGAIN)
 		tst_brkm(TBROK, NULL, "non-blocking recvmsg "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking recvmsg() - EAGAIN");
 
@@ -206,7 +205,7 @@
 
 	/* TEST5: recvmsg() should succeed now as data is available. */
 	error = test_recvmsg(sk, &inmessage, flag);
-        test_check_msg_data(&inmessage, error, msg_count, MSG_EOR, 0, 0);
+	test_check_msg_data(&inmessage, error, msg_count, MSG_EOR, 0, 0);
 
 	tst_resm(TPASS, "non-blocking recvmsg() when data is available - "
 		 "SUCCESS");
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c b/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
index 692f0c0..658692b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c
@@ -48,7 +48,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -60,59 +60,58 @@
 int TST_TOTAL = 7;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int ret, msg_count;
+	int ret, msg_count;
 	socklen_t len;
-	int sk,pf_class,lstn_sk,acpt_sk, flag;
-        char *message = "hello, world!\n";
+	int sk, pf_class, lstn_sk, acpt_sk, flag;
+	char *message = "hello, world!\n";
 	char *message_rcv;
-        int count;
+	int count;
 
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
 	message_rcv = malloc(512);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	msg_count = (strlen(message) + 1);
 
 	flag = MSG_NOSIGNAL;
-	/*Sending the message*/
+	/*Sending the message */
 	count = test_send(sk, message, msg_count, flag);
 
-	/*recvfrom () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*recvfrom () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = recvfrom(-1, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EBADF)
@@ -121,7 +120,7 @@
 
 	tst_resm(TPASS, "recvfrom() with a bad socket descriptor - EBADF");
 
-	/*recvfrom () TEST2: Invalid socket , ENOTSOCK Expected error*/
+	/*recvfrom () TEST2: Invalid socket , ENOTSOCK Expected error */
 	count = recvfrom(0, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTSOCK)
@@ -130,7 +129,7 @@
 
 	tst_resm(TPASS, "recvfrom() with invalid socket - ENOTSOCK");
 
-	/*recvfrom () TEST3: Invalid message pointer EFAULT, Expected error*/
+	/*recvfrom () TEST3: Invalid message pointer EFAULT, Expected error */
 	count = recvfrom(acpt_sk, (char *)-1, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EFAULT)
@@ -139,7 +138,7 @@
 
 	tst_resm(TPASS, "recvfrom() with invalid message ptr - EFAULT");
 
-	/*TEST4: recvfrom on listening socket,ENOTCONN Expected error*/
+	/*TEST4: recvfrom on listening socket,ENOTCONN Expected error */
 	count = recvfrom(lstn_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
@@ -152,7 +151,7 @@
 
 	ret = test_shutdown(sk, SHUT_WR);
 
-	/*recvfrom () TEST5:reading on a socket that received SHUTDOWN*/
+	/*recvfrom () TEST5:reading on a socket that received SHUTDOWN */
 	count = recvfrom(acpt_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
@@ -163,7 +162,7 @@
 		 "EOF");
 
 	/*recvfrom () TEST6:reading the pending message on socket that sent
-	SHUTDOWN*/
+	   SHUTDOWN */
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
@@ -175,7 +174,7 @@
 		 "sent shutdown - SUCCESS");
 
 	/*recvfrom () TEST7: No more message and association is shutdown,
-	ENOTCONN Expected error*/
+	   ENOTCONN Expected error */
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c b/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
index e97a119..a40b16d 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c
@@ -49,7 +49,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -61,66 +61,65 @@
 int TST_TOTAL = 8;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        socklen_t len;
+	socklen_t len;
 	int ret;
-	int sk,pf_class,lstn_sk,acpt_sk;
+	int sk, pf_class, lstn_sk, acpt_sk;
 	int flag = 0;
 	struct msghdr inmessage;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	struct iovec iov_rcv;
-        int count;
-	char * buffer_rcv;
-        char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
+	int count;
+	char *buffer_rcv;
+	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char *message1 = "hello, world!\n";
 
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	memset(&inmessage, 0, sizeof(inmessage));
-        buffer_rcv = malloc(REALLY_BIG);
+	buffer_rcv = malloc(REALLY_BIG);
 
-        iov_rcv.iov_base = buffer_rcv;
-        iov_rcv.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov_rcv;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
+	iov_rcv.iov_base = buffer_rcv;
+	iov_rcv.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov_rcv;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
 
-	/*recvmsg () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*recvmsg () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = recvmsg(-1, &inmessage, flag);
 	if (count != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "recvmsg with a bad socket "
@@ -128,7 +127,7 @@
 
 	tst_resm(TPASS, "recvmsg() with a bad socket descriptor - EBADF");
 
-	/*recvmsg () TEST2: Invalid socket , ENOTSOCK Expected error*/
+	/*recvmsg () TEST2: Invalid socket , ENOTSOCK Expected error */
 	count = recvmsg(0, &inmessage, flag);
 	if (count != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "recvmsg with invalid socket "
@@ -136,7 +135,7 @@
 
 	tst_resm(TPASS, "recvmsg() with invalid socket - ENOTSOCK");
 
-	/*recvmsg () TEST3: Invalid iovec pointer EFAULT, Expected error*/
+	/*recvmsg () TEST3: Invalid iovec pointer EFAULT, Expected error */
 	inmessage.msg_iov = (struct iovec *)-1;
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count != -1 || errno != EFAULT)
@@ -147,7 +146,7 @@
 
 	inmessage.msg_iov = &iov_rcv;
 
-	/*recvmsg () TEST4: Invalid msghdr pointer EFAULT, Expected error*/
+	/*recvmsg () TEST4: Invalid msghdr pointer EFAULT, Expected error */
 	count = recvmsg(acpt_sk, (struct msghdr *)-1, flag);
 	if (count != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "recvmsg with invalid msghdr "
@@ -155,7 +154,7 @@
 
 	tst_resm(TPASS, "recvmsg() with invalid msghdr ptr - EFAULT");
 
-	/*recvmsg () TEST5:recvmsg on listening socket,ENOTCONN Expected error*/
+	/*recvmsg () TEST5:recvmsg on listening socket,ENOTCONN Expected error */
 	count = recvmsg(lstn_sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
 		tst_brkm(TBROK, NULL, "recvmsg on listening socket "
@@ -168,7 +167,7 @@
 	ret = test_shutdown(sk, SHUT_WR);
 
 	flag = MSG_NOSIGNAL;
-	/*recvmsg () TEST6:reading on a socket that received SHUTDOWN*/
+	/*recvmsg () TEST6:reading on a socket that received SHUTDOWN */
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count < 0)
 		tst_brkm(TBROK, NULL, "recvmsg on a socket that has "
@@ -178,7 +177,7 @@
 		 "EOF");
 
 	/*recvmsg () TEST7:reading the pending message socket that sent
-	SHUTDOWN*/
+	   SHUTDOWN */
 	count = recvmsg(sk, &inmessage, flag);
 	if (count < 0)
 		tst_brkm(TBROK, NULL, "recvmsg on a socket with pending "
@@ -189,7 +188,7 @@
 		 "sent shutdown - SUCCESS");
 
 	/*recvmsg () TEST8: No more message and association is shutdown,
-	ENOTCONN Expected error*/
+	   ENOTCONN Expected error */
 	count = recvmsg(sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
 		tst_brkm(TBROK, NULL, "recvmsg on a socket with no "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c b/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
index 03184d5..c31bdd9 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c
@@ -46,8 +46,8 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <linux/socket.h>
-#include <linux/in.h>         /* for sockaddr_in */
-#include <linux/in6.h>         /* for sockaddr_in6 */
+#include <linux/in.h>		/* for sockaddr_in */
+#include <linux/in6.h>		/* for sockaddr_in6 */
 #include <errno.h>
 #include <sys/uio.h>
 #include <netinet/sctp.h>
@@ -57,20 +57,19 @@
 int TST_TOTAL = 3;
 int TST_CNT = 0;
 
-int
-main(void)
+int main(void)
 {
 
 	int sd, ret;
 	socklen_t len;
-	struct sctp_rtoinfo srtoinfo; /*setting the variables*/
-	struct sctp_rtoinfo grtoinfo; /*Getting the variables*/
+	struct sctp_rtoinfo srtoinfo;	/*setting the variables */
+	struct sctp_rtoinfo grtoinfo;	/*Getting the variables */
 
-	sd = test_socket (PF_INET, SOCK_STREAM, IPPROTO_SCTP);
+	sd = test_socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
 
 	len = sizeof(struct sctp_rtoinfo);
 
-	/*TEST1 Getting the default values using getsockopt()*/
+	/*TEST1 Getting the default values using getsockopt() */
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
@@ -78,21 +77,21 @@
 
 	tst_resm(TPASS, "getsockopt() SCTP_RTOINFO - SUCCESS");
 
-	/*Assigning the values to RTO initial and max and min bounds*/
-	srtoinfo.srto_initial=60;
-	srtoinfo.srto_max=100;
-	srtoinfo.srto_min=40;
+	/*Assigning the values to RTO initial and max and min bounds */
+	srtoinfo.srto_initial = 60;
+	srtoinfo.srto_max = 100;
+	srtoinfo.srto_min = 40;
 
-	/*TEST2 Setting the values using setsockopt()*/
+	/*TEST2 Setting the values using setsockopt() */
 	ret = setsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &srtoinfo,
-		sizeof(struct sctp_rtoinfo));
+			 sizeof(struct sctp_rtoinfo));
 	if (ret < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	tst_resm(TPASS, "setsockopt() SCTP_RTOINFO - SUCCESS");
 
-	/*Getting the values which are set using setsockopt()*/
+	/*Getting the values which are set using setsockopt() */
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
@@ -100,8 +99,8 @@
 
 	/* TEST3 Compare the get values with the set values. */
 	if (srtoinfo.srto_initial != grtoinfo.srto_initial &&
-            srtoinfo.srto_max != grtoinfo.srto_max &&
-            srtoinfo.srto_min != grtoinfo.srto_min)
+	    srtoinfo.srto_max != grtoinfo.srto_max &&
+	    srtoinfo.srto_min != grtoinfo.srto_min)
 		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SCTP_RTOINFO "
 			 "compare failed");
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_send.c b/testcases/network/sctp/func_tests/test_1_to_1_send.c
index 3d33460..a8dc8f5 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_send.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_send.c
@@ -49,7 +49,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -61,55 +61,54 @@
 int TST_TOTAL = 8;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        socklen_t len,len_snd;
+	socklen_t len, len_snd;
 	int msg_count;
-	int sk,sk1,pf_class,lstn_sk,acpt_sk,acpt1_sk, flag, count;
-        char *message = "hello, world!\n";
-        char *message_rcv;
+	int sk, sk1, pf_class, lstn_sk, acpt_sk, acpt1_sk, flag, count;
+	char *message = "hello, world!\n";
+	char *message_rcv;
 
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	len_snd = (strlen(message) + 1);
 
 	flag = MSG_NOSIGNAL;
-	/*send () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*send () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = send(-1, message, len_snd, flag);
 	if (count != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "send with a bad socket "
@@ -117,7 +116,7 @@
 
 	tst_resm(TPASS, "send() with a bad socket descriptor - EBADF");
 
-	/*send () TEST2: Invalid socket, ENOTSOCK Expected error*/
+	/*send () TEST2: Invalid socket, ENOTSOCK Expected error */
 	count = send(0, message, len_snd, flag);
 	if (count != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "send with invalid socket "
@@ -125,7 +124,7 @@
 
 	tst_resm(TPASS, "send() with invalid socket - ENOTSOCK");
 
-	/*send () TEST3: send on listening socket, EPIPE Expected error*/
+	/*send () TEST3: send on listening socket, EPIPE Expected error */
 	count = send(lstn_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
 		tst_brkm(TBROK, NULL, "send on a listening socket "
@@ -133,8 +132,8 @@
 
 	tst_resm(TPASS, "send() on a listening socket - EPIPE");
 #if 0
-	/*send () TEST4: Invalid message address, EFAULT Expected error*/
-       /* FIXME this test should pass. Don't catch why...  */
+	/*send () TEST4: Invalid message address, EFAULT Expected error */
+	/* FIXME this test should pass. Don't catch why...  */
 	count = send(sk, (char *)0x1, len_snd, flag);
 	if (count != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "send with invalid message "
@@ -143,7 +142,7 @@
 	tst_resm(TPASS, "send() with invalid message ptr - EFAULT");
 #endif
 
-	test_connect(sk1, (struct sockaddr *) &lstn_addr, len);
+	test_connect(sk1, (struct sockaddr *)&lstn_addr, len);
 
 	count = test_send(sk1, message, len_snd, flag);
 
@@ -151,7 +150,7 @@
 
 	acpt1_sk = test_accept(lstn_sk, (struct sockaddr *)&conn_addr, &len);
 
-	/*send () TEST5: send on closed association, EPIPE Expected error*/
+	/*send () TEST5: send on closed association, EPIPE Expected error */
 	count = send(acpt1_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
 		tst_brkm(TBROK, NULL, "send on a closed association "
@@ -163,61 +162,61 @@
 	close(lstn_sk);
 	close(acpt_sk);
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	message_rcv = malloc(512);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	msg_count = strlen(message) + 1;
 
-	/*send() TEST6: Sending data from client socket to server socket*/
+	/*send() TEST6: Sending data from client socket to server socket */
 	count = send(sk, message, msg_count, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "send from client to server "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from client to server - SUCCESS");
 
 	test_recv(acpt_sk, message_rcv, msg_count, flag);
 
-	strncpy(message_rcv,"\0",512);
+	strncpy(message_rcv, "\0", 512);
 
-	/*send() TEST7: Sending data from accept socket to client socket*/
+	/*send() TEST7: Sending data from accept socket to client socket */
 	count = send(acpt_sk, message, msg_count, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "send from accept socket to client "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from accept socket to client - SUCCESS");
 
 	test_recv(sk, message_rcv, msg_count, flag);
 
-	/*send() TEST8: Sending less number of data from the buffer*/
-	/*Sending only 5 bytes so that only hello is received*/
-	test_send(sk, message, 5 , flag);
+	/*send() TEST8: Sending less number of data from the buffer */
+	/*Sending only 5 bytes so that only hello is received */
+	test_send(sk, message, 5, flag);
 	test_recv(acpt_sk, message_rcv, 5, flag);
 
 	tst_resm(TPASS, "send() partial data from a buffer - SUCCESS");
 
 	/* TEST9: sctp_send with no sinfo */
-	test_sctp_send(sk, message, strlen(message) + 1 , NULL, flag);
+	test_sctp_send(sk, message, strlen(message) + 1, NULL, flag);
 	test_recv(acpt_sk, message_rcv, strlen(message) + 1, flag);
 	tst_resm(TPASS, "sctp_send() with no sinfo - SUCCESS");
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c b/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
index ee46ffa..dffdde5 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c
@@ -56,7 +56,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -68,89 +68,88 @@
 int TST_TOTAL = 14;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        socklen_t len;
+	socklen_t len;
 	int msg_count;
-	int sk,sk1,pf_class,lstn_sk,acpt_sk,acpt1_sk, flag;
+	int sk, sk1, pf_class, lstn_sk, acpt_sk, acpt1_sk, flag;
 	struct msghdr outmessage;
-        char *message = "hello, world!\n";
-        struct iovec iov;
+	char *message = "hello, world!\n";
+	struct iovec iov;
 	struct sctp_sndrcvinfo *sinfo;
-        int count;
+	int count;
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
-        struct iovec out_iov;
-        char * buffer;
+	struct iovec out_iov;
+	char *buffer;
 	struct msghdr inmessage;
-        char * buffer_snd;
-	char * buffer_rcv;
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
-        struct iovec iov_rcv;
+	char *buffer_snd;
+	char *buffer_rcv;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
+	struct iovec iov_rcv;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	memset(&outmessage, 0, sizeof(outmessage));
-        buffer = malloc(REALLY_BIG);
+	buffer = malloc(REALLY_BIG);
 
-        outmessage.msg_name = &conn_addr;
-        outmessage.msg_namelen = sizeof(conn_addr);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_name = &conn_addr;
+	outmessage.msg_namelen = sizeof(conn_addr);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 
 	cmsg = CMSG_FIRSTHDR(&outmessage);
-        cmsg->cmsg_level = IPPROTO_SCTP;
-        cmsg->cmsg_type = SCTP_SNDRCV;
-        cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_controllen = cmsg->cmsg_len;
+	cmsg->cmsg_level = IPPROTO_SCTP;
+	cmsg->cmsg_type = SCTP_SNDRCV;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
-        memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
+	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 
 	iov.iov_base = buffer;
-        iov.iov_len = REALLY_BIG;
-        outmessage.msg_iov->iov_base = message;
+	iov.iov_len = REALLY_BIG;
+	outmessage.msg_iov->iov_base = message;
 
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
 
 	flag = MSG_NOSIGNAL;
-	/*sendmsg () TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*sendmsg () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = sendmsg(-1, &outmessage, flag);
 	if (count != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "sendmsg with a bad socket "
@@ -158,7 +157,7 @@
 
 	tst_resm(TPASS, "sendmsg() with a bad socket descriptor - EBADF");
 
-	/*sendmsg () TEST2: Invalid socket, ENOTSOCK Expected error*/
+	/*sendmsg () TEST2: Invalid socket, ENOTSOCK Expected error */
 	count = sendmsg(0, &outmessage, flag);
 	if (count != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "sendmsg with invalid socket "
@@ -166,7 +165,7 @@
 
 	tst_resm(TPASS, "sendmsg() with invalid socket - ENOTSOCK");
 
-	/*sendmsg () TEST3: sendmsg on listening socket, EPIPE Expected error*/
+	/*sendmsg () TEST3: sendmsg on listening socket, EPIPE Expected error */
 	count = sendmsg(lstn_sk, &outmessage, flag);
 	if (count != -1 || errno != EPIPE)
 		tst_brkm(TBROK, NULL, "sendmsg on a listening socket "
@@ -174,7 +173,7 @@
 
 	tst_resm(TPASS, "sendmsg() on a listening socket - EPIPE");
 
-	/*sendmsg () TEST4: Invalid iovec pointer EFAULT, Expected error*/
+	/*sendmsg () TEST4: Invalid iovec pointer EFAULT, Expected error */
 	outmessage.msg_iov = (struct iovec *)-1;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EFAULT)
@@ -185,8 +184,8 @@
 
 	outmessage.msg_iov = &out_iov;
 
-	/*sendmsg () TEST5: Invalid iovec count EINVAL, Expected error*/
-        outmessage.msg_iovlen = 0;
+	/*sendmsg () TEST5: Invalid iovec count EINVAL, Expected error */
+	outmessage.msg_iovlen = 0;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "sendmsg with invalid iovec "
@@ -196,7 +195,7 @@
 
 	outmessage.msg_iovlen = 1;
 
-	/*sendmsg () TEST6: Invalid msghdr pointer EFAULT, Expected error*/
+	/*sendmsg () TEST6: Invalid msghdr pointer EFAULT, Expected error */
 	count = sendmsg(sk, (struct msghdr *)-1, flag);
 	if (count != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "sendmsg with invalid msghdr "
@@ -204,7 +203,7 @@
 
 	tst_resm(TPASS, "sendmsg() with invalid msghdr ptr - EFAULT");
 
-	/*sendmsg () TEST7: Invalid sinfo flag EINVAL, Expected error*/
+	/*sendmsg () TEST7: Invalid sinfo flag EINVAL, Expected error */
 	sinfo->sinfo_flags = 999;
 	count = sendmsg(sk, &outmessage, -1);
 	if (count != -1 || errno != EINVAL)
@@ -213,7 +212,7 @@
 
 	tst_resm(TPASS, "sendmsg() with invalid sinfo flags - EINVAL");
 
-	/*sendmsg () TEST8: SCTP_EOF flag EINVAL, Expected error*/
+	/*sendmsg () TEST8: SCTP_EOF flag EINVAL, Expected error */
 	sinfo->sinfo_flags = SCTP_EOF;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
@@ -222,7 +221,7 @@
 
 	tst_resm(TPASS, "sendmsg() with SCTP_EOF flag - EINVAL");
 
-	/*sendmsg () TEST9: SCTP_ABORT flag EINVAL, Expected error*/
+	/*sendmsg () TEST9: SCTP_ABORT flag EINVAL, Expected error */
 	sinfo->sinfo_flags = SCTP_ABORT;
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != -1 || errno != EINVAL)
@@ -233,14 +232,14 @@
 
 	sinfo->sinfo_flags = 0;
 
-	test_connect(sk1, (struct sockaddr *) &lstn_addr, len);
+	test_connect(sk1, (struct sockaddr *)&lstn_addr, len);
 
-	test_sendmsg(sk1, &outmessage, flag, strlen(message)+1);
+	test_sendmsg(sk1, &outmessage, flag, strlen(message) + 1);
 
 	close(sk1);
 	acpt1_sk = test_accept(lstn_sk, (struct sockaddr *)&conn_addr, &len);
 
-	/*sendmsg () TEST10:sendmsg on closed association, EPIPE Expected error*/
+	/*sendmsg () TEST10:sendmsg on closed association, EPIPE Expected error */
 	count = sendmsg(acpt1_sk, &outmessage, flag);
 	if (count != -1 || errno != EPIPE)
 		tst_brkm(TBROK, NULL, "sendmsg on a closed association "
@@ -252,69 +251,69 @@
 	close(lstn_sk);
 	close(acpt_sk);
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 	flag = MSG_NOSIGNAL;
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	memset(&outmessage, 0, sizeof(outmessage));
-        buffer_snd = malloc(REALLY_BIG);
+	buffer_snd = malloc(REALLY_BIG);
 
-        outmessage.msg_name = &svr_addr;
-        outmessage.msg_namelen = sizeof(svr_addr);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_name = &svr_addr;
+	outmessage.msg_namelen = sizeof(svr_addr);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 
 	cmsg = CMSG_FIRSTHDR(&outmessage);
-        cmsg->cmsg_level = IPPROTO_SCTP;
-        cmsg->cmsg_type = SCTP_SNDRCV;
-        cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_controllen = cmsg->cmsg_len;
+	cmsg->cmsg_level = IPPROTO_SCTP;
+	cmsg->cmsg_type = SCTP_SNDRCV;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
-        memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
+	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 
 	iov.iov_base = buffer_snd;
-        iov.iov_len = REALLY_BIG;
-        outmessage.msg_iov->iov_base = message;
+	iov.iov_len = REALLY_BIG;
+	outmessage.msg_iov->iov_base = message;
 
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
 
 	memset(&inmessage, 0, sizeof(inmessage));
-        buffer_rcv = malloc(REALLY_BIG);
+	buffer_rcv = malloc(REALLY_BIG);
 
-        iov_rcv.iov_base = buffer_rcv;
-        iov_rcv.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov_rcv;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
+	iov_rcv.iov_base = buffer_rcv;
+	iov_rcv.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov_rcv;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
 
 	msg_count = strlen(message) + 1;
 
-	/*sendmsg() TEST11: Sending data from server socket to client socket*/
+	/*sendmsg() TEST11: Sending data from server socket to client socket */
 	count = sendmsg(acpt_sk, &outmessage, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendmsg from accept socket to "
@@ -323,29 +322,29 @@
 	tst_resm(TPASS, "sendmsg() from accept socket to client - SUCCESS");
 
 	count = test_recvmsg(sk, &inmessage, flag);
-        test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
+	test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
 
-        outmessage.msg_name = &conn_addr;
-        outmessage.msg_namelen = sizeof(conn_addr);
-	/*sendmsg() TEST12: Sending data from client socket to server socket*/
+	outmessage.msg_name = &conn_addr;
+	outmessage.msg_namelen = sizeof(conn_addr);
+	/*sendmsg() TEST12: Sending data from client socket to server socket */
 	count = sendmsg(sk, &outmessage, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendmsg from client to server "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() from client to server - SUCCESS");
 
 	count = test_recvmsg(acpt_sk, &inmessage, flag);
-        test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
+	test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
 
-        outmessage.msg_name = &conn_addr;
-        outmessage.msg_namelen = sizeof(conn_addr);
+	outmessage.msg_name = &conn_addr;
+	outmessage.msg_namelen = sizeof(conn_addr);
 	close(sk);
 	close(acpt_sk);
 	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/*sendmsg() TEST13: Sending data from unconnected client socket to
-	server socket*/
+	   server socket */
 	count = sendmsg(sk1, &outmessage, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendmsg from unconnected client to "
@@ -356,20 +355,20 @@
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	count = test_recvmsg(acpt_sk, &inmessage, flag);
-        test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
+	test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
 
 	test_shutdown(sk1, SHUT_RD);
 
-	/*sendmsg() TEST14: Sending a message on SHUT_RD socket*/
+	/*sendmsg() TEST14: Sending a message on SHUT_RD socket */
 	count = sendmsg(sk1, &outmessage, flag);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendmsg on a SHUT_RD socket "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendmsg() on a SHUT_RD socket - SUCCESS");
 
 	count = test_recvmsg(acpt_sk, &inmessage, flag);
-        test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
+	test_check_msg_data(&inmessage, count, msg_count, MSG_EOR, 0, 0);
 
 	close(sk1);
 	close(lstn_sk);
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sendto.c b/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
index dd66879..d576d77 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sendto.c
@@ -45,7 +45,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -57,100 +57,99 @@
 int TST_TOTAL = 4;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int msg_count;
+	int msg_count;
 	socklen_t len;
-	int sk,sk1,pf_class,lstn_sk,acpt_sk,flag;
-        char *message = "hello, world!\n";
-        char *message_rcv;
-        int count;
+	int sk, sk1, pf_class, lstn_sk, acpt_sk, flag;
+	char *message = "hello, world!\n";
+	char *message_rcv;
+	int count;
 
-        struct sockaddr_in conn_addr,lstn_addr,svr_addr;
+	struct sockaddr_in conn_addr, lstn_addr, svr_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbufferd
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbufferd
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	message_rcv = malloc(512);
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	/*Binding the listen socket*/
-        test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	/*Binding the listen socket */
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
-        /*Listening the socket*/
-        test_listen(lstn_sk, 10);
+	/*Listening the socket */
+	test_listen(lstn_sk, 10);
 
 	len = sizeof(struct sockaddr_in);
 	flag = MSG_NOSIGNAL;
 
-	test_connect(sk, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
 	msg_count = strlen(message) + 1;
 
-	/*sendto() TEST1: Sending data from client socket to server socket*/
+	/*sendto() TEST1: Sending data from client socket to server socket */
 	count = sendto(sk, message, msg_count, flag,
-		       (const struct sockaddr *) &conn_addr, len);
+		       (const struct sockaddr *)&conn_addr, len);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendto from client to server "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from client to server - SUCCESS");
 
 	test_recv(acpt_sk, message_rcv, msg_count, flag);
 
-	strncpy(message_rcv,"\0",512);
+	strncpy(message_rcv, "\0", 512);
 
-	/*sendto() TEST2: Sending data from accept socket to client socket*/
+	/*sendto() TEST2: Sending data from accept socket to client socket */
 	count = sendto(acpt_sk, message, msg_count, flag,
-		       (const struct sockaddr *) &svr_addr, len);
+		       (const struct sockaddr *)&svr_addr, len);
 	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendto from accept socket to client "
-                         "count:%d, errno:%d", count, errno);
+			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from accept socket to client - SUCCESS");
 
 	test_recv(sk, message_rcv, msg_count, flag);
 
-        close(sk);
-        close(acpt_sk);
+	close(sk);
+	close(acpt_sk);
 
-        sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk1 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/*sendto() TEST3: Sending data from unconnected client socket to
-        server socket*/
-        count = sendto(sk1, message, msg_count, flag,
-		       (const struct sockaddr *) &conn_addr, len);
-        if (count != msg_count)
+	   server socket */
+	count = sendto(sk1, message, msg_count, flag,
+		       (const struct sockaddr *)&conn_addr, len);
+	if (count != msg_count)
 		tst_brkm(TBROK, NULL, "sendto from unconnected client to "
 			 "server count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from unconnected client to server - SUCCESS");
 
-        acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
+	acpt_sk = test_accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 
-        test_recv(acpt_sk, message_rcv, msg_count, flag);
+	test_recv(acpt_sk, message_rcv, msg_count, flag);
 
-	/*send() TEST4: Sending less number of data from the buffer*/
-	/*Sending only 5 bytes so that only hello is received*/
-	test_sendto(sk, message, 5 , flag, (const struct sockaddr *)&conn_addr,
+	/*send() TEST4: Sending less number of data from the buffer */
+	/*Sending only 5 bytes so that only hello is received */
+	test_sendto(sk, message, 5, flag, (const struct sockaddr *)&conn_addr,
 		    len);
 	test_recv(acpt_sk, message_rcv, 5, flag);
 
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c b/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
index bc30977..02c8bf8 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_shutdown.c
@@ -59,19 +59,18 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int clnt_sk[MAX_CLIENTS], acpt_sk[MAX_CLIENTS],sk;
+	int clnt_sk[MAX_CLIENTS], acpt_sk[MAX_CLIENTS], sk;
 	int lstn_sk;
 	struct sockaddr_in lstn_addr, acpt_addr;
 	socklen_t addrlen;
 	int error, i;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	char msgbuf[100];
 	int pf_class;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -84,10 +83,10 @@
 	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
 	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-        sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
-        lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	lstn_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	test_bind(lstn_sk, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
+	test_bind(lstn_sk, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
 
 	test_listen(lstn_sk, MAX_CLIENTS);
 
@@ -103,7 +102,7 @@
 					 &addrlen);
 	}
 
-	/*shutdown() TEST1: Bad socket descriptor, EBADF Expected error*/
+	/*shutdown() TEST1: Bad socket descriptor, EBADF Expected error */
 	error = shutdown(-1, SHUT_WR);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "shutdown with a bad socket "
@@ -111,8 +110,8 @@
 
 	tst_resm(TPASS, "shutdown() with a bad socket descriptor - EBADF");
 
-	/*shutdown() TEST2: Invalid socket, ENOTSOCK Expected error*/
-        error = shutdown(0, SHUT_WR);
+	/*shutdown() TEST2: Invalid socket, ENOTSOCK Expected error */
+	error = shutdown(0, SHUT_WR);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "shutdown with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
@@ -120,10 +119,10 @@
 	tst_resm(TPASS, "shutdown() with an invalid socket - ENOTSOCK");
 
 	errno = 0;
-	/*Do a send first before doing shutdown*/
+	/*Do a send first before doing shutdown */
 	test_send(acpt_sk[0], message, strlen(message), 0);
 
-	/*shutdown() TEST3: shutdown with SHUT_WR flag to disable new send*/
+	/*shutdown() TEST3: shutdown with SHUT_WR flag to disable new send */
 	error = shutdown(clnt_sk[0], SHUT_WR);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "shutdown with SHUT_WR flag "
@@ -152,7 +151,7 @@
 
 	errno = 0;
 
-	/*shutdown() TEST4: shutdown with SHUT_RD flag to disable new receive*/
+	/*shutdown() TEST4: shutdown with SHUT_RD flag to disable new receive */
 	test_shutdown(clnt_sk[1], SHUT_RD);
 
 	error = recv(clnt_sk[1], msgbuf, 100, 0);
@@ -181,8 +180,8 @@
 	tst_resm(TPASS, "shutdown() with SHUT_RD flag - SUCCESS");
 
 	/*shutdown() TEST5: shutdown with SHUT_RDWR flag to disable new
-	receive/send*/
-        test_shutdown(clnt_sk[2], SHUT_RDWR);
+	   receive/send */
+	test_shutdown(clnt_sk[2], SHUT_RDWR);
 
 	error = recv(acpt_sk[2], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
@@ -196,7 +195,7 @@
 
 	tst_resm(TPASS, "shutdown() with SHUT_RDWR flag - SUCCESS");
 
-	/*shutdown() TEST6: Unconnected socket, ENOTCONN Expected error*/
+	/*shutdown() TEST6: Unconnected socket, ENOTCONN Expected error */
 	error = shutdown(sk, SHUT_RD);
 	if ((error != -1) || (errno != ENOTCONN))
 		tst_brkm(TBROK, NULL, "shutdown on an unconnected socket "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c b/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
index bea561e..086ce0b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c
@@ -65,7 +65,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -79,92 +79,91 @@
 int TST_TOTAL = 15;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int sk,pf_class;
+	int sk, pf_class;
 	int error = 0;
 	int uid;
 
-        struct sockaddr_in bind_addr;
+	struct sockaddr_in bind_addr;
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
-        pf_class = PF_INET;
+	pf_class = PF_INET;
 
-        /* socket() TEST1: Invalid domain, EAFNOSUPPORT Expected error */
-        sk = socket(-1, SOCK_STREAM, IPPROTO_SCTP);
-        if (sk != -1 || errno != EAFNOSUPPORT)
+	/* socket() TEST1: Invalid domain, EAFNOSUPPORT Expected error */
+	sk = socket(-1, SOCK_STREAM, IPPROTO_SCTP);
+	if (sk != -1 || errno != EAFNOSUPPORT)
 		tst_brkm(TBROK, NULL, "socket() with invalid domain "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid domain - EAFNOSUPPORT");
 
-	/*socket() TEST2 : Invalid type, EINVAL Expected error*/
-        sk = socket(pf_class, -1, IPPROTO_SCTP);
-        if (sk != -1 || errno != EINVAL)
+	/*socket() TEST2 : Invalid type, EINVAL Expected error */
+	sk = socket(pf_class, -1, IPPROTO_SCTP);
+	if (sk != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "socket() with invalid type "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid type - EINVAL");
 
-	/*socket() TEST3: opening a socket*/
-        sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
-        if (sk < 0)
+	/*socket() TEST3: opening a socket */
+	sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	if (sk < 0)
 		tst_brkm(TBROK, NULL, "valid socket() call "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() - SUCCESS");
 
 	/*bind() TEST4: Invalid structure, EFAULT Expected error */
-        error = bind(sk, (struct sockaddr *)-1, sizeof(struct sockaddr_in));
-        if (error != -1 || errno != EFAULT)
+	error = bind(sk, (struct sockaddr *)-1, sizeof(struct sockaddr_in));
+	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "bind() with invalid address ptr "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address ptr - EFAULT");
 
-	/*bind() TEST5: Invalid address length, EINVAL Expect error*/
+	/*bind() TEST5: Invalid address length, EINVAL Expect error */
 	bind_addr.sin_family = AF_INET;
-        bind_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        bind_addr.sin_port = htons(SCTP_TESTPORT_1);
+	bind_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	bind_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr)-2);
-        if (error != -1 || errno != EINVAL)
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr) - 2);
+	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "bind() with invalid address length "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address length - EINVAL");
 
-	/*bind() TEST6: Invalid socket descriptor, ENOTSOCK Expect Error*/
-	error = bind(0, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
+	/*bind() TEST6: Invalid socket descriptor, ENOTSOCK Expect Error */
+	error = bind(0, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "bind() with invalid socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid socket descriptor - ENOTSOCK");
 
-	/*bind() TEST7: Invalid host name, EADDRNOTAVAIL Expect Error*/
-	/*Assigning invalid host name*/
+	/*bind() TEST7: Invalid host name, EADDRNOTAVAIL Expect Error */
+	/*Assigning invalid host name */
 	bind_addr.sin_addr.s_addr = inet_addr(SCTP_INV_LOOPBACK);
-	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
-        if (error != -1 || errno != EADDRNOTAVAIL)
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
+	if (error != -1 || errno != EADDRNOTAVAIL)
 		tst_brkm(TBROK, NULL, "bind() with invalid local "
 			 "address error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid local address - EADDRNOTAVAIL");
 
 	/*bind() TEST8: Bind on a socket that has already called bind
-	EINAVL, Expected error*/
+	   EINAVL, Expected error */
 	bind_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-	/*Calling bind first time, it should pass*/
-	test_bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
+	/*Calling bind first time, it should pass */
+	test_bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 
-	error = bind(sk, (struct sockaddr *) &bind_addr, sizeof(bind_addr));
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != EINVAL)
 		tst_brkm(TBROK, NULL, "bind() on an already bound socket "
 			 "error:%d, errno:%d", error, errno);
@@ -174,28 +173,28 @@
 	/*Closing the socket which succeed in bind() */
 	close(sk);
 
-	/*Opening the socket again for further test*/
+	/*Opening the socket again for further test */
 	sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*bind() TEST9: Bind on reserved ports EACCES, Expected error*/
-	/*Assigning a reserved port*/
+	/*bind() TEST9: Bind on reserved ports EACCES, Expected error */
+	/*Assigning a reserved port */
 	uid = getuid();
 	if (uid != 0) {
 		bind_addr.sin_port = htons(SCTP_RESERVED_PORT);
-		error = bind(sk, (struct sockaddr *) &bind_addr,
+		error = bind(sk, (struct sockaddr *)&bind_addr,
 			     sizeof(bind_addr));
 		if (error != -1 || errno != EACCES)
 			tst_brkm(TBROK, NULL, "bind() on reserverd port "
-			 "error:%d, errno:%d", error, errno);
+				 "error:%d, errno:%d", error, errno);
 
 		tst_resm(TPASS, "bind() on reserved port - EACCESS");
 	}
 
 	/*bind() TEST10: INADDR_ANY address and non-zero port, bind() should
-	succeed*/
+	   succeed */
 	bind_addr.sin_addr.s_addr = INADDR_ANY;
-        bind_addr.sin_port = htons(SCTP_TESTPORT_1);
-	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
+	bind_addr.sin_port = htons(SCTP_TESTPORT_1);
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
 			 "non-zero port error:%d, errno:%d", error, errno);
@@ -206,13 +205,13 @@
 	/*Closing the socket which succeed in bind() */
 	close(sk);
 
-	/*Opening the socket again for further test*/
+	/*Opening the socket again for further test */
 	sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/*bind() TEST11: INADDR_ANY address and zero port, bind() should
-	succeed*/
-        bind_addr.sin_port = 0;
-	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
+	   succeed */
+	bind_addr.sin_port = 0;
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
 			 "zero port error:%d, errno:%d", error, errno);
@@ -223,22 +222,21 @@
 	/*Closing the socket which succeed in bind() */
 	close(sk);
 
-	/*Opening the socket again for further test*/
+	/*Opening the socket again for further test */
 	sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	/*bind() TEST12: local address and zero port, bind() should
-	succeed*/
-        bind_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        bind_addr.sin_port = 0;
-	error = bind(sk, (struct sockaddr *) &bind_addr,sizeof(bind_addr));
+	   succeed */
+	bind_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	bind_addr.sin_port = 0;
+	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "bind() with local address and "
 			 "zero port error:%d, errno:%d", error, errno);
 
-	tst_resm(TPASS, "bind() with local address and zero port - "
-		 "SUCCESS");
+	tst_resm(TPASS, "bind() with local address and zero port - " "SUCCESS");
 
-	/*listen() TEST13: Bad socket descriptor EBADF, Expected error*/
+	/*listen() TEST13: Bad socket descriptor EBADF, Expected error */
 	error = listen(-1, 3);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "listen() with bad socket descriptor "
@@ -246,7 +244,7 @@
 
 	tst_resm(TPASS, "listen() with bad socket descriptor - EBADF");
 
-	/*listen() TEST14: Invalid socket ENOTSOCK, Expected error*/
+	/*listen() TEST14: Invalid socket ENOTSOCK, Expected error */
 	error = listen(0, 3);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "listen() with invalid socket "
@@ -254,7 +252,7 @@
 
 	tst_resm(TPASS, "listen() with invalid socket - ENOTSOCK");
 
-	/*listen() TEST15:listen on a bound socket, should succeed*/
+	/*listen() TEST15:listen on a bound socket, should succeed */
 	error = listen(sk, 3);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "listen() on a bound socket "
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c b/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
index df18eb5..b12313b 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_sockopt.c
@@ -77,101 +77,101 @@
 int TST_TOTAL = 22;
 int TST_CNT = 0;
 
-int
-main(void)
+int main(void)
 {
 	int error;
 	socklen_t len;
 	int sk, sk1, sk2, acpt_sk, pf_class;
 	struct sctp_rtoinfo grtinfo;
 	struct sockaddr_in lstn_addr, conn_addr;
-	struct sctp_initmsg ginmsg; /*get the value for SCTP_INITMSG*/
-	struct sctp_initmsg sinmsg; /*set the value for SCTP_INITMSG*/
-	struct linger slinger; /*SO_LINGER structure*/
-	struct linger glinger; /*SO_LINGER structure*/
+	struct sctp_initmsg ginmsg;	/*get the value for SCTP_INITMSG */
+	struct sctp_initmsg sinmsg;	/*set the value for SCTP_INITMSG */
+	struct linger slinger;	/*SO_LINGER structure */
+	struct linger glinger;	/*SO_LINGER structure */
 	struct sockaddr_in addr;
 	struct sockaddr_in *gaddr;
-	struct sctp_status gstatus; /*SCTP_STATUS option*/
-	int rcvbuf_val_get, rcvbuf_val_set; /*get and set var for SO_RCVBUF*/
-	int sndbuf_val_get, sndbuf_val_set;/*get and set var for SO_SNDBUF*/
-	struct sctp_prim gprimaddr;/*SCTP_PRIMARY_ADDR get*/
-	struct sctp_prim sprimaddr;/*SCTP_PRIMARY_ADDR set*/
-	struct sctp_assocparams sassocparams;  /* SCTP_ASSOCPARAMS set */
-	struct sctp_assocparams gassocparams;  /* SCTP_ASSOCPARAMS get */
+	struct sctp_status gstatus;	/*SCTP_STATUS option */
+	int rcvbuf_val_get, rcvbuf_val_set;	/*get and set var for SO_RCVBUF */
+	int sndbuf_val_get, sndbuf_val_set;	/*get and set var for SO_SNDBUF */
+	struct sctp_prim gprimaddr;	/*SCTP_PRIMARY_ADDR get */
+	struct sctp_prim sprimaddr;	/*SCTP_PRIMARY_ADDR set */
+	struct sctp_assocparams sassocparams;	/* SCTP_ASSOCPARAMS set */
+	struct sctp_assocparams gassocparams;	/* SCTP_ASSOCPARAMS get */
 
 	/* Rather than fflush() throughout the code, set stdout to
-         * be unbuffered.
-         */
-        setvbuf(stdout, NULL, _IONBF, 0);
-        setvbuf(stderr, NULL, _IONBF, 0);
+	 * be unbuffered.
+	 */
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stderr, NULL, _IONBF, 0);
 
 	pf_class = PF_INET;
 
 	sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
-	/*setsockopt() TEST1: Bad socket descriptor EBADF, Expected error*/
-        error = setsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
+	/*setsockopt() TEST1: Bad socket descriptor EBADF, Expected error */
+	error = setsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "setsockopt with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with a bad socket descriptor - EBADF");
 
-	/*setsockopt() TEST2: Invalid socket ENOTSOCK, Expected error*/
-        error = setsockopt(0, IPPROTO_SCTP, 0, 0, 0);
+	/*setsockopt() TEST2: Invalid socket ENOTSOCK, Expected error */
+	error = setsockopt(0, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "setsockopt with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with an invalid socket - ENOTSOCK");
 
-	/*setsockopt() TEST3: Invalid level ENOPROTOOPT, Expected error*/
-        error = setsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
+	/*setsockopt() TEST3: Invalid level ENOPROTOOPT, Expected error */
+	error = setsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
 	if (error != -1 || errno != ENOPROTOOPT)
 		tst_brkm(TBROK, NULL, "setsockopt with invalid level "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with an invalid level - ENOPROTOOPT");
 
-	/*setsockopt() TEST4: Invalid option buffer EFAULT, Expected error*/
-        error = setsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO,
-		(const struct sctp_rtoinfo *)-1, sizeof(struct sctp_rtoinfo));
+	/*setsockopt() TEST4: Invalid option buffer EFAULT, Expected error */
+	error = setsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO,
+			   (const struct sctp_rtoinfo *)-1,
+			   sizeof(struct sctp_rtoinfo));
 	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "setsockopt with invalid option "
 			 "buffer error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with invalid option buffer - EFAULT");
 
-	/*setsockopt() TEST5: Invalid option Name EOPNOTSUPP, Expected error*/
-        error = setsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, 0, 0);
+	/*setsockopt() TEST5: Invalid option Name EOPNOTSUPP, Expected error */
+	error = setsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, 0, 0);
 	if (error != -1 || errno != EOPNOTSUPP)
 		tst_brkm(TBROK, NULL, "setsockopt with invalid option "
 			 "name error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() with invalid option name - EOPNOTSUPP");
 
-	/*getsockopt() TEST6: Bad socket descriptor EBADF, Expected error*/
-        error = getsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
+	/*getsockopt() TEST6: Bad socket descriptor EBADF, Expected error */
+	error = getsockopt(-1, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "getsockopt with a bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with a bad socket descriptor - EBADF");
 
-	/*getsockopt() TEST7: Invalid socket ENOTSOCK, Expected error*/
-        error = getsockopt(0, IPPROTO_SCTP, 0, 0, 0);
+	/*getsockopt() TEST7: Invalid socket ENOTSOCK, Expected error */
+	error = getsockopt(0, IPPROTO_SCTP, 0, 0, 0);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "getsockopt with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() with an invalid socket - ENOTSOCK");
 #if 0
-	/*getsockopt() TEST3: Invalid level ENOPROTOOPT, Expected error*/
+	/*getsockopt() TEST3: Invalid level ENOPROTOOPT, Expected error */
 	/*I have commented this test case because it is returning EOPNOTSUPP.
-	When I checked the code there also it is returning EOPNOTSUPP. As this
-	is not specific to TCP style, I do not want to do the code change*/
+	   When I checked the code there also it is returning EOPNOTSUPP. As this
+	   is not specific to TCP style, I do not want to do the code change */
 
-        error = getsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
+	error = getsockopt(sk, -1, SCTP_RTOINFO, 0, 0);
 	if (error != -1 || errno != ENOPROTOOPT)
 		tst_brkm(TBROK, NULL, "getsockopt with invalid level "
 			 "error:%d, errno:%d", error, errno);
@@ -180,8 +180,8 @@
 #endif
 	len = sizeof(struct sctp_rtoinfo);
 
-	/*getsockopt() TEST8: Invalid option buffer EFAULT, Expected error*/
-        error = getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO,
+	/*getsockopt() TEST8: Invalid option buffer EFAULT, Expected error */
+	error = getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO,
 			   (struct sctp_rtoinfo *)-1, &len);
 	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "getsockopt with invalid option "
@@ -189,8 +189,8 @@
 
 	tst_resm(TPASS, "getsockopt() with invalid option buffer - EFAULT");
 
-	/*getsockopt() TEST9: Invalid option Name EOPNOTSUPP, Expected error*/
-        error = getsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, &grtinfo, &len);
+	/*getsockopt() TEST9: Invalid option Name EOPNOTSUPP, Expected error */
+	error = getsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, &grtinfo, &len);
 	if (error != -1 || errno != EOPNOTSUPP)
 		tst_brkm(TBROK, NULL, "getsockopt with invalid option "
 			 "name error:%d, errno:%d", error, errno);
@@ -203,14 +203,14 @@
 	sk2 = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        conn_addr.sin_port = htons(SCTP_TESTPORT_1);
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
-        len = sizeof(struct sctp_initmsg);
+	len = sizeof(struct sctp_initmsg);
 
 	/* TEST10: Test cases for getsockopt SCTP_INITMSG */
 	test_getsockopt(sk1, SCTP_INITMSG, &ginmsg, &len);
@@ -218,9 +218,9 @@
 	tst_resm(TPASS, "getsockopt() SCTP_INITMSG - SUCCESS");
 
 	sinmsg.sinit_num_ostreams = 5;
-        sinmsg.sinit_max_instreams = 5;
-        sinmsg.sinit_max_attempts = 3;
-        sinmsg.sinit_max_init_timeo = 30;
+	sinmsg.sinit_max_instreams = 5;
+	sinmsg.sinit_max_attempts = 3;
+	sinmsg.sinit_max_init_timeo = 30;
 	/* TEST11: Test case for setsockopt SCTP_INITMSG */
 	test_setsockopt(sk1, SCTP_INITMSG, &sinmsg, sizeof(sinmsg));
 
@@ -235,10 +235,10 @@
 
 	tst_resm(TPASS, "setsockopt() SCTP_INITMSG - SUCCESS");
 
-	/*Now get the values on different endpoint*/
+	/*Now get the values on different endpoint */
 	test_getsockopt(sk2, SCTP_INITMSG, &ginmsg, &len);
 
-	/*Comparison should not succeed here*/
+	/*Comparison should not succeed here */
 	if (sinmsg.sinit_num_ostreams == ginmsg.sinit_num_ostreams &&
 	    sinmsg.sinit_max_instreams == ginmsg.sinit_max_instreams &&
 	    sinmsg.sinit_max_attempts == ginmsg.sinit_max_attempts &&
@@ -249,19 +249,19 @@
 	/* SO_LINGER Test with l_onff = 0 and l_linger = 0 */
 	slinger.l_onoff = 0;
 	slinger.l_linger = 0;
-	test_bind(sk1, (struct sockaddr *) &lstn_addr, sizeof(lstn_addr));
-	test_listen(sk1, 10 );
+	test_bind(sk1, (struct sockaddr *)&lstn_addr, sizeof(lstn_addr));
+	test_listen(sk1, 10);
 	len = sizeof(struct sockaddr_in);
-	test_connect(sk2, (struct sockaddr *) &conn_addr, len);
+	test_connect(sk2, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(sk1, (struct sockaddr *)&addr, &len);
 
-        len = sizeof(struct linger);
+	len = sizeof(struct linger);
 	/* TEST12: Test case for setsockopt SO_LINGER */
 	error = setsockopt(sk2, SOL_SOCKET, SO_LINGER, &slinger, len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SO_LINGER "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_LINGER - SUCCESS");
 
@@ -269,7 +269,7 @@
 	error = getsockopt(sk2, SOL_SOCKET, SO_LINGER, &glinger, &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SO_LINGER "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_LINGER - SUCCESS");
 
@@ -279,13 +279,13 @@
 			 "compare failed");
 
 	/*First gets the default SO_RCVBUF value and comapres with the
-	value obtained from SCTP_STATUS*/
+	   value obtained from SCTP_STATUS */
 	len = sizeof(int);
 	/* TEST14: Test case for getsockopt SO_RCVBUF */
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_get, &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SO_RCVBUF "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_RCVBUF - SUCCESS");
 
@@ -294,38 +294,38 @@
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_STATUS "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_STATUS - SUCCESS");
 
 	/* Reducing the SO_RCVBUF value using setsockopt() */
-	/*Minimum value is 128 and hence I am using it*/
+	/*Minimum value is 128 and hence I am using it */
 	len = sizeof(int);
 	rcvbuf_val_set = 128;
 	/* TEST16: Test case for setsockopt SO_RCVBUF */
 	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_set, len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SO_RCVBUF "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_RCVBUF - SUCCESS");
 
 	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_get, &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SO_RCVBUF "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	if ((2 * rcvbuf_val_set) != rcvbuf_val_get)
 		tst_brkm(TBROK, NULL, "Comparison failed:Set value and "
 			 "got value differs Set Value=%d Get Value=%d",
-			 (2*rcvbuf_val_set), rcvbuf_val_get);
+			 (2 * rcvbuf_val_set), rcvbuf_val_get);
 
-	sndbuf_val_set=1024;
+	sndbuf_val_set = 1024;
 	/* TEST17: Test case for setsockopt SO_SNDBUF */
 	error = setsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_set, len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SO_SNDBUF "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SO_SNDBUF - SUCCESS");
 
@@ -333,52 +333,52 @@
 	error = getsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_get, &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SO_SNDBUF "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SO_SNDBUF - SUCCESS");
 
 	if ((2 * sndbuf_val_set) != sndbuf_val_get)
 		tst_brkm(TBROK, NULL, "Comparison failed:Set value and "
 			 "got value differs Set Value=%d Get Value=%d\n",
-			 (2*sndbuf_val_set), sndbuf_val_get);
+			 (2 * sndbuf_val_set), sndbuf_val_get);
 
 	/* Getting the primary address using SCTP_PRIMARY_ADDR */
-        len = sizeof(struct sctp_prim);
+	len = sizeof(struct sctp_prim);
 	/* TEST19: Test case for getsockopt SCTP_PRIMARY_ADDR */
-	error = getsockopt(sk2,IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &gprimaddr,
+	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &gprimaddr,
 			   &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_PRIMARY_ADDR "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_PRIMARY_ADDR - SUCCESS");
 
-	gaddr = (struct sockaddr_in *) &gprimaddr.ssp_addr;
+	gaddr = (struct sockaddr_in *)&gprimaddr.ssp_addr;
 	if (htons(gaddr->sin_port) != lstn_addr.sin_port &&
-	   gaddr->sin_family != lstn_addr.sin_family &&
-	   gaddr->sin_addr.s_addr != lstn_addr.sin_addr.s_addr)
+	    gaddr->sin_family != lstn_addr.sin_family &&
+	    gaddr->sin_addr.s_addr != lstn_addr.sin_addr.s_addr)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_PRIMARY_ADDR value "
 			 "mismatch");
 
 	memcpy(&sprimaddr, &gprimaddr, sizeof(struct sctp_prim));
 
 	/* TEST20: Test case for setsockopt SCTP_PRIMARY_ADDR */
-	error = setsockopt(sk2,IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &sprimaddr,
+	error = setsockopt(sk2, IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &sprimaddr,
 			   len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SCTP_PRIMARY_ADDR "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "setsockopt() SCTP_PRIMARY_ADDR - SUCCESS");
 
 	/* TEST21: Test case for getsockopt SCTP_PRIMARY_ADDR */
 	/* Getting the association info using SCTP_ASSOCINFO */
-        len = sizeof(struct sctp_assocparams);
+	len = sizeof(struct sctp_assocparams);
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &gassocparams,
 			   &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_ASSOCINFO "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_ASSOCINFO - SUCCESS");
 
@@ -391,13 +391,13 @@
 			   len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "setsockopt SCTP_ASSOCINFO "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	error = getsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &gassocparams,
 			   &len);
 	if (error < 0)
 		tst_brkm(TBROK, NULL, "getsockopt SCTP_ASSOCINFO "
-                         "error:%d, errno:%d", error, errno);
+			 "error:%d, errno:%d", error, errno);
 
 	if (sassocparams.sasoc_asocmaxrxt != gassocparams.sasoc_asocmaxrxt ||
 	    sassocparams.sasoc_cookie_life != gassocparams.sasoc_cookie_life)
diff --git a/testcases/network/sctp/func_tests/test_1_to_1_threads.c b/testcases/network/sctp/func_tests/test_1_to_1_threads.c
index a840fc9..d09ec09 100644
--- a/testcases/network/sctp/func_tests/test_1_to_1_threads.c
+++ b/testcases/network/sctp/func_tests/test_1_to_1_threads.c
@@ -42,7 +42,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>         /* for sockaddr_in */
+#include <netinet/in.h>		/* for sockaddr_in */
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netinet/sctp.h>
@@ -51,7 +51,7 @@
 #include <linux/socket.h>
 #include <sctputil.h>
 
-#define THREADS 10    /* FIXME should be 500 instead of 10 */
+#define THREADS 10		/* FIXME should be 500 instead of 10 */
 #define THREAD_SND_RCV_LOOPS 10
 
 char *TCID = __FILE__;
@@ -61,89 +61,89 @@
 int client_sk;
 int server_sk;
 int acpt_sk;
-struct sockaddr_in  conn_addr;
+struct sockaddr_in conn_addr;
 char *message = "hello, world!\n";
 
-void
-t_recv (int id) {
+void t_recv(int id)
+{
 	int cnt;
 	struct msghdr inmessage;
 	struct iovec iov;
-        char incmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
-        char * buffer;
+	char incmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
+	char *buffer;
 
 	memset(&inmessage, 0, sizeof(inmessage));
-        buffer = malloc(100);
+	buffer = malloc(100);
 
-        iov.iov_base = buffer;
-        iov.iov_len = 100;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
+	iov.iov_base = buffer;
+	iov.iov_len = 100;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
 
-	cnt = test_recvmsg(acpt_sk,&inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, cnt, strlen(message) + 1, MSG_EOR,
+	cnt = test_recvmsg(acpt_sk, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, cnt, strlen(message) + 1, MSG_EOR,
 			    0, 0);
 }
 
-void
-t_send(int id) {
-        struct msghdr outmessage;
-        struct sctp_sndrcvinfo *sinfo;
-        char *buffer_snd;
-        struct cmsghdr *cmsg;
-        struct iovec out_iov;
-        char outcmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
+void t_send(int id)
+{
+	struct msghdr outmessage;
+	struct sctp_sndrcvinfo *sinfo;
+	char *buffer_snd;
+	struct cmsghdr *cmsg;
+	struct iovec out_iov;
+	char outcmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 
-        memset(&outmessage, 0, sizeof(outmessage));
-        buffer_snd = malloc(100);
+	memset(&outmessage, 0, sizeof(outmessage));
+	buffer_snd = malloc(100);
 
-        outmessage.msg_name = &conn_addr;
-        outmessage.msg_namelen = sizeof(conn_addr);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_name = &conn_addr;
+	outmessage.msg_namelen = sizeof(conn_addr);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 
-        cmsg = CMSG_FIRSTHDR(&outmessage);
+	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
-        cmsg->cmsg_type = SCTP_SNDRCV;
-        cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_controllen = cmsg->cmsg_len;
+	cmsg->cmsg_type = SCTP_SNDRCV;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_controllen = cmsg->cmsg_len;
 
-        sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
-        memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = (strlen(message) + 1);
+	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
+	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = (strlen(message) + 1);
 
-        test_sendmsg(client_sk, &outmessage, 0, strlen(message)+1);
+	test_sendmsg(client_sk, &outmessage, 0, strlen(message) + 1);
 }
 
-void * relay (void* id_) {
-	int id=(uintptr_t)id_;
+void *relay(void *id_)
+{
+	int id = (uintptr_t) id_;
 	if (id == 0) {
 		t_send(id);
-	} else if (id == THREADS -1) {
+	} else if (id == THREADS - 1) {
 		t_send(id);
 	} else {
-		t_recv (id);
+		t_recv(id);
 		t_send(id);
 	}
 
 	return 0;
 }
 
-int
-main(void)
+int main(void)
 {
 
-	int      cnt,i;
-	pthread_t       thread[THREADS];
-	int  status;
-	int  exit_status;
-	void *      result;
+	int cnt, i;
+	pthread_t thread[THREADS];
+	int status;
+	int exit_status;
+	void *result;
 	pthread_attr_t attr;
 	struct sockaddr_in lstn_addr;
 	socklen_t len = sizeof(struct sockaddr_in);
@@ -156,38 +156,38 @@
 	client_sk = test_socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
 
 	lstn_addr.sin_family = AF_INET;
-        lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	lstn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
 	lstn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	conn_addr.sin_family = AF_INET;
-        conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	conn_addr.sin_addr.s_addr = SCTP_IP_LOOPBACK;
 	conn_addr.sin_port = htons(SCTP_TESTPORT_1);
 
 	test_bind(server_sk, (struct sockaddr *)&lstn_addr,
-		 sizeof(struct sockaddr_in));
+		  sizeof(struct sockaddr_in));
 
-	test_listen(server_sk,10);
+	test_listen(server_sk, 10);
 
-	test_connect(client_sk,(struct sockaddr *)&conn_addr,len);
+	test_connect(client_sk, (struct sockaddr *)&conn_addr, len);
 
 	acpt_sk = test_accept(server_sk, (struct sockaddr *)&svr_addr, &len);
 
 	for (i = 0; i < THREAD_SND_RCV_LOOPS; i++) {
 		for (cnt = 1; cnt < THREADS; cnt++) {
 			status = pthread_create(&thread[cnt], &attr,
-						relay, (void*)(uintptr_t)cnt);
+						relay, (void *)(uintptr_t) cnt);
 			if (status)
 				tst_brkm(TBROK, NULL, "pthread_create "
-                         		 "failed status:%d, errno:%d", status,
+					 "failed status:%d, errno:%d", status,
 					 errno);
 		}
 
 		pthread_attr_destroy(&attr);
-		for (cnt = 1; cnt < THREADS ; cnt++) {
-			exit_status = pthread_join (thread[cnt], &result);
+		for (cnt = 1; cnt < THREADS; cnt++) {
+			exit_status = pthread_join(thread[cnt], &result);
 			if (exit_status == -1)
 				tst_brkm(TBROK, NULL, "pthread_join "
-                         		 "Thread #%d exited with status:%d",
+					 "Thread #%d exited with status:%d",
 					 cnt, exit_status);
 		}
 	}
diff --git a/testcases/network/sctp/func_tests/test_assoc_abort.c b/testcases/network/sctp/func_tests/test_assoc_abort.c
index 9f93e85..52d5ebd 100644
--- a/testcases/network/sctp/func_tests/test_assoc_abort.c
+++ b/testcases/network/sctp/func_tests/test_assoc_abort.c
@@ -59,8 +59,7 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk[MAX_CLIENTS];
 	sockaddr_storage_t svr_loop, clt_loop[MAX_CLIENTS];
@@ -72,24 +71,24 @@
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        int error;
+	struct iovec out_iov;
+	int error;
 	uint32_t ppid;
 	uint32_t stream;
 	struct sctp_assoc_change *sac;
 	char *big_buffer;
 	int i;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	struct sctp_status status;
 	socklen_t status_len;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
+	svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	svr_loop.v4.sin_family = AF_INET;
 	svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
 	svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1);
@@ -128,14 +127,14 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	out_iov.iov_base = message;
 	out_iov.iov_len = strlen(message) + 1;
 
-        /* Send the first message from all the clients to the server.  This
+	/* Send the first message from all the clients to the server.  This
 	 * will create the associations.
 	 */
 	for (i = 0; i < MAX_CLIENTS; i++)
@@ -143,7 +142,7 @@
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	iov.iov_base = big_buffer;
 	iov.iov_len = REALLY_BIG;
 	inmessage.msg_iov = &iov;
@@ -225,7 +224,7 @@
 
 	close(svr_sk);
 
-        /* Get the COMM_LOST notification. */
+	/* Get the COMM_LOST notification. */
 	for (i = 0; i < MAX_CLIENTS; i++) {
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(clt_sk[i], &inmessage, MSG_WAITALL);
@@ -238,6 +237,6 @@
 
 	tst_resm(TPASS, "ABORT an association using SCTP_ABORT");
 
-        /* Indicate successful completion.  */
-      tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_assoc_shutdown.c b/testcases/network/sctp/func_tests/test_assoc_shutdown.c
index e31b97d..a78e955 100644
--- a/testcases/network/sctp/func_tests/test_assoc_shutdown.c
+++ b/testcases/network/sctp/func_tests/test_assoc_shutdown.c
@@ -58,8 +58,7 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk[MAX_CLIENTS];
 	sctp_assoc_t svr_associd[MAX_CLIENTS];
@@ -71,24 +70,24 @@
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        int error;
+	struct iovec out_iov;
+	int error;
 	uint32_t ppid;
 	uint32_t stream;
 	struct sctp_assoc_change *sac;
 	char *big_buffer;
 	int i;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	struct sctp_status status;
 	socklen_t status_len;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
+	svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	svr_loop.v4.sin_family = AF_INET;
 	svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
@@ -128,22 +127,22 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	out_iov.iov_base = message;
 	out_iov.iov_len = strlen(message) + 1;
 
-        /* Send the first message from all the clients to the server.  This
+	/* Send the first message from all the clients to the server.  This
 	 * will create the associations.
 	 */
 	for (i = 0; i < MAX_CLIENTS; i++)
-		test_sendmsg(clt_sk[i], &outmessage, 0, strlen(message)+1);
+		test_sendmsg(clt_sk[i], &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	iov.iov_base = big_buffer;
 	iov.iov_len = REALLY_BIG;
 	inmessage.msg_iov = &iov;
@@ -171,7 +170,7 @@
 
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(svr_sk, &inmessage, MSG_WAITALL);
-		test_check_msg_data(&inmessage, error, strlen(message)+1,
+		test_check_msg_data(&inmessage, error, strlen(message) + 1,
 				    MSG_EOR, stream, ppid);
 		sac = (struct sctp_assoc_change *)iov.iov_base;
 		svr_associd[i] = sac->sac_assoc_id;
@@ -226,7 +225,7 @@
 
 	close(svr_sk);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	for (i = 0; i < MAX_CLIENTS; i++) {
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(clt_sk[i], &inmessage, MSG_WAITALL);
@@ -240,6 +239,6 @@
 
 	tst_resm(TPASS, "Graceful shutdown of associations using SCTP_EOF");
 
-        /* Indicate successful completion.  */
-      tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_autoclose.c b/testcases/network/sctp/func_tests/test_autoclose.c
index 2c98c72..ef42fdc 100644
--- a/testcases/network/sctp/func_tests/test_autoclose.c
+++ b/testcases/network/sctp/func_tests/test_autoclose.c
@@ -57,8 +57,7 @@
 int TST_TOTAL = 1;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int sk1, sk2;
 	sockaddr_storage_t loop1, loop2;
@@ -112,11 +111,11 @@
 	outmessage.msg_iovlen = 1;
 	outmessage.msg_iov->iov_base = message;
 	outmessage.msg_iov->iov_len = strlen(message) + 1;
-	bytes_sent = test_sendmsg(sk1, &outmessage, 0, strlen(message)+1);
+	bytes_sent = test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	iov.iov_base = big_buffer;
 	iov.iov_len = REALLY_BIG;
 	inmessage.msg_iov = &iov;
@@ -138,7 +137,7 @@
 	/* Get the first message which was sent.  */
 	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_data(&inmessage, error, strlen(message) + 1,
-			    MSG_EOR|MSG_CTRUNC, 0, 0);
+			    MSG_EOR | MSG_CTRUNC, 0, 0);
 
 	tst_resm(TINFO, "Waiting for the associations to close automatically "
 		 "in 5 secs");
diff --git a/testcases/network/sctp/func_tests/test_basic.c b/testcases/network/sctp/func_tests/test_basic.c
index 0b82fd3..a5f60e2 100644
--- a/testcases/network/sctp/func_tests/test_basic.c
+++ b/testcases/network/sctp/func_tests/test_basic.c
@@ -62,22 +62,22 @@
 
 int main(void)
 {
-        int sk1, sk2;
-        sockaddr_storage_t loop1;
-        sockaddr_storage_t loop2;
+	int sk1, sk2;
+	sockaddr_storage_t loop1;
+	sockaddr_storage_t loop2;
 	sockaddr_storage_t msgname;
-        struct iovec iov;
-        struct msghdr inmessage;
+	struct iovec iov;
+	struct msghdr inmessage;
 	struct msghdr outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        char *message = "hello, world!\n";
-        char *telephone = "Watson, come here!  I need you!\n";
-        char *telephone_resp = "I already brought your coffee...\n";
-        int error, bytes_sent;
+	struct iovec out_iov;
+	char *message = "hello, world!\n";
+	char *telephone = "Watson, come here!  I need you!\n";
+	char *telephone_resp = "I already brought your coffee...\n";
+	int error, bytes_sent;
 	int pf_class;
 	uint32_t ppid;
 	uint32_t stream;
@@ -91,7 +91,7 @@
 	struct sockaddr_in6 *in6_addr;
 	void *addr_buf;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -100,34 +100,34 @@
 #if TEST_V6
 	pf_class = PF_INET6;
 
-        loop1.v6.sin6_family = AF_INET6;
-        loop1.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
-        loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	loop1.v6.sin6_family = AF_INET6;
+	loop1.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
+	loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v6.sin6_family = AF_INET6;
-        loop2.v6.sin6_addr = in6addr_loopback;
-        loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
+	loop2.v6.sin6_family = AF_INET6;
+	loop2.v6.sin6_addr = in6addr_loopback;
+	loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
 #else
 	pf_class = PF_INET;
 
-        loop1.v4.sin_family = AF_INET;
-        loop1.v4.sin_addr.s_addr = INADDR_ANY;
-        loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
+	loop1.v4.sin_family = AF_INET;
+	loop1.v4.sin_addr.s_addr = INADDR_ANY;
+	loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v4.sin_family = AF_INET;
-        loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
+	loop2.v4.sin_family = AF_INET;
+	loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
 #endif /* TEST_V6 */
 
-        /* Create the two endpoints which will talk to each other.  */
-        sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	/* Create the two endpoints which will talk to each other.  */
+	sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	tst_resm(TPASS, "socket");
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(sk1, &loop1.sa, sizeof(loop1));
-        test_bind(sk2, &loop2.sa, sizeof(loop2));
+	/* Bind these sockets to the test ports.  */
+	test_bind(sk1, &loop1.sa, sizeof(loop1));
+	test_bind(sk2, &loop2.sa, sizeof(loop2));
 
 	tst_resm(TPASS, "bind");
 
@@ -135,41 +135,41 @@
 	test_enable_assoc_change(sk1);
 	test_enable_assoc_change(sk2);
 
-        /* Initialize inmessage for all receives. */
+	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
 	memset(&inmessage, 0, sizeof(inmessage));
-        iov.iov_base = big_buffer;
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
+	iov.iov_base = big_buffer;
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
 	inmessage.msg_name = &msgname;
 
-        /* Try to read on socket 2.  This should fail since we are
+	/* Try to read on socket 2.  This should fail since we are
 	 * neither listening, nor established.
 	 */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = recvmsg(sk2, &inmessage, MSG_WAITALL);
-        if (error > 0)
-                tst_brkm(TBROK, NULL, "recvmsg on a socket neither"
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = recvmsg(sk2, &inmessage, MSG_WAITALL);
+	if (error > 0)
+		tst_brkm(TBROK, NULL, "recvmsg on a socket neither"
 			 "listening nor established error: %d", error);
 
 	tst_resm(TPASS, "recvmsg on a socket neither listening nor "
 		 "established");
 
-       /* Mark sk2 as being able to accept new associations.  */
+	/* Mark sk2 as being able to accept new associations.  */
 	error = test_listen(sk2, 1);
 
 	tst_resm(TPASS, "listen");
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &loop2;
-        outmessage.msg_namelen = sizeof(loop2);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &loop2;
+	outmessage.msg_namelen = sizeof(loop2);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -177,20 +177,20 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
-        test_sendmsg(sk1, &outmessage, 0, strlen(message)+1);
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
 
 	tst_resm(TPASS, "sendmsg with a valid msg_name");
 
-        /* Get the communication up message on sk2.  */
-        inmessage.msg_controllen = sizeof(incmsg);
+	/* Get the communication up message on sk2.  */
+	inmessage.msg_controllen = sizeof(incmsg);
 	inmessage.msg_namelen = sizeof(msgname);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
@@ -229,12 +229,12 @@
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd2 = sac->sac_assoc_id;
 
-        /* Get the communication up message on sk1.  */
+	/* Get the communication up message on sk1.  */
 	iov.iov_base = big_buffer;
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_control = incmsg;
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_control = incmsg;
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
@@ -243,12 +243,12 @@
 
 	tst_resm(TPASS, "recvmsg COMM_UP notifications");
 
-        /* Get the first message which was sent.  */
-        inmessage.msg_controllen = sizeof(incmsg);
+	/* Get the first message which was sent.  */
+	inmessage.msg_controllen = sizeof(incmsg);
 	inmessage.msg_namelen = sizeof(msgname);
 	memset(&msgname, 0, sizeof(msgname));
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
 			    MSG_EOR, stream, ppid);
 #if TEST_V6
 
@@ -283,8 +283,8 @@
 #endif
 
 	/* Try to send a message with NULL msg_name and associd, should fail */
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -297,7 +297,7 @@
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	outmessage.msg_iov->iov_base = telephone;
-        outmessage.msg_iov->iov_len = strlen(telephone) + 1;
+	outmessage.msg_iov->iov_len = strlen(telephone) + 1;
 	outmessage.msg_name = NULL;
 	outmessage.msg_namelen = 0;
 	bytes_sent = sendmsg(sk1, &outmessage, MSG_NOSIGNAL);
@@ -318,34 +318,33 @@
 
 	/* Fill in a correct assoc_id and get back to the normal testing. */
 	sinfo->sinfo_assoc_id = associd1;
-        /* Send two more messages, to cause a second SACK.  */
-	test_sendmsg(sk1, &outmessage, 0, strlen(telephone)+1);
+	/* Send two more messages, to cause a second SACK.  */
+	test_sendmsg(sk1, &outmessage, 0, strlen(telephone) + 1);
 
 	outmessage.msg_name = &loop2;
 	outmessage.msg_namelen = sizeof(loop2);
 	outmessage.msg_iov->iov_base = telephone_resp;
-        outmessage.msg_iov->iov_len = strlen(telephone_resp) + 1;
-	test_sendmsg(sk1, &outmessage, 0, strlen(telephone_resp)+1);
+	outmessage.msg_iov->iov_len = strlen(telephone_resp) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(telephone_resp) + 1);
 
 	tst_resm(TPASS, "sendmsg with valid associd");
 
-        /* Get those two messages.  */
+	/* Get those two messages.  */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(telephone) + 1,
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(telephone) + 1,
 			    MSG_EOR, stream, ppid);
 
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(telephone_resp) + 1,
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(telephone_resp) + 1,
 			    MSG_EOR, stream, ppid);
 
 	tst_resm(TPASS, "recvmsg");
 
 	n_laddrs = sctp_getladdrs(sk1, associd1, &laddrs);
 	if (n_laddrs <= 0)
-                tst_brkm(TBROK, NULL, "sctp_getladdrs: %s",
-			 strerror(errno));
+		tst_brkm(TBROK, NULL, "sctp_getladdrs: %s", strerror(errno));
 
 	tst_resm(TPASS, "sctp_getladdrs");
 
@@ -361,9 +360,9 @@
 		} else {
 			in6_addr = (struct sockaddr_in6 *)sa_addr;
 			tst_resm(TINFO,
-		 "LOCAL ADDR %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x PORT %d",
-			       NIP6(in6_addr->sin6_addr),
-			       ntohs(in6_addr->sin6_port));
+				 "LOCAL ADDR %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x PORT %d",
+				 NIP6(in6_addr->sin6_addr),
+				 ntohs(in6_addr->sin6_port));
 			addr_buf += sizeof(struct sockaddr_in6);
 		}
 	}
@@ -374,8 +373,7 @@
 
 	n_paddrs = sctp_getpaddrs(sk1, associd1, &paddrs);
 	if (n_paddrs <= 0)
-                tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s",
-			 strerror(errno));
+		tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s", strerror(errno));
 
 	tst_resm(TPASS, "sctp_getpaddrs");
 
@@ -391,9 +389,9 @@
 		} else {
 			in6_addr = (struct sockaddr_in6 *)sa_addr;
 			tst_resm(TINFO,
-		 "PEER ADDR %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x PORT %d",
-			       NIP6(in6_addr->sin6_addr),
-			       ntohs(in6_addr->sin6_port));
+				 "PEER ADDR %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x PORT %d",
+				 NIP6(in6_addr->sin6_addr),
+				 ntohs(in6_addr->sin6_port));
 			addr_buf += sizeof(struct sockaddr_in6);
 		}
 	}
@@ -402,14 +400,14 @@
 
 	tst_resm(TPASS, "sctp_freepaddrs");
 
-        /* Shut down the link.  */
-        close(sk1);
+	/* Shut down the link.  */
+	close(sk1);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	inmessage.msg_controllen = sizeof(incmsg);
 	inmessage.msg_namelen = sizeof(msgname);
 	memset(&msgname, 0, sizeof(msgname));
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
@@ -448,8 +446,8 @@
 
 	tst_resm(TPASS, "recvmsg SHUTDOWN_COMP notification");
 
-        close(sk2);
+	close(sk2);
 
-        /* Indicate successful completion.  */
-       	tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_connect.c b/testcases/network/sctp/func_tests/test_connect.c
index a1895de..6fc788a 100644
--- a/testcases/network/sctp/func_tests/test_connect.c
+++ b/testcases/network/sctp/func_tests/test_connect.c
@@ -54,8 +54,7 @@
 int TST_TOTAL = 5;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk1, clt_sk2, peeloff_sk;
 	sctp_assoc_t svr_associd1, svr_associd2, clt_associd1, clt_associd2;
@@ -67,7 +66,7 @@
 	char *big_buffer;
 	int flags;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -81,13 +80,13 @@
 	clt_loop1.v4.sin_port = htons(SCTP_TESTPORT_2);
 	clt_loop2.v4.sin_family = AF_INET;
 	clt_loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-	clt_loop2.v4.sin_port = htons(SCTP_TESTPORT_2+1);
+	clt_loop2.v4.sin_port = htons(SCTP_TESTPORT_2 + 1);
 	clt_loop3.v4.sin_family = AF_INET;
 	clt_loop3.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-	clt_loop3.v4.sin_port = htons(SCTP_TESTPORT_2+2);
+	clt_loop3.v4.sin_port = htons(SCTP_TESTPORT_2 + 2);
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
+	svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(svr_sk, &svr_loop.sa, sizeof(svr_loop));
 
 	/* Mark server socket as being able to accept new associations.  */
@@ -133,7 +132,7 @@
 		 "already established");
 
 	/* Initialize inmessage for all receives. */
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	big_buffer = test_malloc(REALLY_BIG);
 	iov.iov_base = big_buffer;
 	iov.iov_len = REALLY_BIG;
@@ -208,6 +207,6 @@
 	close(clt_sk2);
 	close(peeloff_sk);
 
-        /* Indicate successful completion.  */
-       	tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_connectx.c b/testcases/network/sctp/func_tests/test_connectx.c
index 6a049da..8f08025 100644
--- a/testcases/network/sctp/func_tests/test_connectx.c
+++ b/testcases/network/sctp/func_tests/test_connectx.c
@@ -63,8 +63,7 @@
 	((unsigned char *)&addr)[2], \
 	((unsigned char *)&addr)[3]
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk1, clt_sk2, peeloff_sk;
 	sctp_assoc_t svr_associd1, svr_associd2, clt_associd1, clt_associd2;
@@ -79,7 +78,8 @@
 	struct sockaddr_in clt_loop1[NUMADDR];
 	struct sockaddr_in clt_loop2[NUMADDR];
 	struct sockaddr_in clt_loop3[NUMADDR];
-	sockaddr_storage_t svr_test[NUMADDR], clt_test1[NUMADDR], clt_test2[NUMADDR];
+	sockaddr_storage_t svr_test[NUMADDR], clt_test1[NUMADDR],
+	    clt_test2[NUMADDR];
 
 	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
@@ -95,11 +95,12 @@
 		svr_test[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i);
 		svr_test[i].v4.sin_port = htons(SCTP_TESTPORT_1);
 		svr_try[i].sin_family = AF_INET;
-		if (i < (NUMADDR-1)) {
+		if (i < (NUMADDR - 1)) {
 			svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i);
 		} else {
 			/* Make last address invalid. */
-			svr_try[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x400);
+			svr_try[i].sin_addr.s_addr =
+			    SCTP_IP_LOOPBACK_I(i + 0x400);
 		}
 		svr_try[i].sin_port = htons(SCTP_TESTPORT_1);
 		clt_loop1[i].sin_family = AF_INET;
@@ -110,19 +111,19 @@
 		clt_test1[i].v4.sin_port = htons(SCTP_TESTPORT_2);
 		clt_loop2[i].sin_family = AF_INET;
 		clt_loop2[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200);
-		clt_loop2[i].sin_port = htons(SCTP_TESTPORT_2+1);
+		clt_loop2[i].sin_port = htons(SCTP_TESTPORT_2 + 1);
 		clt_test2[i].v4.sin_family = AF_INET;
 		clt_test2[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x200);
-		clt_test2[i].v4.sin_port = htons(SCTP_TESTPORT_2+1);
+		clt_test2[i].v4.sin_port = htons(SCTP_TESTPORT_2 + 1);
 		clt_loop3[i].sin_family = AF_INET;
 		clt_loop3[i].sin_addr.s_addr = SCTP_IP_LOOPBACK_I(i + 0x300);
-		clt_loop3[i].sin_port = htons(SCTP_TESTPORT_2+2);
+		clt_loop3[i].sin_port = htons(SCTP_TESTPORT_2 + 2);
 	}
 
 	/* Create and bind the server socket.  */
 	svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(svr_sk, (struct sockaddr *)&svr_loop[0], sizeof(svr_loop[0]));
-	test_bindx_add(svr_sk, (struct sockaddr *)&svr_loop[1], NUMADDR-1);
+	test_bindx_add(svr_sk, (struct sockaddr *)&svr_loop[1], NUMADDR - 1);
 
 	/* Mark server socket as being able to accept new associations.  */
 	test_listen(svr_sk, 1);
@@ -130,10 +131,10 @@
 	/* Create and bind the client sockets.  */
 	clt_sk1 = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(clt_sk1, (struct sockaddr *)&clt_loop1[0], sizeof(clt_loop1));
-	test_bindx_add(clt_sk1, (struct sockaddr *)&clt_loop1[1], NUMADDR-1);
+	test_bindx_add(clt_sk1, (struct sockaddr *)&clt_loop1[1], NUMADDR - 1);
 	clt_sk2 = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(clt_sk2, (struct sockaddr *)&clt_loop2[0], sizeof(clt_loop2));
-	test_bindx_add(clt_sk2, (struct sockaddr *)&clt_loop2[1], NUMADDR-1);
+	test_bindx_add(clt_sk2, (struct sockaddr *)&clt_loop2[1], NUMADDR - 1);
 
 	/* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
 	test_enable_assoc_change(svr_sk);
@@ -220,7 +221,8 @@
 	peeloff_sk = test_sctp_peeloff(svr_sk, svr_associd1);
 
 	/* Doing a connectx on a peeled off socket should fail. */
-	error = sctp_connectx(peeloff_sk, (struct sockaddr *)clt_loop3, NUMADDR);
+	error =
+	    sctp_connectx(peeloff_sk, (struct sockaddr *)clt_loop3, NUMADDR);
 	if ((error != -1) || (EISCONN != errno))
 		tst_brkm(TBROK, NULL, "connectx on a peeled off socket "
 			 "error:%d, errno:%d", error, errno);
diff --git a/testcases/network/sctp/func_tests/test_fragments.c b/testcases/network/sctp/func_tests/test_fragments.c
index 99afe37..4e92ac3 100644
--- a/testcases/network/sctp/func_tests/test_fragments.c
+++ b/testcases/network/sctp/func_tests/test_fragments.c
@@ -68,23 +68,22 @@
 int TST_TOTAL = 4;
 int TST_CNT = 0;
 
-int msg_sizes[] = {1353, 2000, 5000, 10000, 20000, 32768};
+int msg_sizes[] = { 1353, 2000, 5000, 10000, 20000, 32768 };
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-        int sk1, sk2;
-        sockaddr_storage_t loop1;
-        sockaddr_storage_t loop2;
-        struct iovec iov;
-        struct msghdr inmessage;
+	int sk1, sk2;
+	sockaddr_storage_t loop1;
+	sockaddr_storage_t loop2;
+	struct iovec iov;
+	struct msghdr inmessage;
 	struct msghdr outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        int error, bytes_sent;
+	struct iovec out_iov;
+	int error, bytes_sent;
 	int pf_class, af_family;
 	uint32_t ppid;
 	uint32_t stream;
@@ -96,7 +95,7 @@
 	int disable_frag;
 	socklen_t optlen;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -106,49 +105,49 @@
 	pf_class = PF_INET6;
 	af_family = AF_INET6;
 
-        loop1.v6.sin6_family = AF_INET6;
-        loop1.v6.sin6_addr = in6addr_loopback;
-        loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	loop1.v6.sin6_family = AF_INET6;
+	loop1.v6.sin6_addr = in6addr_loopback;
+	loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v6.sin6_family = AF_INET6;
-        loop2.v6.sin6_addr = in6addr_loopback;
-        loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
+	loop2.v6.sin6_family = AF_INET6;
+	loop2.v6.sin6_addr = in6addr_loopback;
+	loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
 #else
 	pf_class = PF_INET;
 	af_family = AF_INET;
 
-        loop1.v4.sin_family = AF_INET;
-        loop1.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
+	loop1.v4.sin_family = AF_INET;
+	loop1.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v4.sin_family = AF_INET;
-        loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
+	loop2.v4.sin_family = AF_INET;
+	loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
 #endif /* TEST_V6 */
 
-        /* Create the two endpoints which will talk to each other.  */
-        sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	/* Create the two endpoints which will talk to each other.  */
+	sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	/* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
 	test_enable_assoc_change(sk1);
 	test_enable_assoc_change(sk2);
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(sk1, &loop1.sa, sizeof(loop1));
-        test_bind(sk2, &loop2.sa, sizeof(loop2));
+	/* Bind these sockets to the test ports.  */
+	test_bind(sk1, &loop1.sa, sizeof(loop1));
+	test_bind(sk2, &loop2.sa, sizeof(loop2));
 
-       /* Mark sk2 as being able to accept new associations.  */
+	/* Mark sk2 as being able to accept new associations.  */
 	test_listen(sk2, 1);
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &loop2;
-        outmessage.msg_namelen = sizeof(loop2);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &loop2;
+	outmessage.msg_namelen = sizeof(loop2);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -156,47 +155,47 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	msg_len = 10;
 	msg_buf = test_build_msg(10);
-        outmessage.msg_iov->iov_base = msg_buf;
-        outmessage.msg_iov->iov_len = msg_len;
-        test_sendmsg(sk1, &outmessage, 0, msg_len);
+	outmessage.msg_iov->iov_base = msg_buf;
+	outmessage.msg_iov->iov_len = msg_len;
+	test_sendmsg(sk1, &outmessage, 0, msg_len);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
-        iov.iov_base = big_buffer;
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
+	memset(&inmessage, 0, sizeof(inmessage));
+	iov.iov_base = big_buffer;
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
 
-        /* Get the communication up message on sk2.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk2.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd2 = sac->sac_assoc_id;
 
-        /* Get the communication up message on sk1.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk1.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd1 = sac->sac_assoc_id;
 
-        /* Get the first message which was sent.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, msg_len, MSG_EOR, stream, ppid);
+	/* Get the first message which was sent.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, msg_len, MSG_EOR, stream, ppid);
 
 	free(msg_buf);
 
@@ -228,7 +227,7 @@
 	outmessage.msg_iov->iov_len = msg_len;
 	error = sendmsg(sk1, &outmessage, 0);
 	if ((error != -1) || (errno != EMSGSIZE))
-       		tst_brkm(TBROK, NULL, "Send a message that exceeds "
+		tst_brkm(TBROK, NULL, "Send a message that exceeds "
 			 "assoc frag point error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "Send a message that exceeds assoc frag point");
@@ -247,30 +246,30 @@
 
 		msg_len = msg_sizes[i];
 		msg_buf = test_build_msg(msg_len);
-        	outmessage.msg_iov->iov_base = msg_buf;
-        	outmessage.msg_iov->iov_len = msg_len;
-        	bytes_sent = test_sendmsg(sk1, &outmessage, 0, msg_len);
+		outmessage.msg_iov->iov_base = msg_buf;
+		outmessage.msg_iov->iov_len = msg_len;
+		bytes_sent = test_sendmsg(sk1, &outmessage, 0, msg_len);
 
 		tst_resm(TINFO, "Sent %d byte message", bytes_sent);
 
-        	inmessage.msg_controllen = sizeof(incmsg);
-        	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+		inmessage.msg_controllen = sizeof(incmsg);
+		error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 		/* Handle Partial Reads. */
 		if (inmessage.msg_flags & MSG_EOR) {
-	        	test_check_msg_data(&inmessage, error, bytes_sent,
+			test_check_msg_data(&inmessage, error, bytes_sent,
 					    MSG_EOR, stream, ppid);
 			tst_resm(TINFO, "Received %d byte message", error);
 		} else {
 			int remain;
 
-	        	test_check_msg_data(&inmessage, error, error, 0,
+			test_check_msg_data(&inmessage, error, error, 0,
 					    stream, ppid);
 			tst_resm(TINFO, "Received %d byte message", error);
 
 			/* Read the remaining message. */
 			inmessage.msg_controllen = sizeof(incmsg);
 			remain = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-	        	test_check_msg_data(&inmessage, remain,
+			test_check_msg_data(&inmessage, remain,
 					    bytes_sent - error,
 					    MSG_EOR, stream, ppid);
 			tst_resm(TINFO, "Received %d byte message", error);
@@ -281,18 +280,18 @@
 
 	tst_resm(TPASS, "Send/Receive fragmented messages");
 
-        /* Shut down the link.  */
-        close(sk1);
+	/* Shut down the link.  */
+	close(sk1);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
 
-        close(sk2);
+	close(sk2);
 
-        /* Indicate successful completion.  */
-       	tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_getname.c b/testcases/network/sctp/func_tests/test_getname.c
index f6d2b6e..f300368 100644
--- a/testcases/network/sctp/func_tests/test_getname.c
+++ b/testcases/network/sctp/func_tests/test_getname.c
@@ -56,8 +56,7 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int clt_sk, svr_sk, accept_sk;
 	sockaddr_storage_t svr_loop, accept_loop;
@@ -67,7 +66,7 @@
 	int error;
 	int pf_class;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -75,9 +74,9 @@
 	/* Initialize the server and client addresses. */
 #if TEST_V6
 	pf_class = PF_INET6;
-        svr_loop.v6.sin6_family = AF_INET6;
-        svr_loop.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
-        svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	svr_loop.v6.sin6_family = AF_INET6;
+	svr_loop.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
+	svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
 #else
 	pf_class = PF_INET;
 	svr_loop.v4.sin_family = AF_INET;
@@ -86,7 +85,7 @@
 #endif
 
 	/* Create and bind the listening server socket.  */
-        svr_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	svr_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 	test_bind(svr_sk, &svr_loop.sa, sizeof(svr_loop));
 
 	memset(&svr_local_addr, 0x00, sizeof(svr_local_addr));
@@ -150,7 +149,7 @@
 	len = sizeof(svr_local_addr);
 	/* Get the server's local address. */
 	error = getsockname(accept_sk, (struct sockaddr *)&svr_local_addr,
-				&len);
+			    &len);
 	if (0 != error)
 		tst_brkm(TBROK, NULL, "getsockname on a connected server "
 			 "socket: %s", strerror(errno));
@@ -160,8 +159,7 @@
 	memset(&svr_peer_addr, 0x00, sizeof(svr_peer_addr));
 	len = sizeof(svr_peer_addr);
 	/* Get the server's peer address. */
-	error = getpeername(accept_sk, (struct sockaddr *)&svr_peer_addr,
-				&len);
+	error = getpeername(accept_sk, (struct sockaddr *)&svr_peer_addr, &len);
 	if (0 != error)
 		tst_brkm(TBROK, NULL, "getpeername on a connected server "
 			 "socket: %s", strerror(errno));
@@ -187,11 +185,11 @@
 			 "local addresses do not match\n");
 #else
 	if (svr_local_addr.v4.sin_addr.s_addr !=
-		 		clt_peer_addr.v4.sin_addr.s_addr)
+	    clt_peer_addr.v4.sin_addr.s_addr)
 		tst_brkm(TBROK, NULL, "Server's local address and client's "
 			 "peer addresses do not match\n");
 	if (svr_peer_addr.v4.sin_addr.s_addr !=
-		 		clt_local_addr.v4.sin_addr.s_addr)
+	    clt_local_addr.v4.sin_addr.s_addr)
 		tst_brkm(TBROK, NULL, "Server's peer address and client's "
 			 "local addresses do not match\n");
 #endif
@@ -199,7 +197,7 @@
 
 	memset(&clt_local_addr, 0x00, sizeof(clt_local_addr));
 	len = sizeof(clt_local_addr);
-	/*getsockname():  Bad socket descriptor, EBADF expected error*/
+	/*getsockname():  Bad socket descriptor, EBADF expected error */
 	error = getsockname(-1, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "getsockname on a bad socket "
@@ -207,7 +205,7 @@
 
 	tst_resm(TPASS, "getsockname on a bad socket descriptor - EBADF");
 
-	/*getsockname(): Invalid socket, ENOTSOCK expected error*/
+	/*getsockname(): Invalid socket, ENOTSOCK expected error */
 	error = getsockname(0, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "getsockname on an invalid socket "
@@ -215,7 +213,7 @@
 
 	tst_resm(TPASS, "getsockname on an invalid socket - ENOTSOCK");
 
-	/*getsockname(): Invalid structure, EFAULT expected error*/
+	/*getsockname(): Invalid structure, EFAULT expected error */
 	error = getsockname(clt_sk, (struct sockaddr *)-1, &len);
 	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "getsockname with invalid buffer "
@@ -225,7 +223,7 @@
 
 	memset(&clt_peer_addr, 0x00, sizeof(clt_peer_addr));
 	len = sizeof(clt_peer_addr);
-	/*getpeername():  Bad socket descriptor, EBADF expected error*/
+	/*getpeername():  Bad socket descriptor, EBADF expected error */
 	error = getpeername(-1, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != EBADF)
 		tst_brkm(TBROK, NULL, "getpeername on a bad socket "
@@ -233,7 +231,7 @@
 
 	tst_resm(TPASS, "getpeername on a bad socket descriptor - EBADF");
 
-	/*getpeername(): Invalid socket, ENOTSOCK expected error*/
+	/*getpeername(): Invalid socket, ENOTSOCK expected error */
 	error = getpeername(0, (struct sockaddr *)&clt_local_addr, &len);
 	if (error != -1 || errno != ENOTSOCK)
 		tst_brkm(TBROK, NULL, "getpeername on an invalid socket "
@@ -241,7 +239,7 @@
 
 	tst_resm(TPASS, "getpeername on an invalid socket - ENOTSOCK");
 
-	/*getpeername(): Invalid structure, EFAULT expected error*/
+	/*getpeername(): Invalid structure, EFAULT expected error */
 	error = getpeername(clt_sk, (struct sockaddr *)-1, &len);
 	if (error != -1 || errno != EFAULT)
 		tst_brkm(TBROK, NULL, "getpeername with invalid buffer "
@@ -253,6 +251,6 @@
 	close(svr_sk);
 	close(accept_sk);
 
-        /* Indicate successful completion.  */
+	/* Indicate successful completion.  */
 	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_inaddr_any.c b/testcases/network/sctp/func_tests/test_inaddr_any.c
index 2b128e3..ac8a638 100644
--- a/testcases/network/sctp/func_tests/test_inaddr_any.c
+++ b/testcases/network/sctp/func_tests/test_inaddr_any.c
@@ -61,30 +61,29 @@
 int TST_TOTAL = 2;
 int TST_CNT = 0;
 
-int
-main(void)
+int main(void)
 {
-        int sk1, sk2;
-        sockaddr_storage_t loop;
-        sockaddr_storage_t anyaddr;
-        struct msghdr outmessage;
+	int sk1, sk2;
+	sockaddr_storage_t loop;
+	sockaddr_storage_t anyaddr;
+	struct msghdr outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        struct iovec iov;
-        struct msghdr inmessage;
-        char *message = "hello, world!\n";
-        char *telephone = "Watson, come here!  I need you!\n";
-        char *telephone_resp = "I already brought your coffee...\n";
-        int error;
+	struct iovec out_iov;
+	struct iovec iov;
+	struct msghdr inmessage;
+	char *message = "hello, world!\n";
+	char *telephone = "Watson, come here!  I need you!\n";
+	char *telephone_resp = "I already brought your coffee...\n";
+	int error;
 	int pf_class, af_family;
 	uint32_t ppid;
 	uint32_t stream;
 	socklen_t namelen;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -94,41 +93,41 @@
 	pf_class = PF_INET6;
 	af_family = AF_INET6;
 
-        loop.v6.sin6_family = AF_INET6;
-        loop.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_LOOPBACK_INIT;
-        loop.v6.sin6_port = 0;
+	loop.v6.sin6_family = AF_INET6;
+	loop.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_LOOPBACK_INIT;
+	loop.v6.sin6_port = 0;
 
-        anyaddr.v6.sin6_family = AF_INET6;
-        anyaddr.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
-        anyaddr.v6.sin6_port = 0;
+	anyaddr.v6.sin6_family = AF_INET6;
+	anyaddr.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_ANY_INIT;
+	anyaddr.v6.sin6_port = 0;
 #else
 	pf_class = PF_INET;
 	af_family = AF_INET;
 
-        loop.v4.sin_family = AF_INET;
-        loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop.v4.sin_port = 0;
+	loop.v4.sin_family = AF_INET;
+	loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop.v4.sin_port = 0;
 
-        anyaddr.v4.sin_family = AF_INET;
-        anyaddr.v4.sin_addr.s_addr = INADDR_ANY;
-        anyaddr.v4.sin_port = 0;
+	anyaddr.v4.sin_family = AF_INET;
+	anyaddr.v4.sin_addr.s_addr = INADDR_ANY;
+	anyaddr.v4.sin_port = 0;
 #endif /* TEST_V6 */
 
-        /* Create the two endpoints which will talk to each other.  */
-        sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	/* Create the two endpoints which will talk to each other.  */
+	sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	/* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
 	test_enable_assoc_change(sk1);
 	test_enable_assoc_change(sk2);
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(sk1, &loop.sa, sizeof(loop));
-        test_bind(sk2, &anyaddr.sa, sizeof(anyaddr));
+	/* Bind these sockets to the test ports.  */
+	test_bind(sk1, &loop.sa, sizeof(loop));
+	test_bind(sk2, &anyaddr.sa, sizeof(anyaddr));
 
 	tst_resm(TPASS, "bind INADDR_ANY address");
 
- 	/* Mark sk2 as being able to accept new associations */
+	/* Mark sk2 as being able to accept new associations */
 	test_listen(sk2, 1);
 
 	/* Now use getsockaname() to retrieve the ephmeral ports. */
@@ -145,17 +144,17 @@
 #if TEST_V6
 	loop.v6.sin6_port = anyaddr.v6.sin6_port;
 #else
-        loop.v4.sin_port = anyaddr.v4.sin_port;
+	loop.v4.sin_port = anyaddr.v4.sin_port;
 #endif
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &loop;
-        outmessage.msg_namelen = sizeof(loop);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &loop;
+	outmessage.msg_namelen = sizeof(loop);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -163,47 +162,47 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
-        test_sendmsg(sk1, &outmessage, 0, strlen(message)+1);
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
-        memset(&inmessage, 0, sizeof(inmessage));
-        iov.iov_base = test_malloc(REALLY_BIG);
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
+	memset(&inmessage, 0, sizeof(inmessage));
+	iov.iov_base = test_malloc(REALLY_BIG);
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
 
-        /* Get the communication up message on sk2.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk2.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 
-        /* Get the communication up message on sk1.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk1.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 
-        /* Get the first message which was sent.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
+	/* Get the first message which was sent.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
 			    MSG_EOR, stream, ppid);
 
-       /* Send 2 messages.  */
-        outmessage.msg_name = &loop;
-        outmessage.msg_namelen = sizeof(loop);
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send 2 messages.  */
+	outmessage.msg_name = &loop;
+	outmessage.msg_namelen = sizeof(loop);
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -216,38 +215,38 @@
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	outmessage.msg_iov->iov_base = telephone;
-        outmessage.msg_iov->iov_len = strlen(telephone) + 1;
-	test_sendmsg(sk1, &outmessage, 0, strlen(telephone)+1);
+	outmessage.msg_iov->iov_len = strlen(telephone) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(telephone) + 1);
 
 	outmessage.msg_iov->iov_base = telephone_resp;
-        outmessage.msg_iov->iov_len = strlen(telephone_resp) + 1;
-	test_sendmsg(sk1, &outmessage, 0, strlen(telephone_resp)+1);
+	outmessage.msg_iov->iov_len = strlen(telephone_resp) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(telephone_resp) + 1);
 
-        /* Get those two messages.  */
+	/* Get those two messages.  */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(telephone) + 1,
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(telephone) + 1,
 			    MSG_EOR, stream, ppid);
 
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(telephone_resp) + 1,
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(telephone_resp) + 1,
 			    MSG_EOR, stream, ppid);
 
-        /* Shut down the link.  */
-        close(sk1);
+	/* Shut down the link.  */
+	close(sk1);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
 
-        close(sk2);
+	close(sk2);
 
 	tst_resm(TPASS, "send msgs from a socket with INADDR_ANY bind address");
 
-        /* Indicate successful completion.  */
-      tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_peeloff.c b/testcases/network/sctp/func_tests/test_peeloff.c
index 8bd6590..08db125 100644
--- a/testcases/network/sctp/func_tests/test_peeloff.c
+++ b/testcases/network/sctp/func_tests/test_peeloff.c
@@ -58,8 +58,7 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk[MAX_CLIENTS], peeloff_sk[MAX_CLIENTS];
 	sctp_assoc_t svr_associd[MAX_CLIENTS], clt_associd[MAX_CLIENTS];
@@ -78,19 +77,19 @@
 	struct sctp_assoc_change *sac;
 	char *big_buffer;
 	int i;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	int pf_class;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
 
 #if TEST_V6
 	pf_class = PF_INET6;
-        svr_loop.v6.sin6_family = AF_INET6;
-        svr_loop.v6.sin6_addr = in6addr_loopback;
-        svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	svr_loop.v6.sin6_family = AF_INET6;
+	svr_loop.v6.sin6_addr = in6addr_loopback;
+	svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
 #else
 	pf_class = PF_INET;
 	svr_loop.v4.sin_family = AF_INET;
@@ -99,7 +98,7 @@
 #endif
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(svr_sk, &svr_loop.sa, sizeof(svr_loop));
 
 	/* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
@@ -112,9 +111,9 @@
 	for (i = 0; i < MAX_CLIENTS; i++) {
 		clt_sk[i] = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 #if TEST_V6
-        	clt_loop[i].v6.sin6_family = AF_INET6;
-        	clt_loop[i].v6.sin6_addr = in6addr_loopback;
-        	clt_loop[i].v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
+		clt_loop[i].v6.sin6_family = AF_INET6;
+		clt_loop[i].v6.sin6_addr = in6addr_loopback;
+		clt_loop[i].v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
 #else
 		clt_loop[i].v4.sin_family = AF_INET;
 		clt_loop[i].v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
@@ -125,7 +124,7 @@
 		test_enable_assoc_change(clt_sk[i]);
 	}
 
-        /* Send the first message from all the clients to the server.  This
+	/* Send the first message from all the clients to the server.  This
 	 * will create the associations.
 	 */
 	outmessage.msg_name = &svr_loop;
@@ -142,15 +141,14 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	outmessage.msg_iov->iov_base = message;
 	outmessage.msg_iov->iov_len = strlen(message) + 1;
 	for (i = 0; i < MAX_CLIENTS; i++)
-		test_sendmsg(clt_sk[i], &outmessage, 0,
-					  strlen(message)+1);
+		test_sendmsg(clt_sk[i], &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
@@ -214,14 +212,13 @@
 	if ((-1 != sctp_peeloff(peeloff_sk[0], svr_associd[0])) ||
 	    (EINVAL != errno))
 		tst_brkm(TBROK, NULL, "sctp_peeloff on a peeled off "
-			 "socket error:%d, errno:%d",
-			 error, errno);
+			 "socket error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_peeloff on a peeled off socket");
 
 	/* Send a message from all the client sockets to the server socket. */
 	for (i = 0; i < MAX_CLIENTS; i++)
-		test_sendmsg(clt_sk[i], &outmessage, 0, strlen(message)+1);
+		test_sendmsg(clt_sk[i], &outmessage, 0, strlen(message) + 1);
 
 	/* Receive the sent messages on the peeled off server sockets.  */
 	for (i = 0; i < MAX_CLIENTS; i++) {
@@ -239,7 +236,8 @@
 	for (i = 0; i < MAX_CLIENTS; i++) {
 		outmessage.msg_name = &clt_loop[i];
 		outmessage.msg_namelen = sizeof(clt_loop[i]);
-		test_sendmsg(peeloff_sk[i], &outmessage, 0, strlen(message)+1);
+		test_sendmsg(peeloff_sk[i], &outmessage, 0,
+			     strlen(message) + 1);
 	}
 
 	/* Receive the messages sent from the peeled of server sockets on
@@ -263,7 +261,7 @@
 	 */
 	outmessage.msg_name = &clt_loop[1];
 	outmessage.msg_namelen = sizeof(clt_loop[1]);
-	test_sendmsg(peeloff_sk[0], &outmessage, 0, strlen(message)+1);
+	test_sendmsg(peeloff_sk[0], &outmessage, 0, strlen(message) + 1);
 
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = test_recvmsg(clt_sk[0], &inmessage, MSG_WAITALL);
@@ -292,6 +290,6 @@
 		close(clt_sk[i]);
 	}
 
-        /* Indicate successful completion.  */
-       	tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_recvmsg.c b/testcases/network/sctp/func_tests/test_recvmsg.c
index 392aeef..b6314d8 100644
--- a/testcases/network/sctp/func_tests/test_recvmsg.c
+++ b/testcases/network/sctp/func_tests/test_recvmsg.c
@@ -58,8 +58,7 @@
 int TST_TOTAL = 2;
 int TST_CNT = 0;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk;
 	struct sockaddr_in svr_loop, clt_loop;
@@ -70,7 +69,7 @@
 	char *big_buffer;
 	void *msg_buf;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -84,7 +83,7 @@
 	clt_loop.sin_port = htons(SCTP_TESTPORT_2);
 
 	/* Create and bind the server socket.  */
-        svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
+	svr_sk = test_socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP);
 	test_bind(svr_sk, (struct sockaddr *)&svr_loop, sizeof(svr_loop));
 
 	/* Mark server socket as being able to accept new associations.  */
@@ -111,7 +110,7 @@
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
+	memset(&inmessage, 0, sizeof(inmessage));
 	iov.iov_base = big_buffer;
 	iov.iov_len = 2000;
 	inmessage.msg_iov = &iov;
@@ -135,18 +134,17 @@
 	/* Read the 30000 byte message using multiple recvmsg() calls in a
 	 * loop with 2000 bytes per read.
 	 */
-	for (i = 0, msglen = 30000; i < 15; i++, msglen-=2000) {
+	for (i = 0, msglen = 30000; i < 15; i++, msglen -= 2000) {
 		iov.iov_len = REALLY_BIG;
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(svr_sk, &inmessage, MSG_PEEK);
-		test_check_msg_data(&inmessage, error, msglen,
-				    MSG_EOR, 0, 0);
+		test_check_msg_data(&inmessage, error, msglen, MSG_EOR, 0, 0);
 
 		iov.iov_len = 2000;
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(svr_sk, &inmessage, MSG_WAITALL);
 		test_check_msg_data(&inmessage, error, 2000,
-				    ((i==14)?MSG_EOR:0), 0, 0);
+				    ((i == 14) ? MSG_EOR : 0), 0, 0);
 	}
 
 	tst_resm(TPASS, "recvmsg with MSG_PEEK flag");
@@ -155,6 +153,6 @@
 	close(svr_sk);
 	close(clt_sk);
 
-        /* Indicate successful completion.  */
-    return 0;
+	/* Indicate successful completion.  */
+	return 0;
 }
diff --git a/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c b/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
index 23f522f..ed41829 100644
--- a/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
+++ b/testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c
@@ -66,7 +66,8 @@
 static char *fillmsg = NULL;
 static char *ttlmsg = "This should time out!\n";
 static char *nottlmsg = "This should NOT time out!\n";
-static char ttlfrag[SMALL_MAXSEG*3] = {0};
+static char ttlfrag[SMALL_MAXSEG * 3] = { 0 };
+
 static char *message = "Hello world\n";
 
 int main(int argc, char *argv[])
@@ -123,7 +124,7 @@
 
 	/* Create the two endpoints which will talk to each other.  */
 	sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	/* Set the MAXSEG to something smallish. */
 	{
@@ -138,9 +139,9 @@
 	test_setsockopt(sk1, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 	test_setsockopt(sk2, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(sk1, &loop1.sa, sizeof(loop1));
-        test_bind(sk2, &loop2.sa, sizeof(loop2));
+	/* Bind these sockets to the test ports.  */
+	test_bind(sk1, &loop1.sa, sizeof(loop1));
+	test_bind(sk2, &loop2.sa, sizeof(loop2));
 
 	/*
 	 * Set the RWND small so we can fill it up easily.
@@ -153,14 +154,14 @@
 		tst_brkm(TBROK, NULL, "can't get rcvbuf size: %s",
 			 strerror(errno));
 
-	len = SMALL_RCVBUF; /* Really becomes 2xlen when set. */
+	len = SMALL_RCVBUF;	/* Really becomes 2xlen when set. */
 
 	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len));
 	if (error)
 		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			 strerror(errno));
 
-       /* Mark sk2 as being able to accept new associations.  */
+	/* Mark sk2 as being able to accept new associations.  */
 	test_listen(sk2, 1);
 
 	/* Send the first message.  This will create the association.  */
@@ -185,8 +186,7 @@
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 
 	/* restore the rcvbuffer size for the receiving socket */
-	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &oldlen,
-			   sizeof(oldlen));
+	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &oldlen, sizeof(oldlen));
 
 	if (error)
 		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
@@ -218,23 +218,23 @@
 
 	/* Figure out how big to make our fillmsg */
 	len = sizeof(struct sctp_status);
-	memset(&gstatus,0,sizeof(struct sctp_status));
+	memset(&gstatus, 0, sizeof(struct sctp_status));
 	gstatus.sstat_assoc_id = associd1;
 	error = getsockopt(sk1, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 
 	if (error)
 		tst_brkm(TBROK, NULL, "can't get rwnd size: %s",
-			strerror(errno));
+			 strerror(errno));
 	tst_resm(TINFO, "creating a fillmsg of size %d",
-		gstatus.sstat_rwnd+RWND_SLOP);
-        fillmsg = malloc(gstatus.sstat_rwnd+RWND_SLOP);
+		 gstatus.sstat_rwnd + RWND_SLOP);
+	fillmsg = malloc(gstatus.sstat_rwnd + RWND_SLOP);
 
 	/* Send a fillmsg */
-	memset(fillmsg, 'X', gstatus.sstat_rwnd+RWND_SLOP);
-	fillmsg[gstatus.sstat_rwnd+RWND_SLOP-1] = '\0';
+	memset(fillmsg, 'X', gstatus.sstat_rwnd + RWND_SLOP);
+	fillmsg[gstatus.sstat_rwnd + RWND_SLOP - 1] = '\0';
 	ppid++;
 	stream++;
-	test_sctp_sendmsg(sk1, fillmsg, gstatus.sstat_rwnd+RWND_SLOP,
+	test_sctp_sendmsg(sk1, fillmsg, gstatus.sstat_rwnd + RWND_SLOP,
 			  (struct sockaddr *)&loop2, sizeof(loop2),
 			  ppid, 0, stream, 0, 0);
 
@@ -254,7 +254,7 @@
 
 	/* And finally a fragmented message that will time out. */
 	memset(ttlfrag, '0', sizeof(ttlfrag));
-	ttlfrag[sizeof(ttlfrag)-1] = '\0';
+	ttlfrag[sizeof(ttlfrag) - 1] = '\0';
 	test_sctp_sendmsg(sk1, ttlfrag, sizeof(ttlfrag),
 			  (struct sockaddr *)&loop2, sizeof(loop2),
 			  ppid, 0, stream, 2000, 0);
@@ -270,16 +270,16 @@
 		buflen = REALLY_BIG;
 		msgname_len = sizeof(msgname);
 		test_sctp_recvmsg(sk2, big_buffer, buflen,
-			  (struct sockaddr *)&msgname, &msgname_len,
-			  &sinfo, &msg_flags);
+				  (struct sockaddr *)&msgname, &msgname_len,
+				  &sinfo, &msg_flags);
 	} while (!(msg_flags & MSG_EOR));
 
 	/* Get the message that did NOT time out. */
 	buflen = REALLY_BIG;
 	msgname_len = sizeof(msgname);
 	error = test_sctp_recvmsg(sk2, big_buffer, buflen,
-			  (struct sockaddr *)&msgname, &msgname_len,
-			  &sinfo, &msg_flags);
+				  (struct sockaddr *)&msgname, &msgname_len,
+				  &sinfo, &msg_flags);
 	test_check_buf_data(big_buffer, error, msg_flags, &sinfo,
 			    strlen(nottlmsg) + 1, MSG_EOR, stream, ppid);
 	if (0 != strncmp(big_buffer, nottlmsg, strlen(nottlmsg)))
@@ -293,12 +293,11 @@
 	buflen = REALLY_BIG;
 	msgname_len = sizeof(msgname);
 	error = test_sctp_recvmsg(sk1, big_buffer, buflen,
-			  (struct sockaddr *)&msgname, &msgname_len,
-			  &sinfo, &msg_flags);
+				  (struct sockaddr *)&msgname, &msgname_len,
+				  &sinfo, &msg_flags);
 	test_check_buf_notification(big_buffer, error, msg_flags,
 				    sizeof(struct sctp_send_failed) +
-							strlen(ttlmsg) + 1,
-				    SCTP_SEND_FAILED, 0);
+				    strlen(ttlmsg) + 1, SCTP_SEND_FAILED, 0);
 	ssf = (struct sctp_send_failed *)big_buffer;
 	if (0 != strncmp(ttlmsg, (char *)ssf->ssf_data, strlen(ttlmsg) + 1))
 		tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
@@ -314,18 +313,17 @@
 		buflen = REALLY_BIG;
 		msgname_len = sizeof(msgname);
 		error = test_sctp_recvmsg(sk1, big_buffer, buflen,
-			  (struct sockaddr *)&msgname, &msgname_len,
-			  &sinfo, &msg_flags);
+					  (struct sockaddr *)&msgname,
+					  &msgname_len, &sinfo, &msg_flags);
 		test_check_buf_notification(big_buffer, error, msg_flags,
 					    sizeof(struct sctp_send_failed) +
-							          SMALL_MAXSEG,
-					    SCTP_SEND_FAILED, 0);
+					    SMALL_MAXSEG, SCTP_SEND_FAILED, 0);
 		ssf = (struct sctp_send_failed *)big_buffer;
 		if (0 != strncmp(&ttlfrag[offset], (char *)ssf->ssf_data,
 				 SMALL_MAXSEG))
 			tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 		offset += SMALL_MAXSEG;
-	} while (!(ssf->ssf_info.sinfo_flags & 0x01)); /* LAST FRAG */
+	} while (!(ssf->ssf_info.sinfo_flags & 0x01));	/* LAST FRAG */
 
 	tst_resm(TPASS, "sctp_recvmsg SEND_FAILED for fragmented message with "
 		 "ttl");
@@ -344,8 +342,8 @@
 				  (struct sockaddr *)&msgname, &msgname_len,
 				  &sinfo, &msg_flags);
 	test_check_buf_data(big_buffer, error, msg_flags, &sinfo,
-			    strlen(message) + 1, MSG_EOR, snd_sinfo.sinfo_stream,
-			    snd_sinfo.sinfo_ppid);
+			    strlen(message) + 1, MSG_EOR,
+			    snd_sinfo.sinfo_stream, snd_sinfo.sinfo_ppid);
 
 	tst_resm(TPASS, "sctp_send");
 
@@ -356,8 +354,8 @@
 	buflen = REALLY_BIG;
 	msgname_len = sizeof(msgname);
 	error = test_sctp_recvmsg(sk2, big_buffer, buflen,
-		  (struct sockaddr *)&msgname, &msgname_len,
-		  &sinfo, &msg_flags);
+				  (struct sockaddr *)&msgname, &msgname_len,
+				  &sinfo, &msg_flags);
 	test_check_buf_notification(big_buffer, error, msg_flags,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
diff --git a/testcases/network/sctp/func_tests/test_sockopt.c b/testcases/network/sctp/func_tests/test_sockopt.c
index 76421a4..0dc3324 100644
--- a/testcases/network/sctp/func_tests/test_sockopt.c
+++ b/testcases/network/sctp/func_tests/test_sockopt.c
@@ -61,23 +61,22 @@
 int TST_TOTAL = 29;
 int TST_CNT = 0;
 
-int
-main(void)
+int main(void)
 {
 	int udp_svr_sk, udp_clt_sk, tcp_svr_sk, tcp_clt_sk;
 	int accept_sk, peeloff_sk;
-        sockaddr_storage_t udp_svr_loop, udp_clt_loop;
-        sockaddr_storage_t tcp_svr_loop, tcp_clt_loop;
-        struct iovec iov;
-        struct msghdr inmessage;
+	sockaddr_storage_t udp_svr_loop, udp_clt_loop;
+	sockaddr_storage_t tcp_svr_loop, tcp_clt_loop;
+	struct iovec iov;
+	struct msghdr inmessage;
 	struct msghdr outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        char *message = "hello, world!\n";
-        int error;
+	struct iovec out_iov;
+	char *message = "hello, world!\n";
+	int error;
 	int pf_class, af_family;
 	uint32_t ppid;
 	uint32_t stream;
@@ -98,7 +97,7 @@
 	socklen_t optlen, addrlen;
 	struct sctp_status status;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -108,55 +107,55 @@
 	pf_class = PF_INET6;
 	af_family = AF_INET6;
 
-        udp_svr_loop.v6.sin6_family = AF_INET6;
-        udp_svr_loop.v6.sin6_addr = in6addr_loopback;
-        udp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	udp_svr_loop.v6.sin6_family = AF_INET6;
+	udp_svr_loop.v6.sin6_addr = in6addr_loopback;
+	udp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
 
-        udp_clt_loop.v6.sin6_family = AF_INET6;
-        udp_clt_loop.v6.sin6_addr = in6addr_loopback;
-        udp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+1);
+	udp_clt_loop.v6.sin6_family = AF_INET6;
+	udp_clt_loop.v6.sin6_addr = in6addr_loopback;
+	udp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1 + 1);
 
-        tcp_svr_loop.v6.sin6_family = AF_INET6;
-        tcp_svr_loop.v6.sin6_addr = in6addr_loopback;
-        tcp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+2);
+	tcp_svr_loop.v6.sin6_family = AF_INET6;
+	tcp_svr_loop.v6.sin6_addr = in6addr_loopback;
+	tcp_svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1 + 2);
 
-        tcp_clt_loop.v6.sin6_family = AF_INET6;
-        tcp_clt_loop.v6.sin6_addr = in6addr_loopback;
-        tcp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1+3);
+	tcp_clt_loop.v6.sin6_family = AF_INET6;
+	tcp_clt_loop.v6.sin6_addr = in6addr_loopback;
+	tcp_clt_loop.v6.sin6_port = htons(SCTP_TESTPORT_1 + 3);
 #else
 	pf_class = PF_INET;
 	af_family = AF_INET;
 
-        udp_svr_loop.v4.sin_family = AF_INET;
-        udp_svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        udp_svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1);
+	udp_svr_loop.v4.sin_family = AF_INET;
+	udp_svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	udp_svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1);
 
-        udp_clt_loop.v4.sin_family = AF_INET;
-        udp_clt_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        udp_clt_loop.v4.sin_port = htons(SCTP_TESTPORT_1+1);
+	udp_clt_loop.v4.sin_family = AF_INET;
+	udp_clt_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	udp_clt_loop.v4.sin_port = htons(SCTP_TESTPORT_1 + 1);
 
-        tcp_svr_loop.v4.sin_family = AF_INET;
-        tcp_svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        tcp_svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1+2);
+	tcp_svr_loop.v4.sin_family = AF_INET;
+	tcp_svr_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	tcp_svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1 + 2);
 
-        tcp_clt_loop.v4.sin_family = AF_INET;
-        tcp_clt_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        tcp_clt_loop.v4.sin_port = htons(SCTP_TESTPORT_2+3);
+	tcp_clt_loop.v4.sin_family = AF_INET;
+	tcp_clt_loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	tcp_clt_loop.v4.sin_port = htons(SCTP_TESTPORT_2 + 3);
 #endif /* TEST_V6 */
 
-        /* Create the two endpoints which will talk to each other.  */
-        udp_svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        udp_clt_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	/* Create the two endpoints which will talk to each other.  */
+	udp_svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	udp_clt_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	/* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
 	test_enable_assoc_change(udp_svr_sk);
 	test_enable_assoc_change(udp_clt_sk);
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(udp_svr_sk, &udp_svr_loop.sa, sizeof(udp_svr_loop));
-        test_bind(udp_clt_sk, &udp_clt_loop.sa, sizeof(udp_clt_loop));
+	/* Bind these sockets to the test ports.  */
+	test_bind(udp_svr_sk, &udp_svr_loop.sa, sizeof(udp_svr_loop));
+	test_bind(udp_clt_sk, &udp_clt_loop.sa, sizeof(udp_clt_loop));
 
-       /* Mark udp_svr_sk as being able to accept new associations.  */
+	/* Mark udp_svr_sk as being able to accept new associations.  */
 	test_listen(udp_svr_sk, 1);
 
 	/* TEST #1: SCTP_STATUS socket option. */
@@ -165,8 +164,7 @@
 	 */
 	optlen = sizeof(struct sctp_status);
 	memset(&status, 0, optlen);
-	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status,
-			   &optlen);
+	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status, &optlen);
 	if ((error != -1) && (errno != EINVAL))
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) on a "
 			 "socket with no assoc error:%d errno:%d",
@@ -174,14 +172,14 @@
 
 	tst_resm(TPASS, "getsockopt(SCTP_STATUS) on a socket with no assoc");
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &udp_svr_loop;
-        outmessage.msg_namelen = sizeof(udp_svr_loop);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &udp_svr_loop;
+	outmessage.msg_namelen = sizeof(udp_svr_loop);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -189,45 +187,45 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
-        test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message)+1);
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
+	test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
-        iov.iov_base = big_buffer;
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
+	memset(&inmessage, 0, sizeof(inmessage));
+	iov.iov_base = big_buffer;
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
 
-        /* Get the communication up message on udp_svr_sk.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on udp_svr_sk.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	udp_svr_associd = sac->sac_assoc_id;
 
-        /* Get the communication up message on udp_clt_sk.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(udp_clt_sk, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on udp_clt_sk.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(udp_clt_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	udp_clt_associd = sac->sac_assoc_id;
 
-        /* Get the first message which was sent.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
+	/* Get the first message which was sent.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
 			    MSG_EOR, stream, ppid);
 
 	/* Get SCTP_STATUS for udp_clt_sk's given association. */
@@ -242,10 +240,9 @@
 	optlen = sizeof(struct sctp_status);
 	memset(&status, 0, optlen);
 	status.sstat_assoc_id = udp_svr_associd;
-	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_STATUS, &status,
-			   &optlen);
+	error = getsockopt(udp_clt_sk, SOL_SCTP, SCTP_STATUS, &status, &optlen);
 	if ((error != -1) && (errno != EINVAL))
-        	tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
 			 "associd error: %d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_STATUS) with invalid associd");
@@ -254,31 +251,30 @@
 	optlen = sizeof(struct sctp_status);
 	memset(&status, 0, optlen);
 	status.sstat_assoc_id = 0;
-	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status,
-			   &optlen);
+	error = getsockopt(udp_svr_sk, SOL_SCTP, SCTP_STATUS, &status, &optlen);
 	if ((error != -1) && (errno != EINVAL))
-        	tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
+		tst_brkm(TBROK, NULL, "getsockopt(SCTP_STATUS) with "
 			 "NULL associd error: %d errno:%d", error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_STATUS) with NULL associd");
 
-        /* Shut down the link.  */
-        close(udp_clt_sk);
+	/* Shut down the link.  */
+	close(udp_clt_sk);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
 
 	error = 0;
-        close(udp_svr_sk);
+	close(udp_svr_sk);
 
 	/* TEST #2: SCTP_EVENTS socket option and SCTP_SHUTDOWN_EVENT
 	 * notification.
 	 */
-        /* Create the two endpoints which will talk to each other.  */
+	/* Create the two endpoints which will talk to each other.  */
 	udp_svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 	udp_clt_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
@@ -305,10 +301,8 @@
 
 	/* Disable all the events on udp_svr_sk and udp_clt_sk. */
 	memset(&subscribe, 0, sizeof(struct sctp_event_subscribe));
-	test_setsockopt(udp_svr_sk, SCTP_EVENTS, &subscribe,
-			sizeof(subscribe));
-	test_setsockopt(udp_clt_sk, SCTP_EVENTS, &subscribe,
-			sizeof(subscribe));
+	test_setsockopt(udp_svr_sk, SCTP_EVENTS, &subscribe, sizeof(subscribe));
+	test_setsockopt(udp_clt_sk, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 
 	tst_resm(TPASS, "setsockopt(SCTP_EVENTS)");
 
@@ -323,27 +317,25 @@
 	/* Send a message.  This will create the association.  */
 	outmessage.msg_iov->iov_base = message;
 	outmessage.msg_iov->iov_len = strlen(message) + 1;
-	test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message)+1);
+	test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message) + 1);
 
 	/* Get the message which was sent.  */
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = test_recvmsg(udp_svr_sk, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
 			    MSG_EOR, 0, 0);
 	/* Verify that we received the msg without any ancillary data. */
 	if (inmessage.msg_controllen != 0)
-		tst_brkm(TBROK, NULL, "Receive unexpected ancillary"
-			 "data");
+		tst_brkm(TBROK, NULL, "Receive unexpected ancillary" "data");
 
 	/* Enable SCTP_SHUTDOWN_EVENTs on udp_svr_sk. */
 	memset(&subscribe, 0, sizeof(struct sctp_event_subscribe));
 	subscribe.sctp_shutdown_event = 1;
-	test_setsockopt(udp_svr_sk, SCTP_EVENTS, &subscribe,
-			sizeof(subscribe));
+	test_setsockopt(udp_svr_sk, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 
 	error = 0;
-        /* Shut down the link.  */
-        close(udp_clt_sk);
+	/* Shut down the link.  */
+	close(udp_clt_sk);
 
 	/* Get the SHUTDOWN_EVENT notification on udp_svr_sk. */
 	inmessage.msg_controllen = sizeof(incmsg);
@@ -354,10 +346,10 @@
 
 	tst_resm(TPASS, "setsockopt(SCTP_EVENTS) - SCTP_SHUTDOWN_EVENT");
 
-        close(udp_svr_sk);
+	close(udp_svr_sk);
 
 	/* TEST #3: whether sctp_opt_info equals */
-        /* Create the two endpoints which will talk to each other.  */
+	/* Create the two endpoints which will talk to each other.  */
 	udp_svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 	udp_clt_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
@@ -372,14 +364,14 @@
 	/* Mark udp_svr_sk as being able to accept new associations.  */
 	test_listen(udp_svr_sk, 1);
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &udp_svr_loop;
-        outmessage.msg_namelen = sizeof(udp_svr_loop);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &udp_svr_loop;
+	outmessage.msg_namelen = sizeof(udp_svr_loop);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -387,17 +379,17 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
-        test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message)+1);
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
+	test_sendmsg(udp_clt_sk, &outmessage, 0, strlen(message) + 1);
 
-        /* Get the communication up message on udp_clt_sk.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(udp_clt_sk, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on udp_clt_sk.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(udp_clt_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
@@ -415,33 +407,33 @@
 		optlen = sizeof(struct sctp_status);
 
 		/* Test SCTP_STATUS for udp_clt_sk's given association. */
-		error = sctp_opt_info(udp_clt_sk,udp_clt_associd,SCTP_STATUS,
-				(char *)&status1, &optlen);
+		error = sctp_opt_info(udp_clt_sk, udp_clt_associd, SCTP_STATUS,
+				      (char *)&status1, &optlen);
 		if (error != 0)
-	                tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, NULL,
 				 "sctp_opt_info(SCTP_STATUS): %s",
 				 strerror(errno));
 
 		status2.sstat_assoc_id = udp_clt_associd;
 		error = getsockopt(udp_clt_sk, IPPROTO_SCTP, SCTP_STATUS,
-                		(char *)&status2, &optlen);
+				   (char *)&status2, &optlen);
 		if (error != 0)
-	                tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, NULL,
 				 "getsockopt(SCTP_STATUS): %s",
 				 strerror(errno));
 		if (strncmp((char *)&status1, (char *)&status2, optlen))
-	                tst_brkm(TBROK, NULL, "sctp_opt_info(SCTP_STAUS)"
-			       "doesn't match getsockopt(SCTP_STATUS)");
+			tst_brkm(TBROK, NULL, "sctp_opt_info(SCTP_STAUS)"
+				 "doesn't match getsockopt(SCTP_STATUS)");
 
-                tst_resm(TPASS, "sctp_opt_info(SCTP_STATUS)");
+		tst_resm(TPASS, "sctp_opt_info(SCTP_STATUS)");
 	}
 	error = 0;
-        /* Shut down the link.  */
-        close(udp_svr_sk);
-        close(udp_clt_sk);
+	/* Shut down the link.  */
+	close(udp_svr_sk);
+	close(udp_clt_sk);
 
 	/* TEST #4: SCTP_INITMSG socket option. */
-        /* Create a socket.  */
+	/* Create a socket.  */
 	udp_svr_sk = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	/* Bind this socket to the test port.  */
@@ -518,7 +510,7 @@
 
 	/* Verify that the get param matches set param. */
 	if (set_udp_sk_dflt_param.sinfo_ppid !=
-			get_udp_sk_dflt_param.sinfo_ppid)
+	    get_udp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -526,11 +518,11 @@
 	memset(&get_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfo));
 	optlen = sizeof(get_udp_sk_dflt_param);
 	test_getsockopt(udp_clt_sk, SCTP_DEFAULT_SEND_PARAM,
-		       &get_udp_sk_dflt_param, &optlen);
+			&get_udp_sk_dflt_param, &optlen);
 
 	/* Verify that the get param matches set param. */
 	if (set_udp_sk_dflt_param.sinfo_ppid !=
-			get_udp_sk_dflt_param.sinfo_ppid)
+	    get_udp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -542,15 +534,14 @@
 	 */
 	memset(&set_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfo));
 	set_udp_sk_dflt_param.sinfo_ppid = 1000;
-       	/* Invalid assoc id */
+	/* Invalid assoc id */
 	set_udp_sk_dflt_param.sinfo_assoc_id = 1234;
-        error = setsockopt(udp_clt_sk, SOL_SCTP, SCTP_DEFAULT_SEND_PARAM,
+	error = setsockopt(udp_clt_sk, SOL_SCTP, SCTP_DEFAULT_SEND_PARAM,
 			   &set_udp_sk_dflt_param,
 			   sizeof(set_udp_sk_dflt_param));
 	if ((-1 != error) || (EINVAL != errno))
 		tst_brkm(TBROK, NULL, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
-			 "invalid associd error:%d, errno:%d\n",
-			 error, errno);
+			 "invalid associd error:%d, errno:%d\n", error, errno);
 
 	tst_resm(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) "
 		 "- one-to-many style invalid associd");
@@ -609,14 +600,14 @@
 	 * UDP-style socket with a valid associd.
 	 */
 	memset(&get_udp_assoc_dflt_param, 0, sizeof(struct sctp_sndrcvinfo));
-	get_udp_assoc_dflt_param.sinfo_assoc_id = udp_svr_associd ;
+	get_udp_assoc_dflt_param.sinfo_assoc_id = udp_svr_associd;
 	optlen = sizeof(get_udp_assoc_dflt_param);
 	test_getsockopt(udp_svr_sk, SCTP_DEFAULT_SEND_PARAM,
 			&get_udp_assoc_dflt_param, &optlen);
 
 	/* Verify that the get param matches the set param. */
 	if (get_udp_assoc_dflt_param.sinfo_ppid !=
-			set_udp_assoc_dflt_param.sinfo_ppid)
+	    set_udp_assoc_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -628,14 +619,14 @@
 	 * socket wide default parameters.
 	 */
 	memset(&get_udp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfo));
-	get_udp_sk_dflt_param.sinfo_assoc_id = 0 ;
+	get_udp_sk_dflt_param.sinfo_assoc_id = 0;
 	optlen = sizeof(get_udp_sk_dflt_param);
 	test_getsockopt(udp_clt_sk, SCTP_DEFAULT_SEND_PARAM,
 			&get_udp_sk_dflt_param, &optlen);
 
 	/* Verify that the get param matches the socket-wide set param. */
 	if (get_udp_sk_dflt_param.sinfo_ppid !=
-			set_udp_sk_dflt_param.sinfo_ppid)
+	    set_udp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -650,14 +641,14 @@
 	 */
 	memset(&get_peeloff_assoc_dflt_param, 0,
 	       sizeof(struct sctp_sndrcvinfo));
-	get_peeloff_assoc_dflt_param.sinfo_assoc_id = 0 ;
+	get_peeloff_assoc_dflt_param.sinfo_assoc_id = 0;
 	optlen = sizeof(get_peeloff_assoc_dflt_param);
 	test_getsockopt(peeloff_sk, SCTP_DEFAULT_SEND_PARAM,
 			&get_peeloff_assoc_dflt_param, &optlen);
 
 	/* Verify that the get param matches the association's set param. */
 	if (get_peeloff_assoc_dflt_param.sinfo_ppid !=
-			set_udp_assoc_dflt_param.sinfo_ppid)
+	    set_udp_assoc_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -670,8 +661,7 @@
 	/* Invalid assoc id, ignored on a TCP-style socket. */
 	set_tcp_sk_dflt_param.sinfo_assoc_id = 1234;
 	test_setsockopt(tcp_svr_sk, SCTP_DEFAULT_SEND_PARAM,
-			&set_tcp_sk_dflt_param,
-			sizeof(set_tcp_sk_dflt_param));
+			&set_tcp_sk_dflt_param, sizeof(set_tcp_sk_dflt_param));
 
 	/* Set default send parameters on the unconnected TCP-style sockets. */
 	memset(&set_tcp_sk_dflt_param, 0, sizeof(struct sctp_sndrcvinfo));
@@ -679,8 +669,7 @@
 	/* Invalid assoc id, ignored on a TCP-style socket. */
 	set_tcp_sk_dflt_param.sinfo_assoc_id = 1234;
 	test_setsockopt(tcp_clt_sk, SCTP_DEFAULT_SEND_PARAM,
-			&set_tcp_sk_dflt_param,
-			sizeof(set_tcp_sk_dflt_param));
+			&set_tcp_sk_dflt_param, sizeof(set_tcp_sk_dflt_param));
 
 	tst_resm(TPASS, "setsockopt(SCTP_DEFAULT_SEND_PARAM) - "
 		 "one-to-one style socket");
@@ -693,7 +682,7 @@
 
 	/* Verify that the get param matches set param. */
 	if (set_tcp_sk_dflt_param.sinfo_ppid !=
-			get_tcp_sk_dflt_param.sinfo_ppid)
+	    get_tcp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -705,7 +694,7 @@
 
 	/* Verify that the get param matches set param. */
 	if (set_tcp_sk_dflt_param.sinfo_ppid !=
-			get_tcp_sk_dflt_param.sinfo_ppid)
+	    get_tcp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -737,7 +726,7 @@
 			&get_tcp_assoc_dflt_param, &optlen);
 
 	if (set_tcp_assoc_dflt_param.sinfo_ppid !=
-			get_tcp_assoc_dflt_param.sinfo_ppid)
+	    get_tcp_assoc_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -751,9 +740,9 @@
 	 * set for the association, not the socket-wide param.
 	 */
 	if ((get_tcp_sk_dflt_param.sinfo_ppid ==
-			set_tcp_sk_dflt_param.sinfo_ppid) ||
+	     set_tcp_sk_dflt_param.sinfo_ppid) ||
 	    (get_tcp_sk_dflt_param.sinfo_ppid !=
-	    		set_tcp_assoc_dflt_param.sinfo_ppid))
+	     set_tcp_assoc_dflt_param.sinfo_ppid))
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -767,7 +756,7 @@
 	 * set param.
 	 */
 	if (get_tcp_sk_dflt_param.sinfo_ppid !=
-			set_tcp_sk_dflt_param.sinfo_ppid)
+	    set_tcp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -790,7 +779,7 @@
 	 * set param.
 	 */
 	if (get_tcp_sk_dflt_param.sinfo_ppid !=
-			set_tcp_sk_dflt_param.sinfo_ppid)
+	    set_tcp_sk_dflt_param.sinfo_ppid)
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DEFAULT_SEND_PARAM) "
 			 "mismatch.");
 
@@ -806,7 +795,7 @@
 	if ((-1 != error) || (EINVAL != errno))
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "null associd, null addr error:%d, errno:%d\n",
-			error, errno);
+			 error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - "
 		 "null associd and null addr");
@@ -820,7 +809,7 @@
 	if ((-1 != error) || (EINVAL != errno))
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "valid associd, null addr error:%d, errno:%d\n",
-			error, errno);
+			 error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - "
 		 "valid associd and null addr");
@@ -835,7 +824,7 @@
 	if ((-1 != error) || (EINVAL != errno))
 		tst_brkm(TBROK, NULL, "getsockopt(SCTP_GET_PEER_ADDR_INFO) "
 			 "valid associd, invalid addr error:%d, errno:%d\n",
-			error, errno);
+			 error, errno);
 
 	tst_resm(TPASS, "getsockopt(SCTP_GET_PEER_ADDR_INFO) - "
 		 "valid associd and invalid addr");
@@ -878,6 +867,6 @@
 	close(accept_sk);
 	close(peeloff_sk);
 
-        /* Indicate successful completion.  */
-      tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_tcp_style.c b/testcases/network/sctp/func_tests/test_tcp_style.c
index 33c200a..da0a5c6 100644
--- a/testcases/network/sctp/func_tests/test_tcp_style.c
+++ b/testcases/network/sctp/func_tests/test_tcp_style.c
@@ -57,8 +57,7 @@
 
 #define MAX_CLIENTS 10
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int clt_sk[MAX_CLIENTS], accept_sk[MAX_CLIENTS];
 	int listen_sk, clt2_sk, accept2_sk;
@@ -66,7 +65,7 @@
 	sockaddr_storage_t svr_loop, accept_loop, clt2_loop;
 	socklen_t addrlen;
 	int error, i;
-        char *message = "hello, world!\n";
+	char *message = "hello, world!\n";
 	char msgbuf[100];
 	int pf_class;
 	struct pollfd poll_fd;
@@ -81,7 +80,7 @@
 	char *big_buffer;
 	struct iovec iov;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -89,17 +88,17 @@
 	/* Initialize the server and client addresses. */
 #if TEST_V6
 	pf_class = PF_INET6;
-        svr_loop.v6.sin6_family = AF_INET6;
-        svr_loop.v6.sin6_addr = in6addr_loopback;
-        svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	svr_loop.v6.sin6_family = AF_INET6;
+	svr_loop.v6.sin6_addr = in6addr_loopback;
+	svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1);
 	for (i = 0; i < MAX_CLIENTS; i++) {
-        	clt_loop[i].v6.sin6_family = AF_INET6;
-        	clt_loop[i].v6.sin6_addr = in6addr_loopback;
-        	clt_loop[i].v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
+		clt_loop[i].v6.sin6_family = AF_INET6;
+		clt_loop[i].v6.sin6_addr = in6addr_loopback;
+		clt_loop[i].v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
 	}
-        clt2_loop.v6.sin6_family = AF_INET6;
-        clt2_loop.v6.sin6_addr = in6addr_loopback;
-        clt2_loop.v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
+	clt2_loop.v6.sin6_family = AF_INET6;
+	clt2_loop.v6.sin6_addr = in6addr_loopback;
+	clt2_loop.v6.sin6_port = htons(SCTP_TESTPORT_2 + i);
 #else
 	pf_class = PF_INET;
 	svr_loop.v4.sin_family = AF_INET;
@@ -116,11 +115,11 @@
 #endif
 
 	/* Create and bind the listening server socket.  */
-        listen_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
+	listen_sk = test_socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 	test_bind(listen_sk, &svr_loop.sa, sizeof(svr_loop));
 
 	/* Mark listen_sk as being able to accept new associations.  */
-	test_listen(listen_sk, MAX_CLIENTS-1);
+	test_listen(listen_sk, MAX_CLIENTS - 1);
 
 	/* Create and bind the client sockets.  */
 	for (i = 0; i < MAX_CLIENTS; i++) {
@@ -448,7 +447,7 @@
 	out_iov.iov_base = message;
 	out_iov.iov_len = strlen(message) + 1;
 	sinfo->sinfo_flags = 0;
-	test_sendmsg(clt2_sk, &outmessage, 0, strlen(message)+1);
+	test_sendmsg(clt2_sk, &outmessage, 0, strlen(message) + 1);
 
 	test_recv(accept2_sk, msgbuf, 100, 0);
 
@@ -458,6 +457,6 @@
 	close(accept2_sk);
 	close(listen_sk);
 
-        /* Indicate successful completion.  */
+	/* Indicate successful completion.  */
 	tst_exit();
 }
diff --git a/testcases/network/sctp/func_tests/test_timetolive.c b/testcases/network/sctp/func_tests/test_timetolive.c
index 16dc7a1..05f5bb6 100644
--- a/testcases/network/sctp/func_tests/test_timetolive.c
+++ b/testcases/network/sctp/func_tests/test_timetolive.c
@@ -83,23 +83,24 @@
 static char *fillmsg = NULL;
 static char *ttlmsg = "This should time out!\n";
 static char *nottlmsg = "This should NOT time out!\n";
-static char ttlfrag[SMALL_MAXSEG*3] = {0};
+static char ttlfrag[SMALL_MAXSEG * 3] = { 0 };
+
 static char *message = "Hello world\n";
 
 int main(int argc, char *argv[])
 {
-        int sk1, sk2;
-        sockaddr_storage_t loop1;
-        sockaddr_storage_t loop2;
-        struct iovec iov;
-        struct msghdr inmessage;
+	int sk1, sk2;
+	sockaddr_storage_t loop1;
+	sockaddr_storage_t loop2;
+	struct iovec iov;
+	struct msghdr inmessage;
 	struct msghdr outmessage;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct sctp_sndrcvinfo *sinfo;
-        struct iovec out_iov;
-        int error;
+	struct iovec out_iov;
+	int error;
 	int pf_class, af_family;
 	uint32_t ppid;
 	uint32_t stream;
@@ -109,11 +110,11 @@
 	char *big_buffer;
 	int offset;
 	struct sctp_send_failed *ssf;
-	socklen_t len; /* Really becomes 2xlen when set. */
+	socklen_t len;		/* Really becomes 2xlen when set. */
 	int orig_len;
 	struct sctp_status gstatus;
 
-        /* Rather than fflush() throughout the code, set stdout to
+	/* Rather than fflush() throughout the code, set stdout to
 	 * be unbuffered.
 	 */
 	setvbuf(stdout, NULL, _IONBF, 0);
@@ -123,36 +124,35 @@
 	pf_class = PF_INET6;
 	af_family = AF_INET6;
 
-        loop1.v6.sin6_family = AF_INET6;
-        loop1.v6.sin6_addr = in6addr_loopback;
-        loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
+	loop1.v6.sin6_family = AF_INET6;
+	loop1.v6.sin6_addr = in6addr_loopback;
+	loop1.v6.sin6_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v6.sin6_family = AF_INET6;
-        loop2.v6.sin6_addr = in6addr_loopback;
-        loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
+	loop2.v6.sin6_family = AF_INET6;
+	loop2.v6.sin6_addr = in6addr_loopback;
+	loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
 #else
 	pf_class = PF_INET;
 	af_family = AF_INET;
 
-        loop1.v4.sin_family = AF_INET;
-        loop1.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
+	loop1.v4.sin_family = AF_INET;
+	loop1.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop1.v4.sin_port = htons(SCTP_TESTPORT_1);
 
-        loop2.v4.sin_family = AF_INET;
-        loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
-        loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
+	loop2.v4.sin_family = AF_INET;
+	loop2.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
+	loop2.v4.sin_port = htons(SCTP_TESTPORT_2);
 #endif /* TEST_V6 */
 
-        /* Create the two endpoints which will talk to each other.  */
-        sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
-        sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	/* Create the two endpoints which will talk to each other.  */
+	sk1 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
+	sk2 = test_socket(pf_class, SOCK_SEQPACKET, IPPROTO_SCTP);
 
 	len = sizeof(int);
-	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &orig_len,
-			   &len);
+	error = getsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &orig_len, &len);
 	if (error)
 		tst_brkm(TBROK, NULL, "can't get rcvbuf size: %s",
-			strerror(errno));
+			 strerror(errno));
 	/* Set the MAXSEG to something smallish. */
 	{
 		int val = SMALL_MAXSEG;
@@ -166,9 +166,9 @@
 	test_setsockopt(sk1, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 	test_setsockopt(sk2, SCTP_EVENTS, &subscribe, sizeof(subscribe));
 
-        /* Bind these sockets to the test ports.  */
-        test_bind(sk1, &loop1.sa, sizeof(loop1));
-        test_bind(sk2, &loop2.sa, sizeof(loop2));
+	/* Bind these sockets to the test ports.  */
+	test_bind(sk1, &loop1.sa, sizeof(loop1));
+	test_bind(sk2, &loop2.sa, sizeof(loop2));
 
 	/*
 	 * This code sets the associations RWND very small so we can
@@ -180,23 +180,22 @@
 	 *    receiving later data
 	 */
 	len = SMALL_RCVBUF;
-	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &len,
-			   sizeof(len));
+	error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len));
 	if (error)
 		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
 			 strerror(errno));
 
-       /* Mark sk2 as being able to accept new associations.  */
+	/* Mark sk2 as being able to accept new associations.  */
 	test_listen(sk2, 1);
 
-        /* Send the first message.  This will create the association.  */
-        outmessage.msg_name = &loop2;
-        outmessage.msg_namelen = sizeof(loop2);
-        outmessage.msg_iov = &out_iov;
-        outmessage.msg_iovlen = 1;
-        outmessage.msg_control = outcmsg;
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	/* Send the first message.  This will create the association.  */
+	outmessage.msg_name = &loop2;
+	outmessage.msg_namelen = sizeof(loop2);
+	outmessage.msg_iov = &out_iov;
+	outmessage.msg_iovlen = 1;
+	outmessage.msg_control = outcmsg;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -204,35 +203,35 @@
 	outmessage.msg_controllen = cmsg->cmsg_len;
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
-	ppid = rand(); /* Choose an arbitrary value. */
+	ppid = rand();		/* Choose an arbitrary value. */
 	stream = 1;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-        outmessage.msg_iov->iov_base = message;
-        outmessage.msg_iov->iov_len = strlen(message) + 1;
-        test_sendmsg(sk1, &outmessage, 0, strlen(message)+1);
+	outmessage.msg_iov->iov_base = message;
+	outmessage.msg_iov->iov_len = strlen(message) + 1;
+	test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
-        memset(&inmessage, 0, sizeof(inmessage));
-        iov.iov_base = big_buffer;
-        iov.iov_len = REALLY_BIG;
-        inmessage.msg_iov = &iov;
-        inmessage.msg_iovlen = 1;
-        inmessage.msg_control = incmsg;
+	memset(&inmessage, 0, sizeof(inmessage));
+	iov.iov_base = big_buffer;
+	iov.iov_len = REALLY_BIG;
+	inmessage.msg_iov = &iov;
+	inmessage.msg_iovlen = 1;
+	inmessage.msg_control = incmsg;
 
-        /* Get the communication up message on sk2.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk2.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd2 = sac->sac_assoc_id;
 
-        /* Get the communication up message on sk1.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
+	/* Get the communication up message on sk1.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
@@ -245,30 +244,30 @@
 
 	if (error)
 		tst_brkm(TBROK, NULL, "setsockopt(SO_RCVBUF): %s",
-			strerror(errno));
+			 strerror(errno));
 
-        /* Get the first data message which was sent.  */
-        inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
-        test_check_msg_data(&inmessage, error, strlen(message) + 1,
+	/* Get the first data message which was sent.  */
+	inmessage.msg_controllen = sizeof(incmsg);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	test_check_msg_data(&inmessage, error, strlen(message) + 1,
 			    MSG_EOR, stream, ppid);
 
 	/* Figure out how big to make our fillmsg */
 	len = sizeof(struct sctp_status);
-	memset(&gstatus,0,sizeof(struct sctp_status));
+	memset(&gstatus, 0, sizeof(struct sctp_status));
 	gstatus.sstat_assoc_id = associd1;
 	error = getsockopt(sk1, IPPROTO_SCTP, SCTP_STATUS, &gstatus, &len);
 
 	if (error)
 		tst_brkm(TBROK, NULL, "can't get rwnd size: %s",
-			strerror(errno));
+			 strerror(errno));
 	tst_resm(TINFO, "Creating fillmsg of size %d",
-		 gstatus.sstat_rwnd+RWND_SLOP);
-	fillmsg = malloc(gstatus.sstat_rwnd+RWND_SLOP);
+		 gstatus.sstat_rwnd + RWND_SLOP);
+	fillmsg = malloc(gstatus.sstat_rwnd + RWND_SLOP);
 
 	/* Send a fillmsg */
-        outmessage.msg_controllen = sizeof(outcmsg);
-        outmessage.msg_flags = 0;
+	outmessage.msg_controllen = sizeof(outcmsg);
+	outmessage.msg_flags = 0;
 	cmsg = CMSG_FIRSTHDR(&outmessage);
 	cmsg->cmsg_level = IPPROTO_SCTP;
 	cmsg->cmsg_type = SCTP_SNDRCV;
@@ -280,22 +279,22 @@
 	stream++;
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
-	memset(fillmsg, 'X', gstatus.sstat_rwnd+RWND_SLOP);
-	fillmsg[gstatus.sstat_rwnd+RWND_SLOP-1] = '\0';
+	memset(fillmsg, 'X', gstatus.sstat_rwnd + RWND_SLOP);
+	fillmsg[gstatus.sstat_rwnd + RWND_SLOP - 1] = '\0';
 	outmessage.msg_iov->iov_base = fillmsg;
-	outmessage.msg_iov->iov_len = gstatus.sstat_rwnd+RWND_SLOP;
+	outmessage.msg_iov->iov_len = gstatus.sstat_rwnd + RWND_SLOP;
 	outmessage.msg_name = NULL;
 	outmessage.msg_namelen = 0;
 	sinfo->sinfo_assoc_id = associd1;
 	sinfo->sinfo_timetolive = 0;
 	test_sendmsg(sk1, &outmessage, MSG_NOSIGNAL,
-			 gstatus.sstat_rwnd+RWND_SLOP);
+		     gstatus.sstat_rwnd + RWND_SLOP);
 
 	/* Now send the message with timeout. */
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	outmessage.msg_iov->iov_base = ttlmsg;
-        outmessage.msg_iov->iov_len = strlen(ttlmsg) + 1;
+	outmessage.msg_iov->iov_len = strlen(ttlmsg) + 1;
 	outmessage.msg_name = NULL;
 	outmessage.msg_namelen = 0;
 	sinfo->sinfo_assoc_id = associd1;
@@ -308,12 +307,12 @@
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	outmessage.msg_iov->iov_base = nottlmsg;
-        outmessage.msg_iov->iov_len = strlen(nottlmsg) + 1;
+	outmessage.msg_iov->iov_len = strlen(nottlmsg) + 1;
 	outmessage.msg_name = NULL;
 	outmessage.msg_namelen = 0;
 	sinfo->sinfo_assoc_id = associd1;
 	sinfo->sinfo_timetolive = 0;
-	test_sendmsg(sk1, &outmessage, MSG_NOSIGNAL, strlen(nottlmsg)+1);
+	test_sendmsg(sk1, &outmessage, MSG_NOSIGNAL, strlen(nottlmsg) + 1);
 
 	tst_resm(TPASS, "Send a message with no timeout");
 
@@ -321,9 +320,9 @@
 	sinfo->sinfo_ppid = ppid;
 	sinfo->sinfo_stream = stream;
 	memset(ttlfrag, '0', sizeof(ttlfrag));
-	ttlfrag[sizeof(ttlfrag)-1] = '\0';
+	ttlfrag[sizeof(ttlfrag) - 1] = '\0';
 	outmessage.msg_iov->iov_base = ttlfrag;
-        outmessage.msg_iov->iov_len = sizeof(ttlfrag);
+	outmessage.msg_iov->iov_len = sizeof(ttlfrag);
 	outmessage.msg_name = NULL;
 	outmessage.msg_namelen = 0;
 	sinfo->sinfo_assoc_id = associd1;
@@ -347,7 +346,7 @@
 	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_data(&inmessage, error, strlen(nottlmsg) + 1,
 			    MSG_EOR, stream, ppid);
-	if (0 != strncmp(iov.iov_base, nottlmsg, strlen(nottlmsg)+1))
+	if (0 != strncmp(iov.iov_base, nottlmsg, strlen(nottlmsg) + 1))
 		tst_brkm(TBROK, NULL, "Received Wrong Message !!!");
 
 	tst_resm(TPASS, "Receive message with no timeout");
@@ -359,8 +358,7 @@
 	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_send_failed) +
-							strlen(ttlmsg) + 1,
-				    SCTP_SEND_FAILED, 0);
+				    strlen(ttlmsg) + 1, SCTP_SEND_FAILED, 0);
 	ssf = (struct sctp_send_failed *)iov.iov_base;
 	if (0 != strncmp(ttlmsg, (char *)ssf->ssf_data, strlen(ttlmsg) + 1))
 		tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
@@ -376,30 +374,29 @@
 		error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 		test_check_msg_notification(&inmessage, error,
 					    sizeof(struct sctp_send_failed) +
-								  SMALL_MAXSEG,
-					    SCTP_SEND_FAILED, 0);
+					    SMALL_MAXSEG, SCTP_SEND_FAILED, 0);
 		ssf = (struct sctp_send_failed *)iov.iov_base;
 		if (0 != strncmp(&ttlfrag[offset], (char *)ssf->ssf_data,
 				 SMALL_MAXSEG))
 			tst_brkm(TBROK, NULL, "SEND_FAILED data mismatch");
 		offset += SMALL_MAXSEG;
-	} while (!(ssf->ssf_info.sinfo_flags & 0x01)); /* LAST_FRAG */
+	} while (!(ssf->ssf_info.sinfo_flags & 0x01));	/* LAST_FRAG */
 
 	tst_resm(TPASS, "Receive SEND_FAILED for fragmented message with "
 		 "timeout");
 
-        /* Shut down the link.  */
-        close(sk1);
+	/* Shut down the link.  */
+	close(sk1);
 
-        /* Get the shutdown complete notification. */
+	/* Get the shutdown complete notification. */
 	inmessage.msg_controllen = sizeof(incmsg);
-        error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
+	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_SHUTDOWN_COMP);
 
-        close(sk2);
+	close(sk2);
 
-        /* Indicate successful completion.  */
-      tst_exit();
+	/* Indicate successful completion.  */
+	tst_exit();
 }
diff --git a/testcases/network/sctp/lib/addrs.c b/testcases/network/sctp/lib/addrs.c
index 1b64f2d..184335c 100644
--- a/testcases/network/sctp/lib/addrs.c
+++ b/testcases/network/sctp/lib/addrs.c
@@ -68,7 +68,7 @@
 
 	return getaddrs.addr_num;
 
-} /* sctp_getaddrs_old() */
+}				/* sctp_getaddrs_old() */
 
 /*
  * Common getsockopt() layer
@@ -82,9 +82,10 @@
 {
 	int cnt, err;
 	socklen_t len;
-	size_t bufsize = 4096; /*enough for most cases*/
+	size_t bufsize = 4096;	/*enough for most cases */
 
-	struct sctp_getaddrs *getaddrs = (struct sctp_getaddrs*)malloc(bufsize);
+	struct sctp_getaddrs *getaddrs =
+	    (struct sctp_getaddrs *)malloc(bufsize);
 	if (!getaddrs)
 		return -1;
 
@@ -95,91 +96,85 @@
 		getaddrs->assoc_id = id;
 		err = getsockopt(sd, SOL_SCTP, optname_new, getaddrs, &len);
 		if (err == 0) {
-			/*got it*/
+			/*got it */
 			break;
 		}
 		if (errno == ENOPROTOOPT) {
-			/*Kernel does not support new API*/
+			/*Kernel does not support new API */
 			free(getaddrs);
 			return sctp_getaddrs_old(sd, id,
 						 optname_num_old, optname_old,
 						 addrs);
 		}
 		if (errno != ENOMEM) {
-			/*unknown error*/
+			/*unknown error */
 			return -1;
 		}
-		/*expand buffer*/
-		if (bufsize > 128*1024) {
-			/*this is getting ridiculous*/
+		/*expand buffer */
+		if (bufsize > 128 * 1024) {
+			/*this is getting ridiculous */
 			free(getaddrs);
 			errno = ENOBUFS;
 			return -1;
 		}
-		new_buf = realloc(getaddrs, bufsize+4096);
+		new_buf = realloc(getaddrs, bufsize + 4096);
 		if (!new_buf) {
 			free(getaddrs);
 			return -1;
 		}
 		bufsize += 4096;
-		getaddrs = (struct sctp_getaddrs*)new_buf;
+		getaddrs = (struct sctp_getaddrs *)new_buf;
 	}
 
 	/* we skip traversing the list, allocating a new buffer etc. and enjoy
 	 * a simple hack*/
 	cnt = getaddrs->addr_num;
 	memmove(getaddrs, getaddrs + 1, len - sizeof(struct sctp_getaddrs));
-	*addrs = (struct sockaddr*)getaddrs;
+	*addrs = (struct sockaddr *)getaddrs;
 
 	return cnt;
-} /* sctp_getaddrs() */
+}				/* sctp_getaddrs() */
 
 /* Get all peer address on a socket.  This is a new SCTP API
  * described in the section 8.3 of the Sockets API Extensions for SCTP.
  * This is implemented using the getsockopt() interface.
  */
-int
-sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **addrs)
+int sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **addrs)
 {
 	return sctp_getaddrs(sd, id,
 			     SCTP_GET_PEER_ADDRS,
 			     SCTP_GET_PEER_ADDRS_NUM_OLD,
-			     SCTP_GET_PEER_ADDRS_OLD,
-			     addrs);
-} /* sctp_getpaddrs() */
+			     SCTP_GET_PEER_ADDRS_OLD, addrs);
+}				/* sctp_getpaddrs() */
 
 /* Frees all resources allocated by sctp_getpaddrs().  This is a new SCTP API
  * described in the section 8.4 of the Sockets API Extensions for SCTP.
  */
-int
-sctp_freepaddrs(struct sockaddr *addrs)
+int sctp_freepaddrs(struct sockaddr *addrs)
 {
 	free(addrs);
 	return 0;
 
-} /* sctp_freepaddrs() */
+}				/* sctp_freepaddrs() */
 
 /* Get all locally bound address on a socket.  This is a new SCTP API
  * described in the section 8.5 of the Sockets API Extensions for SCTP.
  * This is implemented using the getsockopt() interface.
  */
-int
-sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **addrs)
+int sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **addrs)
 {
 	return sctp_getaddrs(sd, id,
 			     SCTP_GET_LOCAL_ADDRS,
 			     SCTP_GET_LOCAL_ADDRS_NUM_OLD,
-			     SCTP_GET_LOCAL_ADDRS_OLD,
-			     addrs);
-} /* sctp_getladdrs() */
+			     SCTP_GET_LOCAL_ADDRS_OLD, addrs);
+}				/* sctp_getladdrs() */
 
 /* Frees all resources allocated by sctp_getladdrs().  This is a new SCTP API
  * described in the section 8.6 of the Sockets API Extensions for SCTP.
  */
-int
-sctp_freeladdrs(struct sockaddr *addrs)
+int sctp_freeladdrs(struct sockaddr *addrs)
 {
 	free(addrs);
 	return 0;
 
-} /* sctp_freeladdrs() */
+}				/* sctp_freeladdrs() */
diff --git a/testcases/network/sctp/lib/bindx.c b/testcases/network/sctp/lib/bindx.c
index 92f58cd..b89b31e 100644
--- a/testcases/network/sctp/lib/bindx.c
+++ b/testcases/network/sctp/lib/bindx.c
@@ -23,9 +23,9 @@
  *   Sridhar Samudrala     <sri@us.ibm.com>
  */
 
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
 #include <netinet/in.h>
-#include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */
+#include <netinet/sctp.h>	/* SCTP_SOCKOPT_BINDX_* */
 #include <errno.h>
 
 /* Support the sctp_bindx() interface.
@@ -35,8 +35,7 @@
  * Instead of implementing through a socket call in sys_socketcall(),
  * tunnel the request through setsockopt().
  */
-int
-sctp_bindx(int fd, struct sockaddr *addrs, int addrcnt, int flags)
+int sctp_bindx(int fd, struct sockaddr *addrs, int addrcnt, int flags)
 {
 	int setsock_option = 0;
 	void *addrbuf;
diff --git a/testcases/network/sctp/lib/connectx.c b/testcases/network/sctp/lib/connectx.c
index 84bdddb..5a56623 100644
--- a/testcases/network/sctp/lib/connectx.c
+++ b/testcases/network/sctp/lib/connectx.c
@@ -19,9 +19,9 @@
  *   Frank Filz     <ffilz@us.ibm.com>
  */
 
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
 #include <netinet/in.h>
-#include <netinet/sctp.h> /* SCTP_SOCKOPT_CONNECTX_* */
+#include <netinet/sctp.h>	/* SCTP_SOCKOPT_CONNECTX_* */
 #include <errno.h>
 
 /* Support the sctp_connectx() interface.
@@ -31,8 +31,7 @@
  * Instead of implementing through a socket call in sys_socketcall(),
  * tunnel the request through setsockopt().
  */
-int
-sctp_connectx(int fd, struct sockaddr *addrs, int addrcnt)
+int sctp_connectx(int fd, struct sockaddr *addrs, int addrcnt)
 {
 	void *addrbuf;
 	struct sockaddr *sa_addr;
@@ -57,5 +56,6 @@
 		}
 	}
 
-	return setsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX, addrs, addrs_size);
+	return setsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX, addrs,
+			  addrs_size);
 }
diff --git a/testcases/network/sctp/lib/opt_info.c b/testcases/network/sctp/lib/opt_info.c
index 254f7c4..ba765ce 100644
--- a/testcases/network/sctp/lib/opt_info.c
+++ b/testcases/network/sctp/lib/opt_info.c
@@ -20,8 +20,8 @@
  *   Ardelle Fan <ardelle.fan@intel.com>
  */
 
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
-#include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
+#include <netinet/sctp.h>	/* SCTP_SOCKOPT_BINDX_* */
 #include <errno.h>
 
 /* Support the sctp_opt_info() interface.
@@ -32,8 +32,7 @@
  * This is a new SCTP API described in the section 7 of the Sockets API
  * Extensions for SCTP. This is implemented using the getsockopt() interface.
  */
-int
-sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t *size)
+int sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t * size)
 {
 	switch (opt) {
 	case SCTP_RTOINFO:
@@ -50,10 +49,10 @@
 	case SCTP_MAXSEG:
 	case SCTP_STATUS:
 	case SCTP_GET_PEER_ADDR_INFO:
-		*(sctp_assoc_t *)arg = id;
+		*(sctp_assoc_t *) arg = id;
 		return getsockopt(sd, IPPROTO_SCTP, opt, arg, size);
 	default:
 		return ENOTSUP;
 	}
 
-} /* sctp_opt_info() */
+}				/* sctp_opt_info() */
diff --git a/testcases/network/sctp/lib/peeloff.c b/testcases/network/sctp/lib/peeloff.c
index 5d15549..04fe9bc 100644
--- a/testcases/network/sctp/lib/peeloff.c
+++ b/testcases/network/sctp/lib/peeloff.c
@@ -19,16 +19,15 @@
  *  Sridhar Samudrala     <sri@us.ibm.com>
  */
 
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
-#include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
+#include <netinet/sctp.h>	/* SCTP_SOCKOPT_BINDX_* */
 #include <errno.h>
 
 /* Branch off an association into a seperate socket.  This is a new SCTP API
  * described in the section 8.2 of the Sockets API Extensions for SCTP.
  * This is implemented using the getsockopt() interface.
  */
-int
-sctp_peeloff(int fd, sctp_assoc_t associd)
+int sctp_peeloff(int fd, sctp_assoc_t associd)
 {
 	sctp_peeloff_arg_t peeloff;
 	socklen_t peeloff_size = sizeof(peeloff);
@@ -44,4 +43,4 @@
 
 	return peeloff.sd;
 
-} /* sctp_peeloff() */
+}				/* sctp_peeloff() */
diff --git a/testcases/network/sctp/lib/recvmsg.c b/testcases/network/sctp/lib/recvmsg.c
index f7a0fb2..4efffae 100644
--- a/testcases/network/sctp/lib/recvmsg.c
+++ b/testcases/network/sctp/lib/recvmsg.c
@@ -49,11 +49,11 @@
 
 #include <string.h>
 #include <errno.h>
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
 #include <netinet/sctp.h>
 
 int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
-		 socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo,
+		 socklen_t * fromlen, struct sctp_sndrcvinfo *sinfo,
 		 int *msg_flags)
 {
 	int error;
@@ -62,7 +62,7 @@
 	char incmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg = NULL;
 
-	memset(&inmsg, 0, sizeof (inmsg));
+	memset(&inmsg, 0, sizeof(inmsg));
 
 	iov.iov_base = msg;
 	iov.iov_len = len;
@@ -87,13 +87,13 @@
 		return error;
 
 	for (cmsg = CMSG_FIRSTHDR(&inmsg); cmsg != NULL;
-				 cmsg = CMSG_NXTHDR(&inmsg, cmsg)) {
+	     cmsg = CMSG_NXTHDR(&inmsg, cmsg)) {
 		if ((IPPROTO_SCTP == cmsg->cmsg_level) &&
 		    (SCTP_SNDRCV == cmsg->cmsg_type))
 			break;
 	}
 
-        /* Copy sinfo. */
+	/* Copy sinfo. */
 	if (cmsg)
 		memcpy(sinfo, CMSG_DATA(cmsg), sizeof(struct sctp_sndrcvinfo));
 
diff --git a/testcases/network/sctp/lib/sendmsg.c b/testcases/network/sctp/lib/sendmsg.c
index d566781..82d98f5 100644
--- a/testcases/network/sctp/lib/sendmsg.c
+++ b/testcases/network/sctp/lib/sendmsg.c
@@ -20,7 +20,7 @@
  */
 
 #include <string.h>
-#include <sys/socket.h>   /* struct sockaddr_storage, setsockopt() */
+#include <sys/socket.h>		/* struct sockaddr_storage, setsockopt() */
 #include <netinet/sctp.h>
 
 /* This library function assists the user with the advanced features
@@ -72,7 +72,7 @@
  */
 int
 sctp_send(int s, const void *msg, size_t len,
-          const struct sctp_sndrcvinfo *sinfo, int flags)
+	  const struct sctp_sndrcvinfo *sinfo, int flags)
 {
 	struct msghdr outmsg;
 	struct iovec iov;
diff --git a/testcases/network/sctp/testlib/sctputil.c b/testcases/network/sctp/testlib/sctputil.c
index b9e512f..26c9203 100644
--- a/testcases/network/sctp/testlib/sctputil.c
+++ b/testcases/network/sctp/testlib/sctputil.c
@@ -54,10 +54,9 @@
 #include "sctputil.h"
 
 /* This function prints the cmsg data. */
-void
-test_print_cmsg(sctp_cmsg_t type, sctp_cmsg_data_t *data)
+void test_print_cmsg(sctp_cmsg_t type, sctp_cmsg_data_t * data)
 {
-	switch(type) {
+	switch (type) {
 	case SCTP_INIT:
 		printf("INIT\n");
 		printf("   sinit_num_ostreams %d\n",
@@ -72,13 +71,13 @@
 		break;
 	case SCTP_SNDRCV:
 		printf("SNDRCV\n");
-		printf("   sinfo_stream %u\n",	data->sndrcv.sinfo_stream);
-		printf("   sinfo_ssn %u\n",	data->sndrcv.sinfo_ssn);
-		printf("   sinfo_flags 0x%x\n",	data->sndrcv.sinfo_flags);
-		printf("   sinfo_ppid %u\n",	data->sndrcv.sinfo_ppid);
-		printf("   sinfo_context %x\n",	data->sndrcv.sinfo_context);
-		printf("   sinfo_tsn     %u\n",    data->sndrcv.sinfo_tsn);
-		printf("   sinfo_cumtsn  %u\n",    data->sndrcv.sinfo_cumtsn);
+		printf("   sinfo_stream %u\n", data->sndrcv.sinfo_stream);
+		printf("   sinfo_ssn %u\n", data->sndrcv.sinfo_ssn);
+		printf("   sinfo_flags 0x%x\n", data->sndrcv.sinfo_flags);
+		printf("   sinfo_ppid %u\n", data->sndrcv.sinfo_ppid);
+		printf("   sinfo_context %x\n", data->sndrcv.sinfo_context);
+		printf("   sinfo_tsn     %u\n", data->sndrcv.sinfo_tsn);
+		printf("   sinfo_cumtsn  %u\n", data->sndrcv.sinfo_cumtsn);
 		printf("   sinfo_assoc_id  %u\n", data->sndrcv.sinfo_assoc_id);
 
 		break;
@@ -90,8 +89,7 @@
 }
 
 /* This function prints the message. */
-void
-test_print_message(int sk, struct msghdr *msg, size_t msg_len)
+void test_print_message(int sk, struct msghdr *msg, size_t msg_len)
 {
 	sctp_cmsg_data_t *data;
 	struct cmsghdr *cmsg;
@@ -101,10 +99,9 @@
 	union sctp_notification *sn;
 
 	for (cmsg = CMSG_FIRSTHDR(msg);
-	     cmsg != NULL;
-	     cmsg = CMSG_NXTHDR(msg, cmsg)) {
-		     data = (sctp_cmsg_data_t *)CMSG_DATA(cmsg);
-		     test_print_cmsg(cmsg->cmsg_type, data);
+	     cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) {
+		data = (sctp_cmsg_data_t *) CMSG_DATA(cmsg);
+		test_print_cmsg(cmsg->cmsg_type, data);
 	}
 
 	if (!(MSG_NOTIFICATION & msg->msg_flags)) {
@@ -120,21 +117,26 @@
 			text = msg->msg_iov[index].iov_base;
 			len = msg->msg_iov[index].iov_len;
 
-                        save = text[msg_len-1];
+			save = text[msg_len - 1];
 			if (len > msg_len) {
-                                text[(len = msg_len) - 1] = '\0';
-                        }
+				text[(len = msg_len) - 1] = '\0';
+			}
 
-			if ((msg_len -= len) > 0) { index++; }
+			if ((msg_len -= len) > 0) {
+				index++;
+			}
 
 			for (i = 0; i < len - 1; ++i) {
-                                if (!isprint(text[i])) text[i] = '.';
-                        }
+				if (!isprint(text[i]))
+					text[i] = '.';
+			}
 
 			printf("%s", text);
-			text[msg_len-1] = save;
+			text[msg_len - 1] = save;
 
-			if ((done = !strcmp(text, "exit"))) { break; }
+			if ((done = !strcmp(text, "exit"))) {
+				break;
+			}
 		}
 	} else {
 		printf("NOTIFICATION: ");
@@ -197,14 +199,14 @@
 	if (sn->sn_header.sn_type != expected_sn_type)
 		tst_brkm(TBROK, NULL, "Unexpected notification:%d "
 			 "expected:%d", sn->sn_header.sn_type,
-			  expected_sn_type);
+			 expected_sn_type);
 
-	switch(sn->sn_header.sn_type) {
+	switch (sn->sn_header.sn_type) {
 	case SCTP_ASSOC_CHANGE:
 		if (sn->sn_assoc_change.sac_state != expected_additional)
 			tst_brkm(TBROK, NULL, "Unexpected sac_state:%d "
 				 "expected:%d", sn->sn_assoc_change.sac_state,
-				  expected_additional);
+				 expected_additional);
 		break;
 	default:
 		break;
@@ -278,11 +280,11 @@
 
 	/* Receive auxiliary data in msgh. */
 	for (cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL;
-				 cmsg = CMSG_NXTHDR(msg, cmsg)) {
+	     cmsg = CMSG_NXTHDR(msg, cmsg)) {
 		if (IPPROTO_SCTP == cmsg->cmsg_level &&
 		    SCTP_SNDRCV == cmsg->cmsg_type)
 			break;
-	} /* for (all cmsgs) */
+	}			/* for (all cmsgs) */
 
 	if ((!cmsg) ||
 	    (cmsg->cmsg_len < CMSG_LEN(sizeof(struct sctp_sndrcvinfo))))
@@ -297,13 +299,12 @@
 }
 
 /* Allocate a buffer of requested len and fill in with data. */
-void *
-test_build_msg(int len)
+void *test_build_msg(int len)
 {
 	int i = len - 1;
 	int n;
 	unsigned char msg[] =
-		"012345678901234567890123456789012345678901234567890";
+	    "012345678901234567890123456789012345678901234567890";
 	char *msg_buf, *p;
 
 	msg_buf = (char *)malloc(len);
@@ -313,15 +314,15 @@
 	p = msg_buf;
 
 	do {
-		n = ((i > 50)?50:i);
-		memcpy(p, msg, ((i > 50)?50:i));
+		n = ((i > 50) ? 50 : i);
+		memcpy(p, msg, ((i > 50) ? 50 : i));
 		p += n;
 		i -= n;
 	} while (i > 0);
 
-	msg_buf[len-1] = '\0';
+	msg_buf[len - 1] = '\0';
 
-	return(msg_buf);
+	return (msg_buf);
 }
 
 /* Enable ASSOC_CHANGE and SNDRCVINFO notifications. */
@@ -332,11 +333,10 @@
 	memset(&subscribe, 0, sizeof(subscribe));
 	subscribe.sctp_data_io_event = 1;
 	subscribe.sctp_association_event = 1;
-	test_setsockopt(fd, SCTP_EVENTS, (char *)&subscribe,
-		        sizeof(subscribe));
+	test_setsockopt(fd, SCTP_EVENTS, (char *)&subscribe, sizeof(subscribe));
 }
 
-static int cmp_addr(sockaddr_storage_t *addr1, sockaddr_storage_t *addr2)
+static int cmp_addr(sockaddr_storage_t * addr1, sockaddr_storage_t * addr2)
 {
 	if (addr1->sa.sa_family != addr2->sa.sa_family)
 		return 0;
@@ -359,14 +359,15 @@
 }
 
 /* Test peer addresses for association. */
-int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t *peers, int count)
+int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t * peers,
+		   int count)
 {
 	struct sockaddr *addrs;
 	int error, i, j;
 	struct sockaddr *sa_addr;
 	socklen_t addrs_size = 0;
 	void *addrbuf;
-	char *found = (char *) malloc(count);
+	char *found = (char *)malloc(count);
 	memset(found, 0, count);
 
 	error = sctp_getpaddrs(sk, asoc, &addrs);
@@ -394,11 +395,12 @@
 		default:
 			errno = EINVAL;
 			sctp_freepaddrs(addrs);
-			tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s", strerror(errno));
+			tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s",
+				 strerror(errno));
 			return -1;
 		}
 		for (j = 0; j < count; j++) {
-			if (cmp_addr((sockaddr_storage_t *)sa_addr,
+			if (cmp_addr((sockaddr_storage_t *) sa_addr,
 				     &peers[j]) == 0) {
 				found[j] = 1;
 			}
diff --git a/testcases/network/sockets/ltpClient.c b/testcases/network/sockets/ltpClient.c
index ba04a7c..b4754a3 100644
--- a/testcases/network/sockets/ltpClient.c
+++ b/testcases/network/sockets/ltpClient.c
@@ -50,28 +50,27 @@
 #define TIMETOLIVE              10
 #define PACKETSIZE	            64
 #define NET_ERROR               -1
-#define PACKET_LEN              1024  /* 1K should be plenty */
+#define PACKET_LEN              1024	/* 1K should be plenty */
 #define TRUE                    1
 #define FALSE                   0
 
-struct protoent   *protocol = NULL;
+struct protoent *protocol = NULL;
 
-struct packet
-{
+struct packet {
 	struct icmphdr hdr;
-	char msg[PACKETSIZE-sizeof(struct icmphdr)];
+	char msg[PACKETSIZE - sizeof(struct icmphdr)];
 };
 
 /*
 *   Function Prototypes
 */
-int ltp_run_ping_tests        (char * hostName);
-int ltp_run_traceroute_tests  (char * hostName);
-void ping_network             (struct sockaddr_in *rawAddr, int pid);
-void output_to_display        (void *netPacket, int bytes, int pid);
-unsigned short checksum       (void *netPacket, int len);
-int network_listener          (char * hostname, int pid);
-void ltp_traceroute           (struct sockaddr_in *rawTraceAddr, char * hostName, int pid);
+int ltp_run_ping_tests(char *hostName);
+int ltp_run_traceroute_tests(char *hostName);
+void ping_network(struct sockaddr_in *rawAddr, int pid);
+void output_to_display(void *netPacket, int bytes, int pid);
+unsigned short checksum(void *netPacket, int len);
+int network_listener(char *hostname, int pid);
+void ltp_traceroute(struct sockaddr_in *rawTraceAddr, char *hostName, int pid);
 
 /*******************************************************************
 *  Function: Main
@@ -82,201 +81,221 @@
 *       Once those tests complete, the ping and then traceroute tests will run.
 *
 ********************************************************************/
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 
-    int udpSocketHandle,
-        tcpSocketHandle,
-        mcastSocketHandle,
-        rc, i;
+	int udpSocketHandle, tcpSocketHandle, mcastSocketHandle, rc, i;
 
-    struct sockaddr_in   udpClientAddr,
-                         udpRemoteServerAddr,
-                         tcpClientAddr,
-                         tcpRemoteServerAddr,
-                         mcastClientAddr,
-                         mcastRemoteServerAddr;
+	struct sockaddr_in udpClientAddr,
+	    udpRemoteServerAddr,
+	    tcpClientAddr,
+	    tcpRemoteServerAddr, mcastClientAddr, mcastRemoteServerAddr;
 
-    struct hostent *hostEntry;
+	struct hostent *hostEntry;
 
-    char   hostName [MAX_MSG_LEN],
-           progName [MAX_MSG_LEN],
-           traceName [MAX_MSG_LEN],
-           multiCast = TRUE;
+	char hostName[MAX_MSG_LEN],
+	    progName[MAX_MSG_LEN], traceName[MAX_MSG_LEN], multiCast = TRUE;
 
-    unsigned char ttl = 1;
+	unsigned char ttl = 1;
 
-    mcastSocketHandle = -1;
+	mcastSocketHandle = -1;
 
-    /* check command line args */
-    if (argc < 4) {
-        printf("usage :<server-hostname> <trace-hostName> <data1> ... <dataN> \n");
-        exit(1);
-    }
+	/* check command line args */
+	if (argc < 4) {
+		printf
+		    ("usage :<server-hostname> <trace-hostName> <data1> ... <dataN> \n");
+		exit(1);
+	}
 
-    strncpy(progName, argv[0], MAX_MSG_LEN);
-    strncpy(hostName, argv[1], MAX_MSG_LEN);
-    strncpy(traceName, argv[2], MAX_MSG_LEN);
+	strncpy(progName, argv[0], MAX_MSG_LEN);
+	strncpy(hostName, argv[1], MAX_MSG_LEN);
+	strncpy(traceName, argv[2], MAX_MSG_LEN);
 
-    /* get server IP address (no check if input is IP address or DNS name */
-    hostEntry = gethostbyname(hostName);
+	/* get server IP address (no check if input is IP address or DNS name */
+	hostEntry = gethostbyname(hostName);
 
-    if (hostEntry == NULL) {
-        printf("%s: unknown host passed'%s' \n", progName, hostName);
-        exit(1);
-    }
+	if (hostEntry == NULL) {
+		printf("%s: unknown host passed'%s' \n", progName, hostName);
+		exit(1);
+	}
 
-    printf("%s: sending data to '%s' (IP : %s) \n", progName, hostEntry->h_name,
-           inet_ntoa(*(struct in_addr *)hostEntry->h_addr_list[0]));
+	printf("%s: sending data to '%s' (IP : %s) \n", progName,
+	       hostEntry->h_name,
+	       inet_ntoa(*(struct in_addr *)hostEntry->h_addr_list[0]));
 
-    /* Setup UDP data packets */
+	/* Setup UDP data packets */
 
-    udpRemoteServerAddr.sin_family = hostEntry->h_addrtype;
-    memcpy((char *) &udpRemoteServerAddr.sin_addr.s_addr, hostEntry->h_addr_list[0], hostEntry->h_length);
-    udpRemoteServerAddr.sin_port = htons(LOCAL_UDP_SERVER_PORT);
+	udpRemoteServerAddr.sin_family = hostEntry->h_addrtype;
+	memcpy((char *)&udpRemoteServerAddr.sin_addr.s_addr,
+	       hostEntry->h_addr_list[0], hostEntry->h_length);
+	udpRemoteServerAddr.sin_port = htons(LOCAL_UDP_SERVER_PORT);
 
-    /* Setup TCP data packets */
+	/* Setup TCP data packets */
 
-    tcpRemoteServerAddr.sin_family = hostEntry->h_addrtype;
-    memcpy((char *) &tcpRemoteServerAddr.sin_addr.s_addr, hostEntry->h_addr_list[0], hostEntry->h_length);
-    tcpRemoteServerAddr.sin_port = htons(LOCAL_TCP_SERVER_PORT);
+	tcpRemoteServerAddr.sin_family = hostEntry->h_addrtype;
+	memcpy((char *)&tcpRemoteServerAddr.sin_addr.s_addr,
+	       hostEntry->h_addr_list[0], hostEntry->h_length);
+	tcpRemoteServerAddr.sin_port = htons(LOCAL_TCP_SERVER_PORT);
 
-    /* Setup multiCast data packets */
+	/* Setup multiCast data packets */
 
-    mcastRemoteServerAddr.sin_family = hostEntry->h_addrtype;
-    memcpy((char *) &mcastRemoteServerAddr.sin_addr.s_addr, hostEntry->h_addr_list[0], hostEntry->h_length);
-    mcastRemoteServerAddr.sin_port = htons(LOCAL_MCAST_SERVER_PORT);
+	mcastRemoteServerAddr.sin_family = hostEntry->h_addrtype;
+	memcpy((char *)&mcastRemoteServerAddr.sin_addr.s_addr,
+	       hostEntry->h_addr_list[0], hostEntry->h_length);
+	mcastRemoteServerAddr.sin_port = htons(LOCAL_MCAST_SERVER_PORT);
 
-    /* socket creation */
-    udpSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
-    tcpSocketHandle = socket(AF_INET, SOCK_STREAM, 0);
+	/* socket creation */
+	udpSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
+	tcpSocketHandle = socket(AF_INET, SOCK_STREAM, 0);
 
-    if (udpSocketHandle < 0) {
-        printf("%s: Error: cannot open UDP socket \n",progName);
-    }
+	if (udpSocketHandle < 0) {
+		printf("%s: Error: cannot open UDP socket \n", progName);
+	}
 
-    if (tcpSocketHandle < 0) {
-        printf("%s: Error: cannot open TCP socket \n",progName);
-    }
+	if (tcpSocketHandle < 0) {
+		printf("%s: Error: cannot open TCP socket \n", progName);
+	}
 
-    /* bind any UDP port */
-    udpClientAddr.sin_family = AF_INET;
-    udpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-    udpClientAddr.sin_port = htons(0);
+	/* bind any UDP port */
+	udpClientAddr.sin_family = AF_INET;
+	udpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	udpClientAddr.sin_port = htons(0);
 
-    /* bind any TCP port */
-    tcpClientAddr.sin_family = AF_INET;
-    tcpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-    tcpClientAddr.sin_port = htons(0);
+	/* bind any TCP port */
+	tcpClientAddr.sin_family = AF_INET;
+	tcpClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	tcpClientAddr.sin_port = htons(0);
 
-    if (udpSocketHandle > 0) {
-        rc = bind(udpSocketHandle, (struct sockaddr *) &udpClientAddr, sizeof(udpClientAddr));
+	if (udpSocketHandle > 0) {
+		rc = bind(udpSocketHandle, (struct sockaddr *)&udpClientAddr,
+			  sizeof(udpClientAddr));
 
-        if (rc < 0) {
-            printf("%s: Error: cannot bind UDP port\n", progName);
-        }
-    }
+		if (rc < 0) {
+			printf("%s: Error: cannot bind UDP port\n", progName);
+		}
+	}
 
-    if (tcpSocketHandle > 0) {
-        rc = bind(tcpSocketHandle, (struct sockaddr *) &tcpClientAddr, sizeof(tcpClientAddr));
+	if (tcpSocketHandle > 0) {
+		rc = bind(tcpSocketHandle, (struct sockaddr *)&tcpClientAddr,
+			  sizeof(tcpClientAddr));
 
-        if (rc < 0) {
-            printf("%s: Error: cannot bind TCP port\n", progName);
-        } else {
-            /* connect to server */
-            rc = connect(tcpSocketHandle, (struct sockaddr *) &tcpRemoteServerAddr, sizeof(tcpRemoteServerAddr));
+		if (rc < 0) {
+			printf("%s: Error: cannot bind TCP port\n", progName);
+		} else {
+			/* connect to server */
+			rc = connect(tcpSocketHandle,
+				     (struct sockaddr *)&tcpRemoteServerAddr,
+				     sizeof(tcpRemoteServerAddr));
 
-            if (rc < 0) {
-                printf("Error: cannot connect tp TCP Server \n");
-            }
-        }
-    }
+			if (rc < 0) {
+				printf
+				    ("Error: cannot connect tp TCP Server \n");
+			}
+		}
+	}
 
-    /* check given address is multicast */
-    if (!IN_MULTICAST(ntohl(mcastRemoteServerAddr.sin_addr.s_addr))) {
-        printf("%s : Hostname [%s] passed [%s] is not a multicast server\n",progName, hostName,
-               inet_ntoa(mcastRemoteServerAddr.sin_addr));
-        printf("The multiCast Server will not be started \n");
-        multiCast = FALSE;
-    }
-    else {
-        /* create socket */
-        mcastSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
-        if (mcastSocketHandle < 0) {
-          printf("Error: %s : cannot open mulitCast socket\n", progName);
-          multiCast = FALSE;
-        }
+	/* check given address is multicast */
+	if (!IN_MULTICAST(ntohl(mcastRemoteServerAddr.sin_addr.s_addr))) {
+		printf
+		    ("%s : Hostname [%s] passed [%s] is not a multicast server\n",
+		     progName, hostName,
+		     inet_ntoa(mcastRemoteServerAddr.sin_addr));
+		printf("The multiCast Server will not be started \n");
+		multiCast = FALSE;
+	} else {
+		/* create socket */
+		mcastSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
+		if (mcastSocketHandle < 0) {
+			printf("Error: %s : cannot open mulitCast socket\n",
+			       progName);
+			multiCast = FALSE;
+		}
 
-        /* bind any port number */
-        mcastClientAddr.sin_family = AF_INET;
-        mcastClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-        mcastClientAddr.sin_port = htons(0);
+		/* bind any port number */
+		mcastClientAddr.sin_family = AF_INET;
+		mcastClientAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+		mcastClientAddr.sin_port = htons(0);
 
-        if (bind(mcastSocketHandle, (struct sockaddr *) &mcastClientAddr,sizeof(mcastClientAddr))<0) {
-          printf("Error: binding multiCast socket");
-          multiCast = FALSE;
-        }
+		if (bind
+		    (mcastSocketHandle, (struct sockaddr *)&mcastClientAddr,
+		     sizeof(mcastClientAddr)) < 0) {
+			printf("Error: binding multiCast socket");
+			multiCast = FALSE;
+		}
 
-        if (setsockopt(mcastSocketHandle, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0) {
-          printf("Error: %s : cannot set ttl = %d \n",progName, ttl);
-          multiCast = FALSE;
-        }
+		if (setsockopt
+		    (mcastSocketHandle, IPPROTO_IP, IP_MULTICAST_TTL, &ttl,
+		     sizeof(ttl)) < 0) {
+			printf("Error: %s : cannot set ttl = %d \n", progName,
+			       ttl);
+			multiCast = FALSE;
+		}
 
-        printf("%s : sending data on multicast group '%s' (%s)\n",progName,
-           hostEntry->h_name, inet_ntoa(*(struct in_addr *) hostEntry->h_addr_list[0]));
+		printf("%s : sending data on multicast group '%s' (%s)\n",
+		       progName, hostEntry->h_name,
+		       inet_ntoa(*(struct in_addr *)hostEntry->h_addr_list[0]));
 
-    }
+	}
 
-    /* Skip over the program and hostnames and just send data */
-    for (i = 3; i < argc; i++) {
+	/* Skip over the program and hostnames and just send data */
+	for (i = 3; i < argc; i++) {
 
-        if (udpSocketHandle > 0) {
-            rc = sendto(udpSocketHandle, argv[i], strlen(argv[i])+1, 0,
-                        (struct sockaddr *) &udpRemoteServerAddr,
-                        sizeof(udpRemoteServerAddr));
+		if (udpSocketHandle > 0) {
+			rc = sendto(udpSocketHandle, argv[i],
+				    strlen(argv[i]) + 1, 0,
+				    (struct sockaddr *)&udpRemoteServerAddr,
+				    sizeof(udpRemoteServerAddr));
 
-            if (rc < 0) {
-                printf("%s: cannot send UDP data %d \n",progName,i-1);
-                close(udpSocketHandle);
-            } else {
-                printf("%s: UDP data%u sent (%s)\n",progName,i-1,argv[i]);
-            }
-        } else {
-            printf("%s UDP Socket not open for send \n", hostName);
-        }
+			if (rc < 0) {
+				printf("%s: cannot send UDP data %d \n",
+				       progName, i - 1);
+				close(udpSocketHandle);
+			} else {
+				printf("%s: UDP data%u sent (%s)\n", progName,
+				       i - 1, argv[i]);
+			}
+		} else {
+			printf("%s UDP Socket not open for send \n", hostName);
+		}
 
-        if (tcpSocketHandle > 0) {
-            rc = send(tcpSocketHandle, argv[i], strlen(argv[i]) + 1, 0);
+		if (tcpSocketHandle > 0) {
+			rc = send(tcpSocketHandle, argv[i], strlen(argv[i]) + 1,
+				  0);
 
-            if (rc < 0) {
-                printf("cannot send TCP data ");
-                close(tcpSocketHandle);
+			if (rc < 0) {
+				printf("cannot send TCP data ");
+				close(tcpSocketHandle);
 
-            } else {
-                printf("%s: TCP data%u sent (%s)\n",progName,i-1,argv[i]);
-            }
-        } else {
-            printf("%s TCP Socket not open for send \n", hostName);
-        }
+			} else {
+				printf("%s: TCP data%u sent (%s)\n", progName,
+				       i - 1, argv[i]);
+			}
+		} else {
+			printf("%s TCP Socket not open for send \n", hostName);
+		}
 
-        if (multiCast) {
-            rc = sendto(mcastSocketHandle, argv[i], strlen(argv[i])+1, 0,
-                (struct sockaddr *) &mcastRemoteServerAddr, sizeof(mcastRemoteServerAddr));
+		if (multiCast) {
+			rc = sendto(mcastSocketHandle, argv[i],
+				    strlen(argv[i]) + 1, 0,
+				    (struct sockaddr *)&mcastRemoteServerAddr,
+				    sizeof(mcastRemoteServerAddr));
 
-            if (rc < 0) {
-              printf("%s : cannot send multiCast data %d\n",progName,i-1);
-              close(mcastSocketHandle);
-              multiCast = FALSE;
-            }
-        }
-    }
+			if (rc < 0) {
+				printf("%s : cannot send multiCast data %d\n",
+				       progName, i - 1);
+				close(mcastSocketHandle);
+				multiCast = FALSE;
+			}
+		}
+	}
 
-    sleep(5);
+	sleep(5);
 
-    ltp_run_traceroute_tests(traceName);
+	ltp_run_traceroute_tests(traceName);
 
-    ltp_run_ping_tests(hostName);
+	ltp_run_ping_tests(hostName);
 
-        return 0;
+	return 0;
 
 }
 
@@ -284,108 +303,105 @@
 * Function: ltp_run_traceroute_tests - host look up and start traceroute processes
 *
 ******************************************************************************/
-int ltp_run_traceroute_tests(char * hostName)
-
+int ltp_run_traceroute_tests(char *hostName)
 {
 
-    struct hostent    *hostEntry;
-    struct sockaddr_in rawTraceAddr;
-    int    pid = -1;
+	struct hostent *hostEntry;
+	struct sockaddr_in rawTraceAddr;
+	int pid = -1;
 
-    pid = getpid();
+	pid = getpid();
 
-    protocol  = getprotobyname("ICMP");
-    hostEntry = gethostbyname(hostName);
+	protocol = getprotobyname("ICMP");
+	hostEntry = gethostbyname(hostName);
 
-    memset(&rawTraceAddr, 0, sizeof(rawTraceAddr));
+	memset(&rawTraceAddr, 0, sizeof(rawTraceAddr));
 
-    rawTraceAddr.sin_family = hostEntry->h_addrtype;
-    rawTraceAddr.sin_port = 0;
-    rawTraceAddr.sin_addr.s_addr = *(long*)hostEntry->h_addr;
+	rawTraceAddr.sin_family = hostEntry->h_addrtype;
+	rawTraceAddr.sin_port = 0;
+	rawTraceAddr.sin_addr.s_addr = *(long *)hostEntry->h_addr;
 
-    ltp_traceroute(&rawTraceAddr, hostName, pid);
+	ltp_traceroute(&rawTraceAddr, hostName, pid);
 
-        return 0;
+	return 0;
 }
+
 /**********************************************************************
 * Function: ltp_run_ping_tests - host look up and start ping processes
 *
 ***********************************************************************/
-int ltp_run_ping_tests(char * hostName)
-
+int ltp_run_ping_tests(char *hostName)
 {
 
-    struct hostent    *hostEntry;
-    struct sockaddr_in rawAddr;
-    int    pid = -1;
+	struct hostent *hostEntry;
+	struct sockaddr_in rawAddr;
+	int pid = -1;
 
-    pid = getpid();
+	pid = getpid();
 
-    protocol  = getprotobyname("ICMP");
-    hostEntry = gethostbyname(hostName);
+	protocol = getprotobyname("ICMP");
+	hostEntry = gethostbyname(hostName);
 
-    memset(&rawAddr, 0, sizeof(rawAddr));
+	memset(&rawAddr, 0, sizeof(rawAddr));
 
-    rawAddr.sin_family = hostEntry->h_addrtype;
-    rawAddr.sin_port = 0;
-    rawAddr.sin_addr.s_addr = *(long*)hostEntry->h_addr;
+	rawAddr.sin_family = hostEntry->h_addrtype;
+	rawAddr.sin_port = 0;
+	rawAddr.sin_addr.s_addr = *(long *)hostEntry->h_addr;
 
-    if (fork() == 0) {
-        network_listener(hostName, pid);
-    } else {
-        ping_network(&rawAddr, pid);
+	if (fork() == 0) {
+		network_listener(hostName, pid);
+	} else {
+		ping_network(&rawAddr, pid);
 
-    }
+	}
 
-        return 0;
+	return 0;
 }
 
 /******************************************************************************
 * Function: network_listener - separate process to listen for and collect messages
 *
 *******************************************************************************/
-int network_listener(char * hostName, int pid)
+int network_listener(char *hostName, int pid)
 {
 
-    int                  rawSocket,
-                         count,
-                         value = TIMETOLIVE;
-    struct sockaddr_in   rawAddr;
-    unsigned char        packet[PACKET_LEN];
+	int rawSocket, count, value = TIMETOLIVE;
+	struct sockaddr_in rawAddr;
+	unsigned char packet[PACKET_LEN];
 
-    rawSocket = socket(PF_INET, SOCK_RAW, protocol->p_proto);
-    count = 0;
+	rawSocket = socket(PF_INET, SOCK_RAW, protocol->p_proto);
+	count = 0;
 
-    if (rawSocket < 0)
-    {
-        printf("%s: Error: cannot open RAW socket \n", hostName);
-        return(NET_ERROR);
-    }
+	if (rawSocket < 0) {
+		printf("%s: Error: cannot open RAW socket \n", hostName);
+		return (NET_ERROR);
+	}
 
-    while (1)  /* loop forever */
-    {
+	while (1) {		/* loop forever */
 
-        int bytes;
-        socklen_t len = sizeof(rawAddr);
+		int bytes;
+		socklen_t len = sizeof(rawAddr);
 
-        memset(packet, 0, sizeof(packet));
+		memset(packet, 0, sizeof(packet));
 
-        bytes = recvfrom(rawSocket, packet, sizeof(packet), 0, (struct sockaddr*)&rawAddr, &len);
+		bytes =
+		    recvfrom(rawSocket, packet, sizeof(packet), 0,
+			     (struct sockaddr *)&rawAddr, &len);
 
-        if (bytes > 0)
-            output_to_display(packet, bytes, pid);
-        else {
-            printf("%s : cannot receive data\n", hostName);
-            break;
-        }
-        count++;
+		if (bytes > 0)
+			output_to_display(packet, bytes, pid);
+		else {
+			printf("%s : cannot receive data\n", hostName);
+			break;
+		}
+		count++;
 
-        if (value == count) {
-            printf("Exiting the network_listener...\n");
-        }
-    }
+		if (value == count) {
+			printf("Exiting the network_listener...\n");
+		}
+	}
 
-    return(0);
+	return (0);
 }
 
 /****************************************************************
@@ -395,25 +411,24 @@
 unsigned short checksum(void *netPacket, int len)
 {
 
-    unsigned short *packetPtr = netPacket,
-                    result;
+	unsigned short *packetPtr = netPacket, result;
 
-    unsigned int    sum = 0;
+	unsigned int sum = 0;
 
-    for (sum = 0; len > 1; len -= 2) {
-        sum += *packetPtr++;
-    }
+	for (sum = 0; len > 1; len -= 2) {
+		sum += *packetPtr++;
+	}
 
-    if (len == 1) {
-        sum += *(unsigned char*)packetPtr;
-    }
+	if (len == 1) {
+		sum += *(unsigned char *)packetPtr;
+	}
 
-    sum = (sum >> 16) + (sum & 0xFFFF);
-    sum += (sum >> 16);
+	sum = (sum >> 16) + (sum & 0xFFFF);
+	sum += (sum >> 16);
 
-    result = ~sum;
+	result = ~sum;
 
-    return result;
+	return result;
 }
 
 /*****************************************************************
@@ -423,41 +438,42 @@
 void output_to_display(void *netPacket, int bytes, int pid)
 {
 
-    int i;
+	int i;
 	struct iphdr *ip = netPacket;
-	struct icmphdr *icmpPtr = netPacket + ip->ihl*4;
-    struct in_addr tmp_addr;
+	struct icmphdr *icmpPtr = netPacket + ip->ihl * 4;
+	struct in_addr tmp_addr;
 
-    printf("\n************** -- Ping Tests - **********************************************\n");
+	printf
+	    ("\n************** -- Ping Tests - **********************************************\n");
 
-	for (i = 0; i < bytes; i++)
-	{
+	for (i = 0; i < bytes; i++) {
 		if (!(i & 15)) {
-            printf("\n[%d]:  ", i);
-        }
+			printf("\n[%d]:  ", i);
+		}
 
-		printf("[%d] ", ((unsigned char*)netPacket)[i]);
+		printf("[%d] ", ((unsigned char *)netPacket)[i]);
 	}
 
 	printf("\n");
 
-    tmp_addr.s_addr = ip->saddr;
+	tmp_addr.s_addr = ip->saddr;
 
 	printf("IPv%d: hdr-size=%d pkt-size=%d protocol=%d TTL=%d src=%s ",
-		ip->version, ip->ihl*4, ntohs(ip->tot_len), ip->protocol,
-		ip->ttl, inet_ntoa(tmp_addr));
+	       ip->version, ip->ihl * 4, ntohs(ip->tot_len), ip->protocol,
+	       ip->ttl, inet_ntoa(tmp_addr));
 
-    tmp_addr.s_addr = ip->daddr;
+	tmp_addr.s_addr = ip->daddr;
 	printf("dst=%s\n", inet_ntoa(tmp_addr));
 
 	if (icmpPtr->un.echo.id == pid) {
 
 		printf("ICMP: type[%d/%d] checksum[%d] id[%d] seq[%d]\n\n",
-			icmpPtr->type, icmpPtr->code, ntohs(icmpPtr->checksum),
-			icmpPtr->un.echo.id, icmpPtr->un.echo.sequence);
+		       icmpPtr->type, icmpPtr->code, ntohs(icmpPtr->checksum),
+		       icmpPtr->un.echo.id, icmpPtr->un.echo.sequence);
 
 	}
 }
+
 /***********************************************************************
 * Function: ping_network - Build a message and send it.
 *
@@ -466,10 +482,8 @@
 void ping_network(struct sockaddr_in *rawAddr, int pid)
 {
 
-    const int value = TIMETOLIVE;
-	int       i,
-              rawSocket,
-              count = 1;
+	const int value = TIMETOLIVE;
+	int i, rawSocket, count = 1;
 
 	struct packet rawPacket;
 
@@ -477,55 +491,61 @@
 
 	rawSocket = socket(PF_INET, SOCK_RAW, protocol->p_proto);
 
-	if (rawSocket < 0)   {
-        printf("Error: cannot open RAW socket %d\n", rawSocket);
+	if (rawSocket < 0) {
+		printf("Error: cannot open RAW socket %d\n", rawSocket);
 		return;
 	}
 
 	if (setsockopt(rawSocket, SOL_IP, IP_TTL, &value, sizeof(value)) != 0) {
 		printf("ERROR: Setting TimeToLive option");
-    }
-    else{
-        printf("The test will run for [%d] iterations -- Ctrl-C to interupt \n", value);
-        sleep(3);
-    }
+	} else {
+		printf
+		    ("The test will run for [%d] iterations -- Ctrl-C to interupt \n",
+		     value);
+		sleep(3);
+	}
 
 	if (fcntl(rawSocket, F_SETFL, O_NONBLOCK) != 0) {
 		printf("ERROR: Failed request nonblocking I/O");
-    }
+	}
 
 	while (1) {
 
-        socklen_t       msgLength=sizeof(r_addr);
+		socklen_t msgLength = sizeof(r_addr);
 
 		printf("Message ID #:%d \n", count);
 
-		if (recvfrom(rawSocket, &rawPacket, sizeof(rawPacket), 0, (struct sockaddr*)&r_addr, &msgLength) > 0) {
+		if (recvfrom
+		    (rawSocket, &rawPacket, sizeof(rawPacket), 0,
+		     (struct sockaddr *)&r_addr, &msgLength) > 0) {
 			printf("*** -- Message Received -- ***\n");
-        }
+		}
 
 		memset(&rawPacket, 0, sizeof(rawPacket));
 
 		rawPacket.hdr.type = ICMP_ECHO;
 		rawPacket.hdr.un.echo.id = pid;
 
-		for (i = 0; i < sizeof(rawPacket.msg)-1; i++) {
+		for (i = 0; i < sizeof(rawPacket.msg) - 1; i++) {
 			rawPacket.msg[i] = i + '0';
-        }
+		}
 
 		rawPacket.msg[i] = 0;
 		rawPacket.hdr.un.echo.sequence = count++;
-		rawPacket.hdr.checksum = checksum(&rawPacket, sizeof(rawPacket));
+		rawPacket.hdr.checksum =
+		    checksum(&rawPacket, sizeof(rawPacket));
 
-		if (sendto(rawSocket, &rawPacket, sizeof(rawPacket), 0, (struct sockaddr*)rawAddr, sizeof(*rawAddr)) <= 0)
+		if (sendto
+		    (rawSocket, &rawPacket, sizeof(rawPacket), 0,
+		     (struct sockaddr *)rawAddr, sizeof(*rawAddr)) <= 0)
 			printf("ERROR: sendto failed !!");
 
 		sleep(1);
 
-        if (value == count) {
-            printf("Exiting ping test...\n");
-            break;
-        }
+		if (value == count) {
+			printf("Exiting ping test...\n");
+			break;
+		}
 	}
 }
 
@@ -534,82 +554,94 @@
 *                      try to reach the destination
 *                      while outputting hops along the route
 ***********************************************************************/
-void ltp_traceroute(struct sockaddr_in *rawTraceAddr, char * hostName, int pid)
+void ltp_traceroute(struct sockaddr_in *rawTraceAddr, char *hostName, int pid)
 {
 
-    const int flag = TRUE;
-    int TimeToLive = 0;
-    int i, rawTraceSocket, count = 1;
-    socklen_t length;
-    struct packet       rawTracePacket;
-    unsigned char       tracePacket[PACKET_LEN];
-    struct sockaddr_in  rawReceiveAddr;
-    struct hostent     *hostEntry2;
-    struct in_addr      tmp_addr;
+	const int flag = TRUE;
+	int TimeToLive = 0;
+	int i, rawTraceSocket, count = 1;
+	socklen_t length;
+	struct packet rawTracePacket;
+	unsigned char tracePacket[PACKET_LEN];
+	struct sockaddr_in rawReceiveAddr;
+	struct hostent *hostEntry2;
+	struct in_addr tmp_addr;
 
-    printf("\n************** -- Trace Route Tests - **********************************************\n");
+	printf
+	    ("\n************** -- Trace Route Tests - **********************************************\n");
 
-    rawTraceSocket = socket(PF_INET, SOCK_RAW, protocol->p_proto);
+	rawTraceSocket = socket(PF_INET, SOCK_RAW, protocol->p_proto);
 
-    if (rawTraceSocket < 0)
-    {
-        printf("Error: cannot open RAW socket %d\n", rawTraceSocket);
-        return;
-    }
+	if (rawTraceSocket < 0) {
+		printf("Error: cannot open RAW socket %d\n", rawTraceSocket);
+		return;
+	}
 
-    if (setsockopt(rawTraceSocket, SOL_IP, SO_ERROR, &flag, sizeof(flag)) != 0)
-        printf("ERROR: Setting socket options");
+	if (setsockopt(rawTraceSocket, SOL_IP, SO_ERROR, &flag, sizeof(flag)) !=
+	    0)
+		printf("ERROR: Setting socket options");
 
-    do
-    {
-        struct iphdr       *ip;
-        length = sizeof(rawReceiveAddr);
+	do {
+		struct iphdr *ip;
+		length = sizeof(rawReceiveAddr);
 
-        TimeToLive++;
-        if (setsockopt(rawTraceSocket, SOL_IP, IP_TTL, &TimeToLive, sizeof(TimeToLive)) != 0) {
-            printf("ERROR: Setting TimeToLive option");
-        }
+		TimeToLive++;
+		if (setsockopt
+		    (rawTraceSocket, SOL_IP, IP_TTL, &TimeToLive,
+		     sizeof(TimeToLive)) != 0) {
+			printf("ERROR: Setting TimeToLive option");
+		}
 
-        memset(&rawTracePacket, 0, sizeof(rawTracePacket));
+		memset(&rawTracePacket, 0, sizeof(rawTracePacket));
 
-        rawTracePacket.hdr.type = ICMP_ECHO;
-        rawTracePacket.hdr.un.echo.id = pid;
+		rawTracePacket.hdr.type = ICMP_ECHO;
+		rawTracePacket.hdr.un.echo.id = pid;
 
-        for (i = 0; i < sizeof(rawTracePacket.msg)-1; i++) {
-            rawTracePacket.msg[i] = i+'0';
-        }
+		for (i = 0; i < sizeof(rawTracePacket.msg) - 1; i++) {
+			rawTracePacket.msg[i] = i + '0';
+		}
 
-        rawTracePacket.msg[i] = 0;
-        rawTracePacket.hdr.un.echo.sequence = count++;
-        rawTracePacket.hdr.checksum = checksum(&rawTracePacket, sizeof(rawTracePacket));
+		rawTracePacket.msg[i] = 0;
+		rawTracePacket.hdr.un.echo.sequence = count++;
+		rawTracePacket.hdr.checksum =
+		    checksum(&rawTracePacket, sizeof(rawTracePacket));
 
-        if (sendto(rawTraceSocket, &rawTracePacket, sizeof(rawTracePacket), 0, (struct sockaddr*)rawTraceAddr, sizeof(*rawTraceAddr)) <= 0) {
+		if (sendto
+		    (rawTraceSocket, &rawTracePacket, sizeof(rawTracePacket), 0,
+		     (struct sockaddr *)rawTraceAddr,
+		     sizeof(*rawTraceAddr)) <= 0) {
 			printf("ERROR: sendto failed !!");
-        }
-        sleep(1);
+		}
+		sleep(1);
 
-        if (recvfrom(rawTraceSocket, tracePacket, sizeof(tracePacket), MSG_DONTWAIT, (struct sockaddr*)&rawReceiveAddr, &length) > 0)
-        {
-            ip = (void*)tracePacket;
+		if (recvfrom
+		    (rawTraceSocket, tracePacket, sizeof(tracePacket),
+		     MSG_DONTWAIT, (struct sockaddr *)&rawReceiveAddr,
+		     &length) > 0) {
+			ip = (void *)tracePacket;
 
-            tmp_addr.s_addr = ip->saddr;
-            printf("Host IP:#%d: %s \n", count-1, inet_ntoa(tmp_addr));
+			tmp_addr.s_addr = ip->saddr;
+			printf("Host IP:#%d: %s \n", count - 1,
+			       inet_ntoa(tmp_addr));
 
-            hostEntry2 = gethostbyaddr((void*)&rawReceiveAddr, length, rawReceiveAddr.sin_family);
+			hostEntry2 =
+			    gethostbyaddr((void *)&rawReceiveAddr, length,
+					  rawReceiveAddr.sin_family);
 
-            if (hostEntry2 != NULL)
-                printf("(%s)\n", hostEntry2->h_name);
-            else
-                perror("Name: ");
-        } else{
-            printf("%s : data send complete...\n", hostName);
-            break;
-        }
+			if (hostEntry2 != NULL)
+				printf("(%s)\n", hostEntry2->h_name);
+			else
+				perror("Name: ");
+		} else {
+			printf("%s : data send complete...\n", hostName);
+			break;
+		}
 
-    }
-    while (rawReceiveAddr.sin_addr.s_addr != rawTraceAddr->sin_addr.s_addr);
+	}
+	while (rawReceiveAddr.sin_addr.s_addr != rawTraceAddr->sin_addr.s_addr);
 
-    printf("\n************** -- End Trace Route Tests - ******************************************\n");
+	printf
+	    ("\n************** -- End Trace Route Tests - ******************************************\n");
 
-    close(rawTraceSocket);
+	close(rawTraceSocket);
 }
diff --git a/testcases/network/sockets/ltpServer.c b/testcases/network/sockets/ltpServer.c
index a19d7bb..edd933f 100644
--- a/testcases/network/sockets/ltpServer.c
+++ b/testcases/network/sockets/ltpServer.c
@@ -47,204 +47,212 @@
 #define END_LINE                0x0A
 
 int udpSocketHandle,
-    rc,
-    msg_bytes,
-    tcpSocketHandle,
-    newTcpSocketHandle,
-    multiSocketHandle;
+    rc, msg_bytes, tcpSocketHandle, newTcpSocketHandle, multiSocketHandle;
 
-socklen_t udpClientLen,
-	  tcpClientLen,
-          multiClientLen;
+socklen_t udpClientLen, tcpClientLen, multiClientLen;
 
 struct sockaddr_in udpClientAddr,
-                   udpServerAddr,
-                   tcpClientAddr,
-                   tcpServerAddr,
-                 multiClientAddr,
-                 multiServerAddr;
+    udpServerAddr,
+    tcpClientAddr, tcpServerAddr, multiClientAddr, multiServerAddr;
 
-struct ip_mreq   multiCastReq;
-struct in_addr   multiCastAddr;
-struct hostent  *hostEntry;
+struct ip_mreq multiCastReq;
+struct in_addr multiCastAddr;
+struct hostent *hostEntry;
 
-char message  [MAX_MSG_LEN];
-char hostname [MAX_HOSTNAME_LEN];
-char ServerProg [MAX_HOSTNAME_LEN];
+char message[MAX_MSG_LEN];
+char hostname[MAX_HOSTNAME_LEN];
+char ServerProg[MAX_HOSTNAME_LEN];
 
-void* ltp_udp_server_queue (void*);
-void* ltp_tcp_server_queue (void*);
-void* ltp_multi_server_queue (void*);
-int  tcp_receive_buffer(int, char *);
+void *ltp_udp_server_queue(void *);
+void *ltp_tcp_server_queue(void *);
+void *ltp_multi_server_queue(void *);
+int tcp_receive_buffer(int, char *);
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 
-    pthread_t       udp_server_queue,
-                    tcp_server_queue,
-                    multi_server_queue;
+	pthread_t udp_server_queue, tcp_server_queue, multi_server_queue;
 
-    pthread_attr_t  udpthread_attr,
-                    tcpthread_attr,
-                    multithread_attr;
+	pthread_attr_t udpthread_attr, tcpthread_attr, multithread_attr;
 
-    if (argc!=2) {
-        printf("Server arguments : %s <multiCast I.P.address/hostname>\n", argv[0]);
-        exit(0);
-    }
+	if (argc != 2) {
+		printf
+		    ("Server arguments : %s <multiCast I.P.address/hostname>\n",
+		     argv[0]);
+		exit(0);
+	}
 
-    strncpy(hostname, argv[1], 255);
-    strncpy(ServerProg, argv[0], 255);
+	strncpy(hostname, argv[1], 255);
+	strncpy(ServerProg, argv[0], 255);
 
-    /* get mcast address to listen to */
+	/* get mcast address to listen to */
 
-    hostEntry = gethostbyname(argv[1]);
+	hostEntry = gethostbyname(argv[1]);
 
-    if (hostEntry == NULL) {
-        printf("Server %s : You need to pass a multiCast group '%s'\n", argv[0], argv[1]);
-        exit(1);
-    }
+	if (hostEntry == NULL) {
+		printf("Server %s : You need to pass a multiCast group '%s'\n",
+		       argv[0], argv[1]);
+		exit(1);
+	}
 
-    memcpy(&multiCastAddr, hostEntry->h_addr_list[0], hostEntry->h_length);
+	memcpy(&multiCastAddr, hostEntry->h_addr_list[0], hostEntry->h_length);
 
-    /* check given address is multicast */
-    if (!IN_MULTICAST(ntohl(multiCastAddr.s_addr))) {
-        printf("%s : Hostname [%s] passed [%s] is not a multicast server\n",argv[0], hostname,
-               inet_ntoa(multiCastAddr));
-        printf("The multiCast Server will not be started \n");
-    }
-    else {
+	/* check given address is multicast */
+	if (!IN_MULTICAST(ntohl(multiCastAddr.s_addr))) {
+		printf
+		    ("%s : Hostname [%s] passed [%s] is not a multicast server\n",
+		     argv[0], hostname, inet_ntoa(multiCastAddr));
+		printf("The multiCast Server will not be started \n");
+	} else {
 
-        /* create multiCast socket */
-        multiSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
+		/* create multiCast socket */
+		multiSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
 
-        if (multiSocketHandle < 0) {
-            printf("%s : cannot create multiCast socket\n",argv[0]);
-        } else {
-            /* bind multiCast port */
-            multiServerAddr.sin_family=AF_INET;
-            multiServerAddr.sin_addr.s_addr=htonl(INADDR_ANY);
-            multiServerAddr.sin_port=htons(LOCAL_MULTI_SERVER_PORT);
+		if (multiSocketHandle < 0) {
+			printf("%s : cannot create multiCast socket\n",
+			       argv[0]);
+		} else {
+			/* bind multiCast port */
+			multiServerAddr.sin_family = AF_INET;
+			multiServerAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+			multiServerAddr.sin_port =
+			    htons(LOCAL_MULTI_SERVER_PORT);
 
-            if (bind(multiSocketHandle,(struct sockaddr *) &multiServerAddr, sizeof(multiServerAddr)) < 0) {
-                printf("%s : cannot bind Multicast port %d \n",argv[0], LOCAL_MULTI_SERVER_PORT);
-            } else {
-                /* join multicast group */
-                multiCastReq.imr_multiaddr.s_addr = multiCastAddr.s_addr;
-                multiCastReq.imr_interface.s_addr = htonl(INADDR_ANY);
+			if (bind
+			    (multiSocketHandle,
+			     (struct sockaddr *)&multiServerAddr,
+			     sizeof(multiServerAddr)) < 0) {
+				printf("%s : cannot bind Multicast port %d \n",
+				       argv[0], LOCAL_MULTI_SERVER_PORT);
+			} else {
+				/* join multicast group */
+				multiCastReq.imr_multiaddr.s_addr =
+				    multiCastAddr.s_addr;
+				multiCastReq.imr_interface.s_addr =
+				    htonl(INADDR_ANY);
 
-                rc = setsockopt(multiSocketHandle, IPPROTO_IP, IP_ADD_MEMBERSHIP,
-                                (void *) &multiCastReq, sizeof(multiCastReq));
-                if (rc < 0) {
-                    printf("%s : cannot join multicast group '%s'",argv[0],
-                           inet_ntoa(multiCastAddr));
-                } else {
-                    printf("%s : listening to mgroup %s:%d\n",
-                           argv[0],inet_ntoa(multiCastAddr), LOCAL_MULTI_SERVER_PORT);
-                }
-            }
-        }
+				rc = setsockopt(multiSocketHandle, IPPROTO_IP,
+						IP_ADD_MEMBERSHIP,
+						(void *)&multiCastReq,
+						sizeof(multiCastReq));
+				if (rc < 0) {
+					printf
+					    ("%s : cannot join multicast group '%s'",
+					     argv[0], inet_ntoa(multiCastAddr));
+				} else {
+					printf
+					    ("%s : listening to mgroup %s:%d\n",
+					     argv[0], inet_ntoa(multiCastAddr),
+					     LOCAL_MULTI_SERVER_PORT);
+				}
+			}
+		}
 
-        rc = pthread_attr_init(&multithread_attr);
-        rc = pthread_create(&multi_server_queue, &multithread_attr,
-		ltp_multi_server_queue, NULL);
-    }
+		rc = pthread_attr_init(&multithread_attr);
+		rc = pthread_create(&multi_server_queue, &multithread_attr,
+				    ltp_multi_server_queue, NULL);
+	}
 
-    /* udp socket creation */
-    udpSocketHandle=socket(AF_INET, SOCK_DGRAM, 0);
+	/* udp socket creation */
+	udpSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
 
-    if (udpSocketHandle < 0) {
-        printf("%s: cannot open socket \n",argv[0]);
-        exit(1);
-    }
+	if (udpSocketHandle < 0) {
+		printf("%s: cannot open socket \n", argv[0]);
+		exit(1);
+	}
 
-    /* tcp socket creation */
-    tcpSocketHandle = socket(AF_INET, SOCK_STREAM, 0);
+	/* tcp socket creation */
+	tcpSocketHandle = socket(AF_INET, SOCK_STREAM, 0);
 
-    if (tcpSocketHandle < 0) {
-        printf("Error: cannot open socket %d \n", tcpSocketHandle);
-        return ERROR;
-    }
+	if (tcpSocketHandle < 0) {
+		printf("Error: cannot open socket %d \n", tcpSocketHandle);
+		return ERROR;
+	}
 
-    /* bind local udp server port */
-    udpServerAddr.sin_family = AF_INET;
-    udpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-    udpServerAddr.sin_port = htons(LOCAL_UDP_SERVER_PORT);
+	/* bind local udp server port */
+	udpServerAddr.sin_family = AF_INET;
+	udpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	udpServerAddr.sin_port = htons(LOCAL_UDP_SERVER_PORT);
 
-    rc = bind (udpSocketHandle, (struct sockaddr *) &udpServerAddr,sizeof(udpServerAddr));
+	rc = bind(udpSocketHandle, (struct sockaddr *)&udpServerAddr,
+		  sizeof(udpServerAddr));
 
-    if (rc < 0) {
-        printf("%s: Error binding port number %d \n",
-               argv[0], LOCAL_UDP_SERVER_PORT);
-        exit(1);
-    } else {
-        printf("%s: bound port number %d \n",
-               argv[0], LOCAL_UDP_SERVER_PORT);
-    }
+	if (rc < 0) {
+		printf("%s: Error binding port number %d \n",
+		       argv[0], LOCAL_UDP_SERVER_PORT);
+		exit(1);
+	} else {
+		printf("%s: bound port number %d \n",
+		       argv[0], LOCAL_UDP_SERVER_PORT);
+	}
 
-    /* bind local tcp server port */
-    tcpServerAddr.sin_family = AF_INET;
-    tcpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY);
-    tcpServerAddr.sin_port = htons(LOCAL_TCP_SERVER_PORT);
+	/* bind local tcp server port */
+	tcpServerAddr.sin_family = AF_INET;
+	tcpServerAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+	tcpServerAddr.sin_port = htons(LOCAL_TCP_SERVER_PORT);
 
-    rc = bind (tcpSocketHandle, (struct sockaddr *) &tcpServerAddr,sizeof(tcpServerAddr));
+	rc = bind(tcpSocketHandle, (struct sockaddr *)&tcpServerAddr,
+		  sizeof(tcpServerAddr));
 
-    if (rc < 0) {
-        printf("%s: Error binding port number %d \n",
-               argv[0], LOCAL_TCP_SERVER_PORT);
-        exit(1);
-    } else {
-        printf("%s: bound port number %d \n",
-               argv[0], LOCAL_TCP_SERVER_PORT);
-    }
+	if (rc < 0) {
+		printf("%s: Error binding port number %d \n",
+		       argv[0], LOCAL_TCP_SERVER_PORT);
+		exit(1);
+	} else {
+		printf("%s: bound port number %d \n",
+		       argv[0], LOCAL_TCP_SERVER_PORT);
+	}
 
-    rc = pthread_attr_init(&udpthread_attr);
-    rc = pthread_create(&udp_server_queue, &udpthread_attr,
-	    ltp_udp_server_queue, NULL);
+	rc = pthread_attr_init(&udpthread_attr);
+	rc = pthread_create(&udp_server_queue, &udpthread_attr,
+			    ltp_udp_server_queue, NULL);
 
-    rc = pthread_attr_init(&tcpthread_attr);
-    rc = pthread_create(&tcp_server_queue, &tcpthread_attr,
-	    ltp_tcp_server_queue, NULL);
+	rc = pthread_attr_init(&tcpthread_attr);
+	rc = pthread_create(&tcp_server_queue, &tcpthread_attr,
+			    ltp_tcp_server_queue, NULL);
 
-    while (1);
+	while (1) ;
 
-        return 0;
+	return 0;
 }
+
 /*
  * Function:     ltp_udp_server_queue
  * Description:  This function grabs the udp message from the queue and outputs to stdio
  */
-void* ltp_udp_server_queue (void *junk)
+void *ltp_udp_server_queue(void *junk)
 {
 
-  printf("%s: waiting for data on port UDP %u\n",
-	   hostname,LOCAL_UDP_SERVER_PORT);
+	printf("%s: waiting for data on port UDP %u\n",
+	       hostname, LOCAL_UDP_SERVER_PORT);
 
-  /* server infinite loop */
-  while (1) {
+	/* server infinite loop */
+	while (1) {
 
-    /* init buffer */
-    memset(message, 0, MAX_MSG_LEN);
+		/* init buffer */
+		memset(message, 0, MAX_MSG_LEN);
 
-    /* receive message */
-    udpClientLen = sizeof(udpClientAddr);
+		/* receive message */
+		udpClientLen = sizeof(udpClientAddr);
 
-    msg_bytes = recvfrom(udpSocketHandle, message, MAX_MSG_LEN, 0, (struct sockaddr *) &udpClientAddr, &udpClientLen);
+		msg_bytes =
+		    recvfrom(udpSocketHandle, message, MAX_MSG_LEN, 0,
+			     (struct sockaddr *)&udpClientAddr, &udpClientLen);
 
-    printf("msg_bytes:%d \n", msg_bytes);
+		printf("msg_bytes:%d \n", msg_bytes);
 
-    if (msg_bytes < 0) {
-      printf("%s: Error receiving data \n",hostname);
-    }
-    else {
-        /* print message */
-        printf("%s: from %s:UDP%u : %s \n",
-           hostname,inet_ntoa(udpClientAddr.sin_addr),
-           ntohs(udpClientAddr.sin_port), message);
-    }
+		if (msg_bytes < 0) {
+			printf("%s: Error receiving data \n", hostname);
+		} else {
+			/* print message */
+			printf("%s: from %s:UDP%u : %s \n",
+			       hostname, inet_ntoa(udpClientAddr.sin_addr),
+			       ntohs(udpClientAddr.sin_port), message);
+		}
 
-  }/* end of server infinite loop */
+	}			/* end of server infinite loop */
 
-  return NULL;
+	return NULL;
 
 }
 
@@ -252,145 +260,157 @@
  * Function:     ltp_tcp_server_queue
  * Description:  This function grabs the tcp message from the queue and outputs to stdio
  */
-void* ltp_tcp_server_queue (void *junk)
+void *ltp_tcp_server_queue(void *junk)
 {
 
-    listen(tcpSocketHandle,5);
+	listen(tcpSocketHandle, 5);
 
-    while (1) {
+	while (1) {
 
-      printf("%s: waiting for data on port TCP %u\n",hostname ,LOCAL_TCP_SERVER_PORT);
+		printf("%s: waiting for data on port TCP %u\n", hostname,
+		       LOCAL_TCP_SERVER_PORT);
 
-      tcpClientLen = sizeof(tcpClientAddr);
-      newTcpSocketHandle = accept(tcpSocketHandle, (struct sockaddr *) &tcpClientAddr, &tcpClientLen);
+		tcpClientLen = sizeof(tcpClientAddr);
+		newTcpSocketHandle =
+		    accept(tcpSocketHandle, (struct sockaddr *)&tcpClientAddr,
+			   &tcpClientLen);
 
-      if (newTcpSocketHandle < 0) {
-        printf("cannot accept TCP connection ");
-        break;
-      }
+		if (newTcpSocketHandle < 0) {
+			printf("cannot accept TCP connection ");
+			break;
+		}
 
-      /* init line */
-      memset(message,0x0,MAX_MSG_LEN);
+		/* init line */
+		memset(message, 0x0, MAX_MSG_LEN);
 
-      /* receive segments */
-      while (tcp_receive_buffer(newTcpSocketHandle,message)!= ERROR) {
+		/* receive segments */
+		while (tcp_receive_buffer(newTcpSocketHandle, message) != ERROR) {
 
-        printf("%s: received from %s:TCP%d : %s\n", hostname,
-           inet_ntoa(tcpClientAddr.sin_addr),
-           ntohs(tcpClientAddr.sin_port), message);
+			printf("%s: received from %s:TCP%d : %s\n", hostname,
+			       inet_ntoa(tcpClientAddr.sin_addr),
+			       ntohs(tcpClientAddr.sin_port), message);
 
-        /* init line */
-        memset(message,0x0,MAX_MSG_LEN);
+			/* init line */
+			memset(message, 0x0, MAX_MSG_LEN);
 
-      } /* while (read_line) */
-      printf("looping in TCP \n");
+		}		/* while (read_line) */
+		printf("looping in TCP \n");
 
-    } /* while (1) */
+	}			/* while (1) */
 
-    return NULL;
+	return NULL;
 
 }
+
 /*
  * Function:     tcp_receive_buffer
  * Description:  This function grabs the message from the tcp queue and
  *               returns it to the calling function in the buffer.
  */
-int tcp_receive_buffer(int newSocket, char *return_buffer) {
+int tcp_receive_buffer(int newSocket, char *return_buffer)
+{
 
-  static int  bytes_received = 0;
-  static char message_received[MAX_MSG_LEN];
-  static int  count = 0;
-  int offset;
+	static int bytes_received = 0;
+	static char message_received[MAX_MSG_LEN];
+	static int count = 0;
+	int offset;
 
-  offset = 0;
+	offset = 0;
 
-  while (1) {
+	while (1) {
 
-    if (bytes_received == 0) {
-      /* read data from socket */
+		if (bytes_received == 0) {
+			/* read data from socket */
 
-      memset(message_received, 0x0, MAX_MSG_LEN); /* init buffer */
+			memset(message_received, 0x0, MAX_MSG_LEN);	/* init buffer */
 
-      count = recvfrom(newSocket, message_received, MAX_MSG_LEN, 0, (struct sockaddr *) &tcpClientAddr, &tcpClientLen);
+			count =
+			    recvfrom(newSocket, message_received, MAX_MSG_LEN,
+				     0, (struct sockaddr *)&tcpClientAddr,
+				     &tcpClientLen);
 
-      if (count < 0) {
-	     perror(" cannot receive data ");
-	     return ERROR;
-      }
-      else if (count == 0) {
-	     printf(" connection closed by client\n");
-         close(newSocket);
-         if (count) {
-         }
-	     return ERROR;
-      }
-    }
+			if (count < 0) {
+				perror(" cannot receive data ");
+				return ERROR;
+			} else if (count == 0) {
+				printf(" connection closed by client\n");
+				close(newSocket);
+				if (count) {
+				}
+				return ERROR;
+			}
+		}
 
-    /* Check for new data read on socket or */
-    /* if still more data in buffer       */
+		/* Check for new data read on socket or */
+		/* if still more data in buffer       */
 
-    /* copy line into 'return_buffer' */
-    while (*(message_received + bytes_received)!= END_LINE && bytes_received < count) {
-      memcpy(return_buffer + offset, message_received + bytes_received, 1);
-      offset++;
-      bytes_received++;
-    }
+		/* copy line into 'return_buffer' */
+		while (*(message_received + bytes_received) != END_LINE
+		       && bytes_received < count) {
+			memcpy(return_buffer + offset,
+			       message_received + bytes_received, 1);
+			offset++;
+			bytes_received++;
+		}
 
-    /* end of line + end of buffer => return line */
-    if (bytes_received == count -1) {
-      /* set last byte to END_LINE */
-      *(return_buffer + offset)= END_LINE;
-      bytes_received = 0;
-      return ++offset;
-    }
+		/* end of line + end of buffer => return line */
+		if (bytes_received == count - 1) {
+			/* set last byte to END_LINE */
+			*(return_buffer + offset) = END_LINE;
+			bytes_received = 0;
+			return ++offset;
+		}
 
-    /* end of line but still some data in buffer => return line */
-    if (bytes_received < count-1) {
-      /* set last byte to END_LINE */
-      *(return_buffer + offset) = END_LINE;
-      bytes_received++;
-      return ++offset;
-    }
+		/* end of line but still some data in buffer => return line */
+		if (bytes_received < count - 1) {
+			/* set last byte to END_LINE */
+			*(return_buffer + offset) = END_LINE;
+			bytes_received++;
+			return ++offset;
+		}
 
-    /* end of buffer but line is not ended => */
-    /*  wait for more data to arrive on socket */
-    if (bytes_received == count) {
-      bytes_received = 0;
-      return offset;
-    }
+		/* end of buffer but line is not ended => */
+		/*  wait for more data to arrive on socket */
+		if (bytes_received == count) {
+			bytes_received = 0;
+			return offset;
+		}
 
-  } /* while */
+	}			/* while */
 
 }
+
 /*
  * Function:     ltp_multi_server_queue
  * Description:  This function grabs the multiCast message from the queue and outputs to stdio
  */
-void* ltp_multi_server_queue (void *junk)
+void *ltp_multi_server_queue(void *junk)
 {
 
-    printf("%s: waiting for data on port Multicast %u\n",
-           hostname, LOCAL_MULTI_SERVER_PORT);
+	printf("%s: waiting for data on port Multicast %u\n",
+	       hostname, LOCAL_MULTI_SERVER_PORT);
 
-    /* infinite server loop */
-    while (1) {
+	/* infinite server loop */
+	while (1) {
 
-        multiClientLen=sizeof(multiClientAddr);
+		multiClientLen = sizeof(multiClientAddr);
 
-        msg_bytes = recvfrom(multiSocketHandle, message, MAX_MSG_LEN, 0, (struct sockaddr *) &multiClientAddr, &multiClientLen);
+		msg_bytes =
+		    recvfrom(multiSocketHandle, message, MAX_MSG_LEN, 0,
+			     (struct sockaddr *)&multiClientAddr,
+			     &multiClientLen);
 
-        if (msg_bytes < 0) {
-            printf("%s : cannot receive data\n",hostname);
-            continue;
-        }
+		if (msg_bytes < 0) {
+			printf("%s : cannot receive data\n", hostname);
+			continue;
+		}
 
-        printf("%s : from %s:%d on %s : %s\n",ServerProg,
-               inet_ntoa(multiClientAddr.sin_addr), ntohs(multiClientAddr.sin_port),
-               hostname,
-               message);
+		printf("%s : from %s:%d on %s : %s\n", ServerProg,
+		       inet_ntoa(multiClientAddr.sin_addr),
+		       ntohs(multiClientAddr.sin_port), hostname, message);
 
-    }/* end of infinite server loop */
+	}			/* end of infinite server loop */
 
-    return NULL;
+	return NULL;
 
 }
diff --git a/testcases/network/stress/ns-tools/ns-common.c b/testcases/network/stress/ns-tools/ns-common.c
index f0234e7..9b4263c 100644
--- a/testcases/network/stress/ns-tools/ns-common.c
+++ b/testcases/network/stress/ns-tools/ns-common.c
@@ -68,11 +68,10 @@
  * Return value:
  *  This function does not return.
  */
-void
-fatal_error(char *errmsg)
+void fatal_error(char *errmsg)
 {
-    perror(errmsg);
-    exit(EXIT_FAILURE);
+	perror(errmsg);
+	exit(EXIT_FAILURE);
 }
 
 /*
@@ -87,43 +86,48 @@
  * Return value:
  *  None
  */
-void
-maximize_sockbuf(int sd)
+void maximize_sockbuf(int sd)
 {
-    size_t idx;
-    int level[] = { SO_RCVBUF, SO_SNDBUF };
-    char *procfile[] = { PROC_RMEM_MAX, PROC_WMEM_MAX };
-    char *bufname[] = {"rcvbuf", "sndbuf"};
+	size_t idx;
+	int level[] = { SO_RCVBUF, SO_SNDBUF };
+	char *procfile[] = { PROC_RMEM_MAX, PROC_WMEM_MAX };
+	char *bufname[] = { "rcvbuf", "sndbuf" };
 
-    for (idx = 0; idx < (sizeof(level) / sizeof(int)); idx++) {
-	FILE *fp;		/* File pointer to a proc file */
-	int bufsiz;		/* buffer size of socket */
-	unsigned int optlen;	/* size of sd option parameter */
+	for (idx = 0; idx < (sizeof(level) / sizeof(int)); idx++) {
+		FILE *fp;	/* File pointer to a proc file */
+		int bufsiz;	/* buffer size of socket */
+		unsigned int optlen;	/* size of sd option parameter */
 
-	if ((fp = fopen(procfile[idx], "r")) == NULL) {
-	    fprintf(stderr, "Failed to open %s\n", procfile[idx]);
-	    fatal_error("fopen()");
-	}
-	if ((fscanf(fp, "%d", &bufsiz)) != 1) {
-	    fprintf(stderr, "Failed to read from %s\n", procfile[idx]);
-	    fatal_error("fscanf()");
-	}
-	if (setsockopt(sd, SOL_SOCKET, level[idx], &bufsiz, sizeof(int))) {
-	    fatal_error("setsockopt()");
-	}
-	if (fclose(fp)) {
-	    fprintf(stderr, "Failed to close to %s\n", procfile[idx]);
-	    fatal_error("fopen()");
-	}
+		if ((fp = fopen(procfile[idx], "r")) == NULL) {
+			fprintf(stderr, "Failed to open %s\n", procfile[idx]);
+			fatal_error("fopen()");
+		}
+		if ((fscanf(fp, "%d", &bufsiz)) != 1) {
+			fprintf(stderr, "Failed to read from %s\n",
+				procfile[idx]);
+			fatal_error("fscanf()");
+		}
+		if (setsockopt
+		    (sd, SOL_SOCKET, level[idx], &bufsiz, sizeof(int))) {
+			fatal_error("setsockopt()");
+		}
+		if (fclose(fp)) {
+			fprintf(stderr, "Failed to close to %s\n",
+				procfile[idx]);
+			fatal_error("fopen()");
+		}
 
-	if (debug) {
-	    optlen = sizeof(bufsiz);
-	    if (getsockopt(sd, SOL_SOCKET, level[idx], &bufsiz, &optlen) < 0) {
-		fatal_error("getsockopt()");
-	    }
-	    fprintf(stderr, "socket %s size is %d\n", bufname[idx], bufsiz);
+		if (debug) {
+			optlen = sizeof(bufsiz);
+			if (getsockopt
+			    (sd, SOL_SOCKET, level[idx], &bufsiz,
+			     &optlen) < 0) {
+				fatal_error("getsockopt()");
+			}
+			fprintf(stderr, "socket %s size is %d\n", bufname[idx],
+				bufsiz);
+		}
 	}
-    }
 }
 
 /*
@@ -139,26 +143,25 @@
  * Return value:
  *  None
  */
-u_int16_t
-calc_checksum(u_int16_t *data, size_t size)
+u_int16_t calc_checksum(u_int16_t * data, size_t size)
 {
-    u_int32_t sum;
-    u_int16_t *pos;
-    size_t rest;
+	u_int32_t sum;
+	u_int16_t *pos;
+	size_t rest;
 
-    sum = 0;
-    pos = data;
-    for (rest = size; rest > 1; rest -= 2)
-	sum += *(pos++);
+	sum = 0;
+	pos = data;
+	for (rest = size; rest > 1; rest -= 2)
+		sum += *(pos++);
 
-    if (rest > 0)
-	sum += (*pos) & 0xff00;
+	if (rest > 0)
+		sum += (*pos) & 0xff00;
 
-    sum = (sum & 0xffff) + (sum >> 16);
-    sum = (sum & 0xffff) + (sum >> 16);
-    sum = ~sum;
+	sum = (sum & 0xffff) + (sum >> 16);
+	sum = (sum & 0xffff) + (sum >> 16);
+	sum = ~sum;
 
-    return sum;
+	return sum;
 }
 
 /*
@@ -174,13 +177,12 @@
  * Return value:
  *  None
  */
-void
-fill_payload(unsigned char *payload_p, size_t size)
+void fill_payload(unsigned char *payload_p, size_t size)
 {
-    size_t idx;
+	size_t idx;
 
-    for (idx = 0; idx < size; idx++)
-	*(payload_p + idx) = idx % 0x100;
+	for (idx = 0; idx < size; idx++)
+		*(payload_p + idx) = idx % 0x100;
 }
 
 /*
@@ -196,19 +198,18 @@
  * Return value:
  *  integer value between first to last
  */
-int
-rand_within(int first, int last)
+int rand_within(int first, int last)
 {
-    unsigned int num;
-    int rand_val;
+	unsigned int num;
+	int rand_val;
 
-    first = first < 0 ? 0 : first;
-    last  = RAND_MAX < (unsigned int)last ? RAND_MAX : last;
+	first = first < 0 ? 0 : first;
+	last = RAND_MAX < (unsigned int)last ? RAND_MAX : last;
 
-    num = last - first + 1U;
-    rand_val = rand() / ((RAND_MAX + 1U) / num) + first;
+	num = last - first + 1U;
+	rand_val = rand() / ((RAND_MAX + 1U) / num) + first;
 
-    return rand_val;
+	return rand_val;
 }
 
 /*
@@ -224,19 +225,18 @@
  * Return value:
  *  seed of the bit for change.
  */
-u_int32_t
-bit_change_seed(size_t bitsize, size_t oversize)
+u_int32_t bit_change_seed(size_t bitsize, size_t oversize)
 {
-    int rand_val;
-    u_int32_t seed;
-    rand_val = rand() / ((RAND_MAX + 1U) / (bitsize + oversize));
+	int rand_val;
+	u_int32_t seed;
+	rand_val = rand() / ((RAND_MAX + 1U) / (bitsize + oversize));
 
-    seed = (rand_val < bitsize) ? (0x00000001 << rand_val) : 0;
+	seed = (rand_val < bitsize) ? (0x00000001 << rand_val) : 0;
 
-    if (debug)
-	fprintf(stderr, "Bit seed is %08x\n", seed);
+	if (debug)
+		fprintf(stderr, "Bit seed is %08x\n", seed);
 
-    return seed;
+	return seed;
 }
 
 /*
@@ -255,35 +255,34 @@
  *    0  : Success
  *    1  : Fail
  */
-int
-eth_pton(int af, const char *str, struct sockaddr_ll *ll)
+int eth_pton(int af, const char *str, struct sockaddr_ll *ll)
 {
-    size_t idx;
-    unsigned char *addr_p;
-    unsigned int val[ETH_ALEN];
+	size_t idx;
+	unsigned char *addr_p;
+	unsigned int val[ETH_ALEN];
 
-    ll->sll_family      = AF_PACKET;            /* Always AF_PACKET */
-    if (af == AF_INET)
-	ll->sll_protocol    = htons(ETH_P_IP);		/* IPv4 */
-    else
-	ll->sll_protocol    = htons(ETH_P_IPV6);	/* IPv6 */
-    ll->sll_ifindex     = 0;                    /* any interface */
-    ll->sll_hatype      = ARPHRD_ETHER;         /* Header type */
-    ll->sll_pkttype     = PACKET_OTHERHOST;     /* Packet type */
-    ll->sll_halen       = ETH_ALEN;             /* Length of address */
+	ll->sll_family = AF_PACKET;	/* Always AF_PACKET */
+	if (af == AF_INET)
+		ll->sll_protocol = htons(ETH_P_IP);	/* IPv4 */
+	else
+		ll->sll_protocol = htons(ETH_P_IPV6);	/* IPv6 */
+	ll->sll_ifindex = 0;	/* any interface */
+	ll->sll_hatype = ARPHRD_ETHER;	/* Header type */
+	ll->sll_pkttype = PACKET_OTHERHOST;	/* Packet type */
+	ll->sll_halen = ETH_ALEN;	/* Length of address */
 
-    /* Physical layer address */
-    if (sscanf(str, "%2x:%2x:%2x:%2x:%2x:%2x", &val[0], &val[1],
-		&val[2], &val[3], &val[4], &val[5]) != ETH_ALEN) {
-	fprintf(stderr, "%s is not a valid MAC address", str);
-	return 1;
-    }
+	/* Physical layer address */
+	if (sscanf(str, "%2x:%2x:%2x:%2x:%2x:%2x", &val[0], &val[1],
+		   &val[2], &val[3], &val[4], &val[5]) != ETH_ALEN) {
+		fprintf(stderr, "%s is not a valid MAC address", str);
+		return 1;
+	}
 
-    addr_p = (unsigned char *)ll->sll_addr;
-    for (idx = 0; idx < ETH_ALEN; idx++)
-	addr_p[idx] = val[idx];
+	addr_p = (unsigned char *)ll->sll_addr;
+	for (idx = 0; idx < ETH_ALEN; idx++)
+		addr_p[idx] = val[idx];
 
-        return 0;
+	return 0;
 }
 
 /*
@@ -302,14 +301,13 @@
  *  None
  *
  */
-void
-get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query)
+void get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query)
 {
-    memset(ans, '\0', sizeof(struct ifreq));
-    strncpy(ans->ifr_name, ifname, (IFNAMSIZ - 1));
+	memset(ans, '\0', sizeof(struct ifreq));
+	strncpy(ans->ifr_name, ifname, (IFNAMSIZ - 1));
 
-    if (ioctl(sock_fd, query, ans) < 0)
-	fatal_error("ioctl()");
+	if (ioctl(sock_fd, query, ans) < 0)
+		fatal_error("ioctl()");
 }
 
 /*
@@ -326,31 +324,30 @@
  *  0: Success
  *  1: Fail
  */
-int
-strtotimespec(const char *str, struct timespec *ts_p)
+int strtotimespec(const char *str, struct timespec *ts_p)
 {
-    size_t len;
-    char *sec_str;
-    unsigned long sec  = 0;
-    unsigned long nsec = 0;
+	size_t len;
+	char *sec_str;
+	unsigned long sec = 0;
+	unsigned long nsec = 0;
 
-    len = strlen(str);
-    if (len > 9) {	/* Check the specified value is bigger than 999999999 */
-	sec_str = calloc((len - 9 + 1), sizeof(char));
-	strncpy(sec_str, str, len - 9);
-	sec  = strtoul(sec_str, NULL, 0);
-	if (sec > 0x7fffffff)
-	    return 1;
-	free(sec_str);
-	nsec = strtoul(str + len - 9, NULL, 0);
-    } else {
-	nsec = strtoul(str, NULL, 0);
-    }
+	len = strlen(str);
+	if (len > 9) {		/* Check the specified value is bigger than 999999999 */
+		sec_str = calloc((len - 9 + 1), sizeof(char));
+		strncpy(sec_str, str, len - 9);
+		sec = strtoul(sec_str, NULL, 0);
+		if (sec > 0x7fffffff)
+			return 1;
+		free(sec_str);
+		nsec = strtoul(str + len - 9, NULL, 0);
+	} else {
+		nsec = strtoul(str, NULL, 0);
+	}
 
-    ts_p->tv_sec  = sec;
-    ts_p->tv_nsec = nsec;
+	ts_p->tv_sec = sec;
+	ts_p->tv_nsec = nsec;
 
-        return 0;
+	return 0;
 }
 
 /*
@@ -368,58 +365,58 @@
  *  0: Success
  *  1: Fail
  */
-int
-get_a_lla_byifindex(struct sockaddr_in6 *lla_p, int ifindex)
+int get_a_lla_byifindex(struct sockaddr_in6 *lla_p, int ifindex)
 {
-    FILE *fp;
-    int ret;
-    unsigned int oct[16];
-    int ifidx, prefixlen, scope;
-    char line[PROC_IFINET6_FILE_LINELENGTH];
-    int pos;
+	FILE *fp;
+	int ret;
+	unsigned int oct[16];
+	int ifidx, prefixlen, scope;
+	char line[PROC_IFINET6_FILE_LINELENGTH];
+	int pos;
 
-    if ((fp = fopen(PROC_IFINET6_FILE, "r")) == NULL) {
-	fprintf(stderr, "Faile to open %s\n", PROC_IFINET6_FILE);
+	if ((fp = fopen(PROC_IFINET6_FILE, "r")) == NULL) {
+		fprintf(stderr, "Faile to open %s\n", PROC_IFINET6_FILE);
+		return 1;
+	}
+
+	while (fgets(line, PROC_IFINET6_FILE_LINELENGTH, fp) != NULL) {
+		ret = sscanf(line,
+			     "%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x %x %x %x",
+			     &oct[0], &oct[1], &oct[2], &oct[3],
+			     &oct[4], &oct[5], &oct[6], &oct[7],
+			     &oct[8], &oct[9], &oct[10], &oct[11],
+			     &oct[12], &oct[13], &oct[14], &oct[15],
+			     &ifidx, &prefixlen, &scope);
+
+		if (ret == EOF)
+			fatal_error("scanf()");
+		else if (ret != 19)
+			fatal_error
+			    ("The number of input item is less than the expected");
+
+		if (ifidx != ifindex)
+			continue;
+
+		if (prefixlen != 64)
+			continue;
+
+		if (scope != PROC_IFINET6_LINKLOCAL)
+			continue;
+
+		/* Find a link-local address */
+		lla_p->sin6_family = AF_INET6;
+		lla_p->sin6_port = 0;
+		lla_p->sin6_flowinfo = 0;
+		lla_p->sin6_scope_id = ifindex;
+
+		for (pos = 0; pos < 16; pos++)
+			lla_p->sin6_addr.s6_addr[pos] = oct[pos];
+
+		return 0;
+	}
+
+	fprintf(stderr, "No link-local address is found.\n");
 	return 1;
-    }
-
-    while (fgets(line, PROC_IFINET6_FILE_LINELENGTH, fp) != NULL) {
-	ret = sscanf(line,
-		"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x %x %x %x",
-		&oct[0],  &oct[1],  &oct[2],  &oct[3],
-		&oct[4],  &oct[5],  &oct[6],  &oct[7],
-		&oct[8],  &oct[9],  &oct[10], &oct[11],
-		&oct[12], &oct[13], &oct[14], &oct[15],
-		&ifidx, &prefixlen, &scope);
-
-	if (ret == EOF)
-	    fatal_error("scanf()");
-	else if (ret != 19)
-	    fatal_error("The number of input item is less than the expected");
-
-	if (ifidx != ifindex)
-	    continue;
-
-	if (prefixlen != 64)
-	    continue;
-
-	if (scope != PROC_IFINET6_LINKLOCAL)
-	    continue;
-
-	/* Find a link-local address */
-	lla_p->sin6_family	= AF_INET6;
-	lla_p->sin6_port	= 0;
-	lla_p->sin6_flowinfo	= 0;
-	lla_p->sin6_scope_id	= ifindex;
-
-	for (pos = 0; pos < 16; pos++)
-	    lla_p->sin6_addr.s6_addr[pos] = oct[pos];
-
-	return 0;
-    }
-
-    fprintf(stderr, "No link-local address is found.\n");
-    return 1;
 }
 
 /*
@@ -437,30 +434,30 @@
  * Return value:
  *  pointer to the addrinfo which stores the multicast address information
  */
-struct addrinfo *
-get_maddrinfo(sa_family_t family, const char *maddr, const char *portnum)
+struct addrinfo *get_maddrinfo(sa_family_t family, const char *maddr,
+			       const char *portnum)
 {
-    struct addrinfo hints;      /* hints for getaddrinfo() */
-    struct addrinfo *res;       /* pointer to addrinfo structure */
-    int err;                    /* return value of getaddrinfo */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo structure */
+	int err;		/* return value of getaddrinfo */
 
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
-    hints.ai_flags |= AI_NUMERICHOST;
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
+	hints.ai_flags |= AI_NUMERICHOST;
 
-    err = getaddrinfo(maddr, portnum, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
+	err = getaddrinfo(maddr, portnum, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
+	}
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
 
-    return res;
+	return res;
 }
 
 /*
@@ -477,21 +474,20 @@
  * Return value:
  *  pointer to allocated group_filter structure
  */
-struct group_req *
-create_group_info(uint32_t ifindex, struct addrinfo *mainfo_p)
+struct group_req *create_group_info(uint32_t ifindex, struct addrinfo *mainfo_p)
 {
-    struct group_req *greq;
+	struct group_req *greq;
 
-    /* allocate memory for group_filter */
-    greq = (struct group_req *)calloc(1, sizeof(struct group_req));
-    if (greq == NULL)
-	fatal_error("calloc()");
+	/* allocate memory for group_filter */
+	greq = (struct group_req *)calloc(1, sizeof(struct group_req));
+	if (greq == NULL)
+		fatal_error("calloc()");
 
-    /* substitute informations */
-    greq->gr_interface = ifindex;
-    memcpy(&greq->gr_group, mainfo_p->ai_addr, mainfo_p->ai_addrlen);
+	/* substitute informations */
+	greq->gr_interface = ifindex;
+	memcpy(&greq->gr_group, mainfo_p->ai_addr, mainfo_p->ai_addrlen);
 
-    return greq;
+	return greq;
 }
 
 /*
@@ -510,69 +506,71 @@
  * Return value:
  *  pointer to allocated group_filter structure
  */
-struct group_filter *
-create_source_filter(uint32_t ifindex, struct addrinfo *mainfo_p, uint32_t fmode, char *saddrs)
+struct group_filter *create_source_filter(uint32_t ifindex,
+					  struct addrinfo *mainfo_p,
+					  uint32_t fmode, char *saddrs)
 {
-    struct group_filter *gsf;   /* pointer to group_filter structure */
-    uint32_t numsrc;            /* number of source address */
-    struct addrinfo hints;      /* hints for getaddrinfo() */
-    struct addrinfo *res;       /* pointer to addrinfo structure */
-    int err;                    /* return value of getaddrinfo */
-    uint32_t idx;
-    char *sp, *ep;
+	struct group_filter *gsf;	/* pointer to group_filter structure */
+	uint32_t numsrc;	/* number of source address */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo structure */
+	int err;		/* return value of getaddrinfo */
+	uint32_t idx;
+	char *sp, *ep;
 
-    /* calculate the number of source address */
-    numsrc = 1;
-    for (sp = saddrs; *sp != '\0'; sp++)
-	if (*sp == ',')
-	    numsrc++;
+	/* calculate the number of source address */
+	numsrc = 1;
+	for (sp = saddrs; *sp != '\0'; sp++)
+		if (*sp == ',')
+			numsrc++;
 
-    if (debug)
-	fprintf(stderr, "number of source address is %u\n", numsrc);
-
-    /* allocate memory for group_filter */
-    gsf = (struct group_filter *)calloc(1, GROUP_FILTER_SIZE(numsrc));
-    if (gsf == NULL)
-	fatal_error("calloc()");
-
-    /* substitute interface index, multicast address, filter mode */
-    gsf->gf_interface = ifindex;
-    memcpy(&gsf->gf_group, mainfo_p->ai_addr, mainfo_p->ai_addrlen);
-    gsf->gf_fmode = fmode;
-    gsf->gf_numsrc = numsrc;
-
-    /* extract source address aray and substitute the addersses */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = mainfo_p->ai_family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
-    hints.ai_flags |= AI_NUMERICHOST;
-
-    /* extract source address aray and substitute the addersses */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = mainfo_p->ai_family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
-    hints.ai_flags |= AI_NUMERICHOST;
-
-    sp = saddrs;
-    for (idx = 0; idx < numsrc; idx++) {
-	ep = strchr(sp, ',');
-	if (ep != NULL)
-	    *ep = '\0';
 	if (debug)
-	    fprintf(stderr, "source address[%u]: %s\n", idx, sp);
+		fprintf(stderr, "number of source address is %u\n", numsrc);
 
-	err = getaddrinfo(sp, NULL, &hints, &res);
-	if (err) {
-	    fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	    exit(EXIT_FAILURE);
+	/* allocate memory for group_filter */
+	gsf = (struct group_filter *)calloc(1, GROUP_FILTER_SIZE(numsrc));
+	if (gsf == NULL)
+		fatal_error("calloc()");
+
+	/* substitute interface index, multicast address, filter mode */
+	gsf->gf_interface = ifindex;
+	memcpy(&gsf->gf_group, mainfo_p->ai_addr, mainfo_p->ai_addrlen);
+	gsf->gf_fmode = fmode;
+	gsf->gf_numsrc = numsrc;
+
+	/* extract source address aray and substitute the addersses */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = mainfo_p->ai_family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
+	hints.ai_flags |= AI_NUMERICHOST;
+
+	/* extract source address aray and substitute the addersses */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = mainfo_p->ai_family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
+	hints.ai_flags |= AI_NUMERICHOST;
+
+	sp = saddrs;
+	for (idx = 0; idx < numsrc; idx++) {
+		ep = strchr(sp, ',');
+		if (ep != NULL)
+			*ep = '\0';
+		if (debug)
+			fprintf(stderr, "source address[%u]: %s\n", idx, sp);
+
+		err = getaddrinfo(sp, NULL, &hints, &res);
+		if (err) {
+			fprintf(stderr, "getaddrinfo(): %s\n",
+				gai_strerror(err));
+			exit(EXIT_FAILURE);
+		}
+
+		memcpy(&gsf->gf_slist[idx], res->ai_addr, res->ai_addrlen);
+		freeaddrinfo(res);
+		sp = ep + 1;
 	}
 
-	memcpy(&gsf->gf_slist[idx], res->ai_addr, res->ai_addrlen);
-	freeaddrinfo(res);
-	sp = ep + 1;
-    }
-
-    return gsf;
+	return gsf;
 }
diff --git a/testcases/network/stress/ns-tools/ns-icmp_redirector.c b/testcases/network/stress/ns-tools/ns-icmp_redirector.c
index 4ac8989..56e635f 100644
--- a/testcases/network/stress/ns-tools/ns-icmp_redirector.c
+++ b/testcases/network/stress/ns-tools/ns-icmp_redirector.c
@@ -60,21 +60,21 @@
  * Structure definition
  */
 struct redirector_info {
-    int sd;
-    char *ifname;
-    double timeout;
+	int sd;
+	char *ifname;
+	double timeout;
 };
 
 struct ip4_gateway_info {
-    unsigned char hd_addr[ETH_ALEN];
-    unsigned char ip_addr[4];
-    unsigned char nexthop[4];
+	unsigned char hd_addr[ETH_ALEN];
+	unsigned char ip_addr[4];
+	unsigned char nexthop[4];
 };
 
 struct ip6_gateway_info {
-    unsigned char hd_addr[ETH_ALEN];
-    struct in6_addr ip_addr;
-    struct in6_addr nexthop;
+	unsigned char hd_addr[ETH_ALEN];
+	struct in6_addr ip_addr;
+	struct in6_addr nexthop;
 };
 
 /*
@@ -97,22 +97,20 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-I if_name\tInterface where input/output packets\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-b\t\ttimeout [sec]\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-I if_name\tInterface where input/output packets\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-b\t\ttimeout [sec]\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -127,24 +125,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -163,49 +160,51 @@
  *  None
  */
 void
-parse_options(int argc, char *argv[], struct redirector_info *redirector_p, int *bg_p)
+parse_options(int argc, char *argv[], struct redirector_info *redirector_p,
+	      int *bg_p)
 {
-    int optc;			/* option */
-    double opt_d;		/* option value in double */
+	int optc;		/* option */
+	double opt_d;		/* option value in double */
 
-    while ((optc = getopt(argc, argv, "I:N:t:bdh")) != EOF) {
-	switch (optc) {
-	    case 'I':
-		redirector_p->ifname = strdup(optarg);
-		if (redirector_p->ifname == NULL)
-		    fatal_error("strdup() failed.");
-		break;
+	while ((optc = getopt(argc, argv, "I:N:t:bdh")) != EOF) {
+		switch (optc) {
+		case 'I':
+			redirector_p->ifname = strdup(optarg);
+			if (redirector_p->ifname == NULL)
+				fatal_error("strdup() failed.");
+			break;
 
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			redirector_p->timeout = opt_d;
+			break;
+
+		case 'b':
+			*bg_p = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		redirector_p->timeout = opt_d;
-		break;
+	}
 
-	    case 'b':
-		*bg_p = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	if (redirector_p->ifname == NULL) {
+		fprintf(stderr, "Interface name is not specified\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
-
-    if (redirector_p->ifname == NULL) {
-	fprintf(stderr, "Interface name is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
 }
 
 /*
@@ -220,43 +219,43 @@
  * Return value:
  *  socket file descriptor for receiving packets
  */
-int
-open_socket(const char *ifname)
+int open_socket(const char *ifname)
 {
-    int sd;			    /* Socket to packets */
-    struct ifreq ifinfo;	    /* Interface information */
-    struct sockaddr_ll lla;	    /* Link-local address info for receiving */
+	int sd;			/* Socket to packets */
+	struct ifreq ifinfo;	/* Interface information */
+	struct sockaddr_ll lla;	/* Link-local address info for receiving */
 
-    /* Create a socket for capture */
-    if ((sd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0)
-	fatal_error("socket()");
+	/* Create a socket for capture */
+	if ((sd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0)
+		fatal_error("socket()");
 
-    /* Make a socket into non-blocking mode */
-    if (fcntl(sd, F_SETFL, O_NONBLOCK) < 0)
-    	fatal_error("fcntl()");
+	/* Make a socket into non-blocking mode */
+	if (fcntl(sd, F_SETFL, O_NONBLOCK) < 0)
+		fatal_error("fcntl()");
 
-    /* Get the logical interface number */
-    get_ifinfo(&ifinfo, sd, ifname, SIOCGIFINDEX);
+	/* Get the logical interface number */
+	get_ifinfo(&ifinfo, sd, ifname, SIOCGIFINDEX);
 
-    /* Bind to the interface */
-    memset(&lla, '\0', sizeof(struct sockaddr_ll));
-    lla.sll_family = PF_PACKET;
-    lla.sll_protocol = htons(ETH_P_ALL);
-    lla.sll_ifindex = ifinfo.ifr_ifindex;
-    if (bind(sd, (struct sockaddr *)&lla, sizeof(struct sockaddr_ll)) < 0)
-	fatal_error("bind()");
+	/* Bind to the interface */
+	memset(&lla, '\0', sizeof(struct sockaddr_ll));
+	lla.sll_family = PF_PACKET;
+	lla.sll_protocol = htons(ETH_P_ALL);
+	lla.sll_ifindex = ifinfo.ifr_ifindex;
+	if (bind(sd, (struct sockaddr *)&lla, sizeof(struct sockaddr_ll)) < 0)
+		fatal_error("bind()");
 
-    /* Change into the promiscuous mode */
-    get_ifinfo(&ifinfo, sd, ifname, SIOCGIFFLAGS);
-    ifinfo.ifr_flags = ifinfo.ifr_flags | IFF_PROMISC;
-    if (ioctl(sd, SIOCSIFFLAGS, &ifinfo) < 0)
-	fatal_error("ioctl()");
-    if (debug)
-	fprintf(stderr, "%s is changed into promiscuous mode\n", ifname);
+	/* Change into the promiscuous mode */
+	get_ifinfo(&ifinfo, sd, ifname, SIOCGIFFLAGS);
+	ifinfo.ifr_flags = ifinfo.ifr_flags | IFF_PROMISC;
+	if (ioctl(sd, SIOCSIFFLAGS, &ifinfo) < 0)
+		fatal_error("ioctl()");
+	if (debug)
+		fprintf(stderr, "%s is changed into promiscuous mode\n",
+			ifname);
 
-    if (debug)
-	fprintf(stderr, "Packet receiving socket is %d\n", sd);
-    return sd;
+	if (debug)
+		fprintf(stderr, "Packet receiving socket is %d\n", sd);
+	return sd;
 }
 
 /*
@@ -275,72 +274,74 @@
  *  None
  */
 void
-return_arp_reply(int sd, struct eth_frame *rcveth_p, struct ip4_gateway_info *gateway_p)
+return_arp_reply(int sd, struct eth_frame *rcveth_p,
+		 struct ip4_gateway_info *gateway_p)
 {
-    int retval;
-    struct arp_datagram *rcvarp_p;	/* ARP part of receiving frame */
-    unsigned char new_hd_addr[ETH_ALEN];    /* New MAC address */
-    unsigned char new_nexthop[4];	/* New next hop */
-    size_t sndeth_size;			/* Size of sending frame */
-    struct eth_frame sndeth;		/* sending frame */
-    struct arp_datagram *sndarp_p;	/* ARP part of sending frame */
+	int retval;
+	struct arp_datagram *rcvarp_p;	/* ARP part of receiving frame */
+	unsigned char new_hd_addr[ETH_ALEN];	/* New MAC address */
+	unsigned char new_nexthop[4];	/* New next hop */
+	size_t sndeth_size;	/* Size of sending frame */
+	struct eth_frame sndeth;	/* sending frame */
+	struct arp_datagram *sndarp_p;	/* ARP part of sending frame */
 
-    rcvarp_p = (struct arp_datagram *)&(rcveth_p->data);
+	rcvarp_p = (struct arp_datagram *)&(rcveth_p->data);
 
-    /* If arp message is not arp request, do nothing */
-    if (debug)
-	fprintf(stderr, "ARP OP code is %02x\n", ntohs(rcvarp_p->hdr.ar_op));
-    if (rcvarp_p->hdr.ar_op != htons(ARPOP_REQUEST))
-	return;
+	/* If arp message is not arp request, do nothing */
+	if (debug)
+		fprintf(stderr, "ARP OP code is %02x\n",
+			ntohs(rcvarp_p->hdr.ar_op));
+	if (rcvarp_p->hdr.ar_op != htons(ARPOP_REQUEST))
+		return;
 
-    /* Update the gateway information */
-    memset(new_hd_addr, '\0', ETH_ALEN);		/* MAC address */
-    for (;;) {
-	new_hd_addr[3] = rand_within(0, 254);
-	new_hd_addr[4] = rand_within(0, 254);
-	new_hd_addr[5] = rand_within(1, 254);
-	if (memcmp(gateway_p->hd_addr, new_hd_addr, ETH_ALEN)) {
-	    memcpy(gateway_p->hd_addr, new_hd_addr, ETH_ALEN);
-	    break;
+	/* Update the gateway information */
+	memset(new_hd_addr, '\0', ETH_ALEN);	/* MAC address */
+	for (;;) {
+		new_hd_addr[3] = rand_within(0, 254);
+		new_hd_addr[4] = rand_within(0, 254);
+		new_hd_addr[5] = rand_within(1, 254);
+		if (memcmp(gateway_p->hd_addr, new_hd_addr, ETH_ALEN)) {
+			memcpy(gateway_p->hd_addr, new_hd_addr, ETH_ALEN);
+			break;
+		}
 	}
-    }
 
-    memcpy(gateway_p->ip_addr, rcvarp_p->ar_tip, 4);	/* IP address */
+	memcpy(gateway_p->ip_addr, rcvarp_p->ar_tip, 4);	/* IP address */
 
-    for (;;) {						/* next hop */
-	memcpy(new_nexthop, gateway_p->ip_addr, 4);
-	new_nexthop[3] = rand_within(1, 254);
-	if (memcmp(gateway_p->nexthop, new_nexthop, 4)) {
-	    memcpy(gateway_p->nexthop, new_nexthop, 4);
-	    break;
+	for (;;) {		/* next hop */
+		memcpy(new_nexthop, gateway_p->ip_addr, 4);
+		new_nexthop[3] = rand_within(1, 254);
+		if (memcmp(gateway_p->nexthop, new_nexthop, 4)) {
+			memcpy(gateway_p->nexthop, new_nexthop, 4);
+			break;
+		}
 	}
-    }
 
-    /* Build a frame to send */
-    memset(&sndeth, '\0', sizeof(struct eth_frame));
-    sndarp_p = (struct arp_datagram *)&(sndeth.data);
-    sndeth_size = sizeof(struct ethhdr) + sizeof(struct arp_datagram);
+	/* Build a frame to send */
+	memset(&sndeth, '\0', sizeof(struct eth_frame));
+	sndarp_p = (struct arp_datagram *)&(sndeth.data);
+	sndeth_size = sizeof(struct ethhdr) + sizeof(struct arp_datagram);
 
-    /* Ether */
-    memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
-    memcpy(sndeth.hdr.h_source, gateway_p->hd_addr, ETH_ALEN);
-    sndeth.hdr.h_proto = htons(ETH_P_ARP);
+	/* Ether */
+	memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
+	memcpy(sndeth.hdr.h_source, gateway_p->hd_addr, ETH_ALEN);
+	sndeth.hdr.h_proto = htons(ETH_P_ARP);
 
-    /* Arp */
-    sndarp_p->hdr.ar_hrd = htons(ARPHRD_ETHER);
-    sndarp_p->hdr.ar_pro = htons(ETH_P_IP);
-    sndarp_p->hdr.ar_hln = ETH_ALEN;
-    sndarp_p->hdr.ar_pln = 4;
-    sndarp_p->hdr.ar_op  = htons(ARPOP_REPLY);
-    memcpy(sndarp_p->ar_sha, gateway_p->hd_addr, ETH_ALEN);
-    memcpy(sndarp_p->ar_sip, gateway_p->ip_addr, 4);
-    memcpy(sndarp_p->ar_tha, rcvarp_p->ar_sha, ETH_ALEN);
-    memcpy(sndarp_p->ar_tip, rcvarp_p->ar_sip, 4);
+	/* Arp */
+	sndarp_p->hdr.ar_hrd = htons(ARPHRD_ETHER);
+	sndarp_p->hdr.ar_pro = htons(ETH_P_IP);
+	sndarp_p->hdr.ar_hln = ETH_ALEN;
+	sndarp_p->hdr.ar_pln = 4;
+	sndarp_p->hdr.ar_op = htons(ARPOP_REPLY);
+	memcpy(sndarp_p->ar_sha, gateway_p->hd_addr, ETH_ALEN);
+	memcpy(sndarp_p->ar_sip, gateway_p->ip_addr, 4);
+	memcpy(sndarp_p->ar_tha, rcvarp_p->ar_sha, ETH_ALEN);
+	memcpy(sndarp_p->ar_tip, rcvarp_p->ar_sip, 4);
 
-    /* Send ARP reply */
-    retval = write(sd, &sndeth, sndeth_size);
-    if (retval != sndeth_size)
-	fatal_error("write()");
+	/* Send ARP reply */
+	retval = write(sd, &sndeth, sndeth_size);
+	if (retval != sndeth_size)
+		fatal_error("write()");
 }
 
 /*
@@ -359,80 +360,85 @@
  *  None
  */
 void
-return_icmp4_redirect(int sd, struct eth_frame *rcveth_p, size_t rcveth_size, struct ip4_gateway_info *new_gw_p)
+return_icmp4_redirect(int sd, struct eth_frame *rcveth_p, size_t rcveth_size,
+		      struct ip4_gateway_info *new_gw_p)
 {
-    static struct ip4_gateway_info *gw_p;	/* pointor to gateway */
+	static struct ip4_gateway_info *gw_p;	/* pointor to gateway */
 
-    int retval;
-    struct ip4_datagram *rcvip_p;	/* IPv4 part of receiving frame */
-    size_t sndeth_size;			/* Size of sending frame */
-    struct eth_frame sndeth;		/* sending frame */
-    struct ip4_datagram *sndip_p;	/* IPv4 part of sending frame */
-    struct icmp4_segment *sndicmp_p;	/* ICMPv4 part of sending frame */
-    size_t icmp4_datasize;		/* Size of sending ICMPv4 */
+	int retval;
+	struct ip4_datagram *rcvip_p;	/* IPv4 part of receiving frame */
+	size_t sndeth_size;	/* Size of sending frame */
+	struct eth_frame sndeth;	/* sending frame */
+	struct ip4_datagram *sndip_p;	/* IPv4 part of sending frame */
+	struct icmp4_segment *sndicmp_p;	/* ICMPv4 part of sending frame */
+	size_t icmp4_datasize;	/* Size of sending ICMPv4 */
 
-    /* If MAC address in received frame is changed, update the gateway info */
-    if (memcmp(rcveth_p->hdr.h_dest, new_gw_p->hd_addr, ETH_ALEN) == 0) {
-	if (gw_p == NULL)
-	    if ((gw_p = malloc(sizeof(struct ip4_gateway_info))) == NULL)
-		fatal_error("malloc()");
-	*gw_p = *new_gw_p;
-    } else if (gw_p == NULL
-		|| memcmp(rcveth_p->hdr.h_dest, gw_p->hd_addr, ETH_ALEN))
-	return;
+	/* If MAC address in received frame is changed, update the gateway info */
+	if (memcmp(rcveth_p->hdr.h_dest, new_gw_p->hd_addr, ETH_ALEN) == 0) {
+		if (gw_p == NULL)
+			if ((gw_p =
+			     malloc(sizeof(struct ip4_gateway_info))) == NULL)
+				fatal_error("malloc()");
+		*gw_p = *new_gw_p;
+	} else if (gw_p == NULL
+		   || memcmp(rcveth_p->hdr.h_dest, gw_p->hd_addr, ETH_ALEN))
+		return;
 
-    rcvip_p = (struct ip4_datagram *)&(rcveth_p->data);
+	rcvip_p = (struct ip4_datagram *)&(rcveth_p->data);
 
-    /* Build a frame to send */
-    sndeth_size = sizeof(struct ethhdr)			    /* Ether header */
-		    + sizeof(struct iphdr)		    /* IPv4 header */
-		    + sizeof(struct icmphdr)		    /* ICMPv4 header */
-		    + rcveth_size - sizeof(struct ethhdr);  /* ICMPv4 payload */
-    sndeth_size = (sndeth_size < ETH_DATA_MAXSIZE)
-			? sndeth_size : ETH_DATA_MAXSIZE;
-    memset(&sndeth,  '\0', sizeof(struct eth_frame));
-    sndip_p   = (struct ip4_datagram *)&(sndeth.data);
-    sndicmp_p = (struct icmp4_segment *)&(sndip_p->payload);
+	/* Build a frame to send */
+	sndeth_size = sizeof(struct ethhdr)	/* Ether header */
+	    +sizeof(struct iphdr)	/* IPv4 header */
+	    +sizeof(struct icmphdr)	/* ICMPv4 header */
+	    +rcveth_size - sizeof(struct ethhdr);	/* ICMPv4 payload */
+	sndeth_size = (sndeth_size < ETH_DATA_MAXSIZE)
+	    ? sndeth_size : ETH_DATA_MAXSIZE;
+	memset(&sndeth, '\0', sizeof(struct eth_frame));
+	sndip_p = (struct ip4_datagram *)&(sndeth.data);
+	sndicmp_p = (struct icmp4_segment *)&(sndip_p->payload);
 
-    /* Ether */
-    memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
-    memcpy(sndeth.hdr.h_source, gw_p->hd_addr, ETH_ALEN);
-    sndeth.hdr.h_proto = htons(ETH_P_IP);
+	/* Ether */
+	memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
+	memcpy(sndeth.hdr.h_source, gw_p->hd_addr, ETH_ALEN);
+	sndeth.hdr.h_proto = htons(ETH_P_IP);
 
-    /* IP */
-    sndip_p->hdr.version    = 4;
-    sndip_p->hdr.ihl	    = sizeof(struct iphdr) / 4;
-    sndip_p->hdr.tos	    = 0;
-    sndip_p->hdr.tot_len    = htons(sndeth_size - sizeof(struct ethhdr));
-    sndip_p->hdr.id	    = htons(IPV4_PACKET_ID);
-    sndip_p->hdr.frag_off   = htons(IPV4_DEFAULT_FLAG);
-    sndip_p->hdr.ttl	    = IPV4_DEFAULT_TTL;
-    sndip_p->hdr.protocol   = IPPROTO_ICMP;
-    sndip_p->hdr.check	    = 0;	/* Calculate later */
-    memcpy((unsigned char *)&sndip_p->hdr.saddr, gw_p->ip_addr, 4);
-    sndip_p->hdr.daddr	    = rcvip_p->hdr.saddr;
-    sndip_p->hdr.check	    = calc_checksum((u_int16_t *)&(sndip_p->hdr),
-	                                    sizeof(struct iphdr));
+	/* IP */
+	sndip_p->hdr.version = 4;
+	sndip_p->hdr.ihl = sizeof(struct iphdr) / 4;
+	sndip_p->hdr.tos = 0;
+	sndip_p->hdr.tot_len = htons(sndeth_size - sizeof(struct ethhdr));
+	sndip_p->hdr.id = htons(IPV4_PACKET_ID);
+	sndip_p->hdr.frag_off = htons(IPV4_DEFAULT_FLAG);
+	sndip_p->hdr.ttl = IPV4_DEFAULT_TTL;
+	sndip_p->hdr.protocol = IPPROTO_ICMP;
+	sndip_p->hdr.check = 0;	/* Calculate later */
+	memcpy((unsigned char *)&sndip_p->hdr.saddr, gw_p->ip_addr, 4);
+	sndip_p->hdr.daddr = rcvip_p->hdr.saddr;
+	sndip_p->hdr.check = calc_checksum((u_int16_t *) & (sndip_p->hdr),
+					   sizeof(struct iphdr));
 
-    /* ICMP */
-    sndicmp_p->hdr.type	    = ICMP_REDIRECT;
-    sndicmp_p->hdr.code	    = ICMP_REDIR_HOST;
-    sndicmp_p->hdr.checksum = 0;	/* Calculate later */
-    memcpy((unsigned char *)&(sndicmp_p->hdr.un.gateway), gw_p->nexthop, 4);
+	/* ICMP */
+	sndicmp_p->hdr.type = ICMP_REDIRECT;
+	sndicmp_p->hdr.code = ICMP_REDIR_HOST;
+	sndicmp_p->hdr.checksum = 0;	/* Calculate later */
+	memcpy((unsigned char *)&(sndicmp_p->hdr.un.gateway), gw_p->nexthop, 4);
 
-    /* ICMP payload */
-    icmp4_datasize = rcveth_size - sizeof(struct ethhdr);
-    icmp4_datasize = (icmp4_datasize < ICMPV4_DATA_MAXSIZE) ? icmp4_datasize : ICMPV4_DATA_MAXSIZE;
-    memcpy(sndicmp_p->data, rcvip_p, icmp4_datasize);
+	/* ICMP payload */
+	icmp4_datasize = rcveth_size - sizeof(struct ethhdr);
+	icmp4_datasize =
+	    (icmp4_datasize <
+	     ICMPV4_DATA_MAXSIZE) ? icmp4_datasize : ICMPV4_DATA_MAXSIZE;
+	memcpy(sndicmp_p->data, rcvip_p, icmp4_datasize);
 
-    /* Calculate ICMP checksum */
-    sndicmp_p->hdr.checksum = calc_checksum((u_int16_t *)sndicmp_p,
-				sizeof(struct icmphdr) + icmp4_datasize);
+	/* Calculate ICMP checksum */
+	sndicmp_p->hdr.checksum = calc_checksum((u_int16_t *) sndicmp_p,
+						sizeof(struct icmphdr) +
+						icmp4_datasize);
 
-    /* Send ICMP redirect */
-    retval = write(sd, &sndeth, sndeth_size);
-    if (retval != sndeth_size)
-	fatal_error("write()");
+	/* Send ICMP redirect */
+	retval = write(sd, &sndeth, sndeth_size);
+	if (retval != sndeth_size)
+		fatal_error("write()");
 }
 
 /*
@@ -452,105 +458,112 @@
  *  None
  */
 void
-return_neigh_adv(int sd, struct eth_frame *rcveth_p, struct ip6_gateway_info *gateway_p)
+return_neigh_adv(int sd, struct eth_frame *rcveth_p,
+		 struct ip6_gateway_info *gateway_p)
 {
-    int retval;
-    struct ip6_datagram *rcvip6_p;	/* IPv6 part of receiving frame */
-    struct neighbor_sol *rcvns_p;	/* NS part of receiving frame */
-    unsigned char new_hd_addr[ETH_ALEN];    /* new MAC address */
-    struct in6_addr new_nexthop;	/* new next hop */
-    size_t sndeth_size;			/* size of sending frame */
-    struct eth_frame sndeth;		/* sending frame */
-    struct ip6_datagram *sndip6_p;	/* IPv6 part of sending frame */
-    struct pseudo_ip6_datagram p_ip6;	/* pseudo IP header */
-    struct neighbor_adv *sndna_p;	/* NA part of sending frame */
+	int retval;
+	struct ip6_datagram *rcvip6_p;	/* IPv6 part of receiving frame */
+	struct neighbor_sol *rcvns_p;	/* NS part of receiving frame */
+	unsigned char new_hd_addr[ETH_ALEN];	/* new MAC address */
+	struct in6_addr new_nexthop;	/* new next hop */
+	size_t sndeth_size;	/* size of sending frame */
+	struct eth_frame sndeth;	/* sending frame */
+	struct ip6_datagram *sndip6_p;	/* IPv6 part of sending frame */
+	struct pseudo_ip6_datagram p_ip6;	/* pseudo IP header */
+	struct neighbor_adv *sndna_p;	/* NA part of sending frame */
 
-    rcvip6_p = (struct ip6_datagram *)&(rcveth_p->data);
-    rcvns_p  = (struct neighbor_sol *)&(rcvip6_p->payload);
+	rcvip6_p = (struct ip6_datagram *)&(rcveth_p->data);
+	rcvns_p = (struct neighbor_sol *)&(rcvip6_p->payload);
 
-    /* If NS is DAD NS, do nothing */
-    if (memcmp(&(rcvip6_p->hdr.ip6_src), &in6addr_any, sizeof(struct in6_addr)) == 0) {
-	if (debug) {
-	    fprintf(stderr, "Received NS is a DAD NS\n");
-	    return;
+	/* If NS is DAD NS, do nothing */
+	if (memcmp
+	    (&(rcvip6_p->hdr.ip6_src), &in6addr_any,
+	     sizeof(struct in6_addr)) == 0) {
+		if (debug) {
+			fprintf(stderr, "Received NS is a DAD NS\n");
+			return;
+		}
 	}
-    }
 
-    /* Update the gateway information */
-    memset(new_hd_addr, '\0', ETH_ALEN);		/* MAC address */
-    for (;;) {
-	new_hd_addr[3] = rand_within(0, 254);
-	new_hd_addr[4] = rand_within(0, 254);
-	new_hd_addr[5] = rand_within(1, 254);
-	if (memcmp(gateway_p->hd_addr, new_hd_addr, ETH_ALEN)) {
-	    memcpy(gateway_p->hd_addr, new_hd_addr, ETH_ALEN);
-	    break;
+	/* Update the gateway information */
+	memset(new_hd_addr, '\0', ETH_ALEN);	/* MAC address */
+	for (;;) {
+		new_hd_addr[3] = rand_within(0, 254);
+		new_hd_addr[4] = rand_within(0, 254);
+		new_hd_addr[5] = rand_within(1, 254);
+		if (memcmp(gateway_p->hd_addr, new_hd_addr, ETH_ALEN)) {
+			memcpy(gateway_p->hd_addr, new_hd_addr, ETH_ALEN);
+			break;
+		}
 	}
-    }
 
-    gateway_p->ip_addr = rcvns_p->defs.nd_ns_target;	/* IP address */
+	gateway_p->ip_addr = rcvns_p->defs.nd_ns_target;	/* IP address */
 
-    for (;;) {						/* next hop */
-	memset(&new_nexthop, '\0', sizeof(struct in6_addr));
-	new_nexthop.s6_addr[0]  = 0xfe;
-	new_nexthop.s6_addr[1]  = 0x80;
-	new_nexthop.s6_addr[15] = rand_within(1, 254);
-	if (memcmp(&(gateway_p->nexthop), &new_nexthop, sizeof(struct in6_addr))) {
-	    gateway_p->nexthop = new_nexthop;
-	    break;
+	for (;;) {		/* next hop */
+		memset(&new_nexthop, '\0', sizeof(struct in6_addr));
+		new_nexthop.s6_addr[0] = 0xfe;
+		new_nexthop.s6_addr[1] = 0x80;
+		new_nexthop.s6_addr[15] = rand_within(1, 254);
+		if (memcmp
+		    (&(gateway_p->nexthop), &new_nexthop,
+		     sizeof(struct in6_addr))) {
+			gateway_p->nexthop = new_nexthop;
+			break;
+		}
 	}
-    }
 
-    /* Build a frame to send */
-    sndeth_size = sizeof(struct ethhdr) + sizeof(struct ip6_hdr)
-					+ sizeof(struct neighbor_adv);
-    memset(&sndeth,  '\0', sizeof(struct eth_frame));
-    sndip6_p = (struct ip6_datagram *)&(sndeth.data);
-    sndna_p  = (struct neighbor_adv *)&(sndip6_p->payload);
+	/* Build a frame to send */
+	sndeth_size = sizeof(struct ethhdr) + sizeof(struct ip6_hdr)
+	    + sizeof(struct neighbor_adv);
+	memset(&sndeth, '\0', sizeof(struct eth_frame));
+	sndip6_p = (struct ip6_datagram *)&(sndeth.data);
+	sndna_p = (struct neighbor_adv *)&(sndip6_p->payload);
 
-    /* Ether */
-    memcpy(sndeth.hdr.h_dest, rcvns_p->src_laddr, ETH_ALEN);
-    memcpy(sndeth.hdr.h_source, gateway_p->hd_addr, ETH_ALEN);
-    sndeth.hdr.h_proto = htons(ETH_P_IPV6);
+	/* Ether */
+	memcpy(sndeth.hdr.h_dest, rcvns_p->src_laddr, ETH_ALEN);
+	memcpy(sndeth.hdr.h_source, gateway_p->hd_addr, ETH_ALEN);
+	sndeth.hdr.h_proto = htons(ETH_P_IPV6);
 
-    /* IPv6 */
-    sndip6_p->hdr.ip6_vfc	= 6 << 4;
-    sndip6_p->hdr.ip6_flow	|= 0;
-    sndip6_p->hdr.ip6_plen	= htons(sizeof(struct neighbor_adv));
-    sndip6_p->hdr.ip6_nxt	= IPPROTO_ICMPV6;
-    sndip6_p->hdr.ip6_hlim	= 255;
-    sndip6_p->hdr.ip6_src	= gateway_p->ip_addr;
-    sndip6_p->hdr.ip6_dst	= rcvip6_p->hdr.ip6_src;
+	/* IPv6 */
+	sndip6_p->hdr.ip6_vfc = 6 << 4;
+	sndip6_p->hdr.ip6_flow |= 0;
+	sndip6_p->hdr.ip6_plen = htons(sizeof(struct neighbor_adv));
+	sndip6_p->hdr.ip6_nxt = IPPROTO_ICMPV6;
+	sndip6_p->hdr.ip6_hlim = 255;
+	sndip6_p->hdr.ip6_src = gateway_p->ip_addr;
+	sndip6_p->hdr.ip6_dst = rcvip6_p->hdr.ip6_src;
 
-    /* Neighbor Advertisement */
-    sndna_p->defs.nd_na_type	= ND_NEIGHBOR_ADVERT;
-    sndna_p->defs.nd_na_code	= 0;
-    sndna_p->defs.nd_na_cksum	= 0;		/* Calculate later */
-    sndna_p->defs.nd_na_target	= gateway_p->ip_addr;
-    sndna_p->defs.nd_na_flags_reserved
-	= ND_NA_FLAG_ROUTER | ND_NA_FLAG_SOLICITED | ND_NA_FLAG_OVERRIDE;
-    sndna_p->tla_opt.nd_opt_type    = ND_OPT_TARGET_LINKADDR;
-    sndna_p->tla_opt.nd_opt_len     = 1;
-    memcpy(sndna_p->tgt_laddr, &(gateway_p->hd_addr), ETH_ALEN);
+	/* Neighbor Advertisement */
+	sndna_p->defs.nd_na_type = ND_NEIGHBOR_ADVERT;
+	sndna_p->defs.nd_na_code = 0;
+	sndna_p->defs.nd_na_cksum = 0;	/* Calculate later */
+	sndna_p->defs.nd_na_target = gateway_p->ip_addr;
+	sndna_p->defs.nd_na_flags_reserved
+	    = ND_NA_FLAG_ROUTER | ND_NA_FLAG_SOLICITED | ND_NA_FLAG_OVERRIDE;
+	sndna_p->tla_opt.nd_opt_type = ND_OPT_TARGET_LINKADDR;
+	sndna_p->tla_opt.nd_opt_len = 1;
+	memcpy(sndna_p->tgt_laddr, &(gateway_p->hd_addr), ETH_ALEN);
 
-    /* Pseudo IPv6 datagram for checksum calculation */
-    memset(&p_ip6, '\0', sizeof(struct pseudo_ip6_datagram));
-    p_ip6.hdr.p_ip6_src	    = sndip6_p->hdr.ip6_src;
-    p_ip6.hdr.p_ip6_dst	    = sndip6_p->hdr.ip6_dst;
-    p_ip6.hdr.p_ip6_plen    = sndip6_p->hdr.ip6_plen;
-    p_ip6.hdr.p_ip6_zero1   = 0;
-    p_ip6.hdr.p_ip6_zero2   = 0;
-    p_ip6.hdr.p_ip6_nxt	    = sndip6_p->hdr.ip6_nxt;
-    memcpy(p_ip6.payload, sndna_p, sizeof(struct neighbor_adv));
+	/* Pseudo IPv6 datagram for checksum calculation */
+	memset(&p_ip6, '\0', sizeof(struct pseudo_ip6_datagram));
+	p_ip6.hdr.p_ip6_src = sndip6_p->hdr.ip6_src;
+	p_ip6.hdr.p_ip6_dst = sndip6_p->hdr.ip6_dst;
+	p_ip6.hdr.p_ip6_plen = sndip6_p->hdr.ip6_plen;
+	p_ip6.hdr.p_ip6_zero1 = 0;
+	p_ip6.hdr.p_ip6_zero2 = 0;
+	p_ip6.hdr.p_ip6_nxt = sndip6_p->hdr.ip6_nxt;
+	memcpy(p_ip6.payload, sndna_p, sizeof(struct neighbor_adv));
 
-    /* Calculate checksum */
-    sndna_p->defs.nd_na_cksum	= calc_checksum((u_int16_t *)(&p_ip6),
-		sizeof(struct pseudo_ip6_hdr) + sizeof(struct neighbor_adv));
+	/* Calculate checksum */
+	sndna_p->defs.nd_na_cksum = calc_checksum((u_int16_t *) (&p_ip6),
+						  sizeof(struct pseudo_ip6_hdr)
+						  +
+						  sizeof(struct neighbor_adv));
 
-    /* Send Neighbor Advertisement reply */
-    retval = write(sd, &sndeth, sndeth_size);
-    if (retval != sndeth_size)
-	fatal_error("write()");
+	/* Send Neighbor Advertisement reply */
+	retval = write(sd, &sndeth, sndeth_size);
+	if (retval != sndeth_size)
+		fatal_error("write()");
 }
 
 /*
@@ -569,87 +582,89 @@
  *  None
  */
 void
-return_icmp6_redirect(int sd, struct eth_frame *rcveth_p, size_t rcveth_size, struct ip6_gateway_info *new_gw_p)
+return_icmp6_redirect(int sd, struct eth_frame *rcveth_p, size_t rcveth_size,
+		      struct ip6_gateway_info *new_gw_p)
 {
-    static struct ip6_gateway_info *gw_p = NULL;	/* pointor to gateway */
+	static struct ip6_gateway_info *gw_p = NULL;	/* pointor to gateway */
 
-    int retval;
-    struct ip6_datagram *rcvip6_p;	/* IPv6 part of receiving frame */
-    struct eth_frame sndeth;		/* sending frame */
-    size_t sndeth_size;			/* size of sending frame */
-    struct ip6_datagram *sndip6_p;	/* IPv6 part of sending frame */
-    size_t ip6_payload_size;		/* payload size of IPv6 part */
-    struct pseudo_ip6_datagram p_ip6;	/* pseudo header for checksum */
-    struct neighbor_redirect *sndrd_p;	/* ICMPv6 part of sending frame */
-    size_t redirect_optsize;		/* Option size of ICMPv6 */
+	int retval;
+	struct ip6_datagram *rcvip6_p;	/* IPv6 part of receiving frame */
+	struct eth_frame sndeth;	/* sending frame */
+	size_t sndeth_size;	/* size of sending frame */
+	struct ip6_datagram *sndip6_p;	/* IPv6 part of sending frame */
+	size_t ip6_payload_size;	/* payload size of IPv6 part */
+	struct pseudo_ip6_datagram p_ip6;	/* pseudo header for checksum */
+	struct neighbor_redirect *sndrd_p;	/* ICMPv6 part of sending frame */
+	size_t redirect_optsize;	/* Option size of ICMPv6 */
 
-    rcvip6_p = (struct ip6_datagram *)&(rcveth_p->data);
+	rcvip6_p = (struct ip6_datagram *)&(rcveth_p->data);
 
-     /* If MAC address in received frame is changed, update the gateway info */
-    if (memcmp(rcveth_p->hdr.h_dest, new_gw_p->hd_addr, ETH_ALEN) == 0) {
-	if (gw_p == NULL)
-	    if ((gw_p = malloc(sizeof(struct in6_addr))) == NULL)
-		fatal_error("malloc()");
-	*gw_p = *new_gw_p;
-    } else if (gw_p == NULL
-	    || memcmp(rcveth_p->hdr.h_dest, gw_p->hd_addr, ETH_ALEN))
-	return;
+	/* If MAC address in received frame is changed, update the gateway info */
+	if (memcmp(rcveth_p->hdr.h_dest, new_gw_p->hd_addr, ETH_ALEN) == 0) {
+		if (gw_p == NULL)
+			if ((gw_p = malloc(sizeof(struct in6_addr))) == NULL)
+				fatal_error("malloc()");
+		*gw_p = *new_gw_p;
+	} else if (gw_p == NULL
+		   || memcmp(rcveth_p->hdr.h_dest, gw_p->hd_addr, ETH_ALEN))
+		return;
 
-    /* Build a frame to send */
-    memset(&sndeth,  '\0', sizeof(struct eth_frame));
-    sndip6_p = (struct ip6_datagram *)&(sndeth.data);
-    sndrd_p  = (struct neighbor_redirect *)&(sndip6_p->payload);
-    redirect_optsize = sizeof(struct nd_opt_rd_hdr)
-			+ rcveth_size - sizeof(struct ethhdr);
-    redirect_optsize = (redirect_optsize < RDOPT_MAXSIZE)
-				? redirect_optsize : RDOPT_MAXSIZE;
-    ip6_payload_size = sizeof(struct nd_redirect) + redirect_optsize;
-    sndeth_size = sizeof(struct ethhdr) + sizeof(struct ip6_hdr)
-			+ ip6_payload_size;
+	/* Build a frame to send */
+	memset(&sndeth, '\0', sizeof(struct eth_frame));
+	sndip6_p = (struct ip6_datagram *)&(sndeth.data);
+	sndrd_p = (struct neighbor_redirect *)&(sndip6_p->payload);
+	redirect_optsize = sizeof(struct nd_opt_rd_hdr)
+	    + rcveth_size - sizeof(struct ethhdr);
+	redirect_optsize = (redirect_optsize < RDOPT_MAXSIZE)
+	    ? redirect_optsize : RDOPT_MAXSIZE;
+	ip6_payload_size = sizeof(struct nd_redirect) + redirect_optsize;
+	sndeth_size = sizeof(struct ethhdr) + sizeof(struct ip6_hdr)
+	    + ip6_payload_size;
 
-    /* Ether */
-    memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
-    memcpy(sndeth.hdr.h_source, gw_p->hd_addr, ETH_ALEN);
-    sndeth.hdr.h_proto = htons(ETH_P_IPV6);
+	/* Ether */
+	memcpy(sndeth.hdr.h_dest, rcveth_p->hdr.h_source, ETH_ALEN);
+	memcpy(sndeth.hdr.h_source, gw_p->hd_addr, ETH_ALEN);
+	sndeth.hdr.h_proto = htons(ETH_P_IPV6);
 
-    /* IPv6 */
-    sndip6_p->hdr.ip6_vfc	= 6 << 4;
-    sndip6_p->hdr.ip6_flow	|= 0;
-    sndip6_p->hdr.ip6_plen	= htons(ip6_payload_size);
-    sndip6_p->hdr.ip6_nxt	= IPPROTO_ICMPV6;
-    sndip6_p->hdr.ip6_hlim	= 255;
-    sndip6_p->hdr.ip6_src	= gw_p->ip_addr;
-    sndip6_p->hdr.ip6_dst	= rcvip6_p->hdr.ip6_src;
+	/* IPv6 */
+	sndip6_p->hdr.ip6_vfc = 6 << 4;
+	sndip6_p->hdr.ip6_flow |= 0;
+	sndip6_p->hdr.ip6_plen = htons(ip6_payload_size);
+	sndip6_p->hdr.ip6_nxt = IPPROTO_ICMPV6;
+	sndip6_p->hdr.ip6_hlim = 255;
+	sndip6_p->hdr.ip6_src = gw_p->ip_addr;
+	sndip6_p->hdr.ip6_dst = rcvip6_p->hdr.ip6_src;
 
-    /* Rediret Message */
-    sndrd_p->defs.nd_rd_type		= ND_REDIRECT;
-    sndrd_p->defs.nd_rd_code		= 0;
-    sndrd_p->defs.nd_rd_cksum		= 0;	/* Calculate later */
-    sndrd_p->defs.nd_rd_reserved	= 0;
-    sndrd_p->defs.nd_rd_target		= gw_p->nexthop;
-    sndrd_p->defs.nd_rd_dst		= rcvip6_p->hdr.ip6_dst;;
-    sndrd_p->rdopt_hdr.nd_opt_rh_type	= ND_OPT_REDIRECTED_HEADER;
-    sndrd_p->rdopt_hdr.nd_opt_rh_len	= redirect_optsize / 8;
-    memcpy(sndrd_p->rdopt_data, rcvip6_p, redirect_optsize);
+	/* Rediret Message */
+	sndrd_p->defs.nd_rd_type = ND_REDIRECT;
+	sndrd_p->defs.nd_rd_code = 0;
+	sndrd_p->defs.nd_rd_cksum = 0;	/* Calculate later */
+	sndrd_p->defs.nd_rd_reserved = 0;
+	sndrd_p->defs.nd_rd_target = gw_p->nexthop;
+	sndrd_p->defs.nd_rd_dst = rcvip6_p->hdr.ip6_dst;;
+	sndrd_p->rdopt_hdr.nd_opt_rh_type = ND_OPT_REDIRECTED_HEADER;
+	sndrd_p->rdopt_hdr.nd_opt_rh_len = redirect_optsize / 8;
+	memcpy(sndrd_p->rdopt_data, rcvip6_p, redirect_optsize);
 
-    /* Pseudo IPv6 datagram for checksum calculation */
-    memset(&p_ip6, '\0', sizeof(struct pseudo_ip6_datagram));
-    p_ip6.hdr.p_ip6_src	    = sndip6_p->hdr.ip6_src;
-    p_ip6.hdr.p_ip6_dst	    = sndip6_p->hdr.ip6_dst;
-    p_ip6.hdr.p_ip6_plen    = sndip6_p->hdr.ip6_plen;
-    p_ip6.hdr.p_ip6_zero1   = 0;
-    p_ip6.hdr.p_ip6_zero2   = 0;
-    p_ip6.hdr.p_ip6_nxt	    = sndip6_p->hdr.ip6_nxt;
-    memcpy(p_ip6.payload, sndrd_p, ip6_payload_size);
+	/* Pseudo IPv6 datagram for checksum calculation */
+	memset(&p_ip6, '\0', sizeof(struct pseudo_ip6_datagram));
+	p_ip6.hdr.p_ip6_src = sndip6_p->hdr.ip6_src;
+	p_ip6.hdr.p_ip6_dst = sndip6_p->hdr.ip6_dst;
+	p_ip6.hdr.p_ip6_plen = sndip6_p->hdr.ip6_plen;
+	p_ip6.hdr.p_ip6_zero1 = 0;
+	p_ip6.hdr.p_ip6_zero2 = 0;
+	p_ip6.hdr.p_ip6_nxt = sndip6_p->hdr.ip6_nxt;
+	memcpy(p_ip6.payload, sndrd_p, ip6_payload_size);
 
-    /* Calculate checksum */
-    sndrd_p->defs.nd_rd_cksum	= calc_checksum((u_int16_t *)(&p_ip6),
-		sizeof(struct pseudo_ip6_hdr) + ip6_payload_size);
+	/* Calculate checksum */
+	sndrd_p->defs.nd_rd_cksum = calc_checksum((u_int16_t *) (&p_ip6),
+						  sizeof(struct pseudo_ip6_hdr)
+						  + ip6_payload_size);
 
-    /* Send ICMPv6 redirct message */
-    retval = write(sd, &sndeth, sndeth_size);
-    if (retval != sndeth_size)
-	fatal_error("write()");
+	/* Send ICMPv6 redirct message */
+	retval = write(sd, &sndeth, sndeth_size);
+	if (retval != sndeth_size)
+		fatal_error("write()");
 }
 
 /*
@@ -668,41 +683,43 @@
  *  None
  */
 void
-analyze_ip6_datagram(int sd, struct eth_frame *rcveth_p, size_t rcveth_size, struct ip6_gateway_info *gateway_p)
+analyze_ip6_datagram(int sd, struct eth_frame *rcveth_p, size_t rcveth_size,
+		     struct ip6_gateway_info *gateway_p)
 {
-    struct ip6_datagram *rcvip6_p;	/* IPv6 Part of receiving frame */
-    struct icmp6_segment *rcvicmp6_p;	/* ICMPv6 Part of receiving frame */
-    uint8_t nxt_hdr;			/* Next header of IPv6 */
-    uint8_t icmp6_type;			/* Type of ICMPv6 */
+	struct ip6_datagram *rcvip6_p;	/* IPv6 Part of receiving frame */
+	struct icmp6_segment *rcvicmp6_p;	/* ICMPv6 Part of receiving frame */
+	uint8_t nxt_hdr;	/* Next header of IPv6 */
+	uint8_t icmp6_type;	/* Type of ICMPv6 */
 
-    rcvip6_p  = (struct ip6_datagram *)&(rcveth_p->data);
-    rcvicmp6_p = (struct icmp6_segment *)&(rcvip6_p->payload);
+	rcvip6_p = (struct ip6_datagram *)&(rcveth_p->data);
+	rcvicmp6_p = (struct icmp6_segment *)&(rcvip6_p->payload);
 
-    nxt_hdr = rcvip6_p->hdr.ip6_nxt;
-    switch (nxt_hdr) {
+	nxt_hdr = rcvip6_p->hdr.ip6_nxt;
+	switch (nxt_hdr) {
 	case IPPROTO_ICMPV6:
-	    icmp6_type = rcvicmp6_p->hdr.icmp6_type;
-	    switch (icmp6_type) {
+		icmp6_type = rcvicmp6_p->hdr.icmp6_type;
+		switch (icmp6_type) {
 		case ND_NEIGHBOR_SOLICIT:
-		    if (debug)
-			fprintf(stderr, "Received ICMP NS\n");
-		    return_neigh_adv(sd, rcveth_p, gateway_p);
-		    break;
+			if (debug)
+				fprintf(stderr, "Received ICMP NS\n");
+			return_neigh_adv(sd, rcveth_p, gateway_p);
+			break;
 
 		case ICMP6_ECHO_REQUEST:
-		    if (debug)
-			fprintf(stderr, "Received ICMP Echo Request\n");
-		    return_icmp6_redirect(sd, rcveth_p, rcveth_size, gateway_p);
-		    break;
-	    }
-	    break;
+			if (debug)
+				fprintf(stderr, "Received ICMP Echo Request\n");
+			return_icmp6_redirect(sd, rcveth_p, rcveth_size,
+					      gateway_p);
+			break;
+		}
+		break;
 
 	case IPPROTO_UDP:
-	    if (debug)
-		fprintf(stderr, "Received UDP message\n");
-	    return_icmp6_redirect(sd, rcveth_p, rcveth_size, gateway_p);
-	    break;
-    }
+		if (debug)
+			fprintf(stderr, "Received UDP message\n");
+		return_icmp6_redirect(sd, rcveth_p, rcveth_size, gateway_p);
+		break;
+	}
 }
 
 /*
@@ -717,67 +734,69 @@
  * Return value:
  *  socket file descriptor for receiving packets
  */
-void
-capture_frames(struct redirector_info *redirector_p)
+void capture_frames(struct redirector_info *redirector_p)
 {
-    struct ip4_gateway_info ip4_gateway;	/* IPv4 gateway information */
-    struct ip6_gateway_info ip6_gateway;	/* IPv6 gateway information */
-    struct eth_frame frame;			/* captured frame data */
-    ssize_t frame_size;				/* captured frame size */
-    double start_time;				/* capture starting time */
-    int sd = redirector_p->sd;			/* socket fd for capture */
+	struct ip4_gateway_info ip4_gateway;	/* IPv4 gateway information */
+	struct ip6_gateway_info ip6_gateway;	/* IPv6 gateway information */
+	struct eth_frame frame;	/* captured frame data */
+	ssize_t frame_size;	/* captured frame size */
+	double start_time;	/* capture starting time */
+	int sd = redirector_p->sd;	/* socket fd for capture */
 
-    /* Initialize gateway information */
-    memset(&ip4_gateway, '\0', sizeof(struct ip4_gateway_info));
-    memset(&ip6_gateway, '\0', sizeof(struct ip6_gateway_info));
+	/* Initialize gateway information */
+	memset(&ip4_gateway, '\0', sizeof(struct ip4_gateway_info));
+	memset(&ip6_gateway, '\0', sizeof(struct ip6_gateway_info));
 
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
 
-    /*
-     * loop for capture
-     */
-    start_time = time(NULL);
+	/*
+	 * loop for capture
+	 */
+	start_time = time(NULL);
 
-    for (;;) {
-	frame_size = read(sd, (void *)(&frame), sizeof (frame));
-	if (frame_size < 0) {
-	    if (errno != EAGAIN)
-		fatal_error("read()");
-	} else {
-	    switch (ntohs(frame.hdr.h_proto)) {
-		case ETH_P_ARP:
-		    if (debug)
-			fprintf(stderr, "Get ARP packet\n");
-		    return_arp_reply(sd, &frame, &ip4_gateway);
-		    break;
+	for (;;) {
+		frame_size = read(sd, (void *)(&frame), sizeof(frame));
+		if (frame_size < 0) {
+			if (errno != EAGAIN)
+				fatal_error("read()");
+		} else {
+			switch (ntohs(frame.hdr.h_proto)) {
+			case ETH_P_ARP:
+				if (debug)
+					fprintf(stderr, "Get ARP packet\n");
+				return_arp_reply(sd, &frame, &ip4_gateway);
+				break;
 
-		case ETH_P_IP:
-		    if (debug)
-			fprintf(stderr, "Get IPv4 packet\n");
-		    return_icmp4_redirect(sd, &frame, frame_size, &ip4_gateway);
-		    break;
+			case ETH_P_IP:
+				if (debug)
+					fprintf(stderr, "Get IPv4 packet\n");
+				return_icmp4_redirect(sd, &frame, frame_size,
+						      &ip4_gateway);
+				break;
 
-		case ETH_P_IPV6:
-		    if (debug)
-			fprintf(stderr, "Get IPv6 packet\n");
-		    analyze_ip6_datagram(sd, &frame, frame_size, &ip6_gateway);
-		    break;
-	    }
+			case ETH_P_IPV6:
+				if (debug)
+					fprintf(stderr, "Get IPv6 packet\n");
+				analyze_ip6_datagram(sd, &frame, frame_size,
+						     &ip6_gateway);
+				break;
+			}
+		}
+
+		if (redirector_p->timeout)
+			if (redirector_p->timeout <
+			    difftime(time(NULL), start_time))
+				break;
+
+		if (catch_sighup)	/* catch SIGHUP */
+			break;
 	}
-
-	if (redirector_p->timeout)
-	    if (redirector_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	if (catch_sighup) /* catch SIGHUP */
-	    break;
-    }
 }
 
 /*
@@ -785,27 +804,26 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct redirector_info redirector;
-    int background = 0;
+	struct redirector_info redirector;
+	int background = 0;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
-    srand(getpid());
+	debug = 0;
+	program_name = strdup(argv[0]);
+	srand(getpid());
 
-    memset(&redirector, '\0', sizeof(struct redirector_info));
-    parse_options(argc, argv, &redirector, &background);
+	memset(&redirector, '\0', sizeof(struct redirector_info));
+	parse_options(argc, argv, &redirector, &background);
 
-    redirector.sd = open_socket(redirector.ifname);
+	redirector.sd = open_socket(redirector.ifname);
 
-    if (background)     /* Work in the background */
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	if (background)		/* Work in the background */
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    capture_frames(&redirector);
+	capture_frames(&redirector);
 
-    close(redirector.sd);
-    exit(EXIT_SUCCESS);
+	close(redirector.sd);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-icmpv4_sender.c b/testcases/network/stress/ns-tools/ns-icmpv4_sender.c
index bedc75c..f51ad5f 100644
--- a/testcases/network/stress/ns-tools/ns-icmpv4_sender.c
+++ b/testcases/network/stress/ns-tools/ns-icmpv4_sender.c
@@ -56,17 +56,17 @@
  * Structure Definitions
  */
 struct icmpv4_fake {
-    struct ip4_datagram pkt;
-    char *src_ifname;
-    struct sockaddr_ll saddr_ll;
-    struct sockaddr_ll daddr_ll;
-    struct in_addr saddr;
-    struct in_addr daddr;
-    unsigned short int pkt_size;
-    unsigned short int data_size;
-    double timeout;
+	struct ip4_datagram pkt;
+	char *src_ifname;
+	struct sockaddr_ll saddr_ll;
+	struct sockaddr_ll daddr_ll;
+	struct in_addr saddr;
+	struct in_addr daddr;
+	unsigned short int pkt_size;
+	unsigned short int data_size;
+	double timeout;
 
-    u_int16_t fake_flag;
+	u_int16_t fake_flag;
 };
 
 /*
@@ -89,34 +89,32 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-I if_name\tInterface name of the source host\n"
-		     "\t-S ip_addr\tIPv4 address of the source host\n"
-		     "\t-M mac_addr\tMAC address of the destination host\n"
-		     "\t-D ip_addr\tIPv4 address of the destination host\n"
-		     "\t-s packetsize\tnumber of data bytes (exclude header)\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-		     "\n"
-		     "\t[options for fake]\n"
-		     "\t  -c\tbreak checksum\n"
-		     "\t  -f\tbreak fragment information\n"
-		     "\t  -i\tbreak IPv4 destination address\n"
-		     "\t  -l\tbreak header length\n"
-		     "\t  -L\tbreak total length\n"
-		     "\t  -p\tbreak protocol number\n"
-		     "\t  -v\tbreak IP version\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-I if_name\tInterface name of the source host\n"
+		"\t-S ip_addr\tIPv4 address of the source host\n"
+		"\t-M mac_addr\tMAC address of the destination host\n"
+		"\t-D ip_addr\tIPv4 address of the destination host\n"
+		"\t-s packetsize\tnumber of data bytes (exclude header)\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n"
+		"\n"
+		"\t[options for fake]\n"
+		"\t  -c\tbreak checksum\n"
+		"\t  -f\tbreak fragment information\n"
+		"\t  -i\tbreak IPv4 destination address\n"
+		"\t  -l\tbreak header length\n"
+		"\t  -L\tbreak total length\n"
+		"\t  -p\tbreak protocol number\n"
+		"\t  -v\tbreak IP version\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -131,24 +129,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -165,134 +162,139 @@
  * Return value:
  *  None
  */
-void
-parse_options(int argc, char *argv[], struct icmpv4_fake *fake_p)
+void parse_options(int argc, char *argv[], struct icmpv4_fake *fake_p)
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
-    double opt_d;		/* option value in double */
-    struct in_addr opt_addr;	/* option value in struct in_addr */
-    struct sockaddr_ll opt_addr_ll;	/* option value in struct sockaddr_ll */
-    int is_specified_src_ifname = 0;
-    int is_specified_saddr = 0;
-    int is_specified_daddr_ll = 0;
-    int is_specified_daddr = 0;
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
+	double opt_d;		/* option value in double */
+	struct in_addr opt_addr;	/* option value in struct in_addr */
+	struct sockaddr_ll opt_addr_ll;	/* option value in struct sockaddr_ll */
+	int is_specified_src_ifname = 0;
+	int is_specified_saddr = 0;
+	int is_specified_daddr_ll = 0;
+	int is_specified_daddr = 0;
 
-    while ((optc = getopt(argc, argv, "I:S:M:D:s:t:dhcfilLpv")) != EOF) {
-	switch (optc) {
-	    case 'I':
-		fake_p->src_ifname = strdup(optarg);
-		if (fake_p->src_ifname == NULL)
-		    fatal_error("strdup() failed.");
-		is_specified_src_ifname = 1;
-		break;
+	while ((optc = getopt(argc, argv, "I:S:M:D:s:t:dhcfilLpv")) != EOF) {
+		switch (optc) {
+		case 'I':
+			fake_p->src_ifname = strdup(optarg);
+			if (fake_p->src_ifname == NULL)
+				fatal_error("strdup() failed.");
+			is_specified_src_ifname = 1;
+			break;
 
-	    case 'S':
-		if (inet_pton(AF_INET, optarg, &opt_addr) <= 0) {
-		    fprintf(stderr, "Source address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
+		case 'S':
+			if (inet_pton(AF_INET, optarg, &opt_addr) <= 0) {
+				fprintf(stderr, "Source address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			fake_p->saddr = opt_addr;
+			is_specified_saddr = 1;
+			break;
+
+		case 'M':
+			if (eth_pton(AF_INET, optarg, &opt_addr_ll)) {
+				fprintf(stderr,
+					"Destination MAC address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			fake_p->daddr_ll = opt_addr_ll;
+			is_specified_daddr_ll = 1;
+			break;
+
+		case 'D':
+			if (inet_pton(AF_INET, optarg, &opt_addr) <= 0) {
+				fprintf(stderr,
+					"Destination address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			fake_p->daddr = opt_addr;
+			is_specified_daddr = 1;
+			break;
+
+		case 's':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul > ICMPV4_DATA_MAXSIZE) {
+				fprintf(stderr,
+					"Data size sholud be less than %d\n",
+					ICMPV4_DATA_MAXSIZE + 1);
+				usage(program_name, EXIT_FAILURE);
+			}
+			fake_p->data_size = opt_ul;
+			break;
+
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			fake_p->timeout = opt_d;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+			/* Options for fake */
+		case 'c':
+			fake_p->fake_flag |= FAKE_CHECK;
+			break;
+
+		case 'f':
+			fake_p->fake_flag |= FAKE_FRAGMENT;
+			break;
+
+		case 'i':
+			fake_p->fake_flag |= FAKE_DADDR;
+			break;
+
+		case 'l':
+			fake_p->fake_flag |= FAKE_IHL;
+			break;
+
+		case 'L':
+			fake_p->fake_flag |= FAKE_TOT_LEN;
+			break;
+
+		case 'p':
+			fake_p->fake_flag |= FAKE_PROTOCOL;
+			break;
+
+		case 'v':
+			fake_p->fake_flag |= FAKE_VERSION;
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		fake_p->saddr = opt_addr;
-		is_specified_saddr = 1;
-		break;
+	}
 
-	    case 'M':
-		if (eth_pton(AF_INET, optarg, &opt_addr_ll)) {
-		    fprintf(stderr, "Destination MAC address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		fake_p->daddr_ll = opt_addr_ll;
-		is_specified_daddr_ll = 1;
-		break;
-
-	    case 'D':
-		if (inet_pton(AF_INET, optarg, &opt_addr) <= 0) {
-		    fprintf(stderr, "Destination address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		fake_p->daddr = opt_addr;
-		is_specified_daddr = 1;
-		break;
-
-	    case 's':
-		opt_ul = strtoul(optarg, NULL, 0);
-		if (opt_ul > ICMPV4_DATA_MAXSIZE) {
-		    fprintf(stderr, "Data size sholud be less than %d\n", ICMPV4_DATA_MAXSIZE + 1);
-		    usage(program_name, EXIT_FAILURE);
-		}
-		fake_p->data_size = opt_ul;
-		break;
-
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		fake_p->timeout = opt_d;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    /* Options for fake */
-	    case 'c':
-		fake_p->fake_flag |= FAKE_CHECK;
-		break;
-
-	    case 'f':
-		fake_p->fake_flag |= FAKE_FRAGMENT;
-		break;
-
-	    case 'i':
-		fake_p->fake_flag |= FAKE_DADDR;
-		break;
-
-	    case 'l':
-		fake_p->fake_flag |= FAKE_IHL;
-		break;
-
-	    case 'L':
-		fake_p->fake_flag |= FAKE_TOT_LEN;
-		break;
-
-	    case 'p':
-		fake_p->fake_flag |= FAKE_PROTOCOL;
-		break;
-
-	    case 'v':
-		fake_p->fake_flag |= FAKE_VERSION;
-		break;
-
-	    default:
+	if (!is_specified_src_ifname) {
+		fprintf(stderr,
+			"Interface name of the source host is not specified\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    if (! is_specified_src_ifname) {
-	fprintf(stderr, "Interface name of the source host is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	if (!is_specified_saddr) {
+		fprintf(stderr, "Source IP address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
+	}
 
-    if (! is_specified_saddr) {
-	fprintf(stderr, "Source IP address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	if (!is_specified_daddr_ll) {
+		fprintf(stderr, "Destination MAC address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
+	}
 
-    if (! is_specified_daddr_ll) {
-	fprintf(stderr, "Destination MAC address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (! is_specified_daddr) {
-	fprintf(stderr, "Destination IP address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	if (!is_specified_daddr) {
+		fprintf(stderr, "Destination IP address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
+	}
 }
 
 /*
@@ -308,32 +310,31 @@
  *  None
  *
  */
-void
-complete_eth_addrs(struct icmpv4_fake *fake_p)
+void complete_eth_addrs(struct icmpv4_fake *fake_p)
 {
-    int sock_fd;		/* Socket for ioctl() */
-    struct ifreq ifinfo;	/* Interface information */
+	int sock_fd;		/* Socket for ioctl() */
+	struct ifreq ifinfo;	/* Interface information */
 
-    if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0)
-	fatal_error("socket()");
+	if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0)
+		fatal_error("socket()");
 
-    /* Source */
-    fake_p->saddr_ll.sll_family	    = AF_PACKET;	/* Always AF_PACKET */
-    fake_p->saddr_ll.sll_protocol   = htons(ETH_P_IP);	/* IPv4 */
-    fake_p->saddr_ll.sll_hatype	    = ARPHRD_ETHER;	/* Header type */
-    fake_p->saddr_ll.sll_pkttype    = PACKET_HOST;	/* Packet type */
-    fake_p->saddr_ll.sll_halen	    = ETH_ALEN;		/* Length of address */
+	/* Source */
+	fake_p->saddr_ll.sll_family = AF_PACKET;	/* Always AF_PACKET */
+	fake_p->saddr_ll.sll_protocol = htons(ETH_P_IP);	/* IPv4 */
+	fake_p->saddr_ll.sll_hatype = ARPHRD_ETHER;	/* Header type */
+	fake_p->saddr_ll.sll_pkttype = PACKET_HOST;	/* Packet type */
+	fake_p->saddr_ll.sll_halen = ETH_ALEN;	/* Length of address */
 
-    /* Get the MAC address of the interface at source host */
-    get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFHWADDR);
-    memcpy(fake_p->saddr_ll.sll_addr, ifinfo.ifr_hwaddr.sa_data, ETH_ALEN);
+	/* Get the MAC address of the interface at source host */
+	get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFHWADDR);
+	memcpy(fake_p->saddr_ll.sll_addr, ifinfo.ifr_hwaddr.sa_data, ETH_ALEN);
 
-    /* Get the interface index */
-    get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFINDEX);
-    fake_p->saddr_ll.sll_ifindex = ifinfo.ifr_ifindex;
-    fake_p->daddr_ll.sll_ifindex = ifinfo.ifr_ifindex;
+	/* Get the interface index */
+	get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFINDEX);
+	fake_p->saddr_ll.sll_ifindex = ifinfo.ifr_ifindex;
+	fake_p->daddr_ll.sll_ifindex = ifinfo.ifr_ifindex;
 
-    close(sock_fd);
+	close(sock_fd);
 }
 
 /*
@@ -348,52 +349,52 @@
  * Return value:
  *  None
  */
-void
-create_clean_packet(struct icmpv4_fake *fake_p)
+void create_clean_packet(struct icmpv4_fake *fake_p)
 {
-    struct ip4_datagram pkt;		/* sending IPv4 packet */
-    struct icmp4_segment *icmp_p;	/* ICMPv4 part of sending packet */
-    unsigned short int pkt_size;
+	struct ip4_datagram pkt;	/* sending IPv4 packet */
+	struct icmp4_segment *icmp_p;	/* ICMPv4 part of sending packet */
+	unsigned short int pkt_size;
 
-    memset(&pkt, '\0', sizeof(struct ip4_datagram));
-    pkt_size = sizeof(struct iphdr)		/* IP header */
-		    + sizeof(struct icmphdr)	/* ICMP header */
-		    + fake_p->data_size;	/* ICMP payload */
+	memset(&pkt, '\0', sizeof(struct ip4_datagram));
+	pkt_size = sizeof(struct iphdr)	/* IP header */
+	    +sizeof(struct icmphdr)	/* ICMP header */
+	    +fake_p->data_size;	/* ICMP payload */
 
-    icmp_p = (struct icmp4_segment *)&(pkt.payload);
+	icmp_p = (struct icmp4_segment *)&(pkt.payload);
 
-    /* IPv4 Header */
-    pkt.hdr.version	= 4;
-    pkt.hdr.ihl		= sizeof(struct iphdr) / 4;
-    pkt.hdr.tos		= 0;
-    pkt.hdr.tot_len	= htons(pkt_size);
-    pkt.hdr.id		= htons(IPV4_PACKET_ID);
-    pkt.hdr.frag_off	= htons(IPV4_DEFAULT_FLAG);
-    pkt.hdr.ttl		= IPV4_DEFAULT_TTL;
-    pkt.hdr.protocol	= IPPROTO_ICMP;
-    pkt.hdr.check	= 0;	/* Calculate later */
-    pkt.hdr.saddr	= fake_p->saddr.s_addr;
-    pkt.hdr.daddr	= fake_p->daddr.s_addr;
+	/* IPv4 Header */
+	pkt.hdr.version = 4;
+	pkt.hdr.ihl = sizeof(struct iphdr) / 4;
+	pkt.hdr.tos = 0;
+	pkt.hdr.tot_len = htons(pkt_size);
+	pkt.hdr.id = htons(IPV4_PACKET_ID);
+	pkt.hdr.frag_off = htons(IPV4_DEFAULT_FLAG);
+	pkt.hdr.ttl = IPV4_DEFAULT_TTL;
+	pkt.hdr.protocol = IPPROTO_ICMP;
+	pkt.hdr.check = 0;	/* Calculate later */
+	pkt.hdr.saddr = fake_p->saddr.s_addr;
+	pkt.hdr.daddr = fake_p->daddr.s_addr;
 
-    /* ICMPv4 Header */
-    icmp_p->hdr.type			= ICMP_ECHO;
-    icmp_p->hdr.code			= 0;
-    icmp_p->hdr.checksum		= 0;	/* Calculate later */
-    icmp_p->hdr.un.echo.id		= htons(ICMP_ECHO_ID);
-    icmp_p->hdr.un.echo.sequence	= htons(1);
+	/* ICMPv4 Header */
+	icmp_p->hdr.type = ICMP_ECHO;
+	icmp_p->hdr.code = 0;
+	icmp_p->hdr.checksum = 0;	/* Calculate later */
+	icmp_p->hdr.un.echo.id = htons(ICMP_ECHO_ID);
+	icmp_p->hdr.un.echo.sequence = htons(1);
 
-    /* ICMPv4 Payload */
-    fill_payload(icmp_p->data, fake_p->data_size);
+	/* ICMPv4 Payload */
+	fill_payload(icmp_p->data, fake_p->data_size);
 
-    /* Calcualte checksums */
-    pkt.hdr.check = calc_checksum((u_int16_t *)(&pkt.hdr),
-				sizeof(struct iphdr));
-    icmp_p->hdr.checksum = calc_checksum((u_int16_t *)icmp_p,
-				sizeof(struct icmphdr) + fake_p->data_size);
+	/* Calcualte checksums */
+	pkt.hdr.check = calc_checksum((u_int16_t *) (&pkt.hdr),
+				      sizeof(struct iphdr));
+	icmp_p->hdr.checksum = calc_checksum((u_int16_t *) icmp_p,
+					     sizeof(struct icmphdr) +
+					     fake_p->data_size);
 
-    /* Store the clean packet data */
-    fake_p->pkt = pkt;
-    fake_p->pkt_size = pkt_size;
+	/* Store the clean packet data */
+	fake_p->pkt = pkt;
+	fake_p->pkt_size = pkt_size;
 }
 
 /*
@@ -409,123 +410,123 @@
  * Return value:
  *  None
  */
-void
-thrust_fakes(struct ip4_datagram *pkt, u_int16_t fake_flag)
+void thrust_fakes(struct ip4_datagram *pkt, u_int16_t fake_flag)
 {
-    int rand_val;
-    size_t bitsize;
-    u_int32_t seed;
+	int rand_val;
+	size_t bitsize;
+	u_int32_t seed;
 
-    if (debug)
-	fprintf(stderr, "fake_flag = %2x\n", fake_flag);
+	if (debug)
+		fprintf(stderr, "fake_flag = %2x\n", fake_flag);
 
-    if (fake_flag & FAKE_VERSION) {	/* version */
-	bitsize = 4;
-	seed = bit_change_seed(bitsize, 1);
-	pkt->hdr.version ^= seed;
-    }
-
-    if (fake_flag & FAKE_IHL) {		/* header length */
-	bitsize = 4;
-	seed = bit_change_seed(bitsize, 1);
-	pkt->hdr.ihl ^= seed;
-    }
-
-    if (fake_flag & FAKE_TOT_LEN) {	/* total length */
-	bitsize = sizeof(pkt->hdr.tot_len) * 8;
-	seed = bit_change_seed(bitsize, bitsize / 8);
-	pkt->hdr.tot_len ^= seed;
-    }
-
-    if (fake_flag & FAKE_FRAGMENT) {	/* fragment information */
-	/* Set reserved flag */
-	rand_val = rand() / ((RAND_MAX + 1U) / 16);
-	if (! rand_val) {
-	    if (debug)
-		fprintf (stderr, "Up reserved bit\n");
-	    pkt->hdr.frag_off |= htonl(0x80000000);
+	if (fake_flag & FAKE_VERSION) {	/* version */
+		bitsize = 4;
+		seed = bit_change_seed(bitsize, 1);
+		pkt->hdr.version ^= seed;
 	}
 
-	/* Set more fragments flag */
-	rand_val = rand() / ((RAND_MAX + 1U) / 3);
-	if (! rand_val) {
-	    if (debug)
-		fprintf (stderr, "Set more fragments flag\n");
-	    pkt->hdr.frag_off |= htons(0x2000);
+	if (fake_flag & FAKE_IHL) {	/* header length */
+		bitsize = 4;
+		seed = bit_change_seed(bitsize, 1);
+		pkt->hdr.ihl ^= seed;
 	}
 
-	/* Unset unfragmented flag */
-	rand_val = rand() / ((RAND_MAX + 1U) / 3);
-	if (! rand_val) {
-	    if (debug)
-		fprintf (stderr, "Unset unfragmented flag\n");
-	    pkt->hdr.frag_off &= htons(0xbfff);
+	if (fake_flag & FAKE_TOT_LEN) {	/* total length */
+		bitsize = sizeof(pkt->hdr.tot_len) * 8;
+		seed = bit_change_seed(bitsize, bitsize / 8);
+		pkt->hdr.tot_len ^= seed;
 	}
 
-	/* Set fragment offset */
-	rand_val = rand() / ((RAND_MAX + 1U) / 3);
-	if (! rand_val) {
-	    bitsize = 13;
-	    seed = bit_change_seed(bitsize, 0);
-	    if (debug)
-		fprintf (stderr, "Set fragment offset %02x\n", seed);
-	    pkt->hdr.frag_off |= htons(seed);
-	}
-    }
-
-    if (fake_flag & FAKE_PROTOCOL) {	/* protocol */
-	rand_val = rand() / ((RAND_MAX + 1U) / 5);
-	switch (rand_val) {
-	    case 1:
-	    case 2:
-		if (debug)
-		    fprintf(stderr, "Bit reverse\n");
-		bitsize = sizeof(pkt->hdr.protocol) * 8;
-		seed = bit_change_seed(bitsize, 0);
-		pkt->hdr.protocol ^= seed;
-		break;
-
-	    case 3:
-	    case 4:
-		if (debug)
-		    fprintf(stderr, "Unknown Protocol\n");
-		if (rand_val) {
-		    int number;
-		    int counter;
-		    for (counter=0; counter <= 0xff; counter++) {
-			number = rand() / ((RAND_MAX + 1U) / 0x100);
-			if (getprotobynumber(number) == NULL) {
-			    pkt->hdr.protocol = number;
-			    break;
-			}
-		    }
+	if (fake_flag & FAKE_FRAGMENT) {	/* fragment information */
+		/* Set reserved flag */
+		rand_val = rand() / ((RAND_MAX + 1U) / 16);
+		if (!rand_val) {
+			if (debug)
+				fprintf(stderr, "Up reserved bit\n");
+			pkt->hdr.frag_off |= htonl(0x80000000);
 		}
-		break;
 
-	    default:
-		if (debug)
-		    fprintf(stderr, "Do nothing\n");
-		break;
+		/* Set more fragments flag */
+		rand_val = rand() / ((RAND_MAX + 1U) / 3);
+		if (!rand_val) {
+			if (debug)
+				fprintf(stderr, "Set more fragments flag\n");
+			pkt->hdr.frag_off |= htons(0x2000);
+		}
+
+		/* Unset unfragmented flag */
+		rand_val = rand() / ((RAND_MAX + 1U) / 3);
+		if (!rand_val) {
+			if (debug)
+				fprintf(stderr, "Unset unfragmented flag\n");
+			pkt->hdr.frag_off &= htons(0xbfff);
+		}
+
+		/* Set fragment offset */
+		rand_val = rand() / ((RAND_MAX + 1U) / 3);
+		if (!rand_val) {
+			bitsize = 13;
+			seed = bit_change_seed(bitsize, 0);
+			if (debug)
+				fprintf(stderr, "Set fragment offset %02x\n",
+					seed);
+			pkt->hdr.frag_off |= htons(seed);
+		}
 	}
-    }
 
-    if (fake_flag & FAKE_DADDR) {	/* destination address */
-	bitsize = sizeof(pkt->hdr.daddr) * 8;
-	seed = bit_change_seed(bitsize, bitsize / 8);
-	pkt->hdr.daddr ^= seed;
-    }
+	if (fake_flag & FAKE_PROTOCOL) {	/* protocol */
+		rand_val = rand() / ((RAND_MAX + 1U) / 5);
+		switch (rand_val) {
+		case 1:
+		case 2:
+			if (debug)
+				fprintf(stderr, "Bit reverse\n");
+			bitsize = sizeof(pkt->hdr.protocol) * 8;
+			seed = bit_change_seed(bitsize, 0);
+			pkt->hdr.protocol ^= seed;
+			break;
 
-    /* Recalculate checksum once */
-    pkt->hdr.check = 0;
-    pkt->hdr.check =
-	calc_checksum((u_int16_t *)&(pkt->hdr),
-		sizeof(struct iphdr));
+		case 3:
+		case 4:
+			if (debug)
+				fprintf(stderr, "Unknown Protocol\n");
+			if (rand_val) {
+				int number;
+				int counter;
+				for (counter = 0; counter <= 0xff; counter++) {
+					number =
+					    rand() / ((RAND_MAX + 1U) / 0x100);
+					if (getprotobynumber(number) == NULL) {
+						pkt->hdr.protocol = number;
+						break;
+					}
+				}
+			}
+			break;
 
-    if (fake_flag & FAKE_CHECK) {	/* checksum */
-	bitsize = sizeof(pkt->hdr.check) * 8;
-	seed = bit_change_seed(bitsize, bitsize / 8);
-	pkt->hdr.check ^= seed;
-    }
+		default:
+			if (debug)
+				fprintf(stderr, "Do nothing\n");
+			break;
+		}
+	}
+
+	if (fake_flag & FAKE_DADDR) {	/* destination address */
+		bitsize = sizeof(pkt->hdr.daddr) * 8;
+		seed = bit_change_seed(bitsize, bitsize / 8);
+		pkt->hdr.daddr ^= seed;
+	}
+
+	/* Recalculate checksum once */
+	pkt->hdr.check = 0;
+	pkt->hdr.check =
+	    calc_checksum((u_int16_t *) & (pkt->hdr), sizeof(struct iphdr));
+
+	if (fake_flag & FAKE_CHECK) {	/* checksum */
+		bitsize = sizeof(pkt->hdr.check) * 8;
+		seed = bit_change_seed(bitsize, bitsize / 8);
+		pkt->hdr.check ^= seed;
+	}
 }
 
 /*
@@ -540,61 +541,60 @@
  * Return value:
  *  None
  */
-void
-send_packets(struct icmpv4_fake *fake_p)
+void send_packets(struct icmpv4_fake *fake_p)
 {
-    int sock_fd;
-    int retval;
-    struct ip4_datagram pkt;
-    double start_time;
+	int sock_fd;
+	int retval;
+	struct ip4_datagram pkt;
+	double start_time;
 
-    /* Open a socket */
-    sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
-    if (sock_fd < 0)
-	fatal_error("socket()");
+	/* Open a socket */
+	sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
+	if (sock_fd < 0)
+		fatal_error("socket()");
 
-    /* Bind the socket to the physical address */
-    retval = bind(sock_fd, (struct sockaddr *)&(fake_p->saddr_ll),
-			sizeof(struct sockaddr_ll));
-    if (retval < 0)
-	fatal_error("bind()");
+	/* Bind the socket to the physical address */
+	retval = bind(sock_fd, (struct sockaddr *)&(fake_p->saddr_ll),
+		      sizeof(struct sockaddr_ll));
+	if (retval < 0)
+		fatal_error("bind()");
 
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
 
-    /*
-     * loop for sending packets
-     */
-    pkt	= fake_p->pkt;
-    start_time = time(NULL);
+	/*
+	 * loop for sending packets
+	 */
+	pkt = fake_p->pkt;
+	start_time = time(NULL);
 
-    for (;;) {
-	if (fake_p->fake_flag) {
-	    pkt	= fake_p->pkt;
-	    thrust_fakes(&pkt, fake_p->fake_flag);
+	for (;;) {
+		if (fake_p->fake_flag) {
+			pkt = fake_p->pkt;
+			thrust_fakes(&pkt, fake_p->fake_flag);
+		}
+
+		retval = sendto(sock_fd, &pkt, fake_p->pkt_size, 0,
+				(struct sockaddr *)&(fake_p->daddr_ll),
+				sizeof(struct sockaddr_ll));
+		if (retval < 0)
+			fatal_error("sendto()");
+
+		if (fake_p->timeout)	/* timeout */
+			if (fake_p->timeout < difftime(time(NULL), start_time))
+				break;
+
+		if (catch_sighup)	/* catch SIGHUP */
+			break;
 	}
 
-	retval = sendto(sock_fd, &pkt, fake_p->pkt_size, 0,
-		(struct sockaddr *)&(fake_p->daddr_ll),
-		sizeof(struct sockaddr_ll));
-	if (retval < 0)
-	    fatal_error("sendto()");
-
-	if (fake_p->timeout)		/* timeout */
-	    if (fake_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	if (catch_sighup) /* catch SIGHUP */
-	    break;
-    }
-
-    /* Close the socket */
-    close(sock_fd);
+	/* Close the socket */
+	close(sock_fd);
 }
 
 /*
@@ -602,22 +602,21 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct icmpv4_fake fake_data;
+	struct icmpv4_fake fake_data;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
-    srand(getpid());
+	debug = 0;
+	program_name = strdup(argv[0]);
+	srand(getpid());
 
-    memset(&fake_data, '\0', sizeof(struct icmpv4_fake));
-    parse_options(argc, argv, &fake_data);
+	memset(&fake_data, '\0', sizeof(struct icmpv4_fake));
+	parse_options(argc, argv, &fake_data);
 
-    complete_eth_addrs(&fake_data);
-    create_clean_packet(&fake_data);
+	complete_eth_addrs(&fake_data);
+	create_clean_packet(&fake_data);
 
-    send_packets(&fake_data);
+	send_packets(&fake_data);
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-icmpv6_sender.c b/testcases/network/stress/ns-tools/ns-icmpv6_sender.c
index d2b437d..488c966 100644
--- a/testcases/network/stress/ns-tools/ns-icmpv6_sender.c
+++ b/testcases/network/stress/ns-tools/ns-icmpv6_sender.c
@@ -57,17 +57,17 @@
  * Structure Definitions
  */
 struct icmp6_info {
-    struct ip6_datagram pkt;
-    struct sockaddr_ll saddr_ll;
-    struct sockaddr_ll daddr_ll;
-    struct in6_addr saddr;
-    struct in6_addr daddr;
-    unsigned short int pkt_size;
-    unsigned short int data_size;
-    double timeout;
-    struct timespec interval;
+	struct ip6_datagram pkt;
+	struct sockaddr_ll saddr_ll;
+	struct sockaddr_ll daddr_ll;
+	struct in6_addr saddr;
+	struct in6_addr daddr;
+	unsigned short int pkt_size;
+	unsigned short int data_size;
+	double timeout;
+	struct timespec interval;
 
-    u_int16_t fake_flag;
+	u_int16_t fake_flag;
 };
 
 /*
@@ -91,41 +91,39 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-I if_name\tInterface name of the source host\n"
-		     "\t-S ip_addr\tIPv6 address of the source host\n"
-		     "\t-M mac_addr\tMAC address of the destination host\n"
-		     "\t-D ip_addr\tIPv6 address of the destination host\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-w value\tinterval [nanosec]\n"
-		     "\t-o\t\tsend only one ICMPv6 message\n"
-		     "\t-b\t\twork in the background\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-		     "\n"
-		     "\t[options for echo request]\n"
-		     "\t  -s packetsize\tsize of data (exclude header)\n"
-		     "\n"
-		     "\t[options for fake]\n"
-		     "\t  -i\t\tbreak IPv6 destination address\n"
-		     "\t  -L\t\tbreak payload length\n"
-		     "\t  -n\t\tbreak next header\n"
-		     "\t  -v\t\tbreak IP version\n"
-		     "\n"
-		     "\t[options for MLDv2 query]\n"
-		     "\t  -m\t\tsend MLDv2 query\n"
-		     "\t  -a addrs\tcomma separated array of Source Addresses\n"
-		     "\t  -r value\tMax Resp Code\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-I if_name\tInterface name of the source host\n"
+		"\t-S ip_addr\tIPv6 address of the source host\n"
+		"\t-M mac_addr\tMAC address of the destination host\n"
+		"\t-D ip_addr\tIPv6 address of the destination host\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-w value\tinterval [nanosec]\n"
+		"\t-o\t\tsend only one ICMPv6 message\n"
+		"\t-b\t\twork in the background\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n"
+		"\n"
+		"\t[options for echo request]\n"
+		"\t  -s packetsize\tsize of data (exclude header)\n"
+		"\n"
+		"\t[options for fake]\n"
+		"\t  -i\t\tbreak IPv6 destination address\n"
+		"\t  -L\t\tbreak payload length\n"
+		"\t  -n\t\tbreak next header\n"
+		"\t  -v\t\tbreak IP version\n"
+		"\n"
+		"\t[options for MLDv2 query]\n"
+		"\t  -m\t\tsend MLDv2 query\n"
+		"\t  -a addrs\tcomma separated array of Source Addresses\n"
+		"\t  -r value\tMax Resp Code\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -140,24 +138,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -174,28 +171,27 @@
  *  None
  *
  */
-void
-specify_hw_addr(struct sockaddr_ll *lladdr_p, const char *ifname)
+void specify_hw_addr(struct sockaddr_ll *lladdr_p, const char *ifname)
 {
-    int sock_fd;		/* Socket for ioctl() */
-    struct ifreq ifinfo;	/* Interface information */
+	int sock_fd;		/* Socket for ioctl() */
+	struct ifreq ifinfo;	/* Interface information */
 
-    if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0)
-	fatal_error("socket()");
+	if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0)
+		fatal_error("socket()");
 
-    lladdr_p->sll_family    = AF_PACKET;	/* Always AF_PACKET */
-    lladdr_p->sll_protocol  = htons(ETH_P_IPV6);	/* IPv6 */
-    lladdr_p->sll_hatype    = ARPHRD_ETHER;	/* Header type */
-    lladdr_p->sll_pkttype   = PACKET_HOST;	/* Packet type */
-    lladdr_p->sll_halen	    = ETH_ALEN;		/* Length of address */
+	lladdr_p->sll_family = AF_PACKET;	/* Always AF_PACKET */
+	lladdr_p->sll_protocol = htons(ETH_P_IPV6);	/* IPv6 */
+	lladdr_p->sll_hatype = ARPHRD_ETHER;	/* Header type */
+	lladdr_p->sll_pkttype = PACKET_HOST;	/* Packet type */
+	lladdr_p->sll_halen = ETH_ALEN;	/* Length of address */
 
-    /* Get the MAC address of the interface at source host */
-    get_ifinfo(&ifinfo, sock_fd, ifname, SIOCGIFHWADDR);
-    memcpy(lladdr_p->sll_addr, ifinfo.ifr_hwaddr.sa_data, ETH_ALEN);
+	/* Get the MAC address of the interface at source host */
+	get_ifinfo(&ifinfo, sock_fd, ifname, SIOCGIFHWADDR);
+	memcpy(lladdr_p->sll_addr, ifinfo.ifr_hwaddr.sa_data, ETH_ALEN);
 
-    /* Get the interface index */
-    lladdr_p->sll_ifindex = if_nametoindex(ifname);
-    close(sock_fd);
+	/* Get the interface index */
+	lladdr_p->sll_ifindex = if_nametoindex(ifname);
+	close(sock_fd);
 }
 
 /*
@@ -212,19 +208,18 @@
  * Return value:
  *  None
  */
-void
-calc_hd_mcastaddr(struct sockaddr_ll *lladdr_p, struct in6_addr *addr_p)
+void calc_hd_mcastaddr(struct sockaddr_ll *lladdr_p, struct in6_addr *addr_p)
 {
-    lladdr_p->sll_family    = AF_PACKET;	/* Always AF_PACKET */
-    lladdr_p->sll_protocol  = htons(ETH_P_IPV6);	/* IPv6 */
-    lladdr_p->sll_ifindex   = 0;		/* Unspecified here */
-    lladdr_p->sll_hatype    = ARPHRD_ETHER;	/* Header type */
-    lladdr_p->sll_pkttype   = PACKET_MULTICAST;	/* Packet type */
-    lladdr_p->sll_halen	    = ETH_ALEN;		/* Length of address */
+	lladdr_p->sll_family = AF_PACKET;	/* Always AF_PACKET */
+	lladdr_p->sll_protocol = htons(ETH_P_IPV6);	/* IPv6 */
+	lladdr_p->sll_ifindex = 0;	/* Unspecified here */
+	lladdr_p->sll_hatype = ARPHRD_ETHER;	/* Header type */
+	lladdr_p->sll_pkttype = PACKET_MULTICAST;	/* Packet type */
+	lladdr_p->sll_halen = ETH_ALEN;	/* Length of address */
 
-    lladdr_p->sll_addr[0]   = 0x33;
-    lladdr_p->sll_addr[1]   = 0x33;
-    memcpy(&lladdr_p->sll_addr[2], &addr_p->s6_addr[12], ETH_ALEN - 2);
+	lladdr_p->sll_addr[0] = 0x33;
+	lladdr_p->sll_addr[1] = 0x33;
+	memcpy(&lladdr_p->sll_addr[2], &addr_p->s6_addr[12], ETH_ALEN - 2);
 }
 
 /*
@@ -242,109 +237,113 @@
  *  0: Success
  *  1: Fail
  */
-int
-create_mld_query(struct icmp6_info *info_p, uint16_t mrc, char *saddrs)
+int create_mld_query(struct icmp6_info *info_p, uint16_t mrc, char *saddrs)
 {
-    struct ip6_datagram pkt;		/* ICMPv6 packet */
-    struct hbh_router_alert *alart_p;	/* pointer to router alart */
-    struct my_mldv2_query *query_p;	/* pointer to my_mldv2_query */
-    struct pseudo_ip6_datagram pseudo;	/* ICMPv6 pseudo packet for checksum */
-    uint16_t numsrc;			/* number of source address */
-    unsigned short int ip6_psize;	/* size of IPv6 payload */
-    unsigned short int query_size;	/* size of my_mldv2_query */
-    struct in6_addr ip6;
-    uint32_t idx;
-    char *sp, *ep;
+	struct ip6_datagram pkt;	/* ICMPv6 packet */
+	struct hbh_router_alert *alart_p;	/* pointer to router alart */
+	struct my_mldv2_query *query_p;	/* pointer to my_mldv2_query */
+	struct pseudo_ip6_datagram pseudo;	/* ICMPv6 pseudo packet for checksum */
+	uint16_t numsrc;	/* number of source address */
+	unsigned short int ip6_psize;	/* size of IPv6 payload */
+	unsigned short int query_size;	/* size of my_mldv2_query */
+	struct in6_addr ip6;
+	uint32_t idx;
+	char *sp, *ep;
 
-    memset(&pkt, '\0', sizeof(struct ip6_datagram));
-    alart_p = (struct hbh_router_alert *)&(pkt.payload);
-    query_p = (struct my_mldv2_query *)((unsigned char*)alart_p + sizeof(struct hbh_router_alert));
+	memset(&pkt, '\0', sizeof(struct ip6_datagram));
+	alart_p = (struct hbh_router_alert *)&(pkt.payload);
+	query_p =
+	    (struct my_mldv2_query *)((unsigned char *)alart_p +
+				      sizeof(struct hbh_router_alert));
 
-    /* calculate the number of source address */
-    if (saddrs == NULL) {
-	numsrc = 0;
-    } else {
-	numsrc = 1;
-	for (sp = saddrs; *sp != '\0'; sp++)
-	    if (*sp == ',')
-		numsrc++;
-    }
-    if (debug)
-	fprintf(stderr, "number of source address is %u\n", numsrc);
-
-    query_size = MY_MLDV2_QUERY_SIZE(numsrc);
-    ip6_psize = sizeof(struct hbh_router_alert) + query_size;
-
-    /* IPv6 Header */
-    pkt.hdr.ip6_vfc     = 6 << 4;
-    pkt.hdr.ip6_flow    |= 0;
-    pkt.hdr.ip6_plen    = htons(ip6_psize);
-    pkt.hdr.ip6_nxt     = IPPROTO_HOPOPTS;
-    pkt.hdr.ip6_hlim    = 1;
-    pkt.hdr.ip6_src     = info_p->saddr;
-    pkt.hdr.ip6_dst     = info_p->daddr;
-
-    /* Router Alert Option */
-    alart_p->nxthdr	= IPPROTO_ICMPV6;
-    alart_p->hbh_len	= 0;
-    alart_p->alart_type	= 0x05;			/* router alert */
-    alart_p->alart_len	= 0x02;			/* data len */
-    alart_p->alart_data	= htons(0x0000);	/* MLD */
-    alart_p->padn_type	= 0x01;			/* PadN option */
-    alart_p->padn_len	= 0x00;			/* 2 Octets */
-
-    /* MLDv2 query */
-    query_p->type	= MLD_LISTENER_QUERY;
-    query_p->code	= 0;
-    query_p->cksum	= 0;			/* Calculate later */
-    query_p->maxdelay	= htons(mrc);
-    query_p->resv	= 0;
-    query_p->suppress	= 0;
-    query_p->qrv	= 0;
-    query_p->qqic	= 0;
-    query_p->nsrcs	= htons(numsrc);
-
-    /* define the multicast address */
-    if (memcmp(&info_p->daddr, &in6addr_allnodes, sizeof(struct in6_addr)) == 0)
-	query_p->addr	= in6addr_any;
-    else
-	query_p->addr	= info_p->daddr;
-
-    /* substitute source addresses */
-    sp = saddrs;
-    for (idx = 0; idx < numsrc; idx++) {
-	ep = strchr(sp, ',');
-	if (ep != NULL)
-	    *ep = '\0';
-	if (debug)
-	    fprintf(stderr, "source address[%u]: %s\n", idx, sp);
-
-	if (inet_pton(AF_INET6, sp, &ip6) <= 0) {
-	    fprintf(stderr, "source address list is something wrong\n");
-	    return 1;
+	/* calculate the number of source address */
+	if (saddrs == NULL) {
+		numsrc = 0;
+	} else {
+		numsrc = 1;
+		for (sp = saddrs; *sp != '\0'; sp++)
+			if (*sp == ',')
+				numsrc++;
 	}
-	query_p->srcs[idx] = ip6;
-	sp = ep + 1;
-    }
+	if (debug)
+		fprintf(stderr, "number of source address is %u\n", numsrc);
 
-    /* ICMPv6 Pseudo packet */
-    pseudo.hdr.p_ip6_src	= pkt.hdr.ip6_src;
-    pseudo.hdr.p_ip6_dst	= pkt.hdr.ip6_dst;
-    pseudo.hdr.p_ip6_plen	= htons(query_size);
-    pseudo.hdr.p_ip6_zero1	= 0;
-    pseudo.hdr.p_ip6_zero2	= 0;
-    pseudo.hdr.p_ip6_nxt	= IPPROTO_ICMPV6;
-    memcpy(pseudo.payload, query_p, query_size);
+	query_size = MY_MLDV2_QUERY_SIZE(numsrc);
+	ip6_psize = sizeof(struct hbh_router_alert) + query_size;
 
-    /* Calcualte checksums */
-    query_p->cksum = calc_checksum((u_int16_t *)(&pseudo),
-	    sizeof(struct pseudo_ip6_hdr) + query_size);
+	/* IPv6 Header */
+	pkt.hdr.ip6_vfc = 6 << 4;
+	pkt.hdr.ip6_flow |= 0;
+	pkt.hdr.ip6_plen = htons(ip6_psize);
+	pkt.hdr.ip6_nxt = IPPROTO_HOPOPTS;
+	pkt.hdr.ip6_hlim = 1;
+	pkt.hdr.ip6_src = info_p->saddr;
+	pkt.hdr.ip6_dst = info_p->daddr;
 
-    /* Store the clean packet data */
-    info_p->pkt = pkt;
-    info_p->pkt_size = sizeof(struct ip6_hdr) + ip6_psize;
+	/* Router Alert Option */
+	alart_p->nxthdr = IPPROTO_ICMPV6;
+	alart_p->hbh_len = 0;
+	alart_p->alart_type = 0x05;	/* router alert */
+	alart_p->alart_len = 0x02;	/* data len */
+	alart_p->alart_data = htons(0x0000);	/* MLD */
+	alart_p->padn_type = 0x01;	/* PadN option */
+	alart_p->padn_len = 0x00;	/* 2 Octets */
 
-        return 0;
+	/* MLDv2 query */
+	query_p->type = MLD_LISTENER_QUERY;
+	query_p->code = 0;
+	query_p->cksum = 0;	/* Calculate later */
+	query_p->maxdelay = htons(mrc);
+	query_p->resv = 0;
+	query_p->suppress = 0;
+	query_p->qrv = 0;
+	query_p->qqic = 0;
+	query_p->nsrcs = htons(numsrc);
+
+	/* define the multicast address */
+	if (memcmp(&info_p->daddr, &in6addr_allnodes, sizeof(struct in6_addr))
+	    == 0)
+		query_p->addr = in6addr_any;
+	else
+		query_p->addr = info_p->daddr;
+
+	/* substitute source addresses */
+	sp = saddrs;
+	for (idx = 0; idx < numsrc; idx++) {
+		ep = strchr(sp, ',');
+		if (ep != NULL)
+			*ep = '\0';
+		if (debug)
+			fprintf(stderr, "source address[%u]: %s\n", idx, sp);
+
+		if (inet_pton(AF_INET6, sp, &ip6) <= 0) {
+			fprintf(stderr,
+				"source address list is something wrong\n");
+			return 1;
+		}
+		query_p->srcs[idx] = ip6;
+		sp = ep + 1;
+	}
+
+	/* ICMPv6 Pseudo packet */
+	pseudo.hdr.p_ip6_src = pkt.hdr.ip6_src;
+	pseudo.hdr.p_ip6_dst = pkt.hdr.ip6_dst;
+	pseudo.hdr.p_ip6_plen = htons(query_size);
+	pseudo.hdr.p_ip6_zero1 = 0;
+	pseudo.hdr.p_ip6_zero2 = 0;
+	pseudo.hdr.p_ip6_nxt = IPPROTO_ICMPV6;
+	memcpy(pseudo.payload, query_p, query_size);
+
+	/* Calcualte checksums */
+	query_p->cksum = calc_checksum((u_int16_t *) (&pseudo),
+				       sizeof(struct pseudo_ip6_hdr) +
+				       query_size);
+
+	/* Store the clean packet data */
+	info_p->pkt = pkt;
+	info_p->pkt_size = sizeof(struct ip6_hdr) + ip6_psize;
+
+	return 0;
 }
 
 /*
@@ -359,54 +358,54 @@
  * Return value:
  *  None
  */
-void
-create_echo_request(struct icmp6_info *info_p)
+void create_echo_request(struct icmp6_info *info_p)
 {
-    struct ip6_datagram pkt;		/* ICMPv6 packet */
-    struct icmp6_segment *echoreq_p;	/* Echo request header and payload */
-    struct pseudo_ip6_datagram pseudo;	/* ICMPv6 pseudo packet for checksum */
-    unsigned short int ip6_psize;	/* payload size */
+	struct ip6_datagram pkt;	/* ICMPv6 packet */
+	struct icmp6_segment *echoreq_p;	/* Echo request header and payload */
+	struct pseudo_ip6_datagram pseudo;	/* ICMPv6 pseudo packet for checksum */
+	unsigned short int ip6_psize;	/* payload size */
 
-    ip6_psize = sizeof(struct icmp6_hdr)	/* ICMP header */
-		    + info_p->data_size;	/* ICMP payload */
-    memset(&pkt, '\0', sizeof(struct ip6_datagram));
-    echoreq_p = (struct icmp6_segment *)&(pkt.payload);
+	ip6_psize = sizeof(struct icmp6_hdr)	/* ICMP header */
+	    +info_p->data_size;	/* ICMP payload */
+	memset(&pkt, '\0', sizeof(struct ip6_datagram));
+	echoreq_p = (struct icmp6_segment *)&(pkt.payload);
 
-    /* IPv6 Header */
-    pkt.hdr.ip6_vfc	= 6 << 4;
-    pkt.hdr.ip6_flow	|= 0;
-    pkt.hdr.ip6_plen	= htons(ip6_psize);
-    pkt.hdr.ip6_nxt	= IPPROTO_ICMPV6;
-    pkt.hdr.ip6_hlim	= IPV6_DEFAULT_HOPLIMIT;
-    pkt.hdr.ip6_src	= info_p->saddr;
-    pkt.hdr.ip6_dst	= info_p->daddr;
+	/* IPv6 Header */
+	pkt.hdr.ip6_vfc = 6 << 4;
+	pkt.hdr.ip6_flow |= 0;
+	pkt.hdr.ip6_plen = htons(ip6_psize);
+	pkt.hdr.ip6_nxt = IPPROTO_ICMPV6;
+	pkt.hdr.ip6_hlim = IPV6_DEFAULT_HOPLIMIT;
+	pkt.hdr.ip6_src = info_p->saddr;
+	pkt.hdr.ip6_dst = info_p->daddr;
 
-    /* Echo Request Header */
-    echoreq_p->hdr.icmp6_type	= ICMP6_ECHO_REQUEST;
-    echoreq_p->hdr.icmp6_code	= 0;
-    echoreq_p->hdr.icmp6_cksum	= 0;	/* Calculate later */
-    echoreq_p->hdr.icmp6_id		= htons(ICMP_ECHO_ID);
-    echoreq_p->hdr.icmp6_seq		= htons(1);
+	/* Echo Request Header */
+	echoreq_p->hdr.icmp6_type = ICMP6_ECHO_REQUEST;
+	echoreq_p->hdr.icmp6_code = 0;
+	echoreq_p->hdr.icmp6_cksum = 0;	/* Calculate later */
+	echoreq_p->hdr.icmp6_id = htons(ICMP_ECHO_ID);
+	echoreq_p->hdr.icmp6_seq = htons(1);
 
-    /* Echo Request Payload */
-    fill_payload(echoreq_p->data, info_p->data_size);
+	/* Echo Request Payload */
+	fill_payload(echoreq_p->data, info_p->data_size);
 
-    /* ICMPv6 Pseudo packet */
-    pseudo.hdr.p_ip6_src	= pkt.hdr.ip6_src;
-    pseudo.hdr.p_ip6_dst	= pkt.hdr.ip6_dst;
-    pseudo.hdr.p_ip6_plen	= htons(ip6_psize);
-    pseudo.hdr.p_ip6_zero1	= 0;
-    pseudo.hdr.p_ip6_zero2	= 0;
-    pseudo.hdr.p_ip6_nxt	= IPPROTO_ICMPV6;
-    memcpy(pseudo.payload, echoreq_p, ip6_psize);
+	/* ICMPv6 Pseudo packet */
+	pseudo.hdr.p_ip6_src = pkt.hdr.ip6_src;
+	pseudo.hdr.p_ip6_dst = pkt.hdr.ip6_dst;
+	pseudo.hdr.p_ip6_plen = htons(ip6_psize);
+	pseudo.hdr.p_ip6_zero1 = 0;
+	pseudo.hdr.p_ip6_zero2 = 0;
+	pseudo.hdr.p_ip6_nxt = IPPROTO_ICMPV6;
+	memcpy(pseudo.payload, echoreq_p, ip6_psize);
 
-    /* Calcualte checksums */
-    echoreq_p->hdr.icmp6_cksum = calc_checksum((u_int16_t *)(&pseudo),
-				sizeof(struct pseudo_ip6_hdr) + ip6_psize);
+	/* Calcualte checksums */
+	echoreq_p->hdr.icmp6_cksum = calc_checksum((u_int16_t *) (&pseudo),
+						   sizeof(struct pseudo_ip6_hdr)
+						   + ip6_psize);
 
-    /* Store the clean packet data */
-    info_p->pkt = pkt;
-    info_p->pkt_size = sizeof(struct ip6_hdr) + ip6_psize;
+	/* Store the clean packet data */
+	info_p->pkt = pkt;
+	info_p->pkt_size = sizeof(struct ip6_hdr) + ip6_psize;
 }
 
 /*
@@ -424,190 +423,201 @@
  * Return value:
  *  None
  */
-void
-parse_options(int argc, char *argv[], struct icmp6_info *info_p, int *bg_p)
+void parse_options(int argc, char *argv[], struct icmp6_info *info_p, int *bg_p)
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
-    double opt_d;		/* option value in double */
-    struct in6_addr opt_addr;	/* option value in struct in_addr */
-    struct sockaddr_ll opt_addr_ll;	/* option value in struct sockaddr_ll */
-    char *ifname;		/* interface name where datagrams go out */
-    int  is_mld_query;		/* set to non-zero if sending MLDv2 query */
-    char *mld_saddrs;		/* comma separated array of source addresses */
-    uint16_t max_resp;		/* Max Resp Code */
-    int is_specified_daddr_ll = 0;
-    int is_specified_saddr = 0;
-    int is_specified_daddr = 0;
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
+	double opt_d;		/* option value in double */
+	struct in6_addr opt_addr;	/* option value in struct in_addr */
+	struct sockaddr_ll opt_addr_ll;	/* option value in struct sockaddr_ll */
+	char *ifname;		/* interface name where datagrams go out */
+	int is_mld_query;	/* set to non-zero if sending MLDv2 query */
+	char *mld_saddrs;	/* comma separated array of source addresses */
+	uint16_t max_resp;	/* Max Resp Code */
+	int is_specified_daddr_ll = 0;
+	int is_specified_saddr = 0;
+	int is_specified_daddr = 0;
 
-    ifname = NULL;
-    is_mld_query = 0;
-    mld_saddrs = NULL;
-    max_resp = MY_MLD_MAX_HOST_REPORT_DELAY;
+	ifname = NULL;
+	is_mld_query = 0;
+	mld_saddrs = NULL;
+	max_resp = MY_MLD_MAX_HOST_REPORT_DELAY;
 
-    while ((optc = getopt(argc, argv, "I:S:M:D:t:w:obdhs:iLnvma:r:")) != EOF) {
-	switch (optc) {
-	    case 'I':
-		if (if_nametoindex(optarg) == 0) {
-		    fprintf(stderr, "specified interface is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
+	while ((optc =
+		getopt(argc, argv, "I:S:M:D:t:w:obdhs:iLnvma:r:")) != EOF) {
+		switch (optc) {
+		case 'I':
+			if (if_nametoindex(optarg) == 0) {
+				fprintf(stderr,
+					"specified interface is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			ifname = strdup(optarg);
+			if (ifname == NULL)
+				fatal_error("strdup() failed.");
+			break;
+
+		case 'S':
+			if (inet_pton(AF_INET6, optarg, &opt_addr) <= 0) {
+				fprintf(stderr, "Source address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->saddr = opt_addr;
+			is_specified_saddr = 1;
+			break;
+
+		case 'M':
+			if (eth_pton(AF_INET6, optarg, &opt_addr_ll)) {
+				fprintf(stderr,
+					"Destination MAC address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->daddr_ll = opt_addr_ll;
+			is_specified_daddr_ll = 1;
+			break;
+
+		case 'D':
+			if (inet_pton(AF_INET6, optarg, &opt_addr) <= 0) {
+				fprintf(stderr,
+					"Destination address is wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->daddr = opt_addr;
+			is_specified_daddr = 1;
+			break;
+
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->timeout = opt_d;
+			break;
+
+		case 'w':
+			if (strtotimespec(optarg, &info_p->interval)) {
+				fprintf(stderr,
+					"Interval is something wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'o':
+			info_p->timeout = -1.0;
+			break;
+
+		case 'b':
+			*bg_p = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+			/* Options for echo request */
+		case 's':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul > ICMPV6_DATA_MAXSIZE) {
+				fprintf(stderr,
+					"Data size sholud be less than %d\n",
+					ICMPV6_DATA_MAXSIZE + 1);
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->data_size = opt_ul;
+			break;
+
+			/* Options for fake */
+		case 'i':
+			info_p->fake_flag |= FAKE_DADDR;
+			break;
+
+		case 'L':
+			info_p->fake_flag |= FAKE_PLEN;
+			break;
+
+		case 'n':
+			info_p->fake_flag |= FAKE_NXT;
+			break;
+
+		case 'v':
+			info_p->fake_flag |= FAKE_VERSION;
+			break;
+
+			/* Options for MLDv2 query */
+		case 'm':
+			is_mld_query = 1;
+			break;
+
+		case 'a':
+			mld_saddrs = strdup(optarg);
+			if (mld_saddrs == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 'r':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul > 0xFFFF) {
+				fprintf(stderr,
+					"Max Resp Code should be less than 65536\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			max_resp = opt_ul;
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		ifname = strdup(optarg);
-		if (ifname == NULL)
-		    fatal_error("strdup() failed.");
-		break;
+	}
 
-	    case 'S':
-		if (inet_pton(AF_INET6, optarg, &opt_addr) <= 0) {
-		    fprintf(stderr, "Source address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->saddr = opt_addr;
-		is_specified_saddr = 1;
-		break;
-
-	    case 'M':
-		if (eth_pton(AF_INET6, optarg, &opt_addr_ll)) {
-		    fprintf(stderr, "Destination MAC address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->daddr_ll = opt_addr_ll;
-		is_specified_daddr_ll = 1;
-		break;
-
-	    case 'D':
-		if (inet_pton(AF_INET6, optarg, &opt_addr) <= 0) {
-		    fprintf(stderr, "Destination address is wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->daddr = opt_addr;
-		is_specified_daddr = 1;
-		break;
-
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->timeout = opt_d;
-		break;
-
-	    case 'w':
-		if (strtotimespec(optarg, &info_p->interval)) {
-		    fprintf(stderr, "Interval is something wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'o':
-		info_p->timeout = -1.0;
-		break;
-
-	    case 'b':
-		*bg_p = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    /* Options for echo request */
-	    case 's':
-		opt_ul = strtoul(optarg, NULL, 0);
-		if (opt_ul > ICMPV6_DATA_MAXSIZE) {
-		    fprintf(stderr, "Data size sholud be less than %d\n", ICMPV6_DATA_MAXSIZE + 1);
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->data_size = opt_ul;
-		break;
-
-	    /* Options for fake */
-	    case 'i':
-		info_p->fake_flag |= FAKE_DADDR;
-		break;
-
-	    case 'L':
-		info_p->fake_flag |= FAKE_PLEN;
-		break;
-
-	    case 'n':
-		info_p->fake_flag |= FAKE_NXT;
-		break;
-
-	    case 'v':
-		info_p->fake_flag |= FAKE_VERSION;
-		break;
-
-	    /* Options for MLDv2 query */
-	    case 'm':
-		is_mld_query = 1;
-		break;
-
-	    case 'a':
-		mld_saddrs = strdup(optarg);
-		if (mld_saddrs == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 'r':
-		opt_ul=strtoul(optarg, NULL, 0);
-		if (opt_ul > 0xFFFF) {
-		    fprintf(stderr, "Max Resp Code should be less than 65536\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		max_resp = opt_ul;
-		break;
-
-	    default:
+	if (ifname == NULL) {
+		fprintf(stderr, "Outgoing interface is not specified\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
+	specify_hw_addr(&info_p->saddr_ll, ifname);
 
-    if (ifname == NULL) {
-	fprintf(stderr, "Outgoing interface is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-    specify_hw_addr(&info_p->saddr_ll, ifname);
-
-    if (! is_specified_saddr) {
-	fprintf(stderr, "Source IP address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (is_mld_query) {		/* MLDv2 query */
-	if (info_p->fake_flag) {
-	    fprintf(stderr, "It is not permitted to break MLDv2 query\n");
-	    usage(program_name, EXIT_FAILURE);
+	if (!is_specified_saddr) {
+		fprintf(stderr, "Source IP address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
 	}
 
-	if (! is_specified_daddr)
-	    info_p->daddr = in6addr_allnodes;
+	if (is_mld_query) {	/* MLDv2 query */
+		if (info_p->fake_flag) {
+			fprintf(stderr,
+				"It is not permitted to break MLDv2 query\n");
+			usage(program_name, EXIT_FAILURE);
+		}
 
-	calc_hd_mcastaddr(&info_p->daddr_ll, &info_p->daddr);
-	if (create_mld_query(info_p, max_resp, mld_saddrs))
-	    exit(EXIT_FAILURE);
-    } else {			/* echo request */
-	if (info_p->fake_flag)
-	    srand(getpid());
+		if (!is_specified_daddr)
+			info_p->daddr = in6addr_allnodes;
 
-	if (! is_specified_daddr_ll) {
-	    fprintf(stderr, "Destination MAC address is not specified\n");
-	    usage(program_name, EXIT_FAILURE);
+		calc_hd_mcastaddr(&info_p->daddr_ll, &info_p->daddr);
+		if (create_mld_query(info_p, max_resp, mld_saddrs))
+			exit(EXIT_FAILURE);
+	} else {		/* echo request */
+		if (info_p->fake_flag)
+			srand(getpid());
+
+		if (!is_specified_daddr_ll) {
+			fprintf(stderr,
+				"Destination MAC address is not specified\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+
+		if (!is_specified_daddr) {
+			fprintf(stderr,
+				"Destination IP address is not specified\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+
+		create_echo_request(info_p);
 	}
-
-	if (! is_specified_daddr) {
-	    fprintf(stderr, "Destination IP address is not specified\n");
-	    usage(program_name, EXIT_FAILURE);
-	}
-
-	create_echo_request(info_p);
-    }
-    info_p->daddr_ll.sll_ifindex = if_nametoindex(ifname);
+	info_p->daddr_ll.sll_ifindex = if_nametoindex(ifname);
 }
 
 /*
@@ -623,70 +633,70 @@
  * Return value:
  *  None
  */
-void
-thrust_fakes(struct ip6_datagram *pkt, u_int16_t fake_flag)
+void thrust_fakes(struct ip6_datagram *pkt, u_int16_t fake_flag)
 {
-    int rand_val;
-    size_t bitsize;
-    u_int32_t seed;
+	int rand_val;
+	size_t bitsize;
+	u_int32_t seed;
 
-    if (debug)
-	fprintf(stderr, "fake_flag = %2x\n", fake_flag);
+	if (debug)
+		fprintf(stderr, "fake_flag = %2x\n", fake_flag);
 
-    if (fake_flag & FAKE_VERSION) {	/* version */
-	bitsize = 4;
-	seed = bit_change_seed(bitsize, 1);
-	pkt->hdr.ip6_vfc ^= (seed << 4);
-    }
-
-    if (fake_flag & FAKE_PLEN) {	/* total length */
-	bitsize = sizeof(pkt->hdr.ip6_plen) * 8;
-	seed = bit_change_seed(bitsize, bitsize / 8);
-	pkt->hdr.ip6_plen ^= seed;
-    }
-
-    if (fake_flag & FAKE_NXT) {		/* next header */
-	rand_val = rand() / ((RAND_MAX + 1U) / 5);
-	switch (rand_val) {
-	    case 1:
-	    case 2:
-		if (debug)
-		    fprintf(stderr, "Bit reverse\n");
-		bitsize = sizeof(pkt->hdr.ip6_nxt) * 8;
-		seed = bit_change_seed(bitsize, 0);
-		pkt->hdr.ip6_nxt ^= seed;
-		break;
-
-	    case 3:
-	    case 4:
-		if (debug)
-		    fprintf(stderr, "Unknown Protocol\n");
-		if (rand_val) {
-		    int number;
-		    int counter;
-		    for (counter=0; counter <= 0xff; counter++) {
-			number = rand() / ((RAND_MAX + 1U) / 0x100);
-			if (getprotobynumber(number) == NULL) {
-			    pkt->hdr.ip6_nxt = number;
-			    break;
-			}
-		    }
-		}
-		break;
-
-	    default:
-		if (debug)
-		    fprintf(stderr, "Do nothing\n");
-		break;
+	if (fake_flag & FAKE_VERSION) {	/* version */
+		bitsize = 4;
+		seed = bit_change_seed(bitsize, 1);
+		pkt->hdr.ip6_vfc ^= (seed << 4);
 	}
-    }
 
-    if (fake_flag & FAKE_DADDR) {	/* destination address */
-	rand_val = rand() / ((RAND_MAX + 1U) / 4);
-	bitsize = sizeof(pkt->hdr.ip6_dst.s6_addr32[rand_val]) * 8;
-	seed = bit_change_seed(bitsize, bitsize / 8);
-	pkt->hdr.ip6_dst.s6_addr32[rand_val] ^= seed;
-    }
+	if (fake_flag & FAKE_PLEN) {	/* total length */
+		bitsize = sizeof(pkt->hdr.ip6_plen) * 8;
+		seed = bit_change_seed(bitsize, bitsize / 8);
+		pkt->hdr.ip6_plen ^= seed;
+	}
+
+	if (fake_flag & FAKE_NXT) {	/* next header */
+		rand_val = rand() / ((RAND_MAX + 1U) / 5);
+		switch (rand_val) {
+		case 1:
+		case 2:
+			if (debug)
+				fprintf(stderr, "Bit reverse\n");
+			bitsize = sizeof(pkt->hdr.ip6_nxt) * 8;
+			seed = bit_change_seed(bitsize, 0);
+			pkt->hdr.ip6_nxt ^= seed;
+			break;
+
+		case 3:
+		case 4:
+			if (debug)
+				fprintf(stderr, "Unknown Protocol\n");
+			if (rand_val) {
+				int number;
+				int counter;
+				for (counter = 0; counter <= 0xff; counter++) {
+					number =
+					    rand() / ((RAND_MAX + 1U) / 0x100);
+					if (getprotobynumber(number) == NULL) {
+						pkt->hdr.ip6_nxt = number;
+						break;
+					}
+				}
+			}
+			break;
+
+		default:
+			if (debug)
+				fprintf(stderr, "Do nothing\n");
+			break;
+		}
+	}
+
+	if (fake_flag & FAKE_DADDR) {	/* destination address */
+		rand_val = rand() / ((RAND_MAX + 1U) / 4);
+		bitsize = sizeof(pkt->hdr.ip6_dst.s6_addr32[rand_val]) * 8;
+		seed = bit_change_seed(bitsize, bitsize / 8);
+		pkt->hdr.ip6_dst.s6_addr32[rand_val] ^= seed;
+	}
 }
 
 /*
@@ -701,66 +711,65 @@
  * Return value:
  *  None
  */
-void
-send_packets(struct icmp6_info *info_p)
+void send_packets(struct icmp6_info *info_p)
 {
-    int sock_fd;
-    int retval;
-    struct ip6_datagram pkt;
-    double start_time;
+	int sock_fd;
+	int retval;
+	struct ip6_datagram pkt;
+	double start_time;
 
-    /* Open a socket */
-    sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6));
-    if (sock_fd < 0)
-	fatal_error("socket()");
+	/* Open a socket */
+	sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6));
+	if (sock_fd < 0)
+		fatal_error("socket()");
 
-    /* Bind the socket to the physical address */
-    retval = bind(sock_fd, (struct sockaddr *)&(info_p->saddr_ll),
-			sizeof(struct sockaddr_ll));
-    if (retval < 0)
-	fatal_error("bind()");
+	/* Bind the socket to the physical address */
+	retval = bind(sock_fd, (struct sockaddr *)&(info_p->saddr_ll),
+		      sizeof(struct sockaddr_ll));
+	if (retval < 0)
+		fatal_error("bind()");
 
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
 
-    /*
-     * loop for sending packets
-     */
-    pkt	= info_p->pkt;
-    start_time = time(NULL);
+	/*
+	 * loop for sending packets
+	 */
+	pkt = info_p->pkt;
+	start_time = time(NULL);
 
-    for (;;) {
-	if (info_p->fake_flag) {
-	    pkt	= info_p->pkt;
-	    thrust_fakes(&pkt, info_p->fake_flag);
+	for (;;) {
+		if (info_p->fake_flag) {
+			pkt = info_p->pkt;
+			thrust_fakes(&pkt, info_p->fake_flag);
+		}
+
+		retval = sendto(sock_fd, &pkt, info_p->pkt_size, 0,
+				(struct sockaddr *)&(info_p->daddr_ll),
+				sizeof(struct sockaddr_ll));
+		if (retval < 0)
+			fatal_error("sendto()");
+
+		/* Check timeout:
+		   If timeout value is negative only send one datagram */
+		if (info_p->timeout)
+			if (info_p->timeout < difftime(time(NULL), start_time))
+				break;
+
+		/* Wait in specified interval */
+		nanosleep(&info_p->interval, NULL);
+
+		if (catch_sighup)	/* catch SIGHUP */
+			break;
 	}
 
-	retval = sendto(sock_fd, &pkt, info_p->pkt_size, 0,
-		(struct sockaddr *)&(info_p->daddr_ll),
-		sizeof(struct sockaddr_ll));
-	if (retval < 0)
-	    fatal_error("sendto()");
-
-	/* Check timeout:
-	   If timeout value is negative only send one datagram */
-	if (info_p->timeout)
-	    if (info_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	/* Wait in specified interval */
-	nanosleep(&info_p->interval, NULL);
-
-	if (catch_sighup) /* catch SIGHUP */
-	    break;
-    }
-
-    /* Close the socket */
-    close(sock_fd);
+	/* Close the socket */
+	close(sock_fd);
 }
 
 /*
@@ -768,23 +777,22 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct icmp6_info icmp6_data;
-    int background = 0;
+	struct icmp6_info icmp6_data;
+	int background = 0;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
+	debug = 0;
+	program_name = strdup(argv[0]);
 
-    memset(&icmp6_data, '\0', sizeof(struct icmp6_info));
-    parse_options(argc, argv, &icmp6_data, &background);
+	memset(&icmp6_data, '\0', sizeof(struct icmp6_info));
+	parse_options(argc, argv, &icmp6_data, &background);
 
-    if (background)     /* Work in the background */
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	if (background)		/* Work in the background */
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    send_packets(&icmp6_data);
+	send_packets(&icmp6_data);
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-igmp_querier.c b/testcases/network/stress/ns-tools/ns-igmp_querier.c
index c53ed87..933c1da 100644
--- a/testcases/network/stress/ns-tools/ns-igmp_querier.c
+++ b/testcases/network/stress/ns-tools/ns-igmp_querier.c
@@ -60,10 +60,10 @@
  * Structure Definitions
  */
 struct igmp_info {
-    uint32_t ifindex;
-    struct igmpv3_query *query;
-    double timeout;
-    struct timespec interval;
+	uint32_t ifindex;
+	struct igmpv3_query *query;
+	double timeout;
+	struct timespec interval;
 };
 
 /*
@@ -86,27 +86,25 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-I ifname\tname of listening interface\n"
-		     "\t-m addr\tmulticast address\n"
-		     "\t-s addrs\tcomma separated array of Source Addresses\n"
-		     "\t-r value\tMax Resp Code\n"
-		     "\t-i value\tinterval [nanosec]\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-o\t\tsend only one query\n"
-		     "\t-b\t\twork in the background\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-I ifname\tname of listening interface\n"
+		"\t-m addr\tmulticast address\n"
+		"\t-s addrs\tcomma separated array of Source Addresses\n"
+		"\t-r value\tMax Resp Code\n"
+		"\t-i value\tinterval [nanosec]\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-o\t\tsend only one query\n"
+		"\t-b\t\twork in the background\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -121,24 +119,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -156,76 +153,77 @@
  * Return value:
  *  pointer to allocated igmpv3_query structure
  */
-struct igmpv3_query *
-create_query(uint8_t code, char *maddr, char *saddrs)
+struct igmpv3_query *create_query(uint8_t code, char *maddr, char *saddrs)
 {
-    struct igmpv3_query *query;	/* pointer to igmpv3_query structure */
-    uint16_t numsrc;		/* number of source address */
-    size_t query_size;		/* size of igmpv3_query */
-    struct in_addr ip;
-    uint32_t idx;
-    char *sp, *ep;
+	struct igmpv3_query *query;	/* pointer to igmpv3_query structure */
+	uint16_t numsrc;	/* number of source address */
+	size_t query_size;	/* size of igmpv3_query */
+	struct in_addr ip;
+	uint32_t idx;
+	char *sp, *ep;
 
-    /* calculate the number of source address */
-    if (saddrs == NULL) {
-	numsrc = 0;
-    } else {
-	numsrc = 1;
-	for (sp = saddrs; *sp != '\0'; sp++)
-	    if (*sp == ',')
-		numsrc++;
-    }
-    if (debug)
-	fprintf(stderr, "number of source address is %u\n", numsrc);
-
-    /* allocate memory for igmpv3_query structure */
-    query_size = MY_IGMPV3_QUERY_SIZE(numsrc);
-    query = (struct igmpv3_query *)calloc(1, query_size);
-    if (query == NULL)
-	fatal_error("calloc()");
-
-    /* substitute paramaters */
-    query->type	    = IGMP_HOST_MEMBERSHIP_QUERY;
-    query->code	    = code;
-    query->csum	    = 0;	/* Calculate later */
-    query->resv	    = 0;
-    query->suppress = 0;
-    query->qrv	    = 0;
-    query->qqic	    = 0;
-    query->nsrcs    = htons(numsrc);
-
-    /* substitute multicast address */
-    if (maddr == NULL) {
-	query->group    = htonl(INADDR_ANY);
-    } else {
-	if (inet_pton(AF_INET, maddr, &ip) <= 0) {
-	    fprintf(stderr, "multicast address is something wrong\n");
-	    return NULL;
+	/* calculate the number of source address */
+	if (saddrs == NULL) {
+		numsrc = 0;
+	} else {
+		numsrc = 1;
+		for (sp = saddrs; *sp != '\0'; sp++)
+			if (*sp == ',')
+				numsrc++;
 	}
-	query->group    = ip.s_addr;
-    }
-
-    /* substitute source addresses */
-    sp = saddrs;
-    for (idx = 0; idx < numsrc; idx++) {
-	ep = strchr(sp, ',');
-	if (ep != NULL)
-	    *ep = '\0';
 	if (debug)
-	    fprintf(stderr, "source address[%u]: %s\n", idx, sp);
+		fprintf(stderr, "number of source address is %u\n", numsrc);
 
-	if (inet_pton(AF_INET, sp, &ip) <= 0) {
-	    fprintf(stderr, "source address list is something wrong\n");
-	    return NULL;
+	/* allocate memory for igmpv3_query structure */
+	query_size = MY_IGMPV3_QUERY_SIZE(numsrc);
+	query = (struct igmpv3_query *)calloc(1, query_size);
+	if (query == NULL)
+		fatal_error("calloc()");
+
+	/* substitute paramaters */
+	query->type = IGMP_HOST_MEMBERSHIP_QUERY;
+	query->code = code;
+	query->csum = 0;	/* Calculate later */
+	query->resv = 0;
+	query->suppress = 0;
+	query->qrv = 0;
+	query->qqic = 0;
+	query->nsrcs = htons(numsrc);
+
+	/* substitute multicast address */
+	if (maddr == NULL) {
+		query->group = htonl(INADDR_ANY);
+	} else {
+		if (inet_pton(AF_INET, maddr, &ip) <= 0) {
+			fprintf(stderr,
+				"multicast address is something wrong\n");
+			return NULL;
+		}
+		query->group = ip.s_addr;
 	}
-	query->srcs[idx] = ip.s_addr;
-	sp = ep + 1;
-    }
 
-    /* Calculate checksum */
-    query->csum = calc_checksum((u_int16_t *)query, query_size);
+	/* substitute source addresses */
+	sp = saddrs;
+	for (idx = 0; idx < numsrc; idx++) {
+		ep = strchr(sp, ',');
+		if (ep != NULL)
+			*ep = '\0';
+		if (debug)
+			fprintf(stderr, "source address[%u]: %s\n", idx, sp);
 
-    return query;
+		if (inet_pton(AF_INET, sp, &ip) <= 0) {
+			fprintf(stderr,
+				"source address list is something wrong\n");
+			return NULL;
+		}
+		query->srcs[idx] = ip.s_addr;
+		sp = ep + 1;
+	}
+
+	/* Calculate checksum */
+	query->csum = calc_checksum((u_int16_t *) query, query_size);
+
+	return query;
 }
 
 /*
@@ -243,100 +241,103 @@
  * Return value:
  *  None
  */
-void
-parse_options(int argc, char *argv[], struct igmp_info *info_p, int *bg_p)
+void parse_options(int argc, char *argv[], struct igmp_info *info_p, int *bg_p)
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
-    double opt_d;		/* option value in double */
-    uint8_t max_resp;		/* Max Resp Code */
-    char *maddr;		/* multicast address */
-    char *saddrs;		/* comma separated array of source addresses */
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
+	double opt_d;		/* option value in double */
+	uint8_t max_resp;	/* Max Resp Code */
+	char *maddr;		/* multicast address */
+	char *saddrs;		/* comma separated array of source addresses */
 
-    max_resp = IGMP_MAX_HOST_REPORT_DELAY;
-    maddr = NULL;
-    saddrs = NULL;
+	max_resp = IGMP_MAX_HOST_REPORT_DELAY;
+	maddr = NULL;
+	saddrs = NULL;
 
-    while ((optc = getopt(argc, argv, "I:m:s:r:t:i:obdh")) != EOF) {
-	switch (optc) {
-	    case 'I':
-		info_p->ifindex = if_nametoindex(optarg);
-		if (info_p->ifindex == 0) {
-		    fprintf(stderr, "specified interface is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
+	while ((optc = getopt(argc, argv, "I:m:s:r:t:i:obdh")) != EOF) {
+		switch (optc) {
+		case 'I':
+			info_p->ifindex = if_nametoindex(optarg);
+			if (info_p->ifindex == 0) {
+				fprintf(stderr,
+					"specified interface is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'm':
+			maddr = strdup(optarg);
+			if (maddr == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 's':
+			saddrs = strdup(optarg);
+			if (saddrs == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 'r':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul > 255) {
+				fprintf(stderr,
+					"Max Resp Code should be less then 256\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			max_resp = opt_ul;
+			break;
+
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->timeout = opt_d;
+			break;
+
+		case 'i':
+			if (strtotimespec(optarg, &info_p->interval)) {
+				fprintf(stderr,
+					"Interval is something wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'o':
+			info_p->timeout = -1.0;
+			break;
+
+		case 'b':
+			*bg_p = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		break;
+	}
 
-	    case 'm':
-		maddr = strdup(optarg);
-		if (maddr == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 's':
-		saddrs = strdup(optarg);
-		if (saddrs == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 'r':
-		opt_ul=strtoul(optarg, NULL, 0);
-		if (opt_ul > 255) {
-		    fprintf(stderr, "Max Resp Code should be less then 256\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		max_resp = opt_ul;
-		break;
-
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->timeout = opt_d;
-		break;
-
-	    case 'i':
-		if (strtotimespec(optarg, &info_p->interval)) {
-		    fprintf(stderr, "Interval is something wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'o':
-		info_p->timeout = -1.0;
-		break;
-
-	    case 'b':
-		*bg_p = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	if (info_p->ifindex == 0) {
+		fprintf(stderr, "specified interface seems incorrect\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    if (info_p->ifindex == 0) {
-	fprintf(stderr, "specified interface seems incorrect\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	if ((info_p->query = create_query(max_resp, maddr, saddrs)) == NULL)
+		usage(program_name, EXIT_FAILURE);
 
-    if ((info_p->query = create_query(max_resp, maddr, saddrs)) == NULL)
-	usage(program_name, EXIT_FAILURE);
-
-    if (maddr)
-	free(maddr);
-    if (saddrs)
-	free(saddrs);
+	if (maddr)
+		free(maddr);
+	if (saddrs)
+		free(saddrs);
 }
 
 /*
@@ -351,38 +352,37 @@
  * Return value:
  *  file descriptor referencing the socket
  */
-int
-create_socket(struct igmp_info *info_p)
+int create_socket(struct igmp_info *info_p)
 {
-    int sd;			/* socket file descriptor */
-    int on;
-    unsigned char opt[4] = {0x94, 0x04, 0x00, 0x00};	/* Router Alert */
-    struct ip_mreqn mcast_req, *req_p = &mcast_req;
+	int sd;			/* socket file descriptor */
+	int on;
+	unsigned char opt[4] = { 0x94, 0x04, 0x00, 0x00 };	/* Router Alert */
+	struct ip_mreqn mcast_req, *req_p = &mcast_req;
 
-    /* Create a socket */
-    sd = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
-    if (sd < 0)
-	fatal_error("socket()");
+	/* Create a socket */
+	sd = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
+	if (sd < 0)
+		fatal_error("socket()");
 
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt(): enable to reuse the socket");
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt(): enable to reuse the socket");
 
-    /* Add router alert option */
-    if (setsockopt(sd, IPPROTO_IP, IP_OPTIONS, opt, sizeof(opt)))
-	fatal_error("setsockopt(): socket options");
+	/* Add router alert option */
+	if (setsockopt(sd, IPPROTO_IP, IP_OPTIONS, opt, sizeof(opt)))
+		fatal_error("setsockopt(): socket options");
 
-    /* Specify the interface for outgoing datagrams */
-    req_p->imr_multiaddr.s_addr	= info_p->query->group;
-    req_p->imr_address.s_addr	= htonl(INADDR_ANY);
-    req_p->imr_ifindex		= info_p->ifindex;
-    if (setsockopt(sd, IPPROTO_IP, IP_MULTICAST_IF,
-		   req_p, sizeof(struct ip_mreqn))) {
-	fatal_error("setsockopt(): specify the interface");
-    }
+	/* Specify the interface for outgoing datagrams */
+	req_p->imr_multiaddr.s_addr = info_p->query->group;
+	req_p->imr_address.s_addr = htonl(INADDR_ANY);
+	req_p->imr_ifindex = info_p->ifindex;
+	if (setsockopt(sd, IPPROTO_IP, IP_MULTICAST_IF,
+		       req_p, sizeof(struct ip_mreqn))) {
+		fatal_error("setsockopt(): specify the interface");
+	}
 
-    return sd;
+	return sd;
 }
 
 /*
@@ -397,66 +397,66 @@
  * Return value:
  *  None
  */
-void
-send_query(struct igmp_info *info_p)
+void send_query(struct igmp_info *info_p)
 {
-    int sd;
-    int retval;
-    double start_time;
-    struct sockaddr_in to;
-    size_t query_size;
+	int sd;
+	int retval;
+	double start_time;
+	struct sockaddr_in to;
+	size_t query_size;
 
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    /* Specify multicast address to send */
-    to.sin_family = AF_INET;
-    to.sin_port	  = IPPROTO_IGMP;
-    if (info_p->query->group == htonl(INADDR_ANY))
-	to.sin_addr.s_addr = IGMP_ALL_HOSTS;
-    else
-	to.sin_addr.s_addr = info_p->query->group;
+	/* Specify multicast address to send */
+	to.sin_family = AF_INET;
+	to.sin_port = IPPROTO_IGMP;
+	if (info_p->query->group == htonl(INADDR_ANY))
+		to.sin_addr.s_addr = IGMP_ALL_HOSTS;
+	else
+		to.sin_addr.s_addr = info_p->query->group;
 
-    /* Create a socket */
-    sd =  create_socket(info_p);
+	/* Create a socket */
+	sd = create_socket(info_p);
 
-    /* loop for sending queries */
-    start_time = time(NULL);
-    query_size = MY_IGMPV3_QUERY_SIZE(ntohs(info_p->query->nsrcs));
-    if (debug)
-	fprintf (stderr, "query size is %zu\n", query_size);
+	/* loop for sending queries */
+	start_time = time(NULL);
+	query_size = MY_IGMPV3_QUERY_SIZE(ntohs(info_p->query->nsrcs));
+	if (debug)
+		fprintf(stderr, "query size is %zu\n", query_size);
 
-    for (;;) {
-	retval = sendto(sd, info_p->query, query_size, 0,
-			(struct sockaddr *)&to, sizeof(struct sockaddr_in));
-	if (retval != query_size) {
-	    if (catch_sighup)
-		break;
-	    else
-		fatal_error("sendto()");
+	for (;;) {
+		retval = sendto(sd, info_p->query, query_size, 0,
+				(struct sockaddr *)&to,
+				sizeof(struct sockaddr_in));
+		if (retval != query_size) {
+			if (catch_sighup)
+				break;
+			else
+				fatal_error("sendto()");
+		}
+
+		/* Check timeout:
+		   If timeout value is negative only send one datagram */
+		if (info_p->timeout)
+			if (info_p->timeout < difftime(time(NULL), start_time))
+				break;
+
+		/* Wait in specified interval */
+		nanosleep(&info_p->interval, NULL);
+
+		/* catch SIGHUP */
+		if (catch_sighup)
+			break;
+
 	}
 
-	/* Check timeout:
-	   If timeout value is negative only send one datagram */
-	if (info_p->timeout)
-	    if (info_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	/* Wait in specified interval */
-	nanosleep(&info_p->interval, NULL);
-
-	/* catch SIGHUP */
-	if (catch_sighup)
-	    break;
-
-    }
-
-    close(sd);
+	close(sd);
 }
 
 /*
@@ -464,23 +464,22 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct igmp_info mcast_rcv;
-    int background = 0;
+	struct igmp_info mcast_rcv;
+	int background = 0;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
+	debug = 0;
+	program_name = strdup(argv[0]);
 
-    memset(&mcast_rcv, '\0', sizeof(struct igmp_info));
-    parse_options(argc, argv, &mcast_rcv, &background);
+	memset(&mcast_rcv, '\0', sizeof(struct igmp_info));
+	parse_options(argc, argv, &mcast_rcv, &background);
 
-    if (background)	/* Work in the background */
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	if (background)		/* Work in the background */
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    send_query(&mcast_rcv);
+	send_query(&mcast_rcv);
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-mcast_join.c b/testcases/network/stress/ns-tools/ns-mcast_join.c
index bee718e..b673955 100644
--- a/testcases/network/stress/ns-tools/ns-mcast_join.c
+++ b/testcases/network/stress/ns-tools/ns-mcast_join.c
@@ -61,7 +61,7 @@
 char *program_name;		/* program name */
 
 struct sigaction handler;	/* Behavior for a signal */
-volatile int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
+volatile int catch_sighup;	/* When catch the SIGHUP, set to non-zero */
 
 sa_family_t family;		/* protocol family */
 int level;			/* protocol levels */
@@ -92,39 +92,37 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-f num\tprotocol family\n"
-		     "\t\t  4 : IPv4\n"
-		     "\t\t  6 : IPv6\n"
-		     "\t-I ifname\tname of listening interface\n"
-		     "\t-a addr\tmulticast address for join-leave mode\n"
-		     "\t-F mode\tfilter mode\n"
-		     "\t\t  include : include mode\n"
-		     "\t\t  exclude : exclude mode\n"
-		     "\t-s addrs\tcomma separated array of Source Addresses\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-		     "\n"
-		     "\t[multiple join mode]\n"
-		     "\t  -n num\tnumber of multicast address\n"
-		     "\t  -p prefix\tprefix of the multicast address\n"
-		     "\t  -m\t\tmultiple socket mode\n"
-		     "\t\t  4 : a.b(.x.y) - x y is defined automatically\n"
-		     "\t\t  6 : {prefix}::z - z is defined automatically\n"
-		     "\n"
-		     "\t[join-leave mode]\n"
-		     "\t  -l times of join/leave\n"
-		     "\t  -i nsec\tinterval for join-leave mode\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-f num\tprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-I ifname\tname of listening interface\n"
+		"\t-a addr\tmulticast address for join-leave mode\n"
+		"\t-F mode\tfilter mode\n"
+		"\t\t  include : include mode\n"
+		"\t\t  exclude : exclude mode\n"
+		"\t-s addrs\tcomma separated array of Source Addresses\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n"
+		"\n"
+		"\t[multiple join mode]\n"
+		"\t  -n num\tnumber of multicast address\n"
+		"\t  -p prefix\tprefix of the multicast address\n"
+		"\t  -m\t\tmultiple socket mode\n"
+		"\t\t  4 : a.b(.x.y) - x y is defined automatically\n"
+		"\t\t  6 : {prefix}::z - z is defined automatically\n"
+		"\n"
+		"\t[join-leave mode]\n"
+		"\t  -l times of join/leave\n"
+		"\t  -i nsec\tinterval for join-leave mode\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -139,24 +137,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -172,109 +169,113 @@
  * Return value:
  *  None
  */
-void
-parse_options(int argc, char *argv[])
+void parse_options(int argc, char *argv[])
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
 
-    while ((optc = getopt(argc, argv, "f:I:p:F:s:n:ml:i:a:dh")) != EOF) {
-	switch (optc) {
-	    case 'f':
-		if (optarg[0] == '4') {
-		    family = PF_INET;	/* IPv4 */
-		    level = IPPROTO_IP;
-		} else if (optarg[0] == '6') {
-		    family = PF_INET6;	/* IPv6 */
-		    level = IPPROTO_IPV6;
+	while ((optc = getopt(argc, argv, "f:I:p:F:s:n:ml:i:a:dh")) != EOF) {
+		switch (optc) {
+		case 'f':
+			if (optarg[0] == '4') {
+				family = PF_INET;	/* IPv4 */
+				level = IPPROTO_IP;
+			} else if (optarg[0] == '6') {
+				family = PF_INET6;	/* IPv6 */
+				level = IPPROTO_IPV6;
+			} else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'I':
+			ifindex = if_nametoindex(optarg);
+			if (ifindex == 0) {
+				fprintf(stderr,
+					"specified interface is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'p':
+			mcast_prefix = strdup(optarg);
+			break;
+
+		case 'F':
+			if (strncmp(optarg, "exclude", 8) == 0)
+				fmode = MCAST_EXCLUDE;
+			else if (strncmp(optarg, "include", 8) == 0)
+				fmode = MCAST_INCLUDE;
+			else {
+				fprintf(stderr,
+					"specified filter mode is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'l':
+			join_leave_times = strtoul(optarg, NULL, 0);
+			break;
+
+		case 'i':
+			if (strtotimespec(optarg, &interval)) {
+				fprintf(stderr,
+					"Interval is something wrong\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'a':
+			mcast_addr = strdup(optarg);
+			break;
+
+		case 's':
+			saddrs = strdup(optarg);
+			if (saddrs == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 'n':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul > 255 * 254) {
+				fprintf(stderr,
+					"The number of group shoud be less than %u\n",
+					255 * 254);
+				usage(program_name, EXIT_FAILURE);
+			}
+			num_group = opt_ul;
+			break;
+
+		case 'm':
+			is_multi_socket = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
+	}
 
-	    case 'I':
-		ifindex = if_nametoindex(optarg);
-		if (ifindex == 0) {
-		    fprintf(stderr, "specified interface is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'p':
-		mcast_prefix = strdup(optarg);
-		break;
-
-	    case 'F':
-		if (strncmp(optarg, "exclude", 8) == 0)
-		    fmode = MCAST_EXCLUDE;
-		else if (strncmp(optarg, "include", 8) == 0)
-		    fmode = MCAST_INCLUDE;
-		else {
-		    fprintf(stderr, "specified filter mode is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'l':
-		join_leave_times = strtoul(optarg, NULL, 0);
-		break;
-
-	    case 'i':
-		if (strtotimespec(optarg, &interval)) {
-		    fprintf(stderr, "Interval is something wrong\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'a':
-		mcast_addr = strdup(optarg);
-		break;
-
-	    case 's':
-		saddrs = strdup(optarg);
-		if (saddrs == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 'n':
-		opt_ul = strtoul(optarg, NULL, 0);
-		if (opt_ul > 255 * 254) {
-		    fprintf(stderr, "The number of group shoud be less than %u\n", 255 * 254);
-		    usage(program_name, EXIT_FAILURE);
-		}
-		num_group = opt_ul;
-		break;
-
-	    case 'm':
-		is_multi_socket = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	if (ifindex == 0) {
+		fprintf(stderr, "specified interface seems incorrect\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    if (ifindex == 0) {
-	fprintf(stderr, "specified interface seems incorrect\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (saddrs) {
-	if (fmode != MCAST_EXCLUDE && fmode != MCAST_INCLUDE) {
-	    fprintf(stderr, "filter mode is wrong\n");
-	    usage(program_name, EXIT_FAILURE);
+	if (saddrs) {
+		if (fmode != MCAST_EXCLUDE && fmode != MCAST_INCLUDE) {
+			fprintf(stderr, "filter mode is wrong\n");
+			usage(program_name, EXIT_FAILURE);
+		}
 	}
-    }
 }
 
 /*
@@ -286,134 +287,139 @@
  * Return value:
  *  None
  */
-void
-join_group(void)
+void join_group(void)
 {
-    int sd;		/* socket file descriptor */
-    int *sock_array;	/* socket descriptor array */
-    size_t num_sock;	/* number of the socket */
-    char maddr[ADDR_STR_MAXSIZE];	/* multicast address in string */
-    int idx;
-    struct addrinfo *maddr_info;
-    struct group_req *grp_info;
-    struct group_filter *gsf;
+	int sd;			/* socket file descriptor */
+	int *sock_array;	/* socket descriptor array */
+	size_t num_sock;	/* number of the socket */
+	char maddr[ADDR_STR_MAXSIZE];	/* multicast address in string */
+	int idx;
+	struct addrinfo *maddr_info;
+	struct group_req *grp_info;
+	struct group_filter *gsf;
 
-    if (! is_multi_socket)
-	num_sock = 1;
-    else
-	num_sock = num_group;
+	if (!is_multi_socket)
+		num_sock = 1;
+	else
+		num_sock = num_group;
 
-    /* Allocate socket array */
-    sock_array = calloc(num_sock, sizeof(int));
-    if (sock_array == NULL)
-	fatal_error("calloc()");
+	/* Allocate socket array */
+	sock_array = calloc(num_sock, sizeof(int));
+	if (sock_array == NULL)
+		fatal_error("calloc()");
 
-    for (idx = 0; idx < num_sock; idx++) {
-	sock_array[idx] = socket(family, SOCK_DGRAM, IPPROTO_UDP);
+	for (idx = 0; idx < num_sock; idx++) {
+		sock_array[idx] = socket(family, SOCK_DGRAM, IPPROTO_UDP);
 
-	if (sock_array[idx] < 0) {
-	    if (idx < OPEN_SOCK_MIN)
-		fatal_error("socket()");
-	    else {
-		int j;	    /* Closed some sockets for daemon() */
-		for (j = 0; j < OPEN_SOCK_MIN; j++)
-		    close(sock_array[idx - 1 - j]);
-		num_group = idx - j - 1;
-		break;
-	    }
-	}
-
-	if (! is_multi_socket)
-	    maximize_sockbuf(sock_array[idx]);
-    }
-
-    sd = sock_array[0];
-    if (mcast_addr) {
-	strncpy(maddr, mcast_addr, ADDR_STR_MAXSIZE);
-	if (debug)
-	    fprintf(stderr, "multicast address is %s\n", maddr);
-    }
-
-    for (idx = 0; idx < num_group; idx++) {
-	if (is_multi_socket)
-	    sd = sock_array[idx];
-
-	if (debug)
-	    fprintf(stderr, "socket: %d\n", sd);
-
-	if (mcast_prefix) {
-	    switch (family) {
-		case PF_INET:
-		    {
-			unsigned int x, y;
-			x = idx / 254;
-			y = idx % 254 + 1;
-			sprintf(maddr, "%s.%d.%d", mcast_prefix, x, y);
-		    }
-		    break;
-
-		case PF_INET6:
-		    sprintf(maddr, "%s:%x", mcast_prefix, idx + 1);
-		    break;
-	    }
-
-	    if (debug)
-		fprintf(stderr, "multicast address is %s\n", maddr);
-	}
-
-	maddr_info = get_maddrinfo(family, maddr, NULL);
-
-	grp_info = create_group_info(ifindex, maddr_info);
-	if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info,
-		    sizeof(struct group_req)) == -1) {
-	    if (idx == 0)
-		fatal_error("setsockopt(): Join no group");
-	    else {
-		num_group--;
-		free(grp_info);
-		freeaddrinfo(maddr_info);
-		break;
-	    }
-	    free(grp_info);
-	}
-
-	if (saddrs) {
-	    gsf = create_source_filter(ifindex, maddr_info, fmode, saddrs);
-	    if (setsockopt(sd, level, MCAST_MSFILTER, gsf,
-			GROUP_FILTER_SIZE(gsf->gf_numsrc)) == -1) {
-		if (idx == 0)
-		    fatal_error("setsockopt(): Add no group filter");
-		else {
-		    num_group--;
-		    free(gsf);
-		    freeaddrinfo(maddr_info);
-		    break;
+		if (sock_array[idx] < 0) {
+			if (idx < OPEN_SOCK_MIN)
+				fatal_error("socket()");
+			else {
+				int j;	/* Closed some sockets for daemon() */
+				for (j = 0; j < OPEN_SOCK_MIN; j++)
+					close(sock_array[idx - 1 - j]);
+				num_group = idx - j - 1;
+				break;
+			}
 		}
-		free(gsf);
-	    }
+
+		if (!is_multi_socket)
+			maximize_sockbuf(sock_array[idx]);
 	}
 
-	freeaddrinfo(maddr_info);
-    }
+	sd = sock_array[0];
+	if (mcast_addr) {
+		strncpy(maddr, mcast_addr, ADDR_STR_MAXSIZE);
+		if (debug)
+			fprintf(stderr, "multicast address is %s\n", maddr);
+	}
 
-    fprintf(stdout, "%zu groups\n", num_group);
-    fflush(stdout);
+	for (idx = 0; idx < num_group; idx++) {
+		if (is_multi_socket)
+			sd = sock_array[idx];
 
-    /* Become a daemon for the next step in shell script */
-    if (daemon(0, 0) < 0)
-	fatal_error("daemon()");
+		if (debug)
+			fprintf(stderr, "socket: %d\n", sd);
 
-    /* Waiting for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
+		if (mcast_prefix) {
+			switch (family) {
+			case PF_INET:
+				{
+					unsigned int x, y;
+					x = idx / 254;
+					y = idx % 254 + 1;
+					sprintf(maddr, "%s.%d.%d", mcast_prefix,
+						x, y);
+				}
+				break;
 
-    for (;;)
-	if (catch_sighup)
-	    break;
+			case PF_INET6:
+				sprintf(maddr, "%s:%x", mcast_prefix, idx + 1);
+				break;
+			}
+
+			if (debug)
+				fprintf(stderr, "multicast address is %s\n",
+					maddr);
+		}
+
+		maddr_info = get_maddrinfo(family, maddr, NULL);
+
+		grp_info = create_group_info(ifindex, maddr_info);
+		if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info,
+			       sizeof(struct group_req)) == -1) {
+			if (idx == 0)
+				fatal_error("setsockopt(): Join no group");
+			else {
+				num_group--;
+				free(grp_info);
+				freeaddrinfo(maddr_info);
+				break;
+			}
+			free(grp_info);
+		}
+
+		if (saddrs) {
+			gsf =
+			    create_source_filter(ifindex, maddr_info, fmode,
+						 saddrs);
+			if (setsockopt
+			    (sd, level, MCAST_MSFILTER, gsf,
+			     GROUP_FILTER_SIZE(gsf->gf_numsrc)) == -1) {
+				if (idx == 0)
+					fatal_error
+					    ("setsockopt(): Add no group filter");
+				else {
+					num_group--;
+					free(gsf);
+					freeaddrinfo(maddr_info);
+					break;
+				}
+				free(gsf);
+			}
+		}
+
+		freeaddrinfo(maddr_info);
+	}
+
+	fprintf(stdout, "%zu groups\n", num_group);
+	fflush(stdout);
+
+	/* Become a daemon for the next step in shell script */
+	if (daemon(0, 0) < 0)
+		fatal_error("daemon()");
+
+	/* Waiting for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
+
+	for (;;)
+		if (catch_sighup)
+			break;
 }
 
 /*
@@ -425,62 +431,62 @@
  * Return value:
  *  None
  */
-void
-join_leave_group(void)
+void join_leave_group(void)
 {
-    int sd;		/* socket file descriptor */
-    struct addrinfo *maddr_info;
-    struct group_req *grp_info;
-    struct group_filter *gsf;
-    size_t cnt;
+	int sd;			/* socket file descriptor */
+	struct addrinfo *maddr_info;
+	struct group_req *grp_info;
+	struct group_filter *gsf;
+	size_t cnt;
 
-    sd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
-    if (sd < 0)
-	fatal_error("socket()");
+	sd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
+	if (sd < 0)
+		fatal_error("socket()");
 
-    maddr_info = get_maddrinfo(family, mcast_addr, NULL);
-    grp_info = create_group_info(ifindex, maddr_info);
-    if (saddrs)
-	gsf = create_source_filter(ifindex, maddr_info, fmode, saddrs);
-    else
-	gsf=NULL;
+	maddr_info = get_maddrinfo(family, mcast_addr, NULL);
+	grp_info = create_group_info(ifindex, maddr_info);
+	if (saddrs)
+		gsf = create_source_filter(ifindex, maddr_info, fmode, saddrs);
+	else
+		gsf = NULL;
 
-    /* Waiting for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
+	/* Waiting for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
 
-    for (cnt = 0; cnt < join_leave_times ; cnt++) {
-	/* Join */
-	if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info,
-		    sizeof(struct group_req)) == -1)
-	    fatal_error("setsockopt(): Failed to join a group");
+	for (cnt = 0; cnt < join_leave_times; cnt++) {
+		/* Join */
+		if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info,
+			       sizeof(struct group_req)) == -1)
+			fatal_error("setsockopt(): Failed to join a group");
 
+		if (gsf)
+			if (setsockopt(sd, level, MCAST_MSFILTER, gsf,
+				       GROUP_FILTER_SIZE(gsf->gf_numsrc)) == -1)
+				fatal_error
+				    ("setsockopt(): Failed to add a group filter");
+
+		nanosleep(&interval, NULL);
+
+		/* Leave */
+		if (setsockopt(sd, level, MCAST_LEAVE_GROUP, grp_info,
+			       sizeof(struct group_req)) == -1)
+			fatal_error("setsockopt(): Failed to leave a group");
+
+		nanosleep(&interval, NULL);
+
+		if (catch_sighup)
+			break;
+	}
+
+	free(grp_info);
 	if (gsf)
-	    if (setsockopt(sd, level, MCAST_MSFILTER, gsf,
-			GROUP_FILTER_SIZE(gsf->gf_numsrc)) == -1)
-		fatal_error("setsockopt(): Failed to add a group filter");
-
-	nanosleep(&interval, NULL);
-
-	/* Leave */
-	if (setsockopt(sd, level, MCAST_LEAVE_GROUP, grp_info,
-		    sizeof(struct group_req)) == -1)
-	    fatal_error("setsockopt(): Failed to leave a group");
-
-	nanosleep(&interval, NULL);
-
-	if (catch_sighup)
-	    break;
-    }
-
-    free(grp_info);
-    if (gsf)
-	free(gsf);
-    freeaddrinfo(maddr_info);
+		free(gsf);
+	freeaddrinfo(maddr_info);
 }
 
 /*
@@ -488,27 +494,26 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    debug = 0;
-    program_name = strdup(argv[0]);
+	debug = 0;
+	program_name = strdup(argv[0]);
 
-    parse_options(argc, argv);
+	parse_options(argc, argv);
 
-    if (! join_leave_times) {
-	if (mcast_prefix == NULL && mcast_addr == NULL) {
-	    fprintf(stderr, "multicast address is not specified\n");
-	    usage(program_name, EXIT_FAILURE);
+	if (!join_leave_times) {
+		if (mcast_prefix == NULL && mcast_addr == NULL) {
+			fprintf(stderr, "multicast address is not specified\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+		join_group();
+	} else {
+		if (mcast_addr == NULL) {
+			fprintf(stderr, "multicast address is not specified\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+		join_leave_group();
 	}
-	join_group();
-    } else {
-	if (mcast_addr == NULL) {
-	    fprintf(stderr, "multicast address is not specified\n");
-	    usage(program_name, EXIT_FAILURE);
-	}
-	join_leave_group();
-    }
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-mcast_receiver.c b/testcases/network/stress/ns-tools/ns-mcast_receiver.c
index 5782703..56c67b9 100644
--- a/testcases/network/stress/ns-tools/ns-mcast_receiver.c
+++ b/testcases/network/stress/ns-tools/ns-mcast_receiver.c
@@ -56,10 +56,10 @@
  * Structure Definitions
  */
 struct mcast_rcv_info {
-    struct addrinfo *mainfo;
-    struct group_req *greq;
-    struct group_filter *gsf;
-    double timeout;
+	struct addrinfo *mainfo;
+	struct group_req *greq;
+	struct group_filter *gsf;
+	double timeout;
 };
 
 /*
@@ -82,31 +82,29 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-f num\ttprotocol family\n"
-		     "\t\t  4 : IPv4\n"
-		     "\t\t  6 : IPv6\n"
-		     "\t-I ifname\tname of listening interface\n"
-		     "\t-m addr\tmulticast address\n"
-		     "\t-F mode\tfilter mode\n"
-		     "\t\t  include : include mode\n"
-		     "\t\t  exclude : exclude mode\n"
-		     "\t-s addrs\tcomma separated array of Source Addresses\n"
-		     "\t-p num\tport number\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-b\t\twork in the background\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-f num\ttprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-I ifname\tname of listening interface\n"
+		"\t-m addr\tmulticast address\n"
+		"\t-F mode\tfilter mode\n"
+		"\t\t  include : include mode\n"
+		"\t\t  exclude : exclude mode\n"
+		"\t-s addrs\tcomma separated array of Source Addresses\n"
+		"\t-p num\tport number\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-b\t\twork in the background\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -121,24 +119,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -159,131 +156,138 @@
 void
 parse_options(int argc, char *argv[], struct mcast_rcv_info *info_p, int *bg_p)
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
-    double opt_d;		/* option value in double */
-    uint32_t ifindex = 0;	/* interface index where listening multicast */
-    sa_family_t family = AF_UNSPEC;	/* protocol family */
-    char *maddr;		/* multicast address */
-    uint32_t fmode = 0;		/* filter mode */
-    char *saddrs;		/* comma separated array of source addresses */
-    char *portnum;		/* listen port number in character string */
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
+	double opt_d;		/* option value in double */
+	uint32_t ifindex = 0;	/* interface index where listening multicast */
+	sa_family_t family = AF_UNSPEC;	/* protocol family */
+	char *maddr;		/* multicast address */
+	uint32_t fmode = 0;	/* filter mode */
+	char *saddrs;		/* comma separated array of source addresses */
+	char *portnum;		/* listen port number in character string */
 
-    maddr = NULL;
-    saddrs = NULL;
-    portnum = NULL;
+	maddr = NULL;
+	saddrs = NULL;
+	portnum = NULL;
 
-    while ((optc = getopt(argc, argv, "f:I:m:F:s:p:t:bdh")) != EOF) {
-	switch (optc) {
-	    case 'f':
-		if (optarg[0] == '4')
-		    family = PF_INET;	/* IPv4 */
-		else if (optarg[0] == '6')
-		    family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
+	while ((optc = getopt(argc, argv, "f:I:m:F:s:p:t:bdh")) != EOF) {
+		switch (optc) {
+		case 'f':
+			if (optarg[0] == '4')
+				family = PF_INET;	/* IPv4 */
+			else if (optarg[0] == '6')
+				family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'I':
+			ifindex = if_nametoindex(optarg);
+			if (ifindex == 0) {
+				fprintf(stderr,
+					"specified interface is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'm':
+			maddr = strdup(optarg);
+			if (maddr == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 'F':
+			if (strncmp(optarg, "exclude", 8) == 0)
+				fmode = MCAST_EXCLUDE;
+			else if (strncmp(optarg, "include", 8) == 0)
+				fmode = MCAST_INCLUDE;
+			else {
+				fprintf(stderr,
+					"specified filter mode is incorrect\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 's':
+			saddrs = strdup(optarg);
+			if (saddrs == NULL)
+				fatal_error("strdup()");
+			break;
+
+		case 'p':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul < PORTNUMMIN || PORTNUMMAX < opt_ul) {
+				fprintf(stderr,
+					"The range of port is from %u to %u\n",
+					PORTNUMMIN, PORTNUMMAX);
+				usage(program_name, EXIT_FAILURE);
+			}
+			portnum = strdup(optarg);
+			break;
+
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			info_p->timeout = opt_d;
+			break;
+
+		case 'b':
+			*bg_p = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		break;
+	}
 
-	    case 'I':
-		ifindex = if_nametoindex(optarg);
-		if (ifindex == 0) {
-		    fprintf(stderr, "specified interface is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'm':
-		maddr = strdup(optarg);
-		if (maddr == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 'F':
-		if (strncmp(optarg, "exclude", 8) == 0)
-		    fmode = MCAST_EXCLUDE;
-		else if (strncmp(optarg, "include", 8) == 0)
-		    fmode = MCAST_INCLUDE;
-		else {
-		    fprintf(stderr, "specified filter mode is incorrect\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 's':
-		saddrs = strdup(optarg);
-		if (saddrs == NULL)
-		    fatal_error("strdup()");
-		break;
-
-	    case 'p':
-		opt_ul = strtoul(optarg, NULL, 0);
-		if (opt_ul < PORTNUMMIN || PORTNUMMAX < opt_ul) {
-		    fprintf(stderr, "The range of port is from %u to %u\n",
-			    PORTNUMMIN, PORTNUMMAX);
-		    usage(program_name, EXIT_FAILURE);
-		}
-		portnum = strdup(optarg);
-		break;
-
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		info_p->timeout = opt_d;
-		break;
-
-	    case 'b':
-		*bg_p = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	if (ifindex == 0) {
+		fprintf(stderr, "specified interface seems incorrect\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    if (ifindex == 0) {
-	fprintf(stderr, "specified interface seems incorrect\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (maddr == NULL) {
-	fprintf(stderr, "multicast address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (portnum == NULL) {
-	fprintf(stderr, "listening port number is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    info_p->mainfo = get_maddrinfo(family, maddr, portnum);
-    info_p->greq = create_group_info(ifindex, info_p->mainfo);
-    if (saddrs) {
-	if (fmode != MCAST_EXCLUDE && fmode != MCAST_INCLUDE) {
-	    fprintf(stderr, "filter mode is wrong\n");
-	    usage(program_name, EXIT_FAILURE);
+	if (maddr == NULL) {
+		fprintf(stderr, "multicast address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
 	}
-	info_p->gsf = create_source_filter(ifindex, info_p->mainfo, fmode, saddrs);
-    }
 
-    if (maddr)
-	free(maddr);
-    if (saddrs)
-	free(saddrs);
-    if (portnum)
-	free(portnum);
+	if (portnum == NULL) {
+		fprintf(stderr, "listening port number is not specified\n");
+		usage(program_name, EXIT_FAILURE);
+	}
+
+	info_p->mainfo = get_maddrinfo(family, maddr, portnum);
+	info_p->greq = create_group_info(ifindex, info_p->mainfo);
+	if (saddrs) {
+		if (fmode != MCAST_EXCLUDE && fmode != MCAST_INCLUDE) {
+			fprintf(stderr, "filter mode is wrong\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+		info_p->gsf =
+		    create_source_filter(ifindex, info_p->mainfo, fmode,
+					 saddrs);
+	}
+
+	if (maddr)
+		free(maddr);
+	if (saddrs)
+		free(saddrs);
+	if (portnum)
+		free(portnum);
 }
 
 /*
@@ -298,52 +302,57 @@
  * Return value:
  *  file descriptor referencing the socket
  */
-int
-create_mcast_socket(struct mcast_rcv_info *info_p)
+int create_mcast_socket(struct mcast_rcv_info *info_p)
 {
-    int sd;	/* socket file descriptor */
-    int level;	/* protocol levels */
-    int on;	/* flag for setsockopt */
+	int sd;			/* socket file descriptor */
+	int level;		/* protocol levels */
+	int on;			/* flag for setsockopt */
 
-    switch (info_p->mainfo->ai_family) {
+	switch (info_p->mainfo->ai_family) {
 	case PF_INET:
-	    level = IPPROTO_IP;
-	    break;
+		level = IPPROTO_IP;
+		break;
 	case PF_INET6:
-	    level = IPPROTO_IPV6;
-	    break;
+		level = IPPROTO_IPV6;
+		break;
 	default:
-	    level = 0;
-	    fprintf(stderr, "Unknown protocol level %d\n", level);
-	    exit(EXIT_FAILURE);
-	    break;
-    }
+		level = 0;
+		fprintf(stderr, "Unknown protocol level %d\n", level);
+		exit(EXIT_FAILURE);
+		break;
+	}
 
-    /* Create a socket */
-    sd = socket(info_p->mainfo->ai_family, info_p->mainfo->ai_socktype, info_p->mainfo->ai_protocol);
-    if (sd < 0)
-	fatal_error("socket()");
+	/* Create a socket */
+	sd = socket(info_p->mainfo->ai_family, info_p->mainfo->ai_socktype,
+		    info_p->mainfo->ai_protocol);
+	if (sd < 0)
+		fatal_error("socket()");
 
-    /* Bind to the multicast address */
-    if (bind(sd, info_p->mainfo->ai_addr, info_p->mainfo->ai_addrlen) < 0)
-	fatal_error("bind()");
+	/* Bind to the multicast address */
+	if (bind(sd, info_p->mainfo->ai_addr, info_p->mainfo->ai_addrlen) < 0)
+		fatal_error("bind()");
 
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt(): failed to set reuse the socket");
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt(): failed to set reuse the socket");
 
-    /* Join the multicast group */
-    if (setsockopt(sd, level, MCAST_JOIN_GROUP, info_p->greq, sizeof(struct group_req)))
-       fatal_error("setsockopt(): failed to join the multicast group");
+	/* Join the multicast group */
+	if (setsockopt
+	    (sd, level, MCAST_JOIN_GROUP, info_p->greq,
+	     sizeof(struct group_req)))
+		fatal_error("setsockopt(): failed to join the multicast group");
 
-    /* Apply the source filter */
-    if (info_p->gsf) {
-	if (setsockopt(sd, level, MCAST_MSFILTER, info_p->gsf, GROUP_FILTER_SIZE(info_p->gsf->gf_numsrc)))
-	    fatal_error("setsockopt(): failed to apply the source filter");
-    }
+	/* Apply the source filter */
+	if (info_p->gsf) {
+		if (setsockopt
+		    (sd, level, MCAST_MSFILTER, info_p->gsf,
+		     GROUP_FILTER_SIZE(info_p->gsf->gf_numsrc)))
+			fatal_error
+			    ("setsockopt(): failed to apply the source filter");
+	}
 
-    return sd;
+	return sd;
 }
 
 /*
@@ -358,65 +367,64 @@
  * Return value:
  *  None
  */
-void
-receive_mcast(struct mcast_rcv_info *info_p)
+void receive_mcast(struct mcast_rcv_info *info_p)
 {
-    int sd;
-    char *msgbuf;		/* Pointer to the message */
-    size_t msgbuf_size;		/* size of msgbuf */
-    ssize_t msglen;		/* the length of message */
-    socklen_t optlen;		/* size of the result parameter */
-    double start_time;		/* start time when receiving datagrams */
+	int sd;
+	char *msgbuf;		/* Pointer to the message */
+	size_t msgbuf_size;	/* size of msgbuf */
+	ssize_t msglen;		/* the length of message */
+	socklen_t optlen;	/* size of the result parameter */
+	double start_time;	/* start time when receiving datagrams */
 
-    /* Create a socket */
-    sd = create_mcast_socket(info_p);
+	/* Create a socket */
+	sd = create_mcast_socket(info_p);
 
-    /* Allocate a buffer to store the message */
-    optlen = sizeof(msgbuf_size);
-    if (getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &msgbuf_size, &optlen) < 0) {
-	perror("getsockopt()");
+	/* Allocate a buffer to store the message */
+	optlen = sizeof(msgbuf_size);
+	if (getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &msgbuf_size, &optlen) < 0) {
+		perror("getsockopt()");
+		close(sd);
+		exit(EXIT_FAILURE);
+	}
+	msgbuf = (char *)malloc(msgbuf_size + 1);
+	if (msgbuf == NULL) {
+		fprintf(stderr, "malloc() is failed.\n");
+		close(sd);
+		exit(EXIT_FAILURE);
+	}
+
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigfillset()");
+
+	/* Receive the message */
+	start_time = time(NULL);
+	for (;;) {
+		struct sockaddr_storage addr;
+		socklen_t addrlen;
+
+		addrlen = sizeof(addr);
+		msglen = recvfrom(sd, msgbuf, msgbuf_size, MSG_DONTWAIT,
+				  (struct sockaddr *)&addr, &addrlen);
+		if (msglen < 0) {
+			if (errno != EAGAIN)
+				fatal_error("recvfrom()");
+		} else if (debug)
+			fprintf(stderr, "received %zd byte message\n", msglen);
+
+		if (info_p->timeout)
+			if (info_p->timeout < difftime(time(NULL), start_time))
+				break;
+
+		if (catch_sighup)	/* catch SIGHUP */
+			break;
+	}
+
 	close(sd);
-	exit(EXIT_FAILURE);
-    }
-    msgbuf = (char *)malloc(msgbuf_size + 1);
-    if (msgbuf == NULL) {
-	fprintf(stderr, "malloc() is failed.\n");
-	close(sd);
-	exit(EXIT_FAILURE);
-    }
-
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigfillset()");
-
-    /* Receive the message */
-    start_time = time(NULL);
-    for (;;) {
-	struct sockaddr_storage addr;
-	socklen_t addrlen;
-
-	addrlen = sizeof(addr);
-	msglen = recvfrom(sd, msgbuf, msgbuf_size,MSG_DONTWAIT,
-			(struct sockaddr *)&addr, &addrlen);
-	if (msglen < 0) {
-	    if (errno != EAGAIN)
-		fatal_error("recvfrom()");
-	} else if (debug)
-	    fprintf(stderr, "received %zd byte message\n", msglen);
-
-	if (info_p->timeout)
-	    if (info_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	if (catch_sighup) /* catch SIGHUP */
-	    break;
-    }
-
-    close(sd);
 }
 
 /*
@@ -424,23 +432,22 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct mcast_rcv_info mcast_rcv;
-    int background = 0;
+	struct mcast_rcv_info mcast_rcv;
+	int background = 0;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
+	debug = 0;
+	program_name = strdup(argv[0]);
 
-    memset(&mcast_rcv, '\0', sizeof(struct mcast_rcv_info));
-    parse_options(argc, argv, &mcast_rcv, &background);
+	memset(&mcast_rcv, '\0', sizeof(struct mcast_rcv_info));
+	parse_options(argc, argv, &mcast_rcv, &background);
 
-    if (background)	/* Work in the background */
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	if (background)		/* Work in the background */
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    receive_mcast(&mcast_rcv);
+	receive_mcast(&mcast_rcv);
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-tcpclient.c b/testcases/network/stress/ns-tools/ns-tcpclient.c
index 032e714..dc6a725 100644
--- a/testcases/network/stress/ns-tools/ns-tcpclient.c
+++ b/testcases/network/stress/ns-tools/ns-tcpclient.c
@@ -38,8 +38,8 @@
 /*
  * Gloval variables
  */
-struct sigaction handler;       /* Behavior for a signal */
-int catch_sighup;               /* When catch the SIGHUP, set to non-zero */
+struct sigaction handler;	/* Behavior for a signal */
+int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
 
 /*
  * Standard Header Files
@@ -71,27 +71,25 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-S\tname or IP address of the server\n"
-		     "\t-f\tprotocol family\n"
-		     "\t\t  4 : IPv4\n"
-		     "\t\t  6 : IPv6\n"
-		     "\t-p\tport number\n"
-		     "\t-t\ttimeout [sec]\n"
-		     "\t-b\twork in the background\n"
-		     "\t-w\twork in the window scaling mode\n"
-		     "\t-d\tdisplay debug informations\n"
-		     "\t-h\tdisplay this usage\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-S\tname or IP address of the server\n"
+		"\t-f\tprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-p\tport number\n"
+		"\t-t\ttimeout [sec]\n"
+		"\t-b\twork in the background\n"
+		"\t-w\twork in the window scaling mode\n"
+		"\t-d\tdisplay debug informations\n"
+		"\t-h\tdisplay this usage\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -106,24 +104,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -131,216 +128,219 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    char *program_name = argv[0];
-    int optc;			/* option */
-    int sock_fd;		/* socket descriptor for a connection */
-    char *server_name;		/* Name (or IP address) of the server */
-    sa_family_t family;		/* protocol family */
-    char *portnum;		/* port number in string representation */
-    struct addrinfo hints;	/* hints for getaddrinfo() */
-    struct addrinfo *res;	/* pointer to addrinfo structure */
-    int err;			/* return value of getaddrinfo */
-    int on;			/* on/off at an socket option */
-    int recvbuf_size;		/* size of the receive buffer */
-    socklen_t sock_optlen;		/* size of the result parameter */
-    char *recvbuf;		/* pointer to the received message */
-    ssize_t recvbyte_size;	/* size of the receive byte */
-    time_t start_time;		/* time when the timer is start */
-    double timeout = 0.0;	/* timeout */
-    int background = 0;		/* If non-zero work in the background */
-    size_t window_scaling = 0;	/* if non-zero, in the window scaling mode */
+	char *program_name = argv[0];
+	int optc;		/* option */
+	int sock_fd;		/* socket descriptor for a connection */
+	char *server_name;	/* Name (or IP address) of the server */
+	sa_family_t family;	/* protocol family */
+	char *portnum;		/* port number in string representation */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo structure */
+	int err;		/* return value of getaddrinfo */
+	int on;			/* on/off at an socket option */
+	int recvbuf_size;	/* size of the receive buffer */
+	socklen_t sock_optlen;	/* size of the result parameter */
+	char *recvbuf;		/* pointer to the received message */
+	ssize_t recvbyte_size;	/* size of the receive byte */
+	time_t start_time;	/* time when the timer is start */
+	double timeout = 0.0;	/* timeout */
+	int background = 0;	/* If non-zero work in the background */
+	size_t window_scaling = 0;	/* if non-zero, in the window scaling mode */
 
-    debug = 0;
+	debug = 0;
 
-    /* Initilalize the client information */
-    family = PF_UNSPEC;
-    server_name = NULL;
-    portnum = NULL;
+	/* Initilalize the client information */
+	family = PF_UNSPEC;
+	server_name = NULL;
+	portnum = NULL;
 
-    /* Retrieve the options */
-    while ((optc = getopt(argc, argv, "S:f:p:t:bwdh")) != EOF) {
-	switch (optc) {
-	    case 'S':
-		server_name = strdup(optarg);
-		if (server_name == NULL) {
-		    fprintf(stderr, "strdup() failed.");
-		    exit(EXIT_FAILURE);
-		}
-		break;
+	/* Retrieve the options */
+	while ((optc = getopt(argc, argv, "S:f:p:t:bwdh")) != EOF) {
+		switch (optc) {
+		case 'S':
+			server_name = strdup(optarg);
+			if (server_name == NULL) {
+				fprintf(stderr, "strdup() failed.");
+				exit(EXIT_FAILURE);
+			}
+			break;
 
-	    case 'f':
-		if (strncmp(optarg, "4", 1) == 0)
-		    family = PF_INET;	/* IPv4 */
-		else if (strncmp(optarg, "6", 1) == 0)
-		    family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
+		case 'f':
+			if (strncmp(optarg, "4", 1) == 0)
+				family = PF_INET;	/* IPv4 */
+			else if (strncmp(optarg, "6", 1) == 0)
+				family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
 
-	    case 'p':
-		{
-		    unsigned long int tmp;
-		    tmp = strtoul(optarg, NULL, 0);
-		    if (tmp < PORTNUMMIN || PORTNUMMAX < tmp) {
-			fprintf(stderr, "The range of port is from %u to %u\n",
-				PORTNUMMIN, PORTNUMMAX);
+		case 'p':
+			{
+				unsigned long int tmp;
+				tmp = strtoul(optarg, NULL, 0);
+				if (tmp < PORTNUMMIN || PORTNUMMAX < tmp) {
+					fprintf(stderr,
+						"The range of port is from %u to %u\n",
+						PORTNUMMIN, PORTNUMMAX);
+					usage(program_name, EXIT_FAILURE);
+				}
+				portnum = strdup(optarg);
+			}
+			break;
+
+		case 't':
+			timeout = strtod(optarg, NULL);
+			if (timeout < 0) {
+				fprintf(stderr,
+					"Timeout value is bigger than 0\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
+
+		case 'b':
+			background = 1;
+			break;
+
+		case 'w':
+			window_scaling = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
 			usage(program_name, EXIT_FAILURE);
-		    }
-		    portnum = strdup(optarg);
 		}
-		break;
+	}
 
-	    case 't':
-		timeout = strtod(optarg, NULL);
-		if (timeout < 0) {
-		    fprintf(stderr, "Timeout value is bigger than 0\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
-
-	    case 'b':
-		background = 1;
-		break;
-
-	    case 'w':
-		window_scaling = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	/* Check the server name is specified. */
+	if (server_name == NULL) {
+		fprintf(stderr, "server name isn't specified.\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    /* Check the server name is specified. */
-    if (server_name == NULL) {
-	fprintf(stderr, "server name isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* Check the family is specified. */
-    if (family == PF_UNSPEC) {
-	fprintf(stderr, "protocol family isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* Check the port number is specified. */
-    if (portnum == NULL) {
-	fprintf(stderr, "port number isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* At first, SIGHUP are Ignored. */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-
-    /* Set the hints to addrinfo() */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = family;
-    hints.ai_socktype = SOCK_STREAM;
-    hints.ai_protocol = IPPROTO_TCP;
-
-    /* Translate the network and service information of the client */
-    err = getaddrinfo(server_name, portnum, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
-
-    /* Create a socket */
-    sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
-    if (sock_fd < 0)
-	fatal_error("socket()");
-
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt()");
-
-    /* Maximize socket buffer, when window scaling mode */
-    if (window_scaling)
-	maximize_sockbuf(sock_fd);
-
-    /* Connect to the server */
-    if (connect(sock_fd, res->ai_addr, res->ai_addrlen) < 0)
-	fatal_error("connect()");
-
-    freeaddrinfo(res);
-    free(server_name);
-
-    /* If -b option is specified, work as a daemon */
-    if (background)
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
-
-    /* Get the size of receive buffer */
-    sock_optlen = sizeof(recvbuf_size);
-    if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &sock_optlen) < 0)
-	fatal_error("getsockopt()");
-    if (debug)
-	fprintf(stderr, "recvbuf size of socket(%d) is %d\n", sock_fd, recvbuf_size);
-
-    /* Prepare a buffer to receive bytes */
-    recvbuf = (char *)malloc(recvbuf_size);
-    if (recvbuf == NULL) {
-	fprintf(stderr, "malloc() is failed.\n");
-	exit(EXIT_FAILURE);
-    }
-
-    /*
-     * Loop for receiving data from the server
-     */
-    start_time = time(NULL);
-    handler.sa_handler = set_signal_flag;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-    for (;;) {
-	recvbyte_size = recv(sock_fd, recvbuf, recvbuf_size, 0);
-	if (recvbyte_size < (ssize_t)0) {
-	    if (catch_sighup)
-		break;
-	    else
-		fatal_error("sendto()");
+	/* Check the family is specified. */
+	if (family == PF_UNSPEC) {
+		fprintf(stderr, "protocol family isn't specified.\n");
+		usage(program_name, EXIT_FAILURE);
 	}
-	else if (recvbyte_size == (ssize_t)0)
-	    break;
 
-	/* client timeout */
-	if (timeout)
-	    if (timeout < difftime(time(NULL), start_time))
-		break;
+	/* Check the port number is specified. */
+	if (portnum == NULL) {
+		fprintf(stderr, "port number isn't specified.\n");
+		usage(program_name, EXIT_FAILURE);
+	}
 
-	/* Catch SIGHUP */
-	if (catch_sighup)
-	    break;
-    }
-    if (close(sock_fd) < 0)
-	fatal_error("close()");
+	/* At first, SIGHUP are Ignored. */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    free(recvbuf);
+	/* Set the hints to addrinfo() */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = family;
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_protocol = IPPROTO_TCP;
 
-    if (debug)
-	fprintf (stderr, "Client is finished without any error\n");
+	/* Translate the network and service information of the client */
+	err = getaddrinfo(server_name, portnum, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
+	}
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
 
-    exit(EXIT_SUCCESS);
+	/* Create a socket */
+	sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+	if (sock_fd < 0)
+		fatal_error("socket()");
+
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt()");
+
+	/* Maximize socket buffer, when window scaling mode */
+	if (window_scaling)
+		maximize_sockbuf(sock_fd);
+
+	/* Connect to the server */
+	if (connect(sock_fd, res->ai_addr, res->ai_addrlen) < 0)
+		fatal_error("connect()");
+
+	freeaddrinfo(res);
+	free(server_name);
+
+	/* If -b option is specified, work as a daemon */
+	if (background)
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
+
+	/* Get the size of receive buffer */
+	sock_optlen = sizeof(recvbuf_size);
+	if (getsockopt
+	    (sock_fd, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &sock_optlen) < 0)
+		fatal_error("getsockopt()");
+	if (debug)
+		fprintf(stderr, "recvbuf size of socket(%d) is %d\n", sock_fd,
+			recvbuf_size);
+
+	/* Prepare a buffer to receive bytes */
+	recvbuf = (char *)malloc(recvbuf_size);
+	if (recvbuf == NULL) {
+		fprintf(stderr, "malloc() is failed.\n");
+		exit(EXIT_FAILURE);
+	}
+
+	/*
+	 * Loop for receiving data from the server
+	 */
+	start_time = time(NULL);
+	handler.sa_handler = set_signal_flag;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+	for (;;) {
+		recvbyte_size = recv(sock_fd, recvbuf, recvbuf_size, 0);
+		if (recvbyte_size < (ssize_t) 0) {
+			if (catch_sighup)
+				break;
+			else
+				fatal_error("sendto()");
+		} else if (recvbyte_size == (ssize_t) 0)
+			break;
+
+		/* client timeout */
+		if (timeout)
+			if (timeout < difftime(time(NULL), start_time))
+				break;
+
+		/* Catch SIGHUP */
+		if (catch_sighup)
+			break;
+	}
+	if (close(sock_fd) < 0)
+		fatal_error("close()");
+
+	free(recvbuf);
+
+	if (debug)
+		fprintf(stderr, "Client is finished without any error\n");
+
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-tcpserver.c b/testcases/network/stress/ns-tools/ns-tcpserver.c
index d236bd2..c52a6b5 100644
--- a/testcases/network/stress/ns-tools/ns-tcpserver.c
+++ b/testcases/network/stress/ns-tools/ns-tcpserver.c
@@ -57,9 +57,9 @@
 /*
  * Gloval variables
  */
-struct sigaction handler;    /* Behavior for a signal */
-int catch_sighup;       /* When catch the SIGHUP, set to non-zero */
-int catch_sigpipe;      /* When catch the SIGPIPE, set to non-zero */
+struct sigaction handler;	/* Behavior for a signal */
+int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
+int catch_sigpipe;		/* When catch the SIGPIPE, set to non-zero */
 
 /*
  * Structure: server_info
@@ -68,15 +68,15 @@
  *  This structure stores the information of a server
  */
 struct server_info {
-    sa_family_t family;		/* protocol family */
-    char *portnum;		/* port number */
-    int listen_sd;		/* socket descriptor for listening */
-    int concurrent;		/* if non-zero, act as a concurrent server */
-    size_t current_connection;	/* number of the current connection */
-    size_t max_connection;	/* maximum connection number */
-    size_t lost_connection;	/* number of lost connection */
-    size_t small_sending;	/* if non-zero, in the small sending mode */
-    size_t window_scaling;	/* if non-zero, in the window scaling mode */
+	sa_family_t family;	/* protocol family */
+	char *portnum;		/* port number */
+	int listen_sd;		/* socket descriptor for listening */
+	int concurrent;		/* if non-zero, act as a concurrent server */
+	size_t current_connection;	/* number of the current connection */
+	size_t max_connection;	/* maximum connection number */
+	size_t lost_connection;	/* number of lost connection */
+	size_t small_sending;	/* if non-zero, in the small sending mode */
+	size_t window_scaling;	/* if non-zero, in the window scaling mode */
 };
 
 /*
@@ -92,30 +92,27 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage(char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf(stream, "%s [OPTION]\n"
-		    "\t-f\tprotocol family\n"
-		    "\t\t  4 : IPv4\n"
-		    "\t\t  6 : IPv6\n"
-		    "\t-p\tport number\n"
-		    "\t-b\twork in the background\n"
-		    "\t-c\twork in the concurrent server mode\n"
-		    "\t-s\twork in the small sending mode\n"
-		    "\t-w\twork in the window scaling mode\n"
-		    "\t-o\tfilename where the server infomation is outputted\n"
-		    "\t-d\twork in the debug mode\n"
-		    "\t-h\tdisplay this usage\n"
-		    ""
-		    "*) Server works till it receives SIGHUP\n"
-			, program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-f\tprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-p\tport number\n"
+		"\t-b\twork in the background\n"
+		"\t-c\twork in the concurrent server mode\n"
+		"\t-s\twork in the small sending mode\n"
+		"\t-w\twork in the window scaling mode\n"
+		"\t-o\tfilename where the server infomation is outputted\n"
+		"\t-d\twork in the debug mode\n"
+		"\t-h\tdisplay this usage\n"
+		"" "*) Server works till it receives SIGHUP\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -131,28 +128,27 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    /* Set SIG_IGN against the caught signal */
-    handler.sa_handler = SIG_IGN;
-    if (sigaction(type, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Set SIG_IGN against the caught signal */
+	handler.sa_handler = SIG_IGN;
+	if (sigaction(type, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    break;
+		catch_sighup = 1;
+		break;
 	case SIGPIPE:
-	    catch_sigpipe = 1;
-	    break;
+		catch_sigpipe = 1;
+		break;
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -167,28 +163,28 @@
  * Return value:
  *  None
  */
-void
-delete_zombies(struct server_info *info_p)
+void delete_zombies(struct server_info *info_p)
 {
-    int status;		/* exit value of a child */
-    pid_t zombie_pid;   /* process id of a zombie */
+	int status;		/* exit value of a child */
+	pid_t zombie_pid;	/* process id of a zombie */
 
-    while (info_p->current_connection) {
-	zombie_pid = waitpid((pid_t)-1, &status, WNOHANG);
-	if (zombie_pid == (pid_t)-1)
-	    fatal_error("waitpid()");
-	else if (zombie_pid == (pid_t)0)
-	    break;
-	else {
-	    --info_p->current_connection;
-	    if (status != EXIT_SUCCESS) {
-		++info_p->lost_connection;
-		if (debug)
-		    fprintf (stderr, "The number of lost conncections is %zu\n",
-					info_p->lost_connection);
-	    }
+	while (info_p->current_connection) {
+		zombie_pid = waitpid((pid_t) - 1, &status, WNOHANG);
+		if (zombie_pid == (pid_t) - 1)
+			fatal_error("waitpid()");
+		else if (zombie_pid == (pid_t) 0)
+			break;
+		else {
+			--info_p->current_connection;
+			if (status != EXIT_SUCCESS) {
+				++info_p->lost_connection;
+				if (debug)
+					fprintf(stderr,
+						"The number of lost conncections is %zu\n",
+						info_p->lost_connection);
+			}
+		}
 	}
-    }
 }
 
 /*
@@ -204,77 +200,76 @@
  * Return value:
  *  None
  */
-void
-create_listen_socket(struct server_info *info_p)
+void create_listen_socket(struct server_info *info_p)
 {
-    int on;			/* on/off at an socket option */
-    int err;			/* return value of getaddrinfo */
-    struct addrinfo hints;	/* hints for getaddrinfo() */
-    struct addrinfo *res;	/* pointer to addrinfo */
+	int on;			/* on/off at an socket option */
+	int err;		/* return value of getaddrinfo */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo */
 
-    /* Set the hints to addrinfo() */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = info_p->family;
-    hints.ai_socktype = SOCK_STREAM;
-    hints.ai_protocol = IPPROTO_TCP;
-    hints.ai_flags = AI_PASSIVE;
+	/* Set the hints to addrinfo() */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = info_p->family;
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_protocol = IPPROTO_TCP;
+	hints.ai_flags = AI_PASSIVE;
 
-    /* Translate the network and service information of the server */
-    err = getaddrinfo(NULL, info_p->portnum, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
+	/* Translate the network and service information of the server */
+	err = getaddrinfo(NULL, info_p->portnum, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
+	}
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
 
-    /* Create a socket for listening. */
-    info_p->listen_sd = socket(res->ai_family,
-	    res->ai_socktype, res->ai_protocol);
-    if (info_p->listen_sd < 0)
-	fatal_error("socket()");
+	/* Create a socket for listening. */
+	info_p->listen_sd = socket(res->ai_family,
+				   res->ai_socktype, res->ai_protocol);
+	if (info_p->listen_sd < 0)
+		fatal_error("socket()");
 
 #ifdef IPV6_V6ONLY
-    /* Don't accept IPv4 mapped address if the protocol family is IPv6 */
-    if (res->ai_family == PF_INET6) {
-	on = 1;
-	if (setsockopt(info_p->listen_sd,
-		    IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int)))
-	    fatal_error("setsockopt()");
-    }
+	/* Don't accept IPv4 mapped address if the protocol family is IPv6 */
+	if (res->ai_family == PF_INET6) {
+		on = 1;
+		if (setsockopt(info_p->listen_sd,
+			       IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int)))
+			fatal_error("setsockopt()");
+	}
 #endif
 
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(info_p->listen_sd,
-		SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt()");
-
-    /* Disable the Nagle algorithm, when small sending mode */
-    if (info_p->small_sending) {
+	/* Enable to reuse the socket */
 	on = 1;
 	if (setsockopt(info_p->listen_sd,
-		    IPPROTO_TCP, TCP_NODELAY, &on, sizeof(int)))
-	    fatal_error("setsockopt()");
-	if (debug) {
-	    fprintf(stderr, "small sending[on]\n");
+		       SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt()");
+
+	/* Disable the Nagle algorithm, when small sending mode */
+	if (info_p->small_sending) {
+		on = 1;
+		if (setsockopt(info_p->listen_sd,
+			       IPPROTO_TCP, TCP_NODELAY, &on, sizeof(int)))
+			fatal_error("setsockopt()");
+		if (debug) {
+			fprintf(stderr, "small sending[on]\n");
+		}
 	}
-    }
 
-    /* Maximize socket buffer, when window scaling mode */
-    if (info_p->window_scaling)
-	maximize_sockbuf(info_p->listen_sd);
+	/* Maximize socket buffer, when window scaling mode */
+	if (info_p->window_scaling)
+		maximize_sockbuf(info_p->listen_sd);
 
-    /* Bind to the local address */
-    if (bind(info_p->listen_sd, res->ai_addr, res->ai_addrlen) < 0)
-	fatal_error("bind()");
-    freeaddrinfo(res);
+	/* Bind to the local address */
+	if (bind(info_p->listen_sd, res->ai_addr, res->ai_addrlen) < 0)
+		fatal_error("bind()");
+	freeaddrinfo(res);
 
-    /* Start to listen for connections */
-    if (listen(info_p->listen_sd, 5) < 0)
-	fatal_error("listen()");
+	/* Start to listen for connections */
+	if (listen(info_p->listen_sd, 5) < 0)
+		fatal_error("listen()");
 }
 
 /*
@@ -293,77 +288,80 @@
  *  0:	    success
  *  other:  fail
  */
-int
-communicate_client(struct server_info *info_p, int sock_fd)
+int communicate_client(struct server_info *info_p, int sock_fd)
 {
-    char *sendmsg;		/* pointer to the message to send */
-    int sndbuf_size;		/* size of the send buffer */
-    socklen_t sock_optlen;		/* size of the result parameter */
-    ssize_t sntbyte_size;	/* size of the sent byte */
-    int ret = EXIT_SUCCESS;	/* The return value of this function */
+	char *sendmsg;		/* pointer to the message to send */
+	int sndbuf_size;	/* size of the send buffer */
+	socklen_t sock_optlen;	/* size of the result parameter */
+	ssize_t sntbyte_size;	/* size of the sent byte */
+	int ret = EXIT_SUCCESS;	/* The return value of this function */
 
-    if (info_p->small_sending) {	/* small sending mode */
-	sndbuf_size = 1;
-    } else {
-	sock_optlen = sizeof(sndbuf_size);
-	if (getsockopt(sock_fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, &sock_optlen) < 0) {
-	    perror("getsockopt()");
-	    if (close(sock_fd))
-		fatal_error("close()");
-	    return EXIT_FAILURE;
+	if (info_p->small_sending) {	/* small sending mode */
+		sndbuf_size = 1;
+	} else {
+		sock_optlen = sizeof(sndbuf_size);
+		if (getsockopt
+		    (sock_fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size,
+		     &sock_optlen) < 0) {
+			perror("getsockopt()");
+			if (close(sock_fd))
+				fatal_error("close()");
+			return EXIT_FAILURE;
+		}
 	}
-    }
-    if (debug)
-	fprintf(stderr, "sndbuf size is %d\n", sndbuf_size);
+	if (debug)
+		fprintf(stderr, "sndbuf size is %d\n", sndbuf_size);
 
-    /* Define the message */
-    sendmsg = (char *)malloc(sndbuf_size);
-    if (sendmsg == NULL) {
-	fprintf(stderr, "malloc() is failed.\n");
+	/* Define the message */
+	sendmsg = (char *)malloc(sndbuf_size);
+	if (sendmsg == NULL) {
+		fprintf(stderr, "malloc() is failed.\n");
+		if (close(sock_fd))
+			fatal_error("close()");
+		return EXIT_FAILURE;
+	}
+
+	/* Set a signal handler against SIGHUP and SIGPIPE */
+	handler.sa_handler = set_signal_flag;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+	if (sigaction(SIGPIPE, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+
+	/* Send the message */
+	for (;;) {
+		sntbyte_size = send(sock_fd, sendmsg, sndbuf_size, 0);
+
+		/* Catch SIGPIPE */
+		if (catch_sigpipe) {
+			if (debug)
+				fprintf(stderr,
+					"The client closed the connection.\n");
+			break;
+		}
+
+		/* Catch SIGHUP */
+		if (catch_sighup)
+			break;
+
+		if (sntbyte_size < (ssize_t) 0) {
+			if (errno == EPIPE) {
+				if (debug)
+					fprintf(stderr,
+						"The client closed the connection.\n");
+			} else {
+				printf("errno=%d\n", errno);
+				perror("send()");
+				ret = EXIT_FAILURE;
+			}
+			break;
+		}
+	}
+
+	free(sendmsg);
 	if (close(sock_fd))
-	    fatal_error("close()");
-	return EXIT_FAILURE;
-    }
-
-    /* Set a signal handler against SIGHUP and SIGPIPE */
-    handler.sa_handler = set_signal_flag;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-    if (sigaction(SIGPIPE, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-
-    /* Send the message */
-    for (;;) {
-	sntbyte_size = send(sock_fd, sendmsg, sndbuf_size, 0);
-
-	/* Catch SIGPIPE */
-	if (catch_sigpipe) {
-	    if (debug)
-	      fprintf(stderr, "The client closed the connection.\n");
-	    break;
-	}
-
-	/* Catch SIGHUP */
-	if (catch_sighup)
-	    break;
-
-	if (sntbyte_size < (ssize_t)0) {
-	    if (errno == EPIPE) {
-	      if (debug)
-		fprintf(stderr, "The client closed the connection.\n");
-	    } else {
-		printf ("errno=%d\n", errno);
-		perror("send()");
-		ret = EXIT_FAILURE;
-	    }
-	    break;
-	}
-    }
-
-    free(sendmsg);
-    if (close(sock_fd))
-	fatal_error("close()");
-    return ret;
+		fatal_error("close()");
+	return ret;
 }
 
 /*
@@ -379,132 +377,149 @@
  *  0:	    success
  *  other:  fail
  */
-int
-handle_client(struct server_info *info_p)
+int handle_client(struct server_info *info_p)
 {
-    int ret = EXIT_SUCCESS;	/* return value of this function */
-    int do_accept = 1;		/* if non-zero, accept connection */
-    fd_set read_fds;		/* list of file descriptor for reading */
-    int max_read_fd = 0;	/* maximum number in the read fds */
+	int ret = EXIT_SUCCESS;	/* return value of this function */
+	int do_accept = 1;	/* if non-zero, accept connection */
+	fd_set read_fds;	/* list of file descriptor for reading */
+	int max_read_fd = 0;	/* maximum number in the read fds */
 
-    info_p->current_connection = 0;
-    FD_ZERO(&read_fds);
-    FD_SET(info_p->listen_sd, &read_fds);
-    max_read_fd = info_p->listen_sd;
+	info_p->current_connection = 0;
+	FD_ZERO(&read_fds);
+	FD_SET(info_p->listen_sd, &read_fds);
+	max_read_fd = info_p->listen_sd;
 
-    /* Catch SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Catch SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    /* Loop to wait a new connection */
-    for (;;) {
-	if (do_accept) {
-	    int data_sd;	/* socket descriptor for send/recv data */
-	    socklen_t client_addr_len;	/* length of `client_addr' */
-	    struct sockaddr_storage client_addr;    /* address of a client */
-	    int select_ret;	/* return value of select() */
-	    fd_set  active_fds;	/* list of the active file descriptor */
-	    struct timeval select_timeout;	/* timeout for select() */
+	/* Loop to wait a new connection */
+	for (;;) {
+		if (do_accept) {
+			int data_sd;	/* socket descriptor for send/recv data */
+			socklen_t client_addr_len;	/* length of `client_addr' */
+			struct sockaddr_storage client_addr;	/* address of a client */
+			int select_ret;	/* return value of select() */
+			fd_set active_fds;	/* list of the active file descriptor */
+			struct timeval select_timeout;	/* timeout for select() */
 
-	    /* When catch SIGHUP, no more connection is acceptted. */
-	    if (catch_sighup) {
-		do_accept = 0;
-		if (close(info_p->listen_sd))
-		    fatal_error("close()");
-		continue;
-	    }
-
-	    /* Check a connection is requested */
-	    active_fds = read_fds;
-	    select_timeout.tv_sec = 0;	    /* 0.5 sec */
-	    select_timeout.tv_usec = 500000;
-
-	    select_ret = select(max_read_fd + 1,
-		    &active_fds, NULL, NULL, &select_timeout);
-	    if (select_ret < 0) {
-		do_accept = 0;
-		if (!catch_sighup) {
-		    perror("select()");
-		    ret = EXIT_FAILURE;
-		}
-		if (close(info_p->listen_sd))
-		    fatal_error("close()");
-		continue;
-	    } else if (select_ret == 0) {	    /* select() is timeout */
-		if (info_p->concurrent)
-		    delete_zombies(info_p);
-		continue;
-	    }
-
-	    /* Accetpt a client connection */
-	    if (FD_ISSET(info_p->listen_sd, &active_fds)) {
-		client_addr_len = sizeof(struct sockaddr_storage);
-		data_sd = accept(info_p->listen_sd,
-			(struct sockaddr *)&client_addr, &client_addr_len);
-		if (data_sd < 0) {
-		    do_accept = 0;
-		    if (!catch_sighup) {
-			perror("accept()");
-			ret = EXIT_FAILURE;
-		    }
-		    if (close(info_p->listen_sd))
-			fatal_error("close()");
-		    continue;
-		}
-		if (debug)
-		    fprintf(stderr, "called accept(). data_sd=%d\n", data_sd);
-
-		/* Handle clients */
-		if (info_p->concurrent) {	/* concurrent server. */
-		    pid_t child_pid;
-		    child_pid = fork();
-		    if (child_pid < 0) {	/* fork() is failed. */
-			perror("fork()");
-			if (close(data_sd))
-			    fatal_error("close()");
-			if (close(info_p->listen_sd))
-			    fatal_error("close()");
-			do_accept = 0;
-			continue;
-		    } else if (child_pid == 0) {	/* case of a child */
-			int exit_value;
-			if (close(info_p->listen_sd))
-			    fatal_error("close()");
-			exit_value = communicate_client(info_p, data_sd);
-			if (debug)
-			    fprintf(stderr, "child(%d) exits. value is %d\n",
-				    getpid(), exit_value);
-			exit(exit_value);
-		    } else {				/* case of the parent */
-			if (close(data_sd))
-			    fatal_error("close()");
-
-			++info_p->current_connection;
-			if (info_p->max_connection < info_p->current_connection) {
-			    info_p->max_connection = info_p->current_connection;
-			    if (debug)
-				fprintf (stderr, "The maximum connection is updated. The number is %zu.\n", info_p->max_connection);
+			/* When catch SIGHUP, no more connection is acceptted. */
+			if (catch_sighup) {
+				do_accept = 0;
+				if (close(info_p->listen_sd))
+					fatal_error("close()");
+				continue;
 			}
-			delete_zombies(info_p);
-		    }
-		} else {			/* repeat server */
-		    ret = communicate_client(info_p, data_sd);
-		    if (ret != EXIT_SUCCESS)
-		      if (close(info_p->listen_sd))
-			fatal_error("close()");
-		    break;
+
+			/* Check a connection is requested */
+			active_fds = read_fds;
+			select_timeout.tv_sec = 0;	/* 0.5 sec */
+			select_timeout.tv_usec = 500000;
+
+			select_ret = select(max_read_fd + 1,
+					    &active_fds, NULL, NULL,
+					    &select_timeout);
+			if (select_ret < 0) {
+				do_accept = 0;
+				if (!catch_sighup) {
+					perror("select()");
+					ret = EXIT_FAILURE;
+				}
+				if (close(info_p->listen_sd))
+					fatal_error("close()");
+				continue;
+			} else if (select_ret == 0) {	/* select() is timeout */
+				if (info_p->concurrent)
+					delete_zombies(info_p);
+				continue;
+			}
+
+			/* Accetpt a client connection */
+			if (FD_ISSET(info_p->listen_sd, &active_fds)) {
+				client_addr_len =
+				    sizeof(struct sockaddr_storage);
+				data_sd =
+				    accept(info_p->listen_sd,
+					   (struct sockaddr *)&client_addr,
+					   &client_addr_len);
+				if (data_sd < 0) {
+					do_accept = 0;
+					if (!catch_sighup) {
+						perror("accept()");
+						ret = EXIT_FAILURE;
+					}
+					if (close(info_p->listen_sd))
+						fatal_error("close()");
+					continue;
+				}
+				if (debug)
+					fprintf(stderr,
+						"called accept(). data_sd=%d\n",
+						data_sd);
+
+				/* Handle clients */
+				if (info_p->concurrent) {	/* concurrent server. */
+					pid_t child_pid;
+					child_pid = fork();
+					if (child_pid < 0) {	/* fork() is failed. */
+						perror("fork()");
+						if (close(data_sd))
+							fatal_error("close()");
+						if (close(info_p->listen_sd))
+							fatal_error("close()");
+						do_accept = 0;
+						continue;
+					} else if (child_pid == 0) {	/* case of a child */
+						int exit_value;
+						if (close(info_p->listen_sd))
+							fatal_error("close()");
+						exit_value =
+						    communicate_client(info_p,
+								       data_sd);
+						if (debug)
+							fprintf(stderr,
+								"child(%d) exits. value is %d\n",
+								getpid(),
+								exit_value);
+						exit(exit_value);
+					} else {	/* case of the parent */
+						if (close(data_sd))
+							fatal_error("close()");
+
+						++info_p->current_connection;
+						if (info_p->max_connection <
+						    info_p->
+						    current_connection) {
+							info_p->max_connection =
+							    info_p->
+							    current_connection;
+							if (debug)
+								fprintf(stderr,
+									"The maximum connection is updated. The number is %zu.\n",
+									info_p->
+									max_connection);
+						}
+						delete_zombies(info_p);
+					}
+				} else {	/* repeat server */
+					ret =
+					    communicate_client(info_p, data_sd);
+					if (ret != EXIT_SUCCESS)
+						if (close(info_p->listen_sd))
+							fatal_error("close()");
+					break;
+				}
+			}
+		} else {
+			/* case where new connection isn't accepted. */
+			if (info_p->concurrent)
+				delete_zombies(info_p);
+			if (info_p->current_connection == 0)
+				break;
 		}
-	    }
-	} else {
-	    /* case where new connection isn't accepted. */
-	    if (info_p->concurrent)
-		delete_zombies(info_p);
-	    if (info_p->current_connection == 0)
-		break;
 	}
-    }
-    return ret;
+	return ret;
 }
 
 /*
@@ -512,123 +527,124 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    char *program_name = argv[0];
-    int optc;			/* option */
-    struct server_info server;	/* server information */
-    int ret = EXIT_SUCCESS;	/* exit value */
-    int background = 0;	/* If non-zero work in the background */
-    FILE *info_fp = stdout;	/* FILE pointer to a information file */
+	char *program_name = argv[0];
+	int optc;		/* option */
+	struct server_info server;	/* server information */
+	int ret = EXIT_SUCCESS;	/* exit value */
+	int background = 0;	/* If non-zero work in the background */
+	FILE *info_fp = stdout;	/* FILE pointer to a information file */
 
-    debug = 0;
+	debug = 0;
 
-    /* Initilalize the server information */
-    memset(&server, '\0', sizeof(struct server_info));
-    server.family = PF_UNSPEC;
-    server.portnum = NULL;
+	/* Initilalize the server information */
+	memset(&server, '\0', sizeof(struct server_info));
+	server.family = PF_UNSPEC;
+	server.portnum = NULL;
 
-    /* Retrieve the options */
-    while ((optc = getopt(argc, argv, "f:p:bcswo:dh")) != EOF) {
-	switch (optc) {
-	    case 'f':
-		if (strncmp(optarg, "4", 1) == 0)
-		    server.family = PF_INET;	/* IPv4 */
-		else if (strncmp(optarg, "6", 1) == 0)
-		    server.family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
+	/* Retrieve the options */
+	while ((optc = getopt(argc, argv, "f:p:bcswo:dh")) != EOF) {
+		switch (optc) {
+		case 'f':
+			if (strncmp(optarg, "4", 1) == 0)
+				server.family = PF_INET;	/* IPv4 */
+			else if (strncmp(optarg, "6", 1) == 0)
+				server.family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
 
-	    case 'p':
-		{
-		    unsigned long int num;
-		    num = strtoul(optarg, NULL, 0);
-		    if (num < PORTNUMMIN || PORTNUMMAX < num) {
-			fprintf(stderr, "The range of port is from %u to %u\n",
-				PORTNUMMIN, PORTNUMMAX);
+		case 'p':
+			{
+				unsigned long int num;
+				num = strtoul(optarg, NULL, 0);
+				if (num < PORTNUMMIN || PORTNUMMAX < num) {
+					fprintf(stderr,
+						"The range of port is from %u to %u\n",
+						PORTNUMMIN, PORTNUMMAX);
+					usage(program_name, EXIT_FAILURE);
+				}
+				server.portnum = strdup(optarg);
+			}
+			break;
+
+		case 'b':
+			background = 1;
+			break;
+
+		case 'c':
+			server.concurrent = 1;
+			break;
+
+		case 's':
+			server.small_sending = 1;
+			break;
+
+		case 'w':
+			server.window_scaling = 1;
+			break;
+
+		case 'o':
+			if ((info_fp = fopen(optarg, "w")) == NULL) {
+				fprintf(stderr, "Cannot open %s\n", optarg);
+				exit(EXIT_FAILURE);
+			}
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
 			usage(program_name, EXIT_FAILURE);
-		    }
-		    server.portnum = strdup(optarg);
 		}
-		break;
+	}
 
-	    case 'b':
-		background = 1;
-		break;
-
-	    case 'c':
-		server.concurrent = 1;
-		break;
-
-	    case 's':
-		server.small_sending = 1;
-		break;
-
-	    case 'w':
-		server.window_scaling = 1;
-		break;
-
-	    case 'o':
-		if ((info_fp = fopen(optarg, "w")) == NULL) {
-		    fprintf(stderr, "Cannot open %s\n", optarg);
-		    exit(EXIT_FAILURE);
-		}
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	/* Check the family is spefied. */
+	if (server.family == PF_UNSPEC) {
+		fprintf(stderr, "protocol family should be specified.\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    /* Check the family is spefied. */
-    if (server.family == PF_UNSPEC) {
-	fprintf (stderr, "protocol family should be specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	/* Check the port number is specfied. */
+	if (server.portnum == NULL) {
+		server.portnum = (char *)calloc(6, sizeof(char));
+		sprintf(server.portnum, "%u", PORTNUMMIN);
+	}
 
-    /* Check the port number is specfied. */
-    if (server.portnum == NULL) {
-	server.portnum = (char *)calloc(6, sizeof(char));
-	sprintf(server.portnum, "%u", PORTNUMMIN);
-    }
+	/* If -b option is specified, work as a daemon */
+	if (background)
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    /* If -b option is specified, work as a daemon */
-    if (background)
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	/* At first, SIGHUP is ignored. default with SIGPIPE */
+	handler.sa_handler = SIG_IGN;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	handler.sa_flags = 0;
 
-    /* At first, SIGHUP is ignored. default with SIGPIPE */
-    handler.sa_handler = SIG_IGN;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    handler.sa_flags = 0;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Create a listen socket */
+	create_listen_socket(&server);
 
-    /* Create a listen socket */
-    create_listen_socket(&server);
+	/* Output any server information to the information file */
+	fprintf(info_fp, "PID: %u\n", getpid());
+	fflush(info_fp);
+	if (info_fp != stdout)
+		if (fclose(info_fp))
+			fatal_error("fclose()");
 
-    /* Output any server information to the information file */
-    fprintf(info_fp, "PID: %u\n", getpid());
-    fflush(info_fp);
-    if (info_fp != stdout)
-	if (fclose(info_fp))
-	    fatal_error("fclose()");
-
-    /* Handle one or more tcp clients. */
-    ret = handle_client(&server);
-    exit (ret);
+	/* Handle one or more tcp clients. */
+	ret = handle_client(&server);
+	exit(ret);
 }
diff --git a/testcases/network/stress/ns-tools/ns-udpclient.c b/testcases/network/stress/ns-tools/ns-udpclient.c
index c833084..16978ff 100644
--- a/testcases/network/stress/ns-tools/ns-udpclient.c
+++ b/testcases/network/stress/ns-tools/ns-udpclient.c
@@ -78,25 +78,23 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage(char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-S\tname or IP address of the server\n"
-		     "\t-f\tprotocol family\n"
-		     "\t\t  4 : IPv4\n"
-		     "\t\t  6 : IPv6\n"
-		     "\t-p\tport number\n"
-		     "\t-b\twork in the background\n"
-		     "\t-d\tdisplay debug informations\n"
-		     "\t-h\tdisplay this usage\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-S\tname or IP address of the server\n"
+		"\t-f\tprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-p\tport number\n"
+		"\t-b\twork in the background\n"
+		"\t-d\tdisplay debug informations\n"
+		"\t-h\tdisplay this usage\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -111,27 +109,26 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	case SIGALRM:
-	    catch_sigalrm = 1;
-	    break;
+		catch_sigalrm = 1;
+		break;
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -139,208 +136,211 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    char *program_name = argv[0];
-    int optc;			/* option */
+	char *program_name = argv[0];
+	int optc;		/* option */
 
-    sa_family_t family;		/* protocol family */
-    char *server_name;		/* Name (or IP address) of the server */
-    char *portnum;		/* port number in string representation */
+	sa_family_t family;	/* protocol family */
+	char *server_name;	/* Name (or IP address) of the server */
+	char *portnum;		/* port number in string representation */
 
-    int sock_fd;		/* socket descriptor to access */
-    int on;			/* on/off at an socket option */
+	int sock_fd;		/* socket descriptor to access */
+	int on;			/* on/off at an socket option */
 
-    struct addrinfo hints;	/* hints for getaddrinfo() */
-    struct addrinfo *res;	/* pointer to addrinfo structure */
-    int err;			/* return value of getaddrinfo */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo structure */
+	int err;		/* return value of getaddrinfo */
 
-    char *message;		/* Pointer to the message */
-    char *recvbuf = NULL;	/* Pointer to the message */
+	char *message;		/* Pointer to the message */
+	char *recvbuf = NULL;	/* Pointer to the message */
 
-    int background = 0;		/* work in the background if non-zero */
+	int background = 0;	/* work in the background if non-zero */
 
-    debug = 0;
+	debug = 0;
 
-    /* Initilalize the client information */
-    family = PF_UNSPEC;
-    server_name = NULL;
-    portnum = NULL;
+	/* Initilalize the client information */
+	family = PF_UNSPEC;
+	server_name = NULL;
+	portnum = NULL;
 
-    /* Retrieve the options */
-    while ((optc = getopt(argc, argv, "S:f:p:bdh")) != EOF) {
-	switch (optc) {
-	    case 'S':
-		server_name = strdup(optarg);
-		if (server_name == NULL) {
-		    fprintf(stderr, "strdup() failed.");
-		    exit(EXIT_FAILURE);
-		}
-		break;
+	/* Retrieve the options */
+	while ((optc = getopt(argc, argv, "S:f:p:bdh")) != EOF) {
+		switch (optc) {
+		case 'S':
+			server_name = strdup(optarg);
+			if (server_name == NULL) {
+				fprintf(stderr, "strdup() failed.");
+				exit(EXIT_FAILURE);
+			}
+			break;
 
-	    case 'f':
-		if (strncmp(optarg, "4", 1) == 0)
-		    family = PF_INET;	/* IPv4 */
-		else if (strncmp(optarg, "6", 1) == 0)
-		    family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
+		case 'f':
+			if (strncmp(optarg, "4", 1) == 0)
+				family = PF_INET;	/* IPv4 */
+			else if (strncmp(optarg, "6", 1) == 0)
+				family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
 
-	    case 'p':
-		{
-		    unsigned long int tmp;
-		    tmp = strtoul(optarg, NULL, 0);
-		    if (tmp < PORTNUMMIN || PORTNUMMAX < tmp) {
-			fprintf(stderr, "The range of port is from %u to %u\n",
-				PORTNUMMIN, PORTNUMMAX);
+		case 'p':
+			{
+				unsigned long int tmp;
+				tmp = strtoul(optarg, NULL, 0);
+				if (tmp < PORTNUMMIN || PORTNUMMAX < tmp) {
+					fprintf(stderr,
+						"The range of port is from %u to %u\n",
+						PORTNUMMIN, PORTNUMMAX);
+					usage(program_name, EXIT_FAILURE);
+				}
+				portnum = strdup(optarg);
+			}
+			break;
+
+		case 'b':
+			background = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
 			usage(program_name, EXIT_FAILURE);
-		    }
-		    portnum = strdup(optarg);
 		}
-		break;
+	}
 
-	    case 'b':
-		background = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	/* Check the family is specified. */
+	if (family == PF_UNSPEC) {
+		fprintf(stderr, "protocol family isn't specified.\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    /* Check the family is specified. */
-    if (family == PF_UNSPEC) {
-	fprintf(stderr, "protocol family isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* Check the server name is specified. */
-    if (server_name == NULL) {
-	fprintf(stderr, "server name isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* Check the port number is specified. */
-    if (portnum == NULL) {
-	fprintf(stderr, "port number isn't specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    /* If -b option is specified, work as a daemon */
-    if (background)
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
-
-    /* Set a signal handler against SIGALRM */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGALRM, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-
-    /* At first, SIGHUP are Ignored. */
-    handler.sa_handler = SIG_IGN;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-
-    /* Set the hints to addrinfo() */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
-
-    err = getaddrinfo(server_name, portnum, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
-
-    /* Create a socket */
-    sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
-    if (sock_fd < 0)
-	fatal_error("socket()");
-
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt()");
-
-    /* Create a message */
-    message = (char *)malloc(MESSAGE_LEN);
-    if (debug) {
-	strncpy (message, "Hello!", MESSAGE_LEN);
-	message[MESSAGE_LEN - 1] = '\0';
-    }
-
-    /* Prepare the buffer to store the received message */
-    recvbuf = (char *)malloc(MESSAGE_LEN + 1);
-    if (recvbuf == NULL) {
-	fprintf(stderr, "malloc() is failed.\n");
-	exit(EXIT_FAILURE);
-    }
-
-    /*
-     * Loop for access to the server
-     */
-    handler.sa_handler = set_signal_flag;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
-    for (;;) {
-	int recvlen;		/* lenght of recevied message */
-	struct sockaddr_storage from_addr;	/* address of a client */
-	socklen_t from_addr_len;		/* length of `client_addr' */
-
-	/* Send the message to the server */
-	if (sendto(sock_fd, message, MESSAGE_LEN, 0,
-		    res->ai_addr, res->ai_addrlen) != MESSAGE_LEN) {
-	    if (catch_sighup)
-		break;
-	    else
-		fatal_error("sendto()");
+	/* Check the server name is specified. */
+	if (server_name == NULL) {
+		fprintf(stderr, "server name isn't specified.\n");
+		usage(program_name, EXIT_FAILURE);
 	}
 
-	/* Receive the response from the server */
-	from_addr_len = sizeof(from_addr);
-	alarm(RECVFROM_TIMEOUT);
-	if ((recvlen = recvfrom(sock_fd, recvbuf, MESSAGE_LEN, 0,
-			(struct sockaddr *)&from_addr, &from_addr_len)) < 0) {
-	    if (errno == EINTR) {
-		if (catch_sighup) {
-		    break;
-		} else if (catch_sigalrm) {
-		    if (debug)
-			fprintf (stderr, "recvfrom() is timeout\n");
-		    continue;
+	/* Check the port number is specified. */
+	if (portnum == NULL) {
+		fprintf(stderr, "port number isn't specified.\n");
+		usage(program_name, EXIT_FAILURE);
+	}
+
+	/* If -b option is specified, work as a daemon */
+	if (background)
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
+
+	/* Set a signal handler against SIGALRM */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGALRM, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+
+	/* At first, SIGHUP are Ignored. */
+	handler.sa_handler = SIG_IGN;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+
+	/* Set the hints to addrinfo() */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
+
+	err = getaddrinfo(server_name, portnum, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
+	}
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
+
+	/* Create a socket */
+	sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+	if (sock_fd < 0)
+		fatal_error("socket()");
+
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt()");
+
+	/* Create a message */
+	message = (char *)malloc(MESSAGE_LEN);
+	if (debug) {
+		strncpy(message, "Hello!", MESSAGE_LEN);
+		message[MESSAGE_LEN - 1] = '\0';
+	}
+
+	/* Prepare the buffer to store the received message */
+	recvbuf = (char *)malloc(MESSAGE_LEN + 1);
+	if (recvbuf == NULL) {
+		fprintf(stderr, "malloc() is failed.\n");
+		exit(EXIT_FAILURE);
+	}
+
+	/*
+	 * Loop for access to the server
+	 */
+	handler.sa_handler = set_signal_flag;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
+	for (;;) {
+		int recvlen;	/* lenght of recevied message */
+		struct sockaddr_storage from_addr;	/* address of a client */
+		socklen_t from_addr_len;	/* length of `client_addr' */
+
+		/* Send the message to the server */
+		if (sendto(sock_fd, message, MESSAGE_LEN, 0,
+			   res->ai_addr, res->ai_addrlen) != MESSAGE_LEN) {
+			if (catch_sighup)
+				break;
+			else
+				fatal_error("sendto()");
 		}
-	    }
-	    fatal_error("recvfrom()");
+
+		/* Receive the response from the server */
+		from_addr_len = sizeof(from_addr);
+		alarm(RECVFROM_TIMEOUT);
+		if ((recvlen = recvfrom(sock_fd, recvbuf, MESSAGE_LEN, 0,
+					(struct sockaddr *)&from_addr,
+					&from_addr_len)) < 0) {
+			if (errno == EINTR) {
+				if (catch_sighup) {
+					break;
+				} else if (catch_sigalrm) {
+					if (debug)
+						fprintf(stderr,
+							"recvfrom() is timeout\n");
+					continue;
+				}
+			}
+			fatal_error("recvfrom()");
+		}
+		alarm(0);
+		recvbuf[recvlen] = '\0';
+		if (debug)
+			fprintf(stderr, "Message is %s\n", recvbuf);
+
+		/* Catch sighup */
+		if (catch_sighup)
+			break;
 	}
-	alarm(0);
-	recvbuf[recvlen] = '\0';
-	if (debug)
-	    fprintf(stderr, "Message is %s\n", recvbuf);
 
-	/* Catch sighup */
-	if (catch_sighup)
-	    break;
-    }
-
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-udpsender.c b/testcases/network/stress/ns-tools/ns-udpsender.c
index cf1f4ba..3e76a60 100644
--- a/testcases/network/stress/ns-tools/ns-udpsender.c
+++ b/testcases/network/stress/ns-tools/ns-udpsender.c
@@ -54,16 +54,16 @@
  */
 
 struct udp_info {
-    int sd;
-    int is_multicast;
-    sa_family_t family;
-    char *ifname;
-    char *dst_name;
-    char *dst_port;
-    struct addrinfo addr_info;
-    unsigned char *msg;
-    size_t msgsize;
-    double timeout;
+	int sd;
+	int is_multicast;
+	sa_family_t family;
+	char *ifname;
+	char *dst_name;
+	char *dst_port;
+	struct addrinfo addr_info;
+	unsigned char *msg;
+	size_t msgsize;
+	double timeout;
 };
 
 /*
@@ -86,32 +86,31 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage (char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf (stream, "%s [OPTION]\n"
-		     "\t-f num\ttprotocol family\n"
-		     "\t\t  4 : IPv4\n"
-		     "\t\t  6 : IPv6\n"
-		     "\t-D addr\tIP address of the destination host\n"
-		     "\t-p num\tport number of the destination host\n"
-		     "\t-s size\tdata size of UDP payload\n"
-		     "\t-t value\ttimeout [sec]\n"
-		     "\t-o\t\tsend only one UDP datagram\n"
-		     "\t-b\t\twork in the background\n"
-		     "\t-d\t\tdisplay debug informations\n"
-		     "\t-h\t\tdisplay this usage\n"
-		     "\n"
-		     "\t[options for multicast]\n"
-		     "\t  -m\t\tsend multicast datagrams\n"
-		     "\t  -I if_name\tinterface name of the source host\n"
-			    , program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-f num\ttprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-D addr\tIP address of the destination host\n"
+		"\t-p num\tport number of the destination host\n"
+		"\t-s size\tdata size of UDP payload\n"
+		"\t-t value\ttimeout [sec]\n"
+		"\t-o\t\tsend only one UDP datagram\n"
+		"\t-b\t\twork in the background\n"
+		"\t-d\t\tdisplay debug informations\n"
+		"\t-h\t\tdisplay this usage\n"
+		"\n"
+		"\t[options for multicast]\n"
+		"\t  -m\t\tsend multicast datagrams\n"
+		"\t  -I if_name\tinterface name of the source host\n",
+		program_name);
+	exit(exit_value);
 }
 
 /*
@@ -126,24 +125,23 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    handler.sa_handler = SIG_IGN;
-	    if (sigaction(type, &handler, NULL) < 0)
-		fatal_error("sigaction()");
-	    break;
+		catch_sighup = 1;
+		handler.sa_handler = SIG_IGN;
+		if (sigaction(type, &handler, NULL) < 0)
+			fatal_error("sigaction()");
+		break;
 
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -161,115 +159,118 @@
  * Return value:
  *  None
  */
-void
-parse_options(int argc, char *argv[], struct udp_info *udp_p, int *bg_p)
+void parse_options(int argc, char *argv[], struct udp_info *udp_p, int *bg_p)
 {
-    int optc;			/* option */
-    unsigned long opt_ul;	/* option value in unsigned long */
-    double opt_d;		/* option value in double */
-    int is_specified_family = 0;
-    int is_specified_daddr = 0;
-    int is_specified_port = 0;
+	int optc;		/* option */
+	unsigned long opt_ul;	/* option value in unsigned long */
+	double opt_d;		/* option value in double */
+	int is_specified_family = 0;
+	int is_specified_daddr = 0;
+	int is_specified_port = 0;
 
-    while ((optc = getopt(argc, argv, "f:D:p:s:t:obdhmI:")) != EOF) {
-	switch (optc) {
-	    case 'f':
-		if (optarg[0] == '4')
-		    udp_p->family = PF_INET;	/* IPv4 */
-		else if (optarg[0] == '6')
-		    udp_p->family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
+	while ((optc = getopt(argc, argv, "f:D:p:s:t:obdhmI:")) != EOF) {
+		switch (optc) {
+		case 'f':
+			if (optarg[0] == '4')
+				udp_p->family = PF_INET;	/* IPv4 */
+			else if (optarg[0] == '6')
+				udp_p->family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			is_specified_family = 1;
+			break;
+
+		case 'D':
+			udp_p->dst_name = strdup(optarg);
+			if (udp_p->dst_name == NULL)
+				fatal_error("strdup() failed.");
+			is_specified_daddr = 1;
+			break;
+
+		case 'p':
+			opt_ul = strtoul(optarg, NULL, 0);
+			if (opt_ul < 1 || PORTNUMMAX < opt_ul) {
+				fprintf(stderr,
+					"The range of port is from %u to %u\n",
+					1, PORTNUMMAX);
+				usage(program_name, EXIT_FAILURE);
+			}
+			udp_p->dst_port = strdup(optarg);
+			is_specified_port = 1;
+			break;
+
+		case 's':
+			opt_ul = strtoul(optarg, NULL, 0);
+			udp_p->msgsize = opt_ul;
+			break;
+
+		case 't':
+			opt_d = strtod(optarg, NULL);
+			if (opt_d < 0.0) {
+				fprintf(stderr,
+					"Timeout should be positive value\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			udp_p->timeout = opt_d;
+			break;
+
+		case 'o':
+			udp_p->timeout = -1.0;
+			break;
+
+		case 'b':
+			*bg_p = 1;
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+			/* Options for multicast */
+		case 'm':
+			udp_p->is_multicast = 1;
+			break;
+
+		case 'I':
+			udp_p->ifname = strdup(optarg);
+			if (udp_p->dst_name == NULL)
+				fatal_error("strdup() failed.");
+			break;
+
+		default:
+			usage(program_name, EXIT_FAILURE);
 		}
-		is_specified_family = 1;
-		break;
+	}
 
-	    case 'D':
-		udp_p->dst_name = strdup(optarg);
-		if (udp_p->dst_name == NULL)
-		    fatal_error("strdup() failed.");
-		is_specified_daddr = 1;
-		break;
-
-	    case 'p':
-		opt_ul = strtoul(optarg, NULL, 0);
-		if (opt_ul < 1 || PORTNUMMAX < opt_ul) {
-		    fprintf(stderr, "The range of port is from %u to %u\n",
-			    1, PORTNUMMAX);
-		    usage(program_name, EXIT_FAILURE);
-		}
-		udp_p->dst_port = strdup(optarg);
-		is_specified_port = 1;
-		break;
-
-	    case 's':
-		opt_ul = strtoul(optarg, NULL, 0);
-		udp_p->msgsize = opt_ul;
-		break;
-
-	    case 't':
-		opt_d = strtod(optarg, NULL);
-		if (opt_d < 0.0) {
-		    fprintf(stderr, "Timeout should be positive value\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		udp_p->timeout = opt_d;
-		break;
-
-	    case 'o':
-		udp_p->timeout = -1.0;
-		break;
-
-	    case 'b':
-		*bg_p = 1;
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    /* Options for multicast */
-	    case 'm':
-		udp_p->is_multicast = 1;
-		break;
-
-	    case 'I':
-		udp_p->ifname = strdup(optarg);
-		if (udp_p->dst_name == NULL)
-		    fatal_error("strdup() failed.");
-		break;
-
-	    default:
+	if (!is_specified_family) {
+		fprintf(stderr, "protocol family is not specified\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    if (! is_specified_family) {
-	fprintf(stderr, "protocol family is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (! is_specified_daddr) {
-	fprintf(stderr, "desttinaion IP address is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (! is_specified_port) {
-	fprintf(stderr, "destination port is not specified\n");
-	usage(program_name, EXIT_FAILURE);
-    }
-
-    if (udp_p->is_multicast) {
-	if (udp_p->ifname == NULL) {
-	    fprintf(stderr, "interface name is not specified with multicast\n");
-	    usage(program_name, EXIT_FAILURE);
+	if (!is_specified_daddr) {
+		fprintf(stderr, "desttinaion IP address is not specified\n");
+		usage(program_name, EXIT_FAILURE);
 	}
-    }
+
+	if (!is_specified_port) {
+		fprintf(stderr, "destination port is not specified\n");
+		usage(program_name, EXIT_FAILURE);
+	}
+
+	if (udp_p->is_multicast) {
+		if (udp_p->ifname == NULL) {
+			fprintf(stderr,
+				"interface name is not specified with multicast\n");
+			usage(program_name, EXIT_FAILURE);
+		}
+	}
 }
 
 /*
@@ -284,81 +285,82 @@
  * Return value:
  *  None
  */
-void
-create_udp_datagram(struct udp_info *udp_p)
+void create_udp_datagram(struct udp_info *udp_p)
 {
-    struct addrinfo hints;      /* hints for getaddrinfo() */
-    struct addrinfo *res;       /* pointer to addrinfo structure */
-    struct ifreq ifinfo;	/* Interface information */
-    int err;                    /* return value of getaddrinfo */
-    int on;			/* variable for socket option */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo structure */
+	struct ifreq ifinfo;	/* Interface information */
+	int err;		/* return value of getaddrinfo */
+	int on;			/* variable for socket option */
 
-    /* Set the hints to addrinfo() */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = udp_p->family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
+	/* Set the hints to addrinfo() */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = udp_p->family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
 
-    /* Get the address information */
-    err = getaddrinfo(udp_p->dst_name, udp_p->dst_port, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
-
-    /* Create a socket */
-    udp_p->sd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
-    if (udp_p->sd < 0)
-	fatal_error("socket()");
-
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(udp_p->sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt()");
-
-    /* In multicast case, specify the interface for outgoing datagrams */
-    if (udp_p->is_multicast) {
-	struct ip_mreqn mcast_req, *req_p = &mcast_req;
-	int ifindex, *id_p = &ifindex;
-
-	get_ifinfo(&ifinfo, udp_p->sd, udp_p->ifname, SIOCGIFINDEX);
-	ifindex = ifinfo.ifr_ifindex;
-
-	switch (udp_p->family) {
-	    case PF_INET:	/* IPv4 */
-		req_p->imr_multiaddr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
-		req_p->imr_address.s_addr = htonl(INADDR_ANY);
-		req_p->imr_ifindex = ifindex;
-		if (setsockopt(udp_p->sd, IPPROTO_IP, IP_MULTICAST_IF,
-				req_p, sizeof(struct ip_mreqn))) {
-		    fatal_error("setsockopt()");
-		}
-		break;
-
-	    case PF_INET6:	/* IPv6 */
-		if (setsockopt(udp_p->sd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
-				id_p, sizeof(int))) {
-		    fatal_error("setsockopt()");
-		}
-		break;
+	/* Get the address information */
+	err = getaddrinfo(udp_p->dst_name, udp_p->dst_port, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
 	}
-    }
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
 
-    /* Make the payload */
-    udp_p->msg = (unsigned char *)malloc(udp_p->msgsize);
-    if (udp_p->msg == NULL) {
-	fatal_error("malloc()");
-	exit(EXIT_FAILURE);
-    }
-    fill_payload(udp_p->msg, udp_p->msgsize);
+	/* Create a socket */
+	udp_p->sd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+	if (udp_p->sd < 0)
+		fatal_error("socket()");
 
-    /* Store addrinfo */
-    memcpy (&(udp_p->addr_info), res, sizeof(struct addrinfo));
-    freeaddrinfo(res);
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(udp_p->sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt()");
+
+	/* In multicast case, specify the interface for outgoing datagrams */
+	if (udp_p->is_multicast) {
+		struct ip_mreqn mcast_req, *req_p = &mcast_req;
+		int ifindex, *id_p = &ifindex;
+
+		get_ifinfo(&ifinfo, udp_p->sd, udp_p->ifname, SIOCGIFINDEX);
+		ifindex = ifinfo.ifr_ifindex;
+
+		switch (udp_p->family) {
+		case PF_INET:	/* IPv4 */
+			req_p->imr_multiaddr =
+			    ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
+			req_p->imr_address.s_addr = htonl(INADDR_ANY);
+			req_p->imr_ifindex = ifindex;
+			if (setsockopt(udp_p->sd, IPPROTO_IP, IP_MULTICAST_IF,
+				       req_p, sizeof(struct ip_mreqn))) {
+				fatal_error("setsockopt()");
+			}
+			break;
+
+		case PF_INET6:	/* IPv6 */
+			if (setsockopt
+			    (udp_p->sd, IPPROTO_IPV6, IPV6_MULTICAST_IF, id_p,
+			     sizeof(int))) {
+				fatal_error("setsockopt()");
+			}
+			break;
+		}
+	}
+
+	/* Make the payload */
+	udp_p->msg = (unsigned char *)malloc(udp_p->msgsize);
+	if (udp_p->msg == NULL) {
+		fatal_error("malloc()");
+		exit(EXIT_FAILURE);
+	}
+	fill_payload(udp_p->msg, udp_p->msgsize);
+
+	/* Store addrinfo */
+	memcpy(&(udp_p->addr_info), res, sizeof(struct addrinfo));
+	freeaddrinfo(res);
 }
 
 /*
@@ -373,47 +375,47 @@
  * Return value:
  *  None
  */
-void
-send_udp_datagram(struct udp_info *udp_p)
+void send_udp_datagram(struct udp_info *udp_p)
 {
-    int retval;
-    double start_time;
+	int retval;
+	double start_time;
 
-    /* Set singal hander for SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    handler.sa_flags = 0;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Set singal hander for SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	handler.sa_flags = 0;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    /*
-     * loop for sending packets
-     */
-    start_time = time(NULL);
+	/*
+	 * loop for sending packets
+	 */
+	start_time = time(NULL);
 
-    for (;;) {
-	retval = sendto(udp_p->sd, udp_p->msg, udp_p->msgsize, 0,
-			udp_p->addr_info.ai_addr, udp_p->addr_info.ai_addrlen);
-	if (retval != udp_p->msgsize) {
-	    if (catch_sighup)
-		break;
-	    else
-		fatal_error("sendto()");
+	for (;;) {
+		retval = sendto(udp_p->sd, udp_p->msg, udp_p->msgsize, 0,
+				udp_p->addr_info.ai_addr,
+				udp_p->addr_info.ai_addrlen);
+		if (retval != udp_p->msgsize) {
+			if (catch_sighup)
+				break;
+			else
+				fatal_error("sendto()");
+		}
+
+		/* Check timeout:
+		   If timeout value is negative only send one datagram */
+		if (udp_p->timeout)
+			if (udp_p->timeout < difftime(time(NULL), start_time))
+				break;
+
+		if (catch_sighup)	/* catch SIGHUP */
+			break;
 	}
 
-	/* Check timeout:
-	   If timeout value is negative only send one datagram */
-	if (udp_p->timeout)
-	    if (udp_p->timeout < difftime(time(NULL), start_time))
-		break;
-
-	if (catch_sighup) /* catch SIGHUP */
-	    break;
-    }
-
-    /* Close the socket */
-    close(udp_p->sd);
+	/* Close the socket */
+	close(udp_p->sd);
 }
 
 /*
@@ -421,25 +423,24 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    struct udp_info udp_data;
-    int background = 0;
+	struct udp_info udp_data;
+	int background = 0;
 
-    debug = 0;
-    program_name = strdup(argv[0]);
+	debug = 0;
+	program_name = strdup(argv[0]);
 
-    memset(&udp_data, '\0', sizeof(struct udp_info));
-    parse_options(argc, argv, &udp_data, &background);
+	memset(&udp_data, '\0', sizeof(struct udp_info));
+	parse_options(argc, argv, &udp_data, &background);
 
-    create_udp_datagram(&udp_data);
+	create_udp_datagram(&udp_data);
 
-    if (background)	/* Work in the background */
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	if (background)		/* Work in the background */
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    send_udp_datagram(&udp_data);
+	send_udp_datagram(&udp_data);
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/stress/ns-tools/ns-udpserver.c b/testcases/network/stress/ns-tools/ns-udpserver.c
index dc5f282..fb49e12 100644
--- a/testcases/network/stress/ns-tools/ns-udpserver.c
+++ b/testcases/network/stress/ns-tools/ns-udpserver.c
@@ -56,8 +56,8 @@
 /*
  * Gloval variables
  */
-struct sigaction handler;    /* Behavior for a signal */
-int catch_sighup;       /* When catch the SIGHUP, set to non-zero */
+struct sigaction handler;	/* Behavior for a signal */
+int catch_sighup;		/* When catch the SIGHUP, set to non-zero */
 
 /*
  * Function: usage()
@@ -72,28 +72,25 @@
  * Return value:
  *  This function does not return.
  */
-void
-usage(char *program_name, int exit_value)
+void usage(char *program_name, int exit_value)
 {
-    FILE *stream = stdout;	/* stream where the usage is output */
+	FILE *stream = stdout;	/* stream where the usage is output */
 
-    if (exit_value == EXIT_FAILURE)
-	stream = stderr;
+	if (exit_value == EXIT_FAILURE)
+		stream = stderr;
 
-    fprintf(stream, "%s [OPTION]\n"
-		    "\t-f\tprotocol family\n"
-		    "\t\t  4 : IPv4\n"
-		    "\t\t  6 : IPv6\n"
-		    "\t-p\tport number\n"
-		    "\t\tthe port number specified by -p option would be the first port number\n"
-		    "\t-b\twork in the background\n"
-		    "\t-o\tfilename where the server infomation is outputted\n"
-		    "\t-d\twork in the debug mode\n"
-		    "\t-h\tdisplay this usage\n"
-		    ""
-		    "*) Server works till it receives SIGHUP\n"
-			, program_name);
-    exit (exit_value);
+	fprintf(stream, "%s [OPTION]\n"
+		"\t-f\tprotocol family\n"
+		"\t\t  4 : IPv4\n"
+		"\t\t  6 : IPv6\n"
+		"\t-p\tport number\n"
+		"\t\tthe port number specified by -p option would be the first port number\n"
+		"\t-b\twork in the background\n"
+		"\t-o\tfilename where the server infomation is outputted\n"
+		"\t-d\twork in the debug mode\n"
+		"\t-h\tdisplay this usage\n"
+		"" "*) Server works till it receives SIGHUP\n", program_name);
+	exit(exit_value);
 }
 
 /*
@@ -109,25 +106,24 @@
  * Return value:
  *  None
  */
-void
-set_signal_flag(int type)
+void set_signal_flag(int type)
 {
-    /* Set SIG_IGN against the caught signal */
-    handler.sa_handler = SIG_IGN;
-    if (sigaction(type, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Set SIG_IGN against the caught signal */
+	handler.sa_handler = SIG_IGN;
+	if (sigaction(type, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    if (debug)
-	fprintf(stderr, "Catch signal. type is %d\n", type);
+	if (debug)
+		fprintf(stderr, "Catch signal. type is %d\n", type);
 
-    switch (type) {
+	switch (type) {
 	case SIGHUP:
-	    catch_sighup = 1;
-	    break;
+		catch_sighup = 1;
+		break;
 	default:
-	    fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
-	    exit(EXIT_FAILURE);
-    }
+		fprintf(stderr, "Unexpected signal (%d) is caught\n", type);
+		exit(EXIT_FAILURE);
+	}
 }
 
 /*
@@ -142,47 +138,48 @@
  * Return value:
  *  None
  */
-void
-respond_to_client(sock_fd)
+void respond_to_client(sock_fd)
 {
-    char *msgbuf;		/* Pointer to the message */
-    size_t msgbuf_size;		/* size of msgbuf */
-    ssize_t msglen;		/* the length of message */
-    socklen_t sock_optlen;		/* size of the result parameter */
-    struct sockaddr_storage client_addr;	/* address of a client */
-    socklen_t client_addr_len;			/* length of `client_addr' */
+	char *msgbuf;		/* Pointer to the message */
+	size_t msgbuf_size;	/* size of msgbuf */
+	ssize_t msglen;		/* the length of message */
+	socklen_t sock_optlen;	/* size of the result parameter */
+	struct sockaddr_storage client_addr;	/* address of a client */
+	socklen_t client_addr_len;	/* length of `client_addr' */
 
-    sock_optlen = sizeof(sock_optlen);
-    if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF,
-			&msgbuf_size, &sock_optlen) < 0) {
-	perror("getsockopt()");
-	close(sock_fd);
-	exit(EXIT_FAILURE);
-    }
+	sock_optlen = sizeof(sock_optlen);
+	if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF,
+		       &msgbuf_size, &sock_optlen) < 0) {
+		perror("getsockopt()");
+		close(sock_fd);
+		exit(EXIT_FAILURE);
+	}
 
-    /* Allocate the memory for a message */
-    msgbuf = (char *)malloc(msgbuf_size + 1);
-    if (msgbuf == NULL) {
-	fprintf(stderr, "malloc() is failed.\n");
-	close(sock_fd);
-	exit(EXIT_FAILURE);
-    }
+	/* Allocate the memory for a message */
+	msgbuf = (char *)malloc(msgbuf_size + 1);
+	if (msgbuf == NULL) {
+		fprintf(stderr, "malloc() is failed.\n");
+		close(sock_fd);
+		exit(EXIT_FAILURE);
+	}
 
-    /* Receive a message */
-    client_addr_len = sizeof(client_addr);
-    if ((msglen = recvfrom(sock_fd, msgbuf, msgbuf_size, 0,
-		    (struct sockaddr *)&client_addr, &client_addr_len)) < 0)
-	fatal_error("recvfrom()");
-    msgbuf[msglen] = '\0';
+	/* Receive a message */
+	client_addr_len = sizeof(client_addr);
+	if ((msglen = recvfrom(sock_fd, msgbuf, msgbuf_size, 0,
+			       (struct sockaddr *)&client_addr,
+			       &client_addr_len)) < 0)
+		fatal_error("recvfrom()");
+	msgbuf[msglen] = '\0';
 
-    if (debug)
-	fprintf(stderr, "Message is %s\n", msgbuf);
+	if (debug)
+		fprintf(stderr, "Message is %s\n", msgbuf);
 
-    /* Return the message to the client */
-    if (sendto(sock_fd, msgbuf, msglen, 0,
-		(struct sockaddr *)&client_addr, sizeof(client_addr)) != msglen)
-	fatal_error("sendto()");
-    free(msgbuf);
+	/* Return the message to the client */
+	if (sendto(sock_fd, msgbuf, msglen, 0,
+		   (struct sockaddr *)&client_addr,
+		   sizeof(client_addr)) != msglen)
+		fatal_error("sendto()");
+	free(msgbuf);
 }
 
 /*
@@ -190,187 +187,189 @@
  *  Function: main()
  *
  */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    char *program_name = argv[0];
-    int optc;			/* option */
-    sa_family_t family;		/* protocol family */
-    char *portnum = NULL;	/* port number */
-    int sock_fd;		/* socket binded open ports */
-    int background = 0;		/* work in the background if non-zero */
-    fd_set read_fds;		/* list of file descriptor for reading */
-    int max_read_fd = 0;	/* maximum number in the read fds */
-    FILE *info_fp = stdout;	/* FILE pointer to a information file */
-    int on;			/* on/off at an socket option */
-    int err;			/* return value of getaddrinfo */
-    struct addrinfo hints;	/* hints for getaddrinfo() */
-    struct addrinfo *res;	/* pointer to addrinfo */
+	char *program_name = argv[0];
+	int optc;		/* option */
+	sa_family_t family;	/* protocol family */
+	char *portnum = NULL;	/* port number */
+	int sock_fd;		/* socket binded open ports */
+	int background = 0;	/* work in the background if non-zero */
+	fd_set read_fds;	/* list of file descriptor for reading */
+	int max_read_fd = 0;	/* maximum number in the read fds */
+	FILE *info_fp = stdout;	/* FILE pointer to a information file */
+	int on;			/* on/off at an socket option */
+	int err;		/* return value of getaddrinfo */
+	struct addrinfo hints;	/* hints for getaddrinfo() */
+	struct addrinfo *res;	/* pointer to addrinfo */
 
-    debug = 0;
-    family = PF_UNSPEC;
+	debug = 0;
+	family = PF_UNSPEC;
 
-    /* Retrieve the options */
-    while ((optc = getopt(argc, argv, "f:p:bo:dh")) != EOF) {
-	switch (optc) {
-	    case 'f':
-		if (strncmp(optarg, "4", 1) == 0)
-		    family = PF_INET;	/* IPv4 */
-		else if (strncmp(optarg, "6", 1) == 0)
-		    family = PF_INET6;	/* IPv6 */
-		else {
-		    fprintf(stderr, "protocol family should be 4 or 6.\n");
-		    usage(program_name, EXIT_FAILURE);
-		}
-		break;
+	/* Retrieve the options */
+	while ((optc = getopt(argc, argv, "f:p:bo:dh")) != EOF) {
+		switch (optc) {
+		case 'f':
+			if (strncmp(optarg, "4", 1) == 0)
+				family = PF_INET;	/* IPv4 */
+			else if (strncmp(optarg, "6", 1) == 0)
+				family = PF_INET6;	/* IPv6 */
+			else {
+				fprintf(stderr,
+					"protocol family should be 4 or 6.\n");
+				usage(program_name, EXIT_FAILURE);
+			}
+			break;
 
-	    case 'p':
-		{
-		    unsigned long int num;
-		    num = strtoul(optarg, NULL, 0);
-		    if (num < PORTNUMMIN || PORTNUMMAX < num) {
-			fprintf(stderr, "The range of port is from %u to %u\n",
-				PORTNUMMIN, PORTNUMMAX);
+		case 'p':
+			{
+				unsigned long int num;
+				num = strtoul(optarg, NULL, 0);
+				if (num < PORTNUMMIN || PORTNUMMAX < num) {
+					fprintf(stderr,
+						"The range of port is from %u to %u\n",
+						PORTNUMMIN, PORTNUMMAX);
+					usage(program_name, EXIT_FAILURE);
+				}
+				portnum = strdup(optarg);
+			}
+			break;
+
+		case 'b':
+			background = 1;
+			break;
+
+		case 'o':
+			if ((info_fp = fopen(optarg, "w")) == NULL) {
+				fprintf(stderr, "Cannot open %s\n", optarg);
+				exit(EXIT_FAILURE);
+			}
+			break;
+
+		case 'd':
+			debug = 1;
+			break;
+
+		case 'h':
+			usage(program_name, EXIT_SUCCESS);
+			break;
+
+		default:
 			usage(program_name, EXIT_FAILURE);
-		    }
-		    portnum = strdup(optarg);
 		}
-		break;
+	}
 
-	    case 'b':
-		background = 1;
-		break;
-
-	    case 'o':
-		if ((info_fp = fopen(optarg, "w")) == NULL) {
-		    fprintf(stderr, "Cannot open %s\n", optarg);
-		    exit(EXIT_FAILURE);
-		}
-		break;
-
-	    case 'd':
-		debug = 1;
-		break;
-
-	    case 'h':
-		usage(program_name, EXIT_SUCCESS);
-		break;
-
-	    default:
+	/* Check the family is spefied. */
+	if (family == PF_UNSPEC) {
+		fprintf(stderr, "protocol family should be specified.\n");
 		usage(program_name, EXIT_FAILURE);
 	}
-    }
 
-    /* Check the family is spefied. */
-    if (family == PF_UNSPEC) {
-	fprintf (stderr, "protocol family should be specified.\n");
-	usage(program_name, EXIT_FAILURE);
-    }
+	/* At first, SIGHUP is ignored. */
+	handler.sa_handler = SIG_IGN;
+	if (sigfillset(&handler.sa_mask) < 0)
+		fatal_error("sigfillset()");
+	handler.sa_flags = 0;
 
-    /* At first, SIGHUP is ignored. */
-    handler.sa_handler = SIG_IGN;
-    if (sigfillset(&handler.sa_mask) < 0)
-	fatal_error("sigfillset()");
-    handler.sa_flags = 0;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Set the hints to addrinfo() */
+	memset(&hints, '\0', sizeof(struct addrinfo));
+	hints.ai_family = family;
+	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
+	hints.ai_flags = AI_PASSIVE;
 
-    /* Set the hints to addrinfo() */
-    memset(&hints, '\0', sizeof(struct addrinfo));
-    hints.ai_family = family;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
-    hints.ai_flags = AI_PASSIVE;
+	/* Translate the network and service information of the server */
+	err = getaddrinfo(NULL, portnum, &hints, &res);
+	if (err) {
+		fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
+		exit(EXIT_FAILURE);
+	}
+	if (res->ai_next) {
+		fprintf(stderr, "getaddrinfo(): multiple address is found.");
+		exit(EXIT_FAILURE);
+	}
 
-    /* Translate the network and service information of the server */
-    err = getaddrinfo(NULL, portnum, &hints, &res);
-    if (err) {
-	fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(err));
-	exit(EXIT_FAILURE);
-    }
-    if (res->ai_next) {
-	fprintf(stderr, "getaddrinfo(): multiple address is found.");
-	exit(EXIT_FAILURE);
-    }
-
-    /* Create a socket for listening. */
-    sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
-    if (sock_fd < 0)
-	fatal_error("socket()");
+	/* Create a socket for listening. */
+	sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+	if (sock_fd < 0)
+		fatal_error("socket()");
 
 #ifdef IPV6_V6ONLY
-    /* Don't accept IPv4 mapped address if the protocol family is IPv6 */
-    if (res->ai_family == PF_INET6) {
-	on = 1;
-	if (setsockopt(sock_fd,IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int)))
-	    fatal_error("setsockopt()");
-    }
+	/* Don't accept IPv4 mapped address if the protocol family is IPv6 */
+	if (res->ai_family == PF_INET6) {
+		on = 1;
+		if (setsockopt
+		    (sock_fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int)))
+			fatal_error("setsockopt()");
+	}
 #endif
 
-    /* Enable to reuse the socket */
-    on = 1;
-    if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
-	fatal_error("setsockopt()");
+	/* Enable to reuse the socket */
+	on = 1;
+	if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)))
+		fatal_error("setsockopt()");
 
-    /* Bind to the local address */
-    if (bind(sock_fd, res->ai_addr, res->ai_addrlen) < 0)
-	fatal_error("bind()");
+	/* Bind to the local address */
+	if (bind(sock_fd, res->ai_addr, res->ai_addrlen) < 0)
+		fatal_error("bind()");
 
-    freeaddrinfo(res);
+	freeaddrinfo(res);
 
-    /* If -b option is specified, work as a daemon */
-    if (background)
-	if (daemon(0, 0) < 0)
-	    fatal_error("daemon()");
+	/* If -b option is specified, work as a daemon */
+	if (background)
+		if (daemon(0, 0) < 0)
+			fatal_error("daemon()");
 
-    /* Output any server information to the information file */
-    fprintf(info_fp, "PID: %u\n", getpid());
-    fflush(info_fp);
-    if (info_fp != stdout)
-	if (fclose(info_fp))
-	    fatal_error("fclose()");
+	/* Output any server information to the information file */
+	fprintf(info_fp, "PID: %u\n", getpid());
+	fflush(info_fp);
+	if (info_fp != stdout)
+		if (fclose(info_fp))
+			fatal_error("fclose()");
 
-    /* Catch SIGHUP */
-    handler.sa_handler = set_signal_flag;
-    if (sigaction(SIGHUP, &handler, NULL) < 0)
-	fatal_error("sigaction()");
+	/* Catch SIGHUP */
+	handler.sa_handler = set_signal_flag;
+	if (sigaction(SIGHUP, &handler, NULL) < 0)
+		fatal_error("sigaction()");
 
-    /* Loop to wait a client access */
-    FD_ZERO(&read_fds);
-    FD_SET(sock_fd, &read_fds);
-    max_read_fd = sock_fd;
-    for (;;) {
-	int select_ret;     /* return value of select() */
-	fd_set  active_fds; /* list of the active file descriptor */
-	struct timeval select_timeout;      /* timeout for select() */
+	/* Loop to wait a client access */
+	FD_ZERO(&read_fds);
+	FD_SET(sock_fd, &read_fds);
+	max_read_fd = sock_fd;
+	for (;;) {
+		int select_ret;	/* return value of select() */
+		fd_set active_fds;	/* list of the active file descriptor */
+		struct timeval select_timeout;	/* timeout for select() */
 
-	/* When catch SIGHUP, exit the loop */
-	if (catch_sighup)
-	    break;
+		/* When catch SIGHUP, exit the loop */
+		if (catch_sighup)
+			break;
 
-	active_fds = read_fds;
-	select_timeout.tv_sec = 0;      /* 0.5 sec */
-	select_timeout.tv_usec = 500000;
+		active_fds = read_fds;
+		select_timeout.tv_sec = 0;	/* 0.5 sec */
+		select_timeout.tv_usec = 500000;
 
-	select_ret = select(max_read_fd + 1, &active_fds,
-		NULL, NULL, &select_timeout);
-	if (select_ret < 0) {
-	    if (catch_sighup)
-		break;
-	    else
-		fatal_error("select()");
-	} else if (select_ret == 0) {
-	    continue;
-	} else {
-	    if (FD_ISSET(sock_fd, &active_fds))
-		respond_to_client(sock_fd);
+		select_ret = select(max_read_fd + 1, &active_fds,
+				    NULL, NULL, &select_timeout);
+		if (select_ret < 0) {
+			if (catch_sighup)
+				break;
+			else
+				fatal_error("select()");
+		} else if (select_ret == 0) {
+			continue;
+		} else {
+			if (FD_ISSET(sock_fd, &active_fds))
+				respond_to_client(sock_fd);
+		}
 	}
-    }
 
-    /* Close the sockets */
-    if (close(sock_fd))
-	fatal_error("close()");
+	/* Close the sockets */
+	if (close(sock_fd))
+		fatal_error("close()");
 
-    exit(EXIT_SUCCESS);
+	exit(EXIT_SUCCESS);
 }
diff --git a/testcases/network/tcp_cmds/echo/createfile.c b/testcases/network/tcp_cmds/echo/createfile.c
index 595f051..485bedf 100644
--- a/testcases/network/tcp_cmds/echo/createfile.c
+++ b/testcases/network/tcp_cmds/echo/createfile.c
@@ -15,15 +15,14 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 
-	int		fd;
-	int		fsize;
-	int		count = 0;
-	int		n, remain;
-	static	char	buf[BUFSIZ];
+	int fd;
+	int fsize;
+	int count = 0;
+	int n, remain;
+	static char buf[BUFSIZ];
 
 	for (fsize = 0; fsize < BUFSIZ; fsize++) {
 		if ((fsize % 2) == 0)
@@ -41,7 +40,7 @@
 		remain = fsize % BUFSIZ;
 	} else
 		remain = fsize;
-	while (count-- !=0) {
+	while (count-- != 0) {
 		if ((n = write(fd, buf, BUFSIZ)) != BUFSIZ)
 			perror("createfile");
 	}
diff --git a/testcases/network/tcp_cmds/echo/echoes.c b/testcases/network/tcp_cmds/echo/echoes.c
index db9c27f..2c4f11b 100644
--- a/testcases/network/tcp_cmds/echo/echoes.c
+++ b/testcases/network/tcp_cmds/echo/echoes.c
@@ -36,24 +36,23 @@
 char *TCID = "echoes";
 #endif
 
-int	TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
-void	echofile (struct servent *, struct addrinfo *, char *, char *);
-int	checkfile(char *, char *);
-void	cleanup(int);
+void echofile(struct servent *, struct addrinfo *, char *, char *);
+int checkfile(char *, char *);
+void cleanup(int);
 
-int
-main (int argc, char *argv[], char *env[])
+int main(int argc, char *argv[], char *env[])
 {
 
-	unsigned int	finish, i, j, k;
-	int		gai, wait_stat;
-	pid_t		pid;
+	unsigned int finish, i, j, k;
+	int gai, wait_stat;
+	pid_t pid;
 	struct addrinfo hints, *hp;
-	struct		servent *sp;
-	struct  {
-		char	resultfile[FILENAME_MAX+1];
-		pid_t	pid;
+	struct servent *sp;
+	struct {
+		char resultfile[FILENAME_MAX + 1];
+		pid_t pid;
 	} echo_struc[200];
 
 	memset(&hints, 0, sizeof(hints));
@@ -64,18 +63,18 @@
 		tst_brkm(TBROK, NULL, "usage: remote-addr file num-procs");
 
 	if ((sp = getservbyname("echo", "tcp")) == NULL)
-		tst_brkm(TBROK|TERRNO, NULL, "getservbyname failed");
+		tst_brkm(TBROK | TERRNO, NULL, "getservbyname failed");
 
 	if ((gai = getaddrinfo(argv[1], NULL, &hints, &hp)) != 0)
 		tst_brkm(TBROK, NULL, "unknown subject address %s: %s\n",
-			argv[1], gai_strerror(gai));
+			 argv[1], gai_strerror(gai));
 
 	if (!hp || !hp->ai_addr || hp->ai_addr->sa_family != AFI)
 		tst_brkm(TBROK, NULL, "getaddrinfo failed");
 
-	i = (unsigned int) strtol(argv[3], (char**) NULL, 10);
+	i = (unsigned int)strtol(argv[3], (char **)NULL, 10);
 	j = 0;
-	while (i-- > 0)  {
+	while (i-- > 0) {
 		switch (pid = fork()) {
 		case 0:
 			snprintf(echo_struc[j].resultfile,
@@ -83,7 +82,7 @@
 			echofile(sp, hp, echo_struc[j].resultfile, argv[2]);
 			break;
 		case -1:
-			tst_resm(TBROK|TERRNO, "fork failed");
+			tst_resm(TBROK | TERRNO, "fork failed");
 			break;
 		default:
 			echo_struc[j].pid = pid;
@@ -91,13 +90,13 @@
 			break;
 		}
 	}
-	finish = (unsigned int) strtol(argv[3], (char**) NULL, 10);
+	finish = (unsigned int)strtol(argv[3], (char **)NULL, 10);
 	i = finish;
 	/* Consume all operating threads until we're done... */
 	while (finish != 0) {
 
 		if ((pid = wait(&wait_stat)) == -1)
-			tst_resm(TFAIL|TERRNO, "wait failed");
+			tst_resm(TFAIL | TERRNO, "wait failed");
 		if (wait_stat == 0) {
 			for (j = 0; j < i; j++) {
 				if (echo_struc[j].pid == pid) {
@@ -111,10 +110,10 @@
 
 			if (WIFEXITED(wait_stat)) {
 				tst_resm(TINFO, "exit status: %d",
-				    WEXITSTATUS(wait_stat));
+					 WEXITSTATUS(wait_stat));
 			} else if (WIFSIGNALED(wait_stat)) {
 				tst_resm(TINFO, "signaled: %d",
-				    WTERMSIG(wait_stat));
+					 WTERMSIG(wait_stat));
 			}
 
 			for (k = 0; k < i; k++) {
@@ -132,24 +131,24 @@
 
 /* XXX (garrcoop): This shouldn't use libltp as it's a forked process. */
 void
-echofile (struct servent *sp, struct addrinfo *ai, char *resultfile,
-		char *srcfile)
+echofile(struct servent *sp, struct addrinfo *ai, char *resultfile,
+	 char *srcfile)
 {
-	int		n;
-	int		port;
-	char		wr_buffer[BUFSIZ];
-	char		rd_buffer[BUFSIZ];
-	sai_t		sa;
+	int n;
+	int port;
+	char wr_buffer[BUFSIZ];
+	char rd_buffer[BUFSIZ];
+	sai_t sa;
 #ifdef DEBUG
-	sa_t		address;
-	socklen_t	addrlen;
+	sa_t address;
+	socklen_t addrlen;
 #endif
-	int		s;
-	int		finish;
-	int		fdw, fdr;
-	int		nread, nwrite;
-	int		count;
-	pid_t		pid;
+	int s;
+	int finish;
+	int fdw, fdr;
+	int nread, nwrite;
+	int count;
+	pid_t pid;
 
 #ifdef 	DEBUG
 	printf("Creating socket .....\n");
@@ -158,7 +157,7 @@
 	pid = getpid();
 	if ((s = socket(AFI, SOCK_STREAM, 0)) < 0) {
 		tst_resm(TBROK, "Failed to create listener socket (pid=%d)",
-				pid);
+			 pid);
 		cleanup(s);
 		tst_exit();
 	}
@@ -173,7 +172,7 @@
 	 *
 	 * ...
 	 *
-	 * struct	in_addr	hostaddr;
+	 * struct       in_addr hostaddr;
 	 *
 	 * memcpy(&hostaddr,hp->h_addr_list[0],sizeof(struct in_addr));
 	 *
@@ -221,7 +220,7 @@
 	//tst_resm(TBROK, "FIX ME GARRETT!");
 	//tst_exit();
 
-	memset((char*) &sa, 0, sizeof(sa));
+	memset((char *)&sa, 0, sizeof(sa));
 	memcpy(&sa, ai->ai_addr, ai->ai_addrlen);
 
 #if INET6
@@ -230,93 +229,95 @@
 	sa.sin_port = port;
 #endif
 
-	if (connect(s, (sa_t*) &sa, sizeof(sa)) == -1) {
-		tst_resm(TBROK|TERRNO,
-		    "failed to create connector socket (pid=%d)", pid);
+	if (connect(s, (sa_t *) & sa, sizeof(sa)) == -1) {
+		tst_resm(TBROK | TERRNO,
+			 "failed to create connector socket (pid=%d)", pid);
 		cleanup(s);
 		tst_exit();
 	}
-
 #ifdef DEBUG
 	addrlen = sizeof(struct sockaddr);
 	/* printf("addrlen=%d\n", addrlen); */
 	/* printf("ai->ai_addr=%s\n", inet_ntoa(ai->ai_addr)); */
 	if (getsockname(s, &address, &addrlen) == -1) {
-		tst_resm(TBROK|TERRNO, "getsockname call failed (pid=%d)", pid);
+		tst_resm(TBROK | TERRNO, "getsockname call failed (pid=%d)",
+			 pid);
 		cleanup(s);
 		tst_exit();
 	}
 
-	printf ("local port is: %d\n", port);
+	printf("local port is: %d\n", port);
 
 	if (getpeername(s, &address, &addrlen) == -1) {
-		tst_resm(TBROK|TERRNO, "getpeername call failed (pid=%d)", pid);
+		tst_resm(TBROK | TERRNO, "getpeername call failed (pid=%d)",
+			 pid);
 		cleanup(s);
 		tst_exit();
 	}
 
-	tst_resm (TINFO, "The remote port is: %d\n", port);
+	tst_resm(TINFO, "The remote port is: %d\n", port);
 #endif
 	if ((fdr = open(srcfile, O_RDONLY)) < 0) {
-		tst_resm(TBROK|TERRNO,
-		    "failed to open input file (pid=%d)", pid);
+		tst_resm(TBROK | TERRNO,
+			 "failed to open input file (pid=%d)", pid);
 		cleanup(s);
 		tst_exit();
 	}
 
 	if ((fdw = creat(resultfile, 0644)) < 0) {
-		tst_resm(TBROK|TERRNO,
-		    "failed to create a temporary file (pid=%d)", pid);
+		tst_resm(TBROK | TERRNO,
+			 "failed to create a temporary file (pid=%d)", pid);
 		cleanup(s);
 		tst_exit();
 	}
 #if DEBUG
-	tst_resm (TINFO, "creat(resultfile,...) done.");
+	tst_resm(TINFO, "creat(resultfile,...) done.");
 #endif
 	finish = FALSE;
 	count = 0;
 	while (finish == FALSE) {
 
 		if ((nwrite = read(fdr, wr_buffer, BUFSIZ)) == -1) {
-			tst_resm(TFAIL|TERRNO,
-			    "failed to read from file (pid=%d)", pid);
+			tst_resm(TFAIL | TERRNO,
+				 "failed to read from file (pid=%d)", pid);
 			cleanup(s);
 		}
 #if DEBUG
-		tst_resm (TINFO, "Read %d bytes from file", nwrite);
+		tst_resm(TINFO, "Read %d bytes from file", nwrite);
 #endif
 		if (nwrite == 0)
 			finish = TRUE;
 		else {
 			count++;
 			if ((n = write(s, wr_buffer, nwrite)) != nwrite) {
-				tst_resm(TFAIL|TERRNO,
-				    "failed to write to socket (pid=%d)", pid);
+				tst_resm(TFAIL | TERRNO,
+					 "failed to write to socket (pid=%d)",
+					 pid);
 				cleanup(s);
 			}
 #ifdef 	DEBUG
 			tst_resm(TINFO, "Writing %d bytes to remote socket",
-					count);
+				 count);
 #endif
 			while (nwrite != 0) {
 
 				nread = read(s, rd_buffer, BUFSIZ);
 				if (nread == -1) {
 					printf("read size: %d\n", n);
-					tst_resm(TFAIL|TERRNO,
-					    "failed to read from socket [2nd "
-					    "time] (pid=%d)", pid);
+					tst_resm(TFAIL | TERRNO,
+						 "failed to read from socket [2nd "
+						 "time] (pid=%d)", pid);
 					cleanup(s);
 				}
 #ifdef 	DEBUG
-				printf("Reading ....... %d\n",count);
+				printf("Reading ....... %d\n", count);
 #endif
 				n = write(fdw, rd_buffer, nread);
 				if (n != nread) {
-					tst_resm(TFAIL|TERRNO,
-					    "ERROR during write to result "
-					    "file (pid=%d); read amount: %d",
-					    pid, n);
+					tst_resm(TFAIL | TERRNO,
+						 "ERROR during write to result "
+						 "file (pid=%d); read amount: %d",
+						 pid, n);
 					cleanup(s);
 				}
 
@@ -324,35 +325,35 @@
 
 			}
 
-		}/* end of else */
+		}		/* end of else */
 
-	} /* end of while */
+	}			/* end of while */
 
 	if ((n = close(s)) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL,
-		    "failed to cleanly close socket (pid=%d)", pid);
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "failed to cleanly close socket (pid=%d)", pid);
 	}
 	if ((n = close(fdr)) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL,
-		    "failed to cleanly close input file (pid=%d)", pid);
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "failed to cleanly close input file (pid=%d)", pid);
 	}
-	if ((n = close(fdw) ) == -1) {
-		tst_brkm(TBROK|TERRNO, NULL,
-		    "failed to cleanly close temp file (pid=%d)", pid);
+	if ((n = close(fdw)) == -1) {
+		tst_brkm(TBROK | TERRNO, NULL,
+			 "failed to cleanly close temp file (pid=%d)", pid);
 	}
 	if (checkfile(srcfile, resultfile) != TRUE) {
 		tst_brkm(TFAIL, NULL,
-		    "Input file and output file are not equal (pid=%d)", pid);
+			 "Input file and output file are not equal (pid=%d)",
+			 pid);
 	}
 	tst_resm(TINFO, "Finish .... (pid=%d)", pid);
 	tst_exit();
 }
 
-int
-checkfile(char *file1, char *file2)
+int checkfile(char *file1, char *file2)
 {
-	off_t	n;
-	struct	stat buffer;
+	off_t n;
+	struct stat buffer;
 	stat(file1, &buffer);
 	n = buffer.st_size;
 #ifdef 	DEBUG
@@ -368,8 +369,7 @@
 		return TRUE;
 }
 
-void
-cleanup(int s)
+void cleanup(int s)
 {
 	close(s);
 }
diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong.c b/testcases/network/tcp_cmds/perf_lan/pingpong.c
index cf86815..59bca58 100644
--- a/testcases/network/tcp_cmds/perf_lan/pingpong.c
+++ b/testcases/network/tcp_cmds/perf_lan/pingpong.c
@@ -56,59 +56,58 @@
 #endif
 
 #if INET6
-char		*TCID = "perf_lan6";
+char *TCID = "perf_lan6";
 #else
-char		*TCID = "perf_lan";
+char *TCID = "perf_lan";
 #endif
 
-int		TST_TOTAL = 1;
+int TST_TOTAL = 1;
 
-int		pfd[2];
-int		fdstr[10];
-int		verbose;
-int		count;
-uint8_t		packet[MAXPACKET];
-int		options;
-int		s;			/* Socket file descriptor */
-struct hostent	*hp;			/* Pointer to host info */
-struct timezone	tz;			/* leftover */
+int pfd[2];
+int fdstr[10];
+int verbose;
+int count;
+uint8_t packet[MAXPACKET];
+int options;
+int s;				/* Socket file descriptor */
+struct hostent *hp;		/* Pointer to host info */
+struct timezone tz;		/* leftover */
 
-sai_t		whereto;		/* Who to pingpong */
-int		datalen;		/* How much data */
+sai_t whereto;			/* Who to pingpong */
+int datalen;			/* How much data */
 
-char		*hostname;
-char		hnamebuf[MAXHOSTNAMELEN];
+char *hostname;
+char hnamebuf[MAXHOSTNAMELEN];
 
-int		npackets = 1;
-int		ntransmitted = 0;	/* sequence number for outbound
-					 * packets => amount sent */
-int		ident;
-int		nwrite;
+int npackets = 1;
+int ntransmitted = 0;		/* sequence number for outbound
+				 * packets => amount sent */
+int ident;
+int nwrite;
 
-int		nreceived = 0;		/* # of packets we got back */
-int		timing = 0;
+int nreceived = 0;		/* # of packets we got back */
+int timing = 0;
 
-void		finish(int);
-uint16_t	in_cksum(uint16_t*, int);
-int		ck_packet(uint8_t*, size_t, sai_t*);
-int		echopkt(int, int);
+void finish(int);
+uint16_t in_cksum(uint16_t *, int);
+int ck_packet(uint8_t *, size_t, sai_t *);
+int echopkt(int, int);
 
 /*
  * 			M A I N
  */
-int
-main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	sai_t from;
 	int rc = 0;
 	struct protoent *proto;
 
-	tst_resm (TINFO, "Starting pingpong - to send / receive packets from "
-			 "host");
+	tst_resm(TINFO, "Starting pingpong - to send / receive packets from "
+		 "host");
 
 	/* Get Host net address */
-	tst_resm (TINFO, "Get host net address for sending packets");
-	memset( (char *)&whereto, 0, sizeof(sa_t) );
+	tst_resm(TINFO, "Get host net address for sending packets");
+	memset((char *)&whereto, 0, sizeof(sa_t));
 #if INET6
 	whereto.sin6_family = AFI;
 	whereto.sin6_addr.s6_addr = inet_addr(argv[1]);
@@ -125,62 +124,63 @@
 		if ((hp = gethostbyname(argv[1])) != NULL) {
 #if INET6
 			whereto.sin6_family = hp->h_addrtype;
-			memcpy((caddr_t) &whereto.sin6_addr, hp->h_addr, hp->h_length);
+			memcpy((caddr_t) & whereto.sin6_addr, hp->h_addr,
+			       hp->h_length);
 #else
 			whereto.sin_family = hp->h_addrtype;
-			memcpy((caddr_t) &whereto.sin_addr, hp->h_addr, hp->h_length);
+			memcpy((caddr_t) & whereto.sin_addr, hp->h_addr,
+			       hp->h_length);
 #endif
 			hostname = hp->h_name;
 		} else {
-			tst_resm (TBROK, "%s: unknown host, couldn't get "
-					 "address", argv[0]);
+			tst_resm(TBROK, "%s: unknown host, couldn't get "
+				 "address", argv[0]);
 			tst_exit();
 		}
 
 	}
 
 	/*  Determine Packet Size - either use what was passed in or the default */
-	tst_resm (TINFO, "Determining packet size");
+	tst_resm(TINFO, "Determining packet size");
 
 	if (argc >= 3)
 		datalen = atoi(argv[2]);
-		if (datalen < 0) {
-			tst_resm (TBROK, "datalen must be an integer.");
-			tst_exit();
-		}
-	else
+	if (datalen < 0) {
+		tst_resm(TBROK, "datalen must be an integer.");
+		tst_exit();
+	} else
 		datalen = 64;
 
 	datalen -= 8;
 
 	if (datalen > MAXPACKET) {
-		tst_resm (TBROK, "packet size too large");
+		tst_resm(TBROK, "packet size too large");
 		tst_exit();
 	}
 	if (datalen >= sizeof(struct timeval))
 		timing = 1;
 
-        /* Set number of packets to be sent */
-	tst_resm (TINFO, "Determining number of packets to send");
+	/* Set number of packets to be sent */
+	tst_resm(TINFO, "Determining number of packets to send");
 	if (argc >= 4)
 		npackets = atoi(argv[3]);
 
-        /* Get PID of current process */
+	/* Get PID of current process */
 	ident = getpid() & 0xFFFF;
 
 	/* Get network protocol to use (check /etc/protocol) */
 	if ((proto = getprotobyname(ICMP_PROTO)) == NULL) {
-		tst_resm (TINFO, "unknown protocol: %s", ICMP_PROTO);
+		tst_resm(TINFO, "unknown protocol: %s", ICMP_PROTO);
 		tst_exit();
 	}
 
 	/* Create a socket endpoint for communications - returns a descriptor */
 	if ((s = socket(AFI, SOCK_RAW, proto->p_proto)) < 0) {
-		tst_resm (TINFO, "socket - could not create link");
+		tst_resm(TINFO, "socket - could not create link");
 		tst_exit();
 	}
 
-	tst_resm (TINFO, "echoing %s: %d data bytes", hostname, datalen);
+	tst_resm(TINFO, "echoing %s: %d data bytes", hostname, datalen);
 
 	setlinebuf(stdout);
 
@@ -189,38 +189,41 @@
 	signal(SIGCLD, finish);
 
 	/* Fork a child process to continue sending packets */
-	tst_resm (TINFO, "Create a child process to continue to send packets");
+	tst_resm(TINFO, "Create a child process to continue to send packets");
 	switch (fork()) {
 	case -1:
-		tst_resm (TINFO, "ERROR when forking a new process");
+		tst_resm(TINFO, "ERROR when forking a new process");
 		tst_exit();
 	case 0:
 		/* Child's work */
 		ntransmitted = echopkt(datalen, npackets);
-		tst_resm (TINFO, "%d packets transmitted", ntransmitted);
+		tst_resm(TINFO, "%d packets transmitted", ntransmitted);
 		sleep(10);
 		break;
 	default:
 
-		tst_resm (TINFO, "Parent started - to  receive packets");
+		tst_resm(TINFO, "Parent started - to  receive packets");
 		/* Parent's work - receive packets back from child */
 
 		size_t len;
 
 		while (1) {
 
-			len = sizeof (packet);
+			len = sizeof(packet);
 			size_t cc;
 			socklen_t fromlen;
 
 			/* Receive packet from socket */
-			tst_resm (TINFO, "Receiving packet");
-			if ((cc = recvfrom(s, packet, len, 0, (sa_t*) &from, &fromlen)) < 0) {
-				tst_resm (TINFO, "ERROR - recvfrom");
+			tst_resm(TINFO, "Receiving packet");
+			if ((cc =
+			     recvfrom(s, packet, len, 0, (sa_t *) & from,
+				      &fromlen)) < 0) {
+				tst_resm(TINFO, "ERROR - recvfrom");
 			}
 			/* Verify contents of packet */
-			if ((rc = ck_packet (packet, cc, &from)) != 0) {
-				tst_resm (TINFO, "ERROR - network garbled packet");
+			if ((rc = ck_packet(packet, cc, &from)) != 0) {
+				tst_resm(TINFO,
+					 "ERROR - network garbled packet");
 			} else {
 				nreceived++;
 			}
@@ -233,8 +236,7 @@
 
 }
 
-int
-echopkt (int datalen, int npackets)
+int echopkt(int datalen, int npackets)
 {
 	int count = 0;
 	static uint8_t outpack[MAXPACKET];
@@ -244,20 +246,20 @@
 
 	register u_char *datap = &outpack[8];
 
-        /* Setup the packet structure */
-        tst_resm (TINFO, "Setting up ICMP packet structure to send to host");
+	/* Setup the packet structure */
+	tst_resm(TINFO, "Setting up ICMP packet structure to send to host");
 
 #if INET6
 	icp->icmp6_type = IERQ;
 	icp->icmp6_code = 0;
-	icp->icmp6_id = ident;		/* ID */
+	icp->icmp6_id = ident;	/* ID */
 #else
 	icp->icmp_type = IERQ;
 	icp->icmp_code = 0;
-	icp->icmp_id = ident;		/* ID */
+	icp->icmp_id = ident;	/* ID */
 #endif
 
-	cc = datalen + 8;		/* skips ICMP portion */
+	cc = datalen + 8;	/* skips ICMP portion */
 
 	for (i = 8; i < datalen; i++) {	/* skip 8 for time */
 		*datap++ = i;
@@ -265,9 +267,9 @@
 
 	/* Compute ICMP checksum here */
 #if INET6
-	icp->icmp6_cksum = in_cksum((uint16_t*) icp, cc);
+	icp->icmp6_cksum = in_cksum((uint16_t *) icp, cc);
 #else
-	icp->icmp_cksum = in_cksum((uint16_t*) icp, cc);
+	icp->icmp_cksum = in_cksum((uint16_t *) icp, cc);
 #endif
 
 	/* cc = sendto(s, msg, len, flags, to, tolen) */
@@ -276,19 +278,20 @@
 	while (count < npackets) {
 		count++;
 		/* Send packet through socket created */
-		tst_resm (TINFO, "Sending packet through created socket");
-		i = sendto( s, outpack, cc, 0, (const sa_t*) &whereto, sizeof(whereto) );
+		tst_resm(TINFO, "Sending packet through created socket");
+		i = sendto(s, outpack, cc, 0, (const sa_t *)&whereto,
+			   sizeof(whereto));
 
-		if (i < 0 || i != cc)  {
+		if (i < 0 || i != cc) {
 			if (i < 0)
 				perror("sendto");
 			tst_resm(TINFO, "wrote %s %d chars, ret=%d",
-					hostname, cc, i);
+				 hostname, cc, i);
 			fflush(stdout);
 		}
 	}
 	/* sleep(30); */
-	return(count);
+	return (count);
 
 }
 
@@ -298,8 +301,7 @@
  * Checksum routine for Internet Protocol family headers (C Version)
  *
  */
-uint16_t
-in_cksum (uint16_t *addr, int len)
+uint16_t in_cksum(uint16_t * addr, int len)
 {
 	register int nleft = len;
 	register uint16_t *w = addr, tmp;
@@ -311,20 +313,20 @@
 	 * sequential 16 bit words to it, and at the end, fold back all the
 	 * carry bits from the top 16 bits into the lower 16 bits.
 	 */
-	while (nleft > 1)  {
+	while (nleft > 1) {
 		sum += *w++;
 		nleft -= 2;
 	}
 
 	/* mop up an odd byte, if necessary */
 	if (nleft == 1) {
-		tmp = *(u_char *)w;
+		tmp = *(u_char *) w;
 		sum += (tmp << 8);
 	}
 	/* add back carry outs from top 16 bits to low 16 bits */
 	sum = (sum >> 16) + (sum & 0xffff);	/* add hi 16 to low 16 */
-	sum += (sum >> 16);			/* add carry */
-	answer = ~sum;				/* truncate to 16 bits */
+	sum += (sum >> 16);	/* add carry */
+	answer = ~sum;		/* truncate to 16 bits */
 
 	return answer;
 
@@ -335,10 +337,9 @@
  *
  * Outputs packet information to confirm transmission and reception.
  */
-void
-finish (int n)
+void finish(int n)
 {
-	tst_resm (TINFO, "%d packets received", nreceived);
+	tst_resm(TINFO, "%d packets received", nreceived);
 	exit(0);
 }
 
@@ -353,14 +354,13 @@
  * cc	- total size of received packet
  * from - address of sender
  */
-int
-ck_packet (uint8_t *buf, size_t cc, sai_t *from)
+int ck_packet(uint8_t * buf, size_t cc, sai_t * from)
 {
-	u_char 	i;
-	int 	iphdrlen;
-	struct 	ip *ip = (struct ip *) buf;	/* pointer to IP header */
-	register icmp_t *icp;			/* ptr to ICMP */
-  	u_char *datap ;
+	u_char i;
+	int iphdrlen;
+	struct ip *ip = (struct ip *)buf;	/* pointer to IP header */
+	register icmp_t *icp;	/* ptr to ICMP */
+	u_char *datap;
 
 #if INET6
 	from->sin6_addr.s6_addr = ntohl(from->sin6_addr.s6_addr);
@@ -368,29 +368,29 @@
 	from->sin_addr.s_addr = ntohl(from->sin_addr.s_addr);
 #endif
 
-	iphdrlen = ip->ip_hl << 2;		/* Convert # 16-bit words to
-						 * number of bytes */
+	iphdrlen = ip->ip_hl << 2;	/* Convert # 16-bit words to
+					 * number of bytes */
 	cc -= iphdrlen;
-	icp = (icmp_t*) (buf + iphdrlen);
-	datap = (u_char *)icp + sizeof(struct timeval) + 8;
+	icp = (icmp_t *) (buf + iphdrlen);
+	datap = (u_char *) icp + sizeof(struct timeval) + 8;
 	if (icp->icmp_type != IERP) {
-		return 0;			/* Not your packet because it's
-						 * not an echo */
+		return 0;	/* Not your packet because it's
+				 * not an echo */
 	}
 	if (icp->icmp_id != ident) {
-		return 0;			/* Sent to us by someone
-						 * else */
+		return 0;	/* Sent to us by someone
+				 * else */
 	}
 
 	/* Verify data in packet */
-	tst_resm (TINFO, "Verify data in packet after returned from sender");
+	tst_resm(TINFO, "Verify data in packet after returned from sender");
 	if (datalen > 118) {
 		datalen = 118;
 	}
-	tst_resm (TINFO, "Checking Data.");
-	for (i = 8; i < datalen; i++) {		/* skip 8 for time */
-		if (i !=  (*datap)) {
-			tst_resm (TINFO, "Data cannot be validated.");
+	tst_resm(TINFO, "Checking Data.");
+	for (i = 8; i < datalen; i++) {	/* skip 8 for time */
+		if (i != (*datap)) {
+			tst_resm(TINFO, "Data cannot be validated.");
 		}
 		datap++;
 	}
diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong6.c b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
index b85971c..9747f58 100644
--- a/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+++ b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
@@ -56,23 +56,23 @@
 #define MAXHOSTNAMELEN	64
 #endif
 
-int	pfd[2];
-int	fdstr[10];
-int	verbose;
-int	count;
-u_char	packet[MAXPACKET];
-int	options;
-int s;			/* Socket file descriptor */
-struct addrinfo *hp;	/* Pointer to host info */
+int pfd[2];
+int fdstr[10];
+int verbose;
+int count;
+u_char packet[MAXPACKET];
+int options;
+int s;				/* Socket file descriptor */
+struct addrinfo *hp;		/* Pointer to host info */
 struct addrinfo hints;
 
-struct sockaddr_in6 whereto;/* Who to pingpong */
-int datalen;		/* How much data */
+struct sockaddr_in6 whereto;	/* Who to pingpong */
+int datalen;			/* How much data */
 
 char *hostname;
 char hnamebuf[MAXHOSTNAMELEN];
 
-int npackets=1;
+int npackets = 1;
 int ntransmitted = 0;		/* sequence # for outbound packets = #sent */
 int ident;
 
@@ -83,8 +83,7 @@
 /*
  * 			M A I N
  */
-int
-main(argc, argv)
+int main(argc, argv)
 char *argv[];
 {
 	struct sockaddr_in6 from;
@@ -95,146 +94,152 @@
 	struct protoent *proto;
 	int gai;
 
-	printf ("Starting pingpong - to send / receive packets from host \n");
+	printf("Starting pingpong - to send / receive packets from host \n");
 
-        /* Get Host net address */
-        printf ("Get host net address for sending packets \n");
+	/* Get Host net address */
+	printf("Get host net address for sending packets \n");
 	memset(&hints, 0, sizeof(hints));
-        hints.ai_family = PF_INET6;
+	hints.ai_family = PF_INET6;
 
-        if ((gai=getaddrinfo(av[1], NULL, &hints, &hp))!=0) {
-                fprintf(stderr, "Unknown subject address %s: %s\n",av[1], gai_strerror(gai));
-                exit(1);
-        }
-        if (!hp->ai_addr || hp->ai_addr->sa_family != AF_INET6) {
-                fprintf(stderr, "getaddrinfo failed");
-                exit(1);
-        }
+	if ((gai = getaddrinfo(av[1], NULL, &hints, &hp)) != 0) {
+		fprintf(stderr, "Unknown subject address %s: %s\n", av[1],
+			gai_strerror(gai));
+		exit(1);
+	}
+	if (!hp->ai_addr || hp->ai_addr->sa_family != AF_INET6) {
+		fprintf(stderr, "getaddrinfo failed");
+		exit(1);
+	}
 	strcpy(hnamebuf, av[1]);
-        hostname = hnamebuf;
-	memset( (char *)&whereto, 0x00, sizeof(struct sockaddr) );
+	hostname = hnamebuf;
+	memset((char *)&whereto, 0x00, sizeof(struct sockaddr));
 	memcpy(&whereto, hp->ai_addr, hp->ai_addrlen);
 
 	/*  Determine Packet Size - either use what was passed in or default */
-        printf ("Determine packet size \n");
+	printf("Determine packet size \n");
 	if (argc >= 3)
-		datalen = atoi( av[2] ) - 8;
+		datalen = atoi(av[2]) - 8;
 	else
-		datalen = 64-8;
+		datalen = 64 - 8;
 	if (datalen > MAXPACKET) {
 		printf("Pingpong: packet size too large\n");
 		exit(1);
 	}
 
-        /* Set number of packets to be sent */
-        printf ("Determine number of packets to send \n");
+	/* Set number of packets to be sent */
+	printf("Determine number of packets to send \n");
 	if (argc >= 4)
 		npackets = atoi(av[3]);
 
-        /* Get PID of current process */
+	/* Get PID of current process */
 	ident = getpid() & 0xFFFF;
 
-        /* Get network protocol to use (check /etc/protocol) */
+	/* Get network protocol to use (check /etc/protocol) */
 	if ((proto = getprotobyname("ipv6-icmp")) == NULL) {
 		printf("ICMP6: unknown protocol\n");
 		exit(1);
 	}
 
-        /* Create a socket endpoint for communications - returns a descriptor */
+	/* Create a socket endpoint for communications - returns a descriptor */
 	if ((s = socket(AF_INET6, SOCK_RAW, proto->p_proto)) < 0) {
 		printf("Pingpong: socket - could not create link \n");
 		exit(1);
 	}
 
-	printf("echoing %s: %d data bytes\n", hostname, datalen );
-	printf("Total packet size is %d bytes\n",datalen+8);
+	printf("echoing %s: %d data bytes\n", hostname, datalen);
+	printf("Total packet size is %d bytes\n", datalen + 8);
 
-	setlinebuf( stdout );
+	setlinebuf(stdout);
 
-        /* Setup traps */
-	signal( SIGINT, finish );
-	signal( SIGCLD, finish );
+	/* Setup traps */
+	signal(SIGINT, finish);
+	signal(SIGCLD, finish);
 
-        /* Fork a child process to continue sending packets */
-        printf ("Create a child process to continue to send packets \n");
+	/* Fork a child process to continue sending packets */
+	printf("Create a child process to continue to send packets \n");
 	switch (fork()) {
 	case -1:
 		printf("ERROR when forking a new process\n");
 		exit(1);
 	case 0:
-                /* Child's work */
-		ntransmitted=echopkt(datalen,npackets);
-		printf("%d packets transmitted, ",ntransmitted);
+		/* Child's work */
+		ntransmitted = echopkt(datalen, npackets);
+		printf("%d packets transmitted, ", ntransmitted);
 		sleep(10);
 		break;
 	default:
-                printf ("Parent started - to  receive packets \n");
-                /* Parent's work - receive packets back from child */
+		printf("Parent started - to  receive packets \n");
+		/* Parent's work - receive packets back from child */
 		for (;;) {
-			int len = sizeof (packet);
-			unsigned int fromlen = sizeof (from);
+			int len = sizeof(packet);
+			unsigned int fromlen = sizeof(from);
 #ifdef __64BIT__
-                        long cc;
+			long cc;
 #else
 			int cc;
 #endif
 
 			/* Receive packet from socket */
-			fromlen = sizeof (from);
-			if ((cc=recvfrom(s, packet, len, 0, (struct sockaddr *)&from, &fromlen)) < 0) {
+			fromlen = sizeof(from);
+			if ((cc =
+			     recvfrom(s, packet, len, 0,
+				      (struct sockaddr *)&from,
+				      &fromlen)) < 0) {
 				printf("ERROR in recvfrom\n");
 			}
-                        /* Verify contents of packet */
-                        if ((rc = ck_packet (packet, cc, &from)) == 0)
+			/* Verify contents of packet */
+			if ((rc = ck_packet(packet, cc, &from)) == 0)
 				nreceived++;
 		}
 	}
 	return 0;
 }
 
-echopkt(datalen,npackets)
+echopkt(datalen, npackets)
 int datalen;
 int npackets;
 {
-	int count=0;
+	int count = 0;
 	static u_char outpack[MAXPACKET];
-	register struct icmp6_hdr *icp = (struct icmp6_hdr *) outpack;
-        int i;
+	register struct icmp6_hdr *icp = (struct icmp6_hdr *)outpack;
+	int i;
 #ifdef __64BIT__
-                        long cc;
+	long cc;
 #else
-                        int cc;
+	int cc;
 #endif
 
 	register u_char *datap = &outpack[8];
 
-        /* Setup the packet structure */
-        printf ("Setup ICMP packet structure to send to host \n");
+	/* Setup the packet structure */
+	printf("Setup ICMP packet structure to send to host \n");
 	icp->icmp6_type = ICMP6_ECHO_REQUEST;
 	icp->icmp6_code = 0;
 	icp->icmp6_cksum = 0;
-	icp->icmp6_id = ident;		/* ID */
+	icp->icmp6_id = ident;	/* ID */
 
-	cc = datalen+8;			/* skips ICMP portion */
+	cc = datalen + 8;	/* skips ICMP portion */
 
-	for (i=0; i<datalen; i++) {
+	for (i = 0; i < datalen; i++) {
 		*datap++ = 6;
 	}
-	ntransmitted=0;
+	ntransmitted = 0;
 	while (count < npackets) {
 		count++;
-                /* Send packet through socket created */
-                printf ("Sending packet through created socket \n");
-		i = sendto( s, outpack, cc, 0, &whereto, sizeof(whereto) );
+		/* Send packet through socket created */
+		printf("Sending packet through created socket \n");
+		i = sendto(s, outpack, cc, 0, &whereto, sizeof(whereto));
 
-		if (i < 0 || i != cc)  {
-			if (i < 0)  perror("sendto");
-			printf("pingpong6: wrote %s %d chars, ret=%d\n",hostname,cc,i);
+		if (i < 0 || i != cc) {
+			if (i < 0)
+				perror("sendto");
+			printf("pingpong6: wrote %s %d chars, ret=%d\n",
+			       hostname, cc, i);
 			fflush(stdout);
-			}
 		}
-		/* sleep(30); */
-		return(count);
+	}
+	/* sleep(30); */
+	return (count);
 }
 
 /*
@@ -244,7 +249,7 @@
  */
 void finish(int n)
 {
-	printf("%d packets received, \n", nreceived );
+	printf("%d packets received, \n", nreceived);
 	exit(0);
 }
 
@@ -254,33 +259,33 @@
  * Checks contents of packet to verify information did not get destroyed
  */
 
-ck_packet (buf, cc, from)
-u_char 	*buf;			/* pointer to start of IP header */
-int	cc;			/* total size of received packet */
-struct sockaddr_in6 *from; 	/* address of sender */
+ck_packet(buf, cc, from)
+u_char *buf;			/* pointer to start of IP header */
+int cc;				/* total size of received packet */
+struct sockaddr_in6 *from;	/* address of sender */
 {
-	int 	i;
-	struct  icmp6_hdr icp_hdr;
-	struct	icmp6_hdr *icp = (struct ip6_hdr *) buf;          /* pointer to IP header */
-  	u_char *datap ;
+	int i;
+	struct icmp6_hdr icp_hdr;
+	struct icmp6_hdr *icp = (struct ip6_hdr *)buf;	/* pointer to IP header */
+	u_char *datap;
 
-	datap = (u_char *)icp + sizeof(icp_hdr);
+	datap = (u_char *) icp + sizeof(icp_hdr);
 	if (icp->icmp6_type != ICMP6_ECHO_REPLY) {
-		return(1);	 /* Not your packet 'cause not an echo */
+		return (1);	/* Not your packet 'cause not an echo */
 	}
 	if (icp->icmp6_id != ident) {
-		return(1);			/* Sent to us by someone else */
+		return (1);	/* Sent to us by someone else */
 	}
 	printf("Receiving packet \n");
-        /* Verify data in packet */
+	/* Verify data in packet */
 
-	printf ("Checking Data.\n");
-        for (i=0; i<datalen; i++) {
-          if ((*datap) != 6) {
-                 printf ("RVW: Data in [%d] is %d\n",i,(*datap));
-		 printf ("Data cannot be validated. \n");
-          }
-          datap++;
+	printf("Checking Data.\n");
+	for (i = 0; i < datalen; i++) {
+		if ((*datap) != 6) {
+			printf("RVW: Data in [%d] is %d\n", i, (*datap));
+			printf("Data cannot be validated. \n");
+		}
+		datap++;
 	}
-	return(0);
+	return (0);
 }
diff --git a/testcases/network/tcp_cmds/sendfile/testsf_c.c b/testcases/network/tcp_cmds/sendfile/testsf_c.c
index 6bd3ab1..d4327c3 100644
--- a/testcases/network/tcp_cmds/sendfile/testsf_c.c
+++ b/testcases/network/tcp_cmds/sendfile/testsf_c.c
@@ -26,8 +26,7 @@
 char *TCID = "sendfile_client";
 #endif
 
-int
-main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	sai_t sai;
 	int s, fd;
@@ -35,18 +34,19 @@
 	char *serv_fname, *clnt_fname;
 	char rbuf[PATH_MAX];
 	int nlen, gai;
-	struct  addrinfo *hp;
-	struct  addrinfo hints;
+	struct addrinfo *hp;
+	struct addrinfo hints;
 	int port;
 
 	if (argc != 6) {
-		tst_resm(TBROK, "usage: server-ip port client-file server-file file-len");
+		tst_resm(TBROK,
+			 "usage: server-ip port client-file server-file file-len");
 		tst_exit();
 	}
 
 	int i;
-	for (i = 0;  i < argc; i++)
-		printf("i=%d: %s\n", i, *(argv+i));
+	for (i = 0; i < argc; i++)
+		printf("i=%d: %s\n", i, *(argv + i));
 
 	/* open socket to server */
 	if ((s = socket(AFI, SOCK_STREAM, 0)) < 0) {
@@ -54,8 +54,8 @@
 		tst_exit();
 	}
 
-	clnt_fname = argv[3]; /* filename to create */
-	serv_fname = argv[4]; /* filename to request */
+	clnt_fname = argv[3];	/* filename to create */
+	serv_fname = argv[4];	/* filename to request */
 
 	/* prepare to copy file from server to local machine */
 	if ((fd = open(clnt_fname, O_CREAT | O_TRUNC | O_WRONLY, 0777)) < 0) {
@@ -73,7 +73,7 @@
 	hints.ai_family = PFI;
 	if ((gai = getaddrinfo(argv[1], NULL, &hints, &hp)) != 0) {
 		tst_resm(TBROK, "Unknown subject address %s: %s\n",
-				argv[1], gai_strerror(gai));
+			 argv[1], gai_strerror(gai));
 	}
 	if (!hp || !hp->ai_addr || hp->ai_addr->sa_family != AFI) {
 		tst_resm(TBROK, "getaddrinfo failed");
@@ -91,7 +91,7 @@
 	sai.sin_port = htons(port);
 #endif
 
-	if (connect(s, (sa_t*) &sai, sizeof(sai) ) < 0) {
+	if (connect(s, (sa_t *) & sai, sizeof(sai)) < 0) {
 		tst_resm(TBROK, "connect error = %d\n", errno);
 		close(s);
 		exit(1);
@@ -105,16 +105,16 @@
 	}
 
 	tst_resm(TINFO, "client write %d bytes to server with contents %s\n",
-			nbyte, rbuf);
+		 nbyte, rbuf);
 
-	nlen = 0; /* init size of info received */
+	nlen = 0;		/* init size of info received */
 	rbuf[0] = '\0';
 	/* read until an EOF is encountered. */
 	while ((nbyte = read(s, rbuf, PATH_MAX)) > 0) {
 		nlen += nbyte;
 		if (write(fd, rbuf, nbyte) != nbyte) {
 			tst_resm(TBROK, "Error writing to file %s on client\n",
-					clnt_fname);
+				 clnt_fname);
 			tst_exit();
 		}
 	}
diff --git a/testcases/network/tcp_cmds/sendfile/testsf_s.c b/testcases/network/tcp_cmds/sendfile/testsf_s.c
index 7668c69..cf58c77 100644
--- a/testcases/network/tcp_cmds/sendfile/testsf_s.c
+++ b/testcases/network/tcp_cmds/sendfile/testsf_s.c
@@ -27,8 +27,7 @@
 char *TCID = "sendfile_server";
 #endif
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	sai_t sa, *ap;
 	sa_t from;
@@ -37,9 +36,9 @@
 	int as, fd, gai, rc, s;
 	char *lp;
 	char *number;
-	int pid, nbytes, flen,count;
+	int pid, nbytes, flen, count;
 	char rbuf[PATH_MAX];
-	int chunks=0;
+	int chunks = 0;
 	off_t *offset;
 	char nbuf[PATH_MAX];
 	int port;
@@ -55,7 +54,7 @@
 		tst_exit();
 	}
 
-	signal(SIGCHLD, SIG_IGN); /* ignore signals from children */
+	signal(SIGCHLD, SIG_IGN);	/* ignore signals from children */
 
 	memset(&hints, 0, sizeof(hints));
 	hints.ai_family = PFI;
@@ -78,7 +77,7 @@
 #endif
 
 	/* bind IP and port to socket */
-	if (bind(s, (sa_t*) &sa, sizeof(sa) ) < 0) {
+	if (bind(s, (sa_t *) & sa, sizeof(sa)) < 0) {
 		tst_resm(TBROK, "bind error = %d\n", errno);
 		close(s);
 		tst_exit();
@@ -105,7 +104,7 @@
 			tst_exit();
 		}
 
-		ap = (sai_t*) &from;
+		ap = (sai_t *) & from;
 
 		/* create a process to manage the connection */
 		if ((pid = fork()) < 0) {
@@ -120,7 +119,7 @@
 
 		/* child process to manage a connection */
 
-		close(s); /* close service socket */
+		close(s);	/* close service socket */
 
 		/* get client request information */
 		if ((nbytes = read(as, rbuf, PATH_MAX)) <= 0) {
@@ -128,13 +127,13 @@
 			close(as);
 			tst_exit();
 		}
-		rbuf[nbytes] = '\0'; /* null terminate the info */
+		rbuf[nbytes] = '\0';	/* null terminate the info */
 		lp = &rbuf[0];
 
 		/* start with file length, '=' will start the filename */
 		count = flen = 0;
 		number = &nbuf[0];
-		while (*lp != '=') { /* convert ascii to integer */
+		while (*lp != '=') {	/* convert ascii to integer */
 			nbuf[count] = *lp;
 			count++;
 			lp++;
@@ -154,10 +153,12 @@
 		}
 		offset = NULL;
 		errno = 0;
-		do { /* send file parts until EOF */
+		do {		/* send file parts until EOF */
 			if ((rc = sendfile(as, fd, offset, flen)) != flen) {
 				if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) {
-					tst_resm(TBROK, "sendfile error = %d, rc = %d\n", errno, rc);
+					tst_resm(TBROK,
+						 "sendfile error = %d, rc = %d\n",
+						 errno, rc);
 					close(as);
 					close(fd);
 					tst_exit();
@@ -167,14 +168,14 @@
 		} while (rc != 0);
 		tst_resm(TINFO, "File %s sent in %d parts\n", lp, chunks);
 
-		close(as); /* close connection */
-		close(fd); /* close requested file */
+		close(as);	/* close connection */
+		close(fd);	/* close requested file */
 
 		exit(0);
 
 	}
 
-	close(s); /* close parent socket (never reached because of the while (1)) */
+	close(s);		/* close parent socket (never reached because of the while (1)) */
 
 	tst_exit();
 
diff --git a/testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c b/testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c
index c6cfe1a..47fe7ed 100644
--- a/testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c
@@ -23,14 +23,14 @@
 {
 	timer_t tid;
 	int i;
-	long scTIMER_MAX=0;
+	long scTIMER_MAX = 0;
 
-	scTIMER_MAX=sysconf(_SC_TIMER_MAX);
+	scTIMER_MAX = sysconf(_SC_TIMER_MAX);
 
 	for (i = 0; i < scTIMER_MAX; i++) {
 		if (timer_create(CLOCK_REALTIME, NULL, &tid) == -1) {
 			printf("[%d] timer_create() did not return success: "
-			    "%s\n", i, strerror(errno));
+			       "%s\n", i, strerror(errno));
 			exit(PTS_FAIL);
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/behavior/timers/2-1.c b/testcases/open_posix_testsuite/conformance/behavior/timers/2-1.c
index 529e7ca..31cb50d 100644
--- a/testcases/open_posix_testsuite/conformance/behavior/timers/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/behavior/timers/2-1.c
@@ -16,17 +16,18 @@
 
 int main(int argc, char *argv[])
 {
-        long scTIMER_MAX=0;
+	long scTIMER_MAX = 0;
 
-        scTIMER_MAX=sysconf(_SC_TIMER_MAX);
+	scTIMER_MAX = sysconf(_SC_TIMER_MAX);
 
 #ifdef DEBUG
 	printf("TIMER_MAX = %ld\n_POSIX_TIMER_MAX=%ld\n",
-			scTIMER_MAX, (long) _POSIX_TIMER_MAX);
+	       scTIMER_MAX, (long)_POSIX_TIMER_MAX);
 #endif
 
 	if ((scTIMER_MAX != -1) && (scTIMER_MAX < _POSIX_TIMER_MAX)) {
-		printf("Test FAILED (%ld < %ld)\n", scTIMER_MAX, (long)_POSIX_TIMER_MAX);
+		printf("Test FAILED (%ld < %ld)\n", scTIMER_MAX,
+		       (long)_POSIX_TIMER_MAX);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/aio_h/2-1.c b/testcases/open_posix_testsuite/conformance/definitions/aio_h/2-1.c
index 2b58f9b..766eb6b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/aio_h/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/aio_h/2-1.c
@@ -9,7 +9,7 @@
  /* test if aio.h exists and can be included */
 
 #include <aio.h>
-#include <stdlib.h> /* For NULL on non-linux platforms. */
+#include <stdlib.h>		/* For NULL on non-linux platforms. */
 
 int main(void)
 {
diff --git a/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c b/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
index 2c89916..b02ac92 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
@@ -8,16 +8,16 @@
 
 #include <aio.h>
 
-int (*dummy0)(int, struct aiocb *) = aio_cancel;
-int (*dummy1)(const struct aiocb *) = aio_error;
-int (*dummy2)(int, struct aiocb *) = aio_fsync;
-int (*dummy3)(struct aiocb *) = aio_read;
-ssize_t (*dummy4)(struct aiocb *) = aio_return;
-int (*dummy5)(const struct aiocb *const[], int,
-	      const struct timespec *) = aio_suspend;
-int (*dummy6)(struct aiocb *) = aio_write;
-int (*dummy7)(int, struct aiocb *const [],
-	      int, struct sigevent *restrict) = lio_listio;
+int (*dummy0) (int, struct aiocb *) = aio_cancel;
+int (*dummy1) (const struct aiocb *) = aio_error;
+int (*dummy2) (int, struct aiocb *) = aio_fsync;
+int (*dummy3) (struct aiocb *) = aio_read;
+ssize_t(*dummy4) (struct aiocb *) = aio_return;
+int (*dummy5) (const struct aiocb * const[], int,
+	       const struct timespec *) = aio_suspend;
+int (*dummy6) (struct aiocb *) = aio_write;
+int (*dummy7) (int, struct aiocb * const[],
+	       int, struct sigevent * restrict) = lio_listio;
 
 int main()
 {
diff --git a/testcases/open_posix_testsuite/conformance/definitions/errno_h/2-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/errno_h/2-1-buildonly.c
index 3ece979..0072739 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/errno_h/2-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/errno_h/2-1-buildonly.c
@@ -8,7 +8,7 @@
 
 int errno_test;
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	errno_test = errno;
 	return 0;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-1-buildonly.c
index 7d9cb9c..a93d154 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-1-buildonly.c
@@ -9,7 +9,7 @@
 
 int dummy1 = E2BIG;
 int dummy2 = EACCES;
-int dummy3 = EADDRINUSE ;
+int dummy3 = EADDRINUSE;
 int dummy4 = EADDRNOTAVAIL;
 int dummy5 = EAFNOSUPPORT;
 int dummy6 = EAGAIN;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-2.c b/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-2.c
index 396aa9b..852ca5f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/errno_h/3-2.c
@@ -19,78 +19,112 @@
 #define PTP_NORESULT    7
 
 struct unique {
-    int value;
-    char *name;
-    int duplicate;
-} sym[] = {{E2BIG,"E2BIG",E2BIG},{EACCES,"EACCES",EACCES},
-	   {EADDRINUSE,"EADDRINUSE",EADDRINUSE},
-	   {EADDRNOTAVAIL,"EADDRNOTAVAIL",EADDRNOTAVAIL},
-	   {EAFNOSUPPORT,"EAFNOSUPPORT",EAFNOSUPPORT},
-	   {EAGAIN,"EAGAIN",EWOULDBLOCK},
-	   {EALREADY,"EALREADY",EALREADY}, {EBADF,"EBADF",EBADF},
-	   {EBADMSG,"EBADMSG",EBADMSG},{EBUSY,"EBUSY",EBUSY},
-	   {ECANCELED,"ECANCELED",ECANCELED},{ECHILD,"ECHILD",ECHILD},
-	   {ECONNABORTED,"ECONNABORTED",ECONNABORTED},
-	   {ECONNREFUSED,"ECONNREFUSED",ECONNREFUSED},
-	   {ECONNRESET,"ECONNRESET",ECONNRESET},{EDEADLK,"EDEADLK",EDEADLK,},
-	   {EDESTADDRREQ,"EDESTADDRREQ",EDESTADDRREQ},{EDOM,"EDOM",EDOM},
-	   {EDQUOT,"EDQUOT",EDQUOT},{EEXIST,"EEXIST",EEXIST},
-	   {EFAULT,"EFAULT",EFAULT},{EFBIG,"EFBIG",EFBIG},
-	   {EHOSTUNREACH,"EHOSTUNREACH",EHOSTUNREACH},
-	   {EIDRM,"EIDRM",EIDRM},{EILSEQ,"EILSEQ",EILSEQ},
-	   {EINPROGRESS,"EINPROGRESS",EINPROGRESS},
-	   {EINTR,"EINTR",EINTR},{EINVAL,"EINVAL",EINVAL},
-	   {EIO,"EIO",EIO},{EISCONN,"EISCONN",EISCONN},
-	   {EISDIR,"EISDIR",EISDIR},{ELOOP,"ELOOP",ELOOP},
-	   {EMFILE,"EMFILE",EMFILE},{EMLINK,"EMLINK",EMLINK},
-	   {EMSGSIZE,"EMSGSIZE",EMSGSIZE},{EMULTIHOP,"EMULTIHOP",EMULTIHOP},
-	   {ENAMETOOLONG,"ENAMETOOLONG",ENAMETOOLONG},
-	   {ENETDOWN,"ENETDOWN",ENETDOWN},
-	   {ENETRESET,"ENETRESET",ENETRESET},{ENETUNREACH,"ENETUNREACH",ENETUNREACH},
-	   {ENFILE,"ENFILE",ENFILE},{ENOBUFS,"ENOBUFS",ENOBUFS},
+	int value;
+	char *name;
+	int duplicate;
+} sym[] = { {
+E2BIG, "E2BIG", E2BIG}, {
+EACCES, "EACCES", EACCES}, {
+EADDRINUSE, "EADDRINUSE", EADDRINUSE}, {
+EADDRNOTAVAIL, "EADDRNOTAVAIL", EADDRNOTAVAIL}, {
+EAFNOSUPPORT, "EAFNOSUPPORT", EAFNOSUPPORT}, {
+EAGAIN, "EAGAIN", EWOULDBLOCK}, {
+EALREADY, "EALREADY", EALREADY}, {
+EBADF, "EBADF", EBADF}, {
+EBADMSG, "EBADMSG", EBADMSG}, {
+EBUSY, "EBUSY", EBUSY}, {
+ECANCELED, "ECANCELED", ECANCELED}, {
+ECHILD, "ECHILD", ECHILD}, {
+ECONNABORTED, "ECONNABORTED", ECONNABORTED}, {
+ECONNREFUSED, "ECONNREFUSED", ECONNREFUSED}, {
+ECONNRESET, "ECONNRESET", ECONNRESET}, {
+EDEADLK, "EDEADLK", EDEADLK,}, {
+EDESTADDRREQ, "EDESTADDRREQ", EDESTADDRREQ}, {
+EDOM, "EDOM", EDOM}, {
+EDQUOT, "EDQUOT", EDQUOT}, {
+EEXIST, "EEXIST", EEXIST}, {
+EFAULT, "EFAULT", EFAULT}, {
+EFBIG, "EFBIG", EFBIG}, {
+EHOSTUNREACH, "EHOSTUNREACH", EHOSTUNREACH}, {
+EIDRM, "EIDRM", EIDRM}, {
+EILSEQ, "EILSEQ", EILSEQ}, {
+EINPROGRESS, "EINPROGRESS", EINPROGRESS}, {
+EINTR, "EINTR", EINTR}, {
+EINVAL, "EINVAL", EINVAL}, {
+EIO, "EIO", EIO}, {
+EISCONN, "EISCONN", EISCONN}, {
+EISDIR, "EISDIR", EISDIR}, {
+ELOOP, "ELOOP", ELOOP}, {
+EMFILE, "EMFILE", EMFILE}, {
+EMLINK, "EMLINK", EMLINK}, {
+EMSGSIZE, "EMSGSIZE", EMSGSIZE}, {
+EMULTIHOP, "EMULTIHOP", EMULTIHOP}, {
+ENAMETOOLONG, "ENAMETOOLONG", ENAMETOOLONG}, {
+ENETDOWN, "ENETDOWN", ENETDOWN}, {
+ENETRESET, "ENETRESET", ENETRESET}, {
+ENETUNREACH, "ENETUNREACH", ENETUNREACH}, {
+ENFILE, "ENFILE", ENFILE}, {
+ENOBUFS, "ENOBUFS", ENOBUFS},
 #ifdef ENODATA
-	   {ENODATA,"ENODATA",ENODATA},
+{
+ENODATA, "ENODATA", ENODATA},
 #endif
-	   {ENODEV,"ENODEV",ENODEV},
-	   {ENOENT,"ENOENT",ENOENT},{ENOEXEC,"ENOEXEC",ENOEXEC},
-	   {ENOLCK,"ENOLCK",ENOLCK},{ENOLINK,"ENOLINK",ENOLINK},
-	   {ENOMEM,"ENOMEM",ENOMEM},{ENOMSG,"ENOMSG",ENOMSG},
-	   {ENOPROTOOPT,"ENOPROTOOPT",ENOPROTOOPT},{ENOSPC,"ENOSPC",ENOSPC},
+{
+ENODEV, "ENODEV", ENODEV}, {
+ENOENT, "ENOENT", ENOENT}, {
+ENOEXEC, "ENOEXEC", ENOEXEC}, {
+ENOLCK, "ENOLCK", ENOLCK}, {
+ENOLINK, "ENOLINK", ENOLINK}, {
+ENOMEM, "ENOMEM", ENOMEM}, {
+ENOMSG, "ENOMSG", ENOMSG}, {
+ENOPROTOOPT, "ENOPROTOOPT", ENOPROTOOPT}, {
+ENOSPC, "ENOSPC", ENOSPC},
 #ifdef ENOSR
-	   {ENOSR,"ENOSR",ENOSR},
+{
+ENOSR, "ENOSR", ENOSR},
 #endif
 #ifdef ENOSTR
-	   {ENOSTR,"ENOSTR",ENOSTR},
+{
+ENOSTR, "ENOSTR", ENOSTR},
 #endif
-	   {ENOSYS,"ENOSYS",ENOSYS},{ENOTCONN,"ENOTCONN",ENOTCONN},
-	   {ENOTDIR,"ENOTDIR",ENOTDIR},{ENOTEMPTY,"ENOTEMPTY",ENOTEMPTY},
-	   {ENOTSOCK,"ENOTSOCK",ENOTSOCK},{ENOTSUP,"ENOTSUP",ENOTSUP},
-	   {ENOTTY,"ENOTTY",ENOTTY},{ENXIO,"ENXIO",ENXIO},
-	   {EOPNOTSUPP,"EOPNOTSUPP",EOPNOTSUPP},{EOVERFLOW,"EOVERFLOW",EOVERFLOW},
-	   {EPERM,"EPERM",EPERM},{EPIPE,"EPIPE",EPIPE},{EPROTO,"EPROTO",EPROTO},
-	   {EPROTONOSUPPORT,"EPROTONOSUPPORT",EPROTONOSUPPORT},
-	   {EPROTOTYPE,"EPROTOTYPE",EPROTOTYPE},
-	   {ERANGE,"ERANGE",ERANGE},{EROFS,"EROFS",EROFS},
-	   {EWOULDBLOCK,"EWOULDBLOCK",EAGAIN},{EXDEV,"EXDEV",EXDEV},
-	   {0,0,0}
+{
+ENOSYS, "ENOSYS", ENOSYS}, {
+ENOTCONN, "ENOTCONN", ENOTCONN}, {
+ENOTDIR, "ENOTDIR", ENOTDIR}, {
+ENOTEMPTY, "ENOTEMPTY", ENOTEMPTY}, {
+ENOTSOCK, "ENOTSOCK", ENOTSOCK}, {
+ENOTSUP, "ENOTSUP", ENOTSUP}, {
+ENOTTY, "ENOTTY", ENOTTY}, {
+ENXIO, "ENXIO", ENXIO}, {
+EOPNOTSUPP, "EOPNOTSUPP", EOPNOTSUPP}, {
+EOVERFLOW, "EOVERFLOW", EOVERFLOW}, {
+EPERM, "EPERM", EPERM}, {
+EPIPE, "EPIPE", EPIPE}, {
+EPROTO, "EPROTO", EPROTO}, {
+EPROTONOSUPPORT, "EPROTONOSUPPORT", EPROTONOSUPPORT}, {
+EPROTOTYPE, "EPROTOTYPE", EPROTOTYPE}, {
+ERANGE, "ERANGE", ERANGE}, {
+EROFS, "EROFS", EROFS}, {
+EWOULDBLOCK, "EWOULDBLOCK", EAGAIN}, {
+EXDEV, "EXDEV", EXDEV}, {
+0, 0, 0}
 };
 
-int main() {
-    struct unique *tst;
-    int i,ret = PTP_PASS;
-    tst = sym;
+int main()
+{
+	struct unique *tst;
+	int i, ret = PTP_PASS;
+	tst = sym;
 
-    while (tst->name) {
-	for (i = 0; sym[i].name; i++) {
-	    if (tst->value == sym[i].value
-		&& tst->duplicate != sym[i].value
-		&& strcmp(tst->name,sym[i].name)) {//In case EAGAIN is not equal to EWOULDBLOCK,compare the name
-		printf("%s has a duplicate value with %s\n",
-		       tst->name,sym[i].name);
-		ret = PTP_FAIL;
-	    }
+	while (tst->name) {
+		for (i = 0; sym[i].name; i++) {
+			if (tst->value == sym[i].value && tst->duplicate != sym[i].value && strcmp(tst->name, sym[i].name)) {	//In case EAGAIN is not equal to EWOULDBLOCK,compare the name
+				printf("%s has a duplicate value with %s\n",
+				       tst->name, sym[i].name);
+				ret = PTP_FAIL;
+			}
+		}
+		tst++;
 	}
-	tst++;
-    }
-    return ret;
+	return ret;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/errno_h/4-1.c b/testcases/open_posix_testsuite/conformance/definitions/errno_h/4-1.c
index 27619c2..9777716 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/errno_h/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/errno_h/4-1.c
@@ -15,69 +15,107 @@
 #define PTP_NORESULT    7
 
 struct unique {
-    int value;
-    char *name;
-} sym[] = {{E2BIG,"E2BIG"},{EACCES,"EACCES"},
-	   {EADDRINUSE,"EADDRINUSE"},
-	   {EADDRNOTAVAIL,"EADDRNOTAVAIL"},
-	   {EAFNOSUPPORT,"EAFNOSUPPORT"},
-	   {EAGAIN,"EAGAIN"},
-	   {EALREADY,"EALREADY"}, {EBADF,"EBADF"},
-	   {EBADMSG,"EBADMSG"},{EBUSY,"EBUSY"},
-	   {ECANCELED,"ECANCELED"},{ECHILD,"ECHILD"},
-	   {ECONNABORTED,"ECONNABORTED"},
-	   {ECONNREFUSED,"ECONNREFUSED"},
-	   {ECONNRESET,"ECONNRESET"},{EDEADLK,"EDEADLK"},
-	   {EDESTADDRREQ,"EDESTADDRREQ"},{EDOM,"EDOM"},
-	   {EDQUOT,"EDQUOT"},{EEXIST,"EEXIST"},
-	   {EFAULT,"EFAULT"},{EFBIG,"EFBIG"},
-	   {EHOSTUNREACH,"EHOSTUNREACH"},
-	   {EIDRM,"EIDRM"},{EILSEQ,"EILSEQ"},
-	   {EINPROGRESS,"EINPROGRESS"},
-	   {EINTR,"EINTR"},{EINVAL,"EINVAL"},
-	   {EIO,"EIO"},{EISCONN,"EISCONN"},
-	   {EISDIR,"EISDIR"},{ELOOP,"ELOOP"},
-	   {EMFILE,"EMFILE"},{EMLINK,"EMLINK"},
-	   {EMSGSIZE,"EMSGSIZE"},{EMULTIHOP,"EMULTIHOP"},
-	   {ENAMETOOLONG,"ENAMETOOLONG"},
-	   {ENETDOWN,"ENETDOWN"},
-	   {ENETRESET,"ENETRESET"},{ENETUNREACH,"ENETUNREACH"},
-	   {ENFILE,"ENFILE"},{ENOBUFS,"ENOBUFS"},
+	int value;
+	char *name;
+} sym[] = { {
+E2BIG, "E2BIG"}, {
+EACCES, "EACCES"}, {
+EADDRINUSE, "EADDRINUSE"}, {
+EADDRNOTAVAIL, "EADDRNOTAVAIL"}, {
+EAFNOSUPPORT, "EAFNOSUPPORT"}, {
+EAGAIN, "EAGAIN"}, {
+EALREADY, "EALREADY"}, {
+EBADF, "EBADF"}, {
+EBADMSG, "EBADMSG"}, {
+EBUSY, "EBUSY"}, {
+ECANCELED, "ECANCELED"}, {
+ECHILD, "ECHILD"}, {
+ECONNABORTED, "ECONNABORTED"}, {
+ECONNREFUSED, "ECONNREFUSED"}, {
+ECONNRESET, "ECONNRESET"}, {
+EDEADLK, "EDEADLK"}, {
+EDESTADDRREQ, "EDESTADDRREQ"}, {
+EDOM, "EDOM"}, {
+EDQUOT, "EDQUOT"}, {
+EEXIST, "EEXIST"}, {
+EFAULT, "EFAULT"}, {
+EFBIG, "EFBIG"}, {
+EHOSTUNREACH, "EHOSTUNREACH"}, {
+EIDRM, "EIDRM"}, {
+EILSEQ, "EILSEQ"}, {
+EINPROGRESS, "EINPROGRESS"}, {
+EINTR, "EINTR"}, {
+EINVAL, "EINVAL"}, {
+EIO, "EIO"}, {
+EISCONN, "EISCONN"}, {
+EISDIR, "EISDIR"}, {
+ELOOP, "ELOOP"}, {
+EMFILE, "EMFILE"}, {
+EMLINK, "EMLINK"}, {
+EMSGSIZE, "EMSGSIZE"}, {
+EMULTIHOP, "EMULTIHOP"}, {
+ENAMETOOLONG, "ENAMETOOLONG"}, {
+ENETDOWN, "ENETDOWN"}, {
+ENETRESET, "ENETRESET"}, {
+ENETUNREACH, "ENETUNREACH"}, {
+ENFILE, "ENFILE"}, {
+ENOBUFS, "ENOBUFS"},
 #ifdef ENODATA
-	   {ENODATA,"ENODATA"},
+{
+ENODATA, "ENODATA"},
 #endif
-	   {ENODEV,"ENODEV"},
-	   {ENOENT,"ENOENT"},{ENOEXEC,"ENOEXEC"},
-	   {ENOLCK,"ENOLCK"},{ENOLINK,"ENOLINK"},
-	   {ENOMEM,"ENOMEM"},{ENOMSG,"ENOMSG"},
-	   {ENOPROTOOPT,"ENOPROTOOPT"},{ENOSPC,"ENOSPC"},
+{
+ENODEV, "ENODEV"}, {
+ENOENT, "ENOENT"}, {
+ENOEXEC, "ENOEXEC"}, {
+ENOLCK, "ENOLCK"}, {
+ENOLINK, "ENOLINK"}, {
+ENOMEM, "ENOMEM"}, {
+ENOMSG, "ENOMSG"}, {
+ENOPROTOOPT, "ENOPROTOOPT"}, {
+ENOSPC, "ENOSPC"},
 #ifdef ENOSR
-	   {ENOSR,"ENOSR"},
+{
+ENOSR, "ENOSR"},
 #endif
 #ifdef ENOSTR
-	   {ENOSTR,"ENOSTR"},
+{
+ENOSTR, "ENOSTR"},
 #endif
-	   {ENOSYS,"ENOSYS"},{ENOTCONN,"ENOTCONN"},
-	   {ENOTDIR,"ENOTDIR"},{ENOTEMPTY,"ENOTEMPTY"},
-	   {ENOTSOCK,"ENOTSOCK"},{ENOTSUP,"ENOTSUP"},
-	   {ENOTTY,"ENOTTY"},{ENXIO,"ENXIO"},
-	   {EOPNOTSUPP,"EOPNOTSUPP"},{EOVERFLOW,"EOVERFLOW"},
-	   {EPERM,"EPERM"},{EPIPE,"EPIPE"},{EPROTO,"EPROTO"},
-	   {EPROTONOSUPPORT,"EPROTONOSUPPORT"},
-	   {EPROTOTYPE,"EPROTOTYPE"},
-	   {ERANGE,"ERANGE"},{EROFS,"EROFS"},
-	   {EWOULDBLOCK,"EWOULDBLOCK"},{EXDEV,"EXDEV"},
-	   {0,0}
+{
+ENOSYS, "ENOSYS"}, {
+ENOTCONN, "ENOTCONN"}, {
+ENOTDIR, "ENOTDIR"}, {
+ENOTEMPTY, "ENOTEMPTY"}, {
+ENOTSOCK, "ENOTSOCK"}, {
+ENOTSUP, "ENOTSUP"}, {
+ENOTTY, "ENOTTY"}, {
+ENXIO, "ENXIO"}, {
+EOPNOTSUPP, "EOPNOTSUPP"}, {
+EOVERFLOW, "EOVERFLOW"}, {
+EPERM, "EPERM"}, {
+EPIPE, "EPIPE"}, {
+EPROTO, "EPROTO"}, {
+EPROTONOSUPPORT, "EPROTONOSUPPORT"}, {
+EPROTOTYPE, "EPROTOTYPE"}, {
+ERANGE, "ERANGE"}, {
+EROFS, "EROFS"}, {
+EWOULDBLOCK, "EWOULDBLOCK"}, {
+EXDEV, "EXDEV"}, {
+0, 0}
 };
-int main() {
-    struct unique *tst=sym;
-    int ret = PTP_PASS;
-    while (tst->name) {
-	if (tst->value < 0) {
-	    printf("Value of symbol %s is less than zero\n",tst->name);
-	    ret = PTP_FAIL;
+
+int main()
+{
+	struct unique *tst = sym;
+	int ret = PTP_PASS;
+	while (tst->name) {
+		if (tst->value < 0) {
+			printf("Value of symbol %s is less than zero\n",
+			       tst->name);
+			ret = PTP_FAIL;
+		}
+		tst++;
 	}
-	tst++;
-    }
-    return ret;
+	return ret;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/1-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/1-1-buildonly.c
index f5db635..8b26cae 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/1-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/1-1-buildonly.c
@@ -1,11 +1,11 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test the header file pthread.h exists and can be included
-  */
+   Test the header file pthread.h exists and can be included
+   */
 
 #include <pthread.h>
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/10-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/10-buildonly.c
index c29a6fd..b3604a8 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/10-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/10-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_attr_init(pthread_attr_t *);
-  */
+   int pthread_attr_init(pthread_attr_t *);
+   */
 
 #include <pthread.h>
 
 pthread_attr_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 	pthread_attr_init(&a);
 	return;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/11-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/11-1-buildonly.c
index ae35935..d319bb2 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/11-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/11-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_attr_destroy(pthread_attr_t *);
-  */
+   int pthread_attr_destroy(pthread_attr_t *);
+   */
 
 #include <pthread.h>
 
 pthread_attr_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 	pthread_attr_destroy(&a);
 	return;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/12-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/12-1-buildonly.c
index 5bc7a2a..9e24b13 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/12-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/12-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
-  */
+   int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
+   */
 
 #include <pthread.h>
 
 pthread_attr_t a;
 int *detachstate;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_attr_getdetachstate(&a, detachstate);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/13-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/13-1-buildonly.c
index 2eab30c..901da9b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/13-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/13-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_attr_setdetachstate(const pthread_attr_t *, int);
-  */
+   int pthread_attr_setdetachstate(const pthread_attr_t *, int);
+   */
 
 #include <pthread.h>
 
 pthread_attr_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/14-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/14-1-buildonly.c
index c26521e..6c4ca57 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/14-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/14-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t
-	*restrict);
-  */
+   int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t
+   *restrict);
+   */
 
 #include <pthread.h>
 
 pthread_mutex_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutex_init(&a, NULL);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/15-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/15-1-buildonly.c
index 402b798..b7756a3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/15-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/15-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutex_destroy(pthread_mutex_t *);
-  */
+   int pthread_mutex_destroy(pthread_mutex_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutex_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutex_destroy(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/16-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/16-1-buildonly.c
index faa2c8f..ec4b4a0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/16-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/16-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutex_lock(pthread_mutex_t *);
-  */
+   int pthread_mutex_lock(pthread_mutex_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutex_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutex_lock(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/17-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/17-1-buildonly.c
index cd57dbc..d85cfdc 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/17-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/17-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutex_trylock(pthread_mutex_t *);
-  */
+   int pthread_mutex_trylock(pthread_mutex_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutex_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutex_trylock(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/18-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/18-1-buildonly.c
index 623ad64..fbe8ec7 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/18-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/18-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutex_unlock(pthread_mutex_t *);
-  */
+   int pthread_mutex_unlock(pthread_mutex_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutex_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutex_unlock(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/19-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/19-1-buildonly.c
index 3850e57..330c06f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/19-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/19-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutexattr_init(pthread_mutexattr_t *);
-  */
+   int pthread_mutexattr_init(pthread_mutexattr_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutexattr_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutexattr_init(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-1-buildonly.c
index b93436a..71c7a70 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-1-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test the following symbols are defined by pthread.h
-  */
+   Test the following symbols are defined by pthread.h
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-2-buildonly.c
index 8226b5c..20cef8f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/2-2-buildonly.c
@@ -1,17 +1,17 @@
 
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
- *
- * Test the following symbols are defined by pthread.h
- *
- * This is done with functions, not #ifdefs because the spec doesn't state
- * that they have to be #define's, and instead can be values in an enum, like
- * on FreeBSD.
- */
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
+   *
+   * Test the following symbols are defined by pthread.h
+   *
+   * This is done with functions, not #ifdefs because the spec doesn't state
+   * that they have to be #define's, and instead can be values in an enum, like
+   * on FreeBSD.
+   */
 
 #include <pthread.h>
 
@@ -22,28 +22,28 @@
 TEST_MACRO(PTHREAD_BARRIER_SERIAL_THREAD)
 
 /* XSI */
-TEST_MACRO(PTHREAD_MUTEX_DEFAULT)
+    TEST_MACRO(PTHREAD_MUTEX_DEFAULT)
 
 /* XSI */
-TEST_MACRO(PTHREAD_MUTEX_ERRORCHECK)
+    TEST_MACRO(PTHREAD_MUTEX_ERRORCHECK)
 
 /* XSI */
-TEST_MACRO(PTHREAD_MUTEX_NORMAL)
+    TEST_MACRO(PTHREAD_MUTEX_NORMAL)
 
 /* XSI */
-TEST_MACRO(PTHREAD_MUTEX_RECURSIVE)
+    TEST_MACRO(PTHREAD_MUTEX_RECURSIVE)
 
 /* TPP|TPI */
-TEST_MACRO(PTHREAD_PRIO_INHERIT)
+    TEST_MACRO(PTHREAD_PRIO_INHERIT)
 
 /* TPP|TPI */
-TEST_MACRO(PTHREAD_PRIO_NONE)
+    TEST_MACRO(PTHREAD_PRIO_NONE)
 
 /* TPP|TPI */
-TEST_MACRO(PTHREAD_PRIO_PROTECT)
+    TEST_MACRO(PTHREAD_PRIO_PROTECT)
 
 /* TPS */
-TEST_MACRO(PTHREAD_SCOPE_PROCESS)
+    TEST_MACRO(PTHREAD_SCOPE_PROCESS)
 
 /* TPS */
-TEST_MACRO(PTHREAD_SCOPE_SYSTEM)
+    TEST_MACRO(PTHREAD_SCOPE_SYSTEM)
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/20-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/20-1-buildonly.c
index b295540..55b205c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/20-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/20-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_mutexattr_destroy(pthread_mutexattr_t *);
-  */
+   int pthread_mutexattr_destroy(pthread_mutexattr_t *);
+   */
 
 #include <pthread.h>
 
 pthread_mutexattr_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 
 	pthread_mutexattr_destroy(&a);
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-1-buildonly.c
index 07c5dce..158eafe 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-1-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_attr_t
-  */
+   Test pthread_attr_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-10-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-10-buildonly.c
index 9d62b57..fe3f64d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-10-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-10-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_rwlock_t
-  */
+   Test pthread_rwlock_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-11-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-11-buildonly.c
index 1b2eff4..a0feb40 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-11-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-11-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_rwlockattr_t
-  */
+   Test pthread_rwlockattr_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-12-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-12-buildonly.c
index d342fd9..fbf1b2c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-12-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-12-buildonly.c
@@ -1,13 +1,13 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_spinlock_t
-  SPI
-  */
+   Test pthread_spinlock_t
+   SPI
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-13-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-13-buildonly.c
index f5820e0..6ddcf6d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-13-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-13-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_t
-  */
+   Test pthread_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-2-buildonly.c
index 7e5e2b6..1087d3c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-2-buildonly.c
@@ -1,13 +1,13 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_barrier_t
-  BAR
-  */
+   Test pthread_barrier_t
+   BAR
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-3-buildonly.c
index 237a45d..b977848 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-3-buildonly.c
@@ -1,13 +1,13 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_barrierattr_t
-  BAR
-  */
+   Test pthread_barrierattr_t
+   BAR
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-4-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-4-buildonly.c
index 167902e..da0400a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-4-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-4-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_cond_t
-  */
+   Test pthread_cond_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-5-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-5-buildonly.c
index 1bc13da..63f0b47 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-5-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-5-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_condattr_t
-  */
+   Test pthread_condattr_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-6-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-6-buildonly.c
index fada7b0..732428a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-6-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-6-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_key_t
-  */
+   Test pthread_key_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-7-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-7-buildonly.c
index f800aba..68c0902 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-7-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-7-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_mutex_t
-  */
+   Test pthread_mutex_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-8-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-8-buildonly.c
index b3ba592..fa3f8a9 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-8-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-8-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_mutexattr_t
-  */
+   Test pthread_mutexattr_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-9-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-9-buildonly.c
index ef29041..bb648d0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-9-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/3-9-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_once_t
-  */
+   Test pthread_once_t
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/4-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/4-1-buildonly.c
index b82571a..7ecb0e3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/4-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/4-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
- 	void *(*)(void *), void *restrict);
-  */
+   pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
+   void *(*)(void *), void *restrict);
+   */
 
 #include <pthread.h>
 
-void * thread_function(void * arg)
+void *thread_function(void *arg)
 {
-    return NULL;
+	return NULL;
 }
 
 void dummy_func()
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/5-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/5-1-buildonly.c
index 8439bfb..f6ec85f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/5-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/5-1-buildonly.c
@@ -1,18 +1,18 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  void pthread_exit(void *);
-  */
+   void pthread_exit(void *);
+   */
 
 #include <pthread.h>
 
-void dummy_func ()
+void dummy_func()
 {
 	pthread_exit(NULL);
 	return;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/6-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/6-1-buildonly.c
index 3279dfa..c9e4f07 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/6-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/6-1-buildonly.c
@@ -1,18 +1,18 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  pthread_t pthread_self(void);
-  */
+   pthread_t pthread_self(void);
+   */
 
 #include <pthread.h>
 
-void dummy_func ()
+void dummy_func()
 {
 	pthread_t ptid = pthread_self();
 	if (ptid == 0)
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/7-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/7-1-buildonly.c
index 8bd70d3..c724ac0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/7-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/7-1-buildonly.c
@@ -1,22 +1,22 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_equal(pthread_t, pthread_t);
-  */
+   int pthread_equal(pthread_t, pthread_t);
+   */
 
 #include <pthread.h>
 
-pthread_t a,b;
+pthread_t a, b;
 int tmp;
 
-void dummy_func ()
+void dummy_func()
 {
-	tmp = pthread_equal(a,b);
+	tmp = pthread_equal(a, b);
 	return;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/8-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/8-1-buildonly.c
index 14af48e..d834a0c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/8-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/8-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_join(pthread_t, void **);
-  */
+   int pthread_join(pthread_t, void **);
+   */
 
 #include <pthread.h>
 
 pthread_t a;
 
-void dummy_func ()
+void dummy_func()
 {
-	pthread_join(a,NULL);
+	pthread_join(a, NULL);
 	return;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/9-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/9-1-buildonly.c
index 4252601..772b83b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/pthread_h/9-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/pthread_h/9-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test this function is defined:
+   Test this function is defined:
 
-  int pthread_detach(pthread_t);
-  */
+   int pthread_detach(pthread_t);
+   */
 
 #include <pthread.h>
 
 pthread_t a;
 
-void dummy_func ()
+void dummy_func()
 {
 	pthread_detach(a);
 	return;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sched_h/10-1.c b/testcases/open_posix_testsuite/conformance/definitions/sched_h/10-1.c
index 8f85fd3..9a9c08e 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sched_h/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sched_h/10-1.c
@@ -23,22 +23,15 @@
 } sym[] = {
 
 	{
-		 SCHED_FIFO, "SCHED_FIFO"
-	},
-	{
-		 SCHED_RR, "SCHED_RR"
-	},
+	SCHED_FIFO, "SCHED_FIFO"}, {
+	SCHED_RR, "SCHED_RR"},
 #if defined(_POSIX_SPORADIC_SERVER) && _POSIX_THREAD_SPORADIC_SERVER == 200112L
 	{
-	  SCHED_SPORADIC,"SCHED_SPORADIC"
-	},
+	SCHED_SPORADIC, "SCHED_SPORADIC"},
 #endif
 	{
-		 SCHED_OTHER, "SCHED_OTHER"
-	},
-	{
-		 0, 0
-	}
+	SCHED_OTHER, "SCHED_OTHER"}, {
+	0, 0}
 };
 
 int main()
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/1-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/1-1-buildonly.c
index 61e711b..b87a22f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/1-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/1-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the existence of the signal.h file and that it can be
-  included.
-  */
+     Test the existence of the signal.h file and that it can be
+     included.
+   */
 
 #include <signal.h>
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/13-1.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/13-1.c
index fc66687..fad70cd 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/13-1.c
@@ -1,44 +1,41 @@
   /*
-  Test that 0 is reserved for the null signal.
-  This test must be executed.
-  */
+     Test that 0 is reserved for the null signal.
+     This test must be executed.
+   */
 
 #include <signal.h>
 #include <stdio.h>
 
-int main() {
+int main()
+{
 	if ((0 == SIGABRT) ||
-		(0 == SIGALRM) ||
-		(0 == SIGBUS) ||
-		(0 == SIGCHLD) ||
-		(0 == SIGCONT) ||
-		(0 == SIGFPE) ||
-		(0 == SIGHUP) ||
-		(0 == SIGILL) ||
-		(0 == SIGINT) ||
-		(0 == SIGKILL) ||
-		(0 == SIGPIPE) ||
-		(0 == SIGQUIT) ||
-		(0 == SIGSEGV) ||
-		(0 == SIGSTOP) ||
-		(0 == SIGTERM) ||
-		(0 == SIGTSTP) ||
-		(0 == SIGTTIN) ||
-		(0 == SIGTTOU) ||
-		(0 == SIGUSR1) ||
-		(0 == SIGUSR2) ||
+	    (0 == SIGALRM) ||
+	    (0 == SIGBUS) ||
+	    (0 == SIGCHLD) ||
+	    (0 == SIGCONT) ||
+	    (0 == SIGFPE) ||
+	    (0 == SIGHUP) ||
+	    (0 == SIGILL) ||
+	    (0 == SIGINT) ||
+	    (0 == SIGKILL) ||
+	    (0 == SIGPIPE) ||
+	    (0 == SIGQUIT) ||
+	    (0 == SIGSEGV) ||
+	    (0 == SIGSTOP) ||
+	    (0 == SIGTERM) ||
+	    (0 == SIGTSTP) ||
+	    (0 == SIGTTIN) ||
+	    (0 == SIGTTOU) || (0 == SIGUSR1) || (0 == SIGUSR2) ||
 #ifdef SIGPOLL
-		(0 == SIGPOLL) ||
+	    (0 == SIGPOLL) ||
 #endif
 #ifdef SIGPROF
-		(0 == SIGPROF) ||
+	    (0 == SIGPROF) ||
 #endif
-		(0 == SIGSYS) ||
-		(0 == SIGTRAP) ||
-		(0 == SIGURG) ||
-		(0 == SIGVTALRM) ||
-		(0 == SIGXCPU) ||
-		(0 == SIGXFSZ)) {
+	    (0 == SIGSYS) ||
+	    (0 == SIGTRAP) ||
+	    (0 == SIGURG) ||
+	    (0 == SIGVTALRM) || (0 == SIGXCPU) || (0 == SIGXFSZ)) {
 		printf("Test FAILED\n");
 		return -1;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/14-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/14-1-buildonly.c
index 79b911b..c8b9070 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/14-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/14-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the signals below are supported.
-  */
+     Test that the signals below are supported.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/15-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/15-1-buildonly.c
index 15bfc15..b5473ce 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/15-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/15-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
-  Test the definition of sigaction.
-  */
+     Test the definition of sigaction.
+   */
 
 #include <signal.h>
 
 struct sigaction this_type_should_exist, t;
-extern void signal_handler (int);
+extern void signal_handler(int);
 sigset_t *set;
 int flags;
 extern void signal_action(int, siginfo_t *, void *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
-  t.sa_handler = signal_handler;
-  set = &t.sa_mask;
-  flags = t.sa_flags;
-  t.sa_sigaction = signal_action;
+	t.sa_handler = signal_handler;
+	set = &t.sa_mask;
+	flags = t.sa_flags;
+	t.sa_sigaction = signal_action;
 
-        return 0;
+	return 0;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/16-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/16-1-buildonly.c
index 1d7d98b..8756155 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/16-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/16-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the constants below are supported.
-  */
+     Test that the constants below are supported.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/17-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/17-1-buildonly.c
index fe58495..5624fd5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/17-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/17-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of ucontext_t.
-  */
+     Test the definition of ucontext_t.
+   */
 
 #include <ucontext.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/18-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/18-1-buildonly.c
index fe58495..5624fd5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/18-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/18-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of ucontext_t.
-  */
+     Test the definition of ucontext_t.
+   */
 
 #include <ucontext.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/19-1.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/19-1.c
index 817fae1..d9f11ed 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/19-1.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of stack_t.
-  */
+     Test the definition of stack_t.
+   */
 
 #include <sys/types.h>
 #include <signal.h>
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-1-buildonly.c
index 85a1c4a..a6775ea 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of SIG_DFL.
-  */
+     Test the definition of SIG_DFL.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-2-buildonly.c
index b64a642..46a2a8d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-2-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of SIG_ERR.
-  */
+     Test the definition of SIG_ERR.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-3-buildonly.c
index 9d59085..cb60e1a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-3-buildonly.c
@@ -1,8 +1,8 @@
   /*
-  @pt:CX
+     @pt:CX
 
-  Test the definition of SIG_HOLD.
-  */
+     Test the definition of SIG_HOLD.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-4-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-4-buildonly.c
index 92540d7..c3ce008 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-4-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/2-4-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of SIG_IGN.
-  */
+     Test the definition of SIG_IGN.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/20-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/20-1-buildonly.c
index bb72e72..21d8cb4 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/20-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/20-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of sigstack.
-  */
+     Test the definition of sigstack.
+   */
 
 #include <signal.h>
 
@@ -8,7 +8,7 @@
 int onstack;
 void *sp;
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sp = t.ss_sp;
 	onstack = t.ss_onstack;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/21-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/21-1-buildonly.c
index 9aabe86..14bda3b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/21-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/21-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of siginfo_t.
-  */
+     Test the definition of siginfo_t.
+   */
 
 #include <signal.h>
 #include <sys/types.h>
@@ -16,7 +16,7 @@
 long tband;
 union sigval tvalue;
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	tsigno = t.si_signo;
 	terrno = t.si_errno;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-1-buildonly.c
index 551f3f8..1bac9a5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_ILLOPC macro is defined.
-  */
+     Test that the ILL_ILLOPC macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-10-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-10-buildonly.c
index 185467d..de18fc0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-10-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-10-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_INTOVF macro is defined.
-  */
+     Test that the FPE_INTOVF macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-11-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-11-buildonly.c
index 07bf09d..ffd0636 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-11-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-11-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTDIV macro is defined.
-  */
+     Test that the FPE_FLTDIV macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-12-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-12-buildonly.c
index 48b6407..2c8e40b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-12-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-12-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTOVF macro is defined.
-  */
+     Test that the FPE_FLTOVF macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-13-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-13-buildonly.c
index c7680fe..453fdd0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-13-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-13-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTUND macro is defined.
-  */
+     Test that the FPE_FLTUND macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-14-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-14-buildonly.c
index 988d0ab..0336b5a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-14-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-14-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTRES macro is defined.
-  */
+     Test that the FPE_FLTRES macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-15-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-15-buildonly.c
index af56534..d5daf8f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-15-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-15-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTINV macro is defined.
-  */
+     Test that the FPE_FLTINV macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-16-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-16-buildonly.c
index 4b4e94e..dedebac 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-16-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-16-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_FLTSUB macro is defined.
-  */
+     Test that the FPE_FLTSUB macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-17-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-17-buildonly.c
index b527c3e..707ca70 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-17-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-17-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SEGV_MAPERR macro is defined.
-  */
+     Test that the SEGV_MAPERR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-18-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-18-buildonly.c
index 2fd4b58..1a893c7 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-18-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-18-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SEGV_ACCERR macro is defined.
-  */
+     Test that the SEGV_ACCERR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-19-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-19-buildonly.c
index 69e4f25..80fd789 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-19-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-19-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the BUS_ADRALN macro is defined.
-  */
+     Test that the BUS_ADRALN macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-2-buildonly.c
index 78acaf6..df30076 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-2-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_ILLOPN macro is defined.
-  */
+     Test that the ILL_ILLOPN macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-20-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-20-buildonly.c
index ddc2636..42a3df6 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-20-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-20-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the BUS_ADRERR macro is defined.
-  */
+     Test that the BUS_ADRERR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-21-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-21-buildonly.c
index e0812be..ee31991 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-21-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-21-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the BUS_OBJERR macro is defined.
-  */
+     Test that the BUS_OBJERR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-22-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-22-buildonly.c
index 2039b9c..26b7893 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-22-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-22-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the TRAP_BRKPT macro is defined.
-  */
+     Test that the TRAP_BRKPT macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-23-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-23-buildonly.c
index c9de0db..687c072 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-23-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-23-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the TRAP_TRACE macro is defined.
-  */
+     Test that the TRAP_TRACE macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-24-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-24-buildonly.c
index e9e091c..334227a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-24-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-24-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_EXITED macro is defined.
-  */
+     Test that the CLD_EXITED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-25-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-25-buildonly.c
index a444870..a0f7cdc 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-25-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-25-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_KILLED macro is defined.
-  */
+     Test that the CLD_KILLED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-26-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-26-buildonly.c
index 2c32847..ad6e795 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-26-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-26-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_DUMPED macro is defined.
-  */
+     Test that the CLD_DUMPED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-27-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-27-buildonly.c
index c2931ac..6a2a2f5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-27-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-27-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_TRAPPED macro is defined.
-  */
+     Test that the CLD_TRAPPED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-28-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-28-buildonly.c
index 4cca86b..9fb279c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-28-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-28-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_STOPPED macro is defined.
-  */
+     Test that the CLD_STOPPED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-29-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-29-buildonly.c
index c8917fe..3449f7d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-29-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-29-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the CLD_CONTINUED macro is defined.
-  */
+     Test that the CLD_CONTINUED macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-3-buildonly.c
index 62a2704..21c79f0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-3-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_ILLADR macro is defined.
-  */
+     Test that the ILL_ILLADR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-30-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-30-buildonly.c
index 743df7e..bce2c87 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-30-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-30-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_IN macro is defined.
-  */
+     Test that the POLL_IN macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-31-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-31-buildonly.c
index 1f33abb..95fb4a5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-31-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-31-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_OUT macro is defined.
-  */
+     Test that the POLL_OUT macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-32-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-32-buildonly.c
index cbad184..364278c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-32-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-32-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_MSG macro is defined.
-  */
+     Test that the POLL_MSG macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-33-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-33-buildonly.c
index a9d2e5d..2234c64 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-33-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-33-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_ERR macro is defined.
-  */
+     Test that the POLL_ERR macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-34-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-34-buildonly.c
index 813373f..e0abe43 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-34-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-34-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_PRI macro is defined.
-  */
+     Test that the POLL_PRI macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-35-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-35-buildonly.c
index 6edf4ef..a0499b1 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-35-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-35-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the POLL_HUP macro is defined.
-  */
+     Test that the POLL_HUP macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-36-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-36-buildonly.c
index d0d92c5..863390e 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-36-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-36-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SI_USER macro is defined.
-  */
+     Test that the SI_USER macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-37-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-37-buildonly.c
index 9c9b437..4b4acbb 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-37-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-37-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SI_QUEUE macro is defined.
-  */
+     Test that the SI_QUEUE macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-38-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-38-buildonly.c
index ad42db6..b7f6af1 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-38-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-38-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SI_TIMER macro is defined.
-  */
+     Test that the SI_TIMER macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-39-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-39-buildonly.c
index 50bcfec..76bc51b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-39-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-39-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SI_ASYNCIO macro is defined.
-  */
+     Test that the SI_ASYNCIO macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-4-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-4-buildonly.c
index 4d0d33e..e36dd95 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-4-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-4-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_ILLTRP macro is defined.
-  */
+     Test that the ILL_ILLTRP macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-40-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-40-buildonly.c
index e4224f2..6fc9a59 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-40-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-40-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the SI_MESGQ macro is defined.
-  */
+     Test that the SI_MESGQ macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-5-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-5-buildonly.c
index 224befc..c338036 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-5-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-5-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_PRVOPC macro is defined.
-  */
+     Test that the ILL_PRVOPC macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-6-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-6-buildonly.c
index 4b221dd..7d2c68f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-6-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-6-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_PRVREG macro is defined.
-  */
+     Test that the ILL_PRVREG macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-7-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-7-buildonly.c
index fda8422..f288a2a 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-7-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-7-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_COPROC macro is defined.
-  */
+     Test that the ILL_COPROC macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-8-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-8-buildonly.c
index ab62700..dc7a9fb 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-8-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-8-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the ILL_BADSTK macro is defined.
-  */
+     Test that the ILL_BADSTK macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-9-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-9-buildonly.c
index e2ce813..521159f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-9-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/22-9-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test that the FPE_INTDIV macro is defined.
-  */
+     Test that the FPE_INTDIV macro is defined.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/23-1.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/23-1.c
index c3e6279..9a4d200 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/23-1.c
@@ -1,17 +1,17 @@
   /*
-  @pt:XSI
-  Test that the function:
-   void (*bsd_signal(int, void (*)(int)))(int);
-  is declared.
-  */
+     @pt:XSI
+     Test that the function:
+     void (*bsd_signal(int, void (*)(int)))(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef void (*(*bsd_signal_test)(int, void (*)(int)))(int);
+typedef void (*(*bsd_signal_test) (int, void (*)(int))) (int);
 
-int main (void)
+int main(void)
 {
 	bsd_signal_test dummyvar;
-	dummyvar=bsd_signal;
+	dummyvar = bsd_signal;
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/24-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/24-1-buildonly.c
index 8f54ad8..b4c5e5e 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/24-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/24-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-  Test that the function:
-   int kill(pid_t, int);
-  is declared.
-  */
+     Test that the function:
+     int kill(pid_t, int);
+     is declared.
+   */
 
 #include <signal.h>
 #include <sys/types.h>
 
-typedef int (*kill_test)(pid_t, int);
+typedef int (*kill_test) (pid_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	kill_test dummyvar;
 	dummyvar = kill;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/25-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/25-1-buildonly.c
index 8745e4f..4ee38b0 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/25-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/25-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-  Test that the function:
-   int killpg(pid_t, int);
-  is declared.
-  */
+     Test that the function:
+     int killpg(pid_t, int);
+     is declared.
+   */
 
 #include <signal.h>
 #include <sys/types.h>
 
-typedef int (*killpg_test)(pid_t, int);
+typedef int (*killpg_test) (pid_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	killpg_test dummyvar;
 	dummyvar = killpg;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/26-1.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/26-1.c
index 06ed3df..bb81825 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/26-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/26-1.c
@@ -1,15 +1,15 @@
   /*
-  Test that the function:
-   int pthread_kill(pthread_t, int);
-  is declared.
-  */
+     Test that the function:
+     int pthread_kill(pthread_t, int);
+     is declared.
+   */
 
 #include <pthread.h>
 #include <signal.h>
 
-typedef int (*pthread_kill_test)(pthread_t, int);
+typedef int (*pthread_kill_test) (pthread_t, int);
 
-int main (void)
+int main(void)
 {
 	pthread_kill_test dummyvar;
 	dummyvar = pthread_kill;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/27-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/27-1-buildonly.c
index 4ce2912..e6af43b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/27-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/27-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int pthread_sigmask(int, const sigset_t *, sigset_t *);
-  is declared.
-  */
+     Test that the function:
+     int pthread_sigmask(int, const sigset_t *, sigset_t *);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*pthread_sigmask_test)(int, const sigset_t *, sigset_t *);
+typedef int (*pthread_sigmask_test) (int, const sigset_t *, sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	pthread_sigmask_test dummyvar;
 	dummyvar = pthread_sigmask;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/28-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/28-1-buildonly.c
index d9905b3..0ee606c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/28-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/28-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int raise(int);
-  is declared.
-  */
+     Test that the function:
+     int raise(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*raise_test)(int);
+typedef int (*raise_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	raise_test dummyvar;
 	dummyvar = raise;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/29-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/29-1-buildonly.c
index e9b2740..884d531 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/29-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/29-1-buildonly.c
@@ -1,16 +1,17 @@
   /*
-  Test that the function:
-   int sigaction(int, const struct sigaction *restrict,
-   struct sigaction *restrict);
-  is declared.
-  Removed restrict keyword from typedef.
-  */
+     Test that the function:
+     int sigaction(int, const struct sigaction *restrict,
+     struct sigaction *restrict);
+     is declared.
+     Removed restrict keyword from typedef.
+   */
 
 #include <signal.h>
 
-typedef int (*sigaction_test)(int, const struct sigaction *, struct sigaction *);
+typedef int (*sigaction_test) (int, const struct sigaction *,
+			       struct sigaction *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigaction_test dummyvar;
 	dummyvar = sigaction;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/3-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/3-1-buildonly.c
index 34d5ea6..17de429 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/3-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/3-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of sig_atomic_t.
-  */
+     Test the definition of sig_atomic_t.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/30-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/30-1-buildonly.c
index 9b04cec..86731bf 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/30-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/30-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigaddset(sigset_t *, int);
-  is declared.
-  */
+     Test that the function:
+     int sigaddset(sigset_t *, int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigaddset_test)(sigset_t *, int);
+typedef int (*sigaddset_test) (sigset_t *, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigaddset_test dummyvar;
 	dummyvar = sigaddset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/31-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/31-1-buildonly.c
index 3cc53ba..6b41c24 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/31-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/31-1-buildonly.c
@@ -1,16 +1,16 @@
   /*
-  Test that the function:
-   int sigaltstack(const stack_t *restrict, stack_t *restrict);
-  is declared.
+     Test that the function:
+     int sigaltstack(const stack_t *restrict, stack_t *restrict);
+     is declared.
 
-  Removed restrict keyword from typedef.
-  */
+     Removed restrict keyword from typedef.
+   */
 
 #include <signal.h>
 
-typedef int (*sigaltstack_test)(const stack_t *, stack_t *);
+typedef int (*sigaltstack_test) (const stack_t *, stack_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigaltstack_test dummyvar;
 	dummyvar = sigaltstack;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/32-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/32-1-buildonly.c
index 4f869e2..c09452b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/32-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/32-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigdelset(sigset_t *, int);
-  is declared.
-  */
+     Test that the function:
+     int sigdelset(sigset_t *, int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigdelset_test)(sigset_t *, int);
+typedef int (*sigdelset_test) (sigset_t *, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigdelset_test dummyvar;
 	dummyvar = sigdelset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/33-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/33-1-buildonly.c
index 7cd94a2..a74fb9c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/33-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/33-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigemptyset(sigset_t *);
-  is declared.
-  */
+     Test that the function:
+     int sigemptyset(sigset_t *);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigemptyset_test)(sigset_t *);
+typedef int (*sigemptyset_test) (sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigemptyset_test dummyvar;
 	dummyvar = sigemptyset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/34-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/34-1-buildonly.c
index 901a2ea..d1d0743 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/34-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/34-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigfillset(sigset_t *);
-  is declared.
-  */
+     Test that the function:
+     int sigfillset(sigset_t *);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigfillset_test)(sigset_t *);
+typedef int (*sigfillset_test) (sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigfillset_test dummyvar;
 	dummyvar = sigfillset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/35-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/35-1-buildonly.c
index 406b0d7..03121e9 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/35-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/35-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-   @:pt:XSI
-  Test that the function:
-   int sighold(int);
-  is declared.
-  */
+     @:pt:XSI
+     Test that the function:
+     int sighold(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sighold_test)(int);
+typedef int (*sighold_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sighold_test dummyvar;
 	dummyvar = sighold;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/36-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/36-1-buildonly.c
index 58cdc24..a19191d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/36-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/36-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-   @:pt:XSI
-  Test that the function:
-   int sigignore(int);
-  is declared.
-  */
+     @:pt:XSI
+     Test that the function:
+     int sigignore(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigignore_test)(int);
+typedef int (*sigignore_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigignore_test dummyvar;
 	dummyvar = sigignore;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/37-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/37-1-buildonly.c
index 3df39b7..7743fa9 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/37-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/37-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int siginterrupt(int, int);
-  is declared.
-  */
+     Test that the function:
+     int siginterrupt(int, int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*siginterrupt_test)(int, int);
+typedef int (*siginterrupt_test) (int, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	siginterrupt_test dummyvar;
 	dummyvar = siginterrupt;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/38-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/38-1-buildonly.c
index b57837f..8df018d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/38-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/38-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigismember(const sigset_t *, int);
-  is declared.
-  */
+     Test that the function:
+     int sigismember(const sigset_t *, int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigismember_test)(const sigset_t *, int);
+typedef int (*sigismember_test) (const sigset_t *, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigismember_test dummyvar;
 	dummyvar = sigismember;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/39-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/39-1-buildonly.c
index dbc0a27..7d39c30 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/39-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/39-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   void (*signal(int, void (*)(int)))(int);
-  is declared.
-  */
+     Test that the function:
+     void (*signal(int, void (*)(int)))(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef void (*(*signal_test)(int, void (*)(int)))(int);
+typedef void (*(*signal_test) (int, void (*)(int))) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	signal_test dummyvar;
 	dummyvar = signal;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/4-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/4-1-buildonly.c
index 5a63457..b95d331 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/4-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/4-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of sigset_t.
-  */
+     Test the definition of sigset_t.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/40-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/40-1-buildonly.c
index 0d18c51..9ef41a4 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/40-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/40-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-   @:pt:XSI
-  Test that the function:
-   int sigpause(int);
-  is declared.
-  */
+     @:pt:XSI
+     Test that the function:
+     int sigpause(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigpause_test)(int);
+typedef int (*sigpause_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigpause_test dummyvar;
 	dummyvar = sigpause;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/41-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/41-1-buildonly.c
index d8981b7..e571383 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/41-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/41-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-   @:pt:CX
-  Test that the function:
-   int sigpending(sigset_t *);
-  is declared.
-  */
+     @:pt:CX
+     Test that the function:
+     int sigpending(sigset_t *);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigpending_test)(sigset_t *);
+typedef int (*sigpending_test) (sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigpending_test dummyvar;
 	dummyvar = sigpending;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/42-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/42-1-buildonly.c
index b884b1c..69f7c47 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/42-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/42-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-  Test that the function:
-   int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
-  is declared.
-  Removed restrict keyword from typedef.
-  */
+     Test that the function:
+     int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
+     is declared.
+     Removed restrict keyword from typedef.
+   */
 
 #include <signal.h>
 
-typedef int (*sigprocmask_test)(int, const sigset_t *, sigset_t *);
+typedef int (*sigprocmask_test) (int, const sigset_t *, sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigprocmask_test dummyvar;
 	dummyvar = sigprocmask;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/43-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/43-1-buildonly.c
index 31f42df..1d3745d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/43-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/43-1-buildonly.c
@@ -1,15 +1,15 @@
   /*
-  Test that the function:
-   int sigqueue(pid_t, int, const union sigval);
-  is declared.
-  */
+     Test that the function:
+     int sigqueue(pid_t, int, const union sigval);
+     is declared.
+   */
 
 #include <signal.h>
 #include <sys/types.h>
 
-typedef int (*sigqueue_test)(pid_t, int, const union sigval);
+typedef int (*sigqueue_test) (pid_t, int, const union sigval);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigqueue_test dummyvar;
 	dummyvar = sigqueue;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/44-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/44-1-buildonly.c
index 26b924f..6d793af 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/44-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/44-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigrelse(int);
-  is declared.
-  */
+     Test that the function:
+     int sigrelse(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigrelse_test)(int);
+typedef int (*sigrelse_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigrelse_test dummyvar;
 	dummyvar = sigrelse;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/45-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/45-1-buildonly.c
index bafcc6b..8675773 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/45-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/45-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   void (*sigset(int, void (*)(int)))(int);
-  is declared.
-  */
+     Test that the function:
+     void (*sigset(int, void (*)(int)))(int);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef void (*(*sigset_test)(int, void (*)(int)))(int);
+typedef void (*(*sigset_test) (int, void (*)(int))) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigset_test dummyvar;
 	dummyvar = sigset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/46-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/46-1-buildonly.c
index 3018201..ee51e6d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/46-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/46-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigsuspend(const sigset_t *);
-  is declared.
-  */
+     Test that the function:
+     int sigsuspend(const sigset_t *);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigsuspend_test)(const sigset_t *);
+typedef int (*sigsuspend_test) (const sigset_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigsuspend_test dummyvar;
 	dummyvar = sigsuspend;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/47-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/47-1-buildonly.c
index 9fb22ae..139252f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/47-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/47-1-buildonly.c
@@ -1,17 +1,18 @@
   /*
-   @pt:RTS
-  Test that the function:
-   int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict,
-   const struct timespec *restrict);
-  is declared.
-  */
+     @pt:RTS
+     Test that the function:
+     int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict,
+     const struct timespec *restrict);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigtimedwait_test)(const sigset_t *restrict, siginfo_t *restrict,
-   const struct timespec *restrict);
+typedef int (*sigtimedwait_test) (const sigset_t * restrict,
+				  siginfo_t * restrict,
+				  const struct timespec * restrict);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigtimedwait_test dummyvar;
 	dummyvar = sigtimedwait;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/48-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/48-1-buildonly.c
index c8392c6..f820615 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/48-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/48-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
-  Test that the function:
-   int sigwait(const sigset_t *restrict, int *restrict);
-  is declared.
-  */
+     Test that the function:
+     int sigwait(const sigset_t *restrict, int *restrict);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigwait_test)(const sigset_t *restrict, int *restrict);
+typedef int (*sigwait_test) (const sigset_t * restrict, int *restrict);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigwait_test dummyvar;
 	dummyvar = sigwait;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/49-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/49-1-buildonly.c
index dc24d97..7224340 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/49-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/49-1-buildonly.c
@@ -1,14 +1,15 @@
   /*
-  Test that the function:
-   int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
-  is declared.
-  */
+     Test that the function:
+     int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
+     is declared.
+   */
 
 #include <signal.h>
 
-typedef int (*sigwaitinfo_test)(const sigset_t *restrict, siginfo_t *restrict);
+typedef int (*sigwaitinfo_test) (const sigset_t * restrict,
+				 siginfo_t * restrict);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	sigwaitinfo_test dummyvar;
 	dummyvar = sigwaitinfo;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/5-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/5-1-buildonly.c
index 87c4645..ca36b15 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/5-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/5-1-buildonly.c
@@ -1,6 +1,6 @@
   /*
-  Test the definition of pid_t.
-  */
+     Test the definition of pid_t.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/signal_h/50-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/signal_h/50-1-buildonly.c
index b4dbf59..70ffaee 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/signal_h/50-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/signal_h/50-1-buildonly.c
@@ -1,8 +1,8 @@
   /*
-  Test that inclusion of signal.h makes visible all symbols in time.h.
+     Test that inclusion of signal.h makes visible all symbols in time.h.
 
-  NOTE - THIS TEST CASE IS NOT COMPLETE.  NEEDS TO GROW MUCH LARGER.
-  */
+     NOTE - THIS TEST CASE IS NOT COMPLETE.  NEEDS TO GROW MUCH LARGER.
+   */
 
 #include <signal.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/11-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/11-1-buildonly.c
index f36051c..d20e07c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/11-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/11-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*mlock_test)(const void *, size_t);
+typedef int (*mlock_test) (const void *, size_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	mlock_test dummyvar;
 	dummyvar = mlock;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/12-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/12-1-buildonly.c
index 805e667..f2a9baa 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/12-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/12-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*mlockall_test)(int);
+typedef int (*mlockall_test) (int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	mlockall_test dummyvar;
 	dummyvar = mlockall;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/13-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/13-1-buildonly.c
index 9404d9a..93f9344 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/13-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/13-1-buildonly.c
@@ -18,9 +18,9 @@
 
 #include <sys/mman.h>
 
-typedef void* (*mmap_test)(void *, size_t, int, int, int, off_t);
+typedef void *(*mmap_test) (void *, size_t, int, int, int, off_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	mmap_test dummyvar;
 	dummyvar = mmap;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/14-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/14-1-buildonly.c
index 094d0fd..32e1685 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/14-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/14-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*mprotect_test)(void *, size_t, int);
+typedef int (*mprotect_test) (void *, size_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	mprotect_test dummyvar;
 	dummyvar = mprotect;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/15-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/15-1-buildonly.c
index ed148a4..9d78dc7 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/15-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/15-1-buildonly.c
@@ -17,9 +17,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*msync_test)(void *, size_t, int);
+typedef int (*msync_test) (void *, size_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	msync_test dummyvar;
 	dummyvar = msync;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/16-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/16-1-buildonly.c
index ea63139..45e7c88 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/16-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/16-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*munlock_test)(const void *, size_t);
+typedef int (*munlock_test) (const void *, size_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	munlock_test dummyvar;
 	dummyvar = munlock;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/17-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/17-1-buildonly.c
index 560483a..f84f36b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/17-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/17-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*munlockall_test)(void);
+typedef int (*munlockall_test) (void);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	munlockall_test dummyvar;
 	dummyvar = munlockall;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/18-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/18-1-buildonly.c
index 2d4b06b..800b6ea 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/18-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/18-1-buildonly.c
@@ -18,9 +18,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*munmap_test)(void *, size_t);
+typedef int (*munmap_test) (void *, size_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	munmap_test dummyvar;
 	dummyvar = munmap;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/19-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/19-1-buildonly.c
index d8684f5..3493fcf 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/19-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/19-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*posix_madvise_test)(void *, size_t, int);
+typedef int (*posix_madvise_test) (void *, size_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	posix_madvise_test dummyvar;
 	dummyvar = posix_madvise;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/20-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/20-1-buildonly.c
index 8acabd7..c65f7eb 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/20-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/20-1-buildonly.c
@@ -20,11 +20,11 @@
 
 #if defined(_POSIX_TYPED_MEMORY_OBJECTS) && _POSIX_TYPED_MEMORY_OBJECTS != -1
 
-typedef int (*posix_mem_offset_test)(const void *restrict, size_t,
-				     off_t *restrict, size_t *restrict,
-				     int *restrict);
+typedef int (*posix_mem_offset_test) (const void *restrict, size_t,
+				      off_t * restrict, size_t * restrict,
+				      int *restrict);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	posix_mem_offset_test dummyvar;
 	dummyvar = posix_mem_offset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/21-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/21-1-buildonly.c
index 4a740da..d263fc4 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/21-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/21-1-buildonly.c
@@ -19,9 +19,10 @@
 
 #if defined(_POSIX_TYPED_MEMORY_OBJECTS) && _POSIX_TYPED_MEMORY_OBJECTS != -1
 
-typedef int (*posix_typed_mem_get_info_test)(int, struct posix_typed_mem_info *);
+typedef int (*posix_typed_mem_get_info_test) (int,
+					      struct posix_typed_mem_info *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	posix_typed_mem_get_info_test dummyvar;
 	dummyvar = posix_typed_mem_get_info;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/22-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/22-1-buildonly.c
index 9aefe74..b1ee887 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/22-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/22-1-buildonly.c
@@ -19,9 +19,9 @@
 
 #if defined(_POSIX_TYPED_MEMORY_OBJECTS) && _POSIX_TYPED_MEMORY_OBJECTS != -1
 
-typedef int (*posix_typed_mem_open_test)(const char *, int, int);
+typedef int (*posix_typed_mem_open_test) (const char *, int, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	posix_typed_mem_open_test dummyvar;
 	dummyvar = posix_typed_mem_open;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/23-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/23-1-buildonly.c
index 218b2f5..51a4111 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/23-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/23-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*shm_open_test)(const char *, int, mode_t);
+typedef int (*shm_open_test) (const char *, int, mode_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shm_open_test dummyvar;
 	dummyvar = shm_open;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/24-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/24-1-buildonly.c
index dd28a55..51bc6da 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/24-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/24-1-buildonly.c
@@ -16,9 +16,9 @@
 
 #include <sys/mman.h>
 
-typedef int (*shm_unlink_test)(const char *);
+typedef int (*shm_unlink_test) (const char *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shm_unlink_test dummyvar;
 	dummyvar = shm_unlink;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/10-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/10-1-buildonly.c
index 87c8b9b..e867477 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/10-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/10-1-buildonly.c
@@ -14,9 +14,9 @@
 
 #include <sys/shm.h>
 
-typedef int (*shmdt_test)(const void *);
+typedef int (*shmdt_test) (const void *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shmdt_test dummyvar;
 	dummyvar = shmdt;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/11-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/11-1-buildonly.c
index 183a033..2cd03c9 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/11-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/11-1-buildonly.c
@@ -14,9 +14,9 @@
 
 #include <sys/shm.h>
 
-typedef int (*shmget_test)(key_t, size_t, int);
+typedef int (*shmget_test) (key_t, size_t, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shmget_test dummyvar;
 	dummyvar = shmget;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/12-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/12-3-buildonly.c
index caee33e..568de64 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/12-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/12-3-buildonly.c
@@ -14,9 +14,9 @@
 
 #include <sys/shm.h>
 
-typedef key_t (*ftok_test)(const char *, int);
+typedef key_t(*ftok_test) (const char *, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	ftok_test dummyvar;
 	dummyvar = ftok;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/6-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/6-1-buildonly.c
index 34f1195..f8cadcd 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/6-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/6-1-buildonly.c
@@ -25,7 +25,7 @@
 
 int dummyfcn(void)
 {
-	struct ipc_perm perm = {0};
+	struct ipc_perm perm = { 0 };
 	size_t sz = 0;
 	pid_t lpid = 0, cpid = 0;
 	shmatt_t nattch = 0;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/8-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/8-1-buildonly.c
index 21a021e..1beb2ce 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/8-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/8-1-buildonly.c
@@ -14,9 +14,9 @@
 
 #include <sys/shm.h>
 
-typedef void* (*shmat_test)(int, const void *, int);
+typedef void *(*shmat_test) (int, const void *, int);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shmat_test dummyvar;
 	dummyvar = shmat;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/9-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/9-1-buildonly.c
index c8e47d2..cce1745 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/9-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/sys/shm_h/9-1-buildonly.c
@@ -14,9 +14,9 @@
 
 #include <sys/shm.h>
 
-typedef int (*shmctl_test)(int, int, struct shmid_ds *);
+typedef int (*shmctl_test) (int, int, struct shmid_ds *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	shmctl_test dummyvar;
 	dummyvar = shmctl;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/1-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/1-1-buildonly.c
index 90ad263..5df991f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/1-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/1-1-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test the existence of the time.h file and that it can be
-  included.
-  */
+   Test the existence of the time.h file and that it can be
+   included.
+   */
 
 #include <time.h>
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/10-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/10-1-buildonly.c
index 40b521f..bb4d3c3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/10-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/10-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    clock_t clock(void);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef clock_t (*clock_test)(void);
+typedef clock_t(*clock_test) (void);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_test dummyvar;
 	dummyvar = clock;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/11-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/11-1-buildonly.c
index d2be37a..ebe1981 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/11-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/11-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:CPT
-  Test that the function:
+   @pt:CPT
+   Test that the function:
    int clock_getcpuclockid(pid_t, clockid_t *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*clock_getcpuclockid_test)(pid_t, clockid_t *);
+typedef int (*clock_getcpuclockid_test) (pid_t, clockid_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_getcpuclockid_test dummyvar;
 	dummyvar = clock_getcpuclockid;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/12-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/12-1-buildonly.c
index 14a879c..1637c90 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/12-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/12-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  Test that the function:
+   @pt:TMR
+   Test that the function:
    int clock_getres(clockid_t, struct timespec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*clock_getres_test)(clockid_t, struct timespec *);
+typedef int (*clock_getres_test) (clockid_t, struct timespec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_getres_test dummyvar;
 	dummyvar = clock_getres;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/13-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/13-1-buildonly.c
index a678e40..e56937c 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/13-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/13-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  Test that the function:
+   @pt:TMR
+   Test that the function:
    int clock_gettime(clockid_t, struct timespec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*clock_gettime_test)(clockid_t, struct timespec *);
+typedef int (*clock_gettime_test) (clockid_t, struct timespec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_gettime_test dummyvar;
 	dummyvar = clock_gettime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/14-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/14-1-buildonly.c
index 487aaa0..5127c6e 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/14-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/14-1-buildonly.c
@@ -1,23 +1,23 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:CS
-  Test that the function:
+   @pt:CS
+   Test that the function:
    int clock_nanosleep(clockid_t, int, const struct timespec *,
-    struct timespec *);
-  is declared.
-  */
+   struct timespec *);
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*clock_nanosleep_test)(clockid_t, int, const struct timespec *,
-    struct timespec *);
+typedef int (*clock_nanosleep_test) (clockid_t, int, const struct timespec *,
+				     struct timespec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_nanosleep_test dummyvar;
 	dummyvar = clock_nanosleep;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/15-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/15-1-buildonly.c
index 00f5049..5cb0d84 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/15-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/15-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  Test that the function:
+   @pt:TMR
+   Test that the function:
    int clock_settime(clockid_t, const struct timespec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*clock_settime_test)(clockid_t, const struct timespec *);
+typedef int (*clock_settime_test) (clockid_t, const struct timespec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	clock_settime_test dummyvar;
 	dummyvar = clock_settime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/16-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/16-1-buildonly.c
index 2cd747a..095dd31 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/16-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/16-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
-    char *ctime(const time_t *);
-  is declared.
-  */
+   Test that the function:
+   char *ctime(const time_t *);
+   is declared.
+   */
 
 #include <time.h>
 
-typedef char *(*ctime_test)(const time_t *);
+typedef char *(*ctime_test) (const time_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	ctime_test dummyvar;
 	dummyvar = ctime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/17-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/17-1-buildonly.c
index b298a0b..a0aff02 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/17-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/17-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TSF
-  Test that the function:
+   @pt:TSF
+   Test that the function:
    char *ctime_r(const time_t *, char *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef char *(*ctime_r_test)(const time_t *, char *);
+typedef char *(*ctime_r_test) (const time_t *, char *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	ctime_r_test dummyvar;
 	dummyvar = ctime_r;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/18-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/18-1-buildonly.c
index 28926f8..fe4b7ea 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/18-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/18-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    double difftime(time_t, time_t);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef double (*difftime_test)(time_t, time_t);
+typedef double (*difftime_test) (time_t, time_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	difftime_test dummyvar;
 	dummyvar = difftime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/19-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/19-1-buildonly.c
index d1e78b0..2be4dc7 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/19-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/19-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:XSI
-  Test that the function:
+   @pt:XSI
+   Test that the function:
    struct tm *getdate(const char *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef struct tm *(*getdate_test)(const char *);
+typedef struct tm *(*getdate_test) (const char *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	getdate_test dummyvar;
 	dummyvar = getdate;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/20-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/20-1-buildonly.c
index 64f6c55..e3f5538 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/20-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/20-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    struct tm *gmtime(const time_t *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef struct tm *(*gmtime_test)(const time_t *);
+typedef struct tm *(*gmtime_test) (const time_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	gmtime_test dummyvar;
 	dummyvar = gmtime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/21-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/21-1-buildonly.c
index 2653510..5a7a79b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/21-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/21-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TSF
-  Test that the function:
+   Test that the function:
    struct tm *gmtime_r(const time_t *, struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef struct tm *(*gmtime_r_test)(const time_t *, struct tm *);
+typedef struct tm *(*gmtime_r_test) (const time_t *, struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	gmtime_r_test dummyvar;
 	dummyvar = gmtime_r;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/22-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/22-1-buildonly.c
index 2a9d051..112db67 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/22-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/22-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    struct tm *localtime(const time_t *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef struct tm *(*localtime_test)(const time_t *);
+typedef struct tm *(*localtime_test) (const time_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	localtime_test dummyvar;
 	dummyvar = localtime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/23-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/23-1-buildonly.c
index 7bfc1eb..9ac7a20 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/23-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/23-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TSF
-  Test that the function:
+   Test that the function:
    struct tm *localtime_r(const time_t *, struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef struct tm *(*localtime_r_test)(const time_t *, struct tm *);
+typedef struct tm *(*localtime_r_test) (const time_t *, struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	localtime_r_test dummyvar;
 	dummyvar = localtime_r;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/24-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/24-1-buildonly.c
index 578f890..693ae8b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/24-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/24-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    time_t mktime(struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef time_t (*mktime_test)(struct tm *);
+typedef time_t(*mktime_test) (struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	mktime_test dummyvar;
 	dummyvar = mktime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/25-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/25-1-buildonly.c
index 0ae3a7e..cf8cc25 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/25-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/25-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int nanosleep(const struct timespec *, struct timespec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*nanosleep_test)(const struct timespec *, struct timespec *);
+typedef int (*nanosleep_test) (const struct timespec *, struct timespec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	nanosleep_test dummyvar;
 	dummyvar = nanosleep;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/26-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/26-1-buildonly.c
index 2b6a5e4..9e95ab3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/26-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/26-1-buildonly.c
@@ -1,20 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    size_t strftime(char *, size_t, const char *, const struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef size_t (*strftime_test)(char *, size_t, const char *, const struct tm *);
+typedef size_t(*strftime_test) (char *, size_t, const char *,
+				const struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	strftime_test dummyvar;
 	dummyvar = strftime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/27-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/27-1-buildonly.c
index 50b84f8..7a0642f 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/27-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/27-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:XSI
-  Test that the function:
+   Test that the function:
    char *strptime(const char *, const char *, struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef char *(*strptime_test)(const char *, const char *, struct tm *);
+typedef char *(*strptime_test) (const char *, const char *, struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	strptime_test dummyvar;
 	dummyvar = strptime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/28-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/28-1-buildonly.c
index 88a411b..33fd1a3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/28-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/28-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    time_t time(time_t *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef time_t (*time_test)(time_t *);
+typedef time_t(*time_test) (time_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	time_test dummyvar;
 	dummyvar = time;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/29-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/29-1-buildonly.c
index 9cb47a4..03bef09 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/29-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/29-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int timer_create(clockid_t, struct sigevent *, timer_t *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*timer_create_test)(clockid_t, struct sigevent *, timer_t *);
+typedef int (*timer_create_test) (clockid_t, struct sigevent *, timer_t *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	timer_create_test dummyvar;
 	dummyvar = timer_create;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-1-buildonly.c
index 0e4cac2..e5958ad 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-1-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that NULL is defined
-  */
+   Test that NULL is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-2-buildonly.c
index b365846..b1496ac 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-2-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that CLOCKS_PER_SEC is defined
-  */
+   Test that CLOCKS_PER_SEC is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-3-buildonly.c
index d392137..1eec62d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-3-buildonly.c
@@ -1,14 +1,14 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  @pt:CPT
-  Test that CLOCK_PROCESS_CPUTIME_ID is defined
-  */
+   @pt:TMR
+   @pt:CPT
+   Test that CLOCK_PROCESS_CPUTIME_ID is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-4-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-4-buildonly.c
index 3726afc..1cd8524 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/3-4-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/3-4-buildonly.c
@@ -1,14 +1,14 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  @pt:TCT
-  Test that CLOCK_THREAD_CPUTIME_ID is defined
-  */
+   @pt:TMR
+   @pt:TCT
+   Test that CLOCK_THREAD_CPUTIME_ID is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/30-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/30-1-buildonly.c
index e298220..b73c75b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/30-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/30-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int timer_delete(timer_t);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*timer_delete_test)(timer_t);
+typedef int (*timer_delete_test) (timer_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	timer_delete_test dummyvar;
 	dummyvar = timer_delete;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/31-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/31-1-buildonly.c
index fd1cfb8..9adeb47 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/31-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/31-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int timer_gettime(timer_t, struct itimerspec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*timer_gettime_test)(timer_t, struct itimerspec *);
+typedef int (*timer_gettime_test) (timer_t, struct itimerspec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	timer_gettime_test dummyvar;
 	dummyvar = timer_gettime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/32-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/32-1-buildonly.c
index 919499c..afdb637 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/32-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/32-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int timer_getoverrun(timer_t);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*timer_getoverrun_test)(timer_t);
+typedef int (*timer_getoverrun_test) (timer_t);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	timer_getoverrun_test dummyvar;
 	dummyvar = timer_getoverrun;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/33-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/33-1-buildonly.c
index db29f7f..a0ff2f5 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/33-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/33-1-buildonly.c
@@ -1,23 +1,23 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:TMR
-  Test that the function:
+   Test that the function:
    int timer_settime(timer_t, int, const struct itimerspec *,
    struct itimerspec *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef int (*timer_settime_test)(timer_t, int, const struct itimerspec *,
-   struct itimerspec *);
+typedef int (*timer_settime_test) (timer_t, int, const struct itimerspec *,
+				   struct itimerspec *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	timer_settime_test dummyvar;
 	dummyvar = timer_settime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/34-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/34-1-buildonly.c
index 839140d..33a350d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/34-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/34-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    void tzset(void);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef void (*tzset_test)(void);
+typedef void (*tzset_test) (void);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	tzset_test dummyvar;
 	dummyvar = tzset;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-1-buildonly.c
index f85a42c..f651027 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-1-buildonly.c
@@ -1,17 +1,17 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:XSI
-  Test that daylight is declared.
-  */
+   Test that daylight is declared.
+   */
 
 #include <time.h>
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	int dummy;
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-2-buildonly.c
index bd3f8f2..bdf0734 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-2-buildonly.c
@@ -1,16 +1,16 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that timezone is declared.
-  */
+   Test that timezone is declared.
+   */
 
 #include <time.h>
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	long dummy;
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-3-buildonly.c
index d2bd943..1cd37d1 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/35-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/35-3-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
    @pt:CX
-  Test that tzname is declared.
-  */
+   Test that tzname is declared.
+   */
 
 #include <time.h>
 #include <string.h>
 /* Include for printf */
 #include <stdio.h>
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
-	printf("%s\n",tzname[0]);
+	printf("%s\n", tzname[0]);
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-1-buildonly.c
index 982680e..115c6ee 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-1-buildonly.c
@@ -1,13 +1,13 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  Test that CLOCK_REALTIME is defined
-  */
+   @pt:TMR
+   Test that CLOCK_REALTIME is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-2-buildonly.c
index da38de7..3b5413b 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-2-buildonly.c
@@ -1,13 +1,13 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  Test that TIMER_ABSTIME is defined
-  */
+   @pt:TMR
+   Test that TIMER_ABSTIME is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-3-buildonly.c
index 6a6ba08..3afefa3 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/6-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/6-3-buildonly.c
@@ -1,14 +1,14 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TMR
-  @pt:MON
-  Test that CLOCK_MONOTONIC is defined
-  */
+   @pt:TMR
+   @pt:MON
+   Test that CLOCK_MONOTONIC is defined
+   */
 
 #include <time.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-1-buildonly.c
index 20efd0c..77e6d50 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-1-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that clock_t is defined.
-  */
+   Test that clock_t is defined.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-2-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-2-buildonly.c
index 641610c..b916e53 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-2-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-2-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that size_t is defined.
-  */
+   Test that size_t is defined.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-3-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-3-buildonly.c
index f8c4e01..2492f1d 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-3-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-3-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that time_t is defined.
-  */
+   Test that time_t is defined.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-4-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-4-buildonly.c
index 7e03ac5..b307337 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-4-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-4-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that clockid_t is defined.
-  */
+   Test that clockid_t is defined.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-5-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-5-buildonly.c
index 27f5a2f..b4fef66 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/7-5-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/7-5-buildonly.c
@@ -1,12 +1,12 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that timer_t is defined.
-  */
+   Test that timer_t is defined.
+   */
 
 #include <sys/types.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/8-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/8-1-buildonly.c
index d51df9d..abb7bf2 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/8-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/8-1-buildonly.c
@@ -1,20 +1,20 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test that the function:
+   Test that the function:
    char *asctime(const struct tm *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef char *(*asctime_test)(const struct tm *);
+typedef char *(*asctime_test) (const struct tm *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	asctime_test dummyvar;
 	dummyvar = asctime;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/time_h/9-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/time_h/9-1-buildonly.c
index ca1a219..dd9b3c8 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/time_h/9-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/time_h/9-1-buildonly.c
@@ -1,21 +1,21 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  @pt:TSF
-  Test that the function:
+   @pt:TSF
+   Test that the function:
    char *asctime_r(const struct tm *, char *);
-  is declared.
-  */
+   is declared.
+   */
 
 #include <time.h>
 
-typedef char *(*asctime_r_test)(const struct tm *, char *);
+typedef char *(*asctime_r_test) (const struct tm *, char *);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	asctime_r_test dummyvar;
 	dummyvar = asctime_r;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/unistd_h/1-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/unistd_h/1-1-buildonly.c
index 3a48153..44721ea 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/unistd_h/1-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/unistd_h/1-1-buildonly.c
@@ -1,19 +1,19 @@
   /*
- * Copyright (c) 2003, Intel Corporation. All rights reserved.
- * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
- *
- * Test that the function below is defined:
- * int fsync(int fildes);
- */
+   * Copyright (c) 2003, Intel Corporation. All rights reserved.
+   * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
+   *
+   * Test that the function below is defined:
+   * int fsync(int fildes);
+   */
 
 #include <unistd.h>
 
-typedef int (*fsync_test)(int fildes);
+typedef int (*fsync_test) (int fildes);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	fsync_test dummyvar;
 	dummyvar = fsync;
diff --git a/testcases/open_posix_testsuite/conformance/definitions/unistd_h/2-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/unistd_h/2-1-buildonly.c
index 6e20038..0c57736 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/unistd_h/2-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/unistd_h/2-1-buildonly.c
@@ -14,9 +14,9 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-typedef int (*ftruncate_test)(int fildes, off_t length);
+typedef int (*ftruncate_test) (int fildes, off_t length);
 
-int dummyfcn (void)
+int dummyfcn(void)
 {
 	ftruncate_test dummyvar;
 	dummyvar = ftruncate;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
index 8bc91e7..c323291 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c
@@ -29,9 +29,10 @@
 	struct tm time_ptr;
 
 	char expected[26];
-	char* real;
+	char *real;
 
-	char wday_name[7][3] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+	char wday_name[7][3] =
+	    { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
 
 	char mon_name[12][3] = {
 		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
@@ -49,19 +50,18 @@
 	real = asctime(&time_ptr);
 
 	sprintf(expected, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
-	        wday_name[time_ptr.tm_wday],
-	        mon_name[time_ptr.tm_mon],
-	        time_ptr.tm_mday, time_ptr.tm_hour,
-	        time_ptr.tm_min, time_ptr.tm_sec,
-	        1900 + time_ptr.tm_year);
+		wday_name[time_ptr.tm_wday],
+		mon_name[time_ptr.tm_mon],
+		time_ptr.tm_mday, time_ptr.tm_hour,
+		time_ptr.tm_min, time_ptr.tm_sec, 1900 + time_ptr.tm_year);
 
 	printf("real = %s\n", real);
 	printf("expected = %s\n", expected);
 
 	if (strcmp(real, expected) != 0) {
 		perror("asctime did not return the correct value\n");
-	        printf("Got %s\n", real);
-	        printf("Expected %s\n", expected);
+		printf("Got %s\n", real);
+		printf("Expected %s\n", expected);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock/1-1.c
index bc397e7..586bd37 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock/1-1.c
@@ -27,16 +27,15 @@
 	int i;
 
 	c1 = clock();
-	sec1 = c1/CLOCKS_PER_SEC;
+	sec1 = c1 / CLOCKS_PER_SEC;
 
-	for (i = 0; i < LARGENUMBER; i++)
-	{
+	for (i = 0; i < LARGENUMBER; i++) {
 		// keep busy so CPU time increases
 		clock();
 	}
 
 	c2 = clock();
-	sec2 = c2/CLOCKS_PER_SEC;
+	sec2 = c2 / CLOCKS_PER_SEC;
 
 	if (sec2 > sec1) {
 		printf("Times T1=%.2f, T2=%.2f\n", sec1, sec2);
@@ -45,15 +44,15 @@
 	} else {
 		if (sec2 < sec1) {
 			/*
-		 	* probably wrapping happened; however, since
-		 	* we do not know the wrap value, results are
-		 	* undefined
-		 	*/
+			 * probably wrapping happened; however, since
+			 * we do not know the wrap value, results are
+			 * undefined
+			 */
 			printf("TEST AGAIN:  Times probably wrapped\n");
 			return PTS_UNRESOLVED;
 		} else {
 			printf("Error with processor times T1=%.2f, T2=%.2f\n",
-					sec1, sec2);
+			       sec1, sec2);
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock/2-1.c
index 5331a7e..c172513 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock/2-1.c
@@ -23,14 +23,14 @@
 
 int main(int argc, char *argv[])
 {
-	intmax_t clocks_per_sec = (intmax_t)CLOCKS_PER_SEC;
+	intmax_t clocks_per_sec = (intmax_t) CLOCKS_PER_SEC;
 
 	if (EXPECTEDVALUE == CLOCKS_PER_SEC) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  %" PRIdMAX " != %" PRIdMAX "\n",
-				clocks_per_sec, EXPECTEDVALUE);
+		       clocks_per_sec, EXPECTEDVALUE);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-1.c
index 7c86677..31e3369 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-1.c
@@ -25,7 +25,7 @@
 void dosomething()
 {
 	int i;
-	for (i=0; i < LARGENUMBER; i++) {
+	for (i = 0; i < LARGENUMBER; i++) {
 		clock();
 	}
 }
@@ -33,8 +33,8 @@
 int main(int argc, char *argv[])
 {
 #if !defined(_POSIX_CPUTIME) || _POSIX_CPUTIME == -1
-        printf("_POSIX_CPUTIME unsupported\n");
-        return PTS_UNSUPPORTED;
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
 #else
 	struct timespec tp1;
 	clockid_t clockid;
@@ -56,7 +56,9 @@
 	 * functions
 	 */
 	if (clock_gettime(clockid, &tp1) != 0) {
-		printf("clock_getcpuclockid() returned an invalid clockid_t: %d\n", clockid);
+		printf
+		    ("clock_getcpuclockid() returned an invalid clockid_t: %d\n",
+		     clockid);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-2.c
index a172264..527a4d2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/1-2.c
@@ -24,8 +24,8 @@
 int main(int argc, char *argv[])
 {
 #if !defined(_POSIX_CPUTIME) || _POSIX_CPUTIME == -1
-        printf("_POSIX_CPUTIME unsupported\n");
-        return PTS_UNSUPPORTED;
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
 #else
 	struct timespec tp1;
 	clockid_t clockid;
@@ -48,7 +48,7 @@
 	 */
 	if (clock_gettime(clockid, &tp1) != 0) {
 		printf("clock_getcpuclockid() returned an invalid clockid_t: "
-		    "%d\n", clockid);
+		       "%d\n", clockid);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/2-1.c
index 05f2596..1d02fb1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/2-1.c
@@ -23,8 +23,8 @@
 int main(int argc, char *argv[])
 {
 #if !defined(_POSIX_CPUTIME) || _POSIX_CPUTIME == -1
-        printf("_POSIX_CPUTIME unsupported\n");
-        return PTS_UNSUPPORTED;
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
 #else
 	unsigned long time_to_set;
 	clockid_t clockid_1, clockid_2;
@@ -67,8 +67,8 @@
 		return PTS_FAIL;
 	}
 
-	if (timespec_nsec_diff(&t1, &t2) > NSEC_IN_SEC/2 ||
-	    timespec_nsec_diff(&t2, &t3) > NSEC_IN_SEC/2) {
+	if (timespec_nsec_diff(&t1, &t2) > NSEC_IN_SEC / 2 ||
+	    timespec_nsec_diff(&t2, &t3) > NSEC_IN_SEC / 2) {
 		printf("reported times differ too much\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c
index 175d126..c05edd3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c
@@ -21,8 +21,8 @@
 int main(int argc, char *argv[])
 {
 #if !defined(_POSIX_CPUTIME) || _POSIX_CPUTIME == -1
-        printf("_POSIX_CPUTIME unsupported\n");
-        return PTS_UNSUPPORTED;
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
 #else
 	clockid_t clockid_1;
 	int error;
@@ -56,7 +56,7 @@
 		return PTS_UNRESOLVED;
 	} else if (error != EPERM) {
 		printf("clock_getcpuclockid(1, ..) failed with an improper "
-			"error (%d != %d)\n", EPERM, error);
+		       "error (%d != %d)\n", EPERM, error);
 		return PTS_UNRESOLVED;
 	}
 	printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/6-1.c
index e400f57..be5025b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/6-1.c
@@ -19,8 +19,8 @@
 int main(int argc, char *argv[])
 {
 #if !defined(_POSIX_CPUTIME) || _POSIX_CPUTIME == -1
-        printf("_POSIX_CPUTIME unsupported\n");
-        return PTS_UNSUPPORTED;
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
 #else
 	clockid_t clockid_1;
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/1-1.c
index cd6f137..8f4fa30 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/1-1.c
@@ -24,11 +24,10 @@
 	res.tv_sec = LARGENUM;
 	res.tv_nsec = LARGENUM;
 	if (clock_getres(CLOCK_REALTIME, &res) == 0) {
-		if (res.tv_sec != LARGENUM) { //assume initialized
+		if (res.tv_sec != LARGENUM) {	//assume initialized
 #ifdef DEBUG
 			printf("Resolution is %d sec %d nsec\n",
-					(int) res.tv_sec,
-					(int) res.tv_nsec);
+			       (int)res.tv_sec, (int)res.tv_nsec);
 #endif
 			printf("Test PASSED\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/3-1.c
index b5af326..ea0dc3a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/3-1.c
@@ -20,29 +20,28 @@
 #ifdef CLOCK_MONOTONIC
 	struct timespec res;
 
-        /* Initialize res to a number much larger than the resolution
-         * could possibly be
-         */
-        res.tv_sec = LARGENUM;
-        res.tv_nsec = LARGENUM;
-        if (clock_getres(CLOCK_MONOTONIC, &res) == 0) {
-                if (res.tv_sec != LARGENUM) { //assume initialized
+	/* Initialize res to a number much larger than the resolution
+	 * could possibly be
+	 */
+	res.tv_sec = LARGENUM;
+	res.tv_nsec = LARGENUM;
+	if (clock_getres(CLOCK_MONOTONIC, &res) == 0) {
+		if (res.tv_sec != LARGENUM) {	//assume initialized
 #ifdef DEBUG
-                        printf("Resolution is %d sec %d nsec\n",
-                                        (int) res.tv_sec,
-                                        (int) res.tv_nsec);
+			printf("Resolution is %d sec %d nsec\n",
+			       (int)res.tv_sec, (int)res.tv_nsec);
 #endif
-                        printf("Test PASSED\n");
-                        return PTS_PASS;
-                } else {
-                        printf("clock_getres() success, but res not filled\n");
-                }
-        } else {
-                printf("clock_getres() failed\n");
-        }
+			printf("Test PASSED\n");
+			return PTS_PASS;
+		} else {
+			printf("clock_getres() success, but res not filled\n");
+		}
+	} else {
+		printf("clock_getres() failed\n");
+	}
 
-        printf("Test FAILED\n");
-        return PTS_FAIL;
+	printf("Test FAILED\n");
+	return PTS_FAIL;
 #else
 	printf("CLOCK_MONOTONIC unsupported\n");
 	return PTS_UNSUPPORTED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
index 2cae63a..210f1a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
@@ -33,7 +33,8 @@
 	struct timespec res;
 	int invalid_tests[NUMINVALIDTESTS] = {
 		INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
-		1073743192, -1, 17};
+		1073743192, -1, 17
+	};
 	int i;
 	int failure = 0;
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/7-1.c
index 01952dd..b024a76 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/7-1.c
@@ -32,11 +32,10 @@
 	res.tv_sec = LARGENUM;
 	res.tv_nsec = LARGENUM;
 	if (clock_getres(CLOCK_PROCESS_CPUTIME_ID, &res) == 0) {
-		if (res.tv_sec != LARGENUM) { //assume initialized
+		if (res.tv_sec != LARGENUM) {	//assume initialized
 #ifdef DEBUG
 			printf("Resolution is %d sec %d nsec\n",
-					(int) res.tv_sec,
-					(int) res.tv_nsec);
+			       (int)res.tv_sec, (int)res.tv_nsec);
 #endif
 			printf("Test PASSED\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/8-1.c
index f1e6657..b117925 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/8-1.c
@@ -32,11 +32,10 @@
 	res.tv_sec = LARGENUM;
 	res.tv_nsec = LARGENUM;
 	if (clock_getres(CLOCK_THREAD_CPUTIME_ID, &res) == 0) {
-		if (res.tv_sec != LARGENUM) { //assume initialized
+		if (res.tv_sec != LARGENUM) {	//assume initialized
 #ifdef DEBUG
 			printf("Resolution is %d sec %d nsec\n",
-					(int) res.tv_sec,
-					(int) res.tv_nsec);
+			       (int)res.tv_sec, (int)res.tv_nsec);
 #endif
 			printf("Test PASSED\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-1.c
index 802c916..302f0f9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-1.c
@@ -20,7 +20,7 @@
 	tp.tv_sec = 0;
 	tp.tv_nsec = 0;
 	if (clock_gettime(CLOCK_REALTIME, &tp) == 0) {
-		if (0 != tp.tv_sec) { //assume this means time was sent
+		if (0 != tp.tv_sec) {	//assume this means time was sent
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-2.c
index 99af3c7..4240266 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/1-2.c
@@ -28,15 +28,15 @@
 
 	if (clock_gettime(CLOCK_REALTIME, &tpundertest) == 0) {
 		if (gettimeofday(&tvstandard, NULL) == 0) {
-			delta = (int) tvstandard.tv_sec -
-				(int) tpundertest.tv_sec;
+			delta = (int)tvstandard.tv_sec -
+			    (int)tpundertest.tv_sec;
 			if (abs(delta) <= ACCEPTABLEDELTA) {
 				printf("Test PASSED\n");
 				return PTS_PASS;
 			} else {
 				printf("FAIL:  expected %d, received %d\n",
-					(int) tvstandard.tv_sec,
-					(int) tpundertest.tv_sec);
+				       (int)tvstandard.tv_sec,
+				       (int)tpundertest.tv_sec);
 				return PTS_FAIL;
 			}
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/2-1.c
index e907228..be82875 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/2-1.c
@@ -28,15 +28,15 @@
 
 	if (clock_gettime(CLOCK_REALTIME, &tpundertest) == 0) {
 		if (gettimeofday(&tvstandard, NULL) == 0) {
-			delta = (int) tvstandard.tv_sec -
-				(int) tpundertest.tv_sec;
+			delta = (int)tvstandard.tv_sec -
+			    (int)tpundertest.tv_sec;
 			if (abs(delta) <= ACCEPTABLEDELTA) {
 				printf("Test PASSED\n");
 				return PTS_PASS;
 			} else {
 				printf("FAIL:  expected %d, received %d\n",
-					(int) tvstandard.tv_sec,
-					(int) tpundertest.tv_sec);
+				       (int)tvstandard.tv_sec,
+				       (int)tpundertest.tv_sec);
 				return PTS_FAIL;
 			}
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/3-1.c
index e147bd1..3ee1c6d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/3-1.c
@@ -23,9 +23,8 @@
 	struct timespec ts1, ts2, ts3, ts4;
 
 	/* Test that MONOTONIC CLOCK functionality really exists */
-	if (sysconf(_SC_MONOTONIC_CLOCK) == -1)
-	{
-	 	printf("CLOCK_MONOTONIC unsupported\n");
+	if (sysconf(_SC_MONOTONIC_CLOCK) == -1) {
+		printf("CLOCK_MONOTONIC unsupported\n");
 		return PTS_UNSUPPORTED;
 	}
 
@@ -53,14 +52,12 @@
 	}
 
 	if ((ts1.tv_sec <= ts2.tv_sec) &&
-		(ts2.tv_sec <= ts3.tv_sec) &&
-		(ts3.tv_sec <= ts4.tv_sec)) {
+	    (ts2.tv_sec <= ts3.tv_sec) && (ts3.tv_sec <= ts4.tv_sec)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED - ts1=%ld,ts2=%ld,ts3=%ld,ts4=%ld\n",
-				ts1.tv_sec, ts2.tv_sec, ts3.tv_sec,
-				ts4.tv_sec);
+		       ts1.tv_sec, ts2.tv_sec, ts3.tv_sec, ts4.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/4-1.c
index e7af9a8..1614e6f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/4-1.c
@@ -21,10 +21,10 @@
 #define LARGENUMBER 900000
 void dosomething()
 {
-        int i;
-        for (i=0; i < LARGENUMBER; i++) {
-                clock();
-        }
+	int i;
+	for (i = 0; i < LARGENUMBER; i++) {
+		clock();
+	}
 }
 
 int main(int argc, char *argv[])
@@ -68,14 +68,12 @@
 	}
 
 	if ((ts1.tv_sec <= ts2.tv_sec) &&
-		(ts2.tv_sec <= ts3.tv_sec) &&
-		(ts3.tv_sec <= ts4.tv_sec)) {
+	    (ts2.tv_sec <= ts3.tv_sec) && (ts3.tv_sec <= ts4.tv_sec)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED - ts1=%ld,ts2=%ld,ts3=%ld,ts4=%ld\n",
-				ts1.tv_sec, ts2.tv_sec, ts3.tv_sec,
-				ts4.tv_sec);
+		       ts1.tv_sec, ts2.tv_sec, ts3.tv_sec, ts4.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/8-2.c
index 97d63a2..77e92fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_gettime/8-2.c
@@ -26,8 +26,8 @@
 #define NUMINVALIDTESTS 8
 
 static int invalid_tests[NUMINVALIDTESTS] = {
-		INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
-		1073743192, -1, 17
+	INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
+	1073743192, -1, 17
 };
 
 int main(int argc, char *argv[])
@@ -39,7 +39,7 @@
 	for (i = 0; i < NUMINVALIDTESTS; i++) {
 		if (clock_gettime(invalid_tests[i], &tp) == 0) {
 			printf("failure: clock_gettime() using %d succeeded\n",
-					invalid_tests[i]);
+			       invalid_tests[i]);
 			failure = 1;
 		} else {
 			if (EINVAL != errno) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-1.c
index 64d829f..330a2bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-1.c
@@ -18,15 +18,15 @@
 int main(int argc, char *argv[])
 {
 	struct timespec tssleep, tsbefore, tsafter;
-	int slepts=0,sleptns=0;
+	int slepts = 0, sleptns = 0;
 
 	if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) {
 		perror("clock_gettime() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 
-	tssleep.tv_sec=0;
-	tssleep.tv_nsec=SLEEPNSEC;
+	tssleep.tv_sec = 0;
+	tssleep.tv_nsec = SLEEPNSEC;
 	if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) != 0) {
 		printf("clock_nanosleep() did not return success\n");
 		return PTS_UNRESOLVED;
@@ -40,11 +40,11 @@
 	/*
 	 * Generic alg for calculating slept time.
 	 */
-	slepts=tsafter.tv_sec-tsbefore.tv_sec;
-	sleptns=tsafter.tv_nsec-tsbefore.tv_nsec;
+	slepts = tsafter.tv_sec - tsbefore.tv_sec;
+	sleptns = tsafter.tv_nsec - tsbefore.tv_nsec;
 	if (sleptns < 0) {
-		sleptns = sleptns+1000000000;
-		slepts = slepts-1;
+		sleptns = sleptns + 1000000000;
+		slepts = slepts - 1;
 	}
 
 	if ((slepts > 0) || (sleptns > SLEEPNSEC)) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-3.c
index c5dd6d0..1378ecf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-3.c
@@ -44,8 +44,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) != 0) {
 			perror("sigemptyset() did not return success\n");
 			return PTS_UNRESOLVED;
@@ -54,8 +54,8 @@
 			perror("sigaction() did not return success\n");
 			return PTS_UNRESOLVED;
 		}
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL);
 	} else {
 		/* parent here */
@@ -81,13 +81,13 @@
 		 * pass if we slept for less than the (large) sleep time
 		 * allotted
 		 */
-		if ((tsafter.tv_sec-tsbefore.tv_sec) < SLEEPSEC) {
+		if ((tsafter.tv_sec - tsbefore.tv_sec) < SLEEPSEC) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-				(int)tsafter.tv_sec-(int)tsbefore.tv_sec,
-				SLEEPSEC);
+			       (int)tsafter.tv_sec - (int)tsbefore.tv_sec,
+			       SLEEPSEC);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-4.c
index 6684ee1..bd5dea7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-4.c
@@ -29,8 +29,8 @@
 
 	if ((pid = fork()) == 0) {
 		/* child here */
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL);
 	} else {
 		/* parent here */
@@ -56,13 +56,13 @@
 		 * pass if we slept for less than the (large) sleep time
 		 * allotted
 		 */
-		if ((tsafter.tv_sec-tsbefore.tv_sec) < SLEEPSEC) {
+		if ((tsafter.tv_sec - tsbefore.tv_sec) < SLEEPSEC) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-				(int)tsafter.tv_sec-(int)tsbefore.tv_sec,
-				SLEEPSEC);
+			       (int)tsafter.tv_sec - (int)tsbefore.tv_sec,
+			       SLEEPSEC);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-5.c
index 58a6c0a..02ce7be 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-5.c
@@ -38,8 +38,8 @@
 		/* child here */
 		struct timespec tssleep;
 
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) == 0) {
 			printf("clock_nanosleep() returned success\n");
 			return CHILDPASS;
@@ -79,11 +79,11 @@
 			return PTS_UNRESOLVED;
 		}
 
-		slepts=tsafter.tv_sec-tsbefore.tv_sec;
+		slepts = tsafter.tv_sec - tsbefore.tv_sec;
 
 #ifdef DEBUG
-		printf("Start %d sec; End %d sec\n", (int) tsbefore.tv_sec,
-				(int) tsafter.tv_sec);
+		printf("Start %d sec; End %d sec\n", (int)tsbefore.tv_sec,
+		       (int)tsafter.tv_sec);
 #endif
 		if (slepts >= SLEEPSEC) {
 			printf("Test PASSED\n");
@@ -93,7 +93,7 @@
 			return PTS_FAIL;
 		}
 
-	} //end fork
+	}			//end fork
 
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/10-1.c
index ec1ffa3..d6c9ec0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/10-1.c
@@ -35,8 +35,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) != 0) {
 			perror("sigemptyset() did not return success\n");
 			return CHILDFAIL;
@@ -45,13 +45,13 @@
 			perror("sigaction() did not return success\n");
 			return CHILDFAIL;
 		}
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) == EINTR) {
-				return CHILDPASS;
+			return CHILDPASS;
 		} else {
-				printf("errno != EINTR\n");
-				return CHILDFAIL;
+			printf("errno != EINTR\n");
+			return CHILDFAIL;
 		}
 	} else {
 		/* parent here */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/11-1.c
index 64f6c9b..b15c3df 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/11-1.c
@@ -34,13 +34,13 @@
 	int i;
 	int failure = 0;
 
-	tssleep.tv_sec=0;
+	tssleep.tv_sec = 0;
 
-	for (i=0; i<NUMINVALIDTESTS;i++) {
-		tssleep.tv_nsec=invalid_tests[i];
+	for (i = 0; i < NUMINVALIDTESTS; i++) {
+		tssleep.tv_nsec = invalid_tests[i];
 		printf("sleep %d\n", invalid_tests[i]);
 		if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) !=
-			EINVAL) {
+		    EINVAL) {
 			printf("errno != EINVAL\n");
 			failure = 1;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/13-1.c
index 0fae26c..8b98cae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/13-1.c
@@ -21,8 +21,8 @@
 {
 	struct timespec tssleep;
 
-	tssleep.tv_sec=SLEEPSEC;
-	tssleep.tv_nsec=0;
+	tssleep.tv_sec = SLEEPSEC;
+	tssleep.tv_nsec = 0;
 
 	if (clock_nanosleep(BOGUSCLOCKID, 0, &tssleep, NULL) == EINVAL) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-1.c
index a055765..9fab5f0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-1.c
@@ -47,7 +47,7 @@
 	}
 
 	if (tsafter.tv_sec >= sleepuntilsec) {
-		if (tsafter.tv_sec <= (sleepuntilsec+ACCEPTABLEDELTA)) {
+		if (tsafter.tv_sec <= (sleepuntilsec + ACCEPTABLEDELTA)) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-2.c
index 519a68b..05c5d32 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-2.c
@@ -48,8 +48,8 @@
 		/* child here */
 		int flags = 0;
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) != 0) {
 			perror("sigemptyset() did not return success\n");
 			return PTS_UNRESOLVED;
@@ -59,8 +59,8 @@
 			return PTS_UNRESOLVED;
 		}
 
-		tssleep.tv_sec=sleepuntilsec;
-		tssleep.tv_nsec=tsbefore.tv_nsec;
+		tssleep.tv_sec = sleepuntilsec;
+		tssleep.tv_nsec = tsbefore.tv_nsec;
 
 		flags |= TIMER_ABSTIME;
 		clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL);
@@ -94,8 +94,7 @@
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-					(int) tsafter.tv_sec,
-					sleepuntilsec);
+			       (int)tsafter.tv_sec, sleepuntilsec);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-3.c
index d47ff42..99e4491 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-3.c
@@ -35,8 +35,8 @@
 		int flags = 0;
 
 		/* child here */
-		tssleep.tv_sec=sleepuntilsec;
-		tssleep.tv_nsec=tsbefore.tv_nsec;
+		tssleep.tv_sec = sleepuntilsec;
+		tssleep.tv_nsec = tsbefore.tv_nsec;
 
 		flags |= TIMER_ABSTIME;
 		clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL);
@@ -69,8 +69,7 @@
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-				(int)tsafter.tv_sec,
-				sleepuntilsec);
+			       (int)tsafter.tv_sec, sleepuntilsec);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/3-1.c
index a0caa97..3479d34 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/3-1.c
@@ -48,7 +48,7 @@
 	}
 
 	if (tsafter.tv_sec >= tsbefore.tv_sec) {
-		if (tsafter.tv_sec <= (tsbefore.tv_sec+ACCEPTABLEDELTA)) {
+		if (tsafter.tv_sec <= (tsbefore.tv_sec + ACCEPTABLEDELTA)) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/9-1.c
index c948a1d..771c44c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/9-1.c
@@ -45,8 +45,8 @@
 		/* child here */
 		int sleptplusremaining;
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) != 0) {
 			perror("sigemptyset() did not return success\n");
 			return CHILDFAIL;
@@ -55,25 +55,26 @@
 			perror("sigaction() did not return success\n");
 			return CHILDFAIL;
 		}
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		if (clock_nanosleep(CLOCK_REALTIME, 0,
-					&tssleep, &tsremain) == EINTR) {
+				    &tssleep, &tsremain) == EINTR) {
 			if (clock_gettime(CLOCK_REALTIME, &tsafter) != 0) {
 				perror("clock_gettime() failed\n");
 				return CHILDFAIL;
 			}
-			sleptplusremaining = (tsafter.tv_sec-tsbefore.tv_sec) +
-							tsremain.tv_sec;
+			sleptplusremaining =
+			    (tsafter.tv_sec - tsbefore.tv_sec) +
+			    tsremain.tv_sec;
 
 			if (abs(sleptplusremaining - SLEEPSEC) <= OKDELTA) {
 				printf("PASS - within %d difference\n",
-					abs(sleptplusremaining - SLEEPSEC));
-					return CHILDPASS;
+				       abs(sleptplusremaining - SLEEPSEC));
+				return CHILDPASS;
 			} else {
 				printf("FAIL - within %d difference\n",
-					abs(sleptplusremaining - SLEEPSEC));
-					return CHILDFAIL;
+				       abs(sleptplusremaining - SLEEPSEC));
+				return CHILDFAIL;
 			}
 
 			return CHILDFAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/1-1.c
index 10c0d84..7e0b961 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/1-1.c
@@ -29,15 +29,14 @@
 int main(int argc, char *argv[])
 {
 	struct timespec tpset, tpget, tpreset, tpres;
-	int delta,nsdelta;
+	int delta, nsdelta;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
-        if (clock_getres(CLOCK_REALTIME, &tpres) != 0) {
+	if (clock_getres(CLOCK_REALTIME, &tpres) != 0) {
 		printf("Time resolution is not provided\n");
 		tpres.tv_sec = 0;
 		tpres.tv_nsec = 10000000;
@@ -53,7 +52,7 @@
 			setBackTime(tpreset);
 			return PTS_UNRESOLVED;
 		}
-		delta = tpget.tv_sec-tpset.tv_sec;
+		delta = tpget.tv_sec - tpset.tv_sec;
 		nsdelta = PR_NSEC_PER_SEC - tpget.tv_nsec;
 		if ((delta <= ACCEPTABLEDELTA) && (delta >= 0)) {
 			printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c
index 1bc1fc3..11509a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c
@@ -32,8 +32,8 @@
 #define NUMINVALIDTESTS 8
 
 static int invalid_tests[NUMINVALIDTESTS] = {
-		INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
-		1073743192, -1, 17
+	INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
+	1073743192, -1, 17
 };
 
 int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/19-1.c
index 04dd1d8..33fcf6e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/19-1.c
@@ -32,8 +32,8 @@
 #define NUMINVALIDTESTS 9
 
 static int invalid_tests[NUMINVALIDTESTS] = {
-		INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
-		1073743192, -1, 1000000000, 1000000001
+	INT32_MIN, INT32_MAX, 2147483647, -2147483647, -1073743192,
+	1073743192, -1, 1000000000, 1000000001
 };
 
 int main(int argc, char *argv[])
@@ -43,8 +43,7 @@
 	int failure = 0;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -60,7 +59,7 @@
 		tsset.tv_nsec = invalid_tests[i];
 
 		printf("Test %d sec %d nsec\n",
-				(int) tsset.tv_sec, (int) tsset.tv_nsec);
+		       (int)tsset.tv_sec, (int)tsset.tv_nsec);
 		if (clock_settime(CLOCK_REALTIME, &tsset) == -1) {
 			if (EINVAL != errno) {
 				printf("errno != EINVAL\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c
index 6068fa1..07284c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c
@@ -50,8 +50,7 @@
 	int flags = 0;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (geteuid() != 0)
-	{
+	if (geteuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -83,7 +82,7 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
@@ -127,8 +126,7 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  Ended %d, not %d\n",
-				(int) tpT2.tv_sec,
-				(int) its.it_value.tv_sec);
+		       (int)tpT2.tv_sec, (int)its.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-2.c
index 99b93ff..800dfab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-2.c
@@ -58,8 +58,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) != 0) {
 		perror("sigemptyset() was not successful\n");
@@ -76,7 +76,7 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
index 2f364f1..07c2777 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-1.c
@@ -49,8 +49,7 @@
 	sigset_t set;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -63,8 +62,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&set) != 0 || sigemptyset(&act.sa_mask) != 0) {
 		perror("sigemptyset() was not successful\n");
@@ -81,13 +80,15 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = TIMERSEC; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_sec = TIMERSEC;
+	its.it_value.tv_nsec = 0;
 
 	if (timer_settime(tid, 0, &its, NULL) != 0) {
 		perror("timer_settime() did not return success\n");
@@ -106,15 +107,15 @@
 		return PTS_UNRESOLVED;
 	}
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (nanosleep(&ts, &tsleft) != -1) {
 		printf("nanosleep() not interrupted\n");
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		tsreset.tv_sec += TIMERSEC;
 		setBackTime(tsreset);
@@ -122,8 +123,7 @@
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-					(int) ts.tv_sec- (int) tsleft.tv_sec,
-					TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
index ab2ae82..85e06fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/5-2.c
@@ -49,8 +49,7 @@
 	sigset_t set;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -63,8 +62,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&set) != 0 || sigemptyset(&act.sa_mask) != 0) {
 		perror("sigemptyset() was not successful\n");
@@ -81,13 +80,15 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = TIMERSEC; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_sec = TIMERSEC;
+	its.it_value.tv_nsec = 0;
 
 	if (timer_settime(tid, 0, &its, NULL) != 0) {
 		perror("timer_settime() did not return success\n");
@@ -106,15 +107,15 @@
 		return PTS_UNRESOLVED;
 	}
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (nanosleep(&ts, &tsleft) != -1) {
 		printf("nanosleep() not interrupted\n");
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		tsreset.tv_sec += TIMERSEC;
 		setBackTime(tsreset);
@@ -122,8 +123,7 @@
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-					(int) ts.tv_sec- (int) tsleft.tv_sec,
-					TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-1.c
index 521bf52..4c5c8f6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-1.c
@@ -39,8 +39,7 @@
 	int pid;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -55,8 +54,8 @@
 		int flags = 0;
 		struct timespec tsT2;
 
-		tsT1.tv_sec=tsT0.tv_sec + SLEEPOFFSET;
-		tsT1.tv_nsec=tsT0.tv_nsec;
+		tsT1.tv_sec = tsT0.tv_sec + SLEEPOFFSET;
+		tsT1.tv_nsec = tsT0.tv_nsec;
 
 		flags |= TIMER_ABSTIME;
 		if (clock_nanosleep(CLOCK_REALTIME, flags, &tsT1, NULL) != 0) {
@@ -70,17 +69,16 @@
 		}
 
 		if (tsT2.tv_sec >= tsT1.tv_sec) {
-			if ((tsT2.tv_sec-tsT1.tv_sec) <= ACCEPTABLEDELTA) {
+			if ((tsT2.tv_sec - tsT1.tv_sec) <= ACCEPTABLEDELTA) {
 				return CHILDPASS;
 			} else {
 				printf("Ended too late.  %d >> %d\n",
-						(int) tsT2.tv_sec,
-						(int) tsT1.tv_sec);
+				       (int)tsT2.tv_sec, (int)tsT1.tv_sec);
 				return CHILDFAIL;
 			}
 		} else {
 			printf("Did not sleep for long enough %d < %d\n",
-					(int) tsT2.tv_sec, (int) tsT1.tv_sec);
+			       (int)tsT2.tv_sec, (int)tsT1.tv_sec);
 			return CHILDFAIL;
 		}
 
@@ -102,7 +100,7 @@
 			return PTS_UNRESOLVED;
 		}
 
-		getBeforeTime(&tsreset); // get current time
+		getBeforeTime(&tsreset);	// get current time
 		tsreset.tv_sec += SMALLTIME;
 		setBackTime(tsreset);
 		if (WIFEXITED(i) && WEXITSTATUS(i)) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-2.c
index 530525d..5b736e5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/7-2.c
@@ -38,8 +38,7 @@
 	int pid;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -49,8 +48,8 @@
 		return PTS_UNRESOLVED;
 	}
 
-	tsT1.tv_sec=tsT0.tv_sec + SLEEPOFFSET;
-	tsT1.tv_nsec=tsT0.tv_nsec;
+	tsT1.tv_sec = tsT0.tv_sec + SLEEPOFFSET;
+	tsT1.tv_nsec = tsT0.tv_nsec;
 
 	tsT2.tv_sec = tsT1.tv_sec + SMALLTIME;
 	tsT2.tv_nsec = tsT1.tv_nsec;
@@ -72,17 +71,16 @@
 		}
 
 		if (tsT3.tv_sec >= tsT2.tv_sec) {
-			if ((tsT3.tv_sec-tsT2.tv_sec) <= ACCEPTABLEDELTA) {
+			if ((tsT3.tv_sec - tsT2.tv_sec) <= ACCEPTABLEDELTA) {
 				return CHILDPASS;
 			} else {
 				printf("Ended too late.  %d >> %d\n",
-						(int) tsT3.tv_sec,
-						(int) tsT2.tv_sec);
+				       (int)tsT3.tv_sec, (int)tsT2.tv_sec);
 				return CHILDFAIL;
 			}
 		} else {
 			printf("Did not sleep for long enough %d < %d\n",
-					(int) tsT3.tv_sec, (int) tsT2.tv_sec);
+			       (int)tsT3.tv_sec, (int)tsT2.tv_sec);
 			return CHILDFAIL;
 		}
 
@@ -105,7 +103,7 @@
 			return PTS_UNRESOLVED;
 		}
 
-		setBackTime(tsreset); //should be ~= before time
+		setBackTime(tsreset);	//should be ~= before time
 
 		if (WIFEXITED(i) && WEXITSTATUS(i)) {
 			printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c
index 9880a3b..bc5cfe4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/8-1.c
@@ -37,8 +37,7 @@
 	int pid;
 
 	/* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */
-	if (getuid() != 0)
-	{
+	if (getuid() != 0) {
 		printf("Run this test as ROOT, not as a Regular User\n");
 		return PTS_UNTESTED;
 	}
@@ -66,20 +65,19 @@
 			return CHILDFAIL;
 		}
 
-		expectedsec = tsT0.tv_sec + (SLEEPSEC-SMALLTIME);
+		expectedsec = tsT0.tv_sec + (SLEEPSEC - SMALLTIME);
 
 		if (tsend.tv_sec >= expectedsec) {
-			if ((tsend.tv_sec-expectedsec) <= ACCEPTABLEDELTA) {
+			if ((tsend.tv_sec - expectedsec) <= ACCEPTABLEDELTA) {
 				return CHILDPASS;
 			} else {
 				printf("Ended too late.  %d >> %d\n",
-						(int) tsend.tv_sec,
-						(int) expectedsec);
+				       (int)tsend.tv_sec, (int)expectedsec);
 				return CHILDFAIL;
 			}
 		} else {
 			printf("Did not sleep for long enough %d < %d\n",
-					(int) tsend.tv_sec, (int) expectedsec);
+			       (int)tsend.tv_sec, (int)expectedsec);
 			return CHILDFAIL;
 		}
 
@@ -101,7 +99,7 @@
 			return PTS_UNRESOLVED;
 		}
 
-		getBeforeTime(&tsreset); // get current time
+		getBeforeTime(&tsreset);	// get current time
 		tsreset.tv_sec += SMALLTIME;
 		setBackTime(tsreset);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-3.c
index 9620149..11c5c9d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-3.c
@@ -67,8 +67,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) != 0) {
 		perror("sigemptyset() was not successful\n");
@@ -85,7 +85,7 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
@@ -100,7 +100,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	tpclock.tv_sec = its.it_value.tv_sec + EXPECTEDOVERRUNS*TIMERINTERVAL;
+	tpclock.tv_sec = its.it_value.tv_sec + EXPECTEDOVERRUNS * TIMERINTERVAL;
 	tpclock.tv_nsec = its.it_value.tv_nsec;
 	getBeforeTime(&tpreset);
 	if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {
@@ -115,7 +115,7 @@
 		printf("Overrun count == # of repeating timer expirys\n");
 	} else {
 		printf("Overrun count =%d, not # of repeating timer expirys\n",
-				overruns);
+		       overruns);
 	}
 
 	tpreset.tv_sec += SHORTTIME;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-4.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-4.c
index f1fe412..d8ce80b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/speculative/4-4.c
@@ -65,8 +65,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) != 0) {
 		perror("sigemptyset() was not successful\n");
@@ -83,7 +83,7 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
+	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
@@ -113,7 +113,7 @@
 
 	caught = 0;
 
-	sleep(TIMERINTERVAL+ADDITIONALDELTA);
+	sleep(TIMERINTERVAL + ADDITIONALDELTA);
 
 	if (caught == 1) {
 		printf("Caught the first signal\n");
@@ -122,7 +122,7 @@
 		nocaught = 1;
 	}
 
-	sleep(TIMERINTERVAL+ADDITIONALDELTA);
+	sleep(TIMERINTERVAL + ADDITIONALDELTA);
 
 	if (caught >= 2) {
 		printf("Caught another signal\n");
@@ -132,13 +132,14 @@
 	}
 
 	if (nocaught) {
-		printf("Implementation does not repeat signals on clock reset\n");
+		printf
+		    ("Implementation does not repeat signals on clock reset\n");
 	} else {
 		printf("Implementation does repeat signals on clock reset\n");
 	}
 
 	// If we finish, pass
-	tsreset.tv_sec += 2*(TIMERINTERVAL+ADDITIONALDELTA);
+	tsreset.tv_sec += 2 * (TIMERINTERVAL + ADDITIONALDELTA);
 	setBackTime(tsreset);
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/ctime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/ctime/1-1.c
index 405543e..b2508dd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/ctime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/ctime/1-1.c
@@ -14,19 +14,21 @@
 #include <time.h>
 #include "posixtest.h"
 
-int main() {
-   time_t current_time;
-   char * result;
+int main()
+{
+	time_t current_time;
+	char *result;
 
-   time(&current_time);
-   result = ctime(&current_time);
+	time(&current_time);
+	result = ctime(&current_time);
 
-   if (result == NULL) {
-	puts ("Test FAILED: returned NULL");
-	return PTS_FAIL;
-   } else {
-   	printf("converted date and time is: %s\n", ctime(&current_time));
-	printf("Test PASSED\n");
-	return PTS_PASS;
-   }
+	if (result == NULL) {
+		puts("Test FAILED: returned NULL");
+		return PTS_FAIL;
+	} else {
+		printf("converted date and time is: %s\n",
+		       ctime(&current_time));
+		printf("Test PASSED\n");
+		return PTS_PASS;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/difftime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/difftime/1-1.c
index 037c67f..59444ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/difftime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/difftime/1-1.c
@@ -29,7 +29,8 @@
 	time_diff = difftime(time1, time0);
 
 	if (time_diff != WAIT_DURATION) {
-		perror("Test FAILED: difftime did not return the correct value\n");
+		perror
+		    ("Test FAILED: difftime did not return the correct value\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/1-1.c
index 0ced9c0..54dbaae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/1-1.c
@@ -72,7 +72,7 @@
 #define SEM_NAME "/semfork1_1"
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -88,7 +88,7 @@
 		UNRESOLVED(errno, "Unable to read CLOCK_REALTIME clock");
 
 	/* Set temporary value in tsfin for semaphore timeout */
-	tsfin.tv_sec  = tsini.tv_sec + 3;
+	tsfin.tv_sec = tsini.tv_sec + 3;
 	tsfin.tv_nsec = tsini.tv_nsec;
 
 	/* Create the child */
@@ -100,7 +100,7 @@
 	sem = sem_open(SEM_NAME, O_CREAT, O_RDWR, 0);
 	if (sem == SEM_FAILED)
 		UNRESOLVED(errno, "Failed to open the semaphore (try executing "
-		    "as root)");
+			   "as root)");
 
 	/* sleep 1 second */
 	sleep(1);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
index e1f792a..70e6224 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
@@ -37,20 +37,20 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -80,16 +80,14 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	ret = ftrylockfile(stdout);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		FAILED("The child process is owning the file lock.");
 	}
-
 #if VERBOSE > 1
 
 	output("The file lock was not inherited in the child process\n");
@@ -100,7 +98,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -115,26 +113,22 @@
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 
 		ret = pthread_create(&ch, NULL, threaded, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to create a thread");
 		}
 
 		ret = pthread_join(ch, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join the thread");
 		}
 
@@ -150,13 +144,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/12-1.c
index 801522b..d77b989 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/12-1.c
@@ -36,14 +36,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <signal.h>
 
@@ -51,7 +51,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,7 +82,7 @@
 /********************************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -95,70 +95,62 @@
 	/* block SIGUSR1 and SIGUSR2 */
 	ret = sigemptyset(&mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to initialize signal set");
 	}
 
 	ret = sigaddset(&mask, SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to add SIGUSR1 to signal set");
 	}
 
 	ret = sigaddset(&mask, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to add SIGUSR2 to signal set");
 	}
 
 	ret = sigprocmask(SIG_BLOCK, &mask, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Sigprocmask failed");
 	}
 
 	/* Make the signals pending */
 	ret = kill(getpid(), SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "failed to kill with SIGUSR1");
 	}
 
 	ret = kill(getpid(), SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "failed to kill with SIGUSR2");
 	}
 
-	do
-	{
+	do {
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "failed to examine pending signal set");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "failed to examine pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGUSR1);
 
-		if (ret < 0)
-		{
-			UNRESOLVED(errno, "Unable to check signal USR1 presence");
+		if (ret < 0) {
+			UNRESOLVED(errno,
+				   "Unable to check signal USR1 presence");
 		}
 
-		if (ret == 1)
-		{
+		if (ret == 1) {
 			ret = sigismember(&pending, SIGUSR2);
 
-			if (ret < 0)
-			{
-				UNRESOLVED(errno, "Unable to check signal USR2 presence");
+			if (ret < 0) {
+				UNRESOLVED(errno,
+					   "Unable to check signal USR2 presence");
 			}
 		}
 	}
@@ -173,46 +165,42 @@
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Examine the current blocked signal set. USR1 & USR2 shall be present */
 		ret = sigprocmask(0, NULL, &mask);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Sigprocmask failed in child");
 		}
 
 		ret = sigismember(&mask, SIGUSR1);
 
-		if (ret < 0)
-		{
-			UNRESOLVED(errno, "Unable to check signal USR1 presence");
+		if (ret < 0) {
+			UNRESOLVED(errno,
+				   "Unable to check signal USR1 presence");
 		}
 
-		if (ret == 0)
-		{
-			FAILED("The new process does not mask SIGUSR1 as its parent");
+		if (ret == 0) {
+			FAILED
+			    ("The new process does not mask SIGUSR1 as its parent");
 		}
 
 		ret = sigismember(&mask, SIGUSR2);
 
-		if (ret < 0)
-		{
-			UNRESOLVED(errno, "Unable to check signal USR2 presence");
+		if (ret < 0) {
+			UNRESOLVED(errno,
+				   "Unable to check signal USR2 presence");
 		}
 
-		if (ret == 0)
-		{
-			FAILED("The new process does not mask SIGUSR2 as its parent");
+		if (ret == 0) {
+			FAILED
+			    ("The new process does not mask SIGUSR2 as its parent");
 		}
-
 #if VERBOSE > 0
 		output("SIGUSR1 and SIGUSR2 are blocked in child\n");
 
@@ -221,35 +209,34 @@
 		/* Examine pending signals */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "failed to examine pending signal set in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "failed to examine pending signal set in child");
 		}
 
 		ret = sigismember(&pending, SIGUSR1);
 
-		if (ret < 0)
-		{
-			UNRESOLVED(errno, "Unable to check signal USR1 presence");
+		if (ret < 0) {
+			UNRESOLVED(errno,
+				   "Unable to check signal USR1 presence");
 		}
 
-		if (ret != 0)
-		{
-			FAILED("The new process was created with SIGUSR1 pending");
+		if (ret != 0) {
+			FAILED
+			    ("The new process was created with SIGUSR1 pending");
 		}
 
 		ret = sigismember(&pending, SIGUSR2);
 
-		if (ret < 0)
-		{
-			UNRESOLVED(errno, "Unable to check signal USR2 presence");
+		if (ret < 0) {
+			UNRESOLVED(errno,
+				   "Unable to check signal USR2 presence");
 		}
 
-		if (ret != 0)
-		{
-			FAILED("The new process was created with SIGUSR2 pending");
+		if (ret != 0) {
+			FAILED
+			    ("The new process was created with SIGUSR2 pending");
 		}
-
 #if VERBOSE > 0
 		output("SIGUSR1 and SIGUSR2 are not pending in child\n");
 
@@ -262,13 +249,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/13-1.c
index 47d6b17..f1daa84 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/13-1.c
@@ -39,14 +39,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <sys/time.h>
 
@@ -54,7 +54,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -85,7 +85,7 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -103,25 +103,24 @@
 
 	ret = setitimer(ITIMER_REAL, &it, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(errno, "Failed to set interval timer for ITIMER_REAL");
+	if (ret != 0) {
+		UNRESOLVED(errno,
+			   "Failed to set interval timer for ITIMER_REAL");
 	}
 
 	ret = setitimer(ITIMER_VIRTUAL, &it, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(errno, "Failed to set interval timer for ITIMER_VIRTUAL");
+	if (ret != 0) {
+		UNRESOLVED(errno,
+			   "Failed to set interval timer for ITIMER_VIRTUAL");
 	}
 
 	ret = setitimer(ITIMER_PROF, &it, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(errno, "Failed to set interval timer for ITIMER_PROF");
+	if (ret != 0) {
+		UNRESOLVED(errno,
+			   "Failed to set interval timer for ITIMER_PROF");
 	}
-
 #if VERBOSE > 0
 	output("All interval timers are set.\n");
 
@@ -130,48 +129,43 @@
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Check we get the correct information: timer is reset */
 		ret = getitimer(ITIMER_REAL, &it);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Failed to read ITIMER_REAL in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "Failed to read ITIMER_REAL in child");
 		}
 
-		if (it.it_value.tv_sec != 0)
-		{
+		if (it.it_value.tv_sec != 0) {
 			FAILED("Timer ITIMER_REAL was not reset in child");
 		}
 
 		ret = getitimer(ITIMER_VIRTUAL, &it);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Failed to read ITIMER_VIRTUAL in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "Failed to read ITIMER_VIRTUAL in child");
 		}
 
-		if (it.it_value.tv_sec != 0)
-		{
+		if (it.it_value.tv_sec != 0) {
 			FAILED("Timer ITIMER_VIRTUAL was not reset in child");
 		}
 
 		ret = getitimer(ITIMER_PROF, &it);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Failed to read ITIMER_PROF in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "Failed to read ITIMER_PROF in child");
 		}
 
-		if (it.it_value.tv_sec != 0)
-		{
+		if (it.it_value.tv_sec != 0) {
 			FAILED("Timer ITIMER_PROF was not reset in child");
 		}
 
@@ -182,13 +176,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
@@ -203,7 +195,7 @@
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This testcase requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/14-1.c
index f85d3c5..0cd45e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/14-1.c
@@ -35,14 +35,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <semaphore.h>
 #include <fcntl.h>
@@ -51,7 +51,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -81,67 +81,58 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
 
-	sem_t * sem_linked, *sem_unlinked;
+	sem_t *sem_linked, *sem_unlinked;
 
 	/* Initialize output */
 	output_init();
 
 	sem_linked = sem_open("/fork_14_1a", O_CREAT, O_RDWR, 0);
 
-	if (sem_linked == SEM_FAILED)
-	{
+	if (sem_linked == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the named semaphore");
 	}
 
 	sem_unlinked = sem_open("/fork_14_1b", O_CREAT, O_RDWR, 0);
 
-	if (sem_unlinked == SEM_FAILED)
-	{
+	if (sem_unlinked == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the named semaphore");
 	}
 
 	ret = sem_unlink("/fork_14_1b");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		do
-		{
+	if (child == 0) {
+		do {
 			ret = sem_post(sem_linked);
 		}
 		while ((ret != 0) && (errno == EINTR));
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to post semaphore A");
 		}
 
-		do
-		{
+		do {
 			ret = sem_post(sem_unlinked);
 		}
 		while ((ret != 0) && (errno == EINTR));
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to post semaphore B");
 		}
 
@@ -152,71 +143,56 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
 	/* Check both semaphores have been posted */
-	do
-	{
+	do {
 		ret = sem_trywait(sem_linked);
 	}
 	while ((ret != 0) && (errno == EINTR));
 
-	if (ret != 0)
-	{
-		if (errno == EAGAIN)
-		{
+	if (ret != 0) {
+		if (errno == EAGAIN) {
 			FAILED("Child did not inherit the semaphore A");
-		}
-		else
-		{
+		} else {
 			UNRESOLVED(errno, "sem_trywait failed");
 		}
 	}
 
-	do
-	{
+	do {
 		ret = sem_trywait(sem_unlinked);
 	}
 	while ((ret != 0) && (errno == EINTR));
 
-	if (ret != 0)
-	{
-		if (errno == EAGAIN)
-		{
+	if (ret != 0) {
+		if (errno == EAGAIN) {
 			FAILED("Child did not inherit the semaphore B");
-		}
-		else
-		{
+		} else {
 			UNRESOLVED(errno, "sem_trywait failed");
 		}
 	}
 
 	ret = sem_unlink("/fork_14_1a");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink semaphore A");
 	}
 
 	ret = sem_close(sem_linked);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close semaphore A");
 	}
 
 	ret = sem_close(sem_unlinked);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close semaphore B");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/16-1.c
index 0a8275c..615eaf0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/16-1.c
@@ -40,14 +40,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <sys/mman.h>
 #include <fcntl.h>
@@ -57,7 +57,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,7 +87,7 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -100,75 +100,73 @@
 	/* Create the shared memory segment */
 	fd_s = shm_open("/fork_16_1s", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
 
-	if (fd_s == -1)
-	{
+	if (fd_s == -1) {
 		UNRESOLVED(errno, "Failed to open shared memory segment");
 	}
 
 	fd_ns = shm_open("/fork_16_1ns", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
 
-	if (fd_ns == -1)
-	{
+	if (fd_ns == -1) {
 		UNRESOLVED(errno, "Failed to open shared memory segment");
 	}
 
 	/* Size the memory segment to 1 page size. */
 	ret = ftruncate(fd_s, sysconf(_SC_PAGESIZE));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to size the shared memory segment");
 	}
 
 	ret = ftruncate(fd_ns, sysconf(_SC_PAGESIZE));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to size the shared memory segment");
 	}
 
 	/* Map these sengments in the process memory space */
-	buf_s = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE, MAP_SHARED, fd_s, 0);
+	buf_s =
+	    mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, fd_s, 0);
 
-	if (buf_s == MAP_FAILED)
-	{
+	if (buf_s == MAP_FAILED) {
 		UNRESOLVED(errno, "Failed to mmap the shared memory segment");
 	}
 
-	buf_ns = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE, MAP_PRIVATE, fd_ns, 0);
+	buf_ns =
+	    mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE,
+		 MAP_PRIVATE, fd_ns, 0);
 
-	if (buf_ns == MAP_FAILED)
-	{
-		UNRESOLVED(errno, "Failed to mmap the shared memory segment in MAP_PRIVATE mode");
+	if (buf_ns == MAP_FAILED) {
+		UNRESOLVED(errno,
+			   "Failed to mmap the shared memory segment in MAP_PRIVATE mode");
 	}
 
 	/* Write some data into the buffers */
-	*(long *) buf_ns = 123456L;
+	*(long *)buf_ns = 123456L;
 
-	*(long *) buf_s = 654321L;
+	*(long *)buf_s = 654321L;
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Check the values are read -- so that the mappings were inherited */
 
-		if ((*(long *) buf_ns != 123456L) || (*(long *) buf_s != 654321L))
-		{
-			output("Read values: %ld, %ld\n", *(long *) buf_ns, *(long *) buf_s);
-			FAILED("The memory mappings were not inherited by the child process");
+		if ((*(long *)buf_ns != 123456L) || (*(long *)buf_s != 654321L)) {
+			output("Read values: %ld, %ld\n", *(long *)buf_ns,
+			       *(long *)buf_s);
+			FAILED
+			    ("The memory mappings were not inherited by the child process");
 		}
 
 		/* Now modify the values */
-		*(long *) buf_ns = 100000L;
+		*(long *)buf_ns = 100000L;
 
-		*(long *) buf_s = 200000L;
+		*(long *)buf_s = 200000L;
 
 		/* We're done */
 		exit(PTS_PASS);
@@ -177,35 +175,32 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
 	/* Check that only the MAP_SHARED segment modification is visible */
-	if ((*(long *) buf_ns != 123456L) || (*(long *) buf_s != 200000L))
-	{
-		output("Read values: %ld, %ld\n", *(long *) buf_ns, *(long *) buf_s);
-		FAILED("The memory mappings were not inherited by the child process");
+	if ((*(long *)buf_ns != 123456L) || (*(long *)buf_s != 200000L)) {
+		output("Read values: %ld, %ld\n", *(long *)buf_ns,
+		       *(long *)buf_s);
+		FAILED
+		    ("The memory mappings were not inherited by the child process");
 	}
 
 	/* Free resources (everything will be removed at destruction time) */
 	ret = shm_unlink("/fork_16_1ns");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the shared memory segment");
 	}
 
 	ret = shm_unlink("/fork_16_1s");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the shared memory segment");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/17-1.c
index ee64936..5195e0b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/17-1.c
@@ -36,14 +36,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <sched.h>
 
@@ -51,7 +51,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -83,7 +83,7 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, param, status;
 	pid_t child, ctl;
@@ -96,52 +96,46 @@
 	/* Change process policy and parameters */
 	sp.sched_priority = param = sched_get_priority_max(POLICY);
 
-	if (sp.sched_priority == -1)
-	{
+	if (sp.sched_priority == -1) {
 		UNRESOLVED(errno, "Failed to get max priority value");
 	}
 
 	ret = sched_setscheduler(0, POLICY, &sp);
 
-	if (ret == -1)
-	{
+	if (ret == -1) {
 		UNRESOLVED(errno, "Failed to change process scheduling policy");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 
 		/* Check the scheduling policy */
 		ret = sched_getscheduler(0);
 
-		if (ret == -1)
-		{
-			UNRESOLVED(errno, "Failed to read scheduling policy in child");
+		if (ret == -1) {
+			UNRESOLVED(errno,
+				   "Failed to read scheduling policy in child");
 		}
 
-		if (ret != POLICY)
-		{
+		if (ret != POLICY) {
 			FAILED("The scheduling policy was not inherited");
 		}
 
 		ret = sched_getparam(0, &sp);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Failed to read scheduling parameter in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "Failed to read scheduling parameter in child");
 		}
 
-		if (sp.sched_priority != param)
-		{
+		if (sp.sched_priority != param) {
 			FAILED("The scheduling parameter was not inherited");
 		}
 
@@ -152,13 +146,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/17-2.c
index b51ab4c..3c4e57e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/17-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/17-2.c
@@ -36,14 +36,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <sched.h>
 
@@ -51,7 +51,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -83,7 +83,7 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, param, status;
 	pid_t child, ctl;
@@ -96,52 +96,46 @@
 	/* Change process policy and parameters */
 	sp.sched_priority = param = sched_get_priority_max(POLICY);
 
-	if (sp.sched_priority == -1)
-	{
+	if (sp.sched_priority == -1) {
 		UNRESOLVED(errno, "Failed to get max priority value");
 	}
 
 	ret = sched_setscheduler(0, POLICY, &sp);
 
-	if (ret == -1)
-	{
+	if (ret == -1) {
 		UNRESOLVED(errno, "Failed to change process scheduling policy");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 
 		/* Check the scheduling policy */
 		ret = sched_getscheduler(0);
 
-		if (ret == -1)
-		{
-			UNRESOLVED(errno, "Failed to read scheduling policy in child");
+		if (ret == -1) {
+			UNRESOLVED(errno,
+				   "Failed to read scheduling policy in child");
 		}
 
-		if (ret != POLICY)
-		{
+		if (ret != POLICY) {
 			FAILED("The scheduling policy was not inherited");
 		}
 
 		ret = sched_getparam(0, &sp);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Failed to read scheduling parameter in child");
+		if (ret != 0) {
+			UNRESOLVED(errno,
+				   "Failed to read scheduling parameter in child");
 		}
 
-		if (sp.sched_priority != param)
-		{
+		if (sp.sched_priority != param) {
 			FAILED("The scheduling parameter was not inherited");
 		}
 
@@ -152,13 +146,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/18-1.c
index abd3c04..d783a10 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/18-1.c
@@ -34,23 +34,23 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <signal.h>
- #include <time.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -86,17 +86,16 @@
 /* Notification routine */
 void notification(union sigval sv)
 {
-	if (sv.sival_int != SIGUSR1)
-	{
+	if (sv.sival_int != SIGUSR1) {
 		output("Got signal %d, expected %d\n", sv.sival_int, SIGUSR1);
 		UNRESOLVED(1, "Unexpected notification");
 	}
 
-	notified = (int) getpid();
+	notified = (int)getpid();
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -117,12 +116,11 @@
 	se.sigev_signo = 0;
 	se.sigev_value.sival_int = SIGUSR1;
 	se.sigev_notify_function = &notification;
-	se.sigev_notify_attributes = NULL; /* default detached thread */
+	se.sigev_notify_attributes = NULL;	/* default detached thread */
 
 	ret = timer_create(CLOCK_REALTIME, &se, &tmr);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to create a timer");
 	}
 
@@ -133,33 +131,29 @@
 
 	it.it_value.tv_sec = 0;
 
-	it.it_value.tv_nsec = 500000000; /* 0.5 sec */
+	it.it_value.tv_nsec = 500000000;	/* 0.5 sec */
 
 	ret = timer_settime(tmr, 0, &it, NULL);
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 
 		sleep(1);
 
-		if (notified != 0)
-		{
-			if (notified == (int) getpid())
-			{
-				FAILED("Per-Process Timer was inherited in child");
-			}
-			else
-			{
-				output("Notification occured before the child forked");
+		if (notified != 0) {
+			if (notified == (int)getpid()) {
+				FAILED
+				    ("Per-Process Timer was inherited in child");
+			} else {
+				output
+				    ("Notification occured before the child forked");
 			}
 		}
 
@@ -170,20 +164,18 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
-	if (notified != (int) getpid())
-	{
+	if (notified != (int)getpid()) {
 		output("Notified value: %d\n", notified);
-		UNRESOLVED(-1, "No notification occured -- per process timers do not work?");
+		UNRESOLVED(-1,
+			   "No notification occured -- per process timers do not work?");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/19-1.c
index d2fb293..0a6911e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/19-1.c
@@ -50,7 +50,7 @@
 #include "posixtest.h"
 
 static const char *queue_name = "/fork_19_1_mq";
-static const char message[]  = "I'm your father...";
+static const char message[] = "I'm your father...";
 
 int main(void)
 {
@@ -67,7 +67,7 @@
 	mqa.mq_msgsize = sizeof(message);
 
 	mq = mq_open(queue_name, O_RDWR | O_CREAT | O_NONBLOCK,
-	             S_IRUSR | S_IWUSR, &mqa);
+		     S_IRUSR | S_IWUSR, &mqa);
 
 	if (mq == -1) {
 		perror("Failed to create the message queue descriptor");
@@ -116,12 +116,14 @@
 		ret = mq_getattr(mq, &mqa);
 
 		if (ret != 0) {
-			perror("Failed to get message queue attributes in child");
+			perror
+			    ("Failed to get message queue attributes in child");
 			return PTS_FAIL;
 		}
 
 		if (mqa.mq_curmsgs != 1) {
-			perror("The queue information does not show the message in child");
+			perror
+			    ("The queue information does not show the message in child");
 			return PTS_FAIL;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
index 5823169..073ead3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/2-1.c
@@ -74,7 +74,7 @@
 	pid_t child, ctl;
 	void *malloced;
 	struct sigaction sa_ori, sa_child;
-	struct test_struct mystruct = {1, 2, 3, (void *) 4};
+	struct test_struct mystruct = { 1, 2, 3, (void *)4 };
 	size_t page_size = sysconf(_SC_PAGESIZE);
 
 	malloced = malloc(page_size);
@@ -131,7 +131,7 @@
 	if (child == 0) {
 		/* Check the struct was copied */
 		if ((mystruct.one != 1) || (mystruct.two != 2) ||
-		    (mystruct.three != 3) || (mystruct.four != (void *) 4)) {
+		    (mystruct.three != 3) || (mystruct.four != (void *)4)) {
 			printf("On-the-stack structure not copied correctly\n");
 			return PTS_FAIL;
 		}
@@ -178,14 +178,14 @@
 
 		if (((sa_child.sa_flags & SA_NOCLDSTOP) != SA_NOCLDSTOP)
 #ifndef WITHOUT_XOPEN
-			|| ((sa_child.sa_flags & SA_ONSTACK) != 0)
-			|| ((sa_child.sa_flags & SA_RESETHAND) != 0)
-			|| ((sa_child.sa_flags & SA_RESTART) != 0)
-			|| ((sa_child.sa_flags & SA_SIGINFO) != 0)
-			|| ((sa_child.sa_flags & SA_NOCLDWAIT) != 0)
-			|| ((sa_child.sa_flags & SA_NODEFER) != 0)
+		    || ((sa_child.sa_flags & SA_ONSTACK) != 0)
+		    || ((sa_child.sa_flags & SA_RESETHAND) != 0)
+		    || ((sa_child.sa_flags & SA_RESTART) != 0)
+		    || ((sa_child.sa_flags & SA_SIGINFO) != 0)
+		    || ((sa_child.sa_flags & SA_NOCLDWAIT) != 0)
+		    || ((sa_child.sa_flags & SA_NODEFER) != 0)
 #endif
-		   ) {
+		    ) {
 			printf("The sigaction flags are different\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
index ab31de1..8fd69f7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/21-1.c
@@ -78,10 +78,10 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-sem_t * sem;
+sem_t *sem;
 
 /* Thread function */
-void * threaded(void *arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
@@ -99,7 +99,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/22-1.c
index 2f70305..10c8895 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/22-1.c
@@ -31,21 +31,21 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <time.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -76,7 +76,7 @@
 /********************************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -92,11 +92,10 @@
 	ctp = sysconf(_SC_CPUTIME);
 	ctt = sysconf(_SC_THREAD_CPUTIME);
 
-	if ((ctp == -1) && (ctt == -1))
-	{
-		UNTESTED("The testcase needs CPUTIME or THREAD_CPUTIME support");
+	if ((ctp == -1) && (ctt == -1)) {
+		UNTESTED
+		    ("The testcase needs CPUTIME or THREAD_CPUTIME support");
 	}
-
 #if VERBOSE > 0
 	output("System abilities:\n");
 
@@ -105,43 +104,39 @@
 	output("  _POSIX_THREAD_CPUTIME : %ld\n", ctt);
 
 #endif
-	if (ctp > 0)
-	{
+	if (ctp > 0) {
 		ret = clock_getcpuclockid(0, &clp);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Unable to get cpu-time clock id of the process");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to get cpu-time clock id of the process");
 		}
 
-		do
-		{
+		do {
 			ret = clock_gettime(clp, &tp);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to read CPU time clock");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to read CPU time clock");
 			}
 		}
 		while (tp.tv_sec < 1);
 	}
 
-	if (ctt > 0)
-	{
+	if (ctt > 0) {
 		ret = pthread_getcpuclockid(pthread_self(), &clt);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Unable to get cpu-time clock id of the thread");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to get cpu-time clock id of the thread");
 		}
 
-		do
-		{
+		do {
 			ret = clock_gettime(clt, &tp);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to read thread CPU time clock");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to read thread CPU time clock");
 			}
 		}
 		while (tp.tv_sec < 1);
@@ -150,55 +145,51 @@
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		if (ctp > 0)
-		{
+	if (child == 0) {
+		if (ctp > 0) {
 			ret = clock_getcpuclockid(0, &clp);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(ret, "Unable to get cpu-time clock id of the process");
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get cpu-time clock id of the process");
 			}
 
 			ret = clock_gettime(clp, &tp);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to read CPU time clock");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to read CPU time clock");
 			}
 
-			if (tp.tv_sec > 0)
-			{
-				FAILED("The process CPU-time clock was not reset in child\n");
+			if (tp.tv_sec > 0) {
+				FAILED
+				    ("The process CPU-time clock was not reset in child\n");
 			}
 		}
 
-		if (ctt > 0)
-		{
+		if (ctt > 0) {
 			ret = pthread_getcpuclockid(pthread_self(), &clt);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(ret, "Unable to get cpu-time clock id of the thread");
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get cpu-time clock id of the thread");
 			}
 
 			ret = clock_gettime(clt, &tp);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to read thread CPU time clock");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to read thread CPU time clock");
 			}
 
-			if (tp.tv_sec > 0)
-			{
-				FAILED("The thread CPU-time clock was not reset in child\n");
+			if (tp.tv_sec > 0) {
+				FAILED
+				    ("The thread CPU-time clock was not reset in child\n");
 			}
 		}
 
@@ -209,13 +200,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/3-1.c
index 5cca974..1e39b40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/3-1.c
@@ -27,28 +27,28 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sys/wait.h>
- #include <errno.h>
+#include <sys/wait.h>
+#include <errno.h>
 
- #include <signal.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -79,7 +79,7 @@
 /********************************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -89,41 +89,43 @@
 
 	/* Create the child */
 	child = fork();
-	if (child == -1)  {  UNRESOLVED(errno, "Failed to fork");  }
+	if (child == -1) {
+		UNRESOLVED(errno, "Failed to fork");
+	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* The child stops immediatly */
 		exit(PTS_PASS);
 	}
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
-	if (ctl != child)  {  UNRESOLVED(errno, "Waitpid returned the wrong PID");  }
-	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (ctl != child) {
+		UNRESOLVED(errno, "Waitpid returned the wrong PID");
+	}
+	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS)) {
 		UNRESOLVED(status, "Child exited abnormally");
 	}
 
 	ret = kill(child, 0);
-	if ((ret == 0) || (errno != ESRCH))
-	{
-		output("Kill returned %d (%d: %s)\n", ret, errno, strerror(errno));
+	if ((ret == 0) || (errno != ESRCH)) {
+		output("Kill returned %d (%d: %s)\n", ret, errno,
+		       strerror(errno));
 		FAILED("Another process with the same PID as the child exists");
 	}
 
 	ret = kill((0 - (int)child), 0);
-	if ((ret == 0) || (errno != ESRCH))
-	{
-		output("Kill returned %d (%d: %s)\n", ret, errno, strerror(errno));
+	if ((ret == 0) || (errno != ESRCH)) {
+		output("Kill returned %d (%d: %s)\n", ret, errno,
+		       strerror(errno));
 		FAILED("A process group with the same PID as the child exists");
 	}
 
 	/* Test passed */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/4-1.c
index 394d25a..b562c8f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/4-1.c
@@ -27,26 +27,26 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sys/wait.h>
- #include <errno.h>
+#include <sys/wait.h>
+#include <errno.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -77,7 +77,7 @@
 /********************************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int status;
 	pid_t child, ctl;
@@ -90,15 +90,16 @@
 
 	/* Create the child */
 	child = fork();
-	if (child == -1)  {  UNRESOLVED(errno, "Failed to fork");  }
+	if (child == -1) {
+		UNRESOLVED(errno, "Failed to fork");
+	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Check the parent process ID */
-		if (ctl != getppid())
-		{
-			FAILED("The parent process ID is not the PID of the parent");
+		if (ctl != getppid()) {
+			FAILED
+			    ("The parent process ID is not the PID of the parent");
 		}
 
 		/* We're done */
@@ -107,16 +108,17 @@
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
-	if (ctl != child)  {  UNRESOLVED(errno, "Waitpid returned the wrong PID");  }
-	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (ctl != child) {
+		UNRESOLVED(errno, "Waitpid returned the wrong PID");
+	}
+	if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS)) {
 		UNRESOLVED(status, "Child exited abnormally");
 	}
 
 	/* Test passed */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/6-1.c
index c33e937..85f62b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/6-1.c
@@ -36,14 +36,14 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <dirent.h>
 
@@ -51,7 +51,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -91,8 +91,7 @@
 
 	/* Count the directory entries */
 
-	do
-	{
+	do {
 		dp = readdir(thedir);
 
 		if (dp != NULL)
@@ -104,7 +103,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -120,8 +119,7 @@
 	/* Open the directory */
 	dotdir = opendir(".");
 
-	if (dotdir == NULL)
-	{
+	if (dotdir == NULL) {
 		UNRESOLVED(errno, "opendir failed");
 	}
 
@@ -137,14 +135,12 @@
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Count in child process */
 		counted = count(dotdir);
 
@@ -155,8 +151,7 @@
 
 		ret = closedir(dotdir);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to close dir in child");
 		}
 
@@ -167,21 +162,18 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally -- dir stream not copied?");
 	}
 
 	/* close the directory stream */
 	ret = closedir(dotdir);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to closedir in parent");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
index 58ec293..449e33e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
@@ -80,8 +80,8 @@
 }
 
 static char *messcat_in =
-"$set 1\n1 First sentence\n2 Second sentence\n"
-"$set 2\n1 First translated sentence\n2 Second translated sentence\n";
+    "$set 1\n1 First sentence\n2 Second sentence\n"
+    "$set 2\n1 First translated sentence\n2 Second translated sentence\n";
 
 static int create_catalog(void)
 {
@@ -105,7 +105,7 @@
 	return 0;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -117,19 +117,20 @@
 	if (system(NULL)) {
 
 		if (create_catalog() != 0)
-			UNRESOLVED(errno, "Can't create "MESSCAT_IN);
+			UNRESOLVED(errno, "Can't create " MESSCAT_IN);
 
-		ret = system("gencat "MESSCAT_OUT" "MESSCAT_IN);
+		ret = system("gencat " MESSCAT_OUT " " MESSCAT_IN);
 
 		if (ret != 0)
-			output("Could not find the source file for message catalog.\n" \
-			        "You may need to execute gencat yourself.\n");
+			output
+			    ("Could not find the source file for message catalog.\n"
+			     "You may need to execute gencat yourself.\n");
 	}
 
-	messcat = catopen("./"MESSCAT_OUT, 0);
+	messcat = catopen("./" MESSCAT_OUT, 0);
 
-	if (messcat == (nl_catd) -1)
-		UNRESOLVED(errno, "Could not open ./"MESSCAT_OUT);
+	if (messcat == (nl_catd) - 1)
+		UNRESOLVED(errno, "Could not open ./" MESSCAT_OUT);
 
 	read_catalog(messcat, "parent");
 
@@ -156,7 +157,7 @@
 	if (ret != 0)
 		UNRESOLVED(errno, "Failed to close the message catalog");
 
-	system("rm -f "MESSCAT_IN" "MESSCAT_OUT);
+	system("rm -f " MESSCAT_IN " " MESSCAT_OUT);
 
 #if VERBOSE > 0
 	output("Test passed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
index 52c7225..31ca969 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/8-1.c
@@ -33,19 +33,19 @@
 #define _POSIX_C_SOURCE 200112L
 
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 #include <sys/times.h>
 
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -68,7 +68,7 @@
 #define VERBOSE 1
 #endif
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	struct tms ini_tms, parent_tms, child_tms;
 
@@ -86,7 +86,7 @@
 
 	if (ini_tms.tms_cutime != 0 || ini_tms.tms_cstime != 0)
 		FAILED("The process is created with non-zero tms_cutime or "
-		    "tms_cstime");
+		       "tms_cstime");
 
 #if VERBOSE > 1
 	output("Starting loop...\n");
@@ -96,17 +96,18 @@
 	do {
 		cur_time = times(&parent_tms);
 
-		if (cur_time == (clock_t) -1)
+		if (cur_time == (clock_t) - 1)
 			UNRESOLVED(errno, "times failed");
 	} while ((cur_time - st_time) < sysconf(_SC_CLK_TCK));
 
 #if VERBOSE > 1
 	output("Busy loop terminated\n");
-	output(" Real time: %ld, User Time %ld, System Time %ld, Ticks per sec %ld\n",
-	        (long) (cur_time - st_time),
-	        (long) (parent_tms.tms_utime - ini_tms.tms_utime),
-	        (long) (parent_tms.tms_stime - ini_tms.tms_stime),
-	        sysconf(_SC_CLK_TCK));
+	output
+	    (" Real time: %ld, User Time %ld, System Time %ld, Ticks per sec %ld\n",
+	     (long)(cur_time - st_time),
+	     (long)(parent_tms.tms_utime - ini_tms.tms_utime),
+	     (long)(parent_tms.tms_stime - ini_tms.tms_stime),
+	     sysconf(_SC_CLK_TCK));
 #endif
 
 	/* Create the child */
@@ -120,12 +121,13 @@
 
 		cur_time = times(&child_tms);
 
-		if (cur_time == (clock_t) -1)
+		if (cur_time == (clock_t) - 1)
 			UNRESOLVED(errno, "times failed");
 
-		if ((child_tms.tms_utime + child_tms.tms_stime) >= sysconf(_SC_CLK_TCK))
+		if ((child_tms.tms_utime + child_tms.tms_stime) >=
+		    sysconf(_SC_CLK_TCK))
 			FAILED("The tms struct was not reset during fork "
-			    "operation");
+			       "operation");
 
 		do {
 			cur_time = times(&child_tms);
@@ -155,14 +157,14 @@
 	output("Child joined\n");
 
 	output(" Real time: %ld,\n"
-	        "  User Time %ld, System Time %ld,\n"
-	        "  Child User Time %ld, Child System Time %ld\n",
-	        (long) (cur_time - st_time),
-	        (long) (parent_tms.tms_utime - ini_tms.tms_utime),
-	        (long) (parent_tms.tms_stime - ini_tms.tms_stime),
-	        (long) (parent_tms.tms_cutime - ini_tms.tms_cutime),
-	        (long) (parent_tms.tms_cstime - ini_tms.tms_cstime)
-	      );
+	       "  User Time %ld, System Time %ld,\n"
+	       "  Child User Time %ld, Child System Time %ld\n",
+	       (long)(cur_time - st_time),
+	       (long)(parent_tms.tms_utime - ini_tms.tms_utime),
+	       (long)(parent_tms.tms_stime - ini_tms.tms_stime),
+	       (long)(parent_tms.tms_cutime - ini_tms.tms_cutime),
+	       (long)(parent_tms.tms_cstime - ini_tms.tms_cstime)
+	    );
 
 #endif
 
@@ -171,7 +173,7 @@
 
 	if (parent_tms.tms_cutime == 0 && parent_tms.tms_cstime == 0)
 		FAILED("The process is created with non-zero tms_cutime or "
-		    "tms_cstime");
+		       "tms_cstime");
 
 	/* Test passed */
 #if VERBOSE > 0
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/9-1.c
index 34af811..48b9e3b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/9-1.c
@@ -36,20 +36,20 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <sys/wait.h>
- #include <errno.h>
+#include <errno.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -80,7 +80,7 @@
 /********************************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -94,27 +94,23 @@
 	/* Check the alarm() behavior */
 	ret = alarm(10);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		FAILED("the alarm() routine does not behave as expected");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 
 		ret = alarm(10);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			FAILED("The child alarm pending was not reset.");
 		}
 
@@ -125,13 +121,11 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fsync/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fsync/4-1.c
index c66584f..6f75de3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fsync/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fsync/4-1.c
@@ -29,44 +29,36 @@
 
 int main()
 {
-  char tmpfname[256];
-  char* data;
-  int total_size = 1024;
-  int fd;
+	char tmpfname[256];
+	char *data;
+	int total_size = 1024;
+	int fd;
 
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_fsync_4_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_fsync_4_1_%d", getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  /* Make sure the file is removed when it is closed */
-  unlink(tmpfname);
-  data = (char *) malloc(total_size);
-  memset(data, 'a', total_size);
-  if (write(fd, data, total_size) != total_size)
-  {
-    printf(TNAME "Error at write(): %s\n",
-            strerror(errno));
-    free(data);
-    exit(PTS_UNRESOLVED);
-  }
-  free(data);
+	/* Make sure the file is removed when it is closed */
+	unlink(tmpfname);
+	data = (char *)malloc(total_size);
+	memset(data, 'a', total_size);
+	if (write(fd, data, total_size) != total_size) {
+		printf(TNAME "Error at write(): %s\n", strerror(errno));
+		free(data);
+		exit(PTS_UNRESOLVED);
+	}
+	free(data);
 
-  if (fsync(fd) == -1)
-  {
-    printf(TNAME "Error at fsync(): %s\n",
-            strerror(errno));
-    exit(PTS_FAIL);
-  }
+	if (fsync(fd) == -1) {
+		printf(TNAME "Error at fsync(): %s\n", strerror(errno));
+		exit(PTS_FAIL);
+	}
 
-  close(fd);
-  printf ("Test PASSED\n");
-  return PTS_PASS;
+	close(fd);
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fsync/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fsync/5-1.c
index 7be1521..9ba9d18 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fsync/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fsync/5-1.c
@@ -23,21 +23,17 @@
 
 int main()
 {
-  int fd;
+	int fd;
 
-  /* -1 is an invalid fd */
+	/* -1 is an invalid fd */
 
-  fd = -1;
-  if (fsync(fd) == -1 && errno == EBADF)
-  {
-    printf("Got EBADF when fd=-1\n");
-    printf("Test PASSED\n");
-    exit(PTS_PASS);
-  }
-  else
-  {
-    printf("Test FAILED: Expect EBADF, get: %s\n",
-            strerror(errno));
-    exit(PTS_FAIL);
-  }
+	fd = -1;
+	if (fsync(fd) == -1 && errno == EBADF) {
+		printf("Got EBADF when fd=-1\n");
+		printf("Test PASSED\n");
+		exit(PTS_PASS);
+	} else {
+		printf("Test FAILED: Expect EBADF, get: %s\n", strerror(errno));
+		exit(PTS_FAIL);
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fsync/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fsync/7-1.c
index 0b31b6b..739aa94 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fsync/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fsync/7-1.c
@@ -30,29 +30,25 @@
 
 int main()
 {
-  int fd[2];
+	int fd[2];
 
-  if (pipe(fd) == -1)
-  {
-    printf(TNAME " Test UNRESOLVED: Error at pipe: %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	if (pipe(fd) == -1) {
+		printf(TNAME " Test UNRESOLVED: Error at pipe: %s\n",
+		       strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  if (fsync(fd[1]) == -1 && errno == EINVAL)
-  {
-    printf("Got EINVAL when fsync on pipe\n");
-    printf("Test PASSED\n");
-    close(fd[0]);
-    close(fd[1]);
-    exit(PTS_PASS);
-  }
-  else
-  {
-    printf(TNAME " Test Fail: Expect EINVAL, get: %s\n",
-            strerror(errno));
-    close(fd[0]);
-    close(fd[1]);
-    exit(PTS_FAIL);
-  }
+	if (fsync(fd[1]) == -1 && errno == EINVAL) {
+		printf("Got EINVAL when fsync on pipe\n");
+		printf("Test PASSED\n");
+		close(fd[0]);
+		close(fd[1]);
+		exit(PTS_PASS);
+	} else {
+		printf(TNAME " Test Fail: Expect EINVAL, get: %s\n",
+		       strerror(errno));
+		close(fd[0]);
+		close(fd[1]);
+		exit(PTS_FAIL);
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/getpid/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/getpid/1-1.c
index d35c388..da39718 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/getpid/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/getpid/1-1.c
@@ -32,22 +32,22 @@
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -78,27 +78,27 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-pid_t * sharedpid;
+pid_t *sharedpid;
 
 /* This will be executed by the child process */
 void child(void)
 {
-	*sharedpid=getpid();
+	*sharedpid = getpid();
 	exit(0);
 }
 
 /* This will be executed by the child thread */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
-	*(pid_t *)arg = getpid();
+	*(pid_t *) arg = getpid();
 	return NULL;
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
-	long mf; /* Is memory mapping supported? */
+	long mf;		/* Is memory mapping supported? */
 	pid_t mypid, hispid, ctlpid;
 	pthread_t child_thread;
 
@@ -106,111 +106,129 @@
 	output_init();
 
 	/* Get self PID */
-	mypid=getpid();
-	#if VERBOSE > 1
+	mypid = getpid();
+#if VERBOSE > 1
 	output("Main pid: %d\n", mypid);
-	#endif
+#endif
 
 	/* Get a child thread PID */
 	ret = pthread_create(&child_thread, NULL, threaded, &hispid);
-	if (ret != 0)  {  UNRESOLVED(ret, "Thread creation failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread creation failed");
+	}
 	ret = pthread_join(child_thread, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Thread join failed");  }
-
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread join failed");
+	}
+#if VERBOSE > 1
 	output("Thread pid: %d\n", hispid);
-	#endif
+#endif
 
 	/* Compare threads PIDs */
-	if (mypid != hispid)
-	{
-		FAILED("Child thread got a different return value from getpid()\n");
+	if (mypid != hispid) {
+		FAILED
+		    ("Child thread got a different return value from getpid()\n");
 	}
 
 	/* Test system abilities */
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" MF  : %li\n", mf);
 	if (mf <= 0)
 		output("Unable to test without shared data\n");
-	#endif
+#endif
 
 	/* We need MF support for the process-cross testing */
-	if (mf > 0)
-	{
+	if (mf > 0) {
 		/* We will place the child pid in a mmaped file */
 		char filename[] = "/tmp/getpid-1-XXXXXX";
-		void * mmaped;
+		void *mmaped;
 		int fd;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
 		/* Fill the file up to 1 pagesize */
 		ret = ftruncate(fd, sysconf(_SC_PAGESIZE));
-		if (ret != 0)  {  UNRESOLVED(errno, "ftruncate operation failed");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "ftruncate operation failed");
+		}
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE,
+			 MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		/* Set the sharedpid pointer to this mmaped area */
 		sharedpid = (pid_t *) mmaped;
 
 		/* Our data is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Shared memory is ready.\n");
-		#endif
+#endif
 
 		/* Okay, let's create the child process */
-		hispid=fork();
-		if (hispid == (pid_t)-1) {  UNRESOLVED(errno, "Fork failed");  }
+		hispid = fork();
+		if (hispid == (pid_t) - 1) {
+			UNRESOLVED(errno, "Fork failed");
+		}
 
 		/* Child process : */
-		if (hispid == (pid_t)0)
+		if (hispid == (pid_t) 0)
 			child();
 
 		/* Otherwise, we're the parent */
 		ctlpid = waitpid(hispid, &status, 0);
-		if (ctlpid != hispid)  {  UNRESOLVED(errno, "waitpid waited for the wrong process");  }
-		if (!WIFEXITED(status) || WEXITSTATUS(status))
-		{  UNRESOLVED(status, "The child process did not terminate as expected");  }
-
-		#if VERBOSE > 1
+		if (ctlpid != hispid) {
+			UNRESOLVED(errno,
+				   "waitpid waited for the wrong process");
+		}
+		if (!WIFEXITED(status) || WEXITSTATUS(status)) {
+			UNRESOLVED(status,
+				   "The child process did not terminate as expected");
+		}
+#if VERBOSE > 1
 		output("Child process pid: %d\n", hispid);
-		#endif
+#endif
 
 		/* Check the child pid is the same as fork returned */
-		if (hispid != *sharedpid)
-		{  FAILED("getpid() in the child returned a different value than fork() in the parent");  }
+		if (hispid != *sharedpid) {
+			FAILED
+			    ("getpid() in the child returned a different value than fork() in the parent");
+		}
 
 		/* Check the child pid is different than the parent pid */
-		if (hispid == mypid)
-		{  FAILED("Both child and parent getpid() return values are equal");  }
+		if (hispid == mypid) {
+			FAILED
+			    ("Both child and parent getpid() return values are equal");
+		}
 	}
-
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/gmtime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/gmtime/1-1.c
index 052da55..b48f48d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/gmtime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/gmtime/1-1.c
@@ -14,13 +14,13 @@
 #include <time.h>
 #include <posixtest.h>
 
-int main ()
+int main()
 {
 	struct tm *tm_ptr;
 	time_t the_time;
 	int total_years;
 
-	(void) time(&the_time);
+	(void)time(&the_time);
 	tm_ptr = gmtime(&the_time);
 	printf("Raw time is %ld \n", the_time);
 	printf("gmtime gives:\n");
@@ -67,7 +67,7 @@
 
 	/* Checking the Year */
 	total_years = (tm_ptr->tm_year + 1900);
-	if (total_years >= 1900)  {
+	if (total_years >= 1900) {
 		printf("year %d\n", total_years);
 	} else {
 		printf("year %d\n", total_years);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/gmtime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/gmtime/2-1.c
index 9804298..236c0ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/gmtime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/gmtime/2-1.c
@@ -14,16 +14,16 @@
 #include <time.h>
 #include <posixtest.h>
 
-int main ()
+int main()
 {
 	struct tm *tm_ptr;
 	time_t the_time;
 
-	(void) time(&the_time);
+	(void)time(&the_time);
 	tm_ptr = NULL;
 	tm_ptr = gmtime(&the_time);
 
-	if (tm_ptr !=  NULL) {
+	if (tm_ptr != NULL) {
 		puts("Test PASSED");
 		return PTS_PASS;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/kill/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/kill/1-1.c
index 387ddb5..b513679 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/kill/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/kill/1-1.c
@@ -34,8 +34,8 @@
 {
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/kill/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/kill/1-2.c
index e92b364..26580ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/kill/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/kill/1-2.c
@@ -33,7 +33,8 @@
 
 #define SIGTOTEST SIGUSR1
 
-void myhandler (int signo) {
+void myhandler(int signo)
+{
 	exit(1);
 }
 
@@ -55,18 +56,19 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 		struct sigaction act;
-		act.sa_handler=myhandler;
-		act.sa_flags=0;
+		act.sa_handler = myhandler;
+		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGTOTEST, &act, 0);
 
 		if (0 != sigwait(&set, &sig)) {
-			printf("Sigwait did not return 0. Possible problem with sigwait function\n");
-			return 0; /* FAIL */
+			printf
+			    ("Sigwait did not return 0. Possible problem with sigwait function\n");
+			return 0;	/* FAIL */
 		}
 
 		if (sig != SIGTOTEST)
-			return 0; /* FAIL */
+			return 0;	/* FAIL */
 
 		return 1;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c
index 1e7a1b0..f22abb3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c
@@ -41,7 +41,8 @@
 		if (ESRCH == errno) {
 			printf("ESRCH error received\n");
 		} else {
-			printf("kill() failed on ESRCH errno not set correctly\n");
+			printf
+			    ("kill() failed on ESRCH errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
@@ -52,13 +53,14 @@
 	/*
 	 * EPERM
 	 */
-	setuid(1); /* this is added incase user is root. If user is normal user, then it has no effect on the tests*/
+	setuid(1);		/* this is added incase user is root. If user is normal user, then it has no effect on the tests */
 
 	if (-1 == kill(1, 0)) {
 		if (EPERM == errno) {
 			printf("EPERM error received\n");
 		} else {
-			printf("kill() failed on EPERM errno not set correctly\n");
+			printf
+			    ("kill() failed on EPERM errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/kill/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/kill/3-1.c
index 97410ce..ea11bb3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/kill/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/kill/3-1.c
@@ -21,10 +21,11 @@
 
 int main()
 {
-        setuid(1); /* this is added incase user is root. If user is normal user, then it has no effect on the tests*/
+	setuid(1);		/* this is added incase user is root. If user is normal user, then it has no effect on the tests */
 
 	if (kill(1, 0) != -1) {
-		printf("Test FAILED: kill() succeeded even though this program's user id did not match the recieving process's user id\n");
+		printf
+		    ("Test FAILED: kill() succeeded even though this program's user id did not match the recieving process's user id\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-1.c
index 272a959..61008f7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-1.c
@@ -36,8 +36,8 @@
 	int pgrp;
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
@@ -47,12 +47,12 @@
 		return PTS_UNRESOLVED;
 	}
 
- 	if ((pgrp = getpgrp()) == -1) {
+	if ((pgrp = getpgrp()) == -1) {
 		printf("Could not get process group number\n");
 		return PTS_UNRESOLVED;
 	}
 
- 	if (killpg(pgrp, SIGTOTEST) != 0) {
+	if (killpg(pgrp, SIGTOTEST) != 0) {
 		printf("Could not raise signal being tested\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-2.c
index 7f575df..23b3460 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-2.c
@@ -28,7 +28,8 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
+void myhandler(int signo)
+{
 	exit(1);
 }
 
@@ -39,8 +40,8 @@
 	if ((child_pid = fork()) == 0) {
 		/* child here */
 		struct sigaction act;
-		act.sa_handler=myhandler;
-		act.sa_flags=0;
+		act.sa_handler = myhandler;
+		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGTOTEST, &act, 0);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/4-1.c
index 7a1c74d..0366a32 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/4-1.c
@@ -21,12 +21,12 @@
 {
 	int pgrp;
 
- 	if ((pgrp = getpgrp()) == -1) {
+	if ((pgrp = getpgrp()) == -1) {
 		printf("Could not get process group number\n");
 		return PTS_UNRESOLVED;
 	}
 
- 	if (killpg(pgrp, 0) != 0) {
+	if (killpg(pgrp, 0) != 0) {
 		printf("killpg did not return success.\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/5-1.c
index 1e8f87e..ddba2cd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/5-1.c
@@ -29,13 +29,14 @@
 {
 	int pgrp;
 
- 	if ((pgrp = getpgrp()) == -1) {
+	if ((pgrp = getpgrp()) == -1) {
 		printf("Could not get process group number\n");
 		return PTS_UNRESOLVED;
 	}
 
- 	if (killpg(pgrp, -1) != -1) {
-		printf("Test FAILED: killpg did not return -1 even though it was passed an invalid signal number.");
+	if (killpg(pgrp, -1) != -1) {
+		printf
+		    ("Test FAILED: killpg did not return -1 even though it was passed an invalid signal number.");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/6-1.c
index 922a429..28a41aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/6-1.c
@@ -23,18 +23,20 @@
 {
 	int pgrp;
 
- 	if ((pgrp = getpgrp()) == -1) {
+	if ((pgrp = getpgrp()) == -1) {
 		printf("Could not get process group number\n");
 		return PTS_UNRESOLVED;
 	}
 
- 	if (killpg(pgrp, -1) != -1) {
-		printf("killpg did not return -1 even though it was passed an invalid signal number.");
+	if (killpg(pgrp, -1) != -1) {
+		printf
+		    ("killpg did not return -1 even though it was passed an invalid signal number.");
 		return PTS_UNRESOLVED;
 	}
 
 	if (errno != EINVAL) {
-		printf("killpg did not set errno to EINVAL even though it was passed an invalid signal number.");
+		printf
+		    ("killpg did not set errno to EINVAL even though it was passed an invalid signal number.");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/killpg/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/killpg/8-1.c
index 3108aa5..4279cb0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/killpg/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/killpg/8-1.c
@@ -22,13 +22,15 @@
 int main()
 {
 
- 	if (killpg(999999, 0) != -1) {
-		printf("killpg did not return -1 even though it was passed an invalid process group id.");
+	if (killpg(999999, 0) != -1) {
+		printf
+		    ("killpg did not return -1 even though it was passed an invalid process group id.");
 		return PTS_UNRESOLVED;
 	}
 
 	if (errno != ESRCH) {
-		printf("killpg did not set errno to ESRCH even though it was passed an invalid signal number.");
+		printf
+		    ("killpg did not set errno to ESRCH even though it was passed an invalid signal number.");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/1-1.c
index 831c53a..dff175c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/1-1.c
@@ -38,10 +38,9 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024*1024
 
-int received_all	= 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -64,28 +63,27 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_1_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
-	aiocbs = (struct aiocb**)malloc(sizeof(struct aiocb *) * NUM_AIOCBS);
+	aiocbs = (struct aiocb **)malloc(sizeof(struct aiocb *) * NUM_AIOCBS);
 
 	/* Queue up a bunch of aio writes */
 	for (i = 0; i < NUM_AIOCBS; i++) {
@@ -95,7 +93,7 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
@@ -103,61 +101,62 @@
 
 	/* Use SIGRTMIN+1 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+1;
+	event.sigev_signo = SIGRTMIN + 1;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_WAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		free (aiocbs);
-		close (fd);
-		exit (PTS_FAIL);
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		free(aiocbs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
-	if (received_all != 0)
-	{
+	if (received_all != 0) {
 		printf(TNAME " lio_listio() did not ignore the sig argument\n");
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		free (aiocbs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		free(aiocbs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
-	free (aiocbs);
+	free(bufs);
+	free(aiocbs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/10-1.c
index 6d473db..bf588b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/10-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int received_selected	= 0;
-int received_all	= 0;
+int received_selected = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	received_selected = info->si_value.sival_int;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,24 +68,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_10_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -99,69 +96,71 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c
index c974080..696108c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int received_selected	= 0;
-int received_all	= 0;
+int received_selected = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	received_selected = info->si_value.sival_int;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,24 +68,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_11_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -99,7 +96,7 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 
 		if (i == 2)
@@ -109,26 +106,26 @@
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
@@ -136,50 +133,52 @@
 	if (ret == 0) {
 		printf(TNAME " Error lio_listio() should have returned -1\n");
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	if (errno != EIO) {
-		printf(TNAME " lio_listio() should set errno to EIO %d\n", errno);
+		printf(TNAME " lio_listio() should set errno to EIO %d\n",
+		       errno);
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
 
 		close(fd);
 		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
 		if (i == 2)
 			continue;
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/12-1.c
index b1afe25..795268a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/12-1.c
@@ -52,24 +52,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_12_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -81,7 +80,7 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 	}
@@ -90,35 +89,37 @@
 	ret = lio_listio(LIO_WAIT, aiocbs, NUM_AIOCBS, NULL);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/13-1.c
index 4ab4b19..79f7d07 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/13-1.c
@@ -52,24 +52,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_13_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -81,7 +80,7 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 
 		if (i == 2)
@@ -96,18 +95,19 @@
 	if (ret == 0) {
 		printf(TNAME " Error lio_listio() should have returned -1\n");
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	if (errno != EIO) {
-		printf(TNAME " lio_listio() sould set errno to EIO %d\n", errno);
+		printf(TNAME " lio_listio() sould set errno to EIO %d\n",
+		       errno);
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
 
 		close(fd);
 		exit(PTS_FAIL);
@@ -118,25 +118,26 @@
 		if (i == 2)
 			continue;
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/14-1.c
index a970e74..0160e7e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/14-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int num_received	= 0;
-int received_all	= 0;
+int num_received = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	num_received++;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,24 +68,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_14_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -96,10 +93,10 @@
 
 		aiocbs[i] = (struct aiocb *)calloc(sizeof(struct aiocb), 1);
 		if (aiocbs == NULL) {
-			printf (TNAME " Error at malloc(): %s\n",
-			    strerror (errno));
+			printf(TNAME " Error at malloc(): %s\n",
+			       strerror(errno));
 			free(bufs);
-			close (fd);
+			close(fd);
 			exit(PTS_UNRESOLVED);
 		}
 
@@ -109,32 +106,32 @@
 			aiocbs[i]->aio_fildes = fd;
 
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
@@ -142,24 +139,25 @@
 	if (ret != 0) {
 		printf(TNAME " Error lio_listio() %s\n", strerror(errno));
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	if (num_received != NUM_AIOCBS) {
-		printf(TNAME " Error incomplete number of completed requests\n");
+		printf(TNAME
+		       " Error incomplete number of completed requests\n");
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
@@ -167,25 +165,26 @@
 		if (i == 2)
 			continue;
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/15-1.c
index 8938514..3dbdf3b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/15-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int num_received	= 0;
-int received_all	= 0;
+int num_received = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	num_received++;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,24 +68,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_15_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -99,7 +96,7 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 
 		if (i > 3)
@@ -109,26 +106,26 @@
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
@@ -137,49 +134,50 @@
 		printf(TNAME " Error lio_listio() returned %d (%s)\n",
 		       errno, strerror(errno));
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	if (num_received != NUM_AIOCBS) {
 		printf(TNAME " Error wrong number of completed requests %d\n",
-			num_received);
+		       num_received);
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/18-1.c
index 9c7e01a..e38cd90 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/18-1.c
@@ -50,24 +50,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_18_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -84,30 +83,32 @@
 	ret = lio_listio(-1, aiocbs, NUM_AIOCBS, NULL);
 
 	if (ret != -1) {
-		printf(TNAME " Error lio_listio() should have returned -1: %d\n",
+		printf(TNAME
+		       " Error lio_listio() should have returned -1: %d\n",
 		       ret);
 
-		free (aiocbs[0]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(aiocbs[0]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	if (errno != EINVAL) {
-		printf(TNAME " Error lio_listio() should have set errno to EINVAL: %d (%s)\n",
+		printf(TNAME
+		       " Error lio_listio() should have set errno to EINVAL: %d (%s)\n",
 		       errno, strerror(errno));
 
-		free (aiocbs[0]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(aiocbs[0]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
-	free (aiocbs[0]);
-	free (bufs);
-	close (fd);
+	free(aiocbs[0]);
+	free(bufs);
+	close(fd);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
index aa52077..46b3ea9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
@@ -36,17 +36,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int received_selected	= 0;
-int received_all	= 0;
+int received_selected = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	received_selected = info->si_value.sival_int;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -69,24 +67,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_2_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -98,89 +95,90 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
-	if (received_selected == NUM_AIOCBS-1)
-	{
+	if (received_selected == NUM_AIOCBS - 1) {
 		printf(TNAME " lio_listio() waited\n");
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
-	if (received_all != 0)
-	{
-		printf(TNAME " Error lio_listio() waited for list completion\n");
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+	if (received_all != 0) {
+		printf(TNAME
+		       " Error lio_listio() waited for list completion\n");
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/3-1.c
index 9f27d0b..653cb59 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/3-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int received_selected	= 0;
-int received_all	= 0;
+int received_selected = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	received_selected = info->si_value.sival_int;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,24 +68,23 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_3_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -99,69 +96,71 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check return code and free things */
 	for (i = 0; i < NUM_AIOCBS; i++) {
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/4-1.c
index 7964256..2be975f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/4-1.c
@@ -37,17 +37,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int num_received	= 0;
-int received_all	= 0;
+int num_received = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	num_received++;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -70,33 +68,32 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_4_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Put NULL elements in list */
-	for (i=0; i<NUM_AIOCBS; i++)
+	for (i = 0; i < NUM_AIOCBS; i++)
 		aiocbs[i] = NULL;
 
 	/* Queue up a bunch of aio writes */
-	for (i=1; i<NUM_AIOCBS-1; i++) {
+	for (i = 1; i < NUM_AIOCBS - 1; i++) {
 
 		if (i == 3)
 			continue;
@@ -106,89 +103,92 @@
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
-		for (i=1; i<NUM_AIOCBS-1; i++) {
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
+		for (i = 1; i < NUM_AIOCBS - 1; i++) {
 			if (i == 3)
 				continue;
-			free (aiocbs[i]);
+			free(aiocbs[i]);
 		}
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Wait until list completion */
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check we only received NUM_AIOCBS-3 notifications */
-	if (num_received != NUM_AIOCBS-3) {
-		printf(TNAME " Error did not receive the right number of notifications\n");
-		for (i=1; i<NUM_AIOCBS-1; i++) {
+	if (num_received != NUM_AIOCBS - 3) {
+		printf(TNAME
+		       " Error did not receive the right number of notifications\n");
+		for (i = 1; i < NUM_AIOCBS - 1; i++) {
 			if (i == 3)
 				continue;
-			free (aiocbs[i]);
+			free(aiocbs[i]);
 		}
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
-	for (i=1; i<NUM_AIOCBS-1; i++) {
+	for (i = 1; i < NUM_AIOCBS - 1; i++) {
 		if (i == 3)
 			continue;
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/5-1.c
index d434822..fce5f05 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/5-1.c
@@ -55,21 +55,20 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_4_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
 	/* Queue valid lio_opcode requests */
-	for (i=0; i<NUM_AIOCBS; i++) {
+	for (i = 0; i < NUM_AIOCBS; i++) {
 
 		aiocbs[i] = (struct aiocb *)malloc(sizeof(struct aiocb));
 		memset(aiocbs[i], 0, sizeof(struct aiocb));
@@ -92,26 +91,27 @@
 
 	if (ret) {
 		printf(TNAME " lio_listio() does not accept valid opcodes\n");
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
-		close (fd);
-		exit (PTS_FAIL);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
-	for (i=0; i<NUM_AIOCBS-1; i++) {
-	  	err = aio_error(aiocbs[i]);
+	for (i = 0; i < NUM_AIOCBS - 1; i++) {
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 	}
 
 	if (errors) {
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
 
 		close(fd);
 		exit(PTS_FAIL);
@@ -120,32 +120,32 @@
 	/* Queue invalid lio_opcode requests */
 	aiocbs[0]->aio_lio_opcode = -1;
 
-	if (lio_listio(LIO_WAIT, aiocbs, 1, NULL) != -1)
-	{
+	if (lio_listio(LIO_WAIT, aiocbs, 1, NULL) != -1) {
 		printf(TNAME " lio_listio() accepts invalid opcode\n");
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
 
 		close(fd);
 		exit(PTS_FAIL);
 	}
 
 	if (errno != EIO) {
-		printf(TNAME " lio_listio() sould set errno to EIO %d\n", errno);
+		printf(TNAME " lio_listio() sould set errno to EIO %d\n",
+		       errno);
 
-		for (i=0; i<NUM_AIOCBS; i++)
-			free (aiocbs[i]);
+		for (i = 0; i < NUM_AIOCBS; i++)
+			free(aiocbs[i]);
 
 		close(fd);
 		exit(PTS_FAIL);
 	}
 
-	for (i=0; i<NUM_AIOCBS; i++)
-		free (aiocbs[i]);
+	for (i = 0; i < NUM_AIOCBS; i++)
+		free(aiocbs[i]);
 
 	close(fd);
 
-	printf ("Test PASSED\n");
+	printf("Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/6-1.c
index c8e2c8c..fb5a233 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/6-1.c
@@ -53,6 +53,6 @@
 	exit(PTS_FAIL);
 #endif
 
-	printf ("Test PASSED\n");
+	printf("Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/7-1.c
index 719670c..3ac5b84 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/7-1.c
@@ -38,17 +38,15 @@
 #define NUM_AIOCBS	10
 #define BUF_SIZE	1024
 
-int num_received	= 0;
-int received_all	= 0;
+int num_received = 0;
+int received_all = 0;
 
-void
-sigrt1_handler(int signum, siginfo_t *info, void *context)
+void sigrt1_handler(int signum, siginfo_t * info, void *context)
 {
 	num_received++;
 }
 
-void
-sigrt2_handler(int signum, siginfo_t *info, void *context)
+void sigrt2_handler(int signum, siginfo_t * info, void *context)
 {
 	received_all = 1;
 }
@@ -71,35 +69,34 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_4_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
 
 	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1) {
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
 	unlink(tmpfname);
 
-	bufs = (char *) malloc (NUM_AIOCBS*BUF_SIZE);
+	bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE);
 
 	if (bufs == NULL) {
-		printf (TNAME " Error at malloc(): %s\n", strerror (errno));
-		close (fd);
+		printf(TNAME " Error at malloc(): %s\n", strerror(errno));
+		close(fd);
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Queue up a bunch of aio writes */
-	for (i=0; i<NUM_AIOCBS; i++) {
+	for (i = 0; i < NUM_AIOCBS; i++) {
 		aiocbs[i] = (struct aiocb *)malloc(sizeof(struct aiocb));
 		memset(aiocbs[i], 0, sizeof(struct aiocb));
 
 		aiocbs[i]->aio_fildes = fd;
 		aiocbs[i]->aio_offset = 0;
-		aiocbs[i]->aio_buf = &bufs[i*BUF_SIZE];
+		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 
 		if ((i == 1) || (i == 7))
@@ -109,81 +106,84 @@
 
 		/* Use SIRTMIN+1 for individual completions */
 		aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
-		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN+1;
+		aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
 		aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
 	}
 
 	/* Use SIGRTMIN+2 for list completion */
 	event.sigev_notify = SIGEV_SIGNAL;
-	event.sigev_signo = SIGRTMIN+2;
+	event.sigev_signo = SIGRTMIN + 2;
 	event.sigev_value.sival_ptr = NULL;
 
 	/* Setup handler for individual operation completion */
 	action.sa_sigaction = sigrt1_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+1, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 1, &action, NULL);
 
 	/* Setup handler for list completion */
 	action.sa_sigaction = sigrt2_handler;
 	sigemptyset(&action.sa_mask);
-	action.sa_flags = SA_SIGINFO|SA_RESTART;
-	sigaction(SIGRTMIN+2, &action, NULL);
+	action.sa_flags = SA_SIGINFO | SA_RESTART;
+	sigaction(SIGRTMIN + 2, &action, NULL);
 
 	/* Submit request list */
 	ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event);
 
 	if (ret) {
-		printf(TNAME " Error at lio_listio() %d: %s\n", errno, strerror(errno));
+		printf(TNAME " Error at lio_listio() %d: %s\n", errno,
+		       strerror(errno));
 
-		for (i=1; i<NUM_AIOCBS-1; i++)
-			free (aiocbs[i]);
+		for (i = 1; i < NUM_AIOCBS - 1; i++)
+			free(aiocbs[i]);
 
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Wait until list completion */
 	while (received_all == 0)
-		sleep (1);
+		sleep(1);
 
 	/* Check we only received NUM_AIOCBS-3 notifications */
-	if (num_received != NUM_AIOCBS-2) {
-		printf(TNAME " Error did not receive the right number of notifications\n");
+	if (num_received != NUM_AIOCBS - 2) {
+		printf(TNAME
+		       " Error did not receive the right number of notifications\n");
 
-		for (i=1; i<NUM_AIOCBS-1; i++)
-			free (aiocbs[i]);
+		for (i = 1; i < NUM_AIOCBS - 1; i++)
+			free(aiocbs[i]);
 
-		free (bufs);
-		close (fd);
-		exit (PTS_FAIL);
+		free(bufs);
+		close(fd);
+		exit(PTS_FAIL);
 	}
 
 	/* Check return code and free things */
-	for (i=0; i<NUM_AIOCBS; i++) {
+	for (i = 0; i < NUM_AIOCBS; i++) {
 		if ((i == 1) || (i == 7))
 			continue;
 
-	  	err = aio_error(aiocbs[i]);
+		err = aio_error(aiocbs[i]);
 		ret = aio_return(aiocbs[i]);
 
 		if ((err != 0) && (ret != BUF_SIZE)) {
-			printf(TNAME " req %d: error = %d - return = %d\n", i, err, ret);
+			printf(TNAME " req %d: error = %d - return = %d\n", i,
+			       err, ret);
 			errors++;
 		}
 
-		free (aiocbs[i]);
+		free(aiocbs[i]);
 	}
 
-	free (bufs);
+	free(bufs);
 
 	close(fd);
 
 	if (errors != 0)
-		exit (PTS_FAIL);
+		exit(PTS_FAIL);
 
-	printf (TNAME " PASSED\n");
+	printf(TNAME " PASSED\n");
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/8-1.c
index abb984f..6adc3b5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/8-1.c
@@ -52,14 +52,11 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_8_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
-	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-		  S_IRUSR | S_IWUSR);
-	if (fd == -1)
-	{
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -68,10 +65,8 @@
 	for (i = 0; i < BUF_SIZE; i++)
 		buf[i] = i;
 
-	if (write(fd, buf, BUF_SIZE) != BUF_SIZE)
-	{
-		printf(TNAME " Error at write(): %s\n",
-		       strerror(errno));
+	if (write(fd, buf, BUF_SIZE) != BUF_SIZE) {
+		printf(TNAME " Error at write(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -84,10 +79,8 @@
 
 	list[0] = &aiocb;
 
-	if (lio_listio(LIO_WAIT, list, 1, NULL) == -1)
-	{
-		printf(TNAME " Error at lio_listio(): %s\n",
-		       strerror(errno));
+	if (lio_listio(LIO_WAIT, list, 1, NULL) == -1) {
+		printf(TNAME " Error at lio_listio(): %s\n", strerror(errno));
 
 		close(fd);
 		exit(PTS_FAIL);
@@ -112,16 +105,14 @@
 	}
 
 	/* check it */
-	for (i = 0; i < BUF_SIZE; i++)
-	{
-		if (buf[i] != check[i])
-		{
+	for (i = 0; i < BUF_SIZE; i++) {
+		if (buf[i] != check[i]) {
 			printf(TNAME " read values are corrupted\n");
 			exit(PTS_FAIL);
 		}
 	}
 
 	close(fd);
-	printf ("Test PASSED\n");
+	printf("Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/9-1.c
index b4f1761..08e284c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/9-1.c
@@ -52,14 +52,11 @@
 		exit(PTS_UNSUPPORTED);
 
 	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_9_1_%d",
-		  getpid());
+		 getpid());
 	unlink(tmpfname);
-	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-		  S_IRUSR | S_IWUSR);
-	if (fd == -1)
-	{
-		printf(TNAME " Error at open(): %s\n",
-		       strerror(errno));
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -76,10 +73,8 @@
 
 	list[0] = &aiocb;
 
-	if (lio_listio(LIO_WAIT, list, 1, NULL) == -1)
-	{
-		printf(TNAME " Error at lio_listio(): %s\n",
-		       strerror(errno));
+	if (lio_listio(LIO_WAIT, list, 1, NULL) == -1) {
+		printf(TNAME " Error at lio_listio(): %s\n", strerror(errno));
 		exit(PTS_FAIL);
 	}
 
@@ -103,10 +98,8 @@
 
 	memset(check, 0xaa, BUF_SIZE);
 
-	if (read(fd, check, BUF_SIZE) != BUF_SIZE)
-	{
-		printf(TNAME " Error at read(): %s\n",
-		       strerror(errno));
+	if (read(fd, check, BUF_SIZE) != BUF_SIZE) {
+		printf(TNAME " Error at read(): %s\n", strerror(errno));
 
 		close(fd);
 		exit(PTS_UNRESOLVED);
@@ -114,16 +107,14 @@
 
 	/* check it */
 
-	for (i = 0; i < BUF_SIZE; i++)
-	{
-		if (buf[i] != check[i])
-		{
+	for (i = 0; i < BUF_SIZE; i++) {
+		if (buf[i] != check[i]) {
 			printf(TNAME " read values are corrupted\n");
 			exit(PTS_FAIL);
 		}
 	}
 
 	close(fd);
-	printf ("Test PASSED\n");
+	printf("Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/localtime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/localtime/1-1.c
index eee6ab0..3987492 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/localtime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/localtime/1-1.c
@@ -14,20 +14,21 @@
 #include <time.h>
 #include "posixtest.h"
 
-int main() {
-    time_t current_time;
-    struct tm *timeptr;
+int main()
+{
+	time_t current_time;
+	struct tm *timeptr;
 
-    current_time = time(NULL);
-    timeptr = NULL;
-    timeptr = localtime(&current_time);
+	current_time = time(NULL);
+	timeptr = NULL;
+	timeptr = localtime(&current_time);
 
-    if (timeptr != NULL) {
-	    printf("date: %s", (asctime(localtime((&current_time)))));
-	    puts("Test PASSED");
-	    return PTS_PASS;
-    } else {
-	    puts("Test FAILED: localtime failed");
-	    return PTS_FAIL;
-    }
+	if (timeptr != NULL) {
+		printf("date: %s", (asctime(localtime((&current_time)))));
+		puts("Test PASSED");
+		return PTS_PASS;
+	} else {
+		puts("Test FAILED: localtime failed");
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlock/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlock/10-1.c
index d101342..371e519 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlock/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlock/10-1.c
@@ -19,35 +19,39 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
-        int result;
-        long page_size;
-        void *ptr, *notpage_ptr;
+int main()
+{
+	int result;
+	long page_size;
+	void *ptr, *notpage_ptr;
 
-        page_size = sysconf(_SC_PAGESIZE);
-        if (errno) {
-                perror("An error occurs when calling sysconf()");
-                return PTS_UNRESOLVED;
-        }
+	page_size = sysconf(_SC_PAGESIZE);
+	if (errno) {
+		perror("An error occurs when calling sysconf()");
+		return PTS_UNRESOLVED;
+	}
 
 	ptr = malloc(page_size);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
-	notpage_ptr = ((long)ptr % page_size) ? ptr : ptr+1;
+	notpage_ptr = ((long)ptr % page_size) ? ptr : ptr + 1;
 
 	result = mlock(notpage_ptr, page_size - 1);
 
 	if (result == 0) {
-		printf("mlock() does not require that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
+		printf
+		    ("mlock() does not require that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
 		return PTS_PASS;
 	} else if (result == -1 && errno == EINVAL) {
-		printf("mlock() requires that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
+		printf
+		    ("mlock() requires that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else if (result != -1) {
 		printf("mlock() returns a value of %i instead of 0 or 1.\n",
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlock/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlock/12-1.c
index ff0de88..0056c22 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlock/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlock/12-1.c
@@ -31,8 +31,8 @@
 int set_nonroot()
 {
 	struct passwd *pw;
-        struct rlimit rlim;
-        int ret=0;
+	struct rlimit rlim;
+	int ret = 0;
 
 	setpwent();
 	/* search for the first user which is non root */
@@ -52,14 +52,15 @@
 	 * and its RLIMIT_MEMLOCK soft resource limit was 0.
 	 */
 
-        rlim.rlim_cur = 0;
-        rlim.rlim_max = 0;
-        if ((ret = setrlimit(RLIMIT_MEMLOCK,&rlim)) != 0)
-                printf("Failed at setrlimit() return %d \n", ret);
+	rlim.rlim_cur = 0;
+	rlim.rlim_max = 0;
+	if ((ret = setrlimit(RLIMIT_MEMLOCK, &rlim)) != 0)
+		printf("Failed at setrlimit() return %d \n", ret);
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -71,23 +72,24 @@
 	return 0;
 }
 
-int main() {
-        int result;
-        void *ptr;
+int main()
+{
+	int result;
+	void *ptr;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	ptr = malloc(BUFSIZE);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
 	result = mlock(ptr, BUFSIZE);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlock/5-1.c
index 6a7dfc4..cd27ccb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlock/5-1.c
@@ -18,15 +18,16 @@
 
 #define BUFSIZE 8
 
-int main() {
+int main()
+{
 	int result;
 	void *ptr;
 
 	ptr = malloc(BUFSIZE);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
 	result = mlock(ptr, BUFSIZE);
 	if (result == 0 && errno == 0) {
@@ -36,7 +37,8 @@
 		printf("mlock did not return a value of zero\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlock/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlock/8-1.c
index a4a7bab..80310e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlock/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlock/8-1.c
@@ -23,25 +23,27 @@
 
 #define BUFSIZE 8
 
-int main() {
-        int result;
+int main()
+{
+	int result;
 	long page_size;
 	void *page_ptr;
 
 	page_size = sysconf(_SC_PAGESIZE);
-        if (errno) {
-                perror("An error occurs when calling sysconf()");
-                return PTS_UNRESOLVED;
-        }
+	if (errno) {
+		perror("An error occurs when calling sysconf()");
+		return PTS_UNRESOLVED;
+	}
 
-	page_ptr = (void*)(LONG_MAX - (LONG_MAX % page_size));
+	page_ptr = (void *)(LONG_MAX - (LONG_MAX % page_size));
 	result = mlock(page_ptr, BUFSIZE);
 
 	if (result == -1 && errno == ENOMEM) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
 		perror("Unexpected error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlock/speculative/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlock/speculative/12-1.c
index 2fd20e3..72ba3e2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlock/speculative/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlock/speculative/12-1.c
@@ -12,7 +12,7 @@
  * (Linux 2.6.9 and later) and its RLIMIT_MEMLOCK soft resource limit set to 0.
  */
 
-#define _GNU_SOURCE 1 /* XXX: Read baloney below about CAP_* */
+#define _GNU_SOURCE 1		/* XXX: Read baloney below about CAP_* */
 #define _XOPEN_SOURCE 600
 
 #include <sys/mman.h>
@@ -32,8 +32,8 @@
 int set_nonroot()
 {
 	struct passwd *pw;
-        struct rlimit rlim;
-        int ret=0;
+	struct rlimit rlim;
+	int ret = 0;
 
 	setpwent();
 	/* search for the first user which is non root */
@@ -53,14 +53,15 @@
 	 * and its RLIMIT_MEMLOCK soft resource limit was 0.
 	 */
 
-        rlim.rlim_cur = 0;
-        rlim.rlim_max = 0;
-        if ((ret = setrlimit(RLIMIT_MEMLOCK,&rlim)) != 0)
-                printf("Failed at setrlimit() return %d \n", ret);
+	rlim.rlim_cur = 0;
+	rlim.rlim_max = 0;
+	if ((ret = setrlimit(RLIMIT_MEMLOCK, &rlim)) != 0)
+		printf("Failed at setrlimit() return %d \n", ret);
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -72,23 +73,24 @@
 	return 0;
 }
 
-int main() {
-        int result;
-        void *ptr;
+int main()
+{
+	int result;
+	void *ptr;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	ptr = malloc(BUFSIZE);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
 	result = mlock(ptr, BUFSIZE);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-1.c
index d3a763b..b2ea9b1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-1.c
@@ -16,7 +16,8 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int result;
 
 	result = mlockall(0);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-2.c
index 9541bd3..23a035a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-2.c
@@ -16,10 +16,11 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int result;
 
-	result = mlockall(~(MCL_CURRENT|MCL_FUTURE));
+	result = mlockall(~(MCL_CURRENT | MCL_FUTURE));
 
 	if (result == -1 && errno == EINVAL) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/15-1.c
index d6a9216..e84a134 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/15-1.c
@@ -28,8 +28,8 @@
 int set_nonroot()
 {
 	struct passwd *pw;
-        struct rlimit rlim;
-        int ret=0;
+	struct rlimit rlim;
+	int ret = 0;
 
 	setpwent();
 	/* search for the first user which is non root */
@@ -42,14 +42,15 @@
 		return 1;
 	}
 
-        rlim.rlim_cur = 0;
-        rlim.rlim_max = 0;
-        if ((ret = setrlimit(RLIMIT_MEMLOCK,&rlim)) != 0)
-                printf("Failed at setrlimit() return %d \n", ret);
+	rlim.rlim_cur = 0;
+	rlim.rlim_max = 0;
+	if ((ret = setrlimit(RLIMIT_MEMLOCK, &rlim)) != 0)
+		printf("Failed at setrlimit() return %d \n", ret);
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -61,16 +62,17 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int result;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	result = mlockall(MCL_CURRENT);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-6.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-6.c
index 872c842..2835944 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-6.c
@@ -29,7 +29,8 @@
 #define BUF_SIZE 8
 #define SHM_NAME "/posixtest_3-6"
 
-int main() {
+int main()
+{
 	void *page_ptr;
 	size_t page_size;
 	int result, fd;
@@ -41,7 +42,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -62,21 +63,23 @@
 
 	if (mlockall(MCL_CURRENT) == -1) {
 		if (errno == EPERM) {
-			printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		} else {
 			perror("An error occurs when calling mlockall()");
 		}
 		return PTS_UNRESOLVED;
 	}
 
-	page_ptr = (void*) ((long)foo - ((long)foo % page_size));
+	page_ptr = (void *)((long)foo - ((long)foo % page_size));
 
-	result = msync(page_ptr, page_size, MS_SYNC|MS_INVALIDATE);
+	result = msync(page_ptr, page_size, MS_SYNC | MS_INVALIDATE);
 	if (result == -1 && errno == EBUSY) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result == 0) {
-		printf("The shared memory pages of the process are not locked.\n");
+		printf
+		    ("The shared memory pages of the process are not locked.\n");
 		return PTS_FAIL;
 	}
 	perror("Unexpected error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
index 0ad6d8f..fd4bf1a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
@@ -19,7 +19,8 @@
 #include <fcntl.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	void *page_ptr;
 	size_t page_size;
 	int result, fd;
@@ -40,28 +41,30 @@
 	unlink(filename);
 
 	foo = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
-		if (foo == MAP_FAILED) {
+	if (foo == MAP_FAILED) {
 		perror("An error occurs when calling mmap()");
 		return PTS_UNRESOLVED;
 	}
 
 	if (mlockall(MCL_CURRENT) == -1) {
 		if (errno == EPERM) {
-			printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		} else {
 			perror("An error occurs when calling mlockall()");
 		}
 		return PTS_UNRESOLVED;
 	}
 
-	page_ptr = (void*) ((long)foo - ((long)foo % page_size));
+	page_ptr = (void *)((long)foo - ((long)foo % page_size));
 
-	result = msync(page_ptr, page_size, MS_SYNC|MS_INVALIDATE);
+	result = msync(page_ptr, page_size, MS_SYNC | MS_INVALIDATE);
 	if (result == -1 && errno == EBUSY) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result == 0) {
-		printf("The mapped files pages of the process are not locked.\n");
+		printf
+		    ("The mapped files pages of the process are not locked.\n");
 		return PTS_FAIL;
 	}
 	perror("Unexpected error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/8-1.c
index dd6a9bc..41deb93 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/8-1.c
@@ -15,7 +15,8 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int result;
 
 	result = mlockall(MCL_CURRENT);
@@ -26,7 +27,8 @@
 		printf("mlockall did not return a value of zero\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/15-1.c
index d6a9216..e84a134 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/15-1.c
@@ -28,8 +28,8 @@
 int set_nonroot()
 {
 	struct passwd *pw;
-        struct rlimit rlim;
-        int ret=0;
+	struct rlimit rlim;
+	int ret = 0;
 
 	setpwent();
 	/* search for the first user which is non root */
@@ -42,14 +42,15 @@
 		return 1;
 	}
 
-        rlim.rlim_cur = 0;
-        rlim.rlim_max = 0;
-        if ((ret = setrlimit(RLIMIT_MEMLOCK,&rlim)) != 0)
-                printf("Failed at setrlimit() return %d \n", ret);
+	rlim.rlim_cur = 0;
+	rlim.rlim_max = 0;
+	if ((ret = setrlimit(RLIMIT_MEMLOCK, &rlim)) != 0)
+		printf("Failed at setrlimit() return %d \n", ret);
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -61,16 +62,17 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int result;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	result = mlockall(MCL_CURRENT);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/10-1.c
index 65b4f97..62518ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/10-1.c
@@ -60,7 +60,8 @@
 	}
 
 	for (cnt = 0; cnt < LOOP_NUM; cnt++) {
-		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
+			  0);
 		if (pa == MAP_FAILED) {
 			printf("Test FAILED: Error at mmap: %s\n",
 			       strerror(errno));
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c
index 247144e..2b44815 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c
@@ -87,8 +87,8 @@
 			if (pa[i] != 0) {
 				printf("Test FAILED: The partial page at the "
 				       "end of an object is not zero-filled\n");
-			return PTS_FAIL;
-		}
+				return PTS_FAIL;
+			}
 
 		/* Write the partial page */
 		pa[len + 1] = 'b';
@@ -100,7 +100,7 @@
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
 	default:
-	break;
+		break;
 	}
 
 	wait(&exit_val);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c
index 027c9f8..448e5a2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c
@@ -86,8 +86,8 @@
 			if (pa[i] != 0) {
 				printf("Test FAILED: The partial page at the "
 				       "end of an object is not zero-filled\n");
-			return PTS_FAIL;
-		}
+				return PTS_FAIL;
+			}
 
 		/* Write the partial page */
 		pa[len + 1] = 'b';
@@ -98,7 +98,7 @@
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
 	default:
-	break;
+		break;
 	}
 
 	wait(&exit_val);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c
index 94d430e..632bd81 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c
@@ -86,8 +86,8 @@
 			if (pa[i] != 0) {
 				printf("Test FAILED: The partial page at the "
 				       "end of an object is not zero-filled\n");
-			return PTS_FAIL;
-		}
+				return PTS_FAIL;
+			}
 
 		/* Write the partial page */
 		pa[len + 1] = 'b';
@@ -98,7 +98,7 @@
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
 	default:
-	break;
+		break;
 	}
 
 	wait(&exit_val);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c
index b03949b..5b89cf1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c
@@ -66,14 +66,14 @@
 
 	/* Fill the buffer */
 	for (i = 0; i < size; i++)
-		((char *)pa)[i] = (13*i)%21;
+		((char *)pa)[i] = (13 * i) % 21;
 
 	/* Force the data to be written to disk */
 	msync(pa, size, MS_SYNC);
 
 	/* Check if the buffer still contains data */
 	for (i = 0; i < size; i++) {
-		if (((char *)pa)[i] != (13*i)%21) {
+		if (((char *)pa)[i] != (13 * i) % 21) {
 			printf("FAILED: Mapped buffer was not preserved\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c
index 7808cc7..fbc2d7e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c
@@ -83,8 +83,7 @@
 	printf("Time before mmap(): %ld\n", time(NULL));
 	pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	if (pa == MAP_FAILED) {
-		printf("Error at mmap: %s\n",
-		       strerror(errno));
+		printf("Error at mmap: %s\n", strerror(errno));
 		unlink(tmpfname);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/18-1.c
index e501dbb..76ac702 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/18-1.c
@@ -77,7 +77,7 @@
 	int fd;
 
 	size_t memlock_size;
-	struct rlimit rlim = {.rlim_max = RLIM_INFINITY};
+	struct rlimit rlim = {.rlim_max = RLIM_INFINITY };
 
 	/* Lock all memory page to be mapped */
 	if (mlockall(MCL_FUTURE) == -1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
index e4131aa..de51d43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
@@ -71,8 +71,7 @@
 	len = shm_size;
 	pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	if (pa == MAP_FAILED) {
-		printf("Error at first mmap(): %s\n",
-		       strerror(errno));
+		printf("Error at first mmap(): %s\n", strerror(errno));
 		exit(PTS_FAIL);
 	}
 
@@ -92,10 +91,10 @@
 	}
 	printf("addr: %lx, len: %lx\n", (unsigned long)addr,
 	       (unsigned long)len);
-	pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0);
+	pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd,
+		  0);
 	if (pa == MAP_FAILED && errno == ENOMEM) {
-		printf("Got ENOMEM: %s\nTest PASSED\n",
-		       strerror(errno));
+		printf("Got ENOMEM: %s\nTest PASSED\n", strerror(errno));
 		exit(PTS_PASS);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/27-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/27-1.c
index d43aa4d..9ee4779 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/27-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/27-1.c
@@ -79,7 +79,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	pa = mmap(pa, len/2, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0);
+	pa = mmap(pa, len / 2, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0);
 
 	if (pa == MAP_FAILED) {
 		if (errno != ENOTSUP) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/3-1.c
index e9df248..d22362d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/3-1.c
@@ -58,11 +58,11 @@
 	/* Size of the file */
 	total_size = 2 * page_size;
 
-	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_3_1_%d_1", getpid());
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_3_1_%d_1",
+		 getpid());
 	snprintf(tmpfname2, sizeof(tmpfname2), "/tmp/pts_mmap_3_1_%d_2",
 		 getpid());
 
-
 	unlink(tmpfname);
 	unlink(tmpfname2);
 
@@ -106,7 +106,9 @@
 	}
 
 	/* Replace orginal mapping */
-	pa2 = mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2, 0);
+	pa2 =
+	    mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2,
+		 0);
 	if (pa2 == MAP_FAILED) {
 		printf("Error at 2nd mmap: %s\n", strerror(errno));
 		return PTS_FAIL;
@@ -138,4 +140,3 @@
 	return PTS_UNRESOLVED;
 }
 #endif /* MAP_FIXED */
-
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
index da2bb03..4e03068 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
@@ -46,7 +46,7 @@
 	off_t off = 0;
 
 	/* check for 64 bit arch */
-	if (sizeof(void*) == 8) {
+	if (sizeof(void *) == 8) {
 		printf("USUPPORTED: Cannot be tested on 64 bit architecture\n");
 		return PTS_UNSUPPORTED;
 	}
@@ -63,7 +63,7 @@
 	unlink(tmpfname);
 
 	/* Set lenght to maximal multiple of page size */
-	len = ~((size_t)0) & (~(page_size - 1));
+	len = ~((size_t) 0) & (~(page_size - 1));
 
 	/*
 	 * Now we need offset that fits into 32 bit
@@ -71,10 +71,11 @@
 	 * enough so that offset + PAGE_ALIGN(len) / page_size
 	 * overflows 32 bits.
 	 */
-	off = ((off_t)~((size_t)0)) * page_size;
+	off = ((off_t) ~ ((size_t) 0)) * page_size;
 	off &= ~(page_size - 1);
 
-	printf("off: %llx, len: %llx\n", (unsigned long long)off, (unsigned long long)len);
+	printf("off: %llx, len: %llx\n", (unsigned long long)off,
+	       (unsigned long long)len);
 
 	pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off);
 	if (pa == MAP_FAILED && errno == EOVERFLOW) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
index ab84756..d938885 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c
@@ -39,23 +39,23 @@
 };
 
 struct testcase testcases[] = {
-	{.flags = MAP_SHARED, .prot = PROT_NONE},
-	{.flags = MAP_SHARED, .prot = PROT_READ},
-	{.flags = MAP_SHARED, .prot = PROT_WRITE},
-	{.flags = MAP_SHARED, .prot = PROT_EXEC},
-	{.flags = MAP_SHARED, .prot = PROT_READ | PROT_WRITE},
-	{.flags = MAP_SHARED, .prot = PROT_READ | PROT_EXEC},
-	{.flags = MAP_SHARED, .prot = PROT_EXEC | PROT_WRITE},
-	{.flags = MAP_SHARED, .prot = PROT_READ | PROT_WRITE | PROT_EXEC},
+	{.flags = MAP_SHARED,.prot = PROT_NONE},
+	{.flags = MAP_SHARED,.prot = PROT_READ},
+	{.flags = MAP_SHARED,.prot = PROT_WRITE},
+	{.flags = MAP_SHARED,.prot = PROT_EXEC},
+	{.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE},
+	{.flags = MAP_SHARED,.prot = PROT_READ | PROT_EXEC},
+	{.flags = MAP_SHARED,.prot = PROT_EXEC | PROT_WRITE},
+	{.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE | PROT_EXEC},
 
-	{.flags = MAP_PRIVATE, .prot = PROT_NONE},
-	{.flags = MAP_PRIVATE, .prot = PROT_READ},
-	{.flags = MAP_PRIVATE, .prot = PROT_WRITE},
-	{.flags = MAP_PRIVATE, .prot = PROT_EXEC},
-	{.flags = MAP_PRIVATE, .prot = PROT_READ | PROT_WRITE},
-	{.flags = MAP_PRIVATE, .prot = PROT_READ | PROT_EXEC},
-	{.flags = MAP_PRIVATE, .prot = PROT_EXEC | PROT_WRITE},
-	{.flags = MAP_PRIVATE, .prot = PROT_READ | PROT_WRITE | PROT_EXEC},
+	{.flags = MAP_PRIVATE,.prot = PROT_NONE},
+	{.flags = MAP_PRIVATE,.prot = PROT_READ},
+	{.flags = MAP_PRIVATE,.prot = PROT_WRITE},
+	{.flags = MAP_PRIVATE,.prot = PROT_EXEC},
+	{.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE},
+	{.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_EXEC},
+	{.flags = MAP_PRIVATE,.prot = PROT_EXEC | PROT_WRITE},
+	{.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE | PROT_EXEC},
 };
 
 static void print_error(struct testcase *t, int saved_errno)
@@ -77,10 +77,10 @@
 	switch (t->flags) {
 	case MAP_SHARED:
 		printf("with MAP_SHARED");
-	break;
+		break;
 	case MAP_PRIVATE:
 		printf("with MAP_PRIVATE");
-	break;
+		break;
 	}
 
 	printf(" has failed: %s\n", strerror(saved_errno));
@@ -106,9 +106,10 @@
 		return PTS_UNRESOLVED;
 	}
 
-	for (i = 0; i < sizeof(testcases)/sizeof(*testcases); i++) {
+	for (i = 0; i < sizeof(testcases) / sizeof(*testcases); i++) {
 
-		pa = mmap(NULL, size, testcases[i].prot, testcases[i].flags, fd, 0);
+		pa = mmap(NULL, size, testcases[i].prot, testcases[i].flags, fd,
+			  0);
 
 		if (pa == MAP_FAILED) {
 			if (errno != ENOTSUP) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-1.c
index caf5a33..476ba58 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-1.c
@@ -47,7 +47,6 @@
 	size_t size = 1024;
 	int fd;
 
-
 	pid_t child;
 	int status;
 	int sig_num;
@@ -66,27 +65,25 @@
 	switch (child) {
 	case 0:
 		if (ftruncate(fd, size) == -1) {
-			printf("Error at ftruncate(): %s\n",
-			       strerror(errno));
+			printf("Error at ftruncate(): %s\n", strerror(errno));
 			return PTS_UNRESOLVED;
 		}
 
 		pa = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
 		if (pa == MAP_FAILED) {
-			printf("Error at mmap: %s\n",
-			       strerror(errno));
+			printf("Error at mmap: %s\n", strerror(errno));
 			return PTS_FAIL;
 		}
 
 		*(char *)pa = 'b';
 		return 0;
-	break;
+		break;
 	case -1:
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
-	break;
+		break;
 	default:
-	break;
+		break;
 	}
 
 	waitpid(child, &status, WUNTRACED);
@@ -97,17 +94,16 @@
 		printf("Child process terminated by signal %d\n", sig_num);
 		if (sig_num == SIGSEGV) {
 			printf("Got SIGSEGV when writing to the mapped memory, "
-			       "without setting PROT_WRITE\n"
-			       "Test PASSED\n");
+			       "without setting PROT_WRITE\n" "Test PASSED\n");
 			return PTS_PASS;
 		}
 	}
 
 	if (WIFEXITED(status)) {
 		if (WEXITSTATUS(status) == 0) {
-			printf("Did not got SIGSEGV when writing to the mapped memory,"
-			       " without setting PROT_WRITE\n"
-			       "Test FAILED\n");
+			printf
+			    ("Did not got SIGSEGV when writing to the mapped memory,"
+			     " without setting PROT_WRITE\n" "Test FAILED\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c
index f840aea..8697aba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c
@@ -85,13 +85,13 @@
 			return PTS_FAIL;
 		}
 		return 0;
-	break;
+		break;
 	case -1:
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
-	break;
+		break;
 	default:
-	break;
+		break;
 	}
 
 	waitpid(child, &status, 0);
@@ -102,17 +102,16 @@
 		printf("Child process terminated by signal %d\n", sig_num);
 		if (sig_num == SIGSEGV) {
 			printf("Got SIGSEGV when reading the mapped memory, "
-			       "setting PROT_NOTE\n"
-			       "Test PASSED\n");
+			       "setting PROT_NOTE\n" "Test PASSED\n");
 			return PTS_PASS;
 		}
 	}
 
 	if (WIFEXITED(status)) {
 		if (WEXITSTATUS(status) == 0) {
-			printf("Did not got SIGSEGV when reading the mapped memory, "
-			       "setting PROT_NOTE\n"
-			       "Test FAILED\n");
+			printf
+			    ("Did not got SIGSEGV when reading the mapped memory, "
+			     "setting PROT_NOTE\n" "Test FAILED\n");
 			return PTS_FAIL;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-3.c
index 593ff6b..0d479f0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-3.c
@@ -73,13 +73,13 @@
 		/* Write acess */
 		*(char *)pa = 'b';
 		return 0;
-	break;
+		break;
 	case -1:
 		perror("fork()");
 		return PTS_UNRESOLVED;
-	break;
+		break;
 	default:
-	break;
+		break;
 	}
 
 	waitpid(child, &status, 0);
@@ -90,17 +90,16 @@
 		printf("Child process terminated by signal %d\n", sig_num);
 		if (sig_num == SIGSEGV) {
 			printf("Got SIGSEGV when writing to the mapped memory, "
-			       "setting PROT_NOTE\n"
-			       "Test PASSED\n");
+			       "setting PROT_NOTE\n" "Test PASSED\n");
 			return PTS_PASS;
 		}
 	}
 
 	if (WIFEXITED(status)) {
 		if (WEXITSTATUS(status) == 0) {
-			printf("Did not got SIGSEGV when writing to the mapped memory, "
-			       "setting PROT_NOTE\n"
-			       "Test FAILED\n");
+			printf
+			    ("Did not got SIGSEGV when writing to the mapped memory, "
+			     "setting PROT_NOTE\n" "Test FAILED\n");
 			return PTS_FAIL;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-4.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-4.c
index 598822c..406c4cf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-4.c
@@ -65,13 +65,11 @@
 	pa = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, 0);
 	if (pa == MAP_FAILED && errno == EACCES) {
 		printf("EACCES on attempt to map readonly file as "
-		       "PROT_WRITE, MAP_SHARED\n"
-		       "Test PASSED\n");
+		       "PROT_WRITE, MAP_SHARED\n" "Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	printf("Maping readonly file with PROT_WRITE, MAP_SHARED have not "
-	       "returned EACCES\n"
-	       "Test FAILED\n");
+	       "returned EACCES\n" "Test FAILED\n");
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-5.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-5.c
index d893cf0..5649925 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-5.c
@@ -71,7 +71,6 @@
 	close(fd);
 
 	printf("Succesfully mapped readonly file with "
-	       "PROT_WRITE, MAP_PRIVATE\n"
-	       "Test PASSED\n");
+	       "PROT_WRITE, MAP_PRIVATE\n" "Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-6.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-6.c
index db707f6..eef3cf4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-6.c
@@ -64,13 +64,11 @@
 	pa = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
 	if (pa == MAP_FAILED && errno == EACCES) {
 		printf("EACCES on attempt to map writeonly file as "
-		       "PROT_READ\n"
-		       "Test PASSED\n");
+		       "PROT_READ\n" "Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	printf("Mapping writeonly file with PROT_READ have not "
-	       "returned EACCES\n"
-	       "Test FAILED\n");
+	       "returned EACCES\n" "Test FAILED\n");
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c
index 45fd3d9..0236eeb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c
@@ -88,8 +88,7 @@
 
 	if (*(char *)pa == 'b') {
 		printf("Memory write with MAP_SHARED has changed "
-		       "the underlying file\n"
-		       "Test PASSED\n");
+		       "the underlying file\n" "Test PASSED\n");
 
 		close(fd);
 		munmap(pa, size);
@@ -101,7 +100,6 @@
 	munmap(pa, size);
 
 	printf("Memory write with MAP_SHARED has not changed "
-	       "the underlying file\n"
-	       "Test FAILED\n");
+	       "the underlying file\n" "Test FAILED\n");
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c
index 968bede..4570b39 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c
@@ -88,14 +88,12 @@
 
 	if (*(char *)pa == 'b') {
 		printf("Memory write with MAP_PRIVATE has changed "
-		       "the underlying file\n"
-		       "Test FAILED\n");
+		       "the underlying file\n" "Test FAILED\n");
 		exit(PTS_FAIL);
 	}
 
 	close(fd);
 	printf("Memory write with MAP_PRIVATE has not changed "
-	       "the underlying file\n"
-	       "Test PASSED\n");
+	       "the underlying file\n" "Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-3.c
index 8d0a0ff..3d2ee74 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-3.c
@@ -77,7 +77,8 @@
 	switch (child) {
 	case 0:
 		/* Mmap again the same shared memory to child's memory */
-		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd,
+			  0);
 		if (pa == MAP_FAILED) {
 			printf("Error at mmap(): %s\n", strerror(errno));
 			return PTS_FAIL;
@@ -93,11 +94,11 @@
 		       "not change the underlying shared memory object\n"
 		       "Test PASSED\n");
 		return PTS_PASS;
-	break;
+		break;
 	case -1:
 		printf("Error at fork(): %s\n", strerror(errno));
 		return PTS_UNRESOLVED;
-	break;
+		break;
 	default:
 		waitpid(child, &exit_stat, WUNTRACED);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-4.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-4.c
index 4486715..52f47cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-4.c
@@ -79,7 +79,8 @@
 	switch (child) {
 	case 0:
 		/* Mmap again the same shared memory to child's memory */
-		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, shm_fd, 0);
+		pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+			  shm_fd, 0);
 		if (pa == MAP_FAILED) {
 			printf("child: Error at mmap: %s\n", strerror(errno));
 			return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/1-1.c
index bb87136..25cb037 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/1-1.c
@@ -30,7 +30,7 @@
 	sprintf(qname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
index 72b12da..4b01cf6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
@@ -100,7 +100,7 @@
 	char reply;
 
 	queue = open_queue(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		return PTS_UNRESOLVED;
 	}
 
@@ -113,7 +113,6 @@
 		mq_unlink(qname);
 		return PTS_UNRESOLVED;
 	}
-
 	// send 'a' - signal child to verify it can't call notify
 	rval = send_receive(read_pipe, write_pipe, 'a', &reply);
 	if (rval) {
@@ -123,13 +122,11 @@
 	}
 
 	if (reply != 'b') {
-		puts(ERROR_PREFIX "send_receive: "
-		     "expected a 'b'");
+		puts(ERROR_PREFIX "send_receive: " "expected a 'b'");
 		mq_close(queue);
 		mq_unlink(qname);
 		return PTS_UNRESOLVED;
 	}
-
 	// close the queue to perform test
 	rval = mq_close(queue);
 	mq_unlink(qname);
@@ -169,25 +166,20 @@
 	}
 
 	if (reply != 'a') {
-		puts(ERROR_PREFIX "send_receive: "
-		     "expected an 'a'");
+		puts(ERROR_PREFIX "send_receive: " "expected an 'a'");
 		return PTS_UNRESOLVED;
 	}
-
 	// open the queue and attempt to set up notification
 	queue = open_queue(qname, O_RDWR, 0);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		return PTS_UNRESOLVED;
 	}
-
 	// try notify while parent still has queue open - should fail
 	se.sigev_notify = SIGEV_SIGNAL;
 	if (!mq_notify(queue, &se)) {
-		puts(ERROR_PREFIX "mq_notify (2): "
-		     "should have failed");
+		puts(ERROR_PREFIX "mq_notify (2): " "should have failed");
 		return PTS_UNRESOLVED;
 	}
-
 	// send 'b' - signal parent to close queue
 	rval = send_receive(read_pipe, write_pipe, 'b', &reply);
 	if (rval) {
@@ -195,34 +187,34 @@
 	}
 
 	if (reply != 'c') {
-		puts(ERROR_PREFIX "send_receive: "
-		     "expected a 'c'");
+		puts(ERROR_PREFIX "send_receive: " "expected a 'c'");
 		return PTS_UNRESOLVED;
 	}
-
 	// try notify after parent closed queue - should succeed
 	se.sigev_notify = SIGEV_SIGNAL;
 	se.sigev_signo = 0;
 	rval = mq_notify(queue, &se);
 
 	// send 'd' for success and 'e' for failure
-	send_receive(read_pipe, write_pipe, rval ? 'e':'d', NULL);
+	send_receive(read_pipe, write_pipe, rval ? 'e' : 'd', NULL);
 
 	return 0;
 }
 
-mqd_t open_queue(char *qname, int oflag, int mode) {
+mqd_t open_queue(char *qname, int oflag, int mode)
+{
 	mqd_t queue;
 
 	queue = mq_open(qname, oflag, mode, NULL);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 	}
 
 	return queue;
 }
 
-int send_receive(int read_pipe, int write_pipe, char send, char *reply) {
+int send_receive(int read_pipe, int write_pipe, char send, char *reply)
+{
 	ssize_t bytes;
 
 	if (send) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-1.c
index 3751ec0..0606396 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-1.c
@@ -35,7 +35,7 @@
 	sprintf(qname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-2.c
index 86910e8..2bd5a73 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-2.c
@@ -19,7 +19,7 @@
 
 int main()
 {
-	if (mq_close((mqd_t)-1) != -1) {
+	if (mq_close((mqd_t) - 1) != -1) {
 		printf("mq_close() did not return -1 on invalid descriptor\n");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-3.c
index f27d617..b9e8baf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-3.c
@@ -22,8 +22,8 @@
 
 int main()
 {
- 	/* Use some arbitrary but high number for the descriptor.  */
- 	if (mq_close((mqd_t)274) != -1) {
+	/* Use some arbitrary but high number for the descriptor.  */
+	if (mq_close((mqd_t) 274) != -1) {
 		printf("mq_close() did not return -1 on invalid descriptor\n");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/4-1.c
index d852cd7..22d5f1d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_close/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_close/4-1.c
@@ -34,7 +34,7 @@
 	sprintf(qname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t)-1) {
+	if (queue == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-1.c
index 5b263e7..d143b5b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-1.c
@@ -47,12 +47,12 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR | MQFLAGS,
-                        S_IRUSR | S_IWUSR, NULL);
-	if (mqdes == (mqd_t)-1) {
+			S_IRUSR | S_IWUSR, NULL);
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
 	if (mq_getattr(mqdes, &mqstat) != 0) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
@@ -62,20 +62,20 @@
 		perror(ERROR_PREFIX "mq_unlink()");
 		return PTS_UNRESOLVED;
 	}
-	if (!(mqstat.mq_flags & MQFLAGS))  {
+	if (!(mqstat.mq_flags & MQFLAGS)) {
 		printf("FAIL: mq_getattr didn't get the correct "
 		       "mq_flags set by mq_open\n");
 		failure = 1;
 	}
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-2.c
index a3a7efa..ca3ca7f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/2-2.c
@@ -41,28 +41,28 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
-	memset(&nmqstat,0,sizeof(nmqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
+	memset(&nmqstat, 0, sizeof(nmqstat));
 	if (mq_getattr(mqdes, &mqstat) == -1) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
 	}
 	mqstat.mq_flags |= MQFLAGS;
-	if (mq_setattr(mqdes, &mqstat, NULL) == -1)	{
+	if (mq_setattr(mqdes, &mqstat, NULL) == -1) {
 		perror(ERROR_PREFIX "mq_setattr");
 		failure = 1;
 	}
-	if (mq_getattr(mqdes, &nmqstat) != 0)	 {
-	        perror(ERROR_PREFIX "mq_getattr");
+	if (mq_getattr(mqdes, &nmqstat) != 0) {
+		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
 	}
-	if (nmqstat.mq_flags != mqstat.mq_flags)  {
+	if (nmqstat.mq_flags != mqstat.mq_flags) {
 		printf("FAIL: mq_getattr didn't get the correct mq_flags "
-                       "set by mq_setattr \n");
+		       "set by mq_setattr \n");
 		failure = 1;
 	}
 
@@ -70,13 +70,13 @@
 	mq_unlink(mqname);
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/3-1.c
index 58fe090..b2e2749 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/3-1.c
@@ -42,23 +42,23 @@
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-	memset(&mqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_msgsize = MSGSIZE;
 	mqstat.mq_maxmsg = MAXMSG;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		return PTS_UNRESOLVED;
 	}
-	memset(&nmqstat,0,sizeof(nmqstat));
+	memset(&nmqstat, 0, sizeof(nmqstat));
 	if (mq_getattr(mqdes, &nmqstat) != 0) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
 	}
 	if ((mqstat.mq_maxmsg != nmqstat.mq_maxmsg) ||
-            (mqstat.mq_msgsize != nmqstat.mq_msgsize)) {
+	    (mqstat.mq_msgsize != nmqstat.mq_msgsize)) {
 		printf("FAIL: mq_getattr didn't get the correct mq_maxmsg, "
-                       "mq_msgsize set by mq_open\n");
+		       "mq_msgsize set by mq_open\n");
 		failure = 1;
 	}
 
@@ -66,13 +66,13 @@
 	mq_unlink(mqname);
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/4-1.c
index 3edea0d..975d09d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/4-1.c
@@ -33,35 +33,34 @@
 
 int main()
 {
-        char mqname[NAMESIZE];
-        const char *msgptr = "test message";
-        mqd_t mqdes;
+	char mqname[NAMESIZE];
+	const char *msgptr = "test message";
+	mqd_t mqdes;
 	struct mq_attr mqstat;
 	int i;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-	memset(&mqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_msgsize = MSGSIZE;
 	mqstat.mq_maxmsg = MAXMSG;
-        mqdes = mq_open(mqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open()");
-                return PTS_UNRESOLVED;
-        }
-	for (i = 0; i < MSG_NUM; i++) {
-        	if (mq_send(mqdes, msgptr, strlen(msgptr), 1) == -1) {
-                	perror(ERROR_PREFIX "mq_send()");
-			unresolved = 1;
-        	}
+	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open()");
+		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
+	for (i = 0; i < MSG_NUM; i++) {
+		if (mq_send(mqdes, msgptr, strlen(msgptr), 1) == -1) {
+			perror(ERROR_PREFIX "mq_send()");
+			unresolved = 1;
+		}
+	}
+	memset(&mqstat, 0, sizeof(mqstat));
 	if (mq_getattr(mqdes, &mqstat) != 0) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
-	}
-	else {
+	} else {
 		if (mqstat.mq_curmsgs != MSG_NUM) {
 			printf("mq_getattr didn't get the correct "
 			       "mq_curmsgs \n");
@@ -72,16 +71,16 @@
 	mq_close(mqdes);
 	mq_unlink(mqname);
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/speculative/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/speculative/7-1.c
index f85924a..9e58a94 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/speculative/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_getattr/speculative/7-1.c
@@ -39,7 +39,7 @@
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
 
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror("mq_open()");
 		return PTS_UNRESOLVED;
 	}
@@ -59,7 +59,7 @@
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	case -1:
-	break;
+		break;
 	default:
 		printf("mq_getattr returned %i\n", ret);
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/1-1.c
index e259b4b..7645ce4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/1-1.c
@@ -40,7 +40,7 @@
 
 void msg_handler()
 {
-        enter_handler = 1;
+	enter_handler = 1;
 }
 
 void mqclean(mqd_t queue, const char *qname)
@@ -61,7 +61,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -86,8 +86,7 @@
 		printf("Test FAILED \n");
 		mqclean(mqdes, mqname);
 		return PTS_FAIL;
-	}
-	else {
+	} else {
 		printf("Test PASSED \n");
 		mqclean(mqdes, mqname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/2-1.c
index cbcd9ef..ae55021 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/2-1.c
@@ -50,7 +50,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -63,23 +63,21 @@
 		return PTS_FAIL;
 	}
 	pid = fork();
-        if (pid == -1) {
-                perror(ERROR_PREFIX "fork");
+	if (pid == -1) {
+		perror(ERROR_PREFIX "fork");
 		mqclean(mqdes, mqname);
-                return PTS_UNRESOLVED;
-        }
-        if (pid == 0) {
-                /* child process */
+		return PTS_UNRESOLVED;
+	}
+	if (pid == 0) {
+		/* child process */
 		if (mq_notify(mqdes, &notification) != -1) {
 			printf("Test FAILED \n");
 			return PTS_FAIL;
-		}
-		else {
+		} else {
 			printf("Test PASSED \n");
 			return PTS_PASS;
 		}
-	}
-	else {
+	} else {
 		/* parent process */
 		wait(&status);
 		mqclean(mqdes, mqname);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/3-1.c
index f91b575..109afe3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/3-1.c
@@ -40,7 +40,7 @@
 
 void msg_handler()
 {
-        enter_handler = 1;
+	enter_handler = 1;
 }
 
 void mqclean(mqd_t queue, const char *qname)
@@ -52,49 +52,48 @@
 int main()
 {
 	char mqname[NAMESIZE];
-        mqd_t mqdes;
-        const char s_msg_ptr[MSG_SIZE] = "test message \n";
-        struct sigevent notification;
-        struct sigaction sa;
-        unsigned int prio = 1;
+	mqd_t mqdes;
+	const char s_msg_ptr[MSG_SIZE] = "test message \n";
+	struct sigevent notification;
+	struct sigaction sa;
+	unsigned int prio = 1;
 
-        sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
-        mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
-                return PTS_UNRESOLVED;
-        }
+	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
+	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
+		return PTS_UNRESOLVED;
+	}
 	notification.sigev_notify = SIGEV_SIGNAL;
-        notification.sigev_signo = SIGUSR1;
-        sa.sa_handler = msg_handler;
-        sa.sa_flags = 0;
-        sigaction(SIGUSR1, &sa, NULL);
-        if (mq_notify(mqdes, &notification) != 0) {
-                perror(ERROR_PREFIX "mq_notify");
+	notification.sigev_signo = SIGUSR1;
+	sa.sa_handler = msg_handler;
+	sa.sa_flags = 0;
+	sigaction(SIGUSR1, &sa, NULL);
+	if (mq_notify(mqdes, &notification) != 0) {
+		perror(ERROR_PREFIX "mq_notify");
 		mqclean(mqdes, mqname);
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 	if (mq_notify(mqdes, NULL) != 0) {
 		printf("Test FAILED \n");
 		mqclean(mqdes, mqname);
 		return PTS_FAIL;
 	}
-        if (mq_send(mqdes, s_msg_ptr, MSG_SIZE, prio) == -1) {
-        	perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, s_msg_ptr, MSG_SIZE, prio) == -1) {
+		perror(ERROR_PREFIX "mq_send");
 		mqclean(mqdes, mqname);
-        	return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 	sleep(1);
 	if (mq_unlink(mqname) != 0) {
-               perror(ERROR_PREFIX "mq_unlink");
-               return PTS_UNRESOLVED;
+		perror(ERROR_PREFIX "mq_unlink");
+		return PTS_UNRESOLVED;
 	}
-        if (!enter_handler) {
+	if (!enter_handler) {
 		printf("Test PASSED \n");
 		mqclean(mqdes, mqname);
 		return PTS_PASS;
-	}
-	else {
+	} else {
 		printf("Test FAILED \n");
 		mqclean(mqdes, mqname);
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/4-1.c
index 32b4583..5d2ce2c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/4-1.c
@@ -37,7 +37,7 @@
 
 void msg_handler()
 {
-        enter_handler = 1;
+	enter_handler = 1;
 }
 
 void mqclean(mqd_t queue, const char *qname)
@@ -45,6 +45,7 @@
 	mq_close(queue);
 	mq_unlink(qname);
 }
+
 int main()
 {
 	char mqname[50];
@@ -57,7 +58,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -86,8 +87,7 @@
 		printf("Test FAILED \n");
 		mqclean(mqdes, mqname);
 		return PTS_FAIL;
-	}
-	else {
+	} else {
 		printf("Test PASSED \n");
 		mqclean(mqdes, mqname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/5-1.c
index 75f74b3..36a8157 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/5-1.c
@@ -48,7 +48,7 @@
 
 void msg_handler()
 {
-        enter_handler = 1;
+	enter_handler = 1;
 }
 
 void mqclean(mqd_t queue, const char *qname)
@@ -65,7 +65,7 @@
 	char r_msg_ptr[MSG_SIZE];
 	struct sigevent notification;
 	struct sigaction sa;
-        unsigned int prio = 1;
+	unsigned int prio = 1;
 	int pid;
 	struct mq_attr attr;
 
@@ -74,44 +74,43 @@
 	attr.mq_maxmsg = BUFFER;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		mqclean(mqdes, mqname);
 		return PTS_UNRESOLVED;
 	}
 
 	pid = fork();
-        if (pid == -1) {
-                perror(ERROR_PREFIX "fork");
+	if (pid == -1) {
+		perror(ERROR_PREFIX "fork");
 		mqclean(mqdes, mqname);
-                return PTS_UNRESOLVED;
-        }
-        if (pid == 0) {
-                /* child process */
+		return PTS_UNRESOLVED;
+	}
+	if (pid == 0) {
+		/* child process */
 		mq_receive(mqdes, r_msg_ptr, MSG_SIZE, NULL);
 		return 0;
-	}
-	else {
+	} else {
 		/* parent process */
-		sleep(2); /* after 2 seconds,
-			      assume that child with block on mq_receive. */
+		sleep(2);	/* after 2 seconds,
+				   assume that child with block on mq_receive. */
 		notification.sigev_notify = SIGEV_SIGNAL;
 		notification.sigev_signo = SIGUSR1;
 		sa.sa_handler = msg_handler;
-       	 	sa.sa_flags = 0;
-        	sigaction(SIGUSR1, &sa, NULL);
+		sa.sa_flags = 0;
+		sigaction(SIGUSR1, &sa, NULL);
 		if (mq_notify(mqdes, &notification) != 0) {
 			perror(ERROR_PREFIX "mq_notify");
 			return PTS_UNRESOLVED;
 		}
 		if (mq_send(mqdes, s_msg_ptr, MSG_SIZE, prio) == -1) {
-	                perror(ERROR_PREFIX "mq_send");
-	                return PTS_UNRESOLVED;
-	        }
+			perror(ERROR_PREFIX "mq_send");
+			return PTS_UNRESOLVED;
+		}
 		sleep(1);
 		if (mq_unlink(mqname) != 0) {
-	                perror(ERROR_PREFIX "mq_unlink");
-	                return PTS_UNRESOLVED;
+			perror(ERROR_PREFIX "mq_unlink");
+			return PTS_UNRESOLVED;
 		}
 		if (enter_handler) {
 			printf("Test FAILED \n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/8-1.c
index b37a0a1..3fcf56a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/8-1.c
@@ -36,7 +36,7 @@
 	mqd_t mqdes;
 	struct sigevent notification;
 
-	mqdes = (mqd_t) -1;
+	mqdes = (mqd_t) - 1;
 
 	notification.sigev_notify = SIGEV_SIGNAL;
 	notification.sigev_signo = SIGUSR1;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/9-1.c
index 6908f70..1db06c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/9-1.c
@@ -49,7 +49,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -62,30 +62,27 @@
 		return PTS_FAIL;
 	}
 	pid = fork();
-        if (pid == -1) {
-                perror(ERROR_PREFIX "fork");
+	if (pid == -1) {
+		perror(ERROR_PREFIX "fork");
 		mqclean(mqdes, mqname);
-                return PTS_UNRESOLVED;
-        }
-        if (pid == 0) {
-                //child process
+		return PTS_UNRESOLVED;
+	}
+	if (pid == 0) {
+		//child process
 		if (mq_notify(mqdes, &notification) == -1) {
 			if (EBUSY == errno) {
 				printf("Test PASSED \n");
 				return PTS_PASS;
-			}
-			else {
+			} else {
 				printf("errno != EBUSY \n");
 				printf("Test FAILED \n");
 				return PTS_FAIL;
 			}
-		}
-		else {
+		} else {
 			printf("Test FAILED \n");
 			return PTS_FAIL;
 		}
-	}
-	else {
+	} else {
 		//parent process
 		wait(&status);
 		mqclean(mqdes, mqname);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/1-1.c
index 1e81832..810fc27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/1-1.c
@@ -34,7 +34,7 @@
 	sprintf(qname, "/mq_open_1-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/11-1.c
index b2b9037..bbcc7c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/11-1.c
@@ -36,7 +36,7 @@
 	sprintf(qname, "/mq_open_11-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
@@ -54,7 +54,7 @@
 	 * Second call should have no effect
 	 */
 	queue2 = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue2 == (mqd_t) -1) {
+	if (queue2 == (mqd_t) - 1) {
 		perror("mq_open() second time did not return success");
 		printf("Test FAILED\n");
 		mq_close(queue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/12-1.c
index 1df71e4..853d237 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/12-1.c
@@ -37,7 +37,7 @@
 	sprintf(qname, "/mq_open_12-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/13-1.c
index 8666647..1d153c4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/13-1.c
@@ -36,7 +36,7 @@
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = MSGSIZE;
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/15-1.c
index 14732e5..f8943ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/15-1.c
@@ -30,7 +30,7 @@
 	sprintf(qname, "/mq_open_15-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -41,7 +41,7 @@
 	 */
 	queue2 = mq_open(qname, O_CREAT | O_EXCL | O_RDWR,
 			 S_IRUSR | S_IWUSR, NULL);
-	if (queue2 != (mqd_t) -1) {
+	if (queue2 != (mqd_t) - 1) {
 		printf("mq_open() should have failed with O_CREAT and\n");
 		printf("O_EXCL on an already opened queue.\n");
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c
index 9aae29b..d44ab30 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c
@@ -48,15 +48,14 @@
 	/*
 	 * initialize both queues
 	 */
-	childqueue = (mqd_t) -1;
-	queue = (mqd_t) -1;
+	childqueue = (mqd_t) - 1;
+	queue = (mqd_t) - 1;
 
 	sprintf(qname, "/mq_open_16-1_%d", getpid());
 
 	sprintf(fname, "/tmp/pts_mq_open_16_1_%d", getpid());
 	unlink(fname);
-	fd = open(fname, O_CREAT | O_RDWR | O_EXCL,
-		 S_IRUSR | S_IWUSR);
+	fd = open(fname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		printf(TNAME " Error at open(): %s\n", strerror(errno));
 		exit(PTS_UNRESOLVED);
@@ -88,7 +87,7 @@
 
 		childqueue = mq_open(qname, O_CREAT | O_EXCL | O_RDWR,
 				     S_IRUSR | S_IWUSR, NULL);
-		if (childqueue != (mqd_t) -1) {
+		if (childqueue != (mqd_t) - 1) {
 			++*(int *)pa;
 #ifdef DEBUG
 			printf("mq_open() in child succeeded\n");
@@ -105,7 +104,7 @@
 
 		queue = mq_open(qname, O_CREAT | O_EXCL | O_RDWR,
 				S_IRUSR | S_IWUSR, NULL);
-		if (queue != (mqd_t) -1) {
+		if (queue != (mqd_t) - 1) {
 			++*(int *)pa;
 #ifdef DEBUG
 			printf("mq_open() in parent succeeded\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/18-1.c
index ceb5f4d..1ba4bb8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/18-1.c
@@ -33,7 +33,7 @@
 
 	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success w/O_NONBLOCK set");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/19-1.c
index b1daeb0..68ec187 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/19-1.c
@@ -51,7 +51,7 @@
 
 	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -73,7 +73,7 @@
 	}
 
 	queue = mq_open(qname, O_RDWR | O_NONBLOCK, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() second time did not return success");
 		printf("Test UNRESOLVED\n");
 		/* close queue and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c
index aa9b732..c3f81eb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c
@@ -77,7 +77,7 @@
 		attr.mq_msgsize = BUFFER;
 		attr.mq_maxmsg = BUFFER;
 		childqueue = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, &attr);
-		if (childqueue == (mqd_t) -1) {
+		if (childqueue == (mqd_t) - 1) {
 			perror("mq_open() did not return success in child");
 			return CHILDFAIL;
 		}
@@ -106,7 +106,7 @@
 		attr.mq_maxmsg = BUFFER;
 		queue = mq_open(qname, O_CREAT | O_RDWR,
 				S_IRUSR | S_IWUSR, &attr);
-		if (queue == (mqd_t) -1) {
+		if (queue == (mqd_t) - 1) {
 			perror("mq_open() did not return success");
 			printf("Test UNRESOLVED\n");
 			/* stop child and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c
index 0b0df03..6ca4d3d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c
@@ -44,7 +44,7 @@
 	sprintf(qname, "/mq_open_20-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/21-1.c
index dff04fa..52ebbf1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/21-1.c
@@ -34,7 +34,7 @@
 	sprintf(qname, "/mq_open_21-1_%d", getpid());
 
 	queue = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("mq_open() did not return (mqd_t)-1 on error\n");
 		mq_close(queue);
 		mq_unlink(qname);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/23-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/23-1.c
index b6dd642..91f0425 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/23-1.c
@@ -31,7 +31,7 @@
 	sprintf(qname, "/mq_open_23-1_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -42,7 +42,7 @@
 	 */
 	queue2 = mq_open(qname, O_CREAT | O_EXCL | O_RDWR,
 			 S_IRUSR | S_IWUSR, NULL);
-	if (queue2 != (mqd_t) -1) {
+	if (queue2 != (mqd_t) - 1) {
 		printf("mq_open() should have failed with O_CREAT and\n");
 		printf("O_EXCL on an already opened queue.\n");
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/25-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/25-2.c
index 499b592..3101915 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/25-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/25-2.c
@@ -43,7 +43,7 @@
 		attr.mq_maxmsg = invalid_values[i];
 		queue = mq_open(qname, O_CREAT | O_RDWR,
 				S_IRUSR | S_IWUSR, &attr);
-		if (queue != (mqd_t) -1) {
+		if (queue != (mqd_t) - 1) {
 			printf("mq_open() succeeded w/invalid mq_maxmsg %ld\n",
 			       attr.mq_maxmsg);
 			mq_close(queue);
@@ -73,7 +73,7 @@
 		attr.mq_msgsize = invalid_values[i];
 		queue = mq_open(qname, O_CREAT | O_RDWR,
 				S_IRUSR | S_IWUSR, &attr);
-		if (queue != (mqd_t) -1) {
+		if (queue != (mqd_t) - 1) {
 			printf("mq_open() succeeded w/invalid mq_msgsize %ld\n",
 			       attr.mq_msgsize);
 			mq_close(queue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-1.c
index 1a0a7bc..a931d35 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-1.c
@@ -35,7 +35,7 @@
 		strcat(qname, "0");
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("mq_open() should have failed with queue name %s\n",
 		       qname);
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-2.c
index 57660ea..f7ace4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/27-2.c
@@ -38,7 +38,7 @@
 		strcat(qname, "0");
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("mq_open() should have failed with queue name %s\n",
 		       qname);
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/29-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/29-1.c
index d49cccf..f45242d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/29-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/29-1.c
@@ -31,7 +31,7 @@
 	sprintf(qname, "/mq_open_29-1_%d", getpid());
 
 	queue = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("mq_open() did not return mqd_t - on error\n");
 		printf("Test FAILED\n");
 		mq_close(queue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/3-1.c
index a245636..3df7a44 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/3-1.c
@@ -30,7 +30,7 @@
 	sprintf(qname, "/mq_open_3-1_%d", getpid());
 
 	queue = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("mq_open() did not return error\n");
 		printf("Test FAILED\n");
 		mq_close(queue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-1.c
index bb1b1c4..246053a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-1.c
@@ -42,7 +42,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	rdwrqueue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (rdwrqueue == (mqd_t) -1) {
+	if (rdwrqueue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -61,7 +61,7 @@
 #endif
 
 	roqueue = mq_open(qname, O_RDONLY, S_IRUSR | S_IWUSR, &attr);
-	if (roqueue == (mqd_t) -1) {
+	if (roqueue == (mqd_t) - 1) {
 		perror("mq_open() for read-only queue did not return success");
 		printf("Test UNRESOLVED\n");
 		/* close read-write queue and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c
index 4d4b8db..bfe6d73 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c
@@ -74,7 +74,7 @@
 		attr.mq_msgsize = BUFFER;
 		attr.mq_maxmsg = BUFFER;
 		roqueue = mq_open(qname, O_RDONLY, S_IRUSR | S_IWUSR, &attr);
-		if (roqueue == (mqd_t) -1) {
+		if (roqueue == (mqd_t) - 1) {
 			perror("mq_open() read only failed");
 			return CHILDFAIL;
 		}
@@ -112,7 +112,7 @@
 		attr.mq_maxmsg = BUFFER;
 		rdwrqueue = mq_open(qname, O_CREAT | O_RDWR,
 				    S_IRUSR | S_IWUSR, &attr);
-		if (rdwrqueue == (mqd_t) -1) {
+		if (rdwrqueue == (mqd_t) - 1) {
 			perror("mq_open() did not return success");
 			printf("Test UNRESOLVED\n");
 			/* kill child and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-3.c
index 72387e5..fc9340e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-3.c
@@ -33,14 +33,14 @@
 	sprintf(qname, "/mq_open_7-3_%d", getpid());
 
 	roqueue = mq_open(qname, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR, NULL);
-	if (roqueue == (mqd_t) -1) {
+	if (roqueue == (mqd_t) - 1) {
 		perror("mq_open() for read-only queue did not return success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	roqueue2 = mq_open(qname, O_RDONLY, S_IRUSR | S_IWUSR, NULL);
-	if (roqueue2 == (mqd_t) -1) {
+	if (roqueue2 == (mqd_t) - 1) {
 		perror("Second mq_open() for rd-only queue didn't ret success");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-1.c
index 38677e6..3c6e03f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-1.c
@@ -42,7 +42,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	woqueue = mq_open(qname, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR, &attr);
-	if (woqueue == (mqd_t) -1) {
+	if (woqueue == (mqd_t) - 1) {
 		perror("mq_open() for write-only queue did not return success");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -73,7 +73,7 @@
 #endif
 
 	woqueue2 = mq_open(qname, O_WRONLY, S_IRUSR | S_IWUSR, &attr);
-	if (woqueue2 == (mqd_t) -1) {
+	if (woqueue2 == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
 		/* close woqueue and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c
index 6bfbef4..a435434 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c
@@ -74,7 +74,7 @@
 		attr.mq_msgsize = BUFFER;
 		attr.mq_maxmsg = BUFFER;
 		woqueue = mq_open(qname, O_WRONLY, S_IRUSR | S_IWUSR, &attr);
-		if (woqueue == (mqd_t) -1) {
+		if (woqueue == (mqd_t) - 1) {
 			perror("mq_open() read only failed in child");
 			return CHILDFAIL;
 		}
@@ -114,7 +114,7 @@
 		attr.mq_maxmsg = BUFFER;
 		woqueue = mq_open(qname, O_CREAT | O_WRONLY,
 				  S_IRUSR | S_IWUSR, &attr);
-		if (woqueue == (mqd_t) -1) {
+		if (woqueue == (mqd_t) - 1) {
 			perror("mq_open() did not return success");
 			printf("Test UNRESOLVED\n");
 			/* kill child and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-1.c
index 3f1a1ec..b98705f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-1.c
@@ -46,7 +46,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	rdwrqueue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (rdwrqueue == (mqd_t) -1) {
+	if (rdwrqueue == (mqd_t) - 1) {
 		perror("mq_open() did not return success on read-write queue");
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
@@ -77,7 +77,7 @@
 #endif
 
 	rdwrqueue2 = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (rdwrqueue2 == (mqd_t) -1) {
+	if (rdwrqueue2 == (mqd_t) - 1) {
 		perror("mq_open() did not return success on read-write queue");
 		/* close rdwrqueue and exit */
 		mq_close(rdwrqueue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c
index 81bd76f..3db3c43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c
@@ -75,7 +75,7 @@
 		attr.mq_maxmsg = BUFFER;
 		rdwrqueuechild = mq_open(qname, O_RDWR,
 					 S_IRUSR | S_IWUSR, &attr);
-		if (rdwrqueuechild == (mqd_t) -1) {
+		if (rdwrqueuechild == (mqd_t) - 1) {
 			perror("mq_open() read only failed");
 			return CHILDFAIL;
 		}
@@ -117,7 +117,7 @@
 		attr.mq_maxmsg = BUFFER;
 		rdwrqueue = mq_open(qname, O_CREAT | O_RDWR,
 				    S_IRUSR | S_IWUSR, &attr);
-		if (rdwrqueue == (mqd_t) -1) {
+		if (rdwrqueue == (mqd_t) - 1) {
 			perror("mq_open() did not return success");
 			printf("Test UNRESOLVED\n");
 			/* kill child and exit */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-2.c
index e5b8260..74d8d0e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-2.c
@@ -30,7 +30,7 @@
 	sprintf(qname, "msgqueue_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		printf("This implementation does not appear to support\n");
 		printf("message queue names that do not start with /.\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-3.c
index 46884fc..249726a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/2-3.c
@@ -30,7 +30,7 @@
 	sprintf(qname, "/tmp/msgqueue_%d", getpid());
 
 	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
-	if (queue == (mqd_t) -1) {
+	if (queue == (mqd_t) - 1) {
 		printf("This implementation does not appear to support\n");
 		printf("message queue names with two /s in them.\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c
index 6401a20..849e247 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c
@@ -52,7 +52,7 @@
 
 		queue[i] = mq_open(qname, O_CREAT | O_RDWR,
 				   S_IRUSR | S_IWUSR, NULL);
-		if (queue[i] == (mqd_t) -1) {
+		if (queue[i] == (mqd_t) - 1) {
 			printf("mq_open() failed before expected\n");
 			unresolved = 1;
 			break;
@@ -61,7 +61,7 @@
 
 	queue[numqueues] = mq_open(qname, O_CREAT | O_RDWR,
 				   S_IRUSR | S_IWUSR, NULL);
-	if (queue[numqueues] != (mqd_t) -1) {
+	if (queue[numqueues] != (mqd_t) - 1) {
 		printf("mq_open() did not fail on > ");
 		printf("_POSIX_OPEN_MAX  or _POSIX_MQ_OPEN_MAX queues\n");
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/6-1.c
index fc9e82f..5f675e6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/6-1.c
@@ -35,7 +35,7 @@
 
 	queue = mq_open(qname, O_CREAT | O_RDWR | O_WRONLY,
 			S_IRUSR | S_IWUSR, NULL);
-	if (queue != (mqd_t) -1) {
+	if (queue != (mqd_t) - 1) {
 		printf("In this implementation, mq_open() does not fail\n");
 		printf("on invalid flags\n");
 		mq_close(queue);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/1-1.c
index 07e40db..5a42f62 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/1-1.c
@@ -31,10 +31,10 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv1[BUFFER], msgrv2[BUFFER];
-        const char *msgptr1 = "test message 1";
-        const char *msgptr2 = "test message 2";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv1[BUFFER], msgrv2[BUFFER];
+	const char *msgptr1 = "test message 1";
+	const char *msgptr2 = "test message 2";
+	mqd_t mqdes;
 	unsigned rvprio;
 	int sdprio1 = 1, sdprio2 = 2;
 	struct mq_attr attr;
@@ -45,34 +45,36 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_send(mqdes, msgptr1, strlen(msgptr1), sdprio1) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, msgptr1, strlen(msgptr1), sdprio1) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
-        if (mq_send(mqdes, msgptr2, strlen(msgptr2), sdprio2) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	}
+	if (mq_send(mqdes, msgptr2, strlen(msgptr2), sdprio2) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_receive(mqdes, msgrv1, BUFFER, &rvprio) == -1) {
+	if (mq_receive(mqdes, msgrv1, BUFFER, &rvprio) == -1) {
 		perror(ERROR_PREFIX "mq_receive");
 		failure = 1;
 	}
 
 	if (strncmp(msgptr2, msgrv1, strlen(msgptr2)) != 0) {
-		printf("FAIL: mq_receive didn't receive the highest priority message\n");
+		printf
+		    ("FAIL: mq_receive didn't receive the highest priority message\n");
 		failure = 1;
 	}
 	if (rvprio != sdprio2) {
-		printf("FAIL: receive priority %d != send priority %d \n", rvprio, sdprio2);
+		printf("FAIL: receive priority %d != send priority %d \n",
+		       rvprio, sdprio2);
 		failure = 1;
- 	}
-        if (mq_receive(mqdes, msgrv2, BUFFER, &rvprio) == -1) {
+	}
+	if (mq_receive(mqdes, msgrv2, BUFFER, &rvprio) == -1) {
 		perror(ERROR_PREFIX "mq_receive");
 		failure = 1;
 	}
@@ -81,30 +83,31 @@
 		failure = 1;
 	}
 	if (rvprio != sdprio1) {
-		printf("FAIL: receive priority %d != send priority %d \n", rvprio, sdprio1);
+		printf("FAIL: receive priority %d != send priority %d \n",
+		       rvprio, sdprio1);
 		failure = 1;
- 	}
+	}
 
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_unlink(mqname) != 0) {
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
+	}
 
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/10-1.c
index 48d3a68..c56df73 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/10-1.c
@@ -32,8 +32,8 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	mqd_t mqdes;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -41,38 +41,39 @@
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
-	mqdes = mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	mqdes =
+	    mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR, S_IRUSR | S_IWUSR,
+		    &attr);
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
-       	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
+	}
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
 		if (EAGAIN != errno) {
 			printf("errno != EAGAIN \n");
 			failure = 1;
 		}
-	}
-	else {
+	} else {
 		printf("mq_receive() succeed unexpectly\n");
 		failure = 1;
 	}
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
-        if (mq_unlink(mqname) != 0) {
+	}
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
-        printf("Test PASSED\n");
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
+	printf("Test PASSED\n");
 	return PTS_PASS;
 
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-1.c
index 2087165..713abcd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-1.c
@@ -34,7 +34,7 @@
 {
 	char mqname[NAMESIZE];
 	mqd_t mqdes;
-        char msgrv[BUFFER];
+	char msgrv[BUFFER];
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -43,37 +43,36 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		unresolved = 1;
 	}
 	mqdes = mqdes + 1;
-       	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
 		if (EBADF != errno) {
 			printf("errno != EBADF \n");
 			failure = 1;
 		}
-	}
-	else {
+	} else {
 		printf("mq_receive() succeed unexpectly \n");
 		failure = 1;
 	}
 	if (mq_close(mqdes - 1) != 0) {
-                perror(ERROR_PREFIX "mq_close()");
-                unresolved=1;
-        }
-        if (mq_unlink(mqname) != 0) {
-                perror(ERROR_PREFIX "mq_unlink()");
-                unresolved=1;
-        }
-        if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
+		perror(ERROR_PREFIX "mq_close()");
+		unresolved = 1;
+	}
+	if (mq_unlink(mqname) != 0) {
+		perror(ERROR_PREFIX "mq_unlink()");
+		unresolved = 1;
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
 	}
 	printf("Test PASSED\n");
-        return PTS_PASS;
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-2.c
index b65cc5f..ac8180c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-2.c
@@ -35,7 +35,7 @@
 
 	char mqname[NAMESIZE];
 	mqd_t mqdes;
-        char msgrv[BUFFER];
+	char msgrv[BUFFER];
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -44,36 +44,35 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		unresolved = 1;
 	}
-       	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
 		if (EBADF != errno) {
 			printf("errno != EBADF \n");
 			failure = 1;
 		}
-	}
-	else {
+	} else {
 		printf("mq_receive() succeed unexpectly \n");
 		failure = 1;
 	}
 	if (mq_close(mqdes) != 0) {
-                perror(ERROR_PREFIX "mq_close");
-                unresolved=1;
-        }
-        if (mq_unlink(mqname) != 0) {
-                perror(ERROR_PREFIX "mq_unlink()");
-                unresolved=1;
-        }
-        if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
+		perror(ERROR_PREFIX "mq_close");
+		unresolved = 1;
+	}
+	if (mq_unlink(mqname) != 0) {
+		perror(ERROR_PREFIX "mq_unlink()");
+		unresolved = 1;
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
 	}
 	printf("Test PASSED\n");
-        return PTS_PASS;
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c
index 8582fce..0f89415 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c
@@ -31,57 +31,56 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        const char *msgptr = "test message";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	const char *msgptr = "test message";
+	mqd_t mqdes;
 	int prio = 1;
 	struct mq_attr mqstat;
 	int unresolved = 0, failure = 0;
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
-	memset(&mqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_msgsize = BUFFER + 1;
 	mqstat.mq_maxmsg = BUFFER + 1;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_send(mqdes, msgptr, strlen(msgptr), prio) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, msgptr, strlen(msgptr), prio) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_receive(mqdes, msgrv, BUFFER, NULL) == 0) {
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == 0) {
 		printf("FAIL: mq_receive succeed unexpectly\n");
 		failure = 1;
-	}
-	else {
+	} else {
 		if (EMSGSIZE != errno) {
 			printf("errno != EMSGSIZE \n");
 			failure = 1;
 		}
 	}
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_unlink(mqname) != 0) {
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/13-1.c
index dca5a1c..1f5b8b5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/13-1.c
@@ -37,10 +37,11 @@
 {
 	return;
 }
+
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	mqd_t mqdes;
 	int pid;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
@@ -50,10 +51,10 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
 	if ((pid = fork()) != 0) {
 		/* Parent process */
@@ -63,41 +64,39 @@
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGABRT, &act, 0);
 
-        	if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
+		if (mq_receive(mqdes, msgrv, BUFFER, NULL) == -1) {
 			wait(NULL);
 			if (EINTR != errno) {
 				printf("errno != EINVAL \n");
 				failure = 1;
 			}
-		}
-		else {
+		} else {
 			wait(NULL);
 			printf("mq_receive() succeed unexpectly \n");
 			failure = 1;
 		}
 		if (mq_close(mqdes) != 0) {
-               		perror("mq_close() did not return success");
-	                unresolved=1;
-       		}
-	        if (mq_unlink(mqname) != 0) {
-       		        perror("mq_unlink() did not return success");
-                	unresolved=1;
-        	}
-        	if (failure==1) {
-                	printf("Test FAILED\n");
-                	return PTS_FAIL;
-        	}
-        	if (unresolved==1) {
-                	printf("Test UNRESOLVED\n");
-                	return PTS_UNRESOLVED;
+			perror("mq_close() did not return success");
+			unresolved = 1;
+		}
+		if (mq_unlink(mqname) != 0) {
+			perror("mq_unlink() did not return success");
+			unresolved = 1;
+		}
+		if (failure == 1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		}
+		if (unresolved == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
 		}
 		printf("Test PASSED\n");
 		return PTS_PASS;
 
-	}
-	else {
+	} else {
 		/*  Child Process */
-		sleep(2); /* give time to parent to set up handler */
+		sleep(2);	/* give time to parent to set up handler */
 		/* send signal to parent */
 		kill(getppid(), SIGABRT);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/2-1.c
index 6fefe11..72a8903 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/2-1.c
@@ -30,49 +30,49 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        const char *msgptr = "test message";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	const char *msgptr = "test message";
+	mqd_t mqdes;
 	int prio = 1;
 	struct mq_attr mqstat;
 	int unresolved = 0, failure = 0;
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
-	memset(&mqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_msgsize = BUFFER + 1;
 	mqstat.mq_maxmsg = BUFFER + 1;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_send(mqdes, msgptr, strlen(msgptr), prio) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, msgptr, strlen(msgptr), prio) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_receive(mqdes, msgrv, BUFFER, NULL) > 0) {
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) > 0) {
 		printf("FAIL: mq_receive succeed unexpectly \n");
 		failure = 1;
 	}
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
-        if (mq_unlink(mqname) != 0) {
+	}
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/5-1.c
index d3c8869..f2d1e3d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/5-1.c
@@ -39,9 +39,9 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        const char *msgptr = "test message ";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	const char *msgptr = "test message ";
+	mqd_t mqdes;
 	int prio = 1;
 	int pid;
 	struct mq_attr attr;
@@ -52,49 +52,47 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
 	if ((pid = fork()) != 0) {
 		/* Parent process */
 		int status;
-        	if (mq_receive(mqdes, msgrv, BUFFER, NULL) > 0) {
+		if (mq_receive(mqdes, msgrv, BUFFER, NULL) > 0) {
 			wait(&status);
 			if (status) {
 				printf("mq_send error \n");
 				unresolved = 1;
 			}
-		}
-		else {
-			wait(NULL); /* wait for child to exit */
+		} else {
+			wait(NULL);	/* wait for child to exit */
 			perror(ERROR_PREFIX "mq_receive");
 			failure = 1;
 		}
-        	if (mq_close(mqdes) != 0) {
+		if (mq_close(mqdes) != 0) {
 			perror(ERROR_PREFIX "mq_close");
 			unresolved = 1;
-        	}
-       	 	if (mq_unlink(mqname) != 0) {
+		}
+		if (mq_unlink(mqname) != 0) {
 			perror(ERROR_PREFIX "mq_unlink");
 			unresolved = 1;
 		}
-		if (failure==1) {
-               		printf("Test FAILED\n");
-	                return PTS_FAIL;
-       		}
-	        if (unresolved==1) {
-                	printf("Test UNRESOLVED\n");
-	                return PTS_UNRESOLVED;
-       		}
-	        printf("Test PASSED\n");
-       		return PTS_PASS;
-	}
-	else {
+		if (failure == 1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		}
+		if (unresolved == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+		printf("Test PASSED\n");
+		return PTS_PASS;
+	} else {
 		/*  Child Process */
-		sleep(2); /* sleep 2 seconds,
-			      assume that child will block on waiting then */
+		sleep(2);	/* sleep 2 seconds,
+				   assume that child will block on waiting then */
 		if (mq_send(mqdes, msgptr, strlen(msgptr), prio) == -1) {
 			perror(ERROR_PREFIX "mq_send");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/7-1.c
index b4917f4..b2b031f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/7-1.c
@@ -32,43 +32,45 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	mqd_t mqdes;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
-	mqdes = mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	mqdes =
+	    mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR, S_IRUSR | S_IWUSR,
+		    &attr);
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-       	if (mq_receive(mqdes, msgrv, BUFFER, NULL) != -1) {
+	if (mq_receive(mqdes, msgrv, BUFFER, NULL) != -1) {
 		printf("mq_receive succeed unexpectly \n");
 		failure = 1;
 	}
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_unlink(mqname) != 0) {
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
+	}
 
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 	printf("Test PASSED\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/8-1.c
index 39ebf86..7036217 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/8-1.c
@@ -35,10 +35,10 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv1[BUFFER], msgrv2[BUFFER];
-        const char *msgptr1 = "test message1";
-        const char *msgptr2 = "test message2 with differnet length";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv1[BUFFER], msgrv2[BUFFER];
+	const char *msgptr1 = "test message1";
+	const char *msgptr2 = "test message2 with differnet length";
+	mqd_t mqdes;
 	int prio1 = 1, prio2 = 2;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
@@ -48,48 +48,50 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_send(mqdes, msgptr1, strlen(msgptr1), prio1) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, msgptr1, strlen(msgptr1), prio1) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
-        if (mq_send(mqdes, msgptr2, strlen(msgptr2), prio2) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	}
+	if (mq_send(mqdes, msgptr2, strlen(msgptr2), prio2) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_receive(mqdes, msgrv1, BUFFER, NULL) != strlen(msgptr2)) {
-		printf("FAIL: mq_receive didn't return the selected message size correctly \n");
+	if (mq_receive(mqdes, msgrv1, BUFFER, NULL) != strlen(msgptr2)) {
+		printf
+		    ("FAIL: mq_receive didn't return the selected message size correctly \n");
 		failure = 1;
 	}
-        if (mq_receive(mqdes, msgrv2, BUFFER, NULL) != strlen(msgptr1)) {
-		printf("FAIL: mq_receive didn't return the selected message size correctly \n");
+	if (mq_receive(mqdes, msgrv2, BUFFER, NULL) != strlen(msgptr1)) {
+		printf
+		    ("FAIL: mq_receive didn't return the selected message size correctly \n");
 		failure = 1;
 	}
-	if (!strcmp(msgrv1,msgrv2)) {
+	if (!strcmp(msgrv1, msgrv2)) {
 		printf("FAIL: mq_receive received the same message twice\n");
 		failure = 1;
 	}
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
-        if (mq_unlink(mqname) != 0) {
+	}
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
-	if (failure==1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	}
+	if (failure == 1) {
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/1-1.c
index 3362faf..d921a98 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/1-1.c
@@ -30,31 +30,31 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_1-1_%d", getpid());
+	sprintf(qname, "/mq_send_1-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), 1) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), 1) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
@@ -62,26 +62,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/10-1.c
index d78b422..4cb36b4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/10-1.c
@@ -30,59 +30,59 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        char msgptr[MESSAGESIZE];
-        mqd_t queue;
+	char qname[NAMESIZE];
+	char msgptr[MESSAGESIZE];
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0, i, maxreached=0;
+	int unresolved = 0, failure = 0, i, maxreached = 0;
 
-        sprintf(qname, "/mq_send_10-1_%d", getpid());
+	sprintf(qname, "/mq_send_10-1_%d", getpid());
 
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = BUFFER;
-        queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
-	for (i=0; i<MAXMSG+1; i++) {
-		sprintf(msgptr, "message %d", i);
-        	if (mq_send(queue, msgptr, strlen(msgptr), 1) == -1) {
-			maxreached=1;
-			if (errno != EAGAIN) {
-				printf("mq_send() did not fail on EAGAIN\n");
-				failure=1;
-			}
-			break;
-        	}
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
 	}
 
-        if (mq_close(queue) != 0) {
+	for (i = 0; i < MAXMSG + 1; i++) {
+		sprintf(msgptr, "message %d", i);
+		if (mq_send(queue, msgptr, strlen(msgptr), 1) == -1) {
+			maxreached = 1;
+			if (errno != EAGAIN) {
+				printf("mq_send() did not fail on EAGAIN\n");
+				failure = 1;
+			}
+			break;
+		}
+	}
+
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test inconclusive:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-1.c
index eceaae1..6de443d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-1.c
@@ -26,49 +26,49 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_send_11-1_%d", getpid());
+	sprintf(qname, "/mq_send_11-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue+1, msgptr, strlen(msgptr), 1) != -1) {
-                printf("mq_send() did not return -1 on invalid queue\n");
-		failure=1;
-        }
+	if (mq_send(queue + 1, msgptr, strlen(msgptr), 1) != -1) {
+		printf("mq_send() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 
 	if (errno != EBADF) {
 		printf("errno != EBADF\n");
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-2.c
index 9b32932..20c4a4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-2.c
@@ -26,49 +26,49 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_send_11-2_%d", getpid());
+	sprintf(qname, "/mq_send_11-2_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), 1) != -1) {
-                printf("mq_send() did not return -1 on invalid queue\n");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), 1) != -1) {
+		printf("mq_send() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 
 	if (errno != EBADF) {
 		printf("errno != EBADF\n");
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/12-1.c
index 7c37191..b348fd6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/12-1.c
@@ -54,26 +54,26 @@
 int main()
 {
 	int pid;
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 	struct mq_attr attr;
 	struct sigaction act;
 
-        sprintf(gqname, "/mq_send_12-1_%d", getpid());
+	sprintf(gqname, "/mq_send_12-1_%d", getpid());
 
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = BUFFER;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	/* parent and child use justreturn_handler to just return out of
 	 * situations -- parent uses to stop it's sleep and wait again for
 	 * the child; child uses to stop its mq_send
 	 */
-	act.sa_handler=justreturn_handler;
-	act.sa_flags=0;
+	act.sa_handler = justreturn_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGABRT, &act, 0);
 
@@ -81,17 +81,19 @@
 		/* child here */
 		int i;
 
-		sleep(1);  // give parent time to set up handler
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_send(gqueue, msgptr, strlen(msgptr), 1) == -1) {
+		sleep(1);	// give parent time to set up handler
+		for (i = 0; i < MAXMSG + 1; i++) {
+			if (mq_send(gqueue, msgptr, strlen(msgptr), 1) == -1) {
 				if (errno == EINTR) {
-				printf("mq_send interrupted by signal\n");
+					printf
+					    ("mq_send interrupted by signal\n");
 					return CHILDPASS;
 				} else {
-				printf("mq_send not interrupted by signal\n");
+					printf
+					    ("mq_send not interrupted by signal\n");
 					return CHILDFAIL;
 				}
-        		}
+			}
 			/* send signal to parent each time message is sent */
 			kill(getppid(), SIGABRT);
 		}
@@ -100,12 +102,12 @@
 		return CHILDFAIL;
 	} else {
 		/* parent here */
-		int j,k;
+		int j, k;
 
-		for (j=0; j<MAXMSG+1; j++) {
+		for (j = 0; j < MAXMSG + 1; j++) {
 			if (sleep(3) == 0) {
-			/* If sleep finished, child is probably blocking */
-				kill(pid, SIGABRT); //signal child
+				/* If sleep finished, child is probably blocking */
+				kill(pid, SIGABRT);	//signal child
 				break;
 			}
 		}
@@ -117,7 +119,7 @@
 
 		if (wait(&k) == -1) {
 			perror("Error waiting for child to exit\n");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			return PTS_UNRESOLVED;
 		}
 		if (!WIFEXITED(k) || !WEXITSTATUS(k)) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/13-1.c
index 5492b0c..4819bb7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/13-1.c
@@ -27,57 +27,57 @@
 #define NUMINVALID 3
 
 static unsigned invalidpri[NUMINVALID] = {
-		MQ_PRIO_MAX, MQ_PRIO_MAX+1, MQ_PRIO_MAX+5
+	MQ_PRIO_MAX, MQ_PRIO_MAX + 1, MQ_PRIO_MAX + 5
 };
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0, i;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, i;
 
-        sprintf(qname, "/mq_send_13-1_%d", getpid());
+	sprintf(qname, "/mq_send_13-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	for (i=0; i<NUMINVALID; i++) {
-        	if (mq_send(queue, msgptr, strlen(msgptr), invalidpri[i])== 0) {
-                	printf("mq_send() returned success on invalid %d\n",
-				invalidpri[i]);
+	for (i = 0; i < NUMINVALID; i++) {
+		if (mq_send(queue, msgptr, strlen(msgptr), invalidpri[i]) == 0) {
+			printf("mq_send() returned success on invalid %d\n",
+			       invalidpri[i]);
 			failure = 1;
-        	}
+		}
 		if (errno != EINVAL) {
 			printf("errno not == EINVAL for invalid %d\n",
-				invalidpri[i]);
+			       invalidpri[i]);
 			failure = 1;
 		}
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/14-1.c
index db9e27b..62cd003 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/14-1.c
@@ -31,55 +31,56 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0, i;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, i;
 	struct mq_attr attr;
 
-        sprintf(qname, "/mq_send_14-1_%d", getpid());
+	sprintf(qname, "/mq_send_14-1_%d", getpid());
 
-	for (i=0; i<NUMINVALID; i++) {
+	for (i = 0; i < NUMINVALID; i++) {
 		attr.mq_msgsize = messagesize[i];
-		attr.mq_maxmsg  = messagesize[i];
+		attr.mq_maxmsg = messagesize[i];
 
-        	queue = mq_open(qname, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR, &attr);
-        	if (queue == (mqd_t)-1) {
-                	perror("mq_open() did not return success");
-                	return PTS_UNRESOLVED;
-        	}
+		queue =
+		    mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+		if (queue == (mqd_t) - 1) {
+			perror("mq_open() did not return success");
+			return PTS_UNRESOLVED;
+		}
 
-        	if (mq_send(queue, msgptr, strlen(msgptr), 1) != -1) {
-                	printf("mq_send() did not return -1 for EMSGSIZE\n");
-			failure=1;
-        	}
+		if (mq_send(queue, msgptr, strlen(msgptr), 1) != -1) {
+			printf("mq_send() did not return -1 for EMSGSIZE\n");
+			failure = 1;
+		}
 
 		if (errno != EMSGSIZE) {
 			printf("errno != EMSGSIZE\n");
-			failure=1;
+			failure = 1;
 		}
 
-        	if (mq_close(queue) != 0) {
+		if (mq_close(queue) != 0) {
 			perror("mq_close() did not return success");
-			unresolved=1;
-        	}
+			unresolved = 1;
+		}
 
-        	if (mq_unlink(qname) != 0) {
+		if (mq_unlink(qname) != 0) {
 			perror("mq_unlink() did not return success");
-			unresolved=1;
-        	}
+			unresolved = 1;
+		}
 	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/2-1.c
index aa08d78..65ab2e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/2-1.c
@@ -21,52 +21,52 @@
 
 #define NAMESIZE 50
 #define MSGSTR "01234567890123456789"
-#define MSGSIZE 10 // < strlen(MSGSTR)
+#define MSGSIZE 10		// < strlen(MSGSTR)
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 	struct mq_attr attr;
 
-        sprintf(qname, "/mq_send_2-1_%d", getpid());
+	sprintf(qname, "/mq_send_2-1_%d", getpid());
 
 	attr.mq_msgsize = MSGSIZE;
-	attr.mq_maxmsg  = MSGSIZE;
+	attr.mq_maxmsg = MSGSIZE;
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), 1) == 0) {
-                printf("mq_send() returned success when msg_len>=mq_msgsize\n");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), 1) == 0) {
+		printf("mq_send() returned success when msg_len>=mq_msgsize\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-1.c
index 36f45de..3bf8cf7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-1.c
@@ -41,55 +41,55 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr1 = MSG1;
-        const char *msgptr2 = MSG2;
-        const char *msgptr3 = MSG3;
-        const char *msgptr4 = MSG4;
-        const char *msgptr5 = MSG5;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr1 = MSG1;
+	const char *msgptr2 = MSG2;
+	const char *msgptr3 = MSG3;
+	const char *msgptr4 = MSG4;
+	const char *msgptr5 = MSG5;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_3-1_%d", getpid());
+	sprintf(qname, "/mq_send_3-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr3, strlen(msgptr3), PRI3) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr3, strlen(msgptr3), PRI3) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr1, strlen(msgptr1), PRI1) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr1, strlen(msgptr1), PRI1) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr4, strlen(msgptr4), PRI4) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr4, strlen(msgptr4), PRI4) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr2, strlen(msgptr2), PRI2) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr2, strlen(msgptr2), PRI2) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr5, strlen(msgptr5), PRI5) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr5, strlen(msgptr5), PRI5) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr1, msgrcd, strlen(msgptr1)) != 0) {
@@ -97,9 +97,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr2, msgrcd, strlen(msgptr2)) != 0) {
@@ -107,9 +107,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr3, msgrcd, strlen(msgptr3)) != 0) {
@@ -117,9 +117,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr4, msgrcd, strlen(msgptr4)) != 0) {
@@ -127,9 +127,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr5, msgrcd, strlen(msgptr5)) != 0) {
@@ -137,26 +137,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-2.c
index 6b7e944..a8e9cfa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-2.c
@@ -43,60 +43,60 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr1 = MSG1;
-        const char *msgptr2 = MSG2;
-        const char *msgptr3 = MSG3;
-        const char *msgptr4 = MSG4;
-        const char *msgptr5 = MSG5;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr1 = MSG1;
+	const char *msgptr2 = MSG2;
+	const char *msgptr3 = MSG3;
+	const char *msgptr4 = MSG4;
+	const char *msgptr5 = MSG5;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_3-2_%d", getpid());
+	sprintf(qname, "/mq_send_3-2_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr3, strlen(msgptr3), PRI3) != 0) {
-                perror("mq_send() did not return success");
+	if (mq_send(queue, msgptr3, strlen(msgptr3), PRI3) != 0) {
+		perror("mq_send() did not return success");
 		printf("error sending %s\n", msgptr3);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr1, strlen(msgptr1), PRI1) != 0) {
-                perror("mq_send() did not return success");
+	if (mq_send(queue, msgptr1, strlen(msgptr1), PRI1) != 0) {
+		perror("mq_send() did not return success");
 		printf("error sending %s\n", msgptr1);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr4, strlen(msgptr4), PRI4) != 0) {
-                perror("mq_send() did not return success");
+	if (mq_send(queue, msgptr4, strlen(msgptr4), PRI4) != 0) {
+		perror("mq_send() did not return success");
 		printf("error sending %s\n", msgptr4);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr2, strlen(msgptr2), PRI2) != 0) {
-                perror("mq_send() did not return success");
+	if (mq_send(queue, msgptr2, strlen(msgptr2), PRI2) != 0) {
+		perror("mq_send() did not return success");
 		printf("error sending %s\n", msgptr2);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_send(queue, msgptr5, strlen(msgptr5), PRI5) != 0) {
-                perror("mq_send() did not return success");
+	if (mq_send(queue, msgptr5, strlen(msgptr5), PRI5) != 0) {
+		perror("mq_send() did not return success");
 		printf("error sending %s\n", msgptr5);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr1, msgrcd, strlen(msgptr1)) != 0) {
@@ -104,9 +104,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr2, msgrcd, strlen(msgptr2)) != 0) {
@@ -114,9 +114,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr3, msgrcd, strlen(msgptr3)) != 0) {
@@ -124,9 +124,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr4, msgrcd, strlen(msgptr4)) != 0) {
@@ -134,9 +134,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr5, msgrcd, strlen(msgptr5)) != 0) {
@@ -144,26 +144,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-1.c
index f854e4a..7773e17 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-1.c
@@ -25,44 +25,44 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_send_4-1_%d", getpid());
+	sprintf(qname, "/mq_send_4-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX+1) == 0) {
-                printf("mq_send() returned success with pri > MQ_PRIO_MAX\n");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX + 1) == 0) {
+		printf("mq_send() returned success with pri > MQ_PRIO_MAX\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-2.c
index 36703cf..1a008ac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-2.c
@@ -25,44 +25,44 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_send_4-2_%d", getpid());
+	sprintf(qname, "/mq_send_4-2_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX) == 0) {
-                printf("mq_send() returned success with pri = MQ_PRIO_MAX\n");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX) == 0) {
+		printf("mq_send() returned success with pri = MQ_PRIO_MAX\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-3.c
index ea78b59..e5ddf22 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-3.c
@@ -31,31 +31,31 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_4-3_%d", getpid());
+	sprintf(qname, "/mq_send_4-3_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX-1) != 0) {
-                perror("mq_send() did not return success");
-		failure=1;
-        }
+	if (mq_send(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX - 1) != 0) {
+		perror("mq_send() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
@@ -63,26 +63,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
index 37bdcef..f219805 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
@@ -66,22 +66,24 @@
 {
 	int pid;
 	char msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 	struct mq_attr attr;
-	int unresolved=0;
+	int unresolved = 0;
 	unsigned pri;
 
-        sprintf(gqname, "/mq_send_5-1_%d", getpid());
+	sprintf(gqname, "/mq_send_5-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
 
 	/* Use O_CREAT + O_EXCL to avoid using a previously created queue */
-        gqueue = mq_open(gqname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
+	gqueue =
+	    mq_open(gqname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR,
+		    &attr);
+	if (gqueue == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
 	if (sync_pipe_create(sync_pipes) == -1) {
 		perror("sync_pipe_create() did not return success");
@@ -92,12 +94,14 @@
 		/* child here */
 		int i;
 
-		for (i=0; i<MAXMSG+1; i++) {
+		for (i = 0; i < MAXMSG + 1; i++) {
 			mq_send(gqueue, msgptr, strlen(msgptr), 1);
 
 			if (sync_pipe_notify(sync_pipes) < 0) {
-				perror("sync_pipe_notify() did not return success");
-				return cleanup_for_exit(gqueue, gqname, PTS_UNRESOLVED);
+				perror
+				    ("sync_pipe_notify() did not return success");
+				return cleanup_for_exit(gqueue, gqname,
+							PTS_UNRESOLVED);
 			}
 		}
 	} else {
@@ -109,14 +113,15 @@
 			/* set a long timeout since we are expecting success */
 			if (sync_pipe_wait_select(sync_pipes, 60) != 0) {
 				printf("sync_pipe_wait\n");
-				return cleanup_for_exit(gqueue, gqname, PTS_FAIL);
+				return cleanup_for_exit(gqueue, gqname,
+							PTS_FAIL);
 			}
 		}
 
 		/* if we don't timeout here then we got too many messages, child never blocked */
 		if (sync_pipe_wait_select(sync_pipes, 1) != -ETIMEDOUT) {
 			printf("Child never blocked\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			return cleanup_for_exit(gqueue, gqname, PTS_FAIL);
 		}
 
@@ -128,13 +133,13 @@
 
 		/* child has 5 seconds to call mq_send() again and notify us */
 		if (sync_pipe_wait_select(sync_pipes, 5) == -ETIMEDOUT) {
-                        /*
-                         * mq_send didn't unblock
-                         */
-                        kill(pid, SIGKILL); //kill child
-                        printf("mq_send() didn't appear to complete\n");
+			/*
+			 * mq_send didn't unblock
+			 */
+			kill(pid, SIGKILL);	//kill child
+			printf("mq_send() didn't appear to complete\n");
 			return cleanup_for_exit(gqueue, gqname, PTS_FAIL);
-                }
+		}
 
 		return cleanup_for_exit(gqueue, gqname, PTS_PASS);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-2.c
index 775a85e..ce8f3b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-2.c
@@ -52,26 +52,26 @@
 int main()
 {
 	int pid;
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 	struct mq_attr attr;
 	struct sigaction act;
 
-        sprintf(gqname, "/mq_send_5-2_%d", getpid());
+	sprintf(gqname, "/mq_send_5-2_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	/* parent and child use justreturn_handler to just return out of
 	 * situations -- parent uses to stop it's sleep and wait again for
 	 * the child; child uses to stop its mq_send
 	 */
-	act.sa_handler=justreturn_handler;
-	act.sa_flags=0;
+	act.sa_handler = justreturn_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGABRT, &act, 0);
 
@@ -79,17 +79,19 @@
 		/* child here */
 		int i;
 
-		sleep(1);  // give parent time to set up handler
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_send(gqueue, msgptr, strlen(msgptr), 1) == -1) {
+		sleep(1);	// give parent time to set up handler
+		for (i = 0; i < MAXMSG + 1; i++) {
+			if (mq_send(gqueue, msgptr, strlen(msgptr), 1) == -1) {
 				if (errno == EINTR) {
-				printf("mq_send interrupted by signal\n");
+					printf
+					    ("mq_send interrupted by signal\n");
 					return CHILDPASS;
 				} else {
-				printf("mq_send not interrupted by signal\n");
+					printf
+					    ("mq_send not interrupted by signal\n");
 					return CHILDFAIL;
 				}
-        		}
+			}
 			/* send signal to parent each time message is sent */
 			kill(getppid(), SIGABRT);
 		}
@@ -98,20 +100,20 @@
 		return CHILDFAIL;
 	} else {
 		/* parent here */
-		int j,k, blocking=0;
+		int j, k, blocking = 0;
 
-		for (j=0; j<MAXMSG+1; j++) {  // "infinite" loop
+		for (j = 0; j < MAXMSG + 1; j++) {	// "infinite" loop
 			if (sleep(3) == 0) {
-			/* If sleep finished, child is probably blocking */
-				blocking=1; //set blocking flag
-				kill(pid, SIGABRT); //signal child
+				/* If sleep finished, child is probably blocking */
+				blocking = 1;	//set blocking flag
+				kill(pid, SIGABRT);	//signal child
 				break;
 			}
 		}
 
-		if (blocking!=1) {
+		if (blocking != 1) {
 			printf("Signal never blocked\n");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			return PTS_UNRESOLVED;
@@ -119,7 +121,7 @@
 
 		if (wait(&k) == -1) {
 			perror("Error waiting for child to exit\n");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/7-1.c
index 6fd8e7e..bed0bf6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/7-1.c
@@ -35,74 +35,74 @@
 #define MESSAGESIZE 50
 #define MSGSTR "0123456789"
 #define BUFFER 40
-#define MAXMSG 10 	// send should end after MAXMSG
+#define MAXMSG 10		// send should end after MAXMSG
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        char msgptr[MESSAGESIZE];
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	char msgptr[MESSAGESIZE];
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0, spri=1, i, maxreached=0;
+	int unresolved = 0, failure = 0, spri = 1, i, maxreached = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_7-1_%d", getpid());
+	sprintf(qname, "/mq_send_7-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
-	for (i=0; i<MQ_PRIO_MAX; i++) { // assuming MAXMSG < MQ_PRIO_MAX
-		sprintf(msgptr, "message %d", i);
-        	if (mq_send(queue, msgptr, strlen(msgptr), spri++) == -1) {
-			maxreached=1;
-			if (errno != EAGAIN) {
-				printf("mq_send() did not fail on EAGAIN\n");
-				failure=1;
-			}
-			break;
-        	}
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	for (i = 0; i < MQ_PRIO_MAX; i++) {	// assuming MAXMSG < MQ_PRIO_MAX
+		sprintf(msgptr, "message %d", i);
+		if (mq_send(queue, msgptr, strlen(msgptr), spri++) == -1) {
+			maxreached = 1;
+			if (errno != EAGAIN) {
+				printf("mq_send() did not fail on EAGAIN\n");
+				failure = 1;
+			}
+			break;
+		}
+	}
+
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	} else {
-		if ((strcmp(msgptr, msgrcd) == 0) && (maxreached!=0)) {
+		if ((strcmp(msgptr, msgrcd) == 0) && (maxreached != 0)) {
 			printf("Error: Received message that caused EAGAIN\n");
 			failure = 1;
 		}
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test inconclusive:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/8-1.c
index 3d62f3a..025141e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/8-1.c
@@ -30,47 +30,47 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, ret;
+	int unresolved = 0, ret;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_8-1_%d", getpid());
+	sprintf(qname, "/mq_send_8-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-        ret = mq_send(queue, msgptr, strlen(msgptr), 1);
+	ret = mq_send(queue, msgptr, strlen(msgptr), 1);
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
 		printf("send was unsuccessful:  sent %s received %s\n",
-				msgptr, msgrcd);
+		       msgptr, msgrcd);
 		unresolved = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
@@ -81,6 +81,6 @@
 		return PTS_FAIL;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/9-1.c
index 2292d88..aa2bac3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_send/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_send/9-1.c
@@ -32,67 +32,64 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
-        mqd_t queue;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_send_9-1_%d", getpid());
+	sprintf(qname, "/mq_send_9-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 	// Verify mq_send() returns -1
-        if (mq_send(queue+1, msgptr, strlen(msgptr), 1) != -1) {
-                printf("mq_send() did not return -1 on invalid queue\n");
-		failure=1;
-        }
-
+	if (mq_send(queue + 1, msgptr, strlen(msgptr), 1) != -1) {
+		printf("mq_send() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 	// Verify errno is set
 	if (errno != EBADF) {
 		printf("errno was not set on invalid queue\n");
 		failure = 1;
 	}
-
 	// Verify message was not queued (cannot be received)
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) != -1) {
-        	if (strcmp(msgptr, msgrcd) == 0) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) != -1) {
+		if (strcmp(msgptr, msgrcd) == 0) {
 			printf("Message ended up being sent\n");
 			failure = 1;
 		} else {
 			printf("Error with mq_receive()\n");
 			unresolved = 1;
 		}
-        }
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-1.c
index 05f034a..2e82e42 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-1.c
@@ -41,44 +41,44 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
-	memset(&nmqstat,0,sizeof(nmqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
+	memset(&nmqstat, 0, sizeof(nmqstat));
 	if (mq_getattr(mqdes, &mqstat) == -1) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
 	}
 	mqstat.mq_flags |= MQFLAGS;
-	if (mq_setattr(mqdes, &mqstat, NULL) != 0)	{
+	if (mq_setattr(mqdes, &mqstat, NULL) != 0) {
 		perror(ERROR_PREFIX "mq_setattr");
 		failure = 1;
 	}
-	if (mq_getattr(mqdes, &nmqstat) == -1)	{
+	if (mq_getattr(mqdes, &nmqstat) == -1) {
 		perror(ERROR_PREFIX "mq_getattr");
 		unresolved = 1;
 	}
 	mq_close(mqdes);
 	if (mq_unlink(mqname) != 0) {
-	       perror(ERROR_PREFIX "mq_unlink");
-       	       return PTS_UNRESOLVED;
+		perror(ERROR_PREFIX "mq_unlink");
+		return PTS_UNRESOLVED;
 	}
-	if (nmqstat.mq_flags != mqstat.mq_flags)  {
+	if (nmqstat.mq_flags != mqstat.mq_flags) {
 		printf("FAIL: mq_flags getted is %ld , while mq_flags "
 		       "setted is %ld\n", nmqstat.mq_flags, mqstat.mq_flags);
 		failure = 1;
 	}
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-2.c
index 41c4258..beec3de 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-2.c
@@ -42,12 +42,12 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
-	memset(&nmqstat,0,sizeof(mqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
+	memset(&nmqstat, 0, sizeof(mqstat));
 
 	if (mq_getattr(mqdes, &mqstat) == -1) {
 		perror(ERROR_PREFIX "mq_getattr");
@@ -57,17 +57,17 @@
 	mqstat.mq_msgsize = mqstat.mq_msgsize + 1;
 	mqstat.mq_curmsgs = mqstat.mq_curmsgs + 1;
 
-	if (mq_setattr(mqdes, &mqstat, NULL) != 0)	{
+	if (mq_setattr(mqdes, &mqstat, NULL) != 0) {
 		perror(ERROR_PREFIX "mq_setattr()");
 		failure = 1;
 	}
-	if (mq_getattr(mqdes, &nmqstat) == -1)	{
+	if (mq_getattr(mqdes, &nmqstat) == -1) {
 		perror(ERROR_PREFIX "mq_getattr()");
 		unresolved = 1;
 	}
-	if ((nmqstat.mq_maxmsg == mqstat.mq_maxmsg)||
-	    (nmqstat.mq_msgsize == mqstat.mq_msgsize)||
-            (nmqstat.mq_curmsgs == mqstat.mq_curmsgs)) {
+	if ((nmqstat.mq_maxmsg == mqstat.mq_maxmsg) ||
+	    (nmqstat.mq_msgsize == mqstat.mq_msgsize) ||
+	    (nmqstat.mq_curmsgs == mqstat.mq_curmsgs)) {
 		failure = 1;
 	}
 
@@ -75,13 +75,13 @@
 	mq_unlink(mqname);
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/2-1.c
index 396011a..edb4fe7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/2-1.c
@@ -44,34 +44,34 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror("mq_open() did not return success");
 		return PTS_UNRESOLVED;
 	}
-	memset(&mqstat,0,sizeof(mqstat));
-	memset(&omqstat,0,sizeof(omqstat));
-	memset(&nmqstat,0,sizeof(nmqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
+	memset(&omqstat, 0, sizeof(omqstat));
+	memset(&nmqstat, 0, sizeof(nmqstat));
 
-	if (mq_getattr(mqdes, &omqstat) == -1)	{
+	if (mq_getattr(mqdes, &omqstat) == -1) {
 		perror("mq_getattr() did not return success");
 		unresolved = 1;
 	}
 	if (mq_unlink(mqname) != 0) {
-	       perror("mq_unlink()");
-       	       return PTS_UNRESOLVED;
+		perror("mq_unlink()");
+		return PTS_UNRESOLVED;
 	}
 	nmqstat.mq_flags = MQFLAGS;
 	nmqstat.mq_maxmsg = MQMAXMSG;
 	nmqstat.mq_msgsize = MQMSGSIZE;
 	nmqstat.mq_curmsgs = MQCURMSGS;
 
-	if (mq_setattr(mqdes, &nmqstat, &mqstat) != 0)	{
+	if (mq_setattr(mqdes, &nmqstat, &mqstat) != 0) {
 		failure = 1;
 	}
-	if ((omqstat.mq_flags != mqstat.mq_flags)||
-	    (omqstat.mq_maxmsg != mqstat.mq_maxmsg)||
-	    (omqstat.mq_msgsize != mqstat.mq_msgsize)||
-            (omqstat.mq_curmsgs != mqstat.mq_curmsgs))  {
+	if ((omqstat.mq_flags != mqstat.mq_flags) ||
+	    (omqstat.mq_maxmsg != mqstat.mq_maxmsg) ||
+	    (omqstat.mq_msgsize != mqstat.mq_msgsize) ||
+	    (omqstat.mq_curmsgs != mqstat.mq_curmsgs)) {
 		failure = 1;
 	}
 
@@ -79,13 +79,13 @@
 	mq_unlink(mqname);
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/5-1.c
index 84dd30d..b396312 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/5-1.c
@@ -43,7 +43,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		return PTS_UNRESOLVED;
 	}
@@ -53,17 +53,16 @@
 	}
 	mqdes = mqdes + 1;
 
-	memset(&mqstat,0,sizeof(mqstat));
-	memset(&nmqstat,0,sizeof(nmqstat));
+	memset(&mqstat, 0, sizeof(mqstat));
+	memset(&nmqstat, 0, sizeof(nmqstat));
 	nmqstat.mq_flags = MQFLAGS;
 
-	if (mq_setattr(mqdes, &mqstat, NULL) == -1)	{
+	if (mq_setattr(mqdes, &mqstat, NULL) == -1) {
 		if (EBADF != errno) {
 			printf("errno != EBADF \n");
 			failure = 1;
 		}
-	}
-	else {
+	} else {
 		printf("Test FAILED\n");
 		failure = 1;
 	}
@@ -72,13 +71,13 @@
 	mq_unlink(mqname);
 
 	if (failure == 1) {
-                printf("Test FAILED\n");
-                return PTS_FAIL;
-        }
+		printf("Test FAILED\n");
+		return PTS_FAIL;
+	}
 	if (unresolved == 1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
 	printf("Test PASSED \n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/1-1.c
index 4d90948..079a376 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/1-1.c
@@ -37,7 +37,7 @@
 	const char *msgptr2 = "test message 2";
 	mqd_t mqdes;
 	unsigned rvprio, sdprio1 = 1, sdprio2 = 2;
-	struct timespec	ts;
+	struct timespec ts;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -46,7 +46,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -74,7 +74,7 @@
 	}
 	if (rvprio != sdprio2) {
 		printf("FAIL: receive priority %d != send priority %d\n",
-			rvprio, sdprio2);
+		       rvprio, sdprio2);
 		failure = 1;
 	}
 	ts.tv_sec = time(NULL) + 1;
@@ -90,7 +90,7 @@
 	}
 	if (rvprio != sdprio1) {
 		printf("FAIL: receive priority %d != send priority %d\n",
-			rvprio, sdprio1);
+		       rvprio, sdprio1);
 		failure = 1;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-1.c
index e506bdf..8d73b43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-1.c
@@ -35,7 +35,7 @@
 	const char *msgptr = "test message";
 	mqd_t mqdes;
 	unsigned rvprio, sdprio = 1;
-	struct timespec	ts;
+	struct timespec ts;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -44,7 +44,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c
index b6253c0..7644de2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c
@@ -40,7 +40,7 @@
 	mqd_t mqdes;
 	unsigned int rvprio;
 	int sdprio = 1;
-	struct timespec	ts;
+	struct timespec ts;
 	struct mq_attr attr;
 	int unresolved = 0, failure = 0;
 
@@ -49,7 +49,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -59,8 +59,8 @@
 		unresolved = 1;
 	}
 
-	sleep(1); /* wait for a while */
-	ts.tv_sec = time(NULL) - 1; /* Past time */
+	sleep(1);		/* wait for a while */
+	ts.tv_sec = time(NULL) - 1;	/* Past time */
 	ts.tv_nsec = 0;
 	if (mq_timedreceive(mqdes, msgrv, BUFFER, &rvprio, &ts) == -1) {
 		if (errno == ETIMEDOUT)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/11-1.c
index 11f93ab..7240ebc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/11-1.c
@@ -50,7 +50,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/13-1.c
index bac5e96..9698efb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/13-1.c
@@ -45,7 +45,7 @@
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR,
 			S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/14-1.c
index b36b4ef..89aa94c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/14-1.c
@@ -45,7 +45,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open()");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/15-1.c
index 080d55d..c807a7b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/15-1.c
@@ -46,7 +46,7 @@
 	mqstat.mq_maxmsg = BUFFER + 1;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-1.c
index 7299c09..f061497 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-1.c
@@ -46,7 +46,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-2.c
index 29a83ab..5b67920 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-2.c
@@ -47,7 +47,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-3.c
index 01133da..60ed5fa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-3.c
@@ -47,7 +47,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-1.c
index 4f5dbd2..21a2598 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-1.c
@@ -57,7 +57,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -103,8 +103,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
-		sleep(TIMEOUT + 3); /* Parent is probably blocking,
-				       send a signal to let it abort */
+		sleep(TIMEOUT + 3);	/* Parent is probably blocking,
+					   send a signal to let it abort */
 		kill(getppid(), SIGABRT);
 		return 0;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-2.c
index 23a3e8a..6e84041 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-2.c
@@ -43,6 +43,7 @@
 	blocking = 1;
 	return;
 }
+
 int main()
 {
 	char mqname[NAMESIZE], msgrv[BUFFER];
@@ -57,7 +58,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -103,8 +104,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
-		sleep(TIMEOUT + 3); /* Parent is probably blocking
-				       send a signal to let it abort */
+		sleep(TIMEOUT + 3);	/* Parent is probably blocking
+					   send a signal to let it abort */
 		kill(getppid(), SIGABRT);
 		return 0;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/2-1.c
index dec64d6..9da12cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/2-1.c
@@ -45,7 +45,7 @@
 	mqstat.mq_maxmsg = BUFFER + 1;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &mqstat);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-1.c
index 4cb5601..5e5ffcc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-1.c
@@ -52,7 +52,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -71,7 +71,7 @@
 			}
 		} else {
 			printf("mq_timedreceive didn't block on waiting\n");
-			wait(NULL); /* wait for child to exit */
+			wait(NULL);	/* wait for child to exit */
 			perror(ERROR_PREFIX "mq_timedreceive");
 			failure = 1;
 		}
@@ -95,8 +95,8 @@
 		return PTS_PASS;
 	} else {
 		/*  Child Process */
-		sleep(2); /* sleep 2 seconds,
-			      assume that parent will block on waiting then */
+		sleep(2);	/* sleep 2 seconds,
+				   assume that parent will block on waiting then */
 		if (mq_send(mqdes, msgptr, strlen(msgptr), prio) == -1) {
 			perror(ERROR_PREFIX "mq_send");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-2.c
index 7382fc2..379ae32 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-2.c
@@ -42,6 +42,7 @@
 	blocking = 1;
 	return;
 }
+
 int main()
 {
 	char mqname[NAMESIZE], msgrv[BUFFER];
@@ -57,7 +58,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -102,8 +103,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
-		sleep(TIMEOUT + 3); /* Parent is probably blocking
-				       send a signal to let it abort */
+		sleep(TIMEOUT + 3);	/* Parent is probably blocking
+					   send a signal to let it abort */
 		kill(getppid(), SIGABRT);
 		return 0;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
index acc6c24..c10280f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
@@ -41,6 +41,7 @@
 {
 	return;
 }
+
 int main()
 {
 	char mqname[NAMESIZE], msgrv[BUFFER];
@@ -55,7 +56,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -103,7 +104,7 @@
 		return PTS_PASS;
 	} else {
 		/*  Child Process */
-		sleep(1); /* give time to parent to set up handler */
+		sleep(1);	/* give time to parent to set up handler */
 		/* send signal to parent */
 		kill(getppid(), SIGABRT);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/7-1.c
index a10ad0c..3c6a912 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/7-1.c
@@ -45,7 +45,7 @@
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_NONBLOCK | O_RDWR,
 			S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/8-1.c
index 4b1f568..f703430 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/8-1.c
@@ -39,6 +39,7 @@
 	blocking = 1;
 	return;
 }
+
 int main()
 {
 	char mqname[NAMESIZE], msgrv[BUFFER];
@@ -54,7 +55,7 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
 	}
@@ -111,8 +112,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
-		sleep(TIMEOUT + 3); /* Parent is probably blocking
-				       send a signal to let it abort */
+		sleep(TIMEOUT + 3);	/* Parent is probably blocking
+					   send a signal to let it abort */
 		kill(getppid(), SIGABRT);
 		return 0;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/speculative/10-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/speculative/10-2.c
index f09628c..59259c8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/speculative/10-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/speculative/10-2.c
@@ -34,11 +34,11 @@
 
 int main()
 {
-        char mqname[NAMESIZE], msgrv[BUFFER];
-        const char *msgptr = "test message";
-        mqd_t mqdes;
+	char mqname[NAMESIZE], msgrv[BUFFER];
+	const char *msgptr = "test message";
+	mqd_t mqdes;
 	unsigned rvprio, sdprio = 1;
-	struct timespec	ts;
+	struct timespec ts;
 	struct mq_attr attr;
 	int unresolved = 0;
 
@@ -47,40 +47,39 @@
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (mqdes == (mqd_t)-1) {
-                perror(ERROR_PREFIX "mq_open");
+	if (mqdes == (mqd_t) - 1) {
+		perror(ERROR_PREFIX "mq_open");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_send(mqdes, msgptr, strlen(msgptr), sdprio) != 0) {
-                perror(ERROR_PREFIX "mq_send");
+	if (mq_send(mqdes, msgptr, strlen(msgptr), sdprio) != 0) {
+		perror(ERROR_PREFIX "mq_send");
 		unresolved = 1;
-        }
+	}
 
 	ts.tv_sec = time(NULL) + 1;
 	ts.tv_nsec = -1;
-        if (mq_timedreceive(mqdes, msgrv, BUFFER, &rvprio, &ts) == -1) {
+	if (mq_timedreceive(mqdes, msgrv, BUFFER, &rvprio, &ts) == -1) {
 		printf("mq_timedreceive() did fail on invalid abs_time\n");
-	}
-	else {
+	} else {
 		printf("mq_timedreceive() did not fail on invalid abs_time\n");
 	}
 
-        if (mq_close(mqdes) != 0) {
+	if (mq_close(mqdes) != 0) {
 		perror(ERROR_PREFIX "mq_close");
 		unresolved = 1;
-        }
+	}
 
-        if (mq_unlink(mqname) != 0) {
+	if (mq_unlink(mqname) != 0) {
 		perror(ERROR_PREFIX "mq_unlink");
 		unresolved = 1;
-        }
+	}
 
-        if (unresolved==1) {
-                printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+	if (unresolved == 1) {
+		printf("Test UNRESOLVED\n");
+		return PTS_UNRESOLVED;
+	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/1-1.c
index e999183..c7e7b7f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/1-1.c
@@ -31,34 +31,34 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_1-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_1-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
@@ -66,26 +66,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/10-1.c
index 060af3b..b9848bb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/10-1.c
@@ -31,62 +31,62 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        char msgptr[MESSAGESIZE];
+	char qname[NAMESIZE];
+	char msgptr[MESSAGESIZE];
 	struct timespec ts;
 	struct mq_attr attr;
-        mqd_t queue;
-	int unresolved=0, failure=0, i, maxreached=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, i, maxreached = 0;
 
-        sprintf(qname, "/mq_timedsend_10-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_10-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-	for (i=0; i<MAXMSG+1; i++) {
-		sprintf(msgptr, "message %d", i);
-        	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == -1) {
-			maxreached=1;
-			if (errno != EAGAIN) {
-				printf("mq_timedsend() did not w/EAGAIN\n");
-				failure=1;
-			}
-			break;
-        	}
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
 	}
 
-        if (mq_close(queue) != 0) {
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	for (i = 0; i < MAXMSG + 1; i++) {
+		sprintf(msgptr, "message %d", i);
+		if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == -1) {
+			maxreached = 1;
+			if (errno != EAGAIN) {
+				printf("mq_timedsend() did not w/EAGAIN\n");
+				failure = 1;
+			}
+			break;
+		}
+	}
+
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test inconclusive:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-1.c
index 052fdc1..ba871c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-1.c
@@ -27,52 +27,52 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_timedsend_11-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_11-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue+1, msgptr, strlen(msgptr), 1, &ts) != -1) {
-                printf("mq_timedsend() did not return -1 on invalid queue\n");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue + 1, msgptr, strlen(msgptr), 1, &ts) != -1) {
+		printf("mq_timedsend() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 
 	if (errno != EBADF) {
 		printf("errno != EBADF\n");
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-2.c
index b30e729..347552f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-2.c
@@ -27,52 +27,52 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_timedsend_11-2_%d", getpid());
+	sprintf(qname, "/mq_timedsend_11-2_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != -1) {
-                printf("mq_timedsend() did not return -1 on invalid queue\n");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != -1) {
+		printf("mq_timedsend() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 
 	if (errno != EBADF) {
 		printf("errno != EBADF\n");
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c
index c8665af..dbd7af6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c
@@ -43,10 +43,10 @@
 #define INTHREAD 0
 #define INMAIN 1
 
-int sem; 		/* manual semaphore */
-int in_handler;		/* flag to indicate signal handler was called */
-int errno_eintr;	/* flag to indicate that errno was set to eintr when mq_timedsend()
-			   was interruped. */
+int sem;			/* manual semaphore */
+int in_handler;			/* flag to indicate signal handler was called */
+int errno_eintr;		/* flag to indicate that errno was set to eintr when mq_timedsend()
+				   was interruped. */
 
 /*
  * This handler is just used to catch the signal and stop sleep (so the
@@ -55,126 +55,124 @@
 void justreturn_handler(int signo)
 {
 	/* Indicate that the signal handler was called */
-	in_handler=1;
+	in_handler = 1;
 	return;
 }
 
 void *a_thread_func()
 {
 
-		int i;
-		struct sigaction act;
-		char gqname[NAMESIZE];
-		mqd_t gqueue;
-		const char *msgptr = MSGSTR;
-		struct mq_attr attr;
-		struct timespec ts;
+	int i;
+	struct sigaction act;
+	char gqname[NAMESIZE];
+	mqd_t gqueue;
+	const char *msgptr = MSGSTR;
+	struct mq_attr attr;
+	struct timespec ts;
 
-		/* Set up handler for SIGUSR1 */
-		act.sa_handler=justreturn_handler;
-		act.sa_flags=0;
-		sigemptyset(&act.sa_mask);
-		sigaction(SIGUSR1, &act, 0);
+	/* Set up handler for SIGUSR1 */
+	act.sa_handler = justreturn_handler;
+	act.sa_flags = 0;
+	sigemptyset(&act.sa_mask);
+	sigaction(SIGUSR1, &act, 0);
 
-		/* Set up mq */
-        	sprintf(gqname, "/mq_timedsend_12-1_%d", getpid());
+	/* Set up mq */
+	sprintf(gqname, "/mq_timedsend_12-1_%d", getpid());
 
-		attr.mq_maxmsg = MAXMSG;
-		attr.mq_msgsize = BUFFER;
-       		gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        	if (gqueue == (mqd_t)-1) {
-                	perror("mq_open() did not return success");
-			pthread_exit((void*)PTS_UNRESOLVED);
-                	return NULL;
-        	}
+	attr.mq_maxmsg = MAXMSG;
+	attr.mq_msgsize = BUFFER;
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return NULL;
+	}
 
-		/* mq_timedsend will block for 10 seconds when it waits */
-		ts.tv_sec=time(NULL)+10;
-		ts.tv_nsec=0;
+	/* mq_timedsend will block for 10 seconds when it waits */
+	ts.tv_sec = time(NULL) + 10;
+	ts.tv_nsec = 0;
 
-		/* Tell main it can go ahead and start sending SIGUSR1 signal */
-		sem = INMAIN;
+	/* Tell main it can go ahead and start sending SIGUSR1 signal */
+	sem = INMAIN;
 
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_timedsend(gqueue, msgptr,
-					strlen(msgptr), 1, &ts) == -1) {
-				if (errno == EINTR) {
-					if (mq_unlink(gqname) != 0) {
-                				perror("mq_unlink() did not return success");
-						pthread_exit((void*)PTS_UNRESOLVED);
-                				return NULL;
-					}
-					printf("thread: mq_timedsend interrupted by signal and correctly set errno to EINTR\n");
-					errno_eintr=1;
-					pthread_exit((void*)PTS_PASS);
-					return NULL;
-				} else {
-				printf("mq_timedsend not interrupted by signal or set errno to incorrect code: %d\n", errno);
-					pthread_exit((void*)PTS_FAIL);
+	for (i = 0; i < MAXMSG + 1; i++) {
+		if (mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts) == -1) {
+			if (errno == EINTR) {
+				if (mq_unlink(gqname) != 0) {
+					perror
+					    ("mq_unlink() did not return success");
+					pthread_exit((void *)PTS_UNRESOLVED);
 					return NULL;
 				}
-        		}
+				printf
+				    ("thread: mq_timedsend interrupted by signal and correctly set errno to EINTR\n");
+				errno_eintr = 1;
+				pthread_exit((void *)PTS_PASS);
+				return NULL;
+			} else {
+				printf
+				    ("mq_timedsend not interrupted by signal or set errno to incorrect code: %d\n",
+				     errno);
+				pthread_exit((void *)PTS_FAIL);
+				return NULL;
+			}
 		}
+	}
 
-		/* Tell main that it the thread did not block like it should have */
-		sem = INTHREAD;
+	/* Tell main that it the thread did not block like it should have */
+	sem = INTHREAD;
 
-		perror("Error: thread never blocked\n");
-		pthread_exit((void*)PTS_FAIL);
-		return NULL;
+	perror("Error: thread never blocked\n");
+	pthread_exit((void *)PTS_FAIL);
+	return NULL;
 }
 
 int main()
 {
-        pthread_t new_th;
+	pthread_t new_th;
 	int i;
 
 	/* Initialized values */
 	i = 0;
-	in_handler=0;
-	errno_eintr=0;
+	in_handler = 0;
+	errno_eintr = 0;
 	sem = INTHREAD;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error: in pthread_create\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to set up handler for SIGUSR1 */
-	while (sem==INTHREAD)
-	 	sleep(1);
+	while (sem == INTHREAD)
+		sleep(1);
 
-	while ((i != 10) && (sem==INMAIN))
-	{
+	while ((i != 10) && (sem == INMAIN)) {
 		/* signal thread while it's in mq_timedsend */
-		if (pthread_kill(new_th, SIGUSR1) != 0)
-		{
+		if (pthread_kill(new_th, SIGUSR1) != 0) {
 			perror("Error: in pthread_kill\n");
 			return PTS_UNRESOLVED;
 		}
 		i++;
 	}
 
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error: in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Test to see if the thread blocked correctly in mq_timedsend, and if it returned
 	 * EINTR when it caught the signal */
-	if (errno_eintr != 1)
-	{
-		if (sem==INTHREAD)
-		{
-			printf("Test FAILED: mq_timedsend() never blocked for any timeout period.\n");
+	if (errno_eintr != 1) {
+		if (sem == INTHREAD) {
+			printf
+			    ("Test FAILED: mq_timedsend() never blocked for any timeout period.\n");
 			return PTS_FAIL;
 		}
 
-		if (in_handler != 0)
-		{
-			perror("Error: signal SIGUSR1 was never received, and/or the signal handler was never called.\n");
+		if (in_handler != 0) {
+			perror
+			    ("Error: signal SIGUSR1 was never received, and/or the signal handler was never called.\n");
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/13-1.c
index 89ae1fd..2e04f40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/13-1.c
@@ -28,61 +28,61 @@
 #define NUMINVALID 3
 
 static unsigned invalidpri[NUMINVALID] = {
-		MQ_PRIO_MAX, MQ_PRIO_MAX+1, MQ_PRIO_MAX+5
+	MQ_PRIO_MAX, MQ_PRIO_MAX + 1, MQ_PRIO_MAX + 5
 };
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0, i;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, i;
 
-        sprintf(qname, "/mq_timedsend_13-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_13-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-	for (i=0; i<NUMINVALID; i++) {
-        	if (mq_timedsend(queue, msgptr,
-				strlen(msgptr), invalidpri[i], &ts)== 0) {
-                	printf("mq_timedsend() ret success on invalid %d\n",
-				invalidpri[i]);
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	for (i = 0; i < NUMINVALID; i++) {
+		if (mq_timedsend(queue, msgptr,
+				 strlen(msgptr), invalidpri[i], &ts) == 0) {
+			printf("mq_timedsend() ret success on invalid %d\n",
+			       invalidpri[i]);
 			failure = 1;
-        	}
+		}
 		if (errno != EINVAL) {
 			printf("errno not == EINVAL for invalid %d\n",
-				invalidpri[i]);
+			       invalidpri[i]);
 			failure = 1;
 		}
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/14-1.c
index a077c27..52bf9ce 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/14-1.c
@@ -32,59 +32,60 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0, i;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, i;
 	struct mq_attr attr;
 
-        sprintf(qname, "/mq_timedsend_14-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_14-1_%d", getpid());
 
-	ts.tv_sec=time(NULL);
-	ts.tv_nsec=0;
-	for (i=0; i<NUMINVALID; i++) {
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
+	for (i = 0; i < NUMINVALID; i++) {
 		attr.mq_msgsize = messagesize[i];
-		attr.mq_maxmsg  = messagesize[i];
+		attr.mq_maxmsg = messagesize[i];
 
-        	queue = mq_open(qname, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR, &attr);
-        	if (queue == (mqd_t)-1) {
-                	perror("mq_open() did not return success");
-                	return PTS_UNRESOLVED;
-        	}
+		queue =
+		    mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+		if (queue == (mqd_t) - 1) {
+			perror("mq_open() did not return success");
+			return PTS_UNRESOLVED;
+		}
 
 		ts.tv_sec++;
-        	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != -1) {
-                	printf("mq_timedsend() didn't ret -1 for EMSGSIZE\n");
-			failure=1;
-        	}
+		if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != -1) {
+			printf("mq_timedsend() didn't ret -1 for EMSGSIZE\n");
+			failure = 1;
+		}
 
 		if (errno != EMSGSIZE) {
 			printf("errno != EMSGSIZE\n");
-			failure=1;
+			failure = 1;
 		}
 
-        	if (mq_close(queue) != 0) {
+		if (mq_close(queue) != 0) {
 			perror("mq_close() did not return success");
-			unresolved=1;
-        	}
+			unresolved = 1;
+		}
 
-        	if (mq_unlink(qname) != 0) {
+		if (mq_unlink(qname) != 0) {
 			perror("mq_unlink() did not return success");
-			unresolved=1;
-        	}
+			unresolved = 1;
+		}
 	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/15-1.c
index 04ad378..b8c018a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/15-1.c
@@ -51,43 +51,43 @@
 
 int main()
 {
-        char *msgptr=MSGSTR;
+	char *msgptr = MSGSTR;
 	struct timespec ts;
 	struct sigaction act;
 	struct mq_attr attr;
 	time_t currsec;
-	int maxreached=0, i;
+	int maxreached = 0, i;
 
-        sprintf(gqname, "/mq_timedsend_15-1_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_15-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
 	currsec = time(NULL);
 
-	ts.tv_sec=currsec-5; //time in past
-	ts.tv_nsec=0;
+	ts.tv_sec = currsec - 5;	//time in past
+	ts.tv_nsec = 0;
 
 	/*
 	 * If timeout never happens, set up an alarm that will go off
 	 * after TIMEOUT seconds and call a handler to end the test
 	 */
-	act.sa_handler=testfailed_handler;
-	act.sa_flags=0;
+	act.sa_handler = testfailed_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(TIMEOUT);
 
-	for (i=0; i<MAXMSG+1; i++) {
-        	if (mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts)
-								== -1) {
-			maxreached=1;
+	for (i = 0; i < MAXMSG + 1; i++) {
+		if (mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts)
+		    == -1) {
+			maxreached = 1;
 			if (errno != ETIMEDOUT) {
 				printf("errno != ETIMEDOUT\n");
 				printf("Test FAILED\n");
@@ -96,23 +96,23 @@
 				return PTS_FAIL;
 			}
 			break;
-        	}
+		}
 	}
 
 	mq_close(gqueue);
 	mq_unlink(gqname);
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test UNRESOLVED:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (time(NULL) > currsec+DELTA) {
+	if (time(NULL) > currsec + DELTA) {
 		printf("Timeout lasted too long\n");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/16-1.c
index 8199714..d8dc4ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/16-1.c
@@ -60,18 +60,18 @@
 {
 	int pid;
 	struct mq_attr attr;
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 
-        sprintf(gqname, "/mq_timedsend_16-1_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_16-1_%d", getpid());
 
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = BUFFER;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
 	mq_unlink(gqname);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	if ((pid = fork()) == 0) {
 		/* child here */
@@ -82,7 +82,7 @@
 		/* wait for parent to set up handler */
 		sigemptyset(&mask);
 		sigaddset(&mask, SIGUSR1);
-		sigprocmask(SIG_BLOCK,&mask,NULL);
+		sigprocmask(SIG_BLOCK, &mask, NULL);
 		sigwait(&mask, &sig);
 
 		/* child should block in < TIMEOUT seconds */
@@ -91,17 +91,17 @@
 		clock_gettime(CLOCK_REALTIME, &ts);
 		ts.tv_sec += TIMEOUT;
 #else
-		ts.tv_sec=time(NULL)+TIMEOUT;
+		ts.tv_sec = time(NULL) + TIMEOUT;
 #endif
-		ts.tv_nsec=0;
+		ts.tv_nsec = 0;
 
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_timedsend(gqueue, msgptr,
-						strlen(msgptr), 1, &ts) != 0) {
-				/* send will fail after timeout occurs*/
+		for (i = 0; i < MAXMSG + 1; i++) {
+			if (mq_timedsend(gqueue, msgptr,
+					 strlen(msgptr), 1, &ts) != 0) {
+				/* send will fail after timeout occurs */
 				kill(getppid(), SIGABRT);
 				return CHILDPASS;
-        		}
+			}
 			/* send signal to parent each time message is sent */
 			kill(getppid(), SIGABRT);
 		}
@@ -113,9 +113,9 @@
 		int j;
 
 		/* parent runs stopsleep_handler when sleep is interrupted
-                   by child */
-		act.sa_handler=stopsleep_handler;
-		act.sa_flags=0;
+		   by child */
+		act.sa_handler = stopsleep_handler;
+		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGABRT, &act, 0);
 
@@ -127,21 +127,20 @@
 		kill(pid, SIGUSR1);
 
 		/* wait for heartbeats from child */
-		for (j=0; j<MAXMSG+1; j++) {
+		for (j = 0; j < MAXMSG + 1; j++) {
 			ts.tv_sec = 3;
 			ts.tv_nsec = 0;
 			if (nanosleep(&ts, NULL)
-				== 0)
-			{
-			/* If sleep finished, child is probably blocking */
+			    == 0) {
+				/* If sleep finished, child is probably blocking */
 				break;
 			}
 		}
 
-		if (j == MAXMSG+1) {
+		if (j == MAXMSG + 1) {
 			printf("Child never blocked\n");
 			printf("Test FAILED\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			return PTS_FAIL;
@@ -154,10 +153,10 @@
 		ts.tv_nsec = 0;
 		if (nanosleep(&ts, NULL) == 0) {
 			/*
-		 	* If sleep lasted the full time, child never timed out
-		 	*/
+			 * If sleep lasted the full time, child never timed out
+			 */
 			printf("Child never timed out\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/18-1.c
index f6922c7..4b9999a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/18-1.c
@@ -29,33 +29,33 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 
-        sprintf(qname, "/mq_timedsend_18-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_18-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)-1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != 0) {
-                perror("mq_timedsend() did not return success on empty queue");
+	ts.tv_sec = time(NULL) - 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != 0) {
+		perror("mq_timedsend() did not return success on empty queue");
 		printf("Test FAILED\n");
 		mq_close(queue);
 		mq_unlink(qname);
 		return PTS_FAIL;
-        }
+	}
 
 	mq_close(queue);
 	mq_unlink(qname);
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/19-1.c
index 4be2556..7352341 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/19-1.c
@@ -32,42 +32,43 @@
 #define BUFFER 40
 #define MAXMSG 5
 
-int invalid_tests[NUMTESTS] = {-1, INT32_MIN, 1000000000, 1000000001 ,
-	INT32_MAX };
+int invalid_tests[NUMTESTS] = { -1, INT32_MIN, 1000000000, 1000000001,
+	INT32_MAX
+};
 
 int main()
 {
-        char qname[NAMESIZE];
-        char *msgptr=MSGSTR;
+	char qname[NAMESIZE];
+	char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int failure=0, i, maxreached=0;
+	int failure = 0, i, maxreached = 0;
 
-        sprintf(qname, "/mq_timedsend_19-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_19-1_%d", getpid());
 
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = BUFFER;
-        queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
-
-	ts.tv_sec=time(NULL);
-	ts.tv_nsec=0;
-	for (i=0; i<MAXMSG+1; i++) {
-		ts.tv_sec++;
-        	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts)
-								== -1) {
-			maxreached=1;
-			break;
-        	}
+		return PTS_UNRESOLVED;
 	}
 
-	if (maxreached==0) {
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
+	for (i = 0; i < MAXMSG + 1; i++) {
+		ts.tv_sec++;
+		if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts)
+		    == -1) {
+			maxreached = 1;
+			break;
+		}
+	}
+
+	if (maxreached == 0) {
 		printf("Test UNRESOLVED:  Couldn't fill message queue\n");
 		mq_close(queue);
 		mq_unlink(qname);
@@ -80,25 +81,24 @@
 	 * First, open message queue as blocking
 	 */
 	mq_close(queue);
-        queue = mq_open(qname,  O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	queue = mq_open(qname, O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
-	for (i=0; i<NUMTESTS;i++) {
+	for (i = 0; i < NUMTESTS; i++) {
 		ts.tv_nsec = invalid_tests[i];
-       		if (mq_timedsend(queue, msgptr, strlen(msgptr),
-				       	1, &ts) != -1) {
+		if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) != -1) {
 			printf("mq_timedsend() didn't fail w/invalid ts\n");
 			printf("ts.tv_nsec = %ld\n", ts.tv_nsec);
-			failure=1;
+			failure = 1;
 		} else {
 			if (errno != EINVAL) {
 				printf("errno != EINVAL\n");
 				printf("ts.tv_nsec = %ld\n", ts.tv_nsec);
-				failure=1;
+				failure = 1;
 			}
 		}
 	}
@@ -106,11 +106,11 @@
 	mq_close(queue);
 	mq_unlink(qname);
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/2-1.c
index 7c41aa3..332e150 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/2-1.c
@@ -22,55 +22,55 @@
 
 #define NAMESIZE 50
 #define MSGSTR "01234567890123456789"
-#define MSGSIZE 10 // < strlen(MSGSTR)
+#define MSGSIZE 10		// < strlen(MSGSTR)
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 	struct mq_attr attr;
 
-        sprintf(qname, "/mq_timedsend_2-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_2-1_%d", getpid());
 
 	attr.mq_msgsize = MSGSIZE;
-	attr.mq_maxmsg  = MSGSIZE;
+	attr.mq_maxmsg = MSGSIZE;
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == 0) {
-                printf("mq_timedsend() ret success w/msg_len>=mq_msgsize\n");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == 0) {
+		printf("mq_timedsend() ret success w/msg_len>=mq_msgsize\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/20-1.c
index ee92568..175d0a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/20-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/20-1.c
@@ -51,43 +51,43 @@
 
 int main()
 {
-        char *msgptr=MSGSTR;
+	char *msgptr = MSGSTR;
 	struct timespec ts;
 	struct sigaction act;
 	time_t currsec;
 	struct mq_attr attr;
-	int failure=0, i, maxreached=0;
+	int failure = 0, i, maxreached = 0;
 
-        sprintf(gqname, "/mq_timedsend_20-1_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_20-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
 	currsec = time(NULL);
 
-	ts.tv_sec=currsec+TIMEOUT;
-	ts.tv_nsec=0;
+	ts.tv_sec = currsec + TIMEOUT;
+	ts.tv_nsec = 0;
 
 	/*
 	 * If timeout never happens, set up an alarm that will go off
 	 * after TIMEOUT+1 seconds and call a handler to end the test
 	 */
-	act.sa_handler=testfailed_handler;
-	act.sa_flags=0;
+	act.sa_handler = testfailed_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
-	alarm(TIMEOUT+1);
+	alarm(TIMEOUT + 1);
 
-	for (i=0; i<MAXMSG+1; i++) {
-        	if (mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts)
-								== -1) {
-			maxreached=1;
+	for (i = 0; i < MAXMSG + 1; i++) {
+		if (mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts)
+		    == -1) {
+			maxreached = 1;
 			if (errno != ETIMEDOUT) {
 				printf("errno != ETIMEDOUT\n");
 				printf("Test FAILED\n");
@@ -96,28 +96,28 @@
 				return PTS_FAIL;
 			}
 			break;
-        	}
+		}
 	}
 
 	mq_close(gqueue);
 	mq_unlink(gqname);
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test UNRESOLVED:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (time(NULL) > ts.tv_sec+DELTA) {
+	if (time(NULL) > ts.tv_sec + DELTA) {
 		printf("Timeout lasted too long\n");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-1.c
index bd20c18..d656c58 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-1.c
@@ -43,62 +43,62 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr1 = MSG1;
-        const char *msgptr2 = MSG2;
-        const char *msgptr3 = MSG3;
-        const char *msgptr4 = MSG4;
-        const char *msgptr5 = MSG5;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr1 = MSG1;
+	const char *msgptr2 = MSG2;
+	const char *msgptr3 = MSG3;
+	const char *msgptr4 = MSG4;
+	const char *msgptr5 = MSG5;
 	struct timespec ts;
 	struct mq_attr attr;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_3-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_3-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr3, strlen(msgptr3), PRI3, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr3, strlen(msgptr3), PRI3, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr1, strlen(msgptr1), PRI1, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	if (mq_timedsend(queue, msgptr1, strlen(msgptr1), PRI1, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr4, strlen(msgptr4), PRI4, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	if (mq_timedsend(queue, msgptr4, strlen(msgptr4), PRI4, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr2, strlen(msgptr2), PRI2, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	if (mq_timedsend(queue, msgptr2, strlen(msgptr2), PRI2, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr5, strlen(msgptr5), PRI5, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	if (mq_timedsend(queue, msgptr5, strlen(msgptr5), PRI5, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr1, msgrcd, strlen(msgptr1)) != 0) {
@@ -106,9 +106,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr2, msgrcd, strlen(msgptr2)) != 0) {
@@ -116,9 +116,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr3, msgrcd, strlen(msgptr3)) != 0) {
@@ -126,9 +126,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr4, msgrcd, strlen(msgptr4)) != 0) {
@@ -136,9 +136,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr5, msgrcd, strlen(msgptr5)) != 0) {
@@ -146,26 +146,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-2.c
index 81b4e66..f96360d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-2.c
@@ -45,67 +45,67 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr1 = MSG1;
-        const char *msgptr2 = MSG2;
-        const char *msgptr3 = MSG3;
-        const char *msgptr4 = MSG4;
-        const char *msgptr5 = MSG5;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr1 = MSG1;
+	const char *msgptr2 = MSG2;
+	const char *msgptr3 = MSG3;
+	const char *msgptr4 = MSG4;
+	const char *msgptr5 = MSG5;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_3-2_%d", getpid());
+	sprintf(qname, "/mq_timedsend_3-2_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr3, strlen(msgptr3), PRI3, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr3, strlen(msgptr3), PRI3, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
 		printf("error sending %s\n", msgptr3);
-		failure=1;
-        }
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr1, strlen(msgptr1), PRI1, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
+	if (mq_timedsend(queue, msgptr1, strlen(msgptr1), PRI1, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
 		printf("error sending %s\n", msgptr1);
-		failure=1;
-        }
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr4, strlen(msgptr4), PRI4, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
+	if (mq_timedsend(queue, msgptr4, strlen(msgptr4), PRI4, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
 		printf("error sending %s\n", msgptr4);
-		failure=1;
-        }
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr2, strlen(msgptr2), PRI2, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
+	if (mq_timedsend(queue, msgptr2, strlen(msgptr2), PRI2, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
 		printf("error sending %s\n", msgptr2);
-		failure=1;
-        }
+		failure = 1;
+	}
 
 	ts.tv_sec++;
-        if (mq_timedsend(queue, msgptr5, strlen(msgptr5), PRI5, &ts) != 0) {
-                perror("mq_timedsend() did not return success");
+	if (mq_timedsend(queue, msgptr5, strlen(msgptr5), PRI5, &ts) != 0) {
+		perror("mq_timedsend() did not return success");
 		printf("error sending %s\n", msgptr5);
-		failure=1;
-        }
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr1, msgrcd, strlen(msgptr1)) != 0) {
@@ -113,9 +113,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr2, msgrcd, strlen(msgptr2)) != 0) {
@@ -123,9 +123,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr3, msgrcd, strlen(msgptr3)) != 0) {
@@ -133,9 +133,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr4, msgrcd, strlen(msgptr4)) != 0) {
@@ -143,9 +143,9 @@
 		failure = 1;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr5, msgrcd, strlen(msgptr5)) != 0) {
@@ -153,26 +153,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-1.c
index 040eee2..0455419 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-1.c
@@ -26,48 +26,48 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_timedsend_4-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_4-1_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX+1, &ts)
-								== 0) {
-                printf("mq_timedsend() ret success with pri > MQ_PRIO_MAX\n");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX + 1, &ts)
+	    == 0) {
+		printf("mq_timedsend() ret success with pri > MQ_PRIO_MAX\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-2.c
index da26758..ad05262 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-2.c
@@ -26,48 +26,48 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
-	int unresolved=0, failure=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0;
 
-        sprintf(qname, "/mq_timedsend_4-2_%d", getpid());
+	sprintf(qname, "/mq_timedsend_4-2_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX, &ts)
-									== 0) {
-                printf("mq_timedsend() ret success with pri = MQ_PRIO_MAX\n");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX, &ts)
+	    == 0) {
+		printf("mq_timedsend() ret success with pri = MQ_PRIO_MAX\n");
+		failure = 1;
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-3.c
index e0b88fe..9c8ae8a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-3.c
@@ -32,35 +32,35 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_4-3_%d", getpid());
+	sprintf(qname, "/mq_timedsend_4-3_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX-1, &ts)
-									!= 0) {
-                perror("mq_timedsend() did not return success");
-		failure=1;
-        }
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), MQ_PRIO_MAX - 1, &ts)
+	    != 0) {
+		perror("mq_timedsend() did not return success");
+		failure = 1;
+	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		failure=1;
+		failure = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
@@ -68,26 +68,26 @@
 		failure = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
index 77fe2e0..828d2a1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
@@ -55,20 +55,20 @@
 {
 	int pid;
 	char msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 	struct mq_attr attr;
-	int unresolved=0;
+	int unresolved = 0;
 	unsigned pri;
 
-        sprintf(gqname, "/mq_timedsend_5-1_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_5-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	if ((pid = fork()) == 0) {
 		/* child here */
@@ -76,12 +76,12 @@
 		struct timespec ts;
 
 		/* set up timeout to be as long as possible */
-		ts.tv_sec=INT32_MAX;
-		ts.tv_nsec=0;
+		ts.tv_sec = INT32_MAX;
+		ts.tv_nsec = 0;
 
-		sleep(1);  // give parent time to set up handler
-		for (i=0; i<MAXMSG+1; i++) {
-        		mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts);
+		sleep(1);	// give parent time to set up handler
+		for (i = 0; i < MAXMSG + 1; i++) {
+			mq_timedsend(gqueue, msgptr, strlen(msgptr), 1, &ts);
 			/* make sure parent enter the final sleep */
 			if (i == MAXMSG)
 				sleep(1);
@@ -96,22 +96,22 @@
 		int j;
 
 		/* parent runs stopsleep_handler when sleep is interrupted
-                   by child */
-		act.sa_handler=stopsleep_handler;
-		act.sa_flags=0;
+		   by child */
+		act.sa_handler = stopsleep_handler;
+		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGABRT, &act, 0);
 
-		for (j=0; j<MAXMSG+1; j++) {
+		for (j = 0; j < MAXMSG + 1; j++) {
 			if (sleep(3) == 0) {
-			/* If sleep finished, child is probably blocking */
+				/* If sleep finished, child is probably blocking */
 				break;
 			}
 		}
 
-		if (j == MAXMSG+1) {
+		if (j == MAXMSG + 1) {
 			printf("Child never blocked\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			return PTS_FAIL;
 		}
 
@@ -126,7 +126,7 @@
 			 * mq_send didn't succeed and interrupt sleep()
 			 * with a signal
 			 */
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			printf("mq_send() didn't appear to complete\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-2.c
index 46645a8..542072e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-2.c
@@ -52,26 +52,26 @@
 int main()
 {
 	int pid;
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 	struct mq_attr attr;
 	struct sigaction act;
 
-        sprintf(gqname, "/mq_timedsend_5-2_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_5-2_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	/* parent and child use justreturn_handler to just return out of
 	 * situations -- parent uses to stop it's sleep and wait again for
 	 * the child; child uses to stop its mq_timedsend
 	 */
-	act.sa_handler=justreturn_handler;
-	act.sa_flags=0;
+	act.sa_handler = justreturn_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGABRT, &act, 0);
 
@@ -80,21 +80,23 @@
 		int i;
 		struct timespec ts;
 		/* set up timeout to be as long as possible */
-		ts.tv_sec=INT32_MAX;
-		ts.tv_nsec=0;
+		ts.tv_sec = INT32_MAX;
+		ts.tv_nsec = 0;
 
-		sleep(1);  // give parent time to set up handler
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_timedsend(gqueue, msgptr,
-						strlen(msgptr), 1, &ts) == -1) {
+		sleep(1);	// give parent time to set up handler
+		for (i = 0; i < MAXMSG + 1; i++) {
+			if (mq_timedsend(gqueue, msgptr,
+					 strlen(msgptr), 1, &ts) == -1) {
 				if (errno == EINTR) {
-				printf("mq_timedsend interrupted by signal\n");
+					printf
+					    ("mq_timedsend interrupted by signal\n");
 					return CHILDPASS;
 				} else {
-			printf("mq_timedsend not interrupted by signal\n");
+					printf
+					    ("mq_timedsend not interrupted by signal\n");
 					return CHILDFAIL;
 				}
-        		}
+			}
 			/* send signal to parent each time message is sent */
 			kill(getppid(), SIGABRT);
 		}
@@ -103,20 +105,20 @@
 		return CHILDFAIL;
 	} else {
 		/* parent here */
-		int j,k, blocking=0;
+		int j, k, blocking = 0;
 
-		for (j=0; j<MAXMSG+1; j++) {
+		for (j = 0; j < MAXMSG + 1; j++) {
 			if (sleep(3) == 0) {
-			/* If sleep finished, child is probably blocking */
-				blocking=1; //set blocking flag
-				kill(pid, SIGABRT); //signal child
+				/* If sleep finished, child is probably blocking */
+				blocking = 1;	//set blocking flag
+				kill(pid, SIGABRT);	//signal child
 				break;
 			}
 		}
 
-		if (blocking!=1) {
+		if (blocking != 1) {
 			printf("Signal never blocked\n");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			return PTS_UNRESOLVED;
@@ -124,13 +126,13 @@
 		mq_close(gqueue);
 		if (mq_unlink(gqname) != 0) {
 			perror("mq_unlink()");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			return PTS_UNRESOLVED;
 		}
 
 		if (wait(&k) == -1) {
 			perror("Error waiting for child to exit\n");
-			kill(pid, SIGKILL); //kill child if not gone
+			kill(pid, SIGKILL);	//kill child if not gone
 			return PTS_UNRESOLVED;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-3.c
index 3387b98..f21e1c4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-3.c
@@ -57,17 +57,17 @@
 {
 	int pid;
 	struct mq_attr attr;
-        const char *msgptr = MSGSTR;
+	const char *msgptr = MSGSTR;
 
-        sprintf(gqname, "/mq_timedsend_5-3_%d", getpid());
+	sprintf(gqname, "/mq_timedsend_5-3_%d", getpid());
 
 	attr.mq_maxmsg = MAXMSG;
 	attr.mq_msgsize = BUFFER;
-        gqueue = mq_open(gqname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (gqueue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	gqueue = mq_open(gqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (gqueue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
 	if ((pid = fork()) == 0) {
 		/* child here */
@@ -78,20 +78,20 @@
 		/* wait for parent to set up handler */
 		sigemptyset(&mask);
 		sigaddset(&mask, SIGUSR1);
-		sigprocmask(SIG_BLOCK,&mask,NULL);
+		sigprocmask(SIG_BLOCK, &mask, NULL);
 		sigwait(&mask, &sig);
 
 		/* child should block in < TIMEOUT seconds */
-		ts.tv_sec=time(NULL)+TIMEOUT;
-		ts.tv_nsec=0;
+		ts.tv_sec = time(NULL) + TIMEOUT;
+		ts.tv_nsec = 0;
 
-		for (i=0; i<MAXMSG+1; i++) {
-        		if (mq_timedsend(gqueue, msgptr,
-						strlen(msgptr), 1, &ts) != 0) {
-				/* send will fail after timeout occurs*/
+		for (i = 0; i < MAXMSG + 1; i++) {
+			if (mq_timedsend(gqueue, msgptr,
+					 strlen(msgptr), 1, &ts) != 0) {
+				/* send will fail after timeout occurs */
 				kill(getppid(), SIGABRT);
 				return CHILDPASS;
-        		}
+			}
 			/* send signal to parent each time message is sent */
 			kill(getppid(), SIGABRT);
 		}
@@ -103,9 +103,9 @@
 		int j;
 
 		/* parent runs stopsleep_handler when sleep is interrupted
-                   by child */
-		act.sa_handler=stopsleep_handler;
-		act.sa_flags=0;
+		   by child */
+		act.sa_handler = stopsleep_handler;
+		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGABRT, &act, 0);
 
@@ -114,17 +114,17 @@
 		kill(pid, SIGUSR1);
 
 		/* wait for heartbeats from child */
-		for (j=0; j<MAXMSG+1; j++) {
+		for (j = 0; j < MAXMSG + 1; j++) {
 			if (sleep(3) == 0) {
-			/* If sleep finished, child is probably blocking */
+				/* If sleep finished, child is probably blocking */
 				break;
 			}
 		}
 
-		if (j == MAXMSG+1) {
+		if (j == MAXMSG + 1) {
 			printf("Child never blocked\n");
 			printf("Test FAILED\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			return PTS_FAIL;
@@ -135,10 +135,10 @@
 		 */
 		if (sleep(TIMEOUT) == 0) {
 			/*
-		 	* If sleep lasted the full time, child never timed out
-		 	*/
+			 * If sleep lasted the full time, child never timed out
+			 */
 			printf("Child never timed out\n");
-			kill(pid, SIGKILL); //kill child
+			kill(pid, SIGKILL);	//kill child
 			mq_close(gqueue);
 			mq_unlink(gqname);
 			printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/7-1.c
index 038bc23..32f71e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/7-1.c
@@ -39,75 +39,75 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        char msgptr[MESSAGESIZE];
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	char msgptr[MESSAGESIZE];
 	struct timespec ts;
 	struct mq_attr attr;
-        mqd_t queue;
-	int unresolved=0, failure=0, spri=1, i, maxreached=0;
+	mqd_t queue;
+	int unresolved = 0, failure = 0, spri = 1, i, maxreached = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_7-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_7-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
-	ts.tv_sec=time(NULL);
-	ts.tv_nsec=0;
-	for (i=0; i<MAXMSG+1; i++) {
-		sprintf(msgptr, "message %d", i);
-		ts.tv_sec++;
-        	if (mq_timedsend(queue, msgptr, strlen(msgptr), spri++, &ts)
-									== -1) {
-			maxreached=1;
-			if (errno != EAGAIN) {
-				printf("mq_timedsend() didn't fail w/EAGAIN\n");
-				failure=1;
-			}
-			break;
-        	}
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
 	}
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
+	for (i = 0; i < MAXMSG + 1; i++) {
+		sprintf(msgptr, "message %d", i);
+		ts.tv_sec++;
+		if (mq_timedsend(queue, msgptr, strlen(msgptr), spri++, &ts)
+		    == -1) {
+			maxreached = 1;
+			if (errno != EAGAIN) {
+				printf("mq_timedsend() didn't fail w/EAGAIN\n");
+				failure = 1;
+			}
+			break;
+		}
+	}
+
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	} else {
-		if ((strcmp(msgptr, msgrcd) == 0) && (maxreached!=0)) {
+		if ((strcmp(msgptr, msgrcd) == 0) && (maxreached != 0)) {
 			printf("Error: Received message that caused EAGAIN\n");
 			failure = 1;
 		}
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (maxreached==0) {
+	if (maxreached == 0) {
 		printf("Test inconclusive:  Couldn't fill message queue\n");
 		return PTS_UNRESOLVED;
 	}
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/8-1.c
index 9846d2b..7d3af70 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/8-1.c
@@ -31,50 +31,50 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, ret;
+	int unresolved = 0, ret;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_8-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_8-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = MAXMSG;
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        ret = mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts);
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	ret = mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts);
 
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) == -1) {
 		perror("mq_receive() returned failure");
-		unresolved=1;
+		unresolved = 1;
 	}
 
 	if (strncmp(msgptr, msgrcd, strlen(msgptr)) != 0) {
 		printf("send was unsuccessful:  sent %s received %s\n",
-				msgptr, msgrcd);
+		       msgptr, msgrcd);
 		unresolved = 1;
 	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
@@ -85,6 +85,6 @@
 		return PTS_FAIL;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/9-1.c
index 4c6b879..2c8cb84 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/9-1.c
@@ -33,70 +33,67 @@
 
 int main()
 {
-        char qname[NAMESIZE], msgrcd[BUFFER];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE], msgrcd[BUFFER];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 	struct mq_attr attr;
-	int unresolved=0, failure=0;
+	int unresolved = 0, failure = 0;
 	unsigned pri;
 
-        sprintf(qname, "/mq_timedsend_9-1_%d", getpid());
+	sprintf(qname, "/mq_timedsend_9-1_%d", getpid());
 
 	attr.mq_msgsize = BUFFER;
 	attr.mq_maxmsg = BUFFER;
-        queue = mq_open(qname, O_CREAT |O_RDWR | O_NONBLOCK,
+	queue = mq_open(qname, O_CREAT | O_RDWR | O_NONBLOCK,
 			S_IRUSR | S_IWUSR, &attr);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
-                return PTS_UNRESOLVED;
-        }
-
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
+		return PTS_UNRESOLVED;
+	}
 	// Verify mq_timedsend() returns -1
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
-        if (mq_timedsend(queue+1, msgptr, strlen(msgptr), 1, &ts) != -1) {
-                printf("mq_timedsend() did not return -1 on invalid queue\n");
-		failure=1;
-        }
-
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
+	if (mq_timedsend(queue + 1, msgptr, strlen(msgptr), 1, &ts) != -1) {
+		printf("mq_timedsend() did not return -1 on invalid queue\n");
+		failure = 1;
+	}
 	// Verify errno is set
 	if (errno != EBADF) {
 		printf("errno was not set on invalid queue\n");
 		failure = 1;
 	}
-
 	// Verify message was not queued (cannot be received)
-        if (mq_receive(queue, msgrcd, BUFFER, &pri) != -1) {
-        	if (strcmp(msgptr, msgrcd) == 0) {
+	if (mq_receive(queue, msgrcd, BUFFER, &pri) != -1) {
+		if (strcmp(msgptr, msgrcd) == 0) {
 			printf("Message ended up being sent\n");
 			failure = 1;
 		} else {
 			printf("Error with mq_receive()\n");
 			unresolved = 1;
 		}
-        }
+	}
 
-        if (mq_close(queue) != 0) {
+	if (mq_close(queue) != 0) {
 		perror("mq_close() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-        if (mq_unlink(qname) != 0) {
+	if (mq_unlink(qname) != 0) {
 		perror("mq_unlink() did not return success");
-		unresolved=1;
-        }
+		unresolved = 1;
+	}
 
-	if (failure==1) {
+	if (failure == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (unresolved==1) {
+	if (unresolved == 1) {
 		printf("Test UNRESOLVED\n");
 		return PTS_UNRESOLVED;
 	}
 
-        printf("Test PASSED\n");
-        return PTS_PASS;
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/speculative/18-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/speculative/18-2.c
index 47972e1..1b19eee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/speculative/18-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/speculative/18-2.c
@@ -29,32 +29,32 @@
 
 int main()
 {
-        char qname[NAMESIZE];
-        const char *msgptr = MSGSTR;
+	char qname[NAMESIZE];
+	const char *msgptr = MSGSTR;
 	struct timespec ts;
-        mqd_t queue;
+	mqd_t queue;
 
-        sprintf(qname, "/msgqueue_%d", getpid());
+	sprintf(qname, "/msgqueue_%d", getpid());
 
-        queue = mq_open(qname, O_CREAT |O_RDWR, S_IRUSR | S_IWUSR, NULL);
-        if (queue == (mqd_t)-1) {
-                perror("mq_open() did not return success");
+	queue = mq_open(qname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL);
+	if (queue == (mqd_t) - 1) {
+		perror("mq_open() did not return success");
 		printf("Test UNRESOLVED\n");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL)-1;
-	ts.tv_nsec=-1;
-        if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == -1) {
+	ts.tv_sec = time(NULL) - 1;
+	ts.tv_nsec = -1;
+	if (mq_timedsend(queue, msgptr, strlen(msgptr), 1, &ts) == -1) {
 		printf("mq_timedsend() did fail on invalid abs_time\n");
 		mq_close(queue);
 		mq_unlink(qname);
 		return PTS_PASS;
-        }
+	}
 
 	mq_close(queue);
 	mq_unlink(qname);
 
 	printf("mq_timedsend() did not fail on invalid abs_time\n");
-        return PTS_PASS;
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/1-1.c
index ab8a788..1778e63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/1-1.c
@@ -36,7 +36,7 @@
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -44,13 +44,11 @@
 		if (mq_open(mqname, O_RDWR, S_IRUSR | S_IWUSR, 0) == -1) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		}
-		else {
+		} else {
 			printf("mq_open succeed unexpectly \n");
 			return PTS_FAIL;
 		}
-	}
-	else {
+	} else {
 		perror(ERROR_PREFIX "mq_unlink");
 		printf("Test FAILED\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-1.c
index bcdd66f..b11b592 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-1.c
@@ -53,7 +53,7 @@
 	char mqname[NAMESIZE];
 	pid_t pid;
 	int to_parent[2];
-        int to_child[2];
+	int to_child[2];
 	int rval;
 	struct sigaction sa;
 
@@ -64,15 +64,15 @@
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 	rval = pipe(to_parent);
-        if (rval == -1) {
-                perror(ERROR_PREFIX "fd[0]");
-                return PTS_UNRESOLVED;
-        }
-        rval = pipe(to_child);
-        if (rval == -1) {
-               perror(ERROR_PREFIX "fd[1]");
-               return PTS_UNRESOLVED;
-        }
+	if (rval == -1) {
+		perror(ERROR_PREFIX "fd[0]");
+		return PTS_UNRESOLVED;
+	}
+	rval = pipe(to_child);
+	if (rval == -1) {
+		perror(ERROR_PREFIX "fd[1]");
+		return PTS_UNRESOLVED;
+	}
 	pid = fork();
 	if (pid == -1) {
 		perror(ERROR_PREFIX "fork");
@@ -83,16 +83,16 @@
 		close(to_parent[PIPE_READ]);
 		close(to_child[PIPE_WRITE]);
 		return child_process(mqname, to_child[PIPE_READ],
-                                     to_parent[PIPE_WRITE]);
-	}
-	else {
+				     to_parent[PIPE_WRITE]);
+	} else {
 		//parent process
 		close(to_parent[PIPE_WRITE]);
-                close(to_child[PIPE_READ]);
+		close(to_child[PIPE_READ]);
 		return parent_process(mqname, to_parent[PIPE_READ],
-                                      to_child[PIPE_WRITE], pid);
+				      to_child[PIPE_WRITE], pid);
 	}
 }
+
 int parent_process(char *mqname, int read_pipe, int write_pipe, int child_pid)
 {
 	mqd_t mqdes;
@@ -100,31 +100,33 @@
 	int rval;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
 	// Tell child a message queue has been opened.
 	rval = send_receive(read_pipe, write_pipe, 'a', &reply);
 	if (rval) {
-	        return rval;
-        }
+		return rval;
+	}
 	if (reply != 'b') {
-	        printf(ERROR_PREFIX "send_receive: " "expected a 'b'");
-                return PTS_UNRESOLVED;
-        }
+		printf(ERROR_PREFIX "send_receive: " "expected a 'b'");
+		return PTS_UNRESOLVED;
+	}
 	if (mq_unlink(mqname) == 0) {
-		if (mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0) == -1) {
-			printf("mq_open to recreate the message	mqueue may fail until all references to the message queue have been closed, or until the message queue is actually removed. \n");
+		if (mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0) ==
+		    -1) {
+			printf
+			    ("mq_open to recreate the message	mqueue may fail until all references to the message queue have been closed, or until the message queue is actually removed. \n");
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		}
-		else {
+		} else {
 			if (mq_unlink(mqname) != 0) {
-	        		printf(ERROR_PREFIX "mq_unlink(2)");
-                		return PTS_UNRESOLVED;
+				printf(ERROR_PREFIX "mq_unlink(2)");
+				return PTS_UNRESOLVED;
 			}
-			printf("mq_open to recreate the message	mqueue may succeed even if the references to the message queue have not been closed or the message queue is not actually removed. \n");
+			printf
+			    ("mq_open to recreate the message	mqueue may succeed even if the references to the message queue have not been closed or the message queue is not actually removed. \n");
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
@@ -141,14 +143,14 @@
 
 	rval = send_receive(read_pipe, write_pipe, 0, &reply);
 	if (rval) {
-                return rval;
-        }
-        if (reply != 'a') {
-                printf(ERROR_PREFIX "send_receive: " "expected an 'a'\n");
-                return PTS_UNRESOLVED;
-        }
+		return rval;
+	}
+	if (reply != 'a') {
+		printf(ERROR_PREFIX "send_receive: " "expected an 'a'\n");
+		return PTS_UNRESOLVED;
+	}
 	mqdes = mq_open(mqname, O_RDWR, 0, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
@@ -159,24 +161,24 @@
 
 int send_receive(int read_pipe, int write_pipe, char send, char *reply)
 {
-        ssize_t bytes;
+	ssize_t bytes;
 
-        if (send) {
-                bytes = write(write_pipe, &send, 1);
-                if (bytes == -1) {
-                perror(ERROR_PREFIX "write fd[1]");
-                return PTS_UNRESOLVED;
-	        }
-        }
-        if (reply) {
-                bytes = read(read_pipe, reply, 1);
-                if (bytes == -1) {
-	                perror(ERROR_PREFIX "read fd[0]");
-                        return PTS_UNRESOLVED;
-                } else if (bytes == 0) {
-                        printf(ERROR_PREFIX "read: EOF \n");
-                        return PTS_UNRESOLVED;
-                }
-        }
+	if (send) {
+		bytes = write(write_pipe, &send, 1);
+		if (bytes == -1) {
+			perror(ERROR_PREFIX "write fd[1]");
+			return PTS_UNRESOLVED;
+		}
+	}
+	if (reply) {
+		bytes = read(read_pipe, reply, 1);
+		if (bytes == -1) {
+			perror(ERROR_PREFIX "read fd[0]");
+			return PTS_UNRESOLVED;
+		} else if (bytes == 0) {
+			printf(ERROR_PREFIX "read: EOF \n");
+			return PTS_UNRESOLVED;
+		}
+	}
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-2.c
index f8a5ab3..48f1faf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-2.c
@@ -48,7 +48,7 @@
 	char mqname[50];
 	pid_t pid;
 	int to_parent[2];
-        int to_child[2];
+	int to_child[2];
 	int rval;
 	struct sigaction sa;
 
@@ -59,15 +59,15 @@
 
 	sprintf(mqname, "/" FUNCTION "_" TEST "_%d", getpid());
 	rval = pipe(to_parent);
-        if (rval == -1) {
-                perror(ERROR_PREFIX "fd[0]");
-                return PTS_UNRESOLVED;
-        }
-        rval = pipe(to_child);
-        if (rval == -1) {
-               perror(ERROR_PREFIX "fd[1]");
-               return PTS_UNRESOLVED;
-        }
+	if (rval == -1) {
+		perror(ERROR_PREFIX "fd[0]");
+		return PTS_UNRESOLVED;
+	}
+	rval = pipe(to_child);
+	if (rval == -1) {
+		perror(ERROR_PREFIX "fd[1]");
+		return PTS_UNRESOLVED;
+	}
 	pid = fork();
 	if (pid == -1) {
 		perror(ERROR_PREFIX "fork");
@@ -78,16 +78,16 @@
 		close(to_parent[PIPE_READ]);
 		close(to_child[PIPE_WRITE]);
 		return child_process(mqname, to_child[PIPE_READ],
-                                     to_parent[PIPE_WRITE]);
-	}
-	else {
+				     to_parent[PIPE_WRITE]);
+	} else {
 		//parent process
 		close(to_parent[PIPE_WRITE]);
-                close(to_child[PIPE_READ]);
+		close(to_child[PIPE_READ]);
 		return parent_process(mqname, to_parent[PIPE_READ],
-                                      to_child[PIPE_WRITE], pid);
+				      to_child[PIPE_WRITE], pid);
 	}
 }
+
 int parent_process(char *mqname, int read_pipe, int write_pipe, int child_pid)
 {
 	mqd_t mqdes;
@@ -95,38 +95,40 @@
 	int rval;
 
 	mqdes = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
 	// Tell child a message queue has been opened.
 	rval = send_receive(read_pipe, write_pipe, 'a', &reply);
 	if (rval) {
-	        return rval;
-        }
+		return rval;
+	}
 	if (reply != 'b') {
-	        printf(ERROR_PREFIX "send_receive: " "expected a 'b'\n");
-                return PTS_UNRESOLVED;
-        }
+		printf(ERROR_PREFIX "send_receive: " "expected a 'b'\n");
+		return PTS_UNRESOLVED;
+	}
 	if (mq_unlink(mqname) == 0) {
 		rval = send_receive(read_pipe, write_pipe, 'c', &reply);
 		if (rval) {
-		        return rval;
-	        }
-	        if (reply != 'd') {
-		        printf(ERROR_PREFIX "send_receive: " "expected a 'd'\n");
-	                return PTS_UNRESOLVED;
-	        }
-		if (mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0) != -1) {
+			return rval;
+		}
+		if (reply != 'd') {
+			printf(ERROR_PREFIX "send_receive: "
+			       "expected a 'd'\n");
+			return PTS_UNRESOLVED;
+		}
+		if (mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 0) !=
+		    -1) {
 			if (mq_unlink(mqname) != 0) {
-		        	perror(ERROR_PREFIX "mq_unlink(2)");
-	                	return PTS_UNRESOLVED;
+				perror(ERROR_PREFIX "mq_unlink(2)");
+				return PTS_UNRESOLVED;
 			}
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		}
-		else {
-			printf("mq_open may fail until the message queue is actually removed \n");
+		} else {
+			printf
+			    ("mq_open may fail until the message queue is actually removed \n");
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
@@ -143,55 +145,55 @@
 
 	rval = send_receive(read_pipe, write_pipe, 0, &reply);
 	if (rval) {
-                return rval;
-        }
-        if (reply != 'a') {
-                printf(ERROR_PREFIX "send_receive: " "expected an 'a'");
-                return PTS_UNRESOLVED;
-        }
+		return rval;
+	}
+	if (reply != 'a') {
+		printf(ERROR_PREFIX "send_receive: " "expected an 'a'");
+		return PTS_UNRESOLVED;
+	}
 	mqdes = mq_open(mqname, O_RDWR, 0, 0);
-	if (mqdes == (mqd_t)-1) {
+	if (mqdes == (mqd_t) - 1) {
 		perror(ERROR_PREFIX "mq_open");
 		return PTS_UNRESOLVED;
 	}
 	rval = send_receive(read_pipe, write_pipe, 'b', &reply);
 	if (rval) {
-                return rval;
-        }
+		return rval;
+	}
 	if (reply != 'c') {
-                printf(ERROR_PREFIX "send_receive: " "expected a 'c'\n");
-                return PTS_UNRESOLVED;
-        }
+		printf(ERROR_PREFIX "send_receive: " "expected a 'c'\n");
+		return PTS_UNRESOLVED;
+	}
 	if (mq_close(mqdes) == -1) {
 		perror(ERROR_PREFIX "mq_close");
 		return PTS_UNRESOLVED;
 	}
 	rval = send_receive(read_pipe, write_pipe, 'd', NULL);
-        if (rval) {
-                return rval;
-        }
+	if (rval) {
+		return rval;
+	}
 	return 0;
 }
 
 int send_receive(int read_pipe, int write_pipe, char send, char *reply)
 {
-        ssize_t bytes;
-        if (send) {
-                bytes = write(write_pipe, &send, 1);
-                if (bytes == -1) {
-                perror(ERROR_PREFIX "write fd[1]");
-                return PTS_UNRESOLVED;
-	        }
-        }
-        if (reply) {
-                bytes = read(read_pipe, reply, 1);
-                if (bytes == -1) {
-	                perror(ERROR_PREFIX "read fd[0]");
-                        return PTS_UNRESOLVED;
-                } else if (bytes == 0) {
-                        printf(ERROR_PREFIX "read: EOF\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
+	ssize_t bytes;
+	if (send) {
+		bytes = write(write_pipe, &send, 1);
+		if (bytes == -1) {
+			perror(ERROR_PREFIX "write fd[1]");
+			return PTS_UNRESOLVED;
+		}
+	}
+	if (reply) {
+		bytes = read(read_pipe, reply, 1);
+		if (bytes == -1) {
+			perror(ERROR_PREFIX "read fd[0]");
+			return PTS_UNRESOLVED;
+		} else if (bytes == 0) {
+			printf(ERROR_PREFIX "read: EOF\n");
+			return PTS_UNRESOLVED;
+		}
+	}
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-3.c
index 92b5c54..f073174 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-3.c
@@ -17,7 +17,8 @@
 
 int main()
 {
-	printf("Difficult to detect whether mq_unlink will block until all the reference have been closed\n");
+	printf
+	    ("Difficult to detect whether mq_unlink will block until all the reference have been closed\n");
 	printf("for this instance.  Will not be tested.\n");
 	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/7-1.c
index cec5ad6..4840530 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/7-1.c
@@ -33,8 +33,7 @@
 	if (ENOENT == errno) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else {
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/speculative/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/speculative/7-2.c
index 3514362..21496bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/speculative/7-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/speculative/7-2.c
@@ -28,16 +28,15 @@
 
 int main()
 {
-	char mqname[50]="/123";
+	char mqname[50] = "/123";
 
-//	sprintf(mqname, FUNCTION "_" TEST "_%d", getpid());
+//      sprintf(mqname, FUNCTION "_" TEST "_%d", getpid());
 
 	mq_unlink(mqname);
 	if (ENOENT == errno) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else {
+	} else {
 		printf("Test FAILED, error is %s\n", strerror(errno));
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munlock/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munlock/10-1.c
index 7cfd421..01c1c9f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munlock/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munlock/10-1.c
@@ -23,18 +23,19 @@
 
 #define BUFSIZE 8
 
-int main() {
-        int result;
+int main()
+{
+	int result;
 	long page_size;
 	void *page_ptr;
 
 	page_size = sysconf(_SC_PAGESIZE);
-        if (errno) {
-                perror("An error occurs when calling sysconf()");
-                return PTS_UNRESOLVED;
-        }
+	if (errno) {
+		perror("An error occurs when calling sysconf()");
+		return PTS_UNRESOLVED;
+	}
 
-	page_ptr = (void*)(LONG_MAX - (LONG_MAX % page_size));
+	page_ptr = (void *)(LONG_MAX - (LONG_MAX % page_size));
 	result = munlock(page_ptr, BUFSIZE);
 
 	if (result == -1 && errno == ENOMEM) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munlock/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munlock/11-1.c
index 6c69599..2e033fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munlock/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munlock/11-1.c
@@ -19,32 +19,35 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
-        int result;
-        long page_size;
-        void *ptr, *notpage_ptr;
+int main()
+{
+	int result;
+	long page_size;
+	void *ptr, *notpage_ptr;
 
-        page_size = sysconf(_SC_PAGESIZE);
-        if (errno) {
-                perror("An error occurs when calling sysconf()");
-                return PTS_UNRESOLVED;
-        }
+	page_size = sysconf(_SC_PAGESIZE);
+	if (errno) {
+		perror("An error occurs when calling sysconf()");
+		return PTS_UNRESOLVED;
+	}
 
 	ptr = malloc(page_size);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
-	notpage_ptr = ((long)ptr % page_size) ? ptr : ptr+1;
+	notpage_ptr = ((long)ptr % page_size) ? ptr : ptr + 1;
 
 	result = munlock(notpage_ptr, page_size - 1);
 
 	if (result == 0) {
-		printf("munlock() does not require that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
+		printf
+		    ("munlock() does not require that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
 		return PTS_PASS;
 	} else if (result == -1 && errno == EINVAL) {
-		printf("munlock() requires that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
+		printf
+		    ("munlock() requires that addr be a multiple of {PAGESIZE}.\nTest PASSED\n");
 		return PTS_PASS;
 	} else if (result != -1) {
 		printf("munlock() returns a value of %i instead of 0 or 1.\n",
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munlock/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munlock/7-1.c
index 6e9d0a0..47d40c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munlock/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munlock/7-1.c
@@ -18,19 +18,21 @@
 
 #define BUFSIZE 8
 
-int main() {
+int main()
+{
 	int result;
 	void *ptr;
 
 	ptr = malloc(BUFSIZE);
 	if (ptr == NULL) {
-                printf("Can not allocate memory.\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("Can not allocate memory.\n");
+		return PTS_UNRESOLVED;
+	}
 
 	if (mlock(ptr, BUFSIZE) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to lock your address space.\nTry to rerun this test as root.\n");
 		} else {
 			perror("An error occurs when calling mlock()");
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
index f4fb71c..2d65857 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
@@ -19,7 +19,8 @@
 
 #if !defined(_POSIX_MEMLOCK) || _POSIX_MEMLOCK == -1
 
-int main() {
+int main()
+{
 	printf("Does not support ML (Memory Lock).\n");
 	return PTS_UNSUPPORTED;
 }
@@ -27,7 +28,8 @@
 #else
 
 #if _POSIX_MEMLOCK != 0
-int main() {
+int main()
+{
 	int result;
 
 	result = munlockall();
@@ -36,11 +38,11 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to unlock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to unlock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
-		printf("munlockall() returns %i instead of zero.\n",
-		       result);
+		printf("munlockall() returns %i instead of zero.\n", result);
 		return PTS_FAIL;
 	}
 
@@ -48,7 +50,8 @@
 
 #else
 
-int main() {
+int main()
+{
 	int result;
 	long memlock;
 
@@ -60,15 +63,15 @@
 
 	result = munlockall();
 
-	if ((result == 0 && memlock > 0) || (result == -1 && memlock <= 0)){
+	if ((result == 0 && memlock > 0) || (result == -1 && memlock <= 0)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("You don't have permission to unlock your address space.\nTry to rerun this test as root.\n");
+		printf
+		    ("You don't have permission to unlock your address space.\nTry to rerun this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
-		printf("munlockall() returns %i instead of zero.\n",
-		       result);
+		printf("munlockall() returns %i instead of zero.\n", result);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-1.c
index d4b036a..b29e401 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-1.c
@@ -37,86 +37,80 @@
 
 void sigsegv_handler(int signum)
 {
-	printf ("Got SIGSEGV\n");
-	printf ("Test PASSED\n");
-  exit(PTS_PASS);
+	printf("Got SIGSEGV\n");
+	printf("Test PASSED\n");
+	exit(PTS_PASS);
 }
 
 int main()
 {
-  char tmpfname[256];
-  long file_size;
+	char tmpfname[256];
+	long file_size;
 
-  void *pa = NULL;
-  void *addr = NULL;
-  size_t len;
-  int flag;
-  int fd;
-  off_t off = 0;
-  int prot;
+	void *pa = NULL;
+	void *addr = NULL;
+	size_t len;
+	int flag;
+	int fd;
+	off_t off = 0;
+	int prot;
 
-  int page_size;
+	int page_size;
 
-  char *ch1;
+	char *ch1;
 
-  struct sigaction sa;
+	struct sigaction sa;
 
-  sigfillset(&sa.sa_mask);
-  sa.sa_handler = sigsegv_handler;
-  sigaction(SIGSEGV, &sa, NULL);
+	sigfillset(&sa.sa_mask);
+	sa.sa_handler = sigsegv_handler;
+	sigaction(SIGSEGV, &sa, NULL);
 
-  page_size = sysconf(_SC_PAGE_SIZE);
-  file_size = 2 * page_size;
+	page_size = sysconf(_SC_PAGE_SIZE);
+	file_size = 2 * page_size;
 
-  /* We hope to map 2 pages */
-  len = page_size + 1;
+	/* We hope to map 2 pages */
+	len = page_size + 1;
 
-  /* Create tmp file */
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  unlink(tmpfname);
+	/* Create tmp file */
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
+		 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	unlink(tmpfname);
 
-  if (ftruncate (fd, file_size) == -1)
-  {
-    printf("Error at ftruncate: %s\n", strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	if (ftruncate(fd, file_size) == -1) {
+		printf("Error at ftruncate: %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  flag = MAP_SHARED;
-  prot = PROT_READ | PROT_WRITE;
-  pa = mmap(addr, len, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-  	printf ("Test UNRESOLVED: " TNAME " Error at mmap: %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	flag = MAP_SHARED;
+	prot = PROT_READ | PROT_WRITE;
+	pa = mmap(addr, len, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test UNRESOLVED: " TNAME " Error at mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  /* ch1 is outside the mapped object, but in the mapped file */
-  ch1 = pa + len + 1;
-  *ch1 = 'b';
+	/* ch1 is outside the mapped object, but in the mapped file */
+	ch1 = pa + len + 1;
+	*ch1 = 'b';
 
-  close (fd);
-  if (munmap (pa, len) == -1)
-  {
-  	printf ("Test FAILED: " TNAME " Error at munmap: %s\n",
-            strerror(errno));
-    exit(PTS_FAIL);
-  }
+	close(fd);
+	if (munmap(pa, len) == -1) {
+		printf("Test FAILED: " TNAME " Error at munmap: %s\n",
+		       strerror(errno));
+		exit(PTS_FAIL);
+	}
 
-  /* Try to reference the unmapped area, should trigger SIGSEGV */
-  *ch1 = 'a';
+	/* Try to reference the unmapped area, should trigger SIGSEGV */
+	*ch1 = 'a';
 
-  /* If reach this point, test fail */
-  printf ("Test FAILED: Did not trigger SIGSEGV\n");
-  return PTS_FAIL;
+	/* If reach this point, test fail */
+	printf("Test FAILED: Did not trigger SIGSEGV\n");
+	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-2.c
index bba14e5..93d1523 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/1-2.c
@@ -37,79 +37,74 @@
 
 void sigsegv_handler(int signum)
 {
-	printf ("Got SIGSEGV\n");
-	printf ("Test PASSED\n");
-  exit(PTS_PASS);
+	printf("Got SIGSEGV\n");
+	printf("Test PASSED\n");
+	exit(PTS_PASS);
 }
 
 int main()
 {
-  char tmpfname[256];
-  long file_size;
+	char tmpfname[256];
+	long file_size;
 
-  void *pa = NULL;
-  void *addr = NULL;
-  size_t len;
-  int flag;
-  int fd;
-  off_t off = 0;
-  int prot;
+	void *pa = NULL;
+	void *addr = NULL;
+	size_t len;
+	int flag;
+	int fd;
+	off_t off = 0;
+	int prot;
 
-  int page_size;
+	int page_size;
 
-  char *ch;
+	char *ch;
 
-  struct sigaction sa;
+	struct sigaction sa;
 
-  sigfillset(&sa.sa_mask);
-  sa.sa_handler = sigsegv_handler;
-  sigaction(SIGSEGV, &sa, NULL);
+	sigfillset(&sa.sa_mask);
+	sa.sa_handler = sigsegv_handler;
+	sigaction(SIGSEGV, &sa, NULL);
 
-  page_size = sysconf(_SC_PAGE_SIZE);
-  file_size = 2 * page_size;
+	page_size = sysconf(_SC_PAGE_SIZE);
+	file_size = 2 * page_size;
 
-  /* We hope to map 2 pages */
-  len = page_size + 1;
+	/* We hope to map 2 pages */
+	len = page_size + 1;
 
-  /* Create tmp file */
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  unlink(tmpfname);
+	/* Create tmp file */
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
+		 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	unlink(tmpfname);
 
-  if (ftruncate (fd, file_size) == -1)
-  {
-    printf("Error at ftruncate: %s\n", strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	if (ftruncate(fd, file_size) == -1) {
+		printf("Error at ftruncate: %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  flag = MAP_SHARED;
-  prot = PROT_READ | PROT_WRITE;
-  pa = mmap(addr, len, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-  	printf ("Test UNRESOLVED: " TNAME " Error at mmap: %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	flag = MAP_SHARED;
+	prot = PROT_READ | PROT_WRITE;
+	pa = mmap(addr, len, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test UNRESOLVED: " TNAME " Error at mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  ch = pa;
-  *ch = 'b';
+	ch = pa;
+	*ch = 'b';
 
-  close (fd);
-  munmap (pa, len);
+	close(fd);
+	munmap(pa, len);
 
-  /* Should trigger SIGSEGV here */
-  *ch = 'a';
+	/* Should trigger SIGSEGV here */
+	*ch = 'a';
 
-  printf ("Test FAILED: Did not trigger SIGSEGV\n");
-  return PTS_FAIL;
+	printf("Test FAILED: Did not trigger SIGSEGV\n");
+	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/2-1.c
index d912eb0..f716873 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/2-1.c
@@ -28,34 +28,32 @@
 
 int main()
 {
-  int rc;
+	int rc;
 
-  int page_size;
-  void *buffer = NULL, *new_addr = NULL;
+	int page_size;
+	void *buffer = NULL, *new_addr = NULL;
 
-  page_size = sysconf(_SC_PAGE_SIZE);
-  buffer =  malloc(page_size * 2);
-  if (buffer == NULL)
-  {
-  	printf("Error at malloc\n");
-    exit(PTS_UNRESOLVED);
-  }
+	page_size = sysconf(_SC_PAGE_SIZE);
+	buffer = malloc(page_size * 2);
+	if (buffer == NULL) {
+		printf("Error at malloc\n");
+		exit(PTS_UNRESOLVED);
+	}
 
-  /* Make new_addr is a multiple of page_size, while
-   * [new_addr, new_addr + page_size] is a valid memory range
-   */
-  new_addr = buffer + (page_size - (unsigned long)buffer % page_size);
+	/* Make new_addr is a multiple of page_size, while
+	 * [new_addr, new_addr + page_size] is a valid memory range
+	 */
+	new_addr = buffer + (page_size - (unsigned long)buffer % page_size);
 
-  rc = munmap(new_addr, page_size);
-  if (rc == -1)
-  {
-  	printf ("Test FAILED " TNAME " Error at munmap(): %s\n",
-             strerror(errno));
-  	free(buffer);
-  	exit(PTS_FAIL);
-  }
+	rc = munmap(new_addr, page_size);
+	if (rc == -1) {
+		printf("Test FAILED " TNAME " Error at munmap(): %s\n",
+		       strerror(errno));
+		free(buffer);
+		exit(PTS_FAIL);
+	}
 
-  free(buffer);
-  printf ("Test PASSED\n");
-  return PTS_PASS;
+	free(buffer);
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/3-1.c
index 99248a9..4f129d0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/3-1.c
@@ -31,74 +31,66 @@
 
 int main()
 {
-  char tmpfname[256];
-  long file_size;
+	char tmpfname[256];
+	long file_size;
 
-  void *pa = NULL;
-  void *addr = NULL;
-  size_t len;
-  int flag;
-  int fd;
-  off_t off = 0;
-  int prot;
+	void *pa = NULL;
+	void *addr = NULL;
+	size_t len;
+	int flag;
+	int fd;
+	off_t off = 0;
+	int prot;
 
-  int page_size;
+	int page_size;
 
-  char *pa2;
+	char *pa2;
 
-  page_size = sysconf(_SC_PAGE_SIZE);
-  file_size = 2 * page_size;
+	page_size = sysconf(_SC_PAGE_SIZE);
+	file_size = 2 * page_size;
 
-  /* We hope to map 2 pages */
-  len = page_size + 1;
+	/* We hope to map 2 pages */
+	len = page_size + 1;
 
-  /* Create tmp file */
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  unlink(tmpfname);
+	/* Create tmp file */
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
+		 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	unlink(tmpfname);
 
-  if (ftruncate (fd, file_size) == -1)
-  {
-    printf("Error at ftruncate: %s\n", strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	if (ftruncate(fd, file_size) == -1) {
+		printf("Error at ftruncate: %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  flag = MAP_SHARED;
-  prot = PROT_READ | PROT_WRITE;
-  pa = mmap(addr, len, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-  	printf ("Test Unresolved: " TNAME " Error at mmap: %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	flag = MAP_SHARED;
+	prot = PROT_READ | PROT_WRITE;
+	pa = mmap(addr, len, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test Unresolved: " TNAME " Error at mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  /* pa should be a multiple of page size */
-  pa2 = pa;
+	/* pa should be a multiple of page size */
+	pa2 = pa;
 
-  while (((unsigned long)pa2 % page_size) == 0)
-    pa2++;
+	while (((unsigned long)pa2 % page_size) == 0)
+		pa2++;
 
-  close (fd);
-  if (munmap (pa2, len) == -1 && errno == EINVAL)
-  {
-  	printf ("Got EINVAL\n");
-  	printf ("Test PASSED\n");
-    exit(PTS_PASS);
-  }
-  else
-  {
-  	printf ("Test FAILED: " TNAME " munmap returns: %s\n",
-            strerror(errno));
-    exit(PTS_FAIL);
-  }
+	close(fd);
+	if (munmap(pa2, len) == -1 && errno == EINVAL) {
+		printf("Got EINVAL\n");
+		printf("Test PASSED\n");
+		exit(PTS_PASS);
+	} else {
+		printf("Test FAILED: " TNAME " munmap returns: %s\n",
+		       strerror(errno));
+		exit(PTS_FAIL);
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/4-1.c
index 7fad2ee..cd691c3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/4-1.c
@@ -37,88 +37,78 @@
 
 int main()
 {
-  int rc;
+	int rc;
 
-  char tmpfname[256];
-  char* data;
-  int total_size = 1024;
+	char tmpfname[256];
+	char *data;
+	int total_size = 1024;
 
-  void *pa = NULL;
-  void *addr = NULL;
-  size_t size = total_size;
-  int flag;
-  int fd;
-  off_t off = 0;
-  int prot;
+	void *pa = NULL;
+	void *addr = NULL;
+	size_t size = total_size;
+	int flag;
+	int fd;
+	off_t off = 0;
+	int prot;
 
-  char * ch;
+	char *ch;
 
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_4_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  unlink(tmpfname);
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_4_1_%d",
+		 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	unlink(tmpfname);
 
-  data = (char *) malloc(total_size);
-  memset(data, 'a', total_size);
-  if (write(fd, data, total_size) != total_size)
-  {
-    printf(TNAME "Error at write(): %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  free(data);
+	data = (char *)malloc(total_size);
+	memset(data, 'a', total_size);
+	if (write(fd, data, total_size) != total_size) {
+		printf(TNAME "Error at write(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	free(data);
 
-  prot = PROT_READ | PROT_WRITE;
-  flag = MAP_PRIVATE;
-  pa = mmap(addr, size, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-    printf("Test Fail: " TNAME " Error at mmap: %s\n",
-           strerror(errno));
-    exit(PTS_FAIL);
-  }
+	prot = PROT_READ | PROT_WRITE;
+	flag = MAP_PRIVATE;
+	pa = mmap(addr, size, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test Fail: " TNAME " Error at mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_FAIL);
+	}
 
-  ch = pa;
-  *ch = 'b';
+	ch = pa;
+	*ch = 'b';
 
-  /* Flush changes back to the file */
+	/* Flush changes back to the file */
 
-  if ((rc =msync(pa, size, MS_SYNC)) != 0)
-  {
-    printf(TNAME " Error at msync(): %s\n",
-           strerror(rc));
-    exit(PTS_UNRESOLVED);
-  }
+	if ((rc = msync(pa, size, MS_SYNC)) != 0) {
+		printf(TNAME " Error at msync(): %s\n", strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
-  munmap(pa, size);
+	munmap(pa, size);
 
-  /* Mmap again */
+	/* Mmap again */
 
-  pa = mmap(addr, size, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-    printf("Test Fail: " TNAME " Error at 2nd mmap: %s\n",
-           strerror(errno));
-    exit(PTS_FAIL);
-  }
+	pa = mmap(addr, size, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test Fail: " TNAME " Error at 2nd mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_FAIL);
+	}
 
-  ch = pa;
-  if (*ch == 'b')
-  {
-    printf("Test FAIL\n");
-    exit(PTS_FAIL);
-  }
+	ch = pa;
+	if (*ch == 'b') {
+		printf("Test FAIL\n");
+		exit(PTS_FAIL);
+	}
 
-  close (fd);
-  printf ("Write referece is discarded when setting MAP_RPIVATE\n");
-  printf("Test PASSED\n");
-  return PTS_PASS;
+	close(fd);
+	printf("Write referece is discarded when setting MAP_RPIVATE\n");
+	printf("Test PASSED\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/8-1.c
index 27c2d1a..a57f189 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/8-1.c
@@ -30,21 +30,19 @@
 
 int main()
 {
-  int rc;
-  void *pa;
+	int rc;
+	void *pa;
 
-  /* -1 should be an invalid address */
-  pa = (void*)-1;
-  rc = munmap(pa, 1);
-  if (rc == -1 && errno == EINVAL)
-  {
-  	printf ("Got EINVAL\n");
-  	printf ("Test PASSED\n");
-  	exit(PTS_PASS);
-  }
-  else
-  {
-    printf ("Test FAILED: Expect EINVAL but get: %s\n", strerror(errno));
-    return PTS_FAIL;
-  }
+	/* -1 should be an invalid address */
+	pa = (void *)-1;
+	rc = munmap(pa, 1);
+	if (rc == -1 && errno == EINVAL) {
+		printf("Got EINVAL\n");
+		printf("Test PASSED\n");
+		exit(PTS_PASS);
+	} else {
+		printf("Test FAILED: Expect EINVAL but get: %s\n",
+		       strerror(errno));
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/munmap/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/munmap/9-1.c
index f7376e7..4ded918 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/munmap/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/munmap/9-1.c
@@ -28,68 +28,60 @@
 
 int main()
 {
-  char tmpfname[256];
-  long file_size;
+	char tmpfname[256];
+	long file_size;
 
-  void *pa = NULL;
-  void *addr = NULL;
-  size_t len;
-  int flag;
-  int fd;
-  off_t off = 0;
-  int prot;
+	void *pa = NULL;
+	void *addr = NULL;
+	size_t len;
+	int flag;
+	int fd;
+	off_t off = 0;
+	int prot;
 
-  int page_size;
+	int page_size;
 
-  page_size = sysconf(_SC_PAGE_SIZE);
-  file_size = 2 * page_size;
+	page_size = sysconf(_SC_PAGE_SIZE);
+	file_size = 2 * page_size;
 
-  /* We hope to map 2 pages */
-  len = page_size + 1;
+	/* We hope to map 2 pages */
+	len = page_size + 1;
 
-  /* Create tmp file */
-  snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
-           getpid());
-  unlink(tmpfname);
-  fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-            S_IRUSR | S_IWUSR);
-  if (fd == -1)
-  {
-    printf(TNAME " Error at open(): %s\n",
-           strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
-  unlink(tmpfname);
+	/* Create tmp file */
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_munmap_1_1_%d",
+		 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
+	if (fd == -1) {
+		printf(TNAME " Error at open(): %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
+	unlink(tmpfname);
 
-  if (ftruncate (fd, file_size) == -1)
-  {
-    printf("Error at ftruncate: %s\n", strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	if (ftruncate(fd, file_size) == -1) {
+		printf("Error at ftruncate: %s\n", strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  flag = MAP_SHARED;
-  prot = PROT_READ | PROT_WRITE;
-  pa = mmap(addr, len, prot, flag, fd, off);
-  if (pa == MAP_FAILED)
-  {
-  	printf ("Test Unresolved: " TNAME " Error at mmap: %s\n",
-            strerror(errno));
-    exit(PTS_UNRESOLVED);
-  }
+	flag = MAP_SHARED;
+	prot = PROT_READ | PROT_WRITE;
+	pa = mmap(addr, len, prot, flag, fd, off);
+	if (pa == MAP_FAILED) {
+		printf("Test Unresolved: " TNAME " Error at mmap: %s\n",
+		       strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-  close (fd);
+	close(fd);
 
-  /* Set len as 0 */
-  if (munmap (pa, 0) == -1 && errno == EINVAL)
-  {
-  	printf ("Get EINVAL when len=0\n");
-  	printf ("Test PASSED\n");
-    exit(PTS_PASS);
-  }
-  else
-  {
-    printf ("Test Fail: Expect EINVAL while get %s\n",
-            strerror(errno));
-    return PTS_FAIL;
-  }
+	/* Set len as 0 */
+	if (munmap(pa, 0) == -1 && errno == EINVAL) {
+		printf("Get EINVAL when len=0\n");
+		printf("Test PASSED\n");
+		exit(PTS_PASS);
+	} else {
+		printf("Test Fail: Expect EINVAL while get %s\n",
+		       strerror(errno));
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-1.c
index 9a1f44a..9f18273 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-1.c
@@ -16,15 +16,15 @@
 {
 	struct timespec tssleepfor, tsstorage, tsbefore, tsafter;
 	int sleepnsec = 3;
-	int slepts=0,sleptns=0;
+	int slepts = 0, sleptns = 0;
 
 	if (clock_gettime(CLOCK_REALTIME, &tsbefore) == -1) {
 		perror("Error in clock_gettime()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	tssleepfor.tv_sec=0;
-	tssleepfor.tv_nsec=sleepnsec;
+	tssleepfor.tv_sec = 0;
+	tssleepfor.tv_nsec = sleepnsec;
 	if (nanosleep(&tssleepfor, &tsstorage) != 0) {
 		printf("nanosleep() did not return success\n");
 		return PTS_UNRESOLVED;
@@ -38,11 +38,11 @@
 	/*
 	 * Generic alg for calculating slept time.
 	 */
-	slepts=tsafter.tv_sec-tsbefore.tv_sec;
-	sleptns=tsafter.tv_nsec-tsbefore.tv_nsec;
+	slepts = tsafter.tv_sec - tsbefore.tv_sec;
+	sleptns = tsafter.tv_nsec - tsbefore.tv_nsec;
 	if (sleptns < 0) {
-		sleptns = sleptns+1000000000;
-		slepts = slepts-1;
+		sleptns = sleptns + 1000000000;
+		slepts = slepts - 1;
 	}
 
 	if ((slepts > 0) || (sleptns > sleepnsec)) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-2.c
index 249ef80..9c7558b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-2.c
@@ -28,8 +28,8 @@
 
 	if ((pid = fork()) == 0) {
 		/* child here */
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		nanosleep(&tssleepfor, &tsstorage);
 	} else {
 		/* parent here */
@@ -55,13 +55,13 @@
 		 * pass if we slept for less than the (large) sleep time
 		 * allotted
 		 */
-		if ((tsafter.tv_sec-tsbefore.tv_sec) < sleepsec) {
+		if ((tsafter.tv_sec - tsbefore.tv_sec) < sleepsec) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-				(int)tsafter.tv_sec-(int)tsbefore.tv_sec,
-				sleepsec);
+			       (int)tsafter.tv_sec - (int)tsbefore.tv_sec,
+			       sleepsec);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-3.c
index 8a01448..c376688 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/1-3.c
@@ -36,8 +36,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return PTS_UNRESOLVED;
@@ -46,8 +46,8 @@
 			perror("Error calling sigaction\n");
 			return PTS_UNRESOLVED;
 		}
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		nanosleep(&tssleepfor, &tsstorage);
 	} else {
 		/* parent here */
@@ -73,13 +73,13 @@
 		 * pass if we slept for less than the (large) sleep time
 		 * allotted
 		 */
-		if ((tsafter.tv_sec-tsbefore.tv_sec) < sleepsec) {
+		if ((tsafter.tv_sec - tsbefore.tv_sec) < sleepsec) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
 			printf("Slept for too long: %d >= %d\n",
-				(int)tsafter.tv_sec-(int)tsbefore.tv_sec,
-				sleepsec);
+			       (int)tsafter.tv_sec - (int)tsbefore.tv_sec,
+			       sleepsec);
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c
index 64e9a31..43877ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c
@@ -34,27 +34,28 @@
  * input tests
  */
 static int sleepvalid[NUMVALID][2] = { {0, 30000000}, {1, 0},
-					{1, 30000000}, {2, 0},
-					{10, 5000}, {13, 5} };
+{1, 30000000}, {2, 0},
+{10, 5000}, {13, 5}
+};
 static int sleepinvalid[NUMINVALID][2] = { {-1, -1}, {0, -1},
-					{1, 1000000000}, {2, 1000000000},
-					{-2147483647, -2147483647},
-					{1, 2147483647},
-					{0, 1075002478} };
+{1, 1000000000}, {2, 1000000000},
+{-2147483647, -2147483647},
+{1, 2147483647},
+{0, 1075002478}
+};
 
 int main(int argc, char *argv[])
 {
 	struct timespec tssleepfor, tsstorage, tsbefore, tsafter;
 	int i;
 	int failure = 0;
-	int slepts=0, sleptns=0;
+	int slepts = 0, sleptns = 0;
 
-	for (i=0; i<NUMVALID;i++) {
-		tssleepfor.tv_sec=sleepvalid[i][0];
-		tssleepfor.tv_nsec=sleepvalid[i][1];
+	for (i = 0; i < NUMVALID; i++) {
+		tssleepfor.tv_sec = sleepvalid[i][0];
+		tssleepfor.tv_nsec = sleepvalid[i][1];
 		printf("sleep %d sec %d nsec\n",
-				(int) tssleepfor.tv_sec,
-				(int) tssleepfor.tv_nsec);
+		       (int)tssleepfor.tv_sec, (int)tssleepfor.tv_nsec);
 		if (clock_gettime(CLOCK_REALTIME, &tsbefore) == -1) {
 			perror("Error in clock_gettime()\n");
 			return PTS_UNRESOLVED;
@@ -68,24 +69,22 @@
 			/*
 			 * Generic alg for calculating slept time.
 			 */
-			slepts=tsafter.tv_sec-tsbefore.tv_sec;
-			sleptns=tsafter.tv_nsec-tsbefore.tv_nsec;
+			slepts = tsafter.tv_sec - tsbefore.tv_sec;
+			sleptns = tsafter.tv_nsec - tsbefore.tv_nsec;
 			if (sleptns < 0) {
-				sleptns = sleptns+1000000000;
-				slepts = slepts-1;
+				sleptns = sleptns + 1000000000;
+				slepts = slepts - 1;
 			}
 
-			if ((slepts-tssleepfor.tv_sec) > OKSECERR) {
+			if ((slepts - tssleepfor.tv_sec) > OKSECERR) {
 				printf("FAIL - slept %lds%ldns >> %lds%ldns\n",
-						slepts, sleptns,
-						tssleepfor.tv_sec,
-						tssleepfor.tv_nsec);
+				       slepts, sleptns,
+				       tssleepfor.tv_sec, tssleepfor.tv_nsec);
 				failure = 1;
 			} else {
 				printf("PASS - slept %lds%ldns ~= %lds%ldns\n",
-						slepts, sleptns,
-						tssleepfor.tv_sec,
-						tssleepfor.tv_nsec);
+				       slepts, sleptns,
+				       tssleepfor.tv_sec, tssleepfor.tv_nsec);
 			}
 		} else {
 			printf("nanosleep() did not return 0 on success\n");
@@ -93,12 +92,11 @@
 		}
 	}
 
-	for (i=0; i<NUMINVALID;i++) {
-		tssleepfor.tv_sec=sleepinvalid[i][0];
-		tssleepfor.tv_nsec=sleepinvalid[i][1];
+	for (i = 0; i < NUMINVALID; i++) {
+		tssleepfor.tv_sec = sleepinvalid[i][0];
+		tssleepfor.tv_nsec = sleepinvalid[i][1];
 		printf("sleep %d sec %d nsec\n",
-				(int) tssleepfor.tv_sec,
-				(int) tssleepfor.tv_nsec);
+		       (int)tssleepfor.tv_sec, (int)tssleepfor.tv_nsec);
 		if (nanosleep(&tssleepfor, &tsstorage) == -1) {
 			if (EINVAL != errno) {
 				printf("errno != EINVAL\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
index 6d45766..46da47a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/2-1.c
@@ -17,9 +17,10 @@
 int main(int argc, char *argv[])
 {
 	struct timespec tssleepfor, tsstorage, tsbefore, tsafter;
-	int sleepnsec[NUMINTERVALS] = {1, 2, 10, 100, 1000, 10000, 1000000,
+	int sleepnsec[NUMINTERVALS] = { 1, 2, 10, 100, 1000, 10000, 1000000,
 		10000000, 100000000, 200000000, 500000000, 750000000,
-		999999900};
+		999999900
+	};
 	int i;
 	int failure = 0;
 	int slepts, sleptns;
@@ -29,9 +30,9 @@
 		return PTS_UNRESOLVED;
 	}
 
-	tssleepfor.tv_sec=0;
-	for (i=0; i<NUMINTERVALS;i++) {
-		tssleepfor.tv_nsec=sleepnsec[i];
+	tssleepfor.tv_sec = 0;
+	for (i = 0; i < NUMINTERVALS; i++) {
+		tssleepfor.tv_nsec = sleepnsec[i];
 		if (nanosleep(&tssleepfor, &tsstorage) != 0) {
 			printf("nanosleep() did not return success\n");
 			return PTS_UNRESOLVED;
@@ -43,21 +44,21 @@
 		}
 
 		/*
- 		 * Generic alg for calculating slept time.
+		 * Generic alg for calculating slept time.
 		 */
-		slepts=tsafter.tv_sec-tsbefore.tv_sec;
-		sleptns=tsafter.tv_nsec-tsbefore.tv_nsec;
+		slepts = tsafter.tv_sec - tsbefore.tv_sec;
+		sleptns = tsafter.tv_nsec - tsbefore.tv_nsec;
 		if (sleptns < 0) {
-			sleptns = sleptns+1000000000;
-			slepts = slepts-1;
+			sleptns = sleptns + 1000000000;
+			slepts = slepts - 1;
 		}
 
 		if (slepts >= 1 || sleptns > sleepnsec[i]) {
 			printf("PASS slept %ds %dns >= %d\n",
-				slepts, sleptns, sleepnsec[i]);
+			       slepts, sleptns, sleepnsec[i]);
 		} else {
 			printf("FAIL slept %ds %dns < %d\n",
-				slepts, sleptns, sleepnsec[i]);
+			       slepts, sleptns, sleepnsec[i]);
 			failure = 1;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-1.c
index dc5825b..f7b7016 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-1.c
@@ -38,8 +38,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return CHILDFAIL;
@@ -48,8 +48,8 @@
 			perror("Error calling sigaction\n");
 			return CHILDFAIL;
 		}
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		nanosleep(&tssleepfor, &tsstorage);
 		return CHILDFAIL;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-2.c
index 3f8a1d0..31873de 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/3-2.c
@@ -18,7 +18,7 @@
 
 #define SLEEPSEC 5
 
-#define CHILDPASS 0 //if interrupted, child will return 0
+#define CHILDPASS 0		//if interrupted, child will return 0
 #define CHILDFAIL 1
 
 int main(int argc, char *argv[])
@@ -35,8 +35,8 @@
 		/* child here */
 		struct timespec tssleep;
 
-		tssleep.tv_sec=SLEEPSEC;
-		tssleep.tv_nsec=0;
+		tssleep.tv_sec = SLEEPSEC;
+		tssleep.tv_nsec = 0;
 		if (nanosleep(&tssleep, NULL) == 0) {
 			printf("nanosleep() returned success\n");
 			return CHILDPASS;
@@ -76,10 +76,10 @@
 			return PTS_UNRESOLVED;
 		}
 
-		slepts=tsafter.tv_sec-tsbefore.tv_sec;
+		slepts = tsafter.tv_sec - tsbefore.tv_sec;
 
-		printf("Start %d sec; End %d sec\n", (int) tsbefore.tv_sec,
-				(int) tsafter.tv_sec);
+		printf("Start %d sec; End %d sec\n", (int)tsbefore.tv_sec,
+		       (int)tsafter.tv_sec);
 		if (slepts >= SLEEPSEC) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
@@ -88,7 +88,7 @@
 			return PTS_FAIL;
 		}
 
-	} //end fork
+	}			//end fork
 
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-1.c
index c921d16..2368778 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-1.c
@@ -17,8 +17,8 @@
 	struct timespec tssleepfor, tsstorage;
 	int sleepnsec = -1;
 
-	tssleepfor.tv_sec=0;
-	tssleepfor.tv_nsec=sleepnsec;
+	tssleepfor.tv_sec = 0;
+	tssleepfor.tv_nsec = sleepnsec;
 	if (nanosleep(&tssleepfor, &tsstorage) == -1) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-2.c
index 4a71f3a..f14ec5e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-2.c
@@ -34,8 +34,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return CHILDFAILURE;
@@ -44,8 +44,8 @@
 			perror("Error calling sigaction\n");
 			return CHILDFAILURE;
 		}
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		if (nanosleep(&tssleepfor, &tsstorage) == -1) {
 			return CHILDSUCCESS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/6-1.c
index 6c17d7e..f8bf0f6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/6-1.c
@@ -18,15 +18,16 @@
 int main(int argc, char *argv[])
 {
 	struct timespec tssleepfor, tsstorage;
-	int sleepnsec[NUMTESTS] = {-1, -5, -1000000000, 1000000000,
-		1000000001, 2000000000, 2000000000 };
+	int sleepnsec[NUMTESTS] = { -1, -5, -1000000000, 1000000000,
+		1000000001, 2000000000, 2000000000
+	};
 	int i;
 	int failure = 0;
 
-	tssleepfor.tv_sec=0;
+	tssleepfor.tv_sec = 0;
 
-	for (i=0; i<NUMTESTS;i++) {
-		tssleepfor.tv_nsec=sleepnsec[i];
+	for (i = 0; i < NUMTESTS; i++) {
+		tssleepfor.tv_nsec = sleepnsec[i];
 		printf("sleep %d\n", sleepnsec[i]);
 		if (nanosleep(&tssleepfor, &tsstorage) == -1) {
 			if (EINVAL != errno) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-1.c
index 335d26c..7b935cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-1.c
@@ -35,8 +35,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return CHILDFAILURE;
@@ -45,8 +45,8 @@
 			perror("Error calling sigaction\n");
 			return CHILDFAILURE;
 		}
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		if (nanosleep(&tssleepfor, &tsstorage) == -1) {
 			if (EINTR == errno) {
 				printf("errno == EINTR\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-2.c
index 5a907e0..e15b62f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/7-2.c
@@ -43,8 +43,8 @@
 		/* child here */
 		int sleptplusremaining;
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return CHILDFAILURE;
@@ -53,8 +53,8 @@
 			perror("Error calling sigaction\n");
 			return CHILDFAILURE;
 		}
-		tssleepfor.tv_sec=sleepsec;
-		tssleepfor.tv_nsec=0;
+		tssleepfor.tv_sec = sleepsec;
+		tssleepfor.tv_nsec = 0;
 		if (nanosleep(&tssleepfor, &tsstorage) != -1) {
 			printf("nanosleep() was not interrupted\n");
 			return CHILDFAILURE;
@@ -65,16 +65,16 @@
 			return CHILDFAILURE;
 		}
 
-		sleptplusremaining = (tsafter.tv_sec-tsbefore.tv_sec) +
-			tsstorage.tv_sec;
+		sleptplusremaining = (tsafter.tv_sec - tsbefore.tv_sec) +
+		    tsstorage.tv_sec;
 
 		if (abs(sleptplusremaining - sleepsec) <= OKDELTA) {
 			printf("PASS - within %d difference\n",
-				abs(sleptplusremaining - sleepsec));
+			       abs(sleptplusremaining - sleepsec));
 			return CHILDSUCCESS;
 		} else {
 			printf("FAIL - within %d difference\n",
-				abs(sleptplusremaining - sleepsec));
+			       abs(sleptplusremaining - sleepsec));
 			return CHILDFAILURE;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-1.c
index 11aa7c9..00256f5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-1.c
@@ -31,8 +31,8 @@
 #include <sys/types.h>
 #include "posixtest.h"
 
-# define HANDLER_NOTCALLED 0
-# define HANDLER_CALLED 1
+#define HANDLER_NOTCALLED 0
+#define HANDLER_CALLED 1
 
 int prep_val;
 int parent_val;
@@ -56,7 +56,7 @@
 	return;
 }
 
-int main ()
+int main()
 {
 	pid_t pid;
 
@@ -66,8 +66,7 @@
 	child_val = HANDLER_NOTCALLED;
 
 	/* Set up the fork handlers */
-	if (pthread_atfork(prepare_handler, parent_handler, child_handler) != 0)
-	{
+	if (pthread_atfork(prepare_handler, parent_handler, child_handler) != 0) {
 		printf("Error in pthread_atfork\n");
 		return PTS_UNRESOLVED;
 	}
@@ -75,43 +74,34 @@
 	/* Now call fork() */
 	pid = fork();
 
-	if (pid < 0)
-	{
+	if (pid < 0) {
 		perror("Error in fork()\n");
 		return PTS_UNRESOLVED;
 	}
-	if (pid == 0)
-	{
+	if (pid == 0) {
 		/* Child process */
 		pthread_exit(0);
-	} else
-	{
+	} else {
 		/* Parent process */
 		wait(NULL);
 	}
 
 	/* Check if fork handlers were called */
-	if (prep_val == 1)
-	{
-		if (parent_val == 1)
-		{
-			if (parent_val == 1)
-			{
+	if (prep_val == 1) {
+		if (parent_val == 1) {
+			if (parent_val == 1) {
 				printf("Test PASSED\n");
 				return PTS_PASS;
-			} else
-			{
-				printf("Test FAILED: child handler not called\n");
+			} else {
+				printf
+				    ("Test FAILED: child handler not called\n");
 				return PTS_FAIL;
 			}
-		} else
-		{
+		} else {
 			printf("Test FAILED: parent handler not called\n");
 			return PTS_FAIL;
 		}
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED: prepare handler not called\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-2.c
index 69f04da..19d885a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-2.c
@@ -88,28 +88,28 @@
 /***************************    Test case   ***********************************/
 /******************************************************************************/
 
-pthread_t threads[ 3 ];
+pthread_t threads[3];
 pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
 pthread_t ch;
 
 /* at fork handlers */
 void prepare(void)
 {
-	threads[ 0 ] = pthread_self();
+	threads[0] = pthread_self();
 }
 
 void parent(void)
 {
-	threads[ 1 ] = pthread_self();
+	threads[1] = pthread_self();
 }
 
 void child(void)
 {
-	threads[ 2 ] = pthread_self();
+	threads[2] = pthread_self();
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -117,63 +117,56 @@
 	/* Wait main thread has registered the handler */
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	/* fork */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		if (!pthread_equal(ch, threads[0]))
-		{
-			FAILED("prepare handler was not called in the thread s context");
+	if (child == 0) {
+		if (!pthread_equal(ch, threads[0])) {
+			FAILED
+			    ("prepare handler was not called in the thread s context");
 		}
 
-		if (!pthread_equal(pthread_self(), threads[2]))
-		{
-			FAILED("child handler was not called in the thread s context");
+		if (!pthread_equal(pthread_self(), threads[2])) {
+			FAILED
+			    ("child handler was not called in the thread s context");
 		}
 
 		/* We're done */
 		exit(PTS_PASS);
 	}
 
-	if (!pthread_equal(ch, threads[0]))
-	{
-		FAILED("prepare handler was not called in the thread s context");
+	if (!pthread_equal(ch, threads[0])) {
+		FAILED
+		    ("prepare handler was not called in the thread s context");
 	}
 
-	if (!pthread_equal(pthread_self(), threads[1]))
-	{
+	if (!pthread_equal(pthread_self(), threads[1])) {
 		FAILED("parent handler was not called in the thread s context");
 	}
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
@@ -182,7 +175,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -191,38 +184,33 @@
 
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_create(&ch, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* Register the handlers */
 	ret = pthread_atfork(prepare, parent, child);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to register the atfork handlers");
 	}
 
 	/* Let the child go on */
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	ret = pthread_join(ch, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-1.c
index 00c3821..23e219c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-1.c
@@ -26,39 +26,36 @@
 #include <sys/types.h>
 #include "posixtest.h"
 
-int main ()
+int main()
 {
 	pid_t pid;
 	int ret;
 
 	/* Set up the fork handlers */
 	ret = pthread_atfork(NULL, NULL, NULL);
-	if (ret != 0)
-	{
-		if (ret == ENOMEM)
-		{
+	if (ret != 0) {
+		if (ret == ENOMEM) {
 			printf("Error: ran out of memory\n");
 			return PTS_UNRESOLVED;
 		}
 
-		printf("Test FAILED: Expected return value success, instead received %d\n", ret);
+		printf
+		    ("Test FAILED: Expected return value success, instead received %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
 	/* Now call fork() to make sure everything goes smoothly */
 	pid = fork();
 
-	if (pid < 0)
-	{
+	if (pid < 0) {
 		perror("Error in fork()\n");
 		return PTS_UNRESOLVED;
 	}
-	if (pid == 0)
-	{
+	if (pid == 0) {
 		/* Child process */
 		pthread_exit(0);
-	} else
-	{
+	} else {
 		/* Parent process */
 		wait(NULL);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-2.c
index 30b53d3..2938866 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-2.c
@@ -137,7 +137,7 @@
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -145,36 +145,30 @@
 	/* Wait main thread has registered the handler */
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	/* fork */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		if (iPrepare != 50)
-		{
+	if (child == 0) {
+		if (iPrepare != 50) {
 			FAILED("prepare handler were not called as expected");
 		}
 
-		if (iChild != 104)
-		{
+		if (iChild != 104) {
 			FAILED("prepare handler were not called as expected");
 		}
 
@@ -182,26 +176,22 @@
 		exit(PTS_PASS);
 	}
 
-	if (iPrepare != 50)
-	{
+	if (iPrepare != 50) {
 		FAILED("prepare handler were not called as expected");
 	}
 
-	if (iParent != 84)
-	{
+	if (iParent != 84) {
 		FAILED("prepare handler were not called as expected");
 	}
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
@@ -210,7 +200,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t ch;
@@ -220,80 +210,76 @@
 
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_create(&ch, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* Register the handlers */
 	ret = pthread_atfork(NULL, NULL, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(N,N,N)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(N,N,N)");
 	}
 
 	ret = pthread_atfork(p1, NULL, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(h,N,N)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(h,N,N)");
 	}
 
 	ret = pthread_atfork(NULL, pa2, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(N,h,N)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(N,h,N)");
 	}
 
 	ret = pthread_atfork(NULL, NULL, c3);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(N,N,h)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(N,N,h)");
 	}
 
 	ret = pthread_atfork(p4, pa4, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(h,h,N)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(h,h,N)");
 	}
 
 	ret = pthread_atfork(p5, NULL, c5);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(h,N,h)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(h,N,h)");
 	}
 
 	ret = pthread_atfork(NULL, pa6, c6);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to register the atfork handlers(N,h,h)");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to register the atfork handlers(N,h,h)");
 	}
 
 	/* Let the child go on */
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	ret = pthread_join(ch, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-2.c
index f66666e..58e31ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-2.c
@@ -79,25 +79,26 @@
 
 pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
 
-int controls[ 3 ] = {0, 0, 0};
+int controls[3] = { 0, 0, 0 };
+
 /* pthread_atfork handlers */
 void prepare(void)
 {
-	controls[ 0 ] ++;
+	controls[0]++;
 }
 
 void parent(void)
 {
-	controls[ 1 ] ++;
+	controls[1]++;
 }
 
 void child(void)
 {
-	controls[ 2 ] ++;
+	controls[2]++;
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -105,36 +106,30 @@
 	/* Wait main thread has registered the handler */
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	/* fork */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		if (controls[ 0 ] != 10000)
-		{
+	if (child == 0) {
+		if (controls[0] != 10000) {
 			FAILED("prepare handler skipped some rounds");
 		}
 
-		if (controls[ 2 ] != 10000)
-		{
+		if (controls[2] != 10000) {
 			FAILED("child handler skipped some rounds");
 		}
 
@@ -142,26 +137,22 @@
 		exit(PTS_PASS);
 	}
 
-	if (controls[ 0 ] != 10000)
-	{
+	if (controls[0] != 10000) {
 		FAILED("prepare handler skipped some rounds");
 	}
 
-	if (controls[ 1 ] != 10000)
-	{
+	if (controls[1] != 10000) {
 		FAILED("parent handler skipped some rounds");
 	}
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
@@ -170,7 +161,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 	pthread_t ch;
@@ -180,50 +171,43 @@
 
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_create(&ch, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* Register the handlers */
-	for (i = 0; i < 10000; i++)
-	{
+	for (i = 0; i < 10000; i++) {
 		ret = pthread_atfork(prepare, parent, child);
 
-		if (ret == ENOMEM)
-		{
+		if (ret == ENOMEM) {
 			output("ENOMEM returned after %i iterations\n", i);
 			break;
 		}
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Failed to register the atfork handlers");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to register the atfork handlers");
 		}
 	}
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 
 		/* Let the child go on */
 		ret = pthread_mutex_unlock(&mtx);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to unlock mutex");
 		}
 
 		ret = pthread_join(ch, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join the thread");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-3.c
index 008f0ee..ede73a4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-3.c
@@ -89,20 +89,17 @@
 
 sigset_t usersigs;
 
-typedef struct
-{
+typedef struct {
 	int sig;
 #ifdef WITH_SYNCHRO
 	sem_t *sem;
 #endif
-}
-
-thestruct;
+} thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
-	thestruct * thearg = (thestruct *) arg;
+	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
@@ -111,17 +108,15 @@
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 #ifdef WITH_SYNCHRO
 
-		if ((ret = sem_wait(thearg->sem)))
-		{
+		if ((ret = sem_wait(thearg->sem))) {
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
 
@@ -130,8 +125,7 @@
 
 		ret = kill(process, thearg->sig);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Kill in sendsig");
 		}
 
@@ -146,11 +140,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig1))
-	{
+	if (sem_post(&semsig1)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 	}
-
 #endif
 }
 
@@ -159,49 +151,45 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig2))
-	{
+	if (sem_post(&semsig2)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 2");
 	}
-
 #endif
 }
 
 void prepare(void)
 {
-	return ;
+	return;
 }
 
 void parent(void)
 {
-	return ;
+	return;
 }
 
 void child(void)
 {
-	return ;
+	return;
 }
 
 /* Test function -- calls pthread_setschedparam() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
 	int ret = 0;
 
 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 		ret = pthread_atfork(prepare, parent, child);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("EINTR was returned");
 		}
 
@@ -211,7 +199,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2, me;
@@ -223,19 +211,17 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
@@ -246,36 +232,30 @@
 
 	ret |= sigaddset(&usersigs, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
 	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
 	}
-
 #ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{
+	if (sem_init(&semsig1, 0, 1)) {
 		UNRESOLVED(errno, "Semsig1  init");
 	}
 
-	if (sem_init(&semsig2, 0, 1))
-	{
+	if (sem_init(&semsig2, 0, 1)) {
 		UNRESOLVED(errno, "Semsig2  init");
 	}
-
 #endif
 
 	me = pthread_self();
 
-	if ((ret = pthread_create(&th_work, NULL, test, &me)))
-	{
+	if ((ret = pthread_create(&th_work, NULL, test, &me))) {
 		UNRESOLVED(ret, "Worker thread creation failed");
 	}
 
@@ -286,13 +266,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *) &arg1)))
-	{
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 	}
 
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *) &arg2)))
-	{
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 	}
 
@@ -300,27 +278,22 @@
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{
+	if ((ret = pthread_join(th_sig1, NULL))) {
 		UNRESOLVED(ret, "Signal 1 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{
+	if ((ret = pthread_join(th_sig2, NULL))) {
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{
+	if ((ret = pthread_join(th_work, NULL))) {
 		UNRESOLVED(ret, "Worker thread join failed");
 	}
-
 #if VERBOSE > 0
 	output("Test executed successfully.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/4-1.c
index eea24bb..cca33d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/4-1.c
@@ -88,67 +88,76 @@
 {
 	control++;
 
-	if (control != 1) nerrors++;
+	if (control != 1)
+		nerrors++;
 }
 
 void pre2(void)
 {
 	control++;
 
-	if (control != 2) nerrors++;
+	if (control != 2)
+		nerrors++;
 }
 
 void pre1(void)
 {
 	control++;
 
-	if (control != 3) nerrors++;
+	if (control != 3)
+		nerrors++;
 }
 
 void par1(void)
 {
 	control++;
 
-	if (control != 4) nerrors++;
+	if (control != 4)
+		nerrors++;
 }
 
 void par2(void)
 {
 	control++;
 
-	if (control != 5) nerrors++;
+	if (control != 5)
+		nerrors++;
 }
 
 void par3(void)
 {
 	control++;
 
-	if (control != 6) nerrors++;
+	if (control != 6)
+		nerrors++;
 }
 
 void chi1(void)
 {
 	control += 2;
 
-	if (control != 5) nerrors++;
+	if (control != 5)
+		nerrors++;
 }
 
 void chi2(void)
 {
 	control += 2;
 
-	if (control != 7) nerrors++;
+	if (control != 7)
+		nerrors++;
 }
 
 void chi3(void)
 {
 	control += 2;
 
-	if (control != 9) nerrors++;
+	if (control != 9)
+		nerrors++;
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret, status;
 	pid_t child, ctl;
@@ -156,31 +165,26 @@
 	/* Wait main thread has registered the handler */
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	/* fork */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
-		if (nerrors)
-		{
+	if (child == 0) {
+		if (nerrors) {
 			FAILED("Errors occured in the child");
 		}
 
@@ -191,18 +195,15 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
-	if (nerrors)
-	{
+	if (nerrors) {
 		FAILED("Errors occured in the parent (only)");
 	}
 
@@ -211,7 +212,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t ch;
@@ -221,52 +222,45 @@
 
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex");
 	}
 
 	ret = pthread_create(&ch, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* Register the handlers */
 	ret = pthread_atfork(pre1, par1, chi1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to register the atfork handlers");
 	}
 
 	ret = pthread_atfork(pre2, par2, chi2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to register the atfork handlers");
 	}
 
 	ret = pthread_atfork(pre3, par3, chi3);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to register the atfork handlers");
 	}
 
 	/* Let the child go on */
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex");
 	}
 
 	ret = pthread_join(ch, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/1-1.c
index 2756474..9157731 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/1-1.c
@@ -38,41 +38,36 @@
 	int ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy attribute */
-	if (pthread_attr_destroy(&new_attr) != 0)
-	{
+	if (pthread_attr_destroy(&new_attr) != 0) {
 		perror("Cannot destroy the attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Creating a thread, passing to it the destroyed attribute, should
 	 * result in an error value of EINVAL (invalid 'attr' value). */
-       ret=pthread_create(&new_th, &new_attr, a_thread_func, NULL);
+	ret = pthread_create(&new_th, &new_attr, a_thread_func, NULL);
 
-       if (ret==EINVAL)
-       {
-	       printf("Test PASSED\n");
-	       return PTS_PASS;
-       }
-       else if ((ret != 0) && ((ret == EPERM) || (ret == EAGAIN)))
-       {
-	       perror("Error created a new thread\n");
-	       return PTS_UNRESOLVED;
-       }
-       else if (ret==0)
-       {
-	       printf("Test PASSED: NOTE*: Though returned 0 when creating a thread with a destroyed attribute, this behavior is compliant with garbage-in-garbage-out. \n");
-	       return PTS_PASS;
-       } else
-       {
-	       printf("Test FAILED: (1) Incorrect return code from pthread_create(); %d not EINVAL  or  (2) Error in pthread_create()'s behavior in returning error codes \n", ret);
-	       return PTS_FAIL;
-       }
+	if (ret == EINVAL) {
+		printf("Test PASSED\n");
+		return PTS_PASS;
+	} else if ((ret != 0) && ((ret == EPERM) || (ret == EAGAIN))) {
+		perror("Error created a new thread\n");
+		return PTS_UNRESOLVED;
+	} else if (ret == 0) {
+		printf
+		    ("Test PASSED: NOTE*: Though returned 0 when creating a thread with a destroyed attribute, this behavior is compliant with garbage-in-garbage-out. \n");
+		return PTS_PASS;
+	} else {
+		printf
+		    ("Test FAILED: (1) Incorrect return code from pthread_create(); %d not EINVAL  or  (2) Error in pthread_create()'s behavior in returning error codes \n",
+		     ret);
+		return PTS_FAIL;
+	}
 
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/2-1.c
index 9ead05a..91c6d21 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/2-1.c
@@ -27,27 +27,22 @@
 	pthread_attr_t new_attr;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy attribute */
-	if (pthread_attr_destroy(&new_attr) != 0)
-	{
+	if (pthread_attr_destroy(&new_attr) != 0) {
 		perror("Cannot destroy the attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize attribute.  This shouldn't result in an error. */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/3-1.c
index c094909..5b241f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/3-1.c
@@ -24,20 +24,16 @@
 	pthread_attr_t new_attr;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy attribute */
-	if (pthread_attr_destroy(&new_attr) != 0)
-	{
+	if (pthread_attr_destroy(&new_attr) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-1.c
index 1ed6b9e..b144f48 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-1.c
@@ -26,27 +26,22 @@
 	int detach_state;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* The test passes if pthread_attr_getdetachstate gets the attribute
 	 * of PTHREAD_CREATE_JOINABLE from the attribute object. */
-	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0)
-	{
+	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (detach_state == PTHREAD_CREATE_JOINABLE)
-	{
+	if (detach_state == PTHREAD_CREATE_JOINABLE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-2.c
index f372fd9..de16286 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getdetachstate/1-2.c
@@ -30,34 +30,29 @@
 	int detach_state;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the detachstate to PTHREAD_CREATE_DETACHED. */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* The test passes if pthread_attr_getdetachstate gets the attribute
 	 * of PTHREAD_CREATE_DETACHED from the attribute object. */
-	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0)
-	{
+	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (detach_state == PTHREAD_CREATE_DETACHED)
-	{
+	if (detach_state == PTHREAD_CREATE_DETACHED) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getinheritsched/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getinheritsched/1-1.c
index ebdd7a9..f9465a7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getinheritsched/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getinheritsched/1-1.c
@@ -26,7 +26,8 @@
 #define EXPLICIT PTHREAD_EXPLICIT_SCHED
 #define INHERIT PTHREAD_INHERIT_SCHED
 
-int verify_inheritsched(pthread_attr_t *attr, int schedtype) {
+int verify_inheritsched(pthread_attr_t * attr, int schedtype)
+{
 	int rc;
 	int inheritsched;
 
@@ -35,27 +36,27 @@
 		perror(ERROR_PREFIX "pthread_attr_getinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-	switch(schedtype) {
+	switch (schedtype) {
 	case INHERIT:
-  		if (inheritsched != INHERIT) {
-    			perror(ERROR_PREFIX "got wrong inheritsched param");
-    			exit(PTS_FAIL);
-  		}
+		if (inheritsched != INHERIT) {
+			perror(ERROR_PREFIX "got wrong inheritsched param");
+			exit(PTS_FAIL);
+		}
 		break;
 	case EXPLICIT:
-  		if (inheritsched != EXPLICIT) {
-    			perror(ERROR_PREFIX "got wrong inheritsched param");
-    			exit(PTS_FAIL);
-  		}
+		if (inheritsched != EXPLICIT) {
+			perror(ERROR_PREFIX "got wrong inheritsched param");
+			exit(PTS_FAIL);
+		}
 		break;
 	}
-      return 0;
+	return 0;
 }
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -63,21 +64,21 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setinheritsched(&attr, INHERIT);
+	rc = pthread_attr_setinheritsched(&attr, INHERIT);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_inheritsched(&attr, INHERIT);
+	verify_inheritsched(&attr, INHERIT);
 
-  	rc = pthread_attr_setinheritsched(&attr, EXPLICIT);
+	rc = pthread_attr_setinheritsched(&attr, EXPLICIT);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_inheritsched(&attr, EXPLICIT);
+	verify_inheritsched(&attr, EXPLICIT);
 
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/1-1.c
index b6c6eee..89f1c5c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/1-1.c
@@ -28,7 +28,8 @@
 #define RRPOLICY SCHED_RR
 #define OTHERPOLICY SCHED_OTHER
 
-int verify_param(pthread_attr_t *attr, int priority) {
+int verify_param(pthread_attr_t * attr, int priority)
+{
 	int rc;
 	struct sched_param param;
 
@@ -41,15 +42,15 @@
 		printf(ERROR_PREFIX "got wrong sched param\n");
 		exit(PTS_FAIL);
 	}
-      return 0;
+	return 0;
 }
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
-	struct sched_param    param;
-	int                   priority;
+	int rc = 0;
+	pthread_attr_t attr;
+	struct sched_param param;
+	int priority;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedpolicy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedpolicy/2-1.c
index d943dfa..2f3e6d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedpolicy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedpolicy/2-1.c
@@ -27,7 +27,8 @@
 #define RRPOLICY SCHED_RR
 #define OTHERPOLICY SCHED_OTHER
 
-int verify_policy(pthread_attr_t *attr, int policytype) {
+int verify_policy(pthread_attr_t * attr, int policytype)
+{
 	int rc;
 	int policy;
 
@@ -36,33 +37,33 @@
 		printf(ERROR_PREFIX "pthread_attr_getschedpolicy\n");
 		exit(PTS_UNRESOLVED);
 	}
-	switch(policytype) {
+	switch (policytype) {
 	case SCHED_FIFO:
-  		if (policy != FIFOPOLICY) {
-    			printf(ERROR_PREFIX "got wrong policy param\n");
-    			exit(PTS_FAIL);
-  		}
+		if (policy != FIFOPOLICY) {
+			printf(ERROR_PREFIX "got wrong policy param\n");
+			exit(PTS_FAIL);
+		}
 		break;
 	case SCHED_RR:
-  		if (policy != RRPOLICY) {
-    			printf(ERROR_PREFIX "got wrong policy param\n");
-    			exit(PTS_FAIL);
-  		}
+		if (policy != RRPOLICY) {
+			printf(ERROR_PREFIX "got wrong policy param\n");
+			exit(PTS_FAIL);
+		}
 		break;
 	case SCHED_OTHER:
-  		if (policy != OTHERPOLICY) {
-    			printf(ERROR_PREFIX "got wrong policy param\n");
-    			exit(PTS_FAIL);
-  		}
+		if (policy != OTHERPOLICY) {
+			printf(ERROR_PREFIX "got wrong policy param\n");
+			exit(PTS_FAIL);
+		}
 		break;
 	}
-      return 0;
+	return 0;
 }
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -70,28 +71,28 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setschedpolicy(&attr, FIFOPOLICY);
+	rc = pthread_attr_setschedpolicy(&attr, FIFOPOLICY);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedpolicy\n");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_policy(&attr, FIFOPOLICY);
+	verify_policy(&attr, FIFOPOLICY);
 
-  	rc = pthread_attr_setschedpolicy(&attr, RRPOLICY);
+	rc = pthread_attr_setschedpolicy(&attr, RRPOLICY);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedpolicy\n");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_policy(&attr, RRPOLICY);
+	verify_policy(&attr, RRPOLICY);
 
-  	rc = pthread_attr_setschedpolicy(&attr, OTHERPOLICY);
+	rc = pthread_attr_setschedpolicy(&attr, OTHERPOLICY);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedpolicy\n");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_policy(&attr, OTHERPOLICY);
+	verify_policy(&attr, OTHERPOLICY);
 
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_destroy\n");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getscope/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getscope/1-1.c
index 5eb92db..61eaf34 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getscope/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getscope/1-1.c
@@ -28,7 +28,8 @@
 #define SYSTEMSCOPE PTHREAD_SCOPE_SYSTEM
 #define PROCESSSCOPE PTHREAD_SCOPE_PROCESS
 
-int verify_scope(pthread_attr_t *attr, int scopetype) {
+int verify_scope(pthread_attr_t * attr, int scopetype)
+{
 	int rc;
 	int scope;
 
@@ -37,27 +38,27 @@
 		perror(ERROR_PREFIX "pthread_attr_getscope");
 		exit(PTS_UNRESOLVED);
 	}
-	switch(scopetype) {
+	switch (scopetype) {
 	case SYSTEMSCOPE:
-  		if (scope != SYSTEMSCOPE) {
-    			perror(ERROR_PREFIX "got wrong scope param");
-    			exit(PTS_FAIL);
-  		}
+		if (scope != SYSTEMSCOPE) {
+			perror(ERROR_PREFIX "got wrong scope param");
+			exit(PTS_FAIL);
+		}
 		break;
 	case PROCESSSCOPE:
-  		if (scope != PROCESSSCOPE) {
-    			perror(ERROR_PREFIX "got wrong scope param");
-    			exit(PTS_FAIL);
-  		}
+		if (scope != PROCESSSCOPE) {
+			perror(ERROR_PREFIX "got wrong scope param");
+			exit(PTS_FAIL);
+		}
 		break;
 	}
-      return 0;
+	return 0;
 }
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -65,20 +66,20 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setscope(&attr, SYSTEMSCOPE);
+	rc = pthread_attr_setscope(&attr, SYSTEMSCOPE);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "PTHREAD_SCOPE_SYSTEM is not supported");
 	} else {
-  		verify_scope(&attr, SYSTEMSCOPE);
+		verify_scope(&attr, SYSTEMSCOPE);
 	}
-  	rc = pthread_attr_setscope(&attr, PROCESSSCOPE);
+	rc = pthread_attr_setscope(&attr, PROCESSSCOPE);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "PTHREAD_SCOPE_SYSTEM is not supported");
 	} else {
-  		verify_scope(&attr, PROCESSSCOPE);
+		verify_scope(&attr, PROCESSSCOPE);
 	}
 
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstack/1-1.c
index f2725ba..e9f22ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstack/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstack/1-1.c
@@ -31,7 +31,7 @@
 {
 	pthread_attr_t attr;
 	void *stack_addr;
-        size_t stack_size;
+	size_t stack_size;
 	size_t ssize;
 	void *saddr;
 	int rc;
@@ -53,34 +53,32 @@
 
 	stack_size = PTHREAD_STACK_MIN;
 
-	if (posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+			   stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 	printf("stack_addr = %p, stack_size = %zu\n", stack_addr, stack_size);
 
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_setstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_setstack");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstack(&attr, &saddr, &ssize);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_getstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_getstack");
+		exit(PTS_UNRESOLVED);
+	}
 	printf("saddr = %p, ssize = %zu\n", saddr, ssize);
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstacksize/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstacksize/1-1.c
index 3946f62..8bd77b6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstacksize/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstacksize/1-1.c
@@ -52,34 +52,31 @@
 
 	stack_size = PTHREAD_STACK_MIN;
 
-	if (posix_memalign (&saddr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&saddr, sysconf(_SC_PAGE_SIZE), stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("stack_size = %lu\n", stack_size); */
 
 	rc = pthread_attr_setstacksize(&attr, stack_size);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_setstacksize");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_setstacksize");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstacksize(&attr, &ssize);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_getstacksize");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_getstacksize");
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("ssize = %lu\n", ssize); */
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/1-1.c
index ca77dbd..adfb502 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/1-1.c
@@ -30,8 +30,7 @@
 	int detach_state;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
@@ -39,19 +38,15 @@
 	/* The test passes if the attribute object has a detachstate of
 	 * PTHREAD_CREATE_JOINABLE, which is the default value for this
 	 * attribute. */
-	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0)
-	{
+	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0) {
 		perror("Error obtaining the detachstate of the attribute\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (detach_state == PTHREAD_CREATE_JOINABLE)
-	{
+	if (detach_state == PTHREAD_CREATE_JOINABLE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/2-1.c
index fbcdf34..e8e735b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/2-1.c
@@ -27,25 +27,26 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define TIMEOUT 5	/* Timeout value of 5 seconds. */
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define TIMEOUT 5		/* Timeout value of 5 seconds. */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 
 void *a_thread_func()
 {
 
 	/* Indicate to main() that the thread was created. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for main to detach change the attribute object and try and detach this thread.
 	 * Wait for a timeout value of 10 seconds before timing out if the thread was not able
 	 * to be detached. */
 	sleep(TIMEOUT);
 
-	printf("Test FAILED: Did not detach the thread, main still waiting for it to end execution.\n");
-	pthread_exit((void*)PTS_FAIL);
+	printf
+	    ("Test FAILED: Did not detach the thread, main still waiting for it to end execution.\n");
+	pthread_exit((void *)PTS_FAIL);
 	return NULL;
 }
 
@@ -57,38 +58,34 @@
 
 	/* Initializing */
 	sem1 = INMAIN;
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread passing it the new attribute object */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to indicate that the start routine for the thread has started. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* If pthread_detach fails, that means that the test fails as well. */
-	ret_val=pthread_detach(new_th);
+	ret_val = pthread_detach(new_th);
 
-	if (ret_val != 0)
-	{
+	if (ret_val != 0) {
 		/* Thread is already detached. */
-		if (ret_val == EINVAL)
-		{
+		if (ret_val == EINVAL) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
 		/* pthread_detach() failed for another reason. */
-		else
-		{
-			printf("Error in pthread_detach(), error: %d\n", ret_val);
+		else {
+			printf("Error in pthread_detach(), error: %d\n",
+			       ret_val);
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/3-1.c
index bd70999..bce109f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/3-1.c
@@ -36,24 +36,21 @@
 	int i, ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create [NUM_THREADS] number of threads with the same attribute
 	 * object. */
-	for (i=0;i<NUM_THREADS;i++)
-	{
-		ret=pthread_create(&new_threads[i], &new_attr, a_thread_func, NULL);
-		if ((ret != 0) && (ret == EINVAL))
-		{
+	for (i = 0; i < NUM_THREADS; i++) {
+		ret =
+		    pthread_create(&new_threads[i], &new_attr, a_thread_func,
+				   NULL);
+		if ((ret != 0) && (ret == EINVAL)) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
-		}
-		else if (ret !=0)
-		{
+		} else if (ret != 0) {
 			perror("Error creating thread\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/4-1.c
index 1c363d0..669d48f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/4-1.c
@@ -25,15 +25,13 @@
 	int ret;
 
 	/* Initialize attribute */
-	ret=pthread_attr_init(&new_attr);
-	if (ret == 0)
-	{
+	ret = pthread_attr_init(&new_attr);
+	if (ret == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 	/* There's insufficient memory, can't run test */
-	else if (ret == ENOMEM)
-	{
+	else if (ret == ENOMEM) {
 		perror("Error in pthread_attr_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -41,8 +39,7 @@
 	/* Any other return value other than 0 or ENOMEM, means the test
 	 * failed, because those are the only 2 return values for this
 	 * function. */
-	else
-	{
+	else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-1.c
index f07d2d1..2211e5c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-1.c
@@ -37,33 +37,28 @@
 	int detach_state;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to PTHREAD_CREATE_JOINABLE. */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to see if the detachstate is truly PTHREAD_CREATE_JOINABLE. */
-	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0)
-	{
+	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0) {
 		perror("Error in pthread_attr_getdetachstate.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (detach_state == PTHREAD_CREATE_JOINABLE)
-	{
+	if (detach_state == PTHREAD_CREATE_JOINABLE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-2.c
index 5eb89b6..cb902bb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-2.c
@@ -37,33 +37,28 @@
 	int detach_state;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to PTHREAD_CREATE_DETACHED. */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to see if the detachstate is truly PTHREAD_CREATE_DETACHED. */
-	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0)
-	{
+	if (pthread_attr_getdetachstate(&new_attr, &detach_state) != 0) {
 		perror("Error in pthread_attr_getdetachstate.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (detach_state == PTHREAD_CREATE_DETACHED)
-	{
+	if (detach_state == PTHREAD_CREATE_DETACHED) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/2-1.c
index abfe39b..81deb5e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/2-1.c
@@ -39,40 +39,36 @@
 	int ret_val;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to PTHREAD_CREATE_DETACHED. */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread passing it the new attribute object */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* If pthread_join() or pthread_detach fail, that means that the
 	 * test fails as well. */
-	ret_val=pthread_join(new_th, NULL);
+	ret_val = pthread_join(new_th, NULL);
 
-	if (ret_val != EINVAL)
-	{
+	if (ret_val != EINVAL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	ret_val=pthread_detach(new_th);
+	ret_val = pthread_detach(new_th);
 
-	if (ret_val != EINVAL)
-	{
+	if (ret_val != EINVAL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/4-1.c
index 56f71a7..222c863 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/4-1.c
@@ -27,18 +27,16 @@
 	int ret_val, invalid_val;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to an invalid value of 1000000. */
-	invalid_val=1000000;
-	ret_val=pthread_attr_setdetachstate(&new_attr, invalid_val);
+	invalid_val = 1000000;
+	ret_val = pthread_attr_setdetachstate(&new_attr, invalid_val);
 
-	if (ret_val != EINVAL)
-	{
+	if (ret_val != EINVAL) {
 		printf("Test FAILED: Returned %d instead of EINVAL\n", ret_val);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/1-1.c
index 651f1a5..67281c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/1-1.c
@@ -26,7 +26,8 @@
 #define EXPLICIT PTHREAD_EXPLICIT_SCHED
 #define INHERIT PTHREAD_INHERIT_SCHED
 
-int verify_inheritsched(pthread_attr_t *attr, int schedtype) {
+int verify_inheritsched(pthread_attr_t * attr, int schedtype)
+{
 	int rc;
 	int inheritsched;
 
@@ -35,27 +36,27 @@
 		perror(ERROR_PREFIX "pthread_attr_getinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-	switch(schedtype) {
+	switch (schedtype) {
 	case INHERIT:
-  		if (inheritsched != INHERIT) {
-    			perror(ERROR_PREFIX "got wrong inheritsched param");
-    			exit(PTS_FAIL);
-  		}
+		if (inheritsched != INHERIT) {
+			perror(ERROR_PREFIX "got wrong inheritsched param");
+			exit(PTS_FAIL);
+		}
 		break;
 	case EXPLICIT:
-  		if (inheritsched != EXPLICIT) {
-    			perror(ERROR_PREFIX "got wrong inheritsched param");
-    			exit(PTS_FAIL);
-  		}
+		if (inheritsched != EXPLICIT) {
+			perror(ERROR_PREFIX "got wrong inheritsched param");
+			exit(PTS_FAIL);
+		}
 		break;
 	}
-      return 0;
+	return 0;
 }
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -63,21 +64,21 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setinheritsched(&attr, INHERIT);
+	rc = pthread_attr_setinheritsched(&attr, INHERIT);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_inheritsched(&attr, INHERIT);
+	verify_inheritsched(&attr, INHERIT);
 
-  	rc = pthread_attr_setinheritsched(&attr, EXPLICIT);
+	rc = pthread_attr_setinheritsched(&attr, EXPLICIT);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
 	}
-  	verify_inheritsched(&attr, EXPLICIT);
+	verify_inheritsched(&attr, EXPLICIT);
 
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-1.c
index cd65e3e..caf583b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-1.c
@@ -37,21 +37,22 @@
 	pthread_t self = pthread_self();
 
 	struct sched_param param;
-        memset(&param, 0, sizeof(param));
+	memset(&param, 0, sizeof(param));
 
 	rc = pthread_getschedparam(self, &new_policy, &param);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_getschedparam");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_getschedparam");
+		exit(PTS_UNRESOLVED);
+	}
 	if (new_policy == policy) {
 		fprintf(stderr, ERROR_PREFIX "The scheduling attribute is not "
-		       "inherited from creating thread \n");
+			"inherited from creating thread \n");
 		exit(PTS_FAIL);
 	}
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_t new_th;
@@ -69,33 +70,31 @@
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setschedpolicy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	int insched = PTHREAD_INHERIT_SCHED;
 	rc = pthread_attr_setinheritsched(&attr, insched);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_create");
-                exit(PTS_UNRESOLVED);
-        }
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-2.c
index 8453aa0..8162661 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-2.c
@@ -36,28 +36,29 @@
 
 const long int policy = SCHED_FIFO;
 const long int old_policy = SCHED_OTHER;
-void *thread_func(void* arg)
+void *thread_func(void *arg)
 {
 	int rc;
 	int new_policy;
 	pthread_t self = pthread_self();
 
 	struct sched_param param;
-        memset(&param, 0, sizeof(param));
+	memset(&param, 0, sizeof(param));
 
 	rc = pthread_getschedparam(self, &new_policy, &param);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_getschedparam");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_getschedparam");
+		exit(PTS_UNRESOLVED);
+	}
 	if (new_policy == old_policy) {
 		fprintf(stderr, ERROR_PREFIX "The scheduling attribute should "
-                        "not be inherited from creating thread \n");
+			"not be inherited from creating thread \n");
 		exit(PTS_FAIL);
 	}
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_t new_th;
@@ -76,38 +77,36 @@
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedpolicy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	sp.sched_priority = 1;
 	rc = pthread_attr_setschedparam(&attr, &sp);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedparam");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	int insched = PTHREAD_EXPLICIT_SCHED;
 	rc = pthread_attr_setinheritsched(&attr, insched);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		printf("Error at pthread_create(): %s\n", strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                printf(ERROR_PREFIX "pthread_join");
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_join");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                printf(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
 	}
 	printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-3.c
index 9defe15..64ddddf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-3.c
@@ -34,9 +34,9 @@
 
 void *thread(void *tmp)
 {
-	struct sched_param    param;
-	int                   policy;
-	int                   rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	rc = pthread_getschedparam(pthread_self(), &policy, &param);
 	if (rc != 0) {
@@ -55,10 +55,10 @@
 
 int main()
 {
-	pthread_attr_t          attr;
-	pthread_t               thread_id;
-	struct sched_param      param;
-	int                     rc = 0;
+	pthread_attr_t attr;
+	pthread_t thread_id;
+	struct sched_param param;
+	int rc = 0;
 
 	param.sched_priority = PRIORITY;
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-4.c
index 2c2b14c..2651524 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-4.c
@@ -34,9 +34,9 @@
 
 void *thread(void *tmp)
 {
-	struct sched_param         param;
-	int                        policy;
-	int                        rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	rc = pthread_getschedparam(pthread_self(), &policy, &param);
 	if (rc != 0) {
@@ -55,10 +55,10 @@
 
 int main()
 {
-	pthread_attr_t             attr;
-	pthread_t                  thread_id;
-	struct sched_param         param;
-	int                        rc = 0;
+	pthread_attr_t attr;
+	pthread_t thread_id;
+	struct sched_param param;
+	int rc = 0;
 
 	param.sched_priority = PRIORITY;
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/4-1.c
index 4dfcbdf..ff2f0cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/4-1.c
@@ -28,8 +28,8 @@
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -37,12 +37,12 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setinheritsched(&attr, INVALIDSCHED);
+	rc = pthread_attr_setinheritsched(&attr, INVALIDSCHED);
 	if ((rc != EINVAL)) {
 		perror(ERROR_PREFIX "pthread_attr_setinheritsched");
 		exit(PTS_FAIL);
 	}
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-1.c
index 7a5f4b4..2ec7261 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-1.c
@@ -31,18 +31,18 @@
 {
 	thread_created = 1;
 	pthread_exit(0);
-	return (void*)(0);
+	return (void *)(0);
 }
 
 int main()
 {
-	pthread_t              thread;
-	pthread_attr_t         attr;
- 	void                   *status;
- 	int                    rc=0;
-	int                    policy = FIFOPOLICY;
-	struct sched_param     param;
-	int                    priority;
+	pthread_t thread;
+	pthread_attr_t attr;
+	void *status;
+	int rc = 0;
+	int policy = FIFOPOLICY;
+	struct sched_param param;
+	int priority;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -59,19 +59,21 @@
 	priority = sched_get_priority_max(policy);
 	if (priority == -1) {
 		printf(ERROR_PREFIX "sched_priority_get_max\n");
- 		exit(PTS_FAIL);
+		exit(PTS_FAIL);
 	}
 	param.sched_priority = priority;
 	rc = pthread_attr_setschedparam(&attr, &param);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_setschedparam\n");
- 		exit(PTS_FAIL);
+		exit(PTS_FAIL);
 	}
 
 	rc = pthread_create(&thread, &attr, thread_func, NULL);
 	if (rc != 0) {
 		if (rc == EPERM) {
-			printf(ERROR_PREFIX "Permission Denied when creating thread with policy %d\n", policy);
+			printf(ERROR_PREFIX
+			       "Permission Denied when creating thread with policy %d\n",
+			       policy);
 			exit(PTS_UNRESOLVED);
 		} else {
 			printf(ERROR_PREFIX "pthread_create()\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-2.c
index 8b8b330..14f91e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-2.c
@@ -32,18 +32,18 @@
 {
 	thread_created = 1;
 	pthread_exit(0);
-	return (void*)(0);
+	return (void *)(0);
 }
 
 int main()
 {
-	pthread_t              thread;
-	pthread_attr_t         attr;
-	void                   *status;
- 	int                    rc=0;
-	int                    policy = RRPOLICY;
-	struct sched_param     param;
-	int                    priority;
+	pthread_t thread;
+	pthread_attr_t attr;
+	void *status;
+	int rc = 0;
+	int policy = RRPOLICY;
+	struct sched_param param;
+	int priority;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -73,7 +73,9 @@
 	rc = pthread_create(&thread, &attr, thread_func, NULL);
 	if (rc != 0) {
 		if (rc == EPERM) {
-			printf(ERROR_PREFIX "Permission Denied when creating thread with policy %d\n", policy);
+			printf(ERROR_PREFIX
+			       "Permission Denied when creating thread with policy %d\n",
+			       policy);
 			exit(PTS_UNRESOLVED);
 		} else {
 			printf(ERROR_PREFIX "pthread_create()\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-3.c
index fbc497e..2f9e46a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-3.c
@@ -34,10 +34,10 @@
 int priority_correct = -1;
 
 /* Thread function which checks the scheduler settings for itself */
-void * thread(void *tmp)
+void *thread(void *tmp)
 {
-	struct sched_param   param;
-	int                  policy;
+	struct sched_param param;
+	int policy;
 	if (pthread_getschedparam(pthread_self(), &policy, &param) != 0) {
 		printf(ERROR_PREFIX "pthread_getschedparam\n");
 		exit(PTS_UNRESOLVED);
@@ -53,12 +53,12 @@
 
 int main()
 {
-	pthread_t            thread_id;
-	pthread_attr_t       attr;
-	struct sched_param   param;
-	int                  rc = 0;
+	pthread_t thread_id;
+	pthread_attr_t attr;
+	struct sched_param param;
+	int rc = 0;
 
-	/* initialze the attribute and set policy and priority in it*/
+	/* initialze the attribute and set policy and priority in it */
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_init\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-4.c
index 5f0aeb6..595504c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/1-4.c
@@ -34,11 +34,11 @@
 int priority_correct = -1;
 
 /* Thread function which checks the scheduler settings for itself */
-void * thread(void *tmp)
+void *thread(void *tmp)
 {
-	struct sched_param     param;
-	int                    policy;
-	int                    rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	rc = pthread_getschedparam(pthread_self(), &policy, &param);
 	if (rc != 0) {
@@ -56,12 +56,12 @@
 
 int main()
 {
-	pthread_t               thread_id;
-	pthread_attr_t          attr;
-	struct sched_param      param;
-	int                     rc = 0;
+	pthread_t thread_id;
+	pthread_attr_t attr;
+	struct sched_param param;
+	int rc = 0;
 
-	/* Initialze the attribute struct and set policy and priority in it*/
+	/* Initialze the attribute struct and set policy and priority in it */
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_attr_init\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-1.c
index 1261334..f9072d9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-1.c
@@ -27,11 +27,11 @@
 
 int main()
 {
-	pthread_attr_t         attr;
-	int                    rc=0;
-	int                    policy = FIFOPOLICY;
-	struct sched_param     param;
-	int                    priority;
+	pthread_attr_t attr;
+	int rc = 0;
+	int policy = FIFOPOLICY;
+	struct sched_param param;
+	int priority;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -54,7 +54,8 @@
 	param.sched_priority = priority + PRIORITY_OFFSET;
 	rc = pthread_attr_setschedparam(&attr, &param);
 	if ((rc != EINVAL) && (rc != ENOTSUP)) {
-		printf(ERROR_PREFIX "pthread_attr_setschedparam did not fail\n");
+		printf(ERROR_PREFIX
+		       "pthread_attr_setschedparam did not fail\n");
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-2.c
index 2db9600..f1289d7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/3-2.c
@@ -27,11 +27,11 @@
 
 int main()
 {
-	pthread_attr_t         attr;
-	int                    rc=0;
-	int                    policy = RRPOLICY;
-	struct sched_param     param;
-	int                    priority;
+	pthread_attr_t attr;
+	int rc = 0;
+	int policy = RRPOLICY;
+	struct sched_param param;
+	int priority;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -54,7 +54,8 @@
 	param.sched_priority = priority + PRIORITY_OFFSET;
 	rc = pthread_attr_setschedparam(&attr, &param);
 	if ((rc != EINVAL) && (rc != ENOTSUP)) {
-		printf(ERROR_PREFIX "pthread_attr_setschedparam did not fail\n");
+		printf(ERROR_PREFIX
+		       "pthread_attr_setschedparam did not fail\n");
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/2-1.c
index 7a17ced..6088466 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/2-1.c
@@ -76,7 +76,6 @@
 	else
 		priorities[2] = sp.sched_priority;
 
-
 	rc = pthread_mutex_unlock(&mutex);
 	if (rc) {
 		ERR_MSG("pthread_mutex_unlock()", rc);
@@ -84,10 +83,10 @@
 	}
 
 done:
-	return (void *) (long) rc;
+	return (void *)(long)rc;
 }
 
-static int create_thread(int prio, pthread_t *tid)
+static int create_thread(int prio, pthread_t * tid)
 {
 	int rc;
 	char *func;
@@ -145,7 +144,7 @@
 	return 0;
 
 unlock:
-	(void) pthread_mutex_unlock(&c_mutex);
+	(void)pthread_mutex_unlock(&c_mutex);
 error:
 	pthread_attr_destroy(&attr);
 done:
@@ -207,20 +206,20 @@
 	}
 
 	/* Threads fail? */
-	if ((long) r1 || (long) r2 || (long) r2)
+	if ((long)r1 || (long)r2 || (long)r2)
 		goto done;
 
 	/* priorities must be high to low */
 	status = PTS_FAIL;
 	if (priorities[0] != PRIO_HIGH)
 		printf("Failed: first is prio: %u, should be: %u\n",
-				priorities[0], PRIO_HIGH);
+		       priorities[0], PRIO_HIGH);
 	else if (priorities[1] != PRIO_MED)
 		printf("Failed: second is prio: %u, should be: %u\n",
-				priorities[1], PRIO_MED);
+		       priorities[1], PRIO_MED);
 	else if (priorities[2] != PRIO_LOW)
 		printf("Failed: third is prio: %u, should be: %u\n",
-				priorities[2], PRIO_LOW);
+		       priorities[2], PRIO_LOW);
 	else
 		status = PTS_PASS;
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/4-1.c
index afaf493..c7db841 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/4-1.c
@@ -37,7 +37,7 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setschedpolicy(&attr, INVALIDPOLICY);
+	rc = pthread_attr_setschedpolicy(&attr, INVALIDPOLICY);
 	if (rc != EINVAL) {
 		ERR_MSG("pthread_attr_setschedpolicy()", rc);
 		status = PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/5-1.c
index a0c8fe5..2ed0d20 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/5-1.c
@@ -46,7 +46,7 @@
 		status = PTS_FAIL;
 	}
 
-	(void) pthread_attr_destroy(&attr);
+	(void)pthread_attr_destroy(&attr);
 
 	return status;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/1-1.c
index c915eb0..82ff979 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/1-1.c
@@ -51,39 +51,37 @@
 	if (rc != 0) {
 		perror(ERROR_PREFIX "PTHREAD_SCOPE_SYSTEM is not supported");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_create");
-                exit(PTS_UNRESOLVED);
-        }
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getscope(&attr, &cscope);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_getscope");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_getscope");
+		exit(PTS_UNRESOLVED);
+	}
 
 	if (cscope != CONSCOPE) {
 		fprintf(stderr, ERROR_PREFIX "The contentionscope is not "
-		       "correct \n");
+			"correct \n");
 		exit(PTS_FAIL);
 	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/4-1.c
index e4d7b50..8f5dfcc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setscope/4-1.c
@@ -28,8 +28,8 @@
 
 int main()
 {
-	int                   rc=0;
-	pthread_attr_t        attr;
+	int rc = 0;
+	pthread_attr_t attr;
 
 	rc = pthread_attr_init(&attr);
 	if (rc != 0) {
@@ -37,12 +37,12 @@
 		exit(PTS_UNRESOLVED);
 	}
 
-  	rc = pthread_attr_setscope(&attr, INVALIDSCOPE);
+	rc = pthread_attr_setscope(&attr, INVALIDSCOPE);
 	if ((rc != EINVAL)) {
 		perror(ERROR_PREFIX "pthread_attr_setscope");
 		exit(PTS_FAIL);
 	}
-  	rc = pthread_attr_destroy(&attr);
+	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
 		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/1-1.c
index ce2b881..89ba4dc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/1-1.c
@@ -37,6 +37,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_t new_th;
@@ -62,47 +63,44 @@
 
 	stack_size = PTHREAD_STACK_MIN;
 
-	if (posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
-	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size);*/
+	if (posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+			   stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
+	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size); */
 
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_setstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_setstack");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstack(&attr, &saddr, &ssize);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_getstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_getstack");
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("saddr = %p, ssize = %u\n", saddr, ssize); */
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		perror(ERROR_PREFIX "failed to create a thread");
-                exit(PTS_FAIL);
-        }
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c
index 3ba5c61..07346eb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/2-1.c
@@ -44,16 +44,15 @@
 
 	if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
 		printf(ERROR_PREFIX "pthread_getattr_np: %s", strerror(rc));
-		pthread_exit((void*)PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 	if ((rc = pthread_attr_getstack(&attr, &saddr, &ssize)) != 0) {
 		printf(ERROR_PREFIX "pthread_attr_getstack: %s", strerror(rc));
-		pthread_exit((void*)PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
-	if (ssize != stack_size || saddr != stack_addr)
-	{
+	if (ssize != stack_size || saddr != stack_addr) {
 		printf(ERROR_PREFIX "got the wrong stacksize or stackaddr");
-		pthread_exit((void*)PTS_FAIL);
+		pthread_exit((void *)PTS_FAIL);
 	}
 
 	pthread_exit(NULL);
@@ -92,37 +91,37 @@
 	stack_size = PTHREAD_STACK_MIN * 4;
 
 	if ((rc = posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
-	    stack_size)) != 0) {
+				 stack_size)) != 0) {
 		printf(ERROR_PREFIX "posix_memalign: %s\n", strerror(rc));
 		exit(PTS_UNRESOLVED);
-    	}
+	}
 
 	if ((rc = pthread_attr_setstack(&attr, stack_addr, stack_size)) != 0) {
-                printf(ERROR_PREFIX "pthread_attr_setstack: %s\n",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+		printf(ERROR_PREFIX "pthread_attr_setstack: %s\n",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	if ((rc = pthread_attr_getstack(&attr, &saddr, &ssize)) != 0) {
-                printf(ERROR_PREFIX "pthread_attr_getstack: %s\n",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+		printf(ERROR_PREFIX "pthread_attr_getstack: %s\n",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	if ((rc = pthread_create(&new_th, &attr, thread_func, NULL)) != 0) {
 		printf(ERROR_PREFIX "pthread_create: %s\n", strerror(rc));
-                exit(PTS_FAIL);
-        }
+		exit(PTS_FAIL);
+	}
 
 	if ((rc = pthread_join(new_th, NULL)) != 0) {
-                printf(ERROR_PREFIX "pthread_join: %s\n", strerror(rc));
+		printf(ERROR_PREFIX "pthread_join: %s\n", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	if ((rc = pthread_attr_destroy(&attr)) != 0) {
-                printf(ERROR_PREFIX "pthread_attr_destroy: %s\n", strerror(rc));
+		printf(ERROR_PREFIX "pthread_attr_destroy: %s\n", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/4-1.c
index 90d0b0c..71738f0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/4-1.c
@@ -34,12 +34,14 @@
 static void *stack_addr;
 size_t stack_size;
 
-int teststack() {
+int teststack()
+{
 	return 0;
 }
+
 void *thread_func()
 {
-	/* execute a function to test the read/right of the stack*/
+	/* execute a function to test the read/right of the stack */
 	if (teststack() != 0) {
 		perror(ERROR_PREFIX "stack wrong");
 		exit(PTS_FAIL);
@@ -47,6 +49,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_t new_th;
@@ -72,53 +75,49 @@
 
 	stack_size = PTHREAD_STACK_MIN;
 
-	if (posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+			   stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size); */
 
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_setstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_setstack");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstack(&attr, &saddr, &ssize);
-        if (rc != 0) {
-                perror(ERROR_PREFIX "pthread_attr_getstack");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_getstack");
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("saddr = %p, ssize = %u\n", saddr, ssize); */
 
-	if (ssize != stack_size || saddr != stack_addr)
-	{
+	if (ssize != stack_size || saddr != stack_addr) {
 		perror(ERROR_PREFIX "got the wrong stacksize or stackaddr");
 		exit(PTS_FAIL);
 	}
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		perror(ERROR_PREFIX "failed to create a thread");
-                exit(PTS_FAIL);
-        }
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
index 9b2fc7c..6814f7d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c
@@ -36,6 +36,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_attr_t attr;
@@ -58,27 +59,25 @@
 
 	stack_size = STACKSIZE;
 
-	if (posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+			   stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 
 	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size); */
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != EINVAL) {
-                perror(ERROR_PREFIX "Got the wrong return value");
-                exit(PTS_FAIL);
-        }
+	if (rc != EINVAL) {
+		perror(ERROR_PREFIX "Got the wrong return value");
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
index eb4d290..bf5b3ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c
@@ -37,6 +37,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_attr_t attr;
@@ -59,37 +60,35 @@
 
 	stack_size = PTHREAD_STACK_MIN;
 
-	if (posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+			   stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 
 	stack_addr = stack_addr + OFFSET;
 	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size); */
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != EINVAL) {
-                printf("The function didn't fail when stackaddr "
-                       "lacks proper alignment\n");
-        }
+	if (rc != EINVAL) {
+		printf("The function didn't fail when stackaddr "
+		       "lacks proper alignment\n");
+	}
 
 	stack_addr = stack_addr + OFFSET;
 	stack_size = PTHREAD_STACK_MIN + OFFSET;
 	/* printf("stack_addr = %p, stack_size = %u\n", stack_addr, stack_size); */
 	rc = pthread_attr_setstack(&attr, stack_addr, stack_size);
-        if (rc != EINVAL) {
-                printf("The function didn't fail when (stackaddr + stacksize) "
-                       "lacks proper alignment\n");
-        }
+	if (rc != EINVAL) {
+		printf("The function didn't fail when (stackaddr + stacksize) "
+		       "lacks proper alignment\n");
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c
index afb14be..f1d0873 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c
@@ -34,6 +34,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_t new_th;
@@ -52,50 +53,47 @@
 
 	/* printf("stack_size = %lu\n", stack_size); */
 
-	rc = posix_memalign (&saddr, sysconf(_SC_PAGE_SIZE), stack_size);
+	rc = posix_memalign(&saddr, sysconf(_SC_PAGE_SIZE), stack_size);
 
-	if (rc != 0)
-    	{
-      		printf (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory: %s", strerror(rc));
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (rc != 0) {
+		printf(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory: %s", strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_setstacksize(&attr, stack_size);
-        if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_attr_setstacksize: %s",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_setstacksize: %s",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstacksize(&attr, &ssize);
-        if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_attr_getstacksize: %s",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_getstacksize: %s",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 	/* printf("stack_size = %lu\n", ssize); */
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
-	if (rc !=0) {
+	if (rc != 0) {
 		printf(ERROR_PREFIX "failed to create a thread: %s",
-			strerror(rc));
-                exit(PTS_FAIL);
-        }
+		       strerror(rc));
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_join(new_th, NULL);
-	if (rc != 0)
-        {
-                printf(ERROR_PREFIX "pthread_join: %s", strerror(rc));
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_join: %s", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                printf(ERROR_PREFIX "pthread_attr_destroy: %s", strerror(rc));
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_destroy: %s", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c
index ddd0225..4257720 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c
@@ -47,12 +47,12 @@
 	}
 	if ((rc = pthread_attr_getstacksize(&attr, &ssize)) != 0) {
 		printf(ERROR_PREFIX "pthread_attr_getstacksize: %s\n",
-			strerror(rc));
+		       strerror(rc));
 		exit(PTS_FAIL);
 	}
 	if (ssize < stack_size) {
 		printf(ERROR_PREFIX "stack size is lesser than minimal "
-			"size (%u < %u)\n", ssize, stack_size);
+		       "size (%u < %u)\n", ssize, stack_size);
 		exit(PTS_FAIL);
 	}
 
@@ -82,44 +82,43 @@
 	 */
 	stack_size = 4 * PTHREAD_STACK_MIN;
 
-	if ((rc = posix_memalign (&stack_addr, sysconf(_SC_PAGE_SIZE),
-	    stack_size)) != 0) {
-      		printf (ERROR_PREFIX "posix_memalign: %s", strerror(rc));
-      		exit(PTS_UNRESOLVED);
-    	}
+	if ((rc = posix_memalign(&stack_addr, sysconf(_SC_PAGE_SIZE),
+				 stack_size)) != 0) {
+		printf(ERROR_PREFIX "posix_memalign: %s", strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_setstacksize(&attr, stack_size);
-        if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_attr_setstacksize: %s\n",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_setstacksize: %s\n",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_getstacksize(&attr, &ssize);
-        if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_attr_getstacksize: %s\n",
-			strerror(rc));
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		printf(ERROR_PREFIX "pthread_attr_getstacksize: %s\n",
+		       strerror(rc));
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_create(&new_th, &attr, thread_func, NULL);
 	if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_create: %s\n", strerror(rc));
-                exit(PTS_FAIL);
-        }
+		printf(ERROR_PREFIX "pthread_create: %s\n", strerror(rc));
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_join(new_th, NULL);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_join: %s\n", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	rc = pthread_attr_destroy(&attr);
 	if (rc != 0) {
-                printf(ERROR_PREFIX "pthread_attr_destroy :%s\n",
-			strerror(rc));
+		printf(ERROR_PREFIX "pthread_attr_destroy :%s\n", strerror(rc));
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
index d64dd8e..86f525f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c
@@ -33,6 +33,7 @@
 	pthread_exit(0);
 	return NULL;
 }
+
 int main()
 {
 	pthread_attr_t attr;
@@ -49,26 +50,23 @@
 
 	stack_size = STACKSIZE;
 
-	if (posix_memalign (&saddr, sysconf(_SC_PAGE_SIZE),
-            stack_size) != 0)
-    	{
-      		perror (ERROR_PREFIX "out of memory while "
-                        "allocating the stack memory");
-      		exit(PTS_UNRESOLVED);
-    	}
+	if (posix_memalign(&saddr, sysconf(_SC_PAGE_SIZE), stack_size) != 0) {
+		perror(ERROR_PREFIX "out of memory while "
+		       "allocating the stack memory");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_attr_setstacksize(&attr, stack_size);
-        if (rc != EINVAL) {
-                perror(ERROR_PREFIX "Got the wrong return value");
-                exit(PTS_FAIL);
-        }
+	if (rc != EINVAL) {
+		perror(ERROR_PREFIX "Got the wrong return value");
+		exit(PTS_FAIL);
+	}
 
 	rc = pthread_attr_destroy(&attr);
-	if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_attr_destroy");
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_attr_destroy");
 		exit(PTS_UNRESOLVED);
-        }
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/1-1.c
index 40ae2a9..6c503ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/1-1.c
@@ -32,19 +32,18 @@
 	int cnt;
 	int rc;
 
-	for (cnt = 0; cnt < LOOP_NUM; cnt++)
-	{
-		if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-		{
-			printf("Test FAILED: Error at pthread_barrier_init()\n");
+	for (cnt = 0; cnt < LOOP_NUM; cnt++) {
+		if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
+			printf
+			    ("Test FAILED: Error at pthread_barrier_init()\n");
 			return PTS_FAIL;
 		}
 
 		rc = pthread_barrier_destroy(&barrier);
-		if (rc != 0)
-		{
-			printf("Test FAILED: Error at pthread_barrier_destroy() "
-				" return code: %d, %s\n", rc, strerror(rc));
+		if (rc != 0) {
+			printf
+			    ("Test FAILED: Error at pthread_barrier_destroy() "
+			     " return code: %d, %s\n", rc, strerror(rc));
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c
index 03f74e2..035e2f3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c
@@ -36,7 +36,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 
@@ -47,14 +47,11 @@
 	/* Child should block here */
 	printf("child: barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("Error: child: pthread_barrier_wait() get unexpected "
-			"return code : %d\n" , rc);
+		       "return code : %d\n", rc);
 		exit(PTS_UNRESOLVED);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("child: get PTHREAD_BARRIER_SERIAL_THREAD\n");
 	}
 
@@ -70,35 +67,30 @@
 	pthread_t child_thread;
 
 	printf("main: Initialize barrier with count = 2\n");
-	if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create child thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* Expect the child to block*/
+	/* Expect the child to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread did not block on "
-			"pthread_barrier_wait()\n");
+		       "pthread_barrier_wait()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -107,15 +99,13 @@
 
 	rc = pthread_barrier_destroy(&barrier);
 
-	if (rc == EBUSY)
-	{
+	if (rc == EBUSY) {
 		printf("main: correctly got EBUSY\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("main: got return code: %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: Note*: Expected EBUSY, but standard says 'may' fail.\n");
+		printf
+		    ("Test PASSED: Note*: Expected EBUSY, but standard says 'may' fail.\n");
 	}
 
 	/* Cleanup (cancel thread in case it is still blocking */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/1-1.c
index b41ca8e..fd89ebe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/1-1.c
@@ -37,48 +37,42 @@
 	/* Intilized barrier with NULL attribute, check that this can be done. */
 	rc = pthread_barrier_init(&barrier, NULL, COUNT);
 
-	if (rc !=0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Error at pthread_barrier_init() "
-			"return code %d, %s\n", rc, strerror(rc));
+		       "return code %d, %s\n", rc, strerror(rc));
 		return PTS_FAIL;
 	}
 
 	/* Cleanup */
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy() "
-			" return code: %d, %s\n", rc, strerror(rc));
+		       " return code: %d, %s\n", rc, strerror(rc));
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize a barrier attribute object */
-	if (pthread_barrierattr_init(&ba) != 0)
-	{
+	if (pthread_barrierattr_init(&ba) != 0) {
 		printf("Error at pthread_barrierattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize barrier with this barrier attribute object */
 	rc = pthread_barrier_init(&barrier, &ba, COUNT);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Error at 2nd pthread_barrier_init() "
-			"return code %d, %s\n", rc, strerror(rc));
+		       "return code %d, %s\n", rc, strerror(rc));
 		return PTS_FAIL;
 	}
 
 	/* Cleanup */
-	if (pthread_barrierattr_destroy(&ba) != 0)
-	{
+	if (pthread_barrierattr_destroy(&ba) != 0) {
 		printf("Error at pthread_barrierattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy() "
-			" return code: %d, %s\n", rc, strerror(rc));
+		       " return code: %d, %s\n", rc, strerror(rc));
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/3-1.c
index b374251..143d6fa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/3-1.c
@@ -33,10 +33,10 @@
 
 	rc = pthread_barrier_init(&barrier, NULL, COUNT);
 
-	if (rc != EINVAL)
-	{
-		printf("Test FAILED: pthread_barrier_init() does not return EINVAL when intializing a barrier with count=0,"
-			" return code %d, %s\n", rc, strerror(rc));
+	if (rc != EINVAL) {
+		printf
+		    ("Test FAILED: pthread_barrier_init() does not return EINVAL when intializing a barrier with count=0,"
+		     " return code %d, %s\n", rc, strerror(rc));
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c
index 15a5ca6..45323d9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_init/4-1.c
@@ -36,7 +36,7 @@
 #define EXITING_THREAD 3
 
 /* child thread */
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 
@@ -46,14 +46,11 @@
 
 	printf("thread: barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("Error: thread: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+		       "return code : %d\n", rc);
 		exit(PTS_UNRESOLVED);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("thread: got PTHREAD_BARRIER_SERIAL_THREAD\n");
 	}
 
@@ -83,35 +80,30 @@
 	sigaction(SIGALRM, &act, 0);
 
 	printf("main: Initialize barrier with count = 2\n");
-	if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create child thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* Expect the child to block*/
+	/* Expect the child to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread did not block on "
-			"pthread_barrier_wait()\n");
+		       "pthread_barrier_wait()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -122,15 +114,13 @@
 	printf("main: reinitilize barrier while thread is blocking on it\n");
 	rc = pthread_barrier_init(&barrier, NULL, 2);
 
-	if (rc == EBUSY)
-	{
+	if (rc == EBUSY) {
 		printf("main: pthread_barrier_init() correctly got EBUSY");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("main: got return code: %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: Note*: Expected EBUSY, but standard says 'may' fail.\n");
+		printf
+		    ("Test PASSED: Note*: Expected EBUSY, but standard says 'may' fail.\n");
 	}
 
 	/* Cancel thread in case it is still blocked */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/1-1.c
index bbbf6c4..23e1d2c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/1-1.c
@@ -33,21 +33,19 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	thread_state = ENTERED_THREAD;
 
 	printf("child: barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: child: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: child: pthread_barrier_wait() got unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("child: get PTHREAD_BARRIER_SERIAL_THREAD\n");
 	}
 
@@ -77,35 +75,30 @@
 	sigaction(SIGALRM, &act, 0);
 
 	printf("Initialize barrier with count = 2\n");
-	if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create child thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* Expect the child to block*/
+	/* Expect the child to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread did not block on "
-			"pthread_barrier_wait()\n");
+		       "pthread_barrier_wait()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -117,43 +110,36 @@
 
 	rc = pthread_barrier_wait(&barrier);
 
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: main: pthread_barrier_wait() get unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: main: pthread_barrier_wait() get unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 		printf("main: got PTHREAD_BARRIER_SERIAL_THREAD\n");
 	}
 
 	/* We expected the child returned from barrier wait */
 	cnt = 1;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: child thread still blocked on "
-			"barrier wait\n");
+		       "barrier wait\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state: %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/2-1.c
index 5b9ceea..9fd529c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/2-1.c
@@ -40,26 +40,23 @@
 static int normal_rt;
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
-	int thread_num = *(int*)arg;
+	int thread_num = *(int *)arg;
 
 	printf("child[%d]: barrier wait\n", thread_num);
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: child[%d]: pthread_barrier_wait() get unexpected "
-			"return code : %d\n" , thread_num, rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: child[%d]: pthread_barrier_wait() get unexpected "
+		     "return code : %d\n", thread_num, rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 		serial++;
-		printf("child[%d]: get PTHREAD_BARRIER_SERIAL_THREAD\n", thread_num);
-	}
-	else
-	{
+		printf("child[%d]: get PTHREAD_BARRIER_SERIAL_THREAD\n",
+		       thread_num);
+	} else {
 		pthread_mutex_lock(&mutex);
 		normal_rt++;
 		pthread_mutex_unlock(&mutex);
@@ -76,49 +73,46 @@
 	int loop;
 
 	printf("Initialize barrier with count = %d\n", THREAD_NUM);
-	if (pthread_barrier_init(&barrier, NULL, THREAD_NUM) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, THREAD_NUM) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (loop = 0; loop < LOOP_NUM; loop++)
-	{
+	for (loop = 0; loop < LOOP_NUM; loop++) {
 		serial = 0;
 		normal_rt = 0;
 		printf("\n-Loop %d-\n", loop);
 
 		printf("main: create %d child threads\n", THREAD_NUM);
-		for (cnt = 0; cnt < THREAD_NUM; cnt++)
-		{
-			if (pthread_create(&child_threads[cnt], NULL, fn_chld, &cnt) != 0)
-			{
-				printf("main: Error at %dth pthread_create()\n", cnt);
+		for (cnt = 0; cnt < THREAD_NUM; cnt++) {
+			if (pthread_create
+			    (&child_threads[cnt], NULL, fn_chld, &cnt) != 0) {
+				printf("main: Error at %dth pthread_create()\n",
+				       cnt);
 				return PTS_UNRESOLVED;
 			}
 
 		}
 		printf("main: wait for child threads to end\n");
-		for (cnt = 0; cnt < THREAD_NUM; cnt++)
-		{
-			if (pthread_join(child_threads[cnt], NULL) != 0)
-			{
-				printf("main: Error at %dth pthread_join()\n", cnt);
+		for (cnt = 0; cnt < THREAD_NUM; cnt++) {
+			if (pthread_join(child_threads[cnt], NULL) != 0) {
+				printf("main: Error at %dth pthread_join()\n",
+				       cnt);
 				exit(PTS_UNRESOLVED);
 			}
 		}
 
-		if (serial != 1 || (serial + normal_rt) != THREAD_NUM)
-		{
-			printf("Test FAILED: On %d loop, PTHREAD_BARRIER_SERIAL_THREAD "
-				"should be returned to one unspecified thread\n", loop);
+		if (serial != 1 || (serial + normal_rt) != THREAD_NUM) {
+			printf
+			    ("Test FAILED: On %d loop, PTHREAD_BARRIER_SERIAL_THREAD "
+			     "should be returned to one unspecified thread\n",
+			     loop);
 			return PTS_FAIL;
 		}
 
 	}
 
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-1.c
index 586a86e..cd24f92 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-1.c
@@ -46,7 +46,7 @@
 	printf("thread: interrupted by SIGUSR1\n");
 }
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	struct sigaction act;
@@ -61,13 +61,12 @@
 
 	printf("thread: call barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: child: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: child: pthread_barrier_wait() got unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
 		printf("thread: get PTHREAD_BARRIER_SERIAL_THREAD\n");
 
 	thread_state = EXITING_THREAD;
@@ -83,67 +82,57 @@
 	sig_rcvd = 0;
 
 	printf("Initialize barrier with count = 2\n");
-	if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create child thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* Expect the child to block*/
+	/* Expect the child to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread did not block on "
-			"pthread_barrier_wait()\n");
+		       "pthread_barrier_wait()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: send SIGUSR1 to child thread\n");
-	if (pthread_kill(child_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(child_thread, SIGUSR1) != 0) {
 		printf("main: Error at pthread_kill()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Expect the child to continue blocking */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (sig_rcvd != 1)
-	{
+	if (sig_rcvd != 1) {
 		printf("child did not handle SIGUSR1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread should still block on "
-			"pthread_barrier_wait() when interrupted by signal\n");
+		       "pthread_barrier_wait() when interrupted by signal\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -152,41 +141,35 @@
 	printf("main: call barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
 
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: main: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: main: pthread_barrier_wait() got unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
 		printf("main: get PTHREAD_BARRIER_SERIAL_THREAD\n");
 
 	/* We expected the child returned from barrier wait */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: child thread still blocked on "
-			"barrier wait\n");
+		       "barrier wait\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state: %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-2.c
index 68f8e72..530ec37 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-2.c
@@ -47,13 +47,12 @@
 
 	ts.tv_sec = 1;
 	ts.tv_nsec = 0;
-	while (barrier_waited != 1)
-	{
+	while (barrier_waited != 1) {
 		nanosleep(&ts, NULL);
 	}
 }
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	struct sigaction act;
@@ -68,13 +67,12 @@
 
 	printf("thread: call barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: child: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: child: pthread_barrier_wait() got unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
 		printf("thread: got PTHREAD_BARRIER_SERIAL_THREAD\n");
 
 	thread_state = EXITING_THREAD;
@@ -91,92 +89,79 @@
 	barrier_waited = 0;
 
 	printf("Initialize barrier with count = 2\n");
-	if (pthread_barrier_init(&barrier, NULL, 2) != 0)
-	{
+	if (pthread_barrier_init(&barrier, NULL, 2) != 0) {
 		printf("main: Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create child thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* Expect the child to block*/
+	/* Expect the child to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* child thread did not block */
 		printf("Test FAILED: child thread did not block on "
-			"pthread_barrier_wait()\n");
+		       "pthread_barrier_wait()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: send SIGUSR1 to child thread\n");
-	if (pthread_kill(child_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(child_thread, SIGUSR1) != 0) {
 		printf("main: Error at pthread_kill()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Wait for thread to receive the signal */
-	while (sig_rcvd != 1)
-	{
+	while (sig_rcvd != 1) {
 		sleep(1);
 	}
 
 	printf("main: call barrier wait\n");
 	rc = pthread_barrier_wait(&barrier);
 
-	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
-		printf("Test FAILED: main: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , rc);
+	if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+		printf
+		    ("Test FAILED: main: pthread_barrier_wait() got unexpected "
+		     "return code : %d\n", rc);
 		exit(PTS_FAIL);
-	}
-	else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
+	} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
 		printf("main: got PTHREAD_BARRIER_SERIAL_THREAD\n");
 
 	barrier_waited = 1;
 
 	/* We expected the child returned from barrier wait */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: child thread still blocked on "
-			"barrier wait\n");
+		       "barrier wait\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_barrier_destroy(&barrier) != 0)
-	{
+	if (pthread_barrier_destroy(&barrier) != 0) {
 		printf("Error at pthread_barrier_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/6-1.c
index f674f9e..df315f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/6-1.c
@@ -26,8 +26,10 @@
 
 void sig_handler()
 {
-	printf("main: blocked on barrier wait with an un-initializied barrier object.\n");
-	printf("Test PASSED: Note*: Expected EINVAL when calling this funtion with an un-initialized barrier object, but standard says 'may' fail.\n");
+	printf
+	    ("main: blocked on barrier wait with an un-initializied barrier object.\n");
+	printf
+	    ("Test PASSED: Note*: Expected EINVAL when calling this funtion with an un-initialized barrier object, but standard says 'may' fail.\n");
 	exit(PTS_PASS);
 }
 
@@ -52,14 +54,12 @@
 
 	rc = pthread_barrier_wait(&barrier);
 
-	if (rc == EINVAL)
-	{
+	if (rc == EINVAL) {
 		printf("Test PASSED\n");
-	}
-	else
-	{
-		printf("return code : %d, %s\n" , rc, strerror(rc));
-		printf("Test PASSED: Note*: Expected EINVAL when calling this funtion with an un-initialized barrier object, but standard says 'may' fail.\n");
+	} else {
+		printf("return code : %d, %s\n", rc, strerror(rc));
+		printf
+		    ("Test PASSED: Note*: Expected EINVAL when calling this funtion with an un-initialized barrier object, but standard says 'may' fail.\n");
 	}
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_destroy/1-1.c
index 855cb3a..b4b19b5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_destroy/1-1.c
@@ -27,26 +27,24 @@
 	pthread_barrierattr_t ba;
 
 	/* Initialize a barrier attribute object */
-	if (pthread_barrierattr_init(&ba) != 0)
-	{
+	if (pthread_barrierattr_init(&ba) != 0) {
 		printf("Error at pthread_barrierattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy barrier attribute object */
 	rc = pthread_barrierattr_destroy(&ba);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Error at pthread_barrierattr_destroy() "
-			"return code: %d, %s", rc, strerror(rc));
+		       "return code: %d, %s", rc, strerror(rc));
 		return PTS_FAIL;
 	}
 
 	/* Re-initialize the barrier attribute object */
 	rc = pthread_barrierattr_init(&ba);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error while re-initializing barrier attribute object\n");
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error while re-initializing barrier attribute object\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/1-1.c
index 70d7b15..2ceaf6a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/1-1.c
@@ -29,32 +29,28 @@
 
 	/* Initialize the barrier attribute object */
 	rc = pthread_barrierattr_init(&ba);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error while initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Get pshared */
-	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0)
-	{
+	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0) {
 		printf("Error at pthread_barrierattr_getpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
 		printf("The process shared attribute was not set to "
-			"default value of PTHREAD_PROCESS_PRIVATE\n");
+		       "default value of PTHREAD_PROCESS_PRIVATE\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cleanup */
 	rc = pthread_barrierattr_destroy(&ba);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_barrierattr_destroy() "
-			"return code: %d, %s", rc, strerror(rc));
+		       "return code: %d, %s", rc, strerror(rc));
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/2-1.c
index 5b8f880..6ff9776 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_getpshared/2-1.c
@@ -52,22 +52,23 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
-	static pthread_barrier_t* barrier;
+	static pthread_barrier_t *barrier;
 	pthread_barrierattr_t ba;
-	int	pshared = PTHREAD_PROCESS_SHARED;
+	int pshared = PTHREAD_PROCESS_SHARED;
 
-	char 	shm_name[] = "tmp_pthread_barrierattr_getpshared";
-	int 	shm_fd;
-	int 	pid;
-	int 	loop;
-	int	serial = 0;
-	int	rc;
-	int	status = 0;
+	char shm_name[] = "tmp_pthread_barrierattr_getpshared";
+	int shm_fd;
+	int pid;
+	int loop;
+	int serial = 0;
+	int rc;
+	int status = 0;
 	struct sigaction act;
 
 	/* Set up parent to handle SIGALRM */
@@ -77,150 +78,132 @@
 	sigaction(SIGALRM, &act, 0);
 
 	/* Initialize a barrier attributes object */
-	if (pthread_barrierattr_init(&ba) != 0)
-	{
+	if (pthread_barrierattr_init(&ba) != 0) {
 		printf("Error at pthread_barrierattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the pshard value to private to shared */
-	if (pthread_barrierattr_setpshared(&ba, pshared) != 0)
-	{
+	if (pthread_barrierattr_setpshared(&ba, pshared) != 0) {
 		printf("Error at pthread_barrierattr_setpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0)
-	{
-		printf("Test FAILED: Error at pthread_barrierattr_getpshared()\n");
+	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_barrierattr_getpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pshared != PTHREAD_PROCESS_SHARED)
-	{
+	if (pshared != PTHREAD_PROCESS_SHARED) {
 		printf("Test FAILED: Incorrect pshared value %d\n", pshared);
 		return PTS_FAIL;
 	}
 
 	/* Create shared object */
 	shm_unlink(shm_name);
-	shm_fd = shm_open(shm_name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
-	if (shm_fd == -1)
-	{
+	shm_fd =
+	    shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+	if (shm_fd == -1) {
 		perror("Error at shm_open()");
 		return PTS_UNRESOLVED;
 	}
 
-        if (ftruncate(shm_fd, sizeof(pthread_barrier_t)) != 0)
-	{
-                perror("Error at ftruncate()");
-                shm_unlink(shm_name);
-                return PTS_UNRESOLVED;
-        }
+	if (ftruncate(shm_fd, sizeof(pthread_barrier_t)) != 0) {
+		perror("Error at ftruncate()");
+		shm_unlink(shm_name);
+		return PTS_UNRESOLVED;
+	}
 
 	/* Map the shared memory object to my memory */
-	barrier = mmap(NULL, sizeof(pthread_barrier_t), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+	barrier = mmap(NULL, sizeof(pthread_barrier_t), PROT_READ | PROT_WRITE,
+		       MAP_SHARED, shm_fd, 0);
 
-	if (barrier == MAP_FAILED)
-	{
+	if (barrier == MAP_FAILED) {
 		perror("Error at first mmap()");
-                shm_unlink(shm_name);
+		shm_unlink(shm_name);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize a barrier */
-	if ((pthread_barrier_init(barrier, &ba, 2)) != 0)
-	{
+	if ((pthread_barrier_init(barrier, &ba, 2)) != 0) {
 		printf("Error at pthread_barrier_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cleanup */
-	if ((pthread_barrierattr_destroy(&ba)) != 0)
-	{
+	if ((pthread_barrierattr_destroy(&ba)) != 0) {
 		printf("Error at pthread_barrierattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Fork a child process */
 	pid = fork();
-	if (pid == -1)
-	{
+	if (pid == -1) {
 		perror("Error at fork()");
 		return PTS_UNRESOLVED;
-	}
-	else if (pid == 0)
-	{
+	} else if (pid == 0) {
 		/* Child */
 		/* Map the shared object to child's memory */
-		barrier = mmap(NULL, sizeof(pthread_barrier_t), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+		barrier =
+		    mmap(NULL, sizeof(pthread_barrier_t),
+			 PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0);
 
-		if (barrier == MAP_FAILED)
-		{
+		if (barrier == MAP_FAILED) {
 			perror("child: Error at first mmap()");
 			return PTS_UNRESOLVED;
 		}
-	}
-	else
-	{
+	} else {
 		printf("parent pid : %d, child pid : %d\n", getpid(), pid);
-		printf("parent: send me SIGALRM 2 secs later in case I am blocked\n");
+		printf
+		    ("parent: send me SIGALRM 2 secs later in case I am blocked\n");
 		alarm(2);
 	}
 
-	for (loop = 0; loop < LOOP_NUM; loop++)
-	{
+	for (loop = 0; loop < LOOP_NUM; loop++) {
 		rc = pthread_barrier_wait(barrier);
-		if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-		{
-			printf("Test FAILED: %d: pthread_barrier_wait() got unexpected "
-			"return code : %d\n" , getpid(), rc);
+		if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+			printf
+			    ("Test FAILED: %d: pthread_barrier_wait() got unexpected "
+			     "return code : %d\n", getpid(), rc);
 			exit(PTS_FAIL);
-		}
-		else if (rc == PTHREAD_BARRIER_SERIAL_THREAD)
-		{
+		} else if (rc == PTHREAD_BARRIER_SERIAL_THREAD) {
 			serial++;
-			printf("process %d: get PTHREAD_BARRIER_SERIAL_THREAD\n"
-				, getpid());
+			printf
+			    ("process %d: get PTHREAD_BARRIER_SERIAL_THREAD\n",
+			     getpid());
 		}
 
 	}
 
-	if (pid > 0)
-	{
+	if (pid > 0) {
 		/* parent */
-		if (wait(&status) != pid)
-		{
+		if (wait(&status) != pid) {
 			printf("parent: error at waitpid()\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (!WIFEXITED(status))
-		{
+		if (!WIFEXITED(status)) {
 			printf("Child exited abnormally\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if ((WEXITSTATUS(status) + serial) != LOOP_NUM)
-		{
+		if ((WEXITSTATUS(status) + serial) != LOOP_NUM) {
 			printf("status = %d\n", status);
 			printf("serial = %d\n", serial);
-			printf("Test FAILED: One of the two processes should get "
-				"PTHREAD_BARRIER_SERIAL_THREAD\n");
+			printf
+			    ("Test FAILED: One of the two processes should get "
+			     "PTHREAD_BARRIER_SERIAL_THREAD\n");
 			return PTS_FAIL;
 		}
 
 		/* Cleanup */
-		if (pthread_barrier_destroy(barrier) != 0)
-		{
+		if (pthread_barrier_destroy(barrier) != 0) {
 			printf("Error at pthread_barrier_destroy()");
 			return PTS_UNRESOLVED;
 		}
 
-		if ((shm_unlink(shm_name)) != 0)
-		{
+		if ((shm_unlink(shm_name)) != 0) {
 			perror("Error at shm_unlink()");
 			return PTS_UNRESOLVED;
 		}
@@ -229,8 +212,7 @@
 		return PTS_PASS;
 	}
 
-	if (pid == 0)
-	{
+	if (pid == 0) {
 		exit(serial);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/1-1.c
index f0d24f2..fd258d4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/1-1.c
@@ -30,33 +30,31 @@
 
 	/* Initialize the barrier attribute object */
 	rc = pthread_barrierattr_init(&ba);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error while initialize attribute object\n");
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error while initialize attribute object\n");
 		return PTS_FAIL;
 	}
 
 	/* Get the pshared value of the initialized barrierattr object */
-	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0)
-	{
+	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0) {
 		printf("Error at pthread_barrierattr_getpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* The default should be PTHREAD_PROCESS_PRIVATE */
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: The process shared attribute was not set to "
-			"default value\n");
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf
+		    ("Test FAILED: The process shared attribute was not set to "
+		     "default value\n");
 		return PTS_FAIL;
 	}
 
 	/* Cleanup */
 	rc = pthread_barrierattr_destroy(&ba);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_barrierattr_destroy() "
-			"return code: %d, %s", rc, strerror(rc));
+		       "return code: %d, %s", rc, strerror(rc));
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/2-1.c
index 32965ee..28fdd68 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_init/2-1.c
@@ -28,22 +28,20 @@
 {
 	int rc;
 	pthread_barrierattr_t ba;
-	pthread_barrier_t barriers [BARRIER_NUM];
+	pthread_barrier_t barriers[BARRIER_NUM];
 	int cnt;
 
 	/* Initialize the barrier attribute object */
 	rc = pthread_barrierattr_init(&ba);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error while initialize attribute object\n");
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error while initialize attribute object\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize BARRIER_NUM barrier objects, with count==1 */
-	for (cnt = 0; cnt < BARRIER_NUM; cnt++)
-	{
-		if (pthread_barrier_init(&barriers[cnt], &ba, 1) != 0)
-		{
+	for (cnt = 0; cnt < BARRIER_NUM; cnt++) {
+		if (pthread_barrier_init(&barriers[cnt], &ba, 1) != 0) {
 			printf("Error at %dth initialization\n", cnt);
 			return PTS_UNRESOLVED;
 		}
@@ -51,32 +49,29 @@
 
 	/* Destroy barrier attribute object */
 	rc = pthread_barrierattr_destroy(&ba);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_barrierattr_destroy() "
-			"return code: %d, %s", rc, strerror(rc));
+		       "return code: %d, %s", rc, strerror(rc));
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check that pthread_barrier_wait can still be performed, even after the attributes
 	 * object has been destroyed */
-	for (cnt = 0; cnt < BARRIER_NUM; cnt++)
-	{
+	for (cnt = 0; cnt < BARRIER_NUM; cnt++) {
 		rc = pthread_barrier_wait(&barriers[cnt]);
-		if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
-		{
-			printf("Test Fail: Error at %dth wait, %s\n", cnt, strerror(rc));
+		if (rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD) {
+			printf("Test Fail: Error at %dth wait, %s\n", cnt,
+			       strerror(rc));
 			return PTS_FAIL;
 		}
 	}
 
 	/* Cleanup */
-	for (cnt = 0; cnt < BARRIER_NUM; cnt++)
-	{
+	for (cnt = 0; cnt < BARRIER_NUM; cnt++) {
 		rc = pthread_barrier_destroy(&barriers[cnt]);
-		if (rc != 0)
-		{
-			printf("Error at %dth destruction, %s\n", cnt, strerror(rc));
+		if (rc != 0) {
+			printf("Error at %dth destruction, %s\n", cnt,
+			       strerror(rc));
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/1-1.c
index 5360861..7e65438 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/1-1.c
@@ -22,60 +22,58 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	pthread_barrierattr_t ba;
-	int	pshared = PTHREAD_PROCESS_SHARED;
-	int 	pshared2 = PTHREAD_PROCESS_PRIVATE;
-	int	rc;
+	int pshared = PTHREAD_PROCESS_SHARED;
+	int pshared2 = PTHREAD_PROCESS_PRIVATE;
+	int rc;
 
 	/* Initialize a barrier attributes object */
-	if (pthread_barrierattr_init(&ba) != 0)
-	{
+	if (pthread_barrierattr_init(&ba) != 0) {
 		printf("Error at pthread_barrierattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set pshared to PTHREAD_PROCESS_SHARED */
 	rc = pthread_barrierattr_setpshared(&ba, pshared);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_barrierattr_setpshared()\n");
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_barrierattr_setpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0)
-	{
+	if (pthread_barrierattr_getpshared(&ba, &pshared) != 0) {
 		printf("Error at pthread_barrierattr_getpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pshared != PTHREAD_PROCESS_SHARED)
-	{
-		printf("Test FAILED: Got error shared attribute value %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_SHARED) {
+		printf("Test FAILED: Got error shared attribute value %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
 	/* Set pshared to PTHREAD_PROCESS_SHARED */
 	rc = pthread_barrierattr_setpshared(&ba, pshared2);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_barrierattr_setpshared()\n");
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_barrierattr_setpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_barrierattr_getpshared(&ba, &pshared2) != 0)
-	{
+	if (pthread_barrierattr_getpshared(&ba, &pshared2) != 0) {
 		printf("Error at pthread_barrierattr_getpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pshared2 != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Got error shared attribute value %d\n", pshared);
+	if (pshared2 != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Got error shared attribute value %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/2-1.c
index 5a72af5..b73e367 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/2-1.c
@@ -25,24 +25,23 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	pthread_barrierattr_t ba;
-	int	pshared = PTHREAD_PROCESS_PRIVATE + 1;
-	int	rc;
+	int pshared = PTHREAD_PROCESS_PRIVATE + 1;
+	int rc;
 
 	/* Set pshared to an invalid value */
-	if (pshared == PTHREAD_PROCESS_SHARED)
-	{
+	if (pshared == PTHREAD_PROCESS_SHARED) {
 		pshared += 1;
 	}
 
 	/* Initialize a barrier attributes object */
-	if (pthread_barrierattr_init(&ba) != 0)
-	{
+	if (pthread_barrierattr_init(&ba) != 0) {
 		printf("Error at pthread_barrierattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -51,10 +50,10 @@
 	rc = pthread_barrierattr_setpshared(&ba, pshared);
 	if (rc == EINVAL)
 		printf("Test PASSED\n");
-	else
-	{
+	else {
 		printf("Get return code: %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: Note*: Expected EINVAL, but standard says 'may' fail.\n");
+		printf
+		    ("Test PASSED: Note*: Expected EINVAL, but standard says 'may' fail.\n");
 	}
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-1.c
index 42114f4..e5bfff8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-1.c
@@ -30,17 +30,17 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cleanup_flag;
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is -1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=1;
+	cleanup_flag = 1;
 	return;
 }
 
@@ -50,14 +50,14 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==0 */
-	while (sem1==1)
+	while (sem1 == 1)
 		sleep(1);
 
 	/* Give thread 10 seconds to time out.  If the cancel request was not
@@ -66,7 +66,7 @@
 
 	/* Shouldn't get here if the cancel request was honored immediately
 	 * like it should have been. */
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	pthread_cleanup_pop(0);
 	pthread_exit(0);
 	return NULL;
@@ -77,40 +77,37 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=1.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Test FAILED: Couldn't cancel thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to return. (i.e. either canceled correctly and
 	 * called the cleanup function, or timed out after 10 seconds. */
-	while (cleanup_flag==INTHREAD)
+	while (cleanup_flag == INTHREAD)
 		sleep(1);
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag < 0)
-	{
+	if (cleanup_flag < 0) {
 		printf("Test FAILED: Cancel request timed out\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-2.c
index 6fe08e4..6ad9276 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-2.c
@@ -30,10 +30,10 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cleanup_flag;
 
 /* Cleanup function that the thread executes when it is canceled.  So if
@@ -41,7 +41,7 @@
  * the test will fail. */
 void a_cleanup_func()
 {
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	return;
 }
 
@@ -50,21 +50,21 @@
 {
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INMAIN.  Sleeping for 3 secs. to give time for the
 	 * cancel request to be sent and processed. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* Should reach here if the thread correctly ignores the cancel
 	 * request. */
 	pthread_cleanup_pop(0);
-	cleanup_flag=1;
+	cleanup_flag = 1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -74,41 +74,38 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=1.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Error sending cancel request\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to return. (i.e. either canceled incorrectly and
 	 * called the cleanup function, or exited normally at the end of
 	 * thread execution like it should do. */
-	while (cleanup_flag==0)
+	while (cleanup_flag == 0)
 		sleep(1);
 
 	/* This means that the cleanup function was called, meaning the
 	 * thread was canceled rather than ignored the cancel request. */
-	if (cleanup_flag <= 0)
-	{
+	if (cleanup_flag <= 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-3.c
index f379caf..596aaca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/1-3.c
@@ -36,18 +36,18 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
-int cleanup_flag;	/* Flag to indicate the thread's cleanup handler was called */
-pthread_mutex_t	mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
+int sem1;			/* Manual semaphore */
+int cleanup_flag;		/* Flag to indicate the thread's cleanup handler was called */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	return;
 }
 
@@ -57,30 +57,29 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Lock the mutex. It should have already been locked in main, so the thread
 	 * should block. */
-	if (pthread_mutex_lock(&mutex) != 0)
-        {
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Should get here if the cancel request was deffered. */
 	pthread_cleanup_pop(0);
-	cleanup_flag=1;
+	cleanup_flag = 1;
 
 	/* Cancelation point.  Cancel request should not be honored here. */
 	pthread_testcancel();
 
 	/* Should not get here if the cancel request was honored at the cancelation point
 	 * pthread_testcancel(). */
-	cleanup_flag=-2;
+	cleanup_flag = -2;
 	pthread_exit(0);
 	return NULL;
 }
@@ -90,60 +89,54 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Send cancel request to the thread.  */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Test FAILED: Couldn't cancel thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Cancel request has been sent, unlock the mutex */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait 'till the thread has been canceled or has ended execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag == -1)
-	{
+	if (cleanup_flag == -1) {
 		printf("Test FAILED: Cancel request was not deferred.\n");
 		return PTS_FAIL;
 	}
 
-	if (cleanup_flag == -2)
-	{
-		printf("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
+	if (cleanup_flag == -2) {
+		printf
+		    ("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-1.c
index eb08837..d2a4565 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-1.c
@@ -30,8 +30,8 @@
  * cleanup function was reached. */
 void a_cleanup_func()
 {
-	cleanup_flag=1;
-	sem=0;
+	cleanup_flag = 1;
+	sem = 0;
 	return;
 }
 
@@ -45,12 +45,12 @@
 	/* To enable thread immediate cancelation, since the default
 	 * is PTHREAD_CANCEL_DEFERRED. */
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
-	pthread_cleanup_push(a_cleanup_func,NULL);
-	sem=1;
-	while (sem==1)
+	pthread_cleanup_push(a_cleanup_func, NULL);
+	sem = 1;
+	while (sem == 1)
 		sleep(1);
 	sleep(5);
-	sem=0;
+	sem = 0;
 	/* Should never be reached, but is required to be in the code
 	 * since pthread_cleanup_push is in the code.  Else a compile error
 	 * will result. */
@@ -65,33 +65,30 @@
 	pthread_t new_th;
 	int i;
 	/* Initializing the cleanup flag. */
-	cleanup_flag=0;
-	sem=0;
+	cleanup_flag = 0;
+	sem = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. */
-	while (sem==0)
+	while (sem == 0)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Error canceling thread\n");
 		return PTS_FAIL;
 	}
 
-	i=0;
-	while (sem==1)
-	{
+	i = 0;
+	while (sem == 1) {
 		sleep(1);
-		if (i==10)
-		{
-			printf("Test FAILED: Timed out while waiting for cancelation cleanup handlers to execute\n");
+		if (i == 10) {
+			printf
+			    ("Test FAILED: Timed out while waiting for cancelation cleanup handlers to execute\n");
 			return PTS_FAIL;
 		}
 		i++;
@@ -99,8 +96,7 @@
 
 	/* If the cleanup function was not reached by calling the
 	 * pthread_cancel function, then the test fails. */
-	if (cleanup_flag != 1)
-	{
+	if (cleanup_flag != 1) {
 		printf("Test FAILED: Could not cancel thread\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-2.c
index 97e4fab..4f9f4cf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-2.c
@@ -28,7 +28,7 @@
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
 int cleanup_flag = 0;
-int sem = 0;				/* manual semaphore */
+int sem = 0;			/* manual semaphore */
 
 void destructor(void *tmp)
 {
@@ -39,8 +39,8 @@
 void *a_thread_func(void *tmp)
 {
 	pthread_key_t key;
-	int           value = 1;
-	int           rc = 0;
+	int value = 1;
+	int rc = 0;
 
 	/* To enable thread immediate cancelation, since the default
 	 * is PTHREAD_CANCEL_DEFERRED. */
@@ -74,7 +74,7 @@
 int main()
 {
 	pthread_t new_th;
-	int       rc = 0;
+	int rc = 0;
 	sem = 0;
 
 	/* Create a new thread. */
@@ -99,7 +99,8 @@
 	sleep(5);
 
 	if (cleanup_flag != 1) {
-		printf(ERROR_PREFIX "Test FAIL: Destructor was not executed.\n");
+		printf(ERROR_PREFIX
+		       "Test FAIL: Destructor was not executed.\n");
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-3.c
index 33b07ee..1353d20 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/2-3.c
@@ -31,7 +31,7 @@
 
 int cleanup_flag = 0;
 int destructor_flag = 0;
-int sem = 0;				/* manual semaphore */
+int sem = 0;			/* manual semaphore */
 struct timespec destructor_time, cleanup_time;
 
 /*
@@ -56,8 +56,8 @@
 void *a_thread_func(void *tmp)
 {
 	pthread_key_t key;
-	int           value = 1;
-	int           rc = 0;
+	int value = 1;
+	int rc = 0;
 
 	/* To enable thread immediate cancelation, since the default
 	 * is PTHREAD_CANCEL_DEFERRED. */
@@ -95,8 +95,8 @@
 int main()
 {
 	pthread_t new_th;
-	int       rc = 0;
-	double     diff;
+	int rc = 0;
+	double diff;
 	sem = 0;
 
 	/* Create a new thread. */
@@ -121,19 +121,24 @@
 	sleep(5);
 
 	if (cleanup_flag != 1) {
-		printf(ERROR_PREFIX "Test FAIL: Cleanup handler was not executed.\n");
+		printf(ERROR_PREFIX
+		       "Test FAIL: Cleanup handler was not executed.\n");
 		exit(PTS_FAIL);
 	}
 
 	if (destructor_flag != 1) {
-		printf(ERROR_PREFIX "Test FAIL: Destructor was not executed.\n");
+		printf(ERROR_PREFIX
+		       "Test FAIL: Destructor was not executed.\n");
 		exit(PTS_FAIL);
 	}
 
 	diff = destructor_time.tv_sec - cleanup_time.tv_sec;
-	diff += (double)(destructor_time.tv_nsec - cleanup_time.tv_nsec)/1000000000.0;
+	diff +=
+	    (double)(destructor_time.tv_nsec -
+		     cleanup_time.tv_nsec) / 1000000000.0;
 	if (diff < 0) {
-		printf(ERROR_PREFIX "Test FAIL: Destructor called before Cleanup Handler\n");
+		printf(ERROR_PREFIX
+		       "Test FAIL: Destructor called before Cleanup Handler\n");
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/3-1.c
index ac09dc9..d91e6e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/3-1.c
@@ -74,11 +74,11 @@
 	}
 	pthread_cleanup_push(a_cleanup_func, NULL);
 
-	sem=1;
+	sem = 1;
 	while (sem == 1)
 		sleep(1);
 	sleep(5);
-	sem=0;
+	sem = 0;
 
 	/* Should never be reached, but is required to be in the code
 	 * since pthread_cleanup_push is in the code.  Else a compile error
@@ -91,11 +91,11 @@
 
 int main()
 {
-	pthread_t                  new_th;
-	int                        i;
-	double                      diff ;
-	struct sched_param         param;
-	int                        rc = 0;
+	pthread_t new_th;
+	int i;
+	double diff;
+	struct sched_param param;
+	int rc = 0;
 
 	/* Initializing the cleanup flag. */
 	cleanup_flag = 0;
@@ -147,9 +147,11 @@
 	}
 
 	diff = cleanup_time.tv_sec - main_time.tv_sec;
-	diff += (double)(cleanup_time.tv_nsec - main_time.tv_nsec)/1000000000.0;
+	diff +=
+	    (double)(cleanup_time.tv_nsec - main_time.tv_nsec) / 1000000000.0;
 	if (diff < 0) {
-		printf(ERROR_PREFIX "Cleanup function was called before main continued\n");
+		printf(ERROR_PREFIX
+		       "Cleanup function was called before main continued\n");
 		exit(PTS_FAIL);
 	}
 	printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/4-1.c
index 5245aa2..63ff9aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/4-1.c
@@ -20,13 +20,13 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int sem; 		/* Manual semaphore */
+int sem;			/* Manual semaphore */
 void *a_thread_func()
 {
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem=1;
+	sem = 1;
 
 	while (1)
 		sleep(1);
@@ -40,31 +40,26 @@
 	pthread_t new_th;
 	int ret;
 
-	sem=0;
+	sem = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. */
-	while (sem==0)
+	while (sem == 0)
 		sleep(1);
 
 	/* Send cancel request to thread */
-	ret=pthread_cancel(new_th);
+	ret = pthread_cancel(new_th);
 
-	if (ret != 0)
-	{
-		if (ret == ESRCH)
-		{
+	if (ret != 0) {
+		if (ret == ESRCH) {
 			perror("Could not cancel thread\n");
 			return PTS_UNRESOLVED;
-		}
-		else
-		{
+		} else {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-1.c
index 0428d11..8e8d21f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/5-1.c
@@ -36,8 +36,7 @@
 	int ret;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -47,12 +46,10 @@
 
 	/* Try and cancel thread.  It should return an error because it
 	 * already is canceled and doesn't exist anymore.  */
-	ret=pthread_cancel(new_th);
+	ret = pthread_cancel(new_th);
 
-	if (ret != 0)
-	{
-		if (ret == ESRCH)
-		{
+	if (ret != 0) {
+		if (ret == ESRCH) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
@@ -61,7 +58,8 @@
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: *NOTE: Returned 0 on error, though standard states 'may' fail.\n");
+	printf
+	    ("Test PASSED: *NOTE: Returned 0 on error, though standard states 'may' fail.\n");
 	return PTS_PASS;
 
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-1.c
index e0b0a0e..c4c2bc1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-1.c
@@ -24,13 +24,13 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
-# define INTHREAD 0
-# define INMAIN 1
+#define INTHREAD 0
+#define INMAIN 1
 
-int sem1; 			/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cleanup_flag;
 
 /* Cleanup handler */
@@ -43,7 +43,7 @@
 /* Function that the thread executes upon its creation */
 void *a_thread_func()
 {
-	pthread_cleanup_push(a_cleanup_func, (void*) CLEANUP_CALLED);
+	pthread_cleanup_push(a_cleanup_func, (void *)CLEANUP_CALLED);
 	pthread_cleanup_pop(1);
 
 	/* Tell main that the thread has called the pop function */
@@ -63,33 +63,30 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 	cleanup_flag = CLEANUP_NOTCALLED;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to call the pthread_cleanup_pop */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Check to verify that the cleanup handler was called */
-	if (cleanup_flag != CLEANUP_CALLED)
-	{
+	if (cleanup_flag != CLEANUP_CALLED) {
 		printf("Test FAILED: Cleanup handler was not called\n");
 		return PTS_FAIL;
 	}
 
 	/* Tell thread it can keep going now */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-2.c
index d021e4d..3c0cfa9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-2.c
@@ -24,13 +24,13 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
-# define INTHREAD 0
-# define INMAIN 1
+#define INTHREAD 0
+#define INMAIN 1
 
-int sem1; 			/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cleanup_flag;
 
 /* Cleanup handler */
@@ -43,7 +43,7 @@
 /* Function that the thread executes upon its creation */
 void *a_thread_func()
 {
-	pthread_cleanup_push(a_cleanup_func, (void*) CLEANUP_CALLED);
+	pthread_cleanup_push(a_cleanup_func, (void *)CLEANUP_CALLED);
 	pthread_cleanup_pop(0);
 
 	/* Tell main that the thread has called the pop function */
@@ -63,33 +63,30 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 	cleanup_flag = CLEANUP_NOTCALLED;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to call the pthread_cleanup_pop */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Check to verify that the cleanup handler was called */
-	if (cleanup_flag == CLEANUP_CALLED)
-	{
+	if (cleanup_flag == CLEANUP_CALLED) {
 		printf("Test FAILED: Cleanup was incorrectly called\n");
 		return PTS_FAIL;
 	}
 
 	/* Tell thread it can keep going now */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-3.c
index 80b0051..9ae7ab4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-3.c
@@ -24,8 +24,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
 int cleanup_flag[3];		/* Array to hold the cleanup flags for the 3 cleanup handlers */
 int i;
@@ -71,30 +71,30 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	for (i = 0;i < 3;i++)
+	for (i = 0; i < 3; i++)
 		cleanup_flag[i] = 0;
 	i = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Verify that the cancellation handlers are popped in order, that is:
 	 * 3, 2, then 1. */
-	if ((cleanup_flag[0] != 3) || (cleanup_flag[1] != 2) || (cleanup_flag[2] != 1))
-	{
-		printf("Test FAILED: Cleanup handlers not popped in order, expected 3,2,1, but got:\n");
-		printf("%d, %d, %d\n", cleanup_flag[0], cleanup_flag[1], cleanup_flag[2]);
+	if ((cleanup_flag[0] != 3) || (cleanup_flag[1] != 2)
+	    || (cleanup_flag[2] != 1)) {
+		printf
+		    ("Test FAILED: Cleanup handlers not popped in order, expected 3,2,1, but got:\n");
+		printf("%d, %d, %d\n", cleanup_flag[0], cleanup_flag[1],
+		       cleanup_flag[2]);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-1.c
index 4830c0e..5231c24 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-1.c
@@ -31,8 +31,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
 int cleanup_flag;
 
@@ -46,10 +46,10 @@
 /* Function that the thread executes upon its creation */
 void *a_thread_func()
 {
-	pthread_cleanup_push(a_cleanup_func, (void*) CLEANUP_CALLED);
+	pthread_cleanup_push(a_cleanup_func, (void *)CLEANUP_CALLED);
 
 	pthread_exit(0);
-        pthread_cleanup_pop(0);
+	pthread_cleanup_pop(0);
 	return NULL;
 }
 
@@ -61,22 +61,19 @@
 	cleanup_flag = CLEANUP_NOTCALLED;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to verify that the cleanup handler was called */
-	if (cleanup_flag != CLEANUP_CALLED)
-	{
+	if (cleanup_flag != CLEANUP_CALLED) {
 		printf("Test FAILED: Cleanup handler not called upon exit\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-2.c
index c552ae8..020de79 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-2.c
@@ -30,13 +30,13 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cleanup_flag;
 
 /* The cleanup handler */
@@ -53,14 +53,14 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	pthread_cleanup_push(a_cleanup_func, (void*) CLEANUP_CALLED);
+	pthread_cleanup_push(a_cleanup_func, (void *)CLEANUP_CALLED);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INTHREAD */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* Give thread 10 seconds to time out.  If the cancel request was not
@@ -71,60 +71,56 @@
 	/* Shouldn't get here if the cancel request was honored immediately
 	 * like it should have been. */
 	pthread_cleanup_pop(0);
-	pthread_exit((void*)PTS_UNRESOLVED);
+	pthread_exit((void *)PTS_UNRESOLVED);
 	return NULL;
 }
 
 int main()
 {
 	pthread_t new_th;
-	void *value_ptr;		/* hold return value of thread from pthread_join */
+	void *value_ptr;	/* hold return value of thread from pthread_join */
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=CLEANUP_NOTCALLED;
+	sem1 = INTHREAD;
+	cleanup_flag = CLEANUP_NOTCALLED;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=1.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Error: Couldn't cancel thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to return. */
-	if (pthread_join(new_th, &value_ptr) != 0)
-	{
+	if (pthread_join(new_th, &value_ptr) != 0) {
 		printf("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure cancellation happened correctly */
-	if ((long)value_ptr == PTS_UNRESOLVED)
-	{
+	if ((long)value_ptr == PTS_UNRESOLVED) {
 		printf("Error: cancellation not correctly handled\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag != CLEANUP_CALLED)
-	{
-		printf("Test FAILED: Cleanup hanlder not called up cancellation\n");
+	if (cleanup_flag != CLEANUP_CALLED) {
+		printf
+		    ("Test FAILED: Cleanup hanlder not called up cancellation\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-3.c
index a3e1161..ea85bf4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-3.c
@@ -30,8 +30,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define CLEANUP_NOTCALLED 0
-# define CLEANUP_CALLED 1
+#define CLEANUP_NOTCALLED 0
+#define CLEANUP_CALLED 1
 
 int cleanup_flag;
 
@@ -45,7 +45,7 @@
 /* Function that the thread executes upon its creation */
 void *a_thread_func()
 {
-	pthread_cleanup_push(a_cleanup_func, (void*) CLEANUP_CALLED);
+	pthread_cleanup_push(a_cleanup_func, (void *)CLEANUP_CALLED);
 	pthread_cleanup_pop(1);
 
 	pthread_exit(0);
@@ -60,22 +60,19 @@
 	cleanup_flag = CLEANUP_NOTCALLED;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to verify that the cleanup handler was called */
-	if (cleanup_flag != CLEANUP_CALLED)
-	{
+	if (cleanup_flag != CLEANUP_CALLED) {
 		printf("Test FAILED: Cleanup handler not called\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-1.c
index 2f1e3a2..b94f8f0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-1.c
@@ -22,7 +22,7 @@
 
 struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 static int start_num;
@@ -65,7 +65,7 @@
 int main()
 {
 	int i, rc;
-	pthread_t  thread[THREAD_NUM];
+	pthread_t thread[THREAD_NUM];
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
 		fprintf(stderr, "Fail to initialize mutex\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
index bdb4c30..7a568ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
@@ -83,13 +83,13 @@
 #endif
 
 /* Do not create more than this amount of children: */
-static int max_process_children  = 200;
+static int max_process_children = 200;
 static int max_thread_children = 1000;
 
 #define TIMEOUT  (180)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 #ifdef WITHOUT_XOPEN
@@ -107,50 +107,66 @@
 	int c_clock;
 	int fork;
 	char *descr;
-}
-
-scenarii[] = {
-	{PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"},
-	{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"},
-	{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"},
-	{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"},
-	{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"},
-	{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"},
-
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1, "Pshared normal mutex across processes"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"},
 #ifdef USE_ALTCLK
-	{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"},
-
-	{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0, "Default mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0, "Normal mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"},
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 struct testdata {
-	int		count;     /* number of children currently waiting */
-	pthread_cond_t	cnd;
-	pthread_mutex_t	mtx;
-	int		predicate; /* Boolean associated to the condvar */
-	clockid_t	cid;       /* clock used in the condvar */
-	char		fork;      /* the children are processes */
+	int count;		/* number of children currently waiting */
+	pthread_cond_t cnd;
+	pthread_mutex_t mtx;
+	int predicate;		/* Boolean associated to the condvar */
+	clockid_t cid;		/* clock used in the condvar */
+	char fork;		/* the children are processes */
 };
 struct testdata *td;
 
@@ -185,10 +201,10 @@
 			ret = pthread_cond_timedwait(&td->cnd, &td->mtx, &ts);
 		else
 			ret = pthread_cond_wait(&td->cnd, &td->mtx);
-		#if VERBOSE > 5
+#if VERBOSE > 5
 		output("[child] Wokenup timed=%i, Predicate=%i, ret=%i\n",
-			timed, td->predicate, ret);
-		#endif
+		       timed, td->predicate, ret);
+#endif
 	} while ((ret == 0) && (td->predicate == 0));
 	if (ret == ETIMEDOUT) {
 		ret = pthread_mutex_unlock(&td->mtx);
@@ -217,7 +233,7 @@
 	struct _children *next;
 } children_t;
 
-children_t sentinel = { .next = NULL };
+children_t sentinel = {.next = NULL };
 
 children_t *children = &sentinel;
 
@@ -235,13 +251,13 @@
 	} while ((ret != 0) && (errno == EINTR));
 	if (ret != 0)
 		UNRESOLVED(errno, "Failed to wait for the semaphore "
-				  "in timer thread.");
+			   "in timer thread.");
 
 	do {
 		to = sleep(to);
 	} while (to > 0);
 	FAILED_KILLALL("Operation timed out. A signal was lost.");
-	return NULL; /* For compiler */
+	return NULL;		/* For compiler */
 }
 
 #ifdef __linux__
@@ -269,7 +285,7 @@
 		UNTESTED("Not enough memory.");
 
 	max_process_children = (avail_number < max_process_children ?
-					avail_number : max_process_children);
+				avail_number : max_process_children);
 
 	return;
 }
@@ -313,7 +329,7 @@
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
 	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -324,7 +340,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	if (monotonic < 0)
 		cs = -1;
@@ -341,10 +357,10 @@
 	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
+#endif
 	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_broadcast-XXXXXX";
@@ -362,14 +378,14 @@
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
+		ps = (size_t) sysconf(_SC_PAGESIZE);
 		sz = ((sizeof(struct testdata) / ps) + 1) * ps;
 
-		tmp = calloc(1 , sz);
+		tmp = calloc(1, sz);
 		if (tmp == NULL)
 			UNRESOLVED(errno, "Memory allocation failed");
 
@@ -388,17 +404,17 @@
 		td = (struct testdata *)mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory (%ib).\n",
-			sizeof(struct testdata));
-		#endif
+		       sizeof(struct testdata));
+#endif
 	}
 
 	/* Initialize the thread attribute object */
 	ret = pthread_attr_init(&ta);
 	if (ret != 0)
 		UNRESOLVED(ret, "[parent] Failed to initialize a thread "
-				"attribute object");
+			   "attribute object");
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
 	if (ret != 0)
 		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
@@ -415,47 +431,47 @@
 		ret = pthread_mutexattr_init(&ma);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to initialize the "
-					"mutex attribute object");
+				   "mutex attribute object");
 		ret = pthread_condattr_init(&ca);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to initialize the "
-					"cond attribute object");
+				   "cond attribute object");
 
-		#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[scenar].m_type);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to set mutex type");
-		#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
 		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0)) {
 			ret = pthread_mutexattr_setpshared(&ma,
-					PTHREAD_PROCESS_SHARED);
+							   PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set the "
-						"mutex process-shared");
+					   "mutex process-shared");
 			ret = pthread_condattr_setpshared(&ca,
-					PTHREAD_PROCESS_SHARED);
+							  PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set the "
-						"cond var process-shared");
+					   "cond var process-shared");
 		}
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		if ((cs > 0) && (scenarii[scenar].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set the "
-						"monotonic clock for the cond");
+					   "monotonic clock for the cond");
 		}
 		ret = pthread_condattr_getclock(&ca, &td->cid);
 		if (ret != 0)
 			UNRESOLVED(ret, "Unable to get clock from cond attr");
-		#else
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
 		if ((pshared > 0) && (scenarii[scenar].fork != 0))
@@ -484,9 +500,9 @@
 				   "Failed to destroy the mutex "
 				   "attribute object");
 
-		#if VERBOSE > 2
+#if VERBOSE > 2
 		output("[parent] Starting test %s\n", scenarii[scenar].descr);
-		#endif
+#endif
 
 		td->count = 0;
 		child_count = 0;
@@ -495,12 +511,13 @@
 		/* create the timeout thread */
 		ret = pthread_create(&t_timer, NULL, timer, NULL);
 		if (ret != 0)
-			UNRESOLVED_KILLALL(ret, "Unable to create timer thread");
+			UNRESOLVED_KILLALL(ret,
+					   "Unable to create timer thread");
 
 		/* Create all the children */
 		if (td->fork == 0) {
 			do {
-				tmp = (children_t *)malloc(sizeof(children_t));
+				tmp = (children_t *) malloc(sizeof(children_t));
 				if (tmp != (children_t *) NULL) {
 					ret = pthread_create(&(tmp->data.t),
 							     &ta, child, NULL);
@@ -515,15 +532,17 @@
 				} else {
 					ret = errno;
 				}
-			} while ((ret == 0) && (child_count < max_thread_children));
-			#if VERBOSE > 2
-			output("[parent] Created %i children threads\n", child_count);
-			#endif
+			} while ((ret == 0)
+				 && (child_count < max_thread_children));
+#if VERBOSE > 2
+			output("[parent] Created %i children threads\n",
+			       child_count);
+#endif
 			if (child_count == 0)
 				UNRESOLVED(ret, "Unable to create any thread");
 		} else {
 			do {
-				tmp = (children_t *)malloc(sizeof(children_t));
+				tmp = (children_t *) malloc(sizeof(children_t));
 				if (tmp != (children_t *) NULL) {
 					tmp->data.p = fork();
 					if (tmp->data.p == 0) {
@@ -543,10 +562,12 @@
 				} else {
 					ret = errno;
 				}
-			} while ((ret == 0) && (child_count < max_process_children));
-			#if VERBOSE > 2
-			output("[parent] Created %i children processes\n", child_count);
-			#endif
+			} while ((ret == 0)
+				 && (child_count < max_process_children));
+#if VERBOSE > 2
+			output("[parent] Created %i children processes\n",
+			       child_count);
+#endif
 			if (child_count == 0)
 				UNRESOLVED(ret, "Unable to create any process");
 
@@ -560,7 +581,8 @@
 		while (ch < child_count) {
 			ret = pthread_mutex_unlock(&td->mtx);
 			if (ret != 0)
-				UNRESOLVED_KILLALL(ret, "Failed to unlock mutex");
+				UNRESOLVED_KILLALL(ret,
+						   "Failed to unlock mutex");
 			sched_yield();
 			ret = pthread_mutex_lock(&td->mtx);
 			if (ret != 0)
@@ -568,34 +590,36 @@
 			ch = td->count;
 		}
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are waiting\n");
-		#endif
+#endif
 
 		/* start the timer count */
 		do {
 			ret = sem_post(&sem_tmr);
 		} while ((ret != 0) && (errno == EINTR));
 		if (ret != 0)
-			UNRESOLVED_KILLALL(errno, "Failed to post the semaphore.");
+			UNRESOLVED_KILLALL(errno,
+					   "Failed to post the semaphore.");
 
 		/* Wakeup the children */
 		td->predicate = 1;
 		ret = pthread_cond_broadcast(&td->cnd);
 		if (ret != 0)
-			UNRESOLVED_KILLALL(ret, "Failed to broadcast the condition.");
+			UNRESOLVED_KILLALL(ret,
+					   "Failed to broadcast the condition.");
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Condition was signaled\n");
-		#endif
+#endif
 
 		ret = pthread_mutex_unlock(&td->mtx);
 		if (ret != 0)
 			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex");
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Joining the children\n");
-		#endif
+#endif
 
 		/* join the children */
 		while (children->next != NULL) {
@@ -608,8 +632,7 @@
 				if (pid != tmp->data.p) {
 					ret = errno;
 					output("Waitpid failed (expected: %i, "
-					       "got: %i)\n",
-					       tmp->data.p, pid);
+					       "got: %i)\n", tmp->data.p, pid);
 					free(tmp);
 					UNRESOLVED_KILLALL(ret,
 							   "Waitpid failed");
@@ -626,9 +649,9 @@
 			output_fini();
 			exit(ret);
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children terminated\n");
-		#endif
+#endif
 
 		/* cancel the timeout thread */
 		ret = pthread_cancel(t_timer);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-1.c
index 988112c..e04a856 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-1.c
@@ -23,7 +23,7 @@
 
 struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 static int start_num;
@@ -67,15 +67,14 @@
 		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr, "[Thread 0x%p] released the mutex\n",
-		(void *)self);
+	fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
 	return NULL;
 }
 
 int main()
 {
 	int i, rc;
-	pthread_t  thread[THREAD_NUM];
+	pthread_t thread[THREAD_NUM];
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
 		fprintf(stderr, "Fail to initialize mutex\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-2.c
index 4b1fad3..61f1413 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-2.c
@@ -26,7 +26,7 @@
 
 struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 static int start_num;
@@ -87,7 +87,7 @@
 int main()
 {
 	int i, rc;
-	pthread_t  thread[THREAD_NUM];
+	pthread_t thread[THREAD_NUM];
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
 		fprintf(stderr, "Fail to initialize mutex\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-3.c
index d0ed7cf..9c8aadc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/2-3.c
@@ -74,7 +74,7 @@
 #define TIMEOUT  (120)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 #ifdef WITHOUT_XOPEN
@@ -93,48 +93,66 @@
 	int fork;
 	char *descr;
 } scenarii[] = {
-	{PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"},
-	{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"},
-	{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"},
-	{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"},
-	{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"},
-	{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"},
-
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1, "Pshared normal mutex across processes"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"},
 #ifdef USE_ALTCLK
-	{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"},
-
-	{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"},
-
-	{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"},
-	{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"},
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0, "Default mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0, "Normal mutex and alt clock condvar"},
+	{
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"},
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii) / sizeof(scenarii[0]))
 
 struct testdata {
-	int		count;
-	pthread_cond_t	cnd;
-	pthread_mutex_t	mtx;
-	int		predicate;
-	clockid_t	cid;
-	int		mtype;
-	char		fork;
+	int count;
+	pthread_cond_t cnd;
+	pthread_mutex_t mtx;
+	int predicate;
+	clockid_t cid;
+	int mtype;
+	char fork;
 } *td;
 
 struct {
@@ -173,10 +191,10 @@
 			ret = pthread_cond_timedwait(&td->cnd, &td->mtx, &ts);
 		else
 			ret = pthread_cond_wait(&td->cnd, &td->mtx);
-		#if VERBOSE > 5
+#if VERBOSE > 5
 		output("[child] Wokenup timed=%i, Predicate=%i, ret=%i\n",
-			timed, td->predicate, ret);
-		#endif
+		       timed, td->predicate, ret);
+#endif
 	} while ((ret == 0) && (td->predicate == 0));
 	if (ret == ETIMEDOUT) {
 		FAILED("Timeout occured. This means a cond signal was lost "
@@ -186,12 +204,12 @@
 		UNRESOLVED(ret, "Failed to wait for the cond");
 
 	/* Check that we are owning the mutex */
-	#ifdef WITHOUT_XOPEN
+#ifdef WITHOUT_XOPEN
 	ret = pthread_mutex_trylock(&(td->mtx));
 	if (ret == 0)
 		FAILED("The mutex was not owned after return from "
 		       "condition waiting");
-	#else
+#else
 	if (td->mtype == PTHREAD_MUTEX_RECURSIVE) {
 		ret = pthread_mutex_trylock(&(td->mtx));
 		if (ret != 0)
@@ -206,7 +224,7 @@
 			FAILED("Was able to lock errorcheck mutex: "
 			       "the mutex was not acquired once already?");
 	}
-	#endif
+#endif
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&td->mtx);
@@ -255,7 +273,7 @@
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
 	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -266,7 +284,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	if (monotonic < 0)
 		cs = -1;
@@ -280,10 +298,10 @@
 	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
+#endif
 	} else {
 		char filename[] = "/tmp/cond_broadcast-XXXXXX";
 		size_t sz, ps;
@@ -293,43 +311,45 @@
 
 		fd = mkstemp(filename);
 		if (fd == -1)
-			UNRESOLVED(errno, "Temporary file could not be created");
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
 
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
+		ps = (size_t) sysconf(_SC_PAGESIZE);
 		sz = ((sizeof(struct testdata) / ps) + 1) * ps;
 
-		tmp = calloc(1 , sz);
+		tmp = calloc(1, sz);
 		if (tmp == NULL)
 			UNRESOLVED(errno, "Memory allocation failed");
 
-		if (write(fd, tmp, sz) != (ssize_t)sz)
+		if (write(fd, tmp, sz) != (ssize_t) sz)
 			UNRESOLVED(sz, "Writting to the file failed");
 
 		free(tmp);
 
-		mmaped = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 		if (mmaped == MAP_FAILED)
 			UNRESOLVED(errno, "mmap failed");
 
 		td = (struct testdata *)mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory (%ib).\n",
-			sizeof(struct testdata));
-		#endif
+		       sizeof(struct testdata));
+#endif
 	}
 
 	ret = pthread_attr_init(&ta);
 	if (ret != 0)
 		UNRESOLVED(ret, "[parent] Failed to initialize a thread "
-				"attribute object");
+			   "attribute object");
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
 	if (ret != 0)
 		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
@@ -341,49 +361,49 @@
 		ret = pthread_mutexattr_init(&ma);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to initialize the "
-					"mutex attribute object");
+				   "mutex attribute object");
 		ret = pthread_condattr_init(&ca);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to initialize the "
-					"cond attribute object");
+				   "cond attribute object");
 
-		#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[scenar].m_type);
 		if (ret != 0)
 			UNRESOLVED(ret, "[parent] Unable to set mutex type");
-		#endif
+#endif
 
 		td->mtype = scenarii[scenar].m_type;
 
 		/* Set the pshared attributes, if supported */
 		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0)) {
 			ret = pthread_mutexattr_setpshared(&ma,
-					PTHREAD_PROCESS_SHARED);
+							   PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set "
-						"the mutex process-shared");
+					   "the mutex process-shared");
 			ret = pthread_condattr_setpshared(&ca,
-					PTHREAD_PROCESS_SHARED);
+							  PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set "
-						"the cond var process-shared");
+					   "the cond var process-shared");
 		}
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		if ((cs > 0) && (scenarii[scenar].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
 			if (ret != 0)
 				UNRESOLVED(ret, "[parent] Unable to set the "
-						"monotonic clock for the cond");
+					   "monotonic clock for the cond");
 		}
 		ret = pthread_condattr_getclock(&ca, &td->cid);
 		if (ret != 0)
 			UNRESOLVED(ret, "Unable to get clock from cond attr");
-		#else
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
 		if ((pshared > 0) && (scenarii[scenar].fork != 0))
@@ -400,27 +420,29 @@
 		ret = pthread_condattr_destroy(&ca);
 		if (ret != 0)
 			UNRESOLVED(ret, "Failed to destroy the cond var "
-					"attribute object");
+				   "attribute object");
 
 		ret = pthread_mutexattr_destroy(&ma);
 		if (ret != 0)
 			UNRESOLVED(ret, "Failed to destroy the mutex "
-					"attribute object");
+				   "attribute object");
 
-		#if VERBOSE > 2
+#if VERBOSE > 2
 		output("[parent] Starting test %s\n", scenarii[scenar].descr);
-		#endif
+#endif
 
 		td->count = 0;
 
 		/* Create all the children */
 		for (children.nb = 0; children.nb < NCHILDREN; children.nb++) {
 			if (td->fork == 0) {
-				ret = pthread_create(&(children.ch[children.nb].t),
-						     &ta, child, NULL);
+				ret =
+				    pthread_create(&
+						   (children.ch[children.nb].t),
+						   &ta, child, NULL);
 				if (ret != 0)
 					UNRESOLVED(ret, "Failed to create "
-							"enough threads");
+						   "enough threads");
 			} else {
 				children.ch[children.nb].p = fork();
 				if (children.ch[children.nb].p == 0) {
@@ -430,13 +452,13 @@
 				if (children.ch[children.nb].p == -1) {
 					children.nb--;
 					UNRESOLVED_KILLALL(errno, "Failed to "
-						"create enough processes");
+							   "create enough processes");
 				}
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Created %i children\n", NCHILDREN);
-		#endif
+#endif
 
 		/* Make sure all children are waiting */
 		ret = pthread_mutex_lock(&td->mtx);
@@ -455,32 +477,33 @@
 			child_count = td->count;
 		}
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are waiting\n");
-		#endif
+#endif
 
 		ret = pthread_create(&t_timer, NULL, timer, NULL);
 		if (ret != 0)
-			UNRESOLVED_KILLALL(ret, "Unable to create timer thread");
+			UNRESOLVED_KILLALL(ret,
+					   "Unable to create timer thread");
 
 		/* Wakeup the children */
 		td->predicate = 1;
 		ret = pthread_cond_broadcast(&td->cnd);
 		if (ret != 0)
 			UNRESOLVED_KILLALL(ret, "Failed to broadcast "
-						"the condition.");
+					   "the condition.");
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Condition was signaled\n");
-		#endif
+#endif
 
 		ret = pthread_mutex_unlock(&td->mtx);
 		if (ret != 0)
 			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex");
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Joining the children\n");
-		#endif
+#endif
 
 		/* join the children */
 		for (--children.nb; children.nb >= 0; children.nb--) {
@@ -489,7 +512,7 @@
 						   NULL);
 				if (ret != 0)
 					UNRESOLVED(ret,
-					"Failed to join a child thread");
+						   "Failed to join a child thread");
 			} else {
 				pid = waitpid(children.ch[children.nb].p,
 					      &status, 0);
@@ -497,8 +520,7 @@
 					ret = errno;
 					output("Waitpid failed (expected: %i, "
 					       "got: %i)\n",
-						children.ch[children.nb].p,
-						pid);
+					       children.ch[children.nb].p, pid);
 					UNRESOLVED_KILLALL(ret,
 							   "Waitpid failed");
 				}
@@ -512,9 +534,9 @@
 			output_fini();
 			exit(ret);
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children terminated\n");
-		#endif
+#endif
 
 		ret = pthread_cancel(t_timer);
 		if (ret != 0)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-1.c
index ff37100..e4e2406 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-1.c
@@ -22,7 +22,7 @@
 
 struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 static int start_num;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-2.c
index d312501..3bfd474 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/4-2.c
@@ -58,9 +58,9 @@
 static sigset_t usersigs;
 
 struct thestruct {
-	int	sig;
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 };
 
@@ -82,15 +82,15 @@
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 "
-				"in signal thread");
+			   "in signal thread");
 
 	while (do_it) {
-		#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 		ret = sem_wait(thearg->sem);
 		if (ret)
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
 		if (ret != 0)
@@ -110,6 +110,7 @@
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 static void sighdl2(int sig)
 {
@@ -129,7 +130,7 @@
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 "
-				"in signal thread");
+			   "in signal thread");
 
 	ret = pthread_mutex_lock(&(data.mtx));
 	if (ret != 0)
@@ -160,7 +161,7 @@
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 "
-				"in worker thread");
+			   "in worker thread");
 
 	while (woken < 5) {
 		ret = pthread_cond_broadcast(&(data.cnd));
@@ -206,14 +207,14 @@
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 "
-				"in main thread");
+			   "in main thread");
 
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	if (sem_init(&semsig1, 0, 1))
 		UNRESOLVED(errno, "Semsig1  init");
 	if (sem_init(&semsig2, 0, 1))
 		UNRESOLVED(errno, "Semsig2  init");
-	#endif
+#endif
 
 	for (i = 0; i < 5; i++) {
 		ret = pthread_create(&th_waiter[i], NULL, waiter, NULL);
@@ -262,13 +263,13 @@
 	if (ret)
 		UNRESOLVED(ret, "Worker thread join failed");
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  Condition was signaled %d times.\n", count_cnd_sig);
 	output("  pthread_cond_wait exited %d times.\n", count_cnd_wup);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/1-1.c
index ea7442c..30ba587 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/1-1.c
@@ -15,8 +15,8 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-pthread_cond_t  cond1, cond2;
-pthread_cond_t  cond3 = PTHREAD_COND_INITIALIZER;
+pthread_cond_t cond1, cond2;
+pthread_cond_t cond3 = PTHREAD_COND_INITIALIZER;
 
 int main()
 {
@@ -24,46 +24,48 @@
 	int rc;
 
 	/* Initialize a condition variable attribute object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0) {
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize cond1 with the default condition variable attribute */
-	if ((rc=pthread_cond_init(&cond1,&condattr)) != 0) {
-		fprintf(stderr,"Fail to initialize cond1, rc=%d\n",rc);
+	if ((rc = pthread_cond_init(&cond1, &condattr)) != 0) {
+		fprintf(stderr, "Fail to initialize cond1, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize cond2 with NULL attributes */
-	if ((rc=pthread_cond_init(&cond2,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize cond2, rc=%d\n",rc);
+	if ((rc = pthread_cond_init(&cond2, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize cond2, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the condition variable attribute object */
-	if ((rc=pthread_condattr_destroy(&condattr)) != 0) {
-		fprintf(stderr,"Error at pthread_condattr_destroy(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_destroy(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_destroy(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy cond1 */
-	if ((rc=pthread_cond_destroy(&cond1)) != 0) {
-		fprintf(stderr,"Fail to destroy cond1, rc=%d\n",rc);
+	if ((rc = pthread_cond_destroy(&cond1)) != 0) {
+		fprintf(stderr, "Fail to destroy cond1, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Destroy cond2 */
-	if ((rc=pthread_cond_destroy(&cond2)) != 0) {
-		fprintf(stderr,"Fail to destroy cond2, rc=%d\n",rc);
+	if ((rc = pthread_cond_destroy(&cond2)) != 0) {
+		fprintf(stderr, "Fail to destroy cond2, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Destroy cond3 */
-	if ((rc=pthread_cond_destroy(&cond3)) != 0) {
-		fprintf(stderr,"Fail to destroy cond3, rc=%d\n",rc);
+	if ((rc = pthread_cond_destroy(&cond3)) != 0) {
+		fprintf(stderr, "Fail to destroy cond3, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/2-1.c
index 597c94a..975574d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/2-1.c
@@ -29,33 +29,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
- #include <sys/mman.h>
- #include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <sys/wait.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -103,7 +103,7 @@
 #define TIMEOUT  (120)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* test with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* test with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -119,162 +119,217 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* The shared data */
-typedef struct
-{
-	int 		count1;     /* number of children currently waiting (1st pass)*/
-	int 		count2;     /* number of children currently waiting (2nd pass)*/
-	pthread_cond_t 	cnd;
+typedef struct {
+	int count1;		/* number of children currently waiting (1st pass) */
+	int count2;		/* number of children currently waiting (2nd pass) */
+	pthread_cond_t cnd;
 	pthread_mutex_t mtx1;
 	pthread_mutex_t mtx2;
-	int 		predicate1, predicate2; /* Boolean associated to the condvar */
-	clockid_t 	cid;       /* clock used in the condvar */
-	char		fork;      /* the children are processes */
+	int predicate1, predicate2;	/* Boolean associated to the condvar */
+	clockid_t cid;		/* clock used in the condvar */
+	char fork;		/* the children are processes */
 } testdata_t;
-testdata_t * td;
+testdata_t *td;
 
 /* Child function (either in a thread or in a process) */
-void * child(void * arg)
+void *child(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	struct timespec ts;
 	char timed;
 
 	/* lock the 1st mutex */
 	ret = pthread_mutex_lock(&td->mtx1);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock mutex in child");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock mutex in child");
+	}
 
 	/* increment count */
 	td->count1++;
 
-	timed=td->count1 & 1;
+	timed = td->count1 & 1;
 
-	if (timed)
-	{
-	/* get current time if we are a timedwait */
+	if (timed) {
+		/* get current time if we are a timedwait */
 		ret = clock_gettime(td->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Unable to read clock");
+		}
 		ts.tv_sec += TIMEOUT;
 	}
 
 	do {
-	/* Wait while the predicate is false */
+		/* Wait while the predicate is false */
 		if (timed)
 			ret = pthread_cond_timedwait(&td->cnd, &td->mtx1, &ts);
 		else
 			ret = pthread_cond_wait(&td->cnd, &td->mtx1);
-	} while ((ret == 0) && (td->predicate1==0));
-	if ((ret != 0) && (td->predicate1 != 0))
-	{
-		output("Wakening the cond failed with error %i (%s)\n", ret, strerror(ret));
-		FAILED("Destroying the cond var while threads were awaken but inside wait routine failed.");
+	} while ((ret == 0) && (td->predicate1 == 0));
+	if ((ret != 0) && (td->predicate1 != 0)) {
+		output("Wakening the cond failed with error %i (%s)\n", ret,
+		       strerror(ret));
+		FAILED
+		    ("Destroying the cond var while threads were awaken but inside wait routine failed.");
 	}
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to wait for the cond");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to wait for the cond");
+	}
 
 	td->count1--;
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&td->mtx1);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex.");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex.");
+	}
 
-  /* Second pass */
+	/* Second pass */
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(&td->mtx2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock mutex in child");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock mutex in child");
+	}
 
 	/* increment count */
 	td->count2++;
 
-	timed=td->count2 & 1;
+	timed = td->count2 & 1;
 
-	if (timed)
-	{
-	/* get current time if we are a timedwait */
+	if (timed) {
+		/* get current time if we are a timedwait */
 		ret = clock_gettime(td->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Unable to read clock");
+		}
 		ts.tv_sec += TIMEOUT;
 	}
 
 	do {
-	/* Wait while the predicate is false */
+		/* Wait while the predicate is false */
 		if (timed)
 			ret = pthread_cond_timedwait(&td->cnd, &td->mtx2, &ts);
 		else
 			ret = pthread_cond_wait(&td->cnd, &td->mtx2);
-	} while ((ret == 0) && (td->predicate2==0));
-	if ((ret != 0) && (td->predicate2 != 0))
-	{
-		output("Wakening the cond failed with error %i (%s)\n", ret, strerror(ret));
-		FAILED("Destroying the cond var while threads were awaken but inside wait routine failed.");
+	} while ((ret == 0) && (td->predicate2 == 0));
+	if ((ret != 0) && (td->predicate2 != 0)) {
+		output("Wakening the cond failed with error %i (%s)\n", ret,
+		       strerror(ret));
+		FAILED
+		    ("Destroying the cond var while threads were awaken but inside wait routine failed.");
 	}
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to wait for the cond");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to wait for the cond");
+	}
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&td->mtx2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex.");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex.");
+	}
 
 	return NULL;
 }
 
 /* Timeout thread */
-void * timer(void * arg)
+void *timer(void *arg)
 {
-	pid_t *pchildren = (pid_t *)arg;
+	pid_t *pchildren = (pid_t *) arg;
 	unsigned int to = TIMEOUT;
-	do { to = sleep(to); }
-	while (to>0);
+	do {
+		to = sleep(to);
+	}
+	while (to > 0);
 	FAILED_KILLALL("Test failed (hang)", pchildren);
-	return NULL; /* For compiler */
+	return NULL;		/* For compiler */
 }
 
 /* main function */
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -300,9 +355,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -313,7 +368,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -321,340 +376,437 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_destroy-XXXXXX";
 		size_t sz, ps;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
-		sz= ((sizeof(testdata_t) / ps) + 1) * ps; /* # pages needed to store the testdata */
+		ps = (size_t) sysconf(_SC_PAGESIZE);
+		sz = ((sizeof(testdata_t) / ps) + 1) * ps;	/* # pages needed to store the testdata */
 
-		tmp = calloc(1 , sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		tmp = calloc(1, sz);
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
-		output("Testdata allocated in shared memory (%ib).\n", sizeof(testdata_t));
-		#endif
+#if VERBOSE > 1
+		output("Testdata allocated in shared memory (%ib).\n",
+		       sizeof(testdata_t));
+#endif
 	}
 
 	/* Do the test for each test scenario */
-	for (scenar=0; scenar < NSCENAR; scenar++)
-	{
+	for (scenar = 0; scenar < NSCENAR; scenar++) {
 		/* set / reset everything */
-		td->fork=0;
+		td->fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[scenar].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
+		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
 		}
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[scenar].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[scenar].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
 		}
 		ret = pthread_condattr_getclock(&ca, &td->cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#else
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[scenar].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[scenar].fork != 0)) {
 			td->fork = 1;
 		}
 
-	/* Proceed to testing */
+		/* Proceed to testing */
 		/* initialize the mutex */
 		ret = pthread_mutex_init(&td->mtx1, &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex init failed");
+		}
 
 		ret = pthread_mutex_init(&td->mtx2, &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex init failed");
+		}
 
 		ret = pthread_mutex_lock(&td->mtx2);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex lock failed");
+		}
 
 		/* initialize the condvar */
 		ret = pthread_cond_init(&td->cnd, &ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond init failed");
+		}
+#if VERBOSE > 2
+		output("[parent] Starting 1st pass of test %s\n",
+		       scenarii[scenar].descr);
+#endif
 
-		#if VERBOSE > 2
-		output("[parent] Starting 1st pass of test %s\n", scenarii[scenar].descr);
-		#endif
-
-		td->count1=0;
-		td->count2=0;
-		td->predicate1=0;
-		td->predicate2=0;
+		td->count1 = 0;
+		td->count2 = 0;
+		td->predicate1 = 0;
+		td->predicate2 = 0;
 
 		/* Create all the children */
-		for (ch=0; ch < NTHREADS; ch++)
-		{
-			if (td->fork==0)
-			{
-				ret = pthread_create(&t_child[ch], NULL, child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create a child thread");  }
-			}
-			else
-			{
-				p_child[ch]=fork();
-				if (p_child[ch] == -1)
-				{
+		for (ch = 0; ch < NTHREADS; ch++) {
+			if (td->fork == 0) {
+				ret =
+				    pthread_create(&t_child[ch], NULL, child,
+						   NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create a child thread");
+				}
+			} else {
+				p_child[ch] = fork();
+				if (p_child[ch] == -1) {
 					ret = errno;
-					for (--ch; ch>=0; ch--)
+					for (--ch; ch >= 0; ch--)
 						kill(p_child[ch], SIGKILL);
-					UNRESOLVED(ret, "Failed to create a child process");
+					UNRESOLVED(ret,
+						   "Failed to create a child process");
 				}
 
-				if (p_child[ch] == 0) /* We are the child */
-				{
+				if (p_child[ch] == 0) {	/* We are the child */
 					child(NULL);
 					exit(0);
 				}
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are running\n");
-		#endif
+#endif
 
 		/* Make sure all children are waiting */
 		ret = pthread_mutex_lock(&td->mtx1);
-		if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex", p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+					   p_child);
+		}
 		ch = td->count1;
-		while (ch < NTHREADS)
-		{
+		while (ch < NTHREADS) {
 			ret = pthread_mutex_unlock(&td->mtx1);
-			if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret,
+						   "Failed to unlock mutex",
+						   p_child);
+			}
 			sched_yield();
 			ret = pthread_mutex_lock(&td->mtx1);
-			if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+						   p_child);
+			}
 			ch = td->count1;
 		}
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are waiting\n");
-		#endif
+#endif
 
 		/* create the timeout thread */
 		ret = pthread_create(&t_timer, NULL, timer, p_child);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Unable to create timer thread",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Unable to create timer thread",
+					   p_child);
+		}
 
 		/* Wakeup the children */
-		td->predicate1=1;
+		td->predicate1 = 1;
 		ret = pthread_cond_broadcast(&td->cnd);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to signal the condition.", p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret,
+					   "Failed to signal the condition.",
+					   p_child);
+		}
 
 		ret = pthread_mutex_unlock(&td->mtx1);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",
+					   p_child);
+		}
 
 		/* Destroy the condvar (this must be safe) */
 		ret = pthread_cond_destroy(&td->cnd);
-		if (ret != 0)  {  FAILED_KILLALL("Unable to destroy the cond while no thread is blocked inside", p_child);  }
+		if (ret != 0) {
+			FAILED_KILLALL
+			    ("Unable to destroy the cond while no thread is blocked inside",
+			     p_child);
+		}
 
 		/* Reuse the cond memory */
 		memset(&td->cnd, 0xFF, sizeof(pthread_cond_t));
 
-		#if VERBOSE > 4
-		output("[parent] Condition was broadcasted, and condvar destroyed.\n");
-		#endif
+#if VERBOSE > 4
+		output
+		    ("[parent] Condition was broadcasted, and condvar destroyed.\n");
+#endif
 
 		/* Make sure all children have exited the first wait */
 		ret = pthread_mutex_lock(&td->mtx1);
-		if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+					   p_child);
+		}
 		ch = td->count1;
-		while (ch > 0)
-		{
+		while (ch > 0) {
 			ret = pthread_mutex_unlock(&td->mtx1);
-			if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret,
+						   "Failed to unlock mutex",
+						   p_child);
+			}
 			sched_yield();
 			ret = pthread_mutex_lock(&td->mtx1);
-			if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+						   p_child);
+			}
 			ch = td->count1;
 		}
 
 		ret = pthread_mutex_unlock(&td->mtx1);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",
+					   p_child);
+		}
 
-	/* Go toward the 2nd pass */
+		/* Go toward the 2nd pass */
 		/* Now, all children are waiting to lock the 2nd mutex, which we own here. */
 		/* reinitialize the condvar */
 		ret = pthread_cond_init(&td->cnd, &ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
-
-		#if VERBOSE > 2
-		output("[parent] Starting 2nd pass of test %s\n", scenarii[scenar].descr);
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond init failed");
+		}
+#if VERBOSE > 2
+		output("[parent] Starting 2nd pass of test %s\n",
+		       scenarii[scenar].descr);
+#endif
 
 		/* Make sure all children are waiting */
 		ch = td->count2;
-		while (ch < NTHREADS)
-		{
+		while (ch < NTHREADS) {
 			ret = pthread_mutex_unlock(&td->mtx2);
-			if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret,
+						   "Failed to unlock mutex",
+						   p_child);
+			}
 			sched_yield();
 			ret = pthread_mutex_lock(&td->mtx2);
-			if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+						   p_child);
+			}
 			ch = td->count2;
 		}
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are waiting\n");
-		#endif
+#endif
 
 		/* Wakeup the children */
-		td->predicate2=1;
+		td->predicate2 = 1;
 		ret = pthread_cond_broadcast(&td->cnd);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to signal the condition.", p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret,
+					   "Failed to signal the condition.",
+					   p_child);
+		}
 
 		/* Allow the children to terminate */
 		ret = pthread_mutex_unlock(&td->mtx2);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",
+					   p_child);
+		}
 
 		/* Destroy the condvar (this must be safe) */
 		ret = pthread_cond_destroy(&td->cnd);
-		if (ret != 0)  {  FAILED_KILLALL("Unable to destroy the cond while no thread is blocked inside", p_child);  }
+		if (ret != 0) {
+			FAILED_KILLALL
+			    ("Unable to destroy the cond while no thread is blocked inside",
+			     p_child);
+		}
 
 		/* Reuse the cond memory */
 		memset(&td->cnd, 0x00, sizeof(pthread_cond_t));
 
-		#if VERBOSE > 4
-		output("[parent] Condition was broadcasted, and condvar destroyed.\n");
-		#endif
+#if VERBOSE > 4
+		output
+		    ("[parent] Condition was broadcasted, and condvar destroyed.\n");
+#endif
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] Joining the children\n");
-		#endif
+#endif
 
 		/* join the children */
-		for (ch=(NTHREADS - 1); ch >= 0 ; ch--)
-		{
-			if (td->fork==0)
-			{
+		for (ch = (NTHREADS - 1); ch >= 0; ch--) {
+			if (td->fork == 0) {
 				ret = pthread_join(t_child[ch], NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to join a child thread");  }
-			}
-			else
-			{
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to join a child thread");
+				}
+			} else {
 				pid = waitpid(p_child[ch], &status, 0);
-				if (pid != p_child[ch])
-				{
+				if (pid != p_child[ch]) {
 					ret = errno;
-					output("Waitpid failed (expected: %i, got: %i)\n", p_child[ch], pid);
-					for (; ch>=0; ch--)
-					{
+					output
+					    ("Waitpid failed (expected: %i, got: %i)\n",
+					     p_child[ch], pid);
+					for (; ch >= 0; ch--) {
 						kill(p_child[ch], SIGKILL);
 					}
 					UNRESOLVED(ret, "Waitpid failed");
 				}
-				if (WIFEXITED(status))
-				{
+				if (WIFEXITED(status)) {
 					/* the child should return only failed or unresolved or passed */
 					if (ret != PTS_FAIL)
 						ret |= WEXITSTATUS(status);
 				}
 			}
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			output_fini();
 			exit(ret);
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children terminated\n");
-		#endif
+#endif
 
 		/* cancel the timeout thread */
 		ret = pthread_cancel(t_timer);
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			/* Strange error here... the thread cannot be terminated (app would be killed) */
 			UNRESOLVED(ret, "Failed to cancel the timeout handler");
 		}
 
 		/* join the timeout thread */
 		ret = pthread_join(t_timer, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the timeout handler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the timeout handler");
+		}
 
 		/* Destroy the datas */
 		ret = pthread_cond_destroy(&td->cnd);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the condvar");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the condvar");
+		}
 
 		ret = pthread_mutex_destroy(&td->mtx1);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_mutex_destroy(&td->mtx2);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		/* Destroy the attributes */
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/3-1.c
index 14cb425..ba9c5f5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/3-1.c
@@ -17,33 +17,32 @@
 
 int main()
 {
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 	int rc;
 
 	/* Initialize a cond object */
-	if ((rc=pthread_cond_init(&cond,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize cond, rc=%d\n",rc);
+	if ((rc = pthread_cond_init(&cond, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize cond, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc=pthread_cond_destroy(&cond)) == 0) {
+	if ((rc = pthread_cond_destroy(&cond)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Check if returned values are tolerable */
 	else if (rc == EBUSY) {
-		fprintf(stderr,"Detected an attempt to destroy a cond in use\n");
+		fprintf(stderr,
+			"Detected an attempt to destroy a cond in use\n");
 		return PTS_FAIL;
-	}
-	else if (rc == EINVAL) {
-		fprintf(stderr,"The value specified by 'cond' is invalid\n");
+	} else if (rc == EINVAL) {
+		fprintf(stderr, "The value specified by 'cond' is invalid\n");
 		return PTS_FAIL;
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED (error %i unexpected)\n", rc);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/4-1.c
index 357b57c..4bf7da3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/4-1.c
@@ -33,18 +33,18 @@
 /* cond used by the two threads */
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
-void * thread(void *tmp)
+void *thread(void *tmp)
 {
-	int    rc = 0;
+	int rc = 0;
 
 	/* acquire the mutex */
-	rc  = pthread_mutex_lock(&mutex);
+	rc = pthread_mutex_lock(&mutex);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_mutex_lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	/* Wait on the cond var. This will not return, as nobody signals*/
+	/* Wait on the cond var. This will not return, as nobody signals */
 	rc = pthread_cond_wait(&cond, &mutex);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_cond_wait\n");
@@ -62,7 +62,7 @@
 int main()
 {
 	pthread_t low_id;
-	int       rc = 0;
+	int rc = 0;
 
 	/* Create a new thread with default attributes */
 	rc = pthread_create(&low_id, NULL, thread, NULL);
@@ -78,7 +78,7 @@
 	rc = pthread_cond_destroy(&cond);
 	if (rc != EBUSY) {
 		printf(ERROR_PREFIX "Test PASS: Expected %d(EBUSY) got %d, "
-			"though the standard states 'may' fail\n", EBUSY, rc);
+		       "though the standard states 'may' fail\n", EBUSY, rc);
 
 		exit(PTS_PASS);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c
index 8dcb245..404e7d7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c
@@ -33,19 +33,19 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
- #include <pthread.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <errno.h>
- #include <signal.h>
- #include <sys/wait.h>
- #include <sys/resource.h>
- #include <stdarg.h>
- #include <posixtest.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/resource.h>
+#include <stdarg.h>
+#include <posixtest.h>
 
 #define ERR_MSG(f, rc) printf("Failed: func: %s rc: %s (%u)\n", \
 			f, strerror(rc), rc);
@@ -69,8 +69,8 @@
 	/* Limit the process memory to a small value (8 for example). */
 	rl.rlim_max = MAX_MEM;
 	rl.rlim_cur = MAX_MEM;
-	rc = setrlimit(RLIMIT_DATA,  &rl);
-	rc |= setrlimit(RLIMIT_AS,  &rl);
+	rc = setrlimit(RLIMIT_DATA, &rl);
+	rc |= setrlimit(RLIMIT_AS, &rl);
 	if (rc < 0) {
 		ERR_MSG("setrlimit()", errno);
 		exit(PTS_UNRESOLVED);
@@ -131,7 +131,7 @@
 
 	if (WIFSIGNALED(child_status)) {
 		printf("Failed: child received signal: %u\n",
-				WTERMSIG(child_status));
+		       WTERMSIG(child_status));
 		goto done;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-3.c
index fbf29c7..4ff0f13 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-3.c
@@ -33,7 +33,6 @@
 #define ERR_MSG(f, rc)	printf("Failed: function: %s status: %s(%u)\n", \
 						f, strerror(rc), rc)
 
-
 int main(void)
 {
 	int status;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-1.c
index 266d42f..0e885c5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-1.c
@@ -21,13 +21,12 @@
 
 #define THREAD_NUM  3
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread[THREAD_NUM];
+pthread_t thread[THREAD_NUM];
 
 int start_num = 0;
 int waken_num = 0;
@@ -37,8 +36,8 @@
 {
 	int i;
 	printf("Error: failed to wakeup all threads\n");
-	for (i=0; i<THREAD_NUM; i++) {	/* cancel threads */
-	    	pthread_cancel(thread[i]);
+	for (i = 0; i < THREAD_NUM; i++) {	/* cancel threads */
+		pthread_cancel(thread[i]);
 	}
 
 	exit(PTS_UNRESOLVED);
@@ -50,26 +49,32 @@
 	pthread_t self = pthread_self();
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to acquire the mutex\n", (void*)self);
+		fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
+			(void *)self);
 		exit(PTS_UNRESOLVED);
 	}
-	start_num ++;
-	fprintf(stderr,"[Thread 0x%p] started and locked the mutex\n", (void*)self);
+	start_num++;
+	fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
+		(void *)self);
 
-	fprintf(stderr,"[Thread 0x%p] is waiting for the cond\n", (void*)self);
+	fprintf(stderr, "[Thread 0x%p] is waiting for the cond\n",
+		(void *)self);
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
-		fprintf(stderr,"pthread_cond_wait return %d\n", rc);
-                exit(PTS_UNRESOLVED);
-	}
-	waken_num ++;
-	fprintf(stderr,"[Thread 0x%p] was wakened and acquired the mutex again\n", (void*)self);
-
-	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to release the mutex\n", (void*)self);
+		fprintf(stderr, "pthread_cond_wait return %d\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"[Thread 0x%p] released the mutex\n", (void*)self);
+	waken_num++;
+	fprintf(stderr,
+		"[Thread 0x%p] was wakened and acquired the mutex again\n",
+		(void *)self);
+
+	if (pthread_mutex_unlock(&td.mutex) != 0) {
+		fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
+			(void *)self);
+		exit(PTS_UNRESOLVED);
+	}
+	fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
 	return NULL;
 }
 
@@ -79,17 +84,17 @@
 	struct sigaction act;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {	/* create THREAD_NUM threads */
-	    	if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
-			fprintf(stderr,"Fail to create thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {	/* create THREAD_NUM threads */
+		if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
+			fprintf(stderr, "Fail to create thread[%d]\n", i);
 			exit(PTS_UNRESOLVED);
 		}
 	}
@@ -99,54 +104,57 @@
 	/* Acquire the mutex to make sure that all waiters are currently
 	   blocked on pthread_cond_wait */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to acquire mutex\n");
+		fprintf(stderr, "Main: Fail to acquire mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to release mutex\n");
+		fprintf(stderr, "Main: Fail to release mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* signal once and check if at least one waiter is wakened */
-	fprintf(stderr,"[Main thread] signals a condition\n");
+	fprintf(stderr, "[Main thread] signals a condition\n");
 	rc = pthread_cond_signal(&td.cond);
 	if (rc != 0) {
-		fprintf(stderr,"[Main thread] failed to signal the condition\n");
+		fprintf(stderr,
+			"[Main thread] failed to signal the condition\n");
 		exit(PTS_UNRESOLVED);
 	}
 	sleep(1);
 	if (waken_num <= 0) {
-		fprintf(stderr,"[Main thread] but no waiters were wakened\n");
-                printf("Test FAILED\n");
+		fprintf(stderr, "[Main thread] but no waiters were wakened\n");
+		printf("Test FAILED\n");
 		/* Cancel the threads */
-		for (i=0; i<THREAD_NUM; i++) {	/* cancel threads */
-	    		pthread_cancel(thread[i]);
+		for (i = 0; i < THREAD_NUM; i++) {	/* cancel threads */
+			pthread_cancel(thread[i]);
 		}
-                exit(PTS_FAIL);
+		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"[Main thread] %d waiters were wakened\n", waken_num);
+	fprintf(stderr, "[Main thread] %d waiters were wakened\n", waken_num);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
 	/* loop to wake up the rest threads */
-	for (i=1; i<THREAD_NUM; i++) {
-		fprintf(stderr,"[Main thread] signals to wake up the next thread\n");
+	for (i = 1; i < THREAD_NUM; i++) {
+		fprintf(stderr,
+			"[Main thread] signals to wake up the next thread\n");
 		if (pthread_cond_signal(&td.cond) != 0) {
-			fprintf(stderr,"Main failed to signal the condition\n");
+			fprintf(stderr,
+				"Main failed to signal the condition\n");
 			exit(PTS_UNRESOLVED);
 		}
 		usleep(100);
 	}
 
 	/* join all secondary threads */
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_join(thread[i], NULL) != 0) {
-			fprintf(stderr,"Fail to join thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_join(thread[i], NULL) != 0) {
+			fprintf(stderr, "Fail to join thread[%d]\n", i);
 			exit(PTS_UNRESOLVED);
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-2.c
index 0d85b2d..6eb3144 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-2.c
@@ -28,33 +28,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
- #include <sys/mman.h>
- #include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <sys/wait.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -102,7 +102,7 @@
 #define TIMEOUT  (120)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -118,127 +118,176 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* The shared data */
-typedef struct
-{
-	int 		count;     /* number of children currently waiting */
-	pthread_cond_t 	cnd;
+typedef struct {
+	int count;		/* number of children currently waiting */
+	pthread_cond_t cnd;
 	pthread_mutex_t mtx;
-	int 		predicate; /* Boolean associated to the condvar */
-	clockid_t 	cid;       /* clock used in the condvar */
-	char		fork;      /* the children are processes */
+	int predicate;		/* Boolean associated to the condvar */
+	clockid_t cid;		/* clock used in the condvar */
+	char fork;		/* the children are processes */
 } testdata_t;
-testdata_t * td;
+testdata_t *td;
 
 /* Child function (either in a thread or in a process) */
-void * child(void * arg)
+void *child(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	struct timespec ts;
 	char timed;
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(&td->mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock mutex in child");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock mutex in child");
+	}
 
 	/* increment count */
 	td->count++;
 
-	timed=td->count & 1;
+	timed = td->count & 1;
 
-	if (timed)
-	{
-	/* get current time if we are a timedwait */
+	if (timed) {
+		/* get current time if we are a timedwait */
 		ret = clock_gettime(td->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Unable to read clock");
+		}
 		ts.tv_sec += TIMEOUT;
 	}
 
 	do {
-	/* Wait while the predicate is false */
+		/* Wait while the predicate is false */
 		if (timed)
 			ret = pthread_cond_timedwait(&td->cnd, &td->mtx, &ts);
 		else
 			ret = pthread_cond_wait(&td->cnd, &td->mtx);
-		#if VERBOSE > 5
-		output("[child] Wokenup timed=%i, Predicate=%i, ret=%i\n", timed, td->predicate, ret);
-		#endif
-	} while ((ret == 0) && (td->predicate==0));
-	if (ret == ETIMEDOUT)
-	{
-		FAILED("Timeout occured. This means a cond signal was lost -- or parent died");
+#if VERBOSE > 5
+		output("[child] Wokenup timed=%i, Predicate=%i, ret=%i\n",
+		       timed, td->predicate, ret);
+#endif
+	} while ((ret == 0) && (td->predicate == 0));
+	if (ret == ETIMEDOUT) {
+		FAILED
+		    ("Timeout occured. This means a cond signal was lost -- or parent died");
 	}
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to wait for the cond");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to wait for the cond");
+	}
 
 	/* Signal the condition to cascade */
 	ret = pthread_cond_signal(&td->cnd);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to cascade signal the cond");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to cascade signal the cond");
+	}
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&td->mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex.");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex.");
+	}
 
 	return NULL;
 }
 
 /* Timeout thread */
-void * timer(void * arg)
+void *timer(void *arg)
 {
-	pid_t *pchildren = (pid_t *)arg;
+	pid_t *pchildren = (pid_t *) arg;
 	unsigned int to = TIMEOUT;
-	do { to = sleep(to); }
-	while (to>0);
+	do {
+		to = sleep(to);
+	}
+	while (to > 0);
 	FAILED_KILLALL("Operation timed out. A signal was lost.", pchildren);
-	return NULL; /* For compiler */
+	return NULL;		/* For compiler */
 }
 
 /* main function */
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -264,9 +313,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -277,7 +326,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -285,256 +334,307 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_wait_stress-XXXXXX";
 		size_t sz, ps;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
-		sz= ((sizeof(testdata_t) / ps) + 1) * ps; /* # pages needed to store the testdata */
+		ps = (size_t) sysconf(_SC_PAGESIZE);
+		sz = ((sizeof(testdata_t) / ps) + 1) * ps;	/* # pages needed to store the testdata */
 
-		tmp = calloc(1 , sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		tmp = calloc(1, sz);
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
-		output("Testdata allocated in shared memory (%ib).\n", sizeof(testdata_t));
-		#endif
+#if VERBOSE > 1
+		output("Testdata allocated in shared memory (%ib).\n",
+		       sizeof(testdata_t));
+#endif
 	}
 
 	/* Do the test for each test scenario */
-	for (scenar=0; scenar < NSCENAR; scenar++)
-	{
+	for (scenar = 0; scenar < NSCENAR; scenar++) {
 		/* set / reset everything */
-		td->fork=0;
+		td->fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[scenar].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
+		if ((pshared > 0) && (scenarii[scenar].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
 		}
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[scenar].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[scenar].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
 		}
 		ret = pthread_condattr_getclock(&ca, &td->cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#else
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[scenar].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[scenar].fork != 0)) {
 			td->fork = 1;
 		}
 
 		/* initialize the condvar */
 		ret = pthread_cond_init(&td->cnd, &ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond init failed");
+		}
 
 		/* initialize the mutex */
 		ret = pthread_mutex_init(&td->mtx, &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex init failed");
+		}
 
 		/* Destroy the attributes */
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
-
-		#if VERBOSE > 2
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
+#if VERBOSE > 2
 		output("[parent] Starting test %s\n", scenarii[scenar].descr);
-		#endif
+#endif
 
-		td->count=0;
+		td->count = 0;
 		/* Create all the children */
-		for (ch=0; ch < NTHREADS; ch++)
-		{
-			if (td->fork==0)
-			{
-				ret = pthread_create(&t_child[ch], NULL, child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create a child thread");  }
-			}
-			else
-			{
-				p_child[ch]=fork();
-				if (p_child[ch] == -1)
-				{
+		for (ch = 0; ch < NTHREADS; ch++) {
+			if (td->fork == 0) {
+				ret =
+				    pthread_create(&t_child[ch], NULL, child,
+						   NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create a child thread");
+				}
+			} else {
+				p_child[ch] = fork();
+				if (p_child[ch] == -1) {
 					ret = errno;
-					for (--ch; ch>=0; ch--)
+					for (--ch; ch >= 0; ch--)
 						kill(p_child[ch], SIGKILL);
-					UNRESOLVED(ret, "Failed to create a child process");
+					UNRESOLVED(ret,
+						   "Failed to create a child process");
 				}
 
-				if (p_child[ch] == 0) /* We are the child */
-				{
+				if (p_child[ch] == 0) {	/* We are the child */
 					child(NULL);
 					exit(0);
 				}
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are running\n");
-		#endif
+#endif
 
 		/* Make sure all children are waiting */
 		ret = pthread_mutex_lock(&td->mtx);
-		if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex", p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+					   p_child);
+		}
 		ch = td->count;
-		while (ch < NTHREADS)
-		{
+		while (ch < NTHREADS) {
 			ret = pthread_mutex_unlock(&td->mtx);
-			if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret,
+						   "Failed to unlock mutex",
+						   p_child);
+			}
 			sched_yield();
 			ret = pthread_mutex_lock(&td->mtx);
-			if (ret != 0) {  UNRESOLVED_KILLALL(ret, "Failed to lock mutex",p_child);  }
+			if (ret != 0) {
+				UNRESOLVED_KILLALL(ret, "Failed to lock mutex",
+						   p_child);
+			}
 			ch = td->count;
 		}
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children are waiting\n");
-		#endif
+#endif
 
 		/* create the timeout thread */
 		ret = pthread_create(&t_timer, NULL, timer, p_child);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Unable to create timer thread",p_child);  }
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Unable to create timer thread",
+					   p_child);
+		}
 
 		/* Wakeup the children */
-		td->predicate=1;
+		td->predicate = 1;
 		ret = pthread_cond_signal(&td->cnd);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to signal the condition.", p_child);  }
-
-		#if VERBOSE > 4
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret,
+					   "Failed to signal the condition.",
+					   p_child);
+		}
+#if VERBOSE > 4
 		output("[parent] Condition was signaled\n");
-		#endif
+#endif
 
 		ret = pthread_mutex_unlock(&td->mtx);
-		if (ret != 0)  {  UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",p_child);  }
-
-		#if VERBOSE > 4
+		if (ret != 0) {
+			UNRESOLVED_KILLALL(ret, "Failed to unlock mutex",
+					   p_child);
+		}
+#if VERBOSE > 4
 		output("[parent] Joining the children\n");
-		#endif
+#endif
 
 		/* join the children */
-		for (ch=(NTHREADS - 1); ch >= 0 ; ch--)
-		{
-			if (td->fork==0)
-			{
+		for (ch = (NTHREADS - 1); ch >= 0; ch--) {
+			if (td->fork == 0) {
 				ret = pthread_join(t_child[ch], NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to join a child thread");  }
-			}
-			else
-			{
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to join a child thread");
+				}
+			} else {
 				pid = waitpid(p_child[ch], &status, 0);
-				if (pid != p_child[ch])
-				{
+				if (pid != p_child[ch]) {
 					ret = errno;
-					output("Waitpid failed (expected: %i, got: %i)\n", p_child[ch], pid);
-					for (; ch>=0; ch--)
-					{
+					output
+					    ("Waitpid failed (expected: %i, got: %i)\n",
+					     p_child[ch], pid);
+					for (; ch >= 0; ch--) {
 						kill(p_child[ch], SIGKILL);
 					}
 					UNRESOLVED(ret, "Waitpid failed");
 				}
-				if (WIFEXITED(status))
-				{
+				if (WIFEXITED(status)) {
 					/* the child should return only failed or unresolved or passed */
 					if (ret != PTS_FAIL)
 						ret |= WEXITSTATUS(status);
 				}
 			}
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			output_fini();
 			exit(ret);
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("[parent] All children terminated\n");
-		#endif
+#endif
 
 		/* cancel the timeout thread */
 		ret = pthread_cancel(t_timer);
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			/* Strange error here... the thread cannot be terminated (app would be killed) */
 			UNRESOLVED(ret, "Failed to cancel the timeout handler");
 		}
 
 		/* join the timeout thread */
 		ret = pthread_join(t_timer, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the timeout handler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the timeout handler");
+		}
 
 		/* Destroy the datas */
 		ret = pthread_cond_destroy(&td->cnd);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the condvar");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the condvar");
+		}
 
 		ret = pthread_mutex_destroy(&td->mtx);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-1.c
index 7a7c69c..1e8c4da 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-1.c
@@ -22,13 +22,12 @@
 
 #define THREAD_NUM  3
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread[THREAD_NUM];
+pthread_t thread[THREAD_NUM];
 
 int start_num = 0;
 int waken_num = 0;
@@ -38,51 +37,61 @@
 {
 	int i;
 	printf("Error: failed to wakeup all threads\n");
-	for (i=0; i<THREAD_NUM; i++) {	/* cancel threads */
-	    	pthread_cancel(thread[i]);
+	for (i = 0; i < THREAD_NUM; i++) {	/* cancel threads */
+		pthread_cancel(thread[i]);
 	}
 
 	exit(PTS_UNRESOLVED);
 }
+
 void *thr_func(void *arg)
 {
 	int rc;
 	pthread_t self = pthread_self();
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to acquire the mutex\n", (void*)self);
+		fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
+			(void *)self);
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"[Thread 0x%p] started and locked the mutex\n", (void*)self);
-	start_num ++;
+	fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
+		(void *)self);
+	start_num++;
 
-	fprintf(stderr,"[Thread 0x%p] is waiting for the cond\n", (void*)self);
+	fprintf(stderr, "[Thread 0x%p] is waiting for the cond\n",
+		(void *)self);
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
-		fprintf(stderr,"pthread_cond_wait return %d\n", rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "pthread_cond_wait return %d\n", rc);
+		exit(PTS_UNRESOLVED);
 	}
 
 	if (pthread_mutex_trylock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] should be able to lock the recursive mutex again\n",
-				(void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"[Thread 0x%p] should be able to lock the recursive mutex again\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"[Thread 0x%p] was wakened and acquired the mutex again\n", (void*)self);
-	waken_num ++;
+	fprintf(stderr,
+		"[Thread 0x%p] was wakened and acquired the mutex again\n",
+		(void *)self);
+	waken_num++;
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to release the mutex\n", (void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] did not owned the mutex after the cond wait\n", (void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"[Thread 0x%p] did not owned the mutex after the cond wait\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"[Thread 0x%p] released the mutex\n", (void*)self);
+	fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
 	return NULL;
 }
 
@@ -93,26 +102,26 @@
 	pthread_mutexattr_t ma;
 
 	if (pthread_mutexattr_init(&ma) != 0) {
-		fprintf(stderr,"Fail to initialize mutex attribute\n");
+		fprintf(stderr, "Fail to initialize mutex attribute\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE) != 0) {
-		fprintf(stderr,"Fail to set the mutex attribute\n");
+		fprintf(stderr, "Fail to set the mutex attribute\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_mutex_init(&td.mutex, &ma) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
-			fprintf(stderr,"Fail to create thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
+			fprintf(stderr, "Fail to create thread[%d]\n", i);
 			return PTS_UNRESOLVED;
 		}
 	}
@@ -122,24 +131,25 @@
 	sleep(1);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
-	while (waken_num < THREAD_NUM) { /* waiting for all threads wakened */
-		fprintf(stderr,"[Main thread] signals a condition\n");
+	while (waken_num < THREAD_NUM) {	/* waiting for all threads wakened */
+		fprintf(stderr, "[Main thread] signals a condition\n");
 		if (pthread_cond_signal(&td.cond) != 0) {
-			fprintf(stderr,"Main failed to signal the condition\n");
+			fprintf(stderr,
+				"Main failed to signal the condition\n");
 			return PTS_UNRESOLVED;
 		}
 		usleep(100);
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_join(thread[i], NULL) != 0) {
-			fprintf(stderr,"Fail to join thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_join(thread[i], NULL) != 0) {
+			fprintf(stderr, "Fail to join thread[%d]\n", i);
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-2.c
index e1670c4..72f882a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-2.c
@@ -24,10 +24,9 @@
 #define THREAD_NUM  3
 #define TIMEOUT     THREAD_NUM * 2
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int start_num = 0;
@@ -37,82 +36,91 @@
 {
 	int rc;
 	struct timespec timeout;
-	struct timeval  curtime;
+	struct timeval curtime;
 	pthread_t self = pthread_self();
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to acquire the mutex\n", (void*)self);
+		fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
+			(void *)self);
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"[Thread 0x%p] started and locked the mutex\n", (void*)self);
-	start_num ++;
+	fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
+		(void *)self);
+	start_num++;
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec + TIMEOUT;
 	timeout.tv_nsec = curtime.tv_usec * 1000;
 
-	fprintf(stderr,"[Thread 0x%p] is waiting for the cond for at most %d secs\n",
-			(void*)self, TIMEOUT);
+	fprintf(stderr,
+		"[Thread 0x%p] is waiting for the cond for at most %d secs\n",
+		(void *)self, TIMEOUT);
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc != 0) {
-		fprintf(stderr,"[Thread 0x%p] pthread_cond_wait returned %d\n",
-				(void*)self, rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "[Thread 0x%p] pthread_cond_wait returned %d\n",
+			(void *)self, rc);
+		exit(PTS_UNRESOLVED);
 	}
 
 	if (pthread_mutex_trylock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] should be able to lock the recursive mutex again\n",
-				(void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"[Thread 0x%p] should be able to lock the recursive mutex again\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"[Thread 0x%p] was wakened and acquired the mutex again\n", (void*)self);
-	waken_num ++;
+	fprintf(stderr,
+		"[Thread 0x%p] was wakened and acquired the mutex again\n",
+		(void *)self);
+	waken_num++;
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to release the mutex\n", (void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] did not owned the mutex after the cond wait\n", (void*)self);
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"[Thread 0x%p] did not owned the mutex after the cond wait\n",
+			(void *)self);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"[Thread 0x%p] released the mutex\n", (void*)self);
+	fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
 	return NULL;
 }
 
 int main()
 {
 	int i;
-	pthread_t  thread[THREAD_NUM];
+	pthread_t thread[THREAD_NUM];
 	pthread_mutexattr_t ma;
 
 	if (pthread_mutexattr_init(&ma) != 0) {
-		fprintf(stderr,"Fail to initialize mutex attribute\n");
+		fprintf(stderr, "Fail to initialize mutex attribute\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE) != 0) {
-		fprintf(stderr,"Fail to set the mutex attribute\n");
+		fprintf(stderr, "Fail to set the mutex attribute\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_mutex_init(&td.mutex, &ma) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
-			fprintf(stderr,"Fail to create thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
+			fprintf(stderr, "Fail to create thread[%d]\n", i);
 			return PTS_UNRESOLVED;
 		}
 	}
@@ -121,18 +129,19 @@
 
 	sleep(1);
 
-	while (waken_num < THREAD_NUM) { /* waiting for all threads wakened */
-		fprintf(stderr,"[Main thread] signals a condition\n");
+	while (waken_num < THREAD_NUM) {	/* waiting for all threads wakened */
+		fprintf(stderr, "[Main thread] signals a condition\n");
 		if (pthread_cond_signal(&td.cond) != 0) {
-			fprintf(stderr,"Main failed to signal the condition\n");
+			fprintf(stderr,
+				"Main failed to signal the condition\n");
 			return PTS_UNRESOLVED;
 		}
 		sleep(1);
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_join(thread[i], NULL) != 0) {
-			fprintf(stderr,"Fail to join thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_join(thread[i], NULL) != 0) {
+			fprintf(stderr, "Fail to join thread[%d]\n", i);
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-1.c
index 7787cd9..7351369 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-1.c
@@ -21,13 +21,12 @@
 
 #define THREAD_NUM  5
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread[THREAD_NUM];
+pthread_t thread[THREAD_NUM];
 
 int start_num = 0;
 int waken_num = 0;
@@ -37,35 +36,39 @@
 {
 	int i;
 	printf("Error: failed to wakeup all threads\n");
-	for (i=0; i<THREAD_NUM; i++) {	/* cancel threads */
-	    	pthread_cancel(thread[i]);
+	for (i = 0; i < THREAD_NUM; i++) {	/* cancel threads */
+		pthread_cancel(thread[i]);
 	}
 
 	exit(PTS_UNRESOLVED);
 }
+
 void *thr_func(void *arg)
 {
 	int rc;
 	pthread_t self = pthread_self();
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to acquire the mutex\n", (void*)self);
+		fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
+			(void *)self);
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"[Thread 0x%p] started\n", (void*)self);
-	start_num ++;
+	fprintf(stderr, "[Thread 0x%p] started\n", (void *)self);
+	start_num++;
 
-	fprintf(stderr,"[Thread 0x%p] is waiting for the cond\n", (void*)self);
+	fprintf(stderr, "[Thread 0x%p] is waiting for the cond\n",
+		(void *)self);
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
-		fprintf(stderr,"pthread_cond_wait return %d\n", rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "pthread_cond_wait return %d\n", rc);
+		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"[Thread 0x%p] was wakened\n", (void*)self);
-	waken_num ++;
+	fprintf(stderr, "[Thread 0x%p] was wakened\n", (void *)self);
+	waken_num++;
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"[Thread 0x%p] failed to release the mutex\n", (void*)self);
+		fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
+			(void *)self);
 		exit(PTS_UNRESOLVED);
 	}
 	return NULL;
@@ -77,17 +80,17 @@
 	struct sigaction act;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
-			fprintf(stderr,"Fail to create thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
+			fprintf(stderr, "Fail to create thread[%d]\n", i);
 			exit(PTS_UNRESOLVED);
 		}
 	}
@@ -95,30 +98,29 @@
 		usleep(100);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
-	while (waken_num < THREAD_NUM) { /* loop to wake up all waiter threads */
-		fprintf(stderr,"[Main thread] signals a condition\n");
+	while (waken_num < THREAD_NUM) {	/* loop to wake up all waiter threads */
+		fprintf(stderr, "[Main thread] signals a condition\n");
 		rc = pthread_cond_signal(&td.cond);
 		if (rc == EINVAL) {
-			fprintf(stderr,"pthread_cond_signal returns EINVAL\n");
+			fprintf(stderr, "pthread_cond_signal returns EINVAL\n");
 			exit(PTS_UNRESOLVED);
-		}
-		else if (rc != 0) {
-			fprintf(stderr,"pthread_cond_signal returns %d\n",rc);
-  	              	printf("Test FAILED\n");
+		} else if (rc != 0) {
+			fprintf(stderr, "pthread_cond_signal returns %d\n", rc);
+			printf("Test FAILED\n");
 			exit(PTS_FAIL);
 		}
 		usleep(100);
 	}
 
-	for (i=0; i<THREAD_NUM; i++) {
-	    	if (pthread_join(thread[i], NULL) != 0) {
-			fprintf(stderr,"Fail to join thread[%d]\n", i);
+	for (i = 0; i < THREAD_NUM; i++) {
+		if (pthread_join(thread[i], NULL) != 0) {
+			fprintf(stderr, "Fail to join thread[%d]\n", i);
 			exit(PTS_UNRESOLVED);
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-2.c
index 26e4c98..0a931c8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-2.c
@@ -26,27 +26,27 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
- #include <time.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -77,54 +77,57 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-char woken=0;
-unsigned long count_cnd_sig=0, count_cnd_wup=0;
+char do_it = 1;
+char woken = 0;
+unsigned long count_cnd_sig = 0, count_cnd_wup = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
-struct
-{
+struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 } data;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 
@@ -136,64 +139,79 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* The following function will wait on the cond
  * it does check that no error code of EINTR is returned */
-void * waiter(void * arg)
+void *waiter(void *arg)
 {
 	int ret;
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
 	ret = pthread_mutex_lock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in waiter thread");
+	}
 
-	do
-	{
-		ret = pthread_cond_wait(&(data.cnd),&(data.mtx));
+	do {
+		ret = pthread_cond_wait(&(data.cnd), &(data.mtx));
 		count_cnd_wup++;
 	} while ((ret == 0) && (do_it != 0));
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "pthread_cond_wait returned an unexpected error");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "pthread_cond_wait returned an unexpected error");
 	}
 
 	woken++;
 
 	ret = pthread_mutex_unlock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");
+	}
 
 	return NULL;
 }
 
 /* The next function will signal the condition */
-void * worker (void * arg)
+void *worker(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
-	while (woken==0)
-	{
+	while (woken == 0) {
 		ret = pthread_cond_signal(&(data.cnd));
-		if (ret == EINTR)  {  FAILED("pthread_cond_signal returned EINTR");  }
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to signal the condition");  }
+		if (ret == EINTR) {
+			FAILED("pthread_cond_signal returned EINTR");
+		}
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to signal the condition");
+		}
 		count_cnd_sig++;
 	}
 
@@ -201,7 +219,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_waiter, th_worker, th_sig1, th_sig2;
@@ -211,37 +229,47 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
+	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread creation failed");
+	}
 
-	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread creation failed"); }
-
-	if ((ret = pthread_create(&th_worker, NULL, worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_worker, NULL, worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -250,34 +278,41 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
-	if ((ret = pthread_join(th_waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread join failed"); }
-	if ((ret = pthread_join(th_worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread join failed");
+	}
+	if ((ret = pthread_join(th_worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  Condition was signaled %d times.\n", count_cnd_sig);
 	output("  pthread_cond_wait exited %d times.\n", count_cnd_wup);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c
index b3d758d..b51fd98 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c
@@ -22,10 +22,9 @@
 
 #define TIMEOUT   5
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int t1_start = 0;
@@ -35,41 +34,42 @@
 {
 	int rc;
 	struct timespec timeout;
-	struct timeval  curtime;
+	struct timeval curtime;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1: Fail to acquire mutex\n");
+		fprintf(stderr, "Thread1: Fail to acquire mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec;
 	timeout.tv_nsec = curtime.tv_usec * 1000;
 	timeout.tv_sec += TIMEOUT;
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc != 0) {
 		if (rc == ETIMEDOUT) {
-			fprintf(stderr,"Thread1 stops waiting when time is out\n");
+			fprintf(stderr,
+				"Thread1 stops waiting when time is out\n");
+			exit(PTS_UNRESOLVED);
+		} else {
+			fprintf(stderr, "pthread_cond_timedwait return %d\n",
+				rc);
 			exit(PTS_UNRESOLVED);
 		}
-		else {
-			fprintf(stderr,"pthread_cond_timedwait return %d\n", rc);
-                	exit(PTS_UNRESOLVED);
-                }
 	}
 
-	fprintf(stderr,"Thread1 wakened up\n");
+	fprintf(stderr, "Thread1 wakened up\n");
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 did not block on the cond at all\n");
-                printf("Test FAILED\n");
-                exit(PTS_FAIL);
+		fprintf(stderr, "Thread1 did not block on the cond at all\n");
+		printf("Test FAILED\n");
+		exit(PTS_FAIL);
 	}
 	pthread_mutex_unlock(&td.mutex);
 	return NULL;
@@ -77,19 +77,19 @@
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 	while (!t1_start)	/* wait for thread1 started */
@@ -97,19 +97,19 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to acquire mutex\n");
+		fprintf(stderr, "Main: Fail to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to release mutex\n");
+		fprintf(stderr, "Main: Fail to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	sleep(1);
 
-	fprintf(stderr,"Time to wake up thread1 by signaling a condition\n");
+	fprintf(stderr, "Time to wake up thread1 by signaling a condition\n");
 	signaled = 1;
 	if (pthread_cond_signal(&td.cond) != 0) {
-		fprintf(stderr,"Main: Fail to signal cond\n");
+		fprintf(stderr, "Main: Fail to signal cond\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c
index 2f7377b..1e689ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c
@@ -29,10 +29,9 @@
 #define INTERVAL  1
 #define TIMEOUT   5
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int t1_start = 0;
@@ -42,72 +41,74 @@
 {
 	int rc;
 	struct timespec timeout;
-	struct timeval  curtime;
+	struct timeval curtime;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec + TIMEOUT;
 	timeout.tv_nsec = curtime.tv_usec * 1000;
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc != 0) {
 		if (rc == ETIMEDOUT) {
-			fprintf(stderr,"Thread1 stops waiting when time is out\n");
+			fprintf(stderr,
+				"Thread1 stops waiting when time is out\n");
+			exit(PTS_UNRESOLVED);
+		} else {
+			fprintf(stderr, "pthread_cond_timedwait return %d\n",
+				rc);
 			exit(PTS_UNRESOLVED);
 		}
-		else {
-			fprintf(stderr,"pthread_cond_timedwait return %d\n", rc);
-                	exit(PTS_UNRESOLVED);
-                }
 	}
 
-	fprintf(stderr,"Thread1 wakened\n");
+	fprintf(stderr, "Thread1 wakened\n");
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 did not block on the cond at all\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 did not block on the cond at all\n");
+		exit(PTS_UNRESOLVED);
 	}
 
 	if (pthread_mutex_trylock(&td.mutex) == 0) {
-		fprintf(stderr,"Thread1 should not be able to lock the mutex again\n");
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"Thread1 should not be able to lock the mutex again\n");
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"Thread1 failed to trylock the mutex (as expected)\n");
+	fprintf(stderr, "Thread1 failed to trylock the mutex (as expected)\n");
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to release the mutex\n");
-                printf("Test FAILED\n");
+		fprintf(stderr, "Thread1 failed to release the mutex\n");
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"Thread1 released the mutex\n");
+	fprintf(stderr, "Thread1 released the mutex\n");
 	return NULL;
 }
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 	while (!t1_start)	/* wait for thread1 started */
@@ -115,19 +116,19 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to acquire mutex\n");
+		fprintf(stderr, "Main failed to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to release mutex\n");
+		fprintf(stderr, "Main failed to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	sleep(INTERVAL);
 
-	fprintf(stderr,"Time to wake up thread1 by signaling a condition\n");
+	fprintf(stderr, "Time to wake up thread1 by signaling a condition\n");
 	signaled = 1;
 	if (pthread_cond_signal(&td.cond) != 0) {
-		fprintf(stderr,"Main failed to signal the condition\n");
+		fprintf(stderr, "Main failed to signal the condition\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c
index 6565700..714c5c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c
@@ -25,10 +25,9 @@
 #define INTERVAL  5
 #define TIMEOUT   1
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int t1_start = 0;
@@ -36,14 +35,14 @@
 void *t1_func(void *arg)
 {
 	int rc;
-	struct timeval  curtime;
+	struct timeval curtime;
 	struct timespec timeout;
 
-	fprintf(stderr,"Thread1 started\n");
+	fprintf(stderr, "Thread1 started\n");
 
 	/* Lock the mutex */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -51,8 +50,8 @@
 	t1_start = 1;
 
 	/* Set time for pthread_cond_timedwait to wait */
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec + TIMEOUT;
@@ -61,34 +60,35 @@
 	/* Thread will now release the mutex and wait on the condition variable */
 	/* The condition variable will not be signaled until AFTER the timeout
 	 * period, so we should receive an ETIMEDOUT error. */
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc == ETIMEDOUT) {
-		fprintf(stderr,"Thread1 stops waiting when time is out\n");
-		pthread_exit((void*)PTS_PASS);
+		fprintf(stderr, "Thread1 stops waiting when time is out\n");
+		pthread_exit((void *)PTS_PASS);
+	} else {
+		fprintf(stderr,
+			"Test FAILED: pthread_cond_timedwait return %d instead of ETIMEDOUT\n",
+			rc);
+		pthread_exit((void *)PTS_FAIL);
 	}
-	else {
-		fprintf(stderr,"Test FAILED: pthread_cond_timedwait return %d instead of ETIMEDOUT\n", rc);
-		pthread_exit((void*)PTS_FAIL);
-        }
 }
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 	int th_ret;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -97,11 +97,11 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to acquire mutex\n");
+		fprintf(stderr, "Main failed to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to release mutex\n");
+		fprintf(stderr, "Main failed to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -110,18 +110,15 @@
 	alarm(INTERVAL);
 
 	/* Wait for the thread to return. */
-	if (pthread_join(thread1, (void*)&th_ret) != 0)
-	{
+	if (pthread_join(thread1, (void *)&th_ret) != 0) {
 		fprintf(stderr, "Could not join the thread.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (th_ret == PTS_PASS)
-	{
+	if (th_ret == PTS_PASS) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c
index 61c05ce..cf07116 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c
@@ -24,10 +24,9 @@
 
 #define INTERVAL  2
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int t1_start = 0;
@@ -35,51 +34,52 @@
 void *t1_func(void *arg)
 {
 	int rc;
-	struct timeval  curtime;
+	struct timeval curtime;
 	struct timespec timeout;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec;
 	timeout.tv_nsec = 0;
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc == ETIMEDOUT) {
-		fprintf(stderr,"Thread1 stops waiting when time is out\n");
-		pthread_exit((void*)PTS_PASS);
-	}
-	else {
-		fprintf(stderr,"pthread_cond_timedwait return %d instead of ETIMEDOUT\n", rc);
+		fprintf(stderr, "Thread1 stops waiting when time is out\n");
+		pthread_exit((void *)PTS_PASS);
+	} else {
+		fprintf(stderr,
+			"pthread_cond_timedwait return %d instead of ETIMEDOUT\n",
+			rc);
 		exit(PTS_FAIL);
-        }
+	}
 }
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 	int rc, th_ret;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -88,32 +88,29 @@
 	alarm(5);
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(thread1, (void*)&th_ret) != 0)
-	{
+	if (pthread_join(thread1, (void *)&th_ret) != 0) {
 		fprintf(stderr, "Could not join the thread. \n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure pthread_cond_timedwait released and re-acquired the mutex
 	 * as it should. */
-	rc=pthread_mutex_trylock(&td.mutex);
+	rc = pthread_mutex_trylock(&td.mutex);
 	if (rc == 0) {
-		fprintf(stderr,"Test FAILED: Did not re-acquire mutex after timedout out call to pthread_cond_timedwait\n");
+		fprintf(stderr,
+			"Test FAILED: Did not re-acquire mutex after timedout out call to pthread_cond_timedwait\n");
 		return PTS_FAIL;
 	}
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to release mutex\n");
+		fprintf(stderr, "Main failed to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (th_ret == PTS_PASS)
-	{
+	if (th_ret == PTS_PASS) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else if (th_ret == PTS_FAIL)
-	{
+	} else if (th_ret == PTS_FAIL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	} else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c
index 9b0e7ac..71745bd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c
@@ -34,33 +34,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,7 +87,7 @@
 #endif
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -95,71 +95,106 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
-	clockid_t  cid; /* Clock id used by the cond var */
-	int type;       /* Mutex type */
-	int ctrl;   /* checkpoints */
-	int bool;   /* Boolean predicate for the condition */
-	int status; /* error code */
+	clockid_t cid;		/* Clock id used by the cond var */
+	int type;		/* Mutex type */
+	int ctrl;		/* checkpoints */
+	int bool;		/* Boolean predicate for the condition */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
 
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	struct timespec ts;
 
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* Lock the mutex */
 	ret = pthread_mutex_lock(&(td->mtx));
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Unable to lock the mutex");
 	}
@@ -169,92 +204,86 @@
 
 	/* Prepare the timeout parameter */
 	ret = clock_gettime(td->cid, &ts);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(errno, "[child] Unable get clock time");
 	}
 
 	ts.tv_sec += 10;
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[child] Will timeout at %i.%09i\n", ts.tv_sec, ts.tv_nsec);
-	#endif
+#endif
 
 	/* Enter the timed wait */
-	do
-	{
+	do {
 		ret = pthread_cond_timedwait(&(td->cnd), &(td->mtx), &ts);
 		td->ctrl = 2;
 	} while ((ret == 0) && (td->bool == 0));
 
 	td->ctrl = 3;
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Cond timedwait returned an error");
 	}
 
 	/* Make sure we are owning the mutex */
 	ret = pthread_mutex_trylock(&(td->mtx));
-	if (td->type == PTHREAD_MUTEX_RECURSIVE)
-	{
-		#if VERBOSE > 1
-		output("[child] Recursive mutex. Test if we are able to re-lock.\n");
-		#endif
-		if (ret != 0)
-		{
+	if (td->type == PTHREAD_MUTEX_RECURSIVE) {
+#if VERBOSE > 1
+		output
+		    ("[child] Recursive mutex. Test if we are able to re-lock.\n");
+#endif
+		if (ret != 0) {
 			td->status = ret;
 			FAILED("[child] Unable to relock the recursive mutex");
 		}
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			td->status = ret;
 			UNRESOLVED(ret, "[child] Failed to unlock the mutex");
 		}
-	}
-	else /* This was not a recursive mutex; the call must have failed */
-	{
-		if (ret == 0)
-		{
+	} else {		/* This was not a recursive mutex; the call must have failed */
+
+		if (ret == 0) {
 			td->status = -1;
-			FAILED("[child] Thread did not owned the mutex after the timedwait return.");
+			FAILED
+			    ("[child] Thread did not owned the mutex after the timedwait return.");
 		}
-		if (ret != EBUSY)
-		{
-			td-> status = ret;
-			UNRESOLVED(ret, "[child] Mutex trylock did not return EBUSY");
+		if (ret != EBUSY) {
+			td->status = ret;
+			UNRESOLVED(ret,
+				   "[child] Mutex trylock did not return EBUSY");
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("[child] The mutex was busy (normal).\n");
-		#endif
+#endif
 	}
 
 	ret = pthread_mutex_unlock(&(td->mtx));
-	if (ret != 0)
-	{
-		td->status=ret;
+	if (ret != 0) {
+		td->status = ret;
 		output("[child] Got error %i: %s\n", ret, strerror(ret));
-		FAILED("[child] Failed to unlock the mutex - owned by another thread?");
+		FAILED
+		    ("[child] Failed to unlock the mutex - owned by another thread?");
 	}
 
 	td->ctrl = 4;
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 	pthread_mutexattr_t ma;
 	pthread_condattr_t ca;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -264,9 +293,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -277,7 +306,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -285,202 +314,229 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_timedwait_3-2-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  */
-	for (i=0; i< (sizeof(scenarii) / sizeof(scenarii[0])); i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#endif
+	for (i = 0; i < (sizeof(scenarii) / sizeof(scenarii[0])); i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[i].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[i].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* initialize the condvar */
 		ret = pthread_cond_init(&(td->cnd), &ca);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Cond init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Cond init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		ret = pthread_condattr_getclock(&ca, &(td->cid));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read cond clock attribute");  }
-		#else
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read cond clock attribute");
+		}
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		ret = pthread_mutexattr_gettype(&ma, &(td->type));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read mutex type attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read mutex type attribute");
+		}
 
-		td->ctrl=0;
-		td->bool=0;
-		td->status=0;
+		td->ctrl = 0;
+		td->bool = 0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 
 		/* Create the child */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across two processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 1
+			if (child_pr == 0) {
+#if VERBOSE > 1
 				output("[child] Child process starting...\n");
-				#endif
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Note: in case of an error, the child process will be alive for 10 sec then exit. */
@@ -488,106 +544,126 @@
 		/* Child is now running and will enter the timedwait */
 		/* We are waiting for this; and we have to monitor the status value as well. */
 		ret = pthread_mutex_lock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
-
-		while ((td->ctrl == 0) && (td->status == 0))
-		{
-			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
-			sched_yield();
-			ret = pthread_mutex_lock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to lock the mutex");
 		}
 
-		if ((td->ctrl == 2) && (td->status == 0)) /* Spurious wakeups hapenned */
-		{
-			output("Spurious wake ups have happened. Maybe pthread_cond_timedwait is broken?\n");
+		while ((td->ctrl == 0) && (td->status == 0)) {
+			ret = pthread_mutex_unlock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to unlock the mutex");
+			}
+			sched_yield();
+			ret = pthread_mutex_lock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to lock the mutex");
+			}
+		}
+
+		if ((td->ctrl == 2) && (td->status == 0)) {	/* Spurious wakeups hapenned */
+			output
+			    ("Spurious wake ups have happened. Maybe pthread_cond_timedwait is broken?\n");
 			td->ctrl = 1;
 		}
 
-		if (td->ctrl == 1)/* The child is inside the cond timedwait */
-		{
+		if (td->ctrl == 1) {	/* The child is inside the cond timedwait */
 			ret = pthread_cond_signal(&(td->cnd));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to signal the condition");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to signal the condition");
+			}
 
 			/* Let the child leave the wait function if something is broken */
 			usleep(100);
 
-			if (td->ctrl != 1)
-			{
-				FAILED("[parent] Child went out from pthread_cond_timedwait without locking the mutex");
+			if (td->ctrl != 1) {
+				FAILED
+				    ("[parent] Child went out from pthread_cond_timedwait without locking the mutex");
 			}
 
 			/* Allow the child to continue */
-			td->bool=1;
+			td->bool = 1;
 		}
 
 		/* Let the child do its checking */
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to unlock the mutex");
+		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across two processes */
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(td->status , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(td->status,
+					   "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(td->status, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(td->status,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 /**********
  * Destroy the data
  */
- 		ret = pthread_cond_destroy(&(td->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var");  }
+		ret = pthread_cond_destroy(&(td->cnd));
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the cond var");
+		}
 
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
index c31ff33..8b53346 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
@@ -63,19 +63,19 @@
 #define NTHREADS (100)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 #ifndef WITHOUT_XOPEN
 
 struct _td {
-	pthread_mutex_t mtx1, mtx2; /* The two mutex m1 and m2 */
-	pthread_cond_t cnd;         /* The cond var c */
-	char boolcnd;               /* The boolean predicate b associated with c */
-	int type;                   /* Type of mutex */
-	clockid_t cid;              /* Clock used by cond c */
-	int started;                /* # of threads which are already waiting */
-	int stopped;                /* # of threads which are terminated */
+	pthread_mutex_t mtx1, mtx2;	/* The two mutex m1 and m2 */
+	pthread_cond_t cnd;	/* The cond var c */
+	char boolcnd;		/* The boolean predicate b associated with c */
+	int type;		/* Type of mutex */
+	clockid_t cid;		/* Clock used by cond c */
+	int started;		/* # of threads which are already waiting */
+	int stopped;		/* # of threads which are terminated */
 } data;
 
 void *threaded(void *arg)
@@ -113,7 +113,8 @@
 	if (data.type == PTHREAD_MUTEX_RECURSIVE) {
 		ret = pthread_mutex_trylock(&(data.mtx1));
 		if (ret != 0)
-			FAILED("Unable to re-lock recursive mutex after cond wait");
+			FAILED
+			    ("Unable to re-lock recursive mutex after cond wait");
 		ret = pthread_mutex_unlock(&(data.mtx1));
 		if (ret != 0)
 			UNRESOLVED(ret, "Mutex unlock failed");
@@ -146,11 +147,12 @@
 	/* Mark the thread as terminated while we are protected by m2 */
 	data.stopped++;
 
-	/* Test ownership and unlock m2*/
+	/* Test ownership and unlock m2 */
 	if (data.type == PTHREAD_MUTEX_RECURSIVE) {
 		ret = pthread_mutex_trylock(&(data.mtx2));
 		if (ret != 0)
-			FAILED("Unable to re-lock recursive mutex after cond wait");
+			FAILED
+			    ("Unable to re-lock recursive mutex after cond wait");
 		ret = pthread_mutex_unlock(&(data.mtx2));
 		if (ret != 0)
 			UNRESOLVED(ret, "Mutex unlock failed");
@@ -182,17 +184,24 @@
 		char *descr;	/* Description of the case */
 
 	} scenar[] = {
-	{0, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex"},
-	{0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex"},
-	#ifdef USE_ALTCLK
-	{1, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex + altclock cond"},
-	{1, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex + altclock cond"},
-	{1, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex + altclock cond"},
-	{1, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex + altclock cond"},
-	#endif
-	{0, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex"},
-	{0, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex"},
-	};
+		{
+		0, 0, PTHREAD_MUTEX_RECURSIVE, "Recursive mutex"}, {
+		0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex"},
+#ifdef USE_ALTCLK
+		{
+		1, 0, PTHREAD_MUTEX_RECURSIVE,
+			    "Recursive mutex + altclock cond"}, {
+		1, 0, PTHREAD_MUTEX_ERRORCHECK,
+			    "Errorcheck mutex + altclock cond"}, {
+		1, 1, PTHREAD_MUTEX_RECURSIVE,
+			    "Recursive pshared mutex + altclock cond"}, {
+		1, 1, PTHREAD_MUTEX_ERRORCHECK,
+			    "Errorcheck pshared mutex + altclock cond"},
+#endif
+		{
+		0, 1, PTHREAD_MUTEX_RECURSIVE, "Recursive pshared mutex"}, {
+	0, 1, PTHREAD_MUTEX_ERRORCHECK,
+			    "Errorcheck pshared mutex"},};
 
 	output_init();
 
@@ -209,18 +218,18 @@
 
 	pshared_ok = sysconf(_SC_THREAD_PROCESS_SHARED);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output(" Process-shared primitive %s be tested\n",
 	       (pshared_ok > 0) ? "will" : "won't");
 	output(" Alternative clock for cond %s be tested\n",
 	       (altclk_ok > 0) ? "will" : "won't");
-	#endif
+#endif
 
 	for (i = 0; i < (sizeof(scenar) / sizeof(scenar[0])); i++) {
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Starting test for %s\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Initialize the data structure */
 		ret = pthread_mutexattr_init(&ma);
@@ -232,9 +241,12 @@
 			UNRESOLVED(ret, "Unable to set mutex type");
 
 		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
-				UNRESOLVED(ret, "Unable to set mutex process-shared");
+				UNRESOLVED(ret,
+					   "Unable to set mutex process-shared");
 		}
 
 		ret = pthread_condattr_init(&ca);
@@ -242,18 +254,21 @@
 			UNRESOLVED(ret, "Cond attribute object init failed");
 
 		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
 			if (ret != 0)
-				UNRESOLVED(ret, "Unable to set cond process-shared");
+				UNRESOLVED(ret,
+					   "Unable to set cond process-shared");
 		}
-
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		if ((altclk_ok > 0) && (scenar[i].altclk != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
 			if (ret != 0)
-				UNRESOLVED(ret, "Unable to set alternative (monotonic) clock for cond");
+				UNRESOLVED(ret,
+					   "Unable to set alternative (monotonic) clock for cond");
 		}
-		#endif
+#endif
 
 		ret = pthread_mutex_init(&(data.mtx1), &ma);
 		if (ret != 0)
@@ -273,23 +288,26 @@
 		if (ret != 0)
 			UNRESOLVED(ret, "Unable to get type from mutex attr");
 
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		ret = pthread_condattr_getclock(&ca, &(data.cid));
 		if (ret != 0)
-			UNRESOLVED(ret, "Unable to get clock ID from cond attr");
-		#else
+			UNRESOLVED(ret,
+				   "Unable to get clock ID from cond attr");
+#else
 		data.cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		data.started = 0;
 		data.stopped = 0;
 
 		/* Start the threads */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Initialization OK, starting threads\n");
-		#endif
+#endif
 		for (j = 0; j < NTHREADS; j++) {
-			ret = pthread_create(&th[j], NULL, threaded, (void *)(long)(j & 1));
+			ret =
+			    pthread_create(&th[j], NULL, threaded,
+					   (void *)(long)(j & 1));
 			if (ret != 0)
 				UNRESOLVED(ret, "Thread creation failed");
 		}
@@ -302,7 +320,8 @@
 			loc_started = data.started;
 			ret = pthread_mutex_unlock(&(data.mtx1));
 			if (ret != 0)
-				UNRESOLVED(ret, "Unable to unlock m1 in parent");
+				UNRESOLVED(ret,
+					   "Unable to unlock m1 in parent");
 		} while (loc_started < NTHREADS);
 
 		/* Broadcast the condition until all threads are terminated */
@@ -318,7 +337,8 @@
 			loc_stopped = data.stopped;
 			ret = pthread_mutex_unlock(&(data.mtx2));
 			if (ret != 0)
-				UNRESOLVED(ret, "Unable to unlock m2 in parent");
+				UNRESOLVED(ret,
+					   "Unable to unlock m2 in parent");
 		} while (loc_stopped < NTHREADS);
 
 		/* Join the threads */
@@ -328,9 +348,9 @@
 				UNRESOLVED(ret, "Thread join failed");
 		}
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Test passed for %s\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Destroy data */
 		ret = pthread_cond_destroy(&(data.cnd));
@@ -352,7 +372,7 @@
 		ret = pthread_mutexattr_destroy(&ma);
 		if (ret != 0)
 			UNRESOLVED(ret, "Mutex attr destroy failed");
-	} /* Proceed to next case */
+	}			/* Proceed to next case */
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c
index 01fdab5..d515f2c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c
@@ -28,30 +28,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <time.h>
- #include <semaphore.h>
+#include <errno.h>
+#include <time.h>
+#include <semaphore.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -78,15 +78,14 @@
 #endif
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-struct
-{
+struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 	int type;
@@ -99,15 +98,20 @@
 /****  First handler that will be poped
  *  This one works only with recursive mutexes
  */
-void clnp1 (void * arg)
+void clnp1(void *arg)
 {
 	int ret;
-	if (data.type == PTHREAD_MUTEX_RECURSIVE)
-	{
+	if (data.type == PTHREAD_MUTEX_RECURSIVE) {
 		ret = pthread_mutex_trylock(&(data.mtx));
-		if (ret != 0)  {  FAILED("Unable to double-lock a recursive mutex in clean-up handler 1");  }
+		if (ret != 0) {
+			FAILED
+			    ("Unable to double-lock a recursive mutex in clean-up handler 1");
+		}
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock double-locked recursive mutex in clean-up handler 1");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to unlock double-locked recursive mutex in clean-up handler 1");
+		}
 	}
 	return;
 }
@@ -115,18 +119,22 @@
 /**** Second handler
  *  This one will trigger an action in main thread, while we are owning the mutex
  */
-void clnp2 (void * arg)
+void clnp2(void *arg)
 {
 	int ret;
 	do {
 		ret = sem_post(&(data.semA));
 	} while ((ret != 0) && (errno == EINTR));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in cleanup handler 2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem post failed in cleanup handler 2");
+	}
 
 	do {
 		ret = sem_wait(&(data.semB));
 	} while ((ret != 0) && (errno == EINTR));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in cleanup handler 2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem wait failed in cleanup handler 2");
+	}
 
 	return;
 }
@@ -134,17 +142,22 @@
 /**** Third handler
  *  Will actually unlock the mutex, then try to unlock second time to check an error is returned
  */
-void clnp3 (void * arg)
+void clnp3(void *arg)
 {
 	int ret;
 
 	ret = pthread_mutex_unlock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in clean-up handler 3");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex in clean-up handler 3");
+	}
 
-	if ((data.type == PTHREAD_MUTEX_ERRORCHECK) || (data.type == PTHREAD_MUTEX_RECURSIVE))
-	{
+	if ((data.type == PTHREAD_MUTEX_ERRORCHECK)
+	    || (data.type == PTHREAD_MUTEX_RECURSIVE)) {
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret == 0)  {  UNRESOLVED(ret, "Was able to unlock unlocked mutex in clean-up handler 3");  }
+		if (ret == 0) {
+			UNRESOLVED(ret,
+				   "Was able to unlock unlocked mutex in clean-up handler 3");
+		}
 	}
 
 	return;
@@ -154,35 +167,44 @@
  * This function will lock the mutex, then install the cleanup handlers
  * and wait for the cond. At this point it will be canceled.
  */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 
 	struct timespec ts;
 
 	ret = clock_gettime(data.cid, &ts);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to get time from clock");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to get time from clock");
+	}
 
 	ts.tv_sec += 30;
 
-	ret= pthread_mutex_lock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex in thread");  }
+	ret = pthread_mutex_lock(&(data.mtx));
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock the mutex in thread");
+	}
 
-        do {
-                ret = sem_post(&(data.semA));
-        } while ((ret != 0) && (errno == EINTR));
-        if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in thread");  }
+	do {
+		ret = sem_post(&(data.semA));
+	} while ((ret != 0) && (errno == EINTR));
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem post failed in thread");
+	}
 
-	pthread_cleanup_push (clnp3, NULL);
-	pthread_cleanup_push (clnp2, NULL);
-	pthread_cleanup_push (clnp1, NULL);
+	pthread_cleanup_push(clnp3, NULL);
+	pthread_cleanup_push(clnp2, NULL);
+	pthread_cleanup_push(clnp1, NULL);
 
 	do {
 		ret = pthread_cond_timedwait(&(data.cnd), &(data.mtx), &ts);
 	} while ((ret == 0) && (data.bool == 0));
 
-	if (ret != 0)  {  UNRESOLVED(ret , "Timedwait failed");  }  /* We will exit even if the error is timedwait */
+	if (ret != 0) {
+		UNRESOLVED(ret, "Timedwait failed");
+	}
 
+	/* We will exit even if the error is timedwait */
 	/* If we are here, the thread was not canceled */
 	FAILED("The thread has not been canceled");
 
@@ -193,10 +215,10 @@
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	void * rc;
+	void *rc;
 
 	pthread_mutexattr_t ma;
 	pthread_condattr_t ca;
@@ -204,31 +226,44 @@
 
 	long altclk_ok, pshared_ok;
 
-	struct
-	{
-		char altclk;  /* Want to use alternative clock */
-		char pshared; /* Want to use process-shared primitives */
-		int type;     /* mutex type */
-		char * descr; /* Description of the case */
+	struct {
+		char altclk;	/* Want to use alternative clock */
+		char pshared;	/* Want to use process-shared primitives */
+		int type;	/* mutex type */
+		char *descr;	/* Description of the case */
 
-	} scenar[] =
-	{ {0, 0, PTHREAD_MUTEX_NORMAL,     "Normal mutex" }
+	} scenar[] = { {
+	0, 0, PTHREAD_MUTEX_NORMAL, "Normal mutex"}
 #ifdef USE_ALTCLK
-	 ,{1, 0, PTHREAD_MUTEX_NORMAL,     "Normal mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_NORMAL,     "PShared mutex + altclock cond" }
+	, {
+	1, 0, PTHREAD_MUTEX_NORMAL, "Normal mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_NORMAL, "PShared mutex + altclock cond"}
 #endif
-	 ,{0, 1, PTHREAD_MUTEX_NORMAL,     "Pshared mutex" }
+	, {
+	0, 1, PTHREAD_MUTEX_NORMAL, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	 ,{0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex" }
-	 ,{0, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex"  }
+	, {
+	0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex"}
+	, {
+	0, 0, PTHREAD_MUTEX_RECURSIVE, "Recursive mutex"}
 #ifdef USE_ALTCLK
-	 ,{1, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex + altclock cond" }
-	 ,{1, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex + altclock cond" }
+	, {
+	1, 0, PTHREAD_MUTEX_RECURSIVE, "Recursive mutex + altclock cond"}
+	, {
+	1, 0, PTHREAD_MUTEX_ERRORCHECK,
+		    "Errorcheck mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_RECURSIVE,
+		    "Recursive pshared mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_ERRORCHECK,
+		    "Errorcheck pshared mutex + altclock cond"}
 #endif
-	 ,{0, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex" }
-	 ,{0, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex" }
+	, {
+	0, 1, PTHREAD_MUTEX_RECURSIVE, "Recursive pshared mutex"}
+	, {
+	0, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex"}
 #endif
 	};
 
@@ -240,152 +275,213 @@
 		altclk_ok = sysconf(_SC_MONOTONIC_CLOCK);
 #ifndef USE_ALTCLK
 	if (altclk_ok > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 	pshared_ok = sysconf(_SC_THREAD_PROCESS_SHARED);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
-	output(" Process-shared primitive %s be tested\n", (pshared_ok>0)?"will":"won't");
-	output(" Alternative clock for cond %s be tested\n", (altclk_ok>0)?"will":"won't");
-	#endif
+	output(" Process-shared primitive %s be tested\n",
+	       (pshared_ok > 0) ? "will" : "won't");
+	output(" Alternative clock for cond %s be tested\n",
+	       (altclk_ok > 0) ? "will" : "won't");
+#endif
 
 	ret = sem_init(&(data.semA), 0, 0);
-	if (ret != 0)  {  UNRESOLVED(errno, "Unable to init sem A");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to init sem A");
+	}
 
 	ret = sem_init(&(data.semB), 0, 0);
-	if (ret != 0)  {  UNRESOLVED(errno, "Unable to init sem B");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to init sem B");
+	}
 
-	for (i=0; i< (sizeof(scenar) / sizeof(scenar[0])); i++)
-	{
-		#if VERBOSE > 1
+	for (i = 0; i < (sizeof(scenar) / sizeof(scenar[0])); i++) {
+#if VERBOSE > 1
 		output("Starting test for %s\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Initialize the data structure */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex attribute object init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attribute object init failed");
+		}
 
 		ret = pthread_mutexattr_settype(&ma, scenar[i].type);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex type");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to set mutex type");
+		}
 
-		if ((pshared_ok > 0) && (scenar[i].pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex process-shared");  }
+		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set mutex process-shared");
+			}
 		}
 
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond attribute object init failed");  }
-
-		if ((pshared_ok > 0) && (scenar[i].pshared != 0))
-		{
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set cond process-shared");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond attribute object init failed");
 		}
 
-		#ifdef USE_ALTCLK
-		if ((altclk_ok > 0) && (scenar[i].altclk != 0))
-		{
+		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set cond process-shared");
+			}
+		}
+#ifdef USE_ALTCLK
+		if ((altclk_ok > 0) && (scenar[i].altclk != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set alternative (monotonic) clock for cond");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set alternative (monotonic) clock for cond");
+			}
 		}
-		#endif
+#endif
 
 		ret = pthread_mutex_init(&(data.mtx), &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to init mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to init mutex");
+		}
 
 		ret = pthread_cond_init(&(data.cnd), &ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize condvar");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to initialize condvar");
+		}
 
 		ret = pthread_mutexattr_gettype(&ma, &(data.type));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get type from mutex attr");  }
-
-		#ifdef USE_ALTCLK
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get type from mutex attr");
+		}
+#ifdef USE_ALTCLK
 		ret = pthread_condattr_getclock(&ca, &(data.cid));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock ID from cond attr");  }
-		#else
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to get clock ID from cond attr");
+		}
+#else
 		data.cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		data.bool = 0;
 
 		/** Data is ready, create the thread */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Initialization OK, starting thread\n");
-		#endif
+#endif
 
 		ret = pthread_create(&th, NULL, threaded, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Thread creation failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Thread creation failed");
+		}
 
-                /** Wait for the thread to be waiting */
-                do {
-                        ret = sem_wait(&(data.semA));
-                } while ((ret != 0) && (errno == EINTR));
-                if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in main");  }
+		/** Wait for the thread to be waiting */
+		do {
+			ret = sem_wait(&(data.semA));
+		} while ((ret != 0) && (errno == EINTR));
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem wait failed in main");
+		}
 
 		ret = pthread_mutex_lock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in main");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to lock mutex in main");
+		}
 
 		data.bool = 1;
 
 		/** Cancel the thread */
 		ret = pthread_cancel(th);
-		if (ret != 0)  {  UNRESOLVED(ret, "Thread cancelation failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Thread cancelation failed");
+		}
 
 		sched_yield();
-		#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 		usleep(100);
-		#endif
+#endif
 
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in main");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to unlock mutex in main");
+		}
 
 		/** Wait for the thread to be executing second cleanup handler */
 		do {
 			ret = sem_wait(&(data.semA));
 		} while ((ret != 0) && (errno == EINTR));
-		if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in main");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem wait failed in main");
+		}
 
 		/** Here the child should own the mutex, we check this */
 		ret = pthread_mutex_trylock(&(data.mtx));
-		if (ret == 0)  {  FAILED("The child did not own the mutex inside the cleanup handler");  }
+		if (ret == 0) {
+			FAILED
+			    ("The child did not own the mutex inside the cleanup handler");
+		}
 
 		/** Let the cleanups go on */
 		do {
 			ret = sem_post(&(data.semB));
 		} while ((ret != 0) && (errno == EINTR));
-		if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in main");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem post failed in main");
+		}
 
 		/** Join the thread */
 		ret = pthread_join(th, &rc);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to join the thread");  }
-		if (rc != PTHREAD_CANCELED)  {  FAILED("thread was not canceled");  }
-
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to join the thread");
+		}
+		if (rc != PTHREAD_CANCELED) {
+			FAILED("thread was not canceled");
+		}
+#if VERBOSE > 1
 		output("Test passed for %s\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Destroy datas */
 		ret = pthread_cond_destroy(&(data.cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond destroy failed");
+		}
 
 		ret = pthread_mutex_destroy(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex destroy failed");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond attribute destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond attribute destroy failed");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex attr destroy failed");  }
-	} /* Proceed to next case */
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attr destroy failed");
+		}
+	}			/* Proceed to next case */
 
 	ret = sem_destroy(&(data.semA));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem destroy failed");
+	}
 
 	ret = sem_destroy(&(data.semB));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem destroy failed");
+	}
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c
index 0a6728c..13ad2b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c
@@ -33,33 +33,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -85,10 +85,10 @@
 #define VERBOSE 1
 #endif
 
-#define TIMEOUT  (20)  /* Number of microseconds to wait */
+#define TIMEOUT  (20)		/* Number of microseconds to wait */
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -96,71 +96,106 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
-	clockid_t  cid; /* Clock id used by the cond var */
-	int type;       /* Mutex type */
-	int ctrl;   /* checkpoints */
-	int bool;   /* Boolean predicate for the condition */
-	int status; /* error code */
+	clockid_t cid;		/* Clock id used by the cond var */
+	int type;		/* Mutex type */
+	int ctrl;		/* checkpoints */
+	int bool;		/* Boolean predicate for the condition */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
 
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	struct timespec ts;
 
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* Lock the mutex */
 	ret = pthread_mutex_lock(&(td->mtx));
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Unable to lock the mutex");
 	}
@@ -170,97 +205,90 @@
 
 	/* Prepare the timeout parameter */
 	ret = clock_gettime(td->cid, &ts);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(errno, "[child] Unable get clock time");
 	}
 
 	/* Compute the timeout */
 	ts.tv_nsec += TIMEOUT * 1000;
-	if (ts.tv_nsec >= 1000000000)
-	{
+	if (ts.tv_nsec >= 1000000000) {
 		ts.tv_sec++;
 		ts.tv_nsec -= 1000000000;
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[child] Will timeout at %i.%09i\n", ts.tv_sec, ts.tv_nsec);
-	#endif
+#endif
 
 	/* Enter the timed wait */
-	do
-	{
+	do {
 		ret = pthread_cond_timedwait(&(td->cnd), &(td->mtx), &ts);
 		td->ctrl = 2;
 	} while ((ret == 0) && (td->bool == 0));
 
 	td->ctrl = 3;
 
-	if (ret != ETIMEDOUT)
-	{
+	if (ret != ETIMEDOUT) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Cond timedwait returned an error");
 	}
 
 	/* Make sure we are owning the mutex */
 	ret = pthread_mutex_trylock(&(td->mtx));
-	if (td->type == PTHREAD_MUTEX_RECURSIVE)
-	{
-		#if VERBOSE > 1
-		output("[child] Recursive mutex. Test if we are able to re-lock.\n");
-		#endif
-		if (ret != 0)
-		{
+	if (td->type == PTHREAD_MUTEX_RECURSIVE) {
+#if VERBOSE > 1
+		output
+		    ("[child] Recursive mutex. Test if we are able to re-lock.\n");
+#endif
+		if (ret != 0) {
 			td->status = ret;
 			FAILED("[child] Unable to relock the recursive mutex");
 		}
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			td->status = ret;
 			UNRESOLVED(ret, "[child] Failed to unlock the mutex");
 		}
-	}
-	else /* This was not a recursive mutex; the call must have failed */
-	{
-		if (ret == 0)
-		{
+	} else {		/* This was not a recursive mutex; the call must have failed */
+
+		if (ret == 0) {
 			td->status = -1;
-			FAILED("[child] Thread did not owned the mutex after the timedwait return.");
+			FAILED
+			    ("[child] Thread did not owned the mutex after the timedwait return.");
 		}
-		if (ret != EBUSY)
-		{
-			td-> status = ret;
-			UNRESOLVED(ret, "[child] Mutex trylock did not return EBUSY");
+		if (ret != EBUSY) {
+			td->status = ret;
+			UNRESOLVED(ret,
+				   "[child] Mutex trylock did not return EBUSY");
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("[child] The mutex was busy (normal).\n");
-		#endif
+#endif
 	}
 
 	ret = pthread_mutex_unlock(&(td->mtx));
-	if (ret != 0)
-	{
-		td->status=ret;
+	if (ret != 0) {
+		td->status = ret;
 		output("[child] Got error %i: %s\n", ret, strerror(ret));
-		FAILED("[child] Failed to unlock the mutex - owned by another thread?");
+		FAILED
+		    ("[child] Failed to unlock the mutex - owned by another thread?");
 	}
 
 	td->ctrl = 4;
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 	pthread_mutexattr_t ma;
 	pthread_condattr_t ca;
 
-	testdata_t * td;
+	testdata_t *td;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -270,9 +298,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -283,210 +311,236 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
 		cs = -1;
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		testdata_t alternativ;
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_timedwait_2-4-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  */
-	for (i=0; i< (sizeof(scenarii) / sizeof(scenarii[0])); i++)
-	{
-		#if VERBOSE > 1
+	for (i = 0; i < (sizeof(scenarii) / sizeof(scenarii[0])); i++) {
+#if VERBOSE > 1
 		output("[parent] Preparing attributes for scenario %i\n", i);
-		#endif
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[i].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[i].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* initialize the condvar */
 		ret = pthread_cond_init(&(td->cnd), &ca);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Cond init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Cond init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		ret = pthread_condattr_getclock(&ca, &(td->cid));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read cond clock attribute");  }
-		#else
-		td->cid=CLOCK_REALTIME;
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read cond clock attribute");
+		}
+#else
+		td->cid = CLOCK_REALTIME;
+#endif
 
 		ret = pthread_mutexattr_gettype(&ma, &(td->type));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read mutex type attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read mutex type attribute");
+		}
 
-		td->ctrl=0;
-		td->bool=0;
-		td->status=0;
+		td->ctrl = 0;
+		td->bool = 0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 
 		/* Create the child */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across two processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 1
+			if (child_pr == 0) {
+#if VERBOSE > 1
 				output("[child] Child process starting...\n");
-				#endif
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Note: in case of an error, the child process will be alive for 1 sec then exit. */
@@ -494,105 +548,123 @@
 		/* Child is now running and will enter the timedwait */
 		/* We are waiting for this; and we have to monitor the status value as well. */
 		ret = pthread_mutex_lock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
-
-		while ((td->ctrl == 0) && (td->status == 0))
-		{
-			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
-			sched_yield();
-			ret = pthread_mutex_lock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to lock the mutex");
 		}
 
-		if ((td->ctrl == 2) && (td->status == 0)) /* Spurious wakeups hapenned */
-		{
-			output("Spurious wake ups have happened. Maybe pthread_cond_timedwait is broken?\n");
+		while ((td->ctrl == 0) && (td->status == 0)) {
+			ret = pthread_mutex_unlock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to unlock the mutex");
+			}
+			sched_yield();
+			ret = pthread_mutex_lock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to lock the mutex");
+			}
+		}
+
+		if ((td->ctrl == 2) && (td->status == 0)) {	/* Spurious wakeups hapenned */
+			output
+			    ("Spurious wake ups have happened. Maybe pthread_cond_timedwait is broken?\n");
 			td->ctrl = 1;
 		}
 
-		if (td->ctrl == 1)/* The child is inside the cond timedwait */
-		{
-			#if VERBOSE > 1
-			output("[parent] Child has not timedout yet, we will wait.\n");
-			#endif
+		if (td->ctrl == 1) {	/* The child is inside the cond timedwait */
+#if VERBOSE > 1
+			output
+			    ("[parent] Child has not timedout yet, we will wait.\n");
+#endif
 
 			/* Let the child leave the wait function if something is broken */
 			usleep(TIMEOUT);
 
-			if (td->ctrl != 1)
-			{
-				FAILED("[parent] Child went out from pthread_cond_timedwait without locking the mutex");
+			if (td->ctrl != 1) {
+				FAILED
+				    ("[parent] Child went out from pthread_cond_timedwait without locking the mutex");
 			}
 
 		}
 
 		/* Let the child do its checking */
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to unlock the mutex");
+		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across two processes */
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(td->status , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(td->status,
+					   "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(td->status, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(td->status,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 /**********
  * Destroy the data
  */
- 		ret = pthread_cond_destroy(&(td->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var");  }
+		ret = pthread_cond_destroy(&(td->cnd));
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the cond var");
+		}
 
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c
index 7b72f88..f2630e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c
@@ -22,10 +22,9 @@
 #define INTERVAL  1
 #define TIMEOUT   5
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 int t1_start = 0;
@@ -35,65 +34,66 @@
 {
 	int rc;
 	struct timespec timeout;
-	struct timeval  curtime;
+	struct timeval curtime;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec + TIMEOUT;
 	timeout.tv_nsec = curtime.tv_usec * 1000;
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc != 0) {
 		if (rc == ETIMEDOUT) {
-			fprintf(stderr,"Thread1 stops waiting when time is out\n");
+			fprintf(stderr,
+				"Thread1 stops waiting when time is out\n");
 			exit(PTS_UNRESOLVED);
-		}
-		else {
-			fprintf(stderr,"pthread_cond_timedwait return %d\n", rc);
-	                printf("Test FAILED\n");
+		} else {
+			fprintf(stderr, "pthread_cond_timedwait return %d\n",
+				rc);
+			printf("Test FAILED\n");
 			exit(PTS_FAIL);
-                }
+		}
 	}
 
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 did not block on the cond at all\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 did not block on the cond at all\n");
+		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 wakened and got returned value 0\n");
+	fprintf(stderr, "Thread1 wakened and got returned value 0\n");
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to release the mutex\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 failed to release the mutex\n");
+		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 released the mutex\n");
+	fprintf(stderr, "Thread1 released the mutex\n");
 	return NULL;
 }
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 	while (!t1_start)	/* wait for thread1 started */
@@ -101,19 +101,19 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to acquire mutex\n");
+		fprintf(stderr, "Main failed to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to release mutex\n");
+		fprintf(stderr, "Main failed to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	sleep(INTERVAL);
 
-	fprintf(stderr,"Time to wake up thread1 by signaling a condition\n");
+	fprintf(stderr, "Time to wake up thread1 by signaling a condition\n");
 	signaled = 1;
 	if (pthread_cond_signal(&td.cond) != 0) {
-		fprintf(stderr,"Main failed to signal the condition\n");
+		fprintf(stderr, "Main failed to signal the condition\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c
index 15cf871..b18cb8f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c
@@ -22,66 +22,67 @@
 
 #define TIMEOUT   3
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
 void *t1_func(void *arg)
 {
 	int rc;
 	struct timespec timeout;
-	struct timeval  curtime;
+	struct timeval curtime;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
+	fprintf(stderr, "Thread1 started\n");
 
-	if (gettimeofday(&curtime, NULL) !=0) {
-		fprintf(stderr,"Fail to get current time\n");
+	if (gettimeofday(&curtime, NULL) != 0) {
+		fprintf(stderr, "Fail to get current time\n");
 		exit(PTS_UNRESOLVED);
 	}
 	timeout.tv_sec = curtime.tv_sec + TIMEOUT;
 	timeout.tv_nsec = curtime.tv_usec * 1000;
 
-	fprintf(stderr,"Thread1 is waiting for the cond for %d seconds\n", TIMEOUT);
+	fprintf(stderr, "Thread1 is waiting for the cond for %d seconds\n",
+		TIMEOUT);
 	rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
 	if (rc == ETIMEDOUT) {
-		fprintf(stderr,"Thread1 stops waiting when time is out\n");
+		fprintf(stderr, "Thread1 stops waiting when time is out\n");
 		printf("Test PASSED\n");
 		exit(PTS_PASS);
-	}
-	else {
-		fprintf(stderr,"pthread_cond_timedwait return %d instead of ETIMEDOUT\n", rc);
-                printf("Test FAILED\n");
+	} else {
+		fprintf(stderr,
+			"pthread_cond_timedwait return %d instead of ETIMEDOUT\n",
+			rc);
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
-        }
+	}
 }
 
 int main()
 {
-	pthread_t  thread1;
+	pthread_t thread1;
 	int th_ret;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 
-	fprintf(stderr,"Main: no condition is going to be met\n");
+	fprintf(stderr, "Main: no condition is going to be met\n");
 
-	pthread_join(thread1, (void*)&th_ret);
+	pthread_join(thread1, (void *)&th_ret);
 	return th_ret;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c
index 7d2ab95..2a87489 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c
@@ -34,33 +34,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -89,7 +89,7 @@
 #define NCHILDREN (20)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -97,79 +97,116 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
-	int ctrl;   /* Control value */
-	int gotit;  /* Thread locked the mutex while ctrl == 0 */
-	int status; /* error code */
+	int ctrl;		/* Control value */
+	int gotit;		/* Thread locked the mutex while ctrl == 0 */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
 
 struct {
-	long sec_val;          /* Value for seconds */
-	short sec_is_offset;   /* Seconds value is added to current time or is absolute */
-	long nsec_val;         /* Value for nanoseconds */
-	short nsec_is_offset;  /* Nanoseconds value is added to current time or is absolute */
-}
-junks_ts[]={
-	 {          -2 , 1,  1000000000, 1 }
-	,{          -2 , 1,          -1, 0 }
-	,{          -3 , 1,  2000000000, 0 }
+	long sec_val;		/* Value for seconds */
+	short sec_is_offset;	/* Seconds value is added to current time or is absolute */
+	long nsec_val;		/* Value for nanoseconds */
+	short nsec_is_offset;	/* Nanoseconds value is added to current time or is absolute */
+} junks_ts[] = {
+	{
+	-2, 1, 1000000000, 1}
+	, {
+	-2, 1, -1, 0}
+	, {
+	-3, 1, 2000000000, 0}
 };
 
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* Lock the mutex */
 	ret = pthread_mutex_lock(&(td->mtx));
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Unable to lock the mutex");
 	}
@@ -180,15 +217,14 @@
 
 	/* Unlock and exit */
 	ret = pthread_mutex_unlock(&(td->mtx));
-	if (ret != 0)
-	{
-		td->status=ret;
+	if (ret != 0) {
+		td->status = ret;
 		UNRESOLVED(ret, "[child] Failed to unlock the mutex.");
 	}
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j, k;
 	pthread_mutexattr_t ma;
@@ -197,7 +233,7 @@
 	clockid_t cid = CLOCK_REALTIME;
 	struct timespec ts, ts_junk;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
@@ -212,9 +248,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -225,7 +261,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -233,290 +269,348 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_timedwait_2-4-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  * Do the whole thing for each time to test.
  */
-	for (i=0; i< (sizeof(scenarii) / sizeof(scenarii[0])); i++)
-	{
-		for (j=0; j< (sizeof(junks_ts) / sizeof(junks_ts[0])); j++)
-		{
-			#if VERBOSE > 1
-			output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-			#endif
+	for (i = 0; i < (sizeof(scenarii) / sizeof(scenarii[0])); i++) {
+		for (j = 0; j < (sizeof(junks_ts) / sizeof(junks_ts[0])); j++) {
+#if VERBOSE > 1
+			output("[parent] Preparing attributes for: %s\n",
+			       scenarii[i].descr);
+#endif
 			/* set / reset everything */
-			do_fork=0;
+			do_fork = 0;
 			ret = pthread_mutexattr_init(&ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to initialize the mutex attribute object");
+			}
 			ret = pthread_condattr_init(&ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to initialize the cond attribute object");
+			}
 
 			/* Set the mutex type */
-			ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-			#if VERBOSE > 1
-			output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-			#endif
+			ret =
+			    pthread_mutexattr_settype(&ma, scenarii[i].m_type);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set mutex type");
+			}
+#if VERBOSE > 1
+			output("[parent] Mutex type : %i\n",
+			       scenarii[i].m_type);
+#endif
 
 			/* Set the pshared attributes, if supported */
-			if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-			{
-				ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-				if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-				ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-				if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-				#if VERBOSE > 1
-				output("[parent] Mutex & cond are process-shared\n");
-				#endif
+			if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+				ret =
+				    pthread_mutexattr_setpshared(&ma,
+								 PTHREAD_PROCESS_SHARED);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "[parent] Unable to set the mutex process-shared");
+				}
+				ret =
+				    pthread_condattr_setpshared(&ca,
+								PTHREAD_PROCESS_SHARED);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "[parent] Unable to set the cond var process-shared");
+				}
+#if VERBOSE > 1
+				output
+				    ("[parent] Mutex & cond are process-shared\n");
+#endif
 			}
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			else {
-				output("[parent] Mutex & cond are process-private\n");
+				output
+				    ("[parent] Mutex & cond are process-private\n");
 			}
-			#endif
+#endif
 
 			/* Set the alternative clock, if supported */
-			#ifdef USE_ALTCLK
-			if ((cs > 0) && (scenarii[i].c_clock != 0))
-			{
-				ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-				if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-				#if VERBOSE > 1
-				output("[parent] Cond uses the Monotonic clock\n");
-				#endif
+#ifdef USE_ALTCLK
+			if ((cs > 0) && (scenarii[i].c_clock != 0)) {
+				ret =
+				    pthread_condattr_setclock(&ca,
+							      CLOCK_MONOTONIC);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "[parent] Unable to set the monotonic clock for the cond");
+				}
+#if VERBOSE > 1
+				output
+				    ("[parent] Cond uses the Monotonic clock\n");
+#endif
 			}
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			else {
-				output("[parent] Cond uses the default clock\n");
+				output
+				    ("[parent] Cond uses the default clock\n");
 			}
-			#endif
+#endif
 			ret = pthread_condattr_getclock(&ca, &cid);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-			#endif
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get clock from cond attr");
+			}
+#endif
 
 			/* Tell whether the test will be across processes */
-			if ((pshared > 0) && (scenarii[i].fork != 0))
-			{
+			if ((pshared > 0) && (scenarii[i].fork != 0)) {
 				do_fork = 1;
-				#if VERBOSE > 1
-				output("[parent] Child will be a new process\n");
-				#endif
+#if VERBOSE > 1
+				output
+				    ("[parent] Child will be a new process\n");
+#endif
 			}
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			else {
 				output("[parent] Child will be a new thread\n");
 			}
-			#endif
+#endif
 
 			/* initialize the condvar */
 			ret = pthread_cond_init(&cnd, &ca);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "[parent] Cond init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Cond init failed");
+			}
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 			/* Initialize the mutex */
 			ret = pthread_mutex_init(&(td->mtx), &ma);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Mutex init failed");
+			}
 
 			/* Initialize the other datas from the test structure */
-			td->ctrl=0;
-			td->gotit=0;
-			td->status=0;
+			td->ctrl = 0;
+			td->gotit = 0;
+			td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 			/* Lock the mutex before creating children */
 			ret = pthread_mutex_lock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to lock the mutex");
+			}
 
 			/* Create the children */
-			if (do_fork != 0)
-			{
+			if (do_fork != 0) {
 				/* We are testing across processes */
-				for (k=0; k<NCHILDREN; k++)
-				{
+				for (k = 0; k < NCHILDREN; k++) {
 					child_pr[k] = fork();
-					if (child_pr[k] == -1)
-					{  UNRESOLVED(errno, "[parent] Fork failed");  }
+					if (child_pr[k] == -1) {
+						UNRESOLVED(errno,
+							   "[parent] Fork failed");
+					}
 
-					if (child_pr[k] == 0)
-					{
-						#if VERBOSE > 3
-						output("[child] Child process %i starting...\n", k);
-						#endif
+					if (child_pr[k] == 0) {
+#if VERBOSE > 3
+						output
+						    ("[child] Child process %i starting...\n",
+						     k);
+#endif
 
-						if (tf((void *)td) != NULL)
-						{
-							UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-						}
-						else
-						{
+						if (tf((void *)td) != NULL) {
+							UNRESOLVED(-1,
+								   "[child] Got an unexpected return value from test function");
+						} else {
 							/* We cannot use the PASSED macro here since it would terminate the output */
-							exit (0);
+							exit(0);
 						}
 					}
 				}
 				/* Only the parent process goes further */
-			}
-			else /* do_fork == 0 */
-			{
+			} else {	/* do_fork == 0 */
+
 				/* We are testing across two threads */
-				for (k=0; k<NCHILDREN; k++)
-				{
-					ret = pthread_create(&child_th[k], NULL, tf, td);
-					if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+				for (k = 0; k < NCHILDREN; k++) {
+					ret =
+					    pthread_create(&child_th[k], NULL,
+							   tf, td);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "[parent] Unable to create the child thread.");
+					}
 				}
 			}
 
-			/* Children are now running and trying to lock the mutex.*/
+			/* Children are now running and trying to lock the mutex. */
 
 			ret = clock_gettime(cid, &ts);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to read clock");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to read clock");
+			}
 
 			/* Do the junk timedwaits */
-			ts_junk.tv_sec = junks_ts[j].sec_val + (junks_ts[j].sec_is_offset?ts.tv_sec:0) ;
-			ts_junk.tv_nsec = junks_ts[j].nsec_val + (junks_ts[j].nsec_is_offset?ts.tv_nsec:0) ;
+			ts_junk.tv_sec =
+			    junks_ts[j].sec_val +
+			    (junks_ts[j].sec_is_offset ? ts.tv_sec : 0);
+			ts_junk.tv_nsec =
+			    junks_ts[j].nsec_val +
+			    (junks_ts[j].nsec_is_offset ? ts.tv_nsec : 0);
 
-			#if VERBOSE > 2
+#if VERBOSE > 2
 			output("TS: s = %s%li ; ns = %s%li\n",
-				junks_ts[j].sec_is_offset?"n + ":" ",
-				junks_ts[j].sec_val,
-				junks_ts[j].nsec_is_offset?"n + ":" ",
-				junks_ts[j].nsec_val);
+			       junks_ts[j].sec_is_offset ? "n + " : " ",
+			       junks_ts[j].sec_val,
+			       junks_ts[j].nsec_is_offset ? "n + " : " ",
+			       junks_ts[j].nsec_val);
 			output("Now is: %i.%09li\n", ts.tv_sec, ts.tv_nsec);
-			output("Junk is: %i.%09li\n", ts_junk.tv_sec, ts_junk.tv_nsec);
-			#endif
+			output("Junk is: %i.%09li\n", ts_junk.tv_sec,
+			       ts_junk.tv_nsec);
+#endif
 
 			do {
-				ret = pthread_cond_timedwait(&cnd, &(td->mtx), &ts_junk);
+				ret =
+				    pthread_cond_timedwait(&cnd, &(td->mtx),
+							   &ts_junk);
 			} while (ret == 0);
-			#if VERBOSE > 2
-			output("timedwait returns %d (%s) - gotit = %d\n", ret, strerror(ret), td->gotit);
-			#endif
+#if VERBOSE > 2
+			output("timedwait returns %d (%s) - gotit = %d\n", ret,
+			       strerror(ret), td->gotit);
+#endif
 
 			/* check that when EINVAL is returned, the mutex has not been released */
-			if (ret == EINVAL)
-			{
-				if (td->gotit != 0)
-				{
-					FAILED("The mutex was released when an invalid timestamp was detected in the function");
+			if (ret == EINVAL) {
+				if (td->gotit != 0) {
+					FAILED
+					    ("The mutex was released when an invalid timestamp was detected in the function");
 				}
-			#if VERBOSE > 0
+#if VERBOSE > 0
 			} else {
-				output("Warning, struct timespec with tv_sec = %i and tv_nsec = %li was not invalid\n", ts_junk.tv_sec, ts_junk.tv_nsec);
+				output
+				    ("Warning, struct timespec with tv_sec = %i and tv_nsec = %li was not invalid\n",
+				     ts_junk.tv_sec, ts_junk.tv_nsec);
 			}
-			#endif
+#endif
 
 			/* Finally unlock the mutex */
 			td->ctrl = 1;
 			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to unlock the mutex");
+			}
 
 			/* Wait for the child to terminate */
-			if (do_fork != 0)
-			{
+			if (do_fork != 0) {
 				/* We were testing across processes */
 				ret = 0;
-				for (k=0; k< NCHILDREN; k++)
-				{
-					chkpid = waitpid(child_pr[k], &status, 0);
-					if (chkpid != child_pr[k])
-					{
-						output("Expected pid: %i. Got %i\n", (int)child_pr[k], (int)chkpid);
-						UNRESOLVED(errno, "Waitpid failed");
+				for (k = 0; k < NCHILDREN; k++) {
+					chkpid =
+					    waitpid(child_pr[k], &status, 0);
+					if (chkpid != child_pr[k]) {
+						output
+						    ("Expected pid: %i. Got %i\n",
+						     (int)child_pr[k],
+						     (int)chkpid);
+						UNRESOLVED(errno,
+							   "Waitpid failed");
 					}
-					if (WIFSIGNALED(status))
-					{
-						output("Child process killed with signal %d\n",WTERMSIG(status));
-						UNRESOLVED(-1 , "Child process was killed");
+					if (WIFSIGNALED(status)) {
+						output
+						    ("Child process killed with signal %d\n",
+						     WTERMSIG(status));
+						UNRESOLVED(-1,
+							   "Child process was killed");
 					}
 
-					if (WIFEXITED(status))
-					{
+					if (WIFEXITED(status)) {
 						ret |= WEXITSTATUS(status);
-					}
-					else
-					{
-						UNRESOLVED(-1, "Child process was neither killed nor exited");
+					} else {
+						UNRESOLVED(-1,
+							   "Child process was neither killed nor exited");
 					}
 				}
-				if (ret != 0)
-				{
-					exit(ret); /* Output has already been closed in child */
+				if (ret != 0) {
+					exit(ret);	/* Output has already been closed in child */
 				}
 
-			}
-			else /* child was a thread */
-			{
-				for (k=0; k<NCHILDREN; k++)
-				{
+			} else {	/* child was a thread */
+
+				for (k = 0; k < NCHILDREN; k++) {
 					ret = pthread_join(child_th[k], NULL);
-					if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "[parent] Unable to join the thread");
+					}
 				}
 			}
 
@@ -524,29 +618,40 @@
  * Destroy the data
  */
 			ret = pthread_cond_destroy(&cnd);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to destroy the cond var");
+			}
 
 			ret = pthread_mutex_destroy(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to destroy the mutex");
+			}
 
 			ret = pthread_condattr_destroy(&ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to destroy the cond var attribute object");
+			}
 
 			ret = pthread_mutexattr_destroy(&ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to destroy the mutex attribute object");
+			}
 
-		} /* Proceed to the next junk timedwait value */
-	}  /* Proceed to the next scenario */
+		}		/* Proceed to the next junk timedwait value */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c
index ba4d247..bafa771 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c
@@ -28,27 +28,27 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
- #include <time.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -75,60 +75,63 @@
 #define VERBOSE 2
 #endif
 
-#define TIMEOUT (1000) /* ns, timeout parameter for pthread_cond_timedwait */
-#define INTERVAL (700) /* ns, frequency (actually, period) for the condition signaling */
+#define TIMEOUT (1000)		/* ns, timeout parameter for pthread_cond_timedwait */
+#define INTERVAL (700)		/* ns, frequency (actually, period) for the condition signaling */
 
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-unsigned long count_cnd_sig=0, count_cnd_wup=0;
+char do_it = 1;
+unsigned long count_cnd_sig = 0, count_cnd_wup = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
-struct
-{
+struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 } data;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 
@@ -140,97 +143,112 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* The following function will timedwait on the cond
  * it does check that no error code of EINTR is returned */
-void * waiter(void * arg)
+void *waiter(void *arg)
 {
 	int ret;
 	struct timespec ts;
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
 	ret = pthread_mutex_lock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in waiter thread");
+	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		ret = clock_gettime(CLOCK_REALTIME, &ts);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get system time");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get system time");
+		}
 
 		ts.tv_nsec += TIMEOUT;
-		while (ts.tv_nsec >= 1000000000)
-		{
+		while (ts.tv_nsec >= 1000000000) {
 			ts.tv_nsec -= 1000000000;
 			ts.tv_sec += 1;
 		}
 
-		do
-		{
-			ret = pthread_cond_timedwait(&(data.cnd),&(data.mtx),&ts);
+		do {
+			ret =
+			    pthread_cond_timedwait(&(data.cnd), &(data.mtx),
+						   &ts);
 			count_cnd_wup++;
 		} while (ret == 0);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_cond_timedwait returned EINTR");
 		}
 
-		if (ret != ETIMEDOUT)
-		{
-			UNRESOLVED(ret, "pthread_cond_timedwait returned an unexpected error");
+		if (ret != ETIMEDOUT) {
+			UNRESOLVED(ret,
+				   "pthread_cond_timedwait returned an unexpected error");
 		}
 	}
 
 	ret = pthread_mutex_unlock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");
+	}
 
 	return NULL;
 }
 
 /* The next function will signal the condition at periodic interval */
-void * worker (void * arg)
+void *worker(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
 	struct timespec ts, tsrem;
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
-
-	ts.tv_sec=0;
-	ts.tv_nsec= INTERVAL;
-	while (ts.tv_nsec >= 1000000000)
-	{
-		ts.tv_nsec -= 1000000000;
-		ts.tv_sec +=1;
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	ts.tv_sec = 0;
+	ts.tv_nsec = INTERVAL;
+	while (ts.tv_nsec >= 1000000000) {
+		ts.tv_nsec -= 1000000000;
+		ts.tv_sec += 1;
+	}
+
+	while (do_it) {
 		tsrem.tv_sec = ts.tv_sec;
 		tsrem.tv_nsec = ts.tv_nsec;
 
-		do { ret = nanosleep(&tsrem, &tsrem); }
+		do {
+			ret = nanosleep(&tsrem, &tsrem);
+		}
 		while ((ret != 0) && (errno == EINTR));
 
 		ret = pthread_cond_signal(&(data.cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to signal the condition");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to signal the condition");
+		}
 		count_cnd_sig++;
 	}
 
@@ -238,7 +256,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_waiter, th_worker, th_sig1, th_sig2;
@@ -248,37 +266,47 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
+	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread creation failed");
+	}
 
-	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread creation failed"); }
-
-	if ((ret = pthread_create(&th_worker, NULL, worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_worker, NULL, worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -287,34 +315,41 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
-	if ((ret = pthread_join(th_worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-	if ((ret = pthread_join(th_waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+	if ((ret = pthread_join(th_waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  Condition was signaled %d times.\n", count_cnd_sig);
 	output("  pthread_timed_wait exited %d times.\n", count_cnd_wup);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/1-1.c
index 61b3314..c48743d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/1-1.c
@@ -19,13 +19,12 @@
 #include <signal.h>
 #include "posixtest.h"
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread1;
+pthread_t thread1;
 
 int t1_start = 0;
 int signaled = 0;
@@ -43,24 +42,24 @@
 	int rc;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
-		fprintf(stderr,"pthread_cond_wait return %d\n", rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "pthread_cond_wait return %d\n", rc);
+		exit(PTS_UNRESOLVED);
 	}
 
-	fprintf(stderr,"Thread1 wakened\n");
+	fprintf(stderr, "Thread1 wakened\n");
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 did not block on the cond at all\n");
-                printf("Test FAILED\n");
-                exit(PTS_FAIL);
+		fprintf(stderr, "Thread1 did not block on the cond at all\n");
+		printf("Test FAILED\n");
+		exit(PTS_FAIL);
 	}
 	pthread_mutex_unlock(&td.mutex);
 	return NULL;
@@ -71,16 +70,16 @@
 	struct sigaction act;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 	while (!t1_start)	/* wait for thread1 started */
@@ -88,26 +87,26 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to acquire mutex\n");
+		fprintf(stderr, "Main: Fail to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main: Fail to release mutex\n");
+		fprintf(stderr, "Main: Fail to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	sleep(2);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
-	fprintf(stderr,"Time to wake up thread1 by signaling a condition\n");
+	fprintf(stderr, "Time to wake up thread1 by signaling a condition\n");
 	signaled = 1;
 	if (pthread_cond_signal(&td.cond) != 0) {
-		fprintf(stderr,"Main: Fail to signal cond\n");
+		fprintf(stderr, "Main: Fail to signal cond\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-1.c
index aa85072..c1b2bb9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-1.c
@@ -19,13 +19,12 @@
 #include <signal.h>
 #include "posixtest.h"
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread1;
+pthread_t thread1;
 
 int t1_start = 0;
 int signaled = 0;
@@ -43,38 +42,39 @@
 	int rc;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
-		fprintf(stderr,"pthread_cond_wait return %d\n", rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "pthread_cond_wait return %d\n", rc);
+		exit(PTS_UNRESOLVED);
 	}
 
-	fprintf(stderr,"Thread1 wakened\n");
+	fprintf(stderr, "Thread1 wakened\n");
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 did not block on the cond at all\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 did not block on the cond at all\n");
+		exit(PTS_UNRESOLVED);
 	}
 
 	if (pthread_mutex_trylock(&td.mutex) == 0) {
-		fprintf(stderr,"Thread1 should not be able to lock the mutex again\n");
-                printf("Test FAILED\n");
+		fprintf(stderr,
+			"Thread1 should not be able to lock the mutex again\n");
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"Thread1 failed to trylock the mutex (as expected)\n");
+	fprintf(stderr, "Thread1 failed to trylock the mutex (as expected)\n");
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to release the mutex\n");
-                printf("Test FAILED\n");
+		fprintf(stderr, "Thread1 failed to release the mutex\n");
+		printf("Test FAILED\n");
 		exit(PTS_FAIL);
 	}
-	fprintf(stderr,"Thread1 released the mutex\n");
+	fprintf(stderr, "Thread1 released the mutex\n");
 	return NULL;
 }
 
@@ -84,16 +84,16 @@
 	struct sigaction act;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 	while (!t1_start)	/* wait for thread1 started */
@@ -101,26 +101,26 @@
 
 	/* acquire the mutex released by pthread_cond_wait() within thread 1 */
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to acquire mutex\n");
+		fprintf(stderr, "Main failed to acquire mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Main failed to release mutex\n");
+		fprintf(stderr, "Main failed to release mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	sleep(1);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
-	fprintf(stderr,"Time to wake up thread1 by signaling a condition\n");
+	fprintf(stderr, "Time to wake up thread1 by signaling a condition\n");
 	signaled = 1;
 	if (pthread_cond_signal(&td.cond) != 0) {
-		fprintf(stderr,"Main failed to signal the condition\n");
+		fprintf(stderr, "Main failed to signal the condition\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-2.c
index 3daf669..ee330a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-2.c
@@ -34,32 +34,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -86,7 +86,7 @@
 #endif
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -94,70 +94,105 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
-	clockid_t  cid; /* Clock id used by the cond var */
-	int type;       /* Mutex type */
-	int ctrl;   /* checkpoints */
-	int bool;   /* Boolean predicate for the condition */
-	int status; /* error code */
+	clockid_t cid;		/* Clock id used by the cond var */
+	int type;		/* Mutex type */
+	int ctrl;		/* checkpoints */
+	int bool;		/* Boolean predicate for the condition */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
 
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* Lock the mutex */
 	ret = pthread_mutex_lock(&(td->mtx));
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Unable to lock the mutex");
 	}
@@ -166,80 +201,75 @@
 	td->ctrl = 1;
 
 	/* Enter the wait */
-	do
-	{
+	do {
 		ret = pthread_cond_wait(&(td->cnd), &(td->mtx));
 		td->ctrl = 2;
 	} while ((ret == 0) && (td->bool == 0));
 
 	td->ctrl = 3;
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		td->status = ret;
 		UNRESOLVED(ret, "[child] Cond wait returned an error");
 	}
 
 	/* Make sure we are owning the mutex */
 	ret = pthread_mutex_trylock(&(td->mtx));
-	if (td->type == PTHREAD_MUTEX_RECURSIVE)
-	{
-		#if VERBOSE > 1
-		output("[child] Recursive mutex. Test if we are able to re-lock.\n");
-		#endif
-		if (ret != 0)
-		{
+	if (td->type == PTHREAD_MUTEX_RECURSIVE) {
+#if VERBOSE > 1
+		output
+		    ("[child] Recursive mutex. Test if we are able to re-lock.\n");
+#endif
+		if (ret != 0) {
 			td->status = ret;
 			FAILED("[child] Unable to relock the recursive mutex");
 		}
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			td->status = ret;
 			UNRESOLVED(ret, "[child] Failed to unlock the mutex");
 		}
-	}
-	else /* This was not a recursive mutex; the call must have failed */
-	{
-		if (ret == 0)
-		{
+	} else {		/* This was not a recursive mutex; the call must have failed */
+
+		if (ret == 0) {
 			td->status = -1;
-			FAILED("[child] Thread did not owned the mutex after the wait return.");
+			FAILED
+			    ("[child] Thread did not owned the mutex after the wait return.");
 		}
-		if (ret != EBUSY)
-		{
-			td-> status = ret;
-			UNRESOLVED(ret, "[child] Mutex trylock did not return EBUSY");
+		if (ret != EBUSY) {
+			td->status = ret;
+			UNRESOLVED(ret,
+				   "[child] Mutex trylock did not return EBUSY");
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("[child] The mutex was busy (normal).\n");
-		#endif
+#endif
 	}
 
 	ret = pthread_mutex_unlock(&(td->mtx));
-	if (ret != 0)
-	{
-		td->status=ret;
+	if (ret != 0) {
+		td->status = ret;
 		output("[child] Got error %i: %s\n", ret, strerror(ret));
-		FAILED("[child] Failed to unlock the mutex - owned by another thread?");
+		FAILED
+		    ("[child] Failed to unlock the mutex - owned by another thread?");
 	}
 
 	td->ctrl = 4;
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 	pthread_mutexattr_t ma;
 	pthread_condattr_t ca;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -249,9 +279,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -262,7 +292,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -270,202 +300,229 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_wait_2-2-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  */
-	for (i=0; i< (sizeof(scenarii) / sizeof(scenarii[0])); i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#endif
+	for (i = 0; i < (sizeof(scenarii) / sizeof(scenarii[0])); i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[i].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[i].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* initialize the condvar */
 		ret = pthread_cond_init(&(td->cnd), &ca);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Cond init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Cond init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		#ifdef USE_ALTCLK
+#ifdef USE_ALTCLK
 		ret = pthread_condattr_getclock(&ca, &(td->cid));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read cond clock attribute");  }
-		#else
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read cond clock attribute");
+		}
+#else
 		td->cid = CLOCK_REALTIME;
-		#endif
+#endif
 
 		ret = pthread_mutexattr_gettype(&ma, &(td->type));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Unable to read mutex type attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to read mutex type attribute");
+		}
 
-		td->ctrl=0;
-		td->bool=0;
-		td->status=0;
+		td->ctrl = 0;
+		td->bool = 0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 
 		/* Create the child */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across two processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 1
+			if (child_pr == 0) {
+#if VERBOSE > 1
 				output("[child] Child process starting...\n");
-				#endif
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Note: in case of an error, the child process will be alive for 10 sec then exit. */
@@ -473,106 +530,126 @@
 		/* Child is now running and will enter the timedwait */
 		/* We are waiting for this; and we have to monitor the status value as well. */
 		ret = pthread_mutex_lock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
-
-		while ((td->ctrl == 0) && (td->status == 0))
-		{
-			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
-			sched_yield();
-			ret = pthread_mutex_lock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to lock the mutex");
 		}
 
-		if ((td->ctrl == 2) && (td->status == 0)) /* Spurious wakeups hapenned */
-		{
-			output("Spurious wake ups have happened. Maybe pthread_cond_wait is broken?\n");
+		while ((td->ctrl == 0) && (td->status == 0)) {
+			ret = pthread_mutex_unlock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to unlock the mutex");
+			}
+			sched_yield();
+			ret = pthread_mutex_lock(&(td->mtx));
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to lock the mutex");
+			}
+		}
+
+		if ((td->ctrl == 2) && (td->status == 0)) {	/* Spurious wakeups hapenned */
+			output
+			    ("Spurious wake ups have happened. Maybe pthread_cond_wait is broken?\n");
 			td->ctrl = 1;
 		}
 
-		if (td->ctrl == 1)/* The child is inside the cond wait */
-		{
+		if (td->ctrl == 1) {	/* The child is inside the cond wait */
 			ret = pthread_cond_signal(&(td->cnd));
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to signal the condition");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to signal the condition");
+			}
 
 			/* Let the child leave the wait function if something is broken */
 			usleep(100);
 
-			if (td->ctrl != 1)
-			{
-				FAILED("[parent] Child went out from pthread_cond_wait without locking the mutex");
+			if (td->ctrl != 1) {
+				FAILED
+				    ("[parent] Child went out from pthread_cond_wait without locking the mutex");
 			}
 
 			/* Allow the child to continue */
-			td->bool=1;
+			td->bool = 1;
 		}
 
 		/* Let the child do its checking */
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to unlock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to unlock the mutex");
+		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across two processes */
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(td->status , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(td->status,
+					   "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(td->status, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(td->status,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 /**********
  * Destroy the data
  */
- 		ret = pthread_cond_destroy(&(td->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var");  }
+		ret = pthread_cond_destroy(&(td->cnd));
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the cond var");
+		}
 
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-3.c
index 21bf548..d3564e7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-3.c
@@ -28,30 +28,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <time.h>
- #include <semaphore.h>
+#include <errno.h>
+#include <time.h>
+#include <semaphore.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -78,15 +78,14 @@
 #endif
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-struct
-{
+struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 	int type;
@@ -98,15 +97,20 @@
 /****  First handler that will be poped
  *  This one works only with recursive mutexes
  */
-void clnp1 (void * arg)
+void clnp1(void *arg)
 {
 	int ret;
-	if (data.type == PTHREAD_MUTEX_RECURSIVE)
-	{
+	if (data.type == PTHREAD_MUTEX_RECURSIVE) {
 		ret = pthread_mutex_trylock(&(data.mtx));
-		if (ret != 0)  {  FAILED("Unable to double-lock a recursive mutex in clean-up handler 1");  }
+		if (ret != 0) {
+			FAILED
+			    ("Unable to double-lock a recursive mutex in clean-up handler 1");
+		}
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock double-locked recursive mutex in clean-up handler 1");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to unlock double-locked recursive mutex in clean-up handler 1");
+		}
 	}
 	return;
 }
@@ -114,18 +118,22 @@
 /**** Second handler
  *  This one will trigger an action in main thread, while we are owning the mutex
  */
-void clnp2 (void * arg)
+void clnp2(void *arg)
 {
 	int ret;
 	do {
 		ret = sem_post(&(data.semA));
 	} while ((ret != 0) && (errno == EINTR));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in cleanup handler 2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem post failed in cleanup handler 2");
+	}
 
 	do {
 		ret = sem_wait(&(data.semB));
 	} while ((ret != 0) && (errno == EINTR));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in cleanup handler 2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem wait failed in cleanup handler 2");
+	}
 
 	return;
 }
@@ -133,17 +141,22 @@
 /**** Third handler
  *  Will actually unlock the mutex, then try to unlock second time to check an error is returned
  */
-void clnp3 (void * arg)
+void clnp3(void *arg)
 {
 	int ret;
 
 	ret = pthread_mutex_unlock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in clean-up handler 3");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex in clean-up handler 3");
+	}
 
-	if ((data.type == PTHREAD_MUTEX_ERRORCHECK) || (data.type == PTHREAD_MUTEX_RECURSIVE))
-	{
+	if ((data.type == PTHREAD_MUTEX_ERRORCHECK)
+	    || (data.type == PTHREAD_MUTEX_RECURSIVE)) {
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret == 0)  {  UNRESOLVED(ret, "Was able to unlock unlocked mutex in clean-up handler 3");  }
+		if (ret == 0) {
+			UNRESOLVED(ret,
+				   "Was able to unlock unlocked mutex in clean-up handler 3");
+		}
 	}
 
 	return;
@@ -153,29 +166,36 @@
  * This function will lock the mutex, then install the cleanup handlers
  * and wait for the cond. At this point it will be canceled.
  */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 
-	ret= pthread_mutex_lock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex in thread");  }
+	ret = pthread_mutex_lock(&(data.mtx));
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock the mutex in thread");
+	}
 
 	/* Tell the main thread we got the lock */
 	do {
 		ret = sem_post(&(data.semA));
 	} while ((ret != 0) && (errno == EINTR));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in cleanup handler 2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem post failed in cleanup handler 2");
+	}
 
-	pthread_cleanup_push (clnp3, NULL);
-	pthread_cleanup_push (clnp2, NULL);
-	pthread_cleanup_push (clnp1, NULL);
+	pthread_cleanup_push(clnp3, NULL);
+	pthread_cleanup_push(clnp2, NULL);
+	pthread_cleanup_push(clnp1, NULL);
 
 	do {
 		ret = pthread_cond_wait(&(data.cnd), &(data.mtx));
 	} while ((ret == 0) && (data.bool == 0));
 
-	if (ret != 0)  {  UNRESOLVED(ret , "Wait failed");  }  /* We will exit even if the error is timedwait */
+	if (ret != 0) {
+		UNRESOLVED(ret, "Wait failed");
+	}
 
+	/* We will exit even if the error is timedwait */
 	/* If we are here, the thread was not canceled */
 	FAILED("The thread has not been canceled");
 
@@ -186,10 +206,10 @@
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	void * rc;
+	void *rc;
 
 	pthread_mutexattr_t ma;
 	pthread_condattr_t ca;
@@ -197,31 +217,44 @@
 
 	long altclk_ok, pshared_ok;
 
-	struct
-	{
-		char altclk;  /* Want to use alternative clock */
-		char pshared; /* Want to use process-shared primitives */
-		int type;     /* mutex type */
-		char * descr; /* Description of the case */
+	struct {
+		char altclk;	/* Want to use alternative clock */
+		char pshared;	/* Want to use process-shared primitives */
+		int type;	/* mutex type */
+		char *descr;	/* Description of the case */
 
-	} scenar[] =
-	{ {0, 0, PTHREAD_MUTEX_NORMAL,     "Normal mutex" }
+	} scenar[] = { {
+	0, 0, PTHREAD_MUTEX_NORMAL, "Normal mutex"}
 #ifdef USE_ALTCLK
-	 ,{1, 0, PTHREAD_MUTEX_NORMAL,     "Normal mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_NORMAL,     "PShared mutex + altclock cond" }
+	, {
+	1, 0, PTHREAD_MUTEX_NORMAL, "Normal mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_NORMAL, "PShared mutex + altclock cond"}
 #endif
-	 ,{0, 1, PTHREAD_MUTEX_NORMAL,     "Pshared mutex" }
+	, {
+	0, 1, PTHREAD_MUTEX_NORMAL, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	 ,{0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex" }
-	 ,{0, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex"  }
+	, {
+	0, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex"}
+	, {
+	0, 0, PTHREAD_MUTEX_RECURSIVE, "Recursive mutex"}
 #ifdef USE_ALTCLK
-	 ,{1, 0, PTHREAD_MUTEX_RECURSIVE , "Recursive mutex + altclock cond" }
-	 ,{1, 0, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex + altclock cond" }
-	 ,{1, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex + altclock cond" }
+	, {
+	1, 0, PTHREAD_MUTEX_RECURSIVE, "Recursive mutex + altclock cond"}
+	, {
+	1, 0, PTHREAD_MUTEX_ERRORCHECK,
+		    "Errorcheck mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_RECURSIVE,
+		    "Recursive pshared mutex + altclock cond"}
+	, {
+	1, 1, PTHREAD_MUTEX_ERRORCHECK,
+		    "Errorcheck pshared mutex + altclock cond"}
 #endif
-	 ,{0, 1, PTHREAD_MUTEX_RECURSIVE , "Recursive pshared mutex" }
-	 ,{0, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex" }
+	, {
+	0, 1, PTHREAD_MUTEX_RECURSIVE, "Recursive pshared mutex"}
+	, {
+	0, 1, PTHREAD_MUTEX_ERRORCHECK, "Errorcheck pshared mutex"}
 #endif
 	};
 
@@ -233,145 +266,204 @@
 		altclk_ok = sysconf(_SC_MONOTONIC_CLOCK);
 #ifndef USE_ALTCLK
 	if (altclk_ok > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 	pshared_ok = sysconf(_SC_THREAD_PROCESS_SHARED);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
-	output(" Process-shared primitive %s be tested\n", (pshared_ok>0)?"will":"won't");
-	output(" Alternative clock for cond %s be tested\n", (altclk_ok>0)?"will":"won't");
-	#endif
+	output(" Process-shared primitive %s be tested\n",
+	       (pshared_ok > 0) ? "will" : "won't");
+	output(" Alternative clock for cond %s be tested\n",
+	       (altclk_ok > 0) ? "will" : "won't");
+#endif
 
 	ret = sem_init(&(data.semA), 0, 0);
-	if (ret != 0)  {  UNRESOLVED(errno, "Unable to init sem A");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to init sem A");
+	}
 
 	ret = sem_init(&(data.semB), 0, 0);
-	if (ret != 0)  {  UNRESOLVED(errno, "Unable to init sem B");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to init sem B");
+	}
 
-	for (i=0; i< (sizeof(scenar) / sizeof(scenar[0])); i++)
-	{
-		#if VERBOSE > 1
+	for (i = 0; i < (sizeof(scenar) / sizeof(scenar[0])); i++) {
+#if VERBOSE > 1
 		output("Starting test for %s\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Initialize the data structure */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex attribute object init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attribute object init failed");
+		}
 
 		ret = pthread_mutexattr_settype(&ma, scenar[i].type);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex type");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to set mutex type");
+		}
 
-		if ((pshared_ok > 0) && (scenar[i].pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex process-shared");  }
+		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set mutex process-shared");
+			}
 		}
 
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond attribute object init failed");  }
-
-		if ((pshared_ok > 0) && (scenar[i].pshared != 0))
-		{
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set cond process-shared");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond attribute object init failed");
 		}
 
-		#ifdef USE_ALTCLK
-		if ((altclk_ok > 0) && (scenar[i].altclk != 0))
-		{
+		if ((pshared_ok > 0) && (scenar[i].pshared != 0)) {
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set cond process-shared");
+			}
+		}
+#ifdef USE_ALTCLK
+		if ((altclk_ok > 0) && (scenar[i].altclk != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set alternative (monotonic) clock for cond");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set alternative (monotonic) clock for cond");
+			}
 		}
-		#endif
+#endif
 
 		ret = pthread_mutex_init(&(data.mtx), &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to init mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to init mutex");
+		}
 
 		ret = pthread_cond_init(&(data.cnd), &ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize condvar");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to initialize condvar");
+		}
 
 		ret = pthread_mutexattr_gettype(&ma, &(data.type));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get type from mutex attr");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get type from mutex attr");
+		}
 
 		data.bool = 0;
 
 		/** Data is ready, create the thread */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Initialization OK, starting thread\n");
-		#endif
+#endif
 
 		ret = pthread_create(&th, NULL, threaded, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Thread creation failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Thread creation failed");
+		}
 
 		/** Wait for the thread to be waiting */
 		do {
 			ret = sem_wait(&(data.semA));
 		} while ((ret != 0) && (errno == EINTR));
-		if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in main");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem wait failed in main");
+		}
 
 		ret = pthread_mutex_lock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in main");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to lock mutex in main");
+		}
 
 		data.bool = 1;
 
 		/** Cancel the thread */
 		ret = pthread_cancel(th);
-		if (ret != 0)  {  UNRESOLVED(ret, "Thread cancelation failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Thread cancelation failed");
+		}
 
 		sched_yield();
-		#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 		usleep(100);
-		#endif
+#endif
 
 		ret = pthread_mutex_unlock(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in main");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to unlock mutex in main");
+		}
 
 		/** Wait for the thread to be executing second cleanup handler */
 		do {
 			ret = sem_wait(&(data.semA));
 		} while ((ret != 0) && (errno == EINTR));
-		if (ret != 0)  {  UNRESOLVED(errno, "Sem wait failed in main");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem wait failed in main");
+		}
 
 		/** Here the child should own the mutex, we check this */
 		ret = pthread_mutex_trylock(&(data.mtx));
-		if (ret == 0)  {  FAILED("The child did not own the mutex inside the cleanup handler");  }
+		if (ret == 0) {
+			FAILED
+			    ("The child did not own the mutex inside the cleanup handler");
+		}
 
 		/** Let the cleanups go on */
 		do {
 			ret = sem_post(&(data.semB));
 		} while ((ret != 0) && (errno == EINTR));
-		if (ret != 0)  {  UNRESOLVED(errno, "Sem post failed in main");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem post failed in main");
+		}
 
 		/** Join the thread */
 		ret = pthread_join(th, &rc);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to join the thread");  }
-		if (rc != PTHREAD_CANCELED)  {  FAILED("thread was not canceled");  }
-
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to join the thread");
+		}
+		if (rc != PTHREAD_CANCELED) {
+			FAILED("thread was not canceled");
+		}
+#if VERBOSE > 1
 		output("Test passed for %s\n\n", scenar[i].descr);
-		#endif
+#endif
 
 		/* Destroy datas */
 		ret = pthread_cond_destroy(&(data.cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond destroy failed");
+		}
 
 		ret = pthread_mutex_destroy(&(data.mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex destroy failed");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond attribute destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond attribute destroy failed");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex attr destroy failed");  }
-	} /* Proceed to next case */
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attr destroy failed");
+		}
+	}			/* Proceed to next case */
 
 	ret = sem_destroy(&(data.semA));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem destroy failed");
+	}
 
 	ret = sem_destroy(&(data.semB));
-	if (ret != 0)  {  UNRESOLVED(errno, "Sem destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem destroy failed");
+	}
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/3-1.c
index bc5ca7b..ccc195a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/3-1.c
@@ -17,13 +17,12 @@
 #include <signal.h>
 #include "posixtest.h"
 
-struct testdata
-{
+struct testdata {
 	pthread_mutex_t mutex;
-	pthread_cond_t  cond;
+	pthread_cond_t cond;
 } td;
 
-pthread_t  thread1;
+pthread_t thread1;
 
 int t1_start = 0;
 int signaled = 0;
@@ -41,38 +40,37 @@
 	int rc;
 
 	if (pthread_mutex_lock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to acquire the mutex\n");
+		fprintf(stderr, "Thread1 failed to acquire the mutex\n");
 		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 started\n");
-	t1_start = 1;	/* let main thread continue */
+	fprintf(stderr, "Thread1 started\n");
+	t1_start = 1;		/* let main thread continue */
 
-	fprintf(stderr,"Thread1 is waiting for the cond\n");
+	fprintf(stderr, "Thread1 is waiting for the cond\n");
 	rc = pthread_cond_wait(&td.cond, &td.mutex);
 	if (rc != 0) {
 		if (rc == EINVAL) {
-			fprintf(stderr,"pthread_cond_wait returns EINVAL\n");
+			fprintf(stderr, "pthread_cond_wait returns EINVAL\n");
+			exit(PTS_UNRESOLVED);
+		} else if (rc == EPERM) {
+			fprintf(stderr, "pthread_cond_wait returns EPERM\n");
 			exit(PTS_UNRESOLVED);
 		}
-		else if (rc == EPERM) {
-			fprintf(stderr,"pthread_cond_wait returns EPERM\n");
-			exit(PTS_UNRESOLVED);
-		}
-		fprintf(stderr,"pthread_cond_wait returns %d\n", rc);
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "pthread_cond_wait returns %d\n", rc);
+		exit(PTS_UNRESOLVED);
 	}
 
 	if (signaled == 0) {
-		fprintf(stderr,"Thread1 waked up before being notified\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 waked up before being notified\n");
+		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 wakened up and got returned value 0\n");
+	fprintf(stderr, "Thread1 wakened up and got returned value 0\n");
 
 	if (pthread_mutex_unlock(&td.mutex) != 0) {
-		fprintf(stderr,"Thread1 failed to release the mutex\n");
-                exit(PTS_UNRESOLVED);
+		fprintf(stderr, "Thread1 failed to release the mutex\n");
+		exit(PTS_UNRESOLVED);
 	}
-	fprintf(stderr,"Thread1 released the mutex\n");
+	fprintf(stderr, "Thread1 released the mutex\n");
 	return NULL;
 }
 
@@ -82,32 +80,33 @@
 	struct sigaction act;
 
 	if (pthread_mutex_init(&td.mutex, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize mutex\n");
+		fprintf(stderr, "Fail to initialize mutex\n");
 		return PTS_UNRESOLVED;
 	}
 	if (pthread_cond_init(&td.cond, NULL) != 0) {
-		fprintf(stderr,"Fail to initialize cond\n");
+		fprintf(stderr, "Fail to initialize cond\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (pthread_create(&thread1, NULL, t1_func, NULL) != 0) {
-		fprintf(stderr,"Fail to create thread 1\n");
+		fprintf(stderr, "Fail to create thread 1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	sleep(2);
 
 	/* Setup alarm handler */
-	act.sa_handler=alarm_handler;
-	act.sa_flags=0;
+	act.sa_handler = alarm_handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 	alarm(5);
 
-	fprintf(stderr,"To wake up thread1 by broadcasting its waited condition\n");
+	fprintf(stderr,
+		"To wake up thread1 by broadcasting its waited condition\n");
 	signaled = 1;
 	if (pthread_cond_broadcast(&td.cond) != 0) {
-		fprintf(stderr,"Main failed to broadcast the condition\n");
+		fprintf(stderr, "Main failed to broadcast the condition\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c
index 9be26e5..5cdfa08 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c
@@ -26,27 +26,27 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
- #include <time.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -73,60 +73,63 @@
 #define VERBOSE 2
 #endif
 
-#define INTERVAL (700) /* ns, frequency (actually, period) for the condition signaling */
+#define INTERVAL (700)		/* ns, frequency (actually, period) for the condition signaling */
 
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-char woken=0;
-unsigned long count_cnd_sig=0, count_cnd_wup=0;
+char do_it = 1;
+char woken = 0;
+unsigned long count_cnd_sig = 0, count_cnd_wup = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
-struct
-{
+struct {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 } data;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 
@@ -138,87 +141,100 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* The following function will wait on the cond
  * it does check that no error code of EINTR is returned */
-void * waiter(void * arg)
+void *waiter(void *arg)
 {
 	int ret;
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
 	ret = pthread_mutex_lock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in waiter thread");
+	}
 
-	do
-	{
-		ret = pthread_cond_wait(&(data.cnd),&(data.mtx));
+	do {
+		ret = pthread_cond_wait(&(data.cnd), &(data.mtx));
 		count_cnd_wup++;
 	} while ((ret == 0) && (do_it != 0));
 
-	if (ret == EINTR)
-	{
+	if (ret == EINTR) {
 		FAILED("pthread_cond_wait returned EINTR");
 	}
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "pthread_cond_wait returned an unexpected error");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "pthread_cond_wait returned an unexpected error");
 	}
 
 	woken++;
 
 	ret = pthread_mutex_unlock(&(data.mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex in waiter thread");
+	}
 
 	return NULL;
 }
 
 /* The next function will signal the condition at periodic interval */
-void * worker (void * arg)
+void *worker(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
 	struct timespec ts, tsrem;
 	//initialisation is needed
-	ts.tv_sec=0;
+	ts.tv_sec = 0;
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
-
-	ts.tv_sec=0;
-	ts.tv_nsec= INTERVAL;
-	while (ts.tv_nsec >= 1000000000)
-	{
-		ts.tv_nsec -= 1000000000;
-		ts.tv_sec +=1;
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (woken == 0)
-	{
+	ts.tv_sec = 0;
+	ts.tv_nsec = INTERVAL;
+	while (ts.tv_nsec >= 1000000000) {
+		ts.tv_nsec -= 1000000000;
+		ts.tv_sec += 1;
+	}
+
+	while (woken == 0) {
 		tsrem.tv_sec = ts.tv_sec;
 		tsrem.tv_nsec = ts.tv_nsec;
 
-		do { ret = nanosleep(&tsrem, &tsrem); }
+		do {
+			ret = nanosleep(&tsrem, &tsrem);
+		}
 		while ((ret != 0) && (errno == EINTR));
 
 		ret = pthread_cond_signal(&(data.cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to signal the condition");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to signal the condition");
+		}
 		count_cnd_sig++;
 	}
 
@@ -226,7 +242,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_waiter, th_worker, th_sig1, th_sig2;
@@ -236,37 +252,47 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
+	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread creation failed");
+	}
 
-	if ((ret = pthread_create(&th_waiter, NULL, waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread creation failed"); }
-
-	if ((ret = pthread_create(&th_worker, NULL, worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_worker, NULL, worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -275,34 +301,41 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
-	if ((ret = pthread_join(th_waiter, NULL)))
-	{ UNRESOLVED(ret, "Waiter thread join failed"); }
-	if ((ret = pthread_join(th_worker, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_waiter, NULL))) {
+		UNRESOLVED(ret, "Waiter thread join failed");
+	}
+	if ((ret = pthread_join(th_worker, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  Condition was signaled %d times.\n", count_cnd_sig);
 	output("  pthread_cond_wait exited %d times.\n", count_cnd_wup);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/1-1.c
index b5ac0e0..aa6943c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/1-1.c
@@ -25,16 +25,16 @@
 	int rc;
 
 	/* Initialize a condition variable attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Cannot initialize condition variable attributes object\n");
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr,
+			"Cannot initialize condition variable attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the condition variable attributes object */
-	if (pthread_condattr_destroy(&condattr) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_destroy(), rc=%d\n", rc);
+	if (pthread_condattr_destroy(&condattr) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_destroy(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/2-1.c
index f95a8ef..c3b6d3b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/2-1.c
@@ -28,27 +28,24 @@
 	pthread_condattr_t condattr;
 
 	/* Initialize a condition variable attributes object */
-	if (pthread_condattr_init(&condattr) != 0)
-	{
-		fprintf(stderr,"Cannot initialize condition variable attributes object\n");
+	if (pthread_condattr_init(&condattr) != 0) {
+		fprintf(stderr,
+			"Cannot initialize condition variable attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the condition variable attributes object */
-	if (pthread_condattr_destroy(&condattr) != 0)
-	{
-		fprintf(stderr,"Cannot destroy the condition variable attributes object\n");
+	if (pthread_condattr_destroy(&condattr) != 0) {
+		fprintf(stderr,
+			"Cannot destroy the condition variable attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize the condition variable attributes object again.  This shouldn't result in an error. */
-	if (pthread_condattr_init(&condattr) != 0)
-	{
+	if (pthread_condattr_init(&condattr) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/3-1.c
index a610be1..5d2e182 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/3-1.c
@@ -26,20 +26,17 @@
 	pthread_condattr_t condattr;
 
 	/* Initialize a condition variable attributes object */
-	if (pthread_condattr_init(&condattr) != 0)
-	{
-		fprintf(stderr,"Cannot initialize condition variable attributes object\n");
+	if (pthread_condattr_init(&condattr) != 0) {
+		fprintf(stderr,
+			"Cannot initialize condition variable attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the condition variable attributes object */
-	if (pthread_condattr_destroy(&condattr) != 0)
-	{
+	if (pthread_condattr_destroy(&condattr) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c
index 9d4d923..f9bac02 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c
@@ -22,19 +22,18 @@
 
 int main()
 {
-	pthread_condattr_t *condattr=NULL;
+	pthread_condattr_t *condattr = NULL;
 	int rc;
 
 	/* Try to destroy a NULL condition variable attributes object using pthread_condattr_destroy()
 	 * It should return EINVAL */
-	if ((rc=pthread_condattr_destroy(condattr)) == EINVAL)
-	{
+	if ((rc = pthread_condattr_destroy(condattr)) == EINVAL) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
-		printf("Test PASSED: *NOTE: Expect %d(EINVAL), but return %d, though standard states 'may' fail\n", EINVAL, rc);
+	} else {
+		printf
+		    ("Test PASSED: *NOTE: Expect %d(EINVAL), but return %d, though standard states 'may' fail\n",
+		     EINVAL, rc);
 		return PTS_PASS;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-1.c
index 0a7ff0e..9ae2495 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-1.c
@@ -15,7 +15,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <stdio.h>
@@ -28,16 +28,15 @@
 	int rc;
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_getclock(&condattr, &clockid);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Could not get the clock attribute\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-2.c
index 6a5fa91..306562d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-2.c
@@ -16,7 +16,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <stdio.h>
@@ -29,23 +29,21 @@
 	int rc;
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_setclock(&condattr, CLOCK_REALTIME);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		perror("Error: Could not set clock to CLOCK_REALTIME\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_condattr_getclock(&condattr, &clockid);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Could not get the clock attribute\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-1.c
index 5bef216..4bdae7b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-1.c
@@ -28,47 +28,48 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr[NUM_OF_CONDATTR];
 	int ret, i, pshared;
 
-	for (i=0;i<NUM_OF_CONDATTR;i++)
-	{
+	for (i = 0; i < NUM_OF_CONDATTR; i++) {
 		/* Initialize a cond attributes object */
-		if (pthread_condattr_init(&attr[i]) != 0)
-		{
+		if (pthread_condattr_init(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_init()\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Set 'pshared' to PTHREAD_PROCESS_PRIVATE. */
-		ret=pthread_condattr_setpshared(&attr[i], PTHREAD_PROCESS_PRIVATE);
-		if (ret != 0)
-		{
-			printf("Error in pthread_condattr_setpshared(), error: %d\n", ret);
+		ret =
+		    pthread_condattr_setpshared(&attr[i],
+						PTHREAD_PROCESS_PRIVATE);
+		if (ret != 0) {
+			printf
+			    ("Error in pthread_condattr_setpshared(), error: %d\n",
+			     ret);
 			return PTS_UNRESOLVED;
 		}
 
 		/* Get 'pshared'.  It should be PTHREAD_PROCESS_PRIVATE. */
-		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0)
-		{
-			fprintf(stderr,"Error obtaining the attribute process-shared\n");
+		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0) {
+			fprintf(stderr,
+				"Error obtaining the attribute process-shared\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pshared != PTHREAD_PROCESS_PRIVATE)
-		{
-			printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
+		if (pshared != PTHREAD_PROCESS_PRIVATE) {
+			printf("Test FAILED: Incorrect pshared value: %d\n",
+			       pshared);
 			return PTS_FAIL;
 		}
 
 		/* Destory the cond attributes object */
-		if (pthread_condattr_destroy(&attr[i]) != 0)
-		{
+		if (pthread_condattr_destroy(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-2.c
index 5f5d495..d50457b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/1-2.c
@@ -28,47 +28,48 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr[NUM_OF_CONDATTR];
 	int ret, i, pshared;
 
-	for (i=0;i<NUM_OF_CONDATTR;i++)
-	{
+	for (i = 0; i < NUM_OF_CONDATTR; i++) {
 		/* Initialize a cond attributes object */
-		if (pthread_condattr_init(&attr[i]) != 0)
-		{
+		if (pthread_condattr_init(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_init()\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Set 'pshared' to PTHREAD_PROCESS_SHARED. */
-		ret=pthread_condattr_setpshared(&attr[i], PTHREAD_PROCESS_SHARED);
-		if (ret != 0)
-		{
-			printf("Error in pthread_condattr_setpshared(), error: %d\n", ret);
+		ret =
+		    pthread_condattr_setpshared(&attr[i],
+						PTHREAD_PROCESS_SHARED);
+		if (ret != 0) {
+			printf
+			    ("Error in pthread_condattr_setpshared(), error: %d\n",
+			     ret);
 			return PTS_UNRESOLVED;
 		}
 
 		/* Get 'pshared'.  It should be PTHREAD_PROCESS_SHARED. */
-		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0)
-		{
-			fprintf(stderr,"Error obtaining the attribute process-shared\n");
+		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0) {
+			fprintf(stderr,
+				"Error obtaining the attribute process-shared\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pshared != PTHREAD_PROCESS_SHARED)
-		{
-			printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
+		if (pshared != PTHREAD_PROCESS_SHARED) {
+			printf("Test FAILED: Incorrect pshared value: %d\n",
+			       pshared);
 			return PTS_FAIL;
 		}
 
 		/* Destory the cond attributes object */
-		if (pthread_condattr_destroy(&attr[i]) != 0)
-		{
+		if (pthread_condattr_destroy(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/2-1.c
index 8bffae6..65df5a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getpshared/2-1.c
@@ -24,31 +24,31 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr;
 	int pshared;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_condattr_init(&attr) != 0)
-	{
+	if (pthread_condattr_init(&attr) != 0) {
 		perror("Error at pthread_condattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_condattr_getpshared(&attr, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	if (pthread_condattr_getpshared(&attr, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Incorrect default pshared value: %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Incorrect default pshared value: %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/1-1.c
index cfc7668..16fcb40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/1-1.c
@@ -29,35 +29,32 @@
 	int pshared;
 #endif
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
-
 #ifdef PTHREAD_PROCESS_SHARED
 	/* If the symbol {PTHREAD_PROCESS_SHARED} is defined, the attribute
 	 * process-shared should be provided and its default value should be
 	 * PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_condattr_getpshared(&condattr, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	if (pthread_condattr_getpshared(&condattr, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared == PTHREAD_PROCESS_PRIVATE)
-	{
+	if (pshared == PTHREAD_PROCESS_PRIVATE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 #endif
 
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/3-1.c
index 2f23537..b18b03e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_init/3-1.c
@@ -25,22 +25,19 @@
 	int rc;
 
 	/* Initialize a condition variable attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) == 0)
-	{
+	if ((rc = pthread_condattr_init(&condattr)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Insufficient memory exists to initialize the condition variable attributes object */
-	else if (rc == ENOMEM)
-	{
-		fprintf(stderr,"pthread_condattr_init() returns ENOMEM\n");
+	else if (rc == ENOMEM) {
+		fprintf(stderr, "pthread_condattr_init() returns ENOMEM\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-1.c
index 9b5556e..a1b8fa6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-1.c
@@ -16,7 +16,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <stdio.h>
@@ -28,16 +28,15 @@
 	int rc;
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_setclock(&condattr, CLOCK_REALTIME);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Could not set clock to CLOCK_REALTIME\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-2.c
index 7d2bc54..b1938dc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-2.c
@@ -19,7 +19,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <stdio.h>
@@ -34,23 +34,21 @@
 
 	/* Check whether kernel supports CLOCK_MONOTONIC */
 	rc = clock_getres(CLOCK_MONOTONIC, &ts);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("UNSUPPORTED: CLOCK_MONOTONIC is unsupported\n");
 		return PTS_UNSUPPORTED;
 	}
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_setclock(&condattr, CLOCK_MONOTONIC);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Could not set clock to CLOCK_MONOTONIC\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-3.c
index 7f53884..46715b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/1-3.c
@@ -18,7 +18,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <unistd.h>
@@ -30,10 +30,10 @@
 int main()
 {
 
-	#if _POSIX_CPUTIME == -1
-		printf("_POSIX_CPUTIME unsupported\n");
-		return PTS_UNSUPPORTED;
-	#endif
+#if _POSIX_CPUTIME == -1
+	printf("_POSIX_CPUTIME unsupported\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	pthread_condattr_t condattr;
 	clockid_t clockid;
@@ -45,25 +45,25 @@
 	}
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Get the cpu clock id */
 
-	if (clock_getcpuclockid(getpid(), &clockid) != 0)
-	{
+	if (clock_getcpuclockid(getpid(), &clockid) != 0) {
 		printf("clock_getcpuclockid() failed\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_setclock(&condattr, clockid);
-	if (rc != EINVAL)
-	{
-		printf("Test FAILED: Expected EINVAL when passing a cpu clock id, instead it returned: %d \n", rc);
+	if (rc != EINVAL) {
+		printf
+		    ("Test FAILED: Expected EINVAL when passing a cpu clock id, instead it returned: %d \n",
+		     rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/2-1.c
index 9096cc1..f68d6ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setclock/2-1.c
@@ -20,7 +20,7 @@
  *
  */
 
-# define _XOPEN_SOURCE  600
+#define _XOPEN_SOURCE  600
 
 #include <pthread.h>
 #include <stdio.h>
@@ -35,17 +35,17 @@
 	int rc;
 
 	/* Initialize a cond attributes object */
-	if ((rc=pthread_condattr_init(&condattr)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_condattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_condattr_init(&condattr)) != 0) {
+		fprintf(stderr, "Error at pthread_condattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	rc = pthread_condattr_setclock(&condattr, INVALID_CLOCKID);
-	if (rc != EINVAL)
-	{
-		printf("Test PASSED: *NOTE: Test passed while passing an invalid clockid, but the standard says 'may' fail\n");
+	if (rc != EINVAL) {
+		printf
+		    ("Test PASSED: *NOTE: Test passed while passing an invalid clockid, but the standard says 'may' fail\n");
 		return PTS_PASS;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-1.c
index ccc18b1..53362fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-1.c
@@ -35,47 +35,49 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr[NUM_OF_CONDATTR];
 	int ret, i, pshared;
 
-	for (i=0;i<NUM_OF_CONDATTR;i++)
-	{
+	for (i = 0; i < NUM_OF_CONDATTR; i++) {
 		/* Initialize a cond attributes object */
-		if (pthread_condattr_init(&attr[i]) != 0)
-		{
+		if (pthread_condattr_init(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_init()\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Set 'pshared' to PTHREAD_PROCESS_PRIVATE. */
-		ret=pthread_condattr_setpshared(&attr[i], PTHREAD_PROCESS_PRIVATE);
-		if (ret != 0)
-		{
-			printf("Test FAILED: Could not set pshared to PTHREAD_PROCESS_PRIVATE, error: %d\n", ret);
+		ret =
+		    pthread_condattr_setpshared(&attr[i],
+						PTHREAD_PROCESS_PRIVATE);
+		if (ret != 0) {
+			printf
+			    ("Test FAILED: Could not set pshared to PTHREAD_PROCESS_PRIVATE, error: %d\n",
+			     ret);
 			return PTS_FAIL;
 		}
 
 		/* Get 'pshared'.  It should be PTHREAD_PROCESS_PRIVATE. */
-		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0)
-		{
-			printf("Test FAILED: obtaining the wrong process-shared attribute, expected PTHREAD_PROCESS_PRIVATE, but got: %d\n", pshared);
+		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0) {
+			printf
+			    ("Test FAILED: obtaining the wrong process-shared attribute, expected PTHREAD_PROCESS_PRIVATE, but got: %d\n",
+			     pshared);
 			return PTS_FAIL;
 		}
 
-		if (pshared != PTHREAD_PROCESS_PRIVATE)
-		{
-			printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
+		if (pshared != PTHREAD_PROCESS_PRIVATE) {
+			printf("Test FAILED: Incorrect pshared value: %d\n",
+			       pshared);
 			return PTS_FAIL;
 		}
 
 		/* Destory the cond attributes object */
-		if (pthread_condattr_destroy(&attr[i]) != 0)
-		{
+		if (pthread_condattr_destroy(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-2.c
index 214a70d..7fc4f9a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/1-2.c
@@ -35,47 +35,49 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr[NUM_OF_CONDATTR];
 	int ret, i, pshared;
 
-	for (i=0;i<NUM_OF_CONDATTR;i++)
-	{
+	for (i = 0; i < NUM_OF_CONDATTR; i++) {
 		/* Initialize a cond attributes object */
-		if (pthread_condattr_init(&attr[i]) != 0)
-		{
+		if (pthread_condattr_init(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_init()\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Set 'pshared' to PTHREAD_PROCESS_SHARED. */
-		ret=pthread_condattr_setpshared(&attr[i], PTHREAD_PROCESS_SHARED);
-		if (ret != 0)
-		{
-			printf("Test FAILED: Could not set pshared to PTHREAD_PROCESS_SHARED, error: %d\n", ret);
+		ret =
+		    pthread_condattr_setpshared(&attr[i],
+						PTHREAD_PROCESS_SHARED);
+		if (ret != 0) {
+			printf
+			    ("Test FAILED: Could not set pshared to PTHREAD_PROCESS_SHARED, error: %d\n",
+			     ret);
 			return PTS_FAIL;
 		}
 
 		/* Get 'pshared'.  It should be PTHREAD_PROCESS_SHARED. */
-		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0)
-		{
-			printf("Test FAILED: obtaining the wrong process-shared attribute, expected PTHREAD_PROCESS_SHARED, but got: %d\n", pshared);
+		if (pthread_condattr_getpshared(&attr[i], &pshared) != 0) {
+			printf
+			    ("Test FAILED: obtaining the wrong process-shared attribute, expected PTHREAD_PROCESS_SHARED, but got: %d\n",
+			     pshared);
 			return PTS_FAIL;
 		}
 
-		if (pshared != PTHREAD_PROCESS_SHARED)
-		{
-			printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
+		if (pshared != PTHREAD_PROCESS_SHARED) {
+			printf("Test FAILED: Incorrect pshared value: %d\n",
+			       pshared);
 			return PTS_FAIL;
 		}
 
 		/* Destory the cond attributes object */
-		if (pthread_condattr_destroy(&attr[i]) != 0)
-		{
+		if (pthread_condattr_destroy(&attr[i]) != 0) {
 			perror("Error at pthread_condattr_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/2-1.c
index ab6c00a..9f8d74a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_setpshared/2-1.c
@@ -31,42 +31,42 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_condattr_t attr;
 	int ret;
 
 	/* Initialize a cond attributes object */
-	if (pthread_condattr_init(&attr) != 0)
-	{
+	if (pthread_condattr_init(&attr) != 0) {
 		perror("Error at pthread_condattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set 'pshared' to INVALID_PSHARED_VALUE. */
-	ret=pthread_condattr_setpshared(&attr, INVALID_PSHARED_VALUE);
-	if (ret != 0)
-	{
-		if (ret == EINVAL)
-		{
+	ret = pthread_condattr_setpshared(&attr, INVALID_PSHARED_VALUE);
+	if (ret != 0) {
+		if (ret == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Invalid return code, expected 0 or EINVAL, but got: %d\n", ret);
+		printf
+		    ("Test FAILED: Invalid return code, expected 0 or EINVAL, but got: %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
 	/* Destory the cond attributes object */
-	if (pthread_condattr_destroy(&attr) != 0)
-	{
+	if (pthread_condattr_destroy(&attr) != 0) {
 		perror("Error at pthread_condattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	printf("Test PASSED: NOTE*: Returned 0 when passed an invalid 'pshared', but standard says 'may' fail.\n");
+	printf
+	    ("Test PASSED: NOTE*: Returned 0 when passed an invalid 'pshared', but standard says 'may' fail.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-1.c
index 5a91331..ba07646 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-1.c
@@ -29,19 +29,17 @@
 {
 	pthread_t main_th, new_th;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Obtain the thread ID of this main function */
-	main_th=pthread_self();
+	main_th = pthread_self();
 
 	/* Compare the thread ID of the new thread to the main thread.
 	 * They should be different.  If not, the test fails. */
-	if (pthread_equal(new_th, main_th) != 0)
-	{
+	if (pthread_equal(new_th, main_th) != 0) {
 		printf("Test FAILED: A new thread wasn't created\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-2.c
index 98ed51c..acc6c4b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-2.c
@@ -36,16 +36,14 @@
 {
 	pthread_t new_th;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) < 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) < 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Try to cancel the newly created thread.  If an error is returned,
 	 * then the thread wasn't created successfully. */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Test FAILED: A new thread wasn't created\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-3.c
index f41bb10..d8f1dd6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-3.c
@@ -37,8 +37,7 @@
 	/* Set the action for SIGALRM to generate an error if it is
 	 * reached. This is because if SIGALRM was sent, then the
 	 * test timed out. */
-	if (signal(SIGALRM, alarm_handler) == SIG_ERR)
-	{
+	if (signal(SIGALRM, alarm_handler) == SIG_ERR) {
 		printf("Error in signal()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -47,8 +46,7 @@
 	alarm(5);
 
 	/* Create a new thread. */
-	if (pthread_create(&a, NULL, a_thread_function, NULL) != 0)
-	{
+	if (pthread_create(&a, NULL, a_thread_function, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-4.c
index cb3ce60..5deb31b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-4.c
@@ -29,31 +29,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -96,136 +96,151 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-struct testdata
-{
+struct testdata {
 	pthread_t tid;
-	pid_t	  pid;
-	sem_t	* sem;
+	pid_t pid;
+	sem_t *sem;
 };
 
-int global; /* This value is used to check both threads share the same process memory (and not a copy) */
+int global;			/* This value is used to check both threads share the same process memory (and not a copy) */
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
-	struct testdata * td=(struct testdata *) arg;
+	struct testdata *td = (struct testdata *)arg;
 	pthread_t mytid;
 	pid_t mypid;
 	int ret = 0;
 
 	/* Compare the process IDs */
-	mypid=getpid();
-	#if VERBOSE > 0
+	mypid = getpid();
+#if VERBOSE > 0
 	output("  Main pid: %i  thread pid: %i\n", td->pid, mypid);
-	#endif
+#endif
 
-	if (mypid != td->pid)
-	{
-		FAILED("New thread does not belong to the same process as its parent thread");
+	if (mypid != td->pid) {
+		FAILED
+		    ("New thread does not belong to the same process as its parent thread");
 	}
 
 	/* Compare the threads IDs */
 	mytid = pthread_self();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	/* pthread_t is a pointer with Linux/nptl. This output can be erroneous for other arcs */
 	output("  Main tid: %p  thread tid: %p\n", td->tid, mytid);
-	#endif
+#endif
 
-	if (pthread_equal(mytid, td->tid) != 0)
-	{
-		FAILED("The created thread has the same thread ID as its parent");
+	if (pthread_equal(mytid, td->tid) != 0) {
+		FAILED
+		    ("The created thread has the same thread ID as its parent");
 	}
 
 	/* Change the global value */
-	global++;
+	global ++;
 
 	/* Post the semaphore to unlock the main thread in case of a detached thread */
-	do { ret = sem_post(td->sem); }
+	do {
+		ret = sem_post(td->sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return arg;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	struct testdata td;
-	void * rval;
+	void *rval;
 	pthread_t child;
 	int i;
 
 	output_init();
 
-	td.tid=pthread_self();
-	td.pid=getpid();
+	td.tid = pthread_self();
+	td.pid = getpid();
 
 	scenar_init();
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", i,
+		       scenarii[i].descr);
+#endif
 
 		td.sem = &scenarii[i].sem;
 
-		global = 2*i;
+		global = 2 * i;
 
 		ret = pthread_create(&child, &scenarii[i].ta, threaded, &td);
-		switch (scenarii[i].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
+		switch (scenarii[i].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
+			}
+			break;
 
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
 
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
 		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[i].detached == 0)
-			{
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[i].detached == 0) {
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
 
-				if (rval != &td)
-				{
-					FAILED("Could not get the thread return value. Did it execute?");
+				if (rval != &td) {
+					FAILED
+					    ("Could not get the thread return value. Did it execute?");
+				}
+			} else {
+				/* Just wait for the thread terminate */
+				do {
+					ret = sem_wait(td.sem);
+				}
+				while ((ret == -1) && (errno == EINTR));
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to post the semaphore");
 				}
 			}
-			else
-			{
-				/* Just wait for the thread terminate */
-				do { ret = sem_wait(td.sem); }
-				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
-			}
 
-			if (global != (2*i + 1))
-			{
+			if (global !=(2 * i + 1)) {
 				/* Maybe a possible issue with CPU memory-caching here? */
-				FAILED("The threads do not share the same process memory.");
+				FAILED
+				    ("The threads do not share the same process memory.");
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
index f2ac27d..0a6b261 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
@@ -35,32 +35,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -89,7 +89,7 @@
 /********************************************************************************************/
 /***********************************    Test cases  *****************************************/
 /********************************************************************************************/
-#define STD_MAIN /* This allows main() to be defined in the included file */
+#define STD_MAIN		/* This allows main() to be defined in the included file */
 #include "../testfrmw/threads_scenarii.c"
 
 /* This file will define the following objects:
@@ -104,44 +104,46 @@
 /********************************************************************************************/
 
 /* The overflow function is used to test the stack overflow */
-void * overflow(void * arg)
+void *overflow(void *arg)
 {
-	void * current;
-	void * pad[50]; /* We want to consume the stack quickly */
-	long stacksize = sysconf(_SC_THREAD_STACK_MIN); /* make sure we touch the current stack memory */
-	int ret=0;
+	void *current;
+	void *pad[50];		/* We want to consume the stack quickly */
+	long stacksize = sysconf(_SC_THREAD_STACK_MIN);	/* make sure we touch the current stack memory */
+	int ret = 0;
 
-	pad[1]=NULL; /* so compiler stops complaining about unused variables */
+	pad[1] = NULL;		/* so compiler stops complaining about unused variables */
 
-	if (arg == NULL)
-	{
+	if (arg == NULL) {
 		/* first call */
 		current = overflow(&current);
 
 		/* Terminate the overflow thread */
 		/* Post the semaphore to unlock the main thread in case of a detached thread */
-		do { ret = sem_post(&scenarii[sc].sem); }
+		do {
+			ret = sem_post(&scenarii[sc].sem);
+		}
 		while ((ret == -1) && (errno == EINTR));
-		if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Failed to post the semaphore");
+		}
 		return NULL;
 	}
 
 	/* we cast the pointers into long, which might be a problem on some architectures... */
-	if (((long)arg) < ((long)&current))
-	{
+	if (((long)arg) < ((long)&current)) {
 		/* the stack is growing up */
-		if (((long)&current) - ((long)arg) >= stacksize)
-		{
-			output("Growing up stack started below %p and we are currently up to %p\n", arg, &current);
+		if (((long)&current) - ((long)arg) >= stacksize) {
+			output
+			    ("Growing up stack started below %p and we are currently up to %p\n",
+			     arg, &current);
 			return (void *)0;
 		}
-	}
-	else
-	{
+	} else {
 		/* the stack is growing down */
-		if (((long)arg) - ((long)&current) >= stacksize)
-		{
-			output("Growing down stack started upon %p and we are currently down to %p\n", arg, &current);
+		if (((long)arg) - ((long)&current) >= stacksize) {
+			output
+			    ("Growing down stack started upon %p and we are currently down to %p\n",
+			     arg, &current);
 			return (void *)0;
 		}
 	}
@@ -152,94 +154,113 @@
 	}
 }
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
-	#if VERBOSE > 4
+#if VERBOSE > 4
 	output("Thread %i starting...\n", sc);
-	#endif
+#endif
 
-   /* Alternate stack test */
-   	if (scenarii[sc].bottom != NULL)
-	{
-		#ifdef WITHOUT_XOPEN
-		output("Unable to test the alternate stack feature; need an integer pointer cast\n");
-		#else
+	/* Alternate stack test */
+	if (scenarii[sc].bottom != NULL) {
+#ifdef WITHOUT_XOPEN
+		output
+		    ("Unable to test the alternate stack feature; need an integer pointer cast\n");
+#else
 		intptr_t stack_start, stack_end, current_pos;
 
 		stack_start = (intptr_t) scenarii[sc].bottom;
-		stack_end = stack_start + (intptr_t)sysconf(_SC_THREAD_STACK_MIN);
-		current_pos = (intptr_t)&ret;
+		stack_end =
+		    stack_start + (intptr_t) sysconf(_SC_THREAD_STACK_MIN);
+		current_pos = (intptr_t) & ret;
 
-		#if VERBOSE > 2
+#if VERBOSE > 2
 		output("Stack bottom: %p\n", scenarii[sc].bottom);
-		output("Stack end   : %p (stack is 0x%lx bytes)\n", (void *)stack_end, stack_end - stack_start);
+		output("Stack end   : %p (stack is 0x%lx bytes)\n",
+		       (void *)stack_end, stack_end - stack_start);
 		output("Current pos : %p\n", &ret);
-		#endif
-		if ((stack_start > current_pos) || (current_pos > stack_end))
-		{  FAILED("The specified stack was not used.\n");  }
-
-		#endif // WITHOUT_XOPEN
+#endif
+		if ((stack_start > current_pos) || (current_pos > stack_end)) {
+			FAILED("The specified stack was not used.\n");
+		}
+#endif // WITHOUT_XOPEN
 	}
 
-   /* Guard size test */
-   	if ((scenarii[sc].bottom == NULL)  /* no alternative stack was specified */
-	    && (scenarii[sc].guard == 2)   /* guard area size is 1 memory page */
-    	    && (scenarii[sc].altsize == 1))/* We know the stack size */
-	{
+	/* Guard size test */
+	if ((scenarii[sc].bottom == NULL)	/* no alternative stack was specified */
+	    &&(scenarii[sc].guard == 2)	/* guard area size is 1 memory page */
+	    &&(scenarii[sc].altsize == 1)) {	/* We know the stack size */
 		pid_t child, ctrl;
 		int status;
 
-		child=fork(); /* We'll test the feature in another process as this test may segfault */
+		child = fork();	/* We'll test the feature in another process as this test may segfault */
 
-		if (child == -1)  {  UNRESOLVED(errno, "Failed to fork()");  }
+		if (child == -1) {
+			UNRESOLVED(errno, "Failed to fork()");
+		}
 
-		if (child != 0) /* father */
-		{
+		if (child != 0) {	/* father */
 			/* Just wait for the child and check its return value */
 			ctrl = waitpid(child, &status, 0);
-			if (ctrl != child)  {  UNRESOLVED(errno, "Failed to wait for process termination");  }
-
-			if (WIFEXITED(status)) /* The process exited */
-			{
-				if (WEXITSTATUS(status) == 0)
-				{  FAILED("Overflow into the guard area did not fail");  }
-				if (WEXITSTATUS(status) == PTS_UNRESOLVED)
-				{  UNRESOLVED(-1, "The child process returned unresolved status");  }
-			#if VERBOSE > 4
-				else
-				{  output("The child process returned: %i\n", WEXITSTATUS(status));  }
+			if (ctrl != child) {
+				UNRESOLVED(errno,
+					   "Failed to wait for process termination");
 			}
-			else
-			{
+
+			if (WIFEXITED(status)) {	/* The process exited */
+				if (WEXITSTATUS(status) == 0) {
+					FAILED
+					    ("Overflow into the guard area did not fail");
+				}
+				if (WEXITSTATUS(status) == PTS_UNRESOLVED) {
+					UNRESOLVED(-1,
+						   "The child process returned unresolved status");
+				}
+#if VERBOSE > 4
+				else {
+					output
+					    ("The child process returned: %i\n",
+					     WEXITSTATUS(status));
+				}
+			} else {
 				output("The child process did not returned\n");
 				if (WIFSIGNALED(status))
-					output("It was killed with signal %i\n", WTERMSIG(status));
+					output("It was killed with signal %i\n",
+					       WTERMSIG(status));
 				else
-					output("neither was it killed. (status = %i)\n", status);
-			#endif
+					output
+					    ("neither was it killed. (status = %i)\n",
+					     status);
+#endif
 			}
 		}
 
-		if (child == 0) /* this is the new process */
-		{
+		if (child == 0) {	/* this is the new process */
 			pthread_t th;
 
-			ret = pthread_create(&th, &scenarii[sc].ta, overflow, NULL);  /* Create a new thread with the same attributes */
-			if (ret != 0) {  UNRESOLVED(ret, "Unable to create another thread with the same attributes in the new process");  }
-
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(th, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+			ret = pthread_create(&th, &scenarii[sc].ta, overflow, NULL);	/* Create a new thread with the same attributes */
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to create another thread with the same attributes in the new process");
 			}
-			else
-			{
+
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(th, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 
 			/* Terminate the child process here */
@@ -248,9 +269,13 @@
 	}
 
 	/* Post the semaphore to unlock the main thread in case of a detached thread */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return arg;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-6.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-6.c
index af96065..9451a77 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-6.c
@@ -26,32 +26,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -83,7 +83,7 @@
 /********************************************************************************************/
 /***********************************    Test cases  *****************************************/
 /********************************************************************************************/
-#define STD_MAIN /* This allows main() to be defined in the included file */
+#define STD_MAIN		/* This allows main() to be defined in the included file */
 
 #include "../testfrmw/threads_scenarii.c"
 
@@ -99,179 +99,220 @@
 /********************************************************************************************/
 
 /* The 2 following functions are used for the scheduling tests */
-void * lp_func(void * arg)
+void *lp_func(void *arg)
 {
-	int * ctrl = (int *) arg;
-	*ctrl=2;
+	int *ctrl = (int *)arg;
+	*ctrl = 2;
 	return NULL;
 }
 
-void * hp_func(void * arg)
+void *hp_func(void *arg)
 {
-	volatile int *ctrl = (int *) arg;
-	int dummy=0, i;
-	do
-	{
+	volatile int *ctrl = (int *)arg;
+	int dummy = 0, i;
+	do {
 		/* some dummy task */
 		dummy += 3;
 		dummy %= 17;
 		dummy *= 47;
-		for (i=0; i<1000000000; i++);
-		#if VERBOSE > 6
+		for (i = 0; i < 1000000000; i++) ;
+#if VERBOSE > 6
 		output("%p\n", pthread_self());
-		#endif
+#endif
 	}
 	while (*ctrl == 0);
 	return NULL;
 }
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
-	#if VERBOSE > 4
+#if VERBOSE > 4
 	output("Thread %i starting...\n", sc);
-	#endif
+#endif
 
-   /* Scheduling (priority) tests */
+	/* Scheduling (priority) tests */
 	if ((sysconf(_SC_THREAD_PRIORITY_SCHEDULING) > 0)
-		&& (scenarii[sc].explicitsched != 0)
-		&& (scenarii[sc].schedpolicy != 0)
-		&& (scenarii[sc].schedparam == 1))
-	{
+	    && (scenarii[sc].explicitsched != 0)
+	    && (scenarii[sc].schedpolicy != 0)
+	    && (scenarii[sc].schedparam == 1)) {
 		/* We will create NCPU threads running with a high priority with the same sched policy policy
-		 and one with a low-priority.
-		  The low-priority thread should not run until the other threads stop running,
-		 unless the machine has more than NCPU processors... */
+		   and one with a low-priority.
+		   The low-priority thread should not run until the other threads stop running,
+		   unless the machine has more than NCPU processors... */
 
-		pthread_t hpth[NCPU]; 	/* High priority threads */
-		pthread_t lpth; 	/* Low Priority thread */
-		int ctrl;		/* Check value */
+		pthread_t hpth[NCPU];	/* High priority threads */
+		pthread_t lpth;	/* Low Priority thread */
+		int ctrl;	/* Check value */
 		pthread_attr_t ta;
 		struct sched_param sp;
 		int policy;
-		int i=0;
+		int i = 0;
 		struct timespec now, timeout;
 
 		/* Start with checking we are executing with the required parameters */
 		ret = pthread_getschedparam(pthread_self(), &policy, &sp);
-		if (ret != 0)  {  UNRESOLVED(ret , "Failed to get current thread policy");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to get current thread policy");
+		}
 
 		if (((scenarii[sc].schedpolicy == 1) && (policy != SCHED_FIFO))
-		   || ((scenarii[sc].schedpolicy == 2) && (policy != SCHED_RR)))
-		{
-			FAILED("The thread is not using the scheduling policy that was required");
+		    || ((scenarii[sc].schedpolicy == 2)
+			&& (policy != SCHED_RR))) {
+			FAILED
+			    ("The thread is not using the scheduling policy that was required");
 		}
-		if (((scenarii[sc].schedparam == 1) && (sp.sched_priority != sched_get_priority_max(policy)))
-		   || ((scenarii[sc].schedparam ==-1) && (sp.sched_priority != sched_get_priority_min(policy))))
-		{
+		if (((scenarii[sc].schedparam == 1)
+		     && (sp.sched_priority != sched_get_priority_max(policy)))
+		    || ((scenarii[sc].schedparam == -1)
+			&& (sp.sched_priority !=
+			    sched_get_priority_min(policy)))) {
 
-			FAILED("The thread is not using the scheduling parameter that was required");
+			FAILED
+			    ("The thread is not using the scheduling parameter that was required");
 		}
 
-		ctrl = 0; /* Initial state */
+		ctrl = 0;	/* Initial state */
 
 		/* Get the policy information */
 		ret = pthread_attr_getschedpolicy(&scenarii[sc].ta, &policy);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to read sched policy");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to read sched policy");
+		}
 
 		/* We put a timeout cause the test might lock the machine when it runs */
 		alarm(60);
 
 		/* Create the high priority threads */
 		ret = pthread_attr_init(&ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to initialize a thread attribute object");
+		}
 
 		ret = pthread_attr_setinheritsched(&ta, PTHREAD_EXPLICIT_SCHED);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to set inheritsched attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to set inheritsched attribute");
+		}
 
 		ret = pthread_attr_setschedpolicy(&ta, policy);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to set the sched policy");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to set the sched policy");
+		}
 
 		sp.sched_priority = sched_get_priority_max(policy) - 1;
 
 		ret = pthread_attr_setschedparam(&ta, &sp);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the sched param");  }
-
-		#if VERBOSE > 1
-		output("Starting %i high- and 1 low-priority threads.\n", NCPU);
-		#endif
-		for (i=0; i<NCPU; i++)
-		{
-			ret = pthread_create(&hpth[i], &ta, hp_func, &ctrl);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to create enough threads");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to set the sched param");
 		}
-		#if VERBOSE > 5
+#if VERBOSE > 1
+		output("Starting %i high- and 1 low-priority threads.\n", NCPU);
+#endif
+		for (i = 0; i < NCPU; i++) {
+			ret = pthread_create(&hpth[i], &ta, hp_func, &ctrl);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to create enough threads");
+			}
+		}
+#if VERBOSE > 5
 		output("The %i high-priority threads are running\n", NCPU);
-		#endif
+#endif
 
 		/* Create the low-priority thread */
 		sp.sched_priority = sched_get_priority_min(policy);
 
 		ret = pthread_attr_setschedparam(&ta, &sp);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the sched param");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to set the sched param");
+		}
 
 		ret = pthread_create(&lpth, &ta, lp_func, &ctrl);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create enough threads");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create enough threads");
+		}
 
 		/* Keep going */
 		ret = clock_gettime(CLOCK_REALTIME, &now);
-		if (ret != 0)  {  UNRESOLVED(errno, "Failed to read current time");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Failed to read current time");
+		}
 
 		timeout.tv_sec = now.tv_sec;
 		timeout.tv_nsec = now.tv_nsec + 500000000;
-		while (timeout.tv_nsec >= 1000000000)
-		{
+		while (timeout.tv_nsec >= 1000000000) {
 			timeout.tv_sec++;
 			timeout.tv_nsec -= 1000000000;
 		}
 
-		do
-		{
-			if (ctrl != 0)
-			{
-				output("The low priority thread executed. This might be normal if you have more than %i CPU.\n", NCPU + 1);
-				FAILED("Low priority thread executed -- the sched parameters are ignored?");
+		do {
+			if (ctrl != 0) {
+				output
+				    ("The low priority thread executed. This might be normal if you have more than %i CPU.\n",
+				     NCPU + 1);
+				FAILED
+				    ("Low priority thread executed -- the sched parameters are ignored?");
 			}
 			ret = clock_gettime(CLOCK_REALTIME, &now);
-			if (ret != 0)  {  UNRESOLVED(errno, "Failed to read current time");  }
-			#if VERBOSE > 5
-			output("Time: %d.%09d (to: %d.%09d)\n", now.tv_sec, now.tv_nsec, timeout.tv_sec, timeout.tv_nsec);
-			#endif
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to read current time");
+			}
+#if VERBOSE > 5
+			output("Time: %d.%09d (to: %d.%09d)\n", now.tv_sec,
+			       now.tv_nsec, timeout.tv_sec, timeout.tv_nsec);
+#endif
 		}
-		while ((now.tv_sec <= timeout.tv_sec) && (now.tv_nsec <= timeout.tv_nsec));
+		while ((now.tv_sec <= timeout.tv_sec)
+		       && (now.tv_nsec <= timeout.tv_nsec));
 
 		/* Ok the low priority thread did not execute :) */
 
 		/* tell the other high priority to terminate */
 		ctrl = 1;
 
-		for (i=0; i<NCPU; i++)
-		{
+		for (i = 0; i < NCPU; i++) {
 			ret = pthread_join(hpth[i], NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to join a thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to join a thread");
+			}
 		}
 
 		/* Ok so now the low priority should execute when we stop this one (or earlier). */
 		ret = pthread_join(lpth, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the low priority thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to join the low priority thread");
+		}
 
 		/* We just check that it executed */
-		if (ctrl != 2)  {  FAILED("Joined the low-priority thread but it did not execute.");  }
-
-		#if VERBOSE > 1
-		output("The scheduling parameter was set accordingly to the thread attribute.\n");
-		#endif
+		if (ctrl != 2) {
+			FAILED
+			    ("Joined the low-priority thread but it did not execute.");
+		}
+#if VERBOSE > 1
+		output
+		    ("The scheduling parameter was set accordingly to the thread attribute.\n");
+#endif
 
 		/* We're done. */
 		ret = pthread_attr_destroy(&ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a thread attribute object");
+		}
 	}
 
 	/* Post the semaphore to unlock the main thread in case of a detached thread */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return arg;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/11-1.c
index 22cfbdc..6aeccd1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/11-1.c
@@ -25,14 +25,13 @@
 void *a_thread_func()
 {
 	clockid_t cpuclock;
-	struct timespec ts = {.tv_sec = 1, .tv_nsec = 1};
+	struct timespec ts = {.tv_sec = 1,.tv_nsec = 1 };
 	pthread_getcpuclockid(pthread_self(), &cpuclock);
 	clock_gettime(cpuclock, &ts);
 	/* Just test the tv_sec field here. */
-	if (ts.tv_sec != 0)
-	{
+	if (ts.tv_sec != 0) {
 		printf("ts.tv_sec: %ld, ts.tv_nsec: %ld\n",
-			ts.tv_sec, ts.tv_nsec);
+		       ts.tv_sec, ts.tv_nsec);
 		exit(PTS_FAIL);
 	}
 	pthread_exit(0);
@@ -52,8 +51,7 @@
 		return PTS_UNSUPPORTED;
 	}
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/12-1.c
index 408e113..2c22fb3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/12-1.c
@@ -33,11 +33,10 @@
 
 	/* Create new thread and check the return value. */
 	ret = pthread_create(&new_th, NULL, a_thread_func, NULL);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		if ((ret != EINVAL) && (ret != EAGAIN) && (ret != EPERM))
 
-		printf("Test FAILED: Wrong return code: %d\n", ret);
+			printf("Test FAILED: Wrong return code: %d\n", ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/14-1.c
index 4409c5c..16458db 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/14-1.c
@@ -25,35 +25,35 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
- #include <time.h>
- #include <signal.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
+#include <time.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -98,48 +98,52 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-char woken=0;
-unsigned long count_ope=0;
+char do_it = 1;
+char woken = 0;
+unsigned long count_ope = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 
@@ -151,89 +155,113 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* Thread function -- almost does nothing */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	/* return */
 	return arg;
 }
 
 /* Test function -- creates the threads and check that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
 	sc = 0;
 
-	while (do_it)
-	{
-		#if VERBOSE > 5
+	while (do_it) {
+#if VERBOSE > 5
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		count_ope++;
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
-		if (ret == EINTR)  {  FAILED("pthread_create returned EINTR");  }
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 5
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
-				;
+		if (ret == EINTR) {
+			FAILED("pthread_create returned EINTR");
 		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 5
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+			;
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 		}
 
@@ -245,7 +273,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -259,34 +287,43 @@
 	scenar_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
-
-	if ((ret = pthread_create(&th_work, NULL, test, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_work, NULL, test, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -295,34 +332,41 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
+	if ((ret = pthread_join(th_work, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
 
 	scenar_fini();
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  %d thread creations.\n", count_ope);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/15-1-buildonly.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/15-1-buildonly.c
index fc19ea9..f650415 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/15-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/15-1-buildonly.c
@@ -27,33 +27,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -97,53 +97,63 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-void * teststack(void * arg)
+void *teststack(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	*(int **)arg = &ret;
 	return NULL;
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
-	int * child_stack;
+	int *child_stack;
 	pthread_t gchild;
 
 	int sz = sysconf(_SC_THREAD_STACK_MIN);
 
-	if (scenarii[sc].bottom != NULL)
-	{
-		#if VERBOSE > 1
+	if (scenarii[sc].bottom != NULL) {
+#if VERBOSE > 1
 		output("Processing test\n");
-		#endif
+#endif
 
 		/* Create a new thread and get a location inside its stack */
 		ret = pthread_create(&gchild, NULL, teststack, &child_stack);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create a thread with default attribute"); }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to create a thread with default attribute");
+		}
 
 		ret = pthread_join(gchild, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the test thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the test thread");
+		}
 
 		/* Check the new thread stack location was outside of the current thread location */
 		/* We convert all the @ to longs */
-		#if VERBOSE > 4
-		output("Current stack : %p -> %p\n", scenarii[sc].bottom, sz + (long)scenarii[sc].bottom);
+#if VERBOSE > 4
+		output("Current stack : %p -> %p\n", scenarii[sc].bottom,
+		       sz + (long)scenarii[sc].bottom);
 		output("Child location: %p\n", child_stack);
-		#endif
+#endif
 
 		if ((((long)scenarii[sc].bottom) < ((long)child_stack))
-		   && (((long)child_stack) < (((long)scenarii[sc].bottom) + sz)))
-	   	{
-			FAILED("The new thread inherited th alternate stack from its parent");
+		    && (((long)child_stack) <
+			(((long)scenarii[sc].bottom) + sz))) {
+			FAILED
+			    ("The new thread inherited th alternate stack from its parent");
 		}
 	}
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	/* return */
 	return arg;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/2-1.c
index 361ccde..f486db8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/2-1.c
@@ -38,22 +38,19 @@
 
 	/* Create a new thread.  The default attribute should be that
 	 * it is joinable. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* The new thread should be able to be joined. */
-	if (pthread_join(new_th, NULL) == EINVAL)
-	{
+	if (pthread_join(new_th, NULL) == EINVAL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* The new thread should be able to be detached. */
-	if (pthread_detach(new_th) == EINVAL)
-	{
+	if (pthread_detach(new_th) == EINVAL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-1.c
index 626409c..4d6fc7a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-1.c
@@ -26,24 +26,25 @@
 #include <errno.h>
 #include "posixtest.h"
 
-# define TIMEOUT 10	/* Timeout value of 10 seconds. */
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define TIMEOUT 10		/* Timeout value of 10 seconds. */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 
 void *a_thread_func()
 {
 	/* Indicate to main() that the thread was created. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for main to detach change the attribute object and try and detach this thread.
 	 * Wait for a timeout value of 10 seconds before timing out if the thread was not able
 	 * to be detached. */
 	sleep(TIMEOUT);
 
-	printf("Test FAILED: Did not detach the thread, main still waiting for it to end execution.\n");
-	pthread_exit((void*)PTS_FAIL);
+	printf
+	    ("Test FAILED: Did not detach the thread, main still waiting for it to end execution.\n");
+	pthread_exit((void *)PTS_FAIL);
 	return NULL;
 }
 
@@ -55,42 +56,41 @@
 
 	/* Initializing */
 	sem1 = INMAIN;
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Error intializing attribute object\n");
 		return PTS_UNRESOLVED;
 
 	}
 
 	/* Make the new attribute object joinable */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) !=
+	    0) {
 		perror("Error setting the detached state of the attribute\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread and pass it the attribute object that will
 	 * make it joinable. */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* Now change the attribute object to be in a detached state */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) !=
+	    0) {
 		perror("Error setting the detached state of the attribute\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* The new thread should still be able to be detached. */
-	if ((ret=pthread_detach(new_th)) == EINVAL)
-	{
-		printf("Test FAILED: pthread_detach failed on joinable thread. Return value is %d\n", ret);
+	if ((ret = pthread_detach(new_th)) == EINVAL) {
+		printf
+		    ("Test FAILED: pthread_detach failed on joinable thread. Return value is %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
index f428d14..78f5181 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
@@ -40,33 +40,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -109,55 +109,61 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-sem_t semsync[2]; /* These semaphores will only be used in child process! */
+sem_t semsync[2];		/* These semaphores will only be used in child process! */
 
 /* The overflow function is used to test the stack overflow */
-void * overflow(void * arg)
+void *overflow(void *arg)
 {
-	void * current;
-	void * pad[50]; /* We want to consume the stack quickly */
-	long stacksize = sysconf(_SC_THREAD_STACK_MIN); /* make sure we touch the current stack memory */
+	void *current;
+	void *pad[50];		/* We want to consume the stack quickly */
+	long stacksize = sysconf(_SC_THREAD_STACK_MIN);	/* make sure we touch the current stack memory */
 
-	pad[1]=NULL; /* so compiler stops complaining about unused variables */
+	pad[1] = NULL;		/* so compiler stops complaining about unused variables */
 	int ret = 0;
 
-	if (arg == NULL)
-	{
+	if (arg == NULL) {
 		/* first call */
 
 		/* Synchronize with the parent */
-		do { ret = sem_wait(&semsync[0]); }
+		do {
+			ret = sem_wait(&semsync[0]);
+		}
 		while ((ret == -1) && (errno == EINTR));
-		if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Failed to wait for the semaphore");
+		}
 
 		/* Go to recursion */
 		current = overflow(&current);
 
 		/* Terminated */
-		do { ret = sem_post(&semsync[1]); }
+		do {
+			ret = sem_post(&semsync[1]);
+		}
 		while ((ret == -1) && (errno == EINTR));
-		if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Failed to post the semaphore");
+		}
 
 		/* Terminate the overflow thread */
 		return current;
 	}
 
 	/* we cast the pointers into long, which might be a problem on some architectures... */
-	if (((long)arg) < ((long)&current))
-	{
+	if (((long)arg) < ((long)&current)) {
 		/* the stack is growing up */
-		if (((long)&current) - ((long)arg) >= stacksize)
-		{
-			output("Growing up stack started below %p and we are currently up to %p\n", arg, &current);
+		if (((long)&current) - ((long)arg) >= stacksize) {
+			output
+			    ("Growing up stack started below %p and we are currently up to %p\n",
+			     arg, &current);
 			return (void *)0;
 		}
-	}
-	else
-	{
+	} else {
 		/* the stack is growing down */
-		if (((long)arg) - ((long)&current) >= stacksize)
-		{
-			output("Growing down stack started upon %p and we are currently down to %p\n", arg, &current);
+		if (((long)arg) - ((long)&current) >= stacksize) {
+			output
+			    ("Growing down stack started upon %p and we are currently down to %p\n",
+			     arg, &current);
 			return (void *)0;
 		}
 	}
@@ -180,48 +186,45 @@
 	int status;
 	int ret;
 
-	child=fork(); /* We'll test the feature in another process as this test may segfault */
+	child = fork();		/* We'll test the feature in another process as this test may segfault */
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		output("Failed to fork (%s)\n", strerror(errno));
 		return 2;
 	}
 
-	if (child != 0) /* father */
-	{
+	if (child != 0) {	/* father */
 		/* Just wait for the child and check its return value */
 		ctrl = waitpid(child, &status, 0);
-		if (ctrl != child)
-		{
-			output("Failed to wait for process termination (%s)\n", strerror(errno));
+		if (ctrl != child) {
+			output("Failed to wait for process termination (%s)\n",
+			       strerror(errno));
 			return 2;
 		}
 
-		if (WIFEXITED(status)) /* The process exited */
-		{
-			if (WEXITSTATUS(status) == 0)
-			{return 0;  } /* We were able to fill the stack */
-			if (WEXITSTATUS(status) == PTS_UNRESOLVED)
-			{
-				output("The child process returned unresolved status\n");
+		if (WIFEXITED(status)) {	/* The process exited */
+			if (WEXITSTATUS(status) == 0) {
+				return 0;
+			}	/* We were able to fill the stack */
+			if (WEXITSTATUS(status) == PTS_UNRESOLVED) {
+				output
+				    ("The child process returned unresolved status\n");
+				return 2;
+			} else {
+				output("The child process returned: %i\n",
+				       WEXITSTATUS(status));
 				return 2;
 			}
-			else
-			{
-				output("The child process returned: %i\n", WEXITSTATUS(status));
-				return 2;
-			}
-		}
-		else
-		{
-			#if VERBOSE > 4
+		} else {
+#if VERBOSE > 4
 			output("The child process did not return\n");
 			if (WIFSIGNALED(status))
-				output("It was killed with signal %i\n", WTERMSIG(status));
+				output("It was killed with signal %i\n",
+				       WTERMSIG(status));
 			else
-				output("neither was it killed. (status = %i)\n", status);
-			#endif
+				output("neither was it killed. (status = %i)\n",
+				       status);
+#endif
 		}
 
 		return 1;
@@ -231,52 +234,72 @@
 	/* this is the new process */
 	{
 		pthread_t th;
-		void * rc;
+		void *rc;
 		int detach;
 
 		/* Semaphore to force the child to wait */
-		ret = sem_init(&semsync[0], 0,0);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to init a semaphore");  }
+		ret = sem_init(&semsync[0], 0, 0);
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to init a semaphore");
+		}
 		/* Semaphore to detect thread ending */
-		ret = sem_init(&semsync[1], 0,0);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to init a semaphore");  }
+		ret = sem_init(&semsync[1], 0, 0);
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to init a semaphore");
+		}
 
-		ret = pthread_create(&th, ta, overflow, NULL);  /* Create a new thread with the same attributes */
-		if (ret != 0) {  UNRESOLVED(ret, "Unable to create a thread in the new process");  }
+		ret = pthread_create(&th, ta, overflow, NULL);	/* Create a new thread with the same attributes */
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to create a thread in the new process");
+		}
 
 		/* If we were asked to perform a change on ta, do it now. */
-		if (newsize)
-		{
+		if (newsize) {
 			ret = pthread_attr_setstacksize(ta, newsize);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the new stack size");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to set the new stack size");
+			}
 		}
 
 		/* Ok the child can run now */
-		do { ret = sem_post(&semsync[0]); }
+		do {
+			ret = sem_post(&semsync[0]);
+		}
 		while ((ret == -1) && (errno == EINTR));
-		if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Failed to post the semaphore");
+		}
 
 		/* Wait for its termination */
-		do { ret = sem_wait(&semsync[1]); }
+		do {
+			ret = sem_wait(&semsync[1]);
+		}
 		while ((ret == -1) && (errno == EINTR));
-		if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Failed to wait for the semaphore");
+		}
 
-		if (ta != NULL)
-		{
+		if (ta != NULL) {
 			ret = pthread_attr_getdetachstate(ta, &detach);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to get detach state from the thread attribute");  }
-		}
-		else
-		{
-			detach = PTHREAD_CREATE_JOINABLE; /* default */
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to get detach state from the thread attribute");
+			}
+		} else {
+			detach = PTHREAD_CREATE_JOINABLE;	/* default */
 		}
 
-		if (detach == PTHREAD_CREATE_JOINABLE)
-		{
+		if (detach == PTHREAD_CREATE_JOINABLE) {
 			ret = pthread_join(th, &rc);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
-			if (rc != (void *)0)
-			{  UNRESOLVED((int)(long)rc, "The overflow function returned an unexpected value");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to join a thread");
+			}
+			if (rc != (void *)0) {
+				UNRESOLVED((int)(long)rc,
+					   "The overflow function returned an unexpected value");
+			}
 		}
 
 		/* Terminate the child process here */
@@ -284,42 +307,55 @@
 	}
 }
 
-typedef struct
-{
+typedef struct {
 	pthread_barrier_t bar;
 	int policy;
 	struct sched_param param;
 } testdata_t;
 
-void * schedtest(void * arg)
+void *schedtest(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
-	int newpol, ret=0;
+	testdata_t *td = (testdata_t *) arg;
+	int newpol, ret = 0;
 	struct sched_param newparam;
 
 	/* Read the current sched policy & param */
-	ret = pthread_getschedparam(pthread_self(), &(td->policy), &(td->param));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to read current thread policy / param");  }
+	ret =
+	    pthread_getschedparam(pthread_self(), &(td->policy), &(td->param));
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to read current thread policy / param");
+	}
 
 	/* sync 1 */
 	ret = pthread_barrier_wait(&(td->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Failed to synchronize on the barrier");
+	}
 
 	/* sync 2 */
 	ret = pthread_barrier_wait(&(td->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Failed to synchronize on the barrier");
+	}
 
 	/* Read the current sched policy & param */
-	ret = pthread_getschedparam(pthread_self(), &(td->policy), &(td->param));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to read current thread policy / param");  }
+	ret =
+	    pthread_getschedparam(pthread_self(), &(td->policy), &(td->param));
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to read current thread policy / param");
+	}
 
 	/* sync 3 */
 	ret = pthread_barrier_wait(&(td->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Failed to synchronize on the barrier");
+	}
 
 	/* sync 4 */
 	ret = pthread_barrier_wait(&(td->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Failed to synchronize on the barrier");
+	}
 
 	/* Change the current sched policy & param */
 	if (td->policy == SCHED_RR)
@@ -333,30 +369,38 @@
 		newparam.sched_priority--;
 
 	ret = pthread_setschedparam(pthread_self(), newpol, &newparam);
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	if (ret != 0)
-		output("Changing the current thread sched policy failed with error: %s\n", strerror(ret));
-	#endif
-	#if VERBOSE > 2
+		output
+		    ("Changing the current thread sched policy failed with error: %s\n",
+		     strerror(ret));
+#endif
+#if VERBOSE > 2
 	else
 		output("Executing thread scheduling policy changed\n");
-	#endif
+#endif
 
 	/* sync 5 */
 	ret = pthread_barrier_wait(&(td->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Failed to synchronize on the barrier");
+	}
 
 	/* Post the sem in case of a detached thread */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return NULL;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	int do_stack_tests;
 	int do_sched_tests;
 
@@ -364,271 +408,413 @@
 	output_init();
 
 	/* Test abilities */
-	do_sched_tests = (sysconf(_SC_THREAD_PRIORITY_SCHEDULING)>0?1:0);
-	do_stack_tests = (test_stack(NULL,0)==0?1:0);
-	#if VERBOSE > 0
-	output("Test starting\n Stack tests %s be executed.\n Sched tests %s be executed.\n",
-		do_stack_tests?"will":"won't",
-		do_sched_tests?"will":"won't");
-	#endif
+	do_sched_tests = (sysconf(_SC_THREAD_PRIORITY_SCHEDULING) > 0 ? 1 : 0);
+	do_stack_tests = (test_stack(NULL, 0) == 0 ? 1 : 0);
+#if VERBOSE > 0
+	output
+	    ("Test starting\n Stack tests %s be executed.\n Sched tests %s be executed.\n",
+	     do_stack_tests ? "will" : "won't",
+	     do_sched_tests ? "will" : "won't");
+#endif
 
 	/* Initialize thread attribute objects */
 	scenar_init();
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
-		if (do_stack_tests)
-		{
-	   /* stack grow test */
-	   		/* We need the thread attribute to specify a minimal stack */
-			if ((scenarii[sc].altstack == 0) && (scenarii[sc].altsize == 1))
-			{
-				#if VERBOSE > 2
+		if (do_stack_tests) {
+			/* stack grow test */
+			/* We need the thread attribute to specify a minimal stack */
+			if ((scenarii[sc].altstack == 0)
+			    && (scenarii[sc].altsize == 1)) {
+#if VERBOSE > 2
 				output("Processing stack grow test\n");
-				#endif
+#endif
 
-				ret = test_stack(&scenarii[sc].ta, 2*sysconf(_SC_THREAD_STACK_MIN));
+				ret =
+				    test_stack(&scenarii[sc].ta,
+					       2 *
+					       sysconf(_SC_THREAD_STACK_MIN));
 
-				if (ret == 0)
-				{
-					if (scenarii[sc].guard == 2)
-					{
-						FAILED("Changing the stacksize after the thread was created changed the running thread stack size");
+				if (ret == 0) {
+					if (scenarii[sc].guard == 2) {
+						FAILED
+						    ("Changing the stacksize after the thread was created changed the running thread stack size");
 					}
-					#if VERBOSE > 2
+#if VERBOSE > 2
 					else
-						output("We were able to overflow the stack, but the guard area is unknow or null\n");
-					#endif
+						output
+						    ("We were able to overflow the stack, but the guard area is unknow or null\n");
+#endif
 
 				}
 
-				if ((ret != 2) && (scenarii[sc].result == 1))
-				{
-					UNRESOLVED(-1, "An error was expected but the thread creation succeeded");
+				if ((ret != 2) && (scenarii[sc].result == 1)) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
 				}
-
-				#if VERBOSE > 2
-				if ((ret == 1))
-				{
+#if VERBOSE > 2
+				if ((ret == 1)) {
 					output("Stack grow test passed\n");
 				}
 
-				if ((ret == 2) && (scenarii[sc].result == 2))
-				{
-					output("Something went wrong -- we don't care in this case\n");
+				if ((ret == 2) && (scenarii[sc].result == 2)) {
+					output
+					    ("Something went wrong -- we don't care in this case\n");
 				}
-				#endif
+#endif
 
-				if ((ret == 2) && (scenarii[sc].result == 0))
-				{
-					UNRESOLVED(-1, "An unexpected error occured\n");
+				if ((ret == 2) && (scenarii[sc].result == 0)) {
+					UNRESOLVED(-1,
+						   "An unexpected error occured\n");
 				}
 
 				/* Ok, set back the thread attribute object to a correct value */
-				ret = pthread_attr_setstacksize(&scenarii[sc].ta, sysconf(_SC_THREAD_STACK_MIN));
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to set stacksize back");  }
+				ret =
+				    pthread_attr_setstacksize(&scenarii[sc].ta,
+							      sysconf
+							      (_SC_THREAD_STACK_MIN));
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to set stacksize back");
+				}
 			}
 
-	   /* stack decrease test */
-			if ((scenarii[sc].altstack == 0) && (scenarii[sc].altsize == 0))
-			{
-				#if VERBOSE > 2
+			/* stack decrease test */
+			if ((scenarii[sc].altstack == 0)
+			    && (scenarii[sc].altsize == 0)) {
+#if VERBOSE > 2
 				output("Processing stack decrease test\n");
-				#endif
+#endif
 
-				ret = test_stack(&scenarii[sc].ta, sysconf(_SC_THREAD_STACK_MIN));
+				ret =
+				    test_stack(&scenarii[sc].ta,
+					       sysconf(_SC_THREAD_STACK_MIN));
 
-				if (ret == 1)  {  FAILED("Decreasing the stack size after thread is created had an influence on the thread");  }
-
-				if ((ret == 0) && (scenarii[sc].result == 1))
-				{
-					UNRESOLVED(-1, "An error was expected but the thread creation succeeded");
+				if (ret == 1) {
+					FAILED
+					    ("Decreasing the stack size after thread is created had an influence on the thread");
 				}
 
-				if ((ret == 2) && (scenarii[sc].result == 0))
-				{
-					UNRESOLVED(-1, "An unexpected error occured\n");
+				if ((ret == 0) && (scenarii[sc].result == 1)) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
 				}
 
-				#if VERBOSE > 2
+				if ((ret == 2) && (scenarii[sc].result == 0)) {
+					UNRESOLVED(-1,
+						   "An unexpected error occured\n");
+				}
+#if VERBOSE > 2
 				if (ret == 0)
 					output("Stack decrease test passed.\n");
 				else
-					output("Something failed but we don't care here.\n");
-				#endif
+					output
+					    ("Something failed but we don't care here.\n");
+#endif
 			}
 
-		} /* if do_stack_tests */
-
-		if (do_sched_tests)
-		{
-	  /* Sched policy/param change test */
-	  		if (scenarii[sc].explicitsched != 0) /* We need a specified policy */
-			{
+		}
+		/* if do_stack_tests */
+		if (do_sched_tests) {
+			/* Sched policy/param change test */
+			if (scenarii[sc].explicitsched != 0) {	/* We need a specified policy */
 				pthread_t child;
 				int policy_ori, newpol_max;
 				struct sched_param param_ori, tmp;
 
 				testdata_t td;
 
-				#if VERBOSE > 2
-				output("Processing sched policy/param change test\n");
-				#endif
+#if VERBOSE > 2
+				output
+				    ("Processing sched policy/param change test\n");
+#endif
 
 				/* Backup the scenario object */
-				ret = pthread_attr_getschedpolicy(&(scenarii[sc].ta), &policy_ori);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched policy from thread attribute");  }
-				ret = pthread_attr_getschedparam(&(scenarii[sc].ta), &param_ori);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched param from thread attribute");  }
+				ret =
+				    pthread_attr_getschedpolicy(&
+								(scenarii
+								 [sc].ta),
+								&policy_ori);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to read sched policy from thread attribute");
+				}
+				ret =
+				    pthread_attr_getschedparam(&
+							       (scenarii
+								[sc].ta),
+							       &param_ori);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to read sched param from thread attribute");
+				}
 
 				/* Initialize the barrier */
 				ret = pthread_barrier_init(&(td.bar), NULL, 2);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize the barrier");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to initialize the barrier");
+				}
 
 				/* Create a new thread with this scenario attribute */
-				ret = pthread_create(&child, &(scenarii[sc].ta), schedtest, &td);
-				if (ret != 0)
-				{
-					if (scenarii[sc].result == 0)
-					{  UNRESOLVED(ret , "Failed to create a thread");  }
-
-					#if VERBOSE > 2
-					if (scenarii[sc].result == 2)
-					{
-						output("The thread creation failed -- we don't care\n");
+				ret =
+				    pthread_create(&child, &(scenarii[sc].ta),
+						   schedtest, &td);
+				if (ret != 0) {
+					if (scenarii[sc].result == 0) {
+						UNRESOLVED(ret,
+							   "Failed to create a thread");
 					}
-					if (scenarii[sc].result == 1)
-					{
-						output("The thread creation failed as expected\n");
+#if VERBOSE > 2
+					if (scenarii[sc].result == 2) {
+						output
+						    ("The thread creation failed -- we don't care\n");
 					}
-					#endif
-				}
-				else /* Thread created */
-				{
-					if (scenarii[sc].result == 1)
-					{  UNRESOLVED(-1, "The thread was created where an error was expected");  }
+					if (scenarii[sc].result == 1) {
+						output
+						    ("The thread creation failed as expected\n");
+					}
+#endif
+				} else {	/* Thread created */
 
-					#if VERBOSE > 2
+					if (scenarii[sc].result == 1) {
+						UNRESOLVED(-1,
+							   "The thread was created where an error was expected");
+					}
+#if VERBOSE > 2
 					if (scenarii[sc].result == 2)
 						output("Thread is created\n");
-					#endif
+#endif
 
 					/* sync 1 */
 					ret = pthread_barrier_wait(&(td.bar));
-					if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+					if ((ret != 0)
+					    && (ret !=
+						PTHREAD_BARRIER_SERIAL_THREAD))
+					{
+						UNRESOLVED(ret,
+							   "Failed to synchronize on the barrier");
+					}
 
 					/* Check the new thread reports the attributes */
-					if (td.policy != policy_ori)
-					{  FAILED("The new thread does not report the scheluling policy that was specified"); }
+					if (td.policy != policy_ori) {
+						FAILED
+						    ("The new thread does not report the scheluling policy that was specified");
+					}
 
-					if (td.param.sched_priority != param_ori.sched_priority)
-					{  FAILED("The new thread does not report the scheduling priority that was specified at creation");  }
+					if (td.param.sched_priority !=
+					    param_ori.sched_priority) {
+						FAILED
+						    ("The new thread does not report the scheduling priority that was specified at creation");
+					}
 
 					/* Change the thread attribute object policy & param */
-					if (policy_ori == SCHED_RR)
-					{
-						ret = pthread_attr_setschedpolicy(&(scenarii[sc].ta), SCHED_FIFO);
-						newpol_max = sched_get_priority_max(SCHED_FIFO);
+					if (policy_ori == SCHED_RR) {
+						ret =
+						    pthread_attr_setschedpolicy
+						    (&(scenarii[sc].ta),
+						     SCHED_FIFO);
+						newpol_max =
+						    sched_get_priority_max
+						    (SCHED_FIFO);
+					} else {
+						ret =
+						    pthread_attr_setschedpolicy
+						    (&(scenarii[sc].ta),
+						     SCHED_RR);
+						newpol_max =
+						    sched_get_priority_max
+						    (SCHED_RR);
 					}
-					else
-					{
-						ret = pthread_attr_setschedpolicy(&(scenarii[sc].ta), SCHED_RR);
-						newpol_max = sched_get_priority_max(SCHED_RR);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Failed to change the attribute object");
 					}
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to change the attribute object");  }
 
-					if (newpol_max == param_ori.sched_priority)
+					if (newpol_max ==
+					    param_ori.sched_priority)
 						newpol_max--;
 
 					tmp.sched_priority = newpol_max;
 
-					ret = pthread_attr_setschedparam(&(scenarii[sc].ta), &tmp);
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the attribute sched param");  }
+					ret =
+					    pthread_attr_setschedparam(&
+								       (scenarii
+									[sc].ta),
+								       &tmp);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Failed to set the attribute sched param");
+					}
 
 					/* sync 2 */
 					ret = pthread_barrier_wait(&(td.bar));
-					if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
+					if ((ret != 0)
+					    && (ret !=
+						PTHREAD_BARRIER_SERIAL_THREAD))
+					{
+						UNRESOLVED(ret,
+							   "Failed to synchronize on the barrier");
+					}
 
 					/* sync 3 */
 					ret = pthread_barrier_wait(&(td.bar));
-					if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
-
-					/* Check if the thread saw the change (should not) */
-					if (td.policy != policy_ori)
-					{  FAILED("The new thread does not report the scheluling policy that was specified"); }
-
-					if (td.param.sched_priority != param_ori.sched_priority)
-					{  FAILED("The new thread does not report the scheduling priority that was specified at creation");  }
-
-					/* Check what we can see for the child thread from here */
-					ret = pthread_getschedparam(child, &(td.policy), &(td.param));
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to read child thread policy / param");  }
-
-					if (td.policy != policy_ori)
-					{  FAILED("The child thread does not report the scheduling policy that was specified at creation"); }
-
-					if (td.param.sched_priority != param_ori.sched_priority)
-					{  FAILED("The child thread does not report the scheduling priority that was specified at creation");  }
-
-					/* Restore the thread attribute */
-					ret = pthread_attr_setschedpolicy(&(scenarii[sc].ta), policy_ori);
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched policy from thread attribute");  }
-					ret = pthread_attr_setschedparam(&(scenarii[sc].ta), &param_ori);
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched param from thread attribute");  }
-
-					/* sync 4*/
-					ret = pthread_barrier_wait(&(td.bar));
-					if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
-
-					/* sync 5*/
-					ret = pthread_barrier_wait(&(td.bar));
-					if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {  UNRESOLVED(ret, "Failed to synchronize on the barrier");  }
-
-					/* check if the thread attribute reports a change (should not) */
-					ret = pthread_attr_getschedpolicy(&(scenarii[sc].ta), &(td.policy));
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched policy from thread attribute");  }
-					ret = pthread_attr_getschedparam(&(scenarii[sc].ta), &(td.param));
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to read sched param from thread attribute");  }
-
-					if (td.policy != policy_ori)
-					{  FAILED("The child thread does not report the scheduling policy that was specified at creation"); }
-
-					if (td.param.sched_priority != param_ori.sched_priority)
-					{  FAILED("The child thread does not report the scheduling priority that was specified at creation");  }
-
-					/* Wait for the sem and join eventually the thread */
-					do { ret = sem_wait(&scenarii[sc].sem); }
-					while ((ret == -1) && (errno == EINTR));
-					if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
-
-					if (scenarii[sc].detached == 0)
+					if ((ret != 0)
+					    && (ret !=
+						PTHREAD_BARRIER_SERIAL_THREAD))
 					{
-						ret = pthread_join(child, NULL);
-						if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+						UNRESOLVED(ret,
+							   "Failed to synchronize on the barrier");
 					}
 
-					#if VERBOSE > 2
-					output("Sched policy/param change test passed\n");
-					#endif
-				} /* thread created */
+					/* Check if the thread saw the change (should not) */
+					if (td.policy != policy_ori) {
+						FAILED
+						    ("The new thread does not report the scheluling policy that was specified");
+					}
+
+					if (td.param.sched_priority !=
+					    param_ori.sched_priority) {
+						FAILED
+						    ("The new thread does not report the scheduling priority that was specified at creation");
+					}
+
+					/* Check what we can see for the child thread from here */
+					ret =
+					    pthread_getschedparam(child,
+								  &(td.policy),
+								  &(td.param));
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Failed to read child thread policy / param");
+					}
+
+					if (td.policy != policy_ori) {
+						FAILED
+						    ("The child thread does not report the scheduling policy that was specified at creation");
+					}
+
+					if (td.param.sched_priority !=
+					    param_ori.sched_priority) {
+						FAILED
+						    ("The child thread does not report the scheduling priority that was specified at creation");
+					}
+
+					/* Restore the thread attribute */
+					ret =
+					    pthread_attr_setschedpolicy(&
+									(scenarii
+									 [sc].ta),
+									policy_ori);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to read sched policy from thread attribute");
+					}
+					ret =
+					    pthread_attr_setschedparam(&
+								       (scenarii
+									[sc].ta),
+								       &param_ori);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to read sched param from thread attribute");
+					}
+
+					/* sync 4 */
+					ret = pthread_barrier_wait(&(td.bar));
+					if ((ret != 0)
+					    && (ret !=
+						PTHREAD_BARRIER_SERIAL_THREAD))
+					{
+						UNRESOLVED(ret,
+							   "Failed to synchronize on the barrier");
+					}
+
+					/* sync 5 */
+					ret = pthread_barrier_wait(&(td.bar));
+					if ((ret != 0)
+					    && (ret !=
+						PTHREAD_BARRIER_SERIAL_THREAD))
+					{
+						UNRESOLVED(ret,
+							   "Failed to synchronize on the barrier");
+					}
+
+					/* check if the thread attribute reports a change (should not) */
+					ret =
+					    pthread_attr_getschedpolicy(&
+									(scenarii
+									 [sc].ta),
+									&
+									(td.policy));
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to read sched policy from thread attribute");
+					}
+					ret =
+					    pthread_attr_getschedparam(&
+								       (scenarii
+									[sc].ta),
+								       &
+								       (td.param));
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to read sched param from thread attribute");
+					}
+
+					if (td.policy != policy_ori) {
+						FAILED
+						    ("The child thread does not report the scheduling policy that was specified at creation");
+					}
+
+					if (td.param.sched_priority !=
+					    param_ori.sched_priority) {
+						FAILED
+						    ("The child thread does not report the scheduling priority that was specified at creation");
+					}
+
+					/* Wait for the sem and join eventually the thread */
+					do {
+						ret =
+						    sem_wait(&scenarii[sc].sem);
+					}
+					while ((ret == -1) && (errno == EINTR));
+					if (ret == -1) {
+						UNRESOLVED(errno,
+							   "Failed to wait for the semaphore");
+					}
+
+					if (scenarii[sc].detached == 0) {
+						ret = pthread_join(child, NULL);
+						if (ret != 0) {
+							UNRESOLVED(ret,
+								   "Unable to join a thread");
+						}
+					}
+#if VERBOSE > 2
+					output
+					    ("Sched policy/param change test passed\n");
+#endif
+				}	/* thread created */
 			}
 
 			/* We could also test if the inheritsched does not influence the new thread */
 
-		} /* if do_sched_tests */
+		}		/* if do_sched_tests */
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/4-1.c
index 58743bf..cccbe5d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/4-1.c
@@ -23,33 +23,30 @@
 
 void *a_thread_func();
 
-pthread_t self_th; 	/* Save the value of the function call pthread_self()
-			   within the thread.  Keeping it global so 'main' can
-			   see it too. */
+pthread_t self_th;		/* Save the value of the function call pthread_self()
+				   within the thread.  Keeping it global so 'main' can
+				   see it too. */
 
 int main()
 {
 	pthread_t new_th;
 
 	/* Create a new thread */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for the thread function to return to make sure we got
 	 * the thread ID value from pthread_self(). */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error calling pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* If the value of pthread_self() and the return value from
 	 * pthread_create() is equal, then the test passes. */
-	if (pthread_equal(new_th, self_th) == 0)
-	{
+	if (pthread_equal(new_th, self_th) == 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
@@ -61,7 +58,7 @@
 /* The thread function that calls pthread_self() to obtain its thread ID */
 void *a_thread_func()
 {
-	self_th=pthread_self();
+	self_th = pthread_self();
 	pthread_exit(0);
 	return NULL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-1.c
index 289ee88..283c337 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-1.c
@@ -23,7 +23,7 @@
 #define NUM_THREADS 5
 
 /* The thread start routine. */
-void *a_thread_func(void* num)
+void *a_thread_func(void *num)
 {
 	intptr_t i = (intptr_t) num;
 	printf("Passed argument for thread: %d\n", (int)i);
@@ -37,10 +37,9 @@
 	pthread_t new_th;
 	long i;
 
-	for (i=1;i<NUM_THREADS+1;i++)
-	{
-		if (pthread_create(&new_th, NULL, a_thread_func, (void*)i) != 0)
-		{
+	for (i = 1; i < NUM_THREADS + 1; i++) {
+		if (pthread_create(&new_th, NULL, a_thread_func, (void *)i) !=
+		    0) {
 			printf("Error creating thread\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-2.c
index 067e664..653c801 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/5-2.c
@@ -22,13 +22,13 @@
 #define NUM_THREADS 5
 
 /* The thread start routine. */
-void *a_thread_func(void* num)
+void *a_thread_func(void *num)
 {
 	int *i, j;
 
 	i = (int *)num;
 
-	for (j=0;j<NUM_THREADS;j++)
+	for (j = 0; j < NUM_THREADS; j++)
 		printf("Passed argument %d for thread\n", i[j]);
 
 	pthread_exit(0);
@@ -40,11 +40,10 @@
 	pthread_t new_th;
 	int i[NUM_THREADS], j;
 
-	for (j=0;j<NUM_THREADS;j++)
-		i[j] = j+1;
+	for (j = 0; j < NUM_THREADS; j++)
+		i[j] = j + 1;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, (void*)&i) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, (void *)&i) != 0) {
 		printf("Error creating thread\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
index 0013674..79c956d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-1.c
@@ -50,28 +50,24 @@
 
 	/* Empty set of signal mask and blocked signals */
 	if ((sigemptyset(&main_sigmask) != 0) ||
-	    (sigemptyset(&main_pendingset) != 0))
-	{
+	    (sigemptyset(&main_pendingset) != 0)) {
 		perror("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Add SIGCONT, SIGUSR1 and SIGUSR2 to the set of blocked signals */
-	if (sigaddset(&main_sigmask, SIGUSR1) != 0)
-	{
+	if (sigaddset(&main_sigmask, SIGUSR1) != 0) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaddset(&main_sigmask, SIGUSR2) != 0)
-	{
+	if (sigaddset(&main_sigmask, SIGUSR2) != 0) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Block those signals. */
-	if (pthread_sigmask(SIG_SETMASK, &main_sigmask, NULL) != 0)
-	{
+	if (pthread_sigmask(SIG_SETMASK, &main_sigmask, NULL) != 0) {
 		printf("Error in pthread_sigmask()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -87,26 +83,23 @@
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait until the thread has finished execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to make sure that the sigmask of the thread is the same as the main thread */
 	ret = sigismember(&th_sigmask, SIGUSR1);
-	if (ret != 1)
-	{
-		if (ret == 0)
-		{
-			printf("Error: Thread did not inherit main()s signal mask. SIGUSR1 not a member of the signal set.\n");
+	if (ret != 1) {
+		if (ret == 0) {
+			printf
+			    ("Error: Thread did not inherit main()s signal mask. SIGUSR1 not a member of the signal set.\n");
 			return PTS_FAIL;
 		}
 
@@ -115,11 +108,10 @@
 	}
 
 	ret = sigismember(&th_sigmask, SIGUSR2);
-	if (ret != 1)
-	{
-		if (ret == 0)
-		{
-			printf("Test FAILED: Thread did not inherit main()s signal mask. SIGUSR2 not a member of the signal set.\n");
+	if (ret != 1) {
+		if (ret == 0) {
+			printf
+			    ("Test FAILED: Thread did not inherit main()s signal mask. SIGUSR2 not a member of the signal set.\n");
 			return PTS_FAIL;
 		}
 
@@ -131,11 +123,10 @@
 	 * SIGUSR2. */
 
 	ret = sigismember(&th_pendingset, SIGUSR1);
-	if (ret != 0)
-	{
-		if (ret == 1)
-		{
-			printf("Error: Thread did not inherit main()s signal mask. SIGUSR1 not a member of the signal set.\n");
+	if (ret != 0) {
+		if (ret == 1) {
+			printf
+			    ("Error: Thread did not inherit main()s signal mask. SIGUSR1 not a member of the signal set.\n");
 			return PTS_FAIL;
 		}
 
@@ -144,11 +135,10 @@
 	}
 
 	ret = sigismember(&th_pendingset, SIGUSR2);
-	if (ret != 0)
-	{
-		if (ret == 1)
-		{
-			printf("Test FAILED: Thread did not inherit main()s signal mask. SIGUSR2 not a member of the signal set.\n");
+	if (ret != 0) {
+		if (ret == 1) {
+			printf
+			    ("Test FAILED: Thread did not inherit main()s signal mask. SIGUSR2 not a member of the signal set.\n");
 			return PTS_FAIL;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-2.c
index d0e5fa9..69344e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/8-2.c
@@ -29,34 +29,34 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
- #include <signal.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -99,38 +99,46 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-typedef struct
-{
+typedef struct {
 	sigset_t mask;
 	sigset_t pending;
 } testdata_t;
 
 /* Thread function; which will check the signal mask and pending signals */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
-	testdata_t * td=(testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* Obtain the signal mask of this thread. */
 	ret = pthread_sigmask(SIG_SETMASK, NULL, &(td->mask));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to get the signal mask of the thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to get the signal mask of the thread");
+	}
 
 	/* Obtain the pending signals of this thread. It should be empty. */
 	ret = sigpending(&(td->pending));
-	if (ret != 0)  {  UNRESOLVED(errno, "Failed to get pending signals from the thread");  }
+	if (ret != 0) {
+		UNRESOLVED(errno,
+			   "Failed to get pending signals from the thread");
+	}
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	/* return */
 	return arg;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
 	testdata_t td_parent, td_thread;
@@ -143,107 +151,147 @@
 
 	/* Initialize the signal state */
 	ret = sigemptyset(&(td_parent.mask));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to initialize a signal set");
+	}
 
 	ret = sigemptyset(&(td_parent.pending));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to initialize a signal set");
+	}
 
 	/* Add SIGCONT, SIGUSR1 and SIGUSR2 to the set of blocked signals */
 	ret = sigaddset(&(td_parent.mask), SIGUSR1);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to add SIGUSR1 to the signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to add SIGUSR1 to the signal set");
+	}
 
 	ret = sigaddset(&(td_parent.mask), SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to add SIGUSR2 to the signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to add SIGUSR2 to the signal set");
+	}
 
 	/* Block those signals. */
 	ret = pthread_sigmask(SIG_SETMASK, &(td_parent.mask), NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to mask the singals in main");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to mask the singals in main");
+	}
 
 	/* Raise those signals so they are now pending. */
 	ret = raise(SIGUSR1);
-	if (ret != 0)  {  UNRESOLVED(errno, "Failed to raise SIGUSR1");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Failed to raise SIGUSR1");
+	}
 	ret = raise(SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(errno, "Failed to raise SIGUSR2");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Failed to raise SIGUSR2");
+	}
 
 	/* Do the testing for each thread */
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		/* (re)initialize thread signal sets */
 		ret = sigemptyset(&(td_thread.mask));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a signal set");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to initialize a signal set");
+		}
 
 		ret = sigemptyset(&(td_thread.pending));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a signal set");  }
-
-		ret = pthread_create(&child, &scenarii[sc].ta, threaded, &td_thread);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to initialize a signal set");
 		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+
+		ret =
+		    pthread_create(&child, &scenarii[sc].ta, threaded,
+				   &td_thread);
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 
 			/* The thread has terminated its work, so we can now control */
 			ret = sigismember(&(td_thread.mask), SIGUSR1);
-			if (ret != 1)
-			{
-				if (ret == 0)  {  FAILED("The thread did not inherit the signal mask");  }
+			if (ret != 1) {
+				if (ret == 0) {
+					FAILED
+					    ("The thread did not inherit the signal mask");
+				}
 				/* else */
 				UNRESOLVED(ret, "sigismember() failed");
 			}
 
 			ret = sigismember(&(td_thread.mask), SIGUSR2);
-			if (ret != 1)
-			{
-				if (ret == 0)  {  FAILED("The thread did not inherit the signal mask");  }
+			if (ret != 1) {
+				if (ret == 0) {
+					FAILED
+					    ("The thread did not inherit the signal mask");
+				}
 				/* else */
 				UNRESOLVED(ret, "sigismember() failed");
 			}
 
 			ret = sigismember(&(td_thread.pending), SIGUSR1);
-			if (ret != 0)
-			{
-				if (ret == 1)  {  FAILED("The thread inherited the pending signal SIGUSR1");  }
+			if (ret != 0) {
+				if (ret == 1) {
+					FAILED
+					    ("The thread inherited the pending signal SIGUSR1");
+				}
 				/* else */
 				UNRESOLVED(ret, "sigismember() failed");
 			}
 
 			ret = sigismember(&(td_thread.pending), SIGUSR2);
-			if (ret != 0)
-			{
-				if (ret == 1)  {  FAILED("The thread inherited the pending signal SIGUSR2");  }
+			if (ret != 0) {
+				if (ret == 1) {
+					FAILED
+					    ("The thread inherited the pending signal SIGUSR2");
+				}
 				/* else */
 				UNRESOLVED(ret, "sigismember() failed");
 			}
@@ -252,11 +300,11 @@
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-1.c
index 2b7f28d..db931a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-1.c
@@ -44,49 +44,43 @@
 	int ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to be joinable */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create the thread */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Detach the thread. */
-	if (pthread_detach(new_th) != 0)
-	{
+	if (pthread_detach(new_th) != 0) {
 		printf("Error detaching thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Now try and join it.  This should fail. */
-	ret=pthread_join(new_th, NULL);
+	ret = pthread_join(new_th, NULL);
 
 	/* Cleanup: Cancel the thread */
 	pthread_cancel(new_th);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}else if (ret == EINVAL)
-	{
+	} else if (ret == EINVAL) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}else
-	{
+	} else {
 		perror("Error in pthread_join\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-2.c
index 1a8fc0a..ea9fc82 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-2.c
@@ -31,31 +31,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -98,86 +98,114 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
-	if (arg != NULL)
-	{
+	if (arg != NULL) {
 		ret = pthread_detach(pthread_self());
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to detach the thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to detach the thread");
+		}
 	}
 
 	/* Post the semaphore to unlock the main thread in case of a detached thread */
-	do { ret = sem_post(&(scenarii[sc].sem)); }
+	do {
+		ret = sem_post(&(scenarii[sc].sem));
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return arg;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
 	output_init();
 
 	scenar_init();
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
-		if (scenarii[sc].detached != 0) /* only joinable threads can be detached */
-		{
-			ret = pthread_attr_setdetachstate(&scenarii[sc].ta, PTHREAD_CREATE_JOINABLE);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set detachstate back to joinable");  }
+		if (scenarii[sc].detached != 0) {	/* only joinable threads can be detached */
+			ret =
+			    pthread_attr_setdetachstate(&scenarii[sc].ta,
+							PTHREAD_CREATE_JOINABLE);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set detachstate back to joinable");
+			}
 		}
 
 		/* for detached scenarii, we will call pthread_detach from inside the thread.
 		   for joinable scenarii, we'll call pthread_detach from this thread. */
 
-		ret = pthread_create(&child, &scenarii[sc].ta, threaded, (scenarii[sc].detached != 0)?&ret:NULL);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
+		ret =
+		    pthread_create(&child, &scenarii[sc].ta, threaded,
+				   (scenarii[sc].detached != 0) ? &ret : NULL);
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
+			}
+			break;
 
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-			#if VERBOSE > 0
-				break;
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+#if VERBOSE > 0
+			break;
 
-			case 2: /* We did not know the expected result */
-			default:
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-			#endif
+		case 2:	/* We did not know the expected result */
+		default:
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
 		}
-		if (ret == 0) /* The new thread is running */
-		{
+		if (ret == 0) {	/* The new thread is running */
 			/* Just wait for the thread to terminate */
-			do { ret = sem_wait(&(scenarii[sc].sem)); }
+			do {
+				ret = sem_wait(&(scenarii[sc].sem));
+			}
 			while ((ret == -1) && (errno == EINTR));
-			if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+			if (ret == -1) {
+				UNRESOLVED(errno,
+					   "Failed to post the semaphore");
+			}
 
 			/* If we must detach from here, we do it now. */
-			if (scenarii[sc].detached == 0)
-			{
+			if (scenarii[sc].detached == 0) {
 				ret = pthread_detach(child);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to detach the child thread.");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to detach the child thread.");
+				}
 			}
 
 			/* now check that the thread resources are freed. */
 			ret = pthread_join(child, NULL);
-			if (ret == 0)  {  FAILED("We were able to join a detached thread.");  }
+			if (ret == 0) {
+				FAILED
+				    ("We were able to join a detached thread.");
+			}
 
 			/* Let the thread an additionnal row to cleanup */
 			sched_yield();
@@ -185,11 +213,11 @@
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-1.c
index 962375e..8f5cf03 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-1.c
@@ -43,40 +43,35 @@
 	int ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to be joinable */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create the thread */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Detach the thread. */
-	if (pthread_detach(new_th) != 0)
-	{
+	if (pthread_detach(new_th) != 0) {
 		printf("Error detaching thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Verify that it hasn't terminated the thread */
-	ret=pthread_cancel(new_th);
+	ret = pthread_cancel(new_th);
 
-	if (ret != 0)
-	{
-		if (ret==ESRCH)
-		{
+	if (ret != 0) {
+		if (ret == ESRCH) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-2.c
index 871bef9..730397d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/2-2.c
@@ -29,32 +29,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <time.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <time.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -101,31 +101,40 @@
 
 sem_t sem_sync;
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
-	if (arg != NULL)
-	{
+	if (arg != NULL) {
 		ret = pthread_detach(pthread_self());
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to detach the thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to detach the thread");
+		}
 	}
 	/* Wait for this semaphore which indicates that pthread_detach has been called */
-	do { ret = sem_wait(&sem_sync); }
+	do {
+		ret = sem_wait(&sem_sync);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	/* Post the semaphore to indicate the main thread we're alive */
-	do { ret = sem_post(&(scenarii[sc].sem)); }
+	do {
+		ret = sem_post(&(scenarii[sc].sem));
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
 
 	return arg;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 	struct timespec ts;
 
@@ -134,71 +143,100 @@
 	scenar_init();
 
 	ret = sem_init(&sem_sync, 0, 0);
-	if (ret != 0)  {   UNRESOLVED(ret, "Failed to initialize a semaphore");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to initialize a semaphore");
+	}
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
-		if (scenarii[sc].detached != 0) /* only joinable threads can be detached */
-		{
-			ret = pthread_attr_setdetachstate(&scenarii[sc].ta, PTHREAD_CREATE_JOINABLE);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set detachstate back to joinable");  }
+		if (scenarii[sc].detached != 0) {	/* only joinable threads can be detached */
+			ret =
+			    pthread_attr_setdetachstate(&scenarii[sc].ta,
+							PTHREAD_CREATE_JOINABLE);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set detachstate back to joinable");
+			}
 		}
 
 		/* for detached scenarii, we will call pthread_detach from inside the thread.
 		   for joinable scenarii, we'll call pthread_detach from this thread. */
 
-		ret = pthread_create(&child, &scenarii[sc].ta, threaded, (scenarii[sc].detached != 0)?&ret:NULL);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
+		ret =
+		    pthread_create(&child, &scenarii[sc].ta, threaded,
+				   (scenarii[sc].detached != 0) ? &ret : NULL);
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
+			}
+			break;
 
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-			#if VERBOSE > 0
-				break;
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+#if VERBOSE > 0
+			break;
 
-			case 2: /* We did not know the expected result */
-			default:
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-			#endif
+		case 2:	/* We did not know the expected result */
+		default:
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
 		}
-		if (ret == 0) /* The new thread is running */
-		{
+		if (ret == 0) {	/* The new thread is running */
 			/* If we must detach from here, we do it now. */
-			if (scenarii[sc].detached == 0)
-			{
+			if (scenarii[sc].detached == 0) {
 				ret = pthread_detach(child);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to detach the child thread.");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to detach the child thread.");
+				}
 			}
 
 			/* Now, allow the thread to terminate */
-			do { ret = sem_post(&sem_sync); }
+			do {
+				ret = sem_post(&sem_sync);
+			}
 			while ((ret == -1) && (errno == EINTR));
-			if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
+			if (ret == -1) {
+				UNRESOLVED(errno,
+					   "Failed to post the semaphore");
+			}
 
 			/* Just wait for the thread to terminate */
 			ret = clock_gettime(CLOCK_REALTIME, &ts);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to get time");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to get time");
+			}
 
 			ts.tv_sec += TIMEOUT;
 
-			do { ret = sem_timedwait(&(scenarii[sc].sem), &ts); }
+			do {
+				ret = sem_timedwait(&(scenarii[sc].sem), &ts);
+			}
 			while ((ret == -1) && (errno == EINTR));
-			if (ret == -1)
-			{
-				if (errno == ETIMEDOUT)  { FAILED("pthread_detach made the thread terminate");  }
+			if (ret == -1) {
+				if (errno == ETIMEDOUT) {
+					FAILED
+					    ("pthread_detach made the thread terminate");
+				}
 				/* else */
-				UNRESOLVED(errno, "Failed to wait for the semaphore");
+				UNRESOLVED(errno,
+					   "Failed to wait for the semaphore");
 			}
 
 			/* Let the thread an additionnal row to cleanup */
@@ -207,14 +245,16 @@
 	}
 
 	ret = sem_destroy(&sem_sync);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the semaphore");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to destroy the semaphore");
+	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/3-1.c
index e6ae22b..d0fef69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/3-1.c
@@ -43,37 +43,33 @@
 	int ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to be joinable */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_JOINABLE) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create the thread */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Detach the thread. */
-	ret=pthread_detach(new_th);
+	ret = pthread_detach(new_th);
 
 	/* Cleanup and cancel the thread */
 	pthread_cancel(new_th);
 
 	/* Check return value of pthread_detach() */
-	if (ret != 0)
-	{
-		if ((ret != ESRCH) || (ret != EINVAL))
-		{
+	if (ret != 0) {
+		if ((ret != ESRCH) || (ret != EINVAL)) {
 			printf("Test FAILED: Incorrect return code\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-1.c
index 50bdad0..1704195 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-1.c
@@ -48,37 +48,33 @@
 	int ret;
 
 	/* Initialize attribute */
-	if (pthread_attr_init(&new_attr) != 0)
-	{
+	if (pthread_attr_init(&new_attr) != 0) {
 		perror("Cannot initialize attribute object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the attribute object to be detached */
-	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) != 0)
-	{
+	if (pthread_attr_setdetachstate(&new_attr, PTHREAD_CREATE_DETACHED) !=
+	    0) {
 		perror("Error in pthread_attr_setdetachstate()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create the thread */
-	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, &new_attr, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Detach the thread. */
-	ret=pthread_detach(new_th);
+	ret = pthread_detach(new_th);
 
 	/* Cleanup and cancel the thread */
 	pthread_cancel(new_th);
 
 	/* Check return value of pthread_detach() */
-	if (ret != EINVAL)
-	{
-		if (ret == ESRCH)
-		{
+	if (ret != EINVAL) {
+		if (ret == ESRCH) {
 			perror("Error detaching thread\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-2.c
index f7b7a02..ba40197 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-2.c
@@ -41,8 +41,7 @@
 	int ret;
 
 	/* Create the thread */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -51,19 +50,19 @@
 	 * The thread could have ended by the time we try to join, so
 	 * don't worry about it, just so long as other errors don't
 	 * occur. The point is to make sure the thread has ended execution. */
-	if (pthread_join(new_th, NULL) == EDEADLK)
-	{
+	if (pthread_join(new_th, NULL) == EDEADLK) {
 		perror("Error joining thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Detach the non-existant thread. */
-	ret=pthread_detach(new_th);
+	ret = pthread_detach(new_th);
 
 	/* Check return value of pthread_detach() */
-	if (ret != ESRCH)
-	{
-		printf("Test FAILED: Incorrect return code: %d instead of ESRCH\n", ret);
+	if (ret != ESRCH) {
+		printf
+		    ("Test FAILED: Incorrect return code: %d instead of ESRCH\n",
+		     ret);
 		return PTS_FAIL;
 
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
index 735de42..2a659bc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
@@ -74,9 +74,9 @@
 static sigset_t usersigs;
 
 struct thestruct {
-	int	sig;
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 };
 
@@ -183,18 +183,18 @@
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
 		switch (scenarii[sc].result) {
-		case 0: /* Operation was expected to succeed */
+		case 0:	/* Operation was expected to succeed */
 			if (ret != 0)
 				UNRESOLVED(ret, "Failed to create this thread");
 			break;
 
-		case 1: /* Operation was expected to fail */
+		case 1:	/* Operation was expected to fail */
 			if (ret == 0)
 				UNRESOLVED(-1, "An error was expected but the"
 					   " thread creation succeeded");
 			break;
 
-		case 2: /* We did not know the expected result */
+		case 2:	/* We did not know the expected result */
 		default:
 #if VERBOSE > 5
 			if (ret == 0)
@@ -304,7 +304,7 @@
 			close(stat_pipe[0]);
 			do_child();
 			SAFE(write(stat_pipe[1], &count_sig,
-				sizeof(count_sig)));
+				   sizeof(count_sig)));
 			close(stat_pipe[1]);
 			pthread_exit(0);
 			UNRESOLVED(0, "Should not be reached");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-1.c
index 4fe8ef2..accacfd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-1.c
@@ -33,8 +33,7 @@
 	pthread_t new_th;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -42,13 +41,10 @@
 	/* Call pthread_equal() and pass to it the new thread ID in both
 	 * parameters.  It should return a non-zero value, indicating that
 	 * they are equal. */
-	if (pthread_equal(new_th, new_th) == 0)
-	{
+	if (pthread_equal(new_th, new_th) == 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-2.c
index a816047..3654b0a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/1-2.c
@@ -33,15 +33,13 @@
 	pthread_t new_th1, new_th2;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th1, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th1, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create another new thread. */
-	if (pthread_create(&new_th2, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th2, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -49,13 +47,10 @@
 	/* Call pthread_equal() and pass to it the 2 new threads.
 	 * It should return a zero value, indicating that
 	 * they are not equal. */
-	if (pthread_equal(new_th1, new_th2) != 0)
-	{
+	if (pthread_equal(new_th1, new_th2) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/2-1.c
index 154715e..b7d258b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_equal/2-1.c
@@ -25,27 +25,27 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -77,47 +77,51 @@
 /***********************************    Test cases  *****************************************/
 /********************************************************************************************/
 
-volatile int do_it=1;
-unsigned long count_ope=0;
+volatile int do_it = 1;
+unsigned long count_ope = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 	return NULL;
@@ -128,46 +132,58 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* Test function -- calls pthread_equal() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
 	pthread_t me = pthread_self();
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 
-		ret = pthread_equal(me, *(pthread_t *)arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "pthread_equal failed to return the correct value");  }
+		ret = pthread_equal(me, *(pthread_t *) arg);
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "pthread_equal failed to return the correct value");
+		}
 
 		ret = pthread_equal(me, me);
-		if (ret == 0)  {  UNRESOLVED(ret, "pthread_equal returned a bad result");  }
-		if (ret == EINTR)  {  FAILED("pthread_equal returned EINTR status");  }
+		if (ret == 0) {
+			UNRESOLVED(ret, "pthread_equal returned a bad result");
+		}
+		if (ret == EINTR) {
+			FAILED("pthread_equal returned EINTR status");
+		}
 	}
 	return NULL;
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2, me;
@@ -178,36 +194,45 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
-
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
 	me = pthread_self();
 
-	if ((ret = pthread_create(&th_work, NULL, test, (void *)&me)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_work, NULL, test, (void *)&me))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -216,33 +241,39 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_work, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  %d thread comparison.\n", count_ope);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-1.c
index 788fbac..500c1be 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-1.c
@@ -22,19 +22,19 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-#define RETURN_CODE 100	/* Set a random return code number. This shall be the return code of the
-			 thread when using pthread_exit().*/
+#define RETURN_CODE 100		/* Set a random return code number. This shall be the return code of the
+				   thread when using pthread_exit(). */
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem;	/* Manual semaphore used to indicate when the thread has been created. */
+int sem;			/* Manual semaphore used to indicate when the thread has been created. */
 
 /* Thread's function. */
 void *a_thread_func()
 {
-	sem=INMAIN;
-	pthread_exit((void*)RETURN_CODE);
+	sem = INMAIN;
+	pthread_exit((void *)RETURN_CODE);
 	return NULL;
 }
 
@@ -44,32 +44,30 @@
 	int *value_ptr;
 
 	/* Initializing variables. */
-	value_ptr=0;
-	sem=INTHREAD;
+	value_ptr = 0;
+	sem = INTHREAD;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure the thread was created before we join it. */
-	while (sem==INTHREAD)
+	while (sem == INTHREAD)
 		sleep(1);
 
 	/* Wait for thread to return */
-	if (pthread_join(new_th, (void*)&value_ptr) != 0)
-	{
+	if (pthread_join(new_th, (void *)&value_ptr) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to make sure that 'value_ptr' that was passed to pthread_join() and the
 	 * pthread_exit() return code that was used in the thread funciton are the same. */
-	if ((long)value_ptr != RETURN_CODE)
-	{
-		printf("Test FAILED: pthread_exit() could not pass the return value of the thread in 'value_ptr' to pthread_join().\n");
+	if ((long)value_ptr != RETURN_CODE) {
+		printf
+		    ("Test FAILED: pthread_exit() could not pass the return value of the thread in 'value_ptr' to pthread_join().\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-2.c
index bbb0f21..04ab6b0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-2.c
@@ -31,32 +31,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -99,7 +99,7 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	pthread_exit(NULL + 1);
 
@@ -108,10 +108,10 @@
 	return NULL;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
-	void * rval;
+	int ret = 0;
+	void *rval;
 	pthread_t child;
 	int i;
 
@@ -119,54 +119,66 @@
 
 	scenar_init();
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		if (scenarii[i].detached == 0)
-		{
-			#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+		if (scenarii[i].detached == 0) {
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", i,
+			       scenarii[i].descr);
+#endif
 
-			ret = pthread_create(&child, &scenarii[i].ta, threaded, NULL);
-			switch (scenarii[i].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[i].ta, threaded,
+					   NULL);
+			switch (scenarii[i].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
 
-				if (rval != (NULL+1))
-				{
-					FAILED("pthread_join() did not retrieve the pthread_exit() param");
+				if (rval != (NULL + 1)) {
+					FAILED
+					    ("pthread_join() did not retrieve the pthread_exit() param");
 				}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-1.c
index f62d2e1..bcd938a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-1.c
@@ -31,7 +31,7 @@
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func1()
 {
-	i[j]=1;
+	i[j] = 1;
 	j++;
 	return;
 }
@@ -40,7 +40,7 @@
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func2()
 {
-	i[j]=2;
+	i[j] = 2;
 	j++;
 	return;
 }
@@ -49,17 +49,18 @@
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func3()
 {
-	i[j]=3;
+	i[j] = 3;
 	j++;
 	return;
 }
+
 /* Thread's function. */
 void *a_thread_func()
 {
 	/* Set up 3 cleanup handlers */
-	pthread_cleanup_push(a_cleanup_func1,NULL);
-	pthread_cleanup_push(a_cleanup_func2,NULL);
-	pthread_cleanup_push(a_cleanup_func3,NULL);
+	pthread_cleanup_push(a_cleanup_func1, NULL);
+	pthread_cleanup_push(a_cleanup_func2, NULL);
+	pthread_cleanup_push(a_cleanup_func3, NULL);
 
 	/* Terminate the thread here. */
 	pthread_exit(0);
@@ -76,45 +77,40 @@
 	pthread_t new_th;
 
 	/* Initialize integer array. */
-	for (j=0;j<3;j++)
+	for (j = 0; j < 3; j++)
 		i[j] = 0;
 
 	/* Initialize counter. */
-	j=0;
+	j = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to return */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check to make sure that the cleanup handlers were executed in order. */
-	if (i[0] == 3)
-	{
-		if (i[1] == 2)
-		{
-			if (i[2] == 1)
-			{
+	if (i[0] == 3) {
+		if (i[1] == 2) {
+			if (i[2] == 1) {
 				printf("Test PASSED\n");
 				return PTS_PASS;
 
 			}
-			printf("Test FAILED: Did not execute cleanup handlers in order.\n");
+			printf
+			    ("Test FAILED: Did not execute cleanup handlers in order.\n");
 			return PTS_FAIL;
 		}
-		printf("Test FAILED: Did not execute cleanup handlers in order.\n");
+		printf
+		    ("Test FAILED: Did not execute cleanup handlers in order.\n");
 		return PTS_FAIL;
-	}
-	else if (i[0] == 0)
-	{
+	} else if (i[0] == 0) {
 		printf("Test FAILED: Did not execute cleanup handlers.\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-2.c
index 7adad5b..d37466f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-2.c
@@ -29,32 +29,32 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -97,7 +97,7 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-int global=0;
+int global = 0;
 int tab[3];
 
 #define CLEANUP(n) void clnp##n(void * arg)\
@@ -107,10 +107,10 @@
 }
 
 CLEANUP(1)
-CLEANUP(2)
-CLEANUP(3)
+    CLEANUP(2)
+    CLEANUP(3)
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	pthread_cleanup_push(clnp3, NULL);
 	pthread_cleanup_push(clnp2, NULL);
@@ -126,76 +126,90 @@
 	return NULL;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
-	void * rval;
+	int ret = 0;
+	void *rval;
 	pthread_t child;
-	int i,j;
+	int i, j;
 
 	output_init();
 
 	scenar_init();
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		if (scenarii[i].detached == 0)
-		{
-			#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+		if (scenarii[i].detached == 0) {
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", i,
+			       scenarii[i].descr);
+#endif
 
-			for (j=0; j<3; j++)
-				tab[j]=0;
-			global=0;
+			for (j = 0; j < 3; j++)
+				tab[j] = 0;
+			global = 0;
 
-			ret = pthread_create(&child, &scenarii[i].ta, threaded, NULL);
-			switch (scenarii[i].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[i].ta, threaded,
+					   NULL);
+			switch (scenarii[i].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
-
-				if (rval != (NULL+1))
-				{
-					FAILED("pthread_join() did not retrieve the pthread_exit() param");
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
 				}
 
-				for (j=0; j<3; j++)
-					if (tab[j] != j+1)
-					{
-						output("dump:\ntab[0]=%i\ntab[1]=%i\ntab[2]=%i\n", tab[0], tab[1], tab[2]);
-						FAILED("The cleanup handlers were not called as expected");
+				if (rval != (NULL + 1)) {
+					FAILED
+					    ("pthread_join() did not retrieve the pthread_exit() param");
+				}
+
+				for (j = 0; j < 3; j++)
+					if (tab[j] != j + 1) {
+						output
+						    ("dump:\ntab[0]=%i\ntab[1]=%i\ntab[2]=%i\n",
+						     tab[0], tab[1], tab[2]);
+						FAILED
+						    ("The cleanup handlers were not called as expected");
 					}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-1.c
index da80692..75c5118 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-1.c
@@ -39,9 +39,9 @@
 /* Thread's function. */
 void *a_thread_func(void *tmp)
 {
-	pthread_key_t    key;
-	int              value = 1;
-	int              rc = 0;
+	pthread_key_t key;
+	int value = 1;
+	int rc = 0;
 
 	rc = pthread_key_create(&key, destructor);
 	if (rc != 0) {
@@ -62,7 +62,7 @@
 int main()
 {
 	pthread_t new_th;
-	int       rc = 0;
+	int rc = 0;
 
 	/* Create a new thread. */
 	rc = pthread_create(&new_th, NULL, a_thread_func, NULL);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-2.c
index db61468..01bab15 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-2.c
@@ -30,32 +30,32 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -98,7 +98,7 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-int global=0;
+int global = 0;
 int tab[4];
 pthread_key_t tld[3];
 
@@ -110,31 +110,37 @@
 
 /* Cancelation cleanup handlers */
 CLEANUP(1)
-CLEANUP(2)
-CLEANUP(3)
+    CLEANUP(2)
+    CLEANUP(3)
 
 /* TLD destructor */
-void destructor(void * arg)
+void destructor(void *arg)
 {
-	*(int *) arg += global;
+	*(int *)arg += global;
 }
 
 /* Thread routine */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
 	ret = pthread_setspecific(tld[0], (void *)&tab[3]);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
 	pthread_cleanup_push(clnp3, NULL);
 	pthread_cleanup_push(clnp2, NULL);
 	ret = pthread_setspecific(tld[1], (void *)&tab[3]);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
 	pthread_cleanup_push(clnp1, NULL);
 	ret = pthread_setspecific(tld[2], (void *)&tab[3]);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
 	pthread_exit(NULL + 1);
 
@@ -146,90 +152,106 @@
 	return NULL;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
-	void * rval;
+	int ret = 0;
+	void *rval;
 	pthread_t child;
-	int i,j;
+	int i, j;
 
 	output_init();
 
 	scenar_init();
 
-	for (j=0; j<3; j++)
-	{
+	for (j = 0; j < 3; j++) {
 		ret = pthread_key_create(&tld[j], destructor);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create a TLD key");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create a TLD key");
+		}
 	}
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		if (scenarii[i].detached == 0)
-		{
-			#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+		if (scenarii[i].detached == 0) {
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", i,
+			       scenarii[i].descr);
+#endif
 
-			for (j=0; j<4; j++)
-				tab[j]=0;
-			global=0;
+			for (j = 0; j < 4; j++)
+				tab[j] = 0;
+			global = 0;
 
-			ret = pthread_create(&child, &scenarii[i].ta, threaded, NULL);
-			switch (scenarii[i].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[i].ta, threaded,
+					   NULL);
+			switch (scenarii[i].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
-
-				if (rval != (NULL+1))
-				{
-					FAILED("pthread_join() did not retrieve the pthread_exit() param");
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
 				}
 
-				for (j=0; j<3; j++)
-				{
-					if ((tab[j] != j+1) || (tab[3] != 9))
-					{
-						output("dump:\ntab[0]=%i\ntab[1]=%i\ntab[2]=%i\ntab[3]=%i\n", tab[0], tab[1], tab[2], tab[3]);
-						FAILED("The cleanup handlers were not called as expected");
+				if (rval != (NULL + 1)) {
+					FAILED
+					    ("pthread_join() did not retrieve the pthread_exit() param");
+				}
+
+				for (j = 0; j < 3; j++) {
+					if ((tab[j] != j + 1) || (tab[3] != 9)) {
+						output
+						    ("dump:\ntab[0]=%i\ntab[1]=%i\ntab[2]=%i\ntab[3]=%i\n",
+						     tab[0], tab[1], tab[2],
+						     tab[3]);
+						FAILED
+						    ("The cleanup handlers were not called as expected");
 					}
 				}
 			}
 		}
 	}
 
-	for (j=0; j<3; j++)
-	{
+	for (j = 0; j < 3; j++) {
 		ret = pthread_key_delete(tld[j]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to delete a TLD key");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to delete a TLD key");
+		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
index ab6a83a..b45f215 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/4-1.c
@@ -29,32 +29,32 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -97,29 +97,32 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-int global=0;
+int global = 0;
 
 /* atexit() routines */
 void at1(void)
 {
-	global+=1;
+	global +=1;
 }
+
 void at2(void)
 {
-	global+=2;
+	global +=2;
 }
 
 /* Thread routine */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
 	/* Note that this funtion will be registered once again for each scenario.
-	  POSIX requires the ability to register at least 32 functions so it should
-	  not be an issue in our case, as long as we don't get more than 32 scenarii
-	  (with joinable threads) */
+	   POSIX requires the ability to register at least 32 functions so it should
+	   not be an issue in our case, as long as we don't get more than 32 scenarii
+	   (with joinable threads) */
 	ret = atexit(at2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to register an atexit() routine");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to register an atexit() routine");
+	}
 
 	pthread_exit(NULL + 1);
 
@@ -127,10 +130,10 @@
 	return NULL;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
-	void * rval;
+	int ret = 0;
+	void *rval;
 	pthread_t child;
 	int i;
 
@@ -138,57 +141,72 @@
 
 	scenar_init();
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		if (scenarii[i].detached == 0)
-		{
-			#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+		if (scenarii[i].detached == 0) {
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", i,
+			       scenarii[i].descr);
+#endif
 
-			ret = pthread_create(&child, &scenarii[i].ta, threaded, NULL);
-			switch (scenarii[i].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[i].ta, threaded,
+					   NULL);
+			switch (scenarii[i].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
-
-				if (rval != (NULL+1))
-				{
-					FAILED("pthread_join() did not retrieve the pthread_exit() param");
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
 				}
 
-				if (global != 0)  {  FAILED("The function registered with atexit() executed");  }
+				if (rval != (NULL + 1)) {
+					FAILED
+					    ("pthread_join() did not retrieve the pthread_exit() param");
+				}
+
+				if (global !=0) {
+					FAILED
+					    ("The function registered with atexit() executed");
+				}
 
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
index ae432f8..d5dddfa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/5-1.c
@@ -28,32 +28,32 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -96,127 +96,156 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-int atctl=0;
+int atctl = 0;
 pthread_key_t tld[3];
 
 /* atexit() routines */
 void at1(void)
 {
-	atctl+=1;
+	atctl += 1;
 }
+
 void at2(void)
 {
-	atctl+=2;
+	atctl += 2;
 }
 
 /* TLD destructor */
-void destructor(void * arg)
+void destructor(void *arg)
 {
-	*(int *) arg += 1;
+	*(int *)arg += 1;
 }
 
 /* Thread routine */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
 	ret = atexit(at2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to register an atexit() routine");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to register an atexit() routine");
+	}
 
 	ret = pthread_setspecific(tld[0], arg);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
 	ret = pthread_setspecific(tld[1], arg);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
 	ret = pthread_setspecific(tld[2], arg);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to set TLD data");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to set TLD data");
+	}
 
-	return  NULL + 1;
+	return NULL + 1;
 
 	FAILED("return did not terminate the thread (oO)");
 	return NULL;
 }
 
 /* Main routine */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
-	int ctl=0;
-	void * rval;
+	int ret = 0;
+	int ctl = 0;
+	void *rval;
 	pthread_t child;
-	int i,j;
+	int i, j;
 
 	output_init();
 
 	scenar_init();
 
-	for (j=0; j<3; j++)
-	{
+	for (j = 0; j < 3; j++) {
 		ret = pthread_key_create(&tld[j], destructor);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create a TLD key");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create a TLD key");
+		}
 	}
 
-	for (i=0; i < NSCENAR; i++)
-	{
-		if (scenarii[i].detached == 0)
-		{
-			#if VERBOSE > 0
+	for (i = 0; i < NSCENAR; i++) {
+		if (scenarii[i].detached == 0) {
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", i, scenarii[i].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", i,
+			       scenarii[i].descr);
+#endif
 
-			ctl=0;
+			ctl = 0;
 
-			ret = pthread_create(&child, &scenarii[i].ta, threaded, &ctl);
-			switch (scenarii[i].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[i].ta, threaded,
+					   &ctl);
+			switch (scenarii[i].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 				ret = pthread_join(child, &rval);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
-
-				if (rval != (NULL+1))
-				{
-					FAILED("pthread_join() did not retrieve the pthread_exit() param");
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
 				}
 
-				if (atctl != 0)  {  FAILED("The function registered with atexit() executed");  }
+				if (rval != (NULL + 1)) {
+					FAILED
+					    ("pthread_join() did not retrieve the pthread_exit() param");
+				}
 
-				if (ctl != 3)  {  FAILED("The TLD destructors were not called");  }
+				if (atctl != 0) {
+					FAILED
+					    ("The function registered with atexit() executed");
+				}
+
+				if (ctl != 3) {
+					FAILED
+					    ("The TLD destructors were not called");
+				}
 			}
 		}
 	}
 
-	for (j=0; j<3; j++)
-	{
+	for (j = 0; j < 3; j++) {
 		ret = pthread_key_delete(tld[j]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to delete a TLD key");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to delete a TLD key");
+		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-1.c
index 6b7bbd0..f961a9e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-1.c
@@ -32,35 +32,35 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -104,7 +104,7 @@
 /********************************************************************************************/
 
 /* This will be used to control that atexit() has been called */
-int * ctl;
+int *ctl;
 long mf;
 
 void clnp(void)
@@ -113,7 +113,7 @@
 }
 
 /* Thread routine */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
@@ -124,175 +124,193 @@
 		*ctl = 0;
 
 	pid = fork();
-	if (pid == (pid_t)-1)
-	{
+	if (pid == (pid_t) - 1) {
 		UNRESOLVED(errno, "Failed to fork()");
 	}
-	if (pid == 0)
-	{
+	if (pid == 0) {
 		/* children */
-		if (mf > 0)
-		{
+		if (mf > 0) {
 			ret = atexit(clnp);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to register atexit function");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to register atexit function");
+			}
 		}
 
 		/* exit the last (and only) thread */
 		pthread_exit(&ret);
 
-		FAILED("pthread_exit() did not terminate the process when there was only 1 thread");
+		FAILED
+		    ("pthread_exit() did not terminate the process when there was only 1 thread");
 	}
 
 	/* Only the parent process goes this far */
 	chk = waitpid(pid, &status, 0);
-	if (chk != pid)
-	{
+	if (chk != pid) {
 		output("Expected pid: %i. Got %i\n", (int)pid, (int)chk);
 		UNRESOLVED(errno, "Waitpid failed");
 	}
 
-	if (WIFSIGNALED(status))
-	{
-		output("Child process killed with signal %d\n",WTERMSIG(status));
-		UNRESOLVED(-1 , "Child process was killed");
+	if (WIFSIGNALED(status)) {
+		output("Child process killed with signal %d\n",
+		       WTERMSIG(status));
+		UNRESOLVED(-1, "Child process was killed");
 	}
 
-	if (WIFEXITED(status))
-	{
+	if (WIFEXITED(status)) {
 		ret = WEXITSTATUS(status);
-	}
-	else
-	{
+	} else {
 		UNRESOLVED(-1, "Child process was neither killed nor exited");
 	}
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		output("Exit status was: %i\n", ret);
 		FAILED("The child process did not exit with 0 status.");
 	}
 
 	if (mf > 0)
 		if (*ctl != 1)
-			FAILED("pthread_exit() in the last thread did not execute atexit() routines");
+			FAILED
+			    ("pthread_exit() in the last thread did not execute atexit() routines");
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	return NULL;
 }
 
 /* Main routine */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
 	output_init();
 
 	scenar_init();
 
 	/* We want to share some memory with the child process */
-	if (mf> 0)
-	{
+	if (mf > 0) {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/pthread_exit_6-1-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
-		ctl = (int *) mmaped;
+		ctl = (int *)mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, &ctl);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
-		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-2.c
index ebbcbf5..9b1bc6d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/6-2.c
@@ -26,33 +26,33 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
 
  /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -98,14 +98,18 @@
 /********************************************************************************************/
 
 /* Thread routine */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	pthread_exit(arg);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/1-1.c
index 309b744..4495380 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/1-1.c
@@ -33,10 +33,10 @@
 	clockid_t cid;
 
 	rc = pthread_getcpuclockid(pthread_self(), &cid);
-        if (rc !=0) {
-                perror(ERROR_PREFIX "pthread_getcpuclockid");
-                exit(PTS_FAIL);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_getcpuclockid");
+		exit(PTS_FAIL);
+	}
 	printf("clock id of new thread is %d\n", cid);
 
 	pthread_exit(0);
@@ -49,17 +49,16 @@
 	pthread_t new_th;
 
 	rc = pthread_create(&new_th, NULL, thread_func, NULL);
-        if (rc !=0) {
-                perror(ERROR_PREFIX "failed to create a thread");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "failed to create a thread");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_join(new_th, NULL);
-        if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
+		exit(PTS_UNRESOLVED);
+	}
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/speculative/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/speculative/3-1.c
index c0168a3..8f52fe0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/speculative/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getcpuclockid/speculative/3-1.c
@@ -41,25 +41,24 @@
 	pthread_t new_th;
 
 	rc = pthread_create(&new_th, NULL, thread_func, NULL);
-        if (rc !=0) {
-                perror(ERROR_PREFIX "failed to create a thread");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "failed to create a thread");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_join(new_th, NULL);
-        if (rc != 0)
-        {
-                perror(ERROR_PREFIX "pthread_join");
-                exit(PTS_UNRESOLVED);
-        }
+	if (rc != 0) {
+		perror(ERROR_PREFIX "pthread_join");
+		exit(PTS_UNRESOLVED);
+	}
 
 	rc = pthread_getcpuclockid(new_th, &cid);
-        if (rc == ESRCH) {
-                printf("pthread_getcpuclockid returns ESRCH "
-                       "when thread_id doesn't exist\n");
-        } else {
-                printf("pthread_getcpuclockid doesn't return "
-                       "ESRCH when thread_id doesn't exist\n");
+	if (rc == ESRCH) {
+		printf("pthread_getcpuclockid returns ESRCH "
+		       "when thread_id doesn't exist\n");
+	} else {
+		printf("pthread_getcpuclockid doesn't return "
+		       "ESRCH when thread_id doesn't exist\n");
 	}
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getschedparam/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getschedparam/1-2.c
index 8c3401a..5a4db42 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getschedparam/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getschedparam/1-2.c
@@ -55,7 +55,7 @@
 
 	if (sparam.sched_priority != priority) {
 		printf("Failed:  priorities: %u != %u\n",
-					sparam.sched_priority, priority);
+		       sparam.sched_priority, priority);
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/1-1.c
index 0c778de..7481f4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/1-1.c
@@ -31,18 +31,15 @@
 {
 	pthread_key_t keys[NUM_OF_KEYS];
 	int i;
-	void* rc;
+	void *rc;
 
-	for (i = 0;i<NUM_OF_KEYS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_KEYS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
-		} else
-		{
-			if (pthread_setspecific(keys[i], (void *)(long)(i + KEY_VALUE)) != 0)
-			{
+		} else {
+			if (pthread_setspecific
+			    (keys[i], (void *)(long)(i + KEY_VALUE)) != 0) {
 				printf("Error: pthread_setspecific() failed\n");
 				return PTS_UNRESOLVED;
 			}
@@ -50,17 +47,15 @@
 		}
 	}
 
-	for (i = 0;i<NUM_OF_KEYS;++i)
-	{
+	for (i = 0; i < NUM_OF_KEYS; ++i) {
 		rc = pthread_getspecific(keys[i]);
-		if (rc != (void *)(long)(i + KEY_VALUE))
-		{
-			printf("Test FAILED: Did not return correct value of thread-specific key, expected %d, but got %ld\n", (i + KEY_VALUE), (long)rc);
+		if (rc != (void *)(long)(i + KEY_VALUE)) {
+			printf
+			    ("Test FAILED: Did not return correct value of thread-specific key, expected %d, but got %ld\n",
+			     (i + KEY_VALUE), (long)rc);
 			return PTS_FAIL;
-		} else
-		{
-			if (pthread_key_delete(keys[i]) != 0)
-			{
+		} else {
+			if (pthread_key_delete(keys[i]) != 0) {
 				printf("Error: pthread_key_delete() failed\n");
 				return PTS_UNRESOLVED;
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/3-1.c
index a6e99d3..44f1453 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/3-1.c
@@ -26,23 +26,22 @@
 int main()
 {
 	pthread_key_t key;
-	void* rc;
+	void *rc;
 
-	if (pthread_key_create(&key, NULL) != 0)
-	{
+	if (pthread_key_create(&key, NULL) != 0) {
 		printf("Error: pthread_key_create() failed\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_getspecific(key);
-	if (rc != NULL)
-	{
-		printf("Test FAILED: Did not return correct value, expected NULL, but got %ld\n", (long)rc);
+	if (rc != NULL) {
+		printf
+		    ("Test FAILED: Did not return correct value, expected NULL, but got %ld\n",
+		     (long)rc);
 		return PTS_FAIL;
 	}
 
-	if (pthread_key_delete(key) != 0)
-	{
+	if (pthread_key_delete(key) != 0) {
 		printf("Error: pthread_key_delete() failed\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
index d23bcaf..480d300 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c
@@ -82,7 +82,7 @@
 #if VERBOSE > 0
 		output("-----\n");
 		output("Starting test with scenario (%i): %s\n",
-			sc, scenarii[sc].descr);
+		       sc, scenarii[sc].descr);
 #endif
 		ret = clock_gettime(CLOCK_REALTIME, &ts_pre);
 		if (ret != 0)
@@ -95,7 +95,7 @@
 		case 0:
 			if (ret != 0)
 				UNRESOLVED(ret, "Failed to create this thread");
-				break;
+			break;
 		case 1:
 			if (ret == 0)
 				UNRESOLVED(-1, "An error was expected but the "
@@ -129,11 +129,11 @@
 			    ((ts_th.tv_sec == ts_pre.tv_sec) &&
 			     (ts_th.tv_nsec < ts_pre.tv_nsec))) {
 				output("Pre  : %d.%09d\n", ts_pre.tv_sec,
-					ts_pre.tv_nsec);
+				       ts_pre.tv_nsec);
 				output("child: %d.%09d\n", ts_th.tv_sec,
-					ts_th.tv_nsec);
+				       ts_th.tv_nsec);
 				output("Post : %d.%09d\n", ts_post.tv_sec,
-					ts_post.tv_nsec);
+				       ts_post.tv_nsec);
 				FAILED("Child returned before its creation ??");
 			}
 
@@ -141,11 +141,11 @@
 			    ((ts_post.tv_sec == ts_th.tv_sec) &&
 			     (ts_post.tv_nsec < ts_th.tv_nsec))) {
 				output("Pre  : %d.%09d\n", ts_pre.tv_sec,
-					ts_pre.tv_nsec);
+				       ts_pre.tv_nsec);
 				output("child: %d.%09d\n", ts_th.tv_sec,
-					ts_th.tv_nsec);
+				       ts_th.tv_nsec);
 				output("Post : %d.%09d\n", ts_post.tv_sec,
-					ts_post.tv_nsec);
+				       ts_post.tv_nsec);
 				FAILED("pthread_join returned before child "
 				       "terminated");
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/2-1.c
index 2f6a8dd..cdf86da 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/2-1.c
@@ -29,8 +29,8 @@
  */
 #define RETURN_CODE ((void *)100)
 
-# define INTHREAD 0	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
 /* Manual semaphore used to indicate when the thread has been created. */
 static int sem;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
index 0a50ca2..d7a61e6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c
@@ -69,7 +69,7 @@
 /* Canceled thread */
 void *joiner_func(void *arg)
 {
-	(void) pthread_join(*(pthread_t *) arg, NULL);
+	(void)pthread_join(*(pthread_t *) arg, NULL);
 
 	FAILED("The joiner thread was not canceled");
 
@@ -105,18 +105,17 @@
 		if (ret != 0)
 			UNRESOLVED(ret, "failed to lock the mutex");
 
-		ret = pthread_create(&child, &scenarii[sc].ta,
-				     threaded, NULL);
+		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
 
 		switch (scenarii[sc].result) {
-		/* Operation was expected to succeed */
+			/* Operation was expected to succeed */
 		case 0:
 
 			if (ret != 0)
 				UNRESOLVED(ret, "Failed to create this thread");
 
 			break;
-		/* Operation was expected to fail */
+			/* Operation was expected to fail */
 		case 1:
 
 			if (ret == 0)
@@ -124,7 +123,7 @@
 					   "but the thread creation succeeded");
 
 			break;
-		/* We did not know the expected result */
+			/* We did not know the expected result */
 		case 2:
 		default:
 #if VERBOSE > 0
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
index 68b6805..e5c510c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c
@@ -67,7 +67,7 @@
 
 static void *sendsig(void *arg)
 {
-	struct thestruct *thearg = (struct thestruct *) arg;
+	struct thestruct *thearg = (struct thestruct *)arg;
 	int ret;
 	pid_t process;
 
@@ -77,7 +77,7 @@
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 "
-				"in signal thread");
+			   "in signal thread");
 
 	while (do_it1) {
 #ifdef WITH_SYNCHRO
@@ -129,7 +129,7 @@
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 "
-				"in worker thread");
+			   "in worker thread");
 
 	while (do_it2) {
 		for (sc = 0; sc < NSCENAR; sc++) {
@@ -144,7 +144,7 @@
 			if ((scenarii[sc].result == 1) && (ret == 0))
 
 				UNRESOLVED(-1, "An error was expected but the "
-					       "thread creation succeeded");
+					   "thread creation succeeded");
 
 			if (ret == 0) {
 				count_ope++;
@@ -155,7 +155,7 @@
 
 				if (ret != 0)
 					UNRESOLVED(ret, "Unable to join a "
-							"thread");
+						   "thread");
 
 			}
 		}
@@ -199,7 +199,7 @@
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 	if (ret != 0)
 		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 "
-				"in main thread");
+			   "in main thread");
 
 #ifdef WITH_SYNCHRO
 	if (sem_init(&semsig1, 0, 1))
@@ -224,11 +224,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	ret = pthread_create(&th_sig1, NULL, sendsig, (void *) &arg1);
+	ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1);
 	if (ret)
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 
-	ret = pthread_create(&th_sig2, NULL, sendsig, (void *) &arg2);
+	ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2);
 	if (ret)
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 
@@ -266,6 +266,6 @@
 	output("  %d signals were sent meanwhile.\n", count_sig);
 
 #endif
- #endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-1.c
index d943dcd..922c789 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-1.c
@@ -34,18 +34,15 @@
 int main()
 {
 	int i;
-	void* rc;
+	void *rc;
 
-	for (i = 0;i<NUM_OF_KEYS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_KEYS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
-		} else
-		{
-			if (pthread_setspecific(keys[i], (void *)(long)(i + KEY_VALUE)) != 0)
-			{
+		} else {
+			if (pthread_setspecific
+			    (keys[i], (void *)(long)(i + KEY_VALUE)) != 0) {
 				printf("Error: pthread_setspecific() failed\n");
 				return PTS_UNRESOLVED;
 			}
@@ -53,17 +50,15 @@
 		}
 	}
 
-	for (i = 0;i<NUM_OF_KEYS;++i)
-	{
+	for (i = 0; i < NUM_OF_KEYS; ++i) {
 		rc = pthread_getspecific(keys[i]);
-		if (rc != (void *)(long)(i + KEY_VALUE))
-		{
-			printf("Test FAILED: Did not return correct value of thread-specific key, expected %ld, but got %ld\n", (long)(i + KEY_VALUE), (long)rc);
+		if (rc != (void *)(long)(i + KEY_VALUE)) {
+			printf
+			    ("Test FAILED: Did not return correct value of thread-specific key, expected %ld, but got %ld\n",
+			     (long)(i + KEY_VALUE), (long)rc);
 			return PTS_FAIL;
-		} else
-		{
-			if (pthread_key_delete(keys[i]) != 0)
-			{
+		} else {
+			if (pthread_key_delete(keys[i]) != 0) {
 				printf("Error: pthread_key_delete() failed\n");
 				return PTS_UNRESOLVED;
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-2.c
index f7381ec..1c08d39 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/1-2.c
@@ -34,10 +34,9 @@
 void *a_thread_func()
 {
 	/* Set the key to KEY_VALUE */
-	if (pthread_setspecific(keys[i], (void *)(KEY_VALUE)) != 0)
-	{
+	if (pthread_setspecific(keys[i], (void *)(KEY_VALUE)) != 0) {
 		printf("Error: pthread_setspecific() failed\n");
-		pthread_exit((void*)PTS_FAIL);
+		pthread_exit((void *)PTS_FAIL);
 	}
 
 	pthread_exit(0);
@@ -49,10 +48,8 @@
 	void *value_ptr;
 
 	/* Create a key */
-	for (i = 0;i<NUM_OF_THREADS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_THREADS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
 		}
@@ -60,25 +57,22 @@
 
 	/* Create NUM_OF_THREADS threads and in the thread_func, it will
 	 * use pthread_setspecific with the same KEY_VALUE */
-	for (i = 0;i<NUM_OF_THREADS;i++)
-	{
+	for (i = 0; i < NUM_OF_THREADS; i++) {
 		/* Create a thread */
-		if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-		{
+		if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 			perror("Error creating thread\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Wait for thread to end */
-		if (pthread_join(new_th, &value_ptr) != 0)
-		{
+		if (pthread_join(new_th, &value_ptr) != 0) {
 			perror("Error in pthread_join\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (value_ptr == (void*) PTS_FAIL)
-		{
-			printf("Test FAILED: Could not use a certain key value to set for many keys\n");
+		if (value_ptr == (void *)PTS_FAIL) {
+			printf
+			    ("Test FAILED: Could not use a certain key value to set for many keys\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
index b415357..73bc6ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c
@@ -26,27 +26,23 @@
 int main()
 {
 	pthread_key_t key;
-	void* rc;
+	void *rc;
 
 	/* Verify that the value associated with "key" in a new thread is NULL */
 	rc = pthread_getspecific(key);
-	if (rc != NULL)
-	{
+	if (rc != NULL) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_key_create(&key, NULL) != 0)
-	{
+	if (pthread_key_create(&key, NULL) != 0) {
 		printf("Error: pthread_key_create() failed\n");
 		return PTS_UNRESOLVED;
-	} else
-	{
+	} else {
 		/* Verify that the value associated with "key" after it is newly created is
 		 * NULL */
 		rc = pthread_getspecific(key);
-		if (rc != NULL)
-		{
+		if (rc != NULL) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/3-1.c
index 72bf80b..52a0458 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/3-1.c
@@ -42,10 +42,9 @@
 {
 
 	/* Set the value of the key to a value */
-	if (pthread_setspecific(key, (void *)(KEY_VALUE)) != 0)
-	{
+	if (pthread_setspecific(key, (void *)(KEY_VALUE)) != 0) {
 		printf("Error: pthread_setspecific() failed\n");
-		pthread_exit((void*) PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 
 	/* The thread ends here, the destructor for the key should now be called after this */
@@ -60,29 +59,25 @@
 	dest_cnt = 0;
 
 	/* Create a key with a destructor function */
-	if (pthread_key_create(&key, dest_func) != 0)
-	{
+	if (pthread_key_create(&key, dest_func) != 0) {
 		printf("Error: pthread_key_create() failed\n");
-		pthread_exit((void*) PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 
 	/* Create a thread */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for the thread's return */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check if the destructor was called */
-	if (dest_cnt == 0)
-	{
+	if (dest_cnt == 0) {
 		printf("Test FAILED: Destructor not called\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/speculative/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/speculative/5-1.c
index b0a6efa..5079d32 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/speculative/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/speculative/5-1.c
@@ -40,29 +40,26 @@
 {
 	int i, rc;
 
-	for (i = 0; i<= PTHREAD_KEYS_MAX; i++)
-	{
+	for (i = 0; i <= PTHREAD_KEYS_MAX; i++) {
 		rc = pthread_key_create(&keys[i], NULL);
 		pthread_key_t key;
 		rc = pthread_key_create(&key, NULL);
-		if (i == PTHREAD_KEYS_MAX)
-		{
-			if (rc != EAGAIN)
-			{
-				printf("Test FAILED: Expected EAGAIN when exceeded the limit of keys in a single process, but got: %d\n", rc);
+		if (i == PTHREAD_KEYS_MAX) {
+			if (rc != EAGAIN) {
+				printf
+				    ("Test FAILED: Expected EAGAIN when exceeded the limit of keys in a single process, but got: %d\n",
+				     rc);
 				return PTS_FAIL;
 			}
 		}
 
-		else if (rc != 0)
-		{
-			if (rc != EAGAIN)
-			{
+		else if (rc != 0) {
+			if (rc != EAGAIN) {
 				printf("Error: pthread_key_create() failed\n");
 				return PTS_UNRESOLVED;
-			} else
-			{
-				printf("Test FAILED: EAGAIN was returned before the key limit was exceeded\n");
+			} else {
+				printf
+				    ("Test FAILED: EAGAIN was returned before the key limit was exceeded\n");
 				return PTS_FAIL;
 			}
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-1.c
index e7f6716..be2c320 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-1.c
@@ -35,16 +35,13 @@
 	pthread_key_t keys[NUM_OF_KEYS];
 	int i;
 
-	for (i = 0;i<NUM_OF_KEYS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_KEYS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pthread_key_delete(keys[i]) != 0)
-		{
+		if (pthread_key_delete(keys[i]) != 0) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-2.c
index 6421eb2..1917b0c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/1-2.c
@@ -36,22 +36,19 @@
 	pthread_key_t keys[NUM_OF_KEYS];
 	int i;
 
-	for (i = 0;i<NUM_OF_KEYS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_KEYS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pthread_setspecific(keys[i], (void*)(long)(KEY_VALUE + i)) != 0)
-		{
+		if (pthread_setspecific(keys[i], (void *)(long)(KEY_VALUE + i))
+		    != 0) {
 			printf("Error: pthread_setspecific failed\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pthread_key_delete(keys[i]) != 0)
-		{
+		if (pthread_key_delete(keys[i]) != 0) {
 			printf("Test FAILED\n");
 			return PTS_FAIL;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/2-1.c
index 182f4ce..63a1259 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_key_delete/2-1.c
@@ -34,8 +34,7 @@
 {
 	dest_cnt++;
 	/* Delete the key and check if an error has occured */
-	if (pthread_key_delete(key) != 0)
-	{
+	if (pthread_key_delete(key) != 0) {
 		dest_cnt++;
 	}
 }
@@ -45,10 +44,9 @@
 {
 
 	/* Set the value of the key to a value */
-	if (pthread_setspecific(key, (void *)(KEY_VALUE)) != 0)
-	{
+	if (pthread_setspecific(key, (void *)(KEY_VALUE)) != 0) {
 		printf("Error: pthread_setspecific() failed\n");
-		pthread_exit((void*) PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 
 	/* The thread ends here, the destructor for the key should now be called after this */
@@ -63,37 +61,32 @@
 	dest_cnt = 0;
 
 	/* Create a key with a destructor function */
-	if (pthread_key_create(&key, dest_func) != 0)
-	{
+	if (pthread_key_create(&key, dest_func) != 0) {
 		printf("Error: pthread_key_create() failed\n");
-		pthread_exit((void*) PTS_UNRESOLVED);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 
 	/* Create a thread */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for the thread's return */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check if the destructor was called and if the pthread_key_delete function was
 	 * called successfully */
-	if (dest_cnt != 1)
-	{
-		if (dest_cnt == 0)
-		{
+	if (dest_cnt != 1) {
+		if (dest_cnt == 0) {
 			printf("Error calling the key destructor function\n");
 			return PTS_UNRESOLVED;
-		} else
-		{
-			printf("Test FAILED: pthread_key_delete failed to be called from the destructor function\n");
+		} else {
+			printf
+			    ("Test FAILED: pthread_key_delete failed to be called from the destructor function\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-1.c
index 4b43341..b3ccfb3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-1.c
@@ -41,14 +41,15 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0
-# define INMAIN 1
-# define SIGTOTEST SIGABRT
+#define INTHREAD 0
+#define INMAIN 1
+#define SIGTOTEST SIGABRT
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int handler_called = 0;
 
-void handler() {
+void handler()
+{
 	printf("signal was called\n");
 	handler_called = 1;
 	return;
@@ -62,14 +63,14 @@
 	sigemptyset(&act.sa_mask);
 	sigaction(SIGTOTEST, &act, 0);
 
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	sleep(5);
 
-	handler_called=-1;
+	handler_called = -1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -78,26 +79,24 @@
 {
 	pthread_t new_th;
 
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_kill(new_th, SIGTOTEST) != 0)
-	{
+	if (pthread_kill(new_th, SIGTOTEST) != 0) {
 		printf("Test FAILED: Couldn't send signal to thread\n");
 		return PTS_FAIL;
 	}
 
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
-	while (handler_called==0)
+	while (handler_called == 0)
 		sleep(1);
 
 	if (handler_called == -1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-2.c
index 2f5d8cd..3876bd1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/1-2.c
@@ -88,14 +88,14 @@
 {
 	handler_called = sig;
 
-	if (!pthread_equal(pthread_self(), ch))
-	{
-		FAILED("The signal handler was not trigged in the killed thread");
+	if (!pthread_equal(pthread_self(), ch)) {
+		FAILED
+		    ("The signal handler was not trigged in the killed thread");
 	}
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int rebours = 3;
 
@@ -109,7 +109,7 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -123,45 +123,39 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	sigaction(SIGUSR2, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Create the child */
 	ret = pthread_create(&ch, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* kill the child thread */
 	ret = pthread_kill(ch, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to kill child thread");
 	}
 
 	/* Wait for child thread termination */
 	ret = pthread_join(ch, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
 	/* Check if handler has been trigged inside the child */
-	if (handler_called != SIGUSR2)
-	{
+	if (handler_called != SIGUSR2) {
 		FAILED("Wrong signal received in thread");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/2-1.c
index 675c659..03073fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/2-1.c
@@ -22,7 +22,7 @@
 {
 	pthread_t main_thread;
 
-	main_thread=pthread_self();
+	main_thread = pthread_self();
 
 	if (pthread_kill(main_thread, 0) != 0) {
 		printf("Could not call pthread_kill with sig = 0\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/3-1.c
index 49c2a97..fff6e0b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/3-1.c
@@ -22,7 +22,7 @@
 
 	main_thread = pthread_self();
 
- 	if (pthread_kill(main_thread, 0) != 0) {
+	if (pthread_kill(main_thread, 0) != 0) {
 		printf("pthread_kill did not return success.\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
index c598bbb..5126171 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
@@ -21,10 +21,10 @@
 #include <string.h>
 #include "posixtest.h"
 
-void * thread_function(void *arg)
+void *thread_function(void *arg)
 {
 	/* Does nothing */
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
 	/* To please some compilers */
 	return NULL;
@@ -37,26 +37,22 @@
 
 	int rc;
 
-	rc = pthread_create(&child_thread, NULL,
-		thread_function, NULL);
-	if (rc != 0)
-	{
+	rc = pthread_create(&child_thread, NULL, thread_function, NULL);
+	if (rc != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_join(child_thread, NULL);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Now the child_thread exited, it is an invalid tid */
-	memcpy(&invalid_tid, &child_thread,
-			sizeof(pthread_t));
+	memcpy(&invalid_tid, &child_thread, sizeof(pthread_t));
 
- 	if (pthread_kill(invalid_tid, 0) == ESRCH) {
+	if (pthread_kill(invalid_tid, 0) == ESRCH) {
 		printf("pthread_kill() returns ESRCH.\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
index be5b7c9..c57a99c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c
@@ -31,21 +31,21 @@
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
 #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
+#include <errno.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,20 +87,17 @@
 
 sigset_t usersigs;
 
-typedef struct
-{
+typedef struct {
 	int sig;
 #ifdef WITH_SYNCHRO
 	sem_t *sem;
 #endif
-}
-
-thestruct;
+} thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
-	thestruct * thearg = (thestruct *) arg;
+	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
@@ -109,17 +106,15 @@
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 #ifdef WITH_SYNCHRO
 
-		if (( ret = sem_wait( thearg->sem ) ))
-		{
+		if ((ret = sem_wait(thearg->sem))) {
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
 
@@ -128,8 +123,7 @@
 
 		ret = kill(process, thearg->sig);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Kill in sendsig");
 		}
 
@@ -144,11 +138,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig1))
-	{
+	if (sem_post(&semsig1)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 	}
-
 #endif
 }
 
@@ -157,11 +149,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig2))
-	{
+	if (sem_post(&semsig2)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 2");
 	}
-
 #endif
 }
 
@@ -170,48 +160,45 @@
 void initializer(void)
 {
 	init_ctl++;
-	return ;
+	return;
 }
 
 /* Test function -- calls pthread_kill() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
 	int ret = 0;
 
 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 
 		ret = pthread_kill(pthread_self(), 0);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_kill returned EINTR");
 		}
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "pthread_kill returned an unexpected error");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "pthread_kill returned an unexpected error");
 		}
 
 		ret = pthread_kill(pthread_self(), SIGUSR1);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_kill returned EINTR");
 		}
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "pthread_kill returned an unexpected error");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "pthread_kill returned an unexpected error");
 		}
 	}
 
@@ -219,7 +206,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -231,19 +218,17 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
@@ -254,34 +239,28 @@
 
 	ret |= sigaddset(&usersigs, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
 	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
 	}
-
 #ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{
+	if (sem_init(&semsig1, 0, 1)) {
 		UNRESOLVED(errno, "Semsig1  init");
 	}
 
-	if (sem_init(&semsig2, 0, 1))
-	{
+	if (sem_init(&semsig2, 0, 1)) {
 		UNRESOLVED(errno, "Semsig2  init");
 	}
-
 #endif
 
-	if ((ret = pthread_create(&th_work, NULL, test, NULL)))
-	{
+	if ((ret = pthread_create(&th_work, NULL, test, NULL))) {
 		UNRESOLVED(ret, "Worker thread creation failed");
 	}
 
@@ -292,13 +271,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *) & arg1)))
-	{
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 	}
 
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *) & arg2)))
-	{
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 	}
 
@@ -306,27 +283,22 @@
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{
+	if ((ret = pthread_join(th_sig1, NULL))) {
 		UNRESOLVED(ret, "Signal 1 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{
+	if ((ret = pthread_join(th_sig2, NULL))) {
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{
+	if ((ret = pthread_join(th_work, NULL))) {
 		UNRESOLVED(ret, "Worker thread join failed");
 	}
-
 #if VERBOSE > 0
 	output("Test executed successfully.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/1-1.c
index 3294827..6eaddb4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/1-1.c
@@ -15,8 +15,8 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-pthread_mutex_t  mutex1, mutex2;
-pthread_mutex_t  mutex3 = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t mutex1, mutex2;
+pthread_mutex_t mutex3 = PTHREAD_MUTEX_INITIALIZER;
 
 int main()
 {
@@ -24,46 +24,48 @@
 	int rc;
 
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) != 0) {
-		fprintf(stderr,"Error at pthread_mutexattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutexattr_init(&mta)) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_init(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize mutex1 with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex1,&mta)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex1, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex1, &mta)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex1, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize mutex2 with NULL attributes */
-	if ((rc=pthread_mutex_init(&mutex2,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex2, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex2, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex2, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the mutex attributes object */
-	if ((rc=pthread_mutexattr_destroy(&mta)) != 0) {
-		fprintf(stderr,"Error at pthread_mutexattr_destroy(), rc=%d\n",rc);
+	if ((rc = pthread_mutexattr_destroy(&mta)) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_destroy(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy mutex1 */
-	if ((rc=pthread_mutex_destroy(&mutex1)) != 0) {
-		fprintf(stderr,"Fail to destroy mutex1, rc=%d\n",rc);
+	if ((rc = pthread_mutex_destroy(&mutex1)) != 0) {
+		fprintf(stderr, "Fail to destroy mutex1, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Destroy mutex2 */
-	if ((rc=pthread_mutex_destroy(&mutex2)) != 0) {
-		fprintf(stderr,"Fail to destroy mutex2, rc=%d\n",rc);
+	if ((rc = pthread_mutex_destroy(&mutex2)) != 0) {
+		fprintf(stderr, "Fail to destroy mutex2, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Destroy mutex3 */
-	if ((rc=pthread_mutex_destroy(&mutex3)) != 0) {
-		fprintf(stderr,"Fail to destroy mutex3, rc=%d\n",rc);
+	if ((rc = pthread_mutex_destroy(&mutex3)) != 0) {
+		fprintf(stderr, "Fail to destroy mutex3, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-1.c
index 60c1c15..63dfb85 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-1.c
@@ -19,27 +19,22 @@
 	pthread_mutex_t mutex;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutex_init(&mutex,NULL) != 0)
-	{
-		fprintf(stderr,"Cannot initialize mutex object\n");
+	if (pthread_mutex_init(&mutex, NULL) != 0) {
+		fprintf(stderr, "Cannot initialize mutex object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the mutex attributes object */
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
-		fprintf(stderr,"Cannot destroy the mutex object\n");
+	if (pthread_mutex_destroy(&mutex) != 0) {
+		fprintf(stderr, "Cannot destroy the mutex object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize the mutex attributes object again.  This shouldn't result in an error. */
-	if (pthread_mutex_init(&mutex,NULL) != 0)
-	{
+	if (pthread_mutex_init(&mutex, NULL) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-2.c
index 4ed7ec9..80684af 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-2.c
@@ -26,26 +26,26 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -76,31 +76,37 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, "Pshared mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, "Pshared Recursive mutex"}
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
-	int i,j;
+	int i, j;
 	pthread_mutex_t mtx;
 	pthread_mutexattr_t ma[NSCENAR + 1];
 	pthread_mutexattr_t *pma[NSCENAR + 2];
@@ -113,93 +119,115 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 
 	/* Initialize the mutex attributes objects */
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		ret = pthread_mutexattr_init(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma[i], scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma[i], PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
+		if ((pshared > 0) && (scenarii[i].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma[i],
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
 		}
 	}
-	 /* Default mutexattr object */
+	/* Default mutexattr object */
 	ret = pthread_mutexattr_init(&ma[i]);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Unable to initialize the mutex attribute object");
+	}
 
 	/* Initialize the pointer array */
-	for (i=0; i<NSCENAR+1; i++)
-		pma[i]=&ma[i];
+	for (i = 0; i < NSCENAR + 1; i++)
+		pma[i] = &ma[i];
 
 	/* NULL pointer */
 	pma[i] = NULL;
 
 	/* Ok, we can now proceed to the test */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Attributes are ready, proceed to the test\n");
-	#endif
+#endif
 
-	for (i=0; i<NSCENAR + 2; i++)
-	{
-		for (j=0; j<NSCENAR + 2; j++)
-		{
-			#if VERBOSE > 1
-			char * nul="NULL";
-			char * def ="Default";
-			char * stri;
-			char * strj;
-			if (i<NSCENAR)
+	for (i = 0; i < NSCENAR + 2; i++) {
+		for (j = 0; j < NSCENAR + 2; j++) {
+#if VERBOSE > 1
+			char *nul = "NULL";
+			char *def = "Default";
+			char *stri;
+			char *strj;
+			if (i < NSCENAR)
 				stri = scenarii[i].descr;
-			if (i==NSCENAR)
+			if (i == NSCENAR)
 				stri = def;
-			if (i==NSCENAR+1)
+			if (i == NSCENAR + 1)
 				stri = nul;
-			if (j<NSCENAR)
+			if (j < NSCENAR)
 				strj = scenarii[j].descr;
-			if (j==NSCENAR)
+			if (j == NSCENAR)
 				strj = def;
-			if (j==NSCENAR+1)
+			if (j == NSCENAR + 1)
 				strj = nul;
 
-			output("Init with: %s, \nreinit with: %s\n", stri, strj);
-			#endif
+			output("Init with: %s, \nreinit with: %s\n", stri,
+			       strj);
+#endif
 
 			ret = pthread_mutex_init(&mtx, pma[i]);
-			if (ret != 0)  {   UNRESOLVED(ret, "Failed to init the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to init the mutex");
+			}
 
 			ret = pthread_mutex_destroy(&mtx);
-			if (ret != 0)  {  FAILED("Failed to destroy an initialized unlocked mutex");  }
+			if (ret != 0) {
+				FAILED
+				    ("Failed to destroy an initialized unlocked mutex");
+			}
 
 			ret = pthread_mutex_init(&mtx, pma[j]);
-			if (ret != 0)  {   FAILED("Failed to re-init the mutex");  }
+			if (ret != 0) {
+				FAILED("Failed to re-init the mutex");
+			}
 
 			ret = pthread_mutex_destroy(&mtx);
-			if (ret != 0)  {  FAILED("Failed to destroy an initialized unlocked mutex");  }
+			if (ret != 0) {
+				FAILED
+				    ("Failed to destroy an initialized unlocked mutex");
+			}
 
 		}
 	}
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed; destroying the test data\n");
-	#endif
+#endif
 
-	for (i=0; i<NSCENAR + 1; i++)
-	{
+	for (i = 0; i < NSCENAR + 1; i++) {
 		ret = pthread_mutexattr_destroy(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a mutex attribute object");
+		}
 	}
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/3-1.c
index 62893c3..625d627 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/3-1.c
@@ -17,31 +17,30 @@
 
 int main()
 {
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex object */
-	if ((rc=pthread_mutex_init(&mutex,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc=pthread_mutex_destroy(&mutex)) == 0) {
+	if ((rc = pthread_mutex_destroy(&mutex)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* The following error codes are possible, but against assertion 5 */
 	else if (rc == EBUSY) {
-		fprintf(stderr,"Detected an attempt to destroy a mutex in use\n");
-	}
-	else if (rc == EINVAL) {
-		fprintf(stderr,"The value specified by 'mutex' is invalid\n");
+		fprintf(stderr,
+			"Detected an attempt to destroy a mutex in use\n");
+	} else if (rc == EINVAL) {
+		fprintf(stderr, "The value specified by 'mutex' is invalid\n");
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED (error: %i)\n", rc);
 	}
 	return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-1.c
index 627b3a2..9cdd290 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-1.c
@@ -13,32 +13,34 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-pthread_mutex_t  mutex;
+pthread_mutex_t mutex;
 
 int main()
 {
 	int rc;
 
 	/* Initialize mutex with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex, NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Lock mutex */
-	if ((rc=pthread_mutex_lock(&mutex)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_lock(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_lock(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 	sleep(1);
 	/* Unlock */
-	if ((rc=pthread_mutex_unlock(&mutex)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_unlock(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_unlock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_unlock(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 	/* Destroy mutex after it is unlocked */
-	if ((rc=pthread_mutex_destroy(&mutex)) != 0) {
-		fprintf(stderr,"Fail to destroy mutex after being unlocked, rc=%d\n",rc);
+	if ((rc = pthread_mutex_destroy(&mutex)) != 0) {
+		fprintf(stderr,
+			"Fail to destroy mutex after being unlocked, rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-2.c
index 5a8f1b4..839d4c4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-2.c
@@ -27,26 +27,26 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -77,28 +77,34 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, "Pshared mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, "Pshared Recursive mutex"}
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int i;
@@ -114,83 +120,104 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 
 	/* Initialize the mutex attributes objects */
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		ret = pthread_mutexattr_init(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma[i], scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma[i], PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
+		if ((pshared > 0) && (scenarii[i].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma[i],
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
 		}
 	}
-	 /* Default mutexattr object */
+	/* Default mutexattr object */
 	ret = pthread_mutexattr_init(&ma[i]);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Unable to initialize the mutex attribute object");
+	}
 
 	/* Initialize the pointer array */
-	for (i=0; i<NSCENAR+1; i++)
-		pma[i]=&ma[i];
+	for (i = 0; i < NSCENAR + 1; i++)
+		pma[i] = &ma[i];
 
 	/* NULL pointer */
 	pma[i] = NULL;
 
 	/* Ok, we can now proceed to the test */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Attributes are ready, proceed to the test\n");
-	#endif
+#endif
 
-	for (i=0; i<NSCENAR + 2; i++)
-	{
-		#if VERBOSE > 1
-		char * nul="NULL";
-		char * def ="Default";
-		char * stri;
-		if (i<NSCENAR)
+	for (i = 0; i < NSCENAR + 2; i++) {
+#if VERBOSE > 1
+		char *nul = "NULL";
+		char *def = "Default";
+		char *stri;
+		if (i < NSCENAR)
 			stri = scenarii[i].descr;
-		if (i==NSCENAR)
+		if (i == NSCENAR)
 			stri = def;
-		if (i==NSCENAR+1)
+		if (i == NSCENAR + 1)
 			stri = nul;
 
 		output("Init with: %s\n", stri);
-		#endif
+#endif
 
 		ret = pthread_mutex_init(&mtx, pma[i]);
-		if (ret != 0)  {   UNRESOLVED(ret, "Failed to init the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to init the mutex");
+		}
 
 		ret = pthread_mutex_lock(&mtx);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to lock the mutex");
+		}
 
 		ret = pthread_mutex_unlock(&mtx);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlcok the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlcok the mutex");
+		}
 
 		ret = pthread_mutex_destroy(&mtx);
-		if (ret != 0)  {  FAILED("Failed to destroy an initialized unlocked mutex");  }
+		if (ret != 0) {
+			FAILED
+			    ("Failed to destroy an initialized unlocked mutex");
+		}
 
 	}
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed; destroying the test data\n");
-	#endif
+#endif
 
-	for (i=0; i<NSCENAR + 1; i++)
-	{
+	for (i = 0; i < NSCENAR + 1; i++) {
 		ret = pthread_mutexattr_destroy(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a mutex attribute object");
+		}
 	}
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/4-2.c
index 4518615..4ebfd8f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/4-2.c
@@ -28,8 +28,8 @@
 
 int main()
 {
-	pthread_mutex_t     mutex = PTHREAD_MUTEX_INITIALIZER;
-	int                 rc = 0;
+	pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+	int rc = 0;
 
 	/* Lock the mutex */
 	rc = pthread_mutex_lock(&mutex);
@@ -42,7 +42,7 @@
 	rc = pthread_mutex_destroy(&mutex);
 	if (rc != EBUSY) {
 		printf(ERROR_PREFIX "Test PASS: Expected %d(EBUSY) got %d, "
-			"though the standard states 'may' fail\n", EBUSY, rc);
+		       "though the standard states 'may' fail\n", EBUSY, rc);
 		exit(PTS_PASS);
 	}
 	printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/1-1.c
index c904138..e605484 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/1-1.c
@@ -19,8 +19,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int
-main(void)
+int main(void)
 {
 #if defined(_SC_PRIORITY_SCHEDULING)
 
@@ -44,10 +43,10 @@
 	 * pthread_mutexattr_getprotocol.
 	 */
 	error = pthread_mutexattr_setprotocol(&mutex_attr,
-		PTHREAD_PRIO_PROTECT);
+					      PTHREAD_PRIO_PROTECT);
 	if (error) {
 		printf("pthread_mutexattr_setprotocol failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_UNRESOLVED;
 	}
 
@@ -62,12 +61,12 @@
 	error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
 	if (error) {
 		printf("pthread_mutex_getprioceiling failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_FAIL;
 	}
 
-	(void) pthread_mutexattr_destroy(&mutex_attr);
-	(void) pthread_mutex_destroy(&mutex);
+	(void)pthread_mutexattr_destroy(&mutex_attr);
+	(void)pthread_mutex_destroy(&mutex);
 
 	printf("Prioceiling returned: %d\n", prioceiling);
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c
index a26c338..fcaa9ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-1.c
@@ -24,8 +24,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int
-main(void)
+int main(void)
 {
 #if defined(_SC_PRIORITY_SCHEDULING)
 
@@ -54,15 +53,15 @@
 	if (error) {
 		if (error == EINVAL) {
 			printf("pthread_mutex_getprioceiling failed as "
-				"expected\n");
+			       "expected\n");
 		} else {
 			printf("pthread_mutex_getprioceiling did not fail as "
-				"expected: %s\n", strerror(error));
+			       "expected: %s\n", strerror(error));
 		}
 	} else
 		printf("pthread_mutex_getprioceiling passed unexpectedly\n");
 
-	(void) pthread_mutex_destroy(&mutex);
+	(void)pthread_mutex_destroy(&mutex);
 
 	return (error == EINVAL ? PTS_PASS : PTS_FAIL);
 #else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c
index 5960897..95bf96b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-2.c
@@ -23,8 +23,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int
-main(void)
+int main(void)
 {
 #if defined(_SC_PRIORITY_SCHEDULING)
 
@@ -47,11 +46,10 @@
 	 * The default protocol is PTHREAD_PRIO_NONE according to
 	 * pthread_mutexattr_getprotocol.
 	 */
-	error = pthread_mutexattr_setprotocol(&mutex_attr,
-		PTHREAD_PRIO_NONE);
+	error = pthread_mutexattr_setprotocol(&mutex_attr, PTHREAD_PRIO_NONE);
 	if (error) {
 		printf("pthread_mutexattr_setprotocol failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_UNRESOLVED;
 	}
 
@@ -67,16 +65,16 @@
 	if (error) {
 		if (error == EINVAL) {
 			printf("pthread_mutex_getprioceiling failed as "
-				"expected\n");
+			       "expected\n");
 		} else {
 			printf("pthread_mutex_getprioceiling did not fail as "
-				"expected: %s\n", strerror(error));
+			       "expected: %s\n", strerror(error));
 		}
 	} else
 		printf("pthread_mutex_getprioceiling passed unexpectedly\n");
 
-	(void) pthread_mutexattr_destroy(&mutex_attr);
-	(void) pthread_mutex_destroy(&mutex);
+	(void)pthread_mutexattr_destroy(&mutex_attr);
+	(void)pthread_mutex_destroy(&mutex);
 
 	return (error == EINVAL ? PTS_PASS : PTS_FAIL);
 #else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c
index 56dad87..96b944e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c
@@ -24,8 +24,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int
-main(void)
+int main(void)
 {
 #if defined(_SC_PRIORITY_SCHEDULING)
 
@@ -49,10 +48,10 @@
 	 * pthread_mutexattr_getprotocol.
 	 */
 	error = pthread_mutexattr_setprotocol(&mutex_attr,
-		PTHREAD_PRIO_INHERIT);
+					      PTHREAD_PRIO_INHERIT);
 	if (error) {
 		printf("pthread_mutexattr_setprotocol failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_UNRESOLVED;
 	}
 
@@ -68,16 +67,16 @@
 	if (error) {
 		if (error == EINVAL) {
 			printf("pthread_mutex_getprioceiling failed as "
-				"expected\n");
+			       "expected\n");
 		} else {
 			printf("pthread_mutex_getprioceiling did not fail as "
-				"expected: %s\n", strerror(error));
+			       "expected: %s\n", strerror(error));
 		}
 	} else
 		printf("pthread_mutex_getprioceiling passed unexpectedly\n");
 
-	(void) pthread_mutexattr_destroy(&mutex_attr);
-	(void) pthread_mutex_destroy(&mutex);
+	(void)pthread_mutexattr_destroy(&mutex_attr);
+	(void)pthread_mutex_destroy(&mutex);
 
 	return (error == EINVAL ? PTS_PASS : PTS_UNRESOLVED);
 #else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-1.c
index 6e2b60b..0ee20c1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-1.c
@@ -23,25 +23,26 @@
 int main()
 {
 	pthread_mutexattr_t mta;
-	pthread_mutex_t  mutex1, mutex2;
+	pthread_mutex_t mutex1, mutex2;
 	int rc;
 
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) != 0) {
-		fprintf(stderr,"Error at pthread_mutexattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutexattr_init(&mta)) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_init(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize mutex1 with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex1,&mta)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex1, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex1, &mta)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex1, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize mutex2 with NULL attributes */
-	if ((rc=pthread_mutex_init(&mutex2,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex2, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex2, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex2, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-2.c
index 4e4a06b..405589f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/1-2.c
@@ -40,23 +40,23 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdlib.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <stdlib.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,70 +87,79 @@
 /********************************************************************************************/
 
 /**** global variables ****/
-pthread_mutex_t * p_mtx;
+pthread_mutex_t *p_mtx;
 int retval = 0;
 int returned = 0;
 int canceled = 0;
 sem_t semA, semB;
 
 /***** Cancelation handlers  *****/
-void cleanup_deadlk(void * arg)
+void cleanup_deadlk(void *arg)
 {
 	canceled = 1;
 	pthread_mutex_unlock(p_mtx);
 }
 
 /***** Threads functions *****/
-void * deadlk_issue(void * arg)
+void *deadlk_issue(void *arg)
 {
 	int ret, tmp;
 
-	if ((ret=pthread_mutex_lock(p_mtx)))
-	{ UNRESOLVED(ret, "First mutex lock in deadlk_issue"); }
+	if ((ret = pthread_mutex_lock(p_mtx))) {
+		UNRESOLVED(ret, "First mutex lock in deadlk_issue");
+	}
 	pthread_cleanup_push(cleanup_deadlk, NULL);
-	if ((ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel type in deadlk_issue"); }
-	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel state in deadlk_issue"); }
-	#if VERBOSE >1
+	if ((ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &tmp))) {
+		UNRESOLVED(ret, "Set cancel type in deadlk_issue");
+	}
+	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &tmp))) {
+		UNRESOLVED(ret, "Set cancel state in deadlk_issue");
+	}
+#if VERBOSE >1
 	output("Thread releases the semaphore...\n");
-	#endif
-	if ((ret = sem_post(&semA)))
-	{ UNRESOLVED(errno, "Sem_post in deadlk_issue"); }
+#endif
+	if ((ret = sem_post(&semA))) {
+		UNRESOLVED(errno, "Sem_post in deadlk_issue");
+	}
 
-    	returned = 0;
+	returned = 0;
 	retval = pthread_mutex_lock(p_mtx);
 	returned = 1;
 
-	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel state in deadlk_issue"); }
+	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &tmp))) {
+		UNRESOLVED(ret, "Set cancel state in deadlk_issue");
+	}
 	pthread_cleanup_pop(0);
 	return NULL;
 }
 
-void * unlock_issue(void * arg)
+void *unlock_issue(void *arg)
 {
 	int ret;
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Locking in child...\n");
-	#endif
-	if ((ret=pthread_mutex_lock(p_mtx)))
-	{ UNRESOLVED(ret, "First mutex lock in unlock_issue"); }
+#endif
+	if ((ret = pthread_mutex_lock(p_mtx))) {
+		UNRESOLVED(ret, "First mutex lock in unlock_issue");
+	}
 
-	if ((ret = sem_post(&semA)))
-	{ UNRESOLVED(errno, "Sem_post in unlock_issue"); }
+	if ((ret = sem_post(&semA))) {
+		UNRESOLVED(errno, "Sem_post in unlock_issue");
+	}
 
-	if ((ret = sem_wait(&semB)))
-	{ UNRESOLVED(errno, "Sem_wait in unlock_issue"); }
+	if ((ret = sem_wait(&semB))) {
+		UNRESOLVED(errno, "Sem_wait in unlock_issue");
+	}
 
-	if (retval != 0) /* parent thread failed to unlock the mutex) */
-	{
-		#if VERBOSE >1
+	if (retval != 0) {	/* parent thread failed to unlock the mutex) */
+#if VERBOSE >1
 		output("Unlocking in child...\n");
-		#endif
-		if ((ret=pthread_mutex_unlock(p_mtx)))
-		{ FAILED("Mutex unlock returned an error but mutex is unlocked."); }
+#endif
+		if ((ret = pthread_mutex_unlock(p_mtx))) {
+			FAILED
+			    ("Mutex unlock returned an error but mutex is unlocked.");
+		}
 	}
 
 	return NULL;
@@ -163,97 +172,105 @@
 	pthread_mutexattr_t mattr;
 	pthread_t thr;
 
-	pthread_mutex_t * tab_mutex[2]={&mtx_null, &mtx_def};
-	int tab_res[2][3]={{0,0,0},{0,0,0}};
+	pthread_mutex_t *tab_mutex[2] = { &mtx_null, &mtx_def };
+	int tab_res[2][3] = { {0, 0, 0}, {0, 0, 0} };
 
 	int ret;
-	void * th_ret;
+	void *th_ret;
 
 	int i;
 
 	output_init();
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Test starting...\n");
-	#endif
+#endif
 
 	/* We first initialize the two mutexes. */
-	if ((ret=pthread_mutex_init(&mtx_null, NULL)))
-	{ UNRESOLVED(ret, "NULL mutex init"); }
+	if ((ret = pthread_mutex_init(&mtx_null, NULL))) {
+		UNRESOLVED(ret, "NULL mutex init");
+	}
 
-	if ((ret=pthread_mutexattr_init(&mattr)))
-	{ UNRESOLVED(ret, "Mutex attribute init"); }
-	if ((ret=pthread_mutex_init(&mtx_def, &mattr)))
-	{ UNRESOLVED(ret, "Default attribute mutex init"); }
+	if ((ret = pthread_mutexattr_init(&mattr))) {
+		UNRESOLVED(ret, "Mutex attribute init");
+	}
+	if ((ret = pthread_mutex_init(&mtx_def, &mattr))) {
+		UNRESOLVED(ret, "Default attribute mutex init");
+	}
 
-	if ((ret=pthread_mutexattr_destroy(&mattr)))
-	{ UNRESOLVED(ret, "Mutex attribute destroy"); }
+	if ((ret = pthread_mutexattr_destroy(&mattr))) {
+		UNRESOLVED(ret, "Mutex attribute destroy");
+	}
 
-	if ((ret=sem_init(&semA, 0, 0)))
-	{ UNRESOLVED(errno, "Sem A init"); }
-	if ((ret=sem_init(&semB, 0, 0)))
-	{ UNRESOLVED(errno, "Sem B init"); }
-
-	#if VERBOSE >1
+	if ((ret = sem_init(&semA, 0, 0))) {
+		UNRESOLVED(errno, "Sem A init");
+	}
+	if ((ret = sem_init(&semB, 0, 0))) {
+		UNRESOLVED(errno, "Sem B init");
+	}
+#if VERBOSE >1
 	output("Data initialized...\n");
-	#endif
+#endif
 
 	/* OK let's go for the first part of the test : abnormals unlocking */
 
 	/* We first check if unlocking an unlocked mutex returns an error. */
 	retval = pthread_mutex_unlock(tab_mutex[0]);
 	ret = pthread_mutex_unlock(tab_mutex[1]);
-	#if VERBOSE >0
-	output("Results for unlock issue #1:\n mutex 1 unlocking returned %i\n mutex 2 unlocking returned %i\n",
-				retval, ret);
-	#endif
-	if (ret != retval)
-	{
+#if VERBOSE >0
+	output
+	    ("Results for unlock issue #1:\n mutex 1 unlocking returned %i\n mutex 2 unlocking returned %i\n",
+	     retval, ret);
+#endif
+	if (ret != retval) {
 		FAILED("Unlocking an unlocked mutex behaves differently.");
 	}
 
-    /* Now we focus on unlocking a mutex lock by another thread */
-	for (i=0; i<2; i++)
-	{
+	/* Now we focus on unlocking a mutex lock by another thread */
+	for (i = 0; i < 2; i++) {
 		p_mtx = tab_mutex[i];
-		tab_res[i][0]=0;
-		tab_res[i][1]=0;
-		tab_res[i][2]=0;
+		tab_res[i][0] = 0;
+		tab_res[i][1] = 0;
+		tab_res[i][2] = 0;
 
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Creating thread (unlock)...\n");
-		#endif
+#endif
 
-		if ((ret = pthread_create(&thr, NULL, unlock_issue, NULL)))
-		{ UNRESOLVED(ret, "Unlock issue thread create"); }
+		if ((ret = pthread_create(&thr, NULL, unlock_issue, NULL))) {
+			UNRESOLVED(ret, "Unlock issue thread create");
+		}
 
-		if ((ret = sem_wait(&semA)))
-		{ UNRESOLVED(errno, "Sem A wait failed for unlock issue."); }
-
-		#if VERBOSE >1
+		if ((ret = sem_wait(&semA))) {
+			UNRESOLVED(errno,
+				   "Sem A wait failed for unlock issue.");
+		}
+#if VERBOSE >1
 		output("Unlocking in parent...\n");
-		#endif
+#endif
 		retval = pthread_mutex_unlock(p_mtx);
 
-		if ((ret = sem_post(&semB)))
-		{ UNRESOLVED(errno, "Sem B post failed for unlock issue."); }
+		if ((ret = sem_post(&semB))) {
+			UNRESOLVED(errno,
+				   "Sem B post failed for unlock issue.");
+		}
 
-		if ((ret=pthread_join(thr, &th_ret)))
-		{ UNRESOLVED(ret, "Join thread"); }
-
-		#if VERBOSE >1
+		if ((ret = pthread_join(thr, &th_ret))) {
+			UNRESOLVED(ret, "Join thread");
+		}
+#if VERBOSE >1
 		output("Thread joined successfully...\n");
-		#endif
+#endif
 
 		tab_res[i][0] = retval;
 	}
-	#if VERBOSE >0
-	output("Results for unlock issue #2:\n mutex 1 returned %i\n mutex 2 returned %i\n",
-				tab_res[0][0],tab_res[1][0]);
-	#endif
+#if VERBOSE >0
+	output
+	    ("Results for unlock issue #2:\n mutex 1 returned %i\n mutex 2 returned %i\n",
+	     tab_res[0][0], tab_res[1][0]);
+#endif
 
-	if (tab_res[0][0] != tab_res[1][0])
-	{
+	if (tab_res[0][0] != tab_res[1][0]) {
 		FAILED("Unlocking an unowned mutex behaves differently.");
 	}
 
@@ -261,46 +278,47 @@
 	 */
 
 	/* We start with testing the NULL mutex features */
-	for (i=0; i<2; i++)
-	{
+	for (i = 0; i < 2; i++) {
 		p_mtx = tab_mutex[i];
-		tab_res[i][0]=0;
-		tab_res[i][1]=0;
-		tab_res[i][2]=0;
+		tab_res[i][0] = 0;
+		tab_res[i][1] = 0;
+		tab_res[i][2] = 0;
 
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Creating thread (deadlk)...\n");
-		#endif
+#endif
 
-		if ((ret = pthread_create(&thr, NULL, deadlk_issue, NULL)))
-		{ UNRESOLVED(ret, "Deadlk_issue thread create"); }
+		if ((ret = pthread_create(&thr, NULL, deadlk_issue, NULL))) {
+			UNRESOLVED(ret, "Deadlk_issue thread create");
+		}
 
 		/* Now we are waiting the thread is ready to relock the mutex. */
-		if ((ret=sem_wait(&semA)))
-		{ UNRESOLVED(errno, "Sem wait"); }
+		if ((ret = sem_wait(&semA))) {
+			UNRESOLVED(errno, "Sem wait");
+		}
 
 		/* To ensure thread runs until second lock, we yield here */
 		sched_yield();
 
 		/* OK, now we cancel the thread */
-		canceled=0;
-		#if VERBOSE >1
+		canceled = 0;
+#if VERBOSE >1
 		output("Cancel thread...\n");
-		#endif
-		if (returned ==0)
-			if ((ret=pthread_cancel(thr)))
-			{ UNRESOLVED(ret, "Cancel thread (deadlk_issue)"); }
-
-		#if VERBOSE >1
+#endif
+		if (returned == 0)
+			if ((ret = pthread_cancel(thr))) {
+				UNRESOLVED(ret, "Cancel thread (deadlk_issue)");
+			}
+#if VERBOSE >1
 		output("Thread canceled...\n");
-		#endif
+#endif
 
-		if ((ret=pthread_join(thr, &th_ret)))
-		{ UNRESOLVED(ret, "Join thread"); }
-
-		#if VERBOSE >1
+		if ((ret = pthread_join(thr, &th_ret))) {
+			UNRESOLVED(ret, "Join thread");
+		}
+#if VERBOSE >1
 		output("Thread joined successfully...\n");
-		#endif
+#endif
 
 		tab_res[i][2] = retval;
 		tab_res[i][1] = returned;
@@ -308,24 +326,26 @@
 	}
 
 	/* Now we parse the results */
-	#if VERBOSE >0
-	output("Results for deadlock issue:\n mutex 1 \t%s\t%s%i\n mutex 2 \t%s\t%s%i\n",
-				tab_res[0][0]?"deadlock" : "no deadlock",
-				tab_res[0][1]?"returned " : "did not return ",
-				tab_res[0][2],
-				tab_res[1][0]?"deadlock" : "no deadlock",
-				tab_res[1][1]?"returned " : "did not return ",
-				tab_res[1][2]);
-	#endif
+#if VERBOSE >0
+	output
+	    ("Results for deadlock issue:\n mutex 1 \t%s\t%s%i\n mutex 2 \t%s\t%s%i\n",
+	     tab_res[0][0] ? "deadlock" : "no deadlock",
+	     tab_res[0][1] ? "returned " : "did not return ", tab_res[0][2],
+	     tab_res[1][0] ? "deadlock" : "no deadlock",
+	     tab_res[1][1] ? "returned " : "did not return ", tab_res[1][2]);
+#endif
 
-	if (tab_res[0][0] != tab_res[1][0])
-	{ FAILED("One mutex deadlocks, not the other"); }
+	if (tab_res[0][0] != tab_res[1][0]) {
+		FAILED("One mutex deadlocks, not the other");
+	}
 
-	if (tab_res[0][1] != tab_res[1][1])
-	{ UNRESOLVED(tab_res[0][1], "Abnormal situation!"); }
+	if (tab_res[0][1] != tab_res[1][1]) {
+		UNRESOLVED(tab_res[0][1], "Abnormal situation!");
+	}
 
-	if ((tab_res[0][1] == 1) && (tab_res[0][2] != tab_res[1][2]))
-	{ FAILED("The locks returned different error codes."); }
+	if ((tab_res[0][1] == 1) && (tab_res[0][2] != tab_res[1][2])) {
+		FAILED("The locks returned different error codes.");
+	}
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/2-1.c
index dcd0c5c..47c1fd3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/2-1.c
@@ -18,34 +18,34 @@
 
 int main()
 {
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex object */
-	if ((rc=pthread_mutex_init(&mutex,NULL)) != 0) {
-		fprintf(stderr,"Fail to initialize mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Fail to initialize mutex, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Acquire the mutex object using pthread_mutex_lock */
-	if ((rc=pthread_mutex_lock(&mutex)) != 0) {
-		fprintf(stderr,"Fail to lock the mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Fail to lock the mutex, rc=%d\n", rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
-	fprintf(stderr,"Main: hold the mutex for a while\n");
+	fprintf(stderr, "Main: hold the mutex for a while\n");
 	sleep(1);
 
 	/* Release the mutex object using pthread_mutex_unlock */
-	if ((rc=pthread_mutex_unlock(&mutex)) != 0) {
-		fprintf(stderr,"Fail to unlock the mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_unlock(&mutex)) != 0) {
+		fprintf(stderr, "Fail to unlock the mutex, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destory the mutex object */
-	if ((rc=pthread_mutex_destroy(&mutex)) != 0) {
-		fprintf(stderr,"Fail to destory the mutex, rc=%d\n",rc);
+	if ((rc = pthread_mutex_destroy(&mutex)) != 0) {
+		fprintf(stderr, "Fail to destory the mutex, rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-1.c
index 802da4b..aca9354 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-1.c
@@ -16,11 +16,11 @@
 #include "posixtest.h"
 
 typedef struct my_data {
-    pthread_mutex_t     mutex;   /* Protects access to value */
-    int                 value;   /* Access protected by mutex */
+	pthread_mutex_t mutex;	/* Protects access to value */
+	int value;		/* Access protected by mutex */
 } my_data_t;
 
-my_data_t data = {PTHREAD_MUTEX_INITIALIZER, 0};
+my_data_t data = { PTHREAD_MUTEX_INITIALIZER, 0 };
 
 int main()
 {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-2.c
index 4937496..8d016ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/3-2.c
@@ -46,23 +46,23 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdlib.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <stdlib.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -93,70 +93,79 @@
 /********************************************************************************************/
 
 /**** global variables ****/
-pthread_mutex_t * p_mtx;
+pthread_mutex_t *p_mtx;
 int retval = 0;
 int returned = 0;
 int canceled = 0;
 sem_t semA, semB;
 
 /***** Cancelation handlers  *****/
-void cleanup_deadlk(void * arg)
+void cleanup_deadlk(void *arg)
 {
 	canceled = 1;
 	pthread_mutex_unlock(p_mtx);
 }
 
 /***** Threads functions *****/
-void * deadlk_issue(void * arg)
+void *deadlk_issue(void *arg)
 {
 	int ret, tmp;
 
-	if ((ret=pthread_mutex_lock(p_mtx)))
-	{ UNRESOLVED(ret, "First mutex lock in deadlk_issue"); }
+	if ((ret = pthread_mutex_lock(p_mtx))) {
+		UNRESOLVED(ret, "First mutex lock in deadlk_issue");
+	}
 	pthread_cleanup_push(cleanup_deadlk, NULL);
-	if ((ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel type in deadlk_issue"); }
-	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel state in deadlk_issue"); }
-	#if VERBOSE >1
+	if ((ret = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &tmp))) {
+		UNRESOLVED(ret, "Set cancel type in deadlk_issue");
+	}
+	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &tmp))) {
+		UNRESOLVED(ret, "Set cancel state in deadlk_issue");
+	}
+#if VERBOSE >1
 	output("Thread releases the semaphore...\n");
-	#endif
-	if ((ret = sem_post(&semA)))
-	{ UNRESOLVED(errno, "Sem_post in deadlk_issue"); }
+#endif
+	if ((ret = sem_post(&semA))) {
+		UNRESOLVED(errno, "Sem_post in deadlk_issue");
+	}
 
-    returned = 0;
+	returned = 0;
 	retval = pthread_mutex_lock(p_mtx);
 	returned = 1;
 
-	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &tmp)))
-	{ UNRESOLVED(ret, "Set cancel state in deadlk_issue"); }
+	if ((ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &tmp))) {
+		UNRESOLVED(ret, "Set cancel state in deadlk_issue");
+	}
 	pthread_cleanup_pop(0);
 	return NULL;
 }
 
-void * unlock_issue(void * arg)
+void *unlock_issue(void *arg)
 {
 	int ret;
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Locking in child...\n");
-	#endif
-	if ((ret=pthread_mutex_lock(p_mtx)))
-	{ UNRESOLVED(ret, "First mutex lock in unlock_issue"); }
+#endif
+	if ((ret = pthread_mutex_lock(p_mtx))) {
+		UNRESOLVED(ret, "First mutex lock in unlock_issue");
+	}
 
-	if ((ret = sem_post(&semA)))
-	{ UNRESOLVED(errno, "Sem_post in unlock_issue"); }
+	if ((ret = sem_post(&semA))) {
+		UNRESOLVED(errno, "Sem_post in unlock_issue");
+	}
 
-	if ((ret = sem_wait(&semB)))
-	{ UNRESOLVED(errno, "Sem_wait in unlock_issue"); }
+	if ((ret = sem_wait(&semB))) {
+		UNRESOLVED(errno, "Sem_wait in unlock_issue");
+	}
 
-	if (retval != 0) /* parent thread failed to unlock the mutex) */
-	{
-		#if VERBOSE >1
+	if (retval != 0) {	/* parent thread failed to unlock the mutex) */
+#if VERBOSE >1
 		output("Unlocking in child...\n");
-		#endif
-		if ((ret=pthread_mutex_unlock(p_mtx)))
-		{ FAILED("Mutex unlock returned an error but mutex is unlocked."); }
+#endif
+		if ((ret = pthread_mutex_unlock(p_mtx))) {
+			FAILED
+			    ("Mutex unlock returned an error but mutex is unlocked.");
+		}
 	}
 
 	return NULL;
@@ -165,92 +174,96 @@
 /***** main program *****/
 int main(int argc, char *argv[])
 {
-	pthread_mutex_t mtx_null,
-	                             mtx_macro = PTHREAD_MUTEX_INITIALIZER;
+	pthread_mutex_t mtx_null, mtx_macro = PTHREAD_MUTEX_INITIALIZER;
 	pthread_t thr;
 
-	pthread_mutex_t * tab_mutex[2]={&mtx_null, &mtx_macro};
-	int tab_res[2][3]={{0,0,0},{0,0,0}};
+	pthread_mutex_t *tab_mutex[2] = { &mtx_null, &mtx_macro };
+	int tab_res[2][3] = { {0, 0, 0}, {0, 0, 0} };
 
 	int ret;
-	void * th_ret;
+	void *th_ret;
 
 	int i;
 
 	output_init();
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Test starting...\n");
-	#endif
+#endif
 
 	/* We first initialize the two mutexes. */
-	if ((ret=pthread_mutex_init(&mtx_null, NULL)))
-	{ UNRESOLVED(ret, "NULL mutex init"); }
+	if ((ret = pthread_mutex_init(&mtx_null, NULL))) {
+		UNRESOLVED(ret, "NULL mutex init");
+	}
 
-	if ((ret=sem_init(&semA, 0, 0)))
-	{ UNRESOLVED(errno, "Sem A init"); }
-	if ((ret=sem_init(&semB, 0, 0)))
-	{ UNRESOLVED(errno, "Sem B init"); }
-
-	#if VERBOSE >1
+	if ((ret = sem_init(&semA, 0, 0))) {
+		UNRESOLVED(errno, "Sem A init");
+	}
+	if ((ret = sem_init(&semB, 0, 0))) {
+		UNRESOLVED(errno, "Sem B init");
+	}
+#if VERBOSE >1
 	output("Data initialized...\n");
-	#endif
+#endif
 
 	/* OK let's go for the first part of the test : abnormals unlocking */
 
 	/* We first check if unlocking an unlocked mutex returns an error. */
 	retval = pthread_mutex_unlock(tab_mutex[0]);
 	ret = pthread_mutex_unlock(tab_mutex[1]);
-	#if VERBOSE >0
-	output("Results for unlock issue #1:\n mutex 1 unlocking returned %i\n mutex 2 unlocking returned %i\n",
-				retval, ret);
-	#endif
-	if (ret != retval)
-	{
+#if VERBOSE >0
+	output
+	    ("Results for unlock issue #1:\n mutex 1 unlocking returned %i\n mutex 2 unlocking returned %i\n",
+	     retval, ret);
+#endif
+	if (ret != retval) {
 		FAILED("Unlocking an unlocked mutex behaves differently.");
 	}
 
-    /* Now we focus on unlocking a mutex lock by another thread */
-	for (i=0; i<2; i++)
-	{
+	/* Now we focus on unlocking a mutex lock by another thread */
+	for (i = 0; i < 2; i++) {
 		p_mtx = tab_mutex[i];
-		tab_res[i][0]=0;
-		tab_res[i][1]=0;
-		tab_res[i][2]=0;
+		tab_res[i][0] = 0;
+		tab_res[i][1] = 0;
+		tab_res[i][2] = 0;
 
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Creating thread (unlock)...\n");
-		#endif
+#endif
 
-		if ((ret = pthread_create(&thr, NULL, unlock_issue, NULL)))
-		{ UNRESOLVED(ret, "Unlock issue thread create"); }
+		if ((ret = pthread_create(&thr, NULL, unlock_issue, NULL))) {
+			UNRESOLVED(ret, "Unlock issue thread create");
+		}
 
-		if ((ret = sem_wait(&semA)))
-		{ UNRESOLVED(errno, "Sem A wait failed for unlock issue."); }
-
-		#if VERBOSE >1
+		if ((ret = sem_wait(&semA))) {
+			UNRESOLVED(errno,
+				   "Sem A wait failed for unlock issue.");
+		}
+#if VERBOSE >1
 		output("Unlocking in parent...\n");
-		#endif
+#endif
 		retval = pthread_mutex_unlock(p_mtx);
 
-		if ((ret = sem_post(&semB)))
-		{ UNRESOLVED(errno, "Sem B post failed for unlock issue."); }
+		if ((ret = sem_post(&semB))) {
+			UNRESOLVED(errno,
+				   "Sem B post failed for unlock issue.");
+		}
 
-		if ((ret=pthread_join(thr, &th_ret)))
-		{ UNRESOLVED(ret, "Join thread"); }
-
-		#if VERBOSE >1
+		if ((ret = pthread_join(thr, &th_ret))) {
+			UNRESOLVED(ret, "Join thread");
+		}
+#if VERBOSE >1
 		output("Thread joined successfully...\n");
-		#endif
+#endif
 
 		tab_res[i][0] = retval;
 	}
-	#if VERBOSE >0
-	output("Results for unlock issue #2:\n mutex 1 returned %i\n mutex 2 returned %i\n",
-				tab_res[0][0],tab_res[1][0]);
-	#endif
+#if VERBOSE >0
+	output
+	    ("Results for unlock issue #2:\n mutex 1 returned %i\n mutex 2 returned %i\n",
+	     tab_res[0][0], tab_res[1][0]);
+#endif
 
-	if (tab_res[0][0] != tab_res[1][0])
-	{
+	if (tab_res[0][0] != tab_res[1][0]) {
 		FAILED("Unlocking an unowned mutex behaves differently.");
 	}
 
@@ -258,46 +271,47 @@
 	 */
 
 	/* We start with testing the NULL mutex features */
-	for (i=0; i<2; i++)
-	{
+	for (i = 0; i < 2; i++) {
 		p_mtx = tab_mutex[i];
-		tab_res[i][0]=0;
-		tab_res[i][1]=0;
-		tab_res[i][2]=0;
+		tab_res[i][0] = 0;
+		tab_res[i][1] = 0;
+		tab_res[i][2] = 0;
 
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Creating thread (deadlk)...\n");
-		#endif
+#endif
 
-		if ((ret = pthread_create(&thr, NULL, deadlk_issue, NULL)))
-		{ UNRESOLVED(ret, "Deadlk_issue thread create"); }
+		if ((ret = pthread_create(&thr, NULL, deadlk_issue, NULL))) {
+			UNRESOLVED(ret, "Deadlk_issue thread create");
+		}
 
 		/* Now we are waiting the thread is ready to relock the mutex. */
-		if ((ret=sem_wait(&semA)))
-		{ UNRESOLVED(errno, "Sem wait"); }
+		if ((ret = sem_wait(&semA))) {
+			UNRESOLVED(errno, "Sem wait");
+		}
 
 		/* To ensure thread runs until second lock, we yield here */
 		sched_yield();
 
 		/* OK, now we cancel the thread */
-		canceled=0;
-		#if VERBOSE >1
+		canceled = 0;
+#if VERBOSE >1
 		output("Cancel thread...\n");
-		#endif
-		if (returned ==0)
-			if ((ret=pthread_cancel(thr)))
-			{ UNRESOLVED(ret, "Cancel thread (deadlk_issue)"); }
-
-		#if VERBOSE >1
+#endif
+		if (returned == 0)
+			if ((ret = pthread_cancel(thr))) {
+				UNRESOLVED(ret, "Cancel thread (deadlk_issue)");
+			}
+#if VERBOSE >1
 		output("Thread canceled...\n");
-		#endif
+#endif
 
-		if ((ret=pthread_join(thr, &th_ret)))
-		{ UNRESOLVED(ret, "Join thread"); }
-
-		#if VERBOSE >1
+		if ((ret = pthread_join(thr, &th_ret))) {
+			UNRESOLVED(ret, "Join thread");
+		}
+#if VERBOSE >1
 		output("Thread joined successfully...\n");
-		#endif
+#endif
 
 		tab_res[i][2] = retval;
 		tab_res[i][1] = returned;
@@ -305,24 +319,26 @@
 	}
 
 	/* Now we parse the results */
-	#if VERBOSE >0
-	output("Results for deadlock issue:\n mutex 1 \t%s\t%s%i\n mutex 2 \t%s\t%s%i\n",
-				tab_res[0][0]?"deadlock" : "no deadlock",
-				tab_res[0][1]?"returned " : "did not return ",
-				tab_res[0][2],
-				tab_res[1][0]?"deadlock" : "no deadlock",
-				tab_res[1][1]?"returned " : "did not return ",
-				tab_res[1][2]);
-	#endif
+#if VERBOSE >0
+	output
+	    ("Results for deadlock issue:\n mutex 1 \t%s\t%s%i\n mutex 2 \t%s\t%s%i\n",
+	     tab_res[0][0] ? "deadlock" : "no deadlock",
+	     tab_res[0][1] ? "returned " : "did not return ", tab_res[0][2],
+	     tab_res[1][0] ? "deadlock" : "no deadlock",
+	     tab_res[1][1] ? "returned " : "did not return ", tab_res[1][2]);
+#endif
 
-	if (tab_res[0][0] != tab_res[1][0])
-	{ FAILED("One mutex deadlocks, not the other"); }
+	if (tab_res[0][0] != tab_res[1][0]) {
+		FAILED("One mutex deadlocks, not the other");
+	}
 
-	if (tab_res[0][1] != tab_res[1][1])
-	{ UNRESOLVED(tab_res[0][1], "Abnormal situation!"); }
+	if (tab_res[0][1] != tab_res[1][1]) {
+		UNRESOLVED(tab_res[0][1], "Abnormal situation!");
+	}
 
-	if ((tab_res[0][1] == 1) && (tab_res[0][2] != tab_res[1][2]))
-	{ FAILED("The locks returned different error codes."); }
+	if ((tab_res[0][1] == 1) && (tab_res[0][2] != tab_res[1][2])) {
+		FAILED("The locks returned different error codes.");
+	}
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/4-1.c
index 83dd304..fa9a529 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/4-1.c
@@ -18,42 +18,42 @@
 int main()
 {
 	pthread_mutexattr_t mta;
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) != 0) {
-		fprintf(stderr,"Error at pthread_mutexattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutexattr_init(&mta)) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_init(), rc=%d\n",
+			rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize a mutex object with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex,&mta)) == 0) {
+	if ((rc = pthread_mutex_init(&mutex, &mta)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Check if returned values are tolerable */
 	else if (rc == ENOMEM) {
-		fprintf(stderr,"Insufficient memory to initialize the mutex\n");
+		fprintf(stderr,
+			"Insufficient memory to initialize the mutex\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EAGAIN) {
-		fprintf(stderr,"Lack of the necessary resources to initilize the mutex\n");
+	} else if (rc == EAGAIN) {
+		fprintf(stderr,
+			"Lack of the necessary resources to initilize the mutex\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EPERM) {
-		fprintf(stderr,"Permission denied\n");
+	} else if (rc == EPERM) {
+		fprintf(stderr, "Permission denied\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EBUSY) {
-		fprintf(stderr,"Detected an attemp to reinitilize a previously initilized mutex\n");
+	} else if (rc == EBUSY) {
+		fprintf(stderr,
+			"Detected an attemp to reinitilize a previously initilized mutex\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/5-1.c
index 3376a2a..5f2609d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/5-1.c
@@ -29,30 +29,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the setrlimit() function from X/OPEN standard */
- #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#ifndef WITHOUT_XOPEN
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <errno.h>
- #include <signal.h>
- #include <sys/wait.h>
- #include <sys/resource.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/resource.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,41 +82,43 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	pid_t child;
 
-	pthread_mutex_t  mtx;
+	pthread_mutex_t mtx;
 	pthread_mutexattr_t ma[4];
 	pthread_mutexattr_t *pma[5];
 
-	int ret=0;
+	int ret = 0;
 	int i;
-	int retini[5] = {-1,-1,-1,-1,-1};
-	int retdtr[5]= {-1,-1,-1,-1,-1};
+	int retini[5] = { -1, -1, -1, -1, -1 };
+	int retdtr[5] = { -1, -1, -1, -1, -1 };
 
-	void * ptr, *ptr_prev=NULL;
+	void *ptr, *ptr_prev = NULL;
 
 	int sz = 0;
 	struct rlimit rl;
 
-	int status=0;
+	int status = 0;
 
 	output_init();
 
 	child = fork();
 
-	if (child == (pid_t)-1)
-	{ UNRESOLVED(errno, "Fork failed"); }
+	if (child == (pid_t) - 1) {
+		UNRESOLVED(errno, "Fork failed");
+	}
 
-	if (child != 0) /* We are the father */
-	{
-		if (child != waitpid(child, &status, 0))
-		{  UNRESOLVED(errno, "Waitpid failed"); }
+	if (child != 0) {	/* We are the father */
+		if (child != waitpid(child, &status, 0)) {
+			UNRESOLVED(errno, "Waitpid failed");
+		}
 
-		if (WIFSIGNALED(status))
-		{ UNRESOLVED(WTERMSIG(status),
-			"The child process was killed."); }
+		if (WIFSIGNALED(status)) {
+			UNRESOLVED(WTERMSIG(status),
+				   "The child process was killed.");
+		}
 
 		if (WIFEXITED(status))
 			return WEXITSTATUS(status);
@@ -127,119 +129,124 @@
 	/* Only the child goes further */
 
 	/* We initialize the different mutex attributes */
-	for (i=0; (i<4) && (ret == 0); i++)
-	{
+	for (i = 0; (i < 4) && (ret == 0); i++) {
 		pma[i] = &ma[i];
 		ret = pthread_mutexattr_init(pma[i]);
 	}
-	if (ret)
-	{ UNRESOLVED(ret, "Mutex attribute init failed"); }
+	if (ret) {
+		UNRESOLVED(ret, "Mutex attribute init failed");
+	}
 	pma[4] = (pthread_mutexattr_t *) NULL;
 
-	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL)))
-	{ UNRESOLVED(ret, "Mutex attribute NORMAL failed"); }
-	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_DEFAULT)))
-	{ UNRESOLVED(ret, "Mutex attribute DEFAULT failed"); }
-	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_RECURSIVE)))
-	{ UNRESOLVED(ret, "Mutex attribute RECURSIVE failed"); }
-	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_ERRORCHECK)))
-	{ UNRESOLVED(ret, "Mutex attribute ERRORCHECK failed"); }
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL))) {
+		UNRESOLVED(ret, "Mutex attribute NORMAL failed");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_DEFAULT))) {
+		UNRESOLVED(ret, "Mutex attribute DEFAULT failed");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_RECURSIVE))) {
+		UNRESOLVED(ret, "Mutex attribute RECURSIVE failed");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_ERRORCHECK))) {
+		UNRESOLVED(ret, "Mutex attribute ERRORCHECK failed");
+	}
 
 	sz = sysconf(_SC_PAGESIZE);
 
 	/* Limit the process memory to a small value (64Mb for example). */
-	rl.rlim_max=1024*1024*64;
-	rl.rlim_cur=1024*1024*64;
-	if ((ret = setrlimit(RLIMIT_AS,  &rl)))
-	{ UNRESOLVED(ret, "Memory limitation failed"); }
-
-	#if VERBOSE > 1
+	rl.rlim_max = 1024 * 1024 * 64;
+	rl.rlim_cur = 1024 * 1024 * 64;
+	if ((ret = setrlimit(RLIMIT_AS, &rl))) {
+		UNRESOLVED(ret, "Memory limitation failed");
+	}
+#if VERBOSE > 1
 	output("Ready to take over memory. Page size is %d\n", sz);
-	#endif
+#endif
 
 	/* Allocate all available memory */
-	while (1)
-	{
-		ptr = malloc(sz); /* Allocate one page of memory */
+	while (1) {
+		ptr = malloc(sz);	/* Allocate one page of memory */
 		if (ptr == NULL)
 			break;
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		ret++;
-		#endif
-		*(void **)ptr = ptr_prev; /* Write into the allocated page */
+#endif
+		*(void **)ptr = ptr_prev;	/* Write into the allocated page */
 		ptr_prev = ptr;
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("%d pages were allocated before failure\n", ret);
 	ret = 0;
-	#endif
+#endif
 
-	while (1)
-	{
-		ptr = malloc(sizeof(void*)); /* Allocate every remaining bits of memory */
+	while (1) {
+		ptr = malloc(sizeof(void *));	/* Allocate every remaining bits of memory */
 		if (ptr == NULL)
 			break;
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		ret++;
-		#endif
-		*(void **)ptr = ptr_prev; /* Keep track of allocated memory */
+#endif
+		*(void **)ptr = ptr_prev;	/* Keep track of allocated memory */
 		ptr_prev = ptr;
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("%d additional spaces were allocated before failure\n", ret);
 	ret = 0;
-	#endif
+#endif
 	if (errno != ENOMEM)
 		UNRESOLVED(errno, "Memory not full");
 
 	/* Now that memory is full, we try to initialize a mutex */
-	for (i=0; i<5; i++)
-	{
+	for (i = 0; i < 5; i++) {
 		retini[i] = pthread_mutex_init(&mtx, pma[i]);
-		if (!retini[i]) /* If mutex has been initialized, we destroy it */
+		if (!retini[i])	/* If mutex has been initialized, we destroy it */
 			retdtr[i] = pthread_mutex_destroy(&mtx);
 	}
 
 	/* We can now free the memory */
-	while (ptr_prev != NULL)
-	{
+	while (ptr_prev != NULL) {
 		ptr = ptr_prev;
 		ptr_prev = *(void **)ptr;
 		free(ptr);
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Memory is released\n");
-	#endif
+#endif
 
-	for (i=0; i<4; i++)
+	for (i = 0; i < 4; i++)
 		pthread_mutexattr_destroy(pma[i]);
 
-	for (i=0; i<5; i++)
-	{
-		if (retini[i] != 0 && retini[i] !=ENOMEM)
-		{  FAILED("Mutex init returned a wrong error code when no memory was left"); }
+	for (i = 0; i < 5; i++) {
+		if (retini[i] != 0 && retini[i] != ENOMEM) {
+			FAILED
+			    ("Mutex init returned a wrong error code when no memory was left");
+		}
 
-		if (retini[i] == 0)
-		{
-			#if VERBOSE > 0
-			output("Mutex initialization for attribute %d succeeds when memory is full\n", i);
-			#endif
-			if (retdtr[i] != 0)
-			{  UNRESOLVED(retdtr[i],  "Mutex destroy failed on mutex inilialized under heavy loaded memory"); }
+		if (retini[i] == 0) {
+#if VERBOSE > 0
+			output
+			    ("Mutex initialization for attribute %d succeeds when memory is full\n",
+			     i);
+#endif
+			if (retdtr[i] != 0) {
+				UNRESOLVED(retdtr[i],
+					   "Mutex destroy failed on mutex inilialized under heavy loaded memory");
+			}
 		}
-		#if VERBOSE > 0
-		else
-		{
-			output("Mutex initialization for attribute %d fails with ENOMEM when memory is full\n", i);
+#if VERBOSE > 0
+		else {
+			output
+			    ("Mutex initialization for attribute %d fails with ENOMEM when memory is full\n",
+			     i);
 		}
-		#endif
+#endif
 	}
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/speculative/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/speculative/5-2.c
index 0b1400d..cd1bc4f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/speculative/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_init/speculative/5-2.c
@@ -28,25 +28,25 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <errno.h>
- #include <stdarg.h>
- #include <sys/utsname.h>
- #include <string.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <sys/utsname.h>
+#include <string.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../../testfrmw/testfrmw.h"
- #include "../../testfrmw/testfrmw.c"
+#include "../../testfrmw/testfrmw.h"
+#include "../../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,23 +82,23 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	struct utsname un;
 
 	output_init();
 	ret = uname(&un);
-	if (ret == -1)
-	{  UNRESOLVED(errno, "Unable to get Implementation name");  }
-
-	#if VERBOSE > 0
-	output("Implementation is: \n\t%s\n\t%s\n\t%s\n", un.sysname, un.release, un.version);
-	#endif
+	if (ret == -1) {
+		UNRESOLVED(errno, "Unable to get Implementation name");
+	}
+#if VERBOSE > 0
+	output("Implementation is: \n\t%s\n\t%s\n\t%s\n", un.sysname,
+	       un.release, un.version);
+#endif
 
 	/* If we are running Linux */
-	if (strcmp(un.sysname, "Linux") == 0)
-	{
+	if (strcmp(un.sysname, "Linux") == 0) {
 		/* Linux does not provide privilege access to pthread_mutex_init function */
 		ret = PTS_UNSUPPORTED;
 		output("Linux does not provide this feature\n");
@@ -107,13 +107,11 @@
 	}
 
 	/* If we are running AIX */
-	if (strcmp(un.sysname, "AIX") == 0)
-	{
+	if (strcmp(un.sysname, "AIX") == 0) {
 		;
 	}
 	/* If we are running Solaris */
-	if (strcmp(un.sysname, "SunOS") == 0)
-	{
+	if (strcmp(un.sysname, "SunOS") == 0) {
 		;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
index 0e4a40e..48de893 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
@@ -32,37 +32,39 @@
 
 void *f1(void *parm);
 
-pthread_mutex_t    mutex = PTHREAD_MUTEX_INITIALIZER;
-int                value;	/* value protected by mutex */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+int value;			/* value protected by mutex */
 
 int main()
 {
-  	int                   i, rc;
-  	pthread_attr_t        pta;
-  	pthread_t             threads[THREAD_NUM];
-  	//pthread_t  	      self = pthread_self();
+	int i, rc;
+	pthread_attr_t pta;
+	pthread_t threads[THREAD_NUM];
+	//pthread_t           self = pthread_self();
 
-  	pthread_attr_init(&pta);
-  	pthread_attr_setdetachstate(&pta, PTHREAD_CREATE_JOINABLE);
+	pthread_attr_init(&pta);
+	pthread_attr_setdetachstate(&pta, PTHREAD_CREATE_JOINABLE);
 
-  	/* Create threads */
-  	fprintf(stderr,"Creating %d threads\n", THREAD_NUM);
-  	for (i=0; i<THREAD_NUM; ++i)
-    		rc = pthread_create(&threads[i], &pta, f1, NULL);
+	/* Create threads */
+	fprintf(stderr, "Creating %d threads\n", THREAD_NUM);
+	for (i = 0; i < THREAD_NUM; ++i)
+		rc = pthread_create(&threads[i], &pta, f1, NULL);
 
 	/* Wait to join all threads */
-  	for (i=0; i<THREAD_NUM; ++i)
-    		pthread_join(threads[i], NULL);
-  	pthread_attr_destroy(&pta);
-  	pthread_mutex_destroy(&mutex);
+	for (i = 0; i < THREAD_NUM; ++i)
+		pthread_join(threads[i], NULL);
+	pthread_attr_destroy(&pta);
+	pthread_mutex_destroy(&mutex);
 
-  	/* Check if the final value is as expected */
-  	if (value != (THREAD_NUM) * LOOPS) {
-	  	fprintf(stderr,"Using %d threads and each loops %d times\n", THREAD_NUM, LOOPS);
-    		fprintf(stderr,"Final value must be %d instead of %d\n", (THREAD_NUM)*LOOPS, value);
+	/* Check if the final value is as expected */
+	if (value != (THREAD_NUM) * LOOPS) {
+		fprintf(stderr, "Using %d threads and each loops %d times\n",
+			THREAD_NUM, LOOPS);
+		fprintf(stderr, "Final value must be %d instead of %d\n",
+			(THREAD_NUM) * LOOPS, value);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-  	}
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
@@ -70,33 +72,35 @@
 
 void *f1(void *parm)
 {
-  	int   i, tmp;
-  	int   rc = 0;
-  	pthread_t  self = pthread_self();
+	int i, tmp;
+	int rc = 0;
+	pthread_t self = pthread_self();
 
 	/* Loopd M times to acquire the mutex, increase the value,
 	   and then release the mutex. */
 
-  	for (i=0; i<LOOPS; ++i) {
-      		rc = pthread_mutex_lock(&mutex);
-      		if (rc!=0) {
-        		fprintf(stderr,"Error on pthread_mutex_lock(), rc=%d\n", rc);
-			return (void*)(PTS_FAIL);
-      		}
+	for (i = 0; i < LOOPS; ++i) {
+		rc = pthread_mutex_lock(&mutex);
+		if (rc != 0) {
+			fprintf(stderr,
+				"Error on pthread_mutex_lock(), rc=%d\n", rc);
+			return (void *)(PTS_FAIL);
+		}
 
-    		tmp = value;
-    		tmp = tmp+1;
-    		fprintf(stderr,"Thread(0x%p) holds the mutex\n",(void*)self);
-    		usleep(1000);	  /* delay the increasement operation */
-    		value = tmp;
+		tmp = value;
+		tmp = tmp + 1;
+		fprintf(stderr, "Thread(0x%p) holds the mutex\n", (void *)self);
+		usleep(1000);	/* delay the increasement operation */
+		value = tmp;
 
-      		rc = pthread_mutex_unlock(&mutex);
-      		if (rc!=0) {
-        		fprintf(stderr,"Error on pthread_mutex_unlock(), rc=%d\n", rc);
- 			return (void*)(PTS_UNRESOLVED);
-      		}
-    		sleep(1);
-  	}
-  	pthread_exit(0);
-  	return (void*)(0);
+		rc = pthread_mutex_unlock(&mutex);
+		if (rc != 0) {
+			fprintf(stderr,
+				"Error on pthread_mutex_unlock(), rc=%d\n", rc);
+			return (void *)(PTS_UNRESOLVED);
+		}
+		sleep(1);
+	}
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/2-1.c
index f802c30..6bfdef7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/2-1.c
@@ -17,17 +17,17 @@
 
 int main()
 {
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex object with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex,NULL)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_init(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Lock the mutex using pthread_mutex_lock() */
-	if ((rc=pthread_mutex_lock(&mutex)) == 0) {
+	if ((rc = pthread_mutex_lock(&mutex)) == 0) {
 		pthread_mutex_unlock(&mutex);
 		printf("Test PASSED\n");
 		return PTS_PASS;
@@ -35,21 +35,19 @@
 
 	/* Check if returned values are tolerable */
 	else if (rc == EINVAL) {
-		fprintf(stderr,"Invalid mutex object\n");
+		fprintf(stderr, "Invalid mutex object\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EAGAIN) {
-		fprintf(stderr,"The maximum number of recursive locks has been exceeded\n");
+	} else if (rc == EAGAIN) {
+		fprintf(stderr,
+			"The maximum number of recursive locks has been exceeded\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EDEADLK) {
-		fprintf(stderr,"The current thread already owns the mutex\n");
+	} else if (rc == EDEADLK) {
+		fprintf(stderr, "The current thread already owns the mutex\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c
index cf2c953..797f09a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c
@@ -34,30 +34,30 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,42 +87,42 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-char do_it=1;
-unsigned long count_ope=0;
+char do_it = 1;
+unsigned long count_ope = 0;
 pthread_mutex_t count_protect = PTHREAD_MUTEX_INITIALIZER;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 sem_t semsync;
 sem_t semsync2;
 
-typedef struct
-{
-	pthread_t   	*thr;
-	int	sig;
+typedef struct {
+	pthread_t *thr;
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
 /* the following function keeps on sending the signal to the thread pointed by arg
  *  If WITH_SYNCHRO is defined, the target thread has a handler for the signal */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
-		if ((ret = pthread_kill (*(thearg->thr), thearg->sig)))
-		{ UNRESOLVED(ret, "Pthread_kill in sendsig"); }
+		if ((ret = pthread_kill(*(thearg->thr), thearg->sig))) {
+			UNRESOLVED(ret, "Pthread_kill in sendsig");
+		}
 
 	}
 
@@ -133,22 +133,25 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if ((sem_post(&semsig1)))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if ((sem_post(&semsig1))) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if ((sem_post(&semsig2)))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if ((sem_post(&semsig2))) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* The following function loops on init/destroy some mutex (with different attributes)
  * it does check that no error code of EINTR is returned */
 
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	pthread_mutexattr_t ma[4], *pma[5];
 	pthread_mutex_t m[5];
@@ -157,134 +160,128 @@
 
 	/* We need to register the signal handlers */
 	struct sigaction sa;
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
-
-	if ((sem_post(&semsync2)))
-	{ UNRESOLVED(errno, "could not post semsync2"); }
-
-	/* Initialize the different mutex */
-	pma[4]=NULL;
-
-	for (i=0; i<4; i++)
-	{
-		pma[i]=&ma[i];
-		if ((ret = pthread_mutexattr_init(pma[i])))
-		{ UNRESOLVED(ret, "pthread_mutexattr_init"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
-	#ifndef WITHOUT_XOPEN
-		if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (normal)"); }
-		if ((ret = pthread_mutexattr_settype(pma[1], PTHREAD_MUTEX_ERRORCHECK)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (errorcheck)"); }
-		if ((ret = pthread_mutexattr_settype(pma[2], PTHREAD_MUTEX_RECURSIVE)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (recursive)"); }
-		if ((ret = pthread_mutexattr_settype(pma[3], PTHREAD_MUTEX_DEFAULT)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (default)"); }
-		#if VERBOSE >1
-		output("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT initialized\n");
-		#endif
-	#else
-		#if VERBOSE > 0
-		output("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT unavailable\n");
-		#endif
-	#endif
+	if ((sem_post(&semsync2))) {
+		UNRESOLVED(errno, "could not post semsync2");
+	}
 
-	for (i=0; i<5; i++)
-	{
+	/* Initialize the different mutex */
+	pma[4] = NULL;
+
+	for (i = 0; i < 4; i++) {
+		pma[i] = &ma[i];
+		if ((ret = pthread_mutexattr_init(pma[i]))) {
+			UNRESOLVED(ret, "pthread_mutexattr_init");
+		}
+	}
+
+#ifndef WITHOUT_XOPEN
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (normal)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[1], PTHREAD_MUTEX_ERRORCHECK))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (errorcheck)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[2], PTHREAD_MUTEX_RECURSIVE))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (recursive)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[3], PTHREAD_MUTEX_DEFAULT))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (default)");
+	}
+#if VERBOSE >1
+	output
+	    ("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT initialized\n");
+#endif
+#else
+#if VERBOSE > 0
+	output
+	    ("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT unavailable\n");
+#endif
+#endif
+
+	for (i = 0; i < 5; i++) {
 		ret = pthread_mutex_init(&m[i], pma[i]);
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_mutex_init returned EINTR");
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_mutex_init failed");
 		}
 	}
 	/* The mutex are ready, we will loop on lock/unlock now */
 
-	while (do_it)
-	{
-		for (i=0; i<5; i++)
-		{
+	while (do_it) {
+		for (i = 0; i < 5; i++) {
 			ret = pthread_mutex_lock(&m[i]);
-			if (ret == EINTR)
-			{
+			if (ret == EINTR) {
 				FAILED("pthread_mutex_lock returned EINTR");
 			}
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				UNRESOLVED(ret, "pthread_mutex_lock failed");
 			}
 			ret = pthread_mutex_unlock(&m[i]);
-			if (ret == EINTR)
-			{
+			if (ret == EINTR) {
 				FAILED("pthread_mutex_unlock returned EINTR");
 			}
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				UNRESOLVED(ret, "pthread_mutex_unlock failed");
 			}
 		}
 		ret = pthread_mutex_lock(&count_protect);
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_mutex_lock returned EINTR");
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_mutex_lock failed");
 		}
 		count_ope++;
 		pthread_mutex_unlock(&count_protect);
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_mutex_unlock returned EINTR");
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_mutex_unlock failed");
 		}
 	}
 
 	/* Now we can destroy the mutex objects */
-	for (i=0; i<4; i++)
-	{
-		if ((ret = pthread_mutexattr_destroy(pma[i])))
-		{ UNRESOLVED(ret, "pthread_mutexattr_init"); }
+	for (i = 0; i < 4; i++) {
+		if ((ret = pthread_mutexattr_destroy(pma[i]))) {
+			UNRESOLVED(ret, "pthread_mutexattr_init");
+		}
 	}
-	for (i=0; i<5; i++)
-	{
+	for (i = 0; i < 5; i++) {
 		ret = pthread_mutex_destroy(&m[i]);
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_mutex_destroy returned EINTR");
 		}
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_mutex_destroy failed");
 		}
 	}
 
 	do {
 		ret = sem_wait(&semsync);
-	} while (ret && (errno ==  EINTR));
-	if (ret)
-	{ UNRESOLVED(errno, "Could not wait for sig senders termination"); }
+	} while (ret && (errno == EINTR));
+	if (ret) {
+		UNRESOLVED(errno, "Could not wait for sig senders termination");
+	}
 
 	return NULL;
 }
 
 /* At last (but not least) we need a main */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -292,31 +289,35 @@
 
 	output_init();
 
-	#ifdef WITH_SYNCHRO
-	#if VERBOSE >1
+#ifdef WITH_SYNCHRO
+#if VERBOSE >1
 	output("Running in synchronized mode\n");
-	#endif
-	if ((sem_init(&semsig1, 0, 1)))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if ((sem_init(&semsig2, 0, 1)))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
+#endif
+	if ((sem_init(&semsig1, 0, 1))) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if ((sem_init(&semsig2, 0, 1))) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	if ((sem_init(&semsync, 0, 0)))
-	{ UNRESOLVED(errno, "semsync init"); }
+	if ((sem_init(&semsync, 0, 0))) {
+		UNRESOLVED(errno, "semsync init");
+	}
 
-	if ((sem_init(&semsync2, 0, 0)))
-	{ UNRESOLVED(errno, "semsync2 init"); }
-
-	#if VERBOSE >1
+	if ((sem_init(&semsync2, 0, 0))) {
+		UNRESOLVED(errno, "semsync2 init");
+	}
+#if VERBOSE >1
 	output("Starting the worker thread\n");
-	#endif
-	if ((ret = pthread_create(&th_work, NULL, threaded, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+#endif
+	if ((ret = pthread_create(&th_work, NULL, threaded, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	do {
 		ret = sem_wait(&semsync2);
-	} while (ret && (errno ==  EINTR));
+	} while (ret && (errno == EINTR));
 
 	arg1.thr = &th_work;
 	arg2.thr = &th_work;
@@ -327,47 +328,53 @@
 	arg2.sem = &semsig2;
 #endif
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Starting the signal sources\n");
-	#endif
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+#endif
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Let the worker be killed for a second\n");
-	#endif
+#endif
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Stop everybody\n");
-	#endif
-	do { do_it=0; }
+#endif
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
-
-	#if VERBOSE >1
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
+#if VERBOSE >1
 	output("Signal sources are stopped, we can stop the worker\n");
-	#endif
-	if ((sem_post(&semsync)))
-	{ UNRESOLVED(errno, "could not post semsync"); }
+#endif
+	if ((sem_post(&semsync))) {
+		UNRESOLVED(errno, "could not post semsync");
+	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_work, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  %d mutex lock and unlock were done.\n", count_ope);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/4-1.c
index ce76793..caa83a2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/4-1.c
@@ -43,28 +43,28 @@
   */
 
   /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the setrlimit() function from X/OPEN standard */
- #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#ifndef WITHOUT_XOPEN
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include <semaphore.h> /* for synchronization */
- #include <errno.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <semaphore.h>		/* for synchronization */
+#include <errno.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -94,155 +94,173 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 pthread_mutex_t mtx;
-sem_t  sem;
+sem_t sem;
 
 /** child thread function **/
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	/* Try to lock the mutex once. The call must fail here. */
 	ret = pthread_mutex_trylock(&mtx);
-	if (ret == 0)
-	{  FAILED("Child first trylock succeeded");  }
-	#if VERBOSE >1
+	if (ret == 0) {
+		FAILED("Child first trylock succeeded");
+	}
+#if VERBOSE >1
 	output("[thrd] Try to lock the mutex.... failed (normal)\n");
-	#endif
+#endif
 
-	/* Free the parent thread and lock the mutex (must success)*/
-	if ((ret = sem_post(&sem)))
-	{  UNRESOLVED(errno, "1st post sem in child failed");  }
+	/* Free the parent thread and lock the mutex (must success) */
+	if ((ret = sem_post(&sem))) {
+		UNRESOLVED(errno, "1st post sem in child failed");
+	}
 
-	if ((ret = pthread_mutex_lock(&mtx)))
-	{  UNRESOLVED(ret, "Child lock failed");  }
-	#if VERBOSE >1
+	if ((ret = pthread_mutex_lock(&mtx))) {
+		UNRESOLVED(ret, "Child lock failed");
+	}
+#if VERBOSE >1
 	output("[thrd] Successfully locked the mutex\n");
-	#endif
+#endif
 
 	/* Wait for the parent to let us go on */
-	if ((ret = sem_post(&sem)))
-	{  UNRESOLVED(errno, "2nd post sem in child failed");  }
+	if ((ret = sem_post(&sem))) {
+		UNRESOLVED(errno, "2nd post sem in child failed");
+	}
 
 	/* Unlock and exit */
-	if ((ret = pthread_mutex_unlock(&mtx)))
-	{  UNRESOLVED(ret, "Unlock in child failed");  }
-
-	#if VERBOSE >1
+	if ((ret = pthread_mutex_unlock(&mtx))) {
+		UNRESOLVED(ret, "Unlock in child failed");
+	}
+#if VERBOSE >1
 	output("[thrd] Unlocked the mutex, ready to terminate.\n");
-	#endif
+#endif
 
 	return NULL;
 }
 
 /** parent thread function **/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int i;
 	pthread_mutexattr_t ma;
-	pthread_t  child;
+	pthread_t child;
 
 	output_init();
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Initialize the PTHREAD_MUTEX_RECURSIVE mutex\n");
-	#endif
+#endif
 
 	/* Initialize the semaphore */
-	if ((ret = sem_init(&sem, 0, 0)))
-	{  UNRESOLVED(ret, "Sem init failed");  }
+	if ((ret = sem_init(&sem, 0, 0))) {
+		UNRESOLVED(ret, "Sem init failed");
+	}
 
 	/* We initialize the recursive mutex */
-	if ((ret = pthread_mutexattr_init(&ma)))
-	{  UNRESOLVED(ret, "Mutex attribute init failed");  }
+	if ((ret = pthread_mutexattr_init(&ma))) {
+		UNRESOLVED(ret, "Mutex attribute init failed");
+	}
 
-	if ((ret = pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE)))
-	{  UNRESOLVED(ret, "Set type RECURSIVE failed");  }
+	if ((ret = pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE))) {
+		UNRESOLVED(ret, "Set type RECURSIVE failed");
+	}
 
-	if ((ret = pthread_mutex_init(&mtx, &ma)))
-	{  UNRESOLVED(ret, "Recursive mutex init failed");  }
+	if ((ret = pthread_mutex_init(&mtx, &ma))) {
+		UNRESOLVED(ret, "Recursive mutex init failed");
+	}
 
-	if ((ret = pthread_mutexattr_destroy(&ma)))
-	{  UNRESOLVED(ret, "Mutex attribute destroy failed");  }
+	if ((ret = pthread_mutexattr_destroy(&ma))) {
+		UNRESOLVED(ret, "Mutex attribute destroy failed");
+	}
 
 	/* -- The mutex is now ready for testing -- */
 
 	/* First, we lock it twice and unlock once */
-	if ((ret = pthread_mutex_lock(&mtx)))
-	{ UNRESOLVED(ret, "First lock failed");  }
+	if ((ret = pthread_mutex_lock(&mtx))) {
+		UNRESOLVED(ret, "First lock failed");
+	}
 
-	if ((ret = pthread_mutex_lock(&mtx)))
-	{ FAILED("Second lock failed");  }
+	if ((ret = pthread_mutex_lock(&mtx))) {
+		FAILED("Second lock failed");
+	}
 
-	if ((ret = pthread_mutex_unlock(&mtx)))
-	{ FAILED("First unlock failed");  }
-
-	#if VERBOSE >1
-	output("The mutex has been locked twice and unlocked once, start the thread now.\n");
-	#endif
+	if ((ret = pthread_mutex_unlock(&mtx))) {
+		FAILED("First unlock failed");
+	}
+#if VERBOSE >1
+	output
+	    ("The mutex has been locked twice and unlocked once, start the thread now.\n");
+#endif
 
 	/* Here this thread owns the mutex and the internal count is "1" */
 
 	/* We create the child thread */
-	if ((ret = pthread_create(&child, NULL, threaded, NULL)))
-	{  UNRESOLVED(ret, "Unable to create child thread");  }
+	if ((ret = pthread_create(&child, NULL, threaded, NULL))) {
+		UNRESOLVED(ret, "Unable to create child thread");
+	}
 
 	/* then wait for child to be ready */
-	if ((ret = sem_wait(&sem)))
-	{  UNRESOLVED(errno, "Wait sem in child failed");  }
-
-	#if VERBOSE >1
+	if ((ret = sem_wait(&sem))) {
+		UNRESOLVED(errno, "Wait sem in child failed");
+	}
+#if VERBOSE >1
 	output("[main] unlock the mutex.\n");
-	#endif
+#endif
 
 	/* We can now unlock the mutex */
-	if ((ret = pthread_mutex_unlock(&mtx)))
-	{ FAILED("Second unlock failed");  }
+	if ((ret = pthread_mutex_unlock(&mtx))) {
+		FAILED("Second unlock failed");
+	}
 
 	/* We wait for the child to lock the mutex */
-	if ((ret = sem_wait(&sem)))
-	{  UNRESOLVED(errno, "Wait sem in child failed");  }
+	if ((ret = sem_wait(&sem))) {
+		UNRESOLVED(errno, "Wait sem in child failed");
+	}
 
 	/* Then, try to unlock the mutex (owned by the child or unlocked) */
 	ret = pthread_mutex_unlock(&mtx);
-	if (ret == 0)
-	{ FAILED("Unlock of unowned mutex succeeds");  }
+	if (ret == 0) {
+		FAILED("Unlock of unowned mutex succeeds");
+	}
 
 	/* Everything seems OK here */
-	if ((ret = pthread_join(child, NULL)))
-	{  UNRESOLVED(ret, "Child join failed");  }
+	if ((ret = pthread_join(child, NULL))) {
+		UNRESOLVED(ret, "Child join failed");
+	}
 
 	/* Simple loop to double-check */
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("[main] joined the thread.\n");
 	output("Lock & unlock the mutex 50 times.\n");
-	#endif
+#endif
 
-	for (i=0; i<50; i++)
-	{
-		if ((ret = pthread_mutex_lock(&mtx)))
-		{  FAILED("Lock failed in loop");  }
+	for (i = 0; i < 50; i++) {
+		if ((ret = pthread_mutex_lock(&mtx))) {
+			FAILED("Lock failed in loop");
+		}
 	}
-	for (i=0; i<50; i++)
-	{
-		if ((ret = pthread_mutex_unlock(&mtx)))
-		{  FAILED("Unlock failed in loop");  }
+	for (i = 0; i < 50; i++) {
+		if ((ret = pthread_mutex_unlock(&mtx))) {
+			FAILED("Unlock failed in loop");
+		}
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
-	if (ret == 0)
-	{  FAILED("Unlock succeeds after the loop");  }
-
-	#if VERBOSE >1
+	if (ret == 0) {
+		FAILED("Unlock succeeds after the loop");
+	}
+#if VERBOSE >1
 	output("Everything went OK; destroy the mutex.\n");
-	#endif
+#endif
 	/* The test passed, we destroy the mutex */
-	if ((ret = pthread_mutex_destroy(&mtx)))
-	{  UNRESOLVED(ret, "Final mutex destroy failed");  }
+	if ((ret = pthread_mutex_destroy(&mtx))) {
+		UNRESOLVED(ret, "Final mutex destroy failed");
+	}
 
 	PASSED;
 }
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/5-1.c
index a096277..4cb8e69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/5-1.c
@@ -42,30 +42,30 @@
   */
 
   /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -96,177 +96,193 @@
 /********************************************************************************************/
 pthread_mutex_t mtx[5];
 sem_t semsig, semstart;
-int ctrl=0;
+int ctrl = 0;
 
 /*********  signal handler  **********/
 void sighdl(int sig)
 {
-	if (sem_post(&semsig))
-	{ UNRESOLVED(errno, "Sem_post in signal handler"); }
+	if (sem_post(&semsig)) {
+		UNRESOLVED(errno, "Sem_post in signal handler");
+	}
 }
 
 /********** thread *********/
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret, i;
 
 	/* We register the signal handler */
 	struct sigaction sa;
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
 
 	/* Start the real work */
-	for (i=0; i<5; i++) /* We'll do this with the 5 kinds of mutex */
-	{
-		if (sem_post(&semstart)) /* Tell the father we are ready */
-		{ UNRESOLVED(errno, "Sem post in thread"); }
+	for (i = 0; i < 5; i++) {	/* We'll do this with the 5 kinds of mutex */
+		if (sem_post(&semstart)) {	/* Tell the father we are ready */
+			UNRESOLVED(errno, "Sem post in thread");
+		}
 
-		if ((ret = pthread_mutex_lock(&mtx[i]))) /* Attempt to lock the mutex */
-		{ UNRESOLVED(ret, "Mutex lock failed in thread"); }
+		if ((ret = pthread_mutex_lock(&mtx[i]))) {	/* Attempt to lock the mutex */
+			UNRESOLVED(ret, "Mutex lock failed in thread");
+		}
 
-		ctrl++; /* Notify the main we have passed the lock */
+		ctrl++;		/* Notify the main we have passed the lock */
 
-		if ((ret = pthread_mutex_unlock(&mtx[i]))) /* We don't need the mutex anymore */
-		{ UNRESOLVED(ret, "Mutex unlock failed in thread"); }
+		if ((ret = pthread_mutex_unlock(&mtx[i]))) {	/* We don't need the mutex anymore */
+			UNRESOLVED(ret, "Mutex unlock failed in thread");
+		}
 	}
 	return NULL;
 }
 
 /********* main ********/
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	pthread_t th;
 	pthread_mutexattr_t ma[4], *pma[5];
-	pma[4]=NULL;
+	pma[4] = NULL;
 
 	output_init();
 
 	/* Initialize the mutex attributes */
-	for (i=0; i<4; i++)
-	{
-		pma[i]=&ma[i];
-		if ((ret = pthread_mutexattr_init(pma[i])))
-		{ UNRESOLVED(ret, "pthread_mutexattr_init"); }
+	for (i = 0; i < 4; i++) {
+		pma[i] = &ma[i];
+		if ((ret = pthread_mutexattr_init(pma[i]))) {
+			UNRESOLVED(ret, "pthread_mutexattr_init");
+		}
 	}
-	#ifndef WITHOUT_XOPEN
-		if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (normal)"); }
-		if ((ret = pthread_mutexattr_settype(pma[1], PTHREAD_MUTEX_ERRORCHECK)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (errorcheck)"); }
-		if ((ret = pthread_mutexattr_settype(pma[2], PTHREAD_MUTEX_RECURSIVE)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (recursive)"); }
-		if ((ret = pthread_mutexattr_settype(pma[3], PTHREAD_MUTEX_DEFAULT)))
-		{ UNRESOLVED(ret, "pthread_mutexattr_settype (default)"); }
-		#if VERBOSE >1
-		output("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT initialized\n");
-		#endif
-	#else
-		#if VERBOSE > 0
-		output("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT unavailable\n");
-		#endif
-	#endif
+#ifndef WITHOUT_XOPEN
+	if ((ret = pthread_mutexattr_settype(pma[0], PTHREAD_MUTEX_NORMAL))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (normal)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[1], PTHREAD_MUTEX_ERRORCHECK))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (errorcheck)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[2], PTHREAD_MUTEX_RECURSIVE))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (recursive)");
+	}
+	if ((ret = pthread_mutexattr_settype(pma[3], PTHREAD_MUTEX_DEFAULT))) {
+		UNRESOLVED(ret, "pthread_mutexattr_settype (default)");
+	}
+#if VERBOSE >1
+	output
+	    ("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT initialized\n");
+#endif
+#else
+#if VERBOSE > 0
+	output
+	    ("Mutex attributes NORMAL,ERRORCHECK,RECURSIVE,DEFAULT unavailable\n");
+#endif
+#endif
 
 	/* Initialize the 5 mutex */
-	for (i=0; i<5; i++)
-	{
-		if ((ret = pthread_mutex_init(&mtx[i], pma[i])))
-		{ UNRESOLVED(ret, "pthread_mutex_init failed")}
-		if ((ret = pthread_mutex_lock(&mtx[i])))
-		{ UNRESOLVED(ret, "Initial pthread_mutex_lock failed")}
+	for (i = 0; i < 5; i++) {
+		if ((ret = pthread_mutex_init(&mtx[i], pma[i]))) {
+		UNRESOLVED(ret, "pthread_mutex_init failed")}
+		if ((ret = pthread_mutex_lock(&mtx[i]))) {
+		UNRESOLVED(ret, "Initial pthread_mutex_lock failed")}
 	}
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Mutex objects are initialized\n");
-	#endif
+#endif
 
 	/* We don't need the mutex attribute objects anymore */
-	for (i=0; i<4; i++)
-	{
-		if ((ret = pthread_mutexattr_destroy(pma[i])))
-		{ UNRESOLVED(ret, "pthread_mutexattr_destroy"); }
+	for (i = 0; i < 4; i++) {
+		if ((ret = pthread_mutexattr_destroy(pma[i]))) {
+			UNRESOLVED(ret, "pthread_mutexattr_destroy");
+		}
 	}
 
 	/* Initialize the semaphores */
-	if (sem_init(&semsig, 0, 1))
-	{ UNRESOLVED(errno, "Sem init (1) failed"); }
-	if (sem_init(&semstart, 0, 0))
-	{ UNRESOLVED(errno, "Sem init (0) failed"); }
-
-	#if VERBOSE >1
+	if (sem_init(&semsig, 0, 1)) {
+		UNRESOLVED(errno, "Sem init (1) failed");
+	}
+	if (sem_init(&semstart, 0, 0)) {
+		UNRESOLVED(errno, "Sem init (0) failed");
+	}
+#if VERBOSE >1
 	output("Going to create the child thread\n");
-	#endif
+#endif
 	/* Start the child */
-	if ((ret = pthread_create(&th, NULL, threaded, NULL)))
-	{ UNRESOLVED(ret, "Unable to create the thread"); }
-	#if VERBOSE >1
+	if ((ret = pthread_create(&th, NULL, threaded, NULL))) {
+		UNRESOLVED(ret, "Unable to create the thread");
+	}
+#if VERBOSE >1
 	output("Child created\n");
-	#endif
+#endif
 
 	/* Monitor the child */
-	for (i=0; i<5; i++) /* We will do this for the 5 kinds of mutex */
-	{
-		if (sem_wait(&semstart))  /* Wait for the thread to be ready */
-		{ UNRESOLVED(errno, "Unable to wait for the child"); }
+	for (i = 0; i < 5; i++) {	/* We will do this for the 5 kinds of mutex */
+		if (sem_wait(&semstart)) {	/* Wait for the thread to be ready */
+			UNRESOLVED(errno, "Unable to wait for the child");
+		}
+#if VERBOSE >1
+		output("Child is ready for iteration %i\n", i + 1);
+#endif
 
-		#if VERBOSE >1
-		output("Child is ready for iteration %i\n", i+1);
-		#endif
-
-		ctrl=0; /* init the ctrl var */
+		ctrl = 0;	/* init the ctrl var */
 
 		/* Send some signals to the thread */
-		for (j=0; j<10; j++)
-		{
-			if ((ret = sem_wait(&semsig)))
-			{ UNRESOLVED(errno, "Sem_wait failed from the signal handler"); }
+		for (j = 0; j < 10; j++) {
+			if ((ret = sem_wait(&semsig))) {
+				UNRESOLVED(errno,
+					   "Sem_wait failed from the signal handler");
+			}
 
-			sched_yield(); /* Let the child do its stuff - might be a nanosleep here*/
+			sched_yield();	/* Let the child do its stuff - might be a nanosleep here */
 
-			if ((ret = pthread_kill (th, SIGUSR1)))
-			{ UNRESOLVED(ret, "Pthread_kill failed"); }
+			if ((ret = pthread_kill(th, SIGUSR1))) {
+				UNRESOLVED(ret, "Pthread_kill failed");
+			}
 		}
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Child was killed 10 times\n");
-		#endif
+#endif
 
 		/* Now check the thread is still waiting for the mutex */
-		if (ctrl != 0)
-		{
-			FAILED("Killed child passed the pthread_mutex_lock without owning it");
+		if (ctrl != 0) {
+			FAILED
+			    ("Killed child passed the pthread_mutex_lock without owning it");
 		}
-
-		#if VERBOSE >1
+#if VERBOSE >1
 		output("Control was OK\n");
-		#endif
+#endif
 
 		/* Unlock the mutex so the thread can proceed to the next one */
-		if ((ret = pthread_mutex_unlock(&mtx[i])))
-		{  UNRESOLVED(ret, "Mutex unlock in main failed"); }
+		if ((ret = pthread_mutex_unlock(&mtx[i]))) {
+			UNRESOLVED(ret, "Mutex unlock in main failed");
+		}
 	}
 
-	#if VERBOSE >1
-	output("The test has passed, we are now going to clean up everything.\n");
-	#endif
+#if VERBOSE >1
+	output
+	    ("The test has passed, we are now going to clean up everything.\n");
+#endif
 
 	/* Clean everything: the test has passed */
-	if ((ret = pthread_join(th, NULL)))
-	{  UNRESOLVED(ret, "Unable to join the child"); }
-
-	for (i=0; i<5; i++)
-	{
-		if ((ret = pthread_mutex_destroy(&mtx[i])))
-		{ UNRESOLVED(ret, "Unable to finally destroy a mutex"); }
+	if ((ret = pthread_join(th, NULL))) {
+		UNRESOLVED(ret, "Unable to join the child");
 	}
 
-	if (sem_destroy(&semstart))
-	{ UNRESOLVED(errno, "Unable to destroy semstart semaphore"); }
+	for (i = 0; i < 5; i++) {
+		if ((ret = pthread_mutex_destroy(&mtx[i]))) {
+			UNRESOLVED(ret, "Unable to finally destroy a mutex");
+		}
+	}
 
-	if (sem_destroy(&semsig))
-	{ UNRESOLVED(errno, "Unable to destroy semsig semaphore"); }
+	if (sem_destroy(&semstart)) {
+		UNRESOLVED(errno, "Unable to destroy semstart semaphore");
+	}
+
+	if (sem_destroy(&semsig)) {
+		UNRESOLVED(errno, "Unable to destroy semsig semaphore");
+	}
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_setprioceiling/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_setprioceiling/1-1.c
index 34f6dcf..8ee685f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_setprioceiling/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_setprioceiling/1-1.c
@@ -19,8 +19,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int
-main(void)
+int main(void)
 {
 #if defined(_SC_PRIORITY_SCHEDULING)
 
@@ -44,10 +43,10 @@
 	 * pthread_mutexattr_getprotocol.
 	 */
 	error = pthread_mutexattr_setprotocol(&mutex_attr,
-		PTHREAD_PRIO_PROTECT);
+					      PTHREAD_PRIO_PROTECT);
 	if (error) {
 		printf("pthread_mutexattr_setprotocol failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_UNRESOLVED;
 	}
 
@@ -62,12 +61,12 @@
 	error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
 	if (error) {
 		printf("pthread_mutex_getprioceiling failed: %s\n",
-			strerror(error));
+		       strerror(error));
 		return PTS_FAIL;
 	}
 
-	(void) pthread_mutexattr_destroy(&mutex_attr);
-	(void) pthread_mutex_destroy(&mutex);
+	(void)pthread_mutexattr_destroy(&mutex_attr);
+	(void)pthread_mutex_destroy(&mutex);
 
 	printf("Prioceiling returned: %d\n", prioceiling);
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/1-1.c
index 9e8a98f..c9ac5b0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/1-1.c
@@ -33,14 +33,14 @@
 #include <sys/time.h>
 #include "posixtest.h"
 
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-struct timeval currsec1, currsec2;			/* Variables for saving time before
-						           and after locking the mutex using
-							   pthread_mutex_timedlock(). */
+struct timeval currsec1, currsec2;	/* Variables for saving time before
+					   and after locking the mutex using
+					   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -52,34 +52,29 @@
 	struct timeval time_diff;
 
 	/* Lock the mutex. */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
 		return PTS_UNRESOLVED;
 	}
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
 		return PTS_UNRESOLVED;
 	}
@@ -87,15 +82,18 @@
 	/* Compare time before the mutex locked and after the mutex lock timed out. */
 	time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 	time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-	if (time_diff.tv_usec < 0)
-	{
+	if (time_diff.tv_usec < 0) {
 		--time_diff.tv_sec;
 		time_diff.tv_usec += 1000000;
 	}
-	if (time_diff.tv_sec < TIMEOUT)
-	{
-		printf("Test FAILED: Timed lock did not wait long enough. (%d secs.)\n", TIMEOUT);
-		printf("time before mutex locked: %ld.%06ld, time after mutex timed out: %ld.%06ld.\n", (long)currsec1.tv_sec, (long)currsec1.tv_usec, (long)currsec2.tv_sec, (long)currsec2.tv_usec);
+	if (time_diff.tv_sec < TIMEOUT) {
+		printf
+		    ("Test FAILED: Timed lock did not wait long enough. (%d secs.)\n",
+		     TIMEOUT);
+		printf
+		    ("time before mutex locked: %ld.%06ld, time after mutex timed out: %ld.%06ld.\n",
+		     (long)currsec1.tv_sec, (long)currsec1.tv_usec,
+		     (long)currsec2.tv_sec, (long)currsec2.tv_usec);
 		return PTS_FAIL;
 	}
 
@@ -120,17 +118,18 @@
 	timeout.tv_sec = currsec1.tv_sec + TIMEOUT;
 	timeout.tv_nsec = currsec1.tv_usec * 1000;
 
-	printf("Timed mutex lock will block for %d seconds starting from: %ld.%06ld\n", TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec);
-	if (pthread_mutex_timedlock(&mutex, &timeout) != ETIMEDOUT)
-	{
+	printf
+	    ("Timed mutex lock will block for %d seconds starting from: %ld.%06ld\n",
+	     TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec);
+	if (pthread_mutex_timedlock(&mutex, &timeout) != ETIMEDOUT) {
 		perror("Error in pthread_mutex_timedlock().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Get time after the mutex timed out in locking. */
 	gettimeofday(&currsec2, NULL);
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/2-1.c
index 7333f36..b5011cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/2-1.c
@@ -36,14 +36,14 @@
 #include <sys/time.h>
 #include "posixtest.h"
 
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-struct timeval currsec1, currsec2;			/* Variables for saving time before
-						           and after locking the mutex using
-							   pthread_mutex_timedlock(). */
+struct timeval currsec1, currsec2;	/* Variables for saving time before
+					   and after locking the mutex using
+					   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -55,34 +55,29 @@
 	struct timeval time_diff;
 
 	/* Lock the mutex. */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
 		return PTS_UNRESOLVED;
 	}
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
 		return PTS_UNRESOLVED;
 	}
@@ -90,15 +85,18 @@
 	/* Compare time before the mutex locked and after the mutex lock timed out. */
 	time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 	time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-	if (time_diff.tv_usec < 0)
-	{
+	if (time_diff.tv_usec < 0) {
 		--time_diff.tv_sec;
 		time_diff.tv_usec += 1000000;
 	}
-	if (time_diff.tv_sec < TIMEOUT)
-	{
-		printf("Test FAILED: Timed lock did not wait long enough. (%d secs.)\n", TIMEOUT);
-		printf("time before mutex locked: %ld.%06ld, time after mutex timed out: %ld.%06ld.\n", (long)currsec1.tv_sec, (long)currsec1.tv_usec, (long)currsec2.tv_sec, (long)currsec2.tv_usec);
+	if (time_diff.tv_sec < TIMEOUT) {
+		printf
+		    ("Test FAILED: Timed lock did not wait long enough. (%d secs.)\n",
+		     TIMEOUT);
+		printf
+		    ("time before mutex locked: %ld.%06ld, time after mutex timed out: %ld.%06ld.\n",
+		     (long)currsec1.tv_sec, (long)currsec1.tv_usec,
+		     (long)currsec2.tv_sec, (long)currsec2.tv_usec);
 		return PTS_FAIL;
 	}
 
@@ -120,8 +118,7 @@
 #ifdef CLOCK_REALTIME
 	printf("Test CLOCK_REALTIME\n");
 	rc = clock_gettime(CLOCK_REALTIME, &ts);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		perror("clock_gettime()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -134,19 +131,19 @@
 	timeout.tv_sec = currsec1.tv_sec + TIMEOUT;
 	timeout.tv_nsec = currsec1.tv_usec * 1000;
 
-	printf("Timed mutex lock will block for %d seconds starting from: %ld.%06ld\n", TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec);
-	if (pthread_mutex_timedlock(&mutex, &timeout) != ETIMEDOUT)
-	{
+	printf
+	    ("Timed mutex lock will block for %d seconds starting from: %ld.%06ld\n",
+	     TIMEOUT, (long)currsec1.tv_sec, (long)currsec1.tv_usec);
+	if (pthread_mutex_timedlock(&mutex, &timeout) != ETIMEDOUT) {
 		perror("Error in pthread_mutex_timedlock().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Get time after the mutex timed out in locking. */
 #ifdef CLOCK_REALTIME
 	rc = clock_gettime(CLOCK_REALTIME, &ts);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		perror("clock_gettime()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -155,6 +152,6 @@
 #else
 	gettimeofday(&currsec2, NULL);
 #endif
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/4-1.c
index 5dfb314..9869f67 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/4-1.c
@@ -26,16 +26,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
-int ret;						/* Save return value of
-							   pthread_mutex_timedlock(). */
+int ret;			/* Save return value of
+				   pthread_mutex_timedlock(). */
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-time_t currsec1, currsec2;				/* Variables for saving time before
-						           and afer locking the mutex using
-							   pthread_mutex_timedlock(). */
+time_t currsec1, currsec2;	/* Variables for saving time before
+				   and afer locking the mutex using
+				   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -46,22 +46,19 @@
 	pthread_t new_th;
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the return status of pthread_mutex_timedlock(). */
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		printf("Test FAILED: Expected return code 0, got: %d.\n", ret);
 		return PTS_FAIL;
 	}
@@ -88,19 +85,17 @@
 	ret = pthread_mutex_timedlock(&mutex, &timeout);
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-1.c
index b3accde..b4009a4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-1.c
@@ -31,19 +31,19 @@
 #include <errno.h>
 #include "posixtest.h"
 
-#define INVALID_TIME -1					/* Invalid value of negative value
-							   in the nano-seonds field of
-							   'abs_timeout. */
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define INVALID_TIME -1		/* Invalid value of negative value
+				   in the nano-seonds field of
+				   'abs_timeout. */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
-int ret;						/* Save return value of
-							   pthread_mutex_timedlock(). */
+int ret;			/* Save return value of
+				   pthread_mutex_timedlock(). */
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-time_t currsec1, currsec2;				/* Variables for saving time before
-						           and afer locking the mutex using
-							   pthread_mutex_timedlock(). */
+time_t currsec1, currsec2;	/* Variables for saving time before
+				   and afer locking the mutex using
+				   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -54,23 +54,21 @@
 	pthread_t new_th;
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the return status of pthread_mutex_timedlock(). */
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Expected return code EINVAL, got: %d.\n", ret);
+	if (ret != EINVAL) {
+		printf("Test FAILED: Expected return code EINVAL, got: %d.\n",
+		       ret);
 		return PTS_FAIL;
 	}
 
@@ -89,11 +87,10 @@
 	struct timespec timeout;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Set nano-seconds to negative value. */
@@ -104,19 +101,17 @@
 	ret = pthread_mutex_timedlock(&mutex, &timeout);
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-2.c
index 9b52548..94bbca7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-2.c
@@ -31,19 +31,19 @@
 #include <errno.h>
 #include "posixtest.h"
 
-#define INVALID_TIME 1000000000				/* Invalid value of 1,000 million
-							   in the nano-seonds field of
-							   'abs_timeout. */
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define INVALID_TIME 1000000000	/* Invalid value of 1,000 million
+				   in the nano-seonds field of
+				   'abs_timeout. */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
-int ret;						/* Save return value of
-							   pthread_mutex_timedlock(). */
+int ret;			/* Save return value of
+				   pthread_mutex_timedlock(). */
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-time_t currsec1, currsec2;				/* Variables for saving time before
-						           and afer locking the mutex using
-							   pthread_mutex_timedlock(). */
+time_t currsec1, currsec2;	/* Variables for saving time before
+				   and afer locking the mutex using
+				   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -54,23 +54,21 @@
 	pthread_t new_th;
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the return status of pthread_mutex_timedlock(). */
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Expected return code EINVAL, got: %d.\n", ret);
+	if (ret != EINVAL) {
+		printf("Test FAILED: Expected return code EINVAL, got: %d.\n",
+		       ret);
 		return PTS_FAIL;
 	}
 
@@ -89,11 +87,10 @@
 	struct timespec timeout;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Set nano-seconds to negative value. */
@@ -104,19 +101,17 @@
 	ret = pthread_mutex_timedlock(&mutex, &timeout);
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-3.c
index c3e6884..a0bffe2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/5-3.c
@@ -30,16 +30,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-#define TIMEOUT 3					/* 3 seconds of timeout time for
-							   pthread_mutex_timedlock(). */
+#define TIMEOUT 3		/* 3 seconds of timeout time for
+				   pthread_mutex_timedlock(). */
 void *f1(void *parm);
 
-int ret;						/* Save return value of
-							   pthread_mutex_timedlock(). */
+int ret;			/* Save return value of
+				   pthread_mutex_timedlock(). */
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* The mutex */
-time_t currsec1, currsec2;				/* Variables for saving time before
-						           and afer locking the mutex using
-							   pthread_mutex_timedlock(). */
+time_t currsec1, currsec2;	/* Variables for saving time before
+				   and afer locking the mutex using
+				   pthread_mutex_timedlock(). */
 /****************************
  *
  * MAIN()
@@ -50,43 +50,39 @@
 	pthread_t new_th;
 
 	/* Lock the mutex before creating the thread. */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock in main().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a thread that will call pthread_mutex_timedlock */
-	if (pthread_create(&new_th, NULL, f1, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, f1, NULL) != 0) {
 		perror("Error in pthread_create().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cleaning up the mutexes. */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock().\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_mutex_destroy(&mutex) != 0)
-	{
+	if (pthread_mutex_destroy(&mutex) != 0) {
 		perror("Error in pthread_mutex_destroy().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the return status of pthread_mutex_timedlock(). */
-	if (ret != ETIMEDOUT)
-	{
-		printf("Test FAILED: Expected return code ETIMEDOUT, got: %d.\n", ret);
+	if (ret != ETIMEDOUT) {
+		printf
+		    ("Test FAILED: Expected return code ETIMEDOUT, got: %d.\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
@@ -111,6 +107,6 @@
 	 * Save the return value. */
 	ret = pthread_mutex_timedlock(&mutex, &timeout);
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-1.c
index d3ad140..78f6f7f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-1.c
@@ -29,54 +29,55 @@
 
 void *func(void *parm);
 
-pthread_mutex_t    mutex = PTHREAD_MUTEX_INITIALIZER;
-int     t1_start=0;
-int	t1_pause=1;
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+int t1_start = 0;
+int t1_pause = 1;
 
 int main()
 {
-  	int           	i, rc;
-  	pthread_t       t1;
+	int i, rc;
+	pthread_t t1;
 
 	/* Create a secondary thread and wait until it has locked the mutex */
-    	pthread_create(&t1, NULL, func, NULL);
-    	while (!t1_start)
+	pthread_create(&t1, NULL, func, NULL);
+	while (!t1_start)
 		sleep(1);
 
 	/* Trylock the mutex and expect it returns EBUSY */
-   	rc = pthread_mutex_trylock(&mutex);
-      	if (rc!=EBUSY) {
-        	fprintf(stderr,"Expected %d(EBUSY), got %d\n",EBUSY,rc);
-        	printf("Test FAILED\n");
+	rc = pthread_mutex_trylock(&mutex);
+	if (rc != EBUSY) {
+		fprintf(stderr, "Expected %d(EBUSY), got %d\n", EBUSY, rc);
+		printf("Test FAILED\n");
 		return PTS_FAIL;
-      	}
+	}
 
-    	/* Allow the secondary thread to go ahead */
-	t1_pause=0;
+	/* Allow the secondary thread to go ahead */
+	t1_pause = 0;
 
 	/* Trylock the mutex for N times */
-	for (i=0; i<5; i++) {
+	for (i = 0; i < 5; i++) {
 		rc = pthread_mutex_trylock(&mutex);
-		if (rc==0) {
+		if (rc == 0) {
 			pthread_mutex_unlock(&mutex);
 			break;
-		}
-		else if (rc==EBUSY) {
+		} else if (rc == EBUSY) {
 			sleep(1);
 			continue;
-		}
-		else {
-			fprintf(stderr,"Unexpected error code(%d) for pthread_mutex_lock()\n", rc);
+		} else {
+			fprintf(stderr,
+				"Unexpected error code(%d) for pthread_mutex_lock()\n",
+				rc);
 			return PTS_UNRESOLVED;
 		}
 	}
 
 	/* Clean up */
 	pthread_join(t1, NULL);
-  	pthread_mutex_destroy(&mutex);
+	pthread_mutex_destroy(&mutex);
 
-	if (i>=5) {
-		fprintf(stderr,"Have tried %d times but failed to get the mutex\n", i);
+	if (i >= 5) {
+		fprintf(stderr,
+			"Have tried %d times but failed to get the mutex\n", i);
 		return PTS_UNRESOLVED;
 	}
 	printf("Test PASSED\n");
@@ -85,22 +86,22 @@
 
 void *func(void *parm)
 {
-  	int rc;
+	int rc;
 
-	if ((rc=pthread_mutex_lock(&mutex))!=0) {
-		fprintf(stderr,"Error at pthread_mutex_lock(), rc=%d\n",rc);
-		pthread_exit((void*)PTS_UNRESOLVED);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_lock(), rc=%d\n", rc);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
-	t1_start=1;
+	t1_start = 1;
 
 	while (t1_pause)
 		sleep(1);
 
-	if ((rc=pthread_mutex_unlock(&mutex))!=0) {
-		fprintf(stderr,"Error at pthread_mutex_unlock(), rc=%d\n",rc);
-		pthread_exit((void*)PTS_UNRESOLVED);
+	if ((rc = pthread_mutex_unlock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_unlock(), rc=%d\n", rc);
+		pthread_exit((void *)PTS_UNRESOLVED);
 	}
 
-  	pthread_exit(0);
-  	return (void*)(0);
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-2.c
index 6f67eaf..3190248 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-2.c
@@ -30,32 +30,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -84,75 +84,88 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
-	int status; /* error code */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, "Default mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, "Default mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, "Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, "Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, "Pshared Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, "Pshared mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, "Pshared mutex across processes"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, "Pshared Normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, "Pshared Errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, "Pshared Recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1,
+		    "Pshared Normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1,
+		    "Pshared Errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1,
+		    "Pshared Recursive mutex across processes"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* The test function will only perform a trylock operation then return. */
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	td->status = pthread_mutex_trylock(&(td->mtx));
 
-	if (td->status == 0)
-	{
+	if (td->status == 0) {
 		int ret;
 
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock a locked semaphore");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock a locked semaphore");
+		}
 	}
 
 	return NULL;
 }
 
 /* Main entry point. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int sc;
 	pthread_mutexattr_t ma;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -163,263 +176,290 @@
 
 	/* Test system abilities */
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TSH : %li\n", pshared);
 	output(" MF  : %li\n", mf);
 	if ((mf < 0) || (pshared < 0))
 		output("Process-shared attributes won't be tested\n");
-	#endif
+#endif
 
-	#ifdef WITHOUT_XOPEN
-	#if VERBOSE > 0
-	output("As XSI extension is disabled, we won't test the feature across process\n");
-	#endif
+#ifdef WITHOUT_XOPEN
+#if VERBOSE > 0
+	output
+	    ("As XSI extension is disabled, we won't test the feature across process\n");
+#endif
 	mf = -1;
-	#endif
+#endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file (or not interested in this), we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
+#endif
 	}
-	#ifndef WITHOUT_XOPEN
-	else
-	{
+#ifndef WITHOUT_XOPEN
+	else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/mutex_trylock_1-2-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
-	#endif
+#endif
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  * Do the whole thing for each time to test.
  */
-	for (sc=0; sc < NSCENAR ; sc++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[sc].descr);
-		#endif
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[sc].descr);
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[sc].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[sc].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[sc].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[sc].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex is process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex is process-private\n");
 		}
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[sc].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[sc].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		td->status=0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 		/* Trylock the mutex twice before creating children */
 		ret = pthread_mutex_trylock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to trylock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to trylock the mutex");
+		}
 		ret = pthread_mutex_trylock(&(td->mtx));
-		#ifndef WITHOUT_XOPEN
-		if (scenarii[sc].m_type == PTHREAD_MUTEX_RECURSIVE)
-		{
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to pthread_mutex_trylock() twice a recursive mutex");  }
+#ifndef WITHOUT_XOPEN
+		if (scenarii[sc].m_type == PTHREAD_MUTEX_RECURSIVE) {
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to pthread_mutex_trylock() twice a recursive mutex");
+			}
 
 			/* Unlock once so the count is "1" */
 			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to unlock the mutex");
+			}
+		} else
+#endif
+		if (ret == 0) {
+			FAILED
+			    ("Main was able to pthread_mutex_trylock() twice without error");
 		}
-		else
-		#endif
-			if (ret == 0)  {  FAILED("Main was able to pthread_mutex_trylock() twice without error");  }
 
 		/* Create the children */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 3
-				output("[child] Child process is starting...\n");
-				#endif
+			if (child_pr == 0) {
+#if VERBOSE > 3
+				output
+				    ("[child] Child process is starting...\n");
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across processes */
 			ret = 0;
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(-1 , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(-1, "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(-1, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(-1,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
 
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 		/* Check the child status */
-		if (td->status != EBUSY)
-		{
-			output("Unexpected return value: %d (%s)\n", td->status, strerror(td->status));
-			FAILED("pthread_mutex_trylock() did not return EBUSY in the child");
+		if (td->status != EBUSY) {
+			output("Unexpected return value: %d (%s)\n", td->status,
+			       strerror(td->status));
+			FAILED
+			    ("pthread_mutex_trylock() did not return EBUSY in the child");
 		}
 
 		/* Unlock the mutex */
-		ret= pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+		ret = pthread_mutex_unlock(&(td->mtx));
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock the mutex");
+		}
 
 /**********
  * Destroy the data
  */
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/2-1.c
index dfbc3aa..7143ac8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/2-1.c
@@ -33,32 +33,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -89,58 +89,60 @@
 /********************************************************************************************/
 #ifndef WITHOUT_XOPEN
 
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
-	int status; /* error code */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_RECURSIVE,  0, 0, "Recursive mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, "Pshared Recursive mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, "Pshared Recursive mutex across processes"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, "Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1,
+		    "Pshared Recursive mutex across processes"}
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* The test function will only perform a trylock operation then return. */
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	td->status = pthread_mutex_trylock(&(td->mtx));
 
-	if (td->status == 0)
-	{
+	if (td->status == 0) {
 		int ret;
 
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock a locked semaphore");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock a locked semaphore");
+		}
 	}
 
 	return NULL;
 }
 
 /* Main entry point. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int sc;
 	pthread_mutexattr_t ma;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -151,260 +153,289 @@
 
 	/* Test system abilities */
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TSH : %li\n", pshared);
 	output(" MF  : %li\n", mf);
 	if ((mf < 0) || (pshared < 0))
 		output("Process-shared attributes won't be tested\n");
-	#endif
+#endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file (or not interested in this), we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/mutex_trylock_2-1-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  * Do the whole thing for each time to test.
  */
-	for (sc=0; sc < NSCENAR ; sc++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[sc].descr);
-		#endif
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[sc].descr);
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[sc].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[sc].m_type);
-		#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[sc].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[sc].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex is process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex is process-private\n");
 		}
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[sc].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[sc].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		td->status=0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 		/* Trylock the mutex twice before creating children */
 		ret = pthread_mutex_trylock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to trylock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to trylock the mutex");
+		}
 		ret = pthread_mutex_trylock(&(td->mtx));
 
-		if (scenarii[sc].m_type == PTHREAD_MUTEX_RECURSIVE)
-		{
-			if (ret != 0)  {  FAILED("Failed to pthread_mutex_trylock() twice a recursive mutex");  }
+		if (scenarii[sc].m_type == PTHREAD_MUTEX_RECURSIVE) {
+			if (ret != 0) {
+				FAILED
+				    ("Failed to pthread_mutex_trylock() twice a recursive mutex");
+			}
 
 			/* Unlock once so the count is "1" */
 			ret = pthread_mutex_unlock(&(td->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to unlock the mutex");
+			}
+		} else if (ret == 0) {
+			UNRESOLVED(-1,
+				   "Main was able to pthread_mutex_trylock() twice without error");
 		}
-		else
-			if (ret == 0)  {  UNRESOLVED(-1, "Main was able to pthread_mutex_trylock() twice without error");  }
 
 		/* Create the children */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 3
-				output("[child] Child process is starting...\n");
-				#endif
+			if (child_pr == 0) {
+#if VERBOSE > 3
+				output
+				    ("[child] Child process is starting...\n");
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across processes */
 			ret = 0;
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(-1 , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(-1, "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(-1, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(-1,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
 
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 		/* Check the child status */
-		if (td->status != EBUSY)
-		{
-			output("Unexpected return value: %d (%s)\n", td->status, strerror(td->status));
-			FAILED("pthread_mutex_trylock() did not return EBUSY in the child");
+		if (td->status != EBUSY) {
+			output("Unexpected return value: %d (%s)\n", td->status,
+			       strerror(td->status));
+			FAILED
+			    ("pthread_mutex_trylock() did not return EBUSY in the child");
 		}
 
 		/* Unlock the mutex */
-		ret= pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  FAILED("Failed to unlock the mutex -- count is broken?");  }
+		ret = pthread_mutex_unlock(&(td->mtx));
+		if (ret != 0) {
+			FAILED
+			    ("Failed to unlock the mutex -- count is broken?");
+		}
 
-		ret= pthread_mutex_unlock(&(td->mtx));
-		if (ret == 0)  {  FAILED("Was able to unlock once more the mutex -- count is broken?");  }
+		ret = pthread_mutex_unlock(&(td->mtx));
+		if (ret == 0) {
+			FAILED
+			    ("Was able to unlock once more the mutex -- count is broken?");
+		}
 
 /**********
  * Destroy the data
  */
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/3-1.c
index 8391e8d..c14efa9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/3-1.c
@@ -17,33 +17,32 @@
 
 int main()
 {
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex object with the default mutex attributes */
-	if ((rc=pthread_mutex_init(&mutex,NULL)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_init(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Try to lock the mutex using pthread_mutex_trylock() */
-	if ((rc=pthread_mutex_trylock(&mutex)) == 0) {
+	if ((rc = pthread_mutex_trylock(&mutex)) == 0) {
 		pthread_mutex_unlock(&mutex);
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Check if returned values are tolerable */
-	/* PATCH: since we are using the mutex properly,*/
+	/* PATCH: since we are using the mutex properly, */
 	/*  errors are NOT tolerable here */
 	else if (rc == EBUSY) {
-		fprintf(stderr,"The mutex was already locked\n");
-	}
-	else if (rc == EINVAL) {
-		fprintf(stderr,"Invalid mutex object\n");
-	}
-	else if (rc == EAGAIN) {
-		fprintf(stderr,"The maximum number of recursive locks has been exceeded\n");
+		fprintf(stderr, "The mutex was already locked\n");
+	} else if (rc == EINVAL) {
+		fprintf(stderr, "Invalid mutex object\n");
+	} else if (rc == EAGAIN) {
+		fprintf(stderr,
+			"The maximum number of recursive locks has been exceeded\n");
 	}
 
 	/* Any other returned value means the test failed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-1.c
index 0e29310..1747953 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-1.c
@@ -21,26 +21,26 @@
 #include <errno.h>
 #include "posixtest.h"
 
-pthread_mutex_t    mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 int main()
 {
-  	int           	rc;
+	int rc;
 
-	if ((rc=pthread_mutex_lock(&mutex))!=0) {
-		fprintf(stderr,"Error at pthread_mutex_lock(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_lock(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
-   	rc = pthread_mutex_trylock(&mutex);
-      	if (rc!=EBUSY) {
-        	fprintf(stderr,"Expected %d(EBUSY), got %d\n",EBUSY,rc);
-        	printf("Test FAILED\n");
+	rc = pthread_mutex_trylock(&mutex);
+	if (rc != EBUSY) {
+		fprintf(stderr, "Expected %d(EBUSY), got %d\n", EBUSY, rc);
+		printf("Test FAILED\n");
 		return PTS_FAIL;
-      	}
+	}
 
-    	pthread_mutex_unlock(&mutex);
-  	pthread_mutex_destroy(&mutex);
+	pthread_mutex_unlock(&mutex);
+	pthread_mutex_destroy(&mutex);
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-2.c
index 685b09a..a3b4d96 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-2.c
@@ -28,32 +28,32 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,75 +82,88 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-typedef struct
-{
+typedef struct {
 	pthread_mutex_t mtx;
-	int status; /* error code */
+	int status;		/* error code */
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, "Default mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, "Default mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, "Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, "Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, "Pshared Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, "Pshared mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, "Pshared mutex across processes"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, "Pshared Normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, "Pshared Errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, "Pshared Recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1,
+		    "Pshared Normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1,
+		    "Pshared Errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1,
+		    "Pshared Recursive mutex across processes"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* The test function will only perform a trylock operation then return. */
-void * tf(void * arg)
+void *tf(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 
 	td->status = pthread_mutex_trylock(&(td->mtx));
 
-	if (td->status == 0)
-	{
+	if (td->status == 0) {
 		int ret;
 
 		ret = pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock a locked semaphore");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock a locked semaphore");
+		}
 	}
 
 	return NULL;
 }
 
 /* Main entry point. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int sc;
 	pthread_mutexattr_t ma;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
 
-	pid_t child_pr=0, chkpid;
+	pid_t child_pr = 0, chkpid;
 	int status;
 	pthread_t child_th;
 
@@ -164,250 +177,271 @@
 
 	/* Test system abilities */
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TSH : %li\n", pshared);
 	output(" MF  : %li\n", mf);
 	if ((mf < 0) || (pshared < 0))
 		output("Process-shared attributes won't be tested\n");
-	#endif
+#endif
 
-	#ifdef WITHOUT_XOPEN
-	#if VERBOSE > 0
-	output("As XSI extension is disabled, we won't test the feature across process\n");
-	#endif
+#ifdef WITHOUT_XOPEN
+#if VERBOSE > 0
+	output
+	    ("As XSI extension is disabled, we won't test the feature across process\n");
+#endif
 	mf = -1;
-	#endif
+#endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file (or not interested in this), we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
+#endif
 	}
-	#ifndef WITHOUT_XOPEN
-	else
-	{
+#ifndef WITHOUT_XOPEN
+	else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/mutex_trylock_4-2-XXXXXX";
 		size_t sz;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		sz= (size_t)sysconf(_SC_PAGESIZE);
+		sz = (size_t) sysconf(_SC_PAGESIZE);
 
 		tmp = calloc(1, sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Testdata allocated in shared memory.\n");
-		#endif
+#endif
 	}
-	#endif
+#endif
 
 /**********
  * For each test scenario, initialize the attributes and other variables.
  * Do the whole thing for each time to test.
  */
-	for (sc=0; sc < NSCENAR ; sc++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[sc].descr);
-		#endif
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[sc].descr);
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[sc].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[sc].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[sc].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[sc].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex is process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex is process-private\n");
 		}
-		#endif
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[sc].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[sc].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 /**********
  * Initialize the testdata_t structure with the previously defined attributes
  */
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&(td->mtx), &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* Initialize the other datas from the test structure */
-		td->status=0;
+		td->status = 0;
 
 /**********
  * Proceed to the actual testing
  */
 		/* Trylock the mutex twice before creating children */
 		ret = pthread_mutex_lock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to lock the mutex");
+		}
 
 		/* Create the children */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We are testing across processes */
 			child_pr = fork();
-			if (child_pr == -1)
-			{  UNRESOLVED(errno, "[parent] Fork failed");  }
+			if (child_pr == -1) {
+				UNRESOLVED(errno, "[parent] Fork failed");
+			}
 
-			if (child_pr == 0)
-			{
-				#if VERBOSE > 3
-				output("[child] Child process is starting...\n");
-				#endif
+			if (child_pr == 0) {
+#if VERBOSE > 3
+				output
+				    ("[child] Child process is starting...\n");
+#endif
 
-				if (tf((void *)td) != NULL)
-				{
-					UNRESOLVED(-1, "[child] Got an unexpected return value from test function");
-				}
-				else
-				{
+				if (tf((void *)td) != NULL) {
+					UNRESOLVED(-1,
+						   "[child] Got an unexpected return value from test function");
+				} else {
 					/* We cannot use the PASSED macro here since it would terminate the output */
-					exit (0);
+					exit(0);
 				}
 			}
 			/* Only the parent process goes further */
-		}
-		else /* do_fork == 0 */
-		{
+		} else {	/* do_fork == 0 */
+
 			/* We are testing across two threads */
 			ret = pthread_create(&child_th, NULL, tf, td);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to create the child thread.");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to create the child thread.");
+			}
 		}
 
 		/* Wait for the child to terminate */
-		if (do_fork != 0)
-		{
+		if (do_fork != 0) {
 			/* We were testing across processes */
 			ret = 0;
 			chkpid = waitpid(child_pr, &status, 0);
-			if (chkpid != child_pr)
-			{
-				output("Expected pid: %i. Got %i\n", (int)child_pr, (int)chkpid);
+			if (chkpid != child_pr) {
+				output("Expected pid: %i. Got %i\n",
+				       (int)child_pr, (int)chkpid);
 				UNRESOLVED(errno, "Waitpid failed");
 			}
-			if (WIFSIGNALED(status))
-			{
-				output("Child process killed with signal %d\n",WTERMSIG(status));
-				UNRESOLVED(-1 , "Child process was killed");
+			if (WIFSIGNALED(status)) {
+				output("Child process killed with signal %d\n",
+				       WTERMSIG(status));
+				UNRESOLVED(-1, "Child process was killed");
 			}
 
-			if (WIFEXITED(status))
-			{
+			if (WIFEXITED(status)) {
 				ret = WEXITSTATUS(status);
-			}
-			else
-			{
-				UNRESOLVED(-1, "Child process was neither killed nor exited");
+			} else {
+				UNRESOLVED(-1,
+					   "Child process was neither killed nor exited");
 			}
 
-			if (ret != 0)
-			{
-				exit(ret); /* Output has already been closed in child */
+			if (ret != 0) {
+				exit(ret);	/* Output has already been closed in child */
 			}
 
-		}
-		else /* child was a thread */
-		{
+		} else {	/* child was a thread */
+
 			ret = pthread_join(child_th, NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to join the thread");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to join the thread");
+			}
 		}
 
 		/* Check the child status */
-		if (td->status != EBUSY)
-		{
-			output("Unexpected return value: %d (%s)\n", td->status, strerror(td->status));
-			FAILED("pthread_mutex_trylock() did not return EBUSY in the child");
+		if (td->status != EBUSY) {
+			output("Unexpected return value: %d (%s)\n", td->status,
+			       strerror(td->status));
+			FAILED
+			    ("pthread_mutex_trylock() did not return EBUSY in the child");
 		}
 
 		/* Unlock the mutex */
-		ret= pthread_mutex_unlock(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+		ret = pthread_mutex_unlock(&(td->mtx));
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock the mutex");
+		}
 
 /**********
  * Destroy the data
  */
 		ret = pthread_mutex_destroy(&(td->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 
-	}  /* Proceed to the next scenario */
+	}			/* Proceed to the next scenario */
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-3.c
index dcadeb8..f55bdc8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-3.c
@@ -25,31 +25,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <semaphore.h>
- #include <signal.h>
+#include <errno.h>
+#include <semaphore.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -80,72 +80,82 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, "Default mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, "Default mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, "Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, "Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, "Pshared Recursive mutex"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
-char do_it=1;
-char woken=0;
-unsigned long count_ope=0;
+char do_it = 1;
+char woken = 0;
+unsigned long count_ope = 0;
 #ifdef WITH_SYNCHRO
 sem_t semsig1;
 sem_t semsig2;
-unsigned long count_sig=0;
+unsigned long count_sig = 0;
 #endif
 
 sigset_t usersigs;
 
-typedef struct
-{
-	int	sig;
+typedef struct {
+	int sig;
 #ifdef WITH_SYNCHRO
-	sem_t	*sem;
+	sem_t *sem;
 #endif
 } thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
 	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
-	process=getpid();
+	process = getpid();
 
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	}
 
-	while (do_it)
-	{
-		#ifdef WITH_SYNCHRO
-		if ((ret = sem_wait(thearg->sem)))
-		{ UNRESOLVED(errno, "Sem_wait in sendsig"); }
+	while (do_it) {
+#ifdef WITH_SYNCHRO
+		if ((ret = sem_wait(thearg->sem))) {
+			UNRESOLVED(errno, "Sem_wait in sendsig");
+		}
 		count_sig++;
-		#endif
+#endif
 
 		ret = kill(process, thearg->sig);
-		if (ret != 0)  { UNRESOLVED(errno, "Kill in sendsig"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Kill in sendsig");
+		}
 
 	}
 	return NULL;
@@ -156,106 +166,147 @@
 void sighdl1(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig1))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 1"); }
+	if (sem_post(&semsig1)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 1");
+	}
 #endif
 }
+
 /* This one is registered for signal SIGUSR2 */
 void sighdl2(int sig)
 {
 #ifdef WITH_SYNCHRO
-	if (sem_post(&semsig2))
-	{ UNRESOLVED(errno, "Sem_post in signal handler 2"); }
+	if (sem_post(&semsig2)) {
+		UNRESOLVED(errno, "Sem_post in signal handler 2");
+	}
 #endif
 }
 
 /* Test function -- This one calls pthread_mutex_trylock and check that no EINTR is returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	int i;
 	long pshared;
-	pthread_mutex_t mtx[NSCENAR+2];
-	pthread_mutexattr_t ma[NSCENAR+1];
+	pthread_mutex_t mtx[NSCENAR + 2];
+	pthread_mutexattr_t ma[NSCENAR + 1];
 
- 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
+	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	}
 
 	/* System abilities */
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 
 	/* Initialize the mutex objects according to the scenarii */
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		ret = pthread_mutexattr_init(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma[i], scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#endif
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma[i], PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
+		if ((pshared > 0) && (scenarii[i].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma[i],
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
 		}
 
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&mtx[i], &ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 	}
 	/* Default mutexattr object */
 	ret = pthread_mutexattr_init(&ma[i]);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Unable to initialize the mutex attribute object");
+	}
 	ret = pthread_mutex_init(&mtx[i], &ma[i]);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Mutex init failed");
+	}
 	/* Default mutex */
-	ret = pthread_mutex_init(&mtx[i+1], NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+	ret = pthread_mutex_init(&mtx[i + 1], NULL);
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Mutex init failed");
+	}
 
 	/* do the real testing */
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 
-		ret = pthread_mutex_trylock(&mtx[count_ope % (NSCENAR+2)]);
-		if (ret == EINTR)  {  FAILED("EINTR was returned");  }
-		if (ret != 0)  {  UNRESOLVED(ret, "1st trylock failed");  }
+		ret = pthread_mutex_trylock(&mtx[count_ope % (NSCENAR + 2)]);
+		if (ret == EINTR) {
+			FAILED("EINTR was returned");
+		}
+		if (ret != 0) {
+			UNRESOLVED(ret, "1st trylock failed");
+		}
 
-		ret = pthread_mutex_trylock(&mtx[count_ope % (NSCENAR+2)]);
-		if (ret == EINTR)  {  FAILED("EINTR was returned");  }
-		if (ret == 0)
-		{
-			ret = pthread_mutex_unlock(&mtx[count_ope % (NSCENAR+2)]);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unlocking the mutex failed");  }
+		ret = pthread_mutex_trylock(&mtx[count_ope % (NSCENAR + 2)]);
+		if (ret == EINTR) {
+			FAILED("EINTR was returned");
+		}
+		if (ret == 0) {
+			ret =
+			    pthread_mutex_unlock(&mtx
+						 [count_ope % (NSCENAR + 2)]);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unlocking the mutex failed");
+			}
 			ret = EBUSY;
 		}
-		if (ret != EBUSY)  {  UNRESOLVED(ret, "Unexpected error was returned.");  }
+		if (ret != EBUSY) {
+			UNRESOLVED(ret, "Unexpected error was returned.");
+		}
 
-		ret = pthread_mutex_unlock(&mtx[count_ope % (NSCENAR+2)]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+		ret = pthread_mutex_unlock(&mtx[count_ope % (NSCENAR + 2)]);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock the mutex");
+		}
 	}
 
 	/* Destroy everything */
-	for (i=0; i <= NSCENAR; i++)
-	{
+	for (i = 0; i <= NSCENAR; i++) {
 		ret = pthread_mutex_destroy(&mtx[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy the mutex");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attr object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attr object");
+		}
 	}
 	ret = pthread_mutex_destroy(&mtx[i]);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to destroy the mutex");
+	}
 
 	return NULL;
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -266,34 +317,43 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler1"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler1");
+	}
 	sa.sa_handler = sighdl2;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler2"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler2");
+	}
 
 	/* We prepare a signal set which includes SIGUSR1 and SIGUSR2 */
 	sigemptyset(&usersigs);
 	ret = sigaddset(&usersigs, SIGUSR1);
 	ret |= sigaddset(&usersigs, SIGUSR2);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
+	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	}
+#ifdef WITH_SYNCHRO
+	if (sem_init(&semsig1, 0, 1)) {
+		UNRESOLVED(errno, "Semsig1  init");
+	}
+	if (sem_init(&semsig2, 0, 1)) {
+		UNRESOLVED(errno, "Semsig2  init");
+	}
+#endif
 
-	#ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{ UNRESOLVED(errno, "Semsig1  init"); }
-	if (sem_init(&semsig2, 0, 1))
-	{ UNRESOLVED(errno, "Semsig2  init"); }
-	#endif
-
-	if ((ret = pthread_create(&th_work, NULL, test, NULL)))
-	{ UNRESOLVED(ret, "Worker thread creation failed"); }
+	if ((ret = pthread_create(&th_work, NULL, test, NULL))) {
+		UNRESOLVED(ret, "Worker thread creation failed");
+	}
 
 	arg1.sig = SIGUSR1;
 	arg2.sig = SIGUSR2;
@@ -302,32 +362,38 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread creation failed"); }
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread creation failed"); }
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
+		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
+	}
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
+		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
+	}
 
 	/* Let's wait for a while now */
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{ UNRESOLVED(ret, "Signal 1 sender thread join failed"); }
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{ UNRESOLVED(ret, "Signal 2 sender thread join failed"); }
+	if ((ret = pthread_join(th_sig1, NULL))) {
+		UNRESOLVED(ret, "Signal 1 sender thread join failed");
+	}
+	if ((ret = pthread_join(th_sig2, NULL))) {
+		UNRESOLVED(ret, "Signal 2 sender thread join failed");
+	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{ UNRESOLVED(ret, "Worker thread join failed"); }
-
-	#if VERBOSE > 0
+	if ((ret = pthread_join(th_work, NULL))) {
+		UNRESOLVED(ret, "Worker thread join failed");
+	}
+#if VERBOSE > 0
 	output("Test executed successfully.\n");
 	output("  %d mutex locks.\n", count_ope);
-	#ifdef WITH_SYNCHRO
+#ifdef WITH_SYNCHRO
 	output("  %d signals were sent meanwhile.\n", count_sig);
-	#endif
-	#endif
+#endif
+#endif
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/1-1.c
index 14b993a..bb1a19c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/1-1.c
@@ -22,33 +22,33 @@
 #include <errno.h>
 #include "posixtest.h"
 
-pthread_mutex_t    mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 int main()
 {
-  	int  rc;
+	int rc;
 
 	/* Get the mutex using pthread_mutex_lock() */
-	if ((rc=pthread_mutex_lock(&mutex)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_lock(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_lock(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Release the mutex using pthread_mutex_unlock() */
-	if ((rc=pthread_mutex_unlock(&mutex)) != 0) {
-        	printf("Test FAILED\n");
+	if ((rc = pthread_mutex_unlock(&mutex)) != 0) {
+		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Get the mutex using pthread_mutex_trylock() */
-	if ((rc=pthread_mutex_trylock(&mutex)) != 0) {
-        	printf("Test FAILED\n");
+	if ((rc = pthread_mutex_trylock(&mutex)) != 0) {
+		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Release the mutex using pthread_mutex_unlock() */
-	if ((rc=pthread_mutex_unlock(&mutex)) != 0) {
-        	printf("Test FAILED\n");
+	if ((rc = pthread_mutex_unlock(&mutex)) != 0) {
+		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/2-1.c
index 1fa3322..6a95408 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/2-1.c
@@ -35,30 +35,32 @@
 
 void *func(void *parm);
 
-pthread_mutex_t    mutex = PTHREAD_MUTEX_INITIALIZER;
-int                value;	/* value protected by mutex */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+int value;			/* value protected by mutex */
 
 int main()
 {
-  	int                   i, rc;
-  	pthread_t             threads[THREAD_NUM];
+	int i, rc;
+	pthread_t threads[THREAD_NUM];
 
-  	/* Create threads */
-  	fprintf(stderr,"Creating %d threads\n", THREAD_NUM);
-  	for (i=0; i<THREAD_NUM; ++i)
-    		rc = pthread_create(&threads[i], NULL, func, NULL);
+	/* Create threads */
+	fprintf(stderr, "Creating %d threads\n", THREAD_NUM);
+	for (i = 0; i < THREAD_NUM; ++i)
+		rc = pthread_create(&threads[i], NULL, func, NULL);
 
 	/* Wait to join all threads */
-  	for (i=0; i<THREAD_NUM; ++i)
-    		pthread_join(threads[i], NULL);
-  	pthread_mutex_destroy(&mutex);
+	for (i = 0; i < THREAD_NUM; ++i)
+		pthread_join(threads[i], NULL);
+	pthread_mutex_destroy(&mutex);
 
-  	/* Check if the final value is as expected */
-  	if (value != (THREAD_NUM) * LOOPS) {
-	  	fprintf(stderr,"Using %d threads and each loops %d times\n", THREAD_NUM, LOOPS);
-    		fprintf(stderr,"Final value must be %d instead of %d\n", (THREAD_NUM)*LOOPS, value);
+	/* Check if the final value is as expected */
+	if (value != (THREAD_NUM) * LOOPS) {
+		fprintf(stderr, "Using %d threads and each loops %d times\n",
+			THREAD_NUM, LOOPS);
+		fprintf(stderr, "Final value must be %d instead of %d\n",
+			(THREAD_NUM) * LOOPS, value);
 		return PTS_UNRESOLVED;
-  	}
+	}
 
 	printf("Test PASSED\n");
 	return PTS_PASS;
@@ -66,33 +68,35 @@
 
 void *func(void *parm)
 {
-  	int   i, tmp;
-  	int   rc = 0;
-  	pthread_t  self = pthread_self();
+	int i, tmp;
+	int rc = 0;
+	pthread_t self = pthread_self();
 
 	/* Loopd M times to acquire the mutex, increase the value,
 	   and then release the mutex. */
 
-  	for (i=0; i<LOOPS; ++i) {
-      		rc = pthread_mutex_lock(&mutex);
-      		if (rc!=0) {
-        		fprintf(stderr,"Error on pthread_mutex_lock(), rc=%d\n", rc);
-			return (void*)(PTS_UNRESOLVED);
-      		}
+	for (i = 0; i < LOOPS; ++i) {
+		rc = pthread_mutex_lock(&mutex);
+		if (rc != 0) {
+			fprintf(stderr,
+				"Error on pthread_mutex_lock(), rc=%d\n", rc);
+			return (void *)(PTS_UNRESOLVED);
+		}
 
-    		tmp = value;
-    		tmp = tmp+1;
-    		fprintf(stderr,"Thread(0x%p) holds the mutex\n",(void*)self);
-    		usleep(1000);	  /* delay the increasement operation */
-    		value = tmp;
+		tmp = value;
+		tmp = tmp + 1;
+		fprintf(stderr, "Thread(0x%p) holds the mutex\n", (void *)self);
+		usleep(1000);	/* delay the increasement operation */
+		value = tmp;
 
-      		rc = pthread_mutex_unlock(&mutex);
-      		if (rc!=0) {
-        		fprintf(stderr,"Error on pthread_mutex_unlock(), rc=%d\n", rc);
- 			return (void*)(PTS_UNRESOLVED);
-      		}
-    		sleep(1);
-  	}
-  	pthread_exit(0);
-  	return (void*)(0);
+		rc = pthread_mutex_unlock(&mutex);
+		if (rc != 0) {
+			fprintf(stderr,
+				"Error on pthread_mutex_unlock(), rc=%d\n", rc);
+			return (void *)(PTS_UNRESOLVED);
+		}
+		sleep(1);
+	}
+	pthread_exit(0);
+	return (void *)(0);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/3-1.c
index c510e61..6c941fe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/3-1.c
@@ -17,37 +17,36 @@
 
 int main()
 {
-	pthread_mutex_t  mutex;
+	pthread_mutex_t mutex;
 	int rc;
 
 	/* Initialize a mutex object */
-	if ((rc=pthread_mutex_init(&mutex,NULL)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_init(&mutex, NULL)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_init(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc=pthread_mutex_lock(&mutex)) != 0) {
-		fprintf(stderr,"Error at pthread_mutex_lock(), rc=%d\n",rc);
+	if ((rc = pthread_mutex_lock(&mutex)) != 0) {
+		fprintf(stderr, "Error at pthread_mutex_lock(), rc=%d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Release the mutex using pthread_mutex_unlock() */
-	if ((rc=pthread_mutex_unlock(&mutex)) == 0) {
+	if ((rc = pthread_mutex_unlock(&mutex)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Check if returned values are tolerable */
 	else if (rc == EPERM) {
-		fprintf(stderr,"Current thread does not own the mutex\n");
+		fprintf(stderr, "Current thread does not own the mutex\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EINVAL) {
-		fprintf(stderr,"Invalid mutex object\n");
+	} else if (rc == EINVAL) {
+		fprintf(stderr, "Invalid mutex object\n");
 		return PTS_UNRESOLVED;
-	}
-	else if (rc == EAGAIN) {
-		fprintf(stderr,"The maximum number of recursive locks has been exceeded\n");
+	} else if (rc == EAGAIN) {
+		fprintf(stderr,
+			"The maximum number of recursive locks has been exceeded\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-1.c
index e4d51cd..99a89a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-1.c
@@ -32,28 +32,28 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
 
- #include <errno.h> /* needed for EPERM test */
+#include <errno.h>		/* needed for EPERM test */
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -86,83 +86,91 @@
 pthread_mutex_t m;
 
 /** child thread function **/
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	ret = pthread_mutex_unlock(&m);
-	if (ret == 0)
-	{  UNRESOLVED(ret, "Unlocking a not owned recursive mutex succeeded");  }
+	if (ret == 0) {
+		UNRESOLVED(ret,
+			   "Unlocking a not owned recursive mutex succeeded");
+	}
 
-	if (ret != EPERM) /* This is a "may" assertion */
-		output("Unlocking a not owned recursive mutex did not return EPERM\n");
+	if (ret != EPERM)	/* This is a "may" assertion */
+		output
+		    ("Unlocking a not owned recursive mutex did not return EPERM\n");
 
 	return NULL;
 }
 
 /** parent thread function **/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_mutexattr_t ma;
-	pthread_t  th;
+	pthread_t th;
 
 	output_init();
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Initialize the PTHREAD_MUTEX_RECURSIVE mutex\n");
-	#endif
+#endif
 
 	ret = pthread_mutexattr_init(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex attribute init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex attribute init failed");
+	}
 
 	ret = pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Set type recursive failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Set type recursive failed");
+	}
 
 	ret = pthread_mutex_init(&m, &ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex init failed");  }
-
-	#if VERBOSE >1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex init failed");
+	}
+#if VERBOSE >1
 	output("Lock the mutex\n");
-	#endif
+#endif
 
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex lock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex lock failed");
+	}
 
 	/* destroy the mutex attribute object */
 	ret = pthread_mutexattr_destroy(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex attribute destroy failed");  }
-
-	#if VERBOSE >1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex attribute destroy failed");
+	}
+#if VERBOSE >1
 	output("Create the thread\n");
-	#endif
+#endif
 
 	ret = pthread_create(&th, NULL, threaded, NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Thread creation failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread creation failed");
+	}
 
 	/* Let the thread terminate */
 	ret = pthread_join(th, NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Thread join failed");  }
-
-	#if VERBOSE >1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread join failed");
+	}
+#if VERBOSE >1
 	output("Joined the thread\n");
-	#endif
+#endif
 
 	/* We can clean everything and exit */
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex unlock failed. Mutex got corrupted?");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex unlock failed. Mutex got corrupted?");
+	}
 
 	PASSED;
 }
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-2.c
index fdb08fb..08312a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_unlock/5-2.c
@@ -33,26 +33,26 @@
   */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.h"
+#include "../testfrmw/testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -83,7 +83,7 @@
 /********************************************************************************************/
 
 /** parent thread function **/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_mutexattr_t ma;
@@ -91,60 +91,68 @@
 
 	output_init();
 
-	#if VERBOSE >1
+#if VERBOSE >1
 	output("Initialize the PTHREAD_MUTEX_RECURSIVE mutex\n");
-	#endif
+#endif
 
 	ret = pthread_mutexattr_init(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex attribute init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex attribute init failed");
+	}
 
 	ret = pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Set type recursive failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Set type recursive failed");
+	}
 
 	ret = pthread_mutex_init(&m, &ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex init failed");  }
-
-	#if VERBOSE >1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex init failed");
+	}
+#if VERBOSE >1
 	output("Unlock unlocked mutex\n");
-	#endif
+#endif
 
 	ret = pthread_mutex_unlock(&m);
-	if (ret == 0)
-	{  FAILED("Unlocking an unlocked recursive mutex succeeded");  }
-
-	#if VERBOSE >1
+	if (ret == 0) {
+		FAILED("Unlocking an unlocked recursive mutex succeeded");
+	}
+#if VERBOSE >1
 	output("Lock and unlock the mutex\n");
-	#endif
+#endif
 
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex lock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex lock failed");
+	}
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex recursive lock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex recursive lock failed");
+	}
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex unlock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex unlock failed");
+	}
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex recursive unlock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex recursive unlock failed");
+	}
 
 	/* destroy the mutex attribute object */
 	ret = pthread_mutexattr_destroy(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex attribute destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex attribute destroy failed");
+	}
 
 	ret = pthread_mutex_unlock(&m);
-	if (ret == 0)
-	{  FAILED("Unlocking an unlocked recursive mutex succeeded");  }
+	if (ret == 0) {
+		FAILED("Unlocking an unlocked recursive mutex succeeded");
+	}
 
 	PASSED;
 }
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/1-1.c
index cab6d3f..5c34d67 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/1-1.c
@@ -25,16 +25,15 @@
 	int rc;
 
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) != 0)
-	{
-		fprintf(stderr,"Cannot initialize mutex attributes object\n");
+	if ((rc = pthread_mutexattr_init(&mta)) != 0) {
+		fprintf(stderr, "Cannot initialize mutex attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the mutex attributes object */
-	if (pthread_mutexattr_destroy(&mta) != 0)
-	{
-		fprintf(stderr,"Error at pthread_mutexattr_destroy(), rc=%d\n", rc);
+	if (pthread_mutexattr_destroy(&mta) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_destroy(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/2-1.c
index 6233459..bc4339f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/2-1.c
@@ -28,27 +28,22 @@
 	pthread_mutexattr_t mta;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
-		fprintf(stderr,"Cannot initialize mutex attributes object\n");
+	if (pthread_mutexattr_init(&mta) != 0) {
+		fprintf(stderr, "Cannot initialize mutex attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the mutex attributes object */
-	if (pthread_mutexattr_destroy(&mta) != 0)
-	{
-		fprintf(stderr,"Cannot destroy the mutex attributes object\n");
+	if (pthread_mutexattr_destroy(&mta) != 0) {
+		fprintf(stderr, "Cannot destroy the mutex attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize the mutex attributes object again.  This shouldn't result in an error. */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/3-1.c
index c0a6464..c6602db 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/3-1.c
@@ -26,20 +26,16 @@
 	pthread_mutexattr_t mta;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
-		fprintf(stderr,"Cannot initialize mutex attributes object\n");
+	if (pthread_mutexattr_init(&mta) != 0) {
+		fprintf(stderr, "Cannot initialize mutex attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the mutex attributes object */
-	if (pthread_mutexattr_destroy(&mta) != 0)
-	{
+	if (pthread_mutexattr_destroy(&mta) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c
index 4335c1f..bf73fb0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c
@@ -22,19 +22,18 @@
 
 int main()
 {
-	pthread_mutexattr_t *mta=NULL;
+	pthread_mutexattr_t *mta = NULL;
 	int rc;
 
 	/* Try to destroy a NULL mutex attributes object using pthread_mutexattr_destroy()
 	 * It should return EINVAL */
-	if ((rc=pthread_mutexattr_destroy(mta)) == EINVAL)
-	{
+	if ((rc = pthread_mutexattr_destroy(mta)) == EINVAL) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
-		printf("Test PASSED: *NOTE: Expect %d(EINVAL), but return %d, though standard states 'may' fail\n", EINVAL, rc);
+	} else {
+		printf
+		    ("Test PASSED: *NOTE: Expect %d(EINVAL), but return %d, though standard states 'may' fail\n",
+		     EINVAL, rc);
 		return PTS_PASS;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c
index c55a9b3..34eabfe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c
@@ -22,8 +22,7 @@
 #include <string.h>
 #include "posixtest.h"
 
-static void
-print_pthread_error(const char *fname, int ret)
+static void print_pthread_error(const char *fname, int ret)
 {
 	printf("Unexpected error at %s(): %s\n", fname, strerror(ret));
 }
@@ -33,9 +32,9 @@
 
 	/* Make sure there is prioceiling capability. */
 	/* #ifndef _POSIX_PRIORITY_SCHEDULING
-	  fprintf(stderr,"prioceiling attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif */
+	   fprintf(stderr,"prioceiling attribute is not available for testing\n");
+	   return PTS_UNRESOLVED;
+	   #endif */
 
 	pthread_mutexattr_t ma;
 	int prioceiling, max_prio, min_prio, ret;
@@ -65,9 +64,10 @@
 	min_prio = sched_get_priority_min(SCHED_FIFO);
 
 	/* Ensure that prioceiling is within legal limits. */
-	if ((prioceiling < min_prio) || (prioceiling > max_prio))
-	{
-		printf("Test FAILED: Default prioceiling %d is not compliant with SCHED_FIFO boundary.\n", prioceiling);
+	if ((prioceiling < min_prio) || (prioceiling > max_prio)) {
+		printf
+		    ("Test FAILED: Default prioceiling %d is not compliant with SCHED_FIFO boundary.\n",
+		     prioceiling);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-2.c
index c176c4d..cdf4f59 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-2.c
@@ -28,16 +28,15 @@
 
 	/* Make sure there is prioceiling capability. */
 	/* #ifndef _POSIX_PRIORITY_SCHEDULING
-	  fprintf(stderr,"prioceiling attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif */
+	   fprintf(stderr,"prioceiling attribute is not available for testing\n");
+	   return PTS_UNRESOLVED;
+	   #endif */
 
 	pthread_mutexattr_t mta;
 	int prioceiling, max_prio, min_prio, i;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -46,27 +45,25 @@
 	max_prio = sched_get_priority_max(SCHED_FIFO);
 	min_prio = sched_get_priority_min(SCHED_FIFO);
 
-	for (i=min_prio;(i<max_prio+1);i++)
-	{
+	for (i = min_prio; (i < max_prio + 1); i++) {
 		/* Set the prioceiling to a priority number in the boundries
 		 * of SCHED_FIFO policy */
-		if (pthread_mutexattr_setprioceiling(&mta,i))
-		{
+		if (pthread_mutexattr_setprioceiling(&mta, i)) {
 			printf("Error setting prioceiling to %d\n", i);
 			return PTS_UNRESOLVED;
 		}
 
 		/* Get the prioceiling mutex attr. */
-		if (pthread_mutexattr_getprioceiling(&mta, &prioceiling) != 0)
-		{
-			fprintf(stderr,"Error obtaining the attribute process-shared\n");
+		if (pthread_mutexattr_getprioceiling(&mta, &prioceiling) != 0) {
+			fprintf(stderr,
+				"Error obtaining the attribute process-shared\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Make sure that prioceiling is withing the legal SCHED_FIFO boundries. */
-		if (prioceiling != i)
-		{
-			printf("Test FAILED: Set prioceiling and get prioceiling did not match.\n");
+		if (prioceiling != i) {
+			printf
+			    ("Test FAILED: Set prioceiling and get prioceiling did not match.\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/3-1.c
index 8b82802..d26d8b8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/3-1.c
@@ -33,14 +33,15 @@
 	pthread_mutexattr_t mta;
 
 	/* Get the prioceiling of an unintialized mutex attr. */
-	if ((ret=pthread_mutexattr_getprioceiling(&mta, &prioceiling)) == 0)
-	{
-		printf("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an uninitialized mutex attribute object to pthread_mutexattr_getprioceiling, but standard says 'may' fail.\n");
+	if ((ret = pthread_mutexattr_getprioceiling(&mta, &prioceiling)) == 0) {
+		printf
+		    ("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an uninitialized mutex attribute object to pthread_mutexattr_getprioceiling, but standard says 'may' fail.\n");
 		return PTS_PASS;
 
-	}else if (ret != EINVAL)
-	{
-		printf("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n", ret);
+	} else if (ret != EINVAL) {
+		printf
+		    ("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-1.c
index d5fab8f..e573d9d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-1.c
@@ -25,19 +25,19 @@
 {
 
 	pthread_mutexattr_t mta;
-	int protocol,rc;
+	int protocol, rc;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Get the protocol mutex attr. */
-	if ((rc=pthread_mutexattr_getprotocol(&mta, &protocol)) != 0)
-	{
-		printf("Test FAILED: Error in pthread_mutexattr_getprotocol rc=%d\n", rc);
+	if ((rc = pthread_mutexattr_getprotocol(&mta, &protocol)) != 0) {
+		printf
+		    ("Test FAILED: Error in pthread_mutexattr_getprotocol rc=%d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-2.c
index 8b760cc..49484fe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-2.c
@@ -21,40 +21,38 @@
 {
 
 	pthread_mutexattr_t mta;
-	int protocol, protcls[3],i;
+	int protocol, protcls[3], i;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	protcls[0]=PTHREAD_PRIO_NONE;
-	protcls[1]=PTHREAD_PRIO_INHERIT;
-	protcls[2]=PTHREAD_PRIO_PROTECT;
+	protcls[0] = PTHREAD_PRIO_NONE;
+	protcls[1] = PTHREAD_PRIO_INHERIT;
+	protcls[2] = PTHREAD_PRIO_PROTECT;
 
-	for (i=0;i<3;i++)
-	{
+	for (i = 0; i < 3; i++) {
 		/* Set the protocol to one of the 3 valid protocols. */
-		if (pthread_mutexattr_setprotocol(&mta,protcls[i]))
-		{
+		if (pthread_mutexattr_setprotocol(&mta, protcls[i])) {
 			printf("Error setting protocol to %d\n", protcls[i]);
 			return PTS_UNRESOLVED;
 		}
 
 		/* Get the protocol mutex attr. */
-		if (pthread_mutexattr_getprotocol(&mta, &protocol) != 0)
-		{
-			fprintf(stderr,"Error obtaining the protocol attribute.\n");
+		if (pthread_mutexattr_getprotocol(&mta, &protocol) != 0) {
+			fprintf(stderr,
+				"Error obtaining the protocol attribute.\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Make sure that the protocol set is the protocl we get when calling
 		 * pthread_mutexattr_getprocol() */
-		if (protocol != protcls[i])
-		{
-			printf("Test FAILED: Set protocol %d, but instead got protocol %d.\n", protcls[i], protocol);
+		if (protocol != protcls[i]) {
+			printf
+			    ("Test FAILED: Set protocol %d, but instead got protocol %d.\n",
+			     protcls[i], protocol);
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-1.c
index df92332..08b5d27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-1.c
@@ -24,31 +24,31 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_mutexattr_t mta;
 	int pshared;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Incorrect default pshared value: %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Incorrect default pshared value: %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-2.c
index c66fddf..c7e3fd5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-2.c
@@ -26,39 +26,38 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 	int pshared;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set 'pshared' to PTHREAD_PROCESS_SHARED. */
-	ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED);
-	if (ret != 0)
-	{
-		printf("Error in pthread_mutexattr_setpshared(), error: %d\n", ret);
+	ret = pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED);
+	if (ret != 0) {
+		printf("Error in pthread_mutexattr_setpshared(), error: %d\n",
+		       ret);
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Get 'pshared'.  */
-	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	/* Get 'pshared'.  */
+	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_SHARED)
-	{
+	if (pshared != PTHREAD_PROCESS_SHARED) {
 		printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-3.c
index 22f5e2e..96d9ce3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-3.c
@@ -26,39 +26,38 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 	int pshared;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set 'pshared' to PTHREAD_PROCESS_PRIVATE. */
-	ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
-	if (ret != 0)
-	{
-		printf("Error in pthread_mutexattr_setpshared(), error: %d\n", ret);
+	ret = pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
+	if (ret != 0) {
+		printf("Error in pthread_mutexattr_setpshared(), error: %d\n",
+		       ret);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Get 'pshared'.  It should be PTHREAD_PROCESS_PRIVATE. */
-	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
 		printf("Test FAILED: Incorrect pshared value: %d\n", pshared);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/3-1.c
index 49e64de..7efb5c1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/3-1.c
@@ -27,33 +27,35 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 	int pshared;
 
-	/* Pass the uninitialized and invalid 'attr' object.*/
+	/* Pass the uninitialized and invalid 'attr' object. */
 	memset(&mta, 0, sizeof(mta));
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
-	ret=pthread_mutexattr_getpshared(&mta, &pshared);
-	if (ret != 0)
-	{
-		if (ret == EINVAL)
-		{
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	ret = pthread_mutexattr_getpshared(&mta, &pshared);
+	if (ret != 0) {
+		if (ret == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Incorrect return code. Expected 0 or EINVAL, got: %d\n", ret);
+		printf
+		    ("Test FAILED: Incorrect return code. Expected 0 or EINVAL, got: %d\n",
+		     ret);
 		return PTS_FAIL;
 
 	}
 
-	printf("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
-       	return PTS_PASS;
+	printf
+	    ("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-1.c
index 232810a..39e5c53 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-1.c
@@ -31,22 +31,22 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'type' attribute should be PTHREAD_MUTEX_DEFAULT  */
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
+	/* The default 'type' attribute should be PTHREAD_MUTEX_DEFAULT  */
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_DEFAULT)
-	{
-		printf("Test FAILED: Incorrect default mutexattr 'type' value: %d\n", type);
+	if (type != PTHREAD_MUTEX_DEFAULT) {
+		printf
+		    ("Test FAILED: Incorrect default mutexattr 'type' value: %d\n",
+		     type);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-2.c
index ac32f16..88e814c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-2.c
@@ -32,29 +32,29 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the mutex attribute 'type' to PTHREAD_MUTEX_DEFAULT. */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_DEFAULT) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_DEFAULT) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The 'type' attribute should be PTHREAD_MUTEX_DEFAULT  */
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
+	/* The 'type' attribute should be PTHREAD_MUTEX_DEFAULT  */
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_DEFAULT)
-	{
-		printf("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_DEFAULT\n", type);
+	if (type != PTHREAD_MUTEX_DEFAULT) {
+		printf
+		    ("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_DEFAULT\n",
+		     type);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-3.c
index 7b9f004..f1bf355 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-3.c
@@ -32,29 +32,29 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the mutex attribute 'type' to PTHREAD_MUTEX_NORMAL. */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The 'type' attribute should be PTHREAD_MUTEX_NORMAL  */
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
+	/* The 'type' attribute should be PTHREAD_MUTEX_NORMAL  */
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_NORMAL)
-	{
-		printf("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_NORMAL\n", type);
+	if (type != PTHREAD_MUTEX_NORMAL) {
+		printf
+		    ("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_NORMAL\n",
+		     type);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-4.c
index c07d0a5..a7173d8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-4.c
@@ -32,29 +32,29 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the mutex attribute 'type' to PTHREAD_MUTEX_ERRORCHECK. */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The 'type' attribute should be PTHREAD_MUTEX_ERRORCHECK  */
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
+	/* The 'type' attribute should be PTHREAD_MUTEX_ERRORCHECK  */
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_ERRORCHECK)
-	{
-		printf("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_ERRORCHECK\n", type);
+	if (type != PTHREAD_MUTEX_ERRORCHECK) {
+		printf
+		    ("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_ERRORCHECK\n",
+		     type);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-5.c
index 0d797ba..8e0601d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/1-5.c
@@ -32,29 +32,29 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the mutex attribute 'type' to PTHREAD_MUTEX_RECURSIVE. */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_settype(): Error setting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The 'type' attribute should be PTHREAD_MUTEX_RECURSIVE  */
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
-		fprintf(stderr,"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
+	/* The 'type' attribute should be PTHREAD_MUTEX_RECURSIVE  */
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
+		fprintf(stderr,
+			"pthread_mutexattr_gettype(): Error obtaining the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_RECURSIVE)
-	{
-		printf("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_RECURSIVE\n", type);
+	if (type != PTHREAD_MUTEX_RECURSIVE) {
+		printf
+		    ("Test FAILED: Incorrect mutexattr 'type' value: %d. Should be PTHREAD_MUTEX_RECURSIVE\n",
+		     type);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/speculative/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/speculative/3-1.c
index 50b351a..b630a76 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/speculative/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_gettype/speculative/3-1.c
@@ -34,12 +34,13 @@
 	/* Make 'attr' invalid by not initializing it and using memset. */
 	memset(&mta, 0, sizeof(mta));
 
-	 /* Pass an invalid 'attr'.  */
-	ret=pthread_mutexattr_gettype(&mta, &type);
+	/* Pass an invalid 'attr'.  */
+	ret = pthread_mutexattr_gettype(&mta, &type);
 
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Incorrect return code.  Expected EINVAL, but got: %d\n", ret);
+	if (ret != EINVAL) {
+		printf
+		    ("Test FAILED: Incorrect return code.  Expected EINVAL, but got: %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/1-1.c
index 8d2e2c8..62b8636 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/1-1.c
@@ -29,35 +29,32 @@
 	int pshared;
 #endif
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) != 0)
-	{
-		fprintf(stderr,"Error at pthread_mutexattr_init(), rc=%d\n",rc);
+	if ((rc = pthread_mutexattr_init(&mta)) != 0) {
+		fprintf(stderr, "Error at pthread_mutexattr_init(), rc=%d\n",
+			rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
-
 #ifdef PTHREAD_PROCESS_SHARED
 	/* If the symbol {PTHREAD_PROCESS_SHARED} is defined, the attribute
 	 * process-shared should be provided and its default value should be
 	 * PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared == PTHREAD_PROCESS_PRIVATE)
-	{
+	if (pshared == PTHREAD_PROCESS_PRIVATE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 #endif
 
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/3-1.c
index 11f46a3..766dd7b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/3-1.c
@@ -25,22 +25,19 @@
 	int rc;
 
 	/* Initialize a mutex attributes object */
-	if ((rc=pthread_mutexattr_init(&mta)) == 0)
-	{
+	if ((rc = pthread_mutexattr_init(&mta)) == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	/* Insufficient memory exists to initialize the mutex attributes object */
-	else if (rc == ENOMEM)
-	{
-		fprintf(stderr,"pthread_mutexattr_init() returns ENOMEM\n");
+	else if (rc == ENOMEM) {
+		fprintf(stderr, "pthread_mutexattr_init() returns ENOMEM\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Any other returned value means the test failed */
-	else
-	{
+	else {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/1-1.c
index 79bb04b..83118b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/1-1.c
@@ -27,16 +27,15 @@
 
 	/* Make sure there is prioceiling capability. */
 	/* #ifndef _POSIX_PRIORITY_SCHEDULING
-	  fprintf(stderr,"prioceiling attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif */
+	   fprintf(stderr,"prioceiling attribute is not available for testing\n");
+	   return PTS_UNRESOLVED;
+	   #endif */
 
 	pthread_mutexattr_t mta;
 	int max_prio, min_prio, i;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -45,13 +44,12 @@
 	max_prio = sched_get_priority_max(SCHED_FIFO);
 	min_prio = sched_get_priority_min(SCHED_FIFO);
 
-	for (i=min_prio;(i<max_prio+1);i++)
-	{
+	for (i = min_prio; (i < max_prio + 1); i++) {
 		/* Set the prioceiling to a priority number in the boundries
 		 * of SCHED_FIFO policy */
-		if (pthread_mutexattr_setprioceiling(&mta,i))
-		{
-			printf("Test FAILED: Error setting prioceiling to %d\n", i);
+		if (pthread_mutexattr_setprioceiling(&mta, i)) {
+			printf("Test FAILED: Error setting prioceiling to %d\n",
+			       i);
 			return PTS_FAIL;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-1.c
index 9e03b4f..8c98e80 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-1.c
@@ -29,9 +29,9 @@
 
 	/* Make sure there is prioceiling capability. */
 	/* #ifndef _POSIX_PRIORITY_SCHEDULING
-	  fprintf(stderr,"prioceiling attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif */
+	   fprintf(stderr,"prioceiling attribute is not available for testing\n");
+	   return PTS_UNRESOLVED;
+	   #endif */
 
 	pthread_mutexattr_t mta;
 	int prioceiling, ret;
@@ -39,15 +39,16 @@
 	prioceiling = sched_get_priority_min(SCHED_FIFO);
 
 	/* Set the prioceiling of an unintialized mutex attr. */
-	if ((ret=pthread_mutexattr_setprioceiling(&mta,prioceiling)) == 0)
-	{
-		printf("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an uninitialized mutex attribute object to pthread_mutexattr_setprioceiling, but standard says 'may' fail.\n");
+	if ((ret = pthread_mutexattr_setprioceiling(&mta, prioceiling)) == 0) {
+		printf
+		    ("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an uninitialized mutex attribute object to pthread_mutexattr_setprioceiling, but standard says 'may' fail.\n");
 		return PTS_PASS;
 	}
 
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n", ret);
+	if (ret != EINVAL) {
+		printf
+		    ("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-2.c
index d7ad145..1e432ee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprioceiling/3-2.c
@@ -29,9 +29,9 @@
 
 	/* Make sure there is prioceiling capability. */
 	/* #ifndef _POSIX_PRIORITY_SCHEDULING
-	  fprintf(stderr,"prioceiling attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif */
+	   fprintf(stderr,"prioceiling attribute is not available for testing\n");
+	   return PTS_UNRESOLVED;
+	   #endif */
 
 	pthread_mutexattr_t mta;
 	int prioceiling, ret;
@@ -41,15 +41,16 @@
 	prioceiling++;
 
 	/* Set the prioceiling to an invalid prioceiling. */
-	if ((ret=pthread_mutexattr_setprioceiling(&mta,prioceiling)) == 0)
-	{
-		printf("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an invalid 'proceiling' to pthread_mutexattr_setprioceiling, but standard says 'may' fail.\n");
+	if ((ret = pthread_mutexattr_setprioceiling(&mta, prioceiling)) == 0) {
+		printf
+		    ("Test PASSED: *Note: Returned 0 instead of EINVAL when passed an invalid 'proceiling' to pthread_mutexattr_setprioceiling, but standard says 'may' fail.\n");
 		return PTS_PASS;
 	}
 
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n", ret);
+	if (ret != EINVAL) {
+		printf
+		    ("Test FAILED: Invalid return code %d. Expected EINVAL or 0.\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/1-1.c
index 499af9c..02eeee3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/1-1.c
@@ -25,40 +25,38 @@
 {
 
 	pthread_mutexattr_t mta;
-	int protocol, protcls[3],i;
+	int protocol, protcls[3], i;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	protcls[0]=PTHREAD_PRIO_NONE;
-	protcls[1]=PTHREAD_PRIO_INHERIT;
-	protcls[2]=PTHREAD_PRIO_PROTECT;
+	protcls[0] = PTHREAD_PRIO_NONE;
+	protcls[1] = PTHREAD_PRIO_INHERIT;
+	protcls[2] = PTHREAD_PRIO_PROTECT;
 
-	for (i=0;i<3;i++)
-	{
+	for (i = 0; i < 3; i++) {
 		/* Set the protocol to one of the 3 valid protocols. */
-		if (pthread_mutexattr_setprotocol(&mta,protcls[i]) != 0)
-		{
+		if (pthread_mutexattr_setprotocol(&mta, protcls[i]) != 0) {
 			printf("Error setting protocol to %d\n", protcls[i]);
 			return PTS_UNRESOLVED;
 		}
 
 		/* Get the protocol mutex attr. */
-		if (pthread_mutexattr_getprotocol(&mta, &protocol) != 0)
-		{
-			fprintf(stderr,"Error obtaining the protocol attribute.\n");
+		if (pthread_mutexattr_getprotocol(&mta, &protocol) != 0) {
+			fprintf(stderr,
+				"Error obtaining the protocol attribute.\n");
 			return PTS_UNRESOLVED;
 		}
 
 		/* Make sure that the protocol set is the protocl we get when calling
 		 * pthread_mutexattr_getprocol() */
-		if (protocol != protcls[i])
-		{
-			printf("Test FAILED: Set protocol %d, but instead got protocol %d.\n", protcls[i], protocol);
+		if (protocol != protcls[i]) {
+			printf
+			    ("Test FAILED: Set protocol %d, but instead got protocol %d.\n",
+			     protcls[i], protocol);
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-1.c
index aea6829..4af9ba9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-1.c
@@ -30,26 +30,25 @@
 	int ret;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	while (protocol == PTHREAD_PRIO_NONE || protocol == PTHREAD_PRIO_INHERIT
-		|| protocol == PTHREAD_PRIO_PROTECT) {
+	       || protocol == PTHREAD_PRIO_PROTECT) {
 		protocol--;
 	}
 
 	/* Set the protocol to an invalid value. */
-	ret = pthread_mutexattr_setprotocol(&mta,protocol);
-	if ((ret == ENOTSUP) || (ret == EINVAL))
-	{
+	ret = pthread_mutexattr_setprotocol(&mta, protocol);
+	if ((ret == ENOTSUP) || (ret == EINVAL)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else{
+	} else {
 
-		printf("Test FAILED: Expected error code ENOTSUP, got %d.\n", ret);
+		printf("Test FAILED: Expected error code ENOTSUP, got %d.\n",
+		       ret);
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-2.c
index 8091960..a73f6ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setprotocol/3-2.c
@@ -27,16 +27,19 @@
 	int ret;
 
 	/* Set the protocol to an invalid value. */
-	ret = pthread_mutexattr_setprotocol(&mta,PTHREAD_PRIO_NONE);
-	if (ret == EINVAL)
-	{
+	ret = pthread_mutexattr_setprotocol(&mta, PTHREAD_PRIO_NONE);
+	if (ret == EINVAL) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (ret == 0) {
-		printf("Test PASSED: NOTE*: Expected error code EINVAL, got %d, though standard states 'may' fail.\n", ret);
+		printf
+		    ("Test PASSED: NOTE*: Expected error code EINVAL, got %d, though standard states 'may' fail.\n",
+		     ret);
 		return PTS_PASS;
 	} else {
-		printf("Test FAILED: Incorrect return code %d.  Expected EINVAL or 0.\n", ret);
+		printf
+		    ("Test FAILED: Incorrect return code %d.  Expected EINVAL or 0.\n",
+		     ret);
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-1.c
index ca0e328..18352e8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-1.c
@@ -45,23 +45,27 @@
 	int ret;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Set the 'pshared' attribute to PTHREAD_PROCESS_PRIVATE */
-	if ((ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE)) != 0)
-	{
-		printf("Test FAILED: Cannot set pshared attribute to PTHREAD_PROCESS_PRIVATE. Error: %d\n", ret);
+	if ((ret =
+	     pthread_mutexattr_setpshared(&mta,
+					  PTHREAD_PROCESS_PRIVATE)) != 0) {
+		printf
+		    ("Test FAILED: Cannot set pshared attribute to PTHREAD_PROCESS_PRIVATE. Error: %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
 	/* Set the 'pshared' attribute to PTHREAD_PROCESS_SHARED */
-	if ((ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED)) != 0)
-	{
-		printf("Test FAILED: Cannot set pshared attribute to PTHREAD_PROCESS_SHARED. Error code: %d\n", ret);
+	if ((ret =
+	     pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED)) != 0) {
+		printf
+		    ("Test FAILED: Cannot set pshared attribute to PTHREAD_PROCESS_SHARED. Error code: %d\n",
+		     ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-2.c
index 31480fa..d9adb69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/1-2.c
@@ -24,32 +24,32 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNRESOLVED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNRESOLVED;
+#endif
 
 	pthread_mutexattr_t mta;
 	int pshared;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0)
-	{
-		fprintf(stderr,"Error obtaining the attribute process-shared\n");
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	if (pthread_mutexattr_getpshared(&mta, &pshared) != 0) {
+		fprintf(stderr,
+			"Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure that the default is PTHREAD_PROCESS_PRIVATE. */
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Incorrect default pshared value: %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Incorrect default pshared value: %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-1.c
index c91d076..ab36b20 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-1.c
@@ -24,25 +24,24 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
-	ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
-	if (ret != 0)
-	{
+	/* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
+	ret = pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
+	if (ret != 0) {
 		printf("Test FAILED: Expected return code 0, got: %d", ret);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-2.c
index 949f770..24f0e27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/2-2.c
@@ -24,25 +24,24 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
-	ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED);
-	if (ret != 0)
-	{
+	/* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
+	ret = pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED);
+	if (ret != 0) {
 		printf("Test FAILED: Expected return code 0, got: %d\n", ret);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-1.c
index 6752684..321872d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-1.c
@@ -27,29 +27,30 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 
-	 /* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
-	ret=pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
-	if (ret != 0)
-	{
-		if (ret == EINVAL)
-		{
+	/* Set the attribute to PTHREAD_PROCESS_PRIVATE.  */
+	ret = pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_PRIVATE);
+	if (ret != 0) {
+		if (ret == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Expected return code 0 or EINVAL, got: %d", ret);
+		printf("Test FAILED: Expected return code 0 or EINVAL, got: %d",
+		       ret);
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
-       	return PTS_PASS;
+	printf
+	    ("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
+	return PTS_PASS;
 
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-2.c
index e3b2fa2..d47f604 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_setpshared/3-2.c
@@ -30,29 +30,30 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNRESOLVED;
-	#endif
+#endif
 
 	pthread_mutexattr_t mta;
 	int ret;
 
-	 /* Set the attribute to INVALID_PSHARED_VALUE.  */
-	ret=pthread_mutexattr_setpshared(&mta, INVALID_PSHARED_VALUE);
-	if (ret != 0)
-	{
-		if (ret == EINVAL)
-		{
+	/* Set the attribute to INVALID_PSHARED_VALUE.  */
+	ret = pthread_mutexattr_setpshared(&mta, INVALID_PSHARED_VALUE);
+	if (ret != 0) {
+		if (ret == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Expected return code 0 or EINVAL, got: %d", ret);
+		printf("Test FAILED: Expected return code 0 or EINVAL, got: %d",
+		       ret);
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
-       	return PTS_PASS;
+	printf
+	    ("Test PASSED: NOTE*: Returned 0 on error, though standard states 'may' fail.\n");
+	return PTS_PASS;
 
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/1-1.c
index c29b2b2..e53cc25 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/1-1.c
@@ -24,79 +24,67 @@
 	int type;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
 		printf("Error getting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_DEFAULT)
-	{
-		printf("Test FAILED: Default value of the 'type' attribute is not PTHREAD_MUTEX_DEFAULT \n");
+	if (type != PTHREAD_MUTEX_DEFAULT) {
+		printf
+		    ("Test FAILED: Default value of the 'type' attribute is not PTHREAD_MUTEX_DEFAULT \n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0)
-	{
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
 		printf("Error getting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_NORMAL)
-	{
+	if (type != PTHREAD_MUTEX_NORMAL) {
 		printf("Test FAILED: Type not correct get/set \n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
 		printf("Error getting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_ERRORCHECK)
-	{
+	if (type != PTHREAD_MUTEX_ERRORCHECK) {
 		printf("Test FAILED: Type not correct get/set \n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) != 0)
-	{
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_gettype(&mta, &type) != 0)
-	{
+	if (pthread_mutexattr_gettype(&mta, &type) != 0) {
 		printf("Error getting the attribute 'type'\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (type != PTHREAD_MUTEX_RECURSIVE)
-	{
+	if (type != PTHREAD_MUTEX_RECURSIVE) {
 		printf("Test FAILED: Type not correct get/set \n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutexattr_destroy(&mta) != 0)
-	{
+	if (pthread_mutexattr_destroy(&mta) != 0) {
 		printf("Error at pthread_mutexattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/2-1.c
index 4b8d17f..6b176d0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/2-1.c
@@ -46,38 +46,34 @@
 	int ret;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the 'type' attribute to be PTHREAD_MUTEX_NORMAL  */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0)
-	{
+	/* Set the 'type' attribute to be PTHREAD_MUTEX_NORMAL  */
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize the mutex with that attribute obj. */
-	if (pthread_mutex_init(&mutex, &mta) != 0)
-	{
+	if (pthread_mutex_init(&mutex, &mta) != 0) {
 		perror("Error intializing the mutex.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	ret=pthread_mutex_lock(&mutex);
-	if (ret != 0)
-	{
+	ret = pthread_mutex_lock(&mutex);
+	if (ret != 0) {
 		printf("Test Unresolved: Error at pthread_mutex_lock, "
-			"error code %d\n", ret);
+		       "error code %d\n", ret);
 		return PTS_UNRESOLVED;
 	}
 
 	signal(SIGALRM, alarm_handler);
 	alarm(1);
 	/* This lock will cause deadlock */
-	ret=pthread_mutex_lock(&mutex);
+	ret = pthread_mutex_lock(&mutex);
 	/* We should not get here */
 	printf("Relock the mutex did not get deadlock\n");
 	printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-1.c
index 74d0434..208e0b4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-1.c
@@ -35,37 +35,33 @@
 	pthread_mutexattr_t mta;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
+	/* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize the mutex with that attribute obj. */
-	if (pthread_mutex_init(&mutex, &mta) != 0)
-	{
+	if (pthread_mutex_init(&mutex, &mta) != 0) {
 		perror("Error intializing the mutex.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Lock the mutex. */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error locking the mutex first time around.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Lock the mutex again.  Here, an error should be returned. */
-	if (pthread_mutex_lock(&mutex) == 0)
-	{
-		perror("Test FAILED: Did not return error when locking an already locked mutex.\n");
+	if (pthread_mutex_lock(&mutex) == 0) {
+		perror
+		    ("Test FAILED: Did not return error when locking an already locked mutex.\n");
 		return PTS_FAIL;
 	}
 
@@ -73,8 +69,7 @@
 	pthread_mutex_unlock(&mutex);
 	pthread_mutex_destroy(&mutex);
 
-	if (pthread_mutexattr_destroy(&mta) != 0)
-	{
+	if (pthread_mutexattr_destroy(&mta) != 0) {
 		perror("Error at pthread_mutex_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
index 7cc86e3..6777334 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
@@ -40,44 +40,39 @@
 void *a_thread_func()
 {
 	/* Try to unlock the mutex that main already locked. */
-	ret=pthread_mutex_unlock(&mutex);
-	pthread_exit((void*)0);
+	ret = pthread_mutex_unlock(&mutex);
+	pthread_exit((void *)0);
 }
 
 int main()
 {
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
+	/* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize the mutex with that attribute obj. */
-	if (pthread_mutex_init(&mutex, &mta) != 0)
-	{
+	if (pthread_mutex_init(&mutex, &mta) != 0) {
 		perror("Error intializing the mutex.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Lock the mutex. */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error locking the mutex first time around.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create the thread that will try to unlock the mutex we just locked. */
-	if (pthread_create(&thread1, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating a thread.\n");
 		return PTS_UNRESOLVED;
 	}
@@ -85,9 +80,9 @@
 	/* Wait for that thread to end execution */
 	pthread_join(thread1, NULL);
 
-	if (ret == 0)
-	{
-		printf("Test FAILED: Expected an error when trying to unlock a mutex that was locked by another thread.  Returned 0 instead.\n");
+	if (ret == 0) {
+		printf
+		    ("Test FAILED: Expected an error when trying to unlock a mutex that was locked by another thread.  Returned 0 instead.\n");
 		return PTS_FAIL;
 	}
 
@@ -95,8 +90,7 @@
 	pthread_mutex_unlock(&mutex);
 	pthread_mutex_destroy(&mutex);
 
-	if (pthread_mutexattr_destroy(&mta))
-	{
+	if (pthread_mutexattr_destroy(&mta)) {
 		perror("Error at pthread_mutexattr_destory().\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-3.c
index e63fe96..d33a79a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-3.c
@@ -35,30 +35,27 @@
 	pthread_mutexattr_t mta;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
+	/* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize the mutex with that attribute obj. */
-	if (pthread_mutex_init(&mutex, &mta) != 0)
-	{
+	if (pthread_mutex_init(&mutex, &mta) != 0) {
 		perror("Error intializing the mutex.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Unlock an already unlocked mutex.  Here, an error should be returned. */
-	if (pthread_mutex_unlock(&mutex) == 0)
-	{
-		perror("Test FAILED: Did not return error when unlocking an already unlocked mutex.\n");
+	if (pthread_mutex_unlock(&mutex) == 0) {
+		perror
+		    ("Test FAILED: Did not return error when unlocking an already unlocked mutex.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-4.c
index b6a00f3..ced3d1f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-4.c
@@ -35,53 +35,46 @@
 	pthread_mutexattr_t mta;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
-	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0)
-	{
+	/* Set the 'type' attribute to be PTHREAD_MUTEX_ERRORCHECK  */
+	if (pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK) != 0) {
 		printf("Test FAILED: Error setting the attribute 'type'\n");
 		return PTS_FAIL;
 	}
 
 	/* Initialize the mutex with that attribute obj. */
-	if (pthread_mutex_init(&mutex, &mta) != 0)
-	{
+	if (pthread_mutex_init(&mutex, &mta) != 0) {
 		perror("Error intializing the mutex.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error at pthread_mutex_lock().\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error at pthread_mutex_unlock().\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Unlock an already unlocked mutex.  Here, an error should be returned. */
-	if (pthread_mutex_unlock(&mutex) == 0)
-	{
-		perror("Test FAILED: Did not return error when unlocking an already unlocked mutex.\n");
+	if (pthread_mutex_unlock(&mutex) == 0) {
+		perror
+		    ("Test FAILED: Did not return error when unlocking an already unlocked mutex.\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_mutex_destroy(&mutex))
-	{
+	if (pthread_mutex_destroy(&mutex)) {
 		perror("Error at pthread_mutex_destory().\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_mutexattr_destroy(&mta))
-	{
+	if (pthread_mutexattr_destroy(&mta)) {
 		perror("Error at pthread_mutexattr_destory().\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/7-1.c
index d750b17..570c492 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/7-1.c
@@ -31,28 +31,26 @@
 {
 	pthread_mutexattr_t mta;
 	int ret;
-        int invalid_type = -1;
+	int invalid_type = -1;
 
 	/* Initialize a mutex attributes object */
-	if (pthread_mutexattr_init(&mta) != 0)
-	{
+	if (pthread_mutexattr_init(&mta) != 0) {
 		perror("Error at pthread_mutexattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-        while (invalid_type == PTHREAD_MUTEX_NORMAL ||
-		invalid_type == PTHREAD_MUTEX_ERRORCHECK ||
-		invalid_type == PTHREAD_MUTEX_RECURSIVE ||
-		invalid_type == PTHREAD_MUTEX_DEFAULT)
-        {
-                invalid_type --;
-        }
-	 /* Set the 'type' attribute to be a negative number.  */
-	ret=pthread_mutexattr_settype(&mta, invalid_type);
+	while (invalid_type == PTHREAD_MUTEX_NORMAL ||
+	       invalid_type == PTHREAD_MUTEX_ERRORCHECK ||
+	       invalid_type == PTHREAD_MUTEX_RECURSIVE ||
+	       invalid_type == PTHREAD_MUTEX_DEFAULT) {
+		invalid_type--;
+	}
+	/* Set the 'type' attribute to be a negative number.  */
+	ret = pthread_mutexattr_settype(&mta, invalid_type);
 
-	if (ret != EINVAL)
-	{
-		printf("Test FAILED: Expected return code of EINVAL, got: %d\n", ret);
+	if (ret != EINVAL) {
+		printf("Test FAILED: Expected return code of EINVAL, got: %d\n",
+		       ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
index 816d55d..3a7c861 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
@@ -39,17 +39,16 @@
 {
 	pthread_once_t once_control = PTHREAD_ONCE_INIT;
 
-	init_flag=0;
+	init_flag = 0;
 
 	/* Call pthread_once, passing it the once_control */
-	pthread_once(&once_control, (void*)an_init_func);
+	pthread_once(&once_control, (void *)an_init_func);
 
 	/* Call pthread_once again. The init function should not be
 	 * called. */
-	pthread_once(&once_control, (void*)an_init_func);
+	pthread_once(&once_control, (void *)an_init_func);
 
-	if (init_flag != 1)
-	{
+	if (init_flag != 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-2.c
index 0f775ed..9b0b49a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-2.c
@@ -45,7 +45,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,11 +82,11 @@
 
 	control = 1;
 
-	return ;
+	return;
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -100,13 +100,11 @@
 	/* Call the initializer */
 	ret = pthread_once(&myctl, my_init);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "pthread_once failed");
 	}
 
-	if (control != 1)
-	{
+	if (control != 1) {
 		FAILED("The initializer function did not execute");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-3.c
index 59f3640..7f6cf4f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-3.c
@@ -45,7 +45,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -85,8 +85,7 @@
 	int ret = 0;
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex in initializer");
 	}
 
@@ -94,23 +93,21 @@
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex in initializer");
 	}
 
-	return ;
+	return;
 }
 
 /* Thread function */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 
 	ret = pthread_once(arg, my_init);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "pthread_once failed");
 	}
 
@@ -118,13 +115,13 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 
 	pthread_once_t myctl = PTHREAD_ONCE_INIT;
 
-	pthread_t th[ NTHREADS ];
+	pthread_t th[NTHREADS];
 
 	/* Initialize output */
 	output_init();
@@ -133,23 +130,19 @@
 
 	/* Create the children */
 
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_create(&th[ i ], NULL, threaded, &myctl);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_create(&th[i], NULL, threaded, &myctl);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to create a thread");
 		}
 	}
 
 	/* Then join */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_join(th[ i ], NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_join(th[i], NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join a thread");
 		}
 	}
@@ -157,21 +150,18 @@
 	/* Fetch the memory */
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex in initializer");
 	}
 
-	if (control != 1)
-	{
+	if (control != 1) {
 		output("Control: %d\n", control);
 		FAILED("The initializer function did not execute once");
 	}
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex in initializer");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/2-1.c
index a61a7d1..dbed992 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/2-1.c
@@ -44,7 +44,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -82,11 +82,11 @@
 
 	control = 1;
 
-	return ;
+	return;
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
@@ -100,13 +100,11 @@
 	/* Call the initializer */
 	ret = pthread_once(&myctl, my_init);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "pthread_once failed");
 	}
 
-	if (control != 1)
-	{
+	if (control != 1) {
 		FAILED("The initializer function did not execute");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/3-1.c
index 9afed91..a63fca5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/3-1.c
@@ -35,15 +35,16 @@
 void *an_init_func()
 {
 	/* Indicate to main() that the init function has been reached */
-	init_flag=1;
+	init_flag = 1;
 
 	/* Stay in a continuous loop until the thread that called
 	 * this function gets canceled */
 	sleep(10);
 
 	/* The thread could not be canceled, timeout after 10 secs */
-	perror("Init function timed out (10 secs), thread could not be canceled\n");
-	init_flag=-1;
+	perror
+	    ("Init function timed out (10 secs), thread could not be canceled\n");
+	init_flag = -1;
 	return NULL;
 }
 
@@ -53,7 +54,7 @@
 	/* Make the thread cancelable immediately */
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	pthread_once(&once_control, (void*)an_init_func);
+	pthread_once(&once_control, (void *)an_init_func);
 	return NULL;
 }
 
@@ -61,29 +62,27 @@
 void *an_init_func2()
 {
 	/* Indicate to main() that this init function has been reached */
-	init_flag=1;
+	init_flag = 1;
 	return NULL;
 }
 
 int main()
 {
 	pthread_t new_th;
-	init_flag=0;
+	init_flag = 0;
 
 	/* Create a thread that will execute the first call to pthread_once() */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait until the init function is reached to cancel the thread */
-	while (init_flag==0)
+	while (init_flag == 0)
 		sleep(1);
 
-	/* Send cancel request to the thread*/
-	if (pthread_cancel(new_th) != 0)
-	{
+	/* Send cancel request to the thread */
+	if (pthread_cancel(new_th) != 0) {
 		perror("Could send cancel request to thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -93,22 +92,20 @@
 
 	/* If the thread could not be canceled and timed out, send
 	 * an error */
-	if (init_flag == -1)
-	{
+	if (init_flag == -1) {
 		perror("Error: could not cancel thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	init_flag=0;
+	init_flag = 0;
 
 	/* Should be able to call pthread_once() again with the same
 	 * pthread_once_t object. */
-	pthread_once(&once_control, (void*)an_init_func2);
+	pthread_once(&once_control, (void *)an_init_func2);
 
 	/* If the init function from the 2nd call to pthread_once() was not
- 	 * reached, the test fails. */
-	if (init_flag != 1)
-	{
+	 * reached, the test fails. */
+	if (init_flag != 1) {
 		printf("Test FAILED\n: %d", init_flag);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/4-1-buildonly.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/4-1-buildonly.c
index 9631e55..fc862cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/4-1-buildonly.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/4-1-buildonly.c
@@ -1,14 +1,14 @@
   /*
- * Copyright (c) 2002, Intel Corporation. All rights reserved.
- * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
- * This file is licensed under the GPL license.  For the full content
- * of this license, see the COPYING file at the top level of this
- * source tree.
+   * Copyright (c) 2002, Intel Corporation. All rights reserved.
+   * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
+   * This file is licensed under the GPL license.  For the full content
+   * of this license, see the COPYING file at the top level of this
+   * source tree.
 
-  Test pthread_once()
+   Test pthread_once()
 
-  *The constant PTHREAD_ONCE_INIT is defined in the pthread.h header.
-  */
+   *The constant PTHREAD_ONCE_INIT is defined in the pthread.h header.
+   */
 
 #include <pthread.h>
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/6-1.c
index c36ee1a..f35e952 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/6-1.c
@@ -86,20 +86,17 @@
 
 sigset_t usersigs;
 
-typedef struct
-{
+typedef struct {
 	int sig;
 #ifdef WITH_SYNCHRO
 	sem_t *sem;
 #endif
-}
-
-thestruct;
+} thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
-	thestruct * thearg = (thestruct *) arg;
+	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
@@ -108,18 +105,15 @@
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret,
-			"Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 #ifdef WITH_SYNCHRO
 
-		if ((ret = sem_wait(thearg->sem)))
-		{
+		if ((ret = sem_wait(thearg->sem))) {
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
 
@@ -128,8 +122,7 @@
 
 		ret = kill(process, thearg->sig);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Kill in sendsig");
 		}
 
@@ -144,11 +137,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig1))
-	{
+	if (sem_post(&semsig1)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 	}
-
 #endif
 }
 
@@ -157,11 +148,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig2))
-	{
+	if (sem_post(&semsig2)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 2");
 	}
-
 #endif
 }
 
@@ -170,24 +159,23 @@
 void initializer(void)
 {
 	init_ctl++;
-	return ;
+	return;
 }
 
 /* Test function -- calls pthread_equal() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
 	int ret = 0;
 
 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 
 		pthread_once_t once_ctl = PTHREAD_ONCE_INIT;
 
@@ -197,30 +185,25 @@
 
 		ret = pthread_once(&once_ctl, initializer);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_once returned EINTR");
 		}
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_once failed");
 		}
 
 		ret = pthread_once(&once_ctl, initializer);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("pthread_once returned EINTR");
 		}
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "pthread_once failed");
 		}
 
-		if (init_ctl != 1)
-		{
+		if (init_ctl != 1) {
 			output("init_ctl: %d\n", init_ctl);
 			FAILED("The initializer did not execute as expected");
 		}
@@ -231,7 +214,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -243,19 +226,17 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)) == -1)
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL)) == -1) {
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)) == -1)
-	{
+	if ((ret = sigaction(SIGUSR2, &sa, NULL)) == -1) {
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
@@ -266,34 +247,28 @@
 
 	ret |= sigaddset(&usersigs, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
 	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
 	}
-
 #ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{
+	if (sem_init(&semsig1, 0, 1)) {
 		UNRESOLVED(errno, "Semsig1  init");
 	}
 
-	if (sem_init(&semsig2, 0, 1))
-	{
+	if (sem_init(&semsig2, 0, 1)) {
 		UNRESOLVED(errno, "Semsig2  init");
 	}
-
 #endif
 
-	if ((ret = pthread_create(&th_work, NULL, test, NULL)))
-	{
+	if ((ret = pthread_create(&th_work, NULL, test, NULL))) {
 		UNRESOLVED(ret, "Worker thread creation failed");
 	}
 
@@ -304,13 +279,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *) &arg1)))
-	{
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 	}
 
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *) &arg2)))
-	{
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 	}
 
@@ -318,27 +291,22 @@
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{
+	if ((ret = pthread_join(th_sig1, NULL))) {
 		UNRESOLVED(ret, "Signal 1 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{
+	if ((ret = pthread_join(th_sig2, NULL))) {
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{
+	if ((ret = pthread_join(th_work, NULL))) {
 		UNRESOLVED(ret, "Worker thread join failed");
 	}
-
 #if VERBOSE > 0
 	output("Test executed successfully.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/1-1.c
index 15baa4a..afbb107 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/1-1.c
@@ -27,18 +27,17 @@
 	int cnt = 0;
 	int rc = 0;
 
-	while (cnt++ < COUNT)
-	{
-		if (pthread_rwlock_init(&rwlock, NULL) != 0)
-		{
-				printf("Error at pthread_rwlock_init()\n");
-				return PTS_UNRESOLVED;
+	while (cnt++ < COUNT) {
+		if (pthread_rwlock_init(&rwlock, NULL) != 0) {
+			printf("Error at pthread_rwlock_init()\n");
+			return PTS_UNRESOLVED;
 		}
 
 		rc = pthread_rwlock_destroy(&rwlock);
-		if (rc != 0)
-		{
-			printf("Test FAILED: at %d-th pthread_rwlock_destroy(), with Error code=%d\n", cnt, rc);
+		if (rc != 0) {
+			printf
+			    ("Test FAILED: at %d-th pthread_rwlock_destroy(), with Error code=%d\n",
+			     cnt, rc);
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/3-1.c
index 47e158d..a4515c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/3-1.c
@@ -26,31 +26,29 @@
 	pthread_rwlock_t rwlock;
 	int rc;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Attempt to destroy an already locked rwlock */
 	rc = pthread_rwlock_destroy(&rwlock);
-	if (rc == EBUSY)
-	{
+	if (rc == EBUSY) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else if (rc == 0)
-	{
-		printf("Test PASSED: Note*: pthread_rwlock_destroy() returned 0 instead of EBUSY, but standard specifies _may_ fail\n");
+	} else if (rc == 0) {
+		printf
+		    ("Test PASSED: Note*: pthread_rwlock_destroy() returned 0 instead of EBUSY, but standard specifies _may_ fail\n");
 		return PTS_PASS;
-	} else
-	{
-		printf("Test FAILED: Error at pthread_rwlock_destroy(), should return 0 or EBUSY, but returns %d\n", rc);
+	} else {
+		printf
+		    ("Test FAILED: Error at pthread_rwlock_destroy(), should return 0 or EBUSY, but returns %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/1-1.c
index 9db760d..046f442 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/1-1.c
@@ -26,7 +26,7 @@
 static pthread_rwlock_t rwlock;
 static int thread_state;
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 
 	thread_state = 2;
@@ -34,18 +34,14 @@
 
 	printf("child: lock for reading\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc == 0)
-	{
+	if (rc == 0) {
 		printf("child: get read lock\n");
 		printf("child: unlock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("child: release read lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("Error in pthread_rwlock_rdlock().\n");
 		exit(PTS_FAIL);
 	}
@@ -59,66 +55,59 @@
 {
 	int cnt = 0;
 	int rc = 0;
-	thread_state=0;
+	thread_state = 0;
 
 	pthread_t thread;
 	pthread_rwlockattr_t rwlockattr;
 
-	if (pthread_rwlockattr_init(&rwlockattr) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwlockattr) != 0) {
 		printf("main: Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_rwlock_init(&rwlock, &rwlockattr);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlock_init(), returns %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlock_init(), returns %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
 	thread_state = 1;
 	printf("main: create thread\n");
-	if (pthread_create(&thread, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&thread, NULL, fn_rd, NULL) != 0) {
 		printf("main: failed to create thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
-	/* We expect the thread not to block*/
+	/* We expect the thread not to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=3 && cnt++ < 3);
+	} while (thread_state != 3 && cnt++ < 3);
 
-	if (thread_state == 2)
-	{
+	if (thread_state == 2) {
 		printf("Test FAILED: thread blocked on read lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != 3)
-	{
+	} else if (thread_state != 3) {
 		printf("main: Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread, NULL) != 0)
-	{
+	if (pthread_join(thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Cleanup */
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlockattr_destroy(&rwlockattr) != 0)
-	{
+	if (pthread_rwlockattr_destroy(&rwlockattr) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/2-1.c
index f5a1369..0eeb11b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/2-1.c
@@ -26,7 +26,7 @@
 static pthread_rwlock_t rwlock;
 static int thread_state;
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 
 	thread_state = 2;
@@ -34,18 +34,14 @@
 
 	printf("child: lock for reading\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc == 0)
-	{
+	if (rc == 0) {
 		printf("child: get read lock\n");
 		printf("child: unlock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("child: release read lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("Error in pthread_rwlock_rdlock().\n");
 		exit(PTS_FAIL);
 	}
@@ -63,47 +59,42 @@
 	pthread_t thread;
 
 	rc = pthread_rwlock_init(&rwlock, NULL);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlock_init(), returns %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlock_init(), returns %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
 	thread_state = 1;
 	printf("main: create thread\n");
-	if (pthread_create(&thread, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&thread, NULL, fn_rd, NULL) != 0) {
 		printf("main: failed to create thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
-	/* We expect the thread not to block*/
+	/* We expect the thread not to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=3 && cnt++ < 3);
+	} while (thread_state != 3 && cnt++ < 3);
 
-	if (thread_state == 2)
-	{
+	if (thread_state == 2) {
 		printf("Test FAILED: thread blocked on read lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != 3)
-	{
+	} else if (thread_state != 3) {
 		printf("main: Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread, NULL) != 0)
-	{
+	if (pthread_join(thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/3-1.c
index 84e8bed..f994581 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/3-1.c
@@ -32,53 +32,52 @@
 	int cnt = 0;
 	pthread_rwlockattr_t rwlockattr;
 
-	if (pthread_rwlockattr_init(&rwlockattr) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwlockattr) != 0) {
 		printf("Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_init(&rwlock, &rwlockattr) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, &rwlockattr) != 0) {
 		printf("Test FAILED: Error in pthread_rwlock_init()\n");
 		return PTS_FAIL;
 	}
 
-	while (cnt++ < COUNT)
-	{
-		if (pthread_rwlock_rdlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: cannot get read lock on %dth loop\n", cnt);
+	while (cnt++ < COUNT) {
+		if (pthread_rwlock_rdlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: cannot get read lock on %dth loop\n",
+			     cnt);
 			return PTS_FAIL;
 		}
 
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: cannot release read lock on %dth loop\n", cnt);
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: cannot release read lock on %dth loop\n",
+			     cnt);
 			return PTS_FAIL;
 		}
 
-		if (pthread_rwlock_wrlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: cannot get write lock on %dth loop\n", cnt);
+		if (pthread_rwlock_wrlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: cannot get write lock on %dth loop\n",
+			     cnt);
 			return PTS_FAIL;
 		}
 
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: cannot release write lock on %dth loop\n", cnt);
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: cannot release write lock on %dth loop\n",
+			     cnt);
 			return PTS_FAIL;
 		}
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlockattr_destroy(&rwlockattr) != 0)
-	{
+	if (pthread_rwlockattr_destroy(&rwlockattr) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/6-1.c
index 6fb5a02..709a032 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/6-1.c
@@ -32,9 +32,10 @@
 
 	/* Initialize the rwlock */
 	rc = pthread_rwlock_init(&rwlock, NULL);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlock_init(), returns %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlock_init(), returns %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
@@ -42,23 +43,22 @@
 	rc = pthread_rwlock_init(&rwlock, NULL);
 
 	/* Cleanup */
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (rc == EBUSY)
-	{
+	if (rc == EBUSY) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else if (rc == 0)
-	{
-		printf("Test PASSED: Note*: pthread_rwlock_init() returned 0 instead of EBUSY, but standard specifies _may_ fail\n");
+	} else if (rc == 0) {
+		printf
+		    ("Test PASSED: Note*: pthread_rwlock_init() returned 0 instead of EBUSY, but standard specifies _may_ fail\n");
 		return PTS_PASS;
-	} else
-	{
-		printf("Test FAILED: Error at pthread_rwlock_init(), should return 0 or EBUSY, but returns %d\n", rc);
+	} else {
+		printf
+		    ("Test FAILED: Error at pthread_rwlock_init(), should return 0 or EBUSY, but returns %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/1-1.c
index 8a81945..8cc74ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/1-1.c
@@ -43,16 +43,16 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 	thread_state = ENTERED_THREAD;
 	printf("rd_thread: attempt read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: rd_thread failed to get read lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: rd_thread failed to get read lock, Error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	} else
 		printf("rd_thread: acquired read lock\n");
@@ -60,8 +60,7 @@
 	sleep(1);
 
 	printf("rd_thread: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("rd_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -75,8 +74,7 @@
 	int cnt = 0;
 	pthread_t rd_thread1, rd_thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -84,9 +82,9 @@
 	printf("main: attempt read lock\n");
 
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
-		printf("Test FAILED: main cannot get read lock when no one owns the lock\n");
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get read lock when no one owns the lock\n");
 		return PTS_FAIL;
 	} else
 		printf("main: acquired read lock\n");
@@ -94,8 +92,7 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create rd_thread1\n");
-	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0) {
 		printf("main: Error at 1st pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -103,31 +100,27 @@
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread started but blocked */
-		printf("Test FAILED: thread blocked on read lock, when a reader owns the lock\n");
+		printf
+		    ("Test FAILED: thread blocked on read lock, when a reader owns the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to release read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread1, NULL) != 0)
-	{
+	if (pthread_join(rd_thread1, NULL) != 0) {
 		printf("main: Error at 1st pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -135,8 +128,7 @@
 	/* Passed first part of the test, now for the second part. */
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: failed to get write lock\n");
 		return PTS_UNRESOLVED;
 	} else
@@ -144,55 +136,48 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create rd_thread2\n");
-	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0) {
 		printf("main: failed at 2nd pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	cnt = 0;
 	/* Expect the child thread block on read lock */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: thread did not block on read lock when a writer holds the lock\n");
+	if (thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: thread did not block on read lock when a writer holds the lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("main: Unexpected thread state\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to release write lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* We expected the child get the read lock and exit */
 	cnt = 1;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread blocked on read lock after the writer released the lock\n");
+	if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread blocked on read lock after the writer released the lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
index a0d9180..e948cdf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
@@ -62,19 +62,17 @@
 
 static int set_priority(pthread_t pid, unsigned policy, unsigned prio)
 {
-        struct sched_param sched_param;
-        memset(&sched_param, 0, sizeof(sched_param));
-        sched_param.sched_priority = prio;
-        if (pthread_setschedparam(pid, policy, &sched_param) == -1)
-        {
-                printf("Can't set policy to %d and prio to %d\n",
-                        policy, prio);
-                exit(PTS_UNRESOLVED);
-        }
-      return 0;
+	struct sched_param sched_param;
+	memset(&sched_param, 0, sizeof(sched_param));
+	sched_param.sched_priority = prio;
+	if (pthread_setschedparam(pid, policy, &sched_param) == -1) {
+		printf("Can't set policy to %d and prio to %d\n", policy, prio);
+		exit(PTS_UNRESOLVED);
+	}
+	return 0;
 }
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -85,10 +83,10 @@
 
 	printf("rd_thread: attempt read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: rd_thread failed to get read lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: rd_thread failed to get read lock, Error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	} else
 		printf("rd_thread: acquired read lock\n");
@@ -96,8 +94,7 @@
 	sleep(1);
 
 	printf("rd_thread: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("rd_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -106,7 +103,7 @@
 	return NULL;
 }
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -117,10 +114,10 @@
 
 	printf("wr_thread: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Error: wr_thread failed to get write lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Error: wr_thread failed to get write lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	} else
 		printf("wr_thread: acquired write lock\n");
@@ -128,8 +125,7 @@
 	sleep(1);
 
 	printf("wr_thread: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("wr_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -140,31 +136,30 @@
 
 int main()
 {
-	#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-  		printf("Posix Thread Execution Scheduling not supported\n");
-  		return PTS_UNSUPPORTED;
-	#endif
+#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
+	printf("Posix Thread Execution Scheduling not supported\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	int cnt = 0;
 	pthread_t rd_thread, wr_thread;
 	int priority;
 
-	/* main thread needs to have the highest priority*/
+	/* main thread needs to have the highest priority */
 	priority = sched_get_priority_min(TRD_POLICY) + 2;
 	set_priority(pthread_self(), TRD_POLICY, priority);
 	printf("main: has priority: %d\n", priority);
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* This read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
-		printf("Test FAILED: main cannot get read lock when no one owns the lock\n");
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get read lock when no one owns the lock\n");
 		return PTS_FAIL;
 	} else
 		printf("main: acquired read lock\n");
@@ -172,8 +167,8 @@
 	wr_thread_state = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY) + 1;
 	printf("main: create wr_thread, with priority: %d\n", priority);
-	if (pthread_create(&wr_thread, NULL, fn_wr, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&wr_thread, NULL, fn_wr, (void *)(long)priority) !=
+	    0) {
 		printf("main: Error at 1st pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -183,17 +178,15 @@
 
 	/* We expect the wr_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == EXITING_THREAD)
-	{
-		printf("wr_thread did not block on write lock, when a reader owns the lock\n");
+	if (wr_thread_state == EXITING_THREAD) {
+		printf
+		    ("wr_thread did not block on write lock, when a reader owns the lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (wr_thread_state != ENTERED_THREAD)
-	{
+	} else if (wr_thread_state != ENTERED_THREAD) {
 		printf("Unexpected wr_thread state: %d\n", wr_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -201,83 +194,73 @@
 	rd_thread_state = 1;
 	priority = sched_get_priority_min(TRD_POLICY);
 	printf("main: create rd_thread, with priority: %d\n", priority);
-	if (pthread_create(&rd_thread, NULL, fn_rd, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&rd_thread, NULL, fn_rd, (void *)(long)priority) !=
+	    0) {
 		printf("main: failed at creating rd_thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* We expect the rd_thread to block*/
+	/* We expect the rd_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (rd_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (rd_thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: rd_thread did not block on read lock, when a reader owns the lock, and a higher priority writer is waiting for the lock\n");
+	if (rd_thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: rd_thread did not block on read lock, when a reader owns the lock, and a higher priority writer is waiting for the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != ENTERED_THREAD)
-	{
+	} else if (rd_thread_state != ENTERED_THREAD) {
 		printf("Unexpected rd_thread state: %d\n", rd_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to unlock read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* we expect the writer get the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader release the lock\n");
+	if (wr_thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader release the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (wr_thread_state != EXITING_THREAD)
-	{
+	} else if (wr_thread_state != EXITING_THREAD) {
 		printf("Unexpected wr_thread state: %d\n", wr_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(wr_thread, NULL) != 0)
-	{
+	if (pthread_join(wr_thread, NULL) != 0) {
 		printf("main: Error at 1st pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
-	/* we expect the reader get the lock when writer has unlocked the lock*/
+	/* we expect the reader get the lock when writer has unlocked the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (rd_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (rd_thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: rd_thread still block on read lock when the lock has no owner\n");
+	if (rd_thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: rd_thread still block on read lock when the lock has no owner\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != EXITING_THREAD)
-	{
+	} else if (rd_thread_state != EXITING_THREAD) {
 		printf("Unexpected rd_thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread, NULL) != 0)
-	{
+	if (pthread_join(rd_thread, NULL) != 0) {
 		printf("main: Error at 2nd pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
index 6737b0e..c0c7168 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
@@ -62,19 +62,17 @@
 
 static int set_priority(pthread_t pid, unsigned policy, unsigned prio)
 {
-        struct sched_param sched_param;
-        memset(&sched_param, 0, sizeof(sched_param));
-        sched_param.sched_priority = prio;
-        if (pthread_setschedparam(pid, policy, &sched_param) == -1)
-        {
-                printf("Can't set policy to %d and prio to %d\n",
-                        policy, prio);
-                exit(PTS_UNRESOLVED);
-        }
-      return 0;
+	struct sched_param sched_param;
+	memset(&sched_param, 0, sizeof(sched_param));
+	sched_param.sched_priority = prio;
+	if (pthread_setschedparam(pid, policy, &sched_param) == -1) {
+		printf("Can't set policy to %d and prio to %d\n", policy, prio);
+		exit(PTS_UNRESOLVED);
+	}
+	return 0;
 }
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -85,10 +83,10 @@
 
 	printf("rd_thread: attempt read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test fail: rd_thread failed to get read lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test fail: rd_thread failed to get read lock, Error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	} else
 		printf("rd_thread: acquired read lock\n");
@@ -96,8 +94,7 @@
 	sleep(1);
 
 	printf("rd_thread: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("rd_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -106,7 +103,7 @@
 	return NULL;
 }
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -117,10 +114,10 @@
 
 	printf("wr_thread: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test fail: wr_thread failed to get write lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test fail: wr_thread failed to get write lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	} else
 		printf("wr_thread: acquired write lock\n");
@@ -128,8 +125,7 @@
 	sleep(1);
 
 	printf("wr_thread: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("wr_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -140,30 +136,29 @@
 
 int main()
 {
-	#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-  		printf("Posix Thread Execution Scheduling not supported\n");
-  		return PTS_UNSUPPORTED;
-	#endif
+#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
+	printf("Posix Thread Execution Scheduling not supported\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	int cnt = 0;
 	pthread_t rd_thread, wr_thread;
 	int priority;
 
-	/* main thread needs to have the highest priority*/
+	/* main thread needs to have the highest priority */
 	priority = sched_get_priority_min(TRD_POLICY) + 2;
 	set_priority(pthread_self(), TRD_POLICY, priority);
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
-		printf("Test FAILED: main cannot get read lock when no one owns the lock\n");
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get read lock when no one owns the lock\n");
 		return PTS_FAIL;
 	} else
 		printf("main: acquired read lock\n");
@@ -171,8 +166,8 @@
 	wr_thread_state = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY) + 1;
 	printf("main: create wr_thread, with priority: %d\n", priority);
-	if (pthread_create(&wr_thread, NULL, fn_wr, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&wr_thread, NULL, fn_wr, (void *)(long)priority) !=
+	    0) {
 		printf("main: Error at 1st pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -182,17 +177,15 @@
 
 	/* We expect the wr_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == EXITING_THREAD)
-	{
-		printf("wr_thread did not block on write lock, when a reader owns the lock\n");
+	if (wr_thread_state == EXITING_THREAD) {
+		printf
+		    ("wr_thread did not block on write lock, when a reader owns the lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (wr_thread_state != ENTERED_THREAD)
-	{
+	} else if (wr_thread_state != ENTERED_THREAD) {
 		printf("Unexpected wr_thread state: %d\n", wr_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -200,83 +193,73 @@
 	rd_thread_state = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY) + 1;
 	printf("main: create rd_thread, with priority: %d\n", priority);
-	if (pthread_create(&rd_thread, NULL, fn_rd, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&rd_thread, NULL, fn_rd, (void *)(long)priority) !=
+	    0) {
 		printf("main: failed at creating rd_thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* We expect the rd_thread to block*/
+	/* We expect the rd_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (rd_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (rd_thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: rd_thread did not block on read lock, when a reader owns the lock, and an equal priority writer is waiting for the lock\n");
+	if (rd_thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: rd_thread did not block on read lock, when a reader owns the lock, and an equal priority writer is waiting for the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != ENTERED_THREAD)
-	{
+	} else if (rd_thread_state != ENTERED_THREAD) {
 		printf("Unexpected rd_thread state: %d\n", rd_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to release read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* we expect the writer get the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader released the lock\n");
+	if (wr_thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader released the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (wr_thread_state != EXITING_THREAD)
-	{
+	} else if (wr_thread_state != EXITING_THREAD) {
 		printf("Unexpected wr_thread state: %d\n", wr_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(wr_thread, NULL) != 0)
-	{
+	if (pthread_join(wr_thread, NULL) != 0) {
 		printf("main: Error at 1st pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
-	/* we expect the reader get the lock when writer has release the lock*/
+	/* we expect the reader get the lock when writer has release the lock */
 	cnt = 0;
 	do {
 		sleep(1);
 	} while (rd_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (rd_thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: rd_thread still blocked on read lock when the lock has no owner\n");
+	if (rd_thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: rd_thread still blocked on read lock when the lock has no owner\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != EXITING_THREAD)
-	{
+	} else if (rd_thread_state != EXITING_THREAD) {
 		printf("Unexpected rd_thread state: %d\n", rd_thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread, NULL) != 0)
-	{
+	if (pthread_join(rd_thread, NULL) != 0) {
 		printf("main: Error at 2nd pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
index e550c64..adf2b04 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
@@ -62,19 +62,17 @@
 
 static int set_priority(pthread_t pid, unsigned policy, unsigned prio)
 {
-        struct sched_param sched_param;
-        memset(&sched_param, 0, sizeof(sched_param));
-        sched_param.sched_priority = prio;
-        if (pthread_setschedparam(pid, policy, &sched_param) == -1)
-        {
-                printf("Can't set policy to %d and prio to %d\n",
-                        policy, prio);
-                exit(PTS_UNRESOLVED);
-        }
-      return 0;
+	struct sched_param sched_param;
+	memset(&sched_param, 0, sizeof(sched_param));
+	sched_param.sched_priority = prio;
+	if (pthread_setschedparam(pid, policy, &sched_param) == -1) {
+		printf("Can't set policy to %d and prio to %d\n", policy, prio);
+		exit(PTS_UNRESOLVED);
+	}
+	return 0;
 }
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -85,10 +83,10 @@
 
 	printf("rd_thread: attempt read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: rd_thread failed to get read lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: rd_thread failed to get read lock, Error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	} else
 		printf("rd_thread: acquired read lock\n");
@@ -96,8 +94,7 @@
 	sleep(1);
 
 	printf("rd_thread: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("rd_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -106,7 +103,7 @@
 	return NULL;
 }
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -117,10 +114,10 @@
 
 	printf("wr_thread: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: wr_thread failed to get write lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: wr_thread failed to get write lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	} else
 		printf("wr_thread: acquired write lock\n");
@@ -128,8 +125,7 @@
 	sleep(1);
 
 	printf("wr_thread: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("wr_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -141,30 +137,29 @@
 int main()
 {
 
-	#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-  		printf("Posix Thread Execution Scheduling not supported\n");
-  		return PTS_UNSUPPORTED;
-	#endif
+#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
+	printf("Posix Thread Execution Scheduling not supported\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	int cnt = 0;
 	pthread_t rd_thread, wr_thread;
 	int priority;
 
-	/* main thread needs to have the highest priority*/
+	/* main thread needs to have the highest priority */
 	priority = sched_get_priority_min(TRD_POLICY) + 2;
 	set_priority(pthread_self(), TRD_POLICY, priority);
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
-		printf("Test FAILED: main cannot get read lock when no one owns the lock\n");
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get read lock when no one owns the lock\n");
 		return PTS_FAIL;
 	} else
 		printf("main: acquired read lock\n");
@@ -172,8 +167,8 @@
 	wr_thread_state = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY);
 	printf("main: create wr_thread, with priority: %d\n", priority);
-	if (pthread_create(&wr_thread, NULL, fn_wr, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&wr_thread, NULL, fn_wr, (void *)(long)priority) !=
+	    0) {
 		printf("main: Error at 1st pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -185,15 +180,13 @@
 	cnt = 0;
 	do {
 		sleep(1);
-	} while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == EXITING_THREAD)
-	{
-		printf("wr_thread did not block on write lock, when a reader owns the lock\n");
+	if (wr_thread_state == EXITING_THREAD) {
+		printf
+		    ("wr_thread did not block on write lock, when a reader owns the lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (wr_thread_state != ENTERED_THREAD)
-	{
+	} else if (wr_thread_state != ENTERED_THREAD) {
 		printf("Unexpected wr_thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -201,32 +194,28 @@
 	rd_thread_state = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY) + 1;
 	printf("main: create rd_thread, with priority: %d\n", priority);
-	if (pthread_create(&rd_thread, NULL, fn_rd, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&rd_thread, NULL, fn_rd, (void *)(long)priority) !=
+	    0) {
 		printf("main: failed at creating rd_thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* We expect the rd_thread get the read lock*/
+	/* We expect the rd_thread get the read lock */
 	cnt = 0;
 	do {
 		sleep(1);
 	} while (rd_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (rd_thread_state == ENTERED_THREAD)
-	{
+	if (rd_thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: rd_thread blocked on read lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != EXITING_THREAD)
-	{
+	} else if (rd_thread_state != EXITING_THREAD) {
 		printf("Unexpected rd_thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to release read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -235,33 +224,28 @@
 	cnt = 0;
 	do {
 		sleep(1);
-	} while (wr_thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (wr_thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (wr_thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader release the lock\n");
+	if (wr_thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: higher priority wr_thread still blocked on write lock, when a reader release the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (wr_thread_state != EXITING_THREAD)
-	{
+	} else if (wr_thread_state != EXITING_THREAD) {
 		printf("Unexpected wr_thread state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(wr_thread, NULL) != 0)
-	{
+	if (pthread_join(wr_thread, NULL) != 0) {
 		printf("main: Error at 1st pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread, NULL) != 0)
-	{
+	if (pthread_join(rd_thread, NULL) != 0) {
 		printf("main: Error at 2nd pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/4-1.c
index af8b9d5..ee9ce25 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/4-1.c
@@ -44,20 +44,18 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void sig_handler() {
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+static void sig_handler()
+{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: handled signal SIGUSR1\n");
 		handler_called = 1;
-	}
-	else
-	{
+	} else {
 		printf("signal is not handled by sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	int rc = 0;
@@ -71,20 +69,20 @@
 	thread_state = ENTERED_THREAD;
 	printf("sig_thread: attemp read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: sig_thread: Error at pthread_rwlock_rdlock(), Error code=%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: sig_thread: Error at pthread_rwlock_rdlock(), Error code=%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	} else
 		printf("sig_thread: acquired read lock\n");
 
 	printf("sig_thread: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("sig_thread: Error release readlock\n");
 		exit(PTS_UNRESOLVED);
 	}
- 	thread_state = EXITING_THREAD;
+	thread_state = EXITING_THREAD;
 	pthread_exit(0);
 	return NULL;
 }
@@ -94,112 +92,101 @@
 	int cnt;
 	handler_called = 0;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	} else
 		printf("main: acquired write lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* wait at most 3 seconds for sig_thread to block*/
+	/* wait at most 3 seconds for sig_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: thread did not block on read lock when a writer holds the lock\n");
+	if (thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: thread did not block on read lock when a writer holds the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread is blocking */
 	printf("main: fire SIGUSR1 to sig_thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("main: failed to send SIGUSER to sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 3 seconds for the signal to be handled */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (handler_called == 0 && cnt++ < 3);
+	} while (handler_called == 0 && cnt++ < 3);
 
-	if (handler_called != 1)
-	{
+	if (handler_called != 1) {
 		printf("SIGUSR1 was not caught by sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread resume to block? */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: upon return from signal handler, sig_thread does not resume to block\n");
+	if (thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: upon return from signal handler, sig_thread does not resume to block\n");
 		exit(PTS_FAIL);
-	}else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	printf("sig_thread: correctly still blocking after signal handler returns\n");
+	printf
+	    ("sig_thread: correctly still blocking after signal handler returns\n");
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Failed to release write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread got the read lock? */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: sig_thread blocked on read lock when writer release the lock\n");
+	if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: sig_thread blocked on read lock when writer release the lock\n");
 		exit(PTS_FAIL);
-	}else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("main: failed at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("main: failed at pthread_rwlock_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/5-1.c
index fea5991..f26928a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/5-1.c
@@ -30,32 +30,30 @@
 	static pthread_rwlock_t rwlock;
 	int i;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0;i < COUNT;i++)
-	{
-		if (pthread_rwlock_rdlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: main cannot get read-lock rwlock number: %d\n", i);
+	for (i = 0; i < COUNT; i++) {
+		if (pthread_rwlock_rdlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: main cannot get read-lock rwlock number: %d\n",
+			     i);
 			return PTS_FAIL;
 		}
 	}
 
-	for (i = 0;i < COUNT;i++)
-	{
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
-			printf("Test FAILED: main cannot unlock rwlock number %d", i);
+	for (i = 0; i < COUNT; i++) {
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
+			printf
+			    ("Test FAILED: main cannot unlock rwlock number %d",
+			     i);
 			return PTS_FAIL;
 		}
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/1-1.c
index 0a2dd6e..bb6a544 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/1-1.c
@@ -48,7 +48,7 @@
 static int thread_state;
 static struct timeval currsec1, currsec2;
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 
 	thread_state = ENTERED_THREAD;
@@ -63,20 +63,18 @@
 
 	printf("thread: attempt timed read lock, %d secs\n", TIMEOUT);
 	rc = pthread_rwlock_timedrdlock(&rwlock, &timeout);
-	if (rc  == ETIMEDOUT)
+	if (rc == ETIMEDOUT)
 		printf("thread: timer expired\n");
-	else if (rc == 0)
-	{
+	else if (rc == 0) {
 		printf("thread: acquired read lock\n");
 		printf("thread: unlock read lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
-		printf("Error: thread: in pthread_rwlock_timedrdlock(), return code:%d\n", rc);
+	} else {
+		printf
+		    ("Error: thread: in pthread_rwlock_timedrdlock(), return code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -92,15 +90,13 @@
 	int cnt = 0;
 	pthread_t rd_thread1, rd_thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -109,8 +105,7 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create rd_thread1\n");
-	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0) {
 		printf("main: Error when creating rd_thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -120,38 +115,33 @@
 
 	/* we expect the thread not to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread started but blocked */
-		printf("Test FAILED: rd_thread1 blocked on pthread_rwlock_timedrdlock()\n");
+		printf
+		    ("Test FAILED: rd_thread1 blocked on pthread_rwlock_timedrdlock()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread1, NULL) != 0)
-	{
+	if (pthread_join(rd_thread1, NULL) != 0) {
 		printf("main: Error when join rd_thread1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error when release read lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Failed to get write lock\n");
 		return PTS_UNRESOLVED;
 	}
@@ -159,56 +149,50 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create rd_thread2\n");
-	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0) {
 		printf("main: Failed to create rd_thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* we expect rd_thread2 to block and timeout. */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
-			printf("Test FAILED: the timer expired and thread terminated, but the timeout is not correct: start time %ld.%06ld, end time %ld.%06ld\n", (long) currsec1.tv_sec, (long) currsec1.tv_usec, (long) currsec2.tv_sec, (long) currsec2.tv_usec);
+		if (time_diff.tv_sec < TIMEOUT) {
+			printf
+			    ("Test FAILED: the timer expired and thread terminated, but the timeout is not correct: start time %ld.%06ld, end time %ld.%06ld\n",
+			     (long)currsec1.tv_sec, (long)currsec1.tv_usec,
+			     (long)currsec2.tv_sec, (long)currsec2.tv_usec);
 			exit(PTS_FAIL);
 		} else
 			printf("thread: read lock correctly timed out\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: read block was not terminated even when the timer expired\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: read block was not terminated even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Failed to release write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/2-1.c
index 1555fc4..435770a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/2-1.c
@@ -46,7 +46,7 @@
 static int currsec1, currsec2;
 static int expired;
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	struct timespec abs_timeout;
 	int rc;
@@ -60,25 +60,21 @@
 
 	printf("thread: attempt timed read-lock\n");
 	rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread: timed read-lock correctly expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread: acquired read-lock\n");
 		expired = 0;
 		printf("thread: unlock read lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread: failed to release lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
-		printf("Error in pthread_rwlock_timedrdlock(), error code:%d.\n", rc);
+	} else {
+		printf
+		    ("Error in pthread_rwlock_timedrdlock(), error code:%d.\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -96,15 +92,13 @@
 
 	expired = 0;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -112,8 +106,7 @@
 
 	printf("main: create thread\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&thread1, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_rd, NULL) != 0) {
 		printf("Error creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -123,45 +116,37 @@
 
 	/* We expect the thread _NOT_ to block, and instead time out */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time expired or not */
-		if (expired != 1)
-		{
+		if (expired != 1) {
 			printf("Test FAILED: abs_timeout should expire\n");
 			exit(PTS_FAIL);
 		}
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread blocked even when the timer expired\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread blocked even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/3-1.c
index 8a7ab99..7b70c08 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/3-1.c
@@ -51,7 +51,7 @@
 static int thread_state;
 static struct timeval currsec1, currsec2;
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 
 	thread_state = ENTERED_THREAD;
@@ -71,20 +71,18 @@
 
 	printf("thread: attempt timed read lock, %d secs\n", TIMEOUT);
 	rc = pthread_rwlock_timedrdlock(&rwlock, &timeout);
-	if (rc  == ETIMEDOUT)
+	if (rc == ETIMEDOUT)
 		printf("thread: timer expired\n");
-	else if (rc == 0)
-	{
+	else if (rc == 0) {
 		printf("thread: acquired read lock\n");
 		printf("thread: unlock read lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
-		printf("Error: thread: in pthread_rwlock_timedrdlock(), return code:%d\n", rc);
+	} else {
+		printf
+		    ("Error: thread: in pthread_rwlock_timedrdlock(), return code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -106,15 +104,13 @@
 	int cnt = 0;
 	pthread_t rd_thread1, rd_thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -123,8 +119,7 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create rd_thread1\n");
-	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread1, NULL, fn_rd, NULL) != 0) {
 		printf("main: Error when creating rd_thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -134,38 +129,33 @@
 
 	/* we expect the thread not to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread started but blocked */
-		printf("Test FAILED: rd_thread1 blocked on pthread_rwlock_timedrdlock()\n");
+		printf
+		    ("Test FAILED: rd_thread1 blocked on pthread_rwlock_timedrdlock()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(rd_thread1, NULL) != 0)
-	{
+	if (pthread_join(rd_thread1, NULL) != 0) {
 		printf("main: Error when join rd_thread1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error when release read lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Failed to get write lock\n");
 		return PTS_UNRESOLVED;
 	}
@@ -173,60 +163,52 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create rd_thread2\n");
-	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread2, NULL, fn_rd, NULL) != 0) {
 		printf("main: Failed to create rd_thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* we expect rd_thread2 to block and timeout. */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
-			printf("Test FAILED: the timer expired and thread terminated, "
-				"but the timeout is not correct: "
-				"start time %ld.%06ld, end time %ld.%06ld\n",
-				(long) currsec1.tv_sec, (long) currsec1.tv_usec,
-				(long) currsec2.tv_sec, (long) currsec2.tv_usec);
+		if (time_diff.tv_sec < TIMEOUT) {
+			printf
+			    ("Test FAILED: the timer expired and thread terminated, "
+			     "but the timeout is not correct: "
+			     "start time %ld.%06ld, end time %ld.%06ld\n",
+			     (long)currsec1.tv_sec, (long)currsec1.tv_usec,
+			     (long)currsec2.tv_sec, (long)currsec2.tv_usec);
 			exit(PTS_FAIL);
 		} else
 			printf("thread: read lock correctly timed out\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: read block was not terminated even when the timer expired\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: read block was not terminated even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Failed to release write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/5-1.c
index 84963df..e7e21ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/5-1.c
@@ -38,15 +38,14 @@
 static int currsec1;
 static int expired;
 
-static void* fn_rd_1(void *arg)
+static void *fn_rd_1(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	struct timespec abs_timeout;
 	int rc;
 	pthread_rwlock_t rwlock;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("thread1: Error at pthread_rwlock_init\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -59,30 +58,23 @@
 
 	printf("thread1: attempt timed read-lock\n");
 	rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread1: timed read-lock expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread1: acquired read lock\n");
 		expired = 0;
 		printf("thread1: unlock read lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread1: failed to release read lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread1: Error in pthread_rwlock_timedrdlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("thread1: Error at pthread_rwlockattr_destroy()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -91,15 +83,14 @@
 	return NULL;
 }
 
-static void* fn_rd_2(void *arg)
+static void *fn_rd_2(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	struct timespec abs_timeout;
 	int rc;
 	pthread_rwlock_t rwlock;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("thread2: Error at pthread_rwlock_init\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -112,30 +103,23 @@
 
 	printf("thread2: attempt timed read-lock\n");
 	rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread2: timed read-lock expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread2: acquired read lock\n");
 		expired = 0;
 		printf("thread2: unlock read lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread2: failed to release read lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread2: Error in pthread_rwlock_timedrdlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("thread2: Error at pthread_rwlockattr_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -152,8 +136,7 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_rd_1, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_rd_1, NULL) != 0) {
 		printf("Error when creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -163,40 +146,34 @@
 
 	/* we expect thread1 NOT to block, but rather for the timed read-lock to expire */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time expired or not */
-		if (expired == 1)
-		{
-			printf("Test FAILED: thread1 incorrectly received ETIMEDOUT\n");
+		if (expired == 1) {
+			printf
+			    ("Test FAILED: thread1 incorrectly received ETIMEDOUT\n");
 			return PTS_FAIL;
 		}
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread1 incorrectly blocked for reading rwlock\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread1 incorrectly blocked for reading rwlock\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread1 %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("Error when joining thread1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create thread2\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&thread2, NULL, fn_rd_2, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_rd_2, NULL) != 0) {
 		printf("Error when creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
@@ -206,32 +183,27 @@
 
 	/* we expect thread2 NOT to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 5);
+	} while (thread_state != EXITING_THREAD && cnt++ < 5);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time expired or not */
-		if (expired == 1)
-		{
-			printf("Test FAILED: thread2 incorrectly received ETIMEDOUT\n");
+		if (expired == 1) {
+			printf
+			    ("Test FAILED: thread2 incorrectly received ETIMEDOUT\n");
 			return PTS_FAIL;
 		}
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread2 incorrectly blocked for reading rwlock\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread2 incorrectly blocked for reading rwlock\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread2 %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(thread2, NULL) != 0)
-	{
+	if (pthread_join(thread2, NULL) != 0) {
 		printf("Error when join thread2\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-1.c
index e0a2b8d..3a9e698 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-1.c
@@ -57,22 +57,20 @@
 #define TIMEOUT 5
 
 /* Signal handler called by the thread when SIGUSR1 is received */
-static void sig_handler() {
+static void sig_handler()
+{
 
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: signal is handled by sig_thread\n");
 		handler_called = 1;
 
-	}
-	else
-	{
+	} else {
 		printf("sig_handler: signal is not handled by sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	struct timespec abs_timeout;
@@ -96,12 +94,11 @@
 	printf("thread: attempt timed read lock, %d seconds\n", TIMEOUT);
 	thread_state = ENTERED_THREAD;
 	rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout);
-	if (rc != ETIMEDOUT)
-	{
+	if (rc != ETIMEDOUT) {
 		printf("sig_thread: pthread_rwlock_timedlock returns %d\n", rc);
 		exit(PTS_FAIL);
 	}
- 	printf("thread: timer correctly expired\n");
+	printf("thread: timer correctly expired\n");
 	gettimeofday(&after_wait, NULL);
 
 	thread_state = EXITING_THREAD;
@@ -114,23 +111,20 @@
 	int cnt;
 	struct timeval wait_time;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired write lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -138,38 +132,35 @@
 	/* Wait for the thread to get ready for handling signal (the thread should
 	 * be block on rwlock since main() has the write lock at this point) */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
+	} while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
 
-	if (thread_state != ENTERED_THREAD)
-	{
+	if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: fire SIGUSR1 to thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("main: Error at pthread_kill()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 2*TIMEOUT seconds */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (cnt >= 2*TIMEOUT)
-	{
-		/* thread blocked*/
-		printf("Test FAILED: thread blocked even afer the abs_timeout expired\n");
+	if (cnt >= 2 * TIMEOUT) {
+		/* thread blocked */
+		printf
+		    ("Test FAILED: thread blocked even afer the abs_timeout expired\n");
 		exit(PTS_FAIL);
 	}
 
-	if (handler_called != 1)
-	{
+	if (handler_called != 1) {
 		printf("The handler for SIGUSR1 did not get called\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -177,33 +168,30 @@
 	/* Test that the thread block for the correct TIMOUT time */
 	wait_time.tv_sec = after_wait.tv_sec - before_wait.tv_sec;
 	wait_time.tv_usec = after_wait.tv_usec - before_wait.tv_usec;
-	if (wait_time.tv_usec < 0)
-	{
+	if (wait_time.tv_usec < 0) {
 		--wait_time.tv_sec;
 		wait_time.tv_usec += 1000000;
 	}
-	if (wait_time.tv_sec < TIMEOUT)
-	{
-		printf("Test FAILED: Timeout was for %d seconds, but waited for %ld.%06ld seconds instead\n",
-			TIMEOUT, (long int)wait_time.tv_sec, (long int)wait_time.tv_usec);
+	if (wait_time.tv_sec < TIMEOUT) {
+		printf
+		    ("Test FAILED: Timeout was for %d seconds, but waited for %ld.%06ld seconds instead\n",
+		     TIMEOUT, (long int)wait_time.tv_sec,
+		     (long int)wait_time.tv_usec);
 		exit(PTS_FAIL);
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-2.c
index ec916d5..8803a1f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/6-2.c
@@ -55,24 +55,23 @@
 static int expired;
 static struct timeval before_wait, after_wait;
 
-static void sig_handler() {
+static void sig_handler()
+{
 
 	struct timespec sleep_time_req;
 
-	sleep_time_req.tv_sec = TIMEOUT*2;
+	sleep_time_req.tv_sec = TIMEOUT * 2;
 	sleep_time_req.tv_nsec = 0;
 
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: signal is handled by thread\n");
 		/* sig_handler will not sleep 2 times more than the timeout for the
 		 * pthread_rwlock_timerdlock is waiting for */
-		printf("sig_handler: sleeping for %d seconds\n", (int)sleep_time_req.tv_sec);
+		printf("sig_handler: sleeping for %d seconds\n",
+		       (int)sleep_time_req.tv_sec);
 		handler_state = 2;
 		sleep((int)sleep_time_req.tv_sec);
-	}
-	else
-	{
+	} else {
 		printf("sig_handler: signal is not handled by thread\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -80,7 +79,7 @@
 	handler_state = 3;
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	struct timespec abs_timeout;
@@ -104,18 +103,13 @@
 
 	printf("thread: attempt timed read lock, %d seconds\n", TIMEOUT);
 	rc = pthread_rwlock_timedrdlock(&rwlock, &abs_timeout);
-	if (rc == 0)
-	{
+	if (rc == 0) {
 		printf("thread: correctly acquired read lock\n");
 		expired = 0;
-	}
-	else if (rc == ETIMEDOUT)
-	{
+	} else if (rc == ETIMEDOUT) {
 		printf("thread: timer expired, did not acquire read lock");
 		expired = 1;
-	}
-	else
-	{
+	} else {
 		printf("Error at pthread_rwlock_timedrdlock()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -131,42 +125,37 @@
 {
 	int cnt;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired write lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* wait for the thread to get ready for handling signal */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
+	} while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
 
-	if (thread_state != ENTERED_THREAD)
-	{
+	if (thread_state != ENTERED_THREAD) {
 		printf("Error: thread did not block when getting read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: fire SIGUSR1 to thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("Error in pthread_kill()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -176,61 +165,53 @@
 	 * returns, and control is given back to the thread) */
 
 	cnt = 0;
-	do{
+	do {
 		sleep(TIMEOUT);
-	}while (handler_state !=2 && cnt++ < 2);
+	} while (handler_state != 2 && cnt++ < 2);
 
-	if (handler_state == 1)
-	{
+	if (handler_state == 1) {
 		printf("Error: signal handler did not get called\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (handler_state == 3)
-	{
+	} else if (handler_state == 3) {
 		printf("Error: signal handler incorrectly exited\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (expired == 1)
-	{
+	if (expired == 1) {
 		printf("Error: thread timeout in sig_handler\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 4*TIMEOUT seconds for thread to exit */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 4*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 4 * TIMEOUT);
 
-	if (cnt >= 4*TIMEOUT)
-	{
-		/* thread blocked*/
-		printf("Test FAILED: thread blocked even afer the abs_timeout expires\n");
+	if (cnt >= 4 * TIMEOUT) {
+		/* thread blocked */
+		printf
+		    ("Test FAILED: thread blocked even afer the abs_timeout expires\n");
 		exit(PTS_FAIL);
 	}
 
-	if (expired == 1)
-	{
+	if (expired == 1) {
 		printf("Test FAILED: thread should get the read lock\n");
 		exit(PTS_FAIL);
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("Error at pthread_join()");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_destroy()");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/1-1.c
index 332ad9d..8943fc9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/1-1.c
@@ -52,7 +52,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	struct timespec timeout;
 	int rc;
@@ -66,24 +66,18 @@
 
 	printf("thread: attempt timed write lock, %d secs\n", TIMEOUT);
 	rc = pthread_rwlock_timedwrlock(&rwlock, &timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread: timer expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread: acquired write lock\n");
 		expired = 0;
 		printf("thread: unlock write lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread: error release write lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread: Error in pthread_rwlock_timedrdlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -100,16 +94,14 @@
 	int cnt = 0;
 	pthread_t thread0, thread1, thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create thread0\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&thread0, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread0, NULL, fn_wr, NULL) != 0) {
 		printf("Error creating thread0\n");
 		return PTS_UNRESOLVED;
 	}
@@ -118,41 +110,33 @@
 
 	cnt = 0;
 	expired = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		if (expired == 1)
-		{
+	if (thread_state == EXITING_THREAD) {
+		if (expired == 1) {
 			printf("Test FAILED: the timer expired\n");
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread0 correctly acquired the write lock.\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread0 incorrectly blocked on timedwrlock\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread0 incorrectly blocked on timedwrlock\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread0 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread0, NULL) != 0)
-	{
+	if (pthread_join(thread0, NULL) != 0) {
 		printf("Error when joining thread0\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -161,8 +145,7 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0) {
 		printf("Error when creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -170,58 +153,51 @@
 	/* If the shared data is not altered by child after TIMEOUT*2 seconds,
 	   we regard it as blocked */
 
-	/* we expect the thread to expire blocking after timeout*/
+	/* we expect the thread to expire blocking after timeout */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
-			printf("Test FAILED: the timer expired and blocking was terminated, but the timeout is not correct: expected to wait for %d, but waited for %ld.%06ld\n", TIMEOUT, (long)time_diff.tv_sec, (long)time_diff.tv_usec);
+		if (time_diff.tv_sec < TIMEOUT) {
+			printf
+			    ("Test FAILED: the timer expired and blocking was terminated, but the timeout is not correct: expected to wait for %d, but waited for %ld.%06ld\n",
+			     TIMEOUT, (long)time_diff.tv_sec,
+			     (long)time_diff.tv_usec);
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread1 correctly expired at timeout.\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: wait is not terminated even when the timer expired\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: wait is not terminated even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread1 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error when release read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("Error when joining thread1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -230,58 +206,49 @@
 	thread_state = NOT_CREATED_THREAD;
 	cnt = 0;
 	printf("main: create thread2\n");
-	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0) {
 		printf("Error when creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* we expect thread2 to expire blocking after timeout */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
-			printf("Test FAILED: for thread 2, the timer expired and waiter terminated, but the timeout is not correct\n");
+		if (time_diff.tv_sec < TIMEOUT) {
+			printf
+			    ("Test FAILED: for thread 2, the timer expired and waiter terminated, but the timeout is not correct\n");
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread2 correctly expired at timeout.\n");
 
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: for thread2, wait is not terminated even when the timer expired\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: for thread2, wait is not terminated even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread2 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error releasing write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/2-1.c
index cd315a4..ac7dad9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/2-1.c
@@ -47,7 +47,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn(void *arg)
+static void *fn(void *arg)
 {
 	struct timespec abs_timeout;
 	int rc;
@@ -79,7 +79,9 @@
 			exit(PTS_UNRESOLVED);
 		}
 	} else {
-		printf("Error in pthread_rwlock_timedwrlock(), error code:%d.\n", rc);
+		printf
+		    ("Error in pthread_rwlock_timedwrlock(), error code:%d.\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -129,15 +131,16 @@
 			exit(PTS_FAIL);
 		} else
 			printf("thread correctly expired and did not wait\n");
-	break;
+		break;
 	case ENTERED_THREAD:
-		printf("Test FAILED: thread blocked even when the timer expired\n");
+		printf
+		    ("Test FAILED: thread blocked even when the timer expired\n");
 		exit(PTS_FAIL);
-	break;
+		break;
 	default:
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
-	break;
+		break;
 	}
 
 	printf("main: unlock write lock\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/3-1.c
index 1a0b6f1..0352baf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/3-1.c
@@ -54,15 +54,14 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	struct timespec timeout, ts;
 	int rc;
 	thread_state = ENTERED_THREAD;
 #ifdef CLOCK_REALTIME
 	rc = clock_gettime(CLOCK_REALTIME, &ts);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		perror("clock_gettime()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -77,24 +76,18 @@
 
 	printf("thread: attempt timed write lock, %d secs\n", TIMEOUT);
 	rc = pthread_rwlock_timedwrlock(&rwlock, &timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread: timer expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread: acquired write lock\n");
 		expired = 0;
 		printf("thread: unlock write lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread: error release write lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread: Error in pthread_rwlock_timedrdlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -102,8 +95,7 @@
 	/* Get time after the mutex timed out in locking. */
 #ifdef CLOCK_REALTIME
 	rc = clock_gettime(CLOCK_REALTIME, &ts);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		perror("clock_gettime()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -122,16 +114,14 @@
 	int cnt = 0;
 	pthread_t thread0, thread1, thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: create thread0\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&thread0, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread0, NULL, fn_wr, NULL) != 0) {
 		printf("Error creating thread0\n");
 		return PTS_UNRESOLVED;
 	}
@@ -140,41 +130,33 @@
 
 	cnt = 0;
 	expired = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		if (expired == 1)
-		{
+	if (thread_state == EXITING_THREAD) {
+		if (expired == 1) {
 			printf("Test FAILED: the timer expired\n");
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread0 correctly acquired the write lock.\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread0 incorrectly blocked on timedwrlock\n");
+	} else if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread0 incorrectly blocked on timedwrlock\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread0 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread0, NULL) != 0)
-	{
+	if (pthread_join(thread0, NULL) != 0) {
 		printf("Error when joining thread0\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -183,8 +165,7 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0) {
 		printf("Error when creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -192,63 +173,52 @@
 	/* If the shared data is not altered by child after TIMEOUT*2 seconds,
 	   we regard it as blocked */
 
-	/* we expect the thread to expire blocking after timeout*/
+	/* we expect the thread to expire blocking after timeout */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
+		if (time_diff.tv_sec < TIMEOUT) {
 			printf("Test FAILED: the timer expired and blocking "
-				"was terminated, but the timeout is not correct: "
-				"expected to wait for %d, but waited for %ld.%06ld\n",
-				TIMEOUT, (long)time_diff.tv_sec,
-				(long)time_diff.tv_usec);
+			       "was terminated, but the timeout is not correct: "
+			       "expected to wait for %d, but waited for %ld.%06ld\n",
+			       TIMEOUT, (long)time_diff.tv_sec,
+			       (long)time_diff.tv_usec);
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread1 correctly expired at timeout.\n");
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
+	} else if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: wait is not terminated even "
-			"when the timer expired\n");
+		       "when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread1 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error when release read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("Error when joining thread1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -257,60 +227,49 @@
 	thread_state = NOT_CREATED_THREAD;
 	cnt = 0;
 	printf("main: create thread2\n");
-	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0) {
 		printf("Error when creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* we expect thread2 to expire blocking after timeout */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time interval */
 		struct timeval time_diff;
 		time_diff.tv_sec = currsec2.tv_sec - currsec1.tv_sec;
 		time_diff.tv_usec = currsec2.tv_usec - currsec1.tv_usec;
-		if (time_diff.tv_usec < 0)
-		{
+		if (time_diff.tv_usec < 0) {
 			--time_diff.tv_sec;
 			time_diff.tv_usec += 1000000;
 		}
-		if (time_diff.tv_sec < TIMEOUT)
-		{
+		if (time_diff.tv_sec < TIMEOUT) {
 			printf("Test FAILED: for thread 2, the timer expired "
-			"and waiter terminated, but the timeout is not correct\n");
+			       "and waiter terminated, but the timeout is not correct\n");
 			exit(PTS_FAIL);
-		}
-		else
+		} else
 			printf("thread2 correctly expired at timeout.\n");
 
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
+	} else if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: for thread2, wait is not terminated "
-			"even when the timer expired\n");
+		       "even when the timer expired\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread2 %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error releasing write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/5-1.c
index ec1d68d..ef4b6a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/5-1.c
@@ -45,15 +45,14 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr_1(void *arg)
+static void *fn_wr_1(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	struct timespec abs_timeout;
 	int rc;
 	pthread_rwlock_t rwlock;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("thread1: Error at pthread_rwlock_init\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -66,30 +65,23 @@
 
 	printf("thread1: attempt timed lock for writing\n");
 	rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread1: timer expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread1: acquired write lock\n");
 		expired = 0;
 		printf("thread1: unlock write lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread1: failed to release write lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread1: Error in pthread_rwlock_timedwrlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("thread1: Error at pthread_rwlockattr_destroy()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -98,15 +90,14 @@
 	return NULL;
 }
 
-static void* fn_wr_2(void *arg)
+static void *fn_wr_2(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	struct timespec abs_timeout;
 	int rc;
 	pthread_rwlock_t rwlock;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("thread2: Error at pthread_rwlock_init\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -118,30 +109,23 @@
 
 	printf("thread2: attempt timed lock for writing\n");
 	rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout);
-	if (rc  == ETIMEDOUT)
-	{
+	if (rc == ETIMEDOUT) {
 		printf("thread2: timer expired\n");
 		expired = 1;
-	}
-	else if (rc == 0)
-	{
+	} else if (rc == 0) {
 		printf("thread2: acquired write lock\n");
 		expired = 0;
 		printf("thread2: unlock write lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread2: failed to release write lock\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
+	} else {
 		printf("thread2: Error in pthread_rwlock_timedwrlock().\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("thread2: Error at pthread_rwlock_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -158,8 +142,7 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_wr_1, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_wr_1, NULL) != 0) {
 		printf("Error when creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -168,40 +151,33 @@
 	   we regard it as blocked */
 	/* we expect thread1 NOT to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=3 && cnt++ < 5);
+	} while (thread_state != 3 && cnt++ < 5);
 
-	if (thread_state == 3)
-	{
+	if (thread_state == 3) {
 		/* the child thread does not block, check the time expired or not */
-		if (expired == 1)
-		{
-			printf("Test FAILED: thread1 got ETIMEOUT when get the lock\n");
+		if (expired == 1) {
+			printf
+			    ("Test FAILED: thread1 got ETIMEOUT when get the lock\n");
 			return PTS_FAIL;
 		}
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
+	} else if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: thread1 blocked\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread1 %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("Error when joining thread1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	thread_state = ENTERED_THREAD;
 	printf("main: create thread2\n");
-	if (pthread_create(&thread2, NULL, fn_wr_2, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_wr_2, NULL) != 0) {
 		printf("Error when creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
@@ -211,32 +187,25 @@
 
 	/* we expect thread2 NOT to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread does not block, check the time expired or not */
-		if (expired == 1)
-		{
+		if (expired == 1) {
 			printf("Test FAILED: thread2 got ETIMEOUT\n");
 			return PTS_FAIL;
 		}
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
+	} else if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: thread2 blocked\n");
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Unexpected state for thread2 %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(thread2, NULL) != 0)
-	{
+	if (pthread_join(thread2, NULL) != 0) {
 		printf("Error when join thread2\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-1.c
index c82a31e..a8fe21b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-1.c
@@ -57,22 +57,20 @@
 #define TIMEOUT 5
 
 /* Signal handler called by the thread when SIGUSR1 is received */
-static void sig_handler() {
+static void sig_handler()
+{
 
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: signal is handled by sig_thread\n");
 		handler_called = 1;
 
-	}
-	else
-	{
+	} else {
 		printf("sig_handler: signal is not handled by sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	struct timespec abs_timeout;
@@ -95,12 +93,12 @@
 	printf("thread: attempt timed write lock, %d seconds\n", TIMEOUT);
 	thread_state = ENTERED_THREAD;
 	rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout);
-	if (rc != ETIMEDOUT)
-	{
-		printf("sig_thread: pthread_rwlock_timedwrlock returns %d\n", rc);
+	if (rc != ETIMEDOUT) {
+		printf("sig_thread: pthread_rwlock_timedwrlock returns %d\n",
+		       rc);
 		exit(PTS_FAIL);
 	}
- 	printf("thread: timer correctly expired\n");
+	printf("thread: timer correctly expired\n");
 	gettimeofday(&after_wait, NULL);
 
 	thread_state = EXITING_THREAD;
@@ -113,23 +111,20 @@
 	int cnt;
 	struct timeval time_diff;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired write lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -137,38 +132,35 @@
 	/* Wait for the thread to get ready for handling signal (the thread should
 	 * be block on rwlock since main() has the write lock at this point) */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
+	} while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
 
-	if (thread_state != ENTERED_THREAD)
-	{
+	if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: fire SIGUSR1 to thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("main: Error at pthread_kill()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 2*TIMEOUT seconds */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 2*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 2 * TIMEOUT);
 
-	if (cnt >= 2*TIMEOUT)
-	{
-		/* thread blocked*/
-		printf("Test FAILED: thread blocked even afer the abs_timeout expired\n");
+	if (cnt >= 2 * TIMEOUT) {
+		/* thread blocked */
+		printf
+		    ("Test FAILED: thread blocked even afer the abs_timeout expired\n");
 		exit(PTS_FAIL);
 	}
 
-	if (handler_called != 1)
-	{
+	if (handler_called != 1) {
 		printf("The handler for SIGUSR1 did not get called\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -176,33 +168,29 @@
 	/* Test that the thread block for the correct TIMOUT time */
 	time_diff.tv_sec = after_wait.tv_sec - before_wait.tv_sec;
 	time_diff.tv_usec = after_wait.tv_usec - before_wait.tv_usec;
-	if (time_diff.tv_usec < 0)
-	{
+	if (time_diff.tv_usec < 0) {
 		--time_diff.tv_sec;
 		time_diff.tv_usec += 1000000;
 	}
-	if (time_diff.tv_sec < TIMEOUT)
-	{
-		printf("Test FAILED: Timeout was for %d seconds, but waited for %ld.%06ld seconds instead\n",
-			TIMEOUT, (long)time_diff.tv_sec, (long)time_diff.tv_usec);
+	if (time_diff.tv_sec < TIMEOUT) {
+		printf
+		    ("Test FAILED: Timeout was for %d seconds, but waited for %ld.%06ld seconds instead\n",
+		     TIMEOUT, (long)time_diff.tv_sec, (long)time_diff.tv_usec);
 		exit(PTS_FAIL);
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-2.c
index e4cb1ac..1aee27e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/6-2.c
@@ -55,24 +55,23 @@
 static int expired;
 static struct timeval before_wait, after_wait;
 
-static void sig_handler() {
+static void sig_handler()
+{
 
 	struct timespec sleep_time_req;
 
-	sleep_time_req.tv_sec = TIMEOUT*2;
+	sleep_time_req.tv_sec = TIMEOUT * 2;
 	sleep_time_req.tv_nsec = 0;
 
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: signal is handled by thread\n");
 		/* sig_handler will not sleep 2 times more than the timeout for the
 		 * pthread_rwlock_timerdlock is waiting for */
-		printf("sig_handler: sleeping for %d seconds\n", (int)sleep_time_req.tv_sec);
+		printf("sig_handler: sleeping for %d seconds\n",
+		       (int)sleep_time_req.tv_sec);
 		handler_state = 2;
 		sleep((int)sleep_time_req.tv_sec);
-	}
-	else
-	{
+	} else {
 		printf("sig_handler: signal is not handled by thread\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -80,7 +79,7 @@
 	handler_state = 3;
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	struct timespec abs_timeout;
@@ -104,18 +103,13 @@
 
 	printf("thread: attempt timed write lock, %d seconds\n", TIMEOUT);
 	rc = pthread_rwlock_timedwrlock(&rwlock, &abs_timeout);
-	if (rc == 0)
-	{
+	if (rc == 0) {
 		printf("thread: correctly acquired write lock\n");
 		expired = 0;
-	}
-	else if (rc == ETIMEDOUT)
-	{
+	} else if (rc == ETIMEDOUT) {
 		printf("thread: timer expired, did not acquire write lock");
 		expired = 1;
-	}
-	else
-	{
+	} else {
 		printf("Error %d at pthread_rwlock_timedwrlock()\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
@@ -131,42 +125,37 @@
 {
 	int cnt;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired write lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* wait for the thread to get ready for handling signal */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
+	} while (thread_state != ENTERED_THREAD && cnt++ < TIMEOUT);
 
-	if (thread_state != ENTERED_THREAD)
-	{
+	if (thread_state != ENTERED_THREAD) {
 		printf("Error: thread did not block when getting write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: fire SIGUSR1 to thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("Error in pthread_kill()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -176,61 +165,53 @@
 	 * returns, and control is given back to the thread) */
 
 	cnt = 0;
-	do{
+	do {
 		sleep(TIMEOUT);
-	}while (handler_state !=2 && cnt++ < 2);
+	} while (handler_state != 2 && cnt++ < 2);
 
-	if (handler_state == 1)
-	{
+	if (handler_state == 1) {
 		printf("Error: signal handler did not get called\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (handler_state == 3)
-	{
+	} else if (handler_state == 3) {
 		printf("Error: signal handler incorrectly exited\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (expired == 1)
-	{
+	if (expired == 1) {
 		printf("Error: thread timeout in sig_handler\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 4*TIMEOUT seconds for thread to exit */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 4*TIMEOUT);
+	} while (thread_state != EXITING_THREAD && cnt++ < 4 * TIMEOUT);
 
-	if (cnt >= 4*TIMEOUT)
-	{
-		/* thread blocked*/
-		printf("Test FAILED: thread blocked even afer the abs_timeout expires\n");
+	if (cnt >= 4 * TIMEOUT) {
+		/* thread blocked */
+		printf
+		    ("Test FAILED: thread blocked even afer the abs_timeout expires\n");
 		exit(PTS_FAIL);
 	}
 
-	if (expired == 1)
-	{
+	if (expired == 1) {
 		printf("Test FAILED: thread should get the write lock\n");
 		exit(PTS_FAIL);
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("Error at pthread_join()");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_destroy()");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/1-1.c
index bae0dde..0fae57e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_tryrdlock/1-1.c
@@ -45,22 +45,22 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_rd_1(void *arg)
+static void *fn_rd_1(void *arg)
 {
 	int rc = 0;
 
 	thread_state = ENTERED_THREAD;
 	printf("rd_thread1: attempt pthread_rwlock_tryrdlock\n");
 	rc = pthread_rwlock_tryrdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test fail at pthread_rwlock_tryrdlock(): error code: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test fail at pthread_rwlock_tryrdlock(): error code: %d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 	printf("rd_thread1: acquired read lock\n");
 	printf("rd_thread1: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -68,14 +68,13 @@
 	return NULL;
 }
 
-static void* fn_rd_2(void *arg)
+static void *fn_rd_2(void *arg)
 {
 	int ret;
 	thread_state = ENTERED_THREAD;
 	printf("rd_thread2: attempt pthread_rwlock_tryrdlock\n");
 	ret = pthread_rwlock_tryrdlock(&rwlock);
-	if (ret != EBUSY)
-	{
+	if (ret != EBUSY) {
 		printf("Test FAILED: expected EBUSY, got %d\n", ret);
 		exit(PTS_FAIL);
 	}
@@ -92,8 +91,7 @@
 
 	pthread_t rd_thread1, rd_thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthrad_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -101,9 +99,10 @@
 	printf("main: attempt pthread_rwlock_tryrdlock\n");
 	/* We have no lock, this read lock should succeed */
 	rc = pthread_rwlock_tryrdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: in main()  at pthread_rwlock_tryrdlock, error code:%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: in main()  at pthread_rwlock_tryrdlock, error code:%d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
@@ -111,8 +110,7 @@
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create rd_thread1\n");
-	if (pthread_create(&rd_thread1, NULL, fn_rd_1, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread1, NULL, fn_rd_1, NULL) != 0) {
 		printf("main: Error at creating rd_thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -122,38 +120,34 @@
 	/* We did not expect the thread to block */
 
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread started but blocked */
-		printf("Test FAILED: rd_thread1 block at pthread_rwlock_tryrdlock()\n");
+		printf
+		    ("Test FAILED: rd_thread1 block at pthread_rwlock_tryrdlock()\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
-		printf("Unexpected thread state for rd_thread1: %d\n", thread_state);
+	} else if (thread_state != EXITING_THREAD) {
+		printf("Unexpected thread state for rd_thread1: %d\n",
+		       thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_unlock\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(rd_thread1, NULL) != 0)
-	{
+	if (pthread_join(rd_thread1, NULL) != 0) {
 		printf("main: Error joining rd_thread1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Error getting write lock\n");
 		return PTS_UNRESOLVED;
 	}
@@ -163,38 +157,33 @@
 	thread_state = NOT_CREATED_THREAD;
 	cnt = 0;
 	printf("main: create rd_thread2\n");
-	if (pthread_create(&rd_thread2, NULL, fn_rd_2, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread2, NULL, fn_rd_2, NULL) != 0) {
 		printf("main: Error at creating rd_thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* we do not expect rd_thread2 to block */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: pthread_rwlock_trylock() should not block rd_thread2\n");
+	if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: pthread_rwlock_trylock() should not block rd_thread2\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state for rd_thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock write lock\n");
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at releasing write lock\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/1-1.c
index 4cf5731..8812f0b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/1-1.c
@@ -43,15 +43,14 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	int rc;
 
 	printf("thread: attempt pthread_rwlock_trywrlock()\n");
 	rc = pthread_rwlock_trywrlock(&rwlock);
-	if (rc != EBUSY)
-	{
+	if (rc != EBUSY) {
 		printf("Test FAILED: thread: Expected EBUSY, got %d\n", rc);
 		exit(PTS_FAIL);
 	}
@@ -70,16 +69,14 @@
 
 	get_ebusy = 0;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -87,8 +84,7 @@
 	printf("main: acquired read lock\n");
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0) {
 		printf("Error creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -97,47 +93,44 @@
 	   we regard it as blocked */
 	/* We do no expect thread1 to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread blocked */
-		printf("Test FAILED: thread1 should not block on pthread_rwlock_trywrlock()\n");
+		printf
+		    ("Test FAILED: thread1 should not block on pthread_rwlock_trywrlock()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
-		printf("Unexpected thread state for thread1: %d\n", thread_state);
+	} else if (thread_state != EXITING_THREAD) {
+		printf("Unexpected thread state for thread1: %d\n",
+		       thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (get_ebusy != 1)
-	{
+	if (get_ebusy != 1) {
 		printf("Test FAILED: thread1 should get EBUSY\n");
 		exit(PTS_FAIL);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error releasing read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("main: Error joining thread1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: attempt pthread_rwlock_trywrlock()\n");
-	/* Should get the write lock*/
+	/* Should get the write lock */
 	rc = pthread_rwlock_trywrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: main failed at pthread_rwlock_trywrlock(), error code: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: main failed at pthread_rwlock_trywrlock(), error code: %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
@@ -147,50 +140,43 @@
 	thread_state = NOT_CREATED_THREAD;
 	cnt = 0;
 	printf("main: create thread2\n");
-	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0) {
 		printf("main: Error creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* We do not expect thread2 to block */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
-		printf("Test FAILED: thread2 should not block on pthread_rwlock_trywrlock()\n");
+	if (thread_state == ENTERED_THREAD) {
+		printf
+		    ("Test FAILED: thread2 should not block on pthread_rwlock_trywrlock()\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (get_ebusy != 1)
-	{
+	if (get_ebusy != 1) {
 		printf("Test FAILED: thread2 should get EBUSY\n");
 		exit(PTS_FAIL);
 	}
 
 	printf("main: unlock write lock\n");
 	thread_state = 1;
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at 2nd pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread2, NULL) != 0)
-	{
+	if (pthread_join(thread2, NULL) != 0) {
 		printf("main: Error at 2cn pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/speculative/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/speculative/3-1.c
index f73a156..797adfe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/speculative/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/speculative/3-1.c
@@ -31,31 +31,27 @@
 	rc = pthread_rwlock_trywrlock(&rwlock);
 
 	/* Clean up before checking return value */
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (rc != 0)
-	{
-		if (rc == EINVAL)
-		{
+	if (rc != 0) {
+		if (rc == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		} else
-		{
+		} else {
 			printf("Test FAILED: Incorrect return code %d\n", rc);
 			return PTS_FAIL;
 		}
 	}
 
-	printf("Test PASSED: Note*: Returned 0 instead of EINVAL, but standard specified _may_ fail. \n");
+	printf
+	    ("Test PASSED: Note*: Returned 0 instead of EINVAL, but standard specified _may_ fail. \n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/1-1.c
index 7b00758..d2ccfa3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/1-1.c
@@ -48,56 +48,56 @@
 #define PASSED_RLOCK2 4
 #define EXITING_THREAD 5
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 
 	thread_state = ENTERED_THREAD;
 	printf("thread: attempt 1st read lock\n");
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("thread: cannot get read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 	printf("thread: acquired read lock\n");
 	printf("thread: unlock read lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread: Error at pthread_rwlock_unlock(), Error Code=%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread: Error at pthread_rwlock_unlock(), Error Code=%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 
 	thread_state = PASSED_RLOCK1;
 	printf("thread: attempt 2nd read lock\n");
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("thread: cannot get read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 	printf("thread: acquired read lock\n");
 	printf("thread: unlock read lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread: Error at 2nd pthread_rwlock_unlock(), Error Code=%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread: Error at 2nd pthread_rwlock_unlock(), Error Code=%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 
 	thread_state = PASSED_RLOCK2;
 	/* The thread should block here */
 	printf("thread: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("thread: cannot get write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 	printf("thread: acquired write lock\n");
 	printf("thread: unlock write lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread failed to release write lock, Error Code=%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread failed to release write lock, Error Code=%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 	thread_state = EXITING_THREAD;
@@ -111,8 +111,7 @@
 
 	pthread_t rd_thread;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -120,16 +119,14 @@
 	printf("main: attempt read lock\n");
 
 	/* This read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread\n");
-	if (pthread_create(&rd_thread, NULL, fn_rd, NULL) != 0)
-	{
+	if (pthread_create(&rd_thread, NULL, fn_rd, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -137,23 +134,18 @@
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=PASSED_RLOCK2 && cnt++ < 3);
+	} while (thread_state != PASSED_RLOCK2 && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Thread should not block on first read lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (thread_state == PASSED_RLOCK1)
-	{
-		/* child thread blocked on second read lock*/
+	} else if (thread_state == PASSED_RLOCK1) {
+		/* child thread blocked on second read lock */
 		printf("thread should not block on second read lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (thread_state != PASSED_RLOCK2)
-	{
+	} else if (thread_state != PASSED_RLOCK2) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -161,31 +153,28 @@
 	/* thread_state == 4, i.e. child thread blocks on write lock */
 	printf("main: unlock read lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Main cannot release read lock\n");
 		exit(PTS_FAIL);
 	}
 
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state != EXITING_THREAD)
-	{
-		printf("Test FAILED: thread did not get write lock even when the lock has no owner\n");
+	if (thread_state != EXITING_THREAD) {
+		printf
+		    ("Test FAILED: thread did not get write lock even when the lock has no owner\n");
 		exit(PTS_FAIL);
 	}
 
-	if (pthread_join(rd_thread, NULL) != 0)
-	{
+	if (pthread_join(rd_thread, NULL) != 0) {
 		printf("Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/2-1.c
index 0216e71..bf47533 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/2-1.c
@@ -41,24 +41,24 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 	int rc = 0;
 
 	thread_state = ENTERED_THREAD;
 	printf("thread: attempt write block\n");
 	/* This should block */
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("thread: cannot get write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 	printf("thread: acquired write lock\n");
 	printf("thread: unlock write lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread failed to release write lock, Error Code=%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread failed to release write lock, Error Code=%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 	thread_state = EXITING_THREAD;
@@ -72,24 +72,21 @@
 
 	pthread_t wr_thread;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
 	/* This write lock should succeed */
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread\n");
-	if (pthread_create(&wr_thread, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&wr_thread, NULL, fn_wr, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -97,17 +94,14 @@
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		printf("Thread should block on write lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("Unexpected thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
@@ -115,31 +109,28 @@
 	/* thread_state == ENTERED_THREAD, i.e. thread correctly blocks on write lock */
 	printf("main: unlock write lock\n");
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Main cannot release write lock\n");
 		exit(PTS_FAIL);
 	}
 
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state != EXITING_THREAD)
-	{
-		printf("Test FAILED: thread did not get write lock even when the lock has no owner\n");
+	if (thread_state != EXITING_THREAD) {
+		printf
+		    ("Test FAILED: thread did not get write lock even when the lock has no owner\n");
 		exit(PTS_FAIL);
 	}
 
-	if (pthread_join(wr_thread, NULL) != 0)
-	{
+	if (pthread_join(wr_thread, NULL) != 0) {
 		printf("Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/3-1.c
index 91011c5..be3dcdf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/3-1.c
@@ -63,19 +63,17 @@
 
 static int set_priority(pthread_t pid, unsigned policy, unsigned prio)
 {
-        struct sched_param sched_param;
-        memset(&sched_param, 0, sizeof(sched_param));
-        sched_param.sched_priority = prio;
-        if (pthread_setschedparam(pid, policy, &sched_param) == -1)
-        {
-                printf("Can't set policy to %d and prio to %d\n",
-                        policy, prio);
-                exit(PTS_UNRESOLVED);
-        }
-      return 0;
+	struct sched_param sched_param;
+	memset(&sched_param, 0, sizeof(sched_param));
+	sched_param.sched_priority = prio;
+	if (pthread_setschedparam(pid, policy, &sched_param) == -1) {
+		printf("Can't set policy to %d and prio to %d\n", policy, prio);
+		exit(PTS_UNRESOLVED);
+	}
+	return 0;
 }
 
-static void* fn_rd(void *arg)
+static void *fn_rd(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -86,10 +84,10 @@
 
 	printf("reader: attempt read lock\n");
 	rc = pthread_rwlock_rdlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Error: rd_thread failed to get read lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Error: rd_thread failed to get read lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -97,13 +95,12 @@
 	printf("reader: acquired read lock\n");
 
 	/* Wait for main to wake us up */
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state != EXITING_THREAD);
+	} while (rd_thread_state != EXITING_THREAD);
 
 	printf("reader: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("rd_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -111,7 +108,7 @@
 	return NULL;
 }
 
-static void* fn_wr_1(void *arg)
+static void *fn_wr_1(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -122,10 +119,10 @@
 
 	printf("writer1: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Error: wr_thread failed to get write lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Error: wr_thread failed to get write lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -134,13 +131,12 @@
 
 	/* Wait for main to wake us up */
 
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_1 != EXITING_THREAD);
+	} while (wr_thread_state_1 != EXITING_THREAD);
 
 	printf("writer1: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("wr_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -149,7 +145,7 @@
 	return NULL;
 }
 
-static void* fn_wr_2(void *arg)
+static void *fn_wr_2(void *arg)
 {
 	int rc = 0;
 	int priority;
@@ -160,10 +156,10 @@
 
 	printf("writer2: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Error: wr_thread failed to get write lock, Error code:%d\n"
-			, rc);
+	if (rc != 0) {
+		printf
+		    ("Error: wr_thread failed to get write lock, Error code:%d\n",
+		     rc);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -171,13 +167,12 @@
 	printf("writer2: acquired writer lock\n");
 
 	/* Wait for main to wake us up */
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_2 != EXITING_THREAD);
+	} while (wr_thread_state_2 != EXITING_THREAD);
 
 	printf("writer2: unlock writer lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("wr_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -188,30 +183,29 @@
 
 int main()
 {
-	#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
-  		printf("Posix Thread Execution Scheduling not supported\n");
-  		return PTS_UNSUPPORTED;
-	#endif
+#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
+	printf("Posix Thread Execution Scheduling not supported\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	int cnt = 0;
 	pthread_t writer1, reader, writer2;
 	int priority;
 
-	/* main thread needs to have the highest priority*/
+	/* main thread needs to have the highest priority */
 	priority = sched_get_priority_min(TRD_POLICY) + 3;
 	set_priority(pthread_self(), TRD_POLICY, priority);
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: write lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
-		printf("Error: main cannot get write lock when no one owns the lock\n");
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
+		printf
+		    ("Error: main cannot get write lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -220,8 +214,8 @@
 	wr_thread_state_1 = NOT_CREATED_THREAD;
 	priority = sched_get_priority_min(TRD_POLICY) + 2;
 	printf("main: create writer1, with priority: %d\n", priority);
-	if (pthread_create(&writer1, NULL, fn_wr_1, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&writer1, NULL, fn_wr_1, (void *)(long)priority) !=
+	    0) {
 		printf("main: Error creating writer1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -231,17 +225,15 @@
 
 	/* We expect the writer1 to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_1 != 3 && cnt++ < 3);
+	} while (wr_thread_state_1 != 3 && cnt++ < 3);
 
-	if (wr_thread_state_1 == 3)
-	{
-		printf("writer1 did not block on write lock, when main owns the lock\n");
+	if (wr_thread_state_1 == 3) {
+		printf
+		    ("writer1 did not block on write lock, when main owns the lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (wr_thread_state_1 != 2)
-	{
+	} else if (wr_thread_state_1 != 2) {
 		printf("Unexpected writer1 state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -249,27 +241,23 @@
 	/* Reader thread same priority as Writer1 thread */
 
 	rd_thread_state = 1;
-	priority = sched_get_priority_min(TRD_POLICY)+2;
+	priority = sched_get_priority_min(TRD_POLICY) + 2;
 	printf("main: create reader, with priority: %d\n", priority);
-	if (pthread_create(&reader, NULL, fn_rd, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&reader, NULL, fn_rd, (void *)(long)priority) != 0) {
 		printf("main: failed at creating reader\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* We expect the reader to block*/
+	/* We expect the reader to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state != 3 && cnt++ < 2);
+	} while (rd_thread_state != 3 && cnt++ < 2);
 
-	if (rd_thread_state == 3)
-	{
+	if (rd_thread_state == 3) {
 		printf("Test Fail: reader did not block on read lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != 2)
-	{
+	} else if (rd_thread_state != 2) {
 		printf("Unexpected reader state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -279,8 +267,8 @@
 	wr_thread_state_2 = 1;
 	priority = sched_get_priority_min(TRD_POLICY);
 	printf("main: create writer2, with priority: %d\n", priority);
-	if (pthread_create(&writer2, NULL, fn_wr_2, (void*)(long)priority) != 0)
-	{
+	if (pthread_create(&writer2, NULL, fn_wr_2, (void *)(long)priority) !=
+	    0) {
 		printf("main: Error creating writer2\n");
 		return PTS_UNRESOLVED;
 	}
@@ -290,67 +278,59 @@
 
 	/* We expect the writer2 to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_2 != 3 && cnt++ < 2);
+	} while (wr_thread_state_2 != 3 && cnt++ < 2);
 
-	if (wr_thread_state_2 == 3)
-	{
-		printf("writer2 did not block on write lock, when main owns the lock\n");
+	if (wr_thread_state_2 == 3) {
+		printf
+		    ("writer2 did not block on write lock, when main owns the lock\n");
 		exit(PTS_UNRESOLVED);
-	}
-	else if (wr_thread_state_2 != 2)
-	{
+	} else if (wr_thread_state_2 != 2) {
 		printf("Unexpected writer1 state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: release write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: failed to release write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* we expect writer1 get the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_1 != 3 && cnt++ < 3);
+	} while (wr_thread_state_1 != 3 && cnt++ < 3);
 
-	if (wr_thread_state_1 == 2)
-	{
-		printf("Test fail: writer did not get write lock, when main release the lock\n");
+	if (wr_thread_state_1 == 2) {
+		printf
+		    ("Test fail: writer did not get write lock, when main release the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (wr_thread_state_1 != 3)
-	{
+	} else if (wr_thread_state_1 != 3) {
 		printf("Unexpected writer1 state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	/* Let writer1 release the lock*/
+	/* Let writer1 release the lock */
 	wr_thread_state_1 = 4;
 
-	if (pthread_join(writer1, NULL) != 0)
-	{
+	if (pthread_join(writer1, NULL) != 0) {
 		printf("main: Error joining writer1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	/* we expect the reader get the lock when writer1 has release the lock*/
+	/* we expect the reader get the lock when writer1 has release the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (rd_thread_state !=3 && cnt++ < 3);
+	} while (rd_thread_state != 3 && cnt++ < 3);
 
-	if (rd_thread_state == 2)
-	{
-		printf("Test failed: reader did not get the lock when writer1 release the lock\n");
+	if (rd_thread_state == 2) {
+		printf
+		    ("Test failed: reader did not get the lock when writer1 release the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (rd_thread_state != 3)
-	{
+	} else if (rd_thread_state != 3) {
 		printf("Unexpected reader state\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -358,39 +338,34 @@
 	/* Inform reader release the lock */
 	rd_thread_state = 4;
 
-	if (pthread_join(reader, NULL) != 0)
-	{
+	if (pthread_join(reader, NULL) != 0) {
 		printf("main: Error joining reader\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* we expect writer2 get the lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (wr_thread_state_2 !=3 && cnt++ < 3);
+	} while (wr_thread_state_2 != 3 && cnt++ < 3);
 
-	if (wr_thread_state_2 == 2)
-	{
-		printf("Test fail: writer2 still blocked on write lock, when main release the lock\n");
+	if (wr_thread_state_2 == 2) {
+		printf
+		    ("Test fail: writer2 still blocked on write lock, when main release the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (wr_thread_state_2 != 3)
-	{
+	} else if (wr_thread_state_2 != 3) {
 		printf("Unexpected writer2 state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	wr_thread_state_2 = 4;
 
-	if (pthread_join(writer2, NULL) != 0)
-	{
+	if (pthread_join(writer2, NULL) != 0) {
 		printf("main: Error joining writer1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
index ebf7d19..a85ce7c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-1.c
@@ -33,18 +33,19 @@
 	int rc;
 
 	rc = pthread_rwlock_unlock(&rwlock);
-	if (rc != 0)
-	{
-		if (rc == EINVAL)
-		{
+	if (rc != 0) {
+		if (rc == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Incorrect error code, expected 0 or EINVAL, got %d\n", rc);
+		printf
+		    ("Test FAILED: Incorrect error code, expected 0 or EINVAL, got %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: Note*: Returned 0 instead of EINVAL, but standard specified _may_ fail.\n");
+	printf
+	    ("Test PASSED: Note*: Returned 0 instead of EINVAL, but standard specified _may_ fail.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c
index 4928f85..9229080 100755
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_unlock/4-2.c
@@ -42,7 +42,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_unlk(void *arg)
+static void *fn_unlk(void *arg)
 {
 	thread_state = ENTERED_THREAD;
 	printf("un_thread: unlock read lock\n");
@@ -57,16 +57,14 @@
 
 	pthread_t un_thread;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("main: Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("main: Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -75,34 +73,30 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create un_thread\n");
-	if (pthread_create(&un_thread, NULL, fn_unlk, NULL) != 0)
-	{
+	if (pthread_create(&un_thread, NULL, fn_unlk, NULL) != 0) {
 		printf("main: Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for child to exit */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state != EXITING_THREAD)
-	{
+	if (thread_state != EXITING_THREAD) {
 		printf("Unexpected thread state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(un_thread, NULL) != 0)
-	{
+	if (pthread_join(un_thread, NULL) != 0) {
 		printf("Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* Cleaning up */
 	pthread_rwlock_unlock(&rwlock);
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -110,18 +104,19 @@
 	/* Test the return code of un_thread when it attempt to unlock the rwlock it didn't
 	 * own in the first place. */
 
-	if (rc != 0)
-	{
-		if (rc == EPERM)
-		{
+	if (rc != 0) {
+		if (rc == EPERM) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: Incorrect error code, expected 0 or EPERM, got %d\n", rc);
+		printf
+		    ("Test FAILED: Incorrect error code, expected 0 or EPERM, got %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n");
+	printf
+	    ("Test PASSED: Note*: Returned 0 instead of EPERM, but standard specified _may_ fail.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/1-1.c
index dec0cd9..4bd46b9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/1-1.c
@@ -42,7 +42,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_wr(void *arg)
+static void *fn_wr(void *arg)
 {
 
 	thread_state = ENTERED_THREAD;
@@ -50,19 +50,17 @@
 
 	printf("thread: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc == 0)
-	{
+	if (rc == 0) {
 		printf("thread: acquired write lock\n");
 		printf("thread: unlock write lock\n");
-		if (pthread_rwlock_unlock(&rwlock) != 0)
-		{
+		if (pthread_rwlock_unlock(&rwlock) != 0) {
 			printf("thread1: Error at pthread_rwlock_unlock()\n");
 			exit(PTS_UNRESOLVED);
 		}
-	}
-	else
-	{
-		printf("Test FAILED: Error in pthread_rwlock_wrlock(), error code: %d\n", rc);
+	} else {
+		printf
+		    ("Test FAILED: Error in pthread_rwlock_wrlock(), error code: %d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 
@@ -76,16 +74,14 @@
 	int cnt = 0;
 	pthread_t thread1, thread2;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt read lock\n");
 	/* We have no lock, this read lock should succeed */
-	if (pthread_rwlock_rdlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_rdlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -93,8 +89,7 @@
 	printf("main: acquired read lock\n");
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread1\n");
-	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread1, NULL, fn_wr, NULL) != 0) {
 		printf("Error creating thread1\n");
 		return PTS_UNRESOLVED;
 	}
@@ -102,26 +97,22 @@
 	/* If the shared data is not altered by child after 3 seconds,
 	   we regard it as blocked */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		/* the child thread did not block */
 		printf("Test FAILED: The thread1 did not block\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
-		/* for some reason the child thread did not start*/
+	} else if (thread_state != ENTERED_THREAD) {
+		/* for some reason the child thread did not start */
 		printf("Child thread in unexpected state\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock read lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error releasing read lock\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -130,32 +121,27 @@
 	   we regard it as blocked */
 	/* thread1 should get the write lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		/* the child thread should get the lock */
 		printf("Test FAILEd: thread1 did not get the write lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
-		/* for some reason the child does not start*/
+	} else if (thread_state != EXITING_THREAD) {
+		/* for some reason the child does not start */
 		printf("Child thread1 in unexpected state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread1, NULL) != 0)
-	{
+	if (pthread_join(thread1, NULL) != 0) {
 		printf("Error joining thread1\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("Test FAILED: main: Error geting write lock\n");
 		return PTS_FAIL;
 	}
@@ -165,44 +151,37 @@
 	thread_state = NOT_CREATED_THREAD;
 	cnt = 0;
 	printf("main: create thread2\n");
-	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0)
-	{
+	if (pthread_create(&thread2, NULL, fn_wr, NULL) != 0) {
 		printf("main: Error creating thread2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Thread2 should block */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state !=EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
+	if (thread_state == EXITING_THREAD) {
 		printf("Test FAILED: thread2 should have block\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("thread2 in unexpected state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	printf("main: unlock write lock\n");
 
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error at releasing write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_join(thread2, NULL) != 0)
-	{
+	if (pthread_join(thread2, NULL) != 0) {
 		printf("main: Error joining thread2\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/2-1.c
index 6a4055d..80f6856 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/2-1.c
@@ -44,20 +44,18 @@
 static int thread_state;
 static int handler_called;
 
-static void sig_handler() {
-	if (pthread_equal(pthread_self(), sig_thread))
-	{
+static void sig_handler()
+{
+	if (pthread_equal(pthread_self(), sig_thread)) {
 		printf("sig_handler: handled signal SIGUSR1\n");
 		handler_called = 1;
-	}
-	else
-	{
+	} else {
 		printf("signal was not handled by sig_thread\n");
 		exit(PTS_UNRESOLVED);
 	}
 }
 
-static void * th_fn(void *arg)
+static void *th_fn(void *arg)
 {
 	struct sigaction act;
 	int rc = 0;
@@ -72,20 +70,20 @@
 	thread_state = ENTERED_THREAD;
 	printf("sig_thread: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: sig_thread: Error at pthread_rwlock_wrlock(), error code:%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: sig_thread: Error at pthread_rwlock_wrlock(), error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 
 	printf("sig_thread: acquired write lock\n");
 	printf("sig_thread: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("sig_thread: Error at pthread_rwlock_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
- 	thread_state = EXITING_THREAD;
+	thread_state = EXITING_THREAD;
 	pthread_exit(0);
 	return NULL;
 }
@@ -94,108 +92,101 @@
 {
 	int cnt;
 	int rc = 0;
-	handler_called=0;
+	handler_called = 0;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: attempt write lock\n");
 	rc = pthread_rwlock_wrlock(&rwlock);
-	if (rc != 0)
-	{
-		printf("main: Error at pthread_rwlock_wrlock(), error code:%d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("main: Error at pthread_rwlock_wrlock(), error code:%d\n",
+		     rc);
 		return PTS_UNRESOLVED;
 	}
 
 	thread_state = NOT_CREATED_THREAD;
-	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0)
-	{
+	if (pthread_create(&sig_thread, NULL, th_fn, NULL) != 0) {
 		printf("Error at pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	/* wait at most 3 seconds for sig_thread to block*/
+	/* wait at most 3 seconds for sig_thread to block */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		/* the sig_thread is not blocking*/
-		printf("Test FAILED: the thread should block when getting write lock\n");
+	if (thread_state == EXITING_THREAD) {
+		/* the sig_thread is not blocking */
+		printf
+		    ("Test FAILED: the thread should block when getting write lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("sig_thread in unexpected state %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread is blocking */
 	printf("main: fire SIGUSR1 to sig_thread\n");
-	if (pthread_kill(sig_thread, SIGUSR1) != 0)
-	{
+	if (pthread_kill(sig_thread, SIGUSR1) != 0) {
 		printf("Error at pthread_kill()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* wait at most 3 seconds for the singal to be handled */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (handler_called == 0 && cnt++ < 3);
+	} while (handler_called == 0 && cnt++ < 3);
 
-	if (handler_called != 1)
-	{
+	if (handler_called != 1) {
 		printf("The signal handler did not get called.\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread resume to block? */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == 3)
-	{
-		printf("Test FAILED: upon return from signal handler, sig_thread does not resume to wait\n");
+	if (thread_state == 3) {
+		printf
+		    ("Test FAILED: upon return from signal handler, sig_thread does not resume to wait\n");
 		exit(PTS_FAIL);
 	}
 
-	printf("sig_thread: correctly still blocking after signal handler returns\n");
+	printf
+	    ("sig_thread: correctly still blocking after signal handler returns\n");
 	printf("main: unlock write lock\n");
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("main: Error releasing write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	/* sig_thread should get write lock */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state != EXITING_THREAD)
-	{
+	if (thread_state != EXITING_THREAD) {
 		/* sig_thread does not unblock */
-		printf("Test FAILED: sig_thread should get the write lock and exit\n");
+		printf
+		    ("Test FAILED: sig_thread should get the write lock and exit\n");
 		exit(PTS_FAIL);
 	}
 
-	if (pthread_join(sig_thread, NULL) != 0)
-	{
+	if (pthread_join(sig_thread, NULL) != 0) {
 		printf("Error at pthread_join()\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("pthread_rwlock_destroy()\n");
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/3-1.c
index 3629597..2f945cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/3-1.c
@@ -30,8 +30,7 @@
 	static pthread_rwlock_t rwlock;
 	int rc;
 
-	if (pthread_rwlock_init(&rwlock, NULL) != 0)
-	{
+	if (pthread_rwlock_init(&rwlock, NULL) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -39,8 +38,7 @@
 	/* Attempt to write lock rwlock, it should return successfully */
 
 	printf("main: attempt write lock\n");
-	if (pthread_rwlock_wrlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_wrlock(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_wrlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -53,27 +51,22 @@
 	rc = pthread_rwlock_wrlock(&rwlock);
 
 	/* Clean up before we test the return value of pthread_rwlock_wrlock() */
-	if (pthread_rwlock_unlock(&rwlock) != 0)
-	{
+	if (pthread_rwlock_unlock(&rwlock) != 0) {
 		printf("Error releasing write lock\n");
 		exit(PTS_UNRESOLVED);
 	}
 
-	if (pthread_rwlock_destroy(&rwlock) != 0)
-	{
+	if (pthread_rwlock_destroy(&rwlock) != 0) {
 		printf("Error at pthread_rwlock_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (rc != 0)
-	{
-		if (rc == EDEADLK)
-		{
+	if (rc != 0) {
+		if (rc == EDEADLK) {
 			printf("main: correctly got EDEADLK\n");
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		} else
-		{
+		} else {
 			printf("Test FAILED: Incorrect return code %d\n", rc);
 			return PTS_FAIL;
 		}
@@ -82,6 +75,7 @@
 	printf("main: acquired write lock\n");
 	printf("main: unlock write lock\n");
 
-	printf("Test PASSED: Note*: Returned 0 instead of EDEADLK, but standard specified _may_ fail.\n");
+	printf
+	    ("Test PASSED: Note*: Returned 0 instead of EDEADLK, but standard specified _may_ fail.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/1-1.c
index 45a6b6f..8edbb5c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/1-1.c
@@ -27,17 +27,18 @@
 
 	/* Initialize a rwlock attributes object */
 	rc = pthread_rwlockattr_init(&rwla);
-	if (rc != 0)
-	{
-		printf("Error at pthread_rwlockattr_init(), error code: %d\n", rc);
+	if (rc != 0) {
+		printf("Error at pthread_rwlockattr_init(), error code: %d\n",
+		       rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the rwlock attributes object */
 	rc = pthread_rwlockattr_destroy(&rwla);
-	if (rc != 0)
-	{
-		printf("Error at pthread_rwlockattr_destroy(), error code: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Error at pthread_rwlockattr_destroy(), error code: %d\n",
+		     rc);
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/2-1.c
index bbceb64..85814a4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/2-1.c
@@ -29,30 +29,27 @@
 
 	/* Initialize a rwlock attributes object */
 	rc = pthread_rwlockattr_init(&rwla);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Cannot initialize rwlock attributes object\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the rwlock attributes object */
 	rc = pthread_rwlockattr_destroy(&rwla);
-	if (rc != 0)
-	{
-		printf("Cannot destroy the rwlock attributes object, error code: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Cannot destroy the rwlock attributes object, error code: %d\n",
+		     rc);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize the rwlock attributes object again.  This shouldn't result in an error. */
 	rc = pthread_rwlockattr_init(&rwla);
 
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED, with error: %d\n", rc);
 		return PTS_FAIL;
-	}
-	else
-	{
+	} else {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/1-1.c
index 3c31693..8929219 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/1-1.c
@@ -25,29 +25,29 @@
 	int pshared;
 	int rc = 0;
 
-	#ifndef PTHREAD_PROCESS_SHARED
-	  printf("process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	printf("process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	/* Initialize a rwlock attributes object */
-	if (pthread_rwlockattr_init(&rwla) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwla) != 0) {
 		printf("Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
 	rc = pthread_rwlockattr_getpshared(&rwla, &pshared);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlockattr_getpshared(): %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlockattr_getpshared(): %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Incorrect default pshared value: %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Incorrect default pshared value: %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/2-1.c
index 573090d..015274a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/2-1.c
@@ -34,7 +34,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-struct shmstruct{
+struct shmstruct {
 	pthread_rwlock_t rwl;
 	int data;
 } *rwlock_data;
@@ -43,10 +43,11 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	pthread_rwlockattr_t rwla;
 	int pshared = PTHREAD_PROCESS_SHARED;
@@ -56,71 +57,66 @@
 	int pid;
 
 	/* Initialize a rwlock attributes object */
-	if (pthread_rwlockattr_init(&rwla) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwla) != 0) {
 		printf("Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlockattr_setpshared(&rwla, pshared) != 0)
-	{
+	if (pthread_rwlockattr_setpshared(&rwla, pshared) != 0) {
 		printf("Error at pthread_rwlockattr_setpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlockattr_getpshared()\n");
+	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlockattr_getpshared()\n");
 		return PTS_FAIL;
 	}
 
-	if (pshared != PTHREAD_PROCESS_SHARED)
-	{
-		printf("Test FAILED: Got error shared attribute value %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_SHARED) {
+		printf("Test FAILED: Got error shared attribute value %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
 	/* Create shared object */
 	shm_unlink(shm_name);
-	shm_fd = shm_open(shm_name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
-	if (shm_fd == -1)
-	{
+	shm_fd =
+	    shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+	if (shm_fd == -1) {
 		perror("Error at shm_open()");
 		return PTS_UNRESOLVED;
 	}
 
-        if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
-                perror("Error at ftruncate()");
-                shm_unlink(shm_name);
-                return PTS_UNRESOLVED;
-        }
-
-	/* Map the shared memory object to my memory */
-	rwlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
-
-	if (rwlock_data == MAP_FAILED)
-	{
-		perror("Error at first mmap()");
-                shm_unlink(shm_name);
+	if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
+		perror("Error at ftruncate()");
+		shm_unlink(shm_name);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((pthread_rwlock_init(&(rwlock_data->rwl), &rwla)) != 0)
-	{
+	/* Map the shared memory object to my memory */
+	rwlock_data =
+	    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, shm_fd, 0);
+
+	if (rwlock_data == MAP_FAILED) {
+		perror("Error at first mmap()");
+		shm_unlink(shm_name);
+		return PTS_UNRESOLVED;
+	}
+
+	if ((pthread_rwlock_init(&(rwlock_data->rwl), &rwla)) != 0) {
 		printf("Error at pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((pthread_rwlockattr_destroy(&rwla)) != 0)
-	{
+	if ((pthread_rwlockattr_destroy(&rwla)) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("Parent getting read lock.\n");
-	if ((pthread_rwlock_rdlock(&(rwlock_data->rwl))) != 0)
-	{
+	if ((pthread_rwlock_rdlock(&(rwlock_data->rwl))) != 0) {
 		printf("Error at pthread_rwlock_rdlock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -128,23 +124,18 @@
 	rwlock_data->data = 0;
 
 	pid = fork();
-	if (pid == -1)
-	{
+	if (pid == -1) {
 		perror("Error at fork()");
 		return PTS_UNRESOLVED;
-	}
-	else if (pid > 0)
-	{
+	} else if (pid > 0) {
 		/* Parent */
 		/* wait until child do wrlock */
-		while (rwlock_data->data == 0)
-		{
+		while (rwlock_data->data == 0) {
 			sleep(1);
 		}
 
 		printf("Parent unlocking.\n");
-		if (pthread_rwlock_unlock(&(rwlock_data->rwl)) != 0)
-		{
+		if (pthread_rwlock_unlock(&(rwlock_data->rwl)) != 0) {
 			printf("Parent: error at pthread_rwlock_unlock()\n");
 			return PTS_FAIL;
 		}
@@ -153,37 +144,33 @@
 		/* Wait for child to end */
 		wait(NULL);
 
-		if ((shm_unlink(shm_name)) != 0)
-		{
+		if ((shm_unlink(shm_name)) != 0) {
 			perror("Error at shm_unlink()");
 			return PTS_UNRESOLVED;
 		}
 
-		if (rwlock_data->data == -1)
-		{
-			printf("Test FAILED: child did not block on write lock\n");
+		if (rwlock_data->data == -1) {
+			printf
+			    ("Test FAILED: child did not block on write lock\n");
 			return PTS_FAIL;
 		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		/* Child */
 		/* Map the shared object to child's memory */
-		rwlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+		rwlock_data =
+		    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+			 MAP_SHARED, shm_fd, 0);
 
-		if (rwlock_data == MAP_FAILED)
-		{
+		if (rwlock_data == MAP_FAILED) {
 			perror("Error at first mmap()");
 			return PTS_UNRESOLVED;
 		}
 
 		printf("Child tries to get write lock, should get EBUSY.\n");
-		if ((pthread_rwlock_trywrlock(&(rwlock_data->rwl))) != EBUSY)
-		{
+		if ((pthread_rwlock_trywrlock(&(rwlock_data->rwl))) != EBUSY) {
 			printf("Test FAILED: Child expects EBUSY\n");
 			return PTS_FAIL;
 		}
@@ -195,16 +182,15 @@
 		rwlock_data->data = 1;
 
 		/* Should block until parent unlock */
-		if ((pthread_rwlock_wrlock(&(rwlock_data->rwl))) != 0)
-		{
+		if ((pthread_rwlock_wrlock(&(rwlock_data->rwl))) != 0) {
 			printf("Child:pthread_rwlock_wrlock() error\n");
-			printf("Test FAILED: Error while write lock the shared rwlock\n");
+			printf
+			    ("Test FAILED: Error while write lock the shared rwlock\n");
 			rwlock_data->data = -1;
 			return PTS_FAIL;
 		}
 		printf("Child got wrlock.\n");
-		if ((pthread_rwlock_unlock(&(rwlock_data->rwl))) != 0)
-		{
+		if ((pthread_rwlock_unlock(&(rwlock_data->rwl))) != 0) {
 			printf("Child:pthread_rwlock_unlock() error\n");
 			printf("Error while write unlock the shared rwlock\n");
 			rwlock_data->data = -1;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/4-1.c
index 422bb03..75e29c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_getpshared/4-1.c
@@ -25,34 +25,31 @@
 	pthread_rwlockattr_t rwla;
 	int pshared;
 
-	#ifndef PTHREAD_PROCESS_SHARED
-	  printf("process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	printf("process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	/* Initialize a rwlock attributes object */
-	if (pthread_rwlockattr_init(&rwla) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwla) != 0) {
 		printf("Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	 /* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0)
-	{
+	/* The default 'pshared' attribute should be PTHREAD_PROCESS_PRIVATE  */
+	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
 		printf("Error at pthread_rwlockattr_getpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Incorrect default pshared value: %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf("Test FAILED: Incorrect default pshared value: %d\n",
+		       pshared);
 		return PTS_FAIL;
 	}
 
 	/* Cleanup */
-	if ((pthread_rwlockattr_destroy(&rwla)) != 0)
-	{
+	if ((pthread_rwlockattr_destroy(&rwla)) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/1-1.c
index 8c0e4d5..01b263e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/1-1.c
@@ -31,34 +31,31 @@
 #endif
 	/* Initialize a read-write lock attributes object */
 	rc = pthread_rwlockattr_init(&rwa);
-	if (rc != 0)
-	{
-		printf("Test FAILED, pthread_rwlockattr_init() returns %d\n", rc);
+	if (rc != 0) {
+		printf("Test FAILED, pthread_rwlockattr_init() returns %d\n",
+		       rc);
 		return PTS_FAIL;
 	}
-
 #ifdef PTHREAD_PROCESS_SHARED
 	/* If the symbol {PTHREAD_PROCESS_SHARED} is defined, the attribute
 	 * process-shared should be provided and its default value should be
 	 * PTHREAD_PROCESS_PRIVATE  */
-	if (pthread_rwlockattr_getpshared(&rwa, &pshared) != 0)
-	{
+	if (pthread_rwlockattr_getpshared(&rwa, &pshared) != 0) {
 		printf("Error obtaining the attribute process-shared\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared == PTHREAD_PROCESS_PRIVATE)
-	{
+	if (pshared == PTHREAD_PROCESS_PRIVATE) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
-		printf("Test FAILED, the default process-shared attribute is not PTHREAD_PROCESS_PRIVATE\n");
+	} else {
+		printf
+		    ("Test FAILED, the default process-shared attribute is not PTHREAD_PROCESS_PRIVATE\n");
 		return PTS_FAIL;
 	}
 #endif
 
-	fprintf(stderr,"process-shared attribute is not available for testing\n");
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/2-1.c
index a36a060..acbb3fb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/2-1.c
@@ -30,50 +30,42 @@
 
 	/* Initialize a read-write lock attributes object */
 	rc = pthread_rwlockattr_init(&rwa);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_rwlockattr_init(), returns %d\n", rc);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc = pthread_rwlock_init(&rwl1, &rwa)) != 0)
-	{
+	if ((rc = pthread_rwlock_init(&rwl1, &rwa)) != 0) {
 		printf("Error at 1st pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc = pthread_rwlock_init(&rwl2, &rwa)) != 0)
-	{
+	if ((rc = pthread_rwlock_init(&rwl2, &rwa)) != 0) {
 		printf("Error at 2nd pthread_rwlock_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc = pthread_rwlock_rdlock(&rwl1)) != 0)
-	{
+	if ((rc = pthread_rwlock_rdlock(&rwl1)) != 0) {
 		printf("Error at pthread_rwlock_rdlock(): rwl1\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((rc = pthread_rwlockattr_destroy(&rwa)) != 0)
-	{
+	if ((rc = pthread_rwlockattr_destroy(&rwa)) != 0) {
 		printf("Error at pthread_rwlockattr_destory()\n");
 		return PTS_UNRESOLVED;
 	}
-	if ((rc = pthread_rwlock_unlock(&rwl1)) != 0)
-	{
+	if ((rc = pthread_rwlock_unlock(&rwl1)) != 0) {
 		printf("Error at pthread_rwlock_unlock: rwl1\n");
 		printf("Test Failed.\n");
 		return PTS_FAIL;
 	}
 
-	if ((rc = pthread_rwlock_rdlock(&rwl2)) != 0)
-	{
+	if ((rc = pthread_rwlock_rdlock(&rwl2)) != 0) {
 		printf("Error at pthread_rwlock_rdlock():rwl2\n");
 		printf("Test Failed.\n");
 		return PTS_FAIL;
 	}
-	if ((rc = pthread_rwlock_unlock(&rwl2)) != 0)
-	{
+	if ((rc = pthread_rwlock_unlock(&rwl2)) != 0) {
 		printf("Error at pthread_rwlock_unlock:rwl2\n");
 		printf("Test Failed.\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_setpshared/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_setpshared/1-1.c
index e20eb46..d9bd9dc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_setpshared/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_setpshared/1-1.c
@@ -27,58 +27,58 @@
 	int pshared;
 	int rc = 0;
 
-	#ifndef PTHREAD_PROCESS_SHARED
-	  printf("process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	printf("process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	/* Initialize a rwlock attributes object */
-	if (pthread_rwlockattr_init(&rwla) != 0)
-	{
+	if (pthread_rwlockattr_init(&rwla) != 0) {
 		printf("Error at pthread_rwlockattr_init()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_rwlockattr_setpshared(&rwla, PTHREAD_PROCESS_PRIVATE);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlockattr_setpshared(), return error: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlockattr_setpshared(), return error: %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
-	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0)
-	{
+	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
 		printf("Error at pthread_rwlockattr_getpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_PRIVATE)
-	{
-		printf("Test FAILED: Expect PTHREAD_PROCESS_PRIVATE, but got %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_PRIVATE) {
+		printf
+		    ("Test FAILED: Expect PTHREAD_PROCESS_PRIVATE, but got %d\n",
+		     pshared);
 		return PTS_FAIL;
 	}
 
 	rc = pthread_rwlockattr_setpshared(&rwla, PTHREAD_PROCESS_SHARED);
-	if (rc != 0)
-	{
-		printf("Test FAILED: Error at pthread_rwlockattr_setpshared(), return error: %d\n", rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: Error at pthread_rwlockattr_setpshared(), return error: %d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
-	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0)
-	{
+	if (pthread_rwlockattr_getpshared(&rwla, &pshared) != 0) {
 		printf("Error at pthread_rwlockattr_getpshared()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pshared != PTHREAD_PROCESS_SHARED)
-	{
-		printf("Test FAILED: Expect PTHREAD_PROCESS_SHARED, but got %d\n", pshared);
+	if (pshared != PTHREAD_PROCESS_SHARED) {
+		printf
+		    ("Test FAILED: Expect PTHREAD_PROCESS_SHARED, but got %d\n",
+		     pshared);
 		return PTS_FAIL;
 	}
 
-	if (pthread_rwlockattr_destroy(&rwla) != 0)
-	{
+	if (pthread_rwlockattr_destroy(&rwla) != 0) {
 		printf("Error at pthread_rwlockattr_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_self/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_self/1-1.c
index 1c76b43..9babad0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_self/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_self/1-1.c
@@ -23,12 +23,12 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-pthread_t new_th2;	/* Global thread to hold the value of when pthread_self
-			   returns from the thread function. */
+pthread_t new_th2;		/* Global thread to hold the value of when pthread_self
+				   returns from the thread function. */
 
 void *a_thread_func()
 {
-	new_th2=pthread_self();
+	new_th2 = pthread_self();
 	pthread_exit(0);
 	return NULL;
 }
@@ -38,15 +38,13 @@
 	pthread_t new_th1;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th1, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th1, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to return */
-	if (pthread_join(new_th1, NULL) != 0)
-	{
+	if (pthread_join(new_th1, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -55,13 +53,11 @@
 	 * parameters.  It should return a non-zero value, indicating that
 	 * both thread IDs are equal, and therefore refer to the same
 	 * thread. */
-	if (pthread_equal(new_th1, new_th2) == 0)
-	{
+	if (pthread_equal(new_th1, new_th2) == 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
-	if (pthread_equal(new_th1, pthread_self()) != 0)
-	{
+	if (pthread_equal(new_th1, pthread_self()) != 0) {
 		printf("Test FAILED -- 2 threads have the same ID\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-1.c
index 8f19dc4..80c7152 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-1.c
@@ -28,10 +28,10 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cancel_flag;
 
 /* Function that the thread executes upon its creation */
@@ -42,14 +42,14 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	cancel_flag=1;
+	cancel_flag = 1;
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INTHREAD. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* If the thread correctly honors the cancel request, then the cancel_flag will
@@ -58,7 +58,7 @@
 	pthread_testcancel();
 
 	/* Should not reach here if the thread correctly honors the cancel request. */
-	cancel_flag=-1;
+	cancel_flag = -1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -68,43 +68,40 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cancel_flag=0;
+	sem1 = INTHREAD;
+	cancel_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Error sending cancel request\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cancel request was ignored rather than honored, and
 	 * the test fails. */
-	if (cancel_flag < 0)
-	{
-		printf("Test FAILED: Thread of cancel type PTHREAD_CANCEL_ENABLE did not honor cancel request\n");
+	if (cancel_flag < 0) {
+		printf
+		    ("Test FAILED: Thread of cancel type PTHREAD_CANCEL_ENABLE did not honor cancel request\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-2.c
index 2c43a3b..3ca9da9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-2.c
@@ -28,10 +28,10 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cancel_flag;
 
 /* Function that the thread executes upon its creation */
@@ -40,14 +40,14 @@
 	/* Set cancel state to DISABLE, meaning it shouldn't honor any cancel requests. */
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
 
-	cancel_flag=-1;
+	cancel_flag = -1;
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INTHREAD. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* If the thread incorrectly honors the cancel request, then the cancel_flag will
@@ -57,7 +57,7 @@
 
 	/* Should reach here if the thread correctly ignores the cancel
 	 * request. */
-	cancel_flag=1;
+	cancel_flag = 1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -67,42 +67,38 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cancel_flag=0;
+	sem1 = INTHREAD;
+	cancel_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Error sending cancel request\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cancel request was honored rather than ignored, and
 	 * the test fails. */
-	if (cancel_flag <= 0)
-	{
+	if (cancel_flag <= 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/2-1.c
index 743858e..5ea67b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/2-1.c
@@ -23,10 +23,10 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cancel_flag;
 
 /* Function that the thread executes upon its creation */
@@ -37,14 +37,14 @@
 	/* Set cancel type to ASYNCHRONOUS so that it honors cancel requests immediately. */
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	cancel_flag=1;
+	cancel_flag = 1;
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INTHREAD. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* If the thread correctly honors the cancel request, then the cancel_flag will
@@ -53,7 +53,7 @@
 	pthread_testcancel();
 
 	/* Should not reach here if the thread correctly honors the cancel request. */
-	cancel_flag=-1;
+	cancel_flag = -1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -63,43 +63,40 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cancel_flag=0;
+	sem1 = INTHREAD;
+	cancel_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Error sending cancel request\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cancel request was ignored rather than honored, and
 	 * the test fails. */
-	if (cancel_flag < 0)
-	{
-		printf("Test FAILED: Thread default cancel type is not PTHREAD_CANCEL_ENABLE, it did not honor cancel request\n");
+	if (cancel_flag < 0) {
+		printf
+		    ("Test FAILED: Thread default cancel type is not PTHREAD_CANCEL_ENABLE, it did not honor cancel request\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/3-1.c
index 03022de..8552cc2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/3-1.c
@@ -25,13 +25,13 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int ret; 		/* Return value of pthread_setcancelstate(). */
+int ret;			/* Return value of pthread_setcancelstate(). */
 
 /* Function that the thread executes upon its creation */
 void *a_thread_func()
 {
 	/* Set cancel state to an invalid integer and save the return value. */
-	ret=pthread_setcancelstate(-100, NULL);
+	ret = pthread_setcancelstate(-100, NULL);
 
 	pthread_exit(0);
 	return NULL;
@@ -42,33 +42,31 @@
 	pthread_t new_th;
 
 	/* Initializing value */
-	ret=0;
+	ret = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that pthread_setcancelstate() did not give an error when passed an
 	 * invalid state value of -100. */
-	if (ret != EINVAL)
-	{
-		if (ret == 0)
-		{
-			printf("Test PASSED: *NOTE: Returned 0 on error, though standard states 'may' fail.\n");
+	if (ret != EINVAL) {
+		if (ret == 0) {
+			printf
+			    ("Test PASSED: *NOTE: Returned 0 on error, though standard states 'may' fail.\n");
 			return PTS_PASS;
 		}
 
-		printf("Test FAILED: returned invalid error code of %d.\n", ret);
+		printf("Test FAILED: returned invalid error code of %d.\n",
+		       ret);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-1.c
index 9dcdf0a..74a15ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-1.c
@@ -31,19 +31,19 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
-# define TIMEOUT 10	/* Time out time in seconds */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
+#define TIMEOUT 10		/* Time out time in seconds */
 
-int sem1;		/* Manual semaphore */
-int cleanup_flag;	/* Flag to indicate the thread's cleanup handler was called */
-pthread_mutex_t	mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
+int sem1;			/* Manual semaphore */
+int cleanup_flag;		/* Flag to indicate the thread's cleanup handler was called */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=1;
+	cleanup_flag = 1;
 	return;
 }
 
@@ -53,23 +53,22 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Lock the mutex. It should have already been locked in main, so the thread
 	 * should block. */
-	if (pthread_mutex_lock(&mutex) != 0)
-        {
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Shouldn't get here if the cancel request was honored immediately
 	 * like it should have been. */
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	pthread_cleanup_pop(0);
 	pthread_exit(0);
 	return NULL;
@@ -78,42 +77,38 @@
 int main()
 {
 	pthread_t new_th;
-	int i=0;
+	int i = 0;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Send cancel request to the thread.  */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Test FAILED: Error in pthread_cancel()\n");
 		return PTS_UNRESOLVED;
 	}
 	/* Wait for the thread to either cancel immediately (as it should do) and call it's
 	 * cleanup handler, or for TIMEOUT(10) seconds if the cancel request was not honored
 	 * immediately. */
-	while ((cleanup_flag == 0) && (i != TIMEOUT))
-	{
+	while ((cleanup_flag == 0) && (i != TIMEOUT)) {
 		sleep(1);
 		i++;
 	}
@@ -123,8 +118,7 @@
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag <= 0)
-	{
+	if (cleanup_flag <= 0) {
 		printf("Test FAILED: Cancel request timed out\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-2.c
index 3926385..ca4bfaf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/1-2.c
@@ -35,18 +35,18 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
-int cleanup_flag;	/* Flag to indicate the thread's cleanup handler was called */
-pthread_mutex_t	mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
+int sem1;			/* Manual semaphore */
+int cleanup_flag;		/* Flag to indicate the thread's cleanup handler was called */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	return;
 }
 
@@ -56,30 +56,29 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Lock the mutex. It should have already been locked in main, so the thread
 	 * should block. */
-	if (pthread_mutex_lock(&mutex) != 0)
-        {
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Should get here if the cancel request was deffered. */
 	pthread_cleanup_pop(0);
-	cleanup_flag=1;
+	cleanup_flag = 1;
 
 	/* Cancelation point.  Cancel request should not be honored here. */
 	pthread_testcancel();
 
 	/* Should not get here if the cancel request was honored at the cancelation point
 	 * pthread_testcancel(). */
-	cleanup_flag=-2;
+	cleanup_flag = -2;
 	pthread_exit(0);
 	return NULL;
 }
@@ -89,60 +88,54 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Send cancel request to the thread.  */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Test FAILED: Couldn't cancel thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Cancel request has been sent, unlock the mutex */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait 'till the thread has been canceled or has ended execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag == -1)
-	{
+	if (cleanup_flag == -1) {
 		printf("Test FAILED: Cancel request was not deferred.\n");
 		return PTS_FAIL;
 	}
 
-	if (cleanup_flag == -2)
-	{
-		printf("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
+	if (cleanup_flag == -2) {
+		printf
+		    ("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/2-1.c
index 8beb3a0..b4644be 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/2-1.c
@@ -31,18 +31,18 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
-int cleanup_flag;	/* Flag to indicate the thread's cleanup handler was called */
-pthread_mutex_t	mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
+int sem1;			/* Manual semaphore */
+int cleanup_flag;		/* Flag to indicate the thread's cleanup handler was called */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	return;
 }
 
@@ -51,30 +51,29 @@
 {
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Lock the mutex. It should have already been locked in main, so the thread
 	 * should block. */
-	if (pthread_mutex_lock(&mutex) != 0)
-        {
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Should get here if the cancel request was deffered. */
 	pthread_cleanup_pop(0);
-	cleanup_flag=1;
+	cleanup_flag = 1;
 
 	/* Cancelation point.  Cancel request should not be honored here. */
 	pthread_testcancel();
 
 	/* Should not get here if the cancel request was honored at the cancelation point
 	 * pthread_testcancel(). */
-	cleanup_flag=-2;
+	cleanup_flag = -2;
 	pthread_exit(0);
 	return NULL;
 }
@@ -84,60 +83,54 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Send cancel request to the thread.  */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Test FAILED: Error in pthread_cancel()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Cancel request has been sent, unlock the mutex */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait 'till the thread has been canceled or has ended execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag == -1)
-	{
+	if (cleanup_flag == -1) {
 		printf("Test FAILED: Cancel request was not deferred.\n");
 		return PTS_FAIL;
 	}
 
-	if (cleanup_flag == -2)
-	{
-		printf("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
+	if (cleanup_flag == -2) {
+		printf
+		    ("Test FAILED: (1) Cancel request not honored at cancelation point pthread_testcancel() OR (2) pthread_testcancel() not treated as a cancelation point.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-1.c
index 90e9c3a..291cdec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-1.c
@@ -24,20 +24,17 @@
 	sparam.sched_priority = priority;
 
 	rc = pthread_setschedparam(pthread_self(), policy, &sparam);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_setschedparam: rc=%d\n", rc);
 		exit(PTS_FAIL);
 	}
 	rc = pthread_getschedparam(pthread_self(), &policy_1, &sparam);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_getschedparam: rc=%d\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
 	//printf("policy: %d, priority: %d\n", policy_1, sparam.sched_priority);
-	if (policy_1 != policy || sparam.sched_priority != priority)
-	{
+	if (policy_1 != policy || sparam.sched_priority != priority) {
 		printf("pthread_getschedparam did not get the correct value\n");
 		exit(PTS_FAIL);
 	}
@@ -50,8 +47,7 @@
 {
 	pthread_t new_th;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-2.c
index 18b40a6..c95ae4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/1-2.c
@@ -45,7 +45,7 @@
 /***********************   Test framework   ***********************************/
 /******************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int
@@ -87,45 +87,40 @@
 
 	/* Check the priority is valid */
 
-	if (priority == -1)
-	{
+	if (priority == -1) {
 		UNRESOLVED(errno, "Wrong priority value");
 	}
 
 	/* Get the thread's parameters */
 	ret = pthread_getschedparam(thread, &t_pol, &t_parm);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to get thread's parameters");
 	}
 
-	if (t_pol != policy)
-	{
+	if (t_pol != policy) {
 		FAILED("The thread's policy is not as expected");
 	}
 
-	if (t_parm.sched_priority != priority)
-	{
+	if (t_parm.sched_priority != priority) {
 		FAILED("The thread's priority is not as expected");
 	}
 }
 
 /* thread function 1 */
-void * controler (void * arg)
+void *controler(void *arg)
 {
 	int ret = 0;
 
 	/* Wait until the policy has been changed. */
 	ret = pthread_barrier_wait(arg);
 
-	if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD) {
 		UNRESOLVED(ret, "barrier wait failed");
 	}
 
 	/* check the thread attributes have been applied
-	  (we only check what is reported, not the real behavior)
+	   (we only check what is reported, not the real behavior)
 	 */
 	check_param(pthread_self(), SCHED_RR, sched_get_priority_min(SCHED_RR));
 
@@ -133,23 +128,21 @@
 }
 
 /* thread function 2 */
-void * changer(void * arg)
+void *changer(void *arg)
 {
 	int ret = 0;
 
 	struct sched_param sp;
 	sp.sched_priority = sched_get_priority_min(SCHED_RR);
 
-	if (sp.sched_priority < 0)
-	{
+	if (sp.sched_priority < 0) {
 		UNTESTED("Failed to get min SCHED_RR range");
 	}
 
 	/* set the other thread's policy */
 	ret = pthread_setschedparam(*(pthread_t *) arg, SCHED_RR, &sp);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set other's thread policy");
 	}
 
@@ -168,54 +161,47 @@
 
 	ret = pthread_barrier_init(&bar, NULL, 2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to init barrier");
 	}
 
 	/* Create the controler thread */
 	ret = pthread_create(&tcontrol, NULL, controler, &bar);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "thread creation failed");
 	}
 
 	/* Now create the changer thread */
 	ret = pthread_create(&tchange, NULL, changer, &tcontrol);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "thread creation failed");
 	}
 
 	/* wait until the changer finishes */
 	ret = pthread_join(tchange, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
 	/* let the controler control */
 	ret = pthread_barrier_wait(&bar);
 
-	if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD)
-	{
+	if (ret != 0 && ret != PTHREAD_BARRIER_SERIAL_THREAD) {
 		UNRESOLVED(ret, "barrier wait failed");
 	}
 
 	ret = pthread_join(tcontrol, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
 	ret = pthread_barrier_destroy(&bar);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "barrier destroy failed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/4-1.c
index e7ef897..c673758 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/4-1.c
@@ -47,7 +47,7 @@
 /***********************   Test framework   ***********************************/
 /******************************************************************************/
 #include "../testfrmw/testfrmw.h"
- #include "../testfrmw/testfrmw.c"
+#include "../testfrmw/testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int
@@ -89,32 +89,28 @@
 
 	/* Check the priority is valid */
 
-	if (priority == -1)
-	{
+	if (priority == -1) {
 		UNRESOLVED(errno, "Wrong priority value");
 	}
 
 	/* Get the thread's parameters */
 	ret = pthread_getschedparam(thread, &t_pol, &t_parm);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to get thread's parameters");
 	}
 
-	if (t_pol != policy)
-	{
+	if (t_pol != policy) {
 		FAILED("The thread's policy is not as expected");
 	}
 
-	if (t_parm.sched_priority != priority)
-	{
+	if (t_parm.sched_priority != priority) {
 		FAILED("The thread's priority is not as expected");
 	}
 }
 
 /* thread function */
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
@@ -125,13 +121,13 @@
 
 	ret = pthread_setschedparam(pthread_self(), SCHED_RR, &sp);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Failed to set thread policy -- need to be root?");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Failed to set thread policy -- need to be root?");
 	}
 
 	/* check the thread attributes have been applied
-	  (we only check what is reported, not the real behavior)
+	   (we only check what is reported, not the real behavior)
 	 */
 	check_param(pthread_self(), SCHED_RR, sp.sched_priority);
 
@@ -140,19 +136,16 @@
 
 	ret = pthread_setschedparam(pthread_self(), SCHED_RR, &sp);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		/* check the thread attributes have been applied
-		  (we only check what is reported, not the real behavior)
+		   (we only check what is reported, not the real behavior)
 		 */
 		check_param(pthread_self(), SCHED_RR, sp.sched_priority - 1);
 #if VERBOSE > 0
-		output("Setting to a wrong priority failed with error %d (%s).\n",
-		        ret,
-		        strerror(ret));
-	}
-	else
-	{
+		output
+		    ("Setting to a wrong priority failed with error %d (%s).\n",
+		     ret, strerror(ret));
+	} else {
 		output("UNTESTED: setting to max prio + 1 did not fail.\n");
 #endif
 
@@ -173,18 +166,15 @@
 	/* Create the controler thread */
 	ret = pthread_create(&child, NULL, threaded, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "thread creation failed");
 	}
 
 	ret = pthread_join(child, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
-
 #if VERBOSE > 0
 	output("Test PASSED.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c
index ece3961..6b1327b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedparam/5-1.c
@@ -89,20 +89,17 @@
 
 sigset_t usersigs;
 
-typedef struct
-{
+typedef struct {
 	int sig;
 #ifdef WITH_SYNCHRO
 	sem_t *sem;
 #endif
-}
-
-thestruct;
+} thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
-	thestruct * thearg = (thestruct *) arg;
+	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
@@ -111,17 +108,15 @@
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 #ifdef WITH_SYNCHRO
 
-		if ((ret = sem_wait(thearg->sem)))
-		{
+		if ((ret = sem_wait(thearg->sem))) {
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
 
@@ -130,8 +125,7 @@
 
 		ret = kill(process, thearg->sig);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Kill in sendsig");
 		}
 
@@ -146,11 +140,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig1))
-	{
+	if (sem_post(&semsig1)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 	}
-
 #endif
 }
 
@@ -159,16 +151,14 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig2))
-	{
+	if (sem_post(&semsig2)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 2");
 	}
-
 #endif
 }
 
 /* Test function -- calls pthread_setschedparam() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
 	int ret = 0;
 	int pol1, pol2;
@@ -183,25 +173,22 @@
 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 		ret = pthread_setschedparam(*(pthread_t *) arg, pol1, &sp1);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("EINTR was returned");
 		}
 
 		ret = pthread_setschedparam(*(pthread_t *) arg, pol2, &sp2);
 
-		if (ret == EINTR)
-		{
+		if (ret == EINTR) {
 			FAILED("EINTR was returned");
 		}
 	}
@@ -210,7 +197,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2, me;
@@ -228,53 +215,45 @@
 
 	ret |= sigaddset(&usersigs, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
 	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
 	}
-
 #ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{
+	if (sem_init(&semsig1, 0, 1)) {
 		UNRESOLVED(errno, "Semsig1  init");
 	}
 
-	if (sem_init(&semsig2, 0, 1))
-	{
+	if (sem_init(&semsig2, 0, 1)) {
 		UNRESOLVED(errno, "Semsig2  init");
 	}
-
 #endif
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
 	me = pthread_self();
 
-	if ((ret = pthread_create(&th_work, NULL, test, &me)))
-	{
+	if ((ret = pthread_create(&th_work, NULL, test, &me))) {
 		UNRESOLVED(ret, "Worker thread creation failed");
 	}
 
@@ -285,13 +264,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *) & arg1)))
-	{
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 	}
 
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *) & arg2)))
-	{
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 	}
 
@@ -299,27 +276,22 @@
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{
+	if ((ret = pthread_join(th_sig1, NULL))) {
 		UNRESOLVED(ret, "Signal 1 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{
+	if ((ret = pthread_join(th_sig2, NULL))) {
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{
+	if ((ret = pthread_join(th_work, NULL))) {
 		UNRESOLVED(ret, "Worker thread join failed");
 	}
-
 #if VERBOSE > 0
 	output("Test executed successfully.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedprio/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedprio/1-1.c
index 7921bd5..d40e24f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedprio/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setschedprio/1-1.c
@@ -34,40 +34,34 @@
 	sparam.sched_priority = priority;
 
 	rc = pthread_setschedparam(pthread_self(), policy, &sparam);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_setschedparam: rc=%d\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
 	rc = pthread_getschedparam(pthread_self(), &policy_1, &sparam);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_getschedparam: rc=%d\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
 	printf("policy: %d, priority: %d\n", policy_1, sparam.sched_priority);
-	if (policy_1 != policy || sparam.sched_priority != priority)
-	{
+	if (policy_1 != policy || sparam.sched_priority != priority) {
 		printf("pthread_getschedparam did not get the correct value\n");
 		exit(PTS_UNRESOLVED);
 	}
 
 	rc = pthread_setschedprio(pthread_self(), priority + 1);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_setschedprio: rc=%d\n", rc);
 		exit(PTS_FAIL);
 	}
 
 	rc = pthread_getschedparam(pthread_self(), &policy_1, &sparam);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_getschedparam: rc=%d\n", rc);
 		exit(PTS_UNRESOLVED);
 	}
 	printf("policy: %d, priority: %d\n", policy_1, sparam.sched_priority);
-	if (sparam.sched_priority != (priority + 1))
-	{
+	if (sparam.sched_priority != (priority + 1)) {
 		printf("Priority is not set correctly\n");
 		exit(PTS_FAIL);
 	}
@@ -79,8 +73,7 @@
 {
 	pthread_t new_th;
 
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-1.c
index 42f4c3e..bbdcc68 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-1.c
@@ -32,36 +32,33 @@
 {
 	pthread_key_t keys[NUM_OF_KEYS];
 	int i;
-	void* rc;
+	void *rc;
 
-	for (i = 0;i<NUM_OF_KEYS;i++)
-	{
-		if (pthread_key_create(&keys[i], NULL) != 0)
-		{
+	for (i = 0; i < NUM_OF_KEYS; i++) {
+		if (pthread_key_create(&keys[i], NULL) != 0) {
 			printf("Error: pthread_key_create() failed\n");
 			return PTS_UNRESOLVED;
-		} else
-		{
-			if (pthread_setspecific(keys[i], (void *)(long)(i + KEY_VALUE)) != 0)
-			{
-				printf("Test FAILED: Could not set the value of the key to %d\n", (i + KEY_VALUE));
+		} else {
+			if (pthread_setspecific
+			    (keys[i], (void *)(long)(i + KEY_VALUE)) != 0) {
+				printf
+				    ("Test FAILED: Could not set the value of the key to %d\n",
+				     (i + KEY_VALUE));
 				return PTS_FAIL;
 			}
 
 		}
 	}
 
-	for (i = 0;i<NUM_OF_KEYS;++i)
-	{
+	for (i = 0; i < NUM_OF_KEYS; ++i) {
 		rc = pthread_getspecific(keys[i]);
-		if (rc != (void *)(long)(i + KEY_VALUE))
-		{
-			printf("Test FAILED: Did not return correct value of thread-specific key, expected %ld, but got %ld\n", (long)(i + KEY_VALUE), (long)rc);
+		if (rc != (void *)(long)(i + KEY_VALUE)) {
+			printf
+			    ("Test FAILED: Did not return correct value of thread-specific key, expected %ld, but got %ld\n",
+			     (long)(i + KEY_VALUE), (long)rc);
 			return PTS_FAIL;
-		} else
-		{
-			if (pthread_key_delete(keys[i]) != 0)
-			{
+		} else {
+			if (pthread_key_delete(keys[i]) != 0) {
 				printf("Error: pthread_key_delete() failed\n");
 				return PTS_UNRESOLVED;
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-2.c
index 05e344f..b9e8b62 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-2.c
@@ -31,17 +31,18 @@
 #define KEY_VALUE_2 200
 
 pthread_key_t key;
-void* rc1;
-void* rc2;
+void *rc1;
+void *rc2;
 
 void *a_thread_func()
 {
 	/* Bind a value to key for this thread (this will be different from the value
 	 * that we bind for the main thread) */
-	if (pthread_setspecific(key, (void *)(KEY_VALUE_2)) != 0)
-	{
-		printf("Test FAILED: Could not set the value of the key to %d\n", (KEY_VALUE_2));
-		pthread_exit((void*)PTS_FAIL);
+	if (pthread_setspecific(key, (void *)(KEY_VALUE_2)) != 0) {
+		printf
+		    ("Test FAILED: Could not set the value of the key to %d\n",
+		     (KEY_VALUE_2));
+		pthread_exit((void *)PTS_FAIL);
 		return NULL;
 	}
 
@@ -58,22 +59,21 @@
 	pthread_t new_th;
 
 	/* Create the key */
-	if (pthread_key_create(&key, NULL) != 0)
-	{
+	if (pthread_key_create(&key, NULL) != 0) {
 		printf("Error: pthread_key_create() failed\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Bind a value for this main thread */
-	if (pthread_setspecific(key, (void *)(KEY_VALUE_1)) != 0)
-	{
-		printf("Test FAILED: Could not set the value of the key to %d\n", (KEY_VALUE_1));
+	if (pthread_setspecific(key, (void *)(KEY_VALUE_1)) != 0) {
+		printf
+		    ("Test FAILED: Could not set the value of the key to %d\n",
+		     (KEY_VALUE_1));
 		return PTS_FAIL;
 	}
 
 	/* Create another thread.  This thread will also bind a value to the key */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		printf("Error: in pthread_create()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -86,15 +86,17 @@
 
 	/* Compare this value with the value associated for the key in the newly created
 	 * thread, they should be different. */
-	if (rc1 != (void *)(KEY_VALUE_1))
-	{
-		printf("Test FAILED: Incorrect value bound to key, expected %d, got %ld\n", KEY_VALUE_1, (long)rc1);
+	if (rc1 != (void *)(KEY_VALUE_1)) {
+		printf
+		    ("Test FAILED: Incorrect value bound to key, expected %d, got %ld\n",
+		     KEY_VALUE_1, (long)rc1);
 		return PTS_FAIL;
 	}
 
-	if (rc2 != (void *)(KEY_VALUE_2))
-	{
-		printf("Test FAILED: Incorrect value bound to key, expected %d, got %ld\n", KEY_VALUE_2, (long)rc2);
+	if (rc2 != (void *)(KEY_VALUE_2)) {
+		printf
+		    ("Test FAILED: Incorrect value bound to key, expected %d, got %ld\n",
+		     KEY_VALUE_2, (long)rc2);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
index 6d20242..cbec4f9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
@@ -30,53 +30,54 @@
 
 	if (sigismember(&set2, SIGKILL)) {
 		printf("FAIL: SIGKILL was added to the signal mask\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	if (sigismember(&set2, SIGSTOP)) {
 		printf("FAIL: SIGSTOP was added to the signal mask\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	if (pthread_sigmask_return_val != 0) {
-		printf("FAIL: pthread_sigmask returned %d. System should be able to enforce blocking un-ignorable signals without causing pthread_sigmask() to return an error.\n", pthread_sigmask_return_val);
-		pthread_exit((void*)-1);
+		printf
+		    ("FAIL: pthread_sigmask returned %d. System should be able to enforce blocking un-ignorable signals without causing pthread_sigmask() to return an error.\n",
+		     pthread_sigmask_return_val);
+		pthread_exit((void *)-1);
 	}
 
 	printf("Test PASSED\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
index df8b4d7..a0fc2a1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
@@ -27,10 +27,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -42,12 +43,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -57,19 +59,21 @@
 	return 0;
 }
 
-int get_rand() {
+int get_rand()
+{
 
 	int r;
-	r=rand();
+	r = rand();
 	if ((r == SIG_BLOCK) || (r == SIG_SETMASK) || (r == SIG_UNBLOCK)) {
 		r = get_rand();
 	}
 	return r;
 }
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 
-	int r=get_rand();
+	int r = get_rand();
 	sigset_t actl, oactl;
 /*
 	printf("SIG_SETMASK=%d\n", SIG_SETMASK);
@@ -85,15 +89,16 @@
 
 	sigaddset(&actl, SIGALRM);
 	if (pthread_sigmask(r, &actl, NULL) != EINVAL) {
-		perror("pthread_sigmask() did not fail even though invalid how parameter was passed to it.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("pthread_sigmask() did not fail even though invalid how parameter was passed to it.\n");
+		pthread_exit((void *)1);
 	}
 
 	pthread_sigmask(SIG_SETMASK, NULL, &oactl);
 
 	if (is_changed(oactl, SIGABRT)) {
 		printf("FAIL: signal mask was changed. \n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 /*
@@ -102,41 +107,40 @@
 */
 
 	printf("PASS: signal mask was not changed.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
index 16dbf28..0a6a63a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
@@ -16,7 +16,8 @@
 #include <stdlib.h>
 #include "posixtest.h"
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 
 	sigset_t actl;
 /*
@@ -30,45 +31,44 @@
 
 	if (pthread_sigmask(SIG_SETMASK, &actl, NULL) != 0) {
 		perror("pthread_sigmask() did not return 0\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	printf("PASS: pthread_sigmask returned 0.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/15-1.c
index 8df1b3f..dc507ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/15-1.c
@@ -19,7 +19,7 @@
 {
 
 	sigset_t set;
-	sigaddset (&set, SIGABRT);
+	sigaddset(&set, SIGABRT);
 
 	if (pthread_sigmask(SIG_SETMASK, &set, NULL) != 0) {
 		perror("pthread_sigmask failed -- returned -- test aborted");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
index a251b0c..45a1d2e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
@@ -20,19 +20,21 @@
 #include <stdlib.h>
 #include "posixtest.h"
 
-int get_rand() {
+int get_rand()
+{
 
 	int r;
-	r=rand();
+	r = rand();
 	if ((r == SIG_BLOCK) || (r == SIG_SETMASK) || (r == SIG_UNBLOCK)) {
 		r = get_rand();
 	}
 	return r;
 }
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 
-	int r=get_rand();
+	int r = get_rand();
 	sigset_t actl;
 /*
 	printf("SIG_SETMASK=%d\n", SIG_SETMASK);
@@ -44,46 +46,46 @@
 	sigaddset(&actl, SIGABRT);
 
 	if (pthread_sigmask(r, &actl, NULL) != EINVAL) {
-		perror("pthread_sigmask() did not fail even though invalid how parameter was passed to it.\n");
-		pthread_exit((void*)-1);
+		perror
+		    ("pthread_sigmask() did not fail even though invalid how parameter was passed to it.\n");
+		pthread_exit((void *)-1);
 	}
 
 	printf("PASS: pthread_sigmask returned the correct error value.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
index cf9ab36..a9c3704 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
@@ -87,20 +87,17 @@
 
 sigset_t usersigs;
 
-typedef struct
-{
+typedef struct {
 	int sig;
 #ifdef WITH_SYNCHRO
 	sem_t *sem;
 #endif
-}
-
-thestruct;
+} thestruct;
 
 /* the following function keeps on sending the signal to the process */
-void * sendsig (void * arg)
+void *sendsig(void *arg)
 {
-	thestruct * thearg = (thestruct *) arg;
+	thestruct *thearg = (thestruct *) arg;
 	int ret;
 	pid_t process;
 
@@ -109,17 +106,15 @@
 	/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in signal thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 #ifdef WITH_SYNCHRO
 
-		if ((ret = sem_wait(thearg->sem)))
-		{
+		if ((ret = sem_wait(thearg->sem))) {
 			UNRESOLVED(errno, "Sem_wait in sendsig");
 		}
 
@@ -128,8 +123,7 @@
 
 		ret = kill(process, thearg->sig);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Kill in sendsig");
 		}
 
@@ -144,11 +138,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig1))
-	{
+	if (sem_post(&semsig1)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 1");
 	}
-
 #endif
 }
 
@@ -157,11 +149,9 @@
 {
 #ifdef WITH_SYNCHRO
 
-	if (sem_post(&semsig2))
-	{
+	if (sem_post(&semsig2)) {
 		UNRESOLVED(errno, "Sem_post in signal handler 2");
 	}
-
 #endif
 }
 
@@ -170,63 +160,59 @@
 void initializer(void)
 {
 	init_ctl++;
-	return ;
+	return;
 }
 
 /* Test function -- calls pthread_sigmask() and checks that EINTR is never returned. */
-void * test(void * arg)
+void *test(void *arg)
 {
 	int ret = 0;
 	sigset_t set;
-	int i, j=0;
+	int i, j = 0;
 	int signals[] = { SIGBUS, SIGKILL, SIGABRT, SIGCHLD, SIGHUP };
 #define NSIG (sizeof(signals)/sizeof(int))
-	int operation[] = {SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK};
+	int operation[] = { SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK };
 
 	ret = sigemptyset(&set);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to initialize signal set");
 	}
 
 	/* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to unblock SIGUSR1 and SIGUSR2 in worker thread");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		count_ope++;
 
-		for (i = 0; i < 3; i++)
-		{
+		for (i = 0; i < 3; i++) {
 			j++;
 			j %= 2 * NSIG;
 
 			if (j >= NSIG)
-				ret = sigdelset(&set, signals[j-NSIG]);
+				ret = sigdelset(&set, signals[j - NSIG]);
 			else
 				ret = sigaddset(&set, signals[j]);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to initialize signal set");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to initialize signal set");
 			}
 
-			ret = pthread_sigmask(operation[ i ], &set, NULL);
+			ret = pthread_sigmask(operation[i], &set, NULL);
 
-			if (ret == EINTR)
-			{
+			if (ret == EINTR) {
 				FAILED("pthread_sigmask returned EINTR");
 			}
 
-			if (ret != 0)
-			{
-				UNRESOLVED(ret, "Failed to initialize signal set");
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to initialize signal set");
 			}
 		}
 	}
@@ -235,7 +221,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th_work, th_sig1, th_sig2;
@@ -247,19 +233,17 @@
 	output_init();
 
 	/* We need to register the signal handlers for the PROCESS */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl1;
 
-	if ((ret = sigaction(SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler1");
 	}
 
 	sa.sa_handler = sighdl2;
 
-	if ((ret = sigaction(SIGUSR2, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler2");
 	}
 
@@ -270,34 +254,28 @@
 
 	ret |= sigaddset(&usersigs, SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to add SIGUSR1 or 2 to a signal set");
 	}
 
 	/* We now block the signals SIGUSR1 and SIGUSR2 for this THREAD */
 	ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret, "Unable to block SIGUSR1 and SIGUSR2 in main thread");
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Unable to block SIGUSR1 and SIGUSR2 in main thread");
 	}
-
 #ifdef WITH_SYNCHRO
-	if (sem_init(&semsig1, 0, 1))
-	{
+	if (sem_init(&semsig1, 0, 1)) {
 		UNRESOLVED(errno, "Semsig1  init");
 	}
 
-	if (sem_init(&semsig2, 0, 1))
-	{
+	if (sem_init(&semsig2, 0, 1)) {
 		UNRESOLVED(errno, "Semsig2  init");
 	}
-
 #endif
 
-	if ((ret = pthread_create(&th_work, NULL, test, NULL)))
-	{
+	if ((ret = pthread_create(&th_work, NULL, test, NULL))) {
 		UNRESOLVED(ret, "Worker thread creation failed");
 	}
 
@@ -308,13 +286,11 @@
 	arg2.sem = &semsig2;
 #endif
 
-	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *) & arg1)))
-	{
+	if ((ret = pthread_create(&th_sig1, NULL, sendsig, (void *)&arg1))) {
 		UNRESOLVED(ret, "Signal 1 sender thread creation failed");
 	}
 
-	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *) & arg2)))
-	{
+	if ((ret = pthread_create(&th_sig2, NULL, sendsig, (void *)&arg2))) {
 		UNRESOLVED(ret, "Signal 2 sender thread creation failed");
 	}
 
@@ -322,27 +298,22 @@
 	sleep(1);
 
 	/* Now stop the threads and join them */
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 
-	if ((ret = pthread_join(th_sig1, NULL)))
-	{
+	if ((ret = pthread_join(th_sig1, NULL))) {
 		UNRESOLVED(ret, "Signal 1 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_sig2, NULL)))
-	{
+	if ((ret = pthread_join(th_sig2, NULL))) {
 		UNRESOLVED(ret, "Signal 2 sender thread join failed");
 	}
 
-	if ((ret = pthread_join(th_work, NULL)))
-	{
+	if ((ret = pthread_join(th_work, NULL))) {
 		UNRESOLVED(ret, "Worker thread join failed");
 	}
-
 #if VERBOSE > 0
 	output("Test executed successfully.\n");
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
index 13c6525..3aad556 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
@@ -52,54 +52,58 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (pthread_sigmask(SIG_SETMASK, &blocked_set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if (pthread_sigmask(SIG_BLOCK, &blocked_set2, NULL) == -1) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if ((raise(SIGABRT) == -1) | (raise(SIGALRM) == -1)) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (handler_called) {
 		printf("FAIL: Signal was not blocked\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	if (sigpending(&pending_set) == -1) {
 		perror("Unexpected error while attempting to use sigpending\n");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
-	if ((sigismember(&pending_set, SIGABRT) != 1) | (sigismember(&pending_set, SIGALRM) != 1)) {
+	if ((sigismember(&pending_set, SIGABRT) !=
+	     1) | (sigismember(&pending_set, SIGALRM) != 1)) {
 		perror("FAIL: sigismember did not return 1\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
 	int *thread_return_value;
 
@@ -110,22 +114,20 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
 	if ((long)thread_return_value != 0) {
 		if ((long)thread_return_value == 1) {
-			printf ("Test UNRESOLVED\n");
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
-		}
-		else if ((long)thread_return_value == -1) {
-			printf ("Test FAILED\n");
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
 			return PTS_FAIL;
-		}
-		else {
-			printf ("Test UNRESOLVED\n");
+		} else {
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
index 8a90f7d..ec91b48 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
@@ -53,68 +53,61 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT, &act, 0) == -1)
-	{
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
-		        "pre-conditions");
-		pthread_exit((void*) 1);
+		       "pre-conditions");
+		pthread_exit((void *)1);
 	}
 
-	if (pthread_sigmask(SIG_SETMASK, &blocked_set, NULL) == -1)
-	{
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*) 1);
+	if (pthread_sigmask(SIG_SETMASK, &blocked_set, NULL) == -1) {
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
-	if (raise(SIGABRT) == -1)
-	{
+	if (raise(SIGABRT) == -1) {
 		perror("Unexpected error while attempting to setup test "
-		        "pre-conditions");
-		pthread_exit((void*) 1);
+		       "pre-conditions");
+		pthread_exit((void *)1);
 	}
 
-	if (handler_called)
-	{
+	if (handler_called) {
 		printf("FAIL: Signal was not blocked\n");
-		pthread_exit((void*) - 1);
+		pthread_exit((void *)-1);
 	}
 
-	if (sigpending(&pending_set) == -1)
-	{
+	if (sigpending(&pending_set) == -1) {
 		perror("Unexpected error while attempting to use sigpending\n");
-		pthread_exit((void*) 1);
+		pthread_exit((void *)1);
 	}
 
-	if (sigismember(&pending_set, SIGABRT) == -1)
-	{
+	if (sigismember(&pending_set, SIGABRT) == -1) {
 		perror("Unexpected error while attempting to use sigismember.");
-		pthread_exit((void*) - 1);
+		pthread_exit((void *)-1);
 	}
 
-	if (sigismember(&pending_set, SIGABRT) != 1)
-	{
+	if (sigismember(&pending_set, SIGABRT) != 1) {
 		perror("FAIL: sigismember did not return 1");
-		pthread_exit((void*) 1);
+		pthread_exit((void *)1);
 	}
 
 	sigemptyset(&blocked_set);
 	sigaddset(&blocked_set, SIGUSR1);
 
-	if (pthread_sigmask(SIG_SETMASK, &blocked_set, NULL) == -1)
-	{
-		perror("Unexpected error while attempting to use pthread_sigmask.");
-		pthread_exit((void*) 1);
+	if (pthread_sigmask(SIG_SETMASK, &blocked_set, NULL) == -1) {
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.");
+		pthread_exit((void *)1);
 	}
 
 	sched_yield();
 
-	if (!handler_called)
-	{
+	if (!handler_called) {
 		printf("FAIL: Old signal was not removed from mask.\n");
-		pthread_exit((void*) -1);
+		pthread_exit((void *)-1);
 	}
 
-	pthread_exit((void*) 0);
+	pthread_exit((void *)0);
 	return NULL;
 
 }
@@ -126,33 +119,25 @@
 
 	pthread_t new_thread;
 
-	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating new thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(new_thread, (void*) &thread_return_value) != 0)
-	{
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((long) thread_return_value != 0)
-	{
-		if ((long) thread_return_value == 1)
-		{
-			printf ("Test UNRESOLVED\n");
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
-		}
-		else if ((long) thread_return_value == -1)
-		{
-			printf ("Test FAILED\n");
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
 			return PTS_FAIL;
-		}
-		else
-		{
-			printf ("Test UNRESOLVED\n");
+		} else {
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
index b7c90ab..b1ab62b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
@@ -55,99 +55,102 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (pthread_sigmask(SIG_SETMASK, &set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if (pthread_sigmask(SIG_UNBLOCK, &set2, NULL) == -1) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if (raise(SIGALRM) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (!handler_called) {
-		printf("FAIL: Handler was not called for even though signal was removed from the signal mask\n");
-		pthread_exit((void*)-1);
+		printf
+		    ("FAIL: Handler was not called for even though signal was removed from the signal mask\n");
+		pthread_exit((void *)-1);
 	}
 
 	handler_called = 0;
 	if (raise(SIGABRT) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (handler_called) {
-		printf("FAIL: Hanlder was called for even though signal should have been in the signal mask\n");
-		pthread_exit((void*)-1);
+		printf
+		    ("FAIL: Hanlder was called for even though signal should have been in the signal mask\n");
+		pthread_exit((void *)-1);
 	}
 
 	if (sigpending(&pending_set) == -1) {
 		perror("Unexpected error while attempting to use sigpending\n");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (sigismember(&pending_set, SIGABRT) != 1) {
 		perror("FAIL: sigismember did not return 1\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	if (sigismember(&pending_set, SIGALRM) != 0) {
 		perror("FAIL: sigismember did not return 0\n");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
-        pthread_exit((void*)0);
-        return NULL;
+	pthread_exit((void *)0);
+	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
index 2997b54..471fb99 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
@@ -26,55 +26,50 @@
 	sigset_t oactl, tempset;
 	int i, j, test_failed = 0;
 
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
-	                 SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
-	                 SIGPIPE, SIGQUIT, SIGSEGV,
-	                 SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
-	                 SIGUSR1, SIGUSR2,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
+		SIGPIPE, SIGQUIT, SIGSEGV,
+		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
+		SIGUSR1, SIGUSR2,
 #ifdef SIGPOLL
-			 SIGPOLL,
+		SIGPOLL,
 #endif
 #ifdef SIGPROF
-			 SIGPROF,
+		SIGPROF,
 #endif
-			 SIGSYS,
-	                 SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGSYS,
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
-	for (i = 0; i < NUMSIGNALS; i++)
-	{
+	for (i = 0; i < NUMSIGNALS; i++) {
 		sigemptyset(&oactl);
 		sigemptyset(&tempset);
-		sigaddset(&tempset, siglist[ i ]);
+		sigaddset(&tempset, siglist[i]);
 		pthread_sigmask(SIG_BLOCK, &tempset, &oactl);
 
-		if (i > 0)
-		{
-			for (j = 0; j < i; j++)
-			{
-				if (sigismember(&oactl, siglist[j]) != 1)
-				{
+		if (i > 0) {
+			for (j = 0; j < i; j++) {
+				if (sigismember(&oactl, siglist[j]) != 1) {
 					test_failed = 1;
 				}
 			}
 
-			for (j = i + 1; j < NUMSIGNALS; j++)
-			{
-				if (sigismember(&oactl, siglist[j]) != 0)
-				{
+			for (j = i + 1; j < NUMSIGNALS; j++) {
+				if (sigismember(&oactl, siglist[j]) != 0) {
 					test_failed = 1;
 				}
 			}
 		}
 	}
 
-	if (test_failed != 0)
-	{
+	if (test_failed != 0) {
 		printf("Old set is invalid.\n");
-		pthread_exit((void*) - 1);
+		pthread_exit((void *)-1);
 	}
 
-	printf("Test PASSED: oactl did contain all signals that were added to the signal mask.\n");
-	pthread_exit((void*) 0);
+	printf
+	    ("Test PASSED: oactl did contain all signals that were added to the signal mask.\n");
+	pthread_exit((void *)0);
 
 	/* To please some compilers */
 	return NULL;
@@ -83,37 +78,29 @@
 int main()
 {
 
-	int * thread_return_value;
+	int *thread_return_value;
 
 	pthread_t new_thread;
 
-	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating new thread\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(new_thread, (void*) & thread_return_value) != 0)
-	{
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if ((long) thread_return_value != 0)
-	{
-		if ((long) thread_return_value == 1)
-		{
-			printf ("Test UNRESOLVED\n");
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
-		}
-		else if ((long) thread_return_value == -1)
-		{
-			printf ("Test FAILED\n");
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
 			return PTS_FAIL;
-		}
-		else
-		{
-			printf ("Test UNRESOLVED\n");
+		} else {
+			printf("Test UNRESOLVED\n");
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
index 79cb9da..729a2c8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
@@ -21,10 +21,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -36,12 +37,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -51,7 +53,8 @@
 	return 0;
 }
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 
 	sigset_t actl, oactl;
 
@@ -64,44 +67,43 @@
 	pthread_sigmask(SIG_BLOCK, NULL, &oactl);
 
 	if (is_changed(oactl, SIGABRT)) {
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	printf("PASS: signal mask was not changed.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
index 1c93865..8adc43d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
@@ -23,10 +23,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -38,12 +39,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -53,7 +55,8 @@
 	return 0;
 }
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 	sigset_t actl, oactl;
 
 	sigemptyset(&actl);
@@ -65,44 +68,43 @@
 	pthread_sigmask(SIG_SETMASK, NULL, &oactl);
 
 	if (is_changed(oactl, SIGABRT)) {
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	printf("PASS: signal mask was not changed.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
index 5c6f64d..85d6db0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
@@ -21,10 +21,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -36,12 +37,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -51,7 +53,8 @@
 	return 0;
 }
 
-void *a_thread_func() {
+void *a_thread_func()
+{
 
 	sigset_t actl, oactl;
 
@@ -64,44 +67,43 @@
 	pthread_sigmask(SIG_UNBLOCK, NULL, &oactl);
 
 	if (is_changed(oactl, SIGABRT)) {
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	printf("PASS: signal mask was not changed.\n");
-	pthread_exit((void*)0);
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
index bfab4fd..6773b66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
@@ -25,13 +25,14 @@
 #include "posixtest.h"
 
 int handler_called = 0;
-int pthread_sigmask_return_val = 1; /* some value that's not a 1 or 0 */
+int pthread_sigmask_return_val = 1;	/* some value that's not a 1 or 0 */
 
 void handler(int signo)
 {
 	handler_called = 1;
 	if (pthread_sigmask_return_val != 1) {
-		printf("FAIL: pthread_sigmask() returned before signal was delivered.\n");
+		printf
+		    ("FAIL: pthread_sigmask() returned before signal was delivered.\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -47,71 +48,75 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
 	if (pthread_sigmask(SIG_SETMASK, &blocked_set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if ((raise(SIGABRT) == -1)) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
-		pthread_exit((void*)1);
+		pthread_exit((void *)1);
 	}
 
-	pthread_sigmask_return_val = pthread_sigmask(SIG_UNBLOCK, &blocked_set1, NULL);
+	pthread_sigmask_return_val =
+	    pthread_sigmask(SIG_UNBLOCK, &blocked_set1, NULL);
 
 	if (pthread_sigmask_return_val != 0) {
-		perror("Unexpected error while attempting to use pthread_sigmask.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Unexpected error while attempting to use pthread_sigmask.\n");
+		pthread_exit((void *)1);
 	}
 
 	if (handler_called != 1) {
-		perror("Handler wasn't called, implying signal was not delivered.\n");
-		pthread_exit((void*)1);
+		perror
+		    ("Handler wasn't called, implying signal was not delivered.\n");
+		pthread_exit((void *)1);
 	}
 
-	printf("Test PASSED: signal was delivered before the call to pthread_sigmask returned.\n");
-	pthread_exit((void*)0);
+	printf
+	    ("Test PASSED: signal was delivered before the call to pthread_sigmask returned.\n");
+	pthread_exit((void *)0);
 
-        /* To please some compilers */
+	/* To please some compilers */
 	return NULL;
 }
 
-int main() {
+int main()
+{
 
-        int *thread_return_value;
+	int *thread_return_value;
 
-        pthread_t new_thread;
+	pthread_t new_thread;
 
-        if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
-                perror("Error creating new thread\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_create(&new_thread, NULL, a_thread_func, NULL) != 0) {
+		perror("Error creating new thread\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (pthread_join(new_thread, (void*)&thread_return_value) != 0) {
-                perror("Error in pthread_join()\n");
-                return PTS_UNRESOLVED;
-        }
+	if (pthread_join(new_thread, (void *)&thread_return_value) != 0) {
+		perror("Error in pthread_join()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if ((long)thread_return_value != 0) {
-                if ((long)thread_return_value == 1) {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-                else if ((long)thread_return_value == -1) {
-                        printf ("Test FAILED\n");
-                        return PTS_FAIL;
-                }
-                else {
-                        printf ("Test UNRESOLVED\n");
-                        return PTS_UNRESOLVED;
-                }
-        }
-        return PTS_PASS;
+	if ((long)thread_return_value != 0) {
+		if ((long)thread_return_value == 1) {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		} else if ((long)thread_return_value == -1) {
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		} else {
+			printf("Test UNRESOLVED\n");
+			return PTS_UNRESOLVED;
+		}
+	}
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/1-1.c
index 5c100c4..8e380bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/1-1.c
@@ -32,8 +32,7 @@
 	int rc = 0;
 
 	printf("main: initialize spin lock\n");
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -41,27 +40,25 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Unresolved: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Unresolved: main cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: acquired spin lock\n");
 
 	printf("main: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock) != 0)
-	{
+	if (pthread_spin_unlock(&spinlock) != 0) {
 		printf("main: Error at pthread_spin_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: destroy spin lock\n");
 	rc = pthread_spin_destroy(&spinlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: Error at pthread_spin_destroy()"
-			"Return code : %d\n", rc);
+		       "Return code : %d\n", rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/3-1.c
index dcff90c..895efa2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/3-1.c
@@ -32,21 +32,19 @@
 
 static pthread_spinlock_t spinlock;
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 
 	printf("child: destroy spin lock\n");
 	rc = pthread_spin_destroy(&spinlock);
-	if (rc == EBUSY)
-	{
+	if (rc == EBUSY) {
 		printf("child: correctly got EBUSY\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("child: got return code %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: *Note: Did not return EBUSY when destroying a spinlock already in use, but standard says 'may' fail\n");
+		printf
+		    ("Test PASSED: *Note: Did not return EBUSY when destroying a spinlock already in use, but standard says 'may' fail\n");
 	}
 	exit(PTS_PASS);
 }
@@ -55,8 +53,7 @@
 {
 	pthread_t child_thread;
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -64,16 +61,14 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
+	if (pthread_spin_lock(&spinlock) != 0) {
 		printf("main cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired spin lock\n");
 
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/1-1.c
index 38c2295..8c4c6b7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/1-1.c
@@ -34,15 +34,14 @@
 	int rc = 0;
 	int pshared;
 
-	#ifdef PTHREAD_PROCESS_PRIVATE
+#ifdef PTHREAD_PROCESS_PRIVATE
 	pshared = PTHREAD_PROCESS_PRIVATE;
-	#else
- 	pshared = -1;
-	#endif
+#else
+	pshared = -1;
+#endif
 
 	rc = pthread_spin_init(&spinlock, pshared);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED:  Error at pthread_spin_init(): %d\n", rc);
 		return PTS_FAIL;
 	}
@@ -50,23 +49,21 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		perror("Error: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		perror
+		    ("Error: main cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: acquired spin lock\n");
 
-	if (pthread_spin_unlock(&spinlock) != 0)
-	{
+	if (pthread_spin_unlock(&spinlock) != 0) {
 		perror("main: Error at pthread_spin_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	rc = pthread_spin_destroy(&spinlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Error at pthread_spin_destroy(): %d\n", rc);
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-1.c
index e094a35..5c7cbd2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-1.c
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-struct shmstruct{
+struct shmstruct {
 	pthread_spinlock_t spinlock;
 	int data;
 } *spinlock_data;
@@ -41,10 +41,11 @@
 {
 
 	/* Make sure there is process-shared capability. */
-	#ifndef PTHREAD_PROCESS_SHARED
-	  fprintf(stderr,"process-shared attribute is not available for testing\n");
-	  return PTS_UNSUPPORTED;
-	#endif
+#ifndef PTHREAD_PROCESS_SHARED
+	fprintf(stderr,
+		"process-shared attribute is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	int pshared = PTHREAD_PROCESS_SHARED;
 
@@ -54,40 +55,38 @@
 
 	/* Create shared object */
 	shm_unlink(shm_name);
-	shm_fd = shm_open(shm_name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
-	if (shm_fd == -1)
-	{
+	shm_fd =
+	    shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+	if (shm_fd == -1) {
 		perror("Error at shm_open()");
 		return PTS_UNRESOLVED;
 	}
 
-        if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
-                perror("Error at ftruncate()");
-                shm_unlink(shm_name);
-                return PTS_UNRESOLVED;
-        }
+	if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
+		perror("Error at ftruncate()");
+		shm_unlink(shm_name);
+		return PTS_UNRESOLVED;
+	}
 
 	/* Map the shared memory object to parent's memory */
-	spinlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+	spinlock_data =
+	    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, shm_fd, 0);
 
-	if (spinlock_data == MAP_FAILED)
-	{
+	if (spinlock_data == MAP_FAILED) {
 		perror("Error at first mmap()");
-                shm_unlink(shm_name);
+		shm_unlink(shm_name);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Initialize spinlock */
-	if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0)
-	{
+	if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0) {
 		printf("Test FAILED: Error at pthread_rwlock_init()\n");
 		return PTS_FAIL;
 	}
 
 	printf("main: attempt spin lock\n");
-	if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0)
-	{
+	if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0) {
 		printf("Error at pthread_spin_lock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -98,21 +97,17 @@
 
 	/* Fork a child process */
 	pid = fork();
-	if (pid == -1)
-	{
+	if (pid == -1) {
 		perror("Error at fork()");
 		return PTS_UNRESOLVED;
-	}
-	else if (pid > 0)
-	{
+	} else if (pid > 0) {
 		/* Parent */
 		/* wait until child writes to spinlock data */
 		while (spinlock_data->data != 1)
 			sleep(1);
 
 		printf("main: unlock spin lock\n");
-		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) {
 			printf("Parent: error at pthread_spin_unlock()\n");
 			return PTS_UNRESOLVED;
 		}
@@ -123,31 +118,27 @@
 		/* Wait until child ends */
 		wait(NULL);
 
-		if ((shm_unlink(shm_name)) != 0)
-		{
+		if ((shm_unlink(shm_name)) != 0) {
 			perror("Error at shm_unlink()");
 			return PTS_UNRESOLVED;
 		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		/* Child */
 		/* Map the shared object to child's memory */
-		spinlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+		spinlock_data =
+		    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+			 MAP_SHARED, shm_fd, 0);
 
-		if (spinlock_data == MAP_FAILED)
-		{
+		if (spinlock_data == MAP_FAILED) {
 			perror("child : Error at mmap()");
 			return PTS_UNRESOLVED;
 		}
 
 		printf("child: attempt spin lock\n");
-		if ((pthread_spin_trylock(&(spinlock_data->spinlock))) != EBUSY)
-		{
+		if ((pthread_spin_trylock(&(spinlock_data->spinlock))) != EBUSY) {
 			printf("Test FAILED: Child expects EBUSY\n");
 			return PTS_FAIL;
 		}
@@ -163,22 +154,19 @@
 		/* Child tries to get spin lock after parent unlock,
 		 * it should get the lock. */
 		printf("child: attempt spin lock\n");
-		if ((pthread_spin_trylock(&(spinlock_data->spinlock))) != 0)
-		{
+		if ((pthread_spin_trylock(&(spinlock_data->spinlock))) != 0) {
 			printf("Test FAILED: Child should get the lock\n");
 			return PTS_FAIL;
 		}
 		printf("child: acquired spin lock\n");
 
 		printf("child: unlock spin lock\n");
-		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) {
 			printf("Child: error at pthread_spin_unlock()\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pthread_spin_destroy(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_destroy(&(spinlock_data->spinlock)) != 0) {
 			printf("Child: error at pthread_spin_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-2.c
index 1e8fee5..8635b57 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/2-2.c
@@ -40,7 +40,7 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-struct shmstruct{
+struct shmstruct {
 	pthread_spinlock_t spinlock;
 	int data;
 } *spinlock_data;
@@ -51,11 +51,11 @@
 	int pshared;
 
 	/* Make sure there is process-shared capability. */
-	#ifdef PTHREAD_PROCESS_PRIVATE
+#ifdef PTHREAD_PROCESS_PRIVATE
 	pshared = PTHREAD_PROCESS_PRIVATE;
-	#else
- 	pshared = -1;
-	#endif
+#else
+	pshared = -1;
+#endif
 
 	char shm_name[] = "tmp_pthread_spinlock_init";
 	int shm_fd;
@@ -64,39 +64,37 @@
 
 	/* Create shared object */
 	shm_unlink(shm_name);
-	shm_fd = shm_open(shm_name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
-	if (shm_fd == -1)
-	{
+	shm_fd =
+	    shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+	if (shm_fd == -1) {
 		perror("Error at shm_open()");
 		return PTS_UNRESOLVED;
 	}
 
-        if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
-                perror("Error at ftruncate()");
-                shm_unlink(shm_name);
-                return PTS_UNRESOLVED;
-        }
-
-	/* Map the shared memory object to parent's memory */
-	spinlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
-
-	if (spinlock_data == MAP_FAILED)
-	{
-		perror("Error at first mmap()");
-                shm_unlink(shm_name);
+	if (ftruncate(shm_fd, sizeof(struct shmstruct)) != 0) {
+		perror("Error at ftruncate()");
+		shm_unlink(shm_name);
 		return PTS_UNRESOLVED;
 	}
 
-	if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0)
-	{
+	/* Map the shared memory object to parent's memory */
+	spinlock_data =
+	    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, shm_fd, 0);
+
+	if (spinlock_data == MAP_FAILED) {
+		perror("Error at first mmap()");
+		shm_unlink(shm_name);
+		return PTS_UNRESOLVED;
+	}
+
+	if ((pthread_spin_init(&(spinlock_data->spinlock), pshared)) != 0) {
 		printf("Test FAILED: Error at pthread_rwlock_init()\n");
 		return PTS_FAIL;
 	}
 
 	printf("main: attempt spin lock\n");
-	if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0)
-	{
+	if ((pthread_spin_lock(&(spinlock_data->spinlock))) != 0) {
 		printf("Error at pthread_spin_lock()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -106,21 +104,17 @@
 	spinlock_data->data = 0;
 
 	pid = fork();
-	if (pid == -1)
-	{
+	if (pid == -1) {
 		perror("Error at fork()");
 		return PTS_UNRESOLVED;
-	}
-	else if (pid > 0)
-	{
+	} else if (pid > 0) {
 		/* Parent */
 		/* wait until child writes to spinlock data */
 		while (spinlock_data->data != 1)
 			sleep(1);
 
 		printf("main: unlock spin lock\n");
-		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) {
 			printf("main: error at pthread_spin_unlock()\n");
 			return PTS_UNRESOLVED;
 		}
@@ -131,24 +125,21 @@
 		/* Wait until child ends */
 		wait(NULL);
 
-		if ((shm_unlink(shm_name)) != 0)
-		{
+		if ((shm_unlink(shm_name)) != 0) {
 			perror("Error at shm_unlink()");
 			return PTS_UNRESOLVED;
 		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		/* Child */
 		/* Map the shared object to child's memory */
-		spinlock_data = mmap(NULL, sizeof(struct shmstruct), PROT_READ|PROT_WRITE,
-				MAP_SHARED, shm_fd, 0);
+		spinlock_data =
+		    mmap(NULL, sizeof(struct shmstruct), PROT_READ | PROT_WRITE,
+			 MAP_SHARED, shm_fd, 0);
 
-		if (spinlock_data == MAP_FAILED)
-		{
+		if (spinlock_data == MAP_FAILED) {
 			perror("child : Error at mmap()");
 			return PTS_UNRESOLVED;
 		}
@@ -156,7 +147,8 @@
 		printf("child: attempt spin lock\n");
 		rc = pthread_spin_trylock(&(spinlock_data->spinlock));
 		if (rc != EBUSY)
-			printf("child: get return code %d, %s\n", rc, strerror(rc));
+			printf("child: get return code %d, %s\n", rc,
+			       strerror(rc));
 		else
 			printf("child: correctly got EBUSY\n");
 
@@ -171,17 +163,16 @@
 		if (rc == 0)
 			printf("child: acquired spin lock\n");
 		else
-			printf("child: get return code %d, %s\n", rc, strerror(rc));
+			printf("child: get return code %d, %s\n", rc,
+			       strerror(rc));
 
 		printf("child: unlock spin lock\n");
-		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_unlock(&(spinlock_data->spinlock)) != 0) {
 			printf("Child: error at pthread_spin_unlock()\n");
 			return PTS_UNRESOLVED;
 		}
 
-		if (pthread_spin_destroy(&(spinlock_data->spinlock)) != 0)
-		{
+		if (pthread_spin_destroy(&(spinlock_data->spinlock)) != 0) {
 			printf("Child: error at pthread_spin_destroy()\n");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/4-1.c
index 6a4293e..169292e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_init/4-1.c
@@ -34,7 +34,7 @@
 static pthread_spinlock_t spinlock;
 static int pshared;
 
-static void* fn_chld(void* arg)
+static void *fn_chld(void *arg)
 {
 	int rc;
 	/* child: initialize a spin lock being locked by main thread */
@@ -42,10 +42,10 @@
 	rc = pthread_spin_init(&spinlock, pshared);
 	if (rc == EBUSY)
 		printf("child: correctly got EBUSY\n");
-	else
-	{
+	else {
 		printf("child: got return code %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: *Note: Did not return EBUSY when initializing a spinlock already in use, but standard says 'may' fail\n");
+		printf
+		    ("Test PASSED: *Note: Did not return EBUSY when initializing a spinlock already in use, but standard says 'may' fail\n");
 	}
 	exit(PTS_PASS);
 }
@@ -55,17 +55,16 @@
 	int rc = 0;
 	pthread_t child_thread;
 
-	#ifdef PTHREAD_PROCESS_PRIVATE
-		pshared = PTHREAD_PROCESS_PRIVATE;
-	#else
- 		pshared = -1;
-	#endif
+#ifdef PTHREAD_PROCESS_PRIVATE
+	pshared = PTHREAD_PROCESS_PRIVATE;
+#else
+	pshared = -1;
+#endif
 
 	printf("main: initialize spin lock\n");
 
 	rc = pthread_spin_init(&spinlock, pshared);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED:  Error at pthread_spin_init()\n");
 		return PTS_FAIL;
 	}
@@ -73,17 +72,16 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Error: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Error: main cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: acquired spin lock\n");
 
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
index e67778d..022210f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
@@ -43,7 +43,7 @@
 	return;
 }
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 
@@ -52,14 +52,13 @@
 	thread_state = ENTERED_THREAD;
 	int cnt = 0;
 
-        /* Unblock the SIGALRM signal for the thread */
-        sigemptyset (&act.sa_mask);
-        sigaddset(&act.sa_mask, SIGALRM);
-        if (pthread_sigmask (SIG_UNBLOCK, &act.sa_mask, NULL))
-        {
-                perror("thread: could not unblock SIGALRM\n");
-                return (void *)PTS_UNRESOLVED;
-        }
+	/* Unblock the SIGALRM signal for the thread */
+	sigemptyset(&act.sa_mask);
+	sigaddset(&act.sa_mask, SIGALRM);
+	if (pthread_sigmask(SIG_UNBLOCK, &act.sa_mask, NULL)) {
+		perror("thread: could not unblock SIGALRM\n");
+		return (void *)PTS_UNRESOLVED;
+	}
 
 	/* Set up child thread to handle SIGALRM */
 	act.sa_flags = 0;
@@ -72,26 +71,27 @@
 
 	printf("thread: attempt spin lock\n");
 	rc = pthread_spin_lock(&spinlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread failed to get spin lock,error code:%d\n" , rc);
-		pthread_exit((void*)PTS_FAIL);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread failed to get spin lock,error code:%d\n",
+		     rc);
+		pthread_exit((void *)PTS_FAIL);
 	}
 
 	printf("thread: acquired spin lock\n");
 
 	thread_state = GET_SPIN_LOCK;
 	/* Wait 10 seconds for SIGALRM to be sent */
-	while (cnt++ < 10)
-	{
+	while (cnt++ < 10) {
 		ts.tv_sec = 1;
 		ts.tv_nsec = 0;
 		nanosleep(&ts, NULL);
 	}
 
 	/* Shouldn't get here.  If we do, it means that SIGALRM wasn't sent/received */
-	printf("Error in thread: SIGALRM was not received/sent correctly, timedout after 10 secs of waiting.\n");
-	pthread_exit((void*)PTS_UNRESOLVED);
+	printf
+	    ("Error in thread: SIGALRM was not received/sent correctly, timedout after 10 secs of waiting.\n");
+	pthread_exit((void *)PTS_UNRESOLVED);
 	return NULL;
 }
 
@@ -102,16 +102,14 @@
 	struct sigaction sa;
 
 	/* Block the SIGALRM signal for main thread */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sigaddset(&sa.sa_mask, SIGALRM);
-	if (pthread_sigmask (SIG_BLOCK, &sa.sa_mask, NULL))
-	{
+	if (pthread_sigmask(SIG_BLOCK, &sa.sa_mask, NULL)) {
 		perror("main: could not block SIGALRM\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		perror("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -119,9 +117,9 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Test FAILED: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get spin lock when no one owns the lock\n");
 		return PTS_FAIL;
 	}
 
@@ -130,33 +128,27 @@
 	thread_state = NOT_CREATED_THREAD;
 
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution */
-	if (pthread_join(child_thread, &value_ptr) != 0)
-	{
+	if (pthread_join(child_thread, &value_ptr) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the return value of the thread */
-	if (thread_state == GET_SPIN_LOCK)
-	{
-		printf("Test FAILED: Child thread did not spin on spin lock when other thread holds the lock\n");
+	if (thread_state == GET_SPIN_LOCK) {
+		printf
+		    ("Test FAILED: Child thread did not spin on spin lock when other thread holds the lock\n");
 		exit(PTS_FAIL);
-	}
-	else if (thread_state == ENTERED_THREAD)
-	{
+	} else if (thread_state == ENTERED_THREAD) {
 		printf("thread: spins on spin lock\n");
 		printf("Test PASSED\n");
 		exit(PTS_PASS);
-	}
-	else
-	{
+	} else {
 		printf("Unexpected child thread state: %d\n", thread_state);
 		exit(PTS_UNRESOLVED);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c
index 83a04e4..a6f87fb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c
@@ -35,7 +35,7 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	thread_state = ENTERED_THREAD;
@@ -43,9 +43,10 @@
 	/* Lock the spinlock */
 	printf("thread: attempt spin lock\n");
 	rc = pthread_spin_lock(&spinlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: child failed to get spin lock,error code:%d\n" , rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: child failed to get spin lock,error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 	printf("thread: acquired spin lock\n");
@@ -55,8 +56,7 @@
 
 	/* Unlock the spin lock */
 	printf("thread: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock))
-	{
+	if (pthread_spin_unlock(&spinlock)) {
 		printf("child: Error at pthread_spin_unlock()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -73,8 +73,7 @@
 	pthread_t child_thread;
 
 	/* Initialize spinlock */
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -82,9 +81,9 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Test FAILED: main cannot get spin lock  when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get spin lock  when no one owns the lock\n");
 		return PTS_FAIL;
 	}
 	printf("main: acquired spin lock\n");
@@ -94,63 +93,54 @@
 
 	/* Create thread */
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	cnt = 0;
 	/* Expect the child thread to spin on spin lock.  Wait for 3 seconds. */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: child thread did not spin on spin lock when other thread holds the lock\n");
+	if (thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: child thread did not spin on spin lock when other thread holds the lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("main: Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock) != 0)
-	{
+	if (pthread_spin_unlock(&spinlock) != 0) {
 		printf("main: Error at pthread_spin_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* We expected the child get the spin lock and exit */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: child thread did not get spin lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to finish execution */
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Destroy the spinlock */
-	if (pthread_spin_destroy(&spinlock) != 0)
-	{
+	if (pthread_spin_destroy(&spinlock) != 0) {
 		printf("Error at pthread_spin_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-1.c
index 251342b..b78e716 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-1.c
@@ -27,8 +27,9 @@
 static void sig_handler()
 {
 	printf("main: interrupted by SIGALARM\n");
-	printf("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in  use, but standard says 'may' fail\n");
-	pthread_exit((void*)PTS_PASS);
+	printf
+	    ("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in  use, but standard says 'may' fail\n");
+	pthread_exit((void *)PTS_PASS);
 }
 
 int main()
@@ -43,8 +44,7 @@
 	sigfillset(&act.sa_mask);
 	sigaction(SIGALRM, &act, 0);
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -52,9 +52,9 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Test FAILED: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get spin lock when no one owns the lock\n");
 		return PTS_FAIL;
 	}
 	printf("main: acquired spin lock\n");
@@ -65,15 +65,14 @@
 	printf("main: re-lock spin lock\n");
 	rc = pthread_spin_lock(&spinlock);
 
-	if (rc == EDEADLK)
-	{
-		printf("main: correctly got EDEADLK when re-locking the spin lock\n");
+	if (rc == EDEADLK) {
+		printf
+		    ("main: correctly got EDEADLK when re-locking the spin lock\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("main: get return code: %d , %s\n", rc, strerror(rc));
-		printf("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in  use, but standard says 'may' fail\n");
+		printf
+		    ("Test PASSED: *Note: Did not return EDEADLK when re-locking a spinlock already in  use, but standard says 'may' fail\n");
 	}
 
 	/* Unlock spinlock */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-2.c
index 144fb62..12d63bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-2.c
@@ -28,15 +28,13 @@
 static void sig_handler()
 {
 	printf("main: interrupted by SIGALARM\n");
-	if (rc == EINVAL)
-	{
+	if (rc == EINVAL) {
 		printf("main: correctly got EINVAL\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("main: get return code: %d, %s\n", rc, strerror(rc));
-		printf("Test PASSED: *Note: Did not return EINVAL when attempting to lock an uninitialized spinlock, but standard says 'may' fail\n");
+		printf
+		    ("Test PASSED: *Note: Did not return EINVAL when attempting to lock an uninitialized spinlock, but standard says 'may' fail\n");
 	}
 
 	exit(PTS_PASS);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
index 885d021..a4b87b8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
@@ -39,19 +39,17 @@
 
 static void sig_handler()
 {
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: thread incorrectly spins on trylock\n");
 		exit(PTS_FAIL);
-	}
-	else
-	{
-		printf("UNRESOLVED: Unexpected child thread state %d\n", thread_state);
+	} else {
+		printf("UNRESOLVED: Unexpected child thread state %d\n",
+		       thread_state);
 		exit(PTS_UNRESOLVED);
 	}
 }
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	rc = 0;
 
@@ -78,8 +76,7 @@
 {
 	pthread_t child_thread;
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -87,17 +84,16 @@
 	printf("main: attempt to trylock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_trylock(&spinlock) != 0)
-	{
-		printf("Test FAILED: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_trylock(&spinlock) != 0) {
+		printf
+		    ("Test FAILED: main cannot get spin lock when no one owns the lock\n");
 		return PTS_FAIL;
 	}
 	printf("main: acquired spin lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -106,9 +102,10 @@
 	pthread_join(child_thread, NULL);
 
 	/* Check the return code of pthread_spin_trylock */
-	if (rc != EBUSY)
-	{
-		printf("Test FAILED: pthread_spin_trylock should return EBUSY, instead got error code:%d\n" , rc);
+	if (rc != EBUSY) {
+		printf
+		    ("Test FAILED: pthread_spin_trylock should return EBUSY, instead got error code:%d\n",
+		     rc);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/4-1.c
index cd23060..dacccf4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/4-1.c
@@ -32,15 +32,14 @@
 	/* attemp to lock an uninitalized spin lock */
 
 	rc = pthread_spin_trylock(&spinlock);
-	if (rc == EINVAL)
-	{
+	if (rc == EINVAL) {
 		printf("Correctly got EINVAL at pthread_spin_trylock()\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
-		printf("Expected EINVAL, but get return code: %d,%s\n", rc, strerror(rc));
-		printf("Test PASSED: *Note: Returned incorrect value, but standard says 'may' fail\n");
+	} else {
+		printf("Expected EINVAL, but get return code: %d,%s\n", rc,
+		       strerror(rc));
+		printf
+		    ("Test PASSED: *Note: Returned incorrect value, but standard says 'may' fail\n");
 	}
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c
index 3e87122..a10d4f5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c
@@ -37,24 +37,22 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	thread_state = ENTERED_THREAD;
 
 	printf("thread: attempt trylock\n");
 	rc = pthread_spin_trylock(&spinlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("Test FAILED: thread failed to get spin lock,"
-			"Error code:%d\n" , rc);
+		       "Error code:%d\n", rc);
 		exit(PTS_FAIL);
 	}
 	printf("thread: acquired spin lock\n");
 
 	printf("thread: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock))
-	{
+	if (pthread_spin_unlock(&spinlock)) {
 		printf("thread: Error at pthread_spin_unlock()\n");
 		exit(PTS_FAIL);
 	}
@@ -70,8 +68,7 @@
 
 	pthread_t child_thread;
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -79,53 +76,47 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("main: cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("main: cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired spin lock\n");
 
 	printf("main: unlock spin lock\n");
 	rc = pthread_spin_unlock(&spinlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("main: Error at pthread_spin_unlock()\n");
 		return PTS_FAIL;
 	}
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait for thread to end execution */
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: try to lock again when thread unlocked\n");
-	if (pthread_spin_trylock(&spinlock) != 0)
-	{
+	if (pthread_spin_trylock(&spinlock) != 0) {
 		printf("main: Should get spin lock\n");
 		return PTS_FAIL;
 	}
 
 	printf("main: acquired spin lock\n");
 	printf("main: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock) != 0)
-	{
+	if (pthread_spin_unlock(&spinlock) != 0) {
 		printf("Test FAILED: main: Error at pthread_spin_unlock()\n");
 		return PTS_FAIL;
 	}
 
-	if (pthread_spin_destroy(&spinlock) != 0)
-	{
+	if (pthread_spin_destroy(&spinlock) != 0) {
 		printf("Error at pthread_spin_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c
index a9f8699..934fc20 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c
@@ -39,16 +39,17 @@
 #define ENTERED_THREAD 2
 #define EXITING_THREAD 3
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 	thread_state = ENTERED_THREAD;
 
 	printf("thread: attempt spin lock\n");
 	rc = pthread_spin_lock(&spinlock);
-	if (rc != 0)
-	{
-		printf("Test FAILED: thread failed to get spin lock error code:%d\n" , rc);
+	if (rc != 0) {
+		printf
+		    ("Test FAILED: thread failed to get spin lock error code:%d\n",
+		     rc);
 		exit(PTS_FAIL);
 	}
 	printf("thread: acquired spin lock\n");
@@ -56,8 +57,7 @@
 	sleep(1);
 
 	printf("thread: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock))
-	{
+	if (pthread_spin_unlock(&spinlock)) {
 		printf("Test FAILED: Error at pthread_spin_unlock()\n");
 		exit(PTS_FAIL);
 	}
@@ -73,8 +73,7 @@
 
 	pthread_t child_thread;
 
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -82,70 +81,61 @@
 	printf("main: attempt spin lock\n");
 
 	/* We should get the lock */
-	if (pthread_spin_lock(&spinlock) != 0)
-	{
-		printf("Error: main cannot get spin lock when no one owns the lock\n");
+	if (pthread_spin_lock(&spinlock) != 0) {
+		printf
+		    ("Error: main cannot get spin lock when no one owns the lock\n");
 		return PTS_UNRESOLVED;
 	}
 	printf("main: acquired spin lock\n");
 
 	thread_state = NOT_CREATED_THREAD;
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating child thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	cnt = 0;
 	/* Expect the child thread to spin on spin lock */
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == EXITING_THREAD)
-	{
-		printf("Test FAILED: child thread did not spin on spin lock when other thread holds the lock\n");
+	if (thread_state == EXITING_THREAD) {
+		printf
+		    ("Test FAILED: child thread did not spin on spin lock when other thread holds the lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != ENTERED_THREAD)
-	{
+	} else if (thread_state != ENTERED_THREAD) {
 		printf("main: Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
 	printf("main: unlock spin lock\n");
-	if (pthread_spin_unlock(&spinlock) != 0)
-	{
+	if (pthread_spin_unlock(&spinlock) != 0) {
 		printf("Test FAILED: main: Error at pthread_spin_unlock()\n");
 		return PTS_FAIL;
 	}
 
 	/* We expected the child get the spin lock and exit */
 	cnt = 0;
-	do{
+	do {
 		sleep(1);
-	}while (thread_state != EXITING_THREAD && cnt++ < 3);
+	} while (thread_state != EXITING_THREAD && cnt++ < 3);
 
-	if (thread_state == ENTERED_THREAD)
-	{
+	if (thread_state == ENTERED_THREAD) {
 		printf("Test FAILED: child thread did not get spin lock\n");
 		return PTS_FAIL;
-	}
-	else if (thread_state != EXITING_THREAD)
-	{
+	} else if (thread_state != EXITING_THREAD) {
 		printf("main: Unexpected thread state %d\n", thread_state);
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_spin_destroy(&spinlock) != 0)
-	{
+	if (pthread_spin_destroy(&spinlock) != 0) {
 		printf("Error at pthread_spin_destroy()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c
index abdbe99..5079da9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c
@@ -36,13 +36,12 @@
 #define INTHREAD 0
 #define INMAIN 1
 
-static void* fn_chld(void *arg)
+static void *fn_chld(void *arg)
 {
 	int rc = 0;
 
 	/* Initialize spin lock */
-	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0)
-	{
+	if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) {
 		printf("main: Error at pthread_spin_init()\n");
 		exit(PTS_UNRESOLVED);
 	}
@@ -50,9 +49,9 @@
 	/* Lock the spinlock */
 	printf("thread: attempt spin lock\n");
 	rc = pthread_spin_lock(&spinlock);
-	if (rc != 0)
-	{
-		printf("Error: thread failed to get spin lock error code:%d\n" , rc);
+	if (rc != 0) {
+		printf("Error: thread failed to get spin lock error code:%d\n",
+		       rc);
 		exit(PTS_UNRESOLVED);
 	}
 	printf("thread: acquired spin lock\n");
@@ -65,8 +64,7 @@
 	/* Cleanup just in case */
 	pthread_spin_unlock(&spinlock);
 
-	if (pthread_spin_destroy(&spinlock) != 0)
-	{
+	if (pthread_spin_destroy(&spinlock) != 0) {
 		printf("Error at pthread_spin_destroy()");
 		exit(PTS_UNRESOLVED);
 	}
@@ -84,8 +82,7 @@
 
 	/* Create a thread that will initialize and lock a spinlock */
 	printf("main: create thread\n");
-	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0)
-	{
+	if (pthread_create(&child_thread, NULL, fn_chld, NULL) != 0) {
 		printf("main: Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
@@ -96,8 +93,7 @@
 
 	printf("main: attempt to unlock a spinlock that we don't own\n");
 	rc = pthread_spin_unlock(&spinlock);
-	if (rc != 0)
-	{
+	if (rc != 0) {
 		printf("main: Error at pthread_spin_unlock()\n");
 		return PTS_FAIL;
 	}
@@ -106,22 +102,20 @@
 	sem = INTHREAD;
 
 	/* Wait for thread to end execution */
-	if (pthread_join(child_thread, NULL) != 0)
-	{
+	if (pthread_join(child_thread, NULL) != 0) {
 		printf("main: Error at pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Test to see the return code of pthread_spin_unlock */
-	if (rc == EPERM)
-	{
-		printf("main: correctly got EPERM when unlocking a spinlock we didn't have permission to unlock\n");
+	if (rc == EPERM) {
+		printf
+		    ("main: correctly got EPERM when unlocking a spinlock we didn't have permission to unlock\n");
 		printf("Test PASSED\n");
-	}
-	else
-	{
+	} else {
 		printf("main: got return code :%d\n", rc);
-		printf("Test PASSED: *Note: Did not return EPERM when unlocking a spinlock it does not have a lock on, but standard says 'may' fail\n");
+		printf
+		    ("Test PASSED: *Note: Did not return EPERM when unlocking a spinlock it does not have a lock on, but standard says 'may' fail\n");
 	}
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/1-1.c
index 36f42e0..f9ef739 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/1-1.c
@@ -35,18 +35,18 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
-int cleanup_flag;	/* Flag to indicate the thread's cleanup handler was called */
-pthread_mutex_t	mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
+int sem1;			/* Manual semaphore */
+int cleanup_flag;		/* Flag to indicate the thread's cleanup handler was called */
+pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;	/* Mutex */
 
 /* Cleanup function that the thread executes when it is canceled.  So if
  * cleanup_flag is 1, it means that the thread was canceled. */
 void a_cleanup_func()
 {
-	cleanup_flag=-1;
+	cleanup_flag = -1;
 	return;
 }
 
@@ -56,30 +56,29 @@
 	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
 
-	pthread_cleanup_push(a_cleanup_func,NULL);
+	pthread_cleanup_push(a_cleanup_func, NULL);
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Lock the mutex. It should have already been locked in main, so the thread
 	 * should block. */
-	if (pthread_mutex_lock(&mutex) != 0)
-        {
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
-		pthread_exit((void*)PTS_UNRESOLVED);
-		return (void*)PTS_UNRESOLVED;
+		pthread_exit((void *)PTS_UNRESOLVED);
+		return (void *)PTS_UNRESOLVED;
 	}
 
 	/* Should get here if the cancel request was deffered. */
 	pthread_cleanup_pop(0);
-	cleanup_flag=1;
+	cleanup_flag = 1;
 
 	/* Cancelation point.  Cancel request should not be honored here. */
 	pthread_testcancel();
 
 	/* Should not get here if the cancel request was honored at the cancelation point
 	 * pthread_testcancel(). */
-	cleanup_flag=-2;
+	cleanup_flag = -2;
 	pthread_exit(0);
 	return NULL;
 }
@@ -89,60 +88,54 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cleanup_flag=0;
+	sem1 = INTHREAD;
+	cleanup_flag = 0;
 
 	/* Lock the mutex */
-	if (pthread_mutex_lock(&mutex) != 0)
-	{
+	if (pthread_mutex_lock(&mutex) != 0) {
 		perror("Error in pthread_mutex_lock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
 	/* Send cancel request to the thread.  */
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		printf("Test FAILED: Couldn't cancel thread\n");
 		return PTS_FAIL;
 	}
 
 	/* Cancel request has been sent, unlock the mutex */
-	if (pthread_mutex_unlock(&mutex) != 0)
-	{
+	if (pthread_mutex_unlock(&mutex) != 0) {
 		perror("Error in pthread_mutex_unlock()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Wait 'till the thread has been canceled or has ended execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cleanup function wasn't called, so the cancel
 	 * request was not honord immediately like it should have been. */
-	if (cleanup_flag == -1)
-	{
+	if (cleanup_flag == -1) {
 		perror("Cancel request was not deferred.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (cleanup_flag == -2)
-	{
-		printf("Test FAILED:pthread_testcancel() not treated as a cancelation point.\n");
+	if (cleanup_flag == -2) {
+		printf
+		    ("Test FAILED:pthread_testcancel() not treated as a cancelation point.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/2-1.c
index b2e912a..a2909d9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/2-1.c
@@ -24,10 +24,10 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-# define INTHREAD 0 	/* Control going to or is already for Thread */
-# define INMAIN 1	/* Control going to or is already for Main */
+#define INTHREAD 0		/* Control going to or is already for Thread */
+#define INMAIN 1		/* Control going to or is already for Main */
 
-int sem1;		/* Manual semaphore */
+int sem1;			/* Manual semaphore */
 int cancel_flag;
 
 /* Function that the thread executes upon its creation */
@@ -36,14 +36,14 @@
 	/* Set cancel state to DISABLE, meaning it shouldn't honor any cancel requests. */
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
 
-	cancel_flag=-1;
+	cancel_flag = -1;
 
 	/* Indicate to main() that the thread has been created. */
-	sem1=INMAIN;
+	sem1 = INMAIN;
 
 	/* Wait until main() has sent out a cancel request, meaning until it
 	 * sets sem1==INTHREAD. */
-	while (sem1==INMAIN)
+	while (sem1 == INMAIN)
 		sleep(1);
 
 	/* If the thread incorrectly honors the cancel request, then the cancel_flag will
@@ -53,7 +53,7 @@
 
 	/* Should reach here if the thread correctly ignores the cancel
 	 * request. */
-	cancel_flag=1;
+	cancel_flag = 1;
 	pthread_exit(0);
 	return NULL;
 }
@@ -63,43 +63,40 @@
 	pthread_t new_th;
 
 	/* Initializing values */
-	sem1=INTHREAD;
-	cancel_flag=0;
+	sem1 = INTHREAD;
+	cancel_flag = 0;
 
 	/* Create a new thread. */
-	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0)
-	{
+	if (pthread_create(&new_th, NULL, a_thread_func, NULL) != 0) {
 		perror("Error creating thread\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure thread is created before we cancel it. (wait for
 	 * a_thread_func() to set sem1=INMAIN.) */
-	while (sem1==INTHREAD)
+	while (sem1 == INTHREAD)
 		sleep(1);
 
-	if (pthread_cancel(new_th) != 0)
-	{
+	if (pthread_cancel(new_th) != 0) {
 		perror("Error sending cancel request\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Indicate to the thread function that the thread cancel request
 	 * has been sent to it. */
-	sem1=INTHREAD;
+	sem1 = INTHREAD;
 
 	/* Wait for thread to end execution. */
-	if (pthread_join(new_th, NULL) != 0)
-	{
+	if (pthread_join(new_th, NULL) != 0) {
 		perror("Error in pthread_join()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* This means that the cancel request was honored rather than ignored, and
 	 * the test fails. */
-	if (cancel_flag <= 0)
-	{
-		printf("Test FAILED: pthread_testcancel() was honored even though cancelability was disabled.\n");
+	if (cancel_flag <= 0) {
+		printf
+		    ("Test FAILED: pthread_testcancel() was honored even though cancelability was disabled.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/1-1.c
index b58324c..306bdc3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/1-1.c
@@ -33,8 +33,8 @@
 {
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/1-2.c
index b6d76bd..f41553d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/1-2.c
@@ -48,8 +48,8 @@
 {
 	struct sigaction parentact;
 
-	parentact.sa_handler=parenthandler;
-	parentact.sa_flags=0;
+	parentact.sa_handler = parenthandler;
+	parentact.sa_flags = 0;
 	if (sigemptyset(&parentact.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
@@ -63,8 +63,8 @@
 		/* child here */
 		struct sigaction childact;
 
-		childact.sa_handler=childhandler;
-		childact.sa_flags=0;
+		childact.sa_handler = childhandler;
+		childact.sa_flags = 0;
 		if (sigemptyset(&childact.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return PTS_UNRESOLVED;
@@ -92,8 +92,7 @@
 			printf("Child exited normally\n");
 			printf("Test PASSED\n");
 			return PTS_PASS;
-		}
-		else {
+		} else {
 			printf("Child did not exit normally.\n");
 			printf("Test FAILED\n");
 			return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/10000-1.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/10000-1.c
index 0818d14..162c98e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/10000-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/10000-1.c
@@ -62,8 +62,8 @@
 	int failure = 0;
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
index bcc1631..bb23baf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/2-1.c
@@ -47,8 +47,8 @@
 {
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
@@ -68,7 +68,7 @@
 	}
 
 	if (LEAVINGHANDLER == globalStatus) {
-		printf ("Test PASSED\n");
+		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/raise/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/raise/4-1.c
index 5dc0c71..5fa61f1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/raise/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/raise/4-1.c
@@ -38,8 +38,8 @@
 {
 	struct sigaction act;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-1.c
index 01e06d4..14cec07 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-1.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-2.c
index 86e9ce4..480a54d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-2.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-3.c
index b55a76c..bf48aaf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-3.c
@@ -26,8 +26,9 @@
 	result = sched_get_priority_max(SCHED_SPORADIC);
 
 	if (result != -1 && errno == 0) {
-		printf("The maximum priority for policy SCHED_SPORADIC is %i.\n",
-		       result);
+		printf
+		    ("The maximum priority for policy SCHED_SPORADIC is %i.\n",
+		     result);
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
@@ -36,7 +37,7 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
 #else
 int main()
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-4.c
index 6555c4f..0e6f75e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-4.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/2-1.c
index 0701d1e..a9ee897 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/2-1.c
@@ -40,5 +40,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-1.c
index e4a6195..b097c3f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-1.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-2.c
index 0c26c49..fd2f374 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-2.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-3.c
index 59a51ab..9d8c6c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-3.c
@@ -25,9 +25,10 @@
 
 	result = sched_get_priority_min(SCHED_SPORADIC);
 
-	if (result != -1 && errno == 0 ) {
-		printf("The minimum priority for policy SCHED_SPORADIC is %i.\n",
-		       result);
+	if (result != -1 && errno == 0) {
+		printf
+		    ("The minimum priority for policy SCHED_SPORADIC is %i.\n",
+		     result);
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
@@ -36,7 +37,7 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
 #else
 int main()
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-4.c
index 60b3583..d84ad0c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-4.c
@@ -33,5 +33,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/2-1.c
index e8b6b7f..a51005f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/2-1.c
@@ -40,5 +40,5 @@
 	}
 
 	printf("This code should not be executed.\n");
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/1-1.c
index 902a921..57f4be0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/1-1.c
@@ -26,9 +26,7 @@
 
 	result = sched_getparam(getpid(), &param);
 
-	if (result == 0 &&
-	   param.sched_priority != -1 &&
-	   errno == 0) {
+	if (result == 0 && param.sched_priority != -1 && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result != 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/2-1.c
index 9cf7083..624de43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/2-1.c
@@ -32,8 +32,7 @@
 	result1 = sched_getparam(getpid(), &param1);
 
 	if (result0 == result1 &&
-	   param0.sched_priority == param1.sched_priority &&
-	   errno == 0) {
+	    param0.sched_priority == param1.sched_priority && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/3-1.c
index 206fcc2..28c2beb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/3-1.c
@@ -25,9 +25,7 @@
 
 	result = sched_getparam(0, &param);
 
-	if (result == 0 &&
-	   param.sched_priority != -1 &&
-	   errno == 0) {
+	if (result == 0 && param.sched_priority != -1 && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/1-1.c
index 09a2fa1..827dcee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/1-1.c
@@ -26,8 +26,7 @@
 	result0 = sched_getscheduler(0);
 	result1 = sched_getscheduler(getpid());
 
-	if (result0 == result1 &&
-	   errno == 0) {
+	if (result0 == result1 && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result0 != result1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/3-1.c
index ec36826..1916ac9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/3-1.c
@@ -22,27 +22,22 @@
 } sym[] = {
 #ifdef SCHED_FIFO
 	{
-		 SCHED_FIFO, "SCHED_FIFO"
-	},
+	SCHED_FIFO, "SCHED_FIFO"},
 #endif
 #ifdef SCHED_RR
 	{
-		 SCHED_RR, "SCHED_RR"
-	},
+	SCHED_RR, "SCHED_RR"},
 #endif
 #ifdef SCHED_SPORADIC
 	{
-	  SCHED_SPORADIC, "SCHED_SPORADIC"
-	},
+	SCHED_SPORADIC, "SCHED_SPORADIC"},
 #endif
 #ifdef SCHED_OTHER
 	{
-		 SCHED_OTHER, "SCHED_OTHER"
-	},
+	SCHED_OTHER, "SCHED_OTHER"},
 #endif
 	{
-		 0, 0
-	}
+	0, 0}
 };
 
 int main(int argc, char **argv)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/1-1.c
index ef45474..2784a85 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/1-1.c
@@ -36,16 +36,16 @@
 	result1 = sched_rr_get_interval(getpid(), &interval1);
 
 	if (result0 == result1 &&
-	   interval0.tv_sec == interval1.tv_sec &&
-	   interval0.tv_nsec == interval1.tv_nsec &&
-	   errno == 0) {
+	    interval0.tv_sec == interval1.tv_sec &&
+	    interval0.tv_nsec == interval1.tv_nsec && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno != 0) {
 		perror("Unexpected error");
 		return PTS_FAIL;
 	} else {
-		printf("Different results between pid == 0 and pid == getpid().\n");
+		printf
+		    ("Different results between pid == 0 and pid == getpid().\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/2-1.c
index 6c32ff5..98cff86 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/2-1.c
@@ -27,9 +27,7 @@
 	result = sched_rr_get_interval(0, &interval);
 
 	if (result == 0 &&
-	   interval.tv_sec >= 0 &&
-	   interval.tv_nsec >= 0 &&
-	   errno == 0) {
+	    interval.tv_sec >= 0 && interval.tv_nsec >= 0 && errno == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/speculative/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/speculative/5-1.c
index f3fda22..e9e6e78 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/speculative/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/speculative/5-1.c
@@ -27,11 +27,13 @@
 	result = sched_rr_get_interval(0, NULL);
 
 	if (result == -1 && errno == EFAULT) {
-		printf("sched_rr_get_interval() sets errno == EFAULT when interval argument points to NULL\n");
+		printf
+		    ("sched_rr_get_interval() sets errno == EFAULT when interval argument points to NULL\n");
 		return PTS_PASS;
 	}
 	if (result == -1 && errno == EINVAL) {
-		printf("sched_rr_get_interval() sets errno == EINVAL when interval argument points to NULL\n");
+		printf
+		    ("sched_rr_get_interval() sets errno == EINVAL when interval argument points to NULL\n");
 		return PTS_PASS;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
index e9dee80..ceba8ce 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
@@ -20,7 +20,8 @@
 #include <stdlib.h>
 #include "posixtest.h"
 
-void child_proc() {
+void child_proc()
+{
 	sigset_t sigset;
 	int sig;
 
@@ -28,7 +29,7 @@
 		perror("An error occurs when calling sigemptyset()");
 		exit(1);
 	}
-	if (sigaddset(&sigset,SIGUSR1) != 0) {
+	if (sigaddset(&sigset, SIGUSR1) != 0) {
 		perror("An error occurs when calling sigaddset()");
 		exit(1);
 	}
@@ -40,19 +41,20 @@
 	exit(0);
 }
 
-int main() {
-        int result, child_pid, tmp_errno, policy;
+int main()
+{
+	int result, child_pid, tmp_errno, policy;
 	int min_priority, new_priority, old_priority;
 	struct sched_param param;
 
-        /* Create a child process which wait SIGUSR1 */
-        child_pid = fork();
-        if (child_pid == -1) {
+	/* Create a child process which wait SIGUSR1 */
+	child_pid = fork();
+	if (child_pid == -1) {
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
-        } else if (child_pid == 0) {
+	} else if (child_pid == 0) {
 		child_proc();
-        }
+	}
 
 	if (sched_getparam(child_pid, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
@@ -72,8 +74,8 @@
 	min_priority = sched_get_priority_min(policy);
 
 	new_priority = param.sched_priority == min_priority ?
-		(param.sched_priority = sched_get_priority_max(policy)) :
-		(param.sched_priority = min_priority);
+	    (param.sched_priority = sched_get_priority_max(policy)) :
+	    (param.sched_priority = min_priority);
 
 	result = sched_setparam(child_pid, &param);
 	tmp_errno = errno;
@@ -93,7 +95,8 @@
 		kill(child_pid, SIGUSR1);
 		return PTS_FAIL;
 	} else if (result == -1 && tmp_errno == EPERM) {
-		printf("The process have not permission to change the param of its child.\n");
+		printf
+		    ("The process have not permission to change the param of its child.\n");
 		kill(child_pid, SIGUSR1);
 		return PTS_UNRESOLVED;
 	} else if (result == -1 && tmp_errno == EINVAL) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/10-1.c
index fc4332a..15dfe41 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/10-1.c
@@ -37,14 +37,14 @@
 #include "posixtest.h"
 
 #ifdef BSD
-# include <sys/types.h>
-# include <sys/param.h>
-# include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
 #endif
 
 #ifdef HPUX
-# include <sys/param.h>
-# include <sys/pstat.h>
+#include <sys/param.h>
+#include <sys/pstat.h>
 #endif
 
 static int nb_cpu;
@@ -58,19 +58,19 @@
 #ifdef _SC_NPROCESSORS_ONLN
 	ncpu = sysconf(_SC_NPROCESSORS_ONLN);
 #else
-# ifdef BSD
+#ifdef BSD
 	int mib[2];
 	size_t len = sizeof(ncpu);
 	mib[0] = CTL_HW;
 	mib[1] = HW_NCPU;
 	sysctl(mib, 2, &ncpu, &len, NULL, 0);
-# else
-#  ifdef HPUX
+#else
+#ifdef HPUX
 	struct pst_dynamic psd;
 	pstat_getdynamic(&psd, sizeof(psd), 1, 0);
 	ncpu = (int)psd.psd_proc_cnt;
-#  endif /* HPUX */
-# endif /* BSD */
+#endif /* HPUX */
+#endif /* BSD */
 #endif /* _SC_NPROCESSORS_ONLN */
 
 	return ncpu;
@@ -97,7 +97,7 @@
 
 int main(void)
 {
-        int *child_pid, oldcount, newcount, shm_id, i, j;
+	int *child_pid, oldcount, newcount, shm_id, i, j;
 	struct sched_param param;
 	key_t key;
 
@@ -110,15 +110,15 @@
 
 	child_pid = malloc(nb_cpu * sizeof(int));
 
-	key = ftok("conformance/interfaces/sched_setparam/10-1.c",1234);
-	shm_id = shmget(key, sizeof(int), IPC_CREAT|0600);
+	key = ftok("conformance/interfaces/sched_setparam/10-1.c", 1234);
+	shm_id = shmget(key, sizeof(int), IPC_CREAT | 0600);
 	if (shm_id < 0) {
 		perror("An error occurs when calling shmget()");
 		return PTS_UNRESOLVED;
 	}
 
 	shmptr = shmat(shm_id, 0, 0);
-	if (shmptr == (void*)-1) {
+	if (shmptr == (void *)-1) {
 		perror("An error occurs when calling shmat()");
 		return PTS_UNRESOLVED;
 	}
@@ -128,10 +128,12 @@
 
 	if (sched_setscheduler(getpid(), SCHED_FIFO, &param) != 0) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling "
-			       "parameter.\nTry to launch this test as root\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling "
+			     "parameter.\nTry to launch this test as root\n");
 		} else {
-			perror("An error occurs when calling sched_setscheduler()");
+			perror
+			    ("An error occurs when calling sched_setscheduler()");
 		}
 		return PTS_UNRESOLVED;
 	}
@@ -140,7 +142,7 @@
 		child_pid[i] = fork();
 		if (child_pid[i] == -1) {
 			perror("An error occurs when calling fork()");
-			for (j=0; j<i; j++) {
+			for (j = 0; j < i; j++) {
 				kill(child_pid[j], SIGTERM);
 			}
 			return PTS_UNRESOLVED;
@@ -166,7 +168,8 @@
 	newcount = *shmptr;
 
 	if (newcount == oldcount) {
-		printf("The calling process does not relinquish the processor\n");
+		printf
+		    ("The calling process does not relinquish the processor\n");
 		kill_children(child_pid);
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/12-1.c
index 06e3fa0..78c8013 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/12-1.c
@@ -19,13 +19,15 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
+int main()
+{
 	printf("Not yet tested.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/13-1.c
index 9e86025..6de32ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/13-1.c
@@ -19,13 +19,15 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
+int main()
+{
 	printf("Not yet tested.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/14-1.c
index e949e94..44ce94c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/14-1.c
@@ -21,13 +21,15 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
+int main()
+{
 	printf("Not yet tested.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/15-1.c
index 0831b0f..6a928e2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/15-1.c
@@ -20,13 +20,16 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
-	printf("Will not test the effects of the sched_ss_low_priority,\nsched_ss_repl_period, and sched_ss_init_budget members when the scheduling\npolicy of the target process is not SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC.\nIt is implementation-defined.\n");
+int main()
+{
+	printf
+	    ("Will not test the effects of the sched_ss_low_priority,\nsched_ss_repl_period, and sched_ss_init_budget members when the scheduling\npolicy of the target process is not SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC.\nIt is implementation-defined.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/16-1.c
index 8a2c035..4d0823d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/16-1.c
@@ -19,13 +19,16 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
-	printf(" Will not test the result of sched_setparam when the scheduling policy of the\ntarget process is not SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC.\nIt is implementation-defined.\n");
+int main()
+{
+	printf
+	    (" Will not test the result of sched_setparam when the scheduling policy of the\ntarget process is not SCHED_FIFO, SCHED_RR, or SCHED_SPORADIC.\nIt is implementation-defined.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/17-1.c
index 52ef4e4..e899048 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/17-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that sched_setparam have no effect on the scheduling of threads\n with system scheduling contention scope.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that sched_setparam have no effect on the scheduling of threads\n with system scheduling contention scope.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/18-1.c
index 9a49202..ebafe27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/18-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that the threads scheduling policy and associated parameters\nare not affected.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that the threads scheduling policy and associated parameters\nare not affected.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/19-1.c
index d8bccb6..46564e2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/19-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that the underlying kernel-scheduled entities for the system\ncontention scope threads are not be affected by this sched_setparam().\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that the underlying kernel-scheduled entities for the system\ncontention scope threads are not be affected by this sched_setparam().\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
index 0ae3a79..ea37807 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-1.c
@@ -39,20 +39,20 @@
 #include "posixtest.h"
 
 #ifdef BSD
-# include <sys/types.h>
-# include <sys/param.h>
-# include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
 #endif
 
 #ifdef HPUX
-# include <sys/param.h>
-# include <sys/pstat.h>
+#include <sys/param.h>
+#include <sys/pstat.h>
 #endif
 
 #include <affinity.h>
 
 #define NB_LOOP         20000000
-#define NB_LOOP_CHILD  200000000 /* shall be much greater than NB_LOOP */
+#define NB_LOOP_CHILD  200000000	/* shall be much greater than NB_LOOP */
 
 #define ACCEPTABLE_RATIO 2.0
 
@@ -60,54 +60,57 @@
 #define STDOUT 1
 #define STDERR 2
 
-int nb_child;   /* Number of child processes == number of CPUs */
+int nb_child;			/* Number of child processes == number of CPUs */
 int count = 0;
 int the_pipe[2];
 
 /* Get the number of CPUs */
-int get_ncpu() {
+int get_ncpu()
+{
 	int ncpu = -1;
 
 	/* This syscall is not POSIX but it should work on many system */
 #ifdef _SC_NPROCESSORS_ONLN
 	ncpu = sysconf(_SC_NPROCESSORS_ONLN);
 #else
-# ifdef BSD
+#ifdef BSD
 	int mib[2];
 	size_t len = sizeof(ncpu);
 	mib[0] = CTL_HW;
 	mib[1] = HW_NCPU;
 	sysctl(mib, 2, &ncpu, &len, NULL, 0);
-# else
-#  ifdef HPUX
+#else
+#ifdef HPUX
 	struct pst_dynamic psd;
 	pstat_getdynamic(&psd, sizeof(psd), 1, 0);
 	ncpu = (int)psd.psd_proc_cnt;
-#  endif /* HPUX */
-# endif /* BSD */
+#endif /* HPUX */
+#endif /* BSD */
 #endif /* _SC_NPROCESSORS_ONLN */
 
 	return ncpu;
 }
 
-void child_process(int id) {
+void child_process(int id)
+{
 	int i;
 	struct sched_param param;
 
-	if (id == nb_child-1) {
+	if (id == nb_child - 1) {
 		param.sched_priority = sched_get_priority_min(SCHED_FIFO);
 		sched_setparam(getpid(), &param);
 	}
 
-	for (i=0; i<NB_LOOP_CHILD; i++) {
-		count ++;
+	for (i = 0; i < NB_LOOP_CHILD; i++) {
+		count++;
 	}
 }
 
-void sigterm_handler(int signum) {
+void sigterm_handler(int signum)
+{
 	close(STDOUT);
 	close(the_pipe[0]);
-	dup2(the_pipe[1],STDOUT);
+	dup2(the_pipe[1], STDOUT);
 	close(the_pipe[1]);
 
 	printf("*%i*", count);
@@ -116,24 +119,25 @@
 	exit(0);
 }
 
-int main() {
-        int child_count, i;
+int main()
+{
+	int child_count, i;
 	struct sched_param param;
 	int *child_pid;
 	float ratio;
 
 	/* Only use a single CPU and one child process
-	when set_affinity is availaible.It's because
-	no matter what value of the counter is set to,
-	There is no guarantee that the LOOP of the child
-	can be certainly big enough on any device at any time.
-	*/
+	   when set_affinity is availaible.It's because
+	   no matter what value of the counter is set to,
+	   There is no guarantee that the LOOP of the child
+	   can be certainly big enough on any device at any time.
+	 */
 	int rc = set_affinity(0);
 	if (rc) {
 		nb_child = get_ncpu();
 		if (nb_child == -1) {
 			printf("Can not get the number of"
-				"CPUs of your machine.\n");
+			       "CPUs of your machine.\n");
 			return PTS_UNRESOLVED;
 		}
 	} else {
@@ -143,13 +147,15 @@
 	child_pid = malloc(nb_child * sizeof(int));
 
 	param.sched_priority = (sched_get_priority_min(SCHED_FIFO) +
-				 sched_get_priority_max(SCHED_FIFO)) / 2;
+				sched_get_priority_max(SCHED_FIFO)) / 2;
 
 	if (sched_setscheduler(getpid(), SCHED_FIFO, &param) == -1) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root\n");
 		} else {
-			perror("An error occurs when calling sched_setscheduler()");
+			perror
+			    ("An error occurs when calling sched_setscheduler()");
 		}
 		return PTS_UNRESOLVED;
 	}
@@ -157,11 +163,11 @@
 	if (signal(SIGTERM, sigterm_handler) == SIG_ERR) {
 		perror("An error occurs when calling signal()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
 	pipe(the_pipe);
 
-	for (i=0; i<nb_child; i++) {
+	for (i = 0; i < nb_child; i++) {
 		child_pid[i] = fork();
 		if (child_pid[i] == -1) {
 			perror("An error occurs when calling fork()");
@@ -182,14 +188,14 @@
 
 	close(STDIN);
 	close(the_pipe[1]);
-	dup2(the_pipe[0],STDIN);
+	dup2(the_pipe[0], STDIN);
 	close(the_pipe[0]);
 
-	for (i=0; i<NB_LOOP; i++) {
+	for (i = 0; i < NB_LOOP; i++) {
 		count++;
 	}
 
-	if (kill(child_pid[nb_child-1], SIGTERM) != 0) {
+	if (kill(child_pid[nb_child - 1], SIGTERM) != 0) {
 		perror("An error occurs when calling kill()");
 		return PTS_UNRESOLVED;
 	}
@@ -200,10 +206,10 @@
 		return PTS_UNRESOLVED;
 	}
 
-	while (scanf("*%i*",&child_count) == 0)
+	while (scanf("*%i*", &child_count) == 0)
 		sched_yield();
 
-	for (i=0; i<nb_child-1; i++) {
+	for (i = 0; i < nb_child - 1; i++) {
 		if (kill(child_pid[i], SIGKILL) != 0) {
 			perror("An error occurs when calling kill()");
 			return PTS_UNRESOLVED;
@@ -216,11 +222,13 @@
 	if (child_count == 0 || ratio >= ACCEPTABLE_RATIO) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else if (ratio <= (1/ACCEPTABLE_RATIO)) {
-		printf("Higher numerical values for the priority represent the lower priorities.\n");
+	} else if (ratio <= (1 / ACCEPTABLE_RATIO)) {
+		printf
+		    ("Higher numerical values for the priority represent the lower priorities.\n");
 		return PTS_FAIL;
 	} else {
-		printf("The difference between the processes is not representative.\n");
+		printf
+		    ("The difference between the processes is not representative.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
index d645c33..035c4ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/2-2.c
@@ -39,20 +39,20 @@
 #include "posixtest.h"
 
 #ifdef BSD
-# include <sys/types.h>
-# include <sys/param.h>
-# include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
 #endif
 
 #ifdef HPUX
-# include <sys/param.h>
-# include <sys/pstat.h>
+#include <sys/param.h>
+#include <sys/pstat.h>
 #endif
 
 #include <affinity.h>
 
 #define NB_LOOP         20000000
-#define NB_LOOP_CHILD  200000000 /* shall be much greater than NB_LOOP */
+#define NB_LOOP_CHILD  200000000	/* shall be much greater than NB_LOOP */
 
 #define ACCEPTABLE_RATIO 2.0
 
@@ -60,54 +60,57 @@
 #define STDOUT 1
 #define STDERR 2
 
-int nb_child;   /* Number of child processes == number of CPUs */
+int nb_child;			/* Number of child processes == number of CPUs */
 int count = 0;
 int the_pipe[2];
 
 /* Get the number of CPUs */
-int get_ncpu() {
+int get_ncpu()
+{
 	int ncpu = -1;
 
 	/* This syscall is not POSIX but it should work on many system */
 #ifdef _SC_NPROCESSORS_ONLN
 	ncpu = sysconf(_SC_NPROCESSORS_ONLN);
 #else
-# ifdef BSD
+#ifdef BSD
 	int mib[2];
 	size_t len = sizeof(ncpu);
 	mib[0] = CTL_HW;
 	mib[1] = HW_NCPU;
 	sysctl(mib, 2, &ncpu, &len, NULL, 0);
-# else
-#  ifdef HPUX
+#else
+#ifdef HPUX
 	struct pst_dynamic psd;
 	pstat_getdynamic(&psd, sizeof(psd), 1, 0);
 	ncpu = (int)psd.psd_proc_cnt;
-#  endif /* HPUX */
-# endif /* BSD */
+#endif /* HPUX */
+#endif /* BSD */
 #endif /* _SC_NPROCESSORS_ONLN */
 
 	return ncpu;
 }
 
-void child_process(int id) {
+void child_process(int id)
+{
 	int i;
 	struct sched_param param;
 
-	if (id == nb_child-1) {
+	if (id == nb_child - 1) {
 		param.sched_priority = sched_get_priority_min(SCHED_RR);
 		sched_setparam(getpid(), &param);
 	}
 
-	for (i=0; i<NB_LOOP_CHILD; i++) {
-		count ++;
+	for (i = 0; i < NB_LOOP_CHILD; i++) {
+		count++;
 	}
 }
 
-void sigterm_handler(int signum) {
+void sigterm_handler(int signum)
+{
 	close(STDOUT);
 	close(the_pipe[0]);
-	dup2(the_pipe[1],STDOUT);
+	dup2(the_pipe[1], STDOUT);
 	close(the_pipe[1]);
 
 	printf("*%i*", count);
@@ -116,24 +119,25 @@
 	exit(0);
 }
 
-int main() {
-        int child_count, i;
+int main()
+{
+	int child_count, i;
 	struct sched_param param;
 	int *child_pid;
 	float ratio;
 
 	/* Only use a single CPU and one child process
-	when set_affinity is availaible.It's because
-	no matter what value of the counter is set to,
-	There is no guarantee that the LOOP of the child
-	can be certainly big enough on any device at any time.
-	*/
+	   when set_affinity is availaible.It's because
+	   no matter what value of the counter is set to,
+	   There is no guarantee that the LOOP of the child
+	   can be certainly big enough on any device at any time.
+	 */
 	int rc = set_affinity(0);
 	if (rc) {
 		nb_child = get_ncpu();
 		if (nb_child == -1) {
 			printf("Can not get the number of"
-				"CPUs of your machine.\n");
+			       "CPUs of your machine.\n");
 			return PTS_UNRESOLVED;
 		}
 	} else {
@@ -146,13 +150,15 @@
 		return PTS_UNRESOLVED;
 	}
 	param.sched_priority = (sched_get_priority_min(SCHED_RR) +
-				 sched_get_priority_max(SCHED_RR)) / 2;
+				sched_get_priority_max(SCHED_RR)) / 2;
 
 	if (sched_setscheduler(getpid(), SCHED_RR, &param) == -1) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root\n");
 		} else {
-			perror("An error occurs when calling sched_setscheduler()");
+			perror
+			    ("An error occurs when calling sched_setscheduler()");
 		}
 		return PTS_UNRESOLVED;
 	}
@@ -160,11 +166,11 @@
 	if (signal(SIGTERM, sigterm_handler) == SIG_ERR) {
 		perror("An error occurs when calling signal()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
 	pipe(the_pipe);
 
-	for (i=0; i<nb_child; i++) {
+	for (i = 0; i < nb_child; i++) {
 		child_pid[i] = fork();
 		if (child_pid[i] == -1) {
 			perror("An error occurs when calling fork()");
@@ -185,14 +191,14 @@
 
 	close(STDIN);
 	close(the_pipe[1]);
-	dup2(the_pipe[0],STDIN);
+	dup2(the_pipe[0], STDIN);
 	close(the_pipe[0]);
 
-	for (i=0; i<NB_LOOP; i++) {
+	for (i = 0; i < NB_LOOP; i++) {
 		count++;
 	}
 
-	if (kill(child_pid[nb_child-1], SIGTERM) != 0) {
+	if (kill(child_pid[nb_child - 1], SIGTERM) != 0) {
 		perror("An error occurs when calling kill()");
 		return PTS_UNRESOLVED;
 	}
@@ -203,10 +209,10 @@
 		return PTS_UNRESOLVED;
 	}
 
-	while (scanf("*%i*",&child_count) == 0)
+	while (scanf("*%i*", &child_count) == 0)
 		sched_yield();
 
-	for (i = 0; i < (nb_child-1); i++) {
+	for (i = 0; i < (nb_child - 1); i++) {
 		if (kill(child_pid[i], SIGKILL) != 0) {
 			perror("An error occurs when calling kill()");
 			return PTS_UNRESOLVED;
@@ -219,11 +225,13 @@
 	if (child_count == 0 || ratio >= ACCEPTABLE_RATIO) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
-	} else if (ratio <= (1/ACCEPTABLE_RATIO)) {
-		printf("Higher numerical values for the priority represent the lower priorities.\n");
+	} else if (ratio <= (1 / ACCEPTABLE_RATIO)) {
+		printf
+		    ("Higher numerical values for the priority represent the lower priorities.\n");
 		return PTS_FAIL;
 	} else {
-		printf("The difference between the processes is not representative.\n");
+		printf
+		    ("The difference between the processes is not representative.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/20-1.c
index 6896283..efa19db 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/20-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/20-1.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_priority, max_priority, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,15 +36,14 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	/* Make sure new_priority != old priority */
 	policy = sched_getscheduler(getpid());
 	max_priority = sched_get_priority_max(policy);
 	new_priority = (param.sched_priority == max_priority) ?
-		sched_get_priority_min(policy) :
-		max_priority;
+	    sched_get_priority_min(policy) : max_priority;
 
 	if (pthread_attr_init(&attr) != 0) {
 		printf("An error occurs when calling pthread_attr_init()");
@@ -66,7 +68,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-1.c
index e822366..4576072 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-1.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_priority, max_priority, old_policy, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,14 +36,13 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	/* Make sure new_priority != old priority */
 	old_policy = sched_getscheduler(getpid());
 	max_priority = sched_get_priority_max(old_policy);
 	new_priority = (param.sched_priority == max_priority) ?
-		sched_get_priority_min(old_policy) :
-		max_priority;
+	    sched_get_priority_min(old_policy) : max_priority;
 	param.sched_priority = new_priority;
 	if (sched_setparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_setparam()");
@@ -64,7 +66,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-2.c
index 6b38c88..645dd61 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/21-2.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_priority, max_priority, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,14 +36,13 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	/* Make sure new_priority != old_priority */
 	policy = sched_getscheduler(getpid());
 	max_priority = sched_get_priority_max(policy);
 	new_priority = (param.sched_priority == max_priority) ?
-		sched_get_priority_min(policy) :
-		max_priority;
+	    sched_get_priority_min(policy) : max_priority;
 	param.sched_priority = new_priority;
 	if (sched_setparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_setparam()");
@@ -64,7 +66,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/22-1.c
index 3b90d26..86ba531 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/22-1.c
@@ -15,7 +15,8 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int result;
 	struct sched_param param;
 
@@ -30,7 +31,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
 		printf("returned code is not 0.\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
index d53f75b..5813916 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-1.c
@@ -16,7 +16,8 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, old_priority;
 	struct sched_param param;
 
@@ -41,7 +42,7 @@
 	/* set an invalid priority */
 	invalid_priority++;
 	param.sched_priority = invalid_priority;
-	sched_setparam(0,&param);
+	sched_setparam(0, &param);
 
 	if (sched_getparam(0, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-2.c
index 294ea20..707de0a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-2.c
@@ -22,7 +22,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER) && (_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, old_priority;
 	struct sched_param param;
 
@@ -53,7 +54,7 @@
 	invalid_priority++;
 	param.sched_ss_low_priority = invalid_priority;
 	param.sched_priority++;
-	sched_setparam(0,&param);
+	sched_setparam(0, &param);
 
 	if (sched_getparam(0, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-3.c
index a8e060e..1da9840 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-3.c
@@ -20,7 +20,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int old_priority;
 	struct sched_param param;
 
@@ -38,7 +39,7 @@
 	param.sched_ss_init_budget.tv_nsec = 0;
 
 	param.sched_priority++;
-	sched_setparam(0,&param);
+	sched_setparam(0, &param);
 
 	if (sched_getparam(0, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-4.c
index e89b989..241af6c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-4.c
@@ -20,7 +20,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int old_priority;
 	struct sched_param param;
 
@@ -32,7 +33,7 @@
 
 	param.sched_ss_max_repl = 0;
 	param.sched_priority++;
-	sched_setparam(0,&param);
+	sched_setparam(0, &param);
 
 	if (sched_getparam(0, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
index 01f0fcd..26c4af7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-5.c
@@ -20,7 +20,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int old_priority;
 	struct sched_param param;
 
@@ -30,9 +31,9 @@
 	}
 	old_priority = param.sched_priority;
 
-	param.sched_ss_max_repl = SS_REPL_MAX+1;
+	param.sched_ss_max_repl = SS_REPL_MAX + 1;
 	param.sched_priority++;
-        sched_setparam(0,&param);
+	sched_setparam(0, &param);
 
 	if (sched_getparam(0, &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-6.c
index 56b7f1f..4b5e1cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-6.c
@@ -39,7 +39,8 @@
 
 	if (setuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -50,24 +51,26 @@
 	       pw->pw_name, (int)geteuid(), (int)getuid());
 	return 0;
 }
-int main() {
+
+int main()
+{
 	int old_priority;
-        struct sched_param param;
+	struct sched_param param;
 	int rc;
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
 
 	param.sched_priority = sched_get_priority_min(SCHED_FIFO);
 	/* Cannot test SCHED_OTHER, on 0 valid as its priority */
 	sched_setscheduler(0, SCHED_FIFO, &param);
 	if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	if (sched_getparam(0, &param) == -1) {
 		perror("An error occurs when calling sched_getparam()");
@@ -76,9 +79,8 @@
 	old_priority = param.sched_priority;
 
 	param.sched_priority++;
-	rc = sched_setparam(0,&param);
-	if (rc != -1 || (rc == -1 && errno != EPERM))
-	{
+	rc = sched_setparam(0, &param);
+	if (rc != -1 || (rc == -1 && errno != EPERM)) {
 		perror("sched_setparam() does not return EPERM\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-7.c
index 10c91ab..eed3deb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/23-7.c
@@ -19,9 +19,10 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	struct sched_param param;
-        int child_pid, stat_loc, old_priority;
+	int child_pid, stat_loc, old_priority;
 
 	if (sched_getparam(0, &param) == -1) {
 		perror("An error occurs when calling sched_getparam()");
@@ -29,22 +30,22 @@
 	}
 	old_priority = param.sched_priority;
 
-        /* Create a child process which exit immediately */
-        child_pid = fork();
-        if (child_pid == -1) {
+	/* Create a child process which exit immediately */
+	child_pid = fork();
+	if (child_pid == -1) {
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
-        } else if (child_pid == 0) {
+	} else if (child_pid == 0) {
 		exit(0);
-        }
+	}
 
-        /* Wait for the child process to exit */
-        if (wait(&stat_loc) == -1) {
+	/* Wait for the child process to exit */
+	if (wait(&stat_loc) == -1) {
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
-        /* Assume the pid is not yet reatributed to an other process */
+	/* Assume the pid is not yet reatributed to an other process */
 	param.sched_priority++;
 	sched_setparam(child_pid, &param);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-1.c
index ee45000..1614432 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-1.c
@@ -17,7 +17,8 @@
 #include <errno.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, result;
 	struct sched_param param;
 
@@ -37,7 +38,7 @@
 
 	param.sched_priority = invalid_priority;
 
-	result = sched_setparam(0,&param);
+	result = sched_setparam(0, &param);
 
 	if (result == -1 && errno == EINVAL) {
 		printf("Test PASSED\n");
@@ -46,10 +47,11 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("Unknow error");
+		perror("Unknow error");
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-2.c
index dc00263..f4464ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-2.c
@@ -23,7 +23,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, result;
 	struct sched_param param;
 
@@ -55,7 +56,7 @@
 
 	param.sched_ss_low_priority = invalid_priority;
 
-	result = sched_setparam(0,&param);
+	result = sched_setparam(0, &param);
 
 	if (result == -1 && errno == EINVAL) {
 		printf("Test PASSED\n");
@@ -64,17 +65,17 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("Unknow error");
+		perror("Unknow error");
 		return PTS_FAIL;
 	}
 }
 
 #elif _POSIX_SPORADIC_SERVER == -1
-int
-main (void)
+int main(void)
 {
 	printf("_POSIX_SPORADIC_SERVER support not available\n");
 	return PTS_UNSUPPORTED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-3.c
index 08a4047..855a834 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-3.c
@@ -22,7 +22,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, result;
 	struct sched_param param;
 
@@ -38,7 +39,7 @@
 	param.sched_ss_init_budget.tv_sec = 2;
 	param.sched_ss_init_budget.tv_nsec = 0;
 
-	result = sched_setparam(0,&param);
+	result = sched_setparam(0, &param);
 
 	if (result == -1 && errno == EINVAL) {
 		printf("Test PASSED\n");
@@ -47,17 +48,17 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("Unknown error");
-       	        return PTS_FAIL;
+		perror("Unknown error");
+		return PTS_FAIL;
 	}
 }
 
 #elif _POSIX_SPORADIC_SERVER == -1
-int
-main (void)
+int main(void)
 {
 	printf("_POSIX_SPORADIC_SERVER support not available\n");
 	return PTS_UNSUPPORTED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-4.c
index 4c75c53..40eb0ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/25-4.c
@@ -21,7 +21,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, result;
 	int result_code = PTS_PASS;
 	struct sched_param param;
@@ -33,13 +34,15 @@
 
 	/* test when sched_ss_max_repl < 1 */
 	param.sched_ss_max_repl = 0;
-	result = sched_setparam(0,&param);
+	result = sched_setparam(0, &param);
 
 	if (result != -1) {
-		printf("The returned code is not -1 when sched_ss_max_repl < 1.\n");
+		printf
+		    ("The returned code is not -1 when sched_ss_max_repl < 1.\n");
 		result_code = PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
 		result_code = PTS_UNRESOLVED;
 	} else if (errno != EINVAL) {
 		perror("Unknow error");
@@ -47,8 +50,8 @@
 	}
 
 	/* test when sched_ss_max_repl > SS_REPL_MAX */
-	param.sched_ss_max_repl = SS_REPL_MAX+1;
-	result = sched_setparam(0,&param);
+	param.sched_ss_max_repl = SS_REPL_MAX + 1;
+	result = sched_setparam(0, &param);
 
 	if (result == -1 && errno == EINVAL) {
 		if (result_code == PTS_PASS) {
@@ -56,24 +59,25 @@
 		}
 		return result_code;
 	} else if (result != -1) {
-		printf("The returned code is not -1 when sched_ss_max_repl > SS_REPL_MAX.\n");
+		printf
+		    ("The returned code is not -1 when sched_ss_max_repl > SS_REPL_MAX.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
 		if (result_code == PTS_FAIL) {
-			printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root\n");
 			return PTS_FAIL;
 		}
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("Unknow error");
+		perror("Unknow error");
 		return PTS_FAIL;
 	}
 
 }
 
 #elif _POSIX_SPORADIC_SERVER == -1
-int
-main (void)
+int main(void)
 {
 	printf("_POSIX_SPORADIC_SERVER support not available\n");
 	return PTS_UNSUPPORTED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/26-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/26-1.c
index 769f1ae..ca99674 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/26-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/26-1.c
@@ -37,7 +37,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -49,19 +50,20 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int result;
-        struct sched_param param;
+	struct sched_param param;
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-	  	if (set_nonroot() != 0) {
-			  printf("Cannot run this test as non-root user\n");
-                return PTS_UNTESTED;
-        }
-        }
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
+			printf("Cannot run this test as non-root user\n");
+			return PTS_UNTESTED;
+		}
+	}
 
 	if (sched_getparam(0, &param) == -1) {
 		perror("An error occurs when calling sched_getparam()");
@@ -74,7 +76,7 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno != EPERM) {
-	        perror("errno is not EPERM");
+		perror("errno is not EPERM");
 		return PTS_FAIL;
 	} else {
 		printf("The returned code is not -1.\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/27-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/27-1.c
index 1b90584..a93e74c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/27-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/27-1.c
@@ -22,31 +22,32 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	struct sched_param param;
-        int result, child_pid, stat_loc;
+	int result, child_pid, stat_loc;
 
 	if (sched_getparam(0, &param) == -1) {
 		perror("An error occurs when calling sched_getparam()");
 		return PTS_UNRESOLVED;
 	}
 
-        /* Create a child process which exit immediately */
-        child_pid = fork();
-        if (child_pid == -1) {
+	/* Create a child process which exit immediately */
+	child_pid = fork();
+	if (child_pid == -1) {
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
-        } else if (child_pid == 0) {
+	} else if (child_pid == 0) {
 		exit(0);
-        }
+	}
 
-        /* Wait for the child process to exit */
-        if (wait(&stat_loc) == -1) {
+	/* Wait for the child process to exit */
+	if (wait(&stat_loc) == -1) {
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
-        /* Assume the pid is not yet reatributed to an other process */
+	/* Assume the pid is not yet reatributed to an other process */
 	result = sched_setparam(child_pid, &param);
 
 	if (result == -1 && errno == ESRCH) {
@@ -56,10 +57,11 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to invoke sched_setparam().\nTry to launch this test as root\n");
+		printf
+		    ("This process does not have the permission to invoke sched_setparam().\nTry to launch this test as root\n");
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("errno is not ESRCH");
+		perror("errno is not ESRCH");
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/3-1.c
index bd9fbb6..ac8bf8c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/3-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the behavior of sched_setparam() when pid is negative because\nit is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the behavior of sched_setparam() when pid is negative because\nit is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/5-1.c
index 68109e7..7e1743d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/5-1.c
@@ -17,8 +17,9 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int main() {
-        int result, new_priority, old_priority, max_prio, policy;
+int main()
+{
+	int result, new_priority, old_priority, max_prio, policy;
 	struct sched_param param;
 
 	if (sched_getparam(getpid(), &param) != 0) {
@@ -36,8 +37,7 @@
 	max_prio = sched_get_priority_max(policy);
 	old_priority = param.sched_priority;
 	new_priority = (old_priority == max_prio) ?
-		sched_get_priority_min(policy) :
-		max_prio;
+	    sched_get_priority_min(policy) : max_prio;
 	param.sched_priority = new_priority;
 
 	result = sched_setparam(0, &param);
@@ -54,7 +54,8 @@
 		printf("The param does not change\n");
 		return PTS_FAIL;
 	} else if (result == -1 && errno == EPERM) {
-		printf("The process have not permission to change its own param.\n");
+		printf
+		    ("The process have not permission to change its own param.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/6-1.c
index b452450..68296b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/6-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test the conditions under which one process has permission to\nchange the scheduling parameters of another process, because they are\nimplementation-defined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the conditions under which one process has permission to\nchange the scheduling parameters of another process, because they are\nimplementation-defined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/7-1.c
index 15150f8..8174044 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/7-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test that implementations may require the requesting process to\nhave the appropriate privilege to set its own scheduling parameters or those\nof another process.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that implementations may require the requesting process to\nhave the appropriate privilege to set its own scheduling parameters or those\nof another process.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/8-1.c
index ad6302b..20ca7ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/8-1.c
@@ -15,7 +15,9 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-int main() {
-	printf("Will not test that the target process is moved to the tail of the thread\nlist for its priority when it is running.\n");
+int main()
+{
+	printf
+	    ("Will not test that the target process is moved to the tail of the thread\nlist for its priority when it is running.\n");
 	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
index 4f159d4..ed90cee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/9-1.c
@@ -43,14 +43,14 @@
 #include "affinity.h"
 
 #ifdef BSD
-# include <sys/types.h>
-# include <sys/param.h>
-# include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
 #endif
 
 #ifdef HPUX
-# include <sys/param.h>
-# include <sys/pstat.h>
+#include <sys/param.h>
+#include <sys/pstat.h>
 #endif
 
 static int nb_cpu;
@@ -94,7 +94,7 @@
 
 	/* to avoid blocking */
 	alarm(2);
-	while (1);
+	while (1) ;
 }
 
 static void test_process(void)
@@ -136,7 +136,7 @@
 	child_pid = malloc(nb_cpu * sizeof(int));
 
 	key = ftok("conformance/interfaces/sched_setparam/9-1.c", 1234);
-	shm_id = shmget(key, sizeof(int), IPC_CREAT|0600);
+	shm_id = shmget(key, sizeof(int), IPC_CREAT | 0600);
 	if (shm_id < 0) {
 		perror("An error occurs when calling shmget()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
index 6c052bf..13845f8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/1-1.c
@@ -28,22 +28,15 @@
 } sym[] = {
 
 	{
-		SCHED_FIFO, "SCHED_FIFO"
-	},
-	{
-		SCHED_RR, "SCHED_RR"
-	},
+	SCHED_FIFO, "SCHED_FIFO"}, {
+	SCHED_RR, "SCHED_RR"},
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1) || defined(_POSIX_THREAD_SPORADIC_SERVER)&&(_POSIX_THREAD_SPORADIC_SERVER != -1)
 	{
-		SCHED_SPORADIC,"SCHED_SPORADIC"
-	},
+	SCHED_SPORADIC, "SCHED_SPORADIC"},
 #endif
 	{
-		SCHED_OTHER, "SCHED_OTHER"
-	},
-	{
-		0, 0
-	}
+	SCHED_OTHER, "SCHED_OTHER"}, {
+	0, 0}
 };
 
 int main(int argc, char **argv)
@@ -54,24 +47,28 @@
 
 	tst = sym;
 	while (tst->name) {
-	        fflush(stderr);
+		fflush(stderr);
 		printf("Policy: %s\n", tst->name);
 		fflush(stdout);
 
 		policy = tst->value;
 		priority = (sched_get_priority_min(policy) +
-			     sched_get_priority_max(policy)) / 2;
+			    sched_get_priority_max(policy)) / 2;
 		param.sched_priority = priority;
 
 		tmp = sched_setscheduler(getpid(), policy, &param);
 
 		if (tmp == -1 || errno != 0) {
 			if (errno == EPERM) {
-				printf("  The process do not have permission to change its own scheduler\n  Try to run this test as root.\n");
+				printf
+				    ("  The process do not have permission to change its own scheduler\n  Try to run this test as root.\n");
 			} else {
-				printf("  Error calling sched_setscheduler() for %s policy\n", tst->name);
+				printf
+				    ("  Error calling sched_setscheduler() for %s policy\n",
+				     tst->name);
 			}
-			if (result != PTS_FAIL) result = PTS_UNRESOLVED;
+			if (result != PTS_FAIL)
+				result = PTS_UNRESOLVED;
 			tst++;
 			continue;
 		}
@@ -82,11 +79,15 @@
 		}
 
 		if (policy != sched_getscheduler(getpid())) {
-			printf("  sched_setscheduler() does not set the policy to %s.\n", tst->name);
+			printf
+			    ("  sched_setscheduler() does not set the policy to %s.\n",
+			     tst->name);
 			result = PTS_FAIL;
 		}
-	        if (priority != param.sched_priority) {
-			printf("  sched_setscheduler() does not set the right param for %s policy.\n", tst->name);
+		if (priority != param.sched_priority) {
+			printf
+			    ("  sched_setscheduler() does not set the right param for %s policy.\n",
+			     tst->name);
 			result = PTS_FAIL;
 		}
 
@@ -95,5 +96,5 @@
 
 	if (result == PTS_PASS)
 		printf("Test PASSED\n");
-        return result;
+	return result;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/10-1.c
index f4e4c85..bcac861 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/10-1.c
@@ -18,7 +18,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 	exit(PTS_UNSUPPORTED);
 #else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/11-1.c
index c245fab..c6b955d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/11-1.c
@@ -19,7 +19,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 	exit(PTS_UNSUPPORTED);
 #else
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/12-1.c
index d7b3727..6b6d7a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/12-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that sched_setscheduler have no effect on the scheduling of\n threads with system scheduling contention scope.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that sched_setscheduler have no effect on the scheduling of\n threads with system scheduling contention scope.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/13-1.c
index 9a49202..ebafe27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/13-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that the threads scheduling policy and associated parameters\nare not affected.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that the threads scheduling policy and associated parameters\nare not affected.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/14-1.c
index 414355c..2eadf67 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/14-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that the underlying kernel-scheduled entities for the system\ncontention scope threads are not be affected by sched_setscheduler().\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that the underlying kernel-scheduled entities for the system\ncontention scope threads are not be affected by sched_setscheduler().\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
index 606ce07..fae5db9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_policy, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,8 +36,7 @@
 
 	/* Make sure new policy != old policy */
 	new_policy = (sched_getscheduler(getpid()) == SCHED_FIFO) ?
-		SCHED_RR :
-		SCHED_FIFO;
+	    SCHED_RR : SCHED_FIFO;
 
 	if (pthread_attr_init(&attr) != 0) {
 		printf("An error occurs when calling pthread_attr_init()");
@@ -56,14 +58,15 @@
 	param.sched_priority = sched_get_priority_min(new_policy);
 	if (sched_setscheduler(getpid(), new_policy, &param) != 0) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling sched_setscheduler()");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
index 0b34991..47ada86 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_priority, max_priority, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,14 +36,13 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	/* Make sure new_priority != old priority */
 	max_priority = sched_get_priority_max(SCHED_FIFO);
 	new_priority = (param.sched_priority == max_priority) ?
-		sched_get_priority_min(SCHED_FIFO) :
-		max_priority;
+	    sched_get_priority_min(SCHED_FIFO) : max_priority;
 
 	if (pthread_attr_init(&attr) != 0) {
 		printf("An error occurs when calling pthread_attr_init()");
@@ -62,14 +64,15 @@
 	param.sched_priority = new_priority;
 	if (sched_setscheduler(getpid(), SCHED_FIFO, &param) != 0) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling sched_setscheduler()");
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/16-1.c
index d757db8..4d319d4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/16-1.c
@@ -22,8 +22,9 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int main() {
-        int result, old_policy, new_policy;
+int main()
+{
+	int result, old_policy, new_policy;
 	struct sched_param param;
 
 	old_policy = sched_getscheduler(getpid());
@@ -42,7 +43,8 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result == -1 && errno == EPERM) {
-		printf("The process have not permission to change its own policy.\nTry to launch this test as root.\n");
+		printf
+		    ("The process have not permission to change its own policy.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-1.c
index 1d4ea5a..34ab85b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-1.c
@@ -31,25 +31,19 @@
 } sym[] = {
 
 	{
-		SCHED_FIFO, "SCHED_FIFO"
-	},
-	{
-		SCHED_RR, "SCHED_RR"
-	},
+	SCHED_FIFO, "SCHED_FIFO"}, {
+	SCHED_RR, "SCHED_RR"},
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1) || defined(_POSIX_THREAD_SPORADIC_SERVER)&&(_POSIX_THREAD_SPORADIC_SERVER != -1)
 	{
-		SCHED_SPORADIC,"SCHED_SPORADIC"
-	},
+	SCHED_SPORADIC, "SCHED_SPORADIC"},
 #endif
 	{
-		SCHED_OTHER, "SCHED_OTHER"
-	},
-	{
-		0, 0
-	}
+	SCHED_OTHER, "SCHED_OTHER"}, {
+	0, 0}
 };
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, result = PTS_PASS;
 	int old_priority, old_policy, new_policy;
 	struct sched_param param;
@@ -71,13 +65,15 @@
 
 		old_policy = sched_getscheduler(getpid());
 		if (old_policy == -1) {
-			perror("An error occurs when calling sched_getscheduler()");
+			perror
+			    ("An error occurs when calling sched_getscheduler()");
 			return PTS_UNRESOLVED;
 		}
 
 		invalid_priority = sched_get_priority_max(policy);
 		if (invalid_priority == -1) {
-			perror("An error occurs when calling sched_get_priority_max()");
+			perror
+			    ("An error occurs when calling sched_get_priority_max()");
 			return PTS_UNRESOLVED;
 		}
 
@@ -94,12 +90,13 @@
 
 		new_policy = sched_getscheduler(getpid());
 		if (new_policy == -1) {
-			perror("An error occurs when calling sched_getscheduler()");
+			perror
+			    ("An error occurs when calling sched_getscheduler()");
 			return PTS_UNRESOLVED;
 		}
 
 		if (old_policy == new_policy &&
-		   old_priority == param.sched_priority) {
+		    old_priority == param.sched_priority) {
 			printf("  OK\n");
 		} else {
 			if (param.sched_priority != old_priority) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-2.c
index 44b55ca..8cba7ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-2.c
@@ -28,7 +28,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int invalid_priority;
 	int old_priority, old_policy, new_policy;
 	struct sched_param param;
@@ -68,8 +69,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (old_policy == new_policy &&
-	   old_priority == param.sched_priority) {
+	if (old_policy == new_policy && old_priority == param.sched_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-3.c
index 9b7e03d..61b5a4a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-3.c
@@ -28,7 +28,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, result;
 	int old_priority, old_policy, new_policy;
 	struct sched_param param;
@@ -67,8 +68,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (old_policy == new_policy &&
-	   old_priority == param.sched_priority) {
+	if (old_policy == new_policy && old_priority == param.sched_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-4.c
index 6672d84..ed12acf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-4.c
@@ -28,7 +28,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int max_priority, old_priority, old_policy, new_policy;
 	struct sched_param param;
 
@@ -47,8 +48,7 @@
 	/* Make sure that param.sched_priority != old_priority */
 	max_priority = sched_get_priority_max(SCHED_SPORADIC);
 	param.sched_priority = (old_priority == max_priority) ?
-		sched_get_priority_min(SCHED_SPORADIC) :
-		max_priority;
+	    sched_get_priority_min(SCHED_SPORADIC) : max_priority;
 
 	param.sched_ss_max_repl = 0;
 
@@ -65,8 +65,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (old_policy == new_policy &&
-	   old_priority == param.sched_priority) {
+	if (old_policy == new_policy && old_priority == param.sched_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
index 5111b40..88346c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
@@ -74,13 +74,13 @@
 
 	if (old_policy != new_policy) {
 		printf("Failed: invalid policy change, old: %u, new %u\n",
-				old_policy, new_policy);
+		       old_policy, new_policy);
 		exit(PTS_FAIL);
 	}
 
 	if (old_priority != param.sched_priority) {
 		printf("Failed: invalid priority change, old: %u, new %u\n",
-				old_priority, param.sched_priority);
+		       old_priority, param.sched_priority);
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-6.c
index 61c6644..05bc110 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-6.c
@@ -45,7 +45,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -57,19 +58,20 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int max_priority, old_priority, old_policy, new_policy, policy;
-        struct sched_param param;
+	struct sched_param param;
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-	  	if (set_nonroot() != 0) {
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
-                return PTS_UNTESTED;
-        }
-        }
+			return PTS_UNTESTED;
+		}
+	}
 
 	if (sched_getparam(getpid(), &param) == -1) {
 		perror("An error occurs when calling sched_getparam()");
@@ -89,8 +91,7 @@
 	/* Make sure that param.sched_priority != old_priority */
 	max_priority = sched_get_priority_max(policy);
 	param.sched_priority = (old_priority == max_priority) ?
-		sched_get_priority_min(policy) :
-		max_priority;
+	    sched_get_priority_min(policy) : max_priority;
 
 	sched_setscheduler(1, policy, &param);
 
@@ -105,8 +106,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (old_policy == new_policy &&
-	   old_priority == param.sched_priority) {
+	if (old_policy == new_policy && old_priority == param.sched_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-7.c
index 9040cab..b2d9f95 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-7.c
@@ -28,9 +28,10 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int max_priority, old_priority, old_policy, new_policy, policy;
-        int child_pid, stat_loc;
+	int child_pid, stat_loc;
 	struct sched_param param;
 
 	if (sched_getparam(getpid(), &param) == -1) {
@@ -51,25 +52,24 @@
 	/* Make sure that param.sched_priority != old_priority */
 	max_priority = sched_get_priority_max(policy);
 	param.sched_priority = (old_priority == max_priority) ?
-		sched_get_priority_min(policy) :
-		max_priority;
+	    sched_get_priority_min(policy) : max_priority;
 
-        /* Create a child process which exit immediately */
-        child_pid = fork();
-        if (child_pid == -1) {
+	/* Create a child process which exit immediately */
+	child_pid = fork();
+	if (child_pid == -1) {
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
-        } else if (child_pid == 0) {
+	} else if (child_pid == 0) {
 		exit(0);
-        }
+	}
 
-        /* Wait for the child process to exit */
-        if (wait(&stat_loc) == -1) {
+	/* Wait for the child process to exit */
+	if (wait(&stat_loc) == -1) {
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
-        /* Assume the pid is not yet reatributed to an other process */
+	/* Assume the pid is not yet reatributed to an other process */
 	sched_setscheduler(child_pid, policy, &param);
 
 	if (sched_getparam(getpid(), &param) != 0) {
@@ -83,8 +83,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (old_policy == new_policy &&
-	   old_priority == param.sched_priority) {
+	if (old_policy == new_policy && old_priority == param.sched_priority) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-1.c
index e31c917..7ea9801 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-1.c
@@ -26,25 +26,19 @@
 } sym[] = {
 
 	{
-		SCHED_FIFO, "SCHED_FIFO"
-	},
-	{
-		SCHED_RR, "SCHED_RR"
-	},
+	SCHED_FIFO, "SCHED_FIFO"}, {
+	SCHED_RR, "SCHED_RR"},
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1) || defined(_POSIX_THREAD_SPORADIC_SERVER)&&(_POSIX_THREAD_SPORADIC_SERVER != -1)
 	{
-		SCHED_SPORADIC,"SCHED_SPORADIC"
-	},
+	SCHED_SPORADIC, "SCHED_SPORADIC"},
 #endif
 	{
-		SCHED_OTHER, "SCHED_OTHER"
-	},
-	{
-		0, 0
-	}
+	SCHED_OTHER, "SCHED_OTHER"}, {
+	0, 0}
 };
 
-int main() {
+int main()
+{
 	int policy, invalid_priority, tmp, result = PTS_PASS;
 	struct sched_param param;
 
@@ -59,7 +53,8 @@
 
 		invalid_priority = sched_get_priority_max(policy);
 		if (invalid_priority == -1) {
-			perror("An error occurs when calling sched_get_priority_max()");
+			perror
+			    ("An error occurs when calling sched_get_priority_max()");
 			return PTS_UNRESOLVED;
 		}
 
@@ -75,7 +70,8 @@
 			printf("  The returned code is not -1.\n");
 			result = PTS_FAIL;
 		} else if (errno == EPERM) {
-			printf("  This process does not have the permission to set its own scheduling policy.\n  Try to launch this test as root.\n");
+			printf
+			    ("  This process does not have the permission to set its own scheduling policy.\n  Try to launch this test as root.\n");
 			if (result != PTS_FAIL) {
 				result = PTS_UNRESOLVED;
 			}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-2.c
index 0c341b8..026678f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-2.c
@@ -22,7 +22,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int invalid_priority, result;
 	struct sched_param param;
 
@@ -45,7 +46,8 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
 		perror("Unknow error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-3.c
index 8acc32f..8646381 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-3.c
@@ -23,7 +23,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, result;
 	struct sched_param param;
 
@@ -50,7 +51,8 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	}
 	perror("Unknow error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-4.c
index 3bb4b8b..9e02d7a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-4.c
@@ -24,7 +24,8 @@
 
 #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)
 
-int main() {
+int main()
+{
 	int policy, result;
 	int result_code = PTS_PASS;
 	struct sched_param param;
@@ -41,10 +42,12 @@
 	result = sched_setscheduler(0, SCHED_SPORADIC, &param);
 
 	if (result != -1) {
-		printf("The returned code is not -1 when sched_ss_max_repl < 1.\n");
+		printf
+		    ("The returned code is not -1 when sched_ss_max_repl < 1.\n");
 		result_code = PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 		result_code = PTS_UNRESOLVED;
 	} else if (errno != EINVAL) {
 		perror("Unknow error when testing sched_ss_max_repl < 1");
@@ -52,7 +55,7 @@
 	}
 
 	/* test when sched_ss_max_repl > SS_REPL_MAX */
-	param.sched_ss_max_repl = SS_REPL_MAX+1;
+	param.sched_ss_max_repl = SS_REPL_MAX + 1;
 	result = sched_setscheduler(0, SCHED_SPORADIC, &param);
 
 	if (result == -1 && errno == EINVAL) {
@@ -61,16 +64,19 @@
 		}
 		return result_code;
 	} else if (result != -1) {
-		printf("The returned code is not -1 when sched_ss_max_repl > SS_REPL_MAX.\n");
+		printf
+		    ("The returned code is not -1 when sched_ss_max_repl > SS_REPL_MAX.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
 		if (result_code == PTS_FAIL) {
-			printf("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root.\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling parameter.\nTry to launch this test as root.\n");
 			return PTS_FAIL;
 		}
 		return PTS_UNRESOLVED;
 	} else {
-		perror("Unknow error when testing sched_ss_max_repl > SS_REPL_MAX");
+		perror
+		    ("Unknow error when testing sched_ss_max_repl > SS_REPL_MAX");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-5.c
index 1fac7ba..260dadb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/19-5.c
@@ -26,7 +26,8 @@
 /* There is no chance that a scheduling policy has such a value */
 #define INVALID_POLICY -27367
 
-int main() {
+int main()
+{
 	int result;
 	struct sched_param param;
 
@@ -38,10 +39,12 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else if (errno == 0) {
-		printf("No error occurs, check if -1 a valid value for the scheduling policy.\n");
+		printf
+		    ("No error occurs, check if -1 a valid value for the scheduling policy.\n");
 	} else {
 		perror("Unknow error");
 		return PTS_FAIL;
@@ -56,7 +59,9 @@
 		printf("Test PASSED with policy value %i\n", INVALID_POLICY);
 		return PTS_PASS;
 	} else if (errno == 0) {
-		printf("No error occurs, could %i be a valid value for the scheduling policy ???\n", INVALID_POLICY);
+		printf
+		    ("No error occurs, could %i be a valid value for the scheduling policy ???\n",
+		     INVALID_POLICY);
 		return PTS_UNRESOLVED;
 	} else {
 		perror("Unknow error");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/2-1.c
index b49a126..b58611d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/2-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the behavior of sched_setscheduler() when pid is negative\n because it is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the behavior of sched_setscheduler() when pid is negative\n because it is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/20-1.c
index 86c061b..af614b6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/20-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/20-1.c
@@ -44,7 +44,8 @@
 
 	if (setuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -56,19 +57,20 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int result;
-        struct sched_param param;
+	struct sched_param param;
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	param.sched_priority = sched_get_priority_max(SCHED_FIFO);
 
@@ -78,7 +80,7 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (errno != EPERM) {
-	        perror("errno is not EPERM");
+		perror("errno is not EPERM");
 		return PTS_FAIL;
 	} else {
 		printf("The returned code is not -1.\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/21-1.c
index 55f2e8a..cae0ade 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/21-1.c
@@ -22,28 +22,29 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-int main() {
-        int result, child_pid, stat_loc;
+int main()
+{
+	int result, child_pid, stat_loc;
 	struct sched_param param;
 
 	param.sched_priority = sched_get_priority_max(SCHED_FIFO);
 
-        /* Create a child process which exit immediately */
-        child_pid = fork();
-        if (child_pid == -1) {
+	/* Create a child process which exit immediately */
+	child_pid = fork();
+	if (child_pid == -1) {
 		perror("An error occurs when calling fork()");
 		return PTS_UNRESOLVED;
-        } else if (child_pid == 0) {
+	} else if (child_pid == 0) {
 		exit(0);
-        }
+	}
 
-        /* Wait for the child process to exit */
-        if (wait(&stat_loc) == -1) {
+	/* Wait for the child process to exit */
+	if (wait(&stat_loc) == -1) {
 		perror("An error occurs when calling wait()");
 		return PTS_UNRESOLVED;
-        }
+	}
 
-        /* Assume the pid is not yet reatributed to an other process */
+	/* Assume the pid is not yet reatributed to an other process */
 	result = sched_setscheduler(child_pid, SCHED_FIFO, &param);
 
 	if (result == -1 && errno == ESRCH) {
@@ -53,10 +54,11 @@
 		printf("The returned code is not -1.\n");
 		return PTS_FAIL;
 	} else if (errno == EPERM) {
-		printf("This process does not have the permission to invoke sched_setscheduler().\nTry to launch this test as root.\n");
+		printf
+		    ("This process does not have the permission to invoke sched_setscheduler().\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	} else {
-	        perror("errno is not ESRCH");
+		perror("errno is not ESRCH");
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
index 9712b1f..f5b3651 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_policy, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,18 +36,18 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 
 	/* Make sure new policy != old policy */
 	new_policy = (sched_getscheduler(getpid()) == SCHED_FIFO) ?
-		SCHED_RR :
-		SCHED_FIFO;
+	    SCHED_RR : SCHED_FIFO;
 
 	param.sched_priority = sched_get_priority_min(new_policy);
 	if (sched_setscheduler(getpid(), new_policy, &param) != 0) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling sched_setscheduler()");
@@ -68,7 +71,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
index 97fd4d8..0b99d2c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
@@ -19,13 +19,16 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void * runner(void * arg) {
+void *runner(void *arg)
+{
 
-	while (1) sleep(1);
+	while (1)
+		sleep(1);
 	return NULL;
 }
 
-int main() {
+int main()
+{
 	int new_priority, max_priority, policy, result;
 	struct sched_param param;
 	pthread_t tid;
@@ -33,17 +36,17 @@
 
 	if (sched_getparam(getpid(), &param) != 0) {
 		perror("An error occurs when calling sched_getparam()");
-		pthread_exit((void*)-1);
+		pthread_exit((void *)-1);
 	}
 	/* Make sure new_priority != old_priority */
 	max_priority = sched_get_priority_max(SCHED_FIFO);
 	new_priority = (param.sched_priority == max_priority) ?
-		sched_get_priority_min(SCHED_FIFO) :
-		max_priority;
+	    sched_get_priority_min(SCHED_FIFO) : max_priority;
 	param.sched_priority = new_priority;
 	if (sched_setscheduler(getpid(), SCHED_FIFO, &param) != 0) {
 		if (errno == EPERM) {
-			printf("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
+			printf
+			    ("This process does not have the permission to set its own scheduling policy.\nTry to launch this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling sched_setscheduler()");
@@ -67,7 +70,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (pthread_getschedparam(tid , &policy, &param) != 0) {
+	if (pthread_getschedparam(tid, &policy, &param) != 0) {
 		printf("An error occurs when calling pthread_getschedparam()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/4-1.c
index 2088ff0..d4aa46a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/4-1.c
@@ -17,8 +17,9 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-int main() {
-        int result, new_priority, old_priority, max_prio;
+int main()
+{
+	int result, new_priority, old_priority, max_prio;
 	int old_policy, new_policy, test_policy;
 	struct sched_param param;
 
@@ -40,8 +41,8 @@
 	max_prio = sched_get_priority_max(new_policy);
 	old_priority = param.sched_priority;
 	new_priority = (old_priority == max_prio) ?
-		(param.sched_priority = sched_get_priority_min(new_policy)) :
-		(param.sched_priority = max_prio);
+	    (param.sched_priority = sched_get_priority_min(new_policy)) :
+	    (param.sched_priority = max_prio);
 
 	result = sched_setscheduler(0, new_policy, &param);
 
@@ -57,12 +58,12 @@
 	}
 
 	if (result != -1 && param.sched_priority == new_priority &&
-	   test_policy == new_policy) {
+	    test_policy == new_policy) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else if (result != -1 &&
-		  (param.sched_priority == old_priority ||
-		   test_policy == old_policy)) {
+		   (param.sched_priority == old_priority ||
+		    test_policy == old_policy)) {
 		if (param.sched_priority == old_priority) {
 			printf("The param does not change\n");
 		}
@@ -71,7 +72,8 @@
 		}
 		return PTS_FAIL;
 	} else if (result == -1 && errno == EPERM) {
-		printf("The process have not permission to change its own policy.\nTry to launch this test as root.\n");
+		printf
+		    ("The process have not permission to change its own policy.\nTry to launch this test as root.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/5-1.c
index 88ba40a..4a1f5a4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/5-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test the condition under which one process has the appropriate\nprivilege to change the scheduling parameters of another process because \nthey are implementation-defined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the condition under which one process has the appropriate\nprivilege to change the scheduling parameters of another process because \nthey are implementation-defined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/6-1.c
index 022fd74..28fe639 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/6-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test that implementations may require that the requesting process\nhave permission to set its own scheduling parameters or those of another\nprocess.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that implementations may require that the requesting process\nhave permission to set its own scheduling parameters or those of another\nprocess.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/7-1.c
index bd6412b..aa5eee0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/7-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test if implementation-defined restrictions apply as to the\nappropriate privileges required to set a process' own scheduling policy, or\nanother process' scheduling policy, to a particular value.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test if implementation-defined restrictions apply as to the\nappropriate privileges required to set a process' own scheduling policy, or\nanother process' scheduling policy, to a particular value.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/9-1.c
index 06e3fa0..78c8013 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/9-1.c
@@ -19,13 +19,15 @@
 #include "posixtest.h"
 
 #ifdef _POSIX_SPORADIC_SERVER
-int main() {
+int main()
+{
 	printf("Not yet tested.\n");
 	return PTS_UNTESTED;
 }
 
 #else
-int main() {
+int main()
+{
 	printf("Does not support SS (SPORADIC SERVER)\n");
 	return PTS_UNSUPPORTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c
index ef734cd..ae17890 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c
@@ -34,7 +34,6 @@
 
 #include <affinity.h>
 
-
 #define ERR_LOG(l, rc)   printf("Failed: %s rc: %d errno: %s\n", \
 					l, rc, strerror(errno))
 
@@ -119,12 +118,12 @@
 		s = WTERMSIG(s);
 		if (s != SIGTERM) {
 			printf("Failed: kill signal: %d, should be: %d\n",
-					s, SIGTERM);
+			       s, SIGTERM);
 			status = PTS_FAIL;
 		}
 	} else if (WIFEXITED(s)) {
 		printf("Failed: child prematurely exited with: %d\n",
-				WEXITSTATUS(s));
+		       WEXITSTATUS(s));
 		status = PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/2-1.c
index 2d97162..012c835 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/2-1.c
@@ -14,7 +14,8 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	if (sched_yield() == 0) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/1-1.c
index a8dbe63..e414da9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/1-1.c
@@ -26,16 +26,16 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-	mysemp = sem_open(semname, O_CREAT, 0700, 1) ;
+	mysemp = sem_open(semname, O_CREAT, 0700, 1);
 	if (mysemp == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
-		}
+	}
 
 	if ((sem_close(mysemp)) == 0) {
 		puts("TEST PASSED");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/2-1.c
index 664c90e..273b73a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/2-1.c
@@ -25,7 +25,7 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
@@ -33,9 +33,9 @@
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
 	if (mysemp == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
-		}
+	}
 
 	/* Deallocate mysemp */
 	if ((sem_close(mysemp)) == -1) {
@@ -46,7 +46,7 @@
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
 	if (mysemp == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-1.c
index fd274f8..8cd4757 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-1.c
@@ -26,19 +26,19 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-	mysemp = sem_open(semname, O_CREAT, 0444, 1) ;
+	mysemp = sem_open(semname, O_CREAT, 0444, 1);
 	if (mysemp == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
-		}
+	}
 
 	if ((sem_unlink(semname)) == 0) {
-		if (sem_close(mysemp) == -1)  {
+		if (sem_close(mysemp) == -1) {
 			perror(ERROR_PREFIX "sem_close");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
index 732653a..0e5b21a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_close/3-2.c
@@ -87,11 +87,11 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, value;
 
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -99,14 +99,12 @@
 	/* Create the semaphore */
 	sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 2);
 
-	if (sem == SEM_FAILED && errno == EEXIST)
-	{
+	if (sem == SEM_FAILED && errno == EEXIST) {
 		sem_unlink(SEM_NAME);
 		sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 2);
 	}
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
@@ -115,37 +113,32 @@
 		ret = sem_wait(sem);
 	} while (ret != 0 && errno == EINTR);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to wait for the semaphore");
 	}
 
 	/* Here, count is 1. Now, close the semaphore */
 	ret = sem_close(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
 	/* Open the semaphore again */
 	sem = sem_open(SEM_NAME, O_CREAT, 0777, 3);
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to re-open the semaphore");
 	}
 
 	/* Check current semaphore count */
 	ret = sem_getvalue(sem, &value);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to get semaphore value");
 	}
 
-	if (value != 1)
-	{
+	if (value != 1) {
 		output("Got value: %d\n", value);
 		FAILED("The semaphore count has changed after sem_close");
 	}
@@ -153,15 +146,13 @@
 	/* Now, we can destroy all */
 	ret = sem_close(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
index 8425520..d954b50 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
@@ -30,60 +30,60 @@
 
 int main()
 {
-    pthread_t prod, cons;
-   void *producer(void *);
-   void *consumer(void *);
-   long cnt = 3;
+	pthread_t prod, cons;
+	void *producer(void *);
+	void *consumer(void *);
+	long cnt = 3;
 
-   n = 0;
-   if (sem_init(&csem, 0, 0) < 0) {
-        perror("sem_init");
-        return PTS_UNRESOLVED;
-   }
-    if (sem_init(&psem, 0, 1) < 0) {
-        perror("sem_init");
-        return PTS_UNRESOLVED;
-   }
-   if (pthread_create(&prod, NULL, producer, (void *)cnt) != 0) {
-        perror("pthread_create");
-        return PTS_UNRESOLVED;
-   }
-   if (pthread_create(&cons, NULL, consumer, (void *)cnt) != 0) {
-        perror("pthread_create");
-        return PTS_UNRESOLVED;
-   }
+	n = 0;
+	if (sem_init(&csem, 0, 0) < 0) {
+		perror("sem_init");
+		return PTS_UNRESOLVED;
+	}
+	if (sem_init(&psem, 0, 1) < 0) {
+		perror("sem_init");
+		return PTS_UNRESOLVED;
+	}
+	if (pthread_create(&prod, NULL, producer, (void *)cnt) != 0) {
+		perror("pthread_create");
+		return PTS_UNRESOLVED;
+	}
+	if (pthread_create(&cons, NULL, consumer, (void *)cnt) != 0) {
+		perror("pthread_create");
+		return PTS_UNRESOLVED;
+	}
 
-   if (pthread_join(prod, NULL) == 0 && pthread_join(cons, NULL) == 0) {
-	puts("TEST PASS");
-	pthread_exit(NULL);
-   	if ((sem_destroy(&psem) == 0) && sem_destroy (&csem) == 0) {
-		return PTS_PASS;
-   	} else {
-		puts("TEST FAILED");
-	   	return PTS_FAIL;
-   	}
-   }
+	if (pthread_join(prod, NULL) == 0 && pthread_join(cons, NULL) == 0) {
+		puts("TEST PASS");
+		pthread_exit(NULL);
+		if ((sem_destroy(&psem) == 0) && sem_destroy(&csem) == 0) {
+			return PTS_PASS;
+		} else {
+			puts("TEST FAILED");
+			return PTS_FAIL;
+		}
+	}
 }
 
-void * producer(void *arg)
+void *producer(void *arg)
 {
-    int i, cnt;
-    cnt = (long)arg;
-    for (i=0; i<cnt; i++) {
-            sem_wait(&psem);
-            n++;
-            sem_post(&csem);
-    }
-    return NULL;
+	int i, cnt;
+	cnt = (long)arg;
+	for (i = 0; i < cnt; i++) {
+		sem_wait(&psem);
+		n++;
+		sem_post(&csem);
+	}
+	return NULL;
 }
 
-void * consumer(void *arg)
+void *consumer(void *arg)
 {
-    int i, cnt;
-    cnt = (long)arg;
-    for (i=0; i<cnt; i++) {
-           sem_wait(&csem);
-           sem_post(&psem);
-    }
-    return NULL;
+	int i, cnt;
+	cnt = (long)arg;
+	for (i = 0; i < cnt; i++) {
+		sem_wait(&csem);
+		sem_post(&psem);
+	}
+	return NULL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/4-1.c
index eed4ba7..a2fd977 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/4-1.c
@@ -24,9 +24,9 @@
 #define FUNCTION "sem_destroy"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 
 	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
@@ -34,10 +34,10 @@
 	}
 
 	if (sem_destroy(&mysemp) == 0) {
-                puts("TEST PASSED");
-                return PTS_PASS;
-        } else {
-                puts("TEST FAILED: couldn't destroy sempahore.");
-                return PTS_FAIL;
-        }
+		puts("TEST PASSED");
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED: couldn't destroy sempahore.");
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/1-1.c
index 9740942..e6d1bc7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/1-1.c
@@ -31,7 +31,8 @@
 	sem_t *mysemp;
 	int val;
 
-	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d", getpid());
+	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d",
+		 getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
@@ -46,8 +47,8 @@
 	}
 
 	/*
-	printf("Current value is: %d\n", val);
-	*/
+	   printf("Current value is: %d\n", val);
+	 */
 
 	if (val == 1) {
 		puts("TEST PASSED");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-1.c
index f05bd9a..7fd9744 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-1.c
@@ -29,7 +29,8 @@
 	sem_t *mysemp;
 	int val;
 
-	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d", getpid());
+	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d",
+		 getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
@@ -50,8 +51,8 @@
 	}
 
 	/*
-	printf("Current value is: %d\n", val);
-	*/
+	   printf("Current value is: %d\n", val);
+	 */
 
 	if (val <= 0) {
 		puts("TEST PASSED");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-2.c
index 3b1f0bef..095241e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/2-2.c
@@ -77,7 +77,7 @@
 /***************************    Test case   ***********************************/
 /******************************************************************************/
 
-void *threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 
@@ -128,7 +128,8 @@
 
 	if ((val != 0) && (val != -1)) {
 		output("Val: %d\n", val);
-		FAILED("Semaphore count is neither 0 nor # of waiting processes");
+		FAILED
+		    ("Semaphore count is neither 0 nor # of waiting processes");
 	}
 
 	/* Post the semaphore */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/4-1.c
index 37289f5..4b66af6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/4-1.c
@@ -30,7 +30,8 @@
 	sem_t *mysemp;
 	int val;
 
-	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d", getpid());
+	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d",
+		 getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/5-1.c
index 5d2a951..5c7f27f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/5-1.c
@@ -30,7 +30,8 @@
 	sem_t *mysemp;
 	int val;
 
-	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d", getpid());
+	snprintf(semname, sizeof(semname), "/" FUNCTION "_" TEST "_%d",
+		 getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 4);
 
@@ -55,8 +56,8 @@
 	}
 
 	/*
-	printf("Current value is: %d\n", val);
-	*/
+	   printf("Current value is: %d\n", val);
+	 */
 
 	if (val == 3) {
 		puts("TEST PASSED");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/1-1.c
index 1d9d4bd..422d99a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/1-1.c
@@ -24,25 +24,25 @@
 #define FUNCTION "sem_init"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 	int sts;
 	int val;
 
 	sts = sem_init(&mysemp, 0, 1);
 
-        if (sem_getvalue(&mysemp, &val) == -1) {
-                perror(ERROR_PREFIX "sem_getvalue");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_getvalue(&mysemp, &val) == -1) {
+		perror(ERROR_PREFIX "sem_getvalue");
+		return PTS_UNRESOLVED;
+	}
 
 	if ((sts == -1) && (val != 1)) {
-                puts("TEST FAILED");
-                return PTS_FAIL;
-        } else {
-                puts("TEST PASSED");
-                sem_destroy(&mysemp);
-                return PTS_PASS;
-        }
+		puts("TEST FAILED");
+		return PTS_FAIL;
+	} else {
+		puts("TEST PASSED");
+		sem_destroy(&mysemp);
+		return PTS_PASS;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-1.c
index ecaf124..292b505 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-1.c
@@ -23,32 +23,32 @@
 #define FUNCTION "sem_init"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 	int val;
 
-	if (sem_init (&mysemp, 0, 1) == -1) {
+	if (sem_init(&mysemp, 0, 1) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sem_trywait(&mysemp) == -1) {
 		perror(ERROR_PREFIX "trywait");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
-        if (sem_getvalue(&mysemp, &val) < 0) {
-                perror(ERROR_PREFIX "sem_getvalue");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_getvalue(&mysemp, &val) < 0) {
+		perror(ERROR_PREFIX "sem_getvalue");
+		return PTS_UNRESOLVED;
+	}
 
-        if (val <= 0) {
-                puts("TEST PASSED");
+	if (val <= 0) {
+		puts("TEST PASSED");
 		sem_destroy(&mysemp);
-                return PTS_PASS;
-        } else {
-                puts("TEST FAILED");
-                return PTS_FAIL;
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED");
+		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-2.c
index f6103c5..ae2d821 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/2-2.c
@@ -23,32 +23,32 @@
 #define FUNCTION "sem_init"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 	int val;
 
-	if (sem_init (&mysemp, 0, 0) == -1) {
+	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sem_post(&mysemp) == -1) {
 		perror(ERROR_PREFIX "trywait");
-                return PTS_UNRESOLVED;
-        }
+		return PTS_UNRESOLVED;
+	}
 
-        if (sem_getvalue(&mysemp, &val) < 0) {
-                perror(ERROR_PREFIX "sem_getvalue");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_getvalue(&mysemp, &val) < 0) {
+		perror(ERROR_PREFIX "sem_getvalue");
+		return PTS_UNRESOLVED;
+	}
 
-        if (val == 1) {
-                puts("TEST PASSED");
+	if (val == 1) {
+		puts("TEST PASSED");
 		sem_destroy(&mysemp);
-                return PTS_PASS;
-        } else {
-                puts("TEST FAILED");
-                return PTS_FAIL;
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED");
+		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-1.c
index 9372ff4..aa82588 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-1.c
@@ -30,60 +30,60 @@
 
 int main()
 {
-    pthread_t prod, cons;
-   void *producer(void *);
-   void *consumer(void *);
-   long cnt = 3;
+	pthread_t prod, cons;
+	void *producer(void *);
+	void *consumer(void *);
+	long cnt = 3;
 
-   n = 0;
-   if (sem_init(&csem, 0, 0) < 0) {
-        perror("sem_init");
-        return PTS_UNRESOLVED;
-   }
-    if (sem_init(&psem, 0, 1) < 0) {
-        perror("sem_init");
-        return PTS_UNRESOLVED;
-   }
-   if (pthread_create(&prod, NULL, producer, (void *)cnt) != 0) {
-        perror("pthread_create");
-        return PTS_UNRESOLVED;
-   }
-   if (pthread_create(&cons, NULL, consumer, (void *)cnt) != 0) {
-        perror("pthread_create");
-        return PTS_UNRESOLVED;
-   }
+	n = 0;
+	if (sem_init(&csem, 0, 0) < 0) {
+		perror("sem_init");
+		return PTS_UNRESOLVED;
+	}
+	if (sem_init(&psem, 0, 1) < 0) {
+		perror("sem_init");
+		return PTS_UNRESOLVED;
+	}
+	if (pthread_create(&prod, NULL, producer, (void *)cnt) != 0) {
+		perror("pthread_create");
+		return PTS_UNRESOLVED;
+	}
+	if (pthread_create(&cons, NULL, consumer, (void *)cnt) != 0) {
+		perror("pthread_create");
+		return PTS_UNRESOLVED;
+	}
 
-   if ((pthread_join(prod, NULL) == 0) && (pthread_join(cons, NULL) == 0)) {
-	   puts("TEST PASS");
-	   	pthread_exit(NULL);
-   		sem_destroy(&psem);
+	if ((pthread_join(prod, NULL) == 0) && (pthread_join(cons, NULL) == 0)) {
+		puts("TEST PASS");
+		pthread_exit(NULL);
+		sem_destroy(&psem);
 		sem_destroy(&csem);
-	   return PTS_PASS;
-   } else {
-	   puts("TEST FAILED");
-	   return PTS_FAIL;
-   }
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED");
+		return PTS_FAIL;
+	}
 }
 
-void * producer(void *arg)
+void *producer(void *arg)
 {
-    int i, cnt;
-    cnt = (long)arg;
-    for (i=0; i<cnt; i++) {
-            sem_wait(&psem);
-            n++;
-            sem_post(&csem);
-    }
-    return NULL;
+	int i, cnt;
+	cnt = (long)arg;
+	for (i = 0; i < cnt; i++) {
+		sem_wait(&psem);
+		n++;
+		sem_post(&csem);
+	}
+	return NULL;
 }
 
-void * consumer(void *arg)
+void *consumer(void *arg)
 {
-    int i, cnt;
-    cnt = (long)arg;
-    for (i=0; i<cnt; i++) {
-           sem_wait(&csem);
-           sem_post(&psem);
-    }
-    return NULL;
+	int i, cnt;
+	cnt = (long)arg;
+	for (i = 0; i < cnt; i++) {
+		sem_wait(&csem);
+		sem_post(&psem);
+	}
+	return NULL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
index d42e751..6976cc4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-2.c
@@ -86,13 +86,13 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
 	int fd;
 	void *buf;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -100,24 +100,23 @@
 	/* Create the shared memory segment */
 	fd = shm_open("/sem_init_3-2", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
 
-	if (fd == -1)
-	{
+	if (fd == -1) {
 		UNRESOLVED(errno, "Failed to open shared memory segment");
 	}
 
 	/* Size the memory segment to 1 page size. */
 	ret = ftruncate(fd, sysconf(_SC_PAGESIZE));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to size the shared memory segment");
 	}
 
 	/* Map these sengments in the process memory space */
-	buf = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+	buf =
+	    mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, fd, 0);
 
-	if (buf == MAP_FAILED)
-	{
+	if (buf == MAP_FAILED) {
 		UNRESOLVED(errno, "Failed to mmap the shared memory segment");
 	}
 
@@ -126,27 +125,23 @@
 	/* Initialize the semaphore */
 	ret = sem_init(sem, 1, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to init the semaphore");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Post the sempahore */
 		ret = sem_post(sem);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to post the semaphore");
 		}
 
@@ -159,36 +154,31 @@
 		ret = sem_wait(sem);
 	} while (ret != 0 && errno == EINTR);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to wait for the semaphore");
 	}
 
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
 	/* Clean things */
 	ret = sem_destroy(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to destroy the semaphore");
 	}
 
 	ret = shm_unlink("/sem_init_3-2");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink shared memory");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-3.c
index 8e68368..49a0869 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/3-3.c
@@ -86,13 +86,13 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t child, ctl;
 	int fd;
 	void *buf;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -100,24 +100,23 @@
 	/* Create the shared memory segment */
 	fd = shm_open("/sem_init_3-2", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
 
-	if (fd == -1)
-	{
+	if (fd == -1) {
 		UNRESOLVED(errno, "Failed to open shared memory segment");
 	}
 
 	/* Size the memory segment to 1 page size. */
 	ret = ftruncate(fd, sysconf(_SC_PAGESIZE));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to size the shared memory segment");
 	}
 
 	/* Map these sengments in the process memory space */
-	buf = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+	buf =
+	    mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ | PROT_WRITE,
+		 MAP_SHARED, fd, 0);
 
-	if (buf == MAP_FAILED)
-	{
+	if (buf == MAP_FAILED) {
 		UNRESOLVED(errno, "Failed to mmap the shared memory segment");
 	}
 
@@ -126,27 +125,23 @@
 	/* Initialize the semaphore */
 	ret = sem_init(sem, 1, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to init the semaphore");
 	}
 
 	/* Create the child */
 	child = fork();
 
-	if (child == -1)
-	{
+	if (child == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
 	/* child */
-	if (child == 0)
-	{
+	if (child == 0) {
 		/* Post the sempahore */
 		ret = sem_post(sem);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to post the semaphore");
 		}
 
@@ -157,41 +152,36 @@
 	/* Parent joins the child */
 	ctl = waitpid(child, &status, 0);
 
-	if (ctl != child)
-	{
+	if (ctl != child) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != PTS_PASS)) {
 		FAILED("Child exited abnormally");
 	}
 
 	/* Check semaphore count */
-	ret = sem_getvalue(sem , &status);
+	ret = sem_getvalue(sem, &status);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to get semaphore count");
 	}
 
-	if (status != 1)
-	{
-		FAILED("The semaphore count was not increased in other process");
+	if (status != 1) {
+		FAILED
+		    ("The semaphore count was not increased in other process");
 	}
 
 	/* Clean things */
 	ret = sem_destroy(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to destroy the semaphore");
 	}
 
 	ret = shm_unlink("/sem_init_3-2");
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink shared memory");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-1.c
index 53dd510..a3cf475 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-1.c
@@ -24,16 +24,16 @@
 #define FUNCTION "sem_init"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 
-	if (sem_init (&mysemp, 0, 1) == -1) {
-                puts("TEST FAILED");
-                return PTS_FAIL;
-        } else {
-                puts("TEST PASSED");
+	if (sem_init(&mysemp, 0, 1) == -1) {
+		puts("TEST FAILED");
+		return PTS_FAIL;
+	} else {
+		puts("TEST PASSED");
 		sem_destroy(&mysemp);
-                return PTS_PASS;
+		return PTS_PASS;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-2.c
index ade6037..5f2f8ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/5-2.c
@@ -24,16 +24,16 @@
 #define FUNCTION "sem_init"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main ()
+int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 
-	if (sem_init (&mysemp, 0, 1) == 0) {
-                puts("TEST PASSED");
+	if (sem_init(&mysemp, 0, 1) == 0) {
+		puts("TEST PASSED");
 		sem_destroy(&mysemp);
-                return PTS_PASS;
-        } else {
-                puts("TEST FAILED");
-                return PTS_FAIL;
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED");
+		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/6-1.c
index d3230d0..7e56caa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/6-1.c
@@ -24,19 +24,18 @@
 
 int main()
 {
-	sem_t   mysemp;
+	sem_t mysemp;
 	int counter = SEM_VALUE_MAX;
 
-	if (SEM_VALUE_MAX >= INT_MAX)
-	{
+	if (SEM_VALUE_MAX >= INT_MAX) {
 		puts("Test skipped");
 		return PTS_PASS;
-        }
+	}
 
 	++counter;
-        sem_init (&mysemp, 0, counter);
+	sem_init(&mysemp, 0, counter);
 
-	if (errno == EINVAL)  {
+	if (errno == EINVAL) {
 		puts("TEST PASSED");
 		return PTS_PASS;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/7-1.c
index 89e84a9..5e01da0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_init/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_init/7-1.c
@@ -79,7 +79,7 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
 	sem_t *sems;
@@ -92,31 +92,29 @@
 
 	max = sysconf(_SC_SEM_NSEMS_MAX);
 
-	if (max <= 0)
-	{
+	if (max <= 0) {
 		output("sysconf(_SC_SEM_NSEMS_MAX) = %ld\n", max);
 		UNTESTED("There is no constraint on SEM_NSEMS_MAX");
 	}
 
 	sems = (sem_t *) calloc(max, sizeof(sem_t));
 
-	if (sems == NULL)
-	{
+	if (sems == NULL) {
 		UNRESOLVED(errno, "Failed to alloc space");
 	}
 
-	for (i = 0; i < max; i++)
-	{
-		ret = sem_init(&sems[ i ], 0, 0);
+	for (i = 0; i < max; i++) {
+		ret = sem_init(&sems[i], 0, 0);
 
-		if (ret != 0)
-		{
-			output("sem_init failed to initialize the %d nth semaphore.\n", i);
+		if (ret != 0) {
+			output
+			    ("sem_init failed to initialize the %d nth semaphore.\n",
+			     i);
 			output("Tryed to initialize %ld.\n", max);
 			output("Error is %d: %s\n", errno, strerror(errno));
 
 			for (; i > 0; i--)
-				sem_destroy(&sems[i-1]);
+				sem_destroy(&sems[i - 1]);
 
 			free(sems);
 
@@ -126,13 +124,12 @@
 
 	ret = sem_init(&sem_last, 0, 1);
 
-	if (ret == 0)
-	{
-		FAILED("We were able to sem_init more than SEM_NSEMS_MAX semaphores");
+	if (ret == 0) {
+		FAILED
+		    ("We were able to sem_init more than SEM_NSEMS_MAX semaphores");
 	}
 
-	if (errno != ENOSPC)
-	{
+	if (errno != ENOSPC) {
 		output("Error is %d: %s\n", errno, strerror(errno));
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-1.c
index 86dfb07..8f099b3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-1.c
@@ -26,15 +26,14 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
 
-	if ((mysemp == SEM_FAILED) || (mysemp == NULL))
-	{
+	if ((mysemp == SEM_FAILED) || (mysemp == NULL)) {
 		puts("TEST FAILED");
 		return PTS_FAIL;
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-2.c
index 6bf627c..c134dae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-2.c
@@ -26,7 +26,7 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
@@ -35,15 +35,12 @@
 
 	/* Checking if mysemp has a value returned. From sem_open */
 
-	if (&mysemp != NULL)
-	{
+	if (&mysemp != NULL) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
 		sem_unlink(semname);
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		puts("TEST FAILED");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-3.c
index 56c6a52..0cf597d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-3.c
@@ -26,30 +26,27 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 	int lock_status;
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
-        if (mysemp == SEM_FAILED || mysemp == NULL) {
-                perror(ERROR_PREFIX "sem_open");
-                return PTS_UNRESOLVED;
-        }
+	if (mysemp == SEM_FAILED || mysemp == NULL) {
+		perror(ERROR_PREFIX "sem_open");
+		return PTS_UNRESOLVED;
+	}
 
 	lock_status = sem_wait(mysemp);
 
 	/* Checking if sem_wait has a value returned. From sem_open */
-	if (lock_status == 0)
-	{
+	if (lock_status == 0) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
 		sem_unlink(semname);
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		puts("TEST FAILED");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-4.c
index eb94099..9876362 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/1-4.c
@@ -26,16 +26,16 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
-        if (mysemp == SEM_FAILED || mysemp == NULL) {
-                perror(ERROR_PREFIX "sem_open");
-                return PTS_UNRESOLVED;
-        }
+	if (mysemp == SEM_FAILED || mysemp == NULL) {
+		perror(ERROR_PREFIX "sem_open");
+		return PTS_UNRESOLVED;
+	}
 
 	/* Checking if mysemp has a value returned. From sem_open */
 	if (sem_post(mysemp) == 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/10-1.c
index 69d91fc..f862b4a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/10-1.c
@@ -27,15 +27,15 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 	int val;
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 5);
-	if (mysemp  == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+	if (mysemp == SEM_FAILED) {
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
@@ -45,15 +45,15 @@
 	}
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 1);
-        if (mysemp  == SEM_FAILED) {
+	if (mysemp == SEM_FAILED) {
 		perror(ERROR_PREFIX "sem_open");
-                return PTS_UNRESOLVED;
+		return PTS_UNRESOLVED;
 	}
 
-        if (sem_getvalue(mysemp, &val) == -1) {
-                perror(ERROR_PREFIX "sem_getvalue");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_getvalue(mysemp, &val) == -1) {
+		perror(ERROR_PREFIX "sem_getvalue");
+		return PTS_UNRESOLVED;
+	}
 
 	if (val != 4) {
 		puts("TEST FAILED: second call of sem_open took place");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/15-1.c
index 149ad55..43a3ccd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/15-1.c
@@ -82,74 +82,63 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	char * name = "/sem_open_15_1";
+	char *name = "/sem_open_15_1";
 
-	sem_t * sems[ 4 ];
+	sem_t *sems[4];
 
 	/* Initialize output */
 	output_init();
 
 	/* Initialize all semaphores */
 
-	for (i = 0; i < 4; i++)
-	{
-		sems[ i ] = sem_open(name, O_CREAT, 0777, 1);
+	for (i = 0; i < 4; i++) {
+		sems[i] = sem_open(name, O_CREAT, 0777, 1);
 
-		if (sems[ i ] == SEM_FAILED)
-		{
+		if (sems[i] == SEM_FAILED) {
 			UNRESOLVED(errno, "Failed to sem_open");
 		}
 
 	}
 
 	/* Check all calls returned the same @ */
-	for (i = 0; i < 3; i++)
-	{
-		if (sems[ i ] != sems[ i + 1 ])
-		{
+	for (i = 0; i < 3; i++) {
+		if (sems[i] != sems[i + 1]) {
 			FAILED("sem_open returned a different address");
 		}
 
 		/* Close some semaphores */
-		ret = sem_close(sems[ i ]);
+		ret = sem_close(sems[i]);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to sem_close");
 		}
 	}
 
 	/* Now, reopen, we should still get the same address */
-	for (i = 0; i < 3; i++)
-	{
-		sems[ i ] = sem_open(name, O_CREAT, 0777, 1);
+	for (i = 0; i < 3; i++) {
+		sems[i] = sem_open(name, O_CREAT, 0777, 1);
 
-		if (sems[ i ] == SEM_FAILED)
-		{
+		if (sems[i] == SEM_FAILED) {
 			UNRESOLVED(errno, "Failed to sem_open");
 		}
 
 	}
 
 	/* Check all calls returned the same @ */
-	for (i = 0; i < 3; i++)
-	{
-		if (sems[ i ] != sems[ i + 1 ])
-		{
+	for (i = 0; i < 3; i++) {
+		if (sems[i] != sems[i + 1]) {
 			FAILED("sem_open returned a different address");
 		}
 	}
 
 	/* Close all semaphores */
-	for (i = 0; i < 4; i++)
-	{
-		ret = sem_close(sems[ i ]);
+	for (i = 0; i < 4; i++) {
+		ret = sem_close(sems[i]);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to sem_close");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-1.c
index 15df2d1..56d259b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-1.c
@@ -28,14 +28,14 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0777, 0);
-	if (mysemp  == SEM_FAILED) {
-  		perror(ERROR_PREFIX "sem_open");
+	if (mysemp == SEM_FAILED) {
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
@@ -44,14 +44,12 @@
 		return PTS_UNRESOLVED;
 	}
 
-	mysemp = sem_open(semname, O_CREAT|O_EXCL, 0777, 1);
-	if ((mysemp  == SEM_FAILED) && (errno == EEXIST)) {
+	mysemp = sem_open(semname, O_CREAT | O_EXCL, 0777, 1);
+	if ((mysemp == SEM_FAILED) && (errno == EEXIST)) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
-		return  PTS_PASS;
-	}
-	else
-	{
+		return PTS_PASS;
+	} else {
 		puts("TEST FAILED");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-2.c
index d28f9b5..3348671 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/2-2.c
@@ -26,27 +26,24 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-	mysemp = sem_open(semname, O_CREAT|O_EXCL, 0777, 1);
+	mysemp = sem_open(semname, O_CREAT | O_EXCL, 0777, 1);
 
-	if (mysemp  == SEM_FAILED || mysemp == NULL) {
-  		perror(ERROR_PREFIX "sem_open");
+	if (mysemp == SEM_FAILED || mysemp == NULL) {
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
-	if (errno != EEXIST)
-	{
+	if (errno != EEXIST) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
 		sem_close(mysemp);
 		return PTS_PASS;
-	}
-	else
-	{
+	} else {
 		puts("TEST FAILED");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/3-1.c
index bb93e38..11a3d0e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/3-1.c
@@ -45,7 +45,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -56,13 +57,14 @@
 	       pw->pw_name, (int)geteuid());
 	return 0;
 }
+
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
@@ -74,15 +76,14 @@
 	mysemp = sem_open(semname, O_CREAT, 0444, 1);
 
 	/* Opening the same existance SEM with write mode */
-	mysemp = sem_open(semname, O_CREAT, 0222 , 1);
+	mysemp = sem_open(semname, O_CREAT, 0222, 1);
 
-	if (mysemp  != SEM_FAILED)
-	{
-  		perror(ERROR_PREFIX "sem_open");
+	if (mysemp != SEM_FAILED) {
+		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
-	if (errno == EACCES)  {
+	if (errno == EACCES) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/4-1.c
index 6339ce0..ce4789c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/4-1.c
@@ -27,7 +27,7 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
@@ -37,9 +37,9 @@
 	sem_close(mysemp);
 
 	/* Opening the same existance SEM */
-	mysemp = sem_open(semname, O_CREAT|O_EXCL, 0444, 1);
+	mysemp = sem_open(semname, O_CREAT | O_EXCL, 0444, 1);
 
-	if ((mysemp  == SEM_FAILED) && (errno == EEXIST)) {
+	if ((mysemp == SEM_FAILED) && (errno == EEXIST)) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/5-1.c
index 571df35..d707cc7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/5-1.c
@@ -26,12 +26,11 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 	int counter = SEM_VALUE_MAX;
 
-	if (counter >= INT_MAX)
-	{
+	if (counter >= INT_MAX) {
 		return PTS_PASS;
 	}
 
@@ -39,7 +38,7 @@
 
 	++counter;
 	mysemp = sem_open(semname, O_CREAT, 0444, counter);
-	if ((mysemp  == SEM_FAILED) && (errno == EINVAL))  {
+	if ((mysemp == SEM_FAILED) && (errno == EINVAL)) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/6-1.c
index 8db3df9..e8e2d87 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_open/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_open/6-1.c
@@ -24,14 +24,14 @@
 
 int main()
 {
-	sem_t   *mysemp;
+	sem_t *mysemp;
 	char semname[50];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, 0);
 
-	if ((mysemp  == SEM_FAILED) && (errno == ENOENT))  {
+	if ((mysemp == SEM_FAILED) && (errno == ENOENT)) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-1.c
index a8a77b9..1d93a29 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 	int val;
@@ -46,7 +47,7 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 
-	/* Checking if the value of the Semaphore incremented by one */
+		/* Checking if the value of the Semaphore incremented by one */
 	} else if (val == 1) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-2.c
index 0d3909d..2afbf79 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-2.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 	int val;
@@ -46,7 +47,7 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 
-	/* Checking if the value of the Semaphore incremented by one */
+		/* Checking if the value of the Semaphore incremented by one */
 	} else if (val == 3) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/2-1.c
index 976af15..d3981c5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/2-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/4-1.c
index ed71eb4..a56d374 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/4-1.c
@@ -22,7 +22,8 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
@@ -45,5 +46,5 @@
 		return PTS_FAIL;
 	}
 	printf("This code should not be executed.\n");
-		return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/5-1.c
index 7a5753b..cc16c43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/5-1.c
@@ -31,7 +31,7 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-#define SEMINITVAL 0 //initial value of semaphore = 0
+#define SEMINITVAL 0		//initial value of semaphore = 0
 
 sem_t *gsemp;
 
@@ -40,7 +40,8 @@
 	return;
 }
 
-int main() {
+int main()
+{
 	char semname[28];
 	int val;
 
@@ -53,7 +54,7 @@
 	}
 	signal(SIGALRM, sighdl);
 	sleep(1);
-        alarm(1);
+	alarm(1);
 
 	if (sem_post(gsemp) == -1) {
 		perror(ERROR_PREFIX "sem_post");
@@ -65,14 +66,13 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 	}
-	if (val != SEMINITVAL+1) {
+	if (val != SEMINITVAL + 1) {
 #ifdef DEBUG
 		printf("semaphore value was not incremented\n");
 #endif
 		printf("TEST FAILED\n");
 		return PTS_FAIL;
 	}
-
 #ifdef DEBUG
 	printf("semaphore value was %d\n", val);
 #endif
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/6-1.c
index 2daf0b6..c887fad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/6-1.c
@@ -30,7 +30,7 @@
 #define FUNCTION "sem_post"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-#define SEMINITVAL 0 //initial value of semaphore = 0
+#define SEMINITVAL 0		//initial value of semaphore = 0
 
 sem_t *gsemp;
 
@@ -42,7 +42,8 @@
 	}
 }
 
-int main() {
+int main()
+{
 	char semname[28];
 	struct sigaction act;
 	int val;
@@ -51,8 +52,8 @@
 
 	gsemp = sem_open(semname, O_CREAT, 0777, SEMINITVAL);
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -76,14 +77,13 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 	}
-	if (val != SEMINITVAL+1) {
+	if (val != SEMINITVAL + 1) {
 #ifdef DEBUG
 		printf("semaphore value was not incremented\n");
 #endif
 		printf("TEST FAILED\n");
 		return PTS_FAIL;
 	}
-
 #ifdef DEBUG
 	printf("semaphore value was %d\n", val);
 #endif
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
index 1528cb6..08e9463 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
@@ -48,7 +48,7 @@
 #define TEST "sem_post_8-1"
 
 static char semname[28];
-static char semname_1[28]; /* Used to record state */
+static char semname_1[28];	/* Used to record state */
 
 int set_my_prio(int priority)
 {
@@ -95,7 +95,7 @@
 	}
 
 	fprintf(stderr, "child %d try to get lock, prio: %d\n",
-			id, get_my_prio());
+		id, get_my_prio());
 
 	sem_wait(sem_1);
 
@@ -157,12 +157,12 @@
 	switch (c_1) {
 	case 0:
 		child_fn(priority - 2, 1);
-	break;
+		break;
 	case -1:
 		perror("fork()");
 		retval = PTS_UNRESOLVED;
 		goto clean_up;
-	break;
+		break;
 	}
 	fprintf(stderr, "P: child_1: %d forked\n", c_1);
 
@@ -170,12 +170,12 @@
 	switch (c_2) {
 	case 0:
 		child_fn(priority - 1, 2);
-	break;
+		break;
 	case -1:
 		perror("fork()");
 		retval = PTS_UNRESOLVED;
 		goto clean_up;
-	break;
+		break;
 	}
 	fprintf(stderr, "P: child_2: %d forked\n", c_2);
 
@@ -190,12 +190,12 @@
 	switch (c_3) {
 	case 0:
 		child_fn(priority - 1, 3);
-	break;
+		break;
 	case -1:
 		perror("fork()");
 		retval = PTS_UNRESOLVED;
 		goto clean_up;
-	break;
+		break;
 	}
 	fprintf(stderr, "P: child_3: %d forked\n", c_3);
 
@@ -216,7 +216,7 @@
 		sem_post(sem);
 		ret_pid = wait(&status);
 		if (ret_pid == c_3 && WIFEXITED(status)
-		    && WEXITSTATUS(status) == 0){
+		    && WEXITSTATUS(status) == 0) {
 			fprintf(stderr, "P: release lock\n");
 			sem_post(sem);
 			ret_pid = wait(&status);
@@ -227,24 +227,23 @@
 				goto clean_up;
 			}
 			printf("Test Fail: Expect child_1: %d, got %d\n",
-				c_1, ret_pid);
+			       c_1, ret_pid);
 			retval = PTS_FAIL;
 			goto clean_up;
 		} else {
 			printf("Test Fail: Expect child_3: %d, got %d\n",
-			c_3, ret_pid);
+			       c_3, ret_pid);
 			retval = PTS_FAIL;
 			sem_post(sem);
-			while ((wait(NULL) > 0));
+			while ((wait(NULL) > 0)) ;
 			goto clean_up;
 		}
 	} else {
-		printf("Test Fail: Expect child_2: %d, got %d\n",
-			c_2, ret_pid);
+		printf("Test Fail: Expect child_2: %d, got %d\n", c_2, ret_pid);
 		retval = PTS_FAIL;
 		sem_post(sem);
 		sem_post(sem);
-		while ((wait(NULL) > 0));
+		while ((wait(NULL) > 0)) ;
 		goto clean_up;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/1-1.c
index f06959d..fe82832 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/1-1.c
@@ -26,22 +26,23 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts;
 	int val, sts;
 
-        if (sem_init (&mysemp, 0, 1) == -1) {
-                perror(ERROR_PREFIX "sem_init");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_init(&mysemp, 0, 1) == -1) {
+		perror(ERROR_PREFIX "sem_init");
+		return PTS_UNRESOLVED;
+	}
 
-	ts.tv_sec=time(NULL);
-        ts.tv_nsec=0;
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
 
 	/* Lock Semaphore */
 	sts = sem_timedwait(&mysemp, &ts);
-        if (sts == -1) {
+	if (sts == -1) {
 		perror(ERROR_PREFIX "sem_timedwait");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/10-1.c
index 0037f0a..bb9088f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/10-1.c
@@ -29,36 +29,35 @@
 
 #define SLEEP_SEC 1
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts, ts_2;
 	int rc;
 
 	/* Init the value to 0 */
-        if (sem_init (&mysemp, 0, 0) == -1) {
-                perror(ERROR_PREFIX "sem_init");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_init(&mysemp, 0, 0) == -1) {
+		perror(ERROR_PREFIX "sem_init");
+		return PTS_UNRESOLVED;
+	}
 
 	/* Set the abs timeout */
 #ifdef CLOCK_REALTIME
 	printf("Test CLOCK_REALTIME\n");
-	if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
-	{
+	if (clock_gettime(CLOCK_REALTIME, &ts) != 0) {
 		perror("clock_gettime()");
 		return PTS_UNRESOLVED;
 	}
 	ts.tv_sec += SLEEP_SEC;
-        ts.tv_nsec=0;
+	ts.tv_nsec = 0;
 #else
-	ts.tv_sec=time(NULL);
+	ts.tv_sec = time(NULL);
 	ts.tv_sec += SLEEP_SEC;
-        ts.tv_nsec=0;
+	ts.tv_nsec = 0;
 #endif
 	/* Lock Semaphore */
 	rc = sem_timedwait(&mysemp, &ts);
-        if (rc != -1 || (rc == -1 && errno != ETIMEDOUT))
-	{
+	if (rc != -1 || (rc == -1 && errno != ETIMEDOUT)) {
 		perror(ERROR_PREFIX "sem_timedwait");
 		printf("Expect timedout\n");
 		return PTS_UNRESOLVED;
@@ -66,8 +65,7 @@
 
 	/* Check the time */
 #ifdef CLOCK_REALTIME
-	if (clock_gettime(CLOCK_REALTIME, &ts_2) != 0)
-	{
+	if (clock_gettime(CLOCK_REALTIME, &ts_2) != 0) {
 		perror("clock_gettime()");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
index 39c589d..7818ea3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/11-1.c
@@ -30,27 +30,28 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t mysemp[2];
 	struct timespec ts[2];
 	int val[2], sts[2];
 	int i;
 
 	for (i = 0; i < 2; i++) {
-        	if (sem_init (&mysemp[i], 0, 1) == -1) {
-                	perror(ERROR_PREFIX "sem_init");
-	                return PTS_UNRESOLVED;
-       		}
+		if (sem_init(&mysemp[i], 0, 1) == -1) {
+			perror(ERROR_PREFIX "sem_init");
+			return PTS_UNRESOLVED;
+		}
 		if (i == 0) {
-			ts[i].tv_sec=time(NULL) + TIMEOUT;
-		        ts[i].tv_nsec=0;
+			ts[i].tv_sec = time(NULL) + TIMEOUT;
+			ts[i].tv_nsec = 0;
 		} else if (i == 1) {
-			ts[i].tv_sec=time(NULL) + INVALIDTIMEOUT;
-		        ts[i].tv_nsec=0;
+			ts[i].tv_sec = time(NULL) + INVALIDTIMEOUT;
+			ts[i].tv_nsec = 0;
 		}
 		/* Lock Semaphore */
 		sts[i] = sem_timedwait(&mysemp[i], &ts[i]);
-        	if (sts[i] == -1) {
+		if (sts[i] == -1) {
 			perror(ERROR_PREFIX "sem_timedwait");
 			return PTS_UNRESOLVED;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-1.c
index c28f91c..848a3cd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-1.c
@@ -29,32 +29,31 @@
 
 int main()
 {
-        sem_t mysemp;
+	sem_t mysemp;
 	struct timespec ts;
 	int pid;
 
 	/* Semaphore started out locked */
-	 if (sem_init (&mysemp, 0, 0) == -1) {
+	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
-                return PTS_UNRESOLVED;
-         }
+		return PTS_UNRESOLVED;
+	}
 
 	pid = fork();
-	if (pid == 0)  // child to lock semaphore
+	if (pid == 0)		// child to lock semaphore
 	{
-		ts.tv_sec=time(NULL)+2;
-		ts.tv_nsec=0;
+		ts.tv_sec = time(NULL) + 2;
+		ts.tv_nsec = 0;
 
-	       	if (sem_timedwait(&mysemp, &ts) == -1) {
-			puts ("TEST FAILED");
+		if (sem_timedwait(&mysemp, &ts) == -1) {
+			puts("TEST FAILED");
 			return PTS_FAIL;
 		} else {
 			puts("TEST PASSED");
 			sem_destroy(&mysemp);
 			return PTS_PASS;
 		}
-	}
-	else if (pid > 0) // parent to unlock semaphore
+	} else if (pid > 0)	// parent to unlock semaphore
 	{
 		int i;
 		sleep(1);
@@ -74,5 +73,5 @@
 		sem_destroy(&mysemp);
 		return PTS_PASS;
 	}
-return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-2.c
index a169ca1..2319c16 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/2-2.c
@@ -29,18 +29,19 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts;
 	int sts, val;
 
-	if (sem_init (&mysemp, 0, 0) == -1) {
+	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
 
-	ts.tv_sec=time(NULL)+1;
-	ts.tv_nsec=0;
+	ts.tv_sec = time(NULL) + 1;
+	ts.tv_nsec = 0;
 
 	/* Try to lock Semaphore */
 	sts = sem_timedwait(&mysemp, &ts);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
index cd3cb49..8477484 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/3-1.c
@@ -30,28 +30,28 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 
-    struct timespec ts;
-    sem_t mysemp;
-    int i=0;
-    int val;
+	struct timespec ts;
+	sem_t mysemp;
+	int i = 0;
+	int val;
 
-	if (sem_init (&mysemp, 0, 0) == -1) {
+	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
 
-	ts.tv_sec=time(NULL);
-	ts.tv_nsec=0;
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
 
-	while (sem_timedwait(&mysemp, &ts) == -1)
-	{
+	while (sem_timedwait(&mysemp, &ts) == -1) {
 		ts.tv_sec += 1;
-//		printf("%s \n", asctime(localtime(&ts.tv_sec)));
+//              printf("%s \n", asctime(localtime(&ts.tv_sec)));
 		i++;
-//		printf("i=%d\n",i);
-		if (i==5) {
+//              printf("i=%d\n",i);
+		if (i == 5) {
 			sem_post(&mysemp);
 		}
 	}
@@ -63,7 +63,7 @@
 	}
 
 	/* Checking if the value of the Semaphore after lock & unlock */
-	if (val == 0)  {
+	if (val == 0) {
 		puts("TEST PASSED: Sem unlocked after 5 timeouts");
 		sem_destroy(&mysemp);
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/4-1.c
index f710bc5..bff2a08 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/4-1.c
@@ -26,22 +26,23 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts;
 	int unresolved = 0, sts;
 
-        if (sem_init (&mysemp, 0, 1) == -1) {
-                perror(ERROR_PREFIX "sem_init");
+	if (sem_init(&mysemp, 0, 1) == -1) {
+		perror(ERROR_PREFIX "sem_init");
 		unresolved = 1;
-        }
+	}
 
 	ts.tv_sec = time(NULL) + 1;
-        ts.tv_nsec = 0;
+	ts.tv_nsec = 0;
 
 	/* Lock Semaphore */
 	sts = sem_timedwait(&mysemp, &ts);
-        if (sts == -1) {
+	if (sts == -1) {
 		perror(ERROR_PREFIX "sem_timedwait");
 		unresolved = 1;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-1.c
index 2f96b7f..02ee118 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-1.c
@@ -27,17 +27,18 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts;
 	int sts;
 
-        if (sem_init (&mysemp, 0, 0) == -1) {
-                perror(ERROR_PREFIX "sem_init");
-                return PTS_UNRESOLVED;
-        }
-	ts.tv_sec=time(NULL);
-        ts.tv_nsec= -3;
+	if (sem_init(&mysemp, 0, 0) == -1) {
+		perror(ERROR_PREFIX "sem_init");
+		return PTS_UNRESOLVED;
+	}
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = -3;
 
 	sts = sem_timedwait(&mysemp, &ts);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
index efd5587..e6fad14 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/6-2.c
@@ -29,17 +29,18 @@
 
 #define NANOSEC 1000000000
 
-int main() {
+int main()
+{
 	sem_t mysemp;
 	struct timespec ts;
 	int sts;
 
-        if (sem_init (&mysemp, 0, 0) == -1) {
-                perror(ERROR_PREFIX "sem_init");
-                return PTS_UNRESOLVED;
-        }
-	ts.tv_sec=time(NULL);
-        ts.tv_nsec= NANOSEC;
+	if (sem_init(&mysemp, 0, 0) == -1) {
+		perror(ERROR_PREFIX "sem_init");
+		return PTS_UNRESOLVED;
+	}
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = NANOSEC;
 
 	sts = sem_timedwait(&mysemp, &ts);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c
index 61d773f..f994d36 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/7-1.c
@@ -31,22 +31,22 @@
 #define FUNCTION "sem_timedwait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 
-    struct timespec ts;
-    sem_t mysemp;
+	struct timespec ts;
+	sem_t mysemp;
 
-	if (sem_init (&mysemp, 0, 0) == -1) {
+	if (sem_init(&mysemp, 0, 0) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
 
-	ts.tv_sec=time(NULL);
-	ts.tv_nsec=0;
+	ts.tv_sec = time(NULL);
+	ts.tv_nsec = 0;
 
-	while (sem_timedwait(&mysemp, &ts) == -1)
-	{
-		if (errno == ETIMEDOUT)  {
+	while (sem_timedwait(&mysemp, &ts) == -1) {
+		if (errno == ETIMEDOUT) {
 			puts("TEST PASSED");
 			sem_destroy(&mysemp);
 			return PTS_PASS;
@@ -54,7 +54,7 @@
 			puts("TEST FAILED");
 			return PTS_FAIL;
 		}
-	return PTS_UNRESOLVED;
+		return PTS_UNRESOLVED;
 	}
-return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/9-1.c
index 393fad5..c596134 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/9-1.c
@@ -41,7 +41,7 @@
 	struct timespec ts;
 	int pid, status;
 
-	if (sem_init (&mysemp, 0, 1) == -1) {
+	if (sem_init(&mysemp, 0, 1) == -1) {
 		perror(ERROR_PREFIX "sem_init");
 		return PTS_UNRESOLVED;
 	}
@@ -52,11 +52,11 @@
 	}
 
 	pid = fork();
-	if (pid == 0) { // child create the semaphore.
+	if (pid == 0) {		// child create the semaphore.
 		struct sigaction act;
 
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
 			return CHILDFAIL;
@@ -66,22 +66,22 @@
 			return CHILDFAIL;
 		}
 
-		ts.tv_sec = time(NULL)+3;
+		ts.tv_sec = time(NULL) + 3;
 		ts.tv_nsec = 0;
 
 		sem_timedwait(&mysemp, &ts);
 
-	       if (errno == EINTR) {
+		if (errno == EINTR) {
 			printf("Test PASSED\n");
 			return (CHILDPASS);
 		}
 		puts("TEST FAILED: errno != EINTR");
 		return (CHILDFAIL);
 
-	} else { // parent to send a signal to child
+	} else {		// parent to send a signal to child
 		int i;
 		sleep(1);
-		status = kill(pid,SIGABRT);  // send signal to child
+		status = kill(pid, SIGABRT);	// send signal to child
 		if (wait(&i) == -1) {
 			perror("Error waiting for child to exit\n");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/1-1.c
index 610aeae..62eefb1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/1-1.c
@@ -23,14 +23,15 @@
 #define FUNCTION "sem_unlink"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	/* Initial value of Semaphore is 1 */
-	mysemp = sem_open(semname, O_CREAT,0,1);
+	mysemp = sem_open(semname, O_CREAT, 0, 1);
 	if (mysemp == SEM_FAILED || mysemp == NULL) {
 		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-1.c
index edf8c20..8a95325 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-1.c
@@ -23,21 +23,22 @@
 #define FUNCTION "sem_unlink"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	/* Initial value of Semaphore is 1 */
-	mysemp = sem_open(semname, O_CREAT,0,1);
+	mysemp = sem_open(semname, O_CREAT, 0, 1);
 	if (mysemp == SEM_FAILED || mysemp == NULL) {
 		perror(ERROR_PREFIX "sem_open");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sem_unlink(semname) == 0) {
-	      	if ((sem_wait (mysemp)) == -1)  {
+		if ((sem_wait(mysemp)) == -1) {
 			puts("TEST FAILED: Couldn't remove named semaphore");
 			return PTS_FAIL;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-2.c
index fbb2bd1..cd4dc54 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-2.c
@@ -85,29 +85,26 @@
 /******************************************************************************/
 
 /* Operations common to all processes on the semaphore*/
-sem_t * common()
+sem_t *common()
 {
 	int ret;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Reconnect to the semaphore */
 	sem = sem_open(SEM_NAME, 0);
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to reconnect the semaphore");
 	}
 
 	/* block until the semaphore is posted */
 
-	do
-	{
+	do {
 		ret = sem_wait(sem);
 	}
 	while (ret != 0 && errno == EINTR);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		FAILED("Waiting for the semaphore failed");
 	}
 
@@ -121,8 +118,7 @@
 	/* Post the semaphore back */
 	ret = sem_post(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		FAILED("Failed to post the semaphore");
 	}
 
@@ -130,12 +126,12 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t p1, p2, p3, ctl;
 
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -143,32 +139,27 @@
 	/* Create the semaphore */
 	sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
 
-	if ((sem == SEM_FAILED) && (errno == EEXIST))
-	{
+	if ((sem == SEM_FAILED) && (errno == EEXIST)) {
 		sem_unlink(SEM_NAME);
 		sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
 	}
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
 	/* fork 3 times */
 	p1 = fork();
 
-	if (p1 == -1)
-	{
+	if (p1 == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
-	if (p1 == 0)        /* child */
-	{
+	if (p1 == 0) {		/* child */
 		sem = common();
 		ret = sem_close(sem);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			FAILED("Failed to sem_close in child");
 		}
 
@@ -177,28 +168,24 @@
 
 	p2 = fork();
 
-	if (p2 == -1)
-	{
+	if (p2 == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
-	if (p2 == 0)        /* child */
-	{
+	if (p2 == 0) {		/* child */
 		sem = common();
 		_exit(0);
 	}
 
 	p3 = fork();
 
-	if (p3 == -1)
-	{
+	if (p3 == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
-	if (p3 == 0)        /* child */
-	{
+	if (p3 == 0) {		/* child */
 		sem = common();
-		ret = execl("/bin/ls", "ls",  NULL);
+		ret = execl("/bin/ls", "ls", NULL);
 		UNRESOLVED(errno, "Failed to exec");
 	}
 
@@ -208,61 +195,52 @@
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* Post the semaphore */
 	ret = sem_post(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to post the semaphore");
 	}
 
 	/* and close it in this process */
 	ret = sem_close(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
 	/* Wait all processes */
 	ctl = waitpid(p1, &status, 0);
 
-	if (ctl != p1)
-	{
+	if (ctl != p1) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
 		FAILED("Child 'sem_close' exited abnormally");
 	}
 
 	ctl = waitpid(p2, &status, 0);
 
-	if (ctl != p2)
-	{
+	if (ctl != p2) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
 		FAILED("Child '_exit' exited abnormally");
 	}
 
 	ctl = waitpid(p3, &status, 0);
 
-	if (ctl != p3)
-	{
+	if (ctl != p3) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
-	{
+	if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
 		FAILED("Child 'exec' exited abnormally");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/3-1.c
index f4b207c..983e125 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/3-1.c
@@ -95,7 +95,7 @@
 int set_nonroot()
 {
 
-	struct passwd * pw;
+	struct passwd *pw;
 	setpwent();
 	/* search for the first user which is non root */
 
@@ -105,17 +105,15 @@
 
 	endpwent();
 
-	if (pw == NULL)
-	{
+	if (pw == NULL) {
 		output("There is no other user than current and root.\n");
 		return 1;
 	}
 
-	if (seteuid(pw->pw_uid) != 0)
-	{
-		if (errno == EPERM)
-		{
-			output("You don't have permission to change your UID.\n");
+	if (seteuid(pw->pw_uid) != 0) {
+		if (errno == EPERM) {
+			output
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 
@@ -124,16 +122,16 @@
 	}
 
 	output("Testing with user '%s' (uid: %d)\n",
-	        pw->pw_name, (int) geteuid());
+	       pw->pw_name, (int)geteuid());
 	return 0;
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t ch, ctl;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -141,57 +139,53 @@
 	/* Create the semaphore */
 	sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0744, 1);
 
-	if ((sem == SEM_FAILED) && (errno == EEXIST))
-	{
+	if ((sem == SEM_FAILED) && (errno == EEXIST)) {
 		sem_unlink(SEM_NAME);
 		sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0744, 1);
 	}
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
 	/* fork */
 	ch = fork();
 
-	if (ch == -1)
-	{
+	if (ch == -1) {
 		UNRESOLVED(errno, "Failed to fork");
 	}
 
-	if (ch == 0)         /* child */
-	{
+	if (ch == 0) {		/* child */
 		/* connect to the semaphore */
 		sem = sem_open(SEM_NAME, 0);
 
-		if (sem == SEM_FAILED)
-		{
-			output("Failed to connect to the semaphore, error %d: %s\n", errno, strerror(errno));
+		if (sem == SEM_FAILED) {
+			output
+			    ("Failed to connect to the semaphore, error %d: %s\n",
+			     errno, strerror(errno));
 			exit(1);
 		}
 
 		/* change euid */
 		ret = set_nonroot();
 
-		if (ret)
-		{
+		if (ret) {
 			output("Changing euid failed\n");
-			exit (1);
+			exit(1);
 		}
 
 		/* try and unlink, it should fail */
 		ret = sem_unlink(SEM_NAME);
 
-		if (ret == 0)
-		{
+		if (ret == 0) {
 			output("sem_unlink did not fail in child");
 			exit(2);
 		}
 
-		if (errno != EACCES)
-		{
-			output("sem_unlink failed with unexpected error %d: %s\n", errno, strerror(errno));
+		if (errno != EACCES) {
+			output
+			    ("sem_unlink failed with unexpected error %d: %s\n",
+			     errno, strerror(errno));
 			exit(2);
 		}
 
@@ -202,36 +196,30 @@
 	/* Parent waits for the child to finish */
 	ctl = waitpid(ch, &status, 0);
 
-	if (ctl != ch)
-	{
+	if (ctl != ch) {
 		UNRESOLVED(errno, "Waitpid returned the wrong PID");
 	}
 
-	if (!WIFEXITED(status))
-	{
+	if (!WIFEXITED(status)) {
 		FAILED("Child exited abnormally");
 	}
 
-	if (WEXITSTATUS(status) == 1)
-	{
+	if (WEXITSTATUS(status) == 1) {
 		UNRESOLVED(0, "An error occured in child");
 	}
 
-	if (WEXITSTATUS(status) == 2)
-	{
+	if (WEXITSTATUS(status) == 2) {
 		FAILED("Test failed in child");
 	}
 
-	if (WEXITSTATUS(status) != 0)
-	{
+	if (WEXITSTATUS(status) != 0) {
 		UNRESOLVED(0, "Unexpected return value from child");
 	}
 
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-1.c
index d942fb3..a659ca2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_unlink"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 
 	char semname[28];
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-2.c
index 3083a6e..44d3dd1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-2.c
@@ -81,24 +81,22 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 
 	/* Initialize output */
 	output_init();
 
-	(void) sem_unlink(SEM_NAME);
+	(void)sem_unlink(SEM_NAME);
 
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != -1)
-	{
+	if (ret != -1) {
 		FAILED("sem_unlink did not return -1");
 	}
 
-	if (errno != ENOENT)
-	{
+	if (errno != ENOENT) {
 		output("Error %d: %s\n", errno, strerror(errno));
 		FAILED("The error was not ENOENT");
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/5-1.c
index 3d8496a..66f36f0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/5-1.c
@@ -88,12 +88,12 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, error;
-	sem_t * sem;
+	sem_t *sem;
 	long PATH_MAX, NAME_MAX;
-	char * sem_name;
+	char *sem_name;
 
 	/* Initialize output */
 	output_init();
@@ -105,47 +105,45 @@
 	output("PATH_MAX: %ld\n", PATH_MAX);
 #endif
 
-	if (PATH_MAX > 0)
-	{
+	if (PATH_MAX > 0) {
 		/* create a semaphore with a name longer than PATH_MAX */
 		sem_name = calloc(PATH_MAX + 1, sizeof(char));
 
-		if (sem_name == NULL)
-		{
-			UNRESOLVED(errno, "Failed to allocate space for the semaphore name");
+		if (sem_name == NULL) {
+			UNRESOLVED(errno,
+				   "Failed to allocate space for the semaphore name");
 		}
 
 		/* the space was allocated */
-		sem_name[ 0 ] = '/';
+		sem_name[0] = '/';
 
-		sem_name[ PATH_MAX ] = '\0';
+		sem_name[PATH_MAX] = '\0';
 
-		memset(sem_name + 1, 'P', PATH_MAX -1);
+		memset(sem_name + 1, 'P', PATH_MAX - 1);
 
 		/* Create the semaphore */
 		sem = sem_open(sem_name, O_CREAT, 0777, 1);
 
-		if (sem != SEM_FAILED)
-		{
+		if (sem != SEM_FAILED) {
 			ret = sem_unlink(sem_name);
 			error = errno;
 			free(sem_name);
 
-			if (ret == 0)
-			{
-				FAILED("The function did not return ENAMETOOLONG as expected");
-			}
-			else
-			{
-				output("Error was %d: %s\n", error, strerror(error));
-				FAILED("Unable to unlink a semaphore which we just created");
+			if (ret == 0) {
+				FAILED
+				    ("The function did not return ENAMETOOLONG as expected");
+			} else {
+				output("Error was %d: %s\n", error,
+				       strerror(error));
+				FAILED
+				    ("Unable to unlink a semaphore which we just created");
 			}
 		}
-
 #if VERBOSE > 0
-		else
-		{
-			output("Creation of the semaphore failed with error %d: %s\n", errno, strerror(errno));
+		else {
+			output
+			    ("Creation of the semaphore failed with error %d: %s\n",
+			     errno, strerror(errno));
 		}
 
 #endif
@@ -160,47 +158,45 @@
 
 #endif
 
-	if (NAME_MAX > 0)
-	{
+	if (NAME_MAX > 0) {
 		/* create a semaphore with a name longer than NAME_MAX */
 		sem_name = calloc(NAME_MAX + 2, sizeof(char));
 
-		if (sem_name == NULL)
-		{
-			UNRESOLVED(errno, "Failed to allocate space for the semaphore name");
+		if (sem_name == NULL) {
+			UNRESOLVED(errno,
+				   "Failed to allocate space for the semaphore name");
 		}
 
 		/* the space was allocated */
-		sem_name[ 0 ] = '/';
+		sem_name[0] = '/';
 
-		sem_name[ NAME_MAX + 1 ] = '\0';
+		sem_name[NAME_MAX + 1] = '\0';
 
 		memset(sem_name + 1, 'N', NAME_MAX);
 
 		/* Create the semaphore */
-		sem = sem_open(sem_name, O_CREAT , 0777, 1);
+		sem = sem_open(sem_name, O_CREAT, 0777, 1);
 
-		if (sem != SEM_FAILED)
-		{
+		if (sem != SEM_FAILED) {
 			ret = sem_unlink(sem_name);
 			error = errno;
 			free(sem_name);
 
-			if (ret == 0)
-			{
-				FAILED("The function did not return ENAMETOOLONG as expected");
-			}
-			else
-			{
-				output("Error was %d: %s\n", error, strerror(error));
-				FAILED("Unable to unlink a semaphore which we just created");
+			if (ret == 0) {
+				FAILED
+				    ("The function did not return ENAMETOOLONG as expected");
+			} else {
+				output("Error was %d: %s\n", error,
+				       strerror(error));
+				FAILED
+				    ("Unable to unlink a semaphore which we just created");
 			}
 		}
-
 #if VERBOSE > 0
-		else
-		{
-			output("Creation of the semaphore failed with error %d: %s\n", errno, strerror(errno));
+		else {
+			output
+			    ("Creation of the semaphore failed with error %d: %s\n",
+			     errno, strerror(errno));
 		}
 
 #endif
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/6-1.c
index 5a16707..09ac143 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/6-1.c
@@ -83,11 +83,11 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, value;
 
-	sem_t * sem1, * sem2;
+	sem_t *sem1, *sem2;
 
 	/* Initialize output */
 	output_init();
@@ -95,44 +95,39 @@
 	/* Create the semaphore */
 	sem1 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 1);
 
-	if ((sem1 == SEM_FAILED) && (errno == EEXIST))
-	{
+	if ((sem1 == SEM_FAILED) && (errno == EEXIST)) {
 		sem_unlink(SEM_NAME);
 		sem1 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 1);
 	}
 
-	if (sem1 == SEM_FAILED)
-	{
+	if (sem1 == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* Try reconnect */
 	sem2 = sem_open(SEM_NAME, 0);
 
-	if (sem2 != SEM_FAILED)
-	{
+	if (sem2 != SEM_FAILED) {
 		FAILED("Reconnecting the unlinked semaphore did not failed");
 	}
 
-	if (errno != ENOENT)
-	{
+	if (errno != ENOENT) {
 		output("Error %d: %s\n", errno, strerror(errno));
-		FAILED("Reconnecting the unlinked semaphore failed with a wrong error");
+		FAILED
+		    ("Reconnecting the unlinked semaphore failed with a wrong error");
 	}
 
 	/* Reopen the semaphore */
 	sem2 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 3);
 
-	if (sem2 == SEM_FAILED)
-	{
+	if (sem2 == SEM_FAILED) {
 		output("Gor error %d: %s\n", errno, strerror(errno));
 		FAILED("Failed to recreate the semaphore");
 	}
@@ -140,26 +135,22 @@
 	/* Check the semaphore have different values */
 	ret = sem_getvalue(sem1, &value);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to read sem1 value");
 	}
 
-	if (value != 1)
-	{
+	if (value != 1) {
 		output("Read: %d\n", value);
 		FAILED("Semaphore value is not as expected");
 	}
 
 	ret = sem_getvalue(sem2, &value);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to read sem1 value");
 	}
 
-	if (value != 3)
-	{
+	if (value != 3) {
 		output("Read: %d\n", value);
 		FAILED("Semaphore value is not as expected");
 	}
@@ -167,23 +158,20 @@
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* close both */
 	ret = sem_close(sem1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
 	ret = sem_close(sem2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/7-1.c
index cbcb462..490050c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/7-1.c
@@ -79,18 +79,16 @@
 /***************************    Test case   ***********************************/
 /******************************************************************************/
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
-	do
-	{
+	do {
 		ret = sem_wait(arg);
 	}
 	while ((ret != 0) && (errno == EINTR));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to wait for the semaphore");
 	}
 
@@ -98,11 +96,11 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t thread;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -110,22 +108,19 @@
 	/* Create the semaphore */
 	sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 1);
 
-	if ((sem == SEM_FAILED) && (errno == EEXIST))
-	{
+	if ((sem == SEM_FAILED) && (errno == EEXIST)) {
 		sem_unlink(SEM_NAME);
 		sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 1);
 	}
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
 	/* Create the child thread */
 	ret = pthread_create(&thread, NULL, threaded, sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create the thread");
 	}
 
@@ -135,32 +130,28 @@
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* Now, we're success */
 	ret = sem_post(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to post the semaphore");
 	}
 
 	/* Join the thread */
 	ret = pthread_join(thread, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
 	/* close  */
 	ret = sem_close(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/9-1.c
index 3071962..7ad0781 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/9-1.c
@@ -84,19 +84,17 @@
 /******************************************************************************/
 int thread_state = 0;
 
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	thread_state = 1;
 
-	do
-	{
+	do {
 		ret = sem_wait(arg);
 	}
 	while (ret != 0 && errno == EINTR);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to wait for the semaphore");
 	}
 
@@ -105,11 +103,11 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t child;
-	sem_t * sem;
+	sem_t *sem;
 
 	/* Initialize output */
 	output_init();
@@ -117,68 +115,59 @@
 	/* Create the semaphore */
 	sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
 
-	if ((sem == SEM_FAILED) && (errno == EEXIST))
-	{
+	if ((sem == SEM_FAILED) && (errno == EEXIST)) {
 		sem_unlink(SEM_NAME);
 		sem = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
 	}
 
-	if (sem == SEM_FAILED)
-	{
+	if (sem == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to create the semaphore");
 	}
 
 	/* Create the child */
 	ret = pthread_create(&child, NULL, threaded, sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create the thread");
 	}
 
 	/* Wait for the child to be waiting. */
-	while (thread_state != 1)
-	{
+	while (thread_state != 1) {
 		sched_yield();
 	}
 
 	/* Unlink */
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to unlink the semaphore");
 	}
 
 	/* Check the semaphore state did not change. */
 	sleep(1);
 
-	if (thread_state != 1)
-	{
+	if (thread_state != 1) {
 		FAILED("sem_unlink made sem_wait thread return");
 	}
 
 	/* Post the semaphore */
 	ret = sem_post(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to post the semaphore");
 	}
 
 	/* Join the thread */
 	ret = pthread_join(child, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join the thread");
 	}
 
 	/* Now, we can destroy all */
 	ret = sem_close(sem);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-1.c
index 0c45052..cfb90ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_wait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 	int val;
@@ -48,7 +49,7 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 
-	/* Checking if the value of the Semaphore decremented by one */
+		/* Checking if the value of the Semaphore decremented by one */
 	} else if (val == 0) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-2.c
index 7658a99..6944639 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-2.c
@@ -24,7 +24,8 @@
 #define FUNCTION "sem_wait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 	int value = 10;
@@ -39,8 +40,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	while (value)
-	{ // checking the value if zero yet.
+	while (value) {		// checking the value if zero yet.
 		if (sem_wait(mysemp) == -1) {
 			perror(ERROR_PREFIX "sem_getvalue");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/11-1.c
index 74d2a51..e16b3e4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/11-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_trywait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 	int val;
@@ -37,7 +38,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	/* Lock Semaphore by sem_trywait*/
+	/* Lock Semaphore by sem_trywait */
 	if (sem_trywait(mysemp) == -1) {
 		perror(ERROR_PREFIX "sem_wait");
 		return PTS_UNRESOLVED;
@@ -48,7 +49,7 @@
 		perror(ERROR_PREFIX "sem_getvalue");
 		return PTS_UNRESOLVED;
 
-	/* Checking if the value of the Semaphore decremented by one */
+		/* Checking if the value of the Semaphore decremented by one */
 	} else if (val == 0) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c
index 7229d7e..09c21e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_trywait"
 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
@@ -36,7 +37,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	/* Try to Lock Semaphore by sem_trywait*/
+	/* Try to Lock Semaphore by sem_trywait */
 	if (sem_trywait(mysemp) == -1) {
 		puts("TEST PASSED");
 		sem_unlink(semname);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
index f2a488a..1f4dade 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
@@ -117,7 +117,7 @@
 	if (timespec_nsec_diff(&ts_fin, &ts_ref) < NSEC_IN_SEC) {
 		output("Ts: %d.%9.9d  ->  %d.%9.9d\n",
 		       ts_ref.tv_sec, ts_ref.tv_nsec,
-                       ts_fin.tv_sec, ts_fin.tv_nsec);
+		       ts_fin.tv_sec, ts_fin.tv_nsec);
 		FAILED("The sem_wait call did not block");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/3-1.c
index a5b4034..56476cf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/3-1.c
@@ -26,40 +26,40 @@
 
 int main()
 {
-        sem_t *mysemp;
-        char semname[28];
+	sem_t *mysemp;
+	char semname[28];
 	int val;
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
 	mysemp = sem_open(semname, O_CREAT, 0, 1);
-       	if (mysemp == SEM_FAILED || mysemp == NULL) {
-          	 perror(ERROR_PREFIX "sem_open");
-               	 return PTS_UNRESOLVED;
-        }
+	if (mysemp == SEM_FAILED || mysemp == NULL) {
+		perror(ERROR_PREFIX "sem_open");
+		return PTS_UNRESOLVED;
+	}
 
 	if (sem_wait(mysemp) == -1) {
-       		perror(ERROR_PREFIX "sem_wait");
-       	       	return PTS_UNRESOLVED;
+		perror(ERROR_PREFIX "sem_wait");
+		return PTS_UNRESOLVED;
 	}
 
-        if (sem_post(mysemp) == -1) {
-                perror(ERROR_PREFIX "sem_post");
-                return PTS_UNRESOLVED;
-        }
-
-       	if (sem_getvalue(mysemp, &val) < 0) {
-        	perror(ERROR_PREFIX "sem_getvalue");
-               	return PTS_UNRESOLVED;
+	if (sem_post(mysemp) == -1) {
+		perror(ERROR_PREFIX "sem_post");
+		return PTS_UNRESOLVED;
 	}
 
-        if (val == 1) {
-	    puts("TEST PASSED");
-	    sem_unlink(semname);
-	    sem_close(mysemp);
-	   return PTS_PASS;
-        } else {
-            puts("TEST FAILED");
-            return PTS_FAIL;
-        }
+	if (sem_getvalue(mysemp, &val) < 0) {
+		perror(ERROR_PREFIX "sem_getvalue");
+		return PTS_UNRESOLVED;
+	}
+
+	if (val == 1) {
+		puts("TEST PASSED");
+		sem_unlink(semname);
+		sem_close(mysemp);
+		return PTS_PASS;
+	} else {
+		puts("TEST FAILED");
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/5-1.c
index d93f25f..100fef8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/5-1.c
@@ -23,7 +23,8 @@
 #define FUNCTION "sem_trywait"
 #define ERROR_PREFIX "unexpected errno: " FUNCTION " " TEST ": "
 
-int main() {
+int main()
+{
 	sem_t *mysemp;
 	char semname[28];
 
@@ -36,7 +37,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	/* Lock Semaphore by sem_trywait*/
+	/* Lock Semaphore by sem_trywait */
 	if ((sem_trywait(mysemp) == -1) && (errno == EAGAIN)) {
 		puts("TEST PASSED");
 		sem_close(mysemp);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/7-1.c
index 29b9e55..8f741b5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/7-1.c
@@ -29,68 +29,68 @@
 
 void handler(int signo)
 {
-        printf("In handler\n");
+	printf("In handler\n");
 }
 
 int main()
 {
-        sem_t *mysemp;
-        char semname[28];
-        int pid, status;
+	sem_t *mysemp;
+	char semname[28];
+	int pid, status;
 
 	sprintf(semname, "/" FUNCTION "_" TEST "_%d", getpid());
 
-        mysemp = sem_open(semname, O_CREAT, 0, 1);
-        if (mysemp == SEM_FAILED || mysemp == NULL) {
-                perror(ERROR_PREFIX "sem_open");
-                return PTS_UNRESOLVED;
-        }
+	mysemp = sem_open(semname, O_CREAT, 0, 1);
+	if (mysemp == SEM_FAILED || mysemp == NULL) {
+		perror(ERROR_PREFIX "sem_open");
+		return PTS_UNRESOLVED;
+	}
 
-        if (sem_wait(mysemp) == -1) {
-                perror(ERROR_PREFIX "sem_wait");
-                return PTS_UNRESOLVED;
-        }
+	if (sem_wait(mysemp) == -1) {
+		perror(ERROR_PREFIX "sem_wait");
+		return PTS_UNRESOLVED;
+	}
 
-        pid = fork();
-        if (pid == 0) { // child create the semaphore.
-                struct sigaction act;
+	pid = fork();
+	if (pid == 0) {		// child create the semaphore.
+		struct sigaction act;
 
-                act.sa_handler=handler;
-                act.sa_flags=0;
-                if (sigemptyset(&act.sa_mask) == -1) {
-                        perror("Error calling sigemptyset\n");
-                        return CHILDFAIL;
-                }
-                if (sigaction(SIGABRT, &act, 0) == -1) {
-                        perror("Error calling sigaction\n");
-                        return CHILDFAIL;
-                }
+		act.sa_handler = handler;
+		act.sa_flags = 0;
+		if (sigemptyset(&act.sa_mask) == -1) {
+			perror("Error calling sigemptyset\n");
+			return CHILDFAIL;
+		}
+		if (sigaction(SIGABRT, &act, 0) == -1) {
+			perror("Error calling sigaction\n");
+			return CHILDFAIL;
+		}
 
-        	sem_wait(mysemp);
+		sem_wait(mysemp);
 
-                if (errno == EINTR) {
-                        printf("Test PASSED\n");
-                        return (CHILDPASS);
-                }
-                puts("TEST FAILED: errno != EINTR");
-                return (CHILDFAIL);
+		if (errno == EINTR) {
+			printf("Test PASSED\n");
+			return (CHILDPASS);
+		}
+		puts("TEST FAILED: errno != EINTR");
+		return (CHILDFAIL);
 
-        } else { // parent to send a signal to child
-                int i;
-                sleep(1);
-                status = kill(pid,SIGABRT);  // send signal to child
-                if (wait(&i) == -1) {
-                        perror("Error waiting for child to exit\n");
-                        return PTS_UNRESOLVED;
-                }
+	} else {		// parent to send a signal to child
+		int i;
+		sleep(1);
+		status = kill(pid, SIGABRT);	// send signal to child
+		if (wait(&i) == -1) {
+			perror("Error waiting for child to exit\n");
+			return PTS_UNRESOLVED;
+		}
 
-                if (!WEXITSTATUS(i)) {
-                        return PTS_FAIL;
-                }
+		if (!WEXITSTATUS(i)) {
+			return PTS_FAIL;
+		}
 		puts("TEST PASSED");
 		sem_unlink(semname);
-                return PTS_PASS;
-        }
+		return PTS_PASS;
+	}
 
-        return PTS_UNRESOLVED;
+	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/1-1.c
index 94d7dd4..25c44cd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/1-1.c
@@ -35,12 +35,13 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_1-1"
 
-int main() {
+int main()
+{
 	int fd;
 	char str[BUF_SIZE] = "qwerty";
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -61,7 +62,7 @@
 
 	strcpy(buf, str);
 
-	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		shm_unlink(SHM_NAME);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/10-1.c
index ff36ab2..2408429 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/10-1.c
@@ -15,6 +15,7 @@
 
 int main()
 {
-        printf("Will not test whether the file offset is set because it is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test whether the file offset is set because it is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/11-1.c
index dac0e83..f50711c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/11-1.c
@@ -21,10 +21,11 @@
 
 #define SHM_NAME "posixtest_11-1"
 
-int main() {
+int main()
+{
 	int fd, flags;
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/12-1.c
index d3edc83..310f934 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/12-1.c
@@ -22,6 +22,7 @@
 
 int main()
 {
-        printf("Will not test the behavior of implementation when an application does not\nspecify exactly one of two values: O_RDONLY and O_RDWR.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the behavior of implementation when an application does not\nspecify exactly one of two values: O_RDONLY and O_RDWR.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/13-1.c
index 1c97c1f..db48694 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/13-1.c
@@ -29,10 +29,11 @@
 #define SHM_NAME "posixtest_13-1"
 #define BUF_SIZE 8
 
-int main() {
+int main()
+{
 	int fd, result;
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/14-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/14-2.c
index ac9bfbd..ee43de5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/14-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/14-2.c
@@ -35,12 +35,13 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_14-2"
 
-int main() {
+int main()
+{
 	int fd;
 	char str[BUF_SIZE] = "qwerty";
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -59,7 +60,7 @@
 
 	strcpy(buf, str);
 
-	fd = shm_open(SHM_NAME, O_RDWR, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/15-1.c
index d32691e..818a37d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/15-1.c
@@ -26,7 +26,8 @@
 
 #define SHM_NAME "posixtest_15-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct stat stat_buf;
 
@@ -38,7 +39,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/16-1.c
index cd5e048..088e70c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/16-1.c
@@ -24,7 +24,8 @@
 
 #define SHM_NAME "posixtest_16-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct stat stat_buf;
 
@@ -36,7 +37,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -55,6 +56,7 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
-	printf("shm_open() does not set the user ID to the effective user ID of the process.\n");
+	printf
+	    ("shm_open() does not set the user ID to the effective user ID of the process.\n");
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/17-1.c
index 56bb698..f290688 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/17-1.c
@@ -24,7 +24,8 @@
 
 #define SHM_NAME "posixtest_17-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct stat stat_buf;
 
@@ -36,7 +37,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -55,6 +56,7 @@
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
-	printf("shm_open() does not set the user ID to the effective user ID of the process.\n");
+	printf
+	    ("shm_open() does not set the user ID to the effective user ID of the process.\n");
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/18-1.c
index 13d7792..f4b1c7d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/18-1.c
@@ -31,12 +31,13 @@
 #define SHM_NAME "posixtest_18-1"
 
 /* execution bits is undefined */
-#define MOD_FLAGS     (S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH) /* -w?rw?r-? */
-#define UMASK_FLAGS   (S_IRGRP | S_IWOTH)                     /* --?r-?-w? */
+#define MOD_FLAGS     (S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)	/* -w?rw?r-? */
+#define UMASK_FLAGS   (S_IRGRP | S_IWOTH)	/* --?r-?-w? */
 #define ALL_MOD_FLAGS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | \
-		       S_IROTH | S_IWOTH)                     /* rw?rw?rw? */
+		       S_IROTH | S_IWOTH)	/* rw?rw?rw? */
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct stat stat_buf;
 
@@ -50,7 +51,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, MOD_FLAGS);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, MOD_FLAGS);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -71,8 +72,7 @@
 	 * are set and thoses of UMASK_FLAGS are not, i.e.:
 	 * ALL_MOD_FLAGS & (stat_buf.st_mode ^ (MOD_FLAGS & ~UMASK_FLAGS)) == 0
 	 */
-	if (!(ALL_MOD_FLAGS &
-	      (stat_buf.st_mode ^ (MOD_FLAGS & ~UMASK_FLAGS)))) {
+	if (!(ALL_MOD_FLAGS & (stat_buf.st_mode ^ (MOD_FLAGS & ~UMASK_FLAGS)))) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/19-1.c
index 7b89aa6..41b4996 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/19-1.c
@@ -17,6 +17,7 @@
 
 int main()
 {
-        printf("Will not test the effect of calling shm_open() when the shared memory object\ndoes not exists, the O_CREAT flags is set, and bits in mode other than the\nfile permission bits are set. It is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the effect of calling shm_open() when the shared memory object\ndoes not exists, the O_CREAT flags is set, and bits in mode other than the\nfile permission bits are set. It is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/2-1.c
index 6bf9744..801f08c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/2-1.c
@@ -17,7 +17,7 @@
 
 int main()
 {
-        printf("Test doesn't exercise requirements; read code comments for "
-		"more details of what isn't tested\n");
-        return PTS_UNTESTED;
+	printf("Test doesn't exercise requirements; read code comments for "
+	       "more details of what isn't tested\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-1.c
index 66eacac..8e83f71 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-1.c
@@ -29,7 +29,8 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_20-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 
 	result = shm_unlink(SHM_NAME);
@@ -40,7 +41,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-2.c
index 8d844f0..1ab5cc2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-2.c
@@ -29,7 +29,8 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_20-2"
 
-int main() {
+int main()
+{
 	int fd, result;
 
 	result = shm_unlink(SHM_NAME);
@@ -40,7 +41,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, 0);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, 0);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-3.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-3.c
index 4a59e99..74e3c3d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-3.c
@@ -29,7 +29,8 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_20-3"
 
-int main() {
+int main()
+{
 	int fd, result;
 	void *ptr;
 
@@ -41,7 +42,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, 0);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, 0);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/21-1.c
index 1cd5fa7..8d4a0bb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/21-1.c
@@ -22,7 +22,8 @@
 
 #define SHM_NAME "posixtest_21-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct stat stat_buf;
 
@@ -34,7 +35,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/22-1.c
index cb47380..c1dc615 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/22-1.c
@@ -21,17 +21,18 @@
 
 #define SHM_NAME "posixtest_22-1"
 
-int main() {
+int main()
+{
 	int fd;
 
 	/* Create the shared memory object */
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 
 	if (fd == -1 && errno == EEXIST) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/23-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/23-1.c
index 46c6153..d42c074 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/23-1.c
@@ -46,8 +46,8 @@
 /* The processes communicate by a shared memory object */
 #define SHM_RESULT_NAME "/result_23-1"
 
-#define NPROCESS 1000 /* Number of concurrent processes */
-#define NLOOP 1000   /* Number of shared memory object */
+#define NPROCESS 1000		/* Number of concurrent processes */
+#define NLOOP 1000		/* Number of shared memory object */
 
 char name[NAME_SIZE];
 int *create_cnt;
@@ -56,30 +56,31 @@
 int child_func(void)
 {
 	int i, fd;
-	struct timespec ts = {.tv_sec = 0, .tv_nsec = 0};
+	struct timespec ts = {.tv_sec = 0,.tv_nsec = 0 };
 	int msec = 0;
 
 	sleep(1);
 	srand(time(NULL));
-	for (i=0; i<NLOOP; i++) {
+	for (i = 0; i < NLOOP; i++) {
 		sprintf(name, SHM_NAME, i);
-		fd = shm_open(name, O_RDONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
-		if (fd != -1)
-		{
+		fd = shm_open(name, O_RDONLY | O_CREAT | O_EXCL,
+			      S_IRUSR | S_IWUSR);
+		if (fd != -1) {
 			sem_wait(sem);
 			//fprintf(stderr, "%d: %d\n", getpid(), *create_cnt);
 			(*create_cnt)++;
 			sem_post(sem);
 		}
 		/* get a random number [0, 20] */
-		msec = (int) (20.0 * rand() / RAND_MAX) ;
+		msec = (int)(20.0 * rand() / RAND_MAX);
 		ts.tv_nsec = msec * 1000000;
 		nanosleep(&ts, NULL);
 	}
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int i, pid, result_fd;
 	char semname[20];
 
@@ -92,8 +93,7 @@
 	sem_unlink(semname);
 
 	result_fd = shm_open(SHM_RESULT_NAME,
-			     O_RDWR|O_CREAT,
-			     S_IRUSR|S_IWUSR);
+			     O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (result_fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -106,7 +106,7 @@
 	}
 
 	create_cnt = mmap(NULL, sizeof(*create_cnt), PROT_WRITE,
-		MAP_SHARED, result_fd, 0);
+			  MAP_SHARED, result_fd, 0);
 	if (create_cnt == MAP_FAILED) {
 		perror("An error occurs when calling mmap()");
 		shm_unlink(SHM_RESULT_NAME);
@@ -115,8 +115,8 @@
 
 	*create_cnt = 0;
 
-	for (i=0; i<NPROCESS; i++) {
-	        pid = fork();
+	for (i = 0; i < NPROCESS; i++) {
+		pid = fork();
 		if (pid == -1) {
 			perror("An error occurs when calling fork()");
 			return PTS_UNRESOLVED;
@@ -126,9 +126,9 @@
 		}
 	}
 
-	while (wait(NULL) > 0);
+	while (wait(NULL) > 0) ;
 
-	for (i=0; i<NLOOP; i++) {
+	for (i = 0; i < NLOOP; i++) {
 		sprintf(name, SHM_NAME, i);
 		shm_unlink(name);
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/24-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/24-1.c
index 511b414..ed4974d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/24-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/24-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the result of shm_open() when O_EXCL is set and O_CREAT is not\nset because it is undefined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the result of shm_open() when O_EXCL is set and O_CREAT is not\nset because it is undefined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/25-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/25-1.c
index 7fd12ce..ab61a26 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/25-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/25-1.c
@@ -31,12 +31,13 @@
 #define SHM_NAME "posixtest_25-1"
 #define SHM_SZ 16
 
-int main() {
+int main()
+{
 	int fd;
 	struct stat stat_buf;
 
 	/* Create the shared memory object */
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -47,7 +48,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		shm_unlink(SHM_NAME);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-1.c
index a3064e6..4971873 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-1.c
@@ -27,12 +27,13 @@
 #define CREATION_MODE S_IRUSR|S_IWUSR
 #define OPEN_MODE     S_IRGRP
 
-int main() {
+int main()
+{
 	int fd;
 	struct stat stat_buf;
 	mode_t old_mode;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, CREATION_MODE);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, CREATION_MODE);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -45,7 +46,7 @@
 	}
 	old_mode = stat_buf.st_mode;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_TRUNC, OPEN_MODE);
+	fd = shm_open(SHM_NAME, O_RDWR | O_TRUNC, OPEN_MODE);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		shm_unlink(SHM_NAME);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-2.c
index f8fe4a2..3f2b5de 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-2.c
@@ -36,7 +36,8 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_26-2"
 
-int main() {
+int main()
+{
 	int fd;
 	struct stat stat_buf;
 	struct passwd *pw;
@@ -44,8 +45,9 @@
 	gid_t old_gid;
 
 	umask(0);
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT,
-		      S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT,
+		      S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH |
+		      S_IWOTH);
 
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
@@ -80,7 +82,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
 		} else {
 			perror("An error occurs when calling seteuid()");
 		}
@@ -88,10 +91,9 @@
 		return PTS_UNRESOLVED;
 	}
 
-	printf("Testing with user '%s' (uid: %i)\n",
-	       pw->pw_name, pw->pw_uid);
+	printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid);
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_TRUNC, 0);
+	fd = shm_open(SHM_NAME, O_RDWR | O_TRUNC, 0);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		seteuid(getuid());
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/27-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/27-1.c
index a405692..c47dd49 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/27-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/27-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the result of shm_open() when using O_TRUNC with O_RDONLY.\nIt is undefined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the result of shm_open() when using O_TRUNC with O_RDONLY.\nIt is undefined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-1.c
index 4f9c067..8507158 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-1.c
@@ -35,12 +35,13 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_28-1"
 
-int main() {
+int main()
+{
 	int fd;
 	char str[BUF_SIZE] = "qwerty";
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -73,9 +74,9 @@
 		return PTS_UNRESOLVED;
 	}
 
-        /* Now, there are no more reference on SHM_NAME but it is not unlink */
+	/* Now, there are no more reference on SHM_NAME but it is not unlink */
 
-	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR | S_IWUSR);
 	if (fd == -1 && errno == ENOENT) {
 		printf("The name of the shared memory object was removed.\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-2.c
index 53b6c5d..3b9acca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-2.c
@@ -35,12 +35,13 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_28-2"
 
-int main() {
+int main()
+{
 	int fd;
 	char str[BUF_SIZE] = "qwerty";
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -52,7 +53,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	buf = mmap(NULL, BUF_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
+	buf = mmap(NULL, BUF_SIZE, PROT_WRITE | PROT_READ, MAP_SHARED, fd, 0);
 	if (buf == MAP_FAILED) {
 		perror("An error occurs when calling mmap()");
 		shm_unlink(SHM_NAME);
@@ -61,17 +62,17 @@
 
 	strcpy(buf, str);
 
-       	if (close(fd) != 0) {
+	if (close(fd) != 0) {
 		perror("An error occurs when calling close()");
 		shm_unlink(SHM_NAME);
 		return PTS_UNRESOLVED;
 	}
 
-	if (shm_unlink(SHM_NAME) !=0) {
+	if (shm_unlink(SHM_NAME) != 0) {
 		perror("An error occurs when calling shm_unlink()");
 		return PTS_UNRESOLVED;
 	}
-        /* Now, SHM_NAME is unlinked and there are no more open references on
+	/* Now, SHM_NAME is unlinked and there are no more open references on
 	   it but a mapping reference remain */
 
 	if (strcmp(buf, str) == 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-3.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-3.c
index ba97f7f..ae35d10 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-3.c
@@ -36,12 +36,13 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_28-3"
 
-int main() {
+int main()
+{
 	int fd;
 	char str[BUF_SIZE] = "qwerty";
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -62,17 +63,17 @@
 
 	strcpy(buf, str);
 
-       	if (munmap(buf, BUF_SIZE) != 0) {
+	if (munmap(buf, BUF_SIZE) != 0) {
 		perror("An error occurs when calling munmap()");
 		shm_unlink(SHM_NAME);
 		return PTS_UNRESOLVED;
 	}
 
-	if (shm_unlink(SHM_NAME) !=0) {
+	if (shm_unlink(SHM_NAME) != 0) {
 		perror("An error occurs when calling shm_unlink()");
 		return PTS_UNRESOLVED;
 	}
-        /* Now, SHM_NAME is unlinked and there are no more mapping references
+	/* Now, SHM_NAME is unlinked and there are no more mapping references
 	   on it but an open reference remain */
 
 	buf = mmap(NULL, BUF_SIZE, PROT_READ, MAP_SHARED, fd, 0);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/29-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/29-1.c
index ccf51b0..ec39c39 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/29-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/29-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test whether the name and shared memory object state remain valid\nafter a system reboot. It is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test whether the name and shared memory object state remain valid\nafter a system reboot. It is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/3-1.c
index e594425..a425389 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/3-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test whether the name appears in the file system and is visible to\nother functions that take pathnames as arguments because it is unspecified.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test whether the name appears in the file system and is visible to\nother functions that take pathnames as arguments because it is unspecified.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/32-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/32-1.c
index 86ea9be..b1d468d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/32-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/32-1.c
@@ -45,7 +45,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -57,18 +58,19 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int fd;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, 0);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, 0);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/34-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/34-1.c
index 4965636..5d0b809 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/34-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/34-1.c
@@ -45,7 +45,8 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -57,18 +58,19 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	int fd;
 
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/36-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/36-1.c
index 023dd76..5664988 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/36-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/36-1.c
@@ -16,7 +16,9 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-int main() {
-	printf("It is very difficult to test that the shm_open() function sets errno = EINTR\nwhen it is interrupted by a signal.\n");
+int main()
+{
+	printf
+	    ("It is very difficult to test that the shm_open() function sets errno = EINTR\nwhen it is interrupted by a signal.\n");
 	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/37-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/37-1.c
index 2e1e38a..e2e8ace 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/37-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/37-1.c
@@ -34,13 +34,15 @@
 	"/",
 	"//",
 	"/abc",
-	NULL};
+	NULL
+};
 
-int main() {
-	int fd, i=0, result = PTS_PASS;
+int main()
+{
+	int fd, i = 0, result = PTS_PASS;
 
 	while (shm_name[i]) {
-	        fflush(stderr);
+		fflush(stderr);
 		printf("Name: '%s'\n", shm_name[i]);
 		fflush(stdout);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/38-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/38-1.c
index 94f6c25..511a7de 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/38-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/38-1.c
@@ -20,11 +20,12 @@
 
 #define SHM_NAME "posixtest_38-1"
 
-int main() {
+int main()
+{
 	int fd = 0, count = 0;
 
 	while (fd != -1) {
-		fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+		fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 		count++;
 	}
 	if (errno == EMFILE) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-1.c
index ef0a732..df8d223 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-1.c
@@ -21,7 +21,8 @@
 #include <stdlib.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int fd, i;
 	long name_max;
 	char *shm_name;
@@ -30,15 +31,15 @@
 	if (name_max == -1) {
 		perror("An error occurs when calling pathconf()");
 		return PTS_UNRESOLVED;
-        }
-	shm_name = malloc(name_max+3);
+	}
+	shm_name = malloc(name_max + 3);
 
 	shm_name[0] = '/';
-	for (i=1; i<name_max+2; i++)
+	for (i = 1; i < name_max + 2; i++)
 		shm_name[i] = 'a';
-	shm_name[name_max+2] = 0;
+	shm_name[name_max + 2] = 0;
 
-	fd = shm_open(shm_name, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(shm_name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 
 	if (fd == -1 && errno == ENAMETOOLONG) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-2.c
index 194764b..3f69203 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-2.c
@@ -27,7 +27,8 @@
 /* Ensure that each component length is short enough */
 #define COMPONENT_SIZE _POSIX_NAME_MAX
 
-int main() {
+int main()
+{
 	int fd, i, path_max;
 	char *shm_name;
 
@@ -35,14 +36,14 @@
 	if (path_max == -1) {
 		perror("An error occurs when calling pathconf()");
 		return PTS_UNRESOLVED;
-        }
-	shm_name = malloc(path_max+1);
+	}
+	shm_name = malloc(path_max + 1);
 
-	for (i=0; i<path_max; i++)
-		shm_name[i] = (i+1)%COMPONENT_SIZE ? 'a' : '/';
+	for (i = 0; i < path_max; i++)
+		shm_name[i] = (i + 1) % COMPONENT_SIZE ? 'a' : '/';
 	shm_name[path_max] = 0;
 
-	fd = shm_open(shm_name, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(shm_name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 
 	if (fd == -1 && errno == ENAMETOOLONG) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/41-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/41-1.c
index e0558a6..a00555c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/41-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/41-1.c
@@ -20,7 +20,8 @@
 
 #define SHM_NAME "posixtest_41-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 
 	result = shm_unlink(SHM_NAME);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/42-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/42-1.c
index 0362bdf..fbf2d88 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/42-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/42-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test that the shm_open() function sets errno to ENOSPC if there is\ninsufficient space for the creation of the new shared memory object.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test that the shm_open() function sets errno to ENOSPC if there is\ninsufficient space for the creation of the new shared memory object.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/5-1.c
index 5f2b856..eedaf7b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/5-1.c
@@ -44,11 +44,12 @@
 
 char str[BUF_SIZE] = "qwerty";
 
-int child_process() {
+int child_process()
+{
 	int fd;
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		kill(getppid(), SIGUSR1);
@@ -73,7 +74,8 @@
 	return PTS_PASS;
 }
 
-int main() {
+int main()
+{
 	int fd, child_pid;
 	char *buf;
 
@@ -87,7 +89,7 @@
 
 	wait(NULL);
 
-	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/6-1.c
index 7e302f4..fb47c31 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/6-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the effect of a name which does not begin with the slash\ncharacter because it is implementation-defined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the effect of a name which does not begin with the slash\ncharacter because it is implementation-defined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/7-1.c
index 5d51340..ee56dcb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/7-1.c
@@ -16,6 +16,7 @@
 
 int main()
 {
-        printf("Will not test the interpretation of slash characters other than the leading\nslash character in name because it is implementation-defined.\n");
-        return PTS_UNTESTED;
+	printf
+	    ("Will not test the interpretation of slash characters other than the leading\nslash character in name because it is implementation-defined.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/8-1.c
index c3c6740..19ff907 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/8-1.c
@@ -33,7 +33,8 @@
 
 #define SHM_NAME "posixtest_8-1"
 
-int main() {
+int main()
+{
 	int fd1, fd2;
 	char path[25] = "/tmp/posixtestXXXXXX";
 
@@ -43,7 +44,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR);
+	fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd2 == -1) {
 		perror("An error occurs when calling shm_open()");
 		unlink(path);
@@ -53,7 +54,7 @@
 	unlink(path);
 	shm_unlink(SHM_NAME);
 
-	if (fd2 == (fd1+1)) {
+	if (fd2 == (fd1 + 1)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/9-1.c
index a3e13c9..23c75aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_open/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_open/9-1.c
@@ -16,6 +16,6 @@
 
 int main()
 {
-        printf("Will not test that the open file description is new.\n");
-        return PTS_UNTESTED;
+	printf("Will not test that the open file description is new.\n");
+	return PTS_UNTESTED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/1-1.c
index 98315ff..6f8c612 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/1-1.c
@@ -21,10 +21,11 @@
 
 #define SHM_NAME "posixtest_1-1"
 
-int main() {
+int main()
+{
 	int fd;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c
index 997d5f5..c6352bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c
@@ -20,18 +20,19 @@
 #include <stdlib.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 	int result, i;
 	long name_max;
 	char *shm_name;
 
 	name_max = pathconf("/", _PC_NAME_MAX);
-	shm_name = malloc(name_max+3);
+	shm_name = malloc(name_max + 3);
 
 	shm_name[0] = '/';
-	for (i=1; i<name_max+2; i++)
+	for (i = 1; i < name_max + 2; i++)
 		shm_name[i] = 'a';
-	shm_name[name_max+2] = 0;
+	shm_name[name_max + 2] = 0;
 
 	result = shm_unlink(shm_name);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c
index f6fe068..22dacc4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c
@@ -27,7 +27,8 @@
 /* Ensure that each component length is short enough */
 #define COMPONENT_SIZE _POSIX_NAME_MAX
 
-int main() {
+int main()
+{
 	int result, i, path_max;
 	char *shm_name;
 
@@ -35,12 +36,12 @@
 	if (path_max == -1) {
 		perror("An error occurs when calling pathconf()");
 		return PTS_UNRESOLVED;
-        }
-	shm_name = malloc(path_max+1);
+	}
+	shm_name = malloc(path_max + 1);
 
-	for (i=0; i<path_max; i++)
-		shm_name[i] = (i+1)%COMPONENT_SIZE ? 'a' : '/';
-	shm_name[path_max+1] = 0;
+	for (i = 0; i < path_max; i++)
+		shm_name[i] = (i + 1) % COMPONENT_SIZE ? 'a' : '/';
+	shm_name[path_max + 1] = 0;
 
 	result = shm_unlink(shm_name);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/11-1.c
index b7685d9..274ad36 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/11-1.c
@@ -18,7 +18,8 @@
 
 #define SHM_NAME "posixtest_11-1"
 
-int main() {
+int main()
+{
 	int result;
 
 	/* Ensure that the name SHM_NAME is removed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/2-1.c
index 41ab604..5ddc1ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/2-1.c
@@ -21,10 +21,11 @@
 
 #define SHM_NAME "posixtest_2-1"
 
-int main() {
+int main()
+{
 	int fd;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/3-1.c
index 993ca93..544a850 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/3-1.c
@@ -28,11 +28,12 @@
 #define BUF_SIZE 8
 #define SHM_NAME "posixtest_3-1"
 
-int main() {
+int main()
+{
 	int fd;
 	char *buf;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -48,7 +49,7 @@
 		perror("An error occurs when calling shm_unlink()");
 		return PTS_UNRESOLVED;
 	}
-        /* Now, SHM_NAME is unlinked but there are open references on it */
+	/* Now, SHM_NAME is unlinked but there are open references on it */
 
 	buf = mmap(NULL, BUF_SIZE, PROT_READ, MAP_SHARED, fd, 0);
 	if (buf == MAP_FAILED && errno == EBADF) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/5-1.c
index 60b4555..96ced1a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/5-1.c
@@ -21,10 +21,11 @@
 
 #define SHM_NAME "posixtest_5-1"
 
-int main() {
+int main()
+{
 	int fd;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -35,7 +36,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 	if (fd == -1 && errno == EEXIST) {
 		printf("shm_open() can not create a new object.\n");
 		return PTS_FAIL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/6-1.c
index f3f3b3f..29067ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/6-1.c
@@ -18,10 +18,11 @@
 
 #define SHM_NAME "posixtest_6-1"
 
-int main() {
+int main()
+{
 	int fd;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/8-1.c
index 5c3518d..65f6d99 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/8-1.c
@@ -34,12 +34,13 @@
 #define SHM_NAME "posixtest_9-1"
 #define BUF_SIZE 8
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct passwd *pw;
 	struct stat stat_before, stat_after;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -70,15 +71,15 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling seteuid()");
 		return PTS_UNRESOLVED;
 	}
 
-	printf("Testing with user '%s' (uid: %i)\n",
-	       pw->pw_name, pw->pw_uid);
+	printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid);
 
 	result = shm_unlink(SHM_NAME);
 	if (result == 0) {
@@ -95,9 +96,9 @@
 	}
 
 	if (stat_after.st_uid != stat_before.st_uid ||
-	   stat_after.st_gid != stat_before.st_gid ||
-	   stat_after.st_size != stat_before.st_size ||
-	   stat_after.st_mode != stat_before.st_mode) {
+	    stat_after.st_gid != stat_before.st_gid ||
+	    stat_after.st_size != stat_before.st_size ||
+	    stat_after.st_mode != stat_before.st_mode) {
 		printf("The shared memory object has changed.\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/9-1.c
index 868e82b..59bc830 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/9-1.c
@@ -33,11 +33,12 @@
 
 #define SHM_NAME "posixtest_9-1"
 
-int main() {
+int main()
+{
 	int fd, result;
 	struct passwd *pw;
 
-	fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
+	fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 	if (fd == -1) {
 		perror("An error occurs when calling shm_open()");
 		return PTS_UNRESOLVED;
@@ -56,18 +57,18 @@
 
 	if (seteuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
+			printf
+			    ("You don't have permission to change your UID.\nTry to rerun this test as root.\n");
 			return PTS_UNRESOLVED;
 		}
 		perror("An error occurs when calling seteuid()");
 		return PTS_UNRESOLVED;
 	}
 
-	printf("Testing with user '%s' (uid: %i)\n",
-	       pw->pw_name, pw->pw_uid);
+	printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid);
 
 	result = shm_unlink(SHM_NAME);
-	if (result == -1&& errno == EACCES) {
+	if (result == -1 && errno == EACCES) {
 		printf("Test PASSED\n");
 		seteuid(getuid());
 		shm_unlink(SHM_NAME);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-1.c
index 8b77ccb..3bc1fab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-1.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-10.c
index a6eec6c..2868604 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-10.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-11.c
index 5d718a3..e9d86b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-11.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-12.c
index b644233..0eb2f04 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-12.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-13.c
index b128d14..788b338 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-13.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-14.c
index 6826183..716ae65 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-14.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-15.c
index 581c52e..e3c8698 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-15.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-16.c
index a528293..ba52260 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-16.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-17.c
index 69c3d4c..2c91922 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-17.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-18.c
index 3abcf50..af56fd1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-18.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-19.c
index c4a4745..d16ec4d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-19.c
@@ -38,7 +38,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-2.c
index 3abcf50..af56fd1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-2.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-20.c
index 4f6ad58..6ad4a7a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-20.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-21.c
index 8057da4..dd330bc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-21.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-22.c
index 19551e7..24aed30 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-22.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-23.c
index d84785c..066a2a5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-23.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-24.c
index 0e45cf2..3cdd39b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-24.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-25.c
index 9f6aef9..b2f4751 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-25.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-26.c
index 93cc212..9cbd8e1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-26.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-3.c
index 488b2d3..2883195 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-3.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-4.c
index 1478be1..1ff9bfa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-4.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-5.c
index 4899a7f..5b4bfd8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-5.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-6.c
index f6acfe2..2c8af86 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-6.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-7.c
index 76e55b1..d161f27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-7.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-8.c
index 182ede6..65d55d9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-8.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-9.c
index 39ed2f6..bd0d94d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/1-9.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
index 2480f99..1e729f4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/10-1.c
@@ -22,19 +22,19 @@
 int child_continued = 0;
 int notification;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
-		if (!info)
+	if (!info)
 		return;
 
-		notification = info->si_code;
+	notification = info->si_code;
 
-		switch (notification) {
-		case CLD_STOPPED:
+	switch (notification) {
+	case CLD_STOPPED:
 		printf("Child has been stopped\n");
 		child_stopped++;
 		break;
-		case CLD_CONTINUED:
+	case CLD_CONTINUED:
 		printf("Child has been continued\n");
 		child_continued++;
 		break;
@@ -43,14 +43,14 @@
 
 void wait_for_notification(int val)
 {
- struct timeval tv;
+	struct timeval tv;
 
- while (notification != val) {
- tv.tv_sec = 1;
- tv.tv_usec = 0;
- if (!select(0, NULL, NULL, NULL, &tv))
- break;
- }
+	while (notification != val) {
+		tv.tv_sec = 1;
+		tv.tv_usec = 0;
+		if (!select(0, NULL, NULL, NULL, &tv))
+			break;
+	}
 }
 
 int main(void)
@@ -62,7 +62,7 @@
 	act.sa_sigaction = handler;
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
-	sigaction(SIGCHLD,  &act, 0);
+	sigaction(SIGCHLD, &act, 0);
 
 	if ((pid = fork()) == 0) {
 		/* child */
@@ -85,9 +85,9 @@
 			kill(pid, SIGSTOP);
 
 			/*
-			  Don't let the kernel optimize away queued
-			  SIGSTOP/SIGCONT signals.
-			*/
+			   Don't let the kernel optimize away queued
+			   SIGSTOP/SIGCONT signals.
+			 */
 
 			wait_for_notification(CLD_STOPPED);
 
@@ -95,10 +95,10 @@
 			notification = 0;
 			kill(pid, SIGCONT);
 			/*
-			 SIGCHLD doesn't queue, make sure CLD_CONTINUED
-			 doesn't mask the next CLD_STOPPED
+			   SIGCHLD doesn't queue, make sure CLD_CONTINUED
+			   doesn't mask the next CLD_STOPPED
 			 */
-			 wait_for_notification(CLD_CONTINUED);
+			wait_for_notification(CLD_CONTINUED);
 		}
 
 		/* POSIX specifies default action to be abnormal termination */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
index 11137bd..1efa2e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/11-1.c
@@ -30,7 +30,7 @@
 int child_continued = 0;
 int waiting = 1;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	if (info && info->si_code == CLD_CONTINUED) {
 		printf("Child has been stopped\n");
@@ -48,7 +48,7 @@
 	act.sa_sigaction = handler;
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
-	sigaction(SIGCHLD,  &act, 0);
+	sigaction(SIGCHLD, &act, 0);
 
 	if ((pid = fork()) == 0) {
 		/* child */
@@ -76,9 +76,9 @@
 			kill(pid, SIGSTOP);
 
 			/*
-			  Don't let the kernel optimize away queued
-			  SIGSTOP/SIGCONT signals.
-			*/
+			   Don't let the kernel optimize away queued
+			   SIGSTOP/SIGCONT signals.
+			 */
 			tv.tv_sec = 1;
 			tv.tv_usec = 0;
 			select(0, NULL, NULL, NULL, &tv);
@@ -102,22 +102,24 @@
 
 	if (child_continued == NUMSTOPS) {
 		printf("Test PASSED\n");
-		printf("In the section of the POSIX spec that describes the SA_NOCLDSTOP flag in the sigaction() interface "
-			"it is specified that if the SA_NOCLDSTOP flag is not set in sa_flags, then a SIGCHLD and a SIGCHLD "
-			"signal **MAY** be generated for the calling process whenever any of its stopped child processes are continued. "
-			"Because of that, this test will PASS either way, but note that the signals implementation you are currently "
-			"run this test on DOES choose to send a SIGCHLD signal whenever any of its stopped child processes are "
-			"continued. Again, this is not a bug because of the existence of the word *MAY* in the spec.\n");
+		printf
+		    ("In the section of the POSIX spec that describes the SA_NOCLDSTOP flag in the sigaction() interface "
+		     "it is specified that if the SA_NOCLDSTOP flag is not set in sa_flags, then a SIGCHLD and a SIGCHLD "
+		     "signal **MAY** be generated for the calling process whenever any of its stopped child processes are continued. "
+		     "Because of that, this test will PASS either way, but note that the signals implementation you are currently "
+		     "run this test on DOES choose to send a SIGCHLD signal whenever any of its stopped child processes are "
+		     "continued. Again, this is not a bug because of the existence of the word *MAY* in the spec.\n");
 		return PTS_PASS;
 	}
 
 	printf("Test PASSED\n");
 
-	printf("In the section of the POSIX spec that describes the SA_NOCLDSTOP flag in the sigaction() interface "
-		"it is specified that if the SA_NOCLDSTOP flag is not set in sa_flags, then a SIGCHLD and a SIGCHLD "
-		"signal **MAY** be generated for the calling process whenever any of its stopped child processes are continued. "
-		"Because of that, this test will PASS either way, but note that the signals implementation you are currently "
-		"run this test on chooses NOT TO send a SIGCHLD signal whenever any of its stopped child processes are "
-		"continued. Again, this is not a bug because of the existence of the word *MAY* in the spec.\n");
+	printf
+	    ("In the section of the POSIX spec that describes the SA_NOCLDSTOP flag in the sigaction() interface "
+	     "it is specified that if the SA_NOCLDSTOP flag is not set in sa_flags, then a SIGCHLD and a SIGCHLD "
+	     "signal **MAY** be generated for the calling process whenever any of its stopped child processes are continued. "
+	     "Because of that, this test will PASS either way, but note that the signals implementation you are currently "
+	     "run this test on chooses NOT TO send a SIGCHLD signal whenever any of its stopped child processes are "
+	     "continued. Again, this is not a bug because of the existence of the word *MAY* in the spec.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
index ec92032..4dd2ddc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGABRT\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
index 390bdf2..f0a9b8f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGPIPE\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
index 502db42..2cc33d3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGQUIT\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
index b0142b6..154ab2b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGSEGV\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
index 2115c48..062ac5c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGTERM\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
index 0aa3be8..6fcea06 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGTSTP\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
index c3fed1a..0f341e8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGTTIN\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
index fddb916..88f3b8b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGTTOU\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
index 6c20780..566c4f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGUSR1\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
index af9effc..5305f0d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
index af9effc..5305f0d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
index af9effc..5305f0d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
index 5e9ce22..e433654 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGPROF\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
index 0ddbb48..a2d0a48 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGSYS\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
index c477e67..62ef8e1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGTRAP\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
index 2ee107d..fc1fa24 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGURG\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
index 788e970..695cea4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGVTALRM\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
index 2a444fe..49749cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGXCPU\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
index a3554db..674198d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGXFSZ\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
index 0223b68..153ed19 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGABRT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
index ff2126b..1d75113 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
index 147142a..b539b52 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGBUS\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
index 56d6f25..7cd2aab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGBUS\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
index 235b702..29bf822 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGCHLD\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
index dd0b3bc..d76b5d0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGCONT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
index 5718997..f620208 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGFPE\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
index d1d4bbe..9ccacd8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGHUP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
index 779fe9e..ab1dee8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGILL\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
index 7f7d89a..1ec5220 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGINT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
index 5041108..7e82b1b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGPIPE\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
index 943d7f6..6fa3a8a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGQUIT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
index 5e1df70..a66cd4d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGSEGV\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
index 9c31bf4..32f630a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGTERM\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
index 4aafdc4..5160aec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGCHLD\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
index ea4a532..772f4fb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGTSTP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
index 470918a..f591872 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGTTIN\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
index 3b5a874..243830f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGTTOU\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
index 396670d..fe49040 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGUSR1\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
index ff2126b..1d75113 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
index ff2126b..1d75113 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
index 59b35e3..5c9f418 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGPROF\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
index 09285e6..8fbf830 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGSYS\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
index 1aba9b9..d187882 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGTRAP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
index 4d2225b..7282d98 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGURG\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
index 219d69c..0d2d5b6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGCONT\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
index f038fa6..f508593 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGVTALRM\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
index 83ae508..ae0ad34 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGXCPU\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
index c680138..26a9f24 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
@@ -29,7 +29,7 @@
 
 	printf("Caught SIGXFSZ\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -48,13 +48,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
index 4f66b87..d983059 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGFPE\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
index 361c89d..72b29f1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGHUP\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
index 903e11a..924477e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGILL\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
index 849f9a3..8ff7ca3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
@@ -31,7 +31,7 @@
 
 	printf("Caught SIGINT\n");
 
-	if (sigaltstack((stack_t *)0, &ss) == -1) {
+	if (sigaltstack((stack_t *) 0, &ss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -50,7 +50,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = SA_ONSTACK;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -64,7 +64,7 @@
 	alt_ss.ss_size = SIGSTKSZ;
 	alt_ss.ss_flags = 0;
 
-	if (sigaltstack(&alt_ss, (stack_t *)0) == -1) {
+	if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
index 2a6f19d..42ace72 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGABRT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
index 804798d..66d25d0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGPIPE\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
index 14620b3..c53d96f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGQUIT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
index d39c076..92f8791 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGSEGV\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
index 23699ff..fc164dd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGTERM\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
index acb828c..1d3910a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGTSTP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
index fff07b8..ac75b6e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGTTIN\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
index fe28cfd..e2d9aae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGTTOU\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
index e8b4d48..9b37964 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGUSR1\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
index c931894..ffaf133 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
index c931894..ffaf133 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
index c931894..ffaf133 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGUSR2\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
index 4099f3f..e9e5924 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGPROF\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
index 7586b56..5708b84 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGSYS\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
index 8faadff..a8e8e3c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGTRAP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
index 599e695..7a6f0cd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGURG\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
index 102fc76..2fafdda 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGVTALRM\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
index 5bf41c5..13d6db6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGXCPU\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
index f770ed8..46c44cf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGXFSZ\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
index 959bb67..f6a132d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGBUS\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
index fecc791..5f681f8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGCHLD\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
index 22b3a61..8aa46c3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGCONT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
index 4a9bd40..cf73795 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGFPE\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
index 18251fb..8824a48 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGHUP\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
index 74eacb5..e45d481 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGILL\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
index c5803e0..aa4e386 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
@@ -30,7 +30,7 @@
 
 	printf("Caught SIGINT\n");
 
-	if (sigaltstack((stack_t *)0, &oss) == -1) {
+	if (sigaltstack((stack_t *) 0, &oss) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		exit(-1);
@@ -49,13 +49,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current) == -1) {
+	if (sigaltstack((stack_t *) 0, &current) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c
index f458e1b..530b5b6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c
@@ -40,7 +40,6 @@
 #include <errno.h>
 #include <posixtest.h>
 
-
 /*
  * Define an array of signals we want to test against.
  * Add more if desired.
@@ -82,7 +81,7 @@
 	{SIGPROF, "SIGPROF", 0},
 	{SIGWINCH, "SIGWINCH", 0},
 	{SIGPOLL, "SIGPOLL", 0},
-	{-1, NULL, 0}  /* add  real time sigs? */
+	{-1, NULL, 0}		/* add  real time sigs? */
 };
 
 static int ready;
@@ -116,7 +115,7 @@
 {
 	int rc;
 	int status = PTS_PASS;
-	struct sched_param sp = {10};
+	struct sched_param sp = { 10 };
 	struct sig_info *s = arg;
 
 	/*
@@ -139,12 +138,12 @@
 	if (rc) {
 		status = PTS_UNRESOLVED;
 		printf("Failed: sem_wait(): errno: %s signal: %s\n",
-				strerror(errno), s->sig_name);
+		       strerror(errno), s->sig_name);
 		if (errno == EINTR)
 			status = PTS_FAIL;
 	}
 
-	return (void *)((long) status);
+	return (void *)((long)status);
 }
 
 int test_sig(struct sig_info *s)
@@ -199,13 +198,13 @@
 
 	sem_destroy(&sem);
 
-	status = ((long) thread_status) & 0xFFFFFFFF;
+	status = ((long)thread_status) & 0xFFFFFFFF;
 
 	return status;
 
 done:
 	printf("Failed: func: %s, rc: %d errno: %s signal: %s\n",
-			label, rc, strerror(errno), s->sig_name);
+	       label, rc, strerror(errno), s->sig_name);
 	return status;
 }
 
@@ -240,6 +239,6 @@
 
 done:
 	printf("Failed: sigaction(): errno: %s, signal: %s\n",
-			strerror(errno), s->sig_name);
+	       strerror(errno), s->sig_name);
 	return PTS_FAIL;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-1.c
index fb253b8..197cb68 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-1.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGABRT,  &act, 0);
+		sigaction(SIGABRT, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-10.c
index c094164..334b24e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-10.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGPIPE,  &act, 0);
+		sigaction(SIGPIPE, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-11.c
index ba4b635..918cb5d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-11.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGQUIT,  &act, 0);
+		sigaction(SIGQUIT, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-12.c
index 247f9ad..595c97f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-12.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGSEGV,  &act, 0);
+		sigaction(SIGSEGV, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-13.c
index ef1a0e5..2b92deb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-13.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGTERM,  &act, 0);
+		sigaction(SIGTERM, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-14.c
index 271d191..9d7050e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-14.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGTSTP,  &act, 0);
+		sigaction(SIGTSTP, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-15.c
index 9d5bfda..5043a37 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-15.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGTTIN,  &act, 0);
+		sigaction(SIGTTIN, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-16.c
index 437c7b4..1a055e6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-16.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGTTOU,  &act, 0);
+		sigaction(SIGTTOU, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-17.c
index 00d061c..88d3574 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-17.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGUSR1,  &act, 0);
+		sigaction(SIGUSR1, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-18.c
index 5c4a7fd..499f54b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-18.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGUSR2,  &act, 0);
+		sigaction(SIGUSR2, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-19.c
index ac601e7..1f90529 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-19.c
@@ -44,12 +44,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGALRM,  &act, 0);
+		sigaction(SIGALRM, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -73,7 +73,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-2.c
index eaaad47..e43dedf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-2.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGALRM,  &act, 0);
+		sigaction(SIGALRM, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-20.c
index c958fc0..c69bd43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-20.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGPROF,  &act, 0);
+		sigaction(SIGPROF, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-21.c
index 4363f60..c2c0994 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-21.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGSYS,  &act, 0);
+		sigaction(SIGSYS, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-22.c
index dc05a5d..102e32a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-22.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGTRAP,  &act, 0);
+		sigaction(SIGTRAP, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-23.c
index a35c9ac..742b87b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-23.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGURG,  &act, 0);
+		sigaction(SIGURG, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-24.c
index a054111..e321073 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-24.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGVTALRM,  &act, 0);
+		sigaction(SIGVTALRM, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-25.c
index a5f080d..584535f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-25.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGXCPU,  &act, 0);
+		sigaction(SIGXCPU, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-26.c
index f09d980..8317b5e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-26.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGXFSZ,  &act, 0);
+		sigaction(SIGXFSZ, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-3.c
index a8f6f06..84a3a0c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-3.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGBUS,  &act, 0);
+		sigaction(SIGBUS, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-4.c
index f87c266..034bb22 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-4.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGCHLD,  &act, 0);
+		sigaction(SIGCHLD, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-5.c
index aef0006..166db3b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-5.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGCONT,  &act, 0);
+		sigaction(SIGCONT, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-6.c
index 2fea93f..c9901a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-6.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGFPE,  &act, 0);
+		sigaction(SIGFPE, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-7.c
index 17dc160..dadbcf8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-7.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGHUP,  &act, 0);
+		sigaction(SIGHUP, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-8.c
index 6ffc09b..51f4dfe 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-8.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGILL,  &act, 0);
+		sigaction(SIGILL, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-9.c
index e440020..a4f3ef4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/17-9.c
@@ -45,12 +45,12 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		sigaction(SIGINT,  &act, 0);
+		sigaction(SIGINT, &act, 0);
 
 		while (wakeup == 1) {
 			tv.tv_sec = 3;
 			tv.tv_usec = 0;
-			if (select(0, NULL, NULL, NULL, &tv)== -1 &&
+			if (select(0, NULL, NULL, NULL, &tv) == -1 &&
 			    errno == EINTR) {
 				perror("select");
 				return PTS_PASS;
@@ -74,7 +74,7 @@
 		   problem is that it would be perfectly legal for a
 		   POSIX conformant OS to not schedule the child process
 		   for a long time.)
-		*/
+		 */
 		tv.tv_sec = 1;
 		tv.tv_usec = 0;
 		select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c
index d8c99b7..123db49 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGABRT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGABRT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c
index 793e05e..8b9ff36 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPIPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPIPE");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c
index bc03c3f..77b3fcd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGQUIT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGQUIT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-12.c
index 255d1b7..26876c6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-12.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSEGV */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSEGV");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-13.c
index 24de87e..97f8f7c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-13.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTERM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTERM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-14.c
index 3480fcd..4029fbd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-14.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTSTP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTSTP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-15.c
index 9310d37..3b0658e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-15.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTIN */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTIN");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-16.c
index 60dff17..8a02c88 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-16.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTOU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTOU");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-17.c
index c3d0140..316b520 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-17.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR1 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR1");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-18.c
index 08c395f..debc668 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-18.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR2 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR2");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-19.c
index 5f84fa9..e52208c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-19.c
@@ -92,34 +92,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR2 */
 	ret = sigaction(SIGUSR2, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGUSR2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR2");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-2.c
index 85d14f1..81fc138 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-2.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGALRM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-20.c
index 255148c..6884e50 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-20.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPROF */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPROF");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-21.c
index 50fe5ca..052e44d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-21.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSYS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSYS");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-22.c
index 70628bd..f2ff69e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-22.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTRAP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTRAP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-23.c
index 4c5247f..b0faba0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-23.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGURG */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGURG");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-24.c
index 535ca97..c1d9ef9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-24.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGVTALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGVTALRM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-25.c
index ec52767..f736655 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-25.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXCPU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXCPU");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-26.c
index 10e440c..062ae1c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-26.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXFSZ */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXFSZ");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-3.c
index d07bb16..a8f25ca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-3.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGBUS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGBUS");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-4.c
index 3f320f9..49d8c6d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-4.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCHLD */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCHLD");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-5.c
index e5043d4..83baba9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-5.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCONT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCONT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-6.c
index b3c8291..facf39b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-6.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGFPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGFPE");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-7.c
index 66b3582..dac3359 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-7.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGHUP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGHUP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-8.c
index 910722e..ff04d57 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-8.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGILL */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGILL");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-9.c
index a53cc1a..fba813d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-9.c
@@ -101,34 +101,31 @@
 	sa.sa_handler = handler;
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGINT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGINT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-1.c
index 7ddad9f..1802879 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-1.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGABRT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGABRT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-10.c
index c373cd2..d0526a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-10.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPIPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPIPE");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-11.c
index d0532e2..8a63873 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-11.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGQUIT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGQUIT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-12.c
index 4723cb6..007fb43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-12.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSEGV */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSEGV");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-13.c
index bafc0d6..b1a1002 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-13.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTERM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTERM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-14.c
index 1f12af3..880e0a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-14.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTSTP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTSTP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-15.c
index 92fb219..fa8dbe2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-15.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTIN */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTIN");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-16.c
index 0c2fdcc..aa252cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-16.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTOU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTOU");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-17.c
index dc2aa2c..313bc99 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-17.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR1 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR1");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-18.c
index 2e8f4b4..c0ef759 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-18.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR2 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR2");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-19.c
index 63cf78b..e9971e5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-19.c
@@ -73,10 +73,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -97,8 +96,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -109,34 +107,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGALRM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-2.c
index b5b0348..c01a11b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-2.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGALRM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-20.c
index 8078105..960dd1e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-20.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPROF */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPROF");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-21.c
index 1e008ab..6f02fca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-21.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSYS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSYS");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-22.c
index 6a6a87d..9fc5810 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-22.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTRAP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTRAP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-23.c
index 5aa0bb1..4d61669 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-23.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGURG */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGURG");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-24.c
index 4192672..77547c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-24.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGVTALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGVTALRM");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-25.c
index 44bf697..1a85e11 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-25.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXCPU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXCPU");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-26.c
index e3b90c3..ef121d8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-26.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXFSZ */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXFSZ");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-3.c
index b29ff84..d26e7d2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-3.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGBUS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGBUS");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-4.c
index 906ef20..5981800 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-4.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCHLD */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCHLD");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-5.c
index 9864684..e818b83 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-5.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCONT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCONT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-6.c
index 1761b03..8cea00f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-6.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGFPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGFPE");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-7.c
index 0e892a7..372c304 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-7.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGHUP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGHUP");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-8.c
index 2530617..60d9657 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-8.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGILL */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGILL");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-9.c
index 140a36d..360d204 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/19-9.c
@@ -82,10 +82,9 @@
 /******************************************************************************/
 
 int called = 0;
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGNAL)
-	{
+	if (info->si_signo != SIGNAL) {
 		FAILED("Wrong signal generated?");
 	}
 
@@ -106,8 +105,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -118,34 +116,31 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGINT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
-	if (called)
-	{
-		FAILED("The signal handler has been called when no signal was raised");
+	if (called) {
+		FAILED
+		    ("The signal handler has been called when no signal was raised");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGINT");
 	}
 
-	if (!called)
-	{
-		FAILED("the sa_handler was not called whereas SA_SIGINFO was not set");
+	if (!called) {
+		FAILED
+		    ("the sa_handler was not called whereas SA_SIGINFO was not set");
 	}
 
 	/* Test passed */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-1.c
index 680c81a..4795bcc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-1.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, &oact) == -1) {
+	if (sigaction(SIGABRT, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-10.c
index 8d5b0be..98c5b23 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-10.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, &oact) == -1) {
+	if (sigaction(SIGPIPE, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-11.c
index 63175cb..1a9611f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-11.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, &oact) == -1) {
+	if (sigaction(SIGQUIT, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-12.c
index 6ee4538..b359e1a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-12.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, &oact) == -1) {
+	if (sigaction(SIGSEGV, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-13.c
index a47fe1d..292014e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-13.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, &oact) == -1) {
+	if (sigaction(SIGTERM, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-14.c
index f9aaa34..240a085 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-14.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, &oact) == -1) {
+	if (sigaction(SIGTSTP, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-15.c
index 42cfcf1..b40cf1a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-15.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, &oact) == -1) {
+	if (sigaction(SIGTTIN, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-16.c
index 2f09139..11eabdf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-16.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, &oact) == -1) {
+	if (sigaction(SIGTTOU, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-17.c
index 992bb6d..168d6bf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-17.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, &oact) == -1) {
+	if (sigaction(SIGUSR1, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-18.c
index 04b2a56..30e32eb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-18.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, &oact) == -1) {
+	if (sigaction(SIGUSR2, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-19.c
index 451cefd..939a57d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-19.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGALRM,  &act, &oact) == -1) {
+	if (sigaction(SIGALRM, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-2.c
index 451cefd..939a57d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-2.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGALRM,  &act, &oact) == -1) {
+	if (sigaction(SIGALRM, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-20.c
index 4d0a875..f6b5cda 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-20.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, &oact) == -1) {
+	if (sigaction(SIGPROF, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-21.c
index 4feeda6..c27795f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-21.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, &oact) == -1) {
+	if (sigaction(SIGSYS, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-22.c
index 4296ee7..f34a24b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-22.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, &oact) == -1) {
+	if (sigaction(SIGTRAP, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-23.c
index 0d18edd..9e7fdfd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-23.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, &oact) == -1) {
+	if (sigaction(SIGURG, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-24.c
index b6125a0..adc5da1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-24.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, &oact) == -1) {
+	if (sigaction(SIGVTALRM, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-25.c
index 81a001c..638e645 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-25.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, &oact) == -1) {
+	if (sigaction(SIGXCPU, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-26.c
index 024ffbb..02d9412 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-26.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, &oact) == -1) {
+	if (sigaction(SIGXFSZ, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-3.c
index 14aafee..2cd7be5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-3.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, &oact) == -1) {
+	if (sigaction(SIGBUS, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-4.c
index d4d841d..ecd557e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-4.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, &oact) == -1) {
+	if (sigaction(SIGCHLD, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-5.c
index ffff065..2078e60 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-5.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, &oact) == -1) {
+	if (sigaction(SIGCONT, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-6.c
index cb95b11..25af009 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-6.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, &oact) == -1) {
+	if (sigaction(SIGFPE, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-7.c
index 2278881..747886a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-7.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, &oact) == -1) {
+	if (sigaction(SIGHUP, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-8.c
index 381c456..1172b5f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-8.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, &oact) == -1) {
+	if (sigaction(SIGILL, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-9.c
index 85dd252..cace11b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/2-9.c
@@ -39,7 +39,7 @@
 	act.sa_handler = handler1;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
@@ -47,15 +47,15 @@
 
 	act.sa_handler = handler2;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, &oact) == -1) {
+	if (sigaction(SIGINT, &act, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (oact.sa_handler == handler1) {
-	  printf("Test PASSED\n");
-	  return PTS_PASS;
+		printf("Test PASSED\n");
+		return PTS_PASS;
 	}
 
 	printf("Test Failed\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/21-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/21-1.c
index f619ea3..1b581a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/21-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/21-1.c
@@ -22,18 +22,18 @@
 int main()
 {
 
-        /* Make sure this flag is supported. */
-        #ifndef SA_NOCLDWAIT
-          fprintf(stderr,"SA_NOCLWAIT flag is not available for testing\n");
-          return PTS_UNSUPPORTED;
-        #endif
+	/* Make sure this flag is supported. */
+#ifndef SA_NOCLDWAIT
+	fprintf(stderr, "SA_NOCLWAIT flag is not available for testing\n");
+	return PTS_UNSUPPORTED;
+#endif
 
 	struct sigaction act;
 
 	act.sa_handler = handler;
 	act.sa_flags = SA_NOCLDWAIT;
 	sigemptyset(&act.sa_mask);
-	sigaction(SIGCHLD,  &act, 0);
+	sigaction(SIGCHLD, &act, 0);
 
 	if (fork() == 0) {
 		/* child */
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-1.c
index a156da7..5a8ede8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-1.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGABRT,  &act, 0) == -1) {
+		if (sigaction(SIGABRT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-10.c
index b2d4dae..6805e98 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-10.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGPIPE,  &act, 0) == -1) {
+		if (sigaction(SIGPIPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-11.c
index 0961b44..0760f68 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-11.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGQUIT,  &act, 0) == -1) {
+		if (sigaction(SIGQUIT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-12.c
index 480e680..c2dd7e4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-12.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGSEGV,  &act, 0) == -1) {
+		if (sigaction(SIGSEGV, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-13.c
index c51f2f4..dfb3702 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-13.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTERM,  &act, 0) == -1) {
+		if (sigaction(SIGTERM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-14.c
index dff2fe0..a2c2adf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-14.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTSTP,  &act, 0) == -1) {
+		if (sigaction(SIGTSTP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-15.c
index d05f2cb..51104f8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-15.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTTIN,  &act, 0) == -1) {
+		if (sigaction(SIGTTIN, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-16.c
index f0786fb..00b1dc9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-16.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTTOU,  &act, 0) == -1) {
+		if (sigaction(SIGTTOU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-17.c
index 3e2004f..0cb058d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-17.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR1,  &act, 0) == -1) {
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-18.c
index be9dc23..89d9d63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-18.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-19.c
index be9dc23..89d9d63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-19.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-2.c
index be9dc23..89d9d63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-2.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-20.c
index 056df04..1f7b15d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-20.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGPROF,  &act, 0) == -1) {
+		if (sigaction(SIGPROF, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-21.c
index 6f0e973..be648c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-21.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGSYS,  &act, 0) == -1) {
+		if (sigaction(SIGSYS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-22.c
index 0335b27..2894a17 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-22.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTRAP,  &act, 0) == -1) {
+		if (sigaction(SIGTRAP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-23.c
index ae21146..e90e6b8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-23.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGURG,  &act, 0) == -1) {
+		if (sigaction(SIGURG, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-24.c
index aa22934..bb108ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-24.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+		if (sigaction(SIGVTALRM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-25.c
index 6163690..7429fe7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-25.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGXCPU,  &act, 0) == -1) {
+		if (sigaction(SIGXCPU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-26.c
index d7fb13c..d0eadfa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-26.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+		if (sigaction(SIGXFSZ, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-3.c
index e82640d..9b9c8a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-3.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGBUS,  &act, 0) == -1) {
+		if (sigaction(SIGBUS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-4.c
index 9c3bb05..8d2a9a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-4.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGCHLD,  &act, 0) == -1) {
+		if (sigaction(SIGCHLD, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-5.c
index eec0c61..7da3ae7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-5.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGCONT,  &act, 0) == -1) {
+		if (sigaction(SIGCONT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-6.c
index d130479..dca3f63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-6.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGFPE,  &act, 0) == -1) {
+		if (sigaction(SIGFPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-7.c
index 7df4113..f18fba3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-7.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGHUP,  &act, 0) == -1) {
+		if (sigaction(SIGHUP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-8.c
index f919082..50e58fa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-8.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGILL,  &act, 0) == -1) {
+		if (sigaction(SIGILL, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-9.c
index a0445ca..dc4e701 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/22-9.c
@@ -69,7 +69,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = SA_NODEFER;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGINT,  &act, 0) == -1) {
+		if (sigaction(SIGINT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-1.c
index 277af62..10a97e8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-1.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGABRT again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGABRT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGABRT");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-10.c
index ea6a587..7214587 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-10.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGPIPE again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPIPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPIPE");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-11.c
index fd6a7b5..200bae6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-11.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGQUIT again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGQUIT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGQUIT");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-12.c
index 36b3014..9740219 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-12.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGSEGV again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSEGV */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSEGV");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-13.c
index f86bd37..5b78e76 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-13.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGTERM again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTERM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTERM");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-14.c
index 59ac617..4fb57c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-14.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGTSTP again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTSTP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTSTP");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-15.c
index 0d7aeb1..8fc62ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-15.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGTTIN again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTIN */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTIN");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-16.c
index 940b85c..5b32c6d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-16.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGTTOU again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTOU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTTOU");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-17.c
index bd9c578..0f3e7df 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-17.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGUSR1 again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR1 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR1");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-18.c
index 56a6fce..a01972c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-18.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGUSR2 again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR2 */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGUSR2");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-19.c
index 851dd21..1d8cdfc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-19.c
@@ -78,34 +78,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGALRM again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -130,23 +125,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGALRM");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-2.c
index aa155f8..aeb0b0c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-2.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGALRM again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGALRM");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-20.c
index ee15fc8..807c2cf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-20.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGPROF again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPROF */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGPROF");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-21.c
index 22962bd..e3afbcf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-21.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGSYS again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSYS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGSYS");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-22.c
index 0ffa9fb..c3a8fc4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-22.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGTRAP again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTRAP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGTRAP");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-23.c
index 372d17b..107836d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-23.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGURG again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGURG */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGURG");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-24.c
index b034311..d767185 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-24.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGVTALRM again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGVTALRM */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGVTALRM");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-25.c
index 5c26f88..8a36adf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-25.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGXCPU again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXCPU */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXCPU");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-26.c
index 8d89999..6787b06 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-26.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGXFSZ again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXFSZ */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGXFSZ");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-3.c
index e5ff339..dd7d6fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-3.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGBUS again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGBUS */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGBUS");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-4.c
index 9e2f1b1..791a292 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-4.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGCHLD again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCHLD */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCHLD");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-5.c
index 6f79432..d240f71 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-5.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGCONT again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCONT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGCONT");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-6.c
index 7cd5843..43ed4c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-6.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGFPE again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGFPE */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGFPE");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-7.c
index 6b83054..cb7894c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-7.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGHUP again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGHUP */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGHUP");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-8.c
index 786f900..f603d6c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-8.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGILL again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGILL */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGILL");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-9.c
index 360a430..54e96b9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/23-9.c
@@ -88,34 +88,29 @@
 	sigset_t pending;
 	called++;
 
-	if (called == 2)
-	{
+	if (called == 2) {
 		FAILED("Signal was not masked in signal handler");
 	}
 
-	if (called == 1)
-	{
+	if (called == 1) {
 
 		/* Raise the signal again. It should be masked */
 		ret = raise(SIGNAL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise SIGINT again");
 		}
 
 		/* check the signal is pending */
 		ret = sigpending(&pending);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to get pending signal set");
 		}
 
 		ret = sigismember(&pending, SIGNAL);
 
-		if (ret != 1)
-		{
+		if (ret != 1) {
 			FAILED("signal is not pending");
 		}
 	}
@@ -140,23 +135,20 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGINT */
 	ret = sigaction(SIGNAL, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise SIGINT");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-1.c
index a111d80..f3966ce 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-1.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGABRT,  &act, 0) == -1) {
+		if (sigaction(SIGABRT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-10.c
index cde3ed9..263bda9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-10.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGPIPE,  &act, 0) == -1) {
+		if (sigaction(SIGPIPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-11.c
index 3fa691d..5fe5621 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-11.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGQUIT,  &act, 0) == -1) {
+		if (sigaction(SIGQUIT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-12.c
index f3d7f70..d29a0f6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-12.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGSEGV,  &act, 0) == -1) {
+		if (sigaction(SIGSEGV, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-13.c
index ac12926..1b58268 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-13.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTERM,  &act, 0) == -1) {
+		if (sigaction(SIGTERM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-14.c
index 4a310f1..748db8c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-14.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTSTP,  &act, 0) == -1) {
+		if (sigaction(SIGTSTP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-15.c
index d25b768..2e57d9e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-15.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTTIN,  &act, 0) == -1) {
+		if (sigaction(SIGTTIN, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-16.c
index 29bde42..cc89a99 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-16.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTTOU,  &act, 0) == -1) {
+		if (sigaction(SIGTTOU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-17.c
index 77da7aa..576da60 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-17.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR1,  &act, 0) == -1) {
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-18.c
index 62a3722..c4bf137 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-18.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-19.c
index 62a3722..c4bf137 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-19.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-2.c
index 62a3722..c4bf137 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-2.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-20.c
index 2c321e2..718f157 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-20.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGPROF,  &act, 0) == -1) {
+		if (sigaction(SIGPROF, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-21.c
index b6f4be7..0a1cc38 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-21.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGSYS,  &act, 0) == -1) {
+		if (sigaction(SIGSYS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-22.c
index f8d7ff8..419d9b1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-22.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGTRAP,  &act, 0) == -1) {
+		if (sigaction(SIGTRAP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-23.c
index 184db6e..7b0914e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-23.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGURG,  &act, 0) == -1) {
+		if (sigaction(SIGURG, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-24.c
index bd9cac4..f973d45 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-24.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+		if (sigaction(SIGVTALRM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-25.c
index 712b691..2a10972 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-25.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGXCPU,  &act, 0) == -1) {
+		if (sigaction(SIGXCPU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-26.c
index dccbc14..7a3b1ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-26.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+		if (sigaction(SIGXFSZ, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-3.c
index 9980ff0..30aed83 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-3.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGBUS,  &act, 0) == -1) {
+		if (sigaction(SIGBUS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-4.c
index 374e098..64ed905 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-4.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGCHLD,  &act, 0) == -1) {
+		if (sigaction(SIGCHLD, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-5.c
index c7c388a..a4ebab7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-5.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGCONT,  &act, 0) == -1) {
+		if (sigaction(SIGCONT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-6.c
index 428b90a..bcaaca5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-6.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGFPE,  &act, 0) == -1) {
+		if (sigaction(SIGFPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-7.c
index a192488..e0bc15b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-7.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGHUP,  &act, 0) == -1) {
+		if (sigaction(SIGHUP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-8.c
index d1d6a61..b071ebf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-8.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGILL,  &act, 0) == -1) {
+		if (sigaction(SIGILL, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-9.c
index 8e96067..533e8c3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/25-9.c
@@ -67,7 +67,7 @@
 		act.sa_handler = handler;
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
-		if (sigaction(SIGINT,  &act, 0) == -1) {
+		if (sigaction(SIGINT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-1.c
index 0b546ac..528c27b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-1.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGABRT */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-10.c
index 54dcb9e..535819d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-10.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPIPE */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-11.c
index 457b97e..1608b95 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-11.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGQUIT */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-12.c
index 162c2c1..2954a4c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-12.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSEGV */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-13.c
index dd461e2..621bac7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-13.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTERM */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-14.c
index 45256a0..d9b0a69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-14.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTSTP */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-15.c
index 111d652..700b5f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-15.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTIN */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-16.c
index 2d51e84..52a8ff4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-16.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTTOU */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-17.c
index eef7494..cf0fdac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-17.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR1 */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-18.c
index 704586c..c667d3e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-18.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGUSR2 */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-19.c
index 6588e79..17de5fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-19.c
@@ -67,7 +67,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -115,16 +115,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -135,7 +135,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -149,7 +150,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -189,65 +190,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-2.c
index 4a19468..680d6ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-2.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGALRM */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-20.c
index 279e866..e89dc53 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-20.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGPROF */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-21.c
index ad1c133..4a0d4ad 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-21.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGSYS */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-22.c
index d440a23..e8a3888 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-22.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGTRAP */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-23.c
index 03635fe..f4f9488 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-23.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGURG */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-24.c
index 7e57b49..f31cec3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-24.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGVTALRM */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-25.c
index af75403..465d5c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-25.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXCPU */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-26.c
index c75dc2b..41b1d7a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-26.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGXFSZ */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-3.c
index 4f43107..69ea280 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-3.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGBUS */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-4.c
index d744d46..0231d68 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-4.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCHLD */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-5.c
index 25b5652..f9690c4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-5.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGCONT */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-6.c
index bf486fd..296a065 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-6.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGFPE */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-7.c
index 9ef55b9..7e59c5e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-7.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGHUP */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-8.c
index c0e4cd4..bf1de24 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-8.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGILL */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-9.c
index f4b941e..c8cbd0e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/28-9.c
@@ -70,7 +70,7 @@
 #include <time.h>
 #include <sys/types.h>
 
-#ifdef __GNUC__ /* We are using GCC */
+#ifdef __GNUC__			/* We are using GCC */
 
 #define UNRESOLVED(x, s) \
  { output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
@@ -118,16 +118,16 @@
 void output_init()
 {
 	/* do nothing */
-	return ;
+	return;
 }
 
-void output(char * string, ...)
+void output(char *string, ...)
 {
 	va_list ap;
 #ifndef PLOT_OUTPUT
 	char *ts = "[??:??:??]";
 
-	struct tm * now;
+	struct tm *now;
 	time_t nw;
 #endif
 
@@ -138,7 +138,8 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
 
 #endif
 	va_start(ap, string);
@@ -152,7 +153,7 @@
 void output_fini()
 {
 	/*do nothing */
-	return ;
+	return;
 }
 
 /******************************************************************************/
@@ -192,65 +193,58 @@
 
 	/* Register the signal handler with signal */
 
-	if (SIG_ERR == signal(SIGNAL, handler_1))
-	{
-		UNRESOLVED(errno, "Failed to register signal handler with signal()");
+	if (SIG_ERR == signal(SIGNAL, handler_1)) {
+		UNRESOLVED(errno,
+			   "Failed to register signal handler with signal()");
 	}
 
 	/* As whether signal handler is restored to default when executed
-	is implementation defined, we cannot check it was registered here. */
+	   is implementation defined, we cannot check it was registered here. */
 
-	/* Set the new signal handler with sigaction*/
+	/* Set the new signal handler with sigaction */
 	sa.sa_flags = 0;
 
 	sa.sa_handler = handler_2;
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGINT */
 	ret = sigaction(SIGNAL, &sa, &save);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 0)
-	{
+	if (called != 0) {
 		FAILED("handler not executed");
 	}
 
 	/* Restore the first signal handler */
 	ret = sigaction(SIGNAL, &save, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Check the signal handler has been set up */
 	ret = raise(SIGNAL);
 
-	if (ret != 0)
-	{
-		UNRESOLVED(ret , "Failed to raise the signal");
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
-	if (called != 1)
-	{
+	if (called != 1) {
 		FAILED("handler not executed");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/29-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/29-1.c
index e4e248c..40971ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/29-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/29-1.c
@@ -89,19 +89,16 @@
 
 sig_atomic_t latest = 0;
 
-void handler(int sig, siginfo_t *info, void *context)
+void handler(int sig, siginfo_t * info, void *context)
 {
-	if (info->si_signo != SIGRTMAX)
-	{
+	if (info->si_signo != SIGRTMAX) {
 		output("Received unexpected signal %d\n", info->si_signo);
-	}
-	else
-	{
+	} else {
 		latest++;
 
-		if (latest != info->si_value.sival_int)
-		{
-			output("Got signal %d, expected %d!\n", info->si_value.sival_int, latest);
+		if (latest != info->si_value.sival_int) {
+			output("Got signal %d, expected %d!\n",
+			       info->si_value.sival_int, latest);
 			FAILED("Wrong signal delivered -- no FIFO order?");
 		}
 	}
@@ -123,8 +120,7 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
@@ -135,63 +131,54 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Install the signal handler for SIGRTMAX */
 	ret = sigaction(SIGRTMAX, &sa, 0);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set signal handler");
 	}
 
 	/* Mask this signal */
 	ret = sigemptyset(&mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "An error occured while initializing mask");
 	}
 
 	ret = sigaddset(&mask, SIGRTMAX);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to add SIGRTMAX to signal set");
 	}
 
 	ret = sigprocmask(SIG_BLOCK, &mask, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set process signal mask");
 	}
 
 	/* Now queue the signal to be pending */
 
-	for (sv.sival_int = 1; sv.sival_int <= QUEUELENGTH; sv.sival_int++)
-	{
+	for (sv.sival_int = 1; sv.sival_int <= QUEUELENGTH; sv.sival_int++) {
 		ret = sigqueue(getpid(), SIGRTMAX, sv);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to queue the signal");
 		}
 	}
 
-	if (latest != 0)
-	{
+	if (latest != 0) {
 		FAILED("Signal was delivered while masked??");
 	}
 
 	/* And finally unmask the signal so it is delivered */
 	ret = sigprocmask(SIG_UNBLOCK, &mask, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to set process signal mask");
 	}
 
@@ -199,13 +186,13 @@
 
 	/* Check the signal has been delivered as expected */
 
-	if (latest != QUEUELENGTH)
-	{
-		output("Only %d signal delivered instead of %d\n", latest, QUEUELENGTH);
+	if (latest != QUEUELENGTH) {
+		output("Only %d signal delivered instead of %d\n", latest,
+		       QUEUELENGTH);
 
-		if (latest == 1)
-		{
-			UNTESTED("It seems like SIGRTMAX is not a queuable signal here?");
+		if (latest == 1) {
+			UNTESTED
+			    ("It seems like SIGRTMAX is not a queuable signal here?");
 		}
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-1.c
index e23c1af..e801179 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-1.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGABRT,  0, &oact) == -1) {
+	if (sigaction(SIGABRT, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-10.c
index 91e2080..ec9634e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-10.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGPIPE,  0, &oact) == -1) {
+	if (sigaction(SIGPIPE, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-11.c
index f2fea4c..9f1516a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-11.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGQUIT,  0, &oact) == -1) {
+	if (sigaction(SIGQUIT, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-12.c
index c97ad45..d5be5c6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-12.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGSEGV,  0, &oact) == -1) {
+	if (sigaction(SIGSEGV, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-13.c
index a37d07f..33b69f3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-13.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGTERM,  0, &oact) == -1) {
+	if (sigaction(SIGTERM, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-14.c
index 63b77c7..a5d7751 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-14.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGTSTP,  0, &oact) == -1) {
+	if (sigaction(SIGTSTP, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-15.c
index 638f257..92fb714 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-15.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGTTIN,  0, &oact) == -1) {
+	if (sigaction(SIGTTIN, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-16.c
index 77743e4..394ebc7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-16.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGTTOU,  0, &oact) == -1) {
+	if (sigaction(SIGTTOU, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-17.c
index ee2319d..8d99976 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-17.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR1,  0, &oact) == -1) {
+	if (sigaction(SIGUSR1, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-18.c
index 47e46d3..aa0ee27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-18.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR2,  0, &oact) == -1) {
+	if (sigaction(SIGUSR2, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-19.c
index 47e46d3..aa0ee27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-19.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR2,  0, &oact) == -1) {
+	if (sigaction(SIGUSR2, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-2.c
index 47e46d3..aa0ee27 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-2.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR2,  0, &oact) == -1) {
+	if (sigaction(SIGUSR2, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-20.c
index 4bb7e76..2bb84c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-20.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGPROF,  0, &oact) == -1) {
+	if (sigaction(SIGPROF, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-21.c
index 57487fb..13f8ff6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-21.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGSYS,  0, &oact) == -1) {
+	if (sigaction(SIGSYS, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-22.c
index e59b856..ab096c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-22.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGTRAP,  0, &oact) == -1) {
+	if (sigaction(SIGTRAP, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-23.c
index fb0cf4e..e0e77aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-23.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGURG,  0, &oact) == -1) {
+	if (sigaction(SIGURG, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-24.c
index d974bee..97fda90 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-24.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGVTALRM,  0, &oact) == -1) {
+	if (sigaction(SIGVTALRM, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-25.c
index aad6551..b2c004d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-25.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGXCPU,  0, &oact) == -1) {
+	if (sigaction(SIGXCPU, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-26.c
index 3d89609..5409e5d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-26.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGXFSZ,  0, &oact) == -1) {
+	if (sigaction(SIGXFSZ, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-3.c
index 26bf653..c160d50 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-3.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGBUS,  0, &oact) == -1) {
+	if (sigaction(SIGBUS, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-4.c
index a513584..63bcd9c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-4.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGCHLD,  0, &oact) == -1) {
+	if (sigaction(SIGCHLD, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-5.c
index 4fa4a21..305a938 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-5.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGCONT,  0, &oact) == -1) {
+	if (sigaction(SIGCONT, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-6.c
index 5f53aa9..d1ba53d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-6.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGFPE,  0, &oact) == -1) {
+	if (sigaction(SIGFPE, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-7.c
index b0136df..e6e0488 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-7.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGHUP,  0, &oact) == -1) {
+	if (sigaction(SIGHUP, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-8.c
index 1e6d345..edddb69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-8.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGILL,  0, &oact) == -1) {
+	if (sigaction(SIGILL, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-9.c
index d06d6d2..fb69ad1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/3-9.c
@@ -37,13 +37,13 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGINT,  0, &oact) == -1) {
+	if (sigaction(SIGINT, 0, &oact) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/30-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/30-1.c
index e5fb44c..9b7cebd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/30-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/30-1.c
@@ -84,7 +84,7 @@
 
 void handler(int signo)
 {
-	return ;
+	return;
 }
 
 /* main function */
@@ -104,8 +104,7 @@
 
 	ret = sigemptyset(&sa.sa_mask);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
@@ -116,16 +115,15 @@
 #endif
 	ret = sigaction(SIG_INVALID, &sa, 0);
 
-	if (ret == 0)
-	{
-		output("Is signal %d valid on this implementation?\n", SIG_INVALID);
+	if (ret == 0) {
+		output("Is signal %d valid on this implementation?\n",
+		       SIG_INVALID);
 		FAILED("Setting handler for invalid signal did not fail");
 	}
 
-	if (errno != EINVAL)
-	{
+	if (errno != EINVAL) {
 		output("Got error %d (%s) instead of %d (%s)\n",
-		        errno, strerror(errno), EINVAL, strerror(EINVAL));
+		       errno, strerror(errno), EINVAL, strerror(EINVAL));
 		FAILED("Wrong error code returned");
 	}
 
@@ -136,15 +134,13 @@
 #endif
 	ret = sigaction(SIGKILL, &sa, 0);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		FAILED("Setting handler for SIGKILL did not fail");
 	}
 
-	if (errno != EINVAL)
-	{
+	if (errno != EINVAL) {
 		output("Got error %d (%s) instead of %d (%s)\n",
-		        errno, strerror(errno), EINVAL, strerror(EINVAL));
+		       errno, strerror(errno), EINVAL, strerror(EINVAL));
 		FAILED("Wrong error code returned");
 	}
 
@@ -155,15 +151,13 @@
 #endif
 	ret = sigaction(SIGSTOP, &sa, 0);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		FAILED("Setting handler for SIGSTOP did not fail");
 	}
 
-	if (errno != EINVAL)
-	{
+	if (errno != EINVAL) {
 		output("Got error %d (%s) instead of %d (%s)\n",
-		        errno, strerror(errno), EINVAL, strerror(EINVAL));
+		       errno, strerror(errno), EINVAL, strerror(EINVAL));
 		FAILED("Wrong error code returned");
 	}
 
@@ -176,15 +170,13 @@
 #endif
 	ret = sigaction(SIGKILL, &sa, 0);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		FAILED("Ignoring SIGKILL did not fail");
 	}
 
-	if (errno != EINVAL)
-	{
+	if (errno != EINVAL) {
 		output("Got error %d (%s) instead of %d (%s)\n",
-		        errno, strerror(errno), EINVAL, strerror(EINVAL));
+		       errno, strerror(errno), EINVAL, strerror(EINVAL));
 		FAILED("Wrong error code returned");
 	}
 
@@ -195,15 +187,13 @@
 #endif
 	ret = sigaction(SIGSTOP, &sa, 0);
 
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		FAILED("Ignoring SIGSTOP did not fail");
 	}
 
-	if (errno != EINVAL)
-	{
+	if (errno != EINVAL) {
 		output("Got error %d (%s) instead of %d (%s)\n",
-		        errno, strerror(errno), EINVAL, strerror(EINVAL));
+		       errno, strerror(errno), EINVAL, strerror(EINVAL));
 		FAILED("Wrong error code returned");
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-1.c
index 398acba..89dae74 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-1.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGABRT,  &act, 0) == -1) {
+		if (sigaction(SIGABRT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-10.c
index 33f3e8b..63eb7d8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-10.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGPIPE,  &act, 0) == -1) {
+		if (sigaction(SIGPIPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-100.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-100.c
index f998c6a..6b9c0a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-100.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-100.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-101.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-101.c
index 4c0597c..6b79454 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-101.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-101.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-102.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-102.c
index 054f744..0e28d41 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-102.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-102.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-103.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-103.c
index a96bea7..3dd4aa6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-103.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-103.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-104.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-104.c
index 2e3258f..d8d7d92 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-104.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-104.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-11.c
index e32c98c..ff51748 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-11.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGQUIT,  &act, 0) == -1) {
+		if (sigaction(SIGQUIT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-12.c
index f14e6c5..6aac0e5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-12.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGSEGV,  &act, 0) == -1) {
+		if (sigaction(SIGSEGV, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-13.c
index ebb21c5..5da90f6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-13.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGTERM,  &act, 0) == -1) {
+		if (sigaction(SIGTERM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-14.c
index b74d18b..ef0509b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-14.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGTSTP,  &act, 0) == -1) {
+		if (sigaction(SIGTSTP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-15.c
index 7a1a958..2fd300a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-15.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGTTIN,  &act, 0) == -1) {
+		if (sigaction(SIGTTIN, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-16.c
index e8a8409..bd80778 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-16.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGTTOU,  &act, 0) == -1) {
+		if (sigaction(SIGTTOU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-17.c
index e946b6a..ca3b154 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-17.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGUSR1,  &act, 0) == -1) {
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-18.c
index 639b64e..3e79428 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-18.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-19.c
index 639b64e..3e79428 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-19.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-2.c
index 639b64e..3e79428 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-2.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-20.c
index e301f99..546f3fd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-20.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGPROF,  &act, 0) == -1) {
+		if (sigaction(SIGPROF, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-21.c
index 6deadf3..5062d51 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-21.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGSYS,  &act, 0) == -1) {
+		if (sigaction(SIGSYS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-22.c
index ecf4d74..7906734 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-22.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGTRAP,  &act, 0) == -1) {
+		if (sigaction(SIGTRAP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-23.c
index 3698dd6..1937252 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-23.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGURG,  &act, 0) == -1) {
+		if (sigaction(SIGURG, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-24.c
index f50093b..65747ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-24.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+		if (sigaction(SIGVTALRM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-25.c
index effbae1..c5bca91 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-25.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGXCPU,  &act, 0) == -1) {
+		if (sigaction(SIGXCPU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-26.c
index 84ef53a..856cc82 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-26.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+		if (sigaction(SIGXFSZ, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-27.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-27.c
index 81420a2..42fd4e6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-27.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-27.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGABRT,  &act, 0) == -1) {
+		if (sigaction(SIGABRT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-28.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-28.c
index 1477553..db893e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-28.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-28.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-29.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-29.c
index 352a962..2bad6cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-29.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-29.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGBUS,  &act, 0) == -1) {
+		if (sigaction(SIGBUS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-3.c
index 81c256e..84f46c8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-3.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGBUS,  &act, 0) == -1) {
+		if (sigaction(SIGBUS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-30.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-30.c
index d803c4b..3e17ac1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-30.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-30.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGCHLD,  &act, 0) == -1) {
+		if (sigaction(SIGCHLD, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-31.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-31.c
index 857b15a..1d703b8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-31.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-31.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGCONT,  &act, 0) == -1) {
+		if (sigaction(SIGCONT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-32.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-32.c
index 74fd812..a60e6c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-32.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-32.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGFPE,  &act, 0) == -1) {
+		if (sigaction(SIGFPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-33.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-33.c
index ea14663..5e97eda 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-33.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-33.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGHUP,  &act, 0) == -1) {
+		if (sigaction(SIGHUP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-34.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-34.c
index 9470223..1e9a7ab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-34.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-34.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGILL,  &act, 0) == -1) {
+		if (sigaction(SIGILL, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-35.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-35.c
index b2dbf85..378a775 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-35.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-35.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGINT,  &act, 0) == -1) {
+		if (sigaction(SIGINT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-36.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-36.c
index 18e5ab0..1f8c9f8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-36.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-36.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGPIPE,  &act, 0) == -1) {
+		if (sigaction(SIGPIPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-37.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-37.c
index f4387ba..d97d44e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-37.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-37.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGQUIT,  &act, 0) == -1) {
+		if (sigaction(SIGQUIT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-38.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-38.c
index 3c46158..1cf9caf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-38.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-38.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGSEGV,  &act, 0) == -1) {
+		if (sigaction(SIGSEGV, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-39.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-39.c
index 602abe2..e3a76c6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-39.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-39.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGTERM,  &act, 0) == -1) {
+		if (sigaction(SIGTERM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-4.c
index 65f69cc..24761b5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-4.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGCHLD,  &act, 0) == -1) {
+		if (sigaction(SIGCHLD, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-40.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-40.c
index 1d83af9..6703896 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-40.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-40.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGTSTP,  &act, 0) == -1) {
+		if (sigaction(SIGTSTP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-41.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-41.c
index a350047..8759ede 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-41.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-41.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGTTIN,  &act, 0) == -1) {
+		if (sigaction(SIGTTIN, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-42.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-42.c
index 6488111..ecc38cd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-42.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-42.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGTTOU,  &act, 0) == -1) {
+		if (sigaction(SIGTTOU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-43.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-43.c
index 6d46ba4..407d961 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-43.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-43.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGUSR1,  &act, 0) == -1) {
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-44.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-44.c
index 1477553..db893e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-44.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-44.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-45.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-45.c
index 1477553..db893e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-45.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-45.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGUSR2,  &act, 0) == -1) {
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-46.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-46.c
index dc0f851..97ab2e0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-46.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-46.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGPROF,  &act, 0) == -1) {
+		if (sigaction(SIGPROF, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-47.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-47.c
index 82785e7..51c39d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-47.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-47.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGSYS,  &act, 0) == -1) {
+		if (sigaction(SIGSYS, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-48.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-48.c
index d967d10..69724bc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-48.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-48.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGTRAP,  &act, 0) == -1) {
+		if (sigaction(SIGTRAP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-49.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-49.c
index fdb40f9..0969a5f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-49.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-49.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGURG,  &act, 0) == -1) {
+		if (sigaction(SIGURG, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-5.c
index 45d176f..fd554cc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-5.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGCONT,  &act, 0) == -1) {
+		if (sigaction(SIGCONT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-50.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-50.c
index ea3cccc..d1eeaa6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-50.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-50.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+		if (sigaction(SIGVTALRM, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-51.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-51.c
index 64f1819..387eabb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-51.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-51.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGXCPU,  &act, 0) == -1) {
+		if (sigaction(SIGXCPU, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-52.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-52.c
index ce6e10a..dd6658a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-52.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-52.c
@@ -50,7 +50,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGSTOP);
-		if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+		if (sigaction(SIGXFSZ, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-53.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-53.c
index cb24801..31ae40a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-53.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-53.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-54.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-54.c
index e07530c..4c25f66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-54.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-54.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-55.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-55.c
index b1b5cc2..87706e4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-55.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-55.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-56.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-56.c
index 1cb2520..714cc8a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-56.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-56.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-57.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-57.c
index 00c03e1..5d06a66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-57.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-57.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-58.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-58.c
index fb1fad6..f05df49 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-58.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-58.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-59.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-59.c
index 2425829..b7e8388 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-59.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-59.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-6.c
index f0ad41e..16bd4a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-6.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGFPE,  &act, 0) == -1) {
+		if (sigaction(SIGFPE, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-60.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-60.c
index 61b19a7..bf21e7c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-60.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-60.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-61.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-61.c
index 107b58d..86da4b0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-61.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-61.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-62.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-62.c
index e4c16df..8960303 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-62.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-62.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-63.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-63.c
index df350e8..67466c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-63.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-63.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-64.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-64.c
index 0fcefd8..78e5b9b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-64.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-64.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-65.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-65.c
index 22f8e39..4346f20 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-65.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-65.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-66.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-66.c
index 7acff1e..0e62000 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-66.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-66.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-67.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-67.c
index 3be05fb..5932a8c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-67.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-67.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-68.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-68.c
index 2bd44d6..9454ddb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-68.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-68.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-69.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-69.c
index 366005d..ebc11db 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-69.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-69.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-7.c
index 2670668..3bc518e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-7.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGHUP,  &act, 0) == -1) {
+		if (sigaction(SIGHUP, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-70.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-70.c
index 093f85e..57535c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-70.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-70.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-71.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-71.c
index e07530c..4c25f66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-71.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-71.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-72.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-72.c
index 741ad3c..08cee00 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-72.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-72.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-73.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-73.c
index 1ab8769..1f223ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-73.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-73.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-74.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-74.c
index 1153621..8220bf8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-74.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-74.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-75.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-75.c
index a0426bf..874f2ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-75.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-75.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-76.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-76.c
index 9ba0375..538c548 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-76.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-76.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-77.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-77.c
index 5cd8123..ac6f648 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-77.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-77.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-78.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-78.c
index 597b6bc..7b6e3fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-78.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-78.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGKILL);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-79.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-79.c
index f2c0f88..7cde061 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-79.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-79.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-8.c
index 15125f4..c22f01e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-8.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGILL,  &act, 0) == -1) {
+		if (sigaction(SIGILL, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-80.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-80.c
index e9e6e9f..2902c6b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-80.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-80.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-81.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-81.c
index b5cbbaf..2be869d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-81.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-81.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-82.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-82.c
index e864662..ad1e23b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-82.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-82.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-83.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-83.c
index bb5b3f1..ee8c6e2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-83.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-83.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-84.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-84.c
index 4a599c0..b12cb36 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-84.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-84.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-85.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-85.c
index b3d6f53..653c0ee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-85.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-85.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-86.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-86.c
index 89948a4..7f4baaf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-86.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-86.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-87.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-87.c
index 5cfdb58..495bc69 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-87.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-87.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-88.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-88.c
index a76fe11..e57e880 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-88.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-88.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-89.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-89.c
index 34279fd..793cf04 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-89.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-89.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-9.c
index cfce13b..b783b9e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-9.c
@@ -51,7 +51,7 @@
 		act.sa_flags = 0;
 		sigemptyset(&act.sa_mask);
 		sigaddset(&act.sa_mask, SIGKILL);
-		if (sigaction(SIGINT,  &act, 0) == -1) {
+		if (sigaction(SIGINT, &act, 0) == -1) {
 			perror("Unexpected error while attempting to "
 			       "setup test pre-conditions");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-90.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-90.c
index 5334d30..abd311f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-90.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-90.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-91.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-91.c
index 167c236..c1fca6e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-91.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-91.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-92.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-92.c
index 313ef48..a302ea2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-92.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-92.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-93.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-93.c
index 18bc613..1ed764b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-93.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-93.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-94.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-94.c
index 93363dd..fd44d45 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-94.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-94.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-95.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-95.c
index d94a22d..32d43b7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-95.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-95.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-96.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-96.c
index c6005c9..20e3ecd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-96.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-96.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-97.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-97.c
index e9e6e9f..2902c6b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-97.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-97.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGALRM,  &act, 0) == -1) {
+	if (sigaction(SIGALRM, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-98.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-98.c
index e33e673..7f91726 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-98.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-98.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-99.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-99.c
index 7fa4c48..cc0a201 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-99.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/4-99.c
@@ -30,7 +30,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-1.c
index a60d2ef..95b1f22 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-1.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-10.c
index a8fcabe..d6a93ba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-10.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-11.c
index ed28863..58f50bb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-11.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-12.c
index b1fbe64..d98d231 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-12.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-13.c
index 1b6f01b..0a9b675 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-13.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-14.c
index c22fedd..87e8018 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-14.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-15.c
index 5682d92..8ba69e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-15.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-16.c
index 6e42fcc..4dcc841 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-16.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-17.c
index 39c7d3f..ec354ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-17.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-18.c
index 113f154..1e8b913 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-18.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-19.c
index 113f154..1e8b913 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-19.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-2.c
index 113f154..1e8b913 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-2.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-20.c
index 73d8954..710a3f9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-20.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-21.c
index 67d4ee7..df92f39 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-21.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-22.c
index e620710..9fa017f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-22.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-23.c
index 485cd86..91973ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-23.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-24.c
index fa58f51..5438a1c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-24.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-25.c
index ffe71fc..762822e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-25.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-26.c
index fd44321..8f46429 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-26.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-3.c
index 8a4fe41..876b68f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-3.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-4.c
index 1ccff6b..b867c0e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-4.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-5.c
index de4af89..1d3a025 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-5.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-6.c
index 7bfa17f..297a11b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-6.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-7.c
index bceff78..1f7bc0f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-7.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-8.c
index 3ad6c3f..1021829 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-8.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-9.c
index 38aac99..c76a75b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/6-9.c
@@ -21,7 +21,7 @@
 
 int handler_called = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	handler_called = 1;
 }
@@ -34,7 +34,7 @@
 	act.sa_flags = SA_SIGINFO;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSTOP);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		printf("Unexpected error while attempting to setup test "
 		       "pre-conditions\n");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-1.c
index a2357b3..24fa6b9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-1.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGXFSZ);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGXFSZ_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-10.c
index dbde6d0..dba1c4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-10.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGINT);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGINT_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-11.c
index d2cb7f2..d6ebc41 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-11.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGPIPE);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGPIPE_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPIPE,  &act, 0) == -1) {
+	if (sigaction(SIGPIPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-12.c
index f6e0c23..8323992 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-12.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGQUIT);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGQUIT_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGQUIT,  &act, 0) == -1) {
+	if (sigaction(SIGQUIT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-13.c
index a933138..0bf51bd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-13.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSEGV);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGSEGV_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSEGV,  &act, 0) == -1) {
+	if (sigaction(SIGSEGV, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-14.c
index 4241df9..5ee4e4e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-14.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTERM);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGTERM_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTERM,  &act, 0) == -1) {
+	if (sigaction(SIGTERM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-15.c
index 2b0ad2d..eaea417 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-15.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTSTP);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGTSTP_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTSTP,  &act, 0) == -1) {
+	if (sigaction(SIGTSTP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-16.c
index 357721f..9b3785a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-16.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTTIN);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGTTIN_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTIN,  &act, 0) == -1) {
+	if (sigaction(SIGTTIN, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-17.c
index 69d51bb..f804bbc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-17.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTTOU);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGTTOU_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTTOU,  &act, 0) == -1) {
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-18.c
index 84fd196..c47d53a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-18.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGUSR1);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGUSR1_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-2.c
index 5838fec..382dc89 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-2.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGABRT);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGABRT_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-20.c
index 13ea20e..41bee07 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-20.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGUSR2);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGUSR2_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-21.c
index e60ce7b..8dc033f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-21.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGPROF);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGPROF_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGPROF,  &act, 0) == -1) {
+	if (sigaction(SIGPROF, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-22.c
index d394853..8ed26ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-22.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGSYS);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGSYS_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGSYS,  &act, 0) == -1) {
+	if (sigaction(SIGSYS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-23.c
index c58ea4d..a2afbcb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-23.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGTRAP);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGTRAP_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGTRAP,  &act, 0) == -1) {
+	if (sigaction(SIGTRAP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-24.c
index 91c1374..f69ddd3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-24.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGURG);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGURG_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGURG,  &act, 0) == -1) {
+	if (sigaction(SIGURG, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-25.c
index 553163e..9d714f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-25.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGVTALRM);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGVTALRM_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGVTALRM,  &act, 0) == -1) {
+	if (sigaction(SIGVTALRM, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-26.c
index 68a9513..f34bc37 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-26.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGXCPU);
-	if (sigaction(SIGXFSZ,  &act, 0) == -1) {
+	if (sigaction(SIGXFSZ, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGXCPU_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGXCPU,  &act, 0) == -1) {
+	if (sigaction(SIGXCPU, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-3.c
index 0d145f7..d6b9d29 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-3.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGUSR2);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGUSR2_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-4.c
index 78b687b..ddc647b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-4.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGBUS);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGBUS_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGBUS,  &act, 0) == -1) {
+	if (sigaction(SIGBUS, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-5.c
index f2c9e46..b7f1b82 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-5.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGCHLD);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGCHLD_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCHLD,  &act, 0) == -1) {
+	if (sigaction(SIGCHLD, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-6.c
index eeda3ee..bb8cba9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-6.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGCONT);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGCONT_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGCONT,  &act, 0) == -1) {
+	if (sigaction(SIGCONT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-7.c
index a51542a..90e7837 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-7.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGFPE);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGFPE_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGFPE,  &act, 0) == -1) {
+	if (sigaction(SIGFPE, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-8.c
index da765d5..ba2372e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-8.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGHUP);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGHUP_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGHUP,  &act, 0) == -1) {
+	if (sigaction(SIGHUP, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-9.c
index 718201e..0ad992f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/8-9.c
@@ -44,7 +44,7 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	sigaddset(&act.sa_mask, SIGILL);
-	if (sigaction(SIGINT,  &act, 0) == -1) {
+	if (sigaction(SIGINT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
@@ -53,7 +53,7 @@
 	act.sa_handler = SIGILL_handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGILL,  &act, 0) == -1) {
+	if (sigaction(SIGILL, &act, 0) == -1) {
 		perror("Unexpected error while attempting to "
 		       "setup test pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
index 0273847..6a8350a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/9-1.c
@@ -30,7 +30,7 @@
 
 volatile int child_stopped = 0;
 
-void handler(int signo, siginfo_t *info, void *context)
+void handler(int signo, siginfo_t * info, void *context)
 {
 	if (info && info->si_code == CLD_STOPPED) {
 		printf("Child has been stopped\n");
@@ -47,7 +47,7 @@
 	act.sa_sigaction = handler;
 	act.sa_flags = SA_SIGINFO | SA_NOCLDSTOP;
 	sigemptyset(&act.sa_mask);
-	sigaction(SIGCHLD,  &act, 0);
+	sigaction(SIGCHLD, &act, 0);
 
 	if ((pid = fork()) == 0) {
 		/* child */
@@ -65,22 +65,22 @@
 			kill(pid, SIGSTOP);
 
 			/*
-			  If we send a bunch of SIGSTOP/SIGCONT
-			  signals one after the other then it is
-			  perfectly OK for the OS to not send
-			  the SIGSTOP/SIGCONT combination as an
-			  optimization.
+			   If we send a bunch of SIGSTOP/SIGCONT
+			   signals one after the other then it is
+			   perfectly OK for the OS to not send
+			   the SIGSTOP/SIGCONT combination as an
+			   optimization.
 
-			  I can't think of any POSIX method to determine
-			  if a process has been stopped, so I'm
-			  going to punt with a one second sleep and
-			  assume the child process gets put to sleep
-			  within that time period.  This will be problem
-			  when this test is run on a really stressed
-			  system. (Although since we are sending multiple
-			  SIGSTOP's then maybe in practice this will
-			  cause any problems.)
-			*/
+			   I can't think of any POSIX method to determine
+			   if a process has been stopped, so I'm
+			   going to punt with a one second sleep and
+			   assume the child process gets put to sleep
+			   within that time period.  This will be problem
+			   when this test is run on a really stressed
+			   system. (Although since we are sending multiple
+			   SIGSTOP's then maybe in practice this will
+			   cause any problems.)
+			 */
 			tv.tv_sec = 1;
 			tv.tv_usec = 0;
 			select(0, NULL, NULL, NULL, &tv);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-3.c
index ba7508d..8fc82ee 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-3.c
@@ -23,7 +23,7 @@
 	sigset_t signalset;
 	int signallist[SIGNALLISTSIZE];
 	int i;
-	int f=0;
+	int f = 0;
 
 	signallist[0] = SIGABRT;
 	signallist[1] = SIGALRM;
@@ -51,16 +51,16 @@
 		return -1;
 	}
 
-	for (i=0; i<SIGNALLISTSIZE; i++) {
+	for (i = 0; i < SIGNALLISTSIZE; i++) {
 		if (sigaddset(&signalset, signallist[i]) == 0) {
 			if (sigismember(&signalset, signallist[i]) == 1) {
 				// signal added
 			} else {
-				f=-1;
+				f = -1;
 				printf("Signal - %d\n", signallist[i]);
 			}
 		} else {
-			f=-1;
+			f = -1;
 			printf("Signal - %d\n", signallist[i]);
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-core.c
index 00e9d9f..e018541 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-core.c
@@ -22,7 +22,7 @@
 	sigset_t signalset;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [0|1]\n", argv[0]);
+		printf("Usage:  %s [0|1]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 	if ('0' == argv[1][0]) {
@@ -31,14 +31,14 @@
 			return PTS_UNRESOLVED;
 		}
 	} else if ('1' == argv[1][0]) {
-			if (sigfillset(&signalset) == -1) {
-				perror("sigfillset failed -- test aborted");
-				return PTS_UNRESOLVED;
-			}
-		} else {
-			printf("Usage:  %s [0|1]\n", argv[0]);
+		if (sigfillset(&signalset) == -1) {
+			perror("sigfillset failed -- test aborted");
 			return PTS_UNRESOLVED;
 		}
+	} else {
+		printf("Usage:  %s [0|1]\n", argv[0]);
+		return PTS_UNRESOLVED;
+	}
 
 	if (sigaddset(&signalset, SIGALRM) == 0) {
 		if (sigismember(&signalset, SIGALRM) == 1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-core.c
index bf20eb6..d14a15c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-core.c
@@ -30,36 +30,36 @@
 	}
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
 	if (sigaddset(&signalset, signo) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			if ((sigismember(&signalset, signo) == 0) ||
-				sigismember(&signalset, signo) == -1) {
+			    sigismember(&signalset, signo) == -1) {
 				printf("signal was not added\n");
 				return PTS_PASS;
 			} else {
@@ -67,7 +67,7 @@
 				return PTS_UNRESOLVED;
 			}
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
index 56d8ae3..46f2050 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
@@ -33,9 +33,12 @@
 void handler(int signo)
 {
 	int i = 0;
-	if ((void*)&i < (alternate_s.ss_sp) || (long)&i>=((long)alternate_s.ss_sp + (long)alternate_s.ss_size)) {
+	if ((void *)&i < (alternate_s.ss_sp)
+	    || (long)&i >=
+	    ((long)alternate_s.ss_sp + (long)alternate_s.ss_size)) {
 
-		printf("Test FAILED: address of local variable is not inside the memory allocated for the alternate signal stack\n");
+		printf
+		    ("Test FAILED: address of local variable is not inside the memory allocated for the alternate signal stack\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -48,26 +51,30 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = 0;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGUSR1) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
index bdc9494..bed842f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
@@ -33,20 +33,22 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = 0;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) != 0) {
+	if (sigaltstack(&alternate_s, (stack_t *) 0) != 0) {
 		printf("Test FAILED: sigaltstack didn't return 0.\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
index 3130be3..197441b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
@@ -42,20 +42,22 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	altstack1.ss_flags = SS_DISABLE + 1;
 	altstack1.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&altstack1, (stack_t *)0) != -1) {
+	if (sigaltstack(&altstack1, (stack_t *) 0) != -1) {
 		printf("Test FAILED: Expected return value of -1.\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
index be48c0c..9ad8e36 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
@@ -42,20 +42,22 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	altstack1.ss_flags = 0;
-	altstack1.ss_size = MINSIGSTKSZ-1;
+	altstack1.ss_size = MINSIGSTKSZ - 1;
 
-	if (sigaltstack(&altstack1, (stack_t *)0) != -1) {
+	if (sigaltstack(&altstack1, (stack_t *) 0) != -1) {
 		printf("Test FAILED: Expected return value of -1.\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
index 2704f75..06642a0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
@@ -36,18 +36,21 @@
 
 	stack_t handler_s;
 
-	if (sigaltstack((stack_t *)0, &handler_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		exit(PTS_UNRESOLVED);
 	}
 
 	if (handler_s.ss_sp != original_s.ss_sp) {
-		printf("Test FAILED: ss_sp of the handler's stack changed even though SS_DISABLE was set\n");
+		printf
+		    ("Test FAILED: ss_sp of the handler's stack changed even though SS_DISABLE was set\n");
 		exit(PTS_FAIL);
 	}
 
 	if (handler_s.ss_size != original_s.ss_size) {
-		printf("Test FAILED: ss_size of the handler's stack changed even though SS_DISABLE was set\n");
+		printf
+		    ("Test FAILED: ss_size of the handler's stack changed even though SS_DISABLE was set\n");
 		exit(PTS_FAIL);
 	}
 
@@ -62,30 +65,35 @@
 	sigemptyset(&act.sa_mask);
 
 	if (sigaction(SIGUSR1, &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &original_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &original_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = SS_DISABLE;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGUSR1) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
index ce41483..e226cdb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
@@ -38,18 +38,21 @@
 
 	stack_t handler_s;
 
-	if (sigaltstack((stack_t *)0, &handler_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		exit(PTS_UNRESOLVED);
 	}
 
 	if (handler_s.ss_sp != alternate_s.ss_sp) {
-		printf("Test FAILED: ss_sp of the stack is not same as the defined one\n");
+		printf
+		    ("Test FAILED: ss_sp of the stack is not same as the defined one\n");
 		exit(PTS_FAIL);
 	}
 
 	if (handler_s.ss_size != alternate_s.ss_size) {
-		printf("Test FAILED: ss_size of the stack is not same as the defined one\n");
+		printf
+		    ("Test FAILED: ss_size of the stack is not same as the defined one\n");
 		exit(PTS_FAIL);
 	}
 
@@ -63,26 +66,30 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = 0;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGTOTEST) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
index 5b39fcf..b4c42ff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
@@ -33,36 +33,42 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGUSR1,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGUSR1, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = 0;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaltstack((stack_t *)0, &current_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &current_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (current_s.ss_sp != alternate_s.ss_sp) {
-		printf("Test FAILED: ss_sp of the alternate stack is not same as the defined one\n");
+		printf
+		    ("Test FAILED: ss_sp of the alternate stack is not same as the defined one\n");
 		exit(PTS_FAIL);
 	}
 
 	if (current_s.ss_size != alternate_s.ss_size) {
-		printf("Test FAILED: ss_size of the alternate stack is not same as the defined one\n");
+		printf
+		    ("Test FAILED: ss_size of the alternate stack is not same as the defined one\n");
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
index 13f9fbf..be49736 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
@@ -33,13 +33,15 @@
 {
 	stack_t handler_s;
 
-	if (sigaltstack((stack_t *)0, &handler_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		exit(PTS_UNRESOLVED);
 	}
 
 	if (handler_s.ss_flags != SS_ONSTACK) {
-		printf("Test FAILED: The alternate stack's ss_flags member does not contain SS_ONSTACK even though the handler is executing on the alternate stack\n");
+		printf
+		    ("Test FAILED: The alternate stack's ss_flags member does not contain SS_ONSTACK even though the handler is executing on the alternate stack\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -52,26 +54,30 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = 0;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGTOTEST) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
index a25cfd0..0bd201e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
@@ -34,15 +34,17 @@
 	stack_t altstack2;
 
 	if ((altstack2.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		exit(PTS_UNRESOLVED);
 	}
 
 	altstack2.ss_flags = 0;
 	altstack2.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&altstack2, (stack_t *)0) != -1) {
-		printf("Test FAILED: Attempt to set change alternate stack while inside handler succeeded.\n");
+	if (sigaltstack(&altstack2, (stack_t *) 0) != -1) {
+		printf
+		    ("Test FAILED: Attempt to set change alternate stack while inside handler succeeded.\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -55,26 +57,30 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	altstack1.ss_flags = 0;
 	altstack1.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&altstack1, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&altstack1, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGTOTEST) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
index 9ba0e7e..2461d35 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
@@ -33,13 +33,15 @@
 {
 	stack_t handler_s;
 
-	if (sigaltstack((stack_t *)0, &handler_s) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		exit(PTS_UNRESOLVED);
 	}
 
 	if (handler_s.ss_flags != SS_DISABLE) {
-		printf("Test FAILED: The alternate stack's ss_flags member does not contain SS_DISABLE even though the alternate signal stack is disabled.\n");
+		printf
+		    ("Test FAILED: The alternate stack's ss_flags member does not contain SS_DISABLE even though the alternate signal stack is disabled.\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -52,26 +54,30 @@
 	act.sa_handler = handler;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGTOTEST,  &act, 0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaction(SIGTOTEST, &act, 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	alternate_s.ss_flags = SS_DISABLE;
 	alternate_s.ss_size = SIGSTKSZ;
 
-	if (sigaltstack(&alternate_s, (stack_t *)0) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+	if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (raise(SIGTOTEST) == -1) {
-		perror("Unexpected error while attempting to setup test pre-conditions");
+		perror
+		    ("Unexpected error while attempting to setup test pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
index f6fbc89..3d8b7df 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
@@ -35,12 +35,12 @@
 #include "posixtest.h"
 
 static stack_t a;
-static char path[PATH_MAX+1];
+static char path[PATH_MAX + 1];
 
 int main(int argc, char **argv)
 {
 	int rc;
-	char path[PATH_MAX+1];
+	char path[PATH_MAX + 1];
 
 	/* Called with no args, do the exec, otherwise check.  */
 	if (argc == 1) {
@@ -55,7 +55,7 @@
 		rc = sigaltstack(&a, NULL);
 		if (rc) {
 			printf("Failed: sigaltstack() rc: %d errno: %s\n",
-						rc, strerror(errno));
+			       rc, strerror(errno));
 			exit(PTS_UNRESOLVED);
 		}
 
@@ -73,7 +73,7 @@
 
 	} else if (strcmp(argv[1], "verify")) {
 		printf("Failed: %s called with unexpected argument: %s\n",
-						argv[0], argv[1]);
+		       argv[0], argv[1]);
 		exit(PTS_UNRESOLVED);
 	}
 
@@ -81,7 +81,7 @@
 	rc = sigaltstack(NULL, &a);
 	if (rc || a.ss_flags != SS_DISABLE) {
 		printf("Failed: sigaltstack() rc: %d ss_flags: %u\n",
-					rc, a.ss_flags);
+		       rc, a.ss_flags);
 		exit(PTS_FAIL);
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/1-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/1-core.c
index c7c1df2..659d827 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/1-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/1-core.c
@@ -24,7 +24,7 @@
 	sigset_t signalset;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [0|1]\n", argv[0]);
+		printf("Usage:  %s [0|1]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 	if ('0' == argv[1][0]) {
@@ -33,14 +33,14 @@
 			return PTS_UNRESOLVED;
 		}
 	} else if ('1' == argv[1][0]) {
-			if (sigfillset(&signalset) == -1) {
-				perror("sigfillset failed -- test aborted");
-				return PTS_UNRESOLVED;
-			}
-		} else {
-			printf("Usage:  %s [0|1]\n", argv[0]);
+		if (sigfillset(&signalset) == -1) {
+			perror("sigfillset failed -- test aborted");
 			return PTS_UNRESOLVED;
 		}
+	} else {
+		printf("Usage:  %s [0|1]\n", argv[0]);
+		return PTS_UNRESOLVED;
+	}
 
 	if (sigaddset(&signalset, SIGALRM) == 0) {
 		if (sigismember(&signalset, SIGALRM) == 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/4-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/4-core.c
index ab81c89..ac894d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/4-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/4-core.c
@@ -31,36 +31,36 @@
 	}
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN + 1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return -1;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return -1;
 	}
 
 	if (sigdelset(&signalset, signo) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			if ((sigismember(&signalset, signo) == 0) ||
-				sigismember(&signalset, signo) == -1) {
+			    sigismember(&signalset, signo) == -1) {
 				printf("signal was not removed\n");
 				return PTS_PASS;
 			} else {
@@ -68,7 +68,7 @@
 				return PTS_UNRESOLVED;
 			}
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/1-1.c
index 68b1522..9bb8dfd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/1-1.c
@@ -17,7 +17,8 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int main() {
+int main()
+{
 
 	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
@@ -31,22 +32,24 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	sigset_t signalset;
-	int i, test_failed=0;
+	int i, test_failed = 0;
 
 	if (sigemptyset(&signalset) == -1) {
 		perror("sigemptyset failed -- test aborted");
 		return -1;
 	}
 
-	for (i=NUMSIGNALS-1; i>=0; i--) {
+	for (i = NUMSIGNALS - 1; i >= 0; i--) {
 		if (sigismember(&signalset, siglist[i]) == 1) {
-			#ifdef DEBUG
-				printf("sigemptyset did not clear set of signal %s\n", siglist[i]);
-			#endif
-			test_failed=1;
+#ifdef DEBUG
+			printf("sigemptyset did not clear set of signal %s\n",
+			       siglist[i]);
+#endif
+			test_failed = 1;
 		}
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/1-1.c
index f8e68f1..b51f3d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/1-1.c
@@ -19,7 +19,7 @@
 int main(void)
 {
 	sigset_t signalset;
-	int i, test_failed=0;
+	int i, test_failed = 0;
 
 	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
@@ -33,19 +33,21 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigfillset(&signalset) == -1) {
 		perror("sigfillset failed -- test aborted");
 		return PTS_FAIL;
 	}
 
-	for (i=NUMSIGNALS-1; i>=0; i--) {
+	for (i = NUMSIGNALS - 1; i >= 0; i--) {
 		if (sigismember(&signalset, siglist[i]) == 0) {
-			#ifdef DEBUG
-				printf("sigfillset did not insert signal %s\n in set", siglist[i]);
- 			#endif
-			test_failed=1;
+#ifdef DEBUG
+			printf("sigfillset did not insert signal %s\n in set",
+			       siglist[i]);
+#endif
+			test_failed = 1;
 		}
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/2-1.c
index a2a6b60..083a59d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigfillset/2-1.c
@@ -26,8 +26,8 @@
 		perror("sigfillset failed -- test aborted");
 		return PTS_FAIL;
 	}
-	#ifdef DEBUG
-		printf("sigfillset passed\n");
-	#endif
+#ifdef DEBUG
+	printf("sigfillset passed\n");
+#endif
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sighold/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sighold/1-1.c
index f79280c..2346300 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sighold/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sighold/1-1.c
@@ -33,7 +33,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sighold/3-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sighold/3-core.c
index c545bc0..d661de8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sighold/3-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sighold/3-core.c
@@ -31,58 +31,58 @@
 	struct sigaction sa, osa;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
-        /* special sig11 case */
-        sa.sa_handler = &sig11_handler;
-        sigemptyset(&sa.sa_mask);
-        sa.sa_flags = 0;
+	/* special sig11 case */
+	sa.sa_handler = &sig11_handler;
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
 
-        sigaction(SIGSEGV, NULL, &osa);
-        sigaction(SIGSEGV, &sa, NULL);
+	sigaction(SIGSEGV, NULL, &osa);
+	sigaction(SIGSEGV, &sa, NULL);
 
-        if (setjmp(sig11_recover)) {
-              errno = EINVAL;
-	      TEST_RETURN=-2;
-        } else {
-              TEST_RETURN=sighold(signo);
-        }
-        sigaction(SIGSEGV, &osa, NULL);
+	if (setjmp(sig11_recover)) {
+		errno = EINVAL;
+		TEST_RETURN = -2;
+	} else {
+		TEST_RETURN = sighold(signo);
+	}
+	sigaction(SIGSEGV, &osa, NULL);
 
 	if (TEST_RETURN == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
 	if (TEST_RETURN == -2) {
-		printf ("test received SIGSEGV\n");
+		printf("test received SIGSEGV\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -93,8 +93,7 @@
 /******************************************************************
  * sig11_handler() - our segfault recover hack
  ******************************************************************/
-void
-sig11_handler(int sig)
+void sig11_handler(int sig)
 {
-    longjmp(sig11_recover, 1);
+	longjmp(sig11_recover, 1);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/1-1.c
index fc14fc2..09f9516 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/1-1.c
@@ -33,7 +33,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/5-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/5-core.c
index fc4d3b7..ff8ec10 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/5-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/5-core.c
@@ -26,37 +26,37 @@
 	int signo;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
 	if (sigignore(signo) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-1.c
index 49ff7b6..964c6d7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-1.c
@@ -23,10 +23,10 @@
 {
 	if (sigignore(SIGKILL) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-2.c
index 326a9ac..ef1d0f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigignore/6-2.c
@@ -23,10 +23,10 @@
 {
 	if (sigignore(SIGSTOP) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/3-1.c
index d7e7028..adbe6bd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/3-1.c
@@ -13,7 +13,8 @@
 #include <signal.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 
 	sigset_t signalset;
 
@@ -23,9 +24,10 @@
 	}
 
 	if (sigismember(&signalset, SIGABRT) != 1) {
-		#ifdef DEBUG
-			printf("sigismember didn't returned a 1 even though sigfillset was just called\n");
-		#endif
+#ifdef DEBUG
+		printf
+		    ("sigismember didn't returned a 1 even though sigfillset was just called\n");
+#endif
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/4-1.c
index 82a05ec..8d76062 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/4-1.c
@@ -14,7 +14,8 @@
 #include <signal.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 
 	sigset_t signalset;
 
@@ -24,9 +25,10 @@
 	}
 
 	if (sigismember(&signalset, SIGABRT) != 0) {
-		#ifdef DEBUG
-			printf("sigismember did not return a 0 even though sigemptyset was just called\n");
-		#endif
+#ifdef DEBUG
+		printf
+		    ("sigismember did not return a 0 even though sigemptyset was just called\n");
+#endif
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/5-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/5-core.c
index 94fd46d..0a0ac87 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigismember/5-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigismember/5-core.c
@@ -32,29 +32,29 @@
 	}
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
 	if (sigismember(&signalset, signo) != -1) {
@@ -65,6 +65,6 @@
 		return PTS_FAIL;
 	}
 
-	printf ("errno set to EINVAL and sigismember returned -1\n");
+	printf("errno set to EINVAL and sigismember returned -1\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/1-1.c
index 46f7fe9..ca909b1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/1-1.c
@@ -33,19 +33,20 @@
 int main()
 {
 	if (signal(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (signal(SIGCHLD,SIG_DFL) != myhandler) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+	if (signal(SIGCHLD, SIG_DFL) != myhandler) {
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (handler_called == 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/2-1.c
index 17864a4..d4ddac5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/2-1.c
@@ -32,19 +32,20 @@
 int main()
 {
 	if (signal(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (signal(SIGCHLD,SIG_IGN) != myhandler) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+	if (signal(SIGCHLD, SIG_IGN) != myhandler) {
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (handler_called == 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/3-1.c
index 13c91ab..bd16e05 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/3-1.c
@@ -30,14 +30,15 @@
 int main()
 {
 	if (signal(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (handler_called != 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/5-1.c
index dfcb073..8b33329 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/5-1.c
@@ -35,19 +35,20 @@
 int main()
 {
 	if (signal(SIGUSR1, SIGUSR1_handler) == SIG_ERR) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	if (signal(SIGUSR2, SIGUSR2_handler) == SIG_ERR) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (signal(SIGUSR1,SIG_IGN) != SIGUSR1_handler) {
-		printf("signal did not return the last handler that was associated with SIGUSR1\n");
-               	return PTS_FAIL;
-        }
+	if (signal(SIGUSR1, SIG_IGN) != SIGUSR1_handler) {
+		printf
+		    ("signal did not return the last handler that was associated with SIGUSR1\n");
+		return PTS_FAIL;
+	}
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/6-1.c
index 4aef3e0..8b0169e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/6-1.c
@@ -27,13 +27,15 @@
 	errno = -1;
 
 	if (signal(-1, myhandler) != SIG_ERR) {
-                printf("Test FAILED: signal() didn't return SIG_ERR even though invalid signal number was passed to it\n");
-               	return PTS_FAIL;
-        }
+		printf
+		    ("Test FAILED: signal() didn't return SIG_ERR even though invalid signal number was passed to it\n");
+		return PTS_FAIL;
+	}
 
 	if (errno <= 0) {
-		printf("Test FAILED: errno wasn't set to a positive number even though invalid signal number was passed to the signal() function\n");
-               	return PTS_FAIL;
-        }
+		printf
+		    ("Test FAILED: errno wasn't set to a positive number even though invalid signal number was passed to the signal() function\n");
+		return PTS_FAIL;
+	}
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/signal/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/signal/7-1.c
index 77fe3e2..a2a8a1d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/signal/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/signal/7-1.c
@@ -27,13 +27,15 @@
 	errno = -1;
 
 	if (signal(SIGKILL, myhandler) != SIG_ERR) {
-                printf("Test FAILED: signal() didn't return SIG_ERR even though a non-catchable signal was passed to it\n");
-               	return PTS_FAIL;
-        }
+		printf
+		    ("Test FAILED: signal() didn't return SIG_ERR even though a non-catchable signal was passed to it\n");
+		return PTS_FAIL;
+	}
 
 	if (errno <= 0) {
-		printf("Test FAILED: errno wasn't set to a positive number even though a non-catchable signal was passed to the signal() function\n");
-               	return PTS_FAIL;
-        }
+		printf
+		    ("Test FAILED: errno wasn't set to a positive number even though a non-catchable signal was passed to the signal() function\n");
+		return PTS_FAIL;
+	}
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
index 6ab85ae..586a179 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
@@ -50,11 +50,11 @@
 	if (return_value == -1) {
 		if (errno == EINTR) {
 			printf("Test PASSED: sigpause returned -1 "
-					"and set errno to EINTR\n");
+			       "and set errno to EINTR\n");
 			result = 0;
 		} else {
 			printf("Test FAILED: sigpause did not "
-					"set errno to EINTR\n");
+			       "set errno to EINTR\n");
 			result = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-1.c
index 7e5eead..028172d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-1.c
@@ -24,15 +24,14 @@
 	sigset_t pendingset;
 
 	if ((sigemptyset(&blockset) == -1) ||
-		(sigemptyset(&prevset) == -1) ||
-		(sigemptyset(&pendingset) == -1)) {
+	    (sigemptyset(&prevset) == -1) || (sigemptyset(&pendingset) == -1)) {
 		printf("Could not call sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if ((sigaddset(&blockset, SIGUSR2) == -1) ||
-		(sigaddset(&blockset, SIGHUP) == -1) ||
-		(sigaddset(&blockset, SIGQUIT) == -1)) {
+	    (sigaddset(&blockset, SIGHUP) == -1) ||
+	    (sigaddset(&blockset, SIGQUIT) == -1)) {
 		perror("Error calling sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-2.c
index 7ed02fa..8178341 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-2.c
@@ -34,7 +34,7 @@
 
 void handler(int signo)
 {
-        sigset_t pendingset;
+	sigset_t pendingset;
 
 	if (sigemptyset(&pendingset) == -1) {
 		printf("Could not call sigemptyset()\n");
@@ -78,10 +78,10 @@
 
 int main()
 {
-        struct sigaction act;
+	struct sigaction act;
 
-        act.sa_handler = handler;
-        act.sa_flags = 0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		printf("Could not call sigemptyset()\n");
@@ -89,21 +89,21 @@
 	}
 
 	if ((sigaddset(&act.sa_mask, SIGCONT) == -1) ||
-		(sigaddset(&act.sa_mask, SIGHUP) == -1) ||
-		(sigaddset(&act.sa_mask, SIGUSR1) == -1)) {
+	    (sigaddset(&act.sa_mask, SIGHUP) == -1) ||
+	    (sigaddset(&act.sa_mask, SIGUSR1) == -1)) {
 		perror("Error calling sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
-        if (sigaction(SIGTTOU, &act, 0) == -1) {
-                perror("Could not call sigaction()");
-                return PTS_UNRESOLVED;
-        }
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
+		perror("Could not call sigaction()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (raise(SIGTTOU) == -1) {
-                perror("Could not raise SIGTTOU");
-                return PTS_UNRESOLVED;
-        }
+	if (raise(SIGTTOU) == -1) {
+		perror("Could not raise SIGTTOU");
+		return PTS_UNRESOLVED;
+	}
 	printf("This code should not be reachable\n");
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
index 6c671a8..e118ba5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/1-3.c
@@ -35,7 +35,7 @@
 
 void handler(int signo)
 {
-        sigset_t pendingset;
+	sigset_t pendingset;
 
 	if (sigemptyset(&pendingset) == -1) {
 		printf("Could not call sigemptyset()\n");
@@ -59,8 +59,8 @@
 	    sigismember(&pendingset, SIGCONT) == 1) {
 		printf("All pending signals found\n");
 		if ((sigismember(&pendingset, SIGHUP) == 0) &&
-			(sigismember(&pendingset, SIGABRT) == 0) &&
-			(sigismember(&pendingset, SIGUSR1) == 0)) {
+		    (sigismember(&pendingset, SIGABRT) == 0) &&
+		    (sigismember(&pendingset, SIGUSR1) == 0)) {
 			printf("Unsent signals not found\n");
 			printf("Test PASSED\n");
 			exit(0);
@@ -80,45 +80,45 @@
 {
 	sigset_t blockset;
 	sigset_t prevset;
-        struct sigaction act;
+	struct sigaction act;
 
-        act.sa_handler = handler;
-        act.sa_flags = 0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if ((sigemptyset(&blockset) == -1) ||
-		(sigemptyset(&prevset) == -1) ||
-		(sigemptyset(&act.sa_mask) == -1)) {
+	    (sigemptyset(&prevset) == -1) ||
+	    (sigemptyset(&act.sa_mask) == -1)) {
 		printf("Could not call sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
-        if ((sigaddset(&blockset, SIGUSR2) == -1) ||
-            (sigaddset(&blockset, SIGHUP) == -1)) {
-                perror("Error calling sigaddset()\n");
-                return PTS_UNRESOLVED;
-        }
-
-        if (sigprocmask(SIG_SETMASK, &blockset, &prevset) == -1) {
-                printf("Could not call sigprocmask()\n");
-                return PTS_UNRESOLVED;
-        }
-
-	if ((sigaddset(&act.sa_mask, SIGCONT) == -1) ||
-		(sigaddset(&act.sa_mask, SIGABRT) == -1) ||
-		(sigaddset(&act.sa_mask, SIGUSR1) == -1)) {
+	if ((sigaddset(&blockset, SIGUSR2) == -1) ||
+	    (sigaddset(&blockset, SIGHUP) == -1)) {
 		perror("Error calling sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
-        if (sigaction(SIGTTOU, &act, 0) == -1) {
-                perror("Could not call sigaction()");
-                return PTS_UNRESOLVED;
-        }
+	if (sigprocmask(SIG_SETMASK, &blockset, &prevset) == -1) {
+		printf("Could not call sigprocmask()\n");
+		return PTS_UNRESOLVED;
+	}
 
-        if (raise(SIGTTOU) == -1) {
-                perror("Could not raise SIGTTOU");
-                return PTS_UNRESOLVED;
-        }
+	if ((sigaddset(&act.sa_mask, SIGCONT) == -1) ||
+	    (sigaddset(&act.sa_mask, SIGABRT) == -1) ||
+	    (sigaddset(&act.sa_mask, SIGUSR1) == -1)) {
+		perror("Error calling sigaddset()\n");
+		return PTS_UNRESOLVED;
+	}
+
+	if (sigaction(SIGTTOU, &act, 0) == -1) {
+		perror("Could not call sigaction()");
+		return PTS_UNRESOLVED;
+	}
+
+	if (raise(SIGTTOU) == -1) {
+		perror("Could not raise SIGTTOU");
+		return PTS_UNRESOLVED;
+	}
 	printf("This code should not be reachable\n");
 	return PTS_UNRESOLVED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/2-1.c
index 3b6e42a..50831ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigpending/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigpending/2-1.c
@@ -23,8 +23,7 @@
 	sigset_t pendingset;
 
 	if ((sigemptyset(&blockset) == -1) ||
-		(sigemptyset(&prevset) == -1) ||
-		(sigemptyset(&pendingset) == -1)) {
+	    (sigemptyset(&prevset) == -1) || (sigemptyset(&pendingset) == -1)) {
 		printf("Could not call sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/10-1.c
index 3a5795f..9052fe5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/10-1.c
@@ -15,7 +15,8 @@
 #include <stdio.h>
 #include "posixtest.h"
 
-int main() {
+int main()
+{
 
 	sigset_t set1, set2;
 	int sigprocmask_return_val = 1;
@@ -36,7 +37,8 @@
 		return PTS_FAIL;
 	}
 	if (sigprocmask_return_val == -1) {
-		printf("FAIL: sigprocmask returned -1. System should be able to enforce blocking un-ignorable signals without causing sigprocmask() to return -1.\n");
+		printf
+		    ("FAIL: sigprocmask returned -1. System should be able to enforce blocking un-ignorable signals without causing sigprocmask() to return -1.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/12-1.c
index b7d8000..57c5036 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/12-1.c
@@ -25,10 +25,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set) {
+int is_changed(sigset_t set)
+{
 
 	int i;
-	int siglist[] = {SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -40,28 +41,31 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if (sigismember(&set, siglist[i]) != 0)
-		return 1;
+			return 1;
 	}
 	return 0;
 }
 
-int get_rand() {
+int get_rand()
+{
 
 	int r;
-	r=rand();
+	r = rand();
 	while ((r == SIG_BLOCK) || (r == SIG_SETMASK) || (r == SIG_UNBLOCK)) {
 		r = get_rand();
 	}
 	return r;
 }
 
-int main() {
+int main()
+{
 
-	int r=get_rand();
+	int r = get_rand();
 	sigset_t actl, oactl;
 
 	sigemptyset(&actl);
@@ -72,7 +76,8 @@
 
 	sigaddset(&actl, SIGALRM);
 	if (sigprocmask(r, &actl, NULL) != -1) {
-		perror("sigprocmask() did not fail even though invalid how parameter was passed to it.\n");
+		perror
+		    ("sigprocmask() did not fail even though invalid how parameter was passed to it.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/15-1.c
index d347a7f..bbacffd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/15-1.c
@@ -19,7 +19,7 @@
 {
 
 	sigset_t set;
-	sigaddset (&set, SIGABRT);
+	sigaddset(&set, SIGABRT);
 
 	if (sigprocmask(SIG_SETMASK, &set, NULL) != 0) {
 		perror("sigprocmask failed -- returned -- test aborted");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/17-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/17-core.c
index 5c9b130..f2434d8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/17-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/17-core.c
@@ -25,43 +25,43 @@
 int main(int argc, char *argv[])
 {
 	int signo;
-	int r=rand();
+	int r = rand();
 	sigset_t set;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
 	sigaddset(&set, SIGABRT);
 
 	if (sigprocmask(r, &set, NULL) == -1) {
 		if (EINVAL == errno) {
-			printf ("errno set to EINVAL\n");
+			printf("errno set to EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf ("errno not set to EINVAL\n");
+			printf("errno not set to EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/4-1.c
index 3c8722c..0778cc6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/4-1.c
@@ -35,25 +35,27 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_SETMASK, &blocked_set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_BLOCK, &blocked_set2, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -73,7 +75,8 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if ((sigismember(&pending_set, SIGABRT) != 1) | (sigismember(&pending_set, SIGUSR2) != 1)) {
+	if ((sigismember(&pending_set, SIGABRT) !=
+	     1) | (sigismember(&pending_set, SIGUSR2) != 1)) {
 		perror("FAIL: sigismember did not return 1\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/5-1.c
index 01622cf..e7157ac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/5-1.c
@@ -30,14 +30,15 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_SETMASK, &blocked_set, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -58,7 +59,8 @@
 	}
 
 	if (sigismember(&pending_set, SIGABRT) == -1) {
-		perror("Unexpected error while attempting to use sigismember.\n");
+		perror
+		    ("Unexpected error while attempting to use sigismember.\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/6-1.c
index a9c3a23..a039751 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/6-1.c
@@ -38,25 +38,27 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigaction(SIGUSR2,  &act, 0) == -1) {
+	if (sigaction(SIGUSR2, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_SETMASK, &set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_UNBLOCK, &set2, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -67,7 +69,8 @@
 	}
 
 	if (!handler_called) {
-		printf("FAIL: Handler was not called for even though signal was removed from the signal mask\n");
+		printf
+		    ("FAIL: Handler was not called for even though signal was removed from the signal mask\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -79,7 +82,8 @@
 	}
 
 	if (handler_called) {
-		printf("FAIL: Hanlder was called for even though signal should have been in the signal mask\n");
+		printf
+		    ("FAIL: Hanlder was called for even though signal should have been in the signal mask\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/7-1.c
index 4ce4e0f..06ce8b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/7-1.c
@@ -24,9 +24,9 @@
 int main()
 {
 	sigset_t oactl, tempset;
-	int i, j, test_failed=0;
+	int i, j, test_failed = 0;
 
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -38,15 +38,16 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		sigemptyset(&oactl);
 		sigemptyset(&tempset);
 		sigaddset(&tempset, siglist[i]);
 		sigprocmask(SIG_BLOCK, &tempset, &oactl);
 		if (i > 0) {
-			for (j=0; j<i; j++) {
+			for (j = 0; j < i; j++) {
 				if (sigismember(&oactl, siglist[j]) != 1) {
 					test_failed = 1;
 				}
@@ -59,6 +60,7 @@
 		return PTS_FAIL;
 	}
 
-	printf("Test PASSED: oactl did contain all signals that were added to the signal mask.\n");
+	printf
+	    ("Test PASSED: oactl did contain all signals that were added to the signal mask.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-1.c
index a44b541..3ebfd6e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-1.c
@@ -21,10 +21,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -36,12 +37,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -51,7 +53,8 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	sigset_t actl, oactl;
 
 	sigemptyset(&actl);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-2.c
index 30091c9..fb59b81 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-2.c
@@ -22,10 +22,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -37,12 +38,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -52,7 +54,8 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	sigset_t actl, oactl;
 
 	sigemptyset(&actl);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-3.c
index 0d0c131..6939455 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-3.c
@@ -21,10 +21,11 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -36,12 +37,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -51,7 +53,8 @@
 	return 0;
 }
 
-int main() {
+int main()
+{
 	sigset_t actl, oactl;
 
 	sigemptyset(&actl);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/9-1.c
index 5c36342..7db46b2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/9-1.c
@@ -24,13 +24,14 @@
 #include "posixtest.h"
 
 int handler_called = 0;
-int sigprocmask_return_val = 1; /* some value that's not a 1 or 0 */
+int sigprocmask_return_val = 1;	/* some value that's not a 1 or 0 */
 
 void handler(int signo)
 {
 	handler_called = 1;
 	if (sigprocmask_return_val != 1) {
-		printf("FAIL: sigprocmask() returned before signal was delivered.\n");
+		printf
+		    ("FAIL: sigprocmask() returned before signal was delivered.\n");
 		exit(PTS_FAIL);
 	}
 }
@@ -46,14 +47,15 @@
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
 	}
 
 	if (sigprocmask(SIG_SETMASK, &blocked_set1, NULL) == -1) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
@@ -66,15 +68,18 @@
 	sigprocmask_return_val = sigprocmask(SIG_UNBLOCK, &blocked_set1, NULL);
 
 	if (sigprocmask_return_val != 0) {
-		perror("Unexpected error while attempting to use sigprocmask.\n");
+		perror
+		    ("Unexpected error while attempting to use sigprocmask.\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (handler_called != 1) {
-		perror("Handler wasn't called, implying signal was not delivered.\n");
+		perror
+		    ("Handler wasn't called, implying signal was not delivered.\n");
 		return PTS_UNRESOLVED;
 	}
 
-	printf("Test PASSED: signal was delivered before the call to sigprocmask returned.\n");
+	printf
+	    ("Test PASSED: signal was delivered before the call to sigprocmask returned.\n");
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/1-1.c
index 6518dd6..b59e841 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/1-1.c
@@ -29,9 +29,11 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	if ((signo == SIGTOTEST) && (info->si_value.sival_int == VALTOTEST)) {
-		printf("sigqueue()'s signo and value parameters were passed to the child process.\n");
+		printf
+		    ("sigqueue()'s signo and value parameters were passed to the child process.\n");
 		exit(1);
 	}
 }
@@ -43,8 +45,8 @@
 	if ((pid = fork()) == 0) {
 		/* child here */
 		struct sigaction act;
-		act.sa_flags=SA_SIGINFO;
-		act.sa_sigaction=myhandler;
+		act.sa_flags = SA_SIGINFO;
+		act.sa_sigaction = myhandler;
 		sigemptyset(&act.sa_mask);
 		sigaction(SIGTOTEST, &act, 0);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/10-1.c
index 11a8318..cb2b2c9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/10-1.c
@@ -24,13 +24,14 @@
 {
 	int failure = 0;
 	union sigval value;
-	value.sival_int = 0; /* 0 is just an arbitrary value */
+	value.sival_int = 0;	/* 0 is just an arbitrary value */
 
 	if (-1 == sigqueue(getpid(), -1, value)) {
 		if (EINVAL == errno) {
 			printf("EINVAL error received\n");
 		} else {
-			printf("sigqueue() failed on EINVAL but errno not set correctly\n");
+			printf
+			    ("sigqueue() failed on EINVAL but errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/11-1.c
index be7355c..a9665ea 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/11-1.c
@@ -24,13 +24,14 @@
 {
 	int failure = 0;
 	union sigval value;
-	value.sival_int = 0; /* 0 is just an arbitrary value */
+	value.sival_int = 0;	/* 0 is just an arbitrary value */
 
 	if (-1 == sigqueue(999999, 0, value)) {
 		if (ESRCH == errno) {
 			printf("ESRCH error received\n");
 		} else {
-			printf("sigqueue() failed on ESRCH but errno not set correctly\n");
+			printf
+			    ("sigqueue() failed on ESRCH but errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/12-1.c
index d46602f..3869fb1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/12-1.c
@@ -42,7 +42,8 @@
 	/* setuid will change uid, euid */
 	if (setuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -58,23 +59,24 @@
 {
 	int failure = 0;
 	union sigval value;
-	value.sival_int = 0; /* 0 is just an arbitrary value */
+	value.sival_int = 0;	/* 0 is just an arbitrary value */
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	if (-1 == sigqueue(1, 0, value)) {
 		if (EPERM == errno) {
 			printf("EPERM error received\n");
 		} else {
-			printf("sigqueue() failed but errno not set correctly\n");
+			printf
+			    ("sigqueue() failed but errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/2-2.c
index cadaa46..58b526e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/2-2.c
@@ -32,7 +32,7 @@
 {
 	int failure = 0;
 	union sigval value;
-	value.sival_int = 0; /* 0 is just an arbitrary value */
+	value.sival_int = 0;	/* 0 is just an arbitrary value */
 
 	/*
 	 * ESRCH
@@ -41,7 +41,8 @@
 		if (ESRCH == errno) {
 			printf("ESRCH error received\n");
 		} else {
-			printf("sigqueue() failed on ESRCH but errno not set correctly\n");
+			printf
+			    ("sigqueue() failed on ESRCH but errno not set correctly\n");
 			failure = 1;
 		}
 	} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/3-1.c
index ab756f4..fb2a8c4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/3-1.c
@@ -45,7 +45,8 @@
 
 	if (setuid(pw->pw_uid) != 0) {
 		if (errno == EPERM) {
-			printf("You don't have permission to change your UID.\n");
+			printf
+			    ("You don't have permission to change your UID.\n");
 			return 1;
 		}
 		perror("An error occurs when calling seteuid()");
@@ -63,18 +64,19 @@
 	union sigval value;
 	value.sival_int = 0;	/* 0 is just an arbitrary value */
 
-        /* We assume process Number 1 is created by root */
-        /* and can only be accessed by root */
-        /* This test should be run under standard user permissions */
-        if (getuid() == 0) {
-                if (set_nonroot() != 0) {
+	/* We assume process Number 1 is created by root */
+	/* and can only be accessed by root */
+	/* This test should be run under standard user permissions */
+	if (getuid() == 0) {
+		if (set_nonroot() != 0) {
 			printf("Cannot run this test as non-root user\n");
 			return PTS_UNTESTED;
 		}
-        }
+	}
 
 	if (sigqueue(1, 0, value) != -1) {
-		printf("Test FAILED: sigqueue() succeeded even though this program's user id did not match the recieving process's user id\n");
+		printf
+		    ("Test FAILED: sigqueue() succeeded even though this program's user id did not match the recieving process's user id\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/4-1.c
index a9825a0..f851bdb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/4-1.c
@@ -32,7 +32,8 @@
 
 int counter = 0;
 
-void myhandler(int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	counter++;
 }
 
@@ -51,23 +52,28 @@
 
 	sighold(SIGTOTEST);
 
-	for (i=0; i<NUMCALLS; i++) {
+	for (i = 0; i < NUMCALLS; i++) {
 		value.sival_int = i;	/* i is just an arbitrary value */
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
-			printf("Test UNRESOLVED: call to sigqueue did not return success\n");
+			printf
+			    ("Test UNRESOLVED: call to sigqueue did not return success\n");
 			return PTS_UNRESOLVED;
 		}
 	}
 
 	if (0 != counter) {
-		printf("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n", SIGTOTEST);
+		printf
+		    ("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n",
+		     SIGTOTEST);
 		return PTS_UNRESOLVED;
 	}
 
 	sigrelse(SIGTOTEST);
 
 	if (NUMCALLS != counter) {
-		printf("Test FAILED: %d was queued %d time(s) even though sigqueue was called %d time(s) for %d\n", SIGTOTEST, counter, NUMCALLS, SIGTOTEST);
+		printf
+		    ("Test FAILED: %d was queued %d time(s) even though sigqueue was called %d time(s) for %d\n",
+		     SIGTOTEST, counter, NUMCALLS, SIGTOTEST);
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/5-1.c
index 1e9953c..4d72d91 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/5-1.c
@@ -32,7 +32,8 @@
 
 int counter = 0;
 
-void myhandler(int signo) {
+void myhandler(int signo)
+{
 	counter++;
 }
 
@@ -52,24 +53,28 @@
 
 	sighold(SIGTOTEST);
 
-	for (i=0; i<NUMCALLS; i++) {
+	for (i = 0; i < NUMCALLS; i++) {
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
-			printf("Test UNRESOLVED: call to sigqueue did not return success\n");
+			printf
+			    ("Test UNRESOLVED: call to sigqueue did not return success\n");
 			return PTS_UNRESOLVED;
 		}
 	}
 
 	if (0 != counter) {
-		printf("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n", SIGTOTEST);
+		printf
+		    ("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n",
+		     SIGTOTEST);
 		return PTS_UNRESOLVED;
 	}
 
 	sigrelse(SIGTOTEST);
 
 	if (counter < 1) {
-		printf("Test FAILED: %d was not received even once\n", SIGTOTEST);
+		printf("Test FAILED: %d was not received even once\n",
+		       SIGTOTEST);
 		return PTS_FAIL;
 	}
-	printf ("Test PASSED: %d was received %d times.\n", SIGTOTEST, counter);
+	printf("Test PASSED: %d was received %d times.\n", SIGTOTEST, counter);
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/6-1.c
index 995631d..76fb19e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/6-1.c
@@ -38,10 +38,12 @@
 int return_val = 1;
 int handler_called = 0;
 
-void myhandler(int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	handler_called = 1;
 	if (return_val != 1) {
-		printf("Test FAILED: sigqueue() seems to have returned before handler finished executing.\n");
+		printf
+		    ("Test FAILED: sigqueue() seems to have returned before handler finished executing.\n");
 		exit(1);
 	}
 }
@@ -61,7 +63,8 @@
 	pid = getpid();
 
 	if ((return_val = sigqueue(pid, SIGTOTEST, value)) != 0) {
-		printf("Test UNRESOLVED: call to sigqueue did not return success\n");
+		printf
+		    ("Test UNRESOLVED: call to sigqueue did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/7-1.c
index 0d471ef..cba0cf1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/7-1.c
@@ -35,8 +35,9 @@
 int last_signal = 0;
 int test_failed = 0;
 
-void myhandler(int signo, siginfo_t *info, void *context) {
-	printf ("%d, ", signo);
+void myhandler(int signo, siginfo_t * info, void *context)
+{
+	printf("%d, ", signo);
 	if (last_signal >= signo) {
 		test_failed = 1;
 	}
@@ -55,7 +56,7 @@
 
 	sigemptyset(&mask);
 
-	for (rtsig=SIGRTMAX; rtsig>=SIGRTMIN; rtsig--) {
+	for (rtsig = SIGRTMAX; rtsig >= SIGRTMIN; rtsig--) {
 		sigaddset(&act.sa_mask, rtsig);
 		sighold(rtsig);
 		sigaddset(&mask, rtsig);
@@ -64,10 +65,11 @@
 	pid = getpid();
 	value.sival_int = 5;	/* 5 is just an arbitrary value */
 
-	for (rtsig=SIGRTMAX; rtsig>=SIGRTMIN; rtsig--) {
+	for (rtsig = SIGRTMAX; rtsig >= SIGRTMIN; rtsig--) {
 		sigaction(rtsig, &act, 0);
 		if (sigqueue(pid, rtsig, value) != 0) {
-			printf("Test UNRESOLVED: call to sigqueue did not return success\n");
+			printf
+			    ("Test UNRESOLVED: call to sigqueue did not return success\n");
 			return PTS_UNRESOLVED;
 		}
 	}
@@ -76,7 +78,8 @@
 	printf("\n");
 
 	if (test_failed == 1) {
-		printf("Test FAILED: A pending signal was delivered even though a smaller one is still pending.\n");
+		printf
+		    ("Test FAILED: A pending signal was delivered even though a smaller one is still pending.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/8-1.c
index 682a9f2..9fd7887 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/8-1.c
@@ -33,7 +33,8 @@
 
 int counter = 0;
 
-void myhandler(int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	counter++;
 }
 
@@ -53,22 +54,27 @@
 
 	sighold(SIGTOTEST);
 
-	for (i=0; i<NUMCALLS; i++) {
+	for (i = 0; i < NUMCALLS; i++) {
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
-			printf("Test FAILED: call to sigqueue did not return success\n");
+			printf
+			    ("Test FAILED: call to sigqueue did not return success\n");
 			return PTS_FAIL;
 		}
 	}
 
 	if (0 != counter) {
-		printf("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n", SIGTOTEST);
+		printf
+		    ("Test UNRESOLVED: handler called even though %d has not been removed from the signal mask\n",
+		     SIGTOTEST);
 		return PTS_UNRESOLVED;
 	}
 
 	sigrelse(SIGTOTEST);
 
 	if (NUMCALLS != counter) {
-		printf("Test UNRESOLVED: %d was queued %d time(s) even though sigqueue was called %d time(s) for %d\n", SIGTOTEST, counter, NUMCALLS, SIGTOTEST);
+		printf
+		    ("Test UNRESOLVED: %d was queued %d time(s) even though sigqueue was called %d time(s) for %d\n",
+		     SIGTOTEST, counter, NUMCALLS, SIGTOTEST);
 		return PTS_UNRESOLVED;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/9-1.c
index 443de1f..2c28981 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/9-1.c
@@ -81,7 +81,7 @@
 	for (i = 0; i < syslimit; i++) {
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
 			printf("Failed: sigqueue on %d of %d max, errno: %s\n",
-				i, syslimit, strerror(errno));
+			       i, syslimit, strerror(errno));
 			return PTS_UNRESOLVED;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/1-1.c
index 07e9a7b..cf319d6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/1-1.c
@@ -37,7 +37,7 @@
 	act.sa_handler = handler;
 	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
-	if (sigaction(SIGABRT,  &act, 0) == -1) {
+	if (sigaction(SIGABRT, &act, 0) == -1) {
 		perror("Unexpected error while attempting to setup test "
 		       "pre-conditions");
 		return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/3-core.c b/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/3-core.c
index 56ffa83..eb1f8ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/3-core.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigrelse/3-core.c
@@ -32,71 +32,70 @@
 	struct sigaction sa, osa;
 
 	if (argc < 2) {
-        	printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
 		return PTS_UNRESOLVED;
 	}
 
 	/*
-		Various error conditions
-	*/
+	   Various error conditions
+	 */
 	switch (argv[1][0]) {
-		case '1':
-			signo=-1;
-			break;
-		case '2':
-			signo=-10000;
-			break;
-		case '3':
-			signo=INT32_MIN+1;
-			break;
-		case '4':
-			signo=INT32_MIN;
-			break;
-		default:
-			printf("Usage:  %s [1|2|3|4]\n", argv[0]);
-			return PTS_UNRESOLVED;
+	case '1':
+		signo = -1;
+		break;
+	case '2':
+		signo = -10000;
+		break;
+	case '3':
+		signo = INT32_MIN + 1;
+		break;
+	case '4':
+		signo = INT32_MIN;
+		break;
+	default:
+		printf("Usage:  %s [1|2|3|4]\n", argv[0]);
+		return PTS_UNRESOLVED;
 	}
 
 	/* special sig11 case */
-        sa.sa_handler = &sig11_handler;
-        sigemptyset(&sa.sa_mask);
-        sa.sa_flags = 0;
+	sa.sa_handler = &sig11_handler;
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
 
-        sigaction(SIGSEGV, NULL, &osa);
-        sigaction(SIGSEGV, &sa, NULL);
+	sigaction(SIGSEGV, NULL, &osa);
+	sigaction(SIGSEGV, &sa, NULL);
 
-        if (setjmp(sig11_recover)) {
-              errno = EINVAL;
-              TEST_RETURN=-2;
-        } else {
-              TEST_RETURN=sigrelse(signo);
-        }
-        sigaction(SIGSEGV, &osa, NULL);
+	if (setjmp(sig11_recover)) {
+		errno = EINVAL;
+		TEST_RETURN = -2;
+	} else {
+		TEST_RETURN = sigrelse(signo);
+	}
+	sigaction(SIGSEGV, &osa, NULL);
 
-        if (TEST_RETURN == -1) {
-                if (EINVAL == errno) {
-                        printf ("errno set to EINVAL\n");
-                        return PTS_PASS;
-                } else {
-                        printf ("errno not set to EINVAL\n");
-                        return PTS_FAIL;
-                }
-        }
+	if (TEST_RETURN == -1) {
+		if (EINVAL == errno) {
+			printf("errno set to EINVAL\n");
+			return PTS_PASS;
+		} else {
+			printf("errno not set to EINVAL\n");
+			return PTS_FAIL;
+		}
+	}
 	if (TEST_RETURN == -2) {
-                printf ("test received SIGSEGV\n");
-                return PTS_UNRESOLVED;
-        }
+		printf("test received SIGSEGV\n");
+		return PTS_UNRESOLVED;
+	}
 
-        printf("sigrelse did not return -1\n");
-        return PTS_FAIL;
+	printf("sigrelse did not return -1\n");
+	return PTS_FAIL;
 
 }
 
 /******************************************************************
  * sig11_handler() - our segfault recover hack
  ******************************************************************/
-void
-sig11_handler(int sig)
+void sig11_handler(int sig)
 {
-    longjmp(sig11_recover, 1);
+	longjmp(sig11_recover, 1);
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/1-1.c
index 4934160..1dca365 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/1-1.c
@@ -41,19 +41,20 @@
 	sigemptyset(&act.sa_mask);
 
 	if (sigaction(SIGCHLD, &act, 0) != 0) {
-                perror("Unexpected error while using sigaction()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigaction()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (sigset(SIGCHLD,SIG_DFL) != myhandler) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+	if (sigset(SIGCHLD, SIG_DFL) != myhandler) {
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (handler_called == 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/10-1.c
index 1d0cacd..225b047 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/10-1.c
@@ -20,13 +20,15 @@
 
 int main()
 {
-        if (sigset(SIGKILL,SIG_IGN) == SIG_ERR) {
+	if (sigset(SIGKILL, SIG_IGN) == SIG_ERR) {
 		if (errno != EINVAL) {
-			printf("Test FAILED: sigset() returned SIG_ERR but didn't set errno to EINVAL\n");
+			printf
+			    ("Test FAILED: sigset() returned SIG_ERR but didn't set errno to EINVAL\n");
 			return PTS_FAIL;
 		}
 	} else {
-		printf("Test FAILED: sigset() didn't return SIG_ERROR even though SIGKILL was passed to it\n");
+		printf
+		    ("Test FAILED: sigset() didn't return SIG_ERROR even though SIGKILL was passed to it\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/2-1.c
index f4f6c8b..c2a5ddf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/2-1.c
@@ -39,19 +39,20 @@
 	sigemptyset(&act.sa_mask);
 
 	if (sigaction(SIGUSR1, &act, 0) != 0) {
-                perror("Unexpected error while using sigaction()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigaction()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (sigset(SIGUSR1,SIG_IGN) != myhandler) {
-                perror("Unexpected error while using signal()");
-               	return PTS_UNRESOLVED;
-        }
+	if (sigset(SIGUSR1, SIG_IGN) != myhandler) {
+		perror("Unexpected error while using signal()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGUSR1);
 
 	if (handler_called == 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/3-1.c
index 3fed8da..6724eed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/3-1.c
@@ -32,14 +32,15 @@
 int main()
 {
 	if (sigset(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using sigset()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigset()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (handler_called != 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/4-1.c
index 89b7391..8288b01 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/4-1.c
@@ -32,14 +32,15 @@
 int main()
 {
 	if (sigset(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using sigset()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigset()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 
 	if (signal_blocked != 1) {
-		printf("Test FAILED: handler was called even though default was expected\n");
+		printf
+		    ("Test FAILED: handler was called even though default was expected\n");
 		return PTS_FAIL;
 	}
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c
index 7e25c78..a253aa9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c
@@ -25,14 +25,15 @@
 
 #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0]))
 
-int is_empty(sigset_t *set) {
+int is_empty(sigset_t * set)
+{
 
-        int i;
-        int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
-                SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
-                SIGPIPE, SIGQUIT, SIGSEGV,
-                SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
-                SIGUSR1, SIGUSR2,
+	int i;
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
+		SIGPIPE, SIGQUIT, SIGSEGV,
+		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
+		SIGUSR1, SIGUSR2,
 #ifdef SIGPOLL
 		SIGPOLL,
 #endif
@@ -40,13 +41,14 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-                SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
-        for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if (sigismember(set, siglist[i]) != 0)
 			return 0;
-        }
-        return 1;
+	}
+	return 1;
 }
 
 void myhandler(int signo)
@@ -64,9 +66,9 @@
 	}
 
 	if (sigset(SIGCHLD, myhandler) == SIG_ERR) {
-                perror("Unexpected error while using sigset()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigset()");
+		return PTS_UNRESOLVED;
+	}
 
 	raise(SIGCHLD);
 	sigprocmask(SIG_SETMASK, NULL, &mask);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
index 70b4c5b..a28313e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
@@ -30,7 +30,7 @@
 		return PTS_FAIL;
 	}
 
-        if (sigset(SIGCHLD, SIG_HOLD) != SIG_HOLD) {
+	if (sigset(SIGCHLD, SIG_HOLD) != SIG_HOLD) {
 		printf("Test FAILED: sigset() didn't return SIG_HOLD\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/9-1.c
index 7fd916c..e73624d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/9-1.c
@@ -30,14 +30,15 @@
 	sigemptyset(&act.sa_mask);
 
 	if (sigaction(SIGUSR1, &act, 0) != 0) {
-                perror("Unexpected error while using sigaction()");
-               	return PTS_UNRESOLVED;
-        }
+		perror("Unexpected error while using sigaction()");
+		return PTS_UNRESOLVED;
+	}
 
-        if (sigset(SIGUSR1,SIG_DFL) != myhandler) {
-		printf("Test FAILED: sigset didn't return myhandler even though it was SIGUSR1's original disposition\n");
-               	return PTS_FAIL;
-        }
+	if (sigset(SIGUSR1, SIG_DFL) != myhandler) {
+		printf
+		    ("Test FAILED: sigset didn't return myhandler even though it was SIGUSR1's original disposition\n");
+		return PTS_FAIL;
+	}
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/1-1.c
index 178f644..3d5dbc5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/1-1.c
@@ -57,8 +57,7 @@
 		if (SIGUSR2_called == 1) {
 			exit(1);
 		}
-	}
-	else if (signo == SIGUSR2) {
+	} else if (signo == SIGUSR2) {
 		printf("SIGUSR2 called. Inside handler\n");
 		SIGUSR2_called = 1;
 		if (SIGUSR1_called == 1)
@@ -76,36 +75,38 @@
 	if (pid == 0) {
 		/* child */
 
-	        sigset_t tempmask, originalmask;
+		sigset_t tempmask, originalmask;
 
-	        struct sigaction act;
+		struct sigaction act;
 
-	        act.sa_handler = handler;
-	        act.sa_flags=0;
-	        sigemptyset(&act.sa_mask);
+		act.sa_handler = handler;
+		act.sa_flags = 0;
+		sigemptyset(&act.sa_mask);
 
-	        sigemptyset(&tempmask);
+		sigemptyset(&tempmask);
 		sigaddset(&tempmask, SIGUSR2);
 
-	        if (sigaction(SIGUSR1,  &act, 0) == -1) {
-	                perror("Unexpected error while attempting to pre-conditions");
-                	return PTS_UNRESOLVED;
-	        }
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
+			perror
+			    ("Unexpected error while attempting to pre-conditions");
+			return PTS_UNRESOLVED;
+		}
 
-	        if (sigaction(SIGUSR2,  &act, 0) == -1) {
-	                perror("Unexpected error while attempting to pre-conditions");
-                	return PTS_UNRESOLVED;
-	        }
+		if (sigaction(SIGUSR2, &act, 0) == -1) {
+			perror
+			    ("Unexpected error while attempting to pre-conditions");
+			return PTS_UNRESOLVED;
+		}
 
-	        sigemptyset(&originalmask);
+		sigemptyset(&originalmask);
 		sigaddset(&originalmask, SIGUSR1);
 		sigprocmask(SIG_SETMASK, &originalmask, NULL);
 
 		printf("suspending child\n");
-	        if (sigsuspend(&tempmask) != -1)
-	                perror("sigsuspend error");
+		if (sigsuspend(&tempmask) != -1)
+			perror("sigsuspend error");
 
-	        printf("returned from suspend\n");
+		printf("returned from suspend\n");
 		sleep(1);
 		return 2;
 
@@ -117,14 +118,15 @@
 		sleep(3);
 
 		printf("parent sending child a SIGUSR2 signal\n");
-		kill (pid, SIGUSR2);
+		kill(pid, SIGUSR2);
 
 		if (SIGUSR2_called == 1) {
-                        printf("Test FAILED: sigsuspend did not add SIGUSR2 to the temporary mask\n");
-                        return PTS_FAIL;
+			printf
+			    ("Test FAILED: sigsuspend did not add SIGUSR2 to the temporary mask\n");
+			return PTS_FAIL;
 		}
 		printf("parent sending child a SIGUSR1 signal\n");
-		kill (pid, SIGUSR1);
+		kill(pid, SIGUSR1);
 
 		if (wait(&s) == -1) {
 			perror("Unexpected error while setting up test "
@@ -141,15 +143,17 @@
 
 		printf("Exit status from child is %d\n", exit_status);
 
-                if (exit_status == 1) {
-                        printf("Test UNRESOLVED: Either sigsuspend did not successfully block SIGUSR2, OR sigsuspend returned before handling the signal SIGUSR1\n");
-                        return PTS_UNRESOLVED;
-                }
+		if (exit_status == 1) {
+			printf
+			    ("Test UNRESOLVED: Either sigsuspend did not successfully block SIGUSR2, OR sigsuspend returned before handling the signal SIGUSR1\n");
+			return PTS_UNRESOLVED;
+		}
 
-                if (exit_status == 2) {
-                        printf("Test FAILED: sigsuspend did not suspend the child\n");
-                        return PTS_FAIL;
-                }
+		if (exit_status == 2) {
+			printf
+			    ("Test FAILED: sigsuspend did not suspend the child\n");
+			return PTS_FAIL;
+		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/3-1.c
index d6b3370..31e3c59 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/3-1.c
@@ -37,17 +37,18 @@
 	if (pid == 0) {
 		/* child */
 
-	        sigset_t tempmask;
+		sigset_t tempmask;
 
-	        sigemptyset(&tempmask);
+		sigemptyset(&tempmask);
 
 		printf("suspending child\n");
-	        if (sigsuspend(&tempmask) != -1) {
-	                perror("sigsuspend error");
+		if (sigsuspend(&tempmask) != -1) {
+			perror("sigsuspend error");
 			return 1;
 		}
 
-	        printf("Test FAILED: Should not have returned from sigsuspend\n");
+		printf
+		    ("Test FAILED: Should not have returned from sigsuspend\n");
 		return 2;
 
 	} else {
@@ -58,7 +59,7 @@
 		sleep(1);
 
 		printf("parent sending child a SIGABRT signal\n");
-		kill (pid, SIGABRT);
+		kill(pid, SIGABRT);
 
 		if (wait(&s) == -1) {
 			perror("Unexpected error while setting up test "
@@ -70,15 +71,17 @@
 
 		printf("Exit status from child is %d\n", exit_status);
 
-                if (exit_status == 1) {
-                        printf("Test UNRESOLVED: sigsuspend in child process was not successful\n");
-                        return PTS_UNRESOLVED;
-                }
+		if (exit_status == 1) {
+			printf
+			    ("Test UNRESOLVED: sigsuspend in child process was not successful\n");
+			return PTS_UNRESOLVED;
+		}
 
-                if (exit_status == 2) {
-                        printf("Test FAILED: sigsuspend did not suspend the child\n");
-                        return PTS_FAIL;
-                }
+		if (exit_status == 2) {
+			printf
+			    ("Test FAILED: sigsuspend did not suspend the child\n");
+			return PTS_FAIL;
+		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/4-1.c
index a65e5ff..f2edb19 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/4-1.c
@@ -39,10 +39,11 @@
 {
 }
 
-int is_changed(sigset_t set, int sig) {
+int is_changed(sigset_t set, int sig)
+{
 
 	int i;
-	int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
+	int siglist[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD,
 		SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT,
 		SIGPIPE, SIGQUIT, SIGSEGV,
 		SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU,
@@ -54,12 +55,13 @@
 		SIGPROF,
 #endif
 		SIGSYS,
-		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ };
+		SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ
+	};
 
 	if (sigismember(&set, sig) != 1) {
 		return 1;
 	}
-	for (i=0; i<NUMSIGNALS; i++) {
+	for (i = 0; i < NUMSIGNALS; i++) {
 		if ((siglist[i] != sig)) {
 			if (sigismember(&set, siglist[i]) != 0) {
 				return 1;
@@ -77,36 +79,38 @@
 	if (pid == 0) {
 		/* child */
 
-	        sigset_t tempmask, originalmask, currentmask;
+		sigset_t tempmask, originalmask, currentmask;
 
-	        struct sigaction act;
+		struct sigaction act;
 
-	        act.sa_handler = handler;
-	        act.sa_flags=0;
-	        sigemptyset(&act.sa_mask);
+		act.sa_handler = handler;
+		act.sa_flags = 0;
+		sigemptyset(&act.sa_mask);
 
-	        sigemptyset(&tempmask);
+		sigemptyset(&tempmask);
 		sigaddset(&tempmask, SIGUSR2);
 
-	        if (sigaction(SIGUSR1, &act, 0) == -1) {
-	                perror("Unexpected error while attempting to pre-conditions");
-                	return PTS_UNRESOLVED;
-	        }
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
+			perror
+			    ("Unexpected error while attempting to pre-conditions");
+			return PTS_UNRESOLVED;
+		}
 
-	        sigemptyset(&originalmask);
+		sigemptyset(&originalmask);
 		sigaddset(&originalmask, SIGUSR1);
 		sigprocmask(SIG_SETMASK, &originalmask, NULL);
 
 		printf("suspending child\n");
-	        if (sigsuspend(&tempmask) != -1)
-	                perror("sigsuspend error");
+		if (sigsuspend(&tempmask) != -1)
+			perror("sigsuspend error");
 
-	        printf("returned from suspend\n");
+		printf("returned from suspend\n");
 
 		sigprocmask(SIG_SETMASK, NULL, &currentmask);
 
 		if (is_changed(currentmask, SIGUSR1) != 0) {
-			printf("signal mask was not restored properly after sigsuspend returned\n");
+			printf
+			    ("signal mask was not restored properly after sigsuspend returned\n");
 			return 1;
 		}
 		return 0;
@@ -119,7 +123,7 @@
 		sleep(1);
 
 		printf("parent sending child a SIGUSR1 signal\n");
-		kill (pid, SIGUSR1);
+		kill(pid, SIGUSR1);
 
 		if (wait(&s) == -1) {
 			perror("Unexpected error while setting up test "
@@ -136,9 +140,9 @@
 
 		printf("Exit status from child is %d\n", exit_status);
 
-                if (exit_status == 1) {
-                        return PTS_FAIL;
-                }
+		if (exit_status == 1) {
+			return PTS_FAIL;
+		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/6-1.c
index ee9852f..d16952a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/6-1.c
@@ -38,27 +38,28 @@
 	if (pid == 0) {
 		/* child */
 
-	        sigset_t tempmask;
+		sigset_t tempmask;
 
-	        struct sigaction act;
+		struct sigaction act;
 
-	        act.sa_handler = handler;
-	        act.sa_flags=0;
-	        sigemptyset(&act.sa_mask);
+		act.sa_handler = handler;
+		act.sa_flags = 0;
+		sigemptyset(&act.sa_mask);
 
-	        sigemptyset(&tempmask);
+		sigemptyset(&tempmask);
 
-	        if (sigaction(SIGUSR1,  &act, 0) == -1) {
-	                perror("Unexpected error while attempting to pre-conditions");
-                	return 3;
-	        }
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
+			perror
+			    ("Unexpected error while attempting to pre-conditions");
+			return 3;
+		}
 
 		printf("suspending child\n");
-	        if (sigsuspend(&tempmask) != -1) {
-	                perror("sigsuspend error");
+		if (sigsuspend(&tempmask) != -1) {
+			perror("sigsuspend error");
 			return 1;
 		}
-	        printf("returned from suspend\n");
+		printf("returned from suspend\n");
 
 		sleep(1);
 		return 2;
@@ -71,7 +72,7 @@
 		sleep(1);
 
 		printf("parent sending child a SIGUSR1 signal\n");
-		kill (pid, SIGUSR1);
+		kill(pid, SIGUSR1);
 
 		if (wait(&s) == -1) {
 			perror("Unexpected error while setting up test "
@@ -83,21 +84,22 @@
 
 		printf("Exit status from child is %d\n", exit_status);
 
-                if (exit_status == 1) {
+		if (exit_status == 1) {
 			printf("Test FAILED\n");
-                        return PTS_FAIL;
-                }
+			return PTS_FAIL;
+		}
 
-                if (exit_status == 2) {
+		if (exit_status == 2) {
 			printf("Test PASSED\n");
-                        return PTS_PASS;
-                }
+			return PTS_PASS;
+		}
 
-                if (exit_status == 3) {
-                        return PTS_UNRESOLVED;
-                }
+		if (exit_status == 3) {
+			return PTS_UNRESOLVED;
+		}
 
-		printf("Child didn't exit with any of the expected return codes\n");
+		printf
+		    ("Child didn't exit with any of the expected return codes\n");
 		return PTS_UNRESOLVED;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/1-1.c
index 7a932f3..869b38b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/1-1.c
@@ -45,9 +45,12 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
-	printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n", TIMERSEC);
-	exit (PTS_FAIL);
+void myhandler(int signo)
+{
+	printf
+	    ("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n",
+	     TIMERSEC);
+	exit(PTS_FAIL);
 }
 
 int main()
@@ -72,16 +75,16 @@
         ev.sigev_notify = SIGEV_SIGNAL;
         ev.sigev_signo = TIMERSIGNAL;
 */
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 	sigemptyset(&act.sa_mask);
 	sigaction(TIMERSIGNAL, &act, 0);
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
 
-        ts.tv_sec=SIGTIMEDWAITSEC;
-        ts.tv_nsec=0;
+	ts.tv_sec = SIGTIMEDWAITSEC;
+	ts.tv_nsec = 0;
 /*
         if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
                 perror("timer_create() did not return success\n");
@@ -95,16 +98,19 @@
 */
 	time1 = time(NULL);
 	if (sigtimedwait(&selectset, NULL, &ts) != -1) {
-                perror("sigtimedwait() did not return -1 even though signal was not pending\n");
+		perror
+		    ("sigtimedwait() did not return -1 even though signal was not pending\n");
 		return PTS_UNRESOLVED;
 	}
 
 	time2 = time(NULL);
 
-	time_elapsed = difftime (time2, time1);
+	time_elapsed = difftime(time2, time1);
 
-	if ((time_elapsed > SIGTIMEDWAITSEC+ERRORMARGIN) || (time_elapsed < SIGTIMEDWAITSEC-ERRORMARGIN)) {
-		printf ("Test FAILED: sigtimedwait() did not return in the required time\n");
+	if ((time_elapsed > SIGTIMEDWAITSEC + ERRORMARGIN)
+	    || (time_elapsed < SIGTIMEDWAITSEC - ERRORMARGIN)) {
+		printf
+		    ("Test FAILED: sigtimedwait() did not return in the required time\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/2-1.c
index 21f2597..5852434 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/2-1.c
@@ -46,9 +46,12 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
-	printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n", TIMERSEC);
-	exit (PTS_FAIL);
+void myhandler(int signo)
+{
+	printf
+	    ("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n",
+	     TIMERSEC);
+	exit(PTS_FAIL);
 }
 
 int main()
@@ -73,16 +76,16 @@
         ev.sigev_notify = SIGEV_SIGNAL;
         ev.sigev_signo = TIMERSIGNAL;
 */
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 	sigemptyset(&act.sa_mask);
 	sigaction(TIMERSIGNAL, &act, 0);
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
 
-        ts.tv_sec=SIGTIMEDWAITSEC;
-        ts.tv_nsec=0;
+	ts.tv_sec = SIGTIMEDWAITSEC;
+	ts.tv_nsec = 0;
 /*
         if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
                 perror("timer_create() did not return success\n");
@@ -96,16 +99,19 @@
 */
 	time1 = time(NULL);
 	if (sigtimedwait(&selectset, NULL, &ts) != -1) {
-		printf ("Test FAILED: sigtimedwait() did not return with an error\n");
+		printf
+		    ("Test FAILED: sigtimedwait() did not return with an error\n");
 		return PTS_FAIL;
 	}
 
 	time2 = time(NULL);
 
-	time_elapsed = difftime (time2, time1);
+	time_elapsed = difftime(time2, time1);
 
-	if ((time_elapsed > SIGTIMEDWAITSEC+ERRORMARGIN) || (time_elapsed < SIGTIMEDWAITSEC-ERRORMARGIN)) {
-		printf ("Test FAILED: sigtimedwait() did not return immediately\n");
+	if ((time_elapsed > SIGTIMEDWAITSEC + ERRORMARGIN)
+	    || (time_elapsed < SIGTIMEDWAITSEC - ERRORMARGIN)) {
+		printf
+		    ("Test FAILED: sigtimedwait() did not return immediately\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/4-1.c
index d460f34..bdcbfc3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/4-1.c
@@ -27,7 +27,8 @@
 #include <unistd.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
+void myhandler(int signo)
+{
 	printf("Inside handler\n");
 }
 
@@ -36,13 +37,13 @@
 
 	struct sigaction act;
 	sigset_t pendingset, selectset;
-        struct timespec ts;
+	struct timespec ts;
 
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 
-        ts.tv_sec=0;
-        ts.tv_nsec=0;
+	ts.tv_sec = 0;
+	ts.tv_nsec = 0;
 
 	sigemptyset(&pendingset);
 	sigemptyset(&selectset);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/5-1.c
index cb90d37..87d0f9f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/5-1.c
@@ -40,9 +40,12 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
-	printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n", TIMERSEC);
-	exit (PTS_FAIL);
+void myhandler(int signo)
+{
+	printf
+	    ("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n",
+	     TIMERSEC);
+	exit(PTS_FAIL);
 }
 
 int main()
@@ -64,16 +67,16 @@
         ev.sigev_notify = SIGEV_SIGNAL;
         ev.sigev_signo = TIMERSIGNAL;
 */
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 	sigemptyset(&act.sa_mask);
 	sigaction(TIMERSIGNAL, &act, 0);
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
 
-        ts.tv_sec=SIGTIMEDWAITSEC;
-        ts.tv_nsec=0;
+	ts.tv_sec = SIGTIMEDWAITSEC;
+	ts.tv_nsec = 0;
 /*
         if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
                 perror("timer_create() did not return success\n");
@@ -86,7 +89,8 @@
         }
 */
 	if (sigtimedwait(&selectset, NULL, &ts) != -1) {
-		printf ("Test FAILED: sigtimedwait() did not return with an error\n");
+		printf
+		    ("Test FAILED: sigtimedwait() did not return with an error\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/6-1.c
index 78c6f63..a7d3247 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/6-1.c
@@ -42,9 +42,12 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
-	printf("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n", TIMERSEC);
-	exit (PTS_FAIL);
+void myhandler(int signo)
+{
+	printf
+	    ("Test FAILED: %d seconds have elapsed and sigtimedwait() has not yet returned.\n",
+	     TIMERSEC);
+	exit(PTS_FAIL);
 }
 
 int main()
@@ -66,16 +69,16 @@
         ev.sigev_notify = SIGEV_SIGNAL;
         ev.sigev_signo = TIMERSIGNAL;
 */
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 	sigemptyset(&act.sa_mask);
 	sigaction(TIMERSIGNAL, &act, 0);
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
 
-        ts.tv_sec=SIGTIMEDWAITSEC;
-        ts.tv_nsec=0;
+	ts.tv_sec = SIGTIMEDWAITSEC;
+	ts.tv_nsec = 0;
 /*
         if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
                 perror("timer_create() did not return success\n");
@@ -88,12 +91,12 @@
         }
 */
 	if (sigtimedwait(&selectset, NULL, &ts) != -1) {
-		printf ("Test UNRESOLVED: sigtimedwait() did not return -1\n");
+		printf("Test UNRESOLVED: sigtimedwait() did not return -1\n");
 		return PTS_UNRESOLVED;
 	}
 
 	if (errno != EAGAIN) {
-		printf ("Test FAILED: sigtimedwait() did set errno to EAGAIN\n");
+		printf("Test FAILED: sigtimedwait() did set errno to EAGAIN\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
index c521033..3eb562f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/1-1.c
@@ -26,70 +26,59 @@
 
 	/* Empty set of blocked signals */
 
-	if ((sigemptyset(&newmask) == -1) ||
-	    (sigemptyset(&pendingset) == -1))
-	{
+	if ((sigemptyset(&newmask) == -1) || (sigemptyset(&pendingset) == -1)) {
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Add SIGUSR2 to the set of blocked signals */
-	if (sigaddset(&newmask, SIGUSR2) == -1)
-	{
+	if (sigaddset(&newmask, SIGUSR2) == -1) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Block SIGUSR2 */
-	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1)
-	{
+	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1) {
 		printf("Error in sigprocmask()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Send SIGUSR2 signal to this process.  Since it is blocked,
 	 * it should be pending */
-	if (raise(SIGUSR2) != 0)
-	{
+	if (raise(SIGUSR2) != 0) {
 		printf("Could not raise SIGUSR2\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Test that SIGUSR2 is pending */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Could not get pending signal set\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGUSR2) != 1)
-	{
+	if (sigismember(&pendingset, SIGUSR2) != 1) {
 		printf("Signal SIGUSR2 is not pending!\n");
 		return PTS_FAIL;
 	}
 
-	/* Call sigwait and test if it passed/failed*/
-	if (sigwait(&newmask, &sig) != 0)
-	{
+	/* Call sigwait and test if it passed/failed */
+	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait()\n");
 		return PTS_FAIL;
 	}
 
-	if (sig != SIGUSR2)
-	{
+	if (sig != SIGUSR2) {
 		printf("sigwait selected another signal\n");
 		return PTS_FAIL;
 	}
 
 	/* Test that SIGUSR2 is not pending anymore */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Could not get pending signal set\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGUSR2) != 0)
-	{
+	if (sigismember(&pendingset, SIGUSR2) != 0) {
 		printf("Signal SIGUSR2 is not pending!\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
index 3dc9016..f914885 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/2-1.c
@@ -33,95 +33,81 @@
 
 	/* Empty set of blocked signals */
 
-	if ((sigemptyset(&newmask) == -1) ||
-	    (sigemptyset(&pendingset) == -1))
-	{
+	if ((sigemptyset(&newmask) == -1) || (sigemptyset(&pendingset) == -1)) {
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Add SIGRTMIN to the set of blocked signals */
-	if (sigaddset(&newmask, SIGRTMIN) == -1)
-	{
+	if (sigaddset(&newmask, SIGRTMIN) == -1) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Obtain a set of pending signals and make sure SIGRTMIN
 	 * isn't pending. */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Error calling sigpending()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGRTMIN) == 1)
-	{
+	if (sigismember(&pendingset, SIGRTMIN) == 1) {
 		printf("Error: signal SIGRTMIN is pending\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Block SIGALRM */
-	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1)
-	{
+	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1) {
 		printf("Error in sigprocmask()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Send SIGALRM signal 2 times to this process.  Since it is blocked,
 	 * it should be pending and queued. */
-	if (raise(SIGRTMIN) != 0)
-	{
+	if (raise(SIGRTMIN) != 0) {
 		printf("Could not raise SIGALRM\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (raise(SIGRTMIN) != 0)
-	{
+	if (raise(SIGRTMIN) != 0) {
 		printf("Could not raise SIGALRM\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Obtain a set of pending signals */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Error calling sigpending()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Make sure SIGRTMIN is still pending since sigwait should have only
 	 * deleted one instance of SIGRTMIN from the pending set. */
-	if (sigismember(&pendingset, SIGRTMIN) == 0)
-	{
+	if (sigismember(&pendingset, SIGRTMIN) == 0) {
 		printf("Test FAILED\n");
 		return -1;
 	}
 
 	/* Call sigwait to remove first SIGRTMIN instance from the
 	 * pending list. */
-	if (sigwait(&newmask, &sig) != 0)
-	{
+	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait\n");
 		return PTS_FAIL;
 	}
 
 	/* Make sure SIGRTMIN is still in the pending list */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Error calling sigpending()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGRTMIN) == 0)
-	{
+	if (sigismember(&pendingset, SIGRTMIN) == 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
 
 	/* Call sigwait again to remove last SIGRTMIN instance from the
 	 * pending list. */
-	if (sigwait(&newmask, &sig) != 0)
-	{
+	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait\n");
 		return PTS_FAIL;
 	}
@@ -129,14 +115,12 @@
 	/* Make sure SIGRTMIN is NOT in the pending list anymore, since
 	 * the previous sigwait() should have taken it out of the
 	 * pending list. */
-	if (sigpending(&pendingset) == -1)
-	{
+	if (sigpending(&pendingset) == -1) {
 		printf("Error calling sigpending()\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGRTMIN) != 0)
-	{
+	if (sigismember(&pendingset, SIGRTMIN) != 0) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
index 1d229ec..9e867a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/3-1.c
@@ -30,23 +30,19 @@
 	int sig;
 
 	/* Empty set of blocked signals */
-	if ((sigemptyset(&newmask) == -1) ||
-	    (sigemptyset(&pendingset) == -1))
-	{
+	if ((sigemptyset(&newmask) == -1) || (sigemptyset(&pendingset) == -1)) {
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Add SIGUSR2 to the set of blocked signals */
-	if (sigaddset(&newmask, SIGUSR2) == -1)
-	{
+	if (sigaddset(&newmask, SIGUSR2) == -1) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Block SIGUSR2 */
-	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1)
-	{
+	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1) {
 		printf("Error in sigprocmask()\n");
 		return PTS_UNRESOLVED;
 	}
@@ -83,8 +79,7 @@
 	}
 
 	/* Call sigwait */
-	if (sigwait(&newmask, &sig) != 0)
-	{
+	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait\n");
 		return PTS_UNRESOLVED;
 	}
@@ -95,8 +90,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigismember(&pendingset, SIGUSR2) == 1)
-	{
+	if (sigismember(&pendingset, SIGUSR2) == 1) {
 		printf("Test FAILED\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/4-1.c
index a9dbeec..b235671 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/4-1.c
@@ -30,29 +30,25 @@
 
 	/* Empty set of blocked signals */
 
-	if (sigemptyset(&newmask) == -1 || sigemptyset(&pendingset) == -1)
-	{
+	if (sigemptyset(&newmask) == -1 || sigemptyset(&pendingset) == -1) {
 		printf("Error in sigemptyset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Add SIGALRM to the set of blocked signals */
-	if (sigaddset(&newmask, SIGALRM) == -1)
-	{
+	if (sigaddset(&newmask, SIGALRM) == -1) {
 		perror("Error in sigaddset()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Block SIGALRM */
-	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1)
-	{
+	if (sigprocmask(SIG_SETMASK, &newmask, NULL) == -1) {
 		printf("Error in sigprocmask()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Read clock */
-	if (gettimeofday(&tv_ref, NULL) != 0)
-	{
+	if (gettimeofday(&tv_ref, NULL) != 0) {
 		printf("Failed to get time of day");
 		return PTS_UNRESOLVED;
 	}
@@ -62,22 +58,19 @@
 
 	/* Call sigwait.  It should wait for 5 seconds and then move
 	 * along the rest of the process when it received the SIGALRM */
-	if (sigwait(&newmask, &sig) != 0)
-	{
+	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait()\n");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Re-read clock */
-	if (gettimeofday(&tv_cur, NULL) != 0)
-	{
+	if (gettimeofday(&tv_cur, NULL) != 0) {
 		printf("Failed to get time of day");
 		return PTS_UNRESOLVED;
 	}
 
 	/* Check the operation was blocking until the signal was generated */
-	if (tv_cur.tv_sec - tv_ref.tv_sec < 2)
-	{
+	if (tv_cur.tv_sec - tv_ref.tv_sec < 2) {
 		printf("The operation lasted less than 3 seconds!\n");
 		return PTS_FAIL;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-1.c
index b87cf56..fd44279 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-1.c
@@ -87,7 +87,7 @@
 sigset_t setusr;
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	int sig;
@@ -97,8 +97,7 @@
 	/* wait for the signal */
 	ret = sigwait(&setusr, &sig);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "failed to wait for signal in thread");
 	}
 
@@ -109,10 +108,10 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	pthread_t ch[ NTHREADS ];
+	pthread_t ch[NTHREADS];
 
 	/* Initialize output */
 	output_init();
@@ -120,33 +119,28 @@
 	/* Set the signal mask */
 	ret = sigemptyset(&setusr);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	ret = sigaddset(&setusr, SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "failed to add SIGUSR1 to signal set");
 	}
 
 	ret = pthread_sigmask(SIG_BLOCK, &setusr, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to block SIGUSR1");
 	}
 
 	/* Create the children */
 
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_create(&ch[ i ], NULL, threaded, NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_create(&ch[i], NULL, threaded, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to create a thread");
 		}
 	}
@@ -154,37 +148,31 @@
 	/* raise the signal */
 	ret = kill(getpid(), SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
 	sleep(1);
 
-	if (n_awaken != 1)
-	{
+	if (n_awaken != 1) {
 		output("%d threads were awaken\n", n_awaken);
 		FAILED("Unexpected number of threads awaken");
 	}
 
 	/* Wake other threads */
-	for (; n_awaken < NTHREADS ; sched_yield())
-	{
+	for (; n_awaken < NTHREADS; sched_yield()) {
 		ret = kill(getpid(), SIGUSR1);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise the signal");
 		}
 	}
 
 	/* Wait for child thread termination */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_join(ch[ i ], NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_join(ch[i], NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join the thread");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
index 41b4685..237f21c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-2.c
@@ -87,7 +87,7 @@
 sigset_t setusr;
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	int sig;
@@ -97,8 +97,7 @@
 	/* wait for the signal */
 	ret = sigwait(&setusr, &sig);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "failed to wait for signal in thread");
 	}
 
@@ -111,10 +110,10 @@
 }
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	pthread_t ch[ NTHREADS ];
+	pthread_t ch[NTHREADS];
 
 	/* Initialize output */
 	output_init();
@@ -122,76 +121,64 @@
 	/* Set the signal mask */
 	ret = sigemptyset(&setusr);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	ret = sigaddset(&setusr, SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "failed to add SIGUSR1 to signal set");
 	}
 
 	ret = pthread_sigmask(SIG_BLOCK, &setusr, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to block SIGUSR1");
 	}
 
 	/* Create the children */
 
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_create(&ch[ i ], NULL, threaded, NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_create(&ch[i], NULL, threaded, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to create a thread");
 		}
 	}
 
 	/* raise the signal */
-	ret = pthread_kill(ch[ 0 ], SIGUSR1);
+	ret = pthread_kill(ch[0], SIGUSR1);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to raise the signal");
 	}
 
 	sleep(1);
 
-	if (n_awaken != 1)
-	{
+	if (n_awaken != 1) {
 		output("%d threads were awaken\n", n_awaken);
 		FAILED("Unexpected number of threads awaken");
 	}
 
-	if (!pthread_equal(last_awaken, ch[0]))
-	{
+	if (!pthread_equal(last_awaken, ch[0])) {
 		FAILED("The awaken thread is not the signal target one.");
 	}
 
 	/* Wake other threads */
-	for (i = 1; i < NTHREADS ; i++)
-	{
-		ret = pthread_kill(ch[ i ], SIGUSR1);
+	for (i = 1; i < NTHREADS; i++) {
+		ret = pthread_kill(ch[i], SIGUSR1);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise the signal");
 		}
 	}
 
 	/* Wait for child thread termination */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_join(ch[ i ], NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_join(ch[i], NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join the thread");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/7-1.c
index b82ba74..8474d94 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/7-1.c
@@ -80,7 +80,7 @@
 /******************************************************************************/
 
 /* The main test function. */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, sig;
 	long rts;
@@ -92,27 +92,23 @@
 	/* Test the RTS extension */
 	rts = sysconf(_SC_REALTIME_SIGNALS);
 
-	if (rts < 0L)
-	{
+	if (rts < 0L) {
 		UNTESTED("This test needs the RTS extension");
 	}
 
 	/* Set the signal mask */
 	ret = sigemptyset(&set);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to empty signal set");
 	}
 
 	/* Add all SIGRT signals */
-	for (i = SIGRTMIN; i <= SIGRTMAX; i++)
-	{
+	for (i = SIGRTMIN; i <= SIGRTMAX; i++) {
 
 		ret = sigaddset(&set, i);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "failed to add signal to signal set");
 		}
 	}
@@ -120,38 +116,31 @@
 	/* Block all RT signals */
 	ret = pthread_sigmask(SIG_BLOCK, &set, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to block RT signals");
 	}
 
 	/* raise the signals in no particular order */
-	for (i = SIGRTMIN + 1; i <= SIGRTMAX; i += 3)
-	{
+	for (i = SIGRTMIN + 1; i <= SIGRTMAX; i += 3) {
 		ret = raise(i);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise the signal");
 		}
 	}
 
-	for (i = SIGRTMIN; i <= SIGRTMAX; i += 3)
-	{
+	for (i = SIGRTMIN; i <= SIGRTMAX; i += 3) {
 		ret = raise(i);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise the signal");
 		}
 	}
 
-	for (i = SIGRTMIN + 2; i <= SIGRTMAX; i += 3)
-	{
+	for (i = SIGRTMIN + 2; i <= SIGRTMAX; i += 3) {
 		ret = raise(i);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to raise the signal");
 		}
 	}
@@ -159,19 +148,16 @@
 	/* All RT signals are pending */
 
 	/* Check the signals are delivered in order */
-	for (i = SIGRTMIN; i <= SIGRTMAX; i++)
-	{
+	for (i = SIGRTMIN; i <= SIGRTMAX; i++) {
 		ret = sigwait(&set, &sig);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret , "Failed to sigwait for RT signal");
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to sigwait for RT signal");
 		}
 
-		if (sig != i)
-		{
+		if (sig != i) {
 			output("SIGRTMIN: %d, SIGRTMAX: %d, i: %d, sig:%d\n",
-			        SIGRTMIN, SIGRTMAX, i, sig);
+			       SIGRTMIN, SIGRTMAX, i, sig);
 			FAILED("Got wrong signal");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
index def5370..e2216ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwait/8-1.c
@@ -50,7 +50,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	/* Call sigwait and test if it passed/failed*/
+	/* Call sigwait and test if it passed/failed */
 	if (sigwait(&newmask, &sig) != 0) {
 		printf("Error in sigwait()\n");
 		printf("Test FAILED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/1-1.c
index e4f5760..637ad38 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/1-1.c
@@ -27,7 +27,8 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
+void myhandler(int signo)
+{
 	printf("Inside handler\n");
 }
 
@@ -37,8 +38,8 @@
 	struct sigaction act;
 	sigset_t pendingset, selectset;
 
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 
 	sigemptyset(&pendingset);
 	sigemptyset(&selectset);
@@ -65,7 +66,9 @@
 	sigpending(&pendingset);
 
 	if (sigismember(&pendingset, SIGTOTEST) != 0) {
-		printf("Test FAILED: Signal %d still pending even after call to sigwaitinfo()\n", SIGTOTEST);
+		printf
+		    ("Test FAILED: Signal %d still pending even after call to sigwaitinfo()\n",
+		     SIGTOTEST);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/2-1.c
index d0430c7..efb1420 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/2-1.c
@@ -29,8 +29,9 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void myhandler(int signo, siginfo_t *info, void *context) {
-	printf ("Inside dummy handler\n");
+void myhandler(int signo, siginfo_t * info, void *context)
+{
+	printf("Inside dummy handler\n");
 }
 
 int main()
@@ -45,7 +46,7 @@
 	sigemptyset(&act.sa_mask);
 	sigemptyset(&selectset);
 
-	for (rtsig=SIGRTMAX; rtsig>=SIGRTMIN; rtsig--) {
+	for (rtsig = SIGRTMAX; rtsig >= SIGRTMIN; rtsig--) {
 		sigaddset(&act.sa_mask, rtsig);
 		sighold(rtsig);
 		sigaddset(&selectset, rtsig);
@@ -54,18 +55,20 @@
 	pid = getpid();
 	value.sival_int = 5;	/* 5 is just an arbitrary value */
 
-	for (rtsig=SIGRTMAX; rtsig>=SIGRTMIN; rtsig--) {
+	for (rtsig = SIGRTMAX; rtsig >= SIGRTMIN; rtsig--) {
 		sigaction(rtsig, &act, 0);
 		if (sigqueue(pid, rtsig, value) != 0) {
-			printf("Test UNRESOLVED: call to sigqueue did not return success\n");
+			printf
+			    ("Test UNRESOLVED: call to sigqueue did not return success\n");
 			return PTS_UNRESOLVED;
 		}
 	}
 
-        if (sigwaitinfo(&selectset, NULL) != SIGRTMIN) {
-		printf("Test FAILED: sigwaitinfo() did not return the lowest of the multiple pending signals between SIGRTMIN and SIGRTMAX\n");
-                return PTS_FAIL;
-        }
+	if (sigwaitinfo(&selectset, NULL) != SIGRTMIN) {
+		printf
+		    ("Test FAILED: sigwaitinfo() did not return the lowest of the multiple pending signals between SIGRTMIN and SIGRTMAX\n");
+		return PTS_FAIL;
+	}
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/3-1.c
index 58b6b35..f1018e8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/3-1.c
@@ -40,28 +40,29 @@
 		/* child */
 		sigset_t selectset;
 
-	        struct sigaction act;
+		struct sigaction act;
 
-	        act.sa_handler = handler;
-	        act.sa_flags=0;
-	        sigemptyset(&act.sa_mask);
+		act.sa_handler = handler;
+		act.sa_flags = 0;
+		sigemptyset(&act.sa_mask);
 
-	        if (sigaction(SIGUSR1,  &act, 0) == -1) {
-	                perror("Unexpected error while attempting to pre-conditions");
-                	return PTS_UNRESOLVED;
-	        }
+		if (sigaction(SIGUSR1, &act, 0) == -1) {
+			perror
+			    ("Unexpected error while attempting to pre-conditions");
+			return PTS_UNRESOLVED;
+		}
 
 		sigemptyset(&selectset);
 		sigaddset(&selectset, SIGUSR1);
 
 		printf("Child calling sigwaitinfo()\n");
 
-	        if (sigwaitinfo(&selectset, NULL) == -1) {
-	                perror("Call to sigwaitinfo() failed\n");
-	                return PTS_UNRESOLVED;
-	        }
+		if (sigwaitinfo(&selectset, NULL) == -1) {
+			perror("Call to sigwaitinfo() failed\n");
+			return PTS_UNRESOLVED;
+		}
 
-	        printf("returned from sigwaitinfo\n");
+		printf("returned from sigwaitinfo\n");
 		sleep(1);
 		return PTS_PASS;
 
@@ -73,7 +74,7 @@
 		sleep(1);
 
 		printf("parent sending child a SIGUSR1 signal\n");
-		kill (pid, SIGUSR1);
+		kill(pid, SIGUSR1);
 
 		if (wait(&s) == -1) {
 			perror("Unexpected error while setting up test "
@@ -91,9 +92,9 @@
 		printf("Exit status from child is %d\n", exit_status);
 
 		if (exit_status != PTS_PASS) {
-                        printf("Test FAILED\n");
-                        return PTS_FAIL;
-                }
+			printf("Test FAILED\n");
+			return PTS_FAIL;
+		}
 
 		printf("Test PASSED\n");
 		return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/5-1.c
index bc056ec..ce98fba 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/5-1.c
@@ -26,7 +26,8 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	printf("Inside handler\n");
 }
 
@@ -38,8 +39,8 @@
 	sigset_t selectset;
 	siginfo_t info;
 
-	act.sa_flags=SA_SIGINFO;
-	act.sa_sigaction=myhandler;
+	act.sa_flags = SA_SIGINFO;
+	act.sa_sigaction = myhandler;
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
@@ -57,7 +58,7 @@
 
 	if (info.si_signo != SIGTOTEST) {
 		printf("Test FAILED: The selected signal number hasn't been"
-			"stored in the si_signo member.\n");
+		       "stored in the si_signo member.\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/6-1.c
index 5eeaa50..faac33a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/6-1.c
@@ -26,7 +26,8 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	printf("Inside handler\n");
 }
 
@@ -38,8 +39,8 @@
 	sigset_t selectset;
 	siginfo_t info;
 
-	act.sa_flags=SA_SIGINFO;
-	act.sa_sigaction=myhandler;
+	act.sa_flags = SA_SIGINFO;
+	act.sa_sigaction = myhandler;
 
 	sigemptyset(&selectset);
 	sigaddset(&selectset, SIGTOTEST);
@@ -57,7 +58,7 @@
 
 	if (info.si_code != SI_USER) {
 		printf("Test FAILED: The cause of the signal "
-			"hasn't been stored in the si_code\n");
+		       "hasn't been stored in the si_code\n");
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/7-1.c
index febba89..bd4319f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/7-1.c
@@ -33,7 +33,8 @@
 
 int counter = 0;
 
-void myhandler(int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	counter++;
 }
 
@@ -54,28 +55,31 @@
 
 	sighold(SIGTOTEST);
 
-	for (i=NUMCALLS; i>0; i--) {
+	for (i = NUMCALLS; i > 0; i--) {
 		value.sival_int = i;
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
-			printf("Test FAILED: call to sigqueue did not return success\n");
+			printf
+			    ("Test FAILED: call to sigqueue did not return success\n");
 			return PTS_FAIL;
 		}
 	}
 
-        sigemptyset(&selectset);
-        sigaddset(&selectset, SIGTOTEST);
+	sigemptyset(&selectset);
+	sigaddset(&selectset, SIGTOTEST);
 
-	for (i=NUMCALLS; i>0; i--) {
-	        if (sigwaitinfo(&selectset, &info) != SIGTOTEST) {
-	                perror("sigwaitinfo() returned signal other than SIGTOTEST\n");
-	                return PTS_UNRESOLVED;
-	        }
-	        if (info.si_value.sival_int != i) {
-	                printf("Test FAILED: The queued value %d was dequeued before "
-                        "the queued value %d even though %d was queued first.\n",
-			info.si_value.sival_int, i, i);
-	                return PTS_FAIL;
-	        }
+	for (i = NUMCALLS; i > 0; i--) {
+		if (sigwaitinfo(&selectset, &info) != SIGTOTEST) {
+			perror
+			    ("sigwaitinfo() returned signal other than SIGTOTEST\n");
+			return PTS_UNRESOLVED;
+		}
+		if (info.si_value.sival_int != i) {
+			printf
+			    ("Test FAILED: The queued value %d was dequeued before "
+			     "the queued value %d even though %d was queued first.\n",
+			     info.si_value.sival_int, i, i);
+			return PTS_FAIL;
+		}
 	}
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/8-1.c
index f2e00fe..1ef43fd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/8-1.c
@@ -32,7 +32,8 @@
 #include <errno.h>
 #include "posixtest.h"
 
-void myhandler(int signo, siginfo_t *info, void *context) {
+void myhandler(int signo, siginfo_t * info, void *context)
+{
 	printf("Just a dummy handler\n");
 }
 
@@ -53,30 +54,34 @@
 
 	sighold(SIGTOTEST);
 
-	for (i=NUMCALLS; i>0; i--) {
+	for (i = NUMCALLS; i > 0; i--) {
 		value.sival_int = i;
 		if (sigqueue(pid, SIGTOTEST, value) != 0) {
-			printf("Test FAILED: call to sigqueue did not return success\n");
+			printf
+			    ("Test FAILED: call to sigqueue did not return success\n");
 			return PTS_FAIL;
 		}
 	}
 
-        sigemptyset(&selectset);
-        sigaddset(&selectset, SIGTOTEST);
+	sigemptyset(&selectset);
+	sigaddset(&selectset, SIGTOTEST);
 
-	for (i=NUMCALLS; i>0; i--) {
-	        if (sigwaitinfo(&selectset, &info) != SIGTOTEST) {
-	                perror("sigwaitinfo() returned signal other than SIGTOTEST\n");
-	                return PTS_UNRESOLVED;
-	        }
+	for (i = NUMCALLS; i > 0; i--) {
+		if (sigwaitinfo(&selectset, &info) != SIGTOTEST) {
+			perror
+			    ("sigwaitinfo() returned signal other than SIGTOTEST\n");
+			return PTS_UNRESOLVED;
+		}
 	}
 
-        sigemptyset(&pendingset);
-        sigpending(&pendingset);
-        if (sigismember(&pendingset, SIGTOTEST) != 0) {
-                printf("Test FAILED: Signal %d still pending even after call to sigwaitinfo()\n", SIGTOTEST);
-                return PTS_FAIL;
-        }
+	sigemptyset(&pendingset);
+	sigpending(&pendingset);
+	if (sigismember(&pendingset, SIGTOTEST) != 0) {
+		printf
+		    ("Test FAILED: Signal %d still pending even after call to sigwaitinfo()\n",
+		     SIGTOTEST);
+		return PTS_FAIL;
+	}
 
 	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/9-1.c
index fc12092..7c08299 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigwaitinfo/9-1.c
@@ -26,7 +26,8 @@
 #include <sys/wait.h>
 #include "posixtest.h"
 
-void myhandler (int signo) {
+void myhandler(int signo)
+{
 	printf("Inside handler\n");
 }
 
@@ -36,8 +37,8 @@
 	struct sigaction act;
 	sigset_t pendingset, selectset;
 
-	act.sa_flags=0;
-	act.sa_handler=myhandler;
+	act.sa_flags = 0;
+	act.sa_handler = myhandler;
 
 	sigemptyset(&pendingset);
 	sigemptyset(&selectset);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strftime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strftime/1-1.c
index f81d857..2afca0b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strftime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strftime/1-1.c
@@ -17,55 +17,56 @@
 #include <time.h>
 #include "posixtest.h"
 
-int main () {
+int main()
+{
 
-    /* current time */
-    time_t t = time(NULL);
-    struct tm* local_t = localtime(&t);
-    char text[256];
-    int result;
+	/* current time */
+	time_t t = time(NULL);
+	struct tm *local_t = localtime(&t);
+	char text[256];
+	int result;
 
-    setlocale(LC_TIME, "");
-    strftime(text, 256, nl_langinfo (D_T_FMT), local_t);
-    printf("STRING IS:   %s\n\n", text);
+	setlocale(LC_TIME, "");
+	strftime(text, 256, nl_langinfo(D_T_FMT), local_t);
+	printf("STRING IS:   %s\n\n", text);
 
-    /* use format controls to print the various date/time components. */
+	/* use format controls to print the various date/time components. */
 
-    result = strftime(text, 256, "%a", local_t);
-    printf("a   Bytes %i           %s	", result, text);
-    if (result != 3) {
-	    puts("Test Failed: \%a doesn't equal at least 3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts("PASS");
-    }
+	result = strftime(text, 256, "%a", local_t);
+	printf("a   Bytes %i           %s	", result, text);
+	if (result != 3) {
+		puts("Test Failed: \%a doesn't equal at least 3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%A", local_t);
-    printf("A   Bytes %i           %s	", result, text);
-    if (result <= 5) {
-	    puts("Test Failed: \%A doesn't equal to 6 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%A", local_t);
+	printf("A   Bytes %i           %s	", result, text);
+	if (result <= 5) {
+		puts("Test Failed: \%A doesn't equal to 6 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256 , "%b", local_t);
-    printf("b   Bytes %i           %s	", result, text);
-    if (result != 3) {
-	    puts("Test Failed: \%b doesn't equal to 3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%b", local_t);
+	printf("b   Bytes %i           %s	", result, text);
+	if (result != 3) {
+		puts("Test Failed: \%b doesn't equal to 3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%B", local_t);
-    printf("B   Bytes %i           %s	", result, text);
-    if (result < 3) {
-	    puts("Test Failed: \%B is less than3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%B", local_t);
+	printf("B   Bytes %i           %s	", result, text);
+	if (result < 3) {
+		puts("Test Failed: \%B is less than3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *
@@ -78,23 +79,23 @@
  *   }
  */
 
-    result = strftime(text, 256, "%C", local_t);
-    printf("C   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%C doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%C", local_t);
+	printf("C   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%C doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%d", local_t);
-    printf("d   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%d doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%d", local_t);
+	printf("d   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%d doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *
@@ -108,32 +109,32 @@
  *   }
  */
 
-    result = strftime(text, 256, "%e", local_t);
-    printf("e   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%e doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%e", local_t);
+	printf("e   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%e doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%F", local_t);
-    printf("F   Bytes %i           %s	", result, text);
-    if (result != 10) {
-	    puts("Test Failed: \%F doesn't equal at least 10 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%F", local_t);
+	printf("F   Bytes %i           %s	", result, text);
+	if (result != 10) {
+		puts("Test Failed: \%F doesn't equal at least 10 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%H", local_t);
-    printf("H   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%H doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%H", local_t);
+	printf("H   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%H doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *
@@ -147,167 +148,167 @@
 *    }
 */
 
-    result = strftime(text, 256, "%G", local_t);
-    printf("G   Bytes %i           %s	", result, text);
-    if (result != 4) {
-	    puts("Test Failed: \%G doesn't equal at least 4 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%G", local_t);
+	printf("G   Bytes %i           %s	", result, text);
+	if (result != 4) {
+		puts("Test Failed: \%G doesn't equal at least 4 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%h", local_t);
-    printf("h   Bytes %i           %s	", result, text);
-    if (result != 3) {
-	    puts("Test Failed: \%h doesn't equal at least 3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%h", local_t);
+	printf("h   Bytes %i           %s	", result, text);
+	if (result != 3) {
+		puts("Test Failed: \%h doesn't equal at least 3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%I", local_t);
-    printf("I   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%I doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%I", local_t);
+	printf("I   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%I doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%j", local_t);
-    printf("j   Bytes %i           %s	", result, text);
-    if (result != 3) {
-	    puts("Test Failed: \%j doesn't equal at least 3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%j", local_t);
+	printf("j   Bytes %i           %s	", result, text);
+	if (result != 3) {
+		puts("Test Failed: \%j doesn't equal at least 3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%m", local_t);
-    printf("m   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%m doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%m", local_t);
+	printf("m   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%m doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%M", local_t);
-    printf("M   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%M doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%M", local_t);
+	printf("M   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%M doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%n", local_t);
-    printf("n   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%n doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%n", local_t);
+	printf("n   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%n doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%p", local_t);
-    printf("p   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%p doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%p", local_t);
+	printf("p   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%p doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%r", local_t);
-    printf("r   Bytes %i           %s	", result, text);
-    if (result != 11) {
-	    puts("Test Failed: \%r doesn't equal at least 11 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%r", local_t);
+	printf("r   Bytes %i           %s	", result, text);
+	if (result != 11) {
+		puts("Test Failed: \%r doesn't equal at least 11 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%R", local_t);
-    printf("R   Bytes %i           %s	", result, text);
-    if (result != 5) {
-	    puts("Test Failed: \%R doesn't equal at least 5 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%R", local_t);
+	printf("R   Bytes %i           %s	", result, text);
+	if (result != 5) {
+		puts("Test Failed: \%R doesn't equal at least 5 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%S", local_t);
-    printf("S   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%S doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%S", local_t);
+	printf("S   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%S doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%t", local_t);
-    printf("t   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%t doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%t", local_t);
+	printf("t   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%t doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%T", local_t);
-    printf("T   Bytes %i           %s	", result, text);
-    if (result != 8) {
-	    puts("Test Failed: \%T doesn't equal at least 8 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%T", local_t);
+	printf("T   Bytes %i           %s	", result, text);
+	if (result != 8) {
+		puts("Test Failed: \%T doesn't equal at least 8 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%u", local_t);
-    printf("u   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%u doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%u", local_t);
+	printf("u   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%u doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%U", local_t);
-    printf("U   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%U doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%U", local_t);
+	printf("U   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%U doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%V", local_t);
-    printf("V   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%V doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%V", local_t);
+	printf("V   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%V doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%w", local_t);
-    printf("w   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%w doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%w", local_t);
+	printf("w   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%w doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%W", local_t);
-    printf("W   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%W doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%W", local_t);
+	printf("W   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%W doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *
@@ -321,14 +322,14 @@
  *   }
  */
 
-    result = strftime(text, 256, "%X", local_t);
-    printf("X   Bytes %i           %s	", result, text);
-    if (result < 8) {
-	    puts("Test Failed: \%X doesn't equal at least 8 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%X", local_t);
+	printf("X   Bytes %i           %s	", result, text);
+	if (result < 8) {
+		puts("Test Failed: \%X doesn't equal at least 8 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *
@@ -342,33 +343,33 @@
  *   }
  */
 
-    result = strftime(text, 256, "%Y", local_t);
-    printf("Y   Bytes %i           %s	", result, text);
-    if (result != 4) {
-	    puts("Test Failed: \%Y doesn't equal at least 4 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Y", local_t);
+	printf("Y   Bytes %i           %s	", result, text);
+	if (result != 4) {
+		puts("Test Failed: \%Y doesn't equal at least 4 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%z", local_t);
-    printf("z   Bytes %i           %s	", result, text);
-    if (result != 5) {
-	    puts("Test Failed: \%z doesn't equal at least 5 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%z", local_t);
+	printf("z   Bytes %i           %s	", result, text);
+	if (result != 5) {
+		puts("Test Failed: \%z doesn't equal at least 5 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    //result = strftime(text, 256, "%Z", local_t);
-  //printf("Z   Bytes %i           %s	", result, text);
-  //if (result != 3) {
-//	    puts("Test Failed: \%Z doesn't equal at least 3 bytes");
- //		return PTS_FAIL;
-   // 	} else {
-//		    puts ("PASS");
-  //  	}
-    printf("\n");
+	//result = strftime(text, 256, "%Z", local_t);
+	//printf("Z   Bytes %i           %s   ", result, text);
+	//if (result != 3) {
+//          puts("Test Failed: \%Z doesn't equal at least 3 bytes");
+	//             return PTS_FAIL;
+	//   } else {
+//                  puts ("PASS");
+	//    }
+	printf("\n");
 
-return PTS_PASS;
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c
index 6e7f881..9bc68a2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c
@@ -18,17 +18,18 @@
 #include <time.h>
 #include "posixtest.h"
 
-int main () {
+int main()
+{
 
-    /* current time */
-    time_t t = time(NULL);
-    struct tm* local_t = localtime(&t);
-    char text[100];
-    int result;
+	/* current time */
+	time_t t = time(NULL);
+	struct tm *local_t = localtime(&t);
+	char text[100];
+	int result;
 
-    setlocale(LC_TIME, "");
-    strftime(text, 256, nl_langinfo (D_T_FMT), local_t);
-    printf("STRING IS:   %s\n\n", text);
+	setlocale(LC_TIME, "");
+	strftime(text, 256, nl_langinfo(D_T_FMT), local_t);
+	printf("STRING IS:   %s\n\n", text);
 
 /* use format controls to print the various date/time components. */
 
@@ -43,14 +44,14 @@
  *   }
  */
 
-    result = strftime(text, 256, "%EC", local_t);
-    printf("EC   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%EC doesn't equal to 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%EC", local_t);
+	printf("EC   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%EC doesn't equal to 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *  result = strftime(text, 256 , "%Ex", local_t);
@@ -63,14 +64,14 @@
  *   }
  */
 
-    result = strftime(text, 256, "%EX", local_t);
-    printf("EX   Bytes %i           %s	", result, text);
-    if (result <= 3) {
-	    puts("Test Failed: \%EX doesn't equal to 3 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%EX", local_t);
+	printf("EX   Bytes %i           %s	", result, text);
+	if (result <= 3) {
+		puts("Test Failed: \%EX doesn't equal to 3 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *  result = strftime(text, 256, "%Ey", local_t);
@@ -83,122 +84,122 @@
  *   }
  */
 
-    result = strftime(text, 256, "%EY", local_t);
-    printf("EY   Bytes %i           %s	", result, text);
-    if (result != 4) {
-	    puts("Test Failed: \%EY doesn't equal at least 4 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%EY", local_t);
+	printf("EY   Bytes %i           %s	", result, text);
+	if (result != 4) {
+		puts("Test Failed: \%EY doesn't equal at least 4 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%Od", local_t);
-    printf("Od   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%Od doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Od", local_t);
+	printf("Od   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%Od doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%Oe", local_t);
-    printf("Oe   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%Oe doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Oe", local_t);
+	printf("Oe   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%Oe doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OH", local_t);
-    printf("OH   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OH doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OH", local_t);
+	printf("OH   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OH doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OI", local_t);
-    printf("OI   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OI doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OI", local_t);
+	printf("OI   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OI doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%Om", local_t);
-    printf("Om   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%Om doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Om", local_t);
+	printf("Om   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%Om doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OM", local_t);
-    printf("OM   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OM doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OM", local_t);
+	printf("OM   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OM doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OS", local_t);
-    printf("OS   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OS doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OS", local_t);
+	printf("OS   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OS doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%Ou", local_t);
-    printf("Ou   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%Ou doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Ou", local_t);
+	printf("Ou   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%Ou doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OU", local_t);
-    printf("OU   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OU doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OU", local_t);
+	printf("OU   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OU doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OV", local_t);
-    printf("OV   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OV doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OV", local_t);
+	printf("OV   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OV doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%Ow", local_t);
-    printf("Ow   Bytes %i           %s	", result, text);
-    if (result != 1) {
-	    puts("Test Failed: \%Ow doesn't equal at least 1 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%Ow", local_t);
+	printf("Ow   Bytes %i           %s	", result, text);
+	if (result != 1) {
+		puts("Test Failed: \%Ow doesn't equal at least 1 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
-    result = strftime(text, 256, "%OW", local_t);
-    printf("OW   Bytes %i           %s	", result, text);
-    if (result != 2) {
-	    puts("Test Failed: \%OW doesn't equal at least 2 bytes");
-	    return PTS_FAIL;
-    } else {
-	    puts ("PASS");
-    }
+	result = strftime(text, 256, "%OW", local_t);
+	printf("OW   Bytes %i           %s	", result, text);
+	if (result != 2) {
+		puts("Test Failed: \%OW doesn't equal at least 2 bytes");
+		return PTS_FAIL;
+	} else {
+		puts("PASS");
+	}
 
 /*  This section has been commented for known bug in gcc:
  *  result = strftime(text, 256, "%Oy", local_t);
@@ -211,7 +212,7 @@
  *   }
  */
 
-    printf("\n");
+	printf("\n");
 
-return PTS_PASS;
+	return PTS_PASS;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strftime/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strftime/3-1.c
index 05c567d..61521a8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strftime/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strftime/3-1.c
@@ -16,21 +16,21 @@
 
 int main()
 {
-    struct tm *tm_ptr;
-    time_t the_time;
-    char buf[256];
-    int result;
+	struct tm *tm_ptr;
+	time_t the_time;
+	char buf[256];
+	int result;
 
-    (void) time(&the_time);
-    tm_ptr = localtime(&the_time);
-    result = strftime(buf, 256, "%A %d %B, %I:%S %p", tm_ptr);
+	(void)time(&the_time);
+	tm_ptr = localtime(&the_time);
+	result = strftime(buf, 256, "%A %d %B, %I:%S %p", tm_ptr);
 
-    if (result != 0) {
-    	printf("strftime gives: %s\n", buf);
-	puts ("PASS");
-	return PTS_PASS;
-    } else {
-	puts ("FAIL");
-	return PTS_FAIL;
-    }
+	if (result != 0) {
+		printf("strftime gives: %s\n", buf);
+		puts("PASS");
+		return PTS_PASS;
+	} else {
+		puts("FAIL");
+		return PTS_FAIL;
+	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/threads_scenarii.c b/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/threads_scenarii.c
index ae085cd..530ccce 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/threads_scenarii.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/threads_scenarii.c
@@ -100,14 +100,12 @@
 	.bottom = NULL,							\
 	.result = res							\
 }
-
 #define CASE_POS(det, expl, scp, spa, sco, sta, gua, ssi, desc)		\
 	CASE(det, expl, scp, spa, sco, sta, gua, ssi, desc, 0)
 #define CASE_NEG(det, expl, scp, spa, sco, sta, gua, ssi, desc)		\
 	CASE(det, expl, scp, spa, sco, sta, gua, ssi, desc, 1)
 #define CASE_UNK(det, expl, scp, spa, sco, sta, gua, ssi, desc)		\
 	CASE(det, expl, scp, spa, sco, sta, gua, ssi, desc, 2)
-
 /*
  * This array gives the different combinations of threads
  * attributes for the testcases.
@@ -117,55 +115,75 @@
  *     as we don't know when the thread terminates to free the stack memory
  * -> ... (to be completed)
  */
-
 {
 	/* Unary tests */
 	CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default"),
-	CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached"),
-	CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched"),
-	CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy"),
-	CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy"),
-	CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param"),
-	CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param"),
-	CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope"),
-	CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack"),
-	CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size"),
-	CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size"),
-	CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size"),
-
-	/* Stack play */
-	CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard"),
-	CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard"),
-	CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack"),
-	CASE_POS(1, 0, 0, 0, 0, 0, 1, 1, "Detached, Min stack size, no guard"),
-	CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1, "Detached, Min stack size, 1p guard"),
-
-	/*
-	 * Scheduling play
-	 *   -- all results are unknown since it might depend on
-	 *      the user priviledges
-	 */
-	CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param"),
-	CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param"),
-	CASE_UNK(0, 1, 1, -1, 0, 0, 0, 0, "Explicit FIFO min param"),
-	CASE_UNK(0, 1, 2, -1, 0, 0, 0, 0, "Explicit RR min param"),
-	CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0, "Explicit FIFO max param, alt scope"),
-	CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0, "Explicit RR max param, alt scope"),
-	CASE_UNK(0, 1, 1, -1, 1, 0, 0, 0, "Explicit FIFO min param, alt scope"),
-	CASE_UNK(0, 1, 2, -1, 1, 0, 0, 0, "Explicit RR min param, alt scope"),
-	CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0, "Detached, explicit FIFO max param"),
-	CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0, "Detached, explicit RR max param"),
-	CASE_UNK(1, 1, 1, -1, 0, 0, 0, 0, "Detached, explicit FIFO min param"),
-	CASE_UNK(1, 1, 2, -1, 0, 0, 0, 0, "Detached, explicit RR min param"),
-	CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0, "Detached, explicit FIFO max param,"
-		 " alt scope"),
-	CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0, "Detached, explicit RR max param,"
-		 " alt scope"),
-	CASE_UNK(1, 1, 1, -1, 1, 0, 0, 0, "Detached, explicit FIFO min param,"
-		 " alt scope"),
-	CASE_UNK(1, 1, 2, -1, 1, 0, 0, 0, "Detached, explicit RR min param,"
-		 " alt scope"),
-};
+	    CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached"),
+	    CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched"),
+	    CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy"),
+	    CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy"),
+	    CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param"),
+	    CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param"),
+	    CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope"),
+	    CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack"),
+	    CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size"),
+	    CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size"),
+	    CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size"),
+	    /* Stack play */
+	    CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard"),
+	    CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard"),
+	    CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack"),
+	    CASE_POS(1, 0, 0, 0, 0, 0, 1, 1,
+		     "Detached, Min stack size, no guard"), CASE_UNK(1, 0, 0, 0,
+								     0, 0, 2, 1,
+								     "Detached, Min stack size, 1p guard"),
+	    /*
+	     * Scheduling play
+	     *   -- all results are unknown since it might depend on
+	     *      the user priviledges
+	     */
+CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param"),
+	    CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0,
+				 "Explicit RR max param"),
+	    CASE_UNK(0, 1, 1, -1, 0, 0, 0, 0,
+				 "Explicit FIFO min param"),
+	    CASE_UNK(0, 1, 2, -1, 0, 0, 0, 0,
+				 "Explicit RR min param"),
+	    CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0,
+				 "Explicit FIFO max param, alt scope"),
+	    CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0,
+				 "Explicit RR max param, alt scope"),
+	    CASE_UNK(0, 1, 1, -1, 1, 0, 0, 0,
+				 "Explicit FIFO min param, alt scope"),
+	    CASE_UNK(0, 1, 2, -1, 1, 0, 0, 0,
+				 "Explicit RR min param, alt scope"),
+	    CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0,
+				 "Detached, explicit FIFO max param"),
+	    CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0,
+				 "Detached, explicit RR max param"),
+	    CASE_UNK(1, 1, 1, -1, 0, 0, 0, 0,
+				 "Detached, explicit FIFO min param"),
+	    CASE_UNK(1, 1, 2, -1, 0, 0, 0, 0,
+				 "Detached, explicit RR min param"),
+	    CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0,
+				 "Detached, explicit FIFO max param,"
+				 " alt scope"), CASE_UNK(1, 1, 2, 1,
+								     1,
+								     0,
+								     0,
+								     0,
+								     "Detached, explicit RR max param,"
+								     " alt scope"),
+	    CASE_UNK(1, 1, 1, -1, 1, 0, 0, 0,
+				 "Detached, explicit FIFO min param,"
+				 " alt scope"), CASE_UNK(1, 1, 2,
+								     -1,
+								     1,
+								     0,
+								     0,
+								     0,
+								     "Detached, explicit RR min param,"
+								     " alt scope"),};
 
 #define NSCENAR (sizeof(scenarii) / sizeof(scenarii[0]))
 
@@ -181,30 +199,30 @@
 	long pagesize, minstacksize;
 	long tsa, tss, tps;
 
-	pagesize	= sysconf(_SC_PAGESIZE);
-	minstacksize	= sysconf(_SC_THREAD_STACK_MIN);
-	tsa		= sysconf(_SC_THREAD_ATTR_STACKADDR);
-	tss		= sysconf(_SC_THREAD_ATTR_STACKSIZE);
-	tps		= sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
+	pagesize = sysconf(_SC_PAGESIZE);
+	minstacksize = sysconf(_SC_THREAD_STACK_MIN);
+	tsa = sysconf(_SC_THREAD_ATTR_STACKADDR);
+	tss = sysconf(_SC_THREAD_ATTR_STACKSIZE);
+	tps = sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("System abilities:\n");
 	output(" TSA: %li\n", tsa);
 	output(" TSS: %li\n", tss);
 	output(" TPS: %li\n", tps);
 	output(" pagesize: %li\n", pagesize);
 	output(" min stack size: %li\n", minstacksize);
-	#endif
+#endif
 
 	if (minstacksize % pagesize)
 		UNTESTED("The min stack size is not a multiple"
 			 " of the page size");
 
 	for (i = 0; i < NSCENAR; i++) {
-		#if VERBOSE > 2
+#if VERBOSE > 2
 		output("Initializing attribute for scenario %i: %s\n",
 		       i, scenarii[i].descr);
-		#endif
+#endif
 
 		ret = pthread_attr_init(&scenarii[i].ta);
 		if (ret != 0)
@@ -214,11 +232,12 @@
 		/* Set the attributes according to the scenario */
 		if (scenarii[i].detached == 1) {
 			ret = pthread_attr_setdetachstate(&scenarii[i].ta,
-						PTHREAD_CREATE_DETACHED);
+							  PTHREAD_CREATE_DETACHED);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to set detachstate");
 		} else {
-			ret = pthread_attr_getdetachstate(&scenarii[i].ta, &old);
+			ret =
+			    pthread_attr_getdetachstate(&scenarii[i].ta, &old);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to get detachstate"
 					   " from initialized attribute");
@@ -226,9 +245,9 @@
 				FAILED("The default attribute is not"
 				       " PTHREAD_CREATE_JOINABLE");
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("Detach state was set sucessfully\n");
-		#endif
+#endif
 
 		/* Sched related attributes */
 		/*
@@ -237,54 +256,61 @@
 		 */
 		if (tps > 0) {
 			if (scenarii[i].explicitsched == 1)
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta,
-						PTHREAD_EXPLICIT_SCHED);
+				ret =
+				    pthread_attr_setinheritsched(&scenarii
+								 [i].ta,
+								 PTHREAD_EXPLICIT_SCHED);
 			else
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta,
-						PTHREAD_INHERIT_SCHED);
+				ret =
+				    pthread_attr_setinheritsched(&scenarii
+								 [i].ta,
+								 PTHREAD_INHERIT_SCHED);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to set inheritsched"
 					   " attribute");
-			#if VERBOSE > 4
+#if VERBOSE > 4
 			output("inheritsched state was set sucessfully\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TPS unsupported => inheritsched parameter"
 			       " untouched\n");
-		#endif
+#endif
 
 		if (tps > 0) {
 			if (scenarii[i].schedpolicy == 1)
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta,
-								  SCHED_FIFO);
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_FIFO);
 			if (scenarii[i].schedpolicy == 2)
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta,
-								  SCHED_RR);
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_RR);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to set the"
-						" sched policy");
-			#if VERBOSE > 4
+					   " sched policy");
+#if VERBOSE > 4
 			if (scenarii[i].schedpolicy)
 				output("Sched policy was set sucessfully\n");
 			else
 				output("Sched policy untouched\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TPS unsupported => sched policy parameter"
 			       " untouched\n");
-		#endif
+#endif
 
 		if (scenarii[i].schedparam != 0) {
 			struct sched_param sp;
 
-			ret = pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
+			ret =
+			    pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to get sched policy"
-						" from attribute");
+					   " from attribute");
 
 			if (scenarii[i].schedparam == 1)
 				sp.sched_priority = sched_get_priority_max(old);
@@ -293,14 +319,15 @@
 
 			ret = pthread_attr_setschedparam(&scenarii[i].ta, &sp);
 			if (ret != 0)
-				UNRESOLVED(ret, "Failed to set the sched param");
+				UNRESOLVED(ret,
+					   "Failed to set the sched param");
 
-		#if VERBOSE > 4
+#if VERBOSE > 4
 			output("Sched param was set sucessfully to %i\n",
 			       sp.sched_priority);
 		} else {
 			output("Sched param untouched\n");
-		#endif
+#endif
 		}
 
 		if (tps > 0) {
@@ -315,16 +342,17 @@
 				else
 					old = PTHREAD_SCOPE_PROCESS;
 
-				ret = pthread_attr_setscope(&scenarii[i].ta, old);
+				ret =
+				    pthread_attr_setscope(&scenarii[i].ta, old);
 
-				#if VERBOSE > 0
+#if VERBOSE > 0
 				if (ret != 0)
 					output("WARNING: The TPS option is"
 					       " claimed to be supported but"
 					       " setscope fails\n");
-				#endif
+#endif
 
-			#if VERBOSE > 4
+#if VERBOSE > 4
 				output("Contension scope set to %s\n",
 				       old == PTHREAD_SCOPE_PROCESS ?
 				       "PTHREAD_SCOPE_PROCESS" :
@@ -334,14 +362,14 @@
 				       old == PTHREAD_SCOPE_PROCESS ?
 				       "PTHREAD_SCOPE_PROCESS" :
 				       "PTHREAD_SCOPE_SYSTEM");
-			#endif
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TPS unsupported => sched contension scope"
 			       " parameter untouched\n");
-		#endif
+#endif
 
 		/* Stack related attributes */
 		/*
@@ -370,34 +398,38 @@
 					UNRESOLVED(ret, "Failed to specify"
 						   " alternate stack");
 
-				#if VERBOSE > 1
+#if VERBOSE > 1
 				output("Alternate stack created successfully."
 				       " Bottom=%p, Size=%i\n",
 				       scenarii[i].bottom, minstacksize);
-				#endif
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TSA or TSS unsupported => "
 			       "No alternative stack\n");
-		#endif
+#endif
 
-		#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 		if (scenarii[i].guard != 0) {
 			if (scenarii[i].guard == 1)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, 0);
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      0);
 			if (scenarii[i].guard == 2)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, pagesize);
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      pagesize);
 			if (ret != 0)
 				UNRESOLVED(ret, "Unable to set guard area"
 					   " size in thread stack");
-			#if VERBOSE > 4
+#if VERBOSE > 4
 			output("Guard size set to %i\n",
 			       scenarii[i].guard == 1 ? 1 : pagesize);
-			#endif
+#endif
 		}
-		#endif
+#endif
 
 		if (tss > 0) {
 			if (scenarii[i].altsize != 0) {
@@ -406,25 +438,25 @@
 				if (ret != 0)
 					UNRESOLVED(ret, "Unable to change"
 						   " stack size");
-				#if VERBOSE > 4
+#if VERBOSE > 4
 				output("Stack size set to %i (this is the "
 				       "min)\n", minstacksize);
-				#endif
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TSS unsupported => stack size unchanged\n");
-		#endif
+#endif
 
 		ret = sem_init(&scenarii[i].sem, 0, 0);
 		if (ret == -1)
 			UNRESOLVED(errno, "Unable to init a semaphore");
 
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("All %i thread attribute objects were initialized\n\n", NSCENAR);
-	#endif
+#endif
 }
 
 /*
@@ -465,40 +497,40 @@
 	scenar_init();
 
 	for (sc = 0; sc < NSCENAR; sc++) {
-		#if VERBOSE > 0
+#if VERBOSE > 0
 		output("-----\n");
 		output("Starting test with scenario (%i): %s\n",
 		       sc, scenarii[sc].descr);
-		#endif
+#endif
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
 		switch (scenarii[sc].result) {
-		case 0: /* Operation was expected to succeed */
+		case 0:	/* Operation was expected to succeed */
 			if (ret != 0)
 				UNRESOLVED(ret, "Failed to create this thread");
 			break;
-		case 1: /* Operation was expected to fail */
+		case 1:	/* Operation was expected to fail */
 			if (ret == 0)
 				UNRESOLVED(-1, "An error was expected but the"
 					   " thread creation succeeded");
 			break;
-		case 2: /* We did not know the expected result */
+		case 2:	/* We did not know the expected result */
 		default:
-			#if VERBOSE > 0
+#if VERBOSE > 0
 			if (ret == 0)
 				output("Thread has been created successfully"
 				       " for this scenario\n");
 			else
 				output("Thread creation failed with the error:"
 				       " %s\n", strerror(ret));
-			#endif
+#endif
 		}
 		if (ret == 0) {
 			if (scenarii[sc].detached == 0) {
 				ret = pthread_join(child, NULL);
 				if (ret != 0)
 					UNRESOLVED(ret, "Unable to join a"
-							" thread");
+						   " thread");
 			} else {
 				/* Just wait for the thread to terminate */
 				do {
@@ -506,17 +538,17 @@
 				} while ((ret == -1) && (errno == EINTR));
 				if (ret == -1)
 					UNRESOLVED(errno, "Failed to wait for"
-							  " the semaphore");
+						   " the semaphore");
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/time/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/time/1-1.c
index f55120b..395dc61 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/time/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/time/1-1.c
@@ -21,7 +21,7 @@
 	time_t current_time;
 
 	current_time = time(NULL);
-	printf("%ju secs since the Epoch\n",(uintmax_t) current_time);
+	printf("%ju secs since the Epoch\n", (uintmax_t) current_time);
 
 	if (current_time != -1) {
 		puts("Test PASSED");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/1-1.c
index 503dc25..06f1952 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/1-1.c
@@ -50,16 +50,16 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -85,14 +85,13 @@
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-				(int) ts.tv_sec- (int) tsleft.tv_sec,
-				TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/10-1.c
index cc9b7f6..4af2f43 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/10-1.c
@@ -87,23 +87,22 @@
 	 * The bussy loop is intentional. The signal is send after
 	 * two seconds of CPU time has been accumulated.
 	 */
-	while (!caught_signal);
+	while (!caught_signal) ;
 
 	if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts_end) != 0) {
 		perror("clock_gettime() failed");
 		return PTS_UNRESOLVED;
 	}
 
-	if (abs(ts_end.tv_sec - ts_start.tv_sec - TIMERSEC) <=
-	    ACCEPTABLEDELTA) {
+	if (abs(ts_end.tv_sec - ts_start.tv_sec - TIMERSEC) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	printf("Timer did not last for correct amount of time\n"
-		"stop - start = %d - %d > %d\n",
-		(int) ts_end.tv_sec, (int) ts_start.tv_sec,
-		TIMERSEC + ACCEPTABLEDELTA);
+	       "stop - start = %d - %d > %d\n",
+	       (int)ts_end.tv_sec, (int)ts_start.tv_sec,
+	       TIMERSEC + ACCEPTABLEDELTA);
 	return PTS_FAIL;
 #endif
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/11-1.c
index 4816957..707a678 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/11-1.c
@@ -87,23 +87,22 @@
 	 * The bussy loop is intentional. The signal is send after
 	 * two seconds of CPU time has been accumulated.
 	 */
-	while (!caught_signal);
+	while (!caught_signal) ;
 
 	if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts_end) != 0) {
 		perror("clock_gettime() failed");
 		return PTS_UNRESOLVED;
 	}
 
-	if (abs(ts_end.tv_sec - ts_start.tv_sec - TIMERSEC) <=
-	    ACCEPTABLEDELTA) {
+	if (abs(ts_end.tv_sec - ts_start.tv_sec - TIMERSEC) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	}
 
 	printf("Timer did not last for correct amount of time\n"
-		"stop - start = %d - %d > %d\n",
-		(int) ts_end.tv_sec, (int) ts_start.tv_sec,
-		TIMERSEC + ACCEPTABLEDELTA);
+	       "stop - start = %d - %d > %d\n",
+	       (int)ts_end.tv_sec, (int)ts_start.tv_sec,
+	       TIMERSEC + ACCEPTABLEDELTA);
 	return PTS_FAIL;
 #endif
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/3-1.c
index 93a9dcc..f47853b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/3-1.c
@@ -36,8 +36,8 @@
 	timer_t tid;
 	struct timespec ts;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 	sigemptyset(&act.sa_mask);
 	if (sigaction(SIGTOTEST, &act, 0) == -1) {
 		perror("Error calling sigaction\n");
@@ -51,13 +51,12 @@
 		return PTS_FAIL;
 	}
 
-	ts.tv_sec=SLEEPTIME;
-	ts.tv_nsec=0;
+	ts.tv_sec = SLEEPTIME;
+	ts.tv_nsec = 0;
 	if (nanosleep(&ts, NULL) == -1) {
 		perror("nanosleep() interrupted\n");
 		return PTS_FAIL;
 	}
-
 	//Sleep not interrupted
 	printf("Test PASSED\n");
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/7-1.c
index 844695a..1e7f855 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/7-1.c
@@ -32,8 +32,7 @@
 int main(int argc, char *argv[])
 {
 #ifdef CLOCK_MONOTONIC
-	if (sysconf(_SC_MONOTONIC_CLOCK) == -1)
-	{
+	if (sysconf(_SC_MONOTONIC_CLOCK) == -1) {
 		printf("CLOCK_MONOTONIC unsupported\n");
 		return PTS_UNSUPPORTED;
 	}
@@ -46,16 +45,16 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -81,14 +80,13 @@
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-				(int) ts.tv_sec- (int) tsleft.tv_sec,
-				TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/8-1.c
index 6d5c8fa..bd6ac49 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/8-1.c
@@ -60,8 +60,8 @@
 	struct itimerspec its;
 	int pid;
 
-	actp.sa_handler=parenthandler;
-	actp.sa_flags=0;
+	actp.sa_handler = parenthandler;
+	actp.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
@@ -91,8 +91,8 @@
 		/* child here */
 		struct sigaction act;
 		struct timespec ts, tsleft;
-		act.sa_handler=handler;
-		act.sa_flags=0;
+		act.sa_handler = handler;
+		act.sa_flags = 0;
 
 		if (sigemptyset(&act.sa_mask) == -1) {
 			perror("Error calling sigemptyset\n");
@@ -103,14 +103,13 @@
 			return CHILDFAILURE;
 		}
 
-		ts.tv_sec=TIMERSEC+SLEEPDELTA;
-		ts.tv_nsec=0;
+		ts.tv_sec = TIMERSEC + SLEEPDELTA;
+		ts.tv_nsec = 0;
 
 		if (nanosleep(&ts, &tsleft) == -1) {
 			printf("child nanosleep() interrupted\n");
 			return CHILDFAILURE;
 		}
-
 		//nanosleep() not interrupted
 		return CHILDSUCCESS;
 
@@ -122,8 +121,8 @@
 		/*
 		 * parent also sleeps to allow timer to expire
 		 */
-		tsp.tv_sec=TIMERSEC;
-		tsp.tv_nsec=0;
+		tsp.tv_sec = TIMERSEC;
+		tsp.tv_nsec = 0;
 		if (nanosleep(&tsp, &rem) == -1) {
 			tsp = rem;
 			if (nanosleep(&tsp, &rem) == -1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/9-1.c
index e9cdad7..3cda8fc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/9-1.c
@@ -44,8 +44,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/15-1.c
index 606779b..7baaa61 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/15-1.c
@@ -36,7 +36,7 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGALRM;
 
-	for (i=0; i<TIMER_MAX+1;i++) {
+	for (i = 0; i < TIMER_MAX + 1; i++) {
 		if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1) {
 			printf("Stopped after %d timers.\n", i);
 			if (EAGAIN == errno) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/2-1.c
index 5435745..bec4fbd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/2-1.c
@@ -23,7 +23,7 @@
 
 int compare(const void *key, const void *amemb)
 {
-	if (*(timer_t *)key == *(timer_t *)amemb) {
+	if (*(timer_t *) key == *(timer_t *) amemb) {
 		return 0;
 	} else {
 		return 1;
@@ -41,19 +41,18 @@
 	ev.sigev_signo = SIGALRM;
 
 #if defined DEBUG && defined TIMER_MAX
-	printf("Max timers is %ld\n", (long) TIMER_MAX);
+	printf("Max timers is %ld\n", (long)TIMER_MAX);
 	int max = TIMER_MAX;
 #else
 	int max = 256;
 #endif
-	tids = (timer_t *) malloc (max * sizeof (timer_t));
-	if (tids == NULL)
-	{
+	tids = (timer_t *) malloc(max * sizeof(timer_t));
+	if (tids == NULL) {
 		perror("malloc failed\n");
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<max;i++) {
+	for (i = 0; i < max; i++) {
 		if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 #ifndef TIMER_MAX
 			if (errno == EAGAIN)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/5-1.c
index 6d2c617..01312a9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/5-1.c
@@ -54,16 +54,16 @@
 	struct itimerspec its;
 	struct timespec ts, tsleft;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -89,14 +89,12 @@
 		printf("default signal most likely != SIGALRM\n");
 		return PTS_PASS;
 	}
-
 	// Test can validly fail if timer did not last for correct amount
 	// of time, but nanosleep() was interrupted.
-	if (abs(tsleft.tv_sec-SLEEPDELTA) > ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) > ACCEPTABLEDELTA) {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-				(int) ts.tv_sec- (int) tsleft.tv_sec,
-				TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-1.c
index b506bf4..8491187 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-1.c
@@ -47,8 +47,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c
index db24d1d..c899e4d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c
@@ -51,7 +51,7 @@
 	its.it_value.tv_nsec = 0;
 
 	if (timer_settime(tid, 0, &its, NULL) == -1) {
-		if (errno==EINVAL) {
+		if (errno == EINVAL) {
 			printf("Test PASSED\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-1.c
index 62d5964..c77479e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-1.c
@@ -24,11 +24,13 @@
 	tid = (timer_t) & tval;
 
 	if (timer_delete(tid) == -1) {
-		if (errno==EINVAL) {
-			printf("timer_delete() returned -1 and set errno=EINVAL\n");
+		if (errno == EINVAL) {
+			printf
+			    ("timer_delete() returned -1 and set errno=EINVAL\n");
 			return PTS_PASS;
 		} else {
-			printf("timer_delete() returned -1, but didn't set errno!=EINVAL\n");
+			printf
+			    ("timer_delete() returned -1, but didn't set errno!=EINVAL\n");
 			return PTS_FAIL;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-2.c
index eecbf6b..bd85acb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-2.c
@@ -42,8 +42,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
@@ -80,7 +80,7 @@
 	}
 
 	if (timer_delete(tid) == -1) {
-		if (errno==EINVAL) {
+		if (errno == EINVAL) {
 			printf("fcn returned -1 and set errno=EINVAL\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/1-1.c
index 5b87057..ad011be 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/1-1.c
@@ -48,8 +48,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	/*
 	 * set up handler for SIGTOTEST
@@ -97,7 +97,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (sleep(2*TIMERINTERVAL + TIMERVAL) != 0) {
+	if (sleep(2 * TIMERINTERVAL + TIMERVAL) != 0) {
 		perror("Could not sleep for correct amount of time\n");
 		return PTS_UNRESOLVED;
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-1.c
index d1b5eed..da8df4d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-1.c
@@ -72,7 +72,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	sleep(VALUESEC+2*INTERVALSEC+1);
+	sleep(VALUESEC + 2 * INTERVALSEC + 1);
 
 	if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) {
 		perror("sigprocmask() did not return success\n");
@@ -85,7 +85,7 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  %d overruns sent; expected %d\n",
-				overruns, EXPECTEDOVERRUNS);
+		       overruns, EXPECTEDOVERRUNS);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-2.c
index 3f4d711..56cebde 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-2.c
@@ -104,7 +104,7 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  %d overruns sent; expected %d\n",
-				overruns, EXPECTEDOVERRUNS);
+		       overruns, EXPECTEDOVERRUNS);
 		return PTS_FAIL;
 	}
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-3.c
index 2a30fa6..1f379e9 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-3.c
@@ -93,13 +93,12 @@
 	}
 
 	valuensec = tsres.tv_nsec;
-	intervalnsec = 2*valuensec;
+	intervalnsec = 2 * valuensec;
 	//expectedoverruns = (1000000000 - valuensec) / intervalnsec;
 	expectedoverruns = 1000000000 / intervalnsec - 1;
 
 	printf("value = %d sec, interval = %d nsec, "
-			"expected overruns = %d\n",
-			1, intervalnsec, expectedoverruns);
+	       "expected overruns = %d\n", 1, intervalnsec, expectedoverruns);
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = intervalnsec;
@@ -112,7 +111,6 @@
 		perror("timer_settime() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
-
 	//tssleep.tv_nsec = valuensec + (expectedoverruns*intervalnsec);
 	tssleep.tv_nsec = 0;
 	tssleep.tv_sec = 2;
@@ -132,8 +130,8 @@
 	//its.it_value.tv_sec = 0;
 	//its.it_value.tv_nsec = 0;
 	//if (timer_settime(tid, 0, &its, NULL) != 0) {
-	//	perror("timer_settime() did not return success\n");
-	//	return PTS_UNRESOLVED;
+	//      perror("timer_settime() did not return success\n");
+	//      return PTS_UNRESOLVED;
 	//}
 
 	if (sigprocmask(SIG_UNBLOCK, &set, NULL) != 0) {
@@ -148,13 +146,13 @@
 	 * extra expiries after the nanosleep completes so do
 	 * a range check.
 	 */
-	fudge = expectedoverruns/100;
-	if (overruns >= expectedoverruns && overruns < expectedoverruns+fudge) {
+	fudge = expectedoverruns / 100;
+	if (overruns >= expectedoverruns && overruns < expectedoverruns + fudge) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  %d overruns sent; expected %d\n",
-				overruns, expectedoverruns);
+		       overruns, expectedoverruns);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-2.c
index 2451735..06837a8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-2.c
@@ -43,7 +43,7 @@
 	}
 
 	if (timer_getoverrun(tid) == -1) {
-		if (errno==EINVAL) {
+		if (errno == EINVAL) {
 			printf("fcn returned -1 and set errno=EINVAL\n");
 			return PTS_PASS;
 		} else {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-3.c
index 8f1e31f..7c7531a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-3.c
@@ -34,7 +34,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (timer_getoverrun(tid+1) == -1) {
+	if (timer_getoverrun(tid + 1) == -1) {
 		if (EINVAL == errno) {
 			printf("fcn returned -1 and errno==EINVAL\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-1.c
index 43763e2..5e8f20d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-1.c
@@ -61,8 +61,8 @@
 
 	if (delta < 0) {
 		printf("FAIL:  timer_gettime() value > timer_settime()\n");
-		printf("%d > %d\n", (int) itsget.it_value.tv_sec,
-				(int) itsset.it_value.tv_sec);
+		printf("%d > %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
@@ -71,8 +71,8 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  timer_gettime() value !~= timer_settime()\n");
-		printf("%d !~= %d\n", (int) itsget.it_value.tv_sec,
-					(int) itsset.it_value.tv_sec);
+		printf("%d !~= %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-2.c
index 3048847..67bcbcd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-2.c
@@ -68,8 +68,8 @@
 
 	if (delta < 0) {
 		printf("FAIL:  timer_gettime() value > time expected left\n");
-		printf("%d > %d\n", (int) itsget.it_value.tv_sec,
-				(int) itsset.it_value.tv_sec - SLEEPSEC);
+		printf("%d > %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec - SLEEPSEC);
 		return PTS_FAIL;
 	}
 
@@ -78,8 +78,8 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  timer_gettime() value !~= time expected left\n");
-		printf("%d !~= %d\n", (int) itsget.it_value.tv_sec,
-				(int) itsset.it_value.tv_sec - SLEEPSEC);
+		printf("%d !~= %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec - SLEEPSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-3.c
index 3f416d5..9c71072 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-3.c
@@ -75,16 +75,16 @@
 
 	if (itsget.it_value.tv_sec) {
 		printf("FAIL:  timer_gettime tv_sec: %lu seconds > 0 seconds\n",
-			itsget.it_value.tv_sec);
+		       itsget.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
 	deltans = (itsset.it_value.tv_nsec - ts.tv_nsec) -
-					itsget.it_value.tv_nsec;
+	    itsget.it_value.tv_nsec;
 
 	if (deltans < 0 || deltans > ACCEPTABLEDELTA) {
 		printf("FAIL:  timer_gettime() deltans: %d allowed: %u\n",
-			deltans, ACCEPTABLEDELTA);
+		       deltans, ACCEPTABLEDELTA);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-4.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-4.c
index b275cf9..13ce8a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-4.c
@@ -47,7 +47,7 @@
 	ev.sigev_signo = SIGCONT;
 
 	itsset.it_interval.tv_sec = TIMERINTERVALSEC;
-	itsset.it_interval.tv_nsec = 2*RESOLUTION;
+	itsset.it_interval.tv_nsec = 2 * RESOLUTION;
 	itsset.it_value.tv_sec = TIMERVALSEC;
 	itsset.it_value.tv_nsec = 0;
 
@@ -75,13 +75,14 @@
 	 * Check interval first
 	 */
 	if ((itsget.it_interval.tv_sec != itsset.it_interval.tv_sec) ||
-	    (itsget.it_interval.tv_nsec/RESOLUTION != itsset.it_interval.tv_nsec/RESOLUTION)) {
+	    (itsget.it_interval.tv_nsec / RESOLUTION !=
+	     itsset.it_interval.tv_nsec / RESOLUTION)) {
 		printf("FAIL:  it_interval not correctly set\n");
 		printf("%d != (expected) %d or %d != (expected) %d\n",
-				(int) itsget.it_interval.tv_sec,
-				(int) itsset.it_interval.tv_sec,
-				(int) itsget.it_interval.tv_nsec,
-				(int) itsset.it_interval.tv_nsec);
+		       (int)itsget.it_interval.tv_sec,
+		       (int)itsset.it_interval.tv_sec,
+		       (int)itsget.it_interval.tv_nsec,
+		       (int)itsset.it_interval.tv_nsec);
 		return PTS_UNRESOLVED;
 	}
 
@@ -90,13 +91,12 @@
 	 * value should be < TIMERINTERVALSEC - (SLEEPSEC-TIMERVALSEC)
 	 */
 	expectedleft = itsset.it_interval.tv_sec -
-				(SLEEPSEC - itsset.it_value.tv_sec);
+	    (SLEEPSEC - itsset.it_value.tv_sec);
 	delta = expectedleft - itsget.it_value.tv_sec;
 
 	if (delta < 0) {
 		printf("FAIL:  timer_gettime() value > time expected left\n");
-		printf("%d > %d\n", (int) itsget.it_value.tv_sec,
-				expectedleft);
+		printf("%d > %d\n", (int)itsget.it_value.tv_sec, expectedleft);
 		return PTS_FAIL;
 	}
 
@@ -105,8 +105,8 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  timer_gettime() value !~= time expected left\n");
-		printf("%d !~= %d\n", (int) itsget.it_value.tv_sec,
-				(int) itsset.it_value.tv_sec - SLEEPSEC);
+		printf("%d !~= %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec - SLEEPSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
index 1b9db7f..c0c8eaf 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c
@@ -45,8 +45,7 @@
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  tv_sec %d tv_nsec %d\n",
-				(int) its.it_value.tv_sec,
-				(int) its.it_value.tv_nsec);
+		       (int)its.it_value.tv_sec, (int)its.it_value.tv_nsec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
index 452b57f..578e29a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c
@@ -53,7 +53,7 @@
 	/*
 	 * let timer expire (just call sleep())
 	 */
-	sleep(TIMERSEC+SLEEPDELTA);
+	sleep(TIMERSEC + SLEEPDELTA);
 
 	if (timer_gettime(tid, &itsget) != 0) {
 		perror("timer_gettime() did not return success\n");
@@ -65,8 +65,8 @@
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  tv_sec %d tv_nsec %d\n",
-				(int) itsget.it_value.tv_sec,
-				(int) itsget.it_value.tv_nsec);
+		       (int)itsget.it_value.tv_sec,
+		       (int)itsget.it_value.tv_nsec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/3-1.c
index f0465fb..27a7422 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/3-1.c
@@ -52,7 +52,7 @@
 
 	itsset.it_interval.tv_sec = 0;
 	itsset.it_interval.tv_nsec = 0;
-	itsset.it_value.tv_sec = ts.tv_sec+TIMERSEC;
+	itsset.it_value.tv_sec = ts.tv_sec + TIMERSEC;
 	itsset.it_value.tv_nsec = ts.tv_nsec;
 
 	flags |= TIMER_ABSTIME;
@@ -70,8 +70,8 @@
 
 	if (delta < 0) {
 		printf("FAIL:  timer_gettime() value > timer_settime()\n");
-		printf("%d > %d\n", (int) itsget.it_value.tv_sec,
-			(int) itsset.it_value.tv_sec);
+		printf("%d > %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
@@ -80,8 +80,8 @@
 		return PTS_PASS;
 	} else {
 		printf("FAIL:  timer_gettime() value !~= timer_settime()\n");
-		printf("%d !~= %d\n", (int) itsget.it_value.tv_sec,
-			(int) itsset.it_value.tv_sec);
+		printf("%d !~= %d\n", (int)itsget.it_value.tv_sec,
+		       (int)itsset.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-1.c
index 337ea56..295cbb5 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-1.c
@@ -21,8 +21,8 @@
 {
 	timer_t tid;
 	struct itimerspec its;
-    int tval=BOGUSTID;
-	tid = (timer_t) &tval;
+	int tval = BOGUSTID;
+	tid = (timer_t) & tval;
 	if (timer_gettime(tid, &its) == -1) {
 		if (EINVAL == errno) {
 			printf("fcn returned -1 and errno==EINVAL\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-2.c
index 94e78ec..ce04179 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-2.c
@@ -33,7 +33,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (timer_gettime(tid+1, &its) == -1) {
+	if (timer_gettime(tid + 1, &its) == -1) {
 		if (EINVAL == errno) {
 			printf("fcn returned -1 and errno==EINVAL\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-1.c
index fa672df..f854aa3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-1.c
@@ -52,16 +52,16 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -87,14 +87,13 @@
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-				(int) ts.tv_sec- (int) tsleft.tv_sec,
-				TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-2.c
index 67022bd..6636270 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/1-2.c
@@ -51,8 +51,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
@@ -70,8 +70,8 @@
 		its.it_value.tv_sec = timervals[i][0];
 		its.it_value.tv_nsec = timervals[i][1];
 
-		ts.tv_sec=timervals[i][0]+SLEEPDELTA;
-		ts.tv_nsec=timervals[i][1];
+		ts.tv_sec = timervals[i][0] + SLEEPDELTA;
+		ts.tv_nsec = timervals[i][1];
 
 		if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 			perror("timer_create() did not return success\n");
@@ -88,7 +88,7 @@
 			failure = 1;
 		}
 
-		if (abs(tsleft.tv_sec-SLEEPDELTA) > ACCEPTABLEDELTA) {
+		if (abs(tsleft.tv_sec - SLEEPDELTA) > ACCEPTABLEDELTA) {
 			printf("Timer did not last correct amount of time\n");
 			failure = 1;
 		}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/13-1.c
index 983b1ed..e2e61b8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/13-1.c
@@ -34,26 +34,26 @@
  * element 3 - value.it_interval.tv_nsec
  */
 static int testlist[NUMTESTS][4] = {
-	{1, -1, 0, 0},			// value.it_value.tv_nsec < 0
-	{1, -2147483647, 0, 0},		// value.it_value.tv_nsec < 0
-	{1, -1073743192, 0, 0},		// value.it_value.tv_nsec < 0
-	{1, 1000000000, 0, 0},		// value.it_value.tv_nsec >= 1K mi
-	{1, 1000000001, 0, 0},		// value.it_value.tv_nsec >= 1K mi
-	{1, 2147483647, 0, 0},		// value.it_value.tv_nsec >= 1K mi
-	{1, 1075002478, 0, 0},		// value.it_value.tv_nsec >= 1K mi
-	{1, -1, 0, -1},			// value.it_interval.tv_nsec < 0
-	{1, 0, 0, -2147483647},		// value.it_interval.tv_nsec < 0
-	{1, 0, 0, -1073743192},		// value.it_interval.tv_nsec < 0
-	{1, 0, 0, 1000000000},		// value.it_interval.tv_nsec >= 1K mi
-	{1, 0, 0, 1000000001},		// value.it_interval.tv_nsec >= 1K mi
-	{1, 0, 0, 2147483647},		// value.it_interval.tv_nsec >= 1K mi
-	{1, 0, 0, 1075002478},		// value.it_interval.tv_nsec >= 1K mi
-	{-1, 0, 0, 0},			// value.it_value.tv_sec < 0
-	{-2147483647, 0, 0, 0},		// value.it_value.tv_sec < 0
-	{-1073743192, 0, 0, 0},		// value.it_value.tv_sec < 0
-	{1, 0, -1, 0},			// value.it_interval.tv_sec < 0
-	{1, 0, -2147483647, 0},		// value.it_interval.tv_sec < 0
-	{1, 0, -1073743192, 0},		// value.it_interval.tv_sec < 0
+	{1, -1, 0, 0},		// value.it_value.tv_nsec < 0
+	{1, -2147483647, 0, 0},	// value.it_value.tv_nsec < 0
+	{1, -1073743192, 0, 0},	// value.it_value.tv_nsec < 0
+	{1, 1000000000, 0, 0},	// value.it_value.tv_nsec >= 1K mi
+	{1, 1000000001, 0, 0},	// value.it_value.tv_nsec >= 1K mi
+	{1, 2147483647, 0, 0},	// value.it_value.tv_nsec >= 1K mi
+	{1, 1075002478, 0, 0},	// value.it_value.tv_nsec >= 1K mi
+	{1, -1, 0, -1},		// value.it_interval.tv_nsec < 0
+	{1, 0, 0, -2147483647},	// value.it_interval.tv_nsec < 0
+	{1, 0, 0, -1073743192},	// value.it_interval.tv_nsec < 0
+	{1, 0, 0, 1000000000},	// value.it_interval.tv_nsec >= 1K mi
+	{1, 0, 0, 1000000001},	// value.it_interval.tv_nsec >= 1K mi
+	{1, 0, 0, 2147483647},	// value.it_interval.tv_nsec >= 1K mi
+	{1, 0, 0, 1075002478},	// value.it_interval.tv_nsec >= 1K mi
+	{-1, 0, 0, 0},		// value.it_value.tv_sec < 0
+	{-2147483647, 0, 0, 0},	// value.it_value.tv_sec < 0
+	{-1073743192, 0, 0, 0},	// value.it_value.tv_sec < 0
+	{1, 0, -1, 0},		// value.it_interval.tv_sec < 0
+	{1, 0, -2147483647, 0},	// value.it_interval.tv_sec < 0
+	{1, 0, -1073743192, 0},	// value.it_interval.tv_sec < 0
 };
 
 int main(int argc, char *argv[])
@@ -79,11 +79,10 @@
 		its.it_interval.tv_nsec = testlist[i][3];
 
 		printf("it_value: %d sec %d nsec\n",
-				(int) its.it_value.tv_sec,
-				(int) its.it_value.tv_nsec);
+		       (int)its.it_value.tv_sec, (int)its.it_value.tv_nsec);
 		printf("it_interval: %d sec %d nsec\n",
-				(int) its.it_interval.tv_sec,
-				(int) its.it_interval.tv_nsec);
+		       (int)its.it_interval.tv_sec,
+		       (int)its.it_interval.tv_nsec);
 
 		if (timer_settime(tid, 0, &its, NULL) == -1) {
 			if (EINVAL != errno) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/2-1.c
index ab92823..7c2b9b1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/2-1.c
@@ -57,7 +57,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigprocmask (SIG_BLOCK, &set, NULL) == -1) {
+	if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
 		perror("sigprocmask() failed\n");
 		return PTS_UNRESOLVED;
 	}
@@ -89,7 +89,7 @@
 	 */
 
 	for (i = 0; i < NUMREPS; i++) {
-		printf("Test for value %d\n", (int) its.it_value.tv_sec);
+		printf("Test for value %d\n", (int)its.it_value.tv_sec);
 		if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) {
 			perror("clock_gettime() did not return success\n");
 			return PTS_UNRESOLVED;
@@ -110,17 +110,17 @@
 			return PTS_UNRESOLVED;
 		}
 
-		timeelapsed = tsafter.tv_sec-tsbefore.tv_sec;
+		timeelapsed = tsafter.tv_sec - tsbefore.tv_sec;
 
 		if (timeelapsed < 0) {
 			perror("clock_gettime inconsistent\n");
 			return PTS_UNRESOLVED;
 		}
 
-		delta = timeelapsed-its.it_value.tv_sec;
+		delta = timeelapsed - its.it_value.tv_sec;
 		if ((delta > ACCEPTABLEDELTA) || (delta < 0)) {
 			printf("FAIL:  timer_settime() invalid on %d\n",
-					(int) its.it_value.tv_sec);
+			       (int)its.it_value.tv_sec);
 			failure = 1;
 		}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-1.c
index e445827..46fa3fb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-1.c
@@ -48,8 +48,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
@@ -59,8 +59,8 @@
 	its.it_value.tv_sec = 0;
 	its.it_value.tv_nsec = 0;
 
-	ts.tv_sec=SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-2.c
index 49c464a..0dc6679 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-2.c
@@ -40,8 +40,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -84,8 +84,8 @@
 	/*
 	 * Ensure sleep for TIMEREXPIRE seconds not interrupted
 	 */
-	ts.tv_sec=TIMEREXPIRE;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMEREXPIRE;
+	ts.tv_nsec = 0;
 
 	if (nanosleep(&ts, NULL) == -1) {
 		printf("nanosleep() interrupted\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-3.c
index f10a887..afb2ae1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/3-3.c
@@ -83,8 +83,8 @@
 	 * Second, set value.it_value = 0 and set up handler to catch
 	 * signal.
 	 */
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -115,8 +115,8 @@
 	/*
 	 * Ensure sleep for TIMEREXPIRE seconds not interrupted
 	 */
-	ts.tv_sec=SLEEPTIME;
-	ts.tv_nsec=0;
+	ts.tv_sec = SLEEPTIME;
+	ts.tv_nsec = 0;
 
 	printf("sleep again\n");
 	if (nanosleep(&ts, NULL) == -1) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-1.c
index 47fdb01..b4d91b4 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-1.c
@@ -48,8 +48,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -72,11 +72,11 @@
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = beforets.tv_sec+TIMERSEC;
+	its.it_value.tv_sec = beforets.tv_sec + TIMERSEC;
 	its.it_value.tv_nsec = beforets.tv_nsec;
 
-	ts.tv_sec=TIMERSEC+SLEEPDELTA;
-	ts.tv_nsec=0;
+	ts.tv_sec = TIMERSEC + SLEEPDELTA;
+	ts.tv_nsec = 0;
 
 	flags |= TIMER_ABSTIME;
 	if (timer_settime(tid, flags, &its, NULL) != 0) {
@@ -89,14 +89,13 @@
 		return PTS_FAIL;
 	}
 
-	if (abs(tsleft.tv_sec-SLEEPDELTA) <= ACCEPTABLEDELTA) {
+	if (abs(tsleft.tv_sec - SLEEPDELTA) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Timer did not last for correct amount of time\n");
 		printf("timer: %d != correct %d\n",
-				(int) ts.tv_sec- (int) tsleft.tv_sec,
-				TIMERSEC);
+		       (int)ts.tv_sec - (int)tsleft.tv_sec, TIMERSEC);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-2.c
index 662e1b0..26c4b10 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-2.c
@@ -30,7 +30,7 @@
 
 #define SIGTOTEST SIGALRM
 
-#define DATEINPAST 1037128358 //Nov 13, 2002 ~11:13am
+#define DATEINPAST 1037128358	//Nov 13, 2002 ~11:13am
 
 #define LONGSLEEPTIME 10
 
@@ -52,8 +52,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	its.it_interval.tv_sec = 0;
 	its.it_interval.tv_nsec = 0;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-3.c
index e4a577e..974ba87 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/5-3.c
@@ -54,8 +54,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
 
-	act.sa_handler=handler;
-	act.sa_flags=0;
+	act.sa_handler = handler;
+	act.sa_flags = 0;
 
 	if (sigemptyset(&act.sa_mask) == -1) {
 		perror("Error calling sigemptyset\n");
@@ -87,13 +87,13 @@
 			perror("timer_settime() did not return success");
 			printf("Error is %s\n", strerror(errno));
 			printf("its.it_value.tv_sec was %d\n",
-					(int) its.it_value.tv_sec);
+			       (int)its.it_value.tv_sec);
 		} else {
 			sleep(LONGSLEEPTIME);
 		}
 		its.it_value.tv_sec -= SUBTRACTAMOUNT;
 	}
-	fails = NUMTESTS-passes;
+	fails = NUMTESTS - passes;
 
 	printf("passes %d, fails %d\n", passes, fails);
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/6-1.c
index b76099a..915fbbd 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/6-1.c
@@ -53,7 +53,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (sigprocmask (SIG_BLOCK, &set, NULL) == -1) {
+	if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
 		perror("sigprocmask() failed\n");
 		return PTS_UNRESOLVED;
 	}
@@ -105,13 +105,13 @@
 		return PTS_UNRESOLVED;
 	}
 
-	timeelapsed = tsafter.tv_sec-tsbefore.tv_sec;
+	timeelapsed = tsafter.tv_sec - tsbefore.tv_sec;
 	if (timeelapsed < 0) {
 		perror("clock_gettime inconsistent\n");
 		return PTS_UNRESOLVED;
 	}
 
-	delta = timeelapsed-TIMERVALUESEC;
+	delta = timeelapsed - TIMERVALUESEC;
 
 	if ((delta > ACCEPTABLEDELTA) || (delta < 0)) {
 		perror("timer_settime() did not expire after value.it_value\n");
@@ -119,8 +119,8 @@
 	}
 
 	for (i = 0; i < 2; i++) {
-		tsbefore.tv_sec=tsafter.tv_sec;
-		tsbefore.tv_nsec=tsafter.tv_nsec;
+		tsbefore.tv_sec = tsafter.tv_sec;
+		tsbefore.tv_nsec = tsafter.tv_nsec;
 		if (sigwait(&set, &sig) == -1) {
 			perror("sigwait() failed\n");
 			return PTS_UNRESOLVED;
@@ -130,13 +130,13 @@
 			perror("clock_gettime() did not return success\n");
 			return PTS_UNRESOLVED;
 		}
-		timeelapsed = tsafter.tv_sec-tsbefore.tv_sec;
+		timeelapsed = tsafter.tv_sec - tsbefore.tv_sec;
 		if (timeelapsed < 0) {
 			perror("clock_gettime inconsistent\n");
 			return PTS_UNRESOLVED;
 		}
 
-		delta = timeelapsed-TIMERINTERVALSEC;
+		delta = timeelapsed - TIMERINTERVALSEC;
 
 		if ((delta > ACCEPTABLEDELTA) || (delta < 0)) {
 			printf("timer did not wait for correct interval\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-1.c
index 1868c5c..aa5e6ed 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-1.c
@@ -31,7 +31,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGCONT;
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
@@ -46,18 +47,16 @@
 	}
 
 	if ((0 == oits.it_value.tv_sec) &&
-		(0 == oits.it_value.tv_nsec) &&
-		(0 == oits.it_interval.tv_sec) &&
-	  	(0 == oits.it_interval.tv_nsec)) {
+	    (0 == oits.it_value.tv_nsec) &&
+	    (0 == oits.it_interval.tv_sec) && (0 == oits.it_interval.tv_nsec)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  value: tv_sec %d tv_nsec %d\n",
-				(int) oits.it_value.tv_sec,
-				(int) oits.it_value.tv_nsec);
+		       (int)oits.it_value.tv_sec, (int)oits.it_value.tv_nsec);
 		printf("Test FAILED:  interval: tv_sec %d tv_nsec %d\n",
-				(int) oits.it_interval.tv_sec,
-				(int) oits.it_interval.tv_nsec);
+		       (int)oits.it_interval.tv_sec,
+		       (int)oits.it_interval.tv_nsec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-2.c
index 48fb22a..be4e9e6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-2.c
@@ -33,7 +33,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGCONT;
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
@@ -53,13 +54,15 @@
 	/*
 	 * let timer expire (just call sleep())
 	 */
-	sleep(TIMERSEC+SLEEPDELTA);
+	sleep(TIMERSEC + SLEEPDELTA);
 
 	/*
 	 * assign oits parameters so they _must_ be reset
 	 */
-	oits.it_value.tv_sec = 1000; oits.it_value.tv_nsec = 1000;
-	oits.it_interval.tv_sec = 1000; oits.it_interval.tv_nsec = 1000;
+	oits.it_value.tv_sec = 1000;
+	oits.it_value.tv_nsec = 1000;
+	oits.it_interval.tv_sec = 1000;
+	oits.it_interval.tv_nsec = 1000;
 
 	if (timer_settime(tid, 0, &its, &oits) != 0) {
 		perror("timer_settime() did not return success\n");
@@ -67,19 +70,17 @@
 	}
 
 	if ((0 == oits.it_value.tv_sec) &&
-		(0 == oits.it_value.tv_nsec) &&
-		(0 == oits.it_interval.tv_sec) &&
-		(0 == oits.it_interval.tv_nsec)) {
+	    (0 == oits.it_value.tv_nsec) &&
+	    (0 == oits.it_interval.tv_sec) && (0 == oits.it_interval.tv_nsec)) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  value: tv_sec %d tv_nsec %d\n",
-				(int) oits.it_value.tv_sec,
-				(int) oits.it_value.tv_nsec);
+		       (int)oits.it_value.tv_sec, (int)oits.it_value.tv_nsec);
 
 		printf("Test FAILED:  interval: tv_sec %d tv_nsec %d\n",
-				(int) oits.it_interval.tv_sec,
-				(int) oits.it_interval.tv_nsec);
+		       (int)oits.it_interval.tv_sec,
+		       (int)oits.it_interval.tv_nsec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-3.c
index be7ef60..ca0d40f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-3.c
@@ -37,7 +37,8 @@
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGCONT;
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
 	its.it_value.tv_sec = TIMERSEC;
 	its.it_value.tv_nsec = 0;
 
@@ -51,19 +52,19 @@
 		return PTS_UNRESOLVED;
 	}
 
-	sleep(TIMERSEC-TIMELEFT);
+	sleep(TIMERSEC - TIMELEFT);
 
 	if (timer_settime(tid, 0, &its, &oits) != 0) {
 		perror("timer_settime() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 
-	if (abs(oits.it_value.tv_sec-TIMELEFT) <= ACCEPTABLEDELTA) {
+	if (abs(oits.it_value.tv_sec - TIMELEFT) <= ACCEPTABLEDELTA) {
 		printf("Test PASSED\n");
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  time left %d oits.it_value.tv_sec %d\n",
-				TIMELEFT, (int) oits.it_value.tv_sec);
+		       TIMELEFT, (int)oits.it_value.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-4.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-4.c
index 7ae576e..1010f38 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/8-4.c
@@ -36,7 +36,8 @@
 
 	its.it_interval.tv_sec = RELOADVAL;
 	its.it_value.tv_sec = TIMERSEC;
-	its.it_interval.tv_nsec = 0; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_nsec = 0;
 
 	if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {
 		perror("timer_create() did not return success\n");
@@ -61,7 +62,7 @@
 		return PTS_PASS;
 	} else {
 		printf("Test FAILED:  correct %d oits.it_interval %d\n",
-				RELOADVAL, (int) oits.it_interval.tv_sec);
+		       RELOADVAL, (int)oits.it_interval.tv_sec);
 		return PTS_FAIL;
 	}
 
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-1.c
index 02402db..0d25794 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-1.c
@@ -30,8 +30,9 @@
 #define NUMTESTS 6
 
 static int timeroffsets[NUMTESTS][2] = { {0, 30000000}, {1, 0},
-					{1, 30000000}, {2, 0},
-					{1, 5000}, {1, 5} };
+{1, 30000000}, {2, 0},
+{1, 5000}, {1, 5}
+};
 
 int main(int argc, char *argv[])
 {
@@ -43,7 +44,7 @@
 	int sig;
 	int i;
 	int failure = 0;
-	unsigned long totalnsecs, testnsecs; // so long was we are < 2.1 seconds, we should be safe
+	unsigned long totalnsecs, testnsecs;	// so long was we are < 2.1 seconds, we should be safe
 
 	/*
 	 * set up signal set containing SIGTOTEST that will be used
@@ -60,10 +61,10 @@
 		return PTS_UNRESOLVED;
 	}
 
-        if (sigprocmask (SIG_BLOCK, &set, NULL) == -1) {
-                perror("sigprocmask() failed\n");
-                return PTS_UNRESOLVED;
-        }
+	if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
+		perror("sigprocmask() failed\n");
+		return PTS_UNRESOLVED;
+	}
 
 	/*
 	 * set up timer to perform action SIGTOTEST on expiration
@@ -77,13 +78,13 @@
 	}
 
 	for (i = 0; i < NUMTESTS; i++) {
-		its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
+		its.it_interval.tv_sec = 0;
+		its.it_interval.tv_nsec = 0;
 		its.it_value.tv_sec = timeroffsets[i][0];
 		its.it_value.tv_nsec = timeroffsets[i][1];
 
 		printf("Test for value %d sec %d nsec\n",
-				(int) its.it_value.tv_sec,
-				(int) its.it_value.tv_nsec);
+		       (int)its.it_value.tv_sec, (int)its.it_value.tv_nsec);
 
 		if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) {
 			perror("clock_gettime() did not return success\n");
@@ -105,15 +106,14 @@
 			return PTS_UNRESOLVED;
 		}
 
-		totalnsecs = (unsigned long) (tsafter.tv_sec-tsbefore.tv_sec)*
-					1000000000 +
-					(tsafter.tv_nsec-tsbefore.tv_nsec);
-		testnsecs = (unsigned long) its.it_value.tv_sec*1000000000 +
-					its.it_value.tv_nsec;
+		totalnsecs = (unsigned long)(tsafter.tv_sec - tsbefore.tv_sec) *
+		    1000000000 + (tsafter.tv_nsec - tsbefore.tv_nsec);
+		testnsecs = (unsigned long)its.it_value.tv_sec * 1000000000 +
+		    its.it_value.tv_nsec;
 		printf("total %lu test %lu\n", totalnsecs, testnsecs);
 		if (totalnsecs < testnsecs) {
 			printf("FAIL:  Expired %ld < %ld\n", totalnsecs,
-							testnsecs);
+			       testnsecs);
 			failure = 1;
 		}
 	}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-2.c
index 6246bf6..3d248c7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/9-2.c
@@ -37,8 +37,9 @@
 #define NUMTESTS 6
 
 static int timeroffsets[NUMTESTS][2] = { {0, 90000000}, {1, 0},
-					{1, 30000000}, {2, 0},
-					{3, 5000}, {4, 5} };
+{1, 30000000}, {2, 0},
+{3, 5000}, {4, 5}
+};
 
 int main(int argc, char *argv[])
 {
@@ -67,10 +68,10 @@
 		return PTS_UNRESOLVED;
 	}
 
-        if (sigprocmask (SIG_BLOCK, &set, NULL) == -1) {
-                perror("sigprocmask() failed\n");
-                return PTS_UNRESOLVED;
-        }
+	if (sigprocmask(SIG_BLOCK, &set, NULL) == -1) {
+		perror("sigprocmask() failed\n");
+		return PTS_UNRESOLVED;
+	}
 
 	/*
 	 * set up timer to perform action SIGTOTEST on expiration
@@ -84,7 +85,8 @@
 	}
 
 	flags |= TIMER_ABSTIME;
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
 	for (i = 0; i < NUMTESTS; i++) {
 		if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) {
 			perror("clock_gettime() did not return success\n");
@@ -93,20 +95,18 @@
 
 		if (tsbefore.tv_nsec + timeroffsets[i][1] < 1000000000) {
 			its.it_value.tv_sec = tsbefore.tv_sec +
-						timeroffsets[i][0];
+			    timeroffsets[i][0];
 			its.it_value.tv_nsec = tsbefore.tv_nsec +
-						timeroffsets[i][1];
+			    timeroffsets[i][1];
 		} else {
 			its.it_value.tv_sec = tsbefore.tv_sec +
-						timeroffsets[i][0] + 1;
+			    timeroffsets[i][0] + 1;
 			its.it_value.tv_nsec = tsbefore.tv_nsec +
-						timeroffsets[i][1] -
-						1000000000;
+			    timeroffsets[i][1] - 1000000000;
 		}
 
 		printf("Test for value %d sec %d nsec\n",
-				(int) its.it_value.tv_sec,
-				(int) its.it_value.tv_nsec);
+		       (int)its.it_value.tv_sec, (int)its.it_value.tv_nsec);
 
 		if (timer_settime(tid, flags, &its, NULL) != 0) {
 			perror("timer_settime() did not return success\n");
@@ -124,21 +124,20 @@
 		}
 
 		printf("Timer expired %d sec %d nsec\n",
-				(int) tsafter.tv_sec,
-				(int) tsafter.tv_nsec);
+		       (int)tsafter.tv_sec, (int)tsafter.tv_nsec);
 		if (tsafter.tv_sec < its.it_value.tv_sec) {
 			printf("FAIL:  Timer expired %d sec < %d sec\n",
-					(int) tsafter.tv_sec,
-					(int) its.it_value.tv_sec);
+			       (int)tsafter.tv_sec, (int)its.it_value.tv_sec);
 			failure = 1;
 		} else if (tsafter.tv_sec == its.it_value.tv_sec) {
-				if (tsafter.tv_nsec < its.it_value.tv_nsec) {
-			printf("FAIL:  Timer expired %d nsec < %d nsec\n",
-						(int) tsafter.tv_nsec,
-						(int) its.it_value.tv_nsec);
-					failure = 1;
-				}
+			if (tsafter.tv_nsec < its.it_value.tv_nsec) {
+				printf
+				    ("FAIL:  Timer expired %d nsec < %d nsec\n",
+				     (int)tsafter.tv_nsec,
+				     (int)its.it_value.tv_nsec);
+				failure = 1;
 			}
+		}
 	}
 
 	if (timer_delete(tid) != 0) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
index 4e21ea7..5be8f0d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
@@ -22,8 +22,10 @@
 	struct itimerspec its;
 	int tval = BOGUSTID;
 	tid = (timer_t) & tval;
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = 0; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_sec = 0;
+	its.it_value.tv_nsec = 0;
 
 	if (timer_settime(tid, 0, &its, NULL) == -1) {
 		if (EINVAL == errno) {
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-2.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-2.c
index 56d4065..60cbf25 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-2.c
@@ -29,8 +29,10 @@
 	timer_t tid;
 	struct itimerspec its;
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = 0; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_sec = 0;
+	its.it_value.tv_nsec = 0;
 
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
@@ -40,7 +42,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	if (timer_settime(tid+1, 0, &its, NULL) == -1) {
+	if (timer_settime(tid + 1, 0, &its, NULL) == -1) {
 		if (EINVAL == errno) {
 			printf("fcn returned -1 and errno==EINVAL\n");
 			return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-3.c b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-3.c
index e2e3425..2676c89 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-3.c
@@ -27,8 +27,10 @@
 	timer_t tid;
 	struct itimerspec its;
 
-	its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
-	its.it_value.tv_sec = 0; its.it_value.tv_nsec = 0;
+	its.it_interval.tv_sec = 0;
+	its.it_interval.tv_nsec = 0;
+	its.it_value.tv_sec = 0;
+	its.it_value.tv_nsec = 0;
 
 	ev.sigev_notify = SIGEV_SIGNAL;
 	ev.sigev_signo = SIGTOTEST;
diff --git a/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c b/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
index 97a2eb0..816c613 100644
--- a/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
+++ b/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c
@@ -29,9 +29,9 @@
 {
 	struct mq_attr mqstat, attr;
 	char r_msg_ptr[MAX_MSG][MSG_SIZE];
-	const char *s_msg_ptr[] = {"msg test 1", "msg test 2", "msg test 3"};
+	const char *s_msg_ptr[] = { "msg test 1", "msg test 2", "msg test 3" };
 	int i;
-	int oflag = O_CREAT|O_RDWR;
+	int oflag = O_CREAT | O_RDWR;
 	int ret_code = PTS_PASS;
 	mqd_t mq = 0;
 	pid_t pid;
@@ -46,7 +46,7 @@
 	return PTS_UNRESOLVED;
 #endif */
 
-	if (((mqd_t) -1) == (mq = mq_open(MQ_NAME, oflag, 0777, &mqstat))) {
+	if (((mqd_t) - 1) == (mq = mq_open(MQ_NAME, oflag, 0777, &mqstat))) {
 		perror("mq_open doesn't return success \n");
 		return PTS_UNRESOLVED;
 	}
@@ -59,15 +59,16 @@
 	case 0:
 		mq_getattr(mq, &attr);
 		for (i = 0; i < MAX_MSG && ret_code == PTS_PASS; i++) {
-			printf("[%d] s_msg_ptr is '%s' \n", i+1, s_msg_ptr[i]);
+			printf("[%d] s_msg_ptr is '%s' \n", i + 1,
+			       s_msg_ptr[i]);
 			printf("Prepare to send message...\n");
 			if (-1 == mq_send(mq, s_msg_ptr[i], attr.mq_msgsize, 1)) {
 				perror("mq_send doesn't return success \n");
 				ret_code = PTS_UNRESOLVED;
 			} else {
 				printf("Process %ld send message '%s' to "
-				    "process %ld \n",
-				    (long)getpid(), s_msg_ptr[i], (long)pid);
+				       "process %ld \n",
+				       (long)getpid(), s_msg_ptr[i], (long)pid);
 			}
 		}
 		(void)wait(NULL);
@@ -76,14 +77,17 @@
 		printf("Enter into child process...\n");
 		mq_getattr(mq, &attr);
 		for (i = 0; i < MAX_MSG && ret_code == PTS_PASS; i++) {
-			printf("Prepare to receive [%d] messages...\n", i+1);
-			if (-1 == mq_receive(mq, r_msg_ptr[i], attr.mq_msgsize, NULL)) {
+			printf("Prepare to receive [%d] messages...\n", i + 1);
+			if (-1 ==
+			    mq_receive(mq, r_msg_ptr[i], attr.mq_msgsize,
+				       NULL)) {
 				perror("mq_receive doesn't return success \n");
 				ret_code = PTS_UNRESOLVED;
 			} else {
 				printf("process %ld receive message '%s' from "
-				    "process %ld \n",
-				    (long)getpid(), r_msg_ptr[i], (long)getppid());
+				       "process %ld \n",
+				       (long)getpid(), r_msg_ptr[i],
+				       (long)getppid());
 			}
 		}
 		exit(ret_code);
@@ -91,8 +95,8 @@
 		break;
 	}
 
-	(void) mq_close(mq);
-	(void) mq_unlink(MQ_NAME);
+	(void)mq_close(mq);
+	(void)mq_unlink(MQ_NAME);
 
 	return ret_code;
 
diff --git a/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c b/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
index eb0f7e8..2d524d6 100644
--- a/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
+++ b/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
@@ -30,15 +30,16 @@
 #define MSG_SIZE	128
 #define MAX_MSG		3
 
-const char *s_msg_ptr[] = {"msg test 1", "msg test 2", "msg test 3"};
+const char *s_msg_ptr[] = { "msg test 1", "msg test 2", "msg test 3" };
+
 char r_msg_ptr_1[MAX_MSG][MSG_SIZE];
 char r_msg_ptr_2[MAX_MSG][MSG_SIZE];
 pthread_t send1, send2, rev1, rev2;
 
-int * send_1(void * mq)
+int *send_1(void *mq)
 {
 	int i;
-	mqd_t mq1 = *(mqd_t *)mq;
+	mqd_t mq1 = *(mqd_t *) mq;
 
 	printf("Enter into send_1 \n");
 	for (i = 0; i < MAX_MSG; i++) {
@@ -46,15 +47,17 @@
 			perror("mq_send doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] send '%s' in thread send_1. \n", i+1, s_msg_ptr[i]);
+		printf("[%d] send '%s' in thread send_1. \n", i + 1,
+		       s_msg_ptr[i]);
 	}
 	pthread_exit((void *)0);
 
 }
-int * send_2(void * mq)
+
+int *send_2(void *mq)
 {
 	int i;
- 	mqd_t mq2 = *(mqd_t *)mq;
+	mqd_t mq2 = *(mqd_t *) mq;
 
 	printf("Enter into send_2 \n");
 	for (i = 0; i < MAX_MSG; i++) {
@@ -62,64 +65,70 @@
 			perror("mq_send doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] send '%s' in thread send_2. \n", i+1, s_msg_ptr[i]);
+		printf("[%d] send '%s' in thread send_2. \n", i + 1,
+		       s_msg_ptr[i]);
 	}
 	pthread_exit((void *)0);
 }
-int * receive_1(void * mq)
+
+int *receive_1(void *mq)
 {
 	int i;
-	mqd_t mq1 = *(mqd_t *)mq;
+	mqd_t mq1 = *(mqd_t *) mq;
 
 	printf("Enter into receive_1 \n");
-	for (i = 0; i< MAX_MSG; i++) {
+	for (i = 0; i < MAX_MSG; i++) {
 		if (-1 == mq_receive(mq1, r_msg_ptr_1[i], MSG_SIZE, NULL)) {
 			perror("mq_receive doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] receive '%s' in thread receive_1. \n", i+1, r_msg_ptr_1[i]);
+		printf("[%d] receive '%s' in thread receive_1. \n", i + 1,
+		       r_msg_ptr_1[i]);
 	}
 	pthread_exit((void *)0);
 }
-int * receive_2(void * mq)
+
+int *receive_2(void *mq)
 {
 	int i;
-	mqd_t mq2 = *(mqd_t *)mq;
+	mqd_t mq2 = *(mqd_t *) mq;
 
 	printf("Enter into receive_2 \n");
-	for (i = 0; i< MAX_MSG; i++) {
+	for (i = 0; i < MAX_MSG; i++) {
 		if (-1 == mq_receive(mq2, r_msg_ptr_2[i], MSG_SIZE, NULL)) {
 			perror("mq_receive doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] receive '%s' in thread receive_2. \n", i+1, r_msg_ptr_2[i]);
+		printf("[%d] receive '%s' in thread receive_2. \n", i + 1,
+		       r_msg_ptr_2[i]);
 	}
 	pthread_exit((void *)0);
 }
+
 int main(int argc, char *argv[])
 {
 
- 	mqd_t mq1 = 0, mq2 = 0;
+	mqd_t mq1 = 0, mq2 = 0;
 	struct mq_attr mqstat;
-	int oflag = O_CREAT|O_NONBLOCK|O_RDWR;
+	int oflag = O_CREAT | O_NONBLOCK | O_RDWR;
 
 	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_maxmsg = MAX_MSG;
 	mqstat.mq_msgsize = MSG_SIZE;
 	mqstat.mq_flags = 0;
 
-  	if ((mq1 = mq_open(MQ_NAME_1,oflag,0777, &mqstat)) == -1) {
+	if ((mq1 = mq_open(MQ_NAME_1, oflag, 0777, &mqstat)) == -1) {
 		printf("mq_open doesn't return success \n");
 		return PTS_UNRESOLVED;
 	}
-  	if ((mq2 = mq_open(MQ_NAME_2,oflag,0777, &mqstat)) == -1) {
+	if ((mq2 = mq_open(MQ_NAME_2, oflag, 0777, &mqstat)) == -1) {
 		printf("mq_open doesn't return success \n");
 		return PTS_UNRESOLVED;
 	}
 	pthread_create(&send1, NULL, (void *)send_1, (void *)&mq1);
 	pthread_create(&send2, NULL, (void *)send_2, (void *)&mq2);
-        pthread_create(&rev1, NULL, (void *)receive_1, (void *)&mq1);
-        pthread_create(&rev2, NULL, (void *)receive_2, (void *)&mq2);
+	pthread_create(&rev1, NULL, (void *)receive_1, (void *)&mq1);
+	pthread_create(&rev2, NULL, (void *)receive_2, (void *)&mq2);
 	pthread_join(send1, NULL);
 	pthread_join(send2, NULL);
 	pthread_join(rev1, NULL);
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c b/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
index 5ab344f..56e8eed 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
@@ -31,16 +31,16 @@
 	sem_t occupied;
 	sem_t empty;
 	sem_t lock;
-}buf_t;
+} buf_t;
 
 int in, out;
 
-int *producer(buf_t *buf)
+int *producer(buf_t * buf)
 {
 	int data;
 	int i;
 
-	for (i = 0; i< Max_Num; i++) {
+	for (i = 0; i < Max_Num; i++) {
 		if (-1 == sem_wait(&buf->occupied)) {
 			perror("sem_wait didn't return success \n");
 			pthread_exit((void *)1);
@@ -49,7 +49,7 @@
 			perror("sem_wait didn't return success \n");
 			pthread_exit((void *)1);
 		}
-		data = 100*i;
+		data = 100 * i;
 		buf->buffer[in] = data;
 		printf("producer has added %d to the buffer[%d] \n", data, in);
 		in = (in + 1) % BUF_SIZE;
@@ -64,7 +64,8 @@
 	}
 	pthread_exit((void *)0);
 }
-int *consumer(buf_t *buf)
+
+int *consumer(buf_t * buf)
 {
 	int data;
 	int i;
@@ -92,15 +93,16 @@
 	}
 	pthread_exit(0);
 }
+
 int main(int argc, char *argv[])
 {
 	int shared = 1;
 	int occupied_value = BUF_SIZE;
 	int empty_value = 0;
-	int lock_value=1;
+	int lock_value = 1;
 	buf_t *buf;
 	pthread_t con, pro;
-	buf = (buf_t *)malloc(sizeof(buf_t));
+	buf = (buf_t *) malloc(sizeof(buf_t));
 
 #ifndef  _POSIX_SEMAPHORES
 	printf("_POSIX_SEMAPHORES is not defined \n");
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_lock.c b/testcases/open_posix_testsuite/functional/semaphores/sem_lock.c
index 6bc8c28..622d15b 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_lock.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_lock.c
@@ -40,10 +40,10 @@
 #endif
 	if ((2 != argc) || ((num = atoi(argv[1])) <= 0)) {
 		printf("Setting num_of_processes to default value: %d\n",
-		    DEFAULT_THREADS);
+		       DEFAULT_THREADS);
 		num = DEFAULT_THREADS;
 	}
-	if ((sem_lock = (sem_t *)malloc(sizeof(sem_t))) == NULL) {
+	if ((sem_lock = (sem_t *) malloc(sizeof(sem_t))) == NULL) {
 		perror("malloc");
 		return PTS_UNRESOLVED;
 	}
@@ -64,8 +64,8 @@
 		}
 
 	sprintf(buf, "%d process_ID: %ld parent_process_ID: %ld "
-	    "child_process_ID: %ld\n", i, (long)getpid(),
-	    (long)getppid(), (long)pid);
+		"child_process_ID: %ld\n", i, (long)getpid(),
+		(long)getppid(), (long)pid);
 
 	if (sem_wait(sem_lock) == -1) {
 		perror("sem_wait didn't return success\n");
@@ -76,7 +76,7 @@
 		while (*c != '\n') {
 			fputc(*c, stdout);
 			c++;
-	 	}
+		}
 		fputc('\n', stdout);
 	}
 
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c b/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
index c7d03a1..5e61a6d 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
@@ -37,31 +37,35 @@
 	printf("Philosoper [%d] is thinking... \n", ID);
 	return 0;
 }
+
 int eat(int ID)
 {
 	printf("Philosoper [%d] is eating... \n", ID);
 	return 0;
 }
+
 int test(int ID)
 {
 	int preID = 0, postID = 0;
 	if ((ID - 1) < 0)
 		preID = PH_NUM + (ID - 1);
 	else
-		preID = (ID - 1)%PH_NUM;
+		preID = (ID - 1) % PH_NUM;
 
 	if ((ID + 1) >= PH_NUM)
 		postID = ID + 1 - PH_NUM;
 	else
-		postID = (ID + 1)%PH_NUM;
+		postID = (ID + 1) % PH_NUM;
 
-	if ((state[ID] == hungry)&&(state[preID]!= eating)&&(state[postID] != eating)) {
+	if ((state[ID] == hungry) && (state[preID] != eating)
+	    && (state[postID] != eating)) {
 		state[ID] = eating;
 		sem_post(&ph[ID]);
 	}
 	return 0;
 
 }
+
 int philosopher(void *ID)
 {
 	int PhID = *(int *)ID;
@@ -95,11 +99,11 @@
 		if ((PhID - 1) < 0)
 			prePH = PH_NUM + (PhID - 1);
 		else
-			prePH = (PhID - 1)%PH_NUM;
+			prePH = (PhID - 1) % PH_NUM;
 		if ((PhID + 1) >= PH_NUM)
 			postPH = PhID + 1 - PH_NUM;
 		else
-			postPH = (PhID + 1)%PH_NUM;
+			postPH = (PhID + 1) % PH_NUM;
 		test(prePH);
 		test(postPH);
 		if (-1 == sem_post(&lock)) {
@@ -107,7 +111,7 @@
 			pthread_exit((void *)1);
 		}
 	}
-	pthread_exit((void *) 0);
+	pthread_exit((void *)0);
 }
 
 int main(int argc, char *argv[])
@@ -117,7 +121,7 @@
 	int shared = 1;
 	int ph_value = 0;
 	int lock_value = 1;
-	int i ;
+	int i;
 
 #ifndef  _POSIX_SEMAPHORES
 	printf("_POSIX_SEMAPHORES is not defined \n");
@@ -135,16 +139,16 @@
 		return PTS_UNRESOLVED;
 	}
 
-	for (i = 0; i< PH_NUM; i++) {
+	for (i = 0; i < PH_NUM; i++) {
 		PhID[i] = i;
 		pthread_create(&phi[i], NULL, (void *)philosopher, &PhID[i]);
 	}
 
-	for (i = 0; i< PH_NUM; i++) {
+	for (i = 0; i < PH_NUM; i++) {
 		pthread_join(phi[i], NULL);
 	}
 
-	for (i = 0; i< PH_NUM; i++) {
+	for (i = 0; i < PH_NUM; i++) {
 		if (-1 == sem_destroy(&ph[i])) {
 			perror("sem_destroy didn't return success \n");
 			return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c b/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
index b097b48..99ffed4 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
@@ -37,15 +37,17 @@
 	printf("read the board, data=%d \n", data);
 	return 0;
 }
+
 int write_fun(int ID)
 {
-	data = 100*ID + ID;
+	data = 100 * ID + ID;
 	printf("write the board, data=%d \n", data);
 	return 0;
 }
+
 int *reader(void *ID)
 {
-	int ThID = *(int*)ID;
+	int ThID = *(int *)ID;
 	if (-1 == sem_wait(&r_lock)) {
 		perror("sem_wait didn't return success\n");
 		pthread_exit((void *)1);
@@ -79,14 +81,16 @@
 		perror("sem_post didn't return success \n");
 		pthread_exit((void *)1);
 	}
-	printf("Reader Thread [%d] exit...reader_count=%d \n", ThID, reader_count);
+	printf("Reader Thread [%d] exit...reader_count=%d \n", ThID,
+	       reader_count);
 	pthread_exit((void *)0);
 }
+
 int *writer(void *ID)
 {
-	int ThID = *(int*)ID;
+	int ThID = *(int *)ID;
 /* When ThID is equal to WRITE_NUM/2, sleep 2 second and let reader read the data */
-	if (ThID >= WRITE_NUM/2)
+	if (ThID >= WRITE_NUM / 2)
 		sleep(2);
 	if (-1 == sem_wait(&w_lock)) {
 		perror("sem_wait didn't return success \n");
@@ -100,6 +104,7 @@
 	printf("Writer Thread [%d] exit...\n", ThID);
 	pthread_exit((void *)0);
 }
+
 int main(int argc, char *argv[])
 {
 	pthread_t rea[READ_NUM], wri[WRITE_NUM];
@@ -107,7 +112,7 @@
 	int shared = 1;
 	int r_value = 1;
 	int w_value = 1;
-	int i ;
+	int i;
 
 #ifndef  _POSIX_SEMAPHORES
 	printf("_POSIX_SEMAPHORES is not defined \n");
@@ -122,18 +127,18 @@
 		return PTS_UNRESOLVED;
 	}
 
-	for (i = 0; i< WRITE_NUM; i++) {
+	for (i = 0; i < WRITE_NUM; i++) {
 		WriteID[i] = i;
 		pthread_create(&wri[i], NULL, (void *)writer, &WriteID[i]);
 	}
-	for (i = 0; i< READ_NUM; i++) {
+	for (i = 0; i < READ_NUM; i++) {
 		ReadID[i] = i;
 		pthread_create(&rea[i], NULL, (void *)reader, &ReadID[i]);
 	}
 
-	for (i = 0; i< READ_NUM; i++)
+	for (i = 0; i < READ_NUM; i++)
 		pthread_join(rea[i], NULL);
-	for (i = 0; i< WRITE_NUM; i++)
+	for (i = 0; i < WRITE_NUM; i++)
 		pthread_join(wri[i], NULL);
 
 	if (-1 == sem_destroy(&r_lock)) {
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c b/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
index 1bafe73..5a07fe1 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
@@ -44,10 +44,10 @@
 
 void mdelay(unsigned msecs)
 {
-    struct timespec req;
-    req.tv_sec = msecs / 1000;
-    req.tv_nsec = (msecs % 1000) * 1000000;
-    nanosleep(&req, NULL);
+	struct timespec req;
+	req.tv_sec = msecs / 1000;
+	req.tv_nsec = (msecs % 1000) * 1000000;
+	nanosleep(&req, NULL);
 }
 
 void *barbers(void *unused)
@@ -59,7 +59,8 @@
 			pthread_exit((void *)1);
 		}
 		if (waiting == 0) {
-			my_printf("There are no more customers waiting, barber will sleep.\n");
+			my_printf
+			    ("There are no more customers waiting, barber will sleep.\n");
 		}
 		if (-1 == sem_post(&lock)) {
 			perror("sem_post(&lock) didn't return success");
@@ -75,25 +76,29 @@
 		}
 		if (waiting >= 1)
 			waiting--;
-		my_printf("A customer sits in the barber's chair and get a hair cut.  %d customers left waiting.\n", waiting);
+		my_printf
+		    ("A customer sits in the barber's chair and get a hair cut.  %d customers left waiting.\n",
+		     waiting);
 		if (-1 == sem_post(&lock)) {
 			perror("sem_post(&lock) didn't return success");
 			pthread_exit((void *)1);
 		}
 		if (-1 == sem_post(&barber)) {
-		perror("sem_post(&barber) didn't return success");
+			perror("sem_post(&barber) didn't return success");
 			pthread_exit((void *)1);
 		}
 
 	}
-	return (void *) 0;
+	return (void *)0;
 }
-void *customers(void* ID)
+
+void *customers(void *ID)
 {
 	int CusID;
 	CusID = *(int *)ID;
 
-	if (CusID == 8) mdelay(10);
+	if (CusID == 8)
+		mdelay(10);
 
 	my_printf("customer %d enters the room.\n", CusID);
 	if (-1 == sem_wait(&lock)) {
@@ -106,7 +111,9 @@
 			perror("sem_post(&customer) didn't return success");
 			pthread_exit((void *)1);
 		}
-		my_printf("Customer %d sits down, now %d customers are waiting.\n", CusID, waiting);
+		my_printf
+		    ("Customer %d sits down, now %d customers are waiting.\n",
+		     CusID, waiting);
 		if (-1 == sem_post(&lock)) {
 			perror("sem_post(&lock) didn't return success");
 			pthread_exit((void *)1);
@@ -116,31 +123,31 @@
 			pthread_exit((void *)1);
 		}
 		my_printf("Customer %d leaves with nice hair.\n", CusID);
-	}
-	else
-	{
-		my_printf("No chairs available, customer %d leaves without a haircut.\n", CusID);
+	} else {
+		my_printf
+		    ("No chairs available, customer %d leaves without a haircut.\n",
+		     CusID);
 		if (-1 == sem_post(&lock)) {
 			perror("sem_post(&lock) didn't return success");
 			pthread_exit((void *)1);
 		}
 	}
-	return (void *) 0;
+	return (void *)0;
 }
+
 int main(int argc, char *argv[])
 {
 	pthread_t bar, cus[CUS_NUM];
 	int shared = 0;
 	int barber_value = 0;
 	int customer_value = 0;
-	int lock_value=1;
+	int lock_value = 1;
 	int i, ID[CUS_NUM];
 
 	if (-1 == sem_init(&print, shared, 1)) {
 		perror("sem_init(&print) didn't return success");
 		return PTS_UNRESOLVED;
 	}
-
 #ifndef  _POSIX_SEMAPHORES
 	my_printf("_POSIX_SEMAPHORES is not defined\n");
 	return PTS_UNRESOLVED;
@@ -162,7 +169,7 @@
 		pthread_create(&cus[i], NULL, customers, (void *)&ID[i]);
 	}
 	pthread_create(&bar, NULL, barbers, NULL);
-	for (i = 0; i< CUS_NUM; i++)
+	for (i = 0; i < CUS_NUM; i++)
 		pthread_join(cus[i], NULL);
 
 	return PTS_PASS;
diff --git a/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_1.c b/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_1.c
index 4fc59e5..123d1e5 100644
--- a/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_1.c
+++ b/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_1.c
@@ -59,15 +59,15 @@
 float timediff(struct timespec t2, struct timespec t1)
 {
 	float diff = t2.tv_sec - t1.tv_sec;
-	diff += (t2.tv_nsec - t1.tv_nsec)/1000000000.0;
+	diff += (t2.tv_nsec - t1.tv_nsec) / 1000000000.0;
 	return diff;
 }
 
 void *hi_priority_thread(void *tmp)
 {
-	struct sched_param        param;
-	int                       policy;
-	int                       rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	param.sched_priority = HIGH_PRIORITY;
 
@@ -125,10 +125,10 @@
 
 void *low_priority_thread(void *tmp)
 {
-	struct timespec        start_time, current_time;
-	struct sched_param     param;
-	int                    policy;
-	int                    rc = 0;
+	struct timespec start_time, current_time;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	param.sched_priority = LOW_PRIORITY;
 
@@ -149,8 +149,7 @@
 
 	/* grab the start time and busy loop for 5 seconds */
 	clock_gettime(CLOCK_REALTIME, &start_time);
-	while (1)
-	{
+	while (1) {
 		clock_gettime(CLOCK_REALTIME, &current_time);
 		if (timediff(current_time, start_time) > RUNTIME)
 			break;
@@ -161,10 +160,10 @@
 
 int main()
 {
-	pthread_t                   high_id, low_id;
-	pthread_attr_t              high_attr, low_attr;
-	struct sched_param          param;
-	int                         rc = 0;
+	pthread_t high_id, low_id;
+	pthread_attr_t high_attr, low_attr;
+	struct sched_param param;
+	int rc = 0;
 
 	/* Create the higher priority thread */
 	rc = pthread_attr_init(&high_attr);
diff --git a/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_2.c b/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_2.c
index 4f9cb54..bf2b1f2 100644
--- a/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_2.c
+++ b/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_2.c
@@ -60,15 +60,15 @@
 float timediff(struct timespec t2, struct timespec t1)
 {
 	float diff = t2.tv_sec - t1.tv_sec;
-	diff += (t2.tv_nsec - t1.tv_nsec)/1000000000.0;
+	diff += (t2.tv_nsec - t1.tv_nsec) / 1000000000.0;
 	return diff;
 }
 
 void *hi_priority_thread(void *tmp)
 {
-	struct sched_param        param;
-	int                       policy;
-	int                       rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	param.sched_priority = HIGH_PRIORITY;
 
@@ -126,10 +126,10 @@
 
 void *low_priority_thread(void *tmp)
 {
-	struct timespec        start_time, current_time;
-	struct sched_param     param;
-	int                    policy;
-	int                    rc = 0;
+	struct timespec start_time, current_time;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	param.sched_priority = LOW_PRIORITY;
 
@@ -150,8 +150,7 @@
 
 	/* grab the start time and busy loop for 5 seconds */
 	clock_gettime(CLOCK_REALTIME, &start_time);
-	while (1)
-	{
+	while (1) {
 		clock_gettime(CLOCK_REALTIME, &current_time);
 		if (timediff(current_time, start_time) > RUNTIME)
 			break;
@@ -162,10 +161,10 @@
 
 int main()
 {
-	pthread_t                   high_id, low_id;
-	pthread_attr_t              high_attr, low_attr;
-	struct sched_param          param;
-	int                         rc = 0;
+	pthread_t high_id, low_id;
+	pthread_attr_t high_attr, low_attr;
+	struct sched_param param;
+	int rc = 0;
 
 	/* Create the higher priority thread */
 	rc = pthread_attr_init(&high_attr);
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c
index 5fde020..11867fe 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-1.c
@@ -52,8 +52,7 @@
 volatile int ts_stop = 0;
 volatile double base_time;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -65,14 +64,15 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 },
-	{ 1,   0,  50, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 },
-	{ 2,   0,   0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 },
-	{ 3,   0,   0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0 },
-	{ 4,   0,   0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0 },
-	{ 5,   0,   0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0 },
-	{ 6,   0,   0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0 },
-	{ 7,   0,   0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 50, 2, SCHED_FIFO, "TP", 0, 0, 0, 0}, {
+	2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	5, 0, 0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	6, 0, 0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	7, 0, 0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -83,14 +83,14 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
 	}
 	return;
 }
+
 void *thread_fn(void *param)
 {
 	struct thread_param *tp = param;
@@ -113,15 +113,15 @@
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0) {
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
-				"%d %s \n", tp->name, tp->index, rc, strerror(rc));
+				"%d %s \n", tp->name, tp->index, rc,
+				strerror(rc));
 			exit(UNRESOLVED);
 		}
 	}
@@ -130,6 +130,7 @@
 		seconds_read() - base_time, tp->name);
 	return NULL;
 }
+
 void *thread_tl(void *param)
 {
 	struct thread_param *tp = param;
@@ -137,12 +138,13 @@
 	int rc;
 
 #if __linux__
-	rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask);
+	rc = sched_setaffinity((pid_t) 0, sizeof(mask), &mask);
 #endif
 	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 	if (rc < 0) {
-		EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
-			tp->name, tp->index, rc, strerror(rc));
+		EPRINTF
+		    ("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
+		     tp->name, tp->index, rc, strerror(rc));
 		exit(UNRESOLVED);
 	}
 
@@ -150,8 +152,7 @@
 		seconds_read() - base_time);
 	tp->progress = 0;
 	pthread_mutex_lock(&mutex);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 	}
 	pthread_mutex_unlock(&mutex);
@@ -179,12 +180,13 @@
 	DPRINTF(stdout, "\n");
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
-	while (!ts_stop)
-	{
+	while (!ts_stop) {
 		newtime = seconds_read();
 		size = snprintf(buffer, 1023, "%f ", newtime - base_time);
 		for (i = 0; i < cpus + 1; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
 		DPRINTF(stdout, "%s \n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
@@ -204,7 +206,7 @@
 
 	DPRINTF(stdout, "#EVENT %f TB Starts\n", seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *((time_t*) arg);
+	boost_time.tv_sec = time(NULL) + *((time_t *) arg);
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -216,20 +218,20 @@
 		t1 - base_time, seconds);
 
 	if (rc != ETIMEDOUT) {
-		EPRINTF("FAIL: Thread TB: lock returned %d %s, "
-				, rc, strerror(rc));
+		EPRINTF("FAIL: Thread TB: lock returned %d %s, ", rc,
+			strerror(rc));
 		exit(FAIL);
 	}
 	DPRINTF(stderr, "Thread TB: DONE. lock returned %d %s, "
-			"slept %f \n", rc, strerror(rc), seconds)
+		"slept %f \n", rc, strerror(rc), seconds)
 
-	return NULL;
+	    return NULL;
 }
 
 int main(int argc, char **argv)
 {
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb;
 
 	int multiplier = 1;
@@ -248,81 +250,74 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: start sample thread \n");
+	DPRINTF(stderr, "Main Thread: start sample thread \n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: start %d TF thread\n", cpus-1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: start %d TF thread\n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 2]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP thread */
 
-	DPRINTF(stderr,"Main Thread: start TP thread\n");
+	DPRINTF(stderr, "Main Thread: start TP thread\n");
 	rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[1]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: start TL thread\n");
+	DPRINTF(stderr, "Main Thread: start TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_tl, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB thread (boosting thread) */
-	DPRINTF(stderr,"Main Thread: start TB thread\n");
+	DPRINTF(stderr, "Main Thread: start TB thread\n");
 	time_t timeout = multiplier * 20;
-	rc = pthread_create(&threadtb, &threadattr, thread_tb,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb, &threadattr, thread_tb, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 60 - seconds_read());
 
 	/* Stop TL thread */
 
-	DPRINTF(stderr,"Main Thread: stop TL thread\n");
+	DPRINTF(stderr, "Main Thread: stop TL thread\n");
 	tp[0].stop = 1;
 	sleep(base_time + multiplier * 70 - seconds_read());
 
 	/* Stop TP thread */
-	DPRINTF(stderr,"Main Thread: stop TP thread\n");
+	DPRINTF(stderr, "Main Thread: stop TP thread\n");
 	tp[1].stop = 1;
 	sleep(base_time + multiplier * 80 - seconds_read());
 
 	/* Stop TF threads */
-	DPRINTF(stderr,"Main Thread: stop TF threads\n");
-	for (i = 2; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: stop TF threads\n");
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread \n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread \n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
index dd72846..ee810eb 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-2.c
@@ -53,8 +53,7 @@
 volatile int ts_stop = 0;
 volatile double base_time;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -66,15 +65,16 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL",  0, 0, 0, 0 },
-	{ 1,   0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0 },
-	{ 2,   0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0 },
-	{ 3,   0,   0, 3, SCHED_FIFO, "TF",  1, 0, 0, 0 },
-	{ 4,   0,   0, 3, SCHED_FIFO, "TF",  2, 0, 0, 0 },
-	{ 5,   0,   0, 3, SCHED_FIFO, "TF",  3, 0, 0, 0 },
-	{ 6,   0,   0, 3, SCHED_FIFO, "TF",  4, 0, 0, 0 },
-	{ 7,   0,   0, 3, SCHED_FIFO, "TF",  5, 0, 0, 0 },
-	{ 8,   0,   0, 3, SCHED_FIFO, "TF",  6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
+	2, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
+	3, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	4, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	5, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	6, 0, 0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	7, 0, 0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	8, 0, 0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -85,14 +85,14 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
 	}
 	return;
 }
+
 void *thread_fn(void *param)
 {
 	struct thread_param *tp = param;
@@ -109,14 +109,13 @@
 		exit(UNRESOLVED);
 	}
 	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
-        DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
+	DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
 		seconds_read() - base_time, tp->name);
-	DPRINTF(stderr,"Thread %s index %d: started \n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started \n", tp->name, tp->index);
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
@@ -127,10 +126,11 @@
 			exit(UNRESOLVED);
 		}
 	}
-        DPRINTF(stdout, "#EVENT %f Thread %s Stopped\n",
+	DPRINTF(stdout, "#EVENT %f Thread %s Stopped\n",
 		seconds_read() - base_time, tp->name);
 	return NULL;
 }
+
 void *thread_tl(void *param)
 {
 	struct thread_param *tp = param;
@@ -138,26 +138,26 @@
 	int rc;
 
 #if __linux__
-	rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask);
+	rc = sched_setaffinity((pid_t) 0, sizeof(mask), &mask);
 #endif
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 
 	DPRINTF(stdout, "#EVENT %f Thread TL Started\n",
 		seconds_read() - base_time);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 	if (rc < 0) {
-		EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
-			tp->name, tp->index, rc, strerror(rc));
+		EPRINTF
+		    ("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
+		     tp->name, tp->index, rc, strerror(rc));
 		exit(UNRESOLVED);
 	}
 	tp->progress = 0;
 	pthread_mutex_lock(&mutex);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 	}
 	pthread_mutex_unlock(&mutex);
-        DPRINTF(stdout, "#EVENT %f Thread TL Stoped\n",
+	DPRINTF(stdout, "#EVENT %f Thread TL Stoped\n",
 		seconds_read() - base_time);
 	return NULL;
 }
@@ -172,21 +172,22 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 7);
-	DPRINTF(stderr,"Thread Sampler: started \n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 7);
+	DPRINTF(stderr, "Thread Sampler: started \n");
 	DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2 ", 3 + cpus);
 	for (i = 0; i < (cpus - 1); i++)
 		DPRINTF(stdout, "TF%d ", i);
 	DPRINTF(stdout, "\n");
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
-	while (!ts_stop)
-	{
+	while (!ts_stop) {
 		newtime = seconds_read();
 		size = snprintf(buffer, 1023, "%f ", newtime - base_time);
 		for (i = 0; i < cpus + 2; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
-		DPRINTF(stdout,"%s \n", buffer);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
+		DPRINTF(stdout, "%s \n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
@@ -194,19 +195,20 @@
 	}
 	return NULL;
 }
+
 void *thread_tb1(void *arg)
 {
 	struct timespec boost_time;
 	double t0, t1;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 4);
+	test_set_priority(pthread_self(), SCHED_FIFO, 4);
 
-	DPRINTF(stderr,"Thread TB1: started\n");
+	DPRINTF(stderr, "Thread TB1: started\n");
 	DPRINTF(stdout, "#EVENT %f TB1 Thread Started\n",
 		seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *(time_t*) arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -229,13 +231,13 @@
 	double t0, t1;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 6);
+	test_set_priority(pthread_self(), SCHED_FIFO, 6);
 
-	DPRINTF(stderr,"Thread TB2: started\n");
+	DPRINTF(stderr, "Thread TB2: started\n");
 	DPRINTF(stdout, "#EVENT %f TB2 Thread Started\n",
 		seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *(time_t*)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -250,10 +252,11 @@
 	}
 	return NULL;
 }
+
 int main(int argc, char **argv)
 {
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1];
 	pthread_t threadsample, threadtp, threadtl, threadtb1, threadtb2;
 
@@ -261,7 +264,7 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 8);
+	test_set_priority(pthread_self(), SCHED_FIFO, 8);
 	cpus = sysconf(_SC_NPROCESSORS_ONLN);
 	base_time = seconds_read();
 
@@ -273,70 +276,62 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: Creating sample thread \n");
+	DPRINTF(stderr, "Main Thread: Creating sample thread \n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: Creating %d TF threads \n", cpus - 1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating %d TF threads \n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 3]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP1, TP2 thread */
-	DPRINTF(stderr,"Main Thread: Creating TP1, TP2 thread \n");
-	for (i = 1; i <= 2; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating TP1, TP2 thread \n");
+	for (i = 1; i <= 2; i++) {
 		rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[i]);
-        	if (rc != 0) {
-                	EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        	rc, strerror(rc));
-                	exit(UNRESOLVED);
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
 		}
-        }
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: Creating TL thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_tl, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB1 thread (boosting thread) */
 	time_t timeout = multiplier * 20;
-	rc = pthread_create(&threadtb1, &threadattr, thread_tb1,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb1, &threadattr, thread_tb1, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 60 - seconds_read());
 
 	/* Start TB2 thread (boosting thread) */
-	rc = pthread_create(&threadtb2, &threadattr, thread_tb2,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb2, &threadattr, thread_tb2, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 90 - seconds_read());
 
 	/* Stop TL thread */
@@ -351,13 +346,12 @@
 	sleep(base_time + multiplier * 120 - seconds_read());
 
 	/* Stop TF threads */
-	for (i = 2; i < cpus - 1; i++)
-	{
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread \n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread \n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
index 1c08d93..e0438d6 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-3.c
@@ -54,8 +54,7 @@
 volatile int ts_stop = 0;
 volatile double base_time;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -67,15 +66,16 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL",  0, 0, 0, 0 },
-	{ 1,   0,  100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0 },
-	{ 1,   0,  100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0 },
-	{ 2,   0,   0, 3, SCHED_FIFO, "TF",  1, 0, 0, 0 },
-	{ 3,   0,   0, 3, SCHED_FIFO, "TF",  2, 0, 0, 0 },
-	{ 4,   0,   0, 3, SCHED_FIFO, "TF",  3, 0, 0, 0 },
-	{ 5,   0,   0, 3, SCHED_FIFO, "TF",  4, 0, 0, 0 },
-	{ 6,   0,   0, 3, SCHED_FIFO, "TF",  5, 0, 0, 0 },
-	{ 7,   0,   0, 3, SCHED_FIFO, "TF",  6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 100, 2, SCHED_FIFO, "TP1", 0, 0, 0, 0}, {
+	1, 0, 100, 5, SCHED_FIFO, "TP2", 0, 0, 0, 0}, {
+	2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	5, 0, 0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	6, 0, 0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	7, 0, 0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -86,8 +86,7 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
@@ -110,17 +109,16 @@
 		exit(UNRESOLVED);
 	}
 #endif
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 
 	DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
 		seconds_read() - base_time, tp->name);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
@@ -144,24 +142,24 @@
 	int rc;
 
 #if __linux__
-	rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask);
+	rc = sched_setaffinity((pid_t) 0, sizeof(mask), &mask);
 	if (rc < 0) {
-		EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
-			tp->name, tp->index, rc, strerror(rc));
+		EPRINTF
+		    ("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
+		     tp->name, tp->index, rc, strerror(rc));
 		exit(UNRESOLVED);
 	}
 #endif
 
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 	DPRINTF(stdout, "#EVENT %f Thread TL Started\n",
 		seconds_read() - base_time);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 
 	tp->progress = 0;
 	pthread_mutex_lock(&mutex1);
 	pthread_mutex_lock(&mutex2);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 	}
 
@@ -182,8 +180,8 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 7);
-	DPRINTF(stderr,"Thread Sampler: started\n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 7);
+	DPRINTF(stderr, "Thread Sampler: started\n");
 
 	DPRINTF(stdout, "# COLUMNS %d Time TL TP1 TP2  ", 3 + cpus);
 
@@ -193,13 +191,14 @@
 
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
-	while (!ts_stop)
-	{
+	while (!ts_stop) {
 		newtime = seconds_read();
 		size = snprintf(buffer, 1023, "%f ", newtime - base_time);
 		for (i = 0; i < cpus + 2; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
-		DPRINTF(stdout,"%s\n", buffer);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
+		DPRINTF(stdout, "%s\n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
@@ -214,12 +213,12 @@
 	double t0, t1;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 4);
-	DPRINTF(stderr,"Thread TB1: started\n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 4);
+	DPRINTF(stderr, "Thread TB1: started\n");
 	DPRINTF(stdout, "#EVENT %f Thread TB1 Started\n",
 		seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *(time_t *)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -242,12 +241,12 @@
 	double t0, t1;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 6);
-	DPRINTF(stderr,"Thread TB2: started\n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 6);
+	DPRINTF(stderr, "Thread TB2: started\n");
 	DPRINTF(stdout, "#EVENT %f Thread TB2 Started\n",
 		seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *(time_t *)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 	t0 = seconds_read();
 	rc = pthread_mutex_timedlock(&mutex2, &boost_time);
@@ -268,7 +267,7 @@
 int main(int argc, char **argv)
 {
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1];
 	pthread_t threadsample, threadtp, threadtl, threadtb1, threadtb2;
 
@@ -276,7 +275,7 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 8);
+	test_set_priority(pthread_self(), SCHED_FIFO, 8);
 	base_time = seconds_read();
 	cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
@@ -289,70 +288,62 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: Creating sample thread\n");
+	DPRINTF(stderr, "Main Thread: Creating sample thread\n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: Creating %d TF threads\n", cpus-1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 3]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP1, TP2 thread */
-	DPRINTF(stderr,"Main Thread: Creating TP1, TP2 thread\n");
-	for (i = 1; i <= 2; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating TP1, TP2 thread\n");
+	for (i = 1; i <= 2; i++) {
 		rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[i]);
-        	if (rc != 0) {
-                	EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        	rc, strerror(rc));
-                	exit(UNRESOLVED);
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
 		}
-        }
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: Creating TL thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_tl, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB1 thread (boosting thread) */
 	time_t timeout = multiplier * 20;
-	rc = pthread_create(&threadtb1, &threadattr, thread_tb1,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb1, &threadattr, thread_tb1, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 60 - seconds_read());
 
 	/* Start TB2 thread (boosting thread) */
-	rc = pthread_create(&threadtb2, &threadattr, thread_tb2,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb2, &threadattr, thread_tb2, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 90 - seconds_read());
 
 	/* Stop TL thread */
@@ -367,13 +358,12 @@
 	sleep(base_time + multiplier * 120 - seconds_read());
 
 	/* Stop TF threads */
-	for (i = 2; i < cpus - 1; i++)
-	{
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread\n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread\n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c
index 93e44b6..dc4bd02 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-4.c
@@ -55,8 +55,7 @@
 volatile int ts_stop = 0;
 volatile double base_time;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -68,14 +67,15 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL",  0, 0, 0, 0 },
-	{ 1,   0, 100, 4, SCHED_FIFO, "TP",  0, 0, 0, 0 },
-	{ 2,   0,   0, 2, SCHED_FIFO, "TF",  1, 0, 0, 0 },
-	{ 3,   0,   0, 2, SCHED_FIFO, "TF",  2, 0, 0, 0 },
-	{ 4,   0,   0, 2, SCHED_FIFO, "TF",  3, 0, 0, 0 },
-	{ 5,   0,   0, 2, SCHED_FIFO, "TF",  4, 0, 0, 0 },
-	{ 6,   0,   0, 2, SCHED_FIFO, "TF",  5, 0, 0, 0 },
-	{ 7,   0,   0, 2, SCHED_FIFO, "TF",  6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 100, 4, SCHED_FIFO, "TP", 0, 0, 0, 0}, {
+	2, 0, 0, 2, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	3, 0, 0, 2, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	4, 0, 0, 2, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	5, 0, 0, 2, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	6, 0, 0, 2, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	7, 0, 0, 2, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -86,8 +86,7 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
@@ -110,19 +109,18 @@
 		exit(UNRESOLVED);
 	}
 #endif
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 
 	DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
 		seconds_read() - base_time, tp->name);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
 	if (tp->index == 0)
 		pthread_mutex_lock(&mutex1);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
@@ -151,21 +149,22 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 6);
-	DPRINTF(stderr,"Thread Sampler: started\n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 6);
+	DPRINTF(stderr, "Thread Sampler: started\n");
 	DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus);
 	for (i = 0; i < (cpus - 1); i++)
 		DPRINTF(stdout, "TF%d ", i);
 	DPRINTF(stdout, "\n");
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
-	while (!ts_stop)
-	{
+	while (!ts_stop) {
 		newtime = seconds_read();
 		size = snprintf(buffer, 1023, "%f ", newtime - base_time);
 		for (i = 0; i < cpus + 1; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
-		DPRINTF(stdout,"%s\n", buffer);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
+		DPRINTF(stdout, "%s\n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
@@ -181,13 +180,13 @@
 	int rc;
 
 	test_set_priority(pthread_self(), SCHED_FIFO, 3);
-	DPRINTF(stderr,"Thread TB1: started\n");
+	DPRINTF(stderr, "Thread TB1: started\n");
 	DPRINTF(stdout, "#EVENT %f Thread TB1 Started\n",
 		seconds_read() - base_time);
 
 	pthread_mutex_lock(&mutex2);
 
-	boost_time.tv_sec = time(NULL) + *(time_t *)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 	t0 = seconds_read();
 	rc = pthread_mutex_timedlock(&mutex1, &boost_time);
@@ -213,11 +212,11 @@
 	int rc;
 
 	test_set_priority(pthread_self(), SCHED_FIFO, 5);
-	DPRINTF(stderr,"Thread TB2: started\n");
+	DPRINTF(stderr, "Thread TB2: started\n");
 	DPRINTF(stdout, "#EVENT %f Thread TB2 Started\n",
 		seconds_read() - base_time);
 
-	boost_time.tv_sec = time(NULL) + *(time_t *)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -238,7 +237,7 @@
 int main(int argc, char **argv)
 {
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1];
 	pthread_t threadsample, threadtp, threadtl, threadtb1, threadtb2;
 
@@ -246,7 +245,7 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 8);
+	test_set_priority(pthread_self(), SCHED_FIFO, 8);
 	base_time = seconds_read();
 	cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
@@ -259,68 +258,60 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: Creating sample thread\n");
+	DPRINTF(stderr, "Main Thread: Creating sample thread\n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: Creating %d TF threads\n", cpus-1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 2]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP thread */
-	DPRINTF(stderr,"Main Thread: Creating TP thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TP thread\n");
 	rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[1]);
-       	if (rc != 0) {
-               	EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                       	rc, strerror(rc));
-               	exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: Creating TL thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_fn, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB1 thread (the lowest priority thread) */
 	time_t timeout = multiplier * 40;
-	rc = pthread_create(&threadtb1, &threadattr, thread_tb1,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb1, &threadattr, thread_tb1, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 40 - seconds_read());
 
 	/* Start TB2 thread (boosting thread) */
 	timeout = multiplier * 20;
-	rc = pthread_create(&threadtb2, &threadattr, thread_tb2,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb2, &threadattr, thread_tb2, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 75 - seconds_read());
 
 	/* Stop TL thread */
@@ -332,13 +323,12 @@
 	sleep(base_time + multiplier * 95 - seconds_read());
 
 	/* Stop TF threads */
-	for (i = 2; i < cpus - 1; i++)
-	{
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread\n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread\n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c
index 06f8f05..9540d06 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-5.c
@@ -53,8 +53,7 @@
 volatile double base_time;
 volatile int unlock_mutex = 0;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -66,14 +65,15 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 },
-	{ 1,   0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 },
-	{ 2,   0,   0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 },
-	{ 3,   0,   0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0 },
-	{ 4,   0,   0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0 },
-	{ 5,   0,   0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0 },
-	{ 6,   0,   0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0 },
-	{ 7,   0,   0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0}, {
+	2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	5, 0, 0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	6, 0, 0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	7, 0, 0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -84,8 +84,7 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
@@ -100,7 +99,7 @@
 	int rc;
 	unsigned long mask = 1 << tp->cpu;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 #if __linux__
 	rc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (rc < 0) {
@@ -112,13 +111,12 @@
 
 	DPRINTF(stdout, "#EVENT %f Thread %s started\n",
 		seconds_read() - base_time, tp->name);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
@@ -141,34 +139,36 @@
 	unsigned long mask = 1 << tp->cpu;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, tp->priority);
+	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 #if __linux__
-	rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask);
+	rc = sched_setaffinity((pid_t) 0, sizeof(mask), &mask);
 	if (rc < 0) {
-		EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
-			tp->name, tp->index, rc, strerror(rc));
+		EPRINTF
+		    ("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
+		     tp->name, tp->index, rc, strerror(rc));
 		exit(UNRESOLVED);
 	}
 #endif
 
 	DPRINTF(stdout, "#EVENT %f Thread TL started\n",
 		seconds_read() - base_time);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 
 	tp->progress = 0;
 	pthread_mutex_lock(&mutex);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (unlock_mutex == 1) {
 			rc = pthread_mutex_unlock(&mutex);
 			if (rc == 0) {
 				unlock_mutex = 0;
-				DPRINTF(stdout, "#EVENT %f TL unlock the mutex\n",
+				DPRINTF(stdout,
+					"#EVENT %f TL unlock the mutex\n",
 					seconds_read() - base_time);
-			}else{
-				EPRINTF("UNRESOLVED: TL failed to unlock mutex: %d %s",
-					rc, strerror(rc));
+			} else {
+				EPRINTF
+				    ("UNRESOLVED: TL failed to unlock mutex: %d %s",
+				     rc, strerror(rc));
 				exit(UNRESOLVED);
 			}
 		}
@@ -188,9 +188,9 @@
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 5);
+	test_set_priority(pthread_self(), SCHED_FIFO, 5);
 
-	DPRINTF(stderr,"Thread Sampler: started\n");
+	DPRINTF(stderr, "Thread Sampler: started\n");
 	DPRINTF(stdout, "# COLUMNS %d Time TL TP ", 2 + cpus);
 
 	for (i = 0; i < (cpus - 1); i++)
@@ -200,12 +200,14 @@
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
 
-	while (!ts_stop)
-	{
-		size = snprintf(buffer, 1023, "%f ", seconds_read() - base_time);
+	while (!ts_stop) {
+		size =
+		    snprintf(buffer, 1023, "%f ", seconds_read() - base_time);
 		for (i = 0; i < cpus + 1; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
-		DPRINTF(stdout,"%s\n", buffer);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
+		DPRINTF(stdout, "%s\n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
@@ -221,8 +223,8 @@
 	ts.tv_sec = 2;
 	ts.tv_nsec = 0;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 4);
-	DPRINTF(stderr,"Thread TB: started\n");
+	test_set_priority(pthread_self(), SCHED_FIFO, 4);
+	DPRINTF(stderr, "Thread TB: started\n");
 	DPRINTF(stdout, "#EVENT %f Thread TB started,trying to lock\n",
 		seconds_read() - base_time);
 
@@ -253,13 +255,13 @@
 int main(int argc, char **argv)
 {
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb;
 	time_t multiplier = 1;
 	int i;
 	int rc;
 
-	test_set_priority(pthread_self(),SCHED_FIFO, 6);
+	test_set_priority(pthread_self(), SCHED_FIFO, 6);
 	base_time = seconds_read();
 	cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
@@ -271,55 +273,50 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: Creating sample thread\n");
+	DPRINTF(stderr, "Main Thread: Creating sample thread\n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: Creating %d TF threads\n", cpus-1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 2]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP thread */
-	DPRINTF(stderr,"Main Thread: Creating TP thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TP thread\n");
 	rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[1]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: Creating TL thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_tl, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB thread (boosting thread) */
 	rc = pthread_create(&threadtb, &threadattr, thread_tb, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 40 - seconds_read());
 	unlock_mutex = 1;
 	sleep(base_time + multiplier * 50 - seconds_read());
@@ -333,13 +330,12 @@
 	sleep(base_time + multiplier * 70 - seconds_read());
 
 	/* Stop TF threads */
-	for (i = 2; i < cpus - 1; i++)
-	{
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread\n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread\n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c
index 2493c98..19d6755 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/pitest-6.c
@@ -51,8 +51,7 @@
 volatile int ts_stop = 0;
 volatile double base_time;
 
-struct thread_param
-{
+struct thread_param {
 	int index;
 	volatile int stop;
 	int sleep_ms;
@@ -64,14 +63,15 @@
 	volatile unsigned should_stall;
 	volatile unsigned progress;
 } tp[] = {
-	{ 0,   0,   0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0 },
-	{ 1,   0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0 },
-	{ 2,   0,   0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0 },
-	{ 3,   0,   0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0 },
-	{ 4,   0,   0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0 },
-	{ 5,   0,   0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0 },
-	{ 6,   0,   0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0 },
-	{ 7,   0,   0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0 }
+	{
+	0, 0, 0, 1, SCHED_FIFO, "TL", 0, 0, 0, 0}, {
+	1, 0, 200, 2, SCHED_FIFO, "TP", 0, 0, 0, 0}, {
+	2, 0, 0, 3, SCHED_FIFO, "TF", 1, 0, 0, 0}, {
+	3, 0, 0, 3, SCHED_FIFO, "TF", 2, 0, 0, 0}, {
+	4, 0, 0, 3, SCHED_FIFO, "TF", 3, 0, 0, 0}, {
+	5, 0, 0, 3, SCHED_FIFO, "TF", 4, 0, 0, 0}, {
+	6, 0, 0, 3, SCHED_FIFO, "TF", 5, 0, 0, 0}, {
+	7, 0, 0, 3, SCHED_FIFO, "TF", 6, 0, 0, 0}
 };
 
 volatile unsigned do_work_dummy;
@@ -82,14 +82,14 @@
 	unsigned dummy = do_work_dummy;
 
 	for (granularity_cnt = 0; granularity_cnt < granularity_top;
-	     granularity_cnt++)
-	{
+	     granularity_cnt++) {
 		for (i = 0; i < top; i++)
 			dummy = i | dummy;
 		(*progress)++;
 	}
 	return;
 }
+
 void *thread_fn(void *param)
 {
 	struct thread_param *tp = param;
@@ -106,15 +106,14 @@
 	}
 #endif
 	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 	DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
 		seconds_read() - base_time, tp->name);
 
 	tp->progress = 0;
 	ts.tv_sec = 0;
 	ts.tv_nsec = tp->sleep_ms * 1000 * 1000;
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 		if (tp->sleep_ms == 0)
 			continue;
@@ -130,6 +129,7 @@
 		seconds_read() - base_time, tp->name);
 	return NULL;
 }
+
 void *thread_tl(void *param)
 {
 	struct thread_param *tp = param;
@@ -137,23 +137,23 @@
 	int rc;
 
 #if __linux__
-	rc = sched_setaffinity((pid_t)0, sizeof(mask), &mask);
+	rc = sched_setaffinity((pid_t) 0, sizeof(mask), &mask);
 	if (rc < 0) {
-		EPRINTF("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
-			tp->name, tp->index, rc, strerror(rc));
+		EPRINTF
+		    ("UNRESOLVED: Thread %s index %d: Can't set affinity: %d %s",
+		     tp->name, tp->index, rc, strerror(rc));
 		exit(UNRESOLVED);
 	}
 #endif
 
 	test_set_priority(pthread_self(), SCHED_FIFO, tp->priority);
 
-	DPRINTF(stderr,"Thread %s index %d: started\n", tp->name, tp->index);
+	DPRINTF(stderr, "Thread %s index %d: started\n", tp->name, tp->index);
 	DPRINTF(stdout, "#EVENT %f Thread %s Started\n",
 		seconds_read() - base_time, tp->name);
 	tp->progress = 0;
 	pthread_mutex_lock(&mutex);
-	while (!tp->stop)
-	{
+	while (!tp->stop) {
 		do_work(5, &tp->progress);
 	}
 	pthread_mutex_unlock(&mutex);
@@ -172,7 +172,7 @@
 	int rc;
 
 	test_set_priority(pthread_self(), SCHED_FIFO, 5);
-	DPRINTF(stderr,"Thread Sampler: started\n");
+	DPRINTF(stderr, "Thread Sampler: started\n");
 	DPRINTF(stdout, "# COLUMNS %d Time TP TL ", 2 + cpus);
 	for (i = 0; i < (cpus - 1); i++)
 		DPRINTF(stdout, "TF%d ", i);
@@ -180,12 +180,14 @@
 	ts.tv_sec = 0;
 	ts.tv_nsec = period * 1000 * 1000;
 
-	while (!ts_stop)
-	{
-		size = snprintf(buffer, 1023, "%f ", seconds_read() - base_time);
+	while (!ts_stop) {
+		size =
+		    snprintf(buffer, 1023, "%f ", seconds_read() - base_time);
 		for (i = 0; i < cpus + 1; i++)
-			size += snprintf(buffer + size, 1023 - size, "%u ", tp[i].progress);
-		DPRINTF(stdout,"%s\n", buffer);
+			size +=
+			    snprintf(buffer + size, 1023 - size, "%u ",
+				     tp[i].progress);
+		DPRINTF(stdout, "%s\n", buffer);
 		rc = nanosleep(&ts, NULL);
 		if (rc < 0)
 			EPRINTF("UNRESOLVED: Thread %s %d: nanosleep returned "
@@ -201,12 +203,12 @@
 	int rc;
 
 	test_set_priority(pthread_self(), SCHED_FIFO, 4);
-	DPRINTF(stderr,"Thread TB: started\n");
+	DPRINTF(stderr, "Thread TB: started\n");
 
 	DPRINTF(stdout, "#EVENT %f TB Started, waiting for mutex for %lu s\n",
-		seconds_read() - base_time, *(time_t *)arg);
+		seconds_read() - base_time, *(time_t *) arg);
 
-	boost_time.tv_sec = time(NULL) + *(time_t *)arg;
+	boost_time.tv_sec = time(NULL) + *(time_t *) arg;
 	boost_time.tv_nsec = 0;
 
 	t0 = seconds_read();
@@ -221,8 +223,7 @@
 		exit(FAIL);
 	}
 
-	DPRINTF(stdout, "#EVENT %f TB Stopped\n",
-		seconds_read() - base_time);
+	DPRINTF(stdout, "#EVENT %f TB Stopped\n", seconds_read() - base_time);
 	return NULL;
 }
 
@@ -230,7 +231,7 @@
 {
 	cpus = sysconf(_SC_NPROCESSORS_ONLN);
 	pthread_mutexattr_t mutex_attr;
-	pthread_attr_t	threadattr;
+	pthread_attr_t threadattr;
 	pthread_t threads[cpus - 1], threadsample, threadtp, threadtl, threadtb;
 
 	time_t multiplier = 1;
@@ -249,62 +250,56 @@
 	threadattr_init(&threadattr);
 
 	/* Start the sample thread */
-	DPRINTF(stderr,"Main Thread: Creating sample thread\n");
+	DPRINTF(stderr, "Main Thread: Creating sample thread\n");
 	rc = pthread_create(&threadsample, &threadattr, thread_sample, NULL);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 
 	/* Start the TF threads */
-	DPRINTF(stderr,"Main Thread: Creating %d TF threads\n", cpus-1);
-	for (i = 0; i < cpus - 1; i++)
-	{
+	DPRINTF(stderr, "Main Thread: Creating %d TF threads\n", cpus - 1);
+	for (i = 0; i < cpus - 1; i++) {
 		rc = pthread_create(&threads[i], &threadattr, thread_fn,
 				    &tp[i + 2]);
-	        if (rc != 0) {
-	                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-	                        rc, strerror(rc));
-	                exit(UNRESOLVED);
-	        }
+		if (rc != 0) {
+			EPRINTF("UNRESOLVED: pthread_create: %d %s",
+				rc, strerror(rc));
+			exit(UNRESOLVED);
+		}
 	}
 
 	sleep(base_time + multiplier * 10 - seconds_read());
 
 	/* Start TP thread */
-	DPRINTF(stderr,"Main Thread: Creating TP thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TP thread\n");
 	rc = pthread_create(&threadtp, &threadattr, thread_fn, &tp[1]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 20 - seconds_read());
 
 	/* Start TL thread */
-	DPRINTF(stderr,"Main Thread: Creating TL thread\n");
+	DPRINTF(stderr, "Main Thread: Creating TL thread\n");
 	rc = pthread_create(&threadtl, &threadattr, thread_tl, &tp[0]);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 30 - seconds_read());
 
 	/* Start TB thread (boosting thread) */
 	unsigned long timeout = multiplier * 20;
-	rc = pthread_create(&threadtb, &threadattr, thread_tb,
-			    &timeout);
-        if (rc != 0) {
-                EPRINTF("UNRESOLVED: pthread_create: %d %s",
-                        rc, strerror(rc));
-                exit(UNRESOLVED);
-        }
+	rc = pthread_create(&threadtb, &threadattr, thread_tb, &timeout);
+	if (rc != 0) {
+		EPRINTF("UNRESOLVED: pthread_create: %d %s", rc, strerror(rc));
+		exit(UNRESOLVED);
+	}
 	sleep(base_time + multiplier * 40 - seconds_read());
 
 	/* Decrease TB's priority */
-	DPRINTF(stderr,"Main Thread: decrease TB's priority to 1\n");
+	DPRINTF(stderr, "Main Thread: decrease TB's priority to 1\n");
 	test_set_priority(threadtb, SCHED_FIFO, 1);
 	DPRINTF(stdout, "#EVENT %f TB's priority decreased\n",
 		seconds_read() - base_time);
@@ -319,13 +314,12 @@
 	sleep(base_time + multiplier * 80 - seconds_read());
 
 	/* Stop TF threads */
-	for (i = 2; i < cpus - 1; i++)
-	{
+	for (i = 2; i < cpus - 1; i++) {
 		tp[i].stop = 1;
 	}
 
 	/* Stop sampler */
 	ts_stop = 1;
-	DPRINTF(stderr,"Main Thread: stop sampler thread\n");
+	DPRINTF(stderr, "Main Thread: stop sampler thread\n");
 	return 0;
 }
diff --git a/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c b/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
index 790a83c..46d2d7a 100644
--- a/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
+++ b/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
@@ -44,7 +44,7 @@
 float timediff(struct timespec t2, struct timespec t1)
 {
 	float diff = t2.tv_sec - t1.tv_sec;
-	diff += (t2.tv_nsec - t1.tv_nsec)/1000000000.0;
+	diff += (t2.tv_nsec - t1.tv_nsec) / 1000000000.0;
 	return diff;
 }
 
@@ -53,7 +53,7 @@
  */
 void signal_handler(int sig)
 {
-	int                       rc = 0;
+	int rc = 0;
 
 	rc = pthread_barrier_wait(&barrier);
 	if ((rc != 0) && (rc != PTHREAD_BARRIER_SERIAL_THREAD)) {
@@ -64,10 +64,10 @@
 
 void *hi_priority_thread(void *tmp)
 {
-	struct sched_param   param;
-	int                  policy;
-	int                  rc = 0;
-	void                 *previous_signal;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
+	void *previous_signal;
 
 	param.sched_priority = HIGH_PRIORITY;
 	rc = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
@@ -106,15 +106,15 @@
 	if (low_done != 1)
 		woken_up = 1;
 
-	pthread_exit((void *) 0);
+	pthread_exit((void *)0);
 }
 
 void *low_priority_thread(void *tmp)
 {
-	struct timespec	           start_timespec, current_timespec;
-	struct sched_param         param;
-	int                        rc = 0;
-	int                        policy;
+	struct timespec start_timespec, current_timespec;
+	struct sched_param param;
+	int rc = 0;
+	int policy;
 
 	param.sched_priority = LOW_PRIORITY;
 	rc = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
@@ -141,15 +141,15 @@
 	}
 	low_done = 1;
 
-	pthread_exit((void *) 0);
+	pthread_exit((void *)0);
 }
 
 int main()
 {
-	pthread_t                 high_id, low_id;
-	pthread_attr_t            low_attr, high_attr;
-	struct sched_param        param;
-	int                       rc = 0;
+	pthread_t high_id, low_id;
+	pthread_attr_t low_attr, high_attr;
+	struct sched_param param;
+	int rc = 0;
 
 	/* Initialize the barrier */
 	rc = pthread_barrier_init(&barrier, NULL, 2);
diff --git a/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c b/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
index 49951ca..2966a4d 100644
--- a/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
+++ b/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
@@ -49,7 +49,7 @@
 float timediff(struct timespec t2, struct timespec t1)
 {
 	float diff = t2.tv_sec - t1.tv_sec;
-	diff += (t2.tv_nsec - t1.tv_nsec)/1000000000.0;
+	diff += (t2.tv_nsec - t1.tv_nsec) / 1000000000.0;
 	return diff;
 }
 
@@ -58,7 +58,7 @@
  */
 void signal_handler(int sig)
 {
-	int	 rc = 0;
+	int rc = 0;
 
 	rc = pthread_cond_signal(&cond);
 	if (rc != 0) {
@@ -69,9 +69,9 @@
 
 void *hi_priority_thread(void *tmp)
 {
-	struct sched_param        param;
-	int                       policy;
-	int                       rc = 0;
+	struct sched_param param;
+	int policy;
+	int rc = 0;
 
 	param.sched_priority = HIGH_PRIORITY;
 	rc = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
@@ -111,15 +111,15 @@
 		printf(ERROR_PREFIX "pthread_mutex_unlock\n");
 		exit(PTS_UNRESOLVED);
 	}
-	pthread_exit((void *) 0);
+	pthread_exit((void *)0);
 }
 
 void *low_priority_thread(void *tmp)
 {
-	struct timespec           current_time, start_time;
-	struct sched_param        param;
-	int                       rc = 0;
-	int                       policy;
+	struct timespec current_time, start_time;
+	struct sched_param param;
+	int rc = 0;
+	int policy;
 
 	param.sched_priority = LOW_PRIORITY;
 	rc = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
@@ -149,19 +149,19 @@
 			break;
 	}
 	low_done = 1;
-	pthread_exit((void *) 0);
+	pthread_exit((void *)0);
 }
 
 int main()
 {
-	pthread_t                high_id, low_id;
-	pthread_attr_t           low_attr, high_attr;
-	struct sched_param       param;
-	int                      rc = 0;
-	int                      policy;
+	pthread_t high_id, low_id;
+	pthread_attr_t low_attr, high_attr;
+	struct sched_param param;
+	int rc = 0;
+	int policy;
 
 	param.sched_priority = MID_PRIORITY;
-	rc =  pthread_setschedparam(pthread_self(), SCHED_RR, &param);
+	rc = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
 	if (rc != 0) {
 		printf(ERROR_PREFIX "pthread_setschedparam\n");
 		exit(PTS_UNRESOLVED);
diff --git a/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c b/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
index a5d7c71..2ebf7f0 100644
--- a/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
+++ b/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c
@@ -32,8 +32,8 @@
 
 int main(int argc, char *argv[])
 {
-        struct timespec tpset, tpget, tsreset;
-        int secdelta, nsecdelta;
+	struct timespec tpset, tpget, tsreset;
+	int secdelta, nsecdelta;
 	int failure = 0;
 	int i;
 
@@ -42,41 +42,39 @@
 		return PTS_UNRESOLVED;
 	}
 
-	for (i=0; i<NUMTESTS; i++) {
-        	tpset.tv_sec = testtimes[i][0];
-        	tpset.tv_nsec = testtimes[i][1];
+	for (i = 0; i < NUMTESTS; i++) {
+		tpset.tv_sec = testtimes[i][0];
+		tpset.tv_nsec = testtimes[i][1];
 #ifdef DEBUG
 		printf("Test: %ds %dns\n", testtimes[i][0], testtimes[i][1]);
 #endif
-        	if (clock_settime(CLOCK_REALTIME, &tpset) == 0) {
-                	if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) {
-                        	printf("Error in clock_gettime()\n");
-                        	return PTS_UNRESOLVED;
-                	}
-                	secdelta = tpget.tv_sec-tpset.tv_sec;
-                	nsecdelta = tpget.tv_nsec-tpset.tv_nsec;
-			if (nsecdelta < 0) {
-				nsecdelta = nsecdelta+1000000000;
-				secdelta = secdelta-1;
+		if (clock_settime(CLOCK_REALTIME, &tpset) == 0) {
+			if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) {
+				printf("Error in clock_gettime()\n");
+				return PTS_UNRESOLVED;
 			}
-
+			secdelta = tpget.tv_sec - tpset.tv_sec;
+			nsecdelta = tpget.tv_nsec - tpset.tv_nsec;
+			if (nsecdelta < 0) {
+				nsecdelta = nsecdelta + 1000000000;
+				secdelta = secdelta - 1;
+			}
 #ifdef DEBUG
 			printf("Delta:  %ds %dns\n", secdelta, nsecdelta);
 #endif
-                	if ((secdelta > ACCEPTABLESECDELTA) ||
-			    (secdelta < 0)) {
-                        	printf("clock does not appear to be set\n");
+			if ((secdelta > ACCEPTABLESECDELTA) || (secdelta < 0)) {
+				printf("clock does not appear to be set\n");
 				failure = 1;
-                	}
-                	if ((nsecdelta > ACCEPTABLENSECDELTA) ||
+			}
+			if ((nsecdelta > ACCEPTABLENSECDELTA) ||
 			    (nsecdelta < 0)) {
-                        	printf("clock does not appear to be set\n");
+				printf("clock does not appear to be set\n");
 				failure = 1;
-                	}
-        	} else {
-                	printf("clock_settime() failed\n");
-                	return PTS_UNRESOLVED;
-        	}
+			}
+		} else {
+			printf("clock_settime() failed\n");
+			return PTS_UNRESOLVED;
+		}
 
 		if (clock_settime(CLOCK_REALTIME, &tsreset) != 0) {
 			perror("clock_settime() did not return success\n");
diff --git a/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c b/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
index 133ca15..1748ef3 100644
--- a/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
+++ b/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c
@@ -26,7 +26,7 @@
 #define TESTTIME 1037128358
 #define DELTA 5
 #define ACCEPTABLEDELTA 1
-#define LONGTIME 3	//== long enough for both clocks to be set
+#define LONGTIME 3		//== long enough for both clocks to be set
 
 int main(int argc, char *argv[])
 {
@@ -39,10 +39,10 @@
 	}
 
 	if ((pid = fork()) == 0) {
-		/*child*/
+		/*child */
 		struct timespec tschild;
 
-		tschild.tv_sec = TESTTIME+DELTA;
+		tschild.tv_sec = TESTTIME + DELTA;
 		tschild.tv_nsec = 0;
 		if (clock_settime(CLOCK_REALTIME, &tschild) != 0) {
 			printf("Note:  clock_settime() failed\n");
@@ -52,11 +52,11 @@
 		}
 
 	} else {
-		/*parent*/
+		/*parent */
 		struct timespec tsparent;
 		int pass = 0;
 
-		tsparent.tv_sec = TESTTIME-DELTA;
+		tsparent.tv_sec = TESTTIME - DELTA;
 		tsparent.tv_nsec = 0;
 		if (clock_settime(CLOCK_REALTIME, &tsparent) != 0) {
 			printf("Note:  clock_settime() failed\n");
@@ -65,19 +65,19 @@
 		sleep(LONGTIME);
 
 		/*
-	 	 * Ensure we set clock to TESTTIME-DELTA or TESTTIME+DELTA.
-	 	 * Assume that clock increased monotonically and clock_gettime,
-	 	 * clock_settime return correct values.
-	 	 */
+		 * Ensure we set clock to TESTTIME-DELTA or TESTTIME+DELTA.
+		 * Assume that clock increased monotonically and clock_gettime,
+		 * clock_settime return correct values.
+		 */
 
 		if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) {
 			printf("Note:  Error in clock_gettime()\n");
 		}
 
-		delta = (tpget.tv_sec-LONGTIME) - TESTTIME;
+		delta = (tpget.tv_sec - LONGTIME) - TESTTIME;
 
-		if ((delta <= ACCEPTABLEDELTA-DELTA) ||
-		    (delta <= ACCEPTABLEDELTA+DELTA)) {
+		if ((delta <= ACCEPTABLEDELTA - DELTA) ||
+		    (delta <= ACCEPTABLEDELTA + DELTA)) {
 			pass = 1;
 		}
 
diff --git a/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c b/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
index 1c69850..4b26b57 100644
--- a/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
+++ b/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c
@@ -22,8 +22,8 @@
 
 #define CHILDPASS 1
 
-int caughtabort=0;
-int caughtalarm=0;
+int caughtabort = 0;
+int caughtalarm = 0;
 
 void handler_abrt(int signo)
 {
@@ -46,18 +46,18 @@
 	struct itimerspec its;
 	int flags = 0;
 
-	act1.sa_handler=handler_abrt;
-	act1.sa_flags=0;
-	act2.sa_handler=handler_alrm;
-	act2.sa_flags=0;
+	act1.sa_handler = handler_abrt;
+	act1.sa_flags = 0;
+	act2.sa_handler = handler_alrm;
+	act2.sa_flags = 0;
 
 	if ((sigemptyset(&act1.sa_mask) != 0) ||
-       	    (sigemptyset(&act2.sa_mask) != 0)) {
+	    (sigemptyset(&act2.sa_mask) != 0)) {
 		perror("sigemptyset() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
 	if ((sigaction(SIGABRT, &act1, 0) != 0) ||
-       	    (sigaction(SIGALRM, &act2, 0) != 0)) {
+	    (sigaction(SIGALRM, &act2, 0) != 0)) {
 		perror("sigaction() did not return success\n");
 		return PTS_UNRESOLVED;
 	}
@@ -93,7 +93,7 @@
 		return PTS_UNRESOLVED;
 	}
 
-	sleep(EXPIREDELTA+1);
+	sleep(EXPIREDELTA + 1);
 
 	if ((caughtalarm == 1) && (caughtabort == 1)) {
 		printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/functional/timers/timers/twoptimers.c b/testcases/open_posix_testsuite/functional/timers/timers/twoptimers.c
index 6924172..84bea3f 100644
--- a/testcases/open_posix_testsuite/functional/timers/timers/twoptimers.c
+++ b/testcases/open_posix_testsuite/functional/timers/timers/twoptimers.c
@@ -33,7 +33,7 @@
 	}
 
 	if ((pid = fork()) == 0) {
-		/*child*/
+		/*child */
 		struct sigevent ev;
 		timer_t tid;
 		struct itimerspec its;
@@ -78,7 +78,7 @@
 		sleep(LONGTIME);
 		return CHILDPASS;
 	} else {
-		/*parent*/
+		/*parent */
 		struct sigevent ev;
 		timer_t tid;
 		struct itimerspec its;
diff --git a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
index d80d386..0d9a7c3 100644
--- a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
+++ b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
@@ -33,42 +33,48 @@
 typedef struct {
 	int ThreadID;
 	mqd_t mqID;
-}mq_info;
+} mq_info;
 
-int* send(void *info)
+int *send(void *info)
 {
 	int i;
 
-	const char *s_msg_ptr[] = {"msg test 1", "msg test 2", "msg test 3"};
+	const char *s_msg_ptr[] = { "msg test 1", "msg test 2", "msg test 3" };
 	mq_info send_info;
-	send_info.ThreadID = ((mq_info *)info)->ThreadID;
-	send_info.mqID = ((mq_info *)info)->mqID;
-	printf("Enter into send [%d], mq = %d \n", send_info.ThreadID, send_info.mqID);
+	send_info.ThreadID = ((mq_info *) info)->ThreadID;
+	send_info.mqID = ((mq_info *) info)->mqID;
+	printf("Enter into send [%d], mq = %d \n", send_info.ThreadID,
+	       send_info.mqID);
 	for (i = 0; i < MAX_MSG; i++) {
 		if (-1 == mq_send(send_info.mqID, s_msg_ptr[i], MSG_SIZE, i)) {
 			perror("mq_send doesn't return success \n");
-			pthread_exit((void *) 1);
+			pthread_exit((void *)1);
 		}
-		printf("[%d] send '%s' in thread send [%d]. \n", i+1, s_msg_ptr[i], send_info.ThreadID);
+		printf("[%d] send '%s' in thread send [%d]. \n", i + 1,
+		       s_msg_ptr[i], send_info.ThreadID);
 	}
 	pthread_exit((void *)0);
 
 }
-int* receive(void * info)
+
+int *receive(void *info)
 {
 	int i;
 	char r_msg_ptr[MAX_MSG][MSG_SIZE];
 
 	mq_info recv_info;
-	recv_info.ThreadID = ((mq_info *)info)->ThreadID;
-	recv_info.mqID = ((mq_info *)info)->mqID;
-	printf("Enter into receive [%d], mq = %d \n", recv_info.ThreadID, recv_info.mqID);
-	for (i = 0; i< MAX_MSG; i++) {
-		if (-1 == mq_receive(recv_info.mqID, r_msg_ptr[i], MSG_SIZE, NULL)) {
+	recv_info.ThreadID = ((mq_info *) info)->ThreadID;
+	recv_info.mqID = ((mq_info *) info)->mqID;
+	printf("Enter into receive [%d], mq = %d \n", recv_info.ThreadID,
+	       recv_info.mqID);
+	for (i = 0; i < MAX_MSG; i++) {
+		if (-1 ==
+		    mq_receive(recv_info.mqID, r_msg_ptr[i], MSG_SIZE, NULL)) {
 			perror("mq_receive doesn't return success \n");
 			pthread_exit((void *)0);
 		}
-		printf("[%d] receive '%s' in thread receive recv [%d]. \n", i+1, r_msg_ptr[i], recv_info.ThreadID);
+		printf("[%d] receive '%s' in thread receive recv [%d]. \n",
+		       i + 1, r_msg_ptr[i], recv_info.ThreadID);
 	}
 
 	pthread_exit((void *)0);
@@ -76,10 +82,12 @@
 
 int main(int argc, char *argv[])
 {
-	const char * MQ_NAME[Max_Threads] = {"/msg1", "/msg2", "/msg3", "/msg4", "/msg5", "/msg6", "/msg7", "/msg8", "/msg9", "/msg10"};
- 	mqd_t mq[Max_Threads];
+	const char *MQ_NAME[Max_Threads] =
+	    { "/msg1", "/msg2", "/msg3", "/msg4", "/msg5", "/msg6", "/msg7",
+"/msg8", "/msg9", "/msg10" };
+	mqd_t mq[Max_Threads];
 	struct mq_attr mqstat;
-	int oflag = O_CREAT|O_NONBLOCK|O_RDWR;
+	int oflag = O_CREAT | O_NONBLOCK | O_RDWR;
 	int num, i;
 	pthread_t sed[Max_Threads], rev[Max_Threads];
 	mq_info info[Max_Threads];
@@ -90,11 +98,12 @@
 #endif */
 	if ((2 != argc) || ((num = atoi(argv[1])) <= 0)) {
 		fprintf(stderr, "Usage: %s number_of_threads\n", argv[0]);
-                return PTS_FAIL;
-        }
+		return PTS_FAIL;
+	}
 	if (num > Max_Threads) {
-        	printf("The num of threads are too large.  Reset to %d\n", Max_Threads);
-        	num = Max_Threads;
+		printf("The num of threads are too large.  Reset to %d\n",
+		       Max_Threads);
+		num = Max_Threads;
 	}
 	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_maxmsg = MAX_MSG;
@@ -102,7 +111,7 @@
 	mqstat.mq_flags = 0;
 
 	for (i = 0; i < num; i++) {
-	  	if ((mq[i] = mq_open(MQ_NAME[i],oflag,0777, &mqstat)) == -1) {
+		if ((mq[i] = mq_open(MQ_NAME[i], oflag, 0777, &mqstat)) == -1) {
 			perror("mq_open doesn't return success \n");
 			return PTS_UNRESOLVED;
 		}
@@ -112,7 +121,8 @@
 		info[i].ThreadID = i;
 		info[i].mqID = mq[i];
 		pthread_create(&sed[i], NULL, (void *)send, (void *)&info[i]);
-        	pthread_create(&rev[i], NULL, (void *)receive, (void *)&info[i]);
+		pthread_create(&rev[i], NULL, (void *)receive,
+			       (void *)&info[i]);
 	}
 	for (i = 0; i < num; i++) {
 		pthread_join(sed[i], NULL);
diff --git a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
index 7054c86..7ff5b8b 100644
--- a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
+++ b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
@@ -30,11 +30,12 @@
 #define MAX_MSG		5
 #define Max_Threads	100
 
-const char *s_msg_ptr[] = {"send_1 1", "send_1 2", "send_1 3", "send_1 4", "send_1 5"};
+const char *s_msg_ptr[] =
+    { "send_1 1", "send_1 2", "send_1 3", "send_1 4", "send_1 5" };
 char r_msg_ptr[Max_Threads][MAX_MSG][MSG_SIZE];
 mqd_t mq = 0;
 
-int *send(void * ID)
+int *send(void *ID)
 {
 	int i;
 	int ThreadID = *(int *)ID;
@@ -45,32 +46,37 @@
 			perror("mq_send doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] send '%s' in thread send %d. \n", i+1, s_msg_ptr[i], ThreadID);
+		printf("[%d] send '%s' in thread send %d. \n", i + 1,
+		       s_msg_ptr[i], ThreadID);
 	}
 	pthread_exit((void *)0);
 
 }
-int *receive(void * ID)
+
+int *receive(void *ID)
 {
 	int i;
 	int ThreadID = *(int *)ID;
 
 	printf("Enter into receive[%d] \n", ThreadID);
-	for (i = 0; i< MAX_MSG; i++) {
-		if (-1 == mq_receive(mq, r_msg_ptr[ThreadID][i], MSG_SIZE, NULL)) {
+	for (i = 0; i < MAX_MSG; i++) {
+		if (-1 ==
+		    mq_receive(mq, r_msg_ptr[ThreadID][i], MSG_SIZE, NULL)) {
 			perror("mq_receive doesn't return success \n");
 			pthread_exit((void *)1);
 		}
-		printf("[%d] receive '%s' in thread receive[%d]. \n", i+1, r_msg_ptr[ThreadID][i], ThreadID);
+		printf("[%d] receive '%s' in thread receive[%d]. \n", i + 1,
+		       r_msg_ptr[ThreadID][i], ThreadID);
 	}
 	printf("receive[%d] quit ...\n", ThreadID);
 	pthread_exit((void *)0);
 }
+
 int main(int argc, char *argv[])
 {
 
 	struct mq_attr mqstat;
-	int oflag = O_CREAT|O_NONBLOCK|O_RDWR;
+	int oflag = O_CREAT | O_NONBLOCK | O_RDWR;
 	pthread_t sed[Max_Threads], rev[Max_Threads];
 	int ThreadID[Max_Threads];
 	int num, i;
@@ -81,26 +87,29 @@
 #endif */
 	if ((2 != argc) || ((num = atoi(argv[1])) <= 0)) {
 		fprintf(stderr, "Usage: %s number_of_threads\n", argv[0]);
-                return PTS_FAIL;
-        }
+		return PTS_FAIL;
+	}
 	if (num > Max_Threads) {
-        	printf("The num of threads are too large.  Reset to %d\n", Max_Threads);
-        	num = Max_Threads;
+		printf("The num of threads are too large.  Reset to %d\n",
+		       Max_Threads);
+		num = Max_Threads;
 	}
 	memset(&mqstat, 0, sizeof(mqstat));
 	mqstat.mq_maxmsg = MAX_MSG;
 	mqstat.mq_msgsize = MSG_SIZE;
 	mqstat.mq_flags = 0;
 
-  	if ((mq = mq_open(MQ_NAME,oflag,0777, &mqstat)) == -1) {
+	if ((mq = mq_open(MQ_NAME, oflag, 0777, &mqstat)) == -1) {
 		printf("mq_open doesn't return success\n");
 		return PTS_UNRESOLVED;
 	}
 
 	for (i = 0; i < num; i++) {
 		ThreadID[i] = i;
-		pthread_create(&sed[i], NULL, (void *)send, (void *)&ThreadID[i]);
-       	 	pthread_create(&rev[i], NULL, (void *)receive, (void *)&ThreadID[i]);
+		pthread_create(&sed[i], NULL, (void *)send,
+			       (void *)&ThreadID[i]);
+		pthread_create(&rev[i], NULL, (void *)receive,
+			       (void *)&ThreadID[i]);
 	}
 
 	for (i = 0; i < num; i++) {
diff --git a/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c b/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
index 3d34463..299d19f 100644
--- a/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
+++ b/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
@@ -32,7 +32,7 @@
 	sem_t full;
 	sem_t empty;
 	sem_t lock;
-}buf_t;
+} buf_t;
 
 buf_t *buf;
 int in, out;
@@ -45,7 +45,7 @@
 	int full_value;
 
 	printf("Enter into Producer Thread %d... \n", ThreadID);
-	for (i = 0; i< Max_Num - 1; i++) {
+	for (i = 0; i < Max_Num - 1; i++) {
 		if (-1 == sem_wait(&buf->full)) {
 			perror("sem_wait didn't return success \n");
 			pthread_exit((void *)1);
@@ -59,9 +59,10 @@
 			perror("sem_wait didn't return success \n");
 			pthread_exit((void *)1);
 		}
-		data = 100*ThreadID + i;
+		data = 100 * ThreadID + i;
 		buf->buffer[in] = data;
-		printf("[%d] producer has added %d to the buffer[%d] \n", ThreadID, data, in);
+		printf("[%d] producer has added %d to the buffer[%d] \n",
+		       ThreadID, data, in);
 		in = (in + 1) % BUF_SIZE;
 		if (-1 == sem_post(&buf->lock)) {
 			perror("sem_wait didn't return success \n");
@@ -87,7 +88,8 @@
 	}
 	data = -1;
 	buf->buffer[in] = data;
-	printf("[%d] producer has added %d to the buffer[%d] \n", ThreadID, data, in);
+	printf("[%d] producer has added %d to the buffer[%d] \n", ThreadID,
+	       data, in);
 	in = (in + 1) % BUF_SIZE;
 	if (-1 == sem_post(&buf->lock)) {
 		perror("sem_wait didn't return success \n");
@@ -100,6 +102,7 @@
 	printf("Producer %d exit... \n", ThreadID);
 	pthread_exit((void *)0);
 }
+
 int *consumer(void *ID)
 {
 	int data;
@@ -107,8 +110,7 @@
 	int full_value;
 
 	printf("Enter into Consumer Thread %d... \n", ThreadID);
-	do
-	{
+	do {
 		if (-1 == sem_wait(&buf->empty)) {
 			perror("sem_wait didn't return success \n");
 			pthread_exit((void *)1);
@@ -118,7 +120,8 @@
 			pthread_exit((void *)1);
 		}
 		data = buf->buffer[out];
-		printf("[%d] consumer has taken %d from buffer[%d] \n", ThreadID, data, out);
+		printf("[%d] consumer has taken %d from buffer[%d] \n",
+		       ThreadID, data, out);
 		out = (out + 1) % BUF_SIZE;
 		if (-1 == sem_post(&buf->lock)) {
 			perror("sem_wait didn't return success \n");
@@ -139,12 +142,13 @@
 	printf("Consumer %d exit... \n", ThreadID);
 	pthread_exit((void *)0);
 }
+
 int main(int argc, char *argv[])
 {
 	int shared = 1;
 	int full_value = BUF_SIZE;
 	int empty_value = 0;
-	int lock_value=1;
+	int lock_value = 1;
 	int num;
 	int i;
 	pthread_t con[Max_Threads], pro[Max_Threads];
@@ -155,15 +159,17 @@
 	return PTS_UNRESOLVED;
 #endif
 
-	buf = (buf_t *)malloc(sizeof(buf_t));
+	buf = (buf_t *) malloc(sizeof(buf_t));
 
 	if ((2 != argc) || ((num = atoi(argv[1])) <= 0)) {
 		fprintf(stderr, "Usage: %s number_of_threads\n", argv[0]);
-                return PTS_FAIL;
-        }
+		return PTS_FAIL;
+	}
 	if (num > Max_Threads) {
-        	printf("The num of producers/consumers threads are too large.  Reset to %d\n", Max_Threads);
-        	num = Max_Threads;
+		printf
+		    ("The num of producers/consumers threads are too large.  Reset to %d\n",
+		     Max_Threads);
+		num = Max_Threads;
 	}
 
 	if (-1 == sem_init(&buf->full, shared, full_value)) {
@@ -187,11 +193,13 @@
 
 	for (i = 0; i < num; i++) {
 		ThreadID[i] = i;
-		pthread_create(&con[i], NULL, (void *)consumer, (void *)&ThreadID[i]);
+		pthread_create(&con[i], NULL, (void *)consumer,
+			       (void *)&ThreadID[i]);
 	}
 	for (i = 0; i < num; i++) {
 		ThreadID[i] = i;
-		pthread_create(&pro[i], NULL, (void *)producer, (void *)&ThreadID[i]);
+		pthread_create(&pro[i], NULL, (void *)producer,
+			       (void *)&ThreadID[i]);
 	}
 	for (i = 0; i < num; i++)
 		pthread_join(con[i], NULL);
diff --git a/testcases/open_posix_testsuite/stress/signals/sigismember_stress_1.c b/testcases/open_posix_testsuite/stress/signals/sigismember_stress_1.c
index 9be9f65..29ce726 100644
--- a/testcases/open_posix_testsuite/stress/signals/sigismember_stress_1.c
+++ b/testcases/open_posix_testsuite/stress/signals/sigismember_stress_1.c
@@ -22,9 +22,9 @@
 	int returnval;
 	returnval = sigismember(&signalset, SIGALRM);
 
-	#ifdef DEBUG
-		printf("sigismember returned returnval\n");
-	#endif
+#ifdef DEBUG
+	printf("sigismember returned returnval\n");
+#endif
 
 	/*
 	 * If we made it here, the test case passes.
diff --git a/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c b/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
index a98abbd..e0d016c 100644
--- a/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/fork/s-c1.c
@@ -30,7 +30,7 @@
 
 /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
@@ -54,7 +54,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -96,15 +96,12 @@
 
 /* The next structure is used to save the tests measures */
 
-typedef struct __mes_t
-{
+typedef struct __mes_t {
 	int nprocess;
-	long _data; /* As we store µsec values, a long type should be enough. */
+	long _data;		/* As we store µsec values, a long type should be enough. */
 
 	struct __mes_t *next;
-}
-
-mes_t;
+} mes_t;
 
 /* Forward declaration */
 int parse_measure(mes_t * measures);
@@ -112,7 +109,7 @@
 sem_t *sem_synchro;
 sem_t *sem_ending;
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status;
 	pid_t pidctl;
@@ -126,7 +123,7 @@
 	mes_t *m_cur, *m_tmp;
 
 	long CHILD_MAX = sysconf(_SC_CHILD_MAX);
-	long my_max = 1000 * SCALABILITY_FACTOR ;
+	long my_max = 1000 * SCALABILITY_FACTOR;
 
 	/* Initialize the measure list */
 	m_cur = &sentinel;
@@ -140,11 +137,9 @@
 
 	pr = (pid_t *) calloc(1 + my_max, sizeof(pid_t));
 
-	if (pr == NULL)
-	{
+	if (pr == NULL) {
 		UNRESOLVED(errno, "Not enough memory for process IDs storage");
 	}
-
 #if VERBOSE > 1
 	output("CHILD_MAX: %d\n", CHILD_MAX);
 
@@ -158,8 +153,7 @@
 	/* Initilaize the semaphores */
 	sem_synchro = sem_open("/fork_scal_sync", O_CREAT, O_RDWR, 0);
 
-	if (sem_synchro == SEM_FAILED)
-	{
+	if (sem_synchro == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to open a named semaphore\n");
 	}
 
@@ -167,8 +161,7 @@
 
 	sem_ending = sem_open("/fork_scal_end", O_CREAT, O_RDWR, 0);
 
-	if (sem_ending == SEM_FAILED)
-	{
+	if (sem_ending == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to open a named semaphore\n");
 	}
 
@@ -177,25 +170,23 @@
 	nprocesses = 0;
 	m_cur = &sentinel;
 
-	while (1)                                      /* we will break */
-	{
+	while (1) {		/* we will break */
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* create a new child */
 		pr[nprocesses] = fork();
 
-		if (pr[nprocesses] == -1)
-		{
+		if (pr[nprocesses] == -1) {
 			if (errno == EAGAIN || errno == ENOMEM)
 				break;
 
-			FAILED("Failed to fork and received an unexpected error");
+			FAILED
+			    ("Failed to fork and received an unexpected error");
 			/* Post the semaphore so running processes will terminate */
 
 			do {
@@ -203,22 +194,24 @@
 			} while (ret != 0 && errno == EINTR);
 
 			if (ret != 0)
-				output("Failed to post the semaphore on termination: error %d\n", errno);
+				output
+				    ("Failed to post the semaphore on termination: error %d\n",
+				     errno);
 
 		}
 
 		if (pr[nprocesses] == 0) {
 			/* Child */
-			/* Post the synchro semaphore*/
+			/* Post the synchro semaphore */
 
 			do {
 				ret = sem_post(sem_synchro);
 			} while ((ret != 0) && (errno == EINTR));
 
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				/* In this case the test will hang... */
-				UNRESOLVED(errno, "Failed post the sync semaphore");
+				UNRESOLVED(errno,
+					   "Failed post the sync semaphore");
 			}
 
 			/* Wait the end semaphore */
@@ -226,20 +219,19 @@
 				ret = sem_wait(sem_ending);
 			} while ((ret != 0) && (errno == EINTR));
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed wait for the end semaphore");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed wait for the end semaphore");
 			}
 
 			/* Cascade-post the end semaphore */
-			do
-			{
+			do {
 				ret = sem_post(sem_ending);
 			} while ((ret != 0) && (errno == EINTR));
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed post the end semaphore");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed post the end semaphore");
 			}
 
 			/* Exit */
@@ -250,14 +242,13 @@
 		nprocesses++;
 
 		/* FAILED if nprocesses > CHILD_MAX */
-		if (nprocesses > my_max)
-		{
+		if (nprocesses > my_max) {
 			errno = 0;
 
-			if (CHILD_MAX > 0)
-			{
+			if (CHILD_MAX > 0) {
 #if VERBOSE > 0
-				output("WARNING! We were able to create more than CHILD_MAX processes\n");
+				output
+				    ("WARNING! We were able to create more than CHILD_MAX processes\n");
 #endif
 
 			}
@@ -270,30 +261,28 @@
 			ret = sem_wait(sem_synchro);
 		} while ((ret == -1) && (errno == EINTR));
 
-		if (ret == -1)
-		{
+		if (ret == -1) {
 			sem_post(sem_ending);
-			UNRESOLVED(errno, "Failed to wait for the sync semaphore");
+			UNRESOLVED(errno,
+				   "Failed to wait for the sync semaphore");
 		}
 
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* add to the measure list if nprocesses % resolution == 0 */
-		if (((nprocesses % RESOLUTION) == 0) && (nprocesses != 0))
-		{
+		if (((nprocesses % RESOLUTION) == 0) && (nprocesses != 0)) {
 			/* Create an empty new element */
 			m_tmp = (mes_t *) malloc(sizeof(mes_t));
 
-			if (m_tmp == NULL)
-			{
+			if (m_tmp == NULL) {
 				sem_post(sem_ending);
-				UNRESOLVED(errno, "Unable to alloc memory for measure saving");
+				UNRESOLVED(errno,
+					   "Unable to alloc memory for measure saving");
 			}
 
 			m_tmp->nprocess = nprocesses;
@@ -303,10 +292,13 @@
 
 			m_cur = m_cur->next;
 
-			m_cur->_data = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
+			m_cur->_data =
+			    ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) +
+			    ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000);
 
 #if VERBOSE > 5
-			output("Added the following measure: n=%i, v=%li\n", nprocesses, m_cur->_data);
+			output("Added the following measure: n=%i, v=%li\n",
+			       nprocesses, m_cur->_data);
 #endif
 
 		}
@@ -315,41 +307,39 @@
 #if VERBOSE > 3
 
 	if (errno)
-		output("Could not create anymore processes. Current count is %i\n", nprocesses);
+		output
+		    ("Could not create anymore processes. Current count is %i\n",
+		     nprocesses);
 	else
-		output("Should not create anymore processes. Current count is %i\n", nprocesses);
+		output
+		    ("Should not create anymore processes. Current count is %i\n",
+		     nprocesses);
 
 #endif
 
 	/* Unblock every created children: post once, then cascade signaling */
 
-	do
-	{
+	do {
 		ret = sem_post(sem_ending);
 	}
 	while ((ret != 0) && (errno == EINTR));
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed post the end semaphore");
 	}
-
 #if VERBOSE > 3
 	output("Waiting children termination\n");
 
 #endif
 
-	for (i = 0; i < nprocesses; i++)
-	{
-		pidctl = waitpid(pr[ i ], &status, 0);
+	for (i = 0; i < nprocesses; i++) {
+		pidctl = waitpid(pr[i], &status, 0);
 
-		if (pidctl != pr[ i ])
-		{
+		if (pidctl != pr[i]) {
 			UNRESOLVED(errno, "Waitpid returned the wrong PID");
 		}
 
-		if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS))
-		{
+		if ((!WIFEXITED(status)) || (WEXITSTATUS(status) != PTS_PASS)) {
 			FAILED("Child exited abnormally");
 		}
 
@@ -369,11 +359,11 @@
 	output("  nproc  |  dur  \n");
 
 #endif
-	while (sentinel.next != NULL)
-	{
+	while (sentinel.next != NULL) {
 		m_cur = sentinel.next;
 #if (VERBOSE > 5) || defined(PLOT_OUTPUT)
-		output("%8.8i %1.1li.%6.6li\n", m_cur->nprocess, m_cur->_data / 1000000, m_cur->_data % 1000000);
+		output("%8.8i %1.1li.%6.6li\n", m_cur->nprocess,
+		       m_cur->_data / 1000000, m_cur->_data % 1000000);
 
 #endif
 		sentinel.next = m_cur->next;
@@ -381,11 +371,10 @@
 		free(m_cur);
 	}
 
-	if (ret != 0)
-	{
-		FAILED("The function is not scalable, add verbosity for more information");
+	if (ret != 0) {
+		FAILED
+		    ("The function is not scalable, add verbosity for more information");
 	}
-
 #if VERBOSE > 0
 	output("-----\n");
 
@@ -415,16 +404,15 @@
  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
  */
 
-struct row
-{
-	long X;  /* the X values -- copied from function argument */
-	long Y;  /* the Y values -- copied from function argument */
-	long _x; /* Value X - Xavg */
-	long _y; /* Value Y - Yavg */
-	double LnX; /* Natural logarithm of X values */
-	double LnY; /* Natural logarithm of Y values */
-	double _lnx; /* Value LnX - LnXavg */
-	double _lny; /* Value LnY - LnYavg */
+struct row {
+	long X;			/* the X values -- copied from function argument */
+	long Y;			/* the Y values -- copied from function argument */
+	long _x;		/* Value X - Xavg */
+	long _y;		/* Value Y - Yavg */
+	double LnX;		/* Natural logarithm of X values */
+	double LnY;		/* Natural logarithm of Y values */
+	double _lnx;		/* Value LnX - LnXavg */
+	double _lny;		/* Value LnY - LnYavg */
 };
 
 int parse_measure(mes_t * measures)
@@ -441,10 +429,10 @@
 	double r1, r2, r3, r4;
 
 	/* Some more intermediate vars */
-	long double _q[ 3 ];
-	long double _d[ 3 ];
+	long double _q[3];
+	long double _d[3];
 
-	long double t; /* temp value */
+	long double t;		/* temp value */
 
 	struct row *Table = NULL;
 
@@ -453,7 +441,7 @@
 
 	/* Initialize the datas */
 
-	array_max = -1; /* means no data */
+	array_max = -1;		/* means no data */
 	Xavg = 0.0;
 	LnXavg = 0.0;
 	Yavg = 0.0;
@@ -462,12 +450,12 @@
 	r2 = 0.0;
 	r3 = 0.0;
 	r4 = 0.0;
-	_q[ 0 ] = 0.0;
-	_q[ 1 ] = 0.0;
-	_q[ 2 ] = 0.0;
-	_d[ 0 ] = 0.0;
-	_d[ 1 ] = 0.0;
-	_d[ 2 ] = 0.0;
+	_q[0] = 0.0;
+	_q[1] = 0.0;
+	_q[2] = 0.0;
+	_d[0] = 0.0;
+	_d[1] = 0.0;
+	_d[2] = 0.0;
 
 	N = 0;
 	cur = measures;
@@ -481,31 +469,27 @@
 	 * -> average values
 	 */
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
 		N++;
 
-		if (cur->_data != 0)
-		{
+		if (cur->_data != 0) {
 			array_max = N;
-			Xavg += (double) cur->nprocess;
-			LnXavg += log((double) cur->nprocess);
-			Yavg += (double) cur->_data;
-			LnYavg += log((double) cur->_data);
+			Xavg += (double)cur->nprocess;
+			LnXavg += log((double)cur->nprocess);
+			Yavg += (double)cur->_data;
+			LnYavg += log((double)cur->_data);
 		}
 	}
 
 	/* We have the sum; we can divide to obtain the average values */
-	if (array_max != -1)
-	{
+	if (array_max != -1) {
 		Xavg /= array_max;
 		LnXavg /= array_max;
 		Yavg /= array_max;
 		LnYavg /= array_max;
 	}
-
 #if VERBOSE > 1
 	output(" Found %d rows\n", N);
 
@@ -515,8 +499,7 @@
 
 	Table = calloc(N, sizeof(struct row));
 
-	if (Table == NULL)
-	{
+	if (Table == NULL) {
 		UNRESOLVED(errno, "Unable to alloc space for results parsing");
 	}
 
@@ -525,21 +508,19 @@
 
 	cur = measures;
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
-		Table[ N ].X = (long) cur->nprocess;
-		Table[ N ].LnX = log((double) cur->nprocess);
+		Table[N].X = (long)cur->nprocess;
+		Table[N].LnX = log((double)cur->nprocess);
 
-		if (array_max > N)
-		{
-			Table[ N ]._x = Table[ N ].X - Xavg ;
-			Table[ N ]._lnx = Table[ N ].LnX - LnXavg;
-			Table[ N ].Y = cur->_data;
-			Table[ N ]._y = Table[ N ].Y - Yavg ;
-			Table[ N ].LnY = log((double) cur->_data);
-			Table[ N ]._lny = Table[ N ].LnY - LnYavg;
+		if (array_max > N) {
+			Table[N]._x = Table[N].X - Xavg;
+			Table[N]._lnx = Table[N].LnX - LnXavg;
+			Table[N].Y = cur->_data;
+			Table[N]._y = Table[N].Y - Yavg;
+			Table[N].LnY = log((double)cur->_data);
+			Table[N]._lny = Table[N].LnY - LnYavg;
 		}
 
 		N++;
@@ -561,18 +542,17 @@
 	output("Starting first pass...\n");
 
 #endif
-	for (r = 0; r < array_max; r++)
-	{
-		r1 += ((double) Table[ r ]._y / array_max) * (double) Table[ r ]._y;
+	for (r = 0; r < array_max; r++) {
+		r1 += ((double)Table[r]._y / array_max) * (double)Table[r]._y;
 
-		_q[ 0 ] += Table[ r ]._y * Table[ r ]._x;
-		_d[ 0 ] += Table[ r ]._x * Table[ r ]._x;
+		_q[0] += Table[r]._y * Table[r]._x;
+		_d[0] += Table[r]._x * Table[r]._x;
 
-		_q[ 1 ] += Table[ r ]._lny * Table[ r ]._lnx;
-		_d[ 1 ] += Table[ r ]._lnx * Table[ r ]._lnx;
+		_q[1] += Table[r]._lny * Table[r]._lnx;
+		_d[1] += Table[r]._lnx * Table[r]._lnx;
 
-		_q[ 2 ] += Table[ r ]._lny * Table[ r ]._x;
-		_d[ 2 ] += Table[ r ]._x * Table[ r ]._x;
+		_q[2] += Table[r]._lny * Table[r]._x;
+		_d[2] += Table[r]._x * Table[r]._x;
 	}
 
 	/* First pass is terminated; a2 = _q[0]/_d[0]; a3 = _q[1]/_d[1]; a4 = _q[2]/_d[2] */
@@ -585,30 +565,27 @@
 	output("Starting second pass...\n");
 
 #endif
-	for (r = 0; r < array_max; r++)
-	{
+	for (r = 0; r < array_max; r++) {
 		/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
-		t = (Table[ r ]._y - ((_q[ 0 ] * Table[ r ]._x) / _d[ 0 ]));
-		r2 += t * t / array_max ;
+		t = (Table[r]._y - ((_q[0] * Table[r]._x) / _d[0]));
+		r2 += t * t / array_max;
 
 		/* r3 = avg((y - c.x^a) ²);
-		    t = y - c * x ^ a
-		      = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
-		*/
-		t = (Table[ r ].Y
-		      - (logl (LnYavg - (_q[ 1 ] / _d[ 1 ]) * LnXavg)
-		          * powl(Table[ r ].X, (_q[ 1 ] / _d[ 1 ]))
-		        ));
-		r3 += t * t / array_max ;
+		   t = y - c * x ^ a
+		   = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
+		 */
+		t = (Table[r].Y - (logl(LnYavg - (_q[1] / _d[1]) * LnXavg)
+				   * powl(Table[r].X, (_q[1] / _d[1]))
+		     ));
+		r3 += t * t / array_max;
 
 		/* r4 = avg((y - exp(ax+b))²);
-		    t = y - exp(ax+b)
-		      = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
-		      = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
-		*/
-		t = (Table[ r ].Y
-		      - expl((_q[ 2 ] / _d[ 2 ]) * Table[ r ]._x + LnYavg));
-		r4 += t * t / array_max ;
+		   t = y - exp(ax+b)
+		   = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
+		   = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
+		 */
+		t = (Table[r].Y - expl((_q[2] / _d[2]) * Table[r]._x + LnYavg));
+		r4 += t * t / array_max;
 
 	}
 
@@ -629,32 +606,31 @@
 
 	output("  Model: Y = a * X + b\n");
 
-	output("       a = %Lg\n", _q[ 0 ] / _d[ 0 ]);
+	output("       a = %Lg\n", _q[0] / _d[0]);
 
-	output("       b = %Lg\n", Yavg - ((_q[ 0 ] / _d[ 0 ]) * Xavg));
+	output("       b = %Lg\n", Yavg - ((_q[0] / _d[0]) * Xavg));
 
 	output("    Divergence %g\n", r2);
 
 	output("  Model: Y = c * X ^ a\n");
 
-	output("       a = %Lg\n", _q[ 1 ] / _d[ 1 ]);
+	output("       a = %Lg\n", _q[1] / _d[1]);
 
-	output("       c = %Lg\n", logl (LnYavg - (_q[ 1 ] / _d[ 1 ]) * LnXavg));
+	output("       c = %Lg\n", logl(LnYavg - (_q[1] / _d[1]) * LnXavg));
 
 	output("    Divergence %g\n", r2);
 
 	output("  Model: Y = exp(a * X + b)\n");
 
-	output("       a = %Lg\n", _q[ 2 ] / _d[ 2 ]);
+	output("       a = %Lg\n", _q[2] / _d[2]);
 
-	output("       b = %Lg\n", LnYavg - ((_q[ 2 ] / _d[ 2 ]) * Xavg));
+	output("       b = %Lg\n", LnYavg - ((_q[2] / _d[2]) * Xavg));
 
 	output("    Divergence %g\n", r2);
 
 #endif
 
-	if (array_max != -1)
-	{
+	if (array_max != -1) {
 		/* Compare r1 to other values, with some ponderations */
 
 		if ((r1 > 1.1 * r2) || (r1 > 1.2 * r3) || (r1 > 1.3 * r4))
diff --git a/testcases/open_posix_testsuite/stress/threads/fork/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/fork/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/fork/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/fork/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/helper.c b/testcases/open_posix_testsuite/stress/threads/helper.c
index 8e7772d..9bcc4dd 100644
--- a/testcases/open_posix_testsuite/stress/threads/helper.c
+++ b/testcases/open_posix_testsuite/stress/threads/helper.c
@@ -67,17 +67,16 @@
 when the timeout expires. As this is highly
 improbable, we don't care... */
 
-void * timer(void * arg)
+void *timer(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
-	unsigned remaining = timeout  * 3600;
+	unsigned remaining = timeout * 3600;
 	do {
 		remaining = sleep(remaining);
 	} while (remaining);
 	ret = kill(child, SIGUSR1);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		perror("Failed to kill the stress test");
 		exit(2);
 	}
@@ -85,39 +84,39 @@
 	return NULL;
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	pthread_t th;
 	pid_t chk;
 	int status;
-	char *ts="[??:??:??]";
-	struct tm * now;
+	char *ts = "[??:??:??]";
+	struct tm *now;
 	time_t nw;
 
 	/* check args */
-	if (argc < 3)
-	{
+	if (argc < 3) {
 		printf("\nUsage: \n");
 		printf("  $ %s n exe arglist\n", argv[0]);
 		printf("\nWhere:\n");
 		printf("  n       is the timeout duration in hours,\n");
 		printf("  exe     is the stress test executable to monitor,\n");
-		printf("  arglist is the arguments to be passed to executable.\n\n");
+		printf
+		    ("  arglist is the arguments to be passed to executable.\n\n");
 		return 2;
 	}
 
 	timeout = atoi(argv[1]);
-	if (timeout < 1)
-	{
-		fprintf(stderr, "Invalid timeout value \"%s\". Timeout must be a positive integer.\n", argv[1]);
+	if (timeout < 1) {
+		fprintf(stderr,
+			"Invalid timeout value \"%s\". Timeout must be a positive integer.\n",
+			argv[1]);
 		return 2;
 	}
 
 	/* create the timer thread */
 	ret = pthread_create(&th, NULL, timer, NULL);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		perror("Failed to create the timeout thread\n");
 		return 2;
 	}
@@ -125,20 +124,17 @@
 	/* Create the new process for the stress test */
 	child = fork();
 
-	if (child == (pid_t)-1)
-	{
+	if (child == (pid_t) - 1) {
 		perror("Failed to create a new process");
 		exit(2);
 	}
 
 	/* The child process executes the test */
-	if (child == (pid_t)0)
-	{
+	if (child == (pid_t) 0) {
 
 		/* Execute the command */
 		ret = execvp(argv[2], &argv[2]);
-		if (ret == -1)
-		{
+		if (ret == -1) {
 			/* Application was not launched */
 			perror("Unable to run child application");
 			return 2;
@@ -152,18 +148,16 @@
 
 	/* wait for the child process to terminate */
 	chk = waitpid(child, &status, 0);
-	if (chk != child)
-	{
+	if (chk != child) {
 		perror("Got the wrong process image status");
 		return 2;
 	}
 
 	/* Cancel the timer thread in case the process returned by itself */
-	(void) pthread_cancel(th);
+	(void)pthread_cancel(th);
 
 	ret = pthread_join(th, NULL);
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		perror("Unable to join the timer thread");
 		return 2;
 	}
@@ -174,26 +168,21 @@
 	if (now == NULL)
 		printf(ts);
 	else
-		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-	if (! WIFEXITED(status))
-	{
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	if (!WIFEXITED(status)) {
 		printf("The stress sample did not exit\n");
-		if (WIFSIGNALED(status))
-		{
-			printf("It was killed with signal %i\n",  WTERMSIG(status));
-		}
-		else
-		{
+		if (WIFSIGNALED(status)) {
+			printf("It was killed with signal %i\n",
+			       WTERMSIG(status));
+		} else {
 			printf("and it was not killed...\n");
 		}
 		exit(1);
 	}
-	if (WEXITSTATUS(status) == 0)
-	{
+	if (WEXITSTATUS(status) == 0) {
 		printf("Test %s PASSED\n", argv[2]);
-	}
-	else
-	{
+	} else {
 		printf("Test %s: returned %d\n", argv[2], WEXITSTATUS(status));
 	}
 	exit(WEXITSTATUS(status));
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cancel/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_cancel/stress.c
index 251ecb4..92a6f01 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cancel/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cancel/stress.c
@@ -46,7 +46,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -83,8 +83,7 @@
 /* Handler for user request to terminate */
 void sighdl(int sig)
 {
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
@@ -93,13 +92,12 @@
 long long canceled, ended;
 
 /* The canceled thread */
-void * th(void * arg)
+void *th(void *arg)
 {
 	int ret = 0;
 	ret = pthread_barrier_wait(arg);
 
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))
-	{
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
 		UNRESOLVED(ret, "Failed to wait for the barrier");
 	}
 
@@ -107,7 +105,7 @@
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 	pthread_t child;
@@ -115,26 +113,22 @@
 	/* Initialize the barrier */
 	ret = pthread_barrier_init(arg, NULL, 2);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to initialize a barrier");
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		/* Create the thread */
 		ret = pthread_create(&child, NULL, th, arg);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Thread creation failed");
 		}
 
 		/* Synchronize */
 		ret = pthread_barrier_wait(arg);
 
-		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))
-		{
+		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
 			UNRESOLVED(ret, "Failed to wait for the barrier");
 		}
 
@@ -149,8 +143,7 @@
 		/* Join the thread */
 		ret = pthread_join(child, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Unable to join the child");
 		}
 
@@ -159,8 +152,7 @@
 	/* Destroy the barrier */
 	ret = pthread_barrier_destroy(arg);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to destroy a barrier");
 	}
 
@@ -168,46 +160,41 @@
 }
 
 /* Main function */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret = 0, i;
 
 	struct sigaction sa;
 
-	pthread_t th[ NTHREADS ];
-	pthread_barrier_t b[ NTHREADS ];
+	pthread_t th[NTHREADS];
+	pthread_barrier_t b[NTHREADS];
 
 	/* Initialize output routine */
 	output_init();
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 
 	sa.sa_flags = 0;
 
 	sa.sa_handler = sighdl;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-
 #if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
 
 #endif
 
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_create(&th[ i ], NULL, threaded, &b[ i ]);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_create(&th[i], NULL, threaded, &b[i]);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to create a thread");
 		}
 	}
@@ -218,12 +205,10 @@
 #endif
 
 	/* Then join */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_join(th[ i ], NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_join(th[i], NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join a thread");
 		}
 	}
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cancel/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_cancel/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cancel/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cancel/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/s-c.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/s-c.c
index a8e25e0..ccefb7b 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/s-c.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/s-c.c
@@ -32,29 +32,29 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need XSI conformance for memory limitation */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include <sys/resource.h>
- #include <sys/time.h>
+#include <pthread.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <sys/resource.h>
+#include <sys/time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -87,50 +87,49 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-typedef struct _teststruct
-{
+typedef struct _teststruct {
 	pthread_cond_t cnd[10 * SCALABILITY_FACTOR];
 	pthread_condattr_t ca[4];
 	pthread_condattr_t *pca[10 * SCALABILITY_FACTOR];
-	struct _teststruct * prev;
+	struct _teststruct *prev;
 } teststruct_t;
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	struct rlimit rl;
 	int ret;
 	int i;
 	teststruct_t *cur, *prev;
- 	struct timeval  time_zero, time_cour, time_res, time_sav[8];
- 	long sav= 0;
+	struct timeval time_zero, time_cour, time_res, time_sav[8];
+	long sav = 0;
 
 	long monotonic, pshared;
 
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Support for process-shared condvars: %li\n", pshared);
 	output("Support for monotonic clock        : %li\n", monotonic);
-	#endif
+#endif
 
 	/* Limit the process memory to a small value (32Mb for example). */
-	rl.rlim_max=1024 * 1024 * 32 * SCALABILITY_FACTOR;
-	rl.rlim_cur=rl.rlim_max;
-	if ((ret = setrlimit(RLIMIT_AS,  &rl)))
-	{ UNRESOLVED(ret, "Memory limitation failed"); }
-	#if VERBOSE > 1
-	output(";Memory is now limited to %dMb\n", 	rl.rlim_max >> 20);
-	#endif
+	rl.rlim_max = 1024 * 1024 * 32 * SCALABILITY_FACTOR;
+	rl.rlim_cur = rl.rlim_max;
+	if ((ret = setrlimit(RLIMIT_AS, &rl))) {
+		UNRESOLVED(ret, "Memory limitation failed");
+	}
+#if VERBOSE > 1
+	output(";Memory is now limited to %dMb\n", rl.rlim_max >> 20);
+#endif
 
 	prev = NULL;
 	cur = NULL;
 
 	/* Loop while we have memory left */
-	while (1)
-	{
+	while (1) {
 		/* Allocate memory for 10 mutex and related stuff */
 		cur = malloc(sizeof(teststruct_t));
-		if (cur == NULL) /* No memory left */
+		if (cur == NULL)	/* No memory left */
 			break;
 
 		/* Link to the previous so we are able to free memory */
@@ -138,39 +137,44 @@
 		prev = cur;
 
 		/* Initialize the mutex attributes */
-			/* We will have:
-			 * pca[0] = NULL
-			 * pca[1] = Default cond attribute
-			 * pca[2] = (if supported) pshared cond attribute
-			 * pca[3] = (if supported) monotonic clock cond attribute
-			 * pca[4] = (if supported) pshared + monotonic
-			 * pca[5] = pca[0]...
-			 */
-		for (i=0; i<4; i++)
-		{
+		/* We will have:
+		 * pca[0] = NULL
+		 * pca[1] = Default cond attribute
+		 * pca[2] = (if supported) pshared cond attribute
+		 * pca[3] = (if supported) monotonic clock cond attribute
+		 * pca[4] = (if supported) pshared + monotonic
+		 * pca[5] = pca[0]...
+		 */
+		for (i = 0; i < 4; i++) {
 			ret = pthread_condattr_init(&(cur->ca[i]));
-			if (ret != 0)
-			{ UNRESOLVED(ret, "Cond attribute init failed"); }
-
-			if ((monotonic > 0) && ((i == 2) || (i == 3)))
-			{
-				ret = pthread_condattr_setclock(&(cur->ca[i]), CLOCK_MONOTONIC);
-				if (ret != 0)
-				{  UNRESOLVED(ret, "Set monotonic clock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Cond attribute init failed");
 			}
-			if ((pshared > 0) && ((i == 1) || (i == 3)))
-			{
-				ret = pthread_condattr_setpshared(&(cur->ca[i]), PTHREAD_PROCESS_SHARED);
-				if (ret != 0)
-				{  UNRESOLVED(ret, "Set process shared attribute failed");  }
+
+			if ((monotonic > 0) && ((i == 2) || (i == 3))) {
+				ret =
+				    pthread_condattr_setclock(&(cur->ca[i]),
+							      CLOCK_MONOTONIC);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Set monotonic clock failed");
+				}
+			}
+			if ((pshared > 0) && ((i == 1) || (i == 3))) {
+				ret =
+				    pthread_condattr_setpshared(&(cur->ca[i]),
+								PTHREAD_PROCESS_SHARED);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Set process shared attribute failed");
+				}
 			}
 
 		}
 
-		for (i=0; i<(10 * SCALABILITY_FACTOR); i++)
-		{
-			cur->pca[i]=(i%5)?&(cur->ca[i % 4]):NULL;
-		} /* The mutex attributes are now initialized */
+		for (i = 0; i < (10 * SCALABILITY_FACTOR); i++) {
+			cur->pca[i] = (i % 5) ? &(cur->ca[i % 4]) : NULL;
+		}		/* The mutex attributes are now initialized */
 
 		/* Save the time */
 		gettimeofday(&time_zero, NULL);
@@ -182,39 +186,41 @@
 		 * - destroy the condvar
 		 * - init the condvar
 		 */
-		for (i=0; i<10 * SCALABILITY_FACTOR; i++)
-		{
+		for (i = 0; i < 10 * SCALABILITY_FACTOR; i++) {
 			ret = pthread_cond_init(&(cur->cnd[i]), cur->pca[i]);
-			if (ret)
-			{ UNRESOLVED(ret, "Cond 1st init failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond 1st init failed");
+			}
 			ret = pthread_cond_destroy(&(cur->cnd[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Cond 1st destroy failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond 1st destroy failed");
+			}
 			ret = pthread_cond_init(&(cur->cnd[i]), cur->pca[i]);
-			if (ret)
-			{ UNRESOLVED(ret, "Cond 2nd init failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond 2nd init failed");
+			}
 			ret = pthread_cond_destroy(&(cur->cnd[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Cond 2nd destroy failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond 2nd destroy failed");
+			}
 			ret = pthread_cond_init(&(cur->cnd[i]), cur->pca[i]);
-			if (ret)
-			{ UNRESOLVED(ret, "Cond 3rd init failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond 3rd init failed");
+			}
 		}
 		/* Compute the operation duration */
 		gettimeofday(&time_cour, NULL);
-		time_res.tv_usec = time_cour.tv_usec + 1000000 - time_zero.tv_usec;
-		if (time_res.tv_usec < 1000000)
-		{
-			time_res.tv_sec = time_cour.tv_sec - 1 - time_zero.tv_sec;
-		}
-		else
-		{
+		time_res.tv_usec =
+		    time_cour.tv_usec + 1000000 - time_zero.tv_usec;
+		if (time_res.tv_usec < 1000000) {
+			time_res.tv_sec =
+			    time_cour.tv_sec - 1 - time_zero.tv_sec;
+		} else {
 			time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec;
 			time_res.tv_usec -= 1000000;
 		}
 
-		if (sav >3)
-		{
+		if (sav > 3) {
 			time_sav[4].tv_sec = time_sav[5].tv_sec;
 			time_sav[4].tv_usec = time_sav[5].tv_usec;
 			time_sav[5].tv_sec = time_sav[6].tv_sec;
@@ -229,57 +235,63 @@
 		}
 		sav++;
 	}
-	if (errno != ENOMEM)
-	{  UNRESOLVED(errno, "Memory not full"); }
+	if (errno != ENOMEM) {
+		UNRESOLVED(errno, "Memory not full");
+	}
 
 	/* Now we just have to cleanup everything. */
-	while (prev != NULL)
-	{
+	while (prev != NULL) {
 		cur = prev;
 		prev = cur->prev;
 
 		/* Free the condvar resources in the cur element */
-		for (i=0; i<10 * SCALABILITY_FACTOR; i++)
-		{
+		for (i = 0; i < 10 * SCALABILITY_FACTOR; i++) {
 			ret = pthread_cond_destroy(&(cur->cnd[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Cond final destroy failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Cond final destroy failed");
+			}
 		}
 		/* Free the cond attributes resources in the cur element */
-		for (i=0; i<4; i++)
-		{
+		for (i = 0; i < 4; i++) {
 			ret = pthread_condattr_destroy(&(cur->ca[i]));
-			if (ret != 0)
-			{ UNRESOLVED(ret, "Cond attribute destroy failed"); }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Cond attribute destroy failed");
+			}
 		}
-		 /* Free the element memory */
-		 free(cur);
+		/* Free the element memory */
+		free(cur);
 	}
-	#if VERBOSE > 0
-	if (sav < 8)
-	{
+#if VERBOSE > 0
+	if (sav < 8) {
 		output("Not enough iterations to build statistics\n");
-	}
-	else
-	{
+	} else {
 		output("Duration for the operations:\n");
-		output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, time_sav[0].tv_usec);
-		output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec, time_sav[1].tv_usec);
-		output(" %8i : %2i.%06i s\n", 2, time_sav[2].tv_sec, time_sav[2].tv_usec);
-		output(" %8i : %2i.%06i s\n", 3, time_sav[3].tv_sec, time_sav[3].tv_usec);
+		output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec,
+		       time_sav[0].tv_usec);
+		output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec,
+		       time_sav[1].tv_usec);
+		output(" %8i : %2i.%06i s\n", 2, time_sav[2].tv_sec,
+		       time_sav[2].tv_usec);
+		output(" %8i : %2i.%06i s\n", 3, time_sav[3].tv_sec,
+		       time_sav[3].tv_usec);
 		output(" [...]\n");
-		output(" %8i : %2i.%06i s\n", sav-3, time_sav[4].tv_sec, time_sav[4].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav-2, time_sav[5].tv_sec, time_sav[5].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav-1, time_sav[6].tv_sec, time_sav[6].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav   , time_sav[7].tv_sec, time_sav[7].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 3, time_sav[4].tv_sec,
+		       time_sav[4].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 2, time_sav[5].tv_sec,
+		       time_sav[5].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 1, time_sav[6].tv_sec,
+		       time_sav[6].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav, time_sav[7].tv_sec,
+		       time_sav[7].tv_usec);
 	}
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNRESOLVED(0, "This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/stress.c
index 1ce2622..26fbd9c 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/stress.c
@@ -24,26 +24,26 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <signal.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
- #include <time.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -76,110 +76,136 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-char do_it=1;
-pthread_mutex_t cnt_mtx=PTHREAD_MUTEX_INITIALIZER;
-unsigned long long cnt=0;
+char do_it = 1;
+pthread_mutex_t cnt_mtx = PTHREAD_MUTEX_INITIALIZER;
+unsigned long long cnt = 0;
 
 /******** Threads function *********/
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
-	int me=(int)arg;
+	int me = (int)arg;
 	pthread_cond_t cnd;
-	pthread_cond_t * pcnd;
+	pthread_cond_t *pcnd;
 	pthread_condattr_t ca;
-	pthread_condattr_t * pca;
+	pthread_condattr_t *pca;
 	struct timespec now;
 	pthread_mutex_t mtx, *pmtx;
 	int ret;
 	int sz = 4;
 	/* We will use mutex from the stack or from malloc'ed memory */
-	char loc = ((me % 5) %2);
+	char loc = ((me % 5) % 2);
 
 	pmtx = &mtx;
 
-	if (loc)
-	{
+	if (loc) {
 		pcnd = &cnd;
-	}
-	else
-	{
+	} else {
 		pcnd = (pthread_cond_t *) malloc(sizeof(pthread_cond_t));
-		if (pcnd == NULL)
-		{ UNRESOLVED(errno, "Memory allocation for condvar failed"); }
+		if (pcnd == NULL) {
+			UNRESOLVED(errno,
+				   "Memory allocation for condvar failed");
+		}
 	}
 
 	me %= sz;
 
 	ret = clock_gettime(CLOCK_REALTIME, &now);
-	if (ret != 0) {  UNRESOLVED(errno, "Clock get time (realtime) failed.");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Clock get time (realtime) failed.");
+	}
 
-	switch (me)
-	{
-		case 0: /* We will initialize the cond with NULL pointer attribute */
-			pca = NULL;
-			break;
+	switch (me) {
+	case 0:		/* We will initialize the cond with NULL pointer attribute */
+		pca = NULL;
+		break;
 
-		default: /* We will initialize the cond with an attribute object */
-			if ((ret = pthread_condattr_init(&ca)))
-			{ UNRESOLVED(ret, "Cond attribute init failed"); }
-			pca = &ca;
+	default:		/* We will initialize the cond with an attribute object */
+		if ((ret = pthread_condattr_init(&ca))) {
+			UNRESOLVED(ret, "Cond attribute init failed");
+		}
+		pca = &ca;
 
-			if ((me == 1) || (me == 3))
-			{
-				ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-				if (ret != 0) {  UNRESOLVED(ret, "Unable to set PShared condvar");  }
+		if ((me == 1) || (me == 3)) {
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set PShared condvar");
+			}
+		}
+
+		if ((sysconf(_SC_MONOTONIC_CLOCK) > 0)
+		    && ((me == 1) || (me == 2))) {
+			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to attribute monotonic clock to condvar");
 			}
 
-			if ((sysconf(_SC_MONOTONIC_CLOCK) > 0) && ((me == 1) || (me == 2)))
-			{
-				ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-				if (ret != 0) {  UNRESOLVED(ret, "Unable to attribute monotonic clock to condvar");  }
-
-				ret = clock_gettime(CLOCK_MONOTONIC, &now);
-				if (ret != 0) {  UNRESOLVED(errno, "Clock get time (realtime) failed.");  }
+			ret = clock_gettime(CLOCK_MONOTONIC, &now);
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Clock get time (realtime) failed.");
 			}
+		}
 
 	}
 
 	ret = pthread_mutex_init(pmtx, NULL);
-	if (ret != 0) {  UNRESOLVED(ret, "Unable to initialize a mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize a mutex");
+	}
 	ret = pthread_mutex_lock(pmtx);
-	if (ret != 0) {  UNRESOLVED(ret, "Unable to lock a mutex");  }
-
-	while (do_it)
-	{
-		ret = pthread_cond_init(pcnd, pca);
-		if (ret != 0)
-		{ FAILED("Cond init failed");	}
-		/* We use the mutex to check everything is OK */
-		ret = pthread_cond_timedwait(pcnd, pmtx, &now);
-		if (ret != ETIMEDOUT)
-		{
-			if (ret == 0)  {  FAILED("");  }
-			else {  UNRESOLVED(ret, "Cond timedwait returned unexpected error code");  }
-		}
-		ret = pthread_cond_signal(pcnd);
-		if (ret != 0)
-		{ FAILED("Cond signal failed");	}
-		ret = pthread_cond_broadcast(pcnd);
-		if (ret != 0)
-		{ FAILED("Cond broadcast failed");	}
-		ret = pthread_cond_destroy(pcnd);
-		if (ret != 0)
-		{ FAILED("Cond destroy failed");	}
-		ret = pthread_mutex_lock(&cnt_mtx);
-		if (ret != 0) {  UNRESOLVED(ret, "Unable to lock counter mutex");  }
-		cnt++;
-		ret = pthread_mutex_unlock(&cnt_mtx);
-		if (ret != 0) {  UNRESOLVED(ret, "Unable to unlock counter mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock a mutex");
 	}
 
-	if (!loc) /* cond was malloc'ed */
+	while (do_it) {
+		ret = pthread_cond_init(pcnd, pca);
+		if (ret != 0) {
+			FAILED("Cond init failed");
+		}
+		/* We use the mutex to check everything is OK */
+		ret = pthread_cond_timedwait(pcnd, pmtx, &now);
+		if (ret != ETIMEDOUT) {
+			if (ret == 0) {
+				FAILED("");
+			} else {
+				UNRESOLVED(ret,
+					   "Cond timedwait returned unexpected error code");
+			}
+		}
+		ret = pthread_cond_signal(pcnd);
+		if (ret != 0) {
+			FAILED("Cond signal failed");
+		}
+		ret = pthread_cond_broadcast(pcnd);
+		if (ret != 0) {
+			FAILED("Cond broadcast failed");
+		}
+		ret = pthread_cond_destroy(pcnd);
+		if (ret != 0) {
+			FAILED("Cond destroy failed");
+		}
+		ret = pthread_mutex_lock(&cnt_mtx);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to lock counter mutex");
+		}
+		cnt++;
+		ret = pthread_mutex_unlock(&cnt_mtx);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to unlock counter mutex");
+		}
+	}
+
+	if (!loc)		/* cond was malloc'ed */
 		free(pcnd);
 
 	if (me)
-		if ((ret = pthread_condattr_destroy(pca)))
-		{ FAILED("Cond attribute destroy failed at the end"); }
+		if ((ret = pthread_condattr_destroy(pca))) {
+			FAILED("Cond attribute destroy failed at the end");
+		}
 
 	return NULL;
 }
@@ -187,12 +213,14 @@
 /******** Signal handler ************/
 void sighdl(int sig)
 {
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /******** Parent thread *************/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	struct sigaction sa;
 	pthread_t threads[N * SCALABILITY_FACTOR];
@@ -201,36 +229,37 @@
 
 	output_init();
 
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-
-	for (i=0; (i<(N * SCALABILITY_FACTOR) && (ret == 0)); i++)
-	{
-		ret = pthread_create(&threads[i], NULL, threaded, (void *) i);
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-	if (ret != 0) /* A thread creation failed */
-	{
-		 /* Stop the started threads */
-		do {do_it = 0;}
+
+	for (i = 0; (i < (N * SCALABILITY_FACTOR) && (ret == 0)); i++) {
+		ret = pthread_create(&threads[i], NULL, threaded, (void *)i);
+	}
+	if (ret != 0) {		/* A thread creation failed */
+		/* Stop the started threads */
+		do {
+			do_it = 0;
+		}
 		while (do_it);
-		for (; i>0; i--)
-			pthread_join(threads[i-1], NULL);
+		for (; i > 0; i--)
+			pthread_join(threads[i - 1], NULL);
 
 		UNRESOLVED(ret, "Unable to create enough threads");
 	}
 
 	/* Every threads were created; we now just wait */
-	for (i=0; i<(N * SCALABILITY_FACTOR); i++)
-	{
-		if ((ret = pthread_join(threads[i], NULL)))
-		{ FAILED("Unable to join a thread"); }
+	for (i = 0; i < (N * SCALABILITY_FACTOR); i++) {
+		if ((ret = pthread_join(threads[i], NULL))) {
+			FAILED("Unable to join a thread");
+		}
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("pthread_cond_init stress test passed (%llu iterations)\n", cnt);
-	#endif
+#endif
 
 	/* Everything went OK */
 	PASSED;
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/testfrmw.c
index cd336d8..e8269be 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_init/testfrmw.c
@@ -39,15 +39,17 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
+
+void output(char *string, ...)
 {
-   va_list ap;
-   pthread_mutex_lock(&m_trace);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+	va_list ap;
+	pthread_mutex_lock(&m_trace);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/s-c.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/s-c.c
index 99c31c2..1b59db0 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/s-c.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/s-c.c
@@ -33,30 +33,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
- #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE 600
- #endif
+#ifndef WITHOUT_XOPEN
+#define _XOPEN_SOURCE 600
+#endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <time.h>
- #include <errno.h>
- #include <math.h>
+#include <time.h>
+#include <errno.h>
+#include <math.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -86,10 +86,10 @@
 #endif
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
-#define MES_TIMEOUT  (1000000) /* ns, offset for the pthread_cond_timedwait call */
+#define MES_TIMEOUT  (1000000)	/* ns, offset for the pthread_cond_timedwait call */
 
 #ifdef PLOT_OUTPUT
 #undef VERBOSE
@@ -104,53 +104,83 @@
 
 long altclk_ok, pshared_ok;
 
-typedef struct
-{
+typedef struct {
 	pthread_cond_t *cnd;
 	pthread_mutex_t *mtx;
-	int * predicate;
-	int * tnum;
+	int *predicate;
+	int *tnum;
 } test_t;
 
 struct {
 	int mutex_type;
 	int pshared;
 	clockid_t cid;
-	char * desc;
+	char *desc;
 } test_scenar[] = {
-	 { PTHREAD_MUTEX_DEFAULT   , PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME , "Default" }
-	,{ PTHREAD_MUTEX_DEFAULT   , PTHREAD_PROCESS_SHARED , CLOCK_REALTIME , "PShared" }
+	{
+	PTHREAD_MUTEX_DEFAULT, PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME,
+		    "Default"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, PTHREAD_PROCESS_SHARED, CLOCK_REALTIME,
+		    "PShared"}
 #ifndef WITHOUT_XOPEN
-	,{ PTHREAD_MUTEX_NORMAL    , PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME , "Normal" }
-	,{ PTHREAD_MUTEX_NORMAL    , PTHREAD_PROCESS_SHARED , CLOCK_REALTIME , "Normal+PShared" }
-	,{ PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME , "Errorcheck" }
-	,{ PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_SHARED , CLOCK_REALTIME , "Errorcheck+PShared" }
-	,{ PTHREAD_MUTEX_RECURSIVE , PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME , "Recursive" }
-	,{ PTHREAD_MUTEX_RECURSIVE , PTHREAD_PROCESS_SHARED , CLOCK_REALTIME , "Recursive+PShared" }
+	, {
+	PTHREAD_MUTEX_NORMAL, PTHREAD_PROCESS_PRIVATE, CLOCK_REALTIME,
+		    "Normal"}
+	, {
+	PTHREAD_MUTEX_NORMAL, PTHREAD_PROCESS_SHARED, CLOCK_REALTIME,
+		    "Normal+PShared"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_PRIVATE,
+		    CLOCK_REALTIME, "Errorcheck"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_SHARED,
+		    CLOCK_REALTIME, "Errorcheck+PShared"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, PTHREAD_PROCESS_PRIVATE,
+		    CLOCK_REALTIME, "Recursive"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, PTHREAD_PROCESS_SHARED, CLOCK_REALTIME,
+		    "Recursive+PShared"}
 #endif
 #ifdef USE_ALTCLK
-	,{ PTHREAD_MUTEX_DEFAULT   , PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC, "Monotonic" }
-	,{ PTHREAD_MUTEX_DEFAULT   , PTHREAD_PROCESS_SHARED , CLOCK_MONOTONIC, "PShared+Monotonic" }
+	, {
+	PTHREAD_MUTEX_DEFAULT, PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC,
+		    "Monotonic"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, PTHREAD_PROCESS_SHARED, CLOCK_MONOTONIC,
+		    "PShared+Monotonic"}
 #ifndef WITHOUT_XOPEN
-	,{ PTHREAD_MUTEX_NORMAL    , PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC, "Normal+Monotonic" }
-	,{ PTHREAD_MUTEX_NORMAL    , PTHREAD_PROCESS_SHARED , CLOCK_MONOTONIC, "Normal+PShared+Monotonic" }
-	,{ PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC, "Errorcheck+Monotonic" }
-	,{ PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_SHARED , CLOCK_MONOTONIC, "Errorcheck+PShared+Monotonic" }
-	,{ PTHREAD_MUTEX_RECURSIVE , PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC, "Recursive+Monotonic" }
-	,{ PTHREAD_MUTEX_RECURSIVE , PTHREAD_PROCESS_SHARED , CLOCK_MONOTONIC, "Recursive+PShared+Monotonic" }
+	, {
+	PTHREAD_MUTEX_NORMAL, PTHREAD_PROCESS_PRIVATE, CLOCK_MONOTONIC,
+		    "Normal+Monotonic"}
+	, {
+	PTHREAD_MUTEX_NORMAL, PTHREAD_PROCESS_SHARED, CLOCK_MONOTONIC,
+		    "Normal+PShared+Monotonic"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_PRIVATE,
+		    CLOCK_MONOTONIC, "Errorcheck+Monotonic"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, PTHREAD_PROCESS_SHARED,
+		    CLOCK_MONOTONIC, "Errorcheck+PShared+Monotonic"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, PTHREAD_PROCESS_PRIVATE,
+		    CLOCK_MONOTONIC, "Recursive+Monotonic"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, PTHREAD_PROCESS_SHARED,
+		    CLOCK_MONOTONIC, "Recursive+PShared+Monotonic"}
 #endif
 #endif
 };
 
 #define NSCENAR (sizeof(test_scenar) / sizeof(test_scenar[0]))
 
-pthread_attr_t  ta;
+pthread_attr_t ta;
 
 /* The next structure is used to save the tests measures */
-typedef struct __mes_t
-{
-	int  nthreads;
-	long _data[ NSCENAR ]; /* As we store µsec values, a long type should be amply enough. */
+typedef struct __mes_t {
+	int nthreads;
+	long _data[NSCENAR];	/* As we store µsec values, a long type should be amply enough. */
 	struct __mes_t *next;
 } mes_t;
 
@@ -159,7 +189,8 @@
  * Once the timedwait times out, it will read the clock cid then
  * compute the difference and put it into ts.
  * This function must be called once test is ready, as the timeout will be very short. */
-void do_measure(pthread_mutex_t *mtx, pthread_cond_t *cnd, clockid_t cid, struct timespec *ts)
+void do_measure(pthread_mutex_t * mtx, pthread_cond_t * cnd, clockid_t cid,
+		struct timespec *ts)
 {
 	int ret, rc;
 
@@ -167,15 +198,18 @@
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex");
+	}
 
 	/* Prepare the timeout parameter */
 	ret = clock_gettime(cid, &ts_cnd);
-	if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to read clock");
+	}
 
 	ts_cnd.tv_nsec += MES_TIMEOUT;
-	while (ts_cnd.tv_nsec >= 1000000000)
-	{
+	while (ts_cnd.tv_nsec >= 1000000000) {
 		ts_cnd.tv_nsec -= 1000000000;
 		ts_cnd.tv_sec++;
 	}
@@ -185,41 +219,48 @@
 		rc = pthread_cond_timedwait(cnd, mtx, &ts_cnd);
 		/* Re-read the clock as soon as possible */
 		ret = clock_gettime(cid, &ts_clk);
-		if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Unable to read clock");
+		}
 	}
 	while (rc == 0);
-	if (rc != ETIMEDOUT)  {  UNRESOLVED(rc, "Timedwait returned an unexpected error (expected ETIMEDOUT)");  }
+	if (rc != ETIMEDOUT) {
+		UNRESOLVED(rc,
+			   "Timedwait returned an unexpected error (expected ETIMEDOUT)");
+	}
 
 	/* Compute the difference time */
 	ts->tv_sec = ts_clk.tv_sec - ts_cnd.tv_sec;
 	ts->tv_nsec = ts_clk.tv_nsec - ts_cnd.tv_nsec;
-	if (ts->tv_nsec < 0)
-	{
+	if (ts->tv_nsec < 0) {
 		ts->tv_nsec += 1000000000;
 		ts->tv_sec -= 1;
 	}
 
-	if (ts->tv_sec < 0)
-	{
-		FAILED("The function returned from wait with a timeout before the time has passed\n");
+	if (ts->tv_sec < 0) {
+		FAILED
+		    ("The function returned from wait with a timeout before the time has passed\n");
 	}
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock mutex");
+	}
 
 	return;
 }
 
-void * waiter(void * arg)
+void *waiter(void *arg)
 {
-	test_t * dt = (test_t *) arg;
+	test_t *dt = (test_t *) arg;
 
 	int ret;
 
 	ret = pthread_mutex_lock(dt->mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed in waiter");  }
-
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex lock failed in waiter");
+	}
 #ifdef USE_CANCEL
 	pthread_cleanup_push((void *)pthread_mutex_unlock, (void *)(dt->mtx));
 #endif
@@ -227,16 +268,21 @@
 	/* This thread is ready to wait */
 	*(dt->tnum) += 1;
 
-	do {  ret = pthread_cond_wait(dt->cnd, dt->mtx);  }
+	do {
+		ret = pthread_cond_wait(dt->cnd, dt->mtx);
+	}
 	while ((ret == 0) && (*(dt->predicate) == 0));
-	if (ret != 0)  {  UNRESOLVED(ret, "pthread_cond_wait failed in waiter");  }
-
+	if (ret != 0) {
+		UNRESOLVED(ret, "pthread_cond_wait failed in waiter");
+	}
 #ifdef USE_CANCEL
-	pthread_cleanup_pop(0); /* We could put 1 and avoid the next line, but we would miss the return code */
+	pthread_cleanup_pop(0);	/* We could put 1 and avoid the next line, but we would miss the return code */
 #endif
 
 	ret = pthread_mutex_unlock(dt->mtx);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed in waiter");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex unlock failed in waiter");
+	}
 
 	return NULL;
 }
@@ -275,130 +321,168 @@
 	td.tnum = &tnum;
 
 	/* Allocate space for the threads structures */
-	th = (pthread_t *)calloc(nthreads, sizeof(pthread_t));
-	if (th == NULL)  {  UNRESOLVED(errno, "Not enough memory for thread storage");  }
-
-	#ifdef PLOT_OUTPUT
+	th = (pthread_t *) calloc(nthreads, sizeof(pthread_t));
+	if (th == NULL) {
+		UNRESOLVED(errno, "Not enough memory for thread storage");
+	}
+#ifdef PLOT_OUTPUT
 	output("%d", nthreads);
-	#endif
+#endif
 	/* For each test scenario (mutex and cond attributes) */
-	for (s=0; s < NSCENAR ; s++)
-	{
+	for (s = 0; s < NSCENAR; s++) {
 		/* Initialize the attributes */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to initialize mutex attribute object");
+		}
 
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize cond attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to initialize cond attribute object");
+		}
 
 		/* Set the attributes according to the scenar and the impl capabilities */
 		ret = pthread_mutexattr_settype(&ma, test_scenar[s].mutex_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex type");  }
-
-		if (pshared_ok > 0)
-		{
-			ret = pthread_mutexattr_setpshared(&ma, test_scenar[s].pshared);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set mutex process-shared");  }
-
-			ret = pthread_condattr_setpshared(&ca, test_scenar[s].pshared);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set cond process-shared");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to set mutex type");
 		}
 
-		#ifdef USE_ALTCLK
-		if (altclk_ok > 0)
-		{
-			ret = pthread_condattr_setclock(&ca, test_scenar[s].cid);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set clock for cond");  }
+		if (pshared_ok > 0) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 test_scenar[s].
+							 pshared);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set mutex process-shared");
+			}
+
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							test_scenar[s].pshared);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set cond process-shared");
+			}
 		}
-		#endif
+#ifdef USE_ALTCLK
+		if (altclk_ok > 0) {
+			ret =
+			    pthread_condattr_setclock(&ca, test_scenar[s].cid);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to set clock for cond");
+			}
+		}
+#endif
 
-		ts_cumul.tv_sec= 0;
-		ts_cumul.tv_nsec=0;
+		ts_cumul.tv_sec = 0;
+		ts_cumul.tv_nsec = 0;
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Starting case %s\n", test_scenar[s].desc);
-		#endif
+#endif
 
-		for (scal=0; scal <  5 * SCALABILITY_FACTOR; scal ++)
-		{
+		for (scal = 0; scal < 5 * SCALABILITY_FACTOR; scal++) {
 			/* Initialize the mutex, the cond, and other data */
 			ret = pthread_mutex_init(&mtx, &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex init failed");
+			}
 
 			ret = pthread_cond_init(&cnd, &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Cond init failed");
+			}
 
 			predicate = 0;
 			tnum = 0;
 
 			/* Create the waiter threads */
-			for (i=0; i< nthreads; i++)
-			{
-				ret = pthread_create(&th[i], &ta, waiter, (void *)&td);
-				if (ret != 0) /* We reached the limits */
-				{
-					#if VERBOSE > 1
-					output("Limit reached with %i threads\n", i);
-					#endif
-					#ifdef USE_CANCEL
-					for (j = i-1; j>=0; j--)
-					{
+			for (i = 0; i < nthreads; i++) {
+				ret =
+				    pthread_create(&th[i], &ta, waiter,
+						   (void *)&td);
+				if (ret != 0) {	/* We reached the limits */
+#if VERBOSE > 1
+					output
+					    ("Limit reached with %i threads\n",
+					     i);
+#endif
+#ifdef USE_CANCEL
+					for (j = i - 1; j >= 0; j--) {
 						ret = pthread_cancel(th[j]);
-						if (ret != 0)  {  UNRESOLVED(ret, "Unable to cancel a thread");  }
+						if (ret != 0) {
+							UNRESOLVED(ret,
+								   "Unable to cancel a thread");
+						}
 					}
-					#else
+#else
 					predicate = 1;
 					ret = pthread_cond_broadcast(&cnd);
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to broadcast the condition");  }
-					#endif
-					for (j = i-1; j>=0; j--)
-					{
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to broadcast the condition");
+					}
+#endif
+					for (j = i - 1; j >= 0; j--) {
 						ret = pthread_join(th[j], NULL);
-						if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a canceled thread");  }
+						if (ret != 0) {
+							UNRESOLVED(ret,
+								   "Unable to join a canceled thread");
+						}
 					}
 					free(th);
 					return -1;
 				}
 			}
 			/* All waiter threads are created now */
-			#if VERBOSE > 5
+#if VERBOSE > 5
 			output("%i waiter threads created successfully\n", i);
-			#endif
+#endif
 
 			ret = pthread_mutex_lock(&mtx);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to lock mutex");
+			}
 
 			/* Wait for all threads be waiting */
-			while (tnum < nthreads)
-			{
+			while (tnum < nthreads) {
 				ret = pthread_mutex_unlock(&mtx);
-				if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+				if (ret != 0) {
+					UNRESOLVED(ret, "Mutex unlock failed");
+				}
 
 				sched_yield();
 
 				ret = pthread_mutex_lock(&mtx);
-				if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+				if (ret != 0) {
+					UNRESOLVED(ret, "Mutex lock failed");
+				}
 			}
 
 			/* All threads are now waiting - we do the measure */
 
 			ret = pthread_mutex_unlock(&mtx);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
-
-			#if VERBOSE > 5
-			output("%i waiter threads are waiting; start measure\n", tnum);
-			#endif
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex unlock failed");
+			}
+#if VERBOSE > 5
+			output("%i waiter threads are waiting; start measure\n",
+			       tnum);
+#endif
 
 			do_measure(&mtx, &cnd, test_scenar[s].cid, &ts);
 
-			#if VERBOSE > 5
-			output("Measure for %s returned %d.%09d\n", test_scenar[s].desc, ts.tv_sec, ts.tv_nsec);
-			#endif
+#if VERBOSE > 5
+			output("Measure for %s returned %d.%09d\n",
+			       test_scenar[s].desc, ts.tv_sec, ts.tv_nsec);
+#endif
 
 			ts_cumul.tv_sec += ts.tv_sec;
 			ts_cumul.tv_nsec += ts.tv_nsec;
-			if (ts_cumul.tv_nsec >= 1000000000)
-			{
+			if (ts_cumul.tv_nsec >= 1000000000) {
 				ts_cumul.tv_nsec -= 1000000000;
 				ts_cumul.tv_sec += 1;
 			}
@@ -406,52 +490,65 @@
 			/* We can release the threads */
 			predicate = 1;
 			ret = pthread_cond_broadcast(&cnd);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to broadcast the condition");  }
-
-			#if VERBOSE > 5
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to broadcast the condition");
+			}
+#if VERBOSE > 5
 			output("Joining the waiters...\n");
-			#endif
+#endif
 
 			/* We will join every threads */
-			for (i=0; i<nthreads; i++)
-			{
+			for (i = 0; i < nthreads; i++) {
 				ret = pthread_join(th[i], NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
 
 			}
 
 			/* Destroy everything */
 			ret = pthread_mutex_destroy(&mtx);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to destroy mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to destroy mutex");
+			}
 
 			ret = pthread_cond_destroy(&cnd);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to destroy cond");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to destroy cond");
+			}
 		}
 
-		#ifdef PLOT_OUTPUT
+#ifdef PLOT_OUTPUT
 		output(" %d.%09d", ts_cumul.tv_sec, ts_cumul.tv_nsec);
-		#endif
+#endif
 
-		measure->_data[s] = ts_cumul.tv_sec * 1000000 + (ts_cumul.tv_nsec / 1000) ; /* We reduce precision */
+		measure->_data[s] = ts_cumul.tv_sec * 1000000 + (ts_cumul.tv_nsec / 1000);	/* We reduce precision */
 
 		/* Destroy the mutex attributes */
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to destroy mutex attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to destroy mutex attribute");
+		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to destroy cond attribute");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to destroy cond attribute");
+		}
 	}
 
 	/* Free the memory */
 	free(th);
 
-	#if VERBOSE > 2
-	output("%5d threads; %d.%09d s (%i loops)\n", nthreads, ts_cumul.tv_sec, ts_cumul.tv_nsec, scal);
-	#endif
+#if VERBOSE > 2
+	output("%5d threads; %d.%09d s (%i loops)\n", nthreads, ts_cumul.tv_sec,
+	       ts_cumul.tv_nsec, scal);
+#endif
 
-	#ifdef PLOT_OUTPUT
+#ifdef PLOT_OUTPUT
 	output("\n");
-	#endif
+#endif
 
 	return ts_cumul.tv_sec * 1000000000 + ts_cumul.tv_nsec;
 }
@@ -461,7 +558,7 @@
 
 /* Main
  */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret, nth;
 	long dur;
@@ -480,43 +577,50 @@
 	altclk_ok = sysconf(_SC_CLOCK_SELECTION);
 	if (altclk_ok > 0)
 		altclk_ok = sysconf(_SC_MONOTONIC_CLOCK);
-	#ifndef USE_ALTCLK
+#ifndef USE_ALTCLK
 	if (altclk_ok > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
-	#endif
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+#endif
 
 	pshared_ok = sysconf(_SC_THREAD_PROCESS_SHARED);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
-	output(" Process-shared primitive %s be tested\n", (pshared_ok>0)?"will":"won't");
-	output(" Alternative clock for cond %s be tested\n", (altclk_ok>0)?"will":"won't");
-	#endif
+	output(" Process-shared primitive %s be tested\n",
+	       (pshared_ok > 0) ? "will" : "won't");
+	output(" Alternative clock for cond %s be tested\n",
+	       (altclk_ok > 0) ? "will" : "won't");
+#endif
 
 	/* Prepare thread attribute */
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to initialize thread attributes");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize thread attributes");
+	}
 
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to set stack size to minimum value");  }
-
-	#ifdef PLOT_OUTPUT
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to set stack size to minimum value");
+	}
+#ifdef PLOT_OUTPUT
 	output("# COLUMNS %d #threads", NSCENAR + 1);
-	for (nth=0; nth<NSCENAR; nth++)
+	for (nth = 0; nth < NSCENAR; nth++)
 		output(" %s", test_scenar[nth].desc);
 	output("\n");
-	#endif
+#endif
 
 	/* Do the testing */
 	nth = 0;
-	do
-	{
+	do {
 		nth += 100 * SCALABILITY_FACTOR;
 
 		/* Create a new measure item */
 		m_tmp = (mes_t *) malloc(sizeof(mes_t));
-		if (m_tmp == NULL) { UNRESOLVED(errno, "Unable to alloc memory for measure saving");  }
+		if (m_tmp == NULL) {
+			UNRESOLVED(errno,
+				   "Unable to alloc memory for measure saving");
+		}
 		m_tmp->nthreads = nth;
 		m_tmp->next = NULL;
 
@@ -524,13 +628,10 @@
 		dur = do_threads_test(nth, m_tmp);
 
 		/* If test was success, add this measure to the list. Otherwise, free the mem */
-		if (dur >= 0)
-		{
+		if (dur >= 0) {
 			m_cur->next = m_tmp;
 			m_cur = m_tmp;
-		}
-		else
-		{
+		} else {
 			free(m_tmp);
 		}
 	}
@@ -542,21 +643,18 @@
 
 	/* Free the memory from the list */
 	m_cur = sentinel.next;
-	while (m_cur != NULL)
-	{
+	while (m_cur != NULL) {
 		m_tmp = m_cur;
 		m_cur = m_tmp->next;
 		free(m_tmp);
 	}
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		FAILED("This function is not scalable");
 	}
-
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("The function is scalable\n");
-	#endif
+#endif
 
 	PASSED;
 }
@@ -578,16 +676,15 @@
  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
  */
 
-struct row
-{
-	long X;  /* the X values -- copied from function argument */
-	long Y[NSCENAR];  /* the Y values -- copied from function argument */
-	long _x; /* Value X - Xavg */
-	long _y[NSCENAR]; /* Value Y - Yavg */
-	double LnX; /* Natural logarithm of X values */
-	double LnY[NSCENAR]; /* Natural logarithm of Y values */
-	double _lnx; /* Value LnX - LnXavg */
-	double _lny[NSCENAR]; /* Value LnY - LnYavg */
+struct row {
+	long X;			/* the X values -- copied from function argument */
+	long Y[NSCENAR];	/* the Y values -- copied from function argument */
+	long _x;		/* Value X - Xavg */
+	long _y[NSCENAR];	/* Value Y - Yavg */
+	double LnX;		/* Natural logarithm of X values */
+	double LnY[NSCENAR];	/* Natural logarithm of Y values */
+	double _lnx;		/* Value LnX - LnXavg */
+	double _lny[NSCENAR];	/* Value LnY - LnYavg */
 };
 
 int parse_measure(mes_t * measures)
@@ -607,52 +704,49 @@
 	long double _q[3][NSCENAR];
 	long double _d[3][NSCENAR];
 
-	long double t; /* temp value */
+	long double t;		/* temp value */
 
 	struct row *Table = NULL;
 
 	/* Initialize the datas */
 	Xavg = 0.0;
 	LnXavg = 0.0;
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		Yavg[i] = 0.0;
 		LnYavg[i] = 0.0;
 		r1[i] = 0.0;
 		r2[i] = 0.0;
 		r3[i] = 0.0;
 		r4[i] = 0.0;
-		_q[0][i]=0.0;
-		_q[1][i]=0.0;
-		_q[2][i]=0.0;
-		_d[0][i]=0.0;
-		_d[1][i]=0.0;
-		_d[2][i]=0.0;
+		_q[0][i] = 0.0;
+		_q[1][i] = 0.0;
+		_q[2][i] = 0.0;
+		_d[0][i] = 0.0;
+		_d[1][i] = 0.0;
+		_d[2][i] = 0.0;
 	}
-	N=0;
+	N = 0;
 	cur = measures;
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Data analysis starting\n");
-	#endif
+#endif
 
 	/* We start with reading the list to find:
 	 * -> number of elements, to assign an array
 	 * -> average values
 	 */
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
 		N++;
 
-		Xavg += (double) cur->nthreads;
-		LnXavg += log((double) cur->nthreads);
+		Xavg += (double)cur->nthreads;
+		LnXavg += log((double)cur->nthreads);
 
-		for (i=0; i<NSCENAR; i++)
-		{
-			Yavg[i] += (double) cur->_data[i];
-			LnYavg[i] += log((double) cur->_data[i]);
+		for (i = 0; i < NSCENAR; i++) {
+			Yavg[i] += (double)cur->_data[i];
+			LnYavg[i] += log((double)cur->_data[i]);
 		}
 	}
 
@@ -660,37 +754,36 @@
 	Xavg /= N;
 	LnXavg /= N;
 
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		Yavg[i] /= N;
 		LnYavg[i] /= N;
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output(" Found %d rows and %d columns\n", N, NSCENAR);
-	#endif
+#endif
 
 	/* We will now alloc the array ... */
 	Table = calloc(N, sizeof(struct row));
-	if (Table == NULL)  {  UNRESOLVED(errno, "Unable to alloc space for results parsing");  }
+	if (Table == NULL) {
+		UNRESOLVED(errno, "Unable to alloc space for results parsing");
+	}
 
 	/* ... and fill it */
 	N = 0;
 	cur = measures;
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
-		Table[N].X = (long) cur->nthreads;
-		Table[N]._x = Table[N].X - Xavg ;
-		Table[N].LnX = log((double) cur->nthreads);
+		Table[N].X = (long)cur->nthreads;
+		Table[N]._x = Table[N].X - Xavg;
+		Table[N].LnX = log((double)cur->nthreads);
 		Table[N]._lnx = Table[N].LnX - LnXavg;
-		for (i=0; i<NSCENAR; i++)
-		{
+		for (i = 0; i < NSCENAR; i++) {
 			Table[N].Y[i] = cur->_data[i];
-			Table[N]._y[i] = Table[N].Y[i] - Yavg[i] ;
-			Table[N].LnY[i] = log((double) cur->_data[i]);
+			Table[N]._y[i] = Table[N].Y[i] - Yavg[i];
+			Table[N].LnY[i] = log((double)cur->_data[i]);
 			Table[N]._lny[i] = Table[N].LnY[i] - LnYavg[i];
 		}
 
@@ -698,9 +791,9 @@
 	}
 
 	/* We won't need the list anymore -- we'll work with the array which should be faster. */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output(" Data was stored in an array.\n");
-	#endif
+#endif
 
 	/* We need to read the full array at least twice to compute all the error factors */
 
@@ -708,14 +801,14 @@
 	 * -> r1 for each scenar.
 	 * -> "a" factor for linear (0), power (1) and exponential (2) approximations -- with using the _d and _q vars.
 	 */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Starting first pass...\n");
-	#endif
-	for (r=0; r<N; r++)
-	{
-		for (i=0; i<NSCENAR; i++)
-		{
-			r1[i] += ((double)Table[r]._y[i] / N) * (double)Table[r]._y[i];
+#endif
+	for (r = 0; r < N; r++) {
+		for (i = 0; i < NSCENAR; i++) {
+			r1[i] +=
+			    ((double)Table[r]._y[i] / N) *
+			    (double)Table[r]._y[i];
 
 			_q[0][i] += Table[r]._y[i] * Table[r]._x;
 			_d[0][i] += Table[r]._x * Table[r]._x;
@@ -734,46 +827,45 @@
 	 * -> r2, r3, r4 for each scenar.
 	 */
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Starting second pass...\n");
-	#endif
-	for (r=0; r<N; r++)
-	{
-		for (i=0; i<NSCENAR; i++)
-		{
+#endif
+	for (r = 0; r < N; r++) {
+		for (i = 0; i < NSCENAR; i++) {
 			/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
-			t = (Table[r]._y[i] - ((_q[0][i] * Table[r]._x) / _d[0][i]));
-			r2[i] += t * t / N  ;
+			t = (Table[r]._y[i] -
+			     ((_q[0][i] * Table[r]._x) / _d[0][i]));
+			r2[i] += t * t / N;
 
 			/* r3 = avg((y - c.x^a) ²);
-			    t = y - c * x ^ a
-			      = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
-			*/
-			t = (   Table[r].Y[i]
-			      - (logl (LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg)
-			        * powl(Table[r].X,  (_q[1][i] / _d[1][i]))
-			    )   );
-			r3[i] += t * t / N  ;
+			   t = y - c * x ^ a
+			   = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
+			 */
+			t = (Table[r].Y[i]
+			     - (logl(LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg)
+				* powl(Table[r].X, (_q[1][i] / _d[1][i]))
+			     ));
+			r3[i] += t * t / N;
 
 			/* r4 = avg((y - exp(ax+b))²);
-			    t = y - exp(ax+b)
-			      = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
-			      = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
-			*/
-			t = (   Table[r].Y[i]
-			      - expl((_q[2][i] / _d[2][i]) * Table[r]._x + LnYavg[i]));
-			r4[i] += t * t / N  ;
+			   t = y - exp(ax+b)
+			   = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
+			   = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
+			 */
+			t = (Table[r].Y[i]
+			     - expl((_q[2][i] / _d[2][i]) * Table[r]._x +
+				    LnYavg[i]));
+			r4[i] += t * t / N;
 
 		}
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("All computing terminated.\n");
-	#endif
+#endif
 	ret = 0;
-	for (i=0; i<NSCENAR; i++)
-	{
-		#if VERBOSE > 1
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
 		output("\nScenario: %s\n", test_scenar[i].desc);
 
 		output("  Model: Y = k\n");
@@ -782,26 +874,30 @@
 
 		output("  Model: Y = a * X + b\n");
 		output("       a = %Lg\n", _q[0][i] / _d[0][i]);
-		output("       b = %Lg\n", Yavg[i] - ((_q[0][i] / _d[0][i]) * Xavg));
+		output("       b = %Lg\n",
+		       Yavg[i] - ((_q[0][i] / _d[0][i]) * Xavg));
 		output("    Divergence %g\n", r2[i]);
 
 		output("  Model: Y = c * X ^ a\n");
 		output("       a = %Lg\n", _q[1][i] / _d[1][i]);
-		output("       c = %Lg\n", logl (LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg));
+		output("       c = %Lg\n",
+		       logl(LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg));
 		output("    Divergence %g\n", r2[i]);
 
 		output("  Model: Y = exp(a * X + b)\n");
 		output("       a = %Lg\n", _q[2][i] / _d[2][i]);
-		output("       b = %Lg\n", LnYavg[i] - ((_q[2][i] / _d[2][i]) * Xavg));
+		output("       b = %Lg\n",
+		       LnYavg[i] - ((_q[2][i] / _d[2][i]) * Xavg));
 		output("    Divergence %g\n", r2[i]);
-		#endif
+#endif
 		/* Compare r1 to other values, with some ponderations */
-		if ((r1[i] > 1.1 * r2[i]) || (r1[i] > 1.2 * r3[i]) || (r1[i] > 1.3 * r4[i]))
+		if ((r1[i] > 1.1 * r2[i]) || (r1[i] > 1.2 * r3[i])
+		    || (r1[i] > 1.3 * r4[i]))
 			ret++;
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else
 			output(" Sanction: OK\n");
-		#endif
+#endif
 	}
 
 	/* We need to free the array */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress1.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress1.c
index f2b562a..cb195e0 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress1.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress1.c
@@ -51,34 +51,34 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -113,7 +113,7 @@
 #define TIMEOUT 120
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -129,63 +129,99 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 #define NTOT (NSCENAR * SCALABILITY_FACTOR * NCHILDREN)
 
-struct childdata
-{
+struct childdata {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 	clockid_t cid;
 	int fork;
-	int * pBool;
+	int *pBool;
 };
 
-typedef struct
-{
+typedef struct {
 	struct childdata cd[NTOT];
 	int boolean;
 } testdata_t;
@@ -195,39 +231,50 @@
 /***
  * The grand child function (either sub-thread or sub-process)
  */
-void * threaded_B (void * arg)
+void *threaded_B(void *arg)
 {
 	int ret;
 	struct timespec ts;
-	struct childdata * cd = (struct childdata *)arg;
+	struct childdata *cd = (struct childdata *)arg;
 
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Unable to lock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Unable to lock mutex");
+	}
 
-	while (*(cd->pBool) == 0)
-	{
+	while (*(cd->pBool) == 0) {
 		ret = pthread_cond_broadcast(&(cd->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Broadcast failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[gchild] Broadcast failed");
+		}
 
 		ret = clock_gettime(cd->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "[gchild] Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "[gchild] Unable to read clock");
+		}
 
 		ts.tv_sec += TIMEOUT;
 
 		ret = pthread_cond_timedwait(&(cd->cnd), &(cd->mtx), &ts);
-		if (ret == ETIMEDOUT)
-		{
-			FAILED("[gchild] Timeout occured. This means a cond signal was lost -- or parent died");
+		if (ret == ETIMEDOUT) {
+			FAILED
+			    ("[gchild] Timeout occured. This means a cond signal was lost -- or parent died");
 		}
-		if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to wait the cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[gchild] Failed to wait the cond");
+		}
 	}
 
 	/* We shall broadcast again to be sure the parent is not hung */
 	ret = pthread_cond_broadcast(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Broadcast failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Broadcast failed");
+	}
 
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");
+	}
 
 	return NULL;
 }
@@ -235,85 +282,94 @@
 /***
  * The child function (always in the main thread)
  */
-void * threaded_A (void * arg)
+void *threaded_A(void *arg)
 {
-	struct childdata * cd = (struct childdata *)arg;
+	struct childdata *cd = (struct childdata *)arg;
 	int ret, status;
-	pid_t     child_p=0, wrc;
+	pid_t child_p = 0, wrc;
 	pthread_t child_t;
 
 	struct timespec ts;
 
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[child] Unable to lock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[child] Unable to lock mutex");
+	}
 
 	/* Create the grand child */
-	if (cd->fork == 0)
-	{
+	if (cd->fork == 0) {
 		ret = pthread_create(&child_t, &ta, threaded_B, arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to create a grand child thread");  }
-	}
-	else
-	{
-		child_p= fork();
-		if (child_p == -1)  {  UNRESOLVED(ret, "[child] Failed to create a grand child proces");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[child] Failed to create a grand child thread");
+		}
+	} else {
+		child_p = fork();
+		if (child_p == -1) {
+			UNRESOLVED(ret,
+				   "[child] Failed to create a grand child proces");
+		}
 
-		if (child_p == 0) /* grand child */
-		{
+		if (child_p == 0) {	/* grand child */
 			threaded_B(arg);
 			exit(0);
 		}
 	}
 
-	while (*(cd->pBool) == 0)
-	{
+	while (*(cd->pBool) == 0) {
 		ret = clock_gettime(cd->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "[child] Unable to read clock");  }
+		if (ret != 0) {
+			UNRESOLVED(errno, "[child] Unable to read clock");
+		}
 
 		ts.tv_sec += TIMEOUT;
 
 		ret = pthread_cond_timedwait(&(cd->cnd), &(cd->mtx), &ts);
-		if (ret == ETIMEDOUT)
-		{
-			FAILED("[child] Timeout occured. This means a cond broadcast was lost -- or gchild died");
+		if (ret == ETIMEDOUT) {
+			FAILED
+			    ("[child] Timeout occured. This means a cond broadcast was lost -- or gchild died");
 		}
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to wait the cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[child] Failed to wait the cond");
+		}
 
 		ret = pthread_cond_signal(&(cd->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Signal failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[child] Signal failed");
+		}
 	}
 
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");
+	}
 
 	/* Wait for the grand child termination */
-	if (cd->fork == 0)
-	{
+	if (cd->fork == 0) {
 		ret = pthread_join(child_t, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to join a grand child thread");  }
-	}
-	else
-	{
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[child] Failed to join a grand child thread");
+		}
+	} else {
 		wrc = waitpid(child_p, &status, 0);
-		if (wrc != child_p)
-		{
-			output("Expected pid: %i. Got %i\n", (int)child_p, (int)wrc);
+		if (wrc != child_p) {
+			output("Expected pid: %i. Got %i\n", (int)child_p,
+			       (int)wrc);
 			UNRESOLVED(errno, "Waitpid failed");
 		}
 
-		if (WIFSIGNALED(status))
-		{
-			output("Child process killed with signal %d\n",WTERMSIG(status));
-			UNRESOLVED(0 , "Child process was killed");
+		if (WIFSIGNALED(status)) {
+			output("Child process killed with signal %d\n",
+			       WTERMSIG(status));
+			UNRESOLVED(0, "Child process was killed");
 		}
 
-		if (WIFEXITED(status))
-		{
+		if (WIFEXITED(status)) {
 			ret = WEXITSTATUS(status);
-		}
-		else
-		{
-			UNRESOLVED(0, "Child process was neither killed nor exited");
+		} else {
+			UNRESOLVED(0,
+				   "Child process was neither killed nor exited");
 		}
 	}
 
@@ -321,20 +377,20 @@
 	return NULL;
 }
 
-int * pBoolean = NULL;
+int *pBoolean = NULL;
 
 /***
  * Signal handler
  */
 void sighdl(int sig)
 {
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Received the USR1 signal; stopping everything\n");
-	#endif
+#endif
 	*pBoolean = 1;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	struct sigaction sa;
@@ -343,7 +399,7 @@
 	pthread_condattr_t ca;
 	clockid_t cid = CLOCK_REALTIME;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
@@ -356,9 +412,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -369,7 +425,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -377,225 +433,268 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_timedwait_st1-XXXXXX";
 		size_t sz, ps;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
-		sz= ((sizeof(testdata_t) / ps) + 1) * ps; /* # pages needed to store the testdata */
+		ps = (size_t) sysconf(_SC_PAGESIZE);
+		sz = ((sizeof(testdata_t) / ps) + 1) * ps;	/* # pages needed to store the testdata */
 
-		tmp = calloc(1 , sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		tmp = calloc(1, sz);
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
-		output("Testdata allocated in shared memory (%ib).\n", sizeof(testdata_t));
-		#endif
+#if VERBOSE > 1
+		output("Testdata allocated in shared memory (%ib).\n",
+		       sizeof(testdata_t));
+#endif
 	}
 
 	/* Init the signal handler variable */
 	pBoolean = &(td->boolean);
 
 	/* Init the structure */
-	for (i=0; i< NSCENAR ; i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#ifdef WITHOUT_XOPEN
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#ifdef WITHOUT_XOPEN
 		output("[parent] Mutex attributes DISABLED -> not used\n");
-		#endif
-		#endif
+#endif
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
+#endif
 		ret = pthread_condattr_getclock(&ca, &cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[i].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[i].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 		/* Initialize all the mutex and condvars which uses those attributes */
-		for (j=0; j < SCALABILITY_FACTOR * NCHILDREN; j++)
-		{
-			#define CD (td->cd[i+(j*NSCENAR)])
+		for (j = 0; j < SCALABILITY_FACTOR * NCHILDREN; j++) {
+#define CD (td->cd[i+(j*NSCENAR)])
 			CD.pBool = &(td->boolean);
 			CD.fork = do_fork;
 			CD.cid = cid;
 
 			/* initialize the condvar */
 			ret = pthread_cond_init(&(CD.cnd), &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Cond init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Cond init failed");
+			}
 
 			/* initialize the mutex */
 			ret = pthread_mutex_init(&(CD.mtx), &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
-			#undef CD
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Mutex init failed");
+			}
+#undef CD
 		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[parent] All condvars & mutex are ready\n");
-	#endif
+#endif
 
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to initialize a thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Failed to initialize a thread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to set thread stack size");  }
-
-	sigemptyset (&sa.sa_mask);
-	sa.sa_flags = 0;
-	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
-	output("[parent] Signal handler registered\n");
-	#endif
-
-	for (i=0; i<NTOT; i++)
-	{
-		ret = pthread_create(&th[i], &ta, threaded_A, &(td->cd[i]));
-		/* In case of failure we can exit; the child process will die after a while */
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to create a thread");  }
-
-		#if VERBOSE > 1
-		if ((i % 10) == 0)
-			output("[parent] %i threads created...\n", i+1);
-		#endif
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
 	}
 
-	#if VERBOSE > 1
-	output("[parent] All %i threads are running...\n", NTOT);
-	#endif
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sa.sa_handler = sighdl;
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
+	output("[parent] Signal handler registered\n");
+#endif
 
-	for (i=0; i<NTOT; i++)
-	{
+	for (i = 0; i < NTOT; i++) {
+		ret = pthread_create(&th[i], &ta, threaded_A, &(td->cd[i]));
+		/* In case of failure we can exit; the child process will die after a while */
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to create a thread");
+		}
+#if VERBOSE > 1
+		if ((i % 10) == 0)
+			output("[parent] %i threads created...\n", i + 1);
+#endif
+	}
+
+#if VERBOSE > 1
+	output("[parent] All %i threads are running...\n", NTOT);
+#endif
+
+	for (i = 0; i < NTOT; i++) {
 		ret = pthread_join(th[i], NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to join a thread");
+		}
 	}
 
 	/* Destroy everything */
-	for (i=0; i< NTOT ; i++)
-	{
+	for (i = 0; i < NTOT; i++) {
 		/* destroy the condvar */
 		ret = pthread_cond_destroy(&(td->cd[i].cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Cond destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Cond destroy failed");
+		}
 
 		/* destroy the mutex */
 		ret = pthread_mutex_init(&(td->cd[i].mtx), &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex destroy failed");
+		}
 	}
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress2.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress2.c
index 7cde51a..cb3f8d0 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress2.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress2.c
@@ -29,31 +29,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -88,7 +88,7 @@
 #define TIMEOUT  (60)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -104,53 +104,90 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* This is the shared structure for all threads related to the same condvar */
-struct celldata
-{
+struct celldata {
 	pthread_t workers[NCHILDREN * SCALABILITY_FACTOR + 2];
 	pthread_t signaler;
 
@@ -167,175 +204,207 @@
 	long cnttotal;
 } cells[NSCENAR * SCALABILITY_FACTOR];
 
-char do_it=1;
+char do_it = 1;
 pthread_attr_t ta;
 
-void cleanup(void * arg)
+void cleanup(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-if (ret != 0)  { UNRESOLVED(ret, "Failed to unlock mutex in cancel handler"); }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock mutex in cancel handler");
+	}
 
 }
 
-void * worker(void * arg)
+void *worker(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in worker");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in worker");
+	}
 
 	/* Tell the cellmaster we are ready (count++) */
 	cd->count += 1;
 
 	/* Timeout = now + TIMEOUT */
 	ret = clock_gettime(cd->cid, &ts);
-	if (ret != 0)  {  UNRESOLVED(errno, "Gettime failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Gettime failed");
+	}
 	ts.tv_sec += TIMEOUT * SCALABILITY_FACTOR;
 
 	/* register cleanup handler */
 	pthread_cleanup_push(cleanup, arg);
 
-	do
-	{
-		/* cond timedwait (while boolean == false)*/
+	do {
+		/* cond timedwait (while boolean == false) */
 		ret = pthread_cond_timedwait(&(cd->cnd), &(cd->mtx), &ts);
 
 		/* if timeout => failed (lost signal) */
-		if (ret == ETIMEDOUT)
-		{
-			FAILED("Timeout occured. A condition signal was probably lost.");
+		if (ret == ETIMEDOUT) {
+			FAILED
+			    ("Timeout occured. A condition signal was probably lost.");
 		}
 
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond timedwait failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond timedwait failed");
+		}
 
 	} while (cd->boolean == 0);
 
 	/* broadcast the condition */
 	ret = pthread_cond_broadcast(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Broadcasting the condition failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Broadcasting the condition failed");
+	}
 
 	/* unregister the cleanup */
 	pthread_cleanup_pop(0);
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock the mutex");
+	}
 
 	return NULL;
 }
 
-void * signaler(void * arg)
+void *signaler(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Lock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_lock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex lock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex lock failed in signaler");
+		}
 	}
 
 	/* wait the barrier */
 	ret = pthread_barrier_wait(&(cd->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Barrier wait failed");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Barrier wait failed");
+	}
 
 	/* signal the cond */
 	ret = pthread_cond_signal(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Signaling the cond failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Signaling the cond failed");
+	}
 
 	/* Unlock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_unlock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex unlock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex unlock failed in signaler");
+		}
 	}
 
 	return NULL;
 }
 
-void * cellmanager(void * arg)
+void *cellmanager(void *arg)
 {
 	int ret, i;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 	int randval;
-	void * w_ret;
+	void *w_ret;
 
 	cd->canceled = 0;
 	cd->cancelfailed = 0;
 	cd->cnttotal = 0;
 
 	/* while do_it */
-	while (do_it)
-	{
+	while (do_it) {
 		/* Initialize some stuff */
 		cd->boolean = 0;
 		cd->count = 0;
 		cd->cnttotal += 1;
 
 		/* create the workers */
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
-			ret = pthread_create(&(cd->workers[i]), &ta, worker, arg);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to create enough threads");  }
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
+			ret =
+			    pthread_create(&(cd->workers[i]), &ta, worker, arg);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to create enough threads");
+			}
 		}
 
 		/* choose a (pseudo) random thread to cancel */
 		ret = clock_gettime(cd->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Failed to read clock");  }
-		randval = (ts.tv_sec + (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
+		if (ret != 0) {
+			UNRESOLVED(errno, "Failed to read clock");
+		}
+		randval =
+		    (ts.tv_sec +
+		     (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* wait for the workers to be ready */
-		do
-		{
+		do {
 			ret = pthread_mutex_lock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex lock failed");
+			}
 
 			i = cd->count;
 
 			ret = pthread_mutex_unlock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex unlock failed");
+			}
 		} while (i < NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* Set the boolean (1 => no lock in signaler; -1 => lock) */
-		cd->boolean = (ts.tv_sec & 1)?-1:1;
+		cd->boolean = (ts.tv_sec & 1) ? -1 : 1;
 
 		/* create the signaler */
 		ret = pthread_create(&(cd->signaler), &ta, signaler, arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create signaler thread");
+		}
 
 		/* wait the barrier */
 		ret = pthread_barrier_wait(&(cd->bar));
-		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Failed to wait for the barrier");  }
+		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+			UNRESOLVED(ret, "Failed to wait for the barrier");
+		}
 
 		/* cancel the chosen thread */
 		ret = pthread_cancel(cd->workers[randval]);
 
-		 /* it is possible the thread is already terminated -- so we don't stop on error */
-		if (ret != 0)
-		{
-			#if VERBOSE > 2
+		/* it is possible the thread is already terminated -- so we don't stop on error */
+		if (ret != 0) {
+#if VERBOSE > 2
 			output("%d\n", randval);
-			#endif
-			cd->cancelfailed +=1;
+#endif
+			cd->cancelfailed += 1;
 		}
 
 		/* join every threads */
 		ret = pthread_join(cd->signaler, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the signaler thread");
+		}
 
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
 			ret = pthread_join(cd->workers[i], &w_ret);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a worker");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to join a worker");
+			}
 			if (w_ret == PTHREAD_CANCELED)
 				cd->canceled += 1;
 		}
@@ -347,11 +416,13 @@
 void sighdl(int sig)
 {
 	/* do_it = 0 */
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	struct sigaction sa;
@@ -374,7 +445,7 @@
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -382,167 +453,220 @@
 	output(" MON : %li\n", monotonic);
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	if (monotonic < 0)
 		cs = -1;
 
-	#ifndef USE_ALTCLK
+#ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
-	#endif
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+#endif
 
 	/* Initialize the celldatas according to scenarii */
-	for (i=0; i< NSCENAR ; i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#ifdef WITHOUT_XOPEN
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#ifdef WITHOUT_XOPEN
 		output("[parent] Mutex attributes DISABLED -> not used\n");
-		#endif
-		#endif
+#endif
+#endif
 
 		/* set / reset everything */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
+#endif
 		ret = pthread_condattr_getclock(&ca, &cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#endif
 
 		/* Initialize all the mutex and condvars which uses those attributes */
-		for (j=0; j < SCALABILITY_FACTOR; j++)
-		{
+		for (j = 0; j < SCALABILITY_FACTOR; j++) {
 			cells[i + j * NSCENAR].cid = cid;
 
 			/* initialize the condvar */
-			ret = pthread_cond_init(&(cells[i + j * NSCENAR].cnd), &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+			ret =
+			    pthread_cond_init(&(cells[i + j * NSCENAR].cnd),
+					      &ca);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Cond init failed");
+			}
 
 			/* initialize the mutex */
-			ret = pthread_mutex_init(&(cells[i + j * NSCENAR].mtx), &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+			ret =
+			    pthread_mutex_init(&(cells[i + j * NSCENAR].mtx),
+					       &ma);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex init failed");
+			}
 
 			/* initialize the barrier */
-			ret = pthread_barrier_init(&(cells[i + j * NSCENAR].bar), NULL, 2);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to init barrier");  }
+			ret =
+			    pthread_barrier_init(&(cells[i + j * NSCENAR].bar),
+						 NULL, 2);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to init barrier");
+			}
 		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[parent] All condvars & mutex are ready\n");
-	#endif
+#endif
 
 	/* register the signal handler */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
 	/* Initialize the thread attribute object */
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to initialize a thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Failed to initialize a thread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to set thread stack size");  }
-
-	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
-		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
-		/* In case of failure we can exit; the child process will die after a while */
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to create a thread");  }
-
-		#if VERBOSE > 1
-		if ((i % 4) == 0)
-			output("[parent] %i manager threads created...\n", i+1);
-		#endif
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
 	}
 
-	#if VERBOSE > 1
-	output("[parent] All %i manager threads are running...\n", NSCENAR * SCALABILITY_FACTOR);
-	#endif
+	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
+		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
+		/* In case of failure we can exit; the child process will die after a while */
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to create a thread");
+		}
+#if VERBOSE > 1
+		if ((i % 4) == 0)
+			output("[parent] %i manager threads created...\n",
+			       i + 1);
+#endif
+	}
+
+#if VERBOSE > 1
+	output("[parent] All %i manager threads are running...\n",
+	       NSCENAR * SCALABILITY_FACTOR);
+#endif
 
 	/* join the manager threads and destroy the cells */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
 		ret = pthread_join(mngrs[i], NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to join a thread");
+		}
 
 		canceled += cells[i].canceled;
 		cancelfailed += cells[i].cancelfailed;
 		cnttotal += cells[i].cnttotal;
 
 		ret = pthread_barrier_destroy(&(cells[i].bar));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a barrier");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a barrier");
+		}
 
 		ret = pthread_cond_destroy(&(cells[i].cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a cond");
+		}
 
 		ret = pthread_mutex_destroy(&(cells[i].mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a mutex");
+		}
 	}
 
 	/* exit */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
 	output("  Total loops          : %8li\n", cnttotal);
-	#endif
-	#if VERBOSE > 1
+#endif
+#if VERBOSE > 1
 	output("  Failed cancel request: %8li\n", cancelfailed);
 	output("  Canceled threads     : %8li\n", canceled);
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/testfrmw.c
index cd336d8..e8269be 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/testfrmw.c
@@ -39,15 +39,17 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
+
+void output(char *string, ...)
 {
-   va_list ap;
-   pthread_mutex_lock(&m_trace);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+	va_list ap;
+	pthread_mutex_lock(&m_trace);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress.c
index 7cde51a..cb3f8d0 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress.c
@@ -29,31 +29,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -88,7 +88,7 @@
 #define TIMEOUT  (60)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -104,53 +104,90 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* This is the shared structure for all threads related to the same condvar */
-struct celldata
-{
+struct celldata {
 	pthread_t workers[NCHILDREN * SCALABILITY_FACTOR + 2];
 	pthread_t signaler;
 
@@ -167,175 +204,207 @@
 	long cnttotal;
 } cells[NSCENAR * SCALABILITY_FACTOR];
 
-char do_it=1;
+char do_it = 1;
 pthread_attr_t ta;
 
-void cleanup(void * arg)
+void cleanup(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-if (ret != 0)  { UNRESOLVED(ret, "Failed to unlock mutex in cancel handler"); }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock mutex in cancel handler");
+	}
 
 }
 
-void * worker(void * arg)
+void *worker(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in worker");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in worker");
+	}
 
 	/* Tell the cellmaster we are ready (count++) */
 	cd->count += 1;
 
 	/* Timeout = now + TIMEOUT */
 	ret = clock_gettime(cd->cid, &ts);
-	if (ret != 0)  {  UNRESOLVED(errno, "Gettime failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Gettime failed");
+	}
 	ts.tv_sec += TIMEOUT * SCALABILITY_FACTOR;
 
 	/* register cleanup handler */
 	pthread_cleanup_push(cleanup, arg);
 
-	do
-	{
-		/* cond timedwait (while boolean == false)*/
+	do {
+		/* cond timedwait (while boolean == false) */
 		ret = pthread_cond_timedwait(&(cd->cnd), &(cd->mtx), &ts);
 
 		/* if timeout => failed (lost signal) */
-		if (ret == ETIMEDOUT)
-		{
-			FAILED("Timeout occured. A condition signal was probably lost.");
+		if (ret == ETIMEDOUT) {
+			FAILED
+			    ("Timeout occured. A condition signal was probably lost.");
 		}
 
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond timedwait failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond timedwait failed");
+		}
 
 	} while (cd->boolean == 0);
 
 	/* broadcast the condition */
 	ret = pthread_cond_broadcast(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Broadcasting the condition failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Broadcasting the condition failed");
+	}
 
 	/* unregister the cleanup */
 	pthread_cleanup_pop(0);
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock the mutex");
+	}
 
 	return NULL;
 }
 
-void * signaler(void * arg)
+void *signaler(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Lock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_lock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex lock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex lock failed in signaler");
+		}
 	}
 
 	/* wait the barrier */
 	ret = pthread_barrier_wait(&(cd->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Barrier wait failed");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Barrier wait failed");
+	}
 
 	/* signal the cond */
 	ret = pthread_cond_signal(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Signaling the cond failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Signaling the cond failed");
+	}
 
 	/* Unlock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_unlock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex unlock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex unlock failed in signaler");
+		}
 	}
 
 	return NULL;
 }
 
-void * cellmanager(void * arg)
+void *cellmanager(void *arg)
 {
 	int ret, i;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 	int randval;
-	void * w_ret;
+	void *w_ret;
 
 	cd->canceled = 0;
 	cd->cancelfailed = 0;
 	cd->cnttotal = 0;
 
 	/* while do_it */
-	while (do_it)
-	{
+	while (do_it) {
 		/* Initialize some stuff */
 		cd->boolean = 0;
 		cd->count = 0;
 		cd->cnttotal += 1;
 
 		/* create the workers */
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
-			ret = pthread_create(&(cd->workers[i]), &ta, worker, arg);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to create enough threads");  }
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
+			ret =
+			    pthread_create(&(cd->workers[i]), &ta, worker, arg);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to create enough threads");
+			}
 		}
 
 		/* choose a (pseudo) random thread to cancel */
 		ret = clock_gettime(cd->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Failed to read clock");  }
-		randval = (ts.tv_sec + (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
+		if (ret != 0) {
+			UNRESOLVED(errno, "Failed to read clock");
+		}
+		randval =
+		    (ts.tv_sec +
+		     (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* wait for the workers to be ready */
-		do
-		{
+		do {
 			ret = pthread_mutex_lock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex lock failed");
+			}
 
 			i = cd->count;
 
 			ret = pthread_mutex_unlock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex unlock failed");
+			}
 		} while (i < NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* Set the boolean (1 => no lock in signaler; -1 => lock) */
-		cd->boolean = (ts.tv_sec & 1)?-1:1;
+		cd->boolean = (ts.tv_sec & 1) ? -1 : 1;
 
 		/* create the signaler */
 		ret = pthread_create(&(cd->signaler), &ta, signaler, arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create signaler thread");
+		}
 
 		/* wait the barrier */
 		ret = pthread_barrier_wait(&(cd->bar));
-		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Failed to wait for the barrier");  }
+		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+			UNRESOLVED(ret, "Failed to wait for the barrier");
+		}
 
 		/* cancel the chosen thread */
 		ret = pthread_cancel(cd->workers[randval]);
 
-		 /* it is possible the thread is already terminated -- so we don't stop on error */
-		if (ret != 0)
-		{
-			#if VERBOSE > 2
+		/* it is possible the thread is already terminated -- so we don't stop on error */
+		if (ret != 0) {
+#if VERBOSE > 2
 			output("%d\n", randval);
-			#endif
-			cd->cancelfailed +=1;
+#endif
+			cd->cancelfailed += 1;
 		}
 
 		/* join every threads */
 		ret = pthread_join(cd->signaler, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the signaler thread");
+		}
 
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
 			ret = pthread_join(cd->workers[i], &w_ret);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a worker");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to join a worker");
+			}
 			if (w_ret == PTHREAD_CANCELED)
 				cd->canceled += 1;
 		}
@@ -347,11 +416,13 @@
 void sighdl(int sig)
 {
 	/* do_it = 0 */
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	struct sigaction sa;
@@ -374,7 +445,7 @@
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -382,167 +453,220 @@
 	output(" MON : %li\n", monotonic);
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	if (monotonic < 0)
 		cs = -1;
 
-	#ifndef USE_ALTCLK
+#ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
-	#endif
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+#endif
 
 	/* Initialize the celldatas according to scenarii */
-	for (i=0; i< NSCENAR ; i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#ifdef WITHOUT_XOPEN
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#ifdef WITHOUT_XOPEN
 		output("[parent] Mutex attributes DISABLED -> not used\n");
-		#endif
-		#endif
+#endif
+#endif
 
 		/* set / reset everything */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
+#endif
 		ret = pthread_condattr_getclock(&ca, &cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#endif
 
 		/* Initialize all the mutex and condvars which uses those attributes */
-		for (j=0; j < SCALABILITY_FACTOR; j++)
-		{
+		for (j = 0; j < SCALABILITY_FACTOR; j++) {
 			cells[i + j * NSCENAR].cid = cid;
 
 			/* initialize the condvar */
-			ret = pthread_cond_init(&(cells[i + j * NSCENAR].cnd), &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+			ret =
+			    pthread_cond_init(&(cells[i + j * NSCENAR].cnd),
+					      &ca);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Cond init failed");
+			}
 
 			/* initialize the mutex */
-			ret = pthread_mutex_init(&(cells[i + j * NSCENAR].mtx), &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+			ret =
+			    pthread_mutex_init(&(cells[i + j * NSCENAR].mtx),
+					       &ma);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex init failed");
+			}
 
 			/* initialize the barrier */
-			ret = pthread_barrier_init(&(cells[i + j * NSCENAR].bar), NULL, 2);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to init barrier");  }
+			ret =
+			    pthread_barrier_init(&(cells[i + j * NSCENAR].bar),
+						 NULL, 2);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to init barrier");
+			}
 		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[parent] All condvars & mutex are ready\n");
-	#endif
+#endif
 
 	/* register the signal handler */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
 	/* Initialize the thread attribute object */
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to initialize a thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Failed to initialize a thread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to set thread stack size");  }
-
-	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
-		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
-		/* In case of failure we can exit; the child process will die after a while */
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to create a thread");  }
-
-		#if VERBOSE > 1
-		if ((i % 4) == 0)
-			output("[parent] %i manager threads created...\n", i+1);
-		#endif
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
 	}
 
-	#if VERBOSE > 1
-	output("[parent] All %i manager threads are running...\n", NSCENAR * SCALABILITY_FACTOR);
-	#endif
+	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
+		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
+		/* In case of failure we can exit; the child process will die after a while */
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to create a thread");
+		}
+#if VERBOSE > 1
+		if ((i % 4) == 0)
+			output("[parent] %i manager threads created...\n",
+			       i + 1);
+#endif
+	}
+
+#if VERBOSE > 1
+	output("[parent] All %i manager threads are running...\n",
+	       NSCENAR * SCALABILITY_FACTOR);
+#endif
 
 	/* join the manager threads and destroy the cells */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
 		ret = pthread_join(mngrs[i], NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to join a thread");
+		}
 
 		canceled += cells[i].canceled;
 		cancelfailed += cells[i].cancelfailed;
 		cnttotal += cells[i].cnttotal;
 
 		ret = pthread_barrier_destroy(&(cells[i].bar));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a barrier");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a barrier");
+		}
 
 		ret = pthread_cond_destroy(&(cells[i].cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a cond");
+		}
 
 		ret = pthread_mutex_destroy(&(cells[i].mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a mutex");
+		}
 	}
 
 	/* exit */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
 	output("  Total loops          : %8li\n", cnttotal);
-	#endif
-	#if VERBOSE > 1
+#endif
+#if VERBOSE > 1
 	output("  Failed cancel request: %8li\n", cancelfailed);
 	output("  Canceled threads     : %8li\n", canceled);
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress1.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress1.c
index 9228e04..0991407 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress1.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress1.c
@@ -52,34 +52,34 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes
-   and the mkstemp() routine */
+    and the mkstemp() routine */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -114,7 +114,7 @@
 #define TIMEOUT 120
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -130,62 +130,98 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 #define NTOT (NSCENAR * SCALABILITY_FACTOR * NCHILDREN)
 
-struct childdata
-{
+struct childdata {
 	pthread_mutex_t mtx;
 	pthread_cond_t cnd;
 	int fork;
-	int * pBool;
+	int *pBool;
 };
 
-typedef struct
-{
+typedef struct {
 	struct childdata cd[NTOT];
 	int boolean;
 } testdata_t;
@@ -195,31 +231,40 @@
 /***
  * The grand child function (either sub-thread or sub-process)
  */
-void * threaded_B (void * arg)
+void *threaded_B(void *arg)
 {
 	int ret;
-	struct childdata * cd = (struct childdata *)arg;
+	struct childdata *cd = (struct childdata *)arg;
 
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Unable to lock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Unable to lock mutex");
+	}
 
-	while (*(cd->pBool) == 0)
-	{
+	while (*(cd->pBool) == 0) {
 		ret = pthread_cond_broadcast(&(cd->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Broadcast failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[gchild] Broadcast failed");
+		}
 
-		alarm(TIMEOUT); // even if we are a sub-process, the main process will timeout too
+		alarm(TIMEOUT);	// even if we are a sub-process, the main process will timeout too
 
 		ret = pthread_cond_wait(&(cd->cnd), &(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to wait the cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[gchild] Failed to wait the cond");
+		}
 	}
 
 	/* We shall broadcast again to be sure the parent is not hung */
 	ret = pthread_cond_broadcast(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Broadcast failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Broadcast failed");
+	}
 
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");
+	}
 
 	return NULL;
 }
@@ -227,76 +272,83 @@
 /***
  * The child function (always in the main process)
  */
-void * threaded_A (void * arg)
+void *threaded_A(void *arg)
 {
-	struct childdata * cd = (struct childdata *)arg;
+	struct childdata *cd = (struct childdata *)arg;
 	int ret, status;
-	pid_t     child_p=0, wrc;
+	pid_t child_p = 0, wrc;
 	pthread_t child_t;
 
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[child] Unable to lock mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[child] Unable to lock mutex");
+	}
 
 	/* Create the grand child */
-	if (cd->fork == 0)
-	{
+	if (cd->fork == 0) {
 		ret = pthread_create(&child_t, &ta, threaded_B, arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to create a grand child thread");  }
-	}
-	else
-	{
-		child_p= fork();
-		if (child_p == -1)  {  UNRESOLVED(ret, "[child] Failed to create a grand child proces");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[child] Failed to create a grand child thread");
+		}
+	} else {
+		child_p = fork();
+		if (child_p == -1) {
+			UNRESOLVED(ret,
+				   "[child] Failed to create a grand child proces");
+		}
 
-		if (child_p == 0) /* grand child */
-		{
+		if (child_p == 0) {	/* grand child */
 			threaded_B(arg);
 			exit(0);
 		}
 	}
 
-	while (*(cd->pBool) == 0)
-	{
+	while (*(cd->pBool) == 0) {
 		alarm(TIMEOUT);
 
 		ret = pthread_cond_wait(&(cd->cnd), &(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to wait the cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[child] Failed to wait the cond");
+		}
 
 		ret = pthread_cond_signal(&(cd->cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Signal failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[child] Signal failed");
+		}
 	}
 
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[gchild] Failed to finally release the mutex");
+	}
 
 	/* Wait for the grand child termination */
-	if (cd->fork == 0)
-	{
+	if (cd->fork == 0) {
 		ret = pthread_join(child_t, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[child] Failed to join a grand child thread");  }
-	}
-	else
-	{
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[child] Failed to join a grand child thread");
+		}
+	} else {
 		wrc = waitpid(child_p, &status, 0);
-		if (wrc != child_p)
-		{
-			output("Expected pid: %i. Got %i\n", (int)child_p, (int)wrc);
+		if (wrc != child_p) {
+			output("Expected pid: %i. Got %i\n", (int)child_p,
+			       (int)wrc);
 			UNRESOLVED(errno, "Waitpid failed");
 		}
 
-		if (WIFSIGNALED(status))
-		{
-			output("Child process killed with signal %d\n",WTERMSIG(status));
-			UNRESOLVED(0 , "Child process was killed");
+		if (WIFSIGNALED(status)) {
+			output("Child process killed with signal %d\n",
+			       WTERMSIG(status));
+			UNRESOLVED(0, "Child process was killed");
 		}
 
-		if (WIFEXITED(status))
-		{
+		if (WIFEXITED(status)) {
 			ret = WEXITSTATUS(status);
-		}
-		else
-		{
-			UNRESOLVED(0, "Child process was neither killed nor exited");
+		} else {
+			UNRESOLVED(0,
+				   "Child process was neither killed nor exited");
 		}
 	}
 
@@ -304,27 +356,26 @@
 	return NULL;
 }
 
-int * pBoolean = NULL;
+int *pBoolean = NULL;
 
 /***
  * Signal handler
  */
 void sighdl(int sig)
 {
-	if (sig == SIGUSR1)
-	{
-		#if VERBOSE > 1
+	if (sig == SIGUSR1) {
+#if VERBOSE > 1
 		output("Received the USR1 signal; stopping everything\n");
-		#endif
+#endif
 		*pBoolean = 1;
 	}
-	if (sig == SIGALRM)
-	{
-		FAILED("A wait operation timed out. A condition signaling was lost.");
+	if (sig == SIGALRM) {
+		FAILED
+		    ("A wait operation timed out. A condition signaling was lost.");
 	}
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	struct sigaction sa;
@@ -333,7 +384,7 @@
 	pthread_condattr_t ca;
 	clockid_t cid = CLOCK_REALTIME;
 
-	testdata_t * td;
+	testdata_t *td;
 	testdata_t alternativ;
 
 	int do_fork;
@@ -346,9 +397,9 @@
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
-	mf =sysconf(_SC_MAPPED_FILES);
+	mf = sysconf(_SC_MAPPED_FILES);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -359,7 +410,7 @@
 		output("Process-shared attributes won't be tested\n");
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	/* We are not interested in testing the clock if we have no other clock available.. */
 	if (monotonic < 0)
@@ -367,227 +418,271 @@
 
 #ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
 #endif
 
 /**********
  * Allocate space for the testdata structure
  */
-	if (mf < 0)
-	{
+	if (mf < 0) {
 		/* Cannot mmap a file, we use an alternative method */
 		td = &alternativ;
-		pshared = -1; /* We won't do this testing anyway */
-		#if VERBOSE > 0
+		pshared = -1;	/* We won't do this testing anyway */
+#if VERBOSE > 0
 		output("Testdata allocated in the process memory.\n");
-		#endif
-	}
-	else
-	{
+#endif
+	} else {
 		/* We will place the test data in a mmaped file */
 		char filename[] = "/tmp/cond_timedwait_st1-XXXXXX";
 		size_t sz, ps;
-		void * mmaped;
+		void *mmaped;
 		int fd;
-		char * tmp;
+		char *tmp;
 
 		/* We now create the temp files */
 		fd = mkstemp(filename);
-		if (fd == -1)
-		{ UNRESOLVED(errno, "Temporary file could not be created"); }
+		if (fd == -1) {
+			UNRESOLVED(errno,
+				   "Temporary file could not be created");
+		}
 
 		/* and make sure the file will be deleted when closed */
 		unlink(filename);
 
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		output("Temp file created (%s).\n", filename);
-		#endif
+#endif
 
-		ps = (size_t)sysconf(_SC_PAGESIZE);
-		sz= ((sizeof(testdata_t) / ps) + 1) * ps; /* # pages needed to store the testdata */
+		ps = (size_t) sysconf(_SC_PAGESIZE);
+		sz = ((sizeof(testdata_t) / ps) + 1) * ps;	/* # pages needed to store the testdata */
 
-		tmp = calloc(1 , sz);
-		if (tmp == NULL)
-		{ UNRESOLVED(errno, "Memory allocation failed"); }
+		tmp = calloc(1, sz);
+		if (tmp == NULL) {
+			UNRESOLVED(errno, "Memory allocation failed");
+		}
 
 		/* Write the data to the file.  */
-		if (write (fd, tmp, sz) != (ssize_t) sz)
-		{ UNRESOLVED(sz, "Writting to the file failed"); }
+		if (write(fd, tmp, sz) != (ssize_t) sz) {
+			UNRESOLVED(sz, "Writting to the file failed");
+		}
 
 		free(tmp);
 
 		/* Now we can map the file in memory */
-		mmaped = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-		if (mmaped == MAP_FAILED)
-		{ UNRESOLVED(errno, "mmap failed"); }
+		mmaped =
+		    mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+		if (mmaped == MAP_FAILED) {
+			UNRESOLVED(errno, "mmap failed");
+		}
 
 		td = (testdata_t *) mmaped;
 
 		/* Our datatest structure is now in shared memory */
-		#if VERBOSE > 1
-		output("Testdata allocated in shared memory (%ib).\n", sizeof(testdata_t));
-		#endif
+#if VERBOSE > 1
+		output("Testdata allocated in shared memory (%ib).\n",
+		       sizeof(testdata_t));
+#endif
 	}
 
 	/* Init the signal handler variable */
 	pBoolean = &(td->boolean);
 
 	/* Init the structure */
-	for (i=0; i< NSCENAR ; i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#ifdef WITHOUT_XOPEN
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#ifdef WITHOUT_XOPEN
 		output("[parent] Mutex attributes DISABLED -> not used\n");
-		#endif
-		#endif
+#endif
+#endif
 		/* set / reset everything */
-		do_fork=0;
+		do_fork = 0;
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
+#endif
 		ret = pthread_condattr_getclock(&ca, &cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#endif
 
 		/* Tell whether the test will be across processes */
-		if ((pshared > 0) && (scenarii[i].fork != 0))
-		{
+		if ((pshared > 0) && (scenarii[i].fork != 0)) {
 			do_fork = 1;
-			#if VERBOSE > 1
+#if VERBOSE > 1
 			output("[parent] Child will be a new process\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Child will be a new thread\n");
 		}
-		#endif
+#endif
 
 		/* Initialize all the mutex and condvars which uses those attributes */
-		for (j=0; j < SCALABILITY_FACTOR * NCHILDREN; j++)
-		{
-			#define CD (td->cd[i+(j*NSCENAR)])
+		for (j = 0; j < SCALABILITY_FACTOR * NCHILDREN; j++) {
+#define CD (td->cd[i+(j*NSCENAR)])
 			CD.pBool = &(td->boolean);
 			CD.fork = do_fork;
 			CD.cid = cid;
 
 			/* initialize the condvar */
 			ret = pthread_cond_init(&(CD.cnd), &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Cond init failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Cond init failed");
+			}
 
 			/* initialize the mutex */
 			ret = pthread_mutex_init(&(CD.mtx), &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
-			#undef CD
+			if (ret != 0) {
+				UNRESOLVED(ret, "[parent] Mutex init failed");
+			}
+#undef CD
 		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[parent] All condvars & mutex are ready\n");
-	#endif
+#endif
 
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to initialize a thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Failed to initialize a thread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to set thread stack size");  }
-
-	sigemptyset (&sa.sa_mask);
-	sa.sa_flags = 0;
-	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
-	output("[parent] Signal handler registered\n");
-	#endif
-
-	for (i=0; i<NTOT; i++)
-	{
-		ret = pthread_create(&th[i], &ta, threaded_A, &(td->cd[i]));
-		/* In case of failure we can exit; the child processes will die after a while */
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to create a thread");  }
-
-		#if VERBOSE > 1
-		if ((i % 10) == 0)
-			output("[parent] %i threads created...\n", i+1);
-		#endif
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
 	}
 
-	#if VERBOSE > 1
-	output("[parent] All %i threads are running...\n", NTOT);
-	#endif
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sa.sa_handler = sighdl;
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
+	output("[parent] Signal handler registered\n");
+#endif
 
-	for (i=0; i<NTOT; i++)
-	{
+	for (i = 0; i < NTOT; i++) {
+		ret = pthread_create(&th[i], &ta, threaded_A, &(td->cd[i]));
+		/* In case of failure we can exit; the child processes will die after a while */
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to create a thread");
+		}
+#if VERBOSE > 1
+		if ((i % 10) == 0)
+			output("[parent] %i threads created...\n", i + 1);
+#endif
+	}
+
+#if VERBOSE > 1
+	output("[parent] All %i threads are running...\n", NTOT);
+#endif
+
+	for (i = 0; i < NTOT; i++) {
 		ret = pthread_join(th[i], NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to join a thread");
+		}
 	}
 
 	/* Destroy everything */
-	for (i=0; i< NTOT ; i++)
-	{
+	for (i = 0; i < NTOT; i++) {
 		/* destroy the condvar */
 		ret = pthread_cond_destroy(&(td->cd[i].cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Cond destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Cond destroy failed");
+		}
 
 		/* destroy the mutex */
 		ret = pthread_mutex_init(&(td->cd[i].mtx), &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex destroy failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex destroy failed");
+		}
 	}
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress2.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress2.c
index 7cde51a..cb3f8d0 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress2.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress2.c
@@ -29,31 +29,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -88,7 +88,7 @@
 #define TIMEOUT  (60)
 
 #ifndef WITHOUT_ALTCLK
-#define USE_ALTCLK  /* make tests with MONOTONIC CLOCK if supported */
+#define USE_ALTCLK		/* make tests with MONOTONIC CLOCK if supported */
 #endif
 
 /********************************************************************************************/
@@ -104,53 +104,90 @@
 
 #endif
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int mc_pshared; /* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
-	int c_clock; /* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
-	int fork; /* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, 0, 0, "Default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 0, 0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 0, 0, "Recursive mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int mc_pshared;		/* 0: mutex and cond are process-private (default) ~ !0: Both are process-shared, if supported */
+	int c_clock;		/* 0: cond uses the default clock. ~ !0: Cond uses monotonic clock, if supported. */
+	int fork;		/* 0: Test between threads. ~ !0: Test across processes, if supported (mmap) */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, 0, 0, "Default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 0, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 0, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 0, 0, "Recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 0, "PShared default mutex"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 0, "Pshared normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 0, "Pshared recursive mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 0, "PShared default mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 0, "Pshared normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 0, "Pshared errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 0, "Pshared recursive mutex"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 0, 1, "Pshared default mutex across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 0, 1, "Pshared normal mutex across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1, "Pshared errorcheck mutex across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 0, 1, "Pshared recursive mutex across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 0, 1,
+		    "Pshared default mutex across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 0, 1,
+		    "Pshared normal mutex across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 0, 1,
+		    "Pshared errorcheck mutex across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 0, 1,
+		    "Pshared recursive mutex across processes"}
 
 #ifdef USE_ALTCLK
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 1, "Pshared default mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 1, "Pshared normal mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1, "Pshared errorcheck mutex and alt clock condvar across processes"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 1, "Pshared recursive mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 1,
+		    "Pshared default mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 1,
+		    "Pshared normal mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 1,
+		    "Pshared errorcheck mutex and alt clock condvar across processes"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 1,
+		    "Pshared recursive mutex and alt clock condvar across processes"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    0, 1, 0, "Default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     0, 1, 0, "Normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0, "Errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, 1, 0, "Recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 0, 1, 0,
+		    "Default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, 1, 0,
+		    "Normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, 1, 0,
+		    "Errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, 1, 0,
+		    "Recursive mutex and alt clock condvar"}
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, 1, 0, "PShared default mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_NORMAL,     1, 1, 0, "Pshared normal mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0, "Pshared errorcheck mutex and alt clock condvar"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, 1, 0, "Pshared recursive mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, 1, 0,
+		    "PShared default mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, 1, 0,
+		    "Pshared normal mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, 1, 0,
+		    "Pshared errorcheck mutex and alt clock condvar"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, 1, 0,
+		    "Pshared recursive mutex and alt clock condvar"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
 /* This is the shared structure for all threads related to the same condvar */
-struct celldata
-{
+struct celldata {
 	pthread_t workers[NCHILDREN * SCALABILITY_FACTOR + 2];
 	pthread_t signaler;
 
@@ -167,175 +204,207 @@
 	long cnttotal;
 } cells[NSCENAR * SCALABILITY_FACTOR];
 
-char do_it=1;
+char do_it = 1;
 pthread_attr_t ta;
 
-void cleanup(void * arg)
+void cleanup(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-if (ret != 0)  { UNRESOLVED(ret, "Failed to unlock mutex in cancel handler"); }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock mutex in cancel handler");
+	}
 
 }
 
-void * worker(void * arg)
+void *worker(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 
 	/* lock the mutex */
 	ret = pthread_mutex_lock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to lock mutex in worker");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock mutex in worker");
+	}
 
 	/* Tell the cellmaster we are ready (count++) */
 	cd->count += 1;
 
 	/* Timeout = now + TIMEOUT */
 	ret = clock_gettime(cd->cid, &ts);
-	if (ret != 0)  {  UNRESOLVED(errno, "Gettime failed");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Gettime failed");
+	}
 	ts.tv_sec += TIMEOUT * SCALABILITY_FACTOR;
 
 	/* register cleanup handler */
 	pthread_cleanup_push(cleanup, arg);
 
-	do
-	{
-		/* cond timedwait (while boolean == false)*/
+	do {
+		/* cond timedwait (while boolean == false) */
 		ret = pthread_cond_timedwait(&(cd->cnd), &(cd->mtx), &ts);
 
 		/* if timeout => failed (lost signal) */
-		if (ret == ETIMEDOUT)
-		{
-			FAILED("Timeout occured. A condition signal was probably lost.");
+		if (ret == ETIMEDOUT) {
+			FAILED
+			    ("Timeout occured. A condition signal was probably lost.");
 		}
 
-		if (ret != 0)  {  UNRESOLVED(ret, "Cond timedwait failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Cond timedwait failed");
+		}
 
 	} while (cd->boolean == 0);
 
 	/* broadcast the condition */
 	ret = pthread_cond_broadcast(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Broadcasting the condition failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Broadcasting the condition failed");
+	}
 
 	/* unregister the cleanup */
 	pthread_cleanup_pop(0);
 
 	/* unlock the mutex */
 	ret = pthread_mutex_unlock(&(cd->mtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Unable to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock the mutex");
+	}
 
 	return NULL;
 }
 
-void * signaler(void * arg)
+void *signaler(void *arg)
 {
 	int ret;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 
 	/* Lock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_lock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex lock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex lock failed in signaler");
+		}
 	}
 
 	/* wait the barrier */
 	ret = pthread_barrier_wait(&(cd->bar));
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Barrier wait failed");  }
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+		UNRESOLVED(ret, "Barrier wait failed");
+	}
 
 	/* signal the cond */
 	ret = pthread_cond_signal(&(cd->cnd));
-	if (ret != 0)  {  UNRESOLVED(ret, "Signaling the cond failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Signaling the cond failed");
+	}
 
 	/* Unlock the mutex if required */
-	if (cd->boolean == -1)
-	{
+	if (cd->boolean == -1) {
 		ret = pthread_mutex_unlock(&(cd->mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "mutex unlock failed in signaler");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "mutex unlock failed in signaler");
+		}
 	}
 
 	return NULL;
 }
 
-void * cellmanager(void * arg)
+void *cellmanager(void *arg)
 {
 	int ret, i;
-	struct celldata * cd = (struct celldata *) arg;
+	struct celldata *cd = (struct celldata *)arg;
 	struct timespec ts;
 	int randval;
-	void * w_ret;
+	void *w_ret;
 
 	cd->canceled = 0;
 	cd->cancelfailed = 0;
 	cd->cnttotal = 0;
 
 	/* while do_it */
-	while (do_it)
-	{
+	while (do_it) {
 		/* Initialize some stuff */
 		cd->boolean = 0;
 		cd->count = 0;
 		cd->cnttotal += 1;
 
 		/* create the workers */
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
-			ret = pthread_create(&(cd->workers[i]), &ta, worker, arg);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to create enough threads");  }
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
+			ret =
+			    pthread_create(&(cd->workers[i]), &ta, worker, arg);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to create enough threads");
+			}
 		}
 
 		/* choose a (pseudo) random thread to cancel */
 		ret = clock_gettime(cd->cid, &ts);
-		if (ret != 0)  {  UNRESOLVED(errno, "Failed to read clock");  }
-		randval = (ts.tv_sec + (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
+		if (ret != 0) {
+			UNRESOLVED(errno, "Failed to read clock");
+		}
+		randval =
+		    (ts.tv_sec +
+		     (ts.tv_nsec >> 10)) % (NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* wait for the workers to be ready */
-		do
-		{
+		do {
 			ret = pthread_mutex_lock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex lock failed");
+			}
 
 			i = cd->count;
 
 			ret = pthread_mutex_unlock(&(cd->mtx));
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex unlock failed");
+			}
 		} while (i < NCHILDREN * SCALABILITY_FACTOR + 2);
 
 		/* Set the boolean (1 => no lock in signaler; -1 => lock) */
-		cd->boolean = (ts.tv_sec & 1)?-1:1;
+		cd->boolean = (ts.tv_sec & 1) ? -1 : 1;
 
 		/* create the signaler */
 		ret = pthread_create(&(cd->signaler), &ta, signaler, arg);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to create signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to create signaler thread");
+		}
 
 		/* wait the barrier */
 		ret = pthread_barrier_wait(&(cd->bar));
-		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Failed to wait for the barrier");  }
+		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+			UNRESOLVED(ret, "Failed to wait for the barrier");
+		}
 
 		/* cancel the chosen thread */
 		ret = pthread_cancel(cd->workers[randval]);
 
-		 /* it is possible the thread is already terminated -- so we don't stop on error */
-		if (ret != 0)
-		{
-			#if VERBOSE > 2
+		/* it is possible the thread is already terminated -- so we don't stop on error */
+		if (ret != 0) {
+#if VERBOSE > 2
 			output("%d\n", randval);
-			#endif
-			cd->cancelfailed +=1;
+#endif
+			cd->cancelfailed += 1;
 		}
 
 		/* join every threads */
 		ret = pthread_join(cd->signaler, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join the signaler thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join the signaler thread");
+		}
 
-		for (i=0; i< NCHILDREN * SCALABILITY_FACTOR + 2; i++)
-		{
+		for (i = 0; i < NCHILDREN * SCALABILITY_FACTOR + 2; i++) {
 			ret = pthread_join(cd->workers[i], &w_ret);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a worker");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to join a worker");
+			}
 			if (w_ret == PTHREAD_CANCELED)
 				cd->canceled += 1;
 		}
@@ -347,11 +416,13 @@
 void sighdl(int sig)
 {
 	/* do_it = 0 */
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i, j;
 	struct sigaction sa;
@@ -374,7 +445,7 @@
 	cs = sysconf(_SC_CLOCK_SELECTION);
 	monotonic = sysconf(_SC_MONOTONIC_CLOCK);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test starting\n");
 	output("System abilities:\n");
 	output(" TPS : %li\n", pshared);
@@ -382,167 +453,220 @@
 	output(" MON : %li\n", monotonic);
 	if ((cs < 0) || (monotonic < 0))
 		output("Alternative clock won't be tested\n");
-	#endif
+#endif
 
 	if (monotonic < 0)
 		cs = -1;
 
-	#ifndef USE_ALTCLK
+#ifndef USE_ALTCLK
 	if (cs > 0)
-		output("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
-	#endif
+		output
+		    ("Implementation supports the MONOTONIC CLOCK but option is disabled in test.\n");
+#endif
 
 	/* Initialize the celldatas according to scenarii */
-	for (i=0; i< NSCENAR ; i++)
-	{
-		#if VERBOSE > 1
-		output("[parent] Preparing attributes for: %s\n", scenarii[i].descr);
-		#ifdef WITHOUT_XOPEN
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
+		output("[parent] Preparing attributes for: %s\n",
+		       scenarii[i].descr);
+#ifdef WITHOUT_XOPEN
 		output("[parent] Mutex attributes DISABLED -> not used\n");
-		#endif
-		#endif
+#endif
+#endif
 
 		/* set / reset everything */
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
 		ret = pthread_condattr_init(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the cond attribute object");  }
-
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the cond attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#if VERBOSE > 1
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#if VERBOSE > 1
 		output("[parent] Mutex type : %i\n", scenarii[i].m_type);
-		#endif
-		#endif
+#endif
+#endif
 
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].mc_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
-			ret = pthread_condattr_setpshared(&ca, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the cond var process-shared");  }
-			#if VERBOSE > 1
+		if ((pshared > 0) && (scenarii[i].mc_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
+			ret =
+			    pthread_condattr_setpshared(&ca,
+							PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the cond var process-shared");
+			}
+#if VERBOSE > 1
 			output("[parent] Mutex & cond are process-shared\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Mutex & cond are process-private\n");
 		}
-		#endif
+#endif
 
 		/* Set the alternative clock, if supported */
-		#ifdef USE_ALTCLK
-		if ((cs > 0) && (scenarii[i].c_clock != 0))
-		{
+#ifdef USE_ALTCLK
+		if ((cs > 0) && (scenarii[i].c_clock != 0)) {
 			ret = pthread_condattr_setclock(&ca, CLOCK_MONOTONIC);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the monotonic clock for the cond");  }
-			#if VERBOSE > 1
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the monotonic clock for the cond");
+			}
+#if VERBOSE > 1
 			output("[parent] Cond uses the Monotonic clock\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 1
+#if VERBOSE > 1
 		else {
 			output("[parent] Cond uses the default clock\n");
 		}
-		#endif
+#endif
 		ret = pthread_condattr_getclock(&ca, &cid);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to get clock from cond attr");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to get clock from cond attr");
+		}
+#endif
 
 		/* Initialize all the mutex and condvars which uses those attributes */
-		for (j=0; j < SCALABILITY_FACTOR; j++)
-		{
+		for (j = 0; j < SCALABILITY_FACTOR; j++) {
 			cells[i + j * NSCENAR].cid = cid;
 
 			/* initialize the condvar */
-			ret = pthread_cond_init(&(cells[i + j * NSCENAR].cnd), &ca);
-			if (ret != 0)  {  UNRESOLVED(ret, "Cond init failed");  }
+			ret =
+			    pthread_cond_init(&(cells[i + j * NSCENAR].cnd),
+					      &ca);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Cond init failed");
+			}
 
 			/* initialize the mutex */
-			ret = pthread_mutex_init(&(cells[i + j * NSCENAR].mtx), &ma);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex init failed");  }
+			ret =
+			    pthread_mutex_init(&(cells[i + j * NSCENAR].mtx),
+					       &ma);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex init failed");
+			}
 
 			/* initialize the barrier */
-			ret = pthread_barrier_init(&(cells[i + j * NSCENAR].bar), NULL, 2);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to init barrier");  }
+			ret =
+			    pthread_barrier_init(&(cells[i + j * NSCENAR].bar),
+						 NULL, 2);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to init barrier");
+			}
 		}
 
 		ret = pthread_condattr_destroy(&ca);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the cond var attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the cond var attribute object");
+		}
 
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutex attribute object");
+		}
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("[parent] All condvars & mutex are ready\n");
-	#endif
+#endif
 
 	/* register the signal handler */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
 	/* Initialize the thread attribute object */
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to initialize a thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Failed to initialize a thread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Failed to set thread stack size");  }
-
-	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
-		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
-		/* In case of failure we can exit; the child process will die after a while */
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to create a thread");  }
-
-		#if VERBOSE > 1
-		if ((i % 4) == 0)
-			output("[parent] %i manager threads created...\n", i+1);
-		#endif
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Failed to set thread stack size");
 	}
 
-	#if VERBOSE > 1
-	output("[parent] All %i manager threads are running...\n", NSCENAR * SCALABILITY_FACTOR);
-	#endif
+	/* create the NSCENAR * SCALABILITY_FACTOR manager threads */
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
+		ret = pthread_create(&mngrs[i], &ta, cellmanager, &(cells[i]));
+		/* In case of failure we can exit; the child process will die after a while */
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to create a thread");
+		}
+#if VERBOSE > 1
+		if ((i % 4) == 0)
+			output("[parent] %i manager threads created...\n",
+			       i + 1);
+#endif
+	}
+
+#if VERBOSE > 1
+	output("[parent] All %i manager threads are running...\n",
+	       NSCENAR * SCALABILITY_FACTOR);
+#endif
 
 	/* join the manager threads and destroy the cells */
-	for (i=0; i<NSCENAR * SCALABILITY_FACTOR; i++)
-	{
+	for (i = 0; i < NSCENAR * SCALABILITY_FACTOR; i++) {
 		ret = pthread_join(mngrs[i], NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "[Parent] Failed to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[Parent] Failed to join a thread");
+		}
 
 		canceled += cells[i].canceled;
 		cancelfailed += cells[i].cancelfailed;
 		cnttotal += cells[i].cnttotal;
 
 		ret = pthread_barrier_destroy(&(cells[i].bar));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a barrier");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a barrier");
+		}
 
 		ret = pthread_cond_destroy(&(cells[i].cnd));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a cond");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a cond");
+		}
 
 		ret = pthread_mutex_destroy(&(cells[i].mtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a mutex");
+		}
 	}
 
 	/* exit */
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Test passed\n");
 	output("  Total loops          : %8li\n", cnttotal);
-	#endif
-	#if VERBOSE > 1
+#endif
+#if VERBOSE > 1
 	output("  Failed cancel request: %8li\n", cancelfailed);
 	output("  Canceled threads     : %8li\n", canceled);
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_create/s-c1.c b/testcases/open_posix_testsuite/stress/threads/pthread_create/s-c1.c
index 3d576e4..3715365 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_create/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_create/s-c1.c
@@ -26,34 +26,34 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <sched.h>
- #include <semaphore.h>
- #include <errno.h>
- #include <assert.h>
- #include <sys/wait.h>
- #include <math.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/wait.h>
+#include <math.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -107,40 +107,47 @@
 /********************************************************************************************/
 
 /* The next structure is used to save the tests measures */
-typedef struct __mes_t
-{
-	int  nthreads;
-	long _data[ NSCENAR ]; /* As we store µsec values, a long type should be amply enough. */
+typedef struct __mes_t {
+	int nthreads;
+	long _data[NSCENAR];	/* As we store µsec values, a long type should be amply enough. */
 	struct __mes_t *next;
 } mes_t;
 
 /* Forward declaration */
 int parse_measure(mes_t * measures);
 
-pthread_mutex_t m_synchro=PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t m_synchro = PTHREAD_MUTEX_INITIALIZER;
 
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 
 	/* Signal we're done */
-	do { ret = sem_post(&scenarii[sc].sem); }
+	do {
+		ret = sem_post(&scenarii[sc].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 
 	/* Wait for all threads being created */
 	ret = pthread_mutex_lock(&m_synchro);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex lock failed");
+	}
 	(*(int *)arg) += 1;
 	ret = pthread_mutex_unlock(&m_synchro);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex unlock failed");
+	}
 
 	return arg;
 }
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 	pthread_t *th;
 
@@ -152,7 +159,7 @@
 	mes_t *m_cur, *m_tmp;
 
 	long PTHREAD_THREADS_MAX = sysconf(_SC_THREAD_THREADS_MAX);
-	long my_max = 1000 * SCALABILITY_FACTOR ;
+	long my_max = 1000 * SCALABILITY_FACTOR;
 
 	/* Initialize the measure list */
 	m_cur = &sentinel;
@@ -164,168 +171,233 @@
 	if (PTHREAD_THREADS_MAX > 0)
 		my_max = PTHREAD_THREADS_MAX;
 
-	th = (pthread_t *)calloc(1 + my_max, sizeof(pthread_t));
-	if (th == NULL)  {  UNRESOLVED(errno, "Not enough memory for thread storage");  }
+	th = (pthread_t *) calloc(1 + my_max, sizeof(pthread_t));
+	if (th == NULL) {
+		UNRESOLVED(errno, "Not enough memory for thread storage");
+	}
 
 	/* Initialize thread attribute objects */
 	scenar_init();
 
-	#ifdef PLOT_OUTPUT
+#ifdef PLOT_OUTPUT
 	printf("# COLUMNS %d #threads", NSCENAR + 1);
-	for (sc=0; sc<NSCENAR; sc++)
+	for (sc = 0; sc < NSCENAR; sc++)
 		printf(" %i", sc);
 	printf("\n");
-	#endif
+#endif
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		if (scenarii[sc].bottom == NULL) /* skip the alternate stacks as we could create only 1 */
-		{
-			#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+		if (scenarii[sc].bottom == NULL) {	/* skip the alternate stacks as we could create only 1 */
+#if VERBOSE > 0
 			output("-----\n");
-			output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-			#endif
+			output("Starting test with scenario (%i): %s\n", sc,
+			       scenarii[sc].descr);
+#endif
 
 			/* Block every (about to be) created threads */
 			ret = pthread_mutex_lock(&m_synchro);
-			if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Mutex lock failed");
+			}
 
-			ctl=0;
-			nthreads=0;
+			ctl = 0;
+			nthreads = 0;
 			m_cur = &sentinel;
 
 			/* Create 1 thread for testing purpose */
-			ret = pthread_create(&child, &scenarii[sc].ta, threaded, &ctl);
-			switch (scenarii[sc].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			ret =
+			    pthread_create(&child, &scenarii[sc].ta, threaded,
+					   &ctl);
+			switch (scenarii[sc].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (ret == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					#if VERBOSE > 0
-					if (ret == 0)
-						{ output("Thread has been created successfully for this scenario\n"); }
-					else
-						{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-					#endif
-					;
+			case 2:	/* We did not know the expected result */
+			default:
+#if VERBOSE > 0
+				if (ret == 0) {
+					output
+					    ("Thread has been created successfully for this scenario\n");
+				} else {
+					output
+					    ("Thread creation failed with the error: %s\n",
+					     strerror(ret));
+				}
+#endif
+				;
 			}
-			if (ret == 0) /* The new thread is running */
-			{
+			if (ret == 0) {	/* The new thread is running */
 
-				while (1) /* we will break */
-				{
+				while (1) {	/* we will break */
 					/* read clock */
-					ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
-					if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+					ret =
+					    clock_gettime(CLOCK_REALTIME,
+							  &ts_ref);
+					if (ret != 0) {
+						UNRESOLVED(errno,
+							   "Unable to read clock");
+					}
 
 					/* create a new thread */
-					ret = pthread_create(&th[nthreads], &scenarii[sc].ta, threaded, &ctl);
+					ret =
+					    pthread_create(&th[nthreads],
+							   &scenarii[sc].ta,
+							   threaded, &ctl);
 
 					/* stop here if we've got EAGAIN */
 					if (ret == EAGAIN)
 						break;
 
 // temporary hack
-if (ret == ENOMEM)  break;
+					if (ret == ENOMEM)
+						break;
 					nthreads++;
 
 					/* FAILED if error is != EAGAIN or nthreads > PTHREAD_THREADS_MAX */
-					if (ret != 0)
-					{
-						output("pthread_create returned: %i (%s)\n", ret, strerror(ret));
-						FAILED("pthread_create did not return EAGAIN on a lack of resource");
+					if (ret != 0) {
+						output
+						    ("pthread_create returned: %i (%s)\n",
+						     ret, strerror(ret));
+						FAILED
+						    ("pthread_create did not return EAGAIN on a lack of resource");
 					}
-					if (nthreads > my_max)
-					{
-						if (PTHREAD_THREADS_MAX > 0)
-						{
-							FAILED("We were able to create more than PTHREAD_THREADS_MAX threads");
-						}
-						else
-						{
+					if (nthreads > my_max) {
+						if (PTHREAD_THREADS_MAX > 0) {
+							FAILED
+							    ("We were able to create more than PTHREAD_THREADS_MAX threads");
+						} else {
 							break;
 						}
 					}
 
 					/* wait for the semaphore */
-					do { ret = sem_wait(&scenarii[sc].sem); }
+					do {
+						ret =
+						    sem_wait(&scenarii[sc].sem);
+					}
 					while ((ret == -1) && (errno == EINTR));
-					if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+					if (ret == -1) {
+						UNRESOLVED(errno,
+							   "Failed to wait for the semaphore");
+					}
 
 					/* read clock */
-					ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
-					if (ret != 0)  {  UNRESOLVED(errno, "Unable to read clock");  }
+					ret =
+					    clock_gettime(CLOCK_REALTIME,
+							  &ts_fin);
+					if (ret != 0) {
+						UNRESOLVED(errno,
+							   "Unable to read clock");
+					}
 
 					/* add to the measure list if nthreads % resolution == 0 */
-					if ((nthreads % RESOLUTION) == 0)
-					{
-						if (m_cur->next == NULL)
-						{
+					if ((nthreads % RESOLUTION) == 0) {
+						if (m_cur->next == NULL) {
 							/* Create an empty new element */
-							m_tmp = (mes_t *) malloc(sizeof(mes_t));
-							if (m_tmp == NULL) { UNRESOLVED(errno, "Unable to alloc memory for measure saving");  }
-							m_tmp->nthreads = nthreads;
+							m_tmp =
+							    (mes_t *)
+							    malloc(sizeof
+								   (mes_t));
+							if (m_tmp == NULL) {
+								UNRESOLVED
+								    (errno,
+								     "Unable to alloc memory for measure saving");
+							}
+							m_tmp->nthreads =
+							    nthreads;
 							m_tmp->next = NULL;
-							for (tmp=0; tmp<NSCENAR; tmp++)
-								m_tmp->_data[tmp]= 0;
+							for (tmp = 0;
+							     tmp < NSCENAR;
+							     tmp++)
+								m_tmp->
+								    _data[tmp] =
+								    0;
 							m_cur->next = m_tmp;
 						}
 
 						/* Add this measure to the next element */
 						m_cur = m_cur->next;
-						m_cur->_data[sc] = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
+						m_cur->_data[sc] =
+						    ((ts_fin.tv_sec -
+						      ts_ref.tv_sec) *
+						     1000000) +
+						    ((ts_fin.tv_nsec -
+						      ts_ref.tv_nsec) / 1000);
 
-						#if VERBOSE > 5
-						output("Added the following measure: sc=%i, n=%i, v=%li\n", sc, nthreads, m_cur->_data[sc]);
-						#endif
+#if VERBOSE > 5
+						output
+						    ("Added the following measure: sc=%i, n=%i, v=%li\n",
+						     sc, nthreads,
+						     m_cur->_data[sc]);
+#endif
 					}
 				}
-				#if VERBOSE > 3
-				output("Could not create anymore thread. Current count is %i\n", nthreads);
-				#endif
+#if VERBOSE > 3
+				output
+				    ("Could not create anymore thread. Current count is %i\n",
+				     nthreads);
+#endif
 
 				/* Unblock every created threads */
 				ret = pthread_mutex_unlock(&m_synchro);
-				if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+				if (ret != 0) {
+					UNRESOLVED(ret, "Mutex unlock failed");
+				}
 
-				if (scenarii[sc].detached == 0)
-				{
-					#if VERBOSE > 3
+				if (scenarii[sc].detached == 0) {
+#if VERBOSE > 3
 					output("Joining the threads\n");
-					#endif
-					for (i = 0; i < nthreads; i++)
-					{
+#endif
+					for (i = 0; i < nthreads; i++) {
 						ret = pthread_join(th[i], NULL);
-						if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+						if (ret != 0) {
+							UNRESOLVED(ret,
+								   "Unable to join a thread");
+						}
 					}
 
 					ret = pthread_join(child, NULL);
-					if (ret != 0)  {  UNRESOLVED(ret, "Unalbe to join a thread");  }
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unalbe to join a thread");
+					}
 
 				}
-				#if VERBOSE > 3
-				output("Waiting for threads (almost) termination\n");
-				#endif
+#if VERBOSE > 3
+				output
+				    ("Waiting for threads (almost) termination\n");
+#endif
 				do {
 					ret = pthread_mutex_lock(&m_synchro);
-					if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Mutex lock failed");
+					}
 
 					tmp = ctl;
 
 					ret = pthread_mutex_unlock(&m_synchro);
-					if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Mutex unlock failed");
+					}
 				} while (tmp != nthreads + 1);
 
-			} /* The thread was created */
-
-	}	} /* next scenario */
+			}
+			/* The thread was created */
+		}
+	}			/* next scenario */
 
 	/* Free some memory before result parsing */
 	free(th);
@@ -335,33 +407,33 @@
 
 	/* Free the resources and output the results */
 
-	#if VERBOSE > 5
+#if VERBOSE > 5
 	printf("Dump : \n");
 	printf("%8.8s", "nth");
-	for (i = 0; i<NSCENAR; i++)
+	for (i = 0; i < NSCENAR; i++)
 		printf("|   %2.2i   ", i);
 	printf("\n");
-	#endif
-	while (sentinel.next != NULL)
-	{
+#endif
+	while (sentinel.next != NULL) {
 		m_cur = sentinel.next;
-		#if (VERBOSE > 5) || defined(PLOT_OUTPUT)
+#if (VERBOSE > 5) || defined(PLOT_OUTPUT)
 		printf("%8.8i", m_cur->nthreads);
-		for (i=0; i<NSCENAR; i++)
-			printf(" %1.1li.%6.6li", m_cur->_data[i] / 1000000, m_cur->_data[i] % 1000000);
+		for (i = 0; i < NSCENAR; i++)
+			printf(" %1.1li.%6.6li", m_cur->_data[i] / 1000000,
+			       m_cur->_data[i] % 1000000);
 		printf("\n");
-		#endif
+#endif
 		sentinel.next = m_cur->next;
 		free(m_cur);
 	}
 
 	scenar_fini();
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
@@ -383,16 +455,15 @@
  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
  */
 
-struct row
-{
-	long X;  /* the X values -- copied from function argument */
-	long Y[NSCENAR];  /* the Y values -- copied from function argument */
-	long _x[NSCENAR]; /* Value X - Xavg */
-	long _y[NSCENAR]; /* Value Y - Yavg */
-	double LnX; /* Natural logarithm of X values */
-	double LnY[NSCENAR]; /* Natural logarithm of Y values */
-	double _lnx[NSCENAR]; /* Value LnX - LnXavg */
-	double _lny[NSCENAR]; /* Value LnY - LnYavg */
+struct row {
+	long X;			/* the X values -- copied from function argument */
+	long Y[NSCENAR];	/* the Y values -- copied from function argument */
+	long _x[NSCENAR];	/* Value X - Xavg */
+	long _y[NSCENAR];	/* Value Y - Yavg */
+	double LnX;		/* Natural logarithm of X values */
+	double LnY[NSCENAR];	/* Natural logarithm of Y values */
+	double _lnx[NSCENAR];	/* Value LnX - LnXavg */
+	double _lny[NSCENAR];	/* Value LnY - LnYavg */
 };
 
 int parse_measure(mes_t * measures)
@@ -412,7 +483,7 @@
 	long double _q[3][NSCENAR];
 	long double _d[3][NSCENAR];
 
-	long double t; /* temp value */
+	long double t;		/* temp value */
 
 	struct row *Table = NULL;
 
@@ -420,9 +491,8 @@
 	int array_max[NSCENAR];
 
 	/* Initialize the datas */
-	for (i=0; i<NSCENAR; i++)
-	{
-		array_max[i] = -1; /* means no data */
+	for (i = 0; i < NSCENAR; i++) {
+		array_max[i] = -1;	/* means no data */
 		Xavg[i] = 0.0;
 		LnXavg[i] = 0.0;
 		Yavg[i] = 0.0;
@@ -431,48 +501,43 @@
 		r2[i] = 0.0;
 		r3[i] = 0.0;
 		r4[i] = 0.0;
-		_q[0][i]=0.0;
-		_q[1][i]=0.0;
-		_q[2][i]=0.0;
-		_d[0][i]=0.0;
-		_d[1][i]=0.0;
-		_d[2][i]=0.0;
+		_q[0][i] = 0.0;
+		_q[1][i] = 0.0;
+		_q[2][i] = 0.0;
+		_d[0][i] = 0.0;
+		_d[1][i] = 0.0;
+		_d[2][i] = 0.0;
 	}
-	N=0;
+	N = 0;
 	cur = measures;
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Data analysis starting\n");
-	#endif
+#endif
 
 	/* We start with reading the list to find:
 	 * -> number of elements, to assign an array.
 	 * -> average values
 	 */
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
 		N++;
 
-		for (i=0; i<NSCENAR; i++)
-		{
-			if (cur->_data[i] != 0)
-			{
-				array_max[i]=N;
-				Xavg[i] += (double) cur->nthreads;
-				LnXavg[i] += log((double) cur->nthreads);
-				Yavg[i] += (double) cur->_data[i];
-				LnYavg[i] += log((double) cur->_data[i]);
+		for (i = 0; i < NSCENAR; i++) {
+			if (cur->_data[i] != 0) {
+				array_max[i] = N;
+				Xavg[i] += (double)cur->nthreads;
+				LnXavg[i] += log((double)cur->nthreads);
+				Yavg[i] += (double)cur->_data[i];
+				LnYavg[i] += log((double)cur->_data[i]);
 			}
 		}
 	}
 
 	/* We have the sum; we can divide to obtain the average values */
-	for (i=0; i<NSCENAR; i++)
-	{
-		if (array_max[i] != -1)
-		{
+	for (i = 0; i < NSCENAR; i++) {
+		if (array_max[i] != -1) {
 			Xavg[i] /= array_max[i];
 			LnXavg[i] /= array_max[i];
 			Yavg[i] /= array_max[i];
@@ -480,33 +545,32 @@
 		}
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output(" Found %d rows and %d columns\n", N, NSCENAR);
-	#endif
+#endif
 
 	/* We will now alloc the array ... */
 	Table = calloc(N, sizeof(struct row));
-	if (Table == NULL)  {  UNRESOLVED(errno, "Unable to alloc space for results parsing");  }
+	if (Table == NULL) {
+		UNRESOLVED(errno, "Unable to alloc space for results parsing");
+	}
 
 	/* ... and fill it */
 	N = 0;
 	cur = measures;
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
-		Table[N].X = (long) cur->nthreads;
-		Table[N].LnX = log((double) cur->nthreads);
-		for (i=0; i<NSCENAR; i++)
-		{
-			if (array_max[i] > N)
-			{
-				Table[N]._x[i] = Table[N].X - Xavg[i] ;
+		Table[N].X = (long)cur->nthreads;
+		Table[N].LnX = log((double)cur->nthreads);
+		for (i = 0; i < NSCENAR; i++) {
+			if (array_max[i] > N) {
+				Table[N]._x[i] = Table[N].X - Xavg[i];
 				Table[N]._lnx[i] = Table[N].LnX - LnXavg[i];
 				Table[N].Y[i] = cur->_data[i];
-				Table[N]._y[i] = Table[N].Y[i] - Yavg[i] ;
-				Table[N].LnY[i] = log((double) cur->_data[i]);
+				Table[N]._y[i] = Table[N].Y[i] - Yavg[i];
+				Table[N].LnY[i] = log((double)cur->_data[i]);
 				Table[N]._lny[i] = Table[N].LnY[i] - LnYavg[i];
 			}
 		}
@@ -515,9 +579,9 @@
 	}
 
 	/* We won't need the list anymore -- we'll work with the array which should be faster. */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output(" Data was stored in an array.\n");
-	#endif
+#endif
 
 	/* We need to read the full array at least twice to compute all the error factors */
 
@@ -525,14 +589,14 @@
 	 * -> r1 for each scenar.
 	 * -> "a" factor for linear (0), power (1) and exponential (2) approximations -- with using the _d and _q vars.
 	 */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Starting first pass...\n");
-	#endif
-	for (i=0; i<NSCENAR; i++)
-	{
-		for (r=0; r<array_max[i]; r++)
-		{
-			r1[i] += ((double)Table[r]._y[i] / array_max[i]) * (double)Table[r]._y[i];
+#endif
+	for (i = 0; i < NSCENAR; i++) {
+		for (r = 0; r < array_max[i]; r++) {
+			r1[i] +=
+			    ((double)Table[r]._y[i] / array_max[i]) *
+			    (double)Table[r]._y[i];
 
 			_q[0][i] += Table[r]._y[i] * Table[r]._x[i];
 			_d[0][i] += Table[r]._x[i] * Table[r]._x[i];
@@ -551,46 +615,47 @@
 	 * -> r2, r3, r4 for each scenar.
 	 */
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Starting second pass...\n");
-	#endif
-	for (i=0; i<NSCENAR; i++)
-	{
-		for (r=0; r<array_max[i]; r++)
-		{
+#endif
+	for (i = 0; i < NSCENAR; i++) {
+		for (r = 0; r < array_max[i]; r++) {
 			/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
-			t = (Table[r]._y[i] - ((_q[0][i] * Table[r]._x[i]) / _d[0][i]));
-			r2[i] += t * t / array_max[i]  ;
+			t = (Table[r]._y[i] -
+			     ((_q[0][i] * Table[r]._x[i]) / _d[0][i]));
+			r2[i] += t * t / array_max[i];
 
 			/* r3 = avg((y - c.x^a) ²);
-			    t = y - c * x ^ a
-			      = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
-			*/
-			t = (   Table[r].Y[i]
-			      - (logl (LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg[i])
-			        * powl(Table[r].X,  (_q[1][i] / _d[1][i]))
-			    )   );
-			r3[i] += t * t / array_max[i] ;
+			   t = y - c * x ^ a
+			   = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
+			 */
+			t = (Table[r].Y[i]
+			     -
+			     (logl
+			      (LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg[i])
+			      * powl(Table[r].X, (_q[1][i] / _d[1][i]))
+			     ));
+			r3[i] += t * t / array_max[i];
 
 			/* r4 = avg((y - exp(ax+b))²);
-			    t = y - exp(ax+b)
-			      = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
-			      = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
-			*/
-			t = (   Table[r].Y[i]
-			      - expl((_q[2][i] / _d[2][i]) * Table[r]._x[i] + LnYavg[i]));
-			r4[i] += t * t / array_max[i] ;
+			   t = y - exp(ax+b)
+			   = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
+			   = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
+			 */
+			t = (Table[r].Y[i]
+			     - expl((_q[2][i] / _d[2][i]) * Table[r]._x[i] +
+				    LnYavg[i]));
+			r4[i] += t * t / array_max[i];
 
 		}
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("All computing terminated.\n");
-	#endif
+#endif
 	ret = 0;
-	for (i=0; i<NSCENAR; i++)
-	{
-		#if VERBOSE > 1
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 1
 		output("\nScenario: %s\n", scenarii[i].descr);
 
 		output(" # of data: %i\n", array_max[i]);
@@ -601,29 +666,32 @@
 
 		output("  Model: Y = a * X + b\n");
 		output("       a = %Lg\n", _q[0][i] / _d[0][i]);
-		output("       b = %Lg\n", Yavg[i] - ((_q[0][i] / _d[0][i]) * Xavg[i]));
+		output("       b = %Lg\n",
+		       Yavg[i] - ((_q[0][i] / _d[0][i]) * Xavg[i]));
 		output("    Divergence %g\n", r2[i]);
 
 		output("  Model: Y = c * X ^ a\n");
 		output("       a = %Lg\n", _q[1][i] / _d[1][i]);
-		output("       c = %Lg\n", logl (LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg[i]));
+		output("       c = %Lg\n",
+		       logl(LnYavg[i] - (_q[1][i] / _d[1][i]) * LnXavg[i]));
 		output("    Divergence %g\n", r2[i]);
 
 		output("  Model: Y = exp(a * X + b)\n");
 		output("       a = %Lg\n", _q[2][i] / _d[2][i]);
-		output("       b = %Lg\n", LnYavg[i] - ((_q[2][i] / _d[2][i]) * Xavg[i]));
+		output("       b = %Lg\n",
+		       LnYavg[i] - ((_q[2][i] / _d[2][i]) * Xavg[i]));
 		output("    Divergence %g\n", r2[i]);
-		#endif
+#endif
 
-		if (array_max[i] != -1)
-		{
+		if (array_max[i] != -1) {
 			/* Compare r1 to other values, with some ponderations */
-			if ((r1[i] > 1.1 * r2[i]) || (r1[i] > 1.2 * r3[i]) || (r1[i] > 1.3 * r4[i]))
-					ret++;
-			#if VERBOSE > 1
+			if ((r1[i] > 1.1 * r2[i]) || (r1[i] > 1.2 * r3[i])
+			    || (r1[i] > 1.3 * r4[i]))
+				ret++;
+#if VERBOSE > 1
 			else
 				output(" Sanction: OK\n");
-			#endif
+#endif
 		}
 	}
 
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_create/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_create/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_create/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_create/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_create/threads_scenarii.c b/testcases/open_posix_testsuite/stress/threads/pthread_create/threads_scenarii.c
index 3462787..d22449e 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_create/threads_scenarii.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_create/threads_scenarii.c
@@ -23,28 +23,26 @@
  *
  */
 
-struct __scenario
-{
-    /* Object to hold the given configuration, and which will be used to create the threads */
+struct __scenario {
+	/* Object to hold the given configuration, and which will be used to create the threads */
 	pthread_attr_t ta;
-    /* General parameters */
-	int detached;  		/* 0 => joinable; 1 => detached */
-    /* Scheduling parameters */
+	/* General parameters */
+	int detached;		/* 0 => joinable; 1 => detached */
+	/* Scheduling parameters */
 	int explicitsched;	/* 0 => sched policy is inherited; 1 => sched policy from the attr param */
 	int schedpolicy;	/* 0 => default; 1=> SCHED_FIFO; 2=> SCHED_RR */
 	int schedparam;		/* 0 => default sched param; 1 => max value for sched param; -1 => min value for sched param */
 	int altscope;		/* 0 => default contension scope; 1 => alternative contension scope */
-    /* Stack parameters */
+	/* Stack parameters */
 	int altstack;		/* 0 => system manages the stack; 1 => stack is provided */
 	int guard;		/* 0 => default guardsize; 1=> guardsize is 0; 2=> guard is 1 page -- this setting only affect system stacks (not user's). */
 	int altsize;		/* 0 => default stack size; 1 => stack size specified (min value) -- ignored when stack is provided */
-    /* Additionnal information */
-    	char * descr;		/* object description */
-	void * bottom;		/* Stores the stack start when an alternate stack is required */
+	/* Additionnal information */
+	char *descr;		/* object description */
+	void *bottom;		/* Stores the stack start when an alternate stack is required */
 	int result;		/* This thread creation is expected to: 0 => succeed; 1 => fail; 2 => unknown */
 	sem_t sem;		/* This semaphore is used to signal the end of the detached threads execution */
-} scenarii[]=
-
+} scenarii[] =
 #define CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,res) \
  { \
 	 .detached=det, \
@@ -58,60 +56,82 @@
  	 .descr=desc, \
  	 .bottom=NULL, \
 	 .result=res }
-
 #define CASE_POS(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,0)
 #define CASE_NEG(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,1)
 #define CASE_UNK(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,2)
-
- /*
-  * This array gives the different combinations of threads attributes for the testcases.
-  *
-  * Some combinations must be avoided.
-  * -> Do not have a detached thread use an alternative stack;
-  *     as we don't know when the thread terminates to free the stack memory
-  * -> ... (to be completed)
-  *
-  */
-
+    /*
+     * This array gives the different combinations of threads attributes for the testcases.
+     *
+     * Some combinations must be avoided.
+     * -> Do not have a detached thread use an alternative stack;
+     *     as we don't know when the thread terminates to free the stack memory
+     * -> ... (to be completed)
+     *
+     */
 {
-   /* Unary tests */
-/* 0*/	 CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+	/* Unary tests */
+/* 0*/ CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+/* 8*/
+	    , CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
+/* 9*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
 
-   /* Stack play */
-	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
-	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
-	,CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack")
-	,CASE_POS(1, 0, 0, 0, 0, 0, 1, 1, "Detached, Min stack size, no guard")
-	,CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1, "Detached, Min stack size, 1p guard")
+	    /* Stack play */
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
+	    , CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack")
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 1, 1,
+		       "Detached, Min stack size, no guard")
+	    , CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1,
+		       "Detached, Min stack size, 1p guard")
 
-   /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
-	,CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
-	,CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
-	,CASE_UNK(0, 1, 1,-1, 0, 0, 0, 0, "Explicit FIFO min param")
-	,CASE_UNK(0, 1, 2,-1, 0, 0, 0, 0, "Explicit RR min param")
-	,CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0, "Explicit FIFO max param, alt scope")
-	,CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0, "Explicit RR max param, alt scope")
-	,CASE_UNK(0, 1, 1,-1, 1, 0, 0, 0, "Explicit FIFO min param, alt scope")
-	,CASE_UNK(0, 1, 2,-1, 1, 0, 0, 0, "Explicit RR min param, alt scope")
-	,CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0, "Detached, explicit FIFO max param")
-	,CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0, "Detached, explicit RR max param")
-	,CASE_UNK(1, 1, 1,-1, 0, 0, 0, 0, "Detached, explicit FIFO min param")
-	,CASE_UNK(1, 1, 2,-1, 0, 0, 0, 0, "Detached, explicit RR min param")
-	,CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0, "Detached, explicit FIFO max param, alt scope")
-	,CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0, "Detached, explicit RR max param, alt scope")
-	,CASE_UNK(1, 1, 1,-1, 1, 0, 0, 0, "Detached, explicit FIFO min param, alt scope")
-	,CASE_UNK(1, 1, 2,-1, 1, 0, 0, 0, "Detached, explicit RR min param, alt scope")
+	    /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
+	    , CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
+	    , CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
+	    , CASE_UNK(0, 1, 1, -1, 0, 0, 0, 0, "Explicit FIFO min param")
+	    , CASE_UNK(0, 1, 2, -1, 0, 0, 0, 0, "Explicit RR min param")
+	    , CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0,
+		       "Explicit FIFO max param, alt scope")
+	    , CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0,
+		       "Explicit RR max param, alt scope")
+	    , CASE_UNK(0, 1, 1, -1, 1, 0, 0, 0,
+		       "Explicit FIFO min param, alt scope")
+	    , CASE_UNK(0, 1, 2, -1, 1, 0, 0, 0,
+		       "Explicit RR min param, alt scope")
+	    , CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO max param")
+	    , CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0,
+		       "Detached, explicit RR max param")
+	    , CASE_UNK(1, 1, 1, -1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO min param")
+	    , CASE_UNK(1, 1, 2, -1, 0, 0, 0, 0,
+		       "Detached, explicit RR min param")
+	    , CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO max param, alt scope")
+	    , CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0,
+		       "Detached, explicit RR max param, alt scope")
+	    , CASE_UNK(1, 1, 1, -1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO min param, alt scope")
+	    , CASE_UNK(1, 1, 2, -1, 1, 0, 0, 0,
+		       "Detached, explicit RR min param, alt scope")
 
 };
 
@@ -120,103 +140,131 @@
 /* This function will initialize every pthread_attr_t object in the scenarii array */
 void scenar_init()
 {
-	int ret=0;
+	int ret = 0;
 	int i;
 	int old;
 	long pagesize, minstacksize;
 	long tsa, tss, tps;
 
-	pagesize	=sysconf(_SC_PAGESIZE);
-	minstacksize 	=sysconf(_SC_THREAD_STACK_MIN);
-	tsa		=sysconf(_SC_THREAD_ATTR_STACKADDR);
-	tss		=sysconf(_SC_THREAD_ATTR_STACKSIZE);
-	tps		=sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
+	pagesize = sysconf(_SC_PAGESIZE);
+	minstacksize = sysconf(_SC_THREAD_STACK_MIN);
+	tsa = sysconf(_SC_THREAD_ATTR_STACKADDR);
+	tss = sysconf(_SC_THREAD_ATTR_STACKSIZE);
+	tps = sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("System abilities:\n");
 	output(" TSA: %li\n", tsa);
 	output(" TSS: %li\n", tss);
 	output(" TPS: %li\n", tps);
 	output(" pagesize: %li\n", pagesize);
 	output(" min stack size: %li\n", minstacksize);
-	#endif
+#endif
 
-	if (minstacksize % pagesize)
-	{
-		UNTESTED("The min stack size is not a multiple of the page size");
+	if (minstacksize % pagesize) {
+		UNTESTED
+		    ("The min stack size is not a multiple of the page size");
 	}
 
-	for (i=0; i<NSCENAR; i++)
-	{
-		#if VERBOSE > 2
-		output("Initializing attribute for scenario %i: %s\n", i, scenarii[i].descr);
-		#endif
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 2
+		output("Initializing attribute for scenario %i: %s\n", i,
+		       scenarii[i].descr);
+#endif
 
 		ret = pthread_attr_init(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to initialize a thread attribute object");
+		}
 
 		/* Set the attributes according to the scenario */
-		if (scenarii[i].detached == 1)
-		{
-			ret = pthread_attr_setdetachstate(&scenarii[i].ta, PTHREAD_CREATE_DETACHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set detachstate");  }
+		if (scenarii[i].detached == 1) {
+			ret =
+			    pthread_attr_setdetachstate(&scenarii[i].ta,
+							PTHREAD_CREATE_DETACHED);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to set detachstate");
+			}
+		} else {
+			ret =
+			    pthread_attr_getdetachstate(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get detachstate from initialized attribute");
+			}
+			if (old != PTHREAD_CREATE_JOINABLE) {
+				FAILED
+				    ("The default attribute is not PTHREAD_CREATE_JOINABLE");
+			}
 		}
-		else
-		{
-			ret = pthread_attr_getdetachstate(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get detachstate from initialized attribute");  }
-			if (old != PTHREAD_CREATE_JOINABLE)  {  FAILED("The default attribute is not PTHREAD_CREATE_JOINABLE");  }
-		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("Detach state was set sucessfully\n");
-		#endif
+#endif
 
 		/* Sched related attributes */
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			if (scenarii[i].explicitsched == 1)
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_EXPLICIT_SCHED);
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_EXPLICIT_SCHED);
 			else
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_INHERIT_SCHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set inheritsched attribute");  }
-			#if VERBOSE > 4
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_INHERIT_SCHED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set inheritsched attribute");
+			}
+#if VERBOSE > 4
 			output("inheritsched state was set sucessfully\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => inheritsched parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => inheritsched parameter untouched\n");
+#endif
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
-			if (scenarii[i].schedpolicy == 1)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_FIFO);
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
+			if (scenarii[i].schedpolicy == 1) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_FIFO);
 			}
-			if (scenarii[i].schedpolicy == 2)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_RR);
+			if (scenarii[i].schedpolicy == 2) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_RR);
 			}
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set the sched policy");  }
-			#if VERBOSE > 4
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set the sched policy");
+			}
+#if VERBOSE > 4
 			if (scenarii[i].schedpolicy)
 				output("Sched policy was set sucessfully\n");
 			else
 				output("Sched policy untouched\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched policy parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched policy parameter untouched\n");
+#endif
 
-		if (scenarii[i].schedparam != 0)
-		{
+		if (scenarii[i].schedparam != 0) {
 			struct sched_param sp;
 
-			ret = pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get sched policy from attribute"); }
+			ret =
+			    pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get sched policy from attribute");
+			}
 
 			if (scenarii[i].schedparam == 1)
 				sp.sched_priority = sched_get_priority_max(old);
@@ -224,111 +272,148 @@
 				sp.sched_priority = sched_get_priority_min(old);
 
 			ret = pthread_attr_setschedparam(&scenarii[i].ta, &sp);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the sched param");  }
-
-		#if VERBOSE > 4
-			output("Sched param was set sucessfully to %i\n", sp.sched_priority);
-		}
-		else
-		{
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to set the sched param");
+			}
+#if VERBOSE > 4
+			output("Sched param was set sucessfully to %i\n",
+			       sp.sched_priority);
+		} else {
 			output("Sched param untouched\n");
-		#endif
+#endif
 		}
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			ret = pthread_attr_getscope(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to get contension scope from thread attribute");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to get contension scope from thread attribute");
+			}
 
-			if (scenarii[i].altscope != 0)
-			{
+			if (scenarii[i].altscope != 0) {
 				if (old == PTHREAD_SCOPE_PROCESS)
 					old = PTHREAD_SCOPE_SYSTEM;
 				else
 					old = PTHREAD_SCOPE_PROCESS;
 
-				ret = pthread_attr_setscope(&scenarii[i].ta, old);
+				ret =
+				    pthread_attr_setscope(&scenarii[i].ta, old);
 				//if (ret != 0)  {  UNRESOLVED(ret, "Failed to set contension scope");  }
-				#if VERBOSE > 0
-				if (ret != 0)  {  output("WARNING: The TPS option is claimed to be supported but setscope fails\n");  }
-				#endif
+#if VERBOSE > 0
+				if (ret != 0) {
+					output
+					    ("WARNING: The TPS option is claimed to be supported but setscope fails\n");
+				}
+#endif
 
-			#if VERBOSE > 4
-				output("Contension scope set to %s\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			}
-			else
-			{
-				output("Contension scope untouched (%s)\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			#endif
+#if VERBOSE > 4
+				output("Contension scope set to %s\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+			} else {
+				output("Contension scope untouched (%s)\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched contension scope parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched contension scope parameter untouched\n");
+#endif
 
 		/* Stack related attributes */
-		if ((tss>0) && (tsa>0)) /* This routine is dependent on the Thread Stack Address Attribute
-			                   and Thread Stack Size Attribute options */
-		{
-			if (scenarii[i].altstack != 0)
-			{
+		if ((tss > 0) && (tsa > 0)) {	/* This routine is dependent on the Thread Stack Address Attribute
+						   and Thread Stack Size Attribute options */
+			if (scenarii[i].altstack != 0) {
 				/* This is slightly more complicated. We need to alloc a new stack
-				and free it upon test termination */
+				   and free it upon test termination */
 				/* We will alloc with a simulated guardsize of 1 pagesize */
-				scenarii[i].bottom = malloc(minstacksize + pagesize);
-				if (scenarii[i].bottom == NULL)  {  UNRESOLVED(errno,"Unable to alloc enough memory for alternative stack"); }
+				scenarii[i].bottom =
+				    malloc(minstacksize + pagesize);
+				if (scenarii[i].bottom == NULL) {
+					UNRESOLVED(errno,
+						   "Unable to alloc enough memory for alternative stack");
+				}
 
-				ret = pthread_attr_setstack(&scenarii[i].ta, scenarii[i].bottom, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to specify alternate stack");  }
-
-				#if VERBOSE > 1
-				output("Alternate stack created successfully. Bottom=%p, Size=%i\n", scenarii[i].bottom, minstacksize);
-				#endif
+				ret =
+				    pthread_attr_setstack(&scenarii[i].ta,
+							  scenarii[i].bottom,
+							  minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to specify alternate stack");
+				}
+#if VERBOSE > 1
+				output
+				    ("Alternate stack created successfully. Bottom=%p, Size=%i\n",
+				     scenarii[i].bottom, minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TSA or TSS unsupported => No alternative stack\n");
-		#endif
+			output
+			    ("TSA or TSS unsupported => No alternative stack\n");
+#endif
 
-		#ifndef WITHOUT_XOPEN
-		if (scenarii[i].guard != 0)
-		{
+#ifndef WITHOUT_XOPEN
+		if (scenarii[i].guard != 0) {
 			if (scenarii[i].guard == 1)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, 0);
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      0);
 			if (scenarii[i].guard == 2)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, pagesize);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set guard area size in thread stack");  }
-			#if VERBOSE > 4
-			output("Guard size set to %i\n", (scenarii[i].guard==1)?1:pagesize);
-			#endif
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      pagesize);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set guard area size in thread stack");
+			}
+#if VERBOSE > 4
+			output("Guard size set to %i\n",
+			       (scenarii[i].guard == 1) ? 1 : pagesize);
+#endif
 		}
-		#endif
+#endif
 
-		if (tss>0) /* This routine is dependent on the Thread Stack Size Attribute option */
-		{
-			if (scenarii[i].altsize != 0)
-			{
-				ret = pthread_attr_setstacksize(&scenarii[i].ta, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to change stack size");  }
-				#if VERBOSE > 4
-				output("Stack size set to %i (this is the min)\n", minstacksize);
-				#endif
+		if (tss > 0) {	/* This routine is dependent on the Thread Stack Size Attribute option */
+			if (scenarii[i].altsize != 0) {
+				ret =
+				    pthread_attr_setstacksize(&scenarii[i].ta,
+							      minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to change stack size");
+				}
+#if VERBOSE > 4
+				output
+				    ("Stack size set to %i (this is the min)\n",
+				     minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TSS unsupported => stack size unchanged\n");
-		#endif
+#endif
 
-		ret = sem_init(&scenarii[i].sem, 0,0);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to init a semaphore");  }
+		ret = sem_init(&scenarii[i].sem, 0, 0);
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to init a semaphore");
+		}
 
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("All %i thread attribute objects were initialized\n\n", NSCENAR);
-	#endif
+#endif
 }
 
 /* This function will free all resources consumed in the scenar_init() routine */
@@ -336,28 +421,32 @@
 {
 	int ret = 0, i;
 
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		if (scenarii[i].bottom != NULL)
 			free(scenarii[i].bottom);
 
 		ret = sem_destroy(&scenarii[i].sem);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to destroy a semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to destroy a semaphore");
+		}
 
 		ret = pthread_attr_destroy(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a thread attribute object");
+		}
 	}
 }
 
-int sc=0; /* This might be very dirty... but is much simpler */
+int sc = 0;			/* This might be very dirty... but is much simpler */
 
-#ifdef STD_MAIN /* We want main to be defined here */
+#ifdef STD_MAIN			/* We want main to be defined here */
 
-extern void * threaded(void *arg); /* This is the test function */
+extern void *threaded(void *arg);	/* This is the test function */
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
 	/* Initialize output routine */
@@ -366,56 +455,68 @@
 	/* Initialize thread attribute objects */
 	scenar_init();
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
-		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_exit/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_exit/stress.c
index a259319..c39bd7b 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_exit/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_exit/stress.c
@@ -27,30 +27,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for some routines */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <signal.h>
- #include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
+#include <semaphore.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -100,31 +100,37 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-long long iterations=0;
+char do_it = 1;
+long long iterations = 0;
 
 /* Handler for user request to terminate */
 void sighdl(int sig)
 {
 	/* do_it = 0 */
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /* Cleanup handler to make sure the thread is exiting */
-void cleanup(void * arg)
+void cleanup(void *arg)
 {
 	int ret = 0;
-	sem_t * sem = (sem_t *) arg;
+	sem_t *sem = (sem_t *) arg;
 
 	/* Signal we're done (especially in case of a detached thread) */
-	do { ret = sem_post(sem); }
+	do {
+		ret = sem_post(sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to wait for the semaphore");
+	}
 }
 
 /* Thread routine */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	pthread_cleanup_push(cleanup, &scenarii[sc].sem);
 
@@ -133,93 +139,122 @@
 
 	pthread_cleanup_pop(1);
 
-	return NULL; /* For the sake of compiler */
+	return NULL;		/* For the sake of compiler */
 }
 
 /* main routine */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret, i;
-	void * rval;
+	void *rval;
 	struct sigaction sa;
 
 	pthread_t threads[NSCENAR * SCALABILITY_FACTOR * FACTOR];
 	int rets[NSCENAR * SCALABILITY_FACTOR * FACTOR];
 
- 	/* Initialize output */
+	/* Initialize output */
 	output_init();
 
 	/* Initialize scenarii table */
 	scenar_init();
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
-	while (do_it)
-	{
+	while (do_it) {
 		/* Create all the threads */
-		for (i=0; i<SCALABILITY_FACTOR * FACTOR; i++)
-		{
-			for (sc=0; sc<NSCENAR; sc++)
-			{
+		for (i = 0; i < SCALABILITY_FACTOR * FACTOR; i++) {
+			for (sc = 0; sc < NSCENAR; sc++) {
 				/* Skip the alternative stack threads */
 				if (scenarii[sc].altstack != 0)
 					continue;
 
-				rets[i*NSCENAR + sc] = pthread_create(&threads[i*NSCENAR + sc], &scenarii[sc].ta, threaded, &threads[i*NSCENAR + sc]);
-				switch (scenarii[sc].result)
-				{
-					case 0: /* Operation was expected to succeed */
-						if (rets[i*NSCENAR + sc] != 0)  {  UNRESOLVED(rets[i*NSCENAR + sc], "Failed to create this thread");  }
-						break;
+				rets[i * NSCENAR + sc] =
+				    pthread_create(&threads[i * NSCENAR + sc],
+						   &scenarii[sc].ta, threaded,
+						   &threads[i * NSCENAR + sc]);
+				switch (scenarii[sc].result) {
+				case 0:	/* Operation was expected to succeed */
+					if (rets[i * NSCENAR + sc] != 0) {
+						UNRESOLVED(rets
+							   [i * NSCENAR + sc],
+							   "Failed to create this thread");
+					}
+					break;
 
-					case 1: /* Operation was expected to fail */
-						if (rets[i*NSCENAR + sc] == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-						break;
+				case 1:	/* Operation was expected to fail */
+					if (rets[i * NSCENAR + sc] == 0) {
+						UNRESOLVED(-1,
+							   "An error was expected but the thread creation succeeded");
+					}
+					break;
 
-					case 2: /* We did not know the expected result */
-					default:
-						#if VERBOSE > 5
-						if (rets[i*NSCENAR + sc] == 0)
-							{ output("Thread has been created successfully for this scenario\n"); }
-						else
-							{ output("Thread creation failed with the error: %s\n", strerror(rets[i*NSCENAR + sc])); }
-						#endif
-						;
+				case 2:	/* We did not know the expected result */
+				default:
+#if VERBOSE > 5
+					if (rets[i * NSCENAR + sc] == 0) {
+						output
+						    ("Thread has been created successfully for this scenario\n");
+					} else {
+						output
+						    ("Thread creation failed with the error: %s\n",
+						     strerror(rets
+							      [i * NSCENAR +
+							       sc]));
+					}
+#endif
+					;
 				}
-				if (rets[i*NSCENAR + sc] == 0)
-				{
+				if (rets[i * NSCENAR + sc] == 0) {
 					/* Just wait for the thread to terminate */
-					do { ret = sem_wait(&scenarii[sc].sem); }
+					do {
+						ret =
+						    sem_wait(&scenarii[sc].sem);
+					}
 					while ((ret == -1) && (errno == EINTR));
-					if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+					if (ret == -1) {
+						UNRESOLVED(errno,
+							   "Failed to wait for the semaphore");
+					}
 				}
 			}
 		}
 
 		/* Join all the joinable threads and check the value */
-		for (i=0; i<SCALABILITY_FACTOR * FACTOR; i++)
-		{
-			for (sc=0; sc<NSCENAR; sc++)
-			{
-				if ((scenarii[sc].altstack == 0) && (scenarii[sc].detached == 0) && (rets[i*NSCENAR + sc] == 0))
-				{
-					ret = pthread_join(threads[i*NSCENAR + sc], &rval);
-					if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		for (i = 0; i < SCALABILITY_FACTOR * FACTOR; i++) {
+			for (sc = 0; sc < NSCENAR; sc++) {
+				if ((scenarii[sc].altstack == 0)
+				    && (scenarii[sc].detached == 0)
+				    && (rets[i * NSCENAR + sc] == 0)) {
+					ret =
+					    pthread_join(threads
+							 [i * NSCENAR + sc],
+							 &rval);
+					if (ret != 0) {
+						UNRESOLVED(ret,
+							   "Unable to join a thread");
+					}
 
-					if (rval !=  (void *)&threads[i*NSCENAR + sc])
-					{
-						output("arg: %p -- got %p -- NULL=%p\n", &threads[i*NSCENAR + sc], rval, NULL);
-						FAILED("The retrieved error value is corrupted");
+					if (rval !=
+					    (void *)&threads[i * NSCENAR +
+							     sc]) {
+						output
+						    ("arg: %p -- got %p -- NULL=%p\n",
+						     &threads[i * NSCENAR + sc],
+						     rval, NULL);
+						FAILED
+						    ("The retrieved error value is corrupted");
 					}
 				}
 			}
@@ -232,12 +267,13 @@
 	scenar_fini();
 
 	/* Test passed */
-	output("pthread_exit stress test PASSED -- %llu iterations\n",iterations);
+	output("pthread_exit stress test PASSED -- %llu iterations\n",
+	       iterations);
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNTESTED("This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_exit/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_exit/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_exit/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_exit/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_exit/threads_scenarii.c b/testcases/open_posix_testsuite/stress/threads/pthread_exit/threads_scenarii.c
index 3462787..d22449e 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_exit/threads_scenarii.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_exit/threads_scenarii.c
@@ -23,28 +23,26 @@
  *
  */
 
-struct __scenario
-{
-    /* Object to hold the given configuration, and which will be used to create the threads */
+struct __scenario {
+	/* Object to hold the given configuration, and which will be used to create the threads */
 	pthread_attr_t ta;
-    /* General parameters */
-	int detached;  		/* 0 => joinable; 1 => detached */
-    /* Scheduling parameters */
+	/* General parameters */
+	int detached;		/* 0 => joinable; 1 => detached */
+	/* Scheduling parameters */
 	int explicitsched;	/* 0 => sched policy is inherited; 1 => sched policy from the attr param */
 	int schedpolicy;	/* 0 => default; 1=> SCHED_FIFO; 2=> SCHED_RR */
 	int schedparam;		/* 0 => default sched param; 1 => max value for sched param; -1 => min value for sched param */
 	int altscope;		/* 0 => default contension scope; 1 => alternative contension scope */
-    /* Stack parameters */
+	/* Stack parameters */
 	int altstack;		/* 0 => system manages the stack; 1 => stack is provided */
 	int guard;		/* 0 => default guardsize; 1=> guardsize is 0; 2=> guard is 1 page -- this setting only affect system stacks (not user's). */
 	int altsize;		/* 0 => default stack size; 1 => stack size specified (min value) -- ignored when stack is provided */
-    /* Additionnal information */
-    	char * descr;		/* object description */
-	void * bottom;		/* Stores the stack start when an alternate stack is required */
+	/* Additionnal information */
+	char *descr;		/* object description */
+	void *bottom;		/* Stores the stack start when an alternate stack is required */
 	int result;		/* This thread creation is expected to: 0 => succeed; 1 => fail; 2 => unknown */
 	sem_t sem;		/* This semaphore is used to signal the end of the detached threads execution */
-} scenarii[]=
-
+} scenarii[] =
 #define CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,res) \
  { \
 	 .detached=det, \
@@ -58,60 +56,82 @@
  	 .descr=desc, \
  	 .bottom=NULL, \
 	 .result=res }
-
 #define CASE_POS(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,0)
 #define CASE_NEG(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,1)
 #define CASE_UNK(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,2)
-
- /*
-  * This array gives the different combinations of threads attributes for the testcases.
-  *
-  * Some combinations must be avoided.
-  * -> Do not have a detached thread use an alternative stack;
-  *     as we don't know when the thread terminates to free the stack memory
-  * -> ... (to be completed)
-  *
-  */
-
+    /*
+     * This array gives the different combinations of threads attributes for the testcases.
+     *
+     * Some combinations must be avoided.
+     * -> Do not have a detached thread use an alternative stack;
+     *     as we don't know when the thread terminates to free the stack memory
+     * -> ... (to be completed)
+     *
+     */
 {
-   /* Unary tests */
-/* 0*/	 CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+	/* Unary tests */
+/* 0*/ CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+/* 8*/
+	    , CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
+/* 9*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
 
-   /* Stack play */
-	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
-	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
-	,CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack")
-	,CASE_POS(1, 0, 0, 0, 0, 0, 1, 1, "Detached, Min stack size, no guard")
-	,CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1, "Detached, Min stack size, 1p guard")
+	    /* Stack play */
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
+	    , CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack")
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 1, 1,
+		       "Detached, Min stack size, no guard")
+	    , CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1,
+		       "Detached, Min stack size, 1p guard")
 
-   /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
-	,CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
-	,CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
-	,CASE_UNK(0, 1, 1,-1, 0, 0, 0, 0, "Explicit FIFO min param")
-	,CASE_UNK(0, 1, 2,-1, 0, 0, 0, 0, "Explicit RR min param")
-	,CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0, "Explicit FIFO max param, alt scope")
-	,CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0, "Explicit RR max param, alt scope")
-	,CASE_UNK(0, 1, 1,-1, 1, 0, 0, 0, "Explicit FIFO min param, alt scope")
-	,CASE_UNK(0, 1, 2,-1, 1, 0, 0, 0, "Explicit RR min param, alt scope")
-	,CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0, "Detached, explicit FIFO max param")
-	,CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0, "Detached, explicit RR max param")
-	,CASE_UNK(1, 1, 1,-1, 0, 0, 0, 0, "Detached, explicit FIFO min param")
-	,CASE_UNK(1, 1, 2,-1, 0, 0, 0, 0, "Detached, explicit RR min param")
-	,CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0, "Detached, explicit FIFO max param, alt scope")
-	,CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0, "Detached, explicit RR max param, alt scope")
-	,CASE_UNK(1, 1, 1,-1, 1, 0, 0, 0, "Detached, explicit FIFO min param, alt scope")
-	,CASE_UNK(1, 1, 2,-1, 1, 0, 0, 0, "Detached, explicit RR min param, alt scope")
+	    /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
+	    , CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
+	    , CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
+	    , CASE_UNK(0, 1, 1, -1, 0, 0, 0, 0, "Explicit FIFO min param")
+	    , CASE_UNK(0, 1, 2, -1, 0, 0, 0, 0, "Explicit RR min param")
+	    , CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0,
+		       "Explicit FIFO max param, alt scope")
+	    , CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0,
+		       "Explicit RR max param, alt scope")
+	    , CASE_UNK(0, 1, 1, -1, 1, 0, 0, 0,
+		       "Explicit FIFO min param, alt scope")
+	    , CASE_UNK(0, 1, 2, -1, 1, 0, 0, 0,
+		       "Explicit RR min param, alt scope")
+	    , CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO max param")
+	    , CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0,
+		       "Detached, explicit RR max param")
+	    , CASE_UNK(1, 1, 1, -1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO min param")
+	    , CASE_UNK(1, 1, 2, -1, 0, 0, 0, 0,
+		       "Detached, explicit RR min param")
+	    , CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO max param, alt scope")
+	    , CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0,
+		       "Detached, explicit RR max param, alt scope")
+	    , CASE_UNK(1, 1, 1, -1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO min param, alt scope")
+	    , CASE_UNK(1, 1, 2, -1, 1, 0, 0, 0,
+		       "Detached, explicit RR min param, alt scope")
 
 };
 
@@ -120,103 +140,131 @@
 /* This function will initialize every pthread_attr_t object in the scenarii array */
 void scenar_init()
 {
-	int ret=0;
+	int ret = 0;
 	int i;
 	int old;
 	long pagesize, minstacksize;
 	long tsa, tss, tps;
 
-	pagesize	=sysconf(_SC_PAGESIZE);
-	minstacksize 	=sysconf(_SC_THREAD_STACK_MIN);
-	tsa		=sysconf(_SC_THREAD_ATTR_STACKADDR);
-	tss		=sysconf(_SC_THREAD_ATTR_STACKSIZE);
-	tps		=sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
+	pagesize = sysconf(_SC_PAGESIZE);
+	minstacksize = sysconf(_SC_THREAD_STACK_MIN);
+	tsa = sysconf(_SC_THREAD_ATTR_STACKADDR);
+	tss = sysconf(_SC_THREAD_ATTR_STACKSIZE);
+	tps = sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("System abilities:\n");
 	output(" TSA: %li\n", tsa);
 	output(" TSS: %li\n", tss);
 	output(" TPS: %li\n", tps);
 	output(" pagesize: %li\n", pagesize);
 	output(" min stack size: %li\n", minstacksize);
-	#endif
+#endif
 
-	if (minstacksize % pagesize)
-	{
-		UNTESTED("The min stack size is not a multiple of the page size");
+	if (minstacksize % pagesize) {
+		UNTESTED
+		    ("The min stack size is not a multiple of the page size");
 	}
 
-	for (i=0; i<NSCENAR; i++)
-	{
-		#if VERBOSE > 2
-		output("Initializing attribute for scenario %i: %s\n", i, scenarii[i].descr);
-		#endif
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 2
+		output("Initializing attribute for scenario %i: %s\n", i,
+		       scenarii[i].descr);
+#endif
 
 		ret = pthread_attr_init(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to initialize a thread attribute object");
+		}
 
 		/* Set the attributes according to the scenario */
-		if (scenarii[i].detached == 1)
-		{
-			ret = pthread_attr_setdetachstate(&scenarii[i].ta, PTHREAD_CREATE_DETACHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set detachstate");  }
+		if (scenarii[i].detached == 1) {
+			ret =
+			    pthread_attr_setdetachstate(&scenarii[i].ta,
+							PTHREAD_CREATE_DETACHED);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to set detachstate");
+			}
+		} else {
+			ret =
+			    pthread_attr_getdetachstate(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get detachstate from initialized attribute");
+			}
+			if (old != PTHREAD_CREATE_JOINABLE) {
+				FAILED
+				    ("The default attribute is not PTHREAD_CREATE_JOINABLE");
+			}
 		}
-		else
-		{
-			ret = pthread_attr_getdetachstate(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get detachstate from initialized attribute");  }
-			if (old != PTHREAD_CREATE_JOINABLE)  {  FAILED("The default attribute is not PTHREAD_CREATE_JOINABLE");  }
-		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("Detach state was set sucessfully\n");
-		#endif
+#endif
 
 		/* Sched related attributes */
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			if (scenarii[i].explicitsched == 1)
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_EXPLICIT_SCHED);
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_EXPLICIT_SCHED);
 			else
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_INHERIT_SCHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set inheritsched attribute");  }
-			#if VERBOSE > 4
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_INHERIT_SCHED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set inheritsched attribute");
+			}
+#if VERBOSE > 4
 			output("inheritsched state was set sucessfully\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => inheritsched parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => inheritsched parameter untouched\n");
+#endif
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
-			if (scenarii[i].schedpolicy == 1)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_FIFO);
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
+			if (scenarii[i].schedpolicy == 1) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_FIFO);
 			}
-			if (scenarii[i].schedpolicy == 2)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_RR);
+			if (scenarii[i].schedpolicy == 2) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_RR);
 			}
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set the sched policy");  }
-			#if VERBOSE > 4
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set the sched policy");
+			}
+#if VERBOSE > 4
 			if (scenarii[i].schedpolicy)
 				output("Sched policy was set sucessfully\n");
 			else
 				output("Sched policy untouched\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched policy parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched policy parameter untouched\n");
+#endif
 
-		if (scenarii[i].schedparam != 0)
-		{
+		if (scenarii[i].schedparam != 0) {
 			struct sched_param sp;
 
-			ret = pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get sched policy from attribute"); }
+			ret =
+			    pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get sched policy from attribute");
+			}
 
 			if (scenarii[i].schedparam == 1)
 				sp.sched_priority = sched_get_priority_max(old);
@@ -224,111 +272,148 @@
 				sp.sched_priority = sched_get_priority_min(old);
 
 			ret = pthread_attr_setschedparam(&scenarii[i].ta, &sp);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the sched param");  }
-
-		#if VERBOSE > 4
-			output("Sched param was set sucessfully to %i\n", sp.sched_priority);
-		}
-		else
-		{
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to set the sched param");
+			}
+#if VERBOSE > 4
+			output("Sched param was set sucessfully to %i\n",
+			       sp.sched_priority);
+		} else {
 			output("Sched param untouched\n");
-		#endif
+#endif
 		}
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			ret = pthread_attr_getscope(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to get contension scope from thread attribute");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to get contension scope from thread attribute");
+			}
 
-			if (scenarii[i].altscope != 0)
-			{
+			if (scenarii[i].altscope != 0) {
 				if (old == PTHREAD_SCOPE_PROCESS)
 					old = PTHREAD_SCOPE_SYSTEM;
 				else
 					old = PTHREAD_SCOPE_PROCESS;
 
-				ret = pthread_attr_setscope(&scenarii[i].ta, old);
+				ret =
+				    pthread_attr_setscope(&scenarii[i].ta, old);
 				//if (ret != 0)  {  UNRESOLVED(ret, "Failed to set contension scope");  }
-				#if VERBOSE > 0
-				if (ret != 0)  {  output("WARNING: The TPS option is claimed to be supported but setscope fails\n");  }
-				#endif
+#if VERBOSE > 0
+				if (ret != 0) {
+					output
+					    ("WARNING: The TPS option is claimed to be supported but setscope fails\n");
+				}
+#endif
 
-			#if VERBOSE > 4
-				output("Contension scope set to %s\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			}
-			else
-			{
-				output("Contension scope untouched (%s)\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			#endif
+#if VERBOSE > 4
+				output("Contension scope set to %s\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+			} else {
+				output("Contension scope untouched (%s)\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched contension scope parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched contension scope parameter untouched\n");
+#endif
 
 		/* Stack related attributes */
-		if ((tss>0) && (tsa>0)) /* This routine is dependent on the Thread Stack Address Attribute
-			                   and Thread Stack Size Attribute options */
-		{
-			if (scenarii[i].altstack != 0)
-			{
+		if ((tss > 0) && (tsa > 0)) {	/* This routine is dependent on the Thread Stack Address Attribute
+						   and Thread Stack Size Attribute options */
+			if (scenarii[i].altstack != 0) {
 				/* This is slightly more complicated. We need to alloc a new stack
-				and free it upon test termination */
+				   and free it upon test termination */
 				/* We will alloc with a simulated guardsize of 1 pagesize */
-				scenarii[i].bottom = malloc(minstacksize + pagesize);
-				if (scenarii[i].bottom == NULL)  {  UNRESOLVED(errno,"Unable to alloc enough memory for alternative stack"); }
+				scenarii[i].bottom =
+				    malloc(minstacksize + pagesize);
+				if (scenarii[i].bottom == NULL) {
+					UNRESOLVED(errno,
+						   "Unable to alloc enough memory for alternative stack");
+				}
 
-				ret = pthread_attr_setstack(&scenarii[i].ta, scenarii[i].bottom, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to specify alternate stack");  }
-
-				#if VERBOSE > 1
-				output("Alternate stack created successfully. Bottom=%p, Size=%i\n", scenarii[i].bottom, minstacksize);
-				#endif
+				ret =
+				    pthread_attr_setstack(&scenarii[i].ta,
+							  scenarii[i].bottom,
+							  minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to specify alternate stack");
+				}
+#if VERBOSE > 1
+				output
+				    ("Alternate stack created successfully. Bottom=%p, Size=%i\n",
+				     scenarii[i].bottom, minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TSA or TSS unsupported => No alternative stack\n");
-		#endif
+			output
+			    ("TSA or TSS unsupported => No alternative stack\n");
+#endif
 
-		#ifndef WITHOUT_XOPEN
-		if (scenarii[i].guard != 0)
-		{
+#ifndef WITHOUT_XOPEN
+		if (scenarii[i].guard != 0) {
 			if (scenarii[i].guard == 1)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, 0);
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      0);
 			if (scenarii[i].guard == 2)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, pagesize);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set guard area size in thread stack");  }
-			#if VERBOSE > 4
-			output("Guard size set to %i\n", (scenarii[i].guard==1)?1:pagesize);
-			#endif
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      pagesize);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set guard area size in thread stack");
+			}
+#if VERBOSE > 4
+			output("Guard size set to %i\n",
+			       (scenarii[i].guard == 1) ? 1 : pagesize);
+#endif
 		}
-		#endif
+#endif
 
-		if (tss>0) /* This routine is dependent on the Thread Stack Size Attribute option */
-		{
-			if (scenarii[i].altsize != 0)
-			{
-				ret = pthread_attr_setstacksize(&scenarii[i].ta, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to change stack size");  }
-				#if VERBOSE > 4
-				output("Stack size set to %i (this is the min)\n", minstacksize);
-				#endif
+		if (tss > 0) {	/* This routine is dependent on the Thread Stack Size Attribute option */
+			if (scenarii[i].altsize != 0) {
+				ret =
+				    pthread_attr_setstacksize(&scenarii[i].ta,
+							      minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to change stack size");
+				}
+#if VERBOSE > 4
+				output
+				    ("Stack size set to %i (this is the min)\n",
+				     minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TSS unsupported => stack size unchanged\n");
-		#endif
+#endif
 
-		ret = sem_init(&scenarii[i].sem, 0,0);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to init a semaphore");  }
+		ret = sem_init(&scenarii[i].sem, 0, 0);
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to init a semaphore");
+		}
 
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("All %i thread attribute objects were initialized\n\n", NSCENAR);
-	#endif
+#endif
 }
 
 /* This function will free all resources consumed in the scenar_init() routine */
@@ -336,28 +421,32 @@
 {
 	int ret = 0, i;
 
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		if (scenarii[i].bottom != NULL)
 			free(scenarii[i].bottom);
 
 		ret = sem_destroy(&scenarii[i].sem);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to destroy a semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to destroy a semaphore");
+		}
 
 		ret = pthread_attr_destroy(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a thread attribute object");
+		}
 	}
 }
 
-int sc=0; /* This might be very dirty... but is much simpler */
+int sc = 0;			/* This might be very dirty... but is much simpler */
 
-#ifdef STD_MAIN /* We want main to be defined here */
+#ifdef STD_MAIN			/* We want main to be defined here */
 
-extern void * threaded(void *arg); /* This is the test function */
+extern void *threaded(void *arg);	/* This is the test function */
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
 	/* Initialize output routine */
@@ -366,56 +455,68 @@
 	/* Initialize thread attribute objects */
 	scenar_init();
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
-		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/stress.c
index 55d37b4..7ef8dc4 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/stress.c
@@ -47,7 +47,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -85,26 +85,22 @@
 /* Handler for user request to terminate */
 void sighdl(int sig)
 {
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
 }
 
-typedef struct _tdata
-{
+typedef struct _tdata {
 	int policy;
 	int prio;
 	pthread_t thread;
-}
+} testdata_t;
 
-testdata_t;
-
-testdata_t td[ 4 ];
+testdata_t td[4];
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 	int i = 0;
@@ -112,24 +108,19 @@
 
 	struct sched_param sp;
 
-	while (do_it)
-	{
-		for (i = 0; i < 4; i++)
-		{
-			ret = pthread_getschedparam(td[ i ].thread, &pol, &sp);
+	while (do_it) {
+		for (i = 0; i < 4; i++) {
+			ret = pthread_getschedparam(td[i].thread, &pol, &sp);
 
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				UNRESOLVED(ret, "Failed to get sched param");
 			}
 
-			if (pol != td[ i ].policy)
-			{
+			if (pol != td[i].policy) {
 				FAILED("Wrong scheduling policy read");
 			}
 
-			if (sp.sched_priority != td[ i ].prio)
-			{
+			if (sp.sched_priority != td[i].prio) {
 				FAILED("Wrong scheduling priority read");
 			}
 
@@ -143,15 +134,14 @@
 }
 
 /* alternative policy threads */
-void * rt_thread(void * arg)
+void *rt_thread(void *arg)
 {
 	int ret = 0;
 
 	/* This thread does almost nothing but wait... */
 	ret = pthread_barrier_wait(arg);
 
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))
-	{
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
 		UNRESOLVED(ret, "Failed to wait for barrier");
 	}
 
@@ -159,7 +149,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret = 0, i;
 
@@ -167,9 +157,9 @@
 
 	pthread_barrier_t bar;
 
-	pthread_attr_t ta[ 4 ];
+	pthread_attr_t ta[4];
 
-	pthread_t th[ NTHREADS ];
+	pthread_t th[NTHREADS];
 
 	struct sched_param sp;
 
@@ -179,125 +169,114 @@
 	/* Initialize barrier */
 	ret = pthread_barrier_init(&bar, NULL, 5);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to init barrier");
 	}
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 
 	sa.sa_flags = 0;
 
 	sa.sa_handler = sighdl;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-
 #if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
 
 #endif
 
-	td[ 0 ].policy = td[ 1 ].policy = SCHED_FIFO;
+	td[0].policy = td[1].policy = SCHED_FIFO;
 
-	td[ 2 ].policy = td[ 3 ].policy = SCHED_RR;
+	td[2].policy = td[3].policy = SCHED_RR;
 
-	td[ 0 ].prio = sched_get_priority_min(SCHED_FIFO);
+	td[0].prio = sched_get_priority_min(SCHED_FIFO);
 
-	if (td[ 0 ].prio == -1)
-	{
+	if (td[0].prio == -1) {
 		UNRESOLVED(errno, "Failed to get scheduler range value");
 	}
 
-	td[ 1 ].prio = sched_get_priority_max(SCHED_FIFO);
+	td[1].prio = sched_get_priority_max(SCHED_FIFO);
 
-	if (td[ 1 ].prio == -1)
-	{
+	if (td[1].prio == -1) {
 		UNRESOLVED(errno, "Failed to get scheduler range value");
 	}
 
-	td[ 2 ].prio = sched_get_priority_min(SCHED_RR);
+	td[2].prio = sched_get_priority_min(SCHED_RR);
 
-	if (td[ 2 ].prio == -1)
-	{
+	if (td[2].prio == -1) {
 		UNRESOLVED(errno, "Failed to get scheduler range value");
 	}
 
-	td[ 3 ].prio = sched_get_priority_max(SCHED_RR);
+	td[3].prio = sched_get_priority_max(SCHED_RR);
 
-	if (td[ 3 ].prio == -1)
-	{
+	if (td[3].prio == -1) {
 		UNRESOLVED(errno, "Failed to get scheduler range value");
 	}
 
 	/* Initialize the threads attributes and create the RT threads */
-	for (i = 0; i < 4; i++)
-	{
-		ret = pthread_attr_init(&ta[ i ]);
+	for (i = 0; i < 4; i++) {
+		ret = pthread_attr_init(&ta[i]);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Failed to initialize thread attribute");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to initialize thread attribute");
 		}
 
-		ret = pthread_attr_setinheritsched(&ta[ i ], PTHREAD_EXPLICIT_SCHED);
+		ret =
+		    pthread_attr_setinheritsched(&ta[i],
+						 PTHREAD_EXPLICIT_SCHED);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Failed to set explicit scheduling attribute");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to set explicit scheduling attribute");
 		}
 
-		sp.sched_priority = td[ i ].prio;
+		sp.sched_priority = td[i].prio;
 
-		ret = pthread_attr_setschedparam(&ta[ i ], &sp);
+		ret = pthread_attr_setschedparam(&ta[i], &sp);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "failed to set thread attribute sched param");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "failed to set thread attribute sched param");
 		}
 
-		ret = pthread_attr_setschedpolicy(&ta[ i ], td[ i ].policy);
+		ret = pthread_attr_setschedpolicy(&ta[i], td[i].policy);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "failed to set thread attribute sched prio");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "failed to set thread attribute sched prio");
 		}
 
-		ret = pthread_create(&td[ i ].thread, &ta[ i ], rt_thread, &bar);
+		ret = pthread_create(&td[i].thread, &ta[i], rt_thread, &bar);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Failed to create a RT thread -- need more privilege?");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to create a RT thread -- need more privilege?");
 		}
 
 	}
 
 	/* Create the worker threads */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_create(&th[ i ], NULL, threaded, NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_create(&th[i], NULL, threaded, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "failed to create a worker thread");
 		}
 	}
 
 	/* Wait for the worker threads to finish */
-	for (i = 0; i < NTHREADS; i++)
-	{
-		ret = pthread_join(th[ i ], NULL);
+	for (i = 0; i < NTHREADS; i++) {
+		ret = pthread_join(th[i], NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "failed to join a worker thread");
 		}
 	}
@@ -305,29 +284,26 @@
 	/* Join the barrier to terminate the RT threads */
 	ret = pthread_barrier_wait(&bar);
 
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))
-	{
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
 		UNRESOLVED(ret, "Failed to wait for the barrier");
 	}
 
 	/* Join the RT threads */
-	for (i = 0; i < 4; i++)
-	{
-		ret = pthread_join(td[ i ].thread, NULL);
+	for (i = 0; i < 4; i++) {
+		ret = pthread_join(td[i].thread, NULL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to join a thread");
 		}
 	}
 
 	/* Done! */
-	output("pthread_getschedparam stress test PASSED -- %llu iterations\n", iterations);
+	output("pthread_getschedparam stress test PASSED -- %llu iterations\n",
+	       iterations);
 
 	ret = pthread_barrier_destroy(&bar);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to destroy the barrier");
 	}
 
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_getschedparam/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
index 64655ac..68490b5 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c
@@ -85,8 +85,7 @@
 {
 	/* do_it = 0 */
 
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
@@ -95,17 +94,17 @@
 void floodsighdl(int sig)
 {
 	/* Nothing to do */
-	return ;
+	return;
 }
 
 /* Signals flood receiver thread */
-void* flood_receiver(void *arg)
+void *flood_receiver(void *arg)
 {
 	int ret = 0;
 	/* register the signal handler for this one thread */
 
 	struct sigaction sa;
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = floodsighdl;
 
@@ -113,8 +112,7 @@
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction(SIGBUS, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGBUS, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
@@ -122,23 +120,21 @@
 
 	do {
 		sched_yield();
-	} while (*(int *) arg);
+	} while (*(int *)arg);
 
 	return NULL;
 }
 
 /* Signal flood threads */
-void * flooder_1(void * arg)
+void *flooder_1(void *arg)
 {
 	int ret = 0;
 
-	while (do_it)
-	{
+	while (do_it) {
 		iterations++;
-		ret = pthread_kill(*(pthread_t *) arg , SIGABRT);
+		ret = pthread_kill(*(pthread_t *) arg, SIGABRT);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Flooder 1 thread got an error");
 		}
 	}
@@ -146,17 +142,15 @@
 	return NULL;
 }
 
-void * flooder_2(void * arg)
+void *flooder_2(void *arg)
 {
 	int ret = 0;
 
-	while (do_it)
-	{
+	while (do_it) {
 		iterations++;
-		ret = pthread_kill(*(pthread_t *) arg , SIGBUS);
+		ret = pthread_kill(*(pthread_t *) arg, SIGBUS);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Flooder 1 thread got an error");
 		}
 	}
@@ -168,45 +162,43 @@
 int sync;
 void syncsighdl(int sig)
 {
-	/* signal we have been called*/
+	/* signal we have been called */
 	sync = 1;
-	return ;
+	return;
 }
 
-void * sync_rec(void * arg)
+void *sync_rec(void *arg)
 {
 	int ret = 0;
 
 	struct sigaction sa;
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = syncsighdl;
 
-	if ((ret = sigaction (SIGILL, &sa, NULL))) {
+	if ((ret = sigaction(SIGILL, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
 	/* wait until termination */
 	do {
 		sched_yield();
-	} while (*(int *) arg);
+	} while (*(int *)arg);
 
 	return NULL;
 }
 
-void * sync_send(void * arg)
+void *sync_send(void *arg)
 {
 	int ret = 0;
 
-	while (do_it)
-	{
+	while (do_it) {
 		/* Disarm the flag */
 		sync = 0;
 		/* Send the signal */
 		ret = pthread_kill(*(pthread_t *) arg, SIGILL);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to send signal");
 		}
 
@@ -215,9 +207,9 @@
 			sleep(1);
 
 		/* Test if signal was received */
-		if (sync == 0)
-		{
-			FAILED("Signal SIGILL was not delivered within 5 second -- lost?");
+		if (sync == 0) {
+			FAILED
+			    ("Signal SIGILL was not delivered within 5 second -- lost?");
 		}
 	}
 
@@ -226,7 +218,7 @@
 }
 
 /* Main function */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret = 0;
 
@@ -244,20 +236,19 @@
 	output_init();
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 
 	sa.sa_flags = 0;
 
 	sa.sa_handler = sighdl;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL))) {
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGALRM, &sa, NULL))) {
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-
 #if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
 
@@ -265,66 +256,57 @@
 
 	ret = pthread_create(&fl_rec, NULL, flood_receiver, &flooding);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to create a thread");
 	}
 
 	ret = pthread_create(&fl_snd1, NULL, flooder_1, &fl_rec);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to create a thread");
 	}
 
 	ret = pthread_create(&fl_snd2, NULL, flooder_2, &fl_rec);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to create a thread");
 	}
 
 	ret = pthread_create(&sy_rec, NULL, sync_rec, &synchro);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to create a thread");
 	}
 
 	ret = pthread_create(&sy_snd, NULL, sync_send, &sy_rec);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Unable to create a thread");
 	}
 
 	/* Wait the user stops the test */
 	ret = pthread_join(fl_snd1, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	ret = pthread_join(fl_snd2, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	flooding = 0;
 	ret = pthread_join(fl_rec, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	ret = pthread_join(sy_snd, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
@@ -332,13 +314,13 @@
 
 	ret = pthread_join(sy_rec, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	/* We've been asked to stop */
-	output("pthread_kill stress test PASSED -- %llu iterations\n", iterations);
+	output("pthread_kill stress test PASSED -- %llu iterations\n",
+	       iterations);
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_kill/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_kill/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_kill/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_kill/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/s-c.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/s-c.c
index 25291f0..0cd8710 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/s-c.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/s-c.c
@@ -33,29 +33,29 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include <sys/resource.h>
- #include <sys/time.h>
+#include <pthread.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <sys/resource.h>
+#include <sys/time.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -90,46 +90,46 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-typedef struct _teststruct
-{
+typedef struct _teststruct {
 	pthread_mutex_t mtx[10 * SCALABILITY_FACTOR];
 	pthread_mutexattr_t ma[5];
 	pthread_mutexattr_t *pma[10 * SCALABILITY_FACTOR];
-	struct _teststruct * prev;
+	struct _teststruct *prev;
 } teststruct_t;
 
-int types[]={PTHREAD_MUTEX_NORMAL,
-					PTHREAD_MUTEX_ERRORCHECK,
-					PTHREAD_MUTEX_RECURSIVE,
-					PTHREAD_MUTEX_DEFAULT};
+int types[] = { PTHREAD_MUTEX_NORMAL,
+	PTHREAD_MUTEX_ERRORCHECK,
+	PTHREAD_MUTEX_RECURSIVE,
+	PTHREAD_MUTEX_DEFAULT
+};
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	struct rlimit rl;
 	int ret;
 	int i;
 	teststruct_t *cur, *prev;
- 	struct timeval  time_zero, time_cour, time_res, time_sav[8];
- 	long sav= 0;
+	struct timeval time_zero, time_cour, time_res, time_sav[8];
+	long sav = 0;
 
 	/* Limit the process memory to a small value (64Mb for example). */
-	rl.rlim_max=1024 * 1024 * 32 * SCALABILITY_FACTOR;
-	rl.rlim_cur=rl.rlim_max;
-	if ((ret = setrlimit(RLIMIT_AS,  &rl)))
-	{ UNRESOLVED(ret, "Memory limitation failed"); }
-	#if VERBOSE > 1
-	output(";Memory is now limited to %dMb\n", 	rl.rlim_max >> 20);
-	#endif
+	rl.rlim_max = 1024 * 1024 * 32 * SCALABILITY_FACTOR;
+	rl.rlim_cur = rl.rlim_max;
+	if ((ret = setrlimit(RLIMIT_AS, &rl))) {
+		UNRESOLVED(ret, "Memory limitation failed");
+	}
+#if VERBOSE > 1
+	output(";Memory is now limited to %dMb\n", rl.rlim_max >> 20);
+#endif
 
 	prev = NULL;
 	cur = NULL;
 
 	/* Loop while we have memory left */
-	while (1)
-	{
+	while (1) {
 		/* Allocate memory for 10 mutex and related stuff */
 		cur = malloc(sizeof(teststruct_t));
-		if (cur == NULL) /* No memory left */
+		if (cur == NULL)	/* No memory left */
 			break;
 
 		/* Link to the previous so we are able to free memory */
@@ -137,34 +137,35 @@
 		prev = cur;
 
 		/* Initialize the mutex attributes */
-			/* We will have:
-			 * pma[0] = NULL
-			 * pma[1] = NORMAL type mutex attribute
-			 * pma[2] = RECURSIVE type mutex attribute
-			 * pma[3] = ERRORCHECK type mutex attribute
-			 * pma[4] = DEFAULT type mutex attribute
-			 * pma[5] = default mutex attribute
-			 * pma[6] = NORMAL type mutex attribute
-			 * pma[7] = RECURSIVE type mutex attribute
-			 * pma[8] = ERRORCHECK type mutex attribute
-			 * pma[9] = DEFAULT type mutex attribute
-			 * pma[10] = pma[5] ...
-			 */
-		for (i=0; i<5; i++)
-		{
-			if ((ret = pthread_mutexattr_init(&(cur->ma[i]))))
-			{ UNRESOLVED(ret, "Mutex attribute init failed"); }
-			if (i)
-			{
-				if ((ret = pthread_mutexattr_settype(&(cur->ma[i]), types[i-1])))
-				{ UNRESOLVED(ret, "Mutex settype failed"); }
+		/* We will have:
+		 * pma[0] = NULL
+		 * pma[1] = NORMAL type mutex attribute
+		 * pma[2] = RECURSIVE type mutex attribute
+		 * pma[3] = ERRORCHECK type mutex attribute
+		 * pma[4] = DEFAULT type mutex attribute
+		 * pma[5] = default mutex attribute
+		 * pma[6] = NORMAL type mutex attribute
+		 * pma[7] = RECURSIVE type mutex attribute
+		 * pma[8] = ERRORCHECK type mutex attribute
+		 * pma[9] = DEFAULT type mutex attribute
+		 * pma[10] = pma[5] ...
+		 */
+		for (i = 0; i < 5; i++) {
+			if ((ret = pthread_mutexattr_init(&(cur->ma[i])))) {
+				UNRESOLVED(ret, "Mutex attribute init failed");
+			}
+			if (i) {
+				if ((ret =
+				     pthread_mutexattr_settype(&(cur->ma[i]),
+							       types[i - 1]))) {
+					UNRESOLVED(ret, "Mutex settype failed");
+				}
 			}
 		}
-		cur->pma[0]=NULL;
-		for (i=1; i<(10 * SCALABILITY_FACTOR); i++)
-		{
-			cur->pma[i]=&(cur->ma[i % 5]);
-		} /* The mutex attributes are now initialized */
+		cur->pma[0] = NULL;
+		for (i = 1; i < (10 * SCALABILITY_FACTOR); i++) {
+			cur->pma[i] = &(cur->ma[i % 5]);
+		}		/* The mutex attributes are now initialized */
 
 		/* Save the time */
 		gettimeofday(&time_zero, NULL);
@@ -178,44 +179,47 @@
 		 * if WITH_LOCKS,
 		 * - lock the mutex
 		 */
-		for (i=0; i<10 * SCALABILITY_FACTOR; i++)
-		{
+		for (i = 0; i < 10 * SCALABILITY_FACTOR; i++) {
 			ret = pthread_mutex_init(&(cur->mtx[i]), cur->pma[i]);
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 1st init failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 1st init failed");
+			}
 			ret = pthread_mutex_destroy(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 1st destroy failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 1st destroy failed");
+			}
 			ret = pthread_mutex_init(&(cur->mtx[i]), cur->pma[i]);
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 2nd init failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 2nd init failed");
+			}
 			ret = pthread_mutex_lock(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 1st lock failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 1st lock failed");
+			}
 			ret = pthread_mutex_unlock(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 1st unlock failed"); }
-			#ifdef WITH_LOCKS
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 1st unlock failed");
+			}
+#ifdef WITH_LOCKS
 			ret = pthread_mutex_lock(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 2st lock failed"); }
-			#endif
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 2st lock failed");
+			}
+#endif
 		}
 		/* Compute the operation duration */
 		gettimeofday(&time_cour, NULL);
-		time_res.tv_usec = time_cour.tv_usec + 1000000 - time_zero.tv_usec;
-		if (time_res.tv_usec < 1000000)
-		{
-			time_res.tv_sec = time_cour.tv_sec - 1 - time_zero.tv_sec;
-		}
-		else
-		{
+		time_res.tv_usec =
+		    time_cour.tv_usec + 1000000 - time_zero.tv_usec;
+		if (time_res.tv_usec < 1000000) {
+			time_res.tv_sec =
+			    time_cour.tv_sec - 1 - time_zero.tv_sec;
+		} else {
 			time_res.tv_sec = time_cour.tv_sec - time_zero.tv_sec;
 			time_res.tv_usec -= 1000000;
 		}
 
-		if (sav >3)
-		{
+		if (sav > 3) {
 			time_sav[4].tv_sec = time_sav[5].tv_sec;
 			time_sav[4].tv_usec = time_sav[5].tv_usec;
 			time_sav[5].tv_sec = time_sav[6].tv_sec;
@@ -229,65 +233,72 @@
 			time_sav[sav].tv_usec = time_res.tv_usec;
 		}
 		sav++;
-		#if VERBOSE > 2
-		output("%4i.%06i;\n",  time_res.tv_sec, time_res.tv_usec);
-		#endif
+#if VERBOSE > 2
+		output("%4i.%06i;\n", time_res.tv_sec, time_res.tv_usec);
+#endif
 	}
-	if (errno != ENOMEM)
-	{  UNRESOLVED(errno, "Memory not full"); }
+	if (errno != ENOMEM) {
+		UNRESOLVED(errno, "Memory not full");
+	}
 
 	/* Now we just have to cleanup everything. */
-	while (prev != NULL)
-	{
+	while (prev != NULL) {
 		cur = prev;
 		prev = cur->prev;
 
 		/* Free the mutex resources in the cur element */
-		for (i=0; i<10 * SCALABILITY_FACTOR; i++)
-		{
-			#ifdef WITH_LOCKS
+		for (i = 0; i < 10 * SCALABILITY_FACTOR; i++) {
+#ifdef WITH_LOCKS
 			ret = pthread_mutex_unlock(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 2nd unlock failed"); }
-			#endif
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 2nd unlock failed");
+			}
+#endif
 			ret = pthread_mutex_destroy(&(cur->mtx[i]));
-			if (ret)
-			{ UNRESOLVED(ret, "Mutex 2nd destroy failed"); }
+			if (ret) {
+				UNRESOLVED(ret, "Mutex 2nd destroy failed");
+			}
 		}
 		/* Free the mutex attributes resources in the cur element */
-		for (i=0; i<5; i++)
-		{
-			if ((ret = pthread_mutexattr_destroy(&(cur->ma[i]))))
-			{ UNRESOLVED(ret, "Mutex attribute destroy failed"); }
+		for (i = 0; i < 5; i++) {
+			if ((ret = pthread_mutexattr_destroy(&(cur->ma[i])))) {
+				UNRESOLVED(ret,
+					   "Mutex attribute destroy failed");
+			}
 		}
-		 /* Free the element memory */
-		 free(cur);
+		/* Free the element memory */
+		free(cur);
 	}
-	#if VERBOSE > 0
-	if (sav < 8)
-	{
+#if VERBOSE > 0
+	if (sav < 8) {
 		output("Not enough iterations to build statistics\n");
-	}
-	else
-	{
+	} else {
 		output("Duration for the operations:\n");
-		output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec, time_sav[0].tv_usec);
-		output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec, time_sav[1].tv_usec);
-		output(" %8i : %2i.%06i s\n", 2, time_sav[2].tv_sec, time_sav[2].tv_usec);
-		output(" %8i : %2i.%06i s\n", 3, time_sav[3].tv_sec, time_sav[3].tv_usec);
+		output(" %8i : %2i.%06i s\n", 0, time_sav[0].tv_sec,
+		       time_sav[0].tv_usec);
+		output(" %8i : %2i.%06i s\n", 1, time_sav[1].tv_sec,
+		       time_sav[1].tv_usec);
+		output(" %8i : %2i.%06i s\n", 2, time_sav[2].tv_sec,
+		       time_sav[2].tv_usec);
+		output(" %8i : %2i.%06i s\n", 3, time_sav[3].tv_sec,
+		       time_sav[3].tv_usec);
 		output(" [...]\n");
-		output(" %8i : %2i.%06i s\n", sav-3, time_sav[4].tv_sec, time_sav[4].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav-2, time_sav[5].tv_sec, time_sav[5].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav-1, time_sav[6].tv_sec, time_sav[6].tv_usec);
-		output(" %8i : %2i.%06i s\n", sav   , time_sav[7].tv_sec, time_sav[7].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 3, time_sav[4].tv_sec,
+		       time_sav[4].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 2, time_sav[5].tv_sec,
+		       time_sav[5].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav - 1, time_sav[6].tv_sec,
+		       time_sav[6].tv_usec);
+		output(" %8i : %2i.%06i s\n", sav, time_sav[7].tv_sec,
+		       time_sav[7].tv_usec);
 	}
-	#endif
+#endif
 
 	PASSED;
 }
 
 #else /* WITHOUT_XOPEN */
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	output_init();
 	UNRESOLVED(0, "This test requires XSI features");
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/stress.c
index 37719e0..5e6bbad 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/stress.c
@@ -24,29 +24,29 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <signal.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -79,22 +79,23 @@
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-char do_it=1;
+char do_it = 1;
 #ifndef WITHOUT_XOPEN
-int types[]={PTHREAD_MUTEX_NORMAL,
-					PTHREAD_MUTEX_ERRORCHECK,
-					PTHREAD_MUTEX_RECURSIVE,
-					PTHREAD_MUTEX_DEFAULT};
+int types[] = { PTHREAD_MUTEX_NORMAL,
+	PTHREAD_MUTEX_ERRORCHECK,
+	PTHREAD_MUTEX_RECURSIVE,
+	PTHREAD_MUTEX_DEFAULT
+};
 #endif
 
 /******** Threads function *********/
-void * threaded (void * arg)
+void *threaded(void *arg)
 {
-	int me=(int)arg;
+	int me = (int)arg;
 	pthread_mutex_t mtx;
-	pthread_mutex_t * pmtx;
+	pthread_mutex_t *pmtx;
 	pthread_mutexattr_t ma;
-	pthread_mutexattr_t * pma;
+	pthread_mutexattr_t *pma;
 	int ret;
 #ifndef WITHOUT_XOPEN
 	int sz = 2 + (sizeof(types) / sizeof(int));
@@ -102,62 +103,65 @@
 	int sz = 2;
 #endif
 	/* We will use mutex from the stack or from malloc'ed memory */
-	char loc = ((me % 5) %2);
+	char loc = ((me % 5) % 2);
 
-	if (loc)
-	{
+	if (loc) {
 		pmtx = &mtx;
-	}
-	else
-	{
+	} else {
 		pmtx = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
-		if (pmtx == NULL)
-		{ UNRESOLVED(errno, "Memory allocation for mutex failed"); }
+		if (pmtx == NULL) {
+			UNRESOLVED(errno, "Memory allocation for mutex failed");
+		}
 	}
 
 	me %= sz;
 
-	switch (me)
-	{
-		case 0: /* We will initialize the mutex with NULL pointer */
-			pma = NULL;
+	switch (me) {
+	case 0:		/* We will initialize the mutex with NULL pointer */
+		pma = NULL;
+		break;
+
+	default:		/* We will initialize the mutex with an attribute object */
+		if ((ret = pthread_mutexattr_init(&ma))) {
+			UNRESOLVED(ret, "Mutex attribute init failed");
+		}
+		pma = &ma;
+
+		if (me == 1)
 			break;
 
-		default: /* We will initialize the mutex with an attribute object */
-			if ((ret = pthread_mutexattr_init(&ma)))
-			{ UNRESOLVED(ret, "Mutex attribute init failed"); }
-			pma = &ma;
-
-			if (me == 1)
-				break;
-
-			if ((ret = pthread_mutexattr_settype(&ma, types[me-2])))
-			{ UNRESOLVED(ret, "Mutex attribute settype failed"); }
+		if ((ret = pthread_mutexattr_settype(&ma, types[me - 2]))) {
+			UNRESOLVED(ret, "Mutex attribute settype failed");
+		}
 	}
 
-	while (do_it)
-	{
+	while (do_it) {
 		ret = pthread_mutex_init(pmtx, pma);
-		if (ret != 0)
-		{ FAILED("Mutex init failed");	}
+		if (ret != 0) {
+			FAILED("Mutex init failed");
+		}
 		/* We use the mutex to check everything is OK */
 		ret = pthread_mutex_lock(pmtx);
-		if (ret != 0)
-		{ FAILED("Mutex lock failed");	}
+		if (ret != 0) {
+			FAILED("Mutex lock failed");
+		}
 		ret = pthread_mutex_unlock(pmtx);
-		if (ret != 0)
-		{ FAILED("Mutex unlock failed");	}
+		if (ret != 0) {
+			FAILED("Mutex unlock failed");
+		}
 		ret = pthread_mutex_destroy(pmtx);
-		if (ret != 0)
-		{ FAILED("Mutex destroy failed");	}
+		if (ret != 0) {
+			FAILED("Mutex destroy failed");
+		}
 	}
 
-	if (!loc) /* mutex was malloc'ed */
+	if (!loc)		/* mutex was malloc'ed */
 		free(pmtx);
 
 	if (me)
-		if ((ret = pthread_mutexattr_destroy(pma)))
-		{ FAILED("Mutex attribute destroy failed at the end"); }
+		if ((ret = pthread_mutexattr_destroy(pma))) {
+			FAILED("Mutex attribute destroy failed at the end");
+		}
 
 	return NULL;
 }
@@ -165,12 +169,14 @@
 /******** Signal handler ************/
 void sighdl(int sig)
 {
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /******** Parent thread *************/
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	struct sigaction sa;
 	pthread_t threads[N * SCALABILITY_FACTOR];
@@ -179,36 +185,37 @@
 
 	output_init();
 
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-
-	for (i=0; (i<(N * SCALABILITY_FACTOR) && (ret == 0)); i++)
-	{
-		ret = pthread_create(&threads[i], NULL, threaded, (void *) i);
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-	if (ret != 0) /* A thread creation failed */
-	{
-		 /* Stop the started threads */
-		do {do_it = 0;}
+
+	for (i = 0; (i < (N * SCALABILITY_FACTOR) && (ret == 0)); i++) {
+		ret = pthread_create(&threads[i], NULL, threaded, (void *)i);
+	}
+	if (ret != 0) {		/* A thread creation failed */
+		/* Stop the started threads */
+		do {
+			do_it = 0;
+		}
 		while (do_it);
-		for (; i>0; i--)
-			pthread_join(threads[i-1], NULL);
+		for (; i > 0; i--)
+			pthread_join(threads[i - 1], NULL);
 
 		UNRESOLVED(ret, "Unable to create enough threads");
 	}
 
 	/* Every threads were created; we now just wait */
-	for (i=0; i<(N * SCALABILITY_FACTOR); i++)
-	{
-		if ((ret = pthread_join(threads[i], NULL)))
-		{ FAILED("Unable to join a thread"); }
+	for (i = 0; i < (N * SCALABILITY_FACTOR); i++) {
+		if ((ret = pthread_join(threads[i], NULL))) {
+			FAILED("Unable to join a thread");
+		}
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("pthread_mutex_init stress test passed\n");
-	#endif
+#endif
 
 	/* Everything went OK */
 	PASSED;
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/testfrmw.c
index cd336d8..e8269be 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/testfrmw.c
@@ -39,15 +39,17 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
+
+void output(char *string, ...)
 {
-   va_list ap;
-   pthread_mutex_lock(&m_trace);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+	va_list ap;
+	pthread_mutex_lock(&m_trace);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c1.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c1.c
index 7e46816..27a7e46 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c1.c
@@ -31,28 +31,28 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -75,7 +75,7 @@
 /********************************** Configuration ******************************************/
 /********************************************************************************************/
 #ifndef SCALABILITY_FACTOR
-#define SCALABILITY_FACTOR 1  /* This is not used in this testcase */
+#define SCALABILITY_FACTOR 1	/* This is not used in this testcase */
 #endif
 #ifndef VERBOSE
 #define VERBOSE 2
@@ -86,12 +86,12 @@
 /********************************************************************************************/
 
 #ifndef WITHOUT_XOPEN
-int types[]={
+int types[] = {
 	PTHREAD_MUTEX_NORMAL,
 	PTHREAD_MUTEX_ERRORCHECK,
 	PTHREAD_MUTEX_RECURSIVE,
 	PTHREAD_MUTEX_DEFAULT
-	};
+};
 #endif
 
 /* The mutex the threads will block on */
@@ -109,65 +109,69 @@
 /*****
  *
  */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret;
 	int i;
 	int bool;
 
-	for (i=0; i<5; i++)
-	{
-		ret=pthread_mutex_lock(&mtx[i]);
-		if (ret == 0) /* The thread was blocked successfuly */
-		{
+	for (i = 0; i < 5; i++) {
+		ret = pthread_mutex_lock(&mtx[i]);
+		if (ret == 0) {	/* The thread was blocked successfuly */
 			/* We increment nbth[i] */
 			ret = pthread_mutex_lock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unable to lock 'm'");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to lock 'm'");
+			}
 			nbthOK[i]++;
 			bool = ((nbthOK[i] + nbthNOK[i]) >= nbthTOT);
 			ret = pthread_mutex_unlock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unable to unlock 'm'");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to unlock 'm'");
+			}
 
 			/* We can unlock the test mutex */
 			ret = pthread_mutex_unlock(&mtx[i]);
-			if (ret != 0)
-			{  FAILED("Unlocking a test mutex failed");  }
-		}
-		else /* Locking the test mutex failed */
-		{
+			if (ret != 0) {
+				FAILED("Unlocking a test mutex failed");
+			}
+		} else {	/* Locking the test mutex failed */
+
 			/* We increment nbth[i] */
 			ret = pthread_mutex_lock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unable to lock 'm'");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to lock 'm'");
+			}
 			nbthNOK[i]++;
 			bool = ((nbthOK[i] + nbthNOK[i]) >= nbthTOT);
 			ret = pthread_mutex_unlock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unable to unlock 'm'");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to unlock 'm'");
+			}
 		}
 
 		/* When every thread has passed the lock call, bool is true.
 		   we signal the main thread to release the next mutex. */
 
-		if (bool)
-		{
+		if (bool) {
 			ret = pthread_cond_signal(&cnd);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Signaling the condition failed");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Signaling the condition failed");
+			}
 		}
 	}
 
 	/* The test is terminated, the thread can die */
 	ret = pthread_detach(pthread_self());
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Thread detach failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread detach failed");
+	}
 
 	return NULL;
 }
 
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	pthread_t th;
 	pthread_attr_t tha;
@@ -177,147 +181,159 @@
 
 	output_init();
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Test starting, initializing data\n");
-	#endif
+#endif
 
 	/* Init the shared data */
-	for (i=0; i<4; i++)
-	{
-		nbthOK[i]=0;
-		nbthNOK[i]=0;
+	for (i = 0; i < 4; i++) {
+		nbthOK[i] = 0;
+		nbthNOK[i] = 0;
 	}
-	nbthTOT=0;
+	nbthTOT = 0;
 
 	/* Init the cnd */
 	ret = pthread_mutex_init(&m, NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to initialize 'm'");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize 'm'");
+	}
 	ret = pthread_cond_init(&cnd, NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to initialize 'cnd'");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize 'cnd'");
+	}
 
 	/* Init the 5 mutexes */
 	ret = pthread_mutexattr_init(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to initialize 'ma'");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize 'ma'");
+	}
 
-	for (i=0; i<5; i++)
-	{
-		#ifndef WITHOUT_XOPEN
-		if (i > 0)
-		{
-			ret = pthread_mutexattr_settype(&ma, types[i-1]);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unable to set mutex attribute type");  }
+	for (i = 0; i < 5; i++) {
+#ifndef WITHOUT_XOPEN
+		if (i > 0) {
+			ret = pthread_mutexattr_settype(&ma, types[i - 1]);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set mutex attribute type");
+			}
 		}
-		#endif
+#endif
 		ret = pthread_mutex_init(&mtx[i], &ma);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "A mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "A mutex init failed");
+		}
 	}
 
 	ret = pthread_mutexattr_destroy(&ma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to destroy the mutex attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to destroy the mutex attribute object");
+	}
 
 	/* Lock the mutexes */
-	for (i=0; i<5; i++)
-	{
+	for (i = 0; i < 5; i++) {
 		ret = pthread_mutex_lock(&mtx[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to lock a mutex for the first time");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to lock a mutex for the first time");
+		}
 	}
 
 	/* Init the threads attribute */
 	ret = pthread_attr_init(&tha);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Thread attribute init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread attribute init failed");
+	}
 
 	ret = pthread_attr_setstacksize(&tha, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to set stack size to minimum value");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to set stack size to minimum value");
+	}
 
 	/* Create as many threads as possible */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Creating threads...\n");
-	#endif
-	do
-	{
+#endif
+	do {
 		ret = pthread_create(&th, &tha, threaded, NULL);
 		if (ret == 0)
 			nbthTOT++;
 	} while (ret == 0);
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Created %d threads.\n", nbthTOT);
-	#endif
+#endif
 
 	/* lock m */
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to lock 'm' in main thread");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock 'm' in main thread");
+	}
 
 	/* For each mutex */
-	for (i=0; i<5; i++)
-	{
+	for (i = 0; i < 5; i++) {
 		/* Yield to let other threads enter the lock function */
 		sched_yield();
 
 		/* unlock the test mutex */
 		ret = pthread_mutex_unlock(&mtx[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to unlock a test mutex in main thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to unlock a test mutex in main thread");
+		}
 
 		/* wait for cnd */
-		do { ret = pthread_cond_wait(&cnd, &m); }
+		do {
+			ret = pthread_cond_wait(&cnd, &m);
+		}
 		while ((ret == 0) && ((nbthOK[i] + nbthNOK[i]) < nbthTOT));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to wait for 'cnd'");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to wait for 'cnd'");
+		}
 	}
 
 	/* unlock m */
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Final 'm' unlock failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Final 'm' unlock failed");
+	}
 
 	/* Destroy everything */
 	ret = pthread_attr_destroy(&tha);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Final thread attribute destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Final thread attribute destroy failed");
+	}
 
-	for (i=0; i<5; i++)
-	{
+	for (i = 0; i < 5; i++) {
 		ret = pthread_mutex_destroy(&mtx[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to destroy a test mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to destroy a test mutex");
+		}
 	}
 
 	ret = pthread_cond_destroy(&cnd);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Final cond destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Final cond destroy failed");
+	}
 
 	ret = pthread_mutex_destroy(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Final mutex destroy failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Final mutex destroy failed");
+	}
 
 	/* Output the results */
 	output("Sample results:\n");
 	output(" %lu threads were created\n", nbthTOT);
-	for (i=0; i<5; i++)
-	{
-		output(" %lu threads have waited on mutex %i\n", nbthOK[i], i+1);
+	for (i = 0; i < 5; i++) {
+		output(" %lu threads have waited on mutex %i\n", nbthOK[i],
+		       i + 1);
 		output("  (and %lu threads could not wait)\n", nbthNOK[i]);
 		ret += nbthNOK[i];
 	}
 
 	/* Exit */
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		PASSED;
-	}
-	else
-	{
+	} else {
 		FAILED("There may be an issue in scalability");
 	}
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c2.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c2.c
index 137939b..e59bc1c 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c2.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c2.c
@@ -40,28 +40,28 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
+#include <pthread.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -84,7 +84,7 @@
 /********************************** Configuration ******************************************/
 /********************************************************************************************/
 #ifndef SCALABILITY_FACTOR
-#define SCALABILITY_FACTOR 1  /* This is not used in this testcase */
+#define SCALABILITY_FACTOR 1	/* This is not used in this testcase */
 #endif
 #ifndef VERBOSE
 #define VERBOSE 2
@@ -95,22 +95,22 @@
 /********************************************************************************************/
 
 #ifndef WITHOUT_XOPEN
-int types[]={
+int types[] = {
 	PTHREAD_MUTEX_NORMAL,
 	PTHREAD_MUTEX_ERRORCHECK,
 	PTHREAD_MUTEX_RECURSIVE,
 	PTHREAD_MUTEX_DEFAULT
-	};
+};
 #endif
 
 /* The condition used to signal the main thread to go to the next step */
 pthread_cond_t cnd;
-pthread_mutex_t m=PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
 char do_it;
 unsigned long counter;
 
 /* Mutex attribute objects and pointers */
-pthread_mutexattr_t * pma[6];
+pthread_mutexattr_t *pma[6];
 #ifdef WITHOUT_XOPEN
 pthread_mutexattr_t ma[1];
 #else
@@ -118,13 +118,12 @@
 #endif
 
 /* Test data type */
-typedef struct _td
-{
+typedef struct _td {
 	pthread_t child;
 	int id;
 	pthread_mutex_t mtx;
 	int error;
-	struct _td * next; /* It is a chained list */
+	struct _td *next;	/* It is a chained list */
 } testdata_t;
 
 /* Thread attribute object */
@@ -133,20 +132,20 @@
 /*****
  * Level 2 - grandchild function
  */
-void * sub(void * arg)
+void *sub(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 	td->error = pthread_mutex_lock(&(td->mtx));
-	if (td->error != 0)
-	{
+	if (td->error != 0) {
 		/* Print out the error */
-		output("PROBLEM: Unable to lock the mutex in thread %i\n", td->id);
-	}
-	else
-	{
+		output("PROBLEM: Unable to lock the mutex in thread %i\n",
+		       td->id);
+	} else {
 		td->error = pthread_mutex_unlock(&(td->mtx));
-		if (td->error != 0)
-		{  UNRESOLVED(td->error, "Mutex unlock failed. Mutex data was corrupted?");  }
+		if (td->error != 0) {
+			UNRESOLVED(td->error,
+				   "Mutex unlock failed. Mutex data was corrupted?");
+		}
 	}
 
 	return NULL;
@@ -155,32 +154,34 @@
 /*****
  * Level 1 - child function
  */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
-	testdata_t * td = (testdata_t *)arg;
+	testdata_t *td = (testdata_t *) arg;
 	int ret;
 	int ret_create;
 	pthread_t ch;
 
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to lock 'm' in child");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock 'm' in child");
+	}
 	/* Mark this thread as started */
 	counter++;
 
 	/* Initialize the mutex with the mutex attribute */
 	ret = pthread_mutex_init(&(td->mtx), pma[td->id % 6]);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to initialize a mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize a mutex");
+	}
 
 	/* Lock the mutex */
 	td->error = pthread_mutex_lock(&(td->mtx));
-	if (td->error != 0)
-	{
+	if (td->error != 0) {
 		/* If the lock failed, we stop now */
 		ret = pthread_mutex_unlock(&m);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to unlock 'm' in child");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to unlock 'm' in child");
+		}
 		return NULL;
 	}
 
@@ -188,33 +189,37 @@
 	ret_create = pthread_create(&ch, &ta, sub, arg);
 
 	/* Wait for the condition */
-	while (do_it)
-	{
+	while (do_it) {
 		ret = pthread_cond_wait(&cnd, &m);
-		if (ret != 0)
-		{ UNRESOLVED(ret, "Unable to wait for condvar");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to wait for condvar");
+		}
 	}
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to unlock 'm' in child");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock 'm' in child");
+	}
 
 	/* Unlock the mutex and release the child */
 	ret = pthread_mutex_unlock(&(td->mtx));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex unlock failed. Mutex data was corrupted?");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "Mutex unlock failed. Mutex data was corrupted?");
+	}
 
 	/* If the child exists, join it now */
-	if (ret_create == 0)
-	{
+	if (ret_create == 0) {
 		ret = pthread_join(ch, NULL);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Grandchild join failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Grandchild join failed");
+		}
 	}
 
 	/* Destroy the test mutex */
 	ret = pthread_mutex_destroy(&(td->mtx));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Test mutex destroy failed. Corrupted data?");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Test mutex destroy failed. Corrupted data?");
+	}
 
 	/* We're done */
 	return NULL;
@@ -223,7 +228,7 @@
 /*****
  * Level 0 - main function
  */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	int i;
@@ -233,80 +238,82 @@
 
 	output_init();
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("Test starting, initializing data\n");
-	#endif
+#endif
 
 	do_it = 1;
-	errors=0;
+	errors = 0;
 	counter = 0;
-	sentinel.next=NULL;
+	sentinel.next = NULL;
 	sentinel.id = 0;
 	cur = &sentinel;
 
 	/* Initialize the 6 pma objects */
-	pma[0]=NULL;
-	pma[1]=&ma[0];
+	pma[0] = NULL;
+	pma[1] = &ma[0];
 	ret = pthread_mutexattr_init(pma[1]);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex attribute init failed");  }
-	#ifdef WITHOUT_XOPEN
-	/* We only have default attributes objects */
-	pma[2]=pma[0];
-	pma[4]=pma[0];
-	pma[3]=pma[1];
-	pma[5]=pma[1];
-	#if VERBOSE > 1
-	output("Default mutex attribute object was initialized\n");
-	#endif
-	#else
-	/* We can use the different mutex types */
-	for (i=0; i<4; i++)
-	{
-		pma[i+2]=&ma[i+1];
-		ret = pthread_mutexattr_init(pma[i+2]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex attribute init failed");  }
-		ret = pthread_mutexattr_settype(pma[i+2], types[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex attribute settype failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex attribute init failed");
 	}
-	#if VERBOSE > 1
-	output("%d types of mutex attribute objects were initialized\n", sizeof(types)/sizeof(types[0]));
-	#endif
-	#endif
+#ifdef WITHOUT_XOPEN
+	/* We only have default attributes objects */
+	pma[2] = pma[0];
+	pma[4] = pma[0];
+	pma[3] = pma[1];
+	pma[5] = pma[1];
+#if VERBOSE > 1
+	output("Default mutex attribute object was initialized\n");
+#endif
+#else
+	/* We can use the different mutex types */
+	for (i = 0; i < 4; i++) {
+		pma[i + 2] = &ma[i + 1];
+		ret = pthread_mutexattr_init(pma[i + 2]);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attribute init failed");
+		}
+		ret = pthread_mutexattr_settype(pma[i + 2], types[i]);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex attribute settype failed");
+		}
+	}
+#if VERBOSE > 1
+	output("%d types of mutex attribute objects were initialized\n",
+	       sizeof(types) / sizeof(types[0]));
+#endif
+#endif
 
 	/* Initialize the thread attribute object */
 	ret = pthread_attr_init(&ta);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Thread attribute init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Thread attribute init failed");
+	}
 	ret = pthread_attr_setstacksize(&ta, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to set stack size to minimum value");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to set stack size to minimum value");
+	}
 
 	/* Lock m */
 	ret = pthread_mutex_lock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to lock 'm' in main");  }
-
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to lock 'm' in main");
+	}
+#if VERBOSE > 1
 	output("Ready to create the threads, processing...\n");
-	#endif
+#endif
 
 	/* create the threads */
-	while (1)
-	{
-		tmp = (testdata_t *)malloc(sizeof(testdata_t));
-		if (tmp == NULL)
-		{
+	while (1) {
+		tmp = (testdata_t *) malloc(sizeof(testdata_t));
+		if (tmp == NULL) {
 			/* We cannot create anymore testdata */
 			break;
 		}
 
 		/* We have a new test data structure */
 		ret = pthread_create(&(tmp->child), &ta, threaded, tmp);
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			/* We cannot create more threads */
 			free((void *)tmp);
 			break;
@@ -317,61 +324,60 @@
 		tmp->error = 0;
 		cur = tmp;
 
-		/* The new thread was created, let's start it*/
-		do
-		{
+		/* The new thread was created, let's start it */
+		do {
 			/* Unlock m so the thread can acquire it */
 			ret = pthread_mutex_unlock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Unlock 'm' failed in main loop");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unlock 'm' failed in main loop");
+			}
 			/* Make sure the thread has a chance to run */
 			sched_yield();
 			/* Get m back */
 			ret = pthread_mutex_lock(&m);
-			if (ret != 0)
-			{  UNRESOLVED(ret, "Lock 'm' failed in main loop");  }
-		/* If the counter has been incremented, this means this child is in the cond wait loop */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Lock 'm' failed in main loop");
+			}
+			/* If the counter has been incremented, this means this child is in the cond wait loop */
 		} while (counter != cur->id);
 	}
 
 	/* Unable to create more threads, let's signal the cond and join the threads */
-	#if VERBOSE > 1
-	if (tmp == NULL)
-	{
+#if VERBOSE > 1
+	if (tmp == NULL) {
 		output("Cannot malloc more memory for the test data.\n");
-	}
-	else
-	{
-		output("Cannot create another thread (error: %d).\n",
-		ret);
+	} else {
+		output("Cannot create another thread (error: %d).\n", ret);
 	}
 	output("The children will now be signaled.\n");
-	#endif
-	do_it=0;
+#endif
+	do_it = 0;
 	ret = pthread_cond_broadcast(&cnd);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Cond broadcast failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Cond broadcast failed");
+	}
 
 	ret = pthread_mutex_unlock(&m);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to unlock m after broadcast");  }
-
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to unlock m after broadcast");
+	}
+#if VERBOSE > 1
 	output("The children are terminating. We will join them.\n");
-	#endif
+#endif
 
 	/* All the threads are terminating, we can join the children and destroy the testdata */
 	cur = &sentinel;
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		/* Remove the first item from the list */
 		tmp = cur->next;
 		cur->next = tmp->next;
 
 		/* Join the thread from the current item */
 		ret = pthread_join(tmp->child, NULL);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to join a child");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to join a child");
+		}
 
 		/* get the useful data */
 		if (tmp->error != 0)
@@ -384,22 +390,19 @@
 	/* We are done */
 
 	/* Exit */
-	if (errors == 0)
-	{
-		#if VERBOSE > 1
+	if (errors == 0) {
+#if VERBOSE > 1
 		output("The test passed successfully.\n");
 		output("  %i mutex were created and locked.\n", counter);
 		output("  No error was encountered\n");
-		#endif
+#endif
 		PASSED;
-	}
-	else
-	{
-		#if VERBOSE > 0
+	} else {
+#if VERBOSE > 0
 		output("The test failed.\n");
 		output("  %i mutex were created.\n", counter);
 		output("  %i lock operation failed.\n", errors);
-		#endif
+#endif
 		FAILED("There may be an issue in scalability");
 	}
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/stress.c
index 581b813..ec4673a 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/stress.c
@@ -40,21 +40,21 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We enable the following line to have mutex attributes defined */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <errno.h>
- #include <semaphore.h>
- #include <signal.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <errno.h>
+#include <semaphore.h>
+#include <signal.h>
+#include <unistd.h>
 #if _POSIX_TIMEOUTS < 0
 #error "This sample needs POSIX TIMEOUTS option support"
 #endif
@@ -68,16 +68,16 @@
 #warning "This sample needs POSIX TIMERS option support"
 #endif
 
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include <time.h> /* required for the pthread_mutex_timedlock() function */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <time.h>		/* required for the pthread_mutex_timedlock() function */
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -105,74 +105,80 @@
 #ifndef VERBOSE
 #define VERBOSE 2
 #endif
-#define N 2  /* N * 10 * 6 * SCALABILITY_FACTOR threads will be created */
+#define N 2			/* N * 10 * 6 * SCALABILITY_FACTOR threads will be created */
 
 /********************************************************************************************/
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
-char do_it=1;
+char do_it = 1;
 #ifndef WITHOUT_XOPEN
-int types[]={PTHREAD_MUTEX_NORMAL,
-					PTHREAD_MUTEX_ERRORCHECK,
-					PTHREAD_MUTEX_RECURSIVE,
-					PTHREAD_MUTEX_DEFAULT};
+int types[] = { PTHREAD_MUTEX_NORMAL,
+	PTHREAD_MUTEX_ERRORCHECK,
+	PTHREAD_MUTEX_RECURSIVE,
+	PTHREAD_MUTEX_DEFAULT
+};
 #endif
 
 /* The following type represents the data
  * for one group of ten threads */
-typedef struct
-{
-	pthread_t  threads[10]; /* The 10 threads */
-	pthread_mutex_t mtx;  /* The mutex those threads work on */
-	char ctrl;                       /* The value used to check the behavior */
-	char sigok;                   /* Used to tell the threads they can return */
-	sem_t  semsig;             /* Semaphore for synchronizing the signal handler */
-	int id;                             /* An identifier for the threads group */
-	int tcnt;	 /* we need to make sure the threads are started before killing 'em */
+typedef struct {
+	pthread_t threads[10];	/* The 10 threads */
+	pthread_mutex_t mtx;	/* The mutex those threads work on */
+	char ctrl;		/* The value used to check the behavior */
+	char sigok;		/* Used to tell the threads they can return */
+	sem_t semsig;		/* Semaphore for synchronizing the signal handler */
+	int id;			/* An identifier for the threads group */
+	int tcnt;		/* we need to make sure the threads are started before killing 'em */
 	pthread_mutex_t tmtx;
-	unsigned long long sigcnt, opcnt; /* We count every iteration */
+	unsigned long long sigcnt, opcnt;	/* We count every iteration */
 } cell_t;
 
-pthread_key_t  _c; /* this key will always contain a pointer to the thread's cell */
+pthread_key_t _c;		/* this key will always contain a pointer to the thread's cell */
 
 /***** The next function is in charge of sending signal USR2 to
  * all the other threads in its cell, until the end of the test. */
-void * sigthr(void * arg)
+void *sigthr(void *arg)
 {
 	int ret;
-	int i=0;
-	cell_t * c = (cell_t *)arg;
+	int i = 0;
+	cell_t *c = (cell_t *) arg;
 
-	do
-	{
+	do {
 		sched_yield();
 		ret = pthread_mutex_lock(&(c->tmtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to lock the mutex");
+		}
 		i = c->tcnt;
 		ret = pthread_mutex_unlock(&(c->tmtx));
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
-	} while (i<9);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock the mutex");
+		}
+	} while (i < 9);
 
 	/* Until we must stop, do */
-	while (do_it)
-	{
+	while (do_it) {
 		/* Wait for the semaphore */
 		ret = sem_wait(&(c->semsig));
-		if (ret != 0)
-		{  UNRESOLVED(errno, "Sem wait failed in signal thread"); }
+		if (ret != 0) {
+			UNRESOLVED(errno, "Sem wait failed in signal thread");
+		}
 
 		/* Kill the next thread */
 		i %= 9;
 		ret = pthread_kill(c->threads[++i], SIGUSR2);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Thread kill failed in signal thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Thread kill failed in signal thread");
+		}
 
 		/* Increment the signal counter */
 		c->sigcnt++;
 	}
 
 	/* Tell the other threads they can now stop */
-	do {  c->sigok = 1;  }
+	do {
+		c->sigok = 1;
+	}
 	while (c->sigok == 0);
 
 	return NULL;
@@ -183,31 +189,36 @@
 void sighdl(int sig)
 {
 	int ret;
-	cell_t * c = (cell_t *) pthread_getspecific(_c);
+	cell_t *c = (cell_t *) pthread_getspecific(_c);
 	ret = sem_post(&(c->semsig));
-	if (ret != 0)
-	{  UNRESOLVED(errno, "Unable to post semaphore in signal handler");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to post semaphore in signal handler");
+	}
 }
 
 /***** The next function can return only when the sigthr has terminated.
  * This avoids the signal thread try to kill a terminated thread. */
 void waitsigend(cell_t * c)
 {
-	while (c->sigok == 0)
-	{  sched_yield();  }
+	while (c->sigok == 0) {
+		sched_yield();
+	}
 }
 
 /***** The next function aims to control that no other thread
  * owns the mutex at the same time */
-void control(cell_t * c, char * loc)
+void control(cell_t * c, char *loc)
 {
-	*loc++; /* change the local control value */
-	if (c->ctrl != 0)
-	{  FAILED("Got a non-zero value - two threads owns the mutex");  }
+	*loc++;			/* change the local control value */
+	if (c->ctrl != 0) {
+		FAILED("Got a non-zero value - two threads owns the mutex");
+	}
 	c->ctrl = *loc;
 	sched_yield();
-	if (c->ctrl != *loc)
-	{  FAILED("Got a different value - another thread touched protected data");  }
+	if (c->ctrl != *loc) {
+		FAILED
+		    ("Got a different value - another thread touched protected data");
+	}
 	c->ctrl = 0;
 
 	/* Avoid some values for the next control */
@@ -219,36 +230,42 @@
 
 /***** The next 3 functions are the worker threads
  */
-void * lockthr(void * arg)
+void *lockthr(void *arg)
 {
 	int ret;
-	char loc; /* Local value for control */
-	cell_t * c = (cell_t *)arg;
+	char loc;		/* Local value for control */
+	cell_t *c = (cell_t *) arg;
 
 	/* Set the thread local data key value (used in the signal handler) */
 	ret = pthread_setspecific(_c, arg);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to assign the thread-local-data key");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to assign the thread-local-data key");
+	}
 
 	/* Signal we're started */
 	ret = pthread_mutex_lock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock the mutex");
+	}
 	c->tcnt += 1;
 	ret = pthread_mutex_unlock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex");
+	}
 
-	do
-	{
+	do {
 		/* Lock, control, then unlock */
 		ret = pthread_mutex_lock(&(c->mtx));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex lock failed in worker thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex lock failed in worker thread");
+		}
 
 		control(c, &loc);
 
 		ret = pthread_mutex_unlock(&(c->mtx));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex unlock failed in worker thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex unlock failed in worker thread");
+		}
 
 		/* Increment the operation counter */
 		c->opcnt++;
@@ -260,44 +277,52 @@
 	return NULL;
 }
 
-void * timedlockthr(void * arg)
+void *timedlockthr(void *arg)
 {
 	int ret;
-	char loc; /* Local value for control */
+	char loc;		/* Local value for control */
 	struct timespec ts;
-	cell_t * c = (cell_t *)arg;
+	cell_t *c = (cell_t *) arg;
 
 	/* Set the thread local data key value (used in the signal handler) */
 	ret = pthread_setspecific(_c, arg);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to assign the thread-local-data key");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to assign the thread-local-data key");
+	}
 
 	/* Signal we're started */
 	ret = pthread_mutex_lock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock the mutex");
+	}
 	c->tcnt += 1;
 	ret = pthread_mutex_unlock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex");
+	}
 
-	do
-	{
+	do {
 		/* Lock, control, then unlock */
-		do
-		{
+		do {
 			ret = clock_gettime(CLOCK_REALTIME, &ts);
-			if (ret != 0)
-			{  UNRESOLVED(errno, "Unable to get time for timeout");  }
-			ts.tv_sec++; /* We will wait for 1 second */
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Unable to get time for timeout");
+			}
+			ts.tv_sec++;	/* We will wait for 1 second */
 			ret = pthread_mutex_timedlock(&(c->mtx), &ts);
 		} while (ret == ETIMEDOUT);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Timed mutex lock failed in worker thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Timed mutex lock failed in worker thread");
+		}
 
 		control(c, &loc);
 
 		ret = pthread_mutex_unlock(&(c->mtx));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex unlock failed in worker thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex unlock failed in worker thread");
+		}
 
 		/* Increment the operation counter */
 		c->opcnt++;
@@ -309,39 +334,45 @@
 	return NULL;
 }
 
-void * trylockthr(void * arg)
+void *trylockthr(void *arg)
 {
 	int ret;
-	char loc; /* Local value for control */
-	cell_t * c = (cell_t *)arg;
+	char loc;		/* Local value for control */
+	cell_t *c = (cell_t *) arg;
 
 	/* Set the thread local data key value (used in the signal handler) */
 	ret = pthread_setspecific(_c, arg);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to assign the thread-local-data key");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to assign the thread-local-data key");
+	}
 
 	/* Signal we're started */
 	ret = pthread_mutex_lock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to lock the mutex");
+	}
 	c->tcnt += 1;
 	ret = pthread_mutex_unlock(&(c->tmtx));
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to unlock the mutex");
+	}
 
-	do
-	{
+	do {
 		/* Lock, control, then unlock */
-		do
-		{
+		do {
 			ret = pthread_mutex_trylock(&(c->mtx));
-		}  while (ret == EBUSY);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex lock try failed in worker thread");  }
+		} while (ret == EBUSY);
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Mutex lock try failed in worker thread");
+		}
 
 		control(c, &loc);
 
 		ret = pthread_mutex_unlock(&(c->mtx));
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Mutex unlock failed in worker thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex unlock failed in worker thread");
+		}
 
 		/* Increment the operation counter */
 		c->opcnt++;
@@ -355,10 +386,10 @@
 
 /***** The next function initializes a cell_t object
  * This includes running the threads */
-void cell_init(int id, cell_t * c, pthread_mutexattr_t *pma)
+void cell_init(int id, cell_t * c, pthread_mutexattr_t * pma)
 {
 	int ret, i;
-	pthread_attr_t  pa; /* We will specify a minimal stack size */
+	pthread_attr_t pa;	/* We will specify a minimal stack size */
 
 	/* mark this group with its ID */
 	c->id = id;
@@ -371,121 +402,133 @@
 
 	/* Initialize the mutex */
 	ret = pthread_mutex_init(&(c->tmtx), NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex init failed"); }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex init failed");
+	}
 	ret = pthread_mutex_init(&(c->mtx), pma);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Mutex init failed"); }
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex init failed");
+	}
+#if VERBOSE > 1
 	output("Mutex initialized in cell %i\n", id);
-	#endif
+#endif
 
 	/* Initialize the semaphore */
 	ret = sem_init(&(c->semsig), 0, 0);
-	if (ret != 0)
-	{  UNRESOLVED(errno, "Sem init failed"); }
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(errno, "Sem init failed");
+	}
+#if VERBOSE > 1
 	output("Semaphore initialized in cell %i\n", id);
-	#endif
+#endif
 
 	/* Create the thread attribute with the minimal size */
 	ret = pthread_attr_init(&pa);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to create pthread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to create pthread attribute object");
+	}
 	ret = pthread_attr_setstacksize(&pa, sysconf(_SC_THREAD_STACK_MIN));
-	if (ret != 0)
- 	{  UNRESOLVED(ret, "Unable to specify minimal stack size");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to specify minimal stack size");
+	}
 
 	/* Create the signal thread */
-	ret = pthread_create(&(c->threads[0]), &pa, sigthr, (void *) c);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to create the signal thread"); }
+	ret = pthread_create(&(c->threads[0]), &pa, sigthr, (void *)c);
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to create the signal thread");
+	}
 
 	/* Create 5 "lock" threads */
-	for (i=1; i<=5; i++)
-	{
-		ret = pthread_create(&(c->threads[i]), &pa, lockthr, (void *) c);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to create a locker thread"); }
+	for (i = 1; i <= 5; i++) {
+		ret = pthread_create(&(c->threads[i]), &pa, lockthr, (void *)c);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to create a locker thread");
+		}
 	}
 
 	/* Create 2 "timedlock" threads */
-	for (i=6; i<=7; i++)
-	{
-		ret = pthread_create(&(c->threads[i]), &pa, timedlockthr, (void *) c);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to create a (timed) locker thread"); }
+	for (i = 6; i <= 7; i++) {
+		ret =
+		    pthread_create(&(c->threads[i]), &pa, timedlockthr,
+				   (void *)c);
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to create a (timed) locker thread");
+		}
 	}
 
 	/* Create 2 "trylock" threads */
-	for (i=8; i<=9; i++)
-	{
-		ret = pthread_create(&(c->threads[i]), &pa, trylockthr, (void *) c);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to create a (try) locker thread"); }
+	for (i = 8; i <= 9; i++) {
+		ret =
+		    pthread_create(&(c->threads[i]), &pa, trylockthr,
+				   (void *)c);
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to create a (try) locker thread");
+		}
 	}
 
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("All threads initialized in cell %i\n", id);
-	#endif
+#endif
 
 	/* Destroy the thread attribute object */
 	ret = pthread_attr_destroy(&pa);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to destroy thread attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to destroy thread attribute object");
+	}
 
 	/* Tell the signal thread to start working */
 	ret = sem_post(&(c->semsig));
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to post signal semaphore");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to post signal semaphore");
+	}
 }
 
 /***** The next function destroys a cell_t object
  * This includes stopping the threads */
-void cell_fini(
-				int id,
-				cell_t * c,
-				unsigned long long * globalopcount,
-				unsigned long long * globalsigcount  )
+void cell_fini(int id,
+	       cell_t * c,
+	       unsigned long long *globalopcount,
+	       unsigned long long *globalsigcount)
 {
 	int ret, i;
 
 	/* Just a basic check */
-	if (id != c->id)
-	{
+	if (id != c->id) {
 		output("Something is wrong: Cell %i has id %i\n", id, c->id);
 		FAILED("Some memory has been corrupted");
 	}
 
 	/* Start with joining the threads */
-	for (i=0; i<10; i++)
-	{
+	for (i = 0; i < 10; i++) {
 		ret = pthread_join(c->threads[i], NULL);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to join a thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to join a thread");
+		}
 	}
 
 	/* Destroy the semaphore and the mutex */
 	ret = sem_destroy(&(c->semsig));
-	if (ret != 0)
-	{  UNRESOLVED(errno, "Unable to destroy the semaphore");  }
+	if (ret != 0) {
+		UNRESOLVED(errno, "Unable to destroy the semaphore");
+	}
 
 	ret = pthread_mutex_destroy(&(c->mtx));
-	if (ret != 0)
-	{
-		output("Unable to destroy the mutex in cell %i (ret = %i)\n", id, ret);
+	if (ret != 0) {
+		output("Unable to destroy the mutex in cell %i (ret = %i)\n",
+		       id, ret);
 		FAILED("Mutex destruction failed");
 	}
 
 	/* Report the cell counters */
 	*globalopcount += c->opcnt;
 	*globalsigcount += c->sigcnt;
-	#if VERBOSE > 1
-	output("Counters for cell %i:\n\t%llu locks and unlocks\n\t%llu signals\n",
-	                   id,
-	                   c->opcnt,
-	                   c->sigcnt);
-	#endif
+#if VERBOSE > 1
+	output
+	    ("Counters for cell %i:\n\t%llu locks and unlocks\n\t%llu signals\n",
+	     id, c->opcnt, c->sigcnt);
+#endif
 
 	/* We are done with this cell. */
 }
@@ -496,14 +539,16 @@
 void globalsig(int sig)
 {
 	output("Signal received, processing. Please wait...\n");
-	do { do_it=0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /******
  * Last but not least, the main function
  */
-int main(int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	/* Main is responsible for :
 	 * the mutex attributes initializing
@@ -514,115 +559,122 @@
 	int ret;
 	int i;
 	struct sigaction sa;
-	unsigned long long globopcnt=0, globsigcnt=0;
+	unsigned long long globopcnt = 0, globsigcnt = 0;
 
-	#ifndef WITHOUT_XOPEN
+#ifndef WITHOUT_XOPEN
 	int sz = 2 + (sizeof(types) / sizeof(int));
-	#else
+#else
 	int sz = 2;
-	#endif
-	pthread_mutexattr_t ma[sz-1];
+#endif
+	pthread_mutexattr_t ma[sz - 1];
 	pthread_mutexattr_t *pma[sz];
 
 	cell_t data[sz * N * SCALABILITY_FACTOR];
 
-	pma[sz-1] = NULL;
+	pma[sz - 1] = NULL;
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Mutex lock / unlock stress sample is starting\n");
 	output("Kill with SIGUSR1 to stop the process\n");
 	output("\t kill -USR1 <pid>\n\n");
-	#endif
+#endif
 
 	/* Initialize the mutex attributes */
-	for (i=0; i<sz-1; i++)
-	{
+	for (i = 0; i < sz - 1; i++) {
 		pma[i] = &ma[i];
 		ret = pthread_mutexattr_init(pma[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to init a mutex attribute object");  }
-		#ifndef WITHOUT_XOPEN  /* we have the mutex attribute types */
-		if (i != 0)
-		{
-			ret = pthread_mutexattr_settype(pma[i], types[i-1]);
-			if (ret != 0)
-			{
-				UNRESOLVED(ret, "Unable to set type of a mutex attribute object");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to init a mutex attribute object");
+		}
+#ifndef WITHOUT_XOPEN		/* we have the mutex attribute types */
+		if (i != 0) {
+			ret = pthread_mutexattr_settype(pma[i], types[i - 1]);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set type of a mutex attribute object");
 			}
 		}
-		#endif
+#endif
 	}
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("%i mutex attribute objects were initialized\n", sz - 1);
-	#endif
+#endif
 
 	/* Initialize the thread-local-data key */
 	ret = pthread_key_create(&_c, NULL);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to initialize TLD key");  }
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to initialize TLD key");
+	}
+#if VERBOSE > 1
 	output("TLD key initialized\n");
-	#endif
+#endif
 
 	/* Register the signal handler for SIGUSR1  */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = globalsig;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
 
 	/* Register the signal handler for SIGUSR2  */
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR2, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
+	if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
 
 	/* Start every threads */
-	#if VERBOSE > 0
-	output("%i cells of 10 threads are being created...\n", sz * N * SCALABILITY_FACTOR);
-	#endif
-	for (i=0; i< sz * N * SCALABILITY_FACTOR; i++)
+#if VERBOSE > 0
+	output("%i cells of 10 threads are being created...\n",
+	       sz * N * SCALABILITY_FACTOR);
+#endif
+	for (i = 0; i < sz * N * SCALABILITY_FACTOR; i++)
 		cell_init(i, &data[i], pma[i % sz]);
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("All threads created and running.\n");
-	#endif
+#endif
 
 	/* We stay here while not interrupted */
-	do { sched_yield(); }
+	do {
+		sched_yield();
+	}
 	while (do_it);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("Starting to join the threads...\n");
-	#endif
+#endif
 	/* Everybody is stopping, we must join them, and destroy the cell data */
-	for (i=0; i< sz * N * SCALABILITY_FACTOR; i++)
+	for (i = 0; i < sz * N * SCALABILITY_FACTOR; i++)
 		cell_fini(i, &data[i], &globopcnt, &globsigcnt);
 
 	/* Destroy the mutex attributes objects */
-	for (i=0; i<sz-1; i++)
-	{
+	for (i = 0; i < sz - 1; i++) {
 		ret = pthread_mutexattr_destroy(pma[i]);
-		if (ret != 0)
-		{  UNRESOLVED(ret, "Unable to destroy a mutex attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Unable to destroy a mutex attribute object");
+		}
 	}
 
 	/* Destroy the thread-local-data key */
 	ret = pthread_key_delete(_c);
-	if (ret != 0)
-	{  UNRESOLVED(ret, "Unable to destroy TLD key");  }
-	#if VERBOSE > 1
+	if (ret != 0) {
+		UNRESOLVED(ret, "Unable to destroy TLD key");
+	}
+#if VERBOSE > 1
 	output("TLD key destroyed\n");
-	#endif
+#endif
 
 	/* output the total counters */
-	#if VERBOSE > 1
+#if VERBOSE > 1
 	output("===============================================\n");
-	#endif
-	#if VERBOSE > 0
+#endif
+#if VERBOSE > 0
 	output("Total counters:\n\t%llu locks and unlocks\n\t%llu signals\n",
-	                   globopcnt,
-	                   globsigcnt);
+	       globopcnt, globsigcnt);
 	output("pthread_mutex_lock stress test passed.\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/testfrmw.c
index cd336d8..e8269be 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/testfrmw.c
@@ -39,15 +39,17 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
+
+void output(char *string, ...)
 {
-   va_list ap;
-   pthread_mutex_lock(&m_trace);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+	va_list ap;
+	pthread_mutex_lock(&m_trace);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/stress.c
index 1742905..2ab25d7 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/stress.c
@@ -39,30 +39,30 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* We need the XSI extention for the mutex attributes */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
  /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
- #include <errno.h>
- #include <semaphore.h>
- #include <signal.h>
+#include <errno.h>
+#include <semaphore.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -100,66 +100,75 @@
 /***********************************    Test case   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
+char do_it = 1;
 
 /* Signal handler which will stop the stress run */
 void sighdl(int sig)
 {
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /* Timeout thread */
-void * timer(void * arg)
+void *timer(void *arg)
 {
 	unsigned int to = TIMEOUT;
-	do { to = sleep(to); }
-	while (to>0);
-	FAILED("Operation timed out. EBUSY was returned while a thread acquired the mutex?.");
-	return NULL; /* For compiler */
+	do {
+		to = sleep(to);
+	}
+	while (to > 0);
+	FAILED
+	    ("Operation timed out. EBUSY was returned while a thread acquired the mutex?.");
+	return NULL;		/* For compiler */
 }
 
 /* Test specific data */
-char go_on=0;
+char go_on = 0;
 
-typedef struct
-{
-	pthread_mutex_t * mtx;
-	pthread_barrier_t * bar;
+typedef struct {
+	pthread_mutex_t *mtx;
+	pthread_barrier_t *bar;
 } testdata_t;
 
-struct _scenar
-{
-	int m_type; /* Mutex type to use */
-	int m_pshared; /* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
-	char * descr; /* Case description */
-}
-scenarii[] =
-{
-	 {PTHREAD_MUTEX_DEFAULT,    0, "Default mutex"}
+struct _scenar {
+	int m_type;		/* Mutex type to use */
+	int m_pshared;		/* 0: mutex is process-private (default) ~ !0: mutex is process-shared, if supported */
+	char *descr;		/* Case description */
+} scenarii[] = {
+	{
+	PTHREAD_MUTEX_DEFAULT, 0, "Default mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     0, "Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  0, "Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 0, "Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 0, "Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 0, "Recursive mutex"}
 #endif
 
-	,{PTHREAD_MUTEX_DEFAULT,    1, "Pshared mutex"}
+	, {
+	PTHREAD_MUTEX_DEFAULT, 1, "Pshared mutex"}
 #ifndef WITHOUT_XOPEN
-	,{PTHREAD_MUTEX_NORMAL,     1, "Pshared Normal mutex"}
-	,{PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
-	,{PTHREAD_MUTEX_RECURSIVE,  1, "Pshared Recursive mutex"}
+	, {
+	PTHREAD_MUTEX_NORMAL, 1, "Pshared Normal mutex"}
+	, {
+	PTHREAD_MUTEX_ERRORCHECK, 1, "Pshared Errorcheck mutex"}
+	, {
+	PTHREAD_MUTEX_RECURSIVE, 1, "Pshared Recursive mutex"}
 #endif
 };
+
 #define NSCENAR (sizeof(scenarii)/sizeof(scenarii[0]))
 
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
-	int ret = 0, ret2=0;
-	testdata_t * td = (testdata_t *) arg;
+	int ret = 0, ret2 = 0;
+	testdata_t *td = (testdata_t *) arg;
 
 	/* do */
-	do
-	{
+	do {
 		/* trylock the mutex */
 		ret = pthread_mutex_trylock(td->mtx);
 
@@ -171,33 +180,35 @@
 	while ((ret == EBUSY) && (go_on == 1));
 
 	/* if go_on==1 and ret == 0 */
-	if ((go_on == 1) && (ret == 0))
-	{
-		#if VERBOSE > 6
+	if ((go_on == 1) && (ret == 0)) {
+#if VERBOSE > 6
 		output("[child %p] I got the mutex\n", pthread_self());
-		#endif
+#endif
 
 		/* barrier */
 		ret2 = pthread_barrier_wait(td->bar);
-		if ((ret2 != 0) && (ret2 != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret2, "Pthread_barrier_wait failed");  }
+		if ((ret2 != 0) && (ret2 != PTHREAD_BARRIER_SERIAL_THREAD)) {
+			UNRESOLVED(ret2, "Pthread_barrier_wait failed");
+		}
 
 		/* go_on = 0 */
 		go_on = 0;
 	}
 
 	/* if ret == 0 */
-	if (ret == 0)
-	{
+	if (ret == 0) {
 		/* Unlock the mutex */
 		ret = pthread_mutex_unlock(td->mtx);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlock the mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to unlock the mutex");
+		}
 	}
 
 	/* end of thread */
 	return NULL;
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int ret;
 	struct sigaction sa;
@@ -210,103 +221,135 @@
 
 	int i, ch;
 	long pshared;
-	pthread_mutex_t mtx[NSCENAR+2];
+	pthread_mutex_t mtx[NSCENAR + 2];
 	pthread_mutexattr_t ma;
 	pthread_barrier_t bar;
 
- 	/* Initialize output */
+	/* Initialize output */
 	output_init();
 
 	/* System abilities */
 	pshared = sysconf(_SC_THREAD_PROCESS_SHARED);
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
 	/* Initialize the barrier */
 	ret = pthread_barrier_init(&bar, NULL, 2);
-	if (ret != 0)  {  UNRESOLVED(ret , "Barrier init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Barrier init failed");
+	}
 	td.bar = &bar;
 
 	/* Initialize every mutexattr & mutex objects */
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		ret = pthread_mutexattr_init(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
-		#ifndef WITHOUT_XOPEN
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "[parent] Unable to initialize the mutex attribute object");
+		}
+#ifndef WITHOUT_XOPEN
 		/* Set the mutex type */
 		ret = pthread_mutexattr_settype(&ma, scenarii[i].m_type);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set mutex type");  }
-		#endif
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Unable to set mutex type");
+		}
+#endif
 		/* Set the pshared attributes, if supported */
-		if ((pshared > 0) && (scenarii[i].m_pshared != 0))
-		{
-			ret = pthread_mutexattr_setpshared(&ma, PTHREAD_PROCESS_SHARED);
-			if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to set the mutex process-shared");  }
+		if ((pshared > 0) && (scenarii[i].m_pshared != 0)) {
+			ret =
+			    pthread_mutexattr_setpshared(&ma,
+							 PTHREAD_PROCESS_SHARED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "[parent] Unable to set the mutex process-shared");
+			}
 		}
 
 		/* Initialize the mutex */
 		ret = pthread_mutex_init(&mtx[i], &ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "[parent] Mutex init failed");
+		}
 
 		/* Destroy the ma object */
 		ret = pthread_mutexattr_destroy(&ma);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutexattr object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy the mutexattr object");
+		}
 	}
 	/* Default mutexattr object */
 	ret = pthread_mutexattr_init(&ma);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Unable to initialize the mutex attribute object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret,
+			   "[parent] Unable to initialize the mutex attribute object");
+	}
 	ret = pthread_mutex_init(&mtx[i], &ma);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Mutex init failed");
+	}
 	ret = pthread_mutexattr_destroy(&ma);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the mutexattr object");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to destroy the mutexattr object");
+	}
 	/* Default mutex */
-	ret = pthread_mutex_init(&mtx[i+1], NULL);
-	if (ret != 0)  {  UNRESOLVED(ret, "[parent] Mutex init failed");  }
+	ret = pthread_mutex_init(&mtx[i + 1], NULL);
+	if (ret != 0) {
+		UNRESOLVED(ret, "[parent] Mutex init failed");
+	}
 
 	i = 0;
 	/* While we are not asked to stop */
-	while (do_it)
-	{
+	while (do_it) {
 		/* Start the timeout thread */
 		ret = pthread_create(&t_timer, NULL, timer, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Unable to create timer thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Unable to create timer thread");
+		}
 
 		/* Set the td pointer to the next mutex */
 		td.mtx = &mtx[i];
 
 		/* lock this mutex */
 		ret = pthread_mutex_lock(td.mtx);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to lock a mutex");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to lock a mutex");
+		}
 
 		/* go_on = 1 */
 		go_on = 1;
 
 		/* Start the children */
-		for (ch=0; ch < NCHILDREN; ch++)
-		{
+		for (ch = 0; ch < NCHILDREN; ch++) {
 			ret = pthread_create(&t_child[ch], NULL, threaded, &td);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to create enough threads");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to create enough threads");
+			}
 		}
-		#if VERBOSE > 5
+#if VERBOSE > 5
 		output("[parent] The children are running...\n");
-		#endif
+#endif
 
 		/* do */
-		do
-		{
+		do {
 			/* unlock the mutex */
 			ret = pthread_mutex_unlock(td.mtx);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to unlcok the mutex");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to unlcok the mutex");
+			}
 
 			/* yield */
 			sched_yield();
@@ -316,27 +359,36 @@
 		}
 		/* while trylock succeeds */
 		while (ret == 0);
-		if (ret != EBUSY)  {  UNRESOLVED(ret, "An unexpected error occured");  }
-
-		#if VERBOSE > 6
-		output("[parent] Mutex is busy, a child shall be waiting on the barrier\n");
-		#endif
+		if (ret != EBUSY) {
+			UNRESOLVED(ret, "An unexpected error occured");
+		}
+#if VERBOSE > 6
+		output
+		    ("[parent] Mutex is busy, a child shall be waiting on the barrier\n");
+#endif
 
 		/* barrier */
 		ret = pthread_barrier_wait(&bar);
-		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))  {  UNRESOLVED(ret, "Pthread_barrier_wait failed");  }
+		if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
+			UNRESOLVED(ret, "Pthread_barrier_wait failed");
+		}
 
 		/* cancel the timeout thread */
 		ret = pthread_cancel(t_timer);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to cancel the timeout thread");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to cancel the timeout thread");
+		}
 
 		/* join every threads (incl. the timeout) */
 		ret = pthread_join(t_timer, NULL);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to join timeout thread");  }
-		for (ch=0; ch < NCHILDREN; ch++)
-		{
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to join timeout thread");
+		}
+		for (ch = 0; ch < NCHILDREN; ch++) {
 			ret = pthread_join(t_child[ch], NULL);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to join a child");  }
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to join a child");
+			}
 		}
 
 		/* next mutex */
@@ -346,17 +398,20 @@
 
 	/* destroy the barrier & mutexes objects */
 	ret = pthread_barrier_destroy(&bar);
-	if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy the barrier");  }
-
-	for (i=0; i<NSCENAR+2; i++)
-	{
-		ret = pthread_mutex_destroy(&mtx[i]);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a mutex");  }
+	if (ret != 0) {
+		UNRESOLVED(ret, "Failed to destroy the barrier");
 	}
 
-	#if VERBOSE > 0
+	for (i = 0; i < NSCENAR + 2; i++) {
+		ret = pthread_mutex_destroy(&mtx[i]);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to destroy a mutex");
+		}
+	}
+
+#if VERBOSE > 0
 	output("pthread_mutex_trylock stress test passed\n");
-	#endif
+#endif
 
 	/* test passed */
 	PASSED;
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_once/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_once/stress.c
index e579d01..35c79b6 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_once/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_once/stress.c
@@ -46,7 +46,7 @@
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
 #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.c"
 /* This header is responsible for defining the following macros:
  * UNRESOLVED(ret, descr);
  *    where descr is a description of the error and ret is an int (error code for example)
@@ -84,8 +84,7 @@
 /* Handler for user request to terminate */
 void sighdl(int sig)
 {
-	do
-	{
+	do {
 		do_it = 0;
 	}
 	while (do_it);
@@ -100,8 +99,7 @@
 	int ret = 0;
 	ret = pthread_mutex_lock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to lock mutex in initializer");
 	}
 
@@ -109,32 +107,29 @@
 
 	ret = pthread_mutex_unlock(&mtx);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to unlock mutex in initializer");
 	}
 
-	return ;
+	return;
 }
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
 	/* Wait for all threads being created */
 	ret = pthread_barrier_wait(arg);
 
-	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD))
-	{
+	if ((ret != 0) && (ret != PTHREAD_BARRIER_SERIAL_THREAD)) {
 		UNRESOLVED(ret, "Barrier wait failed");
 	}
 
 	/* Call init routine */
 	ret = pthread_once(&once_ctl, init_routine);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "pthread_once failed");
 	}
 
@@ -142,7 +137,7 @@
 }
 
 /* Main function */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret = 0, i;
 
@@ -150,7 +145,7 @@
 
 	pthread_barrier_t bar;
 
-	pthread_t th[ NTHREADS ];
+	pthread_t th[NTHREADS];
 
 	/* Initialize output routine */
 	output_init();
@@ -158,58 +153,49 @@
 	/* Initialize barrier */
 	ret = pthread_barrier_init(&bar, NULL, NTHREADS);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to init barrier");
 	}
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 
 	sa.sa_flags = 0;
 
 	sa.sa_handler = sighdl;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-
 #if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
 
 #endif
 
-	while (do_it)
-	{
+	while (do_it) {
 		/* Reinitialize once handler & check value */
 		once_ctl = PTHREAD_ONCE_INIT;
 		once_chk = 0;
 
 		/* create the threads */
 
-		for (i = 0; i < NTHREADS; i++)
-		{
-			ret = pthread_create(&th[ i ], NULL, threaded, &bar);
+		for (i = 0; i < NTHREADS; i++) {
+			ret = pthread_create(&th[i], NULL, threaded, &bar);
 
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				UNRESOLVED(ret, "Failed to create a thread");
 			}
 		}
 
 		/* Then join */
-		for (i = 0; i < NTHREADS; i++)
-		{
-			ret = pthread_join(th[ i ], NULL);
+		for (i = 0; i < NTHREADS; i++) {
+			ret = pthread_join(th[i], NULL);
 
-			if (ret != 0)
-			{
+			if (ret != 0) {
 				UNRESOLVED(ret, "Failed to join a thread");
 			}
 		}
@@ -217,22 +203,20 @@
 		/* check the value */
 		ret = pthread_mutex_lock(&mtx);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(ret, "Failed to lock mutex in initializer");
 		}
 
-		if (once_chk != 1)
-		{
+		if (once_chk != 1) {
 			output("Control: %d\n", once_chk);
 			FAILED("The initializer function did not execute once");
 		}
 
 		ret = pthread_mutex_unlock(&mtx);
 
-		if (ret != 0)
-		{
-			UNRESOLVED(ret, "Failed to unlock mutex in initializer");
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to unlock mutex in initializer");
 		}
 
 		iterations++;
@@ -240,12 +224,12 @@
 
 	/* We've been asked to stop */
 
-	output("pthread_once stress test PASSED -- %llu iterations\n", iterations);
+	output("pthread_once stress test PASSED -- %llu iterations\n",
+	       iterations);
 
 	ret = pthread_barrier_destroy(&bar);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to destroy the barrier");
 	}
 
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_once/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_once/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_once/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_once/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_self/stress.c b/testcases/open_posix_testsuite/stress/threads/pthread_self/stress.c
index bfe4720..7a71e45 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_self/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_self/stress.c
@@ -26,31 +26,31 @@
  */
 
  /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
- #define _POSIX_C_SOURCE 200112L
+#define _POSIX_C_SOURCE 200112L
 
  /* Some routines are part of the XSI Extensions */
 #ifndef WITHOUT_XOPEN
- #define _XOPEN_SOURCE	600
+#define _XOPEN_SOURCE	600
 #endif
 /********************************************************************************************/
 /****************************** standard includes *****************************************/
 /********************************************************************************************/
- #include <pthread.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
- #include <semaphore.h>
- #include <errno.h>
- #include <signal.h>
+#include <semaphore.h>
+#include <errno.h>
+#include <signal.h>
 
 /********************************************************************************************/
 /******************************   Test framework   *****************************************/
 /********************************************************************************************/
- #include "testfrmw.h"
- #include "testfrmw.c"
+#include "testfrmw.h"
+#include "testfrmw.c"
  /* This header is responsible for defining the following macros:
   * UNRESOLVED(ret, descr);
   *    where descr is a description of the error and ret is an int (error code for example)
@@ -93,86 +93,96 @@
 /***********************************    Real Test   *****************************************/
 /********************************************************************************************/
 
-char do_it=1;
-long long iterations=0;
+char do_it = 1;
+long long iterations = 0;
 
 /* Handler for user request to terminate */
 void sighdl(int sig)
 {
 	/* do_it = 0 */
-	do { do_it = 0; }
+	do {
+		do_it = 0;
+	}
 	while (do_it);
 }
 
 /* Protect concurrent access to the shared data */
-pthread_mutex_t m_synchro=PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t m_synchro = PTHREAD_MUTEX_INITIALIZER;
 
 /* Signaled when all threads are running */
-pthread_cond_t c_synchro =PTHREAD_COND_INITIALIZER;
+pthread_cond_t c_synchro = PTHREAD_COND_INITIALIZER;
 int c_boolean;
 
 /* Thread ID returned by pthread_self  */
 pthread_t running[NSCENAR];
 
 /* Thread function */
-void * threaded(void * arg)
+void *threaded(void *arg)
 {
-	int ret=0;
+	int ret = 0;
 	int me = *(int *)arg;
 
-	#if VERBOSE > 6
+#if VERBOSE > 6
 	output("[child%d] starting\n", me);
-	#endif
+#endif
 	/* Wait for all threads being created */
 	ret = pthread_mutex_lock(&m_synchro);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
-	#if VERBOSE > 6
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex lock failed");
+	}
+#if VERBOSE > 6
 	output("[child%d] got mutex\n", me);
-	#endif
+#endif
 
-	running[me]=pthread_self();
+	running[me] = pthread_self();
 
 	/* Signal we're running */
-	do { ret = sem_post(&scenarii[me].sem); }
+	do {
+		ret = sem_post(&scenarii[me].sem);
+	}
 	while ((ret == -1) && (errno == EINTR));
-	if (ret == -1)  {  UNRESOLVED(errno, "Failed to post the semaphore");  }
-	#if VERBOSE > 6
+	if (ret == -1) {
+		UNRESOLVED(errno, "Failed to post the semaphore");
+	}
+#if VERBOSE > 6
 	output("[child%d] posted semaphore %p\n", me, &scenarii[me].sem);
-	#endif
+#endif
 
-	while (!c_boolean)
-	{
+	while (!c_boolean) {
 		ret = pthread_cond_wait(&c_synchro, &m_synchro);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to wait the condvar");  }
-		#if VERBOSE > 6
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to wait the condvar");
+		}
+#if VERBOSE > 6
 		output("[child%d] awaken\n", me);
-		#endif
+#endif
 	}
 
 	ret = pthread_mutex_unlock(&m_synchro);
-	if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
-
-	#if VERBOSE > 6
+	if (ret != 0) {
+		UNRESOLVED(ret, "Mutex unlock failed");
+	}
+#if VERBOSE > 6
 	output("[child%d] exiting\n", me);
-	#endif
+#endif
 
 	return arg;
 }
 
 /* Main function */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	struct sigaction sa;
 
-	pthread_t creation[NSCENAR]; /* Thread ID returned in pthread_create */
-	int status[NSCENAR]; /* Status of thread creation */
+	pthread_t creation[NSCENAR];	/* Thread ID returned in pthread_create */
+	int status[NSCENAR];	/* Status of thread creation */
 	int ids[NSCENAR];
 
 	int i;
 
-	for (sc=0; sc<NSCENAR; sc++)
-		ids[sc]=sc;
+	for (sc = 0; sc < NSCENAR; sc++)
+		ids[sc] = sc;
 
 	/* Initialize output routine */
 	output_init();
@@ -181,129 +191,146 @@
 	scenar_init();
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 	sa.sa_flags = 0;
 	sa.sa_handler = sighdl;
-	if ((ret = sigaction (SIGUSR1, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	if ((ret = sigaction (SIGALRM, &sa, NULL)))
-	{ UNRESOLVED(ret, "Unable to register signal handler"); }
-	#if VERBOSE > 1
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
+		UNRESOLVED(ret, "Unable to register signal handler");
+	}
+#if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
-	#endif
+#endif
 
-	while (do_it)
-	{
+	while (do_it) {
 		/* Initialize the shared data */
 		c_boolean = 0;
 
 		/* Create all the threads */
-		for (sc=0; sc < NSCENAR; sc++)
-		{
+		for (sc = 0; sc < NSCENAR; sc++) {
 			/* Create the thread */
-			status[sc] = pthread_create(&creation[sc], &scenarii[sc].ta, threaded, &ids[sc]);
+			status[sc] =
+			    pthread_create(&creation[sc], &scenarii[sc].ta,
+					   threaded, &ids[sc]);
 
 			/* Check creation status */
-			switch (scenarii[sc].result)
-			{
-				case 0: /* Operation was expected to succeed */
-					if (status[sc] != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-					break;
+			switch (scenarii[sc].result) {
+			case 0:	/* Operation was expected to succeed */
+				if (status[sc] != 0) {
+					UNRESOLVED(ret,
+						   "Failed to create this thread");
+				}
+				break;
 
-				case 1: /* Operation was expected to fail */
-					if (status[sc] == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-					break;
+			case 1:	/* Operation was expected to fail */
+				if (status[sc] == 0) {
+					UNRESOLVED(-1,
+						   "An error was expected but the thread creation succeeded");
+				}
+				break;
 
-				case 2: /* We did not know the expected result */
-				default:
-					/* Nothing */
-					;
+			case 2:	/* We did not know the expected result */
+			default:
+				/* Nothing */
+				;
 			}
 		}
-		#if VERBOSE > 6
+#if VERBOSE > 6
 		output("[parent] threads created\n");
-		#endif
+#endif
 
 		/* Now wait that all threads are running */
-		for (sc=0; sc < NSCENAR; sc++)
-		{
-			if (status[sc] == 0) /* The new thread is running */
-			{
-				#if VERBOSE > 6
-				output("[parent] Waiting for thread %d: %p\n", sc, &scenarii[sc].sem);
-				#endif
-				do { ret = sem_wait(&scenarii[sc].sem); }
+		for (sc = 0; sc < NSCENAR; sc++) {
+			if (status[sc] == 0) {	/* The new thread is running */
+#if VERBOSE > 6
+				output("[parent] Waiting for thread %d: %p\n",
+				       sc, &scenarii[sc].sem);
+#endif
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
-			}
-		}
-
-		#if VERBOSE > 6
-		output("[parent] Locking the mutex\n");
-		#endif
-
-		ret = pthread_mutex_lock(&m_synchro);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex lock failed");  }
-
-		/* Now, we've got all shared data set, so we can seek for duplicates */
-		for (sc=0; sc < NSCENAR; sc++)
-		{
-			if (status[sc] != 0) /* The new thread is running */
-				continue;
-
-			if (pthread_equal(creation[sc], running[sc]) == 0)
-			{
-				output("pthread_create returned an ID of %p\n", creation[sc]);
-				output("pthread_self in the thread returned %p\n", running[sc]);
-				FAILED("Error: Values mismatch");
-			}
-
-			for (i=sc+1; i<NSCENAR; i++)
-			{
-				if (status[i] != 0)
-					continue;
-
-				if (pthread_equal(creation[sc], creation[i]))
-				{
-					FAILED("Two different running threads have the same ID");
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
 				}
 			}
 		}
-		#if VERBOSE > 6
+
+#if VERBOSE > 6
+		output("[parent] Locking the mutex\n");
+#endif
+
+		ret = pthread_mutex_lock(&m_synchro);
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex lock failed");
+		}
+
+		/* Now, we've got all shared data set, so we can seek for duplicates */
+		for (sc = 0; sc < NSCENAR; sc++) {
+			if (status[sc] != 0)	/* The new thread is running */
+				continue;
+
+			if (pthread_equal(creation[sc], running[sc]) == 0) {
+				output("pthread_create returned an ID of %p\n",
+				       creation[sc]);
+				output
+				    ("pthread_self in the thread returned %p\n",
+				     running[sc]);
+				FAILED("Error: Values mismatch");
+			}
+
+			for (i = sc + 1; i < NSCENAR; i++) {
+				if (status[i] != 0)
+					continue;
+
+				if (pthread_equal(creation[sc], creation[i])) {
+					FAILED
+					    ("Two different running threads have the same ID");
+				}
+			}
+		}
+#if VERBOSE > 6
 		output("[parent] No duplicate found\n");
-		#endif
+#endif
 
 		/* We're done, we can terminate the threads */
 		c_boolean = 1;
 		ret = pthread_mutex_unlock(&m_synchro);
-		if (ret != 0)  {  UNRESOLVED(ret, "Mutex unlock failed");  }
+		if (ret != 0) {
+			UNRESOLVED(ret, "Mutex unlock failed");
+		}
 
 		ret = pthread_cond_broadcast(&c_synchro);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to broadcast the cond");  }
-
-		#if VERBOSE > 6
+		if (ret != 0) {
+			UNRESOLVED(ret, "Failed to broadcast the cond");
+		}
+#if VERBOSE > 6
 		output("[parent] Cond broadcasted\n");
-		#endif
+#endif
 
 		/* Join the joinable threads */
-		for (sc=0; sc < NSCENAR; sc++)
-		{
-			if (status[sc] != 0) /* The new thread is running */
+		for (sc = 0; sc < NSCENAR; sc++) {
+			if (status[sc] != 0)	/* The new thread is running */
 				continue;
 
-			if (scenarii[sc].detached == 0)
-			{
-				#if VERBOSE > 6
+			if (scenarii[sc].detached == 0) {
+#if VERBOSE > 6
 				output("[parent] Joining %d\n", sc);
-				#endif
+#endif
 				ret = pthread_join(creation[sc], NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unalbe to join a thread");  }
-				#if VERBOSE > 6
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unalbe to join a thread");
+				}
+#if VERBOSE > 6
 				output("[parent] Joined %d\n", sc);
-				#endif
+#endif
 			}
 
-	 	}
+		}
 		iterations++;
 	}
 
@@ -311,7 +338,8 @@
 
 	scenar_fini();
 
-	output("pthread_exit stress test PASSED -- %llu iterations\n",iterations);
+	output("pthread_exit stress test PASSED -- %llu iterations\n",
+	       iterations);
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_self/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/pthread_self/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_self/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_self/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/pthread_self/threads_scenarii.c b/testcases/open_posix_testsuite/stress/threads/pthread_self/threads_scenarii.c
index 9e3d781..e0f970d 100644
--- a/testcases/open_posix_testsuite/stress/threads/pthread_self/threads_scenarii.c
+++ b/testcases/open_posix_testsuite/stress/threads/pthread_self/threads_scenarii.c
@@ -23,28 +23,26 @@
  *
  */
 
-struct __scenario
-{
-    /* Object to hold the given configuration, and which will be used to create the threads */
+struct __scenario {
+	/* Object to hold the given configuration, and which will be used to create the threads */
 	pthread_attr_t ta;
-    /* General parameters */
-	int detached;  		/* 0 => joinable; 1 => detached */
-    /* Scheduling parameters */
+	/* General parameters */
+	int detached;		/* 0 => joinable; 1 => detached */
+	/* Scheduling parameters */
 	int explicitsched;	/* 0 => sched policy is inherited; 1 => sched policy from the attr param */
 	int schedpolicy;	/* 0 => default; 1=> SCHED_FIFO; 2=> SCHED_RR */
 	int schedparam;		/* 0 => default sched param; 1 => max value for sched param; -1 => min value for sched param */
 	int altscope;		/* 0 => default contension scope; 1 => alternative contension scope */
-    /* Stack parameters */
+	/* Stack parameters */
 	int altstack;		/* 0 => system manages the stack; 1 => stack is provided */
 	int guard;		/* 0 => default guardsize; 1=> guardsize is 0; 2=> guard is 1 page -- this setting only affect system stacks (not user's). */
 	int altsize;		/* 0 => default stack size; 1 => stack size specified (min value) -- ignored when stack is provided */
-    /* Additionnal information */
-    	char * descr;		/* object description */
-	void * bottom;		/* Stores the stack start when an alternate stack is required */
+	/* Additionnal information */
+	char *descr;		/* object description */
+	void *bottom;		/* Stores the stack start when an alternate stack is required */
 	int result;		/* This thread creation is expected to: 0 => succeed; 1 => fail; 2 => unknown */
 	sem_t sem;		/* This semaphore is used to signal the end of the detached threads execution */
-} scenarii[]=
-
+} scenarii[] =
 #define CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,res) \
  { \
 	 .detached=det, \
@@ -58,99 +56,150 @@
  	 .descr=desc, \
  	 .bottom=NULL, \
 	 .result=res }
-
 #define CASE_POS(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,0)
 #define CASE_NEG(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,1)
 #define CASE_UNK(det,expl,scp,spa,sco,sta,gua,ssi,desc) CASE(det,expl,scp,spa,sco,sta,gua,ssi,desc,2)
-
- /*
-  * This array gives the different combinations of threads attributes for the testcases.
-  *
-  * Some combinations must be avoided.
-  * -> Do not have a detached thread use an alternative stack;
-  *     as we don't know when the thread terminates to free the stack memory
-  * -> ... (to be completed)
-  *
-  */
-
+    /*
+     * This array gives the different combinations of threads attributes for the testcases.
+     *
+     * Some combinations must be avoided.
+     * -> Do not have a detached thread use an alternative stack;
+     *     as we don't know when the thread terminates to free the stack memory
+     * -> ... (to be completed)
+     *
+     */
 {
-   /* Unary tests */
-/* 0*/	 CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+	/* Unary tests */
+/* 0*/ CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
 
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+/* 8*/
+	    , CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")
+/* 9*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
 
 /* We create several instances of the basic cases for the pthread_self testing */
-/* 0*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	/*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")*/
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
-/* 0*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	/*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")*/
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
-/* 0*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
-/* 1*/	,CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
-/* 2*/	,CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
-/* 3*/	,CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
-/* 4*/	,CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
-/* 5*/	,CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
-/* 6*/	,CASE_UNK(0, 0, 0,-1, 0, 0, 0, 0, "Min sched param")
-/* 7*/	,CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
-/* 8*/	/*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack")*/
-/* 9*/	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
-/*10*/	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
-/*11*/	,CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+/* 0*/ , CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+	    /* 8*//*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack") */
+/* 9*/ , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+/* 0*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+	    /* 8*//*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack") */
+/* 9*/ , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
+/* 0*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 0, "default")
+/* 1*/
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 0, 0, "detached")
+/* 2*/
+	    , CASE_POS(0, 1, 0, 0, 0, 0, 0, 0, "Explicit sched")
+/* 3*/
+	    , CASE_UNK(0, 0, 1, 0, 0, 0, 0, 0, "FIFO Policy")
+/* 4*/
+	    , CASE_UNK(0, 0, 2, 0, 0, 0, 0, 0, "RR Policy")
+/* 5*/
+	    , CASE_UNK(0, 0, 0, 1, 0, 0, 0, 0, "Max sched param")
+/* 6*/
+	    , CASE_UNK(0, 0, 0, -1, 0, 0, 0, 0, "Min sched param")
+/* 7*/
+	    , CASE_POS(0, 0, 0, 0, 1, 0, 0, 0, "Alternative contension scope")
+	    /* 8*//*,CASE_POS(0, 0, 0, 0, 0, 1, 0, 0, "Alternative stack") */
+/* 9*/ , CASE_POS(0, 0, 0, 0, 0, 0, 1, 0, "No guard size")
+/*10*/
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 0, "1p guard size")
+/*11*/
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 0, 1, "Min stack size")
 
-   /* Stack play */
-	,CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
-	,CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
-	/*,CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack") */
-	,CASE_POS(1, 0, 0, 0, 0, 0, 1, 1, "Detached, Min stack size, no guard")
-	,CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1, "Detached, Min stack size, 1p guard")
+	    /* Stack play */
+	    , CASE_POS(0, 0, 0, 0, 0, 0, 1, 1, "Min stack size, no guard")
+	    , CASE_UNK(0, 0, 0, 0, 0, 0, 2, 1, "Min stack size, 1p guard")
+	    /*,CASE_POS(1, 0, 0, 0, 0, 1, 0, 0, "Detached, Alternative stack") */
+	    , CASE_POS(1, 0, 0, 0, 0, 0, 1, 1,
+		       "Detached, Min stack size, no guard")
+	    , CASE_UNK(1, 0, 0, 0, 0, 0, 2, 1,
+		       "Detached, Min stack size, 1p guard")
 
-   /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
-	,CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
-	,CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
-	,CASE_UNK(0, 1, 1,-1, 0, 0, 0, 0, "Explicit FIFO min param")
-	,CASE_UNK(0, 1, 2,-1, 0, 0, 0, 0, "Explicit RR min param")
-	,CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0, "Explicit FIFO max param, alt scope")
-	,CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0, "Explicit RR max param, alt scope")
-	,CASE_UNK(0, 1, 1,-1, 1, 0, 0, 0, "Explicit FIFO min param, alt scope")
-	,CASE_UNK(0, 1, 2,-1, 1, 0, 0, 0, "Explicit RR min param, alt scope")
-	,CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0, "Detached, explicit FIFO max param")
-	,CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0, "Detached, explicit RR max param")
-	,CASE_UNK(1, 1, 1,-1, 0, 0, 0, 0, "Detached, explicit FIFO min param")
-	,CASE_UNK(1, 1, 2,-1, 0, 0, 0, 0, "Detached, explicit RR min param")
-	,CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0, "Detached, explicit FIFO max param, alt scope")
-	,CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0, "Detached, explicit RR max param, alt scope")
-	,CASE_UNK(1, 1, 1,-1, 1, 0, 0, 0, "Detached, explicit FIFO min param, alt scope")
-	,CASE_UNK(1, 1, 2,-1, 1, 0, 0, 0, "Detached, explicit RR min param, alt scope")
+	    /* Scheduling play -- all results are unknown since it might depend on the user priviledges */
+	    , CASE_UNK(0, 1, 1, 1, 0, 0, 0, 0, "Explicit FIFO max param")
+	    , CASE_UNK(0, 1, 2, 1, 0, 0, 0, 0, "Explicit RR max param")
+	    , CASE_UNK(0, 1, 1, -1, 0, 0, 0, 0, "Explicit FIFO min param")
+	    , CASE_UNK(0, 1, 2, -1, 0, 0, 0, 0, "Explicit RR min param")
+	    , CASE_UNK(0, 1, 1, 1, 1, 0, 0, 0,
+		       "Explicit FIFO max param, alt scope")
+	    , CASE_UNK(0, 1, 2, 1, 1, 0, 0, 0,
+		       "Explicit RR max param, alt scope")
+	    , CASE_UNK(0, 1, 1, -1, 1, 0, 0, 0,
+		       "Explicit FIFO min param, alt scope")
+	    , CASE_UNK(0, 1, 2, -1, 1, 0, 0, 0,
+		       "Explicit RR min param, alt scope")
+	    , CASE_UNK(1, 1, 1, 1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO max param")
+	    , CASE_UNK(1, 1, 2, 1, 0, 0, 0, 0,
+		       "Detached, explicit RR max param")
+	    , CASE_UNK(1, 1, 1, -1, 0, 0, 0, 0,
+		       "Detached, explicit FIFO min param")
+	    , CASE_UNK(1, 1, 2, -1, 0, 0, 0, 0,
+		       "Detached, explicit RR min param")
+	    , CASE_UNK(1, 1, 1, 1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO max param, alt scope")
+	    , CASE_UNK(1, 1, 2, 1, 1, 0, 0, 0,
+		       "Detached, explicit RR max param, alt scope")
+	    , CASE_UNK(1, 1, 1, -1, 1, 0, 0, 0,
+		       "Detached, explicit FIFO min param, alt scope")
+	    , CASE_UNK(1, 1, 2, -1, 1, 0, 0, 0,
+		       "Detached, explicit RR min param, alt scope")
 };
 
 #define NSCENAR (sizeof(scenarii) / sizeof(scenarii[0]))
@@ -158,103 +207,131 @@
 /* This function will initialize every pthread_attr_t object in the scenarii array */
 void scenar_init()
 {
-	int ret=0;
+	int ret = 0;
 	int i;
 	int old;
 	long pagesize, minstacksize;
 	long tsa, tss, tps;
 
-	pagesize	=sysconf(_SC_PAGESIZE);
-	minstacksize 	=sysconf(_SC_THREAD_STACK_MIN);
-	tsa		=sysconf(_SC_THREAD_ATTR_STACKADDR);
-	tss		=sysconf(_SC_THREAD_ATTR_STACKSIZE);
-	tps		=sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
+	pagesize = sysconf(_SC_PAGESIZE);
+	minstacksize = sysconf(_SC_THREAD_STACK_MIN);
+	tsa = sysconf(_SC_THREAD_ATTR_STACKADDR);
+	tss = sysconf(_SC_THREAD_ATTR_STACKSIZE);
+	tps = sysconf(_SC_THREAD_PRIORITY_SCHEDULING);
 
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("System abilities:\n");
 	output(" TSA: %li\n", tsa);
 	output(" TSS: %li\n", tss);
 	output(" TPS: %li\n", tps);
 	output(" pagesize: %li\n", pagesize);
 	output(" min stack size: %li\n", minstacksize);
-	#endif
+#endif
 
-	if (minstacksize % pagesize)
-	{
-		UNTESTED("The min stack size is not a multiple of the page size");
+	if (minstacksize % pagesize) {
+		UNTESTED
+		    ("The min stack size is not a multiple of the page size");
 	}
 
-	for (i=0; i<NSCENAR; i++)
-	{
-		#if VERBOSE > 2
-		output("Initializing attribute for scenario %i: %s\n", i, scenarii[i].descr);
-		#endif
+	for (i = 0; i < NSCENAR; i++) {
+#if VERBOSE > 2
+		output("Initializing attribute for scenario %i: %s\n", i,
+		       scenarii[i].descr);
+#endif
 
 		ret = pthread_attr_init(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to initialize a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to initialize a thread attribute object");
+		}
 
 		/* Set the attributes according to the scenario */
-		if (scenarii[i].detached == 1)
-		{
-			ret = pthread_attr_setdetachstate(&scenarii[i].ta, PTHREAD_CREATE_DETACHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set detachstate");  }
+		if (scenarii[i].detached == 1) {
+			ret =
+			    pthread_attr_setdetachstate(&scenarii[i].ta,
+							PTHREAD_CREATE_DETACHED);
+			if (ret != 0) {
+				UNRESOLVED(ret, "Unable to set detachstate");
+			}
+		} else {
+			ret =
+			    pthread_attr_getdetachstate(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get detachstate from initialized attribute");
+			}
+			if (old != PTHREAD_CREATE_JOINABLE) {
+				FAILED
+				    ("The default attribute is not PTHREAD_CREATE_JOINABLE");
+			}
 		}
-		else
-		{
-			ret = pthread_attr_getdetachstate(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get detachstate from initialized attribute");  }
-			if (old != PTHREAD_CREATE_JOINABLE)  {  FAILED("The default attribute is not PTHREAD_CREATE_JOINABLE");  }
-		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		output("Detach state was set sucessfully\n");
-		#endif
+#endif
 
 		/* Sched related attributes */
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			if (scenarii[i].explicitsched == 1)
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_EXPLICIT_SCHED);
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_EXPLICIT_SCHED);
 			else
-				ret = pthread_attr_setinheritsched(&scenarii[i].ta, PTHREAD_INHERIT_SCHED);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set inheritsched attribute");  }
-			#if VERBOSE > 4
+				ret =
+				    pthread_attr_setinheritsched(&scenarii[i].
+								 ta,
+								 PTHREAD_INHERIT_SCHED);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set inheritsched attribute");
+			}
+#if VERBOSE > 4
 			output("inheritsched state was set sucessfully\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => inheritsched parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => inheritsched parameter untouched\n");
+#endif
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
-			if (scenarii[i].schedpolicy == 1)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_FIFO);
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
+			if (scenarii[i].schedpolicy == 1) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_FIFO);
 			}
-			if (scenarii[i].schedpolicy == 2)
-			{
-				ret = pthread_attr_setschedpolicy(&scenarii[i].ta, SCHED_RR);
+			if (scenarii[i].schedpolicy == 2) {
+				ret =
+				    pthread_attr_setschedpolicy(&scenarii[i].ta,
+								SCHED_RR);
 			}
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set the sched policy");  }
-			#if VERBOSE > 4
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set the sched policy");
+			}
+#if VERBOSE > 4
 			if (scenarii[i].schedpolicy)
 				output("Sched policy was set sucessfully\n");
 			else
 				output("Sched policy untouched\n");
-			#endif
+#endif
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched policy parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched policy parameter untouched\n");
+#endif
 
-		if (scenarii[i].schedparam != 0)
-		{
+		if (scenarii[i].schedparam != 0) {
 			struct sched_param sp;
 
-			ret = pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to get sched policy from attribute"); }
+			ret =
+			    pthread_attr_getschedpolicy(&scenarii[i].ta, &old);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to get sched policy from attribute");
+			}
 
 			if (scenarii[i].schedparam == 1)
 				sp.sched_priority = sched_get_priority_max(old);
@@ -262,111 +339,148 @@
 				sp.sched_priority = sched_get_priority_min(old);
 
 			ret = pthread_attr_setschedparam(&scenarii[i].ta, &sp);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to set the sched param");  }
-
-		#if VERBOSE > 4
-			output("Sched param was set sucessfully to %i\n", sp.sched_priority);
-		}
-		else
-		{
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to set the sched param");
+			}
+#if VERBOSE > 4
+			output("Sched param was set sucessfully to %i\n",
+			       sp.sched_priority);
+		} else {
 			output("Sched param untouched\n");
-		#endif
+#endif
 		}
 
-		if (tps>0) /* This routine is dependent on the Thread Execution Scheduling option */
-		{
+		if (tps > 0) {	/* This routine is dependent on the Thread Execution Scheduling option */
 			ret = pthread_attr_getscope(&scenarii[i].ta, &old);
-			if (ret != 0)  {  UNRESOLVED(ret, "Failed to get contension scope from thread attribute");  }
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Failed to get contension scope from thread attribute");
+			}
 
-			if (scenarii[i].altscope != 0)
-			{
+			if (scenarii[i].altscope != 0) {
 				if (old == PTHREAD_SCOPE_PROCESS)
 					old = PTHREAD_SCOPE_SYSTEM;
 				else
 					old = PTHREAD_SCOPE_PROCESS;
 
-				ret = pthread_attr_setscope(&scenarii[i].ta, old);
+				ret =
+				    pthread_attr_setscope(&scenarii[i].ta, old);
 				//if (ret != 0)  {  UNRESOLVED(ret, "Failed to set contension scope");  }
-				#if VERBOSE > 0
-				if (ret != 0)  {  output("WARNING: The TPS option is claimed to be supported but setscope fails\n");  }
-				#endif
+#if VERBOSE > 0
+				if (ret != 0) {
+					output
+					    ("WARNING: The TPS option is claimed to be supported but setscope fails\n");
+				}
+#endif
 
-			#if VERBOSE > 4
-				output("Contension scope set to %s\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			}
-			else
-			{
-				output("Contension scope untouched (%s)\n", old==PTHREAD_SCOPE_PROCESS?"PTHREAD_SCOPE_PROCESS":"PTHREAD_SCOPE_SYSTEM");
-			#endif
+#if VERBOSE > 4
+				output("Contension scope set to %s\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+			} else {
+				output("Contension scope untouched (%s)\n",
+				       old ==
+				       PTHREAD_SCOPE_PROCESS ?
+				       "PTHREAD_SCOPE_PROCESS" :
+				       "PTHREAD_SCOPE_SYSTEM");
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TPS unsupported => sched contension scope parameter untouched\n");
-		#endif
+			output
+			    ("TPS unsupported => sched contension scope parameter untouched\n");
+#endif
 
 		/* Stack related attributes */
-		if ((tss>0) && (tsa>0)) /* This routine is dependent on the Thread Stack Address Attribute
-			                   and Thread Stack Size Attribute options */
-		{
-			if (scenarii[i].altstack != 0)
-			{
+		if ((tss > 0) && (tsa > 0)) {	/* This routine is dependent on the Thread Stack Address Attribute
+						   and Thread Stack Size Attribute options */
+			if (scenarii[i].altstack != 0) {
 				/* This is slightly more complicated. We need to alloc a new stack
-				and free it upon test termination */
+				   and free it upon test termination */
 				/* We will alloc with a simulated guardsize of 1 pagesize */
-				scenarii[i].bottom = malloc(minstacksize + pagesize);
-				if (scenarii[i].bottom == NULL)  {  UNRESOLVED(errno,"Unable to alloc enough memory for alternative stack"); }
+				scenarii[i].bottom =
+				    malloc(minstacksize + pagesize);
+				if (scenarii[i].bottom == NULL) {
+					UNRESOLVED(errno,
+						   "Unable to alloc enough memory for alternative stack");
+				}
 
-				ret = pthread_attr_setstack(&scenarii[i].ta, scenarii[i].bottom, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to specify alternate stack");  }
-
-				#if VERBOSE > 1
-				output("Alternate stack created successfully. Bottom=%p, Size=%i\n", scenarii[i].bottom, minstacksize);
-				#endif
+				ret =
+				    pthread_attr_setstack(&scenarii[i].ta,
+							  scenarii[i].bottom,
+							  minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Failed to specify alternate stack");
+				}
+#if VERBOSE > 1
+				output
+				    ("Alternate stack created successfully. Bottom=%p, Size=%i\n",
+				     scenarii[i].bottom, minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
-			output("TSA or TSS unsupported => No alternative stack\n");
-		#endif
+			output
+			    ("TSA or TSS unsupported => No alternative stack\n");
+#endif
 
-		#ifndef WITHOUT_XOPEN
-		if (scenarii[i].guard != 0)
-		{
+#ifndef WITHOUT_XOPEN
+		if (scenarii[i].guard != 0) {
 			if (scenarii[i].guard == 1)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, 0);
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      0);
 			if (scenarii[i].guard == 2)
-				ret = pthread_attr_setguardsize(&scenarii[i].ta, pagesize);
-			if (ret != 0)  {  UNRESOLVED(ret, "Unable to set guard area size in thread stack");  }
-			#if VERBOSE > 4
-			output("Guard size set to %i\n", (scenarii[i].guard==1)?1:pagesize);
-			#endif
+				ret =
+				    pthread_attr_setguardsize(&scenarii[i].ta,
+							      pagesize);
+			if (ret != 0) {
+				UNRESOLVED(ret,
+					   "Unable to set guard area size in thread stack");
+			}
+#if VERBOSE > 4
+			output("Guard size set to %i\n",
+			       (scenarii[i].guard == 1) ? 1 : pagesize);
+#endif
 		}
-		#endif
+#endif
 
-		if (tss>0) /* This routine is dependent on the Thread Stack Size Attribute option */
-		{
-			if (scenarii[i].altsize != 0)
-			{
-				ret = pthread_attr_setstacksize(&scenarii[i].ta, minstacksize);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to change stack size");  }
-				#if VERBOSE > 4
-				output("Stack size set to %i (this is the min)\n", minstacksize);
-				#endif
+		if (tss > 0) {	/* This routine is dependent on the Thread Stack Size Attribute option */
+			if (scenarii[i].altsize != 0) {
+				ret =
+				    pthread_attr_setstacksize(&scenarii[i].ta,
+							      minstacksize);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to change stack size");
+				}
+#if VERBOSE > 4
+				output
+				    ("Stack size set to %i (this is the min)\n",
+				     minstacksize);
+#endif
 			}
 		}
-		#if VERBOSE > 4
+#if VERBOSE > 4
 		else
 			output("TSS unsupported => stack size unchanged\n");
-		#endif
+#endif
 
-		ret = sem_init(&scenarii[i].sem, 0,0);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to init a semaphore");  }
+		ret = sem_init(&scenarii[i].sem, 0, 0);
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to init a semaphore");
+		}
 
 	}
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("All %i thread attribute objects were initialized\n\n", NSCENAR);
-	#endif
+#endif
 }
 
 /* This function will free all resources consumed in the scenar_init() routine */
@@ -374,28 +488,32 @@
 {
 	int ret = 0, i;
 
-	for (i=0; i<NSCENAR; i++)
-	{
+	for (i = 0; i < NSCENAR; i++) {
 		if (scenarii[i].bottom != NULL)
 			free(scenarii[i].bottom);
 
 		ret = sem_destroy(&scenarii[i].sem);
-		if (ret == -1) {  UNRESOLVED(errno, "Unable to destroy a semaphore");  }
+		if (ret == -1) {
+			UNRESOLVED(errno, "Unable to destroy a semaphore");
+		}
 
 		ret = pthread_attr_destroy(&scenarii[i].ta);
-		if (ret != 0)  {  UNRESOLVED(ret, "Failed to destroy a thread attribute object");  }
+		if (ret != 0) {
+			UNRESOLVED(ret,
+				   "Failed to destroy a thread attribute object");
+		}
 	}
 }
 
-int sc=0; /* This might be very dirty... but is much simpler */
+int sc = 0;			/* This might be very dirty... but is much simpler */
 
-#ifdef STD_MAIN /* We want main to be defined here */
+#ifdef STD_MAIN			/* We want main to be defined here */
 
-extern void * threaded(void *arg); /* This is the test function */
+extern void *threaded(void *arg);	/* This is the test function */
 
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-	int ret=0;
+	int ret = 0;
 	pthread_t child;
 
 	/* Initialize output routine */
@@ -404,56 +522,68 @@
 	/* Initialize thread attribute objects */
 	scenar_init();
 
-	for (sc=0; sc < NSCENAR; sc++)
-	{
-		#if VERBOSE > 0
+	for (sc = 0; sc < NSCENAR; sc++) {
+#if VERBOSE > 0
 		output("-----\n");
-		output("Starting test with scenario (%i): %s\n", sc, scenarii[sc].descr);
-		#endif
+		output("Starting test with scenario (%i): %s\n", sc,
+		       scenarii[sc].descr);
+#endif
 
 		ret = pthread_create(&child, &scenarii[sc].ta, threaded, NULL);
-		switch (scenarii[sc].result)
-		{
-			case 0: /* Operation was expected to succeed */
-				if (ret != 0)  {  UNRESOLVED(ret, "Failed to create this thread");  }
-				break;
-
-			case 1: /* Operation was expected to fail */
-				if (ret == 0)  {  UNRESOLVED(-1, "An error was expected but the thread creation succeeded");  }
-				break;
-
-			case 2: /* We did not know the expected result */
-			default:
-				#if VERBOSE > 0
-				if (ret == 0)
-					{ output("Thread has been created successfully for this scenario\n"); }
-				else
-					{ output("Thread creation failed with the error: %s\n", strerror(ret)); }
-				#endif
-		}
-		if (ret == 0) /* The new thread is running */
-		{
-			if (scenarii[sc].detached == 0)
-			{
-				ret = pthread_join(child, NULL);
-				if (ret != 0)  {  UNRESOLVED(ret, "Unable to join a thread");  }
+		switch (scenarii[sc].result) {
+		case 0:	/* Operation was expected to succeed */
+			if (ret != 0) {
+				UNRESOLVED(ret, "Failed to create this thread");
 			}
-			else
-			{
+			break;
+
+		case 1:	/* Operation was expected to fail */
+			if (ret == 0) {
+				UNRESOLVED(-1,
+					   "An error was expected but the thread creation succeeded");
+			}
+			break;
+
+		case 2:	/* We did not know the expected result */
+		default:
+#if VERBOSE > 0
+			if (ret == 0) {
+				output
+				    ("Thread has been created successfully for this scenario\n");
+			} else {
+				output
+				    ("Thread creation failed with the error: %s\n",
+				     strerror(ret));
+			}
+#endif
+		}
+		if (ret == 0) {	/* The new thread is running */
+			if (scenarii[sc].detached == 0) {
+				ret = pthread_join(child, NULL);
+				if (ret != 0) {
+					UNRESOLVED(ret,
+						   "Unable to join a thread");
+				}
+			} else {
 				/* Just wait for the thread to terminate */
-				do { ret = sem_wait(&scenarii[sc].sem); }
+				do {
+					ret = sem_wait(&scenarii[sc].sem);
+				}
 				while ((ret == -1) && (errno == EINTR));
-				if (ret == -1)  {  UNRESOLVED(errno, "Failed to wait for the semaphore");  }
+				if (ret == -1) {
+					UNRESOLVED(errno,
+						   "Failed to wait for the semaphore");
+				}
 			}
 		}
 	}
 
 	scenar_fini();
-	#if VERBOSE > 0
+#if VERBOSE > 0
 	output("-----\n");
 	output("All test data destroyed\n");
 	output("Test PASSED\n");
-	#endif
+#endif
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
index 7cfec10..1a6068e 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/stress.c
@@ -81,7 +81,7 @@
 }
 
 /* Thread function */
-void* threaded(void *arg)
+void *threaded(void *arg)
 {
 	int ret = 0;
 
@@ -108,7 +108,7 @@
 }
 
 /* Main function */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret = 0, value;
 
@@ -116,26 +116,25 @@
 
 	pthread_t child1, child2;
 
-	sem_t unnamed, * named;
+	sem_t unnamed, *named;
 
 	/* Initialize output routine */
 	output_init();
 
 	/* Register the signal handler for SIGUSR1 */
-	sigemptyset (&sa.sa_mask);
+	sigemptyset(&sa.sa_mask);
 
 	sa.sa_flags = 0;
 
 	sa.sa_handler = sighdl;
 
-	if ((ret = sigaction (SIGUSR1, &sa, NULL))) {
+	if ((ret = sigaction(SIGUSR1, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
 
-	if ((ret = sigaction (SIGALRM, &sa, NULL))) {
+	if ((ret = sigaction(SIGALRM, &sa, NULL))) {
 		UNRESOLVED(ret, "Unable to register signal handler");
 	}
-
 #if VERBOSE > 1
 	output("[parent] Signal handler registered\n");
 
@@ -144,67 +143,61 @@
 	/* Initialize the semaphores */
 	named = sem_open(SEM_NAME, O_CREAT, 0777, INIT_VAL);
 
-	if (named == SEM_FAILED)
-	{
+	if (named == SEM_FAILED) {
 		UNRESOLVED(errno, "Failed to sem_open");
 	}
 
 	ret = sem_unlink(SEM_NAME);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to sem_unlink");
 	}
 
 	ret = sem_init(&unnamed, 0, INIT_VAL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to sem_init");
 	}
 
 	/* Create the threads */
 	ret = pthread_create(&child1, NULL, threaded, named);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	ret = pthread_create(&child2, NULL, threaded, &unnamed);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to create a thread");
 	}
 
 	/* loop */
-	while (do_it)
-	{
+	while (do_it) {
 		ret = sem_getvalue(named, &value);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to get sem value");
 		}
 
 		if ((value != INIT_VAL) && (value != INIT_VAL + 1)) {
 			output("Got value %d, expected %d or %d only\n",
-			        value, INIT_VAL, INIT_VAL + 1);
-			FAILED("sem_getvalue returned an invalid value for the named semaphore");
+			       value, INIT_VAL, INIT_VAL + 1);
+			FAILED
+			    ("sem_getvalue returned an invalid value for the named semaphore");
 		}
 
 		ret = sem_getvalue(&unnamed, &value);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Failed to get sem value");
 		}
 
 		if ((value != INIT_VAL) && (value != INIT_VAL + 1)) {
 			output("Got value %d, expected %d or %d only\n",
-			        value, INIT_VAL, INIT_VAL + 1);
-			FAILED("sem_getvalue returned an invalid value for the unnamed semaphore");
+			       value, INIT_VAL, INIT_VAL + 1);
+			FAILED
+			    ("sem_getvalue returned an invalid value for the unnamed semaphore");
 		}
 
 		iterations++;
@@ -213,35 +206,32 @@
 	/* Join the threads */
 	ret = pthread_join(child1, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	ret = pthread_join(child2, NULL);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(ret, "Failed to join a thread");
 	}
 
 	/* Destroy the semaphores */
 	ret = sem_close(named);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to close the semaphore");
 	}
 
 	ret = sem_destroy(&unnamed);
 
-	if (ret != 0)
-	{
+	if (ret != 0) {
 		UNRESOLVED(errno, "Failed to destroy the semaphore");
 	}
 
 	/* Passed */
-	output("pthread_exit stress test PASSED -- %llu iterations\n", iterations);
+	output("pthread_exit stress test PASSED -- %llu iterations\n",
+	       iterations);
 
 	PASSED;
 }
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_getvalue/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_getvalue/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c b/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
index 43cfa10..10faff7 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_init/s-c1.c
@@ -91,37 +91,31 @@
 
 /* The next structure is used to save the tests measures */
 
-typedef struct __mes_t
-{
+typedef struct __mes_t {
 	int nsem;
-	long _data_open; /* As we store µsec values, a long type should be enough. */
-	long _data_close; /* As we store µsec values, a long type should be enough. */
+	long _data_open;	/* As we store µsec values, a long type should be enough. */
+	long _data_close;	/* As we store µsec values, a long type should be enough. */
 
 	struct __mes_t *next;
 
 	struct __mes_t *prev;
-}
-
-mes_t;
+} mes_t;
 
 /* Forward declaration */
 int parse_measure(mes_t * measures);
 
 /* Structure to store created semaphores */
 
-typedef struct __test_t
-{
-	sem_t sems[ BLOCKSIZE ];
+typedef struct __test_t {
+	sem_t sems[BLOCKSIZE];
 
-	struct __test_t * next;
+	struct __test_t *next;
 
-	struct __test_t * prev;
-}
-
-test_t;
+	struct __test_t *prev;
+} test_t;
 
 /* Test routine */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status, locerrno;
 	int nsem, i;
@@ -132,7 +126,7 @@
 
 	test_t sems;
 
-	struct __test_t * sems_cur = &sems, * sems_tmp;
+	struct __test_t *sems_cur = &sems, *sems_tmp;
 
 	long SEM_MAX = sysconf(_SC_SEM_NSEMS_MAX);
 
@@ -161,16 +155,15 @@
 	nsem = 0;
 	status = 0;
 
-	while (1)                                                                                                                                 /* we will break */
-	{
+	while (1) {		/* we will break */
 		/* Create a new block */
 		sems_tmp = (test_t *) malloc(sizeof(test_t));
 
-		if (sems_tmp == NULL)
-		{
+		if (sems_tmp == NULL) {
 			/* We stop here */
 #if VERBOSE > 0
-			output("malloc failed with error %d (%s)\n", errno, strerror(errno));
+			output("malloc failed with error %d (%s)\n", errno,
+			       strerror(errno));
 #endif
 			/* We can proceed anyway */
 			status = 1;
@@ -181,20 +174,18 @@
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* Open all semaphores in the current block */
-		for (i = 0; i < BLOCKSIZE; i++)
-		{
-			ret = sem_init(&(sems_tmp->sems[ i ]), i & 1, i & 3);
+		for (i = 0; i < BLOCKSIZE; i++) {
+			ret = sem_init(&(sems_tmp->sems[i]), i & 1, i & 3);
 
-			if (ret != 0)
-			{
+			if (ret != 0) {
 #if VERBOSE > 0
-				output("sem_init failed with error %d (%s)\n", errno, strerror(errno));
+				output("sem_init failed with error %d (%s)\n",
+				       errno, strerror(errno));
 #endif
 				/* Check error code */
 				switch (errno) {
@@ -207,188 +198,183 @@
 				default:
 					UNRESOLVED(errno, "Unexpected error!");
 
+					break;
+				}
+
+				if ((SEM_MAX > 0) && (nsem > SEM_MAX)) {
+					FAILED
+					    ("sem_open opened more than SEM_NSEMS_MAX semaphores");
+				}
+
+				nsem++;
+			}
+
+			/* read clock */
+			ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
+
+			if (ret != 0) {
+				UNRESOLVED(errno, "Unable to read clock");
+			}
+
+			if (status == 2) {
+				/* We were not able to fill this bloc, so we can discard it */
+
+				for (--i; i >= 0; i--) {
+					ret = sem_destroy(&(sems_tmp->sems[i]));
+
+					if (ret != 0) {
+						UNRESOLVED(errno,
+							   "Failed to close");
+					}
+
+				}
+
+				free(sems_tmp);
+				break;
+
+			}
+
+			sems_tmp->prev = sems_cur;
+			sems_cur->next = sems_tmp;
+			sems_cur = sems_tmp;
+			sems_cur->next = NULL;
+
+			/* add to the measure list */
+			m_tmp = (mes_t *) malloc(sizeof(mes_t));
+
+			if (m_tmp == NULL) {
+				/* We stop here */
+#if VERBOSE > 0
+				output("malloc failed with error %d (%s)\n",
+				       errno, strerror(errno));
+#endif
+				/* We can proceed anyway */
+				status = 3;
+
 				break;
 			}
 
-			if ((SEM_MAX > 0) && (nsem > SEM_MAX))
-			{
-				FAILED("sem_open opened more than SEM_NSEMS_MAX semaphores");
+			m_tmp->nsem = nsem;
+			m_tmp->next = NULL;
+			m_tmp->prev = m_cur;
+			m_cur->next = m_tmp;
+
+			m_cur = m_tmp;
+
+			m_cur->_data_open =
+			    ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) +
+			    ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000);
+			m_cur->_data_close = 0;
+
+			if (nsem >= NSEM_LIMIT)
+				break;
+		}
+
+		locerrno = errno;
+
+		/* Free all semaphore blocs */
+#if VERBOSE > 0
+		output("Detroy and free semaphores\n");
+
+#endif
+
+		/* Reverse list order */
+
+		while (sems_cur != &sems) {
+			/* read clock */
+			ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
+
+			if (ret != 0) {
+				UNRESOLVED(errno, "Unable to read clock");
 			}
 
-			nsem++;
-		}
+			/* Empty the sems_cur block */
 
-		/* read clock */
-		ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
+			for (i = 0; i < BLOCKSIZE; i++) {
+				ret = sem_destroy(&(sems_cur->sems[i]));
 
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Unable to read clock");
-		}
-
-		if (status == 2)
-		{
-			/* We were not able to fill this bloc, so we can discard it */
-
-			for (--i; i >= 0; i--)
-			{
-				ret = sem_destroy(&(sems_tmp->sems[ i ]));
-
-				if (ret != 0)
-				{
-					UNRESOLVED(errno, "Failed to close");
+				if (ret != 0) {
+					UNRESOLVED(errno,
+						   "Failed to destroy a semaphore");
 				}
-
 			}
 
-			free(sems_tmp);
-			break;
+			/* read clock */
+			ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
 
-		}
-
-		sems_tmp->prev = sems_cur;
-		sems_cur->next = sems_tmp;
-		sems_cur = sems_tmp;
-		sems_cur->next = NULL;
-
-		/* add to the measure list */
-		m_tmp = (mes_t *) malloc(sizeof(mes_t));
-
-		if (m_tmp == NULL)
-		{
-			/* We stop here */
-#if VERBOSE > 0
-			output("malloc failed with error %d (%s)\n", errno, strerror(errno));
-#endif
-			/* We can proceed anyway */
-			status = 3;
-
-			break;
-		}
-
-		m_tmp->nsem = nsem;
-		m_tmp->next = NULL;
-		m_tmp->prev = m_cur;
-		m_cur->next = m_tmp;
-
-		m_cur = m_tmp;
-
-		m_cur->_data_open = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
-		m_cur->_data_close = 0 ;
-
-		if (nsem >= NSEM_LIMIT)
-			break;
-	}
-
-	locerrno = errno;
-
-	/* Free all semaphore blocs */
-#if VERBOSE > 0
-	output("Detroy and free semaphores\n");
-
-#endif
-
-	/* Reverse list order */
-
-	while (sems_cur != &sems)
-	{
-		/* read clock */
-		ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
-
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Unable to read clock");
-		}
-
-		/* Empty the sems_cur block */
-
-		for (i = 0; i < BLOCKSIZE; i++)
-		{
-			ret = sem_destroy(&(sems_cur->sems[ i ]));
-
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to destroy a semaphore");
+			if (ret != 0) {
+				UNRESOLVED(errno, "Unable to read clock");
 			}
+
+			/* add this measure to measure list */
+
+			m_cur->_data_close =
+			    ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) +
+			    ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000);
+
+			m_cur = m_cur->prev;
+
+			/* remove the sem bloc */
+			sems_cur = sems_cur->prev;
+
+			free(sems_cur->next);
+
+			sems_cur->next = NULL;
 		}
 
-		/* read clock */
-		ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
-
-		if (ret != 0)
-		{
-			UNRESOLVED(errno, "Unable to read clock");
-		}
-
-		/* add this measure to measure list */
-
-		m_cur->_data_close = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
-
-		m_cur = m_cur->prev;
-
-		/* remove the sem bloc */
-		sems_cur = sems_cur->prev;
-
-		free(sems_cur->next);
-
-		sems_cur->next = NULL;
-	}
-
 #if VERBOSE > 0
-	output("Parse results\n");
+		output("Parse results\n");
 
 #endif
 
-	/* Compute the results */
-	ret = parse_measure(&sentinel);
+		/* Compute the results */
+		ret = parse_measure(&sentinel);
 
-	/* Free the resources and output the results */
+		/* Free the resources and output the results */
 
 #if VERBOSE > 5
-	output("Dump : \n");
+		output("Dump : \n");
 
-	output("  nsem  |  open  |  close \n");
+		output("  nsem  |  open  |  close \n");
 
 #endif
 
-	while (sentinel.next != NULL)
-	{
-		m_cur = sentinel.next;
+		while (sentinel.next != NULL) {
+			m_cur = sentinel.next;
 #if (VERBOSE > 5) || defined(PLOT_OUTPUT)
-		output("%8.8i %1.1li.%6.6li %1.1li.%6.6li\n"
-		        , m_cur->nsem
-		        , m_cur->_data_open / 1000000 , m_cur->_data_open % 1000000
-		        , m_cur->_data_close / 1000000, m_cur->_data_close % 1000000
-		      );
+			output("%8.8i %1.1li.%6.6li %1.1li.%6.6li\n",
+			       m_cur->nsem, m_cur->_data_open / 1000000,
+			       m_cur->_data_open % 1000000,
+			       m_cur->_data_close / 1000000,
+			       m_cur->_data_close % 1000000);
 
 #endif
-		sentinel.next = m_cur->next;
+			sentinel.next = m_cur->next;
 
-		free(m_cur);
-	}
+			free(m_cur);
+		}
 
-	if (ret != 0)
-	{
-		FAILED("The function is not scalable, add verbosity for more information");
-	}
+		if (ret != 0) {
+			FAILED
+			    ("The function is not scalable, add verbosity for more information");
+		}
 
-	/* Check status */
-	if (status)
-	{
-		UNRESOLVED(locerrno, "Function is scalable, but test terminated with error");
-	}
-
+		/* Check status */
+		if (status) {
+			UNRESOLVED(locerrno,
+				   "Function is scalable, but test terminated with error");
+		}
 #if VERBOSE > 0
-	output("-----\n");
+		output("-----\n");
 
-	output("All test data destroyed\n");
+		output("All test data destroyed\n");
 
-	output("Test PASSED\n");
+		output("Test PASSED\n");
 
 #endif
 
-	PASSED;
-}
+		PASSED;
+	}
 
 /***
  * The next function will seek for the better model for each series of measurements.
@@ -407,355 +393,358 @@
  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
  */
 
-struct row
-{
-	long X;  /* the X values -- copied from function argument */
-	long Y_o;  /* the Y values -- copied from function argument */
-	long Y_c;  /* the Y values -- copied from function argument */
-	long _x; /* Value X - Xavg */
-	long _y_o; /* Value Y - Yavg */
-	long _y_c; /* Value Y - Yavg */
-	double LnX; /* Natural logarithm of X values */
-	double LnY_o; /* Natural logarithm of Y values */
-	double LnY_c; /* Natural logarithm of Y values */
-	double _lnx; /* Value LnX - LnXavg */
-	double _lny_o; /* Value LnY - LnYavg */
-	double _lny_c; /* Value LnY - LnYavg */
-};
+	struct row {
+		long X;		/* the X values -- copied from function argument */
+		long Y_o;	/* the Y values -- copied from function argument */
+		long Y_c;	/* the Y values -- copied from function argument */
+		long _x;	/* Value X - Xavg */
+		long _y_o;	/* Value Y - Yavg */
+		long _y_c;	/* Value Y - Yavg */
+		double LnX;	/* Natural logarithm of X values */
+		double LnY_o;	/* Natural logarithm of Y values */
+		double LnY_c;	/* Natural logarithm of Y values */
+		double _lnx;	/* Value LnX - LnXavg */
+		double _lny_o;	/* Value LnY - LnYavg */
+		double _lny_c;	/* Value LnY - LnYavg */
+	};
 
-int parse_measure(mes_t * measures)
-{
-	int ret, r;
+	int parse_measure(mes_t * measures) {
+		int ret, r;
 
-	mes_t *cur;
+		mes_t *cur;
 
-	double Xavg, Yavg_o, Yavg_c;
-	double LnXavg, LnYavg_o, LnYavg_c;
+		double Xavg, Yavg_o, Yavg_c;
+		double LnXavg, LnYavg_o, LnYavg_c;
 
-	int N;
+		int N;
 
-	double r1_o, r2_o, r3_o, r4_o;
-	double r1_c, r2_c, r3_c, r4_c;
+		double r1_o, r2_o, r3_o, r4_o;
+		double r1_c, r2_c, r3_c, r4_c;
 
-	/* Some more intermediate vars */
-	long double _q_o[ 3 ];
-	long double _d_o[ 3 ];
-	long double _q_c[ 3 ];
-	long double _d_c[ 3 ];
+		/* Some more intermediate vars */
+		long double _q_o[3];
+		long double _d_o[3];
+		long double _q_c[3];
+		long double _d_c[3];
 
-	long double t; /* temp value */
+		long double t;	/* temp value */
 
-	struct row *Table = NULL;
+		struct row *Table = NULL;
 
-	/* This array contains the last element of each serie */
-	int array_max;
+		/* This array contains the last element of each serie */
+		int array_max;
 
-	/* Initialize the datas */
+		/* Initialize the datas */
 
-	array_max = -1; /* means no data */
-	Xavg = 0.0;
-	LnXavg = 0.0;
-	Yavg_o = 0.0;
-	LnYavg_o = 0.0;
-	r1_o = 0.0;
-	r2_o = 0.0;
-	r3_o = 0.0;
-	r4_o = 0.0;
-	_q_o[ 0 ] = 0.0;
-	_q_o[ 1 ] = 0.0;
-	_q_o[ 2 ] = 0.0;
-	_d_o[ 0 ] = 0.0;
-	_d_o[ 1 ] = 0.0;
-	_d_o[ 2 ] = 0.0;
-	Yavg_c = 0.0;
-	LnYavg_c = 0.0;
-	r1_c = 0.0;
-	r2_c = 0.0;
-	r3_c = 0.0;
-	r4_c = 0.0;
-	_q_c[ 0 ] = 0.0;
-	_q_c[ 1 ] = 0.0;
-	_q_c[ 2 ] = 0.0;
-	_d_c[ 0 ] = 0.0;
-	_d_c[ 1 ] = 0.0;
-	_d_c[ 2 ] = 0.0;
+		array_max = -1;	/* means no data */
+		Xavg = 0.0;
+		LnXavg = 0.0;
+		Yavg_o = 0.0;
+		LnYavg_o = 0.0;
+		r1_o = 0.0;
+		r2_o = 0.0;
+		r3_o = 0.0;
+		r4_o = 0.0;
+		_q_o[0] = 0.0;
+		_q_o[1] = 0.0;
+		_q_o[2] = 0.0;
+		_d_o[0] = 0.0;
+		_d_o[1] = 0.0;
+		_d_o[2] = 0.0;
+		Yavg_c = 0.0;
+		LnYavg_c = 0.0;
+		r1_c = 0.0;
+		r2_c = 0.0;
+		r3_c = 0.0;
+		r4_c = 0.0;
+		_q_c[0] = 0.0;
+		_q_c[1] = 0.0;
+		_q_c[2] = 0.0;
+		_d_c[0] = 0.0;
+		_d_c[1] = 0.0;
+		_d_c[2] = 0.0;
 
-	N = 0;
-	cur = measures;
+		N = 0;
+		cur = measures;
 
 #if VERBOSE > 1
-	output("Data analysis starting\n");
+		output("Data analysis starting\n");
 #endif
 
-	/* We start with reading the list to find:
-	 * -> number of elements, to assign an array.
-	 * -> average values
-	 */
+		/* We start with reading the list to find:
+		 * -> number of elements, to assign an array.
+		 * -> average values
+		 */
 
-	while (cur->next != NULL)
-	{
-		cur = cur->next;
+		while (cur->next != NULL) {
+			cur = cur->next;
 
-		N++;
+			N++;
 
-		if (cur->_data_open != 0)
-		{
-			array_max = N;
-			Xavg += (double) cur->nsem;
-			LnXavg += log((double) cur->nsem);
-			Yavg_o += (double) cur->_data_open;
-			LnYavg_o += log((double) cur->_data_open);
-			Yavg_c += (double) cur->_data_close;
-			LnYavg_c += log((double) cur->_data_close);
+			if (cur->_data_open != 0) {
+				array_max = N;
+				Xavg += (double)cur->nsem;
+				LnXavg += log((double)cur->nsem);
+				Yavg_o += (double)cur->_data_open;
+				LnYavg_o += log((double)cur->_data_open);
+				Yavg_c += (double)cur->_data_close;
+				LnYavg_c += log((double)cur->_data_close);
+			}
+
 		}
 
-	}
-
-	/* We have the sum; we can divide to obtain the average values */
-	if (array_max != -1)
-	{
-		Xavg /= array_max;
-		LnXavg /= array_max;
-		Yavg_o /= array_max;
-		LnYavg_o /= array_max;
-		Yavg_c /= array_max;
-		LnYavg_c /= array_max;
-	}
-
+		/* We have the sum; we can divide to obtain the average values */
+		if (array_max != -1) {
+			Xavg /= array_max;
+			LnXavg /= array_max;
+			Yavg_o /= array_max;
+			LnYavg_o /= array_max;
+			Yavg_c /= array_max;
+			LnYavg_c /= array_max;
+		}
 #if VERBOSE > 1
-	output(" Found %d rows\n", N);
+		output(" Found %d rows\n", N);
 
 #endif
 
-	/* We will now alloc the array ... */
+		/* We will now alloc the array ... */
 
-	Table = calloc(N, sizeof(struct row));
+		Table = calloc(N, sizeof(struct row));
 
-	if (Table == NULL)
-	{
-		UNRESOLVED(errno, "Unable to alloc space for results parsing");
-	}
-
-	/* ... and fill it */
-	N = 0;
-
-	cur = measures;
-
-	while (cur->next != NULL)
-	{
-		cur = cur->next;
-
-		Table[ N ].X = (long) cur->nsem;
-		Table[ N ].LnX = log((double) cur->nsem);
-
-		if (array_max > N)
-		{
-			Table[ N ]._x = Table[ N ].X - Xavg ;
-			Table[ N ]._lnx = Table[ N ].LnX - LnXavg;
-			Table[ N ].Y_o = cur->_data_open;
-			Table[ N ]._y_o = Table[ N ].Y_o - Yavg_o ;
-			Table[ N ].LnY_o = log((double) cur->_data_open);
-			Table[ N ]._lny_o = Table[ N ].LnY_o - LnYavg_o;
-			Table[ N ].Y_c = cur->_data_close;
-			Table[ N ]._y_c = Table[ N ].Y_c - Yavg_c ;
-			Table[ N ].LnY_c = log((double) cur->_data_close);
-			Table[ N ]._lny_c = Table[ N ].LnY_c - LnYavg_c;
+		if (Table == NULL) {
+			UNRESOLVED(errno,
+				   "Unable to alloc space for results parsing");
 		}
 
-		N++;
+		/* ... and fill it */
+		N = 0;
+
+		cur = measures;
+
+		while (cur->next != NULL) {
+			cur = cur->next;
+
+			Table[N].X = (long)cur->nsem;
+			Table[N].LnX = log((double)cur->nsem);
+
+			if (array_max > N) {
+				Table[N]._x = Table[N].X - Xavg;
+				Table[N]._lnx = Table[N].LnX - LnXavg;
+				Table[N].Y_o = cur->_data_open;
+				Table[N]._y_o = Table[N].Y_o - Yavg_o;
+				Table[N].LnY_o = log((double)cur->_data_open);
+				Table[N]._lny_o = Table[N].LnY_o - LnYavg_o;
+				Table[N].Y_c = cur->_data_close;
+				Table[N]._y_c = Table[N].Y_c - Yavg_c;
+				Table[N].LnY_c = log((double)cur->_data_close);
+				Table[N]._lny_c = Table[N].LnY_c - LnYavg_c;
+			}
+
+			N++;
+		}
+
+		/* We won't need the list anymore -- we'll work with the array which should be faster. */
+#if VERBOSE > 1
+		output(" Data was stored in an array.\n");
+
+#endif
+
+		/* We need to read the full array at least twice to compute all the error factors */
+
+		/* In the first pass, we'll compute:
+		 * -> r1 for each scenar.
+		 * -> "a" factor for linear (0), power (1) and exponential (2) approximations -- with using the _d and _q vars.
+		 */
+#if VERBOSE > 1
+		output("Starting first pass...\n");
+
+#endif
+		for (r = 0; r < array_max; r++) {
+			r1_o +=
+			    ((double)Table[r]._y_o / array_max) *
+			    (double)Table[r]._y_o;
+
+			_q_o[0] += Table[r]._y_o * Table[r]._x;
+			_d_o[0] += Table[r]._x * Table[r]._x;
+
+			_q_o[1] += Table[r]._lny_o * Table[r]._lnx;
+			_d_o[1] += Table[r]._lnx * Table[r]._lnx;
+
+			_q_o[2] += Table[r]._lny_o * Table[r]._x;
+			_d_o[2] += Table[r]._x * Table[r]._x;
+
+			r1_c +=
+			    ((double)Table[r]._y_c / array_max) *
+			    (double)Table[r]._y_c;
+
+			_q_c[0] += Table[r]._y_c * Table[r]._x;
+			_d_c[0] += Table[r]._x * Table[r]._x;
+
+			_q_c[1] += Table[r]._lny_c * Table[r]._lnx;
+			_d_c[1] += Table[r]._lnx * Table[r]._lnx;
+
+			_q_c[2] += Table[r]._lny_c * Table[r]._x;
+			_d_c[2] += Table[r]._x * Table[r]._x;
+
+		}
+
+		/* First pass is terminated; a2 = _q[0]/_d[0]; a3 = _q[1]/_d[1]; a4 = _q[2]/_d[2] */
+
+		/* In the first pass, we'll compute:
+		 * -> r2, r3, r4 for each scenar.
+		 */
+
+#if VERBOSE > 1
+		output("Starting second pass...\n");
+
+#endif
+		for (r = 0; r < array_max; r++) {
+			/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
+			t = (Table[r]._y_o -
+			     ((_q_o[0] * Table[r]._x) / _d_o[0]));
+			r2_o += t * t / array_max;
+
+			t = (Table[r]._y_c -
+			     ((_q_c[0] * Table[r]._x) / _d_c[0]));
+			r2_c += t * t / array_max;
+
+			/* r3 = avg((y - c.x^a) ²);
+			   t = y - c * x ^ a
+			   = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
+			 */
+			t = (Table[r].Y_o
+			     - (logl(LnYavg_o - (_q_o[1] / _d_o[1]) * LnXavg)
+				* powl(Table[r].X, (_q_o[1] / _d_o[1]))
+			     ));
+			r3_o += t * t / array_max;
+
+			t = (Table[r].Y_c
+			     - (logl(LnYavg_c - (_q_c[1] / _d_c[1]) * LnXavg)
+				* powl(Table[r].X, (_q_c[1] / _d_c[1]))
+			     ));
+			r3_c += t * t / array_max;
+
+			/* r4 = avg((y - exp(ax+b))²);
+			   t = y - exp(ax+b)
+			   = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
+			   = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
+			 */
+			t = (Table[r].Y_o
+			     - expl((_q_o[2] / _d_o[2]) * Table[r]._x +
+				    LnYavg_o));
+			r4_o += t * t / array_max;
+
+			t = (Table[r].Y_c
+			     - expl((_q_c[2] / _d_c[2]) * Table[r]._x +
+				    LnYavg_c));
+			r4_c += t * t / array_max;
+
+		}
+
+#if VERBOSE > 1
+		output("All computing terminated.\n");
+
+#endif
+		ret = 0;
+
+#if VERBOSE > 1
+		output(" # of data: %i\n", array_max);
+
+		output("  Model: Y = k\n");
+
+		output("   sem_open:\n");
+
+		output("       k = %g\n", Yavg_o);
+
+		output("    Divergence %g\n", r1_o);
+
+		output("   sem_close:\n");
+
+		output("       k = %g\n", Yavg_c);
+
+		output("    Divergence %g\n", r1_c);
+
+		output("  Model: Y = a * X + b\n");
+
+		output("   sem_open:\n");
+
+		output("       a = %Lg\n", _q_o[0] / _d_o[0]);
+
+		output("       b = %Lg\n",
+		       Yavg_o - ((_q_o[0] / _d_o[0]) * Xavg));
+
+		output("    Divergence %g\n", r2_o);
+
+		output("   sem_close:\n");
+
+		output("       a = %Lg\n", _q_c[0] / _d_c[0]);
+
+		output("       b = %Lg\n",
+		       Yavg_c - ((_q_c[0] / _d_c[0]) * Xavg));
+
+		output("    Divergence %g\n", r2_c);
+
+		output("  Model: Y = c * X ^ a\n");
+
+		output("   sem_open:\n");
+
+		output("       a = %Lg\n", _q_o[1] / _d_o[1]);
+
+		output("       c = %Lg\n",
+		       logl(LnYavg_o - (_q_o[1] / _d_o[1]) * LnXavg));
+
+		output("    Divergence %g\n", r3_o);
+
+		output("   sem_close:\n");
+
+		output("       a = %Lg\n", _q_c[1] / _d_c[1]);
+
+		output("       c = %Lg\n",
+		       logl(LnYavg_c - (_q_c[1] / _d_c[1]) * LnXavg));
+
+		output("    Divergence %g\n", r3_c);
+
+		output("  Model: Y = exp(a * X + b)\n");
+
+		output("   sem_open:\n");
+
+		output("       a = %Lg\n", _q_o[2] / _d_o[2]);
+
+		output("       b = %Lg\n",
+		       LnYavg_o - ((_q_o[2] / _d_o[2]) * Xavg));
+
+		output("    Divergence %g\n", r4_o);
+
+		output("   sem_close:\n");
+
+		output("       a = %Lg\n", _q_c[2] / _d_c[2]);
+
+		output("       b = %Lg\n",
+		       LnYavg_c - ((_q_c[2] / _d_c[2]) * Xavg));
+
+		output("    Divergence %g\n", r4_c);
+
+#endif
+
+		if (array_max != -1) {
+			/* Compare r1 to other values, with some ponderations */
+
+			if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) ||
+			    (r1_o > 1.3 * r4_o) || (r1_c > 1.1 * r2_c) ||
+			    (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
+				ret++;
+
+#if VERBOSE > 1
+			else
+				output(" Sanction: OK\n");
+
+#endif
+
+		}
+
+		/* We need to free the array */
+		free(Table);
+
+		/* We're done */
+		return ret;
 	}
-
-	/* We won't need the list anymore -- we'll work with the array which should be faster. */
-#if VERBOSE > 1
-	output(" Data was stored in an array.\n");
-
-#endif
-
-	/* We need to read the full array at least twice to compute all the error factors */
-
-	/* In the first pass, we'll compute:
-	 * -> r1 for each scenar.
-	 * -> "a" factor for linear (0), power (1) and exponential (2) approximations -- with using the _d and _q vars.
-	 */
-#if VERBOSE > 1
-	output("Starting first pass...\n");
-
-#endif
-	for (r = 0; r < array_max; r++)
-	{
-		r1_o += ((double) Table[ r ]._y_o / array_max) * (double) Table[ r ]._y_o;
-
-		_q_o[ 0 ] += Table[ r ]._y_o * Table[ r ]._x;
-		_d_o[ 0 ] += Table[ r ]._x * Table[ r ]._x;
-
-		_q_o[ 1 ] += Table[ r ]._lny_o * Table[ r ]._lnx;
-		_d_o[ 1 ] += Table[ r ]._lnx * Table[ r ]._lnx;
-
-		_q_o[ 2 ] += Table[ r ]._lny_o * Table[ r ]._x;
-		_d_o[ 2 ] += Table[ r ]._x * Table[ r ]._x;
-
-		r1_c += ((double) Table[ r ]._y_c / array_max) * (double) Table[ r ]._y_c;
-
-		_q_c[ 0 ] += Table[ r ]._y_c * Table[ r ]._x;
-		_d_c[ 0 ] += Table[ r ]._x * Table[ r ]._x;
-
-		_q_c[ 1 ] += Table[ r ]._lny_c * Table[ r ]._lnx;
-		_d_c[ 1 ] += Table[ r ]._lnx * Table[ r ]._lnx;
-
-		_q_c[ 2 ] += Table[ r ]._lny_c * Table[ r ]._x;
-		_d_c[ 2 ] += Table[ r ]._x * Table[ r ]._x;
-
-	}
-
-	/* First pass is terminated; a2 = _q[0]/_d[0]; a3 = _q[1]/_d[1]; a4 = _q[2]/_d[2] */
-
-	/* In the first pass, we'll compute:
-	 * -> r2, r3, r4 for each scenar.
-	 */
-
-#if VERBOSE > 1
-	output("Starting second pass...\n");
-
-#endif
-	for (r = 0; r < array_max; r++)
-	{
-		/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
-		t = (Table[ r ]._y_o - ((_q_o[ 0 ] * Table[ r ]._x) / _d_o[ 0 ]));
-		r2_o += t * t / array_max ;
-
-		t = (Table[ r ]._y_c - ((_q_c[ 0 ] * Table[ r ]._x) / _d_c[ 0 ]));
-		r2_c += t * t / array_max ;
-
-		/* r3 = avg((y - c.x^a) ²);
-		    t = y - c * x ^ a
-		      = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
-		*/
-		t = (Table[ r ].Y_o
-		      - (logl (LnYavg_o - (_q_o[ 1 ] / _d_o[ 1 ]) * LnXavg)
-		          * powl(Table[ r ].X, (_q_o[ 1 ] / _d_o[ 1 ]))
-		        ));
-		r3_o += t * t / array_max ;
-
-		t = (Table[ r ].Y_c
-		      - (logl (LnYavg_c - (_q_c[ 1 ] / _d_c[ 1 ]) * LnXavg)
-		          * powl(Table[ r ].X, (_q_c[ 1 ] / _d_c[ 1 ]))
-		        ));
-		r3_c += t * t / array_max ;
-
-		/* r4 = avg((y - exp(ax+b))²);
-		    t = y - exp(ax+b)
-		      = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
-		      = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
-		*/
-		t = (Table[ r ].Y_o
-		      - expl((_q_o[ 2 ] / _d_o[ 2 ]) * Table[ r ]._x + LnYavg_o));
-		r4_o += t * t / array_max ;
-
-		t = (Table[ r ].Y_c
-		      - expl((_q_c[ 2 ] / _d_c[ 2 ]) * Table[ r ]._x + LnYavg_c));
-		r4_c += t * t / array_max ;
-
-	}
-
-#if VERBOSE > 1
-	output("All computing terminated.\n");
-
-#endif
-	ret = 0;
-
-#if VERBOSE > 1
-	output(" # of data: %i\n", array_max);
-
-	output("  Model: Y = k\n");
-
-	output("   sem_open:\n");
-
-	output("       k = %g\n", Yavg_o);
-
-	output("    Divergence %g\n", r1_o);
-
-	output("   sem_close:\n");
-
-	output("       k = %g\n", Yavg_c);
-
-	output("    Divergence %g\n", r1_c);
-
-	output("  Model: Y = a * X + b\n");
-
-	output("   sem_open:\n");
-
-	output("       a = %Lg\n", _q_o[ 0 ] / _d_o[ 0 ]);
-
-	output("       b = %Lg\n", Yavg_o - ((_q_o[ 0 ] / _d_o[ 0 ]) * Xavg));
-
-	output("    Divergence %g\n", r2_o);
-
-	output("   sem_close:\n");
-
-	output("       a = %Lg\n", _q_c[ 0 ] / _d_c[ 0 ]);
-
-	output("       b = %Lg\n", Yavg_c - ((_q_c[ 0 ] / _d_c[ 0 ]) * Xavg));
-
-	output("    Divergence %g\n", r2_c);
-
-	output("  Model: Y = c * X ^ a\n");
-
-	output("   sem_open:\n");
-
-	output("       a = %Lg\n", _q_o[ 1 ] / _d_o[ 1 ]);
-
-	output("       c = %Lg\n", logl (LnYavg_o - (_q_o[ 1 ] / _d_o[ 1 ]) * LnXavg));
-
-	output("    Divergence %g\n", r3_o);
-
-	output("   sem_close:\n");
-
-	output("       a = %Lg\n", _q_c[ 1 ] / _d_c[ 1 ]);
-
-	output("       c = %Lg\n", logl (LnYavg_c - (_q_c[ 1 ] / _d_c[ 1 ]) * LnXavg));
-
-	output("    Divergence %g\n", r3_c);
-
-	output("  Model: Y = exp(a * X + b)\n");
-
-	output("   sem_open:\n");
-
-	output("       a = %Lg\n", _q_o[ 2 ] / _d_o[ 2 ]);
-
-	output("       b = %Lg\n", LnYavg_o - ((_q_o[ 2 ] / _d_o[ 2 ]) * Xavg));
-
-	output("    Divergence %g\n", r4_o);
-
-	output("   sem_close:\n");
-
-	output("       a = %Lg\n", _q_c[ 2 ] / _d_c[ 2 ]);
-
-	output("       b = %Lg\n", LnYavg_c - ((_q_c[ 2 ] / _d_c[ 2 ]) * Xavg));
-
-	output("    Divergence %g\n", r4_c);
-
-#endif
-
-	if (array_max != -1)
-	{
-		/* Compare r1 to other values, with some ponderations */
-
-		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) ||
-		    (r1_o > 1.3 * r4_o) || (r1_c > 1.1 * r2_c) ||
-		    (r1_c > 1.2 * r3_c) || (r1_c > 1.3 * r4_c))
-			ret++;
-
-#if VERBOSE > 1
-		else
-			output(" Sanction: OK\n");
-
-#endif
-
-	}
-
-	/* We need to free the array */
-	free(Table);
-
-	/* We're done */
-	return ret;
-}
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_init/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/sem_init/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_init/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_init/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
index fbcda3d..686dd6e 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_open/s-c1.c
@@ -90,37 +90,31 @@
 
 /* The next structure is used to save the tests measures */
 
-typedef struct __mes_t
-{
+typedef struct __mes_t {
 	int nsem;
-	long _data_open; /* As we store µsec values, a long type should be enough. */
-	long _data_close; /* As we store µsec values, a long type should be enough. */
+	long _data_open;	/* As we store µsec values, a long type should be enough. */
+	long _data_close;	/* As we store µsec values, a long type should be enough. */
 
 	struct __mes_t *next;
 
 	struct __mes_t *prev;
-}
-
-mes_t;
+} mes_t;
 
 /* Forward declaration */
 int parse_measure(mes_t * measures);
 
 /* Structure to store created semaphores */
 
-typedef struct __test_t
-{
-	sem_t * sems[ BLOCKSIZE ];
+typedef struct __test_t {
+	sem_t *sems[BLOCKSIZE];
 
-	struct __test_t * next;
+	struct __test_t *next;
 
-	struct __test_t * prev;
-}
-
-test_t;
+	struct __test_t *prev;
+} test_t;
 
 /* Test routine */
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	int ret, status, locerrno;
 	int nsem, i;
@@ -129,10 +123,10 @@
 	mes_t sentinel;
 	mes_t *m_cur, *m_tmp;
 
-	char sem_name[ 255 ];
+	char sem_name[255];
 	test_t sems;
 
-	struct __test_t * sems_cur = &sems, * sems_tmp;
+	struct __test_t *sems_cur = &sems, *sems_tmp;
 
 	long SEM_MAX = sysconf(_SC_SEM_NSEMS_MAX);
 
@@ -161,16 +155,15 @@
 	nsem = 0;
 	status = 0;
 
-	while (1)                                                                                                                          /* we will break */
-	{
+	while (1) {		/* we will break */
 		/* Create a new block */
 		sems_tmp = (test_t *) malloc(sizeof(test_t));
 
-		if (sems_tmp == NULL)
-		{
+		if (sems_tmp == NULL) {
 			/* We stop here */
 #if VERBOSE > 0
-			output("malloc failed with error %d (%s)\n", errno, strerror(errno));
+			output("malloc failed with error %d (%s)\n", errno,
+			       strerror(errno));
 #endif
 			/* We can proceed anyway */
 			status = 1;
@@ -181,21 +174,20 @@
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* Open all semaphores in the current block */
-		for (i = 0; i < BLOCKSIZE; i++)
-		{
+		for (i = 0; i < BLOCKSIZE; i++) {
 			sprintf(sem_name, "/sem_open_scal_s%d", nsem);
-			sems_tmp->sems[ i ] = sem_open(sem_name, O_CREAT, 0777, 1);
+			sems_tmp->sems[i] =
+			    sem_open(sem_name, O_CREAT, 0777, 1);
 
-			if (sems_tmp->sems[ i ] == SEM_FAILED)
-			{
+			if (sems_tmp->sems[i] == SEM_FAILED) {
 #if VERBOSE > 0
-				output("sem_open failed with error %d (%s)\n", errno, strerror(errno));
+				output("sem_open failed with error %d (%s)\n",
+				       errno, strerror(errno));
 #endif
 				/* Check error code */
 
@@ -213,10 +205,10 @@
 				break;
 			}
 
-			if ((SEM_MAX > 0) && (nsem > SEM_MAX))
-			{
+			if ((SEM_MAX > 0) && (nsem > SEM_MAX)) {
 				/* Erreur */
-				FAILED("sem_open opened more than SEM_NSEMS_MAX semaphores");
+				FAILED
+				    ("sem_open opened more than SEM_NSEMS_MAX semaphores");
 			}
 
 			nsem++;
@@ -225,21 +217,17 @@
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
-		if (status == 2)
-		{
+		if (status == 2) {
 			/* We were not able to fill this bloc, so we can discard it */
 
-			for (--i; i >= 0; i--)
-			{
-				ret = sem_close(sems_tmp->sems[ i ]);
+			for (--i; i >= 0; i--) {
+				ret = sem_close(sems_tmp->sems[i]);
 
-				if (ret != 0)
-				{
+				if (ret != 0) {
 					UNRESOLVED(errno, "Failed to close");
 				}
 
@@ -258,11 +246,11 @@
 		/* add to the measure list */
 		m_tmp = (mes_t *) malloc(sizeof(mes_t));
 
-		if (m_tmp == NULL)
-		{
+		if (m_tmp == NULL) {
 			/* We stop here */
 #if VERBOSE > 0
-			output("malloc failed with error %d (%s)\n", errno, strerror(errno));
+			output("malloc failed with error %d (%s)\n", errno,
+			       strerror(errno));
 #endif
 			/* We can proceed anyway */
 			status = 3;
@@ -277,8 +265,10 @@
 
 		m_cur = m_tmp;
 
-		m_cur->_data_open = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
-		m_cur->_data_close = 0 ;
+		m_cur->_data_open =
+		    ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) +
+		    ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000);
+		m_cur->_data_close = 0;
 	}
 
 	locerrno = errno;
@@ -288,8 +278,7 @@
 	output("Unlinking %d semaphores\n", nsem);
 #endif
 
-	for (i = 0; i <= nsem; i++)
-	{
+	for (i = 0; i <= nsem; i++) {
 		sprintf(sem_name, "/sem_open_scal_s%d", i);
 		sem_unlink(sem_name);
 	}
@@ -301,39 +290,37 @@
 #endif
 
 	/* Reverse list order */
-	while (sems_cur != &sems)
-	{
+	while (sems_cur != &sems) {
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_ref);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* Empty the sems_cur block */
 
-		for (i = 0; i < BLOCKSIZE; i++)
-		{
-			ret = sem_close(sems_cur->sems[ i ]);
+		for (i = 0; i < BLOCKSIZE; i++) {
+			ret = sem_close(sems_cur->sems[i]);
 
-			if (ret != 0)
-			{
-				UNRESOLVED(errno, "Failed to close a semaphore");
+			if (ret != 0) {
+				UNRESOLVED(errno,
+					   "Failed to close a semaphore");
 			}
 		}
 
 		/* read clock */
 		ret = clock_gettime(CLOCK_REALTIME, &ts_fin);
 
-		if (ret != 0)
-		{
+		if (ret != 0) {
 			UNRESOLVED(errno, "Unable to read clock");
 		}
 
 		/* add this measure to measure list */
 
-		m_cur->_data_close = ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) + ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000) ;
+		m_cur->_data_close =
+		    ((ts_fin.tv_sec - ts_ref.tv_sec) * 1000000) +
+		    ((ts_fin.tv_nsec - ts_ref.tv_nsec) / 1000);
 
 		m_cur = m_cur->prev;
 
@@ -362,15 +349,13 @@
 
 #endif
 
-	while (sentinel.next != NULL)
-	{
+	while (sentinel.next != NULL) {
 		m_cur = sentinel.next;
 #if (VERBOSE > 5) || defined(PLOT_OUTPUT)
-		output("%8.8i %1.1li.%6.6li %1.1li.%6.6li\n"
-		        , m_cur->nsem
-		        , m_cur->_data_open / 1000000 , m_cur->_data_open % 1000000
-		        , m_cur->_data_close / 1000000, m_cur->_data_close % 1000000
-		      );
+		output("%8.8i %1.1li.%6.6li %1.1li.%6.6li\n", m_cur->nsem,
+		       m_cur->_data_open / 1000000, m_cur->_data_open % 1000000,
+		       m_cur->_data_close / 1000000,
+		       m_cur->_data_close % 1000000);
 
 #endif
 		sentinel.next = m_cur->next;
@@ -378,17 +363,16 @@
 		free(m_cur);
 	}
 
-	if (ret != 0)
-	{
-		FAILED("The function is not scalable, add verbosity for more information");
+	if (ret != 0) {
+		FAILED
+		    ("The function is not scalable, add verbosity for more information");
 	}
 
 	/* Check status */
-	if (status)
-	{
-		UNRESOLVED(locerrno, "Function is scalable, but test terminated with error");
+	if (status) {
+		UNRESOLVED(locerrno,
+			   "Function is scalable, but test terminated with error");
 	}
-
 #if VERBOSE > 0
 	output("-----\n");
 
@@ -418,20 +402,19 @@
  * The function returns 0 when r1 is the best for all cases (latency is constant) and !0 otherwise.
  */
 
-struct row
-{
-	long X;  /* the X values -- copied from function argument */
-	long Y_o;  /* the Y values -- copied from function argument */
-	long Y_c;  /* the Y values -- copied from function argument */
-	long _x; /* Value X - Xavg */
-	long _y_o; /* Value Y - Yavg */
-	long _y_c; /* Value Y - Yavg */
-	double LnX; /* Natural logarithm of X values */
-	double LnY_o; /* Natural logarithm of Y values */
-	double LnY_c; /* Natural logarithm of Y values */
-	double _lnx; /* Value LnX - LnXavg */
-	double _lny_o; /* Value LnY - LnYavg */
-	double _lny_c; /* Value LnY - LnYavg */
+struct row {
+	long X;			/* the X values -- copied from function argument */
+	long Y_o;		/* the Y values -- copied from function argument */
+	long Y_c;		/* the Y values -- copied from function argument */
+	long _x;		/* Value X - Xavg */
+	long _y_o;		/* Value Y - Yavg */
+	long _y_c;		/* Value Y - Yavg */
+	double LnX;		/* Natural logarithm of X values */
+	double LnY_o;		/* Natural logarithm of Y values */
+	double LnY_c;		/* Natural logarithm of Y values */
+	double _lnx;		/* Value LnX - LnXavg */
+	double _lny_o;		/* Value LnY - LnYavg */
+	double _lny_c;		/* Value LnY - LnYavg */
 };
 
 int parse_measure(mes_t * measures)
@@ -449,12 +432,12 @@
 	double r1_c, r2_c, r3_c, r4_c;
 
 	/* Some more intermediate vars */
-	long double _q_o[ 3 ];
-	long double _d_o[ 3 ];
-	long double _q_c[ 3 ];
-	long double _d_c[ 3 ];
+	long double _q_o[3];
+	long double _d_o[3];
+	long double _q_c[3];
+	long double _d_c[3];
 
-	long double t; /* temp value */
+	long double t;		/* temp value */
 
 	struct row *Table = NULL;
 
@@ -463,7 +446,7 @@
 
 	/* Initialize the datas */
 
-	array_max = -1; /* means no data */
+	array_max = -1;		/* means no data */
 	Xavg = 0.0;
 	LnXavg = 0.0;
 	Yavg_o = 0.0;
@@ -472,24 +455,24 @@
 	r2_o = 0.0;
 	r3_o = 0.0;
 	r4_o = 0.0;
-	_q_o[ 0 ] = 0.0;
-	_q_o[ 1 ] = 0.0;
-	_q_o[ 2 ] = 0.0;
-	_d_o[ 0 ] = 0.0;
-	_d_o[ 1 ] = 0.0;
-	_d_o[ 2 ] = 0.0;
+	_q_o[0] = 0.0;
+	_q_o[1] = 0.0;
+	_q_o[2] = 0.0;
+	_d_o[0] = 0.0;
+	_d_o[1] = 0.0;
+	_d_o[2] = 0.0;
 	Yavg_c = 0.0;
 	LnYavg_c = 0.0;
 	r1_c = 0.0;
 	r2_c = 0.0;
 	r3_c = 0.0;
 	r4_c = 0.0;
-	_q_c[ 0 ] = 0.0;
-	_q_c[ 1 ] = 0.0;
-	_q_c[ 2 ] = 0.0;
-	_d_c[ 0 ] = 0.0;
-	_d_c[ 1 ] = 0.0;
-	_d_c[ 2 ] = 0.0;
+	_q_c[0] = 0.0;
+	_q_c[1] = 0.0;
+	_q_c[2] = 0.0;
+	_d_c[0] = 0.0;
+	_d_c[1] = 0.0;
+	_d_c[2] = 0.0;
 
 	N = 0;
 	cur = measures;
@@ -503,28 +486,25 @@
 	 * -> average values
 	 */
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
 		N++;
 
-		if (cur->_data_open != 0)
-		{
+		if (cur->_data_open != 0) {
 			array_max = N;
-			Xavg += (double) cur->nsem;
-			LnXavg += log((double) cur->nsem);
-			Yavg_o += (double) cur->_data_open;
-			LnYavg_o += log((double) cur->_data_open);
-			Yavg_c += (double) cur->_data_close;
-			LnYavg_c += log((double) cur->_data_close);
+			Xavg += (double)cur->nsem;
+			LnXavg += log((double)cur->nsem);
+			Yavg_o += (double)cur->_data_open;
+			LnYavg_o += log((double)cur->_data_open);
+			Yavg_c += (double)cur->_data_close;
+			LnYavg_c += log((double)cur->_data_close);
 		}
 
 	}
 
 	/* We have the sum; we can divide to obtain the average values */
-	if (array_max != -1)
-	{
+	if (array_max != -1) {
 		Xavg /= array_max;
 		LnXavg /= array_max;
 		Yavg_o /= array_max;
@@ -532,7 +512,6 @@
 		Yavg_c /= array_max;
 		LnYavg_c /= array_max;
 	}
-
 #if VERBOSE > 1
 	output(" Found %d rows\n", N);
 
@@ -542,8 +521,7 @@
 
 	Table = calloc(N, sizeof(struct row));
 
-	if (Table == NULL)
-	{
+	if (Table == NULL) {
 		UNRESOLVED(errno, "Unable to alloc space for results parsing");
 	}
 
@@ -552,25 +530,23 @@
 
 	cur = measures;
 
-	while (cur->next != NULL)
-	{
+	while (cur->next != NULL) {
 		cur = cur->next;
 
-		Table[ N ].X = (long) cur->nsem;
-		Table[ N ].LnX = log((double) cur->nsem);
+		Table[N].X = (long)cur->nsem;
+		Table[N].LnX = log((double)cur->nsem);
 
-		if (array_max > N)
-		{
-			Table[ N ]._x = Table[ N ].X - Xavg ;
-			Table[ N ]._lnx = Table[ N ].LnX - LnXavg;
-			Table[ N ].Y_o = cur->_data_open;
-			Table[ N ]._y_o = Table[ N ].Y_o - Yavg_o ;
-			Table[ N ].LnY_o = log((double) cur->_data_open);
-			Table[ N ]._lny_o = Table[ N ].LnY_o - LnYavg_o;
-			Table[ N ].Y_c = cur->_data_close;
-			Table[ N ]._y_c = Table[ N ].Y_c - Yavg_c ;
-			Table[ N ].LnY_c = log((double) cur->_data_close);
-			Table[ N ]._lny_c = Table[ N ].LnY_c - LnYavg_c;
+		if (array_max > N) {
+			Table[N]._x = Table[N].X - Xavg;
+			Table[N]._lnx = Table[N].LnX - LnXavg;
+			Table[N].Y_o = cur->_data_open;
+			Table[N]._y_o = Table[N].Y_o - Yavg_o;
+			Table[N].LnY_o = log((double)cur->_data_open);
+			Table[N]._lny_o = Table[N].LnY_o - LnYavg_o;
+			Table[N].Y_c = cur->_data_close;
+			Table[N]._y_c = Table[N].Y_c - Yavg_c;
+			Table[N].LnY_c = log((double)cur->_data_close);
+			Table[N]._lny_c = Table[N].LnY_c - LnYavg_c;
 		}
 
 		N++;
@@ -592,29 +568,30 @@
 	output("Starting first pass...\n");
 
 #endif
-	for (r = 0; r < array_max; r++)
-	{
-		r1_o += ((double) Table[ r ]._y_o / array_max) * (double) Table[ r ]._y_o;
+	for (r = 0; r < array_max; r++) {
+		r1_o +=
+		    ((double)Table[r]._y_o / array_max) * (double)Table[r]._y_o;
 
-		_q_o[ 0 ] += Table[ r ]._y_o * Table[ r ]._x;
-		_d_o[ 0 ] += Table[ r ]._x * Table[ r ]._x;
+		_q_o[0] += Table[r]._y_o * Table[r]._x;
+		_d_o[0] += Table[r]._x * Table[r]._x;
 
-		_q_o[ 1 ] += Table[ r ]._lny_o * Table[ r ]._lnx;
-		_d_o[ 1 ] += Table[ r ]._lnx * Table[ r ]._lnx;
+		_q_o[1] += Table[r]._lny_o * Table[r]._lnx;
+		_d_o[1] += Table[r]._lnx * Table[r]._lnx;
 
-		_q_o[ 2 ] += Table[ r ]._lny_o * Table[ r ]._x;
-		_d_o[ 2 ] += Table[ r ]._x * Table[ r ]._x;
+		_q_o[2] += Table[r]._lny_o * Table[r]._x;
+		_d_o[2] += Table[r]._x * Table[r]._x;
 
-		r1_c += ((double) Table[ r ]._y_c / array_max) * (double) Table[ r ]._y_c;
+		r1_c +=
+		    ((double)Table[r]._y_c / array_max) * (double)Table[r]._y_c;
 
-		_q_c[ 0 ] += Table[ r ]._y_c * Table[ r ]._x;
-		_d_c[ 0 ] += Table[ r ]._x * Table[ r ]._x;
+		_q_c[0] += Table[r]._y_c * Table[r]._x;
+		_d_c[0] += Table[r]._x * Table[r]._x;
 
-		_q_c[ 1 ] += Table[ r ]._lny_c * Table[ r ]._lnx;
-		_d_c[ 1 ] += Table[ r ]._lnx * Table[ r ]._lnx;
+		_q_c[1] += Table[r]._lny_c * Table[r]._lnx;
+		_d_c[1] += Table[r]._lnx * Table[r]._lnx;
 
-		_q_c[ 2 ] += Table[ r ]._lny_c * Table[ r ]._x;
-		_d_c[ 2 ] += Table[ r ]._x * Table[ r ]._x;
+		_q_c[2] += Table[r]._lny_c * Table[r]._x;
+		_d_c[2] += Table[r]._x * Table[r]._x;
 
 	}
 
@@ -628,43 +605,42 @@
 	output("Starting second pass...\n");
 
 #endif
-	for (r = 0; r < array_max; r++)
-	{
+	for (r = 0; r < array_max; r++) {
 		/* r2 = avg((y - ax -b)²);  t = (y - ax - b) = (y - yavg) - a (x - xavg); */
-		t = (Table[ r ]._y_o - ((_q_o[ 0 ] * Table[ r ]._x) / _d_o[ 0 ]));
-		r2_o += t * t / array_max ;
+		t = (Table[r]._y_o - ((_q_o[0] * Table[r]._x) / _d_o[0]));
+		r2_o += t * t / array_max;
 
-		t = (Table[ r ]._y_c - ((_q_c[ 0 ] * Table[ r ]._x) / _d_c[ 0 ]));
-		r2_c += t * t / array_max ;
+		t = (Table[r]._y_c - ((_q_c[0] * Table[r]._x) / _d_c[0]));
+		r2_c += t * t / array_max;
 
 		/* r3 = avg((y - c.x^a) ²);
-		    t = y - c * x ^ a
-		      = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
-		*/
-		t = (Table[ r ].Y_o
-		      - (logl (LnYavg_o - (_q_o[ 1 ] / _d_o[ 1 ]) * LnXavg)
-		          * powl(Table[ r ].X, (_q_o[ 1 ] / _d_o[ 1 ]))
-		        ));
-		r3_o += t * t / array_max ;
+		   t = y - c * x ^ a
+		   = y - log (LnYavg - (_q[1]/_d[1]) * LnXavg) * x ^ (_q[1]/_d[1])
+		 */
+		t = (Table[r].Y_o
+		     - (logl(LnYavg_o - (_q_o[1] / _d_o[1]) * LnXavg)
+			* powl(Table[r].X, (_q_o[1] / _d_o[1]))
+		     ));
+		r3_o += t * t / array_max;
 
-		t = (Table[ r ].Y_c
-		      - (logl (LnYavg_c - (_q_c[ 1 ] / _d_c[ 1 ]) * LnXavg)
-		          * powl(Table[ r ].X, (_q_c[ 1 ] / _d_c[ 1 ]))
-		        ));
-		r3_c += t * t / array_max ;
+		t = (Table[r].Y_c
+		     - (logl(LnYavg_c - (_q_c[1] / _d_c[1]) * LnXavg)
+			* powl(Table[r].X, (_q_c[1] / _d_c[1]))
+		     ));
+		r3_c += t * t / array_max;
 
 		/* r4 = avg((y - exp(ax+b))²);
-		    t = y - exp(ax+b)
-		      = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
-		      = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
-		*/
-		t = (Table[ r ].Y_o
-		      - expl((_q_o[ 2 ] / _d_o[ 2 ]) * Table[ r ]._x + LnYavg_o));
-		r4_o += t * t / array_max ;
+		   t = y - exp(ax+b)
+		   = y - exp(_q[2]/_d[2] * x + (LnYavg - (_q[2]/_d[2] * Xavg)));
+		   = y - exp(_q[2]/_d[2] * (x - Xavg) + LnYavg);
+		 */
+		t = (Table[r].Y_o
+		     - expl((_q_o[2] / _d_o[2]) * Table[r]._x + LnYavg_o));
+		r4_o += t * t / array_max;
 
-		t = (Table[ r ].Y_c
-		      - expl((_q_c[ 2 ] / _d_c[ 2 ]) * Table[ r ]._x + LnYavg_c));
-		r4_c += t * t / array_max ;
+		t = (Table[r].Y_c
+		     - expl((_q_c[2] / _d_c[2]) * Table[r]._x + LnYavg_c));
+		r4_c += t * t / array_max;
 
 	}
 
@@ -695,17 +671,17 @@
 
 	output("   sem_open:\n");
 
-	output("       a = %Lg\n", _q_o[ 0 ] / _d_o[ 0 ]);
+	output("       a = %Lg\n", _q_o[0] / _d_o[0]);
 
-	output("       b = %Lg\n", Yavg_o - ((_q_o[ 0 ] / _d_o[ 0 ]) * Xavg));
+	output("       b = %Lg\n", Yavg_o - ((_q_o[0] / _d_o[0]) * Xavg));
 
 	output("    Divergence %g\n", r2_o);
 
 	output("   sem_close:\n");
 
-	output("       a = %Lg\n", _q_c[ 0 ] / _d_c[ 0 ]);
+	output("       a = %Lg\n", _q_c[0] / _d_c[0]);
 
-	output("       b = %Lg\n", Yavg_c - ((_q_c[ 0 ] / _d_c[ 0 ]) * Xavg));
+	output("       b = %Lg\n", Yavg_c - ((_q_c[0] / _d_c[0]) * Xavg));
 
 	output("    Divergence %g\n", r2_c);
 
@@ -713,17 +689,19 @@
 
 	output("   sem_open:\n");
 
-	output("       a = %Lg\n", _q_o[ 1 ] / _d_o[ 1 ]);
+	output("       a = %Lg\n", _q_o[1] / _d_o[1]);
 
-	output("       c = %Lg\n", logl (LnYavg_o - (_q_o[ 1 ] / _d_o[ 1 ]) * LnXavg));
+	output("       c = %Lg\n",
+	       logl(LnYavg_o - (_q_o[1] / _d_o[1]) * LnXavg));
 
 	output("    Divergence %g\n", r3_o);
 
 	output("   sem_close:\n");
 
-	output("       a = %Lg\n", _q_c[ 1 ] / _d_c[ 1 ]);
+	output("       a = %Lg\n", _q_c[1] / _d_c[1]);
 
-	output("       c = %Lg\n", logl (LnYavg_c - (_q_c[ 1 ] / _d_c[ 1 ]) * LnXavg));
+	output("       c = %Lg\n",
+	       logl(LnYavg_c - (_q_c[1] / _d_c[1]) * LnXavg));
 
 	output("    Divergence %g\n", r3_c);
 
@@ -731,24 +709,23 @@
 
 	output("   sem_open:\n");
 
-	output("       a = %Lg\n", _q_o[ 2 ] / _d_o[ 2 ]);
+	output("       a = %Lg\n", _q_o[2] / _d_o[2]);
 
-	output("       b = %Lg\n", LnYavg_o - ((_q_o[ 2 ] / _d_o[ 2 ]) * Xavg));
+	output("       b = %Lg\n", LnYavg_o - ((_q_o[2] / _d_o[2]) * Xavg));
 
 	output("    Divergence %g\n", r4_o);
 
 	output("   sem_close:\n");
 
-	output("       a = %Lg\n", _q_c[ 2 ] / _d_c[ 2 ]);
+	output("       a = %Lg\n", _q_c[2] / _d_c[2]);
 
-	output("       b = %Lg\n", LnYavg_c - ((_q_c[ 2 ] / _d_c[ 2 ]) * Xavg));
+	output("       b = %Lg\n", LnYavg_c - ((_q_c[2] / _d_c[2]) * Xavg));
 
 	output("    Divergence %g\n", r4_c);
 
 #endif
 
-	if (array_max != -1)
-	{
+	if (array_max != -1) {
 		/* Compare r1 to other values, with some ponderations */
 
 		if ((r1_o > 1.1 * r2_o) || (r1_o > 1.2 * r3_o) ||
diff --git a/testcases/open_posix_testsuite/stress/threads/sem_open/testfrmw.c b/testcases/open_posix_testsuite/stress/threads/sem_open/testfrmw.c
index 369d785..97a1c3d 100644
--- a/testcases/open_posix_testsuite/stress/threads/sem_open/testfrmw.c
+++ b/testcases/open_posix_testsuite/stress/threads/sem_open/testfrmw.c
@@ -42,25 +42,28 @@
 	/* do nothing */
 	return;
 }
-void output(char * string, ...)
-{
-   va_list ap;
-   char *ts="[??:??:??]";
-   struct tm * now;
-   time_t nw;
 
-   pthread_mutex_lock(&m_trace);
-   nw = time(NULL);
-   now = localtime(&nw);
-   if (now == NULL)
-      printf(ts);
-   else
-      printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
-   va_start(ap, string);
-   vprintf(string, ap);
-   va_end(ap);
-   pthread_mutex_unlock(&m_trace);
+void output(char *string, ...)
+{
+	va_list ap;
+	char *ts = "[??:??:??]";
+	struct tm *now;
+	time_t nw;
+
+	pthread_mutex_lock(&m_trace);
+	nw = time(NULL);
+	now = localtime(&nw);
+	if (now == NULL)
+		printf(ts);
+	else
+		printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min,
+		       now->tm_sec);
+	va_start(ap, string);
+	vprintf(string, ap);
+	va_end(ap);
+	pthread_mutex_unlock(&m_trace);
 }
+
 void output_fini()
 {
 	/*do nothing */
diff --git a/testcases/open_posix_testsuite/tools/t0.c b/testcases/open_posix_testsuite/tools/t0.c
index 71a3775..192d63e 100644
--- a/testcases/open_posix_testsuite/tools/t0.c
+++ b/testcases/open_posix_testsuite/tools/t0.c
@@ -53,14 +53,14 @@
 	if (0 < pid_to_monitor) {
 		if (kill(pid_to_monitor, SIGKILL) == -1) {
 			perror("kill(.., SIGKILL) failed");
-			abort(); /* Something's really screwed up if we get here. */
+			abort();	/* Something's really screwed up if we get here. */
 		}
 		waitpid(pid_to_monitor, NULL, WNOHANG);
 	}
 	exit(SIGALRM + 128);
 }
 
-int main (int argc, char * argv[])
+int main(int argc, char *argv[])
 {
 	int status, timeout;
 
@@ -78,14 +78,18 @@
 		printf("\nWhere:\n");
 		printf("  n       is the timeout duration in seconds,\n");
 		printf("  exe     is the executable filename to run,\n");
-		printf("  arglist is the arguments to be passed to executable.\n\n");
-		printf("  The second use case will emulate an immediate timeout.\n\n");
+		printf
+		    ("  arglist is the arguments to be passed to executable.\n\n");
+		printf
+		    ("  The second use case will emulate an immediate timeout.\n\n");
 		exit(1);
 	}
 
 	timeout = atoi(argv[1]);
 	if (timeout < 1) {
-		fprintf(stderr, "Invalid timeout value \"%s\". Timeout must be a positive integer.\n", argv[1]);
+		fprintf(stderr,
+			"Invalid timeout value \"%s\". Timeout must be a positive integer.\n",
+			argv[1]);
 		exit(1);
 	}
 
diff --git a/testcases/realtime/func/async_handler/async_handler.c b/testcases/realtime/func/async_handler/async_handler.c
index d8b0bda..3c1bfdd 100644
--- a/testcases/realtime/func/async_handler/async_handler.c
+++ b/testcases/realtime/func/async_handler/async_handler.c
@@ -45,7 +45,7 @@
 
 #define SIGNAL_PRIO 89
 #define HANDLER_PRIO 89
-#define DEFAULT_ITERATIONS 1000000 /* about 1 minute @ 2GHz */
+#define DEFAULT_ITERATIONS 1000000	/* about 1 minute @ 2GHz */
 #define HIST_BUCKETS 100
 #define PASS_US 100
 
@@ -68,7 +68,8 @@
 {
 	rt_help();
 	printf("async_handler specific options:\n");
-	printf("  -iITERATIONS  number of iterations to calculate the average over\n");
+	printf
+	    ("  -iITERATIONS  number of iterations to calculate the average over\n");
 }
 
 int parse_args(int c, char *v)
@@ -76,15 +77,15 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'i':
-			iterations = atoi(v);
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'i':
+		iterations = atoi(v);
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -138,7 +139,7 @@
 		/* wait for the event handler to schedule */
 		while (atomic_get(&step) != CHILD_HANDLED)
 			usleep(10);
-		delta = (long)((end - start)/NS_PER_US);
+		delta = (long)((end - start) / NS_PER_US);
 		if (delta > pass_criteria)
 			ret = 1;
 		rec.x = i;
@@ -150,7 +151,8 @@
 			min = MIN(min, delta);
 			max = MAX(max, delta);
 		}
-		atomic_set((i == iterations-1) ? CHILD_QUIT : CHILD_START, &step);
+		atomic_set((i == iterations - 1) ? CHILD_QUIT : CHILD_START,
+			   &step);
 	}
 	printf("recording statistics...\n");
 	printf("Min: %ld us\n", min);
@@ -158,9 +160,11 @@
 	printf("Avg: %.4f us\n", stats_avg(&dat));
 	printf("StdDev: %.4f us\n", stats_stddev(&dat));
 	stats_hist(&hist, &dat);
-	stats_container_save("samples", "Asynchronous Event Handling Latency Scatter Plot",\
+	stats_container_save("samples",
+			     "Asynchronous Event Handling Latency Scatter Plot",
 			     "Iteration", "Latency (us)", &dat, "points");
-	stats_container_save("hist", "Asynchronous Event Handling Latency Histogram",\
+	stats_container_save("hist",
+			     "Asynchronous Event Handling Latency Histogram",
 			     "Latency (us)", "Samples", &hist, "steps");
 	printf("signal thread exiting\n");
 
@@ -187,8 +191,9 @@
 		iterations = DEFAULT_ITERATIONS;
 	printf("Running %d iterations\n", iterations);
 
-	handler_id = create_fifo_thread(handler_thread, (void*)0, HANDLER_PRIO);
-	signal_id = create_fifo_thread(signal_thread, (void*)0, SIGNAL_PRIO);
+	handler_id =
+	    create_fifo_thread(handler_thread, (void *)0, HANDLER_PRIO);
+	signal_id = create_fifo_thread(signal_thread, (void *)0, SIGNAL_PRIO);
 
 	join_threads();
 
diff --git a/testcases/realtime/func/async_handler/async_handler_jk.c b/testcases/realtime/func/async_handler/async_handler_jk.c
index 8ded756..df4ff1b 100644
--- a/testcases/realtime/func/async_handler/async_handler_jk.c
+++ b/testcases/realtime/func/async_handler/async_handler_jk.c
@@ -66,27 +66,27 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
 void *async_event_server(void *arg)
 {
-	int err=0;
+	int err = 0;
 	struct thread *thread = ((struct thread *)arg);
 
 	thread->func = NULL;	// entrypoint
 	thread->flags |= THREAD_FLAG_SUSPENDED;
 
-	for (; ;) {
+	for (;;) {
 		if ((err = pthread_mutex_lock(&thread->mutex)))
-			return (void*)(intptr_t)err;
+			return (void *)(intptr_t) err;
 
 		/* Go to sleep and wait for work */
 		while (thread->flags & THREAD_FLAG_SUSPENDED)
@@ -104,13 +104,13 @@
 		set_thread_priority(thread->pthread, thread->priority);
 
 		thread->flags |= THREAD_FLAG_SUSPENDED;
-	}	// Go back to sleep and wait for next command
+	}			// Go back to sleep and wait for next command
 }
 
 void *user_thread(void *arg)
 {
 	struct thread *thread = ((struct thread *)arg);
-	struct thread *server = (struct thread*)thread->arg;
+	struct thread *server = (struct thread *)thread->arg;
 
 	start = rt_gettime();
 
@@ -133,10 +133,10 @@
 	return NULL;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
-	int aes_id;	// asynchronous event server id
-	int user_id;	// User thread - that fires the event
+	int aes_id;		// asynchronous event server id
+	int user_id;		// User thread - that fires the event
 	long delta;
 	struct thread *server;
 	setup();
@@ -144,16 +144,17 @@
 	pass_criteria = PASS_US;
 	rt_init("h", parse_args, argc, argv);
 
-	aes_id = create_fifo_thread(async_event_server, (void*)0, 83);
+	aes_id = create_fifo_thread(async_event_server, (void *)0, 83);
 	server = get_thread(aes_id);
 
-	user_id = create_fifo_thread(user_thread, (void*)server, NORMAL_PRIORITY);
+	user_id =
+	    create_fifo_thread(user_thread, (void *)server, NORMAL_PRIORITY);
 
 	usleep(1000);
 	pthread_detach(server->pthread);
 	join_thread(user_id);
 	join_threads();
-	delta = (end - start)/NS_PER_US;
+	delta = (end - start) / NS_PER_US;
 
 	printf("delta = %ld us\n", delta);
 	printf("\nCriteria: latencies < %d\n", (int)pass_criteria);
diff --git a/testcases/realtime/func/async_handler/async_handler_tsc.c b/testcases/realtime/func/async_handler/async_handler_tsc.c
index f052acd..c51a3b4 100644
--- a/testcases/realtime/func/async_handler/async_handler_tsc.c
+++ b/testcases/realtime/func/async_handler/async_handler_tsc.c
@@ -56,7 +56,7 @@
 
 nsec_t start;
 nsec_t end;
-unsigned long long tsc_period; /* in picoseconds */
+unsigned long long tsc_period;	/* in picoseconds */
 int over_20 = 0;
 int over_25 = 0;
 int over_30 = 0;
@@ -81,12 +81,12 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -104,7 +104,7 @@
 	rdtscll(tsc_end);
 	ns_end = rt_gettime();
 
-	return (1000*(ns_end - ns_start)) / tsc_minus(tsc_start, tsc_end);
+	return (1000 * (ns_end - ns_start)) / tsc_minus(tsc_start, tsc_end);
 }
 
 void *handler_thread(void *arg)
@@ -171,7 +171,8 @@
 			min = MIN(min, delta);
 			max = MAX(max, delta);
 		}
-		atomic_set((i == ITERATIONS-1) ? CHILD_QUIT : CHILD_START, &step);
+		atomic_set((i == ITERATIONS - 1) ? CHILD_QUIT : CHILD_START,
+			   &step);
 	}
 	printf("recording statistics...\n");
 	printf("Minimum: %ld\n", min);
@@ -179,9 +180,11 @@
 	printf("Average: %f\n", stats_avg(&dat));
 	printf("Standard Deviation: %f\n", stats_stddev(&dat));
 	stats_hist(&hist, &dat);
-	stats_container_save("samples", "Asynchronous Event Handling Latency (TSC) Scatter Plot",\
+	stats_container_save("samples",
+			     "Asynchronous Event Handling Latency (TSC) Scatter Plot",
 			     "Iteration", "Latency (us)", &dat, "points");
-	stats_container_save("hist", "Asynchronous Event Handling Latency (TSC) Histogram",\
+	stats_container_save("hist",
+			     "Asynchronous Event Handling Latency (TSC) Histogram",
 			     "Latency (us)", "Samples", &hist, "steps");
 	printf("signal thread exiting\n");
 
@@ -212,8 +215,9 @@
 	init_pi_mutex(&mutex);
 
 	atomic_set(CHILD_START, &step);
-	handler_id = create_fifo_thread(handler_thread, (void*)0, HANDLER_PRIO);
-	signal_id = create_fifo_thread(signal_thread, (void*)0, SIGNAL_PRIO);
+	handler_id =
+	    create_fifo_thread(handler_thread, (void *)0, HANDLER_PRIO);
+	signal_id = create_fifo_thread(signal_thread, (void *)0, SIGNAL_PRIO);
 
 	join_threads();
 
diff --git a/testcases/realtime/func/gtod_latency/gtod_infinite.c b/testcases/realtime/func/gtod_latency/gtod_infinite.c
index 9a71dd6..676b132 100644
--- a/testcases/realtime/func/gtod_latency/gtod_infinite.c
+++ b/testcases/realtime/func/gtod_latency/gtod_infinite.c
@@ -60,15 +60,16 @@
 #define START_MAX	3000
 #define REPORT_MIN	1000000
 
-static unsigned int max_window = 0; /* infinite, don't use a window */
-static unsigned int test_duration = 0; /* infinite duration */
-static int test_stop = 0; /* 1 to stop */
+static unsigned int max_window = 0;	/* infinite, don't use a window */
+static unsigned int test_duration = 0;	/* infinite duration */
+static int test_stop = 0;	/* 1 to stop */
 
 void usage(void)
 {
 	rt_help();
 	printf("gtod_infinite specific options:\n");
-	printf("  -wWINDOW      iterations in max value window (default inf)\n");
+	printf
+	    ("  -wWINDOW      iterations in max value window (default inf)\n");
 	printf("  -tDURATION    test duration in finite hours (default inf)\n");
 }
 
@@ -76,18 +77,18 @@
 {
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'w':
-			max_window = atoi(v);
-			break;
-		case 't':
-			test_duration = atoi(v);
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'w':
+		max_window = atoi(v);
+		break;
+	case 't':
+		test_duration = atoi(v);
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -100,11 +101,11 @@
 
 int main(int argc, char *argv[])
 {
-	int/* i,*/ rc;
+	int /* i, */ rc;
 	struct timespec ts, p_ts;
 	nsec_t s_time, e_time, diff_time;
 	nsec_t max_time = START_MAX;
-//	cpu_set_t mask;
+//      cpu_set_t mask;
 	struct sched_param param;
 	time_t tt;
 	unsigned int wi;
@@ -130,11 +131,10 @@
 */
 	rt_init("hw:t:", parse_args, argc, argv);
 
-	mlockall(MCL_CURRENT|MCL_FUTURE);
+	mlockall(MCL_CURRENT | MCL_FUTURE);
 
 	if (max_window > 0) {
-		printf("%d iterations in max calculation window\n",
-			max_window);
+		printf("%d iterations in max calculation window\n", max_window);
 	}
 
 	param.sched_priority = sched_get_priority_min(SCHED_FIFO) + 80;
@@ -152,7 +152,7 @@
 
 	/* Set alarm for test duration, if specified */
 	if (test_duration > 0) {
-		rc = alarm(test_duration * 60 * 60 );
+		rc = alarm(test_duration * 60 * 60);
 		if (rc) {
 			perror("alarm");
 			exit(1);
@@ -174,13 +174,12 @@
 		diff_time = e_time - s_time;
 
 		if (max_window > 0 ||
-			((diff_time > max_time) ||
-			   (diff_time > REPORT_MIN))) {
+		    ((diff_time > max_time) || (diff_time > REPORT_MIN))) {
 			if (diff_time > max_time)
 				max_time = diff_time;
 
 			if (max_window == 0 || ++wi == max_window) {
-				tt = (time_t)ts.tv_sec;
+				tt = (time_t) ts.tv_sec;
 				printf("Task delayed for %lld nsec!!! %s",
 				       max_time, ctime(&tt));
 				fflush(stdout);
diff --git a/testcases/realtime/func/gtod_latency/gtod_latency.c b/testcases/realtime/func/gtod_latency/gtod_latency.c
index 40b93d3..26ee85f 100644
--- a/testcases/realtime/func/gtod_latency/gtod_latency.c
+++ b/testcases/realtime/func/gtod_latency/gtod_latency.c
@@ -71,16 +71,19 @@
 #define HIST_LABELX		2
 #define HIST_LABELY		3
 
-char *titles[] = {"scatter plot",
-		  "histogram"};
+char *titles[] = { "scatter plot",
+	"histogram"
+};
 
-char *filenames[] = {"scatter",
-		     "hist"};
+char *filenames[] = { "scatter",
+	"hist"
+};
 
-char *labels[] = {"scatter plot x-axis",
-		  "scatter plot y-axis",
-		  "histogram x-axis",
-		  "histogram y-axis"};
+char *labels[] = { "scatter plot x-axis",
+	"scatter plot y-axis",
+	"histogram x-axis",
+	"histogram y-axis"
+};
 
 static unsigned long long latency_threshold = 0;
 static unsigned int iterations = ITERATIONS;
@@ -88,11 +91,11 @@
 void stats_cmdline_help(void)
 {
 	printf("Usage: ./gtod_latency {-[so|scatter-output] -[ho|hist-output]"
-		" -[st|scatter-title] -[ht|hist-title] -[sxl|scatter-xlabel]"
-		" -[syl|scatter-ylabel] -[hxl|hist-xlabel] -[hyl|hist-ylabel]"
-		" -[lt|latency-trace] -[i|iterations]}"
-		" -[help] \n");
-	printf("**command-line options are not supported yet for this testcase\n");
+	       " -[st|scatter-title] -[ht|hist-title] -[sxl|scatter-xlabel]"
+	       " -[syl|scatter-ylabel] -[hxl|hist-xlabel] -[hyl|hist-ylabel]"
+	       " -[lt|latency-trace] -[i|iterations]}" " -[help] \n");
+	printf
+	    ("**command-line options are not supported yet for this testcase\n");
 }
 
 int stats_cmdline(int argc, char *argv[])
@@ -134,7 +137,7 @@
 			continue;
 		}
 
-		if (!strcmp(flag, "st") || !strcmp (flag, "scatter-title")) {
+		if (!strcmp(flag, "st") || !strcmp(flag, "scatter-title")) {
 			if (i + 1 == argc) {
 				printf("flag has missing argument\n");
 				return -1;
@@ -143,7 +146,7 @@
 			continue;
 		}
 
-		if (!strcmp(flag, "ht") || !strcmp (flag, "hist-title")) {
+		if (!strcmp(flag, "ht") || !strcmp(flag, "hist-title")) {
 			if (i + 1 == argc) {
 				printf("flag has missing argument\n");
 				return -1;
@@ -213,7 +216,7 @@
 	return 0;
 }
 
-long long timespec_subtract(struct timespec * a, struct timespec *b)
+long long timespec_subtract(struct timespec *a, struct timespec *b)
 {
 	long long ns;
 	ns = (b->tv_sec - a->tv_sec) * 1000000000LL;
@@ -240,9 +243,9 @@
 	}
 
 	if (iterations < MIN_ITERATION) {
-		iterations = MIN_ITERATION ;
+		iterations = MIN_ITERATION;
 		printf("user \"iterations\" value is too small (use: %d)\n",
-			iterations);
+		       iterations);
 	}
 
 	stats_container_init(&dat, iterations);
@@ -250,18 +253,18 @@
 	stats_quantiles_init(&quantiles, (int)log10(iterations));
 	setup();
 
-	mlockall(MCL_CURRENT|MCL_FUTURE);
+	mlockall(MCL_CURRENT | MCL_FUTURE);
 
 	start_data = calloc(iterations, sizeof(struct timespec));
 	if (start_data == NULL) {
 		printf("Memory allocation Failed (too many Iteration: %d)\n",
-			iterations);
+		       iterations);
 		exit(1);
 	}
 	stop_data = calloc(iterations, sizeof(struct timespec));
 	if (stop_data == NULL) {
 		printf("Memory allocation Failed (too many Iteration: %d)\n",
-			iterations);
+		       iterations);
 		free(start_data);
 		exit(1);
 	}
@@ -273,10 +276,14 @@
 	/* Check that the user has the appropriate privileges */
 	if (err) {
 		if (errno == EPERM) {
-			fprintf(stderr, "This program runs with a scheduling policy of SCHED_FIFO at priority %d\n", param.sched_priority);
-			fprintf(stderr, "You don't have the necessary privileges to create such a real-time process.\n");
+			fprintf(stderr,
+				"This program runs with a scheduling policy of SCHED_FIFO at priority %d\n",
+				param.sched_priority);
+			fprintf(stderr,
+				"You don't have the necessary privileges to create such a real-time process.\n");
 		} else {
-			fprintf(stderr, "Failed to set scheduler, errno %d\n", errno);
+			fprintf(stderr, "Failed to set scheduler, errno %d\n",
+				errno);
 		}
 		exit(1);
 	}
@@ -294,11 +301,11 @@
 	}
 	/* This loop runs for a long time, hence can cause soft lockups.
 	   Calling sleep periodically avoids this. */
-	for (i = 0; i < (iterations/10000); i++) {
-		for (j=0; j < 10000; j++) {
+	for (i = 0; i < (iterations / 10000); i++) {
+		for (j = 0; j < 10000; j++) {
 			k = (i * 10000) + j;
-			clock_gettime(CLOCK_MONOTONIC,&start_data[k]);
-			clock_gettime(CLOCK_MONOTONIC,&stop_data[k]);
+			clock_gettime(CLOCK_MONOTONIC, &start_data[k]);
+			clock_gettime(CLOCK_MONOTONIC, &stop_data[k]);
 		}
 		usleep(1000);
 	}
@@ -307,16 +314,19 @@
 		rec.x = i;
 		rec.y = delta;
 		stats_container_append(&dat, rec);
-		if (i == 0 || delta < min) min = delta;
-		if (delta > max) max = delta;
+		if (i == 0 || delta < min)
+			min = delta;
+		if (delta > max)
+			max = delta;
 		if (latency_threshold && delta > latency_threshold)
 			break;
 	}
 	if (latency_threshold) {
 		latency_trace_stop();
 		if (i != iterations) {
-			printf("Latency threshold (%lluus) exceeded at iteration %d\n",
-				latency_threshold, i);
+			printf
+			    ("Latency threshold (%lluus) exceeded at iteration %d\n",
+			     latency_threshold, i);
 			latency_trace_print();
 			stats_container_resize(&dat, i + 1);
 		}
@@ -324,9 +334,11 @@
 
 	stats_hist(&hist, &dat);
 	stats_container_save(filenames[SCATTER_FILENAME], titles[SCATTER_TITLE],
-				labels[SCATTER_LABELX], labels[SCATTER_LABELY], &dat, "points");
+			     labels[SCATTER_LABELX], labels[SCATTER_LABELY],
+			     &dat, "points");
 	stats_container_save(filenames[HIST_FILENAME], titles[HIST_TITLE],
-				labels[HIST_LABELX], labels[HIST_LABELY], &hist, "steps");
+			     labels[HIST_LABELX], labels[HIST_LABELY], &hist,
+			     "steps");
 
 	/* report on deltas */
 	printf("Min: %llu ns\n", min);
diff --git a/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c b/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
index 842960c..4ae49a7 100644
--- a/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
+++ b/testcases/realtime/func/hrtimer-prio/hrtimer-prio.c
@@ -68,11 +68,17 @@
 {
 	rt_help();
 	printf("hrtimer-prio specific options:\n");
-	printf("  -t#	   #:busy work time in ms, defaults to %d ms\n", DEF_BUSY_TIME);
-	printf("  -i#	   #:number of iterations, defaults to %d\n", DEF_ITERATIONS);
+	printf("  -t#	   #:busy work time in ms, defaults to %d ms\n",
+	       DEF_BUSY_TIME);
+	printf("  -i#	   #:number of iterations, defaults to %d\n",
+	       DEF_ITERATIONS);
 	printf("  -n#	   #:number of busy threads, defaults to NR_CPUS*2\n");
-	printf("  -f#	   #:rt fifo priority of busy threads (1,98), defaults to %d\n", DEF_MED_PRIO);
-	printf("  -m#	   #:maximum timer latency in microseconds, defaults to %d\n", DEF_CRITERIA);
+	printf
+	    ("  -f#	   #:rt fifo priority of busy threads (1,98), defaults to %d\n",
+	     DEF_MED_PRIO);
+	printf
+	    ("  -m#	   #:maximum timer latency in microseconds, defaults to %d\n",
+	     DEF_CRITERIA);
 }
 
 int parse_args(int c, char *v)
@@ -80,30 +86,31 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 't':
-			busy_time = atoi(v);
-			break;
-		case 'n':
-			busy_threads = atoi(v);
-			break;
-		case 'f':
-			med_prio = MIN(atoi(v), 98);
-			break;
-		case 'i':
-			iterations = atoi(v);
-			if (iterations < 100) {
-				fprintf(stderr, "Number of iterations cannot be less than 100.\n");
-				exit(1);
-			}
+	case 'h':
+		usage();
+		exit(0);
+	case 't':
+		busy_time = atoi(v);
+		break;
+	case 'n':
+		busy_threads = atoi(v);
+		break;
+	case 'f':
+		med_prio = MIN(atoi(v), 98);
+		break;
+	case 'i':
+		iterations = atoi(v);
+		if (iterations < 100) {
+			fprintf(stderr,
+				"Number of iterations cannot be less than 100.\n");
+			exit(1);
+		}
 		break;
 	default:
 		handled = 0;
 		break;
-}
-return handled;
+	}
+	return handled;
 }
 
 void *busy_thread(void *thread)
@@ -121,18 +128,17 @@
 	int i;
 	nsec_t start, end;
 	unsigned long delta_us;
-	while (atomic_get(&busy_threads_started) < busy_threads)
-	{
+	while (atomic_get(&busy_threads_started) < busy_threads) {
 		rt_nanosleep(10000);
 	}
-	printf("All Busy Threads started, commencing test\n"); // FIXME: use debug infrastructure
+	printf("All Busy Threads started, commencing test\n");	// FIXME: use debug infrastructure
 	max_delta = 0;
-	for (i = 0; i < iterations; i++)
-	{
+	for (i = 0; i < iterations; i++) {
 		start = rt_gettime();
 		rt_nanosleep(DEF_SLEEP_TIME);
 		end = rt_gettime();
-		delta_us = ((unsigned long)(end - start) - DEF_SLEEP_TIME)/NS_PER_US;
+		delta_us =
+		    ((unsigned long)(end - start) - DEF_SLEEP_TIME) / NS_PER_US;
 		rec.x = i;
 		rec.y = delta_us;
 		stats_container_append(&dat, rec);
@@ -149,16 +155,16 @@
 	float avg_delta;
 	int t_id;
 	setup();
-	busy_threads = 2 * sysconf(_SC_NPROCESSORS_ONLN); // default busy_threads
+	busy_threads = 2 * sysconf(_SC_NPROCESSORS_ONLN);	// default busy_threads
 	pass_criteria = DEF_CRITERIA;
 	rt_init("f:i:jhn:t:", parse_args, argc, argv);
 	high_prio = med_prio + 1;
 
 	// Set main()'s prio to one above the timer_thread so it is sure to not
 	// be starved
-	if (set_priority(high_prio+1) < 0)
-	{
-		printf("Failed to set main()'s priority to %d\n", high_prio+1);
+	if (set_priority(high_prio + 1) < 0) {
+		printf("Failed to set main()'s priority to %d\n",
+		       high_prio + 1);
 		exit(1);
 	}
 
@@ -191,8 +197,7 @@
 		printf("Failed to create timer thread\n");
 		exit(1);
 	}
-	for (b = 0; b < busy_threads; b++)
-	{
+	for (b = 0; b < busy_threads; b++) {
 		if (create_fifo_thread(busy_thread, NULL, med_prio) < 0) {
 			printf("Failed to create a busy thread\n");
 			exit(1);
@@ -202,10 +207,11 @@
 
 	avg_delta = stats_avg(&dat);
 	stats_hist(&hist, &dat);
-	stats_container_save("samples", "High Resolution Timer Latency Scatter Plot",\
-			"Iteration", "Latency (us)", &dat, "points");
-	stats_container_save("hist", "High Resolution Timer Latency Histogram",\
-			"Latency (us)", "Samples", &hist, "steps");
+	stats_container_save("samples",
+			     "High Resolution Timer Latency Scatter Plot",
+			     "Iteration", "Latency (us)", &dat, "points");
+	stats_container_save("hist", "High Resolution Timer Latency Histogram",
+			     "Latency (us)", "Samples", &hist, "steps");
 
 	if (max_delta <= pass_criteria)
 		ret = 0;
@@ -217,7 +223,8 @@
 	printf("Quantiles:\n");
 	stats_quantiles_calc(&dat, &quantiles);
 	stats_quantiles_print(&quantiles);
-	printf("\nCriteria: Maximum wakeup latency < %lu us\n", (unsigned long)pass_criteria);
+	printf("\nCriteria: Maximum wakeup latency < %lu us\n",
+	       (unsigned long)pass_criteria);
 	printf("Result: %s\n", ret ? "FAIL" : "PASS");
 
 	return ret;
diff --git a/testcases/realtime/func/matrix_mult/matrix_mult.c b/testcases/realtime/func/matrix_mult/matrix_mult.c
index f44aef3..61ab887 100644
--- a/testcases/realtime/func/matrix_mult/matrix_mult.c
+++ b/testcases/realtime/func/matrix_mult/matrix_mult.c
@@ -45,9 +45,9 @@
 #define MAX_CPUS	8192
 #define PRIO		43
 #define MATRIX_SIZE	100
-#define DEF_OPS		8		/* the higher the number, the more CPU intensive */
+#define DEF_OPS		8	/* the higher the number, the more CPU intensive */
 					/* (and therefore SMP performance goes up) */
-#define PASS_CRITERIA	0.75		/* Avg concurrent time * pass criteria < avg seq time - */
+#define PASS_CRITERIA	0.75	/* Avg concurrent time * pass criteria < avg seq time - */
 					/* for every addition of a cpu */
 #define ITERATIONS	128
 #define HIST_BUCKETS	100
@@ -75,7 +75,8 @@
 {
 	rt_help();
 	printf("matrix_mult specific options:\n");
-	printf("  -l#	   #: number of multiplications per iteration (load)\n");
+	printf
+	    ("  -l#	   #: number of multiplications per iteration (load)\n");
 	printf("  -i#	   #: number of iterations\n");
 }
 
@@ -99,13 +100,14 @@
 	return handled;
 }
 
-void matrix_init(double  A[MATRIX_SIZE][MATRIX_SIZE], double  B[MATRIX_SIZE][MATRIX_SIZE])
+void matrix_init(double A[MATRIX_SIZE][MATRIX_SIZE],
+		 double B[MATRIX_SIZE][MATRIX_SIZE])
 {
 	int i, j;
 	for (i = 0; i < MATRIX_SIZE; i++) {
 		for (j = 0; j < MATRIX_SIZE; j++) {
-			A[i][j] = (double) (i*j);
-			B[i][j] = (double) ((i*j)%10);
+			A[i][j] = (double)(i * j);
+			B[i][j] = (double)((i * j) % 10);
 		}
 	}
 }
@@ -123,7 +125,7 @@
 		for (j = 0; j < m_size; j++) {
 			double sum = A[i_m][j] * B[j][i];
 			for (k = 0; k < m_size; k++)
-				sum += A[i_m][k]*B[k][j];
+				sum += A[i_m][k] * B[k][j];
 			C[i][j] = sum;
 		}
 	}
@@ -138,7 +140,7 @@
 	for (i = 0; i < ops; i++)
 		matrix_mult(MATRIX_SIZE);
 	end = rt_gettime();
-	delta = (long)((end - start)/NS_PER_US);
+	delta = (long)((end - start) / NS_PER_US);
 	curdat->records[index].x = index;
 	curdat->records[index].y = delta;
 }
@@ -155,7 +157,7 @@
 		CPU_SET(online_cpu_id, &mask);
 
 		if (!sched_setaffinity(0, sizeof(mask), &mask)) {
-			cpuid = online_cpu_id; /* Save this value before unlocking mutex */
+			cpuid = online_cpu_id;	/* Save this value before unlocking mutex */
 			pthread_mutex_unlock(&mutex_cpu);
 			return cpuid;
 		}
@@ -167,7 +169,7 @@
 void *concurrent_thread(void *thread)
 {
 	struct thread *t = (struct thread *)thread;
-	int thread_id = (intptr_t)t->id;
+	int thread_id = (intptr_t) t->id;
 	int cpuid;
 	int i;
 	int index;
@@ -178,9 +180,9 @@
 		exit(1);
 	}
 
-	index = iterations_percpu * thread_id; /* To avoid stats overlapping */
+	index = iterations_percpu * thread_id;	/* To avoid stats overlapping */
 	pthread_barrier_wait(&mult_start);
-	for (i=0; i < iterations_percpu; i++)
+	for (i = 0; i < iterations_percpu; i++)
 		matrix_mult_record(MATRIX_SIZE, index++);
 
 	return NULL;
@@ -194,13 +196,12 @@
 	float savg, cavg;
 	int cpuid;
 
-	if (	stats_container_init(&sdat, iterations) ||
-		stats_container_init(&shist, HIST_BUCKETS) ||
-		stats_container_init(&cdat, iterations) ||
-		stats_container_init(&chist, HIST_BUCKETS)
-	)
-	{
-		fprintf (stderr, "Cannot init stats container\n");
+	if (stats_container_init(&sdat, iterations) ||
+	    stats_container_init(&shist, HIST_BUCKETS) ||
+	    stats_container_init(&cdat, iterations) ||
+	    stats_container_init(&chist, HIST_BUCKETS)
+	    ) {
+		fprintf(stderr, "Cannot init stats container\n");
 		exit(1);
 	}
 
@@ -219,15 +220,15 @@
 
 	/* run matrix mult operation sequentially */
 	curdat = &sdat;
-	curdat->index = iterations-1;
+	curdat->index = iterations - 1;
 	printf("\nRunning sequential operations\n");
 	start = rt_gettime();
 	for (i = 0; i < iterations; i++)
 		matrix_mult_record(MATRIX_SIZE, i);
 	end = rt_gettime();
-	delta = (long)((end - start)/NS_PER_US);
+	delta = (long)((end - start) / NS_PER_US);
 
-	savg = delta/iterations; /* don't use the stats record, use the total time recorded */
+	savg = delta / iterations;	/* don't use the stats record, use the total time recorded */
 	smin = stats_min(&sdat);
 	smax = stats_max(&sdat);
 
@@ -236,27 +237,29 @@
 	printf("Avg: %.4f us\n", savg);
 	printf("StdDev: %.4f us\n", stats_stddev(&sdat));
 
-	if (
-		stats_hist(&shist, &sdat) ||
-
-		stats_container_save("sequential", "Matrix Multiplication Sequential Execution Runtime Scatter Plot",
-				"Iteration", "Runtime (us)", &sdat, "points") ||
-		stats_container_save("sequential_hist", "Matrix Multiplicatoin Sequential Execution Runtime Histogram",
-				"Runtime (us)", "Samples", &shist, "steps")
-	) {
-		fprintf(stderr, "Warning: could not save sequential mults stats\n");
+	if (stats_hist(&shist, &sdat) ||
+	    stats_container_save("sequential",
+				 "Matrix Multiplication Sequential Execution Runtime Scatter Plot",
+				 "Iteration", "Runtime (us)", &sdat, "points")
+	    || stats_container_save("sequential_hist",
+				    "Matrix Multiplicatoin Sequential Execution Runtime Histogram",
+				    "Runtime (us)", "Samples", &shist, "steps")
+	    ) {
+		fprintf(stderr,
+			"Warning: could not save sequential mults stats\n");
 	}
 
-	pthread_barrier_init(&mult_start, NULL, numcpus+1);
+	pthread_barrier_init(&mult_start, NULL, numcpus + 1);
 	set_priority(PRIO);
 	curdat = &cdat;
-	curdat->index = iterations-1;
-	online_cpu_id = -1; /* Redispatch cpus */
+	curdat->index = iterations - 1;
+	online_cpu_id = -1;	/* Redispatch cpus */
 	/* Create numcpus-1 concurrent threads */
 	for (j = 0; j < numcpus; j++) {
 		tids[j] = create_fifo_thread(concurrent_thread, NULL, PRIO);
 		if (tids[j] == -1) {
-			printf("Thread creation failed (max threads exceeded?)\n");
+			printf
+			    ("Thread creation failed (max threads exceeded?)\n");
 			exit(1);
 		}
 	}
@@ -268,9 +271,9 @@
 	join_threads();
 	end = rt_gettime();
 
-	delta = (long)((end - start)/NS_PER_US);
+	delta = (long)((end - start) / NS_PER_US);
 
-	cavg = delta/iterations; /* don't use the stats record, use the total time recorded */
+	cavg = delta / iterations;	/* don't use the stats record, use the total time recorded */
 	cmin = stats_min(&cdat);
 	cmax = stats_max(&cdat);
 
@@ -279,27 +282,30 @@
 	printf("Avg: %.4f us\n", cavg);
 	printf("StdDev: %.4f us\n", stats_stddev(&cdat));
 
-	if (
-		stats_hist(&chist, &cdat) ||
-
-		stats_container_save("concurrent", "Matrix Multiplication Concurrent Execution Runtime Scatter Plot",
-					"Iteration", "Runtime (us)", &cdat, "points") ||
-		stats_container_save("concurrent_hist", "Matrix Multiplication Concurrent Execution Runtime Histogram",
-					"Iteration", "Runtime (us)", &chist, "steps")
-	) {
-		fprintf(stderr, "Warning: could not save concurrent mults stats\n");
+	if (stats_hist(&chist, &cdat) ||
+	    stats_container_save("concurrent",
+				 "Matrix Multiplication Concurrent Execution Runtime Scatter Plot",
+				 "Iteration", "Runtime (us)", &cdat, "points")
+	    || stats_container_save("concurrent_hist",
+				    "Matrix Multiplication Concurrent Execution Runtime Histogram",
+				    "Iteration", "Runtime (us)", &chist,
+				    "steps")
+	    ) {
+		fprintf(stderr,
+			"Warning: could not save concurrent mults stats\n");
 	}
 
 	printf("\nConcurrent Multipliers:\n");
-	printf("Min: %.4f\n", (float)smin/cmin);
-	printf("Max: %.4f\n", (float)smax/cmax);
-	printf("Avg: %.4f\n", (float)savg/cavg);
+	printf("Min: %.4f\n", (float)smin / cmin);
+	printf("Max: %.4f\n", (float)smax / cmax);
+	printf("Avg: %.4f\n", (float)savg / cavg);
 
 	ret = 1;
 	if (savg > (cavg * criteria))
 		ret = 0;
-	printf("\nCriteria: %.2f * average concurrent time < average sequential time\n",
-		criteria);
+	printf
+	    ("\nCriteria: %.2f * average concurrent time < average sequential time\n",
+	     criteria);
 	printf("Result: %s\n", ret ? "FAIL" : "PASS");
 
 	return;
@@ -328,9 +334,10 @@
 	 * Without this, having iterations not a mutiple of numcpus causes
 	 * stats to segfault (overflow stats array).
 	 */
-	new_iterations = (int) ( (iterations + numcpus - 1) / numcpus) * numcpus;
+	new_iterations = (int)((iterations + numcpus - 1) / numcpus) * numcpus;
 	if (new_iterations != iterations)
-		printf("Rounding up iterations value to nearest multiple of total online CPUs\n");
+		printf
+		    ("Rounding up iterations value to nearest multiple of total online CPUs\n");
 
 	iterations = new_iterations;
 	iterations_percpu = iterations / numcpus;
diff --git a/testcases/realtime/func/measurement/preempt_timing.c b/testcases/realtime/func/measurement/preempt_timing.c
index 726c517..8b53334 100644
--- a/testcases/realtime/func/measurement/preempt_timing.c
+++ b/testcases/realtime/func/measurement/preempt_timing.c
@@ -68,12 +68,12 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -81,7 +81,7 @@
 unsigned long long sample_list[ITERATIONS];
 int main(int argc, char *argv[])
 {
-	unsigned long long i,j, delta, min, max, avg;
+	unsigned long long i, j, delta, min, max, avg;
 	struct sched_param param;
 	cpu_set_t mask;
 	int err;
@@ -95,7 +95,7 @@
 	min = -1;
 	setup();
 
-	rt_init("h",parse_args,argc,argv);
+	rt_init("h", parse_args, argc, argv);
 
 	/* switch to SCHED_FIFO 99 */
 	param.sched_priority = sched_get_priority_max(SCHED_FIFO);
@@ -104,10 +104,14 @@
 	/* Check that the user has the appropriate privileges */
 	if (err) {
 		if (errno == EPERM) {
-			fprintf(stderr, "This program runs with a scheduling policy of SCHED_FIFO at priority %d\n", param.sched_priority);
-			fprintf(stderr, "You don't have the necessary privileges to create such a real-time process.\n");
+			fprintf(stderr,
+				"This program runs with a scheduling policy of SCHED_FIFO at priority %d\n",
+				param.sched_priority);
+			fprintf(stderr,
+				"You don't have the necessary privileges to create such a real-time process.\n");
 		} else {
-			fprintf(stderr, "Failed to set scheduler, errno %d\n", errno);
+			fprintf(stderr, "Failed to set scheduler, errno %d\n",
+				errno);
 		}
 		exit(1);
 	}
@@ -121,27 +125,30 @@
 		exit(-1);
 	}
 
-	for (j=0; j < INTERVALS; j++) {
+	for (j = 0; j < INTERVALS; j++) {
 		/* Collect samples */
 		for (i = 0; i < ITERATIONS; i++)
 			rdtscll(sample_list[i]);
 
 		/* Process samples */
-		for (i = 0; i < (ITERATIONS-1); i++) {
-			delta = sample_list[i+1] - sample_list[i];
-			if (delta < min) min = delta;
-			if (delta > max) max = delta;
+		for (i = 0; i < (ITERATIONS - 1); i++) {
+			delta = sample_list[i + 1] - sample_list[i];
+			if (delta < min)
+				min = delta;
+			if (delta > max)
+				max = delta;
 			if (delta > 100000)
-				printf("maxd(%llu:%llu): %llu %llu = %llu\n", j, i,
-					sample_list[i], sample_list[i+1],
-					delta);
+				printf("maxd(%llu:%llu): %llu %llu = %llu\n", j,
+				       i, sample_list[i], sample_list[i + 1],
+				       delta);
 			avg += delta;
 		}
-		usleep(100); /*let necessary things happen*/
+		usleep(100);	/*let necessary things happen */
 	}
 	avg /= (ITERATIONS * INTERVALS);
 
-	printf("%lld pairs of gettimeofday() calls completed\n", ITERATIONS*INTERVALS);
+	printf("%lld pairs of gettimeofday() calls completed\n",
+	       ITERATIONS * INTERVALS);
 	printf("Time between calls:\n");
 	printf("Minimum: %llu \n", min);
 	printf("Maximum: %llu \n", max);
diff --git a/testcases/realtime/func/measurement/rdtsc-latency.c b/testcases/realtime/func/measurement/rdtsc-latency.c
index 31d339f..d6ab89f 100644
--- a/testcases/realtime/func/measurement/rdtsc-latency.c
+++ b/testcases/realtime/func/measurement/rdtsc-latency.c
@@ -60,12 +60,12 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -92,7 +92,8 @@
 	rdtscll(tsc_end);
 	gettimeofday(&tv_end, NULL);
 
-	return (1000*tv_minus(&tv_start, &tv_end)) / tsc_minus(tsc_start, tsc_end);
+	return (1000 * tv_minus(&tv_start, &tv_end)) / tsc_minus(tsc_start,
+								 tsc_end);
 }
 
 int main(int argc, char *argv[])
@@ -109,7 +110,7 @@
 
 	setup();
 
-	rt_init("h",parse_args,argc,argv);
+	rt_init("h", parse_args, argc, argv);
 
 	/* no arguments */
 	if (argc > 1) {
@@ -124,10 +125,14 @@
 	/* Check that the user has the appropriate privileges */
 	if (err) {
 		if (errno == EPERM) {
-			fprintf(stderr, "This program runs with a scheduling policy of SCHED_FIFO at priority %d\n", param.sched_priority);
-			fprintf(stderr, "You don't have the necessary privileges to create such a real-time process.\n");
+			fprintf(stderr,
+				"This program runs with a scheduling policy of SCHED_FIFO at priority %d\n",
+				param.sched_priority);
+			fprintf(stderr,
+				"You don't have the necessary privileges to create such a real-time process.\n");
 		} else {
-			fprintf(stderr, "Failed to set scheduler, errno %d\n", errno);
+			fprintf(stderr, "Failed to set scheduler, errno %d\n",
+				errno);
 		}
 		exit(1);
 	}
@@ -140,9 +145,11 @@
 	for (i = 0; i < ITERATIONS; i++) {
 		rdtscll(tsc_a);
 		rdtscll(tsc_b);
-		deltas[i] = (tsc_minus(tsc_a, tsc_b) * tsc_period) / 1000; /* tsc period is in ps */
-		if (i == 0 || deltas[i] < min) min = deltas[i];
-		if (deltas[i] > max) max = deltas[i];
+		deltas[i] = (tsc_minus(tsc_a, tsc_b) * tsc_period) / 1000;	/* tsc period is in ps */
+		if (i == 0 || deltas[i] < min)
+			min = deltas[i];
+		if (deltas[i] > max)
+			max = deltas[i];
 		avg += deltas[i];
 	}
 	avg /= ITERATIONS;
diff --git a/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load.c b/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load.c
index aed0b3a..9b9307a 100644
--- a/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load.c
+++ b/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load.c
@@ -57,7 +57,7 @@
 #define THREADS_PER_GROUP 4
 
 //#define ITERATIONS 100 /* short functional test run */
-#define ITERATIONS 6000 /* about 15 minutes @ 2GHz on 1 CPU */
+#define ITERATIONS 6000		/* about 15 minutes @ 2GHz on 1 CPU */
 //#define ITERATIONS 1000 /* min iters for 3 nines */
 // FIXME: need some kind of passing criteria calculation
 //#define PASS_US 100
@@ -75,23 +75,24 @@
 {
 	rt_help();
 	printf("periodic_cpu_load specific options:\n");
-	printf("  -iITERATIONS  number of iterations to calculate the average over\n");
+	printf
+	    ("  -iITERATIONS  number of iterations to calculate the average over\n");
 }
 
 int parse_args(int c, char *v)
 {
 	int handled = 1;
 	switch (c) {
-			break;
-		case 'i':
-			iterations = atoi(v);
-			break;
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+		break;
+	case 'i':
+		iterations = atoi(v);
+		break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -99,18 +100,18 @@
 struct periodic_arg {
 	int period;
 	int iterations;
-	void*(*func)(void*);
+	void *(*func) (void *);
 	void *arg;
 };
 
 void *calc(void *arg)
 {
 	int i, j;
-	int loops = (intptr_t)arg;
+	int loops = (intptr_t) arg;
 	for (i = 0; i < loops; i++) {
 		for (j = 0; j < 125; j++) {
 			// Sum of the numbers up to J
-			int temp = j * ( j + 1 ) / 2;
+			int temp = j * (j + 1) / 2;
 			(void)temp;
 		}
 	}
@@ -122,7 +123,7 @@
 	struct thread *t = (struct thread *)thread;
 	struct periodic_arg *parg = (struct periodic_arg *)t->arg;
 	nsec_t period = parg->period;
-	void*(*func)(void*) = parg->func;
+	void *(*func) (void *) = parg->func;
 
 	int i = 0;
 	nsec_t next, now;
@@ -141,21 +142,22 @@
 		exe_end = rt_gettime();
 		exe_time = exe_end - exe_start;
 		rec.x = i;
-		rec.y = exe_time/NS_PER_US;
+		rec.y = exe_time / NS_PER_US;
 		stats_container_append(&dat[t->id], rec);
 
 		i++;
 
 		now = rt_gettime();
 		if (now > next) {
-			printf("Missed period, aborting (calc took too long)\n");
+			printf
+			    ("Missed period, aborting (calc took too long)\n");
 			fail[t->id] = 1;
 			break;
 		}
 		rt_nanosleep(next - now);
 	}
 
-	printf("TID %d (%c - prio %d) complete\n", t->id, groupname[t->id>>2],
+	printf("TID %d (%c - prio %d) complete\n", t->id, groupname[t->id >> 2],
 	       t->priority);
 
 	return NULL;
@@ -169,7 +171,8 @@
 	rt_init("hi:", parse_args, argc, argv);
 
 	if (iterations < 100) {
-		fprintf(stderr, "Number of iteration cannot be less than 100.\n");
+		fprintf(stderr,
+			"Number of iteration cannot be less than 100.\n");
 		exit(1);
 	}
 
@@ -180,39 +183,42 @@
 	printf("Thread Group A:\n");
 	printf("  threads: %d\n", THREADS_PER_GROUP);
 	printf("  priority: %d\n", PRIO_A);
-	printf("  period: %d ms\n", PERIOD_A/NS_PER_MS);
+	printf("  period: %d ms\n", PERIOD_A / NS_PER_MS);
 	printf("Thread Group B:\n");
 	printf("  threads: %d\n", THREADS_PER_GROUP);
 	printf("  priority: %d\n", PRIO_B);
-	printf("  period: %d ms\n", PERIOD_B/NS_PER_MS);
+	printf("  period: %d ms\n", PERIOD_B / NS_PER_MS);
 	printf("Thread Group C:\n");
 	printf("  threads: %d\n", THREADS_PER_GROUP);
 	printf("  priority: %d\n", PRIO_C);
-	printf("  period: %d ms\n", PERIOD_C/NS_PER_MS);
+	printf("  period: %d ms\n", PERIOD_C / NS_PER_MS);
 	printf("\n");
 
-	for (i=0; i<(THREADS_PER_GROUP * NUM_GROUPS); i++) {
+	for (i = 0; i < (THREADS_PER_GROUP * NUM_GROUPS); i++) {
 		stats_container_init(&dat[i], iterations);
 		stats_quantiles_init(&quantiles[i], (int)log10(iterations));
 	}
 
-	struct periodic_arg parg_a = {PERIOD_A, iterations, calc, (void *)CALC_LOOPS_A };
-	struct periodic_arg parg_b = {PERIOD_B, iterations, calc, (void *)CALC_LOOPS_B };
-	struct periodic_arg parg_c = {PERIOD_C, iterations, calc, (void *)CALC_LOOPS_C };
+	struct periodic_arg parg_a =
+	    { PERIOD_A, iterations, calc, (void *)CALC_LOOPS_A };
+	struct periodic_arg parg_b =
+	    { PERIOD_B, iterations, calc, (void *)CALC_LOOPS_B };
+	struct periodic_arg parg_c =
+	    { PERIOD_C, iterations, calc, (void *)CALC_LOOPS_C };
 
-	for (i=0; i < THREADS_PER_GROUP; i++)
-		create_fifo_thread(periodic_thread, (void*)&parg_a, PRIO_A);
-	for (i=0; i < THREADS_PER_GROUP; i++)
-		create_fifo_thread(periodic_thread, (void*)&parg_b, PRIO_B);
-	for (i=0; i < THREADS_PER_GROUP; i++)
-		create_fifo_thread(periodic_thread, (void*)&parg_c, PRIO_C);
+	for (i = 0; i < THREADS_PER_GROUP; i++)
+		create_fifo_thread(periodic_thread, (void *)&parg_a, PRIO_A);
+	for (i = 0; i < THREADS_PER_GROUP; i++)
+		create_fifo_thread(periodic_thread, (void *)&parg_b, PRIO_B);
+	for (i = 0; i < THREADS_PER_GROUP; i++)
+		create_fifo_thread(periodic_thread, (void *)&parg_c, PRIO_C);
 
 	join_threads();
 
 	printf("\nExecution Time Statistics:\n\n");
 
-	for (i=0; i<(THREADS_PER_GROUP * NUM_GROUPS); i++) {
-		printf("TID %d (%c)\n", i, groupname[i>>2]);
+	for (i = 0; i < (THREADS_PER_GROUP * NUM_GROUPS); i++) {
+		printf("TID %d (%c)\n", i, groupname[i >> 2]);
 		printf("  Min: %ld us\n", stats_min(&dat[i]));
 		printf("  Max: %ld us\n", stats_max(&dat[i]));
 		printf("  Avg: %f us\n", stats_avg(&dat[i]));
@@ -221,7 +227,7 @@
 		stats_quantiles_calc(&dat[i], &quantiles[i]);
 		stats_quantiles_print(&quantiles[i]);
 		printf("Criteria: TID %d did not miss a period\n", i);
-		printf("Result: %s\n", fail[i] ? "FAIL":"PASS");
+		printf("Result: %s\n", fail[i] ? "FAIL" : "PASS");
 		printf("\n");
 
 		if (fail[i])
@@ -232,7 +238,7 @@
 	// printf("\nCriteria: latencies < %d us\n", PASS_US);
 	// printf("Result: %s\n", ret ? "FAIL" : "PASS");
 
-	for (i=0; i<(THREADS_PER_GROUP * NUM_GROUPS); i++) {
+	for (i = 0; i < (THREADS_PER_GROUP * NUM_GROUPS); i++) {
 		stats_container_free(&dat[i]);
 		stats_quantiles_free(&quantiles[i]);
 	}
diff --git a/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load_single.c b/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load_single.c
index 549d0aa..ebbb461 100644
--- a/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load_single.c
+++ b/testcases/realtime/func/periodic_cpu_load/periodic_cpu_load_single.c
@@ -44,7 +44,7 @@
 #define HIST_BUCKETS 100
 
 // define sane defaults
-#define DEFAULT_ITERATIONS 10000 /* 1000 is the min for 3 nines */
+#define DEFAULT_ITERATIONS 10000	/* 1000 is the min for 3 nines */
 #define DEFAULT_PERIOD 5
 #define DEFAULT_PRIO   90
 #define DEFAULT_CALC_LOOPS 1000
@@ -64,7 +64,8 @@
 	printf("periodic_cpu_load_single specific options:\n");
 	printf("  -lCALC_LOOPS	loops per iteration\n");
 	printf("  -fFILENAME_PREFIX    filename prefix for plot output\n");
-	printf("  -iITERATIONS  number of iterations to calculate the average over\n");
+	printf
+	    ("  -iITERATIONS  number of iterations to calculate the average over\n");
 	printf("  -r[0-99]	real-time priority\n");
 	printf("  -tPERIOD	period in ms\n");
 }
@@ -72,10 +73,10 @@
 void *calc(int loops)
 {
 	int i, j;
-	for (i = 0; i < loops*LOOPS_MULTIPLIER; i++) {
+	for (i = 0; i < loops * LOOPS_MULTIPLIER; i++) {
 		for (j = 0; j < 125; j++) {
 			// Sum of the numbers up to J
-			volatile int temp = j * ( j + 1 ) / 2;
+			volatile int temp = j * (j + 1) / 2;
 			(void)temp;
 		}
 	}
@@ -100,12 +101,14 @@
 	stats_container_init(&hist, HIST_BUCKETS);
 	stats_quantiles_init(&quantiles, (int)log10(iterations));
 	if (asprintf(&samples_filename, "%s-samples", filename_prefix) == -1) {
-		fprintf(stderr, "Failed to allocate string for samples filename\n");
+		fprintf(stderr,
+			"Failed to allocate string for samples filename\n");
 		return -1;
 	}
 
 	if (asprintf(&hist_filename, "%s-hist", filename_prefix) == -1) {
-		fprintf(stderr, "Failed to allocate string for samples filename\n");
+		fprintf(stderr,
+			"Failed to allocate string for samples filename\n");
 		return -1;
 	}
 	next = rt_gettime();
@@ -113,7 +116,8 @@
 		next += period;
 		now = rt_gettime();
 		if (now > next) {
-			printf("Missed period, aborting (didn't get scheduled in time)\n");
+			printf
+			    ("Missed period, aborting (didn't get scheduled in time)\n");
 			fail = 1;
 			break;
 		}
@@ -122,23 +126,24 @@
 		exe_end = rt_gettime();
 		exe_time = exe_end - exe_start;
 		rec.x = i;
-		rec.y = exe_time/NS_PER_US;
+		rec.y = exe_time / NS_PER_US;
 		stats_container_append(&dat, rec);
 
 		i++;
 
 		now = rt_gettime();
 		if (now > next) {
-			printf("Missed period, aborting (calc took too long)\n");
+			printf
+			    ("Missed period, aborting (calc took too long)\n");
 			fail = 1;
 			break;
 		}
 		rt_nanosleep(next - now);
 	}
 
-	stats_container_save(samples_filename, "Periodic CPU Load Scatter Plot",\
+	stats_container_save(samples_filename, "Periodic CPU Load Scatter Plot",
 			     "Iteration", "Runtime (us)", &dat, "points");
-	stats_container_save(hist_filename, "Periodic CPU Load Histogram",\
+	stats_container_save(hist_filename, "Periodic CPU Load Histogram",
 			     "Runtime (us)", "Samples", &hist, "steps");
 
 	printf("  Execution Time Statistics:\n");
@@ -150,7 +155,7 @@
 	stats_quantiles_calc(&dat, &quantiles);
 	stats_quantiles_print(&quantiles);
 	printf("Criteria: no missed periods\n");
-	printf("Result: %s\n", fail ? "FAIL":"PASS");
+	printf("Result: %s\n", fail ? "FAIL" : "PASS");
 
 	free(samples_filename);
 	free(hist_filename);
@@ -162,34 +167,34 @@
 {
 	int handled = 1;
 	switch (c) {
-		case 'l':
-			calc_loops = atoi(v);
-			break;
-		case 'f':
-			filename_prefix = v;
-			break;
-		case 'h':
-			usage();
-			exit(0);
-		case 'i':
-			iterations = atoi(v);
-			break;
-		case 'r':
-			prio = atoi(v);
-			break;
-		case 't':
-			period = atoi(v) * NS_PER_MS;
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'l':
+		calc_loops = atoi(v);
+		break;
+	case 'f':
+		filename_prefix = v;
+		break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'i':
+		iterations = atoi(v);
+		break;
+	case 'r':
+		prio = atoi(v);
+		break;
+	case 't':
+		period = atoi(v) * NS_PER_MS;
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
 int main(int argc, char *argv[])
 {
-	period = DEFAULT_PERIOD*NS_PER_MS;
+	period = DEFAULT_PERIOD * NS_PER_MS;
 	prio = DEFAULT_PRIO;
 	calc_loops = DEFAULT_CALC_LOOPS;
 	setup();
@@ -213,7 +218,7 @@
 	printf("------------------------------------\n\n");
 	printf("Running %d iterations\n", iterations);
 	printf("priority: %d\n", prio);
-	printf("  period: %d ms\n", period/NS_PER_MS);
+	printf("  period: %d ms\n", period / NS_PER_MS);
 	printf("   loops: %d\n", calc_loops);
 	printf("    logs: %s*\n", filename_prefix);
 
diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c
index 02a6187..684021f 100644
--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c
+++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c
@@ -50,7 +50,7 @@
 #define NUM_MUTEXES 5000
 #define NUM_THREADS 50
 #define NUM_CONCURRENT_LOCKS 50
-#define DELAY 1000 /* how long to sleep in the worker thread in us */
+#define DELAY 1000		/* how long to sleep in the worker thread in us */
 
 static pthread_mutex_t *mutexes[NUM_MUTEXES];
 
@@ -65,12 +65,12 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -82,7 +82,7 @@
 	for (i = 0; i < NUM_MUTEXES + NUM_CONCURRENT_LOCKS; i++) {
 		/* release prior lock */
 		if (i >= NUM_CONCURRENT_LOCKS) {
-			pthread_mutex_unlock(mutexes[i-NUM_CONCURRENT_LOCKS]);
+			pthread_mutex_unlock(mutexes[i - NUM_CONCURRENT_LOCKS]);
 		}
 		/* grab a new lock */
 		if (i < NUM_MUTEXES) {
@@ -97,19 +97,20 @@
 	return NULL;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 	int m, ret, robust;
 	intptr_t t;
 	pthread_mutexattr_t mutexattr;
 	setup();
 
-	rt_init("h",parse_args,argc,argv);
+	rt_init("h", parse_args, argc, argv);
 
 	if (pthread_mutexattr_init(&mutexattr) != 0) {
 		printf("Failed to init mutexattr\n");
 	}
-	if (pthread_mutexattr_setrobust_np(&mutexattr, PTHREAD_MUTEX_ROBUST_NP) != 0) {
+	if (pthread_mutexattr_setrobust_np(&mutexattr, PTHREAD_MUTEX_ROBUST_NP)
+	    != 0) {
 		printf("Can't set mutexattr robust\n");
 	}
 	if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0) {
@@ -132,7 +133,8 @@
 
 	/* start children threads to walk the array, grabbing the locks */
 	for (t = 0; t < NUM_THREADS; t++) {
-		create_fifo_thread(worker_thread, (void*)t, sched_get_priority_min(SCHED_FIFO));
+		create_fifo_thread(worker_thread, (void *)t,
+				   sched_get_priority_min(SCHED_FIFO));
 	}
 	/* wait for the children to complete */
 	printf("joining threads\n");
@@ -150,8 +152,10 @@
 }
 
 #else
-int main(void) {
-	printf("Your system doesn't support the pthread robust mutexattr APIs\n");
+int main(void)
+{
+	printf
+	    ("Your system doesn't support the pthread robust mutexattr APIs\n");
 	return 1;
 }
 #endif
diff --git a/testcases/realtime/func/pi-tests/test-skeleton.c b/testcases/realtime/func/pi-tests/test-skeleton.c
index ec774fe..326a8ab 100644
--- a/testcases/realtime/func/pi-tests/test-skeleton.c
+++ b/testcases/realtime/func/pi-tests/test-skeleton.c
@@ -69,19 +69,18 @@
 
 static pid_t pid;
 
-static void
-timeout_handler(int sig)
+static void timeout_handler(int sig)
 {
 	int i, killed, status;
-	struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000000 };
+	struct timespec ts = {.tv_sec = 0,.tv_nsec = 100000000 };
 
 	printf("Inside the timeout handler, killing the TC threads \n");
 	kill(pid, SIGKILL);
 	for (i = 0; i < 5; i++) {
-		killed = waitpid(pid, &status, WNOHANG|WUNTRACED);
+		killed = waitpid(pid, &status, WNOHANG | WUNTRACED);
 		if (0 != killed)
 			break;
-      		nanosleep(&ts, NULL);
+		nanosleep(&ts, NULL);
 	}
 
 	if (0 != killed && pid != killed) {
@@ -92,11 +91,10 @@
 	exit(1);
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	pid_t termpid;
- 	int status;
+	int status;
 	setup();
 
 	rt_init("h", parse_args, argc, argv);
@@ -104,8 +102,7 @@
 	pid = fork();
 	if (0 == pid) {
 		exit(TEST_FUNCTION);
-	}
-	else if (pid < 0) {
+	} else if (pid < 0) {
 		printf("\n Cannot fork test program \n");
 		exit(1);
 	}
diff --git a/testcases/realtime/func/pi-tests/testpi-0.c b/testcases/realtime/func/pi-tests/testpi-0.c
index 89d995c..fd8ad07 100644
--- a/testcases/realtime/func/pi-tests/testpi-0.c
+++ b/testcases/realtime/func/pi-tests/testpi-0.c
@@ -71,11 +71,12 @@
  */
 int main(int argc, char *argv[])
 {
-	char *pathbuf; size_t n;
+	char *pathbuf;
+	size_t n;
 
 	rt_init("h", parse_args, argc, argv);
 
-	n = confstr(_CS_GNU_LIBC_VERSION, NULL, (size_t)0);
+	n = confstr(_CS_GNU_LIBC_VERSION, NULL, (size_t) 0);
 	pathbuf = malloc(n);
 	if (!pathbuf)
 		abort();
@@ -84,7 +85,7 @@
 	printf("LIBC_VERSION: %s\n", pathbuf);
 	free(pathbuf);
 
-	n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, (size_t)0);
+	n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, (size_t) 0);
 	pathbuf = malloc(n);
 	if (!pathbuf)
 		abort();
diff --git a/testcases/realtime/func/pi-tests/testpi-1.c b/testcases/realtime/func/pi-tests/testpi-1.c
index c3acf98..3dbe292 100644
--- a/testcases/realtime/func/pi-tests/testpi-1.c
+++ b/testcases/realtime/func/pi-tests/testpi-1.c
@@ -73,7 +73,7 @@
 	return syscall(__NR_gettid);
 }
 
-typedef void *(*entrypoint_t)(void *);
+typedef void *(*entrypoint_t) (void *);
 pthread_mutex_t glob_mutex;
 static pthread_mutex_t cond_mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t cond_var = PTHREAD_COND_INITIALIZER;
@@ -83,11 +83,11 @@
 	struct thread *pthr = (struct thread *)arg;
 	int i, tid = gettid();
 
-	printf("Thread %d started running with priority %d\n", tid,\
-		pthr->priority);
+	printf("Thread %d started running with priority %d\n", tid,
+	       pthr->priority);
 	pthread_mutex_lock(&glob_mutex);
-	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",\
-		tid, pthr->policy, pthr->priority);
+	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
+	       tid, pthr->policy, pthr->priority);
 	/* Wait for other RT threads to start up */
 	pthread_barrier_wait(&barrier);
 
@@ -97,9 +97,9 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
-			printf("Thread %d loop %d pthread pol %d pri %d\n",\
-				tid, i,  pthr->policy, pthr->priority);
+		if (i % 100 == 0) {
+			printf("Thread %d loop %d pthread pol %d pri %d\n",
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -117,7 +117,7 @@
 	pthread_barrier_wait(&barrier);
 	pthread_mutex_lock(&glob_mutex);
 	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
-		tid, pthr->policy, pthr->priority);
+	       tid, pthr->policy, pthr->priority);
 
 	/* We just use the mutex as something to slow things down,
 	 * say who we are and then do nothing for a while.  The aim
@@ -125,9 +125,9 @@
 	 * progress than lower priority threads..
 	 */
 	for (i = 0; i < 1000; i++) {
-		if (i%100 == 0) {
-			printf("Thread %d loop %d pthread pol %d pri %d\n",\
-				tid, i, pthr->policy, pthr->priority);
+		if (i % 100 == 0) {
+			printf("Thread %d loop %d pthread pol %d pri %d\n",
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -142,7 +142,7 @@
 	int i, tid = gettid();
 
 	printf("Noise Thread %d started running with prio %d\n", tid,
-		pthr->priority);
+	       pthr->priority);
 	pthread_barrier_wait(&barrier);
 
 	/* Let others wait at conditional variable */
@@ -154,10 +154,10 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
-			printf("Noise Thread %d loop %d pthread pol %d "\
-				"pri %d\n", tid, i, pthr->policy,\
-				pthr->priority);
+		if (i % 100 == 0) {
+			printf("Noise Thread %d loop %d pthread pol %d "
+			       "pri %d\n", tid, i, pthr->policy,
+			       pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -186,8 +186,8 @@
 
 	retc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (retc < 0) {
-		printf("Main Thread: Can't set affinity: %d %s\n", retc,\
-			strerror(retc));
+		printf("Main Thread: Can't set affinity: %d %s\n", retc,
+		       strerror(retc));
 		exit(-1);
 	}
 
@@ -210,8 +210,8 @@
 	printf("Joining threads\n");
 	join_threads();
 	printf("Done\n");
-	printf("Criteria:Low Priority Thread should Preempt Higher Priority "\
-		"Noise Thread\n");
+	printf("Criteria:Low Priority Thread should Preempt Higher Priority "
+	       "Noise Thread\n");
 
 	pthread_mutex_destroy(&glob_mutex);
 	pthread_mutex_destroy(&cond_mutex);
diff --git a/testcases/realtime/func/pi-tests/testpi-2.c b/testcases/realtime/func/pi-tests/testpi-2.c
index 70c2600..3f7185e 100644
--- a/testcases/realtime/func/pi-tests/testpi-2.c
+++ b/testcases/realtime/func/pi-tests/testpi-2.c
@@ -75,7 +75,7 @@
 	return syscall(__NR_gettid);
 }
 
-typedef void *(*entrypoint_t)(void *);
+typedef void *(*entrypoint_t) (void *);
 pthread_mutex_t glob_mutex;
 static pthread_mutex_t cond_mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t cond_var = PTHREAD_COND_INITIALIZER;
@@ -85,11 +85,11 @@
 	struct thread *pthr = (struct thread *)arg;
 	int i, tid = gettid();
 
-	printf("Thread %d started running with priority %d\n", tid,\
-		pthr->priority);
+	printf("Thread %d started running with priority %d\n", tid,
+	       pthr->priority);
 	pthread_mutex_lock(&glob_mutex);
-	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",\
-		tid, pthr->policy, pthr->priority);
+	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
+	       tid, pthr->policy, pthr->priority);
 	/* Wait for other RT threads to start up */
 	pthread_barrier_wait(&barrier);
 
@@ -99,9 +99,9 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
-			printf("Thread %d loop %d pthread pol %d pri %d\n",\
-				tid, i, pthr->policy, pthr->priority);
+		if (i % 100 == 0) {
+			printf("Thread %d loop %d pthread pol %d pri %d\n",
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -118,8 +118,8 @@
 	printf("Thread %d started running with prio %d\n", tid, pthr->priority);
 	pthread_barrier_wait(&barrier);
 	pthread_mutex_lock(&glob_mutex);
-	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",\
-		tid, pthr->policy, pthr->priority);
+	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
+	       tid, pthr->policy, pthr->priority);
 
 	/* We just use the mutex as something to slow things down,
 	 * say who we are and then do nothing for a while.  The aim
@@ -127,9 +127,9 @@
 	 * progress than lower priority threads..
 	 */
 	for (i = 0; i < 1000; i++) {
-		if (i%100 == 0) {
-			printf("Thread %d loop %d pthread pol %d pri %d\n",\
-				tid, i, pthr->policy, pthr->priority);
+		if (i % 100 == 0) {
+			printf("Thread %d loop %d pthread pol %d pri %d\n",
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -143,8 +143,8 @@
 	struct thread *pthr = (struct thread *)arg;
 	int i, tid = gettid();
 
-	printf("Noise Thread %d started running with prio %d\n", tid,\
-		pthr->priority);
+	printf("Noise Thread %d started running with prio %d\n", tid,
+	       pthr->priority);
 	pthread_barrier_wait(&barrier);
 
 	/* Let others wait at conditional variable */
@@ -156,10 +156,10 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
-			printf("Noise Thread %d loop %d pthread pol %d "\
-				"pri %d\n", tid, i, pthr->policy,\
-				pthr->priority);
+		if (i % 100 == 0) {
+			printf("Noise Thread %d loop %d pthread pol %d "
+			       "pri %d\n", tid, i, pthr->policy,
+			       pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -187,8 +187,8 @@
 
 	retc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (retc < 0) {
-		printf("Main Thread: Can't set affinity: %d %s\n", retc,\
-			strerror(retc));
+		printf("Main Thread: Can't set affinity: %d %s\n", retc,
+		       strerror(retc));
 		exit(-1);
 	}
 
@@ -211,8 +211,8 @@
 	printf("Joining threads\n");
 	join_threads();
 	printf("Done\n");
-	printf("Criteria: Low Priority Thread and High Priority Thread "\
-		"should prempt each other multiple times\n");
+	printf("Criteria: Low Priority Thread and High Priority Thread "
+	       "should prempt each other multiple times\n");
 
 	pthread_mutex_destroy(&glob_mutex);
 	pthread_mutex_destroy(&cond_mutex);
diff --git a/testcases/realtime/func/pi-tests/testpi-4.c b/testcases/realtime/func/pi-tests/testpi-4.c
index a9dfb97..e9e0ed6 100644
--- a/testcases/realtime/func/pi-tests/testpi-4.c
+++ b/testcases/realtime/func/pi-tests/testpi-4.c
@@ -74,7 +74,7 @@
 	return syscall(__NR_gettid);
 }
 
-typedef void *(*entrypoint_t)(void *);
+typedef void *(*entrypoint_t) (void *);
 pthread_mutex_t *glob_mutex;
 static pthread_mutex_t cond_mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t cond_var = PTHREAD_COND_INITIALIZER;
@@ -85,10 +85,10 @@
 	int i, tid = gettid();
 
 	printf("Thread %d started running with priority %d\n", tid,
-		pthr->priority);
+	       pthr->priority);
 	pthread_mutex_lock(glob_mutex);
 	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
-		tid, pthr->policy, pthr->priority);
+	       tid, pthr->policy, pthr->priority);
 
 	/* Wait for other RT threads to start up */
 	pthread_barrier_wait(&barrier);
@@ -99,9 +99,9 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
+		if (i % 100 == 0) {
 			printf("Thread %d loop %d pthread pol %d pri %d\n",
-				tid, i, pthr->policy, pthr->priority);
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -115,12 +115,11 @@
 	struct thread *pthr = (struct thread *)arg;
 	int i, tid = gettid();
 
-	printf("Thread %d started running with prio %d\n", tid,
-		pthr->priority);
+	printf("Thread %d started running with prio %d\n", tid, pthr->priority);
 	pthread_barrier_wait(&barrier);
 	pthread_mutex_lock(glob_mutex);
 	printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
-		tid, pthr->policy, pthr->priority);
+	       tid, pthr->policy, pthr->priority);
 
 	/* we just use the mutex as something to slow things down,
 	 * say who we are and then do nothing for a while.  The aim
@@ -128,9 +127,9 @@
 	 * progress than lower priority threads..
 	 */
 	for (i = 0; i < 1000; i++) {
-		if (i%100 == 0) {
+		if (i % 100 == 0) {
 			printf("Thread %d loop %d pthread pol %d pri %d\n",
-				tid, i, pthr->policy, pthr->priority);
+			       tid, i, pthr->policy, pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -144,11 +143,10 @@
 	struct thread *pthr = (struct thread *)arg;
 	int i, tid = gettid();
 
-	printf("Noise Thread started running with prio %d\n",
-		pthr->priority);
+	printf("Noise Thread started running with prio %d\n", pthr->priority);
 	pthread_barrier_wait(&barrier);
 
-	/* Give the other threads time to wait on the condition variable.*/
+	/* Give the other threads time to wait on the condition variable. */
 	usleep(1000);
 
 	/* Noise thread begins the test */
@@ -157,10 +155,10 @@
 	pthread_mutex_unlock(&cond_mutex);
 
 	for (i = 0; i < 10000; i++) {
-		if (i%100 == 0) {
-			printf("Noise Thread %d loop %d pthread pol %d "\
-				"pri %d\n", tid, i, pthr->policy,
-				pthr->priority);
+		if (i % 100 == 0) {
+			printf("Noise Thread %d loop %d pthread pol %d "
+			       "pri %d\n", tid, i, pthr->policy,
+			       pthr->priority);
 			fflush(NULL);
 		}
 		busy_work_ms(1);
@@ -190,7 +188,7 @@
 	retc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (retc < 0) {
 		printf("Main Thread: Can't set affinity: %d %s\n", retc,
-			strerror(retc));
+		       strerror(retc));
 		exit(-1);
 	}
 	for (i = 0; i < argc; i++) {
diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c
index ad3ba56..a1d93cc 100644
--- a/testcases/realtime/func/pi-tests/testpi-5.c
+++ b/testcases/realtime/func/pi-tests/testpi-5.c
@@ -75,7 +75,7 @@
 		printf("Failed to init mutexattr\n");
 
 	if (pthread_mutexattr_setprotocol(&mutexattr,
-	    PTHREAD_PRIO_INHERIT) != 0)
+					  PTHREAD_PRIO_INHERIT) != 0)
 		printf("Can't set protocol prio inherit\n");
 
 	if (pthread_mutexattr_getprotocol(&mutexattr, &protocol) != 0)
diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c
index a720462..b3c3e4a 100644
--- a/testcases/realtime/func/pi-tests/testpi-6.c
+++ b/testcases/realtime/func/pi-tests/testpi-6.c
@@ -75,7 +75,7 @@
 		printf("Failed to init mutexattr\n");
 
 	if (pthread_mutexattr_setrobust_np(&mutexattr,
-	    PTHREAD_MUTEX_ROBUST_NP) != 0)
+					   PTHREAD_MUTEX_ROBUST_NP) != 0)
 		printf("Can't set robust mutex\n");
 
 	if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0)
diff --git a/testcases/realtime/func/pi-tests/testpi-7.c b/testcases/realtime/func/pi-tests/testpi-7.c
index de7bab9..e9e286d 100644
--- a/testcases/realtime/func/pi-tests/testpi-7.c
+++ b/testcases/realtime/func/pi-tests/testpi-7.c
@@ -59,12 +59,12 @@
 
 // flagging details
 typedef enum {
-	LOW_START_CYCLE = 1,  // 1
-	MED_START_WORK,   // 2
-	HIGH_GRAB_MUTEX,  // 3
-	LOW_DROP_MUTEX,   // 4
-	END_OF_CYCLE,     // 5
-	END_OF_GAME       // 6
+	LOW_START_CYCLE = 1,	// 1
+	MED_START_WORK,		// 2
+	HIGH_GRAB_MUTEX,	// 3
+	LOW_DROP_MUTEX,		// 4
+	END_OF_CYCLE,		// 5
+	END_OF_GAME		// 6
 } phase_t;
 
 static volatile phase_t phase_flag = END_OF_CYCLE;
@@ -106,32 +106,50 @@
 	return handled;
 }
 
-phase_t _read_flag(const char *s, int l) {
+phase_t _read_flag(const char *s, int l)
+{
 	phase_t ret;
 	if (use_flag_mutex)
 		pthread_mutex_lock(&flag_mutex);
 	ret = phase_flag;
-	debug(DBG_DEBUG, "%s:%d: read_flag = %s (%d)\n", s, l, (ret==LOW_START_CYCLE?"LOW_START_CYCLE":ret==MED_START_WORK?"MED_START_WORK":ret==HIGH_GRAB_MUTEX?"HIGH_GRAB_MUTEX":ret==LOW_DROP_MUTEX?"LOW_DROP_MUTEX":ret==END_OF_CYCLE?"END_OF_CYCLE":"ERROR"), ret);
+	debug(DBG_DEBUG, "%s:%d: read_flag = %s (%d)\n", s, l,
+	      (ret == LOW_START_CYCLE ? "LOW_START_CYCLE" : ret ==
+	       MED_START_WORK ? "MED_START_WORK" : ret ==
+	       HIGH_GRAB_MUTEX ? "HIGH_GRAB_MUTEX" : ret ==
+	       LOW_DROP_MUTEX ? "LOW_DROP_MUTEX" : ret ==
+	       END_OF_CYCLE ? "END_OF_CYCLE" : "ERROR"), ret);
 	//debug(DBG_DEBUG, "%s:%d: read_flag = %d\n", s, l, ret);
 	if (use_flag_mutex)
 		pthread_mutex_unlock(&flag_mutex);
 	return ret;
 }
 
-void _write_flag(const char *s, int l, phase_t new_flag) {
+void _write_flag(const char *s, int l, phase_t new_flag)
+{
 	if (use_flag_mutex)
 		pthread_mutex_lock(&flag_mutex);
 	if (phase_flag != END_OF_GAME) {
-		if (new_flag != phase_flag && new_flag != (phase_flag+1) && !(new_flag==LOW_START_CYCLE && phase_flag==END_OF_CYCLE))
-			printf("YOU'RE HOSED: new_flag=%d, phase_flag=%d\n", new_flag, phase_flag);
+		if (new_flag != phase_flag && new_flag != (phase_flag + 1)
+		    && !(new_flag == LOW_START_CYCLE
+			 && phase_flag == END_OF_CYCLE))
+			printf("YOU'RE HOSED: new_flag=%d, phase_flag=%d\n",
+			       new_flag, phase_flag);
 		phase_flag = new_flag;
-		debug(DBG_DEBUG, "phase_flag: %s set it to %d\n", s, phase_flag);
-		debug(DBG_DEBUG, "%s:%d: write_flag = %s (%d)\n", s, l, (new_flag==LOW_START_CYCLE?"LOW_START_CYCLE":new_flag==MED_START_WORK?"MED_START_WORK":new_flag==HIGH_GRAB_MUTEX?"HIGH_GRAB_MUTEX":new_flag==LOW_DROP_MUTEX?"LOW_DROP_MUTEX":new_flag==END_OF_CYCLE?"END_OF_CYCLE":"ERROR"), new_flag);
+		debug(DBG_DEBUG, "phase_flag: %s set it to %d\n", s,
+		      phase_flag);
+		debug(DBG_DEBUG, "%s:%d: write_flag = %s (%d)\n", s, l,
+		      (new_flag ==
+		       LOW_START_CYCLE ? "LOW_START_CYCLE" : new_flag ==
+		       MED_START_WORK ? "MED_START_WORK" : new_flag ==
+		       HIGH_GRAB_MUTEX ? "HIGH_GRAB_MUTEX" : new_flag ==
+		       LOW_DROP_MUTEX ? "LOW_DROP_MUTEX" : new_flag ==
+		       END_OF_CYCLE ? "END_OF_CYCLE" : "ERROR"), new_flag);
 		//debug(DBG_DEBUG, "%s:%d: write_flag = %d\n", s, l, new_flag);
 	}
 	if (use_flag_mutex)
 		pthread_mutex_unlock(&flag_mutex);
 }
+
 #define read_flag(A) _read_flag(__FUNCTION__,__LINE__)
 #define write_flag(A) _write_flag(__FUNCTION__,__LINE__,A)
 
@@ -143,12 +161,12 @@
 	struct thread *t = (struct thread *)arg;
 	while (!thread_quit(t)) {
 		while_not_flag(LOW_START_CYCLE, t)
-			rt_nanosleep(1*NS_PER_MS);
+		    rt_nanosleep(1 * NS_PER_MS);
 		debug(DBG_INFO, "low try mutex\n");
 		pthread_mutex_lock(&pi_mutex);
 		debug(DBG_INFO, "low grab mutex\n");
 		write_flag(MED_START_WORK);
-		rt_nanosleep(1*NS_PER_MS);
+		rt_nanosleep(1 * NS_PER_MS);
 		while_not_flag(LOW_DROP_MUTEX, t) {
 			//printf("!"); fflush(NULL);
 			rt_nanosleep(1);
@@ -158,7 +176,7 @@
 		pthread_mutex_unlock(&pi_mutex);
 		while_not_flag(END_OF_CYCLE, t) {
 			//printf("@"); fflush(NULL);
-			rt_nanosleep(1*NS_PER_MS);
+			rt_nanosleep(1 * NS_PER_MS);
 		}
 	}
 	debug(DBG_INFO, "low prio thread finished (flags=%#x)\n", t->flags);
@@ -167,7 +185,7 @@
 
 void *med_prio_thread(void *arg)
 {
-	static atomic_t m_flag = {0};
+	static atomic_t m_flag = { 0 };
 	struct thread *t = (struct thread *)arg;
 #define MP "\t\t\t"
 	while (!thread_quit(t)) {
@@ -175,22 +193,24 @@
 		phase_t f;
 		while_not_flag(MED_START_WORK, t) {
 			//printf("."); fflush(NULL);
-			rt_nanosleep(1*NS_PER_MS);
+			rt_nanosleep(1 * NS_PER_MS);
 		}
 		if ((i_am_the_one = atomic_inc(&m_flag)) == 1) {
-			debug(DBG_INFO, MP"thread %d writing flag\n", t->id);
+			debug(DBG_INFO, MP "thread %d writing flag\n", t->id);
 			write_flag(HIGH_GRAB_MUTEX);
 		}
 
-		debug(DBG_DEBUG, MP"ready to start work\n");
+		debug(DBG_DEBUG, MP "ready to start work\n");
 		write_flag(HIGH_GRAB_MUTEX);
-		while (((f = read_flag()) == HIGH_GRAB_MUTEX || f == LOW_DROP_MUTEX) && !thread_quit(t)) {
+		while (((f = read_flag()) == HIGH_GRAB_MUTEX
+			|| f == LOW_DROP_MUTEX) && !thread_quit(t)) {
 			busy_work_ms(MED_WORK_MS);
 			//printf("-"); fflush(NULL);
 		}
-		debug(DBG_DEBUG, MP"done working -- time to sleep\n");
+		debug(DBG_DEBUG, MP "done working -- time to sleep\n");
 		if (i_am_the_one == 1) {
-			debug(DBG_INFO, MP"thread %d resetting m_flag\n", t->id);
+			debug(DBG_INFO, MP "thread %d resetting m_flag\n",
+			      t->id);
 			atomic_set(0, &m_flag);
 		}
 	}
@@ -213,44 +233,47 @@
 		write_flag(LOW_START_CYCLE);
 		while_not_flag(HIGH_GRAB_MUTEX, t) {
 			//printf("a"); fflush(NULL);
-			rt_nanosleep(10*NS_PER_MS);
+			rt_nanosleep(10 * NS_PER_MS);
 		}
-		debug(DBG_INFO, HP"high try mutex\n");
+		debug(DBG_INFO, HP "high try mutex\n");
 		write_flag(LOW_DROP_MUTEX);
 		start = rt_gettime();
 		pthread_mutex_lock(&pi_mutex);
 		now = rt_gettime();
-		debug(DBG_INFO, HP"high grab mutex\n");
+		debug(DBG_INFO, HP "high grab mutex\n");
 		write_flag(END_OF_CYCLE);
-		debug(DBG_INFO, HP"high drop mutex\n");
-		delta_us = (now - start)/NS_PER_US;
+		debug(DBG_INFO, HP "high drop mutex\n");
+		delta_us = (now - start) / NS_PER_US;
 		if (delta_us > max_delay_us)
 			max_delay_us = delta_us;
 		debug(DBG_WARN, "high prio delay time: %d us\n", delta_us);
-		delta_us = (now - low_drop_time)/NS_PER_US;
+		delta_us = (now - low_drop_time) / NS_PER_US;
 		if (delta_us > max_drop2grab_us)
 			max_drop2grab_us = delta_us;
-		debug(DBG_WARN, "low drop to high grab time: %d us\n", delta_us);
+		debug(DBG_WARN, "low drop to high grab time: %d us\n",
+		      delta_us);
 		pthread_mutex_unlock(&pi_mutex);
-		rt_nanosleep(10*NS_PER_MS);
+		rt_nanosleep(10 * NS_PER_MS);
 	}
 	all_threads_quit();
 	write_flag(END_OF_GAME);
-	debug(DBG_INFO, HP"high prio done\n");
+	debug(DBG_INFO, HP "high prio done\n");
 #undef HP
 	return NULL;
 }
 
 int main(int argc, char *argv[])
 {
-	int i,numcpus;
+	int i, numcpus;
 	setup();
 
 	rt_init("hfi:x:", parse_args, argc, argv);
 
 	if (!med_threads) {
-		printf("This test requires that at least NRCPUS medium priority threads run\n");
-		printf("If it is run bound to a single CPU, you can specify -x 1\n");
+		printf
+		    ("This test requires that at least NRCPUS medium priority threads run\n");
+		printf
+		    ("If it is run bound to a single CPU, you can specify -x 1\n");
 		printf("No User input , using default value for NRCPUS");
 		numcpus = sysconf(_SC_NPROCESSORS_ONLN);
 		med_threads = numcpus;
@@ -268,10 +291,10 @@
 
 	init_pi_mutex(&pi_mutex);
 
-	create_fifo_thread(low_prio_rt_thread, (void*)0, LOW_PRIO);
-	create_fifo_thread(high_prio_rt_thread, (void*)iterations, HIGH_PRIO);
+	create_fifo_thread(low_prio_rt_thread, (void *)0, LOW_PRIO);
+	create_fifo_thread(high_prio_rt_thread, (void *)iterations, HIGH_PRIO);
 	for (i = 0; i < med_threads; i++) {
-		create_fifo_thread(med_prio_thread, (void*)0, MED_PRIO);
+		create_fifo_thread(med_prio_thread, (void *)0, MED_PRIO);
 	}
 
 	while (phase_flag != END_OF_GAME)
@@ -279,8 +302,11 @@
 	join_threads();
 	cleanup(0);
 
-	printf("High priority lock aquisition maximum delay: %dus\n", max_delay_us);
-	printf("Low priority lock drop to high priority acqusistion time: %dus\n", max_drop2grab_us);
+	printf("High priority lock aquisition maximum delay: %dus\n",
+	       max_delay_us);
+	printf
+	    ("Low priority lock drop to high priority acqusistion time: %dus\n",
+	     max_drop2grab_us);
 	printf("\n");
 
 	return 0;
diff --git a/testcases/realtime/func/pi_perf/pi_perf.c b/testcases/realtime/func/pi_perf/pi_perf.c
index edb4b27..daa7643 100644
--- a/testcases/realtime/func/pi_perf/pi_perf.c
+++ b/testcases/realtime/func/pi_perf/pi_perf.c
@@ -60,7 +60,7 @@
 #define DEF_ITERATIONS 100
 
 #define HIST_BUCKETS 100
-#define THRESHOLD 200 /* microseconds */
+#define THRESHOLD 200		/* microseconds */
 
 pthread_barrier_t bar1, bar2;
 pthread_mutex_t lock;
@@ -84,8 +84,10 @@
 {
 	rt_help();
 	printf("pi_perf_test specific options:\n");
-	printf("  -nNUMBER   Number of busy threads. Default = number of cpus\n");
-	printf("  -iNUMBER   Number of iterations. Default = %d\n", DEF_ITERATIONS);
+	printf
+	    ("  -nNUMBER   Number of busy threads. Default = number of cpus\n");
+	printf("  -iNUMBER   Number of iterations. Default = %d\n",
+	       DEF_ITERATIONS);
 	printf("  -tPERIOD   Duration of work. Number of ms.\n");
 }
 
@@ -112,7 +114,7 @@
 	return handled;
 }
 
-void * busy_thread(void *arg)
+void *busy_thread(void *arg)
 {
 	struct thread *thr = (struct thread *)arg;
 
@@ -128,7 +130,7 @@
 	return NULL;
 }
 
-void * low_prio_thread(void *arg)
+void *low_prio_thread(void *arg)
 {
 	nsec_t low_start, low_hold;
 	unsigned int i;
@@ -142,7 +144,7 @@
 		/* Wait for all threads to reach barrier wait.
 		   Since we already own the mutex, high prio
 		   thread will boost our priority.
-		*/
+		 */
 		pthread_barrier_wait(&bar1);
 
 		low_start = rt_gettime();
@@ -156,7 +158,7 @@
 		rec.y = low_hold / NS_PER_US;
 		stats_container_append(&low_dat, rec);
 
-		if (i == iterations-1)
+		if (i == iterations - 1)
 			end = 1;
 
 		/* Wait for all threads to finish this iteration */
@@ -166,7 +168,7 @@
 	return NULL;
 }
 
-void * high_prio_thread(void *arg)
+void *high_prio_thread(void *arg)
 {
 	nsec_t high_start, high_end, high_get_lock;
 	unsigned int i;
@@ -201,11 +203,14 @@
 
 	stats_hist(&cpu_delay_hist, &cpu_delay_dat);
 	stats_container_save("samples", "pi_perf Latency Scatter Plot",
-				"Iteration", "Latency (us)", &cpu_delay_dat, "points");
+			     "Iteration", "Latency (us)", &cpu_delay_dat,
+			     "points");
 	stats_container_save("hist", "pi_perf Latency Histogram",
-				"Latency (us)", "Samples", &cpu_delay_hist, "steps");
+			     "Latency (us)", "Samples", &cpu_delay_hist,
+			     "steps");
 
-	printf("Time taken for high prio thread to get the lock once released by low prio thread\n");
+	printf
+	    ("Time taken for high prio thread to get the lock once released by low prio thread\n");
 	printf("Min delay = %ld us\n", stats_min(&cpu_delay_dat));
 	printf("Max delay = %ld us\n", stats_max(&cpu_delay_dat));
 	printf("Average delay = %4.2f us\n", stats_avg(&cpu_delay_dat));
@@ -252,17 +257,19 @@
 
 	if ((ret = create_fifo_thread(low_prio_thread, (void *)0, LOWPRIO)) < 0)
 		exit(ret);
-	if ((ret = create_fifo_thread(high_prio_thread, (void *)0, HIGHPRIO)) < 0)
+	if ((ret =
+	     create_fifo_thread(high_prio_thread, (void *)0, HIGHPRIO)) < 0)
 		exit(ret);
 
 	for (i = 0; i < num_busy; i++) {
-		if ((ret = create_fifo_thread(busy_thread, (void *)i, BUSYPRIO)) < 0)
+		if ((ret =
+		     create_fifo_thread(busy_thread, (void *)i, BUSYPRIO)) < 0)
 			exit(ret);
 	}
 
 	join_threads();
 	printf("Criteria: High prio lock wait time < "
-			"(Low prio lock held time + %d us)\n", (int)pass_criteria);
+	       "(Low prio lock held time + %d us)\n", (int)pass_criteria);
 
 	ret = 0;
 	if (max_pi_delay > pass_criteria)
diff --git a/testcases/realtime/func/prio-preempt/prio-preempt.c b/testcases/realtime/func/prio-preempt/prio-preempt.c
index 394473f..a43c067 100644
--- a/testcases/realtime/func/prio-preempt/prio-preempt.c
+++ b/testcases/realtime/func/prio-preempt/prio-preempt.c
@@ -74,13 +74,13 @@
 
 volatile int busy_threads = 0;
 volatile int test_over = 0;
-volatile int threads_running=0;
+volatile int threads_running = 0;
 static int rt_threads = -1;
 static int int_threads = 0;
-static pthread_mutex_t  bmutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t bmutex = PTHREAD_MUTEX_INITIALIZER;
 
-static pthread_mutex_t mutex[NUM_WORKERS+1];
-static pthread_cond_t cond[NUM_WORKERS+1];
+static pthread_mutex_t mutex[NUM_WORKERS + 1];
+static pthread_cond_t cond[NUM_WORKERS + 1];
 static int t_after_wait[NUM_WORKERS];
 
 static int ret = 0;
@@ -100,43 +100,43 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'i':
-			int_threads = 1;
-			break;
-		case 'n':
-			rt_threads = atoi(v);
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'i':
+		int_threads = 1;
+		break;
+	case 'n':
+		rt_threads = atoi(v);
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
-void *int_thread(void* arg)
+void *int_thread(void *arg)
 {
 	intptr_t a = 0;
 	while (!test_over) {
 		/* do some busy work */
-		if (!(a%4))
+		if (!(a % 4))
 			a = a * 3;
-		else if (!(a%6))
-			a = a /2;
+		else if (!(a % 6))
+			a = a / 2;
 		else
 			a++;
 		usleep(20);
 	}
-	return (void*)a;
+	return (void *)a;
 }
 
-void *busy_thread(void* arg)
+void *busy_thread(void *arg)
 {
 	struct sched_param sched_param;
 	int policy, mypri = 0, tid;
-	tid = (intptr_t)(((struct thread *) arg)->arg);
+	tid = (intptr_t) (((struct thread *)arg)->arg);
 
 	if (pthread_getschedparam(pthread_self(), &policy, &sched_param) != 0) {
 		printf("ERR: Couldn't get pthread info \n");
@@ -152,17 +152,17 @@
 	/* TODO: Add sched set affinity here */
 
 	/* Busy loop */
-	while (!test_over);
+	while (!test_over) ;
 
 	printf("Busy Thread %d(%d): Exiting\n", tid, mypri);
 	return NULL;
 }
 
-void *worker_thread(void* arg)
+void *worker_thread(void *arg)
 {
 	struct sched_param sched_param;
 	int policy, rc, mypri = 0, tid, times = 0;
-	tid = (intptr_t)(((struct thread *) arg)->arg);
+	tid = (intptr_t) (((struct thread *)arg)->arg);
 	nsec_t pstart, pend;
 
 	if (pthread_getschedparam(pthread_self(), &policy, &sched_param) != 0) {
@@ -182,10 +182,11 @@
 	rc = pthread_cond_wait(&cond[tid], &mutex[tid]);
 	rc = pthread_mutex_unlock(&mutex[tid]);
 
-	debug(DBG_INFO, "%llu: Thread %d(%d) wakes up from sleep \n", rt_gettime(), tid, mypri);
+	debug(DBG_INFO, "%llu: Thread %d(%d) wakes up from sleep \n",
+	      rt_gettime(), tid, mypri);
 
 	/*check if we're the last thread */
-	if (tid == NUM_WORKERS-1) {
+	if (tid == NUM_WORKERS - 1) {
 		t_after_wait[tid] = 1;
 		pthread_mutex_lock(&bmutex);
 		threads_running--;
@@ -194,26 +195,28 @@
 	}
 
 	/* Signal next thread */
-	rc = pthread_mutex_lock(&mutex[tid+1]);
-	rc = pthread_cond_signal(&cond[tid+1]);
-	debug(DBG_INFO, "%llu: Thread %d(%d): Sent signal (%d) to (%d)\n", rt_gettime(), tid, mypri,
-			rc, tid+1);
+	rc = pthread_mutex_lock(&mutex[tid + 1]);
+	rc = pthread_cond_signal(&cond[tid + 1]);
+	debug(DBG_INFO, "%llu: Thread %d(%d): Sent signal (%d) to (%d)\n",
+	      rt_gettime(), tid, mypri, rc, tid + 1);
 
-   	pstart = pend = rt_gettime();
-	rc = pthread_mutex_unlock(&mutex[tid+1]);
+	pstart = pend = rt_gettime();
+	rc = pthread_mutex_unlock(&mutex[tid + 1]);
 
-	debug(DBG_INFO, "%llu: Thread %d(%d) setting it's bit \n",rt_gettime(), tid, mypri);
+	debug(DBG_INFO, "%llu: Thread %d(%d) setting it's bit \n", rt_gettime(),
+	      tid, mypri);
 
 	t_after_wait[tid] = 1;
 
-	while (t_after_wait[tid+1] != 1) {
+	while (t_after_wait[tid + 1] != 1) {
 		pend = rt_gettime();
 		times++;
 	}
 
 	if (times >= (int)pass_criteria) {
-		printf("Thread %d(%d): Non-Preempt limit reached. %llu ns latency\n",
-				tid, mypri, pend-pstart);
+		printf
+		    ("Thread %d(%d): Non-Preempt limit reached. %llu ns latency\n",
+		     tid, mypri, pend - pstart);
 		ret = 1;
 	}
 
@@ -225,7 +228,7 @@
 	return NULL;
 }
 
-void *master_thread(void* arg)
+void *master_thread(void *arg)
 {
 	int i, pri_boost;
 
@@ -235,30 +238,33 @@
 	if (int_threads) {
 		pri_boost = 90;
 		for (i = 0; i < rt_threads; i++) {
-			create_fifo_thread(int_thread, (void*)0,
-					sched_get_priority_min(SCHED_FIFO) + pri_boost);
+			create_fifo_thread(int_thread, (void *)0,
+					   sched_get_priority_min(SCHED_FIFO) +
+					   pri_boost);
 		}
 	}
 
 	/* start the (N-1) busy threads */
 	pri_boost = 80;
 	for (i = rt_threads; i > 1; i--) {
-		create_fifo_thread(busy_thread, (void*)(intptr_t)i,
-			sched_get_priority_min(SCHED_FIFO) + pri_boost);
+		create_fifo_thread(busy_thread, (void *)(intptr_t) i,
+				   sched_get_priority_min(SCHED_FIFO) +
+				   pri_boost);
 	}
 
 	/* make sure children are started */
-	while (busy_threads < (rt_threads-1))
+	while (busy_threads < (rt_threads - 1))
 		usleep(100);
 
 	printf("Busy threads created!\n");
 
 	/* start NUM_WORKERS worker threads */
-	for (i = 0, pri_boost = 10; i < NUM_WORKERS ; i++, pri_boost+=2) {
+	for (i = 0, pri_boost = 10; i < NUM_WORKERS; i++, pri_boost += 2) {
 		pthread_mutex_init(&mutex[i], NULL);
 		pthread_cond_init(&cond[i], NULL);
-		create_fifo_thread(worker_thread, (void*)(intptr_t)i,
-				sched_get_priority_min(SCHED_FIFO) + pri_boost);
+		create_fifo_thread(worker_thread, (void *)(intptr_t) i,
+				   sched_get_priority_min(SCHED_FIFO) +
+				   pri_boost);
 	}
 
 	printf("Worker threads created\n");
@@ -275,15 +281,15 @@
 	pthread_mutex_unlock(&mutex[0]);
 
 	while (threads_running)
-		usleep(500000); /* this period greatly affects the number of failures! */
+		usleep(500000);	/* this period greatly affects the number of failures! */
 
 	test_over = 1;
 	return NULL;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
-	int pri_boost,numcpus;
+	int pri_boost, numcpus;
 	setup();
 
 	pass_criteria = CHECK_LIMIT;
@@ -295,28 +301,32 @@
 	   Otherwise, the box will hang */
 
 	if (rt_threads == -1 || rt_threads > numcpus) {
-	    rt_threads = numcpus;
-	    printf("Maximum busy thread count(%d), "
-		   "should not exceed number of cpus(%d)\n", rt_threads, numcpus);
-	    printf("Using %d\n", numcpus);
+		rt_threads = numcpus;
+		printf("Maximum busy thread count(%d), "
+		       "should not exceed number of cpus(%d)\n", rt_threads,
+		       numcpus);
+		printf("Using %d\n", numcpus);
 	}
 
-	/* Test boilder plate: title and parameters*/
+	/* Test boilder plate: title and parameters */
 	printf("\n-------------------\n");
 	printf("Priority Preemption\n");
 	printf("-------------------\n\n");
 	printf("Busy Threads: %d\n", rt_threads);
-	printf("Interrupter Threads: %s\n", int_threads ? "Enabled" : "Disabled");
+	printf("Interrupter Threads: %s\n",
+	       int_threads ? "Enabled" : "Disabled");
 	printf("Worker Threads: %d\n\n", NUM_WORKERS);
 
 	pri_boost = 81;
-	create_fifo_thread(master_thread, (void*)0,
-		 sched_get_priority_min(SCHED_FIFO) + pri_boost);
+	create_fifo_thread(master_thread, (void *)0,
+			   sched_get_priority_min(SCHED_FIFO) + pri_boost);
 
 	/* wait for threads to complete */
 	join_threads();
 
-	printf("\nCriteria: All threads appropriately preempted within %d loop(s)\n", (int)pass_criteria);
+	printf
+	    ("\nCriteria: All threads appropriately preempted within %d loop(s)\n",
+	     (int)pass_criteria);
 	printf("Result: %s\n", ret ? "FAIL" : "PASS");
 	return ret;
 }
diff --git a/testcases/realtime/func/prio-wake/prio-wake.c b/testcases/realtime/func/prio-wake/prio-wake.c
index b622a62..18c0405 100644
--- a/testcases/realtime/func/prio-wake/prio-wake.c
+++ b/testcases/realtime/func/prio-wake/prio-wake.c
@@ -79,18 +79,18 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'n':
-			rt_threads = atoi(v);
-			break;
-		case 'l':
-			locked_broadcast = atoi(v);
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'n':
+		rt_threads = atoi(v);
+		break;
+	case 'l':
+		locked_broadcast = atoi(v);
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -99,23 +99,24 @@
 	int *arr;
 	int counter;
 };
-struct array wakeup = { NULL , 0 };
+struct array wakeup = { NULL, 0 };
 
-void *master_thread(void* arg)
+void *master_thread(void *arg)
 {
 	int rc;
 	nsec_t start;
 
 	/* make sure children are started */
 	while (running_threads < rt_threads)
-	    usleep(1000);
+		usleep(1000);
 	/* give the worker threads a chance to get to sleep in the kernel
 	 * in the unlocked broadcast case. */
 	usleep(1000);
 
 	start = rt_gettime() - beginrun;
 
-	printf("%08lld us: Master thread about to wake the workers\n", start/NS_PER_US);
+	printf("%08lld us: Master thread about to wake the workers\n",
+	       start / NS_PER_US);
 	/* start the children threads */
 	if (locked_broadcast)
 		rc = pthread_mutex_lock(&mutex);
@@ -126,7 +127,7 @@
 	return NULL;
 }
 
-void *worker_thread(void* arg)
+void *worker_thread(void *arg)
 {
 	struct sched_param sched_param;
 	int policy;
@@ -134,17 +135,19 @@
 	int mypri;
 	int j;
 	nsec_t start, wake;
-	j = (intptr_t)arg;
+	j = (intptr_t) arg;
 
-	if (pthread_getschedparam(pthread_self(), &policy, &sched_param) != 0)  {
-		printf("ERR: Couldn't get pthread info. Priority value wrong\n");
+	if (pthread_getschedparam(pthread_self(), &policy, &sched_param) != 0) {
+		printf
+		    ("ERR: Couldn't get pthread info. Priority value wrong\n");
 		mypri = -1;
 	} else {
 		mypri = sched_param.sched_priority;
 	}
 
 	start = rt_gettime() - beginrun;
-	debug(0, "%08lld us: RealtimeThread-%03d pri %03d started\n", start/NS_PER_US, j, mypri);
+	debug(0, "%08lld us: RealtimeThread-%03d pri %03d started\n",
+	      start / NS_PER_US, j, mypri);
 
 	rc = pthread_mutex_lock(&mutex);
 	running_threads++;
@@ -153,14 +156,15 @@
 	wake = rt_gettime() - beginrun;
 	running_threads--;
 	wakeup.arr[wakeup.counter++] = mypri;
-	debug(0, "%08lld us: RealtimeThread-%03d pri %03d awake\n", wake/NS_PER_US, j, mypri);
+	debug(0, "%08lld us: RealtimeThread-%03d pri %03d awake\n",
+	      wake / NS_PER_US, j, mypri);
 
 	rc = pthread_mutex_unlock(&mutex);
 
 	return NULL;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 	int threads_per_prio;
 	int numcpus;
@@ -191,9 +195,9 @@
 	/* calculate the number of threads per priority */
 	/* we get num numprios -1 for the workers, leaving one for the master */
 	numprios = sched_get_priority_max(SCHED_FIFO) -
-		   sched_get_priority_min(SCHED_FIFO);
+	    sched_get_priority_min(SCHED_FIFO);
 
-	threads_per_prio = rt_threads /	numprios;
+	threads_per_prio = rt_threads / numprios;
 	if (rt_threads % numprios)
 		threads_per_prio++;
 
@@ -202,11 +206,11 @@
 	for (i = rt_threads; i > 0; i--) {
 		if ((i != rt_threads && (i % threads_per_prio) == 0))
 			prio++;
-		create_fifo_thread(worker_thread, (void*)(intptr_t)i, prio);
+		create_fifo_thread(worker_thread, (void *)(intptr_t) i, prio);
 	}
 
 	/* start the master thread */
-	create_fifo_thread(master_thread, (void*)(intptr_t)i, ++prio);
+	create_fifo_thread(master_thread, (void *)(intptr_t) i, ++prio);
 
 	/* wait for threads to complete */
 	join_threads();
@@ -215,9 +219,10 @@
 
 	printf("\nCriteria: Threads should be woken up in priority order\n");
 
-	for (i = 0; i < (wakeup.counter-1); i++) {
-		if (wakeup.arr[i] < wakeup.arr[i+1]) {
-			printf("FAIL: Thread %d woken before %d\n", wakeup.arr[i], wakeup.arr[i+1]);
+	for (i = 0; i < (wakeup.counter - 1); i++) {
+		if (wakeup.arr[i] < wakeup.arr[i + 1]) {
+			printf("FAIL: Thread %d woken before %d\n",
+			       wakeup.arr[i], wakeup.arr[i + 1]);
 			ret++;
 		}
 	}
diff --git a/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c b/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
index 0881dc5..70d03ca 100644
--- a/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
+++ b/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
@@ -81,22 +81,22 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'l':
-			latency_threshold = strtoull(v, NULL, 0);
-			break;
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'l':
+		latency_threshold = strtoull(v, NULL, 0);
+		break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
 #if 0
 /* Set up a signal handler */
-int rt_setsighandler(int signum, void(*handler)(int))
+int rt_setsighandler(int signum, void (*handler) (int))
 {
 	struct sigaction sa;
 	memset(&sa, 0, sizeof(sa));
@@ -159,7 +159,7 @@
 	for (i = 0; i < ITERATIONS; i++) {
 		sigwait(&set, &sig);
 		end = rt_gettime();
-		delta = (end - begin)/NS_PER_US;
+		delta = (end - begin) / NS_PER_US;
 		rec.x = i;
 		rec.y = delta;
 		stats_container_append(&dat, rec);
@@ -170,7 +170,8 @@
 		if (delta > max)
 			max = delta;
 
-		if (delta > pass_criteria) fail++;
+		if (delta > pass_criteria)
+			fail++;
 
 		debug(DBG_INFO, "Iteration %d: Took %ld us. Max = %ld us, "
 		      "Min = %ld us\n", i, delta, max, min);
@@ -190,8 +191,9 @@
 		latency_trace_stop();
 
 		if (i != ITERATIONS) {
-			printf("Latency threshold (%luus) exceeded at iteration %d\n",
-			       latency_threshold, i);
+			printf
+			    ("Latency threshold (%luus) exceeded at iteration %d\n",
+			     latency_threshold, i);
 			fflush(stdout);
 			buffer_print();
 			latency_trace_print();
@@ -223,35 +225,41 @@
 
 void *signal_sending_thread(void *arg)
 {
-	int target_thread = (intptr_t)((struct thread *)arg)->arg;
+	int target_thread = (intptr_t) ((struct thread *)arg)->arg;
 	int i, ret;
 
 	debug(DBG_INFO, "Signal sending thread: target thread id =%d\n",
 	      (int)PTHREADOF(target_thread));
 
 	/* Wait for the receiving thread to initialize */
-	while (!atomic_get(&flag)) {usleep(100);};
+	while (!atomic_get(&flag)) {
+		usleep(100);
+	};
 	atomic_set(0, &flag);
 
 	/* Warm up */
-	for (i=0; i<5; i++) {
+	for (i = 0; i < 5; i++) {
 
 		debug(DBG_DEBUG, "Sending signal (Warm up). Loopcnt = %d\n", i);
 
-		if ((ret = pthread_kill(PTHREADOF(target_thread), SIGNALNUMBER))) {
+		if ((ret =
+		     pthread_kill(PTHREADOF(target_thread), SIGNALNUMBER))) {
 			printf("pthread_kill returned %d\n", ret);
 		}
 		/* Wait till the receiving thread processes the signal */
-		while (!atomic_get(&flag)) {usleep(100);};
+		while (!atomic_get(&flag)) {
+			usleep(100);
+		};
 		atomic_set(0, &flag);
 	}
-	for (i=0; i<ITERATIONS; i++) {
+	for (i = 0; i < ITERATIONS; i++) {
 
 		debug(DBG_DEBUG, "Sending signal. Loopcnt = %d\n", i);
 
 		/* Record the time just before sending the signal */
 		begin = rt_gettime();
-		if ((ret = pthread_kill(PTHREADOF(target_thread), SIGNALNUMBER))) {
+		if ((ret =
+		     pthread_kill(PTHREADOF(target_thread), SIGNALNUMBER))) {
 			printf("pthread_kill returned %d\n", ret);
 		}
 		/* Wait till the receiving thread processes the signal */
@@ -271,7 +279,7 @@
 {
 	int thr_id1, thr_id2;
 
-	atomic_set(0,&flag);
+	atomic_set(0, &flag);
 	setup();
 
 	pass_criteria = THRESHOLD;
@@ -286,9 +294,11 @@
 	debug(DBG_DEBUG, "Main creating threads\n");
 	fflush(stdout);
 
-	thr_id1 = create_fifo_thread(signal_receiving_thread, (void*)0, PRIO);
-	thr_id2 = create_fifo_thread(signal_sending_thread, (void*)(intptr_t)thr_id1, PRIO-1);
-//	thr_id2 = create_other_thread(signal_sending_thread, (void*)(intptr_t)thr_id1);
+	thr_id1 = create_fifo_thread(signal_receiving_thread, (void *)0, PRIO);
+	thr_id2 =
+	    create_fifo_thread(signal_sending_thread,
+			       (void *)(intptr_t) thr_id1, PRIO - 1);
+//      thr_id2 = create_other_thread(signal_sending_thread, (void*)(intptr_t)thr_id1);
 
 	debug(DBG_DEBUG, "Main joining threads debug\n");
 	join_thread(thr_id1);
diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c
index 42a5e6d..27872e0 100644
--- a/testcases/realtime/func/rt-migrate/rt-migrate.c
+++ b/testcases/realtime/func/rt-migrate/rt-migrate.c
@@ -79,7 +79,7 @@
 
 int numcpus;
 static int mark_fd = -1;
-static __thread char buff[BUFSIZ+1];
+static __thread char buff[BUFSIZ + 1];
 
 static void setup_ftrace_marker(void)
 {
@@ -186,8 +186,7 @@
 	       "-r time     Run time (ms) to busy loop the threads (20)\n"
 	       "-t time     Sleep time (ms) between intervals (100)\n"
 	       "-e time     Max allowed error (microsecs)\n"
-	       "-l loops    Number of iterations to run (50)\n"
-	      );
+	       "-l loops    Number of iterations to run (50)\n");
 }
 
 /*
@@ -249,9 +248,9 @@
 	unsigned long long tasks_min[nr_tasks];
 	unsigned long long tasks_avg[nr_tasks];
 
-	memset(tasks_max, 0, sizeof(tasks_max[0])*nr_tasks);
-	memset(tasks_min, 0xff, sizeof(tasks_min[0])*nr_tasks);
-	memset(tasks_avg, 0, sizeof(tasks_avg[0])*nr_tasks);
+	memset(tasks_max, 0, sizeof(tasks_max[0]) * nr_tasks);
+	memset(tasks_min, 0xff, sizeof(tasks_min[0]) * nr_tasks);
+	memset(tasks_avg, 0, sizeof(tasks_avg[0]) * nr_tasks);
 
 	printf("Iter: ");
 	for (t = 0; t < nr_tasks; t++)
@@ -286,7 +285,7 @@
 
 	for (t = 0; t < nr_tasks; t++) {
 		printf(" Task %d (prio %d) (pid %ld):\n", t, t + prio_start,
-			thread_pids[t]);
+		       thread_pids[t]);
 		printf("   Max: %lld us\n", tasks_max[t]);
 		printf("   Min: %lld us\n", tasks_min[t]);
 		printf("   Tot: %lld us\n", tasks_avg[t] * nr_runs);
@@ -313,7 +312,7 @@
 void *start_task(void *data)
 {
 	struct thread *thr = (struct thread *)data;
-	long id = (long) thr->arg;
+	long id = (long)thr->arg;
 	thread_pids[id] = gettid();
 	unsigned long long start_time;
 	int ret;
@@ -331,7 +330,7 @@
 	pid = gettid();
 
 	/* Check if we are the highest prio task */
-	if (id == nr_tasks-1)
+	if (id == nr_tasks - 1)
 		high = 1;
 
 	while (!done) {
@@ -340,7 +339,8 @@
 			if (!CPU_ISSET(cpu, &save_cpumask))
 				cpu = 0;
 			CPU_ZERO(&cpumask);
-			CPU_SET(cpu, &cpumask); cpu++;
+			CPU_SET(cpu, &cpumask);
+			cpu++;
 			sched_setaffinity(0, sizeof(cpumask), &cpumask);
 		}
 		pthread_barrier_wait(&start_barrier);
@@ -434,7 +434,7 @@
 	ret = pthread_barrier_init(&end_barrier, NULL, nr_tasks + 1);
 	if (ret < 0)
 		debug(DBG_ERR, "pthread_barrier_init failed: %s\n",
-				strerror(ret));
+		      strerror(ret));
 
 	for (i = 0; i < nr_tasks; i++) {
 		stats_container_init(&intervals[i], nr_runs);
@@ -463,7 +463,7 @@
 	param.sched_priority = nr_tasks + prio_start;
 	if (sched_setscheduler(0, SCHED_FIFO, &param))
 		debug(DBG_WARN, "Warning, can't set priority of"
-				"main thread !\n");
+		      "main thread !\n");
 	intv.tv_sec = INTERVAL / NS_PER_SEC;
 	intv.tv_nsec = INTERVAL % (1 * NS_PER_SEC);
 
@@ -487,7 +487,7 @@
 
 		end = rt_gettime() / NS_PER_US;
 		ftrace_write("Loop %d end now=%lld diff=%lld\n",
-				loop, end, end - now);
+			     loop, end, end - now);
 		ret = pthread_barrier_wait(&end_barrier);
 
 		if (stop || (check && check_times(loop))) {
diff --git a/testcases/realtime/func/sched_football/sched_football.c b/testcases/realtime/func/sched_football/sched_football.c
index 94a88a7..6f075ae 100644
--- a/testcases/realtime/func/sched_football/sched_football.c
+++ b/testcases/realtime/func/sched_football/sched_football.c
@@ -91,40 +91,40 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'n':
-			players_per_team = atoi(v);
-			break;
-		case 'l':
-			game_length= atoi(v);
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'n':
+		players_per_team = atoi(v);
+		break;
+	case 'l':
+		game_length = atoi(v);
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
 /* This is the defensive team. They're trying to block the offense */
-void *thread_defense(void* arg)
+void *thread_defense(void *arg)
 {
 	atomic_inc(&players_ready);
 	/*keep the ball from being moved */
 	while (1) {
-		sched_yield(); /* let other defenders run */
+		sched_yield();	/* let other defenders run */
 	}
 	return NULL;
 }
 
 /* This is the offensive team. They're trying to move the ball */
-void *thread_offense(void* arg)
+void *thread_offense(void *arg)
 {
 	atomic_inc(&players_ready);
 	while (1) {
-		the_ball++; /* move the ball ahead one yard */
-		sched_yield(); /* let other offensive players run */
+		the_ball++;	/* move the ball ahead one yard */
+		sched_yield();	/* let other offensive players run */
 	}
 	return NULL;
 }
@@ -154,7 +154,7 @@
 	return final_ball != 0;
 }
 
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
 {
 	struct sched_param param;
 	int priority;
@@ -162,7 +162,7 @@
 	int result;
 	setup();
 
-	rt_init("n:l:h",parse_args,argc,argv);
+	rt_init("n:l:h", parse_args, argc, argv);
 
 	if (players_per_team == 0)
 		players_per_team = sysconf(_SC_NPROCESSORS_ONLN);
@@ -182,7 +182,7 @@
 	 */
 	priority = 15;
 	printf("Starting %d offense threads at priority %d\n",
-			players_per_team, priority);
+	       players_per_team, priority);
 	for (i = 0; i < players_per_team; i++)
 		create_fifo_thread(thread_offense, NULL, priority);
 
@@ -193,7 +193,7 @@
 	/* Start the defense */
 	priority = 30;
 	printf("Starting %d defense threads at priority %d\n",
-			players_per_team, priority);
+	       players_per_team, priority);
 	for (i = 0; i < players_per_team; i++)
 		create_fifo_thread(thread_defense, NULL, priority);
 
diff --git a/testcases/realtime/func/sched_jitter/sched_jitter.c b/testcases/realtime/func/sched_jitter/sched_jitter.c
index dc45e58..9989528 100644
--- a/testcases/realtime/func/sched_jitter/sched_jitter.c
+++ b/testcases/realtime/func/sched_jitter/sched_jitter.c
@@ -58,7 +58,7 @@
 
 int array[WORKLEN];
 
-volatile int flag; /*let interrupter know we're done */
+volatile int flag;		/*let interrupter know we're done */
 
 void usage(void)
 {
@@ -71,17 +71,17 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
-unsigned long long ts_sub(struct timespec a , struct timespec b)
+unsigned long long ts_sub(struct timespec a, struct timespec b)
 {
 	unsigned long long first, second;
 
@@ -93,9 +93,9 @@
 void print_unit(unsigned long long val)
 {
 	if (val > 1000000)
-		printf("%f ms\n", (float)(val)/1000000);
+		printf("%f ms\n", (float)(val) / 1000000);
 	else if (val > 1000)
-		printf("%f us\n", (float)(val)/1000);
+		printf("%f us\n", (float)(val) / 1000);
 	else
 		printf("%f ns\n", (float)val);
 
@@ -104,29 +104,29 @@
 void do_work(int runs)
 {
 	int i, j;
-	for (i=0; i < runs; i++) {
-		for (j=0; j < WORKLEN-1; j++)
-			array[j] = array[j]+array[j+1];
-		for (j=0; j < WORKLEN-1; j++)
-			array[j] = array[j]-array[j+1];
+	for (i = 0; i < runs; i++) {
+		for (j = 0; j < WORKLEN - 1; j++)
+			array[j] = array[j] + array[j + 1];
+		for (j = 0; j < WORKLEN - 1; j++)
+			array[j] = array[j] - array[j + 1];
 	}
 }
 
-void *thread_worker(void* arg)
+void *thread_worker(void *arg)
 {
 	struct timespec start, stop;
 	int i;
 	unsigned long long delta;
-	unsigned long long min=-1, max=0;
+	unsigned long long min = -1, max = 0;
 
 	stats_container_t dat;
 	stats_record_t rec;
 
 	stats_container_init(&dat, NUMRUNS);
 
-	for (i=0; i < NUMRUNS; i++) {
+	for (i = 0; i < NUMRUNS; i++) {
 
-		do_work(1); /* warm cache */
+		do_work(1);	/* warm cache */
 
 		/* do test */
 		clock_gettime(CLOCK_MONOTONIC, &start);
@@ -137,27 +137,27 @@
 		delta = ts_sub(stop, start);
 		if (delta < min)
 			min = delta;
-		if (delta> max)
+		if (delta > max)
 			max = delta;
 		rec.x = i;
 		rec.y = delta;
 		stats_container_append(&dat, rec);
 
 		printf("delta: %llu ns\n", delta);
-		usleep(1); /* let other things happen */
+		usleep(1);	/* let other things happen */
 	}
 
 	printf("max jitter: ");
 	print_unit(max - min);
-	stats_container_save("samples", "Scheduling Jitter Scatter Plot",\
-				"Iteration", "Delay (ns)", &dat, "points");
+	stats_container_save("samples", "Scheduling Jitter Scatter Plot",
+			     "Iteration", "Delay (ns)", &dat, "points");
 	return NULL;
 }
 
-void *thread_interrupter(void* arg)
+void *thread_interrupter(void *arg)
 {
 	while (!flag)
-	usleep(ISLEEP);
+		usleep(ISLEEP);
 	return NULL;
 }
 
@@ -167,7 +167,7 @@
 
 	setup();
 
-	rt_init("h",parse_args,argc,argv);
+	rt_init("h", parse_args, argc, argv);
 
 	interrupter = create_fifo_thread(thread_interrupter, NULL, 80);
 	sleep(1);
diff --git a/testcases/realtime/func/sched_latency/sched_latency.c b/testcases/realtime/func/sched_latency/sched_latency.c
index 64ecadb..94c34d2 100644
--- a/testcases/realtime/func/sched_latency/sched_latency.c
+++ b/testcases/realtime/func/sched_latency/sched_latency.c
@@ -61,7 +61,7 @@
 #define DEF_LOAD_MS 1
 #define PASS_US 100
 #define HIST_BUCKETS 100
-#define OVERHEAD 50000 // allow for 50 us of periodic overhead (context switch, etc.)
+#define OVERHEAD 50000		// allow for 50 us of periodic overhead (context switch, etc.)
 
 nsec_t start;
 nsec_t end;
@@ -92,24 +92,24 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'd':
-			load_ms = atoi(v);
-			break;
-		case 'i':
-			iterations = atoi(v);
-			break;
-		case 'l':
-			latency_threshold = strtoull(v, NULL, 0);
-			break;
-		case 't':
-			period = strtoull(v, NULL, 0)*NS_PER_MS;
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'd':
+		load_ms = atoi(v);
+		break;
+	case 'i':
+		iterations = atoi(v);
+		break;
+	case 'l':
+		latency_threshold = strtoull(v, NULL, 0);
+		break;
+	case 't':
+		period = strtoull(v, NULL, 0) * NS_PER_MS;
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -117,15 +117,17 @@
 void *periodic_thread(void *arg)
 {
 	int i;
-	nsec_t delay, avg_delay = 0, start_delay, min_delay = -1ULL, max_delay = 0;
+	nsec_t delay, avg_delay = 0, start_delay, min_delay = -1ULL, max_delay =
+	    0;
 	int failures = 0;
-	nsec_t next = 0, now = 0, sched_delta = 0, delta = 0, prev = 0, iter_start;
+	nsec_t next = 0, now = 0, sched_delta = 0, delta = 0, prev =
+	    0, iter_start;
 
- 	/* wait for the specified start time */
- 	rt_nanosleep_until(start);
+	/* wait for the specified start time */
+	rt_nanosleep_until(start);
 
 	now = rt_gettime();
-	start_delay = (now - start)/NS_PER_US;
+	start_delay = (now - start) / NS_PER_US;
 	iter_start = next = now;
 
 	debug(DBG_INFO, "ITERATION DELAY(US) MAX_DELAY(US) FAILURES\n");
@@ -143,31 +145,38 @@
 
 		if (next < now) {
 			printf("\nPERIOD MISSED!\n");
-			printf("     scheduled delta: %8llu us\n", sched_delta/1000);
-			printf("	actual delta: %8llu us\n", delta/1000);
-			printf("	     latency: %8llu us\n", (delta-sched_delta)/1000);
+			printf("     scheduled delta: %8llu us\n",
+			       sched_delta / 1000);
+			printf("	actual delta: %8llu us\n",
+			       delta / 1000);
+			printf("	     latency: %8llu us\n",
+			       (delta - sched_delta) / 1000);
 			printf("---------------------------------------\n");
-			printf("      previous start: %8llu us\n", (prev-iter_start)/1000);
-			printf("		 now: %8llu us\n", (now-iter_start)/1000);
-			printf("     scheduled start: %8llu us\n", (next-iter_start)/1000);
+			printf("      previous start: %8llu us\n",
+			       (prev - iter_start) / 1000);
+			printf("		 now: %8llu us\n",
+			       (now - iter_start) / 1000);
+			printf("     scheduled start: %8llu us\n",
+			       (next - iter_start) / 1000);
 			printf("next scheduled start is in the past!\n");
 			ret = 1;
 			break;
 		}
 
-		sched_delta = next - now; /* how long we should sleep */
+		sched_delta = next - now;	/* how long we should sleep */
 		delta = 0;
 		do {
 			nsec_t new_now;
 
 			rt_nanosleep(next - now);
 			new_now = rt_gettime();
-			delta += new_now - now; /* how long we did sleep */
+			delta += new_now - now;	/* how long we did sleep */
 			now = new_now;
 		} while (now < next);
 
 		/* start of period */
-		delay = (now - iter_start - (nsec_t)(i+1)*period)/NS_PER_US;
+		delay =
+		    (now - iter_start - (nsec_t) (i + 1) * period) / NS_PER_US;
 		rec.x = i;
 		rec.y = delay;
 		stats_container_append(&dat, rec);
@@ -185,7 +194,8 @@
 			break;
 
 		/* continuous status ticker */
-		debug(DBG_INFO, "%9i %9llu %13llu %8i\r", i, delay, max_delay, failures);
+		debug(DBG_INFO, "%9i %9llu %13llu %8i\r", i, delay, max_delay,
+		      failures);
 		fflush(stdout);
 
 		busy_work_ms(load_ms);
@@ -193,30 +203,32 @@
 	if (latency_threshold) {
 		latency_trace_stop();
 		if (i != iterations) {
-			printf("Latency threshold (%lluus) exceeded at iteration %d\n",
-				latency_threshold, i);
+			printf
+			    ("Latency threshold (%lluus) exceeded at iteration %d\n",
+			     latency_threshold, i);
 			latency_trace_print();
-			stats_container_resize(&dat, i+1);
+			stats_container_resize(&dat, i + 1);
 		}
 	}
 
 	/* save samples before the quantile calculation messes things up! */
 	stats_hist(&hist, &dat);
-	stats_container_save("samples", "Periodic Scheduling Latency Scatter Plot",\
+	stats_container_save("samples",
+			     "Periodic Scheduling Latency Scatter Plot",
 			     "Iteration", "Latency (us)", &dat, "points");
-	stats_container_save("hist", "Periodic Scheduling Latency Histogram",\
- 			     "Latency (us)", "Samples", &hist, "steps");
+	stats_container_save("hist", "Periodic Scheduling Latency Histogram",
+			     "Latency (us)", "Samples", &hist, "steps");
 
 	avg_delay /= i;
 	printf("\n\n");
 	printf("Start: %4llu us: %s\n", start_delay,
-		start_delay < pass_criteria ? "PASS" : "FAIL");
+	       start_delay < pass_criteria ? "PASS" : "FAIL");
 	printf("Min:   %4llu us: %s\n", min_delay,
-		min_delay < pass_criteria ? "PASS" : "FAIL");
+	       min_delay < pass_criteria ? "PASS" : "FAIL");
 	printf("Max:   %4llu us: %s\n", max_delay,
-		max_delay < pass_criteria ? "PASS" : "FAIL");
+	       max_delay < pass_criteria ? "PASS" : "FAIL");
 	printf("Avg:   %4llu us: %s\n", avg_delay,
-		avg_delay < pass_criteria ? "PASS" : "FAIL");
+	       avg_delay < pass_criteria ? "PASS" : "FAIL");
 	printf("StdDev: %.4f us\n", stats_stddev(&dat));
 	printf("Quantiles:\n");
 	stats_quantiles_calc(&dat, &quantiles);
@@ -238,24 +250,26 @@
 	printf("Scheduling Latency\n");
 	printf("-------------------------------\n\n");
 
-	if (load_ms*NS_PER_MS >= period-OVERHEAD) {
-		printf("ERROR: load must be < period - %d us\n", OVERHEAD/NS_PER_US);
+	if (load_ms * NS_PER_MS >= period - OVERHEAD) {
+		printf("ERROR: load must be < period - %d us\n",
+		       OVERHEAD / NS_PER_US);
 		exit(1);
 	}
 
 	if (iterations == 0)
 		iterations = DEFAULT_ITERATIONS;
 	if (iterations < MIN_ITERATIONS) {
-		printf("Too few iterations (%d), use min iteration instead (%d)\n",
-		       iterations, MIN_ITERATIONS);
+		printf
+		    ("Too few iterations (%d), use min iteration instead (%d)\n",
+		     iterations, MIN_ITERATIONS);
 		iterations = MIN_ITERATIONS;
 	}
 
 	printf("Running %d iterations with a period of %llu ms\n", iterations,
-	       period/NS_PER_MS);
+	       period / NS_PER_MS);
 	printf("Periodic load duration: %d ms\n", load_ms);
 	printf("Expected running time: %d s\n",
-	       (int)(iterations*((float)period / NS_PER_SEC)));
+	       (int)(iterations * ((float)period / NS_PER_SEC)));
 
 	if (stats_container_init(&dat, iterations))
 		exit(1);
@@ -274,7 +288,7 @@
 
 	/* wait one quarter second to execute */
 	start = rt_gettime() + 250 * NS_PER_MS;
-	per_id = create_fifo_thread(periodic_thread, (void*)0, PRIO);
+	per_id = create_fifo_thread(periodic_thread, (void *)0, PRIO);
 
 	join_thread(per_id);
 	join_threads();
diff --git a/testcases/realtime/func/thread_clock/tc-2.c b/testcases/realtime/func/thread_clock/tc-2.c
index 12bbfdd..f994d40 100644
--- a/testcases/realtime/func/thread_clock/tc-2.c
+++ b/testcases/realtime/func/thread_clock/tc-2.c
@@ -49,7 +49,7 @@
 #include <librttest.h>
 
 #define NS_PER_SEC 1000000000
-#define THRESHOLD 0.5  /* 500 milliseconds */
+#define THRESHOLD 0.5		/* 500 milliseconds */
 #define NUMSLEEP 5
 #define NUMWORK 2
 
@@ -79,17 +79,17 @@
 /* Just spend some time on the CPU */
 void work(void)
 {
-	unsigned int i=0;
-	for (i=0; i<2147483600; i++) {
-		if ((i == i+1) || (i == i-1))
+	unsigned int i = 0;
+	for (i = 0; i < 2147483600; i++) {
+		if ((i == i + 1) || (i == i - 1))
 			printf("Hey!\n");
 	}
 }
 
 void *workerthread(void *arg)
 {
-	struct thread* pthr = (struct thread* )arg;
-	int tid =(int)(long)pthr->arg;
+	struct thread *pthr = (struct thread *)arg;
+	int tid = (int)(long)pthr->arg;
 	struct timespec *ts = &workts[tid];
 
 #ifdef DEBUG
@@ -97,20 +97,20 @@
 #endif
 	work();
 
-	if ((clock_gettime (CLOCK_THREAD_CPUTIME_ID, ts)) < 0) {
+	if ((clock_gettime(CLOCK_THREAD_CPUTIME_ID, ts)) < 0) {
 		perror("clock_gettime: CLOCK_THREAD_CPUTIME_ID: ");
 		exit(1);
 	}
-
 #ifdef DEBUG
-	printf("workerthread %d: AFTER WORK: tv_sec = %ld, tv_nsec = %ld\n", tid, ts->tv_sec, ts->tv_nsec);
+	printf("workerthread %d: AFTER WORK: tv_sec = %ld, tv_nsec = %ld\n",
+	       tid, ts->tv_sec, ts->tv_nsec);
 #endif
 	return NULL;
 }
 
 void *sleeperthread(void *arg)
 {
-	struct thread* pthr = (struct thread* )arg;
+	struct thread *pthr = (struct thread *)arg;
 	int tid = (int)(long)pthr->arg;
 	struct timespec *ts = &sleepts[tid];
 
@@ -120,13 +120,13 @@
 
 	sleep(5);
 
-	if ((clock_gettime (CLOCK_THREAD_CPUTIME_ID, ts)) < 0) {
+	if ((clock_gettime(CLOCK_THREAD_CPUTIME_ID, ts)) < 0) {
 		perror("clock_gettime: CLOCK_THREAD_CPUTIME_ID: ");
 		exit(1);
 	}
-
 #ifdef DEBUG
-	printf("sleeperthread %d: AFTER SLEEP: tv_sec = %ld, tv_nsec = %ld\n", tid, ts->tv_sec, ts->tv_nsec);
+	printf("sleeperthread %d: AFTER SLEEP: tv_sec = %ld, tv_nsec = %ld\n",
+	       tid, ts->tv_sec, ts->tv_nsec);
 #endif
 	return NULL;
 }
@@ -134,24 +134,31 @@
 int checkresult(float proctime)
 {
 	int i, retval = 0;
-	float diff, threadstime=0;
-	for (i=0; i<NUMSLEEP; i++) {
+	float diff, threadstime = 0;
+	for (i = 0; i < NUMSLEEP; i++) {
 		/* Sleeping thread should not accumulate more than 1 second of CPU time */
 		if (sleepts[i].tv_sec > 0) {
-			printf("Sleeper thread %d time is %f, should have been close to zero. FAIL\n",
-				i, sleepts[i].tv_sec + ((float)sleepts[i].tv_nsec/NS_PER_SEC));
+			printf
+			    ("Sleeper thread %d time is %f, should have been close to zero. FAIL\n",
+			     i,
+			     sleepts[i].tv_sec +
+			     ((float)sleepts[i].tv_nsec / NS_PER_SEC));
 			retval = 1;
 		}
-		threadstime += sleepts[i].tv_sec + ((float)sleepts[i].tv_nsec/NS_PER_SEC);
+		threadstime +=
+		    sleepts[i].tv_sec +
+		    ((float)sleepts[i].tv_nsec / NS_PER_SEC);
 	}
 	if (retval)
 		return retval;
 
-	for (i=0; i<NUMWORK; i++) {
-		threadstime += workts[i].tv_sec + ((float)workts[i].tv_nsec/NS_PER_SEC);
+	for (i = 0; i < NUMWORK; i++) {
+		threadstime +=
+		    workts[i].tv_sec + ((float)workts[i].tv_nsec / NS_PER_SEC);
 	}
 	diff = proctime - threadstime;
-	if (diff < 0) diff = -diff;
+	if (diff < 0)
+		diff = -diff;
 	printf("Process: %.4f s\n", proctime);
 	printf("Threads: %.4f s\n", threadstime);
 	printf("Delta:   %.4f s\n", diff);
@@ -162,33 +169,34 @@
 	if (diff > pass_criteria) {
 		printf("FAIL\n");
 		retval = 1;
-	}
-	else {
+	} else {
 		printf("PASS\n");
 	}
 	return retval;
 }
 
-int main(int argc,char* argv[])
+int main(int argc, char *argv[])
 {
 	int i, retval = 0;
 	struct timespec myts;
 	setup();
 
 	pass_criteria = THRESHOLD;
-	rt_init("ht:",parse_args,argc,argv);
+	rt_init("ht:", parse_args, argc, argv);
 
 	/* Start sleeper threads */
-	for (i=0; i<NUMSLEEP; i++) {
-		if ((create_other_thread (sleeperthread, (void *)(intptr_t)i)) < 0) {
+	for (i = 0; i < NUMSLEEP; i++) {
+		if ((create_other_thread(sleeperthread, (void *)(intptr_t) i)) <
+		    0) {
 			exit(1);
 		}
 	}
 	printf("\n%d sleeper threads created\n", NUMSLEEP);
 
 	/* Start worker threads */
-	for (i=0; i<NUMWORK; i++) {
-		if ((create_other_thread (workerthread, (void *)(intptr_t)i)) < 0) {
+	for (i = 0; i < NUMWORK; i++) {
+		if ((create_other_thread(workerthread, (void *)(intptr_t) i)) <
+		    0) {
 			exit(1);
 		}
 	}
@@ -198,10 +206,10 @@
 
 	join_threads();
 	/* Get the process cpu clock value */
-	if ((clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &myts)) < 0) {
+	if ((clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &myts)) < 0) {
 		perror("clock_gettime: CLOCK_PROCESS_CPUTIME_ID: ");
 		exit(1);
 	}
-	retval = checkresult(myts.tv_sec + ((float)myts.tv_nsec/NS_PER_SEC));
+	retval = checkresult(myts.tv_sec + ((float)myts.tv_nsec / NS_PER_SEC));
 	return retval;
 }
diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c
index 51e0405..0dd6019 100644
--- a/testcases/realtime/lib/librttest.c
+++ b/testcases/realtime/lib/librttest.c
@@ -62,10 +62,10 @@
 #include <math.h>
 
 static LIST_HEAD(_threads);
-static atomic_t _thread_count = {-1};
+static atomic_t _thread_count = { -1 };
 
 pthread_mutex_t _buffer_mutex;
-char * _print_buffer = NULL;
+char *_print_buffer = NULL;
 int _print_buffer_offset = 0;
 int _dbg_lvl = 0;
 double pass_criteria;
@@ -76,10 +76,12 @@
 void rt_help(void)
 {
 	printf("librt standard options:\n");
-	printf("  -b(0,1)	1:enable buffered output, 0:diable buffered output\n");
+	printf
+	    ("  -b(0,1)	1:enable buffered output, 0:diable buffered output\n");
 	printf("  -p(0,1)	0:don't use pi mutexes, 1:use pi mutexes\n");
 	printf("  -m		use mlockall\n");
-	printf("  -v[0-4]	0:no debug, 1:DBG_ERR, 2:DBG_WARN, 3:DBG_INFO, 4:DBG_DEBUG\n");
+	printf
+	    ("  -v[0-4]	0:no debug, 1:DBG_ERR, 2:DBG_WARN, 3:DBG_INFO, 4:DBG_DEBUG\n");
 	printf("  -s		Enable saving stats data (default disabled)\n");
 	printf("  -c		Set pass criteria\n");
 }
@@ -96,11 +98,11 @@
 	}
 	end = rt_gettime();
 
-	iters_per_us = (CALIBRATE_LOOPS * NS_PER_US) / (end-start);
+	iters_per_us = (CALIBRATE_LOOPS * NS_PER_US) / (end - start);
 }
 
 int rt_init_long(const char *options, const struct option *longopts,
-		 int (*parse_arg)(int option, char *value), int argc,
+		 int (*parse_arg) (int option, char *value), int argc,
 		 char *argv[])
 {
 	const struct option *cur_opt;
@@ -113,20 +115,23 @@
 	char *all_options;
 
 	if (asprintf(&all_options, ":b:mp:v:sc:%s", options) == -1) {
-		fprintf(stderr, "Failed to allocate string for option string\n");
+		fprintf(stderr,
+			"Failed to allocate string for option string\n");
 		exit(1);
 	}
 
 	/* Check for duplicate options in optstring */
-	for (i=0; i<strlen(all_options); i++) {
+	for (i = 0; i < strlen(all_options); i++) {
 		char opt = all_options[i];
 
 		if (opt == ':')
 			continue;
 
 		/* Search ahead */
-		if (strchr(&all_options[i+1], opt)) {
-			fprintf(stderr, "Programmer error -- argument -%c already used at least twice\n", opt);
+		if (strchr(&all_options[i + 1], opt)) {
+			fprintf(stderr,
+				"Programmer error -- argument -%c already used at least twice\n",
+				opt);
 			exit(1);
 		}
 	}
@@ -152,7 +157,8 @@
 				cur_opt->name, cur_opt->val);
 			exit(1);
 		}
-		if (asprintf(&longopt_vals, "%s%c", longopt_vals, cur_opt->val) < 0) {
+		if (asprintf(&longopt_vals, "%s%c", longopt_vals, cur_opt->val)
+		    < 0) {
 			perror("asprintf");
 			exit(2);
 		}
@@ -183,30 +189,35 @@
 			if (optopt == '-')
 				fprintf(stderr, "long option missing arg\n");
 			else
-				fprintf(stderr, "option -%c: missing arg\n", optopt);
-			parse_arg('h', optarg); /* Just to display usage */
-			exit (1); /* Just in case. (should normally be done by usage()) */
+				fprintf(stderr, "option -%c: missing arg\n",
+					optopt);
+			parse_arg('h', optarg);	/* Just to display usage */
+			exit(1);	/* Just in case. (should normally be done by usage()) */
 		case '?':
 			if (optopt == '-')
 				fprintf(stderr, "unrecognized long option\n");
 			else
-				fprintf(stderr, "option -%c not recognized\n", optopt);
-			parse_arg('h', optarg); /* Just to display usage */
-			exit (1); /* Just in case. (should normally be done by usage()) */
+				fprintf(stderr, "option -%c not recognized\n",
+					optopt);
+			parse_arg('h', optarg);	/* Just to display usage */
+			exit(1);	/* Just in case. (should normally be done by usage()) */
 		default:
 			if (parse_arg && parse_arg(c, optarg))
-				break; /* Application option */
+				break;	/* Application option */
 
-			fprintf(stderr, "Programmer error -- option -%c defined but not handled\n", c);
+			fprintf(stderr,
+				"Programmer error -- option -%c defined but not handled\n",
+				c);
 			exit(1);
 		}
 	}
 	if (!_use_pi)
-		printf("Priority Inheritance has been disabled for this run.\n");
+		printf
+		    ("Priority Inheritance has been disabled for this run.\n");
 	if (use_buffer)
 		buffer_init();
 	if (mlock) {
-		if (mlockall(MCL_CURRENT|MCL_FUTURE)) {
+		if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
 			perror("failed to lock memory\n");
 			exit(1);
 		}
@@ -223,7 +234,7 @@
 	return 0;
 }
 
-int rt_init(const char *options, int (*parse_arg)(int option, char *value),
+int rt_init(const char *options, int (*parse_arg) (int option, char *value),
 	    int argc, char *argv[])
 {
 	return rt_init_long(options, NULL, parse_arg, argc, argv);
@@ -233,7 +244,8 @@
 {
 	_print_buffer = (char *)malloc(PRINT_BUFFER_SIZE);
 	if (!_print_buffer)
-		fprintf(stderr, "insufficient memory for print buffer - printing directly to stderr\n");
+		fprintf(stderr,
+			"insufficient memory for print buffer - printing directly to stderr\n");
 	else
 		memset(_print_buffer, 0, PRINT_BUFFER_SIZE);
 }
@@ -254,22 +266,23 @@
 	_print_buffer = NULL;
 }
 
-void cleanup(int i) {
+void cleanup(int i)
+{
 	printf("Test terminated with asynchronous signal\n");
 	buffer_print();
 	buffer_fini();
 	if (i)
-		exit (i);
+		exit(i);
 }
 
 void setup()
 {
 	signal(SIGINT, cleanup);
-	signal(SIGQUIT,cleanup);
+	signal(SIGQUIT, cleanup);
 	signal(SIGTERM, cleanup);
 }
 
-int create_thread(void*(*func)(void*), void *arg, int prio, int policy)
+int create_thread(void *(*func) (void *), void *arg, int prio, int policy)
 {
 	struct sched_param param;
 	int id, ret;
@@ -297,7 +310,9 @@
 	pthread_attr_setschedpolicy(&thread->attr, thread->policy);
 	pthread_attr_setschedparam(&thread->attr, &param);
 
-	if ((ret = pthread_create(&thread->pthread, &thread->attr, func, (void*)thread))) {
+	if ((ret =
+	     pthread_create(&thread->pthread, &thread->attr, func,
+			    (void *)thread))) {
 		printf("pthread_create failed: %d (%s)\n", ret, strerror(ret));
 		list_del(&thread->_threads);
 		pthread_attr_destroy(&thread->attr);
@@ -309,15 +324,17 @@
 	return id;
 }
 
-int create_fifo_thread(void*(*func)(void*), void *arg, int prio)
+int create_fifo_thread(void *(*func) (void *), void *arg, int prio)
 {
 	return create_thread(func, arg, prio, SCHED_FIFO);
 }
-int create_rr_thread(void*(*func)(void*), void *arg, int prio)
+
+int create_rr_thread(void *(*func) (void *), void *arg, int prio)
 {
 	return create_thread(func, arg, prio, SCHED_RR);
 }
-int create_other_thread(void*(*func)(void*), void *arg)
+
+int create_other_thread(void *(*func) (void *), void *arg)
 {
 	return create_thread(func, arg, 0, SCHED_OTHER);
 }
@@ -367,7 +384,7 @@
 {
 	struct thread *p;
 	list_for_each_entry(p, &_threads, _threads) {
-			p->flags |= THREAD_QUIT;
+		p->flags |= THREAD_QUIT;
 	}
 }
 
@@ -382,7 +399,8 @@
 	}
 }
 
-struct thread *get_thread(int i) {
+struct thread *get_thread(int i)
+{
 	struct thread *p;
 	list_for_each_entry(p, &_threads, _threads) {
 		if (p->id == i) {
@@ -392,10 +410,12 @@
 	return NULL;
 }
 
-void ts_minus(struct timespec *ts_end, struct timespec *ts_start, struct timespec *ts_delta)
+void ts_minus(struct timespec *ts_end, struct timespec *ts_start,
+	      struct timespec *ts_delta)
 {
 	if (ts_end == NULL || ts_start == NULL || ts_delta == NULL) {
-		printf("ERROR in %s: one or more of the timespecs is NULL", __FUNCTION__);
+		printf("ERROR in %s: one or more of the timespecs is NULL",
+		       __FUNCTION__);
 		return;
 	}
 
@@ -404,10 +424,12 @@
 	ts_normalize(ts_delta);
 }
 
-void ts_plus(struct timespec *ts_a, struct timespec *ts_b, struct timespec *ts_sum)
+void ts_plus(struct timespec *ts_a, struct timespec *ts_b,
+	     struct timespec *ts_sum)
 {
 	if (ts_a == NULL || ts_b == NULL || ts_sum == NULL) {
-		printf("ERROR in %s: one or more of the timespecs is NULL", __FUNCTION__);
+		printf("ERROR in %s: one or more of the timespecs is NULL",
+		       __FUNCTION__);
 		return;
 	}
 
@@ -445,7 +467,7 @@
 	}
 }
 
-int ts_to_nsec(struct timespec *ts, nsec_t *ns)
+int ts_to_nsec(struct timespec *ts, nsec_t * ns)
 {
 	struct timespec t;
 	if (ts == NULL) {
@@ -462,7 +484,7 @@
 		return -1;
 	}
 
-	*ns = (nsec_t)ts->tv_sec*NS_PER_SEC + ts->tv_nsec;
+	*ns = (nsec_t) ts->tv_sec * NS_PER_SEC + ts->tv_nsec;
 	return 0;
 }
 
@@ -473,12 +495,13 @@
 		printf("ERROR in %s: ts is NULL\n", __FUNCTION__);
 		return;
 	}
-	ts->tv_sec = ns/NS_PER_SEC;
-	ts->tv_nsec = ns%NS_PER_SEC;
+	ts->tv_sec = ns / NS_PER_SEC;
+	ts->tv_nsec = ns % NS_PER_SEC;
 }
 
 /* return difference in microseconds */
-unsigned long long tsc_minus(unsigned long long tsc_start, unsigned long long tsc_end)
+unsigned long long tsc_minus(unsigned long long tsc_start,
+			     unsigned long long tsc_end)
 {
 	unsigned long long delta;
 	if (tsc_start <= tsc_end)
@@ -490,19 +513,22 @@
 	return delta;
 }
 
-void rt_nanosleep_until(nsec_t ns) {
+void rt_nanosleep_until(nsec_t ns)
+{
 	struct timespec ts_sleep, ts_rem;
 	int rc;
 	nsec_to_ts(ns, &ts_sleep);
-	rc = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts_sleep, &ts_rem);
+	rc = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts_sleep,
+			     &ts_rem);
 	/* FIXME: when should we display the remainder ? */
 	if (rc != 0) {
 		printf("WARNING: rt_nanosleep() returned early by %d s %d ns\n",
-			(int)ts_rem.tv_sec, (int)ts_rem.tv_nsec);
+		       (int)ts_rem.tv_sec, (int)ts_rem.tv_nsec);
 	}
 }
 
-void rt_nanosleep(nsec_t ns) {
+void rt_nanosleep(nsec_t ns)
+{
 	struct timespec ts_sleep, ts_rem;
 	int rc;
 	nsec_to_ts(ns, &ts_sleep);
@@ -510,18 +536,20 @@
 	/* FIXME: when should we display the remainder ? */
 	if (rc != 0) {
 		printf("WARNING: rt_nanosleep() returned early by %d s %d ns\n",
-			(int)ts_rem.tv_sec, (int)ts_rem.tv_nsec);
+		       (int)ts_rem.tv_sec, (int)ts_rem.tv_nsec);
 	}
 }
 
-nsec_t rt_gettime(void) {
+nsec_t rt_gettime(void)
+{
 	struct timespec ts;
 	nsec_t ns;
 	int rc;
 
 	rc = clock_gettime(CLOCK_MONOTONIC, &ts);
 	if (rc != 0) {
-		printf("ERROR in %s: clock_gettime() returned %d\n", __FUNCTION__, rc);
+		printf("ERROR in %s: clock_gettime() returned %d\n",
+		       __FUNCTION__, rc);
 		perror("clock_gettime() failed");
 		return 0;
 	}
@@ -532,7 +560,7 @@
 
 void *busy_work_ms(int ms)
 {
-	busy_work_us(ms*US_PER_MS);
+	busy_work_us(ms * US_PER_MS);
 	return NULL;
 }
 
@@ -540,7 +568,7 @@
 {
 	volatile int i;
 	nsec_t start, now;
-	int delta; /* time in us */
+	int delta;		/* time in us */
 
 	i = us * iters_per_us;
 
@@ -550,13 +578,13 @@
 	}
 	now = rt_gettime();
 
-	delta = (now - start)/NS_PER_US;
+	delta = (now - start) / NS_PER_US;
 	/* uncomment to tune to your machine */
 	/* printf("busy_work_us requested: %dus  actual: %dus\n", us, delta); */
 	return NULL;
 }
 
-void init_pi_mutex(pthread_mutex_t *m)
+void init_pi_mutex(pthread_mutex_t * m)
 {
 #if HAVE_DECL_PTHREAD_PRIO_INHERIT
 	pthread_mutexattr_t attr;
@@ -564,13 +592,19 @@
 	int protocol;
 
 	if ((ret = pthread_mutexattr_init(&attr)) != 0) {
-		printf("Failed to init mutexattr: %d (%s)\n", ret, strerror(ret));
+		printf("Failed to init mutexattr: %d (%s)\n", ret,
+		       strerror(ret));
 	};
-	if (_use_pi && (ret = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)) != 0) {
-		printf("Can't set protocol prio inherit: %d (%s)\n", ret, strerror(ret));
+	if (_use_pi
+	    && (ret =
+		pthread_mutexattr_setprotocol(&attr,
+					      PTHREAD_PRIO_INHERIT)) != 0) {
+		printf("Can't set protocol prio inherit: %d (%s)\n", ret,
+		       strerror(ret));
 	}
 	if ((ret = pthread_mutexattr_getprotocol(&attr, &protocol)) != 0) {
-		printf("Can't get mutexattr protocol: %d (%s)\n", ret, strerror(ret));
+		printf("Can't get mutexattr protocol: %d (%s)\n", ret,
+		       strerror(ret));
 	}
 	if ((ret = pthread_mutex_init(m, &attr)) != 0) {
 		printf("Failed to init mutex: %d (%s)\n", ret, strerror(ret));
@@ -639,8 +673,9 @@
 		ssize_t ret = read(fd, data, sizeof(data));
 		if (ret < 0) {
 			if (errno != EAGAIN && errno != EINTR) {
-				printf("Failed to read from file \"%s\": %d (%s)\n",
-					pathname, errno, strerror(errno));
+				printf
+				    ("Failed to read from file \"%s\": %d (%s)\n",
+				     pathname, errno, strerror(errno));
 				break;
 			}
 		} else if (ret == 0)
@@ -651,7 +686,7 @@
 
 	if (close(fd) < 0) {
 		printf("Failed to close file \"%s\": %d (%s)\n",
-			pathname, errno, strerror(errno));
+		       pathname, errno, strerror(errno));
 	}
 }
 
diff --git a/testcases/realtime/lib/libstats.c b/testcases/realtime/lib/libstats.c
index 8f3fcf0..96090bd 100644
--- a/testcases/realtime/lib/libstats.c
+++ b/testcases/realtime/lib/libstats.c
@@ -49,10 +49,11 @@
 int save_stats = 0;
 
 /* static helper functions */
-static int stats_record_compare(const void * a, const void * b) {
+static int stats_record_compare(const void *a, const void *b)
+{
 	int ret = 0;
-	stats_record_t * rec_a = (stats_record_t *)a;
-	stats_record_t * rec_b = (stats_record_t *)b;
+	stats_record_t *rec_a = (stats_record_t *) a;
+	stats_record_t *rec_b = (stats_record_t *) b;
 	if (rec_a->y < rec_b->y)
 		ret = -1;
 	else if (rec_a->y > rec_b->y)
@@ -61,7 +62,7 @@
 }
 
 /* function implementations */
-int stats_container_init(stats_container_t *data, long size)
+int stats_container_init(stats_container_t * data, long size)
 {
 	data->size = size;
 	data->index = -1;
@@ -71,12 +72,12 @@
 	return 0;
 }
 
-int stats_container_append(stats_container_t *data, stats_record_t rec)
+int stats_container_append(stats_container_t * data, stats_record_t rec)
 {
 	int myindex = ++data->index;
 	if (myindex >= data->size) {
 		debug(DBG_ERR, "Number of elements cannot be more than %ld\n",
-				data->size);
+		      data->size);
 		data->index--;
 		return -1;
 	}
@@ -84,9 +85,10 @@
 	return myindex;
 }
 
-int stats_container_resize(stats_container_t *data, long size)
+int stats_container_resize(stats_container_t * data, long size)
 {
-	stats_record_t *newrecords = realloc(data->records, size*sizeof(stats_record_t));
+	stats_record_t *newrecords =
+	    realloc(data->records, size * sizeof(stats_record_t));
 	if (!newrecords)
 		return -1;
 	data->records = newrecords;
@@ -96,21 +98,21 @@
 	return 0;
 }
 
-int stats_container_free(stats_container_t *data)
+int stats_container_free(stats_container_t * data)
 {
 	free(data->records);
 	return 0;
 }
 
-int stats_sort(stats_container_t *data, enum stats_sort_method method)
+int stats_sort(stats_container_t * data, enum stats_sort_method method)
 {
 	/* method not implemented, always ascending on y atm */
 	qsort(data->records, data->index + 1, sizeof(stats_record_t),
-		  stats_record_compare);
+	      stats_record_compare);
 	return 0;
 }
 
-float stats_stddev(stats_container_t *data)
+float stats_stddev(stats_container_t * data)
 {
 	long i;
 	float sd, avg, sum, delta;
@@ -130,7 +132,7 @@
 	sum = 0.0;
 	for (i = 0; i < n; i++) {
 		delta = (data->records[i].y - avg);
-		sum += delta*delta;
+		sum += delta * delta;
 	}
 	sum /= n;
 
@@ -139,7 +141,7 @@
 	return sd;
 }
 
-float stats_avg(stats_container_t *data)
+float stats_avg(stats_container_t * data)
 {
 	long i;
 	float avg, sum;
@@ -157,7 +159,7 @@
 	return avg;
 }
 
-long stats_min(stats_container_t *data)
+long stats_min(stats_container_t * data)
 {
 	long i;
 	long min;
@@ -176,7 +178,7 @@
 	return min;
 }
 
-long stats_max(stats_container_t *data)
+long stats_max(stats_container_t * data)
 {
 	long i;
 	long max;
@@ -195,27 +197,28 @@
 	return max;
 }
 
-int stats_quantiles_init(stats_quantiles_t *quantiles, int nines)
+int stats_quantiles_init(stats_quantiles_t * quantiles, int nines)
 {
 	if (nines < 2) {
 		return -1;
 	}
 	quantiles->nines = nines;
 	/* allocate space for quantiles, starting with 0.99 (two nines) */
-	quantiles->quantiles = calloc(sizeof(long), (nines-1));
+	quantiles->quantiles = calloc(sizeof(long), (nines - 1));
 	if (!quantiles->quantiles) {
 		return -1;
 	}
 	return 0;
 }
 
-int stats_quantiles_free(stats_quantiles_t *quantiles)
+int stats_quantiles_free(stats_quantiles_t * quantiles)
 {
 	free(quantiles->quantiles);
 	return 0;
 }
 
-int stats_quantiles_calc(stats_container_t *data, stats_quantiles_t *quantiles)
+int stats_quantiles_calc(stats_container_t * data,
+			 stats_quantiles_t * quantiles)
 {
 	int i;
 	int size;
@@ -232,24 +235,23 @@
 
 	for (i = 2; i <= quantiles->nines; i++) {
 		index = size - size / exp10(i);
-		quantiles->quantiles[i-2] = data->records[index].y;
+		quantiles->quantiles[i - 2] = data->records[index].y;
 	}
 	return 0;
 }
 
-void stats_quantiles_print(stats_quantiles_t *quantiles)
+void stats_quantiles_print(stats_quantiles_t * quantiles)
 {
 	int i;
 	int fraction = 0;
-	for (i = 0; i <= quantiles->nines-2; i++)
-	{
+	for (i = 0; i <= quantiles->nines - 2; i++) {
 		if (i > 0)
 			fraction += 9 * exp10(i - 1);
 		printf("99.%d%% < %ld\n", fraction, quantiles->quantiles[i]);
 	}
 }
 
-int stats_hist(stats_container_t *hist, stats_container_t *data)
+int stats_hist(stats_container_t * hist, stats_container_t * data)
 {
 	int i;
 	int ret;
@@ -266,41 +268,44 @@
 	min = max = data->records[0].y;
 	for (i = 0; i <= data->index; i++) {
 		y = data->records[i].y;
-		if (y > max) max = y;
-		if (y < min) min = y;
+		if (y > max)
+			max = y;
+		if (y < min)
+			min = y;
 	}
 
 	/* define the bucket ranges */
-	width = MAX((max-min)/hist->size, 1);
+	width = MAX((max - min) / hist->size, 1);
 	hist->records[0].x = min;
 	for (i = 1; i < (hist->size); i++) {
-		hist->records[i].x = min + i*width;
+		hist->records[i].x = min + i * width;
 	}
 
 	/* fill in the counts */
 	for (i = 0; i <= data->index; i++) {
 		y = data->records[i].y;
-		b = MIN((y-min)/width, hist->size-1);
+		b = MIN((y - min) / width, hist->size - 1);
 		hist->records[b].y++;
 	}
 
 	return 0;
 }
 
-void stats_hist_print(stats_container_t *hist)
+void stats_hist_print(stats_container_t * hist)
 {
 	long i, x;
 	for (i = 0; i < hist->size; i++) {
 		x = hist->records[i].x;
-		if (i < hist->size-1)
+		if (i < hist->size - 1)
 			printf("[%ld,%ld) = %ld\n", x,
-				hist->records[i+1].x, hist->records[i].y);
+			       hist->records[i + 1].x, hist->records[i].y);
 		else
 			printf("[%ld,-) = %ld\n", x, hist->records[i].y);
 	}
 }
 
-int stats_container_save(char *filename, char *title, char *xlabel, char *ylabel, stats_container_t *data, char *mode)
+int stats_container_save(char *filename, char *title, char *xlabel,
+			 char *ylabel, stats_container_t * data, char *mode)
 {
 	int i;
 	int minx = 0, maxx = 0, miny = 0, maxy = 0;
@@ -311,15 +316,17 @@
 	stats_record_t *rec;
 
 	if (!save_stats)
-	  return 0;
+		return 0;
 
 	/* generate the filenames */
 	if (asprintf(&datfile, "%s.dat", filename) == -1) {
-		fprintf(stderr, "Failed to allocate string for data filename\n");
+		fprintf(stderr,
+			"Failed to allocate string for data filename\n");
 		return -1;
 	}
 	if (asprintf(&pltfile, "%s.plt", filename) == -1) {
-		fprintf(stderr, "Failed to allocate string for plot filename\n");
+		fprintf(stderr,
+			"Failed to allocate string for plot filename\n");
 		return -1;
 	}
 
@@ -329,8 +336,8 @@
 		return -1;
 	} else {
 		minx = maxx = data->records[0].x;
-	miny = maxy = data->records[0].y;
-	for (i = 0; i <= data->index; i++) {
+		miny = maxy = data->records[0].y;
+		for (i = 0; i <= data->index; i++) {
 			rec = &data->records[i];
 			minx = MIN(minx, rec->x);
 			maxx = MAX(maxx, rec->x);
@@ -352,7 +359,7 @@
 		fprintf(plt_fd, "set xlabel \"%s\"\n", xlabel);
 		fprintf(plt_fd, "set ylabel \"%s\"\n", ylabel);
 		fprintf(plt_fd, "plot [0:%d] [0:%d] \"%s\" with %s\n",
-				maxx+1, maxy+1, datfile, mode);
+			maxx + 1, maxy + 1, datfile, mode);
 		fclose(plt_fd);
 	}
 
diff --git a/testcases/realtime/perf/latency/pthread_cond_latency.c b/testcases/realtime/perf/latency/pthread_cond_latency.c
index dc58133..d0048d5 100644
--- a/testcases/realtime/perf/latency/pthread_cond_latency.c
+++ b/testcases/realtime/perf/latency/pthread_cond_latency.c
@@ -58,12 +58,12 @@
 
 	int handled = 1;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
@@ -85,10 +85,9 @@
 	return (tv.tv_sec + ((double)tv.tv_usec) / 1000000.);
 }
 
-void *
-childfunc(void *arg)
+void *childfunc(void *arg)
 {
-	pthread_cond_t *cp = (pthread_cond_t *)arg;
+	pthread_cond_t *cp = (pthread_cond_t *) arg;
 
 	while (child_waiting == 0) {
 		pthread_mutex_lock(&child_mutex);
@@ -107,8 +106,7 @@
 	pthread_exit(NULL);
 }
 
-void
-test_signal(int broadcast_flag, int iter)
+void test_signal(int broadcast_flag, int iter)
 {
 	pthread_attr_t attr;
 	pthread_t childid;
@@ -177,8 +175,8 @@
 		}
 		printf("%s() latency: %d microseconds\n",
 		       (broadcast_flag
-				? "pthread_cond_broadcast"
-				: "pthread_cond_signal"),
+			? "pthread_cond_broadcast"
+			: "pthread_cond_signal"),
 		       (int)((endtime - starttime) * 1000000.));
 		pthread_mutex_unlock(&child_mutex);
 	}
@@ -191,8 +189,7 @@
 	}
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	struct sched_param sp;
 	long iter;
diff --git a/testcases/realtime/perf/latency/pthread_cond_many.c b/testcases/realtime/perf/latency/pthread_cond_many.c
index a545ea3..f9325b5 100644
--- a/testcases/realtime/perf/latency/pthread_cond_many.c
+++ b/testcases/realtime/perf/latency/pthread_cond_many.c
@@ -74,10 +74,9 @@
 	return (tv.tv_sec + ((double)tv.tv_usec) / 1000000.);
 }
 
-void *
-childfunc(void *arg)
+void *childfunc(void *arg)
 {
-	int myid = (intptr_t)arg;
+	int myid = (intptr_t) arg;
 	pthread_cond_t *cp;
 	volatile int *cw;
 
@@ -100,8 +99,7 @@
 	pthread_exit(NULL);
 }
 
-pthread_t
-create_thread_(int itsid)
+pthread_t create_thread_(int itsid)
 {
 	pthread_attr_t attr;
 	pthread_t childid;
@@ -133,7 +131,7 @@
 			exit(-1);
 		}
 	}
-	if (pthread_attr_setstacksize(&attr, (size_t)(32*1024)) != 0) {
+	if (pthread_attr_setstacksize(&attr, (size_t) (32 * 1024)) != 0) {
 		perror("pthread_attr_setstacksize");
 		exit(-1);
 	}
@@ -141,15 +139,15 @@
 		perror("pthread_cond_init");
 		exit(-1);
 	}
-	if (pthread_create(&childid, &attr, childfunc, (void *)(intptr_t)itsid) != 0) {
+	if (pthread_create(&childid, &attr, childfunc, (void *)(intptr_t) itsid)
+	    != 0) {
 		perror("pthread_create");
 		exit(-1);
 	}
 	return (childid);
 }
 
-void
-wake_child(int itsid, int broadcast_flag)
+void wake_child(int itsid, int broadcast_flag)
 {
 	double starttime;
 
@@ -185,8 +183,7 @@
 	pthread_mutex_unlock(&child_mutex);
 }
 
-void
-test_signal(long iter, long nthreads)
+void test_signal(long iter, long nthreads)
 {
 	int i;
 	int j;
@@ -197,9 +194,9 @@
 	stats_container_t dat;
 	stats_record_t rec;
 
-	stats_container_init(&dat,iter * nthreads);
+	stats_container_init(&dat, iter * nthreads);
 
-	pt = (pthread_t *)malloc(sizeof(*pt) * nthreads);
+	pt = (pthread_t *) malloc(sizeof(*pt) * nthreads);
 	if (pt == NULL) {
 		fprintf(stderr, "Out of memory\n");
 		exit(-1);
@@ -208,8 +205,8 @@
 		child_waiting[j] = 0;
 		pt[j] = create_thread_(j);
 	}
-	for (i = 0; i < (iter - 1) * nthreads; i+=nthreads) {
-		for (j = 0 , k = i; j < nthreads; j++ , k++) {
+	for (i = 0; i < (iter - 1) * nthreads; i += nthreads) {
+		for (j = 0, k = i; j < nthreads; j++, k++) {
 			wake_child(j, broadcast_flag);
 			rec.x = k;
 			rec.y = latency;
@@ -261,30 +258,29 @@
 {
 	int handled;
 	switch (c) {
-		case 'h':
-			usage();
-			exit(0);
-		case 'a':
-			broadcast_flag = 1;
-			break;
-		case 'i':
-			iterations = atoi(v);
-			break;
-		case 'n':
-			nthreads = atoi(v);
-			break;
-		case 'r':
-			realtime = 1;
-			break;
-		default:
-			handled = 0;
-			break;
+	case 'h':
+		usage();
+		exit(0);
+	case 'a':
+		broadcast_flag = 1;
+		break;
+	case 'i':
+		iterations = atoi(v);
+		break;
+	case 'n':
+		nthreads = atoi(v);
+		break;
+	case 'r':
+		realtime = 1;
+		break;
+	default:
+		handled = 0;
+		break;
 	}
 	return handled;
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	struct option longopts[] = {
 		{"broadcast", 0, NULL, 'a'},
@@ -309,7 +305,7 @@
 	}
 
 	child_waiting = (int *)malloc(sizeof(*child_waiting) * nthreads);
-	condlist = (pthread_cond_t *)malloc(sizeof(*condlist) * nthreads);
+	condlist = (pthread_cond_t *) malloc(sizeof(*condlist) * nthreads);
 	if ((child_waiting == NULL) || (condlist == NULL)) {
 		fprintf(stderr, "Out of memory\n");
 		exit(-1);
diff --git a/testcases/realtime/stress/pi-tests/lookup_pi_state.c b/testcases/realtime/stress/pi-tests/lookup_pi_state.c
index 7748475..d1575dc 100644
--- a/testcases/realtime/stress/pi-tests/lookup_pi_state.c
+++ b/testcases/realtime/stress/pi-tests/lookup_pi_state.c
@@ -46,9 +46,9 @@
 pthread_cond_t CS;
 pthread_cond_t CT;
 
-atomic_t slave_order_a = {0};
-atomic_t slave_order_b = {0};
-atomic_t slave_order_c = {0};
+atomic_t slave_order_a = { 0 };
+atomic_t slave_order_b = { 0 };
+atomic_t slave_order_c = { 0 };
 
 void usage(void)
 {
@@ -71,22 +71,22 @@
 	return handled;
 }
 
-void *slave_thread(void* arg)
+void *slave_thread(void *arg)
 {
 	struct thread *t = (struct thread *)arg;
-	int id = (intptr_t)t->arg;
+	int id = (intptr_t) t->arg;
 // 3
 	pthread_mutex_lock(&MS);
 // 4,5
 	if (atomic_inc(&slave_order_a) == NUM_SLAVES) {
 		printf("Slave thread %d notifying master\n", id);
-		pthread_mutex_lock(&MM); // make sure the master thread is waiting
+		pthread_mutex_lock(&MM);	// make sure the master thread is waiting
 		pthread_cond_signal(&CM);
 		pthread_mutex_unlock(&MM);
 	}
 	printf("Slave thread %d waiting on CS,MS\n", id);
-	pthread_cond_wait(&CS, &MS); // docs are contradictory on if this
-																		 // should be MS or MM
+	pthread_cond_wait(&CS, &MS);	// docs are contradictory on if this
+	// should be MS or MM
 
 	if (atomic_inc(&slave_order_b) <= 6) {
 // 10,11
@@ -103,7 +103,7 @@
 	return NULL;
 }
 
-void *master_thread(void* arg)
+void *master_thread(void *arg)
 {
 	int i;
 	struct timespec ts_abs_timeout;
@@ -111,7 +111,8 @@
 // 1
 	pthread_mutex_lock(&MM);
 	for (i = 0; i < NUM_SLAVES; i++) {
-		create_fifo_thread(slave_thread, (void *)(intptr_t)i, SLAVE_PRIO);
+		create_fifo_thread(slave_thread, (void *)(intptr_t) i,
+				   SLAVE_PRIO);
 	}
 // 2
 	printf("Master waiting till slaves wait()\n");
diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c
index 1274e04..30f38f6 100644
--- a/testcases/realtime/stress/pi-tests/testpi-3.c
+++ b/testcases/realtime/stress/pi-tests/testpi-3.c
@@ -69,7 +69,7 @@
 	return syscall(__NR_gettid);
 }
 
-typedef void* (*entrypoint_t)(void*);
+typedef void *(*entrypoint_t) (void *);
 
 #define THREAD_STOP		1
 
@@ -91,13 +91,13 @@
 
 Thread arg1, arg2, arg3, arg4, arg5;
 
-int strartThread(Thread* thr);
-void stopThread(Thread* thr);
-void joinThread(Thread* thr);
+int strartThread(Thread * thr);
+void stopThread(Thread * thr);
+void joinThread(Thread * thr);
 
-void* func_nonrt(void* arg)
+void *func_nonrt(void *arg)
 {
-	Thread* pthr = (Thread*)arg;
+	Thread *pthr = (Thread *) arg;
 	int rc, i, j, policy, tid = gettid();
 	struct sched_param schedp;
 	cpu_set_t mask;
@@ -106,31 +106,34 @@
 
 	rc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (rc < 0) {
-		 printf("Thread %d: Can't set affinity: %d %s\n", tid, rc, strerror(rc));
-		 exit(-1);
+		printf("Thread %d: Can't set affinity: %d %s\n", tid, rc,
+		       strerror(rc));
+		exit(-1);
 	}
 	rc = sched_getaffinity(0, sizeof(mask), &mask);
 
-	printf("Thread started %d on CPU %ld\n", pthr->priority, (long)mask.__bits[0]);
+	printf("Thread started %d on CPU %ld\n", pthr->priority,
+	       (long)mask.__bits[0]);
 	pthread_getschedparam(pthr->pthread, &policy, &schedp);
 	printf("Thread running %d\n", pthr->priority);
 
 	while (1) {
 		pthread_mutex_lock(&glob_mutex);
-		printf("Thread %d at start pthread pol %d pri %d - Got global lock\n",
-		    pthr->priority, policy, schedp.sched_priority);
+		printf
+		    ("Thread %d at start pthread pol %d pri %d - Got global lock\n",
+		     pthr->priority, policy, schedp.sched_priority);
 		sleep(2);
-		for (i = 0; i < 10000;i++) {
+		for (i = 0; i < 10000; i++) {
 			if ((i % 100) == 0) {
 				sched_getparam(tid, &schedp);
 				policy = sched_getscheduler(tid);
 				printf("Thread %d(%d) loop %d pthread pol %d "
-				    "pri %d\n", tid, pthr->priority, i, policy,
-				    schedp.sched_priority);
+				       "pri %d\n", tid, pthr->priority, i,
+				       policy, schedp.sched_priority);
 				fflush(NULL);
 			}
 			pthr->id++;
-			for (j = 0;j < 5000; j++) {
+			for (j = 0; j < 5000; j++) {
 				pthread_mutex_lock(&(pthr->mutex));
 				pthread_mutex_unlock(&(pthr->mutex));
 			}
@@ -141,9 +144,9 @@
 	return NULL;
 }
 
-void* func_rt(void* arg)
+void *func_rt(void *arg)
 {
-	Thread* pthr = (Thread*)arg;
+	Thread *pthr = (Thread *) arg;
 	int rc, i, j, policy, tid = gettid();
 	struct sched_param schedp;
 	cpu_set_t mask;
@@ -152,32 +155,37 @@
 
 	rc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (rc < 0) {
-		 printf("Thread %d: Can't set affinity: %d %s\n", tid, rc, strerror(rc));
-		 exit(-1);
+		printf("Thread %d: Can't set affinity: %d %s\n", tid, rc,
+		       strerror(rc));
+		exit(-1);
 	}
 	rc = sched_getaffinity(0, sizeof(mask), &mask);
 
-	printf("Thread started %d on CPU %ld\n", pthr->priority, (long)mask.__bits[0]);
+	printf("Thread started %d on CPU %ld\n", pthr->priority,
+	       (long)mask.__bits[0]);
 	pthread_getschedparam(pthr->pthread, &policy, &schedp);
 
 	while (1) {
 		sleep(2);
 		printf("Thread running %d\n", pthr->priority);
 		pthread_mutex_lock(&glob_mutex);
-		printf("Thread %d at start pthread pol %d pri %d - Got global lock\n", pthr->priority,
-			 policy, schedp.sched_priority);
+		printf
+		    ("Thread %d at start pthread pol %d pri %d - Got global lock\n",
+		     pthr->priority, policy, schedp.sched_priority);
 
 		/* we just use the mutex as something to slow things down */
-		/* say who we are and then do nothing for a while.	The aim
+		/* say who we are and then do nothing for a while.      The aim
 		 * of this is to show that high priority threads make more
 		 * progress than lower priority threads..
 		 */
-		for (i=0;i<1000;i++) {
-			if (i%100 == 0) {
+		for (i = 0; i < 1000; i++) {
+			if (i % 100 == 0) {
 				sched_getparam(tid, &schedp);
 				policy = sched_getscheduler(tid);
-				printf("Thread %d(%d) loop %d pthread pol %d pri %d\n", tid, pthr->priority, i,
-			 policy, schedp.sched_priority);
+				printf
+				    ("Thread %d(%d) loop %d pthread pol %d pri %d\n",
+				     tid, pthr->priority, i, policy,
+				     schedp.sched_priority);
 				fflush(NULL);
 			}
 			pthr->id++;
@@ -192,9 +200,9 @@
 	return NULL;
 }
 
-void* func_noise(void* arg)
+void *func_noise(void *arg)
 {
-	Thread* pthr = (Thread*)arg;
+	Thread *pthr = (Thread *) arg;
 	int rc, i, j, policy, tid = gettid();
 	struct sched_param schedp;
 	cpu_set_t mask;
@@ -203,12 +211,14 @@
 
 	rc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (rc < 0) {
-		 printf("Thread %d: Can't set affinity: %d %s\n", tid, rc, strerror(rc));
-		 exit(-1);
+		printf("Thread %d: Can't set affinity: %d %s\n", tid, rc,
+		       strerror(rc));
+		exit(-1);
 	}
 	rc = sched_getaffinity(0, sizeof(mask), &mask);
 
-	printf("Noise Thread started %d on CPU %ld\n", pthr->priority, (long)mask.__bits[0]);
+	printf("Noise Thread started %d on CPU %ld\n", pthr->priority,
+	       (long)mask.__bits[0]);
 	pthread_getschedparam(pthr->pthread, &policy, &schedp);
 
 	while (1) {
@@ -219,7 +229,10 @@
 			if ((i % 100) == 0) {
 				sched_getparam(tid, &schedp);
 				policy = sched_getscheduler(tid);
-				printf("Noise Thread %d(%d) loop %d pthread pol %d pri %d\n", tid, pthr->priority, i, policy, schedp.sched_priority);
+				printf
+				    ("Noise Thread %d(%d) loop %d pthread pol %d pri %d\n",
+				     tid, pthr->priority, i, policy,
+				     schedp.sched_priority);
 				fflush(NULL);
 			}
 			pthr->id++;
@@ -233,7 +246,7 @@
 	return NULL;
 }
 
-int startThread(Thread* thrd)
+int startThread(Thread * thrd)
 {
 	struct sched_param schedp;
 	pthread_condattr_t condattr;
@@ -265,7 +278,8 @@
 	} else {
 		printf("Priority in attribs is %d\n", schedp.sched_priority);
 	}
-	if (pthread_attr_setinheritsched(&(thrd->attr), PTHREAD_EXPLICIT_SCHED) != 0) {
+	if (pthread_attr_setinheritsched(&(thrd->attr), PTHREAD_EXPLICIT_SCHED)
+	    != 0) {
 		printf("Can't set inheritsched\n");
 	}
 	if (pthread_attr_getinheritsched(&(thrd->attr), &inherit) != 0) {
@@ -282,20 +296,21 @@
 	if (pthread_cond_init(&(thrd->cond), &condattr) != 0) {
 		printf("Failed to init cond\n");
 	}
-	retc = pthread_create(&(thrd->pthread),&(thrd->attr), thrd->func, thrd);
+	retc =
+	    pthread_create(&(thrd->pthread), &(thrd->attr), thrd->func, thrd);
 	printf("Create returns %d\n\n", retc);
 	return retc;
 }
 
-void stopThread(Thread* thr)
+void stopThread(Thread * thr)
 {
 	thr->flags += THREAD_STOP;
 	joinThread(thr);
 }
 
-void joinThread(Thread* thr)
+void joinThread(Thread * thr)
 {
-	void* ret = NULL;
+	void *ret = NULL;
 	if (pthread_join(thr->pthread, &ret) != 0) {
 		printf("Join failed\n");
 	}
@@ -305,7 +320,8 @@
 /*
  * Test pthread creation at different thread priorities.
  */
-int main(int argc, char* argv[]) {
+int main(int argc, char *argv[])
+{
 	int i, retc, nopi = 0;
 	cpu_set_t mask;
 	CPU_ZERO(&mask);
@@ -316,8 +332,9 @@
 
 	retc = sched_setaffinity(0, sizeof(mask), &mask);
 	if (retc < 0) {
-		 printf("Main Thread: Can't set affinity: %d %s\n", retc, strerror(retc));
-		 exit(1);
+		printf("Main Thread: Can't set affinity: %d %s\n", retc,
+		       strerror(retc));
+		exit(1);
 	}
 	retc = sched_getaffinity(0, sizeof(mask), &mask);
 
@@ -325,18 +342,28 @@
 	 * XXX: Have you ever heard of structures with c89/c99?
 	 * Inline assignment is a beautiful thing.
 	 */
-	arg1.policy = SCHED_OTHER; arg1.priority = 0;	arg1.func = func_nonrt;
-	arg2.policy = SCHED_RR;	arg2.priority = 20; arg2.func = func_rt;
-	arg3.policy = SCHED_RR;	arg3.priority = 30; arg3.func = func_rt;
-	arg4.policy = SCHED_RR;	arg4.priority = 40; arg4.func = func_rt;
-	arg5.policy = SCHED_RR;	arg5.priority = 40; arg5.func = func_noise;
+	arg1.policy = SCHED_OTHER;
+	arg1.priority = 0;
+	arg1.func = func_nonrt;
+	arg2.policy = SCHED_RR;
+	arg2.priority = 20;
+	arg2.func = func_rt;
+	arg3.policy = SCHED_RR;
+	arg3.priority = 30;
+	arg3.func = func_rt;
+	arg4.policy = SCHED_RR;
+	arg4.priority = 40;
+	arg4.func = func_rt;
+	arg5.policy = SCHED_RR;
+	arg5.priority = 40;
+	arg5.func = func_noise;
 
-	for (i = 0;i < argc; i++) {
+	for (i = 0; i < argc; i++) {
 		if (strcmp(argv[i], "nopi") == 0)
 			nopi = 1;
 	}
 
-	printf("Start %s\n",argv[0]);
+	printf("Start %s\n", argv[0]);
 
 #if HAVE_DECL_PTHREAD_PRIO_INHERIT
 	if (!nopi) {
@@ -346,7 +373,8 @@
 		if (pthread_mutexattr_init(&mutexattr) != 0) {
 			printf("Failed to init mutexattr\n");
 		};
-		if (pthread_mutexattr_setprotocol(&mutexattr, PTHREAD_PRIO_INHERIT) != 0) {
+		if (pthread_mutexattr_setprotocol
+		    (&mutexattr, PTHREAD_PRIO_INHERIT) != 0) {
 			printf("Can't set protocol prio inherit\n");
 		}
 		if (pthread_mutexattr_getprotocol(&mutexattr, &protocol) != 0) {
@@ -375,8 +403,8 @@
 	stopThread(&arg4);
 	stopThread(&arg5);
 
-	printf("Thread counts %d %d %d %d %d\n",arg1.id, arg2.id, arg3.id,
-	    arg4.id, arg5.id);
+	printf("Thread counts %d %d %d %d %d\n", arg1.id, arg2.id, arg3.id,
+	       arg4.id, arg5.id);
 	printf("Done\n");
 
 	return 0;
diff --git a/tools/apicmds/ltpapicmd.c b/tools/apicmds/ltpapicmd.c
index 76ff667..40965ab 100644
--- a/tools/apicmds/ltpapicmd.c
+++ b/tools/apicmds/ltpapicmd.c
@@ -135,12 +135,12 @@
  */
 int main(int argc, char *argv[])
 {
-	int trestype;	/* test result type TFAIL, TPASS, TINFO etc */
-	char *arg_fmt;	/* message string printed along with test type */
-	char *cmd_name;	/* name by which this program is invoked tst_brk etc */
-	char *tst_total;/* total number of tests in the file. */
-	char *tst_count;/* sets the value of Tst_count with this value */
-	char *file_name;/* contents of this file are printed; see tst_res() */
+	int trestype;		/* test result type TFAIL, TPASS, TINFO etc */
+	char *arg_fmt;		/* message string printed along with test type */
+	char *cmd_name;		/* name by which this program is invoked tst_brk etc */
+	char *tst_total;	/* total number of tests in the file. */
+	char *tst_count;	/* sets the value of Tst_count with this value */
+	char *file_name;	/* contents of this file are printed; see tst_res() */
 
 	arg_fmt = SAFE_MALLOC(NULL, 1024);
 	cmd_name = SAFE_MALLOC(NULL, 1024);
diff --git a/tools/genload/genload.c b/tools/genload/genload.c
index 73a9c42..7f56d52 100644
--- a/tools/genload/genload.c
+++ b/tools/genload/genload.c
@@ -74,910 +74,820 @@
             }
 
 /* Prototypes for utility functions.  */
-int usage (int status);
-int version (int status);
-long long atoll_s (const char *nptr);
-long long atoll_b (const char *nptr);
+int usage(int status);
+int version(int status);
+long long atoll_s(const char *nptr);
+long long atoll_b(const char *nptr);
 
 /* Prototypes for the worker functions.  */
-int hogcpu (long long forks);
-int hogio (long long forks);
-int hogvm (long long forks, long long chunks, long long bytes);
-int hoghdd (long long forks, int clean, long long files, long long bytes);
+int hogcpu(long long forks);
+int hogio(long long forks);
+int hogvm(long long forks, long long chunks, long long bytes);
+int hoghdd(long long forks, int clean, long long files, long long bytes);
 
-int
-main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-  int i, pid, children = 0, retval = 0;
-  long starttime, stoptime, runtime;
+	int i, pid, children = 0, retval = 0;
+	long starttime, stoptime, runtime;
 
-  /* Variables that indicate which options have been selected.  */
-  int do_dryrun = 0;
-  int do_timeout = 0;
-  int do_cpu = 0;               /* Default to 1 fork. */
-  long long do_cpu_forks = 1;
-  int do_io = 0;                /* Default to 1 fork. */
-  long long do_io_forks = 1;
-  int do_vm = 0;                /* Default to 1 fork, 1 chunk of 256MB.  */
-  long long do_vm_forks = 1;
-  long long do_vm_chunks = 1;
-  long long do_vm_bytes = 256 * 1024 * 1024;
-  int do_hdd = 0;               /* Default to 1 fork, clean, 1 file of 1GB.  */
-  long long do_hdd_forks = 1;
-  int do_hdd_clean = 0;
-  long long do_hdd_files = 1;
-  long long do_hdd_bytes = 1024 * 1024 * 1024;
+	/* Variables that indicate which options have been selected.  */
+	int do_dryrun = 0;
+	int do_timeout = 0;
+	int do_cpu = 0;		/* Default to 1 fork. */
+	long long do_cpu_forks = 1;
+	int do_io = 0;		/* Default to 1 fork. */
+	long long do_io_forks = 1;
+	int do_vm = 0;		/* Default to 1 fork, 1 chunk of 256MB.  */
+	long long do_vm_forks = 1;
+	long long do_vm_chunks = 1;
+	long long do_vm_bytes = 256 * 1024 * 1024;
+	int do_hdd = 0;		/* Default to 1 fork, clean, 1 file of 1GB.  */
+	long long do_hdd_forks = 1;
+	int do_hdd_clean = 0;
+	long long do_hdd_files = 1;
+	long long do_hdd_bytes = 1024 * 1024 * 1024;
 
-  /* Record our start time.  */
-  if ((starttime = time (NULL)) == -1)
-    {
-      err (stderr, "failed to acquire current time\n");
-      exit (1);
-    }
+	/* Record our start time.  */
+	if ((starttime = time(NULL)) == -1) {
+		err(stderr, "failed to acquire current time\n");
+		exit(1);
+	}
 
-  /* SuSv3 does not define any error conditions for this function.  */
-  global_progname = basename (argv[0]);
+	/* SuSv3 does not define any error conditions for this function.  */
+	global_progname = basename(argv[0]);
 
-  /* For portability, parse command line options without getopt_long.  */
-  for (i = 1; i < argc; i++)
-    {
-      char *arg = argv[i];
+	/* For portability, parse command line options without getopt_long.  */
+	for (i = 1; i < argc; i++) {
+		char *arg = argv[i];
 
-      if (strcmp (arg, "--help") == 0 || strcmp (arg, "-?") == 0)
-        {
-          usage (0);
-        }
-      else if (strcmp (arg, "--version") == 0)
-        {
-          version (0);
-        }
-      else if (strcmp (arg, "--verbose") == 0 || strcmp (arg, "-v") == 0)
-        {
-          global_debug = 3;
-        }
-      else if (strcmp (arg, "--quiet") == 0 || strcmp (arg, "-q") == 0)
-        {
-          global_debug = 0;
-        }
-      else if (strcmp (arg, "--dry-run") == 0 || strcmp (arg, "-n") == 0)
-        {
-          do_dryrun = 1;
-        }
-      else if (strcmp (arg, "--no-retry") == 0)
-        {
-          global_ignore = 0;
-          dbg (stdout, "turning off ignore of non-critical errors");
-        }
-      else if (strcmp (arg, "--retry-delay") == 0)
-        {
-          assert_arg ("--retry-delay");
-          global_retry = atoll (arg);
-          dbg (stdout, "setting retry delay to %dus\n", global_retry);
-        }
-      else if (strcmp (arg, "--backoff") == 0)
-        {
-          assert_arg ("--backoff");
-          global_backoff = atoll (arg);
-          if (global_backoff < 0)
-            {
-              err (stderr, "invalid backoff factor: %i\n", global_backoff);
-              exit (1);
-            }
-          dbg (stdout, "setting backoff coeffient to %dus\n", global_backoff);
-        }
-      else if (strcmp (arg, "--timeout") == 0 || strcmp (arg, "-t") == 0)
-        {
-          do_timeout = 1;
-          assert_arg ("--timeout");
-          global_timeout = atoll_s (arg);
-          dbg (stdout, "setting timeout to %ds\n", global_timeout);
-        }
-      else if (strcmp (arg, "--cpu") == 0 || strcmp (arg, "-c") == 0)
-        {
-          do_cpu = 1;
-          assert_arg ("--cpu");
-          do_cpu_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--io") == 0 || strcmp (arg, "-i") == 0)
-        {
-          do_io = 1;
-          assert_arg ("--io");
-          do_io_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm") == 0 || strcmp (arg, "-m") == 0)
-        {
-          do_vm = 1;
-          assert_arg ("--vm");
-          do_vm_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-chunks") == 0)
-        {
-          assert_arg ("--vm-chunks");
-          do_vm_chunks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-bytes") == 0)
-        {
-          assert_arg ("--vm-bytes");
-          do_vm_bytes = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-hang") == 0)
-        {
-          global_vmhang = 1;
-        }
-      else if (strcmp (arg, "--hdd") == 0 || strcmp (arg, "-d") == 0)
-        {
-          do_hdd = 1;
-          assert_arg ("--hdd");
-          do_hdd_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--hdd-noclean") == 0)
-        {
-          do_hdd_clean = 2;
-        }
-      else if (strcmp (arg, "--hdd-files") == 0)
-        {
-          assert_arg ("--hdd-files");
-          do_hdd_files = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--hdd-bytes") == 0)
-        {
-          assert_arg ("--hdd-bytes");
-          do_hdd_bytes = atoll_b (arg);
-        }
-      else
-        {
-          err (stderr, "unrecognized option: %s\n", arg);
-          exit (1);
-        }
-    }
+		if (strcmp(arg, "--help") == 0 || strcmp(arg, "-?") == 0) {
+			usage(0);
+		} else if (strcmp(arg, "--version") == 0) {
+			version(0);
+		} else if (strcmp(arg, "--verbose") == 0
+			   || strcmp(arg, "-v") == 0) {
+			global_debug = 3;
+		} else if (strcmp(arg, "--quiet") == 0
+			   || strcmp(arg, "-q") == 0) {
+			global_debug = 0;
+		} else if (strcmp(arg, "--dry-run") == 0
+			   || strcmp(arg, "-n") == 0) {
+			do_dryrun = 1;
+		} else if (strcmp(arg, "--no-retry") == 0) {
+			global_ignore = 0;
+			dbg(stdout,
+			    "turning off ignore of non-critical errors");
+		} else if (strcmp(arg, "--retry-delay") == 0) {
+			assert_arg("--retry-delay");
+			global_retry = atoll(arg);
+			dbg(stdout, "setting retry delay to %dus\n",
+			    global_retry);
+		} else if (strcmp(arg, "--backoff") == 0) {
+			assert_arg("--backoff");
+			global_backoff = atoll(arg);
+			if (global_backoff < 0) {
+				err(stderr, "invalid backoff factor: %i\n",
+				    global_backoff);
+				exit(1);
+			}
+			dbg(stdout, "setting backoff coeffient to %dus\n",
+			    global_backoff);
+		} else if (strcmp(arg, "--timeout") == 0
+			   || strcmp(arg, "-t") == 0) {
+			do_timeout = 1;
+			assert_arg("--timeout");
+			global_timeout = atoll_s(arg);
+			dbg(stdout, "setting timeout to %ds\n", global_timeout);
+		} else if (strcmp(arg, "--cpu") == 0 || strcmp(arg, "-c") == 0) {
+			do_cpu = 1;
+			assert_arg("--cpu");
+			do_cpu_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--io") == 0 || strcmp(arg, "-i") == 0) {
+			do_io = 1;
+			assert_arg("--io");
+			do_io_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm") == 0 || strcmp(arg, "-m") == 0) {
+			do_vm = 1;
+			assert_arg("--vm");
+			do_vm_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-chunks") == 0) {
+			assert_arg("--vm-chunks");
+			do_vm_chunks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-bytes") == 0) {
+			assert_arg("--vm-bytes");
+			do_vm_bytes = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-hang") == 0) {
+			global_vmhang = 1;
+		} else if (strcmp(arg, "--hdd") == 0 || strcmp(arg, "-d") == 0) {
+			do_hdd = 1;
+			assert_arg("--hdd");
+			do_hdd_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--hdd-noclean") == 0) {
+			do_hdd_clean = 2;
+		} else if (strcmp(arg, "--hdd-files") == 0) {
+			assert_arg("--hdd-files");
+			do_hdd_files = atoll_b(arg);
+		} else if (strcmp(arg, "--hdd-bytes") == 0) {
+			assert_arg("--hdd-bytes");
+			do_hdd_bytes = atoll_b(arg);
+		} else {
+			err(stderr, "unrecognized option: %s\n", arg);
+			exit(1);
+		}
+	}
 
-  /* Hog CPU option.  */
-  if (do_cpu)
-    {
-      out (stdout, "dispatching %lli hogcpu forks\n", do_cpu_forks);
+	/* Hog CPU option.  */
+	if (do_cpu) {
+		out(stdout, "dispatching %lli hogcpu forks\n", do_cpu_forks);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogcpu (do_cpu_forks));
-        case -1:               /* error */
-          err (stderr, "hogcpu dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogcpu dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogcpu(do_cpu_forks));
+		case -1:	/* error */
+			err(stderr, "hogcpu dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogcpu dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog I/O option.  */
-  if (do_io)
-    {
-      out (stdout, "dispatching %lli hogio forks\n", do_io_forks);
+	/* Hog I/O option.  */
+	if (do_io) {
+		out(stdout, "dispatching %lli hogio forks\n", do_io_forks);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogio (do_io_forks));
-        case -1:               /* error */
-          err (stderr, "hogio dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogio dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogio(do_io_forks));
+		case -1:	/* error */
+			err(stderr, "hogio dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogio dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog VM option.  */
-  if (do_vm)
-    {
-      out (stdout,
-           "dispatching %lli hogvm forks, each %lli chunks of %lli bytes\n",
-           do_vm_forks, do_vm_chunks, do_vm_bytes);
+	/* Hog VM option.  */
+	if (do_vm) {
+		out(stdout,
+		    "dispatching %lli hogvm forks, each %lli chunks of %lli bytes\n",
+		    do_vm_forks, do_vm_chunks, do_vm_bytes);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogvm (do_vm_forks, do_vm_chunks, do_vm_bytes));
-        case -1:               /* error */
-          err (stderr, "hogvm dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogvm dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogvm(do_vm_forks, do_vm_chunks, do_vm_bytes));
+		case -1:	/* error */
+			err(stderr, "hogvm dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogvm dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog HDD option.  */
-  if (do_hdd)
-    {
-      out (stdout, "dispatching %lli hoghdd forks, each %lli files of "
-           "%lli bytes\n", do_hdd_forks, do_hdd_files, do_hdd_bytes);
+	/* Hog HDD option.  */
+	if (do_hdd) {
+		out(stdout, "dispatching %lli hoghdd forks, each %lli files of "
+		    "%lli bytes\n", do_hdd_forks, do_hdd_files, do_hdd_bytes);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hoghdd
-                (do_hdd_forks, do_hdd_clean, do_hdd_files, do_hdd_bytes));
-        case -1:               /* error */
-          err (stderr, "hoghdd dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hoghdd dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hoghdd
+			     (do_hdd_forks, do_hdd_clean, do_hdd_files,
+			      do_hdd_bytes));
+		case -1:	/* error */
+			err(stderr, "hoghdd dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hoghdd dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* We have no work to do, so bail out.  */
-  if (children == 0)
-    usage (0);
+	/* We have no work to do, so bail out.  */
+	if (children == 0)
+		usage(0);
 
-  /* Wait for our children to exit.  */
-  while (children)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (children) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "dispatcher %i returned error %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- dispatcher return (%i)\n", pid);
-                }
-            }
-          else
-            {
-              err (stderr, "dispatcher did not exit normally\n");
-              ++retval;
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "dispatcher %i returned error %i\n",
+					    pid, ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- dispatcher return (%i)\n",
+					    pid);
+				}
+			} else {
+				err(stderr,
+				    "dispatcher did not exit normally\n");
+				++retval;
+			}
 
-          --children;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing dispatcher children\n");
-          ++retval;
-          break;
-        }
-    }
+			--children;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing dispatcher children\n");
+			++retval;
+			break;
+		}
+	}
 
-  /* Record our stop time.  */
-  if ((stoptime = time (NULL)) == -1)
-    {
-      err (stderr, "failed to acquire current time\n");
-      exit (1);
-    }
+	/* Record our stop time.  */
+	if ((stoptime = time(NULL)) == -1) {
+		err(stderr, "failed to acquire current time\n");
+		exit(1);
+	}
 
-  /* Calculate our runtime.  */
-  runtime = stoptime - starttime;
+	/* Calculate our runtime.  */
+	runtime = stoptime - starttime;
 
-  /* Print final status message.  */
-  if (retval)
-    {
-      err (stderr, "failed run completed in %lis\n", runtime);
-    }
-  else
-    {
-      out (stdout, "successful run completed in %lis\n", runtime);
-    }
+	/* Print final status message.  */
+	if (retval) {
+		err(stderr, "failed run completed in %lis\n", runtime);
+	} else {
+		out(stdout, "successful run completed in %lis\n", runtime);
+	}
 
-  exit (retval);
+	exit(retval);
 }
 
-int
-usage (int status)
+int usage(int status)
 {
-  char *mesg =
-    "`%s' imposes certain types of compute stress on your system\n\n"
-    "Usage: %s [OPTION [ARG]] ...\n\n"
-    " -?, --help            show this help statement\n"
-    "     --version         show version statement\n"
-    " -v, --verbose         be verbose\n"
-    " -q, --quiet           be quiet\n"
-    " -n, --dry-run         show what would have been done\n"
-    "     --no-retry        exit rather than retry non-critical errors\n"
-    "     --retry-delay n   wait n us before continuing past error\n"
-    " -t, --timeout n       timeout after n seconds\n"
-    "     --backoff n       wait for factor of n us before starting work\n"
-    " -c, --cpu n           spawn n procs spinning on sqrt()\n"
-    " -i, --io n            spawn n procs spinning on sync()\n"
-    " -m, --vm n            spawn n procs spinning on malloc()\n"
-    "     --vm-chunks c     malloc c chunks (default is 1)\n"
-    "     --vm-bytes b      malloc chunks of b bytes (default is 256MB)\n"
-    "     --vm-hang         hang in a sleep loop after memory allocated\n"
-    " -d, --hdd n           spawn n procs spinning on write()\n"
-    "     --hdd-noclean     do not unlink file to which random data written\n"
-    "     --hdd-files f     write to f files (default is 1)\n"
-    "     --hdd-bytes b     write b bytes (default is 1GB)\n\n"
-    "Infinity is denoted with 0.  For -m, -d: n=0 means infinite redo,\n"
-    "n<0 means redo abs(n) times. Valid suffixes are m,h,d,y for time;\n"
-    "k,m,g for size.\n\n";
+	char *mesg =
+	    "`%s' imposes certain types of compute stress on your system\n\n"
+	    "Usage: %s [OPTION [ARG]] ...\n\n"
+	    " -?, --help            show this help statement\n"
+	    "     --version         show version statement\n"
+	    " -v, --verbose         be verbose\n"
+	    " -q, --quiet           be quiet\n"
+	    " -n, --dry-run         show what would have been done\n"
+	    "     --no-retry        exit rather than retry non-critical errors\n"
+	    "     --retry-delay n   wait n us before continuing past error\n"
+	    " -t, --timeout n       timeout after n seconds\n"
+	    "     --backoff n       wait for factor of n us before starting work\n"
+	    " -c, --cpu n           spawn n procs spinning on sqrt()\n"
+	    " -i, --io n            spawn n procs spinning on sync()\n"
+	    " -m, --vm n            spawn n procs spinning on malloc()\n"
+	    "     --vm-chunks c     malloc c chunks (default is 1)\n"
+	    "     --vm-bytes b      malloc chunks of b bytes (default is 256MB)\n"
+	    "     --vm-hang         hang in a sleep loop after memory allocated\n"
+	    " -d, --hdd n           spawn n procs spinning on write()\n"
+	    "     --hdd-noclean     do not unlink file to which random data written\n"
+	    "     --hdd-files f     write to f files (default is 1)\n"
+	    "     --hdd-bytes b     write b bytes (default is 1GB)\n\n"
+	    "Infinity is denoted with 0.  For -m, -d: n=0 means infinite redo,\n"
+	    "n<0 means redo abs(n) times. Valid suffixes are m,h,d,y for time;\n"
+	    "k,m,g for size.\n\n";
 
-  fprintf (stdout, mesg, global_progname, global_progname);
+	fprintf(stdout, mesg, global_progname, global_progname);
 
-  if (status <= 0)
-    exit (-1 * status);
+	if (status <= 0)
+		exit(-1 * status);
 
-  return 0;
+	return 0;
 }
 
-int
-version (int status)
+int version(int status)
 {
-  char *mesg = "%s %s\n";
+	char *mesg = "%s %s\n";
 
-  fprintf (stdout, mesg, global_progname, VERSION);
+	fprintf(stdout, mesg, global_progname, VERSION);
 
-  if (status <= 0)
-    exit (-1 * status);
+	if (status <= 0)
+		exit(-1 * status);
 
-  return 0;
+	return 0;
 }
 
 /* Convert a string representation of a number with an optional size suffix
  * to a long long.
  */
-long long
-atoll_b (const char *nptr)
+long long atoll_b(const char *nptr)
 {
-  int pos;
-  char suffix;
-  long long factor = 1;
+	int pos;
+	char suffix;
+	long long factor = 1;
 
-  if ((pos = strlen (nptr) - 1) < 0)
-    {
-      err (stderr, "invalid string\n");
-      exit (1);
-    }
+	if ((pos = strlen(nptr) - 1) < 0) {
+		err(stderr, "invalid string\n");
+		exit(1);
+	}
 
-  switch (suffix = nptr[pos])
-    {
-    case 'k':
-    case 'K':
-      factor = 1024;
-      break;
-    case 'm':
-    case 'M':
-      factor = 1024 * 1024;
-      break;
-    case 'g':
-    case 'G':
-      factor = 1024 * 1024 * 1024;
-      break;
-    default:
-      if (suffix < '0' || suffix > '9')
-        {
-          err (stderr, "unrecognized suffix: %c\n", suffix);
-          exit (1);
-        }
-    }
+	switch (suffix = nptr[pos]) {
+	case 'k':
+	case 'K':
+		factor = 1024;
+		break;
+	case 'm':
+	case 'M':
+		factor = 1024 * 1024;
+		break;
+	case 'g':
+	case 'G':
+		factor = 1024 * 1024 * 1024;
+		break;
+	default:
+		if (suffix < '0' || suffix > '9') {
+			err(stderr, "unrecognized suffix: %c\n", suffix);
+			exit(1);
+		}
+	}
 
-  factor = atoll (nptr) * factor;
+	factor = atoll(nptr) * factor;
 
-  return factor;
+	return factor;
 }
 
 /* Convert a string representation of a number with an optional time suffix
  * to a long long.
  */
-long long
-atoll_s (const char *nptr)
+long long atoll_s(const char *nptr)
 {
-  int pos;
-  char suffix;
-  long long factor = 1;
+	int pos;
+	char suffix;
+	long long factor = 1;
 
-  if ((pos = strlen (nptr) - 1) < 0)
-    {
-      err (stderr, "invalid string\n");
-      exit (1);
-    }
+	if ((pos = strlen(nptr) - 1) < 0) {
+		err(stderr, "invalid string\n");
+		exit(1);
+	}
 
-  switch (suffix = nptr[pos])
-    {
-    case 's':
-    case 'S':
-      factor = 1;
-      break;
-    case 'm':
-    case 'M':
-      factor = 60;
-      break;
-    case 'h':
-    case 'H':
-      factor = 60 * 60;
-      break;
-    case 'd':
-    case 'D':
-      factor = 60 * 60 * 24;
-      break;
-    case 'y':
-    case 'Y':
-      factor = 60 * 60 * 24 * 360;
-      break;
-    default:
-      if (suffix < '0' || suffix > '9')
-        {
-          err (stderr, "unrecognized suffix: %c\n", suffix);
-          exit (1);
-        }
-    }
+	switch (suffix = nptr[pos]) {
+	case 's':
+	case 'S':
+		factor = 1;
+		break;
+	case 'm':
+	case 'M':
+		factor = 60;
+		break;
+	case 'h':
+	case 'H':
+		factor = 60 * 60;
+		break;
+	case 'd':
+	case 'D':
+		factor = 60 * 60 * 24;
+		break;
+	case 'y':
+	case 'Y':
+		factor = 60 * 60 * 24 * 360;
+		break;
+	default:
+		if (suffix < '0' || suffix > '9') {
+			err(stderr, "unrecognized suffix: %c\n", suffix);
+			exit(1);
+		}
+	}
 
-  factor = atoll (nptr) * factor;
+	factor = atoll(nptr) * factor;
 
-  return factor;
+	return factor;
 }
 
-int
-hogcpu (long long forks)
+int hogcpu(long long forks)
 {
-  long long i;
-  double d;
-  int pid, retval = 0;
+	long long i;
+	double d;
+	int pid, retval = 0;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogcpu\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogcpu\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            d = sqrt (rand ());
+			while (1)
+				d = sqrt(rand());
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogcpu worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogcpu worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogcpu worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogcpu worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogcpu worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogcpu worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogcpu worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogcpu worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogcpu worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogcpu worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogcpu worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout,
+				    "<-- hogcpu worker signalled (%i)\n", pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogcpu worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr,
+			    "detected missing hogcpu worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hogio (long long forks)
+int hogio(long long forks)
 {
-  long long i;
-  int pid, retval = 0;
+	long long i;
+	int pid, retval = 0;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogio\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogio\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            sync ();
+			while (1)
+				sync();
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogio worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogio worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogio worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogio worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogio worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogio worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogio worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogio worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogio worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogio worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogio worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout, "<-- hogio worker signalled (%i)\n",
+				    pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogio worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing hogio worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hogvm (long long forks, long long chunks, long long bytes)
+int hogvm(long long forks, long long chunks, long long bytes)
 {
-  long long i, j, k;
-  int pid, retval = 0;
-  char **ptr;
+	long long i, j, k;
+	int pid, retval = 0;
+	char **ptr;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogvm\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogvm\n", backoff);
 
-  if (bytes == 0)
-    {
-      /* 512MB is guess at the largest value can than be malloced at once.  */
-      bytes = 512 * 1024 * 1024;
-    }
+	if (bytes == 0) {
+		/* 512MB is guess at the largest value can than be malloced at once.  */
+		bytes = 512 * 1024 * 1024;
+	}
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            {
-              ptr = (char **) malloc ( chunks * 2);
-              for (j = 0; chunks == 0 || j < chunks; j++)
-                {
-                  if ((ptr[j] = (char *) malloc (bytes * sizeof (char))))
-                    {
-                      for (k = 0; k < bytes; k++)
-                        ptr[j][k] = 'Z';   /* Ensure that COW happens.  */
-                      dbg (stdout, "hogvm worker malloced %lli bytes\n", k);
-                    }
-                  else if (ignore)
-                    {
-                      ++retval;
-                      wrn (stderr, "hogvm malloc failed, continuing\n");
-                      usleep (retry);
-                      continue;
-                    }
-                  else
-                    {
-                      ++retval;
-                      err (stderr, "hogvm malloc failed\n");
-                      break;
-                    }
-                }
-              if (global_vmhang && retval == 0)
-                {
-                  dbg (stdout, "sleeping forever with allocated memory\n");
-                  while (1)
-                    sleep (1024);
-                }
-              if (retval == 0)
-                {
-                  dbg (stdout,
-                       "hogvm worker freeing memory and starting over\n");
-                  for (j = 0; chunks == 0 || j < chunks; j++) {
-                      free (ptr[j]);
-                  }
-                  free(ptr);
-                  continue;
-                }
+			while (1) {
+				ptr = (char **)malloc(chunks * 2);
+				for (j = 0; chunks == 0 || j < chunks; j++) {
+					if ((ptr[j] =
+					     (char *)malloc(bytes *
+							    sizeof(char)))) {
+						for (k = 0; k < bytes; k++)
+							ptr[j][k] = 'Z';	/* Ensure that COW happens.  */
+						dbg(stdout,
+						    "hogvm worker malloced %lli bytes\n",
+						    k);
+					} else if (ignore) {
+						++retval;
+						wrn(stderr,
+						    "hogvm malloc failed, continuing\n");
+						usleep(retry);
+						continue;
+					} else {
+						++retval;
+						err(stderr,
+						    "hogvm malloc failed\n");
+						break;
+					}
+				}
+				if (global_vmhang && retval == 0) {
+					dbg(stdout,
+					    "sleeping forever with allocated memory\n");
+					while (1)
+						sleep(1024);
+				}
+				if (retval == 0) {
+					dbg(stdout,
+					    "hogvm worker freeing memory and starting over\n");
+					for (j = 0; chunks == 0 || j < chunks;
+					     j++) {
+						free(ptr[j]);
+					}
+					free(ptr);
+					continue;
+				}
 
-              exit (retval);
-            }
+				exit(retval);
+			}
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogvm worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogvm worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogvm worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogvm worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogvm worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogvm worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogvm worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogvm worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogvm worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogvm worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogvm worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout, "<-- hogvm worker signalled (%i)\n",
+				    pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogvm worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing hogvm worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hoghdd (long long forks, int clean, long long files, long long bytes)
+int hoghdd(long long forks, int clean, long long files, long long bytes)
 {
-  long long i, j;
-  int fd, pid, retval = 0;
-  int chunk = (1024 * 1024) - 1;        /* Minimize slow writing.  */
-  char buff[chunk];
+	long long i, j;
+	int fd, pid, retval = 0;
+	int chunk = (1024 * 1024) - 1;	/* Minimize slow writing.  */
+	char buff[chunk];
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  /* Initialize buffer with some random ASCII data.  */
-  dbg (stdout, "seeding buffer with random data\n");
-  for (i = 0; i < chunk - 1; i++)
-    {
-      j = rand ();
-      j = (j < 0) ? -j : j;
-      j %= 95;
-      j += 32;
-      buff[i] = j;
-    }
-  buff[i] = '\n';
+	/* Initialize buffer with some random ASCII data.  */
+	dbg(stdout, "seeding buffer with random data\n");
+	for (i = 0; i < chunk - 1; i++) {
+		j = rand();
+		j = (j < 0) ? -j : j;
+		j %= 95;
+		j += 32;
+		buff[i] = j;
+	}
+	buff[i] = '\n';
 
-  dbg (stdout, "using backoff sleep of %lius for hoghdd\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hoghdd\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            {
-              for (i = 0; i < files; i++)
-                {
-                  char name[] = "./stress.XXXXXX";
+			while (1) {
+				for (i = 0; i < files; i++) {
+					char name[] = "./stress.XXXXXX";
 
-                  if ((fd = mkstemp (name)) < 0)
-                    {
-                      perror ("mkstemp");
-                      err (stderr, "mkstemp failed\n");
-                      exit (1);
-                    }
+					if ((fd = mkstemp(name)) < 0) {
+						perror("mkstemp");
+						err(stderr, "mkstemp failed\n");
+						exit(1);
+					}
 
-                  if (clean == 0)
-                    {
-                      dbg (stdout, "unlinking %s\n", name);
-                      if (unlink (name))
-                        {
-                          err (stderr, "unlink failed\n");
-                          exit (1);
-                        }
-                    }
+					if (clean == 0) {
+						dbg(stdout, "unlinking %s\n",
+						    name);
+						if (unlink(name)) {
+							err(stderr,
+							    "unlink failed\n");
+							exit(1);
+						}
+					}
 
-                  dbg (stdout, "fast writing to %s\n", name);
-                  for (j = 0; bytes == 0 || j + chunk < bytes; j += chunk)
-                    {
-                      if (write (fd, buff, chunk) != chunk)
-                        {
-                          err (stderr, "write failed\n");
-                          exit (1);
-                        }
-                    }
+					dbg(stdout, "fast writing to %s\n",
+					    name);
+					for (j = 0;
+					     bytes == 0 || j + chunk < bytes;
+					     j += chunk) {
+						if (write(fd, buff, chunk) !=
+						    chunk) {
+							err(stderr,
+							    "write failed\n");
+							exit(1);
+						}
+					}
 
-                  dbg (stdout, "slow writing to %s\n", name);
-                  for (; bytes == 0 || j < bytes - 1; j++)
-                    {
-                      if (write (fd, "Z", 1) != 1)
-                        {
-                          err (stderr, "write failed\n");
-                          exit (1);
-                        }
-                    }
-                  if (write (fd, "\n", 1) != 1)
-                    {
-                      err (stderr, "write failed\n");
-                      exit (1);
-                    }
-                  ++j;
+					dbg(stdout, "slow writing to %s\n",
+					    name);
+					for (; bytes == 0 || j < bytes - 1; j++) {
+						if (write(fd, "Z", 1) != 1) {
+							err(stderr,
+							    "write failed\n");
+							exit(1);
+						}
+					}
+					if (write(fd, "\n", 1) != 1) {
+						err(stderr, "write failed\n");
+						exit(1);
+					}
+					++j;
 
-                  dbg (stdout, "closing %s after writing %lli bytes\n", name,
-                       j);
-                  close (fd);
+					dbg(stdout,
+					    "closing %s after writing %lli bytes\n",
+					    name, j);
+					close(fd);
 
-                  if (clean == 1)
-                    {
-                      if (unlink (name))
-                        {
-                          err (stderr, "unlink failed\n");
-                          exit (1);
-                        }
-                    }
-                }
-              if (retval == 0)
-                {
-                  dbg (stdout, "hoghdd worker starting over\n");
-                  continue;
-                }
+					if (clean == 1) {
+						if (unlink(name)) {
+							err(stderr,
+							    "unlink failed\n");
+							exit(1);
+						}
+					}
+				}
+				if (retval == 0) {
+					dbg(stdout,
+					    "hoghdd worker starting over\n");
+					continue;
+				}
 
-              exit (retval);
-            }
+				exit(retval);
+			}
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hoghdd worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hoghdd worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hoghdd worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hoghdd worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hoghdd worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hoghdd worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hoghdd worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hoghdd worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hoghdd worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hoghdd worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hoghdd worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout,
+				    "<-- hoghdd worker signalled (%i)\n", pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hoghdd worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr,
+			    "detected missing hoghdd worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
diff --git a/tools/genload/stress.c b/tools/genload/stress.c
index 73a9c42..7f56d52 100644
--- a/tools/genload/stress.c
+++ b/tools/genload/stress.c
@@ -74,910 +74,820 @@
             }
 
 /* Prototypes for utility functions.  */
-int usage (int status);
-int version (int status);
-long long atoll_s (const char *nptr);
-long long atoll_b (const char *nptr);
+int usage(int status);
+int version(int status);
+long long atoll_s(const char *nptr);
+long long atoll_b(const char *nptr);
 
 /* Prototypes for the worker functions.  */
-int hogcpu (long long forks);
-int hogio (long long forks);
-int hogvm (long long forks, long long chunks, long long bytes);
-int hoghdd (long long forks, int clean, long long files, long long bytes);
+int hogcpu(long long forks);
+int hogio(long long forks);
+int hogvm(long long forks, long long chunks, long long bytes);
+int hoghdd(long long forks, int clean, long long files, long long bytes);
 
-int
-main (int argc, char **argv)
+int main(int argc, char **argv)
 {
-  int i, pid, children = 0, retval = 0;
-  long starttime, stoptime, runtime;
+	int i, pid, children = 0, retval = 0;
+	long starttime, stoptime, runtime;
 
-  /* Variables that indicate which options have been selected.  */
-  int do_dryrun = 0;
-  int do_timeout = 0;
-  int do_cpu = 0;               /* Default to 1 fork. */
-  long long do_cpu_forks = 1;
-  int do_io = 0;                /* Default to 1 fork. */
-  long long do_io_forks = 1;
-  int do_vm = 0;                /* Default to 1 fork, 1 chunk of 256MB.  */
-  long long do_vm_forks = 1;
-  long long do_vm_chunks = 1;
-  long long do_vm_bytes = 256 * 1024 * 1024;
-  int do_hdd = 0;               /* Default to 1 fork, clean, 1 file of 1GB.  */
-  long long do_hdd_forks = 1;
-  int do_hdd_clean = 0;
-  long long do_hdd_files = 1;
-  long long do_hdd_bytes = 1024 * 1024 * 1024;
+	/* Variables that indicate which options have been selected.  */
+	int do_dryrun = 0;
+	int do_timeout = 0;
+	int do_cpu = 0;		/* Default to 1 fork. */
+	long long do_cpu_forks = 1;
+	int do_io = 0;		/* Default to 1 fork. */
+	long long do_io_forks = 1;
+	int do_vm = 0;		/* Default to 1 fork, 1 chunk of 256MB.  */
+	long long do_vm_forks = 1;
+	long long do_vm_chunks = 1;
+	long long do_vm_bytes = 256 * 1024 * 1024;
+	int do_hdd = 0;		/* Default to 1 fork, clean, 1 file of 1GB.  */
+	long long do_hdd_forks = 1;
+	int do_hdd_clean = 0;
+	long long do_hdd_files = 1;
+	long long do_hdd_bytes = 1024 * 1024 * 1024;
 
-  /* Record our start time.  */
-  if ((starttime = time (NULL)) == -1)
-    {
-      err (stderr, "failed to acquire current time\n");
-      exit (1);
-    }
+	/* Record our start time.  */
+	if ((starttime = time(NULL)) == -1) {
+		err(stderr, "failed to acquire current time\n");
+		exit(1);
+	}
 
-  /* SuSv3 does not define any error conditions for this function.  */
-  global_progname = basename (argv[0]);
+	/* SuSv3 does not define any error conditions for this function.  */
+	global_progname = basename(argv[0]);
 
-  /* For portability, parse command line options without getopt_long.  */
-  for (i = 1; i < argc; i++)
-    {
-      char *arg = argv[i];
+	/* For portability, parse command line options without getopt_long.  */
+	for (i = 1; i < argc; i++) {
+		char *arg = argv[i];
 
-      if (strcmp (arg, "--help") == 0 || strcmp (arg, "-?") == 0)
-        {
-          usage (0);
-        }
-      else if (strcmp (arg, "--version") == 0)
-        {
-          version (0);
-        }
-      else if (strcmp (arg, "--verbose") == 0 || strcmp (arg, "-v") == 0)
-        {
-          global_debug = 3;
-        }
-      else if (strcmp (arg, "--quiet") == 0 || strcmp (arg, "-q") == 0)
-        {
-          global_debug = 0;
-        }
-      else if (strcmp (arg, "--dry-run") == 0 || strcmp (arg, "-n") == 0)
-        {
-          do_dryrun = 1;
-        }
-      else if (strcmp (arg, "--no-retry") == 0)
-        {
-          global_ignore = 0;
-          dbg (stdout, "turning off ignore of non-critical errors");
-        }
-      else if (strcmp (arg, "--retry-delay") == 0)
-        {
-          assert_arg ("--retry-delay");
-          global_retry = atoll (arg);
-          dbg (stdout, "setting retry delay to %dus\n", global_retry);
-        }
-      else if (strcmp (arg, "--backoff") == 0)
-        {
-          assert_arg ("--backoff");
-          global_backoff = atoll (arg);
-          if (global_backoff < 0)
-            {
-              err (stderr, "invalid backoff factor: %i\n", global_backoff);
-              exit (1);
-            }
-          dbg (stdout, "setting backoff coeffient to %dus\n", global_backoff);
-        }
-      else if (strcmp (arg, "--timeout") == 0 || strcmp (arg, "-t") == 0)
-        {
-          do_timeout = 1;
-          assert_arg ("--timeout");
-          global_timeout = atoll_s (arg);
-          dbg (stdout, "setting timeout to %ds\n", global_timeout);
-        }
-      else if (strcmp (arg, "--cpu") == 0 || strcmp (arg, "-c") == 0)
-        {
-          do_cpu = 1;
-          assert_arg ("--cpu");
-          do_cpu_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--io") == 0 || strcmp (arg, "-i") == 0)
-        {
-          do_io = 1;
-          assert_arg ("--io");
-          do_io_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm") == 0 || strcmp (arg, "-m") == 0)
-        {
-          do_vm = 1;
-          assert_arg ("--vm");
-          do_vm_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-chunks") == 0)
-        {
-          assert_arg ("--vm-chunks");
-          do_vm_chunks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-bytes") == 0)
-        {
-          assert_arg ("--vm-bytes");
-          do_vm_bytes = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--vm-hang") == 0)
-        {
-          global_vmhang = 1;
-        }
-      else if (strcmp (arg, "--hdd") == 0 || strcmp (arg, "-d") == 0)
-        {
-          do_hdd = 1;
-          assert_arg ("--hdd");
-          do_hdd_forks = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--hdd-noclean") == 0)
-        {
-          do_hdd_clean = 2;
-        }
-      else if (strcmp (arg, "--hdd-files") == 0)
-        {
-          assert_arg ("--hdd-files");
-          do_hdd_files = atoll_b (arg);
-        }
-      else if (strcmp (arg, "--hdd-bytes") == 0)
-        {
-          assert_arg ("--hdd-bytes");
-          do_hdd_bytes = atoll_b (arg);
-        }
-      else
-        {
-          err (stderr, "unrecognized option: %s\n", arg);
-          exit (1);
-        }
-    }
+		if (strcmp(arg, "--help") == 0 || strcmp(arg, "-?") == 0) {
+			usage(0);
+		} else if (strcmp(arg, "--version") == 0) {
+			version(0);
+		} else if (strcmp(arg, "--verbose") == 0
+			   || strcmp(arg, "-v") == 0) {
+			global_debug = 3;
+		} else if (strcmp(arg, "--quiet") == 0
+			   || strcmp(arg, "-q") == 0) {
+			global_debug = 0;
+		} else if (strcmp(arg, "--dry-run") == 0
+			   || strcmp(arg, "-n") == 0) {
+			do_dryrun = 1;
+		} else if (strcmp(arg, "--no-retry") == 0) {
+			global_ignore = 0;
+			dbg(stdout,
+			    "turning off ignore of non-critical errors");
+		} else if (strcmp(arg, "--retry-delay") == 0) {
+			assert_arg("--retry-delay");
+			global_retry = atoll(arg);
+			dbg(stdout, "setting retry delay to %dus\n",
+			    global_retry);
+		} else if (strcmp(arg, "--backoff") == 0) {
+			assert_arg("--backoff");
+			global_backoff = atoll(arg);
+			if (global_backoff < 0) {
+				err(stderr, "invalid backoff factor: %i\n",
+				    global_backoff);
+				exit(1);
+			}
+			dbg(stdout, "setting backoff coeffient to %dus\n",
+			    global_backoff);
+		} else if (strcmp(arg, "--timeout") == 0
+			   || strcmp(arg, "-t") == 0) {
+			do_timeout = 1;
+			assert_arg("--timeout");
+			global_timeout = atoll_s(arg);
+			dbg(stdout, "setting timeout to %ds\n", global_timeout);
+		} else if (strcmp(arg, "--cpu") == 0 || strcmp(arg, "-c") == 0) {
+			do_cpu = 1;
+			assert_arg("--cpu");
+			do_cpu_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--io") == 0 || strcmp(arg, "-i") == 0) {
+			do_io = 1;
+			assert_arg("--io");
+			do_io_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm") == 0 || strcmp(arg, "-m") == 0) {
+			do_vm = 1;
+			assert_arg("--vm");
+			do_vm_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-chunks") == 0) {
+			assert_arg("--vm-chunks");
+			do_vm_chunks = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-bytes") == 0) {
+			assert_arg("--vm-bytes");
+			do_vm_bytes = atoll_b(arg);
+		} else if (strcmp(arg, "--vm-hang") == 0) {
+			global_vmhang = 1;
+		} else if (strcmp(arg, "--hdd") == 0 || strcmp(arg, "-d") == 0) {
+			do_hdd = 1;
+			assert_arg("--hdd");
+			do_hdd_forks = atoll_b(arg);
+		} else if (strcmp(arg, "--hdd-noclean") == 0) {
+			do_hdd_clean = 2;
+		} else if (strcmp(arg, "--hdd-files") == 0) {
+			assert_arg("--hdd-files");
+			do_hdd_files = atoll_b(arg);
+		} else if (strcmp(arg, "--hdd-bytes") == 0) {
+			assert_arg("--hdd-bytes");
+			do_hdd_bytes = atoll_b(arg);
+		} else {
+			err(stderr, "unrecognized option: %s\n", arg);
+			exit(1);
+		}
+	}
 
-  /* Hog CPU option.  */
-  if (do_cpu)
-    {
-      out (stdout, "dispatching %lli hogcpu forks\n", do_cpu_forks);
+	/* Hog CPU option.  */
+	if (do_cpu) {
+		out(stdout, "dispatching %lli hogcpu forks\n", do_cpu_forks);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogcpu (do_cpu_forks));
-        case -1:               /* error */
-          err (stderr, "hogcpu dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogcpu dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogcpu(do_cpu_forks));
+		case -1:	/* error */
+			err(stderr, "hogcpu dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogcpu dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog I/O option.  */
-  if (do_io)
-    {
-      out (stdout, "dispatching %lli hogio forks\n", do_io_forks);
+	/* Hog I/O option.  */
+	if (do_io) {
+		out(stdout, "dispatching %lli hogio forks\n", do_io_forks);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogio (do_io_forks));
-        case -1:               /* error */
-          err (stderr, "hogio dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogio dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogio(do_io_forks));
+		case -1:	/* error */
+			err(stderr, "hogio dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogio dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog VM option.  */
-  if (do_vm)
-    {
-      out (stdout,
-           "dispatching %lli hogvm forks, each %lli chunks of %lli bytes\n",
-           do_vm_forks, do_vm_chunks, do_vm_bytes);
+	/* Hog VM option.  */
+	if (do_vm) {
+		out(stdout,
+		    "dispatching %lli hogvm forks, each %lli chunks of %lli bytes\n",
+		    do_vm_forks, do_vm_chunks, do_vm_bytes);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hogvm (do_vm_forks, do_vm_chunks, do_vm_bytes));
-        case -1:               /* error */
-          err (stderr, "hogvm dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hogvm dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hogvm(do_vm_forks, do_vm_chunks, do_vm_bytes));
+		case -1:	/* error */
+			err(stderr, "hogvm dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hogvm dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* Hog HDD option.  */
-  if (do_hdd)
-    {
-      out (stdout, "dispatching %lli hoghdd forks, each %lli files of "
-           "%lli bytes\n", do_hdd_forks, do_hdd_files, do_hdd_bytes);
+	/* Hog HDD option.  */
+	if (do_hdd) {
+		out(stdout, "dispatching %lli hoghdd forks, each %lli files of "
+		    "%lli bytes\n", do_hdd_forks, do_hdd_files, do_hdd_bytes);
 
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          if (do_dryrun)
-            exit (0);
-          exit (hoghdd
-                (do_hdd_forks, do_hdd_clean, do_hdd_files, do_hdd_bytes));
-        case -1:               /* error */
-          err (stderr, "hoghdd dispatcher fork failed\n");
-          exit (1);
-        default:               /* parent */
-          children++;
-          dbg (stdout, "--> hoghdd dispatcher forked (%i)\n", pid);
-        }
-    }
+		switch (pid = fork()) {
+		case 0:	/* child */
+			if (do_dryrun)
+				exit(0);
+			exit(hoghdd
+			     (do_hdd_forks, do_hdd_clean, do_hdd_files,
+			      do_hdd_bytes));
+		case -1:	/* error */
+			err(stderr, "hoghdd dispatcher fork failed\n");
+			exit(1);
+		default:	/* parent */
+			children++;
+			dbg(stdout, "--> hoghdd dispatcher forked (%i)\n", pid);
+		}
+	}
 
-  /* We have no work to do, so bail out.  */
-  if (children == 0)
-    usage (0);
+	/* We have no work to do, so bail out.  */
+	if (children == 0)
+		usage(0);
 
-  /* Wait for our children to exit.  */
-  while (children)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (children) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "dispatcher %i returned error %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- dispatcher return (%i)\n", pid);
-                }
-            }
-          else
-            {
-              err (stderr, "dispatcher did not exit normally\n");
-              ++retval;
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "dispatcher %i returned error %i\n",
+					    pid, ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- dispatcher return (%i)\n",
+					    pid);
+				}
+			} else {
+				err(stderr,
+				    "dispatcher did not exit normally\n");
+				++retval;
+			}
 
-          --children;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing dispatcher children\n");
-          ++retval;
-          break;
-        }
-    }
+			--children;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing dispatcher children\n");
+			++retval;
+			break;
+		}
+	}
 
-  /* Record our stop time.  */
-  if ((stoptime = time (NULL)) == -1)
-    {
-      err (stderr, "failed to acquire current time\n");
-      exit (1);
-    }
+	/* Record our stop time.  */
+	if ((stoptime = time(NULL)) == -1) {
+		err(stderr, "failed to acquire current time\n");
+		exit(1);
+	}
 
-  /* Calculate our runtime.  */
-  runtime = stoptime - starttime;
+	/* Calculate our runtime.  */
+	runtime = stoptime - starttime;
 
-  /* Print final status message.  */
-  if (retval)
-    {
-      err (stderr, "failed run completed in %lis\n", runtime);
-    }
-  else
-    {
-      out (stdout, "successful run completed in %lis\n", runtime);
-    }
+	/* Print final status message.  */
+	if (retval) {
+		err(stderr, "failed run completed in %lis\n", runtime);
+	} else {
+		out(stdout, "successful run completed in %lis\n", runtime);
+	}
 
-  exit (retval);
+	exit(retval);
 }
 
-int
-usage (int status)
+int usage(int status)
 {
-  char *mesg =
-    "`%s' imposes certain types of compute stress on your system\n\n"
-    "Usage: %s [OPTION [ARG]] ...\n\n"
-    " -?, --help            show this help statement\n"
-    "     --version         show version statement\n"
-    " -v, --verbose         be verbose\n"
-    " -q, --quiet           be quiet\n"
-    " -n, --dry-run         show what would have been done\n"
-    "     --no-retry        exit rather than retry non-critical errors\n"
-    "     --retry-delay n   wait n us before continuing past error\n"
-    " -t, --timeout n       timeout after n seconds\n"
-    "     --backoff n       wait for factor of n us before starting work\n"
-    " -c, --cpu n           spawn n procs spinning on sqrt()\n"
-    " -i, --io n            spawn n procs spinning on sync()\n"
-    " -m, --vm n            spawn n procs spinning on malloc()\n"
-    "     --vm-chunks c     malloc c chunks (default is 1)\n"
-    "     --vm-bytes b      malloc chunks of b bytes (default is 256MB)\n"
-    "     --vm-hang         hang in a sleep loop after memory allocated\n"
-    " -d, --hdd n           spawn n procs spinning on write()\n"
-    "     --hdd-noclean     do not unlink file to which random data written\n"
-    "     --hdd-files f     write to f files (default is 1)\n"
-    "     --hdd-bytes b     write b bytes (default is 1GB)\n\n"
-    "Infinity is denoted with 0.  For -m, -d: n=0 means infinite redo,\n"
-    "n<0 means redo abs(n) times. Valid suffixes are m,h,d,y for time;\n"
-    "k,m,g for size.\n\n";
+	char *mesg =
+	    "`%s' imposes certain types of compute stress on your system\n\n"
+	    "Usage: %s [OPTION [ARG]] ...\n\n"
+	    " -?, --help            show this help statement\n"
+	    "     --version         show version statement\n"
+	    " -v, --verbose         be verbose\n"
+	    " -q, --quiet           be quiet\n"
+	    " -n, --dry-run         show what would have been done\n"
+	    "     --no-retry        exit rather than retry non-critical errors\n"
+	    "     --retry-delay n   wait n us before continuing past error\n"
+	    " -t, --timeout n       timeout after n seconds\n"
+	    "     --backoff n       wait for factor of n us before starting work\n"
+	    " -c, --cpu n           spawn n procs spinning on sqrt()\n"
+	    " -i, --io n            spawn n procs spinning on sync()\n"
+	    " -m, --vm n            spawn n procs spinning on malloc()\n"
+	    "     --vm-chunks c     malloc c chunks (default is 1)\n"
+	    "     --vm-bytes b      malloc chunks of b bytes (default is 256MB)\n"
+	    "     --vm-hang         hang in a sleep loop after memory allocated\n"
+	    " -d, --hdd n           spawn n procs spinning on write()\n"
+	    "     --hdd-noclean     do not unlink file to which random data written\n"
+	    "     --hdd-files f     write to f files (default is 1)\n"
+	    "     --hdd-bytes b     write b bytes (default is 1GB)\n\n"
+	    "Infinity is denoted with 0.  For -m, -d: n=0 means infinite redo,\n"
+	    "n<0 means redo abs(n) times. Valid suffixes are m,h,d,y for time;\n"
+	    "k,m,g for size.\n\n";
 
-  fprintf (stdout, mesg, global_progname, global_progname);
+	fprintf(stdout, mesg, global_progname, global_progname);
 
-  if (status <= 0)
-    exit (-1 * status);
+	if (status <= 0)
+		exit(-1 * status);
 
-  return 0;
+	return 0;
 }
 
-int
-version (int status)
+int version(int status)
 {
-  char *mesg = "%s %s\n";
+	char *mesg = "%s %s\n";
 
-  fprintf (stdout, mesg, global_progname, VERSION);
+	fprintf(stdout, mesg, global_progname, VERSION);
 
-  if (status <= 0)
-    exit (-1 * status);
+	if (status <= 0)
+		exit(-1 * status);
 
-  return 0;
+	return 0;
 }
 
 /* Convert a string representation of a number with an optional size suffix
  * to a long long.
  */
-long long
-atoll_b (const char *nptr)
+long long atoll_b(const char *nptr)
 {
-  int pos;
-  char suffix;
-  long long factor = 1;
+	int pos;
+	char suffix;
+	long long factor = 1;
 
-  if ((pos = strlen (nptr) - 1) < 0)
-    {
-      err (stderr, "invalid string\n");
-      exit (1);
-    }
+	if ((pos = strlen(nptr) - 1) < 0) {
+		err(stderr, "invalid string\n");
+		exit(1);
+	}
 
-  switch (suffix = nptr[pos])
-    {
-    case 'k':
-    case 'K':
-      factor = 1024;
-      break;
-    case 'm':
-    case 'M':
-      factor = 1024 * 1024;
-      break;
-    case 'g':
-    case 'G':
-      factor = 1024 * 1024 * 1024;
-      break;
-    default:
-      if (suffix < '0' || suffix > '9')
-        {
-          err (stderr, "unrecognized suffix: %c\n", suffix);
-          exit (1);
-        }
-    }
+	switch (suffix = nptr[pos]) {
+	case 'k':
+	case 'K':
+		factor = 1024;
+		break;
+	case 'm':
+	case 'M':
+		factor = 1024 * 1024;
+		break;
+	case 'g':
+	case 'G':
+		factor = 1024 * 1024 * 1024;
+		break;
+	default:
+		if (suffix < '0' || suffix > '9') {
+			err(stderr, "unrecognized suffix: %c\n", suffix);
+			exit(1);
+		}
+	}
 
-  factor = atoll (nptr) * factor;
+	factor = atoll(nptr) * factor;
 
-  return factor;
+	return factor;
 }
 
 /* Convert a string representation of a number with an optional time suffix
  * to a long long.
  */
-long long
-atoll_s (const char *nptr)
+long long atoll_s(const char *nptr)
 {
-  int pos;
-  char suffix;
-  long long factor = 1;
+	int pos;
+	char suffix;
+	long long factor = 1;
 
-  if ((pos = strlen (nptr) - 1) < 0)
-    {
-      err (stderr, "invalid string\n");
-      exit (1);
-    }
+	if ((pos = strlen(nptr) - 1) < 0) {
+		err(stderr, "invalid string\n");
+		exit(1);
+	}
 
-  switch (suffix = nptr[pos])
-    {
-    case 's':
-    case 'S':
-      factor = 1;
-      break;
-    case 'm':
-    case 'M':
-      factor = 60;
-      break;
-    case 'h':
-    case 'H':
-      factor = 60 * 60;
-      break;
-    case 'd':
-    case 'D':
-      factor = 60 * 60 * 24;
-      break;
-    case 'y':
-    case 'Y':
-      factor = 60 * 60 * 24 * 360;
-      break;
-    default:
-      if (suffix < '0' || suffix > '9')
-        {
-          err (stderr, "unrecognized suffix: %c\n", suffix);
-          exit (1);
-        }
-    }
+	switch (suffix = nptr[pos]) {
+	case 's':
+	case 'S':
+		factor = 1;
+		break;
+	case 'm':
+	case 'M':
+		factor = 60;
+		break;
+	case 'h':
+	case 'H':
+		factor = 60 * 60;
+		break;
+	case 'd':
+	case 'D':
+		factor = 60 * 60 * 24;
+		break;
+	case 'y':
+	case 'Y':
+		factor = 60 * 60 * 24 * 360;
+		break;
+	default:
+		if (suffix < '0' || suffix > '9') {
+			err(stderr, "unrecognized suffix: %c\n", suffix);
+			exit(1);
+		}
+	}
 
-  factor = atoll (nptr) * factor;
+	factor = atoll(nptr) * factor;
 
-  return factor;
+	return factor;
 }
 
-int
-hogcpu (long long forks)
+int hogcpu(long long forks)
 {
-  long long i;
-  double d;
-  int pid, retval = 0;
+	long long i;
+	double d;
+	int pid, retval = 0;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogcpu\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogcpu\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            d = sqrt (rand ());
+			while (1)
+				d = sqrt(rand());
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogcpu worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogcpu worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogcpu worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogcpu worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogcpu worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogcpu worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogcpu worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogcpu worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogcpu worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogcpu worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogcpu worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout,
+				    "<-- hogcpu worker signalled (%i)\n", pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogcpu worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr,
+			    "detected missing hogcpu worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hogio (long long forks)
+int hogio(long long forks)
 {
-  long long i;
-  int pid, retval = 0;
+	long long i;
+	int pid, retval = 0;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogio\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogio\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            sync ();
+			while (1)
+				sync();
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogio worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogio worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogio worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogio worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogio worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogio worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogio worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogio worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogio worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogio worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogio worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout, "<-- hogio worker signalled (%i)\n",
+				    pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogio worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing hogio worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hogvm (long long forks, long long chunks, long long bytes)
+int hogvm(long long forks, long long chunks, long long bytes)
 {
-  long long i, j, k;
-  int pid, retval = 0;
-  char **ptr;
+	long long i, j, k;
+	int pid, retval = 0;
+	char **ptr;
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  dbg (stdout, "using backoff sleep of %lius for hogvm\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hogvm\n", backoff);
 
-  if (bytes == 0)
-    {
-      /* 512MB is guess at the largest value can than be malloced at once.  */
-      bytes = 512 * 1024 * 1024;
-    }
+	if (bytes == 0) {
+		/* 512MB is guess at the largest value can than be malloced at once.  */
+		bytes = 512 * 1024 * 1024;
+	}
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            {
-              ptr = (char **) malloc ( chunks * 2);
-              for (j = 0; chunks == 0 || j < chunks; j++)
-                {
-                  if ((ptr[j] = (char *) malloc (bytes * sizeof (char))))
-                    {
-                      for (k = 0; k < bytes; k++)
-                        ptr[j][k] = 'Z';   /* Ensure that COW happens.  */
-                      dbg (stdout, "hogvm worker malloced %lli bytes\n", k);
-                    }
-                  else if (ignore)
-                    {
-                      ++retval;
-                      wrn (stderr, "hogvm malloc failed, continuing\n");
-                      usleep (retry);
-                      continue;
-                    }
-                  else
-                    {
-                      ++retval;
-                      err (stderr, "hogvm malloc failed\n");
-                      break;
-                    }
-                }
-              if (global_vmhang && retval == 0)
-                {
-                  dbg (stdout, "sleeping forever with allocated memory\n");
-                  while (1)
-                    sleep (1024);
-                }
-              if (retval == 0)
-                {
-                  dbg (stdout,
-                       "hogvm worker freeing memory and starting over\n");
-                  for (j = 0; chunks == 0 || j < chunks; j++) {
-                      free (ptr[j]);
-                  }
-                  free(ptr);
-                  continue;
-                }
+			while (1) {
+				ptr = (char **)malloc(chunks * 2);
+				for (j = 0; chunks == 0 || j < chunks; j++) {
+					if ((ptr[j] =
+					     (char *)malloc(bytes *
+							    sizeof(char)))) {
+						for (k = 0; k < bytes; k++)
+							ptr[j][k] = 'Z';	/* Ensure that COW happens.  */
+						dbg(stdout,
+						    "hogvm worker malloced %lli bytes\n",
+						    k);
+					} else if (ignore) {
+						++retval;
+						wrn(stderr,
+						    "hogvm malloc failed, continuing\n");
+						usleep(retry);
+						continue;
+					} else {
+						++retval;
+						err(stderr,
+						    "hogvm malloc failed\n");
+						break;
+					}
+				}
+				if (global_vmhang && retval == 0) {
+					dbg(stdout,
+					    "sleeping forever with allocated memory\n");
+					while (1)
+						sleep(1024);
+				}
+				if (retval == 0) {
+					dbg(stdout,
+					    "hogvm worker freeing memory and starting over\n");
+					for (j = 0; chunks == 0 || j < chunks;
+					     j++) {
+						free(ptr[j]);
+					}
+					free(ptr);
+					continue;
+				}
 
-              exit (retval);
-            }
+				exit(retval);
+			}
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hogvm worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hogvm worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hogvm worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hogvm worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hogvm worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hogvm worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hogvm worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hogvm worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hogvm worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hogvm worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hogvm worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout, "<-- hogvm worker signalled (%i)\n",
+				    pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hogvm worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr, "detected missing hogvm worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
 
-int
-hoghdd (long long forks, int clean, long long files, long long bytes)
+int hoghdd(long long forks, int clean, long long files, long long bytes)
 {
-  long long i, j;
-  int fd, pid, retval = 0;
-  int chunk = (1024 * 1024) - 1;        /* Minimize slow writing.  */
-  char buff[chunk];
+	long long i, j;
+	int fd, pid, retval = 0;
+	int chunk = (1024 * 1024) - 1;	/* Minimize slow writing.  */
+	char buff[chunk];
 
-  /* Make local copies of global variables.  */
-  int ignore = global_ignore;
-  int retry = global_retry;
-  int timeout = global_timeout;
-  long backoff = global_backoff * forks;
+	/* Make local copies of global variables.  */
+	int ignore = global_ignore;
+	int retry = global_retry;
+	int timeout = global_timeout;
+	long backoff = global_backoff * forks;
 
-  /* Initialize buffer with some random ASCII data.  */
-  dbg (stdout, "seeding buffer with random data\n");
-  for (i = 0; i < chunk - 1; i++)
-    {
-      j = rand ();
-      j = (j < 0) ? -j : j;
-      j %= 95;
-      j += 32;
-      buff[i] = j;
-    }
-  buff[i] = '\n';
+	/* Initialize buffer with some random ASCII data.  */
+	dbg(stdout, "seeding buffer with random data\n");
+	for (i = 0; i < chunk - 1; i++) {
+		j = rand();
+		j = (j < 0) ? -j : j;
+		j %= 95;
+		j += 32;
+		buff[i] = j;
+	}
+	buff[i] = '\n';
 
-  dbg (stdout, "using backoff sleep of %lius for hoghdd\n", backoff);
+	dbg(stdout, "using backoff sleep of %lius for hoghdd\n", backoff);
 
-  for (i = 0; forks == 0 || i < forks; i++)
-    {
-      switch (pid = fork ())
-        {
-        case 0:                /* child */
-          alarm (timeout);
+	for (i = 0; forks == 0 || i < forks; i++) {
+		switch (pid = fork()) {
+		case 0:	/* child */
+			alarm(timeout);
 
-          /* Use a backoff sleep to ensure we get good fork throughput.  */
-          usleep (backoff);
+			/* Use a backoff sleep to ensure we get good fork throughput.  */
+			usleep(backoff);
 
-          while (1)
-            {
-              for (i = 0; i < files; i++)
-                {
-                  char name[] = "./stress.XXXXXX";
+			while (1) {
+				for (i = 0; i < files; i++) {
+					char name[] = "./stress.XXXXXX";
 
-                  if ((fd = mkstemp (name)) < 0)
-                    {
-                      perror ("mkstemp");
-                      err (stderr, "mkstemp failed\n");
-                      exit (1);
-                    }
+					if ((fd = mkstemp(name)) < 0) {
+						perror("mkstemp");
+						err(stderr, "mkstemp failed\n");
+						exit(1);
+					}
 
-                  if (clean == 0)
-                    {
-                      dbg (stdout, "unlinking %s\n", name);
-                      if (unlink (name))
-                        {
-                          err (stderr, "unlink failed\n");
-                          exit (1);
-                        }
-                    }
+					if (clean == 0) {
+						dbg(stdout, "unlinking %s\n",
+						    name);
+						if (unlink(name)) {
+							err(stderr,
+							    "unlink failed\n");
+							exit(1);
+						}
+					}
 
-                  dbg (stdout, "fast writing to %s\n", name);
-                  for (j = 0; bytes == 0 || j + chunk < bytes; j += chunk)
-                    {
-                      if (write (fd, buff, chunk) != chunk)
-                        {
-                          err (stderr, "write failed\n");
-                          exit (1);
-                        }
-                    }
+					dbg(stdout, "fast writing to %s\n",
+					    name);
+					for (j = 0;
+					     bytes == 0 || j + chunk < bytes;
+					     j += chunk) {
+						if (write(fd, buff, chunk) !=
+						    chunk) {
+							err(stderr,
+							    "write failed\n");
+							exit(1);
+						}
+					}
 
-                  dbg (stdout, "slow writing to %s\n", name);
-                  for (; bytes == 0 || j < bytes - 1; j++)
-                    {
-                      if (write (fd, "Z", 1) != 1)
-                        {
-                          err (stderr, "write failed\n");
-                          exit (1);
-                        }
-                    }
-                  if (write (fd, "\n", 1) != 1)
-                    {
-                      err (stderr, "write failed\n");
-                      exit (1);
-                    }
-                  ++j;
+					dbg(stdout, "slow writing to %s\n",
+					    name);
+					for (; bytes == 0 || j < bytes - 1; j++) {
+						if (write(fd, "Z", 1) != 1) {
+							err(stderr,
+							    "write failed\n");
+							exit(1);
+						}
+					}
+					if (write(fd, "\n", 1) != 1) {
+						err(stderr, "write failed\n");
+						exit(1);
+					}
+					++j;
 
-                  dbg (stdout, "closing %s after writing %lli bytes\n", name,
-                       j);
-                  close (fd);
+					dbg(stdout,
+					    "closing %s after writing %lli bytes\n",
+					    name, j);
+					close(fd);
 
-                  if (clean == 1)
-                    {
-                      if (unlink (name))
-                        {
-                          err (stderr, "unlink failed\n");
-                          exit (1);
-                        }
-                    }
-                }
-              if (retval == 0)
-                {
-                  dbg (stdout, "hoghdd worker starting over\n");
-                  continue;
-                }
+					if (clean == 1) {
+						if (unlink(name)) {
+							err(stderr,
+							    "unlink failed\n");
+							exit(1);
+						}
+					}
+				}
+				if (retval == 0) {
+					dbg(stdout,
+					    "hoghdd worker starting over\n");
+					continue;
+				}
 
-              exit (retval);
-            }
+				exit(retval);
+			}
 
-          /* This case never falls through; alarm signal can cause exit.  */
-        case -1:               /* error */
-          if (ignore)
-            {
-              ++retval;
-              wrn (stderr, "hoghdd worker fork failed, continuing\n");
-              usleep (retry);
-              continue;
-            }
+			/* This case never falls through; alarm signal can cause exit.  */
+		case -1:	/* error */
+			if (ignore) {
+				++retval;
+				wrn(stderr,
+				    "hoghdd worker fork failed, continuing\n");
+				usleep(retry);
+				continue;
+			}
 
-          err (stderr, "hoghdd worker fork failed\n");
-          return 1;
-        default:               /* parent */
-          dbg (stdout, "--> hoghdd worker forked (%i)\n", pid);
-        }
-    }
+			err(stderr, "hoghdd worker fork failed\n");
+			return 1;
+		default:	/* parent */
+			dbg(stdout, "--> hoghdd worker forked (%i)\n", pid);
+		}
+	}
 
-  /* Wait for our children to exit.  */
-  while (i)
-    {
-      int status, ret;
+	/* Wait for our children to exit.  */
+	while (i) {
+		int status, ret;
 
-      if ((pid = wait (&status)) > 0)
-        {
-          if ((WIFEXITED (status)) != 0)
-            {
-              if ((ret = WEXITSTATUS (status)) != 0)
-                {
-                  err (stderr, "hoghdd worker %i exited %i\n", pid, ret);
-                  retval += ret;
-                }
-              else
-                {
-                  dbg (stdout, "<-- hoghdd worker exited (%i)\n", pid);
-                }
-            }
-          else
-            {
-              dbg (stdout, "<-- hoghdd worker signalled (%i)\n", pid);
-            }
+		if ((pid = wait(&status)) > 0) {
+			if ((WIFEXITED(status)) != 0) {
+				if ((ret = WEXITSTATUS(status)) != 0) {
+					err(stderr,
+					    "hoghdd worker %i exited %i\n", pid,
+					    ret);
+					retval += ret;
+				} else {
+					dbg(stdout,
+					    "<-- hoghdd worker exited (%i)\n",
+					    pid);
+				}
+			} else {
+				dbg(stdout,
+				    "<-- hoghdd worker signalled (%i)\n", pid);
+			}
 
-          --i;
-        }
-      else
-        {
-          dbg (stdout, "wait() returned error: %s\n", strerror (errno));
-          err (stderr, "detected missing hoghdd worker children\n");
-          ++retval;
-          break;
-        }
-    }
+			--i;
+		} else {
+			dbg(stdout, "wait() returned error: %s\n",
+			    strerror(errno));
+			err(stderr,
+			    "detected missing hoghdd worker children\n");
+			++retval;
+			break;
+		}
+	}
 
-  return retval;
+	return retval;
 }
diff --git a/tools/gethost.c b/tools/gethost.c
index 8e64808..5b9a790 100644
--- a/tools/gethost.c
+++ b/tools/gethost.c
@@ -21,10 +21,9 @@
 #define LOG_PERROR 0
 #endif
 
-int
-main(argc, argv)
-	int argc;
-	char **argv;
+int main(argc, argv)
+int argc;
+char **argv;
 {
 	u_char b_addr[IN6ADDRSZ];
 	struct hostent *host;
@@ -35,11 +34,12 @@
 	int force = 0;
 
 	if (argc < 1) {
- usage:
+usage:
 		printf("usage:  %s [-d] [-6] [-f] (hostname|ipaddr)\n", prog);
 		exit(1);
 	}
-	prog = *argv++; argc--;
+	prog = *argv++;
+	argc--;
 #ifdef LOG_USER
 	openlog(prog, LOG_PERROR, LOG_USER);
 #else
@@ -63,13 +63,14 @@
 
 	if (argc < 1)
 		goto usage;
-	arg = *argv++; argc--;
+	arg = *argv++;
+	argc--;
 
 	if (inet_pton(af, arg, b_addr)) {
 		char p[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
 
 		printf("[%s]\n", inet_ntop(af, b_addr, p, sizeof p));
-		if (!(host = gethostbyaddr((char*)b_addr, size, af))) {
+		if (!(host = gethostbyaddr((char *)b_addr, size, af))) {
 			herror("gethostbyaddr");
 			exit(1);
 		}
@@ -87,7 +88,7 @@
 	printf("name: %s\n", host->h_name);
 	if (host->h_aliases && *host->h_aliases) {
 		printf("aliases:");
-		for (cp = (char **) host->h_aliases; *cp; cp++)
+		for (cp = (char **)host->h_aliases; *cp; cp++)
 			printf(" %s", *cp);
 		printf("\n");
 	}
@@ -95,13 +96,12 @@
 		printf("addresses:");
 		for (ap = host->h_addr_list; *ap; ap++) {
 			char p[sizeof
-			       "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"
-			      ];
+			       "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
 
 			printf(" %s", inet_ntop(host->h_addrtype,
 						*ap, p, sizeof p));
 		}
 		printf("\n");
 	}
-exit(0);
+	exit(0);
 }
diff --git a/tools/netpipe-2.4-ipv6/MPI.c b/tools/netpipe-2.4-ipv6/MPI.c
index e9d3bfc..75b6286 100644
--- a/tools/netpipe-2.4-ipv6/MPI.c
+++ b/tools/netpipe-2.4-ipv6/MPI.c
@@ -18,45 +18,42 @@
 #define MAXBUFSIZE (10*1024*1024)
 #endif
 
-
-int Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
-    int nproc;
+	int nproc;
 
-    MPI_Comm_rank(MPI_COMM_WORLD, &p->prot.iproc);
-    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
-    {
-        char s[255];
-        gethostname(s,253);
-        printf("%d: %s\n",p->prot.iproc,s);
-        fflush(stdout);
-    }
-    p->prot.nbor = !p->prot.iproc;
+	MPI_Comm_rank(MPI_COMM_WORLD, &p->prot.iproc);
+	MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+	{
+		char s[255];
+		gethostname(s, 253);
+		printf("%d: %s\n", p->prot.iproc, s);
+		fflush(stdout);
+	}
+	p->prot.nbor = !p->prot.iproc;
 
-    if (nproc != 2)
-    {
-	printf("Need two processes\n");
-	exit(-2);
-    }
+	if (nproc != 2) {
+		printf("Need two processes\n");
+		exit(-2);
+	}
 
-    if (p->prot.iproc == 0)
-	p->tr = 1;
-    else
-	p->tr = 0;
+	if (p->prot.iproc == 0)
+		p->tr = 1;
+	else
+		p->tr = 0;
 
 #ifdef BSEND
-    messbuff = (char *)malloc(MAXBUFSIZE * sizeof(char));
-    if (messbuff == NULL)
-    {
-        printf("Can't allocate for message buffer\n");
-        exit(-1);
-    }
-    MPI_Buffer_attach(messbuff, MAXBUFSIZE);
+	messbuff = (char *)malloc(MAXBUFSIZE * sizeof(char));
+	if (messbuff == NULL) {
+		printf("Can't allocate for message buffer\n");
+		exit(-1);
+	}
+	MPI_Buffer_attach(messbuff, MAXBUFSIZE);
 #endif
 
 }
 
-void Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
 	MPI_Barrier(MPI_COMM_WORLD);
 }
@@ -64,50 +61,47 @@
 static int recvPosted = 0;
 static MPI_Request recvRequest;
 
-void PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 	/*
-	  Providing a buffer for reception of data in advance of
-	  the sender sending the data provides a major performance
-	  boost on some implementations of MPI, particularly shared
-	  memory implementations on the Cray T3E and Intel Paragon.
-	*/
-	if (recvPosted)
-	{
-	    printf("Can't prepare to receive: outstanding receive!\n");
-	    exit(-1);
+	   Providing a buffer for reception of data in advance of
+	   the sender sending the data provides a major performance
+	   boost on some implementations of MPI, particularly shared
+	   memory implementations on the Cray T3E and Intel Paragon.
+	 */
+	if (recvPosted) {
+		printf("Can't prepare to receive: outstanding receive!\n");
+		exit(-1);
 	}
 	MPI_Irecv(p->buff, p->bufflen, MPI_BYTE,
 		  p->prot.nbor, 1, MPI_COMM_WORLD, &recvRequest);
 	recvPosted = -1;
 }
 
-void SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
 #ifdef BSEND
-	MPI_Bsend(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1, MPI_COMM_WORLD);
+	MPI_Bsend(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1,
+		  MPI_COMM_WORLD);
 #else
-	MPI_Send(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1, MPI_COMM_WORLD);
+	MPI_Send(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1,
+		 MPI_COMM_WORLD);
 #endif
 }
 
-void RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
 	MPI_Status status;
-	if (recvPosted)
-	{
+	if (recvPosted) {
 		MPI_Wait(&recvRequest, &status);
 		recvPosted = 0;
-	}
-	else
-	{
+	} else {
 		MPI_Recv(p->buff, p->bufflen, MPI_BYTE,
-				p->prot.nbor, 1, MPI_COMM_WORLD, &status);
+			 p->prot.nbor, 1, MPI_COMM_WORLD, &status);
 	}
 }
 
-
-void SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
 #ifdef BSEND
 	MPI_Bsend(t, 1, MPI_DOUBLE, p->prot.nbor, 2, MPI_COMM_WORLD);
@@ -116,15 +110,14 @@
 #endif
 }
 
-void RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
 	MPI_Status status;
 
 	MPI_Recv(t, 1, MPI_DOUBLE, p->prot.nbor, 2, MPI_COMM_WORLD, &status);
 }
 
-
-void SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
 #ifdef BSEND
 	MPI_Bsend(&rpt, 1, MPI_INT, p->prot.nbor, 2, MPI_COMM_WORLD);
@@ -133,19 +126,18 @@
 #endif
 }
 
-void RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
 	MPI_Status status;
 
 	MPI_Recv(rpt, 1, MPI_INT, p->prot.nbor, 2, MPI_COMM_WORLD, &status);
 }
 
-
-int Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
 }
 
-int  CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
 	MPI_Finalize();
 }
diff --git a/tools/netpipe-2.4-ipv6/PVM.c b/tools/netpipe-2.4-ipv6/PVM.c
index 119e0a5..3ac561e 100644
--- a/tools/netpipe-2.4-ipv6/PVM.c
+++ b/tools/netpipe-2.4-ipv6/PVM.c
@@ -13,17 +13,15 @@
 #include    "netpipe.h"
 #include    <pvm3.h>
 
-
 /**********************************************************************/
 /* Set up the communcations system.                                   */
 /*    In pvm, this means to join the parallel machine                 */
 /**********************************************************************/
-int
-Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
-    p->prot.mytid = pvm_mytid();
+	p->prot.mytid = pvm_mytid();
 #ifdef DEBUG
-    printf("My task id is %d \n",p->prot.mytid);
+	printf("My task id is %d \n", p->prot.mytid);
 #endif
 }
 
@@ -34,77 +32,77 @@
 /*    starting it by hand on the other machine, we don't know what    */
 /*    the other task id is.                                           */
 /**********************************************************************/
-int
-Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
-    /* Task information for the entire parallel machine (if trans) */
-    int                     tasks_status;
-    struct pvmtaskinfo      *taskp;
-    int                     ntasks;
+	/* Task information for the entire parallel machine (if trans) */
+	int tasks_status;
+	struct pvmtaskinfo *taskp;
+	int ntasks;
 
-        /* Received buffer (if receiver)  */
-    int buffer_id;
+	/* Received buffer (if receiver)  */
+	int buffer_id;
 
-    /*
-    If we are the transmitting side, go find the other one and send
-    it a message containing our tid. If we are the receiving side,
-    just wait for a message.
-    */
-    if (p->tr) {
+	/*
+	   If we are the transmitting side, go find the other one and send
+	   it a message containing our tid. If we are the receiving side,
+	   just wait for a message.
+	 */
+	if (p->tr) {
 #ifdef DEBUG
-	printf("this is the transmitter\n");
+		printf("this is the transmitter\n");
 #endif
-	tasks_status = pvm_tasks( 0, &ntasks, &taskp );
-	if (ntasks != 2) {
-	    printf("Error, too many processes in parallel machine \n");
-	    printf("Start a clean machine.  n=%d\n", ntasks);
-	    exit(-1);
-	}
+		tasks_status = pvm_tasks(0, &ntasks, &taskp);
+		if (ntasks != 2) {
+			printf
+			    ("Error, too many processes in parallel machine \n");
+			printf("Start a clean machine.  n=%d\n", ntasks);
+			exit(-1);
+		}
 
-	/* Since there are two tasks, one is ours the other is the receiver */
-	p->prot.othertid = -1;
-	if (taskp[0].ti_tid == p->prot.mytid) {
-	    p->prot.othertid = taskp[1].ti_tid;
-	}
-	if (taskp[1].ti_tid == p->prot.mytid) {
-	    p->prot.othertid = taskp[0].ti_tid;
-	}
-	if (p->prot.othertid == -1) {
-	    printf("Error, cannot find other (receiving) task \n");
-	    printf("Id's:  %d %d  \n",taskp[0].ti_tid,taskp[1].ti_tid);
-	}
+		/* Since there are two tasks, one is ours the other is the receiver */
+		p->prot.othertid = -1;
+		if (taskp[0].ti_tid == p->prot.mytid) {
+			p->prot.othertid = taskp[1].ti_tid;
+		}
+		if (taskp[1].ti_tid == p->prot.mytid) {
+			p->prot.othertid = taskp[0].ti_tid;
+		}
+		if (p->prot.othertid == -1) {
+			printf("Error, cannot find other (receiving) task \n");
+			printf("Id's:  %d %d  \n", taskp[0].ti_tid,
+			       taskp[1].ti_tid);
+		}
 
-	/* Send the receiver a message.  Tell pvm to keep the channel open */
+		/* Send the receiver a message.  Tell pvm to keep the channel open */
 
 #ifdef DEBUG
-	printf("The receiver tid is %d \n",p->prot.othertid);
+		printf("The receiver tid is %d \n", p->prot.othertid);
 #endif
-	pvm_setopt( PvmRoute, PvmRouteDirect );
-	pvm_initsend( PVMDATA );
-	pvm_pkint( &p->prot.mytid, 1, 1 );
-	pvm_send( p->prot.othertid, 1 );
-    } else {
+		pvm_setopt(PvmRoute, PvmRouteDirect);
+		pvm_initsend(PVMDATA);
+		pvm_pkint(&p->prot.mytid, 1, 1);
+		pvm_send(p->prot.othertid, 1);
+	} else {
 #ifdef DEBUG
-	printf("This is the receiver \n");
+		printf("This is the receiver \n");
 #endif
 
-	/* Receive any message from any task */
-	buffer_id = pvm_recv(-1, -1);
+		/* Receive any message from any task */
+		buffer_id = pvm_recv(-1, -1);
 
-	if (buffer_id < 0) {
-	    printf("Error on receive in receiver\n");
-	    exit(-1);
+		if (buffer_id < 0) {
+			printf("Error on receive in receiver\n");
+			exit(-1);
+		}
+		pvm_upkint(&p->prot.othertid, 1, 1);
 	}
-	pvm_upkint( &p->prot.othertid, 1, 1 );
-    }
 }
 
 /**********************************************************************/
 /* Prepare to receive                                                 */
 /*    In pvm, you cannot set up a reception buffer ahead of time      */
 /**********************************************************************/
-void
-PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 }
 
@@ -112,8 +110,7 @@
 /* Synchronize                                                        */
 /*     In pvm, this is not necessary                                  */
 /**********************************************************************/
-void
-Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
 }
 
@@ -121,82 +118,75 @@
 /* Send a buffer full of information                                  */
 /*    In pvm, we use pvm_pkbyte and then send it.                     */
 /**********************************************************************/
-void
-SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
 #ifdef DEBUG
-    printf(" In send \n");
+	printf(" In send \n");
 #endif
-    pvm_initsend( PVMDATA );
-    pvm_pkbyte( p->buff, p->bufflen, 1 );
-    pvm_send( p->prot.othertid, 1 );
+	pvm_initsend(PVMDATA);
+	pvm_pkbyte(p->buff, p->bufflen, 1);
+	pvm_send(p->prot.othertid, 1);
 #ifdef DEBUG
-    printf(" message sent.  Size=%d\n",p->bufflen);
+	printf(" message sent.  Size=%d\n", p->bufflen);
 #endif
 }
 
 /**********************************************************************/
 /* Receive a buffer full of information                               */
 /**********************************************************************/
-void
-RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
 #ifdef DEBUG
-    printf(" In receive \n");
+	printf(" In receive \n");
 #endif
-    pvm_recv( -1, -1);
-    pvm_upkbyte( p->buff, p->bufflen, 1);
+	pvm_recv(-1, -1);
+	pvm_upkbyte(p->buff, p->bufflen, 1);
 #ifdef DEBUG
-    printf(" message received .  Size=%d \n", p->bufflen);
+	printf(" message received .  Size=%d \n", p->bufflen);
 #endif
 }
 
 /**********************************************************************/
 /* Send elapsed time to the other process                             */
 /**********************************************************************/
-void
-SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
-    pvm_initsend( PVMDATA );
-    pvm_pkdouble( t, 1, 1 );
-    pvm_send( p->prot.othertid, 1);
+	pvm_initsend(PVMDATA);
+	pvm_pkdouble(t, 1, 1);
+	pvm_send(p->prot.othertid, 1);
 }
 
 /**********************************************************************/
 /* Receive elapsed time from the other process                        */
 /**********************************************************************/
-void
-RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
-    pvm_recv(-1, -1);
-    pvm_upkdouble( t, 1, 1 );
+	pvm_recv(-1, -1);
+	pvm_upkdouble(t, 1, 1);
 }
 
 /**********************************************************************/
 /* Send repeat count to the other process                             */
 /**********************************************************************/
-void
-SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
-    pvm_initsend( PVMDATA );
-    pvm_pkint( &rpt, 1, 1 );
-    pvm_send( p->prot.othertid, 1);
+	pvm_initsend(PVMDATA);
+	pvm_pkint(&rpt, 1, 1);
+	pvm_send(p->prot.othertid, 1);
 }
 
 /**********************************************************************/
 /* Receiver repeat count from other process                           */
 /**********************************************************************/
-void
-RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
-    pvm_recv(-1, -1);
-    pvm_upkint( rpt, 1, 1 );
+	pvm_recv(-1, -1);
+	pvm_upkint(rpt, 1, 1);
 }
 
 /**********************************************************************/
 /* Close down the connection.
 /**********************************************************************/
-int
-CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
 }
diff --git a/tools/netpipe-2.4-ipv6/TCP.c b/tools/netpipe-2.4-ipv6/TCP.c
index 47e71cf..c4967a2 100644
--- a/tools/netpipe-2.4-ipv6/TCP.c
+++ b/tools/netpipe-2.4-ipv6/TCP.c
@@ -14,368 +14,371 @@
 /*****************************************************************************/
 #include    "netpipe.h"
 
-
-int Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
 
- int tr, one = 1;                 /* tr==1 if process is a transmitter */
- int sr = 0;
- int sockfd;
- struct sockaddr *lsin1;
- char *host;
- char *server_host;
- struct addrinfo *addr;
- struct addrinfo *server_addr;
- struct addrinfo hints;
- struct protoent *proto;
+	int tr, one = 1;	/* tr==1 if process is a transmitter */
+	int sr = 0;
+	int sockfd;
+	struct sockaddr *lsin1;
+	char *host;
+	char *server_host;
+	struct addrinfo *addr;
+	struct addrinfo *server_addr;
+	struct addrinfo hints;
+	struct protoent *proto;
 
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_INET6;
+	memset(&hints, 0, sizeof(hints));
+	hints.ai_family = AF_INET6;
 
+	host = p->host;		/* copy ptr to hostname */
+	server_host = p->server_host;	/* copy ptr to server */
 
- host = p->host;                           /* copy ptr to hostname */
- server_host = p->server_host;             /* copy ptr to server */
+	tr = p->tr;		/* copy tr indicator */
+	sr = p->sr;
 
- tr = p->tr;                               /* copy tr indicator */
- sr = p->sr;
+	memset(&p->prot.sin1, 0, sizeof(p->prot.sin1));
+	memset(&p->prot.sin2, 0, sizeof(p->prot.sin2));
 
+	if ((sockfd = socket(AF_INET6, SOCK_STREAM, 0)) < 0) {
+		printf("NetPIPE: can't open stream socket! errno=%d\n", errno);
+		exit(-4);
+	}
 
- memset(&p->prot.sin1, 0, sizeof(p->prot.sin1));
- memset(&p->prot.sin2, 0, sizeof(p->prot.sin2));
+	if (!(proto = getprotobyname("tcp"))) {
+		printf("NetPIPE: protocol 'tcp' unknown!\n");
+		exit(555);
+	}
 
- if ((sockfd = socket(AF_INET6, SOCK_STREAM, 0)) < 0) {
-   printf("NetPIPE: can't open stream socket! errno=%d\n", errno);
-   exit(-4);
- }
+	/* Attempt to set TCP_NODELAY */
+	if (setsockopt(sockfd, proto->p_proto, TCP_NODELAY, &one, sizeof(one)) <
+	    0) {
+		printf("NetPIPE: setsockopt: TCP_NODELAY failed! errno=%d\n",
+		       errno);
+		exit(556);
+	}
 
- if (!(proto = getprotobyname("tcp"))) {
-   printf("NetPIPE: protocol 'tcp' unknown!\n");
-   exit(555);
- }
+	/* If requested, set the send and receive buffer sizes */
+	if (p->prot.sndbufsz > 0) {
+		printf("Send and Receive Buffers set to %d bytes\n",
+		       p->prot.sndbufsz);
+		if (setsockopt
+		    (sockfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
+		     sizeof(p->prot.sndbufsz)) < 0) {
+			printf
+			    ("NetPIPE: setsockopt: SO_SNDBUF failed! errno=%d\n",
+			     errno);
+			exit(556);
+		}
+		if (setsockopt
+		    (sockfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
+		     sizeof(p->prot.rcvbufsz)) < 0) {
+			printf
+			    ("NetPIPE: setsockopt: SO_RCVBUF failed! errno=%d\n",
+			     errno);
+			exit(556);
+		}
+	}
 
- /* Attempt to set TCP_NODELAY */
- if (setsockopt(sockfd, proto->p_proto, TCP_NODELAY, &one, sizeof(one)) < 0)
- {
-   printf("NetPIPE: setsockopt: TCP_NODELAY failed! errno=%d\n", errno);
-   exit(556);
- }
+	if (tr) {		/* if client i.e., Sender */
 
- /* If requested, set the send and receive buffer sizes */
- if (p->prot.sndbufsz > 0)
- {
-      printf("Send and Receive Buffers set to %d bytes\n", p->prot.sndbufsz);
-     if (setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
-                                       sizeof(p->prot.sndbufsz)) < 0)
-     {
-          printf("NetPIPE: setsockopt: SO_SNDBUF failed! errno=%d\n", errno);
-          exit(556);
-     }
-     if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
-                                       sizeof(p->prot.rcvbufsz)) < 0)
-     {
-          printf("NetPIPE: setsockopt: SO_RCVBUF failed! errno=%d\n", errno);
-          exit(556);
-     }
- }
+		if (host) {
+			getaddrinfo(host, NULL, &hints, &addr);
+			memcpy(&p->prot.sin1, addr->ai_addr, addr->ai_addrlen);
+		} else {
+			if ((getaddrinfo(host, NULL, &hints, &addr)) != 0) {
+				printf("NetPIPE: invalid hostname '%s'\n",
+				       host);
+				exit(-5);
+			}
+		}
+		p->prot.sin1.sin6_port = htons(p->port);
 
- if (tr) {                                  /* if client i.e., Sender */
+	} else {		/* we are the receiver (server) */
 
-   if (host) {
-     getaddrinfo(host, NULL, &hints, &addr);
-     memcpy(&p->prot.sin1, addr->ai_addr, addr->ai_addrlen);
-   } else {
-     if ((getaddrinfo(host,NULL,&hints,&addr)) != 0) {
-       printf("NetPIPE: invalid hostname '%s'\n", host);
-       exit(-5);
-   }
- }
-   p->prot.sin1.sin6_port = htons(p->port);
+		memset(&p->prot.sin1, 0, sizeof(p->prot.sin1));
+		if (sr == 0) {
+			p->prot.sin1.sin6_addr = in6addr_any;
+			p->prot.sin1.sin6_port = htons(p->port);
+			lsin1 = (struct sockaddr *)&p->prot.sin1;
+			if (bind
+			    (sockfd, (struct sockaddr *)lsin1,
+			     sizeof(p->prot.sin1)) < 0) {
+				printf
+				    ("NetPIPE: server: bind on local address failed! errno=%d",
+				     errno);
+				exit(-6);
+			}
+		} else {
+			getaddrinfo(server_host, NULL, NULL, &server_addr);
+			memcpy(&p->prot.sin1, server_addr->ai_addr,
+			       server_addr->ai_addrlen);
+			if ((getaddrinfo(server_host, NULL, NULL, &server_addr))
+			    != 0) {
+				printf("NetPIPE: invalid hostname '%s'\n",
+				       host);
+				exit(-5);
+			}
+			memcpy(&p->prot.sin1, server_addr->ai_addr,
+			       server_addr->ai_addrlen);
+			p->prot.sin1.sin6_port = htons(p->port);
+			lsin1 = (struct sockaddr *)&p->prot.sin1;
+			if (bind
+			    (sockfd, (struct sockaddr *)lsin1,
+			     sizeof(p->prot.sin1)) < 0) {
+				printf
+				    ("NetPIPE: server: bind on %s failed! errno=%d",
+				     server_host, errno);
+				exit(-6);
+			}
+		}
+	}
 
-} else {                                 /* we are the receiver (server) */
+	if (tr)
+		p->commfd = sockfd;
+	else
+		p->servicefd = sockfd;
 
-   memset(&p->prot.sin1, 0, sizeof(p->prot.sin1));
-   if (sr==0) {
-     p->prot.sin1.sin6_addr = in6addr_any;
-     p->prot.sin1.sin6_port = htons(p->port);
-     lsin1=(struct sockaddr*)&p->prot.sin1;
-     if (bind(sockfd, (struct sockaddr*)lsin1, sizeof(p->prot.sin1)) < 0) {
-       printf("NetPIPE: server: bind on local address failed! errno=%d", errno);
-       exit(-6);
-     }
-   }
-   else{
-       getaddrinfo(server_host, NULL, NULL, &server_addr);
-       memcpy(&p->prot.sin1, server_addr->ai_addr, server_addr->ai_addrlen);
-       if ((getaddrinfo(server_host, NULL, NULL, &server_addr)) != 0) {
-  	  printf("NetPIPE: invalid hostname '%s'\n", host);
-	  exit(-5);
-       }
-       memcpy(&p->prot.sin1, server_addr->ai_addr, server_addr->ai_addrlen);
-       p->prot.sin1.sin6_port = htons(p->port);
-       lsin1=(struct sockaddr*)&p->prot.sin1;
-       if (bind(sockfd, (struct sockaddr*)lsin1, sizeof(p->prot.sin1)) < 0) {
-         printf("NetPIPE: server: bind on %s failed! errno=%d", server_host, errno);
-         exit(-6);
-       }
-   }
- }
-
- if (tr)
-   p->commfd = sockfd;
- else
-   p->servicefd = sockfd;
-
- return(0);
+	return (0);
 
 }
 
-static int
-readFully(int fd, void *obuf, int len)
+static int readFully(int fd, void *obuf, int len)
 {
-  int bytesLeft = len;
-  char *buf = (char *) obuf;
-  int bytesRead = 0;
+	int bytesLeft = len;
+	char *buf = (char *)obuf;
+	int bytesRead = 0;
 
-  while (bytesLeft > 0 &&
-	 (bytesRead = read(fd, (void *) buf, bytesLeft)) > 0)
-    {
-      bytesLeft -= bytesRead;
-      buf += bytesRead;
-    }
-  if (bytesRead <= 0)
-    return bytesRead;
-  return len;
+	while (bytesLeft > 0 &&
+	       (bytesRead = read(fd, (void *)buf, bytesLeft)) > 0) {
+		bytesLeft -= bytesRead;
+		buf += bytesRead;
+	}
+	if (bytesRead <= 0)
+		return bytesRead;
+	return len;
 }
 
-void Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
-    char s[] = "SyncMe";
-    char response[7];
+	char s[] = "SyncMe";
+	char response[7];
 
-    if (write(p->commfd, s, strlen(s)) < 0 ||
-	readFully(p->commfd, response, strlen(s)) < 0)
-      {
-	perror("NetPIPE: error writing or reading synchronization string");
-	exit(3);
-      }
-    if (strncmp(s, response, strlen(s)))
-      {
-	fprintf(stderr, "NetPIPE: Synchronization string incorrect!\n");
-	exit(3);
-      }
+	if (write(p->commfd, s, strlen(s)) < 0 ||
+	    readFully(p->commfd, response, strlen(s)) < 0) {
+		perror
+		    ("NetPIPE: error writing or reading synchronization string");
+		exit(3);
+	}
+	if (strncmp(s, response, strlen(s))) {
+		fprintf(stderr, "NetPIPE: Synchronization string incorrect!\n");
+		exit(3);
+	}
 }
 
-void PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 	/*
-	  The Berkeley sockets interface doesn't have a method to pre-post
-	  a buffer for reception of data.
-	*/
+	   The Berkeley sockets interface doesn't have a method to pre-post
+	   a buffer for reception of data.
+	 */
 }
 
-void SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
-    int bytesWritten, bytesLeft;
-    char *q;
+	int bytesWritten, bytesLeft;
+	char *q;
 
-    bytesLeft = p->bufflen;
-    bytesWritten = 0;
-    q = p->buff;
-    while (bytesLeft > 0 &&
-	   (bytesWritten = write(p->commfd, q, bytesLeft)) > 0)
-      {
-	bytesLeft -= bytesWritten;
-	q += bytesWritten;
-      }
-    if (bytesWritten == -1)
-      {
-	printf("NetPIPE: write: error encountered, errno=%d\n", errno);
-	exit(401);
-      }
+	bytesLeft = p->bufflen;
+	bytesWritten = 0;
+	q = p->buff;
+	while (bytesLeft > 0 &&
+	       (bytesWritten = write(p->commfd, q, bytesLeft)) > 0) {
+		bytesLeft -= bytesWritten;
+		q += bytesWritten;
+	}
+	if (bytesWritten == -1) {
+		printf("NetPIPE: write: error encountered, errno=%d\n", errno);
+		exit(401);
+	}
 }
 
-void RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
-    int bytesLeft;
-    int bytesRead;
-    char *q;
+	int bytesLeft;
+	int bytesRead;
+	char *q;
 
-    bytesLeft = p->bufflen;
-    bytesRead = 0;
-    q = p->buff1;
-    while (bytesLeft > 0 &&
-	   (bytesRead = read(p->commfd, q, bytesLeft)) > 0)
-      {
-	bytesLeft -= bytesRead;
-	q += bytesRead;
-      }
-    if (bytesLeft > 0 && bytesRead == 0)
-      {
-	printf("NetPIPE: \"end of file\" encountered on reading from socket\n");
-      }
-    else if (bytesRead == -1)
-      {
-	printf("NetPIPE: read: error encountered, errno=%d\n", errno);
-	exit(401);
-      }
+	bytesLeft = p->bufflen;
+	bytesRead = 0;
+	q = p->buff1;
+	while (bytesLeft > 0 && (bytesRead = read(p->commfd, q, bytesLeft)) > 0) {
+		bytesLeft -= bytesRead;
+		q += bytesRead;
+	}
+	if (bytesLeft > 0 && bytesRead == 0) {
+		printf
+		    ("NetPIPE: \"end of file\" encountered on reading from socket\n");
+	} else if (bytesRead == -1) {
+		printf("NetPIPE: read: error encountered, errno=%d\n", errno);
+		exit(401);
+	}
 }
 
-void SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
-    unsigned int ltime, ntime;
+	unsigned int ltime, ntime;
 
-    /*
-      Multiply the number of seconds by 1e6 to get time in microseconds
-      and convert value to an unsigned 32-bit integer.
-      */
-    ltime = (unsigned int)(*t * 1.e6);
+	/*
+	   Multiply the number of seconds by 1e6 to get time in microseconds
+	   and convert value to an unsigned 32-bit integer.
+	 */
+	ltime = (unsigned int)(*t * 1.e6);
 
-    /* Send time in network order */
-    ntime = htonl(ltime);
-    if (write(p->commfd, (char *)&ntime, sizeof(unsigned int)) < 0)
-      {
-	printf("NetPIPE: write failed in SendTime: errno=%d\n", errno);
-	exit(301);
-      }
+	/* Send time in network order */
+	ntime = htonl(ltime);
+	if (write(p->commfd, (char *)&ntime, sizeof(unsigned int)) < 0) {
+		printf("NetPIPE: write failed in SendTime: errno=%d\n", errno);
+		exit(301);
+	}
 }
 
-void RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
-    unsigned int ltime, ntime;
-    int bytesRead;
+	unsigned int ltime, ntime;
+	int bytesRead;
 
-    bytesRead = readFully(p->commfd, (void *)&ntime, sizeof(unsigned int));
-    if (bytesRead < 0)
-      {
-	printf("NetPIPE: read failed in RecvTime: errno=%d\n", errno);
-	exit(302);
-      }
-    else if (bytesRead != sizeof(unsigned int))
-      {
-	fprintf(stderr, "NetPIPE: partial read in RecvTime of %d bytes\n",
-		bytesRead);
-	exit(303);
-      }
-    ltime = ntohl(ntime);
+	bytesRead = readFully(p->commfd, (void *)&ntime, sizeof(unsigned int));
+	if (bytesRead < 0) {
+		printf("NetPIPE: read failed in RecvTime: errno=%d\n", errno);
+		exit(302);
+	} else if (bytesRead != sizeof(unsigned int)) {
+		fprintf(stderr,
+			"NetPIPE: partial read in RecvTime of %d bytes\n",
+			bytesRead);
+		exit(303);
+	}
+	ltime = ntohl(ntime);
 
-    /* Result is ltime (in microseconds) divided by 1.0e6 to get seconds */
-    *t = (double)ltime / 1.0e6;
+	/* Result is ltime (in microseconds) divided by 1.0e6 to get seconds */
+	*t = (double)ltime / 1.0e6;
 }
 
-void SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
-  unsigned int lrpt, nrpt;
+	unsigned int lrpt, nrpt;
 
-  lrpt = rpt;
-  /* Send repeat count as an unsigned 32 bit integer in network order */
-  nrpt = htonl(lrpt);
-  if (write(p->commfd, (void *) &nrpt, sizeof(unsigned int)) < 0)
-    {
-      printf("NetPIPE: write failed in SendRepeat: errno=%d\n", errno);
-      exit(304);
-    }
+	lrpt = rpt;
+	/* Send repeat count as an unsigned 32 bit integer in network order */
+	nrpt = htonl(lrpt);
+	if (write(p->commfd, (void *)&nrpt, sizeof(unsigned int)) < 0) {
+		printf("NetPIPE: write failed in SendRepeat: errno=%d\n",
+		       errno);
+		exit(304);
+	}
 }
 
-void RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
-  unsigned int lrpt, nrpt;
-  int bytesRead;
+	unsigned int lrpt, nrpt;
+	int bytesRead;
 
-  bytesRead = readFully(p->commfd, (void *)&nrpt, sizeof(unsigned int));
-  if (bytesRead < 0)
-    {
-      printf("NetPIPE: read failed in RecvRepeat: errno=%d\n", errno);
-      exit(305);
-    }
-  else if (bytesRead != sizeof(unsigned int))
-    {
-      fprintf(stderr, "NetPIPE: partial read in RecvRepeat of %d bytes\n",
-	      bytesRead);
-      exit(306);
-    }
-  lrpt = ntohl(nrpt);
+	bytesRead = readFully(p->commfd, (void *)&nrpt, sizeof(unsigned int));
+	if (bytesRead < 0) {
+		printf("NetPIPE: read failed in RecvRepeat: errno=%d\n", errno);
+		exit(305);
+	} else if (bytesRead != sizeof(unsigned int)) {
+		fprintf(stderr,
+			"NetPIPE: partial read in RecvRepeat of %d bytes\n",
+			bytesRead);
+		exit(306);
+	}
+	lrpt = ntohl(nrpt);
 
-  *rpt = lrpt;
+	*rpt = lrpt;
 }
 
-int Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
- socklen_t clen;
- int one = 1;
- struct protoent *proto;
+	socklen_t clen;
+	int one = 1;
+	struct protoent *proto;
 
- clen = sizeof(p->prot.sin2);
- if (p->tr) {
-   if (connect(p->commfd, (struct sockaddr *) &(p->prot.sin1),
-	      sizeof(p->prot.sin1)) < 0) {
-     printf("Client: Cannot Connect! errno=%d\n",errno);
-     exit(-10);
-   }
-  }
-  else {
-    /* SERVER */
-    listen(p->servicefd, 5);
-    p->commfd = accept(p->servicefd, (struct sockaddr *) &(p->prot.sin2),
-		       &clen);
+	clen = sizeof(p->prot.sin2);
+	if (p->tr) {
+		if (connect(p->commfd, (struct sockaddr *)&(p->prot.sin1),
+			    sizeof(p->prot.sin1)) < 0) {
+			printf("Client: Cannot Connect! errno=%d\n", errno);
+			exit(-10);
+		}
+	} else {
+		/* SERVER */
+		listen(p->servicefd, 5);
+		p->commfd =
+		    accept(p->servicefd, (struct sockaddr *)&(p->prot.sin2),
+			   &clen);
 
-    if (p->commfd < 0) {
-      printf("Server: Accept Failed! errno=%d\n",errno);
-      exit(-12);
-    }
+		if (p->commfd < 0) {
+			printf("Server: Accept Failed! errno=%d\n", errno);
+			exit(-12);
+		}
 
-    /*
-      Attempt to set TCP_NODELAY. TCP_NODELAY may or may not be propagated
-      to accepted sockets.
-     */
-    if (!(proto = getprotobyname("tcp"))) {
-      printf("unknown protocol!\n");
-      exit(555);
-    }
+		/*
+		   Attempt to set TCP_NODELAY. TCP_NODELAY may or may not be propagated
+		   to accepted sockets.
+		 */
+		if (!(proto = getprotobyname("tcp"))) {
+			printf("unknown protocol!\n");
+			exit(555);
+		}
 
-    if (setsockopt(p->commfd, proto->p_proto, TCP_NODELAY,
-		  &one, sizeof(one)) < 0)
-    {
-      printf("setsockopt: TCP_NODELAY failed! errno=%d\n", errno);
-      exit(556);
-    }
+		if (setsockopt(p->commfd, proto->p_proto, TCP_NODELAY,
+			       &one, sizeof(one)) < 0) {
+			printf("setsockopt: TCP_NODELAY failed! errno=%d\n",
+			       errno);
+			exit(556);
+		}
 
-    /* If requested, set the send and receive buffer sizes */
-    if (p->prot.sndbufsz > 0)
-    {
-      printf("Send and Receive Buffers on accepted socket set to %d bytes\n",
-	     p->prot.sndbufsz);
-      if (setsockopt(p->commfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
-                                       sizeof(p->prot.sndbufsz)) < 0)
-      {
-	printf("setsockopt: SO_SNDBUF failed! errno=%d\n", errno);
-	exit(556);
-      }
-      if (setsockopt(p->commfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
-                                       sizeof(p->prot.rcvbufsz)) < 0)
-      {
-	printf("setsockopt: SO_RCVBUF failed! errno=%d\n", errno);
-	exit(556);
-      }
-    }
-  }
-  return(0);
+		/* If requested, set the send and receive buffer sizes */
+		if (p->prot.sndbufsz > 0) {
+			printf
+			    ("Send and Receive Buffers on accepted socket set to %d bytes\n",
+			     p->prot.sndbufsz);
+			if (setsockopt
+			    (p->commfd, SOL_SOCKET, SO_SNDBUF,
+			     &(p->prot.sndbufsz),
+			     sizeof(p->prot.sndbufsz)) < 0) {
+				printf
+				    ("setsockopt: SO_SNDBUF failed! errno=%d\n",
+				     errno);
+				exit(556);
+			}
+			if (setsockopt
+			    (p->commfd, SOL_SOCKET, SO_RCVBUF,
+			     &(p->prot.rcvbufsz),
+			     sizeof(p->prot.rcvbufsz)) < 0) {
+				printf
+				    ("setsockopt: SO_RCVBUF failed! errno=%d\n",
+				     errno);
+				exit(556);
+			}
+		}
+	}
+	return (0);
 }
 
-int CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
- char *quit="QUIT";
- if (p->tr)
- {
-     write(p->commfd,quit, 5);
-     read(p->commfd, quit, 5);
-     close(p->commfd);
- }
- else
- {
-     read(p->commfd,quit, 5);
-     write(p->commfd,quit,5);
-     close(p->commfd);
-     close(p->servicefd);
- }
- return(0);
+	char *quit = "QUIT";
+	if (p->tr) {
+		write(p->commfd, quit, 5);
+		read(p->commfd, quit, 5);
+		close(p->commfd);
+	} else {
+		read(p->commfd, quit, 5);
+		write(p->commfd, quit, 5);
+		close(p->commfd);
+		close(p->servicefd);
+	}
+	return (0);
 }
diff --git a/tools/netpipe-2.4-ipv6/netpipe.c b/tools/netpipe-2.4-ipv6/netpipe.c
index 6422a15..727db5e 100644
--- a/tools/netpipe-2.4-ipv6/netpipe.c
+++ b/tools/netpipe-2.4-ipv6/netpipe.c
@@ -24,14 +24,12 @@
 
 extern char *optarg;
 
-
 /* Return the current time in seconds, using a double precision number.      */
-double
-When()
+double When()
 {
-    struct timeval tp;
-    gettimeofday(&tp, NULL);
-    return ((double) tp.tv_sec + (double) tp.tv_usec * 1e-6);
+	struct timeval tp;
+	gettimeofday(&tp, NULL);
+	return ((double)tp.tv_sec + (double)tp.tv_usec * 1e-6);
 }
 
 int PrintUsage()
@@ -62,484 +60,484 @@
 
 int main(int argc, char *argv[])
 {
-    FILE        *out;           /* Output data file                          */
-    char        s[255];         /* Generic string                            */
-    char        *memtmp;
-    char        *memtmp1;
+	FILE *out;		/* Output data file                          */
+	char s[255];		/* Generic string                            */
+	char *memtmp;
+	char *memtmp1;
 
-    int         c,              /* option index                              */
-                i, j, n, nq,    /* Loop indices                              */
-		asyncReceive=0, /* Pre-post a receive buffer?                */
-                bufoffset=0,    /* Align buffer to this                      */
-                bufalign=16*1024,/* Boundary to align buffer to              */
-		errFlag,        /* Error occurred in inner testing loop      */
-                nrepeat,        /* Number of time to do the transmission     */
-                len,            /* Number of bytes to be transmitted         */
-                inc=0,          /* Increment value                           */
-                trans=-1,       /* Transmitter flag. 1 if transmitting.      */
-                server=0,       /* Server flag. 1 if specifying server.      */
-                detailflag=0,   /* Set to examine the signature curve detail */
-                bufszflag=0,    /* Set to change the TCP socket buffer size  */
-                pert,           /* Perturbation value                        */
-                start=1,        /* Starting value for signature curve        */
-                end=MAXINT,     /* Ending value for signature curve          */
-                streamopt=0,    /* Streaming mode flag                       */
-                printopt=0;     /* Debug print statements flag               */
+	int c,			/* option index                              */
+	 i, j, n, nq,		/* Loop indices                              */
+	 asyncReceive = 0,	/* Pre-post a receive buffer?                */
+	    bufoffset = 0,	/* Align buffer to this                      */
+	    bufalign = 16 * 1024,	/* Boundary to align buffer to              */
+	    errFlag,		/* Error occurred in inner testing loop      */
+	    nrepeat,		/* Number of time to do the transmission     */
+	    len,		/* Number of bytes to be transmitted         */
+	    inc = 0,		/* Increment value                           */
+	    trans = -1,		/* Transmitter flag. 1 if transmitting.      */
+	    server = 0,		/* Server flag. 1 if specifying server.      */
+	    detailflag = 0,	/* Set to examine the signature curve detail */
+	    bufszflag = 0,	/* Set to change the TCP socket buffer size  */
+	    pert,		/* Perturbation value                        */
+	    start = 1,		/* Starting value for signature curve        */
+	    end = MAXINT,	/* Ending value for signature curve          */
+	    streamopt = 0,	/* Streaming mode flag                       */
+	    printopt = 0;	/* Debug print statements flag               */
 
-    ArgStruct   args;           /* Argumentsfor all the calls                */
+	ArgStruct args;		/* Argumentsfor all the calls                */
 
-    double      t, t0, t1, t2,  /* Time variables                            */
-                tlast,          /* Time for the last transmission            */
-                latency;        /* Network message latency                   */
+	double t, t0, t1, t2,	/* Time variables                            */
+	 tlast,			/* Time for the last transmission            */
+	 latency;		/* Network message latency                   */
 
-    Data        bwdata[NSAMP];  /* Bandwidth curve data                      */
+	Data bwdata[NSAMP];	/* Bandwidth curve data                      */
 
-    short       port=DEFPORT;   /* Port number for connection                */
+	short port = DEFPORT;	/* Port number for connection                */
 #ifdef HAVE_GETRUSAGE
-    struct rusage prev_rusage, curr_rusage; /* Resource usage                */
-    double	user_time, sys_time;	/* User & system time used                   */
-    double	best_user_time, best_sys_time; /* Total user & system time used     */
-    double      ut1, ut2, st1, st2; /* User & system time ctrs for variance  */
-    double	ut_var, st_var;	/* Variance in user & system time            */
+	struct rusage prev_rusage, curr_rusage;	/* Resource usage                */
+	double user_time, sys_time;	/* User & system time used                   */
+	double best_user_time, best_sys_time;	/* Total user & system time used     */
+	double ut1, ut2, st1, st2;	/* User & system time ctrs for variance  */
+	double ut_var, st_var;	/* Variance in user & system time            */
 #endif
 
 #ifdef MPI
-    MPI_Init(&argc, &argv);
+	MPI_Init(&argc, &argv);
 #endif
 
-    strcpy(s, "NetPIPE.out");
+	strcpy(s, "NetPIPE.out");
 #ifndef MPI
-    if (argc < 2)
-     PrintUsage();
+	if (argc < 2)
+		PrintUsage();
 #endif
-    /* Parse the arguments. See Usage for description */
-    while ((c = getopt(argc, argv, "PstrhH:p:o:A:O:l:u:i:b:a")) != -1)
-    {
-        switch(c)
-        {
-            case 'o': strcpy(s,optarg);
-                      break;
+	/* Parse the arguments. See Usage for description */
+	while ((c = getopt(argc, argv, "PstrhH:p:o:A:O:l:u:i:b:a")) != -1) {
+		switch (c) {
+		case 'o':
+			strcpy(s, optarg);
+			break;
 
-            case 't': trans = 1;
-                      break;
+		case 't':
+			trans = 1;
+			break;
 
-            case 'r': trans = 0;
-                      break;
+		case 'r':
+			trans = 0;
+			break;
 
-            case 's': streamopt = 1;
-                      break;
+		case 's':
+			streamopt = 1;
+			break;
 
-            case 'l': /*detailflag = 1;*/
-                      start = atoi(optarg);
-                      if (start < 1)
-                      {
-                        fprintf(stderr,"Need a starting value >= 1\n");
-                        exit(743);
-                      }
-                      break;
+		case 'l':	/*detailflag = 1; */
+			start = atoi(optarg);
+			if (start < 1) {
+				fprintf(stderr, "Need a starting value >= 1\n");
+				exit(743);
+			}
+			break;
 
-            case 'u': /*detailflag = 1;*/
-                      end = atoi(optarg);
-                      break;
+		case 'u':	/*detailflag = 1; */
+			end = atoi(optarg);
+			break;
 
-            case 'i': detailflag = 1;
-                      inc = atoi(optarg);
-                      break;
+		case 'i':
+			detailflag = 1;
+			inc = atoi(optarg);
+			break;
 
-            case 'b': bufszflag = 1;
+		case 'b':
+			bufszflag = 1;
 #ifdef TCP
-                      args.prot.rcvbufsz=atoi(optarg);
-                      args.prot.sndbufsz=args.prot.rcvbufsz;
+			args.prot.rcvbufsz = atoi(optarg);
+			args.prot.sndbufsz = args.prot.rcvbufsz;
 #endif
-                      break;
+			break;
 
-            case 'P': printopt = 1;
-                      break;
+		case 'P':
+			printopt = 1;
+			break;
 
-            case 'A': bufalign = atoi(optarg);
-                      break;
+		case 'A':
+			bufalign = atoi(optarg);
+			break;
 
-            case 'O': bufoffset = atoi(optarg);
-                      break;
+		case 'O':
+			bufoffset = atoi(optarg);
+			break;
 
-            case 'p': port = atoi(optarg);
-                      break;
+		case 'p':
+			port = atoi(optarg);
+			break;
 
-            case 'h': if (trans == 1)
-                      {
-                          args.host = (char *)malloc(strlen(optarg)+1);
-                          strcpy(args.host, optarg);
-			  printf("host is %s\n",args.host);
-                      }
-		      else
-		      {
-			  fprintf(stderr, "Error: -t must be specified before -h\n");
-			  exit(-11);
-		      }
-                      break;
+		case 'h':
+			if (trans == 1) {
+				args.host = (char *)malloc(strlen(optarg) + 1);
+				strcpy(args.host, optarg);
+				printf("host is %s\n", args.host);
+			} else {
+				fprintf(stderr,
+					"Error: -t must be specified before -h\n");
+				exit(-11);
+			}
+			break;
 
-            case 'H': if (trans == 0)
-                      {
-                          args.server_host = (char *)malloc(strlen(optarg)+1);
-                          strcpy(args.server_host, optarg);
-			  printf("server is %s\n",args.server_host);
-			  server = 1;
-                      }
-		      else
-		      {
-			  fprintf(stderr, "Error: -r must be specified before -H\n");
-			  exit(-11);
-		      }
-                      break;
+		case 'H':
+			if (trans == 0) {
+				args.server_host =
+				    (char *)malloc(strlen(optarg) + 1);
+				strcpy(args.server_host, optarg);
+				printf("server is %s\n", args.server_host);
+				server = 1;
+			} else {
+				fprintf(stderr,
+					"Error: -r must be specified before -H\n");
+				exit(-11);
+			}
+			break;
 
-	    case 'a': asyncReceive = 1;
-		      break;
+		case 'a':
+			asyncReceive = 1;
+			break;
 
-            default:  PrintUsage();
-                      exit(-12);
-        }
-    }
-    if (start > end)
-    {
-        fprintf(stderr, "Start MUST be LESS than end\n");
-        exit(420132);
-    }
+		default:
+			PrintUsage();
+			exit(-12);
+		}
+	}
+	if (start > end) {
+		fprintf(stderr, "Start MUST be LESS than end\n");
+		exit(420132);
+	}
 #if defined(TCP) || defined(PVM)
-    /*
-      It should be explicitly specified whether this is the transmitter
-      or the receiver.
-    */
-    if (trans < 0)
-    {
-	fprintf(stderr, "Error: either -t or -r must be specified\n");
-	exit(-11);
-    }
+	/*
+	   It should be explicitly specified whether this is the transmitter
+	   or the receiver.
+	 */
+	if (trans < 0) {
+		fprintf(stderr, "Error: either -t or -r must be specified\n");
+		exit(-11);
+	}
 #endif
 
-    args.nbuff = TRIALS;
-    args.tr = trans;
-    args.sr = server;
-    args.port = port;
+	args.nbuff = TRIALS;
+	args.tr = trans;
+	args.sr = server;
+	args.port = port;
 
 #if defined(TCP)
-    if (!bufszflag)
-    {
-        args.prot.sndbufsz = 0;
-        args.prot.rcvbufsz = 0;
-    }
-    else
-        fprintf(stderr,"Send and Recv Buffers are %d bytes\n",
-                                                   args.prot.sndbufsz);
+	if (!bufszflag) {
+		args.prot.sndbufsz = 0;
+		args.prot.rcvbufsz = 0;
+	} else
+		fprintf(stderr, "Send and Recv Buffers are %d bytes\n",
+			args.prot.sndbufsz);
 #endif
 
-    Setup(&args);
-    Establish(&args);
+	Setup(&args);
+	Establish(&args);
 
-    if (args.tr)
-    {
-        if ((out = fopen(s, "w")) == NULL)
-        {
-            fprintf(stderr,"Can't open %s for output\n", s);
-            exit(1);
-        }
-    }
-    else
-        out = stdout;
+	if (args.tr) {
+		if ((out = fopen(s, "w")) == NULL) {
+			fprintf(stderr, "Can't open %s for output\n", s);
+			exit(1);
+		}
+	} else
+		out = stdout;
 
-    args.bufflen = 1;
-    args.buff = (char *)malloc(args.bufflen);
-    args.buff1 = (char *)malloc(args.bufflen);
-    if (asyncReceive)
-	PrepareToReceive(&args);
-    Sync(&args);
-    t0 = When();
-    t0 = When();
-    t0 = When();
-#ifdef HAVE_GETRUSAGE
-    getrusage(RUSAGE_SELF, &prev_rusage);
-#endif
-    t0 = When();
-    for (i = 0; i < LATENCYREPS; i++)
-    {
-        if (args.tr)
-        {
-            SendData(&args);
-            RecvData(&args);
-	    if (asyncReceive && (i < LATENCYREPS - 1))
-	    {
+	args.bufflen = 1;
+	args.buff = (char *)malloc(args.bufflen);
+	args.buff1 = (char *)malloc(args.bufflen);
+	if (asyncReceive)
 		PrepareToReceive(&args);
-	    }
-        }
-        else
-        {
-            RecvData(&args);
-	    if (asyncReceive && (i < LATENCYREPS - 1))
-	    {
-		PrepareToReceive(&args);
-	    }
-            SendData(&args);
-        }
-    }
-    latency = (When() - t0)/(2 * LATENCYREPS);
+	Sync(&args);
+	t0 = When();
+	t0 = When();
+	t0 = When();
 #ifdef HAVE_GETRUSAGE
-    getrusage(RUSAGE_SELF, &curr_rusage);
+	getrusage(RUSAGE_SELF, &prev_rusage);
 #endif
-    free(args.buff);
-    free(args.buff1);
-
-
-    if (args.tr)
-    {
-        SendTime(&args, &latency);
-    }
-    else
-    {
-        RecvTime(&args, &latency);
-    }
-    if (args.tr && printopt)
-    {
-        fprintf(stderr,"Latency: %.7f\n", latency);
-        fprintf(stderr,"Now starting main loop\n");
-    }
-    tlast = latency;
-    if (inc == 0)
-    {
-	/* Set a starting value for the message size increment. */
-	inc = (start > 1) ? start / 2 : 1;
-    }
-
-    /* Main loop of benchmark */
-    for (nq = n = 0, len = start, errFlag = 0;
-         n < NSAMP - 3 && tlast < STOPTM && len <= end && !errFlag;
-         len = len + inc, nq++ )
-    {
-        if (nq > 2 && !detailflag)
-	  {
-	    /*
-	      This has the effect of exponentially increasing the block
-	      size.  If detailflag is false, then the block size is
-	      linearly increased (the increment is not adjusted).
-	    */
-            inc = ((nq % 2))? inc + inc: inc;
-	  }
-
-        /* This is a perturbation loop to test nearby values */
-        for (pert = (!detailflag && inc > PERT+1)? -PERT: 0;
-             pert <= PERT;
-             n++, pert += (!detailflag && inc > PERT+1)? PERT: PERT+1)
-        {
-
-            /* Calculate how many times to repeat the experiment. */
-            if (args.tr)
-            {
-                nrepeat = MAX((RUNTM / ((double)args.bufflen /
-                                 (args.bufflen - inc + 1.0) * tlast)), TRIALS);
-                SendRepeat(&args, nrepeat);
-            }
-            else
-            {
-                RecvRepeat(&args, &nrepeat);
-            }
-
-            /* Allocate the buffer */
-            args.bufflen = len + pert;
-            if ((args.buff=(char *)malloc(args.bufflen+bufalign))==(char *)NULL)
-            {
-                fprintf(stderr,"Couldn't allocate memory\n");
-		errFlag = -1;
-                break;
-            }
-            if ((args.buff1=(char *)malloc(args.bufflen+bufalign))==(char *)NULL)
-            {
-                fprintf(stderr,"Couldn't allocate memory\n");
-		errFlag = -1;
-                break;
-            }
-            /*
-	      Possibly align the data buffer: make memtmp and memtmp1
-	      point to the original blocks (so they can be freed later),
-	      then adjust args.buff and args.buff1 if the user requested it.
-	    */
-            memtmp = args.buff;
-            memtmp1 = args.buff1;
-            if (bufalign != 0)
-                args.buff +=(bufalign -
-                        ((intptr_t)args.buff % bufalign) + bufoffset) % bufalign;
-
-            if (bufalign != 0)
-                args.buff1 +=(bufalign -
-                        ((intptr_t)args.buff1 % bufalign) + bufoffset) % bufalign;
-
-
-            if (args.tr && printopt)
-                fprintf(stderr,"%3d: %9d bytes %4d times --> ",
-                                 n,args.bufflen,nrepeat);
-
-            /* Finally, we get to transmit or receive and time */
-            if (args.tr)
-            {
-		/*
-		   This is the transmitter: send the block TRIALS times, and
-		   if we are not streaming, expect the receiver to return each
-		   block.
-		*/
-                bwdata[n].t = LONGTIME;
-                t2 = t1 = 0;
-#ifdef HAVE_GETRUSAGE
-		ut1 = ut2 = st1 = st2 = 0.0;
-		best_user_time = best_sys_time = LONGTIME;
-#endif
-                for (i = 0; i < TRIALS; i++)
-                {
-                    Sync(&args);
-#ifdef HAVE_GETRUSAGE
-		    getrusage(RUSAGE_SELF, &prev_rusage);
-#endif
-                    t0 = When();
-                    for (j = 0; j < nrepeat; j++)
-                    {
-			if (asyncReceive && !streamopt)
-			{
-			    PrepareToReceive(&args);
+	t0 = When();
+	for (i = 0; i < LATENCYREPS; i++) {
+		if (args.tr) {
+			SendData(&args);
+			RecvData(&args);
+			if (asyncReceive && (i < LATENCYREPS - 1)) {
+				PrepareToReceive(&args);
 			}
-                        SendData(&args);
-                        if (!streamopt)
-			{
-                            RecvData(&args);
+		} else {
+			RecvData(&args);
+			if (asyncReceive && (i < LATENCYREPS - 1)) {
+				PrepareToReceive(&args);
 			}
-                    }
-                    t = (When() - t0)/((1 + !streamopt) * nrepeat);
+			SendData(&args);
+		}
+	}
+	latency = (When() - t0) / (2 * LATENCYREPS);
 #ifdef HAVE_GETRUSAGE
-		    getrusage(RUSAGE_SELF, &curr_rusage);
-		    user_time = ((curr_rusage.ru_utime.tv_sec -
-			      prev_rusage.ru_utime.tv_sec) + (double)
-			     (curr_rusage.ru_utime.tv_usec -
-			      prev_rusage.ru_utime.tv_usec) * 1.0E-6) /
-		      ((1 + !streamopt) * nrepeat);
-		    sys_time = ((curr_rusage.ru_stime.tv_sec -
-			      prev_rusage.ru_stime.tv_sec) + (double)
-			     (curr_rusage.ru_stime.tv_usec -
-			      prev_rusage.ru_stime.tv_usec) * 1.0E-6) /
-		      ((1 + !streamopt) * nrepeat);
-		    ut2 += user_time * user_time;
-		    st2 += sys_time * sys_time;
-		    ut1 += user_time;
-		    st1 += sys_time;
-		    if ((user_time + sys_time) < (best_user_time + best_sys_time))
-		    {
-			best_user_time = user_time;
-			best_sys_time = sys_time;
-		    }
+	getrusage(RUSAGE_SELF, &curr_rusage);
 #endif
+	free(args.buff);
+	free(args.buff1);
 
-                    if (!streamopt)
-                    {
-                        t2 += t*t;
-                        t1 += t;
-                        bwdata[n].t = MIN(bwdata[n].t, t);
-                    }
-                }
-                if (!streamopt)
-                    SendTime(&args, &bwdata[n].t);
-                else
-                    RecvTime(&args, &bwdata[n].t);
+	if (args.tr) {
+		SendTime(&args, &latency);
+	} else {
+		RecvTime(&args, &latency);
+	}
+	if (args.tr && printopt) {
+		fprintf(stderr, "Latency: %.7f\n", latency);
+		fprintf(stderr, "Now starting main loop\n");
+	}
+	tlast = latency;
+	if (inc == 0) {
+		/* Set a starting value for the message size increment. */
+		inc = (start > 1) ? start / 2 : 1;
+	}
 
-                if (!streamopt)
-                    bwdata[n].variance = t2/TRIALS - t1/TRIALS * t1/TRIALS;
+	/* Main loop of benchmark */
+	for (nq = n = 0, len = start, errFlag = 0;
+	     n < NSAMP - 3 && tlast < STOPTM && len <= end && !errFlag;
+	     len = len + inc, nq++) {
+		if (nq > 2 && !detailflag) {
+			/*
+			   This has the effect of exponentially increasing the block
+			   size.  If detailflag is false, then the block size is
+			   linearly increased (the increment is not adjusted).
+			 */
+			inc = ((nq % 2)) ? inc + inc : inc;
+		}
 
-#ifdef HAVE_GETRUSAGE
-		ut_var = ut2/TRIALS - (ut1/TRIALS) * (ut1/TRIALS);
-		st_var = st2/TRIALS - (st1/TRIALS) * (st1/TRIALS);
-#endif
+		/* This is a perturbation loop to test nearby values */
+		for (pert = (!detailflag && inc > PERT + 1) ? -PERT : 0;
+		     pert <= PERT;
+		     n++, pert += (!detailflag
+				   && inc > PERT + 1) ? PERT : PERT + 1) {
 
-            }
-            else
-            {
-		/*
-		   This is the receiver: receive the block TRIALS times, and
-		   if we are not streaming, send the block back to the
-		   sender.
-		*/
-                bwdata[n].t = LONGTIME;
-                t2 = t1 = 0;
-                for (i = 0; i < TRIALS; i++)
-                {
-		    if (asyncReceive)
-		    {
-		    	PrepareToReceive(&args);
-		    }
-                    Sync(&args);
-                    t0 = When();
-                    for (j = 0; j < nrepeat; j++)
-                    {
-                        RecvData(&args);
-			if (asyncReceive && (j < nrepeat - 1))
-			{
-			    PrepareToReceive(&args);
+			/* Calculate how many times to repeat the experiment. */
+			if (args.tr) {
+				nrepeat = MAX((RUNTM / ((double)args.bufflen /
+							(args.bufflen - inc +
+							 1.0) * tlast)),
+					      TRIALS);
+				SendRepeat(&args, nrepeat);
+			} else {
+				RecvRepeat(&args, &nrepeat);
 			}
-                        if (!streamopt)
-                            SendData(&args);
-                    }
-                    t = (When() - t0)/((1 + !streamopt) * nrepeat);
 
-                    if (streamopt)
-                    {
-                        t2 += t*t;
-                        t1 += t;
-                        bwdata[n].t = MIN(bwdata[n].t, t);
-                    }
-                }
-                if (streamopt)
-                    SendTime(&args, &bwdata[n].t);
-                else
-                    RecvTime(&args, &bwdata[n].t);
+			/* Allocate the buffer */
+			args.bufflen = len + pert;
+			if ((args.buff =
+			     (char *)malloc(args.bufflen + bufalign)) ==
+			    (char *)NULL) {
+				fprintf(stderr, "Couldn't allocate memory\n");
+				errFlag = -1;
+				break;
+			}
+			if ((args.buff1 =
+			     (char *)malloc(args.bufflen + bufalign)) ==
+			    (char *)NULL) {
+				fprintf(stderr, "Couldn't allocate memory\n");
+				errFlag = -1;
+				break;
+			}
+			/*
+			   Possibly align the data buffer: make memtmp and memtmp1
+			   point to the original blocks (so they can be freed later),
+			   then adjust args.buff and args.buff1 if the user requested it.
+			 */
+			memtmp = args.buff;
+			memtmp1 = args.buff1;
+			if (bufalign != 0)
+				args.buff += (bufalign -
+					      ((intptr_t) args.buff %
+					       bufalign) +
+					      bufoffset) % bufalign;
 
-                if (streamopt)
-                    bwdata[n].variance = t2/TRIALS - t1/TRIALS * t1/TRIALS;
+			if (bufalign != 0)
+				args.buff1 += (bufalign -
+					       ((intptr_t) args.buff1 %
+						bufalign) +
+					       bufoffset) % bufalign;
 
-            }
-            tlast = bwdata[n].t;
-            bwdata[n].bits = args.bufflen * CHARSIZE;
-            bwdata[n].bps = bwdata[n].bits / (bwdata[n].t * 1024 * 1024);
-            bwdata[n].repeat = nrepeat;
+			if (args.tr && printopt)
+				fprintf(stderr, "%3d: %9d bytes %4d times --> ",
+					n, args.bufflen, nrepeat);
 
-            if (args.tr)
-	    {
-		fprintf(out, "%.7f %.7f %d %d %.7f", bwdata[n].t, bwdata[n].bps,
-			bwdata[n].bits, bwdata[n].bits / 8,
-			bwdata[n].variance);
+			/* Finally, we get to transmit or receive and time */
+			if (args.tr) {
+				/*
+				   This is the transmitter: send the block TRIALS times, and
+				   if we are not streaming, expect the receiver to return each
+				   block.
+				 */
+				bwdata[n].t = LONGTIME;
+				t2 = t1 = 0;
 #ifdef HAVE_GETRUSAGE
-		fprintf(out, " %.7f %.7f %.7f %.7f", ut1 / (double) TRIALS,
-			st1 / (double) TRIALS, ut_var, st_var);
+				ut1 = ut2 = st1 = st2 = 0.0;
+				best_user_time = best_sys_time = LONGTIME;
 #endif
-		fprintf(out, "\n");
-	    }
-            fflush(out);
-
-            free(memtmp);
-            free(memtmp1);
-
-            if (args.tr && printopt)
-	    {
-        	fprintf(stderr," %6.3f Mbps in %.7f sec", bwdata[n].bps,
-			tlast);
+				for (i = 0; i < TRIALS; i++) {
+					Sync(&args);
 #ifdef HAVE_GETRUSAGE
-		fprintf(stderr, ", avg utime=%.7f avg stime=%.7f, ",
-			ut1 / (double) TRIALS,
-			st1 / (double) TRIALS);
-		fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_user_time,
-			best_sys_time);
-		fprintf(stderr, "utime var=%.7f stime var=%.7f", ut_var, st_var);
+					getrusage(RUSAGE_SELF, &prev_rusage);
 #endif
-		fprintf(stderr, "\n");
-	    }
-        } /* End of perturbation loop */
+					t0 = When();
+					for (j = 0; j < nrepeat; j++) {
+						if (asyncReceive && !streamopt) {
+							PrepareToReceive(&args);
+						}
+						SendData(&args);
+						if (!streamopt) {
+							RecvData(&args);
+						}
+					}
+					t = (When() -
+					     t0) / ((1 + !streamopt) * nrepeat);
+#ifdef HAVE_GETRUSAGE
+					getrusage(RUSAGE_SELF, &curr_rusage);
+					user_time =
+					    ((curr_rusage.ru_utime.tv_sec -
+					      prev_rusage.ru_utime.tv_sec) +
+					     (double)
+					     (curr_rusage.ru_utime.tv_usec -
+					      prev_rusage.ru_utime.tv_usec) *
+					     1.0E-6) / ((1 +
+							 !streamopt) * nrepeat);
+					sys_time =
+					    ((curr_rusage.ru_stime.tv_sec -
+					      prev_rusage.ru_stime.tv_sec) +
+					     (double)
+					     (curr_rusage.ru_stime.tv_usec -
+					      prev_rusage.ru_stime.tv_usec) *
+					     1.0E-6) / ((1 +
+							 !streamopt) * nrepeat);
+					ut2 += user_time * user_time;
+					st2 += sys_time * sys_time;
+					ut1 += user_time;
+					st1 += sys_time;
+					if ((user_time + sys_time) <
+					    (best_user_time + best_sys_time)) {
+						best_user_time = user_time;
+						best_sys_time = sys_time;
+					}
+#endif
 
-    } /* End of main loop  */
+					if (!streamopt) {
+						t2 += t * t;
+						t1 += t;
+						bwdata[n].t =
+						    MIN(bwdata[n].t, t);
+					}
+				}
+				if (!streamopt)
+					SendTime(&args, &bwdata[n].t);
+				else
+					RecvTime(&args, &bwdata[n].t);
 
-    if (args.tr)
-       fclose(out);
+				if (!streamopt)
+					bwdata[n].variance =
+					    t2 / TRIALS -
+					    t1 / TRIALS * t1 / TRIALS;
 
-    CleanUp(&args);
-    return(0);
+#ifdef HAVE_GETRUSAGE
+				ut_var =
+				    ut2 / TRIALS -
+				    (ut1 / TRIALS) * (ut1 / TRIALS);
+				st_var =
+				    st2 / TRIALS -
+				    (st1 / TRIALS) * (st1 / TRIALS);
+#endif
+
+			} else {
+				/*
+				   This is the receiver: receive the block TRIALS times, and
+				   if we are not streaming, send the block back to the
+				   sender.
+				 */
+				bwdata[n].t = LONGTIME;
+				t2 = t1 = 0;
+				for (i = 0; i < TRIALS; i++) {
+					if (asyncReceive) {
+						PrepareToReceive(&args);
+					}
+					Sync(&args);
+					t0 = When();
+					for (j = 0; j < nrepeat; j++) {
+						RecvData(&args);
+						if (asyncReceive
+						    && (j < nrepeat - 1)) {
+							PrepareToReceive(&args);
+						}
+						if (!streamopt)
+							SendData(&args);
+					}
+					t = (When() -
+					     t0) / ((1 + !streamopt) * nrepeat);
+
+					if (streamopt) {
+						t2 += t * t;
+						t1 += t;
+						bwdata[n].t =
+						    MIN(bwdata[n].t, t);
+					}
+				}
+				if (streamopt)
+					SendTime(&args, &bwdata[n].t);
+				else
+					RecvTime(&args, &bwdata[n].t);
+
+				if (streamopt)
+					bwdata[n].variance =
+					    t2 / TRIALS -
+					    t1 / TRIALS * t1 / TRIALS;
+
+			}
+			tlast = bwdata[n].t;
+			bwdata[n].bits = args.bufflen * CHARSIZE;
+			bwdata[n].bps =
+			    bwdata[n].bits / (bwdata[n].t * 1024 * 1024);
+			bwdata[n].repeat = nrepeat;
+
+			if (args.tr) {
+				fprintf(out, "%.7f %.7f %d %d %.7f",
+					bwdata[n].t, bwdata[n].bps,
+					bwdata[n].bits, bwdata[n].bits / 8,
+					bwdata[n].variance);
+#ifdef HAVE_GETRUSAGE
+				fprintf(out, " %.7f %.7f %.7f %.7f",
+					ut1 / (double)TRIALS,
+					st1 / (double)TRIALS, ut_var, st_var);
+#endif
+				fprintf(out, "\n");
+			}
+			fflush(out);
+
+			free(memtmp);
+			free(memtmp1);
+
+			if (args.tr && printopt) {
+				fprintf(stderr, " %6.3f Mbps in %.7f sec",
+					bwdata[n].bps, tlast);
+#ifdef HAVE_GETRUSAGE
+				fprintf(stderr,
+					", avg utime=%.7f avg stime=%.7f, ",
+					ut1 / (double)TRIALS,
+					st1 / (double)TRIALS);
+				fprintf(stderr, "min utime=%.7f stime=%.7f, ",
+					best_user_time, best_sys_time);
+				fprintf(stderr, "utime var=%.7f stime var=%.7f",
+					ut_var, st_var);
+#endif
+				fprintf(stderr, "\n");
+			}
+		}		/* End of perturbation loop */
+
+	}			/* End of main loop  */
+
+	if (args.tr)
+		fclose(out);
+
+	CleanUp(&args);
+	return (0);
 }
diff --git a/tools/netpipe-2.4/MPI.c b/tools/netpipe-2.4/MPI.c
index e9d3bfc..75b6286 100644
--- a/tools/netpipe-2.4/MPI.c
+++ b/tools/netpipe-2.4/MPI.c
@@ -18,45 +18,42 @@
 #define MAXBUFSIZE (10*1024*1024)
 #endif
 
-
-int Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
-    int nproc;
+	int nproc;
 
-    MPI_Comm_rank(MPI_COMM_WORLD, &p->prot.iproc);
-    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
-    {
-        char s[255];
-        gethostname(s,253);
-        printf("%d: %s\n",p->prot.iproc,s);
-        fflush(stdout);
-    }
-    p->prot.nbor = !p->prot.iproc;
+	MPI_Comm_rank(MPI_COMM_WORLD, &p->prot.iproc);
+	MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+	{
+		char s[255];
+		gethostname(s, 253);
+		printf("%d: %s\n", p->prot.iproc, s);
+		fflush(stdout);
+	}
+	p->prot.nbor = !p->prot.iproc;
 
-    if (nproc != 2)
-    {
-	printf("Need two processes\n");
-	exit(-2);
-    }
+	if (nproc != 2) {
+		printf("Need two processes\n");
+		exit(-2);
+	}
 
-    if (p->prot.iproc == 0)
-	p->tr = 1;
-    else
-	p->tr = 0;
+	if (p->prot.iproc == 0)
+		p->tr = 1;
+	else
+		p->tr = 0;
 
 #ifdef BSEND
-    messbuff = (char *)malloc(MAXBUFSIZE * sizeof(char));
-    if (messbuff == NULL)
-    {
-        printf("Can't allocate for message buffer\n");
-        exit(-1);
-    }
-    MPI_Buffer_attach(messbuff, MAXBUFSIZE);
+	messbuff = (char *)malloc(MAXBUFSIZE * sizeof(char));
+	if (messbuff == NULL) {
+		printf("Can't allocate for message buffer\n");
+		exit(-1);
+	}
+	MPI_Buffer_attach(messbuff, MAXBUFSIZE);
 #endif
 
 }
 
-void Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
 	MPI_Barrier(MPI_COMM_WORLD);
 }
@@ -64,50 +61,47 @@
 static int recvPosted = 0;
 static MPI_Request recvRequest;
 
-void PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 	/*
-	  Providing a buffer for reception of data in advance of
-	  the sender sending the data provides a major performance
-	  boost on some implementations of MPI, particularly shared
-	  memory implementations on the Cray T3E and Intel Paragon.
-	*/
-	if (recvPosted)
-	{
-	    printf("Can't prepare to receive: outstanding receive!\n");
-	    exit(-1);
+	   Providing a buffer for reception of data in advance of
+	   the sender sending the data provides a major performance
+	   boost on some implementations of MPI, particularly shared
+	   memory implementations on the Cray T3E and Intel Paragon.
+	 */
+	if (recvPosted) {
+		printf("Can't prepare to receive: outstanding receive!\n");
+		exit(-1);
 	}
 	MPI_Irecv(p->buff, p->bufflen, MPI_BYTE,
 		  p->prot.nbor, 1, MPI_COMM_WORLD, &recvRequest);
 	recvPosted = -1;
 }
 
-void SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
 #ifdef BSEND
-	MPI_Bsend(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1, MPI_COMM_WORLD);
+	MPI_Bsend(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1,
+		  MPI_COMM_WORLD);
 #else
-	MPI_Send(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1, MPI_COMM_WORLD);
+	MPI_Send(p->buff, p->bufflen, MPI_BYTE, p->prot.nbor, 1,
+		 MPI_COMM_WORLD);
 #endif
 }
 
-void RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
 	MPI_Status status;
-	if (recvPosted)
-	{
+	if (recvPosted) {
 		MPI_Wait(&recvRequest, &status);
 		recvPosted = 0;
-	}
-	else
-	{
+	} else {
 		MPI_Recv(p->buff, p->bufflen, MPI_BYTE,
-				p->prot.nbor, 1, MPI_COMM_WORLD, &status);
+			 p->prot.nbor, 1, MPI_COMM_WORLD, &status);
 	}
 }
 
-
-void SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
 #ifdef BSEND
 	MPI_Bsend(t, 1, MPI_DOUBLE, p->prot.nbor, 2, MPI_COMM_WORLD);
@@ -116,15 +110,14 @@
 #endif
 }
 
-void RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
 	MPI_Status status;
 
 	MPI_Recv(t, 1, MPI_DOUBLE, p->prot.nbor, 2, MPI_COMM_WORLD, &status);
 }
 
-
-void SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
 #ifdef BSEND
 	MPI_Bsend(&rpt, 1, MPI_INT, p->prot.nbor, 2, MPI_COMM_WORLD);
@@ -133,19 +126,18 @@
 #endif
 }
 
-void RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
 	MPI_Status status;
 
 	MPI_Recv(rpt, 1, MPI_INT, p->prot.nbor, 2, MPI_COMM_WORLD, &status);
 }
 
-
-int Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
 }
 
-int  CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
 	MPI_Finalize();
 }
diff --git a/tools/netpipe-2.4/PVM.c b/tools/netpipe-2.4/PVM.c
index 2b11420..3ac561e 100644
--- a/tools/netpipe-2.4/PVM.c
+++ b/tools/netpipe-2.4/PVM.c
@@ -17,12 +17,11 @@
 /* Set up the communcations system.                                   */
 /*    In pvm, this means to join the parallel machine                 */
 /**********************************************************************/
-int
-Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
-    p->prot.mytid = pvm_mytid();
+	p->prot.mytid = pvm_mytid();
 #ifdef DEBUG
-    printf("My task id is %d \n",p->prot.mytid);
+	printf("My task id is %d \n", p->prot.mytid);
 #endif
 }
 
@@ -33,77 +32,77 @@
 /*    starting it by hand on the other machine, we don't know what    */
 /*    the other task id is.                                           */
 /**********************************************************************/
-int
-Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
-    /* Task information for the entire parallel machine (if trans) */
-    int                     tasks_status;
-    struct pvmtaskinfo      *taskp;
-    int                     ntasks;
+	/* Task information for the entire parallel machine (if trans) */
+	int tasks_status;
+	struct pvmtaskinfo *taskp;
+	int ntasks;
 
-        /* Received buffer (if receiver)  */
-    int buffer_id;
+	/* Received buffer (if receiver)  */
+	int buffer_id;
 
-    /*
-    If we are the transmitting side, go find the other one and send
-    it a message containing our tid. If we are the receiving side,
-    just wait for a message.
-    */
-    if (p->tr) {
+	/*
+	   If we are the transmitting side, go find the other one and send
+	   it a message containing our tid. If we are the receiving side,
+	   just wait for a message.
+	 */
+	if (p->tr) {
 #ifdef DEBUG
-	printf("this is the transmitter\n");
+		printf("this is the transmitter\n");
 #endif
-	tasks_status = pvm_tasks( 0, &ntasks, &taskp );
-	if (ntasks != 2) {
-	    printf("Error, too many processes in parallel machine \n");
-	    printf("Start a clean machine.  n=%d\n", ntasks);
-	    exit(-1);
-	}
+		tasks_status = pvm_tasks(0, &ntasks, &taskp);
+		if (ntasks != 2) {
+			printf
+			    ("Error, too many processes in parallel machine \n");
+			printf("Start a clean machine.  n=%d\n", ntasks);
+			exit(-1);
+		}
 
-	/* Since there are two tasks, one is ours the other is the receiver */
-	p->prot.othertid = -1;
-	if (taskp[0].ti_tid == p->prot.mytid) {
-	    p->prot.othertid = taskp[1].ti_tid;
-	}
-	if (taskp[1].ti_tid == p->prot.mytid) {
-	    p->prot.othertid = taskp[0].ti_tid;
-	}
-	if (p->prot.othertid == -1) {
-	    printf("Error, cannot find other (receiving) task \n");
-	    printf("Id's:  %d %d  \n",taskp[0].ti_tid,taskp[1].ti_tid);
-	}
+		/* Since there are two tasks, one is ours the other is the receiver */
+		p->prot.othertid = -1;
+		if (taskp[0].ti_tid == p->prot.mytid) {
+			p->prot.othertid = taskp[1].ti_tid;
+		}
+		if (taskp[1].ti_tid == p->prot.mytid) {
+			p->prot.othertid = taskp[0].ti_tid;
+		}
+		if (p->prot.othertid == -1) {
+			printf("Error, cannot find other (receiving) task \n");
+			printf("Id's:  %d %d  \n", taskp[0].ti_tid,
+			       taskp[1].ti_tid);
+		}
 
-	/* Send the receiver a message.  Tell pvm to keep the channel open */
+		/* Send the receiver a message.  Tell pvm to keep the channel open */
 
 #ifdef DEBUG
-	printf("The receiver tid is %d \n",p->prot.othertid);
+		printf("The receiver tid is %d \n", p->prot.othertid);
 #endif
-	pvm_setopt( PvmRoute, PvmRouteDirect );
-	pvm_initsend( PVMDATA );
-	pvm_pkint( &p->prot.mytid, 1, 1 );
-	pvm_send( p->prot.othertid, 1 );
-    } else {
+		pvm_setopt(PvmRoute, PvmRouteDirect);
+		pvm_initsend(PVMDATA);
+		pvm_pkint(&p->prot.mytid, 1, 1);
+		pvm_send(p->prot.othertid, 1);
+	} else {
 #ifdef DEBUG
-	printf("This is the receiver \n");
+		printf("This is the receiver \n");
 #endif
 
-	/* Receive any message from any task */
-	buffer_id = pvm_recv(-1, -1);
+		/* Receive any message from any task */
+		buffer_id = pvm_recv(-1, -1);
 
-	if (buffer_id < 0) {
-	    printf("Error on receive in receiver\n");
-	    exit(-1);
+		if (buffer_id < 0) {
+			printf("Error on receive in receiver\n");
+			exit(-1);
+		}
+		pvm_upkint(&p->prot.othertid, 1, 1);
 	}
-	pvm_upkint( &p->prot.othertid, 1, 1 );
-    }
 }
 
 /**********************************************************************/
 /* Prepare to receive                                                 */
 /*    In pvm, you cannot set up a reception buffer ahead of time      */
 /**********************************************************************/
-void
-PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 }
 
@@ -111,8 +110,7 @@
 /* Synchronize                                                        */
 /*     In pvm, this is not necessary                                  */
 /**********************************************************************/
-void
-Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
 }
 
@@ -120,82 +118,75 @@
 /* Send a buffer full of information                                  */
 /*    In pvm, we use pvm_pkbyte and then send it.                     */
 /**********************************************************************/
-void
-SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
 #ifdef DEBUG
-    printf(" In send \n");
+	printf(" In send \n");
 #endif
-    pvm_initsend( PVMDATA );
-    pvm_pkbyte( p->buff, p->bufflen, 1 );
-    pvm_send( p->prot.othertid, 1 );
+	pvm_initsend(PVMDATA);
+	pvm_pkbyte(p->buff, p->bufflen, 1);
+	pvm_send(p->prot.othertid, 1);
 #ifdef DEBUG
-    printf(" message sent.  Size=%d\n",p->bufflen);
+	printf(" message sent.  Size=%d\n", p->bufflen);
 #endif
 }
 
 /**********************************************************************/
 /* Receive a buffer full of information                               */
 /**********************************************************************/
-void
-RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
 #ifdef DEBUG
-    printf(" In receive \n");
+	printf(" In receive \n");
 #endif
-    pvm_recv( -1, -1);
-    pvm_upkbyte( p->buff, p->bufflen, 1);
+	pvm_recv(-1, -1);
+	pvm_upkbyte(p->buff, p->bufflen, 1);
 #ifdef DEBUG
-    printf(" message received .  Size=%d \n", p->bufflen);
+	printf(" message received .  Size=%d \n", p->bufflen);
 #endif
 }
 
 /**********************************************************************/
 /* Send elapsed time to the other process                             */
 /**********************************************************************/
-void
-SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
-    pvm_initsend( PVMDATA );
-    pvm_pkdouble( t, 1, 1 );
-    pvm_send( p->prot.othertid, 1);
+	pvm_initsend(PVMDATA);
+	pvm_pkdouble(t, 1, 1);
+	pvm_send(p->prot.othertid, 1);
 }
 
 /**********************************************************************/
 /* Receive elapsed time from the other process                        */
 /**********************************************************************/
-void
-RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
-    pvm_recv(-1, -1);
-    pvm_upkdouble( t, 1, 1 );
+	pvm_recv(-1, -1);
+	pvm_upkdouble(t, 1, 1);
 }
 
 /**********************************************************************/
 /* Send repeat count to the other process                             */
 /**********************************************************************/
-void
-SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
-    pvm_initsend( PVMDATA );
-    pvm_pkint( &rpt, 1, 1 );
-    pvm_send( p->prot.othertid, 1);
+	pvm_initsend(PVMDATA);
+	pvm_pkint(&rpt, 1, 1);
+	pvm_send(p->prot.othertid, 1);
 }
 
 /**********************************************************************/
 /* Receiver repeat count from other process                           */
 /**********************************************************************/
-void
-RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
-    pvm_recv(-1, -1);
-    pvm_upkint( rpt, 1, 1 );
+	pvm_recv(-1, -1);
+	pvm_upkint(rpt, 1, 1);
 }
 
 /**********************************************************************/
 /* Close down the connection.
 /**********************************************************************/
-int
-CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
 }
diff --git a/tools/netpipe-2.4/TCP.c b/tools/netpipe-2.4/TCP.c
index 45efe20..2df3a3e 100644
--- a/tools/netpipe-2.4/TCP.c
+++ b/tools/netpipe-2.4/TCP.c
@@ -13,348 +13,345 @@
 /*****************************************************************************/
 #include    "netpipe.h"
 
-int Setup(ArgStruct *p)
+int Setup(ArgStruct * p)
 {
- int tr, one = 1;                 /* tr==1 if process is a transmitter */
- int sockfd;
- struct sockaddr_in *lsin1, *lsin2;      /* ptr to sockaddr_in in ArgStruct */
- char *host;
- struct hostent *addr;
- struct protoent *proto;
+	int tr, one = 1;	/* tr==1 if process is a transmitter */
+	int sockfd;
+	struct sockaddr_in *lsin1, *lsin2;	/* ptr to sockaddr_in in ArgStruct */
+	char *host;
+	struct hostent *addr;
+	struct protoent *proto;
 
- host = p->host;                           /* copy ptr to hostname */
- tr = p->tr;                               /* copy tr indicator */
+	host = p->host;		/* copy ptr to hostname */
+	tr = p->tr;		/* copy tr indicator */
 
- lsin1 = &(p->prot.sin1);
- lsin2 = &(p->prot.sin2);
+	lsin1 = &(p->prot.sin1);
+	lsin2 = &(p->prot.sin2);
 
- memset((char *) lsin1, 0x00, sizeof(*lsin1));
- memset((char *) lsin2, 0x00, sizeof(*lsin2));
+	memset((char *)lsin1, 0x00, sizeof(*lsin1));
+	memset((char *)lsin2, 0x00, sizeof(*lsin2));
 
- if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-   printf("NetPIPE: can't open stream socket! errno=%d\n", errno);
-   exit(-4);
- }
+	if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+		printf("NetPIPE: can't open stream socket! errno=%d\n", errno);
+		exit(-4);
+	}
 
- if (!(proto = getprotobyname("tcp"))) {
-   printf("NetPIPE: protocol 'tcp' unknown!\n");
-   exit(555);
- }
+	if (!(proto = getprotobyname("tcp"))) {
+		printf("NetPIPE: protocol 'tcp' unknown!\n");
+		exit(555);
+	}
 
- /* Attempt to set TCP_NODELAY */
- if (setsockopt(sockfd, proto->p_proto, TCP_NODELAY, &one, sizeof(one)) < 0)
- {
-   printf("NetPIPE: setsockopt: TCP_NODELAY failed! errno=%d\n", errno);
-   exit(556);
- }
+	/* Attempt to set TCP_NODELAY */
+	if (setsockopt(sockfd, proto->p_proto, TCP_NODELAY, &one, sizeof(one)) <
+	    0) {
+		printf("NetPIPE: setsockopt: TCP_NODELAY failed! errno=%d\n",
+		       errno);
+		exit(556);
+	}
 
- /* If requested, set the send and receive buffer sizes */
- if (p->prot.sndbufsz > 0)
- {
-      printf("Send and Receive Buffers set to %d bytes\n", p->prot.sndbufsz);
-     if (setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
-                                       sizeof(p->prot.sndbufsz)) < 0)
-     {
-          printf("NetPIPE: setsockopt: SO_SNDBUF failed! errno=%d\n", errno);
-          exit(556);
-     }
-     if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
-                                       sizeof(p->prot.rcvbufsz)) < 0)
-     {
-          printf("NetPIPE: setsockopt: SO_RCVBUF failed! errno=%d\n", errno);
-          exit(556);
-     }
- }
+	/* If requested, set the send and receive buffer sizes */
+	if (p->prot.sndbufsz > 0) {
+		printf("Send and Receive Buffers set to %d bytes\n",
+		       p->prot.sndbufsz);
+		if (setsockopt
+		    (sockfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
+		     sizeof(p->prot.sndbufsz)) < 0) {
+			printf
+			    ("NetPIPE: setsockopt: SO_SNDBUF failed! errno=%d\n",
+			     errno);
+			exit(556);
+		}
+		if (setsockopt
+		    (sockfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
+		     sizeof(p->prot.rcvbufsz)) < 0) {
+			printf
+			    ("NetPIPE: setsockopt: SO_RCVBUF failed! errno=%d\n",
+			     errno);
+			exit(556);
+		}
+	}
 
+	if (tr) {		/* if client i.e., Sender */
 
- if (tr) {                                  /* if client i.e., Sender */
+		if (atoi(host) > 0) {	/* Numerical IP address */
+			lsin1->sin_family = AF_INET;
+			lsin1->sin_addr.s_addr = inet_addr(host);
 
-   if (atoi(host) > 0) {                   /* Numerical IP address */
-     lsin1->sin_family = AF_INET;
-     lsin1->sin_addr.s_addr = inet_addr(host);
+		} else {
 
-   } else {
+			if ((addr = gethostbyname(host)) == NULL) {
+				printf("NetPIPE: invalid hostname '%s'\n",
+				       host);
+				exit(-5);
+			}
 
-     if ((addr = gethostbyname(host)) == NULL) {
-       printf("NetPIPE: invalid hostname '%s'\n", host);
-       exit(-5);
-     }
+			lsin1->sin_family = addr->h_addrtype;
+			memcpy((char *)&(lsin1->sin_addr.s_addr), addr->h_addr,
+			       addr->h_length);
+		}
 
-     lsin1->sin_family = addr->h_addrtype;
-     memcpy((char*) &(lsin1->sin_addr.s_addr), addr->h_addr, addr->h_length);
-   }
+		lsin1->sin_port = htons(p->port);
 
-   lsin1->sin_port = htons(p->port);
+	} else {		/* we are the receiver (server) */
 
- } else {                                 /* we are the receiver (server) */
+		memset((char *)lsin1, 0x00, sizeof(*lsin1));
+		lsin1->sin_family = AF_INET;
+		lsin1->sin_addr.s_addr = htonl(INADDR_ANY);
+		lsin1->sin_port = htons(p->port);
 
-   memset((char *) lsin1, 0x00, sizeof(*lsin1));
-   lsin1->sin_family      = AF_INET;
-   lsin1->sin_addr.s_addr = htonl(INADDR_ANY);
-   lsin1->sin_port        = htons(p->port);
+		if (bind(sockfd, (struct sockaddr *)lsin1, sizeof(*lsin1)) < 0) {
+			printf
+			    ("NetPIPE: server: bind on local address failed! errno=%d",
+			     errno);
+			exit(-6);
+		}
 
-   if (bind(sockfd, (struct sockaddr *) lsin1, sizeof(*lsin1)) < 0) {
-     printf("NetPIPE: server: bind on local address failed! errno=%d", errno);
-     exit(-6);
-   }
+	}
 
- }
+	if (tr)
+		p->commfd = sockfd;
+	else
+		p->servicefd = sockfd;
 
- if (tr)
-   p->commfd = sockfd;
- else
-   p->servicefd = sockfd;
-
- return(0);
+	return (0);
 }
 
-static int
-readFully(int fd, void *obuf, int len)
+static int readFully(int fd, void *obuf, int len)
 {
-  int bytesLeft = len;
-  char *buf = (char *) obuf;
-  int bytesRead = 0;
+	int bytesLeft = len;
+	char *buf = (char *)obuf;
+	int bytesRead = 0;
 
-  while (bytesLeft > 0 &&
-	 (bytesRead = read(fd, (void *) buf, bytesLeft)) > 0)
-    {
-      bytesLeft -= bytesRead;
-      buf += bytesRead;
-    }
-  if (bytesRead <= 0)
-    return bytesRead;
-  return len;
+	while (bytesLeft > 0 &&
+	       (bytesRead = read(fd, (void *)buf, bytesLeft)) > 0) {
+		bytesLeft -= bytesRead;
+		buf += bytesRead;
+	}
+	if (bytesRead <= 0)
+		return bytesRead;
+	return len;
 }
 
-void Sync(ArgStruct *p)
+void Sync(ArgStruct * p)
 {
-    char s[] = "SyncMe";
-    char response[7];
+	char s[] = "SyncMe";
+	char response[7];
 
-    if (write(p->commfd, s, strlen(s)) < 0 ||
-	readFully(p->commfd, response, strlen(s)) < 0)
-      {
-	perror("NetPIPE: error writing or reading synchronization string");
-	exit(3);
-      }
-    if (strncmp(s, response, strlen(s)))
-      {
-	fprintf(stderr, "NetPIPE: Synchronization string incorrect!\n");
-	exit(3);
-      }
+	if (write(p->commfd, s, strlen(s)) < 0 ||
+	    readFully(p->commfd, response, strlen(s)) < 0) {
+		perror
+		    ("NetPIPE: error writing or reading synchronization string");
+		exit(3);
+	}
+	if (strncmp(s, response, strlen(s))) {
+		fprintf(stderr, "NetPIPE: Synchronization string incorrect!\n");
+		exit(3);
+	}
 }
 
-void PrepareToReceive(ArgStruct *p)
+void PrepareToReceive(ArgStruct * p)
 {
 	/*
-	  The Berkeley sockets interface doesn't have a method to pre-post
-	  a buffer for reception of data.
-	*/
+	   The Berkeley sockets interface doesn't have a method to pre-post
+	   a buffer for reception of data.
+	 */
 }
 
-void SendData(ArgStruct *p)
+void SendData(ArgStruct * p)
 {
-    int bytesWritten, bytesLeft;
-    char *q;
+	int bytesWritten, bytesLeft;
+	char *q;
 
-    bytesLeft = p->bufflen;
-    bytesWritten = 0;
-    q = p->buff;
-    while (bytesLeft > 0 &&
-	   (bytesWritten = write(p->commfd, q, bytesLeft)) > 0)
-      {
-	bytesLeft -= bytesWritten;
-	q += bytesWritten;
-      }
-    if (bytesWritten == -1)
-      {
-	printf("NetPIPE: write: error encountered, errno=%d\n", errno);
-	exit(401);
-      }
+	bytesLeft = p->bufflen;
+	bytesWritten = 0;
+	q = p->buff;
+	while (bytesLeft > 0 &&
+	       (bytesWritten = write(p->commfd, q, bytesLeft)) > 0) {
+		bytesLeft -= bytesWritten;
+		q += bytesWritten;
+	}
+	if (bytesWritten == -1) {
+		printf("NetPIPE: write: error encountered, errno=%d\n", errno);
+		exit(401);
+	}
 }
 
-void RecvData(ArgStruct *p)
+void RecvData(ArgStruct * p)
 {
-    int bytesLeft;
-    int bytesRead;
-    char *q;
+	int bytesLeft;
+	int bytesRead;
+	char *q;
 
-    bytesLeft = p->bufflen;
-    bytesRead = 0;
-    q = p->buff1;
-    while (bytesLeft > 0 &&
-	   (bytesRead = read(p->commfd, q, bytesLeft)) > 0)
-      {
-	bytesLeft -= bytesRead;
-	q += bytesRead;
-      }
-    if (bytesLeft > 0 && bytesRead == 0)
-      {
-	printf("NetPIPE: \"end of file\" encountered on reading from socket\n");
-      }
-    else if (bytesRead == -1)
-      {
-	printf("NetPIPE: read: error encountered, errno=%d\n", errno);
-	exit(401);
-      }
+	bytesLeft = p->bufflen;
+	bytesRead = 0;
+	q = p->buff1;
+	while (bytesLeft > 0 && (bytesRead = read(p->commfd, q, bytesLeft)) > 0) {
+		bytesLeft -= bytesRead;
+		q += bytesRead;
+	}
+	if (bytesLeft > 0 && bytesRead == 0) {
+		printf
+		    ("NetPIPE: \"end of file\" encountered on reading from socket\n");
+	} else if (bytesRead == -1) {
+		printf("NetPIPE: read: error encountered, errno=%d\n", errno);
+		exit(401);
+	}
 }
 
-void SendTime(ArgStruct *p, double *t)
+void SendTime(ArgStruct * p, double *t)
 {
-    unsigned int ltime, ntime;
+	unsigned int ltime, ntime;
 
-    /*
-      Multiply the number of seconds by 1e6 to get time in microseconds
-      and convert value to an unsigned 32-bit integer.
-      */
-    ltime = (unsigned int)(*t * 1.e6);
+	/*
+	   Multiply the number of seconds by 1e6 to get time in microseconds
+	   and convert value to an unsigned 32-bit integer.
+	 */
+	ltime = (unsigned int)(*t * 1.e6);
 
-    /* Send time in network order */
-    ntime = htonl(ltime);
-    if (write(p->commfd, (char *)&ntime, sizeof(unsigned int)) < 0)
-      {
-	printf("NetPIPE: write failed in SendTime: errno=%d\n", errno);
-	exit(301);
-      }
+	/* Send time in network order */
+	ntime = htonl(ltime);
+	if (write(p->commfd, (char *)&ntime, sizeof(unsigned int)) < 0) {
+		printf("NetPIPE: write failed in SendTime: errno=%d\n", errno);
+		exit(301);
+	}
 }
 
-void RecvTime(ArgStruct *p, double *t)
+void RecvTime(ArgStruct * p, double *t)
 {
-    unsigned int ltime, ntime;
-    int bytesRead;
+	unsigned int ltime, ntime;
+	int bytesRead;
 
-    bytesRead = readFully(p->commfd, (void *)&ntime, sizeof(unsigned int));
-    if (bytesRead < 0)
-      {
-	printf("NetPIPE: read failed in RecvTime: errno=%d\n", errno);
-	exit(302);
-      }
-    else if (bytesRead != sizeof(unsigned int))
-      {
-	fprintf(stderr, "NetPIPE: partial read in RecvTime of %d bytes\n",
-		bytesRead);
-	exit(303);
-      }
-    ltime = ntohl(ntime);
+	bytesRead = readFully(p->commfd, (void *)&ntime, sizeof(unsigned int));
+	if (bytesRead < 0) {
+		printf("NetPIPE: read failed in RecvTime: errno=%d\n", errno);
+		exit(302);
+	} else if (bytesRead != sizeof(unsigned int)) {
+		fprintf(stderr,
+			"NetPIPE: partial read in RecvTime of %d bytes\n",
+			bytesRead);
+		exit(303);
+	}
+	ltime = ntohl(ntime);
 
-    /* Result is ltime (in microseconds) divided by 1.0e6 to get seconds */
-    *t = (double)ltime / 1.0e6;
+	/* Result is ltime (in microseconds) divided by 1.0e6 to get seconds */
+	*t = (double)ltime / 1.0e6;
 }
 
-void SendRepeat(ArgStruct *p, int rpt)
+void SendRepeat(ArgStruct * p, int rpt)
 {
-  unsigned int lrpt, nrpt;
+	unsigned int lrpt, nrpt;
 
-  lrpt = rpt;
-  /* Send repeat count as an unsigned 32 bit integer in network order */
-  nrpt = htonl(lrpt);
-  if (write(p->commfd, (void *) &nrpt, sizeof(unsigned int)) < 0)
-    {
-      printf("NetPIPE: write failed in SendRepeat: errno=%d\n", errno);
-      exit(304);
-    }
+	lrpt = rpt;
+	/* Send repeat count as an unsigned 32 bit integer in network order */
+	nrpt = htonl(lrpt);
+	if (write(p->commfd, (void *)&nrpt, sizeof(unsigned int)) < 0) {
+		printf("NetPIPE: write failed in SendRepeat: errno=%d\n",
+		       errno);
+		exit(304);
+	}
 }
 
-void RecvRepeat(ArgStruct *p, int *rpt)
+void RecvRepeat(ArgStruct * p, int *rpt)
 {
-  unsigned int lrpt, nrpt;
-  int bytesRead;
+	unsigned int lrpt, nrpt;
+	int bytesRead;
 
-  bytesRead = readFully(p->commfd, (void *)&nrpt, sizeof(unsigned int));
-  if (bytesRead < 0)
-    {
-      printf("NetPIPE: read failed in RecvRepeat: errno=%d\n", errno);
-      exit(305);
-    }
-  else if (bytesRead != sizeof(unsigned int))
-    {
-      fprintf(stderr, "NetPIPE: partial read in RecvRepeat of %d bytes\n",
-	      bytesRead);
-      exit(306);
-    }
-  lrpt = ntohl(nrpt);
+	bytesRead = readFully(p->commfd, (void *)&nrpt, sizeof(unsigned int));
+	if (bytesRead < 0) {
+		printf("NetPIPE: read failed in RecvRepeat: errno=%d\n", errno);
+		exit(305);
+	} else if (bytesRead != sizeof(unsigned int)) {
+		fprintf(stderr,
+			"NetPIPE: partial read in RecvRepeat of %d bytes\n",
+			bytesRead);
+		exit(306);
+	}
+	lrpt = ntohl(nrpt);
 
-  *rpt = lrpt;
+	*rpt = lrpt;
 }
 
-int Establish(ArgStruct *p)
+int Establish(ArgStruct * p)
 {
- socklen_t clen;
- int one = 1;
- struct protoent *proto;
+	socklen_t clen;
+	int one = 1;
+	struct protoent *proto;
 
- clen = sizeof(p->prot.sin2);
- if (p->tr) {
-   if (connect(p->commfd, (struct sockaddr *) &(p->prot.sin1),
-	      sizeof(p->prot.sin1)) < 0) {
-     printf("Client: Cannot Connect! errno=%d\n",errno);
-     exit(-10);
-   }
-  }
-  else {
-    /* SERVER */
-    listen(p->servicefd, 5);
-    p->commfd = accept(p->servicefd, (struct sockaddr *) &(p->prot.sin2),
-		       &clen);
+	clen = sizeof(p->prot.sin2);
+	if (p->tr) {
+		if (connect(p->commfd, (struct sockaddr *)&(p->prot.sin1),
+			    sizeof(p->prot.sin1)) < 0) {
+			printf("Client: Cannot Connect! errno=%d\n", errno);
+			exit(-10);
+		}
+	} else {
+		/* SERVER */
+		listen(p->servicefd, 5);
+		p->commfd =
+		    accept(p->servicefd, (struct sockaddr *)&(p->prot.sin2),
+			   &clen);
 
-    if (p->commfd < 0) {
-      printf("Server: Accept Failed! errno=%d\n",errno);
-      exit(-12);
-    }
+		if (p->commfd < 0) {
+			printf("Server: Accept Failed! errno=%d\n", errno);
+			exit(-12);
+		}
 
-    /*
-      Attempt to set TCP_NODELAY. TCP_NODELAY may or may not be propagated
-      to accepted sockets.
-     */
-    if (!(proto = getprotobyname("tcp"))) {
-      printf("unknown protocol!\n");
-      exit(555);
-    }
+		/*
+		   Attempt to set TCP_NODELAY. TCP_NODELAY may or may not be propagated
+		   to accepted sockets.
+		 */
+		if (!(proto = getprotobyname("tcp"))) {
+			printf("unknown protocol!\n");
+			exit(555);
+		}
 
-    if (setsockopt(p->commfd, proto->p_proto, TCP_NODELAY,
-		  &one, sizeof(one)) < 0)
-    {
-      printf("setsockopt: TCP_NODELAY failed! errno=%d\n", errno);
-      exit(556);
-    }
+		if (setsockopt(p->commfd, proto->p_proto, TCP_NODELAY,
+			       &one, sizeof(one)) < 0) {
+			printf("setsockopt: TCP_NODELAY failed! errno=%d\n",
+			       errno);
+			exit(556);
+		}
 
-    /* If requested, set the send and receive buffer sizes */
-    if (p->prot.sndbufsz > 0)
-    {
-      printf("Send and Receive Buffers on accepted socket set to %d bytes\n",
-	     p->prot.sndbufsz);
-      if (setsockopt(p->commfd, SOL_SOCKET, SO_SNDBUF, &(p->prot.sndbufsz),
-                                       sizeof(p->prot.sndbufsz)) < 0)
-      {
-		 printf("setsockopt: SO_SNDBUF failed! errno=%d\n", errno);
-	exit(556);
-      }
-      if (setsockopt(p->commfd, SOL_SOCKET, SO_RCVBUF, &(p->prot.rcvbufsz),
-                                       sizeof(p->prot.rcvbufsz)) < 0)
-      {
-		 printf("setsockopt: SO_RCVBUF failed! errno=%d\n", errno);
-	exit(556);
-      }
-    }
-  }
-  return(0);
+		/* If requested, set the send and receive buffer sizes */
+		if (p->prot.sndbufsz > 0) {
+			printf
+			    ("Send and Receive Buffers on accepted socket set to %d bytes\n",
+			     p->prot.sndbufsz);
+			if (setsockopt
+			    (p->commfd, SOL_SOCKET, SO_SNDBUF,
+			     &(p->prot.sndbufsz),
+			     sizeof(p->prot.sndbufsz)) < 0) {
+				printf
+				    ("setsockopt: SO_SNDBUF failed! errno=%d\n",
+				     errno);
+				exit(556);
+			}
+			if (setsockopt
+			    (p->commfd, SOL_SOCKET, SO_RCVBUF,
+			     &(p->prot.rcvbufsz),
+			     sizeof(p->prot.rcvbufsz)) < 0) {
+				printf
+				    ("setsockopt: SO_RCVBUF failed! errno=%d\n",
+				     errno);
+				exit(556);
+			}
+		}
+	}
+	return (0);
 }
 
-int CleanUp(ArgStruct *p)
+int CleanUp(ArgStruct * p)
 {
- char *quit="QUIT";
- if (p->tr)
- {
-     write(p->commfd,quit, 5);
-     read(p->commfd, quit, 5);
-     close(p->commfd);
- }
- else
- {
-     read(p->commfd,quit, 5);
-     write(p->commfd,quit,5);
-     close(p->commfd);
-     close(p->servicefd);
- }
- return(0);
+	char *quit = "QUIT";
+	if (p->tr) {
+		write(p->commfd, quit, 5);
+		read(p->commfd, quit, 5);
+		close(p->commfd);
+	} else {
+		read(p->commfd, quit, 5);
+		write(p->commfd, quit, 5);
+		close(p->commfd);
+		close(p->servicefd);
+	}
+	return (0);
 }
diff --git a/tools/netpipe-2.4/netpipe.c b/tools/netpipe-2.4/netpipe.c
index 60673e0..a7d6507 100644
--- a/tools/netpipe-2.4/netpipe.c
+++ b/tools/netpipe-2.4/netpipe.c
@@ -22,487 +22,481 @@
 
 extern char *optarg;
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    FILE        *out;           /* Output data file                          */
-    char        s[255];         /* Generic string                            */
-    char        *memtmp;
-    char        *memtmp1;
+	FILE *out;		/* Output data file                          */
+	char s[255];		/* Generic string                            */
+	char *memtmp;
+	char *memtmp1;
 
-    int         c,              /* option index                              */
-                i, j, n, nq,    /* Loop indices                              */
-		asyncReceive=0, /* Pre-post a receive buffer?                */
-                bufoffset=0,    /* Align buffer to this                      */
-                bufalign=16*1024,/* Boundary to align buffer to              */
-		errFlag,        /* Error occurred in inner testing loop      */
-                nrepeat,        /* Number of time to do the transmission     */
-                len,            /* Number of bytes to be transmitted         */
-                inc=0,          /* Increment value                           */
-                trans=-1,       /* Transmitter flag. 1 if transmitting.      */
-                detailflag=0,   /* Set to examine the signature curve detail */
-                bufszflag=0,    /* Set to change the TCP socket buffer size  */
-                pert,           /* Perturbation value                        */
-                start=1,        /* Starting value for signature curve        */
-                end=MAXINT,     /* Ending value for signature curve          */
-                streamopt=0,    /* Streaming mode flag                       */
-                printopt=0;     /* Debug print statements flag               */
+	int c,			/* option index                              */
+	 i, j, n, nq,		/* Loop indices                              */
+	 asyncReceive = 0,	/* Pre-post a receive buffer?                */
+	    bufoffset = 0,	/* Align buffer to this                      */
+	    bufalign = 16 * 1024,	/* Boundary to align buffer to              */
+	    errFlag,		/* Error occurred in inner testing loop      */
+	    nrepeat,		/* Number of time to do the transmission     */
+	    len,		/* Number of bytes to be transmitted         */
+	    inc = 0,		/* Increment value                           */
+	    trans = -1,		/* Transmitter flag. 1 if transmitting.      */
+	    detailflag = 0,	/* Set to examine the signature curve detail */
+	    bufszflag = 0,	/* Set to change the TCP socket buffer size  */
+	    pert,		/* Perturbation value                        */
+	    start = 1,		/* Starting value for signature curve        */
+	    end = MAXINT,	/* Ending value for signature curve          */
+	    streamopt = 0,	/* Streaming mode flag                       */
+	    printopt = 0;	/* Debug print statements flag               */
 
-    ArgStruct   args;           /* Argumentsfor all the calls                */
+	ArgStruct args;		/* Argumentsfor all the calls                */
 
-    double      t, t0, t1, t2,  /* Time variables                            */
-                tlast,          /* Time for the last transmission            */
-                latency;        /* Network message latency                   */
+	double t, t0, t1, t2,	/* Time variables                            */
+	 tlast,			/* Time for the last transmission            */
+	 latency;		/* Network message latency                   */
 
-    Data        bwdata[NSAMP];  /* Bandwidth curve data                      */
+	Data bwdata[NSAMP];	/* Bandwidth curve data                      */
 
-    short       port=DEFPORT;   /* Port number for connection                */
+	short port = DEFPORT;	/* Port number for connection                */
 #ifdef HAVE_GETRUSAGE
-    struct rusage prev_rusage, curr_rusage; /* Resource usage                */
-    double	user_time, sys_time;	/* User & system time used                   */
-    double	best_user_time, best_sys_time; /* Total user & system time used     */
-    double      ut1, ut2, st1, st2; /* User & system time ctrs for variance  */
-    double	ut_var, st_var;	/* Variance in user & system time            */
+	struct rusage prev_rusage, curr_rusage;	/* Resource usage                */
+	double user_time, sys_time;	/* User & system time used                   */
+	double best_user_time, best_sys_time;	/* Total user & system time used     */
+	double ut1, ut2, st1, st2;	/* User & system time ctrs for variance  */
+	double ut_var, st_var;	/* Variance in user & system time            */
 #endif
 
 #ifdef MPI
-    MPI_Init(&argc, &argv);
+	MPI_Init(&argc, &argv);
 #endif
 
-    strcpy(s, "NetPIPE.out");
+	strcpy(s, "NetPIPE.out");
 #ifndef MPI
-    if (argc < 2)
-     PrintUsage();
+	if (argc < 2)
+		PrintUsage();
 #endif
 
-    /* Parse the arguments. See Usage for description */
-    while ((c = getopt(argc, argv, "Pstrh:p:o:A:O:l:u:i:b:a")) != -1)
-    {
-        switch(c)
-        {
-            case 'o': strcpy(s,optarg);
-                      break;
+	/* Parse the arguments. See Usage for description */
+	while ((c = getopt(argc, argv, "Pstrh:p:o:A:O:l:u:i:b:a")) != -1) {
+		switch (c) {
+		case 'o':
+			strcpy(s, optarg);
+			break;
 
-            case 't': trans = 1;
-                      break;
+		case 't':
+			trans = 1;
+			break;
 
-            case 'r': trans = 0;
-                      break;
+		case 'r':
+			trans = 0;
+			break;
 
-            case 's': streamopt = 1;
-                      break;
+		case 's':
+			streamopt = 1;
+			break;
 
-            case 'l': /*detailflag = 1;*/
-                      start = atoi(optarg);
-                      if (start < 1)
-                      {
-                        fprintf(stderr,"Need a starting value >= 1\n");
-                        exit(743);
-                      }
-                      break;
+		case 'l':	/*detailflag = 1; */
+			start = atoi(optarg);
+			if (start < 1) {
+				fprintf(stderr, "Need a starting value >= 1\n");
+				exit(743);
+			}
+			break;
 
-            case 'u': /*detailflag = 1;*/
-                      end = atoi(optarg);
-                      break;
+		case 'u':	/*detailflag = 1; */
+			end = atoi(optarg);
+			break;
 
-            case 'i': detailflag = 1;
-                      inc = atoi(optarg);
-                      break;
+		case 'i':
+			detailflag = 1;
+			inc = atoi(optarg);
+			break;
 
-            case 'b': bufszflag = 1;
+		case 'b':
+			bufszflag = 1;
 #ifdef TCP
-                      args.prot.rcvbufsz=atoi(optarg);
-                      args.prot.sndbufsz=args.prot.rcvbufsz;
+			args.prot.rcvbufsz = atoi(optarg);
+			args.prot.sndbufsz = args.prot.rcvbufsz;
 #endif
-                      break;
+			break;
 
-            case 'P': printopt = 1;
-                      break;
+		case 'P':
+			printopt = 1;
+			break;
 
-            case 'A': bufalign = atoi(optarg);
-                      break;
+		case 'A':
+			bufalign = atoi(optarg);
+			break;
 
-            case 'O': bufoffset = atoi(optarg);
-                      break;
+		case 'O':
+			bufoffset = atoi(optarg);
+			break;
 
-            case 'p': port = atoi(optarg);
-                      break;
+		case 'p':
+			port = atoi(optarg);
+			break;
 
-            case 'h': if (trans == 1)
-                      {
-                          args.host = (char *)malloc(strlen(optarg)+1);
-                          strcpy(args.host, optarg);
-                      }
-		      else
-		      {
-			  fprintf(stderr, "Error: -t must be specified before -h\n");
-			  exit(-11);
-		      }
-                      break;
+		case 'h':
+			if (trans == 1) {
+				args.host = (char *)malloc(strlen(optarg) + 1);
+				strcpy(args.host, optarg);
+			} else {
+				fprintf(stderr,
+					"Error: -t must be specified before -h\n");
+				exit(-11);
+			}
+			break;
 
-	    case 'a': asyncReceive = 1;
-		      break;
+		case 'a':
+			asyncReceive = 1;
+			break;
 
-            default:  PrintUsage();
-                      exit(-12);
-        }
-    }
-    if (start > end)
-    {
-        fprintf(stderr, "Start MUST be LESS than end\n");
-        exit(420132);
-    }
+		default:
+			PrintUsage();
+			exit(-12);
+		}
+	}
+	if (start > end) {
+		fprintf(stderr, "Start MUST be LESS than end\n");
+		exit(420132);
+	}
 #if defined(TCP) || defined(PVM)
-    /*
-      It should be explicitly specified whether this is the transmitter
-      or the receiver.
-    */
-    if (trans < 0)
-    {
-	fprintf(stderr, "Error: either -t or -r must be specified\n");
-	exit(-11);
-    }
+	/*
+	   It should be explicitly specified whether this is the transmitter
+	   or the receiver.
+	 */
+	if (trans < 0) {
+		fprintf(stderr, "Error: either -t or -r must be specified\n");
+		exit(-11);
+	}
 #endif
 
-    args.nbuff = TRIALS;
-    args.tr = trans;
-    args.port = port;
+	args.nbuff = TRIALS;
+	args.tr = trans;
+	args.port = port;
 
 #if defined(TCP)
-    if (!bufszflag)
-    {
-        args.prot.sndbufsz = 0;
-        args.prot.rcvbufsz = 0;
-    }
-    else
-        fprintf(stderr,"Send and Recv Buffers are %d bytes\n",
-                                                   args.prot.sndbufsz);
+	if (!bufszflag) {
+		args.prot.sndbufsz = 0;
+		args.prot.rcvbufsz = 0;
+	} else
+		fprintf(stderr, "Send and Recv Buffers are %d bytes\n",
+			args.prot.sndbufsz);
 #endif
 
-    Setup(&args);
-    Establish(&args);
+	Setup(&args);
+	Establish(&args);
 
-    if (args.tr)
-    {
-        if ((out = fopen(s, "w")) == NULL)
-        {
-            fprintf(stderr,"Can't open %s for output\n", s);
-            exit(1);
-        }
-    }
-    else
-        out = stdout;
+	if (args.tr) {
+		if ((out = fopen(s, "w")) == NULL) {
+			fprintf(stderr, "Can't open %s for output\n", s);
+			exit(1);
+		}
+	} else
+		out = stdout;
 
-    args.bufflen = 1;
-    args.buff = (char *)malloc(args.bufflen);
-    args.buff1 = (char *)malloc(args.bufflen);
-    if (asyncReceive)
-	PrepareToReceive(&args);
-    Sync(&args);
-    t0 = When();
-    t0 = When();
-    t0 = When();
-#ifdef HAVE_GETRUSAGE
-    getrusage(RUSAGE_SELF, &prev_rusage);
-#endif
-    t0 = When();
-    for (i = 0; i < LATENCYREPS; i++)
-    {
-        if (args.tr)
-        {
-            SendData(&args);
-            RecvData(&args);
-	    if (asyncReceive && (i < LATENCYREPS - 1))
-	    {
+	args.bufflen = 1;
+	args.buff = (char *)malloc(args.bufflen);
+	args.buff1 = (char *)malloc(args.bufflen);
+	if (asyncReceive)
 		PrepareToReceive(&args);
-	    }
-        }
-        else
-        {
-            RecvData(&args);
-	    if (asyncReceive && (i < LATENCYREPS - 1))
-	    {
-		PrepareToReceive(&args);
-	    }
-            SendData(&args);
-        }
-    }
-    latency = (When() - t0)/(2 * LATENCYREPS);
+	Sync(&args);
+	t0 = When();
+	t0 = When();
+	t0 = When();
 #ifdef HAVE_GETRUSAGE
-    getrusage(RUSAGE_SELF, &curr_rusage);
+	getrusage(RUSAGE_SELF, &prev_rusage);
 #endif
-    free(args.buff);
-    free(args.buff1);
-
-
-    if (args.tr)
-    {
-        SendTime(&args, &latency);
-    }
-    else
-    {
-        RecvTime(&args, &latency);
-    }
-    if (args.tr && printopt)
-    {
-        fprintf(stderr,"Latency: %.7f\n", latency);
-        fprintf(stderr,"Now starting main loop\n");
-    }
-    tlast = latency;
-    if (inc == 0)
-    {
-	/* Set a starting value for the message size increment. */
-	inc = (start > 1) ? start / 2 : 1;
-    }
-
-    /* Main loop of benchmark */
-    for (nq = n = 0, len = start, errFlag = 0;
-         n < NSAMP - 3 && tlast < STOPTM && len <= end && !errFlag;
-         len = len + inc, nq++ )
-    {
-        if (nq > 2 && !detailflag)
-	  {
-	    /*
-	      This has the effect of exponentially increasing the block
-	      size.  If detailflag is false, then the block size is
-	      linearly increased (the increment is not adjusted).
-	    */
-            inc = ((nq % 2))? inc + inc: inc;
-	  }
-
-        /* This is a perturbation loop to test nearby values */
-        for (pert = (!detailflag && inc > PERT+1)? -PERT: 0;
-             pert <= PERT;
-             n++, pert += (!detailflag && inc > PERT+1)? PERT: PERT+1)
-        {
-
-            /* Calculate how many times to repeat the experiment. */
-            if (args.tr)
-            {
-                nrepeat = MAX((RUNTM / ((double)args.bufflen /
-                                 (args.bufflen - inc + 1.0) * tlast)), TRIALS);
-                SendRepeat(&args, nrepeat);
-            }
-            else
-            {
-                RecvRepeat(&args, &nrepeat);
-            }
-
-            /* Allocate the buffer */
-            args.bufflen = len + pert;
-            if ((args.buff=(char *)malloc(args.bufflen+bufalign))==(char *)NULL)
-            {
-                fprintf(stderr,"Couldn't allocate memory\n");
-		errFlag = -1;
-                break;
-            }
-            if ((args.buff1=(char *)malloc(args.bufflen+bufalign))==(char *)NULL)
-            {
-                fprintf(stderr,"Couldn't allocate memory\n");
-		errFlag = -1;
-                break;
-            }
-            /*
-	      Possibly align the data buffer: make memtmp and memtmp1
-	      point to the original blocks (so they can be freed later),
-	      then adjust args.buff and args.buff1 if the user requested it.
-	    */
-            memtmp = args.buff;
-            memtmp1 = args.buff1;
-            if (bufalign != 0)
-                args.buff +=(bufalign -
-                        ((int)(*args.buff) % bufalign) + bufoffset) % bufalign;
-
-            if (bufalign != 0)
-                args.buff1 +=(bufalign -
-                        ((int)(*args.buff1) % bufalign) + bufoffset) % bufalign;
-
-
-            if (args.tr && printopt)
-                fprintf(stderr,"%3d: %9d bytes %4d times --> ",
-                                 n,args.bufflen,nrepeat);
-
-            /* Finally, we get to transmit or receive and time */
-            if (args.tr)
-            {
-		/*
-		   This is the transmitter: send the block TRIALS times, and
-		   if we are not streaming, expect the receiver to return each
-		   block.
-		*/
-                bwdata[n].t = LONGTIME;
-                t2 = t1 = 0;
-#ifdef HAVE_GETRUSAGE
-		ut1 = ut2 = st1 = st2 = 0.0;
-		best_user_time = best_sys_time = LONGTIME;
-#endif
-                for (i = 0; i < TRIALS; i++)
-                {
-                    Sync(&args);
-#ifdef HAVE_GETRUSAGE
-		    getrusage(RUSAGE_SELF, &prev_rusage);
-#endif
-                    t0 = When();
-                    for (j = 0; j < nrepeat; j++)
-                    {
-			if (asyncReceive && !streamopt)
-			{
-			    PrepareToReceive(&args);
+	t0 = When();
+	for (i = 0; i < LATENCYREPS; i++) {
+		if (args.tr) {
+			SendData(&args);
+			RecvData(&args);
+			if (asyncReceive && (i < LATENCYREPS - 1)) {
+				PrepareToReceive(&args);
 			}
-                        SendData(&args);
-                        if (!streamopt)
-			{
-                            RecvData(&args);
+		} else {
+			RecvData(&args);
+			if (asyncReceive && (i < LATENCYREPS - 1)) {
+				PrepareToReceive(&args);
 			}
-                    }
-                    t = (When() - t0)/((1 + !streamopt) * nrepeat);
+			SendData(&args);
+		}
+	}
+	latency = (When() - t0) / (2 * LATENCYREPS);
 #ifdef HAVE_GETRUSAGE
-		    getrusage(RUSAGE_SELF, &curr_rusage);
-		    user_time = ((curr_rusage.ru_utime.tv_sec -
-			      prev_rusage.ru_utime.tv_sec) + (double)
-			     (curr_rusage.ru_utime.tv_usec -
-			      prev_rusage.ru_utime.tv_usec) * 1.0E-6) /
-		      ((1 + !streamopt) * nrepeat);
-		    sys_time = ((curr_rusage.ru_stime.tv_sec -
-			      prev_rusage.ru_stime.tv_sec) + (double)
-			     (curr_rusage.ru_stime.tv_usec -
-			      prev_rusage.ru_stime.tv_usec) * 1.0E-6) /
-		      ((1 + !streamopt) * nrepeat);
-		    ut2 += user_time * user_time;
-		    st2 += sys_time * sys_time;
-		    ut1 += user_time;
-		    st1 += sys_time;
-		    if ((user_time + sys_time) < (best_user_time + best_sys_time))
-		    {
-			best_user_time = user_time;
-			best_sys_time = sys_time;
-		    }
+	getrusage(RUSAGE_SELF, &curr_rusage);
 #endif
+	free(args.buff);
+	free(args.buff1);
 
-                    if (!streamopt)
-                    {
-                        t2 += t*t;
-                        t1 += t;
-                        bwdata[n].t = MIN(bwdata[n].t, t);
-                    }
-                }
-                if (!streamopt)
-                    SendTime(&args, &bwdata[n].t);
-                else
-                    RecvTime(&args, &bwdata[n].t);
+	if (args.tr) {
+		SendTime(&args, &latency);
+	} else {
+		RecvTime(&args, &latency);
+	}
+	if (args.tr && printopt) {
+		fprintf(stderr, "Latency: %.7f\n", latency);
+		fprintf(stderr, "Now starting main loop\n");
+	}
+	tlast = latency;
+	if (inc == 0) {
+		/* Set a starting value for the message size increment. */
+		inc = (start > 1) ? start / 2 : 1;
+	}
 
-                if (!streamopt)
-                    bwdata[n].variance = t2/TRIALS - t1/TRIALS * t1/TRIALS;
+	/* Main loop of benchmark */
+	for (nq = n = 0, len = start, errFlag = 0;
+	     n < NSAMP - 3 && tlast < STOPTM && len <= end && !errFlag;
+	     len = len + inc, nq++) {
+		if (nq > 2 && !detailflag) {
+			/*
+			   This has the effect of exponentially increasing the block
+			   size.  If detailflag is false, then the block size is
+			   linearly increased (the increment is not adjusted).
+			 */
+			inc = ((nq % 2)) ? inc + inc : inc;
+		}
 
-#ifdef HAVE_GETRUSAGE
-		ut_var = ut2/TRIALS - (ut1/TRIALS) * (ut1/TRIALS);
-		st_var = st2/TRIALS - (st1/TRIALS) * (st1/TRIALS);
-#endif
+		/* This is a perturbation loop to test nearby values */
+		for (pert = (!detailflag && inc > PERT + 1) ? -PERT : 0;
+		     pert <= PERT;
+		     n++, pert += (!detailflag
+				   && inc > PERT + 1) ? PERT : PERT + 1) {
 
-            }
-            else
-            {
-		/*
-		   This is the receiver: receive the block TRIALS times, and
-		   if we are not streaming, send the block back to the
-		   sender.
-		*/
-                bwdata[n].t = LONGTIME;
-                t2 = t1 = 0;
-                for (i = 0; i < TRIALS; i++)
-                {
-		    if (asyncReceive)
-		    {
-		    	PrepareToReceive(&args);
-		    }
-                    Sync(&args);
-                    t0 = When();
-                    for (j = 0; j < nrepeat; j++)
-                    {
-                        RecvData(&args);
-			if (asyncReceive && (j < nrepeat - 1))
-			{
-			    PrepareToReceive(&args);
+			/* Calculate how many times to repeat the experiment. */
+			if (args.tr) {
+				nrepeat = MAX((RUNTM / ((double)args.bufflen /
+							(args.bufflen - inc +
+							 1.0) * tlast)),
+					      TRIALS);
+				SendRepeat(&args, nrepeat);
+			} else {
+				RecvRepeat(&args, &nrepeat);
 			}
-                        if (!streamopt)
-                            SendData(&args);
-                    }
-                    t = (When() - t0)/((1 + !streamopt) * nrepeat);
 
-                    if (streamopt)
-                    {
-                        t2 += t*t;
-                        t1 += t;
-                        bwdata[n].t = MIN(bwdata[n].t, t);
-                    }
-                }
-                if (streamopt)
-                    SendTime(&args, &bwdata[n].t);
-                else
-                    RecvTime(&args, &bwdata[n].t);
+			/* Allocate the buffer */
+			args.bufflen = len + pert;
+			if ((args.buff =
+			     (char *)malloc(args.bufflen + bufalign)) ==
+			    (char *)NULL) {
+				fprintf(stderr, "Couldn't allocate memory\n");
+				errFlag = -1;
+				break;
+			}
+			if ((args.buff1 =
+			     (char *)malloc(args.bufflen + bufalign)) ==
+			    (char *)NULL) {
+				fprintf(stderr, "Couldn't allocate memory\n");
+				errFlag = -1;
+				break;
+			}
+			/*
+			   Possibly align the data buffer: make memtmp and memtmp1
+			   point to the original blocks (so they can be freed later),
+			   then adjust args.buff and args.buff1 if the user requested it.
+			 */
+			memtmp = args.buff;
+			memtmp1 = args.buff1;
+			if (bufalign != 0)
+				args.buff += (bufalign -
+					      ((int)(*args.buff) % bufalign) +
+					      bufoffset) % bufalign;
 
-                if (streamopt)
-                    bwdata[n].variance = t2/TRIALS - t1/TRIALS * t1/TRIALS;
+			if (bufalign != 0)
+				args.buff1 += (bufalign -
+					       ((int)(*args.buff1) % bufalign) +
+					       bufoffset) % bufalign;
 
-            }
-            tlast = bwdata[n].t;
-            bwdata[n].bits = args.bufflen * CHARSIZE;
-            bwdata[n].bps = bwdata[n].bits / (bwdata[n].t * 1024 * 1024);
-            bwdata[n].repeat = nrepeat;
+			if (args.tr && printopt)
+				fprintf(stderr, "%3d: %9d bytes %4d times --> ",
+					n, args.bufflen, nrepeat);
 
-            if (args.tr)
-	    {
-		fprintf(out, "%.7f %.7f %d %d %.7f", bwdata[n].t, bwdata[n].bps,
-			bwdata[n].bits, bwdata[n].bits / 8,
-			bwdata[n].variance);
+			/* Finally, we get to transmit or receive and time */
+			if (args.tr) {
+				/*
+				   This is the transmitter: send the block TRIALS times, and
+				   if we are not streaming, expect the receiver to return each
+				   block.
+				 */
+				bwdata[n].t = LONGTIME;
+				t2 = t1 = 0;
 #ifdef HAVE_GETRUSAGE
-		fprintf(out, " %.7f %.7f %.7f %.7f", ut1 / (double) TRIALS,
-			st1 / (double) TRIALS, ut_var, st_var);
+				ut1 = ut2 = st1 = st2 = 0.0;
+				best_user_time = best_sys_time = LONGTIME;
 #endif
-		fprintf(out, "\n");
-	    }
-            fflush(out);
-
-            free(memtmp);
-            free(memtmp1);
-
-            if (args.tr && printopt)
-	    {
-        	fprintf(stderr," %6.2f Mbps in %.7f sec", bwdata[n].bps,
-			tlast);
+				for (i = 0; i < TRIALS; i++) {
+					Sync(&args);
 #ifdef HAVE_GETRUSAGE
-		fprintf(stderr, ", avg utime=%.7f avg stime=%.7f, ",
-			ut1 / (double) TRIALS,
-			st1 / (double) TRIALS);
-		fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_user_time,
-			best_sys_time);
-		fprintf(stderr, "utime var=%.7f stime var=%.7f", ut_var, st_var);
+					getrusage(RUSAGE_SELF, &prev_rusage);
 #endif
-		fprintf(stderr, "\n");
-	    }
-        } /* End of perturbation loop */
+					t0 = When();
+					for (j = 0; j < nrepeat; j++) {
+						if (asyncReceive && !streamopt) {
+							PrepareToReceive(&args);
+						}
+						SendData(&args);
+						if (!streamopt) {
+							RecvData(&args);
+						}
+					}
+					t = (When() -
+					     t0) / ((1 + !streamopt) * nrepeat);
+#ifdef HAVE_GETRUSAGE
+					getrusage(RUSAGE_SELF, &curr_rusage);
+					user_time =
+					    ((curr_rusage.ru_utime.tv_sec -
+					      prev_rusage.ru_utime.tv_sec) +
+					     (double)
+					     (curr_rusage.ru_utime.tv_usec -
+					      prev_rusage.ru_utime.tv_usec) *
+					     1.0E-6) / ((1 +
+							 !streamopt) * nrepeat);
+					sys_time =
+					    ((curr_rusage.ru_stime.tv_sec -
+					      prev_rusage.ru_stime.tv_sec) +
+					     (double)
+					     (curr_rusage.ru_stime.tv_usec -
+					      prev_rusage.ru_stime.tv_usec) *
+					     1.0E-6) / ((1 +
+							 !streamopt) * nrepeat);
+					ut2 += user_time * user_time;
+					st2 += sys_time * sys_time;
+					ut1 += user_time;
+					st1 += sys_time;
+					if ((user_time + sys_time) <
+					    (best_user_time + best_sys_time)) {
+						best_user_time = user_time;
+						best_sys_time = sys_time;
+					}
+#endif
 
-    } /* End of main loop  */
+					if (!streamopt) {
+						t2 += t * t;
+						t1 += t;
+						bwdata[n].t =
+						    MIN(bwdata[n].t, t);
+					}
+				}
+				if (!streamopt)
+					SendTime(&args, &bwdata[n].t);
+				else
+					RecvTime(&args, &bwdata[n].t);
 
-    if (args.tr)
-       fclose(out);
+				if (!streamopt)
+					bwdata[n].variance =
+					    t2 / TRIALS -
+					    t1 / TRIALS * t1 / TRIALS;
 
-    CleanUp(&args);
-    return(0);
+#ifdef HAVE_GETRUSAGE
+				ut_var =
+				    ut2 / TRIALS -
+				    (ut1 / TRIALS) * (ut1 / TRIALS);
+				st_var =
+				    st2 / TRIALS -
+				    (st1 / TRIALS) * (st1 / TRIALS);
+#endif
+
+			} else {
+				/*
+				   This is the receiver: receive the block TRIALS times, and
+				   if we are not streaming, send the block back to the
+				   sender.
+				 */
+				bwdata[n].t = LONGTIME;
+				t2 = t1 = 0;
+				for (i = 0; i < TRIALS; i++) {
+					if (asyncReceive) {
+						PrepareToReceive(&args);
+					}
+					Sync(&args);
+					t0 = When();
+					for (j = 0; j < nrepeat; j++) {
+						RecvData(&args);
+						if (asyncReceive
+						    && (j < nrepeat - 1)) {
+							PrepareToReceive(&args);
+						}
+						if (!streamopt)
+							SendData(&args);
+					}
+					t = (When() -
+					     t0) / ((1 + !streamopt) * nrepeat);
+
+					if (streamopt) {
+						t2 += t * t;
+						t1 += t;
+						bwdata[n].t =
+						    MIN(bwdata[n].t, t);
+					}
+				}
+				if (streamopt)
+					SendTime(&args, &bwdata[n].t);
+				else
+					RecvTime(&args, &bwdata[n].t);
+
+				if (streamopt)
+					bwdata[n].variance =
+					    t2 / TRIALS -
+					    t1 / TRIALS * t1 / TRIALS;
+
+			}
+			tlast = bwdata[n].t;
+			bwdata[n].bits = args.bufflen * CHARSIZE;
+			bwdata[n].bps =
+			    bwdata[n].bits / (bwdata[n].t * 1024 * 1024);
+			bwdata[n].repeat = nrepeat;
+
+			if (args.tr) {
+				fprintf(out, "%.7f %.7f %d %d %.7f",
+					bwdata[n].t, bwdata[n].bps,
+					bwdata[n].bits, bwdata[n].bits / 8,
+					bwdata[n].variance);
+#ifdef HAVE_GETRUSAGE
+				fprintf(out, " %.7f %.7f %.7f %.7f",
+					ut1 / (double)TRIALS,
+					st1 / (double)TRIALS, ut_var, st_var);
+#endif
+				fprintf(out, "\n");
+			}
+			fflush(out);
+
+			free(memtmp);
+			free(memtmp1);
+
+			if (args.tr && printopt) {
+				fprintf(stderr, " %6.2f Mbps in %.7f sec",
+					bwdata[n].bps, tlast);
+#ifdef HAVE_GETRUSAGE
+				fprintf(stderr,
+					", avg utime=%.7f avg stime=%.7f, ",
+					ut1 / (double)TRIALS,
+					st1 / (double)TRIALS);
+				fprintf(stderr, "min utime=%.7f stime=%.7f, ",
+					best_user_time, best_sys_time);
+				fprintf(stderr, "utime var=%.7f stime var=%.7f",
+					ut_var, st_var);
+#endif
+				fprintf(stderr, "\n");
+			}
+		}		/* End of perturbation loop */
+
+	}			/* End of main loop  */
+
+	if (args.tr)
+		fclose(out);
+
+	CleanUp(&args);
+	return (0);
 }
 
-
 /* Return the current time in seconds, using a double precision number.      */
-double
-When()
+double When()
 {
-    struct timeval tp;
-    gettimeofday(&tp, NULL);
-    return ((double) tp.tv_sec + (double) tp.tv_usec * 1e-6);
+	struct timeval tp;
+	gettimeofday(&tp, NULL);
+	return ((double)tp.tv_sec + (double)tp.tv_usec * 1e-6);
 }
 
-void
-PrintUsage(void)
+void PrintUsage(void)
 {
 	printf("\n NETPIPE USAGE \n\n");
 	printf("A: specify buffers alignment e.g.: <-A 1024>\n");
diff --git a/tools/pounder21/debug.c b/tools/pounder21/debug.c
index 93fe42c..4de7095 100644
--- a/tools/pounder21/debug.c
+++ b/tools/pounder21/debug.c
@@ -30,7 +30,8 @@
 
 #define BUF_LEN 256
 
-int pounder_fprintf(FILE *stream, const char *format, ...) {
+int pounder_fprintf(FILE * stream, const char *format, ...)
+{
 	struct timeval tv;
 	struct tm *time;
 	char buf[BUF_LEN];
@@ -67,7 +68,7 @@
 	return ret;
 }
 
-const char *fail_msg  = "\e[33;1mFAIL\e[0m";
-const char *pass_msg  = "\e[32;1mPASS\e[0m";
+const char *fail_msg = "\e[33;1mFAIL\e[0m";
+const char *pass_msg = "\e[32;1mPASS\e[0m";
 const char *abort_msg = "\e[31;1mABORT\e[0m";
 const char *start_msg = "\e[36;1mSTART\e[0m";
diff --git a/tools/pounder21/fancy_timed_loop.c b/tools/pounder21/fancy_timed_loop.c
index 78c52bf..cf8580e 100644
--- a/tools/pounder21/fancy_timed_loop.c
+++ b/tools/pounder21/fancy_timed_loop.c
@@ -36,20 +36,25 @@
 
 static int the_signal = SIGTERM;
 
-static void int_func(int signum) {
-	pounder_fprintf(tty_fp, "%s: Killed by interrupt.  Last exit code = %d.\n",
-		progname, res);
-	kill(-test_pgrp, the_signal);
-	exit(res);
-}
-static void alarm_func(int signum) {
-	pounder_fprintf(tty_fp, "%s: Killed by timer.  Last exit code = %d.\n",
-		progname, res);
+static void int_func(int signum)
+{
+	pounder_fprintf(tty_fp,
+			"%s: Killed by interrupt.  Last exit code = %d.\n",
+			progname, res);
 	kill(-test_pgrp, the_signal);
 	exit(res);
 }
 
-int main(int argc, char *argv[]) {
+static void alarm_func(int signum)
+{
+	pounder_fprintf(tty_fp, "%s: Killed by timer.  Last exit code = %d.\n",
+			progname, res);
+	kill(-test_pgrp, the_signal);
+	exit(res);
+}
+
+int main(int argc, char *argv[])
+{
 	int secs, stat;
 	pid_t pid;
 	unsigned int revs = 0;
@@ -61,23 +66,26 @@
 	int fail_counter = 1;
 
 	if (argc < 5) {
-		printf("Usage: %s [-m max_failures] time_in_sec uid gid signal command [args]\n", argv[0]);
+		printf
+		    ("Usage: %s [-m max_failures] time_in_sec uid gid signal command [args]\n",
+		     argv[0]);
 		exit(1);
 	}
-
 	//by default, set max_failures to whatever the env variable $MAX_FAILURES is
-        char *max_failures_env = getenv("MAX_FAILURES");
-        max_failures = atoi(max_failures_env);
+	char *max_failures_env = getenv("MAX_FAILURES");
+	max_failures = atoi(max_failures_env);
 
 	//if the -m option is used when calling fancy_timed_loop, override max_failures
 	//specified by $MAX_FAILURES with the given argument instead
 	if (argc > 6 && strcmp(argv[1], "-m") == 0) {
 		if ((max_failures = atoi(argv[2])) >= 0) {
 			use_max_failures = 1;
-		}
-		else {
-			printf("Usage: %s [-m max_failures] time_in_sec uid gid signal command [args]\n", argv[0]);
-			printf("max_failures should be a nonnegative integer\n");
+		} else {
+			printf
+			    ("Usage: %s [-m max_failures] time_in_sec uid gid signal command [args]\n",
+			     argv[0]);
+			printf
+			    ("max_failures should be a nonnegative integer\n");
 			exit(1);
 		}
 	}
@@ -98,8 +106,7 @@
 		} else {
 			progname++;
 		}
-	}
-	else {
+	} else {
 		progname = rindex(argv[5], '/');
 		if (progname == NULL) {
 			progname = argv[5];
@@ -126,8 +133,7 @@
 		the_signal = atoi(argv[6]);
 		uid = atoi(argv[4]);
 		gid = atoi(argv[5]);
-	}
-	else {
+	} else {
 		secs = atoi(argv[1]);
 		alarm(secs);
 
@@ -137,18 +143,17 @@
 	}
 
 	pounder_fprintf(tty_fp, "%s: uid = %d, gid = %d, sig = %d\n",
-		progname, uid, gid, the_signal);
+			progname, uid, gid, the_signal);
 
 	while (1) {
 		pounder_fprintf(tty_fp, "%s: %s loop #%d.\n", progname,
-			start_msg, revs++);
+				start_msg, revs++);
 		pid = fork();
 		if (pid == 0) {
 			// set process group
 			if (setpgrp() < 0) {
 				perror("setpgid");
 			}
-
 			// set group and user id
 			if (setregid(gid, gid) != 0) {
 				perror("setregid");
@@ -159,7 +164,6 @@
 				perror("setreuid");
 				exit(-1);
 			}
-
 			// run the program
 			if (use_max_failures) {
 				if (argc > 5) {
@@ -169,8 +173,7 @@
 				}
 
 				perror(argv[7]);
-			}
-			else {
+			} else {
 				if (argc > 3) {
 					stat = execvp(argv[5], &argv[5]);
 				} else {
@@ -191,24 +194,26 @@
 			perror("waitpid");
 			exit(1);
 		}
-
 		// interrogate it
 		if (WIFSIGNALED(stat)) {
 			pounder_fprintf(tty_fp, "%s: %s on signal %d.\n",
-				progname, fail_msg, WTERMSIG(stat));
+					progname, fail_msg, WTERMSIG(stat));
 			res = 255;
 		} else {
 			res = WEXITSTATUS(stat);
 			if (res == 0) {
-				pounder_fprintf(tty_fp, "%s: %s.\n", progname, pass_msg);
+				pounder_fprintf(tty_fp, "%s: %s.\n", progname,
+						pass_msg);
 			} else if (res < 0 || res == 255) {
-				pounder_fprintf(tty_fp, "%s: %s with code %d.\n",
-					progname, abort_msg, res);
+				pounder_fprintf(tty_fp,
+						"%s: %s with code %d.\n",
+						progname, abort_msg, res);
 				exit(-1);
 				// FIXME: add test to blacklist
 			} else {
-				pounder_fprintf(tty_fp, "%s: %s with code %d.\n",
-					progname, fail_msg, res);
+				pounder_fprintf(tty_fp,
+						"%s: %s with code %d.\n",
+						progname, fail_msg, res);
 				if (max_failures > 0) {
 					if (++fail_counter > max_failures) {
 						exit(-1);
diff --git a/tools/pounder21/infinite_loop.c b/tools/pounder21/infinite_loop.c
index 119af1f..d78b442 100644
--- a/tools/pounder21/infinite_loop.c
+++ b/tools/pounder21/infinite_loop.c
@@ -34,14 +34,17 @@
 static pid_t test_pgrp;
 static FILE *tty_fp;
 
-static void int_func(int signum) {
-	pounder_fprintf(tty_fp, "%s: Killed by interrupt.  Last exit code = %d.\n",
-		progname, res);
+static void int_func(int signum)
+{
+	pounder_fprintf(tty_fp,
+			"%s: Killed by interrupt.  Last exit code = %d.\n",
+			progname, res);
 	kill(-test_pgrp, SIGTERM);
 	exit(res);
 }
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	int stat;
 	pid_t pid;
 	struct sigaction zig;
@@ -54,20 +57,20 @@
 		printf("Usage: %s [-m max_failures] command [args]\n", argv[0]);
 		exit(1);
 	}
-
 	//by default, set max_failures to whatever the env variable $MAX_FAILURES is
-        char *max_failures_env = getenv("MAX_FAILURES");
-        max_failures = atoi(max_failures_env);
+	char *max_failures_env = getenv("MAX_FAILURES");
+	max_failures = atoi(max_failures_env);
 
 	//if the -m option is used when calling infinite_loop, override max_failures
 	//specified by $MAX_FAILURES with the given argument instead
 	if (argc > 3 && strcmp(argv[1], "-m") == 0) {
-		if((max_failures = atoi(argv[2])) >= 0) {
+		if ((max_failures = atoi(argv[2])) >= 0) {
 			use_max_failures = 1;
-		}
-		else {
-			printf("Usage: %s [-m max_failures] command [args]\n", argv[0]);
-			printf("max_failures should be a nonnegative integer\n");
+		} else {
+			printf("Usage: %s [-m max_failures] command [args]\n",
+			       argv[0]);
+			printf
+			    ("max_failures should be a nonnegative integer\n");
 			exit(1);
 		}
 	}
@@ -88,8 +91,7 @@
 		} else {
 			progname++;
 		}
-	}
-	else {
+	} else {
 		progname = rindex(argv[1], '/');
 		if (progname == NULL) {
 			progname = argv[1];
@@ -108,13 +110,13 @@
 	 * loop test and descendants easily */
 
 	while (1) {
-		pounder_fprintf(tty_fp, "%s: %s loop #%d.\n", progname, start_msg, revs++);
+		pounder_fprintf(tty_fp, "%s: %s loop #%d.\n", progname,
+				start_msg, revs++);
 		pid = fork();
 		if (pid == 0) {
 			if (setpgrp() < 0) {
 				perror("setpgid");
 			}
-
 			// run the program
 			if (use_max_failures) {
 				if (argc > 5) {
@@ -124,8 +126,7 @@
 				}
 
 				perror(argv[3]);
-			}
-			else {
+			} else {
 				if (argc > 3) {
 					stat = execvp(argv[1], &argv[1]);
 				} else {
@@ -146,27 +147,31 @@
 			perror("waitpid");
 			exit(1);
 		}
-
 		// interrogate it
 		if (WIFSIGNALED(stat)) {
 			pounder_fprintf(tty_fp, "%s: %s on signal %d.\n",
-				progname, fail_msg, WTERMSIG(stat));
+					progname, fail_msg, WTERMSIG(stat));
 			res = 255;
 		} else {
 			res = WEXITSTATUS(stat);
 			if (res == 0) {
-				pounder_fprintf(tty_fp, "%s: %s.\n", progname, pass_msg);
+				pounder_fprintf(tty_fp, "%s: %s.\n", progname,
+						pass_msg);
 			} else if (res < 0 || res == 255) {
-				pounder_fprintf(tty_fp, "%s: %s with code %d.\n",
-					progname, abort_msg, res);
+				pounder_fprintf(tty_fp,
+						"%s: %s with code %d.\n",
+						progname, abort_msg, res);
 				exit(-1);
 				// FIXME: add test to blacklist
 			} else {
-				pounder_fprintf(tty_fp, "%s: %s with code %d.\n",
-					progname, fail_msg, res);
+				pounder_fprintf(tty_fp,
+						"%s: %s with code %d.\n",
+						progname, fail_msg, res);
 				if (max_failures > 0) {
-					if(++fail_counter > max_failures) {
-						pounder_fprintf("Reached max number of failures allowed: %d. Aborting.", max_failures);
+					if (++fail_counter > max_failures) {
+						pounder_fprintf
+						    ("Reached max number of failures allowed: %d. Aborting.",
+						     max_failures);
 						exit(-1);
 					}
 				}
diff --git a/tools/pounder21/proclist.c b/tools/pounder21/proclist.c
index d279621..afc1ee6 100644
--- a/tools/pounder21/proclist.c
+++ b/tools/pounder21/proclist.c
@@ -22,7 +22,8 @@
 #include <malloc.h>
 #include "proclist.h"
 
-void add_to_proclist(struct proclist_t *list, struct proclist_item_t *item) {
+void add_to_proclist(struct proclist_t *list, struct proclist_item_t *item)
+{
 	struct proclist_item_t *curr;
 
 	if (list->head == NULL) {
@@ -40,7 +41,8 @@
 	curr->next = item;
 }
 
-void remove_from_proclist(struct proclist_t *list, struct proclist_item_t *item) {
+void remove_from_proclist(struct proclist_t *list, struct proclist_item_t *item)
+{
 	struct proclist_item_t *curr, *prev;
 
 	if (list->head == NULL) {
diff --git a/tools/pounder21/run.c b/tools/pounder21/run.c
index a03287b..dec2d3f 100644
--- a/tools/pounder21/run.c
+++ b/tools/pounder21/run.c
@@ -41,8 +41,9 @@
 #include "debug.h"
 
 // List of subprocesses to wait upon
-struct proclist_t wait_ons = {NULL};
-struct proclist_t daemons = {NULL};
+struct proclist_t wait_ons = { NULL };
+struct proclist_t daemons = { NULL };
+
 static int is_leader = 0;
 static char *pidfile = "";
 
@@ -68,7 +69,8 @@
 /**
  * Kill everything upon ^C.
  */
-static void jump_out(int signum) {
+static void jump_out(int signum)
+{
 	pounder_fprintf(stdout, "Control-C received; aborting!\n");
 	//unlink("pounder_pgrp");
 	kill_tests();
@@ -82,7 +84,8 @@
 /**
  * Kills tests launched from within.
  */
-static void kill_tests(void) {
+static void kill_tests(void)
+{
 	struct proclist_item_t *curr;
 
 	curr = wait_ons.head;
@@ -95,7 +98,8 @@
 /**
  * Kills daemons launched from within.
  */
-static void kill_daemons(void) {
+static void kill_daemons(void)
+{
 	struct proclist_item_t *curr;
 
 	curr = daemons.head;
@@ -108,7 +112,8 @@
 /**
  * Record the pounder leader's PID in a file.
  */
-static void record_pid(void) {
+static void record_pid(void)
+{
 	FILE *fp;
 
 	pidfile = getenv("POUNDER_PIDFILE");
@@ -128,7 +133,8 @@
  * Main program.  Returns 1 if all programs run successfully, 0 if
  * something failed and -1 if there was an error running programs.
  */
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	int retcode;
 	struct sigaction zig;
 	pid_t pid;
@@ -141,8 +147,9 @@
 	}
 
 	if (argc > 2 && strcmp(argv[2], "--leader") == 0) {
-		pounder_fprintf(stdout, "Logging this test output to %s/POUNDERLOG.\n",
-			getenv("POUNDER_LOGDIR"));
+		pounder_fprintf(stdout,
+				"Logging this test output to %s/POUNDERLOG.\n",
+				getenv("POUNDER_LOGDIR"));
 		is_leader = 1;
 		record_pid();
 	}
@@ -170,7 +177,6 @@
 				retcode = -1;
 				goto out;
 			}
-
 			// Track the test
 			note_process(pid, argv[1]);
 			if (wait_for_pids() == 0) {
@@ -179,8 +185,9 @@
 				retcode = 0;
 			}
 		} else {
-			pounder_fprintf(stderr, "%s: Not a directory or a test.\n",
-				argv[1]);
+			pounder_fprintf(stderr,
+					"%s: Not a directory or a test.\n",
+					argv[1]);
 			retcode = -1;
 		}
 	}
@@ -193,10 +200,10 @@
 			pounder_fprintf(stdout, "%s: %s.\n", argv[1], pass_msg);
 		} else if (retcode < 0 || retcode == 255) {
 			pounder_fprintf(stdout, "%s: %s with code %d.\n",
-				argv[1], abort_msg, retcode);
+					argv[1], abort_msg, retcode);
 		} else {
 			pounder_fprintf(stdout, "%s: %s with code %d.\n",
-				argv[1], fail_msg, retcode);
+					argv[1], fail_msg, retcode);
 		}
 		unlink(pidfile);
 	}
@@ -207,7 +214,8 @@
  * Helper function to determine if a file is executable.
  * Returns 1 if yes, 0 if no and -1 if error.
  */
-static inline int is_executable(const char *fname) {
+static inline int is_executable(const char *fname)
+{
 	struct stat tmp;
 
 	if (stat(fname, &tmp) < 0) {
@@ -229,7 +237,8 @@
  * Helper function to determine if a file is a directory.
  * Returns 1 if yes, 0 if no and -1 if error.
  */
-static inline int is_directory(const char *fname) {
+static inline int is_directory(const char *fname)
+{
 	struct stat tmp;
 
 	if (stat(fname, &tmp) < 0) {
@@ -242,7 +251,8 @@
 /**
  * Returns 1 if the directory entry's filename fits the test name pattern.
  */
-static inline int test_filter(const struct dirent *p) {
+static inline int test_filter(const struct dirent *p)
+{
 	return ((p->d_name[0] == 'T' || p->d_name[0] == 'D')
 		&& isdigit(p->d_name[1]) && isdigit(p->d_name[2]));
 }
@@ -252,7 +262,8 @@
  * are considered "lesser" values.
  */
 //static inline int test_sort(const struct dirent **a, const struct dirent **b) {
-static inline int test_sort(const struct dirent **a, const struct dirent **b) {
+static inline int test_sort(const struct dirent **a, const struct dirent **b)
+{
 	return strcmp(&(*b)->d_name[1], &(*a)->d_name[1]);
 }
 
@@ -260,12 +271,13 @@
  * Takes the wait() status integer and prints a log message.
  * Returns 1 if there was a failure.
  */
-static int child_finished(const char *name, int stat) {
+static int child_finished(const char *name, int stat)
+{
 	int x;
 	// did we sig-exit?
 	if (WIFSIGNALED(stat)) {
 		pounder_fprintf(stdout, "%s: %s on signal %d.\n",
-			name, fail_msg, WTERMSIG(stat));
+				name, fail_msg, WTERMSIG(stat));
 		return 1;
 	} else {
 		x = WEXITSTATUS(stat);
@@ -274,12 +286,12 @@
 			return 0;
 		} else if (x < 0 || x == 255) {
 			pounder_fprintf(stdout, "%s: %s with code %d.\n",
-				name, abort_msg, x);
+					name, abort_msg, x);
 			return 1;
 			// FIXME: add test to blacklist
 		} else {
 			pounder_fprintf(stdout, "%s: %s with code %d.\n",
-				name, fail_msg, x);
+					name, fail_msg, x);
 			return 1;
 		}
 	}
@@ -290,7 +302,8 @@
  * assume that there was some kind of failure and return 0.  Otherwise,
  * we return 1 to indicate success.
  */
-static int wait_for_pids(void) {
+static int wait_for_pids(void)
+{
 	struct proclist_item_t *curr;
 	int i, stat, res, nprocs;
 	pid_t pid;
@@ -313,12 +326,13 @@
 			perror("wait");
 			return 0;
 		}
-
 		// go find the child
 		curr = wait_ons.head;
 		while (curr != NULL) {
 			if (curr->pid == pid) {
-				res = (child_finished(curr->name, stat) ? 0 : res);
+				res =
+				    (child_finished(curr->name, stat) ? 0 :
+				     res);
 
 				// one less pid to wait for
 				i++;
@@ -351,7 +365,8 @@
 /**
  * Wait for daemons to finish.  This function does NOT wait for wait_ons.
  */
-static void wait_for_daemons(void) {
+static void wait_for_daemons(void)
+{
 	struct proclist_item_t *curr;
 	int i, stat, res, nprocs;
 	pid_t pid;
@@ -395,7 +410,8 @@
 /**
  * Creates a record of processes that we want to watch for.
  */
-static void note_process(pid_t pid, char *name) {
+static void note_process(pid_t pid, char *name)
+{
 	struct proclist_item_t *it;
 
 	it = calloc(1, sizeof(struct proclist_item_t));
@@ -419,7 +435,8 @@
 /**
  * Creates a record of daemons that should be killed on exit.
  */
-static void note_daemon(pid_t pid, char *name) {
+static void note_daemon(pid_t pid, char *name)
+{
 	struct proclist_item_t *it;
 
 	it = calloc(1, sizeof(struct proclist_item_t));
@@ -444,7 +461,8 @@
  * Starts a test, with the stdin/out/err fd's redirected to logs.
  * The 'fname' parameter should be a relative path from $POUNDER_HOME.
  */
-static pid_t spawn_test(char *fname) {
+static pid_t spawn_test(char *fname)
+{
 	pid_t pid;
 	int fd, tmp;
 	char buf[TEST_PATH_LEN], buf2[TEST_PATH_LEN];
@@ -474,11 +492,10 @@
 
 		// generate log name-- '/' -> '-'.
 		snprintf(buf2, TEST_PATH_LEN, "%s|%s",
-			getenv("POUNDER_LOGDIR"), fname);
+			 getenv("POUNDER_LOGDIR"), fname);
 
 		fd = strlen(buf2);
-		for (tmp = (index(buf2, '|') - buf2); tmp < fd;
-			tmp++) {
+		for (tmp = (index(buf2, '|') - buf2); tmp < fd; tmp++) {
 			if (buf2[tmp] == '/') {
 				buf2[tmp] = '-';
 			} else if (buf2[tmp] == '|') {
@@ -493,10 +510,9 @@
 			perror("dup(stdout, 3)");
 			exit(-1);
 		}
-
 		// reroute stdout/stderr
 		fd = open(buf2, O_RDWR | O_CREAT | O_TRUNC | O_SYNC,
-			S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
+			  S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
 		if (fd < 0) {
 			perror(buf2);
 			exit(-1);
@@ -521,7 +537,6 @@
 			perror("getcwd");
 			exit(-1);
 		}
-
 		// then splice cwd + fname
 		snprintf(buf2, TEST_PATH_LEN, "%s/%s", buf, fname);
 
@@ -540,11 +555,9 @@
 				perror(buf2);
 				exit(-1);
 			}
-
 			// reassign variables
 			fname = buf;
 		}
-
 		// spawn the process
 		execlp(fname, fname, NULL);
 
@@ -567,17 +580,19 @@
  * Adds a child process to either the running-test or running-daemon
  * list.
  */
-static void note_child(pid_t pid, char *fname, char type) {
+static void note_child(pid_t pid, char *fname, char type)
+{
 	if (type == 'T') {
 		note_process(pid, fname);
 	} else if (type == 'D') {
 		note_daemon(pid, fname);
 	} else {
-		pounder_fprintf(stdout, "Don't know what to do with child `%s' of type %c.\n", fname, type);
+		pounder_fprintf(stdout,
+				"Don't know what to do with child `%s' of type %c.\n",
+				fname, type);
 	}
 }
 
-
 /**
  * Process a directory--for each entry in a directory, execute files or spawn
  * a new copy of ourself on the new directory.  Process execution is subject to
@@ -590,7 +605,8 @@
  * If a the fork fails, bit 1 of the return code is set.  If a
  * program runs but fails, bit 2 is set.
  */
-static int process_dir(const char *fname) {
+static int process_dir(const char *fname)
+{
 	struct dirent **namelist;
 	int i, result = 0;
 	char buf[TEST_PATH_LEN];
@@ -602,7 +618,7 @@
 	pounder_fprintf(stdout, "%s: Entering directory.\n", fname);
 
 	i = scandir(fname, &namelist, test_filter,
-		(int (*) (const void *, const void *))test_sort);
+		    (int (*)(const void *, const void *))test_sort);
 	if (i < 0) {
 		perror(fname);
 		return -1;
@@ -611,7 +627,7 @@
 	while (i--) {
 		/* determine level number */
 		test_level_num = ((namelist[i]->d_name[1] - '0') * 10)
-			+ (namelist[i]->d_name[2] - '0');
+		    + (namelist[i]->d_name[2] - '0');
 
 		if (curr_level_num == -1) {
 			curr_level_num = test_level_num;
@@ -623,14 +639,13 @@
 		}
 
 		snprintf(buf, TEST_PATH_LEN, "%s/%s", fname,
-			namelist[i]->d_name);
+			 namelist[i]->d_name);
 		if (is_directory(buf)) {
 			pid = fork();
 			if (pid == 0) {
 				if (setpgrp() < 0) {
 					perror("setpgid");
 				}
-
 				// spawn a new copy of ourself.
 				execl(progname, progname, buf, NULL);
 
diff --git a/tools/pounder21/src/cpufreq/cpufreq.c b/tools/pounder21/src/cpufreq/cpufreq.c
index 55ed4c6..714f1a3 100644
--- a/tools/pounder21/src/cpufreq/cpufreq.c
+++ b/tools/pounder21/src/cpufreq/cpufreq.c
@@ -32,7 +32,8 @@
 
 static unsigned int cpunum = 0;
 
-static int check_writable(const char *fname) {
+static int check_writable(const char *fname)
+{
 	int fd;
 
 	fd = open(fname, O_WRONLY);
@@ -42,7 +43,8 @@
 	return fd >= 0;
 }
 
-static int seed_random(void) {
+static int seed_random(void)
+{
 	int fp;
 	long seed;
 
@@ -63,11 +65,13 @@
 	return 1;
 }
 
-static unsigned int get_randnum(unsigned int max) {
+static unsigned int get_randnum(unsigned int max)
+{
 	return (unsigned int)((float)max * (rand() / (RAND_MAX + 1.0)));
 }
 
-static int set_cpuspeed(const char *ctrlfile, unsigned int speed) {
+static int set_cpuspeed(const char *ctrlfile, unsigned int speed)
+{
 	int fd, x;
 	unsigned int y;
 	char buf[256];
@@ -112,7 +116,8 @@
 
 	y = atoi(buf);
 	if (y != speed) {
-		printf("ERROR: Set CPU %d speed to %u but speed is now %u!\n", cpunum, speed, y);
+		printf("ERROR: Set CPU %d speed to %u but speed is now %u!\n",
+		       cpunum, speed, y);
 		fflush(stdout);
 		return -1;
 	}
@@ -120,8 +125,8 @@
 	return 1;
 }
 
-
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	const char *ctrl;
 	unsigned int rounds;
 	unsigned int *frequencies;
@@ -131,15 +136,19 @@
 
 	/* Usage: cpufreq control_file rounds [frequencies...] */
 	if (argc < 6) {
-		printf("Usage: %s control_file rounds cpunum [frequencies...]\n", argv[0]);
-		ret = 1; goto out;
+		printf
+		    ("Usage: %s control_file rounds cpunum [frequencies...]\n",
+		     argv[0]);
+		ret = 1;
+		goto out;
 	}
 
 	/* copy command line args */
 	ctrl = argv[1];
 	if (!check_writable(ctrl)) {
 		perror(ctrl);
-		ret = 2; goto out;
+		ret = 2;
+		goto out;
 	}
 
 	rounds = atoi(argv[2]);
@@ -149,7 +158,8 @@
 	frequencies = calloc(num_freqs, sizeof(unsigned int));
 	if (frequencies == NULL) {
 		perror("Error allocating memory");
-		ret = 3; goto out;
+		ret = 3;
+		goto out;
 	}
 
 	for (x = 4; x < argc; x++) {
@@ -157,7 +167,8 @@
 	}
 
 	/* Now run program. */
-	printf("Running %u loops with these %d frequencies:\n", rounds, num_freqs);
+	printf("Running %u loops with these %d frequencies:\n", rounds,
+	       num_freqs);
 	for (x = 0; x < num_freqs; x++) {
 		printf("%u KHz\n", frequencies[x]);
 	}
@@ -170,7 +181,8 @@
 		y = get_randnum(num_freqs);
 		y = set_cpuspeed(ctrl, frequencies[y]);
 		if (y != 1) {
-			ret = 4; goto out;
+			ret = 4;
+			goto out;
 		}
 	}
 
diff --git a/tools/pounder21/src/mem_alloc_test/mem_alloc.c b/tools/pounder21/src/mem_alloc_test/mem_alloc.c
index 027f6f5..8694c88 100644
--- a/tools/pounder21/src/mem_alloc_test/mem_alloc.c
+++ b/tools/pounder21/src/mem_alloc_test/mem_alloc.c
@@ -40,80 +40,61 @@
 #include <sys/mman.h>
 #include <errno.h>
 
-
-
 /////////////////////////// GLOBAL STATIC VAIRABLE FOR SIGNAL HANDLER /////////////////
-static volatile sig_atomic_t sigflag;		// set nonzero by sig handler
+static volatile sig_atomic_t sigflag;	// set nonzero by sig handler
 static sigset_t newmask, oldmask, zeromask;
 ////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 //////////////////////////////// GLOBAL DEFINES ////////////////////////////////////////
-#define KB_VALUE        1024		// value in bytes -> 1024 bytes
-#define COMMITTED_AS  102400            // value in KB    -> 102400 KB -> 100MB
-#define MALLOC_SIZE   0x10000		// = 64KB... for each sbrk(MALLOC_SIZE) in
+#define KB_VALUE        1024	// value in bytes -> 1024 bytes
+#define COMMITTED_AS  102400	// value in KB    -> 102400 KB -> 100MB
+#define MALLOC_SIZE   0x10000	// = 64KB... for each sbrk(MALLOC_SIZE) in
 					// malloc_data()
 					// MUST ALWAYS BE POSSITIVE VALUE
-#define PAGE_SIZE     0x400		// = 1024 KB
+#define PAGE_SIZE     0x400	// = 1024 KB
 /////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 //////////////////////////////// GLOBAL VARIABLES ////////////////////////////////////////
-long sbrk_num;		// global sbrk_num to keep track of # of times sbrk() get called
-char * start_addr;	// heap @before a process allocate memory - get updated in eat_mem()
-char * end_addr;	// heap @after a process allocate memory  - get updated in alloc_data()
+long sbrk_num;			// global sbrk_num to keep track of # of times sbrk() get called
+char *start_addr;		// heap @before a process allocate memory - get updated in eat_mem()
+char *end_addr;			// heap @after a process allocate memory  - get updated in alloc_data()
 			// and dealloc_data()
 //////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 //////////////////////////////// ERROR HANDLING PRINT FUNCTIONS //////////////////////////
 /* ========================================================================================
  *	Print linux error message, will exit the current process.
  * ======================================================================================== */
-void
-unix_error(char * msg)
+void unix_error(char *msg)
 {
 	printf("LINUX ERROR: %s: %s\n", msg, strerror(errno));
 	exit(0);
 }
 
-
 /* ========================================================================================
  *	Print functionality-error message for user process, will not exit the current process.
  * ======================================================================================== */
-void
-user_error(char * msg)
+void user_error(char *msg)
 {
 	printf("APPLICATION ERROR: %s\n", msg);
 }
+
 /////////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 //////////////////////////// SIGNAL HANDLING FUNCTIONS ///////////////////////////////////////
 /* =====================================================================================
  *	One Signal Handler for SIGUSR1 and SIGUSR2.
  * ===================================================================================== */
-static void
-sig_usr(int signo)			// signal hanlder for SIGUSR1 and SIGUSR2
+static void sig_usr(int signo)	// signal hanlder for SIGUSR1 and SIGUSR2
 {
 	sigflag = 1;
 }
 
-
 /* ========================================================================================
  *	SET UP signal handler before TELL_PARENT(), WAIT_PARENT(), TELL_CHILD(), WAIT_CHILD().
  *	- This function must be called before fork() and TELL/WAIT_PARENT/CHILD() functions.
  * ======================================================================================== */
-void
-TELL_WAIT(void)
+void TELL_WAIT(void)
 {
 	if (signal(SIGUSR1, sig_usr) == SIG_ERR)
 		unix_error("signal (SIGUSR1) FAILED");
@@ -129,40 +110,34 @@
 		unix_error("signal (SIG_BLOCK) FAILED");
 }
 
-
 /* ========================================================================================
  *	TELL parent that we are done: used in child process.
  *	- This function must be called after TELL_WAIT() setup the SIGUSR1 & SIGUSR2 propery.
  *	- INPUT: parent process ID; can be obtained through getppid().
  * ======================================================================================== */
-void
-TELL_PARENT(pid_t pid)
+void TELL_PARENT(pid_t pid)
 {
-	kill(pid, SIGUSR2);		// send signal SIGUSR2 to pid process
+	kill(pid, SIGUSR2);	// send signal SIGUSR2 to pid process
 }
 
-
 /* ========================================================================================
  *	TELL child that we are done: used in parent process.
  *	- This function must be called after TELL_WAIT() setup the SIGUSR1 & SIGUSR2 propery.
  *	- INPUT: child process ID; can be obtained through pid = fork() where pid > 0.
  * ======================================================================================== */
-void
-TELL_CHILD(pid_t pid)
+void TELL_CHILD(pid_t pid)
 {
-	kill(pid, SIGUSR1);		// send signal SIGUSR1 to pid process
+	kill(pid, SIGUSR1);	// send signal SIGUSR1 to pid process
 }
 
-
 /* ========================================================================================
  *	WAIT for parent: used in child process.
  *	- This function must be called after TELL_WAIT() setup the SIGUSR1 & SIGUSR2 propery.
  * ======================================================================================== */
-void
-WAIT_PARENT(void)
+void WAIT_PARENT(void)
 {
 	while (sigflag == 0)
-		sigsuspend(&zeromask);		// wait for child
+		sigsuspend(&zeromask);	// wait for child
 	sigflag = 0;
 
 	// reset signal mask to original value
@@ -170,62 +145,54 @@
 		unix_error("signal (SIG_SETMASK) FAILED");
 }
 
-
 /* ========================================================================================
  *	WAIT for child: used in parent process.
  *	- This function must be called after TELL_WAIT() setup the SIGUSR1 & SIGUSR2 propery.
  * ======================================================================================== */
-void
-WAIT_CHILD(void)
+void WAIT_CHILD(void)
 {
 	while (sigflag == 0)
-		sigsuspend(&zeromask);		// wait for parent
+		sigsuspend(&zeromask);	// wait for parent
 	sigflag = 0;
 
 	// reset signal mask to original value
 	if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0)
 		unix_error("signal (SIG_SETMASK) FAILED");
 }
+
 /////////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 /////////////////////////////////////// MEMORY ALLOCATION FUNCTIONS /////////////////////////
 /* =====================================================================================
  *	SET sbrk_num @start of each process to count # of sbrk() calls within that process.
  *	- INPUT: input number for globak sbrk_num to be set to.
  * ===================================================================================== */
-void
-set_sbrk_num(int in)
+void set_sbrk_num(int in)
 {
 	sbrk_num = in;
 }
 
-
 /* ========================================================================================
  *	PRINT system information; e.g. free {ram, swap}, total {ram, swap}.
  * ======================================================================================== */
-void
-print_sysinfo(void)
+void print_sysinfo(void)
 {
 	struct sysinfo si;
 	sysinfo(&si);
 
-	printf("freeram (%luKB),  freeswap (%luKB), totalram (%luKB), totalswap (%luKB)\n",
-	       (si.freeram  / KB_VALUE) * si.mem_unit,
-	       (si.freeswap / KB_VALUE) * si.mem_unit,
-	       (si.totalram / KB_VALUE) * si.mem_unit,
-	       (si.totalswap/ KB_VALUE) * si.mem_unit);
+	printf
+	    ("freeram (%luKB),  freeswap (%luKB), totalram (%luKB), totalswap (%luKB)\n",
+	     (si.freeram / KB_VALUE) * si.mem_unit,
+	     (si.freeswap / KB_VALUE) * si.mem_unit,
+	     (si.totalram / KB_VALUE) * si.mem_unit,
+	     (si.totalswap / KB_VALUE) * si.mem_unit);
 }
 
-
 /* ========================================================================================
  *	CALCULATE freeswap space.
  *	- OUTPUT: Return size of free swap space in KB.
  * ======================================================================================== */
-long unsigned
-freeswap(void)
+long unsigned freeswap(void)
 {
 	struct sysinfo si;
 	sysinfo(&si);
@@ -233,87 +200,79 @@
 	return ((si.freeswap / KB_VALUE) * si.mem_unit);
 }
 
-
 /* ========================================================================================
  *	CALCULATE freeram space.
  *	- OUTPUT: Return size of free ram space in KB.
  * ======================================================================================== */
-long unsigned
-freeram(void)
+long unsigned freeram(void)
 {
 	struct sysinfo si;
 	sysinfo(&si);
 
-	return ((si.freeram/ KB_VALUE) * si.mem_unit);
+	return ((si.freeram / KB_VALUE) * si.mem_unit);
 }
 
-
 /* ========================================================================================
  *	ALLOCATE data using sbrk(incr).
  *  	- Global sbrk_num will be updated for each time calling sbrk() to increase heap size.
  *	- OUTPUT: Return 1 if success,
  *			 0 if failed, and will decrement the heap space for future library calls
  * ======================================================================================== */
-int
-malloc_data(void)
+int malloc_data(void)
 {
-	int return_value = 0;			// default return = true;
-	intptr_t incr 	 = MALLOC_SIZE;		// 64KB
-	char * src 	 = NULL;		// to hold addr return from sbrk(incr)
-	long i;					// loop counter
+	int return_value = 0;	// default return = true;
+	intptr_t incr = MALLOC_SIZE;	// 64KB
+	char *src = NULL;	// to hold addr return from sbrk(incr)
+	long i;			// loop counter
 
-	src   = sbrk(incr);
+	src = sbrk(incr);
 
-	if (((void *) src == (void *) -1) && (errno == ENOMEM))  {	// error handling
-		src      = sbrk(-(2*incr)); 	// freeing some space for later library calls
-		sbrk_num-= 2;
-		end_addr = src + (-(2*incr));	// update end of heap
-	} else {							// sucess case
+	if (((void *)src == (void *)-1) && (errno == ENOMEM)) {	// error handling
+		src = sbrk(-(2 * incr));	// freeing some space for later library calls
+		sbrk_num -= 2;
+		end_addr = src + (-(2 * incr));	// update end of heap
+	} else {		// sucess case
 		// must write to data, write once for each 1KB
-		for (i = 0x0; i < incr ; i += PAGE_SIZE)
+		for (i = 0x0; i < incr; i += PAGE_SIZE)
 			src[i] = '*';
-		++sbrk_num;			// update global sbrk() call counter when success
-		return_value = 1;		// update return value to true
-		end_addr = src + incr;		// update end of heap
+		++sbrk_num;	// update global sbrk() call counter when success
+		return_value = 1;	// update return value to true
+		end_addr = src + incr;	// update end of heap
 	}
 
 	return return_value;
 }
 
-
 /* ========================================================================================
  *	DEALLOCATE data using sbrk(-incr).
  *  	- Global sbrk_num will be updated for each time calling sbrk() to decrease heap size.
  *	- OUTPUT: Return 1 if success,
  *			 0 if failed.
  * ======================================================================================== */
-int
-dealloc_data(void)
+int dealloc_data(void)
 {
-	int return_value = 0;			// default return = true
-	intptr_t incr 	 = MALLOC_SIZE;		// 64KB
-	char * src 	 = NULL;		// to hold adrr return from sbrk(incr)
-	long i;					// loop counter
-	long old_sbrk_num = sbrk_num;		// save old sbrk_num counter, because sbrk_num will be updated
+	int return_value = 0;	// default return = true
+	intptr_t incr = MALLOC_SIZE;	// 64KB
+	char *src = NULL;	// to hold adrr return from sbrk(incr)
+	long i;			// loop counter
+	long old_sbrk_num = sbrk_num;	// save old sbrk_num counter, because sbrk_num will be updated
 
 	for (i = 0; i < old_sbrk_num; ++i) {
 		src = sbrk(-incr);
 
 		// error handling: Fatal Fail
-		if (((void *) src == (void *) -1) && (errno == ENOMEM))
-			goto OUT;		// error
+		if (((void *)src == (void *)-1) && (errno == ENOMEM))
+			goto OUT;	// error
 
-		--sbrk_num;			// update # of sbrk() call
+		--sbrk_num;	// update # of sbrk() call
 		end_addr = src + (-incr);	// update end of heap
 	}
-	return_value = 1;			// update return value to true
+	return_value = 1;	// update return value to true
 
 OUT:
 	return return_value;
 }
 
-
-
 /* ========================================================================================
  *	Write to the memory because of Copy-On-Write behavior from LINUX kernel.
  *	IDEA: Because fork() is implemented through Copy-On-Write. This technique
@@ -325,28 +284,25 @@
  *	OUTPUT: Return 1 if success,
  *		       0 if failed.
  * ======================================================================================== */
-int
-handle_COW(void)
+int handle_COW(void)
 {
-	int return_value = 0;			// default return = true
-	intptr_t incr 	 = MALLOC_SIZE;		// 64KB
-	char * src 	 = NULL;		// to hold adrr return from sbrk(incr)
-	char * i;				// loop counter
+	int return_value = 0;	// default return = true
+	intptr_t incr = MALLOC_SIZE;	// 64KB
+	char *src = NULL;	// to hold adrr return from sbrk(incr)
+	char *i;		// loop counter
 
 	// error handling: Make sure the start_addr is not NULL
 	if (start_addr == NULL) {
 		user_error("start_addr from parent is not initialized");
 		goto OUT;
- 	}
-
+	}
 	// error handling: Make sure the end_addr is not NULL
 	if (end_addr == NULL) {
 		user_error("end_addr from parent is not initialized");
 		goto OUT;
 	}
-
 	// Writing to heap
-	if (start_addr < end_addr) {		// Heap grows up to higher address
+	if (start_addr < end_addr) {	// Heap grows up to higher address
 		for (i = start_addr; i < end_addr; i += PAGE_SIZE) {
 			if ((freeswap() + freeram()) < COMMITTED_AS)
 				goto OUT;
@@ -360,25 +316,22 @@
 			*i = 'd';
 		}
 		return_value = 1;
-	} else ;					// Heap doesn't grows
+	} else;			// Heap doesn't grows
 
 OUT:
 	return return_value;
 }
 
-
-
 /* ========================================================================================
  *	EAT lots and lots of memory...
  *	- If a process can eat all of the free resouces
  *	  specified, that process will exit the program.
  * ======================================================================================== */
-void
-eat_mem(void)
+void eat_mem(void)
 {
 	// saving the current heap pointer befoer start to allocate more memory
 	start_addr = NULL;
-	end_addr   = NULL;
+	end_addr = NULL;
 	start_addr = sbrk(0);
 
 	// eating memory
@@ -391,17 +344,15 @@
 	exit(0);
 }
 
-
 /* ========================================================================================
  *	EAT lots and lots of memory...If a process can eat all of the free resouces
  *	specified, that process will exit the program
  * ======================================================================================== */
-void
-eat_mem_no_exit(void)
+void eat_mem_no_exit(void)
 {
 	// saving the current heap pointer befoer start to allocate more memory
 	start_addr = NULL;
-	end_addr   = NULL;
+	end_addr = NULL;
 	start_addr = sbrk(0);
 
 	// eating memory
@@ -410,18 +361,15 @@
 			break;
 	}
 }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-
-
-
 ///////////////////////////////// MAIN PROGRAM ////////////////////////////////////////////////////
-int
-main(int argc, char ** argv)
+int main(int argc, char **argv)
 {
-	pid_t pid;						// used for fork()
-	print_sysinfo();					// sytem resouces before start allocation
-	set_sbrk_num(0);				        // at start of process, ensure sbrk_num is set
+	pid_t pid;		// used for fork()
+	print_sysinfo();	// sytem resouces before start allocation
+	set_sbrk_num(0);	// at start of process, ensure sbrk_num is set
 	eat_mem();
 
 	// @beyound this point -> 1 process can't consume all memory so it must fork a child to consume more
@@ -430,40 +378,48 @@
 	pid = fork();
 	pid = pid < 0 ? -1 : pid;
 
-	switch(pid) {
-		case -1: if (!dealloc_data())
-				unix_error("SBRK(-incr) FROM DEALLOC_DATA() FAILED. FATAL!!!");
-		         goto LAST_CONDITION;
+	switch (pid) {
+	case -1:
+		if (!dealloc_data())
+			unix_error
+			    ("SBRK(-incr) FROM DEALLOC_DATA() FAILED. FATAL!!!");
+		goto LAST_CONDITION;
 
-		case 0 : if (!handle_COW()) {		// Re-touch child pages
-				print_sysinfo();	// FINAL RESULT, LAST RESOURCES
-				exit(0);		// child can't allocate no more, DONE!!!
-			 }
-			 goto START;
+	case 0:
+		if (!handle_COW()) {	// Re-touch child pages
+			print_sysinfo();	// FINAL RESULT, LAST RESOURCES
+			exit(0);	// child can't allocate no more, DONE!!!
+		}
+		goto START;
 
-		default: if (waitpid(-1,NULL,0) != pid) 	// Parent Waiting
-				unix_error("WAIT_PID FAILED. FATAL!!!");
-			 exit(0);
+	default:
+		if (waitpid(-1, NULL, 0) != pid)	// Parent Waiting
+			unix_error("WAIT_PID FAILED. FATAL!!!");
+		exit(0);
 	}
 
 LAST_CONDITION:
-	TELL_WAIT();					// set up parent/child signal handler
+	TELL_WAIT();		// set up parent/child signal handler
 	pid = fork();
 	pid = pid < 0 ? -1 : pid;
 
-	switch(pid) {
-		case -1: unix_error("FORK FAILED.");
+	switch (pid) {
+	case -1:
+		unix_error("FORK FAILED.");
 
-		case 0 : eat_mem_no_exit();
-			 WAIT_PARENT();
-			 print_sysinfo();		// FINAL RESULT, LAST RESOUCES
-			 TELL_PARENT(getppid());
-			 exit(0);
+	case 0:
+		eat_mem_no_exit();
+		WAIT_PARENT();
+		print_sysinfo();	// FINAL RESULT, LAST RESOUCES
+		TELL_PARENT(getppid());
+		exit(0);
 
-		default: eat_mem_no_exit();
-			 TELL_CHILD(pid);
-			 WAIT_CHILD();
-			 exit(0);
+	default:
+		eat_mem_no_exit();
+		TELL_CHILD(pid);
+		WAIT_CHILD();
+		exit(0);
 	}
 }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/tools/pounder21/src/memxfer5b/memxfer5b.c b/tools/pounder21/src/memxfer5b/memxfer5b.c
index b5248aa..c762014 100644
--- a/tools/pounder21/src/memxfer5b/memxfer5b.c
+++ b/tools/pounder21/src/memxfer5b/memxfer5b.c
@@ -47,13 +47,14 @@
 	"\"__int64 *\"",
 	"\"double *\"",
 };
-int nmethods = sizeof(methods)/sizeof(methods[0]);
 
-int fflag = 0;	// if 0, then just Malloc once; else malloc/free each time
-int wflag		= 0; // if 1, call SetProcessWorkingSetSize() (WINDOWS ONLY)
-int sflag	= 0; // if 1, only print averages.
-int pflag		= 0;
-int csvflag	= 0; // Print Comma separated list for spreadsheet input.
+int nmethods = sizeof(methods) / sizeof(methods[0]);
+
+int fflag = 0;			// if 0, then just Malloc once; else malloc/free each time
+int wflag = 0;			// if 1, call SetProcessWorkingSetSize() (WINDOWS ONLY)
+int sflag = 0;			// if 1, only print averages.
+int pflag = 0;
+int csvflag = 0;		// Print Comma separated list for spreadsheet input.
 char *progname;
 
 double tottim = 0.0;
@@ -67,7 +68,7 @@
 	unsigned cnt;
 	int method = 0;
 	char *p1, *p2;
-	char *p,*q;
+	char *p, *q;
 	short *sp, *sq;
 	int *ip, *iq;
 	long *lp, *lq;
@@ -76,61 +77,64 @@
 	double t;
 
 	progname = av[0];
-	if (strrchr(progname,SLASHC))
-		progname = strrchr(progname,SLASHC) + 1;
+	if (strrchr(progname, SLASHC))
+		progname = strrchr(progname, SLASHC) + 1;
 
 	while (ac > 1) {
 		if (equal(av[1], "-f")) {
 			ac--;
 			fflag = 1;
 			av++;
-		}
-		else if (equal(av[1], "-w")) {
+		} else if (equal(av[1], "-w")) {
 			ac--;
 			wflag = 1;
 			av++;
-		}
-		else if (equal(av[1], "-s")) {
+		} else if (equal(av[1], "-s")) {
 			ac--;
 			sflag = 1;
 			av++;
-		}
-		else if (equal(av[1], "-p")) {
+		} else if (equal(av[1], "-p")) {
 			ac--;
 			pflag = 1;
 			av++;
-		}
-		else if (equal(av[1], "-csv")) {
+		} else if (equal(av[1], "-csv")) {
 			ac--;
 			csvflag++;
 			av++;
-		}
-		else
+		} else
 			break;
 	}
 	if (ac < 3) {
-		(void)printf("Usage: %s [-f] [-w] [-s] [-p] size cnt [method]\n",progname);
-		(void)printf("\t-f flag says to malloc and free of the \"cnt\" times.\n");
-		(void)printf("\t-w = set process min and max working set size to \"size\"\n");
+		(void)
+		    printf("Usage: %s [-f] [-w] [-s] [-p] size cnt [method]\n",
+			   progname);
+		(void)
+		    printf
+		    ("\t-f flag says to malloc and free of the \"cnt\" times.\n");
+		(void)
+		    printf
+		    ("\t-w = set process min and max working set size to \"size\"\n");
 		(void)printf("\t-s = silent; only print averages\n");
-		(void)printf("\t-p = prep; \"freshen\" cache before; -w disables\n");
+		(void)
+		    printf
+		    ("\t-p = prep; \"freshen\" cache before; -w disables\n");
 		(void)printf("\t-csv = print output in CSV format\n");
 
 		(void)printf("\tmethods:\n");
 		for (i = 0; i < nmethods; i++)
-			printf("\t%2d:\t%s\n",i,methods[i]);
+			printf("\t%2d:\t%s\n", i, methods[i]);
 		return 0;
 	}
 
-	size	= atoik(av[1]);
+	size = atoik(av[1]);
 
 	//
 	// Round size up to 4*sizeof(double) bytes.
 	//
-	if (size != ((size/ (4*sizeof(double)) ) * (4*sizeof(double)) )) {
-		size += (4*sizeof(double));
-		size /= (4*sizeof(double));
-		size *= (4*sizeof(double));
+	if (size != ((size / (4 * sizeof(double))) * (4 * sizeof(double)))) {
+		size += (4 * sizeof(double));
+		size /= (4 * sizeof(double));
+		size *= (4 * sizeof(double));
 	}
 	cnt = (unsigned)atoik(av[2]);
 
@@ -138,15 +142,20 @@
 		p1 = (char *)Malloc(size);
 		p2 = (char *)Malloc(size);
 		if (pflag)
-			memcpy(p1,p2,size);
+			memcpy(p1, p2, size);
 	}
 
-	printf("%s ",progname);
-	if (fflag) printf("-f ");
-	if (wflag) printf("-w ");
-	if (sflag) printf("-s ");
-	if (pflag) printf("-p ");
-	if (csvflag) printf("-csv ");
+	printf("%s ", progname);
+	if (fflag)
+		printf("-f ");
+	if (wflag)
+		printf("-w ");
+	if (sflag)
+		printf("-s ");
+	if (pflag)
+		printf("-p ");
+	if (csvflag)
+		printf("-csv ");
 	printf("%u %u ", size, cnt);
 	if (csvflag) {
 		printf("Linux");
@@ -159,7 +168,8 @@
 	}
 
 	for (; ac > 3; ac--, av++) {
-		if (isdigit(*av[3])) method = *av[3] - '0';
+		if (isdigit(*av[3]))
+			method = *av[3] - '0';
 		if (method < 0 || method >= nmethods)
 			method = 0;
 		if (sflag)
@@ -167,14 +177,15 @@
 		for (ui = 0; ui < cnt; ui++) {
 			if (!sflag) {
 				(void)printf("%s %d %d %-18.18s\t",
-						progname, size, cnt, methods[method]);
+					     progname, size, cnt,
+					     methods[method]);
 				tstart();
 			}
 			if (fflag == 1) {
 				p1 = (char *)Malloc(size);
 				p2 = (char *)Malloc(size);
 			}
-			switch(method) {
+			switch (method) {
 			case 0:
 				(void)memcpy(p1, p2, size);
 				break;
@@ -203,15 +214,15 @@
 					*lp++ = *lq++;
 				break;
 			case 5:
-				llp = (__int64 *)p1;
-				llq = (__int64 *)p2;
+				llp = (__int64 *) p1;
+				llq = (__int64 *) p2;
 				for (j = 0; j < size; j += sizeof(__int64))
 					*llp++ = *llq++;
 				break;
 			case 6:
 				dp = (double *)p1;
 				dq = (double *)p2;
-				for (j = 0; j < size; j += 4*sizeof(double)) {
+				for (j = 0; j < size; j += 4 * sizeof(double)) {
 					*dp++ = *dq++;
 					*dp++ = *dq++;
 					*dp++ = *dq++;
@@ -231,8 +242,7 @@
 				if (t == 0.0)
 					t = .0001;
 				printf(" %8.6f seconds %8.3f MB/s\n",
-					t,
-					(double)size/t/1000000.);
+				       t, (double)size / t / 1000000.);
 			}
 		}
 		if (sflag) {
@@ -241,18 +251,19 @@
 		}
 		if (csvflag) {
 			printf("%s,%u,%u,%8.3f,%8.3f\n",
-				methods[method],size,size*cnt,tottim,(double)size/(tottim/cnt)/1000000.);
-		}
-		else {
-			(void)printf("\tAVG: %d %-18.18s\t", size, methods[method]);
-			(void)printf(" %8.3f MB/s\n", (double)size/(tottim/cnt)/1000000.);
+			       methods[method], size, size * cnt, tottim,
+			       (double)size / (tottim / cnt) / 1000000.);
+		} else {
+			(void)printf("\tAVG: %d %-18.18s\t", size,
+				     methods[method]);
+			(void)printf(" %8.3f MB/s\n",
+				     (double)size / (tottim / cnt) / 1000000.);
 		}
 		tottim = 0.0;
 	}
 	return 0;
 }
 
-
 size_t atoik(char *s)
 {
 	size_t ret = 0;
@@ -264,38 +275,42 @@
 			base = 16;
 			s++;
 		}
-	}
-	else
+	} else
 		base = 10;
 
 	for (; isxdigit(*s); s++) {
 		if (base == 16)
 			if (isalpha(*s))
-				ret = base*ret + (toupper(*s) - 'A');
+				ret = base * ret + (toupper(*s) - 'A');
 			else
-				ret = base*ret + (*s - '0');
+				ret = base * ret + (*s - '0');
 		else if (isdigit(*s))
-				ret = base*ret + (*s - '0');
+			ret = base * ret + (*s - '0');
 		else
 			break;
 	}
 	for (; isalpha(*s); s++) {
-		switch(toupper(*s)) {
-		case 'K': ret *= 1024; break;
-		case 'M': ret *= 1024*1024; break;
+		switch (toupper(*s)) {
+		case 'K':
+			ret *= 1024;
+			break;
+		case 'M':
+			ret *= 1024 * 1024;
+			break;
 		default:
 			return ret;
 		}
 	}
 	return ret;
 }
+
 void *Malloc(size_t sz)
 {
 	char *p;
 
 	p = (char *)malloc(sz);
 	if (p == NULL) {
-		(void)printf("malloc(%d) failed\n",sz);
+		(void)printf("malloc(%d) failed\n", sz);
 		exit(1);
 	}
 	return (void *)p;
@@ -307,6 +322,7 @@
 {
 	gettimeofday(&_tstart, NULL);
 }
+
 void tend(void)
 {
 	gettimeofday(&_tend, NULL);
@@ -316,7 +332,7 @@
 {
 	double t1, t2;
 
-	t1 =	(double)_tstart.tv_sec + (double)_tstart.tv_usec/(1000*1000);
-	t2 =	(double)_tend.tv_sec + (double)_tend.tv_usec/(1000*1000);
-	return t2-t1;
+	t1 = (double)_tstart.tv_sec + (double)_tstart.tv_usec / (1000 * 1000);
+	t2 = (double)_tend.tv_sec + (double)_tend.tv_usec / (1000 * 1000);
+	return t2 - t1;
 }
diff --git a/tools/pounder21/src/ramsnake/snake.c b/tools/pounder21/src/ramsnake/snake.c
index e651258..4a2f49b 100644
--- a/tools/pounder21/src/ramsnake/snake.c
+++ b/tools/pounder21/src/ramsnake/snake.c
@@ -53,22 +53,27 @@
  * part of the graph array.
  */
 
-static void print_help(const char *name) {
-	printf("Usage: %s [-p num_threads] [-d ram_divisor | -n num_nodes] [-s report_intrvl] [-a add_intrvl] [-t]\n",
-		name);
-	printf("-d ram_divisor:	Use (total_ram / ram_divisor) as a graph (16).\n");
+static void print_help(const char *name)
+{
+	printf
+	    ("Usage: %s [-p num_threads] [-d ram_divisor | -n num_nodes] [-s report_intrvl] [-a add_intrvl] [-t]\n",
+	     name);
+	printf
+	    ("-d ram_divisor:	Use (total_ram / ram_divisor) as a graph (16).\n");
 	printf("-p num_threads:	Start up some number of threads (1).\n");
 	printf("-n num_nodes:	Create a graph with some number of nodes.\n");
 	printf("-s report_intvl	Seconds between speed reports (30).\n");
 	printf("-a add_intrvl:	Seconds between adding children (never).\n");
 #ifdef __cpu_set_t_defined
-	printf("-t:		Assign each process to its own processor (no).\n");
+	printf
+	    ("-t:		Assign each process to its own processor (no).\n");
 #else
 	printf("-t:		Not enabled because you need kernel 2.5.8+.\n");
 #endif
 }
 
-static void populate_graph(void *graph, unsigned long long node_count) {
+static void populate_graph(void *graph, unsigned long long node_count)
+{
 	unsigned long i;
 	void **ptr;
 	unsigned long gunk;
@@ -82,7 +87,8 @@
 	}
 }
 
-static int seed_random(void) {
+static int seed_random(void)
+{
 	int fp;
 	long seed;
 
@@ -103,13 +109,14 @@
 	return 1;
 }
 
-static void alarm_func(int signum) {
+static void alarm_func(int signum)
+{
 	struct timeval now;
 	float time;
 
 	gettimeofday(&now, NULL);
 	time = (now.tv_usec + (now.tv_sec * 1000000))
-		- (last.tv_usec + (last.tv_sec * 1000000));
+	    - (last.tv_usec + (last.tv_sec * 1000000));
 	time /= 1000000;
 
 	printf("%d: %.0f nodes/sec.\n", getpid(), speed / time);
@@ -120,7 +127,8 @@
 	alarm(report_interval);
 }
 
-static void walk_graph(void *graph) {
+static void walk_graph(void *graph)
+{
 	void **curr = graph;
 
 	while (1) {
@@ -129,7 +137,8 @@
 	}
 }
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	unsigned long long num_nodes, ram_size;
 	unsigned long num_forks = 1;
 	struct sysinfo info;
@@ -156,53 +165,54 @@
 	/* Parse command line args */
 	while ((c = getopt(argc, argv, "a:p:n:d:s:t")) != -1) {
 		switch (c) {
-			case 'p':
-				num_forks = atoi(optarg);
-				break;
-			case 'd':
-				ram_size = info.totalram / atoi(optarg);
-				ram_size = ram_size & ~(getpagesize() - 1);
-				num_nodes = ram_size / sizeof(void *);
-				break;
-			case 'n':
-				num_nodes = atoi(optarg);
-				ram_size = num_nodes * sizeof(void *);
-				break;
-			case 's':
-				report_interval = atoi(optarg);
-				break;
-			case 'a':
-				add_wait = atoi(optarg);
-				break;
+		case 'p':
+			num_forks = atoi(optarg);
+			break;
+		case 'd':
+			ram_size = info.totalram / atoi(optarg);
+			ram_size = ram_size & ~(getpagesize() - 1);
+			num_nodes = ram_size / sizeof(void *);
+			break;
+		case 'n':
+			num_nodes = atoi(optarg);
+			ram_size = num_nodes * sizeof(void *);
+			break;
+		case 's':
+			report_interval = atoi(optarg);
+			break;
+		case 'a':
+			add_wait = atoi(optarg);
+			break;
 #ifdef __cpu_set_t_defined
-			case 't':
-				affinity = 1;
-				break;
+		case 't':
+			affinity = 1;
+			break;
 #endif
-			default:
-				print_help(argv[0]);
-				return 0;
+		default:
+			print_help(argv[0]);
+			return 0;
 		}
 	}
 
 	/* Will we exceed half the address space size?  Use 1/4 of it at most.  */
 	if (ram_size > ((unsigned long long)1 << ((sizeof(void *) * 8) - 1))) {
-		printf("Was going to use %lluKB (%llu nodes) but that's too big.\n",
-			ram_size / 1024, num_nodes);
+		printf
+		    ("Was going to use %lluKB (%llu nodes) but that's too big.\n",
+		     ram_size / 1024, num_nodes);
 		ram_size = ((unsigned long long)1 << (sizeof(void *) * 8));
 		ram_size /= 4;
 		num_nodes = ram_size / sizeof(void *);
 		printf("Clamping to %lluKB (%llu nodes) instead.\n",
-			ram_size / 1024, num_nodes);
+		       ram_size / 1024, num_nodes);
 	}
 
 	/* Talk about what we're going to do. */
 	printf("Going to use %lluKB (%llu nodes).\n", ram_size / 1024,
-		num_nodes);
+	       num_nodes);
 
 	/* Make a shared anonymous map of the RAM */
 	shm = mmap(NULL, ram_size, PROT_READ | PROT_WRITE,
-		MAP_SHARED | MAP_ANONYMOUS, 0, 0);
+		   MAP_SHARED | MAP_ANONYMOUS, 0, 0);
 	if (shm == MAP_FAILED) {
 		perror("mmap");
 		return 2;
@@ -211,7 +221,7 @@
 
 	/* Create an SHM condition variable.  Bogus, I know... */
 	cond = mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE,
-		MAP_SHARED | MAP_ANONYMOUS, 0, 0);
+		    MAP_SHARED | MAP_ANONYMOUS, 0, 0);
 	if (cond == MAP_FAILED) {
 		perror("mmap");
 		return 4;
@@ -225,8 +235,7 @@
 	printf("done.\n");
 
 	printf("Creating %lu processes with reports every %lu seconds \
-and %d seconds between adding children.\n",
-		num_forks, report_interval, add_wait);
+and %d seconds between adding children.\n", num_forks, report_interval, add_wait);
 
 	/* Fork off separate processes.  The shared region is shared
 	 * across all children.  If we only wanted one thread, we shouldn't
@@ -239,7 +248,9 @@
 			if (affinity) {
 				CPU_ZERO(&my_cpu_mask);
 				CPU_SET(c, &my_cpu_mask);
-				if (0 != sched_setaffinity(0,sizeof(cpu_set_t), &my_cpu_mask)) {
+				if (0 !=
+				    sched_setaffinity(0, sizeof(cpu_set_t),
+						      &my_cpu_mask)) {
 					perror("sched_setaffinity");
 				}
 			}
@@ -257,7 +268,9 @@
 		if (affinity) {
 			CPU_ZERO(&my_cpu_mask);
 			CPU_SET(0, &my_cpu_mask);
-			if (0 != sched_setaffinity(0,sizeof(cpu_set_t), &my_cpu_mask)) {
+			if (0 !=
+			    sched_setaffinity(0, sizeof(cpu_set_t),
+					      &my_cpu_mask)) {
 				perror("sched_setaffinity");
 			}
 		}
diff --git a/tools/pounder21/src/randacoords/coords.c b/tools/pounder21/src/randacoords/coords.c
index 79ce130..6b290f0 100644
--- a/tools/pounder21/src/randacoords/coords.c
+++ b/tools/pounder21/src/randacoords/coords.c
@@ -25,7 +25,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-int seed_random(void) {
+int seed_random(void)
+{
 	int fp;
 	long seed;
 
@@ -46,7 +47,8 @@
 	return 1;
 }
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	unsigned long xmax, ymax;
 	unsigned long x, y;
 
diff --git a/tools/pounder21/src/randasyscall/randasys.c b/tools/pounder21/src/randasyscall/randasys.c
index b56cc0e..19bd08f 100644
--- a/tools/pounder21/src/randasyscall/randasys.c
+++ b/tools/pounder21/src/randasyscall/randasys.c
@@ -35,7 +35,8 @@
 
 unsigned long callnum, args[6];
 
-int seed_random(void) {
+int seed_random(void)
+{
 	int fp;
 	long seed;
 
@@ -56,20 +57,24 @@
 	return 1;
 }
 
-void get_big_randnum(void *buf, unsigned int size) {
+void get_big_randnum(void *buf, unsigned int size)
+{
 	uint32_t *x = buf;
 	int i;
 
 	for (i = 0; i < size; i += 4, x++) {
-		*x = (unsigned long)((float)UINT_MAX * (rand() / (RAND_MAX + 1.0)));
+		*x = (unsigned long)((float)UINT_MAX *
+				     (rand() / (RAND_MAX + 1.0)));
 	}
 }
 
-unsigned long get_randnum(unsigned long min, unsigned long max) {
+unsigned long get_randnum(unsigned long min, unsigned long max)
+{
 	return min + (unsigned long)((float)max * (rand() / (RAND_MAX + 1.0)));
 }
 
-int find_syscall(void) {
+int find_syscall(void)
+{
 	int x;
 
 badcall:
@@ -79,115 +84,119 @@
 	switch (x) {
 		/* don't screw with signal handling */
 #ifdef SYS_signal
-		case SYS_signal:
+	case SYS_signal:
 #endif
 #ifdef SYS_sigaction
-		case SYS_sigaction:
+	case SYS_sigaction:
 #endif
 #ifdef SYS_sigsuspend
-		case SYS_sigsuspend:
+	case SYS_sigsuspend:
 #endif
 #ifdef SYS_sigpending
-		case SYS_sigpending:
+	case SYS_sigpending:
 #endif
 #ifdef SYS_sigreturn
-		case SYS_sigreturn:
+	case SYS_sigreturn:
 #endif
 #ifdef SYS_sigprocmask
-		case SYS_sigprocmask:
+	case SYS_sigprocmask:
 #endif
 #ifdef SYS_rt_sigreturn
-		case SYS_rt_sigreturn:
+	case SYS_rt_sigreturn:
 #endif
 #ifdef SYS_rt_sigaction
-		case SYS_rt_sigaction:
+	case SYS_rt_sigaction:
 #endif
 #ifdef SYS_rt_sigprocmask
-		case SYS_rt_sigprocmask:
+	case SYS_rt_sigprocmask:
 #endif
 #ifdef SYS_rt_sigpending
-		case SYS_rt_sigpending:
+	case SYS_rt_sigpending:
 #endif
 #ifdef SYS_rt_sigtimedwait
-		case SYS_rt_sigtimedwait:
+	case SYS_rt_sigtimedwait:
 #endif
 #ifdef SYS_rt_sigqueueinfo
-		case SYS_rt_sigqueueinfo:
+	case SYS_rt_sigqueueinfo:
 #endif
 #ifdef SYS_rt_sigsuspend
-		case SYS_rt_sigsuspend:
+	case SYS_rt_sigsuspend:
 #endif
 #ifdef SYS_sigaltstack
-		case SYS_sigaltstack:
+	case SYS_sigaltstack:
 #endif
 #ifdef SYS_settimeofday
-		case SYS_settimeofday:
+	case SYS_settimeofday:
 #endif
 
 		/* don't exit the program :P */
 #ifdef SYS_exit
-		case SYS_exit:
+	case SYS_exit:
 #endif
 #ifdef SYS_exit_group
-		case SYS_exit_group:
+	case SYS_exit_group:
 #endif
 
 		/* don't put it to sleep either */
 #ifdef SYS_pause
-		case SYS_pause:
+	case SYS_pause:
 #endif
 #ifdef SYS_select
-		case SYS_select:
+	case SYS_select:
 #endif
 #ifdef SYS_read
-		case SYS_read:
+	case SYS_read:
 #endif
 #ifdef SYS_write
-		case SYS_write:
+	case SYS_write:
 #endif
 
 		/* these can fill the process table */
 #ifdef SYS_fork
-		case SYS_fork:
+	case SYS_fork:
 #endif
 #ifdef SYS_vfork
-		case SYS_vfork:
+	case SYS_vfork:
 #endif
 #ifdef SYS_clone
-		case SYS_clone:
+	case SYS_clone:
 #endif
 
 		/* This causes OOM conditions */
 #if 1
 #ifdef SYS_brk
-		case SYS_brk:
+	case SYS_brk:
 #endif
 #endif
 
 		/* these get our program killed */
 #ifdef SYS_vm86
-		case SYS_vm86:
+	case SYS_vm86:
 #endif
 #ifdef SYS_vm86old
-		case SYS_vm86old:
+	case SYS_vm86old:
 #endif
-			goto badcall;
+		goto badcall;
 	}
 
 	return x;
 }
 
-void bogus_signal_handler(int signum) {
-	fprintf(stderr, "                                    Signal %d on syscall(%lu, 0x%lX, 0x%lX, 0x%lX, 0x%lX, 0x%lX, 0x%lX).\n",
-			signum, callnum, args[0], args[1], args[2], args[3],
-			args[4], args[5]);
+void bogus_signal_handler(int signum)
+{
+	fprintf(stderr,
+		"                                    Signal %d on syscall(%lu, 0x%lX, 0x%lX, 0x%lX, 0x%lX, 0x%lX, 0x%lX).\n",
+		signum, callnum, args[0], args[1], args[2], args[3], args[4],
+		args[5]);
 }
 
-void real_signal_handler(int signum) {
+void real_signal_handler(int signum)
+{
 	exit(0);
 }
 
-void install_signal_handlers(void) {
+void install_signal_handlers(void)
+{
 	int x;
 	struct sigaction zig;
 
@@ -202,7 +211,8 @@
 	sigaction(SIGTERM, &zig, NULL);
 }
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	int i;
 	int debug = 0, zero_mode = 0;
 
@@ -229,13 +239,13 @@
 		if (debug) {
 			printf("syscall(%lu, 0x%lX, 0x%lX, 0x%lX, 0x%lX, "
 			       "0x%lX, 0x%lX);       \n",
-				callnum, args[0], args[1], args[2], args[3],
-				args[4], args[5]);
+			       callnum, args[0], args[1], args[2], args[3],
+			       args[4], args[5]);
 			fflush(stdout);
 		}
 
 		syscall(callnum, args[0], args[1], args[2],
-				args[3], args[4], args[5]);
+			args[3], args[4], args[5]);
 	}
 
 	return 0;
diff --git a/tools/pounder21/src/time_tests/inconsistency-check.c b/tools/pounder21/src/time_tests/inconsistency-check.c
index 04b82f7..38f4b29 100644
--- a/tools/pounder21/src/time_tests/inconsistency-check.c
+++ b/tools/pounder21/src/time_tests/inconsistency-check.c
@@ -58,7 +58,6 @@
 		clock_type = CLOCK_REALTIME;
 	}
 
-
 	clock_gettime(clock_type, &list[0]);
 	now = then = list[0].tv_sec;
 
@@ -68,32 +67,32 @@
 		inconsistent = 0;
 
 		/* Fill list */
-		for (i=0; i < CALLS_PER_LOOP; i++)
+		for (i = 0; i < CALLS_PER_LOOP; i++)
 			clock_gettime(clock_type, &list[i]);
 
 		/* Check for inconsistencies */
-		for (i=0; i < CALLS_PER_LOOP-1; i++)
-			if (!in_order(list[i],list[i+1]))
+		for (i = 0; i < CALLS_PER_LOOP - 1; i++)
+			if (!in_order(list[i], list[i + 1]))
 				inconsistent = i;
 
 		/* display inconsistency */
 		if (inconsistent) {
 			unsigned long long delta;
-			for (i=0; i < CALLS_PER_LOOP; i++) {
+			for (i = 0; i < CALLS_PER_LOOP; i++) {
 				if (i == inconsistent)
 					printf("--------------------\n");
-				printf("%lu:%lu\n",list[i].tv_sec,
-							list[i].tv_nsec);
-				if (i == inconsistent + 1 )
+				printf("%lu:%lu\n", list[i].tv_sec,
+				       list[i].tv_nsec);
+				if (i == inconsistent + 1)
 					printf("--------------------\n");
 			}
-			delta = list[inconsistent].tv_sec*NSEC_PER_SEC;
+			delta = list[inconsistent].tv_sec * NSEC_PER_SEC;
 			delta += list[inconsistent].tv_nsec;
-			delta -= list[inconsistent+1].tv_sec*NSEC_PER_SEC;
-			delta -= list[inconsistent+1].tv_nsec;
+			delta -= list[inconsistent + 1].tv_sec * NSEC_PER_SEC;
+			delta -= list[inconsistent + 1].tv_nsec;
 			printf("Delta: %llu ns\n", delta);
 			fflush(0);
-			/* timestamp inconsistency*/
+			/* timestamp inconsistency */
 			system("date");
 			return -1;
 		}
diff --git a/tools/pounder21/src/xbonkers/xbonkers.c b/tools/pounder21/src/xbonkers/xbonkers.c
index 6c1d182..31b2e54 100644
--- a/tools/pounder21/src/xbonkers/xbonkers.c
+++ b/tools/pounder21/src/xbonkers/xbonkers.c
@@ -79,33 +79,34 @@
  * makes it hard to get work done.
  */
 static int seed_random(void);
-static int get_desktop_size(Display *disp, unsigned long *w,
-	unsigned long *h);
-static char *get_property (Display *disp, Window win, Atom xa_prop_type,
-	char *prop_name, unsigned long *size, unsigned long *items);
-static void go_bonkers(Display *disp, unsigned long iterations,
-	unsigned long sleep);
-static Window *get_interesting_windows(Display *disp,
-	unsigned long *num_windows);
-static Window *get_client_list(Display *disp, unsigned long *size,
-	unsigned long *items);
+static int get_desktop_size(Display * disp, unsigned long *w, unsigned long *h);
+static char *get_property(Display * disp, Window win, Atom xa_prop_type,
+			  char *prop_name, unsigned long *size,
+			  unsigned long *items);
+static void go_bonkers(Display * disp, unsigned long iterations,
+		       unsigned long sleep);
+static Window *get_interesting_windows(Display * disp,
+				       unsigned long *num_windows);
+static Window *get_client_list(Display * disp, unsigned long *size,
+			       unsigned long *items);
 static long get_randnum(long min, long max);
-static int send_client_msg(Display *disp, Window win, char *msg,
-	unsigned long data0, unsigned long data1,
-	unsigned long data2, unsigned long data3,
-	unsigned long data4);
-static int activate_window (Display *disp, Window *win);
-static int wm_supports(Display *disp, const char *prop);
-static void move_window(Display *disp, Window *win, unsigned long desk_w,
-	unsigned long desk_h);
-static int toggle_property(Display *disp, Window *win, const char *property);
+static int send_client_msg(Display * disp, Window win, char *msg,
+			   unsigned long data0, unsigned long data1,
+			   unsigned long data2, unsigned long data3,
+			   unsigned long data4);
+static int activate_window(Display * disp, Window * win);
+static int wm_supports(Display * disp, const char *prop);
+static void move_window(Display * disp, Window * win, unsigned long desk_w,
+			unsigned long desk_h);
+static int toggle_property(Display * disp, Window * win, const char *property);
 static inline unsigned long clamp_value(unsigned long value,
-	unsigned long min, unsigned long max);
-static int ignore_xlib_error(Display *disp, XErrorEvent *xee);
+					unsigned long min, unsigned long max);
+static int ignore_xlib_error(Display * disp, XErrorEvent * xee);
 
 /* Actual functions begin here. */
 
-static int seed_random(void) {
+static int seed_random(void)
+{
 	int fp;
 	long seed;
 
@@ -126,15 +127,17 @@
 	return 1;
 }
 
-static int get_desktop_size(Display *disp, unsigned long *w, unsigned long *h) {
+static int get_desktop_size(Display * disp, unsigned long *w, unsigned long *h)
+{
 	*w = DisplayWidth(disp, 0);
 	*h = DisplayHeight(disp, 0);
 
 	return 1;
 }
 
-static char *get_property (Display *disp, Window win, Atom xa_prop_type,
-	char *prop_name, unsigned long *size, unsigned long *items)
+static char *get_property(Display * disp, Window win, Atom xa_prop_type,
+			  char *prop_name, unsigned long *size,
+			  unsigned long *items)
 {
 	Atom xa_prop_name;
 	Atom xa_ret_type;
@@ -147,10 +150,10 @@
 
 	xa_prop_name = XInternAtom(disp, prop_name, False);
 
-	if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False,
-		xa_prop_type, &xa_ret_type, &ret_format,
-		&ret_nitems, &ret_bytes_after, &ret_prop) != Success)
-	{
+	if (XGetWindowProperty
+	    (disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False,
+	     xa_prop_type, &xa_ret_type, &ret_format, &ret_nitems,
+	     &ret_bytes_after, &ret_prop) != Success) {
 		fprintf(stderr, "Cannot get %s property.\n", prop_name);
 		return NULL;
 	}
@@ -165,8 +168,7 @@
 	 * is listed as 32bits and we're trying to get the client list.  Just double
 	 * ret_format and proceed. */
 	if (ret_format == 32 && strcmp(prop_name, "_NET_CLIENT_LIST") == 0 &&
-		sizeof(Window) == 8)
-	{
+	    sizeof(Window) == 8) {
 		ret_format *= 2;
 	}
 
@@ -191,19 +193,21 @@
 	return ret;
 }
 
-static long get_randnum(long min, long max) {
+static long get_randnum(long min, long max)
+{
 	return min + (long)((float)max * (rand() / (RAND_MAX + 1.0)));
 }
 
-static int wm_supports(Display *disp, const char *prop) {
+static int wm_supports(Display * disp, const char *prop)
+{
 	Atom xa_prop = XInternAtom(disp, prop, False);
 	Atom *list;
 	unsigned long size, items;
 	int i;
 
-	if (! (list = (Atom *)get_property(disp, DefaultRootWindow(disp),
-		XA_ATOM, "_NET_SUPPORTED", &size, &items)))
-	{
+	if (!(list = (Atom *) get_property(disp, DefaultRootWindow(disp),
+					   XA_ATOM, "_NET_SUPPORTED", &size,
+					   &items))) {
 		fprintf(stderr, "Cannot get _NET_SUPPORTED property.\n");
 		return 0;
 	}
@@ -222,36 +226,43 @@
 }
 
 static inline unsigned long clamp_value(unsigned long value,
-	unsigned long min, unsigned long max)
+					unsigned long min, unsigned long max)
 {
 	return (value < min ? min : (value > max ? max : value));
 }
 
-static int ignore_xlib_error(Display *disp, XErrorEvent *xee) {
+static int ignore_xlib_error(Display * disp, XErrorEvent * xee)
+{
 	char errbuf[256];
 
 	XGetErrorText(disp, xee->error_code, errbuf, 256);
-	fprintf(stderr, "IGNORING Xlib error %d (%s) on request (%d.%d), sernum = %lu.\n",
+	fprintf(stderr,
+		"IGNORING Xlib error %d (%s) on request (%d.%d), sernum = %lu.\n",
 		xee->error_code, errbuf, xee->request_code, xee->minor_code,
 		xee->serial);
 	return 1;
 }
 
-static void slide_window(Display *disp, Window *win, unsigned long desk_w, unsigned long desk_h) {
+static void slide_window(Display * disp, Window * win, unsigned long desk_w,
+			 unsigned long desk_h)
+{
 	unsigned long x, y;
 	unsigned long w, h;
 	XWindowAttributes moo;
 	Window junk;
 
 	if (XGetWindowAttributes(disp, *win, &moo) != 1) {
-		fprintf(stderr, "Cannot get attributes of window 0x%lx.\n", *win);
+		fprintf(stderr, "Cannot get attributes of window 0x%lx.\n",
+			*win);
 		return;
 	}
 
 	if (XTranslateCoordinates(disp, *win, moo.root,
-		-moo.border_width, -moo.border_width, &moo.x, &moo.y, &junk) != 1)
-	{
-		fprintf(stderr, "Cannot translate coordinates of window 0x%lx.\n", *win);
+				  -moo.border_width, -moo.border_width, &moo.x,
+				  &moo.y, &junk) != 1) {
+		fprintf(stderr,
+			"Cannot translate coordinates of window 0x%lx.\n",
+			*win);
 		return;
 	}
 
@@ -267,13 +278,15 @@
 
 	if (wm_supports(disp, "_NET_MOVERESIZE_WINDOW")) {
 		send_client_msg(disp, *win, "_NET_MOVERESIZE_WINDOW",
-			0, x, y, w, h);
+				0, x, y, w, h);
 	} else {
 		XMoveResizeWindow(disp, *win, x, y, w, h);
 	}
 }
 
-static void move_window(Display *disp, Window *win, unsigned long desk_w, unsigned long desk_h) {
+static void move_window(Display * disp, Window * win, unsigned long desk_w,
+			unsigned long desk_h)
+{
 	unsigned long x, y, w, h;
 
 	x = get_randnum(0, desk_w);
@@ -283,21 +296,24 @@
 
 	if (wm_supports(disp, "_NET_MOVERESIZE_WINDOW")) {
 		send_client_msg(disp, *win, "_NET_MOVERESIZE_WINDOW",
-			0, x, y, w, h);
+				0, x, y, w, h);
 	} else {
 		XMoveResizeWindow(disp, *win, x, y, w, h);
 	}
 }
 
-static int toggle_property(Display *disp, Window *win, const char *property) {
+static int toggle_property(Display * disp, Window * win, const char *property)
+{
 	Atom prop;
 
 	prop = XInternAtom(disp, property, False);
 	return send_client_msg(disp, *win, "_NET_WM_STATE",
-		_NET_WM_STATE_TOGGLE, prop, 0, 0, 0);
+			       _NET_WM_STATE_TOGGLE, prop, 0, 0, 0);
 }
 
-static void go_bonkers(Display *disp, unsigned long iterations, unsigned long sleep) {
+static void go_bonkers(Display * disp, unsigned long iterations,
+		       unsigned long sleep)
+{
 	unsigned long desk_w, desk_h;
 	Window *windows, *window;
 	unsigned long windows_length = 0, i;
@@ -323,35 +339,35 @@
 	for (i = 0; i < iterations; i++) {
 		window = &windows[i % windows_length];
 		switch (get_randnum(ACTION_MIN, ACTION_MAX)) {
-			case ACTION_MOVE_WINDOW:
-				move_window(disp, window, desk_w, desk_h);
-				break;
-			case ACTION_ACTIVATE_WINDOW:
-				activate_window(disp, window);
-				break;
-			case ACTION_MAXIMIZE_WINDOW:
-				toggle_property(disp, window,
+		case ACTION_MOVE_WINDOW:
+			move_window(disp, window, desk_w, desk_h);
+			break;
+		case ACTION_ACTIVATE_WINDOW:
+			activate_window(disp, window);
+			break;
+		case ACTION_MAXIMIZE_WINDOW:
+			toggle_property(disp, window,
 					"_NET_WM_STATE_MAXIMIZED_VERT");
-				toggle_property(disp, window,
+			toggle_property(disp, window,
 					"_NET_WM_STATE_MAXIMIZED_HORZ");
+			break;
+		case ACTION_FULLSCREEN_WINDOW:
+			if (!enable_fullscreen)
 				break;
-			case ACTION_FULLSCREEN_WINDOW:
-				if (!enable_fullscreen) break;
-				toggle_property(disp, window,
+			toggle_property(disp, window,
 					"_NET_WM_STATE_FULLSCREEN");
-				break;
-			case ACTION_HIDDEN_WINDOW:
-				toggle_property(disp, window,
-					"_NET_WM_STATE_HIDDEN");
-				break;
-			case ACTION_SLIDE_WINDOW_0:
-			case ACTION_SLIDE_WINDOW_1:
-			case ACTION_SLIDE_WINDOW_2:
-			case ACTION_SLIDE_WINDOW_3:
-			case ACTION_SLIDE_WINDOW_4:
-			case ACTION_SLIDE_WINDOW_5:
-				slide_window(disp, window, desk_w, desk_h);
-				break;
+			break;
+		case ACTION_HIDDEN_WINDOW:
+			toggle_property(disp, window, "_NET_WM_STATE_HIDDEN");
+			break;
+		case ACTION_SLIDE_WINDOW_0:
+		case ACTION_SLIDE_WINDOW_1:
+		case ACTION_SLIDE_WINDOW_2:
+		case ACTION_SLIDE_WINDOW_3:
+		case ACTION_SLIDE_WINDOW_4:
+		case ACTION_SLIDE_WINDOW_5:
+			slide_window(disp, window, desk_w, desk_h);
+			break;
 		}
 		usleep(sleep);
 	}
@@ -359,10 +375,10 @@
 	free(windows);
 }
 
-static int send_client_msg(Display *disp, Window win, char *msg,
-	unsigned long data0, unsigned long data1,
-	unsigned long data2, unsigned long data3,
-	unsigned long data4)
+static int send_client_msg(Display * disp, Window win, char *msg,
+			   unsigned long data0, unsigned long data1,
+			   unsigned long data2, unsigned long data3,
+			   unsigned long data4)
 {
 	XEvent event;
 	long mask = SubstructureRedirectMask | SubstructureNotifyMask;
@@ -387,56 +403,62 @@
 	}
 }
 
-static int activate_window (Display *disp, Window *win) {
+static int activate_window(Display * disp, Window * win)
+{
 	int ret;
 
-	ret = send_client_msg(disp, *win, "_NET_ACTIVE_WINDOW",
-		0, 0, 0, 0, 0);
+	ret = send_client_msg(disp, *win, "_NET_ACTIVE_WINDOW", 0, 0, 0, 0, 0);
 	XMapRaised(disp, *win);
 
 	return ret;
 }
 
-static Window *get_client_list(Display *disp, unsigned long *size, unsigned long *items) {
+static Window *get_client_list(Display * disp, unsigned long *size,
+			       unsigned long *items)
+{
 	void *res;
 
-	if ((res = (Window *)get_property(disp, DefaultRootWindow(disp),
-		XA_WINDOW, "_NET_CLIENT_LIST", size, items)) == NULL)
-	{
-		if ((res = (Window *)get_property(disp, DefaultRootWindow(disp),
-			XA_CARDINAL, "_WIN_CLIENT_LIST", size, items)) == NULL)
-		{
-			fprintf(stderr, "Cannot get client list properties. \n"
-				"(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)"
-			"\n");
+	if ((res = (Window *) get_property(disp, DefaultRootWindow(disp),
+					   XA_WINDOW, "_NET_CLIENT_LIST", size,
+					   items)) == NULL) {
+		if ((res =
+		     (Window *) get_property(disp, DefaultRootWindow(disp),
+					     XA_CARDINAL, "_WIN_CLIENT_LIST",
+					     size, items)) == NULL) {
+			fprintf(stderr,
+				"Cannot get client list properties. \n"
+				"(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)" "\n");
 			return NULL;
 		}
 	}
 
-	return (Window *)res;
+	return (Window *) res;
 }
 
-static Window *get_interesting_windows(Display *disp, unsigned long *num_windows) {
+static Window *get_interesting_windows(Display * disp,
+				       unsigned long *num_windows)
+{
 	Window *client_list, *ret, *tmp;
 	unsigned long client_list_size, client_list_items, i;
 	long *desktop;
 	unsigned long num_needed = 0;
 
 	if ((client_list = get_client_list(disp, &client_list_size,
-		&client_list_items)) == NULL)
-	{
+					   &client_list_items)) == NULL) {
 		return NULL;
 	}
 
-
 	/* Figure out how many Window structs we'll ultimately need. */
 	for (i = 0; i < client_list_items; i++) {
 		/* desktop ID */
 		if ((desktop = (long *)get_property(disp, client_list[i],
-			XA_CARDINAL, "_NET_WM_DESKTOP", NULL, NULL)) == NULL)
-		{
-			desktop = (long *)get_property(disp, client_list[i],
-				XA_CARDINAL, "_WIN_WORKSPACE", NULL, NULL);
+						    XA_CARDINAL,
+						    "_NET_WM_DESKTOP", NULL,
+						    NULL)) == NULL) {
+			desktop =
+			    (long *)get_property(disp, client_list[i],
+						 XA_CARDINAL, "_WIN_WORKSPACE",
+						 NULL, NULL);
 		}
 
 		/* Ignore windows on unknown desktops */
@@ -458,10 +480,13 @@
 	for (i = 0; i < client_list_items; i++) {
 		/* desktop ID */
 		if ((desktop = (long *)get_property(disp, client_list[i],
-			XA_CARDINAL, "_NET_WM_DESKTOP", NULL, NULL)) == NULL)
-		{
-			desktop = (long *)get_property(disp, client_list[i],
-				XA_CARDINAL, "_WIN_WORKSPACE", NULL, NULL);
+						    XA_CARDINAL,
+						    "_NET_WM_DESKTOP", NULL,
+						    NULL)) == NULL) {
+			desktop =
+			    (long *)get_property(disp, client_list[i],
+						 XA_CARDINAL, "_WIN_WORKSPACE",
+						 NULL, NULL);
 		}
 
 		if (desktop && *desktop >= 0 && *desktop < DESKTOP_MAX) {
@@ -476,8 +501,8 @@
 	return ret;
 }
 
-
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	char *disp_string = NULL;
 	unsigned long iterations = 10000, rounds = -1, i;
 	unsigned long sleep = 100000;
@@ -486,36 +511,38 @@
 
 	while ((opt = getopt(argc, argv, "d:i:r:s:f")) != -1) {
 		switch (opt) {
-			case 'd':
-				disp_string = optarg;
-				break;
-			case 'i':
-				iterations = atoi(optarg);
-				break;
-			case 'r':
-				rounds = atoi(optarg);
-				break;
-			case 's':
-				sleep = atoi(optarg);
-				break;
-			case 'f':
-				enable_fullscreen = 1;
-				break;
-			default:
-				fprintf(stderr,
-"Usage: %s [-d DISPLAY] [-i ITERATIONS] [-r ROUNDS] [-s SLEEP] [-f]\n\
+		case 'd':
+			disp_string = optarg;
+			break;
+		case 'i':
+			iterations = atoi(optarg);
+			break;
+		case 'r':
+			rounds = atoi(optarg);
+			break;
+		case 's':
+			sleep = atoi(optarg);
+			break;
+		case 'f':
+			enable_fullscreen = 1;
+			break;
+		default:
+			fprintf(stderr,
+				"Usage: %s [-d DISPLAY] [-i ITERATIONS] [-r ROUNDS] [-s SLEEP] [-f]\n\
 	DISPLAY is an X11 display string.\n\
 	ITERATIONS is the approximate number of windows to play with before generating a new window list.\n\
 	SLEEP is the amount of time (in usec) to sleep between window tweaks.\n\
 	-f enables fullscreen toggling.\n\
-	ROUNDS is the number of iterations to run, or -1 to run forever.\n", argv[0]);
-				return 0;
+	ROUNDS is the number of iterations to run, or -1 to run forever.\n",
+				argv[0]);
+			return 0;
 		}
 	}
 
 	if (!(disp = XOpenDisplay(disp_string))) {
 		fprintf(stderr, "Unable to connect to display '%s'.\n",
-			(disp_string != NULL ? disp_string : getenv("DISPLAY")));
+			(disp_string !=
+			 NULL ? disp_string : getenv("DISPLAY")));
 		return 1;
 	}
 
diff --git a/tools/pounder21/timed_loop.c b/tools/pounder21/timed_loop.c
index 17aaeb3..966c08a 100644
--- a/tools/pounder21/timed_loop.c
+++ b/tools/pounder21/timed_loop.c
@@ -34,15 +34,19 @@
 static pid_t test_pgrp;
 static FILE *tty_fp;
 
-static void int_func(int signum) {
-	pounder_fprintf(tty_fp, "%s: Killed by interrupt.  Last exit code = %d.\n",
-		progname, res);
+static void int_func(int signum)
+{
+	pounder_fprintf(tty_fp,
+			"%s: Killed by interrupt.  Last exit code = %d.\n",
+			progname, res);
 	kill(-test_pgrp, SIGTERM);
 	exit(res);
 }
-static void alarm_func(int signum) {
+
+static void alarm_func(int signum)
+{
 	pounder_fprintf(tty_fp, "%s: Killed by timer.  Last exit code = %d.\n",
-		progname, res);
+			progname, res);
 	kill(-test_pgrp, SIGTERM);
 	exit(res);
 }
@@ -53,7 +57,8 @@
 }
 */
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
 	int secs, stat;
 	pid_t pid;
 	unsigned int revs = 0;
@@ -63,23 +68,26 @@
 	int fail_counter = 1;
 
 	if (argc < 3) {
-		printf("Usage: %s [-m max_failures] time_in_sec command [args]\n", argv[0]);
+		printf
+		    ("Usage: %s [-m max_failures] time_in_sec command [args]\n",
+		     argv[0]);
 		exit(1);
 	}
-
 	//by default, set max_failures to whatever the env variable $MAX_FAILURES is
-        char *max_failures_env = getenv("MAX_FAILURES");
-        max_failures = atoi(max_failures_env);
+	char *max_failures_env = getenv("MAX_FAILURES");
+	max_failures = atoi(max_failures_env);
 
 	//if the -m option is used when calling timed_loop, override max_failures
 	//specified by $MAX_FAILURES with the given argument instead
 	if (argc > 4 && strcmp(argv[1], "-m") == 0) {
 		if ((max_failures = atoi(argv[2])) >= 0) {
 			use_max_failures = 1;
-		}
-		else {
-			printf("Usage: %s [-m max_failures] time_in_sec command [args]\n", argv[0]);
-			printf("max_failures should be a nonnegative integer\n");
+		} else {
+			printf
+			    ("Usage: %s [-m max_failures] time_in_sec command [args]\n",
+			     argv[0]);
+			printf
+			    ("max_failures should be a nonnegative integer\n");
 			exit(1);
 		}
 	}
@@ -100,8 +108,7 @@
 		} else {
 			progname++;
 		}
-	}
-	else {
+	} else {
 		progname = rindex(argv[2], '/');
 		if (progname == NULL) {
 			progname = argv[2];
@@ -123,20 +130,19 @@
 
 	if (use_max_failures) {
 		secs = atoi(argv[3]);
-	}
-	else {
+	} else {
 		secs = atoi(argv[1]);
 	}
 	alarm(secs);
 
 	while (1) {
-		pounder_fprintf(tty_fp, "%s: %s loop #%d.\n", progname, start_msg, revs++);
+		pounder_fprintf(tty_fp, "%s: %s loop #%d.\n", progname,
+				start_msg, revs++);
 		pid = fork();
 		if (pid == 0) {
 			if (setpgrp() < 0) {
 				perror("setpgid");
 			}
-
 			// run the program
 			if (use_max_failures) {
 				if (argc > 5) {
@@ -146,8 +152,7 @@
 				}
 
 				perror(argv[4]);
-			}
-			else {
+			} else {
 				if (argc > 3) {
 					stat = execvp(argv[2], &argv[2]);
 				} else {
@@ -168,24 +173,26 @@
 			perror("waitpid");
 			exit(1);
 		}
-
 		// interrogate it
 		if (WIFSIGNALED(stat)) {
 			pounder_fprintf(tty_fp, "%s: %s on signal %d.\n",
-				progname, fail_msg, WTERMSIG(stat));
+					progname, fail_msg, WTERMSIG(stat));
 			res = 255;
 		} else {
 			res = WEXITSTATUS(stat);
 			if (res == 0) {
-				pounder_fprintf(tty_fp, "%s: %s.\n", progname, pass_msg);
+				pounder_fprintf(tty_fp, "%s: %s.\n", progname,
+						pass_msg);
 			} else if (res < 0 || res == 255) {
-				pounder_fprintf(tty_fp, "CHECK %s: %s with code %d.\n",
-					progname, abort_msg, res);
+				pounder_fprintf(tty_fp,
+						"CHECK %s: %s with code %d.\n",
+						progname, abort_msg, res);
 				exit(-1);
 				// FIXME: add test to blacklist
 			} else {
-				pounder_fprintf(tty_fp, "%s: %s with code %d.\n",
-					progname, fail_msg, res);
+				pounder_fprintf(tty_fp,
+						"%s: %s with code %d.\n",
+						progname, fail_msg, res);
 				if (max_failures > 0) {
 					if (++fail_counter > max_failures) {
 						exit(-1);
diff --git a/tools/rand_lines.c b/tools/rand_lines.c
index 87fc71a..fdf3f79 100644
--- a/tools/rand_lines.c
+++ b/tools/rand_lines.c
@@ -116,14 +116,14 @@
 	long offset;
 };
 
-void usage(FILE *stream);
+void usage(FILE * stream);
 void help();
-int rnd_file(FILE *infile, int numlines, long seed);
-int get_numlines(FILE *infile);
+int rnd_file(FILE * infile, int numlines, long seed);
+int get_numlines(FILE * infile);
 int rnd_insert(struct offset_t offsets[], long offset, int size);
 
-#define DEF_SIZE	4096            /* default chunk size */
-#define MAX_LN_SZ	4096		/* max line size */
+#define DEF_SIZE	4096	/* default chunk size */
+#define MAX_LN_SZ	4096	/* max line size */
 
 #ifndef SEEK_SET
 #define SEEK_SET	0
@@ -134,112 +134,111 @@
 /***********************************************************************
  *  MAIN
  ***********************************************************************/
-int
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
-    FILE *infile;
-    int c;
-    long seed = -1;		/* use time as seed */
-    int lsize = DEF_SIZE;	/* num lines to randomize */
-    int getfilelines = 0;	/* if set, count lines first */
+	FILE *infile;
+	int c;
+	long seed = -1;		/* use time as seed */
+	int lsize = DEF_SIZE;	/* num lines to randomize */
+	int getfilelines = 0;	/* if set, count lines first */
 
-    if ((Progname = strrchr(argv[0], '/')) == NULL)
-	Progname = argv[0];
-    else
-	Progname++;
+	if ((Progname = strrchr(argv[0], '/')) == NULL)
+		Progname = argv[0];
+	else
+		Progname++;
 
-    while ((c = getopt (argc, argv, "hgS:l:")) != EOF) {
-	switch(c) {
-	case 'h':
-	    help();
-	    exit(0);
-	    break;
-	case 'S':	/* seed */
-	    if (sscanf(optarg, "%li", &seed) != 1) {
-		fprintf(stderr, "%s: --S option argument is invalid\n", Progname);
+	while ((c = getopt(argc, argv, "hgS:l:")) != EOF) {
+		switch (c) {
+		case 'h':
+			help();
+			exit(0);
+			break;
+		case 'S':	/* seed */
+			if (sscanf(optarg, "%li", &seed) != 1) {
+				fprintf(stderr,
+					"%s: --S option argument is invalid\n",
+					Progname);
+				exit(1);
+			}
+			break;
+
+		case 'l':	/* number of lines */
+			if (sscanf(optarg, "%i", &lsize) != 1) {
+				fprintf(stderr,
+					"%s: --s option argument is invalid\n",
+					Progname);
+				exit(1);
+			}
+			break;
+
+		case 'g':
+			getfilelines++;
+			break;
+
+		case '?':
+			usage(stderr);
+			exit(1);
+			break;
+		}
+	}
+
+	if (optind + 1 != argc) {
+		fprintf(stderr, "%s: Missing argument.\n", Progname);
+		usage(stderr);
 		exit(1);
-	    }
-	    break;
-
-	case 'l':	/* number of lines */
-	    if (sscanf(optarg, "%i", &lsize) != 1) {
-		fprintf(stderr, "%s: --s option argument is invalid\n", Progname);
-		exit(1);
-	    }
-	    break;
-
-	case 'g':
-	    getfilelines++;
-	    break;
-
-	case '?':
-	    usage(stderr);
-	    exit(1);
-	    break;
-	}
-    }
-
-    if (optind + 1 != argc) {
-	fprintf(stderr, "%s: Missing argument.\n", Progname);
-	usage(stderr);
-	exit(1);
-    }
-
-    if (seed == -1) {
-	seed = time(0);
-    }
-
-    if (strcmp(argv[argc-1],"-") == 0) {
-	infile = stdin;
-	fprintf(stderr, "%s: Can not support stdin processing.\n",
-	    Progname);
-	exit(2);
-    }
-    else {
-
-	if ((infile=fopen(argv[argc-1], "r")) == NULL) {
-	    fprintf(stderr, "%s: Unable to open file %s: %s\n",
-	       	Progname, argv[argc-1], strerror(errno));
-	    exit(1);
 	}
 
-        if (getfilelines) {
-	    lsize=get_numlines(infile);
+	if (seed == -1) {
+		seed = time(0);
 	}
 
-	rnd_file(infile, lsize, seed);
-    }
+	if (strcmp(argv[argc - 1], "-") == 0) {
+		infile = stdin;
+		fprintf(stderr, "%s: Can not support stdin processing.\n",
+			Progname);
+		exit(2);
+	} else {
 
-    exit(0);
+		if ((infile = fopen(argv[argc - 1], "r")) == NULL) {
+			fprintf(stderr, "%s: Unable to open file %s: %s\n",
+				Progname, argv[argc - 1], strerror(errno));
+			exit(1);
+		}
+
+		if (getfilelines) {
+			lsize = get_numlines(infile);
+		}
+
+		rnd_file(infile, lsize, seed);
+	}
+
+	exit(0);
 }
 
 /***********************************************************************
  * Print usage message to stream.
  ***********************************************************************/
-void
-usage(FILE *stream)
+void usage(FILE * stream)
 {
-    fprintf(stream,
-	"Usage %s [-hg][-S seed][-l numlines] [files...]\n", Progname);
+	fprintf(stream,
+		"Usage %s [-hg][-S seed][-l numlines] [files...]\n", Progname);
 
 }
 
 /***********************************************************************
  * Print help message to stdout.
  ***********************************************************************/
-void
-help()
+void help()
 {
-    usage(stdout);
-    printf("This tool will print lines in random order (max line len %d).\n\
+	usage(stdout);
+	printf("This tool will print lines in random order (max line len %d).\n\
   -h          : print this help and exit\n\
   -g          : count the number of lines in the file before randomizing\n\
 	        This option overrides -l option.\n\
   -l numlines : randoms lines in numlines chuncks (def %d)\n\
-  -S seed     : sets seed to seed (def time(0))\n",
-    MAX_LN_SZ, DEF_SIZE);
+  -S seed     : sets seed to seed (def time(0))\n", MAX_LN_SZ, DEF_SIZE);
 
 }
 
@@ -247,21 +246,20 @@
  * counts the number of lines in already open file.
  * Note: File must be seekable (not stdin or a pipe).
  ***********************************************************************/
-int
-get_numlines(infile)
+int get_numlines(infile)
 FILE *infile;
 {
-    char line[MAX_LN_SZ];		/* max size of a line */
-    int cnt=0;
+	char line[MAX_LN_SZ];	/* max size of a line */
+	int cnt = 0;
 
-    while (fgets(line, MAX_LN_SZ, infile) != NULL) {
-	cnt++;
-    }
+	while (fgets(line, MAX_LN_SZ, infile) != NULL) {
+		cnt++;
+	}
 
-    /* rewind the file */
-    fseek(infile, 0, SEEK_SET);
+	/* rewind the file */
+	fseek(infile, 0, SEEK_SET);
 
-    return cnt;
+	return cnt;
 }
 
 /***********************************************************************
@@ -272,85 +270,86 @@
  * It will then print each line in the array stored order.
  *
  ***********************************************************************/
-int
-rnd_file(infile, numlines, seed)
+int rnd_file(infile, numlines, seed)
 FILE *infile;
-int numlines;		/* can be more or less than num lines in file */
+int numlines;			/* can be more or less than num lines in file */
 			/* most opt randomized when num lines in files */
 			/* or just a bit bigger */
 long seed;
 {
 
-    char line[MAX_LN_SZ];		/* max size of a line */
-    int cnt;
-    long coffset;		/* current line offset */
+	char line[MAX_LN_SZ];	/* max size of a line */
+	int cnt;
+	long coffset;		/* current line offset */
 
-    struct offset_t *offsets;
-    int memsize;
+	struct offset_t *offsets;
+	int memsize;
 
-    if (numlines <= 0) {	/*use default */
-	numlines = DEF_SIZE;
-    }
-
-    /*
-     * Malloc space for numlines copies the offset_t structure.
-     * This is where the randomization takes place.
-     */
-    memsize = sizeof(struct offset_t)*numlines;
-
-    if ((offsets=(struct offset_t *)malloc(memsize)) == NULL) {
-	fprintf(stderr, "Unable to malloc(%d): errno:%d\n", memsize, errno);
-	return -1;
-    }
-
-    random_range_seed(seed);
-
-    coffset=0;
-
-    while (! feof(infile)) {
-
-        fseek(infile, coffset, SEEK_SET);
-        coffset=ftell(infile);
-        memset(offsets, 0, memsize);
-        cnt=0;
+	if (numlines <= 0) {	/*use default */
+		numlines = DEF_SIZE;
+	}
 
 	/*
-	 * read the file in and place offset of each line randomly
-	 * into offsets array.  Only numlines line can be randomized
-	 * at a time.
+	 * Malloc space for numlines copies the offset_t structure.
+	 * This is where the randomization takes place.
 	 */
-        while (cnt < numlines && fgets(line, MAX_LN_SZ, infile) != NULL) {
+	memsize = sizeof(struct offset_t) * numlines;
 
-	    if (rnd_insert(offsets, coffset, numlines) < 0) {
-	      fprintf(stderr, "%s:%d rnd_insert() returned -1 (fatal error)!\n",
-		  __FILE__, __LINE__);
-	      abort();
-	    }
-	    cnt++;
+	if ((offsets = (struct offset_t *)malloc(memsize)) == NULL) {
+		fprintf(stderr, "Unable to malloc(%d): errno:%d\n", memsize,
+			errno);
+		return -1;
+	}
 
-	    coffset=ftell(infile);
-        }
+	random_range_seed(seed);
 
-        if (cnt == 0) {
-	    continue;
-        }
+	coffset = 0;
 
-        /*
-         * print out lines based on offset.
-         */
-        for (cnt=0; cnt<numlines; cnt++) {
+	while (!feof(infile)) {
 
-	    if (offsets[cnt].used) {
-	        fseek(infile, offsets[cnt].offset, SEEK_SET);
-	        if (fgets(line, MAX_LN_SZ, infile) == NULL)
-		    err(1, "fgets");
-	        fputs(line, stdout);
-	    }
-        }
+		fseek(infile, coffset, SEEK_SET);
+		coffset = ftell(infile);
+		memset(offsets, 0, memsize);
+		cnt = 0;
 
-    }	/* end of file */
+		/*
+		 * read the file in and place offset of each line randomly
+		 * into offsets array.  Only numlines line can be randomized
+		 * at a time.
+		 */
+		while (cnt < numlines && fgets(line, MAX_LN_SZ, infile) != NULL) {
 
-    return 0;
+			if (rnd_insert(offsets, coffset, numlines) < 0) {
+				fprintf(stderr,
+					"%s:%d rnd_insert() returned -1 (fatal error)!\n",
+					__FILE__, __LINE__);
+				abort();
+			}
+			cnt++;
+
+			coffset = ftell(infile);
+		}
+
+		if (cnt == 0) {
+			continue;
+		}
+
+		/*
+		 * print out lines based on offset.
+		 */
+		for (cnt = 0; cnt < numlines; cnt++) {
+
+			if (offsets[cnt].used) {
+				fseek(infile, offsets[cnt].offset, SEEK_SET);
+				if (fgets(line, MAX_LN_SZ, infile) == NULL)
+					err(1, "fgets");
+				fputs(line, stdout);
+			}
+		}
+
+	}			/* end of file */
+
+	return 0;
 }
 
 /***********************************************************************
@@ -360,57 +359,53 @@
  * open array element.
  *
  ***********************************************************************/
-int
-rnd_insert(offsets, offset, size)
+int rnd_insert(offsets, offset, size)
 struct offset_t offsets[];
 long offset;
 int size;
 {
-    int rand_num;
-    int quick = 0;
-    int ind;
+	int rand_num;
+	int quick = 0;
+	int ind;
 
-    /*
-     * Loop looking for random unused index.
-     * It will only be attempted 75 times.
-     */
-    while (quick < 75) {
+	/*
+	 * Loop looking for random unused index.
+	 * It will only be attempted 75 times.
+	 */
+	while (quick < 75) {
 
-	rand_num=random_range(0, size-1, 1, NULL);
+		rand_num = random_range(0, size - 1, 1, NULL);
 
-	if (! offsets[rand_num].used) {
-	    offsets[rand_num].offset=offset;
-	    offsets[rand_num].used++;
-	    return rand_num;
+		if (!offsets[rand_num].used) {
+			offsets[rand_num].offset = offset;
+			offsets[rand_num].used++;
+			return rand_num;
+		}
+		quick++;
 	}
-	quick++;
-    }
 
-    /*
-     * an randomly choosen index was not found, find
-     * first open index and use it.
-     */
-    for (ind=0; ind < size && offsets[ind].used != 0; ind++)
-      ; /* do nothing */
+	/*
+	 * an randomly choosen index was not found, find
+	 * first open index and use it.
+	 */
+	for (ind = 0; ind < size && offsets[ind].used != 0; ind++) ;	/* do nothing */
 
-    if (ind >= size) {
-      /*
-       * If called with an array where all offsets are used,
-       * we won't be able to find an open array location.
-       * Thus, return -1 indicating the error.
-       * This should never happen if called correctly.
-       */
-      return -1;
-    }
+	if (ind >= size) {
+		/*
+		 * If called with an array where all offsets are used,
+		 * we won't be able to find an open array location.
+		 * Thus, return -1 indicating the error.
+		 * This should never happen if called correctly.
+		 */
+		return -1;
+	}
 
-    offsets[ind].offset=offset;
-    offsets[ind].used++;
-    return ind;
+	offsets[ind].offset = offset;
+	offsets[ind].used++;
+	return ind;
 
 }
 
-
-
 /***********************************************************************
  *
  * CODE NOT TESTED AT ALL - it must be tested before it is used.
@@ -419,133 +414,138 @@
  * file (i.e stdin).
  *
  ***********************************************************************/
-int
-rnd_stdin(infile, space, numlines, seed)
+int rnd_stdin(infile, space, numlines, seed)
 FILE *infile;
-int space;		/* amount of space to use to read file into memory, */
+int space;			/* amount of space to use to read file into memory, */
 			/* randomized and print.  randomize in chunks */
-int numlines;		/* can be more or less than num lines in file */
+int numlines;			/* can be more or less than num lines in file */
 			/* most opt randomized when num lines in files */
 			/* or just a bit bigger */
 long seed;
 {
 
-    char line[MAX_LN_SZ];		/* max size of a line */
-    int cnt;				/* offset printer counter */
-    long loffset;			/* last line address */
-    char *buffer;			/* malloc space for file reads */
-    char *rdbuff;			/* where to start read */
-    long stopaddr;			/* end of read space (address)*/
-    int rdsz;				/* amount read */
-    int sztord;
-    char *chr;				/* buffer processing pointer */
-    char *ptr;				/* printing processing pointer */
-    char *lptr;				/* printing processing pointer */
-    int loopcntl = 1;			/* main loop control flag */
-    struct offset_t *offsets;		/* pointer to offset space */
-    int memsize;			/* amount of offset space to malloc */
-    int newbuffer = 1;			/* need new buffer */
+	char line[MAX_LN_SZ];	/* max size of a line */
+	int cnt;		/* offset printer counter */
+	long loffset;		/* last line address */
+	char *buffer;		/* malloc space for file reads */
+	char *rdbuff;		/* where to start read */
+	long stopaddr;		/* end of read space (address) */
+	int rdsz;		/* amount read */
+	int sztord;
+	char *chr;		/* buffer processing pointer */
+	char *ptr;		/* printing processing pointer */
+	char *lptr;		/* printing processing pointer */
+	int loopcntl = 1;	/* main loop control flag */
+	struct offset_t *offsets;	/* pointer to offset space */
+	int memsize;		/* amount of offset space to malloc */
+	int newbuffer = 1;	/* need new buffer */
 
-    if (numlines <= 0) {		/*use default */
-	numlines = DEF_SIZE;
-    }
+	if (numlines <= 0) {	/*use default */
+		numlines = DEF_SIZE;
+	}
 
-    /*
-     * Malloc space for file contents
-     */
-    if ((buffer=(char *)malloc(space)) == NULL) {
-	fprintf(stderr, "Unable to malloc(%d): errno:%d\n", space, errno);
-	return -1;
-    }
+	/*
+	 * Malloc space for file contents
+	 */
+	if ((buffer = (char *)malloc(space)) == NULL) {
+		fprintf(stderr, "Unable to malloc(%d): errno:%d\n", space,
+			errno);
+		return -1;
+	}
 
-    /*
-     * Malloc space for numlines copies the offset_t structure.
-     * This is where the randomization takes place.
-     */
-    memsize = sizeof(struct offset_t)*numlines;
+	/*
+	 * Malloc space for numlines copies the offset_t structure.
+	 * This is where the randomization takes place.
+	 */
+	memsize = sizeof(struct offset_t) * numlines;
 
-    if ((offsets=(struct offset_t *)malloc(memsize)) == NULL) {
-	fprintf(stderr, "Unable to malloc(%d): errno:%d\n", memsize, errno);
-	return -1;
-    }
+	if ((offsets = (struct offset_t *)malloc(memsize)) == NULL) {
+		fprintf(stderr, "Unable to malloc(%d): errno:%d\n", memsize,
+			errno);
+		return -1;
+	}
 
-    random_range_seed(seed);
-    rdbuff = buffer;		/* read into start of buffer */
-    sztord = space;		/* amount of space left in buffer */
+	random_range_seed(seed);
+	rdbuff = buffer;	/* read into start of buffer */
+	sztord = space;		/* amount of space left in buffer */
 
-    /*
-     *  Loop until read doesn't read anything
-     *  If last line does not end in newline, it is not printed
-     */
-    while (loopcntl) {
-        /*
-         *  read in file up to space size
-	 *  only works if used as filter.
-	 *  The code will randomize one reads worth at a time.
-	 *  If typing in lines, read will read only one line - no randomizing.
-         */
-
-        chr = buffer;
-        if ((rdsz=fread((void *)rdbuff, sztord, 1, infile)) == 0) {
-	    fprintf(stderr, "input file is empty, done randomizing\n");
-	    loopcntl=0;
-	    return 0;
-        }
-
-	stopaddr = ((long)buffer + rdsz);
-
-        loffset= (long)buffer;
-
-	while (! newbuffer) {
-
-            while ((long)chr < stopaddr && *chr != '\n')
-	        chr++;
-
-	    chr++;
-
-	    if ((long)chr >= stopaddr) {
-
-	        fprintf(stderr, "end of read in buffer\n");
-
+	/*
+	 *  Loop until read doesn't read anything
+	 *  If last line does not end in newline, it is not printed
+	 */
+	while (loopcntl) {
 		/*
-		 * print out lines based on offset.
+		 *  read in file up to space size
+		 *  only works if used as filter.
+		 *  The code will randomize one reads worth at a time.
+		 *  If typing in lines, read will read only one line - no randomizing.
 		 */
-		for (cnt=0; cnt<numlines; cnt++) {
 
-		    if (offsets[cnt].used) {
-			ptr = (char *)offsets[cnt].offset;
-			/*
-			 * copy buffer characters into line for printing
-			 */
-			lptr = line;
-			while (*ptr != '\n')
-			    *lptr++ = *ptr++;
-
-			printf("%s\n", line);
-		    }
+		chr = buffer;
+		if ((rdsz = fread((void *)rdbuff, sztord, 1, infile)) == 0) {
+			fprintf(stderr,
+				"input file is empty, done randomizing\n");
+			loopcntl = 0;
+			return 0;
 		}
 
-		/*
-	         * move start of partically read line to beginning of buffer
-		 * and adjust rdbuff to end of partically read line
-		 */
-		memcpy((void *)loffset, buffer, (stopaddr - loffset));
-		rdbuff = buffer + (stopaddr - loffset);
-		sztord = space - (stopaddr - loffset);
+		stopaddr = ((long)buffer + rdsz);
 
-	        newbuffer++;
-	    }
+		loffset = (long)buffer;
 
-	    if (rnd_insert(offsets, loffset, numlines) < 0) {
-	      fprintf(stderr, "%s:%d rnd_insert() returned -1 (fatal error)!\n",
-		  __FILE__, __LINE__);
-	      abort();
-	    }
+		while (!newbuffer) {
 
-            loffset = (long)chr;
+			while ((long)chr < stopaddr && *chr != '\n')
+				chr++;
+
+			chr++;
+
+			if ((long)chr >= stopaddr) {
+
+				fprintf(stderr, "end of read in buffer\n");
+
+				/*
+				 * print out lines based on offset.
+				 */
+				for (cnt = 0; cnt < numlines; cnt++) {
+
+					if (offsets[cnt].used) {
+						ptr =
+						    (char *)offsets[cnt].offset;
+						/*
+						 * copy buffer characters into line for printing
+						 */
+						lptr = line;
+						while (*ptr != '\n')
+							*lptr++ = *ptr++;
+
+						printf("%s\n", line);
+					}
+				}
+
+				/*
+				 * move start of partically read line to beginning of buffer
+				 * and adjust rdbuff to end of partically read line
+				 */
+				memcpy((void *)loffset, buffer,
+				       (stopaddr - loffset));
+				rdbuff = buffer + (stopaddr - loffset);
+				sztord = space - (stopaddr - loffset);
+
+				newbuffer++;
+			}
+
+			if (rnd_insert(offsets, loffset, numlines) < 0) {
+				fprintf(stderr,
+					"%s:%d rnd_insert() returned -1 (fatal error)!\n",
+					__FILE__, __LINE__);
+				abort();
+			}
+
+			loffset = (long)chr;
+		}
 	}
-    }
 
-    return 0;
+	return 0;
 
 }
diff --git a/tools/top-LTP/proc/alloc.c b/tools/top-LTP/proc/alloc.c
index 4a0aca7..c8cad61 100644
--- a/tools/top-LTP/proc/alloc.c
+++ b/tools/top-LTP/proc/alloc.c
@@ -9,41 +9,44 @@
 #include <stdio.h>
 #include "alloc.h"
 
-void *xcalloc(void *pointer, int size) {
-    void * ret;
-    if (pointer)
-        free(pointer);
-    if (!(ret = calloc(1, size))) {
-        fprintf(stderr, "xcalloc: allocation error, size = %d\n", size);
-        exit(1);
-    }
-    return ret;
+void *xcalloc(void *pointer, int size)
+{
+	void *ret;
+	if (pointer)
+		free(pointer);
+	if (!(ret = calloc(1, size))) {
+		fprintf(stderr, "xcalloc: allocation error, size = %d\n", size);
+		exit(1);
+	}
+	return ret;
 }
 
-void *xmalloc(unsigned int size) {
-    void *p;
+void *xmalloc(unsigned int size)
+{
+	void *p;
 
-    if (size == 0)
-        ++size;
-    p = malloc(size);
-    if (!p) {
-	fprintf(stderr, "xmalloc: malloc(%d) failed", size);
-	perror(NULL);
-	exit(1);
-    }
-    return(p);
+	if (size == 0)
+		++size;
+	p = malloc(size);
+	if (!p) {
+		fprintf(stderr, "xmalloc: malloc(%d) failed", size);
+		perror(NULL);
+		exit(1);
+	}
+	return (p);
 }
 
-void *xrealloc(void *oldp, unsigned int size) {
-    void *p;
+void *xrealloc(void *oldp, unsigned int size)
+{
+	void *p;
 
-    if (size == 0)
-        ++size;
-    p = realloc(oldp, size);
-    if (!p) {
-	fprintf(stderr, "xrealloc: realloc(%d) failed", size);
-	perror(NULL);
-	exit(1);
-    }
-    return(p);
+	if (size == 0)
+		++size;
+	p = realloc(oldp, size);
+	if (!p) {
+		fprintf(stderr, "xrealloc: realloc(%d) failed", size);
+		perror(NULL);
+		exit(1);
+	}
+	return (p);
 }
diff --git a/tools/top-LTP/proc/compare.c b/tools/top-LTP/proc/compare.c
index 53338ee..b2a01d1 100644
--- a/tools/top-LTP/proc/compare.c
+++ b/tools/top-LTP/proc/compare.c
@@ -11,10 +11,9 @@
 #include <string.h>		/* for strcmp */
 #include <stdio.h>		/* for parse error output */
 
-#include "readproc.h"	/* for proc_t */
+#include "readproc.h"		/* for proc_t */
 
-#include "compare.h"	/* for this code */
-
+#include "compare.h"		/* for this code */
 
 /*
   This module was written by Charles Blake for procps.
@@ -54,17 +53,18 @@
 */
 
 static int sort_depth = 0;
-static int sort_direction[10];     /* storage for 10 levels, but 4 would be plenty!*/
-static int (*sort_function[10])(void* a, void* b);
+static int sort_direction[10];	/* storage for 10 levels, but 4 would be plenty! */
+static int (*sort_function[10]) (void *a, void *b);
 
-int mult_lvl_cmp(void* a, void* b) {
-    int i, cmp_val;
-    for (i = 0; i < sort_depth; i++) {
-        cmp_val = sort_direction[i] * (*sort_function[i])(a,b);
-        if (cmp_val != 0)
-            return cmp_val;
-    }
-    return 0;
+int mult_lvl_cmp(void *a, void *b)
+{
+	int i, cmp_val;
+	for (i = 0; i < sort_depth; i++) {
+		cmp_val = sort_direction[i] * (*sort_function[i]) (a, b);
+		if (cmp_val != 0)
+			return cmp_val;
+	}
+	return 0;
 }
 
 /* qsort(3) compliant comparison functions for all members of the ps_proc
@@ -94,35 +94,35 @@
 /* CMP_STR(cmdline) */
 /* CMP_STR(ruser) */
 CMP_STR(euser)
-CMP_STR(cmd)
+    CMP_STR(cmd)
 /* CMP_INT(state) */
 /* CMP_STR(ttyc) */
-CMP_INT(euid)
-CMP_INT(pid)
-CMP_INT(ppid)
-CMP_INT(pgrp)
-CMP_INT(session)
-CMP_INT(tty)
-CMP_INT(tpgid)
-CMP_INT(utime)
-CMP_INT(stime)
-CMP_INT(cutime)
-CMP_INT(cstime)
+    CMP_INT(euid)
+    CMP_INT(pid)
+    CMP_INT(ppid)
+    CMP_INT(pgrp)
+    CMP_INT(session)
+    CMP_INT(tty)
+    CMP_INT(tpgid)
+    CMP_INT(utime)
+    CMP_INT(stime)
+    CMP_INT(cutime)
+    CMP_INT(cstime)
 /* CMP_INT(priority) */
-CMP_INT(nice)
-CMP_INT(start_time)
+    CMP_INT(nice)
+    CMP_INT(start_time)
 /* CMP_INT(signal) */
 /* CMP_INT(blocked) */
 /* CMP_INT(sigignore) */
 /* CMP_INT(sigcatch) */
-CMP_INT(flags)
-CMP_INT(min_flt)
-CMP_INT(cmin_flt)
-CMP_INT(maj_flt)
-CMP_INT(cmaj_flt)
+    CMP_INT(flags)
+    CMP_INT(min_flt)
+    CMP_INT(cmin_flt)
+    CMP_INT(maj_flt)
+    CMP_INT(cmaj_flt)
 /* CMP_INT(timeout) */
-CMP_INT(vsize)
-CMP_INT(rss)
+    CMP_INT(vsize)
+    CMP_INT(rss)
 /* CMP_INT(rss_rlim) */
 /* CMP_INT(start_code) */
 /* CMP_INT(end_code) */
@@ -130,54 +130,59 @@
 /* CMP_INT(kstk_esp) */
 /* CMP_INT(kstk_eip) */
 /* CMP_INT(wchan) */
-CMP_INT(pcpu)
-CMP_INT(size)
-CMP_INT(resident)
-CMP_INT(share)
+    CMP_INT(pcpu)
+    CMP_INT(size)
+    CMP_INT(resident)
+    CMP_INT(share)
 /* CMP_INT(trs) */
 /* CMP_INT(lrs) */
 /* CMP_INT(drs) */
 /* CMP_INT(dt) */
-
 /* define user interface to sort keys.  Fairly self-explanatory. */
-
 static struct cmp_fun_struct {
-    char letter;                           /* single option-letter for key */
-    char name[15];                             /* long option name for key */
-    int (*fun)(proc_t**, proc_t**);  /* pointer to cmp_key */
-} cmp[] = {
+	char letter;		/* single option-letter for key */
+	char name[15];		/* long option name for key */
+	int (*fun) (proc_t **, proc_t **);	/* pointer to cmp_key */
+} cmp[] =
+{
 /*  { '?', "cmdline",       &cmp_cmdline       }, */
-    { 'u', "user",          &cmp_euser         },
+	{
+	'u', "user", &cmp_euser},
 /*  { '?', "ruser",         &cmp_ruser         }, */
-    { 'c', "cmd",           &cmp_cmd           },
+	{
+	'c', "cmd", &cmp_cmd},
 /*  { '?', "state",         &cmp_state         }, */
 /*  { '?', "ttyc",          &cmp_ttyc          }, */
-    { 'U', "uid",           &cmp_euid          },
-    { 'p', "pid",           &cmp_pid           },
-    { 'P', "ppid",          &cmp_ppid          },
-    { 'g', "pgrp",          &cmp_pgrp          },
-    { 'o', "session",       &cmp_session       },
-    { 't', "tty",           &cmp_tty           },
-    { 'G', "tpgid",         &cmp_tpgid         },
-    { 'k', "utime",         &cmp_utime         },
-    { 'K', "stime",         &cmp_stime         },
-    { 'j', "cutime",        &cmp_cutime        },
-    { 'J', "cstime",        &cmp_cstime        },
+	{
+	'U', "uid", &cmp_euid}, {
+	'p', "pid", &cmp_pid}, {
+	'P', "ppid", &cmp_ppid}, {
+	'g', "pgrp", &cmp_pgrp}, {
+	'o', "session", &cmp_session}, {
+	't', "tty", &cmp_tty}, {
+	'G', "tpgid", &cmp_tpgid}, {
+	'k', "utime", &cmp_utime}, {
+	'K', "stime", &cmp_stime}, {
+	'j', "cutime", &cmp_cutime}, {
+	'J', "cstime", &cmp_cstime},
 /*  { '?', "counter",       &cmp_counter       }, */
-    { 'y', "priority",      &cmp_nice          },
-    { 'T', "start_time",    &cmp_start_time    },
+	{
+	'y', "priority", &cmp_nice}, {
+	'T', "start_time", &cmp_start_time},
 /*  { '?', "signal",        &cmp_signal        }, */
 /*  { '?', "blocked",       &cmp_blocked       }, */
 /*  { '?', "sigignore",     &cmp_sigignore     }, */
 /*  { '?', "sigcatch",      &cmp_sigcatch      }, */
-    { 'f', "flags",         &cmp_flags         },
-    { 'm', "min_flt",       &cmp_min_flt       },
-    { 'n', "cmin_flt",      &cmp_cmin_flt      },
-    { 'M', "maj_flt",       &cmp_maj_flt       },
-    { 'N', "cmaj_flt",      &cmp_cmaj_flt      },
+	{
+	'f', "flags", &cmp_flags}, {
+	'm', "min_flt", &cmp_min_flt}, {
+	'n', "cmin_flt", &cmp_cmin_flt}, {
+	'M', "maj_flt", &cmp_maj_flt}, {
+	'N', "cmaj_flt", &cmp_cmaj_flt},
 /*  { 'C', "timeout",       &cmp_timeout       }, */
-    { 'v', "vsize",         &cmp_vsize         },
-    { 'r', "rss",           &cmp_rss           },
+	{
+	'v', "vsize", &cmp_vsize}, {
+	'r', "rss", &cmp_rss},
 /*  { '?', "rss_rlim",      &cmp_rss_rlim      }, */
 /*  { '?', "start_code",    &cmp_start_code    }, */
 /*  { '?', "end_code",      &cmp_end_code      }, */
@@ -185,15 +190,17 @@
 /*  { '?', "kstk_esp",      &cmp_kstk_esp      }, */
 /*  { '?', "kstk_eip",      &cmp_kstk_eip      }, */
 /*  { '?', "wchan",         &cmp_wchan         }, */
-    { 'C', "pcpu",          &cmp_pcpu          },
-    { 's', "size",          &cmp_size          },
-    { 'R', "resident",      &cmp_resident      },
-    { 'S', "share",         &cmp_share         },
+	{
+	'C', "pcpu", &cmp_pcpu}, {
+	's', "size", &cmp_size}, {
+	'R', "resident", &cmp_resident}, {
+	'S', "share", &cmp_share},
 /*  { '?', "trs",           &cmp_trs           }, */
 /*  { '?', "lrs",           &cmp_lrs           }, */
 /*  { '?', "drs",           &cmp_drs           }, */
 /*  { '?', "dt",            &cmp_dt            }, */
-    { '\0',"terminator",    NULL               }
+	{
+	'\0', "terminator", NULL}
 };
 
 /* command line option parsing.  Assign sort_{depth,direction[],function[]}
@@ -203,92 +210,94 @@
    key and the optional '-' specifying a reverse sort on that key.  + doesn't
    mean anything, but it keeps things looking balanced...
 */
-const char *parse_sort_opt(const char* opt) {
-    int i, next_dir=1;
-    for (; *opt ; ++opt) {
-        if (*opt == '-' || *opt == '+') {
-            if (*opt == '-')
-                next_dir = -1;
-	    opt++;
-            continue;
-        }
-        for (i = 0; cmp[i].letter; i++)
-            if (*opt == cmp[i].letter)
-                break;
-        if (!cmp[i].letter) { /* failed, clear and return */
-            sort_depth=0;
-            for (i=0;i<10;i++) {
-              sort_direction[i]=0;
-              sort_function[i]=(cmp_t)NULL;
-            }
-            return "Unknown sort key.";
-        } else {
-#ifdef DEBUG
-	    fprintf(stderr,
-		    "sort level %d: key %s, direction % d\n",
-		    sort_depth, cmp[i].name, next_dir);
-#endif
-            sort_function[sort_depth] = (cmp_t)cmp[i].fun;
-            sort_direction[sort_depth++] = next_dir;
-            next_dir = 1;
-        }
-    }
-    return NULL;
-}
-
-const char *parse_long_sort(const char* opt) {
-    char* comma;
-    int i, more_keys, next_dir=1;
-    do {
-        if (*opt == '-' || *opt == '+') {
-            if (*opt == '-')
-                next_dir = -1;
-            more_keys = 1;
-            opt++;
-            continue;
-        }
-        more_keys = ((comma=index(opt,',')) != NULL);
-	                      /* keys are ',' delimited */
-        if (more_keys)
-            *comma='\0';      /* terminate for strcmp() */
-        for (i = 0; cmp[i].letter; ++i)
-            if (strcmp(opt, cmp[i].name) == 0)
-                break;
-        if (!cmp[i].letter) { /* failed, clear and return */
-            sort_depth=0;
-            for (i=0;i<10;i++) {
-              sort_direction[i]=0;
-              sort_function[i]=(cmp_t)NULL;
-            }
-            return "Unknown sort key.";
-        } else {
-#ifdef DEBUG
-	    fprintf(stderr,
-		    "sort level %d: key %s, direction % d\n",
-		    sort_depth, cmp[i].name, next_dir);
-#endif
-            sort_function[sort_depth] = (cmp_t)cmp[i].fun;
-            sort_direction[sort_depth++] = next_dir;
-            next_dir = 1;
-        }
-        opt = comma + 1; /* do next loop on next key, if more keys, else done*/
-    } while (more_keys);
-    return NULL;
-}
-
-void reset_sort_options (void)
+const char *parse_sort_opt(const char *opt)
 {
-  int i;
-
-  sort_depth=0;
-  for (i=0;i<10;i++) {
-    sort_direction[i]=0;
-    sort_function[i]=(cmp_t)NULL;
-  }
+	int i, next_dir = 1;
+	for (; *opt; ++opt) {
+		if (*opt == '-' || *opt == '+') {
+			if (*opt == '-')
+				next_dir = -1;
+			opt++;
+			continue;
+		}
+		for (i = 0; cmp[i].letter; i++)
+			if (*opt == cmp[i].letter)
+				break;
+		if (!cmp[i].letter) {	/* failed, clear and return */
+			sort_depth = 0;
+			for (i = 0; i < 10; i++) {
+				sort_direction[i] = 0;
+				sort_function[i] = (cmp_t) NULL;
+			}
+			return "Unknown sort key.";
+		} else {
+#ifdef DEBUG
+			fprintf(stderr,
+				"sort level %d: key %s, direction % d\n",
+				sort_depth, cmp[i].name, next_dir);
+#endif
+			sort_function[sort_depth] = (cmp_t) cmp[i].fun;
+			sort_direction[sort_depth++] = next_dir;
+			next_dir = 1;
+		}
+	}
+	return NULL;
 }
 
-void register_sort_function (int dir, cmp_t func)
+const char *parse_long_sort(const char *opt)
 {
-    sort_function[sort_depth] = func;
-    sort_direction[sort_depth++] = dir;
+	char *comma;
+	int i, more_keys, next_dir = 1;
+	do {
+		if (*opt == '-' || *opt == '+') {
+			if (*opt == '-')
+				next_dir = -1;
+			more_keys = 1;
+			opt++;
+			continue;
+		}
+		more_keys = ((comma = index(opt, ',')) != NULL);
+		/* keys are ',' delimited */
+		if (more_keys)
+			*comma = '\0';	/* terminate for strcmp() */
+		for (i = 0; cmp[i].letter; ++i)
+			if (strcmp(opt, cmp[i].name) == 0)
+				break;
+		if (!cmp[i].letter) {	/* failed, clear and return */
+			sort_depth = 0;
+			for (i = 0; i < 10; i++) {
+				sort_direction[i] = 0;
+				sort_function[i] = (cmp_t) NULL;
+			}
+			return "Unknown sort key.";
+		} else {
+#ifdef DEBUG
+			fprintf(stderr,
+				"sort level %d: key %s, direction % d\n",
+				sort_depth, cmp[i].name, next_dir);
+#endif
+			sort_function[sort_depth] = (cmp_t) cmp[i].fun;
+			sort_direction[sort_depth++] = next_dir;
+			next_dir = 1;
+		}
+		opt = comma + 1;	/* do next loop on next key, if more keys, else done */
+	} while (more_keys);
+	return NULL;
+}
+
+void reset_sort_options(void)
+{
+	int i;
+
+	sort_depth = 0;
+	for (i = 0; i < 10; i++) {
+		sort_direction[i] = 0;
+		sort_function[i] = (cmp_t) NULL;
+	}
+}
+
+void register_sort_function(int dir, cmp_t func)
+{
+	sort_function[sort_depth] = func;
+	sort_direction[sort_depth++] = dir;
 }
diff --git a/tools/top-LTP/proc/devname.c b/tools/top-LTP/proc/devname.c
index e07068b..f6717de 100644
--- a/tools/top-LTP/proc/devname.c
+++ b/tools/top-LTP/proc/devname.c
@@ -32,213 +32,309 @@
  */
 
 typedef struct tty_map_node {
-  struct tty_map_node *next;
-  int major_number; /* not unsigned! Ugh... */
-  int minor_first, minor_last;
-  char name[16];
-  char devfs_type;
+	struct tty_map_node *next;
+	int major_number;	/* not unsigned! Ugh... */
+	int minor_first, minor_last;
+	char name[16];
+	char devfs_type;
 } tty_map_node;
 
 static tty_map_node *tty_map = NULL;
 
 /* Load /proc/tty/drivers for device name mapping use. */
-static void load_drivers(void) {
-  char buf[10000];
-  char *p;
-  int fd;
-  int bytes;
-  fd = open("/proc/tty/drivers",O_RDONLY);
-  if (fd == -1) goto fail;
-  bytes = read(fd, buf, sizeof(buf) - 1);
-  if (bytes == -1) goto fail;
-  buf[bytes] = '\0';
-  p = buf;
-  while (( p = strstr(p, " /dev/") )) {
-    tty_map_node *tmn;
-    int len;
-    char *end;
-    p += 6;
-    end = strchr(p, ' ');
-    if (!end) continue;
-    len = end - p;
-    tmn = calloc(1, sizeof(tty_map_node));
-    tmn->next = tty_map;
-    tty_map = tmn;
-    /* if we have a devfs type name such as /dev/tts/%d then strip the %d but
-       keep a flag. */
-    if (len >= 3 && !strncmp(end - 2, "%d", 2)) {
-      len -= 2;
-      tmn->devfs_type = 1;
-    }
-    strncpy(tmn->name, p, len);
-    p = end; /* set p to point past the %d as well if there is one */
-    while (*p == ' ') p++;
-    tmn->major_number = atoi(p);
-    p += strspn(p, "0123456789");
-    while (*p == ' ') p++;
-    switch(sscanf(p, "%d-%d", &tmn->minor_first, &tmn->minor_last)) {
-    default:
-      /* Can't finish parsing this line so we remove it from the list */
-      tty_map = tty_map->next;
-      free(tmn);
-      break;
-    case 1:
-      tmn->minor_last = tmn->minor_first;
-      break;
-    case 2:
-      break;
-    }
-  }
+static void load_drivers(void)
+{
+	char buf[10000];
+	char *p;
+	int fd;
+	int bytes;
+	fd = open("/proc/tty/drivers", O_RDONLY);
+	if (fd == -1)
+		goto fail;
+	bytes = read(fd, buf, sizeof(buf) - 1);
+	if (bytes == -1)
+		goto fail;
+	buf[bytes] = '\0';
+	p = buf;
+	while ((p = strstr(p, " /dev/"))) {
+		tty_map_node *tmn;
+		int len;
+		char *end;
+		p += 6;
+		end = strchr(p, ' ');
+		if (!end)
+			continue;
+		len = end - p;
+		tmn = calloc(1, sizeof(tty_map_node));
+		tmn->next = tty_map;
+		tty_map = tmn;
+		/* if we have a devfs type name such as /dev/tts/%d then strip the %d but
+		   keep a flag. */
+		if (len >= 3 && !strncmp(end - 2, "%d", 2)) {
+			len -= 2;
+			tmn->devfs_type = 1;
+		}
+		strncpy(tmn->name, p, len);
+		p = end;	/* set p to point past the %d as well if there is one */
+		while (*p == ' ')
+			p++;
+		tmn->major_number = atoi(p);
+		p += strspn(p, "0123456789");
+		while (*p == ' ')
+			p++;
+		switch (sscanf(p, "%d-%d", &tmn->minor_first, &tmn->minor_last)) {
+		default:
+			/* Can't finish parsing this line so we remove it from the list */
+			tty_map = tty_map->next;
+			free(tmn);
+			break;
+		case 1:
+			tmn->minor_last = tmn->minor_first;
+			break;
+		case 2:
+			break;
+		}
+	}
 fail:
-  if (fd != -1) close(fd);
-  if (!tty_map) tty_map = (tty_map_node *)-1;
+	if (fd != -1)
+		close(fd);
+	if (!tty_map)
+		tty_map = (tty_map_node *) - 1;
 }
 
 /* Try to guess the device name from /proc/tty/drivers info. */
-static int driver_name(char *restrict const buf, int maj, int min) {
-  struct stat sbuf;
-  tty_map_node *tmn;
-  if (!tty_map) load_drivers();
-  if (tty_map == (tty_map_node *)-1) return 0;
-  tmn = tty_map;
-  for (;;) {
-    if (!tmn) return 0;
-    if (tmn->major_number == maj && tmn->minor_first <= min && tmn->minor_last >= min) break;
-    tmn = tmn->next;
-  }
-  sprintf(buf, "/dev/%s%d", tmn->name, min);  /* like "/dev/ttyZZ255" */
-  if (stat(buf, &sbuf) < 0) {
-    if (tmn->devfs_type) return 0;
-    sprintf(buf, "/dev/%s", tmn->name);  /* like "/dev/ttyZZ255" */
-    if (stat(buf, &sbuf) < 0) return 0;
-  }
-  if (min != minor(sbuf.st_rdev)) return 0;
-  if (maj != major(sbuf.st_rdev)) return 0;
-  return 1;
+static int driver_name(char *restrict const buf, int maj, int min)
+{
+	struct stat sbuf;
+	tty_map_node *tmn;
+	if (!tty_map)
+		load_drivers();
+	if (tty_map == (tty_map_node *) - 1)
+		return 0;
+	tmn = tty_map;
+	for (;;) {
+		if (!tmn)
+			return 0;
+		if (tmn->major_number == maj && tmn->minor_first <= min
+		    && tmn->minor_last >= min)
+			break;
+		tmn = tmn->next;
+	}
+	sprintf(buf, "/dev/%s%d", tmn->name, min);	/* like "/dev/ttyZZ255" */
+	if (stat(buf, &sbuf) < 0) {
+		if (tmn->devfs_type)
+			return 0;
+		sprintf(buf, "/dev/%s", tmn->name);	/* like "/dev/ttyZZ255" */
+		if (stat(buf, &sbuf) < 0)
+			return 0;
+	}
+	if (min != minor(sbuf.st_rdev))
+		return 0;
+	if (maj != major(sbuf.st_rdev))
+		return 0;
+	return 1;
 }
 
 /* Try to guess the device name (useful until /proc/PID/tty is added) */
-static int guess_name(char *restrict const buf, int maj, int min) {
-  struct stat sbuf;
-  int t0, t1;
-  int tmpmin = min;
-  switch(maj) {
-  case   4:
-    if (min<64) {
-      sprintf(buf, "/dev/tty%d", min);
-      break;
-    }
-    if (min<128) {  /* to 255 on newer systems */
-      sprintf(buf, "/dev/ttyS%d", min-64);
-      break;
-    }
-    tmpmin = min & 0x3f;  /* FALL THROUGH */
-  case   3:      /* /dev/[pt]ty[p-za-o][0-9a-z] is 936 */
-    t0 = "pqrstuvwxyzabcde"[tmpmin>>4];
-    t1 = "0123456789abcdef"[tmpmin&0x0f];
-    sprintf(buf, "/dev/tty%c%c", t0, t1);
-    break;
-  case  17:  sprintf(buf, "/dev/ttyH%d",  min); break;
-  case  19:  sprintf(buf, "/dev/ttyC%d",  min); break;
-  case  22:  sprintf(buf, "/dev/ttyD%d",  min); break; /* devices.txt */
-  case  23:  sprintf(buf, "/dev/ttyD%d",  min); break; /* driver code */
-  case  24:  sprintf(buf, "/dev/ttyE%d",  min); break;
-  case  32:  sprintf(buf, "/dev/ttyX%d",  min); break;
-  case  43:  sprintf(buf, "/dev/ttyI%d",  min); break;
-  case  46:  sprintf(buf, "/dev/ttyR%d",  min); break;
-  case  48:  sprintf(buf, "/dev/ttyL%d",  min); break;
-  case  57:  sprintf(buf, "/dev/ttyP%d",  min); break;
-  case  71:  sprintf(buf, "/dev/ttyF%d",  min); break;
-  case  75:  sprintf(buf, "/dev/ttyW%d",  min); break;
-  case  78:  sprintf(buf, "/dev/ttyM%d",  min); break; /* conflict */
-  case 105:  sprintf(buf, "/dev/ttyV%d",  min); break;
-  case 112:  sprintf(buf, "/dev/ttyM%d",  min); break; /* conflict */
-  /* 136 ... 143 are /dev/pts/0, /dev/pts/1, /dev/pts/2 ... */
-  case 136 ... 143:  sprintf(buf, "/dev/pts/%d",  min+(maj-136)*256); break;
-  case 148:  sprintf(buf, "/dev/ttyT%d",  min); break;
-  case 154:  sprintf(buf, "/dev/ttySR%d", min); break;
-  case 156:  sprintf(buf, "/dev/ttySR%d", min+256); break;
-  case 164:  sprintf(buf, "/dev/ttyCH%d",  min); break;
-  case 166:  sprintf(buf, "/dev/ttyACM%d", min); break; /* bummer, 9-char */
-  case 172:  sprintf(buf, "/dev/ttyMX%d",  min); break;
-  case 174:  sprintf(buf, "/dev/ttySI%d",  min); break;
-  case 188:  sprintf(buf, "/dev/ttyUSB%d", min); break; /* bummer, 9-char */
-  default: return 0;
-  }
-  if (stat(buf, &sbuf) < 0) return 0;
-  if (min != minor(sbuf.st_rdev)) return 0;
-  if (maj != major(sbuf.st_rdev)) return 0;
-  return 1;
+static int guess_name(char *restrict const buf, int maj, int min)
+{
+	struct stat sbuf;
+	int t0, t1;
+	int tmpmin = min;
+	switch (maj) {
+	case 4:
+		if (min < 64) {
+			sprintf(buf, "/dev/tty%d", min);
+			break;
+		}
+		if (min < 128) {	/* to 255 on newer systems */
+			sprintf(buf, "/dev/ttyS%d", min - 64);
+			break;
+		}
+		tmpmin = min & 0x3f;	/* FALL THROUGH */
+	case 3:		/* /dev/[pt]ty[p-za-o][0-9a-z] is 936 */
+		t0 = "pqrstuvwxyzabcde"[tmpmin >> 4];
+		t1 = "0123456789abcdef"[tmpmin & 0x0f];
+		sprintf(buf, "/dev/tty%c%c", t0, t1);
+		break;
+	case 17:
+		sprintf(buf, "/dev/ttyH%d", min);
+		break;
+	case 19:
+		sprintf(buf, "/dev/ttyC%d", min);
+		break;
+	case 22:
+		sprintf(buf, "/dev/ttyD%d", min);
+		break;		/* devices.txt */
+	case 23:
+		sprintf(buf, "/dev/ttyD%d", min);
+		break;		/* driver code */
+	case 24:
+		sprintf(buf, "/dev/ttyE%d", min);
+		break;
+	case 32:
+		sprintf(buf, "/dev/ttyX%d", min);
+		break;
+	case 43:
+		sprintf(buf, "/dev/ttyI%d", min);
+		break;
+	case 46:
+		sprintf(buf, "/dev/ttyR%d", min);
+		break;
+	case 48:
+		sprintf(buf, "/dev/ttyL%d", min);
+		break;
+	case 57:
+		sprintf(buf, "/dev/ttyP%d", min);
+		break;
+	case 71:
+		sprintf(buf, "/dev/ttyF%d", min);
+		break;
+	case 75:
+		sprintf(buf, "/dev/ttyW%d", min);
+		break;
+	case 78:
+		sprintf(buf, "/dev/ttyM%d", min);
+		break;		/* conflict */
+	case 105:
+		sprintf(buf, "/dev/ttyV%d", min);
+		break;
+	case 112:
+		sprintf(buf, "/dev/ttyM%d", min);
+		break;		/* conflict */
+		/* 136 ... 143 are /dev/pts/0, /dev/pts/1, /dev/pts/2 ... */
+	case 136 ... 143:
+		sprintf(buf, "/dev/pts/%d", min + (maj - 136) * 256);
+		break;
+	case 148:
+		sprintf(buf, "/dev/ttyT%d", min);
+		break;
+	case 154:
+		sprintf(buf, "/dev/ttySR%d", min);
+		break;
+	case 156:
+		sprintf(buf, "/dev/ttySR%d", min + 256);
+		break;
+	case 164:
+		sprintf(buf, "/dev/ttyCH%d", min);
+		break;
+	case 166:
+		sprintf(buf, "/dev/ttyACM%d", min);
+		break;		/* bummer, 9-char */
+	case 172:
+		sprintf(buf, "/dev/ttyMX%d", min);
+		break;
+	case 174:
+		sprintf(buf, "/dev/ttySI%d", min);
+		break;
+	case 188:
+		sprintf(buf, "/dev/ttyUSB%d", min);
+		break;		/* bummer, 9-char */
+	default:
+		return 0;
+	}
+	if (stat(buf, &sbuf) < 0)
+		return 0;
+	if (min != minor(sbuf.st_rdev))
+		return 0;
+	if (maj != major(sbuf.st_rdev))
+		return 0;
+	return 1;
 }
 
 /* Linux 2.2 can give us filenames that might be correct.
  * Useful names could be in /proc/PID/fd/2 (stderr, seldom redirected)
  * and in /proc/PID/fd/255 (used by bash to remember the tty).
  */
-static int link_name(char *restrict const buf, int maj, int min, int pid, const char *restrict name) {
-  struct stat sbuf;
-  char path[32];
-  int count;
-  sprintf(path, "/proc/%d/%s", pid, name);  /* often permission denied */
-  count = readlink(path,buf,PAGE_SIZE-1);
-  if (count == -1) return 0;
-  buf[count] = '\0';
-  if (stat(buf, &sbuf) < 0) return 0;
-  if (min != minor(sbuf.st_rdev)) return 0;
-  if (maj != major(sbuf.st_rdev)) return 0;
-  return 1;
+static int link_name(char *restrict const buf, int maj, int min, int pid,
+		     const char *restrict name)
+{
+	struct stat sbuf;
+	char path[32];
+	int count;
+	sprintf(path, "/proc/%d/%s", pid, name);	/* often permission denied */
+	count = readlink(path, buf, PAGE_SIZE - 1);
+	if (count == -1)
+		return 0;
+	buf[count] = '\0';
+	if (stat(buf, &sbuf) < 0)
+		return 0;
+	if (min != minor(sbuf.st_rdev))
+		return 0;
+	if (maj != major(sbuf.st_rdev))
+		return 0;
+	return 1;
 }
 
 /* number --> name */
-unsigned dev_to_tty(char *restrict ret, unsigned chop, int dev, int pid, unsigned int flags) {
-  static char buf[PAGE_SIZE];
-  char *restrict tmp = buf;
-  unsigned i = 0;
-  int c;
-  if ((short)dev == (short)0) goto no_tty;
-  if (linux_version_code > LINUX_VERSION(2, 7, 0)) {  // not likely to make 2.6.xx
-    if (link_name(tmp, major(dev), minor(dev), pid, "tty"   )) goto abbrev;
-  }
-  if (driver_name(tmp, major(dev), minor(dev)               )) goto abbrev;
-  if (  link_name(tmp, major(dev), minor(dev), pid, "fd/2"  )) goto abbrev;
-  if ( guess_name(tmp, major(dev), minor(dev)               )) goto abbrev;
-  if (  link_name(tmp, major(dev), minor(dev), pid, "fd/255")) goto abbrev;
-  // fall through if unable to find a device file
+unsigned dev_to_tty(char *restrict ret, unsigned chop, int dev, int pid,
+		    unsigned int flags)
+{
+	static char buf[PAGE_SIZE];
+	char *restrict tmp = buf;
+	unsigned i = 0;
+	int c;
+	if ((short)dev == (short)0)
+		goto no_tty;
+	if (linux_version_code > LINUX_VERSION(2, 7, 0)) {	// not likely to make 2.6.xx
+		if (link_name(tmp, major(dev), minor(dev), pid, "tty"))
+			goto abbrev;
+	}
+	if (driver_name(tmp, major(dev), minor(dev)))
+		goto abbrev;
+	if (link_name(tmp, major(dev), minor(dev), pid, "fd/2"))
+		goto abbrev;
+	if (guess_name(tmp, major(dev), minor(dev)))
+		goto abbrev;
+	if (link_name(tmp, major(dev), minor(dev), pid, "fd/255"))
+		goto abbrev;
+	// fall through if unable to find a device file
 no_tty:
-  strcpy(ret, "?");
-  return 1;
+	strcpy(ret, "?");
+	return 1;
 abbrev:
-  if ((flags&ABBREV_DEV) && !strncmp(tmp,"/dev/",5) && tmp[5]) tmp += 5;
-  if ((flags&ABBREV_TTY) && !strncmp(tmp,"tty",  3) && tmp[3]) tmp += 3;
-  if ((flags&ABBREV_PTS) && !strncmp(tmp,"pts/", 4) && tmp[4]) tmp += 4;
-  /* gotta check before we chop or we may chop someone else's memory */
-  if (chop + (unsigned long)(tmp-buf) <= sizeof buf)
-    tmp[chop] = '\0';
-  /* replace non-ASCII characters with '?' and return the number of chars */
-  for (;;) {
-    c = *tmp;
-    tmp++;
-    if (!c) break;
-    i++;
-    if (c<=' ') c = '?';
-    if (c>126)  c = '?';
-    *ret = c;
-    ret++;
-  }
-  *ret = '\0';
-  return i;
+	if ((flags & ABBREV_DEV) && !strncmp(tmp, "/dev/", 5) && tmp[5])
+		tmp += 5;
+	if ((flags & ABBREV_TTY) && !strncmp(tmp, "tty", 3) && tmp[3])
+		tmp += 3;
+	if ((flags & ABBREV_PTS) && !strncmp(tmp, "pts/", 4) && tmp[4])
+		tmp += 4;
+	/* gotta check before we chop or we may chop someone else's memory */
+	if (chop + (unsigned long)(tmp - buf) <= sizeof buf)
+		tmp[chop] = '\0';
+	/* replace non-ASCII characters with '?' and return the number of chars */
+	for (;;) {
+		c = *tmp;
+		tmp++;
+		if (!c)
+			break;
+		i++;
+		if (c <= ' ')
+			c = '?';
+		if (c > 126)
+			c = '?';
+		*ret = c;
+		ret++;
+	}
+	*ret = '\0';
+	return i;
 }
 
 /* name --> number */
-int tty_to_dev(const char *restrict const name) {
-  struct stat sbuf;
-  static char buf[32];
-  if (name[0]=='/' && stat(name, &sbuf) >= 0) return sbuf.st_rdev;
-  snprintf(buf,32,"/dev/%s",name);
-  if (stat(buf, &sbuf) >= 0) return sbuf.st_rdev;
-  snprintf(buf,32,"/dev/tty%s",name);
-  if (stat(buf, &sbuf) >= 0) return sbuf.st_rdev;
-  snprintf(buf,32,"/dev/pts/%s",name);
-  if (stat(buf, &sbuf) >= 0) return sbuf.st_rdev;
-  return -1;
+int tty_to_dev(const char *restrict const name)
+{
+	struct stat sbuf;
+	static char buf[32];
+	if (name[0] == '/' && stat(name, &sbuf) >= 0)
+		return sbuf.st_rdev;
+	snprintf(buf, 32, "/dev/%s", name);
+	if (stat(buf, &sbuf) >= 0)
+		return sbuf.st_rdev;
+	snprintf(buf, 32, "/dev/tty%s", name);
+	if (stat(buf, &sbuf) >= 0)
+		return sbuf.st_rdev;
+	snprintf(buf, 32, "/dev/pts/%s", name);
+	if (stat(buf, &sbuf) >= 0)
+		return sbuf.st_rdev;
+	return -1;
 }
diff --git a/tools/top-LTP/proc/escape.c b/tools/top-LTP/proc/escape.c
index 75e4e85..7c6a66b 100644
--- a/tools/top-LTP/proc/escape.c
+++ b/tools/top-LTP/proc/escape.c
@@ -30,80 +30,88 @@
 #if 0
 /* sanitize a string, without the nice BSD library function:     */
 /* strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH)  */
-int octal_escape_str(char *restrict dst, const char *restrict src, size_t n) {
-  unsigned char c;
-  char d;
-  size_t i;
-  const char codes[] =
-  "Z------abtnvfr-------------e----"
-  " *******************************"  /* better: do not print any space */
-  "****************************\\***"
-  "*******************************-"
-  "--------------------------------"
-  "********************************"
-  "********************************"
-  "********************************";
-  for (i=0; i<n;) {
-    c = (unsigned char) *(src++);
-    d = codes[c];
-    switch(d) {
-    case 'Z':
-      goto leave;
-    case '*':
-      i++;
-      *(dst++) = c;
-      break;
-    case '-':
-      if (i+4 > n) goto leave;
-      i += 4;
-      *(dst++) = '\\';
-      *(dst++) = "01234567"[c>>6];
-      *(dst++) = "01234567"[(c>>3)&07];
-      *(dst++) = "01234567"[c&07];
-      break;
-    default:
-      if (i+2 > n) goto leave;
-      i += 2;
-      *(dst++) = '\\';
-      *(dst++) = d;
-      break;
-    }
-  }
+int octal_escape_str(char *restrict dst, const char *restrict src, size_t n)
+{
+	unsigned char c;
+	char d;
+	size_t i;
+	const char codes[] = "Z------abtnvfr-------------e----" " *******************************"	/* better: do not print any space */
+	    "****************************\\***"
+	    "*******************************-"
+	    "--------------------------------"
+	    "********************************"
+	    "********************************"
+	    "********************************";
+	for (i = 0; i < n;) {
+		c = (unsigned char)*(src++);
+		d = codes[c];
+		switch (d) {
+		case 'Z':
+			goto leave;
+		case '*':
+			i++;
+			*(dst++) = c;
+			break;
+		case '-':
+			if (i + 4 > n)
+				goto leave;
+			i += 4;
+			*(dst++) = '\\';
+			*(dst++) = "01234567"[c >> 6];
+			*(dst++) = "01234567"[(c >> 3) & 07];
+			*(dst++) = "01234567"[c & 07];
+			break;
+		default:
+			if (i + 2 > n)
+				goto leave;
+			i += 2;
+			*(dst++) = '\\';
+			*(dst++) = d;
+			break;
+		}
+	}
 leave:
-  *(dst++) = '\0';
-  return i;
+	*(dst++) = '\0';
+	return i;
 }
 #endif
 
 /* sanitize a string via one-way mangle */
-int escape_str(char *restrict dst, const char *restrict src, int bufsize, int maxglyphs) {
-  unsigned char c;
-  int my_glyphs = 0;
-  int my_bytes = 0;
-  const char codes[] =
-  "Z-------------------------------"
-  "********************************"
-  "********************************"
-  "*******************************-"
-  "--------------------------------"
-  "********************************"
-  "********************************"
-  "********************************";
+int escape_str(char *restrict dst, const char *restrict src, int bufsize,
+	       int maxglyphs)
+{
+	unsigned char c;
+	int my_glyphs = 0;
+	int my_bytes = 0;
+	const char codes[] =
+	    "Z-------------------------------"
+	    "********************************"
+	    "********************************"
+	    "*******************************-"
+	    "--------------------------------"
+	    "********************************"
+	    "********************************"
+	    "********************************";
 
-  if (bufsize > maxglyphs+1) bufsize=maxglyphs+1; // FIXME: assumes 8-bit locale
+	if (bufsize > maxglyphs + 1)
+		bufsize = maxglyphs + 1;	// FIXME: assumes 8-bit locale
 
-  for (;;) {
-    if (my_glyphs >= maxglyphs) break;
-    if (my_bytes+1 >= bufsize) break;
-    c = (unsigned char) *(src++);
-    if (!c) break;
-    if (codes[c]=='-') c='?';
-    my_glyphs++;
-    my_bytes++;
-    *(dst++) = c;
-  }
-  *(dst++) = '\0';
-  return my_bytes;        // bytes of text, excluding the NUL
+	for (;;) {
+		if (my_glyphs >= maxglyphs)
+			break;
+		if (my_bytes + 1 >= bufsize)
+			break;
+		c = (unsigned char)*(src++);
+		if (!c)
+			break;
+		if (codes[c] == '-')
+			c = '?';
+		my_glyphs++;
+		my_bytes++;
+		*(dst++) = c;
+	}
+	*(dst++) = '\0';
+	return my_bytes;	// bytes of text, excluding the NUL
 }
 
 /////////////////////////////////////////////////
@@ -111,62 +119,75 @@
 // escape an argv or environment string array
 //
 // bytes arg means sizeof(buf)
-int escape_strlist(char *restrict dst, const char *restrict const *restrict src, size_t bytes) {
-  size_t i = 0;
+int escape_strlist(char *restrict dst, const char *restrict const *restrict src,
+		   size_t bytes)
+{
+	size_t i = 0;
 
 //if (!*src) {        just never call this function without checking first
 //  do something nice
 //}
 
-  for (;;) {
-    i += escape_str(dst+i, *src, bytes-i, bytes-i);   // FIXME: byte/glyph
-    if (bytes-i < 3) break;  // need room for space, a character, and the NUL
-    src++;
-    if (!*src) break;  // need something to print
-    dst[i++] = ' ';
-  }
-  return i;    // bytes of text, excluding the NUL
+	for (;;) {
+		i += escape_str(dst + i, *src, bytes - i, bytes - i);	// FIXME: byte/glyph
+		if (bytes - i < 3)
+			break;	// need room for space, a character, and the NUL
+		src++;
+		if (!*src)
+			break;	// need something to print
+		dst[i++] = ' ';
+	}
+	return i;		// bytes of text, excluding the NUL
 }
 
 ///////////////////////////////////////////////////
 
-int escape_command(char *restrict const outbuf, const proc_t *restrict const pp, int bytes, int glyphs, unsigned flags) {
-  int overhead = 1;  // the trailing NUL
-  int end = 0;
+int escape_command(char *restrict const outbuf,
+		   const proc_t * restrict const pp, int bytes, int glyphs,
+		   unsigned flags)
+{
+	int overhead = 1;	// the trailing NUL
+	int end = 0;
 
-  if (bytes > glyphs+1) bytes=glyphs+1; // FIXME: assumes 8-bit locale
+	if (bytes > glyphs + 1)
+		bytes = glyphs + 1;	// FIXME: assumes 8-bit locale
 
-  if (flags & ESC_ARGS) {
-    const char **lc = (const char**)pp->cmdline;
-    if (lc && *lc) return escape_strlist(outbuf, lc, bytes);
-  }
-  if (flags & ESC_BRACKETS) {
-    overhead += 2;
-  }
-  if (flags & ESC_DEFUNCT) {
-    if (pp->state=='Z') overhead += 10;    // chars in " <defunct>"
-    else flags &= ~ESC_DEFUNCT;
-  }
-  if (overhead >= bytes) {  // if no room for even one byte of the command name
-    // you'd damn well better have _some_ space
-    outbuf[0] = '-';
-    outbuf[1] = '\0';
-    return 1;
-  }
-  if (flags & ESC_BRACKETS) {
-    outbuf[end++] = '[';
-  }
-  end += escape_str(outbuf+end, pp->cmd, bytes-overhead, glyphs-overhead+1);
+	if (flags & ESC_ARGS) {
+		const char **lc = (const char **)pp->cmdline;
+		if (lc && *lc)
+			return escape_strlist(outbuf, lc, bytes);
+	}
+	if (flags & ESC_BRACKETS) {
+		overhead += 2;
+	}
+	if (flags & ESC_DEFUNCT) {
+		if (pp->state == 'Z')
+			overhead += 10;	// chars in " <defunct>"
+		else
+			flags &= ~ESC_DEFUNCT;
+	}
+	if (overhead >= bytes) {	// if no room for even one byte of the command name
+		// you'd damn well better have _some_ space
+		outbuf[0] = '-';
+		outbuf[1] = '\0';
+		return 1;
+	}
+	if (flags & ESC_BRACKETS) {
+		outbuf[end++] = '[';
+	}
+	end +=
+	    escape_str(outbuf + end, pp->cmd, bytes - overhead,
+		       glyphs - overhead + 1);
 
-  // Hmmm, do we want "[foo] <defunct>" or "[foo <defunct>]"?
-  if (flags & ESC_BRACKETS) {
-    outbuf[end++] = ']';
-  }
-  if (flags & ESC_DEFUNCT) {
-    memcpy(outbuf+end, " <defunct>", 10);
-    end += 10;
-  }
+	// Hmmm, do we want "[foo] <defunct>" or "[foo <defunct>]"?
+	if (flags & ESC_BRACKETS) {
+		outbuf[end++] = ']';
+	}
+	if (flags & ESC_DEFUNCT) {
+		memcpy(outbuf + end, " <defunct>", 10);
+		end += 10;
+	}
 
-  outbuf[end] = '\0';
-  return end;  // bytes or glyphs, not including the NUL
+	outbuf[end] = '\0';
+	return end;		// bytes or glyphs, not including the NUL
 }
diff --git a/tools/top-LTP/proc/ksym.c b/tools/top-LTP/proc/ksym.c
index d4ec501..19c5f27 100644
--- a/tools/top-LTP/proc/ksym.c
+++ b/tools/top-LTP/proc/ksym.c
@@ -21,7 +21,7 @@
 #include <sys/utsname.h>
 #include "procps.h"
 #include "version.h"
-#include "sysinfo.h" /* smp_num_cpus */
+#include "sysinfo.h"		/* smp_num_cpus */
 
 #define KSYMS_FILENAME "/proc/ksyms"
 
@@ -29,7 +29,7 @@
 #undef KSYMS_FILENAME
 #define KSYMS_FILENAME  "/would/be/nice/to/have/this/file"
 #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-hacked"
-#define linux_version_code 131598 /* ? */
+#define linux_version_code 131598	/* ? */
 #define smp_num_cpus 2
 #endif
 
@@ -37,7 +37,7 @@
 #undef KSYMS_FILENAME
 #define KSYMS_FILENAME  "/home/albert/ps/45621/ksyms-2.3.12"
 #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.12"
-#define linux_version_code 131852 /* 2.3.12 */
+#define linux_version_code 131852	/* 2.3.12 */
 #define smp_num_cpus 2
 #endif
 
@@ -45,7 +45,7 @@
 #undef KSYMS_FILENAME
 #define KSYMS_FILENAME  "/home/albert/ps/45621/ksyms-2.3.18ac8-MODVERS"
 #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.18ac8-MODVERS"
-#define linux_version_code 131858 /* 2.3.18ac8 */
+#define linux_version_code 131858	/* 2.3.18ac8 */
 #define smp_num_cpus 2
 #endif
 
@@ -53,7 +53,7 @@
 #undef KSYMS_FILENAME
 #define KSYMS_FILENAME  "/home/albert/ps/45621/ksyms-2.3.18ac8-NOMODVERS"
 #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.18ac8-NOMODVERS"
-#define linux_version_code 131858 /* 2.3.18ac8 */
+#define linux_version_code 131858	/* 2.3.18ac8 */
 #define smp_num_cpus 2
 #endif
 
@@ -104,27 +104,28 @@
  */
 
 typedef struct symb {
-  const char *name;
-  unsigned long addr;
+	const char *name;
+	unsigned long addr;
 } symb;
 
 static const symb fail = { "?", 0 };
+
 static const char dash[] = "-";
 
 /* These mostly rely on POSIX to make them zero. */
 
 static symb hashtable[256];
 
-static char       *sysmap_data;
-static unsigned    sysmap_room;
-static symb       *sysmap_index;
-static unsigned    sysmap_count;
+static char *sysmap_data;
+static unsigned sysmap_room;
+static symb *sysmap_index;
+static unsigned sysmap_count;
 
-static char       *ksyms_data;
-static unsigned    ksyms_room     = 4096;
-static symb       *ksyms_index;
-static unsigned    ksyms_count;
-static unsigned    idx_room;
+static char *ksyms_data;
+static unsigned ksyms_room = 4096;
+static symb *ksyms_index;
+static unsigned ksyms_count;
+static unsigned idx_room;
 
 /*********************************/
 
@@ -139,465 +140,582 @@
  * /proc/ksyms and System.map data files.
  */
 #if 0
-static void chop_version(char *arg) {
-  char *cp;
-  cp = strchr(arg,'\t');
-  if (cp) *cp = '\0';  /* kill trailing module name first */
-  for (;;) {
-    char *p;
-    int len = 0;
-    cp = strrchr(arg, 'R');
-    if (!cp || cp<=arg+1 || cp[-1]!='_') break;
-    for (p=cp; *++p; ) {
-      switch(*p) {
-      default:
-        return;
-      case '0' ... '9':
-      case 'a' ... 'f':
-        len++;
-        continue;
-      case 'g' ... 'z':
-      case '_':
-        len=0;
-        continue;
-      }
-    }
-    if (len<8) break;
-    cp[-1] = '\0';
-  }
+static void chop_version(char *arg)
+{
+	char *cp;
+	cp = strchr(arg, '\t');
+	if (cp)
+		*cp = '\0';	/* kill trailing module name first */
+	for (;;) {
+		char *p;
+		int len = 0;
+		cp = strrchr(arg, 'R');
+		if (!cp || cp <= arg + 1 || cp[-1] != '_')
+			break;
+		for (p = cp; *++p;) {
+			switch (*p) {
+			default:
+				return;
+			case '0' ... '9':
+			case 'a' ... 'f':
+				len++;
+				continue;
+			case 'g' ... 'z':
+			case '_':
+				len = 0;
+				continue;
+			}
+		}
+		if (len < 8)
+			break;
+		cp[-1] = '\0';
+	}
 }
 #endif
-static void chop_version(char *arg) {
-  char *cp;
-  cp = strchr(arg,'\t');
-  if (cp) *cp = '\0';  /* kill trailing module name first */
-  for (;;) {
-    int len;
-    cp = strrchr(arg, 'R');
-    if (!cp || cp<=arg+1 || cp[-1]!='_') break;
-    len=strlen(cp);
-    if (len<9) break;
-    if (strpbrk(cp+1,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")) break;
-    if (strspn(cp+len-8,"0123456789abcdef")!=8) break;
-    cp[-1] = '\0';
-  }
+static void chop_version(char *arg)
+{
+	char *cp;
+	cp = strchr(arg, '\t');
+	if (cp)
+		*cp = '\0';	/* kill trailing module name first */
+	for (;;) {
+		int len;
+		cp = strrchr(arg, 'R');
+		if (!cp || cp <= arg + 1 || cp[-1] != '_')
+			break;
+		len = strlen(cp);
+		if (len < 9)
+			break;
+		if (strpbrk(cp + 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
+			break;
+		if (strspn(cp + len - 8, "0123456789abcdef") != 8)
+			break;
+		cp[-1] = '\0';
+	}
 }
 
 /***********************************/
 
-static const symb *search(unsigned long address, symb *idx, unsigned count) {
-  unsigned left;
-  unsigned mid;
-  unsigned right;
-  if (!idx) return NULL;   /* maybe not allocated */
-  if (address < idx[0].addr) return NULL;
-  if (address >= idx[count-1].addr) return idx+count-1;
-  left  = 0;
-  right = count-1;
-  for (;;) {
-    mid = (left + right) / 2;
-    if (address >= idx[mid].addr) left  = mid;
-    if (address <= idx[mid].addr) right = mid;
-    if (right-left <= 1) break;
-  }
-  if (address == idx[right].addr) return idx+right;
-  return idx+left;
+static const symb *search(unsigned long address, symb * idx, unsigned count)
+{
+	unsigned left;
+	unsigned mid;
+	unsigned right;
+	if (!idx)
+		return NULL;	/* maybe not allocated */
+	if (address < idx[0].addr)
+		return NULL;
+	if (address >= idx[count - 1].addr)
+		return idx + count - 1;
+	left = 0;
+	right = count - 1;
+	for (;;) {
+		mid = (left + right) / 2;
+		if (address >= idx[mid].addr)
+			left = mid;
+		if (address <= idx[mid].addr)
+			right = mid;
+		if (right - left <= 1)
+			break;
+	}
+	if (address == idx[right].addr)
+		return idx + right;
+	return idx + left;
 }
 
 /*********************************/
 
 /* allocate if needed, read, and return buffer size */
-static void read_file(const char *restrict filename, char **bufp, unsigned *restrict roomp) {
-  int fd = 0;
-  ssize_t done;
-  char *buf = *bufp;
-  ssize_t total = 0;
-  unsigned room = *roomp;
+static void read_file(const char *restrict filename, char **bufp,
+		      unsigned *restrict roomp)
+{
+	int fd = 0;
+	ssize_t done;
+	char *buf = *bufp;
+	ssize_t total = 0;
+	unsigned room = *roomp;
 
-  if (!room) goto hell;     /* failed before */
-  if (!buf) buf = malloc(room);
-  if (!buf) goto hell;
+	if (!room)
+		goto hell;	/* failed before */
+	if (!buf)
+		buf = malloc(room);
+	if (!buf)
+		goto hell;
 open_again:
-  fd = open(filename, O_RDONLY|O_NOCTTY|O_NONBLOCK);
-  if (fd<0) {
-    switch(errno) {
-    case EINTR:  goto open_again;
-    default:     _exit(101);
-    case EACCES:   /* somebody screwing around? */
-      /* FIXME: set a flag to disable symbol lookup? */
-    case ENOENT:;  /* no module support */
-    }
-    goto hell;
-  }
-  for (;;) {
-    done = read(fd, buf+total, room-total-1);
-    if (done==0) break;  /* nothing left */
-    if (done==-1) {
-      if (errno==EINTR) continue;  /* try again */
-      perror("");
-      goto hell;
-    }
-    if (done==(ssize_t)room-total-1) {
-      char *tmp;
-      total += done;
-      /* more to go, but no room in buffer */
-      room *= 2;
-      tmp = realloc(buf, room);
-      if (!tmp) goto hell;
-      buf = tmp;
-      continue;
-    }
-    if (done>0 && done<(ssize_t)room-total-1) {
-      total += done;
-      continue;   /* OK, we read some. Go do more. */
-    }
-    fprintf(stderr,"%ld can't happen\n", (long)done);
-    /* FIXME: memory leak */
-    _exit(42);
-  }
-  *bufp = buf;
-  *roomp = room;
-  close(fd);
-  return;
+	fd = open(filename, O_RDONLY | O_NOCTTY | O_NONBLOCK);
+	if (fd < 0) {
+		switch (errno) {
+		case EINTR:
+			goto open_again;
+		default:
+			_exit(101);
+		case EACCES:	/* somebody screwing around? */
+			/* FIXME: set a flag to disable symbol lookup? */
+		case ENOENT:;	/* no module support */
+		}
+		goto hell;
+	}
+	for (;;) {
+		done = read(fd, buf + total, room - total - 1);
+		if (done == 0)
+			break;	/* nothing left */
+		if (done == -1) {
+			if (errno == EINTR)
+				continue;	/* try again */
+			perror("");
+			goto hell;
+		}
+		if (done == (ssize_t) room - total - 1) {
+			char *tmp;
+			total += done;
+			/* more to go, but no room in buffer */
+			room *= 2;
+			tmp = realloc(buf, room);
+			if (!tmp)
+				goto hell;
+			buf = tmp;
+			continue;
+		}
+		if (done > 0 && done < (ssize_t) room - total - 1) {
+			total += done;
+			continue;	/* OK, we read some. Go do more. */
+		}
+		fprintf(stderr, "%ld can't happen\n", (long)done);
+		/* FIXME: memory leak */
+		_exit(42);
+	}
+	*bufp = buf;
+	*roomp = room;
+	close(fd);
+	return;
 hell:
-  if (buf) free(buf);
-  *bufp = NULL;
-  *roomp = 0;   /* this function will never work again */
-  total = 0;
-  close(fd);
-  return;
+	if (buf)
+		free(buf);
+	*bufp = NULL;
+	*roomp = 0;		/* this function will never work again */
+	total = 0;
+	close(fd);
+	return;
 }
 
 /*********************************/
 
-static int parse_ksyms(void) {
-  char *endp;
-  if (!ksyms_room || !ksyms_data) goto quiet_goodbye;
-  endp = ksyms_data;
-  ksyms_count = 0;
-  if (idx_room) goto bypass;  /* some space already allocated */
-  idx_room = 512;
-  for (;;) {
-    void *vp;
-    idx_room *= 2;
-    vp = realloc(ksyms_index, sizeof(symb)*idx_room);
-    if (!vp) goto bad_alloc;
-    ksyms_index = vp;
+static int parse_ksyms(void)
+{
+	char *endp;
+	if (!ksyms_room || !ksyms_data)
+		goto quiet_goodbye;
+	endp = ksyms_data;
+	ksyms_count = 0;
+	if (idx_room)
+		goto bypass;	/* some space already allocated */
+	idx_room = 512;
+	for (;;) {
+		void *vp;
+		idx_room *= 2;
+		vp = realloc(ksyms_index, sizeof(symb) * idx_room);
+		if (!vp)
+			goto bad_alloc;
+		ksyms_index = vp;
 bypass:
-    for (;;) {
-      char *saved;
-      if (!*endp) return 1;
-      saved = endp;
-      ksyms_index[ksyms_count].addr = strtoul(endp, &endp, 16);
-      if (endp==saved || *endp != ' ') goto bad_parse;
-      endp++;
-      ksyms_index[ksyms_count].name = endp;
-      saved = endp;
-      endp = strchr(endp,'\n');
-      if (!endp) goto bad_parse;   /* no newline */
-      *endp = '\0';
-      chop_version(saved);
-      ++endp;
-      if (++ksyms_count >= idx_room) break;  /* need more space */
-    }
-  }
+		for (;;) {
+			char *saved;
+			if (!*endp)
+				return 1;
+			saved = endp;
+			ksyms_index[ksyms_count].addr =
+			    strtoul(endp, &endp, 16);
+			if (endp == saved || *endp != ' ')
+				goto bad_parse;
+			endp++;
+			ksyms_index[ksyms_count].name = endp;
+			saved = endp;
+			endp = strchr(endp, '\n');
+			if (!endp)
+				goto bad_parse;	/* no newline */
+			*endp = '\0';
+			chop_version(saved);
+			++endp;
+			if (++ksyms_count >= idx_room)
+				break;	/* need more space */
+		}
+	}
 
-  if (0) {
+	if (0) {
 bad_alloc:
-    fprintf(stderr, "Warning: not enough memory available\n");
-  }
-  if (0) {
+		fprintf(stderr, "Warning: not enough memory available\n");
+	}
+	if (0) {
 bad_parse:
-    fprintf(stderr, "Warning: "KSYMS_FILENAME" not normal\n");
-  }
+		fprintf(stderr, "Warning: " KSYMS_FILENAME " not normal\n");
+	}
 quiet_goodbye:
-  idx_room = 0;
-  if (ksyms_data) free(ksyms_data) , ksyms_data = NULL;
-  ksyms_room = 0;
-  if (ksyms_index) free(ksyms_index) , ksyms_index = NULL;
-  ksyms_count = 0;
-  return 0;
+	idx_room = 0;
+	if (ksyms_data)
+		free(ksyms_data), ksyms_data = NULL;
+	ksyms_room = 0;
+	if (ksyms_index)
+		free(ksyms_index), ksyms_index = NULL;
+	ksyms_count = 0;
+	return 0;
 }
 
 /*********************************/
 
 #define VCNT 16
 
-static int sysmap_mmap(const char *restrict const filename, void (*message)(const char *restrict, ...)) {
-  struct stat sbuf;
-  char *endp;
-  int fd;
-  char Version[32];
-  fd = open(filename, O_RDONLY|O_NOCTTY|O_NONBLOCK);
-  if (fd<0) return 0;
-  if (fstat(fd, &sbuf) < 0) goto bad_open;
-  if (!S_ISREG(sbuf.st_mode)) goto bad_open;
-  if (sbuf.st_size < 5000) goto bad_open;  /* if way too small */
-  /* Would be shared read-only, but we want '\0' after each name. */
-  endp = mmap(0, sbuf.st_size + 1, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
-  sysmap_data = endp;
-  while (*endp==' ') {  /* damn Alpha machine types */
-    if (strncmp(endp,"                 w ", 19)) goto bad_parse;
-    endp += 19;
-    endp = strchr(endp,'\n');
-    if (!endp) goto bad_parse;   /* no newline */
-    if (strncmp(endp-3, "_mv\n", 4)) goto bad_parse;
-    endp++;
-  }
-  if (sysmap_data == (caddr_t) -1) goto bad_open;
-  close(fd);
-  fd = -1;
-  sprintf(Version, "Version_%d", linux_version_code);
-  sysmap_room = 512;
-  for (;;) {
-    void *vp;
-    sysmap_room *= 2;
-    vp = realloc(sysmap_index, sizeof(symb)*sysmap_room);
-    if (!vp) goto bad_alloc;
-    sysmap_index = vp;
-    for (;;) {
-      char *vstart;
-      if (endp - sysmap_data >= sbuf.st_size) {   /* if we reached the end */
-        int i = VCNT;            /* check VCNT times to verify this file */
-        if (*Version) goto bad_version;
-        if (!ksyms_index) return 1; /* if can not verify, assume success */
-        while (i--) {
+static int sysmap_mmap(const char *restrict const filename,
+		       void (*message) (const char *restrict, ...))
+{
+	struct stat sbuf;
+	char *endp;
+	int fd;
+	char Version[32];
+	fd = open(filename, O_RDONLY | O_NOCTTY | O_NONBLOCK);
+	if (fd < 0)
+		return 0;
+	if (fstat(fd, &sbuf) < 0)
+		goto bad_open;
+	if (!S_ISREG(sbuf.st_mode))
+		goto bad_open;
+	if (sbuf.st_size < 5000)
+		goto bad_open;	/* if way too small */
+	/* Would be shared read-only, but we want '\0' after each name. */
+	endp =
+	    mmap(0, sbuf.st_size + 1, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd,
+		 0);
+	sysmap_data = endp;
+	while (*endp == ' ') {	/* damn Alpha machine types */
+		if (strncmp(endp, "                 w ", 19))
+			goto bad_parse;
+		endp += 19;
+		endp = strchr(endp, '\n');
+		if (!endp)
+			goto bad_parse;	/* no newline */
+		if (strncmp(endp - 3, "_mv\n", 4))
+			goto bad_parse;
+		endp++;
+	}
+	if (sysmap_data == (caddr_t) - 1)
+		goto bad_open;
+	close(fd);
+	fd = -1;
+	sprintf(Version, "Version_%d", linux_version_code);
+	sysmap_room = 512;
+	for (;;) {
+		void *vp;
+		sysmap_room *= 2;
+		vp = realloc(sysmap_index, sizeof(symb) * sysmap_room);
+		if (!vp)
+			goto bad_alloc;
+		sysmap_index = vp;
+		for (;;) {
+			char *vstart;
+			if (endp - sysmap_data >= sbuf.st_size) {	/* if we reached the end */
+				int i = VCNT;	/* check VCNT times to verify this file */
+				if (*Version)
+					goto bad_version;
+				if (!ksyms_index)
+					return 1;	/* if can not verify, assume success */
+				while (i--) {
 #if 1
-          const symb *findme;
-          const symb *map_symb;
-          /* Choose VCNT entries from /proc/ksyms to test */
-          findme = ksyms_index + (ksyms_count*i/VCNT);
-          /* Search for them in the System.map */
-          map_symb = search(findme->addr, sysmap_index, sysmap_count);
-          if (map_symb) {
-            if (map_symb->addr != findme->addr) continue;
-            /* backup to first matching address */
-            while (map_symb != sysmap_index) {
-              if (map_symb->addr != (map_symb-1)->addr) break;
-              map_symb--;
-            }
-            /* search for name in symbols with same address */
-            while (map_symb != (sysmap_index+sysmap_count)) {
-              if (map_symb->addr != findme->addr) break;
-              if (!strcmp(map_symb->name,findme->name)) goto good_match;
-              map_symb++;
-            }
-            map_symb--; /* backup to last symbol with matching address */
-            message("{%s} {%s}\n",map_symb->name,findme->name);
-            goto bad_match;
-          }
-good_match:;
+					const symb *findme;
+					const symb *map_symb;
+					/* Choose VCNT entries from /proc/ksyms to test */
+					findme =
+					    ksyms_index +
+					    (ksyms_count * i / VCNT);
+					/* Search for them in the System.map */
+					map_symb =
+					    search(findme->addr, sysmap_index,
+						   sysmap_count);
+					if (map_symb) {
+						if (map_symb->addr !=
+						    findme->addr)
+							continue;
+						/* backup to first matching address */
+						while (map_symb != sysmap_index) {
+							if (map_symb->addr !=
+							    (map_symb -
+							     1)->addr)
+								break;
+							map_symb--;
+						}
+						/* search for name in symbols with same address */
+						while (map_symb !=
+						       (sysmap_index +
+							sysmap_count)) {
+							if (map_symb->addr !=
+							    findme->addr)
+								break;
+							if (!strcmp
+							    (map_symb->name,
+							     findme->name))
+								goto good_match;
+							map_symb++;
+						}
+						map_symb--;	/* backup to last symbol with matching address */
+						message("{%s} {%s}\n",
+							map_symb->name,
+							findme->name);
+						goto bad_match;
+					}
+good_match:				;
 #endif
-        }
-        return 1; /* success */
-      }
-      sysmap_index[sysmap_count].addr = strtoul(endp, &endp, 16);
-      if (*endp != ' ') goto bad_parse;
-      endp++;
-      if (!strchr(SYMBOL_TYPE_CHARS, *endp)) goto bad_parse;
-      endp++;
-      if (*endp != ' ') goto bad_parse;
-      endp++;
-      sysmap_index[sysmap_count].name = endp;
-      vstart = endp;
-      endp = strchr(endp,'\n');
-      if (!endp) goto bad_parse;   /* no newline */
-      *endp = '\0';
-      ++endp;
-      chop_version(vstart);
-      if (*vstart=='V' && *Version && !strcmp(Version,vstart)) *Version='\0';
-      if (++sysmap_count >= sysmap_room) break;  /* need more space */
-    }
-  }
+				}
+				return 1;	/* success */
+			}
+			sysmap_index[sysmap_count].addr =
+			    strtoul(endp, &endp, 16);
+			if (*endp != ' ')
+				goto bad_parse;
+			endp++;
+			if (!strchr(SYMBOL_TYPE_CHARS, *endp))
+				goto bad_parse;
+			endp++;
+			if (*endp != ' ')
+				goto bad_parse;
+			endp++;
+			sysmap_index[sysmap_count].name = endp;
+			vstart = endp;
+			endp = strchr(endp, '\n');
+			if (!endp)
+				goto bad_parse;	/* no newline */
+			*endp = '\0';
+			++endp;
+			chop_version(vstart);
+			if (*vstart == 'V' && *Version
+			    && !strcmp(Version, vstart))
+				*Version = '\0';
+			if (++sysmap_count >= sysmap_room)
+				break;	/* need more space */
+		}
+	}
 
-  if (0) {
+	if (0) {
 bad_match:
-    message("Warning: %s does not match kernel data.\n", filename);
-  }
-  if (0) {
+		message("Warning: %s does not match kernel data.\n", filename);
+	}
+	if (0) {
 bad_version:
-    message("Warning: %s has an incorrect kernel version.\n", filename);
-  }
-  if (0) {
+		message("Warning: %s has an incorrect kernel version.\n",
+			filename);
+	}
+	if (0) {
 bad_alloc:
-    message("Warning: not enough memory available\n");
-  }
-  if (0) {
+		message("Warning: not enough memory available\n");
+	}
+	if (0) {
 bad_parse:
-    message("Warning: %s not parseable as a System.map\n", filename);
-  }
-  if (0) {
+		message("Warning: %s not parseable as a System.map\n",
+			filename);
+	}
+	if (0) {
 bad_open:
-    message("Warning: %s could not be opened as a System.map\n", filename);
-  }
+		message("Warning: %s could not be opened as a System.map\n",
+			filename);
+	}
 
-  sysmap_room=0;
-  sysmap_count=0;
-  if (sysmap_index) free(sysmap_index);
-  sysmap_index = NULL;
-  if (fd>=0) close(fd);
-  if (sysmap_data) munmap(sysmap_data, sbuf.st_size + 1);
-  sysmap_data = NULL;
-  return 0;
+	sysmap_room = 0;
+	sysmap_count = 0;
+	if (sysmap_index)
+		free(sysmap_index);
+	sysmap_index = NULL;
+	if (fd >= 0)
+		close(fd);
+	if (sysmap_data)
+		munmap(sysmap_data, sbuf.st_size + 1);
+	sysmap_data = NULL;
+	return 0;
 }
 
 /*********************************/
 
-static void read_and_parse(void) {
-  static time_t stamp;    /* after data gets old, load /proc/ksyms again */
-  if (time(NULL) != stamp) {
-    read_file(KSYMS_FILENAME, &ksyms_data, &ksyms_room);
-    parse_ksyms();
-    memset((void*)hashtable,0,sizeof(hashtable)); /* invalidate cache */
-    stamp = time(NULL);
-  }
+static void read_and_parse(void)
+{
+	static time_t stamp;	/* after data gets old, load /proc/ksyms again */
+	if (time(NULL) != stamp) {
+		read_file(KSYMS_FILENAME, &ksyms_data, &ksyms_room);
+		parse_ksyms();
+		memset((void *)hashtable, 0, sizeof(hashtable));	/* invalidate cache */
+		stamp = time(NULL);
+	}
 }
 
 /*********************************/
 
-static void default_message(const char *restrict format, ...) {
-    va_list arg;
+static void default_message(const char *restrict format, ...)
+{
+	va_list arg;
 
-    va_start (arg, format);
-    vfprintf (stderr, format, arg);
-    va_end (arg);
+	va_start(arg, format);
+	vfprintf(stderr, format, arg);
+	va_end(arg);
 }
 
 /*********************************/
 
 static int use_wchan_file;
 
-int open_psdb_message(const char *restrict override, void (*message)(const char *, ...)) {
-  static const char *sysmap_paths[] = {
-    "/boot/System.map-%s",
-    "/boot/System.map",
-    "/lib/modules/%s/System.map",
-    "/usr/src/linux/System.map",
-    "/System.map",
-    NULL
-  };
-  struct stat sbuf;
-  struct utsname uts;
-  char path[64];
-  const char **fmt = sysmap_paths;
-  const char *sm;
+int open_psdb_message(const char *restrict override,
+		      void (*message) (const char *, ...))
+{
+	static const char *sysmap_paths[] = {
+		"/boot/System.map-%s",
+		"/boot/System.map",
+		"/lib/modules/%s/System.map",
+		"/usr/src/linux/System.map",
+		"/System.map",
+		NULL
+	};
+	struct stat sbuf;
+	struct utsname uts;
+	char path[64];
+	const char **fmt = sysmap_paths;
+	const char *sm;
 
-#ifdef SYSMAP_FILENAME    /* debug feature */
-  override = SYSMAP_FILENAME;
+#ifdef SYSMAP_FILENAME		/* debug feature */
+	override = SYSMAP_FILENAME;
 #endif
 
-  // first allow for a user-selected System.map file
-  if (
-    (sm=override)
-    ||
-    (sm=getenv("PS_SYSMAP"))
-    ||
-    (sm=getenv("PS_SYSTEM_MAP"))
-  ) {
-    read_and_parse();
-    if (sysmap_mmap(sm, message)) return 0;
-    /* failure is better than ignoring the user & using bad data */
-    return -1;           /* ought to return "Namelist not found." */
-  }
-
-  // next try the Linux 2.5.xx method
-  if (!stat("/proc/self/wchan", &sbuf)) {
-    use_wchan_file = 1; // hack
-    return 0;
-  }
-
-  // finally, search for the System.map file
-  uname(&uts);
-  do{
-    int did_ksyms = 0;
-    snprintf(path, sizeof path, *fmt, uts.release);
-    if (!stat(path, &sbuf)) {
-      if (did_ksyms++) read_and_parse();
-      if (sysmap_mmap(path, message)) return 0;
-    }
-  }while (*++fmt);
-  /* TODO: Without System.map, no need to keep ksyms loaded. */
-  return -1;
+	// first allow for a user-selected System.map file
+	if ((sm = override)
+	    || (sm = getenv("PS_SYSMAP"))
+	    || (sm = getenv("PS_SYSTEM_MAP"))
+	    ) {
+		read_and_parse();
+		if (sysmap_mmap(sm, message))
+			return 0;
+		/* failure is better than ignoring the user & using bad data */
+		return -1;	/* ought to return "Namelist not found." */
+	}
+	// next try the Linux 2.5.xx method
+	if (!stat("/proc/self/wchan", &sbuf)) {
+		use_wchan_file = 1;	// hack
+		return 0;
+	}
+	// finally, search for the System.map file
+	uname(&uts);
+	do {
+		int did_ksyms = 0;
+		snprintf(path, sizeof path, *fmt, uts.release);
+		if (!stat(path, &sbuf)) {
+			if (did_ksyms++)
+				read_and_parse();
+			if (sysmap_mmap(path, message))
+				return 0;
+		}
+	} while (*++fmt);
+	/* TODO: Without System.map, no need to keep ksyms loaded. */
+	return -1;
 }
 
 /***************************************/
 
-int open_psdb(const char *restrict override) {
-    return open_psdb_message(override, default_message);
+int open_psdb(const char *restrict override)
+{
+	return open_psdb_message(override, default_message);
 }
 
 /***************************************/
 
-const char * read_wchan_file(unsigned pid) {
-  static char buf[64];
-  const char *ret = buf;
-  ssize_t num;
-  int fd;
+const char *read_wchan_file(unsigned pid)
+{
+	static char buf[64];
+	const char *ret = buf;
+	ssize_t num;
+	int fd;
 
-  snprintf(buf, sizeof buf, "/proc/%d/wchan", pid);
-  fd = open(buf, O_RDONLY);
-  if (fd==-1) return "?";
-  num = read(fd, buf, sizeof buf - 1);
-  close(fd);
-  if (num<1) return "?"; // allow for "0"
-  buf[num] = '\0';
+	snprintf(buf, sizeof buf, "/proc/%d/wchan", pid);
+	fd = open(buf, O_RDONLY);
+	if (fd == -1)
+		return "?";
+	num = read(fd, buf, sizeof buf - 1);
+	close(fd);
+	if (num < 1)
+		return "?";	// allow for "0"
+	buf[num] = '\0';
 
-  if (buf[0]=='0' && buf[1]=='\0') return "-";
+	if (buf[0] == '0' && buf[1] == '\0')
+		return "-";
 
-  // would skip over numbers if they existed -- but no
+	// would skip over numbers if they existed -- but no
 
-  switch(*ret) {
-    case 's': if (!strncmp(ret, "sys_", 4)) ret += 4;   break;
-    case 'd': if (!strncmp(ret, "do_",  3)) ret += 3;   break;
-    case '_': while (*ret=='_') ret++;                  break;
-  }
-  return ret;
+	switch (*ret) {
+	case 's':
+		if (!strncmp(ret, "sys_", 4))
+			ret += 4;
+		break;
+	case 'd':
+		if (!strncmp(ret, "do_", 3))
+			ret += 3;
+		break;
+	case '_':
+		while (*ret == '_')
+			ret++;
+		break;
+	}
+	return ret;
 }
 
 /***************************************/
 
-#define MAX_OFFSET (0x1000*sizeof(long))  /* past this is generally junk */
+#define MAX_OFFSET (0x1000*sizeof(long))	/* past this is generally junk */
 
 /* return pointer to temporary static buffer with function name */
-const char * wchan(unsigned long address, unsigned pid) {
-  const symb *mod_symb;
-  const symb *map_symb;
-  const symb *good_symb;
-  const char *ret;
-  unsigned hash;
+const char *wchan(unsigned long address, unsigned pid)
+{
+	const symb *mod_symb;
+	const symb *map_symb;
+	const symb *good_symb;
+	const char *ret;
+	unsigned hash;
 
-  // can't cache it due to a race condition :-(
-  if (use_wchan_file) return read_wchan_file(pid);
+	// can't cache it due to a race condition :-(
+	if (use_wchan_file)
+		return read_wchan_file(pid);
 
-  if (!address) return dash;
+	if (!address)
+		return dash;
 
-  read_and_parse();
-  hash = (address >> 4) & 0xff;  /* got 56/63 hits & 7/63 misses */
-  if (hashtable[hash].addr == address) return hashtable[hash].name;
-  mod_symb = search(address, ksyms_index,  ksyms_count);
-  if (!mod_symb) mod_symb = &fail;
-  map_symb = search(address, sysmap_index, sysmap_count);
-  if (!map_symb) map_symb = &fail;
+	read_and_parse();
+	hash = (address >> 4) & 0xff;	/* got 56/63 hits & 7/63 misses */
+	if (hashtable[hash].addr == address)
+		return hashtable[hash].name;
+	mod_symb = search(address, ksyms_index, ksyms_count);
+	if (!mod_symb)
+		mod_symb = &fail;
+	map_symb = search(address, sysmap_index, sysmap_count);
+	if (!map_symb)
+		map_symb = &fail;
 
-  /* which result is closest? */
-  good_symb = (mod_symb->addr > map_symb->addr)
-            ? mod_symb
-            : map_symb
-  ;
-  if (address > good_symb->addr + MAX_OFFSET) good_symb = &fail;
+	/* which result is closest? */
+	good_symb = (mod_symb->addr > map_symb->addr)
+	    ? mod_symb : map_symb;
+	if (address > good_symb->addr + MAX_OFFSET)
+		good_symb = &fail;
 
-  /* good_symb->name has the data, but needs to be trimmed */
-  ret = good_symb->name;
-  switch(*ret) {
-    case 's': if (!strncmp(ret, "sys_", 4)) ret += 4;   break;
-    case 'd': if (!strncmp(ret, "do_",  3)) ret += 3;   break;
-    case '_': while (*ret=='_') ret++;                  break;
-  }
-  /* if (!*ret) ret = fail.name; */  /* not likely (name was "sys_", etc.) */
+	/* good_symb->name has the data, but needs to be trimmed */
+	ret = good_symb->name;
+	switch (*ret) {
+	case 's':
+		if (!strncmp(ret, "sys_", 4))
+			ret += 4;
+		break;
+	case 'd':
+		if (!strncmp(ret, "do_", 3))
+			ret += 3;
+		break;
+	case '_':
+		while (*ret == '_')
+			ret++;
+		break;
+	}
+	/* if (!*ret) ret = fail.name; *//* not likely (name was "sys_", etc.) */
 
-  /* cache name after abbreviation */
-  hashtable[hash].addr = address;
-  hashtable[hash].name = ret;
+	/* cache name after abbreviation */
+	hashtable[hash].addr = address;
+	hashtable[hash].name = ret;
 
-  return ret;
+	return ret;
 }
diff --git a/tools/top-LTP/proc/pwcache.c b/tools/top-LTP/proc/pwcache.c
index 19b64c0..1b2c663 100644
--- a/tools/top-LTP/proc/pwcache.c
+++ b/tools/top-LTP/proc/pwcache.c
@@ -17,62 +17,62 @@
 
 // might as well fill cache lines... else we waste memory anyway
 
-#define	HASHSIZE	64		/* power of 2 */
+#define	HASHSIZE	64	/* power of 2 */
 #define	HASH(x)		((x) & (HASHSIZE - 1))
 
 #define NAMESIZE	20
 #define NAMELENGTH	"19"
 
 static struct pwbuf {
-    struct pwbuf *next;
-    uid_t uid;
-    char name[NAMESIZE];
+	struct pwbuf *next;
+	uid_t uid;
+	char name[NAMESIZE];
 } *pwhash[HASHSIZE];
 
 char *user_from_uid(uid_t uid)
 {
-    struct pwbuf **p;
-    struct passwd *pw;
+	struct pwbuf **p;
+	struct passwd *pw;
 
-    p = &pwhash[HASH(uid)];
-    while (*p) {
-	if ((*p)->uid == uid)
-	    return((*p)->name);
-	p = &(*p)->next;
-    }
-    *p = (struct pwbuf *) xmalloc(sizeof(struct pwbuf));
-    (*p)->uid = uid;
-    if ((pw = getpwuid(uid)) == NULL)
-	sprintf((*p)->name, "#%d", uid);
-    else
-	sprintf((*p)->name, "%-." NAMELENGTH "s", pw->pw_name);
-    (*p)->next = NULL;
-    return((*p)->name);
+	p = &pwhash[HASH(uid)];
+	while (*p) {
+		if ((*p)->uid == uid)
+			return ((*p)->name);
+		p = &(*p)->next;
+	}
+	*p = (struct pwbuf *)xmalloc(sizeof(struct pwbuf));
+	(*p)->uid = uid;
+	if ((pw = getpwuid(uid)) == NULL)
+		sprintf((*p)->name, "#%d", uid);
+	else
+		sprintf((*p)->name, "%-." NAMELENGTH "s", pw->pw_name);
+	(*p)->next = NULL;
+	return ((*p)->name);
 }
 
 static struct grpbuf {
-    struct grpbuf *next;
-    gid_t gid;
-    char name[NAMESIZE];
+	struct grpbuf *next;
+	gid_t gid;
+	char name[NAMESIZE];
 } *grphash[HASHSIZE];
 
 char *group_from_gid(gid_t gid)
 {
-    struct grpbuf **g;
-    struct group *gr;
+	struct grpbuf **g;
+	struct group *gr;
 
-    g = &grphash[HASH(gid)];
-    while (*g) {
-       if ((*g)->gid == gid)
-           return((*g)->name);
-       g = &(*g)->next;
-    }
-    *g = (struct grpbuf *) malloc(sizeof(struct grpbuf));
-    (*g)->gid = gid;
-    if ((gr = getgrgid(gid)) == NULL)
-       sprintf((*g)->name, "#%d", gid);
-    else
-       sprintf((*g)->name, "%-." NAMELENGTH "s", gr->gr_name);
-    (*g)->next = NULL;
-    return((*g)->name);
+	g = &grphash[HASH(gid)];
+	while (*g) {
+		if ((*g)->gid == gid)
+			return ((*g)->name);
+		g = &(*g)->next;
+	}
+	*g = (struct grpbuf *)malloc(sizeof(struct grpbuf));
+	(*g)->gid = gid;
+	if ((gr = getgrgid(gid)) == NULL)
+		sprintf((*g)->name, "#%d", gid);
+	else
+		sprintf((*g)->name, "%-." NAMELENGTH "s", gr->gr_name);
+	(*g)->next = NULL;
+	return ((*g)->name);
 }
diff --git a/tools/top-LTP/proc/readproc.c b/tools/top-LTP/proc/readproc.c
index 92af4c4..fd366e7 100644
--- a/tools/top-LTP/proc/readproc.c
+++ b/tools/top-LTP/proc/readproc.c
@@ -33,50 +33,53 @@
 
 /* initiate a process table scan
  */
-PROCTAB* openproc(int flags, ...) {
-    va_list ap;
-    PROCTAB* PT = xmalloc(sizeof(PROCTAB));
+PROCTAB *openproc(int flags, ...)
+{
+	va_list ap;
+	PROCTAB *PT = xmalloc(sizeof(PROCTAB));
 
-    if (flags & PROC_PID)
-      PT->procfs = NULL;
-    else if (!(PT->procfs = opendir("/proc")))
-      return NULL;
-    PT->flags = flags;
-    va_start(ap, flags);		/*  Init args list */
-    if (flags & PROC_PID)
-    	PT->pids = va_arg(ap, pid_t*);
-    else if (flags & PROC_UID) {
-    	PT->uids = va_arg(ap, uid_t*);
-	PT->nuid = va_arg(ap, int);
-    }
-    va_end(ap);				/*  Clean up args list */
-    return PT;
+	if (flags & PROC_PID)
+		PT->procfs = NULL;
+	else if (!(PT->procfs = opendir("/proc")))
+		return NULL;
+	PT->flags = flags;
+	va_start(ap, flags);	/*  Init args list */
+	if (flags & PROC_PID)
+		PT->pids = va_arg(ap, pid_t *);
+	else if (flags & PROC_UID) {
+		PT->uids = va_arg(ap, uid_t *);
+		PT->nuid = va_arg(ap, int);
+	}
+	va_end(ap);		/*  Clean up args list */
+	return PT;
 }
 
 /* terminate a process table scan
  */
-void closeproc(PROCTAB* PT) {
-    if (PT) {
-        if (PT->procfs) closedir(PT->procfs);
-        free(PT);
-    }
+void closeproc(PROCTAB * PT)
+{
+	if (PT) {
+		if (PT->procfs)
+			closedir(PT->procfs);
+		free(PT);
+	}
 }
 
 /* deallocate the space allocated by readproc if the passed rbuf was NULL
  */
-void freeproc(proc_t* p) {
-    if (!p)	/* in case p is NULL */
-	return;
-    /* ptrs are after strings to avoid copying memory when building them. */
-    /* so free is called on the address of the address of strvec[0]. */
-    if (p->cmdline)
-	free((void*)*p->cmdline);
-    if (p->environ)
-	free((void*)*p->environ);
-    free(p);
+void freeproc(proc_t * p)
+{
+	if (!p)			/* in case p is NULL */
+		return;
+	/* ptrs are after strings to avoid copying memory when building them. */
+	/* so free is called on the address of the address of strvec[0]. */
+	if (p->cmdline)
+		free((void *)*p->cmdline);
+	if (p->environ)
+		free((void *)*p->environ);
+	free(p);
 }
 
-
 // 2.5.xx looks like:
 //
 // "State:\t%s\n"
@@ -85,250 +88,270 @@
 // "PPid:\t%d\n"
 // "TracerPid:\t%d\n"
 
-static void status2proc(const char *S, proc_t *restrict P) {
-    char* tmp;
-    unsigned i;
+static void status2proc(const char *S, proc_t * restrict P)
+{
+	char *tmp;
+	unsigned i;
 
-    // The cmd is escaped, with \\ and \n for backslash and newline.
-    // It certainly may contain "VmSize:" and similar crap.
-    if (unlikely(strncmp("Name:\t",S,6))) fprintf(stderr, "Internal error!\n");
-    S += 6;
-    i = 0;
-    while (i < sizeof P->cmd - 1) {
-      int c = *S++;
-      if (unlikely(c=='\n')) break;
-      if (unlikely(c=='\0')) return; // should never happen
-      if (unlikely(c=='\\')) {
-        c = *S++;
-        if (c=='\n') break; // should never happen
-        if (!c) break; // should never happen
-        if (c=='n') c='\n'; // else we assume it is '\\'
-      }
-      P->cmd[i++] = c;
-    }
-    P->cmd[i] = '\0';
+	// The cmd is escaped, with \\ and \n for backslash and newline.
+	// It certainly may contain "VmSize:" and similar crap.
+	if (unlikely(strncmp("Name:\t", S, 6)))
+		fprintf(stderr, "Internal error!\n");
+	S += 6;
+	i = 0;
+	while (i < sizeof P->cmd - 1) {
+		int c = *S++;
+		if (unlikely(c == '\n'))
+			break;
+		if (unlikely(c == '\0'))
+			return;	// should never happen
+		if (unlikely(c == '\\')) {
+			c = *S++;
+			if (c == '\n')
+				break;	// should never happen
+			if (!c)
+				break;	// should never happen
+			if (c == 'n')
+				c = '\n';	// else we assume it is '\\'
+		}
+		P->cmd[i++] = c;
+	}
+	P->cmd[i] = '\0';
 
-    tmp = strstr (S,"State:\t");
-    if (likely(tmp)) P->state = tmp[7];
-    else fprintf(stderr, "Internal error!\n");
+	tmp = strstr(S, "State:\t");
+	if (likely(tmp))
+		P->state = tmp[7];
+	else
+		fprintf(stderr, "Internal error!\n");
 
-    tmp = strstr (S,"PPid:");
-    if (likely(tmp)) sscanf (tmp,
-        "PPid:\t%d\n",
-        &P->ppid
-    );
-    else fprintf(stderr, "Internal error!\n");
+	tmp = strstr(S, "PPid:");
+	if (likely(tmp))
+		sscanf(tmp, "PPid:\t%d\n", &P->ppid);
+	else
+		fprintf(stderr, "Internal error!\n");
 
-    tmp = strstr (S,"Uid:");
-    if (likely(tmp)) sscanf (tmp,
-        "Uid:\t%d\t%d\t%d\t%d",
-        &P->ruid, &P->euid, &P->suid, &P->fuid
-    );
-    else fprintf(stderr, "Internal error!\n");
+	tmp = strstr(S, "Uid:");
+	if (likely(tmp))
+		sscanf(tmp,
+		       "Uid:\t%d\t%d\t%d\t%d",
+		       &P->ruid, &P->euid, &P->suid, &P->fuid);
+	else
+		fprintf(stderr, "Internal error!\n");
 
-    tmp = strstr (S,"Gid:");
-    if (likely(tmp)) sscanf (tmp,
-        "Gid:\t%d\t%d\t%d\t%d",
-        &P->rgid, &P->egid, &P->sgid, &P->fgid
-    );
-    else fprintf(stderr, "Internal error!\n");
+	tmp = strstr(S, "Gid:");
+	if (likely(tmp))
+		sscanf(tmp,
+		       "Gid:\t%d\t%d\t%d\t%d",
+		       &P->rgid, &P->egid, &P->sgid, &P->fgid);
+	else
+		fprintf(stderr, "Internal error!\n");
 
-    tmp = strstr (S,"VmSize:");
-    if (likely(tmp)) sscanf (tmp,
-        "VmSize: %lu kB\n"
-        "VmLck: %lu kB\n"
-        "VmRSS: %lu kB\n"
-        "VmData: %lu kB\n"
-        "VmStk: %lu kB\n"
-        "VmExe: %lu kB\n"
-        "VmLib: %lu kB\n",
-        &P->vm_size, &P->vm_lock, &P->vm_rss, &P->vm_data,
-        &P->vm_stack, &P->vm_exe, &P->vm_lib
-    );
-    else /* looks like an annoying kernel thread */
-    {
-        P->vm_size  = 0;
-        P->vm_lock  = 0;
-        P->vm_rss   = 0;
-        P->vm_data  = 0;
-        P->vm_stack = 0;
-        P->vm_exe   = 0;
-        P->vm_lib   = 0;
-    }
+	tmp = strstr(S, "VmSize:");
+	if (likely(tmp))
+		sscanf(tmp,
+		       "VmSize: %lu kB\n"
+		       "VmLck: %lu kB\n"
+		       "VmRSS: %lu kB\n"
+		       "VmData: %lu kB\n"
+		       "VmStk: %lu kB\n"
+		       "VmExe: %lu kB\n"
+		       "VmLib: %lu kB\n",
+		       &P->vm_size, &P->vm_lock, &P->vm_rss, &P->vm_data,
+		       &P->vm_stack, &P->vm_exe, &P->vm_lib);
+	else {			/* looks like an annoying kernel thread */
 
-    tmp = strstr (S,"SigPnd:");
-    if (likely(tmp)) sscanf (tmp,
+		P->vm_size = 0;
+		P->vm_lock = 0;
+		P->vm_rss = 0;
+		P->vm_data = 0;
+		P->vm_stack = 0;
+		P->vm_exe = 0;
+		P->vm_lib = 0;
+	}
+
+	tmp = strstr(S, "SigPnd:");
+	if (likely(tmp))
+		sscanf(tmp,
 #ifdef SIGNAL_STRING
-        "SigPnd: %s SigBlk: %s SigIgn: %s %*s %s",
-        P->signal, P->blocked, P->sigignore, P->sigcatch
+		       "SigPnd: %s SigBlk: %s SigIgn: %s %*s %s",
+		       P->signal, P->blocked, P->sigignore, P->sigcatch
 #else
-        "SigPnd: %Lx SigBlk: %Lx SigIgn: %Lx %*s %Lx",
-        &P->signal, &P->blocked, &P->sigignore, &P->sigcatch
+		       "SigPnd: %Lx SigBlk: %Lx SigIgn: %Lx %*s %Lx",
+		       &P->signal, &P->blocked, &P->sigignore, &P->sigcatch
 #endif
-    );
-    else fprintf(stderr, "Internal error!\n");
+		    );
+	else
+		fprintf(stderr, "Internal error!\n");
 }
 
-
-
 // Reads /proc/*/stat files, being careful not to trip over processes with
 // names like ":-) 1 2 3 4 5 6".
-static void stat2proc(const char* S, proc_t *restrict P) {
-    unsigned num;
-    char* tmp;
+static void stat2proc(const char *S, proc_t * restrict P)
+{
+	unsigned num;
+	char *tmp;
 
-    /* fill in default values for older kernels */
-    P->exit_signal = SIGCHLD;
-    P->processor = 0;
-    P->rtprio = -1;
-    P->sched = -1;
+	/* fill in default values for older kernels */
+	P->exit_signal = SIGCHLD;
+	P->processor = 0;
+	P->rtprio = -1;
+	P->sched = -1;
 
-    S = strchr(S, '(') + 1;
-    tmp = strrchr(S, ')');
-    num = tmp - S;
-    if (unlikely(num >= sizeof P->cmd)) num = sizeof P->cmd - 1;
-    memcpy(P->cmd, S, num);
-    P->cmd[num] = '\0';
-    S = tmp + 2;                 // skip ") "
+	S = strchr(S, '(') + 1;
+	tmp = strrchr(S, ')');
+	num = tmp - S;
+	if (unlikely(num >= sizeof P->cmd))
+		num = sizeof P->cmd - 1;
+	memcpy(P->cmd, S, num);
+	P->cmd[num] = '\0';
+	S = tmp + 2;		// skip ") "
 
-    num = sscanf(S,
-       "%c "
-       "%d %d %d %d %d "
-       "%lu %lu %lu %lu %lu "
-       "%Lu %Lu %Lu %Lu "  /* utime stime cutime cstime */
-       "%ld %ld %ld %ld "
-       "%Lu "  /* start_time */
-       "%lu "
-       "%ld "
-       "%lu %lu %lu %lu %lu %lu "
-       "%*s %*s %*s %*s " /* discard, no RT signals & Linux 2.1 used hex */
-       "%lu %lu %lu "
-       "%d %d "
-       "%lu %lu",
-       &P->state,
-       &P->ppid, &P->pgrp, &P->session, &P->tty, &P->tpgid,
-       &P->flags, &P->min_flt, &P->cmin_flt, &P->maj_flt, &P->cmaj_flt,
-       &P->utime, &P->stime, &P->cutime, &P->cstime,
-       &P->priority, &P->nice, &P->timeout, &P->it_real_value,
-       &P->start_time,
-       &P->vsize,
-       &P->rss,
-       &P->rss_rlim, &P->start_code, &P->end_code, &P->start_stack, &P->kstk_esp, &P->kstk_eip,
-/*     P->signal, P->blocked, P->sigignore, P->sigcatch,   */ /* can't use */
-       &P->wchan, &P->nswap, &P->cnswap,
+	num = sscanf(S, "%c " "%d %d %d %d %d " "%lu %lu %lu %lu %lu " "%Lu %Lu %Lu %Lu "	/* utime stime cutime cstime */
+		     "%ld %ld %ld %ld " "%Lu "	/* start_time */
+		     "%lu " "%ld " "%lu %lu %lu %lu %lu %lu " "%*s %*s %*s %*s "	/* discard, no RT signals & Linux 2.1 used hex */
+		     "%lu %lu %lu "
+		     "%d %d "
+		     "%lu %lu",
+		     &P->state,
+		     &P->ppid, &P->pgrp, &P->session, &P->tty, &P->tpgid,
+		     &P->flags, &P->min_flt, &P->cmin_flt, &P->maj_flt,
+		     &P->cmaj_flt, &P->utime, &P->stime, &P->cutime, &P->cstime,
+		     &P->priority, &P->nice, &P->timeout, &P->it_real_value,
+		     &P->start_time, &P->vsize, &P->rss, &P->rss_rlim,
+		     &P->start_code, &P->end_code, &P->start_stack,
+		     &P->kstk_esp, &P->kstk_eip,
+		     /*     P->signal, P->blocked, P->sigignore, P->sigcatch,   *//* can't use */
+		     &P->wchan, &P->nswap, &P->cnswap,
 /* -- Linux 2.0.35 ends here -- */
-       &P->exit_signal, &P->processor,  /* 2.2.1 ends with "exit_signal" */
+		     &P->exit_signal, &P->processor,	/* 2.2.1 ends with "exit_signal" */
 /* -- Linux 2.2.8 to 2.5.17 end here -- */
-       &P->rtprio, &P->sched  /* both added to 2.5.18 */
-    );
+		     &P->rtprio, &P->sched	/* both added to 2.5.18 */
+	    );
 }
 
-static void statm2proc(const char* s, proc_t *restrict P) {
-    int num;
-    num = sscanf(s, "%ld %ld %ld %ld %ld %ld %ld",
-	   &P->size, &P->resident, &P->share,
-	   &P->trs, &P->lrs, &P->drs, &P->dt);
+static void statm2proc(const char *s, proc_t * restrict P)
+{
+	int num;
+	num = sscanf(s, "%ld %ld %ld %ld %ld %ld %ld",
+		     &P->size, &P->resident, &P->share,
+		     &P->trs, &P->lrs, &P->drs, &P->dt);
 /*    fprintf(stderr, "statm2proc converted %d fields.\n",num); */
 }
 
-static int file2str(const char *directory, const char *what, char *ret, int cap) {
-    static char filename[80];
-    int fd, num_read;
+static int file2str(const char *directory, const char *what, char *ret, int cap)
+{
+	static char filename[80];
+	int fd, num_read;
 
-    sprintf(filename, "%s/%s", directory, what);
-    fd = open(filename, O_RDONLY, 0);
-    if (unlikely(fd==-1)) return -1;
-    num_read = read(fd, ret, cap - 1);
-    if (unlikely(num_read<=0)) num_read = -1;
-    else ret[num_read] = 0;
-    close(fd);
-    return num_read;
+	sprintf(filename, "%s/%s", directory, what);
+	fd = open(filename, O_RDONLY, 0);
+	if (unlikely(fd == -1))
+		return -1;
+	num_read = read(fd, ret, cap - 1);
+	if (unlikely(num_read <= 0))
+		num_read = -1;
+	else
+		ret[num_read] = 0;
+	close(fd);
+	return num_read;
 }
 
-static char** file2strvec(const char* directory, const char* what) {
-    char buf[2048];	/* read buf bytes at a time */
-    char *p, *rbuf = 0, *endbuf, **q, **ret;
-    int fd, tot = 0, n, c, end_of_file = 0;
-    int align;
+static char **file2strvec(const char *directory, const char *what)
+{
+	char buf[2048];		/* read buf bytes at a time */
+	char *p, *rbuf = 0, *endbuf, **q, **ret;
+	int fd, tot = 0, n, c, end_of_file = 0;
+	int align;
 
-    sprintf(buf, "%s/%s", directory, what);
-    fd = open(buf, O_RDONLY, 0);
-    if (fd==-1) return NULL;
+	sprintf(buf, "%s/%s", directory, what);
+	fd = open(buf, O_RDONLY, 0);
+	if (fd == -1)
+		return NULL;
 
-    /* read whole file into a memory buffer, allocating as we go */
-    while ((n = read(fd, buf, sizeof buf - 1)) > 0) {
-	if (n < (int)(sizeof buf - 1))
-	    end_of_file = 1;
-	if (n == 0 && rbuf == 0)
-	    return NULL;	/* process died between our open and read */
-	if (n < 0) {
-	    if (rbuf)
-		free(rbuf);
-	    return NULL;	/* read error */
+	/* read whole file into a memory buffer, allocating as we go */
+	while ((n = read(fd, buf, sizeof buf - 1)) > 0) {
+		if (n < (int)(sizeof buf - 1))
+			end_of_file = 1;
+		if (n == 0 && rbuf == 0)
+			return NULL;	/* process died between our open and read */
+		if (n < 0) {
+			if (rbuf)
+				free(rbuf);
+			return NULL;	/* read error */
+		}
+		if (end_of_file && buf[n - 1])	/* last read char not null */
+			buf[n++] = '\0';	/* so append null-terminator */
+		rbuf = xrealloc(rbuf, tot + n);	/* allocate more memory */
+		memcpy(rbuf + tot, buf, n);	/* copy buffer into it */
+		tot += n;	/* increment total byte ctr */
+		if (end_of_file)
+			break;
 	}
-	if (end_of_file && buf[n-1])		/* last read char not null */
-	    buf[n++] = '\0';			/* so append null-terminator */
-	rbuf = xrealloc(rbuf, tot + n);		/* allocate more memory */
-	memcpy(rbuf + tot, buf, n);		/* copy buffer into it */
-	tot += n;				/* increment total byte ctr */
-	if (end_of_file)
-	    break;
-    }
-    close(fd);
-    if (n <= 0 && !end_of_file) {
-	if (rbuf) free(rbuf);
-	return NULL;		/* read error */
-    }
-    endbuf = rbuf + tot;			/* count space for pointers */
-    align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1));
-    for (c = 0, p = rbuf; p < endbuf; p++)
-    	if (!*p)
-	    c += sizeof(char*);
-    c += sizeof(char*);				/* one extra for NULL term */
+	close(fd);
+	if (n <= 0 && !end_of_file) {
+		if (rbuf)
+			free(rbuf);
+		return NULL;	/* read error */
+	}
+	endbuf = rbuf + tot;	/* count space for pointers */
+	align =
+	    (sizeof(char *) - 1) -
+	    ((tot + sizeof(char *) - 1) & (sizeof(char *) - 1));
+	for (c = 0, p = rbuf; p < endbuf; p++)
+		if (!*p)
+			c += sizeof(char *);
+	c += sizeof(char *);	/* one extra for NULL term */
 
-    rbuf = xrealloc(rbuf, tot + c + align);	/* make room for ptrs AT END */
-    endbuf = rbuf + tot;			/* addr just past data buf */
-    q = ret = (char**) (endbuf+align);		/* ==> free(*ret) to dealloc */
-    *q++ = p = rbuf;				/* point ptrs to the strings */
-    endbuf--;					/* do not traverse final NUL */
-    while (++p < endbuf)
-    	if (!*p)				/* NUL char implies that */
-	    *q++ = p+1;				/* next string -> next char */
+	rbuf = xrealloc(rbuf, tot + c + align);	/* make room for ptrs AT END */
+	endbuf = rbuf + tot;	/* addr just past data buf */
+	q = ret = (char **)(endbuf + align);	/* ==> free(*ret) to dealloc */
+	*q++ = p = rbuf;	/* point ptrs to the strings */
+	endbuf--;		/* do not traverse final NUL */
+	while (++p < endbuf)
+		if (!*p)	/* NUL char implies that */
+			*q++ = p + 1;	/* next string -> next char */
 
-    *q = 0;					/* null ptr list terminator */
-    return ret;
+	*q = 0;			/* null ptr list terminator */
+	return ret;
 }
 
 // warning: interface may change
-int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid) {
-    char name[32];
-    int fd;
-    unsigned n = 0;
-    dst[0] = '\0';
-    snprintf(name, sizeof name, "/proc/%u/cmdline", pid);
-    fd = open(name, O_RDONLY);
-    if (fd==-1) return 0;
-    for (;;) {
-        ssize_t r = read(fd,dst+n,sz-n);
-        if (r==-1) {
-            if (errno==EINTR) continue;
-            break;
-        }
-        n += r;
-        if (n==sz) break; // filled the buffer
-        if (r==0) break;  // EOF
-    }
-    if (n) {
-        int i;
-        if (n==sz) n--;
-        dst[n] = '\0';
-        i=n;
-        while (i--) {
-          int c = dst[i];
-          if (c<' ' || c>'~') dst[i]=' ';
-        }
-    }
-    return n;
+int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid)
+{
+	char name[32];
+	int fd;
+	unsigned n = 0;
+	dst[0] = '\0';
+	snprintf(name, sizeof name, "/proc/%u/cmdline", pid);
+	fd = open(name, O_RDONLY);
+	if (fd == -1)
+		return 0;
+	for (;;) {
+		ssize_t r = read(fd, dst + n, sz - n);
+		if (r == -1) {
+			if (errno == EINTR)
+				continue;
+			break;
+		}
+		n += r;
+		if (n == sz)
+			break;	// filled the buffer
+		if (r == 0)
+			break;	// EOF
+	}
+	if (n) {
+		int i;
+		if (n == sz)
+			n--;
+		dst[n] = '\0';
+		i = n;
+		while (i--) {
+			int c = dst[i];
+			if (c < ' ' || c > '~')
+				dst[i] = ' ';
+		}
+	}
+	return n;
 }
 
 /* These are some nice GNU C expression subscope "inline" functions.
@@ -337,14 +360,14 @@
  */
 
 /* Test if item X of type T is present in the 0 terminated list L */
-#   define XinL(T, X, L) ( {			\
+#define XinL(T, X, L) ( {			\
 	    T  x = (X), *l = (L);		\
 	    while (*l && *l != x) l++;		\
 	    *l == x;				\
 	} )
 
 /* Test if item X of type T is present in the list L of length N */
-#   define XinLN(T, X, L, N) ( {		\
+#define XinLN(T, X, L, N) ( {		\
 	    T x = (X), *l = (L);		\
 	    int i = 0, n = (N);			\
 	    while (i < n && l[i] != x) i++;	\
@@ -361,105 +384,118 @@
  * the same logic can follow through as for the no-PID list case.  This is
  * fairly complex, but it does try to not to do any unnecessary work.
  */
-proc_t* readproc(PROCTAB* PT, proc_t* p) {
-    static struct direct *ent;		/* dirent handle */
-    static struct stat sb;		/* stat buffer */
-    static char path[32], sbuf[1024];	/* bufs for stat,statm */
+proc_t *readproc(PROCTAB * PT, proc_t * p)
+{
+	static struct direct *ent;	/* dirent handle */
+	static struct stat sb;	/* stat buffer */
+	static char path[32], sbuf[1024];	/* bufs for stat,statm */
 #ifdef FLASK_LINUX
-    security_id_t secsid;
+	security_id_t secsid;
 #endif
-    pid_t pid;  // saved until we have a proc_t allocated for sure
+	pid_t pid;		// saved until we have a proc_t allocated for sure
 
-    /* loop until a proc matching restrictions is found or no more processes */
-    /* I know this could be a while loop -- this way is easier to indent ;-) */
-next_proc:				/* get next PID for consideration */
+	/* loop until a proc matching restrictions is found or no more processes */
+	/* I know this could be a while loop -- this way is easier to indent ;-) */
+next_proc:			/* get next PID for consideration */
 
 /*printf("PT->flags is 0x%08x\n", PT->flags);*/
 #define flags (PT->flags)
 
-    if (flags & PROC_PID) {
-        pid = *(PT->pids)++;
-	if (unlikely(!pid)) return NULL;
-	snprintf(path, sizeof path, "/proc/%d", pid);
-    } else {					/* get next numeric /proc ent */
-	for (;;) {
-	    ent = readdir(PT->procfs);
-	    if (unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return NULL;
-	    if (likely( likely(*ent->d_name > '0') && likely(*ent->d_name <= '9') )) break;
+	if (flags & PROC_PID) {
+		pid = *(PT->pids)++;
+		if (unlikely(!pid))
+			return NULL;
+		snprintf(path, sizeof path, "/proc/%d", pid);
+	} else {		/* get next numeric /proc ent */
+		for (;;) {
+			ent = readdir(PT->procfs);
+			if (unlikely(unlikely(!ent) || unlikely(!ent->d_name)))
+				return NULL;
+			if (likely
+			    (likely(*ent->d_name > '0')
+			     && likely(*ent->d_name <= '9')))
+				break;
+		}
+		pid = strtoul(ent->d_name, NULL, 10);
+		memcpy(path, "/proc/", 6);
+		strcpy(path + 6, ent->d_name);	// trust /proc to not contain evil top-level entries
+//      snprintf(path, sizeof path, "/proc/%s", ent->d_name);
 	}
-	pid = strtoul(ent->d_name, NULL, 10);
-	memcpy(path, "/proc/", 6);
-	strcpy(path+6, ent->d_name);  // trust /proc to not contain evil top-level entries
-//	snprintf(path, sizeof path, "/proc/%s", ent->d_name);
-    }
 #ifdef FLASK_LINUX
-    if (stat_secure(path, &sb, &secsid) == -1 ) /* no such dirent (anymore) */
+	if (stat_secure(path, &sb, &secsid) == -1)	/* no such dirent (anymore) */
 #else
-    if (unlikely(stat(path, &sb) == -1))	/* no such dirent (anymore) */
+	if (unlikely(stat(path, &sb) == -1))	/* no such dirent (anymore) */
 #endif
-	goto next_proc;
+		goto next_proc;
 
-    if ((flags & PROC_UID) && !XinLN(uid_t, sb.st_uid, PT->uids, PT->nuid))
-	goto next_proc;			/* not one of the requested uids */
+	if ((flags & PROC_UID) && !XinLN(uid_t, sb.st_uid, PT->uids, PT->nuid))
+		goto next_proc;	/* not one of the requested uids */
 
-    if (!p)
-	p = xcalloc(p, sizeof *p); /* passed buf or alloced mem */
+	if (!p)
+		p = xcalloc(p, sizeof *p);	/* passed buf or alloced mem */
 
-    p->euid = sb.st_uid;			/* need a way to get real uid */
+	p->euid = sb.st_uid;	/* need a way to get real uid */
 #ifdef FLASK_LINUX
-    p->secsid = secsid;
+	p->secsid = secsid;
 #endif
-    p->pid  = pid;
+	p->pid = pid;
 
-    if (flags & PROC_FILLSTAT) {         /* read, parse /proc/#/stat */
-	if (unlikely( file2str(path, "stat", sbuf, sizeof sbuf) == -1 ))
-	    goto next_proc;			/* error reading /proc/#/stat */
-	stat2proc(sbuf, p);				/* parse /proc/#/stat */
-    }
+	if (flags & PROC_FILLSTAT) {	/* read, parse /proc/#/stat */
+		if (unlikely(file2str(path, "stat", sbuf, sizeof sbuf) == -1))
+			goto next_proc;	/* error reading /proc/#/stat */
+		stat2proc(sbuf, p);	/* parse /proc/#/stat */
+	}
 
-    if (unlikely(flags & PROC_FILLMEM)) {				/* read, parse /proc/#/statm */
-	if (likely( file2str(path, "statm", sbuf, sizeof sbuf) != -1 ))
-	    statm2proc(sbuf, p);		/* ignore statm errors here */
-    }						/* statm fields just zero */
+	if (unlikely(flags & PROC_FILLMEM)) {	/* read, parse /proc/#/statm */
+		if (likely(file2str(path, "statm", sbuf, sizeof sbuf) != -1))
+			statm2proc(sbuf, p);	/* ignore statm errors here */
+	}
+	/* statm fields just zero */
+	if (flags & PROC_FILLSTATUS) {	/* read, parse /proc/#/status */
+		if (likely(file2str(path, "status", sbuf, sizeof sbuf) != -1)) {
+			status2proc(sbuf, p);
+		}
+	}
 
-    if (flags & PROC_FILLSTATUS) {         /* read, parse /proc/#/status */
-       if (likely( file2str(path, "status", sbuf, sizeof sbuf) != -1 )) {
-           status2proc(sbuf, p);
-       }
-    }
+	/* some number->text resolving which is time consuming */
+	if (flags & PROC_FILLUSR) {
+		strncpy(p->euser, user_from_uid(p->euid), sizeof p->euser);
+		if (flags & PROC_FILLSTATUS) {
+			strncpy(p->ruser, user_from_uid(p->ruid),
+				sizeof p->ruser);
+			strncpy(p->suser, user_from_uid(p->suid),
+				sizeof p->suser);
+			strncpy(p->fuser, user_from_uid(p->fuid),
+				sizeof p->fuser);
+		}
+	}
 
-    /* some number->text resolving which is time consuming */
-    if (flags & PROC_FILLUSR) {
-	strncpy(p->euser,   user_from_uid(p->euid), sizeof p->euser);
-        if (flags & PROC_FILLSTATUS) {
-            strncpy(p->ruser,   user_from_uid(p->ruid), sizeof p->ruser);
-            strncpy(p->suser,   user_from_uid(p->suid), sizeof p->suser);
-            strncpy(p->fuser,   user_from_uid(p->fuid), sizeof p->fuser);
-        }
-    }
+	/* some number->text resolving which is time consuming */
+	if (flags & PROC_FILLGRP) {
+		strncpy(p->egroup, group_from_gid(p->egid), sizeof p->egroup);
+		if (flags & PROC_FILLSTATUS) {
+			strncpy(p->rgroup, group_from_gid(p->rgid),
+				sizeof p->rgroup);
+			strncpy(p->sgroup, group_from_gid(p->sgid),
+				sizeof p->sgroup);
+			strncpy(p->fgroup, group_from_gid(p->fgid),
+				sizeof p->fgroup);
+		}
+	}
 
-    /* some number->text resolving which is time consuming */
-    if (flags & PROC_FILLGRP) {
-        strncpy(p->egroup, group_from_gid(p->egid), sizeof p->egroup);
-        if (flags & PROC_FILLSTATUS) {
-            strncpy(p->rgroup, group_from_gid(p->rgid), sizeof p->rgroup);
-            strncpy(p->sgroup, group_from_gid(p->sgid), sizeof p->sgroup);
-            strncpy(p->fgroup, group_from_gid(p->fgid), sizeof p->fgroup);
-        }
-    }
+	if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG))	/* read+parse /proc/#/cmdline */
+		p->cmdline = file2strvec(path, "cmdline");
+	else
+		p->cmdline = NULL;
 
-    if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG))	/* read+parse /proc/#/cmdline */
-	p->cmdline = file2strvec(path, "cmdline");
-    else
-        p->cmdline = NULL;
+	if (unlikely(flags & PROC_FILLENV))	/* read+parse /proc/#/environ */
+		p->environ = file2strvec(path, "environ");
+	else
+		p->environ = NULL;
 
-    if (unlikely(flags & PROC_FILLENV))			/* read+parse /proc/#/environ */
-	p->environ = file2strvec(path, "environ");
-    else
-        p->environ = NULL;
-
-    return p;
+	return p;
 }
+
 #undef flags
 
 /* ps_readproc: return a pointer to a proc_t filled with requested info about the
@@ -472,142 +508,148 @@
  * the same logic can follow through as for the no-PID list case.  This is
  * fairly complex, but it does try to not to do any unnecessary work.
  */
-proc_t* ps_readproc(PROCTAB* PT, proc_t* p) {
-    static struct direct *ent;		/* dirent handle */
-    static struct stat sb;		/* stat buffer */
-    static char path[32], sbuf[1024];	/* bufs for stat,statm */
+proc_t *ps_readproc(PROCTAB * PT, proc_t * p)
+{
+	static struct direct *ent;	/* dirent handle */
+	static struct stat sb;	/* stat buffer */
+	static char path[32], sbuf[1024];	/* bufs for stat,statm */
 #ifdef FLASK_LINUX
-    security_id_t secsid;
+	security_id_t secsid;
 #endif
-    pid_t pid;  // saved until we have a proc_t allocated for sure
+	pid_t pid;		// saved until we have a proc_t allocated for sure
 
-    /* loop until a proc matching restrictions is found or no more processes */
-    /* I know this could be a while loop -- this way is easier to indent ;-) */
-next_proc:				/* get next PID for consideration */
+	/* loop until a proc matching restrictions is found or no more processes */
+	/* I know this could be a while loop -- this way is easier to indent ;-) */
+next_proc:			/* get next PID for consideration */
 
 /*printf("PT->flags is 0x%08x\n", PT->flags);*/
 #define flags (PT->flags)
 
-    for (;;) {
-	ent = readdir(PT->procfs);
-	if (unlikely(unlikely(!ent) || unlikely(!ent->d_name))) return NULL;
-	if (likely( likely(*ent->d_name > '0') && likely(*ent->d_name <= '9') )) break;
-    }
-    pid = strtoul(ent->d_name, NULL, 10);
-    memcpy(path, "/proc/", 6);
-    strcpy(path+6, ent->d_name);  // trust /proc to not contain evil top-level entries
+	for (;;) {
+		ent = readdir(PT->procfs);
+		if (unlikely(unlikely(!ent) || unlikely(!ent->d_name)))
+			return NULL;
+		if (likely
+		    (likely(*ent->d_name > '0') && likely(*ent->d_name <= '9')))
+			break;
+	}
+	pid = strtoul(ent->d_name, NULL, 10);
+	memcpy(path, "/proc/", 6);
+	strcpy(path + 6, ent->d_name);	// trust /proc to not contain evil top-level entries
 //  snprintf(path, sizeof path, "/proc/%s", ent->d_name);
 
 #ifdef FLASK_LINUX
-    if (stat_secure(path, &sb, &secsid) == -1) /* no such dirent (anymore) */
+	if (stat_secure(path, &sb, &secsid) == -1)	/* no such dirent (anymore) */
 #else
-    if (stat(path, &sb) == -1)		/* no such dirent (anymore) */
+	if (stat(path, &sb) == -1)	/* no such dirent (anymore) */
 #endif
-	goto next_proc;
+		goto next_proc;
 
-    if (!p)
-	p = xcalloc(p, sizeof *p); /* passed buf or alloced mem */
+	if (!p)
+		p = xcalloc(p, sizeof *p);	/* passed buf or alloced mem */
 
-    p->euid = sb.st_uid;			/* need a way to get real uid */
+	p->euid = sb.st_uid;	/* need a way to get real uid */
 #ifdef FLASK_LINUX
-    p->secsid = secsid;
+	p->secsid = secsid;
 #endif
-    p->pid  = pid;
+	p->pid = pid;
 
-    if ((file2str(path, "stat", sbuf, sizeof sbuf)) == -1)
-	goto next_proc;			/* error reading /proc/#/stat */
-    stat2proc(sbuf, p);				/* parse /proc/#/stat */
+	if ((file2str(path, "stat", sbuf, sizeof sbuf)) == -1)
+		goto next_proc;	/* error reading /proc/#/stat */
+	stat2proc(sbuf, p);	/* parse /proc/#/stat */
 
-    if (flags & PROC_FILLMEM) {				/* read, parse /proc/#/statm */
-	if ((file2str(path, "statm", sbuf, sizeof sbuf)) != -1)
-	    statm2proc(sbuf, p);		/* ignore statm errors here */
-    }						/* statm fields just zero */
+	if (flags & PROC_FILLMEM) {	/* read, parse /proc/#/statm */
+		if ((file2str(path, "statm", sbuf, sizeof sbuf)) != -1)
+			statm2proc(sbuf, p);	/* ignore statm errors here */
+	}
 
-  /*  if (flags & PROC_FILLSTATUS) { */        /* read, parse /proc/#/status */
-       if ((file2str(path, "status", sbuf, sizeof sbuf)) != -1) {
-           status2proc(sbuf, p);
-       }
+	/* statm fields just zero */
+	/*  if (flags & PROC_FILLSTATUS) { */
+	/* read, parse /proc/#/status */
+	if ((file2str(path, "status", sbuf, sizeof sbuf)) != -1) {
+		status2proc(sbuf, p);
+	}
 /*    }*/
 
-    /* some number->text resolving which is time consuming */
-    if (flags & PROC_FILLUSR) {
-	strncpy(p->euser,   user_from_uid(p->euid), sizeof p->euser);
+	/* some number->text resolving which is time consuming */
+	if (flags & PROC_FILLUSR) {
+		strncpy(p->euser, user_from_uid(p->euid), sizeof p->euser);
 /*        if (flags & PROC_FILLSTATUS) { */
-            strncpy(p->ruser,   user_from_uid(p->ruid), sizeof p->ruser);
-            strncpy(p->suser,   user_from_uid(p->suid), sizeof p->suser);
-            strncpy(p->fuser,   user_from_uid(p->fuid), sizeof p->fuser);
+		strncpy(p->ruser, user_from_uid(p->ruid), sizeof p->ruser);
+		strncpy(p->suser, user_from_uid(p->suid), sizeof p->suser);
+		strncpy(p->fuser, user_from_uid(p->fuid), sizeof p->fuser);
 /*        }*/
-    }
+	}
 
-    /* some number->text resolving which is time consuming */
-    if (flags & PROC_FILLGRP) {
-        strncpy(p->egroup, group_from_gid(p->egid), sizeof p->egroup);
+	/* some number->text resolving which is time consuming */
+	if (flags & PROC_FILLGRP) {
+		strncpy(p->egroup, group_from_gid(p->egid), sizeof p->egroup);
 /*        if (flags & PROC_FILLSTATUS) { */
-            strncpy(p->rgroup, group_from_gid(p->rgid), sizeof p->rgroup);
-            strncpy(p->sgroup, group_from_gid(p->sgid), sizeof p->sgroup);
-            strncpy(p->fgroup, group_from_gid(p->fgid), sizeof p->fgroup);
+		strncpy(p->rgroup, group_from_gid(p->rgid), sizeof p->rgroup);
+		strncpy(p->sgroup, group_from_gid(p->sgid), sizeof p->sgroup);
+		strncpy(p->fgroup, group_from_gid(p->fgid), sizeof p->fgroup);
 /*        }*/
-    }
+	}
 
-    if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG))	/* read+parse /proc/#/cmdline */
-	p->cmdline = file2strvec(path, "cmdline");
-    else
-        p->cmdline = NULL;
+	if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG))	/* read+parse /proc/#/cmdline */
+		p->cmdline = file2strvec(path, "cmdline");
+	else
+		p->cmdline = NULL;
 
-    if (flags & PROC_FILLENV)			/* read+parse /proc/#/environ */
-	p->environ = file2strvec(path, "environ");
-    else
-        p->environ = NULL;
+	if (flags & PROC_FILLENV)	/* read+parse /proc/#/environ */
+		p->environ = file2strvec(path, "environ");
+	else
+		p->environ = NULL;
 
-    return p;
+	return p;
 }
+
 #undef flags
 
-
-void look_up_our_self(proc_t *p) {
-    static char path[32], sbuf[1024];	/* bufs for stat,statm */
-    sprintf(path, "/proc/%d", getpid());
-    file2str(path, "stat", sbuf, sizeof sbuf);
-    stat2proc(sbuf, p);				/* parse /proc/#/stat */
-    file2str(path, "statm", sbuf, sizeof sbuf);
-    statm2proc(sbuf, p);		/* ignore statm errors here */
-    file2str(path, "status", sbuf, sizeof sbuf);
-    status2proc(sbuf, p);
+void look_up_our_self(proc_t * p)
+{
+	static char path[32], sbuf[1024];	/* bufs for stat,statm */
+	sprintf(path, "/proc/%d", getpid());
+	file2str(path, "stat", sbuf, sizeof sbuf);
+	stat2proc(sbuf, p);	/* parse /proc/#/stat */
+	file2str(path, "statm", sbuf, sizeof sbuf);
+	statm2proc(sbuf, p);	/* ignore statm errors here */
+	file2str(path, "status", sbuf, sizeof sbuf);
+	status2proc(sbuf, p);
 }
 
-
 /* Convenient wrapper around openproc and readproc to slurp in the whole process
  * table subset satisfying the constraints of flags and the optional PID list.
  * Free allocated memory with freeproctab().  Access via tab[N]->member.  The
  * pointer list is NULL terminated.
  */
-proc_t** readproctab(int flags, ...) {
-    PROCTAB* PT = NULL;
-    proc_t** tab = NULL;
-    int n = 0;
-    va_list ap;
+proc_t **readproctab(int flags, ...)
+{
+	PROCTAB *PT = NULL;
+	proc_t **tab = NULL;
+	int n = 0;
+	va_list ap;
 
-    va_start(ap, flags);		/* pass through args to openproc */
-    if (flags & PROC_UID) {
-	/* temporary variables to ensure that va_arg() instances
-	 * are called in the right order
-	 */
-	uid_t* u;
-	int i;
+	va_start(ap, flags);	/* pass through args to openproc */
+	if (flags & PROC_UID) {
+		/* temporary variables to ensure that va_arg() instances
+		 * are called in the right order
+		 */
+		uid_t *u;
+		int i;
 
-	u = va_arg(ap, uid_t*);
-	i = va_arg(ap, int);
-	PT = openproc(flags, u, i);
-    }
-    else if (flags & PROC_PID)
-	PT = openproc(flags, va_arg(ap, void*)); /* assume ptr sizes same */
-    else
-	PT = openproc(flags);
-    va_end(ap);
-    do {					/* read table: */
-	tab = xrealloc(tab, (n+1)*sizeof(proc_t*));/* realloc as we go, using */
-	tab[n] = readproc(PT, NULL);		  /* final null to terminate */
-    } while (tab[n++]);				  /* stop when NULL reached */
-    closeproc(PT);
-    return tab;
+		u = va_arg(ap, uid_t *);
+		i = va_arg(ap, int);
+		PT = openproc(flags, u, i);
+	} else if (flags & PROC_PID)
+		PT = openproc(flags, va_arg(ap, void *));	/* assume ptr sizes same */
+	else
+		PT = openproc(flags);
+	va_end(ap);
+	do {			/* read table: */
+		tab = xrealloc(tab, (n + 1) * sizeof(proc_t *));	/* realloc as we go, using */
+		tab[n] = readproc(PT, NULL);	/* final null to terminate */
+	} while (tab[n++]);	/* stop when NULL reached */
+	closeproc(PT);
+	return tab;
 }
diff --git a/tools/top-LTP/proc/sig.c b/tools/top-LTP/proc/sig.c
index 63ae639..1cfad86 100644
--- a/tools/top-LTP/proc/sig.c
+++ b/tools/top-LTP/proc/sig.c
@@ -30,211 +30,244 @@
 
 /* Linux 2.3.29 replaces SIGUNUSED with the standard SIGSYS signal */
 #ifndef SIGSYS
-#  warning Standards require that <signal.h> define SIGSYS
-#  define SIGSYS SIGUNUSED
+#warning Standards require that <signal.h> define SIGSYS
+#define SIGSYS SIGUNUSED
 #endif
 
 /* If we see both, it is likely SIGSTKFLT (junk) was replaced. */
 #ifdef SIGEMT
-#  undef SIGSTKFLT
+#undef SIGSTKFLT
 #endif
 
 #ifndef SIGRTMIN
-#  warning Standards require that <signal.h> define SIGRTMIN; assuming 32
-#  define SIGRTMIN 32
+#warning Standards require that <signal.h> define SIGRTMIN; assuming 32
+#define SIGRTMIN 32
 #endif
 
 /* It seems the SPARC libc does not know the kernel supports SIGPWR. */
 #ifndef SIGPWR
-#  warning Your header files lack SIGPWR. (assuming it is number 29)
-#  define SIGPWR 29
+#warning Your header files lack SIGPWR. (assuming it is number 29)
+#define SIGPWR 29
 #endif
 
 typedef struct mapstruct {
-  const char *name;
-  int num;
+	const char *name;
+	int num;
 } mapstruct;
 
-
 static const mapstruct sigtable[] = {
-  {"ABRT",   SIGABRT},  /* IOT */
-  {"ALRM",   SIGALRM},
-  {"BUS",    SIGBUS},
-  {"CHLD",   SIGCHLD},  /* CLD */
-  {"CONT",   SIGCONT},
+	{"ABRT", SIGABRT},	/* IOT */
+	{"ALRM", SIGALRM},
+	{"BUS", SIGBUS},
+	{"CHLD", SIGCHLD},	/* CLD */
+	{"CONT", SIGCONT},
 #ifdef SIGEMT
-  {"EMT",    SIGEMT},
+	{"EMT", SIGEMT},
 #endif
-  {"FPE",    SIGFPE},
-  {"HUP",    SIGHUP},
-  {"ILL",    SIGILL},
-  {"INT",    SIGINT},
-  {"KILL",   SIGKILL},
-  {"PIPE",   SIGPIPE},
-  {"POLL",   SIGPOLL},  /* IO */
-  {"PROF",   SIGPROF},
-  {"PWR",    SIGPWR},
-  {"QUIT",   SIGQUIT},
-  {"SEGV",   SIGSEGV},
+	{"FPE", SIGFPE},
+	{"HUP", SIGHUP},
+	{"ILL", SIGILL},
+	{"INT", SIGINT},
+	{"KILL", SIGKILL},
+	{"PIPE", SIGPIPE},
+	{"POLL", SIGPOLL},	/* IO */
+	{"PROF", SIGPROF},
+	{"PWR", SIGPWR},
+	{"QUIT", SIGQUIT},
+	{"SEGV", SIGSEGV},
 #ifdef SIGSTKFLT
-  {"STKFLT", SIGSTKFLT},
+	{"STKFLT", SIGSTKFLT},
 #endif
-  {"STOP",   SIGSTOP},
-  {"SYS",    SIGSYS},   /* UNUSED */
-  {"TERM",   SIGTERM},
-  {"TRAP",   SIGTRAP},
-  {"TSTP",   SIGTSTP},
-  {"TTIN",   SIGTTIN},
-  {"TTOU",   SIGTTOU},
-  {"URG",    SIGURG},
-  {"USR1",   SIGUSR1},
-  {"USR2",   SIGUSR2},
-  {"VTALRM", SIGVTALRM},
-  {"WINCH",  SIGWINCH},
-  {"XCPU",   SIGXCPU},
-  {"XFSZ",   SIGXFSZ}
+	{"STOP", SIGSTOP},
+	{"SYS", SIGSYS},	/* UNUSED */
+	{"TERM", SIGTERM},
+	{"TRAP", SIGTRAP},
+	{"TSTP", SIGTSTP},
+	{"TTIN", SIGTTIN},
+	{"TTOU", SIGTTOU},
+	{"URG", SIGURG},
+	{"USR1", SIGUSR1},
+	{"USR2", SIGUSR2},
+	{"VTALRM", SIGVTALRM},
+	{"WINCH", SIGWINCH},
+	{"XCPU", SIGXCPU},
+	{"XFSZ", SIGXFSZ}
 };
 
-static const int number_of_signals = sizeof(sigtable)/sizeof(mapstruct);
+static const int number_of_signals = sizeof(sigtable) / sizeof(mapstruct);
 
-static int compare_signal_names(const void *a, const void *b) {
-  return strcasecmp( ((const mapstruct*)a)->name, ((const mapstruct*)b)->name );
+static int compare_signal_names(const void *a, const void *b)
+{
+	return strcasecmp(((const mapstruct *)a)->name,
+			  ((const mapstruct *)b)->name);
 }
 
 /* return -1 on failure */
-int signal_name_to_number(const char *restrict name) {
-  long val;
-  int offset;
+int signal_name_to_number(const char *restrict name)
+{
+	long val;
+	int offset;
 
-  /* clean up name */
-  if (!strncasecmp(name,"SIG",3)) name += 3;
+	/* clean up name */
+	if (!strncasecmp(name, "SIG", 3))
+		name += 3;
 
-  if (!strcasecmp(name,"CLD")) return SIGCHLD;
-  if (!strcasecmp(name,"IO"))  return SIGPOLL;
-  if (!strcasecmp(name,"IOT")) return SIGABRT;
+	if (!strcasecmp(name, "CLD"))
+		return SIGCHLD;
+	if (!strcasecmp(name, "IO"))
+		return SIGPOLL;
+	if (!strcasecmp(name, "IOT"))
+		return SIGABRT;
 
-  /* search the table */
-  {
-    const mapstruct ms = {name,0};
-    const mapstruct *restrict const ptr = bsearch(
-      &ms,
-      sigtable,
-      number_of_signals,
-      sizeof(mapstruct),
-      compare_signal_names
-    );
-    if (ptr) return ptr->num;
-  }
+	/* search the table */
+	{
+		const mapstruct ms = { name, 0 };
+		const mapstruct *restrict const ptr = bsearch(&ms,
+							      sigtable,
+							      number_of_signals,
+							      sizeof(mapstruct),
+							      compare_signal_names);
+		if (ptr)
+			return ptr->num;
+	}
 
-  if (!strcasecmp(name,"RTMIN")) return SIGRTMIN;
-  if (!strcasecmp(name,"EXIT"))  return 0;
-  if (!strcasecmp(name,"NULL"))  return 0;
+	if (!strcasecmp(name, "RTMIN"))
+		return SIGRTMIN;
+	if (!strcasecmp(name, "EXIT"))
+		return 0;
+	if (!strcasecmp(name, "NULL"))
+		return 0;
 
-  offset = 0;
-  if (!strncasecmp(name,"RTMIN+",6)) {
-    name += 6;
-    offset = SIGRTMIN;
-  }
+	offset = 0;
+	if (!strncasecmp(name, "RTMIN+", 6)) {
+		name += 6;
+		offset = SIGRTMIN;
+	}
 
-  /* not found, so try as a number */
-  {
-    char *endp;
-    val = strtol(name,&endp,10);
-    if (*endp || endp==name) return -1; /* not valid */
-  }
-  if (val+SIGRTMIN>127) return -1; /* not valid */
-  return val+offset;
+	/* not found, so try as a number */
+	{
+		char *endp;
+		val = strtol(name, &endp, 10);
+		if (*endp || endp == name)
+			return -1;	/* not valid */
+	}
+	if (val + SIGRTMIN > 127)
+		return -1;	/* not valid */
+	return val + offset;
 }
 
-static const char *signal_number_to_name(int signo) {
-  static char buf[32];
-  int n = number_of_signals;
-  signo &= 0x7f; /* need to process exit values too */
-  while (n--) {
-    if (sigtable[n].num==signo) return sigtable[n].name;
-  }
-  if (signo == SIGRTMIN) return "RTMIN";
-  if (signo) sprintf(buf, "RTMIN+%d", signo-SIGRTMIN);
-  else      strcpy(buf,"0");  /* AIX has NULL; Solaris has EXIT */
-  return buf;
+static const char *signal_number_to_name(int signo)
+{
+	static char buf[32];
+	int n = number_of_signals;
+	signo &= 0x7f;		/* need to process exit values too */
+	while (n--) {
+		if (sigtable[n].num == signo)
+			return sigtable[n].name;
+	}
+	if (signo == SIGRTMIN)
+		return "RTMIN";
+	if (signo)
+		sprintf(buf, "RTMIN+%d", signo - SIGRTMIN);
+	else
+		strcpy(buf, "0");	/* AIX has NULL; Solaris has EXIT */
+	return buf;
 }
 
-int print_given_signals(int argc, const char *restrict const *restrict argv, int max_line) {
-  char buf[1280]; /* 128 signals, "RTMIN+xx" is largest */
-  int ret = 0;  /* to be used as exit code by caller */
-  int place = 0; /* position on this line */
-  int amt;
-  if (argc > 128) return 1;
-  while (argc--) {
-    char tmpbuf[16];
-    const char *restrict const txt = *argv;
-    if (*txt >= '0' && *txt <= '9') {
-      long val;
-      char *endp;
-      val = strtol(txt,&endp,10);
-      if (*endp) {
-        fprintf(stderr, "Signal \"%s\" not known.\n", txt);
-        ret = 1;
-        goto end;
-      }
-      amt = sprintf(tmpbuf, "%s", signal_number_to_name(val));
-    }else{
-      int sno;
-      sno = signal_name_to_number(txt);
-      if (sno == -1) {
-        fprintf(stderr, "Signal \"%s\" not known.\n", txt);
-        ret = 1;
-        goto end;
-      }
-      amt = sprintf(tmpbuf, "%d", sno);
-    }
+int print_given_signals(int argc, const char *restrict const *restrict argv,
+			int max_line)
+{
+	char buf[1280];		/* 128 signals, "RTMIN+xx" is largest */
+	int ret = 0;		/* to be used as exit code by caller */
+	int place = 0;		/* position on this line */
+	int amt;
+	if (argc > 128)
+		return 1;
+	while (argc--) {
+		char tmpbuf[16];
+		const char *restrict const txt = *argv;
+		if (*txt >= '0' && *txt <= '9') {
+			long val;
+			char *endp;
+			val = strtol(txt, &endp, 10);
+			if (*endp) {
+				fprintf(stderr, "Signal \"%s\" not known.\n",
+					txt);
+				ret = 1;
+				goto end;
+			}
+			amt = sprintf(tmpbuf, "%s", signal_number_to_name(val));
+		} else {
+			int sno;
+			sno = signal_name_to_number(txt);
+			if (sno == -1) {
+				fprintf(stderr, "Signal \"%s\" not known.\n",
+					txt);
+				ret = 1;
+				goto end;
+			}
+			amt = sprintf(tmpbuf, "%d", sno);
+		}
 
-    if (!place) {
-      strcpy(buf,tmpbuf);
-      place = amt;
-      goto end;
-    }
-    if (amt+place+1 > max_line) {
-      printf("%s\n", buf);
-      strcpy(buf,tmpbuf);
-      place = amt;
-      goto end;
-    }
-    sprintf(buf+place, " %s", tmpbuf);
-    place += amt+1;
+		if (!place) {
+			strcpy(buf, tmpbuf);
+			place = amt;
+			goto end;
+		}
+		if (amt + place + 1 > max_line) {
+			printf("%s\n", buf);
+			strcpy(buf, tmpbuf);
+			place = amt;
+			goto end;
+		}
+		sprintf(buf + place, " %s", tmpbuf);
+		place += amt + 1;
 end:
-    argv++;
-  }
-  if (place) printf("%s\n", buf);
-  return ret;
+		argv++;
+	}
+	if (place)
+		printf("%s\n", buf);
+	return ret;
 }
 
-void pretty_print_signals(void) {
-  int i = 0;
-  while (++i <= number_of_signals) {
-    int n;
-    n = printf("%2d %s", i, signal_number_to_name(i));
-    if (i%7) printf("           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + n);
-    else printf("\n");
-  }
-  if ((i-1)%7) printf("\n");
+void pretty_print_signals(void)
+{
+	int i = 0;
+	while (++i <= number_of_signals) {
+		int n;
+		n = printf("%2d %s", i, signal_number_to_name(i));
+		if (i % 7)
+			printf
+			    ("           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+			     + n);
+		else
+			printf("\n");
+	}
+	if ((i - 1) % 7)
+		printf("\n");
 }
 
-void unix_print_signals(void) {
-  int pos = 0;
-  int i = 0;
-  while (++i <= number_of_signals) {
-    if (i-1) printf("%c", (pos>73)?(pos=0,'\n'):(pos++,' ') );
-    pos += printf("%s", signal_number_to_name(i));
-  }
-  printf("\n");
+void unix_print_signals(void)
+{
+	int pos = 0;
+	int i = 0;
+	while (++i <= number_of_signals) {
+		if (i - 1)
+			printf("%c",
+			       (pos > 73) ? (pos = 0, '\n') : (pos++, ' '));
+		pos += printf("%s", signal_number_to_name(i));
+	}
+	printf("\n");
 }
 
 /* sanity check */
-static int init_signal_list(void) __attribute__((constructor));
-static int init_signal_list(void) {
-  if (number_of_signals != 31) {
-    fprintf(stderr, "WARNING: %d signals -- adjust and recompile.\n", number_of_signals);
-  }
-  return 0;
+static int init_signal_list(void) __attribute__ ((constructor));
+static int init_signal_list(void)
+{
+	if (number_of_signals != 31) {
+		fprintf(stderr,
+			"WARNING: %d signals -- adjust and recompile.\n",
+			number_of_signals);
+	}
+	return 0;
 }
diff --git a/tools/top-LTP/proc/status.c b/tools/top-LTP/proc/status.c
index 341d554..e335e8d 100644
--- a/tools/top-LTP/proc/status.c
+++ b/tools/top-LTP/proc/status.c
@@ -9,22 +9,23 @@
 #include "readproc.h"
 #include "status.h"
 
-const char * status(const proc_t *restrict task) {
-    static char buf[4] = "   ";
+const char *status(const proc_t * restrict task)
+{
+	static char buf[4] = "   ";
 
-    buf[0] = task->state;
+	buf[0] = task->state;
 
-    if (task->rss == 0 && task->state != 'Z')
-        buf[1] = 'W';
-    else
-        buf[1] = ' ';
+	if (task->rss == 0 && task->state != 'Z')
+		buf[1] = 'W';
+	else
+		buf[1] = ' ';
 
-    if (task->nice < 0)
-	buf[2] = '<';
-    else if (task->nice > 0)
-	buf[2] = 'N';
-    else
-	buf[2] = ' ';
+	if (task->nice < 0)
+		buf[2] = '<';
+	else if (task->nice > 0)
+		buf[2] = 'N';
+	else
+		buf[2] = ' ';
 
-    return(buf);
+	return (buf);
 }
diff --git a/tools/top-LTP/proc/sysinfo.c b/tools/top-LTP/proc/sysinfo.c
index fbabb71..5f546cd 100644
--- a/tools/top-LTP/proc/sysinfo.c
+++ b/tools/top-LTP/proc/sysinfo.c
@@ -16,13 +16,13 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include "version.h"
-#include "sysinfo.h" /* include self to verify prototypes */
+#include "sysinfo.h"		/* include self to verify prototypes */
 
 #ifndef HZ
-#include <netinet/in.h>  /* htons */
+#include <netinet/in.h>		/* htons */
 #endif
 
-long smp_num_cpus;     /* number of CPUs */
+long smp_num_cpus;		/* number of CPUs */
 
 #define BAD_OPEN_MESSAGE					\
 "Error: /proc must be mounted\n"				\
@@ -66,24 +66,24 @@
 /* evals 'x' twice */
 #define SET_IF_DESIRED(x,y) do{  if (x) *(x) = (y); }while (0)
 
-
 /***********************************************************************/
-int uptime(double *restrict uptime_secs, double *restrict idle_secs) {
-    double up=0, idle=0;
-    char *restrict savelocale;
+int uptime(double *restrict uptime_secs, double *restrict idle_secs)
+{
+	double up = 0, idle = 0;
+	char *restrict savelocale;
 
-    FILE_TO_BUF(UPTIME_FILE,uptime_fd);
-    savelocale = setlocale(LC_NUMERIC, NULL);
-    setlocale(LC_NUMERIC,"C");
-    if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
-        setlocale(LC_NUMERIC,savelocale);
-        fprintf(stderr, "bad data in " UPTIME_FILE "\n");
-	    return 0;
-    }
-    setlocale(LC_NUMERIC,savelocale);
-    SET_IF_DESIRED(uptime_secs, up);
-    SET_IF_DESIRED(idle_secs, idle);
-    return up;	/* assume never be zero seconds in practice */
+	FILE_TO_BUF(UPTIME_FILE, uptime_fd);
+	savelocale = setlocale(LC_NUMERIC, NULL);
+	setlocale(LC_NUMERIC, "C");
+	if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
+		setlocale(LC_NUMERIC, savelocale);
+		fprintf(stderr, "bad data in " UPTIME_FILE "\n");
+		return 0;
+	}
+	setlocale(LC_NUMERIC, savelocale);
+	SET_IF_DESIRED(uptime_secs, up);
+	SET_IF_DESIRED(idle_secs, idle);
+	return up;		/* assume never be zero seconds in practice */
 }
 
 /***********************************************************************
@@ -119,86 +119,128 @@
 
 unsigned long long Hertz;
 
-static void old_Hertz_hack(void) {
-  unsigned long long user_j, nice_j, sys_j, other_j;  /* jiffies (clock ticks) */
-  double up_1, up_2, seconds;
-  unsigned long long jiffies;
-  unsigned h;
-  char *restrict savelocale;
+static void old_Hertz_hack(void)
+{
+	unsigned long long user_j, nice_j, sys_j, other_j;	/* jiffies (clock ticks) */
+	double up_1, up_2, seconds;
+	unsigned long long jiffies;
+	unsigned h;
+	char *restrict savelocale;
 
-  savelocale = setlocale(LC_NUMERIC, NULL);
-  setlocale(LC_NUMERIC, "C");
-  do{
-    FILE_TO_BUF(UPTIME_FILE,uptime_fd);  sscanf(buf, "%lf", &up_1);
-    /* uptime(&up_1, NULL); */
-    FILE_TO_BUF(STAT_FILE,stat_fd);
-    sscanf(buf, "cpu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j, &other_j);
-    FILE_TO_BUF(UPTIME_FILE,uptime_fd);  sscanf(buf, "%lf", &up_2);
-    /* uptime(&up_2, NULL); */
-  } while ((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */
-  setlocale(LC_NUMERIC, savelocale);
-  jiffies = user_j + nice_j + sys_j + other_j;
-  seconds = (up_1 + up_2) / 2;
-  h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
-  /* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */
-  switch(h) {
-  case    9 ...   11 :  Hertz =   10; break; /* S/390 (sometimes) */
-  case   18 ...   22 :  Hertz =   20; break; /* user-mode Linux */
-  case   30 ...   34 :  Hertz =   32; break; /* ia64 emulator */
-  case   48 ...   52 :  Hertz =   50; break;
-  case   58 ...   61 :  Hertz =   60; break;
-  case   62 ...   65 :  Hertz =   64; break; /* StrongARM /Shark */
-  case   95 ...  105 :  Hertz =  100; break; /* normal Linux */
-  case  124 ...  132 :  Hertz =  128; break; /* MIPS, ARM */
-  case  195 ...  204 :  Hertz =  200; break; /* normal << 1 */
-  case  253 ...  260 :  Hertz =  256; break;
-  case  393 ...  408 :  Hertz =  400; break; /* normal << 2 */
-  case  790 ...  808 :  Hertz =  800; break; /* normal << 3 */
-  case  990 ... 1010 :  Hertz = 1000; break; /* ARM */
-  case 1015 ... 1035 :  Hertz = 1024; break; /* Alpha, ia64 */
-  case 1180 ... 1220 :  Hertz = 1200; break; /* Alpha */
-  default:
+	savelocale = setlocale(LC_NUMERIC, NULL);
+	setlocale(LC_NUMERIC, "C");
+	do {
+		FILE_TO_BUF(UPTIME_FILE, uptime_fd);
+		sscanf(buf, "%lf", &up_1);
+		/* uptime(&up_1, NULL); */
+		FILE_TO_BUF(STAT_FILE, stat_fd);
+		sscanf(buf, "cpu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j,
+		       &other_j);
+		FILE_TO_BUF(UPTIME_FILE, uptime_fd);
+		sscanf(buf, "%lf", &up_2);
+		/* uptime(&up_2, NULL); */
+	} while ((long long)((up_2 - up_1) * 1000.0 / up_1));	/* want under 0.1% error */
+	setlocale(LC_NUMERIC, savelocale);
+	jiffies = user_j + nice_j + sys_j + other_j;
+	seconds = (up_1 + up_2) / 2;
+	h = (unsigned)((double)jiffies / seconds / smp_num_cpus);
+	/* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */
+	switch (h) {
+	case 9 ... 11:
+		Hertz = 10;
+		break;		/* S/390 (sometimes) */
+	case 18 ... 22:
+		Hertz = 20;
+		break;		/* user-mode Linux */
+	case 30 ... 34:
+		Hertz = 32;
+		break;		/* ia64 emulator */
+	case 48 ... 52:
+		Hertz = 50;
+		break;
+	case 58 ... 61:
+		Hertz = 60;
+		break;
+	case 62 ... 65:
+		Hertz = 64;
+		break;		/* StrongARM /Shark */
+	case 95 ... 105:
+		Hertz = 100;
+		break;		/* normal Linux */
+	case 124 ... 132:
+		Hertz = 128;
+		break;		/* MIPS, ARM */
+	case 195 ... 204:
+		Hertz = 200;
+		break;		/* normal << 1 */
+	case 253 ... 260:
+		Hertz = 256;
+		break;
+	case 393 ... 408:
+		Hertz = 400;
+		break;		/* normal << 2 */
+	case 790 ... 808:
+		Hertz = 800;
+		break;		/* normal << 3 */
+	case 990 ... 1010:
+		Hertz = 1000;
+		break;		/* ARM */
+	case 1015 ... 1035:
+		Hertz = 1024;
+		break;		/* Alpha, ia64 */
+	case 1180 ... 1220:
+		Hertz = 1200;
+		break;		/* Alpha */
+	default:
 #ifdef HZ
-    Hertz = (unsigned long long)HZ;    /* <asm/param.h> */
+		Hertz = (unsigned long long)HZ;	/* <asm/param.h> */
 #else
-    /* If 32-bit or big-endian (not Alpha or ia64), assume HZ is 100. */
-    Hertz = (sizeof(long)==sizeof(int) || htons(999)==999) ? 100UL : 1024UL;
+		/* If 32-bit or big-endian (not Alpha or ia64), assume HZ is 100. */
+		Hertz = (sizeof(long) == sizeof(int)
+			 || htons(999) == 999) ? 100UL : 1024UL;
 #endif
-    fprintf(stderr, "Unknown HZ value! (%d) Assume %Ld.\n", h, Hertz);
-  }
+		fprintf(stderr, "Unknown HZ value! (%d) Assume %Ld.\n", h,
+			Hertz);
+	}
 }
 
 #ifndef AT_CLKTCK
-#define AT_CLKTCK       17    /* frequency of times() */
+#define AT_CLKTCK       17	/* frequency of times() */
 #endif
 
-extern char** environ;
+extern char **environ;
 
 /* for ELF executables, notes are pushed before environment and args */
-static unsigned long find_elf_note(unsigned long findme) {
-  unsigned long *ep = (unsigned long *)environ;
-  while (*ep++);
-  while (*ep) {
-    if (ep[0]==findme) return ep[1];
-    ep+=2;
-  }
-  return 42;
+static unsigned long find_elf_note(unsigned long findme)
+{
+	unsigned long *ep = (unsigned long *)environ;
+	while (*ep++) ;
+	while (*ep) {
+		if (ep[0] == findme)
+			return ep[1];
+		ep += 2;
+	}
+	return 42;
 }
 
-static void init_libproc(void) __attribute__((constructor));
-static void init_libproc(void) {
-  /* ought to count CPUs in /proc/stat instead of relying
-   * on glibc, which foolishly tries to parse /proc/cpuinfo
-   */
-  smp_num_cpus = sysconf(_SC_NPROCESSORS_CONF); // or _SC_NPROCESSORS_ONLN
-  if (smp_num_cpus<1) smp_num_cpus=1; /* SPARC glibc is buggy */
+static void init_libproc(void) __attribute__ ((constructor));
+static void init_libproc(void)
+{
+	/* ought to count CPUs in /proc/stat instead of relying
+	 * on glibc, which foolishly tries to parse /proc/cpuinfo
+	 */
+	smp_num_cpus = sysconf(_SC_NPROCESSORS_CONF);	// or _SC_NPROCESSORS_ONLN
+	if (smp_num_cpus < 1)
+		smp_num_cpus = 1;	/* SPARC glibc is buggy */
 
-  if (linux_version_code > LINUX_VERSION(2, 4, 0)) {
-    Hertz = find_elf_note(AT_CLKTCK);
-    if (Hertz!=42) return;
-    fprintf(stderr, "2.4 kernel w/o ELF notes? -- report to albert@users.sf.net\n");
-  }
-  old_Hertz_hack();
+	if (linux_version_code > LINUX_VERSION(2, 4, 0)) {
+		Hertz = find_elf_note(AT_CLKTCK);
+		if (Hertz != 42)
+			return;
+		fprintf(stderr,
+			"2.4 kernel w/o ELF notes? -- report to albert@users.sf.net\n");
+	}
+	old_Hertz_hack();
 }
 
 /***********************************************************************
@@ -211,62 +253,70 @@
 #define NAN (-0.0)
 #endif
 #define JT unsigned long long
-void five_cpu_numbers(double *restrict uret, double *restrict nret, double *restrict sret, double *restrict iret, double *restrict wret) {
-    double tmp_u, tmp_n, tmp_s, tmp_i, tmp_w;
-    double scale;  /* scale values to % */
-    static JT old_u, old_n, old_s, old_i, old_w;
-    JT new_u, new_n, new_s, new_i, new_w;
-    JT ticks_past; /* avoid div-by-0 by not calling too often :-( */
+void five_cpu_numbers(double *restrict uret, double *restrict nret,
+		      double *restrict sret, double *restrict iret,
+		      double *restrict wret)
+{
+	double tmp_u, tmp_n, tmp_s, tmp_i, tmp_w;
+	double scale;		/* scale values to % */
+	static JT old_u, old_n, old_s, old_i, old_w;
+	JT new_u, new_n, new_s, new_i, new_w;
+	JT ticks_past;		/* avoid div-by-0 by not calling too often :-( */
 
-    tmp_w = 0.0;
-    new_w = 0;
+	tmp_w = 0.0;
+	new_w = 0;
 
-    FILE_TO_BUF(STAT_FILE,stat_fd);
-    sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu", &new_u, &new_n, &new_s, &new_i, &new_w);
-    ticks_past = (new_u+new_n+new_s+new_i+new_w)-(old_u+old_n+old_s+old_i+old_w);
-    if (ticks_past) {
-      scale = 100.0 / (double)ticks_past;
-      tmp_u = ( (double)new_u - (double)old_u ) * scale;
-      tmp_n = ( (double)new_n - (double)old_n ) * scale;
-      tmp_s = ( (double)new_s - (double)old_s ) * scale;
-      tmp_i = ( (double)new_i - (double)old_i ) * scale;
-      tmp_w = ( (double)new_w - (double)old_w ) * scale;
-    }else{
-      tmp_u = NAN;
-      tmp_n = NAN;
-      tmp_s = NAN;
-      tmp_i = NAN;
-      tmp_w = NAN;
-    }
-    SET_IF_DESIRED(uret, tmp_u);
-    SET_IF_DESIRED(nret, tmp_n);
-    SET_IF_DESIRED(sret, tmp_s);
-    SET_IF_DESIRED(iret, tmp_i);
-    SET_IF_DESIRED(wret, tmp_w);
-    old_u=new_u;
-    old_n=new_n;
-    old_s=new_s;
-    old_i=new_i;
-    old_w=new_w;
+	FILE_TO_BUF(STAT_FILE, stat_fd);
+	sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu", &new_u, &new_n, &new_s, &new_i,
+	       &new_w);
+	ticks_past =
+	    (new_u + new_n + new_s + new_i + new_w) - (old_u + old_n + old_s +
+						       old_i + old_w);
+	if (ticks_past) {
+		scale = 100.0 / (double)ticks_past;
+		tmp_u = ((double)new_u - (double)old_u) * scale;
+		tmp_n = ((double)new_n - (double)old_n) * scale;
+		tmp_s = ((double)new_s - (double)old_s) * scale;
+		tmp_i = ((double)new_i - (double)old_i) * scale;
+		tmp_w = ((double)new_w - (double)old_w) * scale;
+	} else {
+		tmp_u = NAN;
+		tmp_n = NAN;
+		tmp_s = NAN;
+		tmp_i = NAN;
+		tmp_w = NAN;
+	}
+	SET_IF_DESIRED(uret, tmp_u);
+	SET_IF_DESIRED(nret, tmp_n);
+	SET_IF_DESIRED(sret, tmp_s);
+	SET_IF_DESIRED(iret, tmp_i);
+	SET_IF_DESIRED(wret, tmp_w);
+	old_u = new_u;
+	old_n = new_n;
+	old_s = new_s;
+	old_i = new_i;
+	old_w = new_w;
 }
+
 #undef JT
 
 /***********************************************************************/
-void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) {
-    double avg_1=0, avg_5=0, avg_15=0;
-    char *restrict savelocale;
+void loadavg(double *restrict av1, double *restrict av5, double *restrict av15)
+{
+	double avg_1 = 0, avg_5 = 0, avg_15 = 0;
+	char *restrict savelocale;
 
-    FILE_TO_BUF(LOADAVG_FILE,loadavg_fd);
-    savelocale = setlocale(LC_NUMERIC, NULL);
-    setlocale(LC_NUMERIC, "C");
-    if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
-	fprintf(stderr, "bad data in " LOADAVG_FILE "\n");
-	exit(1);
-    }
-    setlocale(LC_NUMERIC, savelocale);
-    SET_IF_DESIRED(av1,  avg_1);
-    SET_IF_DESIRED(av5,  avg_5);
-    SET_IF_DESIRED(av15, avg_15);
+	FILE_TO_BUF(LOADAVG_FILE, loadavg_fd);
+	savelocale = setlocale(LC_NUMERIC, NULL);
+	setlocale(LC_NUMERIC, "C");
+	if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
+		fprintf(stderr, "bad data in " LOADAVG_FILE "\n");
+		exit(1);
+	}
+	setlocale(LC_NUMERIC, savelocale);
+	SET_IF_DESIRED(av1, avg_1);
+	SET_IF_DESIRED(av5, avg_5);
+	SET_IF_DESIRED(av15, avg_15);
 }
 
 /***********************************************************************/
@@ -282,12 +332,14 @@
  */
 
 typedef struct mem_table_struct {
-  const char *name;     /* memory type name */
-  unsigned *slot; /* slot in return struct */
+	const char *name;	/* memory type name */
+	unsigned *slot;		/* slot in return struct */
 } mem_table_struct;
 
-static int compare_mem_table_structs(const void *a, const void *b) {
-  return strcmp(((const mem_table_struct*)a)->name,((const mem_table_struct*)b)->name);
+static int compare_mem_table_structs(const void *a, const void *b)
+{
+	return strcmp(((const mem_table_struct *)a)->name,
+		      ((const mem_table_struct *)b)->name);
 }
 
 /* example data, following junk, with comments added:
@@ -338,7 +390,7 @@
 unsigned kb_inact_dirty;
 unsigned kb_inact_clean;
 unsigned kb_inact_target;
-unsigned kb_swap_cached;  /* late 2.4 only */
+unsigned kb_swap_cached;	/* late 2.4 only */
 /* derived values */
 unsigned kb_swap_used;
 unsigned kb_main_used;
@@ -352,75 +404,81 @@
 unsigned kb_mapped;
 unsigned kb_pagetables;
 
-void meminfo(void) {
-  char namebuf[16]; /* big enough to hold any row name */
-  mem_table_struct findme = { namebuf, NULL};
-  mem_table_struct *found;
-  char *head;
-  char *tail;
-  static const mem_table_struct mem_table[] = {
-  {"Active",       &kb_active},
-  {"Buffers",      &kb_main_buffers},
-  {"Cached",       &kb_main_cached},
-  {"Committed_AS", &kb_committed_as},
-  {"Dirty",        &kb_dirty},
-  {"HighFree",     &kb_high_free},
-  {"HighTotal",    &kb_high_total},
-  {"Inact_clean",  &kb_inact_clean},
-  {"Inact_dirty",  &kb_inact_dirty},
-  {"Inact_laundry",&kb_inact_laundry},
-  {"Inact_target", &kb_inact_target},
-  {"Inactive",     &kb_inactive},
-  {"LowFree",      &kb_low_free},
-  {"LowTotal",     &kb_low_total},
-  {"Mapped",       &kb_mapped},
-  {"MemFree",      &kb_main_free},
-  {"MemShared",    &kb_main_shared},
-  {"MemTotal",     &kb_main_total},
-  {"PageTables",   &kb_pagetables},
-  {"ReverseMaps",  &nr_reversemaps},
-  {"Slab",         &kb_slab},
-  {"SwapCached",   &kb_swap_cached},
-  {"SwapFree",     &kb_swap_free},
-  {"SwapTotal",    &kb_swap_total},
-  {"Writeback",    &kb_writeback}
-  };
-  const int mem_table_count = sizeof(mem_table)/sizeof(mem_table_struct);
+void meminfo(void)
+{
+	char namebuf[16];	/* big enough to hold any row name */
+	mem_table_struct findme = { namebuf, NULL };
+	mem_table_struct *found;
+	char *head;
+	char *tail;
+	static const mem_table_struct mem_table[] = {
+		{"Active", &kb_active},
+		{"Buffers", &kb_main_buffers},
+		{"Cached", &kb_main_cached},
+		{"Committed_AS", &kb_committed_as},
+		{"Dirty", &kb_dirty},
+		{"HighFree", &kb_high_free},
+		{"HighTotal", &kb_high_total},
+		{"Inact_clean", &kb_inact_clean},
+		{"Inact_dirty", &kb_inact_dirty},
+		{"Inact_laundry", &kb_inact_laundry},
+		{"Inact_target", &kb_inact_target},
+		{"Inactive", &kb_inactive},
+		{"LowFree", &kb_low_free},
+		{"LowTotal", &kb_low_total},
+		{"Mapped", &kb_mapped},
+		{"MemFree", &kb_main_free},
+		{"MemShared", &kb_main_shared},
+		{"MemTotal", &kb_main_total},
+		{"PageTables", &kb_pagetables},
+		{"ReverseMaps", &nr_reversemaps},
+		{"Slab", &kb_slab},
+		{"SwapCached", &kb_swap_cached},
+		{"SwapFree", &kb_swap_free},
+		{"SwapTotal", &kb_swap_total},
+		{"Writeback", &kb_writeback}
+	};
+	const int mem_table_count =
+	    sizeof(mem_table) / sizeof(mem_table_struct);
 
-  FILE_TO_BUF(MEMINFO_FILE,meminfo_fd);
+	FILE_TO_BUF(MEMINFO_FILE, meminfo_fd);
 
-  kb_inactive = ~0U;
+	kb_inactive = ~0U;
 
-  head = buf;
-  for (;;) {
-    tail = strchr(head, ':');
-    if (!tail) break;
-    *tail = '\0';
-    if (strlen(head) >= sizeof(namebuf)) {
-      head = tail+1;
-      goto nextline;
-    }
-    strcpy(namebuf,head);
-    found = bsearch(&findme, mem_table, mem_table_count,
-        sizeof(mem_table_struct), compare_mem_table_structs
-    );
-    head = tail+1;
-    if (!found) goto nextline;
-    *(found->slot) = strtoul(head,&tail,10);
+	head = buf;
+	for (;;) {
+		tail = strchr(head, ':');
+		if (!tail)
+			break;
+		*tail = '\0';
+		if (strlen(head) >= sizeof(namebuf)) {
+			head = tail + 1;
+			goto nextline;
+		}
+		strcpy(namebuf, head);
+		found = bsearch(&findme, mem_table, mem_table_count,
+				sizeof(mem_table_struct),
+				compare_mem_table_structs);
+		head = tail + 1;
+		if (!found)
+			goto nextline;
+		*(found->slot) = strtoul(head, &tail, 10);
 nextline:
-    tail = strchr(head, '\n');
-    if (!tail) break;
-    head = tail+1;
-  }
-  if (!kb_low_total) {  /* low==main except with large-memory support */
-    kb_low_total = kb_main_total;
-    kb_low_free  = kb_main_free;
-  }
-  if (kb_inactive==~0U) {
-    kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
-  }
-  kb_swap_used = kb_swap_total - kb_swap_free;
-  kb_main_used = kb_main_total - kb_main_free;
+		tail = strchr(head, '\n');
+		if (!tail)
+			break;
+		head = tail + 1;
+	}
+	if (!kb_low_total) {	/* low==main except with large-memory support */
+		kb_low_total = kb_main_total;
+		kb_low_free = kb_main_free;
+	}
+	if (kb_inactive == ~0U) {
+		kb_inactive =
+		    kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
+	}
+	kb_swap_used = kb_swap_total - kb_swap_free;
+	kb_main_used = kb_main_total - kb_main_free;
 }
 
 /*****************************************************************/
@@ -428,100 +486,107 @@
 /* read /proc/vminfo only for 2.5.41 and above */
 
 typedef struct vm_table_struct {
-  const char *name;     /* VM statistic name */
-  unsigned *slot;       /* slot in return struct */
+	const char *name;	/* VM statistic name */
+	unsigned *slot;		/* slot in return struct */
 } vm_table_struct;
 
-static int compare_vm_table_structs(const void *a, const void *b) {
-  return strcmp(((const vm_table_struct*)a)->name,((const vm_table_struct*)b)->name);
+static int compare_vm_table_structs(const void *a, const void *b)
+{
+	return strcmp(((const vm_table_struct *)a)->name,
+		      ((const vm_table_struct *)b)->name);
 }
 
-unsigned vm_nr_dirty;           // dirty writable pages
-unsigned vm_nr_writeback;       // pages under writeback
-unsigned vm_nr_pagecache;       // pages in pagecache
-unsigned vm_nr_page_table_pages;// pages used for pagetables
-unsigned vm_nr_reverse_maps;    // includes PageDirect
-unsigned vm_nr_mapped;          // mapped into pagetables
-unsigned vm_nr_slab;            // in slab
-unsigned vm_pgpgin;             // disk reads  (same as 1st num on /proc/stat page line)
-unsigned vm_pgpgout;            // disk writes (same as 2nd num on /proc/stat page line)
-unsigned vm_pswpin;             // swap reads  (same as 1st num on /proc/stat swap line)
-unsigned vm_pswpout;            // swap writes (same as 2nd num on /proc/stat swap line)
-unsigned vm_pgalloc;            // page allocations
-unsigned vm_pgfree;             // page freeings
-unsigned vm_pgactivate;         // pages moved inactive -> active
-unsigned vm_pgdeactivate;       // pages moved active -> inactive
-unsigned vm_pgfault;           // total faults (major+minor)
-unsigned vm_pgmajfault;       // major faults
-unsigned vm_pgscan;          // pages scanned by page reclaim
-unsigned vm_pgrefill;       // inspected by refill_inactive_zone
-unsigned vm_pgsteal;       // total pages reclaimed
-unsigned vm_kswapd_steal; // pages reclaimed by kswapd
+unsigned vm_nr_dirty;		// dirty writable pages
+unsigned vm_nr_writeback;	// pages under writeback
+unsigned vm_nr_pagecache;	// pages in pagecache
+unsigned vm_nr_page_table_pages;	// pages used for pagetables
+unsigned vm_nr_reverse_maps;	// includes PageDirect
+unsigned vm_nr_mapped;		// mapped into pagetables
+unsigned vm_nr_slab;		// in slab
+unsigned vm_pgpgin;		// disk reads  (same as 1st num on /proc/stat page line)
+unsigned vm_pgpgout;		// disk writes (same as 2nd num on /proc/stat page line)
+unsigned vm_pswpin;		// swap reads  (same as 1st num on /proc/stat swap line)
+unsigned vm_pswpout;		// swap writes (same as 2nd num on /proc/stat swap line)
+unsigned vm_pgalloc;		// page allocations
+unsigned vm_pgfree;		// page freeings
+unsigned vm_pgactivate;		// pages moved inactive -> active
+unsigned vm_pgdeactivate;	// pages moved active -> inactive
+unsigned vm_pgfault;		// total faults (major+minor)
+unsigned vm_pgmajfault;		// major faults
+unsigned vm_pgscan;		// pages scanned by page reclaim
+unsigned vm_pgrefill;		// inspected by refill_inactive_zone
+unsigned vm_pgsteal;		// total pages reclaimed
+unsigned vm_kswapd_steal;	// pages reclaimed by kswapd
 // next 3 as defined by the 2.5.52 kernel
-unsigned vm_pageoutrun;  // times kswapd ran page reclaim
-unsigned vm_allocstall; // times a page allocator ran direct reclaim
-unsigned vm_pgrotated; // pages rotated to the tail of the LRU for immediate reclaim
+unsigned vm_pageoutrun;		// times kswapd ran page reclaim
+unsigned vm_allocstall;		// times a page allocator ran direct reclaim
+unsigned vm_pgrotated;		// pages rotated to the tail of the LRU for immediate reclaim
 
-void vminfo(void) {
-  char namebuf[16]; /* big enough to hold any row name */
-  vm_table_struct findme = { namebuf, NULL};
-  vm_table_struct *found;
-  char *head;
-  char *tail;
-  static const vm_table_struct vm_table[] = {
-  {"allocstall",          &vm_allocstall},
-  {"kswapd_steal",        &vm_kswapd_steal},
-  {"nr_dirty",            &vm_nr_dirty},
-  {"nr_mapped",           &vm_nr_mapped},
-  {"nr_page_table_pages", &vm_nr_page_table_pages},
-  {"nr_pagecache",        &vm_nr_pagecache},
-  {"nr_reverse_maps",     &vm_nr_reverse_maps},
-  {"nr_slab",             &vm_nr_slab},
-  {"nr_writeback",        &vm_nr_writeback},
-  {"pageoutrun",          &vm_pageoutrun},
-  {"pgactivate",          &vm_pgactivate},
-  {"pgalloc",             &vm_pgalloc},
-  {"pgdeactivate",        &vm_pgdeactivate},
-  {"pgfault",             &vm_pgfault},
-  {"pgfree",              &vm_pgfree},
-  {"pgmajfault",          &vm_pgmajfault},
-  {"pgpgin",              &vm_pgpgin},
-  {"pgpgout",             &vm_pgpgout},
-  {"pgrefill",            &vm_pgrefill},
-  {"pgrotated",           &vm_pgrotated},
-  {"pgscan",              &vm_pgscan},
-  {"pgsteal",             &vm_pgsteal},
-  {"pswpin",              &vm_pswpin},
-  {"pswpout",             &vm_pswpout}
-  };
-  const int vm_table_count = sizeof(vm_table)/sizeof(vm_table_struct);
+void vminfo(void)
+{
+	char namebuf[16];	/* big enough to hold any row name */
+	vm_table_struct findme = { namebuf, NULL };
+	vm_table_struct *found;
+	char *head;
+	char *tail;
+	static const vm_table_struct vm_table[] = {
+		{"allocstall", &vm_allocstall},
+		{"kswapd_steal", &vm_kswapd_steal},
+		{"nr_dirty", &vm_nr_dirty},
+		{"nr_mapped", &vm_nr_mapped},
+		{"nr_page_table_pages", &vm_nr_page_table_pages},
+		{"nr_pagecache", &vm_nr_pagecache},
+		{"nr_reverse_maps", &vm_nr_reverse_maps},
+		{"nr_slab", &vm_nr_slab},
+		{"nr_writeback", &vm_nr_writeback},
+		{"pageoutrun", &vm_pageoutrun},
+		{"pgactivate", &vm_pgactivate},
+		{"pgalloc", &vm_pgalloc},
+		{"pgdeactivate", &vm_pgdeactivate},
+		{"pgfault", &vm_pgfault},
+		{"pgfree", &vm_pgfree},
+		{"pgmajfault", &vm_pgmajfault},
+		{"pgpgin", &vm_pgpgin},
+		{"pgpgout", &vm_pgpgout},
+		{"pgrefill", &vm_pgrefill},
+		{"pgrotated", &vm_pgrotated},
+		{"pgscan", &vm_pgscan},
+		{"pgsteal", &vm_pgsteal},
+		{"pswpin", &vm_pswpin},
+		{"pswpout", &vm_pswpout}
+	};
+	const int vm_table_count = sizeof(vm_table) / sizeof(vm_table_struct);
 
-  FILE_TO_BUF(VMINFO_FILE,vminfo_fd);
+	FILE_TO_BUF(VMINFO_FILE, vminfo_fd);
 
-  head = buf;
-  for (;;) {
-    tail = strchr(head, ' ');
-    if (!tail) break;
-    *tail = '\0';
-    if (strlen(head) >= sizeof(namebuf)) {
-      head = tail+1;
-      goto nextline;
-    }
-    strcpy(namebuf,head);
-    found = bsearch(&findme, vm_table, vm_table_count,
-        sizeof(vm_table_struct), compare_vm_table_structs
-    );
-    head = tail+1;
-    if (!found) goto nextline;
-    *(found->slot) = strtoul(head,&tail,10);
+	head = buf;
+	for (;;) {
+		tail = strchr(head, ' ');
+		if (!tail)
+			break;
+		*tail = '\0';
+		if (strlen(head) >= sizeof(namebuf)) {
+			head = tail + 1;
+			goto nextline;
+		}
+		strcpy(namebuf, head);
+		found = bsearch(&findme, vm_table, vm_table_count,
+				sizeof(vm_table_struct),
+				compare_vm_table_structs);
+		head = tail + 1;
+		if (!found)
+			goto nextline;
+		*(found->slot) = strtoul(head, &tail, 10);
 nextline:
 
 //if (found) fprintf(stderr,"%s=%d\n",found->name,*(found->slot));
 //else      fprintf(stderr,"%s not found\n",findme.name);
 
-    tail = strchr(head, '\n');
-    if (!tail) break;
-    head = tail+1;
-  }
+		tail = strchr(head, '\n');
+		if (!tail)
+			break;
+		head = tail + 1;
+	}
 }
+
 /*****************************************************************/
diff --git a/tools/top-LTP/proc/version.c b/tools/top-LTP/proc/version.c
index fed34e8..756d3f4 100644
--- a/tools/top-LTP/proc/version.c
+++ b/tools/top-LTP/proc/version.c
@@ -15,13 +15,15 @@
 #include "version.h"
 
 #ifdef MINORVERSION
-const char procps_version[] = "procps version " VERSION "." SUBVERSION "." MINORVERSION;
+const char procps_version[] =
+    "procps version " VERSION "." SUBVERSION "." MINORVERSION;
 #else
 const char procps_version[] = "procps version " VERSION "." SUBVERSION;
 #endif
 
-void display_version(void) {
-    fprintf(stdout, "%s\n", procps_version);
+void display_version(void)
+{
+	fprintf(stdout, "%s\n", procps_version);
 }
 
 /* Linux kernel version information for procps utilities
@@ -33,18 +35,20 @@
 
 int linux_version_code = 0;
 
-static void init_Linux_version(void) __attribute__((constructor));
-static void init_Linux_version(void) {
-    static struct utsname uts;
-    int x = 0, y = 0, z = 0;	/* cleared in case sscanf() < 3 */
+static void init_Linux_version(void) __attribute__ ((constructor));
+static void init_Linux_version(void)
+{
+	static struct utsname uts;
+	int x = 0, y = 0, z = 0;	/* cleared in case sscanf() < 3 */
 
-    if (linux_version_code) return;
-    if (uname(&uts) == -1)	/* failure implies impending death */
-	exit(1);
-    if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
-	fprintf(stderr,		/* *very* unlikely to happen by accident */
-		"Non-standard uts for running kernel:\n"
-		"release %s=%d.%d.%d gives version code %d\n",
-		uts.release, x, y, z, LINUX_VERSION(x,y,z));
-    linux_version_code = LINUX_VERSION(x, y, z);
+	if (linux_version_code)
+		return;
+	if (uname(&uts) == -1)	/* failure implies impending death */
+		exit(1);
+	if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
+		fprintf(stderr,	/* *very* unlikely to happen by accident */
+			"Non-standard uts for running kernel:\n"
+			"release %s=%d.%d.%d gives version code %d\n",
+			uts.release, x, y, z, LINUX_VERSION(x, y, z));
+	linux_version_code = LINUX_VERSION(x, y, z);
 }
diff --git a/tools/top-LTP/proc/whattime.c b/tools/top-LTP/proc/whattime.c
index 4ab5525..0a3b6c3 100644
--- a/tools/top-LTP/proc/whattime.c
+++ b/tools/top-LTP/proc/whattime.c
@@ -27,62 +27,67 @@
 static char buf[128];
 static double av[3];
 
-char *sprint_uptime(void) {
-  struct utmp *utmpstruct;
-  int upminutes, uphours, updays;
-  int pos;
-  struct tm *realtime;
-  time_t realseconds;
-  int numuser;
-  double uptime_secs, idle_secs;
+char *sprint_uptime(void)
+{
+	struct utmp *utmpstruct;
+	int upminutes, uphours, updays;
+	int pos;
+	struct tm *realtime;
+	time_t realseconds;
+	int numuser;
+	double uptime_secs, idle_secs;
 
 /* first get the current time */
 
-  time(&realseconds);
-  realtime = localtime(&realseconds);
-  pos = sprintf(buf, " %02d:%02d:%02d ",
-    realtime->tm_hour, realtime->tm_min, realtime->tm_sec);
+	time(&realseconds);
+	realtime = localtime(&realseconds);
+	pos = sprintf(buf, " %02d:%02d:%02d ",
+		      realtime->tm_hour, realtime->tm_min, realtime->tm_sec);
 
 /* read and calculate the amount of uptime */
 
-  uptime(&uptime_secs, &idle_secs);
+	uptime(&uptime_secs, &idle_secs);
 
-  updays = (int) uptime_secs / (60*60*24);
-  strcat (buf, "up ");
-  pos += 3;
-  if (updays)
-    pos += sprintf(buf + pos, "%d day%s, ", updays, (updays != 1) ? "s" : "");
-  upminutes = (int) uptime_secs / 60;
-  uphours = upminutes / 60;
-  uphours = uphours % 24;
-  upminutes = upminutes % 60;
-  if (uphours)
-    pos += sprintf(buf + pos, "%2d:%02d, ", uphours, upminutes);
-  else
-    pos += sprintf(buf + pos, "%d min, ", upminutes);
+	updays = (int)uptime_secs / (60 * 60 * 24);
+	strcat(buf, "up ");
+	pos += 3;
+	if (updays)
+		pos +=
+		    sprintf(buf + pos, "%d day%s, ", updays,
+			    (updays != 1) ? "s" : "");
+	upminutes = (int)uptime_secs / 60;
+	uphours = upminutes / 60;
+	uphours = uphours % 24;
+	upminutes = upminutes % 60;
+	if (uphours)
+		pos += sprintf(buf + pos, "%2d:%02d, ", uphours, upminutes);
+	else
+		pos += sprintf(buf + pos, "%d min, ", upminutes);
 
 /* count the number of users */
 
-  numuser = 0;
-  setutent();
-  while ((utmpstruct = getutent())) {
-    if ((utmpstruct->ut_type == USER_PROCESS) &&
-       (utmpstruct->ut_name[0] != '\0'))
-      numuser++;
-  }
-  endutent();
+	numuser = 0;
+	setutent();
+	while ((utmpstruct = getutent())) {
+		if ((utmpstruct->ut_type == USER_PROCESS) &&
+		    (utmpstruct->ut_name[0] != '\0'))
+			numuser++;
+	}
+	endutent();
 
-  pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s");
+	pos +=
+	    sprintf(buf + pos, "%2d user%s, ", numuser,
+		    numuser == 1 ? "" : "s");
 
-  loadavg(&av[0], &av[1], &av[2]);
+	loadavg(&av[0], &av[1], &av[2]);
 
-  pos += sprintf(buf + pos, " load average: %.2f, %.2f, %.2f",
-		 av[0], av[1], av[2]);
+	pos += sprintf(buf + pos, " load average: %.2f, %.2f, %.2f",
+		       av[0], av[1], av[2]);
 
-  return buf;
+	return buf;
 }
 
 void print_uptime(void)
 {
-  printf("%s\n", sprint_uptime());
+	printf("%s\n", sprint_uptime());
 }
diff --git a/tools/top-LTP/top.c b/tools/top-LTP/top.c
index 9172f93..5cf00c8 100644
--- a/tools/top-LTP/top.c
+++ b/tools/top-LTP/top.c
@@ -55,687 +55,669 @@
 #include "top.h"
 
 /*######  Miscellaneous global stuff  ####################################*/
-	/* Used for recording data to and reading data from a file.*/
-static FILE* outfile;
-static FILE* datafile;
+	/* Used for recording data to and reading data from a file. */
+static FILE *outfile;
+static FILE *datafile;
 static int o_flag;
-        /* The original and new terminal attributes */
-static struct termios Savedtty,
-                      Rawtty;
+	/* The original and new terminal attributes */
+static struct termios Savedtty, Rawtty;
 static int Ttychanged = 0;
 
-        /* Program name used in error messages and local 'rc' file name */
+	/* Program name used in error messages and local 'rc' file name */
 static char *Myname;
 
-        /* Name of user config file (dynamically constructed) and our
-           'Current' rcfile contents, initialized with defaults but may be
-           overridden with the local rcfile (old or new-style) values */
-static char  Rc_name [OURPATHSZ];
+	/* Name of user config file (dynamically constructed) and our
+	   'Current' rcfile contents, initialized with defaults but may be
+	   overridden with the local rcfile (old or new-style) values */
+static char Rc_name[OURPATHSZ];
 static RCF_t Rc = DEF_RCFILE;
 
-        /* The run-time acquired page size */
+	/* The run-time acquired page size */
 static int Page_size;
 
-        /* SMP, Irix/Solaris mode, Linux 2.5.xx support */
-static int  Cpu_tot,
-           *Cpu_map;
-        /* assume no IO-wait stats, overridden if linux 2.5.41 */
+	/* SMP, Irix/Solaris mode, Linux 2.5.xx support */
+static int Cpu_tot, *Cpu_map;
+	/* assume no IO-wait stats, overridden if linux 2.5.41 */
 static const char *States_fmts = STATES_line2x4;
 
-        /* Specific process id monitoring support */
-static pid_t Monpids [MONPIDMAX] = { 0 };
-static int   Monpidsidx = 0;
+	/* Specific process id monitoring support */
+static pid_t Monpids[MONPIDMAX] = { 0 };
 
-        /* A postponed error message */
-static char Msg_delayed [SMLBUFSIZ];
-static int  Msg_awaiting = 0;
+static int Monpidsidx = 0;
 
-        /* Configurable Display support ##################################*/
+	/* A postponed error message */
+static char Msg_delayed[SMLBUFSIZ];
+static int Msg_awaiting = 0;
 
-        /* Current screen dimensions.
-           note: the number of processes displayed is tracked on a per window
-                 basis (see the WIN_t).  Max_lines is the total number of
-                 screen rows after deducting summary information overhead. */
-        /* Current terminal screen size. */
+	/* Configurable Display support ################################## */
+
+	/* Current screen dimensions.
+	   note: the number of processes displayed is tracked on a per window
+	   basis (see the WIN_t).  Max_lines is the total number of
+	   screen rows after deducting summary information overhead. */
+	/* Current terminal screen size. */
 static int Screen_cols, Screen_rows, Max_lines;
 
-        /* This is really the number of lines needed to display the summary
-           information (0 - nn), but is used as the relative row where we
-           stick the cursor between frames. */
+	/* This is really the number of lines needed to display the summary
+	   information (0 - nn), but is used as the relative row where we
+	   stick the cursor between frames. */
 static int Msg_row;
 
-        /* Global/Non-windows mode stuff that is NOT persistent */
-static int No_ksyms = -1,       // set to '0' if ksym avail, '1' otherwise
-           PSDBopen = 0,        // set to '1' if psdb opened (now postponed)
-           Batch = 0,           // batch mode, collect no input, dumb output
-           Loops = -1,          // number of iterations, -1 loops forever
-           Secure_mode = 0;     // set if some functionality restricted
+	/* Global/Non-windows mode stuff that is NOT persistent */
+static int No_ksyms = -1,	// set to '0' if ksym avail, '1' otherwise
+    PSDBopen = 0,		// set to '1' if psdb opened (now postponed)
+    Batch = 0,			// batch mode, collect no input, dumb output
+    Loops = -1,			// number of iterations, -1 loops forever
+    Secure_mode = 0;		// set if some functionality restricted
 
-        /* Some cap's stuff to reduce runtime calls --
-           to accomodate 'Batch' mode, they begin life as empty strings */
-static char  Cap_clr_eol    [CAPBUFSIZ] = "",
-             Cap_clr_eos    [CAPBUFSIZ] = "",
-             Cap_clr_scr    [CAPBUFSIZ] = "",
-             Cap_curs_norm  [CAPBUFSIZ] = "",
-             Cap_curs_huge  [CAPBUFSIZ] = "",
-             Cap_home       [CAPBUFSIZ] = "",
-             Cap_norm       [CAPBUFSIZ] = "",
-             Cap_reverse    [CAPBUFSIZ] = "",
-             Caps_off       [CAPBUFSIZ] = "";
-static int   Cap_can_goto = 0;
+	/* Some cap's stuff to reduce runtime calls --
+	   to accomodate 'Batch' mode, they begin life as empty strings */
+static char Cap_clr_eol[CAPBUFSIZ] = "",
+    Cap_clr_eos[CAPBUFSIZ] = "",
+    Cap_clr_scr[CAPBUFSIZ] = "",
+    Cap_curs_norm[CAPBUFSIZ] = "",
+    Cap_curs_huge[CAPBUFSIZ] = "",
+    Cap_home[CAPBUFSIZ] = "",
+    Cap_norm[CAPBUFSIZ] = "",
+    Cap_reverse[CAPBUFSIZ] = "", Caps_off[CAPBUFSIZ] = "";
+static int Cap_can_goto = 0;
 
-        /* Some optimization stuff, to reduce output demands...
-           The Pseudo_ guys are managed by wins_resize and frame_make.  They
-           are exploited in a macro and represent 90% of our optimization.
-           The Stdout_buf is transparent to our code and regardless of whose
-           buffer is used, stdout is flushed at frame end or if interactive. */
+	/* Some optimization stuff, to reduce output demands...
+	   The Pseudo_ guys are managed by wins_resize and frame_make.  They
+	   are exploited in a macro and represent 90% of our optimization.
+	   The Stdout_buf is transparent to our code and regardless of whose
+	   buffer is used, stdout is flushed at frame end or if interactive. */
 static char *Pseudo_scrn;
-static int   Pseudo_row, Pseudo_cols, Pseudo_size;
+static int Pseudo_row, Pseudo_cols, Pseudo_size;
 #ifndef STDOUT_IOLBF
-        // less than stdout's normal buffer but with luck mostly '\n' anyway
-static char  Stdout_buf[2048];
+	// less than stdout's normal buffer but with luck mostly '\n' anyway
+static char Stdout_buf[2048];
 #endif
 
+	/* ////////////////////////////////////////////////////////////// */
+	/* Special Section: multiple windows/field groups  --------------- */
 
-        /* ////////////////////////////////////////////////////////////// */
-        /* Special Section: multiple windows/field groups  ---------------*/
+	/* The pointers to our four WIN_t's, and which of those is considered
+	   the 'current' window (ie. which window is associated with any summ
+	   info displayed and to which window commands are directed) */
+static WIN_t Winstk[GROUPSMAX], *Curwin;
 
-        /* The pointers to our four WIN_t's, and which of those is considered
-           the 'current' window (ie. which window is associated with any summ
-           info displayed and to which window commands are directed) */
-static WIN_t Winstk [GROUPSMAX],
-             *Curwin;
-
-        /* Frame oriented stuff that can't remain local to any 1 function
-           and/or that would be too cumbersome managed as parms,
-           and/or that are simply more efficiently handled as globals
-           (first 2 persist beyond a single frame, changed infrequently) */
-static int       Frames_libflags;       // PROC_FILLxxx flags (0 = need new)
+	/* Frame oriented stuff that can't remain local to any 1 function
+	   and/or that would be too cumbersome managed as parms,
+	   and/or that are simply more efficiently handled as globals
+	   (first 2 persist beyond a single frame, changed infrequently) */
+static int Frames_libflags;	// PROC_FILLxxx flags (0 = need new)
 //atic int       Frames_maxcmdln;       // the largest from the 4 windows
-static unsigned  Frame_maxtask;         // last known number of active tasks
-                                        // ie. current 'size' of proc table
-static unsigned  Frame_running,         // state categories for this frame
-                 Frame_sleepin,
-                 Frame_stopped,
-                 Frame_zombied;
-static float     Frame_tscale;          // so we can '*' vs. '/' WHEN 'pcpu'
-static int       Frame_srtflg,          // the subject window's sort direction
-                 Frame_ctimes,          // the subject window's ctimes flag
-                 Frame_cmdlin;          // the subject window's cmdlin flag
-        /* ////////////////////////////////////////////////////////////// */
-
+static unsigned Frame_maxtask;	// last known number of active tasks
+					// ie. current 'size' of proc table
+static unsigned Frame_running,	// state categories for this frame
+ Frame_sleepin, Frame_stopped, Frame_zombied;
+static float Frame_tscale;	// so we can '*' vs. '/' WHEN 'pcpu'
+static int Frame_srtflg,	// the subject window's sort direction
+ Frame_ctimes,			// the subject window's ctimes flag
+ Frame_cmdlin;			// the subject window's cmdlin flag
+	/* ////////////////////////////////////////////////////////////// */
 
 /*######  Sort callbacks  ################################################*/
 
-        /*
-         * These happen to be coded in the same order as the enum 'pflag'
-         * values.  Note that 2 of these routines serve double duty --
-         * 2 columns each.
-         */
+	/*
+	 * These happen to be coded in the same order as the enum 'pflag'
+	 * values.  Note that 2 of these routines serve double duty --
+	 * 2 columns each.
+	 */
 
 SCB_NUMx(P_PID, pid)
-SCB_NUMx(P_PPD, ppid)
-SCB_STRx(P_URR, ruser)
-SCB_NUMx(P_UID, euid)
-SCB_STRx(P_URE, euser)
-SCB_STRx(P_GRP, egroup)
-SCB_NUMx(P_TTY, tty)
-SCB_NUMx(P_PRI, priority)
-SCB_NUMx(P_NCE, nice)
-SCB_NUMx(P_CPN, processor)
-SCB_NUM1(P_CPU, pcpu)
-                                        // also serves P_TM2 !
-static int sort_P_TME (const proc_t **P, const proc_t **Q)
+    SCB_NUMx(P_PPD, ppid)
+    SCB_STRx(P_URR, ruser)
+    SCB_NUMx(P_UID, euid)
+    SCB_STRx(P_URE, euser)
+    SCB_STRx(P_GRP, egroup)
+    SCB_NUMx(P_TTY, tty)
+    SCB_NUMx(P_PRI, priority)
+    SCB_NUMx(P_NCE, nice)
+    SCB_NUMx(P_CPN, processor)
+    SCB_NUM1(P_CPU, pcpu)
+    // also serves P_TM2 !
+static int sort_P_TME(const proc_t ** P, const proc_t ** Q)
 {
-   if (Frame_ctimes) {
-      if (((*P)->cutime + (*P)->cstime + (*P)->utime + (*P)->stime)
-        < ((*Q)->cutime + (*Q)->cstime + (*Q)->utime + (*Q)->stime) )
-           return SORT_lt;
-      if (((*P)->cutime + (*P)->cstime + (*P)->utime + (*P)->stime)
-        > ((*Q)->cutime + (*Q)->cstime + (*Q)->utime + (*Q)->stime) )
-           return SORT_gt;
-   } else {
-      if (((*P)->utime + (*P)->stime) < ((*Q)->utime + (*Q)->stime))
-         return SORT_lt;
-      if (((*P)->utime + (*P)->stime) > ((*Q)->utime + (*Q)->stime))
-         return SORT_gt;
-   }
-   return SORT_eq;
+	if (Frame_ctimes) {
+		if (((*P)->cutime + (*P)->cstime + (*P)->utime + (*P)->stime)
+		    < ((*Q)->cutime + (*Q)->cstime + (*Q)->utime + (*Q)->stime))
+			return SORT_lt;
+		if (((*P)->cutime + (*P)->cstime + (*P)->utime + (*P)->stime)
+		    > ((*Q)->cutime + (*Q)->cstime + (*Q)->utime + (*Q)->stime))
+			return SORT_gt;
+	} else {
+		if (((*P)->utime + (*P)->stime) < ((*Q)->utime + (*Q)->stime))
+			return SORT_lt;
+		if (((*P)->utime + (*P)->stime) > ((*Q)->utime + (*Q)->stime))
+			return SORT_gt;
+	}
+	return SORT_eq;
 }
 
 SCB_NUM1(P_VRT, size)
-SCB_NUM2(P_SWP, size, resident)
-SCB_NUM1(P_RES, resident)               // also serves P_MEM !
-SCB_NUM1(P_COD, trs)
-SCB_NUM1(P_DAT, drs)
-SCB_NUM1(P_SHR, share)
-SCB_NUM1(P_FLT, maj_flt)
-SCB_NUM1(P_DRT, dt)
-SCB_NUMx(P_STA, state)
+    SCB_NUM2(P_SWP, size, resident)
+    SCB_NUM1(P_RES, resident)	// also serves P_MEM !
+    SCB_NUM1(P_COD, trs)
+    SCB_NUM1(P_DAT, drs)
+    SCB_NUM1(P_SHR, share)
+    SCB_NUM1(P_FLT, maj_flt)
+    SCB_NUM1(P_DRT, dt)
+    SCB_NUMx(P_STA, state)
 
-static int sort_P_CMD (const proc_t **P, const proc_t **Q)
+static int sort_P_CMD(const proc_t ** P, const proc_t ** Q)
 {
-   /* if a process doesn't have a cmdline, we'll consider it a kernel thread
-      -- since displayed tasks are given special treatment, we must too */
-   if (Frame_cmdlin && ((*P)->cmdline || (*Q)->cmdline)) {
-      if (!(*Q)->cmdline) return Frame_srtflg * -1;
-      if (!(*P)->cmdline) return Frame_srtflg;
-      return Frame_srtflg *
-         strncmp((*Q)->cmdline[0], (*P)->cmdline[0], (unsigned)Curwin->maxcmdln);
-   }
-   // this part also handles the compare if both are kernel threads
-   return Frame_srtflg * strcmp((*Q)->cmd, (*P)->cmd);
+	/* if a process doesn't have a cmdline, we'll consider it a kernel thread
+	   -- since displayed tasks are given special treatment, we must too */
+	if (Frame_cmdlin && ((*P)->cmdline || (*Q)->cmdline)) {
+		if (!(*Q)->cmdline)
+			return Frame_srtflg * -1;
+		if (!(*P)->cmdline)
+			return Frame_srtflg;
+		return Frame_srtflg *
+		    strncmp((*Q)->cmdline[0], (*P)->cmdline[0],
+			    (unsigned)Curwin->maxcmdln);
+	}
+	// this part also handles the compare if both are kernel threads
+	return Frame_srtflg * strcmp((*Q)->cmd, (*P)->cmd);
 }
 
 SCB_NUM1(P_WCH, wchan)
-SCB_NUM1(P_FLG, flags)
+    SCB_NUM1(P_FLG, flags)
 
-        /* ///////////////////////////////// special sort for prochlp() ! */
-static int sort_HST_t (const HST_t *P, const HST_t *Q)
+    /* ///////////////////////////////// special sort for prochlp() ! */
+static int sort_HST_t(const HST_t * P, const HST_t * Q)
 {
-   return P->pid - Q->pid;
+	return P->pid - Q->pid;
 }
 
-
 /*######  Tiny useful routine(s)  ########################################*/
 
-        /*
-         * This routine isolates ALL user INPUT and ensures that we
-         * wont be mixing I/O from stdio and low-level read() requests */
-static int chin (int ech, char *buf, unsigned cnt)
+	/*
+	 * This routine isolates ALL user INPUT and ensures that we
+	 * wont be mixing I/O from stdio and low-level read() requests */
+static int chin(int ech, char *buf, unsigned cnt)
 {
-   int rc;
+	int rc;
 
-   fflush(stdout);
-   if (!ech)
-      rc = read(STDIN_FILENO, buf, cnt);
-   else {
-      tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
-      rc = read(STDIN_FILENO, buf, cnt);
-      tcsetattr(STDIN_FILENO, TCSAFLUSH, &Rawtty);
-   }
-      /* may be the beginning of a lengthy escape sequence  */
-   tcflush(STDIN_FILENO, TCIFLUSH);
-   return rc;                   /* note: we do NOT produce a vaid 'string' */
+	fflush(stdout);
+	if (!ech)
+		rc = read(STDIN_FILENO, buf, cnt);
+	else {
+		tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
+		rc = read(STDIN_FILENO, buf, cnt);
+		tcsetattr(STDIN_FILENO, TCSAFLUSH, &Rawtty);
+	}
+	/* may be the beginning of a lengthy escape sequence  */
+	tcflush(STDIN_FILENO, TCIFLUSH);
+	return rc;		/* note: we do NOT produce a vaid 'string' */
 }
 
-
-        /*
-         * This routine simply formats whatever the caller wants and
-         * returns a pointer to the resulting 'const char' string... */
-static const char *fmtmk (const char *fmts, ...)
+	/*
+	 * This routine simply formats whatever the caller wants and
+	 * returns a pointer to the resulting 'const char' string... */
+static const char *fmtmk(const char *fmts, ...)
 {
-   static char buf[BIGBUFSIZ];          /* with help stuff, our buffer */
-   va_list va;                          /* requirements exceed 1k */
+	static char buf[BIGBUFSIZ];	/* with help stuff, our buffer */
+	va_list va;		/* requirements exceed 1k */
 
-   va_start(va, fmts);
-   vsnprintf(buf, sizeof(buf), fmts, va);
-   va_end(va);
-   return (const char *)buf;
+	va_start(va, fmts);
+	vsnprintf(buf, sizeof(buf), fmts, va);
+	va_end(va);
+	return (const char *)buf;
 }
 
-
-        /*
-         * This guy is just our way of avoiding the overhead of the standard
-         * strcat function (should the caller choose to participate) */
-static inline char *scat (char *restrict dst, const char *restrict src)
+	/*
+	 * This guy is just our way of avoiding the overhead of the standard
+	 * strcat function (should the caller choose to participate) */
+static inline char *scat(char *restrict dst, const char *restrict src)
 {
-   while (*dst) dst++;
-   while ((*(dst++) = *(src++)));
-   return --dst;
+	while (*dst)
+		dst++;
+	while ((*(dst++) = *(src++))) ;
+	return --dst;
 }
 
-
 // Trim the rc file lines and any 'open_psdb_message' result which arrives
 // with an inappropriate newline (thanks to 'sysmap_mmap')
-static char *strim_0 (char *str)
+static char *strim_0(char *str)
 {
-   static const char ws[] = "\b\e\f\n\r\t\v\x9b";  // 0x9b is an escape
-   char *p;
+	static const char ws[] = "\b\e\f\n\r\t\v\x9b";	// 0x9b is an escape
+	char *p;
 
-   if ((p = strpbrk(str, ws))) *p = 0;
-   return str;
+	if ((p = strpbrk(str, ws)))
+		*p = 0;
+	return str;
 }
 
-
-        /*
-         * This guy just facilitates Batch and protects against dumb ttys
-         * -- we'd 'inline' him but he's only called twice per frame,
-         * yet used in many other locations. */
-static const char *tg2 (int x, int y)
+	/*
+	 * This guy just facilitates Batch and protects against dumb ttys
+	 * -- we'd 'inline' him but he's only called twice per frame,
+	 * yet used in many other locations. */
+static const char *tg2(int x, int y)
 {
-   return Cap_can_goto ? tgoto(cursor_address, x, y) : "";
+	return Cap_can_goto ? tgoto(cursor_address, x, y) : "";
 }
 
-
 /*######  Exit/Interrput routines  #######################################*/
 
-        /*
-         * The usual program end --
-         * called only by functions in this section. */
-static void bye_bye (int eno, const char *str) NORETURN;
-static void bye_bye (int eno, const char *str)
+	/*
+	 * The usual program end --
+	 * called only by functions in this section. */
+static void bye_bye(int eno, const char *str) NORETURN;
+static void bye_bye(int eno, const char *str)
 {
-   if (!Batch)
-      tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
-   putp(tg2(0, Screen_rows));
-   putp(Cap_curs_norm);
-   putp("\n");
-   fflush(stdout);
+	if (!Batch)
+		tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
+	putp(tg2(0, Screen_rows));
+	putp(Cap_curs_norm);
+	putp("\n");
+	fflush(stdout);
 
 #ifdef ATEOJ_REPORT
-   fprintf(stderr,
-      "\nbye_bye's Summary report:"
-      "\n\tProgram"
-      "\n\t   Linux version = %u.%u.%u, %s"
-      "\n\t   Hertz = %u (%u bytes, %u-bit time)"
-      "\n\t   Page_size = %d, Cpu_tot = %d, sizeof(proc_t) = %u"
-      "\n\t   sizeof(CPU_t) = %u, sizeof(HST_t) = %u (%u HST_t's/Page)"
-      "\n\t   Crufty?  %s"
-      "\n\tTerminal: %s"
-      "\n\t   device = %s, ncurses = v%s"
-      "\n\t   max_colors = %d, max_pairs = %d"
-      "\n\t   Cap_can_goto = %s"
-      "\n\t   Screen_cols = %d, Screen_rows = %d"
-      "\n\t   Max_lines = %d, most recent Pseudo_size = %d"
+	fprintf(stderr,
+		"\nbye_bye's Summary report:"
+		"\n\tProgram"
+		"\n\t   Linux version = %u.%u.%u, %s"
+		"\n\t   Hertz = %u (%u bytes, %u-bit time)"
+		"\n\t   Page_size = %d, Cpu_tot = %d, sizeof(proc_t) = %u"
+		"\n\t   sizeof(CPU_t) = %u, sizeof(HST_t) = %u (%u HST_t's/Page)"
+		"\n\t   Crufty?  %s"
+		"\n\tTerminal: %s"
+		"\n\t   device = %s, ncurses = v%s"
+		"\n\t   max_colors = %d, max_pairs = %d"
+		"\n\t   Cap_can_goto = %s"
+		"\n\t   Screen_cols = %d, Screen_rows = %d"
+		"\n\t   Max_lines = %d, most recent Pseudo_size = %d"
 #ifndef STDOUT_IOLBF
-      "\n\t   Stdout_buf = %d, BUFSIZ = %u"
+		"\n\t   Stdout_buf = %d, BUFSIZ = %u"
 #endif
-      "\n\tWindows and Curwin->"
-      "\n\t   sizeof(WIN_t) = %u, GROUPSMAX = %d"
-      "\n\t   rc.winname = %s, grpname = %s"
+		"\n\tWindows and Curwin->"
+		"\n\t   sizeof(WIN_t) = %u, GROUPSMAX = %d"
+		"\n\t   rc.winname = %s, grpname = %s"
 #ifdef CASEUP_HEXES
-      "\n\t   rc.winflags = %08X, maxpflgs = %d"
+		"\n\t   rc.winflags = %08X, maxpflgs = %d"
 #else
-      "\n\t   rc.winflags = %08x, maxpflgs = %d"
+		"\n\t   rc.winflags = %08x, maxpflgs = %d"
 #endif
-      "\n\t   rc.fieldscur = %s"
-      "\n\t   winlines  = %d, rc.maxtasks = %d, maxcmdln = %d"
-      "\n\t   rc.sortindx  = %d"
-      "\n"
-      , LINUX_VERSION_MAJOR(linux_version_code)
-      , LINUX_VERSION_MINOR(linux_version_code)
-      , LINUX_VERSION_PATCH(linux_version_code)
-      , procps_version
-      , (unsigned)Hertz, sizeof(Hertz), sizeof(Hertz) * 8
-      , Page_size, Cpu_tot, sizeof(proc_t)
-      , sizeof(CPU_t), sizeof(HST_t), Page_size / sizeof(HST_t)
+		"\n\t   rc.fieldscur = %s"
+		"\n\t   winlines  = %d, rc.maxtasks = %d, maxcmdln = %d"
+		"\n\t   rc.sortindx  = %d"
+		"\n", LINUX_VERSION_MAJOR(linux_version_code)
+		, LINUX_VERSION_MINOR(linux_version_code)
+		, LINUX_VERSION_PATCH(linux_version_code)
+		, procps_version, (unsigned)Hertz, sizeof(Hertz),
+		sizeof(Hertz) * 8, Page_size, Cpu_tot, sizeof(proc_t)
+		, sizeof(CPU_t), sizeof(HST_t), Page_size / sizeof(HST_t)
 #ifdef PRETENDNOCAP
-      , "dumb"
+		, "dumb"
 #else
-      , termname()
+		, termname()
 #endif
-      , ttyname(STDOUT_FILENO), NCURSES_VERSION
-      , max_colors, max_pairs
-      , Cap_can_goto ? "yes" : "No!"
-      , Screen_cols, Screen_rows
-      , Max_lines, Pseudo_size
+		, ttyname(STDOUT_FILENO), NCURSES_VERSION, max_colors,
+		max_pairs, Cap_can_goto ? "yes" : "No!", Screen_cols,
+		Screen_rows, Max_lines, Pseudo_size
 #ifndef STDOUT_IOLBF
-      , sizeof(Stdout_buf), (unsigned)BUFSIZ
+		, sizeof(Stdout_buf), (unsigned)BUFSIZ
 #endif
-      , sizeof(WIN_t), GROUPSMAX
-      , Curwin->rc.winname, Curwin->grpname
-      , Curwin->rc.winflags, Curwin->maxpflgs
-      , Curwin->rc.fieldscur
-      , Curwin->winlines, Curwin->rc.maxtasks, Curwin->maxcmdln
-      , Curwin->rc.sortindx
-      );
+		, sizeof(WIN_t), GROUPSMAX, Curwin->rc.winname, Curwin->grpname,
+		Curwin->rc.winflags, Curwin->maxpflgs, Curwin->rc.fieldscur,
+		Curwin->winlines, Curwin->rc.maxtasks, Curwin->maxcmdln,
+		Curwin->rc.sortindx);
 #endif
 
-   if (str) {
-      if (eno) perror(str);
-      else {
-         fputs(str, stderr);
-         eno = 1;
-      }
-   }
-   exit(eno);
+	if (str) {
+		if (eno)
+			perror(str);
+		else {
+			fputs(str, stderr);
+			eno = 1;
+		}
+	}
+	exit(eno);
 }
 
-
-        /*
-         * Normal end of execution.
-         * catches:
-         *    SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT and SIGTERM */
-static void end_pgm (int dont_care_sig) NORETURN;
-static void end_pgm (int dont_care_sig)
+	/*
+	 * Normal end of execution.
+	 * catches:
+	 *    SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT and SIGTERM */
+static void end_pgm(int dont_care_sig) NORETURN;
+static void end_pgm(int dont_care_sig)
 {
-   (void)dont_care_sig;
-   bye_bye(0, NULL);
+	(void)dont_care_sig;
+	bye_bye(0, NULL);
 }
 
-
-        /*
-         * Standard error handler to normalize the look of all err o/p */
-static void std_err (const char *str) NORETURN;
-static void std_err (const char *str)
+	/*
+	 * Standard error handler to normalize the look of all err o/p */
+static void std_err(const char *str) NORETURN;
+static void std_err(const char *str)
 {
-   static char buf[SMLBUFSIZ];
+	static char buf[SMLBUFSIZ];
 
-   fflush(stdout);
-   /* we'll use our own buffer so callers can still use fmtmk() and, yes the
-      leading tab is not the standard convention, but the standard is wrong
-      -- OUR msg won't get lost in screen clutter, like so many others! */
-   snprintf(buf, sizeof(buf), "\t%s: %s\n", Myname, str);
-   if (!Ttychanged) {
-      fprintf(stderr, "%s\n", buf);
-      exit(1);
-   }
-      /* not to worry, he'll change our exit code to 1 due to 'buf' */
-   bye_bye(0, buf);
+	fflush(stdout);
+	/* we'll use our own buffer so callers can still use fmtmk() and, yes the
+	   leading tab is not the standard convention, but the standard is wrong
+	   -- OUR msg won't get lost in screen clutter, like so many others! */
+	snprintf(buf, sizeof(buf), "\t%s: %s\n", Myname, str);
+	if (!Ttychanged) {
+		fprintf(stderr, "%s\n", buf);
+		exit(1);
+	}
+	/* not to worry, he'll change our exit code to 1 due to 'buf' */
+	bye_bye(0, buf);
 }
 
-
-        /*
-         * Suspend ourself.
-         * catches:
-         *    SIGTSTP, SIGTTIN and SIGTTOU */
-static void suspend (int dont_care_sig)
+	/*
+	 * Suspend ourself.
+	 * catches:
+	 *    SIGTSTP, SIGTTIN and SIGTTOU */
+static void suspend(int dont_care_sig)
 {
-  (void)dont_care_sig;
-      /* reset terminal */
-   tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
-   putp(tg2(0, Screen_rows));
-   putp(Cap_curs_norm);
-   fflush(stdout);
-   raise(SIGSTOP);
-      /* later, after SIGCONT... */
-   if (!Batch)
-      tcsetattr(STDIN_FILENO, TCSAFLUSH, &Rawtty);
+	(void)dont_care_sig;
+	/* reset terminal */
+	tcsetattr(STDIN_FILENO, TCSAFLUSH, &Savedtty);
+	putp(tg2(0, Screen_rows));
+	putp(Cap_curs_norm);
+	fflush(stdout);
+	raise(SIGSTOP);
+	/* later, after SIGCONT... */
+	if (!Batch)
+		tcsetattr(STDIN_FILENO, TCSAFLUSH, &Rawtty);
 }
 
-
 /*######  Misc Color/Display support  ####################################*/
 
-        /*
-         * Make the appropriate caps/color strings and set some
-         * lengths which are used to distinguish twix the displayed
-         * columns and an actual printed row!
-         * note: we avoid the use of background color so as to maximize
-         *       compatibility with the user's xterm settings */
-static void capsmk (WIN_t *q)
+	/*
+	 * Make the appropriate caps/color strings and set some
+	 * lengths which are used to distinguish twix the displayed
+	 * columns and an actual printed row!
+	 * note: we avoid the use of background color so as to maximize
+	 *       compatibility with the user's xterm settings */
+static void capsmk(WIN_t * q)
 {
-   /* macro to test if a basic (non-color) capability is valid
-         thanks: Floyd Davidson <floyd@ptialaska.net> */
+	/* macro to test if a basic (non-color) capability is valid
+	   thanks: Floyd Davidson <floyd@ptialaska.net> */
 #define tIF(s)  s ? s : ""
-   static int capsdone = 0;
+	static int capsdone = 0;
 
-   // we must NOT disturb our 'empty' terminfo strings!
-   if (Batch) return;
+	// we must NOT disturb our 'empty' terminfo strings!
+	if (Batch)
+		return;
 
-   // these are the unchangeable puppies, so we only do 'em once
-   if (!capsdone) {
-      strcpy(Cap_clr_eol, tIF(clr_eol));
-      strcpy(Cap_clr_eos, tIF(clr_eos));
-      strcpy(Cap_clr_scr, tIF(clear_screen));
-      strcpy(Cap_curs_huge, tIF(cursor_visible));
-      strcpy(Cap_curs_norm, tIF(cursor_normal));
-      strcpy(Cap_home, tIF(cursor_home));
-      strcpy(Cap_norm, tIF(exit_attribute_mode));
-      strcpy(Cap_reverse, tIF(enter_reverse_mode));
-      snprintf(Caps_off, sizeof(Caps_off), "%s%s", Cap_norm, tIF(orig_pair));
-      if (tgoto(cursor_address, 1, 1)) Cap_can_goto = 1;
-      capsdone = 1;
-   }
-   /* the key to NO run-time costs for configurable colors -- we spend a
-      little time with the user now setting up our terminfo strings, and
-      the job's done until he/she/it has a change-of-heart */
-   strcpy(q->cap_bold, CHKw(q, View_NOBOLD) ? Cap_norm : tIF(enter_bold_mode));
-   if (CHKw(q, Show_COLORS) && max_colors > 0) {
-      strcpy(q->capclr_sum, tparm(set_a_foreground, q->rc.summclr));
-      snprintf(q->capclr_msg, sizeof(q->capclr_msg), "%s%s"
-         , tparm(set_a_foreground, q->rc.msgsclr), Cap_reverse);
-      snprintf(q->capclr_pmt, sizeof(q->capclr_pmt), "%s%s"
-         , tparm(set_a_foreground, q->rc.msgsclr), q->cap_bold);
-      snprintf(q->capclr_hdr, sizeof(q->capclr_hdr), "%s%s"
-         , tparm(set_a_foreground, q->rc.headclr), Cap_reverse);
-      snprintf(q->capclr_rownorm, sizeof(q->capclr_rownorm), "%s%s"
-         , Caps_off, tparm(set_a_foreground, q->rc.taskclr));
-   } else {
-      q->capclr_sum[0] = '\0';
-      strcpy(q->capclr_msg, Cap_reverse);
-      strcpy(q->capclr_pmt, q->cap_bold);
-      strcpy(q->capclr_hdr, Cap_reverse);
-      strcpy(q->capclr_rownorm, Cap_norm);
-   }
-   // composite(s), so we do 'em outside and after the if
-   snprintf(q->capclr_rowhigh, sizeof(q->capclr_rowhigh), "%s%s"
-      , q->capclr_rownorm, CHKw(q, Show_HIBOLD) ? q->cap_bold : Cap_reverse);
-   q->len_rownorm = strlen(q->capclr_rownorm);
-   q->len_rowhigh = strlen(q->capclr_rowhigh);
+	// these are the unchangeable puppies, so we only do 'em once
+	if (!capsdone) {
+		strcpy(Cap_clr_eol, tIF(clr_eol));
+		strcpy(Cap_clr_eos, tIF(clr_eos));
+		strcpy(Cap_clr_scr, tIF(clear_screen));
+		strcpy(Cap_curs_huge, tIF(cursor_visible));
+		strcpy(Cap_curs_norm, tIF(cursor_normal));
+		strcpy(Cap_home, tIF(cursor_home));
+		strcpy(Cap_norm, tIF(exit_attribute_mode));
+		strcpy(Cap_reverse, tIF(enter_reverse_mode));
+		snprintf(Caps_off, sizeof(Caps_off), "%s%s", Cap_norm,
+			 tIF(orig_pair));
+		if (tgoto(cursor_address, 1, 1))
+			Cap_can_goto = 1;
+		capsdone = 1;
+	}
+	/* the key to NO run-time costs for configurable colors -- we spend a
+	   little time with the user now setting up our terminfo strings, and
+	   the job's done until he/she/it has a change-of-heart */
+	strcpy(q->cap_bold,
+	       CHKw(q, View_NOBOLD) ? Cap_norm : tIF(enter_bold_mode));
+	if (CHKw(q, Show_COLORS) && max_colors > 0) {
+		strcpy(q->capclr_sum, tparm(set_a_foreground, q->rc.summclr));
+		snprintf(q->capclr_msg, sizeof(q->capclr_msg), "%s%s",
+			 tparm(set_a_foreground, q->rc.msgsclr), Cap_reverse);
+		snprintf(q->capclr_pmt, sizeof(q->capclr_pmt), "%s%s",
+			 tparm(set_a_foreground, q->rc.msgsclr), q->cap_bold);
+		snprintf(q->capclr_hdr, sizeof(q->capclr_hdr), "%s%s",
+			 tparm(set_a_foreground, q->rc.headclr), Cap_reverse);
+		snprintf(q->capclr_rownorm, sizeof(q->capclr_rownorm), "%s%s",
+			 Caps_off, tparm(set_a_foreground, q->rc.taskclr));
+	} else {
+		q->capclr_sum[0] = '\0';
+		strcpy(q->capclr_msg, Cap_reverse);
+		strcpy(q->capclr_pmt, q->cap_bold);
+		strcpy(q->capclr_hdr, Cap_reverse);
+		strcpy(q->capclr_rownorm, Cap_norm);
+	}
+	// composite(s), so we do 'em outside and after the if
+	snprintf(q->capclr_rowhigh, sizeof(q->capclr_rowhigh), "%s%s",
+		 q->capclr_rownorm, CHKw(q,
+					 Show_HIBOLD) ? q->
+		 cap_bold : Cap_reverse);
+	q->len_rownorm = strlen(q->capclr_rownorm);
+	q->len_rowhigh = strlen(q->capclr_rowhigh);
 
 #undef tIF
 }
 
-
-        /*
-         * Show an error, but not right now.
-         * Due to the postponed opening of ksym, using open_psdb_message,
-         * if P_WCH had been selected and the program is restarted, the
-         * message would otherwise be displayed prematurely.
-         * (old top handles that situation with typical inelegance) */
-static void msg_save (const char *fmts, ...)
+	/*
+	 * Show an error, but not right now.
+	 * Due to the postponed opening of ksym, using open_psdb_message,
+	 * if P_WCH had been selected and the program is restarted, the
+	 * message would otherwise be displayed prematurely.
+	 * (old top handles that situation with typical inelegance) */
+static void msg_save(const char *fmts, ...)
 {
-   char tmp[SMLBUFSIZ];
-   va_list va;
+	char tmp[SMLBUFSIZ];
+	va_list va;
 
-   va_start(va, fmts);
-   vsnprintf(tmp, sizeof(tmp), fmts, va);
-   va_end(va);
-      /* we'll add some extra attention grabbers to whatever this is */
-   snprintf(Msg_delayed, sizeof(Msg_delayed), "\a***  %s  ***", strim_0(tmp));
-   Msg_awaiting = 1;
+	va_start(va, fmts);
+	vsnprintf(tmp, sizeof(tmp), fmts, va);
+	va_end(va);
+	/* we'll add some extra attention grabbers to whatever this is */
+	snprintf(Msg_delayed, sizeof(Msg_delayed), "\a***  %s  ***",
+		 strim_0(tmp));
+	Msg_awaiting = 1;
 }
 
-
-        /*
-         * Show an error message (caller may include a '\a' for sound) */
-static void show_msg (const char *str)
+	/*
+	 * Show an error message (caller may include a '\a' for sound) */
+static void show_msg(const char *str)
 {
-   PUTT("%s%s %s %s%s"
-      , tg2(0, Msg_row)
-      , Curwin->capclr_msg
-      , str
-      , Caps_off
-      , Cap_clr_eol);
-   fflush(stdout);
-   sleep(MSG_SLEEP);
-   Msg_awaiting = 0;
+	PUTT("%s%s %s %s%s", tg2(0, Msg_row)
+	     , Curwin->capclr_msg, str, Caps_off, Cap_clr_eol);
+	fflush(stdout);
+	sleep(MSG_SLEEP);
+	Msg_awaiting = 0;
 }
 
-
-        /*
-         * Show an input prompt + larger cursor */
-static void show_pmt (const char *str)
+	/*
+	 * Show an input prompt + larger cursor */
+static void show_pmt(const char *str)
 {
-   PUTT("%s%s%s: %s%s"
-      , tg2(0, Msg_row)
-      , Curwin->capclr_pmt
-      , str
-      , Cap_curs_huge
-      , Caps_off);
-   fflush(stdout);
+	PUTT("%s%s%s: %s%s", tg2(0, Msg_row)
+	     , Curwin->capclr_pmt, str, Cap_curs_huge, Caps_off);
+	fflush(stdout);
 }
 
+	/*
+	 * Show lines with specially formatted elements, but only output
+	 * what will fit within the current screen width.
+	 *    Our special formatting consists of:
+	 *       "some text <_delimiter_> some more text <_delimiter_>...\n"
+	 *    Where <_delimiter_> is a single byte in the range of:
+	 *       \01 through \10  (in decimalizee, 1 - 8)
+	 *    and is used to select an 'attribute' from a capabilities table
+	 *    which is then applied to the *preceding* substring.
+	 * Once recognized, the delimiter is replaced with a null character
+	 * and viola, we've got a substring ready to output!  Strings or
+	 * substrings without delimiters will receive the Cap_norm attribute.
+	 *
+	 * Caution:
+	 *    This routine treats all non-delimiter bytes as displayable
+	 *    data subject to our screen width marching orders.  If callers
+	 *    embed non-display data like tabs or terminfo strings in our
+	 *    glob, a line will truncate incorrectly at best.  Worse case
+	 *    would be truncation of an embedded tty escape sequence.
+	 *
+	 *    Tabs must always be avoided or our efforts are wasted and
+	 *    lines will wrap.  To lessen but not eliminate the risk of
+	 *    terminfo string truncation, such non-display stuff should
+	 *    be placed at the beginning of a "short" line.
+	 *    (and as for tabs, gimme 1 more color then no worries, mate) */
+static void show_special(int interact, const char *glob)
+{				/* note: the following is for documentation only,
+				   the real captab is now found in a group's WIN_t !
+				   +------------------------------------------------------+
+				   | char *captab[] = {                 :   Cap's/Delim's |
+				   |   Cap_norm, Cap_norm, Cap_bold,    =   \00, \01, \02 |
+				   |   Sum_color,                       =   \03           |
+				   |   Msg_color, Pmt_color,            =   \04, \05      |
+				   |   Hdr_color,                       =   \06           |
+				   |   Row_color_high,                  =   \07           |
+				   |   Row_color_norm  };               =   \10 [octal!]  |
+				   +------------------------------------------------------+ */
+	char lin[BIGBUFSIZ], row[ROWBUFSIZ], tmp[ROWBUFSIZ]
+	, *rp, *cap, *lin_end, *sub_beg, *sub_end;
+	int room;
 
-        /*
-         * Show lines with specially formatted elements, but only output
-         * what will fit within the current screen width.
-         *    Our special formatting consists of:
-         *       "some text <_delimiter_> some more text <_delimiter_>...\n"
-         *    Where <_delimiter_> is a single byte in the range of:
-         *       \01 through \10  (in decimalizee, 1 - 8)
-         *    and is used to select an 'attribute' from a capabilities table
-         *    which is then applied to the *preceding* substring.
-         * Once recognized, the delimiter is replaced with a null character
-         * and viola, we've got a substring ready to output!  Strings or
-         * substrings without delimiters will receive the Cap_norm attribute.
-         *
-         * Caution:
-         *    This routine treats all non-delimiter bytes as displayable
-         *    data subject to our screen width marching orders.  If callers
-         *    embed non-display data like tabs or terminfo strings in our
-         *    glob, a line will truncate incorrectly at best.  Worse case
-         *    would be truncation of an embedded tty escape sequence.
-         *
-         *    Tabs must always be avoided or our efforts are wasted and
-         *    lines will wrap.  To lessen but not eliminate the risk of
-         *    terminfo string truncation, such non-display stuff should
-         *    be placed at the beginning of a "short" line.
-         *    (and as for tabs, gimme 1 more color then no worries, mate) */
-static void show_special (int interact, const char *glob)
-{ /* note: the following is for documentation only,
-           the real captab is now found in a group's WIN_t !
-     +------------------------------------------------------+
-     | char *captab[] = {                 :   Cap's/Delim's |
-     |   Cap_norm, Cap_norm, Cap_bold,    =   \00, \01, \02 |
-     |   Sum_color,                       =   \03           |
-     |   Msg_color, Pmt_color,            =   \04, \05      |
-     |   Hdr_color,                       =   \06           |
-     |   Row_color_high,                  =   \07           |
-     |   Row_color_norm  };               =   \10 [octal!]  |
-     +------------------------------------------------------+ */
-   char lin[BIGBUFSIZ], row[ROWBUFSIZ], tmp[ROWBUFSIZ]
-      , *rp, *cap, *lin_end, *sub_beg, *sub_end;
-   int room;
+	/* handle multiple lines passed in a bunch */
+	while ((lin_end = strchr(glob, '\n'))) {
 
-      /* handle multiple lines passed in a bunch */
-   while ((lin_end = strchr(glob, '\n'))) {
+		/* create a local copy we can extend and otherwise abuse */
+		memcpy(lin, glob, (unsigned)(lin_end - glob));
+		/* zero terminate this part and prepare to parse substrings */
+		lin[lin_end - glob] = '\0';
+		room = Screen_cols;
+		sub_beg = sub_end = lin;
+		*(rp = row) = '\0';
 
-         /* create a local copy we can extend and otherwise abuse */
-      memcpy(lin, glob, (unsigned)(lin_end - glob));
-         /* zero terminate this part and prepare to parse substrings */
-      lin[lin_end - glob] = '\0';
-      room = Screen_cols;
-      sub_beg = sub_end = lin;
-      *(rp = row) = '\0';
+		while (*sub_beg) {
+			switch (*sub_end) {
+			case 0:	/* no end delim, captab makes normal */
+				*(sub_end + 1) = '\0';	/* extend str end, then fall through */
+			case 1 ... 8:
+				cap = Curwin->captab[(int)*sub_end];
+				*sub_end = '\0';
+				snprintf(tmp, sizeof(tmp), "%s%.*s%s", cap,
+					 room, sub_beg, Caps_off);
+				rp = scat(rp, tmp);
+				room -= (sub_end - sub_beg);
+				sub_beg = ++sub_end;
+				break;
+			default:	/* nothin' special, just text */
+				++sub_end;
+			}
+			if (unlikely(0 >= room))
+				break;	/* skip substrings that won't fit */
+		}
 
-      while (*sub_beg) {
-         switch (*sub_end) {
-            case 0:                     /* no end delim, captab makes normal */
-               *(sub_end + 1) = '\0';   /* extend str end, then fall through */
-            case 1 ... 8:
-               cap = Curwin->captab[(int)*sub_end];
-               *sub_end = '\0';
-               snprintf(tmp, sizeof(tmp), "%s%.*s%s", cap, room, sub_beg, Caps_off);
-               rp = scat(rp, tmp);
-               room -= (sub_end - sub_beg);
-               sub_beg = ++sub_end;
-               break;
-            default:                    /* nothin' special, just text */
-               ++sub_end;
-         }
-         if (unlikely(0 >= room)) break; /* skip substrings that won't fit */
-      }
+		if (interact)
+			PUTT("%s%s\n", row, Cap_clr_eol);
+		else
+			PUFF("%s%s\n", row, Cap_clr_eol);
+		glob = ++lin_end;	/* point to next line (maybe) */
+	}			/* end: while 'lines' */
 
-      if (interact) PUTT("%s%s\n", row, Cap_clr_eol);
-      else PUFF("%s%s\n", row, Cap_clr_eol);
-      glob = ++lin_end;                 /* point to next line (maybe) */
-   } /* end: while 'lines' */
-
-   /* If there's anything left in the glob (by virtue of no trailing '\n'),
-      it probably means caller wants to retain cursor position on this final
-      line.  That, in turn, means we're interactive and so we'll just do our
-      'fit-to-screen' thingy... */
-   if (*glob) PUTT("%.*s", Screen_cols, glob);
+	/* If there's anything left in the glob (by virtue of no trailing '\n'),
+	   it probably means caller wants to retain cursor position on this final
+	   line.  That, in turn, means we're interactive and so we'll just do our
+	   'fit-to-screen' thingy... */
+	if (*glob)
+		PUTT("%.*s", Screen_cols, glob);
 }
 
-
 /*######  Small Utility routines  ########################################*/
 
-        /*
-         * Get a string from the user */
-static char *ask4str (const char *prompt)
+	/*
+	 * Get a string from the user */
+static char *ask4str(const char *prompt)
 {
-   static char buf[GETBUFSIZ];
+	static char buf[GETBUFSIZ];
 
-   show_pmt(prompt);
-   memset(buf, '\0', sizeof(buf));
-   chin(1, buf, sizeof(buf) - 1);
-   putp(Cap_curs_norm);
-   return strim_0(buf);
+	show_pmt(prompt);
+	memset(buf, '\0', sizeof(buf));
+	chin(1, buf, sizeof(buf) - 1);
+	putp(Cap_curs_norm);
+	return strim_0(buf);
 }
 
-
-        /*
-         * Get a float from the user */
-static float get_float (const char *prompt)
+	/*
+	 * Get a float from the user */
+static float get_float(const char *prompt)
 {
-   char *line;
-   float f;
+	char *line;
+	float f;
 
-   if (!(*(line = ask4str(prompt)))) return -1;
-   // note: we're not allowing negative floats
-   if (strcspn(line, ",.1234567890")) {
-      show_msg("\aNot valid");
-      return -1;
-   }
-   sscanf(line, "%f", &f);
-   return f;
+	if (!(*(line = ask4str(prompt))))
+		return -1;
+	// note: we're not allowing negative floats
+	if (strcspn(line, ",.1234567890")) {
+		show_msg("\aNot valid");
+		return -1;
+	}
+	sscanf(line, "%f", &f);
+	return f;
 }
 
-
-        /*
-         * Get an integer from the user */
-static int get_int (const char *prompt)
+	/*
+	 * Get an integer from the user */
+static int get_int(const char *prompt)
 {
-   char *line;
-   int n;
+	char *line;
+	int n;
 
-   if (!(*(line = ask4str(prompt)))) return -1;
-   // note: we've got to allow negative ints (renice)
-   if (strcspn(line, "-1234567890")) {
-      show_msg("\aNot valid");
-      return -1;
-   }
-   sscanf(line, "%d", &n);
-   return n;
+	if (!(*(line = ask4str(prompt))))
+		return -1;
+	// note: we've got to allow negative ints (renice)
+	if (strcspn(line, "-1234567890")) {
+		show_msg("\aNot valid");
+		return -1;
+	}
+	sscanf(line, "%d", &n);
+	return n;
 }
 
-
-        /*
-         * Do some scaling stuff.
-         * We'll interpret 'num' as one of the following types and
-         * try to format it to fit 'width'.
-         *    SK_no (0) it's a byte count
-         *    SK_Kb (1) it's kilobytes
-         *    SK_Mb (2) it's megabytes
-         *    SK_Gb (3) it's gigabytes  */
-static const char *scale_num (unsigned num, const int width, const unsigned type)
+	/*
+	 * Do some scaling stuff.
+	 * We'll interpret 'num' as one of the following types and
+	 * try to format it to fit 'width'.
+	 *    SK_no (0) it's a byte count
+	 *    SK_Kb (1) it's kilobytes
+	 *    SK_Mb (2) it's megabytes
+	 *    SK_Gb (3) it's gigabytes  */
+static const char *scale_num(unsigned num, const int width, const unsigned type)
 {
-      /* kilobytes, megabytes, gigabytes, duh! */
-   static float scale[] = { 1024, 1024*1024, 1024*1024*1024, 0 };
-      /* kilo, mega, giga, none */
+	/* kilobytes, megabytes, gigabytes, duh! */
+	static float scale[] = { 1024, 1024 * 1024, 1024 * 1024 * 1024, 0 };
+	/* kilo, mega, giga, none */
 #ifdef CASEUP_SCALE
-   static char nextup[] =  { 'K', 'M', 'G', 0 };
+	static char nextup[] = { 'K', 'M', 'G', 0 };
 #else
-   static char nextup[] =  { 'k', 'm', 'g', 0 };
+	static char nextup[] = { 'k', 'm', 'g', 0 };
 #endif
-   static char buf[TNYBUFSIZ];
-   float *dp;
-   char *up;
+	static char buf[TNYBUFSIZ];
+	float *dp;
+	char *up;
 
-      /* try an unscaled version first... */
-   if (width >= snprintf(buf, sizeof(buf), "%u", num)) return buf;
+	/* try an unscaled version first... */
+	if (width >= snprintf(buf, sizeof(buf), "%u", num))
+		return buf;
 
-      /* now try successively higher types until it fits */
-   for (up = nextup + type, dp = scale; *dp; ++dp, ++up) {
-         /* the most accurate version */
-      if (width >= snprintf(buf, sizeof(buf), "%.1f%c", num / *dp, *up))
-         return buf;
-         /* the integer version */
-      if (width >= snprintf(buf, sizeof(buf), "%d%c", (int)(num / *dp), *up))
-         return buf;
-   }
-      /* well shoot, this outta' fit... */
-   return "?";
+	/* now try successively higher types until it fits */
+	for (up = nextup + type, dp = scale; *dp; ++dp, ++up) {
+		/* the most accurate version */
+		if (width >=
+		    snprintf(buf, sizeof(buf), "%.1f%c", num / *dp, *up))
+			return buf;
+		/* the integer version */
+		if (width >=
+		    snprintf(buf, sizeof(buf), "%d%c", (int)(num / *dp), *up))
+			return buf;
+	}
+	/* well shoot, this outta' fit... */
+	return "?";
 }
 
-
-        /*
-         * Do some scaling stuff.
-         * format 'tics' to fit 'width'. */
-static const char *scale_tics (TIC_t tics, const int width)
+	/*
+	 * Do some scaling stuff.
+	 * format 'tics' to fit 'width'. */
+static const char *scale_tics(TIC_t tics, const int width)
 {
 #ifdef CASEUP_SCALE
 #define HH "%uH"
@@ -746,35 +728,35 @@
 #define DD "%ud"
 #define WW "%uw"
 #endif
-   static char buf[TNYBUFSIZ];
-   unsigned long nt;    // narrow time, for speed on 32-bit
-   unsigned cc;         // centiseconds
-   unsigned nn;         // multi-purpose whatever
+	static char buf[TNYBUFSIZ];
+	unsigned long nt;	// narrow time, for speed on 32-bit
+	unsigned cc;		// centiseconds
+	unsigned nn;		// multi-purpose whatever
 
-   nt  = (tics * 100ull) / Hertz;
-   cc  = nt % 100;                              // centiseconds past second
-   nt /= 100;                                   // total seconds
-   nn  = nt % 60;                               // seconds past the minute
-   nt /= 60;                                    // total minutes
-   if (width >= snprintf(buf, sizeof(buf), "%lu:%02u.%02u", nt, nn, cc))
-      return buf;
-   if (width >= snprintf(buf, sizeof buf, "%lu:%02u", nt, nn))
-      return buf;
-   nn  = nt % 60;                               // minutes past the hour
-   nt /= 60;                                    // total hours
-   if (width >= snprintf(buf, sizeof buf, "%lu,%02u", nt, nn))
-      return buf;
-   nn = nt;                                     // now also hours
-   if (width >= snprintf(buf, sizeof buf, HH, nn))
-      return buf;
-   nn /= 24;                                    // now days
-   if (width >= snprintf(buf, sizeof buf, DD, nn))
-      return buf;
-   nn /= 7;                                     // now weeks
-   if (width >= snprintf(buf, sizeof buf, WW, nn))
-      return buf;
-      // well shoot, this outta' fit...
-   return "?";
+	nt = (tics * 100ull) / Hertz;
+	cc = nt % 100;		// centiseconds past second
+	nt /= 100;		// total seconds
+	nn = nt % 60;		// seconds past the minute
+	nt /= 60;		// total minutes
+	if (width >= snprintf(buf, sizeof(buf), "%lu:%02u.%02u", nt, nn, cc))
+		return buf;
+	if (width >= snprintf(buf, sizeof buf, "%lu:%02u", nt, nn))
+		return buf;
+	nn = nt % 60;		// minutes past the hour
+	nt /= 60;		// total hours
+	if (width >= snprintf(buf, sizeof buf, "%lu,%02u", nt, nn))
+		return buf;
+	nn = nt;		// now also hours
+	if (width >= snprintf(buf, sizeof buf, HH, nn))
+		return buf;
+	nn /= 24;		// now days
+	if (width >= snprintf(buf, sizeof buf, DD, nn))
+		return buf;
+	nn /= 7;		// now weeks
+	if (width >= snprintf(buf, sizeof buf, WW, nn))
+		return buf;
+	// well shoot, this outta' fit...
+	return "?";
 
 #undef HH
 #undef DD
@@ -787,290 +769,309 @@
 static uid_t selection_uid;
 
 // FIXME: this is "temporary" code we hope
-static int good_uid(const proc_t *restrict const pp) {
-   switch(selection_type) {
-   case 'p':
-      return 1;
-   case 0:
-      return 1;
-   case 'U':
-      if (pp->ruid == selection_uid) return 1;
-      if (pp->suid == selection_uid) return 1;
-      if (pp->fuid == selection_uid) return 1;
-      // FALLTHROUGH
-   case 'u':
-      if (pp->euid == selection_uid) return 1;
-      // FALLTHROUGH
-   default:
-      ;  // don't know what it is; find bugs fast
-   }
-   return 0;
+static int good_uid(const proc_t * restrict const pp)
+{
+	switch (selection_type) {
+	case 'p':
+		return 1;
+	case 0:
+		return 1;
+	case 'U':
+		if (pp->ruid == selection_uid)
+			return 1;
+		if (pp->suid == selection_uid)
+			return 1;
+		if (pp->fuid == selection_uid)
+			return 1;
+		// FALLTHROUGH
+	case 'u':
+		if (pp->euid == selection_uid)
+			return 1;
+		// FALLTHROUGH
+	default:
+		;		// don't know what it is; find bugs fast
+	}
+	return 0;
 }
 
 // swiped from ps, and ought to be in libproc
-static const char *parse_uid(const char *restrict const str, uid_t *restrict const ret) {
-   struct passwd *passwd_data;
-   char *endp;
-   unsigned long num;
-   static const char uidrange[] = "User ID out of range.";
-   static const char uidexist[] = "User name does not exist.";
-   num = strtoul(str, &endp, 0);
-   if (*endp != '\0') {  /* hmmm, try as login name */
-      passwd_data = getpwnam(str);
-      if (!passwd_data)    return uidexist;
-      num = passwd_data->pw_uid;
-   }
-   if (num > 0xfffffffeUL) return uidrange;
-   *ret = num;
-   return 0;
+static const char *parse_uid(const char *restrict const str,
+			     uid_t * restrict const ret)
+{
+	struct passwd *passwd_data;
+	char *endp;
+	unsigned long num;
+	static const char uidrange[] = "User ID out of range.";
+	static const char uidexist[] = "User name does not exist.";
+	num = strtoul(str, &endp, 0);
+	if (*endp != '\0') {	/* hmmm, try as login name */
+		passwd_data = getpwnam(str);
+		if (!passwd_data)
+			return uidexist;
+		num = passwd_data->pw_uid;
+	}
+	if (num > 0xfffffffeUL)
+		return uidrange;
+	*ret = num;
+	return 0;
 }
 
-
 /*######  Library Alternatives  ##########################################*/
 
-        /*
-         * Handle our own memory stuff without the risk of leaving the
-         * user's terminal in an ugly state should things go sour. */
+	/*
+	 * Handle our own memory stuff without the risk of leaving the
+	 * user's terminal in an ugly state should things go sour. */
 
-static void *alloc_c (unsigned numb) MALLOC;
-static void *alloc_c (unsigned numb)
+static void *alloc_c(unsigned numb) MALLOC;
+static void *alloc_c(unsigned numb)
 {
-   void * p;
+	void *p;
 
-   if (!numb) ++numb;
-   if (!(p = calloc(1, numb)))
-      std_err("failed memory allocate");
-   return p;
+	if (!numb)
+		++numb;
+	if (!(p = calloc(1, numb)))
+		std_err("failed memory allocate");
+	return p;
 }
 
-static void *alloc_r (void *q, unsigned numb) MALLOC;
-static void *alloc_r (void *q, unsigned numb)
+static void *alloc_r(void *q, unsigned numb) MALLOC;
+static void *alloc_r(void *q, unsigned numb)
 {
-   void *p;
+	void *p;
 
-   if (!numb) ++numb;
-   if (!(p = realloc(q, numb)))
-      std_err("failed memory allocate");
-   return p;
+	if (!numb)
+		++numb;
+	if (!(p = realloc(q, numb)))
+		std_err("failed memory allocate");
+	return p;
 }
 
-
-        /*
-         * This guy's modeled on libproc's 'five_cpu_numbers' function except
-         * we preserve all cpu data in our CPU_t array which is organized
-         * as follows:
-         *    cpus[0] thru cpus[n] == tics for each separate cpu
-         *    cpus[Cpu_tot]        == tics from the 1st /proc/stat line */
-static CPU_t *cpus_refresh (CPU_t *cpus)
+	/*
+	 * This guy's modeled on libproc's 'five_cpu_numbers' function except
+	 * we preserve all cpu data in our CPU_t array which is organized
+	 * as follows:
+	 *    cpus[0] thru cpus[n] == tics for each separate cpu
+	 *    cpus[Cpu_tot]        == tics from the 1st /proc/stat line */
+static CPU_t *cpus_refresh(CPU_t * cpus)
 {
-   static FILE *fp = NULL;
-   int i;
-   // enough for a /proc/stat CPU line (not the intr line)
-   char buf[SMLBUFSIZ];
+	static FILE *fp = NULL;
+	int i;
+	// enough for a /proc/stat CPU line (not the intr line)
+	char buf[SMLBUFSIZ];
 
-   /* by opening this file once, we'll avoid the hit on minor page faults
-      (sorry Linux, but you'll have to close it for us) */
-   if (!fp) {
-      if (!(fp = fopen("/proc/stat", "r")))
-         std_err(fmtmk("Failed /proc/stat open: %s", strerror(errno)));
-      /* note: we allocate one more CPU_t than Cpu_tot so that the last slot
-               can hold tics representing the /proc/stat cpu summary (the first
-               line read) -- that slot supports our View_CPUSUM toggle */
-      cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
-   }
-   rewind(fp);
-   fflush(fp);
+	/* by opening this file once, we'll avoid the hit on minor page faults
+	   (sorry Linux, but you'll have to close it for us) */
+	if (!fp) {
+		if (!(fp = fopen("/proc/stat", "r")))
+			std_err(fmtmk
+				("Failed /proc/stat open: %s",
+				 strerror(errno)));
+		/* note: we allocate one more CPU_t than Cpu_tot so that the last slot
+		   can hold tics representing the /proc/stat cpu summary (the first
+		   line read) -- that slot supports our View_CPUSUM toggle */
+		cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
+	}
+	rewind(fp);
+	fflush(fp);
 
-   // first value the last slot with the cpu summary line
-   if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
-   if (4 > sscanf(buf, CPU_FMTS_JUST1
-      , &cpus[Cpu_tot].u, &cpus[Cpu_tot].n, &cpus[Cpu_tot].s, &cpus[Cpu_tot].i, &cpus[Cpu_tot].w))
-         std_err("failed /proc/stat read");
-   // and just in case we're 2.2.xx compiled without SMP support...
-   if (1 == Cpu_tot) memcpy(cpus, &cpus[1], sizeof(CPU_t));
+	// first value the last slot with the cpu summary line
+	if (!fgets(buf, sizeof(buf), fp))
+		std_err("failed /proc/stat read");
+	if (4 >
+	    sscanf(buf, CPU_FMTS_JUST1, &cpus[Cpu_tot].u, &cpus[Cpu_tot].n,
+		   &cpus[Cpu_tot].s, &cpus[Cpu_tot].i, &cpus[Cpu_tot].w))
+		std_err("failed /proc/stat read");
+	// and just in case we're 2.2.xx compiled without SMP support...
+	if (1 == Cpu_tot)
+		memcpy(cpus, &cpus[1], sizeof(CPU_t));
 
-   // now value each separate cpu's tics
-   for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
+	// now value each separate cpu's tics
+	for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
 #ifdef PRETEND4CPUS
-      rewind(fp);
+		rewind(fp);
 #endif
-      if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
-      if (4 > sscanf(buf, CPU_FMTS_MULTI
-         , &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w))
-            std_err("failed /proc/stat read");
-   }
-   return cpus;
+		if (!fgets(buf, sizeof(buf), fp))
+			std_err("failed /proc/stat read");
+		if (4 >
+		    sscanf(buf, CPU_FMTS_MULTI, &cpus[i].u, &cpus[i].n,
+			   &cpus[i].s, &cpus[i].i, &cpus[i].w))
+			std_err("failed /proc/stat read");
+	}
+	return cpus;
 }
 
-
-        /*
-         * Refresh procs *Helper* function to eliminate yet one more need
-         * to loop through our darn proc_t table.  He's responsible for:
-         *    1) calculating the elapsed time since the previous frame
-         *    2) counting the number of tasks in each state (run, sleep, etc)
-         *    3) maintaining the HST_t's and priming the proc_t pcpu field
-         *    4) establishing the total number tasks for this frame */
-static void prochlp (proc_t *this)
+	/*
+	 * Refresh procs *Helper* function to eliminate yet one more need
+	 * to loop through our darn proc_t table.  He's responsible for:
+	 *    1) calculating the elapsed time since the previous frame
+	 *    2) counting the number of tasks in each state (run, sleep, etc)
+	 *    3) maintaining the HST_t's and priming the proc_t pcpu field
+	 *    4) establishing the total number tasks for this frame */
+static void prochlp(proc_t * this)
 {
-   static HST_t    *hist_sav = NULL;
-   static HST_t    *hist_new = NULL;
-   static unsigned  hist_siz = 0;       // number of structs
-   static unsigned  maxt_sav;           // prior frame's max tasks
-   TIC_t tics;
+	static HST_t *hist_sav = NULL;
+	static HST_t *hist_new = NULL;
+	static unsigned hist_siz = 0;	// number of structs
+	static unsigned maxt_sav;	// prior frame's max tasks
+	TIC_t tics;
 
-   if (unlikely(!this)) {
-      static struct timeval oldtimev;
-      struct timeval timev;
-      struct timezone timez;
-      HST_t *hist_tmp;
-      float et;
+	if (unlikely(!this)) {
+		static struct timeval oldtimev;
+		struct timeval timev;
+		struct timezone timez;
+		HST_t *hist_tmp;
+		float et;
 
-      gettimeofday(&timev, &timez);
-      et = (timev.tv_sec - oldtimev.tv_sec)
-         + (float)(timev.tv_usec - oldtimev.tv_usec) / 1000000.0;
-      oldtimev.tv_sec = timev.tv_sec;
-      oldtimev.tv_usec = timev.tv_usec;
+		gettimeofday(&timev, &timez);
+		et = (timev.tv_sec - oldtimev.tv_sec)
+		    + (float)(timev.tv_usec - oldtimev.tv_usec) / 1000000.0;
+		oldtimev.tv_sec = timev.tv_sec;
+		oldtimev.tv_usec = timev.tv_usec;
 
-      // if in Solaris mode, adjust our scaling for all cpus
-      Frame_tscale = 100.0f / ((float)Hertz * (float)et * (Rc.mode_irixps ? 1 : Cpu_tot));
-      maxt_sav = Frame_maxtask;
-      Frame_maxtask = Frame_running = Frame_sleepin = Frame_stopped = Frame_zombied = 0;
+		// if in Solaris mode, adjust our scaling for all cpus
+		Frame_tscale =
+		    100.0f / ((float)Hertz * (float)et *
+			      (Rc.mode_irixps ? 1 : Cpu_tot));
+		maxt_sav = Frame_maxtask;
+		Frame_maxtask = Frame_running = Frame_sleepin = Frame_stopped =
+		    Frame_zombied = 0;
 
-      // reuse memory each time around
-      hist_tmp = hist_sav;
-      hist_sav = hist_new;
-      hist_new = hist_tmp;
-      // prep for our binary search by sorting the last frame's HST_t's
-      qsort(hist_sav, maxt_sav, sizeof(HST_t), (QFP_t)sort_HST_t);
-      return;
-   }
+		// reuse memory each time around
+		hist_tmp = hist_sav;
+		hist_sav = hist_new;
+		hist_new = hist_tmp;
+		// prep for our binary search by sorting the last frame's HST_t's
+		qsort(hist_sav, maxt_sav, sizeof(HST_t), (QFP_t) sort_HST_t);
+		return;
+	}
 
-   switch (this->state) {
-      case 'R':
-         Frame_running++;
-         break;
-      case 'S':
-      case 'D':
-         Frame_sleepin++;
-         break;
-      case 'T':
-         Frame_stopped++;
-         break;
-      case 'Z':
-         Frame_zombied++;
-         break;
-   }
+	switch (this->state) {
+	case 'R':
+		Frame_running++;
+		break;
+	case 'S':
+	case 'D':
+		Frame_sleepin++;
+		break;
+	case 'T':
+		Frame_stopped++;
+		break;
+	case 'Z':
+		Frame_zombied++;
+		break;
+	}
 
-   if (unlikely(Frame_maxtask+1 >= hist_siz)) {
-      hist_siz = hist_siz * 5 / 4 + 100;  // grow by at least 25%
-      hist_sav = alloc_r(hist_sav, sizeof(HST_t) * hist_siz);
-      hist_new = alloc_r(hist_new, sizeof(HST_t) * hist_siz);
-   }
-   /* calculate time in this process; the sum of user time (utime) and
-      system time (stime) -- but PLEASE dont waste time and effort on
-      calcs and saves that go unused, like the old top! */
-   hist_new[Frame_maxtask].pid  = this->pid;
-   hist_new[Frame_maxtask].tics = tics = (this->utime + this->stime);
+	if (unlikely(Frame_maxtask + 1 >= hist_siz)) {
+		hist_siz = hist_siz * 5 / 4 + 100;	// grow by at least 25%
+		hist_sav = alloc_r(hist_sav, sizeof(HST_t) * hist_siz);
+		hist_new = alloc_r(hist_new, sizeof(HST_t) * hist_siz);
+	}
+	/* calculate time in this process; the sum of user time (utime) and
+	   system time (stime) -- but PLEASE dont waste time and effort on
+	   calcs and saves that go unused, like the old top! */
+	hist_new[Frame_maxtask].pid = this->pid;
+	hist_new[Frame_maxtask].tics = tics = (this->utime + this->stime);
 
 #if 0
-{  int i;
-   int lo = 0;
-   int hi = maxt_sav - 1;
+	{
+		int i;
+		int lo = 0;
+		int hi = maxt_sav - 1;
 
-   // find matching entry from previous frame and make ticks elapsed
-   while (lo <= hi) {
-      i = (lo + hi) / 2;
-      if (this->pid < hist_sav[i].pid)
-         hi = i - 1;
-      else if (likely(this->pid > hist_sav[i].pid))
-         lo = i + 1;
-      else {
-         tics -= hist_sav[i].tics;
-         break;
-      }
-   }
-}
+		// find matching entry from previous frame and make ticks elapsed
+		while (lo <= hi) {
+			i = (lo + hi) / 2;
+			if (this->pid < hist_sav[i].pid)
+				hi = i - 1;
+			else if (likely(this->pid > hist_sav[i].pid))
+				lo = i + 1;
+			else {
+				tics -= hist_sav[i].tics;
+				break;
+			}
+		}
+	}
 #else
-{
-   HST_t tmp;
-   const HST_t *ptr;
-   tmp.pid = this->pid;
-   ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, sort_HST_t);
-   if (ptr) tics -= ptr->tics;
-}
+	{
+		HST_t tmp;
+		const HST_t *ptr;
+		tmp.pid = this->pid;
+		ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, sort_HST_t);
+		if (ptr)
+			tics -= ptr->tics;
+	}
 #endif
 
-   // we're just saving elapsed tics, to be converted into %cpu if
-   // this task wins it's displayable screen row lottery... */
-   this->pcpu = tics;
+	// we're just saving elapsed tics, to be converted into %cpu if
+	// this task wins it's displayable screen row lottery... */
+	this->pcpu = tics;
 // if (Frames_maxcmdln) { }
-   // shout this to the world with the final call (or us the next time in)
-   Frame_maxtask++;
+	// shout this to the world with the final call (or us the next time in)
+	Frame_maxtask++;
 }
 
-
-        /*
-         * This guy's modeled on libproc's 'readproctab' function except
-         * we reuse and extend any prior proc_t's.  He's been customized
-         * for our specific needs and to avoid the use of <stdarg.h> */
-static proc_t **procs_refresh (proc_t **table, int flags)
+	/*
+	 * This guy's modeled on libproc's 'readproctab' function except
+	 * we reuse and extend any prior proc_t's.  He's been customized
+	 * for our specific needs and to avoid the use of <stdarg.h> */
+static proc_t **procs_refresh(proc_t ** table, int flags)
 {
 #define PTRsz  sizeof(proc_t *)
 #define ENTsz  sizeof(proc_t)
-   static unsigned savmax = 0;          // first time, Bypass: (i)
-   proc_t *ptsk = (proc_t *)-1;         // first time, Force: (ii)
-   unsigned curmax = 0;                 // every time  (jeeze)
-   PROCTAB* PT;
+	static unsigned savmax = 0;	// first time, Bypass: (i)
+	proc_t *ptsk = (proc_t *) - 1;	// first time, Force: (ii)
+	unsigned curmax = 0;	// every time  (jeeze)
+	PROCTAB *PT;
 
-   prochlp(NULL);                       // prep for a new frame
-   if (Monpidsidx)
-      PT = openproc(PROC_FILLBUG | PROC_PID, Monpids);
-   else
-      PT = openproc(flags);
+	prochlp(NULL);		// prep for a new frame
+	if (Monpidsidx)
+		PT = openproc(PROC_FILLBUG | PROC_PID, Monpids);
+	else
+		PT = openproc(flags);
 
-   // i) Allocated Chunks:  *Existing* table;  refresh + reuse
-   while (curmax < savmax) {
-      if (table[curmax]->cmdline) {
-         free(*table[curmax]->cmdline);
-         table[curmax]->cmdline = NULL;
-      }
-      if (unlikely(!(ptsk = readproc(PT, table[curmax])))) break;
-      prochlp(ptsk);                    // tally & complete this proc_t
-      ++curmax;
-   }
+	// i) Allocated Chunks:  *Existing* table;  refresh + reuse
+	while (curmax < savmax) {
+		if (table[curmax]->cmdline) {
+			free(*table[curmax]->cmdline);
+			table[curmax]->cmdline = NULL;
+		}
+		if (unlikely(!(ptsk = readproc(PT, table[curmax]))))
+			break;
+		prochlp(ptsk);	// tally & complete this proc_t
+		++curmax;
+	}
 
-   // ii) Unallocated Chunks:  *New* or *Existing* table;  extend + fill
-   while (ptsk) {
-      // realloc as we go, keeping 'table' ahead of 'currmax++'
-      table = alloc_r(table, (curmax + 1) * PTRsz);
-      // here, readproc will allocate the underlying proc_t stg
-      if (likely(ptsk = readproc(PT, NULL))) {
-         prochlp(ptsk);                 // tally & complete this proc_t
-         table[curmax++] = ptsk;
-      }
-   }
-   closeproc(PT);
+	// ii) Unallocated Chunks:  *New* or *Existing* table;  extend + fill
+	while (ptsk) {
+		// realloc as we go, keeping 'table' ahead of 'currmax++'
+		table = alloc_r(table, (curmax + 1) * PTRsz);
+		// here, readproc will allocate the underlying proc_t stg
+		if (likely(ptsk = readproc(PT, NULL))) {
+			prochlp(ptsk);	// tally & complete this proc_t
+			table[curmax++] = ptsk;
+		}
+	}
+	closeproc(PT);
 
-   // iii) Chunkless:  make 'eot' entry, after ensuring proc_t exists
-   if (curmax >= savmax) {
-      table = alloc_r(table, (curmax + 1) * PTRsz);
-      // here, we must allocate the underlying proc_t stg ourselves
-      table[curmax] = alloc_c(ENTsz);
-      savmax = curmax + 1;
-   }
-   // this frame's end, but not necessarily end of allocated space
-   table[curmax]->pid = -1;
-   return table;
+	// iii) Chunkless:  make 'eot' entry, after ensuring proc_t exists
+	if (curmax >= savmax) {
+		table = alloc_r(table, (curmax + 1) * PTRsz);
+		// here, we must allocate the underlying proc_t stg ourselves
+		table[curmax] = alloc_c(ENTsz);
+		savmax = curmax + 1;
+	}
+	// this frame's end, but not necessarily end of allocated space
+	table[curmax]->pid = -1;
+	return table;
 
 #undef PTRsz
 #undef ENTsz
 }
 
-
 /*######  Field Table/RCfile compatability support  ######################*/
 
-        /* These are the Fieldstab.lflg values used here and in reframewins.
-           (own identifiers as documentation and protection against changes) */
+	/* These are the Fieldstab.lflg values used here and in reframewins.
+	   (own identifiers as documentation and protection against changes) */
 #define L_stat     PROC_FILLSTAT
 #define L_statm    PROC_FILLMEM
 #define L_status   PROC_FILLSTATUS
@@ -1087,11 +1088,11 @@
    // a temporary macro, soon to be undef'd...
 #define SF(f) (QFP_t)sort_P_ ## f
 
-        /* These are our gosh darn 'Fields' !
-           They MUST be kept in sync with pflags !!
-           note: for integer data, the length modifiers found in .fmts may
-                 NOT reflect the true field type found in proc_t -- this plus
-                 a cast when/if displayed provides minimal width protection. */
+	/* These are our gosh darn 'Fields' !
+	   They MUST be kept in sync with pflags !!
+	   note: for integer data, the length modifiers found in .fmts may
+	   NOT reflect the true field type found in proc_t -- this plus
+	   a cast when/if displayed provides minimal width protection. */
 static FLD_t Fieldstab[] = {
 /* .lflg anomolies:
       P_UID, L_NONE  - natural outgrowth of 'stat()' in readproc        (euid)
@@ -1100,474 +1101,571 @@
       L_EITHER       - must L_status, else 64-bit math, __udivdi3 on 32-bit !
       keys   head           fmts     width   scale  sort   desc                     lflg
      ------  -----------    -------  ------  -----  -----  ----------------------   -------- */
-   { "AaAa", "  PID ",      "%5u ",     -1,    -1, SF(PID), "Process Id",           L_NONE   },
-   { "BbBb", " PPID ",      "%5u ",     -1,    -1, SF(PPD), "Parent Process Pid",   L_EITHER },
-   { "CcQq", "RUSER    ",   "%-8.8s ",  -1,    -1, SF(URR), "Real user name",       L_RUSER  },
-   { "DdCc", " UID ",       "%4u ",     -1,    -1, SF(UID), "User Id",              L_NONE   },
-   { "EeDd", "USER     ",   "%-8.8s ",  -1,    -1, SF(URE), "User Name",            L_EUSER  },
-   { "FfNn", "GROUP    ",   "%-8.8s ",  -1,    -1, SF(GRP), "Group Name",           L_GROUP  },
-   { "GgGg", "TTY      ",   "%-8.8s ",   8,    -1, SF(TTY), "Controlling Tty",      L_stat   },
-   { "HhHh", " PR ",        "%3d ",     -1,    -1, SF(PRI), "Priority",             L_stat   },
-   { "IiIi", " NI ",        "%3d ",     -1,    -1, SF(NCE), "Nice value",           L_stat   },
-   { "JjYy", "#C ",         "%2u ",     -1,    -1, SF(CPN), "Last used cpu (SMP)",  L_stat   },
-   { "KkEe", "%CPU ",       "%#4.1f ",  -1,    -1, SF(CPU), "CPU usage",            L_stat   },
-   { "LlWw", "  TIME ",     "%6.6s ",    6,    -1, SF(TME), "CPU Time",             L_stat   },
-   { "MmRr", "   TIME+  ",  "%9.9s ",    9,    -1, SF(TME), "CPU Time, hundredths", L_stat   },
-   { "NnFf", "%MEM ",       "%#4.1f ",  -1,    -1, SF(RES), "Memory usage (RES)",   L_statm  },
-   { "OoMm", " VIRT ",      "%5.5s ",    5, SK_Kb, SF(VRT), "Virtual Image (kb)",   L_statm  },
-   { "PpOo", "SWAP ",       "%4.4s ",    4, SK_Kb, SF(SWP), "Swapped size (kb)",    L_statm  },
-   { "QqTt", " RES ",       "%4.4s ",    4, SK_Kb, SF(RES), "Resident size (kb)",   L_statm  },
-   { "RrKk", "CODE ",       "%4.4s ",    4, SK_Kb, SF(COD), "Code size (kb)",       L_statm  },
-   { "SsLl", "DATA ",       "%4.4s ",    4, SK_Kb, SF(DAT), "Data+Stack size (kb)", L_statm  },
-   { "TtPp", " SHR ",       "%4.4s ",    4, SK_Kb, SF(SHR), "Shared Mem size (kb)", L_statm  },
-   { "UuJj", "nFLT ",       "%4.4s ",    4, SK_no, SF(FLT), "Page Fault count",     L_stat   },
-   { "VvSs", "nDRT ",       "%4.4s ",    4, SK_no, SF(DRT), "Dirty Pages count",    L_statm  },
+	{"AaAa", "  PID ", "%5u ", -1, -1, SF(PID), "Process Id", L_NONE},
+	{"BbBb", " PPID ", "%5u ", -1, -1, SF(PPD), "Parent Process Pid",
+	 L_EITHER},
+	{"CcQq", "RUSER    ", "%-8.8s ", -1, -1, SF(URR), "Real user name",
+	 L_RUSER},
+	{"DdCc", " UID ", "%4u ", -1, -1, SF(UID), "User Id", L_NONE},
+	{"EeDd", "USER     ", "%-8.8s ", -1, -1, SF(URE), "User Name", L_EUSER},
+	{"FfNn", "GROUP    ", "%-8.8s ", -1, -1, SF(GRP), "Group Name",
+	 L_GROUP},
+	{"GgGg", "TTY      ", "%-8.8s ", 8, -1, SF(TTY), "Controlling Tty",
+	 L_stat},
+	{"HhHh", " PR ", "%3d ", -1, -1, SF(PRI), "Priority", L_stat},
+	{"IiIi", " NI ", "%3d ", -1, -1, SF(NCE), "Nice value", L_stat},
+	{"JjYy", "#C ", "%2u ", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat},
+	{"KkEe", "%CPU ", "%#4.1f ", -1, -1, SF(CPU), "CPU usage", L_stat},
+	{"LlWw", "  TIME ", "%6.6s ", 6, -1, SF(TME), "CPU Time", L_stat},
+	{"MmRr", "   TIME+  ", "%9.9s ", 9, -1, SF(TME), "CPU Time, hundredths",
+	 L_stat},
+	{"NnFf", "%MEM ", "%#4.1f ", -1, -1, SF(RES), "Memory usage (RES)",
+	 L_statm},
+	{"OoMm", " VIRT ", "%5.5s ", 5, SK_Kb, SF(VRT), "Virtual Image (kb)",
+	 L_statm},
+	{"PpOo", "SWAP ", "%4.4s ", 4, SK_Kb, SF(SWP), "Swapped size (kb)",
+	 L_statm},
+	{"QqTt", " RES ", "%4.4s ", 4, SK_Kb, SF(RES), "Resident size (kb)",
+	 L_statm},
+	{"RrKk", "CODE ", "%4.4s ", 4, SK_Kb, SF(COD), "Code size (kb)",
+	 L_statm},
+	{"SsLl", "DATA ", "%4.4s ", 4, SK_Kb, SF(DAT), "Data+Stack size (kb)",
+	 L_statm},
+	{"TtPp", " SHR ", "%4.4s ", 4, SK_Kb, SF(SHR), "Shared Mem size (kb)",
+	 L_statm},
+	{"UuJj", "nFLT ", "%4.4s ", 4, SK_no, SF(FLT), "Page Fault count",
+	 L_stat},
+	{"VvSs", "nDRT ", "%4.4s ", 4, SK_no, SF(DRT), "Dirty Pages count",
+	 L_statm},
 #ifdef USE_LIB_STA3
-   { "WwVv", "STA ",        "%3.3s ",   -1,    -1, SF(STA), "Process Status",       L_stat   },
+	{"WwVv", "STA ", "%3.3s ", -1, -1, SF(STA), "Process Status", L_stat},
 #else
-   { "WwVv", "S ",          "%c ",      -1,    -1, SF(STA), "Process Status",       L_EITHER },
+	{"WwVv", "S ", "%c ", -1, -1, SF(STA), "Process Status", L_EITHER},
 #endif
-   // next entry's special: '.head' will be formatted using table entry's own
-   //                       '.fmts' plus runtime supplied conversion args!
-   { "XxXx", "Command ",    "%-*.*s ",  -1,    -1, SF(CMD), "Command name/line",    L_EITHER },
-   { "YyUu", "WCHAN     ",  "%-9.9s ",  -1,    -1, SF(WCH), "Sleeping in Function", L_stat   },
-   // next entry's special: the 0's will be replaced with '.'!
+	// next entry's special: '.head' will be formatted using table entry's own
+	//                       '.fmts' plus runtime supplied conversion args!
+	{"XxXx", "Command ", "%-*.*s ", -1, -1, SF(CMD), "Command name/line",
+	 L_EITHER},
+	{"YyUu", "WCHAN     ", "%-9.9s ", -1, -1, SF(WCH),
+	 "Sleeping in Function", L_stat},
+	// next entry's special: the 0's will be replaced with '.'!
 #ifdef CASEUP_HEXES
-   { "ZzZz", "Flags    ",   "%08lX ",   -1,    -1, SF(FLG), "Task Flags <sched.h>", L_stat   },
+	{"ZzZz", "Flags    ", "%08lX ", -1, -1, SF(FLG), "Task Flags <sched.h>",
+	 L_stat},
 #else
-   { "ZzZz", "Flags    ",   "%08lx ",   -1,    -1, SF(FLG), "Task Flags <sched.h>", L_stat   },
+	{"ZzZz", "Flags    ", "%08lx ", -1, -1, SF(FLG), "Task Flags <sched.h>",
+	 L_stat},
 #endif
 #if 0
-   { "..Qq", "  A ",        "%4.4s ",    4, SK_no, SF(PID), "Accessed Page count",  L_stat   },
-   { "..Nn", " TRS ",       "%4.4s ",    4, SK_Kb, SF(PID), "Code in memory (kb)",  L_stat   },
-   { "..Rr", " WP ",        "%4.4s ",    4, SK_no, SF(PID), "Unwritable Pages",     L_stat   },
-   { "Jj[{", "#C ",         "%2u ",     -1,    -1, SF(CPN), "Last used cpu (SMP)",  L_stat   },
-   { "..\\|","Bad ",        "%2u ",     -1,    -1, SF(CPN), "-- must ignore | --",  0        },
-   { "..]}", "Bad ",        "%2u ",     -1,    -1, SF(CPN), "-- not used --",       0        },
-   { "..^~", "Bad ",        "%2u ",     -1,    -1, SF(CPN), "-- not used --",       0        },
+	{"..Qq", "  A ", "%4.4s ", 4, SK_no, SF(PID), "Accessed Page count",
+	 L_stat},
+	{"..Nn", " TRS ", "%4.4s ", 4, SK_Kb, SF(PID), "Code in memory (kb)",
+	 L_stat},
+	{"..Rr", " WP ", "%4.4s ", 4, SK_no, SF(PID), "Unwritable Pages",
+	 L_stat},
+	{"Jj[{", "#C ", "%2u ", -1, -1, SF(CPN), "Last used cpu (SMP)", L_stat},
+	{"..\\|", "Bad ", "%2u ", -1, -1, SF(CPN), "-- must ignore | --", 0},
+	{"..]}", "Bad ", "%2u ", -1, -1, SF(CPN), "-- not used --", 0},
+	{"..^~", "Bad ", "%2u ", -1, -1, SF(CPN), "-- not used --", 0},
 #endif
 };
+
 #undef SF
 
+	/* All right, those-that-follow -- Listen Up!
+	 * For the above table keys and the following present/future rc file
+	 * compatibility support, you have Mr. Albert D. Cahalan to thank.
+	 * He must have been in a 'Christmas spirit'.  Were it left to me,
+	 * this top would never have gotten that close to the former top's
+	 * crufty rcfile.  Not only is it illogical, it's odoriferous !
+	 */
 
-        /* All right, those-that-follow -- Listen Up!
-         * For the above table keys and the following present/future rc file
-         * compatibility support, you have Mr. Albert D. Cahalan to thank.
-         * He must have been in a 'Christmas spirit'.  Were it left to me,
-         * this top would never have gotten that close to the former top's
-         * crufty rcfile.  Not only is it illogical, it's odoriferous !
-         */
-
-        // used as 'to' and/or 'from' args in the ft_xxx utilities...
+	// used as 'to' and/or 'from' args in the ft_xxx utilities...
 #define FT_NEW_fmt 0
 #define FT_OLD_fmt 2
 
-
 #if 0
-        // convert, or 0 for failure
-static int ft_cvt_char (const int fr, const int to, int c) {
-   int j = -1;
+	// convert, or 0 for failure
+static int ft_cvt_char(const int fr, const int to, int c)
+{
+	int j = -1;
 
-   while (++j < MAXTBL(Fieldstab)) {
-      if (c == Fieldstab[j].keys[fr])   return Fieldstab[j].keys[to];
-      if (c == Fieldstab[j].keys[fr+1]) return Fieldstab[j].keys[to+1];
-   }
-   return 0;
+	while (++j < MAXTBL(Fieldstab)) {
+		if (c == Fieldstab[j].keys[fr])
+			return Fieldstab[j].keys[to];
+		if (c == Fieldstab[j].keys[fr + 1])
+			return Fieldstab[j].keys[to + 1];
+	}
+	return 0;
 }
 #endif
 
-
-        // convert
-static inline int ft_get_char (const int fr, int i) {
-   int c;
-   if (i < 0) return 0;
-   if (i >= MAXTBL(Fieldstab)) return 0;
-   c = Fieldstab[i].keys[fr];
-   if (c == '.') c = 0;         // '.' marks a bad entry
-   return c;
+	// convert
+static inline int ft_get_char(const int fr, int i)
+{
+	int c;
+	if (i < 0)
+		return 0;
+	if (i >= MAXTBL(Fieldstab))
+		return 0;
+	c = Fieldstab[i].keys[fr];
+	if (c == '.')
+		c = 0;		// '.' marks a bad entry
+	return c;
 }
 
-
 #if 0
-        // convert, or -1 for failure
-static int ft_get_idx (const int fr, int c) {
-   int j = -1;
+	// convert, or -1 for failure
+static int ft_get_idx(const int fr, int c)
+{
+	int j = -1;
 
-   while (++j < MAXTBL(Fieldstab)) {
-      if (c == Fieldstab[j].keys[fr])   return j;
-      if (c == Fieldstab[j].keys[fr+1]) return j;
-   }
-   return -1;
+	while (++j < MAXTBL(Fieldstab)) {
+		if (c == Fieldstab[j].keys[fr])
+			return j;
+		if (c == Fieldstab[j].keys[fr + 1])
+			return j;
+	}
+	return -1;
 }
 #endif
 
+	// convert, or NULL for failure
+static const FLD_t *ft_get_ptr(const int fr, int c)
+{
+	int j = -1;
 
-        // convert, or NULL for failure
-static const FLD_t *ft_get_ptr (const int fr, int c) {
-   int j = -1;
-
-   while (++j < MAXTBL(Fieldstab)) {
-      if (c == Fieldstab[j].keys[fr])   return Fieldstab+j;
-      if (c == Fieldstab[j].keys[fr+1]) return Fieldstab+j;
-   }
-   return NULL;
+	while (++j < MAXTBL(Fieldstab)) {
+		if (c == Fieldstab[j].keys[fr])
+			return Fieldstab + j;
+		if (c == Fieldstab[j].keys[fr + 1])
+			return Fieldstab + j;
+	}
+	return NULL;
 }
 
-
 #if 0
-        // convert, or NULL for failure
-static const FLD_t *ft_idx_to_ptr (const int i) {
-   if (i < 0) return NULL;
-   if (i >= MAXTBL(Fieldstab)) return NULL;
-   return Fieldstab + i;
+	// convert, or NULL for failure
+static const FLD_t *ft_idx_to_ptr(const int i)
+{
+	if (i < 0)
+		return NULL;
+	if (i >= MAXTBL(Fieldstab))
+		return NULL;
+	return Fieldstab + i;
 }
 
-
-        // convert, or -1 for failure
-static int ft_ptr_to_idx (const FLD_t *p) {
-   int i;
-   if (p < Fieldstab) return -1;
-   i = p - Fieldstab;
-   if (i >= MAXTBL(Fieldstab)) return -1;
-   return i;
+	// convert, or -1 for failure
+static int ft_ptr_to_idx(const FLD_t * p)
+{
+	int i;
+	if (p < Fieldstab)
+		return -1;
+	i = p - Fieldstab;
+	if (i >= MAXTBL(Fieldstab))
+		return -1;
+	return i;
 }
 #endif
 
-
 #if 0
-static void rc_bugless (const RCF_t *const rc) {
-   const RCW_t *w;
-   int i = 0;
+static void rc_bugless(const RCF_t * const rc)
+{
+	const RCW_t *w;
+	int i = 0;
 
-   fprintf(stderr,"\n%d %d %f %d\n"
-      , rc->mode_altscr, rc->mode_irixps, rc->delay_time, rc->win_index);
-   while (i < 4) {
-      w = &rc->win[i++];
-      fprintf(stderr, "<%s> <%s> %d %08x %d %d %d %d %d\n"
-         , w->winname, w->fieldscur, w->sortindx, w->winflags, w->maxtasks
-         , w->summclr, w->msgsclr, w->headclr, w->taskclr);
-   }
+	fprintf(stderr, "\n%d %d %f %d\n", rc->mode_altscr, rc->mode_irixps,
+		rc->delay_time, rc->win_index);
+	while (i < 4) {
+		w = &rc->win[i++];
+		fprintf(stderr, "<%s> <%s> %d %08x %d %d %d %d %d\n",
+			w->winname, w->fieldscur, w->sortindx, w->winflags,
+			w->maxtasks, w->summclr, w->msgsclr, w->headclr,
+			w->taskclr);
+	}
 }
 #endif
 
+	/*
+	 * '$HOME/Rc_name' contains multiple lines - 2 global + 3 per window.
+	 *   line 1: an eyecatcher, with a shameless advertisement
+	 *   line 2: an id, Mode_altcsr, Mode_irixps, Delay_time and Curwin.
+	 * For each of the 4 windows:
+	 *   line a: contains winname, fieldscur
+	 *   line b: contains winflags, sortindx, maxtasks
+	 *   line c: contains summclr, msgsclr, headclr, taskclr
+	 *   line d: if present, would crash procps-3.1.1
+	 */
+static int rc_read_new(const char *const buf, RCF_t * rc)
+{
+	int i;
+	int cnt;
+	const char *cp;
 
-        /*
-         * '$HOME/Rc_name' contains multiple lines - 2 global + 3 per window.
-         *   line 1: an eyecatcher, with a shameless advertisement
-         *   line 2: an id, Mode_altcsr, Mode_irixps, Delay_time and Curwin.
-         * For each of the 4 windows:
-         *   line a: contains winname, fieldscur
-         *   line b: contains winflags, sortindx, maxtasks
-         *   line c: contains summclr, msgsclr, headclr, taskclr
-         *   line d: if present, would crash procps-3.1.1
-         */
-static int rc_read_new (const char *const buf, RCF_t *rc) {
-   int i;
-   int cnt;
-   const char *cp;
+	cp = strstr(buf, "\n\n" RCF_EYECATCHER);
+	if (!cp)
+		return -1;
+	cp = strchr(cp + 2, '\n');
+	if (!cp++)
+		return -2;
 
-   cp = strstr(buf, "\n\n" RCF_EYECATCHER);
-   if (!cp) return -1;
-   cp = strchr(cp + 2, '\n');
-   if (!cp++) return -2;
+	cnt =
+	    sscanf(cp,
+		   "Id:a, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%f, Curwin=%d\n",
+		   &rc->mode_altscr, &rc->mode_irixps, &rc->delay_time,
+		   &rc->win_index);
+	if (cnt != 4)
+		return -3;
+	cp = strchr(cp, '\n');
+	if (!cp++)
+		return -4;
 
-   cnt = sscanf(cp, "Id:a, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%f, Curwin=%d\n"
-      , &rc->mode_altscr, &rc->mode_irixps, &rc->delay_time, &rc->win_index);
-   if (cnt != 4) return -3;
-   cp = strchr(cp, '\n');
-   if (!cp++) return -4;
+	for (i = 0; i < GROUPSMAX; i++) {
+		RCW_t *ptr = &rc->win[i];
+		cnt =
+		    sscanf(cp, "%3s\tfieldscur=%31s\n", ptr->winname,
+			   ptr->fieldscur);
+		if (cnt != 2)
+			return 5 + 100 * i;	// OK to have less than 4 windows
+		if (WINNAMSIZ <= strlen(ptr->winname))
+			return -6;
+		if (strlen(DEF_FIELDS) != strlen(ptr->fieldscur))
+			return -7;
+		cp = strchr(cp, '\n');
+		if (!cp++)
+			return -(8 + 100 * i);
 
-   for (i = 0; i < GROUPSMAX; i++) {
-      RCW_t *ptr = &rc->win[i];
-      cnt = sscanf(cp, "%3s\tfieldscur=%31s\n", ptr->winname, ptr->fieldscur);
-      if (cnt != 2) return 5+100*i;  // OK to have less than 4 windows
-      if (WINNAMSIZ <= strlen(ptr->winname)) return -6;
-      if (strlen(DEF_FIELDS) != strlen(ptr->fieldscur)) return -7;
-      cp = strchr(cp, '\n');
-      if (!cp++) return -(8+100*i);
+		cnt =
+		    sscanf(cp, "\twinflags=%d, sortindx=%u, maxtasks=%d \n",
+			   &ptr->winflags, &ptr->sortindx, &ptr->maxtasks);
+		if (cnt != 3)
+			return -(9 + 100 * i);
+		cp = strchr(cp, '\n');
+		if (!cp++)
+			return -(10 + 100 * i);
 
-      cnt = sscanf(cp, "\twinflags=%d, sortindx=%u, maxtasks=%d \n"
-         , &ptr->winflags, &ptr->sortindx, &ptr->maxtasks);
-      if (cnt != 3) return -(9+100*i);
-      cp = strchr(cp, '\n');
-      if (!cp++) return -(10+100*i);
-
-      cnt = sscanf(cp, "\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d \n"
-         , &ptr->summclr, &ptr->msgsclr, &ptr->headclr, &ptr->taskclr);
-      if (cnt != 4) return -(11+100*i);
-      cp = strchr(cp, '\n');
-      if (!cp++) return -(12+100*i);
-      while (*cp == '\t') {  // skip unknown per-window settings
-        cp = strchr(cp, '\n');
-        if (!cp++) return -(13+100*i);
-      }
-   }
-   return 13;
+		cnt =
+		    sscanf(cp,
+			   "\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d \n",
+			   &ptr->summclr, &ptr->msgsclr, &ptr->headclr,
+			   &ptr->taskclr);
+		if (cnt != 4)
+			return -(11 + 100 * i);
+		cp = strchr(cp, '\n');
+		if (!cp++)
+			return -(12 + 100 * i);
+		while (*cp == '\t') {	// skip unknown per-window settings
+			cp = strchr(cp, '\n');
+			if (!cp++)
+				return -(13 + 100 * i);
+		}
+	}
+	return 13;
 }
 
+static int rc_read_old(const char *const buf, RCF_t * rc)
+{
+	const char std[] =
+	    "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzJj......";
+	const char old[] =
+	    "AaBb..CcDd..GgHhIiYyEeWw..FfMmOoTtKkLlPpJjSsVvXxUuZz[{QqNnRr";
+	unsigned u;
+	const char *cp;
+	unsigned c_show = 0;
+	int badchar = 0;	// allow a limited number of duplicates and junk
 
+	char scoreboard[256];
+	memset(scoreboard, '\0', sizeof scoreboard);
 
-static int rc_read_old (const char *const buf, RCF_t *rc) {
-   const char std[] = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzJj......";
-   const char old[] = "AaBb..CcDd..GgHhIiYyEeWw..FfMmOoTtKkLlPpJjSsVvXxUuZz[{QqNnRr";
-   unsigned u;
-   const char *cp;
-   unsigned c_show = 0;
-   int badchar = 0;     // allow a limited number of duplicates and junk
-
-   char scoreboard[256];
-   memset(scoreboard, '\0', sizeof scoreboard);
-
-   cp = buf+2;  // skip the "\n\n" we stuck at the beginning
-   u = 0;
-   for (;;) {
-      const char *tmp;
-      int c = *cp++;
-      if (u+1 >= sizeof rc->win[0].fieldscur) return -1;
-      if (c == '\0') return -2;
-      if (c == '\n') break;
-      if (c & ~0x7f) return -3;
-      if (~c & 0x20) c_show |= 1 << (c & 0x1f); // 0x20 means lowercase means hidden
-      if (scoreboard[c|0xe0u]) badchar++;       // duplicates not allowed
-      scoreboard[c|0xe0u]++;
-      tmp = strchr(old,c);
-      if (!tmp) continue;
-      c = *((tmp-old)+std);
-      if (c == '.') continue;
-      if (scoreboard[c&0x1fu]) badchar++;       // duplicates not allowed
-      scoreboard[c&0x1fu]++;
-      rc->win[0].fieldscur[u++] = c;
-   }
-   rc->win[0].fieldscur[u++] = '\0';
-   if (u < 21) return -6;  // catch junk, not good files (had 23 chars in one)
-   if (u > 33) return -7;  // catch junk, not good files (had 29 chars in one)
+	cp = buf + 2;		// skip the "\n\n" we stuck at the beginning
+	u = 0;
+	for (;;) {
+		const char *tmp;
+		int c = *cp++;
+		if (u + 1 >= sizeof rc->win[0].fieldscur)
+			return -1;
+		if (c == '\0')
+			return -2;
+		if (c == '\n')
+			break;
+		if (c & ~0x7f)
+			return -3;
+		if (~c & 0x20)
+			c_show |= 1 << (c & 0x1f);	// 0x20 means lowercase means hidden
+		if (scoreboard[c | 0xe0u])
+			badchar++;	// duplicates not allowed
+		scoreboard[c | 0xe0u]++;
+		tmp = strchr(old, c);
+		if (!tmp)
+			continue;
+		c = *((tmp - old) + std);
+		if (c == '.')
+			continue;
+		if (scoreboard[c & 0x1fu])
+			badchar++;	// duplicates not allowed
+		scoreboard[c & 0x1fu]++;
+		rc->win[0].fieldscur[u++] = c;
+	}
+	rc->win[0].fieldscur[u++] = '\0';
+	if (u < 21)
+		return -6;	// catch junk, not good files (had 23 chars in one)
+	if (u > 33)
+		return -7;	// catch junk, not good files (had 29 chars in one)
 // fprintf(stderr, "badchar: %d\n", badchar); sleep(2);
-   if (badchar > 8) return -8;          // too much junk
-   if (!c_show) return -9;              // nothing was shown
+	if (badchar > 8)
+		return -8;	// too much junk
+	if (!c_show)
+		return -9;	// nothing was shown
 
-   // rest of file is optional, but better look right if it exists
-   if (!*cp) return 12;
-   if (*cp < '2' || *cp > '9') return -13; // stupid, and why isn't '1' valid?
-   rc->delay_time = *cp - '0';
+	// rest of file is optional, but better look right if it exists
+	if (!*cp)
+		return 12;
+	if (*cp < '2' || *cp > '9')
+		return -13;	// stupid, and why isn't '1' valid?
+	rc->delay_time = *cp - '0';
 
-   memset(scoreboard, '\0', sizeof(scoreboard));
-   for (;;) {
-      int c = *++cp & 0xffu;    // protect scoreboard[] from negative char
-      if (!c) return -14;       // not OK to hit EOL w/o '\n'
-      if (c == '\n') break;
-      switch (c) {
-         case ' ':
-         case '.':
-         case '0' ... '9':
-            return -15;                 // not supposed to have digits here
+	memset(scoreboard, '\0', sizeof(scoreboard));
+	for (;;) {
+		int c = *++cp & 0xffu;	// protect scoreboard[] from negative char
+		if (!c)
+			return -14;	// not OK to hit EOL w/o '\n'
+		if (c == '\n')
+			break;
+		switch (c) {
+		case ' ':
+		case '.':
+		case '0' ... '9':
+			return -15;	// not supposed to have digits here
 
 //       case 's':                      // mostly for global rcfile
 //          rc->mode_secure = 1;
 //          break;
-         case 'S':
-            rc->win[0].winflags |= Show_CTIMES;
-            break;
-         case 'c':
-            rc->win[0].winflags |= Show_CMDLIN;
-            break;
-         case 'i':
-            rc->win[0].winflags &= ~Show_IDLEPS;
-            break;
-         case 'H':                      // 'H' = show threads (yea, sure)
-            //rc->win[0].winflags |= ;
-            break;
-         case 'm':
-            rc->win[0].winflags &= ~View_MEMORY;
-            break;
-         case 'l':
-            rc->win[0].winflags &= ~View_LOADAV;
-            break;
-         case 't':
-            rc->win[0].winflags &= ~View_STATES;
-            break;
-         case 'I':
-            rc->mode_irixps = 0;
-            break;
+		case 'S':
+			rc->win[0].winflags |= Show_CTIMES;
+			break;
+		case 'c':
+			rc->win[0].winflags |= Show_CMDLIN;
+			break;
+		case 'i':
+			rc->win[0].winflags &= ~Show_IDLEPS;
+			break;
+		case 'H':	// 'H' = show threads (yea, sure)
+			//rc->win[0].winflags |= ;
+			break;
+		case 'm':
+			rc->win[0].winflags &= ~View_MEMORY;
+			break;
+		case 'l':
+			rc->win[0].winflags &= ~View_LOADAV;
+			break;
+		case 't':
+			rc->win[0].winflags &= ~View_STATES;
+			break;
+		case 'I':
+			rc->mode_irixps = 0;
+			break;
 
-         case 'M':
-            c = 0; // for scoreboard
-            rc->win[0].sortindx = P_MEM;
-            break;
-         case 'P':
-            c = 0; // for scoreboard
-            rc->win[0].sortindx = P_CPU;
-            break;
-         case 'A':                      // supposed to be start_time
-            c = 0; // for scoreboard
-            rc->win[0].sortindx = P_PID;
-            break;
-         case 'T':
-            c = 0; // for scoreboard
-            rc->win[0].sortindx = P_TM2;
-            break;
-         case 'N':
-            c = 0; // for scoreboard
-            rc->win[0].sortindx = P_PID;
-            break;
+		case 'M':
+			c = 0;	// for scoreboard
+			rc->win[0].sortindx = P_MEM;
+			break;
+		case 'P':
+			c = 0;	// for scoreboard
+			rc->win[0].sortindx = P_CPU;
+			break;
+		case 'A':	// supposed to be start_time
+			c = 0;	// for scoreboard
+			rc->win[0].sortindx = P_PID;
+			break;
+		case 'T':
+			c = 0;	// for scoreboard
+			rc->win[0].sortindx = P_TM2;
+			break;
+		case 'N':
+			c = 0;	// for scoreboard
+			rc->win[0].sortindx = P_PID;
+			break;
 
-         default:
-            // just ignore it, except for the scoreboard of course
-            break;
-      }
-      if (scoreboard[c]) return -16;    // duplicates not allowed
-      scoreboard[c] = 1;
-   }
-   return 17;
+		default:
+			// just ignore it, except for the scoreboard of course
+			break;
+		}
+		if (scoreboard[c])
+			return -16;	// duplicates not allowed
+		scoreboard[c] = 1;
+	}
+	return 17;
 }
 
+static void rc_write_new(FILE * fp)
+{
+	int i;
 
-static void rc_write_new (FILE *fp) {
-   int i;
+	fprintf(fp,
+		RCF_EYECATCHER "\"%s with windows\"\t\t# shameless braggin'\n",
+		Myname);
+	fprintf(fp,
+		RCF_DEPRECATED
+		"Mode_altscr=%d, Mode_irixps=%d, Delay_time=%.3f, Curwin=%d\n",
+		Rc.mode_altscr, Rc.mode_irixps, Rc.delay_time, Curwin - Winstk);
+	for (i = 0; i < GROUPSMAX; i++) {
+		char buf[40];
+		char *cp = Winstk[i].rc.fieldscur;
+		int j = 0;
 
-   fprintf(fp, RCF_EYECATCHER "\"%s with windows\"\t\t# shameless braggin'\n"
-      , Myname);
-   fprintf(fp, RCF_DEPRECATED
-      "Mode_altscr=%d, Mode_irixps=%d, Delay_time=%.3f, Curwin=%d\n"
-      , Rc.mode_altscr, Rc.mode_irixps, Rc.delay_time, Curwin - Winstk);
-   for (i = 0; i < GROUPSMAX; i++) {
-      char buf[40];
-      char *cp = Winstk[i].rc.fieldscur;
-      int j = 0;
-
-      while (j < 36) {
-         int c = *cp++ & 0xff;
-         switch (c) {
-            case '.':
-            case 1 ... ' ':
-            case 0x7f ... 0xff:
-               continue;                // throw away junk (some of it)
-            default:
-               buf[j++] = c;            // gets the '\0' too
-         }
-         if (!c) break;
-      }
-      fprintf(fp, "%s\tfieldscur=%s\n"
-         , Winstk[i].rc.winname, buf);
-      fprintf(fp, "\twinflags=%d, sortindx=%d, maxtasks=%d\n"
-         , Winstk[i].rc.winflags, Winstk[i].rc.sortindx, Winstk[i].rc.maxtasks);
-      fprintf(fp, "\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d\n"
-         , Winstk[i].rc.summclr, Winstk[i].rc.msgsclr
-         , Winstk[i].rc.headclr, Winstk[i].rc.taskclr);
-   }
+		while (j < 36) {
+			int c = *cp++ & 0xff;
+			switch (c) {
+			case '.':
+			case 1 ... ' ':
+			case 0x7f ... 0xff:
+				continue;	// throw away junk (some of it)
+			default:
+				buf[j++] = c;	// gets the '\0' too
+			}
+			if (!c)
+				break;
+		}
+		fprintf(fp, "%s\tfieldscur=%s\n", Winstk[i].rc.winname, buf);
+		fprintf(fp, "\twinflags=%d, sortindx=%d, maxtasks=%d\n",
+			Winstk[i].rc.winflags, Winstk[i].rc.sortindx,
+			Winstk[i].rc.maxtasks);
+		fprintf(fp,
+			"\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d\n",
+			Winstk[i].rc.summclr, Winstk[i].rc.msgsclr,
+			Winstk[i].rc.headclr, Winstk[i].rc.taskclr);
+	}
 }
 
 #if 0
-static void rc_write_old (FILE *fp) {
-   char buf[SMLBUFSIZ];
-   char *cp = Curwin->rc.fieldscur;
-   int j = 0;
-   int tmp;
+static void rc_write_old(FILE * fp)
+{
+	char buf[SMLBUFSIZ];
+	char *cp = Curwin->rc.fieldscur;
+	int j = 0;
+	int tmp;
 
-   while (j < 36) {
-      int c = *cp++ & 0xff;
-      if (c == 'M') c = 'L';
-      if (c == 'm') c = 'l';
-      switch (c) {
-         case '.':
-         case 'x':              // try not to crash Rik's top (move COMMAND)
-         case 'X':              // try not to crash Rik's top (move COMMAND)
-         case 1 ... ' ':
-         case 0x7f ... 0xff:
-            continue;           // throw away junk (some of it)
-         default:
-            c = ft_cvt_char(FT_NEW_fmt, FT_OLD_fmt, c);
-            if (!c) continue;   // skip one we can't represent
-            break;
-         case '\0':
-            buf[j++] = 'X';     // try not to crash Rik's top (move COMMAND)
-            break;
-      }
-      buf[j++] = c;
-      if (!c) break;
-   }
+	while (j < 36) {
+		int c = *cp++ & 0xff;
+		if (c == 'M')
+			c = 'L';
+		if (c == 'm')
+			c = 'l';
+		switch (c) {
+		case '.':
+		case 'x':	// try not to crash Rik's top (move COMMAND)
+		case 'X':	// try not to crash Rik's top (move COMMAND)
+		case 1 ... ' ':
+		case 0x7f ... 0xff:
+			continue;	// throw away junk (some of it)
+		default:
+			c = ft_cvt_char(FT_NEW_fmt, FT_OLD_fmt, c);
+			if (!c)
+				continue;	// skip one we can't represent
+			break;
+		case '\0':
+			buf[j++] = 'X';	// try not to crash Rik's top (move COMMAND)
+			break;
+		}
+		buf[j++] = c;
+		if (!c)
+			break;
+	}
 
-   fprintf(fp, "%s\n", buf);
-   cp = buf;
+	fprintf(fp, "%s\n", buf);
+	cp = buf;
 
-   tmp = (int)(Rc.delay_time + 0.5);
-   if (tmp < 2) tmp = 2;
-   if (tmp > 9) tmp = 9;
-   *cp++ = tmp + '0';
+	tmp = (int)(Rc.delay_time + 0.5);
+	if (tmp < 2)
+		tmp = 2;
+	if (tmp > 9)
+		tmp = 9;
+	*cp++ = tmp + '0';
 
-   tmp = Curwin->rc.winflags;
+	tmp = Curwin->rc.winflags;
 // if (Secure_mode)       *cp++ = 's';     // stupid to have in local rcfile
-   if (tmp & Show_CTIMES) *cp++ = 'S';
-   if (tmp & Show_CMDLIN) *cp++ = 'c';
-   if (~tmp & Show_IDLEPS) *cp++ = 'i';
+	if (tmp & Show_CTIMES)
+		*cp++ = 'S';
+	if (tmp & Show_CMDLIN)
+		*cp++ = 'c';
+	if (~tmp & Show_IDLEPS)
+		*cp++ = 'i';
 // if () *cp++ = 'H';     // 'H' = show threads (yea, sure)
-   if (~tmp & View_MEMORY) *cp++ = 'm';
-   if (~tmp & View_LOADAV) *cp++ = 'l';
-   if (~tmp & View_STATES) *cp++ = 't';
-   if (!Rc.mode_irixps)    *cp++ = 'I';
+	if (~tmp & View_MEMORY)
+		*cp++ = 'm';
+	if (~tmp & View_LOADAV)
+		*cp++ = 'l';
+	if (~tmp & View_STATES)
+		*cp++ = 't';
+	if (!Rc.mode_irixps)
+		*cp++ = 'I';
 
-   switch (Curwin->rc.sortindx) {
-      case P_MEM:
-         *cp++ = 'M';
-         break;
-      case P_CPU:
-         *cp++ = 'P';
-         break;
+	switch (Curwin->rc.sortindx) {
+	case P_MEM:
+		*cp++ = 'M';
+		break;
+	case P_CPU:
+		*cp++ = 'P';
+		break;
 //    case P_???:                           // was by start_time (non-display)
 //       *cp++ = 'A';
 //       break;
-      case P_TM2:
-         *cp++ = 'T';
-         break;
-      case P_PID:
-         *cp++ = 'N';
-         break;
-   }
-   *cp++ = '\0';
-   fprintf(fp, "%s\n\n\n", buf);            // important "\n\n" separator!
+	case P_TM2:
+		*cp++ = 'T';
+		break;
+	case P_PID:
+		*cp++ = 'N';
+		break;
+	}
+	*cp++ = '\0';
+	fprintf(fp, "%s\n\n\n", buf);	// important "\n\n" separator!
 }
 #endif
 
-static const char *rc_write_whatever (void) {
-   FILE *fp = fopen(Rc_name, "w");
+static const char *rc_write_whatever(void)
+{
+	FILE *fp = fopen(Rc_name, "w");
 
-   if (!fp) return strerror(errno);
+	if (!fp)
+		return strerror(errno);
 //   if (Crufty_rcf) rc_write_old(fp);
-   rc_write_new(fp);
-   fclose(fp);
-   return NULL;
+	rc_write_new(fp);
+	fclose(fp);
+	return NULL;
 }
 
-
 /*######  Startup routines  ##############################################*/
 
 #ifdef PRETEND4CPUS
 #define smp_num_cpus 4
 #endif
 
-        /*
-         * No mater what *they* say, we handle the really really BIG and
-         * IMPORTANT stuff upon which all those lessor functions depend! */
-static void before (char *me)
+	/*
+	 * No mater what *they* say, we handle the really really BIG and
+	 * IMPORTANT stuff upon which all those lessor functions depend! */
+static void before(char *me)
 {
-   int i;
+	int i;
 
-      /* setup our program name -- big! */
-   Myname = strrchr(me, '/');
-   if (Myname) ++Myname; else Myname = me;
+	/* setup our program name -- big! */
+	Myname = strrchr(me, '/');
+	if (Myname)
+		++Myname;
+	else
+		Myname = me;
 
-      /* establish cpu particulars -- even bigger! */
-   Cpu_tot = smp_num_cpus;
-   Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot);
-   for (i = 0; i < Cpu_tot; i++)
-      Cpu_map[i] = i;
-   if (linux_version_code > LINUX_VERSION(2, 5, 41))
-      States_fmts = STATES_line2x5;
+	/* establish cpu particulars -- even bigger! */
+	Cpu_tot = smp_num_cpus;
+	Cpu_map = alloc_r(NULL, sizeof(int) * Cpu_tot);
+	for (i = 0; i < Cpu_tot; i++)
+		Cpu_map[i] = i;
+	if (linux_version_code > LINUX_VERSION(2, 5, 41))
+		States_fmts = STATES_line2x5;
 
-      /* get virtual page size -- nearing huge! */
-   Page_size = getpagesize();
+	/* get virtual page size -- nearing huge! */
+	Page_size = getpagesize();
 }
 
-
        /*
         * Config file read *helper* function.
         * Anything missing won't show as a choice in the field editor,
@@ -1577,1428 +1675,1580 @@
         * has 3 ("three"!!!) instances of "#C", "LC", or "CPU". Fix that too.
         * Some people are maintainers, and others are human patchbots.
         * (thanks, Albert) */
-static void confighlp (char *fields) {
-   unsigned upper[PFLAGSSIZ];
-   unsigned lower[PFLAGSSIZ];
-   char c;
-   char *cp;
+static void confighlp(char *fields)
+{
+	unsigned upper[PFLAGSSIZ];
+	unsigned lower[PFLAGSSIZ];
+	char c;
+	char *cp;
 
-   memset(upper, '\0', sizeof upper);
-   memset(lower, '\0', sizeof lower);
+	memset(upper, '\0', sizeof upper);
+	memset(lower, '\0', sizeof lower);
 
-   cp = fields;
-   for (;;) {
-      c = *cp++;
-      if (!c) break;
-      if (isupper(c)) upper[c&0x1f]++;
-      else           lower[c&0x1f]++;
-   }
+	cp = fields;
+	for (;;) {
+		c = *cp++;
+		if (!c)
+			break;
+		if (isupper(c))
+			upper[c & 0x1f]++;
+		else
+			lower[c & 0x1f]++;
+	}
 
-   c = 'a';
-   while (c <= 'z') {
-      if (upper[c&0x1f] && lower[c&0x1f]) {
-         lower[c&0x1f] = 0;             // got both, so wipe out unseen column
-         for (;;) {
-            cp = strchr(fields, c);
-            if (cp) memmove(cp, cp+1, strlen(cp));
-            else break;
-         }
-      }
-      while (lower[c&0x1f] > 1) {               // got too many a..z
-         lower[c&0x1f]--;
-         cp = strchr(fields, c);
-         memmove(cp, cp+1, strlen(cp));
-      }
-      while (upper[c&0x1f] > 1) {               // got too many A..Z
-         upper[c&0x1f]--;
-         cp = strchr(fields, toupper(c));
-         memmove(cp, cp+1, strlen(cp));
-      }
-      if (!upper[c&0x1f] && !lower[c&0x1f]) {   // both missing
-         lower[c&0x1f]++;
-         memmove(fields+1, fields, strlen(fields)+1);
-         fields[0] = c;
-      }
-      c++;
-   }
+	c = 'a';
+	while (c <= 'z') {
+		if (upper[c & 0x1f] && lower[c & 0x1f]) {
+			lower[c & 0x1f] = 0;	// got both, so wipe out unseen column
+			for (;;) {
+				cp = strchr(fields, c);
+				if (cp)
+					memmove(cp, cp + 1, strlen(cp));
+				else
+					break;
+			}
+		}
+		while (lower[c & 0x1f] > 1) {	// got too many a..z
+			lower[c & 0x1f]--;
+			cp = strchr(fields, c);
+			memmove(cp, cp + 1, strlen(cp));
+		}
+		while (upper[c & 0x1f] > 1) {	// got too many A..Z
+			upper[c & 0x1f]--;
+			cp = strchr(fields, toupper(c));
+			memmove(cp, cp + 1, strlen(cp));
+		}
+		if (!upper[c & 0x1f] && !lower[c & 0x1f]) {	// both missing
+			lower[c & 0x1f]++;
+			memmove(fields + 1, fields, strlen(fields) + 1);
+			fields[0] = c;
+		}
+		c++;
+	}
 }
 
-
-        /*
-         * First attempt to read the /etc/rcfile which contains two lines
-         * consisting of the secure mode switch and an update interval.
-         * It's presence limits what ordinary users are allowed to do.
-         * (it's actually an old-style config file)
-         *
-         * Then build the local rcfile name and try to read a crufty old-top
-         * rcfile (whew, odoriferous), which may contain an embedded new-style
-         * rcfile.   Whether embedded or standalone, new-style rcfile values
-         * will always override that crufty stuff!
-         * note: If running in secure mode via the /etc/rcfile,
-         *       Delay_time will be ignored except for root. */
-static void configs_read (void)
+	/*
+	 * First attempt to read the /etc/rcfile which contains two lines
+	 * consisting of the secure mode switch and an update interval.
+	 * It's presence limits what ordinary users are allowed to do.
+	 * (it's actually an old-style config file)
+	 *
+	 * Then build the local rcfile name and try to read a crufty old-top
+	 * rcfile (whew, odoriferous), which may contain an embedded new-style
+	 * rcfile.   Whether embedded or standalone, new-style rcfile values
+	 * will always override that crufty stuff!
+	 * note: If running in secure mode via the /etc/rcfile,
+	 *       Delay_time will be ignored except for root. */
+static void configs_read(void)
 {
-   const RCF_t def_rcf = DEF_RCFILE;
-   char fbuf[MEDBUFSIZ];
-   int i, fd;
-   RCF_t rcf;
-   float delay = Rc.delay_time;
+	const RCF_t def_rcf = DEF_RCFILE;
+	char fbuf[MEDBUFSIZ];
+	int i, fd;
+	RCF_t rcf;
+	float delay = Rc.delay_time;
 
-   // read part of an old-style config in /etc/toprc
-   fd = open(SYS_RCFILESPEC, O_RDONLY);
-   if (fd > 0) {
-      ssize_t num;
-      num = read(fd, fbuf, sizeof(fbuf) - 1);
-      if (num > 0) {
-         const char *sec = strchr(fbuf, 's');
-         const char *eol = strchr(fbuf, '\n');
-         if (eol) {
-            const char *two = eol + 1;  // line two
-            if (sec < eol) Secure_mode = !!sec;
-            eol = strchr(two, '\n');
-            if (eol && eol > two && isdigit(*two)) Rc.delay_time = atof(two);
-         }
-      }
-      close(fd);
-   }
+	// read part of an old-style config in /etc/toprc
+	fd = open(SYS_RCFILESPEC, O_RDONLY);
+	if (fd > 0) {
+		ssize_t num;
+		num = read(fd, fbuf, sizeof(fbuf) - 1);
+		if (num > 0) {
+			const char *sec = strchr(fbuf, 's');
+			const char *eol = strchr(fbuf, '\n');
+			if (eol) {
+				const char *two = eol + 1;	// line two
+				if (sec < eol)
+					Secure_mode = ! !sec;
+				eol = strchr(two, '\n');
+				if (eol && eol > two && isdigit(*two))
+					Rc.delay_time = atof(two);
+			}
+		}
+		close(fd);
+	}
 
-   snprintf(Rc_name, sizeof(Rc_name), ".%src", Myname);  // eeew...
-   if (getenv("HOME"))
-      snprintf(Rc_name, sizeof(Rc_name), "%s/.%src", getenv("HOME"), Myname);
+	snprintf(Rc_name, sizeof(Rc_name), ".%src", Myname);	// eeew...
+	if (getenv("HOME"))
+		snprintf(Rc_name, sizeof(Rc_name), "%s/.%src", getenv("HOME"),
+			 Myname);
 
-   rcf = def_rcf;
-   fd = open(Rc_name, O_RDONLY);
-   if (fd > 0) {
-      ssize_t num;
-      num = read(fd, fbuf+2, sizeof(fbuf) -3);
-      if (num > 0) {
-         fbuf[0] = '\n';
-         fbuf[1] = '\n';
-         fbuf[num+2] = '\0';
+	rcf = def_rcf;
+	fd = open(Rc_name, O_RDONLY);
+	if (fd > 0) {
+		ssize_t num;
+		num = read(fd, fbuf + 2, sizeof(fbuf) - 3);
+		if (num > 0) {
+			fbuf[0] = '\n';
+			fbuf[1] = '\n';
+			fbuf[num + 2] = '\0';
 //fprintf(stderr,"rc_read_old returns %d\n",rc_read_old(fbuf, &rcf));
 //sleep(2);
-         if (rc_read_new(fbuf, &rcf) < 0) {
-            rcf = def_rcf;                       // on failure, maybe mangled
-            if (rc_read_old(fbuf, &rcf) < 0) rcf = def_rcf;
-         }
-         delay = rcf.delay_time;
-      }
-      close(fd);
-   }
+			if (rc_read_new(fbuf, &rcf) < 0) {
+				rcf = def_rcf;	// on failure, maybe mangled
+				if (rc_read_old(fbuf, &rcf) < 0)
+					rcf = def_rcf;
+			}
+			delay = rcf.delay_time;
+		}
+		close(fd);
+	}
+	// update Rc defaults, establish a Curwin and fix up the window stack
+	Rc.mode_altscr = rcf.mode_altscr;
+	Rc.mode_irixps = rcf.mode_irixps;
+	if (rcf.win_index >= GROUPSMAX)
+		rcf.win_index = 0;
+	Curwin = &Winstk[rcf.win_index];
+	for (i = 0; i < GROUPSMAX; i++) {
+		memcpy(&Winstk[i].rc, &rcf.win[i], sizeof rcf.win[i]);
+		confighlp(Winstk[i].rc.fieldscur);
+	}
 
-   // update Rc defaults, establish a Curwin and fix up the window stack
-   Rc.mode_altscr = rcf.mode_altscr;
-   Rc.mode_irixps = rcf.mode_irixps;
-   if (rcf.win_index >= GROUPSMAX) rcf.win_index = 0;
-   Curwin = &Winstk[rcf.win_index];
-   for (i = 0; i < GROUPSMAX; i++) {
-      memcpy(&Winstk[i].rc, &rcf.win[i], sizeof rcf.win[i]);
-      confighlp(Winstk[i].rc.fieldscur);
-   }
-
-   // lastly, establish the true runtime secure mode and delay time
-   if (!getuid()) Secure_mode = 0;
-   if (!Secure_mode) Rc.delay_time = delay;
+	// lastly, establish the true runtime secure mode and delay time
+	if (!getuid())
+		Secure_mode = 0;
+	if (!Secure_mode)
+		Rc.delay_time = delay;
 }
 
-
-        /*
-         * Parse command line arguments.
-         * Note: it's assumed that the rc file(s) have already been read
-         *       and our job is to see if any of those options are to be
-         *       overridden -- we'll force some on and negate others in our
-         *       best effort to honor the loser's (oops, user's) wishes... */
+	/*
+	 * Parse command line arguments.
+	 * Note: it's assumed that the rc file(s) have already been read
+	 *       and our job is to see if any of those options are to be
+	 *       overridden -- we'll force some on and negate others in our
+	 *       best effort to honor the loser's (oops, user's) wishes... */
 #define BUFF_SIZE 256
-static void parse_args (char **args)
+static void parse_args(char **args)
 {
-   /* differences between us and the former top:
-      -o filename to output data to at each measurement interval
-      -f filename to read output data from to calculate averages
-      -C (separate CPU states for SMP) is left to an rcfile
-      -p (pid monitoring) allows a comma delimited list
-      -q (zero delay) eliminated as redundant, incomplete and inappropriate
-            use: "nice -n-10 top -d0" to achieve what was only claimed
-      -c,i,S act as toggles (not 'on' switches) for enhanced user flexibility
-      .  no deprecated/illegal use of 'breakargv:' with goto
-      .  bunched args are actually handled properly and none are ignored
-      .  we tolerate NO whitespace and NO switches -- maybe too tolerant? */
-   static const char usage[] =
-      " -hv | -bcisS -d delay -n iterations [-u user | -U user] -o filename -p pid [,pid ...] | -f filename";
-   float tmp_delay = MAXFLOAT;
-   char *p;
-   char  buff[BUFF_SIZE];
-   int   retcode;
-   int   loopcntr = 0;
+	/* differences between us and the former top:
+	   -o filename to output data to at each measurement interval
+	   -f filename to read output data from to calculate averages
+	   -C (separate CPU states for SMP) is left to an rcfile
+	   -p (pid monitoring) allows a comma delimited list
+	   -q (zero delay) eliminated as redundant, incomplete and inappropriate
+	   use: "nice -n-10 top -d0" to achieve what was only claimed
+	   -c,i,S act as toggles (not 'on' switches) for enhanced user flexibility
+	   .  no deprecated/illegal use of 'breakargv:' with goto
+	   .  bunched args are actually handled properly and none are ignored
+	   .  we tolerate NO whitespace and NO switches -- maybe too tolerant? */
+	static const char usage[] =
+	    " -hv | -bcisS -d delay -n iterations [-u user | -U user] -o filename -p pid [,pid ...] | -f filename";
+	float tmp_delay = MAXFLOAT;
+	char *p;
+	char buff[BUFF_SIZE];
+	int retcode;
+	int loopcntr = 0;
 
-   int   Task1,Task2,Task3,Task4,Task5;
-   float AvgMaxTasks=0.0,AvgRunningTasks=0.0,AvgSleepingTasks=0.0,AvgStoppedTasks=0.0,AvgZombieTasks=0.0;
+	int Task1, Task2, Task3, Task4, Task5;
+	float AvgMaxTasks = 0.0, AvgRunningTasks = 0.0, AvgSleepingTasks =
+	    0.0, AvgStoppedTasks = 0.0, AvgZombieTasks = 0.0;
 
-   float CPU1,CPU2,CPU3,CPU4,CPU5;
-   float AvgCPUuser=0.0,AvgCPUsys=0.0,AvgCPUnice=0.0,AvgCPUidle=0.0,AvgCPUiowait=0.0;
+	float CPU1, CPU2, CPU3, CPU4, CPU5;
+	float AvgCPUuser = 0.0, AvgCPUsys = 0.0, AvgCPUnice = 0.0, AvgCPUidle =
+	    0.0, AvgCPUiowait = 0.0;
 
-   int   Mem1,Mem2,Mem3,Mem4;
-   int   AvgMem1=0;
-   long double AvgMem2=0.0,AvgMem3=0.0,AvgMem4=0.0,UsedMemPercentage=0.0;
-   int   AvgSwap1=0;
-   long double AvgSwap2=0.0,AvgSwap3=0.0,AvgSwap4=0.0,UsedSwapPercentage=0.0;
+	int Mem1, Mem2, Mem3, Mem4;
+	int AvgMem1 = 0;
+	long double AvgMem2 = 0.0, AvgMem3 = 0.0, AvgMem4 =
+	    0.0, UsedMemPercentage = 0.0;
+	int AvgSwap1 = 0;
+	long double AvgSwap2 = 0.0, AvgSwap3 = 0.0, AvgSwap4 =
+	    0.0, UsedSwapPercentage = 0.0;
 
-   while (*args) {
-      const char *cp = *(args++);
+	while (*args) {
+		const char *cp = *(args++);
 
-      while (*cp) {
-         switch (*cp) {
-            case '\0':
-            case '-':
-               break;
-            case 'b':
-               Batch = 1;
-               break;
-            case 'c':
-               TOGw(Curwin, Show_CMDLIN);
-               break;
-            case 'd':
-               if (cp[1]) ++cp;
-               else if (*args) cp = *args++;
-               else std_err("-d requires argument");
-                  /* a negative delay will be dealt with shortly... */
-               if (1 != sscanf(cp, "%f", &tmp_delay))
-                  std_err(fmtmk("bad delay '%s'", cp));
-               break;
-	    case 'f':
-               if (cp[1]) cp++;
-               else if (*args) cp = *args++;
-               else std_err("-f requires argument");
-	       if ((datafile = fopen(cp,"r")) == NULL)
-	          std_err(fmtmk("bad file arg; failed to fopen '%s' for reading",cp));
-	       retcode = fscanf(datafile, " MaxTasks:%d RunningTasks:%d SleepingTasks:%d StoppedTasks:%d ZombieTasks:%d",
-		                &Task1, &Task2, &Task3, &Task4, &Task5);
-	       while ( retcode == 5 )
-               {
-		  loopcntr++;
-                  fgets(buff, BUFF_SIZE, datafile);
-		  AvgMaxTasks+=Task1;
-	          AvgRunningTasks+=Task2;
-	          AvgSleepingTasks+=Task3;
-                  AvgStoppedTasks+=Task4;
-                  AvgZombieTasks+=Task5;
-		  fscanf(datafile, " Cpu(s): User:%f\tSystem:%f\tNice:%f\t\tIdle:%f\tIO-wait:%f",
-		                &CPU1, &CPU2, &CPU3, &CPU4, &CPU5);
-		  AvgCPUuser+=CPU1;
-		  AvgCPUsys+=CPU2;
-		  AvgCPUnice+=CPU3;
-		  AvgCPUidle+=CPU4;
-                  AvgCPUiowait+=CPU5;
-		  fscanf(datafile, " TotalMem:%dk\tUsedMem:%dk\tFreeMem:%dk\t\tBuffers:%dk",
-			 &Mem1, &Mem2, &Mem3, &Mem4);
-                  fgets(buff, BUFF_SIZE, datafile);
-		  AvgMem1=Mem1/1024; //this data should not change
-		  AvgMem2+=Mem2/1024;
-		  AvgMem3+=Mem3/1024;
-		  AvgMem4+=Mem4/1024;
-		  fscanf(datafile, " TotalSwap:%dk\tUsedSwap:%dk\tFreeSwap:%dk\tCached:%dk",
-			 &Mem1, &Mem2, &Mem3, &Mem4);
-                  fgets(buff, BUFF_SIZE, datafile);
-		  AvgSwap1=Mem1/1024; //this data should not change
-		  AvgSwap2+=Mem2/1024;
-		  AvgSwap3+=Mem3/1024;
-		  AvgSwap4+=Mem4/1024;
-                  fgets(buff, BUFF_SIZE, datafile);
-	          retcode = fscanf(datafile, " MaxTasks:%d RunningTasks:%d SleepingTasks:%d StoppedTasks:%d ZombieTasks:%d",
-		                   &Task1, &Task2, &Task3, &Task4, &Task5);
-  	       }
-	       fclose(datafile);
-	       AvgMaxTasks=AvgMaxTasks / loopcntr;
-	       AvgRunningTasks=AvgRunningTasks / loopcntr;
-	       AvgSleepingTasks= AvgSleepingTasks / loopcntr;
-               AvgStoppedTasks= AvgStoppedTasks / loopcntr;
-               AvgZombieTasks= AvgZombieTasks / loopcntr;
-               AvgCPUuser= AvgCPUuser / loopcntr;
-               AvgCPUsys= AvgCPUsys / loopcntr;
-               AvgCPUnice= AvgCPUnice / loopcntr;
-               AvgCPUidle= AvgCPUidle / loopcntr;
-               AvgCPUiowait= AvgCPUiowait / loopcntr;
-               AvgMem1= AvgMem1;
-               AvgMem2= AvgMem2 / loopcntr;
-               AvgMem3= AvgMem3 / loopcntr;
-               AvgMem4= AvgMem4 / loopcntr;
-               AvgSwap1= AvgSwap1;
-               AvgSwap2= AvgSwap2 / loopcntr;
-               AvgSwap3= AvgSwap3 / loopcntr;
-               AvgSwap4= AvgSwap4 / loopcntr;
-	       UsedMemPercentage= AvgMem2 / AvgMem1 * 100;
-	       UsedSwapPercentage= AvgSwap2 / AvgSwap1 * 100;
+		while (*cp) {
+			switch (*cp) {
+			case '\0':
+			case '-':
+				break;
+			case 'b':
+				Batch = 1;
+				break;
+			case 'c':
+				TOGw(Curwin, Show_CMDLIN);
+				break;
+			case 'd':
+				if (cp[1])
+					++cp;
+				else if (*args)
+					cp = *args++;
+				else
+					std_err("-d requires argument");
+				/* a negative delay will be dealt with shortly... */
+				if (1 != sscanf(cp, "%f", &tmp_delay))
+					std_err(fmtmk("bad delay '%s'", cp));
+				break;
+			case 'f':
+				if (cp[1])
+					cp++;
+				else if (*args)
+					cp = *args++;
+				else
+					std_err("-f requires argument");
+				if ((datafile = fopen(cp, "r")) == NULL)
+					std_err(fmtmk
+						("bad file arg; failed to fopen '%s' for reading",
+						 cp));
+				retcode =
+				    fscanf(datafile,
+					   " MaxTasks:%d RunningTasks:%d SleepingTasks:%d StoppedTasks:%d ZombieTasks:%d",
+					   &Task1, &Task2, &Task3, &Task4,
+					   &Task5);
+				while (retcode == 5) {
+					loopcntr++;
+					fgets(buff, BUFF_SIZE, datafile);
+					AvgMaxTasks += Task1;
+					AvgRunningTasks += Task2;
+					AvgSleepingTasks += Task3;
+					AvgStoppedTasks += Task4;
+					AvgZombieTasks += Task5;
+					fscanf(datafile,
+					       " Cpu(s): User:%f\tSystem:%f\tNice:%f\t\tIdle:%f\tIO-wait:%f",
+					       &CPU1, &CPU2, &CPU3, &CPU4,
+					       &CPU5);
+					AvgCPUuser += CPU1;
+					AvgCPUsys += CPU2;
+					AvgCPUnice += CPU3;
+					AvgCPUidle += CPU4;
+					AvgCPUiowait += CPU5;
+					fscanf(datafile,
+					       " TotalMem:%dk\tUsedMem:%dk\tFreeMem:%dk\t\tBuffers:%dk",
+					       &Mem1, &Mem2, &Mem3, &Mem4);
+					fgets(buff, BUFF_SIZE, datafile);
+					AvgMem1 = Mem1 / 1024;	//this data should not change
+					AvgMem2 += Mem2 / 1024;
+					AvgMem3 += Mem3 / 1024;
+					AvgMem4 += Mem4 / 1024;
+					fscanf(datafile,
+					       " TotalSwap:%dk\tUsedSwap:%dk\tFreeSwap:%dk\tCached:%dk",
+					       &Mem1, &Mem2, &Mem3, &Mem4);
+					fgets(buff, BUFF_SIZE, datafile);
+					AvgSwap1 = Mem1 / 1024;	//this data should not change
+					AvgSwap2 += Mem2 / 1024;
+					AvgSwap3 += Mem3 / 1024;
+					AvgSwap4 += Mem4 / 1024;
+					fgets(buff, BUFF_SIZE, datafile);
+					retcode =
+					    fscanf(datafile,
+						   " MaxTasks:%d RunningTasks:%d SleepingTasks:%d StoppedTasks:%d ZombieTasks:%d",
+						   &Task1, &Task2, &Task3,
+						   &Task4, &Task5);
+				}
+				fclose(datafile);
+				AvgMaxTasks = AvgMaxTasks / loopcntr;
+				AvgRunningTasks = AvgRunningTasks / loopcntr;
+				AvgSleepingTasks = AvgSleepingTasks / loopcntr;
+				AvgStoppedTasks = AvgStoppedTasks / loopcntr;
+				AvgZombieTasks = AvgZombieTasks / loopcntr;
+				AvgCPUuser = AvgCPUuser / loopcntr;
+				AvgCPUsys = AvgCPUsys / loopcntr;
+				AvgCPUnice = AvgCPUnice / loopcntr;
+				AvgCPUidle = AvgCPUidle / loopcntr;
+				AvgCPUiowait = AvgCPUiowait / loopcntr;
+				AvgMem1 = AvgMem1;
+				AvgMem2 = AvgMem2 / loopcntr;
+				AvgMem3 = AvgMem3 / loopcntr;
+				AvgMem4 = AvgMem4 / loopcntr;
+				AvgSwap1 = AvgSwap1;
+				AvgSwap2 = AvgSwap2 / loopcntr;
+				AvgSwap3 = AvgSwap3 / loopcntr;
+				AvgSwap4 = AvgSwap4 / loopcntr;
+				UsedMemPercentage = AvgMem2 / AvgMem1 * 100;
+				UsedSwapPercentage = AvgSwap2 / AvgSwap1 * 100;
 
-	       printf("\nAverage data from %s\n",cp);
-      	       printf("================================\n");
-	       printf(" MaxTasks:%.0f\t\tRunningTasks:%.0f\tSleepingTasks:%.0f\tStoppedTasks:%.0f\tZombieTasks:%.0f\n\n",
-   		        AvgMaxTasks,AvgRunningTasks,AvgSleepingTasks,AvgStoppedTasks,AvgZombieTasks);
-	       printf(" Cpu(s) : User:%.2f\%\tSystem:%.2f\%\t\tNice:%.2f\%\t\tIdle:%.2f\%\t\tIO-wait:%.2f\%\n\n",
-   			AvgCPUuser,AvgCPUsys,AvgCPUnice,AvgCPUidle,AvgCPUiowait);
-	       printf(" TotalMem:%dMb\t\tUsedMem:%.0LfMb\t\tFreeMem:%.0LfMb\t\tBuffers:%.0LfMb\n",
-   			AvgMem1,AvgMem2,AvgMem3,AvgMem4);
-	       printf(" TotalSwap:%dMb\tUsedSwap:%.0LfMb\t\tFreeSwap:%.0LfMb\t\tCached:%.0LfMb\n",
-   		        AvgSwap1,AvgSwap2,AvgSwap3,AvgSwap4);
-	       printf("\n UsedMem Percentage:%.2Lf\%\tUsedSwap Percentage:%.2Lf\%\n\n",UsedMemPercentage,UsedSwapPercentage);
-	       printf("A total of [%d] entries processed from %s.\n\n",loopcntr,cp);
-               exit(0);
-	       break;
-            case 'h': case 'H':
-            case 'v': case 'V':
-               std_err(fmtmk("%s\nusage:\t%s%s"
-                  , procps_version, Myname, usage));
-            case 'i':
-               TOGw(Curwin, Show_IDLEPS);
-               Curwin->rc.maxtasks = 0;
-               break;
-            case 'n':
-               if (cp[1]) cp++;
-               else if (*args) cp = *args++;
-               else std_err("-n requires argument");
-               if (1 != sscanf(cp, "%d", &Loops) || 1 > Loops)
-                  std_err(fmtmk("bad iterations arg '%s'", cp));
-               break;
-	    case 'o':
-	       o_flag = 0;
-               if (cp[1]) cp++;
-               else if (*args) cp = *args++;
-               else std_err("-o requires argument");
-	       if ((outfile = fopen(cp,"a")) == NULL)
-	          std_err(fmtmk("bad file arg; failed to fopen '%s' for write",cp));
-	       else
-		  o_flag = 1;
-		  cp = cp + strlen(cp);
-	       break;
-            case 'p':
-               do {
-                  if (selection_type) std_err("conflicting process selection");
-                  selection_type = 'p';
-                  if (cp[1]) cp++;
-                  else if (*args) cp = *args++;
-                  else std_err("-p argument missing");
-                  if (Monpidsidx >= MONPIDMAX)
-                     std_err(fmtmk("pid limit (%d) exceeded", MONPIDMAX));
-                  if (1 != sscanf(cp, "%d", &Monpids[Monpidsidx])
-                  || 0 > Monpids[Monpidsidx])
-                     std_err(fmtmk("bad pid '%s'", cp));
-                  if (!Monpids[Monpidsidx])
-                     Monpids[Monpidsidx] = getpid();
-                  Monpidsidx++;
-                  if (!(p = strchr(cp, ',')))
-                     break;
-                  cp = p;
-               } while (*cp);
-               break;
-            case 's':
-               Secure_mode = 1;
-               break;
-            case 'S':
-               TOGw(Curwin, Show_CTIMES);
-               break;
-            case 'u':
-               do {
-                  const char *errmsg;
-                  if (selection_type) std_err("conflicting process selection");
-                  if (cp[1]) cp++;
-                  else if (*args) cp = *args++;
-                  else std_err("-u missing name");
-                  errmsg = parse_uid(cp, &selection_uid);
-                  if (errmsg) std_err(errmsg);
-                  selection_type = 'u';
-                  cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp); // FIXME: junk
-               } while (0);
-               break;
-            case 'U':
-               do {
-                  const char *errmsg;
-                  if (selection_type) std_err("conflicting process selection");
-                  if (cp[1]) cp++;
-                  else if (*args) cp = *args++;
-                  else std_err("-u missing name");
-                  errmsg = parse_uid(cp, &selection_uid);
-                  if (errmsg) std_err(errmsg);
-                  selection_type = 'U';
-                  cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp); // FIXME: junk
-               } while (0);
-               break;
-            default :
-               std_err(fmtmk("unknown argument '%c'\nusage:\t%s%s"
-                  , *cp, Myname, usage));
+				printf("\nAverage data from %s\n", cp);
+				printf("================================\n");
+				printf
+				    (" MaxTasks:%.0f\t\tRunningTasks:%.0f\tSleepingTasks:%.0f\tStoppedTasks:%.0f\tZombieTasks:%.0f\n\n",
+				     AvgMaxTasks, AvgRunningTasks,
+				     AvgSleepingTasks, AvgStoppedTasks,
+				     AvgZombieTasks);
+				printf
+				    (" Cpu(s) : User:%.2f\%\tSystem:%.2f\%\t\tNice:%.2f\%\t\tIdle:%.2f\%\t\tIO-wait:%.2f\%\n\n",
+				     AvgCPUuser, AvgCPUsys, AvgCPUnice,
+				     AvgCPUidle, AvgCPUiowait);
+				printf
+				    (" TotalMem:%dMb\t\tUsedMem:%.0LfMb\t\tFreeMem:%.0LfMb\t\tBuffers:%.0LfMb\n",
+				     AvgMem1, AvgMem2, AvgMem3, AvgMem4);
+				printf
+				    (" TotalSwap:%dMb\tUsedSwap:%.0LfMb\t\tFreeSwap:%.0LfMb\t\tCached:%.0LfMb\n",
+				     AvgSwap1, AvgSwap2, AvgSwap3, AvgSwap4);
+				printf
+				    ("\n UsedMem Percentage:%.2Lf\%\tUsedSwap Percentage:%.2Lf\%\n\n",
+				     UsedMemPercentage, UsedSwapPercentage);
+				printf
+				    ("A total of [%d] entries processed from %s.\n\n",
+				     loopcntr, cp);
+				exit(0);
+				break;
+			case 'h':
+			case 'H':
+			case 'v':
+			case 'V':
+				std_err(fmtmk
+					("%s\nusage:\t%s%s", procps_version,
+					 Myname, usage));
+			case 'i':
+				TOGw(Curwin, Show_IDLEPS);
+				Curwin->rc.maxtasks = 0;
+				break;
+			case 'n':
+				if (cp[1])
+					cp++;
+				else if (*args)
+					cp = *args++;
+				else
+					std_err("-n requires argument");
+				if (1 != sscanf(cp, "%d", &Loops) || 1 > Loops)
+					std_err(fmtmk
+						("bad iterations arg '%s'",
+						 cp));
+				break;
+			case 'o':
+				o_flag = 0;
+				if (cp[1])
+					cp++;
+				else if (*args)
+					cp = *args++;
+				else
+					std_err("-o requires argument");
+				if ((outfile = fopen(cp, "a")) == NULL)
+					std_err(fmtmk
+						("bad file arg; failed to fopen '%s' for write",
+						 cp));
+				else
+					o_flag = 1;
+				cp = cp + strlen(cp);
+				break;
+			case 'p':
+				do {
+					if (selection_type)
+						std_err
+						    ("conflicting process selection");
+					selection_type = 'p';
+					if (cp[1])
+						cp++;
+					else if (*args)
+						cp = *args++;
+					else
+						std_err("-p argument missing");
+					if (Monpidsidx >= MONPIDMAX)
+						std_err(fmtmk
+							("pid limit (%d) exceeded",
+							 MONPIDMAX));
+					if (1 !=
+					    sscanf(cp, "%d",
+						   &Monpids[Monpidsidx])
+					    || 0 > Monpids[Monpidsidx])
+						std_err(fmtmk
+							("bad pid '%s'", cp));
+					if (!Monpids[Monpidsidx])
+						Monpids[Monpidsidx] = getpid();
+					Monpidsidx++;
+					if (!(p = strchr(cp, ',')))
+						break;
+					cp = p;
+				} while (*cp);
+				break;
+			case 's':
+				Secure_mode = 1;
+				break;
+			case 'S':
+				TOGw(Curwin, Show_CTIMES);
+				break;
+			case 'u':
+				do {
+					const char *errmsg;
+					if (selection_type)
+						std_err
+						    ("conflicting process selection");
+					if (cp[1])
+						cp++;
+					else if (*args)
+						cp = *args++;
+					else
+						std_err("-u missing name");
+					errmsg = parse_uid(cp, &selection_uid);
+					if (errmsg)
+						std_err(errmsg);
+					selection_type = 'u';
+					cp += snprintf(Curwin->colusrnam, USRNAMSIZ - 1, "%s", cp);	// FIXME: junk
+				} while (0);
+				break;
+			case 'U':
+				do {
+					const char *errmsg;
+					if (selection_type)
+						std_err
+						    ("conflicting process selection");
+					if (cp[1])
+						cp++;
+					else if (*args)
+						cp = *args++;
+					else
+						std_err("-u missing name");
+					errmsg = parse_uid(cp, &selection_uid);
+					if (errmsg)
+						std_err(errmsg);
+					selection_type = 'U';
+					cp += snprintf(Curwin->colusrnam, USRNAMSIZ - 1, "%s", cp);	// FIXME: junk
+				} while (0);
+				break;
+			default:
+				std_err(fmtmk
+					("unknown argument '%c'\nusage:\t%s%s",
+					 *cp, Myname, usage));
 
-         } /* end: switch (*cp) */
+			}	/* end: switch (*cp) */
 
-            /* advance cp and jump over any numerical args used above */
-         if (*cp) cp += strspn(&cp[1], "- ,.1234567890") + 1;
-      } /* end: while (*cp) */
-   } /* end: while (*args) */
+			/* advance cp and jump over any numerical args used above */
+			if (*cp)
+				cp += strspn(&cp[1], "- ,.1234567890") + 1;
+		}		/* end: while (*cp) */
+	}			/* end: while (*args) */
 
-      /* fixup delay time, maybe... */
-   if (MAXFLOAT != tmp_delay) {
-      if (Secure_mode || 0 > tmp_delay)
-         msg_save("Delay time Not changed");
-      else
-         Rc.delay_time = tmp_delay;
-   }
+	/* fixup delay time, maybe... */
+	if (MAXFLOAT != tmp_delay) {
+		if (Secure_mode || 0 > tmp_delay)
+			msg_save("Delay time Not changed");
+		else
+			Rc.delay_time = tmp_delay;
+	}
 }
 
-
-        /*
-         * Set up the terminal attributes */
-static void whack_terminal (void)
+	/*
+	 * Set up the terminal attributes */
+static void whack_terminal(void)
 {
-   struct termios newtty;
+	struct termios newtty;
 
-   // the curses part...
+	// the curses part...
 #ifdef PRETENDNOCAP
-   setupterm("dumb", STDOUT_FILENO, NULL);
+	setupterm("dumb", STDOUT_FILENO, NULL);
 #else
-   setupterm(NULL, STDOUT_FILENO, NULL);
+	setupterm(NULL, STDOUT_FILENO, NULL);
 #endif
-   // our part...
-   if (!Batch) {
-      if (-1 == tcgetattr(STDIN_FILENO, &Savedtty))
-         std_err("failed tty get");
-      newtty = Savedtty;
-      newtty.c_lflag &= ~(ICANON | ECHO);
-      newtty.c_oflag &= ~(TAB3);
-      newtty.c_cc[VMIN] = 1;
-      newtty.c_cc[VTIME] = 0;
+	// our part...
+	if (!Batch) {
+		if (-1 == tcgetattr(STDIN_FILENO, &Savedtty))
+			std_err("failed tty get");
+		newtty = Savedtty;
+		newtty.c_lflag &= ~(ICANON | ECHO);
+		newtty.c_oflag &= ~(TAB3);
+		newtty.c_cc[VMIN] = 1;
+		newtty.c_cc[VTIME] = 0;
 
-      Ttychanged = 1;
-      if (-1 == tcsetattr(STDIN_FILENO, TCSAFLUSH, &newtty)) {
-         putp(Cap_clr_scr);
-         std_err(fmtmk("failed tty set: %s", strerror(errno)));
-      }
-      tcgetattr(STDIN_FILENO, &Rawtty);
+		Ttychanged = 1;
+		if (-1 == tcsetattr(STDIN_FILENO, TCSAFLUSH, &newtty)) {
+			putp(Cap_clr_scr);
+			std_err(fmtmk("failed tty set: %s", strerror(errno)));
+		}
+		tcgetattr(STDIN_FILENO, &Rawtty);
 #ifndef STDOUT_IOLBF
-      // thanks anyway stdio, but we'll manage buffering at the frame level...
-      setbuffer(stdout, Stdout_buf, sizeof(Stdout_buf));
+		// thanks anyway stdio, but we'll manage buffering at the frame level...
+		setbuffer(stdout, Stdout_buf, sizeof(Stdout_buf));
 #endif
-      putp(Cap_clr_scr);
-      fflush(stdout);
-   }
+		putp(Cap_clr_scr);
+		fflush(stdout);
+	}
 }
 
-
 /*######  Field Selection/Ordering routines  #############################*/
 
-
-        /*
-         * Display each field represented in the Fields Table along with its
-         * description and mark (with a leading asterisk) fields associated
-         * with upper case letter(s) in the passed 'fields string'.
-         *
-         * After all fields have been displayed, some extra explanatory
-         * text may also be output */
-static void display_fields (const char *fields, const char *xtra)
+	/*
+	 * Display each field represented in the Fields Table along with its
+	 * description and mark (with a leading asterisk) fields associated
+	 * with upper case letter(s) in the passed 'fields string'.
+	 *
+	 * After all fields have been displayed, some extra explanatory
+	 * text may also be output */
+static void display_fields(const char *fields, const char *xtra)
 {
 #define yRSVD 3
-   const char *p;
-   int i, cmax = Screen_cols / 2, rmax = Screen_rows - yRSVD;
+	const char *p;
+	int i, cmax = Screen_cols / 2, rmax = Screen_rows - yRSVD;
 
-   /* we're relying on callers to first clear the screen and thus avoid screen
-      flicker if they're too lazy to handle their own asterisk (*) logic */
-   putp(Curwin->cap_bold);
-   for (i = 0; fields[i]; ++i) {
-      const FLD_t *f = ft_get_ptr(FT_NEW_fmt, fields[i]);
-      int b = isupper(fields[i]);
+	/* we're relying on callers to first clear the screen and thus avoid screen
+	   flicker if they're too lazy to handle their own asterisk (*) logic */
+	putp(Curwin->cap_bold);
+	for (i = 0; fields[i]; ++i) {
+		const FLD_t *f = ft_get_ptr(FT_NEW_fmt, fields[i]);
+		int b = isupper(fields[i]);
 
-      if (!f) continue;                 // hey, should be std_err!
-      for (p = f->head; ' ' == *p; ++p) // advance past any leading spaces
-         ;
-      PUTT("%s%s%c %c: %-10s = %s"
-         , tg2((i / rmax) * cmax, (i % rmax) + yRSVD)
-         , b ? Curwin->cap_bold : Cap_norm
-         , b ? '*' : ' '
-         , fields[i]
-         , p
-         , f->desc);
-   }
-   if (xtra) {
-      putp(Curwin->capclr_rownorm);
-      while ((p = strchr(xtra, '\n'))) {
-         ++i;
-         PUTT("%s%.*s"
-            , tg2((i / rmax) * cmax, (i % rmax) + yRSVD)
-            , (int)(p - xtra)
-            , xtra);
-         xtra = ++p;
-      }
-   }
-   putp(Caps_off);
+		if (!f)
+			continue;	// hey, should be std_err!
+		for (p = f->head; ' ' == *p; ++p)	// advance past any leading spaces
+			;
+		PUTT("%s%s%c %c: %-10s = %s",
+		     tg2((i / rmax) * cmax, (i % rmax) + yRSVD)
+		     , b ? Curwin->cap_bold : Cap_norm, b ? '*' : ' ', fields[i]
+		     , p, f->desc);
+	}
+	if (xtra) {
+		putp(Curwin->capclr_rownorm);
+		while ((p = strchr(xtra, '\n'))) {
+			++i;
+			PUTT("%s%.*s",
+			     tg2((i / rmax) * cmax, (i % rmax) + yRSVD)
+			     , (int)(p - xtra)
+			     , xtra);
+			xtra = ++p;
+		}
+	}
+	putp(Caps_off);
 
 #undef yRSVD
 }
 
-
-        /*
-         * Change order of displayed fields. */
-static void fields_reorder (void)
+	/*
+	 * Change order of displayed fields. */
+static void fields_reorder(void)
 {
-   static const char prompt[] =
-      "Upper case letter moves field left, lower case right";
-   char c, *p;
-   int i;
+	static const char prompt[] =
+	    "Upper case letter moves field left, lower case right";
+	char c, *p;
+	int i;
 
-   putp(Cap_clr_scr);
-   putp(Cap_curs_huge);
-   for (;;) {
-      display_fields(Curwin->rc.fieldscur, FIELDS_xtra);
-      show_special(1, fmtmk(FIELDS_current
-         , Cap_home, Curwin->rc.fieldscur, Curwin->grpname, prompt));
-      chin(0, &c, 1);
-      if (!ft_get_ptr(FT_NEW_fmt, c)) break;
-      i = toupper(c) - 'A';
-      if (((p = strchr(Curwin->rc.fieldscur, i + 'A')))
-      || ((p = strchr(Curwin->rc.fieldscur, i + 'a')))) {
-         if (isupper(c)) p--;
-         if (('\0' != p[1]) && (p >= Curwin->rc.fieldscur)) {
-            c    = p[0];
-            p[0] = p[1];
-            p[1] = c;
-         }
-      }
-   }
-   putp(Cap_curs_norm);
+	putp(Cap_clr_scr);
+	putp(Cap_curs_huge);
+	for (;;) {
+		display_fields(Curwin->rc.fieldscur, FIELDS_xtra);
+		show_special(1,
+			     fmtmk(FIELDS_current, Cap_home,
+				   Curwin->rc.fieldscur, Curwin->grpname,
+				   prompt));
+		chin(0, &c, 1);
+		if (!ft_get_ptr(FT_NEW_fmt, c))
+			break;
+		i = toupper(c) - 'A';
+		if (((p = strchr(Curwin->rc.fieldscur, i + 'A')))
+		    || ((p = strchr(Curwin->rc.fieldscur, i + 'a')))) {
+			if (isupper(c))
+				p--;
+			if (('\0' != p[1]) && (p >= Curwin->rc.fieldscur)) {
+				c = p[0];
+				p[0] = p[1];
+				p[1] = c;
+			}
+		}
+	}
+	putp(Cap_curs_norm);
 }
 
-        /*
-         * Select sort field. */
-static void fields_sort (void)
+	/*
+	 * Select sort field. */
+static void fields_sort(void)
 {
-   static const char prompt[] =
-      "Select sort field via field letter, type any other key to return";
-   char phoney[PFLAGSSIZ];
-   char c, *p;
-   int i, x;
+	static const char prompt[] =
+	    "Select sort field via field letter, type any other key to return";
+	char phoney[PFLAGSSIZ];
+	char c, *p;
+	int i, x;
 
-   strcpy(phoney, NUL_FIELDS);
-   x = i = Curwin->rc.sortindx;
-   putp(Cap_clr_scr);
-   putp(Cap_curs_huge);
-   for (;;) {
-      p  = phoney + i;
-      *p = toupper(*p);
-      display_fields(phoney, SORT_xtra);
-      show_special(1, fmtmk(SORT_fields
-         , Cap_home, *p, Curwin->grpname, prompt));
-      chin(0, &c, 1);
-      if (!ft_get_ptr(FT_NEW_fmt, c)) break;
-      i = toupper(c) - 'A';
-      *p = tolower(*p);
-      x = i;
-   }
-   if ((p = strchr(Curwin->rc.fieldscur, x + 'a')))
-      *p = x + 'A';
-   Curwin->rc.sortindx = x;
-   putp(Cap_curs_norm);
+	strcpy(phoney, NUL_FIELDS);
+	x = i = Curwin->rc.sortindx;
+	putp(Cap_clr_scr);
+	putp(Cap_curs_huge);
+	for (;;) {
+		p = phoney + i;
+		*p = toupper(*p);
+		display_fields(phoney, SORT_xtra);
+		show_special(1,
+			     fmtmk(SORT_fields, Cap_home, *p, Curwin->grpname,
+				   prompt));
+		chin(0, &c, 1);
+		if (!ft_get_ptr(FT_NEW_fmt, c))
+			break;
+		i = toupper(c) - 'A';
+		*p = tolower(*p);
+		x = i;
+	}
+	if ((p = strchr(Curwin->rc.fieldscur, x + 'a')))
+		*p = x + 'A';
+	Curwin->rc.sortindx = x;
+	putp(Cap_curs_norm);
 }
 
-
-        /*
-         * Toggle displayed fields. */
-static void fields_toggle (void)
+	/*
+	 * Toggle displayed fields. */
+static void fields_toggle(void)
 {
-   static const char prompt[] =
-      "Toggle fields via field letter, type any other key to return";
-   char c, *p;
-   int i;
+	static const char prompt[] =
+	    "Toggle fields via field letter, type any other key to return";
+	char c, *p;
+	int i;
 
-   putp(Cap_clr_scr);
-   putp(Cap_curs_huge);
-   for (;;) {
-      display_fields(Curwin->rc.fieldscur, FIELDS_xtra);
-      show_special(1, fmtmk(FIELDS_current
-         , Cap_home, Curwin->rc.fieldscur, Curwin->grpname, prompt));
-      chin(0, &c, 1);
-      if (!ft_get_ptr(FT_NEW_fmt, c)) break;
-      i = toupper(c) - 'A';
-      if ((p = strchr(Curwin->rc.fieldscur, i + 'A')))
-         *p = i + 'a';
-      else if ((p = strchr(Curwin->rc.fieldscur, i + 'a')))
-         *p = i + 'A';
-   }
-   putp(Cap_curs_norm);
+	putp(Cap_clr_scr);
+	putp(Cap_curs_huge);
+	for (;;) {
+		display_fields(Curwin->rc.fieldscur, FIELDS_xtra);
+		show_special(1,
+			     fmtmk(FIELDS_current, Cap_home,
+				   Curwin->rc.fieldscur, Curwin->grpname,
+				   prompt));
+		chin(0, &c, 1);
+		if (!ft_get_ptr(FT_NEW_fmt, c))
+			break;
+		i = toupper(c) - 'A';
+		if ((p = strchr(Curwin->rc.fieldscur, i + 'A')))
+			*p = i + 'a';
+		else if ((p = strchr(Curwin->rc.fieldscur, i + 'a')))
+			*p = i + 'A';
+	}
+	putp(Cap_curs_norm);
 }
 
-
 /*######  Windows/Field Groups support  #################################*/
 
-        /*
-         * For each of the four windows:
-         *    1) Set the number of fields/columns to display
-         *    2) Create the field columns heading
-         *    3) Set maximum cmdline length, if command lines are in use
-         * In the process, the required PROC_FILLxxx flags will be rebuilt! */
-static void reframewins (void)
+	/*
+	 * For each of the four windows:
+	 *    1) Set the number of fields/columns to display
+	 *    2) Create the field columns heading
+	 *    3) Set maximum cmdline length, if command lines are in use
+	 * In the process, the required PROC_FILLxxx flags will be rebuilt! */
+static void reframewins(void)
 {
-   WIN_t *w;
-   char *s;
-   const char *h;
-   int i, needpsdb = 0;
+	WIN_t *w;
+	char *s;
+	const char *h;
+	int i, needpsdb = 0;
 
 // Frames_libflags = 0;  // should be called only when it's zero
 // Frames_maxcmdln = 0;  // to become largest from up to 4 windows, if visible
-   w = Curwin;
-   do {
-      if (!Rc.mode_altscr || CHKw(w, VISIBLE_tsk)) {
-         // build window's procflags array and establish a tentative maxpflgs
-         for (i = 0, w->maxpflgs = 0; w->rc.fieldscur[i]; i++) {
-            if (isupper(w->rc.fieldscur[i]))
-               w->procflags[w->maxpflgs++] = w->rc.fieldscur[i] - 'A';
-         }
+	w = Curwin;
+	do {
+		if (!Rc.mode_altscr || CHKw(w, VISIBLE_tsk)) {
+			// build window's procflags array and establish a tentative maxpflgs
+			for (i = 0, w->maxpflgs = 0; w->rc.fieldscur[i]; i++) {
+				if (isupper(w->rc.fieldscur[i]))
+					w->procflags[w->maxpflgs++] =
+					    w->rc.fieldscur[i] - 'A';
+			}
 
-         /* build a preliminary columns header not to exceed screen width
-            while accounting for a possible leading window number */
-         *(s = w->columnhdr) = '\0';
-         if (Rc.mode_altscr) s = scat(s, " ");
-         for (i = 0; i < w->maxpflgs; i++) {
-            h = Fieldstab[w->procflags[i]].head;
-            // oops, won't fit -- we're outta here...
-            if (Screen_cols < (int)((s - w->columnhdr) + strlen(h))) break;
-            s = scat(s, h);
-         }
+			/* build a preliminary columns header not to exceed screen width
+			   while accounting for a possible leading window number */
+			*(s = w->columnhdr) = '\0';
+			if (Rc.mode_altscr)
+				s = scat(s, " ");
+			for (i = 0; i < w->maxpflgs; i++) {
+				h = Fieldstab[w->procflags[i]].head;
+				// oops, won't fit -- we're outta here...
+				if (Screen_cols <
+				    (int)((s - w->columnhdr) + strlen(h)))
+					break;
+				s = scat(s, h);
+			}
 
-         /* establish the final maxpflgs and prepare to grow the command column
-            heading via maxcmdln - it may be a fib if P_CMD wasn't encountered,
-            but that's ok because it won't be displayed anyway */
-         w->maxpflgs = i;
-         w->maxcmdln = Screen_cols
-            - (strlen(w->columnhdr) - strlen(Fieldstab[P_CMD].head)) - 1;
+			/* establish the final maxpflgs and prepare to grow the command column
+			   heading via maxcmdln - it may be a fib if P_CMD wasn't encountered,
+			   but that's ok because it won't be displayed anyway */
+			w->maxpflgs = i;
+			w->maxcmdln = Screen_cols
+			    - (strlen(w->columnhdr) -
+			       strlen(Fieldstab[P_CMD].head)) - 1;
 
-         /* finally, we can build the true run-time columns header, format the
-            command column heading, if P_CMD is really being displayed, and
-            rebuild the all-important PROC_FILLxxx flags that will be used
-            until/if we're we're called again */
-         *(s = w->columnhdr) = '\0';
-         if (Rc.mode_altscr) s = scat(s, fmtmk("%d", w->winnum));
-         for (i = 0; i < w->maxpflgs; i++) {
-            h = Fieldstab[w->procflags[i]].head;
-            if (P_WCH == w->procflags[i]) needpsdb = 1;
-            if (P_CMD == w->procflags[i]) {
-               s = scat(s, fmtmk(Fieldstab[P_CMD].fmts, w->maxcmdln, w->maxcmdln, h));
-               if (CHKw(w, Show_CMDLIN)) {
-                  Frames_libflags |= L_CMDLINE;
+			/* finally, we can build the true run-time columns header, format the
+			   command column heading, if P_CMD is really being displayed, and
+			   rebuild the all-important PROC_FILLxxx flags that will be used
+			   until/if we're we're called again */
+			*(s = w->columnhdr) = '\0';
+			if (Rc.mode_altscr)
+				s = scat(s, fmtmk("%d", w->winnum));
+			for (i = 0; i < w->maxpflgs; i++) {
+				h = Fieldstab[w->procflags[i]].head;
+				if (P_WCH == w->procflags[i])
+					needpsdb = 1;
+				if (P_CMD == w->procflags[i]) {
+					s = scat(s,
+						 fmtmk(Fieldstab[P_CMD].fmts,
+						       w->maxcmdln, w->maxcmdln,
+						       h));
+					if (CHKw(w, Show_CMDLIN)) {
+						Frames_libflags |= L_CMDLINE;
 //                if (w->maxcmdln > Frames_maxcmdln) Frames_maxcmdln = w->maxcmdln;
-               }
-            } else
-               s = scat(s, h);
-            Frames_libflags |= Fieldstab[w->procflags[i]].lflg;
-         }
-      }
-      if (Rc.mode_altscr) w = w->next;
-   } while (w != Curwin);
+					}
+				} else
+					s = scat(s, h);
+				Frames_libflags |=
+				    Fieldstab[w->procflags[i]].lflg;
+			}
+		}
+		if (Rc.mode_altscr)
+			w = w->next;
+	} while (w != Curwin);
 
-   // do we need the kernel symbol table (and is it already open?)
-   if (needpsdb) {
-      if (-1 == No_ksyms) {
-         No_ksyms = 0;
-         if (open_psdb_message(NULL, msg_save))
-            No_ksyms = 1;
-         else
-            PSDBopen = 1;
-      }
-   }
+	// do we need the kernel symbol table (and is it already open?)
+	if (needpsdb) {
+		if (-1 == No_ksyms) {
+			No_ksyms = 0;
+			if (open_psdb_message(NULL, msg_save))
+				No_ksyms = 1;
+			else
+				PSDBopen = 1;
+		}
+	}
 
-   if (selection_type=='U') Frames_libflags |= L_status;
+	if (selection_type == 'U')
+		Frames_libflags |= L_status;
 
-   if (Frames_libflags & L_EITHER) {
-      Frames_libflags &= ~L_EITHER;
-      if (!(Frames_libflags & L_stat)) Frames_libflags |= L_status;
-   }
-   if (!Frames_libflags) Frames_libflags = L_DEFAULT;
+	if (Frames_libflags & L_EITHER) {
+		Frames_libflags &= ~L_EITHER;
+		if (!(Frames_libflags & L_stat))
+			Frames_libflags |= L_status;
+	}
+	if (!Frames_libflags)
+		Frames_libflags = L_DEFAULT;
 }
 
-
-        /*
-         * Value a window's name and make the associated group name. */
-static void win_names (WIN_t *q, const char *name)
+	/*
+	 * Value a window's name and make the associated group name. */
+static void win_names(WIN_t * q, const char *name)
 {
-   sprintf(q->rc.winname, "%.*s", WINNAMSIZ -1, name);
-   sprintf(q->grpname, "%d:%.*s", q->winnum, WINNAMSIZ -1, name);
+	sprintf(q->rc.winname, "%.*s", WINNAMSIZ - 1, name);
+	sprintf(q->grpname, "%d:%.*s", q->winnum, WINNAMSIZ - 1, name);
 }
 
-
-        /*
-         * Display a window/field group (ie. make it "current"). */
-static void win_select (char ch)
+	/*
+	 * Display a window/field group (ie. make it "current"). */
+static void win_select(char ch)
 {
-   static const char prompt[] = "Choose field group (1 - 4)";
+	static const char prompt[] = "Choose field group (1 - 4)";
 
-   /* if there's no ch, it means we're supporting the external interface,
-      so we must try to get our own darn ch by begging the user... */
-   if (!ch) {
-      show_pmt(prompt);
-      chin(0, (char *)&ch, 1);
-   }
-   switch (ch) {
-      case 'a':                         /* we don't carry 'a' / 'w' in our */
-         Curwin = Curwin->next;         /* pmt - they're here for a good   */
-         break;                         /* friend of ours -- wins_colors.  */
-      case 'w':                         /* (however those letters work via */
-         Curwin = Curwin->prev;         /* the pmt too but gee, end-loser  */
-         break;                         /* should just press the darn key) */
-      case '1': case '2':
-      case '3': case '4':
-         Curwin = &Winstk[ch - '1'];
-         break;
-   }
+	/* if there's no ch, it means we're supporting the external interface,
+	   so we must try to get our own darn ch by begging the user... */
+	if (!ch) {
+		show_pmt(prompt);
+		chin(0, (char *)&ch, 1);
+	}
+	switch (ch) {
+	case 'a':		/* we don't carry 'a' / 'w' in our */
+		Curwin = Curwin->next;	/* pmt - they're here for a good   */
+		break;		/* friend of ours -- wins_colors.  */
+	case 'w':		/* (however those letters work via */
+		Curwin = Curwin->prev;	/* the pmt too but gee, end-loser  */
+		break;		/* should just press the darn key) */
+	case '1':
+	case '2':
+	case '3':
+	case '4':
+		Curwin = &Winstk[ch - '1'];
+		break;
+	}
 }
 
-
-        /*
-         * Just warn the user when a command can't be honored. */
-static int win_warn (void)
+	/*
+	 * Just warn the user when a command can't be honored. */
+static int win_warn(void)
 {
-   show_msg(fmtmk("\aCommand disabled, activate %s with '-' or '_'"
-      , Curwin->grpname));
-   /* we gotta' return false 'cause we're somewhat well known within
-      macro society, by way of that sassy little tertiary operator... */
-   return 0;
+	show_msg(fmtmk
+		 ("\aCommand disabled, activate %s with '-' or '_'",
+		  Curwin->grpname));
+	/* we gotta' return false 'cause we're somewhat well known within
+	   macro society, by way of that sassy little tertiary operator... */
+	return 0;
 }
 
-
-        /*
-         * Change colors *Helper* function to save/restore settings;
-         * ensure colors will show; and rebuild the terminfo strings. */
-static void winsclrhlp (WIN_t *q, int save)
+	/*
+	 * Change colors *Helper* function to save/restore settings;
+	 * ensure colors will show; and rebuild the terminfo strings. */
+static void winsclrhlp(WIN_t * q, int save)
 {
-   static int flgssav, summsav, msgssav, headsav, tasksav;
+	static int flgssav, summsav, msgssav, headsav, tasksav;
 
-   if (save) {
-      flgssav = q->rc.winflags; summsav = q->rc.summclr;
-      msgssav = q->rc.msgsclr;  headsav = q->rc.headclr; tasksav = q->rc.taskclr;
-      SETw(q, Show_COLORS);
-   } else {
-      q->rc.winflags = flgssav; q->rc.summclr = summsav;
-      q->rc.msgsclr = msgssav;  q->rc.headclr = headsav; q->rc.taskclr = tasksav;
-   }
-   capsmk(q);
+	if (save) {
+		flgssav = q->rc.winflags;
+		summsav = q->rc.summclr;
+		msgssav = q->rc.msgsclr;
+		headsav = q->rc.headclr;
+		tasksav = q->rc.taskclr;
+		SETw(q, Show_COLORS);
+	} else {
+		q->rc.winflags = flgssav;
+		q->rc.summclr = summsav;
+		q->rc.msgsclr = msgssav;
+		q->rc.headclr = headsav;
+		q->rc.taskclr = tasksav;
+	}
+	capsmk(q);
 }
 
-
-        /*
-         * Change colors used in display */
-static void wins_colors (void)
+	/*
+	 * Change colors used in display */
+static void wins_colors(void)
 {
 #define kbdABORT  'q'
 #define kbdAPPLY  '\n'
-   int clr = Curwin->rc.taskclr, *pclr = &Curwin->rc.taskclr;
-   char ch, tgt = 'T';
+	int clr = Curwin->rc.taskclr, *pclr = &Curwin->rc.taskclr;
+	char ch, tgt = 'T';
 
-   if (0 >= max_colors) {
-      show_msg("\aNo colors to map!");
-      return;
-   }
-   winsclrhlp(Curwin, 1);
-   putp(Cap_clr_scr);
-   putp(Cap_curs_huge);
+	if (0 >= max_colors) {
+		show_msg("\aNo colors to map!");
+		return;
+	}
+	winsclrhlp(Curwin, 1);
+	putp(Cap_clr_scr);
+	putp(Cap_curs_huge);
 
-   do {
-      putp(Cap_home);
-         /* this string is well above ISO C89's minimum requirements! */
-      show_special(1, fmtmk(COLOR_help
-         , procps_version, Curwin->grpname
-         , CHKw(Curwin, View_NOBOLD) ? "On" : "Off"
-         , CHKw(Curwin, Show_COLORS) ? "On" : "Off"
-         , CHKw(Curwin, Show_HIBOLD) ? "On" : "Off"
-         , tgt, clr, Curwin->grpname));
-      chin(0, &ch, 1);
-      switch (ch) {
-         case 'S':
-            pclr = &Curwin->rc.summclr;
-            clr = *pclr;
-            tgt = ch;
-            break;
-         case 'M':
-            pclr = &Curwin->rc.msgsclr;
-            clr = *pclr;
-            tgt = ch;
-            break;
-         case 'H':
-            pclr = &Curwin->rc.headclr;
-            clr = *pclr;
-            tgt = ch;
-            break;
-         case 'T':
-            pclr = &Curwin->rc.taskclr;
-            clr = *pclr;
-            tgt = ch;
-            break;
-         case '0' ... '7':
-            clr = ch - '0';
-            *pclr = clr;
-            break;
-         case 'B':
-            TOGw(Curwin, View_NOBOLD);
-            break;
-         case 'b':
-            TOGw(Curwin, Show_HIBOLD);
-            break;
-         case 'z':
-            TOGw(Curwin, Show_COLORS);
-            break;
-         case 'a':
-         case 'w':
-            win_select(ch);
-            winsclrhlp(Curwin, 1);
-            clr = Curwin->rc.taskclr, pclr = &Curwin->rc.taskclr;
-            tgt = 'T';
-            break;
-      }
-      capsmk(Curwin);
-   } while (kbdAPPLY != ch && kbdABORT != ch);
+	do {
+		putp(Cap_home);
+		/* this string is well above ISO C89's minimum requirements! */
+		show_special(1,
+			     fmtmk(COLOR_help, procps_version, Curwin->grpname,
+				   CHKw(Curwin, View_NOBOLD) ? "On" : "Off",
+				   CHKw(Curwin, Show_COLORS) ? "On" : "Off",
+				   CHKw(Curwin, Show_HIBOLD) ? "On" : "Off",
+				   tgt, clr, Curwin->grpname));
+		chin(0, &ch, 1);
+		switch (ch) {
+		case 'S':
+			pclr = &Curwin->rc.summclr;
+			clr = *pclr;
+			tgt = ch;
+			break;
+		case 'M':
+			pclr = &Curwin->rc.msgsclr;
+			clr = *pclr;
+			tgt = ch;
+			break;
+		case 'H':
+			pclr = &Curwin->rc.headclr;
+			clr = *pclr;
+			tgt = ch;
+			break;
+		case 'T':
+			pclr = &Curwin->rc.taskclr;
+			clr = *pclr;
+			tgt = ch;
+			break;
+		case '0' ... '7':
+			clr = ch - '0';
+			*pclr = clr;
+			break;
+		case 'B':
+			TOGw(Curwin, View_NOBOLD);
+			break;
+		case 'b':
+			TOGw(Curwin, Show_HIBOLD);
+			break;
+		case 'z':
+			TOGw(Curwin, Show_COLORS);
+			break;
+		case 'a':
+		case 'w':
+			win_select(ch);
+			winsclrhlp(Curwin, 1);
+			clr = Curwin->rc.taskclr, pclr = &Curwin->rc.taskclr;
+			tgt = 'T';
+			break;
+		}
+		capsmk(Curwin);
+	} while (kbdAPPLY != ch && kbdABORT != ch);
 
-   if (kbdABORT == ch)
-      winsclrhlp(Curwin, 0);
-   putp(Cap_curs_norm);
+	if (kbdABORT == ch)
+		winsclrhlp(Curwin, 0);
+	putp(Cap_curs_norm);
 
 #undef kbdABORT
 #undef kbdAPPLY
 }
 
-
-        /*
-         * Manipulate flag(s) for all our windows. */
-static void wins_reflag (int what, int flg)
+	/*
+	 * Manipulate flag(s) for all our windows. */
+static void wins_reflag(int what, int flg)
 {
-   WIN_t *w;
+	WIN_t *w;
 
-   w = Curwin;
-   do {
-      switch (what) {
-         case Flags_TOG:
-            TOGw(w, flg);
-            break;
-         case Flags_SET:                /* Ummmm, i can't find anybody */
-            SETw(w, flg);               /* who uses Flags_set ...      */
-            break;
-         case Flags_OFF:
-            OFFw(w, flg);
-            break;
-      }
-         /* a flag with special significance -- user wants to rebalance
-            display so we gotta' 'off' one number then force on two flags... */
-      if (EQUWINS_cwo == flg) {
-         w->rc.maxtasks = 0;
-         SETw(w, Show_IDLEPS | VISIBLE_tsk);
-      }
-      w = w->next;
-   } while (w != Curwin);
+	w = Curwin;
+	do {
+		switch (what) {
+		case Flags_TOG:
+			TOGw(w, flg);
+			break;
+		case Flags_SET:	/* Ummmm, i can't find anybody */
+			SETw(w, flg);	/* who uses Flags_set ...      */
+			break;
+		case Flags_OFF:
+			OFFw(w, flg);
+			break;
+		}
+		/* a flag with special significance -- user wants to rebalance
+		   display so we gotta' 'off' one number then force on two flags... */
+		if (EQUWINS_cwo == flg) {
+			w->rc.maxtasks = 0;
+			SETw(w, Show_IDLEPS | VISIBLE_tsk);
+		}
+		w = w->next;
+	} while (w != Curwin);
 }
 
-
-        /*
-         * Set the screen dimensions and arrange for the real workhorse.
-         * (also) catches:
-         *    SIGWINCH and SIGCONT */
-static void wins_resize (int dont_care_sig)
+	/*
+	 * Set the screen dimensions and arrange for the real workhorse.
+	 * (also) catches:
+	 *    SIGWINCH and SIGCONT */
+static void wins_resize(int dont_care_sig)
 {
-   struct winsize wz;
+	struct winsize wz;
 
-   (void)dont_care_sig;
-   Screen_cols = columns;
-   Screen_rows = lines;
-   if (-1 != (ioctl(STDOUT_FILENO, TIOCGWINSZ, &wz))) {
-      Screen_cols = wz.ws_col;
-      Screen_rows = wz.ws_row;
-   }
-   if (Batch) Screen_rows = MAXINT;
+	(void)dont_care_sig;
+	Screen_cols = columns;
+	Screen_rows = lines;
+	if (-1 != (ioctl(STDOUT_FILENO, TIOCGWINSZ, &wz))) {
+		Screen_cols = wz.ws_col;
+		Screen_rows = wz.ws_row;
+	}
+	if (Batch)
+		Screen_rows = MAXINT;
 
-   // we might disappoint some folks (but they'll deserve it)
-   if (SCREENMAX < Screen_cols) Screen_cols = SCREENMAX;
+	// we might disappoint some folks (but they'll deserve it)
+	if (SCREENMAX < Screen_cols)
+		Screen_cols = SCREENMAX;
 
-   /* keep our support for output optimization in sync with current reality
-      note: when we're in Batch mode, we don't really need a Pseudo_scrn and
-            when not Batch, our buffer will contain 1 extra 'line' since
-            Msg_row is never represented -- but it's nice to have some space
-            between us and the great-beyond... */
-   Pseudo_cols = Screen_cols + CLRBUFSIZ + 1;
-   if (Batch) Pseudo_size = ROWBUFSIZ + 1;
-      else Pseudo_size = Pseudo_cols * Screen_rows;
-   Pseudo_scrn = alloc_r(Pseudo_scrn, Pseudo_size);
+	/* keep our support for output optimization in sync with current reality
+	   note: when we're in Batch mode, we don't really need a Pseudo_scrn and
+	   when not Batch, our buffer will contain 1 extra 'line' since
+	   Msg_row is never represented -- but it's nice to have some space
+	   between us and the great-beyond... */
+	Pseudo_cols = Screen_cols + CLRBUFSIZ + 1;
+	if (Batch)
+		Pseudo_size = ROWBUFSIZ + 1;
+	else
+		Pseudo_size = Pseudo_cols * Screen_rows;
+	Pseudo_scrn = alloc_r(Pseudo_scrn, Pseudo_size);
 
-   // force rebuild of column headers AND libproc/readproc requirements
-   Frames_libflags = 0;
+	// force rebuild of column headers AND libproc/readproc requirements
+	Frames_libflags = 0;
 }
 
-
-        /*
-         * Set up the raw/incomplete field group windows --
-         * they'll be finished off after startup completes.
-         * [ and very likely that will override most/all of our efforts ]
-         * [               --- life-is-NOT-fair ---                     ] */
-static void windows_stage1 (void)
+	/*
+	 * Set up the raw/incomplete field group windows --
+	 * they'll be finished off after startup completes.
+	 * [ and very likely that will override most/all of our efforts ]
+	 * [               --- life-is-NOT-fair ---                     ] */
+static void windows_stage1(void)
 {
-   WIN_t *w;
-   int i;
+	WIN_t *w;
+	int i;
 
-   for (i = 0; i < GROUPSMAX; i++) {
-      w = &Winstk[i];
-      w->winnum = i + 1;
-      w->rc = Rc.win[i];
-      w->captab[0] = Cap_norm;
-      w->captab[1] = Cap_norm;
-      w->captab[2] = w->cap_bold;
-      w->captab[3] = w->capclr_sum;
-      w->captab[4] = w->capclr_msg;
-      w->captab[5] = w->capclr_pmt;
-      w->captab[6] = w->capclr_hdr;
-      w->captab[7] = w->capclr_rowhigh;
-      w->captab[8] = w->capclr_rownorm;
-      w->next = w + 1;
-      w->prev = w - 1;
-      ++w;
-   }
-      /* fixup the circular chains... */
-   Winstk[3].next = &Winstk[0];
-   Winstk[0].prev = &Winstk[3];
-   Curwin = Winstk;
+	for (i = 0; i < GROUPSMAX; i++) {
+		w = &Winstk[i];
+		w->winnum = i + 1;
+		w->rc = Rc.win[i];
+		w->captab[0] = Cap_norm;
+		w->captab[1] = Cap_norm;
+		w->captab[2] = w->cap_bold;
+		w->captab[3] = w->capclr_sum;
+		w->captab[4] = w->capclr_msg;
+		w->captab[5] = w->capclr_pmt;
+		w->captab[6] = w->capclr_hdr;
+		w->captab[7] = w->capclr_rowhigh;
+		w->captab[8] = w->capclr_rownorm;
+		w->next = w + 1;
+		w->prev = w - 1;
+		++w;
+	}
+	/* fixup the circular chains... */
+	Winstk[3].next = &Winstk[0];
+	Winstk[0].prev = &Winstk[3];
+	Curwin = Winstk;
 }
 
-
-        /*
-         * This guy just completes the field group windows after the
-         * rcfiles have been read and command line arguments parsed */
-static void windows_stage2 (void)
+	/*
+	 * This guy just completes the field group windows after the
+	 * rcfiles have been read and command line arguments parsed */
+static void windows_stage2(void)
 {
-   int i;
+	int i;
 
-   for (i = 0; i < GROUPSMAX; i++) {
-      win_names(&Winstk[i], Winstk[i].rc.winname);
-      capsmk(&Winstk[i]);
-   }
-   // rely on this next guy to force a call (eventually) to reframewins
-   wins_resize(0);
+	for (i = 0; i < GROUPSMAX; i++) {
+		win_names(&Winstk[i], Winstk[i].rc.winname);
+		capsmk(&Winstk[i]);
+	}
+	// rely on this next guy to force a call (eventually) to reframewins
+	wins_resize(0);
 }
 
-
 /*######  Main Screen routines  ##########################################*/
 
-        /*
-         * Process keyboard input during the main loop */
-static void do_key (unsigned c)
+	/*
+	 * Process keyboard input during the main loop */
+static void do_key(unsigned c)
 {
-   // standardized 'secure mode' errors
-   static const char err_secure[] = "\aUnavailable in secure mode";
+	// standardized 'secure mode' errors
+	static const char err_secure[] = "\aUnavailable in secure mode";
 #ifdef WARN_NOT_SMP
-   // standardized 'smp' errors
-   static const char err_smp[] = "\aSorry, only 1 cpu detected";
+	// standardized 'smp' errors
+	static const char err_smp[] = "\aSorry, only 1 cpu detected";
 #endif
 
-   switch (c) {
-      case '1':
+	switch (c) {
+	case '1':
 #ifdef WARN_NOT_SMP
-         if (Cpu_tot > 1) TOGw(Curwin, View_CPUSUM);
-         else show_msg(err_smp);
+		if (Cpu_tot > 1)
+			TOGw(Curwin, View_CPUSUM);
+		else
+			show_msg(err_smp);
 #else
-         TOGw(Curwin, View_CPUSUM);
+		TOGw(Curwin, View_CPUSUM);
 #endif
-         break;
+		break;
 
-      case 'a':
-         if (Rc.mode_altscr) Curwin = Curwin->next;
-         break;
+	case 'a':
+		if (Rc.mode_altscr)
+			Curwin = Curwin->next;
+		break;
 
-      case 'A':
-         Rc.mode_altscr = !Rc.mode_altscr;
-         wins_resize(0);
-         break;
+	case 'A':
+		Rc.mode_altscr = !Rc.mode_altscr;
+		wins_resize(0);
+		break;
 
-      case 'b':
-         if (VIZCHKc) {
-            if (!CHKw(Curwin, Show_HICOLS | Show_HIROWS))
-               show_msg("\aNothing to highlight!");
-            else {
-               TOGw(Curwin, Show_HIBOLD);
-               capsmk(Curwin);
-            }
-         }
-         break;
+	case 'b':
+		if (VIZCHKc) {
+			if (!CHKw(Curwin, Show_HICOLS | Show_HIROWS))
+				show_msg("\aNothing to highlight!");
+			else {
+				TOGw(Curwin, Show_HIBOLD);
+				capsmk(Curwin);
+			}
+		}
+		break;
 
-      case 'B':
-         TOGw(Curwin, View_NOBOLD);
-         capsmk(Curwin);
-         break;
+	case 'B':
+		TOGw(Curwin, View_NOBOLD);
+		capsmk(Curwin);
+		break;
 
-      case 'c':
-         VIZTOGc(Show_CMDLIN);
-         break;
+	case 'c':
+		VIZTOGc(Show_CMDLIN);
+		break;
 
-      case 'd':
-      case 's':
-         if (Secure_mode)
-            show_msg(err_secure);
-         else {
-            float tmp =
-               get_float(fmtmk("Change delay from %.1f to", Rc.delay_time));
-            if (-1 < tmp) Rc.delay_time = tmp;
-         }
-         break;
+	case 'd':
+	case 's':
+		if (Secure_mode)
+			show_msg(err_secure);
+		else {
+			float tmp =
+			    get_float(fmtmk
+				      ("Change delay from %.1f to",
+				       Rc.delay_time));
+			if (-1 < tmp)
+				Rc.delay_time = tmp;
+		}
+		break;
 
-      case 'f':
-         if (VIZCHKc) fields_toggle();
-         break;
+	case 'f':
+		if (VIZCHKc)
+			fields_toggle();
+		break;
 
-      case 'F':
-      case 'O':
-         if (VIZCHKc) fields_sort();
-         break;
+	case 'F':
+	case 'O':
+		if (VIZCHKc)
+			fields_sort();
+		break;
 
-      case 'g':
-         if (Rc.mode_altscr) {
-            char tmp[GETBUFSIZ];
-            strcpy(tmp, ask4str(fmtmk("Rename window '%s' to (1-3 chars)"
-               , Curwin->rc.winname)));
-            if (tmp[0]) win_names(Curwin, tmp);
-         }
-         break;
+	case 'g':
+		if (Rc.mode_altscr) {
+			char tmp[GETBUFSIZ];
+			strcpy(tmp,
+			       ask4str(fmtmk
+				       ("Rename window '%s' to (1-3 chars)",
+					Curwin->rc.winname)));
+			if (tmp[0])
+				win_names(Curwin, tmp);
+		}
+		break;
 
-      case 'G':
-         win_select(0);
-         break;
+	case 'G':
+		win_select(0);
+		break;
 
-      case 'h':
-      case '?':
-      {  char ch;
-         putp(Cap_clr_scr);
-         putp(Cap_curs_huge);
-            /* this string is well above ISO C89's minimum requirements! */
-         show_special(1, fmtmk(KEYS_help
-            , procps_version
-            , Curwin->grpname
-            , CHKw(Curwin, Show_CTIMES) ? "On" : "Off"
-            , Rc.delay_time
-            , Secure_mode ? "On" : "Off"
-            , Secure_mode ? "" : KEYS_help_unsecured));
-         chin(0, &ch, 1);
-         if ('?' == ch || 'h' == ch) {
-            do {
-               putp(Cap_clr_scr);
-               show_special(1, fmtmk(WINDOWS_help
-                  , Curwin->grpname
-                  , Winstk[0].rc.winname
-                  , Winstk[1].rc.winname
-                  , Winstk[2].rc.winname
-                  , Winstk[3].rc.winname));
-               chin(0, &ch, 1);
-               win_select(ch);
-            } while ('\n' != ch);
-         }
-         putp(Cap_curs_norm);
-      }
-         break;
+	case 'h':
+	case '?':
+		{
+			char ch;
+			putp(Cap_clr_scr);
+			putp(Cap_curs_huge);
+			/* this string is well above ISO C89's minimum requirements! */
+			show_special(1,
+				     fmtmk(KEYS_help, procps_version,
+					   Curwin->grpname, CHKw(Curwin,
+								 Show_CTIMES) ?
+					   "On" : "Off", Rc.delay_time,
+					   Secure_mode ? "On" : "Off",
+					   Secure_mode ? "" :
+					   KEYS_help_unsecured));
+			chin(0, &ch, 1);
+			if ('?' == ch || 'h' == ch) {
+				do {
+					putp(Cap_clr_scr);
+					show_special(1,
+						     fmtmk(WINDOWS_help,
+							   Curwin->grpname,
+							   Winstk[0].rc.winname,
+							   Winstk[1].rc.winname,
+							   Winstk[2].rc.winname,
+							   Winstk[3].rc.
+							   winname));
+					chin(0, &ch, 1);
+					win_select(ch);
+				} while ('\n' != ch);
+			}
+			putp(Cap_curs_norm);
+		}
+		break;
 
-      case 'i':
-         VIZTOGc(Show_IDLEPS);
-         break;
+	case 'i':
+		VIZTOGc(Show_IDLEPS);
+		break;
 
-      case 'I':
+	case 'I':
 #ifdef WARN_NOT_SMP
-         if (Cpu_tot > 1) {
-            Rc.mode_irixps = !Rc.mode_irixps;
-            show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
-         } else
-            show_msg(err_smp);
+		if (Cpu_tot > 1) {
+			Rc.mode_irixps = !Rc.mode_irixps;
+			show_msg(fmtmk
+				 ("Irix mode %s",
+				  Rc.mode_irixps ? "On" : "Off"));
+		} else
+			show_msg(err_smp);
 #else
-         Rc.mode_irixps = !Rc.mode_irixps;
-         show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
+		Rc.mode_irixps = !Rc.mode_irixps;
+		show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
 #endif
-         break;
+		break;
 
-      case 'k':
-         if (Secure_mode) {
-            show_msg(err_secure);
-         } else {
-            int sig, pid = get_int("PID to kill");
-            if (0 < pid) {
-               sig = signal_name_to_number(
-                  ask4str(fmtmk("Kill PID %d with signal [%i]"
-                     , pid, DEF_SIGNAL)));
-               if (-1 == sig) sig = DEF_SIGNAL;
-               if (sig && kill(pid, sig))
-                  show_msg(fmtmk("\aKill of PID '%d' with '%d' failed: %s"
-                     , pid, sig, strerror(errno)));
-            }
-         }
-         break;
+	case 'k':
+		if (Secure_mode) {
+			show_msg(err_secure);
+		} else {
+			int sig, pid = get_int("PID to kill");
+			if (0 < pid) {
+				sig =
+				    signal_name_to_number(ask4str
+							  (fmtmk
+							   ("Kill PID %d with signal [%i]",
+							    pid, DEF_SIGNAL)));
+				if (-1 == sig)
+					sig = DEF_SIGNAL;
+				if (sig && kill(pid, sig))
+					show_msg(fmtmk
+						 ("\aKill of PID '%d' with '%d' failed: %s",
+						  pid, sig, strerror(errno)));
+			}
+		}
+		break;
 
-      case 'l':
-         TOGw(Curwin, View_LOADAV);
-         break;
+	case 'l':
+		TOGw(Curwin, View_LOADAV);
+		break;
 
-      case 'm':
-         TOGw(Curwin, View_MEMORY);
-         break;
+	case 'm':
+		TOGw(Curwin, View_MEMORY);
+		break;
 
-      case 'n':
-      case '#':
-         if (VIZCHKc) {
-            int num =
-               get_int(fmtmk("Maximum tasks = %d, change to (0 is unlimited)"
-                  , Curwin->rc.maxtasks));
-            if (-1 < num) Curwin->rc.maxtasks = num;
-         }
-         break;
+	case 'n':
+	case '#':
+		if (VIZCHKc) {
+			int num =
+			    get_int(fmtmk
+				    ("Maximum tasks = %d, change to (0 is unlimited)",
+				     Curwin->rc.maxtasks));
+			if (-1 < num)
+				Curwin->rc.maxtasks = num;
+		}
+		break;
 
-      case 'o':
-         if (VIZCHKc) fields_reorder();
-         break;
+	case 'o':
+		if (VIZCHKc)
+			fields_reorder();
+		break;
 
-      case 'q':
-         end_pgm(0);
+	case 'q':
+		end_pgm(0);
 
-      case 'r':
-         if (Secure_mode)
-            show_msg(err_secure);
-         else {
-            int val, pid = get_int("PID to renice");
-            if (0 < pid) {
-               val = get_int(fmtmk("Renice PID %d to value", pid));
-               if (setpriority(PRIO_PROCESS, (unsigned)pid, val))
-                  show_msg(fmtmk("\aRenice of PID %d to %d failed: %s"
-                     , pid, val, strerror(errno)));
-            }
-         }
-         break;
+	case 'r':
+		if (Secure_mode)
+			show_msg(err_secure);
+		else {
+			int val, pid = get_int("PID to renice");
+			if (0 < pid) {
+				val =
+				    get_int(fmtmk
+					    ("Renice PID %d to value", pid));
+				if (setpriority
+				    (PRIO_PROCESS, (unsigned)pid, val))
+					show_msg(fmtmk
+						 ("\aRenice of PID %d to %d failed: %s",
+						  pid, val, strerror(errno)));
+			}
+		}
+		break;
 
-      case 'R':
-         VIZTOGc(Qsrt_NORMAL);
-         break;
+	case 'R':
+		VIZTOGc(Qsrt_NORMAL);
+		break;
 
-      case 'S':
-         if (VIZCHKc) {
-            TOGw(Curwin, Show_CTIMES);
-            show_msg(fmtmk("Cumulative time %s"
-               , CHKw(Curwin, Show_CTIMES) ? "On" : "Off"));
-         }
-         break;
+	case 'S':
+		if (VIZCHKc) {
+			TOGw(Curwin, Show_CTIMES);
+			show_msg(fmtmk
+				 ("Cumulative time %s",
+				  CHKw(Curwin, Show_CTIMES) ? "On" : "Off"));
+		}
+		break;
 
-      case 't':
-         TOGw(Curwin, View_STATES);
-         break;
+	case 't':
+		TOGw(Curwin, View_STATES);
+		break;
 
 //    case 'u':
 //       if (VIZCHKc)
 //          strcpy(Curwin->colusrnam, ask4str("Which user (blank for all)"));
 //       break;
 
-      case 'u':
+	case 'u':
 //       if (!VIZCHKc) break;
-         do {
-            const char *errmsg;
-            const char *answer;
-            answer = ask4str("Which user (blank for all)");
-            // FIXME: do this better:
-            if (!answer || *answer=='\0' || *answer=='\n' || *answer=='\r' || *answer=='\t' || *answer==' ') {
-               selection_type = 0;
-               selection_uid = -1;
-               break;
-            }
-            errmsg = parse_uid(answer, &selection_uid);
-            if (errmsg) {
-               show_msg(errmsg);
-               // Change settings here? I guess not.
-               break;
-            }
-            selection_type = 'u';
-         } while (0);
-         break;
+		do {
+			const char *errmsg;
+			const char *answer;
+			answer = ask4str("Which user (blank for all)");
+			// FIXME: do this better:
+			if (!answer || *answer == '\0' || *answer == '\n'
+			    || *answer == '\r' || *answer == '\t'
+			    || *answer == ' ') {
+				selection_type = 0;
+				selection_uid = -1;
+				break;
+			}
+			errmsg = parse_uid(answer, &selection_uid);
+			if (errmsg) {
+				show_msg(errmsg);
+				// Change settings here? I guess not.
+				break;
+			}
+			selection_type = 'u';
+		} while (0);
+		break;
 
-      case 'U':
+	case 'U':
 //       if (!VIZCHKc) break;
-         do {
-            const char *errmsg;
-            const char *answer;
-            answer = ask4str("Which user (blank for all)");
-            // FIXME: do this better:
-            if (!answer || *answer=='\0' || *answer=='\n' || *answer=='\r' || *answer=='\t' || *answer==' ') {
-               selection_type = 0;
-               selection_uid = -1;
-               break;
-            }
-            errmsg = parse_uid(answer, &selection_uid);
-            if (errmsg) {
-               show_msg(errmsg);
-               // Change settings here? I guess not.
-               break;
-            }
-            selection_type = 'U';
-         } while (0);
-         break;
+		do {
+			const char *errmsg;
+			const char *answer;
+			answer = ask4str("Which user (blank for all)");
+			// FIXME: do this better:
+			if (!answer || *answer == '\0' || *answer == '\n'
+			    || *answer == '\r' || *answer == '\t'
+			    || *answer == ' ') {
+				selection_type = 0;
+				selection_uid = -1;
+				break;
+			}
+			errmsg = parse_uid(answer, &selection_uid);
+			if (errmsg) {
+				show_msg(errmsg);
+				// Change settings here? I guess not.
+				break;
+			}
+			selection_type = 'U';
+		} while (0);
+		break;
 
-      case 'w':
-         if (Rc.mode_altscr) Curwin = Curwin->prev;
-         break;
+	case 'w':
+		if (Rc.mode_altscr)
+			Curwin = Curwin->prev;
+		break;
 
-      case 'W':
-      {  const char *err = rc_write_whatever();
-         if (err)
-            show_msg(fmtmk("\aFailed '%s' open: %s", Rc_name, err));
-         else
-            show_msg(fmtmk("Wrote configuration to '%s'", Rc_name));
-      }
-         break;
+	case 'W':
+		{
+			const char *err = rc_write_whatever();
+			if (err)
+				show_msg(fmtmk
+					 ("\aFailed '%s' open: %s", Rc_name,
+					  err));
+			else
+				show_msg(fmtmk
+					 ("Wrote configuration to '%s'",
+					  Rc_name));
+		}
+		break;
 
-      case 'x':
-         if (VIZCHKc) {
-            TOGw(Curwin, Show_HICOLS);
-            capsmk(Curwin);
-         }
-         break;
+	case 'x':
+		if (VIZCHKc) {
+			TOGw(Curwin, Show_HICOLS);
+			capsmk(Curwin);
+		}
+		break;
 
-      case 'y':
-         if (VIZCHKc) {
-            TOGw(Curwin, Show_HIROWS);
-            capsmk(Curwin);
-         }
-         break;
+	case 'y':
+		if (VIZCHKc) {
+			TOGw(Curwin, Show_HIROWS);
+			capsmk(Curwin);
+		}
+		break;
 
-      case 'z':
-         if (VIZCHKc) {
-            TOGw(Curwin, Show_COLORS);
-            capsmk(Curwin);
-         }
-         break;
+	case 'z':
+		if (VIZCHKc) {
+			TOGw(Curwin, Show_COLORS);
+			capsmk(Curwin);
+		}
+		break;
 
-      case 'Z':
-         wins_colors();
-         break;
+	case 'Z':
+		wins_colors();
+		break;
 
-      case '-':
-         if (Rc.mode_altscr) TOGw(Curwin, VISIBLE_tsk);
-         break;
+	case '-':
+		if (Rc.mode_altscr)
+			TOGw(Curwin, VISIBLE_tsk);
+		break;
 
-      case '_':
-         if (Rc.mode_altscr) wins_reflag(Flags_TOG, VISIBLE_tsk);
-         break;
+	case '_':
+		if (Rc.mode_altscr)
+			wins_reflag(Flags_TOG, VISIBLE_tsk);
+		break;
 
-      case '=':
-         Curwin->rc.maxtasks = 0;
-         SETw(Curwin, Show_IDLEPS | VISIBLE_tsk);
-         Monpidsidx = 0;
-         break;
+	case '=':
+		Curwin->rc.maxtasks = 0;
+		SETw(Curwin, Show_IDLEPS | VISIBLE_tsk);
+		Monpidsidx = 0;
+		break;
 
-      case '+':
-         if (Rc.mode_altscr) SETw(Curwin, EQUWINS_cwo);
-         break;
+	case '+':
+		if (Rc.mode_altscr)
+			SETw(Curwin, EQUWINS_cwo);
+		break;
 
-      case '<':
-         if (VIZCHKc) {
-            FLG_t *p = Curwin->procflags + Curwin->maxpflgs - 1;
-            while (*p != Curwin->rc.sortindx) --p;
-            if (--p >= Curwin->procflags)
-               Curwin->rc.sortindx = *p;
-         }
-         break;
+	case '<':
+		if (VIZCHKc) {
+			FLG_t *p = Curwin->procflags + Curwin->maxpflgs - 1;
+			while (*p != Curwin->rc.sortindx)
+				--p;
+			if (--p >= Curwin->procflags)
+				Curwin->rc.sortindx = *p;
+		}
+		break;
 
-      case '>':
-         if (VIZCHKc) {
-            FLG_t *p = Curwin->procflags;
-            while (*p != Curwin->rc.sortindx) ++p;
-            if (++p < Curwin->procflags + Curwin->maxpflgs)
-               Curwin->rc.sortindx = *p;
-         }
-         break;
+	case '>':
+		if (VIZCHKc) {
+			FLG_t *p = Curwin->procflags;
+			while (*p != Curwin->rc.sortindx)
+				++p;
+			if (++p < Curwin->procflags + Curwin->maxpflgs)
+				Curwin->rc.sortindx = *p;
+		}
+		break;
 
-      case 'M':         // these keys represent old-top compatability
-      case 'N':         // -- grouped here so that if users could ever
-      case 'P':         // be weaned, we would just whack this part...
-      case 'T':
-      {  static struct {
-            const unsigned  xkey;
-            const char     *xmsg;
-            const FLG_t     sort;
-         } xtab[] = {
-            { 'M', "Memory", P_MEM, }, { 'N', "Numerical", P_PID, },
-            { 'P', "CPU",    P_CPU, }, { 'T', "Time",      P_TM2  }, };
-         int i;
-         for (i = 0; i < MAXTBL(xtab); ++i)
-            if (c == xtab[i].xkey) {
-               Curwin->rc.sortindx = xtab[i].sort;
-               show_msg(fmtmk("%s sort compatibility key honored", xtab[i].xmsg));
-               break;
-            }
-      }
-         break;
+	case 'M':		// these keys represent old-top compatability
+	case 'N':		// -- grouped here so that if users could ever
+	case 'P':		// be weaned, we would just whack this part...
+	case 'T':
+		{
+			static struct {
+				const unsigned xkey;
+				const char *xmsg;
+				const FLG_t sort;
+			} xtab[] = {
+				{
+				'M', "Memory", P_MEM,}, {
+				'N', "Numerical", P_PID,}, {
+				'P', "CPU", P_CPU,}, {
+			'T', "Time", P_TM2},};
+			int i;
+			for (i = 0; i < MAXTBL(xtab); ++i)
+				if (c == xtab[i].xkey) {
+					Curwin->rc.sortindx = xtab[i].sort;
+					show_msg(fmtmk
+						 ("%s sort compatibility key honored",
+						  xtab[i].xmsg));
+					break;
+				}
+		}
+		break;
 
-      case '\n':        // just ignore these, they'll have the effect
-      case ' ':         // of refreshing display after waking us up !
-         break;
+	case '\n':		// just ignore these, they'll have the effect
+	case ' ':		// of refreshing display after waking us up !
+		break;
 
-      default:
-         show_msg("\aUnknown command - try 'h' for help");
-   }
-   /* The following assignment will force a rebuild of all column headers and
-      the PROC_FILLxxx flags.  It's NOT simply lazy programming.  Here are
-      some keys that COULD require new column headers and/or libproc flags:
-         'A' - likely
-         'c' - likely when !Mode_altscr, maybe when Mode_altscr
-         'F' - maybe, if new field forced on
-         'f' - likely
-         'G' - likely
-         'O' - maybe, if new field forced on
-         'o' - maybe, if new field brought into view
-         'Z' - likely, if 'Curwin' changed when !Mode_altscr
-         '-' - likely (restricted to Mode_altscr)
-         '_' - likely (restricted to Mode_altscr)
-         '=' - maybe, but only when Mode_altscr
-         '+' - likely (restricted to Mode_altscr)
-      ( At this point we have a human being involved and so have all the time )
-      ( in the world.  We can afford a few extra cpu cycles every now & then! )
-    */
-   Frames_libflags = 0;
+	default:
+		show_msg("\aUnknown command - try 'h' for help");
+	}
+	/* The following assignment will force a rebuild of all column headers and
+	   the PROC_FILLxxx flags.  It's NOT simply lazy programming.  Here are
+	   some keys that COULD require new column headers and/or libproc flags:
+	   'A' - likely
+	   'c' - likely when !Mode_altscr, maybe when Mode_altscr
+	   'F' - maybe, if new field forced on
+	   'f' - likely
+	   'G' - likely
+	   'O' - maybe, if new field forced on
+	   'o' - maybe, if new field brought into view
+	   'Z' - likely, if 'Curwin' changed when !Mode_altscr
+	   '-' - likely (restricted to Mode_altscr)
+	   '_' - likely (restricted to Mode_altscr)
+	   '=' - maybe, but only when Mode_altscr
+	   '+' - likely (restricted to Mode_altscr)
+	   ( At this point we have a human being involved and so have all the time )
+	   ( in the world.  We can afford a few extra cpu cycles every now & then! )
+	 */
+	Frames_libflags = 0;
 }
 
-
-        /*
-         * State display *Helper* function to calc and display the state
-         * percentages for a single cpu.  In this way, we can support
-         * the following environments without the usual code bloat.
-         *    1) single cpu machines
-         *    2) modest smp boxes with room for each cpu's percentages
-         *    3) massive smp guys leaving little or no room for process
-         *       display and thus requiring the cpu summary toggle */
-static void summaryhlp (CPU_t *cpu, const char *pfx)
+	/*
+	 * State display *Helper* function to calc and display the state
+	 * percentages for a single cpu.  In this way, we can support
+	 * the following environments without the usual code bloat.
+	 *    1) single cpu machines
+	 *    2) modest smp boxes with room for each cpu's percentages
+	 *    3) massive smp guys leaving little or no room for process
+	 *       display and thus requiring the cpu summary toggle */
+static void summaryhlp(CPU_t * cpu, const char *pfx)
 {
-   /* we'll trim to zero if we get negative time ticks,
-      which has happened with some SMP kernels (pre-2.4?) */
+	/* we'll trim to zero if we get negative time ticks,
+	   which has happened with some SMP kernels (pre-2.4?) */
 #define TRIMz(x)  ((tz = (SIC_t)(x)) < 0 ? 0 : tz)
-   SIC_t u_frme, s_frme, n_frme, i_frme, w_frme, tot_frme, tz;
-   float scale;
+	SIC_t u_frme, s_frme, n_frme, i_frme, w_frme, tot_frme, tz;
+	float scale;
 
-   u_frme = cpu->u - cpu->u_sav;
-   s_frme = cpu->s - cpu->s_sav;
-   n_frme = cpu->n - cpu->n_sav;
-   i_frme = TRIMz(cpu->i - cpu->i_sav);
-   w_frme = cpu->w - cpu->w_sav;
-   tot_frme = u_frme + s_frme + n_frme + i_frme + w_frme;
-   if (1 > tot_frme) tot_frme = 1;
-   scale = 100.0 / (float)tot_frme;
+	u_frme = cpu->u - cpu->u_sav;
+	s_frme = cpu->s - cpu->s_sav;
+	n_frme = cpu->n - cpu->n_sav;
+	i_frme = TRIMz(cpu->i - cpu->i_sav);
+	w_frme = cpu->w - cpu->w_sav;
+	tot_frme = u_frme + s_frme + n_frme + i_frme + w_frme;
+	if (1 > tot_frme)
+		tot_frme = 1;
+	scale = 100.0 / (float)tot_frme;
 
-   /* display some kinda' cpu state percentages
-      (who or what is explained by the passed prefix) */
-   show_special(0, fmtmk(States_fmts
-      , pfx
-      , (float)u_frme * scale
-      , (float)s_frme * scale
-      , (float)n_frme * scale
-      , (float)i_frme * scale
-      , (float)w_frme * scale));
-   if (o_flag)
-      fprintf(outfile, " %s User:%.2f\tSystem:%.2f\tNice:%.2f\t\tIdle:%.2f\tIO-wait:%.2f\n"
-              , pfx
-              , (float)u_frme * scale
-      	      , (float)s_frme * scale
-      	      , (float)n_frme * scale
-      	      , (float)i_frme * scale
-      	      , (float)w_frme * scale);
-   Msg_row += 1;
+	/* display some kinda' cpu state percentages
+	   (who or what is explained by the passed prefix) */
+	show_special(0,
+		     fmtmk(States_fmts, pfx, (float)u_frme * scale,
+			   (float)s_frme * scale, (float)n_frme * scale,
+			   (float)i_frme * scale, (float)w_frme * scale));
+	if (o_flag)
+		fprintf(outfile,
+			" %s User:%.2f\tSystem:%.2f\tNice:%.2f\t\tIdle:%.2f\tIO-wait:%.2f\n",
+			pfx, (float)u_frme * scale, (float)s_frme * scale,
+			(float)n_frme * scale, (float)i_frme * scale,
+			(float)w_frme * scale);
+	Msg_row += 1;
 
-   // remember for next time around
-   cpu->u_sav = cpu->u;
-   cpu->s_sav = cpu->s;
-   cpu->n_sav = cpu->n;
-   cpu->i_sav = cpu->i;
-   cpu->w_sav = cpu->w;
+	// remember for next time around
+	cpu->u_sav = cpu->u;
+	cpu->s_sav = cpu->s;
+	cpu->n_sav = cpu->n;
+	cpu->i_sav = cpu->i;
+	cpu->w_sav = cpu->w;
 
 #undef TRIMz
 }
 
-
-        /*
-         * Begin a new frame by:
-         *    1) Refreshing the all important proc table
-         *    2) Displaying uptime and load average (maybe)
-         *    3) Displaying task/cpu states (maybe)
-         *    4) Displaying memory & swap usage (maybe)
-         * and then, returning a pointer to the pointers to the proc_t's! */
-static proc_t **summary_show (void)
+	/*
+	 * Begin a new frame by:
+	 *    1) Refreshing the all important proc table
+	 *    2) Displaying uptime and load average (maybe)
+	 *    3) Displaying task/cpu states (maybe)
+	 *    4) Displaying memory & swap usage (maybe)
+	 * and then, returning a pointer to the pointers to the proc_t's! */
+static proc_t **summary_show(void)
 {
-   static proc_t **p_table = NULL;
-   static CPU_t  *smpcpu = NULL;
+	static proc_t **p_table = NULL;
+	static CPU_t *smpcpu = NULL;
 
-   // whoa first time, gotta' prime the pump...
-   if (!p_table) {
-      p_table = procs_refresh(NULL, L_DEFAULT);
-      putp(Cap_clr_scr);
-      sleep(1);
-   } else
-      putp(Batch ? "\n\n" : Cap_home);
-   p_table = procs_refresh(p_table, Frames_libflags);
+	// whoa first time, gotta' prime the pump...
+	if (!p_table) {
+		p_table = procs_refresh(NULL, L_DEFAULT);
+		putp(Cap_clr_scr);
+		sleep(1);
+	} else
+		putp(Batch ? "\n\n" : Cap_home);
+	p_table = procs_refresh(p_table, Frames_libflags);
 
-   /*
-    ** Display Uptime and Loadavg */
-   if (CHKw(Curwin, View_LOADAV)) {
-      if (!Rc.mode_altscr)
-         show_special(0, fmtmk(LOADAV_line, Myname, sprint_uptime()));
-      else
-         show_special(0, fmtmk(CHKw(Curwin, VISIBLE_tsk)
-            ? LOADAV_line_alt
-            : LOADAV_line
-            , Curwin->grpname, sprint_uptime()));
-      Msg_row += 1;
-   }
+	/*
+	 ** Display Uptime and Loadavg */
+	if (CHKw(Curwin, View_LOADAV)) {
+		if (!Rc.mode_altscr)
+			show_special(0,
+				     fmtmk(LOADAV_line, Myname,
+					   sprint_uptime()));
+		else
+			show_special(0, fmtmk(CHKw(Curwin, VISIBLE_tsk)
+					      ? LOADAV_line_alt
+					      : LOADAV_line, Curwin->grpname,
+					      sprint_uptime()));
+		Msg_row += 1;
+	}
 
-   /*
-    ** Display Task and Cpu(s) States */
+	/*
+	 ** Display Task and Cpu(s) States */
 
-   if (CHKw(Curwin, View_STATES)) {
-      show_special(0, fmtmk(STATES_line1
-         , Frame_maxtask, Frame_running, Frame_sleepin
-         , Frame_stopped, Frame_zombied));
-      if (o_flag)
-         fprintf(outfile, " MaxTasks:%d\t\tRunningTasks:%d\tSleepingTasks:%d\tStoppedTasks:%d\tZombieTasks:%d\n\n"
-                 , Frame_maxtask, Frame_running, Frame_sleepin
-                 , Frame_stopped, Frame_zombied);
-      Msg_row += 1;
+	if (CHKw(Curwin, View_STATES)) {
+		show_special(0,
+			     fmtmk(STATES_line1, Frame_maxtask, Frame_running,
+				   Frame_sleepin, Frame_stopped,
+				   Frame_zombied));
+		if (o_flag)
+			fprintf(outfile,
+				" MaxTasks:%d\t\tRunningTasks:%d\tSleepingTasks:%d\tStoppedTasks:%d\tZombieTasks:%d\n\n",
+				Frame_maxtask, Frame_running, Frame_sleepin,
+				Frame_stopped, Frame_zombied);
+		Msg_row += 1;
 
-      smpcpu = cpus_refresh(smpcpu);
+		smpcpu = cpus_refresh(smpcpu);
 
-      if (CHKw(Curwin, View_CPUSUM)) {
-         // display just the 1st /proc/stat line
-         summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
-	 if (o_flag)
-	    fprintf(outfile,"\n");
-      } else {
-         int i;
-         char tmp[SMLBUFSIZ];
-         // display each cpu's states separately
-         for (i = 0; i < Cpu_tot; i++) {
-            snprintf(tmp, sizeof(tmp), " Cpu%-2d:", Rc.mode_irixps ? i : Cpu_map[i]);
-            summaryhlp(&smpcpu[i], tmp);
-         }
-      }
-   }
+		if (CHKw(Curwin, View_CPUSUM)) {
+			// display just the 1st /proc/stat line
+			summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
+			if (o_flag)
+				fprintf(outfile, "\n");
+		} else {
+			int i;
+			char tmp[SMLBUFSIZ];
+			// display each cpu's states separately
+			for (i = 0; i < Cpu_tot; i++) {
+				snprintf(tmp, sizeof(tmp), " Cpu%-2d:",
+					 Rc.mode_irixps ? i : Cpu_map[i]);
+				summaryhlp(&smpcpu[i], tmp);
+			}
+		}
+	}
 
-   /*
-    ** Display Memory and Swap stats */
-   meminfo();
-   if (CHKw(Curwin, View_MEMORY)) {
-      show_special(0, fmtmk(MEMORY_line1
-         , kb_main_total, kb_main_used, kb_main_free, kb_main_buffers));
-      if (o_flag)
-         fprintf(outfile, " TotalMem:%dk\tUsedMem:%dk\tFreeMem:%dk\t\tBuffers:%dk\n"
-                 , kb_main_total, kb_main_used, kb_main_free, kb_main_buffers);
-      show_special(0, fmtmk(MEMORY_line2
-         , kb_swap_total, kb_swap_used, kb_swap_free, kb_main_cached));
-      if (o_flag)
-         fprintf(outfile, " TotalSwap:%dk\tUsedSwap:%dk\tFreeSwap:%dk\tCached:%dk\n"
-                 , kb_swap_total, kb_swap_used, kb_swap_free, kb_main_cached);
-      Msg_row += 2;
-   }
-   if (o_flag)
-      fprintf(outfile,"============\n");
-   SETw(Curwin, NEWFRAM_cwo);
-   return p_table;
+	/*
+	 ** Display Memory and Swap stats */
+	meminfo();
+	if (CHKw(Curwin, View_MEMORY)) {
+		show_special(0,
+			     fmtmk(MEMORY_line1, kb_main_total, kb_main_used,
+				   kb_main_free, kb_main_buffers));
+		if (o_flag)
+			fprintf(outfile,
+				" TotalMem:%dk\tUsedMem:%dk\tFreeMem:%dk\t\tBuffers:%dk\n",
+				kb_main_total, kb_main_used, kb_main_free,
+				kb_main_buffers);
+		show_special(0,
+			     fmtmk(MEMORY_line2, kb_swap_total, kb_swap_used,
+				   kb_swap_free, kb_main_cached));
+		if (o_flag)
+			fprintf(outfile,
+				" TotalSwap:%dk\tUsedSwap:%dk\tFreeSwap:%dk\tCached:%dk\n",
+				kb_swap_total, kb_swap_used, kb_swap_free,
+				kb_main_cached);
+		Msg_row += 2;
+	}
+	if (o_flag)
+		fprintf(outfile, "============\n");
+	SETw(Curwin, NEWFRAM_cwo);
+	return p_table;
 }
 
-
-        /*
-         * Display information for a single task row. */
-static void task_show (const WIN_t *q, const proc_t *p)
+	/*
+	 * Display information for a single task row. */
+static void task_show(const WIN_t * q, const proc_t * p)
 {
-   /* the following macro is our means to 'inline' emitting a column -- next to
-      procs_refresh, that's the most frequent and costly part of top's job ! */
+	/* the following macro is our means to 'inline' emitting a column -- next to
+	   procs_refresh, that's the most frequent and costly part of top's job ! */
 #define MKCOL(va...) do { \
    if (likely(!(CHKw(q, Show_HICOLS) && q->rc.sortindx == i))) \
       snprintf(cbuf, sizeof(cbuf), f, ## va); \
@@ -3009,404 +3259,426 @@
       pad += q->len_rowhigh; \
       if (!(CHKw(q, Show_HIROWS) && 'R' == p->state)) pad += q->len_rownorm; \
    } } while (0)
-   char rbuf[ROWBUFSIZ], *rp;
-   int j, x, pad;
+	char rbuf[ROWBUFSIZ], *rp;
+	int j, x, pad;
 
-   // we must begin a row with a possible window number in mind...
-   *(rp = rbuf) = '\0';
-   if ((pad = Rc.mode_altscr)) rp = scat(rp, " ");
+	// we must begin a row with a possible window number in mind...
+	*(rp = rbuf) = '\0';
+	if ((pad = Rc.mode_altscr))
+		rp = scat(rp, " ");
 
-   for (x = 0; x < q->maxpflgs; x++) {
-      char cbuf[ROWBUFSIZ], _z[ROWBUFSIZ];
-      FLG_t       i = q->procflags[x];          // support for our field/column
-      const char *f = Fieldstab[i].fmts;        // macro AND sometimes the fmt
-      unsigned    s = Fieldstab[i].scale;       // string must be altered !
-      unsigned    w = Fieldstab[i].width;
+	for (x = 0; x < q->maxpflgs; x++) {
+		char cbuf[ROWBUFSIZ], _z[ROWBUFSIZ];
+		FLG_t i = q->procflags[x];	// support for our field/column
+		const char *f = Fieldstab[i].fmts;	// macro AND sometimes the fmt
+		unsigned s = Fieldstab[i].scale;	// string must be altered !
+		unsigned w = Fieldstab[i].width;
 
-      switch (i) {
-         case P_CMD:
-         {  char tmp[ROWBUFSIZ];
-            unsigned flags;
-            if (CHKw(q, Show_CMDLIN)) flags = ESC_DEFUNCT | ESC_BRACKETS | ESC_ARGS;
-            else                      flags = ESC_DEFUNCT;
-            escape_command(tmp, p, sizeof tmp, q->maxcmdln, flags);
-            MKCOL(q->maxcmdln, q->maxcmdln, tmp);
-         }
-            break;
-         case P_COD:
-            MKCOL(scale_num(PAGES_2K(p->trs), w, s));
-            break;
-         case P_CPN:
-            MKCOL((unsigned)p->processor);
-            break;
-         case P_CPU:
-         {  float u = (float)p->pcpu * Frame_tscale;
-            if (99.9 < u) u = 99.9;
-            MKCOL(u);
-         }
-            break;
-         case P_DAT:
-            MKCOL(scale_num(PAGES_2K(p->drs), w, s));
-            break;
-         case P_DRT:
-            MKCOL(scale_num((unsigned)p->dt, w, s));
-            break;
-         case P_FLG:
-         {  char tmp[TNYBUFSIZ];
-            snprintf(tmp, sizeof(tmp), f, (long)p->flags);
-            for (j = 0; tmp[j]; j++) if ('0' == tmp[j]) tmp[j] = '.';
-            f = tmp;
-            MKCOL("");
-         }
-            break;
-         case P_FLT:
-            MKCOL(scale_num(p->maj_flt, w, s));
-            break;
-         case P_GRP:
-            MKCOL(p->egroup);
-            break;
-         case P_MEM:
-            MKCOL((float)PAGES_2K(p->resident) * 100 / kb_main_total);
-            break;
-         case P_NCE:
-            MKCOL((int)p->nice);
-            break;
-         case P_PID:
-            MKCOL((unsigned)p->pid);
-            break;
-         case P_PPD:
-            MKCOL((unsigned)p->ppid);
-            break;
-         case P_PRI:
-            if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) {
-               f = " RT ";
-               MKCOL("");
-            } else
-               MKCOL((int)p->priority);
-            break;
-         case P_RES:
-            MKCOL(scale_num(PAGES_2K(p->resident), w, s));
-            break;
-         case P_SHR:
-            MKCOL(scale_num(PAGES_2K(p->share), w, s));
-            break;
-         case P_STA:
+		switch (i) {
+		case P_CMD:
+			{
+				char tmp[ROWBUFSIZ];
+				unsigned flags;
+				if (CHKw(q, Show_CMDLIN))
+					flags =
+					    ESC_DEFUNCT | ESC_BRACKETS |
+					    ESC_ARGS;
+				else
+					flags = ESC_DEFUNCT;
+				escape_command(tmp, p, sizeof tmp, q->maxcmdln,
+					       flags);
+				MKCOL(q->maxcmdln, q->maxcmdln, tmp);
+			}
+			break;
+		case P_COD:
+			MKCOL(scale_num(PAGES_2K(p->trs), w, s));
+			break;
+		case P_CPN:
+			MKCOL((unsigned)p->processor);
+			break;
+		case P_CPU:
+			{
+				float u = (float)p->pcpu * Frame_tscale;
+				if (99.9 < u)
+					u = 99.9;
+				MKCOL(u);
+			}
+			break;
+		case P_DAT:
+			MKCOL(scale_num(PAGES_2K(p->drs), w, s));
+			break;
+		case P_DRT:
+			MKCOL(scale_num((unsigned)p->dt, w, s));
+			break;
+		case P_FLG:
+			{
+				char tmp[TNYBUFSIZ];
+				snprintf(tmp, sizeof(tmp), f, (long)p->flags);
+				for (j = 0; tmp[j]; j++)
+					if ('0' == tmp[j])
+						tmp[j] = '.';
+				f = tmp;
+				MKCOL("");
+			}
+			break;
+		case P_FLT:
+			MKCOL(scale_num(p->maj_flt, w, s));
+			break;
+		case P_GRP:
+			MKCOL(p->egroup);
+			break;
+		case P_MEM:
+			MKCOL((float)PAGES_2K(p->resident) * 100 /
+			      kb_main_total);
+			break;
+		case P_NCE:
+			MKCOL((int)p->nice);
+			break;
+		case P_PID:
+			MKCOL((unsigned)p->pid);
+			break;
+		case P_PPD:
+			MKCOL((unsigned)p->ppid);
+			break;
+		case P_PRI:
+			if (unlikely(-99 > p->priority)
+			    || unlikely(999 < p->priority)) {
+				f = " RT ";
+				MKCOL("");
+			} else
+				MKCOL((int)p->priority);
+			break;
+		case P_RES:
+			MKCOL(scale_num(PAGES_2K(p->resident), w, s));
+			break;
+		case P_SHR:
+			MKCOL(scale_num(PAGES_2K(p->share), w, s));
+			break;
+		case P_STA:
 #ifdef USE_LIB_STA3
-            MKCOL(status(p));
+			MKCOL(status(p));
 #else
-            MKCOL(p->state);
+			MKCOL(p->state);
 #endif
-            break;
-         case P_SWP:
-            MKCOL(scale_num(PAGES_2K(p->size - p->resident), w, s));
-            break;
-         case P_TME:
-         case P_TM2:
-         {  TIC_t t = p->utime + p->stime;
-            if (CHKw(q, Show_CTIMES))
-               t += (p->cutime + p->cstime);
-            MKCOL(scale_tics(t, w));
-         }
-            break;
-         case P_TTY:
-         {  char tmp[TNYBUFSIZ];
-            dev_to_tty(tmp, (int)w, p->tty, p->pid, ABBREV_DEV);
-            MKCOL(tmp);
-         }
-            break;
-         case P_UID:
-            MKCOL((unsigned)p->euid);
-            break;
-         case P_URE:
-            MKCOL(p->euser);
-            break;
-         case P_URR:
-            MKCOL(p->ruser);
-            break;
-         case P_VRT:
-            MKCOL(scale_num(PAGES_2K(p->size), w, s));
-            break;
-         case P_WCH:
-            if (No_ksyms) {
+			break;
+		case P_SWP:
+			MKCOL(scale_num(PAGES_2K(p->size - p->resident), w, s));
+			break;
+		case P_TME:
+		case P_TM2:
+			{
+				TIC_t t = p->utime + p->stime;
+				if (CHKw(q, Show_CTIMES))
+					t += (p->cutime + p->cstime);
+				MKCOL(scale_tics(t, w));
+			}
+			break;
+		case P_TTY:
+			{
+				char tmp[TNYBUFSIZ];
+				dev_to_tty(tmp, (int)w, p->tty, p->pid,
+					   ABBREV_DEV);
+				MKCOL(tmp);
+			}
+			break;
+		case P_UID:
+			MKCOL((unsigned)p->euid);
+			break;
+		case P_URE:
+			MKCOL(p->euser);
+			break;
+		case P_URR:
+			MKCOL(p->ruser);
+			break;
+		case P_VRT:
+			MKCOL(scale_num(PAGES_2K(p->size), w, s));
+			break;
+		case P_WCH:
+			if (No_ksyms) {
 #ifdef CASEUP_HEXES
-               f = "%08lX  ";
+				f = "%08lX  ";
 #else
-               f = "%08lx  ";
+				f = "%08lx  ";
 #endif
-               MKCOL((long)p->wchan);
-            } else {
-               MKCOL(wchan(p->wchan, p->pid));
-            }
-            break;
+				MKCOL((long)p->wchan);
+			} else {
+				MKCOL(wchan(p->wchan, p->pid));
+			}
+			break;
 
-        } /* end: switch 'procflag' */
+		}		/* end: switch 'procflag' */
 
-        rp = scat(rp, cbuf);
-   } /* end: for 'maxpflgs' */
+		rp = scat(rp, cbuf);
+	}			/* end: for 'maxpflgs' */
 
-   PUFF("\n%s%.*s%s%s", (CHKw(q, Show_HIROWS) && 'R' == p->state)
-      ? q->capclr_rowhigh : q->capclr_rownorm
-      , Screen_cols + pad
-      , rbuf
-      , Caps_off
-      , Cap_clr_eol);
+	PUFF("\n%s%.*s%s%s", (CHKw(q, Show_HIROWS) && 'R' == p->state)
+	     ? q->capclr_rowhigh : q->capclr_rownorm, Screen_cols + pad, rbuf,
+	     Caps_off, Cap_clr_eol);
 
 #undef MKCOL
 }
 
-
-        /*
-         * Squeeze as many tasks as we can into a single window,
-         * after sorting the passed proc table. */
-static void window_show (proc_t **ppt, WIN_t *q, int *lscr)
+	/*
+	 * Squeeze as many tasks as we can into a single window,
+	 * after sorting the passed proc table. */
+static void window_show(proc_t ** ppt, WIN_t * q, int *lscr)
 {
 #ifdef SORT_SUPRESS
-   // the 1 flag that DOES and 2 flags that MAY impact our proc table qsort
+	// the 1 flag that DOES and 2 flags that MAY impact our proc table qsort
 #define srtMASK  ~( Qsrt_NORMAL | Show_CMDLIN | Show_CTIMES )
-   static FLG_t sav_indx = 0;
-   static int   sav_flgs = -1;
+	static FLG_t sav_indx = 0;
+	static int sav_flgs = -1;
 #endif
-   int i, lwin;
+	int i, lwin;
 
-   /*
-    ** Display Column Headings -- and distract 'em while we sort (maybe) */
-   PUFF("\n%s%s%s%s", q->capclr_hdr, q->columnhdr, Caps_off, Cap_clr_eol);
+	/*
+	 ** Display Column Headings -- and distract 'em while we sort (maybe) */
+	PUFF("\n%s%s%s%s", q->capclr_hdr, q->columnhdr, Caps_off, Cap_clr_eol);
 
 #ifdef SORT_SUPRESS
-   if (CHKw(Curwin, NEWFRAM_cwo)
-   || sav_indx != q->rc.sortindx
-   || sav_flgs != (q->rc.winflags & srtMASK)) {
-      sav_indx = q->rc.sortindx;
-      sav_flgs = (q->rc.winflags & srtMASK);
+	if (CHKw(Curwin, NEWFRAM_cwo)
+	    || sav_indx != q->rc.sortindx
+	    || sav_flgs != (q->rc.winflags & srtMASK)) {
+		sav_indx = q->rc.sortindx;
+		sav_flgs = (q->rc.winflags & srtMASK);
 #endif
-      if (CHKw(q, Qsrt_NORMAL)) Frame_srtflg = 1; // this one's always needed!
-         else Frame_srtflg = -1;
-      Frame_ctimes = CHKw(q, Show_CTIMES);        // this and next, only maybe
-      Frame_cmdlin = CHKw(q, Show_CMDLIN);
-      qsort(ppt, Frame_maxtask, sizeof(proc_t *), Fieldstab[q->rc.sortindx].sort);
+		if (CHKw(q, Qsrt_NORMAL))
+			Frame_srtflg = 1;	// this one's always needed!
+		else
+			Frame_srtflg = -1;
+		Frame_ctimes = CHKw(q, Show_CTIMES);	// this and next, only maybe
+		Frame_cmdlin = CHKw(q, Show_CMDLIN);
+		qsort(ppt, Frame_maxtask, sizeof(proc_t *),
+		      Fieldstab[q->rc.sortindx].sort);
 #ifdef SORT_SUPRESS
-   }
+	}
 #endif
-   // account for column headings
-   (*lscr)++;
-   lwin = 1;
-   i = 0;
+	// account for column headings
+	(*lscr)++;
+	lwin = 1;
+	i = 0;
 
-   while (-1 != ppt[i]->pid && *lscr < Max_lines  &&  (!q->winlines || (lwin <= q->winlines))) {
-      if ((CHKw(q, Show_IDLEPS) || ('S' != ppt[i]->state && 'Z' != ppt[i]->state))
-      && good_uid(ppt[i]) ) {
-         /*
-          ** Display a process Row */
-         task_show(q, ppt[i]);
-         (*lscr)++;
-         ++lwin;
-      }
-      ++i;
-   }
-   // for this frame that window's toast, cleanup for next time
-   q->winlines = 0;
-   OFFw(Curwin, FLGSOFF_cwo);
+	while (-1 != ppt[i]->pid && *lscr < Max_lines
+	       && (!q->winlines || (lwin <= q->winlines))) {
+		if ((CHKw(q, Show_IDLEPS)
+		     || ('S' != ppt[i]->state && 'Z' != ppt[i]->state))
+		    && good_uid(ppt[i])) {
+			/*
+			 ** Display a process Row */
+			task_show(q, ppt[i]);
+			(*lscr)++;
+			++lwin;
+		}
+		++i;
+	}
+	// for this frame that window's toast, cleanup for next time
+	q->winlines = 0;
+	OFFw(Curwin, FLGSOFF_cwo);
 
 #ifdef SORT_SUPRESS
 #undef srtMASK
 #endif
 }
 
-
 /*######  Entry point plus two  ##########################################*/
 
-        /*
-         * This guy's just a *Helper* function who apportions the
-         * remaining amount of screen real estate under multiple windows */
-static void framehlp (int wix, int max)
+	/*
+	 * This guy's just a *Helper* function who apportions the
+	 * remaining amount of screen real estate under multiple windows */
+static void framehlp(int wix, int max)
 {
-   int i, rsvd, size, wins;
+	int i, rsvd, size, wins;
 
-   // calc remaining number of visible windows + total 'user' lines
-   for (i = wix, rsvd = 0, wins = 0; i < GROUPSMAX; i++) {
-      if (CHKw(&Winstk[i], VISIBLE_tsk)) {
-         rsvd += Winstk[i].rc.maxtasks;
-         ++wins;
-         if (max <= rsvd) break;
-      }
-   }
-   if (!wins) wins = 1;
-   // set aside 'rsvd' & deduct 1 line/window for the columns heading
-   size = (max - wins) - rsvd;
-   if (0 <= size) size = max;
-   size = (max - wins) / wins;
+	// calc remaining number of visible windows + total 'user' lines
+	for (i = wix, rsvd = 0, wins = 0; i < GROUPSMAX; i++) {
+		if (CHKw(&Winstk[i], VISIBLE_tsk)) {
+			rsvd += Winstk[i].rc.maxtasks;
+			++wins;
+			if (max <= rsvd)
+				break;
+		}
+	}
+	if (!wins)
+		wins = 1;
+	// set aside 'rsvd' & deduct 1 line/window for the columns heading
+	size = (max - wins) - rsvd;
+	if (0 <= size)
+		size = max;
+	size = (max - wins) / wins;
 
-   /* for remaining windows, set WIN_t winlines to either the user's
-      maxtask (1st choice) or our 'foxized' size calculation
-      (foxized  adj. -  'fair and balanced') */
-   for (i = wix ; i < GROUPSMAX; i++) {
-      if (CHKw(&Winstk[i], VISIBLE_tsk)) {
-         Winstk[i].winlines =
-            Winstk[i].rc.maxtasks ? Winstk[i].rc.maxtasks : size;
-      }
-   }
+	/* for remaining windows, set WIN_t winlines to either the user's
+	   maxtask (1st choice) or our 'foxized' size calculation
+	   (foxized  adj. -  'fair and balanced') */
+	for (i = wix; i < GROUPSMAX; i++) {
+		if (CHKw(&Winstk[i], VISIBLE_tsk)) {
+			Winstk[i].winlines =
+			    Winstk[i].rc.maxtasks ? Winstk[i].rc.
+			    maxtasks : size;
+		}
+	}
 }
 
-
-        /*
-         * Initiate the Frame Display Update cycle at someone's whim!
-         * This routine doesn't do much, mostly he just calls others.
-         *
-         * (Whoa, wait a minute, we DO caretake those row guys, plus)
-         * (we CALCULATE that IMPORTANT Max_lines thingy so that the)
-         * (*subordinate* functions invoked know WHEN the user's had)
-         * (ENOUGH already.  And at Frame End, it SHOULD be apparent)
-         * (WE am d'MAN -- clearing UNUSED screen LINES and ensuring)
-         * (the CURSOR is STUCK in just the RIGHT place, know what I)
-         * (mean?  Huh, "doesn't DO MUCH"!  Never, EVER think or say)
-         * (THAT about THIS function again, Ok?  Good that's better.)
-         *
-         * (ps. we ARE the UNEQUALED justification KING of COMMENTS!)
-         * (No, I don't mean significance/relevance, only alignment.)
-         *
-         * (What's that?  Are you sure?  Old main's REALLY GOOD too?)
-         * (You say he even JUSTIFIES comments in his FUNCTION BODY?)
-         * (Jeeze, how COULD I have known?  That sob's NOT IN SCOPE!)
-         */
-static void frame_make (void)
+	/*
+	 * Initiate the Frame Display Update cycle at someone's whim!
+	 * This routine doesn't do much, mostly he just calls others.
+	 *
+	 * (Whoa, wait a minute, we DO caretake those row guys, plus)
+	 * (we CALCULATE that IMPORTANT Max_lines thingy so that the)
+	 * (*subordinate* functions invoked know WHEN the user's had)
+	 * (ENOUGH already.  And at Frame End, it SHOULD be apparent)
+	 * (WE am d'MAN -- clearing UNUSED screen LINES and ensuring)
+	 * (the CURSOR is STUCK in just the RIGHT place, know what I)
+	 * (mean?  Huh, "doesn't DO MUCH"!  Never, EVER think or say)
+	 * (THAT about THIS function again, Ok?  Good that's better.)
+	 *
+	 * (ps. we ARE the UNEQUALED justification KING of COMMENTS!)
+	 * (No, I don't mean significance/relevance, only alignment.)
+	 *
+	 * (What's that?  Are you sure?  Old main's REALLY GOOD too?)
+	 * (You say he even JUSTIFIES comments in his FUNCTION BODY?)
+	 * (Jeeze, how COULD I have known?  That sob's NOT IN SCOPE!)
+	 */
+static void frame_make(void)
 {
-   proc_t **ppt;
-   int i, scrlins;
+	proc_t **ppt;
+	int i, scrlins;
 
-   /* note: except for PROC_PID, all libproc flags are managed by
-            reframewins(), who also builds each window's column headers */
-   if (!Frames_libflags) {
-      reframewins();
-      memset(Pseudo_scrn, '\0', Pseudo_size);
-   }
-   Pseudo_row = Msg_row = scrlins = 0;
-   ppt = summary_show();
-   Max_lines = (Screen_rows - Msg_row) - 1;
+	/* note: except for PROC_PID, all libproc flags are managed by
+	   reframewins(), who also builds each window's column headers */
+	if (!Frames_libflags) {
+		reframewins();
+		memset(Pseudo_scrn, '\0', Pseudo_size);
+	}
+	Pseudo_row = Msg_row = scrlins = 0;
+	ppt = summary_show();
+	Max_lines = (Screen_rows - Msg_row) - 1;
 
-   if (CHKw(Curwin, EQUWINS_cwo))
-      wins_reflag(Flags_OFF, EQUWINS_cwo);
+	if (CHKw(Curwin, EQUWINS_cwo))
+		wins_reflag(Flags_OFF, EQUWINS_cwo);
 
-   // sure hope each window's columns header begins with a newline...
-   putp(tg2(0, Msg_row));
+	// sure hope each window's columns header begins with a newline...
+	putp(tg2(0, Msg_row));
 
-   if (!Rc.mode_altscr) {
-      // only 1 window to show so, piece o' cake
-      Curwin->winlines = Curwin->rc.maxtasks;
-      window_show(ppt, Curwin, &scrlins);
-   } else {
-      // maybe NO window is visible but assume, pieces o' cakes
-      for (i = 0 ; i < GROUPSMAX; i++) {
-         if (CHKw(&Winstk[i], VISIBLE_tsk)) {
-            framehlp(i, Max_lines - scrlins);
-            window_show(ppt, &Winstk[i], &scrlins);
-         }
-         if (Max_lines <= scrlins) break;
-      }
-   }
-   /* clear to end-of-screen (critical if last window is 'idleps off'),
-      then put the cursor in-its-place, and rid us of any prior frame's msg
-      (main loop must iterate such that we're always called before sleep) */
-   PUTT("%s%s%s%s"
-      , scrlins < Max_lines ? "\n" : ""
-      , scrlins < Max_lines ? Cap_clr_eos : ""
-      , tg2(0, Msg_row)
-      , Cap_clr_eol);
-   fflush(stdout);
+	if (!Rc.mode_altscr) {
+		// only 1 window to show so, piece o' cake
+		Curwin->winlines = Curwin->rc.maxtasks;
+		window_show(ppt, Curwin, &scrlins);
+	} else {
+		// maybe NO window is visible but assume, pieces o' cakes
+		for (i = 0; i < GROUPSMAX; i++) {
+			if (CHKw(&Winstk[i], VISIBLE_tsk)) {
+				framehlp(i, Max_lines - scrlins);
+				window_show(ppt, &Winstk[i], &scrlins);
+			}
+			if (Max_lines <= scrlins)
+				break;
+		}
+	}
+	/* clear to end-of-screen (critical if last window is 'idleps off'),
+	   then put the cursor in-its-place, and rid us of any prior frame's msg
+	   (main loop must iterate such that we're always called before sleep) */
+	PUTT("%s%s%s%s", scrlins < Max_lines ? "\n" : "",
+	     scrlins < Max_lines ? Cap_clr_eos : "", tg2(0, Msg_row)
+	     , Cap_clr_eol);
+	fflush(stdout);
 }
 
-
-        /*
-         * Darling, you DO look simply MARVELOUS -- have you been dieting?
-         * Or maybe it's because YOU and WINDOWS seem such a HAPPY couple.
-         *
-         * Of course NO.  Not THOSE deathly BLUE WINDOWS!  I mean your 'A'
-         * mode (alt display) windows.  Yes, yes those completely OPTIONAL
-         * ones.  We ALL know you'd NEVER FORCE that interface on ANY user
-         * - unlike You-Know-Who!  Well I've got to run.  But you're doing
-         * it just SPLENDIDLY!  You go right on doing it EXACTLY the SAME!
-         */
-int main (int dont_care_argc, char **argv)
+	/*
+	 * Darling, you DO look simply MARVELOUS -- have you been dieting?
+	 * Or maybe it's because YOU and WINDOWS seem such a HAPPY couple.
+	 *
+	 * Of course NO.  Not THOSE deathly BLUE WINDOWS!  I mean your 'A'
+	 * mode (alt display) windows.  Yes, yes those completely OPTIONAL
+	 * ones.  We ALL know you'd NEVER FORCE that interface on ANY user
+	 * - unlike You-Know-Who!  Well I've got to run.  But you're doing
+	 * it just SPLENDIDLY!  You go right on doing it EXACTLY the SAME!
+	 */
+int main(int dont_care_argc, char **argv)
 {
-   (void)dont_care_argc;
-   before(*argv);
-  /*
-   Ok, she's gone now.  Don't you mind her, she means well but yes, she is
-   a bit of a busy-body.  Always playing the matchmaker role, trying to do
-   away with unmarried windows and bachelors.  So, back to business buddy!
+	(void)dont_care_argc;
+	before(*argv);
+	/*
+	   Ok, she's gone now.  Don't you mind her, she means well but yes, she is
+	   a bit of a busy-body.  Always playing the matchmaker role, trying to do
+	   away with unmarried windows and bachelors.  So, back to business buddy!
 
-   You're hungry, you said?  How'd you like a sandwich?  No, no, no -- not
-   the usual slopped together, hacked up illogic.  I'm talkin' a carefully
-   reasoned, artfully crafted, extremely capable, well behaved executable!
+	   You're hungry, you said?  How'd you like a sandwich?  No, no, no -- not
+	   the usual slopped together, hacked up illogic.  I'm talkin' a carefully
+	   reasoned, artfully crafted, extremely capable, well behaved executable!
 
-   Well then, here, try THIS sandwich:  */
-                                        //                 +-------------+
-   windows_stage1();                    //                 top (sic) slice
-   configs_read();                      //                 > spread etc, <
-   parse_args(&argv[1]);                //                 > lean stuff, <
-   whack_terminal();                    //                 > onions etc. <
-   windows_stage2();                    //                 as bottom slice
-                                        //                 +-------------+
-   signal(SIGALRM,  end_pgm);
-   signal(SIGHUP,   end_pgm);
-   signal(SIGINT,   end_pgm);
-   signal(SIGPIPE,  end_pgm);
-   signal(SIGQUIT,  end_pgm);
-   signal(SIGTERM,  end_pgm);
-   signal(SIGTSTP,  suspend);
-   signal(SIGTTIN,  suspend);
-   signal(SIGTTOU,  suspend);
-   signal(SIGCONT,  wins_resize);
-   signal(SIGWINCH, wins_resize);
+	   Well then, here, try THIS sandwich:  */
+	//                 +-------------+
+	windows_stage1();	//                 top (sic) slice
+	configs_read();		//                 > spread etc, <
+	parse_args(&argv[1]);	//                 > lean stuff, <
+	whack_terminal();	//                 > onions etc. <
+	windows_stage2();	//                 as bottom slice
+	//                 +-------------+
+	signal(SIGALRM, end_pgm);
+	signal(SIGHUP, end_pgm);
+	signal(SIGINT, end_pgm);
+	signal(SIGPIPE, end_pgm);
+	signal(SIGQUIT, end_pgm);
+	signal(SIGTERM, end_pgm);
+	signal(SIGTSTP, suspend);
+	signal(SIGTTIN, suspend);
+	signal(SIGTTOU, suspend);
+	signal(SIGCONT, wins_resize);
+	signal(SIGWINCH, wins_resize);
 
-   for (;;) {
-      struct timeval tv;
-      fd_set fs;
-      char c;
-                                        //                     This is it?
-      frame_make();                     //                     Impossible!
+	for (;;) {
+		struct timeval tv;
+		fd_set fs;
+		char c;
+		//                     This is it?
+		frame_make();	//                     Impossible!
 
-      if (Msg_awaiting) show_msg(Msg_delayed);
-      if (0 < Loops) --Loops;
-      if (!Loops) end_pgm(0);
+		if (Msg_awaiting)
+			show_msg(Msg_delayed);
+		if (0 < Loops)
+			--Loops;
+		if (!Loops)
+			end_pgm(0);
 
-      if (Batch)
-         sleep((unsigned)Rc.delay_time);
-      else {                            //   Linux reports time not slept,
-         tv.tv_sec = Rc.delay_time;     //   so we must reinit every time.
-         tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000;
-         FD_ZERO(&fs);
-         FD_SET(STDIN_FILENO, &fs);
-         if (0 < select(STDIN_FILENO+1, &fs, NULL, NULL, &tv)
-         &&  0 < chin(0, &c, 1))
-            do_key((unsigned)c);
-      }
-   }
+		if (Batch)
+			sleep((unsigned)Rc.delay_time);
+		else {		//   Linux reports time not slept,
+			tv.tv_sec = Rc.delay_time;	//   so we must reinit every time.
+			tv.tv_usec =
+			    (Rc.delay_time - (int)Rc.delay_time) * 1000000;
+			FD_ZERO(&fs);
+			FD_SET(STDIN_FILENO, &fs);
+			if (0 < select(STDIN_FILENO + 1, &fs, NULL, NULL, &tv)
+			    && 0 < chin(0, &c, 1))
+				do_key((unsigned)c);
+		}
+	}
 
-  /*
-   (listen before we return, aren't you sort of sad for old 'frame_make'?)
-   (so, uh, why don't we just move this main guy to near the beginning of)
-   (the C source file.  then that poor old function would be sure to have)
-   (at least a chance at scopin' us out, ya know what i mean?  so what do)
-   (ya think?  all things considered, would that be a proper thing to do?)
+	/*
+	   (listen before we return, aren't you sort of sad for old 'frame_make'?)
+	   (so, uh, why don't we just move this main guy to near the beginning of)
+	   (the C source file.  then that poor old function would be sure to have)
+	   (at least a chance at scopin' us out, ya know what i mean?  so what do)
+	   (ya think?  all things considered, would that be a proper thing to do?)
 
-   Now there's an EXCELLENT idea!  After all, SOME programmers DO code the
-   main function ANY OLD PLACE they feel like.  And in doing THAT, they're
-   helping to keep those that FOLLOW out of mischief, busy HUNTING for the
-   <bleepin'> thing.  Further, by moving it we can contribute to PROTOTYPE
-   PROLIFERATION for every function main calls.  Don't you KNOW that those
-   declarations OFTEN LINGER, usually long AFTER the REAL definitions have
-   DISAPPEARED, since programs do evolve?  Yep that's a GREAT idea you got
-   there, NICE GOING!  But, here's an opposing view: ANYONE who'd put main
-   ANYWHERE such that its LOCATION cannot be REACHED with JUST 1 KEYSTROKE
-   better turn in their Coding_Badge and Pocket_Protector then -- BE GONE!
-   The main function has only ONE proper HOME: always the LAST function in
-   that C Listing.  End-of-Story, No-More-Discussion, so BE QUIET already!
+	   Now there's an EXCELLENT idea!  After all, SOME programmers DO code the
+	   main function ANY OLD PLACE they feel like.  And in doing THAT, they're
+	   helping to keep those that FOLLOW out of mischief, busy HUNTING for the
+	   <bleepin'> thing.  Further, by moving it we can contribute to PROTOTYPE
+	   PROLIFERATION for every function main calls.  Don't you KNOW that those
+	   declarations OFTEN LINGER, usually long AFTER the REAL definitions have
+	   DISAPPEARED, since programs do evolve?  Yep that's a GREAT idea you got
+	   there, NICE GOING!  But, here's an opposing view: ANYONE who'd put main
+	   ANYWHERE such that its LOCATION cannot be REACHED with JUST 1 KEYSTROKE
+	   better turn in their Coding_Badge and Pocket_Protector then -- BE GONE!
+	   The main function has only ONE proper HOME: always the LAST function in
+	   that C Listing.  End-of-Story, No-More-Discussion, so BE QUIET already!
 
-   \---------------------------------------------------------------------/
-   Sheeesh, didn't that doofus know the return statement can't be executed
-   or that we end via a caught signal?  Oh Lordy, I is DROWNING in morons!
-   They done REACHED clear up to my OUTER braces!  We's surely DOOMED now!
-   /---------------------------------------------------------------------\
-  */
-   return 0;
+	   \---------------------------------------------------------------------/
+	   Sheeesh, didn't that doofus know the return statement can't be executed
+	   or that we end via a caught signal?  Oh Lordy, I is DROWNING in morons!
+	   They done REACHED clear up to my OUTER braces!  We's surely DOOMED now!
+	   /---------------------------------------------------------------------\
+	 */
+	return 0;
 }
diff --git a/unittests/safe_macros/test_safe_macros.c b/unittests/safe_macros/test_safe_macros.c
index 01449a2..1f23e7e 100644
--- a/unittests/safe_macros/test_safe_macros.c
+++ b/unittests/safe_macros/test_safe_macros.c
@@ -6,16 +6,14 @@
 
 int fd = -1;
 
-void
-cleanup(void)
+void cleanup(void)
 {
 	SAFE_CLOSE(NULL, fd);
 	SAFE_UNLINK(NULL, __FILE__ "~");
 	tst_resm(TINFO, "got here");
 }
 
-int
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	char buf[10];
 	int fds[2];
diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
index 29923ab..61d0b7d 100644
--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
+++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
@@ -76,7 +76,7 @@
  */
 
 typedef size_t record_t;
-static unsigned int record_size = sizeof (record_t);
+static unsigned int record_size = sizeof(record_t);
 static char *cmd;
 static record_t **mem;
 static char **hole_mem;
@@ -85,8 +85,7 @@
 static volatile int threads_go;
 static unsigned int records_read;
 
-static void
-usage(void)
+static void usage(void)
 {
 	fprintf(stderr, "Usage: %s [options]\n"
 		"-T\t\t Just 'touch' the allocated pages\n"
@@ -101,8 +100,7 @@
 		"-S <seconds>\t Number of seconds to run\n"
 		"-t <num>\t Number of threads (2 * number cpus by default)\n"
 		"-v[v[v]]\t Be verbose (more v's for more verbose)\n"
-		"-z\t\t Linear search instead of binary search\n",
-		cmd);
+		"-z\t\t Linear search instead of binary search\n", cmd);
 	exit(1);
 }
 
@@ -110,8 +108,7 @@
  * Read options, check them, and set some defaults.
  */
 
-static void
-read_options(int argc, char *argv[])
+static void read_options(int argc, char *argv[])
 {
 	int c;
 
@@ -229,24 +226,22 @@
 	}
 }
 
-static void
-touch_mem(char *dest, size_t size)
+static void touch_mem(char *dest, size_t size)
 {
-       int i;
-       if (touch_pages) {
-               for (i = 0; i < size; i += page_size)
-                       *(dest + i) = 0xff;
-       }
+	int i;
+	if (touch_pages) {
+		for (i = 0; i < size; i += page_size)
+			*(dest + i) = 0xff;
+	}
 }
 
-static void *
-alloc_mem(size_t size)
+static void *alloc_mem(size_t size)
 {
 	char *p;
 	int err = 0;
 
 	if (always_mmap) {
-		p = mmap((void *) 0, size, (PROT_READ | PROT_WRITE),
+		p = mmap((void *)0, size, (PROT_READ | PROT_WRITE),
 			 (MAP_PRIVATE | MAP_ANONYMOUS), -1, 0);
 		if (p == MAP_FAILED)
 			err = 1;
@@ -267,8 +262,7 @@
 	return (p);
 }
 
-static void
-free_mem(void *p, size_t size)
+static void free_mem(void *p, size_t size)
 {
 	if (always_mmap)
 		munmap(p, size);
@@ -281,28 +275,25 @@
  * our own simple memcpy implementation.
  */
 
-static void
-my_memcpy(void *dest, void *src, size_t len)
+static void my_memcpy(void *dest, void *src, size_t len)
 {
-	char *d = (char *) dest;
-	char *s = (char *) src;
-        int i;
+	char *d = (char *)dest;
+	char *s = (char *)src;
+	int i;
 
-        for (i = 0; i < len; i++)
-                d[i] = s[i];
-        return;
+	for (i = 0; i < len; i++)
+		d[i] = s[i];
+	return;
 }
 
-static void
-allocate(void)
+static void allocate(void)
 {
 	int i;
 
-	mem = alloc_mem(chunks * sizeof (record_t *));
+	mem = alloc_mem(chunks * sizeof(record_t *));
 
 	if (use_holes)
-		hole_mem = alloc_mem(chunks * sizeof (record_t *));
-
+		hole_mem = alloc_mem(chunks * sizeof(record_t *));
 
 	for (i = 0; i < chunks; i++) {
 		mem[i] = (record_t *) alloc_mem(chunk_size);
@@ -320,8 +311,7 @@
 		printf("Allocated memory\n");
 }
 
-static void
-write_pattern(void)
+static void write_pattern(void)
 {
 	int i, j;
 
@@ -330,14 +320,13 @@
 			mem[i][j] = (record_t) j;
 		/* Prevent coalescing by alternating permissions */
 		if (use_permissions && (i % 2) == 0)
-			mprotect((void *) mem[i], chunk_size, PROT_READ);
+			mprotect((void *)mem[i], chunk_size, PROT_READ);
 	}
 	if (verbose)
 		printf("Wrote memory\n");
 }
 
-static void *
-linear_search(record_t key, record_t *base, size_t size)
+static void *linear_search(record_t key, record_t * base, size_t size)
 {
 	record_t *p;
 	record_t *end = base + (size / record_size);
@@ -348,10 +337,9 @@
 	return NULL;
 }
 
-static int
-compare(const void *p1, const void *p2)
+static int compare(const void *p1, const void *p2)
 {
-	return (* (record_t *) p1 - * (record_t *) p2);
+	return (*(record_t *) p1 - *(record_t *) p2);
 }
 
 /*
@@ -360,11 +348,10 @@
  * Inline because it's starting to be a scaling issue.
  */
 
-static inline unsigned int
-rand_num(unsigned int max, unsigned int *state)
+static inline unsigned int rand_num(unsigned int max, unsigned int *state)
 {
 	*state *= 1103515245 + 12345;
-	return ((*state/65536) % max);
+	return ((*state / 65536) % max);
 }
 
 /*
@@ -379,8 +366,7 @@
  *
  */
 
-static unsigned int
-search_mem(void)
+static unsigned int search_mem(void)
 {
 	record_t key, *found;
 	record_t *src, *copy;
@@ -402,7 +388,7 @@
 		copy = alloc_mem(copy_size);
 
 		if (touch_pages) {
-			touch_mem((char *) copy, copy_size);
+			touch_mem((char *)copy, copy_size);
 		} else {
 
 			if (no_lib_memcpy)
@@ -413,19 +399,21 @@
 			key = rand_num(copy_size / record_size, &state);
 
 			if (verbose > 2)
-				printf("Search key %zu, copy size %zu\n", key, copy_size);
+				printf("Search key %zu, copy size %zu\n", key,
+				       copy_size);
 			if (linear)
 				found = linear_search(key, copy, copy_size);
 			else
-				found = bsearch(&key, copy, copy_size / record_size,
-					record_size, compare);
+				found =
+				    bsearch(&key, copy, copy_size / record_size,
+					    record_size, compare);
 
-				/* Below check is mainly for memory corruption or other bug */
+			/* Below check is mainly for memory corruption or other bug */
 			if (found == NULL) {
 				fprintf(stderr, "Couldn't find key %zd\n", key);
 				exit(1);
 			}
-		} /* end if ! touch_pages */
+		}		/* end if ! touch_pages */
 
 		free_mem(copy, copy_size);
 	}
@@ -433,8 +421,7 @@
 	return (i);
 }
 
-static void *
-thread_run(void *arg)
+static void *thread_run(void *arg)
 {
 
 	if (verbose > 1)
@@ -442,7 +429,7 @@
 
 	/* Wait for the start signal */
 
-	while (threads_go == 0);
+	while (threads_go == 0) ;
 
 	records_read += search_mem();
 
@@ -453,8 +440,7 @@
 	return NULL;
 }
 
-static struct timeval
-difftimeval(struct timeval *end, struct timeval *start)
+static struct timeval difftimeval(struct timeval *end, struct timeval *start)
 {
 	struct timeval diff;
 	diff.tv_sec = end->tv_sec - start->tv_sec;
@@ -462,8 +448,7 @@
 	return diff;
 }
 
-static void
-start_threads(void)
+static void start_threads(void)
 {
 	pthread_t thread_array[threads];
 	double elapsed;
@@ -511,18 +496,17 @@
 		printf("Threads finished\n");
 
 	printf("%u records/s\n",
-	       (unsigned int) (((double) records_read)/elapsed));
+	       (unsigned int)(((double)records_read) / elapsed));
 
 	usr_time = difftimeval(&end_ru.ru_utime, &start_ru.ru_utime);
 	sys_time = difftimeval(&end_ru.ru_stime, &start_ru.ru_stime);
 
 	printf("real %5.2f s\n", elapsed);
-	printf("user %5.2f s\n", usr_time.tv_sec + usr_time.tv_usec/1e6);
-	printf("sys  %5.2f s\n", sys_time.tv_sec + sys_time.tv_usec/1e6);
+	printf("user %5.2f s\n", usr_time.tv_sec + usr_time.tv_usec / 1e6);
+	printf("sys  %5.2f s\n", sys_time.tv_sec + sys_time.tv_usec / 1e6);
 }
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
 	read_options(argc, argv);